[
  {
    "path": ".clusterfuzzlite/Dockerfile",
    "content": "# This container is used to build Meshtastic with the libraries required by the fuzzer.\n# ClusterFuzzLite starts the container, runs the build.sh script, and then exits.\n\n# As this is not a long running service, health-checks are not required. ClusterFuzzLite\n# also only works if the user remains unchanged from the base image (it expects to run\n# as root).\n# trunk-ignore-all(trivy/DS026): No healthcheck is needed for this builder container\n# trunk-ignore-all(checkov/CKV_DOCKER_2): No healthcheck is needed for this builder container\n# trunk-ignore-all(checkov/CKV_DOCKER_3): We must run as root for this container\n# trunk-ignore-all(trivy/DS002): We must run as root for this container\n# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container\n# trunk-ignore-all(hadolint/DL3002): We must run as root for this container\n\nFROM gcr.io/oss-fuzz-base/base-builder:v1\n\nENV PIP_ROOT_USER_ACTION=ignore\n\n# trunk-ignore(hadolint/DL3008): apt packages are not pinned.\n# trunk-ignore(terrascan/AC_DOCKER_0002): apt packages are not pinned.\nRUN apt-get update && apt-get install --no-install-recommends -y \\\n        cmake git zip libgpiod-dev libbluetooth-dev libi2c-dev \\\n        libunistring-dev libmicrohttpd-dev libgnutls28-dev libgcrypt20-dev \\\n        libusb-1.0-0-dev libssl-dev pkg-config libsqlite3-dev libsdl2-dev && \\\n    apt-get clean && rm -rf /var/lib/apt/lists/* && \\\n    pip install --no-cache-dir -U \\\n        platformio==6.1.16 \\\n        grpcio-tools==1.68.1 \\\n        meshtastic==2.5.9\n\n# Ugly hack to avoid clang detecting a conflict between the math \"log\" function and the \"log\" function in framework-portduino/cores/portduino/logging.h\nRUN sed -i -e 's/__MATHCALL_VEC (log,, (_Mdouble_ __x));//' /usr/include/x86_64-linux-gnu/bits/mathcalls.h\n\n# A few dependencies are too old on the base-builder image. More recent versions are built from source.\nWORKDIR $SRC\nRUN git config --global advice.detachedHead false && \\\n    git clone --depth 1 --branch 0.8.0 https://github.com/jbeder/yaml-cpp.git && \\\n    git clone --depth 1 --branch v2.3.3 https://github.com/babelouest/orcania.git && \\\n    git clone --depth 1 --branch v1.4.20 https://github.com/babelouest/yder.git && \\\n    git clone --depth 1 --branch v2.7.15 https://github.com/babelouest/ulfius.git\n\nCOPY ./.clusterfuzzlite/build.sh $SRC/\n\nWORKDIR $SRC/firmware\nCOPY . $SRC/firmware/\n\n# https://docs.platformio.org/en/latest/envvars.html\nENV PLATFORMIO_CORE_DIR=$SRC/pio/core \\\n    PLATFORMIO_LIBDEPS_DIR=$SRC/pio/libdeps \\\n    PLATFORMIO_PACKAGES_DIR=$SRC/pio/packages \\\n    PLATFORMIO_SETTING_ENABLE_CACHE=No \\\n    PIO_ENV=buildroot\nRUN platformio pkg install --environment $PIO_ENV\n"
  },
  {
    "path": ".clusterfuzzlite/README.md",
    "content": "# ClusterFuzzLite for Meshtastic\n\nThis directory contains the fuzzer implementation for Meshtastic using the ClusterFuzzLite framework.\nSee the [ClusterFuzzLite documentation](https://google.github.io/clusterfuzzlite/) for more details.\n\n## Running locally\n\nClusterFuzzLite uses the OSS-Fuzz toolchain. To build the fuzzer manually, first grab a copy of OSS-Fuzz.\n\n```shell\ngit clone https://github.com/google/oss-fuzz.git\ncd oss-fuzz\n```\n\nTo build the fuzzer, run:\n\n```shell\npython3 infra/helper.py build_image --external $PATH_TO_MESHTASTIC_FIRMWARE_DIRECTORY\npython3 infra/helper.py build_fuzzers --external $PATH_TO_MESHTASTIC_FIRMWARE_DIRECTORY --sanitizer address\n```\n\nTo run the fuzzer, run:\n\n```shell\npython3 infra/helper.py run_fuzzer --external --corpus-dir=<path-to-temp-corpus-dir> $PATH_TO_MESHTASTIC_FIRMWARE_DIRECTORY router_fuzzer\n```\n\nMore background on these commands can be found in the\n[ClusterFuzzLite documentation](https://google.github.io/clusterfuzzlite/build-integration/#testing-locally).\n\n## router_fuzzer.cpp\n\nThis fuzzer submits MeshPacket protos to the `Router::enqueueReceivedMessage` method. It takes the binary\ndata from the fuzzer and decodes that data to a MeshPacket using nanopb. A few fields in\nthe MeshPacket are modified by the fuzzer.\n\n- If the `to` field is 0, it will be replaced with the NodeID of the running node.\n- If the `from` field is 0, it will be replaced with the NodeID of the running node.\n- If the `id` field is 0, it will be replaced with an incrementing counter value.\n- If the `pki_encrypted` field is true, the `public_key` field will be populated with the first admin key.\n\nThe `router_fuzzer_seed_corpus.py` file contains a list of MeshPackets. It is run from inside build.sh and\nwrites the binary MeshPacket protos to files. These files are use used by the fuzzer as its initial seed data,\nhelping the fuzzer to start off with a few known inputs.\n\n### Interpreting a fuzzer crash\n\nIf the fuzzer crashes, it'll write the input bytes used for the test case to a file and notify about the\nlocation of that file. The contents of the file are a binary serialized MeshPacket protobuf. The following\nsnippet of Python code can be used to parse the file into a human readable form.\n\n```python\nfrom meshtastic.protobuf import mesh_pb2\n\nmesh_pb2.MeshPacket.FromString(open(\"crash-XXXX-file\", \"rb\").read())\n```\n\nConsider adding any such crash results to the `router_fuzzer_seed_corpus.py` file to ensure there a isn't\na future regression for that crash test case.\n"
  },
  {
    "path": ".clusterfuzzlite/build.sh",
    "content": "#!/bin/bash -eu\n\n# Build Meshtastic and a few needed dependencies using clang++\n# and the OSS-Fuzz required build flags.\n\nenv\n\ncd \"$SRC\"\nNPROC=$(nproc || echo 1)\n\nLDFLAGS=-lpthread cmake -S \"$SRC/yaml-cpp\" -B \"$WORK/yaml-cpp/$SANITIZER\" \\\n\t-DBUILD_SHARED_LIBS=OFF\ncmake --build \"$WORK/yaml-cpp/$SANITIZER\" -j \"$NPROC\"\ncmake --install \"$WORK/yaml-cpp/$SANITIZER\" --prefix /usr\n\ncmake -S \"$SRC/orcania\" -B \"$WORK/orcania/$SANITIZER\" \\\n\t-DBUILD_STATIC=ON\ncmake --build \"$WORK/orcania/$SANITIZER\" -j \"$NPROC\"\ncmake --install \"$WORK/orcania/$SANITIZER\" --prefix /usr\n\ncmake -S \"$SRC/yder\" -B \"$WORK/yder/$SANITIZER\" \\\n\t-DBUILD_STATIC=ON -DWITH_JOURNALD=OFF\ncmake --build \"$WORK/yder/$SANITIZER\" -j \"$NPROC\"\ncmake --install \"$WORK/yder/$SANITIZER\" --prefix /usr\n\ncmake -S \"$SRC/ulfius\" -B \"$WORK/ulfius/$SANITIZER\" \\\n\t-DBUILD_STATIC=ON -DWITH_JANSSON=OFF -DWITH_CURL=OFF -DWITH_WEBSOCKET=OFF\ncmake --build \"$WORK/ulfius/$SANITIZER\" -j \"$NPROC\"\ncmake --install \"$WORK/ulfius/$SANITIZER\" --prefix /usr\n\ncd \"$SRC/firmware\"\n\nPLATFORMIO_EXTRA_SCRIPTS=$(echo -e \"pre:.clusterfuzzlite/platformio-clusterfuzzlite-pre.py\\npost:.clusterfuzzlite/platformio-clusterfuzzlite-post.py\")\nSTATIC_LIBS=$(pkg-config --libs --static libulfius openssl libgpiod yaml-cpp bluez --silence-errors)\nexport PLATFORMIO_EXTRA_SCRIPTS\nexport STATIC_LIBS\nexport PLATFORMIO_WORKSPACE_DIR=\"$WORK/pio/$SANITIZER\"\nexport TARGET_CC=$CC\nexport TARGET_CXX=$CXX\nexport TARGET_LD=$CXX\nexport TARGET_AR=llvm-ar\nexport TARGET_AS=llvm-as\nexport TARGET_OBJCOPY=llvm-objcopy\nexport TARGET_RANLIB=llvm-ranlib\n\nmkdir -p \"$OUT/lib\"\n\ncp .clusterfuzzlite/*_fuzzer.options \"$OUT/\"\n\nfor f in .clusterfuzzlite/*_fuzzer.cpp; do\n\tfuzzer=$(basename \"$f\" .cpp)\n\tcp -f \"$f\" src/fuzzer.cpp\n\tpio run -vvv --environment \"$PIO_ENV\"\n\tprogram=\"$PLATFORMIO_WORKSPACE_DIR/build/$PIO_ENV/meshtasticd\"\n\tcp \"$program\" \"$OUT/$fuzzer\"\n\n\t# Copy shared libraries used by the fuzzer.\n\tread -d '' -ra shared_libs < <(ldd \"$program\" | sed -n 's/[^=]\\+=> \\([^ ]\\+\\).*/\\1/p') || true\n\tcp -f \"${shared_libs[@]}\" \"$OUT/lib/\"\n\n\t# Build the initial fuzzer seed corpus.\n\tcorpus_name=\"${fuzzer}_seed_corpus\"\n\tcorpus_generator=\"$PWD/.clusterfuzzlite/${corpus_name}.py\"\n\tif [[ -f $corpus_generator ]]; then\n\t\tmkdir \"$corpus_name\"\n\t\tpushd \"$corpus_name\"\n\t\tpython3 \"$corpus_generator\"\n\t\tpopd\n\t\tzip -D \"$OUT/${corpus_name}.zip\" \"$corpus_name\"/*\n\tfi\ndone\n"
  },
  {
    "path": ".clusterfuzzlite/platformio-clusterfuzzlite-post.py",
    "content": "\"\"\"PlatformIO build script (post: runs after other Meshtastic scripts).\"\"\"\n\nimport os\nimport shlex\n\nfrom SCons.Script import DefaultEnvironment\n\nenv = DefaultEnvironment()\n\n# Remove any static libraries from the LIBS environment. Static libraries are\n# handled in platformio-clusterfuzzlite-pre.py.\nstatic_libs = set(lib[2:] for lib in shlex.split(os.getenv(\"STATIC_LIBS\")))\nenv.Replace(\n    LIBS=[\n        lib for lib in env[\"LIBS\"] if not (isinstance(lib, str) and lib in static_libs)\n    ],\n)\n\n# FrameworkArduino/portduino/main.cpp contains the \"main\" function the binary.\n# The fuzzing framework also provides a \"main\" function and needs to be run\n# before Meshtastic is started. We rename the \"main\" function for Meshtastic to\n# \"portduino_main\" here so that it can be called inside the fuzzer.\nenv.AddPostAction(\n    \"$BUILD_DIR/FrameworkArduino/portduino/main.cpp.o\",\n    env.VerboseAction(\n        \" \".join(\n            [\n                \"$OBJCOPY\",\n                \"--redefine-sym=main=portduino_main\",\n                \"$BUILD_DIR/FrameworkArduino/portduino/main.cpp.o\",\n            ]\n        ),\n        \"Renaming main symbol to portduino_main\",\n    ),\n)\n"
  },
  {
    "path": ".clusterfuzzlite/platformio-clusterfuzzlite-pre.py",
    "content": "\"\"\"PlatformIO build script (pre: runs before other Meshtastic scripts).\n\nClusterFuzzLite executes in a different container from the build. During the build,\nattempt to link statically to as many dependencies as possible. For dependencies that\ndo not have static libraries, the shared library files are copied to the output\ndirectory by the build.sh script.\n\"\"\"\n\nimport glob\nimport os\nimport shlex\n\nfrom SCons.Script import DefaultEnvironment, Literal\n\nenv = DefaultEnvironment()\n\ncxxflags = shlex.split(os.getenv(\"CXXFLAGS\"))\nsanitizer_flags = shlex.split(os.getenv(\"SANITIZER_FLAGS\"))\nlib_fuzzing_engine = shlex.split(os.getenv(\"LIB_FUZZING_ENGINE\"))\nstatics = glob.glob(\"/usr/lib/lib*.a\") + glob.glob(\"/usr/lib/*/lib*.a\")\nno_static = set((\"-ldl\",))\n\n\ndef replaceStatic(lib):\n    \"\"\"Replace -l<libname> with the static .a file for the library.\"\"\"\n    if not lib.startswith(\"-l\") or lib in no_static:\n        return lib\n    static_name = f\"/lib{lib[2:]}.a\"\n    static = [s for s in statics if s.endswith(static_name)]\n    if len(static) == 1:\n        return static[0]\n    return lib\n\n\n# Setup the environment for building with Clang and the OSS-Fuzz required build flags.\nenv.Append(\n    CFLAGS=os.getenv(\"CFLAGS\"),\n    CXXFLAGS=cxxflags,\n    LIBSOURCE_DIRS=[\"/usr/lib/x86_64-linux-gnu\"],\n    LINKFLAGS=cxxflags\n    + sanitizer_flags\n    + lib_fuzzing_engine\n    + [\"-stdlib=libc++\", \"-std=c++17\"],\n    _LIBFLAGS=[replaceStatic(s) for s in shlex.split(os.getenv(\"STATIC_LIBS\"))]\n    + [\n        \"/usr/lib/x86_64-linux-gnu/libunistring.a\",  # Needs to be at the end.\n        # Find the shared libraries in a subdirectory named lib\n        # within the same directory as the binary.\n        Literal(\"-Wl,-rpath,$ORIGIN/lib\"),\n        \"-Wl,-z,origin\",\n    ],\n)\n"
  },
  {
    "path": ".clusterfuzzlite/project.yaml",
    "content": "language: c++\n"
  },
  {
    "path": ".clusterfuzzlite/router_fuzzer.cpp",
    "content": "// Fuzzer implementation that sends MeshPackets to Router::enqueueReceivedMessage.\n#include <condition_variable>\n#include <cstdlib>\n#include <mutex>\n#include <pb_decode.h>\n#include <stdexcept>\n#include <string>\n#include <thread>\n\n#include \"PortduinoGPIO.h\"\n#include \"PortduinoGlue.h\"\n#include \"PowerFSM.h\"\n#include \"mesh/MeshTypes.h\"\n#include \"mesh/NodeDB.h\"\n#include \"mesh/Router.h\"\n#include \"mesh/TypeConversions.h\"\n#include \"mesh/mesh-pb-constants.h\"\n\nnamespace\n{\nconstexpr uint32_t nodeId = 0x12345678;\n// Set to true when lateInitVariant finishes. Used to ensure lateInitVariant was called during startup.\nbool hasBeenConfigured = false;\n\n// These are used to block the Arduino loop() function until a fuzzer input is ready. This is\n// an optimization that prevents a sleep from happening before the loop is run. The Arduino loop\n// function calls loopCanSleep() before sleeping. loopCanSleep is implemented here in the fuzzer\n// and blocks until runLoopOnce() is called to signal for the loop to run.\nbool fuzzerRunning = false;  // Set to true once LLVMFuzzerTestOneInput has started running.\nbool loopCanRun = true;      // The main Arduino loop() can run when this is true.\nbool loopIsWaiting = false;  // The main Arduino loop() is waiting to be signaled to run.\nbool loopShouldExit = false; // Indicates that the main Arduino thread should exit by throwing ShouldExitException.\nstd::mutex loopLock;\nstd::condition_variable loopCV;\nstd::thread meshtasticThread;\n\n// This exception is thrown when the portuino main thread should exit.\nclass ShouldExitException : public std::runtime_error\n{\n  public:\n    using std::runtime_error::runtime_error;\n};\n\n// Start the loop for one test case and wait till the loop has completed. This ensures fuzz\n// test cases do not overlap with one another. This helps the fuzzer attribute a crash to the\n// single, currently running, test case.\nvoid runLoopOnce()\n{\n    realHardware = true; // Avoids delay(100) within portduino/main.cpp\n    std::unique_lock<std::mutex> lck(loopLock);\n    fuzzerRunning = true;\n    loopCanRun = true;\n    loopCV.notify_one();\n    loopCV.wait(lck, [] { return !loopCanRun && loopIsWaiting; });\n}\n} // namespace\n\n// Called in the main Arduino loop function to determine if the loop can delay/sleep before running again.\n// We use this as a way to block the loop from sleeping and to start the loop function immediately when a\n// fuzzer input is ready.\nbool loopCanSleep()\n{\n    std::unique_lock<std::mutex> lck(loopLock);\n    loopIsWaiting = true;\n    loopCV.notify_one();\n    loopCV.wait(lck, [] { return loopCanRun || loopShouldExit; });\n    loopIsWaiting = false;\n    if (loopShouldExit)\n        throw ShouldExitException(\"exit\");\n    if (!fuzzerRunning)\n        return true;    // The loop can sleep before the fuzzer starts.\n    loopCanRun = false; // Only run the loop once before waiting again.\n    return false;\n}\n\n// Called just prior to starting Meshtastic. Allows for setting config values before startup.\nvoid lateInitVariant()\n{\n    portduino_config.logoutputlevel = level_error;\n    channelFile.channels[0] = meshtastic_Channel{\n        .has_settings = true,\n        .settings =\n            meshtastic_ChannelSettings{\n                .psk = {.size = 1, .bytes = {/*defaultpskIndex=*/1}},\n                .name = \"LongFast\",\n                .uplink_enabled = true,\n                .has_module_settings = true,\n                .module_settings = {.position_precision = 16},\n            },\n        .role = meshtastic_Channel_Role_PRIMARY,\n    };\n    config.security.admin_key[0] = {\n        .size = 32,\n        .bytes = {0xcd, 0xc0, 0xb4, 0x3c, 0x53, 0x24, 0xdf, 0x13, 0xca, 0x5a, 0xa6, 0x0c, 0x0d, 0xec, 0x85, 0x5a,\n                  0x4c, 0xf6, 0x1a, 0x96, 0x04, 0x1a, 0x3e, 0xfc, 0xbb, 0x8e, 0x33, 0x71, 0xe5, 0xfc, 0xff, 0x3c},\n    };\n    config.security.admin_key_count = 1;\n    config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    moduleConfig.has_mqtt = true;\n    moduleConfig.mqtt = meshtastic_ModuleConfig_MQTTConfig{\n        .enabled = true,\n        .proxy_to_client_enabled = true,\n    };\n    moduleConfig.has_store_forward = true;\n    moduleConfig.store_forward = meshtastic_ModuleConfig_StoreForwardConfig{\n        .enabled = true,\n        .history_return_max = 4,\n        .history_return_window = 600,\n        .is_server = true,\n    };\n    meshtastic_Position fixedGPS = meshtastic_Position{\n        .has_latitude_i = true,\n        .latitude_i = static_cast<uint32_t>(1 * 1e7),\n        .has_longitude_i = true,\n        .longitude_i = static_cast<uint32_t>(3 * 1e7),\n        .has_altitude = true,\n        .altitude = 64,\n        .location_source = meshtastic_Position_LocSource_LOC_MANUAL,\n    };\n    nodeDB->setLocalPosition(fixedGPS);\n    config.has_position = true;\n    config.position.fixed_position = true;\n    meshtastic_NodeInfoLite *info = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    info->has_position = true;\n    info->position = TypeConversions::ConvertToPositionLite(fixedGPS);\n    hasBeenConfigured = true;\n}\n\nextern \"C\" {\nint portduino_main(int argc, char **argv); // Renamed \"main\" function from Meshtastic binary.\n\n// Start Meshtastic in a thread and wait till it has reached the ON state.\nint LLVMFuzzerInitialize(int *argc, char ***argv)\n{\n    portduino_config.maxtophone = 5;\n\n    meshtasticThread = std::thread([program = *argv[0]]() {\n        char nodeIdStr[12];\n        strcpy(nodeIdStr, std::to_string(nodeId).c_str());\n        int argc = 7;\n        char *argv[] = {program, \"-d\", \"/tmp/meshtastic\", \"-h\", nodeIdStr, \"-p\", \"0\", nullptr};\n        try {\n            portduino_main(argc, argv);\n        } catch (const ShouldExitException &) {\n        }\n    });\n    std::atexit([] {\n        {\n            const std::lock_guard<std::mutex> lck(loopLock);\n            loopShouldExit = true;\n            loopCV.notify_one();\n        }\n        meshtasticThread.join();\n    });\n\n    // Wait for startup.\n    for (int i = 1; i < 20; ++i) {\n        if (powerFSM.getState() == &stateON) {\n            assert(hasBeenConfigured);\n            assert(router);\n            assert(nodeDB);\n            return 0;\n        }\n        std::this_thread::sleep_for(std::chrono::seconds(1));\n    }\n    return 1;\n}\n\n// This is the main entrypoint for the fuzzer (the fuzz target). The fuzzer will provide an array of bytes to be\n// interpreted by this method. To keep things simple, the bytes are interpreted as a binary serialized MeshPacket\n// proto. Any crashes discovered by the fuzzer will be written to a file. Unserialize that file to print the MeshPacket\n// that caused the failure.\n//\n// This guide provides best practices for writing a fuzzer target.\n// https://github.com/google/fuzzing/blob/master/docs/good-fuzz-target.md\nint LLVMFuzzerTestOneInput(const uint8_t *data, size_t length)\n{\n    meshtastic_MeshPacket p = meshtastic_MeshPacket_init_default;\n    pb_istream_t stream = pb_istream_from_buffer(data, length);\n    // Ignore any inputs that fail to decode or have fields set that are not transmitted over LoRa.\n    if (!pb_decode(&stream, &meshtastic_MeshPacket_msg, &p) || p.rx_time || p.rx_snr || p.priority || p.rx_rssi || p.delayed ||\n        p.public_key.size || p.next_hop || p.relay_node || p.tx_after)\n        return -1; // Reject: The input will not be added to the corpus.\n    if (p.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        meshtastic_Data d;\n        stream = pb_istream_from_buffer(p.decoded.payload.bytes, p.decoded.payload.size);\n        if (!pb_decode(&stream, &meshtastic_Data_msg, &d))\n            return -1; // Reject: The input will not be added to the corpus.\n    }\n\n    // Provide default values for a few fields so the fuzzer doesn't need to guess them.\n    if (p.from == 0)\n        p.from = nodeDB->getNodeNum();\n    if (p.to == 0)\n        p.to = nodeDB->getNodeNum();\n    static uint32_t packetId = 0;\n    if (p.id == 0)\n        p.id == ++packetId;\n    if (p.pki_encrypted && config.security.admin_key_count)\n        memcpy(&p.public_key, &config.security.admin_key[0], sizeof(p.public_key));\n\n    router->enqueueReceivedMessage(packetPool.allocCopy(p));\n    runLoopOnce();\n    return 0; // Accept: The input may be added to the corpus.\n}\n}"
  },
  {
    "path": ".clusterfuzzlite/router_fuzzer.options",
    "content": "[libfuzzer]\nmax_len=256\n"
  },
  {
    "path": ".clusterfuzzlite/router_fuzzer_seed_corpus.py",
    "content": "\"\"\"Generate an initial set of MeshPackets.\n\nThe fuzzer uses these MeshPackets as an initial seed of test candidates.\n\nIt's also good to add any previously discovered crash test cases to this list\nto avoid future regressions.\n\nIf left unset, the following values will be automatically set by the fuzzer.\n  - to: automatically set to the running node's NodeID\n  - from: automatically set to the running node's NodeID\n  - id: automatically set to the value of an incrementing counter\n\nAdditionally, if `pki_encrypted` is populated in the packet, the first admin key\nwill be copied into the `public_key` field.\n\"\"\"\n\nimport base64\n\nfrom meshtastic import BROADCAST_NUM\nfrom meshtastic.protobuf import (\n    admin_pb2,\n    atak_pb2,\n    mesh_pb2,\n    portnums_pb2,\n    telemetry_pb2,\n)\n\n\ndef From(node: int = 9):\n    \"\"\"Return a dict suitable for **kwargs for populating the 'from' field.\n\n    'from' is a reserved keyword in Python. It can't be used directly as an\n    argument to the MeshPacket constructor. Rather **From() can be used as\n    the final argument to provide the from node as a **kwarg.\n\n    Defaults to 9 if no value is provided.\n    \"\"\"\n    return {\"from\": node}\n\n\npackets = (\n    (\n        \"position\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.POSITION_APP,\n                payload=mesh_pb2.Position(\n                    latitude_i=int(1 * 1e7),\n                    longitude_i=int(2 * 1e7),\n                    altitude=5,\n                    precision_bits=32,\n                ).SerializeToString(),\n            ),\n            to=BROADCAST_NUM,\n            **From(),\n        ),\n    ),\n    (\n        \"telemetry\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.TELEMETRY_APP,\n                payload=telemetry_pb2.Telemetry(\n                    time=1736192207,\n                    device_metrics=telemetry_pb2.DeviceMetrics(\n                        battery_level=101,\n                        channel_utilization=8,\n                        air_util_tx=2,\n                        uptime_seconds=42,\n                    ),\n                ).SerializeToString(),\n            ),\n            to=BROADCAST_NUM,\n            **From(),\n        ),\n    ),\n    (\n        \"text\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.TEXT_MESSAGE_APP,\n                payload=b\"Hello world\",\n            ),\n            to=BROADCAST_NUM,\n            **From(),\n        ),\n    ),\n    (\n        \"user\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.NODEINFO_APP,\n                payload=mesh_pb2.User(\n                    id=\"!00000009\",\n                    long_name=\"Node 9\",\n                    short_name=\"N9\",\n                    macaddr=b\"\\x00\\x00\\x00\\x00\\x00\\x09\",\n                    hw_model=mesh_pb2.HardwareModel.RAK4631,\n                    public_key=base64.b64decode(\n                        \"L0ih/6F41itofdE8mYyHk1SdfOJ/QRM1KQ+pO4vEEjQ=\"\n                    ),\n                ).SerializeToString(),\n            ),\n            **From(),\n        ),\n    ),\n    (\n        \"traceroute\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.TRACEROUTE_APP,\n                payload=mesh_pb2.RouteDiscovery(\n                    route=[10],\n                ).SerializeToString(),\n            ),\n            **From(),\n        ),\n    ),\n    (\n        \"routing\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.ROUTING_APP,\n                payload=mesh_pb2.Routing(\n                    error_reason=mesh_pb2.Routing.NO_RESPONSE,\n                ).SerializeToString(),\n            ),\n            **From(),\n        ),\n    ),\n    (\n        \"admin\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.ADMIN_APP,\n                payload=admin_pb2.AdminMessage(\n                    get_owner_request=True,\n                ).SerializeToString(),\n            ),\n            pki_encrypted=True,\n            **From(),\n        ),\n    ),\n    (\n        \"atak\",\n        mesh_pb2.MeshPacket(\n            decoded=mesh_pb2.Data(\n                portnum=portnums_pb2.PortNum.ATAK_PLUGIN,\n                payload=atak_pb2.TAKPacket(\n                    is_compressed=True,\n                    # Note, the strings are not valid for a compressed message, but will\n                    # give the fuzzer a starting point.\n                    contact=atak_pb2.Contact(\n                        callsign=\"callsign\", device_callsign=\"device_callsign\"\n                    ),\n                    chat=atak_pb2.GeoChat(\n                        message=\"message\", to=\"to\", to_callsign=\"to_callsign\"\n                    ),\n                ).SerializeToString(),\n            ),\n            **From(),\n        ),\n    ),\n)\n\nfor name, packet in packets:\n    with open(f\"{name}.MeshPacket\", \"wb\") as f:\n        f.write(packet.SerializeToString())\n"
  },
  {
    "path": ".devcontainer/99-platformio-udev.rules",
    "content": "# Copyright (c) 2014-present PlatformIO <contact@platformio.org>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n#####################################################################################\n#\n# INSTALLATION\n#\n# Please visit > https://docs.platformio.org/en/latest/core/installation/udev-rules.html\n#\n#####################################################################################\n\n#\n# Boards\n#\n\n# CP210X USB UART\nATTRS{idVendor}==\"10c4\", ATTRS{idProduct}==\"ea[67][013]\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\nATTRS{idVendor}==\"10c4\", ATTRS{idProduct}==\"80a9\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# FT231XS USB UART\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6015\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Prolific Technology, Inc. PL2303 Serial Port\nATTRS{idVendor}==\"067b\", ATTRS{idProduct}==\"2303\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# QinHeng Electronics HL-340 USB-Serial adapter\nATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"7523\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n# QinHeng Electronics CH343 USB-Serial adapter\nATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"55d3\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n# QinHeng Electronics CH9102 USB-Serial adapter\nATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"55d4\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Arduino boards\nATTRS{idVendor}==\"2341\", ATTRS{idProduct}==\"[08][023]*\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\nATTRS{idVendor}==\"2a03\", ATTRS{idProduct}==\"[08][02]*\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Arduino SAM-BA\nATTRS{idVendor}==\"03eb\", ATTRS{idProduct}==\"6124\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{MTP_NO_PROBE}=\"1\"\n\n# Digistump boards\nATTRS{idVendor}==\"16d0\", ATTRS{idProduct}==\"0753\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Maple with DFU\nATTRS{idVendor}==\"1eaf\", ATTRS{idProduct}==\"000[34]\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# USBtiny\nATTRS{idProduct}==\"0c9f\", ATTRS{idVendor}==\"1781\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# USBasp V2.0\nATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"05dc\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Teensy boards\nATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"04[789B]?\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\nATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"04[789A]?\", ENV{MTP_NO_PROBE}=\"1\"\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"04[789ABCD]?\", MODE:=\"0666\"\nKERNEL==\"ttyACM*\", ATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"04[789B]?\", MODE:=\"0666\"\n\n# TI Stellaris Launchpad\nATTRS{idVendor}==\"1cbe\", ATTRS{idProduct}==\"00fd\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# TI MSP430 Launchpad\nATTRS{idVendor}==\"0451\", ATTRS{idProduct}==\"f432\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# GD32V DFU Bootloader\nATTRS{idVendor}==\"28e9\", ATTRS{idProduct}==\"0189\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# FireBeetle-ESP32\nATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"7522\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Wio Terminal\nATTRS{idVendor}==\"2886\", ATTRS{idProduct}==\"[08]02d\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Raspberry Pi Pico\nATTRS{idVendor}==\"2e8a\", ATTRS{idProduct}==\"[01]*\", MODE:=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# AIR32F103\nATTRS{idVendor}==\"0d28\", ATTRS{idProduct}==\"0204\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# STM32 virtual COM port\nATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"5740\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n#\n# Debuggers\n#\n\n# Black Magic Probe\nSUBSYSTEM==\"tty\", ATTRS{interface}==\"Black Magic GDB Server\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\nSUBSYSTEM==\"tty\", ATTRS{interface}==\"Black Magic UART Port\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# opendous and estick\nATTRS{idVendor}==\"03eb\", ATTRS{idProduct}==\"204f\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Original FT232/FT245/FT2232/FT232H/FT4232\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"60[01][104]\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# DISTORTEC JTAG-lock-pick Tiny 2\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"8220\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# TUMPA, TUMPA Lite\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"8a9[89]\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# XDS100v2\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"a6d0\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Xverve Signalyzer Tool (DT-USB-ST), Signalyzer LITE (DT-USB-SLITE)\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"bca[01]\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# TI/Luminary Stellaris Evaluation Board FTDI (several)\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"bcd[9a]\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# egnite Turtelizer 2\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"bdc8\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Section5 ICEbear\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"c14[01]\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Amontec JTAGkey and JTAGkey-tiny\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"cff8\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# TI ICDI\nATTRS{idVendor}==\"0451\", ATTRS{idProduct}==\"c32a\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# STLink probes\nATTRS{idVendor}==\"0483\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Hilscher NXHX Boards\nATTRS{idVendor}==\"0640\", ATTRS{idProduct}==\"0028\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Hitex probes\nATTRS{idVendor}==\"0640\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Altera USB Blaster\nATTRS{idVendor}==\"09fb\", ATTRS{idProduct}==\"6001\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Amontec JTAGkey-HiSpeed\nATTRS{idVendor}==\"0fbb\", ATTRS{idProduct}==\"1000\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# SEGGER J-Link\nATTRS{idVendor}==\"1366\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Raisonance RLink\nATTRS{idVendor}==\"138e\", ATTRS{idProduct}==\"9000\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Debug Board for Neo1973\nATTRS{idVendor}==\"1457\", ATTRS{idProduct}==\"5118\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Olimex probes\nATTRS{idVendor}==\"15ba\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# USBprog with OpenOCD firmware\nATTRS{idVendor}==\"1781\", ATTRS{idProduct}==\"0c63\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# TI/Luminary Stellaris In-Circuit Debug Interface (ICDI) Board\nATTRS{idVendor}==\"1cbe\", ATTRS{idProduct}==\"00fd\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Marvell Sheevaplug\nATTRS{idVendor}==\"9e88\", ATTRS{idProduct}==\"9e8f\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Keil Software, Inc. ULink\nATTRS{idVendor}==\"c251\", ATTRS{idProduct}==\"2710\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# CMSIS-DAP compatible adapters\nATTRS{product}==\"*CMSIS-DAP*\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Atmel AVR Dragon\nATTRS{idVendor}==\"03eb\", ATTRS{idProduct}==\"2107\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Espressif USB JTAG/serial debug unit\nATTRS{idVendor}==\"303a\", ATTRS{idProduct}==\"1001\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\"\n\n# Zephyr framework USB CDC-ACM\nATTRS{idVendor}==\"2fe3\", ATTRS{idProduct}==\"0100\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_PORT_IGNORE}=\"1\""
  },
  {
    "path": ".devcontainer/Dockerfile",
    "content": "# trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue\n# trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions\n# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions\nFROM mcr.microsoft.com/devcontainers/cpp:2-debian-13\n\nUSER root\n\nRUN apt-get update && export DEBIAN_FRONTEND=noninteractive \\\n    && apt-get -y install --no-install-recommends \\\n    ca-certificates \\\n    g++ \\\n    git \\\n    libbluetooth-dev \\\n    libgpiod-dev \\\n    liborcania-dev \\\n    libssl-dev \\\n    libulfius-dev \\\n    libyaml-cpp-dev \\\n    pipx \\\n    pkg-config \\\n    python3 \\\n    python3-pip \\\n    python3-venv \\\n    python3-wheel \\\n    wget \\\n    zip \\\n    usbutils \\\n    hwdata \\\n    gpg \\\n    gnupg2 \\\n    libusb-1.0-0-dev \\\n    libuv1-dev \\\n    libi2c-dev \\\n    libxcb-xkb-dev \\\n    libxkbcommon-dev \\\n    libinput-dev \\\n    && apt-get clean && rm -rf /var/lib/apt/lists/*\n\nRUN pipx install platformio\n\nCOPY 99-platformio-udev.rules /etc/udev/rules.d/99-platformio-udev.rules\n\nUSER vscode\n\nHEALTHCHECK NONE"
  },
  {
    "path": ".devcontainer/devcontainer.json",
    "content": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the\n// README at: https://github.com/devcontainers/templates/tree/main/src/cpp\n{\n  \"name\": \"Meshtastic Firmware Dev\",\n  \"build\": {\n    \"dockerfile\": \"Dockerfile\"\n  },\n  \"features\": {\n    \"ghcr.io/devcontainers/features/python:1\": {\n      \"installTools\": true,\n      \"version\": \"3.14\"\n    }\n  },\n  \"customizations\": {\n    \"vscode\": {\n      \"extensions\": [\n        \"ms-vscode.cpptools\",\n        \"platformio.platformio-ide\",\n        \"Trunk.io\"\n      ],\n      \"unwantedRecommendations\": [\"ms-azuretools.vscode-docker\"],\n      \"settings\": {\n        \"extensions.ignoreRecommendations\": true\n      }\n    }\n  },\n\n  // Use 'forwardPorts' to make a list of ports inside the container available locally.\n  \"forwardPorts\": [4403],\n\n  // Use \"--device=\" to make a local device available inside the container.\n  // \"runArgs\": [\"--device=/dev/ttyACM0\"],\n\n  // Run commands to prepare the container for use\n  \"postCreateCommand\": \".devcontainer/setup.sh\"\n}\n"
  },
  {
    "path": ".devcontainer/setup.sh",
    "content": "#!/usr/bin/env sh\n\ngit submodule update --init\n\npip install --no-cache-dir setuptools\npipx install esptool\n"
  },
  {
    "path": ".envrc",
    "content": "use nix"
  },
  {
    "path": ".gitattributes",
    "content": "* text=auto eol=lf\n*.cmd text eol=crlf\n*.bat text eol=crlf\n*.ps1 text eol=crlf\n*.{sh,[sS][hH]} text eol=lf\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\nopen_collective: meshtastic\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Bug Report.yml",
    "content": "name: Bug Report\ndescription: File a bug report\ntitle: \"[Bug]: \"\nlabels: [bug, triage]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report!\n\n  - type: dropdown\n    id: category\n    attributes:\n      label: Category\n      description: How would you catagorize this issue?\n      multiple: true\n      options:\n        - Hardware Compatibility\n        - BLE\n        - Serial\n        - WiFi\n        - Other\n    validations:\n      required: true\n\n  - type: dropdown\n    id: hardware\n    attributes:\n      label: Hardware\n      description: What hardware are you encountering this issue on?\n      multiple: true\n      options:\n        - Not Applicable\n        - T-Beam\n        - T-Beam S3\n        - T-Beam 0.7\n        - T-Lora v1\n        - T-Lora v1.3\n        - T-Lora v2 1.6\n        - T-Deck\n        - T-Echo\n        - T-Watch\n        - Rak4631\n        - Rak11200\n        - Rak11310\n        - Heltec v1\n        - Heltec v2\n        - Heltec v2.1\n        - Heltec V3\n        - Heltec Wireless Paper\n        - Heltec Wireless Tracker\n        - Heltec Mesh Node T114\n        - Heltec Vision Master E213\n        - Heltec Vision Master E290\n        - Heltec Vision Master T190\n        - Nano G1\n        - Nano G1 Explorer\n        - Nano G2 Ultra\n        - Raspberry Pi Pico (W)\n        - Relay v1\n        - Relay v2\n        - Seeed Wio Tracker 1110\n        - Seeed Card Tracker T1000-E\n        - Station G1\n        - Station G2\n        - unPhone\n        - CanaryOne\n        - Chatter\n        - Linux Native\n        - DIY\n        - Other\n    validations:\n      required: true\n\n  - type: checkboxes\n    id: mui\n    attributes:\n      label: Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?\n      options:\n        - label: Meshtastic UI aka MUI colorTFT\n        - label: InkHUD ePaper\n        - label: OLED slide UI on any display\n\n  - type: input\n    id: version\n    attributes:\n      label: Firmware Version\n      description: This can be found on the device's screen or via one of the apps.\n      placeholder: x.x.x.yyyyyyy\n    validations:\n      required: true\n\n  - type: textarea\n    id: body\n    attributes:\n      label: Description\n      description: Please provide details on what steps you performed for this to happen.\n    validations:\n      required: true\n\n  - type: textarea\n    id: logs\n    attributes:\n      label: Relevant log output\n      description: If you have any log output to help in diagnosing your bug, please provide it here.\n      render: Shell\n    validations:\n      required: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/New Board.yml",
    "content": "name: New Board\ndescription: Request us to support new hardware\ntitle: \"[Board]: \"\nlabels: [enhancement, triage]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for requesting a new board, this will not gurantee that we will support it, but will be on our radar.\n\n  - type: dropdown\n    id: soc\n    attributes:\n      label: SOC\n      description: What SOC does your board have?\n      multiple: true\n      options:\n        - NRF52\n        - ESP32\n        - Other\n    validations:\n      required: true\n\n  - type: input\n    id: lora\n    attributes:\n      label: Lora IC\n      description: What LoRa IC does the board have?\n    validations:\n      required: true\n\n  - type: input\n    id: link\n    attributes:\n      label: Product Link\n      description: Where can we find this product?\n    validations:\n      required: true\n\n  - type: textarea\n    id: body\n    attributes:\n      label: Description\n      description: Please provide any further details you think we may need.\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature.yml",
    "content": "name: Feature Request\ndescription: Request a new feature\ntitle: \"[Feature Request]: \"\nlabels: [enhancement]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for your request this will not gurantee that we will implement it, but it will be reviewed.\n  - type: dropdown\n    id: soc\n    attributes:\n      label: Platform\n      description: What device platform will support your feature?\n      multiple: true\n      options:\n        - NRF52\n        - ESP32\n        - RP2040\n        - Linux Native\n        - Cross-Platform\n        - other\n    validations:\n      required: true\n  - type: textarea\n    id: body\n    attributes:\n      label: Description\n      description: Please provide details about your enhancement.\n    validations:\n      required: true\n"
  },
  {
    "path": ".github/actionlint.yaml",
    "content": "# Configuration related to self-hosted runner.\nself-hosted-runner:\n  # Labels of self-hosted runner in array of strings.\n  labels:\n    - arctastic\n    - test-runner\n"
  },
  {
    "path": ".github/actions/build-variant/action.yml",
    "content": "name: Setup Build Variant Composite Action\ndescription: Variant build actions for Meshtastic Platform IO steps\n\ninputs:\n  board:\n    description: The board to build for\n    required: true\n  github_token:\n    description: GitHub token\n    required: true\n  build-script-path:\n    description: Path to the build script\n    required: true\n  remove-debug-flags:\n    description: A space separated list of files to remove debug flags from\n    required: false\n    default: \"\"\n  ota-firmware-source:\n    description: The OTA firmware file to pull\n    required: false\n    default: \"\"\n  ota-firmware-target:\n    description: The target path to store the OTA firmware file\n    required: false\n    default: \"\"\n  artifact-paths:\n    description: A newline separated list of paths to store as artifacts\n    required: false\n    default: \"\"\n  # include-web-ui:\n  #   description: Include the web UI in the build\n  #   required: false\n  #   default: \"false\"\n  arch:\n    description: Processor arch name\n    required: true\n    default: esp32\n\nruns:\n  using: composite\n  steps:\n    - name: Build base\n      id: base\n      uses: ./.github/actions/setup-base\n\n    # - name: Get web ui version\n    #   if: inputs.include-web-ui == 'true'\n    #   id: webver\n    #   shell: bash\n    #   run: |\n    #     echo \"ver=$(cat bin/web.version)\" >> $GITHUB_OUTPUT\n\n    # - name: Pull web ui\n    #   if: inputs.include-web-ui == 'true'\n    #   uses: dsaltares/fetch-gh-release-asset@master\n    #   with:\n    #     repo: meshtastic/web\n    #     file: build.tar\n    #     target: build.tar\n    #     token: ${{ inputs.github_token }}\n    #     version: tags/v${{ steps.webver.outputs.ver }}\n\n    # - name: Unpack web ui\n    #   if: inputs.include-web-ui == 'true'\n    #   shell: bash\n    #   run: |\n    #     tar -xf build.tar -C data/static\n    #     rm build.tar\n\n    - name: Remove debug flags for release\n      shell: bash\n      if: inputs.remove-debug-flags != ''\n      run: |\n        for INI_FILE in ${{ inputs.remove-debug-flags }}; do\n          sed -i '/DDEBUG_HEAP/d' ${INI_FILE}\n        done\n\n    - name: PlatformIO ${{ inputs.arch }} download cache\n      uses: actions/cache@v5\n      with:\n        path: ~/.platformio/.cache\n        key: pio-cache-${{ inputs.arch }}-${{ hashFiles('.github/actions/**', '**.ini') }}\n\n    - name: Build ${{ inputs.board }}\n      shell: bash\n      run: ${{ inputs.build-script-path }} ${{ inputs.board }}\n\n    - name: Pull OTA Firmware\n      if: inputs.ota-firmware-source != '' &&  inputs.ota-firmware-target != ''\n      uses: dsaltares/fetch-gh-release-asset@master\n      with:\n        repo: meshtastic/firmware-ota\n        file: ${{ inputs.ota-firmware-source }}\n        target: ${{ inputs.ota-firmware-target }}\n        token: ${{ inputs.github_token }}\n\n    - name: Get release version string\n      shell: bash\n      run: echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n      id: version\n\n    - name: Store binaries as an artifact\n      uses: actions/upload-artifact@v7\n      with:\n        name: firmware-${{ inputs.arch }}-${{ inputs.board }}-${{ steps.version.outputs.long }}\n        overwrite: true\n        path: |\n          ${{ inputs.artifact-paths }}\n"
  },
  {
    "path": ".github/actions/setup-base/action.yml",
    "content": "name: Setup Build Base Composite Action\ndescription: Base build actions for Meshtastic Platform IO steps\n\nruns:\n  using: composite\n  steps:\n    - name: Checkout code\n      uses: actions/checkout@v6\n      with:\n        submodules: recursive\n        ref: ${{github.event.pull_request.head.ref}}\n        repository: ${{github.event.pull_request.head.repo.full_name}}\n\n    - name: Install dependencies\n      shell: bash\n      run: |\n        sudo apt-get -y update --fix-missing\n        sudo apt-get install -y cppcheck libbluetooth-dev libgpiod-dev libyaml-cpp-dev lsb-release\n\n    - name: Setup Python\n      uses: actions/setup-python@v6\n      with:\n        python-version: 3.x\n        cache: pip\n        cache-dependency-path: |\n          .github/actions/**\n          **.ini\n\n    - name: Upgrade python tools\n      shell: bash\n      run: |\n        python -m pip install --upgrade pip\n        pip install -U --no-build-isolation --no-cache-dir \"setuptools<72\"\n        pip install -U platformio adafruit-nrfutil --no-build-isolation\n        pip install -U poetry --no-build-isolation\n        pip install -U meshtastic --pre --no-build-isolation\n\n    - name: Upgrade platformio\n      shell: bash\n      run: |\n        pio upgrade\n"
  },
  {
    "path": ".github/actions/setup-native/action.yml",
    "content": "name: Setup native build\ndescription: Install libraries needed for building the Native/Portduino build\n\nruns:\n  using: composite\n  steps:\n    - name: Setup base\n      id: base\n      uses: ./.github/actions/setup-base\n\n    - name: Install libs needed for native build\n      shell: bash\n      run: |\n        sudo apt-get install -y libbluetooth-dev libgpiod-dev libyaml-cpp-dev openssl libssl-dev libulfius-dev liborcania-dev libusb-1.0-0-dev libi2c-dev libuv1-dev\n"
  },
  {
    "path": ".github/copilot-instructions.md",
    "content": "# Meshtastic Firmware - Copilot Instructions\n\nThis document provides context and guidelines for AI assistants working with the Meshtastic firmware codebase.\n\n## Project Overview\n\nMeshtastic is an open-source LoRa mesh networking project for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware enables text messaging, location sharing, and telemetry over a decentralized mesh network.\n\n### Supported Hardware Platforms\n\n- **ESP32** (ESP32, ESP32-S3, ESP32-C3) - Most common platform\n- **nRF52** (nRF52840, nRF52833) - Low power Nordic chips\n- **RP2040/RP2350** - Raspberry Pi Pico variants\n- **STM32WL** - STM32 with integrated LoRa\n- **Linux/Portduino** - Native Linux builds (Raspberry Pi, etc.)\n\n### Supported Radio Chips\n\n- **SX1262/SX1268** - Sub-GHz LoRa (868/915 MHz regions)\n- **SX1280** - 2.4 GHz LoRa\n- **LR1110/LR1120/LR1121** - Wideband radios (sub-GHz and 2.4 GHz capable, but not simultaneously)\n- **RF95** - Legacy RFM95 modules\n- **LLCC68** - Low-cost LoRa\n\n### MQTT Integration\n\nMQTT provides a bridge between Meshtastic mesh networks and the internet, enabling nodes with network connectivity to share messages with remote meshes or external services.\n\n#### Key Components\n\n- **`src/mqtt/MQTT.cpp`** - Main MQTT client singleton, handles connection and message routing\n- **`src/mqtt/ServiceEnvelope.cpp`** - Protobuf wrapper for mesh packets sent over MQTT\n- **`moduleConfig.mqtt`** - MQTT module configuration\n\n#### MQTT Topic Structure\n\nMessages are published/subscribed using a hierarchical topic format:\n\n```\n{root}/{channel_id}/{gateway_id}\n```\n\n- `root` - Configurable prefix (default: `msh`)\n- `channel_id` - Channel name/identifier\n- `gateway_id` - Node ID of the publishing gateway\n\n#### Configuration Defaults (from `Default.h`)\n\n```cpp\n#define default_mqtt_address \"mqtt.meshtastic.org\"\n#define default_mqtt_username \"meshdev\"\n#define default_mqtt_password \"large4cats\"\n#define default_mqtt_root \"msh\"\n#define default_mqtt_encryption_enabled true\n#define default_mqtt_tls_enabled false\n```\n\n#### Key Concepts\n\n- **Uplink** - Mesh packets sent TO the MQTT broker (controlled by `uplink_enabled` per channel)\n- **Downlink** - MQTT messages received and injected INTO the mesh (controlled by `downlink_enabled` per channel)\n- **Encryption** - When `encryption_enabled` is true, only encrypted packets are sent; plaintext JSON is disabled\n- **ServiceEnvelope** - Protobuf wrapper containing packet + channel_id + gateway_id for routing\n- **JSON Support** - Optional JSON encoding for integration with external systems (disabled on nRF52 by default)\n\n#### PKI Messages\n\nPKI (Public Key Infrastructure) messages have special handling:\n\n- Accepted on a special \"PKI\" channel\n- Allow encrypted DMs between nodes that discovered each other on downlink-enabled channels\n\n## Project Structure\n\n```\nfirmware/\n├── src/                    # Main source code\n│   ├── main.cpp           # Application entry point\n│   ├── mesh/              # Core mesh networking\n│   │   ├── NodeDB.*       # Node database management\n│   │   ├── Router.*       # Packet routing\n│   │   ├── Channels.*     # Channel management\n│   │   ├── *Interface.*   # Radio interface implementations\n│   │   └── generated/     # Protobuf generated code\n│   ├── modules/           # Feature modules (Position, Telemetry, etc.)\n│   ├── gps/               # GPS handling\n│   ├── graphics/          # Display drivers and UI\n│   ├── platform/          # Platform-specific code\n│   ├── input/             # Input device handling\n│   └── concurrency/       # Threading utilities\n├── variants/              # Hardware variant definitions\n│   ├── esp32/            # ESP32 variants\n│   ├── esp32s3/          # ESP32-S3 variants\n│   ├── nrf52/            # nRF52 variants\n│   └── rp2xxx/           # RP2040/RP2350 variants\n├── protobufs/            # Protocol buffer definitions\n├── boards/               # Custom PlatformIO board definitions\n└── bin/                  # Build and utility scripts\n```\n\n## Coding Conventions\n\n### General Style\n\n- Follow existing code style - run `trunk fmt` before commits\n- Prefer `LOG_DEBUG`, `LOG_INFO`, `LOG_WARN`, `LOG_ERROR` for logging\n- Use `assert()` for invariants that should never fail\n\n### Naming Conventions\n\n- Classes: `PascalCase` (e.g., `PositionModule`, `NodeDB`)\n- Functions/Methods: `camelCase` (e.g., `sendOurPosition`, `getNodeNum`)\n- Constants/Defines: `UPPER_SNAKE_CASE` (e.g., `MAX_INTERVAL`, `ONE_DAY`)\n- Member variables: `camelCase` (e.g., `lastGpsSend`, `nodeDB`)\n- Config defines: `USERPREFS_*` for user-configurable options\n\n### Key Patterns\n\n#### Module System\n\nModules inherit from `MeshModule` or `ProtobufModule<T>` and implement:\n\n- `handleReceivedProtobuf()` - Process incoming packets\n- `allocReply()` - Generate response packets\n- `runOnce()` - Periodic task execution (returns next run interval in ms)\n\n```cpp\nclass MyModule : public ProtobufModule<meshtastic_MyMessage>\n{\n  protected:\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_MyMessage *msg) override;\n    virtual int32_t runOnce() override;\n};\n```\n\n#### Configuration Access\n\n- `config.*` - Device configuration (LoRa, position, power, etc.)\n- `moduleConfig.*` - Module-specific configuration\n- `channels.*` - Channel configuration and management\n\n#### Default Values\n\nUse the `Default` class helpers in `src/mesh/Default.h`:\n\n- `Default::getConfiguredOrDefaultMs(configured, default)` - Returns ms, using default if configured is 0\n- `Default::getConfiguredOrMinimumValue(configured, min)` - Enforces minimum values\n- `Default::getConfiguredOrDefaultMsScaled(configured, default, numNodes)` - Scales based on network size\n\n#### Thread Safety\n\n- Use `concurrency::Lock` for mutex protection\n- Radio SPI access uses `SPILock`\n- Prefer `OSThread` for background tasks\n\n### Hardware Variants\n\nEach hardware variant has:\n\n- `variant.h` - Pin definitions and hardware capabilities\n- `platformio.ini` - Build configuration\n- Optional: `pins_arduino.h`, `rfswitch.h`\n\nKey defines in variant.h:\n\n```cpp\n#define USE_SX1262          // Radio chip selection\n#define HAS_GPS 1           // Hardware capabilities\n#define LORA_CS 36          // Pin assignments\n#define SX126X_DIO1 14      // Radio-specific pins\n```\n\n### Protobuf Messages\n\n- Defined in `protobufs/meshtastic/*.proto`\n- Generated code in `src/mesh/generated/`\n- Regenerate with `bin/regen-protos.sh`\n- Message types prefixed with `meshtastic_`\n\n### Conditional Compilation\n\n```cpp\n#if !MESHTASTIC_EXCLUDE_GPS        // Feature exclusion\n#ifdef ARCH_ESP32                   // Architecture-specific\n#if defined(USE_SX1262)            // Radio-specific\n#ifdef HAS_SCREEN                   // Hardware capability\n#if USERPREFS_EVENT_MODE           // User preferences\n```\n\n## Build System\n\nUses **PlatformIO** with custom scripts:\n\n- `bin/platformio-pre.py` - Pre-build script\n- `bin/platformio-custom.py` - Custom build logic\n\nBuild commands:\n\n```bash\npio run -e tbeam              # Build specific target\npio run -e tbeam -t upload    # Build and upload\npio run -e native             # Build native/Linux version\n```\n\n## Common Tasks\n\n### Adding a New Module\n\n1. Create `src/modules/MyModule.cpp` and `.h`\n2. Inherit from appropriate base class\n3. Register in `src/modules/Modules.cpp`\n4. Add protobuf messages if needed in `protobufs/`\n\n### Adding a New Hardware Variant\n\n1. Create directory under `variants/<arch>/<name>/`\n2. Add `variant.h` with pin definitions\n3. Add `platformio.ini` with build config\n4. Reference common configs with `extends`\n\n### Modifying Configuration Defaults\n\n- Check `src/mesh/Default.h` for default value defines\n- Check `src/mesh/NodeDB.cpp` for initialization logic\n- Consider `isDefaultChannel()` checks for public channel restrictions\n\n## Important Considerations\n\n### Traffic Management\n\nThe mesh network has limited bandwidth. When modifying broadcast intervals:\n\n- Respect minimum intervals on default/public channels\n- Use `Default::getConfiguredOrMinimumValue()` to enforce minimums\n- Consider `numOnlineNodes` scaling for congestion control\n\n### Power Management\n\nMany devices are battery-powered:\n\n- Use `IF_ROUTER(routerVal, normalVal)` for role-based defaults\n- Check `config.power.is_power_saving` for power-saving modes\n- Implement proper `sleep()` methods in radio interfaces\n\n### Channel Security\n\n- `channels.isDefaultChannel(index)` - Check if using default/public settings\n- Default channels get stricter rate limits to prevent abuse\n- Private channels may have relaxed limits\n\n## GitHub Actions CI/CD\n\nThe project uses GitHub Actions extensively for CI/CD. Key workflows are in `.github/workflows/`:\n\n### Core CI Workflows\n\n- **`main_matrix.yml`** - Main CI pipeline, runs on push to `master`/`develop` and PRs\n  - Uses `bin/generate_ci_matrix.py` to dynamically generate build targets\n  - Builds all supported hardware variants\n  - PRs build a subset (`--level pr`) for faster feedback\n\n- **`trunk_check.yml`** - Code quality checks on PRs\n  - Runs Trunk.io for linting and formatting\n  - Must pass before merge\n\n- **`tests.yml`** - End-to-end and hardware tests\n  - Runs daily on schedule\n  - Includes native tests and hardware-in-the-loop testing\n\n- **`test_native.yml`** - Native platform unit tests\n  - Runs `pio test -e native`\n\n### Release Workflows\n\n- **`release_channels.yml`** - Triggered on GitHub release publish\n  - Builds Docker images\n  - Packages for PPA (Ubuntu), OBS (openSUSE), and COPR (Fedora)\n  - Handles Alpha/Beta/Stable release channels\n\n- **`nightly.yml`** - Nightly builds from develop branch\n\n- **`docker_build.yml`** / **`docker_manifest.yml`** - Docker image builds\n\n### Build Matrix Generation\n\nThe CI uses `bin/generate_ci_matrix.py` to dynamically select which targets to build:\n\n```bash\n# Generate full build matrix\n./bin/generate_ci_matrix.py all\n\n# Generate PR-level matrix (subset for faster builds)\n./bin/generate_ci_matrix.py all --level pr\n```\n\nVariants can specify their support level in `platformio.ini`:\n\n- `custom_meshtastic_support_level = 1` - Actively supported, built on every PR\n- `custom_meshtastic_support_level = 2` - Supported, built on merge to main branches\n- `board_level = extra` - Extra builds, only on full releases\n\n### Running Workflows Locally\n\nMost workflows can be triggered manually via `workflow_dispatch` for testing.\n\n## Testing\n\n- Unit tests in `test/` directory\n- Run with `pio test -e native`\n- Use `bin/test-simulator.sh` for simulation testing\n\n## Resources\n\n- [Documentation](https://meshtastic.org/docs/)\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "## 🙏 Thank you for sending in a pull request, here's some tips to get started!\n\n### ❌ (Please delete all these tips and replace them with your text) ❌\n\n- Before starting on some new big chunk of code, it it is optional but highly recommended to open an issue first\n  to say \"Hey, I think this idea X should be implemented and I'm starting work on it. My general plan is Y, any feedback\n  is appreciated.\" This will allow other devs to potentially save you time by not accidentally duplicating work etc...\n- Please do not check in files that don't have real changes\n- Please do not reformat lines that you didn't have to change the code on\n- We recommend using the [Visual Studio Code](https://platformio.org/install/ide?install=vscode) editor along with the ['Trunk Check' extension](https://marketplace.visualstudio.com/items?itemName=trunk.io) (In beta for windows, WSL2 for the Linux version),\n  because it automatically follows our indentation rules and its auto reformatting will not cause spurious changes to lines.\n- If your PR fixes a bug, mention \"fixes #bugnum\" somewhere in your pull request description.\n- If your other co-developers have comments on your PR please tweak as needed.\n- Please also enable \"Allow edits by maintainers\".\n- Please do not submit untested code.\n- If you do not have the affected hardware to test your code changes adequately against regressions, please indicate this, so that contributors and community members can help test your changes.\n- If your PR gets accepted you can request a \"Contributor\" role in the Meshtastic Discord\n\n## 🤝 Attestations\n\n- [ ] I have tested that my proposed changes behave as described.\n- [ ] I have tested that my proposed changes do not cause any obvious regressions on the following devices:\n  - [ ] Heltec (Lora32) V3\n  - [ ] LilyGo T-Deck\n  - [ ] LilyGo T-Beam\n  - [ ] RAK WisBlock 4631\n  - [ ] Seeed Studio T-1000E tracker card\n  - [ ] Other (please specify below)\n"
  },
  {
    "path": ".github/workflows/build_debian_src.yml",
    "content": "name: Build Debian Source Package\n\non:\n  workflow_call:\n    secrets:\n      PPA_GPG_PRIVATE_KEY:\n        required: false\n    inputs:\n      series:\n        description: Ubuntu/Debian series to target\n        required: true\n        type: string\n      build_location:\n        description: Location where build will execute\n        required: true\n        type: string\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  build-debian-src:\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          path: meshtasticd\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Install deps\n        shell: bash\n        working-directory: meshtasticd\n        run: |\n          sudo apt-get update -y --fix-missing\n          sudo apt-get install -y software-properties-common build-essential devscripts equivs\n          sudo add-apt-repository ppa:meshtastic/build-tools -y\n          sudo apt-get update -y --fix-missing\n          sudo mk-build-deps --install --remove --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control\n\n      - name: Import GPG key\n        uses: crazy-max/ghaction-import-gpg@v7\n        with:\n          gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}\n        id: gpg\n\n      - name: Get release version string\n        working-directory: meshtasticd\n        run: |\n          echo \"deb=$(./bin/buildinfo.py deb)\" >> $GITHUB_OUTPUT\n        env:\n          BUILD_LOCATION: ${{ inputs.build_location }}\n        id: version\n\n      - name: Fetch libdeps, package debian source\n        working-directory: meshtasticd\n        run: debian/ci_pack_sdeb.sh\n        env:\n          SERIES: ${{ inputs.series }}\n          GPG_KEY_ID: ${{ steps.gpg.outputs.keyid }}\n          PKG_VERSION: ${{ steps.version.outputs.deb }}\n\n      - name: Store binaries as an artifact\n        uses: actions/upload-artifact@v7\n        with:\n          name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src\n          overwrite: true\n          path: |\n            meshtasticd_${{ steps.version.outputs.deb }}*\n"
  },
  {
    "path": ".github/workflows/build_firmware.yml",
    "content": "name: Build\n\non:\n  workflow_call:\n    inputs:\n      version:\n        required: true\n        type: string\n      platform:\n        required: true\n        type: string\n      pio_env:\n        required: true\n        type: string\n\npermissions: read-all\n\njobs:\n  pio-build:\n    name: build-${{ inputs.platform }}\n    # Use 'arctastic' self-hosted runner pool when building in the main repo\n    runs-on: ${{ github.repository_owner == 'meshtastic' && 'arctastic' || 'ubuntu-latest' }}\n    outputs:\n      artifact-id: ${{ steps.upload-firmware.outputs.artifact-id }}\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Build ${{ inputs.platform }}\n        id: build\n        uses: meshtastic/gh-action-firmware@main\n        with:\n          pio_platform: ${{ inputs.platform }}\n          pio_env: ${{ inputs.pio_env }}\n          pio_target: build\n\n      - name: ESP32 - Download Unified OTA firmware\n        # Currently only esp32 and esp32s3 use the unified ota\n        if: inputs.platform == 'esp32' || inputs.platform == 'esp32s3'\n        id: dl-ota-unified\n        env:\n          PIO_PLATFORM: ${{ inputs.platform }}\n          PIO_ENV: ${{ inputs.pio_env }}\n          OTA_URL: https://github.com/meshtastic/esp32-unified-ota/releases/latest/download/mt-${{ inputs.platform }}-ota.bin\n        working-directory: release\n        run: |\n          curl -L -o \"mt-$PIO_PLATFORM-ota.bin\" $OTA_URL\n\n      - name: ESP32-C* - Download BLE-Only OTA firmware\n        if: inputs.platform == 'esp32c3' || inputs.platform == 'esp32c6'\n        id: dl-ota-ble\n        env:\n          PIO_ENV: ${{ inputs.pio_env }}\n          OTA_URL: https://github.com/meshtastic/firmware-ota/releases/latest/download/firmware-c3.bin\n        working-directory: release\n        run: |\n          curl -L -o bleota-c3.bin $OTA_URL\n\n      - name: Update manifest with OTA file\n        if: inputs.platform == 'esp32' || inputs.platform == 'esp32s3' || inputs.platform == 'esp32c3' || inputs.platform == 'esp32c6'\n        working-directory: release\n        env:\n          PIO_PLATFORM: ${{ inputs.platform }}\n        run: |\n          # Determine OTA filename based on platform\n          if [[ \"$PIO_PLATFORM\" == \"esp32\" || \"$PIO_PLATFORM\" == \"esp32s3\" ]]; then\n            OTA_FILE=\"mt-${PIO_PLATFORM}-ota.bin\"\n          else\n            OTA_FILE=\"bleota-c3.bin\"\n          fi\n\n          # Check if OTA file exists\n          if [[ ! -f \"$OTA_FILE\" ]]; then\n            echo \"OTA file $OTA_FILE not found, skipping manifest update\"\n            exit 0\n          fi\n\n          # Calculate MD5 and size\n          if command -v md5sum &> /dev/null; then\n            OTA_MD5=$(md5sum \"$OTA_FILE\" | cut -d' ' -f1)\n          else\n            OTA_MD5=$(md5 -q \"$OTA_FILE\")\n          fi\n          OTA_SIZE=$(stat -f%z \"$OTA_FILE\" 2>/dev/null || stat -c%s \"$OTA_FILE\")\n\n          # Find and update manifest file\n          for manifest in firmware-*.mt.json; do\n            if [[ -f \"$manifest\" ]]; then\n              echo \"Updating $manifest with $OTA_FILE (md5: $OTA_MD5, size: $OTA_SIZE)\"\n              # Add OTA entry to files array if not already present\n              jq --arg name \"$OTA_FILE\" --arg md5 \"$OTA_MD5\" --argjson bytes \"$OTA_SIZE\" --arg part \"app1\" \\\n                'if .files | map(select(.name == $name)) | length == 0 then .files += [{\"name\": $name, \"md5\": $md5, \"bytes\": $bytes, \"part_name\": $part}] else . end' \\\n                \"$manifest\" > \"${manifest}.tmp\" && mv \"${manifest}.tmp\" \"$manifest\"\n            fi\n          done\n\n      - name: Job summary\n        env:\n          PIO_ENV: ${{ inputs.pio_env }}\n        run: |\n          echo \"## $PIO_ENV\" >> $GITHUB_STEP_SUMMARY\n          echo \"<details><summary><strong>Manifest</strong></summary>\" >> $GITHUB_STEP_SUMMARY\n          echo '' >> $GITHUB_STEP_SUMMARY\n          echo '```json' >> $GITHUB_STEP_SUMMARY\n          cat release/firmware-*.mt.json >> $GITHUB_STEP_SUMMARY\n          echo '' >> $GITHUB_STEP_SUMMARY\n          echo '```' >> $GITHUB_STEP_SUMMARY\n          echo \"</details>\" >> $GITHUB_STEP_SUMMARY\n\n      - name: Store binaries as an artifact\n        uses: actions/upload-artifact@v7\n        id: upload-firmware\n        with:\n          name: firmware-${{ inputs.platform }}-${{ inputs.pio_env }}-${{ inputs.version }}\n          overwrite: true\n          path: |\n            release/*.mt.json\n            release/*.bin\n            release/*.elf\n            release/*.uf2\n            release/*.hex\n            release/*.zip\n            release/device-*.sh\n            release/device-*.bat\n\n      - name: Store manifests as an artifact\n        uses: actions/upload-artifact@v7\n        id: upload-manifest\n        with:\n          name: manifest-${{ inputs.platform }}-${{ inputs.pio_env }}-${{ inputs.version }}\n          overwrite: true\n          path: |\n            release/*.mt.json\n"
  },
  {
    "path": ".github/workflows/build_one_target.yml",
    "content": "name: Build One Target\n\non:\n  workflow_dispatch:\n    inputs:\n      # trunk-ignore(checkov/CKV_GHA_7)\n      arch:\n        type: choice\n        options:\n          - esp32\n          - esp32s3\n          - esp32c3\n          - esp32c6\n          - nrf52840\n          - rp2040\n          - rp2350\n          - stm32\n      target:\n        type: string\n        required: false\n        description: Choose the target board, e.g. nrf52_promicro_diy_tcxo. If blank, will find available targets.\n      # find-target:\n      #   type: boolean\n      #   default: true\n      #   description: 'Find the available targets'\n\npermissions: read-all\n\njobs:\n  find-targets:\n    if: ${{ inputs.target == '' }}\n    strategy:\n      fail-fast: false\n      matrix:\n        arch:\n          - esp32\n          - esp32s3\n          - esp32c3\n          - esp32c6\n          - nrf52840\n          - rp2040\n          - rp2350\n          - stm32\n    runs-on: ubuntu-24.04\n    steps:\n      - uses: actions/checkout@v6\n      - uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n          cache: pip\n      - run: pip install -U platformio\n      - name: Generate matrix\n        id: jsonStep\n        run: |\n          TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} --level extra)\n          echo \"Name: $GITHUB_REF_NAME\" >> $GITHUB_STEP_SUMMARY\n          echo \"Base: $GITHUB_BASE_REF\" >> $GITHUB_STEP_SUMMARY\n          echo \"Arch: ${{matrix.arch}}\" >> $GITHUB_STEP_SUMMARY\n          echo \"Ref: $GITHUB_REF\" >> $GITHUB_STEP_SUMMARY\n          echo \"Targets:\" >> $GITHUB_STEP_SUMMARY\n          echo $TARGETS | jq -r 'sort_by(.board) |.[] | \"- \" + .board' >> $GITHUB_STEP_SUMMARY\n\n  version:\n    if: ${{ inputs.target != '' }}\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n      - name: Get release version string\n        run: |\n          echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n          echo \"deb=$(./bin/buildinfo.py deb)\" >> $GITHUB_OUTPUT\n        id: version\n        env:\n          BUILD_LOCATION: local\n    outputs:\n      long: ${{ steps.version.outputs.long }}\n      deb: ${{ steps.version.outputs.deb }}\n\n  build:\n    if: ${{ inputs.target != '' && inputs.arch != 'native' }}\n    needs: [version]\n    uses: ./.github/workflows/build_firmware.yml\n    with:\n      version: ${{ needs.version.outputs.long }}\n      pio_env: ${{ inputs.target }}\n      platform: ${{ inputs.arch }}\n\n  gather-artifacts:\n    permissions:\n      contents: write\n      pull-requests: write\n    runs-on: ubuntu-latest\n    needs: [version, build]\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - uses: actions/download-artifact@v8\n        with:\n          path: ./\n          pattern: firmware-*-*\n          merge-multiple: true\n\n      - name: Display structure of downloaded files\n        run: ls -R\n\n      - name: Move files up\n        run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat\n\n      - name: Repackage in single firmware zip\n        uses: actions/upload-artifact@v7\n        with:\n          name: firmware-${{inputs.target}}-${{ needs.version.outputs.long }}\n          overwrite: true\n          path: |\n            ./firmware-*.bin\n            ./firmware-*.uf2\n            ./firmware-*.hex\n            ./firmware-*.zip\n            ./device-*.sh\n            ./device-*.bat\n            ./littlefs-*.bin\n            ./bleota*bin\n            ./Meshtastic_nRF52_factory_erase*.uf2\n          retention-days: 30\n\n      - uses: actions/download-artifact@v8\n        with:\n          pattern: firmware-*-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./output\n\n      # For diagnostics\n      - name: Show artifacts\n        run: ls -lR\n\n      - name: Device scripts permissions\n        run: |\n          chmod +x ./output/device-install.sh || true\n          chmod +x ./output/device-update.sh || true\n\n      - name: Zip firmware\n        run: zip -j -9 -r ./firmware-${{inputs.target}}-${{ needs.version.outputs.long }}.zip ./output\n\n      - name: Repackage in single elfs zip\n        uses: actions/upload-artifact@v7\n        with:\n          name: debug-elfs-${{inputs.target}}-${{ needs.version.outputs.long }}.zip\n          overwrite: true\n          path: ./*.elf\n          retention-days: 30\n\n      - uses: scruplelesswizard/comment-artifact@main\n        if: ${{ github.event_name == 'pull_request' }}\n        with:\n          name: firmware-${{inputs.target}}-${{ needs.version.outputs.long }}\n          description: \"Download firmware-${{inputs.target}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation\"\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/daily_packaging.yml",
    "content": "name: Daily Packaging\non:\n  schedule:\n    - cron: 0 2 * * *\n  workflow_dispatch:\n  push:\n    branches:\n      - master\n    paths:\n      - debian/**\n      - \"*.rpkg\"\n      - .github/workflows/nightly_packaging.yml\n      - .github/workflows/build_debian_src.yml\n      - .github/workflows/package_ppa.yml\n      - .github/workflows/package_obs.yml\n      - .github/workflows/hook_copr.yml\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  docker-multiarch:\n    if: github.repository == 'meshtastic/firmware'\n    uses: ./.github/workflows/docker_manifest.yml\n    with:\n      release_channel: daily\n    secrets: inherit\n\n  package-ppa:\n    if: github.repository == 'meshtastic/firmware'\n    strategy:\n      fail-fast: false\n      matrix:\n        series:\n          - jammy # 22.04 LTS\n          - noble # 24.04 LTS\n          - questing # 25.10\n          - resolute # 26.04 LTS\n    uses: ./.github/workflows/package_ppa.yml\n    with:\n      ppa_repo: ppa:meshtastic/daily\n      series: ${{ matrix.series }}\n    secrets: inherit\n\n  package-obs:\n    if: github.repository == 'meshtastic/firmware'\n    uses: ./.github/workflows/package_obs.yml\n    with:\n      obs_project: network:Meshtastic:daily\n      series: unstable\n    secrets: inherit\n\n  hook-copr:\n    if: github.repository == 'meshtastic/firmware'\n    uses: ./.github/workflows/hook_copr.yml\n    with:\n      copr_project: daily\n    secrets: inherit\n"
  },
  {
    "path": ".github/workflows/docker_build.yml",
    "content": "name: Build Docker\n\n# Build Docker image, push untagged (digest-only)\n\non:\n  workflow_call:\n    secrets:\n      DOCKER_FIRMWARE_TOKEN:\n        required: false # Only required for push\n    inputs:\n      distro:\n        description: Distro to target\n        required: true\n        type: string\n        # choices: [debian, alpine]\n      platform:\n        description: Platform to target\n        required: true\n        type: string\n      runs-on:\n        description: Runner to use\n        required: true\n        type: string\n      push:\n        description: Push images to registry\n        required: false\n        type: boolean\n        default: false\n      pio_env:\n        description: PlatformIO environment to build\n        required: false\n        type: string\n        default: native\n    outputs:\n      digest:\n        description: Digest of built image\n        value: ${{ jobs.docker-build.outputs.digest }}\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  docker-build:\n    outputs:\n      digest: ${{ steps.docker_variant.outputs.digest }}\n    runs-on: ${{ inputs.runs-on }}\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Get release version string\n        run: |\n          echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n        id: version\n\n      - name: Docker login\n        if: ${{ inputs.push }}\n        uses: docker/login-action@v4\n        with:\n          username: meshtastic\n          password: ${{ secrets.DOCKER_FIRMWARE_TOKEN }}\n\n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v4\n\n      - name: Docker setup\n        uses: docker/setup-buildx-action@v4\n\n      - name: Sanitize platform string\n        id: sanitize_platform\n        # Replace slashes with underscores\n        run: echo \"cleaned_platform=${{ inputs.platform }}\" | sed 's/\\//_/g' >> $GITHUB_OUTPUT\n\n      - name: Docker tag\n        id: meta\n        uses: docker/metadata-action@v6\n        with:\n          images: meshtastic/meshtasticd\n          tags: |\n            GHA-${{ steps.version.outputs.long }}-${{ inputs.distro }}-${{ steps.sanitize_platform.outputs.cleaned_platform }}\n          flavor: latest=false\n\n      - name: Docker build and push\n        uses: docker/build-push-action@v7\n        id: docker_variant\n        with:\n          context: .\n          file: |\n            ${{ contains(inputs.distro, 'debian') && './Dockerfile' || contains(inputs.distro, 'alpine') && './alpine.Dockerfile' }}\n          push: ${{ inputs.push }}\n          tags: ${{ steps.meta.outputs.tags }} # Tag is only meant to be consumed by the \"manifest\" job\n          platforms: ${{ inputs.platform }}\n          build-args: |\n            PIO_ENV=${{ inputs.pio_env }}\n"
  },
  {
    "path": ".github/workflows/docker_manifest.yml",
    "content": "name: Build Docker Multi-Arch Manifest\n\non:\n  workflow_call:\n    secrets:\n      DOCKER_FIRMWARE_TOKEN:\n        required: true\n    inputs:\n      release_channel:\n        description: Release channel to target\n        required: true\n        type: string\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  docker-debian-amd64:\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: debian\n      platform: linux/amd64\n      runs-on: ubuntu-24.04\n      push: true\n    secrets: inherit\n\n  docker-debian-arm64:\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: debian\n      platform: linux/arm64\n      runs-on: ubuntu-24.04-arm\n      push: true\n    secrets: inherit\n\n  docker-debian-armv7:\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: debian\n      platform: linux/arm/v7\n      runs-on: ubuntu-24.04-arm\n      push: true\n    secrets: inherit\n\n  docker-alpine-amd64:\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: alpine\n      platform: linux/amd64\n      runs-on: ubuntu-24.04\n      push: true\n    secrets: inherit\n\n  docker-alpine-arm64:\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: alpine\n      platform: linux/arm64\n      runs-on: ubuntu-24.04-arm\n      push: true\n    secrets: inherit\n\n  docker-alpine-armv7:\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: alpine\n      platform: linux/arm/v7\n      runs-on: ubuntu-24.04-arm\n      push: true\n    secrets: inherit\n\n  docker-manifest:\n    needs:\n      # Debian\n      - docker-debian-amd64\n      - docker-debian-arm64\n      - docker-debian-armv7\n      # Alpine\n      - docker-alpine-amd64\n      - docker-alpine-arm64\n      - docker-alpine-armv7\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Get release version string\n        run: |\n          echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n          echo \"short=$(./bin/buildinfo.py short)\" >> $GITHUB_OUTPUT\n        id: version\n\n      - name: Enumerate tags\n        shell: python\n        run: |\n          import os\n\n          short = \"${{ steps.version.outputs.short }}\"\n          long = \"${{ steps.version.outputs.long }}\"\n          release_channel = \"${{ inputs.release_channel }}\"\n          tags = {\n            \"beta\": {\n              \"debian\": [\n                f\"{short}\", f\"{long}\", f\"{short}-beta\", f\"{long}-beta\", \"beta\", \"latest\",\n                f\"{short}-debian\", f\"{long}-debian\", f\"{short}-beta-debian\", f\"{long}-beta-debian\", \"beta-debian\"\n              ],\n              \"alpine\": [\n                f\"{short}-alpine\", f\"{long}-alpine\", f\"{short}-beta-alpine\", f\"{long}-beta-alpine\", \"beta-alpine\"\n              ]\n            },\n            \"alpha\": {\n              \"debian\": [\n                f\"{short}-alpha\", f\"{long}-alpha\", \"alpha\",\n                f\"{short}-alpha-debian\", f\"{long}-alpha-debian\", \"alpha-debian\"\n              ],\n              \"alpine\": [\n                f\"{short}-alpha-alpine\", f\"{long}-alpha-alpine\", \"alpha-alpine\"\n              ]\n            },\n            \"daily\": {\n              \"debian\": [\"daily\", \"daily-debian\"],\n              \"alpine\": [\"daily-alpine\"]\n            }\n          }\n\n          with open(os.environ[\"GITHUB_OUTPUT\"], \"a\") as fh:\n            fh.write(\"debian<<EOF\\n\")\n            fh.write(\"\\n\".join(tags[release_channel][\"debian\"]))\n            fh.write(\"\\nEOF\\n\")\n\n            fh.write(\"alpine<<EOF\\n\")\n            fh.write(\"\\n\".join(tags[release_channel][\"alpine\"]))\n            fh.write(\"\\nEOF\\n\")\n        id: tags\n\n      - name: Docker login\n        uses: docker/login-action@v4\n        with:\n          username: meshtastic\n          password: ${{ secrets.DOCKER_FIRMWARE_TOKEN }}\n\n      - name: Docker meta (Debian)\n        id: meta_debian\n        uses: docker/metadata-action@v6\n        with:\n          images: meshtastic/meshtasticd\n          tags: |\n            ${{ steps.tags.outputs.debian }}\n          flavor: latest=false\n\n      - name: Create Docker manifest (Debian)\n        id: manifest_debian\n        uses: int128/docker-manifest-create-action@v2\n        with:\n          tags: |\n            ${{ steps.meta_debian.outputs.tags }}\n          push: true\n          sources: |\n            meshtastic/meshtasticd@${{ needs.docker-debian-amd64.outputs.digest }}\n            meshtastic/meshtasticd@${{ needs.docker-debian-arm64.outputs.digest }}\n            meshtastic/meshtasticd@${{ needs.docker-debian-armv7.outputs.digest }}\n\n      - name: Docker meta (Alpine)\n        id: meta_alpine\n        uses: docker/metadata-action@v6\n        with:\n          images: meshtastic/meshtasticd\n          tags: |\n            ${{ steps.tags.outputs.alpine }}\n\n      - name: Create Docker manifest (Alpine)\n        id: manifest_alpine\n        uses: int128/docker-manifest-create-action@v2\n        with:\n          tags: |\n            ${{ steps.meta_alpine.outputs.tags }}\n          push: true\n          sources: |\n            meshtastic/meshtasticd@${{ needs.docker-alpine-amd64.outputs.digest }}\n            meshtastic/meshtasticd@${{ needs.docker-alpine-arm64.outputs.digest }}\n            meshtastic/meshtasticd@${{ needs.docker-alpine-armv7.outputs.digest }}\n"
  },
  {
    "path": ".github/workflows/first_time_contributor.yml",
    "content": "name: Welcome First-Time Contributor\n\non:\n  issues:\n    types: opened\n  pull_request_target:\n    types: opened\n\npermissions: {}\n\njobs:\n  welcome:\n    runs-on: ubuntu-latest\n    permissions:\n      issues: write # Required to post comments and labels on issues\n      pull-requests: write # Required to post comments and labels on PRs\n    steps:\n      - uses: plbstl/first-contribution@v4\n        with:\n          labels: first-contribution\n          issue-opened-msg: |\n            ### @{fc-author}, Welcome to Meshtastic! :wave:\n\n            Thanks for opening your first issue. If it's helpful, an easy way\n            to get logs is the \"Open Serial Monitor\" button on the [Web Flasher](https://flasher.meshtastic.org).\n\n            If you have ideas for features, note that we often debate big ideas\n            in the [discussions tab](https://github.com/meshtastic/firmware/discussions/categories/ideas)\n            first. This tracker tends to be for ideas that have community\n            consensus and a clear implementation.\n\n            We're very active [on discord](https://discord.com/invite/meshtastic),\n            especially the \\#firmware and \\#alphanauts-testing channels. If you'll\n            be around for a while, we'd love to see you there!\n\n            Welcome to the community! :heart:\n\n          pr-opened-msg: |\n            ### @{fc-author}, Welcome to Meshtastic!\n\n            Thanks for opening your first pull request. We really appreciate it.\n\n            We discuss work as a team in discord, please join us in the [#firmware channel](https://discord.com/invite/meshtastic).\n            There's a big backlog of patches at the moment. If you have time,\n            please help us with some code review and testing of [other PRs](https://github.com/meshtastic/firmware/pulls)!\n\n            Welcome to the team :smile:\n"
  },
  {
    "path": ".github/workflows/hook_copr.yml",
    "content": "name: Trigger COPR build\n\non:\n  workflow_call:\n    secrets:\n      COPR_API_CONFIG:\n    inputs:\n      copr_project:\n        description: COPR project to target\n        required: true\n        type: string\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  build-copr-hook:\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          ref: ${{ github.ref }}\n          repository: ${{ github.repository }}\n\n      - name: Trigger COPR build\n        uses: vidplace7/copr-build@main\n        id: copr_build\n        env:\n          COPR_API_TOKEN_CONFIG: ${{ secrets.COPR_API_CONFIG }}\n        with:\n          owner: \"@meshtastic\"\n          package-name: meshtasticd\n          project-name: ${{ inputs.copr_project }}\n          git-remote: \"${{ github.server_url }}/${{ github.repository }}.git\"\n          committish: ${{ github.sha }}\n"
  },
  {
    "path": ".github/workflows/main_matrix.yml",
    "content": "name: CI\nconcurrency:\n  group: ci-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: true\non:\n  # # Triggers the workflow on push but only for the main branches\n  push:\n    branches:\n      - master\n      - develop\n      - pioarduino # Remove when merged // use `feature/` in the future.\n      - event/*\n      - feature/*\n    paths-ignore:\n      - \"**.md\"\n      - version.properties\n\n  # Note: This is different from \"pull_request\". Need to specify ref when doing checkouts.\n  pull_request_target:\n    branches:\n      - master\n      - develop\n      - pioarduino # Remove when merged // use `feature/` in the future.\n      - event/*\n      - feature/*\n    paths-ignore:\n      - \"**.md\"\n      #- \"**.yml\"\n\n  workflow_dispatch:\n\njobs:\n  setup:\n    strategy:\n      fail-fast: true\n      matrix:\n        arch:\n          - all\n          - check\n    runs-on: ubuntu-24.04\n    steps:\n      - uses: actions/checkout@v6\n      - uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n          cache: pip\n      - run: pip install -U platformio\n      - name: Generate matrix\n        id: jsonStep\n        run: |\n          if [[ \"$GITHUB_HEAD_REF\" == \"\" ]]; then\n            TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})\n          else  \n            TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} --level pr)\n          fi\n          echo \"Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF\"\n          echo \"${{matrix.arch}}=$TARGETS\" >> $GITHUB_OUTPUT\n          echo \"$TARGETS\" >> $GITHUB_STEP_SUMMARY\n    outputs:\n      all: ${{ steps.jsonStep.outputs.all }}\n      check: ${{ steps.jsonStep.outputs.check }}\n\n  version:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n      - name: Get release version string\n        run: |\n          echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n          echo \"deb=$(./bin/buildinfo.py deb)\" >> $GITHUB_OUTPUT\n        id: version\n        env:\n          BUILD_LOCATION: local\n    outputs:\n      long: ${{ steps.version.outputs.long }}\n      deb: ${{ steps.version.outputs.deb }}\n\n  check:\n    needs: setup\n    strategy:\n      fail-fast: false\n      matrix:\n        check: ${{ fromJson(needs.setup.outputs.check) }}\n    # Use 'arctastic' self-hosted runner pool when checking in the main repo\n    runs-on: ${{ github.repository_owner == 'meshtastic' && 'arctastic' || 'ubuntu-latest' }}\n    if: ${{ github.event_name != 'workflow_dispatch' && github.repository == 'meshtastic/firmware' }}\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n      - name: Check ${{ matrix.check.board }}\n        uses: meshtastic/gh-action-firmware@main\n        with:\n          pio_platform: ${{ matrix.check.platform }}\n          pio_env: ${{ matrix.check.board }}\n          pio_target: check\n\n  build:\n    needs: [setup, version]\n    strategy:\n      fail-fast: false\n      matrix:\n        build: ${{ fromJson(needs.setup.outputs.all) }}\n    uses: ./.github/workflows/build_firmware.yml\n    with:\n      version: ${{ needs.version.outputs.long }}\n      pio_env: ${{ matrix.build.board }}\n      platform: ${{ matrix.build.platform }}\n\n  build-debian-src:\n    if: github.repository == 'meshtastic/firmware'\n    uses: ./.github/workflows/build_debian_src.yml\n    with:\n      series: UNRELEASED\n      build_location: local\n    secrets: inherit\n\n  package-pio-deps-native-tft:\n    if: ${{ github.repository == 'meshtastic/firmware' && github.event_name == 'workflow_dispatch' }}\n    uses: ./.github/workflows/package_pio_deps.yml\n    with:\n      pio_env: native-tft\n    secrets: inherit\n\n  test-native:\n    if: ${{ !contains(github.ref_name, 'event/') && github.repository == 'meshtastic/firmware' }}\n    uses: ./.github/workflows/test_native.yml\n\n  docker:\n    strategy:\n      fail-fast: false\n      matrix:\n        distro: [debian, alpine]\n        platform: [linux/amd64, linux/arm64, linux/arm/v7]\n        pio_env: [native, native-tft]\n        exclude:\n          - distro: alpine\n            platform: linux/arm/v7\n          - pio_env: native-tft\n            platform: linux/arm64\n          - pio_env: native-tft\n            platform: linux/arm/v7\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: ${{ matrix.distro }}\n      platform: ${{ matrix.platform }}\n      runs-on: ${{ contains(matrix.platform, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}\n      pio_env: ${{ matrix.pio_env }}\n      push: false\n\n  gather-artifacts:\n    # trunk-ignore(checkov/CKV2_GHA_1)\n    if: github.repository == 'meshtastic/firmware'\n    permissions:\n      contents: write\n      pull-requests: write\n    strategy:\n      fail-fast: false\n      matrix:\n        arch:\n          - esp32\n          - esp32s3\n          - esp32c3\n          - esp32c6\n          - nrf52840\n          - rp2040\n          - rp2350\n          - stm32\n    runs-on: ubuntu-latest\n    needs: [version, build]\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - uses: actions/download-artifact@v8\n        with:\n          path: ./\n          pattern: firmware-${{matrix.arch}}-*\n          merge-multiple: true\n\n      - name: Display structure of downloaded files\n        run: ls -R\n\n      - name: Repackage in single firmware zip\n        uses: actions/upload-artifact@v7\n        with:\n          name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          overwrite: true\n          path: |\n            ./firmware-*.mt.json\n            ./firmware-*.bin\n            ./firmware-*.uf2\n            ./firmware-*.hex\n            ./firmware-*.zip\n            ./device-*.sh\n            ./device-*.bat\n            ./littlefs-*.bin\n            ./bleota*bin\n            ./mt-*-ota.bin\n            ./Meshtastic_nRF52_factory_erase*.uf2\n          retention-days: 30\n\n      - uses: actions/download-artifact@v8\n        with:\n          name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./output\n\n      # For diagnostics\n      - name: Show artifacts\n        run: ls -lR\n\n      - name: Device scripts permissions\n        run: |\n          chmod +x ./output/device-install.sh || true\n          chmod +x ./output/device-update.sh || true\n\n      - name: Zip firmware\n        run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output\n\n      - name: Repackage in single elfs zip\n        uses: actions/upload-artifact@v7\n        with:\n          name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          overwrite: true\n          path: ./*.elf\n          retention-days: 30\n\n      - uses: scruplelesswizard/comment-artifact@main\n        if: ${{ github.event_name == 'pull_request' }}\n        with:\n          name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          description: \"Download firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation\"\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n\n  shame:\n    if: github.repository == 'meshtastic/firmware'\n    continue-on-error: true\n    runs-on: ubuntu-latest\n    needs: [build]\n    steps:\n      - uses: actions/checkout@v6\n        if: github.event_name == 'pull_request_target'\n        with:\n          filter: blob:none # means we download all the git history but none of the commit (except ones with checkout like the head)\n          fetch-depth: 0\n      - name: Download the current manifests\n        uses: actions/download-artifact@v8\n        with:\n          path: ./manifests-new/\n          pattern: manifest-*\n          merge-multiple: true\n      - name: Upload combined manifests for later commit and global stats crunching.\n        uses: actions/upload-artifact@v7\n        id: upload-manifest\n        with:\n          name: manifests-${{ github.sha }}\n          overwrite: true\n          path: manifests-new/*.mt.json\n      - name: Find the merge base\n        if: github.event_name == 'pull_request_target'\n        run: echo \"MERGE_BASE=$(git merge-base \"origin/$base\" \"$head\")\" >> $GITHUB_ENV\n        env:\n          base: ${{ github.base_ref }}\n          head: ${{ github.sha }}\n      # Currently broken (for-loop through EVERY artifact -- rate limiting)\n      # - name: Download the old manifests\n      #   if: github.event_name == 'pull_request_target'\n      #   run: gh run download -R \"$repo\" --name \"manifests-$merge_base\" --dir manifest-old/\n      #   env:\n      #     GH_TOKEN: ${{ github.token }}\n      #     merge_base: ${{ env.MERGE_BASE }}\n      #     repo: ${{ github.repository }}\n      # - name: Do scan and post comment\n      #   if: github.event_name == 'pull_request_target'\n      #   run: python3 bin/shame.py ${{ github.event.pull_request.number }} manifests-old/ manifests-new/\n\n  release-artifacts:\n    runs-on: ubuntu-latest\n    if: ${{ github.event_name == 'workflow_dispatch' && github.repository == 'meshtastic/firmware' }}\n    outputs:\n      upload_url: ${{ steps.create_release.outputs.upload_url }}\n    needs:\n      - setup\n      - version\n      - gather-artifacts\n      - build-debian-src\n      - package-pio-deps-native-tft\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n\n      - name: Generate release notes\n        id: release_notes\n        run: |\n          chmod +x ./bin/generate_release_notes.py\n          NOTES=$(./bin/generate_release_notes.py ${{ needs.version.outputs.long }})\n          echo \"notes<<EOF\" >> $GITHUB_OUTPUT\n          echo \"$NOTES\" >> $GITHUB_OUTPUT\n          echo \"EOF\" >> $GITHUB_OUTPUT\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Create release\n        uses: softprops/action-gh-release@v2\n        id: create_release\n        with:\n          draft: true\n          prerelease: true\n          name: Meshtastic Firmware ${{ needs.version.outputs.long }} Alpha\n          tag_name: v${{ needs.version.outputs.long }}\n          body: ${{ steps.release_notes.outputs.notes }}\n\n      - name: Download source deb\n        uses: actions/download-artifact@v8\n        with:\n          pattern: firmware-debian-${{ needs.version.outputs.deb }}~UNRELEASED-src\n          merge-multiple: true\n          path: ./output/debian-src\n\n      - name: Download `native-tft` pio deps\n        uses: actions/download-artifact@v8\n        with:\n          pattern: platformio-deps-native-tft-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./output/pio-deps-native-tft\n\n      - name: Zip Linux sources\n        working-directory: output\n        run: |\n          zip -j -9 -r ./meshtasticd-${{ needs.version.outputs.deb }}-src.zip ./debian-src\n          zip -9 -r ./platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip ./pio-deps-native-tft\n\n      # For diagnostics\n      - name: Display structure of downloaded files\n        run: ls -lR\n\n      - name: Generate Release manifest\n        run: |\n          jq -n --arg ver \"${{ needs.version.outputs.long }}\" --argjson targets ${{ toJson(needs.setup.outputs.all) }} '{\n            \"version\": $ver,\n            \"targets\": $targets\n          }' > firmware-${{ needs.version.outputs.long }}.json\n\n      - name: Save Release manifest artifact\n        uses: actions/upload-artifact@v7\n        with:\n          name: manifest-${{ needs.version.outputs.long }}\n          overwrite: true\n          path: firmware-${{ needs.version.outputs.long }}.json\n\n      - name: Add sources to GitHub Release\n        # Only run when targeting master branch with workflow_dispatch\n        if: ${{ github.ref_name == 'master' }}\n        run: |\n          gh release upload v${{ needs.version.outputs.long }} ./firmware-${{ needs.version.outputs.long }}.json\n          gh release upload v${{ needs.version.outputs.long }} ./output/meshtasticd-${{ needs.version.outputs.deb }}-src.zip\n          gh release upload v${{ needs.version.outputs.long }} ./output/platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  release-firmware:\n    strategy:\n      fail-fast: false\n      matrix:\n        arch:\n          - esp32\n          - esp32s3\n          - esp32c3\n          - esp32c6\n          - nrf52840\n          - rp2040\n          - rp2350\n          - stm32\n    runs-on: ubuntu-latest\n    if: ${{ github.event_name == 'workflow_dispatch' && github.repository == 'meshtastic/firmware'}}\n    needs: [release-artifacts, version]\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n\n      - uses: actions/download-artifact@v8\n        with:\n          pattern: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./output\n\n      - name: Display structure of downloaded files\n        run: ls -lR\n\n      - name: Device scripts permissions\n        run: |\n          chmod +x ./output/device-install.sh || true\n          chmod +x ./output/device-update.sh || true\n\n      - name: Zip firmware\n        run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output\n\n      - uses: actions/download-artifact@v8\n        with:\n          name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./elfs\n\n      - name: Zip debug elfs\n        run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./elfs\n\n      # For diagnostics\n      - name: Display structure of downloaded files\n        run: ls -lR\n\n      - name: Add bins and debug elfs to GitHub Release\n        # Only run when targeting master branch with workflow_dispatch\n        if: ${{ github.ref_name == 'master' }}\n        run: |\n          gh release upload v${{ needs.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip\n          gh release upload v${{ needs.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  publish-firmware:\n    runs-on: ubuntu-24.04\n    if: ${{ github.event_name == 'workflow_dispatch' }}\n    needs: [release-firmware, version]\n    env:\n      targets: |-\n        esp32,esp32s3,esp32c3,esp32c6,nrf52840,rp2040,rp2350,stm32\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n\n      - name: Get firmware artifacts\n        uses: actions/download-artifact@v8\n        with:\n          pattern: firmware-{${{ env.targets }}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./publish\n\n      - name: Get manifest artifact\n        uses: actions/download-artifact@v8\n        with:\n          pattern: manifest-${{ needs.version.outputs.long }}\n          path: ./publish\n\n      - name: Generate release notes\n        run: |\n          chmod +x ./bin/generate_release_notes.py\n          ./bin/generate_release_notes.py ${{ needs.version.outputs.long }} > ./publish/release_notes.md\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Publish firmware to meshtastic.github.io\n        uses: peaceiris/actions-gh-pages@v4\n        env:\n          # On event/* branches, use the event name as the destination prefix\n          DEST_PREFIX: ${{ contains(github.ref_name, 'event/') && format('{0}/', github.ref_name) || '' }}\n        with:\n          deploy_key: ${{ secrets.DIST_PAGES_DEPLOY_KEY }}\n          external_repository: meshtastic/meshtastic.github.io\n          publish_branch: master\n          publish_dir: ./publish\n          destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ needs.version.outputs.long }}\n          keep_files: true\n          user_name: github-actions[bot]\n          user_email: github-actions[bot]@users.noreply.github.com\n          commit_message: ${{ needs.version.outputs.long }}\n          enable_jekyll: true\n"
  },
  {
    "path": ".github/workflows/merge_queue.yml",
    "content": "name: Merge Queue\n# Not sure how concurrency works in merge_queue, removing for now.\n# concurrency:\n#   group: merge-queue-${{ github.head_ref || github.run_id }}\n#   cancel-in-progress: true\non:\n  # Merge group is a special trigger that is used to trigger the workflow when a merge group is created.\n  merge_group:\n\njobs:\n  setup:\n    strategy:\n      fail-fast: true\n      matrix:\n        arch:\n          - all\n          - check\n    runs-on: ubuntu-24.04\n    steps:\n      - uses: actions/checkout@v6\n      - uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n          cache: pip\n      - run: pip install -U platformio\n      - name: Generate matrix\n        id: jsonStep\n        run: |\n          if [[ \"$GITHUB_HEAD_REF\" == \"\" ]]; then\n            TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})\n          else  \n            TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} --level pr)\n          fi\n          echo \"Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF\"\n          echo \"${{matrix.arch}}=$TARGETS\" >> $GITHUB_OUTPUT\n    outputs:\n      all: ${{ steps.jsonStep.outputs.all }}\n      check: ${{ steps.jsonStep.outputs.check }}\n\n  version:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n      - name: Get release version string\n        run: |\n          echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n          echo \"deb=$(./bin/buildinfo.py deb)\" >> $GITHUB_OUTPUT\n        id: version\n        env:\n          BUILD_LOCATION: local\n    outputs:\n      long: ${{ steps.version.outputs.long }}\n      deb: ${{ steps.version.outputs.deb }}\n\n  check:\n    needs: setup\n    strategy:\n      fail-fast: true\n      matrix:\n        check: ${{ fromJson(needs.setup.outputs.check) }}\n\n    runs-on: ubuntu-latest\n    if: ${{ github.event_name != 'workflow_dispatch' }}\n    steps:\n      - uses: actions/checkout@v6\n      - name: Build base\n        id: base\n        uses: ./.github/actions/setup-base\n      - name: Check ${{ matrix.check.board }}\n        run: bin/check-all.sh ${{ matrix.check.board }}\n\n  build:\n    needs: [setup, version]\n    strategy:\n      matrix:\n        build: ${{ fromJson(needs.setup.outputs.all) }}\n    uses: ./.github/workflows/build_firmware.yml\n    with:\n      version: ${{ needs.version.outputs.long }}\n      pio_env: ${{ matrix.build.board }}\n      platform: ${{ matrix.build.platform }}\n\n  build-debian-src:\n    if: github.repository == 'meshtastic/firmware'\n    uses: ./.github/workflows/build_debian_src.yml\n    with:\n      series: UNRELEASED\n      build_location: local\n    secrets: inherit\n\n  package-pio-deps-native-tft:\n    if: ${{ github.event_name == 'workflow_dispatch' }}\n    uses: ./.github/workflows/package_pio_deps.yml\n    with:\n      pio_env: native-tft\n    secrets: inherit\n\n  test-native:\n    if: ${{ !contains(github.ref_name, 'event/') }}\n    uses: ./.github/workflows/test_native.yml\n\n  docker:\n    strategy:\n      fail-fast: false\n      matrix:\n        distro: [debian, alpine]\n        platform: [linux/amd64, linux/arm64, linux/arm/v7]\n        pio_env: [native, native-tft]\n        exclude:\n          - distro: alpine\n            platform: linux/arm/v7\n          - pio_env: native-tft\n            platform: linux/arm64\n          - pio_env: native-tft\n            platform: linux/arm/v7\n    uses: ./.github/workflows/docker_build.yml\n    with:\n      distro: ${{ matrix.distro }}\n      platform: ${{ matrix.platform }}\n      runs-on: ${{ contains(matrix.platform, 'arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}\n      pio_env: ${{ matrix.pio_env }}\n      push: false\n\n  gather-artifacts:\n    # trunk-ignore(checkov/CKV2_GHA_1)\n    permissions:\n      contents: write\n      pull-requests: write\n    strategy:\n      fail-fast: false\n      matrix:\n        arch:\n          - esp32\n          - esp32s3\n          - esp32c3\n          - esp32c6\n          - nrf52840\n          - rp2040\n          - rp2350\n          - stm32\n    runs-on: ubuntu-latest\n    needs: [version, build]\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - uses: actions/download-artifact@v8\n        with:\n          path: ./\n          pattern: firmware-${{matrix.arch}}-*\n          merge-multiple: true\n\n      - name: Display structure of downloaded files\n        run: ls -R\n\n      - name: Move files up\n        run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat\n\n      - name: Repackage in single firmware zip\n        uses: actions/upload-artifact@v7\n        with:\n          name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          overwrite: true\n          path: |\n            ./firmware-*.bin\n            ./firmware-*.uf2\n            ./firmware-*.hex\n            ./firmware-*.zip\n            ./device-*.sh\n            ./device-*.bat\n            ./littlefs-*.bin\n            ./bleota*bin\n            ./Meshtastic_nRF52_factory_erase*.uf2\n          retention-days: 30\n\n      - uses: actions/download-artifact@v8\n        with:\n          name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./output\n\n      # For diagnostics\n      - name: Show artifacts\n        run: ls -lR\n\n      - name: Device scripts permissions\n        run: |\n          chmod +x ./output/device-install.sh || true\n          chmod +x ./output/device-update.sh || true\n\n      - name: Zip firmware\n        run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output\n\n      - name: Repackage in single elfs zip\n        uses: actions/upload-artifact@v7\n        with:\n          name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          overwrite: true\n          path: ./*.elf\n          retention-days: 30\n\n      - uses: scruplelesswizard/comment-artifact@main\n        if: ${{ github.event_name == 'pull_request' }}\n        with:\n          name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          description: \"Download firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation\"\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n\n  release-artifacts:\n    runs-on: ubuntu-latest\n    if: ${{ github.event_name == 'workflow_dispatch' }}\n    outputs:\n      upload_url: ${{ steps.create_release.outputs.upload_url }}\n    needs:\n      - version\n      - gather-artifacts\n      - build-debian-src\n      - package-pio-deps-native-tft\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Create release\n        uses: softprops/action-gh-release@v2\n        id: create_release\n        with:\n          draft: true\n          prerelease: true\n          name: Meshtastic Firmware ${{ needs.version.outputs.long }} Alpha\n          tag_name: v${{ needs.version.outputs.long }}\n          body: |\n            Autogenerated by github action, developer should edit as required before publishing...\n\n      - name: Download source deb\n        uses: actions/download-artifact@v8\n        with:\n          pattern: firmware-debian-${{ needs.version.outputs.deb }}~UNRELEASED-src\n          merge-multiple: true\n          path: ./output/debian-src\n\n      - name: Download `native-tft` pio deps\n        uses: actions/download-artifact@v8\n        with:\n          pattern: platformio-deps-native-tft-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./output/pio-deps-native-tft\n\n      - name: Zip Linux sources\n        working-directory: output\n        run: |\n          zip -j -9 -r ./meshtasticd-${{ needs.version.outputs.deb }}-src.zip ./debian-src\n          zip -9 -r ./platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip ./pio-deps-native-tft\n\n      # For diagnostics\n      - name: Display structure of downloaded files\n        run: ls -lR\n\n      - name: Add Linux sources to GtiHub Release\n        # Only run when targeting master branch with workflow_dispatch\n        if: ${{ github.ref_name == 'master' }}\n        run: |\n          gh release upload v${{ needs.version.outputs.long }} ./output/meshtasticd-${{ needs.version.outputs.deb }}-src.zip\n          gh release upload v${{ needs.version.outputs.long }} ./output/platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  release-firmware:\n    strategy:\n      fail-fast: false\n      matrix:\n        arch:\n          - esp32\n          - esp32s3\n          - esp32c3\n          - esp32c6\n          - nrf52840\n          - rp2040\n          - rp2350\n          - stm32\n    runs-on: ubuntu-latest\n    if: ${{ github.event_name == 'workflow_dispatch' }}\n    needs: [release-artifacts, version]\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n\n      - uses: actions/download-artifact@v8\n        with:\n          pattern: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./output\n\n      - name: Display structure of downloaded files\n        run: ls -lR\n\n      - name: Device scripts permissions\n        run: |\n          chmod +x ./output/device-install.sh || true\n          chmod +x ./output/device-update.sh || true\n\n      - name: Zip firmware\n        run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output\n\n      - uses: actions/download-artifact@v8\n        with:\n          name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./elfs\n\n      - name: Zip debug elfs\n        run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./elfs\n\n      # For diagnostics\n      - name: Display structure of downloaded files\n        run: ls -lR\n\n      - name: Add bins and debug elfs to GitHub Release\n        # Only run when targeting master branch with workflow_dispatch\n        if: ${{ github.ref_name == 'master' }}\n        run: |\n          gh release upload v${{ needs.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip\n          gh release upload v${{ needs.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n  publish-firmware:\n    runs-on: ubuntu-24.04\n    if: ${{ github.event_name == 'workflow_dispatch' }}\n    needs: [release-firmware, version]\n    env:\n      targets: |-\n        esp32,esp32s3,esp32c3,esp32c6,nrf52840,rp2040,rp2350,stm32\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n\n      - uses: actions/download-artifact@v8\n        with:\n          pattern: firmware-{${{ env.targets }}}-${{ needs.version.outputs.long }}\n          merge-multiple: true\n          path: ./publish\n\n      - name: Publish firmware to meshtastic.github.io\n        uses: peaceiris/actions-gh-pages@v4\n        env:\n          # On event/* branches, use the event name as the destination prefix\n          DEST_PREFIX: ${{ contains(github.ref_name, 'event/') && format('{0}/', github.ref_name) || '' }}\n        with:\n          deploy_key: ${{ secrets.DIST_PAGES_DEPLOY_KEY }}\n          external_repository: meshtastic/meshtastic.github.io\n          publish_branch: master\n          publish_dir: ./publish\n          destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ needs.version.outputs.long }}\n          keep_files: true\n          user_name: github-actions[bot]\n          user_email: github-actions[bot]@users.noreply.github.com\n          commit_message: ${{ needs.version.outputs.long }}\n          enable_jekyll: true\n"
  },
  {
    "path": ".github/workflows/models_issue_triage.yml",
    "content": "name: Issue Triage (Models)\n\non:\n  issues:\n    types: [opened]\n\npermissions:\n  issues: write\n  models: read\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.issue.number }}\n  cancel-in-progress: true\n\njobs:\n  triage:\n    if: ${{ github.repository == 'meshtastic/firmware' && github.event.issue.user.type != 'Bot' }}\n    runs-on: ubuntu-latest\n    steps:\n      # ─────────────────────────────────────────────────────────────────────────\n      # Step 1: Quality check (spam/AI-slop detection) - runs first, exits early if spam\n      # ─────────────────────────────────────────────────────────────────────────\n      - name: Detect spam or low-quality content\n        uses: actions/ai-inference@v2\n        id: quality\n        continue-on-error: true\n        with:\n          max-tokens: 20\n          prompt: |\n            Is this GitHub issue spam, AI-generated slop, or low quality?\n\n            Title: ${{ github.event.issue.title }}\n            Body: ${{ github.event.issue.body }}\n\n            Respond with exactly one of: spam, ai-generated, needs-review, ok\n          system-prompt: You detect spam and low-quality contributions. Be conservative - only flag obvious spam or AI slop.\n          model: openai/gpt-4o-mini\n\n      - name: Apply quality label if needed\n        if: steps.quality.outputs.response != '' && steps.quality.outputs.response != 'ok'\n        uses: actions/github-script@v8\n        env:\n          QUALITY_LABEL: ${{ steps.quality.outputs.response }}\n        with:\n          script: |\n            const label = (process.env.QUALITY_LABEL || '').trim().toLowerCase();\n            const labelMeta = {\n              'spam': { color: 'd73a4a', description: 'Possible spam' },\n              'ai-generated': { color: 'fbca04', description: 'Possible AI-generated low-quality content' },\n              'needs-review': { color: 'f9d0c4', description: 'Needs human review' },\n            };\n            const meta = labelMeta[label];\n            if (!meta) return;\n\n            // Ensure label exists\n            try {\n              await github.rest.issues.getLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label });\n            } catch (e) {\n              if (e.status !== 404) throw e;\n              await github.rest.issues.createLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label, color: meta.color, description: meta.description });\n            }\n\n            // Apply label\n            await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.issue.number, labels: [label] });\n\n            // Set output to skip remaining steps\n            core.setOutput('is_spam', 'true');\n\n      # ─────────────────────────────────────────────────────────────────────────\n      # Step 2: Duplicate detection - only if not spam\n      # ─────────────────────────────────────────────────────────────────────────\n      - name: Detect duplicate issues\n        if: steps.quality.outputs.response == 'ok' || steps.quality.outputs.response == ''\n        uses: pelikhan/action-genai-issue-dedup@bdb3b5d9451c1090ffcdf123d7447a5e7c7a2528 # v0.0.19\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n\n      # ─────────────────────────────────────────────────────────────────────────\n      # Step 3: Completeness check + auto-labeling (combined into one AI call)\n      # ─────────────────────────────────────────────────────────────────────────\n      - name: Determine if completeness check should be skipped\n        if: steps.quality.outputs.response == 'ok' || steps.quality.outputs.response == ''\n        uses: actions/github-script@v8\n        id: check-skip\n        with:\n          script: |\n            const title = (context.payload.issue.title || '').toLowerCase();\n            const labels = (context.payload.issue.labels || []).map(label => label.name);\n            const hasFeatureRequest = title.includes('feature request');\n            const hasEnhancement = labels.includes('enhancement');\n            const shouldSkip = hasFeatureRequest && hasEnhancement;\n            core.setOutput('should_skip', shouldSkip ? 'true' : 'false');\n\n      - name: Analyze issue completeness and determine labels\n        if: (steps.quality.outputs.response == 'ok' || steps.quality.outputs.response == '') && steps.check-skip.outputs.should_skip != 'true'\n        uses: actions/ai-inference@v2\n        id: analysis\n        continue-on-error: true\n        with:\n          prompt: |\n            Analyze this GitHub issue for completeness and determine if it needs labels.\n\n            IMPORTANT: Distinguish between:\n            - Device/firmware bugs (crashes, reboots, lockups, radio/GPS/display/power issues) - these need device logs\n            - Build/release/packaging issues (missing files, CI failures, download problems) - these do NOT need device logs\n            - Documentation or website issues - these do NOT need device logs\n\n            If this is a device/firmware bug, request device logs and explain how to get them:\n\n            Web Flasher logs:\n            - Go to https://flasher.meshtastic.org\n            - Connect the device via USB and click Connect\n            - Open the device console/log output, reproduce the problem, then copy/download and attach/paste the logs\n\n            Meshtastic CLI logs:\n            - Run: meshtastic --port <serial-port> --noproto\n            - Reproduce the problem, then copy/paste the terminal output\n\n            Also request key context if missing: device model/variant, firmware version, region, steps to reproduce, expected vs actual.\n\n            Respond ONLY with valid JSON (no markdown, no code fences):\n            {\"complete\": true, \"comment\": \"\", \"label\": \"none\"}\n            OR\n            {\"complete\": false, \"comment\": \"Your helpful comment\", \"label\": \"needs-logs\"}\n\n            Use \"needs-logs\" ONLY if this is a device/firmware bug AND no logs are attached.\n            Use \"needs-info\" if basic info like firmware version or steps to reproduce are missing.\n            Use \"none\" if the issue is complete, is a feature request, or is a build/CI/packaging issue.\n\n            Title: ${{ github.event.issue.title }}\n            Body: ${{ github.event.issue.body }}\n          system-prompt: You are a helpful assistant that triages GitHub issues. Be conservative with labels. Only request device logs for actual device/firmware bugs, not for build/release/CI issues.\n          model: openai/gpt-4o-mini\n\n      - name: Process analysis result\n        if: (steps.quality.outputs.response == 'ok' || steps.quality.outputs.response == '') && steps.check-skip.outputs.should_skip != 'true' && steps.analysis.outputs.response != ''\n        uses: actions/github-script@v8\n        id: process\n        env:\n          AI_RESPONSE: ${{ steps.analysis.outputs.response }}\n        with:\n          script: |\n            let raw = (process.env.AI_RESPONSE || '').trim();\n\n            // Strip markdown code fences if present\n            raw = raw.replace(/^```(?:json)?\\s*/i, '').replace(/\\s*```$/i, '').trim();\n\n            let complete = true;\n            let comment = '';\n            let label = 'none';\n\n            try {\n              const parsed = JSON.parse(raw);\n              complete = !!parsed.complete;\n              comment = (parsed.comment ?? '').toString().trim();\n              label = (parsed.label ?? 'none').toString().trim().toLowerCase();\n            } catch {\n              // If JSON parse fails, log warning and don't comment (avoid posting raw JSON)\n              console.log('Failed to parse AI response as JSON:', raw);\n              complete = true;\n              comment = '';\n              label = 'none';\n            }\n\n            // Validate label\n            const allowedLabels = new Set(['needs-logs', 'needs-info', 'none']);\n            if (!allowedLabels.has(label)) label = 'none';\n\n            // Only comment if we have a valid parsed comment (not raw JSON)\n            const shouldComment = !complete && comment.length > 0 && !comment.startsWith('{');\n            core.setOutput('should_comment', shouldComment ? 'true' : 'false');\n            core.setOutput('comment_body', comment);\n            core.setOutput('label', label);\n\n      - name: Apply triage label\n        if: steps.process.outputs.label != '' && steps.process.outputs.label != 'none'\n        uses: actions/github-script@v8\n        env:\n          LABEL_NAME: ${{ steps.process.outputs.label }}\n        with:\n          script: |\n            const label = process.env.LABEL_NAME;\n            const labelMeta = {\n              'needs-logs': { color: 'cfd3d7', description: 'Device logs requested for triage' },\n              'needs-info': { color: 'f9d0c4', description: 'More information requested for triage' },\n            };\n            const meta = labelMeta[label];\n            if (!meta) return;\n\n            // Ensure label exists\n            try {\n              await github.rest.issues.getLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label });\n            } catch (e) {\n              if (e.status !== 404) throw e;\n              await github.rest.issues.createLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label, color: meta.color, description: meta.description });\n            }\n\n            // Apply label\n            await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.issue.number, labels: [label] });\n\n      - name: Comment on issue\n        if: steps.process.outputs.should_comment == 'true'\n        uses: actions/github-script@v8\n        env:\n          COMMENT_BODY: ${{ steps.process.outputs.comment_body }}\n        with:\n          script: |\n            await github.rest.issues.createComment({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: context.payload.issue.number,\n              body: process.env.COMMENT_BODY\n            });\n"
  },
  {
    "path": ".github/workflows/models_pr_triage.yml",
    "content": "name: PR Triage (Models)\n\non:\n  pull_request_target:\n    types: [opened]\n\npermissions:\n  pull-requests: write\n  issues: write\n  models: read\n\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.pull_request.number }}\n  cancel-in-progress: true\n\njobs:\n  triage:\n    if: ${{ github.repository == 'meshtastic/firmware' && github.event.pull_request.user.type != 'Bot' }}\n    runs-on: ubuntu-latest\n    steps:\n      # ─────────────────────────────────────────────────────────────────────────\n      # Step 1: Check if PR already has automation/type labels (skip if so)\n      # ─────────────────────────────────────────────────────────────────────────\n      - name: Check existing labels\n        uses: actions/github-script@v8\n        id: check-labels\n        with:\n          script: |\n            const skipLabels = new Set(['automation']);\n            const typeLabels = new Set(['bugfix', 'hardware-support', 'enhancement', 'dependencies', 'submodules', 'github_actions', 'trunk', 'cleanup']);\n            const prLabels = context.payload.pull_request.labels.map(l => l.name);\n\n            const shouldSkipAll = prLabels.some(l => skipLabels.has(l));\n            const hasTypeLabel = prLabels.some(l => typeLabels.has(l));\n\n            core.setOutput('skip_all', shouldSkipAll ? 'true' : 'false');\n            core.setOutput('has_type_label', hasTypeLabel ? 'true' : 'false');\n\n      # ─────────────────────────────────────────────────────────────────────────\n      # Step 2: Quality check (spam/AI-slop detection)\n      # ─────────────────────────────────────────────────────────────────────────\n      - name: Detect spam or low-quality content\n        if: steps.check-labels.outputs.skip_all != 'true'\n        uses: actions/ai-inference@v2\n        id: quality\n        continue-on-error: true\n        with:\n          max-tokens: 20\n          prompt: |\n            Is this GitHub pull request spam, AI-generated slop, or low quality?\n\n            Title: ${{ github.event.pull_request.title }}\n            Body: ${{ github.event.pull_request.body }}\n\n            Respond with exactly one of: spam, ai-generated, needs-review, ok\n          system-prompt: You detect spam and low-quality contributions. Be conservative - only flag obvious spam or AI slop.\n          model: openai/gpt-4o-mini\n\n      - name: Apply quality label if needed\n        if: steps.check-labels.outputs.skip_all != 'true' && steps.quality.outputs.response != '' && steps.quality.outputs.response != 'ok'\n        uses: actions/github-script@v8\n        id: quality-label\n        env:\n          QUALITY_LABEL: ${{ steps.quality.outputs.response }}\n        with:\n          script: |\n            const label = (process.env.QUALITY_LABEL || '').trim().toLowerCase();\n            const labelMeta = {\n              'spam': { color: 'd73a4a', description: 'Possible spam' },\n              'ai-generated': { color: 'fbca04', description: 'Possible AI-generated low-quality content' },\n              'needs-review': { color: 'f9d0c4', description: 'Needs human review' },\n            };\n            const meta = labelMeta[label];\n            if (!meta) return;\n\n            // Ensure label exists\n            try {\n              await github.rest.issues.getLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label });\n            } catch (e) {\n              if (e.status !== 404) throw e;\n              await github.rest.issues.createLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label, color: meta.color, description: meta.description });\n            }\n\n            // Apply label\n            await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, labels: [label] });\n\n            core.setOutput('is_spam', 'true');\n\n      # ─────────────────────────────────────────────────────────────────────────\n      # Step 3: Auto-label PR type (bugfix/hardware-support/enhancement)\n      # Only skip for spam/ai-generated; still classify needs-review PRs\n      # ─────────────────────────────────────────────────────────────────────────\n      - name: Classify PR for labeling\n        if: steps.check-labels.outputs.skip_all != 'true' && steps.check-labels.outputs.has_type_label != 'true' && steps.quality.outputs.response != 'spam' && steps.quality.outputs.response != 'ai-generated'\n        uses: actions/ai-inference@v2\n        id: classify\n        continue-on-error: true\n        with:\n          max-tokens: 30\n          prompt: |\n            Classify this pull request into exactly one category.\n\n            Return exactly one of: bugfix, hardware-support, enhancement\n\n            Use bugfix if it fixes a bug, crash, or incorrect behavior.\n            Use hardware-support if it adds or improves support for a specific hardware device/variant.\n            Use enhancement if it adds a new feature, improves performance, or refactors code.\n\n            Title: ${{ github.event.pull_request.title }}\n            Body: ${{ github.event.pull_request.body }}\n          system-prompt: You classify pull requests into categories. Be conservative and pick the most appropriate single label.\n          model: openai/gpt-4o-mini\n\n      - name: Apply type label\n        if: steps.check-labels.outputs.skip_all != 'true' && steps.check-labels.outputs.has_type_label != 'true' && steps.classify.outputs.response != ''\n        uses: actions/github-script@v8\n        env:\n          TYPE_LABEL: ${{ steps.classify.outputs.response }}\n        with:\n          script: |\n            const label = (process.env.TYPE_LABEL || '').trim().toLowerCase();\n            const labelMeta = {\n              'bugfix': { color: 'd73a4a', description: 'Bug fix' },\n              'hardware-support': { color: '0e8a16', description: 'Hardware support addition or improvement' },\n              'enhancement': { color: 'a2eeef', description: 'New feature or enhancement' },\n            };\n            const meta = labelMeta[label];\n            if (!meta) return;\n\n            // Ensure label exists\n            try {\n              await github.rest.issues.getLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label });\n            } catch (e) {\n              if (e.status !== 404) throw e;\n              await github.rest.issues.createLabel({ owner: context.repo.owner, repo: context.repo.repo, name: label, color: meta.color, description: meta.description });\n            }\n\n            // Apply label\n            await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, labels: [label] });\n"
  },
  {
    "path": ".github/workflows/nightly.yml",
    "content": "name: Nightly\non:\n  schedule:\n    - cron: 0 8 * * 1-5\n  workflow_dispatch: {}\n\npermissions: read-all\n\njobs:\n  trunk_check:\n    if: github.repository == 'meshtastic/firmware'\n    name: Trunk Check and Upload\n    runs-on: ubuntu-24.04\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Trunk Check\n        uses: trunk-io/trunk-action@v1\n        with:\n          trunk-token: ${{ secrets.TRUNK_TOKEN }}\n\n  trunk_upgrade:\n    if: github.repository == 'meshtastic/firmware'\n    # See: https://github.com/trunk-io/trunk-action/blob/v1/readme.md#automatic-upgrades\n    name: Trunk Upgrade (PR)\n    runs-on: ubuntu-24.04\n    permissions:\n      contents: write # For trunk to create PRs\n      pull-requests: write # For trunk to create PRs\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Trunk Upgrade\n        uses: trunk-io/trunk-action/upgrade@v1\n        with:\n          base: master\n"
  },
  {
    "path": ".github/workflows/package_obs.yml",
    "content": "name: Package for OpenSUSE Build Service\n\non:\n  workflow_call:\n    secrets:\n      OBS_PASSWORD:\n        required: true\n      PPA_GPG_PRIVATE_KEY:\n        required: true\n    inputs:\n      obs_project:\n        description: Meshtastic OBS project to target\n        required: true\n        type: string\n      series:\n        description: Debian series to target\n        required: true\n        type: string\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  build-debian-src:\n    uses: ./.github/workflows/build_debian_src.yml\n    secrets: inherit\n    with:\n      series: ${{ inputs.series }}\n      build_location: obs\n\n  package-obs:\n    runs-on: ubuntu-24.04\n    needs: build-debian-src\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          path: meshtasticd\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Install OpenSUSE Build Service deps\n        shell: bash\n        run: |\n          echo 'deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_24.04/ /' | sudo tee /etc/apt/sources.list.d/openSUSE:Tools.list\n          curl -fsSL https://download.opensuse.org/repositories/openSUSE:Tools/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/openSUSE_Tools.gpg > /dev/null\n          sudo apt-get update -y --fix-missing\n          sudo apt-get install -y osc\n\n      - name: Get release version string\n        working-directory: meshtasticd\n        run: |\n          echo \"deb=$(./bin/buildinfo.py deb)\" >> $GITHUB_OUTPUT\n        env:\n          BUILD_LOCATION: obs\n        id: version\n\n      - name: Download artifacts\n        uses: actions/download-artifact@v8\n        with:\n          name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src\n          merge-multiple: true\n\n      - name: Display structure of downloaded files\n        run: ls -lah\n\n      - name: Configure osc\n        env:\n          OBS_USERNAME: meshtastic\n        run: |\n          # Setup OpenSUSE Build Service credentials\n          mkdir -p ~/.config/osc\n          echo \"[general]\" > ~/.config/osc/oscrc\n          echo \"apiurl=https://api.opensuse.org\" >> ~/.config/osc/oscrc\n          echo \"[https://api.opensuse.org]\" >> ~/.config/osc/oscrc\n          echo \"user=${{ env.OBS_USERNAME }}\" >> ~/.config/osc/oscrc\n          echo \"pass=${{ secrets.OBS_PASSWORD }}\" >> ~/.config/osc/oscrc\n          echo \"credentials_mgr_class=osc.credentials.PlaintextConfigFileCredentialsManager\" >> ~/.config/osc/oscrc\n          # Create a temporary directory for osc checkout\n          mkdir -p osc\n\n      # Intentionally fail if credentials are invalid\n      # Update secrets if this returns `401`\n      - name: Verify OBS authentication\n        run: osc token\n\n      - name: Upload package to OBS\n        shell: bash\n        working-directory: osc\n        env:\n          OBS_PROJECT: ${{ inputs.obs_project }}\n          OBS_PACKAGE: meshtasticd\n        run: |\n          # Initialize the package in the current directory\n          osc checkout --output-dir . $OBS_PROJECT $OBS_PACKAGE\n\n          # Remove the existing package files\n          rm -rf *.dsc *.tar.xz\n\n          # Copy new package files to the directory\n          cp $GITHUB_WORKSPACE/*.dsc .\n          cp $GITHUB_WORKSPACE/*.tar.xz .\n\n          # Add/Remove the files\n          osc addremove\n\n          # Commit changes and push to OpenSUSE Build Service\n          osc commit -m \"GitHub Actions: ${{ steps.version.outputs.deb }}~${{ inputs.series }}\"\n"
  },
  {
    "path": ".github/workflows/package_pio_deps.yml",
    "content": "name: Package PlatformIO Library Dependencies\n# trunk-ignore-all(checkov/CKV_GHA_7): Allow workflow_dispatch inputs for testing\n\non:\n  workflow_call:\n    inputs:\n      pio_env:\n        description: PlatformIO environment to target\n        required: true\n        type: string\n  workflow_dispatch:\n    inputs:\n      pio_env:\n        description: PlatformIO environment to target\n        required: true\n        type: string\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  pkg-pio-libdeps:\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n\n      - name: Install deps\n        shell: bash\n        run: |\n          pip install platformio\n\n      - name: Get release version string\n        run: |\n          echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n        id: version\n\n      - name: Fetch libdeps\n        shell: bash\n        run: |-\n          platformio pkg install -e ${{ inputs.pio_env }}\n          platformio pkg install -e ${{ inputs.pio_env }} -t platformio/tool-scons@4.40502.0\n        env:\n          PLATFORMIO_LIBDEPS_DIR: pio/libdeps\n          PLATFORMIO_PACKAGES_DIR: pio/packages\n          PLATFORMIO_CORE_DIR: pio/core\n          PLATFORMIO_SETTING_ENABLE_TELEMETRY: 0\n          PLATFORMIO_SETTING_CHECK_PLATFORMIO_INTERVAL: 3650\n          PLATFORMIO_SETTING_CHECK_PRUNE_SYSTEM_THRESHOLD: 10240\n\n      - name: Mangle platformio cache\n        # Add \"1\" to epoch-timestamps of all downloads in the cache.\n        # This is a hack to prevent internet access at build-time.\n        run: |\n          cp pio/core/.cache/downloads/usage.db pio/core/.cache/downloads/usage.db.bak\n          jq -c 'with_entries(.value |= (. | tostring + \"1\" | tonumber))' pio/core/.cache/downloads/usage.db.bak > pio/core/.cache/downloads/usage.db\n\n      - name: Store binaries as an artifact\n        uses: actions/upload-artifact@v7\n        with:\n          name: platformio-deps-${{ inputs.pio_env }}-${{ steps.version.outputs.long }}\n          overwrite: true\n          include-hidden-files: true\n          path: |\n            pio/*\n"
  },
  {
    "path": ".github/workflows/package_ppa.yml",
    "content": "name: Package for Launchpad PPA\n\non:\n  workflow_call:\n    secrets:\n      PPA_GPG_PRIVATE_KEY:\n        required: true\n    inputs:\n      ppa_repo:\n        description: Meshtastic PPA to target\n        required: true\n        type: string\n      series:\n        description: Ubuntu series to target\n        required: true\n        type: string\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  build-debian-src:\n    uses: ./.github/workflows/build_debian_src.yml\n    secrets: inherit\n    with:\n      series: ${{ inputs.series }}\n      build_location: ppa\n\n  package-ppa:\n    runs-on: ubuntu-24.04\n    needs: build-debian-src\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: recursive\n          path: meshtasticd\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Install deps\n        shell: bash\n        run: |\n          sudo apt-get update -y --fix-missing\n          sudo apt-get install -y dput\n\n      - name: Import GPG key\n        uses: crazy-max/ghaction-import-gpg@v7\n        with:\n          gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}\n        id: gpg\n\n      - name: Get release version string\n        working-directory: meshtasticd\n        run: |\n          echo \"deb=$(./bin/buildinfo.py deb)\" >> $GITHUB_OUTPUT\n        env:\n          BUILD_LOCATION: ppa\n        id: version\n\n      - name: Download artifacts\n        uses: actions/download-artifact@v8\n        with:\n          name: firmware-debian-${{ steps.version.outputs.deb }}~${{ inputs.series }}-src\n          merge-multiple: true\n\n      - name: Display structure of downloaded files\n        run: ls -lah\n\n      - name: Publish with dput\n        if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}\n        run: |\n          dput ${{ inputs.ppa_repo }} meshtasticd_${{ steps.version.outputs.deb }}~${{ inputs.series }}_source.changes\n"
  },
  {
    "path": ".github/workflows/pr_enforce_labels.yml",
    "content": "name: Check PR Labels\n\non:\n  pull_request:\n    types: [opened, edited, labeled, unlabeled, synchronize, reopened]\n\npermissions:\n  pull-requests: read\n  contents: read\n\njobs:\n  check-label:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check for PR labels\n        uses: actions/github-script@v8\n        with:\n          script: |\n            const labels = context.payload.pull_request.labels.map(label => label.name);\n            const requiredLabels = ['bugfix', 'enhancement', 'hardware-support', 'dependencies', 'submodules', 'github_actions', 'trunk', 'cleanup'];\n            const hasRequiredLabel = labels.some(label => requiredLabels.includes(label));\n            if (!hasRequiredLabel) {\n              core.setFailed(`PR must have at least one of the following labels before it can be merged: ${requiredLabels.join(', ')}.`);\n            }\n"
  },
  {
    "path": ".github/workflows/pr_tests.yml",
    "content": "name: Tests\n\n# DISABLED: Changed from automatic PR triggers to manual only\non:\n  workflow_dispatch:\n    inputs:\n      reason:\n        description: \"Reason for manual test run\"\n        required: false\n        default: \"Manual test execution\"\n\nconcurrency:\n  group: tests-${{ github.head_ref || github.run_id }}\n  cancel-in-progress: true\n\npermissions:\n  contents: read\n  actions: read\n  checks: write\n  pull-requests: write\n\njobs:\n  native-tests:\n    name: \"🧪 Native Tests\"\n    if: github.repository == 'meshtastic/firmware'\n    uses: ./.github/workflows/test_native.yml\n    permissions:\n      contents: read\n      actions: read\n      checks: write\n\n  test-summary:\n    name: \"📊 Test Results\"\n    runs-on: ubuntu-latest\n    needs: [native-tests]\n    if: always()\n    permissions:\n      contents: read\n      actions: read\n      checks: write\n      pull-requests: write\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          submodules: recursive\n\n      - name: Get release version string\n        run: echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n        id: version\n\n      - name: Download test artifacts\n        if: needs.native-tests.result != 'skipped'\n        uses: actions/download-artifact@v8\n        with:\n          name: platformio-test-report-${{ steps.version.outputs.long }}\n          merge-multiple: true\n\n      - name: Parse test results and create detailed summary\n        id: test-results\n        run: |\n          echo \"## 🧪 Test Results Summary\" >> $GITHUB_STEP_SUMMARY\n          echo \"\" >> $GITHUB_STEP_SUMMARY\n\n          # Check overall job status first\n          if [[ \"${{ needs.native-tests.result }}\" == \"success\" ]]; then\n            echo \"✅ **Overall Status**: PASSED\" >> $GITHUB_STEP_SUMMARY\n          elif [[ \"${{ needs.native-tests.result }}\" == \"failure\" ]]; then\n            echo \"❌ **Overall Status**: FAILED\" >> $GITHUB_STEP_SUMMARY\n          elif [[ \"${{ needs.native-tests.result }}\" == \"cancelled\" ]]; then\n            echo \"⏸️ **Overall Status**: CANCELLED\" >> $GITHUB_STEP_SUMMARY\n            echo \"\" >> $GITHUB_STEP_SUMMARY\n            echo \"Tests were cancelled before completion.\" >> $GITHUB_STEP_SUMMARY\n            exit 0\n          else\n            echo \"⚠️ **Overall Status**: SKIPPED\" >> $GITHUB_STEP_SUMMARY\n            echo \"\" >> $GITHUB_STEP_SUMMARY\n            echo \"Tests were skipped.\" >> $GITHUB_STEP_SUMMARY\n            exit 0\n          fi\n\n          echo \"\" >> $GITHUB_STEP_SUMMARY\n\n          # Parse detailed test results if available\n          if [ -f \"testreport.xml\" ]; then\n            echo \"### 🔍 Individual Test Results\" >> $GITHUB_STEP_SUMMARY\n            echo \"\" >> $GITHUB_STEP_SUMMARY\n            \n            python3 << 'EOF'\n          import xml.etree.ElementTree as ET\n          import os\n\n          try:\n              tree = ET.parse('testreport.xml')\n              root = tree.getroot()\n              \n              total_tests = 0\n              passed_tests = 0\n              failed_tests = 0\n              skipped_tests = 0\n              \n              # Parse testsuite elements\n              for testsuite in root.findall('.//testsuite'):\n                  suite_name = testsuite.get('name', 'Unknown')\n                  suite_tests = int(testsuite.get('tests', '0'))\n                  suite_failures = int(testsuite.get('failures', '0'))\n                  suite_errors = int(testsuite.get('errors', '0'))\n                  suite_skipped = int(testsuite.get('skipped', '0'))\n                  \n                  total_tests += suite_tests\n                  failed_tests += suite_failures + suite_errors\n                  skipped_tests += suite_skipped\n                  passed_tests += suite_tests - suite_failures - suite_errors - suite_skipped\n                  \n                  if suite_tests > 0:\n                      status = \"✅\" if (suite_failures + suite_errors) == 0 else \"❌\"\n                      print(f\"**{status} Test Suite: {suite_name}**\")\n                      print(f\"- Total: {suite_tests}\")\n                      print(f\"- Passed: ✅ {suite_tests - suite_failures - suite_errors - suite_skipped}\")\n                      print(f\"- Failed: ❌ {suite_failures + suite_errors}\")\n                      if suite_skipped > 0:\n                          print(f\"- Skipped: ⏭️ {suite_skipped}\")\n                      print(\"\")\n                      \n                      # Show individual test results for failed suites\n                      if suite_failures + suite_errors > 0:\n                          print(\"**Failed Tests:**\")\n                          for testcase in testsuite.findall('testcase'):\n                              test_name = testcase.get('name', 'Unknown')\n                              failure = testcase.find('failure')\n                              error = testcase.find('error')\n                              \n                              if failure is not None:\n                                  msg = failure.get('message', 'Unknown error')[:100]\n                                  print(f\"- ❌ `{test_name}`: {msg}\")\n                              elif error is not None:\n                                  msg = error.get('message', 'Unknown error')[:100]\n                                  print(f\"- ❌ `{test_name}`: ERROR - {msg}\")\n                          print(\"\")\n                      else:\n                          # Show passed tests for successful suites\n                          passed_count = 0\n                          for testcase in testsuite.findall('testcase'):\n                              if testcase.find('failure') is None and testcase.find('error') is None:\n                                  if passed_count < 5:  # Limit to first 5 to avoid spam\n                                      test_name = testcase.get('name', 'Unknown')\n                                      print(f\"- ✅ `{test_name}`: PASSED\")\n                                  passed_count += 1\n                          if passed_count > 5:\n                              print(f\"- ... and {passed_count - 5} more tests passed\")\n                          print(\"\")\n              \n              # Summary statistics\n              print(\"### 📊 Test Statistics\")\n              print(f\"- **Total Tests**: {total_tests}\")\n              print(f\"- **Passed**: ✅ {passed_tests}\")\n              print(f\"- **Failed**: ❌ {failed_tests}\")\n              if skipped_tests > 0:\n                  print(f\"- **Skipped**: ⏭️ {skipped_tests}\")\n              \n              if failed_tests > 0:\n                  print(f\"\\n❌ **{failed_tests} tests failed out of {total_tests} total**\")\n              else:\n                  print(f\"\\n✅ **All {total_tests} tests passed!**\")\n                  \n          except Exception as e:\n              print(f\"❌ Error parsing test results: {e}\")\n          EOF\n          else\n            echo \"⚠️ **No detailed test report available**\" >> $GITHUB_STEP_SUMMARY\n            echo \"\" >> $GITHUB_STEP_SUMMARY\n            echo \"Test artifacts may not have been generated properly.\" >> $GITHUB_STEP_SUMMARY\n          fi\n\n          echo \"\" >> $GITHUB_STEP_SUMMARY\n          echo \"---\" >> $GITHUB_STEP_SUMMARY\n          echo \"View detailed logs in the [Actions tab](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})\" >> $GITHUB_STEP_SUMMARY\n\n      - name: Comment test results on PR\n        if: github.event_name == 'pull_request' && needs.native-tests.result != 'skipped'\n        uses: actions/github-script@v8\n        with:\n          script: |\n            const fs = require('fs');\n\n            // Read the step summary to use as PR comment\n            let testSummary = \"## 🧪 Test Results Summary\\n\\n\";\n\n            if (\"${{ needs.native-tests.result }}\" === \"success\") {\n              testSummary += \"✅ **All tests passed!**\\n\\n\";\n            } else if (\"${{ needs.native-tests.result }}\" === \"failure\") {\n              testSummary += \"❌ **Some tests failed.**\\n\\n\";\n            } else {\n              testSummary += \"⚠️ **Tests did not complete normally.**\\n\\n\";\n            }\n\n            testSummary += `View detailed results: [Actions Run](${context.payload.repository.html_url}/actions/runs/${context.runId})\\n\\n`;\n            testSummary += \"---\\n\";\n            testSummary += \"*This comment will be automatically updated when new commits are pushed.*\";\n\n            // Find existing comment\n            const comments = await github.rest.issues.listComments({\n              owner: context.repo.owner,\n              repo: context.repo.repo,\n              issue_number: context.issue.number\n            });\n\n            const botComment = comments.data.find(comment => \n              comment.user.type === 'Bot' && \n              comment.body.includes('🧪 Test Results Summary')\n            );\n\n            if (botComment) {\n              // Update existing comment\n              await github.rest.issues.updateComment({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                comment_id: botComment.id,\n                body: testSummary\n              });\n            } else {\n              // Create new comment\n              await github.rest.issues.createComment({\n                owner: context.repo.owner,\n                repo: context.repo.repo,\n                issue_number: context.issue.number,\n                body: testSummary\n              });\n            }\n\n      - name: Set overall status\n        run: |\n          if [[ \"${{ needs.native-tests.result }}\" == \"success\" ]]; then\n            echo \"All tests passed! ✅\"\n            exit 0\n          else\n            echo \"Some tests failed! ❌\"\n            exit 1\n          fi\n"
  },
  {
    "path": ".github/workflows/release_channels.yml",
    "content": "name: Trigger release workflows upon Publish\n\non:\n  release:\n    types: [published, released]\n\npermissions:\n  contents: write\n  packages: write\n\njobs:\n  build-docker:\n    uses: ./.github/workflows/docker_manifest.yml\n    with:\n      release_channel: |-\n        ${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}\n    secrets: inherit\n\n  package-ppa:\n    strategy:\n      fail-fast: false\n      matrix:\n        series:\n          - jammy # 22.04 LTS\n          - noble # 24.04 LTS\n          - questing # 25.10\n          - resolute # 26.04 LTS\n    uses: ./.github/workflows/package_ppa.yml\n    with:\n      ppa_repo: |-\n        ppa:meshtastic/${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}\n      series: ${{ matrix.series }}\n    secrets: inherit\n\n  package-obs:\n    uses: ./.github/workflows/package_obs.yml\n    with:\n      obs_project: |-\n        network:Meshtastic:${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}\n      series: |-\n        ${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}\n    secrets: inherit\n\n  hook-copr:\n    uses: ./.github/workflows/hook_copr.yml\n    with:\n      copr_project: |-\n        ${{ contains(github.event.release.name, 'Beta') && 'beta' || contains(github.event.release.name, 'Alpha') && 'alpha' }}\n    secrets: inherit\n\n  publish-release-notes:\n    if: github.event.action == 'published'\n    runs-on: ubuntu-latest\n    steps:\n      - name: Get release version\n        id: version\n        run: |\n          # Extract version from tag (e.g., v2.7.15.567b8ea -> 2.7.15.567b8ea)\n          VERSION=${GITHUB_REF#refs/tags/v}\n          echo \"version=$VERSION\" >> $GITHUB_OUTPUT\n\n      - name: Get release notes\n        run: |\n          mkdir -p ./publish\n          gh release view ${{ github.event.release.tag_name }} --json body --jq '.body' > ./publish/release_notes.md\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Publish release notes to meshtastic.github.io\n        uses: peaceiris/actions-gh-pages@v4\n        with:\n          deploy_key: ${{ secrets.DIST_PAGES_DEPLOY_KEY }}\n          external_repository: meshtastic/meshtastic.github.io\n          publish_branch: master\n          publish_dir: ./publish\n          destination_dir: firmware-${{ steps.version.outputs.version }}\n          user_name: github-actions[bot]\n          user_email: github-actions[bot]@users.noreply.github.com\n          commit_message: Release notes for ${{ steps.version.outputs.version }}\n          enable_jekyll: true\n\n  # Create a PR to bump version when a release is Published\n  bump-version:\n    if: github.event.action == 'published'\n    runs-on: ubuntu-latest\n    permissions:\n      pull-requests: write\n      contents: write\n    defaults:\n      run:\n        shell: bash\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n        with:\n          # Always use master branch for version bumps\n          ref: master\n\n      - name: Setup Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: 3.x\n\n      - name: Bump version.properties\n        run: |\n          # Bump version.properties\n          chmod +x ./bin/bump_version.py\n          ./bin/bump_version.py\n\n      - name: Get new release version string\n        run: |\n          echo \"short=$(./bin/buildinfo.py short)\" >> $GITHUB_OUTPUT\n        id: new_version\n\n      - name: Ensure debian deps are installed\n        run: |\n          sudo apt-get update -y --fix-missing\n          sudo apt-get install -y devscripts\n\n      - name: Update debian changelog\n        run: |\n          # Update debian changelog\n          chmod +x ./debian/ci_changelog.sh\n          ./debian/ci_changelog.sh\n\n      - name: Bump org.meshtastic.meshtasticd.metainfo.xml\n        run: |\n          # Bump org.meshtastic.meshtasticd.metainfo.xml\n          pip install -r bin/bump_metainfo/requirements.txt -q\n          chmod +x ./bin/bump_metainfo/bump_metainfo.py\n          ./bin/bump_metainfo/bump_metainfo.py --file bin/org.meshtastic.meshtasticd.metainfo.xml \"${{ steps.new_version.outputs.short }}\"\n        env:\n          PIP_DISABLE_PIP_VERSION_CHECK: 1\n\n      - name: Create Bumps pull request\n        uses: peter-evans/create-pull-request@v8\n        with:\n          base: ${{ github.event.repository.default_branch }}\n          branch: create-pull-request/bump-version\n          labels: github_actions\n          title: Bump release version\n          commit-message: Automated version bumps\n          add-paths: |\n            version.properties\n            debian/changelog\n            bin/org.meshtastic.meshtasticd.metainfo.xml\n"
  },
  {
    "path": ".github/workflows/sec_sast_semgrep_cron.yml",
    "content": "---\nname: Semgrep Full Scan\n\non:\n  workflow_dispatch:\n  schedule:\n    - cron: 0 1 * * 6\n\npermissions:\n  actions: read\n  contents: read\n  security-events: write\n\njobs:\n  semgrep-full:\n    if: github.repository == 'meshtastic/firmware'\n    runs-on: ubuntu-24.04\n    container:\n      image: semgrep/semgrep\n\n    steps:\n      # step 1\n      - name: clone application source code\n        uses: actions/checkout@v6\n\n      # step 2\n      - name: full scan\n        run: |\n          semgrep \\\n            --sarif --output report.sarif \\\n            --metrics=off \\\n            --config=\"p/default\"\n\n      # step 3\n      - name: save report as pipeline artifact\n        uses: actions/upload-artifact@v7\n        with:\n          name: report.sarif\n          overwrite: true\n          path: report.sarif\n\n      # step 4\n      - name: publish code scanning alerts\n        uses: github/codeql-action/upload-sarif@v4\n        with:\n          sarif_file: report.sarif\n          category: semgrep\n"
  },
  {
    "path": ".github/workflows/sec_sast_semgrep_pull.yml",
    "content": "---\nname: Semgrep Differential Scan\non: pull_request\n\npermissions: read-all\n\njobs:\n  semgrep-diff:\n    runs-on: ubuntu-24.04\n    container:\n      image: semgrep/semgrep\n\n    steps:\n      # step 1\n      - name: clone application source code\n        uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n\n      # step 2\n      - name: differential scan\n        run: |\n          semgrep scan \\\n            --error \\\n            --metrics=off \\\n            --baseline-commit ${{ github.event.pull_request.base.sha }} \\\n            --config=\"p/default\"\n"
  },
  {
    "path": ".github/workflows/stale_bot.yml",
    "content": "name: process stale Issues and PR's\non:\n  schedule:\n    - cron: 0 6 * * *\n  workflow_dispatch: {}\n\npermissions:\n  issues: write\n  pull-requests: write\n  actions: write\n\njobs:\n  stale_issues:\n    if: github.repository == 'meshtastic/firmware'\n    name: Close Stale Issues\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Stale PR+Issues\n        uses: actions/stale@v10.2.0\n        with:\n          days-before-stale: 45\n          stale-issue-message: This issue has not had any comment or update in the last month. If it is still relevant, please post update comments. If no comments are made, this issue will be closed automagically in 7 days.\n          close-issue-message: This issue has not had any comment since the last notice. It has been closed automatically. If this is incorrect, or the issue becomes relevant again, please request that it is reopened.\n          exempt-issue-labels: pinned,3.0,triaged,backlog\n          exempt-pr-labels: pinned,3.0,triaged,backlog\n"
  },
  {
    "path": ".github/workflows/test_native.yml",
    "content": "name: Run Tests on Native platform\n\non:\n  workflow_call:\n  workflow_dispatch:\n\npermissions: {}\n\nenv:\n  LCOV_CAPTURE_FLAGS: --quiet --capture --include \"${PWD}/src/*\" --exclude '*/src/mesh/generated/*' --directory .pio/build/coverage/src --base-directory \"${PWD}\"\n\njobs:\n  simulator-tests:\n    name: Native Simulator Tests\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n          submodules: recursive\n\n      - name: Setup native build\n        id: base\n        uses: ./.github/actions/setup-native\n\n      - name: Install simulator dependencies\n        run: pip install -U dotmap\n\n      # We now run integration test before other build steps (to quickly see runtime failures)\n      - name: Build for native/coverage\n        run: platformio run -e coverage\n\n      - name: Capture initial coverage information\n        shell: bash\n        run: |\n          sudo apt-get install -y lcov\n          lcov ${{ env.LCOV_CAPTURE_FLAGS }} --initial --output-file coverage_base.info\n          sed -i -e \"s#${PWD}#.#\" coverage_base.info # Make paths relative.\n\n      - name: Integration test\n        run: |\n          .pio/build/coverage/meshtasticd -s &\n          PID=$!\n          timeout 20 bash -c \"until ls -al /proc/$PID/fd | grep socket; do sleep 1; done\"\n          echo \"Simulator started, launching python test...\"\n          python3 -c 'from meshtastic.test import testSimulator; testSimulator()'\n          wait\n\n      - name: Capture coverage information\n        if: always() # run this step even if previous step failed\n        run: |\n          lcov ${{ env.LCOV_CAPTURE_FLAGS }} --test-name integration --output-file coverage_integration.info\n          sed -i -e \"s#${PWD}#.#\" coverage_integration.info # Make paths relative.\n\n      - name: Get release version string\n        if: always() # run this step even if previous step failed\n        run: echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n        id: version\n\n      - name: Save coverage information\n        uses: actions/upload-artifact@v7\n        if: always() # run this step even if previous step failed\n        with:\n          name: lcov-coverage-info-native-simulator-test-${{ steps.version.outputs.long }}\n          overwrite: true\n          path: ./coverage_*.info\n\n  platformio-tests:\n    name: Native PlatformIO Tests\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n          submodules: recursive\n\n      - name: Setup native build\n        id: base\n        uses: ./.github/actions/setup-native\n\n      - name: Get release version string\n        run: echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n        id: version\n\n      # Disable (comment-out) BUILD_EPOCH. It causes a full rebuild between tests and resets the\n      # coverage information each time.\n      - name: Disable BUILD_EPOCH\n        run: sed -i 's/-DBUILD_EPOCH=$UNIX_TIME/#-DBUILD_EPOCH=$UNIX_TIME/' platformio.ini\n\n      - name: PlatformIO Tests\n        run: platformio test -e coverage -v --junit-output-path testreport.xml\n\n      - name: Save test results\n        if: always() # run this step even if previous step failed\n        uses: actions/upload-artifact@v7\n        with:\n          name: platformio-test-report-${{ steps.version.outputs.long }}\n          overwrite: true\n          path: ./testreport.xml\n\n      - name: Capture coverage information\n        if: always() # run this step even if previous step failed\n        run: |\n          sudo apt-get install -y lcov\n          lcov ${{ env.LCOV_CAPTURE_FLAGS }} --test-name tests --output-file coverage_tests.info\n          sed -i -e \"s#${PWD}#.#\" coverage_tests.info # Make paths relative.\n\n      - name: Save coverage information\n        uses: actions/upload-artifact@v7\n        if: always() # run this step even if previous step failed\n        with:\n          name: lcov-coverage-info-native-platformio-tests-${{ steps.version.outputs.long }}\n          overwrite: true\n          path: ./coverage_*.info\n\n  generate-reports:\n    name: Generate Test Reports\n    runs-on: ubuntu-latest\n    permissions: # Needed for dorny/test-reporter.\n      contents: read\n      actions: read\n      checks: write\n    needs:\n      - simulator-tests\n      - platformio-tests\n    if: always()\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          ref: ${{github.event.pull_request.head.ref}}\n          repository: ${{github.event.pull_request.head.repo.full_name}}\n\n      - name: Get release version string\n        run: echo \"long=$(./bin/buildinfo.py long)\" >> $GITHUB_OUTPUT\n        id: version\n\n      - name: Download test artifacts\n        uses: actions/download-artifact@v8\n        with:\n          name: platformio-test-report-${{ steps.version.outputs.long }}\n          merge-multiple: true\n\n      - name: Test Report\n        uses: dorny/test-reporter@v2.6.0\n        with:\n          name: PlatformIO Tests\n          path: testreport.xml\n          reporter: java-junit\n\n      - name: Download coverage artifacts\n        uses: actions/download-artifact@v8\n        with:\n          pattern: lcov-coverage-info-native-*-${{ steps.version.outputs.long }}\n          path: code-coverage-report\n          merge-multiple: true\n\n      - name: Generate Code Coverage Report\n        run: |\n          sudo apt-get install -y lcov\n          lcov --quiet --add-tracefile code-coverage-report/coverage_base.info --add-tracefile code-coverage-report/coverage_integration.info --add-tracefile code-coverage-report/coverage_tests.info --output-file code-coverage-report/coverage_src.info\n          genhtml --quiet --legend --prefix \"${PWD}\" code-coverage-report/coverage_src.info --output-directory code-coverage-report\n\n      - name: Save Code Coverage Report\n        uses: actions/upload-artifact@v7\n        with:\n          name: code-coverage-report-${{ steps.version.outputs.long }}\n          path: code-coverage-report\n"
  },
  {
    "path": ".github/workflows/tests.yml",
    "content": "name: End to end tests\n\non:\n  schedule:\n    - cron: 0 0 * * * # Run every day at midnight\n  workflow_dispatch: {}\n\npermissions:\n  contents: read\n  actions: read\n  checks: write\n\njobs:\n  native-tests:\n    if: github.repository == 'meshtastic/firmware'\n    uses: ./.github/workflows/test_native.yml\n\n  hardware-tests:\n    if: github.repository == 'meshtastic/firmware'\n    runs-on: test-runner\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n\n      # - uses: actions/setup-python@v6\n      #   with:\n      #     python-version: '3.10'\n\n      # pipx install \"setuptools<72\"\n      - name: Upgrade python tools\n        shell: bash\n        run: |\n          pipx install adafruit-nrfutil\n          pipx install poetry\n          pipx install meshtastic --pip-args=--pre\n\n      - name: Install PlatformIO from script\n        shell: bash\n        run: |\n          curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py\n          python3 get-platformio.py\n\n      - name: Upgrade platformio\n        shell: bash\n        run: |\n          export PATH=$PATH:$HOME/.local/bin\n          pio upgrade\n\n      - name: Setup Node\n        uses: actions/setup-node@v6\n        with:\n          node-version: 24\n\n      - name: Setup pnpm\n        uses: pnpm/action-setup@v5\n        with:\n          version: latest\n\n      - name: Install dependencies, setup devices and run\n        shell: bash\n        run: |\n          git submodule update --init --recursive\n          cd meshtestic/\n          pnpm install\n          pnpm run setup\n          pnpm run test\n"
  },
  {
    "path": ".github/workflows/trunk_annotate_pr.yml",
    "content": "name: Annotate PR with trunk issues\n# See: https://github.com/trunk-io/trunk-action/blob/v1/readme.md#getting-inline-annotations-for-fork-prs\n\non:\n  workflow_run:\n    workflows: [Pull Request] # Name from `trunk_check.yml`\n    types: [completed]\n\npermissions: read-all\n\njobs:\n  trunk_check:\n    name: Trunk Code Quality Annotate\n    runs-on: ubuntu-24.04\n    permissions:\n      checks: write # For trunk to post annotations\n      contents: read # For repo checkout\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Trunk Check\n        uses: trunk-io/trunk-action@v1\n        with:\n          post-annotations: true\n"
  },
  {
    "path": ".github/workflows/trunk_check.yml",
    "content": "name: Pull Request\non: [pull_request]\nconcurrency:\n  group: ${{ github.head_ref || github.run_id }}\n  cancel-in-progress: true\n\npermissions: read-all\n\njobs:\n  trunk_check:\n    name: Trunk Check Runner\n    runs-on: ubuntu-24.04\n    permissions:\n      checks: write # For trunk to post annotations\n      contents: read # For repo checkout\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v6\n\n      - name: Trunk Check\n        uses: trunk-io/trunk-action@v1\n        with:\n          save-annotations: true\n"
  },
  {
    "path": ".github/workflows/update_protobufs.yml",
    "content": "name: Update protobufs and regenerate classes\non: workflow_dispatch\n\npermissions: read-all\n\njobs:\n  update-protobufs:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v6\n        with:\n          submodules: true\n\n      - name: Update submodule\n        if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }}\n        run: |\n          git submodule update --remote protobufs\n\n      - name: Download nanopb\n        run: |\n          wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.9.1-linux-x86.tar.gz\n          tar xvzf nanopb-0.4.9.1-linux-x86.tar.gz\n          mv nanopb-0.4.9.1-linux-x86 nanopb-0.4.9\n\n      - name: Re-generate protocol buffers\n        run: |\n          ./bin/regen-protos.sh\n\n      - name: Create pull request\n        uses: peter-evans/create-pull-request@v8\n        with:\n          branch: create-pull-request/update-protobufs\n          labels: submodules\n          title: Update protobufs and classes\n          commit-message: Update protobufs\n          add-paths: |\n            protobufs\n            src/mesh\n"
  },
  {
    "path": ".gitignore",
    "content": ".pio\npio\npio.tar\nweb\nweb.tar\n\n# ignore vscode IDE settings files\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/extensions.json\n*.code-workspace\n\n.idea\n.platformio\n.local\n.cache\n\n.DS_Store\nThumbs.db\n.autotools\n.built\n.context\n.cproject\n.vagrant\nnanopb*\nflash.uf2\ncmake-build*\n__pycache__\n\n*.swp\n*.swo\n*~\n\nvenv/\n.venv/\nrelease/\n.vscode/extensions.json\n/compile_commands.json\nsrc/mesh/raspihttp/certificate.pem\nsrc/mesh/raspihttp/private_key.pem\n\n# Ignore logo (set at build time with platformio-custom.py)\ndata/boot/logo.*\n\n# pioarduino platform\nmanaged_components/*\narduino-lib-builder*\ndependencies.lock\nidf_component.yml\nCMakeLists.txt\n/sdkconfig.*\n.dummy/*\n\n# PYTHONPATH used by the Nix shell\n.python3\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"protobufs\"]\n\tpath = protobufs\n\turl = https://github.com/meshtastic/protobufs.git\n[submodule \"meshtestic\"]\n\tpath = meshtestic\n\turl = https://github.com/meshtastic/meshTestic\n"
  },
  {
    "path": ".gitpod.yml",
    "content": "tasks:\n  - init: pip install platformio && pip install --upgrade pip\n"
  },
  {
    "path": ".semgrepignore",
    "content": ".github/workflows/main_matrix.yml\nsrc/mesh/compression/unishox2.cpp\n"
  },
  {
    "path": ".trunk/.gitignore",
    "content": "*out\n*logs\n*actions\n*notifications\n*tools\nplugins\nuser_trunk.yaml\nuser.yaml\ntmp\n"
  },
  {
    "path": ".trunk/configs/.bandit",
    "content": "[bandit]\nskips = B101"
  },
  {
    "path": ".trunk/configs/.clang-format",
    "content": "Language: Cpp\nIndentWidth: 4\nColumnLimit: 130\nPointerAlignment: Right\nBreakBeforeBraces: Linux\nAllowShortFunctionsOnASingleLine: Inline\n"
  },
  {
    "path": ".trunk/configs/.flake8",
    "content": "# Autoformatter friendly flake8 config (all formatting rules disabled)\n[flake8]\nextend-ignore = D1, D2, E1, E2, E3, E501, W1, W2, W3, W5\n"
  },
  {
    "path": ".trunk/configs/.hadolint.yaml",
    "content": "# Following source doesn't work in most setups\nignored:\n  - SC1090\n  - SC1091\n"
  },
  {
    "path": ".trunk/configs/.isort.cfg",
    "content": "[settings]\nprofile=black\n"
  },
  {
    "path": ".trunk/configs/.markdownlint.yaml",
    "content": "# Autoformatter friendly markdownlint config (all formatting rules disabled)\ndefault: true\nblank_lines: false\nbullet: false\nhtml: false\nindentation: false\nline_length: false\nspaces: false\nurl: false\nwhitespace: false\nheadings: false\n"
  },
  {
    "path": ".trunk/configs/.prettierignore",
    "content": "renovate.json\n"
  },
  {
    "path": ".trunk/configs/.prettierrc",
    "content": "{\n  \"overrides\": [\n    {\n      \"files\": \"userPrefs.jsonc\",\n      \"options\": {\n        \"trailingComma\": \"none\"\n      }\n    }\n  ]\n}\n"
  },
  {
    "path": ".trunk/configs/.shellcheckrc",
    "content": "enable=all\nsource-path=SCRIPTDIR\ndisable=SC2154\ndisable=SC2248\ndisable=SC2250\n\n# If you're having issues with shellcheck following source, disable the errors via:\n# disable=SC1090\n# disable=SC1091\n# "
  },
  {
    "path": ".trunk/configs/.yamllint.yaml",
    "content": "rules:\n  quoted-strings:\n    required: only-when-needed\n    extra-allowed: [\"{|}\"]\n  empty-values:\n    forbid-in-block-mappings: false\n    forbid-in-flow-mappings: true\n  key-duplicates: {}\n  octal-values:\n    forbid-implicit-octal: true\n"
  },
  {
    "path": ".trunk/configs/ruff.toml",
    "content": "# Generic, formatter-friendly config.\nselect = [\"B\", \"D3\", \"D4\", \"E\", \"F\"]\n\n# Never enforce `E501` (line length violations). This should be handled by formatters.\nignore = [\"E501\"]\n"
  },
  {
    "path": ".trunk/configs/svgo.config.js",
    "content": "module.exports = {\n  plugins: [\n    {\n      name: \"preset-default\",\n      params: {\n        overrides: {\n          removeViewBox: false, // https://github.com/svg/svgo/issues/1128\n          sortAttrs: true,\n          removeOffCanvasPaths: true,\n        },\n      },\n    },\n  ],\n};\n"
  },
  {
    "path": ".trunk/trunk.yaml",
    "content": "version: 0.1\ncli:\n  version: 1.25.0\nplugins:\n  sources:\n    - id: trunk\n      ref: v1.7.6\n      uri: https://github.com/trunk-io/plugins\nlint:\n  enabled:\n    - checkov@3.2.510\n    - renovate@43.78.0\n    - prettier@3.8.1\n    - trufflehog@3.93.8\n    - yamllint@1.38.0\n    - bandit@1.9.4\n    - trivy@0.69.3\n    - taplo@0.10.0\n    - ruff@0.15.6\n    - isort@8.0.1\n    - markdownlint@0.48.0\n    - oxipng@10.1.0\n    - svgo@4.0.1\n    - actionlint@1.7.11\n    - flake8@7.3.0\n    - hadolint@2.14.0\n    - shfmt@3.6.0\n    - shellcheck@0.11.0\n    - black@26.3.1\n    - git-diff-check\n    - gitleaks@8.30.0\n    - clang-format@16.0.3\n  ignore:\n    - linters: [ALL]\n      paths:\n        - bin/**\nruntimes:\n  enabled:\n    - python@3.10.8\n    - go@1.21.0\n    - node@22.16.0\nactions:\n  disabled:\n    - trunk-announce\n  enabled:\n    - trunk-fmt-pre-commit\n    - trunk-check-pre-push\n    - trunk-upgrade-available\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"editor.formatOnSave\": true,\n  \"editor.defaultFormatter\": \"trunk.io\",\n  \"trunk.enableWindows\": true,\n  \"files.insertFinalNewline\": false,\n  \"files.trimFinalNewlines\": false,\n  \"cmake.configureOnOpen\": false,\n  \"[cpp]\": {\n    \"editor.defaultFormatter\": \"trunk.io\"\n  },\n  \"[powershell]\": {\n    \"editor.defaultFormatter\": \"ms-vscode.powershell\"\n  }\n}\n"
  },
  {
    "path": ".vscode/tasks.json",
    "content": "{\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"type\": \"PlatformIO\",\n      \"task\": \"Build\",\n      \"problemMatcher\": [\"$platformio\"],\n      \"group\": {\n        \"kind\": \"build\",\n        \"isDefault\": true\n      },\n      \"label\": \"PlatformIO: Build\"\n    }\n  ]\n}\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\nThe Meshtastic Firmware project is subject to the code of conduct for the parent project, which can be found here:\nhttps://meshtastic.org/docs/legal/conduct/\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to Meshtastic Firmware\n\nWe're excited that you're interested in contributing to the Meshtastic firmware! This document provides a high-level overview of how you can get involved.\n\n## Important First Steps\n\nBefore you begin, please:\n\n1. **Read our documentation**: Our [official documentation](https://meshtastic.org/docs/) is a crucial resource. It contains essential information about the project.\n\n2. **Check out the firmware build guide**: For specific instructions on setting up your development environment and building the firmware, refer to our [Firmware Build Guide](https://meshtastic.org/docs/development/firmware/build/).\n\n3. Read our [Code of Conduct](https://meshtastic.org/docs/legal/conduct/)\n\n4. Join our [Discord community](https://discord.com/invite/ktMAKGBnBs) to connect with developers and other contributors to get help.\n\n## Getting Help and Discussing Ideas\n\nWe encourage open communication and discussion before diving into code changes:\n\n1. **Use GitHub Discussions**: For new ideas, questions, or to discuss potential changes, start a conversation in our [GitHub Discussions](https://github.com/meshtastic/firmware/discussions) first. This helps us collaborate and avoid duplicate work.\n\n2. **Join our Discord**: For real-time chat and quick questions, join our [Discord server](https://discord.com/invite/ktMAKGBnBs). It's a great place to get help and connect with other developers and the community.\n\n3. **Reporting Issues**: If you've identified a bug, please use our bug report template when creating a new issue in the [issue tracker](https://github.com/meshtastic/firmware/issues). Ensure you've searched existing issues to avoid duplicates.\n\n## Making Contributions\n\n> [!IMPORTANT]\n> Before making any contributions, you must sign our Contributor License Agreement (CLA). You can do this by visiting https://cla-assistant.io/meshtastic/firmware. Be sure to use the GitHub account you will use to submit your contributions when signing.\n\n1. Fork the repository\n2. Create a new branch for your feature or bug fix\n3. Make your changes\n4. Test your changes thoroughly\n5. Create a pull request with a clear description, using the provided template, of your changes. Be sure to enable \"Allow edits from maintainers\".\n\n## Coding Standards\n\nTo ensure consistent code formatting across the project:\n\n1. Install the [Trunk](https://marketplace.visualstudio.com/items?itemName=Trunk.io) extension for Visual Studio Code.\n2. Before submitting your changes, run `trunk fmt` to automatically format your code according to our standards.\n\nAdhering to these formatting guidelines helps maintain code consistency and makes the review process smoother.\n\nThank you for contributing to Meshtastic!\n"
  },
  {
    "path": "Dockerfile",
    "content": "# trunk-ignore-all(trivy/DS002): We must run as root for this container\n# trunk-ignore-all(hadolint/DL3002): We must run as root for this container\n# trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions\n# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions\n\nFROM python:3.14-slim-trixie AS builder\nARG PIO_ENV=native\nENV DEBIAN_FRONTEND=noninteractive\nENV TZ=Etc/UTC\n\n# Install Dependencies\nENV PIP_ROOT_USER_ACTION=ignore\nRUN apt-get update && apt-get install --no-install-recommends -y \\\n        curl wget g++ zip git ca-certificates pkg-config \\\n        libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \\\n        libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev \\\n        libx11-dev libinput-dev libxkbcommon-x11-dev libsqlite3-dev libsdl2-dev \\\n    && apt-get clean && rm -rf /var/lib/apt/lists/* \\\n    && pip install --no-cache-dir -U platformio \\\n    && mkdir /tmp/firmware\n\n# Copy source code\nWORKDIR /tmp/firmware\nCOPY . /tmp/firmware\n\n# Build\nRUN bash ./bin/build-native.sh \"$PIO_ENV\" && \\\n    cp \"/tmp/firmware/release/meshtasticd_linux_$(uname -m)\" \"/tmp/firmware/release/meshtasticd\"\n\n# Fetch web assets\nRUN curl -L \"https://github.com/meshtastic/web/releases/download/v$(cat /tmp/firmware/bin/web.version)/build.tar\" -o /tmp/web.tar \\\n    && mkdir -p /tmp/web \\\n    && tar -xf /tmp/web.tar -C /tmp/web/ \\\n    && gzip -dr /tmp/web \\\n    && rm /tmp/web.tar\n\n##### PRODUCTION BUILD #############\n\nFROM debian:trixie-slim\nLABEL org.opencontainers.image.title=\"Meshtastic\" \\\n      org.opencontainers.image.description=\"Debian Meshtastic daemon and web interface\" \\\n      org.opencontainers.image.url=\"https://meshtastic.org\" \\\n      org.opencontainers.image.documentation=\"https://meshtastic.org/docs/\" \\\n      org.opencontainers.image.authors=\"Meshtastic\" \\\n      org.opencontainers.image.licenses=\"GPL-3.0-or-later\" \\\n      org.opencontainers.image.source=\"https://github.com/meshtastic/firmware/\"\nENV DEBIAN_FRONTEND=noninteractive\nENV TZ=Etc/UTC\n\n# nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root\nUSER root\n\nRUN apt-get update && apt-get --no-install-recommends -y install \\\n        libc-bin libc6 libgpiod3 libyaml-cpp0.8 libi2c0 libuv1t64 libusb-1.0-0-dev \\\n        liborcania2.3 libulfius2.7t64 libssl3t64 \\\n        libx11-6 libinput10 libxkbcommon-x11-0 libsdl2-2.0-0 \\\n    && apt-get clean && rm -rf /var/lib/apt/lists/* \\\n    && mkdir -p /var/lib/meshtasticd \\\n    && mkdir -p /etc/meshtasticd/config.d \\\n    && mkdir -p /etc/meshtasticd/ssl\n\n# Fetch compiled binary from the builder\nCOPY --from=builder /tmp/firmware/release/meshtasticd /usr/bin/\nCOPY --from=builder /tmp/web /usr/share/meshtasticd/web/\n# Copy config templates\nCOPY ./bin/config.d /etc/meshtasticd/available.d\n\nWORKDIR /var/lib/meshtasticd\nVOLUME /var/lib/meshtasticd\n\n# Expose Meshtastic TCP API port from the host\nEXPOSE 4403\n# Expose Meshtastic Web UI port from the host\nEXPOSE 9443\n\nCMD [ \"sh\", \"-cx\", \"meshtasticd --fsdir=/var/lib/meshtasticd\" ]\n\nHEALTHCHECK NONE\n"
  },
  {
    "path": "Dockerfile.test",
    "content": "# Lightweight container for running native PlatformIO tests on non-Linux hosts\nFROM python:3.14-slim-trixie\n\nENV DEBIAN_FRONTEND=noninteractive\nENV PIP_ROOT_USER_ACTION=ignore\n\n# hadolint ignore=DL3008\nRUN apt-get update && apt-get install --no-install-recommends -y \\\n        g++ git ca-certificates pkg-config \\\n        libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \\\n        libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev \\\n        libx11-dev libinput-dev libxkbcommon-x11-dev libsqlite3-dev libsdl2-dev \\\n    && apt-get clean && rm -rf /var/lib/apt/lists/* \\\n    && pip install --no-cache-dir platformio==6.1.19 \\\n        && useradd --create-home --shell /usr/sbin/nologin meshtastic\n\nWORKDIR /firmware\nRUN chown -R meshtastic:meshtastic /firmware\n\nHEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \\\n    CMD platformio --version || exit 1\n\nUSER meshtastic\n\n# Run tests by default; override with docker run args for specific filters\nCMD [\"platformio\", \"test\", \"-e\", \"coverage\", \"-v\"]\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\" markdown=\"1\">\n\n<img src=\".github/meshtastic_logo.png\" alt=\"Meshtastic Logo\" width=\"80\"/>\n<h1>Meshtastic Firmware</h1>\n\n![GitHub release downloads](https://img.shields.io/github/downloads/meshtastic/firmware/total)\n[![CI](https://img.shields.io/github/actions/workflow/status/meshtastic/firmware/main_matrix.yml?branch=master&label=actions&logo=github&color=yellow)](https://github.com/meshtastic/firmware/actions/workflows/ci.yml)\n[![CLA assistant](https://cla-assistant.io/readme/badge/meshtastic/firmware)](https://cla-assistant.io/meshtastic/firmware)\n[![Fiscal Contributors](https://opencollective.com/meshtastic/tiers/badge.svg?label=Fiscal%20Contributors&color=deeppink)](https://opencollective.com/meshtastic/)\n[![Vercel](https://img.shields.io/static/v1?label=Powered%20by&message=Vercel&style=flat&logo=vercel&color=000000)](https://vercel.com?utm_source=meshtastic&utm_campaign=oss)\n\n<a href=\"https://trendshift.io/repositories/5524\" target=\"_blank\"><img src=\"https://trendshift.io/api/badge/repositories/5524\" alt=\"meshtastic%2Ffirmware | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/></a>\n\n</div>\n\n</div>\n\n<div align=\"center\">\n\t<a href=\"https://meshtastic.org\">Website</a>\n\t-\n\t<a href=\"https://meshtastic.org/docs/\">Documentation</a>\n</div>\n\n## Overview\n\nThis repository contains the official device firmware for Meshtastic, an open-source LoRa mesh networking project designed for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware supports various hardware platforms, including ESP32, nRF52, RP2040/RP2350, and Linux-based devices.\n\nMeshtastic enables text messaging, location sharing, and telemetry over a decentralized mesh network, making it ideal for outdoor adventures, emergency preparedness, and remote operations.\n\n### Get Started\n\n- 🔧 **[Building Instructions](https://meshtastic.org/docs/development/firmware/build)** – Learn how to compile the firmware from source.\n- ⚡ **[Flashing Instructions](https://meshtastic.org/docs/getting-started/flashing-firmware/)** – Install or update the firmware on your device.\n\nJoin our community and help improve Meshtastic! 🚀\n\n## Stats\n\n![Alt](https://repobeats.axiom.co/api/embed/8025e56c482ec63541593cc5bd322c19d5c0bdcf.svg \"Repobeats analytics image\")\n"
  },
  {
    "path": "SECURITY.md",
    "content": "# Security Policy\n\n## Supported Versions\n\n| Firmware Version | Supported          |\n| ---------------- | ------------------ |\n| 2.7.x            | :white_check_mark: |\n| <= 2.6.x         | :x:                |\n\n## Reporting a Vulnerability\n\nWe support the private reporting of potential security vulnerabilities. Please go to the Security tab to file a report with a description of the potential vulnerability and reproduction scripts (preferred) or steps, and our developers will review.\n"
  },
  {
    "path": "alpine.Dockerfile",
    "content": "# trunk-ignore-all(trivy/DS002): We must run as root for this container\n# trunk-ignore-all(hadolint/DL3002): We must run as root for this container\n# trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions\n# trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions\n\nFROM python:3.14-alpine3.22 AS builder\nARG PIO_ENV=native\nENV PIP_ROOT_USER_ACTION=ignore\n\nRUN apk --no-cache add \\\n        bash g++ libstdc++-dev linux-headers zip git ca-certificates libbsd-dev \\\n        libgpiod-dev yaml-cpp-dev bluez-dev \\\n        libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \\\n        libx11-dev libinput-dev libxkbcommon-dev sqlite-dev sdl2-dev \\\n    && rm -rf /var/cache/apk/* \\\n    && pip install --no-cache-dir -U platformio \\\n    && mkdir /tmp/firmware\n\nWORKDIR /tmp/firmware\nCOPY . /tmp/firmware\n\n# Create small package (no debugging symbols)\n# Add `argp` for musl\nENV PLATFORMIO_BUILD_FLAGS=\"-Os -ffunction-sections -fdata-sections -Wl,--gc-sections -largp\"\n\nRUN bash ./bin/build-native.sh \"$PIO_ENV\" && \\\n    cp \"/tmp/firmware/release/meshtasticd_linux_$(uname -m)\" \"/tmp/firmware/release/meshtasticd\"\n\n# ##### PRODUCTION BUILD #############\n\nFROM alpine:3.23\nLABEL org.opencontainers.image.title=\"Meshtastic\" \\\n      org.opencontainers.image.description=\"Alpine Meshtastic daemon\" \\\n      org.opencontainers.image.url=\"https://meshtastic.org\" \\\n      org.opencontainers.image.documentation=\"https://meshtastic.org/docs/\" \\\n      org.opencontainers.image.authors=\"Meshtastic\" \\\n      org.opencontainers.image.licenses=\"GPL-3.0-or-later\" \\\n      org.opencontainers.image.source=\"https://github.com/meshtastic/firmware/\"\n\n# nosemgrep: dockerfile.security.last-user-is-root.last-user-is-root\nUSER root\n\nRUN apk --no-cache add \\\n        shadow libstdc++ libbsd libgpiod yaml-cpp libusb \\\n        i2c-tools libuv libx11 libinput libxkbcommon sdl2 \\\n    && rm -rf /var/cache/apk/* \\\n    && mkdir -p /var/lib/meshtasticd \\\n    && mkdir -p /etc/meshtasticd/config.d \\\n    && mkdir -p /etc/meshtasticd/ssl\n\n# Fetch compiled binary from the builder\nCOPY --from=builder /tmp/firmware/release/meshtasticd /usr/bin/\n# Copy config templates\nCOPY ./bin/config.d /etc/meshtasticd/available.d\n\nWORKDIR /var/lib/meshtasticd\nVOLUME /var/lib/meshtasticd\n\nEXPOSE 4403\n\nCMD [ \"sh\",  \"-cx\", \"meshtasticd --fsdir=/var/lib/meshtasticd\" ]\n\nHEALTHCHECK NONE"
  },
  {
    "path": "bin/.gitignore",
    "content": "config.yaml\n"
  },
  {
    "path": "bin/99-meshtasticd-udev.rules",
    "content": "# Set spidev ownership to 'spi' group\nSUBSYSTEM==\"spidev\", KERNEL==\"spidev*\", GROUP=\"spi\", MODE=\"0660\"\n# Allow access to USB CH341 devices\nSUBSYSTEM==\"usb\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"5512\", MODE=\"0666\"\n# Set gpio ownership to 'gpio' group\nSUBSYSTEM==\"*gpiomem*\", GROUP=\"gpio\", MODE=\"0660\"\nSUBSYSTEM==\"gpio\", GROUP=\"gpio\", MODE=\"0660\"\n"
  },
  {
    "path": "bin/analyze_map.py",
    "content": "#!/usr/bin/env python3\n\"\"\"Summarise linker map output to highlight heavy object files and libraries.\n\nUsage:\n    python bin/analyze_map.py --map .pio/build/rak4631/output.map --top 20\n\nThe script parses GNU ld map files and aggregates section sizes per object file\nand per archive/library, then prints sortable tables that make it easy to spot\nmodules worth trimming or hiding behind feature flags.\n\"\"\"\nfrom __future__ import annotations\n\nimport argparse\nimport collections\nimport os\nimport re\nimport sys\nfrom typing import DefaultDict, Dict, Tuple\n\n\nSECTION_LINE_RE = re.compile(r\"^\\s+(?P<section>\\S+)\\s+0x[0-9A-Fa-f]+\\s+0x(?P<size>[0-9A-Fa-f]+)\\s+(?P<object>.+)$\")\nARCHIVE_MEMBER_RE = re.compile(r\"^(?P<archive>.+)\\((?P<object>[^)]+)\\)$\")\n\n\ndef human_size(num_bytes: int) -> str:\n    \"\"\"Return a friendly size string with one decimal place.\"\"\"\n    if num_bytes < 1024:\n        return f\"{num_bytes:,} B\"\n    num = float(num_bytes)\n    for unit in (\"KB\", \"MB\", \"GB\"):\n        num /= 1024.0\n        if num < 1024.0:\n            return f\"{num:.1f} {unit}\"\n    return f\"{num:.1f} TB\"\n\n\ndef shorten_path(path: str, root: str) -> str:\n    \"\"\"Prefer repository-relative paths for readability.\"\"\"\n    path = path.strip()\n    if not path:\n        return path\n\n    # Normalise Windows archives (backslashes) to POSIX style for consistency.\n    path = path.replace(\"\\\\\", \"/\")\n\n    # Attempt to strip the root when an absolute path lives inside the repo.\n    if os.path.isabs(path):\n        try:\n            rel = os.path.relpath(path, root)\n            if not rel.startswith(\"..\"):\n                return rel\n        except ValueError:\n            # relpath can fail on mixed drives on Windows; fall back to basename.\n            pass\n    return path\n\n\ndef describe_object(raw_object: str, root: str) -> Tuple[str, str]:\n    \"\"\"Return a human friendly object label and the library it belongs to.\"\"\"\n    raw_object = raw_object.strip()\n    lib_label = \"[app]\"\n    match = ARCHIVE_MEMBER_RE.match(raw_object)\n    if match:\n        archive = shorten_path(match.group(\"archive\"), root)\n        obj = match.group(\"object\")\n        lib_label = os.path.basename(archive) or archive\n        label = f\"{archive}:{obj}\"\n    else:\n        label = shorten_path(raw_object, root)\n        # If the object lives under libs, hint at the containing directory.\n        parent = os.path.basename(os.path.dirname(label))\n        if parent:\n            lib_label = parent\n    return label, lib_label\n\n\ndef parse_map(map_path: str, repo_root: str) -> Tuple[Dict[str, int], Dict[str, int], Dict[str, Dict[str, int]]]:\n    per_object: DefaultDict[str, int] = collections.defaultdict(int)\n    per_library: DefaultDict[str, int] = collections.defaultdict(int)\n    per_object_sections: DefaultDict[str, DefaultDict[str, int]] = collections.defaultdict(lambda: collections.defaultdict(int))\n\n    try:\n        with open(map_path, \"r\", encoding=\"utf-8\", errors=\"ignore\") as handle:\n            for line in handle:\n                match = SECTION_LINE_RE.match(line)\n                if not match:\n                    continue\n\n                section = match.group(\"section\")\n                if section.startswith(\"*\") or section in {\"LOAD\", \"ORIGIN\"}:\n                    continue\n\n                size = int(match.group(\"size\"), 16)\n                if size == 0:\n                    continue\n\n                obj_token = match.group(\"object\").strip()\n                if not obj_token or obj_token.startswith(\"*\") or \"load address\" in obj_token:\n                    continue\n\n                label, lib_label = describe_object(obj_token, repo_root)\n                per_object[label] += size\n                per_library[lib_label] += size\n                per_object_sections[label][section] += size\n    except FileNotFoundError:\n        raise SystemExit(f\"error: map file '{map_path}' not found. Run a build first.\")\n\n    return per_object, per_library, per_object_sections\n\n\ndef format_section_breakdown(section_sizes: Dict[str, int], total: int, limit: int = 3) -> str:\n    items = sorted(section_sizes.items(), key=lambda kv: kv[1], reverse=True)\n    parts = []\n    for section, size in items[:limit]:\n        pct = (size / total) * 100 if total else 0\n        parts.append(f\"{section} {pct:.1f}%\")\n    if len(items) > limit:\n        remainder = total - sum(size for _, size in items[:limit])\n        pct = (remainder / total) * 100 if total else 0\n        parts.append(f\"other {pct:.1f}%\")\n    return \", \".join(parts)\n\n\ndef print_report(map_path: str, top_n: int, per_object: Dict[str, int], per_library: Dict[str, int], per_object_sections: Dict[str, Dict[str, int]]):\n    total_bytes = sum(per_object.values())\n    if total_bytes == 0:\n        print(\"No section data found in map file.\")\n        return\n\n    print(f\"Map file: {map_path}\")\n    print(f\"Accounted size: {human_size(total_bytes)} across {len(per_object)} object files\\n\")\n\n    sorted_objects = sorted(per_object.items(), key=lambda kv: kv[1], reverse=True)\n    print(f\"Top {min(top_n, len(sorted_objects))} object files by linked size:\")\n    for idx, (obj, size) in enumerate(sorted_objects[:top_n], 1):\n        pct = (size / total_bytes) * 100\n        breakdown = format_section_breakdown(per_object_sections[obj], size)\n        print(f\"{idx:2}. {human_size(size):>9}  ({size:,} B, {pct:5.2f}% of linked size)\")\n        print(f\"    {obj}\")\n        if breakdown:\n            print(f\"    sections: {breakdown}\")\n    print()\n\n    sorted_libs = sorted(per_library.items(), key=lambda kv: kv[1], reverse=True)\n    print(f\"Top {min(top_n, len(sorted_libs))} libraries or source roots:\")\n    for idx, (lib, size) in enumerate(sorted_libs[:top_n], 1):\n        pct = (size / total_bytes) * 100\n        print(f\"{idx:2}. {human_size(size):>9}  ({size:,} B, {pct:5.2f}% of linked size)  {lib}\")\n\n\ndef main() -> None:\n    parser = argparse.ArgumentParser(description=\"Highlight heavy object files from a GNU ld map file.\")\n    parser.add_argument(\"--map\", default=\".pio/build/rak4631/output.map\", help=\"Path to the map file (default: %(default)s)\")\n    parser.add_argument(\"--top\", type=int, default=20, help=\"Number of entries to display per table (default: %(default)s)\")\n    args = parser.parse_args()\n\n    map_path = os.path.abspath(args.map)\n    repo_root = os.path.abspath(os.getcwd())\n\n    per_object, per_library, per_object_sections = parse_map(map_path, repo_root)\n    print_report(os.path.relpath(map_path, repo_root), args.top, per_object, per_library, per_object_sections)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bin/base64_to_hex.py",
    "content": "import sys\nimport base64\n\ndef base64_to_hex_string(b64_string):\n    try:\n        # Decode the Base64 string to raw bytes\n        decoded_bytes = base64.b64decode(b64_string)\n    except Exception as e:\n        raise ValueError(f\"Invalid Base64 input: {e}\")\n    \n    # Check if the decoded result is exactly 32 bytes\n    if len(decoded_bytes) != 32:\n        raise ValueError(\"Decoded Base64 input must be exactly 32 bytes.\")\n    \n    # Convert each byte to its hex representation\n    hex_values = [f\"0x{byte:02x}\" for byte in decoded_bytes]\n    \n    # Join the formatted hex values with commas\n    formatted_output = \"{ \" + \", \".join(hex_values) + \" };\"\n    return formatted_output\n\nif __name__ == \"__main__\":\n    # Check if a Base64 string was provided in command line arguments\n    if len(sys.argv) != 2:\n        print(\"Usage: python script.py <base64-string>\")\n        sys.exit(1)\n    \n    b64_string = sys.argv[1]\n    try:\n        formatted_hex = base64_to_hex_string(b64_string)\n        print(formatted_hex)\n    except ValueError as e:\n        print(e)\n"
  },
  {
    "path": "bin/build-esp32.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\nVERSION=`bin/buildinfo.py long`\nSHORT_VERSION=`bin/buildinfo.py short`\n\nBUILDDIR=.pio/build/$1\nOUTDIR=release\n\nrm -f $OUTDIR/firmware*\nrm -r $OUTDIR/* || true\n\n# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale\nplatformio pkg install -e $1\n\necho \"Building for $1 with $PLATFORMIO_BUILD_FLAGS\"\nrm -f $BUILDDIR/firmware*\n\n# The shell vars the build tool expects to find\nexport APP_VERSION=$VERSION\n\nbasename=firmware-$1-$VERSION\n\npio run --environment $1 -t mtjson # -v\n\ncp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf\n\necho \"Copying ESP32 bin file\"\ncp $BUILDDIR/$basename.factory.bin $OUTDIR/$basename.factory.bin\n\necho \"Copying ESP32 update bin file\"\ncp $BUILDDIR/$basename.bin $OUTDIR/$basename.bin\n\necho \"Copying Filesystem for ESP32 targets\"\ncp $BUILDDIR/littlefs-$1-$VERSION.bin $OUTDIR/littlefs-$1-$VERSION.bin\ncp bin/device-install.* $OUTDIR/\ncp bin/device-update.* $OUTDIR/\n\necho \"Copying manifest\"\ncp $BUILDDIR/$basename.mt.json $OUTDIR/$basename.mt.json || true\n"
  },
  {
    "path": "bin/build-firmware.sh",
    "content": "#!/usr/bin/env bash\n\nexport PIP_BREAK_SYSTEM_PACKAGES=1\n\nif (echo $2 | grep -q \"esp32\"); then\n  bin/build-esp32.sh $1\nelif (echo $2 | grep -q \"nrf52\"); then\n  bin/build-nrf52.sh $1\nelif (echo $2 | grep -q \"stm32\"); then\n  bin/build-stm32.sh $1\nelif (echo $2 | grep -q \"rpi2040\"); then\n  bin/build-rp2xx0.sh $1\nelse\n  echo \"Unknown target $2\"\n  exit 1\nfi"
  },
  {
    "path": "bin/build-native.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\nplatformioFailed() {\n\t[[ $VIRTUAL_ENV != \"\" ]] && exit 1 # don't hint at virtualenv if it's already in use\n\techo -e \"\\nThere were issues running platformio and you are not using a virtual environment.\" \\\n\t\t\"\\nYou may try setting up virtualenv and downloading the latest platformio from pip:\" \\\n\t\t\"\\n\\tvirtualenv venv\" \\\n\t\t\"\\n\\tsource venv/bin/activate\" \\\n\t\t\"\\n\\tpip install platformio\" \\\n\t\t\"\\n\\t./bin/build-native.sh # retry building\"\n\texit 1\n}\n\nVERSION=$(bin/buildinfo.py long)\nSHORT_VERSION=$(bin/buildinfo.py short)\nPIO_ENV=${1:-native}\n\nBUILDDIR=.pio/build/$PIO_ENV\nOUTDIR=release\n\nrm -f $OUTDIR/meshtasticd*\n\nmkdir -p $OUTDIR/\nrm -r $OUTDIR/* || true\n\nbasename=meshtasticd-$1-$VERSION\n\n# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale\npio pkg install --environment \"$PIO_ENV\" || platformioFailed\npio run --environment \"$PIO_ENV\" || platformioFailed\n\ncp \"$BUILDDIR/meshtasticd\" \"$OUTDIR/meshtasticd_linux_$(uname -m)\"\ncp bin/native-install.* $OUTDIR/\n"
  },
  {
    "path": "bin/build-nrf52.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\nVERSION=$(bin/buildinfo.py long)\nSHORT_VERSION=$(bin/buildinfo.py short)\n\nBUILDDIR=.pio/build/$1\nOUTDIR=release\n\nrm -f $OUTDIR/firmware*\nrm -r $OUTDIR/* || true\n\n# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale\nplatformio pkg install -e $1\n\necho \"Building for $1 with $PLATFORMIO_BUILD_FLAGS\"\nrm -f $BUILDDIR/firmware*\n\n# The shell vars the build tool expects to find\nexport APP_VERSION=$VERSION\n\nbasename=firmware-$1-$VERSION\nota_basename=${basename}-ota\n\npio run --environment $1 -t mtjson # -v\n\ncp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf\n\necho \"Copying NRF52 dfu (OTA) file\"\ncp $BUILDDIR/$basename.zip $OUTDIR/$ota_basename.zip\n\necho \"Copying NRF52 UF2 file\"\ncp $BUILDDIR/$basename.uf2 $OUTDIR/$basename.uf2\ncp bin/*.uf2 $OUTDIR/\n\nSRCHEX=$BUILDDIR/$basename.hex\n\n# if WM1110 target, copy the merged.hex\nif (echo $1 | grep -q \"wio-sdk-wm1110\"); then\n\techo \"Copying .merged.hex file\"\n\tSRCHEX=$BUILDDIR/$basename.merged.hex\n\tcp $SRCHEX $OUTDIR/\nfi\n\nif (echo $1 | grep -q \"rak4631\"); then\n\techo \"Copying .hex file\"\n\tcp $SRCHEX $OUTDIR/\nfi\n\necho \"Copying manifest\"\ncp $BUILDDIR/$basename.mt.json $OUTDIR/$basename.mt.json || true\n"
  },
  {
    "path": "bin/build-rp2xx0.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\nVERSION=`bin/buildinfo.py long`\nSHORT_VERSION=`bin/buildinfo.py short`\n\nBUILDDIR=.pio/build/$1\nOUTDIR=release\n\nrm -f $OUTDIR/firmware*\nrm -r $OUTDIR/* || true\n\n# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale\nplatformio pkg install -e $1\n\necho \"Building for $1 with $PLATFORMIO_BUILD_FLAGS\"\nrm -f $BUILDDIR/firmware*\n\n# The shell vars the build tool expects to find\nexport APP_VERSION=$VERSION\n\nbasename=firmware-$1-$VERSION\n\npio run --environment $1 -t mtjson # -v\n\ncp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf\n\necho \"Copying uf2 file\"\ncp $BUILDDIR/$basename.uf2 $OUTDIR/$basename.uf2\n\necho \"Copying manifest\"\ncp $BUILDDIR/$basename.mt.json $OUTDIR/$basename.mt.json || true\n"
  },
  {
    "path": "bin/build-stm32wl.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\nVERSION=$(bin/buildinfo.py long)\nSHORT_VERSION=$(bin/buildinfo.py short)\n\nBUILDDIR=.pio/build/$1\nOUTDIR=release\n\nrm -f $OUTDIR/firmware*\nrm -r $OUTDIR/* || true\n\n# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale\nplatformio pkg install -e $1\n\necho \"Building for $1 with $PLATFORMIO_BUILD_FLAGS\"\nrm -f $BUILDDIR/firmware*\n\n# The shell vars the build tool expects to find\nexport APP_VERSION=$VERSION\n\nbasename=firmware-$1-$VERSION\n\npio run --environment $1 -t mtjson # -v\n\ncp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf\n\necho \"Copying STM32 bin file\"\ncp $BUILDDIR/$basename.bin $OUTDIR/$basename.bin\n\necho \"Copying manifest\"\ncp $BUILDDIR/$basename.mt.json $OUTDIR/$basename.mt.json || true\n"
  },
  {
    "path": "bin/build-userprefs-json.py",
    "content": "import json\nimport subprocess\nimport re\n\ndef get_macros_from_header(header_file):\n    # Run clang to preprocess the header file and capture the output\n    result = subprocess.run(['clang', '-E', '-dM', header_file], capture_output=True, text=True)\n    if result.returncode != 0:\n        raise RuntimeError(f\"Clang preprocessing failed: {result.stderr}\")\n\n    # Extract macros from the output\n    macros = {}\n    macro_pattern = re.compile(r'#define\\s+(\\w+)\\s+(.*)')\n    for line in result.stdout.splitlines():\n        match = macro_pattern.match(line) \n        if match and 'USERPREFS_' in line and '_USERPREFS_' not in line:\n            macros[match.group(1)] = match.group(2)\n\n    return macros\n\ndef write_macros_to_json(macros, output_file):\n    with open(output_file, 'w') as f:\n        json.dump(macros, f, indent=4)\n\ndef main():\n    header_file = 'userPrefs.h'\n    output_file = 'userPrefs.jsonc'\n    # Uncomment all macros in the header file\n    with open(header_file, 'r') as file:\n        lines = file.readlines()\n\n    uncommented_lines = []\n    for line in lines:\n        stripped_line = line.strip().replace('/*', '').replace('*/', '')\n        if stripped_line.startswith('//') and 'USERPREFS_' in stripped_line:\n            # Replace \"//\"\n            stripped_line = stripped_line.replace('//', '')\n        uncommented_lines.append(stripped_line + '\\n')\n\n    with open(header_file, 'w') as file:\n        for line in uncommented_lines:\n                file.write(line)\n    macros = get_macros_from_header(header_file)\n    write_macros_to_json(macros, output_file)\n    print(f\"Macros have been written to {output_file}\")\n\nif __name__ == \"__main__\":\n    main()"
  },
  {
    "path": "bin/buildinfo.py",
    "content": "#!/usr/bin/env python3\nimport sys\n\nfrom readprops import readProps\n\nverObj = readProps(\"version.properties\")\npropName = sys.argv[1]\nprint(f\"{verObj[propName]}\")\n"
  },
  {
    "path": "bin/bump_metainfo/bump_metainfo.py",
    "content": "#!/usr/bin/env python3\nimport argparse\nimport xml.etree.ElementTree as ET\nfrom defusedxml.ElementTree import parse\nfrom datetime import datetime, timezone\n\n\n# Indent by 2 spaces to align with xml formatting.\ndef indent(elem, level=0):\n    i = \"\\n\" + level * \"  \"\n    if len(elem):\n        if not elem.text or not elem.text.strip():\n            elem.text = i + \"  \"\n        for child in elem:\n            indent(child, level + 1)\n        if not child.tail or not child.tail.strip():\n            child.tail = i\n    if level and (not elem.tail or not elem.tail.strip()):\n        elem.tail = i\n\n\ndef main():\n    parser = argparse.ArgumentParser(\n        description=\"Prepend new release entry to metainfo.xml file.\")\n    parser.add_argument(\"--file\", help=\"Path to the metainfo.xml file\",\n                        default=\"org.meshtastic.meshtasticd.metainfo.xml\")\n    parser.add_argument(\"version\", help=\"Version string (e.g. 2.6.4)\")\n    parser.add_argument(\"--date\", help=\"Release date (YYYY-MM-DD), defaults to today\",\n                        default=datetime.now(timezone.utc).date().isoformat())\n\n    args = parser.parse_args()\n\n    tree = parse(args.file)\n    root = tree.getroot()\n\n    releases = root.find('releases')\n    if releases is None:\n        raise RuntimeError(\"<releases> element not found in XML.\")\n\n    existing_versions = {\n        release.get('version'): release\n        for release in releases.findall('release')\n    }\n    existing_release = existing_versions.get(args.version)\n\n    if existing_release is not None:\n        if not existing_release.get('date'):\n            print(f\"Version {args.version} found without date. Adding date...\")\n            existing_release.set('date', args.date)\n        else:\n            print(\n                f\"Version {args.version} is already present with date, skipping insertion.\")\n    else:\n        new_release = ET.Element('release', {\n            'version': args.version,\n            'date': args.date\n        })\n        url = ET.SubElement(new_release, 'url', {'type': 'details'})\n        url.text = f\"https://github.com/meshtastic/firmware/releases?q=tag%3Av{args.version}\"\n\n        releases.insert(0, new_release)\n\n        indent(releases, level=1)\n        releases.tail = \"\\n\"\n\n        print(f\"Inserted new release: {args.version}\")\n\n    tree.write(args.file, encoding='UTF-8', xml_declaration=True)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bin/bump_metainfo/requirements.txt",
    "content": "defusedxml==0.7.1\n"
  },
  {
    "path": "bin/bump_version.py",
    "content": "#!/usr/bin/env python\n\"\"\"Bump the version number\"\"\"\n\nlines = None\n\nwith open('version.properties', 'r', encoding='utf-8') as f:\n    lines = f.readlines()\n\nwith open('version.properties', 'w', encoding='utf-8') as f:\n    for line in lines:\n        if line.lstrip().startswith(\"build = \"):\n            words = line.split(\" = \")\n            ver = f'build = {int(words[1]) + 1}'\n            f.write(f'{ver}\\n')\n        else:\n            f.write(line)\n"
  },
  {
    "path": "bin/check-all.sh",
    "content": "#!/usr/bin/env bash\n\n# Note: This is a prototype for how we could add static code analysis to the CI.\n\nset -e\n\nVERSION=$(bin/buildinfo.py long)\n\n# The shell vars the build tool expects to find\nexport APP_VERSION=$VERSION\n\nif [[ $# -gt 0 ]]; then\n\t# can override which environment by passing arg\n\tBOARDS=\"$@\"\nelse\n\tBOARDS=\"tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 rak4631 rak4631_eink rak11200 t-echo canaryone pca10059_diy_eink\"\nfi\n\necho \"BOARDS:${BOARDS}\"\n\nCHECK=\"\"\nfor BOARD in $BOARDS; do\n\tCHECK=\"${CHECK} -e ${BOARD}\"\ndone\n\npio check --flags \"-DAPP_VERSION=${APP_VERSION} --suppressions-list=suppressions.txt --inline-suppr\" $CHECK --skip-packages --pattern=\"src/\" --fail-on-defect=low --fail-on-defect=medium --fail-on-defect=high\n"
  },
  {
    "path": "bin/check-dependencies.sh",
    "content": "#!/usr/bin/env bash\n\n# Note: This is a prototype for how we could add static code analysis to the CI.\n\nset -e\n\nif [[ $# -gt 0 ]]; then\n\t# can override which environment by passing arg\n\tBOARDS=\"$@\"\nelse\n\tBOARDS=\"rak4631 rak4631_eink t-echo canaryone pca10059_diy_eink pico rak11200 tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 nano-g1 station-g1 m5stack-core m5stack-coreink tbeam-s3-core\"\nfi\n\necho \"BOARDS:${BOARDS}\"\n\nCHECK=\"\"\nfor BOARD in $BOARDS; do\n\tCHECK=\"${CHECK} -e ${BOARD}\"\ndone\n\necho $CHECK\n\npio pkg outdated -e $CHECK\n"
  },
  {
    "path": "bin/config-dist.yaml",
    "content": "### Many device configs have been moved to /etc/meshtasticd/available.d\n### To activate, simply copy or link the appropriate file into /etc/meshtasticd/config.d\n\n### Define your devices here using Broadcom pin numbering\n### Uncomment the block that corresponds to your hardware\n### Including the \"Module:\" line!\n---\nLora:\n  # Default to auto-detecting the module type\n  # This will be overridden by configs from config.d\n  Module: auto\n\n#  # Uncomment to enable Simulation mode, or use --sim\n#  Module: sim\n\n#  Module: sx1262  # Waveshare SX1302 LISTEN ONLY AT THIS TIME!\n#  CS: 7\n#  IRQ: 17\n#  Reset: 22\n\n#  Module: RF95  # Elecrow Lora RFM95 IOT https://www.elecrow.com/lora-rfm95-iot-board-for-rpi.html\n#  Reset: 22\n#  CS: 7\n#  IRQ: 25\n\n#  Module: sx1280  # SX1280\n#  CS: 21\n#  IRQ: 16\n#  Busy: 20\n#  Reset: 18\n\n### The Radxa Zero 3E/W employs multiple gpio chips.\n### Each gpio pin must be unique, but can be assigned to a specific gpio chip and line.\n### In case solely a no. is given, the default gpio chip and pin == line will be employed.\n###\n#  Module: sx1262  # Radxa Zero 3E/W + Ebyte E22-900M30S\n#  DIO2_AS_RF_SWITCH: true\n#  DIO3_TCXO_VOLTAGE: 1.8\n#  CS:             # NSS     PIN_24 -> chip 4, line 22\n#    pin: 24\n#    gpiochip: 4\n#    line: 22\n#  SCK:            # SCK     PIN_23 -> chip 4, line 18\n#    pin: 23\n#    gpiochip: 4\n#    line: 18\n#  Busy:           # BUSY    PIN_29 -> chip 3!, line 11\n#    pin: 29\n#    gpiochip: 3\n#    line: 11\n#  MOSI:           # MOSI    PIN_19 -> chip 4, line 19\n#    pin: 19\n#    gpiochip: 4\n#    line: 19\n#  MISO:           # MISO    PIN_21 -> chip 4, line 21\n#    pin: 21\n#    gpiochip: 4\n#    line: 21\n#  Reset:          # NRST    PIN_27 -> chip 4, line 10\n#    pin: 27\n#    gpiochip: 4\n#    line: 10\n#  IRQ:            # DIO1    PIN_28 -> chip 4, line 11\n#    pin: 28\n#    gpiochip: 4\n#    line: 11\n#  RXen:           # RXEN    PIN_22 -> chip 3!, line 17\n#    pin: 22\n#    gpiochip: 3\n#    line: 17\n#  TXen: RADIOLIB_NC # TXEN   no PIN, no line, fallback to default gpio chip\n\n#  Module: sx1268  # SX1268-based modules, tested with Ebyte E22 400M33S\n#  CS: 21\n#  IRQ: 16\n#  Busy: 20\n#  Reset: 18\n#  TXen: 6\n#  RXen: 12\n#  DIO3_TCXO_VOLTAGE: true\n\n#  DIO3_TCXO_VOLTAGE: true  # the Waveshare Core1262 and others are known to need this setting\n\n#  TXen: x  # TX and RX enable pins\n#  RXen: x\n\n#  SX126X_MAX_POWER: 8  # Limit the output power to 8 dBm, useful for amped nodes\n\n#  spiSpeed: 2000000\n\n### Set default/fallback gpio chip to use in /dev/. Defaults to 0.\n### Notably the Raspberry Pi 5 puts the GPIO header on gpiochip4\n#  gpiochip: 4\n\n### Specify the SPI device to use in /dev/. Defaults to spidev0.0\n### Some devices, like the pinedio, may require spidev0.1 as a workaround.\n#  spidev: spidev0.0\n\n### Deprecated location for User Button:\n\n#GPIO:\n#  User: 6\n\n### Define GPS\n\nGPS:\n#  SerialPath: /dev/ttyS0\n#  ExtraPins:\n#    - 22\n\n### Specify I2C device, or leave blank for none\n\nI2C:\n#  I2CDevice: /dev/i2c-1\n\n### Set up SPI displays here. Note that I2C displays are generally auto-detected.\n\nDisplay:\n\n### Adafruit PiTFT 2.8 TFT+Touchscreen\n#  Panel: ILI9341\n#  CS: 8\n#  DC: 25\n#  Width: 240\n#  Height: 320\n#  Rotate: true\n\n### SHCHV 3.5 RPi TFT+Touchscreen\n#  Panel: ILI9486\n#  spidev: spidev0.0\n#  BusFrequency: 30000000\n#  DC: 24\n#  Reset: 25\n#  Width: 320\n#  Height: 480\n#  OffsetRotate: 2\n\n### TZT 2.0 Inch TFT Display ST7789V 240RGBx320\n#  Panel: ST7789\n#  spidev: spidev0.0\n#  # CS: 8     # can be freely chosen\n#  BusFrequency: 80000000\n#  DC: 24      # can be freely chosen\n#  Width: 320\n#  Height: 240\n#  Reset: 25   # can be freely chosen\n#  Rotate: true\n#  OffsetRotate: 1\n#  Invert: true\n\n### You can also specify the spi device for the display to use\n# spidev: spidev0.0\n\nTouchscreen:\n### Note, at least for now, the touchscreen must have a CS pin defined, even if you let Linux manage the CS switching.\n\n#  Module: STMPE610 # Option 1 for Adafruit PiTFT 2.8\n#  CS: 7\n#  IRQ: 24\n\n#  Module: FT5x06 # Option 2 for Adafruit PiTFT 2.8\n#  IRQ: 24\n#  I2CAddr: 0x38\n\n### You can also specify the spi device for the touchscreen to use\n# spidev: spidev0.0\n\n\nInput:\n### Configure device for direct keyboard input\n\n#  KeyboardDevice: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd\n\n### Standard User Button Config\n#  UserButton: 6\n\n### Trackball/Joystick input\n#  TrackballUp: 6\n#  TrackballDown: 19\n#  TrackballLeft: 5\n#  TrackballRight: 26\n#  TrackballPress: 13\n\n###\n\nLogging:\n  LogLevel: info # debug, info, warn, error\n#  TraceFile: /var/log/meshtasticd.json\n#  JSONFile: /packets.json # File location for JSON output of decoded packets\n#  JSONFileRotate: 60 # Rotate JSON file every N minutes, or 0 for no rotation\n#  JSONFilter: position # filter for packets to save to JSON file\n#  AsciiLogs: true     # default if not specified is !isatty() on stdout\n\nWebserver:\n#  Port: 9443 # Port for Webserver & Webservices\n#  RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer\n#  SSLKey: /etc/meshtasticd/ssl/private_key.pem # Path to SSL Key, generated if not present\n#  SSLCert: /etc/meshtasticd/ssl/certificate.pem # Path to SSL Certificate, generated if not present\n\n\nHostMetrics:\n#  ReportInterval: 30 # Interval in minutes between HostMetrics report packets, or 0 for disabled\n#  Channel: 0 # channel to send Host Metrics over. Defaults to the primary channel.\n#  UserStringCommand: cat /sys/firmware/devicetree/base/serial-number # Command to execute, to send the results as the userString\n\n\nConfig:\n#  DisplayMode: TWOCOLOR # uncomment to force BaseUI\n#  DisplayMode: COLOR # uncomment to force MUI\n\nGeneral:\n  MaxNodes: 200\n  MaxMessageQueue: 100\n  ConfigDirectory: /etc/meshtasticd/config.d/\n  AvailableDirectory: /etc/meshtasticd/available.d/\n#  MACAddress: AA:BB:CC:DD:EE:FF\n#  MACAddressSource: eth0\n#  APIPort: 4403\n"
  },
  {
    "path": "bin/config.d/MUI/X11_480x480.yaml",
    "content": "Display:\n  Panel: X11\n  Width: 480\n  Height: 480"
  },
  {
    "path": "bin/config.d/OpenWRT/BananaPi-BPI-R4-sx1262.yaml",
    "content": "Lora:\n  Module: sx1262  # BananaPi-BPI-R4 SPI via 26p GPIO Header\n##  CS: 28\n  IRQ: 50\n  Busy: 62\n  Reset: 51\n  spidev: spidev1.0\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n"
  },
  {
    "path": "bin/config.d/OpenWRT/OpenWRT-One-mikroBUS-LR-IOT-CLICK.yaml",
    "content": "##  https://www.mikroe.com/lr-iot-click\nLora:\n  Module: lr1110  # OpenWRT ONE mikroBUS with LR-IOT-CLICK\n#  CS: 25\n  IRQ: 10\n  Busy: 12\n#  Reset: 2\n  spidev: spidev2.0\n  DIO3_TCXO_VOLTAGE: 1.6\n"
  },
  {
    "path": "bin/config.d/OpenWRT/OpenWRT_One_mikroBUS_sx1262.yaml",
    "content": "Lora:\n  Module: sx1262\n  IRQ: 10\n  Busy: 12\n#  Reset: 2\n  spidev: spidev2.0\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n"
  },
  {
    "path": "bin/config.d/display-waveshare-1-44.yaml",
    "content": "### Waveshare 1.44inch LCD HAT\nDisplay:\n  Panel: ST7735S\n  spidev: spidev0.0  # Specify either the spidev here, or the CS below\n#  CS: 8         #Chip Select # Optional, as this is the default pin for spidev0.0\n  DC: 25        # Data/Command pin\n  Backlight: 24\n  Width: 128\n  Height: 128\n  Reset: 27\n  OffsetX: 2\n  OffsetY: 1\n\n\n#  OffsetY: 31  # These two options are used to properly flip the screen 180 degrees\n#  OffsetRotate: 3\n\n\nInput:\n  TrackballUp: 6\n  TrackballDown: 19\n  TrackballLeft: 5\n  TrackballRight: 26\n  TrackballPress: 13\n  TrackballDirection: FALLING\n#  User: 21\n"
  },
  {
    "path": "bin/config.d/display-waveshare-2.8.yaml",
    "content": "Display:\n\n### Waveshare 2.8inch RPi LCD\n  Panel: ST7789\n  CS: 8\n  DC: 22        # Data/Command pin\n  Backlight: 18\n  Width: 240\n  Height: 320\n  Reset: 27\n  Rotate: true\n  Invert: true\n\nTouchscreen:\n### Note, at least for now, the touchscreen must have a CS pin defined, even if you let Linux manage the CS switching.\n  Module: XPT2046 # Waveshare 2.8inch\n  CS: 7\n  IRQ: 17"
  },
  {
    "path": "bin/config.d/femtofox/femtofox_LR1121_TCXO.yaml",
    "content": "---\r\nLora:\r\n## Ebyte E80-900M22S\r\n## This is a bit experimental\r\n## \r\n##\r\n  Module: lr1121\r\n  gpiochip: 1 # subtract 32 from the gpio numbers\r\n  DIO3_TCXO_VOLTAGE: 1.8\r\n  CS: 16 #pin6 / GPIO48 1C0\r\n  IRQ: 23  #pin17 / GPIO55 1C7\r\n  Busy: 22 #pin16 / GPIO54 1C6\r\n  Reset: 25 #pin13 / GPIO57 1D1\r\n\r\n\r\n  spidev: spidev0.0 #pins are (CS=16, CLK=17, MOSI=18, MISO=19)\r\n  spiSpeed: 2000000\r\n  \r\nGeneral:\r\n  MACAddressSource: eth0\r\n"
  },
  {
    "path": "bin/config.d/femtofox/femtofox_SX1262_TCXO.yaml",
    "content": "---\r\nLora:\r\n## Ebyte E22-900M30S, E22-900M22S with or without external RF switching setup\r\n## HT-RA62 (Has internal switching, but whatever)\r\n## Seeed WIO SX1262 (already has TXEN-DIO2 link, but needs RXEN)\r\n## Will work with any module with or without RF switching, and with TCXO\r\n  Module: sx1262\r\n  gpiochip: 1 # subtract 32 from the gpio numbers\r\n  DIO2_AS_RF_SWITCH: true\r\n  DIO3_TCXO_VOLTAGE: true\r\n  CS: 16 #pin6 / GPIO48 1C0\r\n  IRQ: 23  #pin17 / GPIO55 1C7\r\n  Busy: 22 #pin16 / GPIO54 1C6\r\n  Reset: 25 #pin13 / GPIO57 1D1\r\n  RXen: 24 #pin12 / GPIO56 1D0 # Not strictly needed for auto-switching, but why complicate things?\r\n#  TXen: bridge to DIO2 on E22 module\r\n  spidev: spidev0.0 #pins are (CS=16, CLK=17, MOSI=18, MISO=19)\r\n  spiSpeed: 2000000\r\n  \r\nGeneral:\r\n  MACAddressSource: eth0\r\n"
  },
  {
    "path": "bin/config.d/femtofox/femtofox_SX1262_XTAL.yaml",
    "content": "---\r\nLora:\r\n## Ebyte E22-900MM22S with no external RF switching setup\r\n## Waveshare SX126X XXXM, AI Thinker RA-01SH\r\n## Will work with any module with or without RF switching and no TCXO\r\n\r\n  Module: sx1262  \r\n  gpiochip: 1 # subtract 32 from the gpio numbers\r\n  DIO2_AS_RF_SWITCH: true\r\n  DIO3_TCXO_VOLTAGE: false\r\n  CS: 16 #pin6 / GPIO48 1C0\r\n  IRQ: 23  #pin17 / GPIO55 1C7\r\n  Busy: 22 #pin16 / GPIO54 1C6\r\n  Reset: 25 #pin13 / GPIO57 1D1 \r\n  RXen: 24 #pin12 / GPIO56 1D0 # Not strictly needed for auto-switching, but why complicate things?\r\n#  TXen: bridge to DIO2 on E22 module\r\n  spidev: spidev0.0 #pins are (CS=16, CLK=17, MOSI=18, MISO=19)\r\n  spiSpeed: 2000000\r\n\r\nGeneral:\r\n  MACAddressSource: eth0\r\n"
  },
  {
    "path": "bin/config.d/lora-Adafruit-RFM9x.yaml",
    "content": "Lora:\n  Module: RF95  # Adafruit RFM9x\n  Reset: 25\n  CS: 7\n  IRQ: 22\n#  Busy: 23\n"
  },
  {
    "path": "bin/config.d/lora-MeshAdv-900M30S.yaml",
    "content": "# MeshAdv-Pi E22-900M30S\n# https://github.com/chrismyers2000/MeshAdv-Pi-Hat\nLora:\n  Module: sx1262\n  CS: 21\n  IRQ: 16\n  Busy: 20\n  Reset: 18\n  TXen: 13\n  RXen: 12\n  DIO3_TCXO_VOLTAGE: true\n  # Only for E22-900M33S:\n  # Limit the output power to 8 dBm\n  # SX126X_MAX_POWER: 8\n"
  },
  {
    "path": "bin/config.d/lora-MeshAdv-Mini-900M22S.yaml",
    "content": "# MeshAdv Mini E22-900M22S\n# https://github.com/chrismyers2000/MeshAdv-Mini\nLora:\n  Module: sx1262  # Ebyte E22-900M22S \n  CS: 8\n  IRQ: 16\n  Busy: 20\n  Reset: 24\n  RXen: 12\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n"
  },
  {
    "path": "bin/config.d/lora-RAK6421-13300-slot1.yaml",
    "content": "Lora:\n\n  ### RAK13300in Slot 1\n  Module: sx1262\n  IRQ: 22 #IO6\n  Reset: 16 # IO4\n  Busy: 24 # IO5\n  # Ant_sw: 13 # IO3 \n  Enable_Pins:\n    - 12\n    - 13\n  DIO3_TCXO_VOLTAGE: true\n  DIO2_AS_RF_SWITCH: true\n  spidev: spidev0.0\n  # CS: 8"
  },
  {
    "path": "bin/config.d/lora-RAK6421-13300-slot2.yaml",
    "content": "Lora:\n  ### RAK13300in Slot 2 pins\n  IRQ: 18 #IO6\n  Reset: 24 # IO4\n  Busy: 19 # IO5\n  # Ant_sw: 23 # IO3 \n  Enable_Pins:\n    - 26\n    - 23\n  spidev: spidev0.1\n  # CS: 7"
  },
  {
    "path": "bin/config.d/lora-RAK6421-13302-slot1.yaml",
    "content": "Lora:\n\n  ### RAK13300in Slot 1\n  Module: sx1262\n  IRQ: 22 #IO6\n  Reset: 16 # IO4\n  Busy: 24 # IO5\n  # Ant_sw: 13 # IO3 \n  Enable_Pins:\n    - 12\n    - 13\n  DIO3_TCXO_VOLTAGE: true\n  DIO2_AS_RF_SWITCH: true\n  spidev: spidev0.0\n  # CS: 8\n  TX_GAIN_LORA: [9, 9, 10, 11, 9, 8, 9, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 10, 9, 8]"
  },
  {
    "path": "bin/config.d/lora-RAK6421-13302-slot2.yaml",
    "content": "Lora:\n  ### RAK13300in Slot 2 pins\n  IRQ: 18 #IO6\n  Reset: 24 # IO4\n  Busy: 19 # IO5\n  # Ant_sw: 23 # IO3 \n  Enable_Pins:\n    - 26\n    - 23\n  spidev: spidev0.1\n  # CS: 7\n  TX_GAIN_LORA: [9, 9, 10, 11, 9, 8, 9, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 10, 9, 8]"
  },
  {
    "path": "bin/config.d/lora-hat-rak-6421-pi-hat.yaml",
    "content": "Lora:\n\n  ### RAK13300in Slot 1\n  Module: sx1262\n  IRQ: 22 #IO6\n  Reset: 16 # IO4\n  Busy: 24 # IO5\n  Enable_Pins:\n    - 12\n    - 13\n  DIO3_TCXO_VOLTAGE: true\n  DIO2_AS_RF_SWITCH: true\n  spidev: spidev0.0\n  # GPIO_DETECT_PA: 13\n  TX_GAIN_LORA: [9, 9, 10, 11, 9, 8, 9, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 10, 9, 8]"
  },
  {
    "path": "bin/config.d/lora-lyra-picocalc-wio-sx1262.yaml",
    "content": "Lora:\n  Module: sx1262\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  gpiochip: 0\n  MOSI: 12\n  MISO: 13\n  IRQ: 1\n  Busy: 23\n  Reset: 22\n  RXen: 0\n  gpiochip: 1\n  CS: 9\n  SCK: 11\n#  TXen: bridge to DIO2 on E22 module\n  SX126X_MAX_POWER: 22\n  spidev: spidev1.0\n  spiSpeed: 2000000\n"
  },
  {
    "path": "bin/config.d/lora-lyra-ultra_1w.yaml",
    "content": "# For use with Armbian luckfox-lyra-ultra-w\n# Enable overlay 'luckfox-lyra-ultra-w-spi0-cs0-spidev' with armbian-config\n# https://github.com/wehooper4/Meshtastic-Hardware/tree/main/Luckfox%20Ultra%20Hat\n# 1 Watt Lyra Ultra hat\nLora:\n  Module: sx1262\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  CS: 10\n  IRQ: 5\n  Busy: 11\n  Reset: 9\n  RXen: 14\n\n  spidev: spidev0.0 #pins are (CS=10, CLK=8, MOSI=6, MISO=7)\n  spiSpeed: 2000000\n"
  },
  {
    "path": "bin/config.d/lora-lyra-ultra_2w.yaml",
    "content": "# For use with Armbian luckfox-lyra-ultra-w\n# Enable overlay 'luckfox-lyra-ultra-w-spi0-cs0-spidev' with armbian-config\n# https://github.com/wehooper4/Meshtastic-Hardware/tree/main/Luckfox%20Ultra%20Hat\n# 2 Watt Lyra Ultra hat\nLora:\n  Module: sx1262\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  SX126X_MAX_POWER: 8\n  CS: 10\n  IRQ: 5\n  Busy: 11\n  Reset: 9\n  RXen: 14\n\n  spidev: spidev0.0 #pins are (CS=10, CLK=8, MOSI=6, MISO=7)\n  spiSpeed: 2000000\n"
  },
  {
    "path": "bin/config.d/lora-lyra-ws-raspberry-pi-pico-hat.yaml",
    "content": "# For use with Armbian luckfox-lyra // luckfox-lyra-plus\n# Enable overlay 'luckfox-lyra-plus-spi0-cs0_rmio13-spidev' with armbian-config\n# Waveshare LoRa HAT for Raspberry Pi Pico\n# https://www.waveshare.com/wiki/Pico-LoRa-SX1262\nLora:\n  Module: sx1262\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  spidev: spidev0.0\n  CS: # GPIO0_B5\n    pin: 13\n    gpiochip: 0\n    line: 13\n  IRQ: # GPIO1_C2\n    pin: 50\n    gpiochip: 1\n    line: 18\n  Busy: # GPIO0_B4\n    pin: 12\n    gpiochip: 0\n    line: 12\n  Reset: # GPIO0_A2\n    pin: 2\n    gpiochip: 0\n    line: 2\n"
  },
  {
    "path": "bin/config.d/lora-meshstick-1262.yaml",
    "content": "Lora:\n  Module: sx1262\n  CS: 0\n  IRQ: 6\n  Reset: 2\n  Busy: 4\n  spidev: ch341\n  DIO3_TCXO_VOLTAGE: true\n#  USB_Serialnum: 12345678\n  USB_PID: 0x5512\n  USB_VID: 0x1A86\n"
  },
  {
    "path": "bin/config.d/lora-piggystick-lr1121.yaml",
    "content": "Lora:\n  Module: lr1121\n  CS: 0\n  IRQ: 6\n  Reset: 2\n  Busy: 4\n  spidev: ch341\n  DIO3_TCXO_VOLTAGE: 1.8\n#  USB_Serialnum: 12345678\n  USB_PID: 0x5512\n  USB_VID: 0x1A86\n"
  },
  {
    "path": "bin/config.d/lora-pinedio-usb-sx1262.yaml",
    "content": "Lora:\n  Module: sx1262\n  CS: 0 \n  IRQ: 10\n  spidev: ch341"
  },
  {
    "path": "bin/config.d/lora-raxda-rock2f-starter-edition-hat.yaml",
    "content": "Lora:\n\n### Raxda Rock 2F running Armbian Linux 6.1.99-vendor-rk35xx\n### https://github.com/markbirss/rock-2f\n### https://github.com/markbirss/lora-starter-edition-sx1262-i2c\n### https://github.com/radxa-pkg/radxa-overlays/blob/main/arch/arm64/boot/dts/rockchip/overlays/rk3528-spi0-cs1-spidev.dts\n### Require install of https://github.com/radxa-pkg/radxa-overlays and rk3528-spi0-cs1-spidev.dtbo copied to /boot/dtb/rockchip/overlay and enabled \n### in  /boot/armbianEnv.txt - overlays=rk3528-spi0-cs1-spidev\n### The Radxa Rock 2F employs multiple gpio chips.\n### Each gpio pin must be unique, but can be assigned to a specific gpio chip and line.\n### In case solely a no. is given, the default gpio chip and pin == line will be employed.\n###\n  Module: sx1262  # Radxa Rock 2F + Starter Edition SX1262 HAT by Mark Birss\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: 1.8\n  spidev: spidev0.1\n  CS:             # NSS     PIN_24 -> chip 4, line 14\n    pin: 24\n    gpiochip: 4\n    line: 14\n  SCK:            # SCK     PIN_23 -> chip 4, line 12\n    pin: 23\n    gpiochip: 4\n    line: 12\n  Busy:           # BUSY    PIN_7 -> chip 4, line 6\n    pin: 7\n    gpiochip: 4\n    line: 6\n  MOSI:           # MOSI    PIN_19 -> chip 4, line 10\n    pin: 19\n    gpiochip: 4\n    line: 10\n  MISO:           # MISO    PIN_21 -> chip 4, line 11\n    pin: 21\n    gpiochip: 4\n    line: 11\n  Reset:          # NRST    PIN_12 -> chip 1, line 13\n    pin: 12\n    gpiochip: 1\n    line: 13\n  IRQ:            # DIO1    PIN_15 -> chip 4, line 22\n    pin: 15\n    gpiochip: 4\n    line: 22\n#  RXen:           # RXEN    PIN_22 -> chip 3!, line 17\n#    pin: 22\n#    gpiochip: 3\n#    line: 17\n#  TXen: RADIOLIB_NC # TXEN   no PIN, no line, fallback to default gpio chip\n"
  },
  {
    "path": "bin/config.d/lora-starter-edition-sx1262-i2c.yaml",
    "content": "# https://www.waveshare.com/core1262-868m.htm\n# https://github.com/markbirss/lora-starter-edition-sx1262-i2c\nLora:\n  Module: sx1262  # Starter Edition SX1262 I2C Raspberry Pi HAT\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  CS: 8\n  IRQ: 22\n  Busy: 4\n  Reset: 18\n"
  },
  {
    "path": "bin/config.d/lora-usb-meshstick-1262.yaml",
    "content": "Lora:\n  Module: sx1262\n  CS: 0\n  IRQ: 6\n  Reset: 2\n  Busy: 4\n  RXen: 1\n  DIO2_AS_RF_SWITCH: true\n  spidev: ch341\n  DIO3_TCXO_VOLTAGE: true\n#  USB_Serialnum: 12345678\n  USB_PID: 0x5512\n  USB_VID: 0x1A86\n  SX126X_MAX_POWER: 22"
  },
  {
    "path": "bin/config.d/lora-usb-meshtoad-e22.yaml",
    "content": "Lora:\n  Module: sx1262\n  CS: 0\n  IRQ: 6\n  Reset: 2\n  Busy: 4\n  RXen: 1\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  spidev: ch341\n  USB_PID: 0x5512\n  USB_VID: 0x1A86\n  # Optional: Reduce power to 10 dBm to\n  # avoid over-drawing the USB port\n  # SX126X_MAX_POWER: 10\n  # Optional: Set the serial number for multi-radio support\n  # USB_Serialnum: 13374201\n"
  },
  {
    "path": "bin/config.d/lora-usb-umesh-1262-30dbm.yaml",
    "content": "Lora:\n  Module: sx1262\n  CS: 0\n  IRQ: 6\n  Reset: 1\n  Busy: 4\n  RXen: 2\n  DIO2_AS_RF_SWITCH: true\n  spidev: ch341\n  USB_PID: 0x5512\n  USB_VID: 0x1A86\n  DIO3_TCXO_VOLTAGE: true\n#  USB_Serialnum: 12345678\n  SX126X_MAX_POWER: 22\n# Reduce output power to improve EMI\n  TX_GAIN_LORA: [12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 9, 8, 8, 7]\n# Note: This module integrates an additional PA to achieve higher output power.\n# The 'power' parameter here does not represent the actual RF output.\n# TX_GAIN_LORA defines the gain offset applied at each SX1262 input power step (1–22 dBm).\n# Each array element corresponds to the additional gain when that input level is set,\n# The effective RF output is: Pout ≈ Pset + TX_GAIN_LORA[index].\n# Please refer to https://github.com/linser233/uMesh/blob/main/RF_Power.md for detailed information.\n"
  },
  {
    "path": "bin/config.d/lora-usb-umesh-1268-30dbm.yaml",
    "content": "Lora:\n  Module: sx1268\n  CS: 0\n  IRQ: 6\n  Reset: 1\n  Busy: 4\n  RXen: 2\n  DIO2_AS_RF_SWITCH: true\n  spidev: ch341\n  USB_PID: 0x5512\n  USB_VID: 0x1A86\n  DIO3_TCXO_VOLTAGE: true\n#  USB_Serialnum: 12345678\n  SX126X_MAX_POWER: 22\n# Reduce output power to improve EMI\n  TX_GAIN_LORA: [12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 9, 8, 8, 7]\n# Note: This module integrates an additional PA to achieve higher output power.\n# The 'power' parameter here does not represent the actual RF output.\n# TX_GAIN_LORA defines the gain offset applied at each SX1262 input power step (1–22 dBm).\n# Each array element corresponds to the additional gain when that input level is set,\n# The effective RF output is: Pout ≈ Pset + TX_GAIN_LORA[index].\n# Please refer to https://github.com/linser233/uMesh/blob/main/RF_Power.md for detailed information.\n"
  },
  {
    "path": "bin/config.d/lora-waveshare-sxxx.yaml",
    "content": "Lora:\n  Module: sx1262  # Waveshare SX126X XXXM\n  DIO2_AS_RF_SWITCH: true\n  CS: 21\n  IRQ: 16\n  Busy: 20\n  Reset: 18\n  SX126X_ANT_SW: 6\n"
  },
  {
    "path": "bin/config.d/lora-ws-raspberry-pi-pico-to-rpi-adapter.yaml",
    "content": "# https://www.waveshare.com/pico-lora-sx1262-868m.htm\n# https://github.com/markbirss/lora-ws-raspberry-pi-pico-to-rpi-adapter\nLora:\n  Module: sx1262  # Waveshare Raspberry Pi Pico to Raspberry Pi HAT Adapter\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  CS: 21\n  IRQ: 16\n  Busy: 20\n  Reset: 18\n"
  },
  {
    "path": "bin/config.d/lora-ws-raspberry-pico-to-orangepi-03.yaml",
    "content": "# https://www.waveshare.com/pico-lora-sx1262-868m.htm\n# http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-3.html\n#\n# See Orange Pi Zero3 manual, chapter 3.16, page 124 for 26-pin header pinout\n#\n# Pin Connection\n# Waveshare       Orange Pi Zero3\n#   36    3.3V        17\n#   15    MOSI        19\n#   16    MISO        21  \n#   14    CLK         23\n#   38    GND         25\n#   4     BUSY        18\n#   20    RESET       22\n#   5     CS          24\n#   26    DIO1/IRQ    26\n\nLora:\n  Module: sx1262  # Waveshare Raspberry Pico Lora module\n  DIO2_AS_RF_SWITCH: true\n  DIO3_TCXO_VOLTAGE: true\n  # Specify either the spidev1_1 or the CS below, not both!\n  # On DietPi Linux, when using the user overlay dietpi-spi1_1.dtbo, CS will be configured with spidev1.1\n  spidev: spidev1.1 # See Orange Pi Zero3 manual, chapter 3.18.3, page 130\n#  CS:             # CS     PIN_24 -> chip 1, line 233\n#    pin: 24\n#    gpiochip: 1\n#    line: 233\n  SCK:            # SCK     PIN_23 -> chip 1, line 230\n    pin: 23\n    gpiochip: 1\n    line: 230\n  Busy:           # BUSY    PIN_18 -> chip 1, line 78\n    pin: 18\n    gpiochip: 1\n    line: 78\n  MOSI:           # MOSI    PIN_19 -> chip 1, line 231\n    pin: 19\n    gpiochip: 1\n    line: 231\n  MISO:           # MISO    PIN_21 -> chip 1, line 232\n    pin: 21\n    gpiochip: 1\n    line: 232\n  Reset:          # NRST    PIN_22 -> chip 1, line 71\n    pin: 22\n    gpiochip: 1\n    line: 71\n  IRQ:            # DIO1    PIN_26 -> chip 1, line 74\n    pin: 26\n    gpiochip: 1\n    line: 74\n"
  },
  {
    "path": "bin/device-install.bat",
    "content": "@ECHO OFF\r\nSETLOCAL EnableDelayedExpansion\r\nTITLE Meshtastic device-install\r\n\r\nSET \"SCRIPT_NAME=%~nx0\"\r\nSET \"DEBUG=0\"\r\nSET \"PYTHON=\"\r\nSET \"ESPTOOL_BAUD=115200\"\r\nSET \"ESPTOOL_CMD=\"\r\nSET \"LOGCOUNTER=0\"\r\nSET \"BPS_RESET=0\"\r\n@REM Default offsets.\r\n@REM https://github.com/meshtastic/web-flasher/blob/main/stores/firmwareStore.ts#L202\r\nSET \"OTA_OFFSET=0x260000\"\r\nSET \"SPIFFS_OFFSET=0x300000\"\r\n\r\nGOTO getopts\r\n:help\r\nECHO Flash image file to device, but first erasing and writing system information.\r\nECHO.\r\nECHO Usage: %SCRIPT_NAME% -f filename [-p PORT] [-P python] [--1200bps-reset]\r\nECHO.\r\nECHO Options:\r\nECHO     -f filename      The firmware .factory.bin file to flash.  Custom to your device type and region. (required)\r\nECHO                      The file must be located in this current directory.\r\nECHO     -p PORT          Set the environment variable for ESPTOOL_PORT.\r\nECHO                      If not set, ESPTOOL iterates all ports (Dangerous).\r\nECHO     -P python        Specify alternate python interpreter to use to invoke esptool. (default: python)\r\nECHO                      If supplied the script will use python.\r\nECHO                      If not supplied the script will try to find esptool in Path.\r\nECHO     --1200bps-reset  Attempt to place the device in correct mode. (1200bps Reset)\r\nECHO                      Some hardware requires this twice.\r\nECHO.\r\nECHO Example: %SCRIPT_NAME% -p COM17 --1200bps-reset\r\nECHO Example: %SCRIPT_NAME% -f firmware-t-deck-tft-2.6.0.0b106d4.factory.bin -p COM11\r\nECHO Example: %SCRIPT_NAME% -f firmware-unphone-2.6.0.0b106d4.factory.bin -p COM11\r\nGOTO eof\r\n\r\n:version\r\nECHO %SCRIPT_NAME% [Version 2.7.0]\r\nECHO Meshtastic\r\nGOTO eof\r\n\r\n:getopts\r\nIF \"%~1\"==\"\" GOTO endopts\r\nIF /I \"%~1\"==\"-?\" GOTO help\r\nIF /I \"%~1\"==\"-h\" GOTO help\r\nIF /I \"%~1\"==\"--help\" GOTO help\r\nIF /I \"%~1\"==\"-v\" GOTO version\r\nIF /I \"%~1\"==\"--version\" GOTO version\r\nIF /I \"%~1\"==\"--debug\" SET \"DEBUG=1\" & CALL :LOG_MESSAGE DEBUG \"DEBUG mode: enabled.\"\r\nIF /I \"%~1\"==\"-f\" SET \"FILENAME=%~2\" & SHIFT\r\nIF \"%~1\"==\"-p\" SET \"ESPTOOL_PORT=%~2\" & SHIFT\r\nIF /I \"%~1\"==\"--port\" SET \"ESPTOOL_PORT=%~2\" & SHIFT\r\nIF \"%~1\"==\"-P\" SET \"PYTHON=%~2\" & SHIFT\r\nIF /I \"%~1\"==\"--1200bps-reset\" SET \"BPS_RESET=1\"\r\nSHIFT\r\nGOTO getopts\r\n:endopts\r\n\r\nIF %BPS_RESET% EQU 1 GOTO skip-filename\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking FILENAME parameter...\"\r\nIF \"__!FILENAME!__\"==\"____\" (\r\n    CALL :LOG_MESSAGE DEBUG \"Missing -f filename input.\"\r\n    GOTO help\r\n) ELSE (\r\n    CALL :LOG_MESSAGE DEBUG \"Filename: !FILENAME!\"\r\n    IF NOT \"__!FILENAME: =!__\"==\"__!FILENAME!__\" (\r\n        CALL :LOG_MESSAGE ERROR \"Filename containing spaces are not supported.\"\r\n        GOTO help\r\n    )\r\n    IF NOT \"__!FILENAME:.factory.bin=!__\"==\"__!FILENAME!__\" (\r\n        CALL :LOG_MESSAGE ERROR \"Filename must be a firmware-*.factory.bin file.\"\r\n        GOTO help\r\n    )\r\n    @REM Remove \".\\\" or \"./\" file prefix if present.\r\n    SET \"FILENAME=!FILENAME:.\\=!\"\r\n    SET \"FILENAME=!FILENAME:./=!\"\r\n)\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking if !FILENAME! exists...\"\r\nIF NOT EXIST !FILENAME! (\r\n    CALL :LOG_MESSAGE ERROR \"File does not exist: !FILENAME!. Terminating.\"\r\n    GOTO eof\r\n)\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking for metadata...\"\r\n@REM Derive metadata filename from firmware filename.\r\nSET \"METAFILE=!FILENAME:.factory.bin=!.mt.json\"\r\nIF EXIST !METAFILE! (\r\n    @REM Print parsed json with powershell\r\n    CALL :LOG_MESSAGE INFO \"Firmware metadata: !METAFILE!\"\r\n    powershell -NoProfile -Command \"(Get-Content '!METAFILE!' | ConvertFrom-Json | Out-String).Trim()\"\r\n\r\n    @REM Save metadata values to variables for later use.\r\n    FOR /f \"usebackq\" %%A IN (`powershell -NoProfile -Command ^\r\n        \"(Get-Content '!METAFILE!' | ConvertFrom-Json).mcu\"`) DO SET \"MCU=%%A\"\r\n    FOR /f \"usebackq\" %%A IN (`powershell -NoProfile -Command ^\r\n        \"(Get-Content '!METAFILE!' | ConvertFrom-Json).part | Where-Object { $_.subtype -eq 'ota_1' } | Select-Object -ExpandProperty offset\"`\r\n    ) DO SET \"OTA_OFFSET=%%A\"\r\n    FOR /f \"usebackq\" %%A IN (`powershell -NoProfile -Command ^\r\n        \"(Get-Content '!METAFILE!' | ConvertFrom-Json).part | Where-Object { $_.subtype -eq 'spiffs' } | Select-Object -ExpandProperty offset\"`\r\n    ) DO SET \"SPIFFS_OFFSET=%%A\"\r\n) ELSE (\r\n    CALL :LOG_MESSAGE ERROR \"No metadata file found: !METAFILE!\"\r\n    GOTO eof\r\n)\r\n\r\n:skip-filename\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Determine the correct esptool command to use...\"\r\nIF NOT \"__%PYTHON%__\"==\"____\" (\r\n    SET \"ESPTOOL_CMD=!PYTHON! -m esptool\"\r\n    CALL :LOG_MESSAGE DEBUG \"Python interpreter supplied.\"\r\n) ELSE (\r\n    CALL :LOG_MESSAGE DEBUG \"Python interpreter NOT supplied. Looking for esptool...\"\r\n    WHERE esptool >nul 2>&1\r\n    IF %ERRORLEVEL% EQU 0 (\r\n        @REM WHERE exits with code 0 if esptool is found.\r\n        SET \"ESPTOOL_CMD=esptool\"\r\n    ) ELSE (\r\n        SET \"ESPTOOL_CMD=python -m esptool\"\r\n        CALL :RESET_ERROR\r\n    )\r\n)\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking esptool command !ESPTOOL_CMD!...\"\r\n!ESPTOOL_CMD! >nul 2>&1\r\nIF %ERRORLEVEL% EQU 9009 (\r\n    @REM 9009 = command not found on Windows\r\n    CALL :LOG_MESSAGE ERROR \"esptool not found: !ESPTOOL_CMD!\"\r\n    EXIT /B 1\r\n)\r\nIF %DEBUG% EQU 1 (\r\n    CALL :LOG_MESSAGE DEBUG \"Skipping ESPTOOL_CMD steps.\"\r\n    SET \"ESPTOOL_CMD=REM !ESPTOOL_CMD!\"\r\n)\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Using esptool command: !ESPTOOL_CMD!\"\r\nIF \"__!ESPTOOL_PORT!__\" == \"____\" (\r\n    CALL :LOG_MESSAGE WARN \"Using esptool port: UNSET.\"\r\n) ELSE (\r\n    SET \"ESPTOOL_CMD=!ESPTOOL_CMD! --port !ESPTOOL_PORT!\"\r\n    CALL :LOG_MESSAGE INFO \"Using esptool port: !ESPTOOL_PORT!.\"\r\n)\r\nCALL :LOG_MESSAGE INFO \"Using esptool baud: !ESPTOOL_BAUD!.\"\r\n\r\nIF %BPS_RESET% EQU 1 (\r\n    @REM Attempt to change mode via 1200bps Reset.\r\n    CALL :RUN_ESPTOOL 1200 --after no_reset read_flash_status\r\n    GOTO eof\r\n)\r\n\r\n@REM Extract PROGNAME from %FILENAME% for later use.\r\nSET \"PROGNAME=!FILENAME:.factory.bin=!\"\r\nCALL :LOG_MESSAGE DEBUG \"Computed PROGNAME: !PROGNAME!\"\r\n\r\n@REM Determine OTA filename based on MCU type (unified OTA format)\r\nSET \"OTA_FILENAME=mt-!MCU!-ota.bin\"\r\nCALL :LOG_MESSAGE DEBUG \"Set OTA_FILENAME to: !OTA_FILENAME!\"\r\n\r\n@REM Set SPIFFS filename with \"littlefs-\" prefix.\r\nSET \"SPIFFS_FILENAME=littlefs-!PROGNAME:firmware-=!.bin\"\r\nCALL :LOG_MESSAGE DEBUG \"Set SPIFFS_FILENAME to: !SPIFFS_FILENAME!\"\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Set OTA_OFFSET to: !OTA_OFFSET!\"\r\nCALL :LOG_MESSAGE DEBUG \"Set SPIFFS_OFFSET to: !SPIFFS_OFFSET!\"\r\n\r\n@REM Ensure target files exist before flashing operations.\r\nIF NOT EXIST !FILENAME! CALL :LOG_MESSAGE ERROR \"File does not exist: \"!FILENAME!\". Terminating.\" & EXIT /B 2 & GOTO eof\r\nIF NOT EXIST !OTA_FILENAME! CALL :LOG_MESSAGE ERROR \"File does not exist: \"!OTA_FILENAME!\". Terminating.\" & EXIT /B 2 & GOTO eof\r\nIF NOT EXIST !SPIFFS_FILENAME! CALL :LOG_MESSAGE ERROR \"File does not exist: \"!SPIFFS_FILENAME!\". Terminating.\" & EXIT /B 2 & GOTO eof\r\n\r\n@REM Flashing operations.\r\nCALL :LOG_MESSAGE INFO \"Trying to flash \"!FILENAME!\", but first erasing and writing system information...\"\r\nCALL :RUN_ESPTOOL !ESPTOOL_BAUD! erase_flash || GOTO eof\r\nCALL :RUN_ESPTOOL !ESPTOOL_BAUD! write_flash 0x00 \"!FILENAME!\" || GOTO eof\r\n\r\nCALL :LOG_MESSAGE INFO \"Trying to flash BLEOTA \"!OTA_FILENAME!\" at OTA_OFFSET !OTA_OFFSET!...\"\r\nCALL :RUN_ESPTOOL !ESPTOOL_BAUD! write_flash !OTA_OFFSET! \"!OTA_FILENAME!\" || GOTO eof\r\n\r\nCALL :LOG_MESSAGE INFO \"Trying to flash SPIFFS \"!SPIFFS_FILENAME!\" at SPIFFS_OFFSET !SPIFFS_OFFSET!...\"\r\nCALL :RUN_ESPTOOL !ESPTOOL_BAUD! write_flash !SPIFFS_OFFSET! \"!SPIFFS_FILENAME!\" || GOTO eof\r\n\r\nCALL :LOG_MESSAGE INFO \"Script complete!.\"\r\n\r\n:eof\r\nENDLOCAL\r\nEXIT /B %ERRORLEVEL%\r\n\r\n\r\n:RUN_ESPTOOL\r\n@REM Subroutine used to run ESPTOOL_CMD with arguments.\r\n@REM Also handles %ERRORLEVEL%.\r\n@REM CALL :RUN_ESPTOOL [Baud] [erase_flash|write_flash] [OFFSET] [Filename]\r\n@REM.\r\n@REM Example:: CALL :RUN_ESPTOOL 115200 write_flash 0x10000 \"firmwarefile.bin\"\r\nIF %DEBUG% EQU 1 CALL :LOG_MESSAGE DEBUG \"About to run command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4\"\r\nCALL :RESET_ERROR\r\n!ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4\r\nIF %BPS_RESET% EQU 1 GOTO :eof\r\nIF %ERRORLEVEL% NEQ 0 (\r\n    CALL :LOG_MESSAGE ERROR \"Error running command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4\"\r\n    EXIT /B %ERRORLEVEL%\r\n)\r\nGOTO :eof\r\n\r\n:LOG_MESSAGE\r\n@REM Subroutine used to print log messages in four different levels.\r\n@REM DEBUG messages only get printed if [-d] flag is passed to script.\r\n@REM CALL :LOG_MESSAGE [ERROR|INFO|WARN|DEBUG] \"Message\"\r\n@REM.\r\n@REM Example:: CALL :LOG_MESSAGE INFO \"Message.\"\r\nSET /A LOGCOUNTER=LOGCOUNTER+1\r\nIF \"%1\" == \"ERROR\" CALL :GET_TIMESTAMP & ECHO \u001b[91m%1 \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[91m%~2\u001b[0m\r\nIF \"%1\" == \"INFO\" CALL :GET_TIMESTAMP & ECHO \u001b[32m%1  \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[32m%~2\u001b[0m\r\nIF \"%1\" == \"WARN\" CALL :GET_TIMESTAMP & ECHO \u001b[33m%1  \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[33m%~2\u001b[0m\r\nIF \"%1\" == \"DEBUG\" IF %DEBUG% EQU 1 CALL :GET_TIMESTAMP & ECHO \u001b[34m%1 \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[34m%~2\u001b[0m\r\nGOTO :eof\r\n\r\n:GET_TIMESTAMP\r\n@REM Subroutine used to set !TIMESTAMP! to HH:MM:ss.\r\n@REM CALL :GET_TIMESTAMP\r\n@REM.\r\n@REM Updates: !TIMESTAMP!\r\nFOR /F \"tokens=1,2,3 delims=:,.\" %%a IN (\"%TIME%\") DO (\r\n    SET \"HH=%%a\"\r\n    SET \"MM=%%b\"\r\n    SET \"ss=%%c\"\r\n)\r\nSET \"TIMESTAMP=!HH!:!MM!:!ss!\"\r\nGOTO :eof\r\n\r\n:RESET_ERROR\r\n@REM Subroutine to reset %ERRORLEVEL% to 0.\r\n@REM CALL :RESET_ERROR\r\n@REM.\r\n@REM Updates: %ERRORLEVEL%\r\nEXIT /B 0\r\nGOTO :eof\r\n"
  },
  {
    "path": "bin/device-install.sh",
    "content": "#!/usr/bin/env bash\n\nPYTHON=${PYTHON:-$(which python3 python | head -n 1)}\nBPS_RESET=false\nMCU=\"\"\n\n# Constants\nRESET_BAUD=1200\nFIRMWARE_OFFSET=0x00\n# Default littlefs* offset.\nOFFSET=0x300000\n# Default OTA Offset\nOTA_OFFSET=0x260000\n\n# Determine the correct esptool command to use\nif \"$PYTHON\" -m esptool version >/dev/null 2>&1; then\n    ESPTOOL_CMD=\"$PYTHON -m esptool\"\nelif command -v esptool >/dev/null 2>&1; then\n    ESPTOOL_CMD=\"esptool\"\nelif command -v esptool.py >/dev/null 2>&1; then\n    ESPTOOL_CMD=\"esptool.py\"\nelse\n    echo \"Error: esptool not found\"\n    exit 1\nfi\n\n# Check for jq\nif ! command -v jq >/dev/null 2>&1; then\n    echo \"Error: jq not found\" >&2\n    echo \"Install jq with your package manager.\" >&2\n    echo \"e.g. 'apt install jq', 'dnf install jq', 'brew install jq', etc.\" >&2\n    exit 1\nfi\n\n# esptool v5 supports commands with dashes and deprecates commands with\n# underscores. Prior versions only support commands with underscores\nif ${ESPTOOL_CMD} | grep --quiet write-flash\nthen\n    ESPTOOL_WRITE_FLASH=write-flash\n    ESPTOOL_ERASE_FLASH=erase-flash\n    ESPTOOL_READ_FLASH_STATUS=read-flash-status\nelse\n    ESPTOOL_WRITE_FLASH=write_flash\n    ESPTOOL_ERASE_FLASH=erase_flash\n    ESPTOOL_READ_FLASH_STATUS=read_flash_status\nfi\n\nset -e\n\n# Usage info\nshow_help() {\n    cat <<EOF\nUsage: $(basename \"$0\") [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME] [--1200bps-reset]\nFlash image file to device, but first erasing and writing system information.\n\n    -h               Display this help and exit.\n    -p ESPTOOL_PORT  Set the environment variable for ESPTOOL_PORT.  If not set, ESPTOOL iterates all ports (Dangerous).\n    -P PYTHON        Specify alternate python interpreter to use to invoke esptool. (Default: \"$PYTHON\")\n    -f FILENAME      The firmware *.factory.bin file to flash.  Custom to your device type and region.\n    --1200bps-reset  Attempt to place the device in correct mode. Some hardware requires this twice. (1200bps Reset)\n\nEOF\n}\n# Parse arguments using a single while loop\nwhile [ $# -gt 0 ]; do\n    case \"$1\" in\n    -h | --help)\n        show_help\n        exit 0\n        ;;\n    -p)\n        ESPTOOL_CMD=\"$ESPTOOL_CMD --port $2\"\n        shift\n        ;;\n    -P)\n        PYTHON=\"$2\"\n        shift\n        ;;\n    -f)\n        FILENAME=\"$2\"\n        shift\n        ;;\n    --1200bps-reset)\n        BPS_RESET=true\n        ;;\n    --) # Stop parsing options\n        shift\n        break\n        ;;\n    *)\n        echo \"Unknown argument: $1\" >&2\n        exit 1\n        ;;\n    esac\n    shift # Move to the next argument\ndone\n\nif [[ $BPS_RESET == true ]]; then\n    $ESPTOOL_CMD --baud $RESET_BAUD --after no_reset ${ESPTOOL_READ_FLASH_STATUS}\n    exit 0\nfi\n\n[ -z \"$FILENAME\" ] && [ -n \"$1\" ] && {\n    FILENAME=\"$1\"\n    shift\n}\n\nif [[ $(basename \"$FILENAME\") != firmware-*.factory.bin ]]; then\n  echo \"Filename must be a firmware-*.factory.bin file.\"\n  exit 1\nfi\n\n# Extract PROGNAME from %FILENAME% for later use.\nPROGNAME=\"${FILENAME/.factory.bin/}\"\n# Derive metadata filename from %PROGNAME%.\nMETAFILE=\"${PROGNAME}.mt.json\"\n\nif [[ -f \"$FILENAME\" && \"$FILENAME\" == *.factory.bin ]]; then\n    # Display metadata if it exists\n    if [[ -f \"$METAFILE\" ]]; then\n        echo \"Firmware metadata: ${METAFILE}\"\n        jq . \"$METAFILE\"\n        # Extract relevant fields from metadata\n        if [[ $(jq -r '.part' \"$METAFILE\") != \"null\" ]]; then\n            OTA_OFFSET=$(jq -r '.part[] | select(.subtype == \"ota_1\") | .offset' \"$METAFILE\")\n            SPIFFS_OFFSET=$(jq -r '.part[] | select(.subtype == \"spiffs\") | .offset' \"$METAFILE\")\n        fi\n        MCU=$(jq -r '.mcu' \"$METAFILE\")\n    else\n        echo \"ERROR: No metadata file found at ${METAFILE}\"\n        exit 1\n    fi\n\n    # Determine OTA filename based on MCU type (unified OTA format)\n    OTAFILE=\"mt-${MCU}-ota.bin\"\n\n    # Set SPIFFS filename with \"littlefs-\" prefix.\n    SPIFFSFILE=\"littlefs-${PROGNAME/firmware-/}.bin\"\n\n    if [[ ! -f \"$FILENAME\" ]]; then\n        echo \"Error: file ${FILENAME} wasn't found. Terminating.\"\n        exit 1\n    fi\n    if [[ ! -f \"$OTAFILE\" ]]; then\n        echo \"Error: file ${OTAFILE} wasn't found. Terminating.\"\n        exit 1\n    fi\n    if [[ ! -f \"$SPIFFSFILE\" ]]; then\n        echo \"Error: file ${SPIFFSFILE} wasn't found. Terminating.\"\n        exit 1\n    fi\n\n    echo \"Trying to flash ${FILENAME}, but first erasing and writing system information\"\n    $ESPTOOL_CMD ${ESPTOOL_ERASE_FLASH}\n    $ESPTOOL_CMD ${ESPTOOL_WRITE_FLASH} $FIRMWARE_OFFSET \"${FILENAME}\"\n    echo \"Trying to flash ${OTAFILE} at offset ${OTA_OFFSET}\"\n    $ESPTOOL_CMD ${ESPTOOL_WRITE_FLASH} $OTA_OFFSET \"${OTAFILE}\"\n    echo \"Trying to flash ${SPIFFSFILE}, at offset ${OFFSET}\"\n    $ESPTOOL_CMD ${ESPTOOL_WRITE_FLASH} $OFFSET \"${SPIFFSFILE}\"\n\nelse\n    show_help\n    echo \"Invalid file: ${FILENAME}\"\nfi\n\nexit 0\n"
  },
  {
    "path": "bin/device-install_test.ps1",
    "content": "<#\r\n    .SYNOPSIS\r\n    Unit-test for .\\device-install.bat.\r\n\r\n    .DESCRIPTION\r\n    This script performs a positive unit-test on .\\device-install.bat by creating the expected .bin\r\n    files for a device followed by running the .bat script without flashing the firmware (--debug).\r\n    If any errors are hit they are presented in the standard output. Investigate accordingly.\r\n\r\n    This script needs to be placed in the same directory as .\\device-install.bat.\r\n\r\n    .EXAMPLE\r\n    .\\device-install_test.ps1\r\n\r\n    .EXAMPLE\r\n    .\\device-install_test.ps1 -Verbose\r\n\r\n    .LINK\r\n    .\\device-install.bat --help\r\n#>\r\n\r\n[CmdletBinding()]\r\nparam()\r\n\r\nfunction New-EmptyFile() {\r\n    [CmdletBinding()]\r\n    param (\r\n        [Parameter(Position = 0, Mandatory = $true)]\r\n        # Specifies the file name.\r\n        [string]$FileName,\r\n        [Parameter(Position = 1)]\r\n        # Specifies the target path. (Get-Location).Path is the default.\r\n        [string]$Directory = (Get-Location).Path\r\n    )\r\n\r\n    $filePath = Join-Path -Path $Directory -ChildPath $FileName\r\n\r\n    Write-Verbose -Message \"Create empty test file if it doesn't exist: $($FileName)\"\r\n    New-Item -Path \"$filePath\" -ItemType File -ErrorAction SilentlyContinue | Out-Null\r\n}\r\n\r\nfunction Remove-EmptyFile() {\r\n    [CmdletBinding()]\r\n    param (\r\n        [Parameter(Position = 0, Mandatory = $true)]\r\n        # Specifies the file name.\r\n        [string]$FileName,\r\n        [Parameter(Position = 1)]\r\n        # Specifies the target path. (Get-Location).Path is the default.\r\n        [string]$Directory = (Get-Location).Path\r\n    )\r\n\r\n    $filePath = Join-Path -Path $Directory -ChildPath $FileName\r\n\r\n    Write-Verbose -Message \"Deleted empty test file: $($FileName)\"\r\n    Remove-Item -Path \"$filePath\" | Out-Null\r\n}\r\n\r\n\r\n$TestCases = New-Object -TypeName PSObject -Property @{\r\n    # Use this PSObject to define testcases according to this syntax:\r\n    # \"testname\" = @(\"firmware-testname\",\"bleota\",\"littlefs-testname\",\"args\")\r\n    \"t-deck\"                       = @(\"firmware-t-deck-2.6.0.0b106d4.bin\", \"bleota-s3.bin\", \"littlefs-t-deck-2.6.0.0b106d4.bin\", \"\")\r\n    \"t-deck_web\"                   = @(\"firmware-t-deck-2.6.0.0b106d4.bin\", \"bleota-s3.bin\", \"littlefswebui-t-deck-2.6.0.0b106d4.bin\", \"--web\")\r\n    \"t-deck-tft\"                   = @(\"firmware-t-deck-tft-2.6.0.0b106d4.bin\", \"bleota-s3.bin\", \"littlefs-t-deck-tft-2.6.0.0b106d4.bin\", \"\")\r\n    \"heltec-ht62-esp32c3\"          = @(\"firmware-heltec-ht62-esp32c3-sx1262-2.6.0.0b106d4.bin\", \"bleota-c3.bin\", \"littlefs-heltec-ht62-esp32c3-sx1262-2.6.0.0b106d4.bin\", \"\")\r\n    \"tlora-c6\"                     = @(\"firmware-tlora-c6-2.6.0.0b106d4.bin\", \"bleota.bin\", \"littlefs-tlora-c6-2.6.0.0b106d4.bin\", \"\")\r\n    \"heltec-v3_web\"                = @(\"firmware-heltec-v3-2.6.0.0b106d4.bin\", \"bleota-s3.bin\", \"littlefswebui-heltec-v3-2.6.0.0b106d4.bin\", \"--web\")\r\n    \"seeed-sensecap-indicator-tft\" = @(\"firmware-seeed-sensecap-indicator-tft-2.6.0.0b106d4.bin\", \"bleota.bin\", \"littlefs-seeed-sensecap-indicator-tft-2.6.0.0b106d4.bin\", \"\")\r\n    \"picomputer-s3-tft\"            = @(\"firmware-picomputer-s3-tft-2.6.0.0b106d4.bin\", \"bleota-s3.bin\", \"littlefs-picomputer-s3-tft-2.6.0.0b106d4.bin\", \"\")\r\n}\r\n\r\nforeach ($TestCase in $TestCases.PSObject.Properties) {\r\n    $Name = $TestCase.Name\r\n    $Files = $TestCase.Value\r\n    $Errors = $null\r\n    $Counter = 0\r\n\r\n    Write-Host -Object \"Testcase: $Name`:\" -ForegroundColor Green\r\n    foreach ($File in $Files) {\r\n        if ($File.EndsWith(\".bin\")) {\r\n            New-EmptyFile -FileName $File\r\n        }\r\n    }\r\n\r\n    Write-Host -Object \"Performing test on $Name...\" -ForegroundColor Blue\r\n    $Test = Invoke-Expression -Command \"cmd /c .\\device-install.bat --debug -f $($TestCases.\"$Name\"[0]) $($TestCases.\"$Name\"[3])\"\r\n\r\n    foreach ($Line in $Test) {\r\n        if ($Line -match \"Set OTA_OFFSET to\" -or `\r\n                $Line -match \"Set SPIFFS_OFFSET to\") {\r\n            Write-Host -Object \"$($Line -replace \"^.*?Set\",\"Set\")\" -ForegroundColor Blue\r\n        }\r\n        elseif ($VerbosePreference -eq \"Continue\") {\r\n            Write-Host -Object $Line\r\n        }\r\n        if ($Line -match \"ERROR\") {\r\n            $Errors += $Line\r\n            $Counter++\r\n        }\r\n    }\r\n    if ($null -ne $Errors) {\r\n        Write-Host -Object \"$Counter ERROR(s) detected!\" -ForegroundColor Red\r\n        if (-not ($VerbosePreference -eq \"Continue\")) { Write-Host -Object $Errors }\r\n    }\r\n\r\n    foreach ($File in $Files) {\r\n        if ($File.EndsWith(\".bin\")) {\r\n            Remove-EmptyFile -FileName $File\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "bin/device-update.bat",
    "content": "@ECHO OFF\r\nSETLOCAL EnableDelayedExpansion\r\nTITLE Meshtastic device-update\r\n\r\nSET \"SCRIPT_NAME=%~nx0\"\r\nSET \"DEBUG=0\"\r\nSET \"PYTHON=\"\r\nSET \"ESPTOOL_BAUD=115200\"\r\nSET \"RESET_BAUD=1200\"\r\nSET \"UPDATE_OFFSET=0x10000\"\r\nSET \"ESPTOOL_CMD=\"\r\nSET \"LOGCOUNTER=0\"\r\nSET \"CHANGE_MODE=0\"\r\n\r\nGOTO getopts\r\n:help\r\nECHO Flash image file to device, but leave existing system intact.\r\nECHO.\r\nECHO Usage: %SCRIPT_NAME% -f filename [-p PORT] [-P python] [--change-mode]\r\nECHO.\r\nECHO Options:\r\nECHO     -f filename      The update .bin file to flash.  Custom to your device type and region. (required)\r\nECHO                      The file must be located in this current directory.\r\nECHO     -p PORT          Set the environment variable for ESPTOOL_PORT.\r\nECHO                      If not set, ESPTOOL iterates all ports (Dangerous).\r\nECHO     -P python        Specify alternate python interpreter to use to invoke esptool. (default: python)\r\nECHO                      If supplied the script will use python.\r\nECHO                      If not supplied the script will try to find esptool in Path.\r\nECHO     --change-mode    Attempt to place the device in correct mode. (1200bps Reset)\r\nECHO                      Some hardware requires this twice.\r\nECHO.\r\nECHO Example: %SCRIPT_NAME% -p COM17 --change-mode\r\nECHO Example: %SCRIPT_NAME% -f firmware-t-deck-tft-2.6.0.0b106d4.bin -p COM11\r\nGOTO eof\r\n\r\n:version\r\nECHO %SCRIPT_NAME% [Version 2.7.0]\r\nECHO Meshtastic\r\nGOTO eof\r\n\r\n:getopts\r\nIF \"%~1\"==\"\" GOTO endopts\r\nIF /I \"%~1\"==\"-?\" GOTO help\r\nIF /I \"%~1\"==\"-h\" GOTO help\r\nIF /I \"%~1\"==\"--help\" GOTO help\r\nIF /I \"%~1\"==\"-v\" GOTO version\r\nIF /I \"%~1\"==\"--version\" GOTO version\r\nIF /I \"%~1\"==\"--debug\" SET \"DEBUG=1\" & CALL :LOG_MESSAGE DEBUG \"DEBUG mode: enabled.\"\r\nIF /I \"%~1\"==\"-f\" SET \"FILENAME=%~2\" & SHIFT\r\nIF \"%~1\"==\"-p\" SET \"ESPTOOL_PORT=%~2\" & SHIFT\r\nIF /I \"%~1\"==\"--port\" SET \"ESPTOOL_PORT=%~2\" & SHIFT\r\nIF \"%~1\"==\"-P\" SET \"PYTHON=%~2\" & SHIFT\r\nIF /I \"%~1\"==\"--change-mode\" SET \"CHANGE_MODE=1\"\r\nSHIFT\r\nGOTO getopts\r\n:endopts\r\n\r\nIF %CHANGE_MODE% EQU 1 GOTO skip-filename\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking FILENAME parameter...\"\r\nIF \"__!FILENAME!__\"==\"____\" (\r\n    CALL :LOG_MESSAGE DEBUG \"Missing -f filename input.\"\r\n    GOTO help\r\n) ELSE (\r\n    CALL :LOG_MESSAGE DEBUG \"Filename: !FILENAME!\"\r\n    IF NOT \"__!FILENAME: =!__\"==\"__!FILENAME!__\" (\r\n        CALL :LOG_MESSAGE ERROR \"Filename containing spaces are not supported.\"\r\n        GOTO help\r\n    )\r\n    @REM Remove \".\\\" or \"./\" file prefix if present.\r\n    SET \"FILENAME=!FILENAME:.\\=!\"\r\n    SET \"FILENAME=!FILENAME:./=!\"\r\n)\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking if !FILENAME! exists...\"\r\nIF NOT EXIST !FILENAME! (\r\n    CALL :LOG_MESSAGE ERROR \"File does not exist: !FILENAME!. Terminating.\"\r\n    GOTO eof\r\n)\r\n\r\nIF NOT \"__!FILENAME:.factory.bin=!__\"==\"__!FILENAME!__\" (\r\n    CALL :LOG_MESSAGE DEBUG \"We are working with a *.factory.bin* file. !FILENAME!\"\r\n    CALL :LOG_MESSAGE INFO \"Use script device-install.bat to flash !FILENAME!.\"\r\n    GOTO eof\r\n) ELSE (\r\n    CALL :LOG_MESSAGE DEBUG \"We are not working with a *.factory.bin* file. !FILENAME!\"\r\n)\r\n\r\n:skip-filename\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Determine the correct esptool command to use...\"\r\nIF NOT \"__%PYTHON%__\"==\"____\" (\r\n    SET \"ESPTOOL_CMD=\"\"!PYTHON!\"\" -m esptool\"\r\n    CALL :LOG_MESSAGE DEBUG \"Python interpreter supplied.\"\r\n) ELSE (\r\n    CALL :LOG_MESSAGE DEBUG \"Python interpreter NOT supplied. Looking for esptool...\"\r\n    WHERE esptool >nul 2>&1\r\n    IF %ERRORLEVEL% EQU 0 (\r\n        @REM WHERE exits with code 0 if esptool is found.\r\n        SET \"ESPTOOL_CMD=esptool\"\r\n    ) ELSE (\r\n        SET \"ESPTOOL_CMD=python -m esptool\"\r\n        CALL :RESET_ERROR\r\n    )\r\n)\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking esptool command !ESPTOOL_CMD!...\"\r\n!ESPTOOL_CMD! >nul 2>&1\r\nCALL :LOG_MESSAGE DEBUG \"esptool exit code: %ERRORLEVEL%\"\r\nIF %ERRORLEVEL% EQU 9009 (\r\n    @REM 9009 = command not found on Windows\r\n    CALL :LOG_MESSAGE ERROR \"esptool not found: !ESPTOOL_CMD!\"\r\n    EXIT /B 1\r\n)\r\nIF %DEBUG% EQU 1 (\r\n    CALL :LOG_MESSAGE DEBUG \"Skipping ESPTOOL_CMD steps.\"\r\n    SET \"ESPTOOL_CMD=REM !ESPTOOL_CMD!\"\r\n)\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Using esptool command: !ESPTOOL_CMD!\"\r\nIF \"__!ESPTOOL_PORT!__\" == \"____\" (\r\n    CALL :LOG_MESSAGE WARN \"Using esptool port: UNSET.\"\r\n) ELSE (\r\n    SET \"ESPTOOL_CMD=!ESPTOOL_CMD! --port !ESPTOOL_PORT!\"\r\n    CALL :LOG_MESSAGE INFO \"Using esptool port: !ESPTOOL_PORT!.\"\r\n)\r\nCALL :LOG_MESSAGE INFO \"Using esptool baud: !ESPTOOL_BAUD!.\"\r\n\r\nIF %CHANGE_MODE% EQU 1 (\r\n    @REM Attempt to change mode via 1200bps Reset.\r\n    CALL :RUN_ESPTOOL !RESET_BAUD! --after no_reset read_flash_status\r\n    GOTO eof\r\n)\r\n\r\n@REM Flashing operations.\r\nCALL :LOG_MESSAGE INFO \"Trying to flash update \"!FILENAME!\" at OFFSET !UPDATE_OFFSET!...\"\r\nCALL :RUN_ESPTOOL !ESPTOOL_BAUD! write-flash !UPDATE_OFFSET! \"!FILENAME!\" || GOTO eof\r\n\r\nCALL :LOG_MESSAGE INFO \"Script complete!.\"\r\n\r\n:eof\r\nENDLOCAL\r\nEXIT /B %ERRORLEVEL%\r\n\r\n\r\n:RUN_ESPTOOL\r\n@REM Subroutine used to run ESPTOOL_CMD with arguments.\r\n@REM Also handles %ERRORLEVEL%.\r\n@REM CALL :RUN_ESPTOOL [Baud] [erase-flash|write-flash] [OFFSET] [Filename]\r\n@REM.\r\n@REM Example:: CALL :RUN_ESPTOOL 115200 write-flash 0x10000 \"firmwarefile.bin\"\r\nIF %DEBUG% EQU 1 CALL :LOG_MESSAGE DEBUG \"About to run command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4\"\r\nCALL :RESET_ERROR\r\n!ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4\r\nIF %CHANGE_MODE% EQU 1 GOTO :eof\r\nIF %ERRORLEVEL% NEQ 0 (\r\n    CALL :LOG_MESSAGE ERROR \"Error running command: !ESPTOOL_CMD! --baud %~1 %~2 %~3 %~4\"\r\n    EXIT /B %ERRORLEVEL%\r\n)\r\nGOTO :eof\r\n\r\n:LOG_MESSAGE\r\n@REM Subroutine used to print log messages in four different levels.\r\n@REM DEBUG messages only get printed if [-d] flag is passed to script.\r\n@REM CALL :LOG_MESSAGE [ERROR|INFO|WARN|DEBUG] \"Message\"\r\n@REM.\r\n@REM Example:: CALL :LOG_MESSAGE INFO \"Message.\"\r\nSET /A LOGCOUNTER=LOGCOUNTER+1\r\nIF \"%1\" == \"ERROR\" CALL :GET_TIMESTAMP & ECHO \u001b[91m%1 \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[91m%~2\u001b[0m\r\nIF \"%1\" == \"INFO\" CALL :GET_TIMESTAMP & ECHO \u001b[32m%1  \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[32m%~2\u001b[0m\r\nIF \"%1\" == \"WARN\" CALL :GET_TIMESTAMP & ECHO \u001b[33m%1  \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[33m%~2\u001b[0m\r\nIF \"%1\" == \"DEBUG\" IF %DEBUG% EQU 1 CALL :GET_TIMESTAMP & ECHO \u001b[34m%1 \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[34m%~2\u001b[0m\r\nGOTO :eof\r\n\r\n:GET_TIMESTAMP\r\n@REM Subroutine used to set !TIMESTAMP! to HH:MM:ss.\r\n@REM CALL :GET_TIMESTAMP\r\n@REM.\r\n@REM Updates: !TIMESTAMP!\r\nFOR /F \"tokens=1,2,3 delims=:,.\" %%a IN (\"%TIME%\") DO (\r\n    SET \"HH=%%a\"\r\n    SET \"MM=%%b\"\r\n    SET \"ss=%%c\"\r\n)\r\nSET \"TIMESTAMP=!HH!:!MM!:!ss!\"\r\nGOTO :eof\r\n\r\n:RESET_ERROR\r\n@REM Subroutine to reset %ERRORLEVEL% to 0.\r\n@REM CALL :RESET_ERROR\r\n@REM.\r\n@REM Updates: %ERRORLEVEL%\r\nEXIT /B 0\r\nGOTO :eof\r\n"
  },
  {
    "path": "bin/device-update.sh",
    "content": "#!/usr/bin/env bash\n\nPYTHON=${PYTHON:-$(which python3 python|head -n 1)}\nCHANGE_MODE=false\n\n# Constants\nFLASH_BAUD=115200\nRESET_BAUD=1200\nUPDATE_OFFSET=0x10000\n\n# Determine the correct esptool command to use\nif \"$PYTHON\" -m esptool version >/dev/null 2>&1; then\n    ESPTOOL_CMD=\"$PYTHON -m esptool\"\nelif command -v esptool >/dev/null 2>&1; then\n    ESPTOOL_CMD=\"esptool\"\nelif command -v esptool.py >/dev/null 2>&1; then\n    ESPTOOL_CMD=\"esptool.py\"\nelse\n    echo \"Error: esptool not found\"\n    exit 1\nfi\n\n# esptool v5 supports commands with dashes and deprecates commands with\n# underscores. Prior versions only support commands with underscores\nif ${ESPTOOL_CMD} | grep --quiet write-flash\nthen\n    ESPTOOL_WRITE_FLASH=write-flash\n    ESPTOOL_READ_FLASH_STATUS=read-flash-status\nelse\n    ESPTOOL_WRITE_FLASH=write_flash\n    ESPTOOL_READ_FLASH_STATUS=read_flash_status\nfi\n\n# Usage info\nshow_help() {\ncat << EOF\nUsage: $(basename \"$0\") [-h] [-p ESPTOOL_PORT] [-P PYTHON] [-f FILENAME|FILENAME] [--change-mode]\nFlash image file to device, leave existing system intact.\"\n\n    -h               Display this help and exit\n    -p ESPTOOL_PORT  Set the environment variable for ESPTOOL_PORT.  If not set, ESPTOOL iterates all ports (Dangerous).\n    -P PYTHON        Specify alternate python interpreter to use to invoke esptool. (Default: \"$PYTHON\")\n    -f FILENAME      The *.bin file to flash.  Custom to your device type.\n    --change-mode    Attempt to place the device in correct mode. Some hardware requires this twice. (1200bps Reset)\n\nEOF\n}\n\n# Check for --change-mode and remove it from arguments\nNEW_ARGS=()\nfor arg in \"$@\"; do\n    if [ \"$arg\" = \"--change-mode\" ]; then\n        CHANGE_MODE=true\n    else\n        NEW_ARGS+=(\"$arg\")\n    fi\ndone\n\nset -- \"${NEW_ARGS[@]}\"\n\nwhile getopts \":hp:P:f:\" opt; do\n    case \"${opt}\" in\n        h)\n            show_help\n            exit 0\n            ;;\n        p)  ESPTOOL_CMD=\"$ESPTOOL_CMD --port ${OPTARG}\"\n            ;;\n        P)  PYTHON=${OPTARG}\n            ;;\n        f)  FILENAME=${OPTARG}\n            ;;\n        *)\n            echo \"Invalid flag.\"\n            show_help >&2\n            exit 1\n            ;;\n    esac\ndone\nshift \"$((OPTIND-1))\"\n\nif [ \"$CHANGE_MODE\" = true ]; then\n    $ESPTOOL_CMD --baud $RESET_BAUD --after no_reset ${ESPTOOL_READ_FLASH_STATUS}\n    exit 0\nfi\n\n[ -z \"$FILENAME\" ]  && [ -n \"$1\" ] && {\n    FILENAME=\"$1\"\n    shift\n}\n\nif [[ -f \"$FILENAME\" && \"$FILENAME\" != *.factory.bin ]]; then\n    echo \"Trying to flash update ${FILENAME}\"\n    $ESPTOOL_CMD --baud $FLASH_BAUD ${ESPTOOL_WRITE_FLASH} $UPDATE_OFFSET \"${FILENAME}\"\nelse\n    show_help\n    echo \"Invalid file: ${FILENAME}\"\nfi\n\nexit 0\n"
  },
  {
    "path": "bin/dump-ram-users.sh",
    "content": "#!/usr/bin/env bash\n\narm-none-eabi-readelf -s -e .pio/build/nrf52dk/firmware.elf | head -80\n\nnm -CSr --size-sort .pio/build/nrf52dk/firmware.elf  | grep '^200'\n"
  },
  {
    "path": "bin/exception_decoder.py",
    "content": "#!/usr/bin/env python3\n\n\"\"\"ESP Exception Decoder\n\ngithub:  https://github.com/janLo/EspArduinoExceptionDecoder\nlicense: GPL v3\nauthor:  Jan Losinski\n\nMeshtastic notes:\n* original version is at: https://github.com/janLo/EspArduinoExceptionDecoder\n* version that's checked into meshtastic repo is based on: https://github.com/me21/EspArduinoExceptionDecoder\n  which adds in ESP32 Backtrace decoding.\n* this also updates the defaults to use ESP32, instead of ESP8266 and defaults to the built firmware.bin\n* also updated the toolchain name, which will be set according to the platform\n\nTo use, copy the \"Backtrace: 0x....\" line to a file, e.g., backtrace.txt, then run:\n$ bin/exception_decoder.py backtrace.txt\nFor a platform other than ESP32, use the -p option, e.g.:\n$ bin/exception_decoder.py -p ESP32S3 backtrace.txt\nTo specify a specific .elf file, use the -e option, e.g.:\n$ bin/exception_decoder.py -e firmware.elf backtrace.txt\n\"\"\"\n\nimport argparse\nimport os\nimport re\nimport subprocess\nimport sys\nfrom collections import namedtuple\n\nEXCEPTIONS = [\n    \"Illegal instruction\",\n    \"SYSCALL instruction\",\n    \"InstructionFetchError: Processor internal physical address or data error during instruction fetch\",\n    \"LoadStoreError: Processor internal physical address or data error during load or store\",\n    \"Level1Interrupt: Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT register\",\n    \"Alloca: MOVSP instruction, if caller's registers are not in the register file\",\n    \"IntegerDivideByZero: QUOS, QUOU, REMS, or REMU divisor operand is zero\",\n    \"reserved\",\n    \"Privileged: Attempt to execute a privileged operation when CRING ? 0\",\n    \"LoadStoreAlignmentCause: Load or store to an unaligned address\",\n    \"reserved\",\n    \"reserved\",\n    \"InstrPIFDataError: PIF data error during instruction fetch\",\n    \"LoadStorePIFDataError: Synchronous PIF data error during LoadStore access\",\n    \"InstrPIFAddrError: PIF address error during instruction fetch\",\n    \"LoadStorePIFAddrError: Synchronous PIF address error during LoadStore access\",\n    \"InstTLBMiss: Error during Instruction TLB refill\",\n    \"InstTLBMultiHit: Multiple instruction TLB entries matched\",\n    \"InstFetchPrivilege: An instruction fetch referenced a virtual address at a ring level less than CRING\",\n    \"reserved\",\n    \"InstFetchProhibited: An instruction fetch referenced a page mapped with an attribute that does not permit instruction fetch\",\n    \"reserved\",\n    \"reserved\",\n    \"reserved\",\n    \"LoadStoreTLBMiss: Error during TLB refill for a load or store\",\n    \"LoadStoreTLBMultiHit: Multiple TLB entries matched for a load or store\",\n    \"LoadStorePrivilege: A load or store referenced a virtual address at a ring level less than CRING\",\n    \"reserved\",\n    \"LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads\",\n    \"StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores\",\n]\n\nPLATFORMS = {\n    \"ESP8266\": \"xtensa-lx106\",\n    \"ESP32\": \"xtensa-esp32\",\n    \"ESP32S3\": \"xtensa-esp32s3\",\n    \"ESP32C3\": \"riscv32-esp\",\n}\nTOOLS = {\n    \"ESP8266\": \"xtensa\",\n    \"ESP32\": \"xtensa-esp32\",\n    \"ESP32S3\": \"xtensa-esp32s3\",\n    \"ESP32C3\": \"riscv32-esp\",\n}\n\nBACKTRACE_REGEX = re.compile(\n    r\"\\b(0x4[0-9a-fA-F]{7,8}):0x[0-9a-fA-F]{8}\\b\"\n)\nEXCEPTION_REGEX = re.compile(\"^Exception \\\\((?P<exc>[0-9]*)\\\\):$\")\nCOUNTER_REGEX = re.compile(\n    \"^epc1=(?P<epc1>0x[0-9a-f]+) epc2=(?P<epc2>0x[0-9a-f]+) epc3=(?P<epc3>0x[0-9a-f]+) \"\n    \"excvaddr=(?P<excvaddr>0x[0-9a-f]+) depc=(?P<depc>0x[0-9a-f]+)$\"\n)\nCTX_REGEX = re.compile(\"^ctx: (?P<ctx>.+)$\")\nPOINTER_REGEX = re.compile(\n    \"^sp: (?P<sp>[0-9a-f]+) end: (?P<end>[0-9a-f]+) offset: (?P<offset>[0-9a-f]+)$\"\n)\nSTACK_BEGIN = \">>>stack>>>\"\nSTACK_END = \"<<<stack<<<\"\nSTACK_REGEX = re.compile(\n    r\"^(?P<off>[0-9a-f]+):\\W+(?P<c1>[0-9a-f]+) (?P<c2>[0-9a-f]+) (?P<c3>[0-9a-f]+) (?P<c4>[0-9a-f]+)(\\W.*)?$\"\n)\n\nStackLine = namedtuple(\"StackLine\", [\"offset\", \"content\"])\n\n\nclass ExceptionDataParser(object):\n    def __init__(self):\n        self.exception = None\n\n        self.epc1 = None\n        self.epc2 = None\n        self.epc3 = None\n        self.excvaddr = None\n        self.depc = None\n\n        self.ctx = None\n\n        self.sp = None\n        self.end = None\n        self.offset = None\n\n        self.stack = []\n\n    def _parse_backtrace(self, line):\n        if line.startswith(\"Backtrace:\"):\n            self.stack = [\n                StackLine(offset=0, content=(addr,))\n                for addr in BACKTRACE_REGEX.findall(line)\n            ]\n            return None\n        return self._parse_backtrace\n\n    def _parse_exception(self, line):\n        match = EXCEPTION_REGEX.match(line)\n        if match is not None:\n            self.exception = int(match.group(\"exc\"))\n            return self._parse_counters\n        return self._parse_exception\n\n    def _parse_counters(self, line):\n        match = COUNTER_REGEX.match(line)\n        if match is not None:\n            self.epc1 = match.group(\"epc1\")\n            self.epc2 = match.group(\"epc2\")\n            self.epc3 = match.group(\"epc3\")\n            self.excvaddr = match.group(\"excvaddr\")\n            self.depc = match.group(\"depc\")\n            return self._parse_ctx\n        return self._parse_counters\n\n    def _parse_ctx(self, line):\n        match = CTX_REGEX.match(line)\n        if match is not None:\n            self.ctx = match.group(\"ctx\")\n            return self._parse_pointers\n        return self._parse_ctx\n\n    def _parse_pointers(self, line):\n        match = POINTER_REGEX.match(line)\n        if match is not None:\n            self.sp = match.group(\"sp\")\n            self.end = match.group(\"end\")\n            self.offset = match.group(\"offset\")\n            return self._parse_stack_begin\n        return self._parse_pointers\n\n    def _parse_stack_begin(self, line):\n        if line == STACK_BEGIN:\n            return self._parse_stack_line\n        return self._parse_stack_begin\n\n    def _parse_stack_line(self, line):\n        if line != STACK_END:\n            match = STACK_REGEX.match(line)\n            if match is not None:\n                self.stack.append(\n                    StackLine(\n                        offset=match.group(\"off\"),\n                        content=(\n                            match.group(\"c1\"),\n                            match.group(\"c2\"),\n                            match.group(\"c3\"),\n                            match.group(\"c4\"),\n                        ),\n                    )\n                )\n            return self._parse_stack_line\n        return None\n\n    def parse_file(self, file, platform, stack_only=False):\n        if platform != \"ESP8266\":\n            func = self._parse_backtrace\n        else:\n            func = self._parse_exception\n            if stack_only:\n                func = self._parse_stack_begin\n\n        for line in file:\n            func = func(line.strip())\n            if func is None:\n                break\n\n        if func is not None:\n            print(\"ERROR: Parser not complete!\")\n            sys.exit(1)\n\n\nclass AddressResolver(object):\n    def __init__(self, tool_path, elf_path):\n        self._tool = tool_path\n        self._elf = elf_path\n        self._address_map = {}\n\n    def _lookup(self, addresses):\n        cmd = [self._tool, \"-aipfC\", \"-e\", self._elf] + [\n            addr for addr in addresses if addr is not None\n        ]\n\n        if sys.version_info[0] < 3:\n            output = subprocess.check_output(cmd)\n        else:\n            output = subprocess.check_output(cmd, encoding=\"utf-8\")\n\n        line_regex = re.compile(\"^(?P<addr>[0-9a-fx]+): (?P<result>.+)$\")\n\n        last = None\n        for line in output.splitlines():\n            line = line.strip()\n            match = line_regex.match(line)\n\n            if match is None:\n                if last is not None and line.startswith(\"(inlined by)\"):\n                    line = line[12:].strip()\n                    self._address_map[last] += \"\\n  \\\\-> inlined by: \" + line\n                continue\n\n            if match.group(\"result\") == \"?? ??:0\":\n                continue\n\n            self._address_map[match.group(\"addr\")] = match.group(\"result\")\n            last = match.group(\"addr\")\n\n    def fill(self, parser):\n        addresses = [\n            parser.epc1,\n            parser.epc2,\n            parser.epc3,\n            parser.excvaddr,\n            parser.sp,\n            parser.end,\n            parser.offset,\n        ]\n        for line in parser.stack:\n            addresses.extend(line.content)\n\n        self._lookup(addresses)\n\n    def _sanitize_addr(self, addr):\n        if addr.startswith(\"0x\"):\n            addr = addr[2:]\n\n        fill = \"0\" * (8 - len(addr))\n        return \"0x\" + fill + addr\n\n    def resolve_addr(self, addr):\n        out = self._sanitize_addr(addr)\n\n        if out in self._address_map:\n            out += \": \" + self._address_map[out]\n\n        return out\n\n    def resolve_stack_addr(self, addr, full=True):\n        addr = self._sanitize_addr(addr)\n        if addr in self._address_map:\n            return addr + \": \" + self._address_map[addr]\n\n        if full:\n            return \"[DATA (0x\" + addr + \")]\"\n\n        return None\n\n\ndef print_addr(name, value, resolver):\n    print(\"{}:{} {}\".format(name, \" \" * (8 - len(name)), resolver.resolve_addr(value)))\n\n\ndef print_stack_full(lines, resolver):\n    print(\"stack:\")\n    for line in lines:\n        print(str(line.offset) + \":\")\n        for content in line.content:\n            print(\"  \" + resolver.resolve_stack_addr(content))\n\n\ndef print_stack(lines, resolver):\n    print(\"stack:\")\n    for line in lines:\n        for content in line.content:\n            out = resolver.resolve_stack_addr(content, full=False)\n            if out is None:\n                continue\n            print(out)\n\n\ndef print_result(parser, resolver, platform, full=True, stack_only=False):\n    if platform == \"ESP8266\" and not stack_only:\n        print(\n            \"Exception: {} ({})\".format(parser.exception, EXCEPTIONS[parser.exception])\n        )\n\n        print(\"\")\n        print_addr(\"epc1\", parser.epc1, resolver)\n        print_addr(\"epc2\", parser.epc2, resolver)\n        print_addr(\"epc3\", parser.epc3, resolver)\n        print_addr(\"excvaddr\", parser.excvaddr, resolver)\n        print_addr(\"depc\", parser.depc, resolver)\n\n        print(\"\")\n        print(\"ctx: \" + parser.ctx)\n\n        print(\"\")\n        print_addr(\"sp\", parser.sp, resolver)\n        print_addr(\"end\", parser.end, resolver)\n        print_addr(\"offset\", parser.offset, resolver)\n\n        print(\"\")\n    if full:\n        print_stack_full(parser.stack, resolver)\n    else:\n        print_stack(parser.stack, resolver)\n\n\ndef parse_args():\n    parser = argparse.ArgumentParser(description=\"decode ESP Stacktraces.\")\n\n    parser.add_argument(\n        \"-p\",\n        \"--platform\",\n        help=\"The platform to decode from\",\n        choices=PLATFORMS.keys(),\n        default=\"ESP32\",\n    )\n    parser.add_argument(\n        \"-t\",\n        \"--tool\",\n        help=\"Path to the toolchain (without specific platform)\",\n        default=\"~/.platformio/packages/toolchain-\",\n    )\n    parser.add_argument(\n        \"-e\", \"--elf\", help=\"path to elf file\", default=\".pio/build/tbeam/firmware.elf\"\n    )\n    parser.add_argument(\n        \"-f\", \"--full\", help=\"Print full stack dump\", action=\"store_true\"\n    )\n    parser.add_argument(\n        \"-s\", \"--stack_only\", help=\"Decode only a stractrace\", action=\"store_true\"\n    )\n    parser.add_argument(\n        \"file\",\n        help=\"The file to read the exception data from ('-' for STDIN)\",\n        default=\"-\",\n    )\n\n    return parser.parse_args()\n\n\nif __name__ == \"__main__\":\n    args = parse_args()\n\n    if args.file == \"-\":\n        file = sys.stdin\n    else:\n        if not os.path.exists(args.file):\n            print(\"ERROR: file \" + args.file + \" not found\")\n            sys.exit(1)\n        file = open(args.file, \"r\")\n\n    addr2line = os.path.join(\n        os.path.abspath(os.path.expanduser(args.tool + TOOLS[args.platform])),\n        \"bin/\" + PLATFORMS[args.platform] + \"-elf-addr2line\",\n    )\n    if os.name == \"nt\":\n        addr2line += \".exe\"\n    if not os.path.exists(addr2line):\n        print(\"ERROR: addr2line not found (\" + addr2line + \")\")\n\n    elf_file = os.path.abspath(os.path.expanduser(args.elf))\n    if not os.path.exists(elf_file):\n        print(\"ERROR: elf file not found (\" + elf_file + \")\")\n\n    parser = ExceptionDataParser()\n    resolver = AddressResolver(addr2line, elf_file)\n\n    parser.parse_file(file, args.platform, args.stack_only)\n    resolver.fill(parser)\n\n    print_result(parser, resolver, args.platform, args.full, args.stack_only)\n"
  },
  {
    "path": "bin/gen-images.sh",
    "content": "#!/usr/bin/env bash\n\nset -e \n\n# regen the design bins first\ncd design\nbin/generate-pngs.sh\ncd ..\n\n# assumes 50 wide, 28 high\nconvert design/logo/png/Mesh_Logo_Black_Small.png -background white -alpha Background src/graphics/img/icon.xbm\n\ninkscape --batch-process -o images/compass.png -w 48 -h 48 images/location_searching-24px.svg\nconvert compass.png -background white -alpha Background src/graphics/img/compass.xbm\n\ninkscape --batch-process -o images/face.png -w 13 -h 13 images/face-24px.svg\n\ninkscape --batch-process -o images/pin.png -w 13 -h 13 images/room-24px.svg\nconvert pin.png -background white -alpha Background src/graphics/img/pin.xbm\n"
  },
  {
    "path": "bin/generate_ci_matrix.py",
    "content": "#!/usr/bin/env python3\n\n\"\"\"Generate the CI matrix.\"\"\"\n\nimport argparse\nimport json\nimport re\nfrom platformio.project.config import ProjectConfig\n\nparser = argparse.ArgumentParser(description=\"Generate the CI matrix\")\nparser.add_argument(\"platform\", help=\"Platform to build for\")\nparser.add_argument(\n  \"--level\",\n  choices=[\"extra\", \"pr\"],\n  nargs=\"*\",\n  default=[],\n  help=\"Board level to build for (omit for full release boards)\",\n)\nargs = parser.parse_args()\n\noutlist = []\n\ncfg = ProjectConfig.get_instance()\npio_envs = cfg.envs()\n\n# Gather all PlatformIO environments for filtering later\nall_envs = []\nfor pio_env in pio_envs:\n  env_build_flags = cfg.get(f\"env:{pio_env}\", \"build_flags\")\n  env_platform = None\n  for flag in env_build_flags:\n    # Extract the platform from the build flags\n    # Example flag: -I variants/esp32s3/heltec-v3\n    match = re.search(r\"-I\\s?variants/([^/]+)\", flag)\n    if match:\n      env_platform = match.group(1)\n      break\n  # Intentionally fail if platform cannot be determined\n  if not env_platform:\n    print(f\"Error: Could not determine platform for environment '{pio_env}'\")\n    exit(1)\n  # Store env details as a dictionary, and add to 'all_envs' list\n  env = {\n    \"ci\": {\"board\": pio_env, \"platform\": env_platform},\n    \"board_level\": cfg.get(f\"env:{pio_env}\", \"board_level\", default=None),\n    \"board_check\": bool(cfg.get(f\"env:{pio_env}\", \"board_check\", default=False)),\n  }\n  all_envs.append(env)\n\n# Filter outputs based on options\n# Check is mutually exclusive with other options (except 'pr')\nif \"check\" in args.platform:\n  for env in all_envs:\n    if env[\"board_check\"]:\n      if \"pr\" in args.level:\n        if env[\"board_level\"] == \"pr\":\n          outlist.append(env[\"ci\"])\n      else:\n        outlist.append(env[\"ci\"])\n# Filter (non-check) builds by platform\nelse:\n  for env in all_envs:\n    if args.platform == env[\"ci\"][\"platform\"] or args.platform == \"all\":\n      # Always include board_level = 'pr'\n      if env[\"board_level\"] == \"pr\":\n        outlist.append(env[\"ci\"])\n      # Include board_level = 'extra' when requested\n      elif \"extra\" in args.level and env[\"board_level\"] == \"extra\":\n        outlist.append(env[\"ci\"])\n      # If no board level is specified, include in release builds (not PR)\n      elif \"pr\" not in args.level and not env[\"board_level\"]:\n        outlist.append(env[\"ci\"])\n\n# Return as a JSON list\nprint(json.dumps(outlist))\n"
  },
  {
    "path": "bin/generate_release_notes.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nGenerate release notes from merged PRs on develop and master branches.\nCategorizes PRs into Enhancements and Bug Fixes/Maintenance sections.\n\"\"\"\n\nimport subprocess\nimport re\nimport json\nimport sys\nfrom datetime import datetime\n\n\ndef get_last_release_tag():\n    \"\"\"Get the most recent release tag.\"\"\"\n    result = subprocess.run(\n        [\"git\", \"describe\", \"--tags\", \"--abbrev=0\"],\n        capture_output=True,\n        text=True,\n        check=True,\n    )\n    return result.stdout.strip()\n\n\ndef get_tag_date(tag):\n    \"\"\"Get the commit date (ISO 8601) of the tag.\"\"\"\n    result = subprocess.run(\n        [\"git\", \"show\", \"-s\", \"--format=%cI\", tag],\n        capture_output=True,\n        text=True,\n        check=True,\n    )\n    return result.stdout.strip()\n\n\ndef get_merged_prs_since_tag(tag, branch):\n    \"\"\"Get all merged PRs since the given tag on the specified branch.\"\"\"\n    # Get commits since tag on the branch - look for PR numbers in parentheses\n    result = subprocess.run(\n        [\n            \"git\",\n            \"log\",\n            f\"{tag}..origin/{branch}\",\n            \"--oneline\",\n        ],\n        capture_output=True,\n        text=True,\n    )\n\n    prs = []\n    seen_pr_numbers = set()\n\n    for line in result.stdout.strip().split(\"\\n\"):\n        if not line:\n            continue\n\n        # Extract PR number from commit message - format: \"Title (#1234)\"\n        pr_match = re.search(r\"\\(#(\\d+)\\)\", line)\n        if pr_match:\n            pr_number = pr_match.group(1)\n            if pr_number not in seen_pr_numbers:\n                seen_pr_numbers.add(pr_number)\n                prs.append(pr_number)\n\n    return prs\n\n\ndef get_pr_details(pr_number):\n    \"\"\"Get PR details from GitHub API via gh CLI.\"\"\"\n    try:\n        result = subprocess.run(\n            [\n                \"gh\",\n                \"pr\",\n                \"view\",\n                pr_number,\n                \"--json\",\n                \"title,author,labels,url\",\n            ],\n            capture_output=True,\n            text=True,\n            check=True,\n        )\n        return json.loads(result.stdout)\n    except subprocess.CalledProcessError:\n        return None\n\n\ndef should_exclude_pr(pr_details):\n    \"\"\"Check if PR should be excluded from release notes.\"\"\"\n    if not pr_details:\n        return True\n\n    title = pr_details.get(\"title\", \"\").lower()\n\n    # Exclude trunk update PRs\n    if \"upgrade trunk\" in title or \"update trunk\" in title or \"trunk update\" in title:\n        return True\n\n    # Exclude protobuf update PRs\n    if \"update protobufs\" in title or \"update protobuf\" in title:\n        return True\n\n    # Exclude automated version bump PRs\n    if \"bump release version\" in title or \"bump version\" in title:\n        return True\n\n    return False\n\n\ndef is_dependency_update(pr_details):\n    \"\"\"Check if PR is a dependency/chore update.\"\"\"\n    if not pr_details:\n        return False\n\n    title = pr_details.get(\"title\", \"\").lower()\n    author = pr_details.get(\"author\", {}).get(\"login\", \"\").lower()\n    labels = [label.get(\"name\", \"\").lower() for label in pr_details.get(\"labels\", [])]\n\n    # Check for renovate or dependabot authors\n    if \"renovate\" in author or \"dependabot\" in author:\n        return True\n\n    # Check for chore(deps) pattern\n    if re.match(r\"^chore\\(deps\\):\", title):\n        return True\n\n    # Check for digest update patterns\n    if re.match(r\".*digest to [a-f0-9]+\", title, re.IGNORECASE):\n        return True\n\n    # Check for dependency-related labels\n    dependency_labels = [\"dependencies\", \"deps\", \"renovate\"]\n    if any(dep in label for label in labels for dep in dependency_labels):\n        return True\n\n    return False\n\n\ndef is_enhancement(pr_details):\n    \"\"\"Determine if PR is an enhancement based on labels and title.\"\"\"\n    labels = [label.get(\"name\", \"\").lower() for label in pr_details.get(\"labels\", [])]\n\n    # Check labels first\n    enhancement_labels = [\"enhancement\", \"feature\", \"feat\", \"new feature\"]\n    for label in labels:\n        if any(enh in label for enh in enhancement_labels):\n            return True\n\n    # Check title prefixes\n    title = pr_details.get(\"title\", \"\")\n    enhancement_prefixes = [\"feat:\", \"feature:\", \"add:\"]\n    title_lower = title.lower()\n    for prefix in enhancement_prefixes:\n        if title_lower.startswith(prefix) or f\" {prefix}\" in title_lower:\n            return True\n\n    return False\n\n\ndef clean_title(title):\n    \"\"\"Clean up PR title for release notes.\"\"\"\n    # Remove common prefixes\n    prefixes_to_remove = [\n        r\"^fix:\\s*\",\n        r\"^feat:\\s*\",\n        r\"^feature:\\s*\",\n        r\"^bug:\\s*\",\n        r\"^bugfix:\\s*\",\n        r\"^chore:\\s*\",\n        r\"^chore\\([^)]+\\):\\s*\",\n        r\"^refactor:\\s*\",\n        r\"^docs:\\s*\",\n        r\"^ci:\\s*\",\n        r\"^build:\\s*\",\n        r\"^perf:\\s*\",\n        r\"^style:\\s*\",\n        r\"^test:\\s*\",\n    ]\n\n    cleaned = title\n    for prefix in prefixes_to_remove:\n        cleaned = re.sub(prefix, \"\", cleaned, flags=re.IGNORECASE)\n\n    # Ensure first letter is capitalized\n    if cleaned:\n        cleaned = cleaned[0].upper() + cleaned[1:]\n\n    return cleaned.strip()\n\n\ndef format_pr_line(pr_details):\n    \"\"\"Format a PR as a markdown bullet point.\"\"\"\n    title = clean_title(pr_details.get(\"title\", \"Unknown\"))\n    author = pr_details.get(\"author\", {}).get(\"login\", \"unknown\")\n    url = pr_details.get(\"url\", \"\")\n\n    return f\"- {title} by @{author} in {url}\"\n\n\ndef get_new_contributors(pr_details_list, tag, repo=\"meshtastic/firmware\"):\n    \"\"\"Find contributors who made their first merged PR before this release.\n\n    GitHub usernames do not necessarily match git commit authors, so we use the\n    GitHub search API via `gh` to see if the user has any merged PRs before the\n    tag date. This mirrors how GitHub's \"Generate release notes\" feature works.\n    \"\"\"\n\n    bot_authors = {\"github-actions\", \"renovate\", \"dependabot\", \"app/renovate\", \"app/github-actions\", \"app/dependabot\"}\n\n    new_contributors = []\n    seen_authors = set()\n\n    try:\n        tag_date = get_tag_date(tag)\n    except subprocess.CalledProcessError:\n        print(f\"Warning: Could not determine tag date for {tag}; skipping new contributor detection\", file=sys.stderr)\n        return []\n\n    for pr in pr_details_list:\n        author = pr.get(\"author\", {}).get(\"login\", \"\")\n        if not author or author in seen_authors:\n            continue\n\n        # Skip bots\n        if author.lower() in bot_authors or author.startswith(\"app/\"):\n            continue\n\n        seen_authors.add(author)\n\n        try:\n            # Search for merged PRs by this author created before the tag date\n            search_query = f\"is:pr author:{author} repo:{repo} closed:<=\\\"{tag_date}\\\"\"\n            search = subprocess.run(\n                [\n                    \"gh\",\n                    \"search\",\n                    \"issues\",\n                    \"--json\",\n                    \"number,mergedAt,createdAt\",\n                    \"--state\",\n                    \"closed\",\n                    \"--limit\",\n                    \"200\",\n                    search_query,\n                ],\n                capture_output=True,\n                text=True,\n            )\n\n            if search.returncode != 0:\n                # If gh fails, be conservative and skip adding to new contributors\n                print(f\"Warning: gh search failed for author {author}: {search.stderr.strip()}\", file=sys.stderr)\n                continue\n\n            results = json.loads(search.stdout or \"[]\")\n            # If any merged PR exists before or on tag date, not a new contributor\n            had_prior_pr = any(item.get(\"mergedAt\") for item in results)\n\n            if not had_prior_pr:\n                new_contributors.append((author, pr.get(\"url\", \"\")))\n\n        except Exception as e:\n            print(f\"Warning: Could not check contributor history for {author}: {e}\", file=sys.stderr)\n            continue\n\n    return new_contributors\n\n\ndef main():\n    if len(sys.argv) < 2:\n        print(\"Usage: generate_release_notes.py <new_version>\", file=sys.stderr)\n        sys.exit(1)\n\n    new_version = sys.argv[1]\n\n    # Get last release tag\n    try:\n        last_tag = get_last_release_tag()\n    except subprocess.CalledProcessError:\n        print(\"Error: Could not find last release tag\", file=sys.stderr)\n        sys.exit(1)\n\n    # Collect PRs from both branches\n    all_pr_numbers = set()\n\n    for branch in [\"develop\", \"master\"]:\n        try:\n            prs = get_merged_prs_since_tag(last_tag, branch)\n            all_pr_numbers.update(prs)\n        except Exception as e:\n            print(f\"Warning: Could not get PRs from {branch}: {e}\", file=sys.stderr)\n\n    # Get details for all PRs\n    enhancements = []\n    bug_fixes = []\n    dependencies = []\n    all_pr_details = []\n\n    for pr_number in sorted(all_pr_numbers, key=int):\n        details = get_pr_details(pr_number)\n        if details and not should_exclude_pr(details):\n            all_pr_details.append(details)\n            if is_dependency_update(details):\n                dependencies.append(details)\n            elif is_enhancement(details):\n                enhancements.append(details)\n            else:\n                bug_fixes.append(details)\n\n    # Generate release notes\n    output = []\n\n    if enhancements:\n        output.append(\"## 🚀 Enhancements\\n\")\n        for pr in enhancements:\n            output.append(format_pr_line(pr))\n        output.append(\"\")\n\n    if bug_fixes:\n        output.append(\"## 🐛 Bug fixes and maintenance\\n\")\n        for pr in bug_fixes:\n            output.append(format_pr_line(pr))\n        output.append(\"\")\n\n    if dependencies:\n        output.append(\"## ⚙️ Dependencies\\n\")\n        for pr in dependencies:\n            output.append(format_pr_line(pr))\n        output.append(\"\")\n\n    # Find new contributors (GitHub-accurate check using merged PRs before tag date)\n    new_contributors = get_new_contributors(all_pr_details, last_tag)\n    if new_contributors:\n        output.append(\"## New Contributors\\n\")\n        for author, url in new_contributors:\n            # Find first PR URL for this contributor\n            first_pr_url = url\n            for pr in all_pr_details:\n                if pr.get(\"author\", {}).get(\"login\") == author:\n                    first_pr_url = pr.get(\"url\", url)\n                    break\n            output.append(f\"- @{author} made their first contribution in {first_pr_url}\")\n        output.append(\"\")\n\n    # Add full changelog link\n    output.append(\n        f\"**Full Changelog**: https://github.com/meshtastic/firmware/compare/{last_tag}...v{new_version}\"\n    )\n\n    print(\"\\n\".join(output))\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bin/generic/Meshtastic_6.1.0_bootloader-0.9.2_s140_6.1.1.hex",
    "content": ":04000003F000B2CD8A\n:020000040000FA\n:1000000000040020810A000015070000610A0000BA\n:100010001F07000029070000330700000000000050\n:10002000000000000000000000000000A50A000021\n:100030003D070000000000004707000051070000D6\n:100040005B070000650700006F07000079070000EC\n:10005000830700008D07000097070000A10700003C\n:10006000AB070000B5070000BF070000C90700008C\n:10007000D3070000DD070000E7070000F1070000DC\n:10008000FB070000050800000F0800001908000029\n:10009000230800002D080000370800004108000078\n:1000A0004B080000550800005F08000069080000C8\n:1000B000730800007D080000870800009108000018\n:1000C0009B080000A5080000AF080000B908000068\n:1000D000C3080000CD080000D7080000E1080000B8\n:1000E000EB080000F5080000FF0800000909000007\n:1000F000130900001D090000270900003109000054\n:100100003B0900001FB500F003F88DE80F001FBD8C\n:1001100000F0ACBC40F6FC7108684FF01022401CA7\n:1001200008D00868401C09D00868401C04D0086842\n:1001300000F037BA9069F5E79069F9E7704770B554\n:100140000B46010B184400F6FF70040B4FF0805073\n:100150000022090303692403406943431D1B104621\n:1001600000F048FA29462046BDE8704000F042BA47\n:10017000F0B54FF6FF734FF4B4751A466E1E11E0DA\n:10018000A94201D3344600E00C46091B30F8027B3B\n:10019000641E3B441A44F9D19CB204EB134394B25D\n:1001A00004EB12420029EBD198B200EB134002EBB2\n:1001B000124140EA0140F0BDF34992B00446D1E952\n:1001C0000001CDE91001FF224021684600F0F4FB58\n:1001D00094E80F008DE80F00684610A902E004C8FB\n:1001E00041F8042D8842FAD110216846FFF7C0FF7C\n:1001F0001090AA208DF8440000F099F9FFF78AFFCB\n:1002000040F6FC7420684FF01025401C0FD0206889\n:1002100010226946803000F078F92068401C08D030\n:100220002068082210A900F070F900F061F9A869AF\n:10023000EEE7A869F5E74FF080500369406940F6A2\n:10024000FC71434308684FF01022401C06D0086838\n:1002500000F58050834203D2092070479069F7E788\n:100260000868401C04D00868401C03D00020704778\n:100270009069F9E70420704770B504460068C34DE3\n:10028000072876D2DFE800F033041929631E250021\n:10029000D4E9026564682946304600F062F92A46CE\n:1002A0002146304600F031F9AA002146304600F0E0\n:1002B00057FB002800D0032070BD00F009FC4FF46C\n:1002C000805007E0201D00F040F90028F4D100F034\n:1002D000FFFB60682860002070BD241D94E80700C3\n:1002E000920000F03DFB0028F6D00E2070BDFFF715\n:1002F000A2FF0028FAD1D4E901034FF0805100EBAE\n:10030000830208694D69684382420ED840F6F8704E\n:1003100005684FF010226D1C09D0056805EB8305B8\n:100320000B6949694B439D4203D9092070BD55694A\n:10033000F4E70168491C03D00068401C02D003E0C8\n:100340005069FAE70F2070BD2046FFF735FFFFF731\n:1003500072FF0028F7D1201D00F0F7F80028F2D135\n:1003600060680028F0D100F0E2F8FFF7D3FE00F05B\n:10037000BFF8072070BD10B50C46182802D0012028\n:10038000086010BD2068FFF777FF206010BD41684E\n:10039000054609B1012700E0002740F6F8742068FF\n:1003A0004FF01026401C2BD02068AA68920000F065\n:1003B000D7FA38B3A86881002068401C27D020688D\n:1003C000FFF7BDFED7B12068401C22D026684FF051\n:1003D0008050AC686D68016942695143A9420DD9EA\n:1003E000016940694143A14208D92146304600F0E5\n:1003F000B8F822462946304600F087F800F078F831\n:100400007069D2E700F093F8FFF784FEF6E77069B1\n:10041000D6E77669DBE740F6FC7420684FF01026DB\n:10042000401C23D02068401C0CD02068401C1FD0EA\n:100430002568206805F18005401C1BD027683879A5\n:10044000AA2819D040F6F8700168491C42D001680A\n:10045000491C45D00168491C3ED001680968491C07\n:100460003ED00168491C39D000683EE0B069DAE747\n:10047000B569DEE7B769E2E710212846FFF778FEA5\n:100480003968814222D12068401C05D0D4F8001080\n:1004900001F18002C03107E0B169F9E730B108CA63\n:1004A00051F8040D984201D1012000E000208A4259\n:1004B000F4D158B1286810B1042803D0FEE72846CB\n:1004C000FFF765FF3149686808600EE0FFF722FE1C\n:1004D00000F00EF87169BBE77169BFE7706904E06D\n:1004E0004FF480500168491C01D000F0CBFAFEE7C0\n:1004F000BFF34F8F26480168264A01F4E06111439B\n:100500000160BFF34F8F00BFFDE72DE9F0411746B3\n:100510000D460646002406E03046296800F054F8EF\n:10052000641C2D1D361DBC42F6D3BDE8F08140F69B\n:10053000FC700168491C04D0D0F800004FF48051D1\n:10054000FDE54FF010208069F8E74FF080510A690F\n:10055000496900684A43824201D810207047002050\n:10056000704770B50C4605464FF4806608E0284693\n:1005700000F017F8B44205D3A4F5806405F5805562\n:10058000002CF4D170BD0000F40A0000000000202F\n:100590000CED00E00400FA05144801680029FCD0C5\n:1005A0007047134A0221116010490B68002BFCD0E0\n:1005B0000F4B1B1D186008680028FCD0002010603D\n:1005C00008680028FCD07047094B10B501221A605A\n:1005D000064A1468002CFCD0016010680028FCD08A\n:1005E0000020186010680028FCD010BD00E4014015\n:1005F00004E5014070B50C46054600F073F810B9EB\n:1006000000F07EF828B121462846BDE8704000F091\n:1006100007B821462846BDE8704000F037B8000012\n:100620007FB5002200920192029203920A0B000B06\n:100630006946012302440AE0440900F01F0651F80C\n:10064000245003FA06F6354341F82450401C8242F8\n:10065000F2D80D490868009A10430860081D016827\n:10066000019A1143016000F03DF800280AD00649C4\n:1006700010310868029A10430860091D0868039A3F\n:10068000104308607FBD00000006004030B50F4CED\n:10069000002200BF04EB0213D3F800582DB9D3F8A1\n:1006A000045815B9D3F808581DB1521C082AF1D3C3\n:1006B00030BD082AFCD204EB0212C2F80008C3F8CD\n:1006C00004180220C3F8080830BD000000E0014013\n:1006D0004FF08050D0F83001082801D0002070473A\n:1006E000012070474FF08050D0F83011062905D016\n:1006F000D0F83001401C01D0002070470120704725\n:100700004FF08050D0F830010A2801D00020704707\n:100710000120704708208F490968095808471020B0\n:100720008C4909680958084714208A4909680958FA\n:100730000847182087490968095808473020854923\n:100740000968095808473820824909680958084744\n:100750003C20804909680958084740207D490968BC\n:100760000958084744207B49096809580847482028\n:1007700078490968095808474C207649096809589A\n:10078000084750207349096809580847542071499F\n:1007900009680958084758206E49096809580847E8\n:1007A0005C206C4909680958084760206949096854\n:1007B00009580847642067490968095808476820AC\n:1007C00064490968095808476C2062490968095852\n:1007D000084770205F4909680958084774205D4937\n:1007E00009680958084778205A490968095808478C\n:1007F0007C205849096809580847802055490968EC\n:10080000095808478420534909680958084788202F\n:1008100050490968095808478C204E490968095809\n:10082000084790204B4909680958084794204949CE\n:10083000096809580847982046490968095808472F\n:100840009C204449096809580847A0204149096883\n:1008500009580847A4203F49096809580847A820B3\n:100860003C49096809580847AC203A4909680958C1\n:100870000847B0203749096809580847B420354966\n:10088000096809580847B8203249096809580847D3\n:10089000BC203049096809580847C0202D4909681B\n:1008A00009580847C4202B49096809580847C82037\n:1008B0002849096809580847CC2026490968095879\n:1008C0000847D0202349096809580847D4202149FE\n:1008D000096809580847D8201E4909680958084777\n:1008E000DC201C49096809580847E02019490968B3\n:1008F00009580847E4201749096809580847E820BB\n:100900001449096809580847EC2012490968095830\n:100910000847F0200F49096809580847F4200D4995\n:10092000096809580847F8200A490968095808471A\n:10093000FC2008490968095808475FF48070054998\n:10094000096809580847000003480449024A034B54\n:100950007047000000000020000B0000000B0000AA\n:1009600040EA010310B59B070FD1042A0DD310C82C\n:1009700008C9121F9C42F8D020BA19BA884201D97E\n:10098000012010BD4FF0FF3010BD1AB1D30703D0C6\n:10099000521C07E0002010BD10F8013B11F8014B7C\n:1009A0001B1B07D110F8013B11F8014B1B1B01D198\n:1009B000921EF1D1184610BD02F0FF0343EA032254\n:1009C00042EA024200F005B87047704770474FF0A6\n:1009D00000020429C0F0128010F0030C00F01B800C\n:1009E000CCF1040CBCF1020F18BF00F8012BA8BF1A\n:1009F00020F8022BA1EB0C0100F00DB85FEAC17CDE\n:100A000024BF00F8012B00F8012B48BF00F8012B90\n:100A100070474FF0000200B51346944696462039C1\n:100A200022BFA0E80C50A0E80C50B1F12001BFF4A7\n:100A3000F7AF090728BFA0E80C5048BF0CC05DF80D\n:100A400004EB890028BF40F8042B08BF704748BF5B\n:100A500020F8022B11F0804F18BF00F8012B7047CF\n:100A6000014B1B68DB6818470000002009480A4951\n:100A70007047FFF7FBFFFFF745FB00BD20BFFDE719\n:100A8000064B1847064A1060016881F308884068E1\n:100A900000470000000B0000000B000017040000DE\n:100AA000000000201EF0040F0CBFEFF30881EFF3ED\n:100AB0000981886902380078182803D100E0000015\n:100AC000074A1047074A12682C3212681047000084\n:100AD00000B5054B1B68054A9B58984700BD0000B0\n:100AE0007703000000000020F00A0000040000006E\n:100AF000001000000000000000FFFFFF0090D00386\n:1010000080130020B157020069C00000175702008A\n:1010100069C0000069C0000069C000000000000055\n:101020000000000000000000000000000D58020059\n:1010300069C000000000000069C0000069C0000035\n:10104000755802007B58020069C0000069C00000AA\n:1010500069C0000069C0000069C0000069C00000EC\n:101060008158020069C0000069C000008758020072\n:1010700069C000008D580200935802009958020080\n:1010800069C0000069C0000069C0000069C00000BC\n:1010900069C0000069C0000069C0000069C00000AC\n:1010A00069C000009F58020069C0000069C00000CC\n:1010B00069C0000069C0000069C0000069C000008C\n:1010C000A558020069C0000069C0000069C00000A6\n:1010D00069C0000069C0000069C0000069C000006C\n:1010E00069C0000069C0000069C0000069C000005C\n:1010F00069C0000069C0000069C0000069C000004C\n:1011000069C0000069C0000000F002F824F03FFB55\n:101110000AA090E8000C82448344AAF10107DA4552\n:1011200001D124F034FBAFF2090EBAE80F0013F03E\n:10113000010F18BFFB1A43F001031847584C020077\n:10114000784C02000A444FF0000C10F8013B13F0F9\n:10115000070408BF10F8014B1D1108BF10F8015B10\n:10116000641E05D010F8016B641E01F8016BF9D103\n:1011700013F0080F1EBF10F8014BAD1C0C1B09D15A\n:101180006D1E58BF01F801CBFAD505E014F8016BCC\n:1011900001F8016B6D1EF9D59142D6D3704700005E\n:1011A0000023002400250026103A28BF78C1FBD870\n:1011B000520728BF30C148BF0B6070471FB500F011\n:1011C0003DF88DE80F001FBD1EF0040F0CBFEFF3BC\n:1011D0000880EFF30980014A10470000ABBF000010\n:1011E000F0B44046494652465B460FB402A0013077\n:1011F00001B50648004700BF01BC86460FBC8046CB\n:10120000894692469B46F0BC7047000009110000D9\n:101210008269034981614FF001001044704700006A\n:101220002512000001B41EB400B514F0CBFE01B4C9\n:101230000198864601BC01B01EBD000024F0A4BA8E\n:1012400070B51A4C054609202070A01C00F0D1F89A\n:101250005920A08029462046BDE8704008F0CEB84D\n:1012600008F0D7B870B50C461149097829B1A0F13A\n:1012700060015E2908D3012013E0602804D06928AA\n:1012800002D043F201000CE020CC0A4E94E80E009C\n:1012900006EB8000A0F58050241FD0F8806E284611\n:1012A000B047206070BD012070470000080000209A\n:1012B00018000020F05802003249884201D2012073\n:1012C00070470020704770B50446A0F500002E4E10\n:1012D000B0F1786F02D23444A4F500042948844266\n:1012E00001D2012500E0002500F043F848B125B9FE\n:1012F000B44204D32548006808E0012070BD0020F6\n:1013000070BD002DF9D1B442F9D321488442F6D200\n:10131000F3E710B50446A0F50000B0F1786F03D2F2\n:1013200019480444A4F5000400F023F84FF080416C\n:1013300030B11648006804E08C4204D2012003E07A\n:1013400013488442F8D2002080F0010010BD10B58F\n:1013500020B1FFF7DEFF08B1012010BD002010BD55\n:1013600010B520B1FFF7AFFF08B1012010BD00207C\n:1013700010BD084808490068884201D10120704723\n:101380000020704700600200000000201C000020C8\n:101390000800002054000020BEBAFECA10B5044662\n:1013A0000021012000F03DF800210B2000F039F869\n:1013B0000421192000F035F804210D2000F031F847\n:1013C00004210E2000F02DF804210F2000F029F850\n:1013D0000421C84300F025F80621162000F021F86A\n:1013E0000621152000F01DF82046FFF729FF0020F8\n:1013F00010BDB62101807047FFF732BF114870471A\n:1014000010487047104A10B514680F4B0F4A083344\n:101410001A60FFF727FF0C48001D046010BD7047DD\n:1014200070474907090E002804DB00F1E02080F82E\n:101430000014704700F00F0000F1E02080F8141D48\n:101440007047000003F9004210050240010000014E\n:10145000FE48002101604160018170472DE9F7439A\n:10146000044692B091464068FFF771FF40B1606852\n:10147000FFF776FF20B9607800F00300022801D062\n:10148000012000E00020F14E30724846FFF71BFFBC\n:1014900018B1102015B0BDE8F0834946012001F0D5\n:1014A0008EFE0028F6D101258DF842504FF4C05031\n:1014B000ADF84000002210A9284606F009FC0028DB\n:1014C000E8D18DF842504FF428504FF00008ADF8A5\n:1014D000400047461C216846CDF81C8024F0EFF8F8\n:1014E0009DF81C0008AA20F00F00401C20F0F0001E\n:1014F00010308DF81C0020788DF81D0061789DF863\n:101500001E0061F3420040F001008DF81E009DF8BE\n:1015100000000AA940F002008DF800002089ADF813\n:101520003000ADF83270608907AFADF834000B972A\n:10153000606810AC0E900A94684606F0BCF900286A\n:10154000A8D1BDF8200030808DF8425042F601202D\n:10155000ADF840009DF81E0008AA20F00600801C8F\n:1015600020F001008DF81E000220ADF83000ADF82B\n:10157000340013A80E900AA9684606F09CF90028CA\n:1015800088D1BDF820007080311D484600F033F945\n:10159000002887D18DF8425042F6A620ADF84000D1\n:1015A0001C216846CDF81C8024F089F89DF81C00A9\n:1015B000ADF8345020F00F00401C20F0F000103047\n:1015C0008DF81C009DF81D0008AA20F0FF008DF882\n:1015D0001D009DF81E000AA920F0060040F0010041\n:1015E000801C8DF81E009DF800008DF8445040F0DE\n:1015F00002008DF80000CDE90A4711A80E90ADF861\n:101600003050684606F057F9002899D1BDF82000FF\n:10161000F08000203EE73EB504460820ADF800000B\n:101620002046FFF750FE08B110203EBD21460120A4\n:1016300001F0C5FD0028F8D12088ADF804006088CD\n:10164000ADF80600A088ADF80800E088ADF80A0003\n:101650007E4801AB6A468088002106F035FDBDF862\n:1016600000100829E1D003203EBD1FB5044600202C\n:1016700002900820ADF80800CDF80CD02046FFF706\n:1016800022FE10B1102004B010BD704802AA81885B\n:101690004FF6FF7006F05AFF0028F4D1BDF808108D\n:1016A000082901D00320EEE7BDF800102180BDF825\n:1016B00002106180BDF80410A180BDF80610E18021\n:1016C000E1E701B582B00220ADF800005F4802AB4F\n:1016D0006A464088002106F0F7FCBDF80010022998\n:1016E00000D003200EBD1CB5002100910221ADF8F1\n:1016F00000100190FFF70DFE08B110201CBD5348EB\n:101700006A4641884FF6FF7006F020FFBDF80010D2\n:101710000229F3D003201CBDFEB54C4C06461546ED\n:10172000207A0F46C00705D00846FFF7CCFD18B158\n:101730001020FEBD0F20FEBDF82D01D90C20FEBDEE\n:101740003046FFF7C0FD18BB208801A905F0B8FDA1\n:101750000028F4D130788DF80500208801A906F022\n:1017600091FC0028EBD100909DF800009DF8051039\n:1017700040F002008DF80000090703D040F0080097\n:101780008DF800002088694606F019FC0028D6D1A3\n:10179000ADF8085020883B4602AA002106F094FCD0\n:1017A000BDF80810A942CAD00320FEBD7CB505468D\n:1017B0000020009001900888ADF800000C462846F3\n:1017C0000195FFF7C4FD18B92046FFF7A2FD08B147\n:1017D00010207CBD15B1BDF8000050B11B486A4611\n:1017E00001884FF6FF7006F0B1FEBDF800102180B1\n:1017F0007CBD0C207CBD30B593B0044600200D4666\n:101800000090142101A823F05AFF1C2108A823F0FE\n:1018100056FF9DF80000CDF808D020F00F00401CC6\n:1018200020F0F00010308DF800009DF8010020F04D\n:10183000FF008DF801009DF8200040F002008DF8B7\n:10184000200001208DF8460002E000002002002068\n:1018500042F60420ADF8440011A801902088ADF8AC\n:101860003C006088ADF83E00A088ADF84000E088FC\n:10187000ADF842009DF8020006AA20F00600801C88\n:1018800020F001008DF802000820ADF80C00ADF842\n:1018900010000FA8059001A908A806F00CF8002870\n:1018A00003D1BDF818002880002013B030BD00001F\n:1018B000F0B5007B059F1E4614460D46012800D05A\n:1018C000FFDF0C2030803A203880002C08D0287AA6\n:1018D000032806D0287B012800D0FFDF1720608175\n:1018E000F0BDA889FBE72DE9F04786B0144691F8D2\n:1018F0000C900E9A0D46B9F1010F0BD01021007B10\n:101900002E8A8846052807D0062833D0FFDF06B088\n:10191000BDE8F0870221F2E7E8890C2100EB4000E6\n:1019200001EB4000188033201080002CEFD0E889B4\n:10193000608100271AE00096688808F1020301AA76\n:10194000696900F084FF06EB0800801C07EB470183\n:1019500086B204EB4102BDF8040090810DF106014E\n:1019600040460E3212F0D3FD7F1CBFB26089B842F0\n:10197000E1D8CCE734201080E889B9F1010F11D00B\n:10198000122148430E301880002CC0D0E8896081B5\n:101990004846B9F1010F00D00220207300270DF155\n:1019A000040A1FE00621ECE70096688808F10203AC\n:1019B00001AA696900F04BFF06EB0800801C86B2A3\n:1019C000B9F1010F12D007EBC70004EB4000BDF8DE\n:1019D0000410C18110220AF10201103023F0CEFD63\n:1019E0007F1CBFB26089B842DED890E707EB4701A1\n:1019F00004EB4102BDF80400D0810AF10201404627\n:101A0000103212F084FDEBE72DE9F0470E4688B066\n:101A100090F80CC096F80C80378AF5890C20109944\n:101A200002F10C044FF0000ABCF1030F08D0BCF126\n:101A3000040F3ED0BCF1070F7DD0FFDF08B067E791\n:101A400005EB850C00EB4C00188031200880002A43\n:101A5000F4D0A8F1060000F0FF09558125E0182117\n:101A600001A823F02CFE00977088434601AA7169F3\n:101A700000F0EDFEBDF804002080BDF80600E08017\n:101A8000BDF808002081A21C0DF10A01484612F0A1\n:101A90003EFDB9F1000F00D018B184F804A0A4F8FD\n:101AA00002A007EB080087B20A346D1EADB2D6D291\n:101AB000C4E705EB850C00EB4C0018803220088051\n:101AC000002ABBD0A8F1050000F0FF09558137E0DE\n:101AD00000977088434601AA716900F0B8FE9DF82E\n:101AE0000600BDF80410E1802179420860F300018E\n:101AF00062F34101820862F38201C20862F3C3010A\n:101B0000020962F30411420962F34511820962F38A\n:101B100086112171C0096071BDF80700208122463D\n:101B20000DF10901484612F0F2FC18B184F802A048\n:101B3000A4F800A000E007E007EB080087B20A3431\n:101B40006D1EADB2C4D279E7A8F1020084B205FBE4\n:101B500008F000F10E0CA3F800C035230B80002A1A\n:101B6000A6D055819481009783B270880E32716936\n:101B700000F06DFE62E72DE9F84F1E460A9D0C4607\n:101B800081462AB1607A00F58070D080E0891081AA\n:101B900099F80C000C274FF000084FF00E0A0D28A2\n:101BA00073D2DFE800F09E070E1C28303846556AD5\n:101BB00073737300214648460095FFF779FEBDE830\n:101BC000F88F207B9146082802D0032800D0FFDF41\n:101BD000378030200AE000BFA9F80A80EFE7207BB9\n:101BE0009146042800D0FFDF378031202880B9F1EA\n:101BF000000FF1D1E3E7207B9146042800D0FFDFFE\n:101C000037803220F2E7207B9146022800D0FFDFA8\n:101C100037803320EAE7207B1746022800D0FFDF19\n:101C20003420A6F800A02880002FC8D0A7F80A808A\n:101C3000C5E7207B1746042800D0FFDF3520A6F833\n:101C400000A02880002FBAD04046A7F80A8012E0F2\n:101C5000207B1746052802D0062800D0FFDF102081\n:101C6000308036202880002FA9D0E0897881A7F81D\n:101C70000E80B9F80E00B881A1E7207B91460728B5\n:101C800000D0FFDF37803720B0E72AE04FF01200A6\n:101C900018804FF038001700288090D0E0897881B4\n:101CA000A7F80E80A7F8108099F80C000A2805D034\n:101CB0000B2809D00C280DD0FFDF80E7207B0A28F5\n:101CC00000D0FFDF01200AE0207B0B2800D0FFDFDF\n:101CD000042004E0207B0C2800D0FFDF05203873AF\n:101CE0006DE7FFDF6BE770B50C46054601F0ABFB17\n:101CF00020B10078222804D2082070BD43F20200EF\n:101D000070BD0521284610F075FE206008B1002046\n:101D100070BD032070BD30B44880087820F00F00FB\n:101D2000C01C20F0F000903001F8080B1DCA81E8BB\n:101D30001D0030BC07F0E3BB2DE9FF4784B000274E\n:101D40008246029707989046894612300AF0DCF9DD\n:101D5000401D20F00306079828B907A95046FFF751\n:101D6000C2FF002854D1B9F1000F05D00798017BBC\n:101D700019BB052504681BE098F80000092803D06A\n:101D80000D2812D0FFDF46E0079903254868B0B35D\n:101D9000497B42887143914239D98AB2B3B2011D5D\n:101DA00010F09BFC0446078002E0079C04250834E1\n:101DB0000CB1208810B1032D29D02CE00798012107\n:101DC00012300AF0D3F9ADF80C00024602AB2946F6\n:101DD000504608F000FA070001D1A01C02900798B5\n:101DE0003A461230C8F80400A8F802A003A94046F9\n:101DF000029B0AF0C8F9D8B10A2817D200E006E021\n:101E0000DFE800F007091414100B0D14141213204E\n:101E100014E6002012E6112010E608200EE643F238\n:101E200003000BE6072009E60D2007E6032005E680\n:101E3000BDF80C002346CDE900702A4650460799AC\n:101E400000F015FD57B9032D08D10798B3B2417BB7\n:101E5000406871438AB2011D10F053FCB9F1000FC4\n:101E6000D7D0079981F80C90D3E72DE9FE4F914622\n:101E70001A881C468A468046FAB102AB494608F0E9\n:101E8000AAF9050019D04046A61C278810F0F6FED6\n:101E90003246072629463B46009610F004FB208870\n:101EA0002346CDE900504A465146404600F0DFFC4B\n:101EB000002020800120BDE8FE8F0020FBE710B548\n:101EC00086B01C46AAB104238DF800301388ADF803\n:101ED00008305288ADF80A208A788DF80E200988DB\n:101EE000ADF80C1000236A462146FFF725FF06B027\n:101EF00010BD1020FBE770B50D46052110F07AFDEE\n:101F0000040000D1FFDF294604F11200BDE8704053\n:101F10000AF015B92DE9F8430D468046002607F072\n:101F2000EBFA04462878102878D2DFE800F0773BF7\n:101F30003453313112313131083131313131287975\n:101F4000001FC0B2022801D0102810D114BBFFDF3F\n:101F500035E004B9FFDF0521404610F04BFD007B62\n:101F6000032806D004280BD0072828D0FFDF072637\n:101F700055E02879801FC0B2022820D050B1F6E782\n:101F80002879401FC0B2022819D0102817D0EEE7D8\n:101F900004B9FFDF13E004B9FFDF287901280ED16F\n:101FA000172137E00521404610F024FD070000D13D\n:101FB000FFDF07F1120140460AF09EF82CB12A46D5\n:101FC00021464046FFF7A7FE29E01321404602F0D4\n:101FD000F7FC24E004B9FFDF0521404610F00AFDBC\n:101FE000060000D1FFDF694606F112000AF08EF804\n:101FF000060000D0FFDFA988172901D2172200E0D0\n:102000000A46BDF80000824202D9014602E005E01E\n:102010001729C5D3404600F03AFCD0E7FFDF304631\n:10202000BDE8F883401D20F0030219B102FB01F066\n:10203000001D00E000201044704713B5009848B11F\n:102040000024684610F0F3FA002C02D1F74A0099F8\n:1020500011601CBD01240020F4E72DE9F0470C4677\n:1020600015462421204623F02AFB05B9FFDFA87876\n:1020700060732888DFF8B4A3401D20F00301AF7817\n:102080008946DAF8000010F0F0FA060000D1FFDF10\n:102090004FF000082660A6F8008077B109FB07F131\n:1020A000091D0AD0DAF8000010F0DFFA060000D1AE\n:1020B000FFDF6660C6F8008001E0C4F8048029886C\n:1020C00004F11200BDE8F0470AF008B82DE9F04726\n:1020D000804601F112000D4681460AF015F8401DB8\n:1020E000D24F20F003026E7B14462968386810F046\n:1020F000E7FA3EB104FB06F2121D03D069683868A6\n:1021000010F0DEFA052010F01DFC0446052010F04A\n:1021100021FC201A012802D1386810F09BFA4946A8\n:102120004046BDE8F04709F0EEBF70B50546052111\n:1021300010F060FC040000D1FFDF04F1120128461A\n:10214000BDE8704009F0D8BF2DE9F04F91B04FF0D5\n:10215000000BADF834B0ADF804B047880C46054626\n:1021600092460521384610F045FC060000D1FFDFFD\n:1021700024B1A780A4F806B0A4F808B029780922F1\n:102180000B20B2EB111F7DD12A7A04F11001382700\n:102190004FF00C084FF001090391102A73D2DFE8C9\n:1021A00002F072F2F1F07F08D2888D9F3DDBF3EEF2\n:1021B000B6B6307B022800D0FFDFA88908EBC0014B\n:1021C000ADF804103021ADF83410002C25D060811A\n:1021D000B5F80E9000271DE004EBC708317C88F8A5\n:1021E0000E10F189A8F80C10CDF80090688804232F\n:1021F00004AA296900F02BFBBDF81010A8F81010F4\n:1022000009F10400BDF812107F1C1FFA80F9A8F82C\n:102210001210BFB26089B842DED80DE1307B0228CF\n:1022200000D0FFDFE98908EBC100ADF804003020E1\n:10223000ADF83400287B0A90001FC0B20F90002C2C\n:10224000EBD06181B5F81090002725E0CDF8009023\n:102250006888696903AA0A9B00F0F9FA0A9804EBF6\n:10226000C70848441FFA80F908F10C0204A90F9826\n:1022700012F04DF918B188F80EB0A8F80CB0BDF8FE\n:102280000C1001E0D4E0CFE0A8F81010BDF80E105B\n:102290007F1CA8F81210BFB26089B842D6D8CBE034\n:1022A0000DA8009001AB224629463046FFF71BFBE4\n:1022B000C2E0307B082805D0FFDF03E0307B082830\n:1022C00000D0FFDFE8891030ADF804003620ADF80B\n:1022D0003400002C3FD0A9896181F189A18127E0D8\n:1022E000307B092800D0FFDFA88900F10C01ADF890\n:1022F00004103721ADF83410002C2CD06081E8890F\n:102300000090AB89688804F10C02296956E0E889DD\n:102310003921103080B2ADF80400ADF83410002C33\n:1023200074D0A9896181287A0E280AD002212173EC\n:10233000E989E181288A0090EB8968886969039AB4\n:102340003CE00121F3E70DA8009001AB22462946AD\n:102350003046FFF759FB6FE0307B0A2800D0FFDFE3\n:102360001220ADF80400ADF834704CB3A989618136\n:10237000A4F810B0A4F80EB084F80C905CE020E053\n:1023800002E031E039E042E0307B0B2800D0FFDF93\n:10239000288AADF834701230ADF8040084B10421FD\n:1023A0002173A9896181E989E181298A2182688A69\n:1023B00000902B8A688804F11202696900F047FADC\n:1023C0003AE0307B0C2800D0FFDF1220ADF804008B\n:1023D000ADF834703CB305212173A4F80AB0A4F819\n:1023E0000EB0A4F810B027E00DA8009001AB224673\n:1023F00029463046FFF75CFA1EE00DA8009001ABBD\n:10240000224629463046FFF7B6FB15E034E03B2173\n:10241000ADF80400ADF8341074B3A4F80690A4F835\n:1024200008B084F80AB007E0FFDF05E010000020E4\n:10243000297A012917D0FFDFBDF80400AAF80000AF\n:102440006CB1BDF834002080BDF804006080BDF898\n:102450003400392803D03C2801D086F80CB011B0E4\n:102460000020BDE8F08F3C21ADF80400ADF8341039\n:1024700014B1697AA172DFE7AAF80000EFE72DE94D\n:10248000F84356880F46804615460521304610F021\n:10249000B1FA040000D1FFDF123400943B464146FC\n:1024A00030466A6809F0A3FFBAE570B50D4605210C\n:1024B00010F0A0FA040000D1FFDF294604F1120059\n:1024C000BDE8704009F02DBE70B50D46052110F035\n:1024D00091FA040000D1FFDF294604F11200BDE8A3\n:1024E000704009F04BBE70B50546052110F082FA28\n:1024F000040000D1FFDF04F1080321462846BDE8AF\n:1025000070400422B1E470B50546052110F072FA5E\n:10251000040000D1FFDF214628462368BDE8704053\n:102520000522A2E470B50646052110F063FA040006\n:1025300000D1FFDF04F1120009F0E6FD401D20F09C\n:10254000030511E0011D008803224318214630468F\n:10255000FFF78BFC00280BD0607BABB2684382B2E4\n:102560006068011D10F003F9606841880029E9D115\n:1025700070BD70B50E46054606F0BEFF040000D1E2\n:10258000FFDF0120207266726580207820F00F0046\n:10259000C01C20F0F00030302070BDE8704006F024\n:1025A000AEBF2DE9F0438BB00D461446814606A917\n:1025B000FFF799FB002814D14FF6FF7601274FF45F\n:1025C00020588CB103208DF800001020ADF81000C9\n:1025D00007A8059007AA204604A911F0B7FF78B113\n:1025E00007200BB0BDE8F0830820ADF808508DF847\n:1025F0000E708DF80000ADF80A60ADF80C800CE0AC\n:102600000698A17801742188C1818DF80E70ADF80B\n:102610000850ADF80C80ADF80A606A4602214846C1\n:10262000069BFFF789FBDCE708B501228DF8022045\n:1026300042F60202ADF800200A4603236946FFF77E\n:102640003EFC08BD08B501228DF8022042F60302C7\n:10265000ADF800200A4604236946FFF730FC08BDA8\n:1026600000B587B079B102228DF800200A88ADF854\n:1026700008204988ADF80A1000236A460521FFF7B3\n:102680005BFB07B000BD1020FBE709B1072316E490\n:102690000720704770B588B00D461446064606A957\n:1026A000FFF721FB00280ED17CB10620ADF80850C1\n:1026B0008DF80000ADF80A40069B6A460821DC81CF\n:1026C0003046FFF739FB08B070BD05208DF80000DB\n:1026D000ADF80850F0E700B587B059B107238DF881\n:1026E0000030ADF80820039100236A460921FFF766\n:1026F00023FBC6E71020C4E770B588B00C46064639\n:10270000002506A9FFF7EFFA0028DCD10698012181\n:10271000123009F02BFD9CB12178062921D2DFE887\n:1027200001F0200505160318801E80B2C01EE28845\n:1027300080B20AB1A3681BB1824203D90C20C2E760\n:102740001020C0E7042904D0A08850B901E0062079\n:10275000B9E7012913D0022905D004291CD0052985\n:102760002AD00720AFE709208DF800006088ADF877\n:102770000800E088ADF80A00A068039023E00A2072\n:102780008DF800006088ADF80800E088ADF80A0018\n:10279000A0680A25039016E00B208DF800006088E1\n:1027A000ADF80800A088ADF80A00E088ADF80C008C\n:1027B000A0680B25049006E00C208DF800006078DE\n:1027C0008DF808000C256A4629463046069BFFF71F\n:1027D000B3FA78E700B587B00D228DF80020ADF888\n:1027E000081000236A461946FFF7A6FA49E700B524\n:1027F00087B071B102228DF800200A88ADF8082058\n:102800004988ADF80A1000236A460621FFF794FABA\n:1028100037E7102035E770B586B0064601200D4633\n:10282000ADF808108DF80000014600236A463046D6\n:10283000FFF782FA040008D12946304605F05EFC15\n:102840000021304605F078FC204606B070BDF8B592\n:102850001C4615460E46069F10F0FEF92346FF1D46\n:10286000BCB231462A4600940FF0E9FDF8BD30B401\n:102870001146DDE902423CB1032903D0002330BCFC\n:1028800008F034BB0123FAE71A8030BC704770B5FA\n:102890000C460546FFF72FFB2146284605F03DFC78\n:1028A0002846BDE87040012105F046BC4FF0E0220B\n:1028B0004FF400400021C2F88001BFF34F8FBFF3F7\n:1028C0006F8F1748016001601649900208607047D9\n:1028D000134900B500220A600A60124B4FF0607283\n:1028E0001A60002808BF00BD0F4A104BDFF840C037\n:1028F00001280CD002281CBFFFDF00BD03200860A8\n:102900001A604FF4000000BFCCF8000000BD0220A8\n:1029100008601A604FF04070F6E700B5FFDF00BDB9\n:1029200000F5004008F50140A002002014F5004029\n:1029300004F5014070B50B2000F0BDF9082000F04F\n:10294000BAF900210B2000F0D4F90021082000F092\n:10295000D0F9F44C01256560A5600020C4F8400161\n:10296000C4F84401C4F848010B2000F0B5F9082070\n:1029700000F0B2F90B2000F091F9256070BD10B5A0\n:102980000B2000F098F9082000F095F9E5480121A6\n:1029900041608160E4490A68002AFCD10021C0F846\n:1029A0004011C0F84411C0F848110B2000F094F910\n:1029B000BDE81040082000F08FB910B50B2000F0E2\n:1029C0008BF9BDE81040082000F086B900B530B1A1\n:1029D000012806D0022806D0FFDF002000BDD34822\n:1029E00000BDD34800BDD248001D00BD70B5D1491F\n:1029F0004FF000400860D04DC00BC5F80803CF4829\n:102A000000240460C5F840410820C43500F053F9A3\n:102A1000C5F83C41CA48047070BD08B5C14A0021E0\n:102A200028B1012811D002281CD0FFDF08BD4FF4C7\n:102A30008030C2F80803C2F84803BB483C3001604C\n:102A4000C2F84011BDE80840D0E74FF40030C2F8AA\n:102A50000803C2F84803B44840300160C2F844118A\n:102A6000B3480CE04FF48020C2F80803C2F84803D2\n:102A7000AD4844300160C2F84811AD48001D0068FF\n:102A8000009008BD70B516460D460446022800D9D0\n:102A9000FFDF0022A348012304F110018B4000EB6B\n:102AA0008401C1F8405526B1C1F84021C0F8043373\n:102AB00003E0C0F80833C1F84021C0F8443370BDCA\n:102AC0002DE9F0411D46144630B1012833D00228CB\n:102AD00038D0FFDFBDE8F081891E002221F07F4160\n:102AE0001046FFF7CFFF012D23D00020944D924FC9\n:102AF000012668703E61914900203C39086002203F\n:102B0000091D08608D490420303908608B483D3428\n:102B1000046008206C6000F0DFF83004C7F804039C\n:102B2000082000F0BBF88349F007091F08602E70E9\n:102B3000D0E70120DAE7012B02D00022012005E0D6\n:102B40000122FBE7012B04D000220220BDE8F04166\n:102B500098E70122F9E774480068704770B500F003\n:102B6000D8F8704C0546D4F840010026012809D158\n:102B7000D4F80803C00305D54FF48030C4F8080327\n:102B8000C4F84061D4F8440101280CD1D4F80803FA\n:102B9000800308D54FF40030C4F80803C4F844613A\n:102BA000012012F0A9FCD4F8480101280CD1D4F876\n:102BB0000803400308D54FF48020C4F80803C4F884\n:102BC0004861022012F098FC5E48056070BD70B547\n:102BD00000F09FF85A4D0446287850B1FFF706FFE1\n:102BE000687818B10020687012F086FC55480460BF\n:102BF00070BD0320F8E74FF0E0214FF40010C1F85A\n:102C000000027047152000F067B84B4901200861A9\n:102C1000082000F061B848494FF47C10C1F808035F\n:102C20000020024601EB8003C3F84025C3F8402191\n:102C3000401CC0B20628F5D37047410A43F609523A\n:102C40005143C0F3080010FB02F000F5807001EB67\n:102C50005020704710B5430B48F2376463431B0C98\n:102C60005C020C60384C03FB0400384B4CF2F72438\n:102C700043435B0D13FB04F404EB402000F580702C\n:102C80004012107008681844086010BD2C48406855\n:102C9000704729490120C1F800027047002809DB6C\n:102CA00000F01F02012191404009800000F1E02066\n:102CB000C0F80011704700280DDB00F01F02012151\n:102CC00091404009800000F1E020C0F88011BFF37E\n:102CD0004F8FBFF36F8F7047002809DB00F01F0292\n:102CE000012191404009800000F1E020C0F88012ED\n:102CF00070474907090E002804DB00F1E02080F846\n:102D00000014704700F00F0000F1E02080F8141D5F\n:102D100070470C48001F00680A4A0D49121D1160D7\n:102D20007047000000B0004004B500404081004002\n:102D300044B1004008F5014000800040408500405B\n:102D40003400002014050240F7C2FFFF6F0C0100A1\n:102D5000010000010A4810B5046809490948083112\n:102D6000086012F05DFC0648001D046010BD0649B5\n:102D7000002008604FF0E0210220C1F88002704777\n:102D80001005024001000001FC1F004010B50D209D\n:102D900000F077F8C4B26FF0040000F072F8C0B22F\n:102DA000844200D0FFDF3E490120086010BD70B5AD\n:102DB0000D2000F048F83B4C0020C4F8000101252C\n:102DC000C4F804530D2000F04FF825604FF0E021C7\n:102DD0006014C1F8000170BD10B50D2000F033F88B\n:102DE0003048012141600021C0F80011BDE81040C9\n:102DF0000D2000F039B82C4810B504682A492B483A\n:102E0000083108602749D1F80001012804D0FFDF0C\n:102E10002548001D046010BD2148001D00680022E7\n:102E2000C0B2C1F8002113F047F8F1E710B51D4812\n:102E3000D0F800110029FBD0FFF7DDFFBDE81040FE\n:102E40000D2000F011B800280DDB00F01F02012159\n:102E500091404009800000F1E020C0F88011BFF3EC\n:102E60004F8FBFF36F8F7047002809DB00F01F0200\n:102E7000012191404009800000F1E020C0F880125B\n:102E80007047002804DB00F1E02090F8000405E022\n:102E900000F00F0000F1E02090F8140D4009704799\n:102EA00004D5004000D000401005024001000001A0\n:102EB0004FF0E0214FF00070C1F8800101F5C071C2\n:102EC000BFF34F8FBFF36F8FC1F80001384B8022E3\n:102ED00083F8002441F8800C704700B502460420B6\n:102EE000344903E001EBC0031B792BB1401EC0B293\n:102EF000F8D2FFDFFF2000BD41F8302001EBC00118\n:102F000000224A718A7101220A7100BD294A0021FA\n:102F100002EBC0000171704710B50446042800D3CD\n:102F2000FFDF244800EBC4042079012800D0FFDF34\n:102F30006079A179401CC0B2814200D060714FF02D\n:102F4000E0214FF00070C1F8000210BD2DE9F04102\n:102F500019480568184919480831086014480426BA\n:102F600090F80004134F4009154C042818D0FFDFD7\n:102F700016E0217807EBC1000279012A08D14279D5\n:102F800083799A4204D04279827157F831008047A0\n:102F90002078401CC0B22070042801D3002020708B\n:102FA000761EF6B2E5D20448001D0560BDE8F0814A\n:102FB00019E000E0D80500201005024001000001E2\n:102FC000500000200548064A0168914201D10021C5\n:102FD000016004490120086070470000540000208F\n:102FE000BEBAFECA40E5014070B50C46054609F080\n:102FF0009BFB21462846BDE870400AF080BC704724\n:103000002CFFFFFFDBE5B15100600200B600FFFFBF\n:103010008C00000069915B00935FFEEDA0843C731F\n:10302000F87462145E06C0CB72F2136030B5F84DCE\n:103030000446062CA9780ED2DFE804F0030E0E0E2B\n:103040000509FFDF08E0022906D0FFDF04E00329BD\n:1030500002D0FFDF00E0FFDFAC7030BD30B50446CA\n:103060001038EB4D07280CD2DFE800F0040C060CFA\n:103070000C0C0C00FFDF05E0287E112802D0FFDFDA\n:1030800000E0FFDF2C7630BD2DE9F04111F0C8FBE8\n:10309000044612F0A1FD201AC5B206200FF052FC22\n:1030A000044606200FF056FC211AD94C207E122827\n:1030B00018D000200F1807200FF044FC0646072008\n:1030C0000FF048FC301A3918207E13280CD000204D\n:1030D0000144A078042809D000200844281AC0B26E\n:1030E000BDE8F0810120E5E70120F1E70120F4E7E8\n:1030F000C74810B590F825004108C54800F12600E2\n:1031000005D00DF018FBBDE8104006F00BB80DF02F\n:10311000F3FAF8E730B50446A1F120000D460A287D\n:103120004AD2DFE800F005070C1C2328353A3F445B\n:10313000FFDF42E0207820283FD1FFDF3DE0B448A8\n:103140008178052939D0007E122836D020782428AD\n:1031500033D0252831D023282FD0FFDF2DE0207851\n:1031600022282AD0232828D8FFDF26E0207822280A\n:1031700023D0FFDF21E0207822281ED024281CD075\n:1031800026281AD0272818D0292816D0FFDF14E0C7\n:103190002078252811D0FFDF0FE0207825280CD0DB\n:1031A000FFDF0AE02078252807D0FFDF05E0207840\n:1031B000282802D0FFDF00E0FFDF257030BD1FB5FB\n:1031C00004466A46002001F03CFEB4B1BDF802207E\n:1031D0004FF6FF700621824201D1ADF80210BDF812\n:1031E0000420824201D1ADF80410BDF808108142DC\n:1031F00003D14FF44860ADF8080068460EF014F9AA\n:1032000005F090FF04B010BD70B514460D4606469B\n:10321000FEF759F858B90DB1A54201D90C2070BD7F\n:10322000002408E056F82400FEF74DF808B11020FD\n:1032300070BD641CE4B2AC42F4D3002070BD2DE933\n:10324000F04105461F4690460E4600240068FEF7F2\n:1032500087F830B9A98828680844401EFEF780F82E\n:1032600008B110203CE728680028A88802D0B8429E\n:1032700002D850E00028F5D0092031E72968085D20\n:10328000B8B1671CCA5D152A2ED03CDC152A3AD28B\n:10329000DFE802F03912222228282A2A313139396E\n:1032A00039393939393939392200085D30BB641C64\n:1032B000A4B2A242F9D833E00228DDD1A01C085CF8\n:1032C00088F80000072801D2400701D40A2007E748\n:1032D000307840F0010015E0C143C90707E001283C\n:1032E00007D010E00620FBE60107A1F1805100297C\n:1032F000F5D01846F4E63078810701D50B20EFE6CB\n:1033000040F0020030702868005D384484B2A8881C\n:10331000A04202D2B0E74FF4485382B2A242ADD8E5\n:103320000020DDE610B5027843F2022354080122A2\n:10333000022C12D003DC3CB1012C16D106E0032C88\n:1033400010D07F2C11D112E0002011E080790324ED\n:10335000B4EB901F09D10A700BE08079B2EB901F9B\n:1033600003D1F8E780798009F5D0184610BDFF2019\n:103370000870002010BD08B500208DF8000024481A\n:1033800090F82E1049B190F82F0002280ED0032893\n:103390000ED0FFDF9DF8000008BD1D4869462530AE\n:1033A00001F09EFD0028F5D0FFDFF3E7032000E0E9\n:1033B00001208DF80000EDE738B50C46054669465A\n:1033C00001F08EFD00280DD19DF80010207861F3EA\n:1033D0004700207055F8010FC4F80100A888A4F830\n:1033E0000500002038BD38B51378A8B1022813D0E5\n:1033F000FF281AD007A46D46246800944C7905EB89\n:103400009414247864F347031370032809D00FE061\n:10341000EC0100200302FF0123F0FE0313700228D9\n:10342000F3D1D8B240F0010005E043F0FE00107087\n:10343000107820F0010010700868C2F80100888838\n:10344000A2F8050038BD02210FF0D4BA38B50C46F9\n:103450000978222901D2082038BDADF800008DF886\n:10346000022068460DF0A9F905F05CFE050003D1C5\n:1034700021212046FFF74EFE284638BD1CB500200E\n:103480008DF80000CDF80100ADF80500FB4890F87C\n:103490002E00022801D0012000E000208DF8070056\n:1034A00068460DF0FAFA002800D0FFDF1CBD0022AC\n:1034B0000A80437892B263F3451222F040020A80F8\n:1034C00000780C282BD2DFE800F02A06090E11162E\n:1034D000191C1F220C2742F0110009E042F01D00C8\n:1034E00008800020704742F0110012E042F0100006\n:1034F00040F00200F4E742F01000F1E742F0010072\n:10350000EEE742F0010004E042F00200E8E742F09A\n:10351000020040F00400E3E742F00400E0E7072087\n:1035200070472DE9FF478AB00025BDF82C60824620\n:103530001C4691468DF81C50700703D56068FDF756\n:10354000C2FE68B9CD4F4FF0010897F82E0058B170\n:1035500097F82F00022807D16068FDF701FF18B126\n:1035600010200EB0BDE8F087300702D5A089802872\n:103570003ED8700705D4B9F1000F02D097F82400A7\n:10358000A0B3E07DC0F300108DF81B00627D072022\n:10359000032162B3012A2DD0022AE2D0042AE0D10D\n:1035A0008DF81710F00628D4A27D07202AB3012A2F\n:1035B00023D0022A24D0042AD3D18DF8191000BFB9\n:1035C0008DF81590606810B307A9FFF7ABFE0028CF\n:1035D000C7D19DF81C00FF2816D0606850F8011F65\n:1035E000CDF80F108088ADF8130014E000E001E082\n:1035F0000720B6E78DF81780D4E78DF81980DFE74C\n:1036000002208DF81900DBE743F20220A9E7CDF88C\n:103610000F50ADF81350E07B40B9207C30B9607C8E\n:1036200020B9A07C10B9E07CC00601D0062098E744\n:103630008DF800A0BDF82C00ADF80200A068019044\n:10364000A068029004F10F0001F03EFC8DF80C0020\n:10365000FFF791FE8DF80D009DF81C008DF80E000F\n:103660008DF816508DF81850E07D08A900F00F0075\n:103670008DF81A0068460EF015F805F053FD70E756\n:10368000F0B58FB000258DF830508DF814508DF8BE\n:10369000345006468DF828500195029503950495FF\n:1036A00019B10FC901AC84E80F00744CA07805284B\n:1036B00001D004280CD101986168884200D120B95A\n:1036C0000398E168884203D110B108200FB0F0BD23\n:1036D000207DC00601D51F2700E0FF273B460DAA2D\n:1036E00005A903A8FFF7ABFD0028EFD1A08AC10709\n:1036F00002D0C00600D4EE273B460AAA0CA901A8B6\n:10370000FFF79DFD0028E1D19DF81400C00701D00E\n:103710000A20DBE7A08A410708D4A17D31B19DF8DA\n:103720002810890702D043F20120CFE79DF8281026\n:10373000C90709D0400707D4208818B144F2506166\n:10374000884201D90720C1E78DF818508DF819601B\n:10375000BDF80800ADF81A000198079006A80DF012\n:10376000BBFF05F0DFFC0028B0D18DF820508DF8AC\n:103770002160BDF81000ADF822000398099008A858\n:103780000DF0C9FF05F0CEFC00289FD101AD241D2E\n:1037900095E80F0084E80F00002097E770B586B029\n:1037A0000D46040005D0FDF7DBFD20B1102006B06A\n:1037B00070BD0820FBE72078C107A98802D0FF2947\n:1037C00002D303E01F2901D20920F0E7800763D468\n:1037D000FFF75AFC38B12178C1F3C100012804D0A9\n:1037E000032802D005E01320E1E7244890F82400E4\n:1037F000C8B1C8074FF001064FF0000502D08DF8A0\n:103800000F6001E08DF80F50FFF7B5FD8DF8000057\n:1038100020786946C0F3C1008DF8010060788DF80A\n:103820000250C20801D00720C1E730B3C20701D05F\n:103830008DF80260820705D59DF8022042F0020251\n:103840008DF80220400705D59DF8020040F00400E5\n:103850008DF80200002022780B18C2F38002DA7083\n:1038600001EB40026388D380401CA388C0B253811F\n:103870000228F0D3207A78B905E001E0EC010020BD\n:103880008DF80260E6E7607A30B9A07A20B9E07A74\n:1038900010B9207BC00601D0062088E704F108009B\n:1038A00001F012FB8DF80E0068460DF0BFFA05F02E\n:1038B00039FC002889D18DF810608DF81150E0880E\n:1038C000ADF81200ADF8145004A80DF002FB05F09D\n:1038D00029FC002888D12078C00701D0152000E0FD\n:1038E0001320FFF7BBFB002061E72DE9FF47022013\n:1038F000FB4E8DF804000027708EADF80600B84628\n:1039000043F202094CE001A80EF0DBFF050006D0EF\n:10391000708EA8B3A6F83280ADF806803EE0039C16\n:10392000A07F01072DD504F124000090A28EBDF8E0\n:103930000800214604F1360301F05FFC050005D0C4\n:103940004D452AD0112D3CD0FFDF3AE0A07F20F07A\n:103950000801E07F420862F3C711A177810861F393\n:103960000000E07794F8210000F01F0084F82000A8\n:103970002078282826D129212046FFF7CBFB21E0FB\n:1039800014E040070AD5BDF8080004F10E0101F06B\n:10399000B1FA05000DD04D4510D100257F1CFFB2B6\n:1039A00002200EF0CFFF401CB842ACD8052D11D03C\n:1039B00008E0A07F20F00400A07703E0112D00D0E4\n:1039C000FFDF0025BDF806007086052D04D02846CF\n:1039D00004B0C7E5A6F832800020F9E770B50646C6\n:1039E000FFF731FD054605F087FD040000D1FFDF3C\n:1039F0006680207820F00F00801C20F0F00020303E\n:103A000020700320207295F83E006072BDE870407F\n:103A100005F075BD2DE9F04786B0040000D1FFDF49\n:103A20002078AF4D20F00F00801C20F0F0007030A7\n:103A3000207060680178491F1B2933D2DFE801F04C\n:103A4000FE32323255FD320EFDFD42FC323232780A\n:103A5000FCFCFBFA3232FCFCF9F8FC00C68830466C\n:103A6000FFF7F1FC0546304607F03EF9E0B160682B\n:103A7000007A85F83E0021212846FFF74BFB3046AF\n:103A8000FEF753FB304603F05BFE3146012012F097\n:103A9000D3FCA87F20F01000A877FFF726FF0028AE\n:103AA00000D0FFDF06B05DE5207820F0F000203088\n:103AB00020700320207266806068007A607205F0D2\n:103AC0001EFDD8E7C5882846FFF7BDFC00B9FFDF1B\n:103AD00060680079012800D0FFDF6068017A06B0D5\n:103AE0002846BDE8F04707F0DEBCC6883046FFF741\n:103AF000AAFC050000D1FFDF05F001FD606831463A\n:103B00000089288160684089688160688089A8810F\n:103B1000012012F091FC0020A875A87F00F003009E\n:103B20000228BFD1FFF7E1FE0028BBD0FFDFB9E7D5\n:103B300000790228B6D000B1FFDF05F0E0FC66682E\n:103B4000B6F806A0307A361D012806D0687E814678\n:103B500005F054FA070003D101E0E878F7E7FFDF4A\n:103B60000022022150460EF03CFF040000D1FFDF8E\n:103B700022212046FFF7CEFA3079012800D002201A\n:103B8000A17F804668F30101A177308B2081708B83\n:103B90006081B08BA08184F822908DF80880B8688D\n:103BA0000090F86801906A46032150460EF019FF14\n:103BB00000B9FFDFB888ADF81000B8788DF81200B2\n:103BC00004AA052150460EF00CFF00B9FFDFB888AB\n:103BD000ADF80C00F8788DF80E0003AA04215046C9\n:103BE0000EF0FFFE00B9FFDF062106F1120001F022\n:103BF0009FF940B37079800700D5FFDF7179E07DD0\n:103C000061F34700E075D6F80600A0617089A083D3\n:103C1000062106F10C0001F08BF9F0B195F82500B2\n:103C20004108607861F347006070D5F8260006E02F\n:103C30003EE036E06DE055E04AE02CE040E0C4F8BC\n:103C40000200688D12E0E07D20F0FE00801CE0752F\n:103C5000D6F81200A061F08AD9E7607820F0FE0063\n:103C6000801C6070F068C4F80200308AE080B8F10F\n:103C7000010F04D0B8F1020F05D0FFDF12E70320D7\n:103C8000FFF7D4F90EE7287E122800D0FFDF1120BD\n:103C9000FFF7E4F906E706B02046BDE8F04701F07B\n:103CA00035BD05F02CFC15F8300F40F0020005E0A2\n:103CB00005F025FC15F8300F40F004002870F1E6FF\n:103CC000287E132809D01528D8D11620FFF7C6F969\n:103CD00006B0BDE8F04705F012BC1420F6E700007E\n:103CE000EC010020A978052909D00429C6D105F0E6\n:103CF00006FC022006B0BDE8F047FFF797B900794F\n:103D00000028BBD0E87801F0C6F805F0F8FB0320E6\n:103D1000F0E7287E122802D1687E01F0BCF811205D\n:103D2000D4E72DE9F047054600784FF00008000978\n:103D3000DFF8C0A891460C464646012875D00228F7\n:103D400074D007280AD00A2871D0FFDFA9F80060D4\n:103D500014B1A4F800806680002003E4696801279C\n:103D600004F108000A784FF0020C4FF6FF73172A8F\n:103D70007ED00EDC142A32D006DC052A68D0092A4F\n:103D800010D0102A75D120E0152A73D0162AF9D147\n:103D9000F8E0183A082A6CD2DFE802F0F36B6B0AFD\n:103DA000CAF2DFF1C8884FF01208102621468DE1D3\n:103DB0004FF01C080A26BCB38888A0806868807908\n:103DC00020726868C0796072C0E74FF01B08142643\n:103DD00054B30320207268688088A080B6E70A790F\n:103DE0003C2AB3D00D1D4FF010082C26E4B1698891\n:103DF000A180298B6182298B2182698BA182A98B69\n:103E0000E1826B790246A91D1846FFF7ECFA297981\n:103E1000002001290CD084F80FC0FF212176E06139\n:103E200020626062A06291E70FE02EE151E18CE137\n:103E3000E77320760AF1040090E80E00DAF810002B\n:103E4000C4E90930C4E9071280E7A9F8006083E7F4\n:103E50002C264FF01D08002CF7D00546A380887B48\n:103E60002A880F1D60F300022A80887B400802E048\n:103E70009DE007E1BEE060F341022A80887B800874\n:103E800060F382022A80887BB91CC00860F3C302F9\n:103E90002A80B87A0011401C60F3041202F07F00FF\n:103EA00028807878AA1CFFF79EFA387D05F1090270\n:103EB00007F11501FFF797FA387B01F048F82874ED\n:103EC000787B01F044F86874F87EA874787AE87416\n:103ED000387F2875B87B6875388AE882DAF81C0064\n:103EE000A861B87A524697F808A0C0F34111012999\n:103EF00004D0108C504503D2824609E0FFDF10E069\n:103F0000022903D0288820F0600009E0504504D140\n:103F1000288820F06000403002E0288840F06000EF\n:103F20002880A4F824A0524607F11D01A86996E054\n:103F300011264FF02008002C87D0A380686804F178\n:103F40000A02007920726868007B607269688B1DC4\n:103F500048791946FFF747FAF8E60A264FF0210894\n:103F6000002CE9D08888A080686880792072686811\n:103F7000C07960729AF8301021F004019FE065E08A\n:103F80004CE06FE00B264FF02208002CD4D0C888FC\n:103F9000A0806868007920726868007A00F0D7FF16\n:103FA00060726868407A00F0D2FFA072CEE61C26EC\n:103FB0004FF02608002CBFD0A3806868407960725B\n:103FC0006868007AA0720AF1040090E80E00DAF83E\n:103FD0001000C4E90530C4E90312686800793C2880\n:103FE00003D0432803D0FFDFB0E62772AEE684F8A3\n:103FF00008C0ABE610264FF02408002C9CD088881F\n:10400000A0806868807920816868807A60816868AB\n:104010000089A08168688089E08197E610264FF0CA\n:104020002308002C88D08888A0806868C0882081F8\n:1040300068680089608168684089A08168688089B3\n:10404000E0819AF8301021F0020138E030264FF07C\n:104050002508002C85D0A38069682822496821F0B2\n:104060008DFA73E614264FF01B08002C8ED0A38027\n:10407000686800790128BAD02772DAE90710C4E924\n:10408000031063E64A46214660E0287A012803D0FF\n:10409000022817D0FFDF59E610264FF01F08002C2A\n:1040A00089D06888A080A8892081E8896081288AD1\n:1040B000A081688AE0819AF8301021F001018AF825\n:1040C000301043E64FF012081026688800F01DFFFC\n:1040D0003CE6287AC8B3012838D0022836D0032815\n:1040E00001D0FFDF32E609264FF01108002C85D001\n:1040F0006F883846FFF7A7F990F822A0A780687A62\n:104100002072042138460EF087FC052138460EF057\n:1041100083FC002138460EF07FFC012138460EF06A\n:104120007BFC032138460EF077FC022138460EF066\n:1041300073FC062138460EF06FFC072138460EF05E\n:104140006BFC504600F0A7FE00E6FFE72846BDE8FE\n:10415000F04701F065BC70B5012803D0052800D0F8\n:10416000FFDF70BD8DB22846FFF76DF9040000D166\n:10417000FFDF20782128F4D005F0BEF980B1017866\n:1041800021F00F01891C21F0F00110310170022192\n:10419000017245800020A075BDE8704005F0AFB900\n:1041A00021462846BDE870401322FFF74FB92DE99C\n:1041B000F04116460C00804600D1FFDF307820F039\n:1041C0000F00801C20F0F0001030307020780128A3\n:1041D00004D0022818D0FFDFBDE8F0814046FFF789\n:1041E00032F9050000D1FFDF0320A87505F087F93B\n:1041F00094E80F00083686E80F00FE4810F8301FDC\n:1042000041F001010170E7E74046FFF71CF90500A6\n:1042100000D1FFDFA1884FF6FF700027814202D155\n:10422000E288824203D0814201D1E08840B105F0AA\n:1042300066F994E80F00083686E80F00AF75CBE703\n:10424000A87D0128C8D178230022414612F04AF8FF\n:104250000220A875C0E738B505460C460846FDF7AC\n:1042600032F818BB203D062D4AD2DFE805F0031BCB\n:10427000373C42300021052012F0B4F808B111207B\n:1042800038BDA01C0DF023F904F04CFF050038D117\n:10429000002208231146052012F024F8052830D00A\n:1042A000FFDF2EE06068FDF752F808B1102038BD3E\n:1042B000618820886A460DF0C5FB04F033FF0500D5\n:1042C0001FD16068E8B1BDF80010018019E0A07846\n:1042D00000F0010120880DF0E6FB0EE0206801F0FF\n:1042E0004BFE05460DE0207800F001000CF0EDF9E2\n:1042F00003E0618820880DF020FB04F013FFF0E755\n:104300000725284638BD70B505460C460846FDF71A\n:1043100000F808B1102070BD202D07D0212D0DD040\n:10432000222D0BD0252D09D0072070BD2088A11C7F\n:104330000CF0A0FABDE8704004F0F4BE062070BD99\n:10434000AC482530704708B53421AA4821F0B7F9A8\n:104350000120FEF76BFE1120FEF780FEA54968469E\n:10436000263105F05FF8A3489DF8002010F8251FBE\n:1043700062F3470121F001010170002141724FF405\n:104380006171A0F8071002218172FEF7B1FE00B141\n:10439000FFDFFDF75DF801F084F908BD10B50C46AC\n:1043A0004021204621F069F9A07F20F00300A0778A\n:1043B000202020700020A07584F8230010BD7047D5\n:1043C0002DE9FC410746FCF77EFF10B11020BDE847\n:1043D000FC81884E06F12501D6F825000090B6F83C\n:1043E0002950ADF8045096F82B408DF80640384619\n:1043F000FEF7E2FF0028EAD1FEF77AFE0028E6D0B9\n:10440000009946F8251FB580B471E0E710B5044661\n:10441000FCF77FFF08B1102010BD76487549224691\n:1044200090F8250026314008FEF7DDFF002010BD82\n:104430003EB504460D460846FCF76BFF08B1102058\n:104440003EBD14B143F204003EBD6A4880780528A1\n:1044500003D0042801D008203EBD694602A80AF016\n:10446000AEFA2A4669469DF80800FEF7BCFF002018\n:104470003EBDFEB50D4604004FF0000711D00822E6\n:10448000FEF7C2FE002811D1002608E054F82600ED\n:104490006946FEF747FF002808D1761CF6B2AE4207\n:1044A000F4D30CF059F810B143F20320FEBD514E85\n:1044B00086F824700CB300271BE000BF54F82700D7\n:1044C00002A9FEF72FFF00B1FFDF9DF808008DF86D\n:1044D000000054F8270050F8011FCDF80110808823\n:1044E000ADF8050068460CF05CF800B1FFDF7F1CFA\n:1044F000FFB2AF42E2D386F824500020FEBD2DE982\n:10450000F0478AB01546894604001ED00F4608229F\n:104510002946FEF779FE002811D1002613E000BFDE\n:1045200054F826006946103000F0DAFC002806D165\n:104530003FB157F82600FCF7C6FE10B110200AB0B4\n:104540000BE4761CF6B2AE42EAD30026A5F10108D0\n:104550001CE000BF06F1010A0AF0FF0712E000BFED\n:1045600054F82600017C4A0854F827100B7CB2EB63\n:10457000530F05D106221130113120F0D3FF58B16D\n:104580007F1CFFB2AF42EBD30AF0FF064645E1DBEA\n:104590004E4624B1012003E043F20520CFE700207E\n:1045A0000CF024F810B90CF02DF810B143F20420EF\n:1045B000C5E774B300270DF1170828E054F8270069\n:1045C0006946103000F08CFC00B1FFDF54F8270082\n:1045D000102250F8111FCDF801108088ADF80500A9\n:1045E00054F827100DF1070020F0C8FFAEB156F8BF\n:1045F000271001E0EC0100201022404620F0BEFF11\n:1046000068460BF0B3FF00B1FFDF7F1CFFB2AF4283\n:10461000D4D3FEF733FF002091E7404601F0A0FC21\n:10462000EEE730B585B00446FCF74DFE18B960687A\n:10463000FCF796FE10B1102005B030BD60884AF23C\n:10464000B811884206D82078F84D28B1012806D044\n:10465000022804D00720EFE7FEF74AFD18E0607853\n:10466000022804D0032802D043F20220E4E785F8B0\n:104670002F00C1B200200090ADF8040002292CD018\n:10468000032927D0FFDF68460CF055F804F04AFDF7\n:104690000028D1D1606801F056FC207858B1012083\n:1046A0008DF800000DF1010001F05AFC68460DF094\n:1046B0005EFA00B1FFDF207885F82E00FEF7DEFEFF\n:1046C000608860B1A88580B20BF088FF00B1FFDF81\n:1046D0000020B1E78DF80500D5E74020FAE74FF458\n:1046E0006170EFE710B50446FCF713FE20B960686F\n:1046F00038B1FCF72CFE08B1102010BD606801F045\n:104700002FFCCA4830F82C1F6180C1786170807816\n:104710002070002010BD2DE9F84314468946064656\n:10472000FCF7F7FDA0B94846FCF71AFE80B9204611\n:10473000FCF716FE60B9BD4DA878012800D13CB148\n:104740003178FF2906D049B143F20400BDE8F8836F\n:104750001020FBE7012801D00420F7E7CCB305289F\n:1047600011D004280FD069462046FEF7A0FE00288D\n:10477000ECD1217D49B1012909D0022909D00329B1\n:1047800009D00720E2E70820E0E7024604E0012222\n:1047900002E0022200E00322804623461746002062\n:1047A0000099FEF7BEFE0028D0D1A0892880A07B0A\n:1047B000E875BDF80000A882AF75BDF800100907C4\n:1047C00001D5A18931B1A1892980C00704D0032076\n:1047D00003E006E08021F7E70220FEF727FC86F8D9\n:1047E00000804946BDE8F8430020FEF749BF7CB58C\n:1047F0008E4C05460E46A078022803D0032801D02F\n:1048000008207CBD15B143F204007CBD07200EF0EA\n:10481000A1F810B9A078032806D0FEF735FC28B11E\n:10482000A078032804D009E012207CBD13207CBDB1\n:10483000304600F013FB0028F9D1E670FEF79BFD2F\n:1048400009F0FAFF01208DF800008DF801008DF8C5\n:1048500002502088ADF80400E07D8DF8060068461F\n:104860000DF02EF804F05EFC0028E0D1A0780328BB\n:1048700004D00420FEF7DAFB00207CBDE07800F0D5\n:10488000FDFA0520F6E71CB510B143F204001CBD8B\n:10489000664CA078042803D0052801D008201CBD50\n:1048A00000208DF8000001218DF801108DF8020024\n:1048B00068460DF005F804F035FC0028EFD1A0782B\n:1048C000052805D05FF00200FEF7B0FB00201CBDFC\n:1048D000E07800F0E0FA0320F6E72DE9FC4180469D\n:1048E0000E4603250846FCF73BFD002866D14046EE\n:1048F000FEF7A9FD040004D02078222804D2082065\n:1049000065E543F2020062E5A07F00F003073EB1D7\n:10491000012F0CD000203146FEF751FC0500EFD1ED\n:10492000012F06D0022F1AD0FFDF28464FE50120C5\n:10493000F1E7A07D3146022801D011B107E0112036\n:1049400045E56846FCF791FE0028D9D16946404606\n:1049500006F06CFD0500E8D10120A075E5E7A07D1B\n:10496000032804D1314890F83000C00701D02EB39D\n:104970000EE026B1A07F40071ED4002100E00121F7\n:10498000404606F073FD0500CFD1A075002ECCD0B7\n:104990003146404600F0AEFA05461128C5D1A07F49\n:1049A0004107C2D4316844F80E1F7168616040F05D\n:1049B000040020740025B8E71125B6E7102006E5AD\n:1049C00070B50C460546FEF73EFD010005D02246B7\n:1049D0002846BDE87040FEF739BD43F2020070BDC5\n:1049E00010B5012807D1114B9B78012B00D011B1D4\n:1049F00043F2040010BD0BF023FEBDE8104004F0AC\n:104A000091BB012300F051BA00231A46194600F069\n:104A10004CBA70B506460C460846FCF754FC18B96B\n:104A20002068FCF776FC18B1102070BDEC01002066\n:104A3000F84D2A7E112A04D0132A00D33EB1082053\n:104A4000F3E721463046FEF7A9FE60B1EDE7092005\n:104A5000132A0DD0142A0BD0A188FF29E5D31520E5\n:104A6000FEF7FCFA0020D4E90012C5E90712DCE7E2\n:104A7000A1881F29D9D31320F2E71CB5E548007E91\n:104A8000132801D208201CBD00208DF800006846C4\n:104A90000CF01FFA04F046FB0028F4D11120FEF7B9\n:104AA000DDFA00201CBD2DE9F04FDFF868A3814638\n:104AB00091B09AF818009B4615460C46132803D36C\n:104AC000FFF7DBFF00281FD12046FCF7FCFBE8BB0B\n:104AD0002846FCF7F8FBC8BB20784FF00107C00759\n:104AE0004FF0000102D08DF83A7001E08DF83A10D5\n:104AF00020788846C0F3C1008DF8000060788DF8FA\n:104B00000910C10803D0072011B0BDE8F08FB0B381\n:104B1000C10701D08DF80970810705D59DF80910EE\n:104B200041F002018DF80910400705D59DF80900F4\n:104B300040F004008DF809009DF80900810703D5B5\n:104B400040F001008DF80900002000E015E06E46FD\n:104B500006EB400162884A81401CA288C0B20A82EA\n:104B60000328F5D32078C0F3C100012825D00328FD\n:104B700023D04846FCF7A7FB28B11020C4E7FFE785\n:104B80008DF80970D8E799F80000400808D001288E\n:104B900009D0022807D0032805D043F20220B3E74A\n:104BA0008DF8028001E08DF80270484650F8011F30\n:104BB000CDF803108088ADF80700FEF7DCFB8DF818\n:104BC00001000021424606EB41002B88C3826B881E\n:104BD0008383AB884384EB880385491CC285C9B2B3\n:104BE00082860329EFD3E088ADF83C0068460CF0DC\n:104BF000B5FA002887D19AF818005546112801D037\n:104C0000082081E706200DF0A5FE38B12078C0F31A\n:104C1000C100012804D0032802D006E0122073E767\n:104C200095F8240000283FF46EAFFEF72DFA022815\n:104C300001D2132068E7584600F010F900289DD1F2\n:104C400085F819B068460CF0C9FB04F06BFA040053\n:104C500094D1687E00F012F91220FEF7FFF9204689\n:104C600052E770B56B4D287E122801D00820DCE693\n:104C70000CF0B7FB04F056FA040005D1687E00F092\n:104C80000AF91120FEF7EAF92046CEE670B506468D\n:104C900015460C460846FCF73CFB18B92846FCF7BD\n:104CA00038FB08B11020C0E62A46214630460CF0F9\n:104CB000A9FE04F037FA0028F5D121787F29F2D136\n:104CC0000520B2E67CB505460C460846FCF7FBFA23\n:104CD00008B110207CBD2846FEF7B5FB20B1007856\n:104CE000222804D208207CBD43F202007CBD494842\n:104CF00090F83000400701D511207CBD2078C00815\n:104D000002D16078C00801D007207CBDADF800500A\n:104D100020788DF8020060788DF803000220ADF84D\n:104D2000040068460BF0B6FF04F0FCF97CBD70B5DA\n:104D300086B014460D460646FEF785FB28B100787E\n:104D4000222805D2082006B06FE643F20200FAE7F7\n:104D50002846FCF705FB20B944B12046FCF7F7FADA\n:104D600008B11020EFE700202060A080294890F8CB\n:104D70003000800701D51120E5E703A930460BF08C\n:104D8000CCFD10B104F0CEF9DDE7ADF80060BDF860\n:104D90001400ADF80200BDF81600ADF80400BDF82F\n:104DA0001000BDF81210ADF80600ADF808107DB186\n:104DB000298809B1ADF80610698809B1ADF802106B\n:104DC000A98809B1ADF80810E98809B1ADF8041057\n:104DD000DCB1BDF80610814201D9081A2080BDF867\n:104DE0000210BDF81400814201D9081A6080BDF894\n:104DF0000800BDF80410BDF816200144BDF81200EB\n:104E00001044814201D9081AA08068460BF044FE84\n:104E1000B8E70000EC0100201CB554490968CDE951\n:104E2000001068460CF09CF904F07CF91CBD1CB520\n:104E300000200090019068460CF092F904F072F99D\n:104E40001CBD10800888508048889080C8881081D8\n:104E50008888D080002050819081704710B504462A\n:104E600004F0CCF830B1407830B1204604F0EBFBD0\n:104E7000002010BD052010BD122010BD10B504F09B\n:104E8000BDF8040000D1FFDF607800B9FFDF607873\n:104E9000401E607010BD10B504F0B0F8040000D1E1\n:104EA000FFDF6078401C607010BD1CB5ADF80000DD\n:104EB0008DF802308DF803108DF8042068460CF050\n:104EC00064FD04F02FF91CBD0CB529A2D2E9001233\n:104ED000CDE900120079694601EB501000780CBD55\n:104EE0000278520804D0012A02D043F2022070470F\n:104EF000FEF718BA1FB56A46FFF7A3FF68460CF025\n:104F0000A3FA04F00FF904B010BD70B50C0006460A\n:104F10000DD0FEF798FA050000D1FFDFA6802889A2\n:104F20002081288960816889A081A889E0817CE549\n:104F300010B500231A4603E0845C2343521CD2B20E\n:104F40008A42F9D30BB1002010BD012010BD00B57D\n:104F500040B1012805D0022803D0032804D0FFDF88\n:104F6000002000BDFF2000BD042000BD645A0200E7\n:104F7000070605040302010010B50446FCF7A3F977\n:104F800008B1102010BD2078C0F30210042807D803\n:104F90006078072804D3A178102901D8814201D272\n:104FA000072010BDE078410706D421794A0703D4D1\n:104FB000000701D4080701D5062010BD002010BD50\n:104FC00010B513785C08837F64F3C7138377137875\n:104FD0009C08C37F64F30003C3771078C309487843\n:104FE00063F34100487013781C090B7864F347138E\n:104FF0000B701378DB0863F3000048705078487139\n:1050000010BD10B5C4780B7864F300030B70C4783E\n:10501000640864F341030B70C478A40864F382034A\n:105020000B70C478E40864F3C3030B700379117840\n:1050300063F30001117003795B0863F341011170A0\n:1050400003799B0863F3820111700079C00860F353\n:10505000C301117010BD70B514460D46064604F02C\n:105060004BFA80B10178182221F00F01891C21F040\n:10507000F001A03100F8081B214620F0C4FABDE879\n:10508000704004F03CBA29463046BDE87040132217\n:10509000FEF7DCB92DE9F047064608A8894690E8F6\n:1050A00030041F4690461421284620F008FB0021BA\n:1050B000CAF80010B8F1000F03D0B9F1000F03D106\n:1050C00014E03878C00711D02068FCF722F9C0BB83\n:1050D000B8F1000F07D12068123028602068143022\n:1050E00068602068A8602168CAF8001038788007D6\n:1050F00024D56068FCF72BF918BBB9F1000F21D05B\n:10510000FFF71EF90168C6F868118188A6F86C11CE\n:10511000807986F86E0101F0F8FCF94FEF60626863\n:1051200062B196F8680106F2691140081032FEF784\n:105130005AF910223946606820F020FA0020BDE8B4\n:10514000F08706E0606820B1E8606068C6F8640136\n:10515000F4E71020F3E730B5054608780C4620F058\n:105160000F00401C20F0F001103121700020607011\n:1051700095F8230030B104280FD0052811D0062857\n:1051800014D0FFDF20780121B1EB101F04D295F875\n:10519000200000F01F00607030BD21F0F0002030D2\n:1051A00002E021F0F00030302070EBE721F0F00059\n:1051B0004030F9E7F0B591B0022715460C46064697\n:1051C0003A46ADF80870092103AB05F004F80490E5\n:1051D000002810D004208DF804008DF80170E03410\n:1051E000099605948DF818500AA968460FF0F2F850\n:1051F00000B1FFDF012011B0F0BD10B588B00C4642\n:105200000A99ADF80000C3B11868CDF802005868DB\n:10521000CDF80600ADF80A20102203A820F0AEF960\n:1052200068460CF081F903F07DFF002803D1A17FCF\n:1052300041F01001A17708B010BD0020CDF80200A8\n:10524000E6E72DE9F84F0646808A0D4680B2824691\n:10525000FEF7F9F804463078DFF8A48200274FF013\n:105260000209A8F120080F2870D2DFE800F06FF2E1\n:105270003708387D8CC8F1F0EFF35FF3F300A07FBF\n:1052800000F00300022809D05FF0000080F0010167\n:1052900050460DF0AFFB050003D101E00120F5E71A\n:1052A000FFDF98F85C10C90702D0D8F860000BE067\n:1052B000032105F11D0010F0E0FDD5F81D00914916\n:1052C000B0FBF1F201FB1200C5F81D0070686867C1\n:1052D000B068A8672078252800D0FFDFCAE0A07F4B\n:1052E00000F00300022809D05FF0000080F0010107\n:1052F00050460DF07FFB060003D101E00120F5E7E9\n:10530000FFDF3078810702D52178252904D040F0CD\n:1053100001003070BDE8F88F85F80090307F28716B\n:1053200006F11D002D36C5E90206F3E7A07F00F067\n:105330000300022808D0002080F0010150460DF043\n:1053400059FB040004D102E00120F5E7A7E1FFDFEB\n:105350002078C10604D5072028703D346C60D9E759\n:1053600040F008002070D5E7E07F000700D5FFDFA0\n:10537000307CB28800F0010301B05046BDE8F04F28\n:10538000092105F0B3BD04B9FFDF716821B1102216\n:1053900004F1240020F0F2F828212046FDF7BAFE9F\n:1053A000A07F00F0030002280ED104F124000023A6\n:1053B00000901A4621465046FFF71FFF112807D0DC\n:1053C00029212046FDF7A6FE307A84F82000A1E7C7\n:1053D000A07F000700D5FFDF14F81E0F40F0080083\n:1053E0002070E782A761E761C109607861F341003D\n:1053F000014660F382016170307AE0708AE7A07F35\n:1054000000F00300022809D05FF0000080F00101E5\n:1054100050460DF0EFFA040003D101E00120F5E75A\n:10542000FFDF022104F1850010F027FD0420287021\n:1054300004F5B4706860B4F88500288230481038EC\n:105440007C346C61C5E9028064E703E024E15BE041\n:105450002DE015E0A07F00F00300022807D0002017\n:1054600080F0010150460DF0C5FA18B901E00120A5\n:10547000F6E7FFDF324621465046BDE8F84FEAE541\n:1054800004B9FFDF20782128A1D93079012803D180\n:10549000E07F40F00800E077324621465046FFF7B3\n:1054A000DAFD2046BDE8F84F2321FDF733BE3279FF\n:1054B000AA8005F108030921504604F08CFEE8603B\n:1054C00010B10520287025E7A07F00F00300022816\n:1054D00008D0002080F0010150460DF08BFA040046\n:1054E00003D101E00120F5E7FFDF04F162010223AF\n:1054F0001022081F0DF005F907703179417009E796\n:105500004C02002040420F00A07F00F00300022860\n:1055100008D0002080F0010150460DF06BFA050024\n:1055200003D101E00120F5E7FFDF95F8840000F0EA\n:10553000030001287AD1A07F00F00307E07F10F07C\n:10554000010602D0022F04D133E095F8A000C00775\n:105550002BD0D5F8601121B395F88320087C62F335\n:1055600087000874A17FCA09D5F8601162F3410071\n:105570000874D5F8601166F300000874AEB1D5F870\n:105580006001102204F1240188351FF0F7FF287E06\n:1055900040F001002876287820F0010005F88809FD\n:1055A00000E016B1022F04D02DE095F88800C00766\n:1055B00027D0D5F85C1121B395F88320087C62F3DD\n:1055C00087000874A17FCA09D5F85C1162F3410015\n:1055D0000874D5F85C1166F3000008748EB1D5F834\n:1055E0005C01102204F1240188351FF0C7FF2878E0\n:1055F00040F0010005F8180B287820F0010005F8AC\n:10560000A009022F44D0002000EB400005EBC000B1\n:1056100090F88800800709D595F87C00D5F86421BA\n:10562000400805F17D011032FDF7DDFE8DF8009098\n:1056300095F884006A4600F003008DF8010095F8A3\n:1056400088108DF8021095F8A0008DF8030021460F\n:10565000504601F043FA2078252805D0212807D0AC\n:10566000FFDF2078222803D922212046FDF752FDB2\n:10567000A07F00F0030002280CD0002080F0010180\n:1056800050460DF0C9F900283FF44FAEFFDF41E668\n:105690000120B9E70120F1E7706847703AE6FFDFC3\n:1056A00038E670B5FE4C002584F85C5025660EF097\n:1056B0005EFE04F11001204603F0DAFE84F830505B\n:1056C00070BD70B50D46FDF7BEFE040000D1FFDFD2\n:1056D0004FF4B87128461FF0F2FF04F1240028614E\n:1056E000A07F00F00300022808D0012105F1E000AE\n:1056F0000EF03EFE002800D0FFDF70BD0221F5E76E\n:105700000A46014602F1E0000EF052BE70B50546B1\n:10571000406886B001780A2906D00D2933D00E29B9\n:105720002FD0FFDF06B070BD86883046FDF78BFEB8\n:10573000040000D1FFDF20782128F3D028281BD1D6\n:10574000686802210E3001F0BEF9A8B1686808212E\n:10575000801D01F0B8F978B104F1240130460CF055\n:10576000B1F803F0DFFC00B1FFDF06B02046BDE872\n:1057700070402921FDF7CEBC06B0BDE8704003F0B3\n:10578000BEBE012101726868C6883046FDF75BFE27\n:10579000040000D1FFDFA07F00F00301022902D145\n:1057A00020F01000A077207821280AD06868017ABC\n:1057B00009B1007980B1A07F00F00300022862D017\n:1057C000FFDFA07F00F003000228ABD1FEF78DF8C9\n:1057D0000028A7D0FFDFA5E703F091FEA17F080610\n:1057E0002BD5E07FC00705D094F8200000F01F0003\n:1057F000102820D05FF0050084F8230020782928A5\n:105800001DD02428DDD13146042010F015FE2221C0\n:105810002046FDF77FFCA07F00F00300022830D077\n:105820005FF0000080F0010130460DF0F5F800282F\n:10583000C7D0FFDFC5E70620DEE70420DCE701F084\n:105840000300022808D0002080F0010130460DF04E\n:10585000D1F8050003D101E00120F5E7FFDF2521A4\n:105860002046FDF757FC03208DF80000694605F13E\n:10587000E0000EF094FD0228A3D00028A1D0FFDFA5\n:105880009FE70120CEE703F03AFE9AE72DE9F043C7\n:1058900087B09946164688460746FDF7D4FD0400B2\n:1058A0004BD02078222848D3232846D0E07F000719\n:1058B00043D4A07F00F00300022809D05FF000006D\n:1058C00080F0010138460DF095F8050002D00CE09B\n:1058D0000120F5E7A07F00F00300022805D0012198\n:1058E000002238460DF07DF805466946284601F04D\n:1058F0001CF9009800B9FFDF45B10098E03505615B\n:105900002078222806D0242804D007E0009900201F\n:10591000086103E025212046FDF7FCFB00980121EA\n:1059200041704762868001A9C0E902890EF052FDEC\n:10593000022802D0002800D0FFDF07B0BDE8F083C6\n:1059400070B586B00546FDF77EFD017822291ED987\n:10595000807F00F00300022808D0002080F00101C1\n:1059600028460DF047F804002FD101E00120F5E7AB\n:10597000FFDF2AE0B4F85E0004F1620630440178EB\n:10598000427829B121462846FFF714FCB0B9C9E690\n:10599000ADF804200921284602AB04F01CFC03905A\n:1059A0000028F4D005208DF80000694604F1E000DD\n:1059B0000EF0F5FC022801D000B1FFDF0223102217\n:1059C000314604F15E000CF0D2FEB4F8600000280D\n:1059D000D0D1A7E610B586B00446FDF734FD0178B6\n:1059E00022291BD9807F00F00300022808D0002064\n:1059F00080F0010120460CF0FDFF040003D101E01E\n:105A00000120F5E7FFDF06208DF80000694604F16C\n:105A1000E0000EF0C4FC002800D0FFDF06B010BD8F\n:105A20002DE9F05F05460C460027007890460109F5\n:105A30003E4604F1080BBA4602297DD0072902D060\n:105A40000A2909D146E0686801780A2905D00D299C\n:105A500030D00E292ED0FFDFBBE114271C26002CEE\n:105A60006BD08088A080FDF7EEFC5FEA000900D1D2\n:105A7000FFDF99F817005A46400809F11801FDF7B1\n:105A8000B2FC6868C0892082696851F8060FC4F8C2\n:105A900012004868C4F81600A07E20F0060001E05D\n:105AA0002C02002040F00100A07699F81E0040F082\n:105AB00020014DE01A270A26002CD1D0C088A080F2\n:105AC000FDF7C1FC050000D1FFDF59462846FFF76E\n:105AD00042FB7EE10CB1A88BA080287A0B287DD0F8\n:105AE00006DC01287BD0022808D0032804D135E049\n:105AF0000D2875D00E2874D0FFDF6AE11E27092615\n:105B0000002CADD0A088FDF79EFC5FEA000900D113\n:105B1000FFDF287B00F003000128207A1BD020F053\n:105B200001002072297B890861F341002072297BE2\n:105B3000C90861F3820001E041E1F2E02072297BB3\n:105B4000090961F3C300207299F81E0040F040017A\n:105B500089F81E103DE140F00100E2E713270D2611\n:105B6000002CAAD0A088FDF76EFC8146807F00F053\n:105B70000300022808D0002080F00101A0880CF06A\n:105B800039FF050003D101E00120F5E7FFDF99F8B7\n:105B90001E0000F00302022A50D0686F817801F0E5\n:105BA00003010129217A4BD021F001012172837870\n:105BB0009B0863F3410121728378DB0863F3820160\n:105BC000217283781B0963F3C3012172037863F3A5\n:105BD00006112172437863F3C71103E061E0A9E085\n:105BE00090E0A1E0217284F809A0C178A172022A94\n:105BF00029D00279E17A62F30001E1720279520858\n:105C000062F34101E1720279920862F38201E1726A\n:105C10000279D20862F3C301E1724279217B62F317\n:105C2000000121734279520862F3410121734279E4\n:105C3000920862F382012173407928E0A86FADE7F2\n:105C400041F00101B2E74279E17A62F30001E172C9\n:105C50004279520862F34101E1724279920862F39B\n:105C60008201E1724279D20862F3C301E1720279E2\n:105C7000217B62F3000121730279520862F3410132\n:105C800021730279920862F3820121730079C008BE\n:105C900060F3C301217399F80000232831D926212C\n:105CA00040E018271026E4B3A088FDF7CCFB83461C\n:105CB000807F00F00300022809D0002080F001015D\n:105CC000A0880CF097FE5FEA000903D101E00120F3\n:105CD000F4E7FFDFE868A06099F8000040F00401F5\n:105CE00089F8001099F80100800708D50120207379\n:105CF0009BF8000023286CD92721584651E084F8EE\n:105D00000CA066E015270F265CB1A088FDF79BFB71\n:105D1000814606225946E86808F0CBFA0120A073B4\n:105D2000A0E041E048463CE016270926E4B3287B82\n:105D300020724EE0287B19270E26ACB3C4F808A0C9\n:105D4000A4F80CA0012807D0022805D0032805D00C\n:105D5000042803D0FFDF0DE0207207E0697B0428F0\n:105D600001F00F0141F0800121721ED0607A20F015\n:105D700003006072A088FDF766FB054600782128C5\n:105D800027D0232800D0FFDFA87F00F003000228DF\n:105D900013D0002080F00101A0880CF03DFE2221EC\n:105DA0002846FDF7B7F914E004E0607A20F003001C\n:105DB000401CDEE7A8F8006010E00120EAE70CB123\n:105DC0006888A080287A68B301280AD002284FD0BA\n:105DD000FFDFA8F800600CB1278066800020BDE8D6\n:105DE000F09F15270F26002CE4D0A088FDF72BFB91\n:105DF000807F00F00300022808D0002080F001011D\n:105E0000A0880CF0F7FD050003D101E00120F5E7C3\n:105E1000FFDFD5F81D000622594608F04AFA84F83B\n:105E20000EA0D6E717270926002CC3D0A088FDF7BF\n:105E30000AFB8146807F00F00300022808D0002082\n:105E400080F00101A0880CF0D5FD050003D101E030\n:105E50000120F5E7FFDF6878800701D5022000E028\n:105E60000120207299F800002328B2D9272159E790\n:105E700019270E26002C9DD0A088FDF7E4FA5FEAD2\n:105E8000000900D1FFDFC4F808A0A4F80CA084F832\n:105E900008A0A07A40F00300A07299F81E10C9096A\n:105EA00061F38200A07299F81F2099F81E1012EA7F\n:105EB000D11F05D099F8201001F01F0110292BD017\n:105EC00020F00800A07299F81F10607A61F3C300F7\n:105ED0006072697A01F003010129A2D140F0040047\n:105EE000607299F81E0000F003000228E87A16D0CC\n:105EF000217B60F300012173AA7A607B62F30000CA\n:105F00006073EA7A520862F341012173A97A490861\n:105F100061F3410060735CE740F00800D2E7617B09\n:105F200060F300016173AA7A207B62F300002073A2\n:105F3000EA7A520862F341016173A97A490861F370\n:105F40004100207345E710B5FE4C30B101461022E8\n:105F500004F120001FF012FB012084F8300010BD76\n:105F600010B5044600F0D1FDF64920461022BDE8E8\n:105F7000104020311FF002BB70B5F24D06004FF00B\n:105F8000000413D0FBF79FF908B110240CE00621A0\n:105F9000304608F075F9411C05D028665FF0010015\n:105FA00085F85C0000E00724204670BD0020F7E77C\n:105FB000007810F00F0204D0012A05D0022A0CD17B\n:105FC00010E0000909D10AE00009012807D00228E1\n:105FD00005D0032803D0042801D00720704708709B\n:105FE000002070470620704705282AD2DFE800F01D\n:105FF00003070F171F00087820F0FF001EE0087845\n:1060000020F00F00401C20F0F000103016E008785F\n:1060100020F00F00401C20F0F00020300EE0087847\n:1060200020F00F00401C20F0F000303006E008782F\n:1060300020F00F00401C20F0F000403008700020DD\n:106040007047072070472DE9F041804688B00D4623\n:1060500000270846FBF784F9A8B94046FDF7F3F995\n:10606000040003D02078222815D104E043F2020076\n:1060700008B0BDE8F08145B9A07F410603D500F026\n:106080000300022801D01020F2E7A07FC10601D44E\n:10609000010702D50DB10820EAE7E17F090701D524\n:1060A0000D20E5E700F00300022805D125B12846C0\n:1060B000FEF762FF0700DBD1A07F00F0030002289B\n:1060C00008D0002080F0010140460CF093FC06004F\n:1060D00002D00FE00120F5E7A07F00F003000228C6\n:1060E0000ED0002080F00101002240460CF079FC27\n:1060F000060007D0A07F00F00300022804D009E0CA\n:106100000120EFE70420B3E725B12A4631462046B7\n:10611000FEF756FF6946304600F007FD009800B9CB\n:10612000FFDF0099022006F1E0024870C1F82480E8\n:106130004A6100220A81A27F02F00302022A1CD0D7\n:1061400001200871287800F00102087E62F3010046\n:1061500008762A78520862F3820008762A78920834\n:1061600062F3C30008762A78D20862F30410087636\n:1061700024212046FCF7CEFF33E035B30871301DF3\n:1061800088613078400908777078C0F3400048771C\n:10619000287800F00102887F62F301008877A27FEF\n:1061A000D20962F382008877E27F62F3C3008877C6\n:1061B000727862F304108877A878C87701F1210219\n:1061C00028462031FEF71DFF03E00320087105205B\n:1061D000087625212046FCF79DFFA07F20F0400097\n:1061E000A07701A900980EF0F5F8022801D000B1BF\n:1061F000FFDF38463CE72DE9FF4F534A0D4699B083\n:106200009A4607CA0AAB002783E807001998FDF7EA\n:106210001AF9060006D03078262806D008201DB0CE\n:10622000BDE8F08F43F20200F9E7B07F00F0030908\n:10623000B9F1020F0AD05DB91B98FEF79DFE002848\n:10624000EDD1B07F00F00300022801D11B9890BB74\n:10625000B07F00F00300022808D0002080F0010188\n:1062600019980CF0C7FB040003D101E00120F5E709\n:10627000FFDF852D28D007DCF5B1812D1ED0822DC2\n:106280001ED0832D08D11DE0862D1FD0882D1FD054\n:10629000892D1FD08A2D1FD00F2020710F281DD0CF\n:1062A00003F02AF9E0B101208DF83C00201D109088\n:1062B0002079B8B15BE111E00020EEE70120ECE7C6\n:1062C0000220EAE70320E8E70520E6E70620E4E706\n:1062D0000820E2E70920E0E70A20DEE707209EE742\n:1062E00011209CE7B9F1020F03D0A56F03D1A06F75\n:1062F00002E0656FFAE7606F804632D04FF0010030\n:1063000001904FF002000090214630461B9AFEF7A4\n:1063100057FE1B98007800F00101A87861F3010096\n:10632000A870B17FC90961F38200A870F17F61F3A1\n:10633000C300A870617861F30410A8702078400948\n:10634000287003E02C0200206C5A02006078C0F331\n:10635000400068701B988078E87000206871287190\n:1063600003E00220019001200090A87898F8021024\n:10637000C0F3C000C1F3C00108405FEA000B2DD09C\n:106380005046FAF7A0FF78BBDAF80C00FAF79BFF4B\n:1063900050BBDAF81C00FAF796FF28BBDAF80C00BD\n:1063A000A060DAF81C00E060607898F8012042EA0A\n:1063B000500100BF61F34100607098F80210C0B254\n:1063C00000EA111161F3000060700020207700994D\n:1063D00006F11700022908D0012107E0607898F83B\n:1063E000012002EA5001E5E732E0002104EB8101DF\n:1063F00048610199701C022901D0012100E00021AF\n:1064000004EB81014861A87800F00300012857D10E\n:1064100098F8020000F00300012851D1B9F1020FF1\n:1064200004D02A1D691D1B98FEF7EBFD287998F80A\n:10643000041008408DF83400697998F8052011405F\n:106440008DF8381008433BD05046FAF73CFF08B1AE\n:106450001020E4E60AF110010491B9F1020F17D0FF\n:106460000846002104F18C03CDE9000304F5AE7267\n:1064700002920DAB5A462046FEF70CFE0028E8D1EA\n:10648000B9F1020F08D0504608D14FF0010107E0E2\n:1064900050464FF00101E5E70498F5E74FF00001A1\n:1064A00004F1A403CDE9000304F5B072029281F077\n:1064B00001010EAB5A462046FEF7ECFD0028C8D17C\n:1064C0006078800734D4A87898F80210C0F3800070\n:1064D000C1F3800108432BD0297898F800000AAA5C\n:1064E000B9F1020F06D032F811204300DA4002F071\n:1064F00003070AE032F810204B00DA4012F00307DD\n:1065000005D0012F0BD0022F0BD0032F07D0BBF1EA\n:10651000000F0DD0012906D0042904D008E002277D\n:10652000F5E70127F3E7012801D0042800D104276B\n:10653000B07F40F08000B077F17F6BF30001F1771E\n:106540006078800706D50320A071BBF1000F0ED143\n:10655000002028E00220022F18D0012F18D0042F8D\n:1065600029D00020A071B07F20F08000B0772521D5\n:106570003046FCF7CFFD0FA904F1E0000DF00FFF4E\n:1065800010B1022800D0FFDF002048E6A071DFE74D\n:10659000A0710D2104F120001FF091F8207840F047\n:1065A0000200207001208DF85C0017AA314619986E\n:1065B00000F094FADBE70120A071D8E72DE9F04361\n:1065C00087B09046894604460025FCF73CFF06004C\n:1065D00006D03078272806D0082007B0BDE8F08321\n:1065E00043F20200F9E7B07F00F00300022809D06F\n:1065F0005FF0000080F0010120460CF0FBF9040080\n:1066000003D101E00120F5E7FFDFA7795FEA090088\n:1066100005D0012821D0B9F1020F26D110E0B8F140\n:10662000000F22D1012F05D0022F05D0032F05D056\n:10663000FFDF2DE00C252BE0012529E0022527E0D6\n:106640004046FAF740FEB0B9032F0ED11022414662\n:1066500004F11D001EF092FF1AE0012F02D0022F5C\n:1066600003D104E0B8F1000F12D00720B5E740468F\n:10667000FAF729FE08B11020AFE7102104F11D0040\n:106680001EF0FBFF0621404607F0FAFDC4F81D008E\n:106690002078252140F0020020703046FCF73AFDBA\n:1066A0002078C10713D020F00100207002208DF85F\n:1066B000000004F11D0002908DF804506946C330BB\n:1066C0000DF06DFE022803D010B1FFDF00E025774A\n:1066D000002082E730B587B00D460446FCF7B3FED4\n:1066E000A0B1807F00F00300022812D05FF000000C\n:1066F00080F0010120460CF07DF904000ED0284600\n:10670000FAF7E1FD38B1102007B030BD43F20200C6\n:10671000FAE70120ECE72078400701D40820F3E7EE\n:10672000294604F13D00202205461EF027FF20786F\n:1067300040F01000207001070FD520F008002070F5\n:1067400007208DF80000694604F1E00001950DF086\n:1067500026FE022801D000B1FFDF0020D4E770B58B\n:106760000D460646FCF76FFE18B10178272921D1A6\n:1067700002E043F2020070BD807F00F003000228B7\n:1067800008D0002080F0010130460CF033F90400FD\n:1067900003D101E00120F5E7FFDFA079022809D14C\n:1067A0006078C00706D02A4621463046FEF702FD33\n:1067B00010B10FE0082070BDB4F860000E280BD2B5\n:1067C00004F1620102231022081F0BF09AFF01213D\n:1067D00001704570002070BD112070BD70B5064677\n:1067E00014460D460846FAF76EFD18B92046FAF72A\n:1067F00090FD08B1102070BDA6F57F40FF380ED087\n:106800003046FCF720FE38B1417822464B08811C07\n:106810001846FCF7E8FD07E043F2020070BD204691\n:10682000FDF7F4FD0028F9D11021E01D0FF025FB44\n:10683000E21D294604F1170000F087F9002070BD21\n:106840002DE9F04104468AB01546884600270846DF\n:10685000FAF786FD18B92846FAF782FD10B1102024\n:106860000AB006E42046FCF7EEFD060003D03078BF\n:1068700027281AD102E043F20200F1E7B07F00F0CE\n:106880000300022808D0002080F0010120460CF00F\n:10689000B1F8040003D101E00120F5E7FFDF207823\n:1068A000400702D56078800701D40820D8E7B07F80\n:1068B00000F00300022803D0A06F03D1A16F02E013\n:1068C000606FFAE7616F407800B19DB1487810B110\n:1068D000B8F1000F0ED0ADB1EA1D06A8E16800F0D6\n:1068E00034F9102206A905F117001EF01BFE18B19D\n:1068F000042707E00720B3E71022E91D04F12D006B\n:106900001EF03CFEB8F1000F06D0102208F107017E\n:1069100004F11D001EF032FE2078252140F0020017\n:1069200020703046FCF7F6FB2078C10715D020F028\n:106930000100207002208DF8000004F11D0002907B\n:10694000103003908DF804706946B3300DF027FDC8\n:10695000022803D010B1FFDF00E0277700207FE797\n:10696000F8B515460E460746FCF76DFD040004D049\n:106970002078222804D00820F8BD43F20200F8BD98\n:10698000A07F00F00300022802D043F20500F8BD0A\n:106990003046FAF798FC18B92846FAF794FC08B183\n:1069A0001020F8BD00953288B31C21463846FEF70A\n:1069B00024FC112815D00028F3D1297C4A08A17F96\n:1069C00062F3C711A177297CE27F61F30002E277CD\n:1069D000297C890884F82010A17F21F04001A1774B\n:1069E000F8BDA17F0907FBD4D6F80200C4F8360031\n:1069F000D6F80600C4F83A003088A086102229464E\n:106A000004F124001EF0BAFD287C4108E07F61F308\n:106A10004100E077297C61F38200E077287C8008E0\n:106A200084F82100A07F40F00800A0770020D3E781\n:106A300070B50D4606460BB1072070BDFCF703FD8F\n:106A4000040007D02078222802D3A07F800604D437\n:106A5000082070BD43F2020070BDADB1294630463A\n:106A60000AF030FF02F05EFB297C4A08A17F62F346\n:106A7000C711A177297CE27F61F30002E277297CCC\n:106A8000890884F8201004E030460AF03EFF02F046\n:106A900049FBA17F21F02001A17770BD70B50D46A3\n:106AA000FCF7D1FC040005D02846FAF732FC20B1EF\n:106AB000102070BD43F2020070BD29462046FEF74B\n:106AC0004AFB002070BD04E010F8012B0AB1002041\n:106AD0007047491E89B2F7D20120704770B515463C\n:106AE000064602F009FD040000D1FFDF207820F007\n:106AF0000F00801C20F0F000203020706680286895\n:106B0000A060BDE8704002F0FABC10B5134C94F8D8\n:106B10003000002808D104F12001A1F110000DF08F\n:106B200080FC012084F8300010BD10B190F8B9202D\n:106B30002AB10A4890F8350018B1002003E0B830B7\n:106B400001E0064834300860704708B50023009320\n:106B500013460A460CF049F908BD00002C0200203B\n:106B600018B18178012938D101E0102070470188DF\n:106B700042F60112881A914231D018DC42F6010225\n:106B8000A1EB020091422AD00CDC41B3B1F5C05F09\n:106B900025D06FF4C050081821D0A0F57060FF38E0\n:106BA0001BD11CE001281AD002280AD117E0B0F549\n:106BB000807F14D008DC012811D002280FD00328D0\n:106BC0000DD0FF2809D10AE0B0F5817F07D0A0F5EC\n:106BD0008070033803D0012801D0002070470F20B7\n:106BE00070470A281FD008DC0A2818D2DFE800F016\n:106BF000191B1F1F171F231D1F21102815D008DC6C\n:106C00000B2812D00C2810D00D2816D00F2806D132\n:106C10000DE011280BD084280BD087280FD003203B\n:106C200070470020704705207047072070470F20ED\n:106C3000704704207047062070470C20704743F2CD\n:106C40000200704738B50C46050041D06946FFF791\n:106C5000AFF9002819D19DF80010607861F30200A7\n:106C600060706946681CFFF7A3F900280DD19DF8F4\n:106C70000010607861F3C5006070A978C1F341012C\n:106C8000012903D0022905D0072038BD217821F041\n:106C9000200102E0217841F020012170410704D059\n:106CA000A978C90861F386106070607810F0380F19\n:106CB00007D0A978090961F3C710607010F0380F88\n:106CC00002D16078400603D5207840F04000207063\n:106CD000002038BD70B50446002008801546606865\n:106CE000FFF7B0FF002816D12089A189884211D86A\n:106CF00060688078C0070AD0B1F5007F0AD840F2FA\n:106D00000120B1FBF0F200FB1210288007E0B1F582\n:106D1000FF7F01D90C2070BD01F2012129800020E4\n:106D200070BD10B50478137864F300031370047811\n:106D3000640864F3410313700478A40864F38203C5\n:106D400013700478E40864F3C3031370047824090F\n:106D500064F3041313700478640964F34513137027\n:106D60000078800960F38613137031B10878C10789\n:106D700001D1800701D5012000E0002060F3C71396\n:106D8000137010BD4278530702D002F0070306E0EB\n:106D900012F0380F02D0C2F3C20300E001234A7898\n:106DA00063F302024A70407810F0380F02D0C0F34B\n:106DB000C20005E0430702D000F0070000E0012018\n:106DC00060F3C5024A7070472DE9F04F95B00D0091\n:106DD000824612D0122128461EF04FFC4FF6FF7B50\n:106DE00005AA0121584607F066F8002426463746D2\n:106DF0004FF420586FF4205973E0102015B0BDE80F\n:106E0000F08F00BF9DF81E0001280AD1BDF81C10AC\n:106E100041450BD011EB09000AD001280CD0022803\n:106E20000CD0042C0ED0052C0FD10DE0012400E075\n:106E30000224BDF81A6008E0032406E00424BDF82B\n:106E40001A7002E0052400E00624BDF81A1051452E\n:106E500047D12C74BEB34FF0000810AA4FF0070AB8\n:106E6000CDE90282CDE900A80DF13C091023CDF84F\n:106E7000109042463146584607F0D0F808BBBDF89E\n:106E80003C002A46C0B210A90DF041FBC8B9AE8142\n:106E9000CFB1CDE900A80DF1080C0AAE40468CE850\n:106EA0004102132300223946584607F0B7F840B98B\n:106EB000BDF83C00F11CC01EC0B22A1D0DF027FB1E\n:106EC00010B103209AE70AE0BDF82900E881062CFA\n:106ED00005D19DF81E00A872BDF81C002881002075\n:106EE0008CE705A806F0F3FF00288BD0FFF779FEAA\n:106EF00084E72DE9F0471C46DDE90978DDF82090AC\n:106F000015460E00824600D1FFDF0CB1208818B173\n:106F1000D5B11120BDE8F087022D01D0012100E09C\n:106F2000002106F1140005F0B5FEA8F800000246A5\n:106F30003B462946504603F04EF9C9F8000008B90F\n:106F4000A41C3C600020E5E71320E3E7F0B41446FE\n:106F5000DDE904528DB1002314B1022C09D101E006\n:106F6000012306E00D7CEE0703D025F00105012387\n:106F70000D742146F0BC03F0B9BF1A80F0BC704715\n:106F80002DE9FE4F91461A881C468A468046FAB182\n:106F900002AB494603F01FF9050019D04046A61C74\n:106FA00027880BF06BFE3246072629463B460096A3\n:106FB0000BF079FA20882346CDE900504A46514625\n:106FC0004046FFF7C3FF002020800120BDE8FE8F70\n:106FD0000020FBE72DE9F04786B082460EA89046D8\n:106FE00090E8B000894604AA05A903A88DE8070027\n:106FF0001E462A4621465046FFF77BFF039901B102\n:1070000001213970002818D1F94904F1140204ABA8\n:107010000860039805998DE80700424649465046A6\n:1070200006F0EFF9A8B1092811D2DFE800F0050851\n:107030000510100A0C0C0E00002006B06AE71120A3\n:10704000FBE70720F9E70820F7E70D20F5E7032025\n:10705000F3E7BDF810100398CDE9000133462A4646\n:1070600021465046FFF772FFE6E72DE9F04389B06D\n:107070000D46DDE9108781461C461646142103A8FB\n:107080001EF01DFB012002218DF810108DF80C0060\n:107090008DF81170ADF8146064B1A278D20709D0F0\n:1070A0008DF81600E088ADF81A00A088ADF8180039\n:1070B000A068079008A80095CDE90110424603A9F1\n:1070C00048466B68FFF786FF09B0BDE8F083F0B56E\n:1070D0008BB000240646069407940727089405A859\n:1070E0000994019400970294CDE903400D461023C2\n:1070F0002246304606F092FF78B90AA806A9019404\n:1071000000970294CDE90310BDF8143000222946FF\n:10711000304606F059FD002801D0FFF762FD0BB0A4\n:10712000F0BD06F0F9BB2DE9FC410C468046002677\n:1071300002F0E2F9054620780D287DD2DFE800F064\n:10714000BC0713B325BD49496383AF959B00A8488D\n:10715000006820B1417841F010014170ADE0404637\n:1071600002F0FAF9A9E0042140460BF043FC0700C5\n:1071700000D1FFDF07F11401404605F01FFDA5BB5C\n:1071800013214046FDF71CFC97E0042140460BF01C\n:1071900031FC070000D1FFDFE088ADF800000020DF\n:1071A000B8819DF80000010704D5C00602D5A0886B\n:1071B000B88105E09DF8010040067ED5A088F881E1\n:1071C00005B9FFDF22462946404601F0BDFC0226F4\n:1071D00073E0E188ADF800109DF8011009060FD5A5\n:1071E000072803D006280AD00AE024E004214046FC\n:1071F0000BF000FC060000D1FFDFA088F081022622\n:10720000CDB9FFDF17E0042140460BF0F3FB070088\n:1072100000D1FFDF07F1140006F0B5FB90F0010F7D\n:1072200002D1E079000648D5387C022640F0020001\n:10723000387405B9FFDF00E03EE0224629464046AB\n:1072400001F082FC39E0042140460BF0D3FB017CC5\n:10725000002D01F00206C1F340016171017C21F0B3\n:1072600002010174E7D1FFDFE5E702260121404674\n:1072700002F0A4F921E0042140460BF0BBFB0546D7\n:10728000606800902089ADF80400012269464046FC\n:1072900002F0B5F9287C20F0020028740DE0002DE2\n:1072A000C9D1FFDFC7E7022600214046FBF70CF9F2\n:1072B000002DC0D1FFDFBEE7FFDF3046BDE8FC8117\n:1072C0003EB50C0009D001466B4601AA002006F02D\n:1072D00027FF20B1FFF785FC3EBD10203EBD0020FA\n:1072E0002080A0709DF8050002A900F00700FEF7BD\n:1072F0007BFE50B99DF8080020709DF8050002A99A\n:10730000C0F3C200FEF770FE08B103203EBD9DF839\n:10731000080060709DF80500C109A07861F30410B1\n:10732000A0709DF80510890961F3C300A0709DF855\n:107330000410890601D5022100E0012161F3420019\n:107340009DF8001061F30000A07000203EBD70B5F4\n:10735000144606460D4651EA040005D075B10846AC\n:10736000F9F7F5FF78B901E0072070BD29463046EE\n:1073700006F037FF10B1BDE8704032E454B120464A\n:10738000F9F7E5FF08B1102070BD21463046BDE891\n:10739000704095E7002070BD2DE9FC5F0C469046DB\n:1073A0000546002701780822007A3E46B2EB111FFD\n:1073B0007ED104F10A0100910A31821E4FF0020AC7\n:1073C00004F1080B0191092A73D2DFE802F0ECDF27\n:1073D00005F427277AA9CD00688804210BF00AFB61\n:1073E000060000D1FFDFB08920B152270726C2E096\n:1073F0009002002051271026002C7DD06888A080A4\n:107400000120A071A88900220099FFF7A0FF0028A1\n:1074100073D1A8892081288AE081D1E0B5F8129043\n:10742000072824D1E87B000621D5512709F1140053\n:1074300086B2002CE1D0A88900220099FFF787FFCF\n:1074400000285AD16888A08084F806A0A8892081E5\n:107450000120A073288A2082A4F81290A88A0090A4\n:1074600068884B46A969019A01F04BFBA8E05027B8\n:1074700009F1120086B2002C3ED0A889002259469C\n:10748000FFF765FF002838D16888A080A889E080D0\n:10749000287A072813D002202073288AE081E87B0D\n:1074A000C0096073A4F81090A88A0090688801E071\n:1074B00083E080E04B4604F11202A969D4E7012081\n:1074C000EAE7B5F81290512709F1140086B2002CB2\n:1074D00066D0688804210BF08DFA83466888A08006\n:1074E000A88900220099FFF732FF00286ED184F8A6\n:1074F00006A0A889208101E052E067E00420A07383\n:10750000288A2082A4F81290A88A009068884B46A6\n:10751000A969019A01F0F5FAA989ABF80E104FE0BC\n:107520006888FBF790FF0746688804210BF062FA31\n:10753000064607B9FFDF06B9FFDF687BC00702D048\n:107540005127142601E0502712264CB36888A080EA\n:10755000502F06D084F806A0287B594601F0E1FAA6\n:107560002EE0287BA11DF9E7FE49A88949898142BF\n:1075700005D1542706269CB16888A08020E05327B7\n:107580000BE06888A080A889E08019E06888042161\n:107590000BF030FA00B9FFDF55270826002CF0D198\n:1075A000A8F8006011E056270726002CF8D068885C\n:1075B000A080002013E0FFDF02E0012808D0FFDFF9\n:1075C000A8F800600CB1278066800020BDE8FC9F11\n:1075D00057270726002CE3D06888A080687AA0711E\n:1075E000EEE7401D20F0030009B14143091D01EB06\n:1075F0004000704713B5DB4A00201071009848B175\n:10760000002468460BF013F8002C02D1D64A0099EA\n:1076100011601CBD01240020F4E770B50D4606463C\n:1076200086B014465C2128461EF049F804B9FFDFF5\n:10763000A0786874A2782188284601F09CFA00207E\n:10764000A881E881228805F11401304605F09BFAF3\n:107650006A460121304606F02EFC19E09DF8030031\n:10766000000715D5BDF806103046FFF730FD9DF830\n:107670000300BDF8061040F010008DF80300BDF8BF\n:107680000300ADF81400FF233046059A06F074FDA0\n:10769000684606F01CFC0028E0D006B070BD10B5AE\n:1076A0000C4601F1140005F0A5FA0146627C204663\n:1076B000BDE8104001F094BA30B50446A94891B035\n:1076C0004FF6FF75C18905AA284606F0F4FB30E0A5\n:1076D0009DF81E00A0422AD001282AD1BDF81C0026\n:1076E000B0F5205F03D042F60101884221D100208D\n:1076F00002AB0AAA0CA9019083E8070007200090BA\n:10770000BDF81A1010230022284606F087FC38B96D\n:10771000BDF828000BAAC0B20CA90CF0F8FE10B1FD\n:10772000032011B030BD9DF82E00A04201D10020F1\n:10773000F7E705A806F0CBFB0028C9D00520F0E745\n:1077400070B5054604210BF055F9040000D1FFDFA8\n:1077500004F114010C46284605F030FA214628466B\n:10776000BDE8704005F031BA70B58AB00C460646E7\n:10777000FBF769FE050014D02878222827D30CB126\n:10778000A08890B101208DF80C0003208DF8100026\n:1077900000208DF8110054B1A088ADF818002068C1\n:1077A00007E043F202000AB070BD0920FBE7ADF824\n:1077B00018000590042130460BF01CF9040000D19C\n:1077C000FFDF04F1140005F02CFA000701D40820B3\n:1077D000E9E701F091FE60B108A802210094CDE92B\n:1077E000011095F8232003A930466368FFF7F2FBE8\n:1077F000D9E71120D7E72DE9F04FB2F802A0834670\n:1078000089B0154689465046FBF71DFE0746042100\n:1078100050460BF0EFF80026044605964FF002089C\n:107820000696ADF81C6007B9FFDF04B9FFDF4146DB\n:10783000504603F0C6FE50B907AA06A905A88DE870\n:1078400007004246214650466368FFF752FB454811\n:1078500007AB0660DDE9051204F11400CDF80090D5\n:10786000CDE90320CDE9013197F823205946504650\n:107870006B6805F01FFA06000AD0022E04D0032E12\n:1078800014D0042E00D0FFDF09B03046BDE8F08FE1\n:10789000BDF81C000028F7D00599CDE9001042463C\n:1078A000214650466368FFF751FBEDE7687840F0EA\n:1078B00008006870E8E72DE9F04F99B004464FF0F2\n:1078C00000082848ADF81C80ADF82080ADF8248071\n:1078D000A0F80880ADF81480ADF81880ADF82C80C1\n:1078E000ADF82880007916460D464746012808D095\n:1078F000022806D0032804D0042802D0082019B09A\n:10790000C4E72046F9F7DFFC80BB2846F9F7DBFC2B\n:1079100060BB6068F9F724FD40BB606848B16089CE\n:107920002189884202D8B1F5007F01D90C20E6E711\n:1079300080460EAA06A92846FFF7CCF90028DED11A\n:1079400068688078C0F34100022808D19DF81900CA\n:1079500010F0380F03D02869F9F7F9FC30B905A900\n:10796000206904E0900200201400002020E0FFF7CE\n:1079700069F90028C3D1206948B1607880079DF873\n:10798000150000F0380001D5F0B300E0E0BB9DF831\n:10799000140080060ED59DF8150010F0380F03D0A6\n:1079A0006068F9F7D4FC18B96068F9F7D9FC08B138\n:1079B0001020A4E70AA96069FFF744F900289ED1C6\n:1079C000606940B19DF8290000F0070101293CD110\n:1079D00010F0380F39D00BA9A069FFF733F9002850\n:1079E0008DD19DF8280080062FD49DF82C008006AC\n:1079F0002BD4A06950B19DF82D0000F0070101299A\n:107A000023D110F0380F00E01FE01ED0E06818B15D\n:107A10000078D0B11C2818D20FAA611C2046FFF7AD\n:107A200080F90121384661F30F2082468DF852100B\n:107A3000B94642F603000F46ADF850000DF13F0283\n:107A400018A928680CF082FD08B1072057E79DF8B7\n:107A5000600015A9CDF80090C01CCDE9019100F09F\n:107A6000FF0B00230BF20122514614A806F066F921\n:107A7000F0BBBDF854000C90FD492A89286900929A\n:107A8000CDE901016B89BDF838202868069906F018\n:107A900055F901007ED120784FF0020AC10601D4C9\n:107AA00080062BD5ADF80C90606950B90AA906A8DC\n:107AB000FFF768F99DF8290020F00700401C8DF8B9\n:107AC00029009DF8280008A940F0C8008DF828007A\n:107AD0008DF8527042F60210ADF8500003AACDF8AE\n:107AE00000A0CDE90121002340F2032214A800E008\n:107AF0001EE00A9906F022F901004BD1DC484D4600\n:107B000008385B460089ADF83D000FA8CDE902902A\n:107B1000CDF80490CDF810904FF007090022CDF871\n:107B20000090BDF854104FF6FF7006F04DF810B1FC\n:107B3000FFF757F8E3E69DF83C00000625D52946F7\n:107B4000012060F30F218DF852704FF42450ADF8EE\n:107B50005000ADF80C5062789DF80C00002362F3E1\n:107B600000008DF80C006278CDF800A0520862F396\n:107B700041008DF80C0003AACDE9012540F2032253\n:107B800014A806F0DBF8010004D1606888B320690E\n:107B9000A8B900E086E005A906A8FFF7F3F8607829\n:107BA000800706D49DF8150020F038008DF81500E8\n:107BB00005E09DF8140040F040008DF814008DF8A9\n:107BC000527042F60110ADF85000208940F20121B8\n:107BD000B0FBF1F201FB1202606809ABCDF8008046\n:107BE000CDE90103002314A8059906F0A7F80100C8\n:107BF00058D12078C00729D0ADF80C50A06950B9F1\n:107C00000BA906A8FFF7BEF89DF82D0020F007008D\n:107C1000401C8DF82D009DF82C008DF8527040F01E\n:107C200040008DF82C0042F60310ADF8500007A973\n:107C300003AACDF800A0CDE90121002340F20322E0\n:107C400014A80B9906F07AF801002BD1E06868B30C\n:107C50002946012060F30F218DF8527042F604107E\n:107C6000ADF85000E068002302788DF85820407885\n:107C70008DF85900E06816AA4088ADF85A00E0680F\n:107C800000798DF85C00E068C088ADF85D00CDF843\n:107C90000090CDE901254FF4027214A806F04EF8C9\n:107CA000010003D00C9800F0C7FF28E670480321BC\n:107CB0000838017156B100893080BDF82400708009\n:107CC000BDF82000B080BDF81C00F080002016E652\n:107CD00070B501258AB016460B46012802D002284D\n:107CE00016D104E08DF80E504FF4205003E08DF8CB\n:107CF0000E5042F60100ADF80C005BB10024601C90\n:107D000060F30F2404AA08A918460CF01FFC18B150\n:107D1000072048E5102046E504A99DF82020544896\n:107D2000CDE90021801E02900023214603A802F223\n:107D3000012206F003F810B1FEF753FF33E54C487B\n:107D400008380EB1C1883180057100202BE5F0B5EF\n:107D500093B0074601268DF83E6041F60100ADF86C\n:107D60003C0012AA0FA93046FFF7B2FF002848D105\n:107D70003F4C0025083CE7B31C2102A81DF09FFCE6\n:107D80009DF808008DF83E6040F020008DF8080056\n:107D900042F60520ADF83C000E959DF83A0011958D\n:107DA00020F00600801C8DF83A009DF838006A46E5\n:107DB00020F0FF008DF838009DF8390009A920F067\n:107DC000FF008DF839000420ADF82C00ADF830002C\n:107DD0000EA80A9011A80D900FA80990ADF82E508A\n:107DE00002A8FFF768FD00280BD1BDF800006081F4\n:107DF00000E008E0BDF80400A081401CE08125718E\n:107E0000002013B0F0BD6581A581BDF84800F4E7FE\n:107E10002DE9F74F1649A0B00024083917940A79C4\n:107E2000A146012A04D0022A02D0082023B02DE561\n:107E3000CA88824201D00620F8E721988A46824209\n:107E400001D10720F2E701202146ADF848004FF6A6\n:107E5000FF788DF86E0042F6020B60F30F21ADF84B\n:107E60004A80ADF86CB006918DF8724002E00000D7\n:107E7000980200201CA9ADF870401391ADF8508015\n:107E800012A806F048F800252E462F460DAB072213\n:107E900012A9404606F042F878B10A285DD195B3A0\n:107EA0008EB3ADF86450ADF866609DF85E008DF855\n:107EB000144019AC012864D06BE09DF83A001FB360\n:107EC000012859D1BDF8381059451FD118A809A962\n:107ED00001940294CDE9031007200090BDF83610FC\n:107EE00010230022404606F099F8B0BBBDF86000B0\n:107EF000042801D006284AD1BDF8241021988142D7\n:107F00003AD10F2092E73AE0012835D1BDF8380088\n:107F1000B0F5205F03D042F6010188422CD1BAF8B7\n:107F20000600BDF83610884201D1012700E0002785\n:107F300005B19EB1219881421ED118A809AA0194C9\n:107F40000294CDE90320072000900D461023002263\n:107F5000404606F063F800B902E02DE04E460BE023\n:107F6000BDF86000022801D0102810D1C0B217AAB5\n:107F700009A90CF0CCFA50B9BDF8369086E7052077\n:107F800054E705A917A8221D0CF0E0FA08B1032058\n:107F90004CE79DF814000023001DC2B28DF8142098\n:107FA00022980092CDE901401BA8069905F0C6FE73\n:107FB00010B902228AF80420FEF713FE36E710B546\n:107FC0000B46401E88B084B205AA00211846FEF771\n:107FD000A8FE00200DF1080C06AA05A901908CE866\n:107FE0000700072000900123002221464FF6FF7072\n:107FF00005F0EAFD0446BDF81800012800D0FFDFB7\n:108000002046FEF7EEFD08B010BDF0B5F74F044670\n:1080100087B038790E46032804D0042802D00820FF\n:1080200007B0F0BD04AA03A92046FEF753FE0500E1\n:10803000F6D160688078C0F3410002280AD19DF82B\n:108040000D0010F0380F05D02069F9F780F908B15C\n:108050001020E5E7208905AA21698DE807006389DA\n:10806000BDF810202068039905F068FE10B1FEF7F6\n:10807000B8FDD5E716B1BDF8140030800420387182\n:108080002846CDE7F8B50C0006460CD001464FF661\n:10809000FF7500236A46284606F042F828B100BF63\n:1080A000FEF79FFDF8BD1020F8BD69462046FEF79B\n:1080B000C9FD0028F8D1A078314600F00103284618\n:1080C000009A06F059F8EBE730B587B01446002265\n:1080D0000DF1080C05AD01928CE82C0007220092EE\n:1080E0000A46014623884FF6FF7005F06DFDBDF886\n:1080F00014102180FEF775FD07B030BD70B50D4638\n:1081000004210AF077FC040000D1FFDF294604F1C6\n:108110001400BDE8704004F07DBD70B50D4604212B\n:108120000AF068FC040000D1FFDF294604F11400C6\n:10813000BDE8704004F091BD70B50D4604210AF011\n:1081400059FC040000D1FFDF294604F11400BDE80A\n:10815000704004F0A9BD70B5054604210AF04AFC40\n:10816000040000D1FFDF214628462368BDE87040A7\n:108170000122FEF705BF70B5064604210AF03AFC5D\n:10818000040000D1FFDF04F1140004F033FD401DB2\n:1081900020F0030511E0011D00880022431821464C\n:1081A0003046FEF7EDFE00280BD0607CABB2684392\n:1081B00082B2A068011D0AF0DAFAA068418800299D\n:1081C000E9D170BD70B5054604210AF013FC040026\n:1081D00000D1FFDF214628466368BDE870400222D7\n:1081E000FEF7CEBE70B50E46054601F085F90400D7\n:1081F00000D1FFDF0120207266726580207820F0B8\n:108200000F00001D20F0F00040302070BDE87040ED\n:1082100001F075B910B50446012900D0FFDF2046F2\n:10822000BDE810400121FAF74FB92DE9F04F97B0A2\n:108230004FF0000A0C008346ADF814A0D04619D0C8\n:10824000E06830B1A068A8B10188ADF81410A0F8BA\n:1082500000A05846FBF7F7F8070043F2020961D087\n:10826000387822285CD3042158460AF0C3FB050065\n:1082700005D103E0102017B0BDE8F08FFFDF05F156\n:10828000140004F0B7FC401D20F00306A07801287C\n:1082900003D0022801D00720EDE7218807AA58461D\n:1082A00005F009FE30BB07A805F011FE10BB07A8BA\n:1082B00005F00DFE48B99DF82600012805D1BDF84E\n:1082C0002400A0F52451023902D04FF45050D2E7D7\n:1082D000E068B0B1CDE902A00720009005AACDF872\n:1082E00004A00492A2882188BDF81430584605F0F5\n:1082F0006BFC10B1FEF775FCBDE7A168BDF814007A\n:1083000008809DF81F00C00602D543F20140B2E785\n:108310000B9838B1A1780078012905D080071AD4CC\n:108320000820A8E74846A6E7C007F9D002208DF844\n:108330003C00A8684FF00009A0B1697C42887143F5\n:1083400091420FD98AB2B3B2011D0AF0C6F9804634\n:10835000A0F800A006E003208DF83C00D5F80080CE\n:108360004FF001099DF8200010F0380F00D1FFDF19\n:108370009DF820001E49C0F3C200084497F823105E\n:1083800010F8010C884201D90F2074E72088ADF85D\n:10839000400014A90095CDE90191434607220FA999\n:1083A0005846FEF717FE002891D19DF8500050B9AD\n:1083B000A078012807D1687CB3B2704382B2A86864\n:1083C000011D0AF09EF9002055E770B506461546D6\n:1083D0000C460846FEF7C4FB002805D12A46214674\n:1083E0003046BDE8704073E470BD11E59002002096\n:1083F000765A020070B51E4614460D0009D044B1ED\n:10840000616831B138B1FC49C988814203D0072085\n:1084100070BD102070BD2068FEF7A2FB0028F9D1C6\n:10842000324621462846BDE87040FFF744BA70B591\n:1084300015460C0006D038B1EF490989814203D0B6\n:10844000072070BD102070BD2068FEF789FB002852\n:10845000F9D129462046BDE87040D6E570B50646FC\n:1084600086B00D4614461046F8F753FFD0BB60683F\n:10847000F8F776FFB0BBA6F57F40FF3803D0304653\n:10848000FAF7E1FF80B128466946FEF79DFC002817\n:108490000CD19DF810100F2008293DD2DFE801F023\n:1084A00008060606060A0A0843F2020006B070BD76\n:1084B0000320FBE79DF80210012908D1BDF8001048\n:1084C000B1F5C05FF2D06FF4C052D142EED09DF84A\n:1084D000061001290DD1BDF80410A1F52851062977\n:1084E00007D200E029E0DFE801F0030304030303FF\n:1084F000DCE79DF80A1001290FD1BDF80810B1F58D\n:10850000245FD3D0A1F60211B1F50051CED00129DC\n:10851000CCD0022901D1C9E7FFDF606878B9002318\n:1085200005AA2946304605F0FBFD10B1FEF759FBC0\n:10853000BCE79DF81400800601D41020B6E76188DE\n:10854000224628466368FFF7BFFDAFE72DE9F043F9\n:10855000814687B0884614461046F8F7DAFE18B10F\n:10856000102007B0BDE8F083002306AA4146484624\n:1085700005F0D6FD18B100BFFEF733FBF1E79DF81B\n:108580001800C00602D543F20140EAE7002507279C\n:1085900005A8019500970295CDE9035062884FF632\n:1085A000FF734146484605F039FD060013D1606867\n:1085B000F8F7AFFE60B960680195CDE90250009709\n:1085C0000495238862884146484605F027FD064603\n:1085D000BDF8140020803046CEE739B1864B0A88BA\n:1085E0009B899A4202D843F2030070471DE610B5FA\n:1085F00086B0814C0423ADF81430638943B1A4895B\n:108600008C4201D2914205D943F2030006B010BD5D\n:108610000620FBE7ADF81010002100910191ADF8A4\n:10862000003002218DF8021005A9029104A90391DE\n:10863000ADF812206946FFF7F8FDE7E72DE9FC47A2\n:1086400081460D460846F8F73EFE88BB4846FAF7D5\n:10865000FAFE5FEA00080AD098F80000222829D321\n:10866000042148460AF0C6F9070005D103E043F2A9\n:108670000200BDE8FC87FFDF07F1140004F0D1FA27\n:1086800006462878012803D0022804D00720F0E706\n:10869000B0070FD502E016F01C0F0BD0A8792C1DE7\n:1086A000C00709D0E08838B1A068F8F70CFE18B10F\n:1086B0001020DEE70820DCE721882A780720B1F5C2\n:1086C000847F35D01EDC40F20315A1F20313A942CA\n:1086D00026D00EDCB1F5807FCBD003DCF9B10129C7\n:1086E00026D1C6E7A1F58073013BC2D0012B1FD173\n:1086F00013E0012BBDD0022B1AD0032BB9D0042BD1\n:1087000016D112E0A1F20912082A11D2DFE802F014\n:108710000B04041010101004ABE7022AA9D007E0E4\n:10872000012AA6D004E0320700E0F206002AA0DA0F\n:10873000CDB200F0E1FE50B198F82300CDE900057C\n:10874000FA89234639464846FEF78FFC91E7112007\n:108750008FE72DE9F04F8BB01F4615460C46834638\n:108760000026FAF770FE28B10078222805D20820EA\n:108770000BB081E543F20200FAE7B80801D0072008\n:10878000F6E7032F00D100274FF6FF79CCB1022D79\n:1087900073D32046F8F7E4FD30B904EB0508A8F1DF\n:1087A0000100F8F7DDFD08B11020E1E7AD1EAAB227\n:1087B0002146484605F08FFD38F8021C88425CD1FE\n:1087C000ADB20D49B80702D58889401C00E00120F0\n:1087D0001FFA80F8F80701D08F8900E04F4605AAFC\n:1087E0004146584605F067FB4FF0070A4FF0000975\n:1087F000DCB320460BE000009002002040881028E7\n:108800003BD8361D304486B2AE4236D2A01902881B\n:108810004245F3D351E000BF9DF8170002074CD545\n:1088200094B304EB0608361DB8F80230B6B2102B2C\n:1088300023D89A19AA4220D8B8F8002091421CD116\n:10884000C0061CD5CDE900A90DF1080C0AAAA11992\n:1088500048468CE80700B8F800100022584605F09A\n:10886000B3F920B1FEF7BDF982E726E005E0B8F8DC\n:108870000200BDF82810884201D00B2078E7B8F834\n:108880000200304486B207E0FFE7C00604D5584630\n:10889000FEF71DFC002888D19DF81700BDF81A10BE\n:1088A00020F010008DF81700BDF81700ADF800009B\n:1088B000FF235846009A05F05FFC05A805F007FB6A\n:1088C00018B9BDF81A10B942A6D9042158460AF0C1\n:1088D00091F8040000D1FFDFA2895AB1CDE900A9C7\n:1088E0004D46002321465846FEF7BFFB0028BBD16A\n:1088F000A5813DE700203BE72DE9FF4F8BB01E46E9\n:1089000017000D464FF0000412D0B00802D0072027\n:108910000FB0B1E4032E00D100265DB10846F8F790\n:1089200016FD28B93888691E0844F8F710FD08B10B\n:108930001020EDE7C64AB00701D5D18900E001213A\n:10894000F0074FF6FF7802D0D089401E00E0404685\n:1089500086B206AA0B9805F0AEFA4FF000094FF068\n:10896000070B0DF1140A38E09DF81B00000734D501\n:10897000CDF80490CDF800B0CDF80890CDE9039A79\n:10898000434600220B9805F049FB60BB05B3BDF8D8\n:1089900014103A8821442819091D8A4230D3BDF8A1\n:1089A0001E2020F8022BBDF8142020F8022BCDE960\n:1089B00000B9CDE90290CDF810A0BDF81E10BDF8A9\n:1089C000143000220B9805F029FB08B103209FE723\n:1089D000BDF814002044001D84B206A805F077FA03\n:1089E00020B10A2806D0FEF7FCF891E7BDF81E106A\n:1089F000B142B9D934B17DB13888A11C884203D2C3\n:108A00000C2085E7052083E722462946404605F0ED\n:108A100062FC014628190180A41C3C80002077E7F5\n:108A200010B50446F8F775FC08B1102010BD884851\n:108A3000C0892080002010BDF0B58BB00D460646E1\n:108A4000142103A81CF03BFE01208DF80C008DF8CA\n:108A5000100000208DF81100ADF814503046FAF7E0\n:108A6000F2FC48B10078222812D30421304609F0E4\n:108A7000C1FF040005D103E043F202000BB0F0BDDA\n:108A8000FFDF04F11400074604F0CBF8800601D4A0\n:108A90000820F3E7207C022140F00100207409A89F\n:108AA0000094CDE90110072203A930466368FEF760\n:108AB00091FA20B1217C21F001012174DEE72946E1\n:108AC0003046F9F7F2FC08A9384604F099F800B1ED\n:108AD000FFDFBDF82040172C01D2172000E0204610\n:108AE000A84201D92C4602E0172C00D217242146B7\n:108AF0003046FFF712FB21463046F9F7FCF900201B\n:108B0000BCE7F8B51C4615460E46069F0AF0A4F8C9\n:108B10002346FF1DBCB231462A46009409F08FFC63\n:108B2000F8BD70B50C4605460E2120461CF0A5FD8B\n:108B3000002020802DB1012D01D0FFDF70BD062067\n:108B400000E00520A07170BD10B54880087813467C\n:108B500020F00F00001D20F0F00080300C4608705F\n:108B60001422194604F108001CF04DFD00F0C7FC6A\n:108B70003748046010BD2DE9F047DFF8D890491D53\n:108B8000064621F0030117460C46D9F8000009F00B\n:108B90006CFD050000D1FFDF4FF000083560A5F83F\n:108BA00000802146D9F8000009F05FFD050000D1E2\n:108BB000FFDF7560A5F800807FB104FB07F1091D98\n:108BC0000BD0D9F8000009F050FD040000D1FFDF00\n:108BD000B460C4F80080BDE8F087C6F80880FAE702\n:108BE0002DE9F0411746491D21F00302194D0646B3\n:108BF00001681446286809F063FD224671682868F8\n:108C000009F05EFD3FB104FB07F2121D03D0B1680D\n:108C1000286809F055FD042009F094FE044604205C\n:108C200009F098FE201A012804D12868BDE8F04117\n:108C300009F010BDBDE8F08110B50C4605F007F94C\n:108C400000B1FFDF2046BDE81040FDF7CABF0000BD\n:108C5000900200201400002038B50C468288817BE9\n:108C600019B14189914200D90A462280C188121D5A\n:108C700090B26A4608F04FFFBDF80000032800D309\n:108C80000320C1B2208801F011F838BD38B50C4678\n:108C90008288817B19B10189914200D90A462280DC\n:108CA000C188121D90B26A4608F035FFBDF8000079\n:108CB000022800D30220C1B2208800F0F7FF401C38\n:108CC000C0B238BD2DE9FE4F82468B46F9481446A6\n:108CD0000BF10302D0E90010CDE9011022F00302EC\n:108CE00068464FF49071009209F0A1FCF24E002CFE\n:108CF00002D1F24A00999160009901440091357FB8\n:108D000005F1010504D1E8B20BF09AFB00B1FFDFD9\n:108D1000009800EB0510C01C20F0030100915CB925\n:108D2000707AB27A1044C2B200200870308C80B2DF\n:108D300004F015FF00B1FFDF0098316A084400908D\n:108D40002146684600F075FF80460098C01C20F060\n:108D500003000090B37AF27A717A04B1002009F02E\n:108D60005CFD0099084400902146684600F0A9FF88\n:108D7000D14800273D4690F801900CE0284600F0CD\n:108D80003BFF064681788088F9F74CF971786D1CB5\n:108D900000FB0177EDB24D45F0D10098C01C20F0EA\n:108DA0000300009004B100203946F9F746F9009914\n:108DB000002708440090C0483D4690F801900CE020\n:108DC000284600F019FF0646C1788088FEF709FCA6\n:108DD00071786D1C00FB0177EDB24D45F0D1009824\n:108DE000C01C20F00300009004B100203946FEF7BB\n:108DF00001FC00994FF0000908440090AE484D4630\n:108E000047780EE0284600F0F7FE0646807B30B13A\n:108E100006F1080001F019FF727800FB02996D1C41\n:108E2000EDB2BD42EED10098C01C20F003000090CE\n:108E300004B10020494601F00CFF0099084400905D\n:108E40002146684600F0AFFE0098C01D20F00700E4\n:108E50000090DAF80010814204D3A0EB0B01B1F5C9\n:108E6000803F04DB4FF00408CAF8000004E0CAF8B1\n:108E70000000B8F1000F02D04046BDE8FE8F34BBC1\n:108E80008F490020009A03F083F8FBF75CFA8A48C8\n:108E900001AA00211030F8F7E1FA00B1FFDF86489F\n:108EA000407FFEF754FF00B1FFDF83484FF4F671B7\n:108EB00040301CF004FC80480421403080F8E91167\n:108EC00080F8EA11062180F8EB11032101710020DE\n:108ED000D3E770B5784C06464034207804EB401553\n:108EE000E078083590B9A01990F8E80100280ED074\n:108EF000A0780F2800D3FFDF202128461CF0DFFBDD\n:108F0000687866F3020068700120E070284670BD42\n:108F10002DE9F04105460C460027007805219046D2\n:108F20003E46B1EB101F00D0FFDF287A50B1012878\n:108F30000ED0FFDFA8F800600CB12780668000200B\n:108F4000BDE8F0810127092674B16888A08008E097\n:108F50000227142644B16888A0802869E060A88AA6\n:108F60002082287B2072E5E7A8F80060E7E730B5AB\n:108F7000514C012000212070617020726072032228\n:108F8000A272E07221732174052121831F21618364\n:108F900060744CA161610A2121776077474D4FF4DD\n:108FA000B06020626868C11C21F00301814200D0DA\n:108FB000FFDF6868606030BD30B5404C156863689D\n:108FC00010339D4202D20420136030BD3A4B5D78CD\n:108FD0005A6802EB0512107051700320D0801720E0\n:108FE00090800120D0709070002090735878401CC1\n:108FF0005870606810306060002030BD70B5064663\n:109000002D480024457807E0204600F0F5FD017862\n:10901000B14204D0641CE4B2AC42F5D1002070BD72\n:10902000F7B5074608780C4610B3FFF7E7FF05468B\n:10903000A7F12006202F06D0052E19D2DFE806F072\n:109040000F2B2B151A0000F0E2FD0DB1697800E03E\n:109050000021401AA17880B20844FF2808D8A078DF\n:1090600030B1A088022831D202E0608817282DD2C2\n:109070000720FEBD207AE0B161881729F8D3A188C6\n:109080001729F5D3A1790029F2D0E1790029EFD091\n:10909000402804D9ECE7242F18D1207A48B1618800\n:1090A0004FF6FB70814202D8A18881420ED904207C\n:1090B000FEBD0BE07C5A0200AC030020180000202B\n:1090C000000000206E5246357800000065B9207817\n:1090D00002AA0121FFF770FF0028E9D12078FFF7ED\n:1090E0008DFF050000D1FFDF052E18D2DFE806F066\n:1090F000030B0E081100A0786870A088E8800FE0CC\n:109100006088A8800CE0A078A87009E0A078E870DA\n:1091100006E054F8020FA8606068E86000E0FFDF36\n:109120000020C5E71A2835D00DDC132832D2DFE83D\n:1091300000F01B31203131272723252D31312931F2\n:109140003131312F0F00302802D003DC1E2821D10D\n:10915000072070473A3809281CD2DFE800F0151BB9\n:109160000F1B1B1B1B1B07000020704743F2040052\n:10917000704743F202007047042070470D2070478B\n:109180000F20704708207047112070471320704748\n:10919000062070470320704710B5007800F00100EA\n:1091A00008F0ABFCBDE81040BCE710B5007818B182\n:1091B000012801D0072010BD08F0EFFCBDE81040E9\n:1091C000B0E710B5007800F0010008F09FFCBDE8A2\n:1091D0001040A7E70EB5017801F001018DF80010ED\n:1091E000417801F001018DF801100178C1F34001CF\n:1091F0008DF802104178C1F340018DF80310017819\n:1092000089088DF80410417889088DF80510817857\n:109210008DF80610C1788DF8071000798DF80800D8\n:10922000684607F095FAFFF77DFF0EBD2DE9F84F70\n:10923000DFF8F883FE4C00264FF490771FE0012002\n:1092400000F082FD0120FFF744FE05463946D8F8BC\n:10925000080009F00AFA686000B9FFDF686807F0E3\n:1092600006F9B0B12846FAF7D5FB284600F072FDA2\n:1092700028B93A466968D8F8080009F021FA94F943\n:10928000E9010428DBDA022009F05CFB074600252F\n:10929000A5E03A466968D8F8080009F011FAF2E743\n:1092A000B8F802104046491C89B2A8F80210B94229\n:1092B00001D3002141800221B8F8020009F09AFB95\n:1092C000002864D0B8F80200694608F088FBFFF770\n:1092D00029FF00B1FFDF9DF8000078B1B8F8020067\n:1092E00009F0CCFC5FEA000900D1FFDF484608F036\n:1092F0003AFF18B1B8F8020002F052F9B8F80200CB\n:1093000009F0AAFC5FEA000900D1FFDF484608F037\n:1093100022FFE0BB0321B8F8020009F06BFB5FEA13\n:10932000000B47D1FFDF45E0DBF8100010B10078FB\n:10933000FF2849D0022000F007FD0220FFF7C9FDF9\n:109340008246484609F013F8CAF8040000B9FFDF66\n:10935000DAF8040009F0DBF8002100900170B8F899\n:1093600002105046AAF8021001F01CFE484609F00F\n:10937000D0F800B9FFDF504600F0ECFC18B99AF8BD\n:109380000100000704D50098CBF8100012E024E09B\n:10939000DBF8100038B10178491C11F0FF010170B1\n:1093A00008D1FFDF06E000221146484600F0F9FB35\n:1093B00000B9FFDF94F9EA01022805DBB8F80200E2\n:1093C00001F0B5FD0028AFD194F9E901042804DBD0\n:1093D000484609F002F900B101266D1CEDB2BD420C\n:1093E00004D294F9EA010228BFF65AAF002E7FF4A6\n:1093F00022AFBDE8F84F032000F0A6BC10B58B4C9F\n:10940000E06008682061AFF2DB10F9F766FD60707C\n:1094100010BD87480021403801708448017085499B\n:109420004160704770B505464FF080500C46D0F84B\n:10943000A410491C05D1D0F8A810C9430904090C8F\n:109440000BD050F8A01F01F0010129704168216084\n:109450008068A080287830B970BD062120460CF0C5\n:109460000CFD01202870607940F0C000607170BD73\n:1094700070B54FF080540D46D4F88010491C0BD1C4\n:10948000D4F88410491C07D1D4F88810491C03D1A2\n:10949000D4F88C10491C0CD0D4F880100160D4F89A\n:1094A00084104160D4F888108160D4F88C10C160B9\n:1094B00002E010210CF0E1FCD4F89000401C0BD12C\n:1094C000D4F89400401C07D1D4F89800401C03D174\n:1094D000D4F89C00401C09D054F8900F28606068B4\n:1094E0006860A068A860E068E86070BD2846BDE8D4\n:1094F000704010210CF0C1BC4D480079E9E470B512\n:109500004B4CE07830B3207804EB4010407A00F008\n:109510000700204490F9E801002800DCFFDF2078F4\n:10952000002504EB4010407A00F00700011991F883\n:10953000E801401E81F8E8012078401CC0B220708C\n:109540000F2800D12570A078401CA0700CF08CFB77\n:10955000E57070BDFFDF70BD3EB50546032109F023\n:1095600049FA0446284609F077FB054604B9FFDFAF\n:10957000206918B10078FF2800D1FFDF01AA6946F1\n:10958000284600F00EFB60B9FFDF0AE0002202A9C6\n:10959000284600F006FB00B9FFDF9DF8080000B187\n:1095A000FFDF9DF80000411E8DF80010EED220690B\n:1095B0000199884201D1002020613EBD70B5054669\n:1095C000A0F57F400C46FF3800D1FFDF012C01D011\n:1095D000FFDF70BDFFF790FF040000D1FFDF2078B0\n:1095E00020F00F00401D20F0F0005030207065800A\n:1095F0000020207201202073BDE870407FE72DE934\n:10960000F04116460D460746FFF776FF040000D1ED\n:10961000FFDF207820F00F00401D20F0F0005030D8\n:109620002070678001202072286805E01800002063\n:10963000EC030020F81300202061A888A082267384\n:10964000BDE8F0415BE77FB5FFF7D8FC040000D12F\n:10965000FFDF02A92046FFF7FFFA054603A92046CF\n:10966000FFF714FB8DF800508DF80100BDF80800DD\n:10967000001DADF80200BDF80C00001DADF804009F\n:10968000E088ADF80600684608F01FFA002800D010\n:10969000FFDF7FBD2DE9F05FF94E8146307810B1D4\n:1096A0000820BDE8F09F4846F7F733FE08B11020C8\n:1096B000F7E7F44C207808B9FFF759FCA17A607AF3\n:1096C0004D460844C4B200F0A2FAA04207D2201AC4\n:1096D000C1B22A460020FFF76FFC0028E1D1716873\n:1096E000E848C91C002721F003017160B3463E46DB\n:1096F0003D46BA463C4690F801800AE0204600F01C\n:109700007BFA4178807B0E4410FB0155641CE4B267\n:109710007F1C4445F2D1C6EBC601DA4E0AEB870046\n:1097200000EB8100F17A00EB850000EB8100DBF8B3\n:1097300004105C464518012229464846FFF7C2FA44\n:10974000070012D00020FFF759FC05000BD005F1EF\n:109750001300616820F00300884200D0FFDF7078BA\n:10976000401E7070656038469BE7002229464846D7\n:10977000FFF7A8FA00B1FFDFD9F8000060604FF6EC\n:10978000FF7060800120207000208AE72DE9F04101\n:109790000446BB4817460E46007810B10820BDE8C5\n:1097A000F0810846F7F78FFD08B11020F7E7B54DB7\n:1097B000287808B9FFF7DBFB601E1E2807D8012CAC\n:1097C00022D13078FE281FD828770020E7E7A4F1BF\n:1097D00020001F2805D8E0B23A463146BDE8F041E6\n:1097E0001EE4A4F140001F2805D831462046BDE8FC\n:1097F000F04100F0D7BAA4F1A0001F2804D800203F\n:10980000A02C03D0A12C06D00720C8E7317801F0A6\n:1098100001016977C3E731680922F82901D38B0771\n:1098200001D01046BBE76B7C03F00303012B04D18E\n:109830006B8BD7339CB28C42F3D82962AFE72DE90A\n:10984000F04781460E460846F7F763FD48B948469B\n:10985000F7F77DFD28B909F1030020F00301494520\n:1098600002D01020BDE8F08786484FF0000A403053\n:10987000817869B14178804600EB4114083437881B\n:1098800032460021204600F073FA050004D027E09C\n:10989000A6F800A00520E5E7B9F1000F24D0308834\n:1098A000B84201D90C251FE0607800F00705284672\n:1098B00000F04AFA08EB0507324697F8E8014946F6\n:1098C000401C87F8E801204607F5F47700F050FACD\n:1098D00005463878401E3870032000F035FA2DB167\n:1098E0000C2D01D0A6F800A02846BBE76078644E96\n:1098F00000F00701012923D002290CD0032934D01C\n:10990000FFDF98F801104046491CC9B288F80110E1\n:109910000F2935D036E0616821B1000702D4608894\n:10992000FFF71AFE98F8EA014746012802D170783D\n:10993000F9F7F2FA97F9EA010428E2DBFFDFE0E742\n:10994000616821B14FF49072B06808F0B9FE98F8E0\n:10995000E9014746032802D17078F9F7DDFA97F953\n:10996000E9010428CDDBFFDFCBE7C00602D5608824\n:10997000FFF7F2FD98F9EB010628C2DBFFDFC0E735\n:1099800080F801A08178491E8170617801F007019B\n:1099900001EB080090F8E811491C80F8E811A3E7F2\n:1099A00070B50D460446F7F78EFC18B92846F7F750\n:1099B000B0FC08B1102070BD29462046BDE87040BB\n:1099C0000AF075BD70B505460AF094FDC4B228468C\n:1099D000F7F7BDFC08B1102070BD35B128782C70A8\n:1099E00018B1A04201D0072070BD2046FDF764FEEB\n:1099F000052805D10AF082FD012801D0002070BDA4\n:109A00000F2070BD70B5044615460E460846F7F7A0\n:109A10005AFC18B92846F7F77CFC08B1102070BD35\n:109A2000022C03D0102C01D0092070BD2A463146EB\n:109A300020460AF06CFD0028F7D0052070BD70B5F7\n:109A400014460D460646F7F73EFC38B92846F7F7A8\n:109A500060FC18B92046F7F77AFC08B1102070BDF9\n:109A60002246294630460AF071FD0028F7D007202B\n:109A700070BD3EB50446F7F74CFC28B110203EBD42\n:109A800018000020AC030020684606F0C8FDFFF770\n:109A900049FB0028F3D19DF806002070BDF80800AE\n:109AA0006080BDF80A00A0800020E8E770B5054698\n:109AB0000C460846F7F74BFC20B93CB12068F7F795\n:109AC00028FC08B1102070BDA08828B12146284686\n:109AD000BDE87040FDF748BE092070BD70B5054671\n:109AE0000C460846F7F7EFFB30B9681E1E2814D85D\n:109AF0002046F7F7E8FB08B1102070BD042D01D90E\n:109B0000072070BD05B9FFDFF84800EB850050F86D\n:109B1000041C2046BDE870400847A5F120001F281E\n:109B200005D821462846BDE87040FAF794BBF02DD1\n:109B300008D0F12DE4D1207808F05CF8BDE8704041\n:109B4000FFF7F0BAA068F7F7BEFB0028D4D1204693\n:109B500008F028F8F2E770B504460D460846F7F716\n:109B6000D8FB30B9601E1E2811D82846F7F7ABFB8A\n:109B700008B1102070BD012C05D0022C03D0032C9D\n:109B800001D0042C01D1062070BD072070BDA4F1C6\n:109B900020001F28F9D829462046BDE87040FAF772\n:109BA000B2BB08F0A7BA38B50446D148007B00F034\n:109BB0000105D9B904F034FB0DB1226800E00022A0\n:109BC000CC484178C06806F018FCCA481030C0780C\n:109BD0008DF8000010B1012802D004E0012000E05F\n:109BE00000208DF80000684606F093FD002D02D09D\n:109BF00020682830206038BD30B5BD4D04466878F7\n:109C0000A04200D8FFDF686800EB041030BD70B5DB\n:109C1000B74800252C46467807E02046FFF7ECFFC2\n:109C20004078641C2844C5B2E4B2B442F5D1284659\n:109C300070BD2DE9F0410C4607464FF0000800F0DA\n:109C4000DEF80646FF2801D94FF013083868C01C1B\n:109C500020F003023A6054EA080421D1A448F3B288\n:109C6000072124300CF00EFB09E0072C10D2DFE8AE\n:109C700004F0060408080A0406009F4804E09F4810\n:109C800002E09F4800E09F480CF01CFB054600E006\n:109C9000FFDFA54200D0FFDF641CE4B2072CE4D351\n:109CA000386800EB06103860404678E5021D5143E5\n:109CB000452900D245210844C01CB0FBF2F0C0B2D7\n:109CC00070472DE9FC5F064689484FF000088B4637\n:109CD0004746444690F8019022E02046FFF78CFF6B\n:109CE000050000D1FFDF687869463844C7B22846CE\n:109CF000FEF7B2FF824601A92846FEF7C7FF0346DA\n:109D0000BDF804005246001D81B2BDF80000001DE0\n:109D100080B208F0EDFE6A78641C00FB0288E4B2B1\n:109D20004C45DAD13068C01C20F003003060BBF134\n:109D3000000F00D000204246394608F0E7FE3168A7\n:109D400008443060BDE8FC9F69494031087100203B\n:109D5000C870704766494031CA782AB10A7801EB69\n:109D600042110831814201D0012070470020704724\n:109D70002DE9F04106460078154600F00F0400205A\n:109D80001080601E0F46052800D3FFDF57482A4683\n:109D9000183800EB8400394650F8043C3046BDE8E2\n:109DA000F041184770B50C46402802D0412806D132\n:109DB00020E0A07861780D18E178814201D9072070\n:109DC00070BD2078012801D9132070BDFF2D08D85F\n:109DD0000AF026FD06460BF0FFFE301A801EA84250\n:109DE00001DA122070BD4248216881602179017337\n:109DF000002070BDBDE87040084600F02BB82DE98A\n:109E0000F047DFF8EC900026344699F8090099F8FD\n:109E10000A2099F801700244D5B299F80B20104439\n:109E200000F0FF0808E02046FFF7E6FE817B40785F\n:109E300011FB0066641CE4B2BC42F4D199F809102D\n:109E400099F80A0029442944414400B101200844FA\n:109E5000304407E538B50446407800F00300012897\n:109E600003D002280BD0072038BD606858B1F7F73F\n:109E700077FAD0B96068F7F76AFA20B915E0606838\n:109E8000F7F721FA88B969462046FCF791F80028CF\n:109E9000EAD1607800F00300022808D19DF80000A4\n:109EA00028B16068F7F753FA08B1102038BD61890E\n:109EB000F8290DD8208988420AD8607800F003027A\n:109EC0000B48012A06D1D731026A89B28A4201D2EF\n:109ED000092038BD94E80E0000F1100585E80E0059\n:109EE0000AB900210183002038BD00009C5A0200FD\n:109EF000AC03002018000020574100001FAD0000F7\n:109F0000E92F0000334201002DE9F04107461446D5\n:109F10008846084601F022FD064608EB88001C2210\n:109F2000796802EBC0000D18688C58B1414638467C\n:109F300001F01CFD014678680078C200082305F195\n:109F400020000CE0E88CA8B14146384601F015FD30\n:109F50000146786808234078C20005F1240008F023\n:109F600006FC38B1062121726681D0E90010C4E9EF\n:109F7000031009E0287809280BD00520207266819B\n:109F80006868E060002028702046BDE8F04101F0DC\n:109F9000DBBC072020726681F4E72DE9F04116460C\n:109FA0000D460746406801EB85011C2202EBC1010A\n:109FB0004418204601F003FD40B10021708865F38C\n:109FC0000F2160F31F4106200CF036FA09202070A3\n:109FD000324629463846BDE8F04195E72DE9F04183\n:109FE0000E46074600241C21F07816E004EB84039B\n:109FF000726801EBC303D25C6AB1FFF77DFA05001A\n:10A0000000D1FFDF6F802A4621463046FFF7C5FFAB\n:10A010000120BDE8F081641CE4B2A042E6D8002033\n:10A02000F7E770B5064600241C21C0780AE000BF9F\n:10A0300004EB8403726801EBC303D5182A782AB1B4\n:10A04000641CE4B2A042F3D8402070BD2821284609\n:10A050001BF013FB706880892881204670BD70B5A5\n:10A06000034600201C25DC780DE000BF00EB8006D5\n:10A070005A6805EBC6063244167816B1128A8A422F\n:10A0800004D0401CC0B28442F0D8402070BDF0B56E\n:10A09000044600201C26E5780EE000BF00EB800798\n:10A0A000636806EBC7073B441F788F4202D15B7899\n:10A0B000934204D0401CC0B28542EFD84020F0BD8E\n:10A0C0000078032801D000207047012070470078F5\n:10A0D000022801D00020704701207047007807282F\n:10A0E00001D000207047012070472DE9F04106465D\n:10A0F00088461078F1781546884200D3FFDF2C7827\n:10A100001C27641CF078E4B2A04201D8201AC4B223\n:10A1100004EB8401706807EBC1010844017821B1A8\n:10A120004146884708B12C7073E72878A042E8D1EF\n:10A13000402028706DE770B514460B880122A240BC\n:10A14000134207D113430B8001230A22011D08F09B\n:10A15000D8FA047070BD2DE9FF4F81B00878DDE9B1\n:10A160000E7B9A4691460E4640072CD4019808F083\n:10A1700085FD040000D1FFDF07F1040820461FFA27\n:10A1800088F107F0C4FE050000D1FFDF2046294614\n:10A190006A4608F00EF90098A0F80370A0F805A030\n:10A1A000284608F0B4F9017869F306016BF3C7118A\n:10A1B000017020461FFA88F107F0ECFE00B9FFDFBE\n:10A1C000019806F08CF806EB0900017F491C017725\n:10A1D00005B0BDE8F08F2DE9F84F0E469A4691463E\n:10A1E0000746032108F006FC0446008DDFF8B88519\n:10A1F000002518B198F80000B0421ED1384608F08A\n:10A200003DFD070000D1FFDF09F10401384689B2A6\n:10A2100007F07DFE050010D0384629466A4608F052\n:10A22000C8F8009800210A460180817006F010F9F4\n:10A230000098C01DCAF8000021E098F80000B04264\n:10A2400016D104F1260734F8341F012000FA06F96C\n:10A2500011EA090F00D0FFDF2088012340EA09003E\n:10A2600020800A22391D384608F066FA067006E09A\n:10A27000324604F1340104F12600FFF75CFF0A21A5\n:10A2800088F800102846BDE8F88FFEB515460C4644\n:10A29000064602AB0C220621FFF79DFF002827D0BF\n:10A2A0000299607812220A70801C487008224A8045\n:10A2B000A07002982988052381806988C180A988B7\n:10A2C0000181E988418100250C20CDE900050622A5\n:10A2D00021463046FFF73FFF2946002266F31F4123\n:10A2E000F02310460BF0FEFF6078801C60700120A8\n:10A2F000FEBDFEB514460D460622064602AB1146CB\n:10A30000FFF769FF002812D0029B1320002118706C\n:10A31000A8785870022058809C800620CDE9000162\n:10A320000246052329463046FFF715FF0120FEBDF2\n:10A330002DE9FE430C46804644E002AB0E22072185\n:10A340004046FFF748FF002841D060681C2267782C\n:10A350008678BF1C06EB860102EBC1014518029806\n:10A360001421017047700A214180698A0181E98ABC\n:10A370004181A9888180A9898181304601F0EEFA66\n:10A38000029905230722C8806F70042028700025D9\n:10A390000E20CDE9000521464046FFF7DCFE2946A8\n:10A3A00066F30F2168F31F41F023002206200BF013\n:10A3B00099FF6078FD49801C607062682046921C9D\n:10A3C000FFF793FE606880784028B6D10120BDE891\n:10A3D000FE83FEB50D46064638E002AB0E2207218D\n:10A3E0003046FFF7F8FE002835D068681C23C17896\n:10A3F00001EB810203EBC20284180298152202705D\n:10A40000627842700A224280A2894281A2888281B7\n:10A41000084601F0A3FA014602988180618AC18052\n:10A42000E18A0181A088B8B10020207000210E20AF\n:10A43000CDE900010523072229463046FFF78BFEB0\n:10A440006A68DB492846D21CFFF74FFE6868C0786F\n:10A450004028C2D10120FEBD0620E6E72DE9FE43DB\n:10A460000C46814644E0204601F093FAD0B302AB9B\n:10A47000082207214846FFF7AEFE0028A7D06068F3\n:10A480001C2265780679AD1C06EB860102EBC10142\n:10A4900047180298B7F81080062101704570042112\n:10A4A0004180304601F05AFA0146029805230722FE\n:10A4B000C180A0F804807D70082038700025CDE9A7\n:10A4C000000521464846FFF746FE294666F30F2160\n:10A4D00069F31F41F023002206200BF003FF607890\n:10A4E000801C60706268B3492046121DFFF7FDFDB5\n:10A4F000606801794029B6D1012068E72DE9F34F62\n:10A5000083B00E4680E0304601F043FA002875D053\n:10A5100071681C2091F8068008EB880200EBC200ED\n:10A520000C184146304601F028FA0146A078C300D5\n:10A5300070684078C20004F1240008F034F907463E\n:10A540008088E18B401A80B2002581B3AA46218B16\n:10A55000814200D808468146024602AB0721039893\n:10A56000FFF739FE010028D0BAF1000F03D0029A9C\n:10A57000B888022510808B46E28B3968A9EB05006C\n:10A580001FFA80FA0A440398009208F077FBED1D49\n:10A59000009A59465346009507F085FFE08B5044DA\n:10A5A00080B2E083B988884209D1012508E0FFE73D\n:10A5B000801C4FF0010A80B2C9E7002008E60025A0\n:10A5C000CDE90095238A072231460398FFF7C3FDA2\n:10A5D000E089401EE0818DB1A078401CA0707068B9\n:10A5E000F178427811FB02F1CAB2816901230E3081\n:10A5F00008F087F880F800800020E08372686E49D8\n:10A600003046921DFFF771FD7068817940297FF413\n:10A610007AAF0120DCE570B5064648680D46144661\n:10A620008179402910D104EB84011C2202EBC10185\n:10A63000084401F0E5F9002806D0686829468471CD\n:10A640003046BDE8704059E770BDFEB50C46074680\n:10A65000002645E0204601F09CF9D8B360681C2232\n:10A66000417901EB810102EBC1014518688900B90C\n:10A67000FFDF02AB082207213846FFF7ACFD0028B8\n:10A6800033D00299607816220A70801C487004202A\n:10A6900048806068407901F061F90146029805231D\n:10A6A000072281806989C1800820CDE90006214602\n:10A6B0003846FFF750FD6078801C6070A889698972\n:10A6C0000844B0F5803F00D3FFDFA88969890844BA\n:10A6D000A8816E81626839492046521DFFF705FD49\n:10A6E000606841794029B5D10120FEBD30B5438C69\n:10A6F000458BC3F3C704002345B1838B641EED1A59\n:10A70000C38A6D1E1D4495FBF3F3E4B22CB100899E\n:10A7100018B1A04200D8204603444FF6FF70834290\n:10A7200000D3034613800C7030BD2DE9FC41074671\n:10A7300016460D46486802EB86011C2202EBC10159\n:10A7400044186A4601A92046FFF7D0FFA089618915\n:10A7500001448AB2BDF80010914212D0081A00D507\n:10A76000002060816868407940280AD1204601F0C5\n:10A770003DF9002805D06868294646713846FFF73C\n:10A7800064FFBDE8FC812DE9FE4F894680461546F1\n:10A790005088032108F02EF98346B8F802004028BB\n:10A7A0000ED240200DE000002C000020C1A00000CF\n:10A7B000CFA00000DDA0000001BA0000EDB900004C\n:10A7C000403880B282460146584601F0E2F800283F\n:10A7D0007ED00AEB8A001C22DBF8041002EBC000DA\n:10A7E0000C18204601F0EBF8002877D1B8F80000EB\n:10A7F000E18A88423CD8A189D1B348456ED1002670\n:10A800005146584601F0B2F8218C0F18608B48B9B8\n:10A81000B9F1020F62D3B8F804006083618A8842FC\n:10A8200026D80226A9EB06001FFA80F9B888A28B69\n:10A83000801A002814DD4946814500DA084683B2B3\n:10A8400068886968029139680A44CDE9003208F0E5\n:10A8500003FADDE90121F61D009B009607F0EFFDEC\n:10A86000A18B01EB090080B2A083618B884207D9DC\n:10A87000688803B052465946BDE8F04F01F0DDB894\n:10A880001FD14FF009002872B8F802006881D7E99B\n:10A890000001C5E90401608BA881284601F054F845\n:10A8A0005146584601F062F80146DBF804000823DF\n:10A8B0000078C20004F1200007F059FF0020A083B7\n:10A8C0006083A0890AF0FF02401EA081688800E032\n:10A8D00004E003B05946BDE8F04F26E7BDE8FE8F1F\n:10A8E0002DE9F041064615460F461C461846F6F778\n:10A8F000EAFC18B92068F6F70CFD08B1102013E443\n:10A900007168688C0978B0EBC10F01D313200BE498\n:10A910003946304601F02AF801467068082300786D\n:10A92000C20005F1200007F0ECFED4E90012C0E9F6\n:10A9300000120020E3E710B50446032108F05AF89E\n:10A940000146007800F00300022805D02046BDE84B\n:10A95000104001F1140298E48A8A2046BDE81040B4\n:10A96000C7E470B50446032108F044F805460146E3\n:10A970002046FFF773FD002816D029462046FFF732\n:10A9800064FE002810D029462046FFF722FD00284B\n:10A990000AD029462046FFF7CBFC002804D02946E0\n:10A9A0002046BDE87040A9E570BD2DE9F0410C4698\n:10A9B00080461EE0E178427811FB02F1CAB281695B\n:10A9C00001230E3007F0D3FE077860681C22C1799E\n:10A9D000491EC17107EB8701606802EBC10146188F\n:10A9E0003946204600F0D5FF18B1304600F0E0FFB0\n:10A9F00020B16068C1790029DCD180E7FEF77CFDD9\n:10AA0000050000D1FFDF0A202872384600F0A6FFBB\n:10AA100068813946204600F0B0FF0146606808238F\n:10AA20004078C20006F1240007F0A1FED0E9001032\n:10AA3000C5E90310A5F80280284600F085FFB0782C\n:10AA400000B9FFDFB078401EB07058E770B50C4613\n:10AA50000546032107F0CEFF01464068C279224433\n:10AA6000C2712846BDE870409FE72DE9FE4F82463F\n:10AA7000507814460F464FF0000800284FD00128A8\n:10AA800007D0022822D0FFDF2068B8606068F86035\n:10AA900024E702AB0E2208215046FFF79CFB00285A\n:10AAA000F2D00298152105230170217841700A2106\n:10AAB0004180C0F80480C0F80880A0F80C8062884B\n:10AAC00082810E20CDE90008082221E0A6783046D8\n:10AAD00000F044FF054606EB86012C22786802EB65\n:10AAE000C1010822465A02AB11465046FFF773FBDC\n:10AAF0000028C9D0029807210170217841700421F3\n:10AB0000418008218580C680CDE9001805230A46CA\n:10AB100039465046FFF71FFB87F80880DEE6A67827\n:10AB2000022516B1022E13D0FFDF2A1D914602AB7B\n:10AB300008215046FFF74FFB0028A5D002980121BD\n:10AB4000022E0170217841704580868002D005E098\n:10AB50000625EAE7A188C180E1880181CDE9009856\n:10AB60000523082239465046D4E710B50446032190\n:10AB700007F040FF014600F108022046BDE8104002\n:10AB800073E72DE9F05F0C4601281DD0957992F806\n:10AB90000480567905EB85011F2202EBC10121F0EB\n:10ABA000030B08EB060111FB05F14FF6FF7202EAF9\n:10ABB000C10909F1030115FB0611F94F21F0031A30\n:10ABC00040B101283DD124E06168E57891F800802A\n:10ABD0004E78DFE75946786807F047FD606000B9B6\n:10ABE000FFDF594660681AF06AFDE57051467868E3\n:10ABF00007F03BFD6168486100B9FFDF60684269AA\n:10AC000002EB09018161606880F80080606846702D\n:10AC100017E0606852464169786807F051FD5A466E\n:10AC20006168786807F04CFD032007F08BFE04464E\n:10AC3000032007F08FFE201A012802D1786807F060\n:10AC400009FD0BEB0A00BDE8F09F0246002102203F\n:10AC500097E773B5D24D0A202870009848B10024B8\n:10AC60004FEA0D0007F0E3FC002C01D10099696068\n:10AC70007CBD01240020F5E770B50C46154638214F\n:10AC800020461AF01CFD012666700A2104F11C0002\n:10AC90001AF015FD05B9FFDF297A207861F301006C\n:10ACA0002070A879002817D02A4621460020FFF7F7\n:10ACB00068FF6168402088706168C87061680871C9\n:10ACC0006168487161688871616828880881616875\n:10ACD000688848816068868170BDC878002802D085\n:10ACE000002201204DE7704770B50546002165F34D\n:10ACF0001F4100200BF0A0FB0321284607F07AFE3D\n:10AD0000040000D1FFDF21462846FFF767F900283D\n:10AD100004D0207840F010002070012070BD2DE993\n:10AD2000FF4180460E460F0CFEF7E6FB050007D0FC\n:10AD30006F800321384607F05DFE040008D106E06D\n:10AD400004B03846BDE8F0411321F9F739BEFFDF02\n:10AD50005FEA080005D0B8F1060F18D0FFDFBDE8A4\n:10AD6000FF8120782A4620F0080020700020ADF8EE\n:10AD7000020002208DF800004FF6FF70ADF80400CD\n:10AD8000ADF8060069463846F9F711FAE7E7C6F369\n:10AD9000072101EB81021C23606803EBC202805C87\n:10ADA000042803D008280AD0FFDFD8E7012000904C\n:10ADB0004FF440432A46204600F008FECFE704B097\n:10ADC0002A462046BDE8F041FFF7E7B82DE9F05FDD\n:10ADD0000027B0F80A9090460C4605463E46B9F169\n:10ADE000400F01D2402001E0A9F140001FFA80FA93\n:10ADF000287AC01E08286BD2DFE800F00D04192065\n:10AE000058363C4772271026002C6CD0D5E9030138\n:10AE1000C4E902015CE070271226002C63D00A22EC\n:10AE200005F10C0104F108001AF0EDFB50E0712768\n:10AE30000C26002C57D0E868A06049E07427102643\n:10AE40009CB3D5E90301C4E902016888032107F036\n:10AE5000D1FD8346FEF750FB02466888508051467C\n:10AE60005846FFF751F833E075270A26ECB1A88958\n:10AE700020812DE076271426BCB105F10C0004F1E9\n:10AE8000080307C883E8070022E07727102664B18B\n:10AE9000D5E90301C4E902016888032107F0AAFD8E\n:10AEA00001466888FFF781FD12E01CE07327082641\n:10AEB000CCB16888032107F09DFD01460078C006EB\n:10AEC00006D56888FFF78AF810B96888F8F786FD14\n:10AED000A8F800602CB12780A4F8069066806888E6\n:10AEE000A0800020AFE6A8F80060FAE72DE9FC4159\n:10AEF0000C461E4617468046032107F07BFD05469B\n:10AF00000A2C0AD2DFE804F0050505050505090944\n:10AF10000907042303E0062301E0FFDF0023CDE956\n:10AF20000076224629464046FFF715F929E438B550\n:10AF30000546A0F57F40FF3830D0284607F08CFE4C\n:10AF4000040000D1FFDF204607F011FA002815D0D9\n:10AF500001466A46204607F02CFA00980321B0F813\n:10AF60000540284607F046FD0546052C03D0402C39\n:10AF700005D2402404E0007A80B1002038BD403C76\n:10AF8000A4B2214600F005FD40B1686804EB8401DD\n:10AF90003E2202EBC101405A0028EFD0012038BD0B\n:10AFA0002C0000202DE9F04F054689B0408807F0BD\n:10AFB00053FE040000D1FFDF06AA2046696800F0B6\n:10AFC000C1FC069C001F34F8031F21806388638046\n:10AFD000228881B28A4205D1042B0AD0052B1DD0CC\n:10AFE000062B15D02A462046FFF7CDFB09B0BDE859\n:10AFF000F08F1646241D2A4621463046F7F73FFAC1\n:10B000000828F3D12A4621463046FCF7F4FBEDE749\n:10B010006888211D6B68FAF739FCE7E717466888EE\n:10B02000032107F0E7FC4FF000088DF80480064686\n:10B03000ADF80680042FD9D36279002AD6D02079C2\n:10B040004FF6FF794FF01C0A13282CD008DC01289A\n:10B0500078D0062847D0072875D0122874D106E08A\n:10B06000142872D0152871D016286DD1ACE10C2FA0\n:10B070006AD1307800F00301022965D140F0080060\n:10B0800030706079B07001208DF804002089ADF82F\n:10B0900008006089ADF80A00A089ADF80C00E089CD\n:10B0A000ADF80E0019E0B07890429FD130780107DA\n:10B0B0009CD5062F9AD120F0080030706888414650\n:10B0C00060F31F4100200BF0B7F902208DF8040057\n:10B0D000ADF808902089ADF80A0068882A4601A9D1\n:10B0E000F9F765F882E7082F80D12789B4F80A902C\n:10B0F000402F01D2402001E0A7F1400080B28046FD\n:10B100000146304600F045FC08B3716808EB880042\n:10B110002C2202EBC000095A4945E3D1FE4807AA98\n:10B12000D0E90210CDE9071060798DF81C0008F015\n:10B13000FF048DF81E4068883146FFF796FC2A46CA\n:10B14000214639E0B6E014E03CE039E0E6E0F248C0\n:10B15000D0E90010CDE907106079ADF820708DF8C6\n:10B160001C00ADF82290688807AA3146FFF77DFCE5\n:10B170003CE7082FB6D16089B4F80880402801D296\n:10B18000402000E0403887B23946304600F001FCEC\n:10B190000028A7D007EB870271680AEBC2000844B9\n:10B1A000028A42459ED1017808299BD14078617975\n:10B1B000884297D1F9B22A463046FEF7EEFE15E7EF\n:10B1C0000E2F07D0CDF81C80CDF8208060798DF847\n:10B1D0001C00C8E76189E7898B46B4F80C903046BB\n:10B1E000FEF73DFFABF14001402901D309204AE0C1\n:10B1F000B9F1170F01D3172F01D20B2043E04028DC\n:10B200000ED000EB800271680AEBC200084401789E\n:10B21000012903D1407861798842A9D00A2032E01F\n:10B220003046FEF7FEFE014640282BD001EB81039D\n:10B2300072680AEBC30002EB0008012288F80020C4\n:10B24000627988F80120706822894089B84200D963\n:10B250003846248A03232B72AA82EF812882A5F81C\n:10B260000C906C82084600F079FB6881A8F8149075\n:10B27000A8F81870A8F80E40A8F810B0284600F0FA\n:10B2800063FBB3E6042005212972A5F80A80E88152\n:10B2900001212973A049D1E90421CDE90721617970\n:10B2A0008DF81C10ADF81E00688807AA3146FFF71C\n:10B2B000DCFBE3E7062FE4D3B078904215D1307879\n:10B2C000010712D520F0080030706888414660F30D\n:10B2D0001F4100200BF0B0F802208DF804002089F7\n:10B2E000ADF80800ADF80A90F7E604213046FEF705\n:10B2F000CEFE04464028C4D00220830300902A4694\n:10B300002146304600F062FB4146688864F30F2115\n:10B3100060F31F4106200BF08FF867E60E2FB0D1C7\n:10B3200004213046FEF7B3FE81464028A9D04146AD\n:10B33000688869F30F2160F31F4106200BF07CF849\n:10B34000208A0790E08900907068A7894089B842F8\n:10B3500000D938468346B4F80A80208905904846CB\n:10B3600000F0FCFA6881079840B10220079B00902A\n:10B370002A464946304600F029FB37E6B8F1170F58\n:10B380001ED3172F1CD30420287200986882EF81E7\n:10B39000A5F810B0A5F80C8009EB89020AEBC200F1\n:10B3A0007168009A0C180598A4F81480A4F818B0D5\n:10B3B000E2812082284600F0C7FA0620207015E6B8\n:10B3C00001200B230090D3E7082FA6D12189304616\n:10B3D000FEF745FE074640289FD007EB87027168BD\n:10B3E0000AEBC2000844804600F0E9FA002894D134\n:10B3F0006489B8F80E002044B0F5803F05D3688812\n:10B400003A46314600F019FBF0E5002C85D0A8F84B\n:10B410000E0068883A463146FFF7FDF8082028728A\n:10B42000384600F09BFA6881AC8127E770B50D467D\n:10B430000646032107F0DEFA040004D02078000756\n:10B4400004D5112070BD43F2020070BD2A4621468A\n:10B450003046FEF71AFF18B9286860616868A06175\n:10B46000207840F008002070002070BD70B50D46B7\n:10B470000646032107F0BEFA040004D02078000736\n:10B4800004D4082070BD43F2020070BD2A46214654\n:10B490003046FEF72EFF00B9A582207820F0080084\n:10B4A0002070002070BD2DE9F04F0E4691B080460F\n:10B4B000032107F09FFA0446404607F0DFFB0746EA\n:10B4C0000020079008900990ADF830000A90029093\n:10B4D0000390049004B9FFDF0DF108091FBBFFDFE3\n:10B4E00021E038460BA9002206F004FE9DF82C004E\n:10B4F00000F07F050A2D00D3FFDF6019017F491E90\n:10B5000001779DF82C0000060DD52A460CA907A846\n:10B51000FEF711FE02E00000AC5A020019F8051017\n:10B52000491C09F80510761EF6B2DAD204F134008F\n:10B53000FA4D04F1260BDFF8E8A304F12A07069080\n:10B5400010E05846069900F06AFA064628700A2864\n:10B5500000D3FFDF5AF8261040468847E08CC05DD4\n:10B56000B04202D0208D0028EBD10A202870EC4D8B\n:10B570004E4628350EE00CA907A800F050FA044604\n:10B58000375D55F8240000B9FFDF55F8242039460F\n:10B5900040469047BDF81E000028ECD111B026E5CA\n:10B5A00010B5032107F026FA040000D1FFDF0A21BD\n:10B5B00004F11C001AF083F8207840F00400207099\n:10B5C00010BD10B50C46032107F014FA2044007F8B\n:10B5D000002800D0012010BD2DE9F84F89461546FE\n:10B5E0008246032107F006FA070004D02846F5F743\n:10B5F0006AFE40B903E043F20200BDE8F88F484616\n:10B60000F5F787FE08B11020F7E7786828B1698858\n:10B610000089814201D90920EFE7B9F800001C2414\n:10B6200018B1402809D2402008E03846FEF7F9FC5E\n:10B630008046402819D11320DFE7403880B2804689\n:10B640000146384600F0A5F948B108EB8800796852\n:10B6500004EBC000085C012803D00820CDE70520DA\n:10B66000CBE7FDF749FF06000BD008EB88007968AF\n:10B6700004EBC0000C18B9F8000020B1E88910B143\n:10B6800013E01120B9E72888172802D36888172803\n:10B6900001D20720B1E7686838B12B1D2246414628\n:10B6A0003846FFF71DF90028A7D104F10C026946BE\n:10B6B0002046FFF71BF8288860826888E082B9F886\n:10B6C000000030B102202070E889A080E889A0B194\n:10B6D0002BE003202070A889A08078688178402919\n:10B6E00005D180F8028039465046FEF721FE4046DB\n:10B6F00000F034F9A9F8000021E07868218B408936\n:10B70000884200D908462083A6F802A0042030729F\n:10B71000B9F800007081E0897082F181208B30825D\n:10B72000A08AB081304600F00FF97868C1784029CE\n:10B7300005D180F8038039465046FEF74AFE0020C6\n:10B740005BE770B50D460646032107F053F9040088\n:10B7500003D0402D04D2402503E043F2020070BD27\n:10B76000403DADB2294600F014F958B105EB850112\n:10B770001C22606802EBC101084400F020F918B1F6\n:10B78000082070BD052070BD2A462146304600F0D5\n:10B7900054F9002070BD2DE9F0410D461646804653\n:10B7A000032107F027F90446402D01D2402500E08F\n:10B7B000403DADB28CB1294600F0EBF880B105EB0D\n:10B7C00085011C22606802EBC1014718384600F071\n:10B7D000F6F838B10820BDE8F08143F20200FAE73C\n:10B7E0000520F8E733463A4629462046FFF778F821\n:10B7F0000028F0D1EAB221464046FEF796FF00202D\n:10B80000E9E72DE9F0410D4616468046032107F091\n:10B81000F1F80446402D01D2402500E0403DAFB292\n:10B8200024B13046F5F74FFD38B902E043F202008B\n:10B83000D1E73068F5F747FD08B11020CBE739466E\n:10B84000204600F0A6F860B107EB87011C22606873\n:10B8500002EBC1014518284600F0B1F818B10820E4\n:10B86000B9E70520B7E7B088A98A884201D90C203A\n:10B87000B1E76168E88C4978B0EBC10F01D31320C0\n:10B88000A9E73946204600F078F8014660680823A9\n:10B890004078C20005F1240006F033FFD6E900121B\n:10B8A000C0E90012FAB221464046FEF7B4FE00207D\n:10B8B00091E72DE9F0470D461F469046814603214A\n:10B8C00007F098F80446402D01D2402001E0A5F190\n:10B8D000400086B23CB14DB13846F5F738FD50B165\n:10B8E0001020BDE8F08743F20200FAE76068C8B1B3\n:10B8F000A0F80C8024E03146204600F04AF888B1D8\n:10B9000006EB86011C22606802EBC101451828463F\n:10B9100000F055F840B10820E3E700002C000020BB\n:10B92000C45A02000520DCE7A5F80880F2B22146DF\n:10B930004846FEF7FAFE1FB1A88969890844388095\n:10B940000020CEE706F035BD017821F00F01491C3B\n:10B9500021F0F00110310170FDF7D1BD10B50446A2\n:10B96000402800D9FFDF4034A0B210BD40684269D2\n:10B970000078484302EBC0007047C2784068037803\n:10B9800012FB03F24378406901FB032100EBC10085\n:10B990007047C2788A4209D9406801EB81011C22B4\n:10B9A00002EBC101405C08B10120704700207047E4\n:10B9B0000078062801D901207047002070470078E0\n:10B9C000062801D00120704700207047F0B401EB39\n:10B9D00081061C27446807EBC6063444049D0526EF\n:10B9E0002670E3802571F0BCFEF78EBA10B5418950\n:10B9F00011B1FFF7DDFF08B1002010BD012010BD1F\n:10BA000010B5C18C8278B1EBC20F04D9C18911B1D4\n:10BA1000FFF7CEFF08B1002010BD012010BD10B50A\n:10BA20000C4601230A22011D06F0A1FE00782188A0\n:10BA3000012282409143218010BDF0B402EB8205C7\n:10BA40001C264C6806EBC505072363554B681C791B\n:10BA5000402C03D11A71F0BCFEF700BDF0BC70475A\n:10BA600010B5EFF3108000F0010472B6F948417888\n:10BA7000491C41704078012801D10AF01DF9002CC1\n:10BA800000D162B610BD70B5F24CA07848B901255E\n:10BA9000A570FFF7E5FF0AF020F920B100200AF0B9\n:10BAA000EAF8002070BD4FF08040E570C0F8045304\n:10BAB000F7E770B5EFF3108000F0010572B6E54CC2\n:10BAC000607800B9FFDF6078401E6070607808B968\n:10BAD0000AF0F6F8002D00D162B670BDDD4810B551\n:10BAE000817821B10021C1708170FFF7E2FF002051\n:10BAF00010BD10B504460AF0F0F8D6498978084020\n:10BB000000D001202060002010BD10B5FFF7A8FF75\n:10BB10000AF0E3F802220123CE49540728B1CE48A7\n:10BB2000026023610320087202E00A72C4F8043341\n:10BB30000020887110BD2DE9F05FDFF8189342787E\n:10BB4000817889F80420002689F80510074689F8CD\n:10BB500006600078DFF804B3354620B1012811D023\n:10BB6000022811D0FFDF0AF0CAF84FF0804498B1E4\n:10BB70000AF0CCF8B0420FD130460AF0CBF80028DA\n:10BB8000FAD041E00126EEE7FFF76AFF5846016868\n:10BB9000C907FCD00226E6E70120E060C4F80451A2\n:10BBA000AF490E600107D1F84412AD4AC1F34231EA\n:10BBB00024321160AA49343108604FF0020AC4F8F7\n:10BBC00004A3A060A7480168C94341F3001101F133\n:10BBD0000108016841F01001016000E020BFD4F8C5\n:10BBE00004010028FAD030460AF094F80028FAD070\n:10BBF000B8F1000F04D19B48016821F010010160E9\n:10BC0000C4F808A3C4F8045199F805004E4688B159\n:10BC1000387878B90AF061F880460AF0F5F90146FB\n:10BC20006FF00042B8F1000F02D0C6E9032101E035\n:10BC3000C6E90312DBF80000C00701D00AF049F89A\n:10BC4000387810B13572BDE8F09F4FF01808C4F88D\n:10BC50000883C4F82C510127C4F81870D4F82C01BB\n:10BC60000028FBD0C4F80C51C4F810517948C01D0D\n:10BC70000AF062F83570FFF748FF6761784930795C\n:10BC800020310860C4F80483DDE770B5050000D1F9\n:10BC9000FFDF4FF080424FF0FF30C2F80803002171\n:10BCA000C2F80011C2F80411C2F80C11C2F8101148\n:10BCB000684C61700AF01DF810B10120A07060702E\n:10BCC00066480068C00701D00AF003F82846BDE8BE\n:10BCD000704030E75F48007A002800D001207047AC\n:10BCE0002DE9FF5F6048D0F800805F4A5F49083265\n:10BCF00011608406D4F8080100B10120D4F82411A1\n:10BD000001B101218A46D4F81C1101B101218946F3\n:10BD1000D4F8201109B1012700E00027D4F8001160\n:10BD200001B101218B46D4F8041101B10121039125\n:10BD3000D4F80C1101B101210291D4F8101101B114\n:10BD40000121444D019129780026009120B1C4F8C9\n:10BD50000861012009F08FFFBAF1000F04D0C4F888\n:10BD60002461092009F087FFB9F1000F04D0C4F85D\n:10BD70001C610A2009F07FFF27B1C4F820610B2065\n:10BD800009F079FF3348C01D09F0DEFF00B1FFDF85\n:10BD9000DFF8C4900127BBF1000F10D0C4F808737E\n:10BDA000E87818B1EE70002009F065FF287A0228C3\n:10BDB00005D1032028720221C9F8001027610398D9\n:10BDC00008B1C4F80461029850B1C4F80C61287A33\n:10BDD000032800D0FFDFC9F800602F72FFF769FE6B\n:10BDE000019838B1C4F81061287A012801D100F017\n:10BDF0005DF86761009838B12E70287A012801D16A\n:10BE0000FFF783FEFFF755FE1248C01D09F0B2FF91\n:10BE10001549091DC1F80080BDE8FF9F0D4810B508\n:10BE2000C01D09F091FF0B4940B1012008704FF08F\n:10BE3000E021C1F80002BDE8104011E6087A0128AF\n:10BE400001D1FFF762FE0348BDE81040C01D09F0B4\n:10BE500091BF00003C000020340C00400C04004066\n:10BE60001805004010ED00E010050240010000013F\n:10BE700070B5224CA07808B909F022FF012085078F\n:10BE8000A861207A002603280AD100BFD5F80C014A\n:10BE900020B9002009F03EFF0028F7D1C5F80C6159\n:10BEA00026724FF0FF30C5F8080370BD70B5134C13\n:10BEB0006079F0B1012803D0A179401E814218DADF\n:10BEC00009F00BFF05460AF09FF86179012902D9B4\n:10BED000A179491CA1710DB1216900E0E168411A05\n:10BEE000022902DA11F1020F06DC0DB1206100E037\n:10BEF000E060BDE8704008E670BD00003C00002036\n:10BF000010B5202000F07FF8202000F08DF84D497A\n:10BF1000202081F80004F5F771FA4B4908604B487E\n:10BF2000D0F8041341F00101C0F80413D0F8041351\n:10BF300041F08071C0F80413424901201C39C1F856\n:10BF4000000110BD10B5202000F05DF83E48002132\n:10BF5000C8380160001D01603D4A481E10603B4A20\n:10BF6000C2F80803384B1960C2F80001C2F860013A\n:10BF700038490860BDE81040202000F055B8344929\n:10BF80003548091F086070473149334808607047D9\n:10BF90002D48C8380160001D521E026070472C49B0\n:10BFA00001200860BFF34F8F70472DE9F041284909\n:10BFB000D0F8188028480860244CD4F800010025E7\n:10BFC000244E6F1E28B14046F5F776F940B900219E\n:10BFD00011E0D4F8600198B14046F5F76DF948B129\n:10BFE000C4F80051C4F860513760BDE8F04120202A\n:10BFF00000F01AB831684046BDE8F04119F08ABB3C\n:10C00000FFDFBDE8F08100280DDB00F01F020121F9\n:10C0100091404009800000F1E020C0F88011BFF39A\n:10C020004F8FBFF36F8F7047002809DB00F01F02AE\n:10C03000012191404009800000F1E020C0F8801209\n:10C040007047000020E000E0C80602400000024007\n:10C050001805024000040240010000010F4A126866\n:10C060000D498A420CD118470C4A12680A4B9A4271\n:10C0700006D101B509F09AFFFFF781FFBDE8014045\n:10C08000074909680958084706480749054A064B01\n:10C090007047000000000000BEBAFECA5400002035\n:10C0A000040000208013002080130020F8B51D46F6\n:10C0B000DDE906470E000AD006F0E0FD2346FF1D2D\n:10C0C000BCB231462A46009406F0EDF9F8BDD0190D\n:10C0D0002246194619F052FA2046F8BD70B50D46B1\n:10C0E0000446102119F0C9FA258117206081A07B30\n:10C0F00040F00A00A07370BD4FF6FF720A8001463F\n:10C1000002200AF099B9704700897047827BD307F3\n:10C1100001D1920703D48089088000207047052050\n:10C120007047827B920700D58181704701460020CD\n:10C13000098841F6FE52114200D00120704700B537\n:10C140000346807BC00701D0052000BD59811846F9\n:10C15000FFF7ECFFC00703D0987B40F00400987312\n:10C16000987B40F001009873002000BD827B52074D\n:10C1700000D509B14089704717207047827B61F371\n:10C18000C302827370472DE9FC5F0E4604460178B6\n:10C190009646012000FA01F14DF6FF5201EA02092C\n:10C1A00062684FF6FF7B1188594502D10920BDE82E\n:10C1B000FC9FB9F1000F05D041F6FE55294201D090\n:10C1C0000120F4E741EA090111801D0014D0002389\n:10C1D0002B7094F800C0052103221F464FF0020A7D\n:10C1E000BCF10E0F76D2DFE80CF0F909252F476479\n:10C1F0006B77479193B4D1D80420D8E76168208940\n:10C200008B7B9B0767D517284AD30B89834247D37B\n:10C210008989172901D3814242D185F800A0A5F868\n:10C2200001003280616888816068817B21F00201B1\n:10C230008173C6E0042028702089A5F80100608978\n:10C24000A5F803003180BCE0208A3188C01D1FFAA8\n:10C2500080F8414524D3062028702089A5F80100E4\n:10C260006089A5F80300A089A5F805000721208AA8\n:10C27000CDE90001636941E00CF0FF00082810D00F\n:10C28000082028702089A5F801006089A5F803001E\n:10C2900031806A1D694604F10C0008F057F910B1AD\n:10C2A0005EE01020EDE730889DF8001008443080F3\n:10C2B00087E00A2028702089A5F80100328044E038\n:10C2C0000C2028702089A5F801006089A5F80300DA\n:10C2D00031803AE082E064E02189338800EB41025A\n:10C2E0001FFA82F843453BD3B8F1050F38D30E222D\n:10C2F0002A700BEA4101CDE90010E36860882A4604\n:10C300007146FFF7D3FEA6F800805AE0402028705F\n:10C3100060893188C01C1FFA80F8414520D32878F5\n:10C32000714620F03F00123028702089A5F80100E6\n:10C330006089CDE9000260882A46E368FFF7B6FE0F\n:10C34000A6F80080287840063BD461682089888060\n:10C3500037E0A0893288401D1FFA80F8424501D29B\n:10C3600004273DE0162028702089A5F80100608987\n:10C37000A5F80300A089CDE9000160882A4671462E\n:10C380002369FFF793FEA6F80080DEE718202870E7\n:10C39000207A6870A6F800A013E061680A88920409\n:10C3A00001D405271CE0C9882289914201D00627C3\n:10C3B00016E01E21297030806068018821F4005148\n:10C3C0000180B9F1000F0BD0618878230022022090\n:10C3D00009F088FF61682078887006E033800327C1\n:10C3E0006068018821EA090101803846DFE62DE90D\n:10C3F000FF4F85B01746129C0D001E461CD03078AA\n:10C40000C10703D000F03F00192801D9012100E045\n:10C4100000212046FFF7AAFEA8420DD32088A0F5F0\n:10C420007F41FF3908D03078410601D4000605D598\n:10C43000082009B0BDE8F08F0720FAE700208DF84A\n:10C4400000008DF8010030786B1E00F03F0C0121D8\n:10C45000A81E4FF0050A4FF002094FF0030B9AB2E5\n:10C46000BCF1200F75D2DFE80CF08B10745E74689D\n:10C47000748C749C74B674BB74C974D574E274748F\n:10C4800074F274F074EF74EE748B052D78D18DF81E\n:10C490000090A0788DF804007088ADF8060030791F\n:10C4A0008DF80100707800F03F000C2829D00ADCDC\n:10C4B000A0F10200092863D2DFE800F012621562E1\n:10C4C0001A621D622000122824D004DC0E281BD022\n:10C4D0001028DBD11BE016281FD01828D6D11FE06A\n:10C4E0002078800701E020784007002848DAEFE054\n:10C4F00020780007F9E72078C006F6E72078800664\n:10C50000F3E720784006F0E720780006EDE7208882\n:10C51000C005EAE720884005E7E720880005E4E752\n:10C520002088C004E1E72078800729D5032D27D192\n:10C530008DF800B0B6F8010082E0217849071FD5D8\n:10C54000062D1DD381B27078012803D0022817D19F\n:10C5500002E0CAE0022000E0102004228DF8002052\n:10C5600072788DF80420801CB1FBF0F2ADF8062043\n:10C5700092B242438A4203D10397ADF80890A7E0F4\n:10C580007AE02078000777D598B282088DF800A06D\n:10C59000ADF80420B0EB820F6ED10297ADF8061013\n:10C5A00096E02178C90667D5022D65D381B20620B1\n:10C5B0008DF80000707802285ED300BFB1FBF0F266\n:10C5C0008DF80400ADF8062092B242438A4253D15E\n:10C5D000ADF808907BE0207880064DD5072003E079\n:10C5E000207840067FD508208DF80000A088ADF89F\n:10C5F0000400ADF80620ADF8081068E020780006C9\n:10C6000071D50920ADF804208DF80000ADF80610B2\n:10C6100002975DE02188C90565D5022D63D381B2FB\n:10C620000A208DF80000707804285CD3C6E72088C3\n:10C63000400558D5012D56D10B208DF80000A0885B\n:10C64000ADF8040044E021E026E016E0FFE7208892\n:10C65000000548D5052D46D30C208DF80000A08894\n:10C66000ADF80400B6F803006D1FADF80850ADF842\n:10C670000600ADF80AA02AE035E02088C00432D5D3\n:10C68000012D30D10D208DF8000021E0208880049C\n:10C6900029D4B6F80100E080A07B000723D5032D44\n:10C6A00021D3307800F03F001B2818D00F208DF8E0\n:10C6B0000000208840F40050A4F80000B6F8010003\n:10C6C000ADF80400ED1EADF80650ADF808B00397C4\n:10C6D00069460598F5F71EFC050008D016E00E2007\n:10C6E0008DF80000EAE7072510E008250EE0307815\n:10C6F00000F03F001B2809D01D2807D00220059913\n:10C7000009F09AFE208800F400502080A07B4007AA\n:10C7100008D52046FFF70AFDC00703D1A07B20F013\n:10C720000400A073284684E61FB5022806D1012024\n:10C730008DF8000088B26946F5F7ECFB1FBD0000DC\n:10C74000F8B51D46DDE906470E000AD006F096FA58\n:10C750002346FF1DBCB231462A46009405F0A3FED5\n:10C76000F8BDD0192246194618F008FF2046F8BD3A\n:10C770002DE9FF4F8DB09B46DDE91B57DDF87CA00E\n:10C780000C46082B05D0E06901F002F950B11020E9\n:10C79000D2E02888092140F0100028808AF8001093\n:10C7A000022617E0E16901208871E2694FF4205107\n:10C7B0009180E1698872E06942F601010181E069D6\n:10C7C000002181732888112140F0200028808AF8F8\n:10C7D0000010042638780A900A2038704FF00209B9\n:10C7E00004F118004D460C9001F095FBB04681E035\n:10C7F000BBF1100F0ED1022D0CD0A9EB0800801C4C\n:10C8000080B20221CDE9001005AB52461E990D9869\n:10C81000FFF796FFBDF816101A98814203D9F74822\n:10C8200000790F9004E003D10A9808B138702FE026\n:10C830004FF00201CDE900190DF1160352461E9981\n:10C840000D98FFF77DFF1D980088401B801B83B269\n:10C85000C6F1FF00984200D203461E990BA8D9B139\n:10C860005FF00002DDF878C0CDE9032009EB060196\n:10C8700089B2CDE901C10F980090BDF816100022D1\n:10C880000D9801F0CBFB387070B1C0B2832807D08F\n:10C89000BDF8160020833AE00AEB09018A19E1E7A6\n:10C8A000022011B0BDE8F08FBDF82C00811901F015\n:10C8B000FF08022D0DD09AF80120424506D1BDF89F\n:10C8C0002010814207D0B8F1FF0F04D09AF8018000\n:10C8D0001FE08AF80180C94800680178052902D163\n:10C8E000BDF81610818009EB08001FFA80F905EBEE\n:10C8F000080085B2DDE90C1005AB0F9A01F00EFBC4\n:10C9000028B91D980088411B4145BFF671AF022D23\n:10C9100013D0BBF1100F0CD1A9EB0800801C81B221\n:10C920000220CDE9000105AB52461E990D98FFF794\n:10C9300007FF1D980580002038700020B1E72DE921\n:10C94000F8439C46089E13460027B26B9AB3491FD2\n:10C950008CB2F18FA1F57F45FF3D05D05518AD880C\n:10C960002944891D8DB200E000252919B6F83C80C4\n:10C970000831414520D82A44BCF8011022F8021B96\n:10C98000BCF8031022F8021B984622F8024B91468D\n:10C9900006F062F94FF00C0C41464A462346CDF8AA\n:10C9A00000C005F04CFDF587B16B00202944A41DA3\n:10C9B0002144088003E001E0092700E0832738468E\n:10C9C000BDE8F88310B50B88848F9C420CD9846B2A\n:10C9D000E018048844B1848824F40044A41D23444E\n:10C9E0000B801060002010BD0A2010BD2DE9F0471B\n:10C9F0008AB00025904689468246ADF81850072730\n:10CA00004BE0059806888088000446D4A8F80060AA\n:10CA100007A8019500970295CDE903504FF40073E4\n:10CA200000223146504601F0F9FA04003CD1BDF82D\n:10CA30001800ADF82000059804888188B44216D10A\n:10CA40000A0414D401950295039521F4004100973E\n:10CA5000049541F4804342882146504601F0B4F8E1\n:10CA600004000BD10598818841F40041818005AA1A\n:10CA700008A94846FFF7A6FF0400DCD000970598F8\n:10CA800002950195039504950188BDF81C3000229C\n:10CA9000504601F099F80A2C06D105AA06A9484685\n:10CAA000FFF790FF0400ACD0ADF8185004E00598F3\n:10CAB000818821F40041818005AA06A94846FFF734\n:10CAC00081FF0028F3D00A2C03D020460AB0BDE82D\n:10CAD000F0870020FAE710B50C46896B86B051B19B\n:10CAE0000C218DF80010A18FADF80810A16B0191F9\n:10CAF0006946FAF718FB00204FF6FF71A063E18743\n:10CB0000A08706B010BD2DE9F0410D460746896BA0\n:10CB10000020069E1446002911D0012B0FD1324669\n:10CB200029463846FFF762FF002808D1002C06D0BE\n:10CB3000324629463846BDE8F04100F038BFBDE82E\n:10CB4000F0812DE9FC411446DDE9087C0E46DDE963\n:10CB50000A15521DBCF800E092B2964502D2072099\n:10CB6000BDE8FC81ACF8002017222A70A5F801600E\n:10CB7000A5F803300522CDE900423B462A46FFF7DF\n:10CB8000DFFD0020ECE770B50C4615464821204635\n:10CB900018F095FD04F1080044F81C0F00204FF632\n:10CBA000FF71E06161842084A5841720E08494F8FB\n:10CBB0002A0040F00A0084F82A0070BD4FF6FF7288\n:10CBC0000A800146032009F037BC30B585B00C4619\n:10CBD0000546FFF780FFA18E284629B101218DF877\n:10CBE00000106946FAF79FFA0020E0622063606354\n:10CBF00005B030BDB0F8400070470000580000207C\n:10CC000090F84620920703D4408808800020F3E77C\n:10CC10000620F1E790F846209207EDD5A0F84410E1\n:10CC2000EAE70146002009880A0700D5012011F033\n:10CC3000F00F01D040F00200CA0501D540F0040019\n:10CC40008A0501D540F008004A0501D540F01000E2\n:10CC50000905D1D540F02000CEE700B5034690F895\n:10CC60004600C00701D0062000BDA3F842101846B8\n:10CC7000FFF7D7FF10F03E0F05D093F8460040F0C5\n:10CC8000040083F8460013F8460F40F001001870C6\n:10CC9000002000BD90F84620520700D511B1B0F831\n:10CCA0004200A9E71720A7E710F8462F61F3C30257\n:10CCB0000270A1E72DE9FF4F9BB00E00DDE92B3498\n:10CCC000DDE92978289D24D02878C10703D000F019\n:10CCD0003F00192801D9012100E000212046FFF77B\n:10CCE000D9FFB04215D32878410600F03F010CD49B\n:10CCF0001E290CD0218811F47F6F0AD13A8842B1E5\n:10CD0000A1F57F42FF3A04D001E0122901D10006CB\n:10CD100002D504201FB0C5E5F9491D984FF0000A5F\n:10CD200008718DF818A08DF83CA00FAA0A60ADF824\n:10CD30001CA0ADF850A02978994601F03F02701F61\n:10CD40005B1C04F1180C4FF0060E4FF0040BCDF8ED\n:10CD500058C01F2A7ED2DFE802F07D7D107D267D3F\n:10CD6000AC7DF47DF37DF27DF17DF47DF07D7D7D04\n:10CD7000EF7DEE7D7D7D7D7DED0094F84610B5F86C\n:10CD80000100890701D5032E02D08DF818B022E3E7\n:10CD90004FF40061ADF85010608003218DF83C1015\n:10CDA000ADF84000D8E2052EEFD1B5F801002083A0\n:10CDB000ADF81C00B5F80310618308B1884201D9B1\n:10CDC00001207FE10020A07220814FF6FF702084B7\n:10CDD000169801F0A0F8052089F8000002200290C2\n:10CDE00083460AAB1D9A16991B9801F097F890BBE1\n:10CDF0009DF82E00012804D0022089F8010010209F\n:10CE000003E0012089F8010002200590002203A917\n:10CE10000BA807F09BFBE8BB9DF80C00059981422D\n:10CE20003DD13A88801CA2EB0B01814237DB02998D\n:10CE30000220CDE900010DF12A034A4641461B9824\n:10CE4000FFF77EFC02980BF1020B801C80B217AA40\n:10CE500003A901E0A0E228E002900BA807F076FB0E\n:10CE600002999DF80C00CDE9000117AB4A464146F6\n:10CE70001B98FFF765FC9DF80C100AAB0BEB01004B\n:10CE80001FFA80FB02981D9A084480B202901699FE\n:10CE90001B9800E003E001F041F80028B6D0BBF198\n:10CEA000020F02D0A7F800B053E20A208DF8180054\n:10CEB0004FE200210391072EFFF467AFB5F80100A0\n:10CEC0002083ADF81C00B5F80320628300283FF4EE\n:10CED00077AF90423FF674AF0120A072B5F805001D\n:10CEE00020810020A073E06900F052FD78B9E1696B\n:10CEF00001208871E2694FF420519180E1698872C4\n:10CF0000E06942F601010181E06900218173F01FAF\n:10CF100020841E98606207206084169800F0FBFF52\n:10CF2000072089F800000120049002900020ADF84D\n:10CF30002A0028E01DE2A3E13AE1EAE016E2AEE0D1\n:10CF400086E049E00298012814D0E0698079012840\n:10CF500003D1BDF82800ADF80E00049803ABCDE96D\n:10CF600000B04A4641461B98FFF7EAFB0498001DB3\n:10CF700080B20490BDF82A00ADF80C00ADF80E00A8\n:10CF8000059880B202900AAB1D9A16991B9800F082\n:10CF9000C5FF28B902983988001D05908142D1D279\n:10CFA0000298012881D0E0698079012805D0BDF878\n:10CFB0002810A1F57F40FF3803D1BDF82800ADF857\n:10CFC0000E00049803ABCDE900B04A4641461B98D9\n:10CFD000FFF7B6FB0298BBE1072E02D0152E7FF4B7\n:10CFE000D4AEB5F801102183ADF81C10B5F80320BC\n:10CFF000628300293FF4E4AE91423FF6E1AE0121A5\n:10D00000A1724FF0000BA4F808B084F80EB0052E02\n:10D0100007D0C0B2691DE26907F079FA00287FF4F1\n:10D0200044AF4FF6FF70208401A906AA14A8CDF8DA\n:10D0300000B081E885032878214600F03F031D9A5F\n:10D040001B98FFF795FB8246208BADF81C0080E112\n:10D050000120032EC3D14021ADF85010B5F80110C6\n:10D060002183ADF81C100AAAB8F1000F00D00023EC\n:10D07000CDE9020304921D98CDF804800090388811\n:10D080000022401E83B21B9800F0C8FF8DF81800E4\n:10D0900090BB0B2089F80000BDF8280037E04FF066\n:10D0A000010C052E9BD18020ADF85000B5F8011081\n:10D0B0002183B5F803002084ADF81C10B0F5007F83\n:10D0C00003D907208DF8180085E140F47C422284C2\n:10D0D0000CA8B8F1000F00D00023CDE90330CDE952\n:10D0E000018C1D9800903888401E83B21B9800F078\n:10D0F00095FF8DF8180028B18328A8D10220BDE043\n:10D10000580000200D2189F80010BDF83000401CA7\n:10D110001EE1032E04D248067FF537AE002017E14A\n:10D12000B5F80110ADF81C102878400602D58DF82E\n:10D130003CE002E007208DF83C004FF0000803209F\n:10D14000CDE902081E9BCDF810801D980193A6F131\n:10D15000030B00901FFA8BF342461B9800F034FD3E\n:10D160008DF818008DF83C80297849060DD5208867\n:10D17000C00506D5208BBDF81C10884201D1C4F82B\n:10D18000248040468DF81880E2E0832801D14FF0DA\n:10D19000020A4FF48070ADF85000BDF81C002083E7\n:10D1A000A4F820B01E986062032060841321CCE0B4\n:10D1B000052EFFF4EAADB5F80110ADF81C10A28FF2\n:10D1C00062B3A2F57F43FE3B28D008228DF83C20B5\n:10D1D0004FF0000B0523CDE9023BDDF878C0CDF818\n:10D1E00010B01D9A80B2CDF804C040F40043009204\n:10D1F000B5F803201B9800F0E7FC8DF83CB04FF425\n:10D2000000718DF81800ADF85010832810D0F8B1D7\n:10D21000A18FA1F57F40FE3807D0DCE00B228DF80E\n:10D220003C204FF6FE72A287D2E7A4F83CB0D2E0D1\n:10D2300000942B4631461E9A1B98FFF780FB8DF811\n:10D24000180008B183284BD1BDF81C00208355E796\n:10D2500000942B4631461E9A1B98FFF770FB8DF801\n:10D260001800E8BBE18FA06B0844811D8DE88203A4\n:10D270004388828801881B98FFF763FC824668E038\n:10D2800095F80180022E70D15FEA080002D0B8F153\n:10D29000010F6AD109208DF83C0007A800908DF895\n:10D2A00040804346002221461B98FFF72CFC8DF856\n:10D2B00042004FF0000B8DF843B050B9B8F1010FA8\n:10D2C00012D0B8F1000F04D1A18FA1F57F40FF3833\n:10D2D0000AD0A08F40B18DF83CB04FF4806000E0E0\n:10D2E00037E0ADF850000DE00FA91B98F9F71BFFD0\n:10D2F00082468DF83CB04FF48060ADF85000BAF132\n:10D30000020F06D0FC480068C07928B18DF81800DB\n:10D3100027E0A4F8188044E0BAF1000F03D0812080\n:10D320008DF818003DE007A80090434601222146F1\n:10D330001B98FFF7E8FB8DF8180021461B98FFF7B4\n:10D34000CAFB9DF8180020B9192189F800100120A6\n:10D3500038809DF83C0020B10FA91B98F9F7E3FE37\n:10D360008246BAF1000F33D01BE018E08DF818E0C8\n:10D3700031E02078000712D5012E10D10A208DF857\n:10D380003C00E088ADF8400003201B9909F054F8F8\n:10D390000820ADF85000C1E648067FF5F6AC4FF026\n:10D3A000040A2088BDF8501008432080BDF85000C2\n:10D3B00080050BD5A18FA1F57F40FE3806D11E98C0\n:10D3C000E06228982063A6864FF0030A5046A1E445\n:10D3D0009DF8180078B1012089F80000297889F8B3\n:10D3E0000110BDF81C10A9F802109DF8181089F85A\n:10D3F0000410052038802088BDF850108843208014\n:10D40000E4E72DE9FF4F8846087895B00121814077\n:10D410004FF20900249C0140ADF820102088DDF86F\n:10D420008890A0F57F424FF0000AFF3A06D039B14C\n:10D43000000705D5012019B0BDE8F08F0820FAE7F4\n:10D44000239E4FF0000B0EA886F800B018995D4699\n:10D450000988ADF83410A8498DF81CB0179A0A71E4\n:10D460008DF838B0086098F8000001283BD00228F9\n:10D4700009D003286FD1307820F03F001D30307084\n:10D48000B8F80400E08098F800100320022904D1C5\n:10D49000317821F03F011B31317094F846100907B3\n:10D4A00059D505ABB9F1000F13D0002102AA82E8CB\n:10D4B0000B000720CDE90009BDF83400B8F80410CE\n:10D4C000C01E83B20022159800F0A8FD0028D1D11B\n:10D4D00001E0F11CEAE7B8F80400A6F80100BDF885\n:10D4E0001400C01C04E198F805108DF81C1098F881\n:10D4F0000400012806D04FF4007A02282CD003281B\n:10D50000B8D16CE12188B8F8080011F40061ADF8D9\n:10D51000201020D017281CD3B4F84010814218D313\n:10D52000B4F84410172901D3814212D1317821F087\n:10D530003F01C91C3170A6F801000321ADF8341079\n:10D54000A4F8440094F8460020F0020084F8460055\n:10D5500065E105257EE177E1208808F1080700F400\n:10D56000FE60ADF8200010F0F00F1BD010F0C00FDF\n:10D5700003D03888228B9042EBD199B9B878C00794\n:10D5800010D0B9680720CDE902B1CDF804B0009001\n:10D59000CDF810B0FB88BA883988159800F014FBD4\n:10D5A0000028D6D12398BDF82010401C80294ED0E9\n:10D5B00006DC10290DD020290BD0402987D124E08A\n:10D5C000B1F5807F6ED051457ED0B1F5806F97D197\n:10D5D000DEE0C80601D5082000E0102082460DA933\n:10D5E00007AA0520CDE902218DF83800ADF83CB03E\n:10D5F000CDE9049608A93888CDE9000153460722F1\n:10D6000021461598FFF7B4F8A8E09DF81C200121E9\n:10D610004FF00A0A002A9BD105ABB9F1000F00D0E8\n:10D620000020CDE902100720CDE90009BDF8340043\n:10D630000493401E83B2218B0022159800F0EEFC6B\n:10D640008DF81C000B203070BDF8140020E09DF810\n:10D650001C2001214FF00C0A002A22D113ABB9F192\n:10D66000000F00D00020CDE902100720CDE900090D\n:10D670000493BDF83400228C401E83B2218B159890\n:10D6800000F0CCFC8DF81C000D203070BDF84C0073\n:10D69000401CADF8340005208DF83800208BADF823\n:10D6A0003C00BCE03888218B88427FF452AF9DF863\n:10D6B0001C004FF0120A00281CD1606AA8B1B8788B\n:10D6C000C0073FF446AF00E018E0BA680720CDE994\n:10D6D00002B2CDF804B00090CDF810B0FB88BA8843\n:10D6E000159800F071FA8DF81C001320307001209D\n:10D6F000ADF8340093E00000580000203988208BFA\n:10D700008142D2D19DF81C004FF0160A0028A06B70\n:10D7100008D0E0B34FF6FF7000215F46ADF808B0C7\n:10D72000019027E068B1B978C907BED1E18F0DAB90\n:10D730000844821D03968DE80C0243888288018884\n:10D7400009E0B878C007BCD0BA680DAB03968DE885\n:10D750000C02BB88FA881598FFF7F3F905005ED034\n:10D76000072D72D076E0019005AA02A92046FFF7A6\n:10D7700029F90146E28FBDF80800824201D0002954\n:10D78000F1D0E08FA16B084407800198E08746E064\n:10D790009DF81C004FF0180A40B1208BC8B13888A2\n:10D7A000208321461598FFF796F938E004F1180018\n:10D7B0000090237E012221461598FFF7A4F98DF8E9\n:10D7C0001C000028EDD1192030700120ADF8340084\n:10D7D000E7E7052521461598FFF77DF93AE020880F\n:10D7E00000F40070ADF8200050452DD1A08FA0F5B9\n:10D7F0007F41FE3901D006252CE0D8F808004FF013\n:10D80000160A48B1A063B8F80C10A1874FF6FF7153\n:10D81000E187A0F800B002E04FF6FF70A087BDF8E6\n:10D82000200030F47F611AD078230022032015995C\n:10D8300008F058FD98F8000020712088BDF82010ED\n:10D84000084320800EE000E007252088BDF8201066\n:10D8500088432080208810F47F6F1CD03AE0218814\n:10D86000814321809DF8380020B10EA91598F9F761\n:10D870005AFC05469DF81C000028EBD086F801A054\n:10D8800001203070208B70809DF81C0030710520C5\n:10D89000ADF83400DEE7A18EE1B118980DAB008839\n:10D8A000ADF834002398CDE90304CDE90139206BAC\n:10D8B0000090E36A179A1598FFF7FCF905460120D6\n:10D8C0008DF838000EA91598F9F72DFC00B1054622\n:10D8D000A4F834B094F8460040070AD52046FFF774\n:10D8E000A0F910F03E0F04D114F8460F20F0040008\n:10D8F00020701898BDF83410018028469BE500B5CB\n:10D9000085B0032806D102208DF8000088B2694650\n:10D91000F9F709FC05B000BD10B5384C0B7822684A\n:10D92000012B02D0022B2AD111E013780BB1052B69\n:10D9300001D10423137023688A889A802268CB88D7\n:10D94000D38022680B891381498951810DE08B882E\n:10D9500093802268CB88D38022680B8913814B89FE\n:10D9600053818B899381096911612168F9F7DBFB88\n:10D97000226800210228117003D0002800D08120E5\n:10D9800010BD832010BD806B002800D0012070479F\n:10D990008178012909D10088B0F5205F03D042F6D3\n:10D9A0000101884201D10020704707207047F0B57F\n:10D9B00087B0002415460E460746ADF8184011E022\n:10D9C00005980088288005980194811DCDE90241C1\n:10D9D000072104940091838842880188384600F02A\n:10D9E000F3F830B905AA06A93046FEF7EBFF002888\n:10D9F000E6D00A2800D1002007B0F0BD5800002072\n:10DA000010B58B7883B102789A4205D10B885BB14F\n:10DA100002E08B79091D4BB18B789A42F9D1B0F8AD\n:10DA200001300C88A342F4D1002010BD812010BD2C\n:10DA3000072826D012B1012A27D103E0497801F046\n:10DA4000070102E04978C1F3C20105291DD2DFE8D0\n:10DA500001F00318080C12000AB1032070470220DD\n:10DA6000704704280DD250B10DE0052809D2801E60\n:10DA7000022808D303E0062803D0032803D005209A\n:10DA80007047002070470F20704781207047C0B258\n:10DA900082060BD4000607D5FE48807A4143C01D9C\n:10DAA00001EBD00080B270470846704700207047F5\n:10DAB00070B513880B800B781C0625D5F54CA47A1D\n:10DAC000844204D843F010000870002070BD9568AF\n:10DAD00000F0070605EBD0052D78F54065F304133B\n:10DAE0000B701378D17803F0030341EA032140F26D\n:10DAF0000123B1FBF3F503FB15119268E41D00FB54\n:10DB0000012000EBD40070BD906870BD37B514469D\n:10DB1000BDF8041011809DF804100A061ED5C1F34B\n:10DB20000013DC49A568897A814208D8FE2811D102\n:10DB3000C91DC9085A42284617F097FD0AE005EBAF\n:10DB4000D00100F00702012508789540A8439340D2\n:10DB500018430870207820F0100020703EBD2DE999\n:10DB6000F0410746C81C0E4620F00300B04202D028\n:10DB70008620BDE8F081C74D002034462E60AF807E\n:10DB80002881AA72E8801AE0E988491CE9808106A8\n:10DB900014D4E17800F0030041EA002040F20121B2\n:10DBA000B0FBF1F201FB12012068FFF770FF298939\n:10DBB000084480B22881381A3044A0600C342078A0\n:10DBC0004107E1D40020D4E72DE9FF4F89B0164684\n:10DBD000DDE9168A0F46994623F44045084600F0D1\n:10DBE0000DFB04000FD0099804F0CAFE02902078C3\n:10DBF00000060AD5A748817A0298814205D8872075\n:10DC00000DB0BDE8F08F0120FAE7224601A9029885\n:10DC1000FFF74EFF834600208DF80C004046B8F118\n:10DC2000070F1AD001222146FFF702FF0028E7D193\n:10DC30002078400611D502208DF80C00ADF8107048\n:10DC4000BDF80400ADF81200ADF814601898ADF8F6\n:10DC50001650CDF81CA0ADF818005FEA094004D5B5\n:10DC600000252E46A84601270CE02178E07801F037\n:10DC7000030140EA012040F20121B0FBF1F28046AD\n:10DC800001FB12875FEA494009D5B84507D1A17861\n:10DC9000207901F0030140EA0120B04201D3BE42E5\n:10DCA00001D90720ACE7A8191FFA80F9B94501D9B5\n:10DCB0000D20A5E79DF80C0028B103A90998F9F7F4\n:10DCC00030FA00289CD1B84507D1A0784FEA192135\n:10DCD00061F30100A07084F804901A9800B10580E7\n:10DCE000199850EA0A0027D0199830B10BEB0600BA\n:10DCF0002A46199917F042FC0EE00BEB060857462E\n:10DD0000189E099804F0A8FF2B46F61DB5B23946B7\n:10DD10004246009504F093FB224601A90298FFF7C2\n:10DD2000C7FE9DF80400224620F010008DF8040084\n:10DD3000DDE90110FFF7EAFE002061E72DE9FF4F62\n:10DD4000DFF8509182461746B9F80610D9F800005E\n:10DD500001EB410100EB810440F20120B2FBF0F144\n:10DD600085B000FB11764D46DDF84C8031460698B3\n:10DD7000FFF78DFE29682A898B46611A0C31014410\n:10DD80001144AB8889B28B4202D8842009B038E7AD\n:10DD90000699CDB2290603D5A90601D50620F5E7D7\n:10DDA000B9F806C00CF1010C1FFA8CFCA9F806C0EA\n:10DDB000149909B1A1F800C0A90602D5C4F80880D9\n:10DDC00007E0104480B2A9F80800191A01EB0B0013\n:10DDD000A0602246FE200699FFF798FEE7702671A4\n:10DDE0002078390A61F30100320AA17840F004007A\n:10DDF00062F30101A17020709AF802006071BAF814\n:10DE00000000E08000262673280602D599F80A70E3\n:10DE100000E00127A80601D54FF000084D46002478\n:10DE20004FF007090FE0CDE902680196CDF80090A8\n:10DE30000496E9882046129B089AFFF7C5FE002841\n:10DE4000A4D1641CE4B2BC42EDD300209EE72DE9CE\n:10DE5000F047804600F0D2F9070005D0002644467E\n:10DE60000C4D40F2012919E00120BDE8F087204661\n:10DE700000F0C4F90278C17802F0030241EA0222FC\n:10DE8000B2FBF9F309FB13210068FFF700FE3044F1\n:10DE900086B201E0F8050020641CA4B2E988601E87\n:10DEA0008142E4DCA8F10100E8802889801B2881F8\n:10DEB00000203870D9E710B5144631B1491E2180D1\n:10DEC00004F05EFDA070002010BD012010BD10B553\n:10DED000D24904460088CA88904201D30A2010BD66\n:10DEE000096800EB400001EB80025079A072D088F5\n:10DEF00020819178107901F0030140EA0120A0818E\n:10DF0000A078E11CFFF7D4FD20612088401C208010\n:10DF1000E080002010BD0121018270472DE9FF4FF4\n:10DF200085B04FF6FF788246A3F8008048681F4608\n:10DF30000D4680788DF8060048680088ADF804002A\n:10DF400000208DF80A00088A0C88A04200D30446FD\n:10DF50002C8241E0288A401C2882701D6968FFF7E6\n:10DF60004FFDB8BB3988414501D1601E38806888B3\n:10DF7000A04236D3B178307901F0030140EA01299B\n:10DF800001A9701DFFF73CFD20BB298941452CD01C\n:10DF9000002231460798FFF74BFDD8B9298949453A\n:10DFA00018D1E9680391B5F80AC0D6F808B0504610\n:10DFB000CDF800C004F050FEDDF800C05A460CF168\n:10DFC000070C1FFA8CFC4B460399CDF800C004F0F7\n:10DFD00000FA50B1641CA4B2204600F00FF906000C\n:10DFE000B8D1641E2C820A20D0E67C807079B8718A\n:10DFF000F088B8803178F07801F0030140EA012020\n:10E000007881A7F80C90504604F0BAFC324607F12C\n:10E010000801FFF74DFD38610020B7E62DE9FF4FFD\n:10E0200087B081461C469246DDF860B0DDF854802A\n:10E03000089800F0E3F805000CD0484604F0A0FC76\n:10E040002978090608D57549897A814204D887203C\n:10E050000BB0D6E50120FBE7CAF309062A4601A961\n:10E06000FFF726FD0746149807281CD000222946F2\n:10E07000FFF7DEFC0028EBD12878400613D50120FD\n:10E080008DF808000898ADF80C00BDF80400ADF854\n:10E090000E00ADF81060ADF8124002A94846F9F73D\n:10E0A00040F80028D4D12978E87801F0030140EA4B\n:10E0B0000121AA78287902F0030240EA022056459D\n:10E0C00007D0B1F5007F04D9611E814201DD0B202C\n:10E0D000BEE7864201D90720BAE7801B85B2A54278\n:10E0E00000D92546BBF1000F01D0ABF800501798BE\n:10E0F00018B1B9192A4617F041FAB8F1000F0DD03E\n:10E100003E4448464446169F04F0B8FD2146FF1D94\n:10E11000BCB232462B46009404F0C5F9002097E7C4\n:10E120002DE9F04107461D461646084600F066F800\n:10E1300004000BD0384604F023FC2178090607D5EB\n:10E140003649897A814203D8872012E5012010E5FB\n:10E1500022463146FFF7ACFC65B12178E07801F04A\n:10E16000030140EA0120B0F5007F01D8012000E062\n:10E17000002028700020FCE42DE9F04107461D46F0\n:10E180001646084600F03AF804000BD0384604F072\n:10E19000F7FB2178090607D52049897A814203D8FF\n:10E1A0008720E6E40120E4E422463146FFF7AEFC96\n:10E1B000FF2D14D02178E07801F0030240EA02201C\n:10E1C00040F20122B0FBF2F302FB130015B900F29A\n:10E1D000012080B2E070000A60F30101217000208C\n:10E1E000C7E410B50C4600F009F828B1C1882180B9\n:10E1F0004079A070002010BD012010BD0749CA88D9\n:10E20000824209D340B1096800EB40006FF00B0275\n:10E2100002EB80000844704700207047F80500209A\n:10E2200010B508F0EFFAF4F741FB08F051F9BDE83A\n:10E23000104008F019BA302834BF01200020704780\n:10E24000202834BF4FF0A0420C4A012300F01F00E9\n:10E2500003FA00F0002914BFC2F80C05C2F8080543\n:10E260007047202834BF4FF0A041044900F01F0040\n:10E27000012202FA00F0C1F81805704700030050AF\n:10E2800070B50346002002466FF02F050EE09C5C3F\n:10E29000A4F130060A2E02D34FF0FF3070BD00EB20\n:10E2A000800005EB4000521C2044D2B28A42EED3DB\n:10E2B00070BD30B50A230BE0B0FBF3F403FB14048C\n:10E2C000B0FBF3F08D183034521E05F8014CD2B279\n:10E2D000002AF1D130BD30B500234FF6FF7510E0B4\n:10E2E000040A44EA002084B2C85C6040C0F303140E\n:10E2F000604005EA00344440E0B25B1C84EA401010\n:10E300009BB29342ECD330BD2DE9F041FA4B00268D\n:10E31000012793F860501C7893F864C0B8B183F873\n:10E320008D40A3F88E1083F88C2083F88A70BCF19E\n:10E33000000F0CBF83F8906083F89050EF4880681E\n:10E34000008804F089FCBDE8F04104F01FB94FF6E5\n:10E35000FF7083F88D40A3F88E0083F88C2083F83B\n:10E360008A70BCF1000F14BF83F8905083F890605E\n:10E37000BDE8F08170B5E14E0446306890F8981021\n:10E380000025012919D090F89210012924D090F885\n:10E39000681001292AD090F88A1001291CBF00209A\n:10E3A00070BD657017212170D0F88C106160B0F8D5\n:10E3B0009010218180F88A5016E065701C21217030\n:10E3C000D0F899106160D0F89D10A16090F8A1106C\n:10E3D000217380F8985007E0657007212170D0F80C\n:10E3E0009410616080F89250012070BD6570142116\n:10E3F000217000F16A012022201D17F0BFF80121D1\n:10E400002172306880F86850BB48B0F86C20A0F8E2\n:10E410009420B268537B80F8963080F89210108870\n:10E4200004F01AFC04F0C1F8DEE7B448006890F884\n:10E430006810002914BFB0F86C004FF6FF707047E9\n:10E4400070B5AE4C06462068002808BFFFDF0025E7\n:10E45000206845706660002808BFFFDF20684178AB\n:10E4600000291CBFFFDF70BDA42117F028F9206828\n:10E47000FF2101707F2180F836101321418428216B\n:10E4800080F86510012180F8581080F85D5008F080\n:10E4900082FEBDE8704008F048B8984909680978DC\n:10E4A00081420CBF0120002070479448006890F81A\n:10E4B0002200C0F3400070479048006890F82200A6\n:10E4C00000F0010070478D48006890F82200C0F30A\n:10E4D000001070472DE9F04388480024016891F846\n:10E4E0002400B1F822C0C0F38002C0F340031A44F4\n:10E4F00000F001000244CCF3001060B3BCF1130F34\n:10E5000021D00BDCBCF1100F02BF7D4830F81200A7\n:10E51000BDE8F083BCF1120F15D008E0BCF1150F77\n:10E5200009D0BCF11D0F04BF7648BDE8F083FFDFC2\n:10E530002046BDE8F0837449002031F8121012FB28\n:10E540000010BDE8F0837149002031F8121012FB71\n:10E550000010BDE8F08391F85A3091F85B002E2648\n:10E560004FF47A774FF014084FF04009022B04BFA4\n:10E570004AF2D745B5FBF7F510D0012B04BF4AF29C\n:10E580002F75B5FBF7F510D04AF62315B5FBF7F557\n:10E59000082B08BF4E4613D0042B18D02646082B54\n:10E5A0000ED0042B13D0022B49D004F12806042BE3\n:10E5B0000FD0082B1CBF4FF01908082304D00AE025\n:10E5C0004FF0140806F5A8764FF0400303E006F577\n:10E5D000A8764FF0100318FB036313FB0253C2EB42\n:10E5E00002124B4D02EB820205EB82021A441CF030\n:10E5F000010F4FF4C8734FF4BF7504BFCCF340064E\n:10E60000002E77D0CCF3400602F5A572EEB10828B3\n:10E6100004BF1E4640270CD0042804BF2E461027F6\n:10E6200007D0022807BF04F11806042704F12806C2\n:10E63000082707EB870808EB87173E441BE004F127\n:10E6400018064FF019080423C5E7082804BF1E4622\n:10E6500040270CD0042804BF2E46102707D00228DC\n:10E6600007BF04F11806042704F12806082707EB62\n:10E67000871706EB8706324402F19C0691F8652065\n:10E6800010F00C0F08BF00223244082804BF1E46B9\n:10E6900040270CD0042804BF2E46102707D002289C\n:10E6A00007BF04F11806042704F128060827C7EB62\n:10E6B000C70707EB470706EB4706324498321CF0C2\n:10E6C000010F27D0082808BF40200CD0042804BF21\n:10E6D0002B46102007D0022807BF04F1180304209E\n:10E6E00004F12803082000EB400101EB001018445E\n:10E6F00002444AE04DE000000406002060000020D3\n:10E70000285B02008E891300305B0200205B020050\n:10E71000D4FEFFFF082804BF9C4640260CD00428E6\n:10E7200004BFAC46102607D0022807BF04F1180C1E\n:10E73000042604F1280C082606EB8616898F0CEBBC\n:10E74000860C6244EB2920D944F2552C0B3101FB95\n:10E750000CF1890D082807D0042802D0022805D022\n:10E7600008E02B46102008E0402006E004F11803E2\n:10E77000042002E004F12803082000EB801003EBE2\n:10E78000800000F5A57001FB002202F26510BDE8D3\n:10E79000F08302F5A572082804BF9C4640260CD0E1\n:10E7A000042804BFAC46102607D0022807BF04F196\n:10E7B000180C042604F1280C082606EB8616B1F87E\n:10E7C00044100CEB860C6244EB29DED944F2552C44\n:10E7D0000B3101FB0CF1890D0828C5D00428C0D0ED\n:10E7E0000228C7D1C2E7FE4840F271210068806A62\n:10E7F00048437047FA48006890F83500002818BF71\n:10E800000120704710B5F74C207B022818BF032861\n:10E8100008D1207D04F115010DF0A1FC08281CBFD2\n:10E82000012010BD207B002816BF022800200120F7\n:10E83000BDE8104009F0C0B9EA4908737047E849DB\n:10E84000096881F8300070472DE9F047E44C2168F1\n:10E85000087B002816BF022800200120487301F120\n:10E860000E0109F093F92168087B022816BF0328DE\n:10E870000122002281F82F204FF0080081F82D009E\n:10E88000487B01F10E034FF001064FF0000701280D\n:10E8900004BF5B7913F0C00F0AD001F10E03012809\n:10E8A00004D1587900F0C000402801D0002000E0D9\n:10E8B000012081F82E00002A04BF91F8220010F0F8\n:10E8C000040F07D0087D01F115010DF048FC216807\n:10E8D00081F82D002068476006F0CEF92168C14D0F\n:10E8E0004FF00009886095F82D000DF054FC80462B\n:10E8F00095F82F00002818BFB8F1000F04D095F844\n:10E900002D000DF00FFA68B195F8300000281CBFFB\n:10E9100095F82E0000281DD0697B05F10E00012915\n:10E920000ED012E06E734A4605F10E01404609F022\n:10E9300082F995F82D1005F10E000DF023FD09E088\n:10E94000407900F0C000402831D0394605F10E0072\n:10E9500009F0A8F92068C77690F8220010F0040F9B\n:10E9600008BFBDE8F087002795F82D000DF08EFA5E\n:10E97000050008BFBDE8F08710210EF04CFA002812\n:10E9800018BFBDE8F08720683A4600F11C01C67642\n:10E99000284609F050F9206800F11C0160680EF06B\n:10E9A00093FE6068BDE8F04701210EF0A8BE0DF0AF\n:10E9B00026FD4A4605F10E0109F03DF9CAE7884AED\n:10E9C0001268137B0370D2F80E000860508A8880AA\n:10E9D000704778B583490446814D407B08732A68A7\n:10E9E000207810706088ADF8000080B200F001015E\n:10E9F000C0F3400341EA4301C0F3800341EA8301CD\n:10EA0000C0F3C00341EAC301C0F3001341EA03119C\n:10EA1000C0F3401341EA4311C0F3801041EA801073\n:10EA20005084E07D012808BF012607D0022808BFD6\n:10EA3000022603D0032814BFFFDF0826286880F8C9\n:10EA40005A60607E012808BF012607D0022808BF4F\n:10EA5000022603D0032814BFFFDF0826286880F8A9\n:10EA60005B60217B80F82410418C1D290CBF0021A4\n:10EA700061688162617D80F83510A17B002916BF35\n:10EA80000229002101210175D4F80F10C0F81510DA\n:10EA9000B4F81310A0F81910A17EB0F8662061F345\n:10EAA0000302A0F86620E17E012918BF002180F84A\n:10EAB0003410002078BD4A480068408CC0F3001133\n:10EAC00031B1C0F38000002804BF1F20704702E06E\n:10EAD000C0F3400109B10020704710F0010F14BFCE\n:10EAE000EE20FF2070473E480068408CC0F30011C4\n:10EAF00019B1C0F3800028B102E0C0F3400008B1B2\n:10EB000000207047012070473549002209680A66D5\n:10EB10004B8C1D2B0CBF81F8642081F8640070477A\n:10EB200000232F4A126882F859309164A2F84C00F1\n:10EB3000012082F859007047294A0023126882F8A0\n:10EB40005830A2F854000120116582F8580070472F\n:10EB50002349096881F85D0070472148006890F9F1\n:10EB60005D0070471E48006890F82200C0F3401016\n:10EB700070471B48006890F82200C0F3C00070473F\n:10EB8000012070471648006890F85B00704770B528\n:10EB900008F0EBFA08F0CAFA08F0A2F908F020FA37\n:10EBA0000F4C2068016E491C016690F83300002567\n:10EBB00030B108F0F0FA07F0B8FC206880F8335064\n:10EBC0002068457090F8371021B1BDE870400420EE\n:10EBD00009F0D7BC90F8641001B3006E814203E0E5\n:10EBE000600000200406002018D8042009F0C9FCA9\n:10EBF000206890F8220010F0010F07D0A06843228F\n:10EC00000188BDE870400120FFF77EBBBDE8704081\n:10EC100043224FF6FF710020FFF776BBBDE870403E\n:10EC2000002009F0AEBC2DE9F04782B00F468146C6\n:10EC3000FE4E4FF000083068458C15F0030F10D0E1\n:10EC400015F0010F05F0020005D0002808BF4FF0B5\n:10EC5000010806D004E0002818BF4FF0020800D1D8\n:10EC6000FFDF4FF0000A544615F0010F05F00200D7\n:10EC70000DD080B915F0040F0DD04AF00800002F18\n:10EC80001CBF40F0010040F0020440D08FE010B102\n:10EC900015F0040F0DD015F0070F10D015F0010F6F\n:10ECA00005F0020036D0002808BF15F0040F27D069\n:10ECB0003DE0002F18BF4AF0090478D134E02FB1AD\n:10ECC0004AF0080415F0200F14D070E0316805F008\n:10ECD0002002B1F84400104308BF4AF0010466D096\n:10ECE0004AF0180415F0200F61D191F85A10082944\n:10ECF00059D155E0316891F85A10082950D152E0A5\n:10ED00004AF00800002F18BF40F001044FD140F036\n:10ED100010044CE0002818BF15F0040F07D0002F96\n:10ED200018BF4AF00B0442D14AF018043FE015F036\n:10ED3000030F3BD115F0040F38D077B131684AF09A\n:10ED4000080091F85A1008290CBF40F0020420F086\n:10ED5000020415F0200F21D029E0316805F02002CF\n:10ED6000B1F84400104308BF4AF003041FD04AF032\n:10ED7000180015F0200F08D091F85A10082914BF78\n:10ED800040F0020420F0020411E091F85A20082A11\n:10ED900014BF40F0010020F00100EDE7082902D087\n:10EDA00024F0010403E044F0010400E0FFDF15F06B\n:10EDB000400F1BD0C7B93168B1F84400002804BF28\n:10EDC000488C10F0010F0BD110F0020F08BF10F0AB\n:10EDD000200F05D115F0010F08BF15F0020F03D069\n:10EDE00091F85A00082801D044F040047068A0F857\n:10EDF00000A0017821F02001017007210EF030FC05\n:10EE0000414670680EF023FE214670680EF02BFE1E\n:10EE100014F0010F0AD006230022854970680EF015\n:10EE2000FCFD3068417B70680EF05CFC14F0020F52\n:10EE300018D0D6E90010B9F1000F4FF006034FF0DB\n:10EE4000010207D01C310EF0E8FD012170680EF0C0\n:10EE500056FC07E015310EF0E0FD3068017D70686A\n:10EE60000EF04DFC14F0040F18BFFFDF14F0080F74\n:10EE700017D0CDF800A03068BDF800100223B0F81C\n:10EE80006600020962F30B01ADF800109DF8011055\n:10EE9000032260F307118DF80110694670680EF0C7\n:10EEA000BCFD012F61D13068B0F84410E9B390F88F\n:10EEB0002200C0F34000C0BB70680EF0C4FD401CCF\n:10EEC000C7B23068B0F84420B0F85610551AC7F1F0\n:10EED000FF018D42A8BF0D46AA423AD990F8220000\n:10EEE00010F0010F35D144F01004214670680EF087\n:10EEF000BAFDF81CC0B2ED1E284482B23068B0F8EA\n:10EF00006610036E090951FA83F190F85C30494F9D\n:10EF10001944BC460023E1FB07C31B096FF0240C16\n:10EF200003FB0C1180F85C1000E01EE090F85B0021\n:10EF3000012101F037F80090BDF800009DF80210A3\n:10EF4000032340EA01400190042201A970680EF0F9\n:10EF500064FD3068AAB2016C70680EF0B2FD3068D2\n:10EF6000B0F856102944A0F8561014F0400F06D0FF\n:10EF7000D6E90010012306225D310EF04EFD14F09B\n:10EF8000200F18BFFFDF0020002818BFFFDF02B0EE\n:10EF9000BDE8F0872DE9F843244C2068002808BF1D\n:10EFA000FFDF2068417839BB0178FF2924D0002693\n:10EFB00080F83160A0F85660867080F8376030467F\n:10EFC00008F022F807F0E2FC206890F95D0007F0F5\n:10EFD00082FD194807F085FD184807F0FBFF6068BF\n:10EFE00008F015F8206890F8240010F0010F06D002\n:10EFF000252007F07EFD09E00C20BDE8F88310F025\n:10F00000020F18BF262075D007F073FD206890F816\n:10F010005A10252007F078FC206880F82C6007F053\n:10F02000EDFF206890F85A10002009E060000020F1\n:10F030001206002053E4B36E1C5B0200195B020051\n:10F0400007F04BFE0F21052007F019FD206890F80E\n:10F050002E10002901BF90F82F10002990F82200EF\n:10F0600010F0040F75D005F007FE0546206829460C\n:10F07000806806F01AFBDFF83084074690FBF8F052\n:10F0800008FB10704142284605F0F7FA21688860B5\n:10F0900097FBF8F04A68104448600DF05DF80146AF\n:10F0A0002068426891426FD8C0E90165FF4D4FF07A\n:10F0B000010895F82D000DF06EF8814695F82F00A7\n:10F0C0000127002818BFB9F1000F04D095F82D00D2\n:10F0D0000CF028FEA8B195F8300000281CBF95F868\n:10F0E0002E00002825D0697B05F10E00012916D0DD\n:10F0F0001AE0FFE710F0040F14BF2720FFDF83D1D1\n:10F1000084E73A466F7305F10E01484608F093FD17\n:10F1100095F82D1005F10E000DF034F909E0407955\n:10F1200000F0C000402815D0414605F10E0008F05F\n:10F13000B9FD206890F8220010F0040F24D095F853\n:10F140002D000CF0A3FE05001ED010210DF063FE73\n:10F1500040B119E00DF053F93A4605F10E0108F0FF\n:10F160006AFDE6E720683A4600F11C01C7762846AA\n:10F1700008F061FD206800F11C0160680EF0A4FA3F\n:10F18000012160680EF0BBFA2068417B0E3007F069\n:10F190005AFC206890F8581059B3B0F85410A0F8F1\n:10F1A0004410016D016490F82210C1F30011E9B917\n:10F1B000B0F8660002210509ADF80050684606F077\n:10F1C0003DFE28B1BDF80000C0F30B00A84204D1F9\n:10F1D000BDF80000401CADF800002168BDF800003B\n:10F1E000B1F8662060F30F12A1F86620206880F85D\n:10F1F0005860206890F8591031B1B0F84C108187F0\n:10F20000816C816380F85960B0F86610026E09095C\n:10F2100051FA82F190F85C20DFF894C21144634601\n:10F220000022E1FB0C3212096FF0240302FB0311F0\n:10F2300080F85C100DF013F8032160680DF092F86F\n:10F24000216881F833000020BDE8F883994988607F\n:10F2500070472DE9F043974C83B0226892F8313023\n:10F260003BB1508C1D2808BFFFDF03B0BDE8F04361\n:10F270008DE401260027F1B1054692F85C0007F005\n:10F2800038FC206890F85B10FF2007F03DFB2068F9\n:10F290004FF4A57190F85B20002007F0E4FD206892\n:10F2A00090F8221011F0030F00F02E81002D00F0D5\n:10F2B000258100F029B992F822108046D07EC1F352\n:10F2C0000011002956D0054660680780017821F0BA\n:10F2D00020010170518C132937D01FDC102908BF81\n:10F2E000022144D0122908BF062140D0FFDF6F4D14\n:10F2F000606805F10E010EF0D9F9697B60680EF0C7\n:10F30000F1F92068418C1D2918BF152965D0B0F886\n:10F310004420016C60680EF0FEF95EE0152918BF0C\n:10F320001D29E3D14FF001010EF09AF960680178D0\n:10F3300041F020010170216885B11C310EF0C4F943\n:10F34000012160680EF0DBF9D1E700210EF088F9A9\n:10F350006068017841F020010170C8E715310EF0B6\n:10F36000B3F92068017D60680EF0C9F9BFE70EF0BF\n:10F3700077F9BCE70021FFF756FC6068C17811F00F\n:10F380003F0F2AD0017911F0100F26D00EF066F948\n:10F390002368024693F82410C1F38000C1F3400CA7\n:10F3A000604401F0010100EB010C93F82C10C1F353\n:10F3B0008000C1F34005284401F001010844ACEB92\n:10F3C0000000C1B293F85A0000F0ECFD0090032356\n:10F3D0000422694660680EF020FB2068002590F842\n:10F3E000241090F82C0021EA000212F0010F18BF3F\n:10F3F00001250ED111F0020F04D010F0020F08BF4A\n:10F40000022506D011F0040F03D010F0040F08BF3E\n:10F410000425B8F1000F2BD0012D1BD0022D08BF01\n:10F4200026201BD0042D14BFFFDF272016D0206814\n:10F4300090F85A10252007F067FA206890F82210FB\n:10F44000C1F3001169B101224FF49671002007F059\n:10F450000AFD0DE0252007F04CFBE8E707F049FB2B\n:10F46000E5E790F85A204FF49671002007F0FBFC76\n:10F47000206890F82C10294380F82C1090F8242054\n:10F4800032EA01011DD04670418C13292CD027DCB3\n:10F49000102904BF03B0BDE8F083122924D000BFB7\n:10F4A000C1F30010002807E040420F0004060020CE\n:10F4B00053E4B36E6000002018BFFFDF03B0BDE867\n:10F4C000F083418C1D2908BF80F82C70DBD0C1F37C\n:10F4D0000011002914BF80F8316080F83170D2E744\n:10F4E000152918BF1D29DBD190F85A2003B04FF021\n:10F4F0000101BDE8F043084607F092BE90F85B209A\n:10F500000121084607F08CFE2168002DC87E7CD0C2\n:10F510004A8C3D46C2F34000002808BF47F008056A\n:10F5200012F0400F18BF45F04005002819BFD1F870\n:10F530003890B1F83C80D1F84090B1F844806068D0\n:10F54000072107800EF08CF8002160680EF07FFA2A\n:10F55000294660680EF087FA15F0080F15D020686C\n:10F56000BDF800100223B0F86600020962F30B0137\n:10F57000ADF800109DF80110032260F307118DF81B\n:10F580000110694660680EF048FA60680EF024F9D0\n:10F590002168C0F1FE00B1F85620A8EB02018142BB\n:10F5A000A8BF0146CFB2D019404542D245F0100164\n:10F5B00060680EF058FA60680EF00EF92168C0F12C\n:10F5C000FE00B1F85610A8EB01018142A8BF014628\n:10F5D000CFB260680EF037FA3844421C2068B0F8A9\n:10F5E0006610036E090951FA83F190F85C30FF4D03\n:10F5F0001944AC460023E1FB05C31B096FF0240C42\n:10F6000003FB0C1180F85C1000E038E090F85B0020\n:10F61000012100F0C7FC0090BDF800009DF8021029\n:10F62000032340EA01400190042201A960680EF022\n:10F63000F4F9216891F8220010F0400F05D0012361\n:10F6400006225D3160680EF0E8F920683A46B0F8AD\n:10F65000560000EB090160680EF033FA2068B0F83C\n:10F6600056103944A0F8561008F0C1F9002818BF08\n:10F67000FFDF20684670867003B0BDE8F08301218B\n:10F68000FFF7D1FAF0E7DA4810B50068417841B9E0\n:10F690000078FF2805D000210846FFF7DAFD00209A\n:10F6A00010BD07F062FD07F041FD07F019FC07F0FF\n:10F6B00097FC0C2010BD10B5CD4C206890F82200AE\n:10F6C00010F0010F1CBFA06801884FF03C0212BF70\n:10F6D00001204FF6FF710020FEF716FE2168012081\n:10F6E00081F8370010BDC249096881F832007047BF\n:10F6F0002DE9F041002508F010FF002800F00581F9\n:10F70000BB4C2068417801270026012906D0022938\n:10F7100001D003297ED0FFDFBDE8F0818178022689\n:10F720000029418C46D0C1F34002002A08BF11F0E5\n:10F73000010F70D090F85B204FF001014FF00000F6\n:10F7400007F06EFD216891F82200C0F34000002808\n:10F7500014BF0C20222091F85B1007F0D5F8206828\n:10F76000467090F8330058B106F0CBFE206890F850\n:10F770005B0010F00C0F0CBF4020452007F001FD8E\n:10F78000206890F83400002818BF07F019FD2168A0\n:10F7900091F85B0091F8651010F00C0F08BF002184\n:10F7A000962007F055FC08F019F9002818BFFFDF74\n:10F7B000BDE8F081C1F3001282B110293FD090F86A\n:10F7C000330020B106F09DFE402007F0DAFC2068EF\n:10F7D00090F8221011F0040F36D043E090F8242066\n:10F7E00090F82C309A422AD1B0F84400002808BF83\n:10F7F00011F0010F05D111F0020F08BF11F0200F19\n:10F800007ED04FF001014FF00000FFF722FD20688D\n:10F81000418C01E040E034E011F0010F04BFC1F37E\n:10F820004001002907D1B0F85610B0F844209142A9\n:10F8300018BFBDE8F08180F83170BDE8F081BDE807\n:10F84000F0410021012004E590F83510012914BF92\n:10F850000329102545F00E0190F85A204FF00000C2\n:10F8600007F0DEFC206890F83400002818BF07F08D\n:10F87000A7FC0021962007F0EBFB20684670BDE84E\n:10F88000F081B0F85610B0F8440081423DD0BDE898\n:10F89000F04101210846DCE48178D9B1418C11F0B6\n:10F8A000010F1CD080F8687090F86A20B0F86C10D6\n:10F8B0000120FEF729FD2068467007F056FC07F08E\n:10F8C00035FC07F00DFB07F08BFBBDE8F041032092\n:10F8D00008F057BE8178BDE8F0410120B9E411F08D\n:10F8E000020F04BFFFDFBDE8F081B0F85610808F33\n:10F8F00081420AD001210846FFF7ABFC032000E05B\n:10F9000003E021684870BDE8F081BDE8F041FFF7F1\n:10F910003EB9FFF73CB910B5354C206890F834106B\n:10F9200049B1363007F05BFC18B921687F2081F8B7\n:10F93000360007F03BFC206890F8330018B107F060\n:10F940002AFC06F0F2FD08F0E8FDA8B1206890F866\n:10F950002210C1F3001179B14078022818BFFFDFEF\n:10F9600000210120FFF775FC2068417800291EBFA7\n:10F9700040780128FFDF10BDBDE81040FFF707B950\n:10F980002DE9F0471A4C0F4680462168B8F1030F65\n:10F99000488C08BFC0F3400508D000F0010591F87D\n:10F9A0003200002818BF4FF0010901D14FF00009C3\n:10F9B00007F093F80646B8F1030F0CBF4FF00208AA\n:10F9C0004FF0010835EA090008BFBDE8F08720685C\n:10F9D00090F8330090B10CF025FC38700146FF28F8\n:10F9E0000CD06068C01C0CF0F6FB03E053E4B36E6F\n:10F9F0006000002038780CF022FC06436068017833\n:10FA0000C1F3801221680B7D9A4208D10622C01CE6\n:10FA1000153115F087FD002808BF012000D0002017\n:10FA20003978FF2906D0C8B9206890F82D0088429F\n:10FA300016D113E0A0B1616811F8030BC0F3801078\n:10FA40000CF08DFB05460CF0EDFC38B128460CF0AF\n:10FA50001DFA18B110210DF0DEF908B1012000E007\n:10FA60000020216891F8221011F0040F01D0F0B1AC\n:10FA70001AE0CEB9FE4890F83500002818BF40457E\n:10FA800015D1616811F8030BC0F380100CF067FB0F\n:10FA900004460CF0C7FC38B120460CF0F7F918B159\n:10FAA00010210DF0B8F910B10120BDE8F087002059\n:10FAB000BDE8F0872DE9F04FEE4D074683B028688A\n:10FAC00000264078022818BFFFDF28684FF07F0922\n:10FAD00090F8341049B1363007F081FB002804BF9C\n:10FAE000286880F8369007F061FB68680DF0DAFD51\n:10FAF0000446002F00F0048268680DF05EFF0028C5\n:10FB000000F0FE8106F0B7FF002800F0F981FF2029\n:10FB1000DFF864B3DFF8588300274FF0010A062CA2\n:10FB200080F00082DFE804F0EFEFEF03EFF78DF8ED\n:10FB3000000069460320FFF723FF002800F0E4805F\n:10FB4000296891F8340010B191F89800D0B1286874\n:10FB5000817801294CD06868042107800DF080FD70\n:10FB600008F10E0168680DF0A1FD98F80D106868A5\n:10FB70000DF0B8FD2868828F816B68680DF0EFFD8D\n:10FB800000F04DB99DF8000081F898A00A7881F83E\n:10FB90009920FF280FD001F19B029A310CF004FB51\n:10FBA000002808BFFFDF286890F89A1041F0020192\n:10FBB00080F89A100DE068680278C2F3801281F82C\n:10FBC0009A20D0F80320C1F89B20B0F80700A1F8D4\n:10FBD0009F00286800F1A10490F836007F2808BF34\n:10FBE000FFDF286890F83610217080F83690AEE775\n:10FBF00090F822009BF80490C0F38014686864F3C6\n:10FC00008619072107800DF02BFD002168680DF093\n:10FC10001EFF494668680DF026FF0623002208F102\n:10FC20000E0168680DF0F9FE2868417B68680DF0E8\n:10FC300059FD68680DF0D0FD29688A8FC0F1FE017A\n:10FC40008A42B8BF1146CFB2BA423DD9F81EC7B2F8\n:10FC500049F0100A514668680DF005FF68680DF01C\n:10FC6000F2FE3844431C2868B0F86610026E090999\n:10FC700051FA82F190F85C20DFF800920A44C846FD\n:10FC80004FF0000CE2FB098C4FEA1C116FF0240CC2\n:10FC900001FB0C2180F85C1090F85B001A460121F2\n:10FCA00000F080F90190BDF804009DF806100323D0\n:10FCB00040EA01400290042202A968680DF0ADFEFE\n:10FCC000514668680DF0CFFE34B1D5E9001001232C\n:10FCD00006225D310DF0A1FE28683A46816B686806\n:10FCE0000DF0EFFE2868A0F85670818F8F420CBF90\n:10FCF0000121002180F8311007F079FE002818BF9B\n:10FD0000FFDF8CE007E00DE128688078002840F0F4\n:10FD1000F98000F0F5B88DF8000068680178C1F34B\n:10FD20008019D0F803100191B0F80700ADF8080071\n:10FD300069460520FFF724FE0028286873D08178E3\n:10FD4000002972D090F85BA0D5E90104D0F80F101B\n:10FD5000C4F80E10B0F813106182417D2175817DC9\n:10FD60006175B0F81710E182B0F819106180B0F831\n:10FD70001B10A180B0F81D10E18000F11F0104F1FB\n:10FD8000080015F0B0FD686890F8241001F01F011C\n:10FD9000217690F82400400984F8740184F854A076\n:10FDA00084F855A0286890F8651084F8561090F8EB\n:10FDB0005D0084F857009DF80010A86800F05BF91A\n:10FDC000022008F0DEFB6868DBF800400DF1040A51\n:10FDD000078008210DF044FC002168680DF037FE13\n:10FDE000214668680DF03FFE0623002208F10E014F\n:10FDF00068680DF012FE2868417B68680DF072FC9F\n:10FE0000494668680DF07BFC06230122514668686C\n:10FE10000DF003FE07F0EBFD002818BFFFDF032005\n:10FE20002968487070E066E0FFE76868AC684FF0EA\n:10FE300001080278617BC2F3401211406173D0F86F\n:10FE40000F10C4F80E10B0F813106182417D2175B7\n:10FE5000817D6175B0F81710E182B0F819106180EA\n:10FE6000B0F81B10A180B0F81D10E18008E0000080\n:10FE70000406002060000020145B020053E4B36E0F\n:10FE800000F11F0104F1080015F02DFD686890F8DD\n:10FE9000241001F01F01217690F82400400984F815\n:10FEA000740184F8548084F85580286890F86510AF\n:10FEB00084F8561090F85D0084F857009DF8001003\n:10FEC000A86800F0D8F8286880F868A090F86A2040\n:10FED000B0F86C100120FEF717FA2868477007F099\n:10FEE00044F907F023F906F0FBFF07F079F8012049\n:10FEF00008F047FB08E090F82200C0F3001008B1BA\n:10FF0000012601E0FEF743FE286890F8330018B19F\n:10FF100007F041F906F009FB66B100210120FFF767\n:10FF200098F910E0286890F82200C0F3001000282B\n:10FF3000E8D0E5E728688178012904D190F85B10C2\n:10FF4000FF2006F0E1FC28684178002919BF4178BC\n:10FF5000012903B0BDE8F08F4078032818BFFFDF08\n:10FF600003B0BDE8F08F70B57E4C06460D462068A4\n:10FF7000807858B106F07EFC21680346304691F83F\n:10FF80005B202946BDE8704009F0C6B806F072FC57\n:10FF900021680346304691F85A202946BDE8704052\n:10FFA00009F0BAB878B50C4600210091082804BFC2\n:10FFB0004FF4C87040210DD0042804BF4FF4BF7027\n:10FFC000102107D0022807BF01F11800042101F118\n:10FFD00028000821521D02FB010562489DF800100F\n:10FFE000006890F85C2062F3050141F040068DF84E\n:10FFF000006090F85B00012828D002282DD0082846\n:020000040001F9\n:1000000018BFFFDF2FD000BF26F080008DF8000062\n:10001000C4EB041000EB80001E2101EB800005FB07\n:1000200004045148844228BFFFDF5048A0FB04105D\n:10003000BDF80110000960F30C01ADF80110BDF826\n:1000400000009DF8021040EA014078BD9DF80200D2\n:1000500020F0E0008DF80200D6E79DF8020020F0C5\n:10006000E000203004E09DF8020020F0E000403085\n:100070008DF80200C8E72DE9F0413A4D04460E46DE\n:10008000286890F86800002818BFFFDF002728685C\n:1000900080F86A702188A0F86C106188A0F882103E\n:1000A000A188A0F88410E188A0F8861094F8741153\n:1000B00080F8881090F82F1049B1427B00F10E01B2\n:1000C000012A04D1497901F0C001402934D090F8C7\n:1000D000301041B1427B00F10E01012A04BF497981\n:1000E00011F0C00F28D000F1760015F0F3FB68681E\n:1000F000FF2E0178C1F380116176D0F80310C4F8A7\n:100100001A10B0F80700E08328681DD0C167E18BA2\n:10011000A0F8801000F17002511E30460CF044F837\n:10012000002808BFFFDF286890F86F1041F0020137\n:1001300080F86F10BDE8F081D0F80E10C0F876108E\n:10014000418AA0F87A10D2E7C767A0F88070617E74\n:1001500080F86F10D4F81A100167E18BA0F87410C2\n:10016000BDE8F08160000020C4BF03008988888852\n:100170000178406829B190F8141190F8730038B9EB\n:1001800001E001F0CDBD19B1042901D00120704773\n:100190000020704770B50C460546062102F02AFC87\n:1001A000606008B1002006E00721284602F022FC2A\n:1001B000606018B101202070002070BD022070BD69\n:1001C0002DE9FC470C4606466946FFF7E3FF002889\n:1001D0007DD19DF8000050B1FEF727F9B0427CD0E8\n:1001E000214630460AF088F9002873D12DE00DF041\n:1001F000E7FEB04271D02146304613F027FB0028BD\n:1002000068D1019D95F8D80022E0012000E000208F\n:10021000804695F837004FF0010A4FF00009F0B121\n:1002200095F8380080071AD584F8019084F800A06A\n:1002300084F80490E68095F839102172698F618105\n:10024000A98FA18185F8379044E0019D95F81401AC\n:1002500058350028DBD1E87E0028D8D0D5E73046D5\n:1002600002F00CFD070000D1FFDF384601F01CFF53\n:1002700040B184F801900F212170E680208184F83C\n:1002800004A027E0304602F0E7FC070000D1FFDFC2\n:10029000B8F1000F21D0384601F05DFFB8B19DF8EC\n:1002A000000038B90198D0F800014188B14201D16D\n:1002B00080F80090304607F0E8FB84F801900C21AC\n:1002C000217084F80490E680297F217200E004E028\n:1002D00085F81B900120BDE8FC870020FBE71CB5DA\n:1002E0006946FFF757FF00B1FFDF684601F024FDC4\n:1002F000FB4900208968A1F8DA001CBD2DE9FC410A\n:1003000004460E46062002F01DFB0546072002F0BB\n:1003100019FB2844C7B20025A8463E4417E02088B0\n:10032000401C80B22080B04202D34046A4F8008036\n:1003300080B2B84204D3B04202D20020BDE8FC81B2\n:100340006946FFF727FF0028F8D06D1CEDB2AE42DA\n:10035000E5D84FF6FF7020801220EFE738B54FF652\n:10036000FF70ADF800000DE00621BDF8000002F0BE\n:1003700053FB04460721BDF8000002F04DFB0CB111\n:1003800000B1FFDF00216846FFF7B8FF0028EBD07F\n:1003900038BD70B507F0E6FB0BF0CDFCD14C4FF645\n:1003A000FF7600256683A683CFA0257001680079BB\n:1003B000A4F14002657042F8421FA11C1071601C3C\n:1003C00013F065FB25721B2060814FF4A471A1819D\n:1003D000E08121820321A1740422E274A082E082E0\n:1003E000A4F13E00218305704680BD480C300570A5\n:1003F000A4F110000570468070BD70B5B84C16466B\n:100400000D466060217007F027FBFFF7A7FFFFF79D\n:10041000C0FF207810F0CDFFB5480EF07CFA2178AF\n:10042000606813F0D9FA20780AF0D4FE284608F064\n:1004300010FCAF48FEF704F8217860680AF042F932\n:100440003146207813F0DAFDBDE870400BF073BC44\n:1004500010B501240AB1002010BD21B1012903D03B\n:100460000024204610BD02210DF068FBF9E72DE9BC\n:10047000F047040000D1FFDF9A4802211C3081467A\n:10048000FFF73CFF00B1FFDF964D0620B5F81C805A\n:1004900002F058FA0646072002F054FA3044C6B279\n:1004A000701CC7B2A88BB04228D120460DF0FEFCCC\n:1004B000B0B1207818283FD1207901283CD1E088BC\n:1004C000062102F097FA040000D1FFDF208807F030\n:1004D000DCFA2088062102F09FFA40B3FFDF2BE010\n:1004E000287860B300266670142020702021201D1B\n:1004F00015F0E5F8022020712E701DE0B84217D1EA\n:100500002046FDF737FFD0B12078172814D1207985\n:1005100068B1E088072102F06DFA40B1008807F069\n:10052000B4FAE088072102F077FA00B1FFDF03E0B8\n:100530002146FFF745FE10B10120BDE8F0870221FA\n:100540004846FFF7DBFE10B9A98B4145AAD12046EA\n:10055000BDE8F04713F098BD10B501F089FB08B174\n:100560000C2010BD0BF03AFC002010BD10B5044665\n:10057000007818B1012801D0122010BD01F089FBCC\n:1005800020B10BF0DBFD08B10C2010BD207801F08C\n:1005900036FBE21D04F11703611CBDE810400BF0AF\n:1005A000C2BC10B5044601F063FB08B10C2010BDBD\n:1005B000207828B1012803D0FF280BD0122010BDCD\n:1005C00001F01DFB611C0BF0C9FB08B1002010BD40\n:1005D000072010BD01200BF0FBFBF7E710B50BF077\n:1005E000B0FD08B1002010BD302010BD10B504468C\n:1005F00001F04FFB08B10C2010BD20460BF09BFD15\n:10060000002010BD10B501F044FB20B10BF096FDA9\n:1006100008B10C2010BD0BF0EBFC002010BDFF2139\n:1006200081704FF6FF7181802D4949680A78827187\n:100630008A880281498841810121417000207047E8\n:100640007CB50025022A19D015DC12F10C0F15D04B\n:1006500009DC12F1280F11D012F1140F0ED012F193\n:10066000100F11D10AE012F1080F07D012F1040F98\n:1006700004D04AB902E0D31E052B05D8012806D0C4\n:10068000022808D003280AD0122528467CBD10462F\n:10069000FEF75EFAF9E710460EF0E8F8F5E70846CF\n:1006A00014466946FFF776FD08B10225EDE79DF88F\n:1006B00000000198002580F85740E6E710B5134682\n:1006C00001220CF0E5FB002010BD10B5044611F02E\n:1006D00070FC05280ED0204610F05AFE002010BDF8\n:1006E0006C000020E8070020FFFFFFFF1F00000054\n:1006F000A80600200C20F2E710B5044601F0C9FA64\n:1007000008B10C20EBE72146002007F02CFA00206E\n:10071000E5E710B5044610F0C9FE50B108F02AFD17\n:1007200038B1207808F0BBFA20780EF0DBFB00200F\n:10073000D5E70C20D3E710B5044601F0AAFA08B1BA\n:100740000C20CCE72146012007F00DFA0020C6E777\n:1007500038B504464FF6FF70ADF80000A079E17996\n:10076000884216D02079FDF766FD90B16079FDF7DB\n:1007700062FD70B10022A079114614F0B3F840B9BF\n:100780000022E079114614F0ADF810B9207A07285C\n:1007900001D9122038BD08F0FAFC60B911F009FC4B\n:1007A00048B900216846FFF7A9FD20B1204606F0B0\n:1007B00086F8002038BD0C2038BD2DE9FC41817839\n:1007C00005461A2925D00EDC16292DD2DFE801F0C6\n:1007D0002C2C2C2C2C212C2C2C2C2C2C2C2C2C2C64\n:1007E0002C2C2C2121212A291ED00BDCA1F11E0149\n:1007F0000C2919D2DFE801F0181818181818181861\n:100800001818180D3A3904290ED2DFE801F00D024C\n:100810000D022888B0F5706F06D201276946FFF7F0\n:10082000B9FC18B1022089E5122087E59DF8000087\n:1008300001F0ECF9019C08B1FC3401E004F5BC7452\n:100840009DF8000001F0E2F9019E08B1FD3601E0DB\n:1008500006F279166846FFF78BFC08B1207808B1DC\n:100860000C206BE52770A8783070684601F064FAB8\n:10087000002063E57CB50D466946FFF78BFC00263A\n:1008800018B12E602E7102207CBD9DF8000001F091\n:10089000BDF9019C9DF80000583401F0B7F90198AA\n:1008A00084F8406081682960017B297194F84010C8\n:1008B0000029F5D100207CBD70B5044691F85500A3\n:1008C00091F856300D4610F00C0F00D1002321890D\n:1008D000A0880CF0A1FC696A81421DD2401A401C1C\n:1008E000A1884008091A8AB2A2802189081A2081A9\n:1008F000668895F8541010460CF035FC864200D2FC\n:1009000030466080E68895F8551020890CF02BFC65\n:10091000864200D23046E08070BDF0B585B00D460D\n:10092000064603A9FFF736FC00282DD19DF80C00E0\n:1009300060B300220499FB20B1F84A30FB2B00D3AE\n:100940000346B1F84C40FB20FB2C00D30446DFF8F3\n:100950003CCC9CE8811000900197CDF808C0ADF820\n:100960000230ADF806406846FFF7A6FF6E80BDF87E\n:100970000400E880BDF808006881BDF80200A88086\n:10098000BDF806002881002005B0F0BD0122D1E7A6\n:100990002DE9F04186B0044600886946FFF7FAFB6E\n:1009A000002876D12189E08801F0D5F9002870D19E\n:1009B000A188608801F0CFF900286AD12189E088F8\n:1009C00001F0D7F9002864D1A188608801F0D1F93D\n:1009D00007005ED1208802A9FFF79FFF00B1FFDF6B\n:1009E000BDF8101062880920914252D3BDF80C1056\n:1009F000E28891424DD3BDF81210BDF80E20238934\n:100A00001144A2881A44914243D39DF80010019DDD\n:100A10004FF00008012640F6480041B185F8A36177\n:100A2000019991F8E61105F5D17541B91AE085F8FB\n:100A30000D61019991F8301105F5867509B13A27D4\n:100A400024E0E18869806188E9802189814200D3BE\n:100A50000146A980A188814200D20846288101224E\n:100A600001990FE0E18869806188E98021898142EC\n:100A700000D30146A980A188814200D2084628817E\n:100A8000019900222846FFF717FF2E7085F8018094\n:100A9000384606B0BDE8F0817AE710B5044601F0AB\n:100AA000F8F820B10BF04AFB08B10C2017E62078CB\n:100AB00001F0A5F8E279611C0BF0C1FC08B100203F\n:100AC0000DE602200BE610B503780446002B4068C3\n:100AD00013460A46014609D05FF001000CF0A5FB61\n:100AE0006168496A884203D90120F8E50020F5E7EA\n:100AF0000020F4E52DE9F04117468A781E4680462D\n:100B000042B11546C87838B10446690706D52AB1FE\n:100B1000012104E00725F5E70724F6E70021620735\n:100B200002D508B1012000E00020014206D00122D8\n:100B300011464046FFF7C7FF98B93BE051B100228C\n:100B400001214046FFF7BFFF58B9600732D50122A7\n:100B500011461FE058B1012200214046FFF7B3FFC4\n:100B600008B1092096E7680724D5012206E0680746\n:100B70004FEA44700AD5002813DB002201214046C9\n:100B8000FFF7A1FFB0B125F0040513E0002811DA4A\n:100B9000012200214046FFF796FF58B124F00404DB\n:100BA00008E0012211464046FFF78DFF10B125F005\n:100BB0000405F3E73D70347000206BE710B586B094\n:100BC0000446008803A9FFF7E5FA002806D1A088AB\n:100BD00030B1012804D0022802D0122006B07EE5F0\n:100BE0006B4602AA214603A8FFF784FF0028F5D12F\n:100BF0009DF80C3000220121002B049B06D083F8C5\n:100C0000AD11049B93F8FA316BBB24E083F8171104\n:100C1000049B93F83C313BB9049B93F816311BB904\n:100C2000049B93F87D300BB13A2010E0049B83F8CD\n:100C30001611049B9DF8081083F81811049B9DF869\n:100C4000001083F81911049BA188A3F81A110499C4\n:100C500081F81721C2E7049B93F8AC311BB9049BC0\n:100C600093F87D300BB13A2010E0049B83F8AC116F\n:100C7000049B9DF8081083F8AE11049B9DF80010AA\n:100C800083F8AF11049BA188A3F8B011049981F8EF\n:100C9000AD21A3E710B504460020A17801B90120D9\n:100CA000E2780AB940F0020001F06CF8002803D1A4\n:100CB0002046BDE8104081E711E570B51C460D46A1\n:100CC00018B1012801D0122070BD1946104601F05C\n:100CD00069F830B12146284601F06EF808B10020CD\n:100CE00070BD302070BD70B5044600780E460128F6\n:100CF00004D018B1022801D0032841D1607828B16E\n:100D0000012803D0022801D0032839D1E07B10B993\n:100D1000A078012834D1A07830F0050130D110F04E\n:100D2000050F2DD06289E188E0783346FFF7C5FFD3\n:100D3000002826D1A07805281ED16589A28921899D\n:100D400020793346FFF7B9FF00281AD15FF0010080\n:100D500004EB40014A8915442218D37892789342D3\n:100D60000ED1CA8889888A420AD1401CC0B20228A2\n:100D7000EED3E088A84203D3A07B08B1072801D9AD\n:100D8000122070BD002070BD10B586B0044600F082\n:100D900062FF08B10C2021E7022104F10A0001F0F2\n:100DA0001EF8A0788DF80800A0788DF80000607813\n:100DB0008DF8040020788DF80300A07B8DF80500E5\n:100DC000E07B00B101208DF80600A078C10717D0A4\n:100DD000E07800F0FBFF8DF80100E088ADF80A0034\n:100DE0006089ADF80C00A078400716D5207900F096\n:100DF000EDFF8DF802002089ADF80E00A0890AE011\n:100E000040070AD5E07800F0E1FF8DF80200E088A5\n:100E1000ADF80E006089ADF8100002A810F052FB8A\n:100E20000028B8D168460EF062F8D7E610B504463F\n:100E30000121FFF758FF002803D12046BDE81040EC\n:100E4000A2E74CE40278012A01D0BAB118E0427856\n:100E50003AB1012A05D0022A12D189B1818879B12B\n:100E600000E059B1418849B1808838B101EB810176\n:100E7000490000EB8000B1EB002F01D20020704749\n:100E80001220704770B5044600780D46012809D03D\n:100E900011F08FF8052803D010F025FA002800D0B3\n:100EA0000C2070BD0DF0F0FE88B10DF002FF0DF0CA\n:100EB000FBFF0028F5D125B160780DF08CFF0028EC\n:100EC000EFD1A1886088BDE8704010F021BB1220EE\n:100ED00070BD10B504460121FFF7B4FF002804D10E\n:100EE0002046BDE810400121CCE704E42DE9F0479D\n:100EF0000746B0F84C50FB2092460E46FB2D00D31F\n:100F00000546DFF88C86B8F80A00A84200D20546EC\n:100F100097F85510284600F08DFEB8F80C10814265\n:100F200000D208468146B7F84A40FB20FB2C00D38C\n:100F30000446B8F80E00A04200D2044697F85410B8\n:100F4000204600F077FEB8F81010814200D2084623\n:100F50004FF4A4721B2C01D0904203D11B2D25D03D\n:100F6000914523D0F580A6F808907480B080524651\n:100F700039463046FFF7A0FC01203070F0881B385E\n:100F8000E02800D9FFDF70881B38E02800D9FFDF98\n:100F9000308940F64814A0F5A470A04200D9FFDFC4\n:100FA000B088A0F5A470A04200D9FFDFBDE8F087AB\n:100FB000F0B5871FDDE9056540F67B44A74213D2F3\n:100FC0008F1FA74210D288420ED8B2F5FA7F0BD2FB\n:100FD000A3F10A00241FA04206D2521C4A43B2EBDE\n:100FE000830F01DAAE4201D90020F0BD0120F0BD2F\n:100FF0002DE9FC47477A8946044617F0050F7DD056\n:10100000F8087BD194F83A0008B9012F76D1002571\n:10101000A8462E46F90789F0010A19D0208A5146C0\n:1010200000F0C0FEF0B36089514600F0C5FEC8B3C1\n:10103000208A6189884261D8A18EE08DCDE90001C6\n:10104000238D628CA18BE08AFFF7B2FF50B301259C\n:10105000B8070ED504EB4500828EC18DCDE9001294\n:10106000038D428C818BC08AFFF7A2FFD0B1A846C6\n:101070006D1C78071ED504EB45065146308A00F0FA\n:1010800091FE78B17089514600F096FE50B1308AD9\n:10109000718988425ED8B18EF08DCDE90001338D23\n:1010A000728C00E00AE0B18BF08AFFF781FF28B173\n:1010B0002E466D1CB9F1000F03D030E03020BDE8A2\n:1010C000FC87F80707D0780705D504EB460160894F\n:1010D000498988423ED1228A01211BE0414503D043\n:1010E00004EB4100008A024404EB4100C38A868A73\n:1010F000B3422FD1838B468BB34200E02AE029D143\n:10110000438C068CB34225D1038DC08C834221D100\n:10111000491CC9B2A942E1D3608990421AD3207810\n:1011200010B1012816D10DE0A078B9F1000F07D059\n:1011300040B1012806D0022804D003280AD101E0DA\n:101140000028EED1607838B1012805D0022803D0FC\n:10115000032801D01220B2E70020B0E7002147E7C2\n:101160000178C90702D0406812F061BF12F02EBFAB\n:101170002DE9F04788B00D46AFF69422D2E90092EF\n:10118000014690462846FFF733FF06000CD100F0D9\n:1011900062FD40B9FE4F387828B90CF011FFA0F578\n:1011A0007F41FF3902D00C2008B0FFE6032105F192\n:1011B000100000F014FEF64801AA3E380190F548F0\n:1011C0000290F34806211038039007A801F0E0FBD5\n:1011D000040035D003210BF0BBFBB98AA4F84A10F8\n:1011E000FA8AA4F84C20FB7C0093BA46BB7C20888A\n:1011F00001F0BBFC00B1FFDF208806F045FC218830\n:1012000004F10E0000F04FFDE3A004F112070068A6\n:1012100000900321684604F007FE002069460A5C3E\n:101220003A54401CC0B20328F9D3A88B6080688C64\n:10123000A080288DE080687A410703D508270AE05E\n:101240000920B1E7C10701D0012704E0800701D5DB\n:10125000022700E000273A46BAF81800114610F0BD\n:10126000EBF90146A062204610F0F4F917F00C0FDC\n:1012700009D001231A46214600200BF0D6FF616AEF\n:10128000884200D90926002784F85E7084F85F70D0\n:10129000A87800F0B4FC6076D5F80300C4F81A0012\n:1012A000B5F80700E083C4F8089084F80C800120AA\n:1012B00084F80801024604F586712046FFF716FE01\n:1012C0008DF800700121684604F0AEFD9DF8000025\n:1012D00000F00701C0F3C1021144C0F340100844FC\n:1012E0008DF80000401D2076092801D208302076B4\n:1012F000002120460BF02CFB68780DF0D0FCEEBBF3\n:10130000A9782878EA1C0DF092FC48B10DF0D1FCC8\n:10131000A9782878EA1C0DF038FD060002D052E0CA\n:10132000122650E0687A00F005010020CA0700D0BC\n:1013300001208A0701D540F00200490701D540F09D\n:1013400008000DF05DFC06003DD1214603200DF0A4\n:1013500046FD060037D10DF04CFD060033D1697A09\n:1013600001F005018DF81010697AC90708D0688965\n:10137000ADF81200288AADF8140000E023E0012047\n:10138000697A8A0700D5401C490707D505EB40005C\n:101390004189ADF81610008AADF8180004A810F0C5\n:1013A00091F8064695F83A0000B101200DF03AFC9C\n:1013B0004EB90DF079FD060005D1A98F204610F039\n:1013C00023F8060008D0208806F05FFB208806215D\n:1013D00001F022FB00B1FFDF3046E5E601460020C8\n:1013E000C6E638B56A48007878B910F0E2FD0528FD\n:1013F00005D00CF0E5FDA0F57F41FF3905D068462A\n:1014000010F0C9F8040002D00CE00C2038BD0098A0\n:10141000008806F03AFB00980621008801F0FCFAEB\n:1014200000B1FFDF204638BD1CB582894189CDE976\n:1014300000120389C28881884088FFF7B9FD08B18E\n:1014400000201CBD30201CBD70B50546FFF7ECFF29\n:1014500000280ED12888062101F0CCFA040007D01C\n:1014600000F05EFC20B1D4F80001017831B901E050\n:10147000022070BDD4F84C11097809B13A2070BD32\n:1014800005218171D4F8001100200881D4F80011E1\n:10149000A8884881D4F80011E8888881D4F8001120\n:1014A0002889C881D4F80001028941898A4204D878\n:1014B0008279082A01D88A4201D3122070BD298876\n:1014C0004180D4F8001102200870002070BD3EB5A4\n:1014D00004460BF06FFCB0B12D480125A0F140028D\n:1014E0004570236842F8423F23790021137141700F\n:1014F0006946062001F007FA00B1FFDF684601F0F7\n:10150000E0F910B10EE012203EBDBDF80440029893\n:1015100080F80851684601F0D4F918B9BDF8040004\n:10152000A042F4D100203EBD70B5054600880621DA\n:1015300001F060FA040007D000F0F2FB20B1D4F80B\n:101540000011087830B901E0022070BDD4F84C01D8\n:10155000007808B13A2070BD9620005D10F0010FB0\n:1015600024D0D5F802004860D5F806008860D4F889\n:101570000001698910228181D4F8000105F10C0174\n:101580000E3004F5807413F0F9FF07E0385B0200B9\n:10159000E807002078000020112233002168032092\n:1015A0000870216828884880002070BD0C2070BD1C\n:1015B00038B504460078EF284DD86088ADF80000B3\n:1015C000009800F01DFC88B36188080708D4D4E9AE\n:1015D000012082423FD8202A3DD3B0F5804F3AD82F\n:1015E000207B18B3072836D8607B28B1012803D0A8\n:1015F000022801D003282ED14A0703D4022801D0A3\n:10160000032805D1A07B08B1012824D1480707D4BD\n:10161000607D28B1012803D0022801D003281AD107\n:10162000C806E07D03D5012815D110E013E001289C\n:1016300001D003280FD1C80609D4607E012803D049\n:10164000022801D0032806D1A07E0F2803D8E07E0F\n:1016500018B1012801D0122038BD002038BDF8B5DE\n:1016600014460D46064607F092FD08B10C20F8BD61\n:101670003046FFF79DFF0028F9D1FDF76EFA28707C\n:10168000B07554B9FF208DF8000069460020FDF7C1\n:1016900053FA69460020FDF743FA3046BDE8F840AA\n:1016A000FDF797B90022DAE770B50C46054612B18E\n:1016B0001F2907D80CE0FF2C04D8FCF704FF18B151\n:1016C0001F2C01D9122070BD2846FCF7E6FE08B198\n:1016D000002070BD422070BD10B50446408810B196\n:1016E000FDF701FA78B12078618800F00102607896\n:1016F000FFF7DAFF002805D1FDF7DDF962888242A5\n:1017000003D9072010BD122010BD10466168FDF7F7\n:1017100013FA002010BD10B50446408810B1FCF744\n:10172000C4FE70B12078618800F001026078FFF794\n:10173000BBFF002804D160886168FDF7F1F9002043\n:1017400010BD122010BD7CB504464078422501280A\n:1017500008D8A078FCF7A1FE20B120781225012836\n:1017600002D090B128467CBDFDF703FA20B1A088D5\n:101770000028F7D08028F5D8FDF702FA60B160782C\n:101780000028EFD02078012808D006F09DFA044602\n:1017900007F0BCF900287DD00C207CBDFDF732F8A5\n:1017A00010B9FDF7DFF990B307F0F1FC0028F3D191\n:1017B000FCF73BFEA0F57F41FF39EDD1FDF744F882\n:1017C000A68842F210704643A079FDF79DF9FCF718\n:1017D00073FEF8B10022072101A801F0D9F8040036\n:1017E00043D0FA480321846020460AF0B6FF204621\n:1017F000FDF72CFDF64DA88AA4F84A00E88AA4F863\n:101800004C00FCF760FE60B1288B01210DE0FFE782\n:1018100012207CBD3146002007F044FAD8B3FFDF28\n:101820004CE0FDF7AFF90146288B07F0F0FA0146CE\n:10183000A0620022204606F04AFAFCF744FEB0B946\n:10184000FDF7A0F910F00C0F11D001231A46214624\n:1018500018460BF0EAFC616A884208D90721BDF8F6\n:10186000040001F0D9F800B1FFDF09207CBDE87C5D\n:101870000090AB7CEA8AA98A208801F076F900B151\n:10188000FFDF208806F000F93146204607F00AFA0B\n:1018900018B101E008E011E0FFDF002204F5D1718A\n:1018A0002046FFF723FB09E044B1208806F0EDF85D\n:1018B0002088072101F0B0F800B1FFDF00207CBDD7\n:1018C000002140E770B50D46072101F093F80400B0\n:1018D00003D094F87B0110B10AE0022070BD94F8A7\n:1018E0006500142801D0152802D194F8C80108B168\n:1018F0000C2070BD1022294604F5BE7013F03EFE88\n:10190000012084F87B01002070BD10B5072101F093\n:1019100071F818B190F87B1111B107E0022010BDE9\n:1019200090F86510142903D0152901D00C2010BDA2\n:10193000022180F87B11002010BD2DE9FC410C46EE\n:101940004BF68032122194421DD8E4B16946FEF76D\n:1019500021FC002815D19DF8000000F057F9019EE8\n:101960009DF80000583600F051F9019DAD1C2F88FC\n:101970002246394630460AF0E6FE2888B842F6D1BB\n:101980000020BDE8FC810846FBE77CB504460088E2\n:101990006946FEF7FFFB002810D19DF8000000F01B\n:1019A00035F9019D9DF80000583500F02FF9019898\n:1019B000A27890F82C10914201D10C207CBD7F219F\n:1019C0002972A9720021E972E17880F82D1021793D\n:1019D00080F82E10A17880F82C1000207CBD1CB55A\n:1019E0000C466946FEF7D6FB00280AD19DF8000098\n:1019F00000F00CF9019890F8730000B101202070FC\n:101A000000201CBD7CB50D4614466946FEF7C2FB9E\n:101A1000002809D19DF8000000F0F8F8019890F82E\n:101A20002C00012801D00C207CBD9DF8000000F0A6\n:101A3000EDF8019890F86010297090F8610020701E\n:101A400000207CBD70B50D461646072100F0D2FF80\n:101A500018B381880124C388428804EB4104AC4256\n:101A600017D842F210746343A4106243B3FBF2F23E\n:101A7000521E94B24FF4FA72944200D91446A54211\n:101A800000D22C46491C641CB4FBF1F24A43521E9E\n:101A900091B290F8B4211AB901E0022070BD01841E\n:101AA0003180002070BD10B50C46072100F0A2FF68\n:101AB00048B180F8E74024B190F8E51009B107F08B\n:101AC000BCF9002010BD022010BD017899B1417809\n:101AD00089B141881B290ED381881B290BD3C1886A\n:101AE000022908D33A490268403941F8522F406828\n:101AF0004860002070471220704710B504460FF070\n:101B000097FD204607F052F9002010BD10B507F0F0\n:101B100050F9002010BD2DE9F04115460F4606464C\n:101B20000122114638460FF087FD04460121384650\n:101B300007F06DF9844200D2044601213046653C2D\n:101B400000F069F806460121002000F064F83044F6\n:101B500001219630844206D900F19601201AB0FB8B\n:101B6000F1F0401C81B229800020BDE8F08110B561\n:101B7000044600F08EF808B10C2010BD601C0AF07D\n:101B800039FC207800F00100FCF759FE207800F0C5\n:101B900001000DF089F8002010BD10B507F003F921\n:101BA000002010BD10B50446072000F0BDFE08B1AE\n:101BB0000C2010BD2078C00716D000226078114696\n:101BC00012F090FE30B1122010BD00006C00002019\n:101BD000E8070020A06809F0D4F86078D4F8041071\n:101BE00009F0D8F80020EFE7002009F0CAF800213A\n:101BF0000846F5E710B505F02BFB0020E4E718B127\n:101C0000022801D0012070470020704708B1002051\n:101C100070470120704710B5012904D0022905D072\n:101C2000FFDF2046D0E7C000503001E080002C30BC\n:101C300084B2F6E711F00C0F04D04FF4747101EB8D\n:101C4000801006E0022902D0C000703001E0800060\n:101C50003C3080B2704710B510F0ABF9042805D0C5\n:101C600010F0A7F9052801D00020ADE70120ABE76F\n:101C700010B5FFF7F0FF10B10DF0DAF828B907F052\n:101C800086FA20B1FCF7B6FD08B101209CE70020E0\n:101C90009AE710B5FFF7DFFF18B907F078FA0028C8\n:101CA00092D0012090E72DE9FE4300250F468046A3\n:101CB0000A260421404604F0E0F840460BF01BF8E9\n:101CC000062000F03FFE044615E06946062000F0BD\n:101CD0001AFE0AE0BDF80400B84206D002980422B9\n:101CE00041460E3013F01EFC50B1684600F0E9FD8D\n:101CF0000500EFD0641E002C06DD002DE5D005E0C8\n:101D000040460BF001F8F5E705B9FFDFD8F8000011\n:101D10000BF015F8761E01D00028CAD0BDE8FE836E\n:101D200090F8D81090F8730020B919B1042901D0A7\n:101D30000120704700207047017800290AD04168CF\n:101D400091F8E520002A05D0002281F8E5204068BE\n:101D500007F073B870471B38E12806D2B1F5A47FAD\n:101D600003D344F29020814201D912207047002011\n:101D70007047FB2802D8B1F5296F01D911207047AF\n:101D80000020704770B514460546012200F05CF84B\n:101D9000002806D121462846BDE87040002200F008\n:101DA00053B870BD042803D321B9B0F5804F01D9D1\n:101DB0000020704701207047042803D321B9B0F5F3\n:101DC000804F01D90020704701207047012802D0C0\n:101DD00018B100207047022070470120704710B5ED\n:101DE00000224FF4C84408E030F81230A34200D972\n:101DF000234620F81230521CD2B28A42F4D3E3E6D2\n:101E000080B2C1060BD401071CD481064FEAC07111\n:101E100001D5B9B900E099B1800713D410E04106AB\n:101E200010D481060ED4C1074FEA807104D0002976\n:101E300002DB400704D405E0010703D4400701D4C6\n:101E400001207047002070470AB1012200E0022201\n:101E5000024202D1C80802D109B100207047112006\n:101E60007047000030B5058825F4004421448CB249\n:101E70004FF4004194420AD2121B92B21B339A4291\n:101E800001D2A94307E005F40041214303E0A21A6F\n:101E900092B2A9431143018030BD08440830504339\n:101EA0004A31084480B2704770B51D4616460B464D\n:101EB000044629463046049AFFF7EFFF0646B34230\n:101EC00000D2FFDF2821204613F0F9FB4FF6FF7008\n:101ED000A082283EB0B265776080B0F5004F00D98F\n:101EE000FFDF618805F13C00814200D2FFDF60889E\n:101EF0000835401B343880B220801B2800D21B20BC\n:101F000020800020A07770BD8161886170472DE935\n:101F1000F05F0D46C188044600F12809008921F4CC\n:101F2000004620F4004800F062FB10B10020BDE83C\n:101F3000F09F4FF0000A4FF0010BB0450CD9617FC4\n:101F4000A8EB0600401A0838854219DC09EB0600A8\n:101F50000021058041801AE06088617F801B471A5C\n:101F6000083F0DD41B2F00DAFFDFBD4201DC2946FC\n:101F700000E0B9B2681A0204120C04D0424502DD36\n:101F800084F817A0D2E709EB06000180428084F8AC\n:101F900017B0CCE770B5044600F12802C088E37D95\n:101FA00020F400402BB110440288438813448B4234\n:101FB00001D2002070BD00258A4202D301804580F5\n:101FC00008E0891A0904090C418003D0A01D00F023\n:101FD0001EFB08E0637F00880833184481B26288E2\n:101FE000A01DFFF73FFFE575012070BD70B50346EA\n:101FF00000F12804C588808820F400462644A842C1\n:1020000002D10020188270BD98893588A84206D375\n:10201000401B75882D1A2044ADB2C01E05E02C1A55\n:10202000A5B25C7F20443044401D0C88AC4200D9EE\n:102030000D809C8924B1002414700988198270BD18\n:102040000124F9E770B5044600F12801808820F4E6\n:1020500000404518208A002825D0A189084480B274\n:10206000A08129886A881144814200D2FFDF288834\n:10207000698800260844A189884212D1A069807F1E\n:102080002871698819B1201D00F0C1FA08E0637F4A\n:1020900028880833184481B26288201DFFF7E2FEC9\n:1020A000A6812682012070BD2DE9F04141898788F3\n:1020B0000026044600F12805B94218D004F10A08A8\n:1020C00021F400402844418819B1404600F09FFAAD\n:1020D00008E0637F00880833184481B26288404674\n:1020E000FFF7C0FE761C6189B6B2B942E8D130462E\n:1020F000BDE8F0812DE9F04104460B4627892830E0\n:10210000A68827F40041B4F80A8001440D46B7427E\n:1021100001D10020ECE70AB1481D106023B1627FB5\n:10212000691D184613F02AFA2E88698804F1080000\n:1021300021B18A1996B200F06AFA06E0637F6288DC\n:102140000833991989B2FFF78DFE474501D12089DF\n:1021500060813046CCE78188C088814201D101206E\n:1021600070470020704701898088814201D1012099\n:1021700070470020704770B58588C38800F1280437\n:1021800025F4004223F4004114449D421AD083896F\n:10219000058A5E1925886388EC18A64214D313B10A\n:1021A0008B4211D30EE0437F08325C1922444088F1\n:1021B00092B2801A80B22333984201D211B103E067\n:1021C0008A4201D1002070BD012070BD2DE9F04789\n:1021D0008846C1880446008921F4004604F1280796\n:1021E00020F4004507EB060900F001FA002178BB56\n:1021F000B54204D9627FA81B801A002503E06088DD\n:10220000627F801B801A083823D4E28962B1B9F852\n:102210000020B9F802303BB1E81A2177404518DBBD\n:10222000E0893844801A09E0801A217740450ADBAA\n:10223000607FE1890830304439440844C01EA4F866\n:102240001280BDE8F087454503DB01202077E7E7F2\n:10225000FFE761820020F4E72DE9F74F044600F123\n:102260002805C088884620F4004A608A05EB0A06E3\n:1022700008B1404502D20020BDE8FE8FE08978B168\n:102280003788B6F8029007EB0901884200D0FFDFDB\n:10229000207F4FF0000B50EA090106D088B33BE0E5\n:1022A0000027A07FB9463071F2E7E18959B1607F1C\n:1022B0002944083050440844B4F81F1020F8031D86\n:1022C00094F821108170E28907EB080002EB080105\n:1022D000E1813080A6F802B002985F4650B1637F7A\n:1022E00030880833184481B26288A01DFFF7BAFD18\n:1022F000E78121E0607FE1890830504429440844A7\n:102300002DE0FFE7E089B4F81F102844C01B20F837\n:10231000031D94F82110817009EB0800E28981B255\n:1023200002EB0800E081378071800298A0B1A01D07\n:1023300000F06DF9A4F80EB0A07F401CA077A07D3E\n:1023400008B1E088A08284F816B000BFA4F812B0EB\n:1023500084F817B001208FE7E0892844C01B30F8CB\n:10236000031DA4F81F10807884F82100EEE710B553\n:10237000818800F1280321F400442344848AC28820\n:10238000A14212D0914210D0818971B9826972B193\n:102390001046FFF7E8FE50B91089283220F40040BB\n:1023A000104419790079884201D1002010BD1846E7\n:1023B00010BD00F12803407F08300844C01E1060A3\n:1023C000088808B9DB1E136008884988084480B271\n:1023D00070472DE9F04100F12806407F1C46083087\n:1023E0009046431808884D88069ADB1EA0B1C01C91\n:1023F00080B2904214D9801AA04200DB204687B2F6\n:1024000098183A46414613F08DF8002816D1E01B83\n:1024100084B2B844002005E0ED1CADB2F61EE8E73A\n:10242000101A80B20119A94206D83044224641460A\n:10243000BDE8F04113F076B84FF0FF3058E62DE9D3\n:10244000F04100F12804407F1E46083090464318B2\n:10245000002508884F88069ADB1E90B1C01C80B208\n:10246000904212D9801AB04200DB304685B29918EA\n:102470002A46404613F082F8701B86B2A84400201A\n:1024800005E0FF1CBFB2E41EEAE7101A80B2811912\n:10249000B94206D821183246404613F06FF8A81901\n:1024A00085B2284624E62DE9F04100F12804407F5A\n:1024B0001E46083090464318002508884F88069A23\n:1024C000DB1E90B1C01C80B2904212D9801AB0427B\n:1024D00000DB304685B298182A46414613F04EF884\n:1024E000701B86B2A844002005E0FF1CBFB2E41EAA\n:1024F000EAE7101A80B28119B94206D82044324660\n:10250000414613F03BF8A81985B22846F0E5401D76\n:10251000704710B5044600F12801C288808820F475\n:1025200000431944904206D0A28922B9228A12B9E6\n:10253000A28A904201D1002010BD0888498831B19B\n:10254000201D00F064F800202082012010BD637F70\n:1025500062880833184481B2201DFFF783FCF2E73C\n:102560000021C18101774182C1758175704703885F\n:102570001380C28942B1C28822F4004300F12802CC\n:102580001A440A60C08970470020704710B504469D\n:10259000808AA0F57F41FF3900D0FFDFE088A0826C\n:1025A000E08900B10120A07510BD4FF6FF71818256\n:1025B00000218175704710B50446808AA0F57F41DF\n:1025C000FF3900D1FFDFA07D28B9A088A18A884209\n:1025D00001D1002010BD012010BD8188828A914266\n:1025E00001D1807D08B1002070470120704720F4A0\n:1025F000004221F400439A4207D100F4004001F464\n:102600000041884201D0012070470020704730B55A\n:10261000044600880D4620F40040A84200D2FFDFA7\n:1026200021884FF4004088432843208030BD70B596\n:102630000C00054609D0082C00D2FFDF1DB1A1B265\n:10264000286800F044F8201D70BD0DB100202860FE\n:10265000002070BD0021026803E0938812681944CD\n:1026600089B2002AF9D100F032B870B500260D46C3\n:102670000446082900D2FFDF206808B91EE004469E\n:1026800020688188A94202D001680029F7D1818899\n:102690000646A94201D100680DE005F1080293B297\n:1026A0000022994209D32844491B02608180216895\n:1026B000096821600160206000E00026304670BD9E\n:1026C00000230B608A8002680A6001607047002363\n:1026D0004360021D018102607047F0B50F4601881A\n:1026E000408815460C181E46AC4200D3641B30448B\n:1026F000A84200D9FFDFA019A84200D9FFDF38198E\n:10270000F0BD2DE9F041884606460188408815460F\n:102710000C181F46AC4200D3641B3844A84200D9B1\n:10272000FFDFE019A84200D9FFDF708838447080CD\n:1027300008EB0400BDE8F0812DE9F0410546008872\n:102740001E461746841B8846BC4200D33C442C805E\n:1027500068883044B84200D9FFDFA019B84200D9D8\n:10276000FFDF68883044688008EB0400E2E72DE969\n:10277000F04106881D460446701980B21746884607\n:102780002080B84201D3C01B20806088A84200D2BC\n:10279000FFDF7019B84200D9FFDF6088401B6080FE\n:1027A00008EB0600C6E730B50D460188CC18944208\n:1027B00000D3A41A4088984200D8FFDF281930BD02\n:1027C0002DE9F041C84D04469046A8780E46A04237\n:1027D00000D8FFDF05EB8607B86A50F8240000B187\n:1027E000FFDFB868002816D0304600F044F90146F3\n:1027F000B868FFF73AFF05000CD0B86A082E40F819\n:10280000245000D3FFDFB9484246294650F826300D\n:10281000204698472846BDE8F0812DE9F8431E463A\n:102820008C1991460F460546FF2C00D9FFDFB145B4\n:1028300000D9FFDFE4B200954DB300208046E81CCC\n:1028400020F00300A84200D0FFDF4946DFF898924D\n:10285000684689F8001089F8017089F8024089F803\n:10286000034089F8044089F8054089F8066089F832\n:102870000770414600F008F9002142460F464B46DA\n:102880000098C01C20F00300009012B10EE001205F\n:10289000D4E703EB8106B062002005E0D6F828C03B\n:1028A0004CF82070401CC0B2A042F7D30098491CDD\n:1028B00000EB8400C9B200900829E1D3401BBDE8B9\n:1028C000F88310B50446EEF724FD08B1102010BDC2\n:1028D0002078854A618802EB800092780EE0836A56\n:1028E00053F8213043B14A1C6280A180806A50F8BD\n:1028F0002100A060002010BD491C89B28A42EED898\n:102900006180052010BD70B505460C460846EEF7FF\n:1029100000FD08B1102070BD082D01D3072070BD47\n:1029200025700020608070BD0EB56946FFF7EBFF93\n:1029300000B1FFDF6846FFF7C4FF08B100200EBDFD\n:1029400001200EBD10B50446082800D3FFDF6648FD\n:10295000005D10BD3EB5054600246946FFF7D3FF74\n:1029600018B1FFDF01E0641CE4B26846FFF7A9FF7D\n:102970000028F8D02846FFF7E5FF001BC0B23EBD97\n:1029800059498978814201D9C0B27047FF20704708\n:102990002DE9F041544B062903D007291CD19D791C\n:1029A00000E0002500244FF6FF7603EB810713F8C3\n:1029B00001C00AE06319D7F828E09BB25EF823E073\n:1029C000BEF1000F04D0641CA4B2A445F2D8334673\n:1029D00003801846B34201D100201CE7BDE8F04156\n:1029E000EEE6A0F57F43FF3B01D0082901D300208C\n:1029F0007047E5E6A0F57F42FF3A0BD0082909D2DF\n:102A0000394A9378834205D902EB8101896A51F8EA\n:102A100020007047002070472DE9F04104460D4624\n:102A2000A4F57F4143F20200FF3902D0082D01D303\n:102A30000720F0E62C494FF000088A78A242F8D926\n:102A400001EB8506B26A52F82470002FF1D02748B6\n:102A50003946203050F8252020469047B16A284654\n:102A600041F8248000F007F802463946B068FFF7C5\n:102A700027FE0020CFE61D49403131F810004FF607\n:102A8000FC71C01C084070472DE9F843164E88467B\n:102A9000054600242868C01C20F00300286020465A\n:102AA000FFF7E9FF315D4843B8F1000F01D0002284\n:102AB00000E02A680146009232B100274FEA0D007B\n:102AC000FFF7B5FD1FB106E001270020F8E706EB90\n:102AD0008401009A8A602968641C0844E4B2286072\n:102AE000082CD7D3EBE6000008080020445B020066\n:102AF00070B50E461D46114600F0D4F8044629462E\n:102B0000304600F0D8F82044001D70BD2DE9F0419A\n:102B100090460D4604004FF0000610D00027E01C40\n:102B200020F00300A04200D0FFDFDDB141460020CD\n:102B3000FFF77DFD0C3000EB850617B112E0012791\n:102B4000EDE7614F04F10C00A9003C602572606064\n:102B500000EB85002060606812F0B1FD41463868E6\n:102B6000FFF765FD3046BDE8F0812DE9FF4F564C7B\n:102B7000804681B020689A46934600B9FFDF2068FE\n:102B8000027A424503D9416851F8280020B143F246\n:102B9000020005B0BDE8F08F5146029800F082F8BF\n:102BA00086B258460E9900F086F885B27019001D5D\n:102BB00087B22068A14639460068FFF756FD040039\n:102BC0001FD0678025802946201D0E9D07465A4646\n:102BD00001230095FFF768F9208831463844012326\n:102BE000029ACDF800A0FFF75FF92088C119384696\n:102BF000FFF78AF9D9F800004168002041F8284021\n:102C0000C7E70420C5E770B52F4C0546206800B91A\n:102C1000FFDF2068017AA9420ED9426852F82510D8\n:102C200051B1002342F825304A880068FFF748FD7B\n:102C3000216800200A7A08E043F2020070BD4B6868\n:102C400053F8203033B9401CC0B28242F7D808682C\n:102C5000FFF700FD002070BD70B51B4E0546002437\n:102C6000306800B9FFDF3068017AA94204D94068B2\n:102C700050F8250000B1041D204670BD70B5124EFD\n:102C800005460024306800B9FFDF3068017AA942A8\n:102C900006D9406850F8251011B131F8040B4418DA\n:102CA000204670BD10B50A460121FFF7F6F8C01C9A\n:102CB00020F0030010BD10B50A460121FFF7EDF822\n:102CC000C01C20F0030010BD8000002070B5044639\n:102CD000C2F11005281912F051FC15F0FF0108D0BF\n:102CE000491EC9B2802060542046BDE8704012F0F1\n:102CF000C4BC70BD30B505E05B1EDBB2CC5CD55CFE\n:102D00006C40C454002BF7D130BD10B5002409E04D\n:102D10000B78521E44EA430300F8013B11F8013BD3\n:102D2000D2B2DC09002AF3D110BD2DE9F04389B0FD\n:102D30001E46DDE9107990460D00044622D0024679\n:102D40000846F949FDF7BAFC102221463846FFF73C\n:102D5000DCFFE07B000606D5F34A3946102310322B\n:102D60000846FFF7C7FF102239464846FFF7CDFF58\n:102D7000F87B000606D5EC4A494610231032084677\n:102D8000FFF7B8FF1021204612F077FC0DE0103E4F\n:102D9000B6B208EB0601102322466846FFF7AAFFE9\n:102DA000224628466946FDF789FC102EEFD818D038\n:102DB000F2B241466846FFF789FF10234A4669464A\n:102DC00004A8FFF797FF1023224604A96846FFF7DF\n:102DD00091FF224628466946FDF770FC09B0BDE820\n:102DE000F08310233A464146EAE770B59CB01E4690\n:102DF0000546134620980C468DF8080020221946F7\n:102E00000DF1090012F0BAFB202221460DF1290034\n:102E100012F0B4FB17A913A8CDE90001412302AABF\n:102E200031462846FFF781FF1CB070BD2DE9FF4FEA\n:102E30009FB014AEDDE92D5410AFBB49CDE900764B\n:102E4000202320311AA8FFF770FF4FF000088DF8FB\n:102E500008804FF001098DF8099054F8010FCDF862\n:102E60000A00A088ADF80E0014F8010C1022C0F37F\n:102E700040008DF8100055F8010FCDF81100A8881A\n:102E8000ADF8150015F8010C2C99C0F340008DF831\n:102E9000170006A8824612F071FB0AA8834610228A\n:102EA000229912F06BFBA0483523083802AA40682B\n:102EB0008DF83C80CDE900760E901AA91F98FFF797\n:102EC00034FF8DF808808DF809902068CDF80A004D\n:102ED000A088ADF80E0014F8010C1022C0F34000D9\n:102EE0008DF810002868CDF81100A888ADF81500FD\n:102EF00015F8010C2C99C0F340008DF817005046CE\n:102F000012F03CFB58461022229912F037FB8648FB\n:102F10003523083802AA40688DF83C90CDE9007648\n:102F20000E901AA92098FFF700FF23B0BDE8F08F9C\n:102F3000F0B59BB00C460546DDE922101E4617464B\n:102F4000DDE92032D0F801C0CDF808C0B0F805C0E6\n:102F5000ADF80CC00078C0F340008DF80E00D1F839\n:102F60000100CDF80F00B1F80500ADF813000878A6\n:102F70001946C0F340008DF815001088ADF8160012\n:102F800090788DF818000DF11900102212F0F6FA61\n:102F90000DF129001022314612F0F0FA0DF139003E\n:102FA0001022394612F0EAFA17A913A8CDE9000158\n:102FB000412302AA21462846FFF7B7FE1BB0F0BD09\n:102FC000F0B5A3B017460D4604461E46102202A8CF\n:102FD000289912F0D3FA06A82022394612F0CEFA28\n:102FE0000EA82022294612F0C9FA1EA91AA8CDE976\n:102FF0000001502302AA314616A8FFF796FE169844\n:10300000206023B0F0BDF0B589B00446DDE90E07BD\n:103010000D463978109EC1F340018DF800103178CB\n:103020009446C1F340018DF801101968CDF80210E3\n:103030009988ADF8061099798DF808100168CDF8D7\n:1030400009108188ADF80D1080798DF80F001023DC\n:103050006A46614604A8FFF74DFE2246284604A9A9\n:10306000FDF72CFBD6F801000090B6F80500ADF88E\n:103070000400D7F80100CDF80600B7F80500ADF858\n:103080000A000020039010236A46214604A8FFF797\n:1030900031FE2246284604A9FDF710FB09B0F0BD19\n:1030A0001FB51C6800945B68019313680293526813\n:1030B0000392024608466946FDF700FB1FBD10B5A6\n:1030C00088B004461068049050680590002006906F\n:1030D000079008466A4604A9FDF7F0FABDF800001B\n:1030E000208008B010BD1FB51288ADF800201A88E6\n:1030F000ADF8022000220192029203920246084695\n:103100006946FDF7DBFA1FBD7FB5074B1446054640\n:10311000083B9A1C6846FFF7E6FF224669462846A8\n:10312000FFF7CDFF7FBD00009C5B020070B5044639\n:1031300000780E46012813D0052802D0092813D1A3\n:103140000EE0A06861690578042003F075F9052D8B\n:103150000AD0782300220420616903F0C3F803E059\n:103160000420616903F068F931462046BDE87040EB\n:1031700001F084B810B500F12D03C2799C78411D8F\n:10318000144064F30102C271D2070DD04A795C7910\n:1031900022404A710A791B791A400A718278C978EB\n:1031A0008A4200D9817010BD00224A71F5E741784A\n:1031B000012900D00C21017070472DE9F04F93B028\n:1031C0004FF0000B0C690D468DF820B009780126F0\n:1031D0000C2017464FF00D084FF0110A4FF0080968\n:1031E0001B2975D2DFE811F01B00C20205031D0385\n:1031F0005C036F03A103B603F70318046004920491\n:103200009F04EB042905330551055C05ED053006E7\n:10321000330662067E06F8061C07E506EA0614B1C8\n:1032200020781D282AD0D5F808805FEA08004FD002\n:1032300001208DF82000686A02220D908DF824206C\n:103240000A208DF82500A8690A90A8880028EED0E9\n:1032500098F8001091B10F2910D27DD2DFE801F06B\n:103260007C1349DEFCFBFAF9F8F738089CF6F50008\n:1032700002282DD124B120780C2801D00026EEE3BD\n:103280008DF82020CAE10420696A03F0D5F8A888E7\n:103290000728EED1204600F0ECFF022809D0204696\n:1032A00000F0E7FF032807D9204600F0E2FF0728D7\n:1032B00002D20120207004E0002CB8D02078012830\n:1032C000D7D198F80400C11F0A2902D30A2061E06F\n:1032D000C3E1A070D8F80010E162B8F804102186AC\n:1032E00098F8060084F8320001202870032020702E\n:1032F00044E00728BDD1002C99D020780D28B8D102\n:1033000098F8031094F82F20C1F3C000C2F3C00254\n:10331000104201D0062000E00720890707D198F865\n:1033200005100142D2D198F806100142CED194F88E\n:10333000312098F8051020EA02021142C6D194F813\n:10334000322098F8061090430142BFD198F804004B\n:10335000C11F0A29BAD200E006E2617D81427CD811\n:10336000D8F800106160B8F80410218198F80600C0\n:10337000A072012028700E20207003208DF82000FC\n:10338000686A0D9004F12D000990601D0A900F30BD\n:103390000B9021E12875FDE3412891D1204600F0F2\n:1033A00068FF042802D1E078C00704D1204600F06D\n:1033B00060FF0F2884D1A88CD5F80C8080B24FF024\n:1033C000400BE669FFF748FC324641465B464E46F5\n:1033D000CDF80090FFF733F80B208DF82000686AD5\n:1033E0000D90E0690990002108A8FFF79FFE207862\n:1033F000042806D0A07D58B1012809D003280AD09E\n:1034000048E305202070032028708DF82060CCE16F\n:1034100084F800A032E712202070E8E11128BCD126\n:10342000204600F026FF042802D1E078C00719D01A\n:10343000204600F01EFF062805D1E078C00711D114\n:10344000A07D02280ED0204608E0CBE084E070E1A9\n:103450004FE122E102E1E8E019E0AEE100F009FF0E\n:1034600011289AD1102208F1010104F13C0012F058\n:1034700085F8607801286ED012202070E078C007AF\n:1034800060D0A07D0028C8D00128C6D05AE01128FD\n:1034900090D1204600F0EDFE082804D0204600F030\n:1034A000E8FE132886D104F16C00102208F1010116\n:1034B000064612F063F8207808280DD014202070FA\n:1034C000E178C8070DD0A07D02280AD06278022AD0\n:1034D00004D00328A1D035E00920F0E708B1012885\n:1034E00037D1C80713D0A07D02281DD0002000903E\n:1034F000D4E9062133460EA8FFF777FC10220EA967\n:1035000004F13C0012F00EF8C8B1042042E7D4E9FF\n:103510000912201D8DE8070004F12C0332460EA885\n:10352000616BFFF770FDE9E7606BC1F34401491E71\n:103530000068C84000F0010040F08000D7E7207824\n:10354000092806D185F800908DF8209032E3287084\n:10355000EBE30920FBE79CE1112899D1204600F01C\n:1035600088FE0A2802D1E078C00704D1204600F086\n:1035700080FE15288CD104F13C00102208F10101D5\n:10358000064611F0FBFF20780A2816D0162020707E\n:10359000D4E90932606B611D8DE80F0004F15C0312\n:1035A00004F16C0247310EA8FFF7C2FC10220EA9ED\n:1035B000304611F0B7FF18B1F6E20B20207071E22F\n:1035C0002046FFF7D7FDA078216A0A18C0F1100144\n:1035D000104612F052F823E3394608A8FFF7A6FD7B\n:1035E00006463BE20228B8D1204600F042FE0428FD\n:1035F00004D3204600F03DFE082809D3204600F001\n:1036000038FE0E2829D3204600F033FE122824D29B\n:10361000A07D0228A1D10E208DF82000686A0D90AF\n:1036200098F801008DF82400F0E3022895D1204697\n:1036300000F01FFE002810D0204600F01AFE0128DE\n:10364000F9D0204600F015FE0C28F4D004208DF8A7\n:10365000240098F801008DF825005EE21128FCD1C5\n:10366000002CFAD020781728F7D16178606A0229F7\n:1036700011D0002101EB4101182606EBC1011022F7\n:10368000405808F1010111F079FF0420696A00F047\n:10369000E3FD2670F2E50121ECE70B28DDD1002CDB\n:1036A000DBD020781828D8D16078616A02281CD035\n:1036B0005FF0000000EB4002102000EBC200095850\n:1036C000B8F8010008806078616A02280FD00020F5\n:1036D00000EB4002142000EBC2000958404650F8AD\n:1036E000032F0A604068486039E00120E2E70120CA\n:1036F000EEE71128B1D1002CAFD020781928ACD139\n:103700006178606A022912D05FF0000101EB41018B\n:103710001C2202EBC1011022405808F1010111F0F6\n:103720002DFF0420696A00F097FD1A20B6E0012100\n:10373000ECE7082891D1002C8FD020781A288CD162\n:10374000606A98F80120017862F347010170616AAC\n:10375000D8F8022041F8012FB8F80600888004202C\n:10376000696A00F079FD8EE2072013E638780128B7\n:1037700094D1182204F11400796811F044FFE07923\n:10378000C10894F82F0001EAD001E07861F300004D\n:10379000E070217D002974D12178032909D0C00768\n:1037A00025D0032028708DF82090686A0D90412064\n:1037B00004E3607DA178884201D90620EAE502266B\n:1037C0002671E179204621F0E001E171617A21F072\n:1037D000F0016172A17A21F0F001A172FFF7CAFC39\n:1037E0002E708DF82090686A0D900720E6E2042084\n:1037F000ADE6387805289DD18DF82000686A0D90D7\n:10380000B8680A900720ADF824000A988DF830B007\n:103810006168016021898180A17A81710420207012\n:10382000F4E23978052985D18DF82010696A0D9167\n:10383000391D09AE0EC986E80E004121ADF82410ED\n:103840008DF830B01070A88CD7F80C8080B240266C\n:10385000A769FFF713FA41463A463346C846CDF802\n:103860000090FEF720FE002108A8FFF75FFCE0783B\n:1038700020F03E00801CE0702078052802D00F2048\n:103880000CE049E1A07D20B1012802D0032802D03C\n:1038900002E10720C0E584F80080EFE42070EDE449\n:1038A000102104F15C0002F0E8FA606BB0BBA07D6F\n:1038B00018B1012801D00520FDE006202870F74846\n:1038C0006063A063BEE23878022894D1387908B1E9\n:1038D0002875B3E3A07D022802D0032805D022E09A\n:1038E000B8680028F5D060631CE06078012806D035\n:1038F000A07994F82E10012805D0E84806E0A179B7\n:1039000094F82E00F7E7B8680028E2D06063E0780A\n:10391000C00701D0012902D0E04803E003E0F868C5\n:103920000028D6D0A063062011E68DF82090696AA1\n:103930000D91E1784846C90709D06178022903D181\n:10394000A17D29B1012903D0A17D032900D0072041\n:10395000287031E138780528BBD1207807281ED09F\n:1039600084F800A005208DF82000686A0D90B868E2\n:103970000A90ADF824A08DF830B003210170E178F1\n:10398000CA070FD0A27D022A1AD000210091D4E9E3\n:10399000061204F15C03401CFFF727FA67E384F882\n:1039A0000090DFE7D4E90923211D8DE80E0004F122\n:1039B0002C0304F15C02401C616BFFF724FB56E30F\n:1039C000626BC1F34401491E1268CA4002F0010152\n:1039D00041F08001DAE738780528BDD18DF8200064\n:1039E000686A0D90B8680A90ADF824A08DF830B0E0\n:1039F000042100F8011B102204F15C0111F0BEFD4E\n:103A0000002108A8FFF792FB2078092801D0132095\n:103A100044E70A2020709CE5E078C10742D0A17DF0\n:103A2000012902D0022927D038E0617808A80129AD\n:103A300016D004F16C010091D4E9061204F15C0384\n:103A4000001DFFF7BDFA0A20287003268DF820809C\n:103A5000686A0D90002108A8FFF768FBDDE2C3E269\n:103A600004F15C010091D4E9062104F16C03001D0E\n:103A7000FFF7A6FA0026E9E7C0F3440114290DD2A6\n:103A80004FF0006101EBB0104FEAB060E070607879\n:103A9000012801D01020BFE40620FFE6607801284D\n:103AA0003FF4B8AC0A2052E5E178C90708D0A17DFF\n:103AB000012903D10B20287004202FE028702DE06D\n:103AC0000E2028706078616B012817D004F15C0328\n:103AD00004F16C020EA8FFF7E3FA2046FFF74AFB59\n:103AE000A0780EAEC0F11001304411F0C6FD0620E2\n:103AF0008DF82000686A09960D909AE004F16C0335\n:103B000004F15C020EA8FFF7CBFAE9E73978022945\n:103B100003D139790029D1D029758FE28DF82000A1\n:103B2000686A0D9058E538780728F6D1D4E909215C\n:103B30006078012809D000BF04F16C00CDE90002D3\n:103B4000029105D104F16C0304E004F15C00F5E797\n:103B500004F15C0304F14C007A680646216AFFF721\n:103B600065F96078012821D1A078216A0A18C0F18E\n:103B70001001104611F081FDD4E90923606B04F1B6\n:103B80002D018DE80F0004F15C0304F16C02314655\n:103B90000EA800E054E2FFF7CBF910220EA904F1C1\n:103BA0003C0011F0BFFC08B10B20AFE485F80080A9\n:103BB0008DF82090686A0D908DF824A00CE5387877\n:103BC0000528AAD18DF82000686A0D90B8680A907F\n:103BD000ADF824A08DF830B080F80080617801291C\n:103BE0001AD0D4E9093204F12D01A66B0392009694\n:103BF000CDE9011304F16C0304F15C0204F14C0102\n:103C0000401CFFF795F9002108A8FFF78FFA6078AC\n:103C1000012805D0152041E6D4E90923611DE4E718\n:103C20000E20287006208DF82000686ACDF824B098\n:103C30000D90A0788DF82800CEE438780328C0D104\n:103C4000E079C00770D00F202870072066E7387829\n:103C500004286BD11422391D04F1140011F0D3FC97\n:103C6000616A208CA1F80900616AA078C871E179C5\n:103C7000626A01F003011172616A627A0A73616A11\n:103C8000A07A81F82400162061E485F800A08DF860\n:103C90002090696A50460D9190E000009C5B020004\n:103CA0003878052842D1B868A8616178606A02292D\n:103CB00001D0012100E0002101EB4101142606EBB7\n:103CC000C1014058082102F0D8F86178606A0229E1\n:103CD00001D0012100E0002101EB410106EBC1010F\n:103CE000425802A8E169FFF70FFA6078626A022879\n:103CF00001D0012000E0002000EB4001102000EB8B\n:103D0000C1000223105802A90932FEF7F3FF626ACC\n:103D1000FD4B0EA80932A169FFF7E5F96178606AE9\n:103D2000022904D0012103E042E18BE0BDE0002143\n:103D300001EB4101182606EBC101A27840580EA9FB\n:103D400011F01CFC6178606A022901D0012100E0B9\n:103D5000002101EB410106EBC1014058A178084464\n:103D6000C1F1100111F089FC05208DF82000686A6E\n:103D70000D90A8690A90ADF824A08DF830B0062106\n:103D800001706278616A022A01D0012200E00022FB\n:103D900002EB420206EBC202401C8958102211F0CD\n:103DA000EDFB002108A8FFF7C1F91220C5F818B0F3\n:103DB00028708DF82090686A0D900B208DF82400F3\n:103DC0000AE43878052870D18DF82000686A0D90D3\n:103DD000B8680A900B20ADF824000A9807210170FA\n:103DE0006178626A022901D0012100E0002101EB23\n:103DF0004103102101EBC30151580988A0F80110BB\n:103E00006178626A022902D0012101E02FE10021DC\n:103E100001EB4103142101EBC30151580A6840F83A\n:103E2000032F4968416059E01920287001208DF85E\n:103E3000300077E6162028708DF830B0002108A8F1\n:103E4000FFF774F9032617E114202870B0E63878DC\n:103E500005282AD18DF82000686A0D90B8680A906C\n:103E6000ADF824A08DF830B080F800906278616AD7\n:103E70004E46022A01D0012200E0002202EB42025B\n:103E80001C2303EBC202401C8958102211F076FB60\n:103E9000002108A8FFF74AF9152028708DF8206046\n:103EA000686A0D908DF824603CE680E0387805283B\n:103EB0007DD18DF82000686A0D90B8680A90ADF841\n:103EC000249009210170616909784908417061698C\n:103ED00051F8012FC0F802208988C18020781C2861\n:103EE000A8D1A1E7E078C00702D04FF0060C01E0AE\n:103EF0004FF0070C607802280AD000BF4FF0000096\n:103F000000EB040101F1090105D04FF0010004E0CC\n:103F10004FF00100F4E74FF000000B78204413EA63\n:103F20000C030B7010F8092F02EA0C02027004D186\n:103F30004FF01B0C84F800C0D2B394F801C0BCF160\n:103F4000010F00D09BB990F800C0E0465FEACC7C3E\n:103F500004D028F001060670102606E05FEA887C8F\n:103F600005D528F00206067013262E70032694F855\n:103F700001C0BCF1020F00D092B991F800C05FEA15\n:103F8000CC7804D02CF001060E70172106E05FEA11\n:103F90008C7805D52CF002060E70192121700026B0\n:103FA0000078D0BBCAB3C3BB1C20207035E012E040\n:103FB00002E03878062841D11A2019E42078012837\n:103FC0003CD00C283AD02046FFF7F1F809208DF8B4\n:103FD0002000686A0D9031E03878052805D0062069\n:103FE000387003261820287046E005218DF820102F\n:103FF000686A0D90B8680A900220ADF8240001208C\n:104000008DF830000A980170297D4170394608A862\n:10401000FFF78CF8064618202870012E0ED02BE0F2\n:1040200001208DF82000686A0D9003208DF824008F\n:10403000287D8DF8250085F814B012E0287D80B128\n:104040001D202070172028708DF82090686A0D9030\n:1040500002208DF82400394608A8FFF767F80646C5\n:104060000AE00CB1FE2020709DF8200020B1002154\n:1040700008A8FFF75BF810E413B03046BDE8F08FF6\n:104080002DE9F04387B00C464E6900218DF80410ED\n:1040900001202578034602274FF007094FF0050C51\n:1040A00085B1012D53D0022D39D1FE2030708DF80D\n:1040B0000030606A059003208DF80400207E8DF8A2\n:1040C000050063E02179012925D002292DD003299B\n:1040D00028D0042923D1B17D022920D131780D1FA8\n:1040E000042D04D30A3D032D01D31D2917D12189A5\n:1040F000022914D38DF80470237020899DF80410D0\n:1041000088421BD2082001E0945B02008DF8000079\n:10411000606A059057E070780128EBD0052007B061\n:10412000BDE8F0831D203070E4E771780229F5D1F5\n:1041300031780C29F3D18DF80490DDE7083402F8CA\n:1041400004CB94E80B0082E80B000320E7E7157826\n:10415000052DE4D18DF800C0656A05959568029536\n:104160008DF8101094F80480B8F1010F13D0B8F155\n:10417000020F2DD0B8F1030F1CD0B8F1040FCED12F\n:10418000ADF804700E202870207E6870002168460B\n:10419000FEF7CCFF0CE0ADF804700B202870207EF9\n:1041A000002100F01F0068706846FEF7BFFF3770FF\n:1041B0000020B4E7ADF804708DF8103085F800C029\n:1041C000207E6870277011466846FEF7AFFFA6E7AD\n:1041D000ADF804902B70207F6870607F00F00100C4\n:1041E000A870A07F00F01F00E870E27F2A71C0076E\n:1041F0001CD094F8200000F00700687194F82100AA\n:1042000000F00700A87100216846FEF78FFF2868BC\n:10421000F062A8883086A87986F83200A0694078D4\n:1042200070752879B0700D203070C1E7A97169717F\n:10423000E9E700B587B004280CD101208DF8000013\n:104240008DF80400002005918DF8050001466846B0\n:10425000FEF76CFF07B000BD70B50C46054602F0D6\n:10426000EBF821462846BDE870407823002202F092\n:1042700039B808B1007870470C20704770B50C0051\n:1042800005784FF000010CD021702146F0F7D9FFDE\n:1042900069482178405D884201D1032070BD022029\n:1042A00070BDF0F7CEFF002070BD0279012A05D065\n:1042B00000220A704B78012B02D003E004207047E3\n:1042C0000A758A6102799300521C0271C150032061\n:1042D0007047F0B587B00F4605460124287905EBF5\n:1042E000800050F8046C7078411E02290AD25249AD\n:1042F0003A46083901EB8000314650F8043C284624\n:10430000984704460CB1012C11D12879401E10F0B9\n:10431000FF00287101D00324E0E70A208DF8000097\n:10432000706A0590002101966846FFF7A7FF032CED\n:10433000D4D007B02046F0BD70B515460A460446F5\n:1043400029461046FFF7C5FF064674B12078FE28BF\n:104350000BD1207C30B100202870294604F10C00DC\n:10436000FFF7B7FF2046FEF722FF304670BD7047CB\n:1043700070B50E4604467C2111F0A1F90225012EEC\n:1043800003D0022E04D0052070BD0120607000E033\n:1043900065702046FEF70BFFA575002070BD28B1A3\n:1043A000027C1AB10A4600F10C01C5E701207047F2\n:1043B00010B5044686B0042002F03EF82078FE28AE\n:1043C00006D000208DF8000069462046FFF7E7FF81\n:1043D00006B010BD7CB50E4600218DF80410417862\n:1043E000012903D0022903D0002405E0046900E07C\n:1043F00044690CB1217C89B16D4601462846FFF71E\n:1044000054FF032809D1324629462046FFF794FF7E\n:104410009DF80410002900D004207CBD04F10C0597\n:10442000EBE730B40C460146034A204630BC034B50\n:104430000C3AFEF758BE0000D85B0200945B020005\n:1044400070B50D46040011D085B12101284611F048\n:1044500014F910225449284611F090F852480121CD\n:104460000838018044804560002070BD012070BD87\n:1044700070B54D4E00240546083E10E07068AA7BDA\n:1044800000EB0410817B914208D1C17BEA7B914211\n:1044900004D10C22294611F045F830B1641C308853\n:1044A0008442EBDB4FF0FF3070BD204670BD70B52D\n:1044B0000D46060006D02DB1FFF7DAFF002803DB1A\n:1044C000401C14E0102070BD374C083C20886288E6\n:1044D000411C914201D9042070BD6168102201EB9A\n:1044E0000010314611F04AF82088401C20802870C6\n:1044F000002070BD2C480838008870472A490839C8\n:104500000888012802D0401E08800020704770B53E\n:1045100014460D0018D0BCB10021A170022802D0B1\n:10452000102811D105E0288870B10121A1701080F8\n:1045300008E02846FFF79CFF002805DB401CA07020\n:10454000A8892080002070BD012070BD70B505468F\n:1045500014460E000BD000203070A878012808D037\n:1045600005D91149A1F108010A8890420AD9012010\n:1045700070BD24B1287820702888000A507002206D\n:1045800008700FE064B14968102201EB0011204669\n:10459000103910F0F3FF287820732888000A607320\n:1045A00010203070002070BD8C0000202DE9F041FB\n:1045B00090460C4607460025FE48072F00EB88165C\n:1045C00007D2DFE807F00707070704040400012506\n:1045D00000E0FFDF06F81470002D13D0F54880309E\n:1045E00000EB880191F82700202803D006EB40005B\n:1045F000447001E081F8264006EB44022020507010\n:1046000081F82740BDE8F081F0B51F4614460E46FC\n:104610000546202A00D1FFDFE649E648803100EB5D\n:10462000871C0CEB440001EB8702202E07D00CEB1B\n:10463000460140784B784870184620210AE092F8ED\n:104640002530407882F82500F6E701460CEB410062\n:1046500005704078A142F8D192F82740202C03D071\n:104660000CEB4404637001E082F826300CEB41044B\n:104670002023637082F82710F0BD30B50D46CE4B75\n:1046800044190022181A72EB020100D2FFDFCB4856\n:10469000854200DDFFDFC9484042854200DAFFDF86\n:1046A000C548401C844207DA002C01DB204630BD9F\n:1046B000C148401C201830BDBF48C043FAE710B5C0\n:1046C00004460168407ABE4A52F82020114450B195\n:1046D0000220084420F07F40EEF7AFFA94F908106A\n:1046E000BDE81040C9E70420F3E72DE9F047B14EDB\n:1046F000803696F82D50DFF8BC9206EB850090F8D6\n:10470000264034E009EB85174FF0070817F814002E\n:10471000012806D004282ED005282ED0062800D047\n:10472000FFDF01F00AF9014607EB4400427806EB8F\n:10473000850080F8262090F82720A24202D120226E\n:1047400080F82720084601F003F92A462146012077\n:10475000FFF72CFF9B48414600EB041002682046FF\n:10476000904796F82D5006EB850090F82640202CB7\n:10477000C8D1BDE8F087022000E003208046D0E7E2\n:1047800010B58C4C2021803484F8251084F8261034\n:1047900084F82710002084F8280084F82D0084F87D\n:1047A0002E10411EA16044F8100B20746074207319\n:1047B0006073A0738449E077207508704870002109\n:1047C0007C4A103C02F81100491CC9B22029F9D3D7\n:1047D0000120EEF722F90020EEF71FF9012084F8FE\n:1047E0002200EEF765FB7948EEF777FB764CA41EC6\n:1047F00020707748EEF771FB6070BDE81040EEF76F\n:1048000099B810B5EEF7BBF86F4CA41E2078EEF700\n:104810007DFB6078EEF77AFBBDE8104001F0C5B88B\n:10482000202070472DE9F34F624C0025803404EBC3\n:10483000810A89B09AF82500202821D0691E0291AA\n:104840006049009501EB0017391D03AB07C983E8E8\n:104850000700A18BADF81C10A07F8DF81E009DF8FD\n:104860001500A046C8B10226554951F820400399C9\n:10487000A219114421F07F41019184B102210FE07E\n:104880000120EEF7CAF80020EEF7C7F8EEF795F82A\n:1048900001F08BF884F82F50A7E00426E4E700210C\n:1048A0008DF81810022801D0012820D10398011991\n:1048B0000998081A801C9DF81C1020F07F4001B157\n:1048C0000221353181420BD203208DF81500039867\n:1048D000C4F13201401A20F07F40322403900CE0F2\n:1048E00098F8240018B901F0F8F900284DD0322CBE\n:1048F00003D214B101F04DF801E001F056F8324A4C\n:10490000107820B393465278039B121B00219DF828\n:104910001840994601281BD0032819D05FF00000E9\n:104920008DF81E00002A04DD981A039001208DF8EE\n:1049300018009DF81C0000B102210398254A20F0C0\n:104940007F40039003AB099801F03BF810B110E0F1\n:104950000120E5E79DF81D0018B99BF80000032829\n:1049600012D08DF81C50CDF80C908DF818408DF8B1\n:104970001E509DF8180058B1039801238119002298\n:104980001846EEF79DF806E000200BB0BDE8F08F6A\n:104990000120EEF742F897F90C200123002001993D\n:1049A000EEF78EF8F87BC00701D0EEF772F901211F\n:1049B00012E00000500A0020FF7F841E0020A107A3\n:1049C000E85B0200500800209E0000209361010077\n:1049D000EB460100FFFF3F0088F82F108AF82850AF\n:1049E00020226946F74810F00EFE0120CDE72DE9A0\n:1049F000F05FDFF8D083064608EB860090F825507C\n:104A0000202D1FD0A8F180002C4600EB8617A0F5C2\n:104A10000079DFF8B4B305E0A24607EB4A0044781A\n:104A2000202C0AD0EEF797F809EB04135A4601211F\n:104A30001B1D00F0C6FF0028EED0AC4202D033466A\n:104A400052461EE0E14808B1AFF30080EEF783F86C\n:104A500098F82F206AB1D8F80C20411C891A090255\n:104A6000CA1701EB12610912002902DD0020BDE81E\n:104A7000F09F3146FFF7D6FE08B10120F7E7334635\n:104A80002A4620210420FFF7BFFDEFE72DE9F04182\n:104A9000CC4C2569EEF75FF8401B0002C11700EB14\n:104AA0001160001200D4FFDF94F8220000B1FFDF94\n:104AB000012784F8227094F82E00202800D1FFDF0F\n:104AC00094F82E60202084F82E00002584F82F50C2\n:104AD00084F8205084F82150BD48256000780228D1\n:104AE00033D0032831D000202077A068401C05D0A7\n:104AF0004FF0FF30A0600120EDF78FFF0020EDF7B1\n:104B00008CFFEEF788F8EEF780F8EDF756FF0FF020\n:104B100085FFB048056005604FF0E0214FF400408C\n:104B2000B846C1F88002EEF722F994F82D703846A5\n:104B3000FFF75DFF0028FAD0A248803800EB87100D\n:104B400010F81600022802D006E00120CCE73A4611\n:104B500031460620FFF72AFD84F8238004EB870006\n:104B600090F82600202804D09948801E4078EEF75F\n:104B7000D3F9207F002803D0EEF73DF8257765773D\n:104B800040E5904910B591F82D200024803901EBC3\n:104B9000821100BF11F814302BB1641CE4B2202C38\n:104BA000F8D3202010BD8C4901EB041108600020CF\n:104BB000C87321460120FFF7F9FC204610BD10B54F\n:104BC000012801D0032800D171B37E4A92F82D301C\n:104BD0007C4C0022803C04EB831300BF13F812408E\n:104BE0000CB1082010BD521CD2B2202AF6D3784A4C\n:104BF00048B1022807D0072916D2DFE801F01506D0\n:104C0000080A0C0E100000210AE01B2108E03A21DE\n:104C100006E0582104E0772102E0962100E0B5216A\n:104C200051701070002010BD072010BD684810B5ED\n:104C30004078EEF702F880B210BD10B5202811D2EE\n:104C4000604991F82D30A1F1800202EB831414F831\n:104C500010303BB191F82D3002EB831212F8102086\n:104C6000012A01D0002010BD91F82D20014600201E\n:104C7000FFF79CFC012010BD10B5EDF76CFFBDE8FF\n:104C80001040EDF7DABF2DE9F0410E464D4F0178A7\n:104C90002025803F0C4607EB831303E0254603EBFA\n:104CA00045046478944202D0202CF7D108E0202CEF\n:104CB00006D0A14206D103EB41014978017007E01B\n:104CC00000209FE403EB440003EB4501407848706B\n:104CD000424F7EB127B1002140F2DD30AFF30080BA\n:104CE0003078A04206D127B100214FF47870AFF39D\n:104CF0000080357027B1002140F2E530AFF300802D\n:104D000001207FE410B542680B689A1A1202D4178A\n:104D100002EB1462121216D4497A91B1427A82B926\n:104D20002F4A006852F82110126819441044001DDF\n:104D3000891C081A0002C11700EB1160001232280A\n:104D400001DB012010BD002010BD2DE9F047814698\n:104D50001C48214E00EB8100984690F82540202009\n:104D6000107006F50070154600EB81170BE000BFD0\n:104D700006EB04104946001DFFF7C4FF28B107EBFE\n:104D800044002C704478202CF2D1297888F8001047\n:104D900013E000BF06EB0415291D4846FFF7B2FFDC\n:104DA00068B988F80040A97B99F80A00814201D8C7\n:104DB0000020DEE407EB44004478202CEAD10120F7\n:104DC000D7E40000D00A0020FFFF3F0000000000F1\n:104DD0009E00002000F50040500800200000000068\n:104DE000E85B02002DE9FC410E4607460024FE4D1B\n:104DF00009E000BF9DF8000005EB0010816838460F\n:104E000000F0F3FD01246B4601AA31463846FFF756\n:104E10009CFF0028EED02046BDE8FC8170B504461A\n:104E2000F2480125A54300EB841100EB85104022D8\n:104E300010F0A4FBEE4E26B1002140F25F40AFF32C\n:104E40000080EA48803000EB850100EB8400D0F858\n:104E50002500C1F8250026B1002140F26340AFF3E0\n:104E60000080284670BD2DE9FC418446DF48154688\n:104E7000089C00EB85170E4617F81400012803D094\n:104E8000022801D00020C7E70B46DA4A012160461C\n:104E900000F097FDA8B101AB6A4629463046FFF7FE\n:104EA00054FF70B1D1489DF804209DF80010803067\n:104EB00000EB85068A4208D02B460520FFF7A4FBAD\n:104EC0000BE02A462146042014E0202903D007EBFA\n:104ED0004100407801E096F8250007EB4401487056\n:104EE0009DF80000202809D007EB400044702A46B6\n:104EF00021460320FFF75AFB01208DE706F8254FD6\n:104F00000120F070F3E7B84901EB0010001DFFF736\n:104F1000D6BB7CB51D46134604460E4600F108027A\n:104F200021461846EDF796FE94F908000F2804DD97\n:104F30001F3820722068401C206096B10220AE49C4\n:104F400051F82610461820686946801B20F07F40E3\n:104F5000206094F908002844C01C1F2803DA0120AF\n:104F600009E00420EBE701AAEDF774FE9DF80400C8\n:104F700010B10098401C009000992068314408440A\n:104F8000C01C20F07F4060607CBD2DE9FE430C46D4\n:104F900006460978607990722079984615465072D5\n:104FA00041B19248803090F82E1020290AD0006933\n:104FB000401D0BE0D4E90223217903B02846BDE867\n:104FC000F043A6E78D484178701D084420F07F47E4\n:104FD000217900222846A368FFF79BFF394628461F\n:104FE00000F003FDD4E9023221796846FFF791FF12\n:104FF00041462846019CFFF7F5FE2B46224600213C\n:10500000304600F0DEFC002803D13146284600F08F\n:10501000ECFCBDE8FE832DE9FE4F814600F0A1FCCB\n:1050200030B1002799F8000020B10020BDE8FE8FC4\n:105030000127F7E76D4D6E4C4FF0000A803524B123\n:10504000002140F2D640AFF3008095F82D8085F81E\n:1050500023A0002624B1002140F2DB40AFF3008002\n:105060001FB94046FFF7DAFE804624B1002140F226\n:10507000E340AFF30080EDF76EFD43466A464946D4\n:10508000FFF783FF24B1002140F2E940AFF3008035\n:1050900095F82E0020280CD029690098401A0002AB\n:1050A000C21700EB1260001203D5684600F09DFCA9\n:1050B000012624B1002140F2F340AFF3008095F8BF\n:1050C00023000028BBD124B1002140F2F940AFF306\n:1050D0000080EDF740FD6B46464A002100F071FC70\n:1050E0000028A3D027B941466846FFF77BFE064358\n:1050F00026B16846FFF7E3FAC9F8080024B1002199\n:1051000040F20C50AFF3008001208FE72DE9F04F03\n:1051100089B08B46824600F024FC344C803428B39E\n:105120009BF80000002710B1012800D0FFDF304DB0\n:1051300025B1002140F28250AFF300802A490120BE\n:1051400001EB0A18A94607905FEA090604D000217E\n:1051500040F28A50AFF30080079800F0F9FB94F812\n:105160002D50002084F8230067B119E094F82E0038\n:105170000127202800D1FFDF9BF800000028D6D0AF\n:10518000FFDFD4E72846FFF749FE054626B1002198\n:1051900040F29450AFF3008094F823000028D3D15C\n:1051A00026B1002140F29E50AFF30080EDF7D3FC12\n:1051B0002B4602AA59460790FFF7E7FE98F80F0022\n:1051C0005FEA060900F001008DF8130004D0002109\n:1051D0004FF4B560AFF300803B462A4602A9CDF8F4\n:1051E00000A007980CE0000050080020500A0020A2\n:1051F00000000000FFFF3F00E85B02009E0000206F\n:10520000FFF731FE064604EB850090F82800009079\n:10521000B9F1000F04D0002140F2AF50AFF300808D\n:1052200000F08BFB0790B9F1000F04D0002140F291\n:10523000B550AFF3008094F82300002884D1B9F171\n:10524000000F04D0002140F2BD50AFF300800DF1FB\n:10525000080C9CE80E00C8E90112C8F80C304EB3E7\n:105260005FEA090604D0002140F2CA50AFF3008083\n:105270000098B84312D094F82E0020280ED126B101\n:10528000002140F2CF50AFF300802846FFF7AFFB7C\n:1052900020B99BF80000D8B3012849D0B9F1000F1C\n:1052A00004D0002140F2EC50AFF30080284600F01B\n:1052B0003DFB01265FEA090504D0002140F2F550CC\n:1052C000AFF30080079800F043FB25B1002140F2C6\n:1052D000F950AFF300808EB194F82D0004EB8000FC\n:1052E00090F82600202809D025B100214FF4C06095\n:1052F000AFF30080F9484078EDF70EFE25B10021AC\n:1053000040F20560AFF3008009B03046BDE8F08F91\n:10531000FFE7B9F1000F04D0002140F2D750AFF3FE\n:10532000008094F82D2051460420FFF73FF9C0E794\n:10533000002E3FF409AF002140F2E250AFF30080AD\n:1053400002E72DE9F84FE64D814695F82D004FF024\n:105350000008E44C4FF0010B474624B1002140F215\n:105360001360AFF30080584600F0F2FA85F823701E\n:1053700024B100214FF4C360AFF3008095F82D00F5\n:10538000FFF74CFD064695F8230028B1002CE4D029\n:10539000002140F21E604BE024B1002140F2226067\n:1053A000AFF30080CE48803800EB861111F8190069\n:1053B000032856D1334605EB830A4A469AF825005E\n:1053C000904201D1012000E0002000900AF1250068\n:1053D0000021FFF758FC01460098014203D001224A\n:1053E0008AF82820AF77E1B324B1002140F227608A\n:1053F000AFF30080324649460120FFF7D7F89AF80C\n:1054000028A024B1002140F23260AFF3008000F008\n:1054100094FA834624B1002140F23760AFF3008054\n:1054200095F8230038B1002C97D0002140F23B6062\n:10543000AFF3008091E7BAF1000F07D095F82E0086\n:10544000202803D13046FFF7D2FAE0B124B1002181\n:1054500040F24F60AFF30080304600F067FA4FF043\n:10546000010824B100214FF4CB60AFF3008058460F\n:1054700000F06EFA24B1002140F25C60AFF30080CE\n:105480004046BDE8F88F002CF1D0002140F24A6080\n:10549000AFF30080E6E70020EDF798BA0120EDF7C2\n:1054A00095BA8E48007870472DE9F0418C4C94F8FD\n:1054B0002E0020281FD194F82D6004EB860797F862\n:1054C0002550202D00D1FFDF8549803901EB861062\n:1054D00000EB4500407807F8250F0120F87084F8AC\n:1054E0002300294684F82E50324602202234FFF74A\n:1054F0005DF80020207004E42DE9F0417A4E784CEC\n:10550000012538B1012821D0022879D003287DD087\n:10551000FFDFF0E700F03DFAFFF7C6FF207E00B1A5\n:10552000FFDF84F821500020EDF777FAA168481CCE\n:1055300004D0012300221846EDF7C2FA14F82E0F0A\n:10554000217806EB01110A68012154E0FFF7ACFF56\n:105550000120EDF762FA94F8210050B1A068401CD8\n:1055600007D014F82E0F217806EB01110A680621E6\n:1055700041E0207EDFF86481002708F1020801285D\n:1055800003D002281ED0FFDFB5E7A777EDF733FB86\n:1055900098F80000032801D165772577607D53498D\n:1055A00051F8200094F8201051B948B161680123E6\n:1055B000091A00221846EDF783FA022020769AE7AE\n:1055C000277698E784F8205000F0E3F9A07F50B1E7\n:1055D00098F8010061680123091A00221846EDF7C6\n:1055E0006FFA257600E0277614F82E0F217806EB67\n:1055F00001110A680021BDE8F041104700E005E014\n:1056000036480078BDE8F041EDF786BCFFF74CFF67\n:1056100014F82E0F217806EB01110A680521EAE73C\n:1056200010B52F4C94F82E00202800D1FFDF14F87D\n:105630002E0F21782C4A02EB01110A68BDE81040B8\n:10564000042110477CB5264C054694F82E002028EE\n:1056500000D1FFDFA068401C00D0FFDF94F82E00CF\n:10566000214901AA01EB0010694690F90C00284479\n:10567000EDF7F0FA9DF904000F2801DD012000E0AC\n:105680000020009908446168084420F07F41A1602F\n:1056900094F82100002807D002B00123BDE8704033\n:1056A00000221846EDF70CBA7CBD30B5104A0B1A33\n:1056B000541CB3EB940F1FD3451AB5EB940F1BD3B7\n:1056C000934203D9101A43185B1C15E0954211D977\n:1056D000511A0844401C43420EE000009C00002088\n:1056E000D00A00200000000050080020E85B020003\n:1056F000FF7F841EFFDF0023184630BD01230022F8\n:1057000001460220EDF7DCB90220EDF786B9EDF78E\n:1057100022BA2DE9FC47BA4C054694F82E00202801\n:1057200000D1FFDF642D58D3B64A0021521B71EB24\n:10573000010052D394F82E20A0462046DFF8C892EC\n:1057400090F82D7009EB0214D8F8000001AA284443\n:105750006946EDF77FFA9DF90400002802DD009804\n:10576000401C0090A068009962684618B21A22F0A6\n:105770007F42B2F5800F30D208EB8702444692F8A0\n:105780002520202A0AD009EB02125268101A0002C2\n:10579000C21700EB1260001288421EDBA068401C9A\n:1057A00010D0EDF7D8F9A168081A0002C11700EB74\n:1057B00011600012022810DD0120EDF72EF94FF0E4\n:1057C000FF30A06020682844206026F07F402061E0\n:1057D000012084F82300BDE8FC870020FBE72DE9C9\n:1057E000F047874C074694F82D00A4F1800606EB9D\n:1057F000801010F8170000B9FFDF94F82D50A04674\n:10580000824C24B100214FF40760AFF3008040F6D2\n:105810007C0940F6850A06EB851600BF16F81700CE\n:10582000012818D0042810D005280ED006280CD046\n:105830001CB100214846AFF3008020BF002CEDD002\n:1058400000215046AFF30080E8E72A4639460120A0\n:10585000FEF7ACFEF2E74FF0010A4FF000094546B3\n:1058600024B1002140F68C00AFF30080504600F0D8\n:105870006FF885F8239024B1002140F69100AFF332\n:10588000008095F82D00FFF7C9FA064695F8230029\n:1058900028B1002CE4D0002140F697001FE024B18D\n:1058A000002140F69B00AFF3008005EB860000F17D\n:1058B000270133463A462630FFF7E5F924B10021A7\n:1058C00040F69F00AFF3008000F037F8824695F86D\n:1058D000230038B1002CC3D0002140F6A500AFF35F\n:1058E0000080BDE785F82D60012085F82300504633\n:1058F00000F02EF8002C04D0002140F6B200AFF3E7\n:105900000080BDE8F08730B504463D480D4690F86C\n:105910002D003B49803901EB801010F8140000B9CC\n:10592000FFDF394800EB0410C57330BD344981F8FE\n:105930002D00012081F82300704710B5344808B1CC\n:10594000AFF30080EFF3108000F0010072B610BDDD\n:1059500010B5002804D12F4808B1AFF3008062B61B\n:1059600010BD2D480068C005C00D10D0103840B2E1\n:10597000002804DB00F1E02090F8000405E000F0CE\n:105980000F0000F1E02090F8140D40097047082046\n:10599000704710B51A4C94F82400002804D1F6F78B\n:1059A0005FF8012084F8240010BD10B5144C94F861\n:1059B0002400002804D0F6F77CF8002084F82400A6\n:1059C00010BD10B51C685B68241A181A24F07F44B7\n:1059D00020F07F40A14206D8B4F5800F03D2904258\n:1059E00001D8012010BD002010BDD0E90032D21A2C\n:1059F00021F07F43114421F07F41C0E9003170471D\n:105A0000D00A0020FF1FA10750080020000000005E\n:105A1000000000000000000004ED00E02DE9F0416E\n:105A2000044680074FF000054FF001060CD56B4887\n:105A3000056006600EF01BFE20B16948016841F464\n:105A40008061016024F00204E0044FF0FF3705D5C7\n:105A500064484660C0F8087324F48054600003D59D\n:105A60006148056024F08044E0050FD55F48C0F828\n:105A70000052C0F808735E490D60091D0D605C4A54\n:105A800004210C321160066124F48074A00409D54D\n:105A900058484660C0F80052C0F808735648056080\n:105AA00024F40054C4F38030C4F3C031884200D0E1\n:105AB000FFDF14F4404F14D050484660C0F808731C\n:105AC0004F488660C0F80052C0F808734D490D6019\n:105AD0000A1D16608660C0F808730D60166024F415\n:105AE000404420050AD5484846608660C0F80873DF\n:105AF000C0F848734548056024F400640EF068FF60\n:105B00004348044200D0FFDFBDE8F081F0B5002239\n:105B1000202501234FEA020420FA02F1C9072DD003\n:105B200051B2002910DB00BF4FEA51174FEA870737\n:105B300001F01F0607F1E02703FA06F6C7F88061B7\n:105B4000BFF34F8FBFF36F8F0CDB00BF4FEA5117CE\n:105B50004FEA870701F01F0607F1E02703FA06F670\n:105B6000C7F8806204DB01F1E02181F8004405E020\n:105B700001F00F0101F1E02181F8144D02F1010261\n:105B8000AA42C9D3F0BD10B5224C20600846F6F7F2\n:105B90007CF82068FFF742FF2068FFF7B7FF0EF0A0\n:105BA000FDFA00F01AF90EF013FF0EF056FEEDF7B5\n:105BB0007FF9BDE810400EF0A1BB10B5154C206870\n:105BC000FFF72CFF2068FFF7A1FF0EF001FFF6F7AB\n:105BD0004FF90020206010BD0A207047FC1F0040D4\n:105BE0003C17004000C0004004E501400080004038\n:105BF0000485004000D0004004D5004000E0004093\n:105C000000F0004000F5004000B0004008B5004042\n:105C1000FEFF0FFDA000002070B526490A680AB3F8\n:105C20000022154601244B685B1C4B600C2B00D3F3\n:105C30004D600E7904FA06F30E681E420FD0EFF3A2\n:105C4000108212F0010272B600D001220C689C434F\n:105C50000C6002B962B649680160002070BD521C38\n:105C60000C2AE0D3052070BD4FF0E0214FF48000F6\n:105C7000C1F800027047EFF3108111F0010F72B606\n:105C80004FF0010202FA00F20A48036842EA0302F6\n:105C9000026000D162B6E7E706480021016041607A\n:105CA00070470121814003480068084000D001206E\n:105CB00070470000A40000200120810708607047A1\n:105CC0000121880741600021C0F8001118480170C7\n:105CD000704717490120087070474FF08040D0F896\n:105CE0000001012803D012480078002800D00120CC\n:105CF000704710480068C00700D0012070470D4869\n:105D00000C300068C00700D00120704709481430EB\n:105D100000687047074910310A68D20306D5096840\n:105D200001F00301814201D101207047002070473A\n:105D3000AC000020080400400021017008467047B4\n:105D40000146002008707047EFF3108101F0010157\n:105D500072B60278012A01D0012200E0002201235C\n:105D6000037001B962B60AB1002070474FF40050C9\n:105D70007047E9E7EFF3108111F0010F72B64FF0B1\n:105D80000002027000D162B600207047F2E7000006\n:105D90002DE9F04115460E460446002700F0E7F8CD\n:105DA000A84215D3002341200FE000BF94F8422001\n:105DB000A25CF25494F84210491CB1FBF0F200FBD3\n:105DC00012115B1C84F84210DBB2AB42EED3012708\n:105DD00000F0D9F83846BDE8F081704910B5802050\n:105DE00081F800046E49002081F8420081F84100EA\n:105DF000433181F8420081F84100433181F842008B\n:105E000081F841006748FFF797FF6648401CFFF79D\n:105E100093FFECF7BBFFBDE8104000F0B4B84020A2\n:105E200070475F4800F0A3B80A4601465C48AFE7F8\n:105E3000402070475A48433000F099B80A4601465E\n:105E400057484330A4E7402101700020704710B547\n:105E500004465348863000F08AF82070002010BDB8\n:105E60000A4601464E4810B58630FFF791FF08B14B\n:105E7000002010BD42F2070010BD70B50C4605466B\n:105E8000412900D9FFDF48480068103840B200F0CF\n:105E900050F8C6B20D2000F04CF8C0B2864203D2D2\n:105EA000FFDF01E0ECF7C2FF224629463C48FFF73E\n:105EB0006FFF0028F6D070BD2DE9F041394F002565\n:105EC00006463F1D57F82540204600F041F810B324\n:105ED0006D1CEDB2032DF5D33148433000F038F896\n:105EE000002825D02E4800F033F8002820D02C4878\n:105EF000863000F02DF800281AD0ECF76DFF294805\n:105F0000FFF722FFB0F5005F00D0FFDFBDE8F041F2\n:105F10002448FFF72FBF94F841004121265414F87C\n:105F2000410F401CB0FBF1F201FB12002070D3E7DF\n:105F300051E7002804DB00F1E02090F8000405E0C0\n:105F400000F00F0000F1E02090F8140D40097047B8\n:105F500010F8411F4122491CB1FBF2F302FB13115F\n:105F60004078814201D1012070470020704710F82D\n:105F7000411F4078814201D3081A02E0C0F141007C\n:105F80000844C0B2704710B50648FFF7DDFE002890\n:105F900003D1BDE81040ECF70ABF10BD0DE000E0F2\n:105FA000000B0020B000002004ED00E070B5154D9E\n:105FB0002878401CC4B26878844202D0F5F7EFFF1D\n:105FC0002C7070BD2DE9F0410E4C4FF0E02600BF63\n:105FD000F5F7DAFF20BF40BF20BF677820786070F8\n:105FE000D6F80052EBF70CFA854305D1D6F8040237\n:105FF00010B92078B842EBD0F5F7C1FF0020BDE81A\n:10600000F0810000C00000202DE9F04101252803A7\n:106010004FF0E0210026C1F88001BFF34F8FBFF39E\n:106020006F8F1F4CC4F800610C2000F02CF81D4845\n:1060300001680268C94341F3001142F01002026096\n:10604000C4F804532560491C00E020BFD4F80021A7\n:10605000002AFAD019B9016821F010010160124834\n:1060600007686560C4F80853C4F800610C2000F0AC\n:106070000AF83846BDE8F08110B50446FFF7C4FFC2\n:106080002060002010BD002809DB00F01F02012164\n:1060900091404009800000F1E020C0F88012704774\n:1060A00000C0004010ED00E008C500402DE9F047B9\n:1060B000FF4C0646FF21A06800EB06121170217804\n:1060C000FF2910D04FF0080909EB011109EB061761\n:1060D0004158C05900F0F4F9002807DDA168207884\n:1060E00001EB061108702670BDE8F08794F8008077\n:1060F00045460DE0A06809EB05114158C05900F074\n:10610000DFF9002806DCA068A84600EB0810057837\n:10611000FF2DEFD1A06800EB061100EB08100D7009\n:106120000670E1E7F0B5E24B0446002001259A68CD\n:106130000C269B780CE000BF05EB0017D75DA7424B\n:1061400004D106EB0017D7598F4204D0401CC0B2CF\n:106150008342F1D8FF20F0BD70B5FFF7D8FAD44CD8\n:1061600008252278A16805EB0212895800F0A8F9E9\n:10617000012808DD2178A06805EB01114058BDE831\n:106180007040FFF7BBBAFFF78CF9BDE87040ECF741\n:10619000C3BE2DE9F041C64C2578FFF7B8FAFF2DB4\n:1061A0006ED04FF00808A26808EB0516915900F070\n:1061B00087F90228A06801DD80595DE000EB051138\n:1061C00009782170022101EB0511425C5AB1521E7F\n:1061D0004254815901F5800121F07F4181512846C7\n:1061E000FFF764FF34E00423012203EB051302EB05\n:1061F000051250F803C0875CBCF1000F10D0BCF54D\n:10620000007F10D9CCF3080250F806C00CEB423CDA\n:106210002CF07F4C40F806C0C3589A1A520A09E085\n:10622000FF2181540AE0825902EB4C3222F07F4276\n:106230008251002242542846FFF738FF0C21A06803\n:1062400001EB05114158E06850F827203846904787\n:106250002078FF2814D0FFF75AFA2278A16808EBBB\n:1062600002124546895800F02BF9012893DD217868\n:10627000A06805EB01114058BDE8F041FFF73EBAB8\n:10628000BDE8F081F0B51D4614460E460746FF2BCB\n:1062900000D3FFDFA00700D0FFDF8548FF210022E9\n:1062A000C0E90247C57006710170427082701046E5\n:1062B000012204E002EB0013401CE154C0B2A842EA\n:1062C000F8D3F0BD70B57A4C0646657820798542E2\n:1062D00000D3FFDFE06840F825606078401C607004\n:1062E000284670BD2DE9FF5F1D468B460746FF24FB\n:1062F000FFF70DFADFF8B891064699F80100B842A9\n:1063000000D8FFDF00214FF001084FF00C0A99F888\n:106310000220D9F808000EE008EB0113C35CFF2B44\n:106320000ED0BB4205D10AEB011350F803C0DC4587\n:106330000CD0491CC9B28A42EED8FF2C02D00DE025\n:106340000C46F6E799F803108A4203D1FF2004B007\n:10635000BDE8F09F1446521C89F8022008EB041196\n:106360000AEB0412475440F802B00421029B0022B9\n:10637000012B01EB04110CD040F801204FF4007800\n:1063800008234FF0020C454513D9E905C90D02D089\n:1063900002E04550F2E7414606EB413203EB0413BD\n:1063A00022F07F42C250691A0CEB0412490A815450\n:1063B0000BE005B9012506EB453103EB041321F091\n:1063C0007F41C1500CEB0411425499F80050204613\n:1063D000FFF76CFE99F80000A84201D0FFF7BCFE61\n:1063E0003846B4E770B50C460546FFF790F9064607\n:1063F00021462846FFF796FE0446FF281AD02C4D6A\n:10640000082101EB0411A8684158304600F058F803\n:1064100000F58050C11700EBD14040130221AA685B\n:1064200001EB0411515C09B100EB4120002800DCB4\n:10643000012070BD002070BD2DE9F04788468146DF\n:10644000FFF770FE0746FF281BD0194D2E78A8686D\n:106450003146344605E0BC4206D0264600EB061223\n:106460001478FF2CF7D10CE0FF2C0AD0A6420CD1F7\n:1064700000EB011000782870FF2804D0FFF76CFEB5\n:1064800003E0002030E6FFF73FF941464846FFF7BA\n:10649000A9FF0123A968024603EB0413FF20C85497\n:1064A000A878401EB84200D1A87001EB041001E0AA\n:1064B000CC0B002001EB061100780870104613E6A3\n:1064C000081A0002C11700EB1160001270470000AB\n:1064D0005E4800210170417010218170704770B5D5\n:1064E000054616460C460220ECF7F2F95749012002\n:1064F00008705749F01E086056480560001F046088\n:1065000070BD10B50220ECF7E3F950490120087086\n:1065100051480021C0F80011C0F80411C0F808115A\n:106520004E494FF40000086010BD48480178D9B1C9\n:106530004B4A4FF4000111604749D1F80031002265\n:10654000002B1CBFD1F80431002B02D0D1F8081168\n:1065500019B142704FF0100104E04FF00101417099\n:1065600040490968817002704FF00000ECF7B0B943\n:1065700010B50220ECF7ACF934480122002102707A\n:106580003548C0F80011C0F80411C0F808110260C5\n:1065900010BD2E480178002904BF407870472E486E\n:1065A000D0F80011002904BF02207047D0F8001174\n:1065B00000291CBFD0F80411002905D0D0F808012B\n:1065C000002804BF01207047002070471F4800B515\n:1065D0000278214B4078C821491EC9B282B1D3F854\n:1065E00000C1BCF1000F10D0D3F8000100281CBF7F\n:1065F000D3F8040100280BD0D3F8080150B107E00C\n:10660000022802D0012805D002E00029E4D1FFDFF2\n:10661000002000BD012000BD0C480178002904BF06\n:10662000807870470C48D0F8001100291CBFD0F8C2\n:106630000411002902D0D0F8080110B14FF0100069\n:10664000704708480068C0B270470000C2000020D0\n:1066500010F5004008F5004000F0004004F501404E\n:1066600008F5014000F400405648002101704170D7\n:10667000704770B5064614460D460120ECF728F920\n:1066800051480660001D0460001D05604F49002050\n:10669000C1F850014E49032008604F494D48086039\n:1066A000091D4E48086070BD2DE9F041054645487A\n:1066B0000C46012606704A4945EA024040F08070C7\n:1066C00008600DF0AAFF002804BF464804600027B8\n:1066D000454CC4F80471464944480860002D02BF87\n:1066E000C4F800622660BDE8F081012D18BFFFDF0D\n:1066F000C4F80072266040493E480860BDE8F08159\n:106700003048017871B13A4A384911603649D1F8B8\n:1067100004210021002A08BF417002D0374A1268C4\n:10672000427001700020ECF7D3B8264801780029A8\n:1067300004BF407870472C48D0F80401002808BFF7\n:1067400070472E480068C0B27047002808BF7047E5\n:1067500030B51C480078002808BFFFDF2248D0F879\n:106760000411002918BF30BD0224C0F80443DFF82B\n:1067700090C0DCF80010C1F30015DCF8001041F007\n:106780001001CCF80010D0F80411002904BF4FF418\n:1067900000414FF0E02206D1C2F8801220BFD0F8AD\n:1067A0000431002BF8D02DB9DCF8001021F01001D5\n:1067B000CCF80010C0F8084330BD0B4901208860B8\n:1067C00070470000C500002008F5004000100040A0\n:1067D0001CF500405011004098F501400CF00040BD\n:1067E00004F5004018F5004000F0004000000203EE\n:1067F00008F501400000020204F5014000F40040E9\n:1068000010ED00E010B5FE48002401214470047032\n:1068100044728472C17280F82540C462846380F837\n:106820003C4080F83D40FF2180F83E105F2180F819\n:106830003F1018300FF052F8F249601E0860091D31\n:106840000860091D0C60091D0860091D0C60091D08\n:106850000860091D0860091D0860091D0860091D00\n:106860000860091D0860091D0860091D0860091DF0\n:10687000086010BDE448016801F00F01032904BF5E\n:1068800001207047016801F00F01042904BF0220B4\n:106890007047016801F00F01052904D0006800F07D\n:1068A0000F00062807D1D948006810F0060F0CBF6A\n:1068B00008200420704700B5FFDF012000BD10B59F\n:1068C000CF4C0168A1614168E161007A84F8200041\n:1068D000207E48B1207FF7F7C4FCA07E011C18BFC2\n:1068E0000121207FF7F7ACFC607E002808BF10BDB7\n:1068F000607FF7F7B6FCE07E011C18BF0121607FC6\n:10690000BDE81040F7F79CBC30B5002405460129CE\n:106910000AD0022908BF4FF0807405D0042916BFA1\n:1069200008294FF0C744FFDF44F4847040F480101E\n:10693000B749086045F4403001F1040140F00070AF\n:10694000086030BD30B50024054601290AD002296F\n:1069500008BF4FF0807405D0042916BF08294FF0F6\n:10696000C744FFDF44F4847040F48010A8490860F5\n:1069700045F4403001F1040140F000700860A54882\n:10698000D0F80001002818BFFFDF30BD2DE9F0412D\n:1069900002274FF0E02801250024C8F88071BFF3DA\n:1069A0004F8FBFF36F8F9C48046005600DF05FFE52\n:1069B0009A4E18B1306840F4806030600DF02DFEC2\n:1069C00038B1306820F0770040F0880040F0004097\n:1069D00030609449924808604FF01020806CB0F10C\n:1069E000FF3F04D090490A6860F317420A608F495C\n:1069F00040F25B600860091F40F203100860081F46\n:106A00000560814903200860894805608A4A8949F0\n:106A100011608B4A89491160121F8A49116001680F\n:106A200021F440710160016841F480710160C8F88F\n:106A3000807278491020C1F80403714880F8314011\n:106A4000C462BDE8F0816E4A0368C2F802308088F3\n:106A5000D080117270476A4B10B51A7A8A4208D1F9\n:106A600001460622981C0EF05DFD002804BF01209F\n:106A700010BD002010BD624890F825007047604AA4\n:106A8000517010707047F0B50546800000F18040ED\n:106A900000F580508B88C0F820360B78D1F80110B3\n:106AA00043EA0121C0F8001605F10800012707FAA2\n:106AB00000F6654C002A04BF2068B04304D0012AC8\n:106AC00018BFFFDF206830432060206807FA05F117\n:106AD00008432060F0BD0EF0D1B8494890F832006C\n:106AE00070475A4AC178116000685949000208602D\n:106AF0007047252808BF02210ED0262808BF1A217A\n:106B00000AD0272808BF502106D00A2894BF0422A3\n:106B1000062202EB4001C9B24E4A11604E4908609C\n:106B2000704737498A7A012A49D0022A18BF70472C\n:106B30004B7E002B08BF7047012A44D0CB7E4A7F92\n:106B400013F1000C18BF4FF0010C24231844434BE1\n:106B50001860434B0020C3F84C0110028CF0010276\n:106B600040EA025040F0031291F82000830003F144\n:106B7000804303F5C043C3F810253A4A8B7F02EBEC\n:106B80008000DA0002F1804202F5F832C2F8140502\n:106B9000DFF8D4C0C2F810C5C97FCA0002F1804234\n:106BA00002F5F832C2F814052648C2F81005012093\n:106BB00000FA03F288402D491043086070470B7EAD\n:106BC000002BB9D170478B7E0A7F002B14BF4FF08A\n:106BD000010C4FF0000C1123B8E72DE9F0410D4EE8\n:106BE000804603200D46C6F8000220492048086070\n:106BF00028460EF082F80124014FB8F1000F39E069\n:106C0000DC0B0020000E0040101500401414004062\n:106C10001415004000100040FC1F00403C170040CD\n:106C20002C000089781700408C1500403815004072\n:106C30005016004000000E0408F50140408000405E\n:106C4000A4F50140101100404016004024150040FA\n:106C50001C15004008150040541500404C850040AC\n:106C600000800040006000404C81004004F501407D\n:106C70000000040404BFBC72346026D0B8F1010FD8\n:106C800023D1FE48006860B915F00C0F09D0C6F892\n:106C90000443012000F0B4FEF463346487F83C4000\n:106CA00002E0002000F0ACFE28460EF00EF90220B3\n:106CB000B8720DF0CAFC38B90DF0D9FC20B9F04813\n:106CC000016841F4C02101607460EE48C464EE487C\n:106CD00000682946BDE8F04123E72DE9F047EB4E77\n:106CE000814603200D46C6F80002DFF8A883E84875\n:106CF000C8F8000008460EF000F828460EF0E5F847\n:106D00000124E54FB9F1000F03D0B9F1010F0AD00A\n:106D100026E0BC72B86B40F48010B8634FF480106A\n:106D2000C8F800001CE00220B872B86B40F40010F4\n:106D3000B8634FF40010C8F80000D048006860B98C\n:106D400015F00C0F09D0C6F80443012000F058FEDE\n:106D5000F463346487F83C4002E0002000F050FE09\n:106D6000EBF794FF2946BDE8F047DAE62DE9F84F46\n:106D7000C64C8246032088461746C4F80002DFF856\n:106D80001493C348C9F8000010460DF0B6FFDFF8B1\n:106D90000CB3C14E0125BAF1000F04BFCBF800407F\n:106DA000B57204D0BAF1010F18BFFFDF2FD0BC4875\n:106DB000C0F80080BC49BB480860B06B40F40020BC\n:106DC000B063D4F800321021C4F808130020C4F8CE\n:106DD0000002DFF8D8C28A03CCF80020C4F8000112\n:106DE000C4F80C01C4F81001C4F80401C4F814017B\n:106DF000C4F81801AE4800680090C4F80032C9F821\n:106E00000020C4F80413BAF1010F09D01BE0384682\n:106E10000EF05BF8A748CBF800000220B072C6E77E\n:106E20009648006860B917F00C0F09D0C4F80453F5\n:106E3000012000F0E5FDE563256486F83C5002E0A2\n:106E4000002000F0DDFD4FF40020C9F800008D485F\n:106E5000C5648D480068404528BFFFDF394640467D\n:106E6000BDE8F84F5DE62DE9F0418B4C0646002564\n:106E700094F8310017468846002808BFFFDF16B196\n:106E8000012E16D021E094F83100012808D094F8A2\n:106E90003020394640460DF045FFE16A451814E0C0\n:106EA00094F830103A4640460DF07AFFE16A4518F2\n:106EB0000BE094F8310094F8301001283A4640462F\n:106EC00009D00DF095FFE16A45183A46294630464B\n:106ED000BDE8F0414AE70DF045FFE16A4518F4E7E7\n:106EE0002DE9F84F694CD4F8000220F00B09D4F8D2\n:106EF00004034FF0100AC0F30018C4F808A30026DA\n:106F0000C4F8006269486C490160634D0127A97AA1\n:106F1000012902D0022903D015E0297E11B912E01F\n:106F2000697E81B1A97FEA7F07FA01F107FA02F2CF\n:106F30001143016095F82000800000F1804000F5C9\n:106F4000C040C0F81065FF208DF80000C4F8106143\n:106F5000276104E09DF80000401E8DF800009DF8B8\n:106F6000000018B1D4F810010028F3D09DF80000FB\n:106F7000002808BFFFDFC4F81061002000F040FDCA\n:106F80006E72AE72EF72C4F80092B8F1000F18BFC3\n:106F9000C4F804A3BDE8F88FFF2008B58DF8000001\n:106FA0003A480021C0F810110121016105E000BF3D\n:106FB0009DF80010491E8DF800109DF8001019B1C1\n:106FC000D0F810110029F3D09DF80000002808BF68\n:106FD000FFDF08BD0068394920F07F400860704736\n:106FE0004FF0E0200221C0F8801100F5C070BFF31F\n:106FF0004F8FBFF36F8FC0F8001170474FF0E02143\n:107000000220C1F8000170472D49087070472D49D2\n:107010000860704770B50546EBF738FE1E4C2844F3\n:10702000E16A884298BFFFDF01202074EBF72EFE53\n:10703000144A284400216061C2F8441122490860C2\n:10704000A06B144940F48000A063D001086070BDBB\n:1070500070B5114C05461D4A0220207410680E467A\n:1070600000F00F00032808BF01223ED0106800F096\n:107070000F00042808BF022237D029E088170040FB\n:1070800068150040008000404C8500400010004022\n:107090000000040404F50140DC0B0020ACF50140C5\n:1070A0004885004048810040A8F5014008F50140AE\n:1070B000181100400410004000000E043C15004070\n:1070C000C700002004150040448500401015004012\n:1070D000106800F00F0005281BD0106800F00F00AA\n:1070E00006281CBFFFDF012213D094F8310094F86A\n:1070F0003010012815D028460DF0C1FEFF4960610F\n:107100000020C1F844016169E06A0844FC49086054\n:1071100070BDFC48006810F0060F0CBF0822042266\n:10712000E3E7334628460DF078FEE7E7F6494FF4EB\n:1071300080000860F548816B21F4800181630021A3\n:1071400001747047C20002F1804202F5F832F04B40\n:10715000C2F81035C2F8141501218140ED480160D4\n:10716000EA48826B114381637047E4480121416022\n:10717000C1600021C0F84411E1480160E348C162E8\n:107180007047E5490860E548D0F8001241F0400139\n:10719000C0F800127047E148D0F8001221F0400119\n:1071A000C0F80012DC49002008607047DB48D0F8C6\n:1071B000001221F01001C0F8001201218161704716\n:1071C000D249FF2081F83E00D4480021C0F81C11AC\n:1071D000D0F8001241F01001C0F800127047CF49FA\n:1071E00081B0D1F81C21012A0DD0C84991F83E1078\n:1071F000FF290DBF00204942017001B008BF704750\n:10720000012001B07047C64A126802F07F02524264\n:1072100002700020C1F81C01C24800680090EFE72E\n:10722000F0B517460C00064608BFFFDFB74D14F057\n:10723000010F2F731CBF012CFFDF002E0CBF01209C\n:1072400002206872EC7201281CBF0228FFDFF0BD2B\n:10725000AE4981F83F0070472DE9F84FDFF8C8A22A\n:107260009AF80000042828BFFFDFA84CDFF89882B6\n:10727000AA4D94F83C0000260127E0B1D5F804019E\n:1072800010F1000918BF4FF00109D5F810010028CE\n:1072900018BF012050EA09014FF4002B17D08021BC\n:1072A000C5F80813C8F800B084F83C6090F0010FEE\n:1072B00018BFBDE8F88FDFF84492D9F84C010028D8\n:1072C0007ED0A07A01287CD002287BD0AEE0D5F811\n:1072D0000001DFF84CA230B3C5F800616F61FF20F8\n:1072E000009002E0401E009005D0D5F81C01002857\n:1072F0000098F7D000B9FFDFDAF8000000F07F0A4D\n:1073000094F83F0050453CBF002000F079FB84F822\n:107310003EA0C5F81C61C5F808738248006800905B\n:107320002F64AF6302E0B9F1000F03D0B9F1000F91\n:107330002BD05DE0DAF8000000F07F0084F83E001A\n:10734000C5F81C6194F83D1049B194F83F10814292\n:1073500018D2002000F054FB2F64AF6312E0734991\n:10736000096894F83F308AB2090C984203D30F2A77\n:1073700006D9022904D2012000F042FB2F6401E06B\n:107380002F64AF636748006800908022C5F804232B\n:107390005A48876466490B68A1F1040CDCF800C008\n:1073A00043F698273B44634519D20A6842F21073AA\n:1073B0001A440A60C0F848615F495E48086002E00C\n:1073C00034E01CE01EE0091F5C4808605148C0F82A\n:1073D00000B0A06B40F40020A063BDE8F88F0E6001\n:1073E000C0F84861C5F80823C8F800B0C0F8486183\n:1073F0008020C5F80803C8F800B0BDE8F88F207EEB\n:1074000010B913E0607E88B1A07FE17F07FA00F039\n:1074100007FA01F10843C8F8000094F82000800042\n:1074200000F1804000F5C040C0F810653648A16BFF\n:107430000160A663217C002019B1D9F8441101290B\n:1074400000D00021A27A012A56D0022A55D000BFCE\n:10745000D5F8101101290CBF1021002141EA0008C4\n:107460003748016811F0FF0F03D0D5F81411012936\n:1074700000D0002184F83210006810F0FF0F03D014\n:10748000D5F81801012800D0002084F833002D48D9\n:10749000006884F83400FFF77CF8012818BF00204A\n:1074A00084F83500C5F80061C5F80C61C5F81061B5\n:1074B000C5F80461C5F81461C5F818612248006870\n:1074C00000900E48C0F8446120480068DFF8309012\n:1074D0000090D9F80000A062A9F104000068E06201\n:1074E0001B48016801F00F01032908BF012042D0A9\n:1074F000016801F00F012DE045E04BE00080004005\n:10750000448500401414004008F50140DC0B0020C5\n:107510000411004004F501406015004000100040D7\n:10752000481500401C110040C700002074150040A1\n:107530004885004014100040ACF5014048810040EF\n:1075400040160040101400401811004044810040D3\n:1075500010150040042908BF02200CD0016801F07A\n:107560000F01052925D0006800F00F0006281CBF78\n:10757000FFDF01201DD084F83000A07A84F83100AC\n:1075800002282BD11DE0D5F80C01012814BF0020E2\n:1075900008205DE7D5F80C01012814BF0020022067\n:1075A000F64A1268012A14BF04220022104308433D\n:1075B0004EE7F348006810F0060F0CBF08200420C7\n:1075C000D9E7607850B1EF49096809780840217817\n:1075D00031EA000008BF84F8247001D084F82460E8\n:1075E00018F0020F0AD0EBF751FBA16AE64A081A1D\n:1075F0009AF80010490852F82110884718F0010F36\n:1076000018BF4FF0000B11D0EBF740FBE16A9AF87E\n:107610000020081ADD4951F822205946904700BF42\n:107620009AF8000010F0010F2FD10CE018F0020FB3\n:1076300018BF4FF0010BE7D118F0080F18BF4FF03B\n:10764000020BE1D1ECE7DFF83CB3DBF80000007897\n:1076500000F00F00072828BF84F8256015D2DBF85A\n:107660000000062200F10901A01C0DF05BFF40B9EB\n:10767000207ADBF800100978B0EBD11F08BF012099\n:1076800001D04FF0000084F82500E17A4FF00000AF\n:1076900011F0020F1CBF18F0020F18F0040F19D1DF\n:1076A00011F0100F1CBF94F83320002A02D094F878\n:1076B00035207AB111F0080F1CBF94F82420002A5D\n:1076C00008D111F0040F02D094F8251011B118F070\n:1076D000010F01D04FF00100617A19B168B1FFF7D5\n:1076E000FFFB10E0AB48AA490160D5F8000220F08A\n:1076F0000300C5F80002E77205E001290DD0022958\n:1077000018BFFFDF10D018F0010F17D0A2489AF869\n:10771000001050F82100804756E06672E772A772A9\n:107720009621227B002006E06672E7720220A0729A\n:10773000227B96210120FFF796FBE4E718F0020F69\n:107740002DD018F0040F21D10CF07FFFF0B90CF010\n:107750008EFFD8B991480168001F0068C0F3006C23\n:10776000C0F3425500F00F03C0F30312C0F303202F\n:10777000BCF1000F0AD0002B1CBF002A002805D145\n:10778000002918BF032D38BF48F0040827EA9800E5\n:1077900083499AF8002051F82210884714E018F025\n:1077A000080F06D07F489AF8001050F82100804753\n:1077B0000AE018F0100F08BFFFDF05D07A489AF8EA\n:1077C000001050F821008047A07A022818BFBDE8B9\n:1077D000F88F207C002808BFBDE8F88F7349C1F8F6\n:1077E0004461022814D0012818BFFFDFE16A6069F4\n:1077F000884298BFFFDF6069C9F80000A06B4FF4B2\n:10780000800140F48000A06369480160BDE8F88F02\n:107810006169E06A0844EFE738B5664D0024002846\n:1078200018BFC5F800426448006864498A7A012A92\n:1078300002D0022A03D018E00A7E12B915E04A7E6F\n:107840009AB18B7F012291F81FC002FA03F302FA6A\n:107850000CF21A434F4B1A6091F82010890001F185\n:10786000804101F5C041C1F810450121FFF759F9E8\n:10787000C5F80041C5F80C41C5F81041C5F80441F0\n:10788000C5F81441C5F818414D480068009038BD4E\n:10789000012804BF28207047022804BF1820704721\n:1078A000042812BF08284FF4A870704700B5FFDF06\n:1078B000282000BD012804BF41F6A47070470228AB\n:1078C00004BF41F288307047042804BF46F2180014\n:1078D0007047082804BF47F2A030704700B5FFDFAB\n:1078E00041F6A47000BD10B502280DD0012804BFD8\n:1078F00042F6CE3010BD042817BF082843F6A44036\n:10790000FFDF41F66A0010BD0CF07AFE30B90CF0D2\n:1079100084FE002808BF41F6583001D041F264309F\n:1079200041F29A01084410BD012812BF022800202C\n:107930007047042812BF08284FF4C870704700B57C\n:10794000FFDF002000BD1B490820C1F800021149DB\n:107950000F4808601C491B480860091D1B48086047\n:107960001C491B480860091D1B48086010494FF45A\n:10797000602008601149022088727047001400409E\n:107980001414004004150040005C0200485C020032\n:107990000000040408F50140085C02005414004093\n:1079A000185C0200285C0200385C02000080004085\n:1079B00004F501400010004040850040DC0B002031\n:1079C000181100400011004098F5014014100040CB\n:1079D0001C110040A8F50140101000401948016832\n:1079E00003291BBF006802280120002070471548AA\n:1079F00001680B291BBF00680A280120002070477E\n:107A000011490968C9B9114A1149136870B123F0C5\n:107A1000820343F07D0343F0004313600A6822F0C1\n:107A2000100242F0600242F0004205E023F0004301\n:107A300013600A6822F000420A60064981F83D009E\n:107A40007047000050150040881700403C17004068\n:107A50007C170040DC0B002010B53F4822210DF0C0\n:107A60000CFE3D480024017821F010010170012135\n:107A700006F064F839494FF6FF7081F82240888497\n:107A800037490880488010BD704734498A8C82424B\n:107A900018BF7047002081F822004FF6FF708884DD\n:107AA00070472D49016070472D49088070472B4968\n:107AB0008A8CA2F57F43FF3B03D00021016008467A\n:107AC000704791F822202549012A1ABF0160012040\n:107AD00000207047214901F1220091F82220012A5B\n:107AE00004BF00207047012202701D48008888846E\n:107AF000104670471A49488070471849184B8A8CBD\n:107B00005B889A4206D191F82220002A1EBF0160AC\n:107B100001207047002070471048114A818C52881C\n:107B2000914209D14FF6FF71818410F8221F19B1DB\n:107B30000021017001207047002070470748084A63\n:107B4000818C5288914205D190F8220000281CBFF8\n:107B50000020704701207047420C00201C0C0020C0\n:107B6000C80000207047574A012340B1012818BFC0\n:107B700070471370086890608888908170475370D0\n:107B80000868C2F802008888D08070474D4A10B15A\n:107B9000012807D00EE0507860B1D2F802000860EA\n:107BA000D08804E0107828B19068086090898880B7\n:107BB0000120704700207047424910B1012803D0CE\n:107BC00006E0487810B903E0087808B10120704752\n:107BD0000020704730B58DB00C4605460D2104A835\n:107BE0000DF06DFDE0788DF81F0020798DF81E00F6\n:107BF00060798DF81D002868009068680190A86879\n:107C00000290E868039068460CF062FB20789DF8CB\n:107C10002F1088420CD160789DF82E10884207D131\n:107C2000A0789DF82D10884202BF01200DB030BD14\n:107C300000200DB030BD30B50C4605468DB04FF07C\n:107C4000030104F1030012B1FEF7F8F801E0FEF7BA\n:107C500014F960790D2120F0C00040F040006071FF\n:107C600004A80DF02CFDE0788DF81F0020798DF828\n:107C70001E0060798DF81D002868009068680190EA\n:107C8000A8680290E868039068460CF021FB9DF814\n:107C90002F0020709DF82E0060709DF82D00A070C0\n:107CA0000DB030BD10B5002904464FF0060102D0DA\n:107CB000FEF7C4F801E0FEF7E0F8607920F0C000BC\n:107CC000607110BDCC000020FE48406870472DE96F\n:107CD000F0410F46064601461446012005F0F8FA29\n:107CE000054696F85500FFF7E5FD4AF2B121084434\n:107CF0004FF47A71B0FBF1F0718840F27122514378\n:107D0000C0EB4100001BA0F2653403F03DF80028F1\n:107D100018BF1E3CAF4234BF28463846A04203D2AB\n:107D2000AF422CBF3C462C467462BDE8F0812DE981\n:107D3000FF4F95B0044690F8550089461190DDE953\n:107D4000171008431390E048002605780C2D28BF33\n:107D5000FFDFDE4F37F8158094F874510C2D28BFE3\n:107D6000FFDFDA4830F8150040441FFA80F894F835\n:107D700065000D280CBF012000200C9017980028EA\n:107D800004BF94F8140103282BD10C9848B3B4F81D\n:107D90009601484525D1D4F81C01C4F80801608833\n:107DA00040F2E2414843C4F80C01B4F86201B4F86F\n:107DB000EE100844C4F81001204602F0EFFFB4F8BA\n:107DC0009A01E08294F898016075B4F89C01608093\n:107DD000B4F89E01A080B4F8A001E080022084F8ED\n:107DE0001401D4F86C011090D4F868010F90B4F825\n:107DF000EE70B4F86001D4F85C110891179921B1C4\n:107E000094F8281151B100F0DDB804F1E8010391B4\n:107E100074310D9104F5A475091D07E004F59E71F8\n:107E20000391091D0D9104F59675091D0E91B4F885\n:107E30005810A9EB0000A9EB01010FFA80FA0FFA24\n:107E400081FBBAF1000F05DAD4F85801089001203F\n:107E5000DA461390002002909B480079E8B3F3F7CC\n:107E600039FFD0B3B4F80001022836D394F81401D6\n:107E7000022832D094F82B0178BB94F87481B8F1C1\n:107E80000C0F28BFFFDF914830F8180000F5C860DC\n:107E90001FFA80F894F8140101287DD0618840F21F\n:107EA000E24041430020B8F1000F05D0884808FBAC\n:107EB00001F1B1FBF0F0401C07EB0B01A1EB0A0252\n:107EC000D4F81C1180B2431A029902FB03110291EB\n:107ED000C4F81C01012084F82B0194F81401002837\n:107EE00074D0012800F04682022800F09481032813\n:107EF00018BFFFDF00F078820298311A0898FCF76B\n:107F0000BCFB0D99012640F2712208600E98A0F882\n:107F10000090002028702E710D980068A86061887C\n:107F2000D4F81C015143C0EB41006749A0F2353041\n:107F30000862C969814287BF03990860039801609C\n:107F40000398616A0068084400F2A510E86002F036\n:107F50001BFF10B1E8681E30E8606E71B4F8D800FD\n:107F6000A0EB090000B20028C4BF032068710C9880\n:107F70000028189800F09A82D8B100BFB4F8001118\n:107F800000290CBF0020B4F80201A4F8020194F803\n:107F90000421401C504300E019E0884209D268796E\n:107FA000401E002805DD6E71B4F80201401CA4F8E3\n:107FB00002011798002800F0A18294F828010028F7\n:107FC00000F0988219B00220BDE8F08F65E094F8C7\n:107FD0006800032857D03B4894F8551090F83000BB\n:107FE00005F023FBE18A40F27122514300EB41018D\n:107FF0000020D4F80C21B8F1000F06D0344808FB5B\n:1080000002F2B2FBF0F000F10100D4F80831D4F82C\n:108010001021A0EB030C029BC4F8080102FB0C33F7\n:108020004FF0000007D000BF294808FB01F1B1FB69\n:10803000F0F000F10100D4F81811C4F81801A0EB19\n:1080400001011944608840F2E24300FB03F34FF062\n:10805000000006D01E4808FB03F3B3FBF0F000F16C\n:10806000010007EB0B03A3EB0A03A3EB0202D4F816\n:108070001C31A2F10102A0EB030302FB03110291E8\n:10808000C4F81C0126E7E18A40F27122D4F80C0101\n:1080900001FB02F100EB4101AAE70F98002808BF9D\n:1080A000FFDF94F85510074890F8300005F0BDFA4E\n:1080B0000790E18A40F271204143079800EB4101AB\n:1080C000002007E0640C0020DC000020585C020067\n:1080D00040420F00B8F1000F07D000BFFF4808FB77\n:1080E00001F1B1FBF0F000F10100C4F81801618862\n:1080F00040F2E24001FB00F14FF0000006D0F748EB\n:1081000008FB01F1B1FBF0F000F10100C4F81C0123\n:1081100086B221464FF00100D4F828A005F0D8F827\n:10812000074694F85500FFF7C5FB4AF2B12B5844B7\n:108130004FF47A78B0FBF8F0618840F27122514335\n:10814000C0EB4100801BA0F2653602F01DFE002846\n:1081500018BF1E3EBA4534BF38465046B04203D21F\n:10816000BA452CBF56463E46666294F85500FFF766\n:10817000DBFB00F2E140B0FBF8F10F980E1894F829\n:108180005500FFF7D1FB074694F85500FFF792FB27\n:1081900038444AF2AB310844B0FBF8F1E28A40F2CD\n:1081A000712042430798D4F8187100EB4200401A3E\n:1081B000C01B3044A0F12006617D40F2E24011FB7B\n:1081C00000FA94F85500009010F00C0F0ABF0098C8\n:1081D0004EF62830FFF76EFB5844B0FBF8F000EB8A\n:1081E000470000EB0A070098FFF752FB384400F104\n:1081F0006201BB48C16194F85500FFF795FB00F29E\n:10820000E140B0FBF8F10F980844301AB0F53D7F1B\n:1082100098BFFFDF70E6E18A40F27122D4F80C01CA\n:10822000514300EB41010020B8F1000F07D000BF1F\n:10823000AA4808FB01F1B1FBF0F000F10100C4F81D\n:108240001801608840F2E24100FB01F14FF00000AC\n:1082500006D0A24808FB01F1B1FBF0F000F10100EB\n:10826000C4F81C0186B221464FF00100D4F828A0C2\n:1082700005F02EF8804694F85500FFF71BFB4AF2F4\n:10828000B12B00EB0B014FF47A70B1FBF0F0618879\n:1082900040F271225143C0EB4100801BA0F26536D1\n:1082A00002F072FD002818BF1E3EC24534BF404692\n:1082B0005046B04203D2C2452CBF5646464666627F\n:1082C0000FBB1898F8B194F855603046FFF7F2FAF2\n:1082D00000EB0B014FF47A70B1FBF0F0D4F81811F9\n:1082E000E38A084440F27122D4F80C115A4301EB9E\n:1082F00042010F1A3046FFF7CBFA1099081A38449A\n:10830000A0F120060AE0E18A40F27122D4F80C01C3\n:10831000514300EB4100D4F81811461AD4F810214B\n:10832000D4F80811D4F8180101FB020A607D40F26C\n:10833000E24110FB01F894F8557017F00C0F0ABFDA\n:1083400038464EF62830FFF7B5FA00EB0B014FF434\n:108350007A70B1FBF0F000EB4A0080443846FFF73A\n:1083600097FA404400F160015D48C161012084F842\n:108370001401C1E5618840F271225143D4F81C0117\n:10838000D4F81021C0EB410101FB0AF607EB0B0109\n:10839000891AD4F808C1D4F81831491E0CFB0232EE\n:1083A00001FB002A607D40F2E24110FB01F894F8E5\n:1083B000557017F00C0F0ABF38464EF62830FFF7FD\n:1083C00079FA4AF2B12101444FF47A70B1FBF0F02E\n:1083D00000EB4A0080443846FFF75AFA404400F167\n:1083E00060013F48C16187E5628840F27121D4F89D\n:1083F0001C015143C0EB410000FB0AF694F86400F5\n:1084000024281CBF94F8650024280BD1B4F89601E9\n:10841000A9EB000000B2002804DB94F899010028C1\n:1084200018BF1190139800B3FFB9109800281ABF15\n:108430000F980028FFDF94F8550010F00C0F14BFC0\n:108440004EF62830FFF736FA4AF2B12101444FF4D4\n:108450007A70B1FBF0F0361A94F85500FFF718FA6D\n:108460001099081A3044A0F12006D4F81C1107EB2B\n:108470000B0000FB01F7119810F00C0F0ABF1198C8\n:108480004EF62830FFF716FA4AF2B12101444FF4B4\n:108490007A70B1FBF0F000EB47071198FFF7F8F99D\n:1084A000384400F160010E48C16125E500287FF4E1\n:1084B00065AD94F8140100283FF47BAD618840F26B\n:1084C0007122D4F81C015143C0EB4101284604F04D\n:1084D000CFFD0004000C3FF46CAD03E040420F0000\n:1084E000DC0000202299002918BF0880012019B063\n:1084F000BDE8F08F94F86401FCF723FF94F8640161\n:108500002946FCF703FE20B1179880F0010084F89B\n:10851000290119B00020BDE8F08F70B5FE4C607ADB\n:1085200000281CBF002070BD94F8340038B1A16B46\n:10853000606A884203D9F7F7BEF8002070BDA06AD0\n:10854000E8B1F6F750F90546F5F7C4FF284442F2C2\n:1085500010714618FCF790FB05462946E06AFDF7C6\n:10856000A4F8E562A16A8219914224BF081AA062A8\n:1085700005D20120A062F7F79EF8002070BD01200F\n:1085800070BDF8B5E44C02460025E44E6168606AAF\n:10859000052A4ED2DFE802F003353A3D4400A07AC6\n:1085A000002760B101216846FDF748FC9DF80000F6\n:1085B00042F210710002B0FBF1F201FB1207F6F774\n:1085C00012F9C119A069FCF758F8A06125740320BD\n:1085D00060757079002814BF012003202075607A2F\n:1085E00038B9207B04F11001FCF790FD002808BF8A\n:1085F000FFDF2584FCF74AFAB079BDE8F840EAF7D6\n:108600008BBCBDE8F840002100F0C7BDC1F868018F\n:10861000F8BDD1F86801BDE8F840012100F0BDBD0A\n:1086200084F83450FCF732FAB079BDE8F840EAF744\n:1086300073BCFFDFF8BD2DE9F04FDFF8DC820446A4\n:1086400083B098F800008B4601270025B34E4FF009\n:108650000209032804BF98F80C00A04240F0E7800C\n:10866000D8F80400B06198F80000032818BFFFDFB5\n:108670000324BBF1080F80F0D680DFE80BF0040F75\n:1086800031312CD4D4CBC8F82450F6F783FC002821\n:1086900018BFFFDFB47003B0BDE8F08FF5F71AFF25\n:1086A0000446D8F81C00A04228BFC8F81C4005D2D8\n:1086B000201AFDF72EF8C8F81C4038B1F6F7E3FF92\n:1086C000002818BFFFDF03B0BDE8F08F03B0002023\n:1086D000BDE8F04F55E703B0BDE8F04FFEF7BCBD75\n:1086E00070794FF0010A002814BF0120032088F898\n:1086F000140088F8105098F8340042F2107B68B1EA\n:108700004FF47A71D8F81800FBF7B7FFC8F81800D3\n:10871000002108F1100004F0ABFC1CE001216846C8\n:10872000FDF782FB9DF800000002B0FBFBF10BFBA4\n:10873000110AF6F758F800EB0A018A46D8F8180033\n:10874000FBF79BFFC8F81800514608F1100004F031\n:108750008FFC00F1010AB8F82000411C0A293CBF37\n:108760005044A8F82000D8F8040038B1B8F8200028\n:10877000401C0A2828BF88F8159001D288F81540B7\n:1087800098F8090070BB98F8340040B1D8F8381058\n:10879000D8F82400884202D9F6F78DFF22E0D8F8F5\n:1087A000280058B3F6F71FF80446F5F793FE204467\n:1087B00000EB0B09FCF760FA04462146D8F82C00C0\n:1087C000FCF773FFC8F82C40D8F8281000EB09021A\n:1087D000914224BF081AC8F828000FD2C8F82870A0\n:1087E000F6F769FF98F80C00FCF727FA88F80050B4\n:1087F000B07903B0BDE8F04FEAF78EBB98F80C00F3\n:1088000008F11001FCF782FC002808BFFFDF03B06D\n:10881000BDE8F08F98F80C00FCF70FFA88F80050CC\n:1088200003B0BDE8F08FFFDF03B0BDE8F08F202C70\n:1088300028BFFFDFDFF8E880072138F81400FAF7D7\n:10884000D9F85FEA000A08BFFFDF202C28BFFFDF4E\n:1088500038F81400BAF80010884218BFFFDF5446F9\n:10886000C6F818A04FF0200ABBF1080F80F04A812B\n:10887000DFE80BF0049FA9A9A2F4F3F2C4F8685151\n:108880003581C4F86C5194F8290138B9FCF7F4F932\n:10889000D4F83411FCF709FF00281BDCB4F82611CA\n:1088A000B4F85800814206D1B4F8DC10081AA4F8D4\n:1088B000DE00204605E0081AA4F8DE00B4F8261110\n:1088C0002046A4F85810D4F85011C4F83411C0F858\n:1088D00058111DE0B4F82411B4F85800081AA4F88F\n:1088E000DE00B4F824112046A4F85810D4F834114E\n:1088F000C4F85011C4F85811D4F83C11C4F8E81069\n:10890000D4F84011C4F85C11B4F84411A4F8601113\n:1089100002F020F906E00000640C0020DC000020DA\n:10892000A00C0020FCF782F9804694F85500FEF771\n:10893000C1FF4AF2B12108444FF47A71B0FBF1F063\n:10894000D4F81C1140F27122084461885143C0EBF5\n:108950004100A0F1300AB8F1B70F98BF4FF0B70847\n:108960002146012004F0B4FC4044AAEB0000A0F230\n:108970001A38A2462146012004F0AAFC00F19C010D\n:10898000DAF82400884288BF451AC6F810804545A9\n:1089900028BF4546F560D4F85401A0F2A5107061D7\n:1089A000FCF750FE84F8287186F8029003B0BDE809\n:1089B000F08F02F0E4F901E0FEF74EFC84F8287134\n:1089C00003B0BDE8F08FFCF757F9D4F85821014601\n:1089D0001046FCF76AFE48B1628840F27123D4F871\n:1089E0001C115A43C1EB4201B0FBF1F094F8651041\n:1089F0000D290FD0B4F85820B4F826111318994255\n:108A0000AEBF481C401C1044A4F8260194F82A016B\n:108A100078B905E0B4F82601401CA4F8260108E066\n:108A2000B4F82601B4F8DC10884204BF401CA4F856\n:108A30002601B4F862010DF1040B401CA4F8620198\n:108A4000B4F88000B4F87E10401AB4F85810401EF4\n:108A500008441FFA80F912E046E03EE052E00023AD\n:108A60001A462046CDF800B0FFF761F9002804BF90\n:108A700003B0BDE8F08F012818BFFFDF25D0B4F8A0\n:108A80002611A9EB010000B20028E8DA082084F8DA\n:108A9000740084F87370204601F01EFE84F81451AF\n:108AA00094F864514FF6FF77202D00D3FFDF28F8AC\n:108AB000157094F86401FCF7C0F884F864A1B079EB\n:108AC00003B0BDE8F04FEAF727BAB4F82601BDF8C5\n:108AD00004100844A4F82601D1E7FEF75DFA03B0BC\n:108AE000BDE8F04FFEF7B8BB94F81401042818BF96\n:108AF000FFDF84F8145194F864514FF6FF77202D6E\n:108B0000D5D3D3E7FFDF03B0BDE8F08F10B5FA4C43\n:108B1000207850B101206072F6F7E5FD2078032837\n:108B200005D0207A002808BF10BD0C2010BD207B86\n:108B3000FCF707FC207BFCF752FE207BFCF77DF85E\n:108B4000002808BFFFDF0020207010BD2DE9F04F86\n:108B5000E94F83B0387801244FF0000840B17C72AF\n:108B60000120F6F7C0FD3878032818BF387A0DD0F9\n:108B7000DFF8889389F8034069460720F9F7C3FEB8\n:108B8000002818BFFFDF4FF6FF7440E0387BFCF78A\n:108B9000D8FB387BFCF723FE387BFCF74EF8002827\n:108BA00008BFFFDF87F80080E2E7029800281CBFBB\n:108BB00090F8141100292AD00088A0421CBFDFF8C9\n:108BC00040A34FF0200B3AD00721F9F713FF040020\n:108BD00008BFFFDF94F86401FCF701FE84F81481FC\n:108BE00094F864514FF6FF76202D28BFFFDF2AF856\n:108BF000156094F86401FCF720F884F864B16946C4\n:108C00000720F9F780FE002818BFFFDF12E0684652\n:108C1000F9F757FE0028C8D011E0029800281CBFC1\n:108C200090F81411002905D00088A0F57F41FF3984\n:108C3000CAD104E06846F9F744FE0028EDD089F86F\n:108C4000038087F8348087F80B8003B00020BDE8EC\n:108C5000F08F70B50446AB4890F80004AA4D400967\n:108C600095F800144909884218BFFFDF95F8140DE4\n:108C70004009A64991F800144909884218BFFFDF4E\n:108C80009E49002001228C7188700A7048700A7118\n:108C9000C870487198490870BDE8704056E7974918\n:108CA000087070472DE9F843934C064688462078B3\n:108CB000002867D19648FBF764FF2073202861D015\n:108CC000032766602770002565722572AEB1012109\n:108CD00006F58270FDF7D1F80620F9F733FE8146DC\n:108CE0000720F9F72FFE96F804114844B1FBF0F283\n:108CF00000FB1210401C86F80401FBF797FF40F2BE\n:108D0000F651884238BF40F2F65000F59F7086B2A7\n:108D1000F5F7E0FBE061F5F766FD4FF0010900288B\n:108D200033D084F80A90FBF7A7FF814601216846FB\n:108D3000FDF77AF89DF8000042F210710002B0FBD6\n:108D4000F1F201FB120081194846FBF796FCA06185\n:108D5000C4E90A8969484079002814BF012003202A\n:108D6000207567752574207B04F11001FCF7CEF99E\n:108D7000002808BFFFDF25840020F6F7B4FC0020A0\n:108D8000BDE8F8830C20BDE8F883FBF775FF31469A\n:108D9000FBF773FCA061A57284F83490A8F28B50A5\n:108DA000A562A063D6E7554948717047534948709A\n:108DB00070475249087170472DE9F0414F4C064603\n:108DC0002089401C2081D4E903516078D6F868716D\n:108DD00020B13A46284604F076F90546E068854217\n:108DE00005D06169281A08446061FCF72BFCE56036\n:108DF000AF4209D896F81401012805D0E078002880\n:108E000004BF0120BDE8F0810020BDE8F08110B56D\n:108E100004460846FEF74EFD4AF2B12108444FF4DD\n:108E20007A71B0FBF1F040F2E241614300F235307B\n:108E300081428CBF081A002010BD70B5044682B074\n:108E4000002084F8280194F8E600002807BF94F871\n:108E50001401032802B070BDFBF70EFFD4F85821AF\n:108E600001461046FCF721FC0028DCBF02B070BDB3\n:108E7000628840F27123D4F81C115A43C1EB4201BD\n:108E8000B0FBF1F0B4F85810401C0844A4F82401D9\n:108E9000B4F8DC00B4F82421801A00B20028DCBF4A\n:108EA00002B070BD012084F82A01B4F88000B4F843\n:108EB0007E2001AE801A401E084485B212E0009662\n:108EC000B4F82411002301222046FEF730FF0028C9\n:108ED00004BF02B070BD01281CD0022812BFFFDF02\n:108EE00002B070BDB4F82401281A00B20028BCBF3B\n:108EF00002B070BDE3E70000640C0020DC0000203D\n:108F0000A00C002001E000E00BE000E019E000E030\n:108F100037860100B4F82401BDF804100844A4F811\n:108F20002401DFE7F8B50422002506295BD2DFE83B\n:108F300001F007260319192A044680F8142107E0D6\n:108F40000446BD48C078002818BF84F814210AD010\n:108F5000FBF79CFDA4F86251B4F85800A4F8260170\n:108F600084F82A51F8BD0095B4F8DC1001230022E2\n:108F70002046FEF7DCFE002818BFFFDFE8E70321EC\n:108F800080F81411F8BD0646876AB0F81C01314616\n:108F900085B2012004F09CF9044696F85500FEF7CE\n:108FA00089FC4AF2B12108444FF47A71B0FBF1F028\n:108FB000718840F271225143C0EB4100401BA0F286\n:108FC000653501F0E1FE002818BF1E3DA74234BF01\n:108FD00020463846A84228BF2C4602D2A74228BFC6\n:108FE0003C467462F8BDFFDFF8BD2DE9F05F924E9C\n:108FF000B178022906BF31890029BDE8F09FB46924\n:10900000C4F86C0194F85500FEF742FCD4F86C11DA\n:10901000081AF1680144F160316908443061B469AB\n:1090200094F82B01002808BFBDE8F09F94F81401C4\n:10903000032818BFBDE8F09F94F8555036780C2EE1\n:1090400028BFFFDF7D4F37F8168094F874610C2E2F\n:1090500028BFFFDF37F81600404494F8748186B2C9\n:10906000B8F10C0F28BFFFDF37F8180000F5C86013\n:109070001FFA80F82846FEF70BFCD4F86C114FF06D\n:10908000000A0F1A15F00C0F0ABF28464EF62830BA\n:10909000FEF710FC4FF47A7900F2E730B0FBF9F0FC\n:1090A0003F1A2846FEF7F4FBD4F8E81015F00C0F31\n:1090B000A1EB000B0ABF28464EF62830FEF7FAFB5C\n:1090C0004AF2B1210844B0FBF9F0ABEB0000A0F18B\n:1090D00060017143B1FBF8F1292202EB50006031CD\n:1090E000A0EB510200EB5100BA4201D8B84201D8BE\n:1090F000F2F794FE608840F2E241414300202EB135\n:1091000006FB01F04E49B0FBF1F0401CC4F81C0115\n:1091100084F82BA1BDE8F09F70B50546464890F84D\n:1091200002C0BCF1020F07BF806900F5B474454866\n:1091300000F12404002904BF256070BD4FF47A7645\n:1091400001290DD002291CBFFFDF70BD1046FEF7BC\n:10915000CAFB00F2E140B0FBF6F0281A206070BDB7\n:109160001846FEF7E1FB00F2E140B0FBF6F0281AEA\n:10917000206070BD3348007800281CBF0020704775\n:1091800010B50720F9F7D0FB80F0010010BD2D4885\n:109190000078002818BF012070472DE9F843294CBA\n:1091A0000025814684F83450D4F8188084F83010B3\n:1091B000E5722570012727722946606803F0CDFA11\n:1091C0006168C1F85881267B81F86461C1F86891B3\n:1091D000C1F85C81B1F80080202E28BFFFDF1A485B\n:1091E00020F81680646884F814510023A4F86051B4\n:1091F0001A46194620460095FEF799FD002818BF2B\n:10920000FFDFC4F81051C4F8085184F81471A4F8B1\n:109210002651A4F8245184F82A51B4F85800401E6D\n:10922000A4F85800A4F86251FBF730FC024880799A\n:10923000BDE8F843E9F770BEDC000020585C02008E\n:1092400040420F00640C0020A00C0020012804D034\n:10925000022805D0032808D105E0012907D004E041\n:10926000022904D001E0042901D000207047012028\n:1092700070472DE9F0410E46044604F07CFD05469A\n:10928000204604F07CFD044604F097F8FE4F0100F0\n:1092900015D0386990F854208A4210D090F8AC313B\n:1092A0001BB190F8AE3123421FD02EB990F8513047\n:1092B000234201D18A4218D890F8AC01A8B12846BF\n:1092C00004F07BF870B1396991F85520824209D0D9\n:1092D00091F8AC0118B191F8AF01284205D091F88E\n:1092E000AC0110B10120BDE8F0810020FBE730B5F2\n:1092F000E54C85B0E06900285DD0142168460CF08B\n:10930000DEF9206990F85500FEF7D4FA4FF47A712F\n:1093100000F5FA70B0FBF1F5206990F85500FEF702\n:10932000B7FA2844ADF8060020690188ADF80010AE\n:10933000B0F85810ADF804104188ADF8021090F85C\n:109340008E0130B1A069C11C039104F0F5FB8DF8CA\n:109350001000206990F88D018DF80800E1696846D9\n:1093600088472069002180F88E1180F88D110399BB\n:10937000002920D090F88C1100291CD190F864109D\n:10938000272918D09DF81010039A002913D01378BC\n:109390000124FF2B11D0072B0DD102290BD15178BD\n:1093A000FF2908D180F88C410399C0F890119DF8ED\n:1093B000101080F88F1105B030BD1B29F2D9FAE7E3\n:1093C00070B5B14C206990F865001B2800D0FFDF14\n:1093D0002069002580F88D5090F8C00100B1FFDFB2\n:1093E000206990F88E1041B180F88E500188A0F865\n:1093F000C41180F8C2510E2108E00188A0F8C41100\n:1094000080F8C251012180F8C6110D2180F8C011E9\n:109410000088F9F721FCF9F7B9F82079E9F77CFD24\n:10942000206980F8655070BD70B5974CA0798007B1\n:109430002CD5A078002829D162692046D37801690B\n:109440000D2B01F158005FD00DDCA3F102034FF0AA\n:1094500001050B2B19D2DFE803F01A1844506127DD\n:10946000182C183A6400152B6FD008DC112B4BD048\n:10947000122B5AD0132B62D0142B06D166E0162B78\n:1094800071D0172B70D0FF2B6FD0FFDF70BD91F81C\n:1094900067200123194603F081FD0028F6D12169D8\n:1094A000082081F8670070BD1079BDE8704001F0B8\n:1094B00008BD91F86600C00700D1FFDF01F0C0FCD5\n:1094C000206910F8661F21F00101017070BD91F84C\n:1094D0006500102800D0FFDF2069112180F88D5031\n:1094E00008E091F86500142800D0FFDF20691521FD\n:1094F00080F88D5080F8651070BD91F865001528D2\n:1095000000D0FFDF172005E091F86500152800D096\n:10951000FFDF1920216981F8650070BDBDE870404A\n:109520004EE7BDE8704001F0A0BC91F86420012333\n:10953000002103F033FD00B9FFDF0E200FE011F82A\n:10954000660F20F0040008701DE00FE091F8642021\n:109550000123002103F022FD00B9FFDF1C20216957\n:1095600081F8640070BD12E01BE022E091F8660013\n:10957000C0F30110012800D0FFDF206910F8661F3A\n:1095800021F010010170BDE8704001F059BC91F864\n:1095900064200123002103F001FD00B9FFDF1F203B\n:1095A000DDE791F86500212801D000B1FFDF22201E\n:1095B000B0E7BDE8704001F04FBC3348016991F855\n:1095C0006620130702D501218170704742F008021E\n:1095D00081F866208069C07881F8C90001F027BC55\n:1095E00010B5294C21690A88A1F8042281F80202E9\n:1095F00091F8540001F009FC216981F8060291F804\n:10960000550001F002FC216981F80702012081F870\n:109610000002002081F8AC012079BDE81040E9F794\n:109620007BBCF0B4184C206900F5DA730188198509\n:10963000018E5985818E9985018FB0F84420914221\n:1096400000D31146D985828FB0F846108A4200D2E5\n:109650001146198690F855204FF0010512F00C0FB5\n:109660004FF4296203D0914200D81146198690F830\n:10967000540010F00C0F04D0988D904200D902468F\n:109680009A8583F8265001E0000100202079F0BC83\n:10969000E9F742BC10B5F84C01230921206990F884\n:1096A0006420583003F07AFC38B12169002001F8B9\n:1096B0007C0F087301F8180C10BD0120A07010BDBC\n:1096C00070B5ED4D012329462869896990F8642019\n:1096D00009790E2A01D1122903D000241C2A03D0B3\n:1096E00004E0BDE87040D5E7142902D0202A08D054\n:1096F00009E080F8644080F88840BDE8704001F0DF\n:1097000003BC162906D0262A01D1162902D0172912\n:1097100009D00CE000F8644F80F8244040782128FC\n:109720000CD01A2017E090F86520222A07D0EA69A9\n:10973000002A03D0FF2901D180F88E3112E780F88A\n:10974000654001F07DFB286980F87D4090F8AC0110\n:109750000028F3D00020BDE8704041E72DE9F84330\n:10976000C54C206990F86410202909D05FF00007EB\n:1097700090F86510222905D07FB300F1640503E05D\n:109780000127F5E700F1650510F8961F41F0040187\n:109790000170A06904F0FBFA4FF00108002608B33D\n:1097A0003946A069FFF765FDE0B16A46A169206905\n:1097B00003F012FE90B3A06904F0E7FA2169A1F862\n:1097C0009601B1F8581001F014FB40B3206928212C\n:1097D00080F8741080F8738058E0FFE70220A070D2\n:1097E000BDE8F883206990F8AC0110B11E20FFF7A6\n:1097F000F7FEAFB1A0692169C07881F8CA0008FA04\n:1098000000F1C1F3006000B9FFDF20690A2180F890\n:10981000641090F8880040B9FFDF06E009E02AE014\n:109820002E7001F00DFBFFF7C8FE206980F87D6007\n:10983000D6E7226992F8AC0170B1B2F8583092F8CC\n:109840005410B2F8B00102F5CB7203F0B7FE68B164\n:109850002169252081F86400206900F1650180F804\n:109860007D608D4212D180F865600FE00020FFF727\n:10987000B7FE2E70F0E720699DF8001080F898116F\n:109880009DF8011080F8991124202870206900F1BA\n:1098900065018D4203D1BDE8F84301F0D1BA80F8EB\n:1098A00088609DE770B5744C01230B21206990F806\n:1098B0006520583003F072FB202650BB206901233D\n:1098C000002190F86520583003F068FB0125F0B1C5\n:1098D000206990F8640024281BD0A06904F035FAB0\n:1098E000C8B1206990F8961041F0040180F89610F4\n:1098F000A1694A7902F0070280F85120097901F044\n:10990000070180F8501090F8AD311BBB06E0A57040\n:1099100028E6A67026E6BDE870404EE690F8AC3129\n:10992000C3B900F154035E788E4205D11978914293\n:1099300002D180F87D500DE000F5FD710D700288B8\n:109940004A8090F850200A7190F8510048712079AF\n:10995000E9F7E2FA2169212081F86500BDE870404D\n:1099600001F065BA70B54448006990F84E20448E05\n:10997000C38E418FB0F84050022A23D0A94200D3B1\n:1099800029460186C18FB0F84220914200D311468A\n:109990008186018FB0F84420914200D31146418660\n:1099A000818FB0F84620914200D31146C186418E86\n:1099B000A14200D90C464486C18E994200D90B467B\n:1099C000C386CFE5028E914200D31146C68F828EA8\n:1099D000964200D23246A94200D329460186B0F809\n:1099E00042108A4200D30A468286002180F84E1037\n:1099F000CFE770B5204C206990F8660010F0300F6A\n:109A000004D0A07840F00100A070ABE5A06904F09C\n:109A100081F948B32569A06904F078F92887256998\n:109A2000A06904F06FF968872569A06904F070F9EE\n:109A3000A8872569A06904F067F9E887A0794FF045\n:109A40000102800703D56069C07814280FD020690F\n:109A500090F864101C290AD090F84E10012910D0FB\n:109A600090F8A31169B909E0BDE87040A5E5206947\n:109A700080F84E2005E000000001002090F8A211BF\n:109A800031B1206910F8661F41F01001017016E035\n:109A900090F8661041F0200180F8661000F5DA7148\n:109AA00003888B86038FCB86438F0B87838F4B87EF\n:109AB000C08F888781F832202079E9F72DFABDE838\n:109AC000704001F0B4B970B5FE4C206990F8661092\n:109AD000890707D590F8642001230821583003F046\n:109AE0005DFAE8B1206990F89000800712D4A0696F\n:109AF00004F0ECF8216981F89100A06930F8052F95\n:109B0000A1F892204088A1F8940011F8900F40F03D\n:109B100002000870206990F89010C90703D00FE088\n:109B20000120A0701EE590F86600800700D5FFDFD9\n:109B3000206910F8661F41F00201017001F077F909\n:109B40002069002590F86410062906D180F8645039\n:109B500080F888502079E9F7DFF9206990F89411AE\n:109B60000429DFD180F894512079E9F7D5F92069EB\n:109B700090F864100029D5D180F88850F2E470B5CF\n:109B8000D04C01230021206990F86520583003F063\n:109B900005FA012578B9206990F86520122A0AD0C3\n:109BA00001230521583003F0F9F910B10820A07005\n:109BB000D8E4A570D6E4206990F88E0008B901F0C9\n:109BC00036F92169A069F03104F061F82169A069D2\n:109BD000C03104F067F8206990F8C80100B1FFDFD8\n:109BE00021690888A1F8CA0101F5E671A06904F0AD\n:109BF0003CF82169A06901F5EA7104F03EF820699A\n:109C000080F8C851142180F865102079BDE87040B3\n:109C1000E9F782B970B5AB4C01230021206990F8B7\n:109C20006520583003F0BAF90125A8B1A06903F006\n:109C3000E8FF98B1A0692169B0F80D00A1F896017C\n:109C4000B1F8581001F0D5F858B12069282180F8F2\n:109C5000741080F8735085E4A57083E4BDE870400B\n:109C6000ABE4A0692169027981F89821B0F8052058\n:109C7000A1F89A2103F0B8FF2169A1F89C01A0691D\n:109C800003F0B5FF2169A1F89E01A06903F0B6FFBA\n:109C90002169A1F8A0010D2081F8650062E47CB57E\n:109CA000884CA079C00738D0A06901230521C57868\n:109CB000206990F86520583003F070F968B1AD1E46\n:109CC0000A2D06D2DFE805F0090905050909050591\n:109CD0000909A07840F00800A070A07800281CD1E5\n:109CE000A06903F057FF00287AD0A0690226C57842\n:109CF0001DB1012D01D0162D18D1206990F86400F6\n:109D000003F034F990B1206990F864101F290DD048\n:109D1000202903D0162D16D0A6707CBD262180F8F0\n:109D20006410162D02D02A20FFF75AFC0C2D58D0B3\n:109D30000CDC0C2D54D2DFE805F033301D44A7A70E\n:109D4000479E57A736392020A0707CBD0120152DD5\n:109D500075D008DC112D73D0122D69D0132D64D06D\n:109D6000142D3DD178E0162D7CD0182D7DD0FF2DFF\n:109D700036D183E020690123194690F867205830D6\n:109D800003F00CF9F8B9A06903F068FF216981F8C4\n:109D90007A01072081F8670078E001F03CF975E06E\n:109DA000FFF738FF72E001F016F96FE0206990F8D4\n:109DB0006510112901D0A67068E0122180F86510A5\n:109DC00064E0FFF7DCFE61E0206990F86500172889\n:109DD000F1D101F035F821691B2081F8650055E0CB\n:109DE00052E0FFF770FE51E0206990F86600C0076E\n:109DF00003D0A07840F001001FE06946A06903F09D\n:109E00006CFF9DF8000000F02501206900F8961F06\n:109E10009DF8011001F04901417001F008F8206936\n:109E200010F8661F41F0010114E0FFF733FC2DE04C\n:109E3000216991F86610490705D5A07026E00EE06B\n:109E400016E00FE011E000F0F2FF206910F8661F45\n:109E500041F00401017019E0FFF7CBFD16E001F0BD\n:109E600087F813E0FFF71EFD10E0FFF777FC0DE029\n:109E700001F05DF80AE0FFF723FC07E0E16919B1A2\n:109E8000216981F88E0101E0FFF797FB2069F0E975\n:109E90002A12491C42F10002C0E900127CBD70B5D3\n:109EA000084CA07900074DD5A07800284AD1206938\n:109EB00090F8CC00FE2800D1FFDF2069FE2180F859\n:109EC000CC1001E00001002090F865100025192950\n:109ED00006D180F88D5000F0B3FF206980F86550FE\n:109EE000206990F864101F2902D0272921D119E098\n:109EF00090F8650003F03AF878B120692621012333\n:109F000080F8641090F865200B21583003F046F873\n:109F100078B92A20FFF764FB0BE02169202081F843\n:109F2000640006E0012180F88D1180F8645080F80B\n:109F30008850206990F86710082903D10221217008\n:109F400080F8CC10E4E4F949096991F898210AB93C\n:109F500091F8542081F8542091F899210AB991F888\n:109F6000552081F85520002802D00020FFF738BB8B\n:109F7000704770B5ED4C06460D46206990F8CC0050\n:109F8000FE2800D0FFDF2269002082F8CC6015B1E6\n:109F9000A2F88A00BCE422F8840F01201071B7E413\n:109FA00070B5E24C01230021206990F864205830FC\n:109FB00002F0F4FF00287AD0206990F8A21111B1C4\n:109FC00090F8A31139B190F8AC1100296ED090F837\n:109FD000AD1111B36AE090F8651024291BD090F8F8\n:109FE0006410242917D0002300F5CC7200F5D1713C\n:109FF00003F084F82169002081F8A20101461420B1\n:10A00000FFF7B7FF206930F8421FA0F88C10818855\n:10A01000A0F88E1050E00123E6E790F865200123B8\n:10A020000B21583002F0BAFF68BB206990F8540049\n:10A0300000F0EBFE0646206990F8550000F0E5FEC2\n:10A040000546206990F8AE113046FFF7FFF8D8B109\n:10A05000206990F8AF112846FFF7F8F8A0B12269FF\n:10A06000B2F8583092F85410B2F8B00102F5CB7241\n:10A0700003F0A4FA20B12169252081F864001BE0D7\n:10A080000020FFF7ADFA11E020690123032190F8C9\n:10A090006520583002F082FF40B920690123022177\n:10A0A00090F86520583002F079FF08B100202FE4C5\n:10A0B00000211620FFF75DFF012029E410B5E8BB61\n:10A0C0009A4C206990F86610CA0702D00121092035\n:10A0D00052E08A070AD501210C20FFF74AFF2069C8\n:10A0E00010F8901F41F00101017047E04A0702D5C6\n:10A0F0000121132040E00A0705D510F8C91F41715E\n:10A100000121072038E011F0300F3BD090F8A31167\n:10A11000A1B990F8A211E1B190F8651024292FD0CF\n:10A1200090F8641024292BD05FF0000300F5CC7266\n:10A1300000F5D17102F0E2FF206900E022E010F8A2\n:10A14000661F21F0200141F010010170002180F80C\n:10A150003C11206990F86600C00613D5FFF702FC99\n:10A1600000F0D2FE206930F8421FA0F88C108188E0\n:10A17000A0F88E1001211520FFF7FBFE012010BD75\n:10A180000123D3E7002010BD70B5684C206990F81A\n:10A19000CC10FE2978D1A178002975D190F86720DC\n:10A1A00001231946583002F0F9FE00286CD12069CD\n:10A1B00090F8781149B10021A0F8821090F8791137\n:10A1C00080F8CE10002102205BE090F8652001238A\n:10A1D0000421583002F0E2FE0546FFF76FFF002829\n:10A1E00052D1284600F07BFF00284DD12069012381\n:10A1F000002190F86420583002F0D0FE78B1206938\n:10A200000123042190F86520583002F0C7FE30B9D0\n:10A21000206990F87C0010B10021122031E0206903\n:10A2200090F864200A2A0DD0002D2DD101230021A1\n:10A23000583002F0B3FE78B1206990F894110429E7\n:10A240000AD105E010F8CA1F01710021072018E0AB\n:10A2500090F89000800718D0FFF7A2FE002813D1D5\n:10A2600020690123002190F86420583002F096FE06\n:10A27000002809D0206990F88C01002804D0002122\n:10A28000FF20BDE8704074E609E000210C20FFF7D4\n:10A2900070FE206910F8901F41F00101017041E447\n:10A2A0003EB505466846FDF702FC00B9FFDF2221F6\n:10A2B00000980BF0E2F90321009803F053FC00989A\n:10A2C000017821F010010170294603F070FC174C51\n:10A2D0000D2D43D00BDCA5F102050B2D19D2DFE8C3\n:10A2E00005F01F184A19191F185518192700152DA0\n:10A2F0005DD008DC112D28D0122D0BD0132D09D0E4\n:10A30000142D06D153E0162D2CD0172D68D0FF2D1B\n:10A3100072D0FFDFFDF7DEFB002800D1FFDF3EBD7E\n:10A320002169009891F8CE101AE000000001002089\n:10A33000E26800981178017191884171090A817170\n:10A340005188C171090A0172E4E70321009803F002\n:10A3500038FD0621009803F038FDDBE70098062160\n:10A360000171D7E70098216991F8AE21027191F847\n:10A37000AF114171CEE721690098F83103F096FCE6\n:10A3800021690098C43103F09BFCC3E7F849D1E987\n:10A390000001CDE90101206901A990F8960000F0C3\n:10A3A00025008DF80400009803F0C5FCB2E7206991\n:10A3B000B0F84410009803F095FC2069B0F8D01074\n:10A3C000009803F093FC2069B0F84010009803F067\n:10A3D00091FC2069B0F8CE10009803F08FFC99E74B\n:10A3E000216991F8AC0100280098BDD111F8542FD3\n:10A3F00002714978BDE7FFE7206990F88F21D0F816\n:10A400009011009803F0E1FB84E7DA4810B5006989\n:10A4100090F86A1041B990F8652001230621583060\n:10A4200002F0BCFD002800D0012010BD70B5D14D58\n:10A43000286990F8681039B1012905D0022906D0A1\n:10A44000032904D0FFDF06E4B0F8DC1037E090F811\n:10A450006710082936D0B0F87E10B0F880200024AC\n:10A460008B1C9A4206D3511A891E0C04240C01D06D\n:10A47000641EA4B290F87C1039B190F864200123D6\n:10A480000921583002F08AFD40B3FFF7BEFF78B1D2\n:10A4900029690020B1F87820B1F876108B1C9A4217\n:10A4A00003D3501A801E00D0401EA04200D284B2B6\n:10A4B0000CB1641EA4B22869B0F8DC102144A0F8E5\n:10A4C000D8103FE5B0F87E100329BDD330F8581FEF\n:10A4D000028D1144491CA0F8801033E50024EAE7FE\n:10A4E00070B50C4605464FF4027120460BF0E7F8B4\n:10A4F000258027E5F8F787BB2DE9F0410D46074693\n:10A500000721F8F777FA041E3CD094F8B40100262E\n:10A51000A8B16E70092028700BE0268484F8B4611D\n:10A52000D4F8B6016860D4F8BA01A860B4F8BE01E6\n:10A53000A88194F8B4010028EFD12E71BAE094F804\n:10A54000C00190B394F8C0010D2813D00E2801D09B\n:10A55000FFDFAFE02088F8F77FFB0746F8F72BF81E\n:10A5600078B96E700E20287094F8C2012871208886\n:10A57000E88014E02088F8F76FFB0746F8F71BF82F\n:10A5800010B10020BDE8F0816E700D20287094F8A5\n:10A59000C20128712088E88094F8C601287284F8E6\n:10A5A000C0613846F8F701F884E0FFE794F8F80155\n:10A5B00030B16E701020287084F8F861AF8079E0B7\n:10A5C00094F8C80190B16E700A2028702088A88085\n:10A5D000D4F8CC11C5F80610D4F8D011C5F80A107B\n:10A5E000B4F8D401E88184F8C86163E094F8D60136\n:10A5F00040B16E701A202870B4F8D801A88084F891\n:10A60000D66157E094F8F20170B16E701B2028708B\n:10A6100005E000BF84F8F261D4F8F401686094F8B2\n:10A62000F2010028F6D145E094F8DA0190B16E709D\n:10A630001520287004F5EE7707E000BF84F8DA6192\n:10A640000A223946281D0AF0DEFF94F8DA010028B4\n:10A65000F4D12FE094F8E60158B16E701D202870F7\n:10A6600084F8E6610A2204F5F471281D0AF0CBFF94\n:10A6700020E094F8FA0138B11E20287084F8FA61BD\n:10A68000D4F8FC01686015E094F8000200283FF45B\n:10A6900079AF6E701620287008E000BF84F8006261\n:10A6A000D4F802026860B4F80602288194F8000227\n:10A6B0000028F3D1012065E72E480021C161016225\n:10A6C0000846704730B52B4D0C46E860FFF7F4FFA5\n:10A6D00000B1FFDF2C7130BD002180F8641080F8DC\n:10A6E000651080F8681090F8E61009B1022100E0CA\n:10A6F0000321FEF717BC2DE9F0411E4C05462069E9\n:10A7000009B1002104E0B0F8EE10B0F8DE201144E9\n:10A71000A0F8EE1090F8781139B990F8672001236D\n:10A720001946583002F03AFC30B1206930F8821FE7\n:10A73000B0F85C2011440180206990F8883033B172\n:10A74000B0F88410B0F8DE201144A0F8841090F91D\n:10A750008C70002F06DDB0F88A10B0F8DE201144AE\n:10A76000A0F88A1001213D2635B180F8746017E009\n:10A77000705C0200000100202278022A0AD0012A1F\n:10A7800011D0A2782AB380F8731012F0140F0DD0F4\n:10A790001E2113E090F8CE20062A3CD016223AE083\n:10A7A00080F8731044E090F87A2134E0110702D564\n:10A7B00080F874603CE0910603D5232180F8741082\n:10A7C00036E0900700D1FFDF21692A2081F874006C\n:10A7D0002AE02BB1B0F88420B0F886309A4210D22B\n:10A7E000002F05DDB0F88A20B0F886309A4208D2F2\n:10A7F000B0F88230B0F88020934204D390F87831DA\n:10A800000BB1222207E090F868303BB1B0F87E30FF\n:10A81000934209D3082280F87420C1E7B0F87E2063\n:10A82000062A01D33E22F6E7206990F8731019B189\n:10A830002069BDE8F0414FE7BDE8F0410021FEF797\n:10A8400071BB2DE9F047FA4C81460D46206900881E\n:10A85000F8F714FA060000D1FFDFA0782843A070B3\n:10A86000A0794FF000058006206904D5A0F87E503D\n:10A8700080F8EC5003E030F87E1F491C0180FFF7A0\n:10A88000C4FD012740B3E088000506D5206990F893\n:10A890006A1011B1A0F876501EE02069B0F8761069\n:10A8A000491C89B2A0F87610B0F878208A4201D30A\n:10A8B000531A00E00023B4F808C00CF1050C6345FE\n:10A8C00001D880F87C70914206D3A0F8765080F8C9\n:10A8D000F8712079E8F720FBA0794FF0020810F01A\n:10A8E000600F0ED0206990F8681011B1032908D1CB\n:10A8F00002E080F8687001E080F868800121FEF7CE\n:10A9000011FB206990F86810012904D1E188C9057C\n:10A9100001D580F86880B9F1000F71D1E18889050F\n:10A9200002D5A0F8005104E0B0F80011491CA0F8CD\n:10A93000001100F09BFBFEF7DAFCFFF725FC00F0AE\n:10A9400057FF0028206902D0A0F8E05003E030F85B\n:10A95000E01F491C018000F04EFF38B1216991F8D9\n:10A96000EC00022807D8401C81F8EC00206990F820\n:10A97000EC00022804D9206920F8E05F45800573C7\n:10A9800020690123002190F86520583002F006FB71\n:10A9900020B9206990F865000C2859D1206901235D\n:10A9A000002190F86420583002F0F8FA48B320698A\n:10A9B0000123002190F86720583002F0EFFA00B32D\n:10A9C000206990F86810022942D190F8EC00C0B9D3\n:10A9D0003046F7F7C0FBA0B1216991F8CC00FE2802\n:10A9E00036D1B1F8DA00012832D981F8E570B1F832\n:10A9F0008000B1F87E20831E9A4203DB012004E030\n:10AA000032E025E0801A401E80B2B1F8E0202389B0\n:10AA10009A4201D3012202E09A1A521C92B2904249\n:10AA200000D91046012801D181F8E55091F8702134\n:10AA300092B1B1F8E220B1F872118A4201D301213A\n:10AA400002E0891A491C89B2884205D9084603E008\n:10AA50002169012081F8E5502169B1F8582010449E\n:10AA6000A1F8DC00FFF7E2FCE088C0F34021484693\n:10AA7000FFF741FE206980F8E650BDE8F047FDF79A\n:10AA80004BB86B4902468878CB78184312D10846F8\n:10AA9000006942B18979090703D590F86700082851\n:10AAA00008D001207047B0F84810028E914201D8BA\n:10AAB000FEF782B90020704770B55D4C05460E4622\n:10AAC000E0882843E080A80703D5E80700D0FFDF2F\n:10AAD0006661EA074FF000014FF001001AD0A6614D\n:10AAE000F278062A02D00B2A14D10AE0226992F8E1\n:10AAF0006530172B0ED10023E2E9283302F8370C1A\n:10AB000008E0226992F86530112B03D182F86910B0\n:10AB100082F88E00AA0718D56269D278052A02D079\n:10AB20000B2A12D10AE0216991F86520152A0CD16F\n:10AB30000022E1E92A2201F83E0C06E0206990F8A3\n:10AB40006520102A01D180F86A10280601D5082056\n:10AB5000E07078E42DE9F84F354C00254FF00108FE\n:10AB6000E580A570E5704146257061F3070220611C\n:10AB70009246814680F8E6800088F8F77FF8070063\n:10AB800000D1FFDF20690088FCF78EFF2069008874\n:10AB9000FCF7B0FF2069B0F8DA1071B190F8CC1072\n:10ABA000FE290FD190F8781191B190F86720012318\n:10ABB0001946583002F0F2F980B1206990F8CC00C3\n:10ABC000FE2805D0206990F8CC0000BFFFF768FB95\n:10ABD000206990F8E71089B1258118E02069A0F874\n:10ABE000825090F8791180F8CE1000210220FFF7F2\n:10ABF000C0F9206980F8E5500220E7E790F8B41129\n:10AC000019B9018C8288914200D881882181B0F8DD\n:10AC1000DE10491E8EB2B0F8E0103144A0F8E0100A\n:10AC200090F8E41031B1A0F8E25080F8E45006E06A\n:10AC300000010020B0F8E2103144A0F8E21030F832\n:10AC40007E1F31440180FFF7E0FB20B1206930F81E\n:10AC5000761F314401802069B0F8DA10012902D84A\n:10AC6000491CA0F8DA100EB180F8EC5090F8E5100D\n:10AC7000A1B1B0F8E000218988420FD23846F7F739\n:10AC80006AFA58B1206990F8701139B1B0F8E21041\n:10AC9000B0F87201814201D300F0B0FD206980F864\n:10ACA000E55090F865100B2901D00C2916D1B0F8A9\n:10ACB0005820B0F89631D21A12B2002A0EDBD0F822\n:10ACC0009811816090F89C110173022101F045FDFB\n:10ACD000206980F8655080F8988026E0242910D1FA\n:10ACE000B0F85810B0F89621891A09B2002908DB8B\n:10ACF00090F8AC01FFF727F9206900F8655F057649\n:10AD000013E090F86410242901D025290DD1B0F862\n:10AD10005810B0F89601081A00B2002805DB01208F\n:10AD2000FFF711F9206980F8645020690146B0F8F6\n:10AD3000DE20583001F0E9FE206990F8701109B169\n:10AD4000A0F8E250F9480090F94BFA4A49465046BB\n:10AD500000F0AEFC216A11B16078FCF7F3F92069CC\n:10AD60000123052190F86520583002F017F90028DA\n:10AD700003D0BDE8F84F00F036BABDE8F88F00F018\n:10AD80001DBDED49C8617047EB48C069002800D07F\n:10AD900001207047E84A50701162704710B50446B0\n:10ADA000B0F89C214388B0F89E11B0F8A0019A42F7\n:10ADB00005D1A388994202D1E38898420FD0238815\n:10ADC000A4F8B831A4F8BA21A4F8BC11A4F8BE01C3\n:10ADD000012084F8B401D8480079E8F79DF80121F2\n:10ADE000204601F0BAFC002004F8650F0320E07053\n:10ADF00010BD401A00B247F6FE71884201DC0028FF\n:10AE000001DC012070470020704710B5012808D0F0\n:10AE1000022808D0042808D0082806D0FFDF2046E2\n:10AE200010BD0124FBE70224F9E70324F7E7C24839\n:10AE30000021006920F88A1F8178491C81707047C1\n:10AE4000BD4800B5016911F88C0F401E40B2087072\n:10AE5000002800DAFFDF00BDB7482721006980F82D\n:10AE60006410002180F88C11704710B5B24C206935\n:10AE700090F89411042916D190F864200123002140\n:10AE8000583002F08BF800B9FFDF206990F890107D\n:10AE9000890703D4062180F8641004E0002180F8BB\n:10AEA000881080F89411206990F86600800707D513\n:10AEB000FFF7C6FF206910F8661F21F0020101703C\n:10AEC00010BD9D4910B5096991F864200A2A09D17D\n:10AED00091F8CA20824205D1002081F8640081F8EF\n:10AEE000880010BD91F86620130706D522F00800EF\n:10AEF00081F86600BDE81040A2E7FF2801D0FFDF1F\n:10AF000010BDBDE81040A7E710B58B4C05212069A6\n:10AF1000FEF708F8206990F84E10012903D0BDE82B\n:10AF20001040FEF77EBB022180F84E1010BD10B518\n:10AF3000814C206910F8961F41F004010170A0694E\n:10AF400002F041FF162806D1206990F864002028FD\n:10AF500002D0262805D010BDA06902F038FFFEF708\n:10AF60003FFB2169002081F8640081F8880010BD52\n:10AF700070B5714C01230A21206990F86420583083\n:10AF800002F00CF810B3A06902F0C4FEA8B1256964\n:10AF9000A06902F0BBFE28872569A06902F0B2FE15\n:10AFA00068872569A06902F0B3FEA8872569A069B2\n:10AFB00002F0AAFEE887FEF7D5FC2169002081F89F\n:10AFC000880081F86400BDE870409DE7A07840F0FB\n:10AFD0000100A070BDE510B5574C01230021206988\n:10AFE00090F86520583001F0D9FF30B1FFF71FFF0E\n:10AFF0002169102081F8650010BD20690123052119\n:10B0000090F86520583001F0C9FF08B1082000E031\n:10B010000120A07010BD70B5474C012300212069AC\n:10B0200090F86520583001F0B9FF012588B1A0697A\n:10B0300002F011FE2169A1F89601B1F85810FFF74E\n:10B04000D8FE40B12069282180F8741080F8735030\n:10B050007FE5A5707DE52169A06901F5CC7102F05D\n:10B06000F5FD21690B2081F8650072E510B5FEF74A\n:10B0700016FFFEF714FE304CA079400708D5A078E3\n:10B0800030B9206990F86700072801D101202070AD\n:10B09000FEF7CAF9A079C00609D5A07838B92069A9\n:10B0A00090F865100B2902D10C2180F86510E0782A\n:10B0B00000070ED520690123052190F8652058303E\n:10B0C00001F06CFF30B10820A0702169002081F8E8\n:10B0D000C00110BDBDE81040002000F093BB10B5CA\n:10B0E000154C216991F86520F8B1102A06D0142A70\n:10B0F00007D0152A22D01B2A34D122E001210B20AF\n:10B1000021E0FAF797FE0C281FD320690821F830B8\n:10B11000FAF794FE28B120690421C430FAF78EFEB4\n:10B1200000B9FFDF012104200DE010E043A8010079\n:10B1300083AA0100B9AA01000001002000F017F85D\n:10B1400003E001210620FEF714FF012010BD212A93\n:10B1500008D191F87D0038B991F8AC0110B191F89F\n:10B16000AD0108B1002010BD01211720EBE770B53B\n:10B17000174C0025206990F87B1101290AD002297B\n:10B1800025D190F88E10A9B1062180F8CE100121AA\n:10B19000022017E090F8C011002918D100F1B00387\n:10B1A00000F1F001002200F5BE7001F071FE0121F6\n:10B1B000052007E090F89600400701D5112000E037\n:10B1C0000D200121FEF7D5FE206980F87B51C0E4F7\n:10B1D0000001002030B5FA4C05462078002818BF41\n:10B1E000FFDF257230BDF6490120C87170472DE997\n:10B1F000F14FF44E30464068044600F1580990F88B\n:10B20000551001F0D2FF94F85510658E80B20829D0\n:10B210006CD001F0A8FF854238BF284600F0FF0837\n:10B22000DFF89CA3E848CAF824007768384697F806\n:10B230006AB07D8E97F8551001F0B7FF97F855105A\n:10B2400080B2082956D001F08EFF854238BF2846CB\n:10B25000BBF1000F1CBF001D80B2C0B297F85510A3\n:10B26000FBF770FB99F81200002847D009F158014C\n:10B27000D54891E80E1000F5027585E80E10D9F852\n:10B280006810C0F82112D9F86C10C0F8251200F52A\n:10B290008170FBF7BCFE307800280CBF0120002035\n:10B2A00080F00101C9480176D9E91412C0E90412FD\n:10B2B000A0F58372DAF82410FBF7DBF994F8550057\n:10B2C000012808BF00220CD0022808BF012208D0A4\n:10B2D000042808BF032204D008281ABFFFDF002279\n:10B2E000022241460120FBF7DFF90DE0042101F0C5\n:10B2F0003AFF90E7042101F036FFA6E7DAF82400D0\n:10B30000FBF785FEFBF7FCF9009850B994F855005F\n:10B3100094F8561010F00C0F08BF00219620FBF790\n:10B3200097FE94F8542001210020FBF779FF94F850\n:10B330002C00012808BFFBF743FF02208AF8000019\n:10B34000FCF74CFB002818BFFFDFBDE8F88F2DE9A4\n:10B35000F04FDFF870A28BB050469AF80020416899\n:10B360001438049091F85D0001F158050C464FF037\n:10B3700008080127AAF13406A0B3012800F00681CD\n:10B38000022800F00781032818BFFFDF00F01081BA\n:10B39000306A0423017821F008010170AA7908EAD3\n:10B3A000C202114321F004010170EA7903EA82022A\n:10B3B000114321F01001017095F80590F06AF6F73D\n:10B3C000DAFE8046FCF7BAFBB9F1020F00F000810B\n:10B3D000B9F1010F00F00081B9F1030F00F0008115\n:10B3E00000F003B9FFE72B7B4FF002094FF0000B91\n:10B3F000242B1CBF95F80DC0BCF1240F07D01F2BC8\n:10B4000018BF202B2AD0BCF1220F4DD077E091F845\n:10B41000540092B191F89811002974D0082818BFEF\n:10B42000042869D0082918BF042965D0012818BF4D\n:10B43000012953D04FF0020065E091F8FA1000297D\n:10B4400061D0082818BF042856D0082918BF04293D\n:10B4500052D0012818BF012940D0EBE7BCF1220FE0\n:10B4600022D0002A4BD091F8540091F8AE1111F07F\n:10B47000040F18BF41460CD0082818BF04283BD041\n:10B48000082918BF042937D0012818BF012925D061\n:10B49000D0E711F0010F18BF3946EDD111F0020FBE\n:10B4A00018BF4946E8D12EE04AB391F8540091F80C\n:10B4B000AE2191F8511002EA010111F0040F18BFFA\n:10B4C00041460ED0082818BF042815D0082918BFF7\n:10B4D000042911D0012818BF0129ABD14FF0010078\n:10B4E00011E011F0010F18BF3946EBD111F0020F36\n:10B4F00018BF4946E6D106E04FF0080003E091F896\n:10B5000054000428F8D001460290204601F058FE6D\n:10B5100080B2029901F027FE218E814238BF084691\n:10B52000ADF80C00A4F848000498FCF7E6FA60B106\n:10B53000B289316A42F48062B28172694FF48060EC\n:10B54000904703206871EF7022E709AA03A9F06A07\n:10B55000F6F74CFD306210B195F8351021B1049822\n:10B56000FCF79FFA6F7113E79DF8241031B9A0F82A\n:10B5700000B080F802B0012102F0F4FABDF80C101E\n:10B58000306A02F026FC85F8059001E70498FCF784\n:10B5900088FAFDE6B4F84800ADF8080009AA02A947\n:10B5A000F06AF6F723FD3062002808BFFFDFEFE600\n:10B5B0000498FCF7A2FA002808BFFFDFE8E60000C5\n:10B5C0002401002058010020E00C0020E80E00209B\n:10B5D00030EA080009D106E030EA080005D102E0AF\n:10B5E000B8F1000F01D0012100E00021306A02789B\n:10B5F00042EA01110170697C00291CBF69790129A7\n:10B600003DD005F15801FD4891E80E1000F5027893\n:10B6100088E80E10A96EC0F82112E96EC0F8251254\n:10B6200000F58170FBF7F3FC9AF8000000280CBFCE\n:10B6300001200020F2490876D5E91202C1E904028E\n:10B64000A1F5837101F58370326AFBF712F894F863\n:10B650005400012808BF00220CD0022808BF012294\n:10B6600008D0042808BF032204D008281ABFFFDF2F\n:10B6700000220222FB210020FBF716F803E0FBF773\n:10B68000C6FCFBF73DF8012194F855200846FBF76E\n:10B69000C7FD3771306A018831828078B0743770A5\n:10B6A000FCF7A5F9002818BFFFDF0BB0BDE8F08F4D\n:10B6B0002DE9F047D34C8146DDF8208020781E46E6\n:10B6C00017460D4628B9002F1CBF002EB8F1000FF9\n:10B6D00000D1FFDFC4F81C80C4E90D95C4E90576EC\n:10B6E0004FF00000E071A071E070A07020716071F7\n:10B6F000C54EA081E081307805F158072888F7F71A\n:10B70000BDFAE0622888F7F7A7FA2063FBF73EF955\n:10B7100095F95700FBF7DFF905F11200FBF75AFC2A\n:10B7200005F10E00FBF7DDF9307800280CBF03208F\n:10B730000120FBF769FCB87EFBF7DBF9FBF75EFC49\n:10B740003078002804BFFF2095F8544019D0BF7C02\n:10B750006C8E95F85510284601F027FD95F8551088\n:10B7600080B208291FD001F0FEFC014620468C4221\n:10B7700028BF0846002F1CBF001D80B2C0B295F83C\n:10B7800055402146FBF7DEF83078214680B1012094\n:10B79000FBF7A3FA7068D0F8E800FBF73BFCBDE8C4\n:10B7A000F047012023E5042101F0DDFC0146DDE73F\n:10B7B0000020FBF792FABDE8F047C8E5924800B5D3\n:10B7C00001783438007819B1022818BFFFDF00BDB6\n:10B7D000012818BFFFDF00BD8A4810B50078022895\n:10B7E00018BFFFDFBDE8104000F034BA00F032BAF5\n:10B7F0008448007970478348C078704781490120A8\n:10B80000487170472DE9F04706007F487D4D40683C\n:10B8100000F15804686A90F8019018BF012E03D116\n:10B82000296B09F069FB6870687800274FF0010800\n:10B83000A0B101283CD0022860D003281CBFFFDF44\n:10B84000BDE8F087012E08BFBDE8F087286BF6F74A\n:10B8500087FE287ABDE8F047E7F75EBB012E14D0DB\n:10B86000A86A002808BFFFDF6889C21CD5E9091053\n:10B8700009F084FEA86A686201224946286BF6F73F\n:10B88000EBFC022E08BFBDE8F087D4E91401401C90\n:10B8900041F10001C4E91401E079012801D1E77107\n:10B8A00001E084F80780287ABDE8F047E7F734BB69\n:10B8B000012E14D0A86A002808BFFFDF6889C21CC7\n:10B8C000D5E9091009F05AFEA86A686200224946C3\n:10B8D000286BF6F7C1FC022E08BFBDE8F087D4E95B\n:10B8E0001410491C40F10000C4E91410E07901284B\n:10B8F0000CBFE77184F80780BDE8F087012E06D001\n:10B90000286BF6F72DFE022E08BFBDE8F087D4E9BC\n:10B910001410491C40F10000C4E91410E07901281A\n:10B92000BFD1BCE770B5384E3046A6F1340440684C\n:10B9300000F158052078012818BFFFDFA87868B10A\n:10B940000021A970A289042042F00402A281626948\n:10B950009047307800281CBF01202871216A0322FB\n:10B96000087832EA000009D1A28912F4806F05D06C\n:10B9700042F00202A2816269022090470121002068\n:10B9800000F087F918B1BDE8704000F063B9BDE878\n:10B99000704000202BE42DE9F14F1B4E002730466C\n:10B9A000A6F134054068317800F1580A2878B84685\n:10B9B000022818BFFFDFE88940F40070E881716851\n:10B9C0003078FF2091F85410FAF7BCFF0098002857\n:10B9D0009AF8120000F00681FAF7B7FEFAF7A5FE12\n:10B9E0004FF00109E0B99AF81200C8B1686A4178CD\n:10B9F000B1B10078C0F3C00008E00000E00C002006\n:10BA0000E80E002024010020580100209AF80710B9\n:10BA1000884205D185F80290BDE8F84F00F01AB9C8\n:10BA2000686A41786981002908BFAF6203D0286B3A\n:10BA3000F6F7CCFBA862E88940F02000E881EF70BF\n:10BA40003078706800F15804834690F82C00012883\n:10BA50001AD1FBF7ABFB2146584601F05AFA98B1D0\n:10BA60003078002870680CBF00F58E7000F5F97012\n:10BA7000BBF800104180217A0171617A417180F830\n:10BA80000090287AE7F748FA686A9AF80610007872\n:10BA9000C0F3800088423BD03078706800F15804D1\n:10BAA00090F85D0000282FD002284BD067713078C5\n:10BAB00000281CBF2079002809D02771AA8939469F\n:10BAC00042F01002AA816A694FF010009047E078B6\n:10BAD000A0B1E770FCF720F8002808BFFFDF0820BE\n:10BAE000AA89002142F00802AA816A699047D4E934\n:10BAF0001202411C42F10000C4E91210A079012891\n:10BB00000CBFA77184F80690E88940F48070E88142\n:10BB1000696A9AF807300878C0F3C0029A424ED199\n:10BB20003278726800F0030002F15804012818BF4F\n:10BB300002282DD003281CBFA87940F0040012D0A1\n:10BB4000A8713CE0E86AF6F77DFA002808BFFFDF3D\n:10BB5000D4E91202411C42F10000C4E91210287A13\n:10BB6000E7F7DAF9A2E784F80290EA89484642F456\n:10BB70000062EA81AA8942F00102AA816A699047BB\n:10BB8000E079012801D1E77119E084F8079016E007\n:10BB9000487818B3E98941F40061E981A96A71B173\n:10BBA000FB2884BFA87940F01000C9D8E8790028A4\n:10BBB00008BFC84603D080206A6900219047012051\n:10BBC000009900F066F8B0B1B8F1000F1CBF00207A\n:10BBD000FFF718FEBDE8F84F00F03CB8E079012807\n:10BBE000D3D1D0E7002818BFFAF7E7FDE88940F085\n:10BBF0004000E881E3E7B8F1000F1CBF0120FFF728\n:10BC000001FEFFF7A4FBB8F1000F08BFBDE8F88FF5\n:10BC10000220BDE8F84FF5E570B50D4606463D48F3\n:10BC20003C4900784C6850B1FAF724FE034694F87A\n:10BC3000542029463046BDE87040FDF76DBAFAF74A\n:10BC400019FE034694F8542029463046BDE870405A\n:10BC500006F091B92F4910B54C68FBF786FAFBF74F\n:10BC600065FAFBF73DF9FBF7BBF9FAF749FD94F8E4\n:10BC70002C00012808BFFBF799FA274C00216269C4\n:10BC8000E0899047E269A179A07890470020207070\n:10BC900010BD70B5204C0546002908BF012D06D106\n:10BCA000E07800F10100C0B2E07001282ED8A1694F\n:10BCB00028468847002829D06179184839B1012DD4\n:10BCC00001BF41780029017811F0100F1ED0A17931\n:10BCD000E1B910490978002908BF012D01D091B1BF\n:10BCE0008DB90F49097811F0100F04BF007810F0DA\n:10BCF000100F0BD0A08948B9A06A20B9608910B193\n:10BD000011F0100F02D04FF0000070BD4FF0010095\n:10BD100070BD00005801002024010020E00C00202C\n:10BD200034010020FE498A78824286BF084490F898\n:10BD300043010020704710B540F2D311F84809F0D4\n:10BD40009CFCFF220821F74809F08FFCF6480021EF\n:10BD5000417081704FF46171818010BD2DE9F04117\n:10BD60000E46054600F0ADFBED4C102816D004EB56\n:10BD7000C00191F85A0110F0010F1CBF0120BDE86D\n:10BD8000F081607808283CBF012081F85A011CD25C\n:10BD90006078401C60700120BDE8F0816078082860\n:10BDA00013D222780127501C207004EBC20830689F\n:10BDB000C8F85401B088A8F85801102A28BFFFDF3E\n:10BDC00088F8535188F85A71E2E70020BDE8F08105\n:10BDD000D54988707047D4488078704770B4D0488F\n:10BDE00000250178491E4BB2002B46DB00EBC30156\n:10BDF00091F85A1111F0010F3BD04278D9B2521E7E\n:10BE0000427000EBC10282F85A5190F802C0002241\n:10BE1000BCF1000F0BD9841894F803618E4202D153\n:10BE2000102A26D103E0521CD2B29445F3D80278EE\n:10BE3000521ED2B202708A421BD000EBC20200EB4B\n:10BE4000C10CD2F85341CCF85341D2F85721CCF869\n:10BE50005721847890F800C00022002C09D9861858\n:10BE600096F8036166450CD1102A1CBF024482F883\n:10BE70000311591E4BB2002BB8DAAB48857070BC69\n:10BE80007047521CD2B29442E9D8F2E7A4498A78AA\n:10BE9000824286BF01EB0010C01C002070472DE9D4\n:10BEA000F04101261F4690463446002500F009FB6C\n:10BEB00010282AD09A494FF0000C01EBC00292F8EA\n:10BEC0005A2102F001058A78002A1ED901EB0C03E1\n:10BED00093F8033183421FD1BCF1100F15D0002F0E\n:10BEE00018BF87F800C0887860450ED901EB0C10A8\n:10BEF00010F1030F09D001EB0C0090F84B4190F8C2\n:10BF00003B0101280CBF0126002648EA050046EA4D\n:10BF100004010840BDE8F0810CF1010303F0FF0CBF\n:10BF20006245D3D8F1E72DE9F05F1F4690460E46F3\n:10BF3000814600F0C6FA7A4D044610283CD00146EE\n:10BF4000AB780020002B0ED92A1892F803218A42E0\n:10BF500005D110281CBF1220BDE8F09F03E0401C53\n:10BF6000C0B28342F0D8082B3FD2102C27D0AE7835\n:10BF70001022701CA87005EB061909F10300414658\n:10BF800000F06CFF09F183001022394600F066FFD3\n:10BF90001021384600F03FFF3544102185F8430159\n:10BFA000404600F038FF85F84B0185F8034100203A\n:10BFB00085F83B01BDE8F09FAB78082B15D22C78B3\n:10BFC000CA46601C287005EBC4093068C9F85401E2\n:10BFD000B0884FF0000BA9F85801102C28BFFFDFE4\n:10BFE00089F853A189F85AB1C1E70720BDE8F09F4D\n:10BFF00070B44B488178491E4BB2002BBCBF70BC5B\n:10C00000704700BF817803F0FF0C491ECAB28270EE\n:10C0100050FA83F191F8031194453ED000EB0215DC\n:10C0200000EB0C14D5F80360C4F80360D5F8076082\n:10C03000C4F80760D5F80B60C4F80B60D5F80F6042\n:10C04000C4F80F60D5F88360C4F88360D5F88760C2\n:10C05000C4F88760D5F88B60C4F88B60D5F88F5032\n:10C06000C4F88F50851800EB0C0402EB420295F8DF\n:10C0700003610CEB4C0C00EB420284F8036100EB13\n:10C080004C0CD2F80B61CCF80B61B2F80F21ACF874\n:10C090000F2195F83B2184F83B2100EBC10292F877\n:10C0A0005A2112F0010F33D190F802C00022BCF1E6\n:10C0B000000F0BD9841894F803518D4202D1102A35\n:10C0C00026D103E0521CD2B29445F3D80278521E16\n:10C0D000D2B202708A421BD000EBC20200EBC10C4C\n:10C0E000D2F85341CCF85341D2F85721CCF857211C\n:10C0F000847890F800C00022002C09D9851895F8A2\n:10C100000351654512D1102A1CBF024482F8031165\n:10C11000591E4BB2002BBFF675AF70BC70470000C4\n:10C12000100F00206C01002060010020521CD2B2D0\n:10C130009442E3D8ECE7FE4948707047FC484078E9\n:10C14000704738B14AF2B811884203D8F84988805C\n:10C150000120704700207047F5488088704710B56F\n:10C1600000F0AFF9102814D0F24A0146002092F8EE\n:10C1700002C0BCF1000F0CD9131893F803318B42A5\n:10C1800003D1102818BF10BD03E0401CC0B2844585\n:10C19000F2D8082010BDE7498A78824286BF01EBB9\n:10C1A0000010833000207047E24B93F802C08445B2\n:10C1B0009CBF00207047184490F8030103EBC000B7\n:10C1C00090F853310B70D0F854111160B0F8580149\n:10C1D000908001207047D74A114491F80321D44937\n:10C1E0000A700268C1F8062080884881704770B5DF\n:10C1F00016460C460546FAF7CEFFFAF796F9CC48F4\n:10C20000407868B1CB48817851B12A19002E0CBF13\n:10C210008330C01CFAF763F9FAF7AAF9012070BD60\n:10C22000002070BD10B5FAF7D1F9002804BFFF2037\n:10C2300010BDBDE81040FAF7EFB9FAF7C7B9BD492C\n:10C240008A7882429CBF00207047084490F803011E\n:10C2500001EBC00090F85A0100F0010070472DE991\n:10C26000F047B44E00273D46307800288CBFDFF8F9\n:10C27000C882BDE8F0870024B078002808D93119B9\n:10C2800091F80321AA4204D0611CCCB2A042F6D896\n:10C290001024A04286BF06EB0410C01C002006EB51\n:10C2A000C50999F85A1111F0010F16D050B1102C90\n:10C2B00004D0311991F83B11012903D0102100F06D\n:10C2C000AAFD50B108F8074038467B1C99F8532165\n:10C2D00009F5AA71DFB2FAF7D6FB681CC5B230784F\n:10C2E000A842C8D8BDE8F0872DE9F041914C00265E\n:10C2F0003546A07800288CBF8F4FBDE8F0816119CA\n:10C30000C0B291F80381A84286BF04EB0510C01C9F\n:10C31000002091F83B11012903D0102100F07BFD92\n:10C3200058B104EBC800BD5590F8532100F5AA712F\n:10C330003046731CDEB2FAF7A6FB681CC5B2A078C3\n:10C34000A842DCD8BDE8F08101447A4810B500EB82\n:10C3500002100A4601218330FAF7C1F8BDE8104007\n:10C36000FAF706B90A46724910B5497841B1714BDE\n:10C37000997829B10244D81CFAF7B1F8012010BD10\n:10C38000002010BD6B4A01EB410102EB4101026844\n:10C39000C1F80B218088A1F80F0170472DE9F04109\n:10C3A000644D07460024A878002898BFBDE8F081B6\n:10C3B000C0B2A04217D905EB041010F1830612D0C9\n:10C3C0001021304600F027FD68B904EB440005EB6E\n:10C3D000400808F20B113A463046FBF72CFCB8F83F\n:10C3E0000F01A8F80F01601CC4B2A878A042DFD8E2\n:10C3F000BDE8F08101461022504800F02FBD4F48A3\n:10C4000070474C498A78824203D90A1892F843212E\n:10C410000AB10020704700EB400001EB400000F241\n:10C420000B10704743498A78824206D9084490F835\n:10C430003B01002804BF01207047002070472DE910\n:10C44000F0410E46074615460621304600F0E3FC53\n:10C45000384C98B1A17871B104F59D7011F0010FBD\n:10C4600018BF00F8015FA178490804D0457000F8B2\n:10C47000025F491EFAD10120BDE8F08138463146FD\n:10C4800000F01FF8102819D0A3780021002B15D92F\n:10C49000621892F8032182420BD1102918BF082993\n:10C4A0000CD004EB010080F83B514FF00100BDE8D7\n:10C4B000F08101F10101C9B28B42E9D80020BDE849\n:10C4C000F0812DE9F0411B4D0646002428780F46E7\n:10C4D000002811D905EBC40090F85311B14206D1E0\n:10C4E0000622394600F5AA7009F01CF838B1601C24\n:10C4F000C4B22878A042EDD81020BDE8F0812046D3\n:10C50000BDE8F0810B4910B44A7801EBC003521E1C\n:10C510004A70002283F85A2191F802C0BCF1000F42\n:10C5200016D98B1893F8034184420DD1102A07E0E5\n:10C5300060010020100F00206C010020E31000209B\n:10C540001CBF10BC704703E0521CD2B29445E8D81F\n:10C550000A78521ED2B20A7082421BD001EBC2028C\n:10C5600001EBC003D2F853C1C3F853C1D2F857212D\n:10C57000C3F857218C7891F800C00022002C09D90B\n:10C580008B1893F80331634506D1102A1CBF114460\n:10C5900081F8030110BC7047521CD2B29442EFD80C\n:10C5A00010BC704770B449490D188A78521ED3B236\n:10C5B0008B7095F8032198423DD001EB001401EBFC\n:10C5C000031C00EB4000DCF80360C4F80360DCF8F7\n:10C5D0000760C4F80760DCF80B60C4F80B60DCF897\n:10C5E0000F60C4F80F60DCF88360C4F88360DCF887\n:10C5F0008760C4F88760DCF88B60C4F88B60DCF877\n:10C600008FC0C4F88FC001EB030C03EB43039CF80D\n:10C61000034101EB430385F8034101EB4000D3F8EC\n:10C620000B41C0F80B41B3F80F31A0F80F319CF863\n:10C630003B0185F83B0101EBC20090F85A0110F074\n:10C64000010F1CBF70BC704700208C78002C0DD9E6\n:10C650000B1893F803C1944504D110281CBF70BC7B\n:10C66000704703E0401CC0B28442F1D80878401EF5\n:10C67000C0B20870904204BF70BC704701EBC203A7\n:10C6800001EBC000D0F853C1C3F853C1D0F8570133\n:10C69000C3F857018C780B780020002C9CBF70BC2D\n:10C6A000704700BF01EB000C9CF803C19C4506D10C\n:10C6B00010281CBF084480F8032170BC7047401C40\n:10C6C000C0B28442EED870BC70470000100F00204A\n:10C6D00010B50A7B02F01F020A73002202768B1843\n:10C6E00093F808C00CF001034FEA5C0C0CF0010455\n:10C6F00023444FEA5C0C0CF0010423444FEA5C0C29\n:10C700000CF001041C444FEA5C0303F0010CA44448\n:10C710005B0803F00104A4445B0803F00104A44493\n:10C720000CEB530300EB020C521C8CF8133090F806\n:10C7300018C0D2B263440376052AD0D3D8B22528D4\n:10C7400088BFFFDF10BD0023C383428401EBC20218\n:10C75000521EB2FBF1F10184704770B5002504460A\n:10C7600003290DD04FF4FA4200297FD001297CD053\n:10C77000022918BF70BD0146BDE870405830A7E7D8\n:10C7800004F158068021304608F099FFB571F57123\n:10C7900035737573F573357475717576B5762120BB\n:10C7A00086F83E00492086F83F00FE2086F8740097\n:10C7B00084F82C502584012084F8540084F8550016\n:10C7C000282184F856101B21218761874FF4A4711A\n:10C7D000E187A1871B21218661864FF4A471E18640\n:10C7E000A1861B21A4F84010A4F844104FF4A471B2\n:10C7F000A4F84610A4F842101B21A4F84A10A4F88B\n:10C800004C10A4F8481060734FF448606080A4F89E\n:10C81000D850A4F8DA50A4F8DC50A4F8DE50A4F8FC\n:10C82000E050A4F8E25084F8E55084F8E750A4F80A\n:10C83000EE5084F8EC50A4F80051A4F8025184F8AA\n:10C84000A25184F8A35184F8AC5184F8AD5184F816\n:10C85000705184F8785184F87B5184F89451C4F86D\n:10C860008C51C4F8905170BD00E041E0A4F8EE5046\n:10C8700084F8E6506088FE490144B1FBF0F1A4F869\n:10C8800078104BF68031A4F87A10E388A4F87E5033\n:10C89000B4F882C0DB000CFB00FCB3FBF0F39CFBA4\n:10C8A000F0FC5B1CA4F882C09BB203FB00FC04F10B\n:10C8B0005801A4F88030BCF5C84FC4BF5B1E0B857F\n:10C8C000B2FBF0F2521CCA8500F5802202F5EE326E\n:10C8D000531EB3FBF0F20A84CB8B03FB00F2B2FBD6\n:10C8E000F0F0C883214604F15800BDE87040EFE63F\n:10C8F000B4F89C11B4F8A031B4F802C004F15800A7\n:10C90000A4F87E50B4F88240DB0004FB0CF4B3FBC7\n:10C91000F1F394FBF1F45B1C44859BB203FB01F43F\n:10C920000385B4F5C84FC4BF5B1E0385B2FBF1F2AB\n:10C93000521CC285428C01EBC202521EB2FBF1F2C4\n:10C940000284C28B02FB0CF2B2FBF1F1C18370BD19\n:10C9500070B50025044603290DD04FF4FA42002992\n:10C9600063D001297ED0022918BF70BD0146BDE801\n:10C9700070405830ACE604F158068021304608F08B\n:10C980009EFEB571F57135737573F57335747571F8\n:10C990007576B576212086F83E00492086F83F005E\n:10C9A000FE2086F8740084F82C502584012084F839\n:10C9B000540084F85500282184F856101B21218743\n:10C9C00061874FF4A471E187A1871B2121866186CD\n:10C9D0004FF4A471E186A1861B21A4F84010A4F8AD\n:10C9E00044104FF4A471A4F84610A4F842101B217F\n:10C9F000A4F84A10A4F84C10A4F848106073A4F8E6\n:10CA0000E050202084F8E20084F8D850C4F8DC50CC\n:10CA100084F80C5184F80D5184F8165184F817519C\n:10CA200084F8FC5084F8085170BD60889049014436\n:10CA3000B1FBF0F1A4F878104BF68031A4F87A102D\n:10CA4000E388A4F87E50B4F882C0DB000CFB00FC45\n:10CA50009CFBF0FCB3FBF0F304F15801A4F882C096\n:10CA60005B1C00E021E09BB203FB00FCA4F88030DB\n:10CA7000BCF5C84FC4BF5B1E0B85B2FBF0F2521C65\n:10CA8000CA8500F5802202F5EE32531EB3FBF0F2A8\n:10CA90000A84CB8B03FB00F2B2FBF0F0C883214683\n:10CAA00004F15800BDE8704012E6D4F80031B4F843\n:10CAB00002C004F158005989DB89A4F87E50B4F80B\n:10CAC0008240DB0004FB0CF4B3FBF1F394FBF1F4C4\n:10CAD0005B1C44859BB203FB01F40385B4F5C84F8E\n:10CAE000C4BF5B1E0385B2FBF1F2521CC285428CAF\n:10CAF00001EBC202521EB2FBF1F20284C28B02FBB6\n:10CB00000CF2B2FBF1F1C18370BD2DE9F003047E9C\n:10CB10000CB1252C03D9BDE8F00312207047002A80\n:10CB200002BF0020BDE8F003704791F80DC01F263A\n:10CB30000123504D4FF00008BCF1000F74D0BCF140\n:10CB4000010F1EBF1F20BDE8F0037047B0F800C002\n:10CB50000A7C8F7B91F80F907A404F7C87EA090717\n:10CB600042EA072282EA0C0C5FF000070CF0FF0992\n:10CB70004FEA1C2C99FAA9F99CFAACFC4FEA196906\n:10CB80004FEA1C6C49EA0C2C0CEB0C1C7F1C9444E7\n:10CB9000FFB21FFA8CFC032FE8D38CEA020C354F4E\n:10CBA0000022ECFB057212096FF0240502FB05C29E\n:10CBB000D2B201EBD207427602F007053F7A03FAC0\n:10CBC00005F52F4218BF82767ED104FB0CF2120CC1\n:10CBD000521CD2B25FF0000400EB040C9CF813C0AE\n:10CBE00094453CBFA2EB0C02D2B212D30D194FF008\n:10CBF000000C2D7A03FA0CF73D421CBF521ED2B234\n:10CC0000002A71D00CF1010C0CF0FF0CBCF1080FE4\n:10CC1000F0D304F1010C0CF0FF04052CDCD33046FA\n:10CC2000BDE8F0037047FFE790F819C00C7E474657\n:10CC300004FB02C20F4C4FF0000CE2FB054C4FEA24\n:10CC40001C1C6FF024040CFB0422D2B201EBD204B2\n:10CC5000427602F0070C247A03FA0CFC14EA0C0F5B\n:10CC60001FBF82764046BDE8F003704704E0000035\n:10CC7000FFDB050053E4B36E90F818C0B2FBFCF480\n:10CC80000CFB1422521CD2B25FF0000400EB040C27\n:10CC90009CF813C094453CBFA2EB0C02D2B212D355\n:10CCA0000D194FF0000C2D7A03FA0CF815EA080F55\n:10CCB0001CBF521ED2B27AB10CF1010C0CF0FF0C69\n:10CCC000BCF1080FF0D300E011E004F1010C0CF00E\n:10CCD000FF04052CDAD3A2E70CEBC40181763846B9\n:10CCE000BDE8F0037047FFE70CEBC40181764046D6\n:10CCF000BDE8F0037047FD4A016812681140FC4A24\n:10CD0000126811430160704730B4FA49F74B0024B0\n:10CD10004FF0010C0A78521CD2B20A70202A08BFC8\n:10CD20000C700D781A680CFA05F52A42F2D00978D1\n:10CD300002680CFA01F15140016030BC704770B4D8\n:10CD40006FF01F02010C02EA90251F23A1F5AA40F3\n:10CD500054381CBFA1F5AA40B0F1550009D0A1F587\n:10CD60002850AA381EBFA1F52A40B0F1AA00012020\n:10CD700000D100204FF0000C624664468CEA0106A8\n:10CD8000F6431643B6F1FF3F11D005F001064FEA16\n:10CD90005C0C4CEAC63C03F0010652086D085B08C7\n:10CDA000641C42EAC632162CE8D370BC704770BCD3\n:10CDB00000207047017931F01F0113BF00200022CD\n:10CDC0001146704710B4435C491C03F0010C5B082A\n:10CDD00003F00104A4445B0803F00104A4445B08CD\n:10CDE00003F00104A4445B0803F00104A4445B08BD\n:10CDF00003F001045B08A44403F00104A4440CEB19\n:10CE000053031A44D2B20529DDDB012A8CBF01206D\n:10CE1000002010BC704730B40022A1F1010CBCF11D\n:10CE2000000F11DD431E11F0010F08BF13F8012F91\n:10CE30005C785FEA6C0C07D013F8025F22435C78E1\n:10CE40002A43BCF1010CF7D1491E5CBF405C024390\n:10CE5000002A0CBF0120002030BC7047002A08BF08\n:10CE600070471144401E12F0010F03D011F8013D2C\n:10CE700000F8013F520808BF704700BF11F8013C9D\n:10CE8000437011F8023D00F8023F521EF6D1704780\n:10CE900070B58CB000F110041D4616460DF1FF3C34\n:10CEA0005FF0080014F8012C8CF8012014F8022D12\n:10CEB0000CF8022F401EF5D101F1100C6C460DF15B\n:10CEC0000F0108201CF8012C4A701CF8022D01F8F3\n:10CED000022F401EF6D1204607F0FAF97EB16A1EF5\n:10CEE00004F130005FF0080110F8013C537010F8B5\n:10CEF000023D02F8023F491EF6D10CB070BD089801\n:10CF00002860099868600A98A8600B98E8600CB0DF\n:10CF100070BD38B505460C466846FAF760F900283A\n:10CF200008BF38BD9DF900202272A07E607294F97E\n:10CF30000A100020511A48BF494295F82D308B4203\n:10CF4000C8BF38BDFF2B08BF38BDE17A491CC9B244\n:10CF5000E17295F82E30994203D8A17A7F2918BF43\n:10CF600038BDA2720020E072012038BD0C2818BF25\n:10CF70000B2810D00D2818BF1F280CD0202818BF50\n:10CF8000212808D0222818BF232804D024281EBF17\n:10CF90002628002070474FF0010070470C2963D20B\n:10CFA000DFE801F006090E13161B323C415C484EC7\n:10CFB000002A5BD058E0072A18BF082A56D053E051\n:10CFC0000C2A18BF0B2A51D04EE00D2A4ED04BE050\n:10CFD000A2F10F000C2849D946E023B1A2F11000BC\n:10CFE0000B2843D940E0122A18BF112A3ED090F8EE\n:10CFF000360020B1122A37D31A2A37D934E0162A3C\n:10D0000032D31A2A32D92FE0A2F10F0103292DD9E8\n:10D0100090F8360008B31B2A28D925E0002B08BF5A\n:10D02000042A21D122E013B1062A1FD01CE0012AD4\n:10D030001AD11BE01C2A1CBF1D2A1E2A16D013E081\n:10D040001F2A18BF202A11D0212A18BF222A0DD04A\n:10D05000232A1CBF242A262A08D005E013B10E2A51\n:10D0600004D001E0052A01D000207047012070475C\n:10D070002DE9F0410D4604468668F7F7CCFF58B914\n:10D08000F7F7FAFD40F23471F7F7F7FAA06020469F\n:10D09000F7F7C1FF0028F3D095B13046A168F8F743\n:10D0A00004FB00280CDD2844401EB0FBF5F707FB0D\n:10D0B00005F13046F7F7E1FAA0603846BDE8F081A7\n:10D0C0000020BDE8F08170B50446904228BF70BDD5\n:10D0D000101B642810D325188D4205D8F8F719FBCA\n:10D0E00000281CBF284670BD204670BD785C020039\n:10D0F0007C5C0200740100206420ECE710B4B1F8FD\n:10D1000002C0A0F840C0B1F806C0A0F844C0B1F811\n:10D1100004C090F85440098914F00C0F15D000BFDA\n:10D12000BCF5296F98BF4FF4296C90F8554014F066\n:10D130000C0F11D0B1F5296F98BF4FF42961A0F8F9\n:10D1400042C0A0F8461010BC7047002B1CBF1478DA\n:10D1500014F00C0FE4D1E8E7002B1CBF527812F05A\n:10D160000C0FE7D1EBE711F00C0F13D001F0040125\n:10D1700000290DBF4022102296214FF4167101F5AF\n:10D18000BC71A0EB010388428CBF93FBF2F000203E\n:10D1900080B27047022919BF6FF00D0101EBD0007A\n:10D1A0006FF00E0101EB9000F2E7C08E11F00C0F52\n:10D1B00008BF7047B0F5296F38BF4FF4296070473A\n:10D1C0000246808E11F00C0F08BF704792F8553060\n:10D1D000D18E13F00C0F04D0B1F5296F38BF4FF486\n:10D1E0002961538840F2E24C03FB0CF3528E4FF45A\n:10D1F000747C0CEB821C8C459CBF910101F5747111\n:10D20000591AA1F59671884228BF0846B0F5296FD2\n:10D2100038BF4FF429607047084418449830002AFA\n:10D2200014BF0421002108447047F0B4002A14BF41\n:10D2300008220122002B14BF0824012412F00C0F35\n:10D240008B8ECA8E25D091F85550944615F00C0F50\n:10D2500004D0BCF5296F38BF4FF4296C4D8840F2DB\n:10D26000E2466E434D8E4FF4747707EB85176745A2\n:10D270009CBF4FEA851C0CF5747CA6EB0C0CACF53E\n:10D28000967C634528BF6346B3F5296F38BF4FF4DA\n:10D29000296314F00C0F04D0B2F5296F38BF4FF496\n:10D2A00029621FFA83FC00280CBF0123002391F898\n:10D2B000560014F00C0F08BF00200CEB02010844CC\n:10D2C0009830002B14BF042100210844F0BC7047A3\n:10D2D0002DE9F00391F854200B8E12F00C0F4FF44F\n:10D2E00074771CBF07EB83139CB255D012F00C0F60\n:10D2F0008B8ECA8E4D8E91F855C021D016461CF0EB\n:10D300000C0F04D0B6F5296F38BF4FF42966B1F879\n:10D31000028040F2E24908FB09F807EB8519B145A4\n:10D3200002D8AE0106F57476A8EB0606A6F5967649\n:10D33000B34228BF3346B3F5296F38BF4FF4296392\n:10D34000A34228BF23469CB21CF00C0F1CBF07EB66\n:10D3500085139BB228D000BF1CF00C0F04D0B2F58F\n:10D36000296F38BF4FF429629A4228BF1A46002815\n:10D370000CBF0123002391F856001CF00C0F08BFCE\n:10D380000020A11808449830002B14BF042100216C\n:10D390000844BDE8F0037047022A07BF9B003C33F6\n:10D3A000DB0070339CB2A1E7BCF1020F07BFAB00FA\n:10D3B0003C33EB0070339BB2CEE710F0010F1CBF83\n:10D3C0000120704710F0020F1CBF0220704710F0C0\n:10D3D000040018BF082070472DE9F047044617469F\n:10D3E00089464FF00108084600F0C5FC054648464E\n:10D3F00000F0C5FC10F0010F18BF012625D000BFBA\n:10D4000015F0010F18BF01232AD000BF56EA03010F\n:10D4100008BF4FF0000810F0070F08BF002615F0F6\n:10D42000070F08BF002394F85400B0420CBF00203F\n:10D430003046387094F85510994208BF00237B702D\n:10D44000002808BF002B25D115E010F0020F18BFEF\n:10D450000226D5D110F0040F14BF08260026CFE70E\n:10D4600015F0020F18BF0223D0D115F0040F14BF1E\n:10D4700008230023CAE7484600F087FCB4F8581098\n:10D48000401A00B247F6FE71884201DC002801DC38\n:10D490004FF0000816B1082E0CD018E094F8540094\n:10D4A000012818BF022812D004281EBF0828FFDF59\n:10D4B000032D0CD194F8AC0148B1B4F8B0010128A7\n:10D4C00094F8540006D0082801D00820387040464F\n:10D4D000BDE8F087042818BF0420F7D1F5E701283C\n:10D4E00014BF0228704710F00C0018BF04207047CA\n:10D4F00038B4CBB2C1F3072CC1B2C0F30724012B5F\n:10D5000007D0022B09D0042B08BFBCF1040F2DD08B\n:10D5100006E0BCF1010F03D128E0BCF1020F25D0D9\n:10D52000012906D0022907D0042908BF042C1DD0E8\n:10D5300004E0012C02D119E0022C17D001EA0C0101\n:10D5400061F3070204EA030161F30F22D1B211F083\n:10D55000020F18BF022310D0C2F307218DF800304C\n:10D5600011F0020F18BF02211BD111E0214003EA84\n:10D570000C03194061F30702E6E711F0010F18BF31\n:10D580000123E9D111F0040F14BF08230023E3E7BE\n:10D5900011F0010F18BF012103D111F0040118BFD0\n:10D5A00008218DF80110082B01BF000C0128042070\n:10D5B0008DF80000BDF8000038BC70474FF0000C3B\n:10D5C000082902D0042909D011E001280FD1042034\n:10D5D000907082F803C0138001207047012806D0A4\n:10D5E0000820907082F803C013800120704700204B\n:10D5F0007047162A10D12A220C2818BF0D280FD0E8\n:10D600004FF0230C1F280DD031B10878012818BF26\n:10D61000002805D0162805D000207047012070474B\n:10D620001A70FBE783F800C0F8E7012908D0022947\n:10D630000BD0042912BF082940F6A660704707E006\n:10D64000002804BF40F2E240704740F6C410704723\n:10D6500000B5FFDF40F2E24000BD000040787047B7\n:10D6600030B50546007801F00F0220F00F0010439E\n:10D670002870092912D2DFE801F00507050705091E\n:10D68000050B0F0006240BE00C2409E0222407E020\n:10D6900001240020E87003E00E2401E00024FFDFF5\n:10D6A0006C7030BD007800F00F0070470A68C0F859\n:10D6B00003208988A0F807107047D0F803200A607B\n:10D6C000B0F80700888070470A68C0F80920898888\n:10D6D000A0F80D107047D0F809200A60B0F80D00CE\n:10D6E000888070470278402322F0400203EA8111CB\n:10D6F0001143017070470078C0F3801070470278C2\n:10D70000802322F0800203EAC111114301707047A7\n:10D710000078C009704770B514460E4605461F2AAA\n:10D7200088BFFFDF2246314605F1090007F026FFDA\n:10D73000A01D687070BD70B544780E460546062C75\n:10D7400038BFFFDFA01F84B21F2C88BF1F242246D2\n:10D7500005F10901304607F011FF204670BD70B594\n:10D7600014460E4605461F2A88BFFFDF2246314673\n:10D7700005F1090007F002FFA01D687070BD09687F\n:10D78000C0F80F1070470A88A0F8132089784175F7\n:10D79000704790F8242001F01F0122F01F0211436E\n:10D7A00080F824107047072988BF072190F82420AB\n:10D7B000E02322F0E00203EA4111114380F8241033\n:10D7C00070471F3008F08FB810B5044600F009FB11\n:10D7D000002818BF204410BDC17811F03F0F1BBFB7\n:10D7E000027912F0010F0022012211F03F0F1BBF3E\n:10D7F000037913F0020F002301231A4402EB4202C3\n:10D80000530011F03F0F1BBF027912F0080F0022E6\n:10D81000012203EB420311F03F0F1BBF027912F00C\n:10D82000040F00220122134411F03F0F1BBF0279A5\n:10D8300012F0200F0022012202EBC20203EB42038E\n:10D8400011F03F0F1BBF027912F0100F00220122CE\n:10D8500002EB42021A4411F03F0F1BBF007910F097\n:10D86000400F00200120104410F0FF0014BF0121E0\n:10D8700000210844C0B2704770B50278417802F0C8\n:10D880000F02082A4DD2DFE802F004080B4C4C4C82\n:10D890000F14881F1F280AD943E00C2907D040E045\n:10D8A000881F1F2803D93CE0881F1F2839D8012072\n:10D8B00070BD4A1EFE2A34D88446C07800258209ED\n:10D8C000032A09D000F03F04601C884204D8604657\n:10D8D000FFF782FFA04201D9284670BD9CF80300E3\n:10D8E0004FF0010610F03F0F1EBF1CF1040000783E\n:10D8F00010F0100F13D064460421604600F071FA56\n:10D90000002818BF14EB0000E6D0017801F03F01B9\n:10D910002529E1D280780221B1EB501FDCD33046BB\n:10D9200070BD002070BD70B50178012501F00F01B8\n:10D93000002404290AD007290DD008291CBF002083\n:10D9400070BD40780E2836D0204670BD4078801FCC\n:10D950001F2830D9F8E7844640789CF803108A09DC\n:10D96000032AF1D001F03F06711C8142ECD86046D9\n:10D97000FFF732FFB042E7D89CF8030010F03F0FEA\n:10D980001EBF1CF10400007810F0100F13D0664683\n:10D990000421604600F025FA002818BF16EB0000AD\n:10D9A000D2D0017801F03F012529CDD28078022123\n:10D9B000B1EB501FC8D3284670BD10B4017801F0F8\n:10D9C0000F01032920D0052921D14478B0F819107E\n:10D9D000B0F81BC0B0F81730827D222C17D1062971\n:10D9E00015D3B1F5486F98BFBCF5FA7F0FD272B16D\n:10D9F000082A98BF8A420AD28B429CBFB0F81D0009\n:10DA0000B0F5486F03D805E040780C2802D010BC70\n:10DA10000020704710BC012070472DE9F0411F46DF\n:10DA200014460D00064608BFFFDF2146304600F0D1\n:10DA3000D8F9040008BFFFDF30193A462946BDE88F\n:10DA4000F04107F09BBDC07800F03F007047C02256\n:10DA500002EA8111C27802F03F021143C17070479F\n:10DA6000C07880097047C9B201F00102C1F34003D8\n:10DA70001A4402EB4202C1F3800303EB4202C1F3FA\n:10DA8000C00302EB4302C1F3001303EB43031A4448\n:10DA9000C1F3401303EBC30302EB4302C1F3801352\n:10DAA0001A4412F0FF0202D0521CD2B20171C378A4\n:10DAB00002F03F0103F0C0031943C170511C4170D3\n:10DAC00070472DE9F0410546C078164600F03F0446\n:10DAD0001019401C0F46FF2888BFFFDF2819324667\n:10DAE0003946001D07F04AFDA019401C6870BDE8CA\n:10DAF000F081C178407801F03F01401A401E80B2A9\n:10DB0000704710B590F803C00B460CF03F01447805\n:10DB10000CF03F0CA4EB0C0CACF1010C1FFA8CF4D4\n:10DB2000944288BF14462BB10844011D2246184672\n:10DB300007F024FD204610BD4078704700B50278FC\n:10DB400001F0030322F003021A430270012914BFFB\n:10DB50000229002104D0032916BFFFDF012100BDE7\n:10DB6000417000BD00B5027801F0030322F003020A\n:10DB70001A430270012914BF0229002104D003298D\n:10DB800016BFFFDF012100BD417000BD007800F02D\n:10DB900003007047417841B1C078192803D2C04AC8\n:10DBA000105C884201D1012070470020704730B5D9\n:10DBB00001240546C17019293CBFB948445C02D311\n:10DBC000FF2918BFFFDF6C7030BD70B515460E46DB\n:10DBD00004461B2A88BFFFDF65702A463146E01CD9\n:10DBE000BDE8704007F0CABCB0F807007047B0F855\n:10DBF00009007047C172090A01737047B0F80B0041\n:10DC0000704730B4B0F80720B0F809C0B0F805305C\n:10DC10000179941F40F67A45AC4298BFBCF5FA7F73\n:10DC20000ED269B1082998BF914209D293429FBF91\n:10DC3000B0F80B00B0F5486F012030BC98BF7047BA\n:10DC4000002030BC7047001D07F04DBE021D084685\n:10DC5000114607F048BEB0F80900704700797047D8\n:10DC60000A68426049688160704742680A6080685B\n:10DC700048607047098881817047808908807047B3\n:10DC80000A68C0F80E204968C0F812107047D0F832\n:10DC90000E200A60D0F81200486070470968C0F88A\n:10DCA00016107047D0F81600086070470A68426086\n:10DCB00049688160704742680A60806848607047C0\n:10DCC0000968C1607047C068086070470079704794\n:10DCD0000A68426049688160704742680A608068EB\n:10DCE000486070470171090A417170478171090AE2\n:10DCF000C17170470172090A417270478172090A45\n:10DD0000C172704780887047C0887047008970472B\n:10DD10004089704701891B2924BF4189B1F5A47F3F\n:10DD200007D381881B2921BFC088B0F5A47F0120BB\n:10DD30007047002070470A684260496881607047F8\n:10DD400042680A60806848607047017911F0070FE7\n:10DD50001BBF407910F0070F0020012070470179A8\n:10DD600011F0070F1BBF407910F0070F00200120B2\n:10DD70007047017170470079704741717047407971\n:10DD800070478171090AC1717047C088704745A208\n:10DD900082B0D2E90012CDE900120179407901F098\n:10DDA000070269461DF80220012A07D800F0070083\n:10DDB000085C01289EBF012002B07047002002B01D\n:10DDC0007047017170470079704741717047407921\n:10DDD000704730B50C460546FB2988BFFFDF6C70E5\n:10DDE00030BDC378024613F03F0008BF70470520DE\n:10DDF000127903F03F0312F0010F36D0002914BF4F\n:10DE00000B20704712F0020F32D0012914BF801D81\n:10DE1000704700BF12F0040F2DD0022914BF401C20\n:10DE2000704700BF12F0080F28D0032914BF801CD0\n:10DE3000704700BF12F0100F23D0042914BFC01C7C\n:10DE4000704700BF12F0200F1ED005291ABF1230F4\n:10DE5000C0B2704712F0400F19D006291ABF401CFB\n:10DE6000C0B27047072918D114E00029CAD114E0C4\n:10DE70000129CFD111E00229D4D10EE00329D9D153\n:10DE80000BE00429DED108E00529E3D105E00629ED\n:10DE9000E8D102E0834288BF70470020704700004D\n:10DEA000805C020000010102010202032DE9F04141\n:10DEB000FC4E0446736893F828000127002528B11A\n:10DEC00093F8A001D8B993F84801C0B193F848017C\n:10DED00098B383F8A071D3F84C113C2269B36570F4\n:10DEE000201D07F04BFB052020702771706890F80B\n:10DEF000A011002918BF80F8485107D034E083F8FA\n:10DF0000A05103F12A014FF48E72E7E71D212A3058\n:10DF100007F0B3FB70687F2180F84510FF2180F87F\n:10DF2000381080F82B1080F83E10818E21F06001AF\n:10DF30002031818680F8285016E0FFE793F8220010\n:10DF4000012814D0187801281BD093F8500101281B\n:10DF50001CBF0020BDE8F081657018202070D3F848\n:10DF60005201606083F850510120BDE8F081657076\n:10DF700007202070586A606083F822500120BDE8B5\n:10DF8000F0816570142020702022991C201D07F05C\n:10DF9000F5FA257271680D7081F85051C248828877\n:10DFA0008284D0F86421527B80F8262080F8227089\n:10DFB000D1F864010088F4F74FFEF4F7F6FAD3E7DE\n:10DFC000B84840680178002914BF80884FF6FF7078\n:10DFD000704770B5B34C0546606890F874112046E0\n:10DFE0000629806803D0FFF73BFDB8B127E0FFF7B3\n:10DFF00037FD10BBA068FFF733FD00BB606890F8E9\n:10E00000A40110F00C0F1AD0A068C17811F03F0FD6\n:10E010001CBF007910F0100F11D00EE0616891F86C\n:10E020007401082809D025B191F83E00FF2806D0D8\n:10E0300003E091F82B00FF2801D0012070BD0020E3\n:10E0400070BDF8B5974C07460E46606890F82810EA\n:10E05000002906BF90F848110029F8BD00F13305EA\n:10E0600020787F2808BFFFDF207828707F2020706D\n:10E07000606890F89A1100F5D470085C012808BF18\n:10E08000012508D0022808BF022504D0042816BFA5\n:10E0900008280325FFDF606880F8365090F8971154\n:10E0A00080F8461090F87411072911D190F8A40156\n:10E0B000012808BF012508D0022808BF022504D086\n:10E0C000042816BF08280325FFDF606880F8375052\n:10E0D000606890F874014FF00005062804D1A0682C\n:10E0E000FFF7BEFC00283CD0606890F87411082946\n:10E0F00004BF90F8A10102280ED04FF00301A068E0\n:10E10000FFF762FB40B141780A09616881F8382065\n:10E110000088C0F30B0048870095A068FFF7C2FA9B\n:10E120006168BDF8005091F83420520962F3461539\n:10E13000ADF80050072818BFFFDF1CD0BDF8000065\n:10E1400000906068BDF8001081860421A068FFF788\n:10E150003BFB00287DD0B0F80100C004C00C79D092\n:10E16000B0E0A068C17811F03F0F1CBF007910F03B\n:10E17000100FB9D1D0E791F87401062816D00728FE\n:10E1800036D0082873D00A2818BFFFDFD6D145F053\n:10E190000A00ADF8000091F83E10FF2914BF0121DC\n:10E1A000002161F38200ADF80000C7E7A068FFF727\n:10E1B00057FC58B1012808BF45F0010046D002289D\n:10E1C00014BFFFDF45F0020040D0B7E7A068C17878\n:10E1D00011F03F0F1CBF007910F0020FAED00120EC\n:10E1E000FFF7F7FE002808BF45F004002ED0A5E792\n:10E1F000A068FFF735FCB0B1012804BF45F001006D\n:10E20000ADF800000FD0022898D145F00200ADF81B\n:10E210000000A168CA7812F03F0F1CBF097911F005\n:10E22000020F21D118E0A068C17811F03F0F1CBF88\n:10E23000007910F0020F05D1606890F83E00FF28C9\n:10E240003FF47CAFBDF8000040F00400ADF80000E2\n:10E2500074E72BE02FE00AE0616891F83E10FF2997\n:10E2600008BF20F00400F1D040F00400EEE791F880\n:10E270003E00FF281CBF45F00400ADF8000091F8F7\n:10E28000A1010228BDF800000CBF40F0080020F0FA\n:10E290000800ADF800000CBF40F0020020F00200C2\n:10E2A000D4E7000078010020F41000206068818E1F\n:10E2B00021F0600105E06068818E21F0600101F1CC\n:10E2C00040018186606890F8741106290DD190F89C\n:10E2D000A40110F00C0F08D0A068C17811F03F0F16\n:10E2E0001CBF007910F0100F10D1A068C17811F098\n:10E2F0003F0F0BD0017911F0400F07D04FF006010E\n:10E30000FFF762FA6168007881F84500606890F86C\n:10E310007401062804D00020FFF75BFE18BB04E060\n:10E32000022F18BF012FF6D1F8BDA068C17811F0F7\n:10E330003F0F33D0017911F0010F2FD0616801F147\n:10E340002C0791F8783101F12B05FF2B0CD03A46C0\n:10E3500029461846FDF728FF002808BFFFDF287868\n:10E3600040F00200287019E0FFF7C5F92870A06896\n:10E37000FFF798F9072804D23946A068FFF79DF9FE\n:10E380000CE0A068FFF78EF9072807D10021A068EC\n:10E39000FFF71AFA016839608088B8800120FFF71A\n:10E3A00018FE80BBA068C17811F03F0F2BD0017917\n:10E3B00011F0020F27D0616801F13F0591F8762135\n:10E3C0006F1E1AB1022E18BF032E08D0FFF76AF98C\n:10E3D00007280AD22946A068FFF77DF912E0D1F894\n:10E3E0005A012860B1F85E010BE0A068FFF75AF906\n:10E3F000072807D10121A068FFF7E6F90168296025\n:10E400008088A8803E70606890F87401062808BF74\n:10E41000F8BD072818BF082802D00A2806D0F8BD82\n:10E42000A068FFF71DFB022808BFF8BD606800F177\n:10E430004705A068FFF75DFB626892F83230C3F1D0\n:10E44000FF01884228BF084605D9918E21F060015E\n:10E4500001F140019186C2B203EB0501A068FFF70C\n:10E4600050FB616891F83220104481F83200F8BD09\n:10E470002DE9F047FB4D06466C6894F8280000280B\n:10E4800018BFBDE8F0871D212A34204607F0F5F8B3\n:10E4900001272770A868FFF705F920B3012827D0C6\n:10E4A00002282AD0062818BFFFDF2BD004F11D0157\n:10E4B000A868FFF740F92072686804F1020904F1C6\n:10E4C000010890F87801FF2821D04A464146FDF71F\n:10E4D0006BFE002808BFFFDF98F8000040F0020044\n:10E4E00088F8000031E0608940F013006081DDE7CA\n:10E4F000608940F015006081DEE7608940F010001F\n:10E500006081D3E7608940F012006081CEE7A8689F\n:10E51000FFF7F1F888F80000A868FFF7C3F80728AC\n:10E5200004D24946A868FFF7C8F80EE0A868FFF7CC\n:10E53000B9F8072809D10021A868FFF745F9016853\n:10E54000C9F800108088A9F80400287804F10908A7\n:10E550007F2808BFFFDF287888F800004FF07F0988\n:10E5600085F80090277300206073FF20A073A17AC4\n:10E5700011F0040F08BF20752DD0686804F115084C\n:10E5800004F1140A90F8761119B1022E18BF032E67\n:10E5900009D0A868FFF786F807280BD24146A8687B\n:10E5A000FFF799F815E0D0F85A11C8F80010B0F844\n:10E5B0005E010CE0A868FFF775F8072809D1012172\n:10E5C000A868FFF701F90168C8F800108088A8F86A\n:10E5D00004008AF8006084F81B90686890F897112E\n:10E5E000217780F82870BDE8F047062003F077BC5B\n:10E5F0002DE9F0419B4C606890F82810FF2500271A\n:10E60000A1B91D212A3007F038F860687F2180F811\n:10E61000451080F8385080F82B5080F83E50818E9D\n:10E6200021F060012031818680F82870606800F553\n:10E63000D47290F89A11895C80F8A411002003F03C\n:10E640005EF818B3F8F7DAFC6068874990F879014A\n:10E650000E5C3046F8F74DFA606880F8976190F8E4\n:10E66000A41111F00C0F0CBF25200F20F8F74CF966\n:10E67000606890F8A4110120F8F7AFFA606890F88C\n:10E680006811032918BF022910D103E0BDE8F04149\n:10E6900001F040B990F89A1100F5D470085C012897\n:10E6A00004D1012211460020F8F7BAFDF8F788FDE1\n:10E6B000606890F8A461012E07BF4FF001080321A4\n:10E6C0004FF000080521A068FDF74CFE616881F855\n:10E6D000760150B1B8F1000F18BF402623D000BF1B\n:10E6E000F7F70FFF3046F8F74CFD6068D0F87C0173\n:10E6F000F8F790FC606890F87811FF291CBF00F2D1\n:10E700009110FDF768FD6068062180F8775180F868\n:10E71000785180F8867180F8857180F8A17180F851\n:10E720007411BDE8F08116F00C0F14BF5526502669\n:10E73000D6E770B54B4C0646606800F5BA752046C2\n:10E74000806841B1D0F80510C5F81D10B0F8090077\n:10E75000A5F8210003E005F11D01FEF7AEFFA0685A\n:10E76000FEF7C9FF85F82400A0680021032E018070\n:10E7700002D0052E04D046E00321FEF771FF42E0EF\n:10E780000521FEF76DFF6068D0F8640100F10E010D\n:10E79000A068FEF7F4FF6068D0F8640100F1120190\n:10E7A000A068FEF7F0FFD4E90110D1F86421527D92\n:10E7B0008275D1F86421D28AC275120A0276D1F824\n:10E7C000642152884276120A8276D1F864219288B6\n:10E7D000C276120A0277D1F86421D2884277120AEF\n:10E7E0008277D1F864110831FEF7EBFF6068D0F84A\n:10E7F0006401017EA068FEF7CCFF606890F8AA1162\n:10E80000A068FEF7D0FF05F11D01A068FEF75CFFD0\n:10E8100095F82410A068FEF772FF606800F5AD75EA\n:10E8200090F8596190F8751191B190F86811032929\n:10E8300006D190F86111002918BF90F87A0101D132\n:10E8400090F87701FDF7DDFD00281CBF0126054685\n:10E850002946A068FEF72AFF3146A068BDE870404F\n:10E86000FEF740BF780100209C5C0200FD4949682A\n:10E8700081F87301704770B5FA4D686890F87411AB\n:10E8800002291FBF90F8741101290C2070BD00F1FE\n:10E8900066014FF00004C0F84C1180F848414FF079\n:10E8A0001D0100F12A0006F0E8FE68687F2180F86B\n:10E8B0004510FF2180F8381080F82B1080F83E10AA\n:10E8C000818E21F060012031818680F8284004701B\n:10E8D00080F8224080F85041012680F8A06190F82D\n:10E8E000760130B1F8F757FCF7F71FFE686880F83B\n:10E8F00076416868072180F8724180F8616180F88C\n:10E90000684180F8794180F8734180F8A14180F82E\n:10E910006011002070BDD34910B58860486800219F\n:10E92000A0F8A51180F8A711012180F87411FFF754\n:10E93000A2FF002818BFFFDF10BD2DE9F041C94D2F\n:10E940000446686890F87401012818BF022804D0B2\n:10E9500003281CBF0C20BDE8F081607A022823D078\n:10E96000F8F714F80220F8F74FFB686890F9730184\n:10E97000F8F7B1F8A868F8F74AFBBB48F8F72AFBA4\n:10E98000BA48F8F7AEF8686890F8591100F5AD701C\n:10E99000F8F759F80F210720F8F771F8686890F830\n:10E9A0006101F0B1FDF7A0FC6868217A00F5D4722E\n:10E9B00080F89A11217A895C80F8A4116168C0F806\n:10E9C0007C112168C0F88011627A6AB1012A23D0D3\n:10E9D0000524022A08BF80F8744175D0032A7FD02D\n:10E9E00087E0FDF73CFCDFE7A14C90F860C1002117\n:10E9F00090F87921521CA4FB02635B08A3EB83030C\n:10EA00001A4480F879212CFA02F212F0010F03D196\n:10EA1000491CC9B20329EBD3002680F8A16190F804\n:10EA20007111002904BF90F87501002848D0F6F74D\n:10EA300023F9044668682146D0F86C01F6F735FEE4\n:10EA4000DFF83082074690FBF8F008FB1070414277\n:10EA50002046F5F712FE6968C1F86C0197FBF8F0E3\n:10EA6000D1F89C211044C1F89C01FDF775FB6A6840\n:10EA7000D2F89C11884223D8C2F89C61C2F86C413C\n:10EA800092F8750100281CBF0120FDF787FC0121C9\n:10EA9000686890F87221002A1CBF90F87121002A42\n:10EAA0000ED090F8592100F5AD73012A04D15A799E\n:10EAB00002F0C002402A09D000F5AD70F9F7F2F873\n:10EAC0006968042081F8740113E009E00124FDF76E\n:10EAD00096FC6968224601F5AD71F9F7ACF8EFE7ED\n:10EAE000002918BFFFDF012000F066FF686880F88A\n:10EAF00074410020BDE8F08170B55A4C606890F810\n:10EB00007411042932D005291CBF0C2070BD90F867\n:10EB1000A1110026002900F2A51190F8A7114FEAD3\n:10EB2000511126D0002908BF012507D0012908BFAF\n:10EB3000022503D0022914BF00250825D0F8800142\n:10EB400000281CBF002000F037FF6068D0F87C016F\n:10EB5000F8F760FA606890F8681102293DD003293F\n:10EB600004BF90F8900101283BD03FE0FFF740FD43\n:10EB700044E0002908BF012507D0012908BF02256C\n:10EB800003D0022914BF00250825D0F880010028F1\n:10EB90001CBF002000F010FF6068D0F87C01F8F77F\n:10EBA00039FA606890F86811022906D0032904BF79\n:10EBB00090F89001012804D008E090F89001022814\n:10EBC00004D12A4601210020F8F72AFB60680721BA\n:10EBD00080F8A45180F885610EE090F89001022839\n:10EBE00004D12A4601210020F8F71AFB60680821A9\n:10EBF00080F8A45180F8856180F87411002070BD00\n:10EC00001849002210F0010F496802D0012281F852\n:10EC1000A82110F0080F03D01144082081F8A801A2\n:10EC2000002070470F49496881F87001704710B59E\n:10EC30000C4C636893F85831022B14BF032B002847\n:10EC40000BD100291ABF0229012000201146FDF72F\n:10EC500086FA08281CBF012010BD606890F8580192\n:10EC6000002809E078010020995C02009F5C020006\n:10EC7000ABAAAAAA40420F0016BF0228002001201A\n:10EC8000BDE81040F8F798BFFE48406890F858017A\n:10EC9000002816BF022800200120F8F78DBFF9498F\n:10ECA000496881F858017047F649496881F872014E\n:10ECB000704770B5F34C616891F85801002816BF91\n:10ECC00002280020012081F8590101F5AD71F8F703\n:10ECD0005DFF606890F85811022916BF03290121D1\n:10ECE000002180F8751190F8592100F5AD734FF0AF\n:10ECF0000005012A04BF5B7913F0C00F0AD000F5AC\n:10ED0000AD73012A04D15A7902F0C002402A01D021\n:10ED1000002200E0012280F87121002A04BF0029AE\n:10ED200070BDC0F89C51F5F7A7FF6168C1F86C0190\n:10ED300091F8750100281CBF0020FDF72FFB00266D\n:10ED4000606890F8721100291ABF90F871110029BB\n:10ED500070BD90F8592100F5AD71012A04D14979AF\n:10ED600001F0C001402906D02946BDE8704000F5F9\n:10ED7000AD70F8F797BFFDF742FB61683246BDE81A\n:10ED8000704001F5AD71F8F756BF70B5BD4D0C463A\n:10ED900000280CBF01230023696881F8613181F8E4\n:10EDA0006A014FF0080081F87A010CD1002C1ABFDB\n:10EDB000022C012000201146FDF7D1F969680828CE\n:10EDC00081F87A0101D0002070BD022C14BF032C01\n:10EDD0001220F8D170BD002818BF112070470328F9\n:10EDE000A84A526808BFC2F8641182F8680100207E\n:10EDF000704710B5A34C606890F8681103291CBFD8\n:10EE0000002180F8841101D0002010BD0123D0F82A\n:10EE100064111A460020FEF708FA6168D1F86421EF\n:10EE2000526A904294BF0120002081F88401EBE7F0\n:10EE30009448416891F86801032804D0012818BF5C\n:10EE4000022807D004E091F86A01012808BF704742\n:10EE50000020704791F86901012814BF03280120A0\n:10EE6000F6D1704770B5F8F780F9F8F75FF9F8F761\n:10EE700037F8F8F7B5F8834C0025606890F876010C\n:10EE800030B1F8F788F9F7F750FB606880F87651F1\n:10EE900060680121A0F8A55180F8A75180F874118D\n:10EEA00080F85051002070BD764810B5406800F5DC\n:10EEB000C47006F0A8F8002010BD72480121406817\n:10EEC00090F86821032A03BF80F85211D0F864211A\n:10EED0001288002218BF80F85221A0F8542180F82F\n:10EEE000501170476749496881F8AA017047017855\n:10EEF000002311F0010F634949680AD04278032AC0\n:10EF000008BFC1F8643181F86821012281F8A82185\n:10EF10001346027812F0040F0CD082784FF0000CE8\n:10EF2000032A08BFC1F864C181F868210B44082294\n:10EF300083F8A821C27881F858210279002A16BFE7\n:10EF4000022A0123002381F8613181F86921427985\n:10EF500081F86021807981F870014FF000007047DE\n:10EF60004848406800F5D27070472DE9F041454CA3\n:10EF700005460E46606890F87401032818BFFFDF4D\n:10EF8000022D1EBF032DFFDFBDE8F0814FF000070B\n:10EF90004FF00105AEB1606890F8371089B1818EED\n:10EFA00021F0600101F14001818690F8282042B9EA\n:10EFB00080F8285011F0080F14BF0720062002F037\n:10EFC0008EFF6068A0F8A57180F8A77180F8745171\n:10EFD000BDE8F08100F09EBC2DE9F047294C0646C3\n:10EFE000894660684FF00108072E90F8617138BFBC\n:10EFF000032533D3082E4FF0000088BFBDE8F0870B\n:10F00000FEF7E7FF002878D1A068C17811F03F0F24\n:10F0100012D0027912F0010F0ED061684FF0050591\n:10F0200091F87621002A18BFB9F1000F16D091F897\n:10F03000A411012909D011E011F03F0F1ABF007986\n:10F0400010F0100F002F58D151E04FF001024FF097\n:10F050000501FDF7CCF8616881F87601A1680878B0\n:10F060002944C0F3801030B1487900F0C000402836\n:10F0700008BF012000D00020616891F876110029B6\n:10F0800002E000007801002018BF002807D0FDF73B\n:10F09000C9F80146606880F8771180F8858160685A\n:10F0A00090F87711FF292BD080F878110846FDF7EA\n:10F0B000C6F840EA0705606890F87721FF2A18BF74\n:10F0C000002D10D0072E0ED3A068C17811F03F0F8D\n:10F0D00009D0017911F0020F05D00B21FDF734F9A9\n:10F0E000606880F886812846BDE8F08705E0FCF777\n:10F0F00072FE002808BFBDE8F0870120BDE8F08758\n:10F10000A36890F8612159191B78C3F3801C00F2A1\n:10F1100077136046FCF7C3FE0546CCE72DE9F041C6\n:10F12000FE4C84B0A068FEF79BFC0126002550B180\n:10F13000022501287ED002287DD0F7F7D1FE04B049\n:10F140000620BDE8F081F7F7CBFE606890F8680113\n:10F15000032800F0C480A068C17811F03F0F05D0EB\n:10F16000027912F0100F18BF012600D10026002EE0\n:10F1700014BF0822012211F03F0F43D0007932EA78\n:10F1800000013FD110F0020F06D00120FEF721FF51\n:10F19000002808BF012000D000208DF800508DF815\n:10F1A00004508DF80850FF27D0B102AA694601A883\n:10F1B00000F051FC606890F859719DF8000000283B\n:10F1C00018BF47F002070BD1A068FEF7A1FA8046EE\n:10F1D0000121A068FEF7F8FA4146F7F73CFC90B130\n:10F1E00066B1012000F0B9FB002878D03946002034\n:10F1F000FEF727FF606880F890516CE039460020E8\n:10F2000000F06CFB6BE0606890F86901032818BFA0\n:10F21000022864D19DF80400002860D09DF8000009\n:10F2200000285CD17EB1012000F097FB002856D069\n:10F23000FE2101E00CE032E00020FEF702FF6068F2\n:10F2400080F8905147E0FE21002000F047FB46E0A7\n:10F25000F7F746FEA0681821C27812F03F0F3ED0A3\n:10F26000027991433BD10421FEF7AEFA616891F82F\n:10F270006821032A01BF8078B5EB501F91F8840103\n:10F2800000282CD04FF0010000F067FB38B3FF21BD\n:10F290000120FEF7D6FE606880F890611BE0F7F76A\n:10F2A0001FFE606890F86801032818D0A068182134\n:10F2B000C27812F03F0F12D0007931EA00000ED16F\n:10F2C000012000F04AFB50B1FF210220FEF7B9FEF9\n:10F2D000606880F8905104B00320BDE8F08104B06C\n:10F2E0000620BDE8F081F0B58C4C074683B060681D\n:10F2F0006D460078002818BFFFDF002661688E7019\n:10F30000D1F8640102888A8042884A8382888A838D\n:10F31000C088C88381F8206047B10121A068FEF74A\n:10F3200053FA0546A0680078C10907E06946A0685D\n:10F33000FEF7C3F9A0680078C0F380116068012768\n:10F3400090F87521002A18BF002904D06A7902F0CC\n:10F35000C002402A26D090F87221002A18BF002946\n:10F3600003D0697911F0C00F1CD000F10E0006F037\n:10F37000B1FA616891F87801FF2819D001F108020B\n:10F38000C91DFCF711FF002808BFFFDF6068C179C5\n:10F3900041F00201C171D0F891114161B0F89511AD\n:10F3A000018310E02968C0F80E10A9884182E0E7C7\n:10F3B000D1F86401427ECA71D0F81A208A60C08BED\n:10F3C00088814E610E8360680770D0F8642190F8E0\n:10F3D000731182F85710D0F864010088F3F73CFCF1\n:10F3E000F3F7D4F803B0F0BD2DE9F0414B4C0546DE\n:10F3F00001276068002690F86811012918BF0229CA\n:10F4000002D0032918BFFFDF55B1A068FEF734FA18\n:10F4100018B9A068FEF787FA10B100F0C6FB2DE01E\n:10F42000606890F874017F25801F062828BFBDE81A\n:10F43000F081DFE800F003191930443E3748F7F750\n:10F44000CEFE002808BF2570F7F7B0FE606890F880\n:10F45000760130B1F7F79FFEF7F767F8606880F83C\n:10F460007661F7F73DFD20E02C48F7F7B8FE00285D\n:10F4700008BF2570F7F79AFE00F07DFB102880F09A\n:10F480004481DFE800F036B9C2C6F7F712CFF6F7CD\n:10F49000F7F7249F386C2148F7F7A1FE002808BF32\n:10F4A0002570F7F783FEF7F71BFDBDE8F041FFF786\n:10F4B0009FB81A48F7F793FE30B9257004E0174853\n:10F4C000F7F78DFE0028F8D0F7F770FE9DE00320D7\n:10F4D00002F015F9002874D000210320FFF729F964\n:10F4E000012211461046F7F79BFE61680C2081F857\n:10F4F0007401BDE8F081606800F5BA75042002F07F\n:10F50000FEF800285DD00E202870012002F0E7FCF4\n:10F51000A06861680078C0F3401001E07801002025\n:10F5200081F8990100210520FFF703F9F749A06848\n:10F530004FF0200CD1F864210378527B23F0200394\n:10F540000CEA42121A430270D1F8640195F8253092\n:10F55000427B1A4042732820D1F864112DE0062026\n:10F5600002F0CDF8002850D0E84D0F2085F8740146\n:10F57000022002F0B4FC6068012190F8A421084642\n:10F58000F7F74EFEA06861680078C0F3401081F87C\n:10F59000990101210520FFF7CCF8D5F864014773E4\n:10F5A000A068017821F020010170F8F720FA002806\n:10F5B00018BFFFDF2820D5F8641181F85600BDE898\n:10F5C000F08122E0052002F09AF8F0B10121032039\n:10F5D000FFF7AFF8F8F70BFA002818BFFFDF6068F5\n:10F5E000012190F8A4210846F7F71AFE61680D2062\n:10F5F00081F87401BDE8F0816068A0F8A56180F829\n:10F60000A76180F87471BDE8F081BDE8F04100F0B9\n:10F6100081B96168032081F87401BDE8F0410820D8\n:10F6200002F05DBC606890F8A711490908BF012588\n:10F6300007D0012908BF022503D0022914BF0025E5\n:10F640000825D0F8800100281CBF002000F0B4F984\n:10F650006068D0F87C01F7F7DDFC606890F868110D\n:10F66000022908D0032904BF90F89001012806D090\n:10F670000AE010E049E090F89001022804D12A46FF\n:10F6800001210020F7F7CCFD6068072180F8A45124\n:10F6900080F8856135E0606890F8A711490908BFD6\n:10F6A000012507D0012908BF022503D0022914BF74\n:10F6B00000250825D0F8800100281CBF002000F09C\n:10F6C0007BF96068D0F87C01F7F7A4FC606890F8DB\n:10F6D0006811022906D0032904BF90F8900101287F\n:10F6E00004D008E090F89001022804D12A460121B4\n:10F6F0000020F7F795FD6068082180F8A45180F894\n:10F70000856180F87411BDE8F081FFDFBDE8F0810C\n:10F7100070B57F4C606890F8743100210C2B38D0A4\n:10F7200001220D2B40D00E2B55D00F2B1CBFFFDF1D\n:10F7300070BD042002F0D3FB606890F8A4110E2085\n:10F74000F7F7E2F8606890F8A40110F00C0F14BF0E\n:10F75000282100219620F7F77BFCF7F731FD606840\n:10F76000052190F8A451A068FCF7FCFD616881F8C0\n:10F77000760148B115F00C0F0CBF50255525F6F752\n:10F78000C0FE2846F7F7FDFC61680B2081F8740184\n:10F7900070BDF7F715FD00219620F7F759FC616859\n:10F7A000092081F8740170BD90F8A411FF20F7F7CB\n:10F7B000ABF8606890F8A40110F00C0F14BF28217A\n:10F7C00000219620F7F744FCF7F7FAFC61680A205D\n:10F7D00081F8740170BDA0F8A51180F8A71180F818\n:10F7E00074210020FFF77FFDBDE87040032002F088\n:10F7F00076BB70B5464C606890F874117F25891F00\n:10F80000062928BF70BDDFE801F017321D033D1146\n:10F810003F48F7F7E4FC002808BF2570F7F7C6FC5F\n:10F82000F7F75EFBBDE87040FEF7E2BE3848F7F739\n:10F83000D6FC60BB25702AE03548F7F7D0FCD8B974\n:10F84000257019E090F8371089B1818E012221F0DE\n:10F8500060014031818690F8283043B980F8282033\n:10F8600011F0080F14BF0720062002F038FB2848CB\n:10F87000F7F7B5FC0028E3D0F7F798FCBDE8704037\n:10F8800000F048B82248F7F7AAFC0028D2D0F7F7D2\n:10F890008DFC6068002100F5C47005F065FBBDE8D3\n:10F8A000704000F037B870B5194C06460D46012976\n:10F8B00008D0606890F8A4213046BDE87040134637\n:10F8C00002F059BBF6F7D6FF61680346304691F85F\n:10F8D000A4212946BDE8704002F04DBB10B5FEF7EB\n:10F8E000B0FB0B48406890F82810002918BF10BDE5\n:10F8F000012280F8282090F8340010F0080F14BF7F\n:10F9000007200620BDE8104002F0E9BAF4100020FC\n:10F910007801002070B5F7F728FCF7F707FCF7F738\n:10F92000DFFAF7F75DFBFE4C0025606890F8760182\n:10F9300030B1F7F730FCF6F7F8FD606880F87651E3\n:10F940006068022180F87411A0F8A55180F8A751D1\n:10F95000BDE87040002002F0C2BA70B5F04D064616\n:10F960000421A868FDF730FF0446686890F8280075\n:10F97000A0B901F0A7FE217811F0800F14BF4FF459\n:10F9800096711E21B4F80120C2F30C0212FB01F1A2\n:10F990000A1AB2F5877F28BF814201D2002070BDCC\n:10F9A00068682188A0F8A511A17880F8A7113046D1\n:10F9B000BDE8704001F0A3BE2DE9F041D84C0746E8\n:10F9C000606800F2A51690F8A701400908BF01255C\n:10F9D00007D0012808BF022503D0022814BF002544\n:10F9E0000825F7F70BFB307800F03F063046F7F7B5\n:10F9F00080F8606880F8976190F8900102280CBF49\n:10FA00004020FF202946F6F77FFF27B12946012035\n:10FA1000F7F763F906E060682A46D0F88011012004\n:10FA2000F7F7A4F9F7F7CCFB0521A068FCF79AFCDF\n:10FA30006168002881F8760108BFBDE8F08115F003\n:10FA40000C0F0CBF50245524F6F75BFD2046BDE893\n:10FA5000F041F7F796BB2DE9F74FB14C00259146E1\n:10FA600060688A4690F8750100280CBF4FF00108C5\n:10FA70004FF00008A0680178CE090121FDF7A4FE2F\n:10FA800036B1407900F0C000402808BF012600D000\n:10FA90000026606890F87611002963D090F868110C\n:10FAA0004FF0000B03291ED190F86111002918BFF7\n:10FAB00090F87A7117D0FF2F18BF082F22D0384640\n:10FAC000FCF730F9002818BF4FF00108002E49D08C\n:10FAD000606890F88601D0B1FCF7AFFB054660681E\n:10FAE00080F886B13EE0A168CA7812F03F0F19BFD6\n:10FAF000097911F0010F90F82B10FF2918BF90F829\n:10FB00007771D8D176B390F8850170B12AE0384684\n:10FB1000FCF741FB05460121A068FDF755FE0146B3\n:10FB20002846F8F757F805461CE0A068C17811F0A0\n:10FB30003F0F05D0017911F0010F18BF0B2101D142\n:10FB40004FF005014FF00002FCF751FB616881F8AE\n:10FB5000760138B1FCF766FBFF2803D06168012508\n:10FB600081F877018AF800500098067089F80080C3\n:10FB700003B0BDE8F08F6A4810B5406890F83710C0\n:10FB800089B1818E012221F060014031818690F897\n:10FB9000283043B980F8282011F0080F14BF07203F\n:10FBA000062002F09CF9022010BD2DE9F04F5C4DBB\n:10FBB00083B00024686890F874017F27801F264670\n:10FBC0004FF00108062880F04082DFE800F00308CB\n:10FBD0000893FEFD00F01EFC044600F037BA5048C2\n:10FBE000F7F7FDFA002808BF2F70F7F7DFFAA868CB\n:10FBF000FDF758FD044607286AD1A868FDF730FFD5\n:10FC0000696891F89021824262D191F874010628C6\n:10FC100004D1A868FDF724FF002836D0686890F862\n:10FC20007411082904BF90F8A101022813D04FF0E5\n:10FC30000301A868FDF7C8FD002849D0696843782A\n:10FC400091F83820B2EB131F42D10088498FC0F3DE\n:10FC50000B0088423CD100212046FFF7BDF9B0B32C\n:10FC60008DF800608DF804608DF80860A868FF24A6\n:10FC7000C17811F03F0F1CBF007910F0020F1CD0AB\n:10FC80000120FEF7A6F950B117E0A868C17811F07D\n:10FC90003F0F1CBF007910F0100FBFD1DBE702AAA5\n:10FCA000694601A8FFF7D7FE686890F859419DF8AA\n:10FCB0000000002818BF44F0020423469DF80820E5\n:10FCC0009DF804109DF8000000F012FA02E0FFE732\n:10FCD000FFF751FF0446686890F87601002800F0AD\n:10FCE000B581F7F758FAF6F720FC686880F8766176\n:10FCF00000F0ACB9A868FDF7D5FC8146A968686832\n:10FD0000CA7890F891319A4224D10A7990F89231C8\n:10FD10009A421FD14A7990F893319A421AD101E060\n:10FD2000780100208A7990F894319A4212D1CA79E8\n:10FD300090F895319A420DD10A7A90F896319A420C\n:10FD400008D1097890F89801C1F38011814208BF69\n:10FD5000012400D00024F7F7C3F8FB48F7F73FFA77\n:10FD6000002808BF2F70F7F721FAB9F1040F76D1F8\n:10FD7000002C74D0686890F8481100296FD190F871\n:10FD8000281021B190F8341011F0100F67D0D0F87E\n:10FD90004C411D21204605F070FC84F80080686805\n:10FDA00004F1020A04F1010990F87801FF2810D04B\n:10FDB00052464946FCF7F8F9002808BFFFDF99F8DA\n:10FDC000000040F0020001E04CE0FFE089F8000094\n:10FDD0001DE0A868FDF78FFC89F80000A868FDF712\n:10FDE00061FC072804D25146A868FDF766FC0EE0C6\n:10FDF000A868FDF757FC072809D10021A868FDF77E\n:10FE0000E3FC0168CAF800108088AAF8040004F135\n:10FE10001D01A868FDF78FFC2072287804F10909FC\n:10FE20007F2808BFFFDF287889F800002F706868F6\n:10FE3000618990F8A12162F3000141F01A0161810A\n:10FE400084F80C806673FF21A1732175E77690F822\n:10FE50009711217780F84881072002F040F80624A6\n:10FE600000F0F4B84FF00208B748F7F7B8F90028E7\n:10FE700008BF2F70F7F79AF9A868FDF713FC04463E\n:10FE8000A868FDF7EDFD082C08BF00287ED1A86802\n:10FE90004FF00301C27812F03F0F77D0007931EABA\n:10FEA000000073D1686800F5BA7790F86101002806\n:10FEB00014BFBE79FE784FF00009B87878B1FCF72E\n:10FEC000B1F90446FF280AD00146A868401DFCF796\n:10FED00082F9B4420CBF4FF001094FF00009002134\n:10FEE000A868FDF771FC062207F11D0105F01AFB59\n:10FEF00040B9A868FDF7FFFB97F82410884208BFB7\n:10FF0000012000D0002059EA00095DD0686800F5A2\n:10FF1000AD7490F859A1787838B13046FCF771FA91\n:10FF200000281CBF04464FF0010A0027A86801788A\n:10FF30004FEAD11B0121FDF747FCBBF1000F07D0B1\n:10FF4000407900F0C000402808BF4FF0010B01D0FD\n:10FF50004FF0000B0121A868FDF736FC0622214670\n:10FF600005F0E0FA30B9A868FDF7D2FB504508BFAC\n:10FF7000012401D04FF000043BEA040018BFFF2E1B\n:10FF80000FD03046FCF707F9060000E01CE008D06F\n:10FF90000121A868FDF718FC01463046F7F71AFE64\n:10FFA000074644EA070019EA000F0DD068680121EE\n:10FFB00000F5C47004F0D8FF4FF001084046FFF789\n:10FFC00092F9052001F08BFF44463FE002245E4891\n:10FFD000F7F705F9002808BF2F70F7F7E7F8A868CA\n:10FFE000FDF760FB0646A868FDF73AFD072E08BF3F\n:10FFF00000282BD1A8684FF00101C27812F03F0F02\n:020000040002F8\n:1000000024D00279914321D1696801F5BA760021A3\n:10001000FDF7DAFB062206F11D0105F083FAA8B907\n:10002000A868FDF768FB96F8241088420ED168682E\n:10003000012100F5C47004F097FFFF21022000F0B9\n:1000400009F8002818BF032400E0FFDF03B02046B2\n:10005000BDE8F08F2DE9F0413B4C02460025606879\n:1000600090F8A1310BB3A0684FF000064FF00107E4\n:10007000C37813F03F0F1CBF007910F0100F1BD096\n:100080000020FDF7DEFF606890F83400C0F34110F7\n:1000900002281BD00220FFF760FC88B160680125B0\n:1000A00080F89061F6F71CFF1FE0002A14BF0223BE\n:1000B000012380F8A131D6E71046FDF7C2FF05E025\n:1000C0006068818E21F0600140318186606890F81F\n:1000D000281051B980F8287090F8340010F0080FFB\n:1000E00014BF0720062001F0FAFE2846BDE8F08183\n:1000F0002DE9F047144C05461F4690460E46A06871\n:10010000FDF7AEFC002800F0D180012805D00228C0\n:1001100000F00E81BDE8F0472DE5A0680921C27806\n:1001200012F03F0F00F042810279914340F03E818E\n:10013000616891F86811032908D012F0020F08BF16\n:10014000FF211BD075B118E0780100200021FDF7D8\n:100150003BFB61680622D1F864111A3105F0E2F91F\n:1001600050BB1EE0FDF7D4FA05460121A068FDF75B\n:100170002BFB2946F6F76FFC18B13946012000F039\n:1001800039B9606890F86901032818BF022840F067\n:100190000D81002E1CBFFE21012040F02B8100F0BC\n:1001A00005B9A068FDF7A7FA6168D1F86411497E26\n:1001B000884208BF012600D00026A068C17811F04F\n:1001C0003F0F05D0017911F0020F01D05DB338E087\n:1001D000616891F86A21012A01D0A6B119E0C6B977\n:1001E0000021FDF7F1FA61680268D1F86411C1F8E5\n:1001F0001A208088C883A068FDF77DFA6168D1F86D\n:100200006411487605E091F8770191F87A118842F7\n:100210004BD1606800F5C47004F0EAFE002844D0B9\n:100220000F20BDE8F087B8F1000F0CD0FDF770FA91\n:1002300005460121A068FDF7C7FA2946F6F70BFC31\n:1002400008B1012200E00022616891F86A010128EA\n:1002500007D040B92EB991F8773191F87A118B42D5\n:1002600001D1012100E000210A421ED0012808BF6F\n:10027000002E13D14FF00001A068FDF7A5FA6168C8\n:100280000268D1F86411C1F81A208088C883A06878\n:10029000FDF731FA6168D1F864114876606800F5BD\n:1002A000C47004F0A5FE0028BAD17FE06068A846BB\n:1002B0004FF0020990F8680103282AD0A068C1789D\n:1002C00011F03F0F1BBF007910F0020F002001203A\n:1002D0004FF0FF05A8B14FF00100FDF77AFE0028AE\n:1002E00004BF3D46B8F1000F0BD1A068FDF710FA2E\n:1002F00007460121A068FDF767FA3946F6F7ABFB20\n:1003000050B129460020FFF7A5FE002818BF4FF086\n:1003100003094846BDE8F087606890F86901032842\n:1003200018BF0228F5D1002E18BFFE25E9D1F0E74D\n:10033000626892F86831032B38D0A0684FF0090C3E\n:10034000C17811F03F0F31D001793CEA010C2DD179\n:10035000022B01F0020105D0002908BFFF2147D080\n:10036000CDB344E009B135B113E002F5C47004F037\n:100370003FFEA0B91AE0B8F1000F1AD0FDF7C8F996\n:1003800005460121A068FDF71FFA2946F6F763FB31\n:1003900078B1606800F5C47004F02AFE30B13946C7\n:1003A0000220FDF74EFE0D20BDE8F0870220BDE8DB\n:1003B000F087606890F86901032818BF0228F5D11A\n:1003C000002EF3D04FF0FE014FF00200FFF786FA47\n:1003D0000220BDE8F087FFE7FDF79AF90546012105\n:1003E000A068FDF7F1F92946F6F735FB28B1394643\n:1003F0005FF00200FFF772FAD8E7606890F86901D1\n:10040000032818BF0228D1D1002E1CBFFE210220D4\n:10041000F0D1CBE72DE9F84F0027D048F6F7DFFE03\n:10042000CE4C002804BF7F202070F6F7BFFEA068E6\n:10043000FDF738F980460121FEF7CEFD61684FF0E7\n:10044000000B91F8A421012A13D0042A1CBF082A0A\n:10045000FFDF00F07781606890F8760130B1F6F741\n:100460009AFEF6F762F8606880F876B13846BDE823\n:10047000F88F0125BA4EB8F1080F19D2DFE808F05D\n:1004800024860418181811FD0546F6F729FD002DDD\n:100490007AD0606890F86801012818BF022858D007\n:1004A00072E028B191F86801022805D0012850D0E7\n:1004B000F6F716FD0627CEE7FF20FDF7D9FF6068A7\n:1004C0000C2780F8A1B1C6E70027002800F02081A2\n:1004D00091F86801022834D001283AD00328BAD113\n:1004E000A068D1F86421C37892F81AC0634521D17D\n:1004F000037992F81BC063451CD1437992F81CC064\n:10050000634517D1837992F81DC0634512D1C37931\n:1005100092F81EC063450DD1037A92F81FC063455F\n:1005200008D1037892F819C0C3F38013634508BF5C\n:10053000012300D0002391F86A1101290DD0D3B115\n:10054000E4E0FF20FDF794FF60680C2780F8A151DC\n:1005500081E7FF20FDF78CFF16E0002B71D102F13F\n:100560001A01FDF7AAF8A068FDF7C5F86168D1F88F\n:1005700064114876CAE096F87A0108287CD096F88B\n:10058000771181425DD0C3E0062764E7054691F804\n:10059000750100280CBF4FF001094FF0000900273A\n:1005A000A06810F8092BD20907D0407900F0C000EC\n:1005B000402808BF4FF0010A01D04FF0000A91F81F\n:1005C0006801032806D191F86101002818BF91F84D\n:1005D0007A0101D191F877010090FBF7DCFD5FEA29\n:1005E00000082AD00098FBF79DFB002818BF4FF0A9\n:1005F0000109BAF1000F20D0A06800F109014046BE\n:10060000F7F7E8FA0700606890F8598118BF48F0DA\n:100610000208606890F86811032913D0F6F760FCAF\n:10062000002DB1D0F6F727FA00280CBF002F404666\n:1006300072D000BFFDF71CFFA6E7606890F85981F3\n:10064000E7E763E0A168D0F86401CA78837E9A4244\n:100650001FD10A79C37E9A421BD14A79037F9A42FD\n:1006600017D18A79437F9A4213D1CA79837F9A42FC\n:100670000FD10A7AC37F01E04AE05BE09A4208D1D9\n:100680000978407EC1F38011814208BF4FF0010814\n:1006900001D04FF0000896F87701082806D096F8A8\n:1006A0007A11884208BF4FF0010A01D04FF0000ACA\n:1006B0002FB9B9F1000F04D0F6F7DDF908B1012028\n:1006C00000E000204DB196F86A11012903D021B94C\n:1006D00058EA0A0101D0012100E00021084217D0A8\n:1006E000606890F86A11012908BFB8F1000F0DD1B8\n:1006F000D0F8640100F11A01A068FCF7DEFFA068E1\n:10070000FCF7F9FF6168D1F8641148760E27A2E67C\n:10071000F6F7E6FB38E7FFE7606890F86901032821\n:1007200018BF02287FF430AFBAF1000F18BFFE20C7\n:1007300080D129E791F87011002918BF00283FF4F3\n:10074000B7AE06E0B8F1070F7FF4B2AE00283FF471\n:10075000AFAEFEF7E3FC07467DE60000780100201F\n:10076000F4100020D0F8E81049B1D0E93B231A4436\n:100770008B691A448A61D0E93912D16003E0F74AE3\n:10078000D0F8E4101162D0E9391009B1086170475E\n:100790000028FCD00021816170472DE9FF4F0646FB\n:1007A0000C46488883B040F2E24148430190E08A19\n:1007B000002500FB01FA94F8640090460D2822D031\n:1007C0000C2820D024281ED094F8650024281AD0A4\n:1007D00000208346069818B10121204603F000F955\n:1007E00094F8541094F85500009094F8D8200F46CF\n:1007F0004FF47A794AB1012A61D0022A44D0032AFF\n:100800005DD0FFDFB5E00120E3E7B8F1000F00D1D4\n:10081000FFDFD24814F8541F243090F83800FCF75A\n:1008200004FF01902078F7F75EF84D4600F2E730BC\n:10083000B0FBF5F1DFF82493D9F80C0001EB0008C8\n:100840002078F7F750F8014614F85409022816D01A\n:10085000012816D040F6340008444AF2EF0108445B\n:10086000B0FBF5F10198D9F81C20411A514402EB74\n:1008700008000D18012084F8D8002D1D78E02846C6\n:10088000EAE74FF4C860E7E7DFF8D092A8F101008B\n:10089000D9F80810014300D1FFDFB148B8F1000FCB\n:1008A000016801EB0A0506D0D9F8080000F22330F0\n:1008B000A84200D9FFDF032084F8D80058E094F85C\n:1008C0006420019D242A05D094F86530242B01D0A2\n:1008D000252A3AD1B4F85820B4F8F830D21A521C6C\n:1008E00012B2002A31DB94F8FA2072B3174694F85A\n:1008F000FB2002B110460090022916D0012916D023\n:1009000040F6340049F608528118022F12D0012F08\n:1009100012D040F634001044814210D9081A00F574\n:10092000FA70B0FBF9F005440FE04846EAE74FF4EF\n:10093000C860E7E74846EEE74FF4C860EBE7401AC7\n:1009400000F5FA70B0FBF9F02D1AB8F1000F0FD0D6\n:10095000DFF80882D8F8080018B9B8F8020000B12A\n:10096000FFDFD8F8080000F22330A84200D9FFDFEB\n:1009700005B9FFDF2946D4F8DC00F3F77EFEC4F8A2\n:10098000DC00B060002030704FF0010886F8048071\n:10099000204603F080F8ABF10101084202D186F84D\n:1009A000058005E094F8D80001282FD0032070714D\n:1009B000606A3946009A01F026FBF060069830EA3A\n:1009C0000B0020D029463046FCF752FB87B2204668\n:1009D00003F061F8B8420FD8074686F8058005FB9A\n:1009E00007F1D4F8DC00F3F748FEB0602946304642\n:1009F000FCF73EFB384487B23946204602F0F0FF50\n:100A0000B068C4F8DC0007B0BDE8F08F0220CEE784\n:100A10002DE9F04106460C46012001F0D6FAC5B298\n:100A20000B2001F0D2FAC0B2854200D0FFDF0025D2\n:100A3000082C7DD2DFE804F00461696965C98E96EF\n:100A4000304601F0D6FA0621F1F7D4FF040000D1B8\n:100A5000FFDF304601F0CDFA2188884200D0FFDF69\n:100A600094F8D80000B9FFDF204602F060FE3B4E4C\n:100A700021460020B5607580F561FCF729FC00F186\n:100A80009807606AB84217D994F85500F6F712FF34\n:100A9000014694F854004FF47A72022828D00128B5\n:100AA00028D040F6340008444AF247310844B0FBED\n:100AB000F2F1606A0844C51B214600203561FCF74D\n:100AC00007FC618840F2E24251439830081AA0F2D4\n:100AD0002330706194F8552094F85410606A01F046\n:100AE00092FAA0F29310B061BDE8F041F4F7AABD0C\n:100AF0001046D8E74FF4C860D5E7BDE8F04102F0F2\n:100B000080BEBDE8F041F6F7A7BB6FF0040001F02E\n:100B10005CFAC4B2192001F058FAC0B2844200D085\n:100B2000FFDF304601F065FA0621F1F763FF00E0D0\n:100B30004BE0040000D1FFDF304601F05AFA218873\n:100B4000884200D0FFDF2046BDE8F04101220021AD\n:100B500001F076BAF6F720FAD3E70000A0120020E1\n:100B600088010020304601F044FA0621F1F742FFE7\n:100B7000040000D1FFDF304601F03BFA21888842B3\n:100B800000D0FFDF94F8D800042800D0FFDF84F8FD\n:100B9000D85094F8E2504FF6FF76202D00D3FFDFB7\n:100BA000FB4820F8156094F8E200F4F746F800B925\n:100BB000FFDF202084F8E2002046FFF7D3FDF54850\n:100BC0000078BDE8F041E2F7A7B9FFDFBDE8F081AA\n:100BD00070B5EF4C0025483C84F82C50E07868B1A3\n:100BE000E570FEF76AF92078042803D0A06AFFF7C1\n:100BF000B9FDA562E7480078E2F78EF9BDE87040DC\n:100C000001F02FBA70B5E24C0146483C206AF4F777\n:100C10004CFD6568A27890FBF5F172B140F271224B\n:100C2000B5FBF2F292B2E36B01FB02F6B34202D9DA\n:100C300001FB123200E00022E2634D43002800DA9B\n:100C4000FFDF2946206AF3F718FD206270BD2DE909\n:100C5000F05FFEF785F98246CD486C3800F1240834\n:100C600081684646D8F81C00F3F707FD0146306A54\n:100C7000F4F71BFD4FF00009074686F839903C4613\n:100C80004FF423754E461CE00AEB06000079F6F798\n:100C900011FE4AF2B12101444FF47A70B1FBF0F138\n:100CA00008EB86024046926811448C4207D3641ACE\n:100CB00090F83910A4F52374491C88F83910761C73\n:100CC000F6B298F83A00B042DED8002C0FDD98F862\n:100CD0003910404608EB81018968A14207D241687A\n:100CE000C91BA94200D90D466C4288F8399098F882\n:100CF0003960C3460AEB060898F80400F6F7DAFDF7\n:100D000001464AF2B12001444FF47A7AB1FBFAF27B\n:100D100098F80410082909D0042909D000201318D4\n:100D200004290AD0082908D0252007E0082000E07F\n:100D3000022000EB40002830F1E70F20401D4FF467\n:100D4000A872082913D0042914D0022915D04FF015\n:100D5000080C282210FB0C20184462190BEB8603A8\n:100D600002449868D84682420BD8791925E04FF0A2\n:100D7000400CEFE74FF0100CECE74FF0040C18229A\n:100D8000E8E798F8392098F83A604046B24210D225\n:100D9000521C88F839203C1B986862198418084650\n:100DA000F6F788FD4AF2B1210144B1FBFAF00119CE\n:100DB00003E080F83990D8F80410D8F82000BDE896\n:100DC000F05FF3F75ABC2DE9FE4F14460546FEF7D7\n:100DD000C7F8DFF8BCB10290ABF1480B58469BF85E\n:100DE00039604FF0000A0BEB86018968CBF84010A0\n:100DF000ECB3044600780027042827D0052840D00B\n:100E0000FFDFA0463946A069F3F737FC0746F3F742\n:100E100033FF81463946D8F80440F4F746FC401EBB\n:100E200090FBF4F0C14361433846F3F726FC0146DA\n:100E3000C8F820004846F4F738FC002800DDFFDF42\n:100E4000012088F8140088F813008FE0D4F8189077\n:100E5000D4F8048001F06FF9070010D0387800B999\n:100E6000FFDF796978684A460844414600E00EE0B1\n:100E700001F049F907464045C3D9FFDFC1E75746AE\n:100E8000BFE7A06A01F0FAF840F6B837B9E7016A9F\n:100E90000BEB46000191C08D08B35C46DBF81800EF\n:100EA000FFF7B0FE6168206AF3F7E7FB074684F8B6\n:100EB00039A0019CD8462046DBF81810F4F7F5FB62\n:100EC000814639462046F4F7F0FBD8F80420B9FBF8\n:100ED000F2F3B0FBF2F0834243D0012142E0F3F79A\n:100EE000CBFEFFF78FFEFFF7B2FE9BF83910DBF861\n:100EF00004900BEB81010746896800913946DBF8C5\n:100F00002000F4F7D2FB00248046484504DB98FB20\n:100F1000F9F404FB09F41BE0002059469BF8392042\n:100F200008E000BF01EB800304F523749B68401CBC\n:100F30001C44C0B28242F5D852B10120F6F7BAFC87\n:100F40004AF2B12101444FF47A70B1FBF0F004444D\n:100F50000099A8EB04000C1A00D5FFDFCBF8404045\n:100F6000A7E7002188F8141088F813A09BF8020066\n:100F70005C46B8B13946206AF4F797FB0146E26B4C\n:100F800040F2712042438A4206D2C4F840A009E0F0\n:100F90000C13002084010020206C511A884200D3D9\n:100FA00008462064AF6085F800A001202871029FE8\n:100FB00094F839003F1DC05DF6F77CFC4AF23B51C6\n:100FC00001444FF47A70B1FBF0F0216CFB3008441F\n:100FD000E8602078042808D194F8390004EB400038\n:100FE000C08D0A2801D2032000E00220687104EBC2\n:100FF0004600C08DC0B128466168FCF739F882B25E\n:101000000020761C0CE000BF04EB4003B042D98DF9\n:10101000114489B2D98501D3491CD985401CC0B27D\n:1010200094F83A108142EFD2A868A061E06194F888\n:10103000390004EB4000C18D491CC18594F839008A\n:10104000C05D082803D0042803D000210BE008214C\n:1010500000E0022101EB410128314FF4A872082879\n:1010600004D0042802D0022807D028220A440428E9\n:1010700005D0082803D0252102E01822F6E70F2129\n:10108000491D08280CD004280CD002280CD00820B8\n:1010900011FB0020216C884208D20120BDE8FE8FA0\n:1010A0004020F5E71020F3E70420F1E70020F5E702\n:1010B00070B5FB4C061D14F8392F905DF6F7FAFB5E\n:1010C0004FF47A7100F2E730B0FBF1F0D4F807107A\n:1010D00045182078805DF6F7DBFB2178895D0829CB\n:1010E00003D0042903D000220BE0082200E00222F2\n:1010F00002EB420228324FF4A873082904D00429D5\n:1011000002D0022907D028231344042905D0082936\n:1011100003D0252202E01823F6E70F22521D0829EA\n:101120000AD004290AD002290AD0082112FB013171\n:10113000081A281A293070BD4021F7E71021F5E779\n:101140000421F3E7FEB504460F46012000F03DFF01\n:10115000C5B20B2000F039FFC0B2854200D0FFDFDE\n:1011600001260025CE48082F50D2DFE807F00430D2\n:101170004747434F4F4C0446467406744078002856\n:1011800019D1FDF7EDFE009594F839108DF808108F\n:101190004188C90410D0606C019003208DF80900CB\n:1011A000BF4824388560C56125746846FDF7C5FBD6\n:1011B000002800D0FFDFFEBDFFF77AFF0190207D01\n:1011C00010B18DF80950EBE78DF80960E8E70446A7\n:1011D000407840B1207C08B9FDF744FE6574BDE855\n:1011E000FE40F3F753BCA674FDF786FC0028E2D05E\n:1011F000FFDFFEBDBDE8FE40F6F72EB82046BDE895\n:10120000FE4000F0A1BFBDE8FE40E1E4FFDFFEBD0F\n:10121000A34950B101228A704A6840F27123B2FB9F\n:10122000F3F202EB0010C86370470020887070472B\n:101230002DE9F05F894640F27121994E484300251F\n:101240000446706090462F46D0074AF2B12A4FF408\n:101250007A7B0FD0B9F800004843B0600120F6F760\n:1012600029FB00EB0A01B1FBFBF0241AB76801254A\n:10127000A4F523745FEA087016D539F8151040F20A\n:101280007120414306EB85080820C8F80810F6F7DE\n:1012900011FB00EB0A01B1FBFBF0241AD8F808009F\n:1012A000A4F5237407446D1CA7421AD9002D18D049\n:1012B000391BB1FBF5F0B268101AB1FBF5F205FB72\n:1012C0001212801AB060012009E000BFB1FBF5F3F3\n:1012D00006EB80029468E31A401CC0B29360A842F7\n:1012E000F4D3BDE8F09F2DE9F0416D4C0026207845\n:1012F000042804D02078052801D00C2066E40120C1\n:101300006070607C002538B1EFF3108010F0010FA1\n:1013100072B610D001270FE0FDF722FE074694F8C1\n:101320002400F4F70EF87888C00411D000210320BF\n:10133000FDF71BFE0CE00027607C38B1A07C28B1D3\n:10134000FDF790FD6574A574F3F7A0FB07B962B6CD\n:1013500094F82400F4F743FA94F82C0030B184F8A0\n:101360002C502078052800D0FFDF0C26657000F097\n:1013700078FE30462AE44A4810B5007808B1FFF7F5\n:10138000B2FF00F011FF464900202439086210BD69\n:1013900010B5444C58B1012807D0FFDFA06841F6D2\n:1013A0006A01884200D3FFDF10BD40F6C410A06080\n:1013B000F4E73C4908B508703949002008704870C6\n:1013C00081F82C00C87008744874887420228862E0\n:1013D00081F82420243948704FF6FF7211F16C0116\n:1013E00021F81020401CC0B22028F9D30020FFF7BC\n:1013F000CFFFFFF7C0FF1020ADF8000001226946C3\n:101400000420FFF715FF08BD7FB5254C05460E46A5\n:10141000207810B10C2004B070BD95F8552095F8D7\n:101420005410686A00F002FFC5F8EC00A56295F858\n:10143000D80000B1FFDF1A4900202439C861052116\n:101440002170607084F82C00014604E004EB410236\n:10145000491CD085C9B294F83A208A42F6D284F861\n:1014600039003046FFF7D4FE0F48F3F78AFB84F8C3\n:101470002400202800D1FFDFF3F7FEFBA06194F8E1\n:10148000241001226846FFF79EFC00B9FFDF94F8A4\n:1014900024006946F3F73AFE00B9FFDF0020BAE7FF\n:1014A000C41200208401002045110200F84810B544\n:1014B000007808B1002010BD0620F1F735FA80F061\n:1014C000010010BDF8B5F24D0446287800B1FFDFE9\n:1014D0000020009023780246DE0701466B4605D0C7\n:1014E0006088A188ADF800100122114626787607A1\n:1014F00006D5E088248923F8114042F00802491CEF\n:10150000491E85F83A101946FFF792FE0020F8BDF3\n:101510001FB511B1112004B010BDDD4C217809B107\n:101520000C20F8E70022627004212170114604E0CB\n:1015300004EB4103491CDA85C9B294F83A308B4276\n:10154000F6D284F83920FFF763FED248F3F719FB8F\n:1015500084F82400202800D1FFDF00F0ECFD10B15A\n:10156000F3F78AFB05E0F3F787FB40F6B831F3F7B2\n:1015700084F8A06194F8241001226846FFF723FC48\n:1015800000B9FFDF94F824006946F3F7BFFD00B906\n:10159000FFDF0020BFE770B5BD4CA16A0160FFF717\n:1015A000A2FE050002D1A06AFFF7DCF80020A062CD\n:1015B000284670BD7FB5B64C2178052901D00C2096\n:1015C00029E7B3492439C860A06A00B9FFDFA06ADF\n:1015D00090F8D80000B1FFDFA06A90F8E200202860\n:1015E00000D0FFDFAC48F3F7CCFAA16A054620280B\n:1015F00081F8E2000E8800D3FFDFA548483020F8CC\n:101600001560A06A90F8E200202800D1FFDF0023D7\n:1016100001226846A16AFFF7C0F8A06A694690F8FF\n:10162000E200F3F773FD00B9FFDF0020A062F2E6ED\n:10163000974924394870704710B540F2E24300FBE7\n:1016400003F4002000F0F2FD844201D9201A10BDFD\n:10165000002010BD70B50D46064601460020FBF780\n:1016600037FE044696F85500F6F724F9014696F839\n:1016700054004FF47A72022815D0012815D040F694\n:10168000340008444AF247310844B0FBF2F1708854\n:1016900040F271225043C1EB4000A0F22330A5423A\n:1016A00006D2214605E01046EBE74FF4C860E8E7B4\n:1016B0002946814204D2A54201D2204600E02846B4\n:1016C000706270BD70B5F5F7D5F80446F6F7E0F82E\n:1016D00001466F48243882684068101A0E18204668\n:1016E00000F06AFC05462046F6F7E4F8281A4FF4A5\n:1016F0007A7100F2E730B0FBF1F0304470BD70B5A4\n:101700000546FDF72DFC6249007824398C68983431\n:10171000072D30D2DFE805F0043434252C343400B2\n:1017200014214FF4A873042810D00822082809D0E7\n:101730002A2102280FD011FB024000222823D118B1\n:10174000441819E0402211FB0240F8E7102211FB77\n:1017500002402E22F3E7042211FB0240002218234C\n:10176000EDE7282100F040FC044404F5317403E067\n:1017700004F5B07400E0FFDF4548006CA04201D9D9\n:10178000012070BD002070BD70B5414C243C6078D4\n:1017900070B1D4E904512846A268FBF794FC20619B\n:1017A000A84205D0A169401B0844A061F3F74AFF95\n:1017B0002169A068884201D8207808B1002070BD56\n:1017C000012070BD2DE9F04F054685B016460F4645\n:1017D0001C461846F6F75CF805EB4701471820460B\n:1017E00000F0EAFB4AF2C5714FF47A7908444D469D\n:1017F000B0FBF5F0384400F16008254824388068D3\n:10180000304404902046F6F743F8A8EB0007204642\n:1018100000F0D2FB06462046F6F74CF8301AB0FB33\n:10182000F5F03A1A182128254FF4C8764FF4BF77FF\n:101830004FF0020B082C34D0042C2FD00020022CA7\n:1018400032D0082310F1280003EB830C0CEB831338\n:10185000184402444FF0000A082C2DD0042C26D046\n:101860000020022C2DD0082100F5B07001EB0111F1\n:101870002944884232D2082C2AD0042C25D00020BA\n:10188000022C28D00821283001EB011134E000009F\n:10189000C412002045110200110A0200384610232C\n:1018A000D2E730464023CFE704231830CCE73D464B\n:1018B00040F2EE301021D9E735464FF43560402133\n:1018C000D4E70D460421B430D0E738461021DBE7D9\n:1018D00030464021D8E704211830D5E7082C4FD0F6\n:1018E000042C4AD00020022C4DD0082110F12800F1\n:1018F000C1EBC10303EB4111084415182821204610\n:1019000000F072FB05EB4000082C42D0042C3DD0C7\n:101910000026022C3FD0082116F1280601EB811188\n:1019200006EB810146180120FC4D8DF804008DF86E\n:1019300000A08DF805B0E86906F227260499F2F7B1\n:101940009CFECDE902062046F5F7B4FF4AF23B5172\n:101950000144B1FBF9F0301AFB3828640298C5F84D\n:101960004480E86195F824006946F3F7CFFB00282E\n:1019700000D1FFDF05B0BDE8F08F38461021B7E792\n:1019800030464021B4E704211830B1E73E4610212B\n:10199000C4E74021C2E704211836BFE72DE9FE4F16\n:1019A00004461D46174688464FF0010A1846F5F7CB\n:1019B0006FFFDA4E0146243EB068021907EB48007B\n:1019C00010440F18284600F0F7FA4FF47A7B00F61F\n:1019D000FB01D846B1FBF8F0384400F12009284655\n:1019E000F5F756FFB1680246A9EB0100001B861A05\n:1019F000284600F0E1FA07462846F5F75BFF381A5B\n:101A0000B0FBF8F0311A182628234FF4C8774FF4AA\n:101A1000BF78082D2CD0042D27D00020022D2AD0ED\n:101A20000822283002EB820C0CEB82121044014495\n:101A3000082D28D0042D21D00020022D28D01E46AC\n:101A4000082200F5B07000BF02EB0212324490424F\n:101A50002AD2082D22D0042D1DD00020022D20D006\n:101A60000822283002EB02122CE040461022D9E76F\n:101A700038464022D6E704221830D3E7464640F2E3\n:101A8000EE301022E0E73E464FF435604022DBE7BF\n:101A90000422B430D8E740461022E3E7384640221B\n:101AA000E0E704221830DDE7082D4DD0042D48D0A2\n:101AB0000020022D4BD0082210F12800C2EBC203F7\n:101AC00003EB421210440E182821284600F08CFA2D\n:101AD00006EB4000082D40D0042D3BD00027022DFE\n:101AE0003DD0082117F1280701EB811107EB810197\n:101AF000451805F596750C98F5F7DCFE4AF23B5152\n:101B00000144B1FBFBF0854EFB30A6F12407316C9C\n:101B100004F1FB020844B9684B191A44824228D9DF\n:101B2000621911440D1AFB35E1F7B0F8B9680844A1\n:101B300061190844B0F1807F36D2642D12D264203E\n:101B400011E040461022B9E738464022B6E70422A9\n:101B50001830B3E747461021C6E74021C4E7042107\n:101B60001837C1E72846F3F7D4FDE8B1306C2844B4\n:101B70003064E1F78BF8B968293821440844CDE98D\n:101B8000000996F839008DF8080002208DF8090048\n:101B90006846FCF7D2FE00B1FFDFFCF7ADFF00B1F5\n:101BA000FFDF5046BDE8FE8F4FF0000AF9E71FB592\n:101BB00000F042FB594C607880B994F82410002260\n:101BC0006846FFF700F938B194F824006946F3F746\n:101BD0009DFA18B9FFDF01E00120E070F2F756FF2F\n:101BE00000206074A0741FBD2DE9F84FFDF7B8F90F\n:101BF0000646451CC07840090CD001280CD00228AC\n:101C00000CD000202978824608064FF4967407D439\n:101C10001E2006E00120F5E70220F3E70820F1E7A7\n:101C20002046B5F80120C2F30C0212FB00F7C809E8\n:101C300001D010B103E01E2401E0FFDF0024FFF714\n:101C400041FDA7EB00092878B77909EB0408C0F338\n:101C5000801010B120B1322504E04FF4FA7501E094\n:101C6000FFDF00250C2F00D3FFDF2D482D4A30F871\n:101C70001700291801FB0821501CB1FBF0F5F4F7FF\n:101C8000F9FDF5F717FE4FF47A7100F27160B0FBC1\n:101C9000F1F1A9EB0100471BA7F15900103FB0F586\n:101CA000237F11D31D4E717829B902465346294628\n:101CB0002046FFF787FD00F0BFFAF2F7E7FE0020AD\n:101CC0007074B074BDE8F88F3078009053462246A7\n:101CD00029463846FFF762FE0028F3D10121022091\n:101CE000FDF743F9BDE8F84F61E710B50446012957\n:101CF00003D10A482438007830B1042084F8D80091\n:101D0000BDE81040F2F7C2BE00220121204600F0DB\n:101D100097F934F8580F401C2080F1E7C4120020D6\n:101D2000A45C02003F420F002DE9F0410746FDF799\n:101D300017F9050000D1FFDF29783846FBF775FC5D\n:101D4000F84C0146A4F12406E069B268024467B386\n:101D50002878082803D0042803D000270BE00823A4\n:101D600000E0022303EB430728374FF4A873082849\n:101D700004D0042802D002280FD028233B4408288E\n:101D80000DD004280DD002280DD00820C0EBC007CC\n:101D900007EB40101844983009E01823EEE7402084\n:101DA000F4E71020F2E70420F0E74FF4FC70104451\n:101DB000471828783F1DF5F77DFD024628784FF437\n:101DC0007A7102281DD001281DD040F6340010443D\n:101DD0004AF2EF021044B0FBF1F03A1AA06A40F266\n:101DE000E241B0464788D8304F43316A81420DD036\n:101DF0003946606B00F087F90646B84207D9FFDF25\n:101E000005E00846E3E74FF4C860E0E70026C6486F\n:101E10008068864207D2A16A40F271224888424314\n:101E200006EB420604E040F2E240B6FBF0F0A16AA5\n:101E3000C882A06A297880F85410297880F8551053\n:101E400005214175C08A6FF41C71484306EB4000C0\n:101E500040F63541C8F81C00B0EB410F00D3FFDF5E\n:101E6000BDE8F08110B5052937D2DFE801F005099A\n:101E7000030D3100002100E00121BDE8104034E7EE\n:101E8000032180F8D81010BD0446408840F2E2419A\n:101E90004843A549091D0860D4F800010089E08283\n:101EA000D4F8000180796075D4F800014089608021\n:101EB000D4F800018089A080D4F80001C089E080B6\n:101EC0002046A16AFFF7C6FB022084F8D80010BDA7\n:101ED000816ABDE81040FFF7BDBBFFDF10BD70B5E4\n:101EE000904C243C0928A1683FD2DFE800F0050BA4\n:101EF0000B15131538380800BDE8704057E6BDE8EB\n:101F0000704071E6022803D00020BDE870400BE766\n:101F10000120FAE7E16070BD032802D005281CD03B\n:101F200000E0E1605FF0000600F086F97D4D0120E1\n:101F300085F82C0085F83860A86AE9690026C0F8A1\n:101F4000DC1080F8D860E068FFF734FB00B1FFDFF9\n:101F5000F2F79CFD6E74AE7470BD0126E4E7724822\n:101F60000078BDE87040E0F7D7BFFFDF70BD6D4976\n:101F700024394860704770B56A4D0446243DB1B1BC\n:101F80004FF47A76012903D0022905D0FFDF70BD16\n:101F90001846F5F7C9FC05E06888401C68801046C3\n:101FA000F5F7A1FC00F2E730B0FBF6F0201AA860CC\n:101FB00070BD5C4800787047082803D0042801D021\n:101FC000F5F778BC4EF628307047002804DB00F1A6\n:101FD000E02090F8000405E000F00F0000F1E020A0\n:101FE00090F8140D4009704710F00C0000D008461E\n:101FF000704710B50446202800D3FFDF4948483019\n:1020000030F8140010BD70B505460C461046F5F7C3\n:1020100051FC4FF47A71022C0DD0012C0DD040F6FA\n:10202000340210444AF247321044B0FBF1F0284425\n:1020300000F2931070BD0A46F3E74FF4C862F0E770\n:102040001FB513460A46044601466846FEF7A5FB3F\n:1020500094F8E2006946F3F759F8002800D1FFDF51\n:102060001FBD70B52F4C0025257094F82400F2F7A1\n:10207000E4FD00B9FFDF84F8245070BD2DE9F04184\n:10208000050000D1FFDF274A0024243AD5F8EC6090\n:102090002046631E116A08E08869B04203D3984263\n:1020A00001D203460C460846C9680029F4D104B998\n:1020B00004460021C5F8E840D835C4B1E068E560C1\n:1020C000E86000B105612E698846A96156B1B06922\n:1020D00030B16F69B84200D2FFDFB069C01BA861A0\n:1020E000C6F818800F4D5CB1207820B902E0E96095\n:1020F0001562E8E7FFDF6169606808446863AFE67E\n:10210000C5F83480ACE610B50C4601461046F3F72E\n:10211000CCFA00280ADA211A491EB1FBF4F101FBBE\n:10212000040010BDC41200208401002090FBF4F1D3\n:1021300001FB1400F5E74648016A002001E008466B\n:10214000C9680029FBD170477FB504466FF00400D1\n:10215000FFF73BFFC5B21920FFF737FFC0B285423A\n:1021600000D0FFDFFCF7FCFE4088C00407D001214F\n:102170000320FCF7FAFE37480078E0F7CDFE002296\n:1021800021466846FEF71FFE38B169462046F2F741\n:10219000BDFF002800D1FFDF7FBD2D490120243184\n:1021A000C870FEF715FD7FBD2DE9FE43284D0120C7\n:1021B000287000264FF6FF7420E00621F0F71AFC85\n:1021C000070000D1FFDF97F8E200D837F3F707FBED\n:1021D00007F80A6BA14617F8E289B8F1200F00D37F\n:1021E000FFDF1B4A6C3222F8189097F8E200F2F7F2\n:1021F00024FD00B9FFDF202087F8E20069460620B1\n:10220000F0F781FB50B1FFDF08E0029830B190F8A1\n:10221000D81019B10088A042CFD104E06846F0F789\n:1022200050FB0028F1D02E70BDE8FE8310B5FFF7FB\n:10223000EAFE00F5C87074E705480021243090F8E4\n:10224000392000EB4200C18502480078E0F764BE07\n:10225000A012002084010020012804D0022805D00B\n:10226000032808D105E0012907D004E0022904D0A1\n:1022700001E0042901D00020704701207047FE488A\n:10228000806890F8881029B1B0F88410B0F88620E2\n:10229000914215D290F88C1029B1B0F88A10B0F89C\n:1022A000862091420CD2B0F88220B0F880108A4289\n:1022B00006D290F86820B0F87E001AB1884203D3A5\n:1022C000012070470628FBD2002070472DE9F0411D\n:1022D000E94D0746A86800F1580490F8FC0030B9B1\n:1022E000E27B002301212046FAF758FE10B1608DF1\n:1022F000401C608501263D21AFB92878022808D00E\n:1023000001280AD06878C8B110F0140F09D01E2037\n:1023100039E0162037E0E6763EE0A86890F8FE0047\n:1023200031E0020701D52177F5E7810701D02A20A6\n:1023300029E0800600D4FFDF232024E094F8300059\n:1023400028B1A08D411CA185E18D884213D294F85B\n:10235000340028B1608E411C6186E18D88420AD22A\n:10236000618D208D814203D3AA6892F8FC2012B9B6\n:10237000E28D914201D3222005E0217C29B1E18C3C\n:10238000814207D308202077C5E7E08C062801D3D7\n:102390003E20F8E7E07EB0B1002020736073207427\n:1023A0000221A868FFF75EFDA86890F8CC1001290B\n:1023B00004D1D0F804110878401E0870E878BDE810\n:1023C000F041E0F7A9BDA868BDE8F0410021FFF7A2\n:1023D00049BDA9490C28896881F8CC0014D013287C\n:1023E00012D0182810D0002211280ED007280BD0A8\n:1023F00015280AD0012807D0002805D0022803D0CC\n:1024000021F8842F012008717047A1F88A207047B5\n:1024100010B5994CA1680A88A1F8462181F84401B9\n:1024200091F8540001F073FBA16881F8480191F81C\n:10243000550001F06CFBA16881F84901012081F889\n:102440004201002081F81601E078BDE81040E0F775\n:1024500063BD70B5884C00231946A06890F86420CD\n:102460005830FAF79BFD00283DD0A06890F808117D\n:102470000025C9B3A1690978B1BB90F86500FAF7E6\n:1024800075FD88BBA168B1F858000A282DD905222E\n:102490000831E06903F046F810B3A068D0F80411E1\n:1024A000087858B10522491CE06903F03BF8002880\n:1024B00019D1A068D0F80401007840B9A068E1699A\n:1024C000D0F804010A68C0F8012009794171A068B8\n:1024D000D0F804110878401C08700120FFF779FF3C\n:1024E000A06880F8085170BDFFE7A06890F80C1153\n:1024F00011B190F80D11B9B390F816110029F2D06E\n:1025000090F817110029EED190F86500FAF72EFD2A\n:102510000028E8D1A06890F8540001F0F8FA0646C7\n:10252000A06890F8550001F0F2FA0546A06890F80E\n:1025300018113046FFF790FE90B3A06890F819117B\n:102540002846FFF789FE58B3A268B2F8583092F8CF\n:102550005410B2F81A01F832FBF730F818B3A1683A\n:10256000252081F86400BEE7FFE790F86510242974\n:1025700017D090F86410242913D0002300F1FA0238\n:1025800000F58671FAF7BAFDA06880F80C5130F8B2\n:10259000421FA0F88C108188A0F88E10142007E04C\n:1025A00005E00123EAE7BDE87040002030E716208F\n:1025B000BDE870400DE710B5F3F73CFC0C2813D3D1\n:1025C0002D4C0821A068D0F800011E30F3F736FC2E\n:1025D00028B1A0680421C030F3F730FC00B9FFDF58\n:1025E000BDE810400320F4E610BD10B5224CA068F1\n:1025F000D0F800110A78002A1FD049880288914239\n:102600001BD190F86420002319465830FAF7C6FC15\n:10261000002812D0A068D0F800110978022907D04C\n:1026200003290BD0042917D0052906D108200DE075\n:1026300090F86500FAF79AFC40B110BD90F8691067\n:1026400039B190F86A0000B9FFDF0A20BDE81040F8\n:10265000BFE6BDE81040AEE790F890008007ECD1EF\n:102660000C20FFF7B6FEA068002120F8841F01218E\n:102670000171017B02E000009001002041F00101A6\n:10268000017310BD70B5FE4CA268556DFAF730FFAE\n:10269000EBB2C1B200228B4203D0A36883F8FA10D8\n:1026A00002E0A16881F8FA20C5F30721C0F30720F2\n:1026B000814203D0A16881F8FB0014E7A06880F88C\n:1026C000FB2010E770B5EE48806890F84E20448EED\n:1026D000C38E418FB0F84050022A23D0A94200D3C4\n:1026E00029460186C18FB0F84220914200D311469D\n:1026F0008186018FB0F84420914200D31146418673\n:10270000818FB0F84620914200D31146C186418E98\n:10271000A14200D90C464486C18E994200D90B468D\n:10272000C386E0E6028E914200D31146C68F828EA8\n:10273000964200D23246A94200D329460186B0F81B\n:1027400042108A4200D30A468286002180F84E1049\n:10275000CFE770B5CA4CA06890F8CC10FE2955D1CF\n:102760006178002952D190F8672000230121583068\n:10277000FAF714FC002849D1A06890F8FC1009B1C0\n:10278000022037E090F86420002319465830FAF709\n:1027900005FC28B1A06890F87C0008B1122029E05F\n:1027A000A068002590F86420122A1DD004DC032ABA\n:1027B00023D0112A04D119E0182A1AD0232A26D0AE\n:1027C000002304215830FAF7E9FB00281ED1A06845\n:1027D00090F86510192970D020DC01292AD002292F\n:1027E00035D0032932D120E00B2003E0BDE8704052\n:1027F000E1E60620BDE87040EBE510F8CA1F017164\n:102800000720FFF7E6FDA06880F864506BE618200B\n:10281000FFF7DFFDA068A0F8845064E61D2918D0FA\n:102820001E2916D0212964D148E010F8C91F417132\n:1028300007206EE00C20FFF7CCFDA06820F88A5F2F\n:10284000817941F00101817100F8255C51E013208C\n:102850002AE090F80D217ABB90F80C21AAB1242926\n:1028600011D090F8641024290DD0002300F1FA0251\n:1028700000F58671FAF742FCA0681E2180F8651009\n:1028800080F80C5103E00123F0E71E2931D1FFF756\n:1028900019FF01F04EF9A06830F8421FA0F88C1023\n:1028A0008188A0F88E101520FFF793FDA068A0F88E\n:1028B0008A5000BF80F865501BE029E090F87D1039\n:1028C00049B100F8FA5F45701820FFF782FDA06853\n:1028D000A0F88A500DE090F8171151B990F8161130\n:1028E00039B1016DD0F81801FFF7CCFE1820FFF7C1\n:1028F00070FDA06890F8CC00FE2887D1FFF775FE28\n:10290000A06890F8CC00FE2887D1BDE87040A0E513\n:102910001120FFF75EFDA068CCE7594A01299268B3\n:1029200019D0002302290FD003291ED010B301288B\n:102930002BD0032807D192F86400132803D016285F\n:1029400001D0182804D1704792F8CC000028FAD0A2\n:10295000D2F8000117E092F8CC000128F3D0D2F8A9\n:1029600004110878401E0870704792F8CC000328C4\n:10297000EED17047D2F80001B2F858108288891A57\n:1029800009B20029F5DB03707047B2F85800B2F8BD\n:102990000A11401A00B20028F6DBD2F804010178CF\n:1029A000491E0170704770B5044690F86400002518\n:1029B0000C2810D00D282ED1D4F80011B4F85800EE\n:1029C0008988401C884226D1D4F84C012C4E0178CD\n:1029D00011B3FFDF42E0B4F85800B4F80A11401C0C\n:1029E000884218D1D4F80401D0F80110A1604079D0\n:1029F000207302212046F9F7ABFFD4F804010078D8\n:102A000000B9FFDF0121FE20FFF787FF84F8645043\n:102A1000012084F8980066E52188C180D4F800017F\n:102A2000D4F84C1140890881D4F80001D4F84C1135\n:102A300080894881D4F80001D4F84C11C08988817C\n:102A4000D4F84C010571D4F84C1109200870D4F861\n:102A50004C1120884880F078E0F75EFA012120468A\n:102A6000F9F776FF03212046FFF7FCF9B068D0F8AC\n:102A700000010078022800D0FFDF0221FE2001E0E3\n:102A800090010020FFF749FF84F864502BE52DE901\n:102A9000F041002603270125FE4CD4F808C088B178\n:102AA0002069C0788CF8CA0005FA00F0C0F3C05065\n:102AB00000B9FFDFA06800F8647F068480F8245026\n:102AC000BDE8F08100239CF8652019460CF1580000\n:102AD000FAF764FA70B160780028F1D12069C17802\n:102AE000A06880F8C91080F86570A0F88A6080F846\n:102AF0008C50E5E76570E3E7F0B5E64C002385B060\n:102B0000A068194690F865205830FAF747FA012571\n:102B100080B1A06890F8640023280ED024280CD03F\n:102B20006846F4F7EAFF68B1009801A9C0788DF80B\n:102B3000040008E0657005B0F0BD607840F020004A\n:102B40006070F8E70021A06803AB162290F86400DB\n:102B5000FAF74FFD002670B1A0689DF80C201621F1\n:102B600000F8F42F4170192100F88F1C00F8685C00\n:102B700020F86A6CDFE72069FBF7E7F878B1216994\n:102B8000087900F00702A06880F85020497901F028\n:102B9000070180F8511090F817310BBB03E00020BB\n:102BA000FFF775FFC7E790F81631CBB900F1540372\n:102BB0005F78974205D11A788A4202D180F87D5019\n:102BC0000EE000F59F71028821F8022990F850204C\n:102BD0000A7190F8510048710D70E078E0F79CF9A7\n:102BE000A068212180F8651080F88C50A0F88A60D8\n:102BF000A1E770B5A74C00231946A06890F865209E\n:102C00005830FAF7CBF928B32069FBF783F830B3D3\n:102C1000A5682069FBF77AF82887A5682069FBF783\n:102C200071F86887A5682069FBF772F8A887A5681E\n:102C30002069FBF769F8E887A068012590F864101F\n:102C40001C2910D090F84E10012912D090F80D11C7\n:102C500079B90BE0607840F00100607043E4BDE8B2\n:102C60007040002013E780F84E5002E090F80C11FD\n:102C700019B11E2180F8651012E01D2180F8651041\n:102C800000F58E710288CA82028F0A83428F4A83BE\n:102C9000828F8A83C08FC8830D75E078E0F73CF996\n:102CA000A068002120F88A1F85701CE410B5794CBB\n:102CB00000230921A06890F864205830FAF76EF9D3\n:102CC00048B16078002805D1A16801F87C0F08732D\n:102CD00001F8180C10BD0120607010BD7CB56D4C62\n:102CE00000230721A06890F864205830FAF756F9BD\n:102CF00038B36078002826D169462069FBF720F8B0\n:102D00009DF80000002500F02501A06880F89610CD\n:102D10009DF8011001F0490180F8971080F8885063\n:102D2000D0F8001100884988814200D0FFDFA068F8\n:102D3000D0F800110D70D0F84C110A7822B1FFDFE5\n:102D400016E0012060707CBD30F8D02BCA80C16FC6\n:102D50000D71C16F009A8A60019ACA60C26F082122\n:102D6000117030F8D01CC06F4180E078E0F7D4F8E3\n:102D7000A06880F864507CBD70B5464C00231946AD\n:102D8000A06890F865205830FAF708F9012540B995\n:102D9000A0680023082190F864205830FAF7FEF864\n:102DA00010B36078002820D1A06890F890008007C8\n:102DB00012D42069FAF78AFFA16881F8910020698E\n:102DC00030F8052FA1F892204088A1F8940011F85E\n:102DD000900F40F002000870A0684FF0000690F8D5\n:102DE0009010C90702D011E0657066E490F8652084\n:102DF000002319465830FAF7D1F800B9FFDFA06870\n:102E000080F8655080F88C50A0F88A60A06890F82F\n:102E10006410012906D180F8646080F88860E07849\n:102E2000E0F77AF8A168D1F80001098842888A425F\n:102E3000DBD101780429D8D10670E078E0F76CF88E\n:102E4000A06890F864100029CFD180F8886034E43D\n:102E500070B5104DA86890F864101A2902D00220AD\n:102E600068702AE469780029FBD1002480F88D403D\n:102E700080F88840D0F8001100884988814200D04D\n:102E8000FFDFA868D0F800110C70D0F84C110A7858\n:102E900022B101E090010020FFDF25E090F88E20B4\n:102EA00072B180F88E400288CA80D0F84C110C7143\n:102EB000D0F84C210E2111700188D0F84C010DE0A2\n:102EC00030F8D02BCA80C16F0C71C26F0121117212\n:102ED000C26F0D21117030F8D01CC06F418000F01E\n:102EE000A2FEE878E0F718F8A86880F8644018E4D3\n:102EF00070B5FA4CA16891F86420162A01D0132A03\n:102F000002D191F88E2012B10220607009E462783B\n:102F1000002AFBD181F8C800002581F88D5081F886\n:102F20008850D1F8000109884088884200D0FFDF2E\n:102F3000A068D0F800010078032800D0FFDF03214B\n:102F4000FE20FFF7EAFCA068D0F84C110A780AB11D\n:102F5000FFDF14E030F8C82BCA8010F8081BC26FDE\n:102F60001171C16F0D72C26F0D21117030F8D01C3C\n:102F7000C06F418000F057FEE078DFF7CDFFA0681A\n:102F800080F8645042E470B5D44C09210023A06855\n:102F900090F864205830FAF701F8002518B120693C\n:102FA000007912281ED0A0680A21002390F864201E\n:102FB0005830F9F7F3FF18B120690079142814D0BC\n:102FC0002069007916281AD1A06890F864101F298A\n:102FD00015D180F8645080F88850BDE870401A2000\n:102FE000FFF716BABDE8704060E6A06800F8645FBD\n:102FF000058480F82450BDE8704000F09ABD05E4D7\n:1030000070B5B64C2079C00773D020690023052124\n:10301000C578A06890F864205830F9F7BFFF98B1E0\n:10302000062D11D006DC022D0ED0042D0CD0052D5E\n:1030300006D109E00B2D07D00D2D05D0112D03D0A1\n:10304000607840F0080060706078002851D12069F5\n:10305000FAF7A0FD00287ED0206900250226C1785D\n:10306000891E162977D2DFE801F00B763437472224\n:10307000764D76254A457676763A53506A6D70736A\n:10308000A0680023012190F867205830F9F786FFE7\n:1030900008BB2069FAF7E2FDA16881F8FE0007206D\n:1030A00081F8670081F88C5081F8885056E0FFF76E\n:1030B0006AFF53E0A06890F864100F2901D0667091\n:1030C0004CE0617839B980F86950122180F86410B9\n:1030D00044E000F0D3FD41E000F0AFFD3EE0FAF740\n:1030E00072FE03283AD12069FAF771FEFFF700FF5C\n:1030F00034E03BE00079F9E7FFF7AAFE2EE0FFF7A6\n:103100003BFE2BE0FFF7EAFD28E0FFF7CFFD25E0CF\n:10311000A0680023194690F865205830F9F73EFF63\n:10312000012110B16078C8B901E0617016E0A068B3\n:1031300020F88A5F817000F8256C0FE00BE0FFF744\n:1031400058FD0BE000F03CFD08E0FFF7D5FC05E082\n:1031500000F002FD02E00020FFF799FCA268F2E90E\n:103160002A01401C41F10001C2E9000153E42DE9AC\n:10317000F0415A4C2079800741D5607800283ED133\n:10318000E06801270026C17820461929856805F1E5\n:1031900058006FD2DFE801F04B3E0D6FC1C1801CBB\n:1031A00034C1556287C1C1C1C1BE8B9598A4B0C15D\n:1031B000BA0095F8672000230121F9F7EFFE0028F7\n:1031C0001DD1A068082180F8671080F8886090E021\n:1031D000002395F865201946F9F7E0FE10B1A068C4\n:1031E00080F88C60A0680023194690F8642058305D\n:1031F000F9F7D4FE002802D0A06880F888605FE468\n:10320000002395F864201946F9F7C8FE00B9FFDFDE\n:10321000042008E0002395F864201946F9F7BEFE63\n:1032200000B9FFDF0C20A16881F8640048E40023A6\n:1032300095F864201946F9F7B1FE00B9FFDF0D20BB\n:10324000F1E7002395F864201946F9F7A7FE00B9C5\n:10325000FFDFA0680F2180F88D7008E095F864000A\n:10326000122800D0FFDFA068112180F88E7080F84E\n:10327000641025E451E0002395F864201946F9F71D\n:103280008DFE20B9A06890F88E0000B9FFDFA0681D\n:10329000132180F88D70EAE795F86400182800D0B3\n:1032A000FFDF1A20BFE7BDE8F04100F066BD002354\n:1032B00095F864201946F9F771FE00B9FFDF052083\n:1032C000B1E785F88C6014E4002395F86420194672\n:1032D000F9F764FE00B9FFDF1C20A4E7900100208D\n:1032E000002395F865201946F9F758FE00B9FFDF6D\n:1032F000A06880F88C6082E7002395F86420194666\n:10330000F9F74CFE00B9FFDF1F208CE7BDE8F04164\n:1033100000F0FBBC85F86560D3E7FFDF6FE710B511\n:10332000F74C6078002837D1207940070FD5A06886\n:1033300090F86400032800D1FFDFA06890F86710C0\n:10334000072904D101212170002180F86710FFF7BF\n:103350000EFF00F0B8FCFFF753FEA078000716D56B\n:10336000A0680023052190F864205830F9F716FE74\n:1033700050B108206070A068D0F84C1108780D2872\n:1033800000D10020087002E00020F8F73BFAA068A6\n:10339000BDE81040FFF707BB10BD2DE9F041D84C48\n:1033A00007464FF000056078084360702079810679\n:1033B0002046806802D5A0F87E5004E0B0F87E1068\n:1033C000491CA0F87E1000F01AFD0126F8B1A08873\n:1033D000000506D5A06890F86A1011B1A0F87650E3\n:1033E00015E0A068B0F87610491CA0F8761000F03F\n:1033F000F5FCA068B0F87610B0F87820914206D3BA\n:10340000A0F8765080F82261E078DFF785FD20791A\n:1034100010F0600F08D0A06890F8681021B980F80B\n:1034200068600121FEF71EFD1FB9FFF778FFFFF767\n:1034300090F93846FEF74AFFBDE8F041F4F76CBB5F\n:10344000AF4A51789378194313D1114601288968FE\n:1034500008D01079400703D591F86700072808D0F5\n:1034600001207047B1F84800098E884201D8FEF764\n:103470008BB900207047A249C2788968012A06D01A\n:103480005AB1182A08D1B1F8F810FAF77ABCB1F895\n:103490000A114172090A81727047D1F800118988B6\n:1034A0004173090A8173704770B5954C05460E4605\n:1034B000A0882843A080A80703D5E80700D0FFDF35\n:1034C000E660E80700D02661A80719D5F07806283D\n:1034D00002D00B2814D10BE0A06890F864101829D2\n:1034E0000ED10021E0E92A11012100F83E1C07E07D\n:1034F000A06890F86410122902D1002180F86A10A7\n:10350000280601D50820A07068050AD5A068828821\n:10351000B0F85810304600F081FC3046BDE87040ED\n:10352000A9E762E43EB505466846F4F7C0FA00B97B\n:10353000FFDF2221009802F0A0F803210098FAF79B\n:1035400011FB0098017821F0100101702946FAF76B\n:103550002EFB6B4C192D71D2DFE805F020180D3EC3\n:10356000C8C8C91266C8C9C959C8C8C8C8BBC9C96A\n:1035700071718AC89300A168009891F8FD1003E06A\n:10358000A168009891F8CE100171B0E0A068D0F861\n:1035900004110098491CFAF756FBA8E0A1680098AE\n:1035A000D1F8002192790271D1F80021128942717B\n:1035B000120A8271D1F800215289C271120A027274\n:1035C000D1F8002192894272120A8272D1F8001158\n:1035D000C989FAF70FFB8AE0A068D0F800110098BB\n:1035E000091DFAF73DFBA068D0F8001100980C31D6\n:1035F000FAF740FBA068D0F8001100981E31FAF7E6\n:103600003FFBA1680098C031FAF748FB6FE06269A0\n:1036100000981178017191884171090A817151886E\n:10362000C171090A017262E03649D1E90001CDE9B0\n:10363000010101A90098FAF74BFB58E056E0A06899\n:10364000B0F840100098FAF755FBA068B0F8CE101B\n:103650000098FAF753FBA068B0F844100098FAF706\n:1036600041FBA068B0F8D0100098FAF73FFB3EE0AD\n:10367000A268009892F81811017192F8191141711D\n:1036800035E0A06890F8FB00F9F729FF01460098A3\n:10369000FAF773FBA06890F8FA0000F033FA70B103\n:1036A000A06890F8540000F02DFA40B1A06890F89E\n:1036B000FA1090F85400814201D0002002E0A06886\n:1036C00090F8FA00F9F70BFF01460098FAF751FB62\n:1036D0000DE0A06890F8F5100098FAF772FBA0686A\n:1036E00090F8F4100098FAF770FB00E0FFDFF4F7B1\n:1036F000F1F900B9FFDF0098FFF7BDFE3EBD000005\n:1037000090010020BC5C0200F948806890F8FA1033\n:1037100009B990F8541080F8541090F8FB1009B9CA\n:1037200090F8551080F855100020FEF771BEF8B5DE\n:10373000EF4E00250446B060B5807570B5703570E9\n:103740000088F4F7B1F9B0680088F4F7D3F9B4F859\n:10375000E000B168401C82B201F15800F9F7D5F9D8\n:1037600000B1FFDF94F86500242809D1B4F858109F\n:10377000B4F8F800081A00B2002801DB707830B104\n:1037800094F8640024280AD0252808D015E0FFF713\n:10379000BBFF84F86550B16881F87D500DE0B4F846\n:1037A0005810B4F8F800081A00B2002805DB707849\n:1037B00018B9FFF7A9FF84F86450A4F8E050FEF7A9\n:1037C0005EFD00281CD1B06890F8CC00FE2801D026\n:1037D000FFF7A8FEC7480090C74BC84A21462846B5\n:1037E000F7F766FFB0680023052190F86420583091\n:1037F000F9F7D4FB002803D0BDE8F840F7F7F3BC95\n:10380000F8BD10B5FEF73BFD20B10020BDE810402B\n:103810000146C2E5BDE81040F7F7D0BF70B50C46D1\n:10382000064615464FF4A871204601F048FF268051\n:1038300005B9FFDF2868C4F800016868C4F804010E\n:10384000A868C4F84C0191E4EFF7DDB92DE9F04127\n:103850000D4607460621EFF7CDF8041E3DD0D4F8FB\n:103860004C110026087858B14A8821888A4207D12D\n:1038700009280FD00E2819D00D2826D008283ED0B0\n:1038800094F82201D0B36E701020287084F8226161\n:10389000AF809FE06E7009202870D4F84C01416819\n:1038A00069608168A9608089A88133E00846EFF7E4\n:1038B000D3F90746EEF77FFE70B96E700E202870C0\n:1038C000D4F84C014068686011E00846EFF7C4F98D\n:1038D0000746EEF770FE08B1002090E46E700D20F0\n:1038E0002870D4F84C014168696000892881D4F8B7\n:1038F0004C0106703846EEF758FE6BE00EE06E7035\n:1039000008202870D4F84C01416869608168A9607A\n:10391000C068E860D4F84C0106705BE094F82401BC\n:10392000A0B16E70152028700BE000BF84F82461F0\n:10393000D4F826016860D4F82A01A860B4F82E01F2\n:10394000A88194F824010028F0D143E094F83001D4\n:1039500070B16E701D20287084F83061D4F8320187\n:103960006860D4F83601A860B4F83A01A88131E063\n:1039700094F83C0140B16E701E20287084F83C61C0\n:10398000D4F83E01686025E094F81C0170B16E70B7\n:103990001B20287005E000BF84F81C61D4F81E01CC\n:1039A000686094F81C010028F6D113E094F84201F5\n:1039B000002892D06E701620287007E084F84261CB\n:1039C000D4F844016860B4F84801288194F84201B1\n:1039D0000028F3D1012012E4454A5061D1707047AC\n:1039E00070B50D4604464EE0B4F8E000401CA4F863\n:1039F000E000B4F87E00401CA4F87E00204600F0F1\n:103A0000FEF9B8B1B4F87600401CA4F87600204660\n:103A100000F0E4F9B4F87600B4F87810884209D3DD\n:103A20000020A4F87600012084F822013048C078F4\n:103A3000DFF772FA94F8880020B1B4F88400401CD3\n:103A4000A4F8840094F88C0020B1B4F88A00401CDB\n:103A5000A4F88A0094F8FC0040B994F86720002389\n:103A6000012104F15800F9F799FA20B1B4F8820065\n:103A7000401CA4F882002046FEF795FFB4F85800D9\n:103A8000401CA4F858006D1EADB2ADD249E5184AED\n:103A9000C2E90601704770B50446B0F87E0094F89C\n:103AA0006810D1B1B4F880100D1A2D1F94F87C0065\n:103AB00040B194F864200023092104F15800F9F77B\n:103AC0006DFA70B1B4F87660204600F098F938B11C\n:103AD000B4F87800801B001F03E0C0F10205E5E7A1\n:103AE0002846A84200DA0546002D09DC002018E52A\n:103AF000900100209B33020041340200A9340200EF\n:103B0000A8B20EE510F00C0000D00120704710B5EF\n:103B1000012808D0022808D0042808D0082806D098\n:103B2000FFDF204610BD0124FBE70224F9E7032450\n:103B3000F7E710B5EF4C0421A068FEF793F9A068F1\n:103B400090F84E10012903D0BDE8104000F098B95C\n:103B5000022180F84E1010BD70B5E64CA06890F8B8\n:103B600064001F2804D0607840F001006070D8E441\n:103B70002069FAF7F4F8D8B1206901220179407977\n:103B800001F0070161F30705294600F0070060F323\n:103B90000F21A06880F888200022A0F8842023222A\n:103BA00000F8642FD0F8B400BDE87040FEF76ABD9D\n:103BB0000120FEF76CFFBDE870401E20FEF728BC18\n:103BC00070B5CC4C00230A21A06890F864205830CE\n:103BD000F9F7E4F910B32069FAF79CF8A8B1A568E1\n:103BE0002069FAF793F82887A5682069FAF78AF818\n:103BF0006887A5682069FAF78BF8A887A568206907\n:103C0000FAF782F8E887FEF75DFDA168002081F8E9\n:103C1000880081F86400BDE870408AE7607840F071\n:103C2000010060707DE4B34810B580680088EFF74C\n:103C300013F8BDE81040EEF7A9BC10B5AD4CA36871\n:103C400093F86400162802D00220607010BD6078DE\n:103C50000028FBD1D3F80001002200F11E010E3034\n:103C6000B033F9F715F9A0680021C0E92811012146\n:103C700080F86910182180F8641010BD10B59D4CB3\n:103C8000A06890F86410132902D00220607010BD63\n:103C900061780029FBD1D0F8001100884988814261\n:103CA00000D0FFDFA068D0F8001120692631FAF7B4\n:103CB00002F8A1682069C431FAF705F8A168162056\n:103CC00081F8640010BD10B58A4C207900071BD51F\n:103CD0006078002818D1A068002190F8CC00FEF789\n:103CE0001CFEA06890F8CC00FE2800D1FFDFA06881\n:103CF000FE2180F8CC1090F86710082904D1022129\n:103D00002170002180F8671010BD70B5794D242115\n:103D10000024A86890F86520212A05D090F8642036\n:103D2000232A18D0FFDF8EE590F8FA2012B990F818\n:103D3000FB202AB180F86510A86880F88C4082E5E5\n:103D400000F8654F047690F8B1000028F4D0002008\n:103D5000FEF75EFBF0E790F8FA2012B990F8FB202E\n:103D60002AB180F86410A86880F888406BE580F874\n:103D700064400020FEF74CFBF5E770B55D4C002574\n:103D8000A068D0F8001103884A889A4218D10978AF\n:103D9000042915D190F86420002319465830F9F70A\n:103DA000FDF800B9FFDFA06890F89010890703D4F0\n:103DB000012180F8641003E000F8885F806F0570CF\n:103DC000A0680023194690F865205830F9F7E6F806\n:103DD000002802D0A06880F88C5034E5B0F8782034\n:103DE000B0F876108A4201D3511A00E0002182888F\n:103DF000521D8A4202D3012180F87C10704710B511\n:103E000090F86A1041B990F86420002306215830D8\n:103E1000F9F7C4F8002800D0012010BD70B5114496\n:103E2000344D891D8CB2C078A968012806D040B1F4\n:103E3000182805D191F8FA0038B109E0A1F80A4133\n:103E400001E5D1F800018480FDE491F8FB1091B107\n:103E5000FFF758FE80B1A86890F85400FFF752FEB3\n:103E600050B1A86890F8FA1090F85420914203D00D\n:103E700090F8FB0000B90024A868A0F8F840E2E43C\n:103E80002DE9F0411B4DA86800F58E740188618111\n:103E9000018EA181818EE181018FB0F84420914291\n:103EA00000D311462182828FB0F846108A4200D298\n:103EB0001146618290F85500FFF724FE4FF4296700\n:103EC00028B1608A3E46B84200D906466682A86894\n:103ED00090F85400FFF716FE20B1E089B84200D9EF\n:103EE0000746E78101202072E878BDE8F041DFF75E\n:103EF00013B800009001002070B58D4C0829207A7D\n:103F000062D2DFE801F0041959592561615978B18D\n:103F1000F2F73CFD01210846F2F7DFFEF3F713FD4F\n:103F20000020A072F2F7E5FDBDE87040F3F766B837\n:103F3000BDE87040F0F7AABDD4E90001F0F79DFBA1\n:103F40002060A07A401CC0B2A07228281CD370BD8B\n:103F5000A07A0025401EC6B2E0683044F3F73FF96E\n:103F600010B9E1687F208855A07A272828BF01254D\n:103F70002846F3F751FCA07A282809D2401CC0B289\n:103F8000A072282828BF70BDBDE87040F2F7B1BD0F\n:103F9000207A00281CBF012000F085F8F2F7A0FF6E\n:103FA000F3F71EF80120E07262480078DEF7B4FFF4\n:103FB000BDE87040F0F76ABD002808BF70BD002062\n:103FC000BDE8704000F06FB8FFDF70BD10B5584C11\n:103FD000207A002804BF0C2010BD00202072E0725F\n:103FE000607AF1F7AEF9607AF1F7F9FB607AF0F7F1\n:103FF00024FE00280CBF1F20002010BD002270B539\n:104000004B4C06460D46207A68B12272E272607A05\n:10401000F1F797F9607AF1F7E2FB607AF0F70DFEBD\n:10402000002808BFFFDF4348E560067070BD70B52B\n:10403000050007D0A5F5E8503F494C3881429CBFA8\n:10404000122070BD3A4CE068002804BF092070BD02\n:10405000207A00281CBF0C2070BD3848F0F791FD75\n:104060006072202804BF1F2070BDF0F705FE20609D\n:10407000002D1CBF284420600120656020720020B4\n:1040800000F011F8002070BD2949CA7A002A04BF47\n:10409000002070471F22027000224270CB684360EC\n:1040A000CA72012070472DE9F04184B00746F0F74D\n:1040B000E3FD1F4D8046414668682C6800EB800098\n:1040C00046002046F1F7F1FAB04206DB6868811B32\n:1040D0004046F0F7D2FA0446286040F23476214692\n:1040E0004046F1F7E2FAB04204DA31464046F0F7D2\n:1040F000C4FA044600208DF800004FF4DD60039000\n:1041000004208DF80500002F14BF012003208DF836\n:10411000040068460294F0F77EFF687A6946F0F77B\n:10412000F5FF002808BFFFDF04B0BDE8F081000004\n:104130004C130020B0010020B5EB3C00F93E02001A\n:104140002DE9F0410C4612490D68114A1149083217\n:104150001160A0F12001312901D301200CE0412898\n:1041600010D040CC0C4F94E80E0007EB8000241FC9\n:1041700050F8807C3046B84720600548001D056037\n:10418000BDE8F0812046DDF743F8F5E706207047EB\n:104190001005024001000001C45C020010B5534844\n:1041A000F1F7CAFD00B1FFDF5048401CF1F7C4FD34\n:1041B000002800D0FFDF10BD2DE9F14F4C4ED6F89E\n:1041C00000B001274948F1F7BFFDDFF8208128B989\n:1041D0005FF0000708F10100F1F7CCFD454C002528\n:1041E0004FF0030901206060C4F80051C4F8045185\n:1041F000009931602060DFF800A118E0DAF80000D3\n:10420000C00614D50E2000F064F8EFF3108010F013\n:10421000010072B600D00120C4F80493D4F8001154\n:1042200019B9D4F8041101B920BF00B962B6D4F8A5\n:10423000000118B9D4F804010028DFD0D4F8040133\n:104240000028CFD137B1C6F800B008F10100F1F76E\n:104250007BFD11E008F10100F1F776FD0028B9D1EE\n:10426000C4F80893C4F80451C4F800510E2000F0BB\n:1042700030F81E48F1F77EFD0020BDE8F88F2DE9EB\n:10428000F0438DB00D46064600240DF110090DF1E6\n:10429000200817E004EB4407102255F82710684661\n:1042A00001F06CF905EB870710224846796801F0A8\n:1042B00065F96846FFF780FF10224146B86801F0B3\n:1042C0005DF9641CB442E5DB0DB00020BDE8F0836D\n:1042D00072E7002809DB00F01F020121914040092C\n:1042E000800000F1E020C0F880127047B10100208A\n:1042F00004E5004000E0004010ED00E0B14900207E\n:104300000870704770B5B04D01232B60AF4B1C682F\n:10431000002CFCD0002407E00E6806601E68002E0A\n:10432000FCD0001D091D641C9442F5D300202860B8\n:1043300018680028FCD070BD70B5A24E0446A44D8C\n:104340003078022800D0FFDFAC4200D3FFDF716974\n:10435000A048012903D847F23052944201DD0322DC\n:104360004271491C7161291BC1609A497078F0F74C\n:10437000CDFE002800D1FFDF70BD70B5914C0D4619\n:104380006178884200D0FFDF914E082D4BD2DFE8E4\n:1043900005F04A041E2D4A4A4A382078022800D0E7\n:1043A000FFDF03202070A078012801D020B108E0B1\n:1043B000A06800F039FE04E004F1080007C8FFF728\n:1043C000A1FF05202070BDE87040F0F75FBBF0F75B\n:1043D00053FC01466068F1F768F9B04202D26169A6\n:1043E00002290BD30320F1F746FC12E0F0F744FC5E\n:1043F00001466068F1F759F9B042F3D2BDE8704068\n:104400009AE7207802280AD0052806D0FFDF04208A\n:104410002070BDE8704000F0CAB8022000E0032020\n:10442000F1F729FCF3E7FFDF70BD70B50546F0F743\n:1044300023FC644C60602078012800D0FFDF6549D0\n:10444000012008700020087104208D6048716048C8\n:10445000C860022020706078F0F758FE002800D174\n:10446000FFDF70BD10B5574C207838B90220F1F746\n:1044700018FC18B90320F1F714FC08B1112010BD85\n:104480005548F0F77EFB6070202804D00120207092\n:104490000020606110BD032010BD2DE9F0471446D7\n:1044A000054600EB84000E46A0F1040800F0CFFDA5\n:1044B00007464FF0805001694F4306EB8401091F06\n:1044C000B14201D2012100E0002189461CB10069FE\n:1044D000B4EB900F02D90920BDE8F0872846DCF73D\n:1044E000EBFE90B9A84510D3BD4205D2B84503D222\n:1044F00045EA0600800701D01020EDE73046DCF7E2\n:10450000DBFE10B9B9F1000F01D00F20E4E733480A\n:1045100033490068884205D0224631462846FFF7D5\n:10452000F1FE14E0FFF79EFF0028D5D125480021B9\n:104530008560C0E90364817000F06FF810B14FF43A\n:10454000A97000E0292060431830FFF76EFF0020BB\n:10455000C2E770B505464FF0805004696C432046B1\n:10456000DCF7AAFE08B10F2070BD00F070FDA84274\n:1045700001D8102070BD194819490068884203D03D\n:10458000204600F051FD10E0FFF76CFF0028F1D14C\n:104590000C4801218460817000F03FF808B1114897\n:1045A00000E011481830FFF740FF002070BD10B543\n:1045B000044C6078F0F741FB00B9FFDF0020207069\n:1045C00010BD0000B401002004E5014000E40140FA\n:1045D000105C0C005C1300207B43020054000020A0\n:1045E000BEBAFECA645E0100084C01004FF0805064\n:1045F000D0F830010A2801D0002070470120704710\n:1046000000B5FFF7F3FF20B14FF08050D0F8340130\n:1046100008B1002000BD012000BD4FF08050D0F84F\n:104620003011062905D0D0F83001401C01D00020FF\n:104630007047012070474FF08050D0F830010828B3\n:1046400001D0002070470120704700B5FFF7E5FF5B\n:1046500048B14FF08050D0F83411062905D3D0F876\n:104660003401401C01D0002000BD012000BD00B578\n:10467000FFF7D3FF58B14FF08050D0F8341106291E\n:1046800005D3D0F83401401C01D0012000BD00202A\n:1046900000BD00007B49096801600020704779492E\n:1046A00008600020704701218A0720B1012804D04A\n:1046B00042F204007047916700E0D1670020704724\n:1046C00071490120086042F20600704708B50423D2\n:1046D0006D4A1907103230B1C1F80433106840F048\n:1046E000010010600BE0106820F001001060C1F8BC\n:1046F00008330020C1F808016448006800900020D9\n:1047000008BD011F0B2909D85F4910310A6822F042\n:104710001E0242EA400008600020704742F2050095\n:1047200070470F2809D8584910310A6822F470627E\n:1047300042EA002008600020704742F205007047FE\n:10474000000100F18040C0F804190020704700010A\n:1047500000F18040C0F8081900207047000100F106\n:104760008040D0F80009086000207047012801D976\n:1047700007207047464A52F8200002680A43026048\n:1047800000207047012801D907207047404A52F89D\n:10479000200002688A43026000207047012801D986\n:1047A000072070473A4A52F820000068086000204D\n:1047B0007047020037494FF0000003D0012A01D0B2\n:1047C000072070470A607047020033494FF000002D\n:1047D00003D0012A01D0072070470A60704708B54E\n:1047E0004FF40072510510B1C1F8042308E0C1F87C\n:1047F00008230020C1F8240124481C3000680090E0\n:10480000002008BD08B58022D10510B1C1F80423ED\n:1048100008E0C1F808230020C1F81C011B4814302F\n:1048200000680090002008BD08B54FF48072910523\n:1048300010B1C1F8042308E0C1F808230020C1F832\n:1048400020011248183000680090002008BD0D4972\n:10485000383109680160002070474FF08041002026\n:10486000C1F80801C1F82401C1F81C01C1F82001F8\n:104870004FF0E020802180F800140121C0F80011E1\n:10488000704700000004004000050040080100409F\n:10489000885D020078050040800500406249634B56\n:1048A0000A6863499A42096801D1C1F310010160A5\n:1048B000002070475C495D4B0A685D49091D9A42BA\n:1048C00001D1C0F310000860002070475649574BD3\n:1048D0000A68574908319A4201D1C0F310000860B4\n:1048E0000020704730B5504B504D1C6842F2080311\n:1048F000AC4202D0142802D203E0112801D318469A\n:1049000030BDC3004B481844C0F81015C0F814253A\n:10491000002030BD4449454B0A6842F209019A42E1\n:1049200002D0062802D203E0042801D308467047CB\n:10493000404A012142F83010002070473A493B4B71\n:104940000A6842F209019A4202D0062802D203E024\n:10495000042801D308467047364A012102EBC00003\n:1049600041600020704770B52F4A304E314C1568B9\n:1049700042F2090304EB8002B54204D0062804D2B7\n:10498000C2F8001807E0042801D3184670BDC1F32F\n:104990001000C2F80008002070BD70B5224A234EF6\n:1049A000244C156842F2090304EB8002B54204D09E\n:1049B000062804D2D2F8000807E0042801D31846DC\n:1049C00070BDD2F80008C0F310000860002070BD70\n:1049D000174910B50831184808601120154A002100\n:1049E00002EBC003C3F81015C3F81415401C1428BB\n:1049F000F6D3002006E0042804D302EB8003C3F8BA\n:104A0000001807E002EB8003D3F80048C4F3100459\n:104A1000C3F80048401C0628EDD310BD04490648E1\n:104A2000083108607047000054000020BEBAFECA7A\n:104A300000F5014000F001400000FEFF834B1B68C1\n:104A400003B19847BFF34F8F81480168814A01F451\n:104A5000E06111430160BFF34F8F00BFFDE710B568\n:104A6000EFF3108010F0010F72B601D0012400E0C6\n:104A7000002400F0E1F850B1DCF7BEFCEFF7C1FE16\n:104A8000F1F79BF8E7F75EFA73490020086004B974\n:104A900062B6002010BD2DE9F0410C460546EFF34B\n:104AA000108010F0010F72B601D0012600E0002640\n:104AB00000F0C2F820B106B962B60820BDE8F08166\n:104AC000DCF78EFBDCF79CFC024600200123470943\n:104AD000BF0007F1E02700F01F01D7F80071CF40B9\n:104AE000F9071BD0202803D222FA00F1C90727D1E9\n:104AF00041B2002904DB01F1E02191F8001405E046\n:104B000001F00F0101F1E02191F8141D4909082974\n:104B100016D203FA01F717F0EC0F11D0401C6428ED\n:104B2000D5D3E7F7EDF94D4A4D490020E7F730FAC4\n:104B300049494C4808602046DCF7C5FB60B904E0F1\n:104B400006B962B641F20100B8E7404804602DB1F1\n:104B50002846DCF705FC18B110242CE0424D19E082\n:104B60002878022802D94FF4805424E00724002832\n:104B7000687801D0F8B908E0E8B120281BD8A878F7\n:104B8000212818D8012816D001E0A87898B9E8782B\n:104B90000B2810D83549802081F8140DDCF730FC43\n:104BA0002946F0F7F0FFEFF7EBFD00F083FA284617\n:104BB000DCF7F4FB044606B962B61CB1FFF74FFF01\n:104BC00020467BE7002079E710B5044600F034F872\n:104BD00000B101202070002010BD25490860002090\n:104BE000704770B50C4623490D682249224E0831A2\n:104BF0000E60102807D011280CD012280FD01328CF\n:104C000011D0012013E0D4E90001FFF744FF35463D\n:104C100020600DE0FFF723FF0025206008E02068FA\n:104C2000FFF7D2FF03E012492068086000202060EF\n:104C30001048001D056070BD07480A490068884299\n:104C400001D101207047002070470000CC010020F6\n:104C50000CED00E00400FA0554000020F8130020D9\n:104C600000000020BEBAFECA905D02000BE000E02A\n:104C700004000020100502400100000100B59B491E\n:104C800002282ED021DC10F10C0F08BFF42028D010\n:104C90000FDC10F1280F08BFD82022D010F1140F1C\n:104CA00008BFEC201DD010F1100F08BFF02018D065\n:104CB00021E010F1080F08BFF82012D010F1040F06\n:104CC0000CBFFC2000280CD015E0A0F10300062842\n:104CD00011D2DFE800F00E0C0A080503082000E0FE\n:104CE0000720086000BD0620FBE70520F9E7042047\n:104CF000F7E70320F5E7FFDF00BD00B57C49012899\n:104D000008BF03200CD0022808BF042008D00428C4\n:104D100008BF062004D0082816BFFFDF052000BD0D\n:104D2000086000BD70B505460C4616461046F2F701\n:104D3000C1FD022C08BF4FF47A7105D0012C0CBFC5\n:104D40004FF4C86140F6340144183046F2F7ECFDE8\n:104D5000204449F6797108444FF47A71B0FBF1F0C0\n:104D6000281A70BD70B505460C460846F2F7BBFD23\n:104D7000022C08BF40F24C4105D0012C0CBF40F67C\n:104D800034014FF4AF5149F6CA62511A08444FF446\n:104D90007A7100F2E140B0FBF1F0281A801E70BD7C\n:104DA00070B5064615460C460846F2F79CFD022DE6\n:104DB00008BF4FF47A7105D0012D0CBF4FF4C861C4\n:104DC00040F63401022C08BF40F24C4205D0012CC1\n:104DD0000CBF40F634024FF4AF52891A084449F62A\n:104DE000FC6108444FF47A71B0FBF1F0301A70BDE9\n:104DF00070B504460E460846F2F75CFD054630469F\n:104E0000F2F792FD28444AF2AB3108444FF47A712C\n:104E1000B0FBF1F0201A801E70BD2DE9F04107466D\n:104E20001E460D4614461046082A16BF04284EF6A4\n:104E30002830F2F73FFD07EB4701C1EBC71100EB4C\n:104E4000C100022D08BF40F24C4105D0012D0CBF1E\n:104E500040F634014FF4AF5147182846F2F743FDAE\n:104E6000381A4FF47A7100F6B730B0FBF1F52046EE\n:104E7000F2F70EFD28443044401DBDE8F08170B5C6\n:104E8000054614460E460846F2F714FD05EB4502AA\n:104E9000C2EBC512C0EBC2053046F2F745FD2D1A34\n:104EA0002046082C16BF04284EF62830F2F702FDE3\n:104EB00028444FF47A7100F6B730B0FBF1F5204684\n:104EC000F2F7E6FC2844401D70BD0A49082818BFC7\n:104ED0000428086803BF20F46C5040F4444040F0BC\n:104EE000004020F000400860704700000C150040B2\n:104EF00010150040401700402DE9FE430C46804647\n:104F0000F8F744FE074698F80160204601A96A4672\n:104F1000EDF72DFB05000DD0012F02D00320BDE8D9\n:104F2000FE83204602AA0199EDF743FA0298B0F8F1\n:104F300003000AE0022F14D1042E12D3B8F80300A4\n:104F4000BDF80020011D914204D8001D80B2A919AE\n:104F5000814202D14FF00000E1E702D24FF00100A0\n:104F6000DDE74FF00200DAE7C2790D2341B342BB1F\n:104F70008188012904D94908818004BF01228280E7\n:104F80000168012918BF002930D001686FEA0101CA\n:104F9000C1EBC10202EB011281796FEA010101EB61\n:104FA0008103C3EB811111444FEA91420160818872\n:104FB000B2FBF1F301FB132181714FF0010102E01B\n:104FC0001AB14FF00001C17170478188FF2908D2E2\n:104FD0004FF6FF7202EA41018180FF2984BFFF2260\n:104FE00082800168012918BF0029CED10360CCE777\n:104FF000817931B1491E11F0FF0181711CBF002080\n:1050000070470120704710B50121C1718171818005\n:1050100004460421F0F712FF002818BF10BD2068D5\n:10502000401C206010BD00000B4A022111600B499A\n:105030000B68002BFCD0084B1B1D1860086800286B\n:10504000FCD00020106008680028FCD070474FF0AA\n:10505000805040697047000004E5014000E40140D1\n:1050600002000B464FF00000014620D0012A04D078\n:10507000022A04D0032A0DD103E0012002E002201D\n:1050800015E00320072B05D2DFE803F00406080A29\n:105090000C0E100007207047012108E0022106E0F5\n:1050A000032104E0042102E0052100E00621EFF7DE\n:1050B00086BD0000F9480521817000210170417012\n:1050C0007047F7490A78012A05D0CA681044C860B9\n:1050D0004038F0F7B7BA8A6810448860F8E70028CB\n:1050E00019D00378EF49F04A13B1012B0ED011E02B\n:1050F0000379012B00D06BB943790BB1012B09D196\n:105100008368643B8B4205D2C0680EE00379012BB3\n:1051100002D00BB10020704743790BB1012BF9D1BC\n:10512000C368643B8B42F5D280689042F2D801207C\n:105130007047DB4910B501220A700279A2B1002242\n:105140000A71427992B104224A718268D34C523278\n:105150008A60C0681434C8606060EFF78DFDCF4985\n:1051600020600220887010BD0322E9E70322EBE7EC\n:1051700070B5CB4D044600202870207988B10020FE\n:105180002871607978B10420C44E6871A168F06814\n:10519000EFF773FAA860E0685230E8600320B0705F\n:1051A00070BD0120ECE70320EEE72DE9F041054654\n:1051B0000226F0F773F9006800B1FFDFB74C012752\n:1051C0003DB12878B0B1012805D0022810D00328BD\n:1051D00013D027710CE06868C82807D3F0F799FA54\n:1051E00020B16868FFF76DFF012603E0002601E0AB\n:1051F00000F05EF93046BDE8F08120780028F7D154\n:105200006868FFF76CFF0028E3D06868017879B11F\n:10521000A078042800D0FFDF01216868FFF7A8FF0D\n:105220009F49E078EFF772FF0028E1D1FFDFDFE769\n:10523000FFF77FFF6770DBE72DE9F047974C884663\n:10524000E178884200D0FFDFDFF850920025012787\n:10525000934E09F11409B8F1080F75D2DFE808F090\n:10526000040C28527A808D95A078032802D0022859\n:1052700000D0FFDFBDE8F087A078032802D0022825\n:1052800000D0FFDF0420A07025712078002878D19D\n:10529000FFF717FF3078012806D0B068E06000F013\n:1052A00027F92061002060E0E078EFF72CFEF5E7B9\n:1052B000A078032802D0022800D0FFDF2078002841\n:1052C0006DD1A078032816D0EFF7D6FC01464F46E3\n:1052D000D9F80000F0F7E9F900280EDB796881427F\n:1052E0000BDB081AF0606E49E078EFF70FFF00283B\n:1052F000C0D1FFDFBEE7042028E00420F0F7BBFCAC\n:10530000A570B7E7A078032802D0022800D0FFDFFD\n:10531000207888BBA078032817D0EFF7ADFC0146B2\n:105320004F46D9F80000F0F7C0F90028E5DB7968AE\n:105330008142E2DB081AF0605949E078EFF7E6FEB7\n:10534000002897D1FFDF95E740E00520F0F793FCB8\n:10535000A7708FE7A078042800D0FFDF022004E0C8\n:10536000A078042800D0FFDF0120A1688847FFF75C\n:105370001CFF054630E004E011E0A078042800D0CE\n:10538000FFDFBDE8F04700F093B8A078042804D010\n:10539000617809B1022800D0FFDF207818B1BDE89C\n:1053A000F04700F08EB8207920B10620F0F763FCBA\n:1053B0002571CDE7607838B13949E078EFF7A6FE7E\n:1053C00000B9FFDF657055E70720BFE7FFDF51E752\n:1053D0003DB1012D03D0FFDF022DF9D14AE70420B2\n:1053E000C3E70320C1E770B5050004D02B4CA078BB\n:1053F000052806D101E0102070BD0820F0F751FC0F\n:1054000008B1112070BD2948EFF7BBFBE0702028E0\n:1054100006D00121F0F777FA0020A560A07070BDDA\n:10542000032070BD1D4810B5017809B1112010BDD1\n:105430008178052906D0012906D029B10121017002\n:10544000002010BD0F2010BD00F03BF8F8E770B54C\n:10545000124C0546A07808B1012809D155B128465B\n:10546000FFF73DFE40B1287840B1A078012809D06F\n:105470000F2070BD102070BD072070BD2846FFF7BB\n:1054800058FE03E000212846FFF772FE0449E07849\n:10549000EFF73CFE00B9FFDF002070BDD001002017\n:1054A0006C1300203D860100FF1FA1073952020046\n:1054B0000A4810B5006900F013F8BDE81040EFF796\n:1054C000E5BA064810B5C078EFF7B7FB00B9FFDFC3\n:1054D0000820F0F7D0FBBDE81040EBE5D00100203C\n:1054E0000C490A6848F202139A4302430A60704763\n:1054F000084A116848F2021301EA03009943116057\n:1055000070470246044B10201344FC2B01D8116055\n:1055100000207047C80602400018FEBF7047704761\n:105520007047704740EA010310B59B070FD1042A6A\n:105530000DD310C808C9121F9C42F8D020BA19BA5E\n:10554000884201D9012010BD4FF0FF3010BD1AB1C3\n:10555000D30703D0521C07E0002010BD10F8013B18\n:1055600011F8014B1B1B07D110F8013B11F8014B3F\n:105570001B1B01D1921EF1D1184610BD032A40F227\n:10558000308010F0030C00F0158011F8013BBCF1E5\n:10559000020F624498BF11F801CB00F8013B38BFFD\n:1055A00011F8013BA2F1040298BF00F801CB38BF0B\n:1055B00000F8013B11F0030300F02580083AC0F029\n:1055C000088051F8043B083A51F804CBA0E80810D1\n:1055D000F5E7121D5CBF51F8043B40F8043BAFF304\n:1055E0000080D20724BF11F8013B11F801CB48BF5E\n:1055F00011F8012B24BF00F8013B00F801CB48BF94\n:1056000000F8012B704710B5203AC0F00B80B1E8CC\n:105610001850203AA0E81850B1E81850A0E81850E7\n:10562000BFF4F5AF5FEA027C24BFB1E81850A0E8F0\n:10563000185044BF18C918C0BDE810405FEA827C0A\n:1056400024BF51F8043B40F8043B08BF7047D20721\n:1056500028BF31F8023B48BF11F8012B28BF20F8C2\n:10566000023B48BF00F8012B704702F0FF0343EAFA\n:10567000032242EA024200F002B84FF0000204297D\n:10568000C0F0128010F0030C00F01B80CCF1040C71\n:10569000BCF1020F18BF00F8012BA8BF20F8022BA5\n:1056A000A1EB0C0100F00DB85FEAC17C24BF00F84B\n:1056B000012B00F8012B48BF00F8012B70474FF079\n:1056C000000200B5134694469646203922BFA0E852\n:1056D0000C50A0E80C50B1F12001BFF4F7AF09075E\n:1056E00028BFA0E80C5048BF0CC05DF804EB89004F\n:1056F00028BF40F8042B08BF704748BF20F8022B92\n:1057000011F0804F18BF00F8012B704770477047A9\n:1057100070477047FEDF18490978F9B904207146CF\n:1057200008421BD10699154A914217DC06990229B5\n:1057300014DB02394878DF2810D10878FE2807D01A\n:10574000FF280BD14FF001004FF000020C4B18471F\n:1057500041F201000099019A094B1847094B002BAF\n:1057600002D01B68DB6818474FF0FF3071464FF0DE\n:105770000002034B1847000028ED00E00060020023\n:105780003D4A020004000020174818497047FFF7FF\n:10579000FBFFDBF713FD00BD154816490968884279\n:1057A00003D1154A13605B68184700BD20BFFDE7B1\n:1057B0000F4810490968884210D1104B18684FF003\n:1057C000FF318842F2D080F308884FF020218842D0\n:1057D00004DD0B48026803210A4302600948804740\n:1057E00009488047FFDF000080130020801300205D\n:1057F00000100000000000200400002000600200F3\n:1058000014090040C52F000099570200042071467A\n:10581000084202D0EFF3098101E0EFF308818869C3\n:1058200002380078102813DB20280FDB2C280BDB34\n:105830000A4A12680A4B9A4203D1602804DB094ADB\n:105840001047022008607047074A1047074A104770\n:10585000074A12682C3212681047000054000020DA\n:10586000BEBAFECA0514000041410200E34B02002B\n:10587000040000200D4B0E4908470E4B0C49084709\n:105880000D4B0B4908470D4B094908470C4B08497C\n:1058900008470C4B064908470B4B054908470B4B7B\n:1058A000034908470A4B024908470000E1BC0000D1\n:1058B0005DC00000552D0000CF2B00005D2B0000C7\n:1058C000F72D0000211400001B2900004D2F0000BF\n:1058D000C911000000210160818070470021016032\n:1058E0004160017270470A6802600B79037170476A\n:1058F000959600003F980000A1990000059A0000CD\n:105900003F9A0000739A0000AD9A0000DD9A0000F3\n:10591000579B00008D970000C5990000A71200005A\n:10592000C14300000D44000073440000FF44000028\n:1059300023460000E546000017470000EF4700003F\n:1059400087480000DB480000C1490000E149000031\n:10595000C3160000E7160000171600006B160000C3\n:1059600019170000AD17000047600000F761000044\n:10597000BD650000D56600005F670000DD670000C0\n:105980004168000061690000316A00009D6A000002\n:10599000034A0000094A0000134A00007B4A000045\n:1059A000A74A0000634C00008D4C0000C54C00006D\n:1059B0002F4D0000194E00002F4E00003144000012\n:1059C000A7120000A7120000A7120000A7120000F3\n:1059D000A7120000A7120000A7120000A3250000D4\n:1059E000292600004526000061260000EF27000060\n:1059F0008B26000095260000D7260000F92600001F\n:105A0000D527000017280000A7120000A7120000E9\n:105A1000CB830000EB830000F58300002F8400009F\n:105A20005D8400004D850000DB850000EF850000EF\n:105A30003D86000053870000F9880000218A00009D\n:105A40004F730000398A0000A7120000A71200005F\n:105A5000D9B5000043B7000097B7000003B80000B5\n:105A6000B3B80000010000000000000010011001A8\n:105A70003A0200001A02000405060000FFFFFFFFC3\n:105A80000000FFFFCDAD0000233D000049210000D4\n:105A900099730000118F000000000000D5910000F4\n:105AA00099910000C3910000AB910000000002003A\n:105AB00000000000000200000000000000010000E3\n:105AC000000000007781000057810000C5810000C0\n:105AD00025250000E72400000725000037A9000065\n:105AE00063A900006BAB000041590000E581000094\n:105AF0000000000015820000732500000000000077\n:105B000000000000000000004DAA0000000000009E\n:105B1000D55900000300000001555555D6BE898EA9\n:105B200000006306630C631200000703AB054F0817\n:105B3000000053044308330C00000000900A0000EA\n:105B4000900A0000C3560000C35600009D430000A9\n:105B500079AC00001B7600005B2000001D380200BD\n:105B6000E1A401000157000001570000BF430000FD\n:105B7000DBAC00009F760000CD2000004938020019\n:105B8000F5A4010070017001400038005C002400A1\n:105B90005001080200000300656C74620000000000\n:105BA000000000000000000000000000870000006E\n:105BB000000000000000000000000000BE83605AEA\n:105BC000DB0B376038A5F5AA9183886C01000000D3\n:105BD000BB31010081400100000000010206030406\n:105BE00005000000070000000000000006000000A3\n:105BF0000A0000003200000073000000B400000042\n:105C0000EB8F01006F1F020017F90000D9B70100E8\n:105C1000F3F70100D9B70100B5FA000097B9010008\n:105C2000E9F3010097B90100F1F6000025B9010080\n:105C300011F7010025B9010013F90000EDB70100CB\n:105C4000D5EF0100EDB7010067FF000019BC0100AE\n:105C5000A7F8010019BC0100F401FA0096006400E5\n:105C60004B0032001E0014000A0005000200010073\n:105C70000049000000000000AAAED7AB154120107B\n:105C80000C0802170D010102090901010602091899\n:105C9000180301010909030305555555252627D683\n:105CA000BE898E00F401FA00960064004B003200B9\n:105CB0001E0014000A000500020001002549000032\n:105CC000000000009D480200B5480200CD480200D7\n:105CD000E5480200154902003D49020067490200FB\n:105CE0009B490200534502009B4402008D41020083\n:105CF00003550200395D0100495D0100755D010039\n:105D0000475E01004F5E0100615E0100A746020090\n:105D1000C1460200954602009F460200CD460200A1\n:105D20000347020023470200414702004F47020099\n:105D30005D4702006D470200854702009D47020053\n:105D4000B3470200C94702000000000087BA000004\n:105D5000DDBA0000F3BA000061500200B941020050\n:105D60007F420200E7530200255402004F54020014\n:105D7000195C010079600100DF470200054802005C\n:105D8000294802004F4802001C0500402005004041\n:105D900000100200B45D020008000020E4010000D1\n:105DA00044110000E85D0200EC01002094110000A5\n:105DB000A0110000011413F8130240200B20040668\n:105DC000441A0102228C2720FB349B5F8012800240\n:105DD0001E101B430B5419042A8608019F0916CB79\n:085DE000327F0B6CF410C000CF\n:02000004000FEB\n:1040000000000420CDB20F00F5B20F00F7B20F0090\n:10401000F9B20F00FBB20F00FDB20F00000000006C\n:10402000000000000000000000000000C1450F007B\n:1040300001B30F000000000003B30F00214D0F007B\n:10404000354E0F0007B30F0007B30F0007B30F0083\n:1040500007B30F0007B30F0007B30F0007B30F003C\n:1040600007B30F0007B30F0007B30F0007B30F002C\n:1040700007B30F0007B30F0007B30F0007B30F001C\n:1040800007B30F0085720F0007B30F0007B30F00CF\n:1040900041730F0007B30F00814B0F0007B30F00F0\n:1040A00007B30F0007B30F0007B30F0007B30F00EC\n:1040B00007B30F0007B30F0000000000000000006E\n:1040C00007B30F0007B30F0007B30F0007B30F00CC\n:1040D00007B30F0007B30F0007B30F0005850F00EC\n:1040E00007B30F0007B30F0007B30F000000000075\n:1040F0000000000007B30F000000000007B30F002E\n:1041000000000000000000000000000000000000AF\n:10411000000000000000000000000000000000009F\n:10412000000000000000000000000000000000008F\n:10413000000000000000000000000000000000007F\n:10414000000000000000000000000000000000006F\n:10415000000000000000000000000000000000005F\n:10416000000000000000000000000000000000004F\n:10417000000000000000000000000000000000003F\n:10418000000000000000000000000000000000002F\n:10419000000000000000000000000000000000001F\n:1041A000000000000000000000000000000000000F\n:1041B00000000000000000000000000000000000FF\n:1041C00000000000000000000000000000000000EF\n:1041D00000000000000000000000000000000000DF\n:1041E00000000000000000000000000000000000CF\n:1041F00000000000000000000000000000000000BF\n:104200000348044B834202D0034B03B11847704765\n:10421000C8860020C8860020000000000548064926\n:104220000B1AD90F01EBA301491002D0034B03B1C4\n:1042300018477047C8860020C8860020000000008C\n:1042400010B5064C237843B9FFF7DAFF044B13B1DE\n:104250000448AFF300800123237010BDC8860020FE\n:10426000000000005CBD0F0008B5044B1BB1044901\n:104270000448AFF30080BDE80840CFE7000000002D\n:10428000CC8600205CBD0F00A3F5803A704700BFCC\n:10429000154B002B08BF114B9D46FFF7F5FF002182\n:1042A0008B460F461148124A121A00F075F80C4B53\n:1042B000002B00D098470B4B002B00D098470020D4\n:1042C000002104000D000B4800F016F800F040F843\n:1042D0002000290000F074FA00F014F80000080033\n:1042E000000000000000000000000420C88600203C\n:1042F000A4CE002025430F00002301461A4618468D\n:1043000000F09CB808B50021044600F0CBF8044B3F\n:104310001868C36B03B19847204600F029F900BF25\n:1043200058BB0F0038B5084B084D5B1B9C1007D0DD\n:10433000043B1D44013C55F804399847002CF9D141\n:10434000BDE8384007F002BCC8860020C4860020C3\n:1043500070B50D4E0D4D761BB61006D0002455F8E5\n:10436000043B01349847A642F9D1094E094D761B0A\n:1043700007F0E6FBB61006D0002455F8043B0134E4\n:104380009847A642F9D170BDBC860020BC860020AB\n:10439000C4860020BC860020830730B548D0541E58\n:1043A000002A3FD0CAB2034601E0013C3AD303F8E9\n:1043B000012B9D07F9D1032C2DD9CDB245EA052556\n:1043C0000F2C45EA054536D9A4F1100222F00F0C56\n:1043D00003F1200EE6444FEA121C03F1100242E9F9\n:1043E000045542E9025510327245F8D10CF1010230\n:1043F00014F00C0F03EB021204F00F0C13D0ACF10D\n:10440000040323F003030433134442F8045B934290\n:10441000FBD10CF003042CB1CAB21C4403F8012BED\n:104420009C42FBD130BD64461346002CF4D1F9E721\n:1044300003461446BFE71A46A446E0E770B4184C9A\n:104440002568D5F848411CB365681F2D25DC38B9AF\n:10445000AB1C0135656044F82310002070BC704728\n:1044600004EB850C0228CCF88820D4F888614FF042\n:10447000010202FA05F246EA0206C4F88861CCF8A5\n:104480000831E5D1D4F88C311343C4F88C31DFE71F\n:1044900005F5A674C5F84841D6E74FF0FF30DDE7D3\n:1044A00058BB0F002DE9F84F2B4B1F68D7F8486118\n:1044B0002DED028BC6B108EE100A8B464FF00108B5\n:1044C0004FF000097468651E0ED4013406EB8404B5\n:1044D000BBF1000F0CD0D4F800315B4508D0013D92\n:1044E0006B1CA4F10404F3D1BDEC028BBDE8F88F82\n:1044F00073682268013BAB420CBF7560C4F8009042\n:10450000002AECD0D6F88801D6F804A008FA05F104\n:1045100001420BD190477268524513D1D7F8483108\n:10452000B342DCD01E46002ECCD1DDE7D6F88C019C\n:1045300001420CD1D4F8801018EE100A904772682E\n:104540005245EBD0D7F84861002EBBD1CCE7D4F868\n:1045500080009047DFE700BF58BB0F00024B13B14C\n:104560000248FFF7C9BE70470000000025430F0056\n:10457000FEE700BF38B50C46E8B90968C9B10F4D70\n:10458000A9420BD06B1A3B2B11D93C22284606F0CE\n:10459000EDFE03E0CA5CEA54013BFBD2074800226F\n:1045A0003C2103F0D3F90023A887236038BD3D23C5\n:1045B000F2E70E23F9E70123F7E700BF807F002031\n:1045C000074A6FF002039E4502D1EFF3098101E033\n:1045D000EFF308818869A0F102000078104700BF5E\n:1045E00075450F0038B50446A8B10D4D00223C2199\n:1045F000284603F0ABF9AB8F83420ED12A4605F172\n:104600003C0152F8040B44F8040B8A42F9D10133FF\n:10461000AB87002038BD0E20FCE70B20FAE700BF77\n:10462000807F00200B2970B50446154608462FD917\n:104630002389053304EB43012044431ADAB2012AEB\n:1046400026D9814224D8134806F090FE2388522BA5\n:1046500006D1AB0711D062884CF668639A420CD041\n:104660000F2014E034F8022B824204D0AE89964227\n:1046700003F1010308D1002009E0218900230A3455\n:104680004FF6FE704FF440559942EBD80B2070BDA9\n:104690000920FCE7E486002008B5002203F056F963\n:1046A000034B1B88834214BF0B20002008BD00BFB2\n:1046B000E486002038B50C4C21684B1C054612D00E\n:1046C0000A484FF4805206F01FFE48B115B1206829\n:1046D00000F00CFC054920684FF4806200F026FCD5\n:1046E0004FF0FF33236038BD30840020F086002077\n:1046F0002DE9F041DFF84480044624F47F65184634\n:10470000D8F8003025F00F05AB420E46174609D009\n:10471000FFF7D0FF0848C8F800504FF480522946F0\n:1047200006F024FE0448C4F30B043A463146204404\n:10473000BDE8F04106F01ABEF0860020308400206B\n:10474000BFF34F8F0549064BCA6802F4E06213437A\n:10475000CB60BFF34F8F00BFFDE700BF00ED00E06F\n:104760000400FA054BDF704710DF704711DF704718\n:1047700013DF704718DF704760DF704769DF7047ED\n:1047800061DF70471FB50023CDE90133039368460D\n:1047900002230093FFF7EEFF05B05DF804FB08B5B8\n:1047A0004FF0E023D3F8F03DDB0700D500BEFFF764\n:1047B000C7FF0000014B1878704700BFF19600203A\n:1047C0002DE9FF484C4B40F60212C3F8402500F09B\n:1047D00005FA00F021FE002000F0AAFA00F09CFE8D\n:1047E00048B1052000F0A4FA00F0A8FE00F0CCFECD\n:1047F000062000F09DFA4FF08043DFF81081D3F8D7\n:104800001C55B12D0CBF0123002388F800304AD07D\n:10481000A5F1A8014C424C41384EDFF8F49004F069\n:10482000010333704FF08043D3F8007407F00107A1\n:10483000002C3BD14E2D38D0572D36D0304B1B6835\n:104840001A68304B9A4200D17FBB6D2D2ED01220BA\n:1048500000F0B0F9044633789BBB122000F0AAF9AF\n:1048600010B1122000F0A6F900F00100307000F045\n:1048700005FDDFF8A0B0824630B12CB9204B1B6893\n:104880001A68214B9A4257D04FF440535A684A4510\n:104890000ABF9B684FF4905303F500731B685B4598\n:1048A0003AD1012448E00124B6E701244FF08043C7\n:1048B00000226D2DC3F81C2500F0E480002CCAD125\n:1048C000C5E70120D0E7544636E03C4634E04FF4DB\n:1048D00080030B6071E0022000F02AFAA5F14E037C\n:1048E0005842584103F012FEAEE000221146C1E0EA\n:1048F00003F05CFEC6E000BF00A00040F19600207F\n:1049000034840020D51A5A007E67E54EF2960020C6\n:10491000DBE5B1517CB0EE87002CC2D1BAF1000FBB\n:10492000D1D0002FD1D0654B654A1B6865481A600D\n:10493000654B43F0010398474FF440535A684A458A\n:1049400008BF9B685D4A0CBF03F500734FF490539A\n:1049500012681B685B450CBF5C4B002313601CB9DD\n:10496000BAF1000F40F08E803378002BB3D00820CE\n:1049700000F0DEF998F800300BB9FFF703FF0123D0\n:104980004FF4742088F80030FFF7F2FE504B514985\n:104990001868019001A8FFF7E7FE4F4991F8163318\n:1049A0005A09EC231341DA0707D54C4B9A68002AC1\n:1049B0008DD01A6842F480021A600C22484B029390\n:1049C00000210DEB0200FFF7E7FC40F20113029A11\n:1049D000039303A94020FFF7D1FE0C2200210DEB29\n:1049E0000200FFF7D9FC9DF80C30029A43F0010356\n:1049F00003A9A0208DF80C30FFF7C0FE0C22002187\n:104A00000DEB0200FFF7C8FC01241723029AADF852\n:104A10000E3003A923208DF80C40FFF7AFFE0C22C7\n:104A200000210DEB0200FFF7B7FC0623029A8DF878\n:104A30000C4003A920208DF80E40ADF81030FFF790\n:104A40009DFE02A8FFF798FE4FF4405330785A6855\n:104A50004A450ABF9B684FF4905303F500731B68E7\n:104A60005B4504D0572D02D04E2D7FF43EAF01227E\n:104A700040F6B83100F0E8FC3378002B3FF438AF53\n:104A8000FFF774FE00F0EEF800F0F8FBA0B100F0C4\n:104A900043FD88B94FF440535B684B4506D198F805\n:104AA00000300BB9FFF76EFEFFF760FE034B1B688B\n:104AB00000221A6000F004FDFFF742FE348400205B\n:104AC000D51A5A000048E80160BB0F007E67E54E2A\n:104AD0005CBB0F009F470F0000E100E0409D0020FD\n:104AE0000080002010B58EB03423ADF802300DF1F7\n:104AF0000201002301A8ADF80430FFF741FE04468F\n:104B000040B9BDF80430102B07D0112B0CD001A8F0\n:104B100000F0CCFF20460EB010BD054B01221A70EC\n:104B2000072000F005F9F2E7014B18700820F8E7BC\n:104B3000F096002013B5002301A80193FFF712FEA1\n:104B4000044660B9019802F053FA019B0A2B09D080\n:104B5000092B09D00B2B02D1012004F09BFB20462E\n:104B600002B010BD2046F8E70220F6E708B5FFF7CF\n:104B7000B9FF0528FBD1FFF7DDFF0528F7D108BDF8\n:104B80000021024A084602F003BE00BF6D4B0F0031\n:104B90001F2884BF00F01F00044B054A98BF4FF048\n:104BA000A04300F5E07043F8202070470003005058\n:104BB0000C0003001F288ABF064B4FF0A04300F0F3\n:104BC0001F00D3F8103523FA00F0C04300F00100B5\n:104BD000704700BF000300507047000008B54FF059\n:104BE000804301220021DA601220C3F818159A6070\n:104BF000FFF7CEFF1220FFF7CBFF154B4FF4C85045\n:104C000043F001039847FFF7E7FF124A1E210820EF\n:104C100002F09AFD08B102F051FE02F0FBFC0E49D1\n:104C20000E4BE02081F823001B684FF47A72B3FB2F\n:104C3000F2F3013BB3F1807F08D24FF0E0225361E1\n:104C4000002381F8230093610723136108BD00BF8F\n:104C500070BB0F00F496002000ED00E038840020C7\n:104C6000704700004FF0E0224FF40031002310B5F0\n:104C70001361C2F8801102F1C04202F540524FF4B4\n:104C80008031C2F84813C2F80813012151609160C5\n:104C90004FF080420A4CD16002201F2B1A46C6BF3B\n:104CA00003F01F0221464FF0A04102F5E0720133EC\n:104CB000302B41F82200F0D1FFF7D2FF10BD00BF2A\n:104CC00000030050074B23F81010074B002282B05E\n:104CD000C3F81021D3F810210192019A01229A60A1\n:104CE00002B07047E898002000C001400A4A0B4B10\n:104CF00011681B68B1FBF3F203FB1211B1EB530F08\n:104D00004FEA530288BF591A4F2359430020B1FB81\n:104D1000F2F189B2FFF7D6BFE4980020F0980020A6\n:104D2000024A136801331360FFF7E0BFE4980020E4\n:104D30001B490A68082823D8DFE800F0130513226E\n:104D4000221A1E242A00174B40F6B83018604FF480\n:104D50007F4303F0103323F080539A4218BF0B6057\n:104D60007047104B4FF4967018604FF47F03F0E7D4\n:104D70000C4B64221A6070470A4B40F6B83018603A\n:104D80001346E6E7074B40F6B8301860FF23E0E72C\n:104D9000044B4FF4967018604FF0FF13D9E700BF33\n:104DA000F4980020F098002000F1804382B01A6847\n:104DB000002A14BF0120002004D000221A601B68C2\n:104DC0000193019B02B070470F4A1378D3B903785F\n:104DD0004FF08041C3F34003C1F88035037803F0FE\n:104DE0000103C1F87835094B1968C90706D4E021D9\n:104DF00083F800130121C3F88011196001230448CE\n:104E000013707047034870470499002000E100E0E8\n:104E10000000AD0B0C00AD0B014B02681A6070472F\n:104E2000009900204FF080434FF46072C3F80423D0\n:104E30007047000010B54FF08043D3F80443620779\n:104E400007D54FF48470FFF7AFFF10B11E4B1B68FE\n:104E50009847A30608D54FF48A70FFF7A5FF18B14D\n:104E60001A4B00201B689847600608D54FF48C70D9\n:104E7000FFF79AFF18B1154B01201B6898472106D0\n:104E800008D54FF48E70FFF78FFF18B1104B00203C\n:104E90001B689847E20508D54FF49070FFF784FF30\n:104EA00018B10B4B01201B689847A3050AD54FF496\n:104EB0009270FFF779FF28B1054BBDE810401B68E1\n:104EC0000220184710BD00BFF8980020FC98002071\n:104ED00000990020044AD2F80034DB07FBD50160BA\n:104EE000BFF35F8F704700BF00E001404FF0805379\n:104EF0001A69B0FBF2F302FB130373B9084B0222E9\n:104F0000C3F80425C3F80805D3F80024D207FBD55D\n:104F100000220448C3F8042570470348704700BFC7\n:104F200000E001400000AD0B0A00AD0BF8B50B4BE3\n:104F30001546012206460F46C3F804250024A54263\n:104F400004D1064B0022C3F80425F8BD57F82410FD\n:104F500006EB8400FFF7BEFF0134F0E700E00140FC\n:104F6000BFF34F8F0549064BCA6802F4E062134352\n:104F7000CB60BFF34F8F00BFFDE700BF00ED00E047\n:104F80000400FA054FF08053D3F83021082A06D1E7\n:104F9000D3F83431032B02D8024AD05C704700208A\n:104FA000704700BF76BB0F0008B54FF08053D3F8B1\n:104FB0003021082A4ED14FF080420021C2F80C1156\n:104FC000C2F81011C2F8381502F54042D3F80414A3\n:104FD000C2F82015D3F80814C2F82415D3F80C141D\n:104FE000C2F82815D3F81014C2F82C15D3F81414ED\n:104FF000C2F83015D3F81814C2F83415D3F81C14BD\n:10500000C2F84015D3F82014C2F84415D3F824147C\n:10501000C2F84815D3F82814C2F84C15D3F82C144C\n:10502000C2F85015D3F83014C2F85415D3F834141C\n:10503000C2F86015D3F83814C2F86415D3F83C14DC\n:10504000C2F86815D3F84014C2F86C15D3F844348C\n:10505000C2F87035FFF796FF18B1494B494AC3F8BB\n:105060008C26FFF78FFF18B1474BFB22C3F818259A\n:10507000FFF788FF70B14FF080414FF08053D1F8B7\n:10508000E42ED3F8583222F00F0203F00F0313433B\n:10509000C1F8E43EFFF776FF20B13C4B4FF40072BD\n:1050A000C3F840264FF08053D3F83031082B09D194\n:1050B0004FF08043D3F80024D10744BF6FF00102C2\n:1050C000C3F80024324AD2F8883043F47003C2F89F\n:1050D0008830BFF34F8FBFF36F8F4FF01023D3F89B\n:1050E0000C22D2071DD52B4B0122C3F80425D3F87F\n:1050F0000024002AFBD04FF01022D2F80C3223F00B\n:105100000103C2F80C32234BD3F80024002AFBD051\n:105110000022C3F80425D3F80024002AFBD0FFF7AF\n:105120001FFFD3F80022002A03DBD3F80432002B40\n:1051300022DA184B0122C3F80425D3F80024002AF0\n:10514000FBD04FF010221221C2F80012D3F8002435\n:10515000002AFBD04FF010231222C3F804220D4B7B\n:10516000D3F80024002AFBD00022C3F80425D3F88A\n:105170000024002AFBD0D2E7074B084A1A6008BD7A\n:10518000005000404881030000F0004000900240C1\n:1051900000ED00E000E00140388400200090D003E2\n:1051A00013DF704718DF7047064B1878012803D1CA\n:1051B000012904BF0221197012B1104602F07EBB12\n:1051C000704700BF3599002008B5FFF7F3FA88B1A2\n:1051D00011481C2101F098FF08B102F06FFB0F4944\n:1051E0000D4800231C2201F07FFF98B1BDE8084064\n:1051F00002F064BB4FF47F20FFF778FE07220749D7\n:105200004FF47F20FFF792FE054B1A78012A04BF66\n:1052100002221A7008BD00BF2C9900203899002086\n:105220003599002070B5124C124D134ED4F800344D\n:105230007BB1C4F80056C4F80456C4F80856C4F844\n:105240000C56C4F81056C4F81456C4F81856C4F8CE\n:105250001C5602F005FB05F0F4FF20B104F0DAFD66\n:10526000002005F003FA3378023B022BDED870BD34\n:10527000000001403546526E3599002013B54FF4B9\n:105280004053124A596891420CBF9C684FF48054B5\n:1052900001A800F0A7F92368013302D16368013344\n:1052A00011D0019B1A88012A0DD1588820B1996824\n:1052B0000022204602F04AFB019B5B881B1A5842E1\n:1052C000584102B010BD0020FBE700BFDBE5B15143\n:1052D00084B02DE9F34108AC84E80F009DF820402C\n:1052E000BDF8228001A80F4616461D4600F07AF947\n:1052F00054B9384B0122FF21A3F802809D601A8027\n:105300009980354B1A7012E0012C17D1314BBA1924\n:105310002A449A60A5221A80FF229A800C9AA3F848\n:105320000280C3E903765D619A612B4B1C70FFF725\n:105330004BFF02B0BDE8F04104B07047032C0FD121\n:10534000019A244B11881980518892689A60C3E9A8\n:105350000376AA2259809A805D611F4B0122D1E712\n:10536000022C15D1019A1B4B1188A5290AD10022C4\n:105370009A60FF221A60FF229A800022C3E903226A\n:105380005A61EAE719805188926859809A60F2E779\n:10539000052C0ED1FFF70EFA40B100F097FD08B1D1\n:1053A00002F08CFA0C4B03221A70C2E700F010FADC\n:1053B000F5E7042C08D1074B00229A60FF221A60FF\n:1053C000019A92889A80B2E7062CB2D1024B04224D\n:1053D000EAE700BF389900203599002000B50C4B52\n:1053E0001B7889B063B90B4B1B786BB905238DF81B\n:1053F0000C30079B009303AB0FCBFFF769FF03E073\n:1054000004F000FB0028EED009B05DF804FB00BFFB\n:1054100034990020289900201FB50023CDE90233DC\n:10542000074B019301F030FE30B906494FF47F235A\n:1054300001A84B6001F046FE05B05DF804FB00BF1B\n:10544000A9510F002C99002070B505460E460AB1EF\n:1054500080F00102154B02F001021A7000F0B0FF5B\n:10546000044628B935B100F08BFC0446FFF7DAFE9C\n:10547000204670BDBEB10E4B0E4A0F481D70294626\n:1054800002F0F8F84FF400444FF4FA7029464FF454\n:105490007A720023E6FB040106F0D0F92A460146A1\n:1054A000064802F0F9F800F06FF9DEE734990020C1\n:1054B00028990020DD530F007CBB0F0008990020C5\n:1054C0001FB5134B4FF0FF32C3F88020C3F8802183\n:1054D0004FF440530F4A596891420DD19C682046C1\n:1054E000FFF75EFE10B14FF000531C60204604B081\n:1054F000BDE8104000F09AB80023CDE902334FF424\n:10550000805406236846CDE90034FFF74BFEE9E7F7\n:1055100000E100E0DBE5B15107B501A800F062F859\n:10552000019B1A88A52A07D09888A0F1AA0358429F\n:10553000584103B05DF804FB0120FAE710B501F013\n:105540005DF9A8B10E4B0F4843F00103984701F0F5\n:10555000BFF808B102F0B2F901F050F908B102F059\n:10556000ADF901F001F9044638B102F0A7F904E001\n:1055700001F01EF904460028E4D1204610BD00BF0A\n:1055800080BB0F0000A8610000B589B003AB1422F6\n:1055900000211846FEF700FF02228DF80C200022A1\n:1055A00000920FC8FFF794FEFFF73CFE002009B001\n:1055B0005DF804FB13B5044601A800F013F8019B45\n:1055C0001A8822805A8862809A68A2609A88A2808B\n:1055D000DA68E2601A6922615A6962619B69A361B3\n:1055E00002B010BD014B0360704700BF00F00F0018\n:1055F000F0B50346186880F308885868FF2464B241\n:10560000EFF30585002D01D1A64600472546064645\n:1056100021273FBAF0B40024002500260027F0B46B\n:10562000F92040B2004700BFF0BD00BFFFF7E0BF68\n:1056300073B500230DF1020101A8ADF8023001930A\n:1056400002F0C4FDF8B9019C25785DB3174B93F8BF\n:105650003020032A28D00C2606FB00F29958E9B91D\n:1056600098189D5093F830200132D2B283F8302040\n:10567000BDF802300E4A9B08013B0434436084604D\n:10568000084602F085F8019B33B128B1184602F0B4\n:10569000B9FD08B102F012F902B070BD0130042862\n:1056A000DAD1F0E70720EEE70420ECE75499002078\n:1056B000F9560F00084609B102F000B97047000022\n:1056C00010B50C220B4B504319181A5882B193F89D\n:1056D00030208C68013AD2B283F8302000221A5070\n:1056E000C1E90122201F02F08DFD08B102F0E6F8A9\n:1056F000002010BD54990020214B70B50122214E8D\n:105700001A7096F8303003B970BD1E4C002523681E\n:1057100083B1013B042B07D8DFE803F01C0612031A\n:105720002800204600F0DEFEE8B2FFF7C9FF08B10E\n:1057300002F0C4F80135042D04F10C04E7D1E0E7D0\n:10574000A3686360204600F073FE0028ECD002F0EE\n:10575000B5F8E9E7204600F053FF00F02FFF08B14D\n:1057600002F0ACF80520FFF7E3FADDE700F074FF84\n:1057700000F092FFBDE870400620FFF7D9BA00BFE5\n:10578000289900205499002008B50E4B002283F878\n:10579000302004210139C3E901221A6003F10C030E\n:1057A000F8D1094800F03EFE02F0A8FC08B102F072\n:1057B00085F8064802F08EFC08B102F07FF8002060\n:1057C00008BD00BF54990020B5560F0031560F0098\n:1057D00008B50020FFF774FF0120FFF771FF0220DA\n:1057E000FFF76EFF0320FFF76BFFBDE8084002F0F4\n:1057F000CDBC006870476CDF70476DDF70476EDFAF\n:1058000070476FDF704772DF704773DF704774DF78\n:10581000704776DF704777DF70477ADF70477CDF4D\n:1058200070477FDF704786DF70478FDF704790DFFC\n:105830007047AFDF7047B0DF7047B1DF7047B2DF4E\n:105840007047B5DF704764DF704766DF70470C282C\n:1058500013D8DFE800F01412121212120912071204\n:10586000120D0B0002207047032070470420704780\n:10587000042914BF06200520704706207047012028\n:10588000704702F01BB810B5044608460321FFF725\n:10589000DEFF0246204601F075F918B1BDE8104060\n:1058A00002F00CB810BD00000346032B10B50846EB\n:1058B000144620D0042B23D169B1124B18884FF61F\n:1058C000FF7398421CD01321FFF7A3FFC0B1BDE8BE\n:1058D000104001F0F3BF104602F094F808B101F057\n:1058E000EDFF094B1B689C420AD1012203210748A6\n:1058F00001F048F9EAE70121FFF7A9FF0246F6E7C0\n:1059000010BD00BF3E840020489A0020F899002076\n:10591000F8B50A4DAB889E181D2E14460DDC2F6875\n:10592000FE1802F1010C07F803C07070B01C05F0FE\n:105930001DFDAB8802331A19AA80F8BDA899002072\n:10594000F0B54E4E317895B0002940F092804C4C25\n:10595000019110222046FEF71FFD4A4B019923605A\n:1059600018220EA8FEF718FD01238DF838302823E1\n:105970001093454B1B78002B7DD0444B04AC03F1B6\n:10598000100518685968224603C20833AB42144612\n:10599000F7D13F4C10220DEB0201E01D05F0B4FCE5\n:1059A000002868D03B4801210460FFF728FF08B1B8\n:1059B00001F084FF384B08AA03F1100C1746186851\n:1059C0005968154603C5083363452A46F7D1206850\n:1059D0000C903248A288A379ADF8342007600122E8\n:1059E00000218DF83630FFF70CFF08B101F066FF9B\n:1059F00003238DF84C3004238DF80E3041F23053E0\n:105A0000ADF81030264B08AA9B798DF812300DF1B5\n:105A10000F0104A8FFF717FF012210460DF10E0138\n:105A2000FFF776FF1F4805F04BFE1E49C2B2092062\n:105A3000FFF76EFF102208A90620FFF769FF104943\n:105A400019480EAAFFF7DFFE08B101F037FF164C28\n:105A5000042221780120FFF7DEFE08B101F02EFFBD\n:105A600020780121FFF7D1FE08B101F027FF0123C3\n:105A7000337015B0F0BD0623BEE700BF2C9A00209E\n:105A8000A899002088990020F4990020A9BB0F0054\n:105A9000B8990020449A0020BF990020289A00203D\n:105AA000F899002086BB0F003C840020F0B5044626\n:105AB0000146B1B0A84801F099F82388262B3BD8BD\n:105AC0000F2B04D8012B00F0CC8031B0F0BD103B7F\n:105AD000162BFAD801A252F823F000BF655B0F0025\n:105AE000735B0F00CB5A0F00A55B0F009F5C0F008C\n:105AF000CB5A0F00CB5A0F00CB5A0F00CB5A0F00D6\n:105B0000CB5A0F00BB5C0F00CB5A0F00CB5A0F00D3\n:105B1000CB5A0F00CB5A0F00CB5A0F00CB5A0F00B5\n:105B2000315D0F00CB5A0F00235D0F00CB5A0F00E1\n:105B3000CB5A0F00255C0F00513B9AB2052AC4D8FE\n:105B4000052BC2D801A252F823F000BF6F5C0F00F2\n:105B5000BB5C0F00CB5A0F00CB5A0F00475D0F0004\n:105B60000B5C0F007D4BA2881A807D4B00221A70BF\n:105B7000ABE78023794CADF824307A4B2088322271\n:105B80001A6010A9012309AAFFF759FE08B101F014\n:105B900095FE754B1B780BB9FFF7D2FE4FF6FF73DE\n:105BA000238092E7714B03AC9A79186899888DF835\n:105BB00022200790DA1DADF8201017332646106812\n:105BC0005168254603C508329A422C46F7D1684BE6\n:105BD00009AA03F11807154618685968144603C442\n:105BE0000833BB422246F7D1186820605B48614AFF\n:105BF000008810AB8521CDE91456FFF712FE00286E\n:105C00003FF463AF01F05AFE5FE7A379002B7FF406\n:105C10005CAF524B13211888FFF7FBFD00283FF4BF\n:105C200054AF79E0237A012B7FF44FAF4C4B002225\n:105C30001A704C4B19680139196069B910AB1422FC\n:105C40001846FEF7A9FB05228DF84020149A009211\n:105C50000FC8FFF73DFB38E731B0BDE8F040FFF774\n:105C60006FBE3E4B00211888FFF7EFFDD6E7A37902\n:105C7000002B3FF42AAFA27B043A022A3FF625AF5D\n:105C8000022B18BF01238DF840304FF4C173ADF8DB\n:105C90004430324B10A91888FFF7CDFDAFE7334AE7\n:105CA000258A508D02F118010023854218BF19463C\n:105CB0000732A088FFF7B7FDB0E7284B1C884FF6E6\n:105CC000FF75AC4227D02C4B1B78F3B12B49012335\n:105CD00008222046FFF7B1FDF0B902460146022333\n:105CE0002046FFF7AAFDB8B92A460C212046FFF747\n:105CF000A0FDA0F54053023B012B7FF6E6AE08283D\n:105D00003FF4E3AE112889D1DFE61A461946204652\n:105D1000FFF793FD82E7082031B0BDE8F04001F0C5\n:105D2000CDBD0E4B002218881146FFF780FD75E7A8\n:105D300000238DF840308DF84130084B10A91888A9\n:105D4000FFF773FDC1E6E188044B1729188828BFC7\n:105D50001721FFF776FD61E7F89900203E840020C7\n:105D60002C9A0020408400203F9A0020B8990020FF\n:105D7000D09900203A9A0020F4990020EC99002054\n:105D800030B5464A464800231370464A95B0137012\n:105D900000F048FB01F0F6FD0446002868D14248B7\n:105DA000FEF720FC002866D1404B01221A70112317\n:105DB0003F488DF8043005F083FC3D4982B201A8CC\n:105DC000FFF72DFD08B101F079FD0822002104A89C\n:105DD000FEF7E2FA0823ADF810301823ADF81230C0\n:105DE0000023ADF8143004A84FF4C873ADF8163092\n:105DF000FFF713FD08B101F061FD00210C2201A89D\n:105E0000FEF7CAFA0823ADF804302A4B02932A4859\n:105E10002A4B039301A900F02FFD08B101F04EFDBC\n:105E2000274D4022002104A8FEF7B6FA284605F0C7\n:105E300047FCADF810002846059505F041FC079594\n:105E4000204DADF81800284605F03AFC1123ADF8B6\n:105E5000300004A8ADF84C300D9500F0DBFF1A4B74\n:105E600030221A7007225A7010229A70FFF768FDCC\n:105E7000204615B030BD04A8FFF7BFFC08B101F003\n:105E80001DFD9DF8113004A801338DF81130FFF786\n:105E9000B2FC00288BD001F011FD88E73F9A00206A\n:105EA000A9580F00399A0020B8990020F4990020D1\n:105EB00086BB0F001D5F0F00F899002083580F006C\n:105EC0008DBB0F0098BB0F003A9A002010B50F4B06\n:105ED00001221A700E4B18884FF6FF73984207D0B4\n:105EE0001321FFF796FC08B101F0E8FC002010BD7B\n:105EF000084C2378002BF9D0074B1878FFF787FC64\n:105F000008B101F0DBFC00232370EFE73F9A00208B\n:105F10003E8400202C9A00203C840020F0B50B78B1\n:105F200089B005460C46092B35D8DFE813F02D0063\n:105F3000360041000A001900260007011001440044\n:105F4000150100F089FB0421FFF781FC0246284679\n:105F500000F018FEF8B109B0BDE8F04001F0AEBCA9\n:105F6000FFF7B4FF08B101F0A9FC00F095FB90B178\n:105F700009B0BDE8F04000F09DBBFFF7A7FF002887\n:105F8000F6D001F09BFCF3E7764B01221A704B68C8\n:105F90001A78754B1A7009B0F0BD724B02261E704C\n:105FA0004B681B78012BF6D100F008FB3146CBE79C\n:105FB0006C4B0322EEE70520FEF7BAFE694B1E7814\n:105FC000022E37D0032E59D0012EE4D104AB10227B\n:105FD00018460021FEF7E0F9634A237A12788DF81B\n:105FE0001020002203920C2B4FF00302CDE9012078\n:105FF00008D03146284600F0C5FD0028CBD001F07E\n:106000005DFCC8E763681846FFF7F3FB0590181DB1\n:10601000FFF7EFFB069003F10800FFF7EAFB07909C\n:1060200001A800F005FA0028B5D03146FFF70FFCB3\n:106030000246DFE7237A13F0030011D0C0F1040217\n:106040001A44D2B219464FF0000C0E46013167686F\n:10605000C9B2914207F806C0F7D11B1A0433237264\n:106060000123049363680693237A04A89B0805938D\n:1060700000F0C6FA00288ED00221D7E7207A8307E5\n:1060800002D03246314662E7384E0190314601F087\n:106090008FFC014618B12846FFF7F5FB7BE76168E6\n:1060A000019A306805F062F9019801F0E7FC0146B9\n:1060B0000028F0D101A9304601F0F0FC014600288B\n:1060C000E9D104230493019B9B08059304A833683A\n:1060D000069300F007FA074640B9254A237A11686B\n:1060E0000B441360234B32681A6054E709281BD114\n:1060F0001F4B217A1A68114419601F4B1B78002B23\n:106100003FF449AF1D4C2388013B9BB22380002BF9\n:106110007FF441AF284600F0FBFC08B101F0CEFB54\n:10612000174B1B88238036E7306801F06BFC014673\n:1061300010B12846FFF7A7FB3946ACE70E4B01220A\n:106140001A700F4A8B8813800C4A138023E70A4A7F\n:10615000002313700A4AF8E7054B196800F09CFC0D\n:10616000F8E600BF399A0020409A00204C9A00209F\n:10617000309A0020489A0020389A0020369A002051\n:10618000349A002018DF7047012973B514460D4674\n:106190001A4608D0032912D014B3204602B0BDE835\n:1061A000704001F08BBB0F4B1B78052BF4D10E4BCD\n:1061B0001B68002BF0D0214604209847ECE7094EDD\n:1061C0003378022BE8D1094B01925B689847064B64\n:1061D00035701B68002BDFD0019A21462846ECE77A\n:1061E00002B070BD589A0020509A00205C9A00209E\n:1061F00030B589B003AC142200212046FEF7CCF85C\n:10620000094B1B88ADF80E30084BDB680693002560\n:10621000079B8DF80C50009394E80F00FFF758F897\n:10622000284609B030BD00BF689A0020B49A00200B\n:1062300000B589B003238DF80C300A4B1B88ADF8EC\n:106240000E30094B5A6804929A68DB680693079BE4\n:106250000093059203AB0FCBFFF73AF8002009B08B\n:106260005DF804FB689A0020B49A002000B589B05C\n:1062700001238DF80C300F4B0F4A1B88ADF80E3000\n:106280004FF440535968914208BF9A680B4B5968C4\n:10629000049118BF4FF480529968DB68069305910A\n:1062A000009203AB0FCBFFF713F8002009B05DF8A5\n:1062B00004FB00BF689A0020DBE5B151B49A0020CE\n:1062C00000B589B003AB142200211846FEF764F82C\n:1062D00004228DF80C20002200920FC8FEF7F8FF70\n:1062E00009B05DF804FB0000194BF7B5194C1C60B0\n:1062F000194B02221A70FEF75DFA184B48B1196863\n:10630000204600F001FF00B303B0BDE8F04001F00B\n:10631000D5BA1D68124F013D2D0B013504464FF4CF\n:1063200040567368BB420CBFB0684FF4805000EB1E\n:1063300004300134FEF7DAFDA542F2D80023054807\n:1063400000931A460321FFF71FFF03B0F0BD00BF03\n:10635000CC9A0020C49A0020589A00206C9A002001\n:10636000DBE5B15170B50C4686B00321CDE90210D2\n:106370000546960802A8019304940596FFF702FFCC\n:10638000E0B1B4F5805F019B11D8012302A8CDE9EB\n:106390000235CDE90446FFF7F5FE78B9032302A8DC\n:1063A000CDE90235CDE90446FFF7ECFE06E01A46DA\n:1063B000E11AE81AFFF7D6FF0028E6D006B070BD54\n:1063C0001FB5114B0193114B114900241C70114B47\n:1063D00001A81C80CDE9024400F074FE0E4B10B100\n:1063E0001C7004B010BD4FF440520C4954688C42EC\n:1063F00007490CBF92684FF480524A60084A002156\n:10640000116001221A70ECE789610F00B09A002038\n:10641000C49A0020689A0020589A0020DBE5B15108\n:10642000549A0020014B1860704700BF509A00201A\n:1064300038B54368214C0FCB84E80F002278500711\n:1064400001D5910733D16068830730D1A3689D07D8\n:106450002DD1E16811F0030429D1184408441849EA\n:10646000B3F5204F086024D84FF4405315495D68B8\n:106470008D420ABF9B684FF46923C3F56A23984293\n:1064800017D8114B1149196011495960D10709D525\n:10649000104A9A60104B1B78012B0CD1FFF724FF98\n:1064A000204638BD92074CBF0C4A0D4AF1E706243E\n:1064B000F6E70C24F4E70824F2E700BFB49A0020C2\n:1064C0006C9A0020DBE5B1515C9A0020E9620F0074\n:1064D000C1620F006D620F00589A002031620F00F8\n:1064E000F1610F002DE9F04385B0002853D0816899\n:1064F00011F0030451D12C4B1B78052B4FD12B4E9F\n:1065000042683368DFF8AC9003EB82039500D9F85A\n:106510000020934207D94FF0FF3333600C2420460C\n:1065200005B0BDE8F0830391FEF744F9DFF88880F9\n:10653000039940B13368D8F800002A4600F0D4FD32\n:10654000D8B10446EBE74FF44053194A586837680E\n:10655000904208BF9868039118BF4FF48050002301\n:106560002A463844FEF7C4F80399D8F8000000958D\n:106570000B4600220121FFF707FE33681D44D9F8BE\n:10658000003035609D420CD1FEF714F90028C6D1C9\n:10659000FEF790F8C3E70E24C1E71024BFE70824F4\n:1065A000BDE70924BBE700BF589A0020549A002099\n:1065B000DBE5B1516C9A0020CC9A002070B50B4BF2\n:1065C0001D6885B90A4E3378042B0CD1094C0A4B4F\n:1065D00021781A780948FEF725F810B90523337099\n:1065E00070BD2570FCE70820FAE700BF549A002030\n:1065F000589A0020B09A0020B49A0020709A002087\n:10660000F8B5114B1A78032A03D0042A03D00824C2\n:1066100016E004221A700D4B1C68002CF7D10C4DAB\n:1066200043682F789E0007EB8303402B0AD88168CC\n:1066300008483246384404F099FE2B7833442B70D6\n:106640002046F8BD0924FBE7589A0020549A002000\n:10665000B09A0020709A002010B50B4C2378052BBF\n:1066600010D10A4B0A4A1B68116899420AD10623C5\n:106670002370084B1B685868FEF70EF808B907230B\n:10668000237010BD0820FCE7589A00206C9A002067\n:10669000549A0020CC9A0020044B1B78072B02D17F\n:1066A000034B9B6818470820704700BF589A00208A\n:1066B0005C9A002000B589B006238DF80C30079B4A\n:1066C000009303AB0FCBFEF703FE09B05DF804FBAC\n:1066D000F0B58DB005A8FEF76DFF089C002C3ED0EC\n:1066E0000B9E04F58053B3422DD91E4BA6F5805561\n:1066F00003EA55054FF440539B689C420BD8690050\n:106700002B46A4EB450201F5805106EB4500FFF74F\n:1067100029FE0DB0F0BD05F58053012701A8CDE994\n:106720000173CDE90337FFF72DFD0028F1D14FF4B8\n:10673000805301A8CDE9023301970497FFF722FDAA\n:106740000028E6D1DBE70123CDE90136A4084FF4A8\n:10675000805301A803930494FFF714FDD9E7204662\n:10676000D7E700BF00F0FFFF00B58DB005A8FEF72A\n:1067700021FF099880B1089B8BB94FF440530B4A15\n:10678000596891420ED19B6880080022039001A8AD\n:10679000CDE90123FFF7F6FC0DB05DF804FB0B9A81\n:1067A0001344F1E74FF48053EEE700BFDBE5B1514E\n:1067B00000B58DB005A8FEF7FDFE099898B1089BBD\n:1067C000A3B94FF440530C4A5968914211D19B68C8\n:1067D0000393800803214FF47422049001A8CDE9AB\n:1067E0000112FFF7CFFC0DB05DF804FB0B9A1344C8\n:1067F000EEE74FF48053EBE7DBE5B15110B58CB019\n:1068000005A8FEF7D7FE0898B8B10B9C00F5805399\n:10681000A34214D94FF440539B6898421BD80F4BA6\n:10682000A4F5805203EA52035900A0EB430201F59C\n:10683000805104EB4300FFF795FD0CB010BD8008BC\n:1068400003224FF48053049001A8CDE9012303945F\n:10685000FFF798FCF1E70E20EFE700BF00F0FFFF25\n:10686000A8DF7047AADF7047ADDF7047AEDF704723\n:10687000B0DF704762DF70472DE9F0470E4694B0F5\n:106880000546002800F00181002900F0FE804B68D9\n:10689000002B00F0FA804FF6FF7303800023ADF861\n:1068A0000A307B4B04AA03F1100C1746186859688C\n:1068B000144603C4083363452246F7D141F23053EE\n:1068C0000DF10A013846ADF80830FFF7D3FF044652\n:1068D000002840F0D6802A1D02A90120FFF7C0FF42\n:1068E0000446002840F0CD809DF80A30AB71014687\n:1068F0001C220DA8FDF750FD9DF834300E9443F096\n:1069000004038DF8343001AFAB798DF80E30214699\n:1069100041F2325303223846CDE91044CDE9124406\n:10692000ADF80C30FDF738FD9DF806308DF80440C9\n:1069300023F01F0343F00303214614224FF0110AF2\n:1069400008A88DF806308DF805A00DF10C08FDF7AC\n:1069500023FD4FF01409A8880A9405F1080308AA3A\n:106960000DA90C94CDE90887ADF82C90FFF77AFFBC\n:106970000446002840F0858001461C220DA8FDF742\n:106980000BFD9DF834300E9423F0180343F01803E8\n:106990008DF83430AB798DF80E30214641F2315309\n:1069A00003223846CDE91044CDE91244ADF80C304D\n:1069B000FDF7F2FC9DF806308DF8044023F01F032C\n:1069C00043F0130321464A4608A88DF806308DF897\n:1069D00005A0FDF7E1FC1723ADF82C30A8880A9438\n:1069E00005F1100308AA0DA90C94CDE90887FFF75B\n:1069F00039FF0446002844D101461C220DA8FDF7AA\n:106A0000CBFC9DF834300E9443F002038DF8343003\n:106A1000AB798DF80E30214641F2345303223846CB\n:106A2000CDE91044CDE91244ADF80C30FDF7B4FCCB\n:106A30009DF806308DF8054023F01F0343F0030353\n:106A400021464A4608A88DF806308DF804A0FDF7C7\n:106A5000A3FC02230A93ADF82C30A8880C9605F10C\n:106A6000200308AA0DA9CDE90887FFF7FBFE04461D\n:106A700038B97368AB62B36803B1EB62054B0122AE\n:106A80001A70204614B0BDE8F0870E24F9E700BF65\n:106A9000B9BB0F00D09A002070B5054686B070B320\n:106AA00002884FF6FF739A422BD0174B1B7843B3E3\n:106AB000164C1022080AE170207121FA02F0090E2A\n:106AC000072301266071A17102A800216370ADF84F\n:106AD00006302270A670FDF75FFC2B8AADF80830F7\n:106AE0000023ADF80C3028888DF80A600DF10603FC\n:106AF00002A9CDE90434FFF7B9FE06B070BD0E203F\n:106B0000FBE70820F9E700BFD09A0020D19A0020C7\n:106B100030B5044687B060B302884FF6FF739A42DF\n:106B200029D0164B1B7833B3154D11232B700B0A4C\n:106B30006970AB700B0C090EEB70297105230021F5\n:106B4000102202A8ADF80630FDF726FC238AADF826\n:106B5000083001238DF80A300023ADF80C3020886E\n:106B60000DF1060302A9CDE90435FFF77FFE07B05A\n:106B700030BD0E20FBE70820F9E700BFD09A0020C7\n:106B8000D19A002030B5044687B038B300884FF65C\n:106B9000FF73984224D0134B1B780BB3124D102374\n:106BA00069700321ADF80610AA7000211A4602A8E8\n:106BB0002B70FDF7F1FB238AADF8083001238DF827\n:106BC0000A300023ADF80C3020880DF1060302A92D\n:106BD000CDE90435FFF74AFE07B030BD0E20FBE7D4\n:106BE0000820F9E7D09A0020D19A002070B50D4610\n:106BF00088B0044650B149B1826A3AB10B88502B33\n:106C000049D005D8102B43D0112B54D008B070BDFB\n:106C1000512BFBD18E79022EF8D10A89038A9A4230\n:106C2000F4D18B7B043B022BF0D99DF816308DF804\n:106C3000106043F001038DF816300B8AADF8183060\n:106C40004B8AADF81A30082201F1140301A8002183\n:106C50000793FDF7A1FBA18A2088019601AACDF830\n:106C600008D0FFF701FE48B3E36A03B1984740F24A\n:106C7000FD132088ADF8143004A9FFF7F9FD0028B2\n:106C8000C4D0E36A002BC1D008B0BDE870401847FB\n:106C90008B882380BAE7C98803899942B6D1082333\n:106CA0008DF81030123535F8023C8DF81830059506\n:106CB00004A99047AAE74FF6FF73EAE7BDF8003052\n:106CC0002088DB07D3D5002604A9ADF81460FFF7B0\n:106CD000CFFD0028D5D1297D4B1E072B3ED8DFE8FC\n:106CE00003F004192226282A3B2C6B8A8DF80460B5\n:106CF000012B05D8062201212046FFF743FFBEE7FE\n:106D0000012315358DF80C300295A36A01A92046A0\n:106D100098477BE76A8A01239A428DF80430F0D8BD\n:106D200006220221E8E702238DF80430EDE7032371\n:106D3000FAE70423F8E70523F6E76B8A022B02D86B\n:106D400003220821D8E7B5F81530ADF80830002B3C\n:106D50000CBF07230623E7E70923E5E70322CBE778\n:106D6000A8DF7047AADF70472DE9F04180468EB05A\n:106D700015461F460E4611B9084600F09FFD15B98D\n:106D8000284600F09BFD1C220DEB02000021FDF7C0\n:106D900003FB9DF81C30ADF80480002443F002038F\n:106DA0008DF81C3021460123032268468DF80630F9\n:106DB000CDE90A44CDE90C440894FDF7EDFA3B789F\n:106DC0008DF800307B788DF801309DF8023023F08B\n:106DD0001F0343F002032146142202A88DF802305B\n:106DE000FDF7DAFA0A48CDF80CD001AB029302AAFB\n:106DF000149B0088ADF8105007A9ADF81240ADF80B\n:106E000014500696FFF7AEFF0EB0BDE8F08100BF4C\n:106E1000F89A002030B587B041F60A032B4AADF846\n:106E20000C30044603A901208DF80E00FFF798FFEF\n:106E30000546D8B92288E2B922894AB1244B009389\n:106E4000E16804F13C0342F62420FFF78DFFD8B936\n:106E5000228C4AB11F4B0093616A04F13C0342F655\n:106E60002620FFF781FF78B9A36B7BB9284607B0CE\n:106E700030BD194B0093616804F13C0342F62920B0\n:106E8000FFF772FF0028D7D00546EFE71A788DF894\n:106E900010205A888DF81120120A8DF812209A8835\n:106EA000DB888DF815301B0A8DF813208DF816300D\n:106EB000120A0A4B8DF814200093072204F13C03B8\n:106EC00004A942F65020FFF74FFFDDE7F89A0020B3\n:106ED000E89A0020D89A0020E09A0020F09A00203A\n:106EE00029DF704728DF7047064B182202FB00306D\n:106EF00000230422C0E90423037183608361C3601B\n:106F0000704700BF0C9B002023B502460846C968A5\n:106F100043680093044B53F82150436910F80C1B4D\n:106F2000A84702B020BD00BFFC9A002038B5194C1C\n:106F30002378182202FB03431A795869012A03D0E7\n:106F4000032A1AD00F2038BD134A996915689A6828\n:106F5000DB68A2EB0532B2F5805F184401EB053126\n:106F600000EB053034BF92084FF48062FFF7B8FFA2\n:106F70000028E8D10123A370E5E74FF080531B6997\n:106F80009BB2B0FBF3F0044B1B681844FFF7AAFF59\n:106F9000EEE700BF0C9B0020049C002070B5134D51\n:106FA0006C780A2C1FD02E783444E4B2092C84BFAC\n:106FB0000A3CE4B2182606FB0454A261207103C9FE\n:106FC000A360049BE360AB7804F1100282E8030045\n:106FD00023B100206B7801336B7070BDFFF7A6FF03\n:106FE0001128F7D1F5E70420F7E700BF0C9B00203C\n:106FF00070B5234CA3782BB100260228A67002D0CE\n:10700000032833D070BD25781E4A182101FB0541A5\n:10701000136889680133B1EB033F136014D86378B8\n:107020001660013B63706B1CDBB21821092B01FB5E\n:10703000054188BFA5F10903002004312370FFF743\n:1070400063FF2846FFF750FF6378002BDAD0A37860\n:10705000002BD7D1FFF76AFF0028D3D01128D1D059\n:107060002178182303FB0141043105E0217818231E\n:1070700003FB014104310D20BDE87040FFF744BF20\n:107080000C9B0020049C002008B50A4B00211960CD\n:10709000094B1980997008460131FFF725FF0A292D\n:1070A000F9D1064B00201860054BC3E90000C3E985\n:1070B000020008BD049C00200C9B0020009C0020C6\n:1070C000FC9A0020064A03461068042807D008608E\n:1070D000411C11601A68034B43F8202000207047C0\n:1070E000009C0020FC9A002013B5CC180C43A40788\n:1070F00008D1009313460A4601460120FFF74EFFD0\n:1071000002B010BD1020FBE707B500220B4600922D\n:1071100001460320FFF742FF03B05DF804FB0000C7\n:10712000094B5A7899780132D2B2914208BF0022B5\n:10713000197891421FBF02705878182202FB003064\n:1071400014BF043000207047089C0020082910B5A7\n:10715000044602D0002000F0B1FBD4E90030BDE8C5\n:107160001040184773B5054600240DF107000E4680\n:107170008DF8074000F0B0FB0DF10600FFF7D0FFDF\n:1071800090B10670094B9DF8062045605A709DF835\n:10719000070000F0C5FB24B9054B4FF48012C3F87B\n:1071A0000021204602B070BD0424F0E7089C0020B6\n:1071B00000E100E0204B21491A682F2300BF00BFE7\n:1071C00000BF00BF00BF00BF00BF00BF8A422FD07A\n:1071D00000BF00BF00BF00BF00BF00BF00BF00BFB7\n:1071E00000BF00BF00BF00BF00BF00BF00BF00BFA7\n:1071F00000BF00BF00BF00BF00BF00BF00BF00BF97\n:1072000000BF00BF00BF00BF00BF00BF00BF00BF86\n:1072100000BF00BF00BF00BF00BF00BF00BF00BF76\n:1072200000BF00BF00BF00BF00BF00BF00BF00BF66\n:10723000013BC3D1704700BF388400200024F40014\n:107240000C4B0D484FF4003210B5C3F880200124D8\n:107250004FF48033C0F84833C0F808334460FFF778\n:10726000A9FF064B846000201860FFF7A3FF044BC2\n:10727000187010BD00E100E000100140249D0020C6\n:10728000159D00202DE9F3412549264B0025C1F825\n:107290004051C1F84451C1F84851C1F84C51C1F8AE\n:1072A0000051C1F804511B68002B34D0D1F80445BB\n:1072B0001D49DFF888800968641A24F07F442F464E\n:1072C0001968A14212D81A7CDE69641A0D4462B1B1\n:1072D0005A691F7400929B690193424608216846CF\n:1072E00000F056FA08B100F0E9FABEB90F4A104BA7\n:1072F00011781B788B4205D10133DBB2022B08BF1A\n:107300000023137012780B4B43F822500A4B4FF4B2\n:107310008012C3F8002102B0BDE8F0813346CFE708\n:1073200000100140289D0020249D0020219D002068\n:10733000209D0020189D002000E100E04D710F000D\n:107340002DE9F74FA84AA94913780978A84C994222\n:107350003BD00133DBB2022B08BF00231370A549D9\n:107360001278A54B0F6853F822003B1823F07F4397\n:1073700000220B60236815461646944613B942B1A5\n:10738000236006E0196881420DD902B12360091A11\n:10739000196001262368DFF8689200930027BDB9C1\n:1073A000DFF868A268E0401A0E44D968D3F81CE000\n:1073B000C3F800C031B1BA1922F07F42C3E90121FC\n:1073C000DD611D4673460122D8E700252E46E1E720\n:1073D0002846ED69874BD0F804C01B68DFF830E21F\n:1073E0008168ACEB030222F07F42724500F2AD806F\n:1073F0000A4402600122027422680023C0E90133BA\n:10740000C361002A40F0AB802060C8E75A1C9AF89C\n:107410000210D4F800B0D2B291428AF8002004BF22\n:1074200000228AF80020182202FB03A31A79986828\n:10743000022A77D0032A00F08580012A1CD190F817\n:1074400010C0BCF1000F17D1D96841601A69826081\n:107450005A69C2609B698361684B1B78002B18BF17\n:1074600061464160B6E7904200F09E809046D26946\n:10747000002AF8D1002303749AF800309AF801200A\n:107480009A42C3D1236827B9009A9A4201D1002EAB\n:1074900042D0002B00F08580D3F80090584C554B1B\n:1074A000D4F804651868574F351A3B7825F07F45A6\n:1074B00003359BB94FF48033C4F84433C4F8043324\n:1074C000514B4FF400324FF00108C3F880211A608D\n:1074D000C4F80080FFF76EFE87F80080A9452CBF36\n:1074E0004844401920F07F40C4F84005D4F80435E2\n:1074F0009B1B23F07F43801B033320F07F4083429C\n:107500000AD9D4F80435C4F84035FFF753FE3E4B92\n:107510004FF40032C3F80021384B00221A7003B038\n:10752000BDE8F08F5A46D846A2E78BF81020DBF86A\n:107530001CB00123BBF1000FF7D1002B9CD0C4F885\n:1075400000B099E700231A46F4E7A3EB0C0323F0FD\n:107550007F438B4234BFCB1A002303604AE70168A4\n:10756000136899421BD85B1A1360C2614CE7A1EB08\n:107570000C01D3F81CC01A46BCF1000F0AD06346B8\n:10758000D3F800C08C45F2D3ACEB010CC3F800C0BB\n:107590009C4613460160C0F81CC0D861FFE6134644\n:1075A000EEE7FFF74DFEB7E7404510D1DBF81C30A2\n:1075B000236063B9DFF83CE001920121C9F80810AB\n:1075C000CEF800300D4B1970FFF7F4FD019A1368E7\n:1075D000D269C8F81C2012B111680B4413602368EB\n:1075E0005B4518BF012745E7209D0020219D002015\n:1075F000289D0020249D0020189D0020149D00201F\n:1076000000100140159D002000E100E0089C0020D2\n:10761000FEFF7F0008B5FFF713FE104B00200B2282\n:1076200018809A700E4B18600E4B18700E4B187025\n:107630000E4B4FF48012E021C3F8802183F814131D\n:107640001A6002F18042A2F56F22C2F8080583F8A1\n:107650001113074BD2F804251A6008BD089C0020BE\n:10766000289D0020209D0020219D002000E100E0B9\n:10767000249D0020074B9B784BB132B128B10368A1\n:10768000187C20B959745A61704707207047082048\n:10769000704700BF089C00202DE9F743DFF8848085\n:1076A00098F8023005460E461746ABB3A0B304293E\n:1076B00030D9436983B3437C0024012B0DF10700CB\n:1076C0000CBF8946A1468DF8074000F005F90DF181\n:1076D0000600FFF725FDD8B1012303700F4B45606D\n:1076E000D3F80435C0E90497C0E902369DF80630A6\n:1076F00088F801309DF8070000F012F924B9084B12\n:107700004FF48012C3F80021204603B0BDE8F08397\n:107710000424EFE70724F7E70824F5E70010014009\n:1077200000E100E0089C0020064A92783AB130B1AE\n:10773000426922B1002202740221FFF713BD082022\n:10774000704700BF089C00204B1C30B5DB0004468E\n:1077500012F003009BB20DD1074D2A601A44074B6B\n:107760001A60074B1870074B1870074B1C80074BAB\n:10777000198030BD0720FCE7349D0020309D00209B\n:107780002C9D00203C9D0020389D00203A9D00202B\n:107790002DE9F347DFF8C080B8F800308B42064689\n:1077A0000D4617464CD300240DF107008DF8074015\n:1077B00000F092F8244B254A25481B78008892F85F\n:1077C00000C084455FFA8CF138BF4C1CDBB238BF77\n:1077D000E4B2A3422ED014781178CBB2884286BF8F\n:1077E0000133DBB2002313709DF8070000F098F816\n:1077F0004FF6FF739C4225D0DFF86090D9F8002047\n:107800004FEAC40A42F8347002EBC403AEB1A5B12A\n:10781000104BB8F800001B682A4604FB00303146C4\n:1078200003F0A4FDD9F80030534400209D8002B03D\n:10783000BDE8F0874FF6FF74D6E700209880F6E7A2\n:107840000920F4E70420F2E73C9D00202C9D002055\n:107850003A9D0020309D0020389D0020349D00205E\n:1078600070B5104C104D22782B789A4200D170BD23\n:107870000E480F4A2378126806880E4802EBC301AF\n:10788000006852F83320898803FB060090470A49B4\n:1078900022780988D3B2914286BF0133DBB200233C\n:1078A0002370E0E73C9D00202C9D0020389D0020A7\n:1078B000349D0020309D00203A9D00201FB50021FE\n:1078C000CDE9021001AA44F20100ADF80410FCF762\n:1078D00066FF05B05DF804FB70B5EFF3108672B675\n:1078E0000C4A946801239CB993600B4B0B4DD3F861\n:1078F000801029401160C3F88050D3F88410516083\n:107900004FF0FF32C3F88420047006B962B670BD30\n:107910000370FAE7409D002000E100E0FC06FFBD97\n:1079200010B5084B9A685AB150B9EFF3108172B68E\n:10793000054A1C6814605C685460986001B962B6BE\n:1079400010BD00BF409D002000E100E003462AB1C9\n:1079500010881A4619448A4203D170474FF6FF70C7\n:10796000F7E712F8013B40BA80B25840C0F3031366\n:10797000584080EA0033580100F4FF509BB2584051\n:10798000E9E70000064B074A00201870064B1A6012\n:107990000822C3E90120C3E90300C3E905007047D9\n:1079A0004C9D0020509D002030B0002000207047EA\n:1079B00030B5F9B1124B5C6800220A60E4B1B0F551\n:1079C000167F1BD8D868013C01305C60D8601C6809\n:1079D00018694FF4177505FB00440C60012101FA8A\n:1079E00000F49969013000F00700214318619961A2\n:1079F000104630BD0E20FCE70420FAE70C20F8E723\n:107A000030B00020F0B51C498A689AB34D690E6801\n:107A1000AC1A04F0070423464FF4177707FB036CF6\n:107A2000604511D1012000FA03F58869684088613A\n:107A300000204E68D1F818C04FF0010E73440025A5\n:107A4000164403F007030AE0013303F007039D42E5\n:107A5000E4D11020EDE74AB1013A1C4601250EFAA7\n:107A600004F414EA0C0FA6EB0207F4D00DB1C1E93F\n:107A70000172F0BD0420FCE730B00020064A136913\n:107A80001268013B4FF4177103F0070301FB032356\n:107A9000C3F858020020704730B0002030B5C0B1A4\n:107AA000B9B10E4BDA68B2B1013ADA609A681C6873\n:107AB00001329A605A694FF4177505FB024404605D\n:107AC0000132D4F85802086002F007025A6100201F\n:107AD00030BD0E20FCE70420FAE700BF30B00020E4\n:107AE0003FB40C49086890B10B4B1C687CB10B4A41\n:107AF0001568CDE9025000238DF804300B60136047\n:107B000004AB13E90700234604B030BC184704B0A7\n:107B100030BC704754B0002058B0002064B0002042\n:107B2000DC2810B509D0DD2810D0C02816D1FFF709\n:107B3000D7FF0E4B0E4A1A6010BD0E4A0E4B196845\n:107B40001368581C1060C022CA54F2E7094A0A4B55\n:107B500019681368581C1060DB22F5E7064B054ACC\n:107B6000196813685C1CC8541460E2E74484002060\n:107B7000917B0F0054B0002064B00020C02802BFE9\n:107B8000014B024A1A60704744840020917B0F0029\n:107B9000C02810B409D0DB280BD0094B094A19685A\n:107BA00013685C1CC854146006E05DF8044BFFF7D2\n:107BB00097BF054B054A1A605DF8044B704700BF3C\n:107BC00064B0002054B0002044840020217B0F00CA\n:107BD00007B501228DF807000DF10701002002F022\n:107BE00085FD00280CBF0420002003B05DF804FBD5\n:107BF00010B5064A064C12682368D05CFFF7E8FF10\n:107C000010B923680133236010BD00BF68B00020A5\n:107C10005CB0002008B5C020FFF7DAFF28B9034B9D\n:107C20001B6813B9024B034A1A6008BD5CB0002000\n:107C300048840020F17B0F0008B5DB20FFF7C8FF68\n:107C400010B9024B024A1A6008BD00BF48840020E8\n:107C5000557C0F0010B50C4A0C4C12682368D35C9D\n:107C6000C02B03D0DB2B0DD0042010BDDC20FFF790\n:107C7000AFFF0028F9D12368054A01332360054B83\n:107C80001A60F2E7DD20F2E768B000205CB0002067\n:107C9000F17B0F00488400207FB5184C184D194E19\n:107CA000002002F0C3FC30B322689AB1296833681F\n:107CB00099420FD2012201A9002002F0C3FC10B9A1\n:107CC0004FF0FF3001E09DF804000F4BC0B21B687D\n:107CD0009847E5E70D4B1B686BB10292084A0221F9\n:107CE000126803928DF8041004AA12E9070004B088\n:107CF000BDE87040184704B070BD00BF64B00020FC\n:107D000054B0002050B000204484002058B000201F\n:107D1000014B18600020704758B00020034B1A78C0\n:107D20000AB901221A700020704700BF4CB0002031\n:107D3000014B0020187070474CB000202DE9F04F27\n:107D400085B0002851D02A4F3B78012B07D0022B59\n:107D500014BF08240424204605B0BDE8F08F254D4B\n:107D6000DFF8A090244E254CDFF89C80DFF89CA023\n:107D7000DFF89CB0C9F8001000232B6002233060AC\n:107D80003B70C4F800802A68D9F800309A4215D3B5\n:107D9000C4F80080FFF73EFF044608BB184B1B6881\n:107DA00001223A70E3B18DF80420326802922A6809\n:107DB000039204AA12E907009847CCE733682A68BF\n:107DC0009A5CC02A03D02A689B5CDB2B04D1236811\n:107DD000534508BFC4F800B023689847042801D170\n:107DE0000024B8E71128CED1FAE71024B3E700BF8A\n:107DF0004CB000205CB0002068B000204884002017\n:107E000058B0002060B00020157C0F00F17B0F00FF\n:107E1000397C0F00054B064A1860064B1960064B6B\n:107E200000201860054B1A60704700BF64B0002046\n:107E30007D7B0F0050B0002054B00020448400200F\n:107E4000064B07481B68DB00DBB2002203705B4275\n:107E500042708270C3700421FFF770BF94B000209D\n:107E60006CB0002070B52B4C2B4D02462378012BB3\n:107E700014D0022B21D0002B4BD1002A49D1274806\n:107E8000FFF752FC08B1FFF719FD254B1B68002BCB\n:107E90003FD0244ABDE8704010781847012A38D1F5\n:107EA0002968214B06311868FFF748FF08B1FFF732\n:107EB00005FD022323700022D8E7022A16D0032AE8\n:107EC0000CD032BB194B15481A6041F67F21FFF7E1\n:107ED000E3FBF0B1BDE87040FFF7F0BC144A136853\n:107EE000013303F0070313600023E3E70F4A13682D\n:107EF000052B0AD001331360074B19680A4BBDE804\n:107F0000704018680631FFF719BF064B01221A703E\n:107F1000EAE770BDB8B00020ACB0002070B000201F\n:107F2000A8B00020B0B00020C0B00020B4B0002045\n:107F300098B00020F0B585B004AB03E907009DF8C8\n:107F40000400032874D8DFE800F00802A3A601208B\n:107F500005B0BDE8F040FFF785BF039E544C032EEB\n:107F600040F28280029D6B7813F00F0265D00E2ADA\n:107F70007AD1042E55D02A78500652D5110650D504\n:107F80001A44AB781A44EB781A4412F0FF0248D135\n:107F9000B71E39462846FFF7D9FCEB5B834240D138\n:107FA00044492A780B6802F00702D8B282422BD1EA\n:107FB000013303F007030B60FFF742FF3E4B012242\n:107FC00030461A70FFF75AFD08B1FFF777FC3849C1\n:107FD0004FF41670FFF7ECFC002862D0042802D0A2\n:107FE0000020FFF76BFC35480521FFF713FF08B1B0\n:107FF000FFF764FC324B1B68002B56D04FF000009B\n:1080000005B0BDE8F040184720684FF41671FFF73F\n:1080100001FF08B1FFF752FC05B0BDE8F040FFF7E3\n:108020000FBF20684FF41671FFF7F4FE00283CD014\n:1080300005B0BDE8F040FFF741BC2978AA780B44B1\n:108040001344EA78134413F0FF030DD11D4A12685C\n:108050000132C1F3C20102F00702914204D11A4A6F\n:1080600003201370FFF7FEFE25681DB14FF4167153\n:108070002846D9E70E494FF41670FFF799FC60B116\n:10808000042802D02846FFF719FC0C480521CBE74D\n:108090000A480521C8E70320CAE720684FF4167193\n:1080A000C2E720684FF416719FE705B0F0BD00BF2E\n:1080B000BCB0002094B0002090B000209CB0002004\n:1080C000A4B0002098B00020B0B000200220FFF73C\n:1080D000C9BE0000074B10B5044618600648FFF7FC\n:1080E00017FE08B1FFF7EAFB002C0CBF0E200020A2\n:1080F00010BD00BFA4B00020357F0F00184A1948FA\n:10810000002310B51360184A1360184A1360184A08\n:108110001370184A1370184B184A01211960184B34\n:108120001960184B1970FFF7A5FA08B1032010BDAC\n:10813000FFF728FC0028FAD1FFF7F0FD0028F6D160\n:10814000114C4FF416702146FFF732FC0028EDD198\n:1081500020684FF41671BDE81040FFF75BBE00BF0A\n:10816000C0B00020CCBB0F00ACB00020B4B00020E9\n:1081700090B00020B8B0002094B00020CD800F0057\n:1081800098B00020B0B00020BCB000200C4A08B568\n:10819000002313600B4A1360FFF708FC08B1FFF7D8\n:1081A0008DFBFFF7C5FD08B1FFF788FB0648FFF719\n:1081B000BBFA042802D10020FFF780FB002008BD95\n:1081C000A8B00020A4B0002070B0002037B50D4644\n:1081D000044698B191B10A4B19780022019259B125\n:1081E00001A91A70FFF75AFC019B063B2B802368FC\n:1081F0000433236003B030BD0420FBE70E20F9E711\n:1082000090B000200438FFF7FDBB18DF7047000076\n:10821000F0B51D46154B87B018680F4659681B7A94\n:1082200003AC03C42370124B18685968114B0093B8\n:1082300001AC03C42046164603F042FA214602462A\n:10824000384603F093F801A803F03AFA01A9024670\n:10825000304603F08BF8684603F032FA694602466E\n:10826000284603F083F807B0F0BD00BFD0BB0F0075\n:10827000D9BB0F00312E30000120704710B51C46CD\n:108280000B781E2B0AD000232022052102F07AFC55\n:108290004FF6FF70A04228BF204610BD0020F9E72E\n:1082A000F8B5069F14460D463A46002118461E466C\n:1082B000FCF772F87CB14FF0E023D3F8F03DDB0718\n:1082C00000D500BE4FF0FF300AE0284600F0F8F974\n:1082D000013504F50074BC4206EB0401F5D32046D9\n:1082E000F8BD0000F8B50A4F0D461E460024069B57\n:1082F0009C4206EB040101D32046F8BD3A462846CD\n:1083000000F0B4FA0028F7D0013504F50074EEE768\n:10831000C4B0002030B5264D2A7A8DB09AB107AC92\n:108320001422002120460625FCF736F88DF81C5053\n:108330000B9B009394E80F00FCF7CAFF0620FCF7A4\n:10834000F7FC0DB030BD2B68002BFAD0194B197813\n:1083500019B105201A70FCF7EBFCD5E900329A42FE\n:10836000EFD307AC142200212046FCF715F86B7AF6\n:10837000DBB106234FF420424FF474214FF4602008\n:108380008DF81C3002F0C0FF0028D1D0102200214F\n:1083900003A8FCF701F84FF460224FF4205303A820\n:1083A000CDE90423FFF731FFC2E78DF81C30BFE7AA\n:1083B000C4B000204C840020024B0B604FF40073CB\n:1083C0001380704709010100012070470048704781\n:1083D000FA840020044B054A1878054B002814BF86\n:1083E00010461846704700BFE0B20020AF8400205E\n:1083F0004D8400202DE9FF411E4B187020B11E4B0B\n:108400002A229A720022DA721C4A1D4DDFF878C0C7\n:1084100017461C4BEE4603F110067446186859685F\n:10842000F046A8E803000833B342C646F6D12B78DD\n:1084300003F00F0310336B4413F8103CD373114B4C\n:1084400018685968A646AEE803000833B34274467C\n:10845000F6D115F8013B04A901EB1313654513F898\n:10846000103C9373A2F10202D3D100233B7404B0F9\n:10847000BDE8F081E0B20020FA84002064B300205F\n:1084800060000010E1BB0F006800001010B570B96B\n:10849000134B14481968022202F068FF01230133CC\n:1084A000DBB211485B0043F44073038010BD052824\n:1084B00014D80B4B53F82040204603F001F9C3B207\n:1084C0001F2B28BF1F23084A2046E118884202F1CB\n:1084D0000202E4D010F8014B1480F7E70020E5E732\n:1084E0000C850020E4B20020E2B200204DDF70478E\n:1084F0004EDF70474FDF704750DF704712DF704725\n:1085000000F0C8BE002000F033BD00001FB5244BB2\n:10851000402283F8272300238DF807304FF440537F\n:1085200004465A681F4B9A4227D10DF10700FFF706\n:10853000E5FF9DF8073003B30120FFF7D9FF0120C5\n:10854000FFF7D4FF0120FFF7D5FF02A8FFF7D4FF04\n:10855000029BDA0702D5002000F09CFE029B9B07DD\n:1085600002D5022000F096FE2046FFF743FF00F000\n:1085700027F802F059FE04B010BD002301A88DF8C1\n:108580000430FCF721FC084B039303A8FCF744FCE0\n:10859000FCF748FC4FF08043D3F838340293D7E718\n:1085A00000E100E0DBE5B15101850F00012000F0A2\n:1085B00071BE0120FCF7BCBB0220FCF7B9BB000078\n:1085C0007FB52F492F4802F0E7FF4FF440532E4A62\n:1085D000596891424CD11A78102A46D9142A186940\n:1085E00044D95B69294CB3FBF4F50A2201A904FBC9\n:1085F000153403F021F92649224802F0CDFF01A9E4\n:10860000204802F0C9FF23491E4802F0C5FF0A2294\n:1086100001A9284603F010F901A91A4802F0BCFF8D\n:108620001D49184802F0B8FF4FF47A760A2201A9D2\n:10863000B4FBF6F5284603F0FFF801A9114802F053\n:10864000ABFF15490F4802F0A7FF0A2201A906FB5C\n:10865000154003F0F1F801A90A4802F09DFF0F4907\n:10866000084802F099FF04B070BD00200023B9E76C\n:108670000B49044804B0BDE8704002F08DBF00BF54\n:10868000FFBB0F0024850020DBE5B15140420F0005\n:108690000CBC0F000ABC0F000EBC0F0019BC0F0071\n:1086A00010BC0F0010B503461C1A944200DB10BD2D\n:1086B0000C781CB1013103F8014BF5E72024FAE7EF\n:1086C0002DE9F3410C4605464FF400720021204687\n:1086D000FBF762FE6DB95E493E22204602F046FE7F\n:1086E000552384F8FE31AA2384F8FF3102B0BDE897\n:1086F000F081B5F5017F2DD8691EB1F5817F24BFCA\n:108700006FF4817805EB0801C9B10B02C1EBC151CF\n:1087100003F5807004EB412440F693651A1FB2F50F\n:10872000696F03F1010206D2AB4214BF91B24FF65A\n:10873000FF7124F8131090421346EFD1D6E7F823C7\n:10874000237004F109022346FF2003F8010F93422E\n:10875000FBD1DAE7B5F5027F3BD86FF4017C6544C5\n:108760003DB920463B490B22FFF79CFF2823E372CB\n:10877000203439492E014FF0000801EB05256FF038\n:108780001F07022EB2D80B2229462046FFF78AFF88\n:108790005923212269216374E3746376B31C84F83E\n:1087A0000D80A773E1732274A27484F8148084F896\n:1087B0001580A775E17522766383E86830B102F011\n:1087C0007FFFE061013620341035DAE74FF4E9101D\n:1087D000F7E7224B9D4289D86FF40277EA19012A04\n:1087E0000FD81D4B03EB0213D9680191084602F024\n:1087F00067FF01990246204602B0BDE8F04102F051\n:10880000B5BD6FF4FD76A9190902B1F5801FBFF45B\n:108810006DAF134B236003F1144303F52C1303F6E0\n:10882000023363600F4BC4F8FC314FF46963A361FA\n:108830004FF40053A5F20B254FF48072A3600A4B4E\n:108840006561E1602261E36104F12000D4E700BFCB\n:108850001CBC0F0047BC0F00D4BC0F000801010076\n:108860005546320A306FB10A29009A23F7B5654B95\n:1088700014460A689A420D4639D103F114434A68F6\n:1088800003F52C1303F602339A4230D1D1F8FC21C0\n:108890005D4B9A422BD18B6823F4FF5323F01E03C8\n:1088A0009B049B0CB3F5005F21D10B69B3F5807F6E\n:1088B0001DD1C86810F0FF0619D1CB69534A934205\n:1088C00005D0534A934215D0524A93420FD1A0F596\n:1088D0008053B3F5692F07D201234FF4807205F15D\n:1088E0002001FBF705FF22E0B0F5805F1FD34FF0BA\n:1088F000FF3021E001276772CB68B3F1102F1DD143\n:1089000004223431684602F031FD042205F13801B9\n:108910000DEB020002F02AFD009BB3F5742F03D18A\n:10892000019BB3F57E2F01D02772E0E7A772AB69F8\n:10893000002B37D14FF4007003B0F0BDA3F57422C3\n:10894000B2F5204F28D2E27A01F12007DAB9324A93\n:10895000934218D32B69B34215D90422B91968463A\n:1089600002F004FD009BD02B14D10422311D0DEB2D\n:108970000200394402F0FAFC264B019A9A424FF069\n:1089800001030DD1E372E8682A6901233946A0F595\n:10899000A030A6E70836DDE7B3F5805FC7D3012333\n:1089A0002372A4E72268934207D041F263018B420D\n:1089B00000D80AB14FF0FF3323606B6941F26302C4\n:1089C0009342B7D803F0070204EBD303012191408F\n:1089D0001A7B1142C8B204D16168024301311A7393\n:1089E0006160D4E900329A42A4D30120FBF762FE11\n:1089F000637A002B9ED0A37A002B9BD10123237294\n:108A000098E700BF5546320A306FB10A4028A5AD3D\n:108A10003C8263D629009A2300D80F004FF0805380\n:108A2000D3F83001082802D1D3F8343123B9A0F1AA\n:108A30000D0358425841704701207047094B0122ED\n:108A400083F8D8200260BFF36F8FBFF34F8F064AC1\n:108A5000904202D0043A904202D1002283F8D820FA\n:108A6000704700BF78B300205070024042DF70476B\n:108A700043DF704744DF704712DF704710B5134B78\n:108A8000134A5B68C3F3080373B9EFF310835BB950\n:108A900010494B681B0607D58024C1F8844092F822\n:108AA000D8307BB14C60F8E792F8D83033B101464A\n:108AB000BDE810400848012201F094B8BDE810401C\n:108AC000FFF7BCBFFFF7BAFF4C6010BD00ED00E040\n:108AD00078B3002000E100E07D8A0F000D4B1822E2\n:108AE00002FB0033598A1A8A521A998A92B28A4230\n:108AF00028BF0A46D9681423434303F1804303F592\n:108B00001C33C3F80016C3F80426034B03EB8000A4\n:108B1000FFF7B4BF78B300200470024007B54FF4EC\n:108B2000405300205A68084B9A420AD18DF807003A\n:108B30000DF10700FFF7A0FF9DF80700003818BFF0\n:108B4000012003B05DF804FBDBE5B15107B5FFF789\n:108B5000E5FF58B1002301A80193FFF78BFF0198AF\n:108B6000003818BF012003B05DF804FB4FF08043CC\n:108B7000D3F80C0400F00110A0F101135842584141\n:108B8000F1E70000074BD3F8C024D10309D406490C\n:108B90000648D1F8C010C3F8A017C3F8A427FFF700\n:108BA0006DBF70470070024078B3002048700240EB\n:108BB0000828F0B402D1F0BCFFF7E4BF0F4D104A13\n:108BC000182141436E1800F59473695852F82340F8\n:108BD000F788B388DB1B9BB2A4B2A34228BF23460D\n:108BE000142404FB0022C2F80017C2F80437054B16\n:108BF000F0BC03EB8000FFF741BF00BF78B300205B\n:108C0000007002402870024070470000014B802233\n:108C10005A60704700E100E0024B8022C3F88420D4\n:108C2000704700BF00E100E0074BD3F80014D3F811\n:108C300000240A43C3F800240022C3F858214FF44B\n:108C40008002C3F8042370470070024070B5887832\n:108C5000404D00F07F0318220C26C4095A4306FB3E\n:108C600004228E882A44C6F30A061681CA7802F0C6\n:108C70000302012A29D00121374A01FA03F5D4B9A8\n:108C800003F10C06B140C2F80413D2F8141503F531\n:108C900094732943C2F8141542F823402E4BC3F8AD\n:108CA000180540F48070C3F80C05BFF36F8FBFF355\n:108CB0004F8F012014E002339940C2F80413D2F818\n:108CC00010352B43C2F81035E8E7082B09D04FF0D8\n:108CD000E023D3F8F00D10F0010001D000BE002019\n:108CE00070BD1D4BDCB9B5F8D42012B18022C3F899\n:108CF0001C250022C3F85021D3F8002312F40012DF\n:108D000008BFC3F85421144B4FF44012C3F8042396\n:108D1000D3F8142542F48072C3F81425BEE700226C\n:108D2000C3F82C21B5F8C82012B18022C3F81C2545\n:108D3000094BD3F8002312F4001208BFC3F85421E2\n:108D4000064AC3F80423D3F8102542F48072C3F80E\n:108D50001025A3E778B3002000700240000820002F\n:108D60001D4B2DE9F041802201241C4DDFF8788055\n:108D7000C3F88420274604F10C03A21C07FA02F270\n:108D800007FA03F31343C5F80833A30003F1804344\n:108D900003F51C330026182202FB04805E60314676\n:108DA0009E620134FBF7F8FA082C4FF01802E2D16A\n:108DB0000B4BC5F808330B48C5F81C6531466E628D\n:108DC000AE64FBF7E9FA044BC5F814758022C5F8C8\n:108DD00010755A60BDE8F08100E100E000700240CB\n:108DE0000008300038B4002078B30020F7B51F46E3\n:108DF00001F07F0018231F4CCD090E4643430C2180\n:108E000001FB053104EB010C62500022ACF8047048\n:108E1000ACF8062018B1F5B1FFF760FE18E017BBFB\n:108E2000154BD3F88034C3F3C0139D421BD01348B5\n:108E3000FFF724FE124B5B68C3F30803003B18BF27\n:108E4000012300933A463B463146384600F0B5FED2\n:108E5000012003B0F0BD1C44A37A002BF8D0A5720A\n:108E6000FFF7A6FEF4E7002DD6D10648FFF706FE71\n:108E7000EEE700BF78B3002000700240507002405F\n:108E800000ED00E04C70024011F07F0008B507D102\n:108E90000D4B01225A65BFF36F8FBFF34F8F08BD93\n:108EA0000828F8D0084B41F48072C909C3F8182586\n:108EB000F1D1064B182202FB00339A7A002AEAD03D\n:108EC0009972FFF775FEE6E70070024078B3002064\n:108ED00011F0770F12D00A4B41F48072C3F80C15D1\n:108EE000C3F80C25CA09C3F8181504BF01F594711D\n:108EF00043F82120BFF36F8FBFF34F8F704700BF40\n:108F000000700240174B0122002110B5C3F8142550\n:108F1000C3F810250A468B0003F1804303F51C3388\n:108F2000013108295A609A62F5D10E4B0E4C5A62F3\n:108F30009A64C3F85821D3F80014D3F800240A43E4\n:108F4000C3F80024D3F80023C3F80823074AC3F862\n:108F500004230021DC222046FBF71EFA4023A382D3\n:108F6000238110BD0070024078B300200514C001B9\n:108F70002DE9F04FB24BB34AD3F80013002385B06C\n:108F80001C4601201D4621FA03F6F6070BD552F8C0\n:108F9000236046B100FA03F6344342F82350BFF38E\n:108FA0006F8FBFF34F8F0133192BECD1E20706D53A\n:108FB000FFF7A8FF00210122084600F0D5FD14F4B8\n:108FC000006FA14D08D09E4BD3F8A8369BB2A5F8F0\n:108FD000D230012385F8D730A30221D5984ED6F898\n:108FE000143513F4807302D0FFF7CCFD0123D6F8BB\n:108FF0001025D70540F1188195F8D7305BB1B5F849\n:10900000D2200023012185F8D73092B20091184672\n:10901000882100F0D2FD01220321002000F094FD00\n:10902000660228D5864BD3F8006406F4E062F005AA\n:10903000C3F8002406D50122C3F82C250421002002\n:1090400000F082FD71050FD57D4B0122C3F8082584\n:109050009A65D3F8002312F4001208BFC3F8542114\n:109060004FF40012C3F80423B20504D501220521F0\n:10907000002000F069FD23022BD5714BD3F880143A\n:10908000C9B28DF80810D3F88424D2B28DF8092023\n:10909000D3F888048DF80A00D3F88C048DF80B00FF\n:1090A000D3F890048DF80C00D3F894048DF80D00DB\n:1090B000D3F898048DF80E00D3F89C348DF80F3057\n:1090C0004F0601D1052A04D0012202A9002000F098\n:1090D0005EFD5E4B23405BB195F8D830002B40F02D\n:1090E000AB804FF0E023D3F8F03DDE0700D500BEA3\n:1090F000DFF85481DFF84891DFF858B14746002681\n:109100004FF0140A06F10C0324FA03F3D807F1B266\n:1091100022D50AFB0693082ED3F808273B6853FA9A\n:1091200082F33B604FF0180303FB0653D2B2D8889A\n:1091300012FA80F080B2D88000F08E803889904298\n:1091400040F08A80DB88BA889BB29A4240F28480E1\n:1091500011B95846FFF792FC0136092E07F118079E\n:10916000D0D13B4B2340002B5BD0354BD3F86C94D4\n:10917000C3F86C94BFF36F8FBFF34F8F14F4806408\n:1091800007D0D3F88044D3F880341906C4F3C01450\n:1091900070D54FF0000A2C4F00264FF0180B29FA1B\n:1091A00006F3DA07F0B201D4CEB9C4B1244B1422CD\n:1091B00002FB0633FA68D3F8083652FA83F2FA60F3\n:1091C0000BFB0652518A89B251FA83F39BB2538248\n:1091D000538A398A9BB299424FD9FFF77FFC0136F7\n:1091E000082E07F11807DAD100241826012704F108\n:1091F000100329FA03F3DB07E0B203D464B9BAF130\n:10920000000F09D006FB0452B8F80410D3889BB2B3\n:1092100099423DD9FFF7CCFC0134082C08F118081D\n:10922000E5D105B0BDE8F08F002B7FF4F4AE4FF42C\n:109230000013C6F80833EEE6002385F8D83057E768\n:10924000007002400071024078B30020FCFB1F0058\n:10925000000400014C700240182303FB0653DA8817\n:10926000BA80DA8801230093002392B2184600F0F6\n:10927000A4FC71E74FF0010A8DE7528A01230093A5\n:10928000002340F0800192B2184600F096FCA6E759\n:109290009772C1E7012813B5044600F0C380022885\n:1092A00059D0002855D1784BD3F80025002A50D149\n:1092B0004FF48002C3F808234FF40062C3F800247F\n:1092C000BFF36F8FBFF34F8FFFF7A8FB60B16F4BFA\n:1092D000D3F8001C032269BB49F27531C3F8001CA6\n:1092E000C3F8142DC3F8001C4FF08053D3F830316D\n:1092F000082B0CD1654BD3F8001CC022E9B949F208\n:109300007531C3F8001CC3F8142CC3F8001C5E4B65\n:109310000124C3F80045BFF36F8FBFF34F8FFFF7F2\n:1093200015FCB0B9FFF7FAFB50B102B0BDE8104030\n:10933000FFF79CBBC3F8142DD6E7C3F8142CE6E75F\n:109340004FF08043C3F80001D3F800210192019A45\n:109350001C6002B010BD4C4CD4F804351BB1FFF7B3\n:10936000F5FB0028F5D1D4F800341B05FBD54FF4EC\n:109370000063C4F80034BFF36F8FBFF34F8F4FF01B\n:109380008053D3F83031082B0CD1404BD3F8001C5C\n:1093900000293FD149F27532C3F8002CC3F8141CE0\n:1093A000C3F8002CFFF73AFB58B1384BD3F8001C38\n:1093B000A1BB49F27532C3F8002CC3F8141DC3F8E1\n:1093C000002C4FF08053D3F83031082B2E4B0AD1AC\n:1093D00040F2E372C3F800284022C3F80428BFF328\n:1093E0006F8FBFF34F8F80220121C3F81C25C3F874\n:1093F0000413274BC3F884215A60FFF7A7FB00280A\n:10940000FBD0214B0122C3F80425BFF36F8FBFF3BC\n:109410004F8F9EE70022C3F8142CC3E70022C3F845\n:10942000142DCEE7184BD3F80025002A91D0002246\n:10943000C3F80425BFF36F8FBFF34F8F144980200B\n:10944000C1F88400D3F80013C3F80813C3F800254B\n:10945000BFF36F8FBFF34F8FFFF760FB78B1FFF75C\n:1094600007FB0C4B5A68C2F30802003A18BF0122EE\n:109470000221002002B0BDE8104000F065BB4FF0B3\n:1094800080435C60EDE700BF0070024000E00640F2\n:1094900000E100E000ED00E00A44034690B288429B\n:1094A00002D39A89824202D25A89104480B270470C\n:1094B00082888A4210B504D884898B1A9BB29C4258\n:1094C00003D243891A44891A8BB2038210BD9308D0\n:1094D00013B501EB8303044699420BD112F003024A\n:1094E00006D0002301A8019301F040FF019B2360F7\n:1094F00002B010BD51F8040B2060EDE72DE9F043F8\n:1095000085B01446BDF83050AB4238BF4289A3EB5A\n:1095100005091FFA89F938BFA9EB0209828838BF0B\n:109520001FFA89F94A4588460746194605D2FFF7CA\n:10953000BFFF058AB0F80490ADB2B9F1000F1FD09B\n:10954000A14528BFA146BC88AC421DD9FA889DF828\n:1095500034003968661BA9EB04042C44B3B214FB35\n:1095600002F416FB02F60128B6B2A4B202FB051102\n:1095700016D099450BD802FB09F2404601F0F6FEE1\n:10958000484605B0BDE8F0832D1BADB2DCE732469E\n:10959000404601F0EBFE3968224608EB0600EDE795\n:1095A000994506D819FB02F292B24046FFF78FFFA9\n:1095B000E6E726F00305ADB22A4640460191FFF7E3\n:1095C00086FF16F0030628D001990D44C6F1040168\n:1095D00089B2A1424FF0000328BF2146641A0393C9\n:1095E00003ABA4B2A8191A4685420CD13B68013ED0\n:1095F000164419448B420BD1039BC8F80030002C51\n:10960000BED02246D1E715F801CB03F801CBEBE73A\n:1096100013F8012B06F8012FECE73968EFE713B5D3\n:10962000930800EB8303984209D112F0030204D09F\n:109630000B68019301A901F099FE02B010BD0C68FE\n:1096400040F8044BEFE770B59A42A2EB03041D46C5\n:1096500038BF4389A4B238BFE41A838838BFA4B2A4\n:10966000A3420E46114602D2FFF722FF848874B14E\n:109670008288AA4208D9C2880168304602FB0511D7\n:1096800001F074FE012070BDAD1AADB2F1E72046C5\n:10969000F9E72DE9F0430746B0F80E908588048A73\n:1096A0001646C288007A85B01FFA89F9A4B288BB31\n:1096B000A145A9EB040038BF7C8980B23CBF001BE8\n:1096C00080B2281A80B2864228BF06464C46AC4279\n:1096D00028D2A5EB0408751B386825441FFA88FCBE\n:1096E00015FB02F518FB02F8012B1FFA88F8ADB242\n:1096F00002FB040022D0664517D8724301F036FE03\n:10970000324649463846FFF7C7FEF881304605B075\n:10971000BDE8F083AE4221BF761B02FB0611A146D5\n:109720002E46D3E7641BA4B2D1E74246009101F074\n:109730001DFE009938682A464144DFE7664505D892\n:1097400016FB02F292B2FFF76AFFD9E728F0030492\n:10975000A4B22246CDE90001FFF761FF18F003082B\n:10976000019929D0C8F104039BB2AB4200980A6862\n:10977000039228BF2B46013CED1A0DF10C0C20443E\n:10978000ADB244466246013C1CF801EB00F801EF23\n:1097900014F0FF04F7D13868904408EB0304421E2C\n:1097A000A04504D11844002DAAD02A46CBE718F8CA\n:1097B00001CB02F801CFF3E73868F4E7B2F5004FC8\n:1097C00010D882805200C38092B29DF8003003729C\n:1097D000531E838152420023C38101604281038270\n:1097E0000120704700207047C189028A89B292B275\n:1097F0009142A1EB020338BF428980889BB23CBFF3\n:109800009B1A9BB2984228BF18467047C289038AA8\n:1098100092B29BB2D31A58425841704710B5C189D1\n:10982000028A848889B292B2914238BF4089A1EB02\n:1098300002039BB23CBF1B1A9BB2E01A80B210BD60\n:1098400038B5C289038A04469BB292B2FFF7FBFE89\n:10985000218A054682B289B22046FFF71DFE20828A\n:10986000284638BD73B5C389058A0026ADB20446C3\n:10987000CDE900569BB2FFF741FE218A054602461C\n:1098800089B22046FFF708FE2082284602B070BD4C\n:1098900038B5C589028AADB292B2AA42A5EB0203DD\n:1098A00088BF42899BB288BF9B1A828888BF9BB2BF\n:1098B0009A42044614D1007A90B938BD9B1A9BB2E3\n:1098C0009342FBD2E288206802FB030001F04EFDC8\n:1098D000012229462046FFF7DFFDE0810120ECE769\n:1098E0002B46EDE712B10023FFF7D3BE10467047B9\n:1098F0000023C381038283885B009BB25A1E5B42B4\n:10990000828143810120704701720120704700006D\n:109910000B4B63B10B4B1B78834206D90A4B1B6878\n:1099200000EB400003EBC0007047C01AC0B2012832\n:1099300003D8064B00EB4000F4E70020704700BF5F\n:109940000000000058B4002054B4002004BD0F00F3\n:1099500070B5104E054600242046FFF7D9FF436836\n:109960002846984733780134E4B20133A342F3DA4E\n:10997000372200210848FAF70FFD1022FF2107487F\n:10998000FAF70AFDBDE8704005481222FF21FAF7F8\n:1099900003BD00BF58B4002059B400205CB40020BF\n:1099A0006CB4002037B50C460546C868019200F03B\n:1099B000A5FDE368019A0021284603B0BDE83040C8\n:1099C000184773B5054614463AB90378012B04D1FC\n:1099D00010460191FFF720F90199281DFFF758FF64\n:1099E00006462CB92B78012B02D12046FFF70EF941\n:1099F00036B94FF0E023D3F8F03DDB0700D500BEC9\n:109A000002B070BD024B5878003818BF0120704773\n:109A100059B40020024B1878C0F38000704700BF93\n:109A200059B40020014B1878704700BF90B4002053\n:109A3000F8B5164E3178054629BB154C1548372226\n:109A4000FAF7AAFC201DFFF753FF134B1C60134BC2\n:109A500023B11348AFF30080124B1860104F00245D\n:109A60002046FFF755FF036898473B780134E4B27E\n:109A70000133A342F4DA2846FFF7C6F82846FFF779\n:109A8000C5F8012333700120F8BD00BF90B4002059\n:109A9000A486002059B4002094B4002000000000E7\n:109AA00058B4002054B400201FB54378023B0A4646\n:109AB000032B12D8DFE803F0022A1921204B197872\n:109AC0006FF300011970197800246FF341011970C8\n:109AD0005C70197864F3820119701A4B014618689A\n:109AE00004B0BDE81040FFF76CBF154B1978C907EB\n:109AF00023D5197841F00401EEE711490B78DC0712\n:109B00001BD50B786FF382030B70E6E70C490B78DB\n:109B10005B0712D50B786FF382030B700023CDE93E\n:109B20000133039303788DF8043005238DF8053055\n:109B3000044B01A91868FFF744FF04B010BD00BF33\n:109B400059B4002094B400201FB50023CDE901339F\n:109B50008DF804008DF8051001A811460393FFF756\n:109B6000A3FF05B05DF804FB1FB50023CDE9013369\n:109B700003938DF8040001238DF8081001A8114605\n:109B80008DF80530FFF790FF05B05DF804FB1FB5B9\n:109B9000144600230822CDE9013303938DF8040015\n:109BA00006230DEB02008DF8053001F0DFFB2146A6\n:109BB00001A8FFF779FF04B010BD1FB50024CDE95F\n:109BC00001448DF8040007208DF805008DF8081079\n:109BD00001A89DF8181003928DF80930FFF764FF73\n:109BE00004B010BD1FB54FF40063CDE901300391FF\n:109BF00001A81146FFF758FF05B05DF804FB00000F\n:109C000038B58B7803F07F03082B05460C4608D93E\n:109C10004FF0E023D3F8F03DDB0700D500BE002075\n:109C200038BD064B2046997801F00DFB0028EFD097\n:109C300021462846BDE83840FFF708B859B400204F\n:109C40002DE9F047DDE9085681460C4690469A46D4\n:109C50000027B84501DC01200EE06378052B04D114\n:109C6000E37803F0030353450AD04FF0E023D3F821\n:109C7000F03DDA0702D40020BDE8F08700BEFAE725\n:109C800021464846FFF7BCFF38B94FF0E023D3F830\n:109C9000F03DDB07EFD500BEEEE7A378DA0914BF8D\n:109CA00033702B70237801371C44D2E70B4B01F043\n:109CB0007F0203EB420303EBD1112031487910F00E\n:109CC000010008D14B795B0706D44B7943F00403BC\n:109CD0004B71012070470020704700BF59B400202D\n:109CE0000B4B01F07F0203EB420303EBD111203158\n:109CF0004B7913F0010209D14B79C3F380005B0764\n:109D000005D54B7962F382034B7170470020704791\n:109D100059B4002070B5164D01F07F0605EB4605DD\n:109D200005EBD11420346579ED0709D54FF0E02318\n:109D3000D3F8F03DDA0701D4002070BD00BEFBE788\n:109D4000657945F001056571FFF750F80028F4D1F9\n:109D5000637960F300036371637960F38203637175\n:109D60004FF0E023D3F8F03DDB07E5D500BEE4E794\n:109D700059B40020054B01F07F0203EB420303EBD3\n:109D8000D11191F8250000F00100704759B400206E\n:109D900010B50B4B01F07F0203EB420303EBD11430\n:109DA000203463799B0709D4FFF76EF8637943F099\n:109DB00002036371637943F00103637110BD00BF57\n:109DC00059B4002010B50B4B01F07F0203EB4203A6\n:109DD00003EBD114203463799B0709D5FFF778F89A\n:109DE00063796FF34103637163796FF30003637108\n:109DF00010BD00BF59B40020054B01F07F0203EBFA\n:109E0000420303EBD11191F82500C0F340007047E5\n:109E100059B400202DE9F04F87B001F012FA002864\n:109E200000F09182AF4B1D682B78012B02D10020EE\n:109E3000FEF7F2FE03A9281DFFF702FD2B78012B88\n:109E4000044602D10020FEF7E1FE002C00F07B82E8\n:109E50009DF80D30013B072B00F2B382DFE813F0D1\n:109E600008001300A8027E028D021F004A02AA0207\n:109E70009DF80C00FFF76CFD00F038FB9A4B9DF845\n:109E800010209A70CEE79DF80C00FFF761FD00F0FE\n:109E90002DFB964B002BC5D0FEF78EFBC2E7924CF4\n:109EA0009DF80C50237843F00103237094F825307B\n:109EB0006FF3000384F8253094F825306FF38203A4\n:109EC00084F8253094F826306FF3000384F82630A8\n:109ED00094F826306FF3820384F82630002000F0D7\n:109EE0000DFB9DF8106006F06002602A11D14FF062\n:109EF000E023D3F8F03DDC0700D500BE9DF80C0050\n:109F00000021FEF7C1FF9DF80C008021FEF7BCFF89\n:109F100088E7402A0DD176480028EFD000F0EEFA0D\n:109F200004AA00212846AFF3008000287FF47AAF0E\n:109F3000E4E706F01F06012E00F07181022E00F00A\n:109F40009881002ED3D1202A0FD19DF814300F2BE9\n:109F5000D4D82344D878FFF7DBFC01460028CDD0C5\n:109F600004AA2846FFF71EFDDFE7002ABFD19DF8AF\n:109F70001130092BBBD801A252F823F009A20F001F\n:109F8000F7A10F00EF9E0F00E3A10F00EF9E0F005F\n:109F9000A59F0F0021A10F00EF9E0F00BF9F0F0094\n:109FA000D59F0F0004A800F0AFFA9DF812102846C4\n:109FB000FEF73AFE237843F00203237032E763781A\n:109FC0008DF80A3001230DF10A0204A9284600F099\n:109FD00059FA27E79DF812906378994537D063784E\n:109FE0003BB12846FEF7BCFEA6782846FFF7B0FC3A\n:109FF000A670B9F1000F2AD009F1FF30C0B2FEF708\n:10A00000E9F910B14378022B08D04FF0E023D3F8E0\n:10A01000F03DDF077FF56BAF00BE68E7C379C3F3A0\n:10A020008012C3F340131B0143EA4213227822F04B\n:10A030003002134323704388C31800F109060093CC\n:10A04000009BB3420AD82B4B0BB1FEF7B2FA84F84F\n:10A05000019004A9284600F003FAE3E673780B2B7D\n:10A0600003BF337896F80380F6184FF00108737831\n:10A07000042BCAD1009B9A1B93B201934FF0000BA3\n:10A080001D4B1B785FFA8BF70133BB42BDDB3846B3\n:10A09000FFF73EFC31468368019A8246284698477E\n:10A0A0000828024639D9019B834236D3B8F1010F03\n:10A0B00006D1DAF8083011498B4208BF4FF0020888\n:10A0C0000021CBB298451DD83B4631460C48019241\n:10A0D00001F0E9F8084B019A1B7801339F421644BE\n:10A0E000AEDD92E794B4002059B40020B9850F008A\n:10A0F00000000000B3850F0058B40020A9A70F008E\n:10A100006CB40020B078034454FA83F30131D8785A\n:10A11000FF287FF47AAFDF70D3E70BF1010BAFE7D5\n:10A12000BDF81200030A5A1EC0B20E2A3FF6E6AE70\n:10A1300001A151F822F000BF75A10F009FA10F00EF\n:10A14000C1A10F00FD9E0F00FD9E0F00D5A10F00C5\n:10A150009FA10F00FD9E0F00FD9E0F00FD9E0F00B2\n:10A16000FD9E0F00FD9E0F00FD9E0F00FD9E0F0047\n:10A1700087A10F00FEF72AF91223024604A92846F8\n:10A1800000F080F9D1E6934B002B3FF4B7AEAFF36C\n:10A190000080024600283FF4AAAE4388EEE7022B77\n:10A1A00007D1FEF717F900283FF4A1AE4388024615\n:10A1B000E4E7894B002B3FF4A1AEAFF30080F2E758\n:10A1C000BDF81410FEF762F9024600283FF496AE7F\n:10A1D0000378D3E7814B002B3FF490AEAFF30080C0\n:10A1E000F2E7BDF81230012B7FF488AE237843F0FC\n:10A1F000080323702DE7BDF81230012B7FF47EAEEB\n:10A2000023786FF3C303F4E72378C3F340129B086A\n:10A2100003F002031343ADF80A300223D3E69DF89E\n:10A2200014300F2B3FF66AAE2344D878FFF770FB4B\n:10A23000014600283FF462AE04AA2846FFF7B2FBAD\n:10A2400000287FF4EFAD9DF8103013F060047FF428\n:10A2500055AE9DF811300A3B012B3FF64FAE00F092\n:10A260004DF99DF811300A2B7FF4F3AE8DF80A40BA\n:10A27000A8E69DF8141001F07F03082B3FF637AED7\n:10A2800004EB430303EBD113D87CFFF741FB0746F4\n:10A290002AB100283FF432AE04AA014661E69DF8D7\n:10A2A000113003F0FD02012A08D0002B7FF41FAE0D\n:10A2B0002846FFF7A1FDADF80A00AEE7BDF8122071\n:10A2C00022B9012B284612D1FFF77CFD002F3FF465\n:10A2D000A9AD04AA39462846FFF764FB002000F028\n:10A2E0000DF994F82630DE073FF59CADB1E6FFF797\n:10A2F0004FFDEBE79DF81010394B01F07F0403EBA5\n:10A30000440303EBD11393F825006FF3000083F8A7\n:10A31000250093F825006FF3820083F825003CB9EF\n:10A32000059B9DF811209DF80C0000F0FBF879E5E5\n:10A33000D87CFFF7EDFA48B94FF0E023D3F8F03DB1\n:10A34000D80700D500BE07B0BDE8F08F0469059BB3\n:10A350009DF811209DF80C00A04763E5204B1A786A\n:10A36000D1077FF55FAD1F4A002A3FF45BAD187837\n:10A37000C0F3C000AFF3008054E5194B1B78DA0737\n:10A380007FF550AD184B002B3FF44CADAFF3008080\n:10A3900048E5FFF7BDFA436913B19DF80C009847F3\n:10A3A0000134124B1B78E0B201338342F1DA39E514\n:10A3B0000024F6E7049B002B3FF434AD0598984742\n:10A3C00030E54FF0E023D3F8F03DDB077FF52AAD11\n:10A3D00000BE27E5000000000000000000000000B3\n:10A3E00059B40020000000000000000058B4002014\n:10A3F00037B514490446CA89888991F90050831AEF\n:10A400009BB2402B28BF4023002D10DA904214D07D\n:10A410001A4689680C48019300F0A8FF0A4A019B7C\n:10A420008021204603B0BDE83040FFF773BC904266\n:10A430004FF0000103D10022F3E78021FBE7024A3D\n:10A44000EFE700BF58B500206CB5002011F0800F79\n:10A450004FF000031A460CBF80211946FFF75ABC83\n:10A4600030B4074C05460B4608684968224603C2CB\n:10A470000022C4E902222846197830BCFFF7E6BF63\n:10A4800058B50020F8B5184E0C46054608684968CE\n:10A49000B260374603C70021F181E1888B4228BFB3\n:10A4A0000B46B381E18889B153B14AB94FF0E0233B\n:10A4B000D3F8F03DDA0701D40020F8BD00BEFBE779\n:10A4C0002846FFF795FF30B10120F6E721782846AE\n:10A4D000FFF7BCFFF7E74FF0E023D3F8F03DDB07D1\n:10A4E000EAD500BEE9E700BF58B5002002481422B3\n:10A4F0000021F9F751BF00BF58B50020014B18618A\n:10A50000704700BF58B5002010B50246044C0068E3\n:10A510005168234603C30023C4E9023310BD00BFC2\n:10A5200058B5002070B52D4C1E462378C909B1EBF3\n:10A53000D31F054618D04EB14FF0E023D3F8F03DBD\n:10A54000DA0701D4002070BD00BEFBE7244B13B135\n:10A550002146AFF3008023690BB90120F3E71F4ABE\n:10A56000022128469847F8E794F90030002B06DBD3\n:10A57000A0680028E6D01B49324600F0F7FEA2682A\n:10A58000E38932443344A260E2889BB29A42E38179\n:10A5900001D03F2E1ED823696BB921782846FFF7DA\n:10A5A00055FF0028D9D14FF0E023D3F8F03DDB0769\n:10A5B000C8D500BEC7E70121084A2846984701468A\n:10A5C0000028EAD12846FEF75FFC80212846FEF7E6\n:10A5D0005BFCC2E72846FFF70BFFE2E758B5002017\n:10A5E000000000006CB5002070B500F110050446B5\n:10A5F0002846FFF713F93F2817D9E1780020FFF725\n:10A6000055FB90B12846FFF709F93F28E17807D9B3\n:10A6100004F638024023BDE870400020FFF77ABB03\n:10A62000BDE870400020FFF75BBB70BD08B5044B70\n:10A6300040F6B80202FB00301030FFF7D5F808BD35\n:10A64000ACB5002070B540F6B804074E444304F1A1\n:10A65000100092B23044FFF705F905463019FFF7B4\n:10A66000C3FF284670BD00BFACB500202DE9F04106\n:10A670000446FFF7C7F910B90020BDE8F081FFF7E5\n:10A68000C9F906460028F7D140F6B801164D4C43EB\n:10A6900004F12408A8444046FFF7A6F80028EBD0B0\n:10A6A0002F193046B978FFF701FB0028E4D004F6F3\n:10A6B00078042544294640224046FFF7D3F8B9786C\n:10A6C000044668B103462A463046FFF723FB48B9E3\n:10A6D0004FF0E023D3F8F03DDB07CDD500BECCE74B\n:10A6E000FFF7FEFA2046C8E7ACB5002070B50B4C6A\n:10A6F00040F6B80303FB0044243492B205462046DA\n:10A70000FFF7F0F806462046FFF76EF83F2802D91B\n:10A710002846FFF7ABFF304670BD00BFACB5002048\n:10A7200037B5144C40F6B80200212046F9F734FE44\n:10A73000FF234FF4424201256371E2800023082287\n:10A7400063812273009304F138012B464FF4806239\n:10A7500004F110002581FFF731F800952B464FF4E6\n:10A76000806204F5876104F12400FFF727F803B045\n:10A7700030BD00BFACB5002010B50A4C0021052249\n:10A780002046F9F709FE04F110002434FFF7B0F871\n:10A790002046FFF7ADF820460121BDE81040FFF745\n:10A7A000B3B800BFACB50020F7B54B79022B064615\n:10A7B00003D00025284603B0F0BD8B79022BF8D1D9\n:10A7C000204FBB787BBB8B783B700C7809250C4401\n:10A7D00003E023781D44ADB21C446378242B1BD1C5\n:10A7E0009542F6D96378042B12D163790A2B0FD1E5\n:10A7F000154B277801930133009302231A46E11980\n:10A800003046FFF71DFA70B10E3517FA85F5ADB277\n:10A810000C48FFF7E9FECDE7052BE3D12146304692\n:10A82000FFF7EEF938B94FF0E023D3F8F03DDB073E\n:10A83000BFD500BEBDE7A3787B7023781D44ADB2C1\n:10A840001C44CFE7ACB50020AEB5002070B50B4678\n:10A850001146127802F06002202A45D1234E8A88E0\n:10A860003478944240D14A78203A032A3CD8DFE831\n:10A8700002F00213162F2BB91D4A0723FFF702FE21\n:10A88000012070BD022BFBD11A4B002BF8D01849C8\n:10A890000020AFF30080F3E7002BF1D1ECE713B910\n:10A8A000FFF7DEFDECE7022BEAD14C881248347149\n:10A8B00004F0010585F00101FFF726F80F4B002B8E\n:10A8C000DED0C4F3400229460020AFF30080D7E772\n:10A8D000002BE5D0022BD3D1094B002BD0D04988D7\n:10A8E0000020AFF30080CBE70020CAE7ACB5002022\n:10A8F000B2B5002000000000D0B50020000000002C\n:10A90000000000002DE9F347374D1C46EB788B42E1\n:10A9100007460E4607D0AB788B4258D1AB78B3428E\n:10A9200032D001245CE0A2B205F6380105F1100036\n:10A93000FEF7D8FF2D4B2BB92D4BEBB92A48FFF76B\n:10A9400053FEEBE76B79FF2BF6D005F638094FF095\n:10A95000000805F1100AA045EED019F8013B6A790C\n:10A960009A4206D15046FEF751FF10B96979AFF30C\n:10A97000008008F10108EEE71E48FEF747FF0028B7\n:10A98000DCD1FDF789F9D9E71B4B13B10020AFF3F8\n:10A9900000800020FFF76AFE0028C2D11748FEF7AA\n:10A9A00023FF0028BDD1002CBBD014F03F03B8D149\n:10A9B000A97801933846FFF779F9019B04460028EE\n:10A9C000AFD0A9781A463846FFF7A4F908E04FF04F\n:10A9D000E023D3F8F04D14F0010401D000BE0024B0\n:10A9E000204602B0BDE8F087ACB5002000000000B2\n:10A9F000997C0F00BCB5002000000000D0B50020FD\n:10AA000030B4104B02249A6B83F82C10996883F8A9\n:10AA1000304093F83C408A1A9A6224B942F2050504\n:10AA20009D8783F83E4051B14AB11A7BD20930BCB0\n:10AA300014BF93F82E1093F82F10FFF7A9B930BC6C\n:10AA4000704700BF64CE002038B5154B154C054645\n:10AA500073B1607BAFF3008050B942F2077384F8A2\n:10AA60003E00A38728460121BDE83840FFF7C8BF54\n:10AA7000A26BA36894F82F109B1AB3F5805F28BFD0\n:10AA80004FF48053084A9BB22846FFF743F930B988\n:10AA90004FF0E023D3F8F03DDB0700D500BE38BD12\n:10AAA0000000000064CE002064BE002073B5234C7B\n:10AAB000E28AA36852BA92B2054612B1B3FBF2F22F\n:10AAC00092B2A06BD4F81110B0FBF2F61B1AB3F5DA\n:10AAD000805F28BF4FF4805309BA009302FB16022F\n:10AAE000174B607B3144FDF7DBFB031E0CDA43F2AE\n:10AAF0000333A38701210023284684F83E3002B0A7\n:10AB0000BDE87040FFF77CBF94F82E1006D100938B\n:10AB10001A462846FFF751F802B070BD084A9BB2AA\n:10AB20002846FFF7F7F80028F6D14FF0E023D3F8D6\n:10AB3000F03DDB07F0D500BEEEE700BF64CE00209D\n:10AB400064BE0020C28A836852BA92B223B9002A36\n:10AB50000CBF002002207047C17B282904D1017B53\n:10AB6000C90906D1022070472A2902D1017BC909EF\n:10AB7000F8D122B1934234BF022000207047012057\n:10AB800070470000044880F83C1080F83D2080F8B1\n:10AB90003E300120704700BF64CE002002484022B2\n:10ABA0000021F9F7F9BB00BF64CE00200248402223\n:10ABB0000021F9F7F1BB00BF64CE002073B54B79DB\n:10ABC000082B054602D0002002B070BD8B79062B01\n:10ABD000F9D1CB79502BF6D1162A07D84FF0E023C4\n:10ABE000D3F8F03DD907EED500BEECE7164C8B78D4\n:10ABF00084F82D3004F12E030E78019304F12F0315\n:10AC0000009302231A463144FFF71AF838B94FF07F\n:10AC1000E023D3F8F03DDA07D5D500BED4E7002312\n:10AC200084F8303094F82F101F2322462846FFF76F\n:10AC300071F830B94FF0E023D3F8F03DDB0700D5D1\n:10AC400000BE1720C0E700BF64CE00207FB50646D7\n:10AC50001546A1B9137803F07F02022A48D16C7817\n:10AC6000012C45D16A88002A42D1AB883C4D95F829\n:10AC70003020042ADBB204D11946FFF789F80120FD\n:10AC80001AE095F82E10994218D1022AF7D1AA6B32\n:10AC9000AB689B1AAB62032385F8303005F12002C4\n:10ACA0000D23FFF737F80028E9D14FF0E023D3F860\n:10ACB000F03DDB0752D500BE04B070BD95F82F10F3\n:10ACC0009942DCD1002ADAD10191FFF753F80199BA\n:10ACD0000028D4D13046FFF78FF80028CFD10023C9\n:10ACE00085F830301E4A95F82F101F233046D8E7DC\n:10ACF00003F06003202B31D16B78FE2B13D0FF2B98\n:10AD00002CD16B8853BBE9888AB23ABB144B3046CE\n:10AD100099872946C3E90D2283F8302083F83E2025\n:10AD2000FFF79EFBABE76B88C3B9EB88012B15D10E\n:10AD30008DF80F300B4B1BB1AFF300808DF80F0077\n:10AD40009DF80F3053B1013B8DF80F300DF10F021C\n:10AD5000012329463046FFF795FB90E70020ABE73B\n:10AD600064CE0020000000002DE9F041AB4C94F8C7\n:10AD70003070012F90B005461E4600F0A181032FD0\n:10AD800000F00D82002F41D194F82F308B4201D07A\n:10AD9000012013E01F2E03D12268A14B9A4210D04C\n:10ADA00094F82E100423284684F83030FEF7F0FF84\n:10ADB00094F82F102846FEF7EBFF002010B0BDE8F6\n:10ADC000F081984B23626368E67BD4F8088084F8AE\n:10ADD0002C70C4E90937012384F8303006F0FD03F4\n:10ADE000282BC4E90D872BD12046FFF7ABFE014687\n:10ADF00018B12846FFF704FE08E0B8F1000F56D05E\n:10AE0000282E40F0A8812846FFF750FE94F83030F5\n:10AE1000022BBDD194F82E102846FEF7EDFF002836\n:10AE2000B6D1A368A26B94F82E10934240F2E08151\n:10AE3000207BC00900F0DC812846FEF7A9FFA7E7C8\n:10AE4000B8F1000F17D0237BDB0914D1B8F5805F70\n:10AE500001D90121CDE7744A1FFA88F32846FEF78D\n:10AE600059FF0028D2D14FF0E023D3F8F03DDA07A4\n:10AE7000A3D500BEA2E7252E677B08D8192E1AD8C5\n:10AE8000032E00F0F780122E00F09F8096B394F806\n:10AE90003C30002BDDD1A38E634A6449607BFDF713\n:10AEA000EDF9031ED5DB60D1A368002BD1D10223BD\n:10AEB00084F83030AAE71A3E0B2EE8D801A353F8E5\n:10AEC00026F000BF35B00F0015AF0F008FAE0F009A\n:10AED0008FAE0F008FAE0F008FAE0F008FAE0F0042\n:10AEE0008FAE0F008FAE0F0085AF0F008FAE0F003B\n:10AEF0002FAF0F003846FDF7BFF90028D4D194F8E2\n:10AF00003C30002BC3D140F20243A387002384F8D6\n:10AF10003E30BCE7464B002BC6D0E17C3846C1F33F\n:10AF2000400301F001020909FDF74EFAE5E70DF1D2\n:10AF3000160206A93846FDF73FFA069B13B1BDF885\n:10AF400016203AB994F83C30002BA0D140F20242CE\n:10AF5000A287DCE712BA013B1BBA0892324807937A\n:10AF6000082207A900F002FA0823A06800283FF48D\n:10AF700070AF834228BF034663632B4A94F82E10B8\n:10AF80009BB26BE70023CDE90733099308238DF8C3\n:10AF90001F300DF11602022306A938468DF8243021\n:10AFA000FDF70AFA069A002ACCD0BDF81630002B1D\n:10AFB000C8D012BA5BBA08921B48ADF826300C22F2\n:10AFC00007A900F0D3F90C23CFE72422002107A81A\n:10AFD000F9F7E2F980238DF81D30082202232021A1\n:10AFE00009A88DF81E308DF81F30F9F7D5F9102219\n:10AFF00020210BA8F9F7D0F9042220210FA8F9F796\n:10B00000CBF90FAB0BAA09A93846FDF701F90648A1\n:10B01000242207A900F0AAF92423A6E764CE002081\n:10B02000555342435553425364BE002073CE002013\n:10B03000C9830F0003238DF81C3000238DF81D30C9\n:10B040008DF81E308DF81F30704B8BB13846AFF342\n:10B0500000809DF81E3080F0010060F3C7130422C9\n:10B060006B488DF81E3007A900F080F904237CE7B7\n:10B070000120EEE71222002107A8F9F78DF9F0234D\n:10B0800094F83C208DF81C300A238DF823304FF0C3\n:10B09000000362F303038DF81E3094F83D308DF801\n:10B0A00028305B4894F83E308DF82930122207A9E9\n:10B0B00000F05CF90023A38784F83E30122354E7A4\n:10B0C000E37BA06B282B06D1636B30449842A063CE\n:10B0D000BFF4EDAE97E62A2B41D1E28A52BA92B282\n:10B0E0001AB1A368B3FBF2F292B2D4F81110484F30\n:10B0F000B0FBF2FC09BA02FB1C020096607B3B46E7\n:10B100006144FDF7EFF8002809DAA36B3344A36329\n:10B1100043F20333A387002384F83E3099E6864246\n:10B1200012D9321A40B1A36B03920344391838463E\n:10B13000A36300F0B5F9039A94F82F10002300934D\n:10B140002846FEF73AFD61E6A36B1E44636BA663D7\n:10B150009E42BFF4ACAE2846FFF776FC56E6237B52\n:10B160003044DB09A0630CD1A38E294A607B04F133\n:10B170000F01FDF783F8002803DA39462846FFF768\n:10B180003FFCD4E90D329A42BFF491AE4FF0E02378\n:10B19000D3F8F03DDB077FF539AE00BE36E694F814\n:10B1A0002E308B427FF432AE0D2E7FF42FAEE37B38\n:10B1B000282B09D02A2B14D0164B53B1607B04F1F5\n:10B1C0000F01AFF3008004E0134B13B1607BAFF3CA\n:10B1D0000080002384F83030104A94F82F101F2389\n:10B1E0003CE60F4B002BF4D0607BFDF793F8F0E7C3\n:10B1F0009B1AA362032384F830300A4A0D232846A1\n:10B20000FEF788FD00287FF4C3AD2CE600000000A7\n:10B2100064BE0020000000000000000064CE00209A\n:10B2200015830F0084CE002008B50020FEF700FC37\n:10B2300030B94FF0E023D3F8F03DDB0700D500BE76\n:10B2400008BDFEF7EFBB8388C07800F0030002283A\n:10B25000C3F30A0315D003281DD001280FD10229FA\n:10B2600040F2FF3208BF4FF480629A420FD24FF093\n:10B27000E023D3F8F00D10F0010008D000BE00204C\n:10B280007047022904D1B3F5007FF0D10120704747\n:10B29000402BFBD9EBE702290CBF4FF48062402220\n:10B2A0009A42F3D2E3E730B50A44914200D330BD6D\n:10B2B0004C78052C06D18C7804F07F0500EB450511\n:10B2C000E4092B550C782144EFE700000649074AB2\n:10B2D000074B9B1A03DD043BC858D050FBDCF9F741\n:10B2E00063FEF8F7D5FF000068BD0F000080002066\n:10B2F000C8860020FEE7FEE7FEE7FEE7FEE7FEE782\n:10B30000FEE7FEE7FEE7FEE7032A70B515D940EA3F\n:10B31000010C1CF0030F04460B4621D119462046B0\n:10B320000E680568B54204F1040403F1040317D163\n:10B33000043A032A20461946F0D8541EA2B100F15F\n:10B34000FF3C013901E0C3180CD01CF801EF11F8E3\n:10B35000012F9645A4EB0C03F5D0AEEB020070BDB7\n:10B36000541EECE7184670BD104670BD844641EA95\n:10B37000000313F003036DD1403A41D351F8043B6D\n:10B3800040F8043B51F8043B40F8043B51F8043BBF\n:10B3900040F8043B51F8043B40F8043B51F8043BAF\n:10B3A00040F8043B51F8043B40F8043B51F8043B9F\n:10B3B00040F8043B51F8043B40F8043B51F8043B8F\n:10B3C00040F8043B51F8043B40F8043B51F8043B7F\n:10B3D00040F8043B51F8043B40F8043B51F8043B6F\n:10B3E00040F8043B51F8043B40F8043B51F8043B5F\n:10B3F00040F8043B51F8043B40F8043B403ABDD2CE\n:10B40000303211D351F8043B40F8043B51F8043B6F\n:10B4100040F8043B51F8043B40F8043B51F8043B2E\n:10B4200040F8043B103AEDD20C3205D351F8043BFE\n:10B4300040F8043B043AF9D2043208D0D2071CBFCA\n:10B4400011F8013B00F8013B01D30B8803806046F3\n:10B45000704700BF082A13D38B078DD010F0030369\n:10B460008AD0C3F10403D21ADB071CBF11F8013BD9\n:10B4700000F8013B80D331F8023B20F8023B7BE728\n:10B48000043AD9D3013A11F8013B00F8013BF9D253\n:10B490000B7803704B7843708B78837060467047ED\n:10B4A00088420DD98B1883420AD900EB020CBAB13D\n:10B4B000624613F801CD02F801CD9942F9D17047E7\n:10B4C0000F2A0ED8034602F1FF3C4AB10CF1010CE1\n:10B4D000013B8C4411F8012B03F8012F6145F9D190\n:10B4E000704740EA01039B0750D1A2F1100370B5E9\n:10B4F00001F1200C23F00F0501F1100E00F11004F2\n:10B50000AC441B095EF8105C44F8105C5EF80C5CFF\n:10B5100044F80C5C5EF8085C44F8085C5EF8045C77\n:10B5200044F8045C0EF1100EE64504F11004E9D174\n:10B53000013312F00C0F01EB031102F00F0400EBCA\n:10B54000031327D0043C24F003064FEA940C1E4456\n:10B550001C1F8E465EF8045B44F8045FB442F9D1C8\n:10B560000CF1010402F0030203EB840301EB8401FC\n:10B5700002F1FF3C4AB10CF1010C013B8C4411F883\n:10B58000012B03F8012F6145F9D170BD02F1FF3C99\n:10B5900003469BE72246EBE7830710B5044610D12C\n:10B5A0000268A2F1013323EA020313F0803F08D1BD\n:10B5B00050F8042FA2F1013323EA020313F0803F75\n:10B5C000F6D003781BB110F8013F002BFBD100F03F\n:10B5D00003F8204610BD00BF80EA0102844612F045\n:10B5E000030F4FD111F0030F32D14DF8044D11F07C\n:10B5F000040F51F8043B0BD0A3F101329A4312F02F\n:10B60000803F04BF4CF8043B51F8043B16D100BF07\n:10B6100051F8044BA3F101329A4312F0803FA4F198\n:10B6200001320BD14CF8043BA24312F0803F04BF1F\n:10B6300051F8043B4CF8044BEAD023460CF8013B8C\n:10B6400013F0FF0F4FEA3323F8D15DF8044B704736\n:10B6500011F0010F06D011F8012B0CF8012B002A74\n:10B6600008BF704711F0020FBFD031F8022B12F063\n:10B67000FF0F16BF2CF8022B8CF8002012F47F4F1E\n:10B68000B3D1704711F8012B0CF8012B002AF9D126\n:10B69000704700BF00000000000000000000000034\n:10B6A000000000000000000000000000000000009A\n:10B6B000000000000000000000000000000000008A\n:10B6C00090F800F06DE9024520F007016FF0000CE2\n:10B6D00010F0070491F820F040F049804FF000048A\n:10B6E0006FF00700D1E9002391F840F000F1080065\n:10B6F00082FA4CF2A4FA8CF283FA4CF3A2FA8CF39D\n:10B700004BBBD1E9022382FA4CF200F10800A4FA03\n:10B710008CF283FA4CF3A2FA8CF3E3B9D1E9042357\n:10B7200082FA4CF200F10800A4FA8CF283FA4CF38E\n:10B73000A2FA8CF37BB9D1E9062301F1200182FA48\n:10B740004CF200F10800A4FA8CF283FA4CF3A2FA4E\n:10B750008CF3002BC6D0002A04BF04301A4612BA5C\n:10B76000B2FA82F2FDE8024500EBD2007047D1E95F\n:10B77000002304F00305C4F100004FEAC50514F0EE\n:10B78000040F91F840F00CFA05F562EA05021CBFBF\n:10B7900063EA050362464FF00004A9E7F0B5254FC0\n:10B7A000A2F1020E164605460C460FCF8BB0EC46B2\n:10B7B000ACE80F000FCFACE80F0097E803004CF89F\n:10B7C000040BBEF1220F8CF800102ED804F1FF3EBE\n:10B7D00070464FF0000CB5FBF6F206FB125328330F\n:10B7E0006B44614613F828CC00F801CF2B469E42EB\n:10B7F00001F1010C1546EED9002304F80C3089B193\n:10B80000A44472461EF8010F1CF8015D8EF800502A\n:10B810006FEA0E0302322344121B0B449A428CF847\n:10B820000000EEDB20460BB0F0BD002020700BB016\n:10B83000F0BD00BF34BD0F00FFF7B0BF53B94AB928\n:10B84000002908BF00281CBF4FF0FF314FF0FF3028\n:10B8500000F074B9ADF1080C6DE904CE00F006F803\n:10B86000DDF804E0DDE9022304B070472DE9F0477C\n:10B87000089D04468E46002B4DD18A42944669D9D4\n:10B88000B2FA82F252B101FA02F3C2F1200120FAB7\n:10B8900001F10CFA02FC41EA030E94404FEA1C4805\n:10B8A000210CBEFBF8F61FFA8CF708FB16E341EA01\n:10B8B000034306FB07F199420AD91CEB030306F187\n:10B8C000FF3080F01F81994240F21C81023E6344A8\n:10B8D0005B1AA4B2B3FBF8F008FB103344EA03444C\n:10B8E00000FB07F7A7420AD91CEB040400F1FF3361\n:10B8F00080F00A81A74240F207816444023840EA9E\n:10B900000640E41B00261DB1D4400023C5E90043D6\n:10B910003146BDE8F0878B4209D9002D00F0EF8059\n:10B920000026C5E9000130463146BDE8F087B3FA8C\n:10B9300083F6002E4AD18B4202D3824200F2F98074\n:10B94000841A61EB030301209E46002DE0D0C5E977\n:10B95000004EDDE702B9FFDEB2FA82F2002A40F0C3\n:10B960009280A1EB0C014FEA1C471FFA8CFE0126C6\n:10B97000200CB1FBF7F307FB131140EA01410EFB6A\n:10B9800003F0884208D91CEB010103F1FF3802D211\n:10B99000884200F2CB804346091AA4B2B1FBF7F00B\n:10B9A00007FB101144EA01440EFB00FEA64508D92E\n:10B9B0001CEB040400F1FF3102D2A64500F2BB806B\n:10B9C0000846A4EB0E0440EA03409CE7C6F12007BA\n:10B9D000B34022FA07FC4CEA030C20FA07F401FA00\n:10B9E00006F31C43F9404FEA1C4900FA06F3B1FB89\n:10B9F000F9F8200C1FFA8CFE09FB181140EA0141EE\n:10BA000008FB0EF0884202FA06F20BD91CEB01018A\n:10BA100008F1FF3A80F08880884240F28580A8F1E2\n:10BA200002086144091AA4B2B1FBF9F009FB101134\n:10BA300044EA014100FB0EFE8E4508D91CEB0101D2\n:10BA400000F1FF346CD28E456AD90238614440EA75\n:10BA50000840A0FB0294A1EB0E01A142C846A646F5\n:10BA600056D353D05DB1B3EB080261EB0E0101FA7E\n:10BA700007F722FA06F3F1401F43C5E900710026DB\n:10BA80003146BDE8F087C2F12003D8400CFA02FC31\n:10BA900021FA03F3914001434FEA1C471FFA8CFE41\n:10BAA000B3FBF7F007FB10360B0C43EA064300FB31\n:10BAB0000EF69E4204FA02F408D91CEB030300F1CF\n:10BAC000FF382FD29E422DD9023863449B1B89B286\n:10BAD000B3FBF7F607FB163341EA034106FB0EF30F\n:10BAE0008B4208D91CEB010106F1FF3816D28B42BC\n:10BAF00014D9023E6144C91A46EA004638E72E4688\n:10BB0000284605E70646E3E61846F8E64B45A9D27F\n:10BB1000B9EB020864EB0C0E0138A3E74646EAE7EE\n:10BB2000204694E74046D1E7D0467BE7023B61449C\n:10BB300032E7304609E76444023842E7704700BF05\n:10BB4000F8B500BFF8BC08BC9E467047F8B500BF0A\n:10BB5000F8BC08BC9E467047088000200010020018\n:10BB60000338FDD87047000000000000000000000E\n:10BB70000338FDD87047010000000000089900203C\n:10BB80000338FDD87047416461444655004D6573E4\n:10BB90006874617374696300302E392E32207331FA\n:10BBA000343020362E312E3100000000000000001D\n:10BBB00000000000000000000023D1BCEA5F7823F1\n:10BBC00015DEEF12120000000000000070B000202F\n:10BBD0004164616672756974006E52462055463242\n:10BBE00000303132333435363738394142434445F9\n:10BBF00046006E52462053657269616C0009045319\n:10BC00006F66744465766963653A200053002E00C0\n:10BC10006E6F7420666F756E640D0A00EB3C905574\n:10BC20004632205546322000020101000240000049\n:10BC300000F80201010001000000000009010100FC\n:10BC4000800029420042004D455348544153544915\n:10BC5000430046415431362020203C21646F6374F8\n:10BC60007970652068746D6C3E0A3C68746D6C3E3A\n:10BC70003C626F64793E3C7363726970743E0A6C17\n:10BC80006F636174696F6E2E7265706C6163652895\n:10BC90002268747470733A2F2F6275796D656163D1\n:10BCA0006F666665652E636F6D2F6D61726B2E62B8\n:10BCB0006972737322293B0A3C2F73637269707433\n:10BCC0003E3C2F626F64793E3C2F68746D6C3E0A77\n:10BCD00000000000494E464F5F554632545854000C\n:10BCE00024850020494E44455820202048544D00CA\n:10BCF0005ABC0F0043555252454E5420554632000F\n:10BD00000000000021A70F0079A70F00A9A70F00CE\n:10BD10004DA80F0005A90F00000000009DAB0F000B\n:10BD2000ADAB0F00BDAB0F004DAC0F0069AD0F0008\n:10BD30000000000030313233343536373839616233\n:10BD4000636465666768696A6B6C6D6E6F7071724B\n:10BD5000737475767778797A00000000000000002F\n:10BD60002885FF7F010000000880002000000000FF\n:10BD700000000000F48200205C830020C4830020C7\n:10BD800000000000000000000000000000000000B3\n:10BD900000000000000000000000000000000000A3\n:10BDA0000000000000000000000000000000000093\n:10BDB0000000000000000000000000000000000083\n:10BDC0000000000000000000000000000000000073\n:10BDD0000000000000000000000000000000000063\n:10BDE0000000000000000000000000000000000053\n:10BDF0000000000000000000000000000000000043\n:10BE00000000000000000000000000000000000032\n:10BE10000000000000000000010000000000000021\n:10BE20000E33CDAB34126DE6ECDE05000B000000E6\n:10BE30000000000000000000000000000000000002\n:10BE400000000000000000000000000000000000F2\n:10BE500000000000000000000000000000000000E2\n:10BE600000000000000000000000000000000000D2\n:10BE700000000000000000000000000000000000C2\n:10BE800000000000000000000000000000000000B2\n:10BE900000000000000000000000000000000000A2\n:10BEA0000000000000000000000000000000000092\n:10BEB0000000000000000000000000000000000082\n:10BEC0000000000000000000000000000000000072\n:10BED0000000000000000000000000000000000062\n:10BEE0000000000000000000000000000000000052\n:10BEF0000000000000000000000000000000000042\n:10BF00000000000000000000000000000000000031\n:10BF10000000000000000000000000000000000021\n:10BF20000000000000000000000000000000000011\n:10BF30000000000000000000000000000000000001\n:10BF400000000000000000000000000000000000F1\n:10BF500000000000000000000000000000000000E1\n:10BF600000000000000000000000000000000000D1\n:10BF700000000000000000000000000000000000C1\n:10BF800000000000000000000000000000000000B1\n:10BF900000000000000000000000000000000000A1\n:10BFA0000000000000000000000000000000000091\n:10BFB0000000000000000000000000000000000081\n:10BFC0000000000000000000000000000000000071\n:10BFD0000000000000000000000000000000000061\n:10BFE0000000000000000000000000000000000051\n:10BFF0000000000000000000000000000000000041\n:10C000000000000000000000000000000000000030\n:10C010000000000000000000000000000000000020\n:10C020000000000000000000000000000000000010\n:10C030000000000000000000000000000000000000\n:10C0400000000000000000000000000000000000F0\n:10C0500000000000000000000000000000000000E0\n:10C0600000000000000000000000000000000000D0\n:10C0700000000000000000000000000000000000C0\n:10C0800000000000000000000000000000000000B0\n:10C0900000000000000000000000000000000000A0\n:10C0A0000000000000000000000000000000000090\n:10C0B0000000000000000000000000000000000080\n:10C0C0000000000000000000000000000000000070\n:10C0D0000000000000000000000000000000000060\n:10C0E0000000000000000000000000000000000050\n:10C0F0000000000000000000000000000000000040\n:10C10000000000000000000000000000000000002F\n:10C11000000000000000000000000000000000001F\n:10C12000000000000000000000000000000000000F\n:10C1300000000000000000000000000000000000FF\n:10C1400000000000000000000000000000000000EF\n:10C1500000000000000000000000000000000000DF\n:10C1600000000000000000000000000000000000CF\n:10C1700000000000000000000000000000000000BF\n:10C1800000000000000000000000000000000000AF\n:10C190000000000000000000FFFFFFFF7C7F002088\n:10C1A0000090D003FF00FFFF320000007D7B0F00F6\n:10C1B000F17B0F0001090262000301008032080BCD\n:10C1C000000202020000090400000102020004054E\n:10C1D0002400200105240100010424020205240694\n:10C1E00000010705810308001009040100020A008C\n:10C1F000000007050202400000070582024000001F\n:10C200000904020002080650050705030240000069\n:10C210000705830240000009024B00020100803242\n:10C22000080B0002020200000904000001020200E3\n:10C230000405240020010524010001042402020554\n:10C24000240600010705810308001009040100020B\n:10C250000A000000070502024000000705820240B4\n:10C26000000012010002EF0201409A2329000001A0\n:10C2700001020301FDBB0F008DBB0F008DBB0F0042\n:10C2800064B30020F2BB0F00D9BB0F00554632202B\n:10C29000426F6F746C6F6164657220302E392E327C\n:10C2A000206C69622F6E726678202876322E302ECE\n:10C2B0003029206C69622F74696E79757362202849\n:10C2C000302E31322E302D3134352D673937373518\n:10C2D000653736393129206C69622F75663220281E\n:10C2E00072656D6F7465732F6F726967696E2F6306\n:10C2F0006F6E6669677570646174652D392D67614D\n:10C30000646262386337290D0A4D6F64656C3A20A8\n:10C3100068747470733A2F2F6275796D6561636FFD\n:10C32000666665652E636F6D2F6D61726B2E626937\n:10C330007273730D0A426F6172642D49443A204D45\n:10C340006573687461737469630D0A446174653A56\n:10C350002053657020203120323032340D0A000025\n:10C3600000000000000000000000000000000000CD\n:10C3700000000000000000000000000000000000BD\n:10C3800000000000000000000000000000000000AD\n:10C39000000000000000000000000000000000009D\n:10C3A000000000000000000000000000000000008D\n:10C3B000000000000000000000000000000000007D\n:10C3C000000000000000000000000000000000006D\n:10C3D000000000000000000000000000000000005D\n:10C3E000000000000000000000000000000000004D\n:10C3F000000000000000000000000000000000003D\n:10C40000000000000000000000000000010000002B\n:10C4100098B4002010000C000000E0FF1F00000096\n:10C42000000000005D450F0069420F0041420F000F\n:10D80000F1109E1E797A22200500000064000000BD\n:10D81000CC00000000001000CD000000000004005B\n:10D82000D000000029009A23D10000004028A5ADB7\n:10D83000D2000000200000000000000000000000F6\n:10D8400000000000000000000000000000000000D8\n:08D850000000000000000000D0\n:020000041000EA\n:0810140000400F0000E00F0096\n:00000001FF\n"
  },
  {
    "path": "bin/generic/Meshtastic_7.3.0_bootloader-0.9.2_s140_7.3.0.hex",
    "content": ":04000003F000B2CD8A\n:020000040000FA\n:1000000000040020810A000015070000610A0000BA\n:100010001F07000029070000330700000000000050\n:10002000000000000000000000000000A50A000021\n:100030003D070000000000004707000051070000D6\n:100040005B070000650700006F07000079070000EC\n:10005000830700008D07000097070000A10700003C\n:10006000AB070000B5070000BF070000C90700008C\n:10007000D3070000DD070000E7070000F1070000DC\n:10008000FB070000050800000F0800001908000029\n:10009000230800002D080000370800004108000078\n:1000A0004B080000550800005F08000069080000C8\n:1000B000730800007D080000870800009108000018\n:1000C0009B080000A5080000AF080000B908000068\n:1000D000C3080000CD080000D7080000E1080000B8\n:1000E000EB080000F5080000FF0800000909000007\n:1000F000130900001D090000270900003109000054\n:100100003B0900001FB500F003F88DE80F001FBD8C\n:1001100000F0ACBC40F6FC7108684FF01022401CA7\n:1001200008D00868401C09D00868401C04D0086842\n:1001300000F037BA9069F5E79069F9E7704770B554\n:100140000B46010B184400F6FF70040B4FF0805073\n:100150000022090303692403406943431D1B104621\n:1001600000F048FA29462046BDE8704000F042BA47\n:10017000F0B54FF6FF734FF4B4751A466E1E11E0DA\n:10018000A94201D3344600E00C46091B30F8027B3B\n:10019000641E3B441A44F9D19CB204EB134394B25D\n:1001A00004EB12420029EBD198B200EB134002EBB2\n:1001B000124140EA0140F0BDF34992B00446D1E952\n:1001C0000001CDE91001FF224021684600F0F4FB58\n:1001D00094E80F008DE80F00684610A902E004C8FB\n:1001E00041F8042D8842FAD110216846FFF7C0FF7C\n:1001F0001090AA208DF8440000F099F9FFF78AFFCB\n:1002000040F6FC7420684FF01025401C0FD0206889\n:1002100010226946803000F078F92068401C08D030\n:100220002068082210A900F070F900F061F9A869AF\n:10023000EEE7A869F5E74FF080500369406940F6A2\n:10024000FC71434308684FF01022401C06D0086838\n:1002500000F58050834203D2092070479069F7E788\n:100260000868401C04D00868401C03D00020704778\n:100270009069F9E70420704770B504460068C34DE3\n:10028000072876D2DFE800F033041929631E250021\n:10029000D4E9026564682946304600F062F92A46CE\n:1002A0002146304600F031F9AA002146304600F0E0\n:1002B00057FB002800D0032070BD00F009FC4FF46C\n:1002C000805007E0201D00F040F90028F4D100F034\n:1002D000FFFB60682860002070BD241D94E80700C3\n:1002E000920000F03DFB0028F6D00E2070BDFFF715\n:1002F000A2FF0028FAD1D4E901034FF0805100EBAE\n:10030000830208694D69684382420ED840F6F8704E\n:1003100005684FF010226D1C09D0056805EB8305B8\n:100320000B6949694B439D4203D9092070BD55694A\n:10033000F4E70168491C03D00068401C02D003E0C8\n:100340005069FAE70F2070BD2046FFF735FFFFF731\n:1003500072FF0028F7D1201D00F0F7F80028F2D135\n:1003600060680028F0D100F0E2F8FFF7D3FE00F05B\n:10037000BFF8072070BD10B50C46182802D0012028\n:10038000086010BD2068FFF777FF206010BD41684E\n:10039000054609B1012700E0002740F6F8742068FF\n:1003A0004FF01026401C2BD02068AA68920000F065\n:1003B000D7FA38B3A86881002068401C27D020688D\n:1003C000FFF7BDFED7B12068401C22D026684FF051\n:1003D0008050AC686D68016942695143A9420DD9EA\n:1003E000016940694143A14208D92146304600F0E5\n:1003F000B8F822462946304600F087F800F078F831\n:100400007069D2E700F093F8FFF784FEF6E77069B1\n:10041000D6E77669DBE740F6FC7420684FF01026DB\n:10042000401C23D02068401C0CD02068401C1FD0EA\n:100430002568206805F18005401C1BD027683879A5\n:10044000AA2819D040F6F8700168491C42D001680A\n:10045000491C45D00168491C3ED001680968491C07\n:100460003ED00168491C39D000683EE0B069DAE747\n:10047000B569DEE7B769E2E710212846FFF778FEA5\n:100480003968814222D12068401C05D0D4F8001080\n:1004900001F18002C03107E0B169F9E730B108CA63\n:1004A00051F8040D984201D1012000E000208A4259\n:1004B000F4D158B1286810B1042803D0FEE72846CB\n:1004C000FFF765FF3149686808600EE0FFF722FE1C\n:1004D00000F00EF87169BBE77169BFE7706904E06D\n:1004E0004FF480500168491C01D000F0CBFAFEE7C0\n:1004F000BFF34F8F26480168264A01F4E06111439B\n:100500000160BFF34F8F00BFFDE72DE9F0411746B3\n:100510000D460646002406E03046296800F054F8EF\n:10052000641C2D1D361DBC42F6D3BDE8F08140F69B\n:10053000FC700168491C04D0D0F800004FF48051D1\n:10054000FDE54FF010208069F8E74FF080510A690F\n:10055000496900684A43824201D810207047002050\n:10056000704770B50C4605464FF4806608E0284693\n:1005700000F017F8B44205D3A4F5806405F5805562\n:10058000002CF4D170BD0000F40A0000000000202F\n:100590000CED00E00400FA05144801680029FCD0C5\n:1005A0007047134A0221116010490B68002BFCD0E0\n:1005B0000F4B1B1D186008680028FCD0002010603D\n:1005C00008680028FCD07047094B10B501221A605A\n:1005D000064A1468002CFCD0016010680028FCD08A\n:1005E0000020186010680028FCD010BD00E4014015\n:1005F00004E5014070B50C46054600F073F810B9EB\n:1006000000F07EF828B121462846BDE8704000F091\n:1006100007B821462846BDE8704000F037B8000012\n:100620007FB5002200920192029203920A0B000B06\n:100630006946012302440AE0440900F01F0651F80C\n:10064000245003FA06F6354341F82450401C8242F8\n:10065000F2D80D490868009A10430860081D016827\n:10066000019A1143016000F03DF800280AD00649C4\n:1006700010310868029A10430860091D0868039A3F\n:10068000104308607FBD00000006004030B50F4CED\n:10069000002200BF04EB0213D3F800582DB9D3F8A1\n:1006A000045815B9D3F808581DB1521C082AF1D3C3\n:1006B00030BD082AFCD204EB0212C2F80008C3F8CD\n:1006C00004180220C3F8080830BD000000E0014013\n:1006D0004FF08050D0F83001082801D0002070473A\n:1006E000012070474FF08050D0F83011062905D016\n:1006F000D0F83001401C01D0002070470120704725\n:100700004FF08050D0F830010A2801D00020704707\n:100710000120704708208F490968095808471020B0\n:100720008C4909680958084714208A4909680958FA\n:100730000847182087490968095808473020854923\n:100740000968095808473820824909680958084744\n:100750003C20804909680958084740207D490968BC\n:100760000958084744207B49096809580847482028\n:1007700078490968095808474C207649096809589A\n:10078000084750207349096809580847542071499F\n:1007900009680958084758206E49096809580847E8\n:1007A0005C206C4909680958084760206949096854\n:1007B00009580847642067490968095808476820AC\n:1007C00064490968095808476C2062490968095852\n:1007D000084770205F4909680958084774205D4937\n:1007E00009680958084778205A490968095808478C\n:1007F0007C205849096809580847802055490968EC\n:10080000095808478420534909680958084788202F\n:1008100050490968095808478C204E490968095809\n:10082000084790204B4909680958084794204949CE\n:10083000096809580847982046490968095808472F\n:100840009C204449096809580847A0204149096883\n:1008500009580847A4203F49096809580847A820B3\n:100860003C49096809580847AC203A4909680958C1\n:100870000847B0203749096809580847B420354966\n:10088000096809580847B8203249096809580847D3\n:10089000BC203049096809580847C0202D4909681B\n:1008A00009580847C4202B49096809580847C82037\n:1008B0002849096809580847CC2026490968095879\n:1008C0000847D0202349096809580847D4202149FE\n:1008D000096809580847D8201E4909680958084777\n:1008E000DC201C49096809580847E02019490968B3\n:1008F00009580847E4201749096809580847E820BB\n:100900001449096809580847EC2012490968095830\n:100910000847F0200F49096809580847F4200D4995\n:10092000096809580847F8200A490968095808471A\n:10093000FC2008490968095808475FF48070054998\n:10094000096809580847000003480449024A034B54\n:100950007047000000000020000B0000000B0000AA\n:1009600040EA010310B59B070FD1042A0DD310C82C\n:1009700008C9121F9C42F8D020BA19BA884201D97E\n:10098000012010BD4FF0FF3010BD1AB1D30703D0C6\n:10099000521C07E0002010BD10F8013B11F8014B7C\n:1009A0001B1B07D110F8013B11F8014B1B1B01D198\n:1009B000921EF1D1184610BD02F0FF0343EA032254\n:1009C00042EA024200F005B87047704770474FF0A6\n:1009D00000020429C0F0128010F0030C00F01B800C\n:1009E000CCF1040CBCF1020F18BF00F8012BA8BF1A\n:1009F00020F8022BA1EB0C0100F00DB85FEAC17CDE\n:100A000024BF00F8012B00F8012B48BF00F8012B90\n:100A100070474FF0000200B51346944696462039C1\n:100A200022BFA0E80C50A0E80C50B1F12001BFF4A7\n:100A3000F7AF090728BFA0E80C5048BF0CC05DF80D\n:100A400004EB890028BF40F8042B08BF704748BF5B\n:100A500020F8022B11F0804F18BF00F8012B7047CF\n:100A6000014B1B68DB6818470000002009480A4951\n:100A70007047FFF7FBFFFFF745FB00BD20BFFDE719\n:100A8000064B1847064A1060016881F308884068E1\n:100A900000470000000B0000000B000017040000DE\n:100AA000000000201EF0040F0CBFEFF30881EFF3ED\n:100AB0000981886902380078182803D100E0000015\n:100AC000074A1047074A12682C3212681047000084\n:100AD00000B5054B1B68054A9B58984700BD0000B0\n:100AE0007703000000000020F00A0000040000006E\n:100AF000001000000000000000FFFFFF0090D00386\n:10100000C8130020395E020085C100009F5D020008\n:1010100085C1000085C1000085C1000000000000FE\n:10102000000000000000000000000000C55E02009B\n:1010300085C100000000000085C1000085C10000DE\n:101040002D5F0200335F020085C1000085C10000F2\n:1010500085C1000085C1000085C1000085C1000078\n:10106000395F020085C1000085C100003F5F0200BA\n:1010700085C10000455F02004B5F0200515F020026\n:1010800085C1000085C1000085C1000085C1000048\n:1010900085C1000085C1000085C1000085C1000038\n:1010A00085C10000575F020085C1000085C10000B6\n:1010B00085C1000085C1000085C1000085C1000018\n:1010C0005D5F020085C1000085C1000085C1000090\n:1010D00085C1000085C1000085C1000085C10000F8\n:1010E00085C1000085C1000085C1000085C10000E8\n:1010F00085C1000085C1000085C1000085C10000D8\n:1011000085C1000085C1000000F002F824F083FED4\n:101110000AA090E8000C82448344AAF10107DA4552\n:1011200001D124F078FEAFF2090EBAE80F0013F0F7\n:10113000010F18BFFB1A43F00103184718530200B0\n:10114000385302000A444FF0000C10F8013B13F032\n:10115000070408BF10F8014B1D1108BF10F8015B10\n:10116000641E05D010F8016B641E01F8016BF9D103\n:1011700013F0080F1EBF10F8014BAD1C0C1B09D15A\n:101180006D1E58BF01F801CBFAD505E014F8016BCC\n:1011900001F8016B6D1EF9D59142D6D3704700005E\n:1011A0000023002400250026103A28BF78C1FBD870\n:1011B000520728BF30C148BF0B6070471FB500F011\n:1011C00003F88DE80F001FBD24F022BE70B51A4C45\n:1011D00005460A202070A01C00F0D5F85920A080F8\n:1011E00029462046BDE8704008F082B908F08BB966\n:1011F00070B50C461149097829B1A0F160015E294A\n:1012000008D3012013E0602804D0692802D043F2FB\n:1012100001000CE020CC0A4E94E80E0006EB8000A2\n:10122000A0F58050241FD0F8806E2846B04720607B\n:1012300070BD012070470000080000201C00002045\n:10124000A05F02003249884201D20120704700208D\n:10125000704770B50446A0F500002E4EB0F1786FCF\n:1012600002D23444A4F500042948844201D2012565\n:1012700000E0002500F043F848B125B9B44204D39A\n:101280002548006808E0012070BD002070BD002DD9\n:10129000F9D1B442F9D321488442F6D2F3E710B52C\n:1012A0000446A0F50000B0F1786F03D21948044459\n:1012B000A4F5000400F023F84FF0804130B1164847\n:1012C000006804E08C4204D2012003E01348844209\n:1012D000F8D2002080F0010010BD10B520B1FFF75A\n:1012E000DEFF08B1012010BD002010BD10B520B1F7\n:1012F000FFF7AFFF08B1012010BD002010BD084866\n:1013000008490068884201D10120704700207047D9\n:1013100000700200000000202000002008000020D3\n:101320005C000020BEBAFECA10B5044600210120B0\n:1013300000F042F800210B2000F03EF800210820C8\n:1013400000F03AF80421192000F036F804210D20AD\n:1013500000F032F804210E2000F02EF804210F20B6\n:1013600000F02AF80421C84300F026F806211620D0\n:1013700000F022F80621152000F01EF82046FFF7A5\n:1013800025FF002010BD40F2231101807047FFF7B8\n:101390002DBF1148704710487047104A10B51468A7\n:1013A0000E4B0F4A08331A60FFF722FF0B48001D4F\n:1013B000046010BD704770474907090E002804DB20\n:1013C00000F1E02080F80014704700F00F0000F1F9\n:1013D000E02080F8141D704703F900421005024018\n:1013E00001000001FD48002101604160018170475A\n:1013F0002DE9FF4F93B09B46209F160004460DD069\n:101400001046FFF726FF18B1102017B0BDE8F08F87\n:101410003146012001F0D3FE0028F6D101258DF8D8\n:1014200042504FF4C050ADF84000002210A92846A9\n:1014300006F0C5FC0028E8D18DF84250A8464FF4CC\n:1014400028500025ADF840001C2229466846079523\n:101450000DF01DF89DF81C000DF11C0A20F00F0086\n:10146000401C20F0F00010308DF81C0020788DF822\n:101470001D0061789DF81E000DF1400961F34200E6\n:1014800040F001008DF81E009DF8000008AA40F011\n:1014900002008DF800002089ADF83000ADF8325020\n:1014A0006089ADF83400CDF82CA060680E900AA9D0\n:1014B000CDF82890684606F090FA0028A5D160681B\n:1014C000FFF70BFF40B16068FFF710FF20B96078AD\n:1014D00000F00300022801D0012000E00020BF4CF2\n:1014E00008AA0AA92072BDF8200020808DF8428049\n:1014F00042F60120ADF840009DF81E0020F00600E5\n:10150000801C20F001008DF81E000220ADF8300094\n:10151000ADF8340014A80E90684606F05EFA002874\n:1015200089D1BDF82000608036B1211D304600F021\n:101530005FF90028C2D109E0BBF1000F05D00CF023\n:1015400021FDE8BB0CF01EFDD0BBA58017B1012F1B\n:1015500043D04AE08DF8428042F6A620ADF8400024\n:1015600046461C220021684607950CF090FF9DF826\n:101570001C00ADF8346020F00F00401C20F0F0009B\n:1015800010308DF81C009DF81D0020F0FF008DF834\n:101590001D009DF81E0020F0060040F00100801C98\n:1015A0008DF81E009DF800008DF8446040F00200A8\n:1015B0008DF80000CDE90A9AADF8306011A800E07E\n:1015C00011E00E9008AA0AA9684606F006FA00285B\n:1015D000A6D1BDF82000E08008E00CF0D3FC10B9E3\n:1015E0000CF0D0FC08B103200FE7E58000200CE7E9\n:1015F0003EB50446794D0820ADF80000A88828B112\n:101600002046FFF726FE18B110203EBD06203EBD45\n:101610002146012001F0D3FD0028F8D12088ADF843\n:1016200004006088ADF80600A088ADF80800E088E6\n:10163000ADF80A00A88801AB6A46002106F0AAFDB1\n:10164000BDF800100829E2D003203EBD7FB5634DF0\n:101650000446A88868B1002002900820ADF8080070\n:10166000CDF80CD02046FFF7F4FD20B1102004B0D7\n:1016700070BD0620FBE7A98802AA4FF6FF7006F0AE\n:10168000CCFF0028F3D1BDF80810082901D00320B1\n:10169000EDE7BDF800102180BDF802106180BDF8B3\n:1016A0000410A180BDF80610E180E0E701B582B02A\n:1016B0000220ADF80000494802AB6A46408800218C\n:1016C00006F068FDBDF80010022900D003200EBD11\n:1016D0001CB5002100910221ADF800100190FFF728\n:1016E000DEFD08B110201CBD3C486A4641884FF61B\n:1016F000FF7006F092FFBDF800100229F3D003201E\n:101700001CBDFEB5354C06461546207A0F46C0076F\n:1017100005D00846FFF79DFD18B11020FEBD0F2033\n:10172000FEBDF82D01D90C20FEBD3046FFF791FD1E\n:1017300018BB208801A905F03AFE0028F4D13078C2\n:101740008DF80500208801A906F003FD0028EBD1E3\n:1017500000909DF800009DF8051040F002008DF803\n:101760000000090703D040F008008DF80000208831\n:10177000694606F08BFC0028D6D1ADF808502088C9\n:101780003B4602AA002106F005FDBDF80810A9425B\n:10179000CAD00320FEBD7CB5054600200090019014\n:1017A0000888ADF800000C4628460195FFF795FD26\n:1017B00018B92046FFF773FD08B110207CBD15B1A4\n:1017C000BDF8000060B105486A4601884FF6FF7019\n:1017D00006F023FFBDF8001021807CBD240200200C\n:1017E0000C20FAE72F48C088002800D0012070475D\n:1017F00030B5044693B000200D46014600901422F7\n:1018000001A80CF044FE1C22002108A80CF03FFEA9\n:101810009DF80000CDF808D020F00F00401C20F00B\n:10182000F00010308DF800009DF8010006AA20F0AD\n:10183000FF008DF801009DF8200001A940F0020092\n:101840008DF8200001208DF8460042F60420ADF806\n:10185000440011A801902088ADF83C006088ADF8E4\n:101860003E00A088ADF84000E088ADF842009DF849\n:10187000020020F00600801C20F001008DF802001C\n:101880000820ADF80C00ADF810000FA8059008A8CE\n:1018900006F0A3F8002803D1BDF818002880002026\n:1018A00013B030BD24020020F0B5007B059F1E461A\n:1018B00014460D46012800D0FFDF0C2030803A206E\n:1018C0003880002C08D0287A032806D0287B0128ED\n:1018D00000D0FFDF17206081F0BDA889FBE72DE96C\n:1018E000F0470D4686B095F80C900E991446B9F164\n:1018F000010F0BD01022007B2E8A9046052807D0BE\n:10190000062839D0FFDF06B0BDE8F0870222F2E7F3\n:10191000E8890C2200EB400002EB400018803320E5\n:101920000880002CEFD0E8896081002720E0009635\n:10193000688808F1020301AA696900F097FF06EBC5\n:101940000800801C07EB470186B204EB4102BDF89A\n:1019500004009081F848007808B1012300E00023DA\n:101960000DF1060140460E3214F029F87F1CBFB27B\n:101970006089B842DBD8C6E734200880E889B9F12D\n:10198000010F11D0122148430E301880002CBAD01C\n:10199000E88960814846B9F1010F00D00220207328\n:1019A00000270DF1040A1FE00621ECE70096688885\n:1019B00008F1020301AA696900F058FF06EB08006C\n:1019C000801C86B2B9F1010F12D007EBC70004EBFF\n:1019D0004000BDF80410C18110220AF1020110304C\n:1019E0000CF02BFD7F1CBFB26089B842DED88AE7BD\n:1019F00007EB470104EB4102BDF80400D0810AF176\n:101A000002014046103213F0FCFFEBE72DE9F047EE\n:101A10000E4688B090F80CC096F80C80378AF5898D\n:101A20000C20DFF81493109902F10C04BCF1030FA1\n:101A300008D0BCF1040F3DD0BCF1070F75D0FFDF1B\n:101A400008B061E705EB850C00EB4C0018803120F5\n:101A50000880002AF4D0A8F1060000F0FF0A5581A2\n:101A600024E01622002101A80CF011FD00977088D7\n:101A7000434601AA716900F0F9FEBDF80400208018\n:101A8000BDF80600E080BDF80800208199F800004C\n:101A900008B1012300E00023A21C0DF10A01504609\n:101AA00013F08DFF07EB080087B20A346D1EADB24C\n:101AB000D7D2C5E705EB850C00EB4C00188032202F\n:101AC0000880002ABCD0A8F1050000F0FF0A55816B\n:101AD00037E000977088434601AA716900F0C6FE9E\n:101AE0009DF80600BDF80410E1802179420860F3FA\n:101AF000000162F34101820862F38201C20862F3CD\n:101B0000C301020962F30411420962F3451182091B\n:101B100062F386112171C0096071BDF80700208150\n:101B200099F8000010B1012301E00EE000232246E5\n:101B30000DF10901504613F042FF07EB080087B290\n:101B40000A346D1EADB2C4D27AE7A8F1020084B2A5\n:101B500005FB08FC0CF10E00188035200880002AD7\n:101B6000A7D05581948100971FFA8CF370880E32AC\n:101B7000716900F07BFE63E72DE9F84F1E460A9D70\n:101B80000C4681462AB1607A00F58070D080E089E9\n:101B9000108199F80C000C274FF000084FF00E0A46\n:101BA0000D2872D2DFE800F09D070E1B272F374566\n:101BB000546972727200214648460095FFF774FE20\n:101BC000BDE8F88F207B9146082802D0032800D07A\n:101BD000FFDF3780302009E0A9F80A80F0E7207B9A\n:101BE0009146042800D0FFDF378031202880B9F1EA\n:101BF000000FF1D1E4E7207B9146042800D0FFDFFD\n:101C000037803220F2E7207B9146022800D0FFDFA8\n:101C100037803320EAE7207B1746022800D0FFDF19\n:101C20003420A6F800A02880002FC9D0A7F80A8089\n:101C3000C6E7207B1746042800D0FFDF3520A6F832\n:101C400000A02880002FBBD04046A7F80A8012E0F1\n:101C5000207B1746052802D0062800D0FFDF102081\n:101C6000308036202880002FAAD0E0897881A7F81C\n:101C70000E80B9F80E00B881A2E7207B91460728B4\n:101C800000D0FFDF37803720B0E72AE04FF01200A6\n:101C900018804FF038001700288091D0E0897881B3\n:101CA000A7F80E80A7F8108099F80C000A2805D034\n:101CB0000B2809D00C280DD0FFDF81E7207B0A28F4\n:101CC00000D0FFDF01200AE0207B0B2800D0FFDFDF\n:101CD000042004E0207B0C2800D0FFDF05203873AF\n:101CE0006EE7FFDF6CE770B50C46054601F0AAFB16\n:101CF00020B10078222804D2082070BD43F20200EF\n:101D000070BD0521284612F0D1F8206008B10020EE\n:101D100070BD032070BD30B44880087820F00F00FB\n:101D2000C01C20F0F000903001F8080B1DCA81E8BB\n:101D30001D0030BC07F05DBC100000202DE9FF47FE\n:101D400084B0002782460297079890468946123051\n:101D50000AF069FA401D20F00306079828B907A980\n:101D60005046FFF7C0FF002854D1B9F1000F05D04D\n:101D70000798017B19BB052504681BE098F8000053\n:101D8000092803D00D2812D0FFDF46E0079903256C\n:101D90004868B0B3497B42887143914239D98AB2CD\n:101DA000B3B2011D11F0F5FE0446078002E0079C66\n:101DB000042508340CB1208810B1032D29D02CE063\n:101DC0000798012112300AF060FAADF80C000246C3\n:101DD00002AB2946504608F0B8FA070001D1A01C12\n:101DE000029007983A461230C8F80400A8F802A0FA\n:101DF00003A94046029B0AF055FAD8B10A2817D227\n:101E000000E006E0DFE800F007091414100B0D14E1\n:101E10001412132014E6002012E6112010E6082008\n:101E20000EE643F203000BE6072009E60D2007E665\n:101E3000032005E6BDF80C002346CDE900702A46D4\n:101E40005046079900F022FD57B9032D08D1079895\n:101E5000B3B2417B406871438AB2011D11F0ADFEFF\n:101E6000B9F1000FD7D0079981F80C90D3E72DE98D\n:101E7000FE4F91461A881C468A468046FAB102AB4C\n:101E8000494608F062FA050019D04046A61C27888A\n:101E900012F04FF93246072629463B46009611F0CC\n:101EA0005EFD20882346CDE900504A465146404613\n:101EB00000F0ECFC002020800120BDE8FE8F002017\n:101EC000FBE710B586B01C46AAB104238DF800309C\n:101ED0001388ADF808305288ADF80A208A788DF85A\n:101EE0000E200988ADF80C1000236A462146FFF742\n:101EF00025FF06B010BD1020FBE770B50D4605218B\n:101F000011F0D4FF040000D1FFDF294604F11200D4\n:101F1000BDE870400AF0A2B92DE9F8430D468046AD\n:101F2000002607F063FB04462878102878D2DFE803\n:101F300000F0773B345331311231313108313131D6\n:101F400031312879001FC0B2022801D0102810D1E9\n:101F500014BBFFDF35E004B9FFDF0521404611F077\n:101F6000A5FF007B032806D004280BD0072828D023\n:101F7000FFDF072655E02879801FC0B2022820D055\n:101F800050B1F6E72879401FC0B2022819D01028B6\n:101F900017D0EEE704B9FFDF13E004B9FFDF2879BB\n:101FA00001280ED1172137E00521404611F07EFFB0\n:101FB000070000D1FFDF07F1120140460AF02BF9BC\n:101FC0002CB12A4621464046FFF7A5FE29E0132101\n:101FD000404602F01FFD24E004B9FFDF0521404622\n:101FE00011F064FF060000D1FFDF694606F1120020\n:101FF0000AF01BF9060000D0FFDFA988172901D2DB\n:10200000172200E00A46BDF80000824202D90146CC\n:1020100002E005E01729C5D3404600F047FCD0E7B1\n:10202000FFDF3046BDE8F883401D20F0030219B100\n:1020300002FB01F0001D00E000201044704713B5C2\n:10204000009858B10024684611F04DFD002C04D1D1\n:10205000F749009A4A6000220A701CBD0124002042\n:10206000F2E72DE9F0470C461546242200212046D0\n:102070000CF00DFA05B9FFDFA87860732888DFF847\n:10208000B0A3401D20F00301AF788946DAF80400C0\n:1020900011F047FD060000D1FFDF4FF00008266079\n:1020A000A6F8008077B109FB07F1091D0AD0DAF81C\n:1020B000040011F036FD060000D1FFDF6660C6F8AF\n:1020C000008001E0C4F80480298804F11200BDE812\n:1020D000F0470AF091B82DE9F047804601F112006F\n:1020E0000D4681460AF09FF8401DD14F20F00302B3\n:1020F0006E7B14462968786811F03EFD3EB104FB02\n:1021000006F2121D03D06968786811F035FD0520CC\n:1021100011F074FE0446052011F078FE201A012803\n:1021200002D1786811F0F2FC49464046BDE8F0471C\n:102130000AF078B870B50546052111F0B7FE040025\n:1021400000D1FFDF04F112012846BDE870400AF01B\n:1021500062B82DE9F04F91B04FF0000BADF828B008\n:10216000ADF804B047880C4605469246052138462E\n:1021700011F09CFE060000D1FFDF24B1A780A4F877\n:1021800006B0A4F808B0297809220B20B2EB111F81\n:1021900073D12A7A04F1100138274FF00C084FF060\n:1021A00012090291102A69D2DFE802F068F2F1F018\n:1021B0008008D3898EA03DDCF3EEB7B7307B0228D0\n:1021C00000D0FFDFA88908EBC001ADF80410302172\n:1021D000ADF82810002C25D06081B5F80E800027BE\n:1021E0001DE004EBC709317C89F80E10F189A9F8CC\n:1021F0000C10CDF800806888042305AA296900F036\n:1022000035FBBDF81410A9F8101008F10400BDF852\n:1022100016107F1C1FFA80F8A9F81210BFB260894F\n:10222000B842DED80CE1307B022800D0FFDFE9891C\n:1022300008EBC100ADF804003020ADF8280095F897\n:102240000C90002CA9F10400C0B20F90EAD061817B\n:10225000B5F81080002725E0CDF8008068884B464F\n:1022600003AA696900F002FB08EB09001FFA80F875\n:102270006F48007818B1012302E0DDE0DAE00023C6\n:1022800004EBC702009204A90C320F9813F097FBDD\n:10229000009ABDF80C007F1C1082009ABDF80E0059\n:1022A000BFB250826089B842D6D8C9E00AA800906F\n:1022B00001AB224629463046FFF711FBC0E0307BD8\n:1022C000082805D0FFDF03E0307B082800D0FFDFBF\n:1022D000E8891030ADF804003620ADF82800002C55\n:1022E0003FD0A9896181F189A18127E0307B09284C\n:1022F00000D0FFDFA88901460C30ADF8040037207C\n:10230000ADF82800002C2CD06181E8890090AB89C1\n:10231000688804F10C02296955E0E88939211030F8\n:1023200080B2ADF80400ADF82810002C72D0A98955\n:102330006181287A0E280AD002212173E989E1817E\n:10234000288A0090EB8968886969029A3BE001213C\n:10235000F3E70AA8009001AB224629463046FFF772\n:1023600055FB6DE0307B0A2800D0FFDFADF804900C\n:10237000ADF828704CB3A9896181A4F810B0A4F815\n:102380000EB0012020735BE020E002E030E038E096\n:1023900041E0307B0B2800D0FFDF288AADF82870A1\n:1023A0001230ADF8040084B104212173A989618140\n:1023B000E989E181298A2182688A00902B8A6888CC\n:1023C00004F11202696900F051FA39E0307B0C28FF\n:1023D00000D0FFDFADF80490ADF828703CB30521C4\n:1023E0002173A4F80AB0A4F80EB0A4F810B027E046\n:1023F0000AA8009001AB224629463046FFF754FA5E\n:102400001EE00AA8009001AB224629463046FFF79D\n:10241000B3FB15E034E03B21ADF80400ADF8281023\n:1024200074B30120E080A4F808B084F80AB007E093\n:1024300010000020FFDF03E0297A012917D0FFDF19\n:10244000BDF80400AAF800006CB1BDF82800208097\n:10245000BDF804006080BDF82800392803D03C286E\n:1024600001D086F80CB011B00020BDE8F08F3C21FF\n:10247000ADF80400ADF8281014B1697AA172DFE755\n:10248000AAF80000EFE72DE9F84356880F4680468A\n:1024900015460521304611F009FD040000D1FFDF8B\n:1024A000123400943B46414630466A680AF02EF8E2\n:1024B000B8E570B50D46052111F0F8FC040000D117\n:1024C000FFDF294604F11200BDE8704009F0B8BEF4\n:1024D00070B50D46052111F0E9FC040000D1FFDFC5\n:1024E000294604F11200BDE8704009F0D6BE70B56F\n:1024F0000546052111F0DAFC040000D1FFDF04F1EC\n:10250000080321462846BDE870400422AFE470B5B8\n:102510000546052111F0CAFC040000D1FFDF214669\n:1025200028462368BDE870400522A0E470B5064641\n:10253000052111F0BBFC040000D1FFDF04F1120003\n:1025400009F071FE401D20F0030511E0011D008817\n:102550000322431821463046FFF789FC00280BD0A0\n:10256000607BABB2684382B26068011D11F05BFB17\n:10257000606841880029E9D170BD70B50E460546F6\n:1025800007F034F8040000D1FFDF012020726672EA\n:102590006580207820F00F00C01C20F0F000303063\n:1025A0002070BDE8704007F024B8602801D00720F3\n:1025B00070470878C54900F0010008700020704796\n:1025C0002DE9F0438BB00D461446814606A9FFF76E\n:1025D0008AFB002814D14FF6FF7601274FF42058CC\n:1025E0008CB103208DF800001020ADF8100007A872\n:1025F000059007AA204604A913F005FA78B1072030\n:102600000BB0BDE8F0830820ADF808508DF80E70CF\n:102610008DF80000ADF80A60ADF80C800CE006986B\n:10262000A17801742188C1818DF80E70ADF8085031\n:10263000ADF80C80ADF80A606A4602214846069B58\n:10264000FFF77CFBDCE708B501228DF8022042F69B\n:102650000202ADF800200A4603236946FFF731FC69\n:1026600008BD08B501228DF8022042F60302ADF83C\n:1026700000200A4604236946FFF723FC08BD00B585\n:1026800087B079B102228DF800200A88ADF80820C1\n:102690004988ADF80A1000236A460521FFF74EFB72\n:1026A00007B000BD1020FBE709B1072309E40720AC\n:1026B000704770B588B00D461446064606A9FFF768\n:1026C00012FB00280ED17CB10620ADF808508DF821\n:1026D0000000ADF80A40069B6A460821DC813046BE\n:1026E000FFF72CFB08B070BD05208DF80000ADF899\n:1026F0000850F0E700B587B059B107238DF80030D6\n:10270000ADF80820039100236A460921FFF716FB64\n:10271000C6E71020C4E770B588B00C460646002511\n:1027200006A9FFF7E0FA0028DCD106980121123053\n:1027300009F0ABFD9CB12178062921D2DFE801F038\n:10274000200505160318801E80B2C01EE28880B2E4\n:102750000AB1A3681BB1824203D90C20C2E7102042\n:10276000C0E7042904D0A08850B901E00620B9E7E9\n:10277000012913D0022905D004291CD005292AD00B\n:102780000720AFE709208DF800006088ADF8080049\n:10279000E088ADF80A00A068039023E00A208DF8D5\n:1027A00000006088ADF80800E088ADF80A00A06875\n:1027B0000A25039016E00B208DF800006088ADF824\n:1027C0000800A088ADF80A00E088ADF80C00A06809\n:1027D0000B25049006E00C208DF8000060788DF841\n:1027E00008000C256A4629463046069BFFF7A6FAE4\n:1027F00078E700B587B00D228DF80020ADF80810FD\n:1028000000236A461946FFF799FA49E700B587B0F1\n:1028100071B102228DF800200A88ADF8082049889D\n:10282000ADF80A1000236A460621FFF787FA37E75A\n:10283000102035E770B586B0064601200D46ADF88C\n:1028400008108DF80000014600236A463046FFF765\n:1028500075FA040008D12946304605F0B5FC002180\n:10286000304605F0CFFC204606B070BDF8B51C46DA\n:1028700015460E46069F11F04AFC2346FF1DBCB2CA\n:1028800031462A46009411F036F8F8BD30B41146AE\n:10289000DDE902423CB1032903D0002330BC08F03B\n:1028A00032BE0123FAE71A8030BC704770B50C467F\n:1028B0000546FFF722FB2146284605F094FC2846F2\n:1028C000BDE87040012105F09DBC00001000002013\n:1028D0004FF0E0224FF400400021C2F88001BFF326\n:1028E0004F8FBFF36F8F1748016001601649900248\n:1028F00008607047134900B500220A600A60124B55\n:102900004FF060721A60002808BF00BD0F4A104BDC\n:10291000DFF840C001280CD002281CBFFFDF00BD3B\n:10292000032008601A604FF4000000BFCCF80000DC\n:1029300000BD022008601A604FF04070F6E700B555\n:10294000FFDF00BD00F5004008F50140A4020020B3\n:1029500014F5004004F5014070B50B2000F0BDF9FE\n:10296000082000F0BAF900210B2000F0D4F9002172\n:10297000082000F0D0F9F44C01256560A560002026\n:10298000C4F84001C4F84401C4F848010B2000F029\n:10299000B5F9082000F0B2F90B2000F091F925609C\n:1029A00070BD10B50B2000F098F9082000F095F9E3\n:1029B000E548012141608160E4490A68002AFCD1B0\n:1029C0000021C0F84011C0F84411C0F848110B2094\n:1029D00000F094F9BDE81040082000F08FB910B560\n:1029E0000B2000F08BF9BDE81040082000F086B9FC\n:1029F00000B530B1012806D0022806D0FFDF002044\n:102A000000BDD34800BDD34800BDD248001D00BD65\n:102A100070B5D1494FF000400860D04DC00BC5F8EB\n:102A20000803CF4800240460C5F840410820C4359D\n:102A300000F053F9C5F83C41CA48047070BD08B5B0\n:102A4000C14A002128B1012811D002281CD0FFDF83\n:102A500008BD4FF48030C2F80803C2F84803BB48F1\n:102A60003C300160C2F84011BDE80840D0E74FF4A7\n:102A70000030C2F80803C2F84803B448403001608F\n:102A8000C2F84411B3480CE04FF48020C2F80803A8\n:102A9000C2F84803AD4844300160C2F84811AD485F\n:102AA000001D0068009008BD70B516460D4604462E\n:102AB000022800D9FFDF0022A348012304F11001FE\n:102AC0008B4000EB8401C1F8405526B1C1F840218C\n:102AD000C0F8043303E0C0F80833C1F84021C0F85F\n:102AE000443370BD2DE9F0411D46144630B1012834\n:102AF00033D0022838D0FFDFBDE8F081891E0022E4\n:102B000021F07F411046FFF7CFFF012D23D0002099\n:102B1000944D924F012668703E61914900203C39E6\n:102B200008600220091D08608D49042030390860C2\n:102B30008B483D34046008206C6000F0DFF83004FE\n:102B4000C7F80403082000F0BBF88349F007091F09\n:102B500008602E70D0E70120DAE7012B02D00022B6\n:102B6000012005E00122FBE7012B04D00022022016\n:102B7000BDE8F04198E70122F9E774480068704722\n:102B800070B500F0D8F8704C0546D4F84001002626\n:102B9000012809D1D4F80803C00305D54FF48030CB\n:102BA000C4F80803C4F84061D4F8440101280CD1EA\n:102BB000D4F80803800308D54FF40030C4F80803A4\n:102BC000C4F84461012013F0EEFED4F84801012856\n:102BD0000CD1D4F80803400308D54FF48020C4F882\n:102BE0000803C4F84861022013F0DDFE5E4805606A\n:102BF00070BD70B500F09FF85A4D0446287850B16A\n:102C0000FFF706FF687818B10020687013F0CBFE5C\n:102C10005548046070BD0320F8E74FF0E0214FF401\n:102C20000010C1F800027047152000F067B84B494A\n:102C300001200861082000F061B848494FF47C1079\n:102C4000C1F808030020024601EB8003C3F84025C9\n:102C5000C3F84021401CC0B20628F5D37047410A92\n:102C600043F609525143C0F3080010FB02F000F58F\n:102C7000807001EB5020704710B5430B48F2376469\n:102C800063431B0C5C020C60384C03FB0400384BA4\n:102C90004CF2F72443435B0D13FB04F404EB402098\n:102CA00000F580704012107008681844086010BD6C\n:102CB0002C484068704729490120C1F8000270473C\n:102CC000002809DB00F01F0201219140400980002B\n:102CD00000F1E020C0F80011704700280DDB00F083\n:102CE0001F02012191404009800000F1E020C0F85E\n:102CF0008011BFF34F8FBFF36F8F7047002809DB40\n:102D000000F01F02012191404009800000F1E02005\n:102D1000C0F8801270474907090E002804DB00F153\n:102D2000E02080F80014704700F00F0000F1E02070\n:102D300080F8141D70470C48001F00680A4A0D49AE\n:102D4000121D11607047000000B0004004B5004043\n:102D50004081004044B1004008F50140008000403F\n:102D6000408500403C00002014050240F7C2FFFFF0\n:102D70006F0C0100010000010A4810B50468094900\n:102D800009480831086013F0A2FE0648001D0460DF\n:102D900010BD0649002008604FF0E0210220C1F874\n:102DA000800270471005024001000001FC1F004036\n:102DB000374901200860704770B50D2000F049F8D0\n:102DC000344C0020C4F800010125C4F804530D2040\n:102DD00000F050F825604FF0E0216014C1F80001C8\n:102DE00070BD10B50D2000F034F82A480121416073\n:102DF0000021C0F80011BDE810400D2000F03AB8E5\n:102E0000254810B504682449244808310860214940\n:102E1000D1F80001012804D0FFDF1F48001D046025\n:102E200010BD1B48001D00680022C0B2C1F800217F\n:102E300014F07FFBF1E710B5164800BFD0F8001181\n:102E40000029FBD0FFF7DCFFBDE810400D2000F0AB\n:102E500011B800280DDB00F01F020121914040094C\n:102E6000800000F1E020C0F88011BFF34F8FBFF366\n:102E70006F8F7047002809DB00F01F02012191408D\n:102E80004009800000F1E020C0F880127047000087\n:102E900004D5004000D000401005024001000001B0\n:102EA0004FF0E0214FF00070C1F8800101F5C071D2\n:102EB000BFF34F8FBFF36F8FC1F80001394B8022F2\n:102EC00083F8002441F8800C704700B502460420C6\n:102ED000354903E001EBC0031B792BB1401EC0B2A2\n:102EE000F8D2FFDFFF2000BD41F8302001EBC00128\n:102EF00000224A718A7101220A7100BD2A4A00210A\n:102F000002EBC0000171704710B50446042800D3DD\n:102F1000FFDF254800EBC4042079012800D0FFDF43\n:102F20006079A179401CC0B2814200D060714FF03D\n:102F3000E0214FF00070C1F8000210BD70B504250B\n:102F4000194E1A4C16E0217806EBC1000279012ACD\n:102F500008D1427983799A4204D04279827156F835\n:102F6000310080472078401CC0B22070042801D373\n:102F7000002020706D1EEDB2E5D270BD0C4810B57A\n:102F800004680B490B4808310860064890F80004B3\n:102F90004009042800D0FFDFFFF7D0FF0448001DE0\n:102FA000046010BD19E000E0E0050020580000209A\n:102FB00010050240010000010548064A01689142DF\n:102FC00001D1002101600449012008607047000020\n:102FD0005C000020BEBAFECA40E5014070B50C4658\n:102FE000054609F02FFC21462846BDE870400AF04E\n:102FF00010BD7047704770470021016081807047A5\n:103000002CFFFFFFDBE5B151007002002301FFFF41\n:103010008C00000078DB6A007A2E9AC67DB66CFAC6\n:10302000F35721CCC310D5E51471FB3C30B5FC4DF2\n:103030000446062CA9780ED2DFE804F0030E0E0E2B\n:103040000509FFDF08E0022906D0FFDF04E00329BD\n:1030500002D0FFDF00E0FFDFAC7030BD30B50446CA\n:103060001038EF4D07280CD2DFE800F0040C060CF6\n:103070000C0C0C00FFDF05E0287E112802D0FFDFDA\n:1030800000E0FFDF2C7630BD2DE9F04112F026FE86\n:10309000044614F063F8201AC5B2062010F0AEFE04\n:1030A0000446062010F0B2FE211ADD4C207E1228C4\n:1030B00018D000200F18072010F0A0FE06460720A9\n:1030C00010F0A4FE301A3918207E13280CD00020EE\n:1030D0000144A078042809D000200844281AC0B26E\n:1030E000BDE8F0810120E5E70120F1E70120F4E7E8\n:1030F000CB4810B590F825004108C94800F12600DA\n:1031000005D00EF0F5FEBDE8104006F08CB80EF0CC\n:10311000D0FEF8E730B50446A1F120000D460A289C\n:103120004AD2DFE800F005070C1C2328353A3F445B\n:10313000FFDF42E0207820283FD1FFDF3DE0B848A4\n:103140008178052939D0007E122836D020782428AD\n:1031500033D0252831D023282FD0FFDF2DE0207851\n:1031600022282AD0232828D8FFDF26E0207822280A\n:1031700023D0FFDF21E0207822281ED024281CD075\n:1031800026281AD0272818D0292816D0FFDF14E0C7\n:103190002078252811D0FFDF0FE0207825280CD0DB\n:1031A000FFDF0AE02078252807D0FFDF05E0207840\n:1031B000282802D0FFDF00E0FFDF257030BD1FB5FB\n:1031C00004466A46002001F0A5FEB4B1BDF8022015\n:1031D0004FF6FF700621824201D1ADF80210BDF812\n:1031E0000420824201D1ADF80410BDF808108142DC\n:1031F00003D14FF44860ADF8080068460FF0E2FADA\n:1032000006F011F804B010BD70B516460C46054620\n:10321000FEF71FF848B90CB1B44208D90C2070BDB4\n:1032200055F82400FEF715F808B1102070BD2046AF\n:10323000641EE4B2F4D270BD2DE9F04105461F468C\n:1032400090460E4600240068FEF750F830B9A98871\n:1032500028680844401EFEF749F808B110203FE7EF\n:1032600028680028A88802D0B84202D850E0002878\n:10327000F5D0092034E72968085DB8B1671CCA5D3C\n:10328000152A2ED03CDC152A3AD2DFE802F039129A\n:10329000222228282A2A313139393939393939391C\n:1032A00039392200085D30BB641CA4B2A242F9D8AF\n:1032B00033E00228DDD1A01C085C88F80000072854\n:1032C00001D2400701D40A200AE7307840F001001B\n:1032D00015E0C143C90707E0012807D010E0062028\n:1032E000FEE60107A1F180510029F5D01846F7E666\n:1032F0003078810701D50B20F2E640F002003070F3\n:103300002868005D384484B2A888A04202D2B0E7A1\n:103310004FF4485382B2A242ADD80020E0E610B587\n:10332000027843F2022354080122022C12D003DC5B\n:103330003CB1012C16D106E0032C10D07F2C11D10A\n:1033400012E0002011E080790324B4EB901F09D132\n:103350000A700BE08079B2EB901F03D1F8E7807917\n:103360008009F5D0184610BDFF200870002010BD60\n:1033700008B500208DF80000294890F82E1051B1B2\n:1033800090F82F0002280FD003280FD0FFDF00BFD6\n:103390009DF8000008BD22486946253001F009FE6D\n:1033A0000028F5D0FFDFF3E7032000E001208DF8CF\n:1033B0000000EDE738B50C460546694601F0F9FD19\n:1033C00000280DD19DF80010207861F3470020708F\n:1033D00055F8010FC4F80100A888A4F805000020E2\n:1033E00038BD38B5137888B102280FD0FF281BD01C\n:1033F0000CA46D46246800944C7905EB9414247851\n:1034000064F347031370032805D010E023F0FE0394\n:1034100013700228F7D1D8B240F001000AE0000092\n:10342000F00100200302FF0143F0FE00107010784D\n:1034300020F0010010700868C2F801008888A2F826\n:10344000050038BD022110F031BD38B50C460978B1\n:10345000222901D2082038BDADF800008DF80220E5\n:1034600068460EF087FD05F0DEFE050003D1212140\n:103470002046FFF74FFE284638BD1CB500208DF8CA\n:103480000000CDF80100ADF80500FB4890F82E00D3\n:10349000022801D0012000E000208DF807006846D6\n:1034A0000EF0F0FD002800D0FFDF1CBD00220A80D6\n:1034B000437892B263F3451222F040020A8000780A\n:1034C0000C282BD2DFE800F02A06090E1116191C71\n:1034D0001F220C2742F0110009E042F01D00088075\n:1034E0000020704742F0110012E042F0100040F05E\n:1034F0000200F4E742F01000F1E742F00100EEE7CD\n:1035000042F0010004E042F00200E8E742F002006D\n:1035100040F00400E3E742F00400E0E707207047D2\n:103520002DE9FF478AB00025BDF82C6082461C4675\n:1035300091468DF81C50700703D56068FDF789FE31\n:1035400068B9CD4F4FF0010897F82E0058B197F8A1\n:103550002F00022807D16068FDF7C8FE18B11020BF\n:103560000EB0BDE8F087300702D5A08980283DD88D\n:10357000700705D4B9F1000F02D097F8240098B372\n:10358000E07DC0F300108DF81B00627D0720032151\n:103590005AB3012A2CD0022AE2D0042AE0D18DF8B5\n:1035A0001710F00627D4A27D072022B3012A22D0CB\n:1035B000022A23D0042AD3D18DF819108DF8159042\n:1035C000606810B307A9FFF7AAFE0028C8D19DF8CC\n:1035D0001C00FF2816D0606850F8011FCDF80F10AE\n:1035E0008088ADF8130014E000E001E00720B7E7A1\n:1035F0008DF81780D5E78DF81980DFE702208DF868\n:103600001900DBE743F20220AAE7CDF80F50ADF82E\n:103610001350E07B40B9207C30B9607C20B9A07C9D\n:1036200010B9E07CC00601D0062099E78DF800A013\n:10363000BDF82C00ADF80200A0680190A0680290CF\n:1036400004F10F0001F0A9FC8DF80C00FFF790FECB\n:103650008DF80D009DF81C008DF80E008DF81650A9\n:103660008DF81850E07D08A900F00F008DF81A00C1\n:1036700068460FF0E3F905F0D6FD71E7F0B58FB0BD\n:1036800000258DF830508DF814508DF834500646D2\n:103690008DF82850019502950395049519B10FC92D\n:1036A00001AC84E80F00744CA078052801D00428F0\n:1036B0000CD101986168884200D120B90398E16873\n:1036C000884203D110B108200FB0F0BD207DC006A4\n:1036D00001D51F2700E0FF273B460DAA05A903A837\n:1036E000FFF7AAFD0028EFD1A08AC10702D0C006CB\n:1036F00000D4EE273B460AAA0CA901A8FFF79CFDBF\n:103700000028E1D19DF81400C00701D00A20DBE7B2\n:10371000A08A410708D4A17D31B19DF828108907FE\n:1037200002D043F20120CFE79DF82810C90709D045\n:10373000400707D4208818B144F25061884201D96B\n:103740000720C1E78DF818508DF81960BDF8080002\n:10375000ADF81A000198079006A80FF07BF905F064\n:1037600062FD0028B0D18DF820508DF82160BDF8A1\n:103770001000ADF822000398099008A80FF08CF90A\n:1037800005F051FD00289FD101AD241D95E80F00E3\n:1037900084E80F00002097E770B586B00D4604005E\n:1037A00005D0FDF7A3FD20B1102006B070BD0820A4\n:1037B000FBE72078C107A98802D0FF2902D303E0E4\n:1037C0001F2901D20920F0E7800763D4FFF75CFCD2\n:1037D00038B12178C1F3C100012804D0032802D0F8\n:1037E00005E01320E1E7244890F82400C8B1C80799\n:1037F0004FF001064FF0000502D08DF80F6001E098\n:103800008DF80F50FFF7B4FD8DF800002078694661\n:10381000C0F3C1008DF8010060788DF80250C20835\n:1038200001D00720C1E730B3C20701D08DF8026094\n:10383000820705D59DF8022042F002028DF8022091\n:10384000400705D59DF8020040F004008DF8020005\n:10385000002022780B18C2F38002DA7001EB4002DC\n:103860006388D380401CA388C0B253810228F0D360\n:10387000207A78B905E001E0F00100208DF80260BF\n:10388000E6E7607A30B9A07A20B9E07A10B9207BF7\n:10389000C00601D0062088E704F1080001F07DFB96\n:1038A0008DF80E0068460EF0F6FC05F0BCFC002812\n:1038B00089D18DF810608DF81150E088ADF81200B4\n:1038C000ADF8145004A80EF039FD05F0ACFC00284A\n:1038D00088D12078C00701D0152000E01320FFF721\n:1038E000BDFB002061E72DE9FF470220FD4E8DF86A\n:1038F00004000027708EADF80600B84643F20209B6\n:103900004CE001A810F039FA050006D0708EA8B37B\n:10391000A6F83280ADF806803EE0039CA07F010748\n:103920002DD504F124000090A28EBDF80800214698\n:1039300004F1360301F0BCFC050005D04D452AD04A\n:10394000112D3CD0FFDF3AE0A07F20F00801E07F9E\n:10395000420862F3C711A177810861F30000E077A4\n:1039600094F8210000F01F0084F820002078282817\n:1039700026D129212046FFF7CDFB21E014E04007A6\n:103980000AD5BDF8080004F10E0101F01CFB05008A\n:103990000DD04D4510D100257F1CFFB2022010F044\n:1039A0002DFA401CB842ACD8052D11D008E0A07FFC\n:1039B00020F00400A07703E0112D00D0FFDF0025E8\n:1039C000BDF806007086052D04D0284604B0C8E571\n:1039D000A6F832800020F9E770B50646FFF732FD01\n:1039E000054605F003FE040000D1FFDF6680207865\n:1039F00020F00F00801C20F0F00020302070032009\n:103A0000207295F83E006072BDE8704005F0F1BD8F\n:103A10002DE9F04786B0040000D1FFDF2078B14DDA\n:103A200020F00F00801C20F0F000703020706068E3\n:103A30000178491F1B2933D2DFE801F0FE32323210\n:103A400055FD320EFDFD42FC32323278FCFCFBFAB1\n:103A500032FCFCF9F8FCFC00C6883046FFF7F2FCAB\n:103A60000546304607F045FCE0B16068007A85F80D\n:103A70003E0021212846FFF74DFB3046FEF75AFB5A\n:103A8000304603F0D7FE3146012014F017F8A87F26\n:103A900020F01000A877FFF726FF002800D0FFDFF6\n:103AA00006B05EE5207820F0F00020302070032082\n:103AB000207266806068007A607205F09AFDD8E72F\n:103AC000C5882846FFF7BEFC00B9FFDF60680079B3\n:103AD000012800D0FFDF6068017A06B02846BDE803\n:103AE000F04707F0EBBDC6883046FFF7ABFC05009A\n:103AF00000D1FFDF05F07DFD606831460089288137\n:103B000060684089688160688089A881012013F01D\n:103B1000D5FF0020A875A87F00F003000228BFD1C0\n:103B2000FFF7E1FE0028BBD0FFDFB9E7007928B13D\n:103B30000228B5D03C28B3D0FFDFB1E705F059FD2E\n:103B40006668B6F806A0307A361D012806D0687E71\n:103B5000814605F0D4FA070003D101E0E878F7E7E1\n:103B6000FFDF00220221504610F097F9040000D137\n:103B7000FFDF22212046FFF7CDFA3079012800D05F\n:103B80000220A17F804668F30101A177308B20815C\n:103B9000708B6081B08BA08184F822908DF80880B2\n:103BA000B8680090F86801906A460321504610F00A\n:103BB00074F900B9FFDFB888ADF81000B8788DF857\n:103BC000120004AA0521504610F067F900B9FFDF82\n:103BD000B888ADF80C00F8788DF80E0003AA04211F\n:103BE000504610F05AF900B9FFDF062106F1120025\n:103BF0000DF00EF940B37079800700D5FFDF7179C1\n:103C0000E07D61F34700E075D6F80600A061708999\n:103C1000A083062106F10C000DF0FAF8F0B195F83A\n:103C200025004108607861F3470006E041E039E093\n:103C300071E059E04EE02FE043E06070D5F82600D7\n:103C4000C4F80200688D12E0E07D20F0FE00801CC8\n:103C5000E075D6F81200A061F08AD9E7607820F00C\n:103C6000FE00801C6070F068C4F80200308AE080BA\n:103C7000B8F1010F04D0B8F1020F05D0FFDF0FE754\n:103C80000320FFF7D3F90BE7287E122800D0FFDFCF\n:103C90001120FFF7E3F903E706B02046BDE8F0473F\n:103CA00001F092BD05F0A5FC15F8300F40F00200C0\n:103CB00005E005F09EFC15F8300F40F00400287078\n:103CC000EEE6287E13280AD01528D8D15FF016001A\n:103CD000FFF7C4F906B0BDE8F04705F08ABC142030\n:103CE000F6E70000F0010020A978052909D0042991\n:103CF000C5D105F07EFC022006B0BDE8F047FFF715\n:103D000095B900790028BAD0E87801F02DF905F0CE\n:103D100070FC0320F0E7287E122802D1687E01F0B3\n:103D200023F91120D4E72DE9F05F054600784FF024\n:103D300000080009DFF8B8A891460C46464601285D\n:103D40006ED002286DD007280BD00A286AD0FFDF7A\n:103D5000A9F8006014B1A4F8008066800020BDE8D6\n:103D6000F09F6968012704F108000B784FF0020BFF\n:103D70005B1F4FF6FF721B2B7ED2DFE803F0647DE2\n:103D80007D7D0E7D7D7D7D7D7D217D7D7D2BFDFC81\n:103D9000FBFA7D14D2F9E7F8F700C8884FF0120853\n:103DA000102621469AE14FF01C080A26BCB38888E9\n:103DB000A0806868807920726868C0796072C7E7FF\n:103DC0004FF01B08142654B30320207268688088C3\n:103DD000A080BDE70A793C2ABAD00D1D4FF010082B\n:103DE0002C26E4B16988A180298B6182298B2182EC\n:103DF000698BA182A98BE1826B790246A91D1846C5\n:103E0000FFF7EFFA2979002001290CD084F80FB0D0\n:103E1000FF212176E06120626062A06298E70FE0F6\n:103E20003BE15EE199E1E77320760AF1040090E856\n:103E30000E00DAF81000C4E90930C4E9071287E778\n:103E4000A9F800608AE72C264FF01D08002CF7D057\n:103E5000A28005460F1D897B008861F30000288041\n:103E6000B97A490861F341002880B97A890861F379\n:103E700082002880B97A00E00CE1C90861F3C30030\n:103E80002880B97AAA1C0911491C61F3041000F0BA\n:103E90007F0028807878B91CFFF7A3FA387D05F1F8\n:103EA000090207F11501FFF79CFA387B01F0A9F828\n:103EB0002874787B01F0A5F86874F87EA874787A85\n:103EC000E874387F2875B87B6875388AE882DAF834\n:103ED0001C10A961B97A504697F808A0C1F34111A6\n:103EE000012904D0008C504503D2824609E0FFDF4F\n:103EF00010E0022903D0288820F0600009E0504536\n:103F000004D1288820F06000403002E0288840F08A\n:103F100060002880A4F824A0524607F11D01A8697A\n:103F20009BE011264FF02008002C89D0A280686801\n:103F300004F10A02007920726868007B6072696887\n:103F40008B1D48791946FFF74CFA01E70A264FF016\n:103F50002108002CE9D08888A080686880792072C8\n:103F60006868C07960729AF8301006E078E06BE01B\n:103F700052E07FE019E003E03AE021F00401A6E01E\n:103F80000B264FF02208002CCFD0C888A08068688C\n:103F9000007920726868007A01F033F8607268680E\n:103FA000407A01F02EF8A072D2E61C264FF02608C7\n:103FB000002CBAD0A2806868407960726868007A84\n:103FC000A0720AF1040090E80E00DAF81000C4E9CB\n:103FD0000530C4E90312686800793C2803D04328FF\n:103FE00003D0FFDFB4E62772B2E684F808B0AFE68C\n:103FF00010264FF02408002C97D08888A08068688D\n:10400000807920816868807A608168680089A081F1\n:1040100068688089E0819BE610264FF02308002C19\n:1040200098D08888A0806868C088208168680089E6\n:10403000608168684089A08168688089E0819AF819\n:10404000301021F0020142E030264FF02508002C0C\n:104050009AD0A2806968282249680AF0EEF977E6CA\n:104060002A264FF02F08002C8ED0A28069682222C9\n:10407000091DF2E714264FF01B08002C84D0A28003\n:10408000686800790128B0D02772DAE90710C4E91E\n:1040900003105DE64A46214660E0287A012803D0F5\n:1040A000022817D0FFDF53E610264FF01F08002C20\n:1040B000A2D06888A080A8892081E8896081288AA8\n:1040C000A081688AE0819AF8301021F001018AF815\n:1040D00030103DE64FF012081026688800F07EFF91\n:1040E00036E6287AC8B3012838D0022836D003280B\n:1040F00001D0FFDF2CE609264FF01108002C8FD0ED\n:104100006F883846FFF79EF990F822A0A780687A5A\n:104110002072042138460FF0DBFE052138460FF0EF\n:10412000D7FE002138460FF0D3FE012138460FF0AC\n:10413000CFFE032138460FF0CBFE022138460FF0A8\n:10414000C7FE062138460FF0C3FE072138460FF0A0\n:10415000BFFE504600F008FFFAE5FFE72846BDE83D\n:10416000F05F01F0BBBC70B5012803D0052800D07A\n:10417000FFDF70BD8DB22846FFF764F9040000D15F\n:10418000FFDF20782128F4D005F030FA80B10178E3\n:1041900021F00F01891C21F0F00110310170022182\n:1041A000017245800020A075BDE8704005F021BA7D\n:1041B00021462846BDE870401322FFF746B92DE995\n:1041C000F04116460C00804600D1FFDF307820F029\n:1041D0000F00801C20F0F000103030702078012893\n:1041E00004D0022818D0FFDFBDE8F0814046FFF779\n:1041F00029F9050000D1FFDF0320A87505F0F9F9C2\n:1042000094E80F00083686E80F00F94810F8301FD0\n:1042100041F001010170E7E74046FFF713F905009F\n:1042200000D1FFDFA1884FF6FF700027814202D145\n:10423000E288824203D0814201D1E08840B105F09A\n:10424000D8F994E80F00083686E80F00AF75CBE781\n:10425000A87D0128C8D178230022414613F084FBB1\n:104260000220A875C0E738B50C4624285CD008DCCD\n:1042700020280FD0212825D022284BD0232806D152\n:104280004CE0252841D0262832D03F2851D00725A0\n:10429000284638BD0021052013F0E6FB08B11120A7\n:1042A00038BDA01C0EF0E1FA04F0BDFF0500EFD10F\n:1042B000002208231146052013F056FB0528E7D0FD\n:1042C000FFDFE5E76068FDF708F808B1102038BDAA\n:1042D000618820886A460EF071FD04F0A4FF050095\n:1042E000D6D160680028D3D0BDF800100180CFE798\n:1042F000206820B1FCF7FAFF08B11025C8E7204676\n:104300000EF03BFE1DE00546C2E7A17820880EF0C6\n:1043100086FD16E0086801F08DFEF4E7087800F0ED\n:1043200001000DF0B9FD0CE0618820880EF0C1FCA1\n:1043300007E0087800F001008DF8000068460EF0F4\n:10434000DFF804F070FFDEE770B505460C4608465E\n:10435000FCF7A5FF08B1102070BD202D07D0212D3E\n:104360000DD0222D0BD0252D09D0072070BD20881F\n:10437000A11C0DF065FEBDE8704004F054BF06209E\n:1043800070BD9B482530704708B5342200219848FD\n:104390000AF07DF80120FEF749FE1120FEF75EFECF\n:1043A00093496846263105F0B7F891489DF80020FA\n:1043B00010F8251F62F3470121F00101017000216F\n:1043C00041724FF46171A0F8071002218172FEF76B\n:1043D0008FFE00B1FFDFFDF705F801F0BEF908BD63\n:1043E00010B50C464022002120460AF050F8A07F6C\n:1043F00020F00300A077202020700020A07584F812\n:10440000230010BD70472DE9FC410746FCF721FF52\n:1044100010B11020BDE8FC81754E06F12501D6F8DB\n:1044200025000090B6F82950ADF8045096F82B40BE\n:104430008DF806403846FEF7BDFF0028EAD1FEF7AA\n:1044400057FE0028E6D0009946F8251FB580B471C4\n:10445000E0E710B50446FCF722FF08B1102010BDBC\n:1044600063486349224690F8250026314008FEF74C\n:10447000B8FF002010BD3EB504460D460846FCF7C7\n:104480000EFF08B110203EBD14B143F204003EBD42\n:1044900057488078052803D0042801D008203EBD65\n:1044A000694602A80AF012FC2A4669469DF80800EF\n:1044B000FEF797FF00203EBDFEB50D4604004FF00D\n:1044C000000712D00822FEF79FFE002812D1002616\n:1044D00009E000BF54F826006946FEF720FF0028D7\n:1044E00008D1761CF6B2AE42F4D30DF01CFC10B12C\n:1044F00043F20320FEBD3E4E86F824700CB3002725\n:104500001BE000BF54F8270002A9FEF708FF00B126\n:10451000FFDF9DF808008DF8000054F8270050F8E0\n:10452000011FCDF801108088ADF8050068460DF038\n:104530001FFC00B1FFDF7F1CFFB2AF42E2D386F861\n:1045400024500020FEBD2DE9F0418AB01546884672\n:1045500004001ED00F4608222946FEF755FE00280B\n:1045600011D1002613E000BF54F826006946103030\n:1045700000F01FFD002806D13FB157F82600FCF7D8\n:1045800068FE10B110200AB02EE6761CF6B2AE42DC\n:10459000EAD3681EC6B217E0701CC7B212E000BFB3\n:1045A00054F82600017C4A0854F827100B7CB2EB23\n:1045B000530F05D106221130113109F011FF50B10E\n:1045C0007F1CFFB2AF42EBD3761EF6B2E4D2464672\n:1045D00024B1012003E043F20520D4E700200DF0D0\n:1045E000ECFB10B90DF0F5FB20B143F20420CAE753\n:1045F000F001002064B300270DF1170826E000BF8A\n:1046000054F827006946103000F0D3FC00B1FFDFFA\n:1046100054F82700102250F8111FCDF8011080889F\n:10462000ADF8050054F827100DF1070009F005FF5B\n:1046300096B156F827101022404609F0FEFE684653\n:104640000DF07BFB00B1FFDF7F1CFFB2AF42D7D381\n:10465000FEF713FF002096E7404601F0DFFCEEE78F\n:1046600030B585B00446FDF7BDF830B906200FF02F\n:10467000C5FB10B1062005B030BD2046FCF7E9FDB2\n:1046800018B96068FCF732FE08B11020F3E76088C3\n:104690004AF2B811884206D82078F94D28B101288D\n:1046A00006D0022804D00720E5E7FEF721FD18E038\n:1046B0006078022804D0032802D043F20220DAE70F\n:1046C00085F82F00C1B200200090ADF80400022947\n:1046D0002CD0032927D0FFDF68460DF009FC04F039\n:1046E000A2FD0028C7D1606801F08BFC207858B18A\n:1046F00001208DF800000DF1010001F08FFC6846EB\n:104700000EF0FDFB00B1FFDF207885F82E00FEF7EC\n:10471000B4FE608860B1A88580B20DF046FB00B1A0\n:10472000FFDF0020A7E78DF80500D5E74020FAE776\n:104730004FF46170EFE710B50446FCF7B0FD20B907\n:10474000606838B1FCF7C9FD08B1102010BD606881\n:1047500001F064FCCA4830F82C1F6180C178617098\n:1047600080782070002010BD2DE9F843144689465A\n:104770000646FCF794FDA0B94846FCF7B7FD80B9A2\n:104780002046FCF7B3FD60B9BD4DA878012800D1E3\n:104790003CB13178FF2906D049B143F20400BDE8AD\n:1047A000F8831020FBE7012801D00420F7E7CCB301\n:1047B000052811D004280FD069462046FEF776FE62\n:1047C0000028ECD1217D49B1012909D0022909D065\n:1047D000032909D00720E2E70820E0E7024604E0C9\n:1047E000012202E0022200E003228046234617460F\n:1047F00000200099FEF794FE0028D0D1A0892880DF\n:10480000A07BE875BDF80000A882AF75BDF8001068\n:10481000090701D5A18931B1A1892980C00704D038\n:10482000032003E006E08021F7E70220FEF7FEFB0D\n:1048300086F800804946BDE8F8430020FEF71EBF19\n:104840007CB58F4C05460E46A078022803D003287D\n:1048500001D008207CBD15B143F204007CBD0720C7\n:104860000FF0D4FA10B9A078032806D0FEF70CFC9C\n:1048700028B1A078032804D009E012207CBD1320C1\n:104880007CBD304600F053FB0028F9D1E670FEF7FE\n:104890006FFD0AF058F901208DF800008DF8010035\n:1048A0008DF802502088ADF80400E07D8DF80600F8\n:1048B00068460EF0C1F904F0B6FC0028E0D1A078FB\n:1048C000032805D05FF00400FEF7B0FB00207CBD9C\n:1048D000E07800F03CFB0520F6E71CB510B143F290\n:1048E00004001CBD664CA078042803D0052801D024\n:1048F00008201CBD00208DF8000001218DF801105A\n:104900008DF8020068460EF097F904F08CFC002840\n:10491000EFD1A078052805D05FF00200FEF786FBF6\n:1049200000201CBDE07800F01FFB0320F6E72DE916\n:10493000FC4180460E4603250846FCF7D7FC0028BC\n:1049400066D14046FEF77EFD040004D02078222880\n:1049500004D208205EE543F202005BE5A07F00F090\n:1049600003073EB1012F0CD000203146FEF727FC93\n:104970000500EFD1012F06D0022F1AD0FFDF284605\n:1049800048E50120F1E7A07D3146022801D011B1B0\n:1049900007E011203EE56846FCF758FE0028D9D113\n:1049A0006946404606F04DFE0500E8D10120A0759D\n:1049B000E5E7A07D032804D1314890F83000C00716\n:1049C00001D02EB30EE026B1A07F40071ED40021F7\n:1049D00000E00121404606F054FE0500CFD1A0754D\n:1049E000002ECCD03146404600F0EDFA05461128A5\n:1049F000C5D1A07F4107C2D4316844F80E1F716849\n:104A0000616040F0040020740025B8E71125B6E786\n:104A10001020FFE470B50C460546FEF713FD0100BB\n:104A200005D022462846BDE87040FEF70EBD43F291\n:104A3000020070BD10B5012807D1114B9B78012BE6\n:104A400000D011B143F2040010BD0DF0E0F9BDE853\n:104A5000104004F0E8BB012300F090BA00231A468E\n:104A6000194600F08BBA70B506460C460846FCF7AE\n:104A7000F0FB18B92068FCF712FC18B1102070BDCB\n:104A8000F0010020F84D2A7E112A04D0132A00D309\n:104A90003EB10820F3E721463046FEF77DFE60B1C7\n:104AA000EDE70920132A0DD0142A0BD0A188FF2985\n:104AB000E5D31520FEF7D2FA0020D4E90012C5E9AB\n:104AC0000712DCE7A1881F29D9D31320F2E71CB510\n:104AD000E548007E132801D208201CBD00208DF877\n:104AE000000068460DF02AFC04F09DFB0028F4D17C\n:104AF0001120FEF7B3FA00201CBD2DE9F04FDFF8BE\n:104B000068A3814691B09AF818009B4615460C465A\n:104B1000132803D3FFF7DBFF00281FD12046FCF743\n:104B200098FBE8BB2846FCF794FBC8BB20784FF005\n:104B30000107C0074FF0000102D08DF83A7001E084\n:104B40008DF83A1020788846C0F3C1008DF8000037\n:104B500060788DF80910C10803D0072011B0BDE8B6\n:104B6000F08FB0B3C10701D08DF80970810705D56A\n:104B70009DF8091041F002018DF80910400705D594\n:104B80009DF8090040F004008DF809009DF8090027\n:104B9000810703D540F001008DF80900002000E0F6\n:104BA00015E06E4606EB400162884A81401CA288EF\n:104BB000C0B20A820328F5D32078C0F3C1000128CF\n:104BC00025D0032823D04846FCF743FB28B110200A\n:104BD000C4E7FFE78DF80970D8E799F800004008AE\n:104BE00008D0012809D0022807D0032805D043F2B5\n:104BF0000220B3E78DF8028001E08DF8027048468C\n:104C000050F8011FCDF803108088ADF80700FEF7BB\n:104C1000AFFB8DF801000021424606EB41002B88D6\n:104C2000C3826B888383AB884384EB880385491CEC\n:104C3000C285C9B282860329EFD3E088ADF83C0073\n:104C400068460DF053FC002887D19AF818005546A5\n:104C5000112801D0082081E706200FF0D7F838B1DD\n:104C60002078C0F3C100012804D0032802D006E058\n:104C7000122073E795F8240000283FF46EAFFEF78A\n:104C800003FA022801D2132068E7584600F04FF9D2\n:104C900000289DD185F819B068460DF06DFD04F02F\n:104CA000C2FA040094D1687E00F051F91220FEF798\n:104CB000D5F9204652E770B56B4D287E122801D0F9\n:104CC0000820DCE60DF05BFD04F0ADFA040005D130\n:104CD000687E00F049F91120FEF7C0F92046CEE6C3\n:104CE00070B5064615460C460846FCF7D8FA18B9C2\n:104CF0002846FCF7D4FA08B11020C0E62A4621461F\n:104D000030460EF03BF804F08EFA0028F5D12178F9\n:104D10007F29F2D10520B2E67CB505460C4608464F\n:104D2000FCF797FA08B110207CBD2846FEF78AFBF5\n:104D300020B10078222804D208207CBD43F2020072\n:104D40007CBD494890F83000400701D511207CBD5A\n:104D50002078C00802D16078C00801D007207CBD4F\n:104D6000ADF8005020788DF8020060788DF80300CF\n:104D70000220ADF8040068460CF03BFE04F053FA44\n:104D80007CBD70B586B014460D460646FEF75AFB4C\n:104D900028B10078222805D2082006B06FE643F239\n:104DA0000200FAE72846FCF7A1FA20B944B12046F0\n:104DB000FCF793FA08B11020EFE700202060A080F4\n:104DC000294890F83000800701D51120E5E703A9B4\n:104DD00030460CF05EFE10B104F025FADDE7ADF8C8\n:104DE0000060BDF81400ADF80200BDF81600ADF883\n:104DF0000400BDF81000BDF81210ADF80600ADF8C3\n:104E000008107DB1298809B1ADF80610698809B18B\n:104E1000ADF80210A98809B1ADF80810E98809B108\n:104E2000ADF80410DCB1BDF80610814201D9081AB2\n:104E30002080BDF80210BDF81400814201D9081A83\n:104E40006080BDF80800BDF80410BDF816200144CC\n:104E5000BDF812001044814201D9081AA0806846AA\n:104E60000CF0D5FEB8E70000F00100201CB56C493D\n:104E70000968CDE9001068460DF03AFB04F0D3F95B\n:104E80001CBD1CB500200090019068460DF030FB61\n:104E900004F0C9F91CBD70B505460C460846FCF780\n:104EA000FEF908B11020EAE5214628460DF012F976\n:104EB000BDE8704004F0B7B93EB505460C4608465B\n:104EC000FCF7EDF908B110203EBD002000900190E4\n:104ED0000290ADF800502089ADF8080020788DF8D8\n:104EE0000200606801902089ADF808006089ADF883\n:104EF0000A0068460DF000F904F095F93EBD0EB5C4\n:104F0000ADF800000020019068460DF0F5F804F0BF\n:104F10008AF90EBD10800888508048889080C88823\n:104F200010818888D080002050819081704710B512\n:104F3000044604F0E4F830B1407830B1204604F083\n:104F4000FCFB002010BD052010BD122010BD10B5C7\n:104F500004F0D5F8040000D1FFDF607800B9FFDF6E\n:104F60006078401E607010BD10B504F0C8F80400F1\n:104F700000D1FFDF6078401C607010BD1CB5ADF83B\n:104F800000008DF802308DF803108DF8042068467B\n:104F90000DF0B7FE04F047F91CBD0CB521A2D2E913\n:104FA0000012CDE900120079694601EB501000783B\n:104FB0000CBD0278520804D0012A02D043F202202C\n:104FC0007047FEF7ACB91FB56A46FFF7A3FF684606\n:104FD0000DF008FC04F027F904B010BD70B50C000A\n:104FE00006460DD0FEF72EFA050000D1FFDFA680A1\n:104FF00028892081288960816889A081A889E08129\n:105000003DE500B540B1012805D0022803D00328B2\n:1050100004D0FFDF002000BDFF2000BD042000BD44\n:1050200014610200070605040302010010B50446DE\n:10503000FCF70FF908B1102010BD2078C0F3021062\n:10504000042807D86078072804D3A178102901D84C\n:10505000814201D2072010BDE078410706D42179B2\n:105060004A0703D4000701D4080701D5062010BD64\n:10507000002010BD10B513785C08837F64F3C7135C\n:10508000837713789C08C37F64F30003C377107899\n:10509000C309487863F34100487013781C090B7802\n:1050A00064F347130B701378DB0863F30000487058\n:1050B0005078487110BD10B5C4780B7864F30003C4\n:1050C0000B70C478640864F341030B70C478A408BF\n:1050D00064F382030B70C478E40864F3C3030B70B9\n:1050E0000379117863F30001117003795B0863F3AE\n:1050F0004101117003799B0863F3820111700079FB\n:10510000C00860F3C301117010BD70B514460D46A0\n:10511000064604F06BFA80B10178182221F00F01E5\n:10512000891C21F0F001A03100F8081B214609F08C\n:1051300084F9BDE8704004F05CBA29463046BDE809\n:1051400070401322FEF781B92DE9F047064608A802\n:10515000904690E8300489461F46142200212846D4\n:1051600009F095F90021CAF80010B8F1000F03D03A\n:10517000B9F1000F03D114E03878C00711D02068CE\n:10518000FCF78DF8C0BBB8F1000F07D120681230D2\n:1051900028602068143068602068A8602168CAF818\n:1051A00000103878800724D56068FCF796F818BBA3\n:1051B000B9F1000F21D0FFF7E4F80168C6F86811D3\n:1051C0008188A6F86C11807986F86E0101F013FDD4\n:1051D000F94FEF60626862B196F8680106F26911F2\n:1051E00040081032FEF7FDF810223946606809F0D9\n:1051F00024F90020BDE8F08706E0606820B1E8608F\n:105200006068C6F86401F4E71020F3E730B505469E\n:1052100008780C4620F00F00401C20F0F0011031FF\n:1052200021700020607095F8230030B104280FD061\n:10523000052811D0062814D0FFDF20780121B1EB1A\n:10524000101F04D295F8200000F01F00607030BDE0\n:1052500021F0F000203002E021F0F000303020702A\n:10526000EBE721F0F0004030F9E7F0B591B002270C\n:1052700015460C4606463A46ADF80870092103ABC0\n:1052800005F063F80490002810D004208DF8040085\n:105290008DF80170E034099605948DF818500AA92C\n:1052A000684610F0FCFA00B1FFDF012011B0F0BD3C\n:1052B00010B588B00C460A99ADF80000CBB118685B\n:1052C000CDF80200D3F80400CDF80600ADF80A20AE\n:1052D000102203A809F0B1F868460DF0F3FA03F0C4\n:1052E000A2FF002803D1A17F41F01001A17708B0EF\n:1052F00010BD0020CDF80200E6E72DE9F84F064684\n:10530000808A0D4680B28246FEF79CF804463078CB\n:10531000DFF8A48200274FF00209A8F120080F2827\n:1053200070D2DFE800F06FF23708387D8CC8F1F0FA\n:10533000EFF35FF3F300A07F00F00300022809D031\n:105340005FF0000080F0010150460EF0AFFD050057\n:1053500003D101E00120F5E7FFDF98F85C10C907F1\n:1053600002D0D8F860000BE0032105F11D0012F017\n:10537000BEF8D5F81D009149B0FBF1F201FB120017\n:10538000C5F81D0070686867B068A8672078252890\n:1053900000D0FFDFCAE0A07F00F00300022809D0A0\n:1053A0005FF0000080F0010150460EF07FFD060026\n:1053B00003D101E00120F5E7FFDF3078810702D556\n:1053C0002178252904D040F001003070BDE8F88F25\n:1053D00085F80090307F287106F11D002D36C5E953\n:1053E0000206F3E7A07F00F00300022808D00020A7\n:1053F00080F0010150460EF059FD040004D102E096\n:105400000120F5E7A7E1FFDF2078C10604D50720DA\n:1054100028703D346C60D9E740F008002070D5E773\n:10542000E07F000700D5FFDF307CB28800F0010389\n:1054300001B05046BDE8F04F092106F064B804B948\n:10544000FFDF716821B1102204F1240008F0F5FF9C\n:1054500028212046FDF75EFEA07F00F00300022811\n:105460000ED104F12400002300901A462146504634\n:10547000FFF71EFF112807D029212046FDF74AFE1D\n:10548000307A84F82000A1E7A07F000700D5FFDF75\n:1054900014F81E0F40F008002070E782A761E76152\n:1054A000C109607861F34100014660F382016170D7\n:1054B000307AE0708AE7A07F00F00300022809D06C\n:1054C0005FF0000080F0010150460EF0EFFC040098\n:1054D00003D101E00120F5E7FFDF022104F185009F\n:1054E00012F005F80420287004F5B4706860B4F870\n:1054F00085002882304810387C346C61C5E9028010\n:1055000064E703E024E15BE02DE015E0A07F00F01C\n:105510000300022807D0002080F0010150460EF061\n:10552000C5FC18B901E00120F6E7FFDF324621464D\n:105530005046BDE8F84FE8E504B9FFDF20782128A0\n:10554000A1D93079012803D1E07F40F00800E0774D\n:10555000324621465046FFF7D8FD2046BDE8F84FB9\n:105560002321FDF7D7BD3279AA8005F1080309216F\n:10557000504604F0EAFEE86010B10520287025E7E7\n:10558000A07F00F00300022808D0002080F0010175\n:1055900050460EF08BFC040003D101E00120F5E73A\n:1055A000FFDF04F1620102231022081F0EF005FB49\n:1055B00007703179417009E75002002040420F0026\n:1055C000A07F00F00300022808D0002080F0010135\n:1055D00050460EF06BFC050003D101E00120F5E719\n:1055E000FFDF95F8840000F0030001287AD1A07F46\n:1055F00000F00307E07F10F0010602D0022F04D173\n:1056000033E095F8A000C0072BD0D5F8601121B386\n:1056100095F88320087C62F387000874A17FCA098B\n:10562000D5F8601162F341000874D5F8601166F393\n:1056300000000874AEB1D5F86001102204F1240115\n:10564000883508F0FAFE287E40F001002876287898\n:1056500020F0010005F8880900E016B1022F04D0FF\n:105660002DE095F88800C00727D0D5F85C1121B34C\n:1056700095F88320087C62F387000874A17FCA092B\n:10568000D5F85C1162F341000874D5F85C1166F33B\n:10569000000008748EB1D5F85C01102204F12401D9\n:1056A000883508F0CAFE287840F0010005F8180B8C\n:1056B000287820F0010005F8A009022F44D000202E\n:1056C00000EB400005EBC00090F88800800709D58A\n:1056D00095F87C00D5F86421400805F17D01103271\n:1056E000FDF77FFE8DF8009095F884006A4600F083\n:1056F00003008DF8010095F888108DF8021095F8D8\n:10570000A0008DF803002146504601F05DFA207894\n:10571000252805D0212807D0FFDF2078222803D9AB\n:1057200022212046FDF7F6FCA07F00F003000228AE\n:105730000CD0002080F0010150460EF0C9FB00287B\n:105740003FF44FAEFFDF41E60120B9E70120F1E76A\n:10575000706847703AE6FFDF38E670B5FE4C00250A\n:1057600084F85C50256610F066F804F110012046BC\n:1057700003F0F8FE84F8305070BD70B50D46FDF7AB\n:1057800061FE040000D1FFDF4FF4B872002128460B\n:1057900008F07DFE04F124002861A07F00F00300E2\n:1057A000022809D05FF0010105F1E00010F044F893\n:1057B000002800D0FFDF70BD0221F5E70A46014650\n:1057C00002F1E00010F059B870B50546406886B0A7\n:1057D00001780A2906D00D2933D00E292FD0FFDFFA\n:1057E00006B070BD86883046FDF72CFE040000D15F\n:1057F000FFDF20782128F3D028281BD168680221F8\n:105800000E3001F0D6F9A8B168680821801D01F0BA\n:10581000D0F978B104F1240130460DF00FFA03F00D\n:1058200002FD00B1FFDF06B02046BDE8704029212F\n:10583000FDF770BC06B0BDE8704003F0DABE012190\n:1058400001726868C6883046FDF7FCFD040000D18F\n:10585000FFDFA07F00F00301022902D120F0100039\n:10586000A077207821280AD06868017A09B10079E8\n:1058700080B1A07F00F00300022862D0FFDFA07F8C\n:1058800000F003000228ABD1FEF72DF80028A7D0C6\n:10589000FFDFA5E703F0ADFEA17F08062BD5E07F73\n:1058A000C00705D094F8200000F01F00102820D079\n:1058B0005FF0050084F82300207829281DD02428D3\n:1058C000DDD13146042012F0F9F822212046FDF7FF\n:1058D00021FCA07F00F00300022830D05FF0000020\n:1058E00080F0010130460EF0F3FA0028C7D0FFDF48\n:1058F000C5E70620DEE70420DCE701F0030002280C\n:1059000008D0002080F0010130460EF0CFFA0500EB\n:1059100003D101E00120F5E7FFDF25212046FDF757\n:10592000F9FB03208DF80000694605F1E0000FF057\n:105930009BFF0228A3D00028A1D0FFDF9FE7012012\n:10594000CEE703F056FE9AE72DE9F04387B099467B\n:10595000164688460746FDF775FD04004BD02078B3\n:10596000222848D3232846D0E07F000743D4A07FD5\n:1059700000F00300022809D05FF0000080F0010170\n:1059800038460EF093FA050002D00CE00120F5E74E\n:10599000A07F00F00300022805D001210022384634\n:1059A0000EF07BFA05466946284601F034F9009866\n:1059B00000B9FFDF45B10098E03505612078222865\n:1059C00006D0242804D007E000990020086103E0F5\n:1059D00025212046FDF79EFB00980121417047627A\n:1059E000868001A9C0E902890FF059FF022802D080\n:1059F000002800D0FFDF07B0BDE8F08370B586B0A7\n:105A00000546FDF71FFD017822291ED9807F00F091\n:105A10000300022808D0002080F0010128460EF083\n:105A200045FA04002FD101E00120F5E7FFDF2AE06D\n:105A3000B4F85E0004F1620630440178427829B17E\n:105A400021462846FFF711FCB0B9C9E6ADF804209D\n:105A50000921284602AB04F078FC03900028F4D01A\n:105A600005208DF80000694604F1E0000FF0FCFE0F\n:105A7000022801D000B1FFDF02231022314604F1D9\n:105A80005E000EF0D0F8B4F860000028D0D1A7E690\n:105A900010B586B00446FDF7D5FC017822291BD944\n:105AA000807F00F00300022808D0002080F0010170\n:105AB00020460EF0FBF9040003D101E00120F5E7D8\n:105AC000FFDF06208DF80000694604F1E0000FF0CA\n:105AD000CBFE002800D0FFDF06B010BD2DE9F05F3F\n:105AE00005460C4600270078904601093E4604F121\n:105AF000080BBA4602297DD0072902D00A2909D10C\n:105B000046E0686801780A2905D00D2930D00E29B1\n:105B10002ED0FFDFBBE114271C26002C6BD0808821\n:105B2000A080FDF78FFC5FEA000900D1FFDF99F844\n:105B300017005A46400809F11801FDF752FC686841\n:105B4000C0892082696851F8060FC4F812004868BD\n:105B5000C4F81600A07E01E03002002020F006000C\n:105B600040F00100A07699F81E0040F020014DE0C1\n:105B70001A270A26002CD1D0C088A080FDF762FC2D\n:105B8000050000D1FFDF59462846FFF73FFB7EE1C5\n:105B90000CB1A88BA080287A0B287DD006DC0128C8\n:105BA0007BD0022808D0032804D135E00D2875D019\n:105BB0000E2874D0FFDF6AE11E270926002CADD025\n:105BC000A088FDF73FFC5FEA000900D1FFDF287BDA\n:105BD00000F003000128207A1BD020F00100207281\n:105BE000297B890861F341002072297BC90861F390\n:105BF000820001E041E1F2E02072297B090961F3B2\n:105C0000C300207299F81E0040F0400189F81E1070\n:105C10003DE140F00100E2E713270D26002CAAD059\n:105C2000A088FDF70FFC8146807F00F0030002286A\n:105C300008D0002080F00101A0880EF037F905009F\n:105C400003D101E00120F5E7FFDF99F81E0000F025\n:105C50000302022A50D0686F817801F00301012904\n:105C6000217A4BD021F00101217283789B0863F3E4\n:105C7000410121728378DB0863F38201217283780A\n:105C80001B0963F3C3012172037863F306112172C8\n:105C9000437863F3C71103E061E0A9E090E0A1E07D\n:105CA000217284F809A0C178A172022A29D0027950\n:105CB000E17A62F30001E1720279520862F3410174\n:105CC000E1720279920862F38201E1720279D208EC\n:105CD00062F3C301E1724279217B62F30001217317\n:105CE0004279520862F3410121734279920862F3CA\n:105CF00082012173407928E0A86FADE741F00101EE\n:105D0000B2E74279E17A62F30001E1724279520826\n:105D100062F34101E1724279920862F38201E17219\n:105D20004279D20862F3C301E1720279217B62F306\n:105D3000000121730279520862F341012173027953\n:105D4000920862F3820121730079C00860F3C301F5\n:105D5000217399F80000232831D9262140E0182723\n:105D60001026E4B3A088FDF76DFB8346807F00F02A\n:105D70000300022809D0002080F00101A0880EF065\n:105D800095F85FEA000903D101E00120F4E7FFDFA5\n:105D9000E868A06099F8000040F0040189F800105C\n:105DA00099F80100800708D5012020739BF80000B6\n:105DB00023286CD92721584651E084F80CA066E0CE\n:105DC00015270F265CB1A088FDF73CFB8146062213\n:105DD0005946E86808F0C7FB0120A073A0E041E045\n:105DE00048463CE016270926E4B3287B20724EE0A3\n:105DF000287B19270E26ACB3C4F808A0A4F80CA081\n:105E0000012807D0022805D0032805D0042803D094\n:105E1000FFDF0DE0207207E0697B042801F00F012D\n:105E200041F0800121721ED0607A20F00300607280\n:105E3000A088FDF707FB05460078212827D02328F6\n:105E400000D0FFDFA87F00F00300022813D000205D\n:105E500080F00101A0880EF03BF822212846FDF7D2\n:105E600059F914E004E0607A20F00300401CDEE7FA\n:105E7000A8F8006010E00120EAE70CB16888A08073\n:105E8000287A68B301280AD002284FD0FFDFA8F88B\n:105E900000600CB1278066800020BDE8F09F1527C8\n:105EA0000F26002CE4D0A088FDF7CCFA807F00F00C\n:105EB0000300022808D0002080F00101A0880DF026\n:105EC000F5FF050003D101E00120F5E7FFDFD5F87C\n:105ED0001D000622594608F046FB84F80EA0D6E7BE\n:105EE00017270926002CC3D0A088FDF7ABFA8146FE\n:105EF000807F00F00300022808D0002080F001011C\n:105F0000A0880DF0D3FF050003D101E00120F5E7E3\n:105F1000FFDF6878800701D5022000E001202072B1\n:105F200099F800002328B2D9272159E719270E260E\n:105F3000002C9DD0A088FDF785FA5FEA000900D10A\n:105F4000FFDFC4F808A0A4F80CA084F808A0A07A89\n:105F500040F00300A07299F81E10C90961F3820095\n:105F6000A07299F81F2099F81E1012EAD11F05D0CF\n:105F700099F8201001F01F0110292BD020F0080003\n:105F8000A07299F81F10607A61F3C3006072697A99\n:105F900001F003010129A2D140F00400607299F8D8\n:105FA0001E0000F003000228E87A16D0217B60F37F\n:105FB00000012173AA7A607B62F300006073EA7AC1\n:105FC000520862F341012173A97A490861F3410043\n:105FD00060735CE740F00800D2E7617B60F300018A\n:105FE0006173AA7A207B62F300002073EA7A520878\n:105FF00062F341016173A97A490861F3410020739A\n:1060000045E710B5FE4C30B10146102204F12000E6\n:1060100008F013FA012084F8300010BD10B50446D2\n:1060200000F0E9FDF64920461022BDE8104020317D\n:1060300008F003BA70B5F24D06004FF0000413D01B\n:10604000FBF707F908B110240CE00621304608F0F0\n:1060500071FA411C05D028665FF0010085F85C00EC\n:1060600000E00724204670BD0020F7E7007810F01C\n:106070000F0204D0012A05D0022A0CD110E0000939\n:1060800009D10AE00009012807D0022805D0032819\n:1060900003D0042801D00720704708700020704703\n:1060A0000620704705282AD2DFE800F003070F1703\n:1060B0001F00087820F0FF001EE0087820F00F0095\n:1060C000401C20F0F000103016E0087820F00F009F\n:1060D000401C20F0F00020300EE0087820F00F0087\n:1060E000401C20F0F000303006E0087820F00F006F\n:1060F000401C20F0F000403008700020704707205E\n:1061000070472DE9F041804688B00D4600270846CB\n:10611000FBF7ECF8A8B94046FDF794F9040003D06A\n:106120002078222815D104E043F2020008B0BDE82F\n:10613000F08145B9A07F410603D500F00300022895\n:1061400001D01020F2E7A07FC10601D4010702D5DB\n:106150000DB10820EAE7E17F090701D50D20E5E749\n:1061600000F0030002280DD165B12846FEF75EFF5E\n:106170000700DBD1FBF736FB20B9E878800701D5B3\n:106180000620D3E7A07F00F00300022808D00020FB\n:1061900080F0010140460DF089FE060002D00FE0BC\n:1061A0000120F5E7A07F00F0030002280ED00020B8\n:1061B00080F00101002240460DF06FFE060007D07E\n:1061C000A07F00F00300022804D009E00120EFE7DF\n:1061D0000420ABE725B12A4631462046FEF74AFFA8\n:1061E0006946304600F017FD009800B9FFDF0099BE\n:1061F000022006F1E0024870C1F824804A610022C2\n:106200000A81A27F02F00302022A1CD00120087139\n:10621000287800F00102087E62F3010008762A78EF\n:10622000520862F3820008762A78920862F3C3006B\n:1062300008762A78D20862F30410087624212046D2\n:10624000FCF768FF33E035B30871301D88613078A2\n:10625000400908777078C0F340004877287800F04C\n:106260000102887F62F301008877A27FD20962F37E\n:1062700082008877E27F62F3C3008877727862F3E6\n:1062800004108877A878C87701F1210228462031C8\n:10629000FEF711FF03E00320087105200876252191\n:1062A0002046FCF737FFA07F20F04000A07701A92F\n:1062B00000980FF0F4FA022801D000B1FFDF384651\n:1062C00034E72DE9FF4F8DB09A4693460D460027DF\n:1062D0000D98FDF7B7F8060006D03078262806D0CE\n:1062E000082011B0BDE8F08F43F20200F9E7B07F5B\n:1062F00000F00309B9F1020F11D04DB95846FEF76D\n:1063000095FE0028EDD1B07F00F00300022806D0F2\n:10631000BBF1000F11D0FBF765FA20B10DE0BBF126\n:10632000000F50D109E006200DF068FD28B19BF860\n:106330000300800701D50620D3E7B07F00F00300FB\n:10634000022809D05FF0000080F001010D980DF0E7\n:10635000ADFD040003D101E00120F5E7FFDF852D4D\n:1063600027D007DCEDB1812D1DD0822D1DD0832DCE\n:1063700008D11CE0862D1ED0882D1ED0892D1ED060\n:106380008A2D1ED00F2020710F281CD003F02EF96B\n:10639000D8B101208DF81400201D06902079B0B1ED\n:1063A00056E10020EFE70120EDE70220EBE70320B4\n:1063B000E9E70520E7E70620E5E70820E3E709200D\n:1063C000E1E70A20DFE707208BE7112089E7B9F131\n:1063D000020F03D0A56F03D1A06F02E0656FFAE74B\n:1063E000606F804631D04FF0010001904FF0020005\n:1063F00000905A4621463046FEF73CFE02E000007F\n:10640000300200209BF8000000F00101A87861F341\n:106410000100A870B17FC90961F38200A870F17F03\n:1064200061F3C300A870617861F30410A87020784C\n:10643000400928706078C0F3400068709BF8020043\n:10644000E87000206871287103E0022001900120AB\n:106450000090A87898F80210C0F3C000C1F3C00102\n:10646000084003902CD05046FAF7F3FEC0BBDAF890\n:106470000C00FAF7EEFE98BBDAF81C00FAF7E9FE1A\n:1064800070BBDAF80C00A060DAF81C00E0606078FD\n:1064900098F8012042EA500161F34100607098F8D9\n:1064A0000210C0B200EA111161F300006070002018\n:1064B0002077009906F11700022907D0012106E094\n:1064C000607898F8012002EA5001E5E7002104EB2A\n:1064D000810148610199701C022902D0012101E06B\n:1064E00028E0002104EB81014861A87800F0030056\n:1064F000012857D198F8020000F00300012851D17B\n:10650000B9F1020F04D02A1D691D5846FEF7D3FDCC\n:10651000287998F8041008408DF82C00697998F8CB\n:10652000052011408DF8301008433BD05046FAF753\n:1065300090FE08B11020D4E60AF110018B46B9F1A3\n:10654000020F17D00846002104F18C03CDE90003A7\n:1065500004F5AE7202920BAB2046039AFEF7F4FDEF\n:106560000028E8D1B9F1020F08D0504608D14FF009\n:10657000010107E050464FF00101E5E75846F5E715\n:106580004FF0000104F1A403CDE9000304F5B0725B\n:10659000029281F001010CAB2046039AFEF7D4FD74\n:1065A0000028C8D16078800733D4A87898F8021002\n:1065B000C0F38000C1F3800108432AD0297898F8FD\n:1065C0000000F94AB9F1020F06D032F81120430059\n:1065D000DA4002F003070AE032F810204B00DA40FC\n:1065E00012F0030705D0012F0AD0022F0AD0032F83\n:1065F00006D0039A6AB1012906D0042904D008E024\n:106600000227F6E70127F4E7012801D0042800D18A\n:106610000427B07F40F08000B077F17F039860F3EB\n:106620000001F1776078800705D50320A0710398F9\n:1066300070B9002029E00220022F18D0012F18D0B5\n:10664000042F2AD00020A071B07F20F08000B07706\n:1066500025213046FCF75EFD05A904F1E0000FF0AE\n:1066600003F910B1022800D0FFDF002039E6A07145\n:10667000DFE7A0710D22002104F1200007F007FFE1\n:10668000207840F00200207001208DF8100004AA4C\n:1066900031460D9800F098FADAE70120A071D7E7AB\n:1066A0002DE9F04387B09046894604460025FCF763\n:1066B000C9FE060006D03078272806D0082007B08B\n:1066C000BDE8F08343F20200F9E7B07F00F0030079\n:1066D000022809D05FF0000080F0010120460DF093\n:1066E000E5FB040003D101E00120F5E7FFDFA77916\n:1066F0005FEA090005D0012821D0B9F1020F26D1A7\n:1067000010E0B8F1000F22D1012F05D0022F05D0E3\n:10671000032F05D0FFDF2EE00C252CE001252AE019\n:10672000022528E04046FAF794FDB0B9032F0ED1B8\n:106730001022414604F11D0007F07FFE1BE0012FEF\n:1067400002D0022F03D104E0B8F1000F13D00720CC\n:10675000B5E74046FAF77DFD08B11020AFE71022FB\n:10676000002104F11D0007F092FE0621404607F0CB\n:10677000E1FEC4F81D002078252140F002002070C1\n:106780003046FCF7C7FC2078C10713D020F0010089\n:10679000207002208DF8000004F11D0002908DF899\n:1067A00004506946C3300FF05FF8022803D010B1DF\n:1067B000FFDF00E02577002081E730B587B00D4688\n:1067C0000446FCF73FFE98B1807F00F003000228EA\n:1067D00011D0002080F0010120460DF067FB04007D\n:1067E0000ED02846FAF735FD38B1102007B030BD7D\n:1067F00043F20200FAE70120ECE72078400701D4D9\n:106800000820F3E7294604F13D002022054607F061\n:1068100014FE207840F01000207001070FD520F002\n:106820000800207007208DF80000694604F1E000A0\n:1068300001950FF019F8022801D000B1FFDF002008\n:10684000D4E770B50D460646FCF7FCFD18B101789B\n:10685000272921D102E043F2020070BD807F00F0C1\n:106860000300022808D0002080F0010130460DF01E\n:106870001DFB040003D101E00120F5E7FFDFA07953\n:10688000022809D16078C00706D02A462146304642\n:10689000FEF7EBFC10B10FE0082070BDB4F860000B\n:1068A0000E280BD204F1620102231022081F0DF002\n:1068B00084F9012101704570002070BD112070BD68\n:1068C00070B5064614460D460846FAF7C2FC18B9DC\n:1068D0002046FAF7E4FC08B1102070BDA6F57F4011\n:1068E000FF380ED03046FCF7ADFD38B14178224676\n:1068F0004B08811C1846FCF774FD07E043F20200C8\n:1069000070BD2046FDF7A5FD0028F9D11021E01D3E\n:1069100010F0EDFDE21D294604F1170000F08BF99F\n:10692000002070BD2DE9F04104468AB01546884626\n:1069300000270846FAF7DAFC18B92846FAF7D6FC19\n:1069400018B110200AB0BDE8F0812046FCF77AFDAE\n:10695000060003D0307827281BD102E043F2020062\n:10696000F0E7B07F00F00300022809D05FF00000DC\n:1069700080F0010120460DF099FA040003D101E0F6\n:106980000120F5E7FFDF2078400702D56078800717\n:1069900001D40820D6E7B07F00F00300022805D01C\n:1069A000A06F05D1A16F04E01C610200606FF8E7E1\n:1069B000616F407800B19DB1487810B1B8F1000F17\n:1069C0000ED0ADB1EA1D06A8E16800F034F910223E\n:1069D00006A905F1170007F003FD18B1042707E029\n:1069E0000720AFE71022E91D04F12D0007F025FD77\n:1069F000B8F1000F06D0102208F1070104F11D00C4\n:106A000007F01BFD2078252140F002002070304661\n:106A1000FCF780FB2078C10715D020F00100207022\n:106A200002208DF8000004F11D0002901030039048\n:106A30008DF804706946B3300EF016FF022803D0BB\n:106A400010B1FFDF00E0277700207BE7F8B515469F\n:106A50000E460746FCF7F6FC040004D020782228F6\n:106A600004D00820F8BD43F20200F8BDA07F00F07A\n:106A70000300022802D043F20500F8BD3046FAF7C1\n:106A8000E8FB18B92846FAF7E4FB08B11020F8BD76\n:106A900000953288B31C21463846FEF709FC1128C0\n:106AA00015D00028F3D1297C4A08A17F62F3C711D1\n:106AB000A177297CE27F61F30002E277297C8908D3\n:106AC00084F82010A17F21F04001A177F8BDA17FBB\n:106AD0000907FBD4D6F80200C4F83600D6F8060041\n:106AE000C4F83A003088A0861022294604F1240018\n:106AF00007F0A3FC287C4108E07F61F34100E077C8\n:106B0000297C61F38200E077287C800884F82100EA\n:106B1000A07F40F00800A0770020D3E770B50D46B5\n:106B200006460BB1072070BDFCF78CFC040007D0B3\n:106B30002078222802D3A07F800604D4082070BDCC\n:106B400043F2020070BDADB1294630460CF076F834\n:106B500002F069FB297C4A08A17F62F3C711A17783\n:106B6000297CE27F61F30002E277297C890884F8BE\n:106B7000201004E030460CF084F802F054FBA17FB2\n:106B800021F02001A17770BD70B50D46FCF75AFCCD\n:106B9000040005D02846FAF782FB20B1102070BD12\n:106BA00043F2020070BD29462046FEF72FFB00206D\n:106BB00070BD04E010F8012B0AB100207047491E97\n:106BC00089B2F7D20120704770B51546064602F02B\n:106BD0000DFD040000D1FFDF207820F00F00801CA5\n:106BE00020F0F0002030207066802868A060BDE8AA\n:106BF000704002F0FEBC10B5134C94F83000002831\n:106C000008D104F12001A1F110000EF06FFE012067\n:106C100084F8300010BD10B190F8B9202AB10A48AC\n:106C200090F8350018B1002003E0B83001E00648C4\n:106C300034300860704708B50023009313460A46B5\n:106C40000DF031FB08BD00003002002018B1817842\n:106C5000012938D101E010207047018842F6011265\n:106C6000881A914231D018DC42F60102A1EB0200F1\n:106C700091422AD00CDC41B3B1F5C05F25D06FF44E\n:106C8000C050081821D0A0F57060FF381BD11CE05F\n:106C900001281AD002280AD117E0B0F5807F14D05D\n:106CA00008DC012811D002280FD003280DD0FF28BE\n:106CB00009D10AE0B0F5817F07D0A0F580700338D4\n:106CC00003D0012801D0002070470F2070470A2808\n:106CD0001FD008DC0A2818D2DFE800F0191B1F1F9C\n:106CE000171F231D1F21102815D008DC0B2812D0D8\n:106CF0000C2810D00D2816D00F2806D10DE0112831\n:106D00000BD084280BD087280FD003207047002099\n:106D1000704705207047072070470F2070470420F8\n:106D20007047062070470C20704743F202007047FE\n:106D300038B50C46050041D06946FFF797F90028A1\n:106D400019D19DF80010607861F302006070694607\n:106D5000681CFFF78BF900280DD19DF800106078B2\n:106D600061F3C5006070A978C1F34101012903D026\n:106D7000022905D0072038BD217821F0200102E04A\n:106D8000217841F020012170410704D0A978C90879\n:106D900061F386106070607810F0380F07D0A97822\n:106DA000090961F3C710607010F0380F02D16078E4\n:106DB000400603D5207840F040002070002038BD08\n:106DC00070B504460020088015466068FFF7B0FFE4\n:106DD000002816D12089A189884211D8606880785E\n:106DE000C0070AD0B1F5007F0AD840F20120B1FBFC\n:106DF000F0F200FB1210288007E0B1F5FF7F01D907\n:106E00000C2070BD01F201212980002070BD10B559\n:106E10000478137864F3000313700478640864F34F\n:106E2000410313700478A40864F382031370047898\n:106E3000E40864F3C30313700478240964F30413AF\n:106E400013700478640964F34513137000788009A3\n:106E500060F38613137031B10878C10701D1800740\n:106E600001D5012000E0002060F3C713137010BDAE\n:106E70004278530702D002F0070306E012F0380F01\n:106E800002D0C2F3C20300E001234A7863F3020296\n:106E90004A70407810F0380F02D0C0F3C20005E00D\n:106EA000430702D000F0070000E0012060F3C502B4\n:106EB0004A7070472DE9F04F95B00D00824613D00F\n:106EC00012220021284607F0E2FA4FF6FF7B05AABE\n:106ED0000121584607F0A3F80024264637464FF410\n:106EE00020586FF4205972E0102015B0BDE8F08FE3\n:106EF0009DF81E0001280AD1BDF81C1041450BD099\n:106F000011EB09000AD001280CD002280CD0042C67\n:106F10000ED0052C0FD10DE0012400E00224BDF8B5\n:106F20001A6008E0032406E00424BDF81A7002E0A9\n:106F3000052400E00624BDF81A10514547D12C74F1\n:106F4000BEB34FF0000810AA4FF0070ACDE9028245\n:106F5000CDE900A80DF13C091023CDF81090424670\n:106F60003146584607F02BF908BBBDF83C002A46CD\n:106F7000C0B210A90EF045FDC8B9AE81CFB1CDE9C0\n:106F800000A80DF1080C0AAE40468CE8410213231C\n:106F900000223946584607F012F940B9BDF83C00C6\n:106FA000F11CC01EC0B22A1D0EF02BFD10B1032033\n:106FB0009BE70AE0BDF82900E881062C05D19DF881\n:106FC0001E00A872BDF81C00288100208DE705A8CE\n:106FD00007F031F800288BD0FFF779FE85E72DE91F\n:106FE000F0471C46DDE90978DDF8209015460E00D3\n:106FF000824600D1FFDF0CB1208818B1D5B1112035\n:10700000BDE8F087022D01D0012100E0002106F14A\n:10701000140005F0CDFEA8F8000002463B462946C4\n:10702000504603F092F9C9F8000008B9A41C3C606E\n:107030000020E5E71320E3E7F0B41446DDE904524D\n:107040008DB1002314B1022C09D101E0012306E027\n:107050000D7CEE0703D025F0010501230D742146B8\n:10706000F0BC04F050BA1A80F0BC70472DE9FE4F16\n:1070700091461A881C468A468046FAB102AB4946B8\n:1070800003F063F9050019D04046A61C27880DF0CF\n:1070900050F83246072629463B4600960CF05FFC26\n:1070A00020882346CDE900504A4651464046FFF726\n:1070B000C3FF002020800120BDE8FE8F0020FBE7F9\n:1070C0002DE9F04786B082460EA8904690E8B000C1\n:1070D000894604AA05A903A88DE807001E462A468A\n:1070E00021465046FFF77BFF039901B1012139701A\n:1070F000002818D1FA4904F1140204AB086003987F\n:1071000005998DE8070042464946504606F003FAC5\n:10711000A8B1092811D2DFE800F005080510100A0F\n:107120000C0C0E00002006B06AE71120FBE70720D8\n:10713000F9E70820F7E70D20F5E70320F3E7BDF8AE\n:1071400010100398CDE9000133462A4621465046E7\n:10715000FFF772FFE6E72DE9F04389B01646DDE957\n:1071600010870D4681461C461422002103A807F013\n:107170008EF9012002218DF810108DF80C008DF889\n:107180001170ADF8146064B1A278D20709D08DF8FF\n:107190001600E088ADF81A00A088ADF81800A068C5\n:1071A000079008A80095CDE90110424603A948467A\n:1071B0006B68FFF785FF09B0BDE8F083F0B58BB0D1\n:1071C00000240646069407940727089405A8099406\n:1071D000019400970294CDE903400D461023224606\n:1071E000304606F0ECFF78B90AA806A9019400978A\n:1071F0000294CDE90310BDF8143000222946304630\n:1072000006F07BFD002801D0FFF761FD0BB0F0BD5B\n:1072100006F00CBC2DE9FC410C468046002602F02D\n:10722000E5F9054620780D287ED2DFE800F0BC079E\n:1072300013B325BD49496383AF959B00A8480068F7\n:1072400020B1417841F010014170ADE0404602F0BC\n:10725000FDF9A9E0042140460CF028FE070000D10A\n:10726000FFDF07F11401404605F037FDA5BB1321F0\n:107270004046FDF7CFFB97E0042140460CF016FE98\n:10728000070000D1FFDFE088ADF800000020B881E2\n:107290009DF80000010704D5C00602D5A088B8817A\n:1072A00005E09DF8010040067ED5A088F88105B96B\n:1072B000FFDF22462946404601F0ACFC022673E07F\n:1072C000E188ADF800109DF8011009060FD50728D8\n:1072D00003D006280AD00AE024E0042140460CF03E\n:1072E000E5FD060000D1FFDFA088F0810226CDB9C0\n:1072F000FFDF17E0042140460CF0D8FD070000D165\n:10730000FFDF07F1140006F0C8FB90F0010F02D177\n:10731000E079000648D5387C022640F00200387437\n:1073200005B9FFDF224600E03DE02946404601F076\n:1073300071FC39E0042140460CF0B8FD017C002DC1\n:1073400001F00206C1F340016171017C21F00201EC\n:107350000174E7D1FFDFE5E702260121404602F094\n:10736000A7F921E0042140460CF0A0FD0546606825\n:1073700000902089ADF8040001226946404602F0E1\n:10738000B8F9287C20F0020028740DE0002DC9D146\n:10739000FFDFC7E7022600214046FBF799F8002DE2\n:1073A000C0D1FFDFBEE7FFDF3046BDE8FC813EB560\n:1073B0000C0009D001466B4601AA002006F084FFAC\n:1073C00020B1FFF784FC3EBD10203EBD0020208090\n:1073D000A0709DF8050002A900F00700FEF762FE0C\n:1073E00050B99DF8080020709DF8050002A9C0F36F\n:1073F000C200FEF757FE08B103203EBD9DF808000D\n:1074000060709DF80500C109A07861F30410A070B8\n:107410009DF80510890961F3C300A0709DF8041060\n:10742000890601D5022100E0012161F342009DF8A7\n:10743000001061F30000A07000203EBD70B514463E\n:1074400006460D4651EA040005D075B10846F9F725\n:1074500044FF78B901E0072070BD2946304606F0A8\n:107460009AFF10B1BDE8704031E454B12046F9F7FD\n:1074700034FF08B1102070BD21463046BDE8704091\n:1074800095E7002070BD2DE9FC5F0C46904605464F\n:10749000002701780822007A3E46B2EB111F7DD109\n:1074A00004F10A0100910A31821E4FF0020A04F130\n:1074B000080B0191092A72D2DFE802F0EDE005F530\n:1074C00028287BAACE00688804210CF0EFFC060077\n:1074D00000D1FFDFB08928B152270726C3E00000A2\n:1074E0009402002051271026002C7DD06888A080AF\n:1074F0000120A071A88900220099FFF79FFF0028B2\n:1075000073D1A8892081288AE081D1E0B5F8129052\n:10751000072824D1E87B000621D5512709F1140062\n:1075200086B2002CE1D0A88900220099FFF786FFDF\n:1075300000285AD16888A08084F806A0A8892081F4\n:107540000120A073288A2082A4F81290A88A0090B3\n:1075500068884B46A969019A01F038FBA8E05027DA\n:1075600009F1120086B2002C3ED0A88900225946AB\n:10757000FFF764FF002838D16888A080A889E080E0\n:10758000287A072813D002202073288AE081E87B1C\n:10759000C0096073A4F81090A88A01E085E082E039\n:1075A000009068884B4604F11202A969D4E70120D3\n:1075B000EAE7B5F81290512709F1140086B2002CC1\n:1075C00066D0688804210CF071FC83466888A0802E\n:1075D000A88900220099FFF731FF00286ED184F8B6\n:1075E00006A0A889208101E052E067E00420A07392\n:1075F000288A2082A4F81290A88A009068884B46B6\n:10760000A969019A01F0E2FAA989ABF80E104FE0DE\n:107610006888FBF717FF0746688804210CF046FCD2\n:10762000064607B9FFDF06B9FFDF687BC00702D057\n:107630005127142601E0502712264CB36888A080F9\n:10764000502F06D084F806A0287B594601F0CEFAC8\n:107650002EE0287BA11DF9E7FE49A88949898142CE\n:1076600005D1542706269CB16888A08020E05327C6\n:107670000BE06888A080A889E08019E06888042170\n:107680000CF014FC00B9FFDF55270826002CF0D1C0\n:10769000A8F8006011E056270726002CF8D068886B\n:1076A000A080002013E0FFDF02E0012808D0FFDF08\n:1076B000A8F800600CB1278066800020BDE8FC9F20\n:1076C00057270726002CE3D06888A080687AA0712D\n:1076D000EEE7401D20F0030009B14143091D01EB15\n:1076E0004000704713B5DB4A00201071009848B184\n:1076F000002468460CF0F7F9002C02D1D64A009914\n:1077000011601CBD01240020F4E770B50D4614463D\n:10771000064686B05C220021284606F0B8FE04B971\n:10772000FFDFA0786874A2782188284601F089FAE2\n:107730000020A881E881228805F11401304605F077\n:10774000B0FA6A460121304606F069FC1AE000BF33\n:107750009DF80300000715D5BDF806103046FFF769\n:107760002DFD9DF80300BDF8061040F010008DF8C7\n:107770000300BDF80300ADF81400FF233046059A5E\n:1077800006F0D1FD684606F056FC0028E0D006B0B1\n:1077900070BD10B50C4601F1140005F0BAFA0146AF\n:1077A000627C2046BDE8104001F080BA30B5044646\n:1077B000A84891B04FF6FF75C18905AA284606F082\n:1077C0002EFC30E09DF81E00A0422AD001282AD1CC\n:1077D000BDF81C00B0F5205F03D042F601018842DD\n:1077E00021D1002002AB0AAA0CA9019083E807006E\n:1077F00007200090BDF81A1010230022284606F03A\n:10780000DEFC38B9BDF828000BAAC0B20CA90EF0F6\n:10781000F8F810B1032011B030BD9DF82E00A04241\n:1078200001D10020F7E705A806F005FC0028C9D023\n:107830000520F0E770B5054604210CF037FB040085\n:1078400000D1FFDF04F114010C46284605F045FA8B\n:1078500021462846BDE8704005F046BA70B58AB0AA\n:107860000C460646FBF7EEFD050014D028782228CA\n:1078700027D30CB1A08890B101208DF80C00032013\n:107880008DF8100000208DF8110054B1A088ADF8DB\n:107890001800206807E043F202000AB070BD09201A\n:1078A000FBE7ADF818000590042130460CF0FEFA15\n:1078B000040000D1FFDF04F1140005F040FA0007D6\n:1078C00001D40820E9E701F091FE60B108A8022187\n:1078D0000094CDE9011095F8232003A93046636890\n:1078E000FFF7EEFBD9E71120D7E72DE9F04FB2F80B\n:1078F00002A0834689B0154689465046FBF7A2FD93\n:107900000746042150460CF0D1FA0026044605969D\n:107910004FF002080696ADF81C6007B9FFDF04B906\n:10792000FFDF4146504603F055FF50B907AA06A9AC\n:1079300005A88DE807004246214650466368FFF7D8\n:107940004EFB444807AB0660DDE9051204F1140064\n:10795000CDF80090CDE90320CDE9013197F823203F\n:10796000594650466B6805F033FA06000AD0022EDD\n:1079700004D0032E14D0042E00D0FFDF09B030460F\n:10798000BDE8F08FBDF81C000028F7D00599CDE9BF\n:1079900000104246214650466368FFF74DFBEDE775\n:1079A000687840F008006870E8E710B50C46FFF70B\n:1079B000BFF900280BD1607800F00701012905D13B\n:1079C00010F0380F02D02078810601D5072010BDB5\n:1079D00040F0C8002070002010BD2DE9F04F99B094\n:1079E00004464FF000081B48ADF81C80ADF820801D\n:1079F000ADF82480A0F80880ADF81480ADF81880A8\n:107A0000ADF82880ADF82C80007916460D46474623\n:107A1000012808D0022806D0032804D0042802D068\n:107A2000082019B0ACE72046F9F713FCF0BB284654\n:107A3000F9F70FFCD0BB6068F9F758FCB0BB606881\n:107A400068B160892189884202D8B1F5007F05D9E3\n:107A50000C20E6E7940200201800002080460EAAC1\n:107A600006A92846FFF7ACF90028DAD168688078C3\n:107A7000C0F34100022808D19DF8190010F0380F1A\n:107A800003D02869F9F729FC80B905A92069FFF717\n:107A90004FF90028C5D1206950B1607880079DF862\n:107AA000150000F0380002D5F0B301E011E0D8BBBA\n:107AB0009DF8140080060ED59DF8150010F0380FC3\n:107AC00003D06068F9F709FC18B96068F9F70EFC93\n:107AD00008B11020A5E70BA906A8FFF7C9F99DF882\n:107AE0002D000BA920F00700401C8DF82D006069C7\n:107AF000FFF75BFF002894D10AA9A069FFF718F9E6\n:107B000000288ED19DF8280080062BD4A06940B1B2\n:107B10009DF8290000F00701012923D110F0380F4A\n:107B200020D0E06828B100E01CE00078D0B11C282B\n:107B300018D20FAA611C2046FFF769F901213846C7\n:107B400061F30F2082468DF85210B94642F60300C9\n:107B50000F46ADF850000DF13F0218A928680DF04E\n:107B600052FF08B107205CE79DF8600015A9CDF829\n:107B70000090C01CCDE9019100F0FF0B00230BF237\n:107B80000122514614A806F075F9E8BBBDF854006F\n:107B90000C90FB482A8929690092CDE901106B8974\n:107BA000BDF838202868069906F064F9010077D1FD\n:107BB00020784FF0020AC10601D4800616D58DF850\n:107BC000527042F60210ADF85000CDF80C9008A9A2\n:107BD00003AACDF800A0CDE90121002340F2032241\n:107BE00014A80B9906F046F9010059D1E4484D4616\n:107BF00008380089ADF83D000FA8CDE90290CDF816\n:107C00000490CDF8109000E00CE04FF007095B46BF\n:107C10000022CDF80090BDF854104FF6FF7006F02A\n:107C20006CF810B1FFF753F8FBE69DF83C00000636\n:107C300024D52946012060F30F218DF852704FF4AE\n:107C400024500395ADF8500062789DF80C00002395\n:107C500062F300008DF80C006278CDF800A05208A5\n:107C600062F341008DF80C0003AACDE9012540F232\n:107C7000032214A806F0FEF8010011D1606880B359\n:107C80002069A0B905A906A8FFF7F2F86078800777\n:107C900007D49DF8150020F038008DF8150006E097\n:107CA00077E09DF8140040F040008DF814008DF846\n:107CB000527042F60110ADF85000208940F20121C7\n:107CC000B0FBF1F201FB1202606809ABCDF8008055\n:107CD000CDE90103002314A8059906F0CBF80100B3\n:107CE00057D12078C00728D00395A06950B90AA9B8\n:107CF00006A8FFF7BDF89DF8290020F00700401CFA\n:107D00008DF829009DF8280007A940F040008DF863\n:107D100028008DF8527042F60310ADF8500003AA07\n:107D2000CDF800A0CDE90121002340F2032214A8E0\n:107D30000A9906F09FF801002BD1E06868B3294644\n:107D4000012060F30F218DF8527042F60410ADF857\n:107D50005000E068002302788DF8582040788DF8B4\n:107D60005900E06816AA4088ADF85A00E06800792A\n:107D70008DF85C00E068C088ADF85D00CDF800903B\n:107D8000CDE901254FF4027214A806F073F8010042\n:107D900003D00C9800F0B6FF43E679480321083879\n:107DA000017156B100893080BDF824007080BDF8A3\n:107DB0002000B080BDF81C00F080002031E670B5D6\n:107DC00001258AB016460B46012802D0022816D19A\n:107DD00004E08DF80E504FF4205003E08DF80E5063\n:107DE00042F60100ADF80C005BB10024601C60F3AA\n:107DF0000F2404AA08A918460DF005FE18B10720A3\n:107E00004BE5102049E504A99DF820205C48CDE908\n:107E10000021801E02900023214603A802F20122C5\n:107E200006F028F810B1FEF752FF36E5544808383E\n:107E30000EB1C1883180057100202EE5F0B593B0F8\n:107E4000044601268DF83E6041F601000F46ADF86C\n:107E50003C0011AA0FA93046FFF7B1FF002837D127\n:107E60002000474C4FF00005A4F1080432D01C223A\n:107E7000002102A806F00BFB9DF808008DF83E607B\n:107E800040F020008DF8080042F60520ADF83C00D7\n:107E900004200797ADF82C00ADF8300039480A905F\n:107EA0000EA80D900E950FA80990ADF82E506A46B9\n:107EB00009A902A8FFF791FD002809D1BDF800002B\n:107EC0006081BDF80400A081401CE0812571002084\n:107ED00013B0F0BD6581A581BDF84400F4E72DE93C\n:107EE000F74F2749A0B00024083917940A79A14612\n:107EF000012A04D0022A02D0082023B040E5CA8813\n:107F0000824201D00620F8E721988A46824201D1B8\n:107F10000720F2E70120214660F30F21ADF8480069\n:107F20004FF6FF788DF86E000691ADF84A8042F664\n:107F3000020B8DF872401CA9ADF86CB0ADF8704022\n:107F40001391ADF8508012A806F0A4F800252E4633\n:107F50002F460DAB072212A9404606F09EF898B1B5\n:107F60000A2861D1B5B3AEB3ADF86450ADF8666020\n:107F70009DF85E008DF8144019AC012868D06FE0C0\n:107F80009C020020266102009DF83A001FB30128E0\n:107F900059D1BDF8381059451FD118A809A9019425\n:107FA0000294CDE9031007200090BDF8361010238D\n:107FB0000022404606F003F9B0BBBDF8600004287B\n:107FC00001D006284AD1BDF82410219881423AD127\n:107FD0000F2092E73AE0012835D1BDF83800B0F51E\n:107FE000205F03D042F6010188422CD1BAF8060086\n:107FF000BDF83610884201D1012700E0002705B105\n:108000009EB1219881421ED118A809AA0194029418\n:10801000CDE90320072000900D46102300224046A2\n:1080200006F0CDF800B902E02DE04E460BE0BDF8B9\n:108030006000022801D0102810D1C0B217AA09A9E7\n:108040000DF0DFFC50B9BDF8369082E7052054E70B\n:1080500005A917A8221D0DF0D6FC08B103204CE796\n:108060009DF814000023001DC2B28DF81420229840\n:108070000092CDE901401BA8069905F0FBFE10B95E\n:1080800002228AF80420FEF722FE36E710B50B46DE\n:10809000401E88B084B205AA00211846FEF7B7FE3C\n:1080A00000200DF1080C06AA05A901908CE8070034\n:1080B000072000900123002221464FF6FF7005F0B3\n:1080C0001CFE0446BDF81800012800D0FFDF204642\n:1080D000FEF7FDFD08B010BDF0B5FF4F044687B0B8\n:1080E00038790E46032804D0042802D0082007B0AF\n:1080F000F0BD04AA03A92046FEF762FE0500F6D1F2\n:1081000060688078C0F3410002280AD19DF80D0014\n:1081100010F0380F05D02069F9F7DFF808B110200A\n:10812000E5E7208905AA21698DE807006389BDF884\n:1081300010202068039905F09DFE10B1FEF7C7FDE1\n:10814000D5E716B1BDF814003080042038712846F8\n:10815000CDE7F8B50C0006460BD001464FF6FF758B\n:1081600000236A46284606F0AFF820B1FEF7AFFDBF\n:10817000F8BD1020F8BD69462046FEF7D9FD00285D\n:10818000F8D1A078314600F001032846009A06F0A5\n:10819000CAF8EBE730B587B0144600220DF1080CA1\n:1081A00005AD01928CE82C00072200920A46014698\n:1081B00023884FF6FF7005F0A0FDBDF81410218054\n:1081C000FEF785FD07B030BD70B50D4604210BF0FC\n:1081D0006DFE040000D1FFDF294604F11400BDE864\n:1081E000704004F0A5BD70B50D4604210BF05EFE95\n:1081F000040000D1FFDF294604F11400BDE87040FF\n:1082000004F0B9BD70B50D4604210BF04FFE04001B\n:1082100000D1FFDF294604F11400BDE8704004F0EE\n:10822000D1BD70B5054604210BF040FE040000D11D\n:10823000FFDF214628462368BDE870400122FEF793\n:1082400015BF70B5064604210BF030FE040000D1C6\n:10825000FFDF04F1140004F05CFD401D20F0030575\n:1082600011E0011D00880022431821463046FEF728\n:10827000FDFE00280BD0607CABB2684382B2A068E0\n:10828000011D0BF0D0FCA06841880029E9D170BD28\n:1082900070B5054604210BF009FE040000D1FFDF94\n:1082A000214628466368BDE870400222FEF7DEBE24\n:1082B00070B50E46054601F099F9040000D1FFDFC4\n:1082C0000120207266726580207820F00F00001D6A\n:1082D00020F0F00040302070BDE8704001F089B916\n:1082E00010B50446012900D0FFDF2046BDE810404C\n:1082F0000121FAF7EDB82DE9F04F97B04FF0000AE1\n:108300000C008346ADF814A0D04619D0E06830B117\n:10831000A068A8B10188ADF81410A0F800A05846D4\n:10832000FBF790F8070043F2020961D03878222861\n:108330005CD3042158460BF0B9FD050005D103E0DC\n:10834000102017B0BDE8F08FFFDF05F1140004F036\n:10835000E0FC401D20F00306A078012803D002288D\n:1083600001D00720EDE7218807AA584605F057FEFF\n:1083700030BB07A805F05FFE10BB07A805F05BFE49\n:1083800048B99DF82600012805D1BDF82400A0F5C4\n:108390002451023902D04FF45050D2E7E068B0B116\n:1083A000CDE902A00720009005AACDF804A0049210\n:1083B000A2882188BDF81430584605F09EFC10B103\n:1083C000FEF785FCBDE7A168BDF8140008809DF8A4\n:1083D0001F00C00602D543F20140B2E70B9838B146\n:1083E000A1780078012905D080071AD40820A8E7D1\n:1083F0004846A6E7C007F9D002208DF83C00A868DF\n:108400004FF00009A0B1697C4288714391420FD9B5\n:108410008AB2B3B2011D0BF0BCFB8046A0F800A0ED\n:1084200006E003208DF83C00D5F800804FF00109EC\n:108430009DF8200010F0380F00D1FFDF9DF82000DC\n:108440002649C0F3C200084497F8231010F8010C25\n:10845000884201D90F2074E72088ADF8400014A9A4\n:108460000095CDE90191434607220FA95846FEF732\n:1084700027FE002891D19DF8500050B9A07801281E\n:1084800007D1687CB3B2704382B2A868011D0BF0BB\n:1084900094FB002055E770B5064615460C46084685\n:1084A000FEF7D4FB002805D12A4621463046BDE818\n:1084B000704084E470BD12E570B51E4614460D0090\n:1084C0000ED06CB1616859B160B10349C98881426D\n:1084D00008D0072070BD000094020020296102002E\n:1084E0001020F7E72068FEF7B1FB0028F2D13246F2\n:1084F00021462846BDE87040FFF76FBA70B51546B3\n:108500000C0006D038B1FE490989814203D007200A\n:10851000E0E71020DEE72068FEF798FB0028D9D1BD\n:1085200029462046BDE87040D6E570B5064686B0BF\n:108530000D4614461046F8F7B2FED0BB6068F8F757\n:10854000D5FEB0BBA6F57F40FF3803D03046FAF722\n:1085500079FF80B128466946FEF7ACFC00280CD1B3\n:108560009DF810100F2008293DD2DFE801F0080621\n:108570000606060A0A0843F2020006B0AAE703202C\n:10858000FBE79DF80210012908D1BDF80010B1F5F4\n:10859000C05FF2D06FF4C052D142EED09DF8061009\n:1085A00001290DD1BDF80410A1F52851062907D2E3\n:1085B00000E029E0DFE801F0030304030303DCE744\n:1085C0009DF80A1001290FD1BDF80810B1F5245FFC\n:1085D000D3D0A1F60211B1F50051CED00129CCD0F3\n:1085E000022901D1C9E7FFDF606878B9002305AA35\n:1085F0002946304605F068FE10B1FEF768FBBCE77F\n:108600009DF81400800601D41020B6E76188224648\n:1086100028466368FFF7BEFDAFE72DE9F0438146CA\n:1086200087B0884614461046F8F739FE18B1102076\n:1086300007B0BDE8F083002306AA4146484605F08E\n:1086400043FE10B1FEF743FBF2E79DF81800C006A9\n:1086500002D543F20140EBE70025072705A8019565\n:1086600000970295CDE9035062884FF6FF734146AB\n:10867000484605F0A4FD060013D16068F8F70FFE28\n:1086800060B960680195CDE9025000970495238890\n:1086900062884146484605F092FD0646BDF8140042\n:1086A00020803046CEE739B1954B0A889B899A42A3\n:1086B00002D843F2030070471DE610B586B0904C17\n:1086C0000423ADF81430638943B1A4898C4201D2EC\n:1086D000914205D943F2030006B010BD0620FBE726\n:1086E000ADF81010002100910191ADF80030022189\n:1086F0008DF8021005A9029104A90391ADF812208A\n:108700006946FFF7F8FDE7E72DE9FC4781460D468E\n:108710000846F8F79EFD88BB4846FAF793FE5FEAE5\n:1087200000080AD098F80000222829D304214846DE\n:108730000BF0BCFB070005D103E043F20200BDE8EB\n:10874000FC87FFDF07F1140004F0F9FA06462878E9\n:10875000012803D0022804D00720F0E7B0070FD586\n:1087600002E016F01C0F0BD0A8792C1DC00709D011\n:10877000E08838B1A068F8F76CFD18B11020DEE78A\n:108780000820DCE721882A780720B1F5847F35D0DE\n:108790001EDC40F20315A1F20313A94226D00EDC21\n:1087A000B1F5807FCBD003DCF9B1012926D1C6E732\n:1087B000A1F58073013BC2D0012B1FD113E0012B27\n:1087C000BDD0022B1AD0032BB9D0042B16D112E046\n:1087D000A1F20912082A11D2DFE802F00B040410FA\n:1087E00010101004ABE7022AA9D007E0012AA6D096\n:1087F00004E0320700E0F206002AA0DACDB200F071\n:10880000F5FE50B198F82300CDE90005FA8923461A\n:1088100039464846FEF79FFC91E711208FE72DE986\n:10882000F04F8BB01F4615460C4683460026FAF7DC\n:1088300009FE28B10078222805D208200BB081E576\n:1088400043F20200FAE7B80801D00720F6E7032F49\n:1088500000D100274FF6FF79CCB1022D71D320460D\n:10886000F8F744FD30B904EB0508A8F10100F8F76A\n:108870003DFD08B11020E1E7AD1E38F8028CAAB228\n:108880002146484605F081FE40455AD1ADB21C490B\n:10889000B80702D58889401C00E001201FFA80F843\n:1088A000F80701D08F8900E04F4605AA4146584697\n:1088B00005F0B5FB4FF0070A4FF00009FCB1204668\n:1088C00008E0408810283CD8361D304486B2AE42BD\n:1088D00037D2A01902884245F3D352E09DF8170021\n:1088E00002074ED57CB304EB0608361DB8F80230FB\n:1088F000B6B2102B25D89A19AA4222D802E040E03D\n:1089000094020020B8F8002091421AD1C0061BD56D\n:10891000CDE900A90DF1080C0AAAA11948468CE876\n:108920000700B8F800100022584605F0E6F910B12B\n:10893000FEF7CDF982E7B8F80200BDF828108842AA\n:1089400002D00B207AE704E0B8F80200304486B287\n:1089500006E0C00604D55846FEF730FC00288AD150\n:108960009DF81700BDF81A1020F010008DF81700C0\n:10897000BDF81700ADF80000FF235846009A05F037\n:10898000D2FC05A805F057FB18B9BDF81A10B9427A\n:10899000A4D9042158460BF089FA040000D1FFDF66\n:1089A000A2895AB1CDE900A94D4600232146584677\n:1089B000FEF7D1FB0028BDD1A5813FE700203DE7B0\n:1089C0002DE9FF4F8BB01E4617000D464FF00004F7\n:1089D00012D0B00802D007200FB0B3E4032E00D1AC\n:1089E00000265DB10846F8F778FC28B93888691E7A\n:1089F0000844F8F772FC08B11020EDE7C74AB00749\n:108A000001D5D18900E00121F0074FF6FF7802D0AF\n:108A1000D089401E00E0404686B206AA0B9805F0B9\n:108A2000FEFA4FF000094FF0070B0DF1140A38E081\n:108A30009DF81B00000734D5CDF80490CDF800B0A8\n:108A4000CDF80890CDE9039A434600220B9805F033\n:108A5000B6FB60BB05B3BDF814103A882144281951\n:108A6000091D8A4230D3BDF81E2020F8022BBDF824\n:108A7000142020F8022BCDE900B9CDE90290CDF801\n:108A800010A0BDF81E10BDF8143000220B9805F0A0\n:108A900096FB08B103209FE7BDF814002044001D99\n:108AA00084B206A805F0C7FA20B10A2806D0FEF75E\n:108AB0000EF991E7BDF81E10B142B9D934B17DB1BC\n:108AC0003888A11C884203D20C2085E7052083E763\n:108AD00022462946404605F058FD014628190180E6\n:108AE000A41C3C80002077E710B50446F8F7D7FBBC\n:108AF00008B1102010BD8948C0892080002010BD19\n:108B0000F0B58BB00D4606461422002103A805F0EF\n:108B1000BEFC01208DF80C008DF8100000208DF8AF\n:108B20001100ADF814503046FAF78CFC48B10078CB\n:108B3000222812D3042130460BF0B8F9040005D1E5\n:108B400003E043F202000BB0F0BDFFDF04F11400BC\n:108B5000074604F0F4F8800601D40820F3E7207CEF\n:108B6000022140F00100207409A80094CDE9011011\n:108B7000072203A930466368FEF7A2FA20B1217CE0\n:108B800021F001012174DEE729463046F9F791FC16\n:108B900008A9384604F0C2F800B1FFDFBDF8204054\n:108BA000172C01D2172000E02046A84201D92C46FC\n:108BB00002E0172C00D2172421463046FFF713FBA2\n:108BC00021463046F9F799F90020BCE7F8B51C4674\n:108BD00015460E46069F0BF09AFA2346FF1DBCB2BF\n:108BE00031462A4600940AF086FEF8BD70B50C4660\n:108BF00005460E220021204605F049FC0020208079\n:108C00002DB1012D01D0FFDF64E4062000E0052036\n:108C1000A0715FE410B548800878134620F00F007B\n:108C2000001D20F0F00080300C4608701422194618\n:108C300004F1080005F001FC00F0DBFC374804609B\n:108C400010BD2DE9F047DFF8D890491D064621F008\n:108C5000030117460C46D9F800000AF062FF050030\n:108C600000D1FFDF4FF000083560A5F800802146F5\n:108C7000D9F800000AF055FF050000D1FFDF75604C\n:108C8000A5F800807FB104FB07F1091D0BD0D9F8CE\n:108C900000000AF046FF040000D1FFDFB460C4F812\n:108CA0000080BDE8F087C6F80880FAE72DE9F041BA\n:108CB0001746491D21F00302194D06460168144666\n:108CC00028680AF059FF2246716828680AF054FFA4\n:108CD0003FB104FB07F2121D03D0B16828680AF007\n:108CE0004BFF04200BF08AF8044604200BF08EF8AA\n:108CF000201A012804D12868BDE8F0410AF006BF17\n:108D0000BDE8F08110B50C4605F058F900B1FFDF61\n:108D10002046BDE81040FDF7DABF000094020020B5\n:108D20001800002038B50C468288817B19B1418932\n:108D3000914200D90A462280C188121D90B26A462B\n:108D40000AF0B2F8BDF80000032800D30320C1B236\n:108D5000208801F020F838BD38B50C468288817B28\n:108D600019B10189914200D90A462280C188121D99\n:108D700090B26A460AF098F8BDF80000022800D3C5\n:108D80000220C1B2208801F006F8401CC0B238BDF4\n:108D90002DE9FF5F82468B46F74814460BF103022C\n:108DA000D0E90110CDE9021022F0030201A84FF42E\n:108DB000907101920AF097FEF04E002C02D1F0491A\n:108DC000019A8A60019901440191B57F05F101057D\n:108DD00004D1E8B20CF098FD00B1FFDF019800EB80\n:108DE0000510C01C20F0030101915CB9707AB27AC1\n:108DF0001044C2B200200870B08C80B204F03DFF75\n:108E000000B1FFDF0198716A08440190214601A872\n:108E100000F084FF80460198C01C20F00300019000\n:108E2000B37AF27A717A04B100200AF052FF019904\n:108E300008440190214601A800F0B8FFCF48002760\n:108E40003D4690F801900CE0284600F04AFF0646A7\n:108E500081788088F9F7E8F871786D1C00FB01775C\n:108E6000EDB24D45F0D10198C01C20F003000190F7\n:108E700004B100203946F9F7E2F8019900270844C7\n:108E80000190BE483D4690F801900CE0284600F065\n:108E900028FF0646C1788088FEF71BFC71786D1CA0\n:108EA00000FB0177EDB24D45F0D10198C01C20F0D8\n:108EB0000300019004B100203946FEF713FC01992C\n:108EC0004FF0000908440190AC484D4647780EE049\n:108ED000284600F006FF0646807B30B106F1080008\n:108EE00002F09CF9727800FB02996D1CEDB2BD4254\n:108EF000EED10198C01C20F00300019004B10020C5\n:108F00009F494A78494602F08DF901990844019039\n:108F1000214601A800F0B8FE0198C01D20F007000E\n:108F20000190DAF80010814204D3A0EB0B01B1F5F7\n:108F3000803F04DB4FF00408CAF8000004E0CAF8E0\n:108F40000000B8F1000F03D0404604B0BDE8F09F28\n:108F500084BB8C490020019A0EF044FEFBF714FA02\n:108F6000864C207F0090607F012825D0002328B305\n:108F70000022824800211030F8F73AFA00B1FFDFF2\n:108F80007E49E07F2031FEF759FF00B1FFDF7B48CB\n:108F90004FF4F6720021443005F079FA7748042145\n:108FA000443080F8E91180F8EA11062180F8EB11CD\n:108FB000032101710020C8E70123D8E702AAD8E7FE\n:108FC00070B56E4C06464434207804EB4015E078CA\n:108FD000083598B9A01990F8E80100280FD0A078BA\n:108FE0000F2800D3FFDF20220021284605F04FFA8A\n:108FF000687866F3020068700120E070284670BD52\n:109000002DE9F04105460C460027007805219046E1\n:109010003E46B1EB101F00D0FFDF287A50B1012887\n:109020000ED0FFDFA8F800600CB12780668000201A\n:10903000BDE8F0810127092674B16888A08008E0A6\n:109040000227142644B16888A0802869E060A88AB5\n:109050002082287B2072E5E7A8F80060E7E730B5BA\n:10906000464C012000212070617020726072032242\n:10907000A272E07261772177217321740521218327\n:109080001F216183607440A161610A21A177E077AB\n:1090900039483B4DB0F801102184C07884F8220093\n:1090A0004FF4B06060626868C11C21F00301814226\n:1090B00000D0FFDF6868606030BD30B5304C1568A7\n:1090C000636810339D4202D20420136030BD2B4BE5\n:1090D0005D785A6802EB0512107051700320D08041\n:1090E000172090800120D0709070002090735878E5\n:1090F000401C5870606810306060002030BD70B552\n:1091000006461E480024457807E0204600F0E9FDA9\n:109110000178B14204D0641CE4B2AC42F5D1002025\n:1091200070BDF7B5074608780C4610B3FFF7E7FFA8\n:109130000546A7F12006202F06D0052E19D2DFE81C\n:1091400006F00F383815270000F0D6FD0DB169780C\n:1091500000E00021401AA17880B20844FF2808D816\n:10916000A07830B1A088022831D202E060881728A8\n:109170002DD20720FEBD000030610200B0030020A8\n:109180001C000020000000206E52463578000000D0\n:10919000207AE0B161881729EBD3A1881729E8D399\n:1091A000A1790029E5D0E1790029E2D0402804D94D\n:1091B000DFE7242F0BD1207A48B161884FF6FB708E\n:1091C000814202D8A188814201D90420D2E765B941\n:1091D000207802AA0121FFF770FF0028CAD1207869\n:1091E000FFF78DFF050000D1FFDF052E18D2DFE865\n:1091F00006F0030B0E081100A0786870A088E880C4\n:109200000FE06088A8800CE0A078A87009E0A07842\n:10921000E87006E054F8020FA8606068E86000E0BB\n:10922000FFDF0020A6E71A2835D00DDC132832D244\n:10923000DFE800F01B31203131272723252D313184\n:1092400029313131312F0F00302802D003DC1E28A4\n:1092500021D1072070473A3809281CD2DFE800F0F6\n:10926000151B0F1B1B1B1B1B07000020704743F225\n:109270000400704743F202007047042070470D203D\n:1092800070470F2070470820704711207047132047\n:109290007047062070470320704710B5007800F033\n:1092A000010009F0F3FDBDE81040BCE710B50078FF\n:1092B00000F0010009F0F3FDBDE81040B3E70EB582\n:1092C000017801F001018DF80010417801F00101F1\n:1092D0008DF801100178C1F340018DF8021041783A\n:1092E000C1F340018DF80310017889088DF804104E\n:1092F000417889088DF8051081788DF80610C178BD\n:109300008DF8071000798DF80800684608F0FDFD1B\n:10931000FFF789FF0EBD2DE9FC5FDFF8F883FE4CF7\n:1093200000264FF490771FE0012000F082FD01201D\n:10933000FFF746FE05463946D8F808000AF0F1FB6B\n:10934000686000B9FFDF686808F0AAFCB0B1284681\n:10935000FAF75EFB284600F072FD28B93A466968C4\n:10936000D8F808000AF008FC94F9E9010428DBDACF\n:1093700002200AF043FD07460025AAE03A46696844\n:10938000D8F808000AF0F8FBF2E7B8F802104046F7\n:10939000491C89B2A8F80210B94201D300214180CA\n:1093A0000221B8F802000AF081FD002866D0B8F862\n:1093B0000200694609F0CFFCFFF735FF00B1FFDF7F\n:1093C0009DF80000019078B1B8F802000AF0B1FEF3\n:1093D0005FEA000900D1FFDF48460AF020F918B122\n:1093E000B8F8020002F0E4F9B8F802000AF08FFEC3\n:1093F0005FEA000900D1FFDF48460AF008F9E8BB40\n:109400000321B8F802000AF051FD5FEA000B4BD1CE\n:10941000FFDF49E0DBF8100010B10078FF284DD0E5\n:10942000022000F006FD0220FFF7CAFD82464846F2\n:109430000AF0F9F9CAF8040000B9FFDFDAF804000D\n:109440000AF0C1FA002100900170B8F802105046ED\n:10945000AAF8021002F0B2F848460AF0B6FA00B9CB\n:10946000FFDF019800B10126504600F0E8FC18B972\n:109470009AF80100000705D5009800E027E0CBF836\n:10948000100011E0DBF8101039B10878401C10F022\n:10949000FF00087008D1FFDF06E0002211464846B1\n:1094A00000F0F0FB00B9FFDF94F9EA01022805DBC8\n:1094B000B8F8020002F049F80028ABD194F9E901AC\n:1094C000042804DB48460AF0E4FA00B101266D1CCA\n:1094D000EDB2BD4204D294F9EA010228BFF655AFBD\n:1094E000002E7FF41DAFBDE8FC5F032000F0A1BC9F\n:1094F00010B5884CE06008682061AFF2E510F9F71C\n:10950000E4FC607010BD844800214438017081483B\n:10951000017082494160704770B505464FF0805038\n:109520000C46D0F8A410491C05D1D0F8A810C943A6\n:109530000904090C0BD050F8A01F01F0010129709B\n:10954000416821608068A080287830B970BD06210C\n:1095500020460DF0CCFF01202870607940F0C0005B\n:10956000607170BD70B54FF080540D46D4F8801016\n:10957000491C0BD1D4F88410491C07D1D4F88810A9\n:10958000491C03D1D4F88C10491C0CD0D4F880109D\n:109590000160D4F884104160D4F888108160D4F858\n:1095A0008C10C16002E010210DF0A1FFD4F89000F2\n:1095B000401C0BD1D4F89400401C07D1D4F898007B\n:1095C000401C03D1D4F89C00401C09D054F8900FE3\n:1095D000286060686860A068A860E068E86070BDA6\n:1095E0002846BDE8704010210DF081BF4A4800793F\n:1095F000E6E470B5484CE07830B3207804EB4010D6\n:10960000407A00F00700204490F9E801002800DCCF\n:10961000FFDF2078002504EB4010407A00F00700BF\n:10962000011991F8E801401E81F8E8012078401CFA\n:10963000C0B220700F2800D12570A078401CA07007\n:109640000DF0D4FDE57070BDFFDF70BD3EB5054681\n:1096500003210AF02BFC044628460AF058FD054673\n:1096600004B9FFDF206918B10078FF2800D1FFDFBF\n:1096700001AA6946284600F005FB60B9FFDF0AE051\n:10968000002202A9284600F0FDFA00B9FFDF9DF88C\n:10969000080000B1FFDF9DF80000411E8DF80010AA\n:1096A000EED220690199884201D1002020613EBD9F\n:1096B00070B50546A0F57F400C46FF3800D1FFDFAE\n:1096C000012C01D0FFDF70BDFFF790FF040000D137\n:1096D000FFDF207820F00F00401D20F0F000503018\n:1096E000207065800020207201202073BDE870404A\n:1096F0007FE72DE9F04116460D460746FFF776FF56\n:10970000040000D1FFDF207820F00F00401D20F082\n:10971000F00005E01C000020F403002048140020A5\n:109720005030207067800120207228682061A8884E\n:10973000A0822673BDE8F0415BE77FB5FFF7DFFC51\n:10974000040000D1FFDF02A92046FFF7EBFA05462F\n:1097500003A92046FFF700FB8DF800508DF80100AB\n:10976000BDF80800001DADF80200BDF80C00001D9A\n:10977000ADF80400E088ADF80600684609F070FB1B\n:10978000002800D0FFDF7FBD2DE9F05FFC4E814651\n:10979000307810B10820BDE8F09F4846F7F77FFD0C\n:1097A00008B11020F7E7F74C207808B9FFF757FC0D\n:1097B000A17A607A4D460844C4B200F09DFAA042F6\n:1097C00007D2201AC1B22A460020FFF776FC0028F3\n:1097D000E1D17168EB48C91C002721F003017160D9\n:1097E000B3463E463D46BA463C4690F801800AE004\n:1097F000204600F076FA4178807B0E4410FB01553C\n:10980000641CE4B27F1C4445F2D10AEB870000EBF4\n:10981000C600DC4E00EB85005C46F17A012200EBCD\n:109820008100DBF80410451829464846FFF7B0FAD6\n:10983000070012D00020FFF762FC05000BD005F1F5\n:109840001300616820F00300884200D0FFDF7078C9\n:10985000401E7070656038469DE7002229464846E4\n:10986000FFF796FA00B1FFDFD9F8000060604FF60D\n:10987000FF7060800120207000208CE72DE9F0410E\n:109880000446BF4817460D46007810B10820BDE8D1\n:10989000F0810846F7F7DDFC08B11020F7E7B94E74\n:1098A000307808B9FFF7DBFB601E1E2807D8012CB3\n:1098B00023D12878FE2820D8B0770020E7E7A4F14C\n:1098C00020001F2805D8E0B23A462946BDE8F041FD\n:1098D00027E4A4F140001F2805D829462046BDE80A\n:1098E000F04100F0D4BAA4F1A0001F2805D8294601\n:1098F0002046BDE8F04100F006BB0720C7E72DE990\n:10990000F05F81460F460846F7F7C9FC48B948465C\n:10991000F7F7E3FC28B909F1030020F003014945FA\n:1099200001D0102037E797484FF0000B4430817882\n:1099300069B14178804600EB411408343E883A46CC\n:109940000021204600F089FA050004D027E0A7F89E\n:1099500000B005201FE7B9F1000F24D03888B042CD\n:1099600001D90C251FE0607800F00700824600F066\n:1099700060FA08EB0A063A4696F8E8014946401CA8\n:1099800086F8E801204600F068FA054696F8E801F6\n:10999000401E86F8E801032000F04BFA2DB10C2D93\n:1099A00001D0A7F800B02846F5E6754F5046BAF149\n:1099B000010F25D002280DD0BAF1030F35D0FFDFFB\n:1099C00098F801104046491CC9B288F801100F29C7\n:1099D00037D038E0606828B16078000702D460882A\n:1099E000FFF734FE98F8EA014446012802D178785E\n:1099F000F9F78AFA94F9EA010428E1DBFFDFDFE7EF\n:109A0000616821B14FF49072B8680AF0B5F898F81F\n:109A1000E9014446032802D17878F9F775FA94F9F8\n:109A2000E9010428CCDBFFDFCAE76078C00602D575\n:109A30006088FFF70BFE98F9EB010628C0DBFFDF1B\n:109A4000BEE780F801B08178491E88F8021096F8C8\n:109A5000E801401C86F8E801A5E770B50C4605460C\n:109A6000F7F7F7FB18B92046F7F719FC08B11020F3\n:109A700070BD28460BF07FFF207008B1002070BD3C\n:109A8000042070BD70B505460BF08EFFC4B22846A9\n:109A9000F7F723FC08B1102070BD35B128782C7081\n:109AA00018B1A04201D0072070BD2046FDF77EFE10\n:109AB000052805D10BF07BFF012801D0002070BDE7\n:109AC0000F2070BD70B5044615460E460846F7F7E0\n:109AD000C0FB18B92846F7F7E2FB08B1102070BDAB\n:109AE000022C03D0102C01D0092070BD2A4631462B\n:109AF00020460BF086FF0028F7D0052070BD70B51A\n:109B000014460D460646F7F7A4FB38B92846F7F782\n:109B1000C6FB18B92046F7F7E0FB08B1102070BD6E\n:109B20002246294630460BF06EFF0028F7D007206A\n:109B300070BD3EB50446F7F7B2FB08B110203EBD3C\n:109B4000684608F053F9FFF76EFB0028F7D19DF83F\n:109B500006002070BDF808006080BDF80A00A080F3\n:109B600000203EBD70B505460C460846F7F7B5FB2C\n:109B700020B95CB12068F7F792FB28B1102070BDC6\n:109B80001C000020B0030020A08828B121462846F0\n:109B9000BDE87040FDF762BE0920F0E770B50546EC\n:109BA0000C460846F7F755FBA0BB681E1E280ED8CA\n:109BB000032D01D90720E2E705B9FFDFFE4800EBDE\n:109BC000850050F8041C2046BDE870400847A5F108\n:109BD00020001F2805D821462846BDE87040FAF726\n:109BE00042BBA5F160001F2805D821462846BDE8E4\n:109BF0007040F8F7DABCF02D0DD0F12D15D0BF2D47\n:109C0000D8D1A078218800F0010001F08DFB98B137\n:109C10000020B4E703E0A068F7F71BFB08B11020B1\n:109C2000ADE7204609F081F902E0207809F0A0F9BB\n:109C3000BDE87040FFF7F7BA0820A0E770B504460A\n:109C40000D460846F7F72BFB30B9601E1E280FD8CB\n:109C50002846F7F7FEFA08B1102090E7012C03D050\n:109C6000022C01D0032C01D1062088E7072086E7CB\n:109C7000A4F120001F28F9D829462046BDE87040ED\n:109C8000FAF762BB09F092BC38B50446CB48007BBA\n:109C900000F00105F9B904F01DFC0DB1226800E0E7\n:109CA0000022C7484178C06807F06DFDC4481030F5\n:109CB000C0788DF8000010B1012802D004E0012026\n:109CC00000E000208DF80000684608F0FFF8BA4870\n:109CD000243808F0B5FE002D02D02068283020601E\n:109CE00038BD30B5B54D04466878A04200D8FFDFD6\n:109CF000686800EB041030BD70B5B04800252C46F4\n:109D0000467807E02046FFF7ECFF4078641C2844C3\n:109D1000C5B2E4B2B442F5D1284630E72DE9F041AE\n:109D20000C4607464FF0000800F01FF90646FF28D2\n:109D300001D94FF013083868C01C20F003023A60C4\n:109D400054EA080421D19D48F3B2072128300DF0D0\n:109D5000DBFD09E0072C10D2DFE804F00604080858\n:109D60000A040600974804E0974802E0974800E09C\n:109D700097480DF0E9FD054600E0FFDFA54200D061\n:109D8000FFDF641CE4B2072CE4D3386800EB061054\n:109D9000386040467BE5021D5143452900D24521EC\n:109DA0000844C01CB0FBF2F0C0B270472DE9FC5F64\n:109DB000064682484FF000088B464746444690F8D6\n:109DC000019022E02046FFF78CFF050000D1FFDF65\n:109DD000687869463844C7B22846FEF7A3FF824632\n:109DE00001A92846FEF7B8FF0346BDF80400524615\n:109DF000001D81B2BDF80000001D80B20AF0D4F849\n:109E00006A78641C00FB0288E4B24C45DAD1306801\n:109E1000C01C20F003003060BBF1000F00D0002018\n:109E2000424639460AF0CEF8316808443060BDE851\n:109E3000FC9F6249443108710020C87070475F4937\n:109E40004431CA782AB10A7801EB421108318142C3\n:109E500001D001207047002070472DE9F0410646EF\n:109E60000078154600F00F0400201080601E0F4699\n:109E7000052800D3FFDF50482A46183800EB84003D\n:109E8000394650F8043C3046BDE8F04118472DE90A\n:109E9000F0414A4E0C46402806D0412823D04228A3\n:109EA0002BD0432806D123E0A07861780D18E17803\n:109EB000814201D90720EAE42078012801D9132042\n:109EC000E5E4FF2D08D80BF009FF07460DF046F931\n:109ED000381A801EA84201DA1220D8E42068B06047\n:109EE000207930730DE0BDE8F041084600F078B805\n:109EF00008780228DED8307703E008780228D9D81D\n:109F000070770020C3E4F8B500242C4DA02805D0BC\n:109F1000A12815D0A22806D00720F8BD087800F0A7\n:109F20000100E8771FE00E4669463046FDF73DFD2B\n:109F30000028F2D130882884B07885F8220012E019\n:109F400008680921F82801D3820701D00846F8BD26\n:109F50006A7C02F00302012A04D16A8BD73293B2E1\n:109F60008342F3D868622046F8BD2DE9F047DFF858\n:109F70004C900026344699F8090099F80A2099F87F\n:109F800001700244D5B299F80B20104400F0FF088C\n:109F900008E02046FFF7A5FE817B407811FB0066B4\n:109FA000641CE4B2BC42F4D199F8091099F80A0093\n:109FB0002944294441440DE054610200B0030020CB\n:109FC0001C0000206741000045B30000DD2F0000A9\n:109FD000FB56010000B1012008443044BDE8F08781\n:109FE00038B50446407800F00300012803D0022869\n:109FF0000BD0072038BD606858B1F7F777F9D0B9B2\n:10A000006068F7F76AF920B915E06068F7F721F999\n:10A0100088B969462046FCF729F80028EAD160781B\n:10A0200000F00300022808D19DF8000028B1606804\n:10A03000F7F753F908B1102038BD6189F8290DD818\n:10A04000208988420AD8607800F003020A48012A71\n:10A0500006D1D731426A89B28A4201D2092038BD7D\n:10A0600094E80E0000F1100585E80E000AB9002101\n:10A070000183002038BD0000B00300202DE9F0412D\n:10A08000074614468846084601F08AFD064608EB56\n:10A0900088001C22796802EBC0000D18688C58B14A\n:10A0A0004146384601F08BFD014678680078C200D1\n:10A0B000082305F120000CE0E88CA8B141463846A1\n:10A0C00001F084FD0146786808234078C20005F15C\n:10A0D000240009F0A8FD38B1062121726681D0E97B\n:10A0E0000010C4E9031009E0287809280BD00520E6\n:10A0F000207266816868E060002028702046BDE814\n:10A10000F04101F02EBD072020726681F4E72DE9B1\n:10A11000F04116460D460746406801EB85011C22BA\n:10A1200002EBC1014418204601F072FD40B100214C\n:10A13000708865F30F2160F31F4106200DF0BEFC0F\n:10A1400009202070324629463846BDE8F04195E79F\n:10A150002DE9F0410E46074600241C21F07816E058\n:10A1600004EB8403726801EBC303D25C6AB1FFF7AE\n:10A170003DFA050000D1FFDF6F802A4621463046B8\n:10A18000FFF7C5FF0120BDE8F081641CE4B2A042E6\n:10A19000E6D80020F7E770B5064600241C21C078F9\n:10A1A0000AE000BF04EB8403726801EBC303D51817\n:10A1B0002A782AB1641CE4B2A042F3D8402070BDD2\n:10A1C00028220021284604F062F9706880892881DD\n:10A1D000204670BD70B5034600201C25DC780CE0DD\n:10A1E00000EB80065A6805EBC6063244167816B1B5\n:10A1F000128A8A4204D0401CC0B28442F0D8402067\n:10A2000070BDF0B5044600201C26E5780EE000BFC6\n:10A2100000EB8007636806EBC7073B441F788F425B\n:10A2200002D15B78934204D0401CC0B28542EFD883\n:10A230004020F0BD0078032801D0002070470120A5\n:10A2400070470078022801D0002070470120704735\n:10A250000078072801D000207047012070472DE9C1\n:10A26000F041064688461078F1781546884200D3BA\n:10A27000FFDF2C781C27641CF078E4B2A04201D8E0\n:10A28000201AC4B204EB8401706807EBC1010844D2\n:10A29000017821B14146884708B12C7073E72878CE\n:10A2A000A042E8D1402028706DE770B514460B88B5\n:10A2B0000122A240134207D113430B8001230A223B\n:10A2C000011D09F07AFC047070BD2DE9FF4F81B0CB\n:10A2D0000878DDE90E7B9A4691460E4640072CD45D\n:10A2E000019809F026FF040000D1FFDF07F1040800\n:10A2F00020461FFA88F109F065F8050000D1FFDF5C\n:10A30000204629466A4609F0B0FA0098A0F8037082\n:10A31000A0F805A0284609F056FB017869F306016C\n:10A320006BF3C711017020461FFA88F109F08DF810\n:10A3300000B9FFDF019807F094F906EB0900017FEF\n:10A34000491C017705B0BDE8F08F2DE9F84F0E46A6\n:10A350009A4691460746032109F0A8FD0446008D60\n:10A36000DFF8B885002518B198F80000B0421ED17A\n:10A37000384609F0DEFE070000D1FFDF09F10401D5\n:10A38000384689B209F01EF8050010D03846294633\n:10A390006A4609F06AFA009800210A460180817035\n:10A3A00007F01CFA0098C01DCAF8000021E098F8D8\n:10A3B0000000B04216D104F1260734F8341F012002\n:10A3C00000FA06F911EA090F00D0FFDF2088012307\n:10A3D00040EA090020800A22391D384609F008FCAD\n:10A3E000067006E0324604F1340104F12600FFF75E\n:10A3F0005CFF0A2188F800102846BDE8F88FFEB5FA\n:10A4000015460C46064602AB0C220621FFF79DFFBF\n:10A41000002827D00299607812220A70801C4870A8\n:10A4200008224A80A07002982988052381806988C3\n:10A43000C180A9880181E988418100250C20CDE9EE\n:10A440000005062221463046FFF73FFF294600223D\n:10A4500066F31F41F02310460DF086FA6078801CE9\n:10A4600060700120FEBDFEB514460D46062206466C\n:10A4700002AB1146FFF769FF002812D0029B1320A0\n:10A4800000211870A8785870022058809C800620FF\n:10A49000CDE900010246052329463046FFF715FFA6\n:10A4A0000120FEBD2DE9FE430C46804644E002AB90\n:10A4B0000E2207214046FFF748FF002841D0606880\n:10A4C0001C2267788678BF1C06EB860102EBC1016F\n:10A4D000451802981421017047700A214180698A49\n:10A4E0000181E98A4181A9888180A98981813046D9\n:10A4F00001F056FB029905230722C8806F700420E3\n:10A50000287000250E20CDE9000521464046FFF7C2\n:10A51000DCFE294666F30F2168F31F41F023002279\n:10A5200006200DF021FA6078FD49801C6070626899\n:10A530002046921CFFF793FE606880784028B6D1D1\n:10A540000120BDE8FE83FEB50D46064638E002ABAD\n:10A550000E2207213046FFF7F8FE002835D0686844\n:10A560001C23C17801EB810203EBC202841802981C\n:10A5700015220270627842700A224280A2894281CA\n:10A58000A2888281084601F00BFB01460298818077\n:10A59000618AC180E18A0181A088B8B10020207061\n:10A5A00000210E20CDE9000105230722294630466F\n:10A5B000FFF78BFE6A68DB492846D21CFFF74FFE87\n:10A5C0006868C0784028C2D10120FEBD0620E6E7B9\n:10A5D0002DE9FE430C46814644E0204601F002FB93\n:10A5E000D0B302AB082207214846FFF7AEFE002891\n:10A5F000A7D060681C2265780679AD1C06EB860141\n:10A6000002EBC10147180298B7F8108006210170CB\n:10A61000457004214180304601F0C2FA014602989B\n:10A6200005230722C180A0F804807D7008203870BF\n:10A630000025CDE9000521464846FFF746FE29469C\n:10A6400066F30F2169F31F41F023002206200DF06D\n:10A650008BF96078801C60706268B3492046121DD7\n:10A66000FFF7FDFD606801794029B6D1012068E758\n:10A670002DE9F34F83B00D4691E0284601F0B2FA80\n:10A6800000287DD068681C2290F806A00AEB8A0199\n:10A6900002EBC10144185146284601F097FAA1780F\n:10A6A000CB0069684978CA00014604F1240009F02A\n:10A6B000D6FA07468188E08B4FF00009091A8EB25E\n:10A6C00008B1C84607E04FF00108504601F053FAC0\n:10A6D00008B9B61CB6B2208BB04200D80646B346C5\n:10A6E00002AB324607210398FFF72FFE060007D082\n:10A6F000B8F1000F0BD0504601F03DFA10B106E062\n:10A7000000201FE60299B8884FF0020908800196E0\n:10A71000E28B3968ABEB09001FFA80F80A44039812\n:10A720004E46009209F005FDDDE90021F61D434685\n:10A73000009609F014F9E08B404480B2E083B988B8\n:10A74000884201D1012600E00026CDE900B6238A27\n:10A75000072229460398FFF7B8FD504601F00BFA8F\n:10A7600010B9E089401EE08156B1A078401CA0706D\n:10A770006868E978427811FB02F1CAB2012300E06F\n:10A7800007E081690E3009F018FA80F800A0002077\n:10A79000E0836A6865492846921DFFF760FD686896\n:10A7A000817940297FF469AF0120CBE570B5064679\n:10A7B00048680D4614468179402910D104EB840184\n:10A7C0001C2202EBC101084401F043FA002806D024\n:10A7D0006868294684713046BDE8704048E770BD1E\n:10A7E000FEB50C460746002645E0204601F0FAF982\n:10A7F000D8B360681C22417901EB810102EBC101F1\n:10A800004518688900B9FFDF02AB082207213846E6\n:10A81000FFF79BFD002833D00299607816220A705A\n:10A82000801C4870042048806068407901F0B8F9C5\n:10A83000014602980523072281806989C18008208A\n:10A84000CDE9000621463846FFF73FFD6078801CC1\n:10A850006070A88969890844B0F5803F00D3FFDFA4\n:10A86000A88969890844A8816E81626830492046B8\n:10A87000521DFFF7F4FC606841794029B5D10120F1\n:10A88000FEBD30B5438C458BC3F3C704002345B1EF\n:10A89000838B641EED1AC38A6D1E1D4495FBF3F372\n:10A8A000E4B22CB1008918B1A04200D8204603447C\n:10A8B0004FF6FF70834200D3034613800C7030BD07\n:10A8C0002DE9FC41074616460D46486802EB860115\n:10A8D0001C2202EBC10144186A4601A92046FFF779\n:10A8E000D0FFA089618901448AB2BDF8001091426D\n:10A8F00012D0081A00D5002060816868407940288D\n:10A900000AD1204601F09BF9002805D06868294645\n:10A9100046713846FFF764FFBDE8FC813000002037\n:10A9200035A2000043A2000051A2000053BC000069\n:10A930003FBC00002DE9FE4F0F468146154650886A\n:10A94000032109F0B3FA0190B9F8020001F01BF9F4\n:10A9500082460146019801F045F9002824D001986B\n:10A960001C2241680AEB8A0002EBC0000C1820464A\n:10A9700001F04EF9002817D1B9F80000E18A8842A9\n:10A980000ED8A18961B1B8420ED100265146019876\n:10A9900001F015F9218C01EB0008608B30B114E057\n:10A9A000504601F0E8F8A0B3BDE8FE8F504601F034\n:10A9B000E2F808B1678308E0022FF5D3B9F8040084\n:10A9C0006083618A884224D80226B81B87B2B8F80F\n:10A9D0000400A28B801A002814DD874200DA384672\n:10A9E0001FFA80FB688869680291D8F800100A4451\n:10A9F000009209F08CFBF61D009A5B4602990096C6\n:10AA000008F079FFA08B384480B2A083618B884224\n:10AA100007D96888019903B05246BDE8F04F01F0AC\n:10AA200035B91FD14FF009002872B9F802006881CA\n:10AA3000D8E90010C5E90410608BA881284601F010\n:10AA400090F85146019801F0BAF8014601980823A0\n:10AA500040680078C20004F1200009F0E4F800200A\n:10AA6000A0836083504601F086F810B9A089401E8B\n:10AA7000A0816888019903B00AF0FF02BDE8F04F99\n:10AA80001EE72DE9F041064615460F461C461846BE\n:10AA9000F6F7DFFB18B92068F6F701FC10B11020BB\n:10AAA000BDE8F0817168688C0978B0EBC10F01D303\n:10AAB0001320F5E73946304601F081F80146706809\n:10AAC00008230078C20005F1200009F076F8D4E9E7\n:10AAD0000012C0E900120020E2E710B5044603218D\n:10AAE00009F0E4F90146007800F00300022805D0DF\n:10AAF0002046BDE8104001F1140280E48A8A204615\n:10AB0000BDE81040AFE470B50446032109F0CEF96A\n:10AB1000054601462046FFF75BFD002816D0294672\n:10AB20002046FFF75DFE002810D029462046FFF79B\n:10AB30000AFD00280AD029462046FFF7B3FC00286A\n:10AB400004D029462046BDE8704091E570BD2DE94E\n:10AB5000F0410C4680461EE0E178427811FB02F19C\n:10AB6000CAB2816901230E3009F05DF80778606888\n:10AB70001C22C179491EC17107EB8701606802EB95\n:10AB8000C10146183946204601F02CF818B130466C\n:10AB900001F037F820B16068C1790029DCD17FE786\n:10ABA000FEF724FD050000D1FFDF0A202872384699\n:10ABB00000F0F6FF68813946204601F007F80146AB\n:10ABC000606808234078C20006F1240009F02BF8E1\n:10ABD000D0E90010C5E90310A5F80280284600F06E\n:10ABE000C0FFB07800B9FFDFB078401EB07057E703\n:10ABF00070B50C460546032109F058F90146406836\n:10AC0000C2792244C2712846BDE870409FE72DE911\n:10AC1000FE4F8246507814460F464FF00008002839\n:10AC20004FD0012807D0022822D0FFDF2068B8606B\n:10AC30006068F860B8E602AB0E2208215046FFF7C4\n:10AC400084FB0028F2D00298152105230170217899\n:10AC500041700A214180C0F80480C0F80880A0F843\n:10AC60000C80628882810E20CDE90008082221E054\n:10AC7000A678304600F094FF054606EB86012C22AC\n:10AC8000786802EBC1010822465A02AB11465046D1\n:10AC9000FFF75BFB0028C9D00298072101702178DB\n:10ACA00041700421418008218580C680CDE90018CB\n:10ACB00005230A4639465046FFF707FB87F8088008\n:10ACC00072E6A678022516B1022E13D0FFDF2A1DE8\n:10ACD000914602AB08215046FFF737FB0028A5D06C\n:10ACE00002980121022E01702178417045808680F2\n:10ACF00002D005E00625EAE7A188C180E18801814C\n:10AD0000CDE900980523082239465046D4E710B50E\n:10AD10000446032109F0CAF8014600F10802204662\n:10AD2000BDE8104073E72DE9F04F0F4605468DB0A2\n:10AD300014465088032109F0B9F84FF000088DF847\n:10AD400014800646ADF81680042F7BD36A78002A5B\n:10AD500078D028784FF6FF794FF01C0A132834D0AA\n:10AD600008DC012871D006284AD007286ED01228A6\n:10AD70000ED106E014286AD0152869D0162807D10C\n:10AD8000AAE10C2F04D1307800F00301022907D08A\n:10AD9000CDF80880CDF80C8068788DF808004CE07C\n:10ADA00040F0080030706878B07001208DF8140011\n:10ADB000A888ADF81800E888ADF81A002889ADF821\n:10ADC0001C006889ADF81E0011E1B078904239D1BD\n:10ADD0003078010736D5062F34D120F008003070C6\n:10ADE0006088414660F31F4100200CF067FE02209E\n:10ADF0008DF81400ADF81890A888ADF81A00F6E0A8\n:10AE0000082F1FD1A888EF88814600F0BCFE80463D\n:10AE10000146304600F0E6FE18B1404600F0ABFEB9\n:10AE2000B8B1FC48D0E90010CDE902106878ADF85F\n:10AE30000C908DF80800ADF80E70608802AA3146BB\n:10AE4000FFF7E5FE0DB0BDE8F08FB6E01EE041E093\n:10AE5000ECE0716808EB88002C2202EBC000085A75\n:10AE6000B842EFD1EB4802AAD0E90210CDE90210B6\n:10AE700068788DF8080008F0FF058DF80A506088A2\n:10AE80003146FFF7C4FE224629461FE0082FD9D1DC\n:10AE9000B5F80480E88800F076FE074601463046A3\n:10AEA00000F0A0FE0028CDD007EB870271680AEB06\n:10AEB000C2000844028A4245C4D101780829C1D1A0\n:10AEC000407869788842BDD1F9B222463046FFF712\n:10AED0001EF9B7E70E2F7FF45BAFE9886F898B46C9\n:10AEE000B5F808903046FFF775F9ABF140014029FD\n:10AEF00001D309204AE0B9F1170F01D3172F01D26E\n:10AF00000B2043E040280ED000EB800271680AEB72\n:10AF1000C20008440178012903D140786978884249\n:10AF200090D00A2032E03046FFF735F9014640283C\n:10AF30002BD001EB810372680AEBC30002EB00081F\n:10AF4000012288F800206A7888F801207068AA88B1\n:10AF50004089B84200D93846AD8903232372A282C2\n:10AF6000E7812082A4F80C906582084600F018FE64\n:10AF70006081A8F81490A8F81870A8F80E50A8F8E6\n:10AF800010B0204600F0EDFD5CE7042005212172A1\n:10AF9000A4F80A80E081012121739E49D1E90421AE\n:10AFA000CDE9022169788DF80810ADF80A006088B3\n:10AFB00002AA3146FFF72BFEE3E7062F89D3B078CC\n:10AFC00090421AD13078010717D520F00800307070\n:10AFD0006088414660F31F4100200CF06FFD0220A5\n:10AFE0008DF81400A888ADF81800ADF81A906088A4\n:10AFF000224605A9F9F7E3F824E704213046FFF7D4\n:10B0000000F905464028BFD0022083030090224665\n:10B010002946304600F003FE4146608865F30F2163\n:10B0200060F31F4106200CF049FD0BE70E2FABD15A\n:10B0300004213046FFF7E5F881464028A4D0414678\n:10B04000608869F30F2160F31F4106200CF036FD84\n:10B05000A8890B906889099070682F894089B84247\n:10B0600000D938468346B5F80680A8880A90484635\n:10B0700000F096FD60810B9818B1022000900B9BA8\n:10B0800024E0B8F1170F1ED3172F1CD30420207211\n:10B0900009986082E781A4F810B0A4F80C8009EB4D\n:10B0A000890271680AEBC2000D18DDE90913A5F8E1\n:10B0B0001480A5F818B0E9812B82204600F051FDDC\n:10B0C00006202870BEE601200B2300902246494648\n:10B0D000304600F0A4FDB5E6082F8DD1A988304692\n:10B0E000FFF778F80746402886D000F044FD002896\n:10B0F0009BD107EB870271680AEBC20008448046C7\n:10B1000000F086FD002890D1ED88B8F80E002844A4\n:10B11000B0F5803F05D360883A46314600F0B6FD71\n:10B1200090E6002DCED0A8F80E0060883A46314651\n:10B13000FFF73CFB08202072384600F031FD6081AB\n:10B14000A5811EE72DE9F05F0C4601281FD09579F7\n:10B1500092F8048092F8056005EB85011F2202EB4E\n:10B16000C10121F0030B08EB060111FB05F14FF6BD\n:10B17000FF7202EAC10909F1030115FB0611264F0E\n:10B1800021F0031ABB6840B101283ED125E0616877\n:10B19000E57891F800804E78DEE75946184608F0C9\n:10B1A000C0FC606000B9FFDF5A460021606803F010\n:10B1B0006EF9E5705146B86808F0B3FC6168486103\n:10B1C00000B9FFDF6068426902EB090181616068D4\n:10B1D00080F800806068467017E0606852464169F8\n:10B1E000184608F0C9FC5A466168B86808F0C4FC03\n:10B1F000032008F003FE0446032008F007FE201A8F\n:10B20000012802D1B86808F081FC0BEB0A00BDE808\n:10B21000F09F000060610200300000200246002123\n:10B2200002208FE7F7B5FF4C0A20164620700098E1\n:10B2300060B100254FEA0D0008F055FC0021A17017\n:10B240006670002D01D10099A160FEBD012500208E\n:10B25000F2E770B50C46154638220021204603F06F\n:10B2600016F9012666700A22002104F11C0003F081\n:10B270000EF905B9FFDF297A207861F3010020700B\n:10B28000A87900282DD02A4621460020FFF75AFF32\n:10B2900061684020E34A88706168C870616808711D\n:10B2A000616848716168887161682888088161688F\n:10B2B00068884881606886819078002811D061682C\n:10B2C0000620087761682888C885616828884886CC\n:10B2D00060680685606869889288018681864685EF\n:10B2E000828570BDC878002802D00022012029E79D\n:10B2F000704770B50546002165F31F4100200CF032\n:10B30000DDFB0321284608F0D1FD040000D1FFDF5A\n:10B3100021462846FEF71CFF002804D0207840F084\n:10B3200010002070012070BD70B505460C4603204A\n:10B3300008F056FD08B1002070BDBA4885708480C1\n:10B34000012070BD2DE9FF4180460E460F0CFEF72F\n:10B350004DF9050007D06F800321384608F0A6FD9F\n:10B36000040008D106E004B03846BDE8F0411321DE\n:10B37000F9F750BBFFDF5FEA080005D0B8F1060F10\n:10B3800018D0FFDFBDE8FF8120782A4620F00800B2\n:10B3900020700020ADF8020002208DF800004FF66A\n:10B3A000FF70ADF80400ADF8060069463846F8F7BE\n:10B3B00006FFE7E7C6F3072101EB81021C23606863\n:10B3C00003EBC202805C042803D008280AD0FFDF08\n:10B3D000D8E7012000904FF440432A46204600F071\n:10B3E0001EFCCFE704B02A462046BDE8F041FEF738\n:10B3F0008EBE2DE9F05F05464089002790460C4639\n:10B400003E46824600F0BFFB8146287AC01E0828CF\n:10B410006BD2DFE800F00D04192058363C47722744\n:10B420001026002C6CD0D5E90301C4E902015CE0D0\n:10B4300070271226002C63D00A2205F10C0104F1BA\n:10B44000080002F0FAFF50E071270C26002C57D0BC\n:10B45000E868A06049E0742710269CB3D5E9030191\n:10B46000C4E902016888032108F020FD8346FEF745\n:10B47000BDF802466888508049465846FEF7FEFDF2\n:10B4800033E075270A26ECB1A88920812DE07627C4\n:10B490001426BCB105F10C0004F1080307C883E8C9\n:10B4A000070022E07727102664B1D5E90301C4E93B\n:10B4B00002016888032108F0F9FC01466888FFF75B\n:10B4C00046FB12E01CE073270826CCB168880321F4\n:10B4D00008F0ECFC01460078C00606D56888FEF747\n:10B4E00037FE10B96888F8F777FAA8F800602CB131\n:10B4F0002780A4F806A066806888A080002086E6E1\n:10B50000A8F80060FAE72DE9FC410C461E461746F4\n:10B510008046032108F0CAFC05460A2C0AD2DFE85F\n:10B5200004F005050505050509090907042303E0DD\n:10B53000062301E0FFDF0023CDE9007622462946FD\n:10B540004046FEF7C2FEBDE8FC81F8B50546A0F511\n:10B550007F40FF382BD0284608F0D9FD040000D1E9\n:10B56000FFDF204608F05FF9002821D001466A4637\n:10B57000204608F07AF900980321B0F805602846C3\n:10B5800008F094FC0446052E13D0304600F0FBFA78\n:10B5900005460146204600F025FB40B1606805EBFA\n:10B5A00085013E2202EBC101405A002800D0012053\n:10B5B000F8BD007A0028FAD00020F8BDF8B504469E\n:10B5C000408808F0A4FD050000D1FFDF6A46284648\n:10B5D000616800F0C4FA01460098091F8BB230F888\n:10B5E000032F0280428842800188994205D1042AB3\n:10B5F00008D0052A20D0062A16D022461946FFF781\n:10B6000099F9F8BD001D0E46054601462246304612\n:10B61000F6F739FF0828F4D1224629463046FCF7D0\n:10B6200064F9F8BD30000020636864880A46011D93\n:10B630002046FAF789F9F4E72246001DFFF773FB6D\n:10B64000EFE770B50D460646032108F02FFC040015\n:10B6500004D02078000704D5112070BD43F2020009\n:10B6600070BD2A4621463046FEF7C9FE18B9286843\n:10B6700060616868A061207840F0080020700020B8\n:10B6800070BD70B50D460646032108F00FFC04009E\n:10B6900004D02078000704D4082070BD43F20200D3\n:10B6A00070BD2A4621463046FEF7DDFE00B9A58270\n:10B6B000207820F008002070002070BD2DE9F04FA8\n:10B6C0000E4691B08046032108F0F0FB0446404648\n:10B6D00008F02FFD07460020079008900990ADF86C\n:10B6E00030000A9002900390049004B9FFDF0DF13E\n:10B6F0000809FFB9FFDF1DE038460BA9002207F05B\n:10B7000055FF9DF82C0000F07F050A2D00D3FFDFC8\n:10B710006019017F491E01779DF82C00000609D5AC\n:10B720002A460CA907A8FEF7C0FD19F80510491C08\n:10B7300009F80510761EF6B2DED204F13400F84D99\n:10B7400004F1260BDFF8DCA304F12A07069010E0D1\n:10B750005846069900F08CFA064628700A2800D34D\n:10B76000FFDF5AF8261040468847E08CC05DB042A3\n:10B7700002D0208D0028EBD10A202870E94D4E46DA\n:10B7800028350EE00CA907A800F072FA0446375DD0\n:10B7900055F8240000B9FFDF55F82420394640460B\n:10B7A0009047BDF81E000028ECD111B0BDE8F08F25\n:10B7B00010B5032108F07AFB040000D1FFDF0A2254\n:10B7C000002104F11C0002F062FE207840F0040029\n:10B7D000207010BD10B50C46032108F067FB204413\n:10B7E000007F002800D0012010BD2DE9F84F8946C8\n:10B7F00015468246032108F059FB070004D028466D\n:10B80000F5F727FD40B903E043F20200BDE8F88FE9\n:10B810004846F5F744FD08B11020F7E7786828B1ED\n:10B8200069880089814201D90920EFE7B9F8000051\n:10B830001C2488B100F0A7F980460146384600F084\n:10B84000D1F988B108EB8800796804EBC000085C86\n:10B8500001280BD00820D9E73846FEF79CFC80462B\n:10B86000402807D11320D1E70520CFE7FDF7BEFE22\n:10B8700006000BD008EB8800796804EBC0000C18B8\n:10B88000B9F8000020B1E88910B113E01120BDE73C\n:10B890002888172802D36888172801D20720B5E71F\n:10B8A000686838B12B1D224641463846FFF7E9F853\n:10B8B0000028ABD104F10C0269462046FEF7E1FFF7\n:10B8C000288860826888E082B9F8000030B10220E0\n:10B8D0002070E889A080E889A0B12BE003202070C7\n:10B8E000A889A08078688178402905D180F80280F5\n:10B8F00039465046FEF7D6FD404600F051F9A9F80A\n:10B90000000021E07868218B4089884200D90846F0\n:10B910002083A6F802A004203072B9F800007081DC\n:10B92000E0897082F181208B3082A08AB08130461C\n:10B9300000F017F97868C178402905D180F80380B4\n:10B9400039465046FEF7FFFD00205FE770B50D4613\n:10B950000646032108F0AAFA04000ED0284600F09B\n:10B9600012F905460146204600F03CF918B1284678\n:10B9700000F001F920B1052070BD43F2020070BD56\n:10B9800005EB85011C22606802EBC101084400F050\n:10B990003FF908B1082070BD2A462146304600F024\n:10B9A00075F9002070BD2DE9F0410C461746804620\n:10B9B000032108F07BFA0546204600F0E4F804462F\n:10B9C00095B10146284600F00DF980B104EB8401E1\n:10B9D0001C22686802EBC1014618304600F018F9D5\n:10B9E00038B10820BDE8F08143F20200FAE70520F3\n:10B9F000F8E73B46324621462846FFF742F8002842\n:10BA0000F0D1E2B229464046FEF75AFF708C083862\n:10BA1000082803D242484078F7F776FA0020E1E799\n:10BA20002DE9F0410D4617468046032108F03EFA05\n:10BA30000446284600F0A7F8064624B13846F5F734\n:10BA400008FC38B902E043F20200CBE73868F5F7AA\n:10BA500000FC08B11020C5E73146204600F0C2F8CE\n:10BA600060B106EB86011C22606802EBC10145183B\n:10BA7000284600F0CDF818B10820B3E70520B1E75B\n:10BA8000B888A98A884201D90C20ABE76168E88CA4\n:10BA90004978B0EBC10F01D31320A3E7314620460C\n:10BAA00000F094F80146606808234078C20005F170\n:10BAB000240008F082F8D7E90012C0E90012F2B2BF\n:10BAC00021464046FEF772FE00208BE72DE9F04745\n:10BAD0000D461F4690468146032108F0E7F90446CB\n:10BAE000284600F050F806463CB14DB13846F5F70F\n:10BAF000F4FB50B11020BDE8F08743F20200FAE7F2\n:10BB0000606858B1A0F80C8027E03146204600F06C\n:10BB100069F818B1304600F02EF828B10520EAE7A0\n:10BB2000300000207861020006EB86011C2260686C\n:10BB300002EBC1014518284600F06AF808B1082058\n:10BB4000D9E7A5F80880F2B221464846FEF7B8FECC\n:10BB50001FB1A8896989084438800020CBE707F025\n:10BB600084BE017821F00F01491C21F0F001103151\n:10BB70000170FDF73EBD20B94E48807808B1012024\n:10BB80007047002070474B498988884201D10020C6\n:10BB90007047402801D2402000E0403880B2704712\n:10BBA00010B50446402800D9FFDF2046FFF7E3FF29\n:10BBB00010B14048808810BD4034A0B210BD40682C\n:10BBC00042690078484302EBC0007047C278406881\n:10BBD000037812FB03F24378406901FB032100EB79\n:10BBE000C1007047C2788A4209D9406801EB8101DF\n:10BBF0001C2202EBC101405C08B10120704700200B\n:10BC000070470078062801D901207047002070474E\n:10BC10000078062801D00120704700207047F0B45A\n:10BC200001EB81061C27446807EBC6063444049DDB\n:10BC300005262670E3802571F0BCFEF71FBA10B50B\n:10BC4000418911B1FFF7DDFF08B1002010BD0120CF\n:10BC500010BD10B5C18C8278B1EBC20F04D9C18977\n:10BC600011B1FFF7CEFF08B1002010BD012010BDBB\n:10BC700010B50C4601230A22011D07F0D4FF0078FD\n:10BC80002188012282409143218010BDF0B402EB53\n:10BC900082051C264C6806EBC505072363554B68D7\n:10BCA0001C79402C03D11A71F0BCFEF791BCF0BC9A\n:10BCB000704700003000002010B5EFF3108000F056\n:10BCC000010472B6FC484178491C41704078012853\n:10BCD00001D10BF0B3FA002C00D162B610BD70B5E3\n:10BCE000F54CA07848B90125A570FFF7E5FF0BF0EA\n:10BCF000B6FA20B100200BF080FA002070BD4FF0A2\n:10BD00008040E570C0F80453F7E770B5EFF310809A\n:10BD100000F0010572B6E84C607800B9FFDF60788A\n:10BD2000401E6070607808B90BF08CFA002D00D1CD\n:10BD300062B670BDE04810B5817821B10021C170B4\n:10BD40008170FFF7E2FF002010BD10B504460BF034\n:10BD500086FAD9498978084000D001202060002067\n:10BD600010BD10B5FFF7A8FF0BF079FA02220123EE\n:10BD7000D149540728B1D1480260236103200872D9\n:10BD800002E00A72C4F804330020887110BD2DE966\n:10BD9000F84FDFF824934278817889F80420002650\n:10BDA00089F80510074689F806600078DFF810B3B7\n:10BDB000354620B1012811D0022811D0FFDF0BF049\n:10BDC00060FA4FF0804498B10BF062FAB0420FD1A4\n:10BDD00030460BF061FA0028FAD042E00126EEE787\n:10BDE000FFF76AFF58460168C907FCD00226E6E75C\n:10BDF0000120E060C4F80451B2490E600107D1F897\n:10BE00004412B04AC1F3423124321160AD49343199\n:10BE100008604FF0020AC4F804A3A060AA480168B1\n:10BE2000C94341F3001101F10108016841F010011B\n:10BE3000016001E019F0A8FFD4F804010028F9D04E\n:10BE400030460BF029FA0028FAD0B8F1000F04D1DF\n:10BE50009D48016821F010010160C4F808A3C4F8EE\n:10BE6000045199F805004E4680B1387870B90BF04E\n:10BE7000F6F980460BF006FC6FF00042B8F1000FB7\n:10BE800002D0C6E9032001E0C6E90302DBF80000A6\n:10BE9000C00701D00BF0DFF9387810B13572BDE87A\n:10BEA000F88F4FF01808C4F808830127A7614FF4F2\n:10BEB0002070ADF8000000BFBDF80000411EADF8D5\n:10BEC0000010F9D2C4F80C51C4F810517A48C01DC2\n:10BED0000BF06CFA3570FFF744FF676179493079F0\n:10BEE00020310860C4F80483D9E770B5050000D19B\n:10BEF000FFDF4FF080424FF0FF30C2F8080300210F\n:10BF0000C2F80011C2F80411C2F80C11C2F81011E5\n:10BF1000694C61700BF0AFF910B10120A070607036\n:10BF200067480068C00701D00BF095F92846BDE8C6\n:10BF300070402CE76048007A002800D0012070474C\n:10BF40002DE9F04F61484FF0000A85B0D0F800B0FD\n:10BF5000D14657465D4A5E49083211608406D4F8DE\n:10BF6000080110B14FF0010801E04FF000080BF09C\n:10BF7000F0F978B1D4F8240100B101208246D4F858\n:10BF80001C0100B101208146D4F8200108B101272D\n:10BF900000E00027D4F8000100B101200490D4F89B\n:10BFA000040100B101200390D4F80C0100B101207C\n:10BFB0000290D4F8100100B101203F4D0190287883\n:10BFC00000260090B8F1000F04D0C4F808610120E9\n:10BFD0000BF013F9BAF1000F04D0C4F82461092062\n:10BFE0000BF00BF9B9F1000F04D0C4F81C610A2062\n:10BFF0000BF003F927B1C4F820610B200BF0FDF81A\n:10C000002D48C01D0BF0DAF900B1FFDFDFF8AC807E\n:10C010000498012780B1C4F80873E87818B1EE706D\n:10C0200000200BF0EAF8287A022805D103202872B4\n:10C030000221C8F800102761039808B1C4F8046110\n:10C04000029850B1C4F80C61287A032800D0FFDFB1\n:10C05000C8F800602F72FFF758FE019838B1C4F895\n:10C060001061287A012801D100F05CF8676100981E\n:10C0700038B12E70287A012801D1FFF772FEFFF740\n:10C0800044FE0D48C01D0BF0AFF91049091DC1F861\n:10C0900000B005B0BDE8F08F074810B5C01D0BF02B\n:10C0A0008DF90549B0B1012008704FF0E021C1F8C9\n:10C0B0000002BDE81040FFE544000020340C0040C1\n:10C0C0000C0400401805004010ED00E0100502408F\n:10C0D00001000001087A012801D1FFF742FEBDE806\n:10C0E000104024480BF080B970B5224CE41FA078B2\n:10C0F00008B90BF0A7F801208507A861207A00266F\n:10C10000032809D1D5F80C0120B900200BF0C4F8A0\n:10C110000028F7D1C5F80C6126724FF0FF30C5F842\n:10C12000080370BD70B5134CE41F6079F0B10128AD\n:10C1300003D0A179401E814218DA0BF090F8054631\n:10C140000BF0A0FA6179012902D9A179491CA171EA\n:10C150000DB1216900E0E168411A022902DA11F10A\n:10C16000020F06DC0DB1206100E0E060BDE8704028\n:10C17000F7E570BD4B0000200F4A12680D498A4256\n:10C180000CD118470C4A12680A4B9A4206D101B5E5\n:10C190000BF04AFA0BF01DFDBDE8014007490968A4\n:10C1A0000958084706480749054A064B70470000EA\n:10C1B00000000000BEBAFECA5C000020040000209F\n:10C1C000C8130020C8130020F8B51D46DDE9064756\n:10C1D0000E000AD007F0ADFF2346FF1DBCB231466A\n:10C1E0002A46009407F0BBFBF8BDD0192246194639\n:10C1F00002F023F92046F8BD70B50D460446102222\n:10C20000002102F044F9258117206081A07B40F0D5\n:10C210000A00A07370BD4FF6FF720A80014602202B\n:10C220000BF04CBC704700897047827BD30701D16B\n:10C23000920703D48089088000207047052070474A\n:10C24000827B920700D581817047014600200988D2\n:10C2500041F6FE52114200D00120704700B503465E\n:10C26000807BC00701D0052000BD59811846FFF72B\n:10C27000ECFFC00703D0987B40F004009873987BD4\n:10C2800040F001009873002000BD827B520700D56A\n:10C2900009B14089704717207047827B61F3C30260\n:10C2A000827370472DE9FC5F0E460446017896467E\n:10C2B000012000FA01F14DF6FF5201EA020962681D\n:10C2C0004FF6FF7B1188594502D10920BDE8FC9F3C\n:10C2D000B9F1000F05D041F6FE55294201D00120E9\n:10C2E000F4E741EA090111801D0014D000232B70EE\n:10C2F00094F800C0052103221F464FF0020ABCF14A\n:10C300000E0F76D2DFE80CF0F909252F47646B7722\n:10C31000479193B4D1D80420D8E7616820898B7BFA\n:10C320009B0767D517284AD30B89834247D389894E\n:10C33000172901D3814242D185F800A0A5F8010058\n:10C340003280616888816068817B21F0020181739D\n:10C35000C6E0042028702089A5F801006089A5F8AE\n:10C3600003003180BCE0208A3188C01D1FFA80F8AC\n:10C37000414524D3062028702089A5F80100608952\n:10C38000A5F80300A089A5F805000721208ACDE9BA\n:10C390000001636941E00CF0FF00082810D008207C\n:10C3A00028702089A5F801006089A5F80300318074\n:10C3B0006A1D694604F10C0009F025FB10B15EE02E\n:10C3C0001020EDE730889DF800100844308087E0A9\n:10C3D0000A2028702089A5F80100328044E00C2052\n:10C3E00028702089A5F801006089A5F80300318034\n:10C3F0003AE082E064E02189338800EB41021FFAD1\n:10C4000082F843453BD3B8F1050F38D30E222A708A\n:10C410000BEA4101CDE90010E36860882A467146C5\n:10C42000FFF7D2FEA6F800805AE04020287060890D\n:10C430003188C01C1FFA80F8414520D32878714606\n:10C4400020F03F00123028702089A5F80100608993\n:10C45000CDE9000260882A46E368FFF7B5FEA6F83A\n:10C460000080287840063BD461682089888037E0C6\n:10C47000A0893288401D1FFA80F8424501D2042766\n:10C480003DE0162028702089A5F801006089A5F8F4\n:10C490000300A089CDE9000160882A46714623691E\n:10C4A000FFF792FEA6F80080DEE718202870207AB9\n:10C4B0006870A6F800A013E061680A88920401D4AD\n:10C4C00005271CE0C9882289914201D0062716E081\n:10C4D0001E21297030806068018821F4005101809C\n:10C4E000B9F1000F0BD061887823002202200BF0F5\n:10C4F0003BFA61682078887006E033800327606823\n:10C50000018821EA090101803846DFE62DE9FF4F65\n:10C5100085B01746129C0D001E461CD03078C1070E\n:10C5200003D000F03F00192801D9012100E00021CB\n:10C530002046FFF7AAFEA8420DD32088A0F57F4130\n:10C54000FF3908D03078410601D4000605D508200F\n:10C5500009B0BDE8F08F0720FAE700208DF8000051\n:10C560008DF8010030786B1E00F03F0C0121A81EF1\n:10C570004FF0050A4FF002094FF0030B9AB2BCF1DD\n:10C58000200F75D2DFE80CF08B10745E7468748C29\n:10C59000749C74B574BA74C874D474E1747474F10E\n:10C5A00074EF74EE74ED748B052D78D18DF80090D6\n:10C5B000A0788DF804007088ADF8060030798DF809\n:10C5C0000100707800F03F000C2829D00ADCA0F1AF\n:10C5D0000200092863D2DFE800F0126215621A62D5\n:10C5E0001D622000122824D004DC0E281BD0102845\n:10C5F000DBD11BE016281FD01828D6D11FE02078E9\n:10C60000800701E020784007002848DAEEE0207833\n:10C610000007F9E72078C006F6E720788006F3E700\n:10C6200020784006F0E720780006EDE72088C00576\n:10C63000EAE720884005E7E720880005E4E720884E\n:10C64000C004E1E72078800729D5032D27D18DF894\n:10C6500000B0B6F8010081E0217849071FD5062D0A\n:10C660001DD381B27078012803D0022817D102E0CF\n:10C67000C9E0022000E0102004228DF8002072782A\n:10C680008DF80420801CB1FBF0F2ADF8062092B2C8\n:10C6900042438A4203D10397ADF80890A6E079E0BF\n:10C6A0002078000776D598B282088DF800A0ADF802\n:10C6B0000420B0EB820F6DD10297ADF8061095E023\n:10C6C0002178C90666D5022D64D381B206208DF883\n:10C6D0000000707802285DD3B1FBF0F28DF8040001\n:10C6E000ADF8062092B242438A4253D1ADF8089089\n:10C6F0007BE0207880064DD5072003E020784006B7\n:10C700007FD508208DF80000A088ADF80400ADF8B2\n:10C710000620ADF8081068E02078000671D50920E1\n:10C72000ADF804208DF80000ADF8061002975DE02A\n:10C730002188C90565D5022D63D381B20A208DF801\n:10C740000000707804285CD3C6E72088400558D5DF\n:10C75000012D56D10B208DF80000A088ADF8040003\n:10C7600044E021E026E016E0FFE72088000548D5F8\n:10C77000052D46D30C208DF80000A088ADF80400EC\n:10C78000B6F803006D1FADF80850ADF80600ADF81F\n:10C790000AA02AE035E02088C00432D5012D30D12E\n:10C7A0000D208DF8000021E02088800429D4B6F8FF\n:10C7B0000100E080A07B000723D5032D21D3307832\n:10C7C00000F03F001B2818D00F208DF800002088B3\n:10C7D00040F40050A4F80000B6F80100ADF80400E1\n:10C7E000ED1EADF80650ADF808B003976946059800\n:10C7F000F5F792FB050008D016E00E208DF800003A\n:10C80000EAE7072510E008250EE0307800F03F0049\n:10C810001B2809D01D2807D0022005990BF04EF9DE\n:10C82000208800F400502080A07B400708D52046D7\n:10C83000FFF70BFDC00703D1A07B20F00400A0731D\n:10C84000284685E61FB5022806D101208DF8000094\n:10C8500088B26946F5F760FB1FBD0000F8B51D46BC\n:10C86000DDE906470E000AD007F063FC2346FF1DF2\n:10C87000BCB231462A46009407F071F8F8BDD019D1\n:10C880002246194601F0D9FD2046F8BD2DE9FF4F9B\n:10C890008DB09B46DDE91B57DDF87CA00C46082BCC\n:10C8A00005D0E06901F0FEF850B11020D2E02888F0\n:10C8B000092140F0100028808AF80010022617E0B5\n:10C8C000E16901208871E2694FF420519180E169AA\n:10C8D0008872E06942F601010181E06900218173FB\n:10C8E0002888112140F0200028808AF800100426B2\n:10C8F00038780A900A2038704FF0020904F11800C5\n:10C900004D460C9001F0C6FBB04681E0BBF1100F24\n:10C910000ED1022D0CD0A9EB0800801C80B20221A0\n:10C92000CDE9001005AB52461E990D98FFF796FF12\n:10C93000BDF816101A98814203D9F74800790F9074\n:10C9400004E003D10A9808B138702FE04FF00201DB\n:10C95000CDE900190DF1160352461E990D98FFF707\n:10C960007DFF1D980088401B801B83B2C6F1FF002D\n:10C97000984200D203461E990BA8D9B15FF000027D\n:10C98000DDF878C0CDE9032009EB060189B2CDE9D5\n:10C9900001C10F980090BDF8161000220D9801F00B\n:10C9A0000EFC387070B1C0B2832807D0BDF81600F5\n:10C9B00020833AE00AEB09018A19E1E7022011B06D\n:10C9C000BDE8F08FBDF82C00811901F0FF08022DA1\n:10C9D0000DD09AF80120424506D1BDF820108142C1\n:10C9E00007D0B8F1FF0F04D09AF801801FE08AF851\n:10C9F0000180C94800680178052902D1BDF81610E8\n:10CA0000818009EB08001FFA80F905EB080085B268\n:10CA1000DDE90C1005AB0F9A01F03FFB28B91D981A\n:10CA20000088411B4145BFF671AF022D13D0BBF109\n:10CA3000100F0CD1A9EB0800801C81B20220CDE9B7\n:10CA4000000105AB52461E990D98FFF707FF1D9890\n:10CA50000580002038700020B1E72DE9F8439C469E\n:10CA6000089E13460027B26B9AB3491F8CB2F18F10\n:10CA7000A1F57F45FF3D05D05518AD882944891D96\n:10CA80008DB200E000252919B6F83C8008314145F7\n:10CA900020D82A44BCF8011022F8021BBCF803106D\n:10CAA00022F8021B984622F8024B914607F02FFB12\n:10CAB0004FF00C0C41464A462346CDF800C006F024\n:10CAC0001AFFF587B16B00202944A41D214408807A\n:10CAD00003E001E0092700E083273846BDE8F8833A\n:10CAE00010B50B88848F9C420CD9846BE0180488A5\n:10CAF00044B1848824F40044A41D23440B801060B6\n:10CB0000002010BD0A2010BD2DE9F0478AB0002595\n:10CB1000904689468246ADF8185007274BE00598A5\n:10CB200006888088000446D4A8F8006007A801950C\n:10CB300000970295CDE903504FF40073002231466F\n:10CB4000504601F03CFB04003CD1BDF81800ADF8A4\n:10CB50002000059804888188B44216D10A0414D4B0\n:10CB600001950295039521F400410097049541F445\n:10CB7000804342882146504601F0BFF804000BD1A3\n:10CB80000598818841F40041818005AA08A948469A\n:10CB9000FFF7A6FF0400DCD00097059802950195E9\n:10CBA000039504950188BDF81C300022504601F021\n:10CBB000A4F80A2C06D105AA06A94846FFF790FF5B\n:10CBC0000400ACD0ADF8185004E00598818821F439\n:10CBD0000041818005AA06A94846FFF781FF002889\n:10CBE000F3D00A2C03D020460AB0BDE8F08700201D\n:10CBF000FAE710B50C46896B86B051B10C218DF85F\n:10CC00000010A18FADF80810A16B01916946FAF7E9\n:10CC100001FB00204FF6FF71A063E187A08706B0FB\n:10CC200010BD2DE9F0410D460746896B0020069E98\n:10CC30001446002911D0012B0FD13246294638461F\n:10CC4000FFF762FF002808D1002C06D032462946A3\n:10CC50003846BDE8F04100F034BFBDE8F0812DE971\n:10CC6000FC411446DDE9087C0E46DDE90A15521D3B\n:10CC7000BCF800E092B2964502D20720BDE8FC81E4\n:10CC8000ACF8002017222A70A5F80160A5F803303F\n:10CC90000522CDE900423B462A46FFF7DFFD002092\n:10CCA000ECE770B50C46154648220021204601F0FD\n:10CCB000EEFB04F1080044F81C0F00204FF6FF7152\n:10CCC000E06161842084A5841720E08494F82A0020\n:10CCD00040F00A0084F82A0070BD4FF6FF720A8007\n:10CCE000014603200AF0EABE30B585B00C46054681\n:10CCF000FFF77FFFA18E284629B101218DF8001092\n:10CD00006946FAF787FA0020E0622063606305B0A5\n:10CD100030BDB0F8400070476000002090F8462019\n:10CD2000920703D4408808800020F4E70620F2E749\n:10CD300090F846209207EED5A0F84410EBE70146A4\n:10CD4000002009880A0700D5012011F0F00F01D05A\n:10CD500040F00200CA0501D540F004008A0501D563\n:10CD600040F008004A0501D540F010000905D2D571\n:10CD700040F02000CFE700B5034690F84600C0071A\n:10CD800001D0062000BDA3F842101846FFF7D7FFD8\n:10CD900010F03E0F05D093F8460040F0040083F8F1\n:10CDA000460013F8460F40F001001870002000BD47\n:10CDB00090F84620520700D511B1B0F84200AAE71A\n:10CDC0001720A8E710F8462F61F3C3020270A2E70C\n:10CDD0002DE9FF4F9BB00E00DDE92B34DDE929780A\n:10CDE000289D24D02878C10703D000F03F001928DF\n:10CDF00001D9012100E000212046FFF7D9FFB04210\n:10CE000015D32878410600F03F010CD41E290CD020\n:10CE1000218811F47F6F0AD13A8842B1A1F57F428F\n:10CE2000FF3A04D001E0122901D1000602D5042006\n:10CE30001FB0C5E5FA491D984FF0000A08718DF83A\n:10CE400018A08DF83CA00FAA0A60ADF81CA0ADF8A0\n:10CE500050A02978994601F03F02701F5B1C04F135\n:10CE6000180C4FF0060E4FF0040BCDF858C01F2AD7\n:10CE70007ED2DFE802F07D7D107D267DAC7DF47DE5\n:10CE8000F37DF27DF17DF47DF07D7D7DEF7DEE7DA6\n:10CE90007D7D7D7DED0094F84610B5F80100890791\n:10CEA00001D5032E02D08DF818B01EE34FF40061B7\n:10CEB000ADF85010608003218DF83C10ADF84000B3\n:10CEC000D4E2052EEFD1B5F801002083ADF81C00A7\n:10CED000B5F80310618308B1884201D9012079E1D6\n:10CEE0000020A07220814FF6FF702084169801F078\n:10CEF000D1F8052089F800000220029083460AAB91\n:10CF00001D9A16991B9801F0C8F890BB9DF82E0049\n:10CF1000012804D0022089F80100102003E001203C\n:10CF200089F8010002200590002203A90BA808F04F\n:10CF30006AFDE8BB9DF80C00059981423DD1398816\n:10CF4000801CA1EB0B01814237DB02990220CDE965\n:10CF500000010DF12A034A4641461B98FFF77EFC6B\n:10CF600002980BF1020B801C81B217AA029101E01A\n:10CF70009CE228E003A90BA808F045FD02999DF862\n:10CF80000C00CDE9000117AB4A4641461B98FFF75C\n:10CF900065FC9DF80C000AAB0BEB00011FFA81FB4E\n:10CFA00002991D9A084480B2029016991B9800E0DD\n:10CFB00003E001F072F80028B6D0BBF1020F02D0F6\n:10CFC000A7F800B04FE20A208DF818004BE20021CC\n:10CFD0000391072EFFF467AFB5F801002083ADF889\n:10CFE0001C00B5F80320628300283FF477AF90421D\n:10CFF0003FF674AF0120A072B5F805002081002033\n:10D00000A073E06900F04EFD78B9E16901208871F4\n:10D01000E2694FF420519180E1698872E16942F63A\n:10D0200001000881E06900218173F01F20841E98AF\n:10D03000606207206084169801F02CF8072089F8B8\n:10D0400000000120049002900020ADF82A0028E0A2\n:10D0500019E29FE135E1E5E012E2A8E080E043E07B\n:10D060000298012814D0E0698079012803D1BDF825\n:10D070002800ADF80E00049803ABCDE900B04A4695\n:10D0800041461B98FFF7EAFB0498001D80B204900C\n:10D09000BDF82A00ADF80C00ADF80E00059880B27E\n:10D0A00002900AAB1D9A16991B9800F0F6FF28B95A\n:10D0B00002983988001D05908142D1D2029801283A\n:10D0C00081D0E0698079012803D1BDF82800ADF84E\n:10D0D0000E00049803ABCDE900B04A4641461B98C8\n:10D0E000FFF7BCFB0298BDE1072E02D0152E7FF49E\n:10D0F000DAAEB5F801102183ADF81C10B5F80320A5\n:10D10000628300293FF4EAAE91423FF6E7AE012187\n:10D11000A1724FF0000BA4F808B084F80EB0052EF1\n:10D1200007D0C0B2691DE26908F06BFC00287FF4EB\n:10D130004AAF4FF6FF70208401A906AA14A8CDF8C3\n:10D1400000B081E885032878214600F03F031D9A4E\n:10D150001B98FFF79BFB8246208BADF81C0082E1F9\n:10D160000120032EC3D14021ADF85010B5F80110B5\n:10D170002183ADF81C100AAAB8F1000F00D00023DB\n:10D18000CDE9020304921D98CDF804800090388800\n:10D190000022401E83B21B9801F011F88DF8180090\n:10D1A00090BB0B2089F80000BDF8280035E04FF057\n:10D1B000010C052E9BD18020ADF85000B5F8011070\n:10D1C0002183B5F803002084ADF81C10B0F5007F72\n:10D1D00003D907208DF8180087E140F47C422284AF\n:10D1E0000CA8B8F1000F00D00023CDE90330CDE941\n:10D1F000018C1D9800903888401E83B21B9800F067\n:10D20000DEFF8DF8180018B18328A8D10220BFE0F6\n:10D210000D2189F80010BDF83000401C22E100000B\n:10D2200060000020032E04D248067FF53CAE0020AB\n:10D2300018E1B5F80110ADF81C102878400602D5A9\n:10D240008DF83CE002E007208DF83C004FF000082C\n:10D250000320CDE902081E9BCDF810801D98019394\n:10D26000A6F1030B00901FFA8BF342461B9800F0C7\n:10D2700044FD8DF818008DF83C80297849060DD5BD\n:10D280002088C00506D5208BBDF81C10884201D12E\n:10D29000C4F8248040468DF81880E3E0832801D14B\n:10D2A0004FF0020A4FF48070ADF85000BDF81C003A\n:10D2B0002083A4F820B01E986062032060841321AC\n:10D2C000CDE0052EFFF4EFADB5F80110ADF81C1060\n:10D2D000A28F6AB3A2F57F43FE3B29D008228DF8C6\n:10D2E0003C2000BF4FF0000B0523CDE9023BDDF8E9\n:10D2F00078C0CDF810B01D9A80B2CDF804C040F4CB\n:10D3000000430092B5F803201B9800F0F6FC8DF85E\n:10D310003CB04FF400718DF81800ADF85010832820\n:10D3200010D0F8B1A18FA1F57F40FE3807D0DCE026\n:10D330000B228DF83C204FF6FE72A287D2E7A4F8AC\n:10D340003CB0D2E000942B4631461E9A1B98FFF762\n:10D3500084FB8DF8180008B183284BD1BDF81C0060\n:10D36000208353E700942B4631461E9A1B98FFF703\n:10D3700074FB8DF81800E8BBE18FA06B0844831D97\n:10D380008DE888034388828801881B98FFF767FC33\n:10D39000824668E095F80180022E70D15FEA0800AD\n:10D3A00002D0B8F1010F6AD109208DF83C0007A81E\n:10D3B00000908DF840804346002221461B98FFF7DD\n:10D3C00030FC8DF842004FF0000B8DF843B050B99F\n:10D3D000B8F1010F12D0B8F1000F04D1A18FA1F55F\n:10D3E0007F40FF380AD0A08F40B18DF83CB04FF499\n:10D3F000806000E037E0ADF850000DE00FA91B9809\n:10D40000F9F708FF82468DF83CB04FF48060ADF824\n:10D410005000BAF1020F06D0FC480068C07928B16C\n:10D420008DF8180027E0A4F8188044E0BAF1000F46\n:10D4300003D081208DF818003DE007A800904346F6\n:10D44000012221461B98FFF7ECFB8DF818002146BE\n:10D450001B98FFF7CEFB9DF8180020B9192189F819\n:10D460000010012038809DF83C0020B10FA91B98C6\n:10D47000F9F7D0FE8246BAF1000F33D01BE018E076\n:10D480008DF818E031E02078000712D5012E10D178\n:10D490000A208DF83C00E088ADF8400003201B997D\n:10D4A0000AF00CFB0820ADF85000C0E648067FF5F6\n:10D4B000FAAC4FF0040A2088BDF8501008432080D1\n:10D4C000BDF8500080050BD5A18FA1F57F40FE3837\n:10D4D00006D11E98E06228982063A6864FF0030AC2\n:10D4E0005046A5E49DF8180078B1012089F80000A5\n:10D4F000297889F80110BDF81C10A9F802109DF8D0\n:10D50000181089F80410052038802088BDF85010C4\n:10D5100088432080E4E72DE9FF4F8846087895B0DE\n:10D52000012181404FF20900249C0140ADF82010F8\n:10D530002088DDF88890A0F57F424FF0000AFF3A7E\n:10D5400006D039B1000705D5012019B0BDE8F08F2C\n:10D550000820FAE7239E4FF0000B0EA886F800B0D3\n:10D5600018995D460988ADF83410A8498DF81CB0AB\n:10D57000179A0A718DF838B0086098F800000128F1\n:10D580003BD0022809D003286FD1307820F03F002B\n:10D590001D303070B8F80400E08098F800100320C7\n:10D5A000022904D1317821F03F011B31317094F808\n:10D5B0004610090759D505ABB9F1000F13D000216A\n:10D5C00002AA82E80B000720CDE90009BDF834006B\n:10D5D000B8F80410C01E83B20022159800F0EFFDC9\n:10D5E0000028D1D101E0F11CEAE7B8F80400A6F860\n:10D5F0000100BDF81400C01C04E198F805108DF876\n:10D600001C1098F80400012806D04FF4007A022874\n:10D610002CD00328B8D16CE12188B8F8080011F4A7\n:10D620000061ADF8201020D017281CD3B4F84010AA\n:10D63000814218D3B4F84410172901D3814212D182\n:10D64000317821F03F01C91C3170A6F80100032197\n:10D65000ADF83410A4F8440094F8460020F002001D\n:10D6600084F8460065E105257EE177E1208808F130\n:10D67000080700F4FE60ADF8200010F0F00F1BD09A\n:10D6800010F0C00F03D03888228B9042EBD199B9AB\n:10D69000B878C00710D0B9680720CDE902B1CDF83D\n:10D6A00004B00090CDF810B0FB88BA88398815987E\n:10D6B00000F023FB0028D6D12398BDF82010401C91\n:10D6C00080294ED006DC10290DD020290BD040290E\n:10D6D00087D124E0B1F5807F6ED051457ED0B1F581\n:10D6E000806F97D1DEE0C80601D5082000E0102049\n:10D6F00082460DA907AA0520CDE902218DF8380040\n:10D70000ADF83CB0CDE9049608A93888CDE9000110\n:10D710005346072221461598FFF7B8F8A8E09DF870\n:10D720001C2001214FF00A0A002A9BD105ABB9F158\n:10D73000000F00D00020CDE902100720CDE900093C\n:10D74000BDF834000493401E83B2218B002215984B\n:10D7500000F035FD8DF81C000B203070BDF8140072\n:10D7600020E09DF81C2001214FF00C0A002A22D154\n:10D7700013ABB9F1000F00D00020CDE90210072053\n:10D78000CDE900090493BDF83400228C401E83B219\n:10D79000218B159800F013FD8DF81C000D203070C2\n:10D7A000BDF84C00401CADF8340005208DF8380061\n:10D7B000208BADF83C00BCE03888218B88427FF498\n:10D7C00052AF9DF81C004FF0120A00281CD1606A6D\n:10D7D000A8B1B878C0073FF446AF00E018E0BA68D7\n:10D7E0000720CDE902B2CDF804B00090CDF810B01A\n:10D7F000FB88BA88159800F080FA8DF81C00132079\n:10D8000030700120ADF8340093E00000600000208B\n:10D810003988208B8142D2D19DF81C004FF0160A26\n:10D820000028A06B08D0E0B34FF6FF7000215F46E0\n:10D83000ADF808B0019027E068B1B978C907BED14A\n:10D84000E18F0DAB0844821D03968DE80C024388DE\n:10D850008288018809E0B878C007BCD0BA680DABEF\n:10D8600003968DE80C02BB88FA881598FFF7F7F944\n:10D8700005005ED0072D72D076E0019005AA02A9BE\n:10D880002046FFF72DF90146E28FBDF808008242DD\n:10D8900001D00029F1D0E08FA16B084407800198E6\n:10D8A000E08746E09DF81C004FF0180A40B1208B3D\n:10D8B000C8B13888208321461598FFF79AF938E0D7\n:10D8C00004F118000090237E012221461598FFF7ED\n:10D8D000A8F98DF81C000028EDD119203070012026\n:10D8E000ADF83400E7E7052521461598FFF781F9E3\n:10D8F0003AE0208800F40070ADF8200050452DD1AA\n:10D90000A08FA0F57F41FE3901D006252CE0D8F884\n:10D9100008004FF0160A48B1A063B8F80C10A187B0\n:10D920004FF6FF71E187A0F800B002E04FF6FF70FC\n:10D93000A087BDF8200030F47F611AD07823002240\n:10D94000032015990AF010F898F80000207120883B\n:10D95000BDF82010084320800EE000E00725208855\n:10D96000BDF8201088432080208810F47F6F1CD0E1\n:10D970003AE02188814321809DF8380020B10EA92A\n:10D980001598F9F747FC05469DF81C000028EBD0D8\n:10D9900086F801A001203070208B70809DF81C005B\n:10D9A00030710520ADF83400DEE7A18EE1B11898A2\n:10D9B0000DAB0088ADF834002398CDE90304CDE920\n:10D9C0000139206B0090E36A179A1598FFF700FA67\n:10D9D000054601208DF838000EA91598F9F71AFCB4\n:10D9E00000B10546A4F834B094F8460040070AD5C3\n:10D9F0002046FFF7A4F910F03E0F04D114F8460FAB\n:10DA000020F0040020701898BDF8341001802846DA\n:10DA10009BE500B585B0032806D102208DF80000F3\n:10DA200088B26946F9F7F6FB05B000BD10B5384C71\n:10DA30000B782268012B02D0022B2AD111E0137837\n:10DA40000BB1052B01D10423137023688A889A80B7\n:10DA50002268CB88D38022680B8913814989518140\n:10DA60000DE08B8893802268CB88D38022680B8955\n:10DA700013814B8953818B899381096911612168D5\n:10DA8000F9F7C8FB226800210228117003D0002892\n:10DA900000D0812010BD832010BD806B002800D0F5\n:10DAA000012070478178012909D10088B0F5205FF5\n:10DAB00003D042F60101884201D1002070470720BF\n:10DAC0007047F0B587B0002415460E460746ADF8FE\n:10DAD000184011E005980088288005980194811D60\n:10DAE000CDE902410721049400918388428801888E\n:10DAF000384600F002F930B905AA06A93046FEF70B\n:10DB0000EFFF0028E6D00A2800D1002007B0F0BDC2\n:10DB10006000002010B58B7883B102789A4205D15D\n:10DB20000B885BB102E08B79091D4BB18B789A426F\n:10DB3000F9D1B0F801300C88A342F4D1002010BD17\n:10DB4000812010BD072826D012B1012A27D103E079\n:10DB5000497801F0070102E04978C1F3C2010529C3\n:10DB60001DD2DFE801F00318080C12000AB10320EF\n:10DB700070470220704704280DD250B10DE00528EF\n:10DB800009D2801E022808D303E0062803D0032808\n:10DB900003D005207047002070470F207047812078\n:10DBA0007047C0B282060BD4000607D5FA48807AC7\n:10DBB0004143C01D01EBD00080B27047084670475A\n:10DBC0000020704770B513880B800B781C0625D594\n:10DBD000F14CA47A844204D843F01000087000206D\n:10DBE00070BD956800F0070605EBD0052D78F5406F\n:10DBF00065F304130B701378D17803F0030341EA43\n:10DC0000032140F20123B1FBF3F503FB15119268E8\n:10DC1000E41D00FB012000EBD40070BD906870BDD6\n:10DC200037B51446BDF804101180117841F0040195\n:10DC300011709DF804100A061ED5D74AA368C1F3D7\n:10DC40000011927A824208D8FE2811D1D21DD20842\n:10DC50004942184600F01BFC0AE003EBD00200F03A\n:10DC60000703012510789D40A84399400843107090\n:10DC7000207820F0100020703EBD2DE9F0410746CD\n:10DC8000C81C0E4620F00300B04202D08620BDE83A\n:10DC9000F081C14D002034462E60AF802881AA72E9\n:10DCA000E8801AE0E988491CE980810614D4E1780B\n:10DCB00000F0030041EA002040F20121B0FBF1F244\n:10DCC00001FB12012068FFF76CFF2989084480B22C\n:10DCD0002881381A3044A0600C3420784107E1D400\n:10DCE0000020D4E7AC4801220189C08800EB400045\n:10DCF00002EB8000084480B270472DE9FF4F89B0E5\n:10DD00001646DDE9168A0F46994623F44045084633\n:10DD100000F054FB040002D02078400703D4012017\n:10DD20000DB0BDE8F08F099806F086F802902078D3\n:10DD3000000606D59848817A0298814201D887204A\n:10DD4000EEE7224601A90298FFF73CFF8346002038\n:10DD50008DF80C004046B8F1070F1AD00122214679\n:10DD6000FFF7F0FE0028DBD12078400611D5022015\n:10DD70008DF80C00ADF81070BDF80400ADF812007D\n:10DD8000ADF814601898ADF81650CDF81CA0ADF899\n:10DD900018005FEA094004D500252E46A846012751\n:10DDA0000CE02178E07801F0030140EA012040F224\n:10DDB0000121B0FBF1F2804601FB12875FEA494086\n:10DDC00009D5B84507D1A178207901F0030140EACF\n:10DDD0000120B04201D3BE4201D90720A0E7A81913\n:10DDE0001FFA80F9B94501D90D2099E79DF80C007B\n:10DDF00028B103A90998F9F70BFA002890D1B84582\n:10DE000007D1A0784FEA192161F30100A07084F8CE\n:10DE100004901A9800B10580199850EA0A0027D09A\n:10DE2000199830B10BEB06002A46199900F005FB52\n:10DE30000EE00BEB06085746189E099806F067F9A6\n:10DE40002B46F61DB5B239464246009505F053FD06\n:10DE5000224601A90298FFF7B5FE9DF8040022466C\n:10DE600020F010008DF80400DDE90110FFF7D8FE66\n:10DE7000002055E72DE9FF4FDFF81C91824685B061\n:10DE8000B9F80610D9F8000001EB410100EB81045C\n:10DE900040F20120B2FBF0F1174600FB1175DDE9FD\n:10DEA000138B4E4629460698FFF77BFE0346FFF785\n:10DEB00019FF1844B1880C30884202D9842009B077\n:10DEC0002FE70698C6B2300603D5B00601D5062066\n:10DED000F5E7B9F80620521C92B2A9F80620BBF16A\n:10DEE000000F01D0ABF80020B00602D5C4F80880BE\n:10DEF0000AE0B9F808201A4492B2A9F80820D9F823\n:10DF00000000891A0844A0602246FE200699FFF707\n:10DF100087FEE77025712078390A61F301002A0A2B\n:10DF2000A17840F0040062F30101A17020709AF81A\n:10DF300002006071BAF80000E08000252573300609\n:10DF400002D599F80A7000E00127B00601D54FF01C\n:10DF500000084E4600244FF007090FE0CDE90258B3\n:10DF60000195CDF800900495F1882046129B089AFF\n:10DF7000FFF7C3FE0028A2D1641CE4B2BC42EDD37B\n:10DF800000209CE700B5FFF7ADFE03490C308A88FE\n:10DF9000904203D9842000BD00060020CA8808688A\n:10DFA00002EB420300EB8300521C037823F00403CE\n:10DFB0000370CA80002101730846ECE72DE9F047A1\n:10DFC000804600F0FBF9070005D000264446F74DD7\n:10DFD00040F2012916E00120BDE8F087204600F05C\n:10DFE000EDF90278C17802F0030241EA0222B2FBA5\n:10DFF000F9F309FB13210068FFF7D3FD3044641CDB\n:10E0000086B2A4B2E988601E8142E7DCA8F1010073\n:10E01000E8802889801B288100203870DCE710B553\n:10E02000144631B1491E218005F006FFA070002082\n:10E0300010BD012010BD70B50446DC48C1880368DE\n:10E0400001E0401C20802088884207D200EB40027B\n:10E0500013EB820202D015786D07F2D580B28842A8\n:10E0600016D2AAB15079A072D08820819178107907\n:10E0700001F0030140EA0120A081A078E11CFFF734\n:10E08000A1FD20612088401C2080E080002070BD20\n:10E090000A2070BD0121018270472DE9FF4F85B034\n:10E0A0004FF6FF798246A3F8009048681E460D4659\n:10E0B00080788DF8060048680088ADF804000020DC\n:10E0C0008DF80A00088A0C88A04200D304462C82EE\n:10E0D00051E03878400708D4641C288AA4B2401C58\n:10E0E000288208F10100C0B246E0288A401C28823C\n:10E0F000781D6968FFF70EFDD8BB3188494501D10D\n:10E10000601E30803188A1EB080030806888A04212\n:10E1100038D3B878397900F0030041EA002801A922\n:10E12000781DFFF7F7FC20BB298949452ED0002236\n:10E1300039460798FFF706FDD8B92989414518D116\n:10E14000E9680391B5F80AC0D7F808B05046CDF891\n:10E1500000C005F0DCFFDDF800C05A460CF1070CEA\n:10E160001FFA8CFC43460399CDF800C005F08DFBE7\n:10E1700060B1641CA4B200208046204600F01EF965\n:10E180000700A6D1641E2C820A2098E67480787954\n:10E19000B071F888B0803978F87801F0030140EA6E\n:10E1A00001207081A6F80C80504605F045FE3A46E5\n:10E1B00006F10801FFF706FD306100207FE62DE93A\n:10E1C000FF4F87B081461C469246DDF860B0DDF80F\n:10E1D0005480089800F0F2F8050002D02878400733\n:10E1E00002D401200BB09CE5484605F025FE2978B5\n:10E1F000090605D56D49897A814201D88720F1E762\n:10E20000CAF309062A4601A9FFF7DCFC0746149861\n:10E2100007281CD000222946FFF794FC0028E1D1F2\n:10E220002878400613D501208DF808000898ADF82D\n:10E230000C00BDF80400ADF80E00ADF81060ADF8AC\n:10E24000124002A94846F8F7E3FF0028CAD129780E\n:10E25000E87801F0030140EA0121AA78287902F068\n:10E26000030240EA0220564507D0B1F5007F04D9E9\n:10E27000611E814201DD0B20B4E7864201D90720EF\n:10E28000B0E7801B85B2A54200D92546BBF1000F3F\n:10E2900001D0ABF80050179818B1B9192A4600F010\n:10E2A000CCF8B8F1000F0DD03E4448464446169FC6\n:10E2B00005F03FFF2146FF1DBCB232462B460094BD\n:10E2C00005F04DFB00208DE72DE9F04107461D4686\n:10E2D0001646084600F072F8040002D02078400785\n:10E2E00001D40120D3E4384605F0A6FD21780906C3\n:10E2F00005D52E49897A814201D88720C7E4224674\n:10E300003146FFF75FFC65B12178E07801F0030149\n:10E3100040EA0120B0F5007F01D8012000E0002094\n:10E3200028700020B3E42DE9F04107461D4616464B\n:10E33000084600F043F8040002D02078400701D4DA\n:10E340000120A4E4384605F077FD2178090605D5BB\n:10E350001649897A814201D8872098E422463146BD\n:10E36000FFF75EFCFF2D14D02178E07801F0030266\n:10E3700040EA022040F20122B0FBF2F302FB13005C\n:10E3800015B900F2012080B2E070000A60F30101CB\n:10E39000217000207BE410B50C4600F00FF810B19E\n:10E3A0000178490704D4012010BD000000060020B8\n:10E3B000C18821804079A0700020F5E70749CA880C\n:10E3C000824209D340B1096800EB40006FF00B02B4\n:10E3D00002EB8000084470470020704700060020D0\n:10E3E00070B504460D4621462B460AB9002070BD83\n:10E3F00001E0491C5B1C501E021E03D008781E78E9\n:10E40000B042F6D008781E78801BF0E730B50C4695\n:10E4100001462346051B954206D202E0521E9D5C32\n:10E420008D54002AFAD107E004E01D780D70491CD4\n:10E430005B1C521E002AF8D130BDF0B50E460146D5\n:10E44000334680EA030404F00304B4B906E002B9D9\n:10E45000F0BD13F8017B01F8017B521E01F00307A8\n:10E46000002FF4D10C461D4602E080CD80C4121F5F\n:10E47000042AFAD221462B4600BF04E013F8014BD0\n:10E4800001F8014B521E002AF8D100BFE0E7F0B5B9\n:10E490000C460146E6B204E002B9F0BD01F8016B9A\n:10E4A000521E01F00307002FF6D10B46E5B245EAF4\n:10E4B000052545EA054501E020C3121F042AFBD2C9\n:10E4C000194602E001F8016B521E002AFAD100BF82\n:10E4D000E3E7000010B509F0A0FDF4F7F9F909F041\n:10E4E000E7FBBDE8104009F0AFBC302834BF012085\n:10E4F00000207047202834BF4FF0A0420C4A01236F\n:10E5000000F01F0003FA00F0002914BFC2F80C0548\n:10E51000C2F808057047202834BF4FF0A0410449D5\n:10E5200000F01F00012202FA00F0C1F81805704740\n:10E530000003005070B50346002002466FF02F051F\n:10E540000EE09C5CA4F130060A2E02D34FF0FF309F\n:10E5500070BD00EB800005EB4000521C2044D2B29D\n:10E560008A42EED370BD30B50A230BE0B0FBF3F462\n:10E5700003FB1404B0FBF3F08D183034521E05F881\n:10E58000014CD2B2002AF1D130BD30B500234FF694\n:10E59000FF7510E0040A44EA002084B2C85C6040C1\n:10E5A000C0F30314604005EA00344440E0B25B1C51\n:10E5B00084EA40109BB29342ECD330BD2DE9F04188\n:10E5C000FE4B0026012793F864501C7893F868C02E\n:10E5D000B8B183F89140A3F8921083F8902083F8A3\n:10E5E0008E70BCF1000F0CBF83F8946083F89450D8\n:10E5F000F3488068008805F08AFDBDE8F04105F029\n:10E6000021BA4FF6FF7083F89140A3F8920083F887\n:10E61000902083F88E70BCF1000F14BF83F89450E3\n:10E6200083F89460BDE8F0812DE9F041E44D29685C\n:10E6300091F89C200024012A23D091F89620012AE9\n:10E6400030D091F86C301422DC4E0127012B32D0EF\n:10E6500091F88E30012B4FD091F8A620012A1CBFD3\n:10E660000020BDE8F08144701F2200F8042B222214\n:10E67000A731FFF7E2FE286880F8A6400120BDE838\n:10E68000F08144701B220270D1F89D204260D1F8C5\n:10E69000A120826091F8A520027381F89C4001209E\n:10E6A000BDE8F081447007220270D1F898204260E2\n:10E6B00081F89640E2E78046447000F8042B20225F\n:10E6C0006E31FFF7BAFE88F80870286880F86C4051\n:10E6D00090F86E000028D1D1B6F87000A6F8980026\n:10E6E000A868417B86F89A1086F89670008805F035\n:10E6F0000EFD05F0B6F9C1E791F86C30012B0BD097\n:10E70000447017220270D1F890204260B1F8942032\n:10E71000028181F88E40B1E78046447000F8042BF6\n:10E7200020226E31FFF789FE88F80870286880F88B\n:10E730006C4090F86E000028A0D1CDE7A04800689A\n:10E7400090F86C10002914BFB0F870004FF6FF70FD\n:10E75000704770B59A4C06462068002808BFFFDF56\n:10E760000025206845706660002808BFFFDF20682C\n:10E77000417800291CBFFFDF70BDCC220021FFF7CC\n:10E7800086FE2068FF2101707F2180F83810132158\n:10E790004184282180F86910012180F85C1080F8FC\n:10E7A00061500AF0C1F9BDE8704009F0AEBA844981\n:10E7B0000968097881420CBF012000207047804819\n:10E7C000006890F82200C0F3400070477C48006861\n:10E7D00090F8220000F0010070477948006890F836\n:10E7E0002200C0F3001070472DE9F0437448002464\n:10E7F000036893F82400B3F822C0C0F38001C0F38B\n:10E800004002114400F001000844CCF3001121B390\n:10E81000BCF1100F02BF6B4931F81000BDE8F08366\n:10E82000BCF1120F18BFBCF1130F0ED0BCF1150FC5\n:10E830001EBFFFDF2046BDE8F0830021624A32F8A8\n:10E84000102010FB0120BDE8F083604A002132F85F\n:10E85000102010FB0120BDE8F08393F85E2093F8B0\n:10E860005F102E264FF47A774FF014084FF04009CE\n:10E87000022A04BF4AF2D745B5FBF7F510D0012AAA\n:10E8800004BF4AF22F75B5FBF7F510D04AF62315F1\n:10E89000B5FBF7F5082A08BF4E4613D0042A18D056\n:10E8A0002646082A0ED0042A13D0022A49D004F1A1\n:10E8B0002806042A0FD0082A1CBF4FF01908082286\n:10E8C00004D00AE04FF0140806F5A8764FF0400295\n:10E8D00003E006F5A8764FF0100218FB026212FB67\n:10E8E0000052C0EB00103A4D00EB800005EB8000B9\n:10E8F00010441CF0010F4FF4C8724FF4BF7504BFF1\n:10E90000CCF34006002E65D0CCF3400600F5A57090\n:10E91000EEB1082904BF174640260CD0042904BFD5\n:10E920002F46102607D0022907BF04F11807042636\n:10E9300004F12807082606EB860808EB86163E44F5\n:10E940001BE004F118064FF019080422C5E7082956\n:10E9500004BF164640270CD0042904BF2E461027BA\n:10E9600007D0022907BF04F11806042704F128067E\n:10E97000082707EB871706EB8706304400F19C0653\n:10E9800093F8690001F00C07002F08BF0020304405\n:10E9900018BF00F5416027D1082904BF164640275B\n:10E9A0001BD0042904BF2E46102716D0022906BF0B\n:10E9B00004F11806042704F128060CE00C060020D8\n:10E9C00068000020DC610200E4610200D461020002\n:10E9D000D4FEFFFF64E018BF0827C7EBC70707EBAB\n:10E9E000470706EB4706304498301CF0010F17D05C\n:10E9F000082908BF40210CD0042904BF2A46102151\n:10EA000007D0022907BF04F11802042104F12802EB\n:10EA1000082101EB410303EB0111114408443BE0E1\n:10EA2000082904BF944640260CD0042904BFAC46F4\n:10EA3000102607D0022907BF04F1180C042604F1A0\n:10EA4000280C082606EB8616B3F840300CEB860C33\n:10EA50006044EB2B20D944F2552C0B3303FB0CF311\n:10EA60009B0D082907D0042902D0022905D008E00F\n:10EA70002A46102108E0402106E004F11802042192\n:10EA800002E004F12802082101EB811102EB81016F\n:10EA900001F5A57103FB010000F5B470BDE8F0833A\n:10EAA00000F5A570082904BF944640260CD004291F\n:10EAB00004BFAC46102607D0022907BF04F1180C8A\n:10EAC000042604F1280C082606EB8616B3F8483015\n:10EAD0000CEB860C6044EB2BDED944F2552C0B3347\n:10EAE00003FB0CF39B0D0829C5D00429C0D00229D3\n:10EAF000C7D1C2E7FE4840F271210068806A4843EE\n:10EB00007047FB48006890F83700002818BF0120C4\n:10EB1000704710B5F74C207B022818BF032808D196\n:10EB2000207D04F115010EF0E6FE08281CBF01202F\n:10EB300010BD207B002816BF022800200120BDE860\n:10EB400010400AF021BDEB4908737047E849096895\n:10EB500081F8300070472DE9F047E54C2168087BCB\n:10EB6000002816BF022800200120487301F10E0181\n:10EB70000AF0F4FC2168087B022816BF0328012252\n:10EB8000002281F82F204FF0080081F82D00487BEB\n:10EB900001F10E034FF001064FF00007012804BFFA\n:10EBA0005B7913F0C00F0AD001F10E03012804D1E4\n:10EBB000587900F0C000402801D0002000E001207A\n:10EBC00081F82E00002A04BF91F8220010F0040FF3\n:10EBD00007D0087D01F115010EF08DFE216881F846\n:10EBE0002D002068476007F0BFFA2168C14D4FF043\n:10EBF0000009886095F82D000EF089FE804695F892\n:10EC00002F00002818BFB8F1000F04D095F82D0090\n:10EC10000EF0B1FC68B195F8300000281CBF95F8E3\n:10EC20002E0000281DD0697B05F10E0001290ED0B1\n:10EC300012E06E734A4605F10E0140460AF0E4FC0C\n:10EC400095F82D1005F10E000EF063FF09E04079F4\n:10EC500000F0C000402831D0394605F10E000AF01E\n:10EC60000BFD2068C77690F8220010F0040F08BF53\n:10EC7000BDE8F087002795F82D000EF017FD050080\n:10EC800008BFBDE8F087102102F0C2F8002818BFC5\n:10EC9000BDE8F08720683A4600F11C01C676284698\n:10ECA0000AF0B2FC206800F11C0160680FF08EF8D9\n:10ECB0006068BDE8F04701210FF0A3B80EF066FFD1\n:10ECC0004A4605F10E010AF09FFCCAE7884A12681D\n:10ECD000137B0370D2F80E000860508A888070475A\n:10ECE00078B584490446824E407B087332682078A8\n:10ECF00010706088ADF8000080B200F00101C0F330\n:10ED0000400341EA4301C0F3800341EA8301C0F3B9\n:10ED1000C00341EAC301C0F3001341EA0311C0F389\n:10ED2000401341EA4311C0F3801041EA801050843F\n:10ED3000E07D012808BF012507D0022808BF022571\n:10ED400003D0032814BFFFDF0825306880F85E5029\n:10ED5000607E012808BF012507D0022808BF0225D0\n:10ED600003D0032814BFFFDF0825316881F85F5006\n:10ED700091F83500012829D0207B81F82400488CA7\n:10ED80001D280CBF002060688862607D81F8370014\n:10ED9000A07B002816BF0228002001200875D4F8A7\n:10EDA0000F00C1F81500B4F81300A1F81900A07EF7\n:10EDB00091F86B2060F3071281F86B20E07E012848\n:10EDC00018BF002081F83400002078BD91F85E2043\n:10EDD0000420082A08BF81F85E00082D08BF81F8CA\n:10EDE0005F00C9E742480068408CC0F3001131B1B0\n:10EDF000C0F38000002804BF1F20704702E0C0F36A\n:10EE0000400109B10020704710F0010F14BFEE203F\n:10EE1000FF20704736480068408CC0F3001119B1DC\n:10EE2000C0F3800028B102E0C0F3400008B1002028\n:10EE30007047012070472E49002209684A664B8CB2\n:10EE40001D2B0CBF81F8682081F8680070470023F3\n:10EE5000274A126882F85D30D164A2F85000012080\n:10EE600082F85D007047224A0023126882F85C3005\n:10EE7000A2F858000120516582F85C0070471C49D7\n:10EE8000096881F8360070471949096881F86100FE\n:10EE900070471748006890F961007047144800688F\n:10EEA00090F82200C0F3401070471148006890F8B5\n:10EEB0002200C0F3C0007047012070470C48006872\n:10EEC00090F85F00704770B509F018FE09F0F7FD83\n:10EED00009F0C0FC09F06CFD054C2068416E491C2E\n:10EEE000416690F83300002558B109F01DFE03E09B\n:10EEF000680000200C06002008F007FF206880F85A\n:10EF000033502068457090F8391021B1BDE8704049\n:10EF100004200AF0AEBF90F86810D9B1406E81426B\n:10EF200018D804200AF0A5FF206890F8220010F0FD\n:10EF3000010F07D0A06843220188BDE8704001207E\n:10EF4000FFF73CBBBDE8704043224FF6FF71002045\n:10EF5000FFF734BBBDE8704000200AF08ABF2DE9FE\n:10EF6000F04782B00F468146FE4E4FF000083068F1\n:10EF7000458C15F0030F10D015F0010F05F00200BD\n:10EF800005D0002808BF4FF0010806D004E0002893\n:10EF900018BF4FF0020800D1FFDF4FF0000A5446BF\n:10EFA00015F0010F05F002000DD080B915F0040F27\n:10EFB0000DD04AF00800002F1CBF40F0010040F0C7\n:10EFC00002044DD09EE010B115F0040F0DD015F0E5\n:10EFD000070F10D015F0010F05F0020043D00028F4\n:10EFE00008BF15F0040F34D04AE0002F18BF4AF0D4\n:10EFF000090444D141E037B14AF00800044615F055\n:10F00000200F1BD07EE0316805F02002B1F84800E7\n:10F01000104308BF4AF0010474D04AF018000446B7\n:10F0200015F0200F6ED191F85E1011F00C0118BF91\n:10F030000121C94361F30000044663E0316891F89F\n:10F040005E1011F00C0118BF012161F300000446AD\n:10F0500058E04AF00800002F18BF40F0010451D1D9\n:10F0600040F010044EE0002818BF15F0040F07D040\n:10F07000002F18BF4AF00B0444D14AF0180441E0B5\n:10F0800015F0030F3DD115F0040F3AD077B1306879\n:10F090004AF0080490F85E0010F00C0118BF01213E\n:10F0A00061F3410415F0200F24D02BE0306805F007\n:10F0B0002002B0F84810114308BF4AF0030421D0E1\n:10F0C0004AF0180415F0200F0AD000BF90F85E0037\n:10F0D00010F00C0018BF0120C04360F3410411E0A0\n:10F0E00090F85E1011F00C0118BF0121C94361F3C3\n:10F0F0000004EBE710F00C0018BF012060F30004DF\n:10F1000000E0FFDF15F0400F1CD0CFB93168B1F837\n:10F110004800002804BF488C10F0010F0BD110F0FC\n:10F12000020F08BF10F0200F05D115F0010F08BF26\n:10F1300015F0020F04D091F85E0010F00C0F01D111\n:10F1400044F040047068A0F800A0017821F020018C\n:10F1500001704FF007010EF005FE414670680EF099\n:10F16000F8FF214670680FF000F814F0010F0CD082\n:10F170004FF006034FF000027B4970680EF0CFFF9E\n:10F180003068417B70680EF02FFE14F0020F18D02B\n:10F19000D6E90010B9F1000F4FF006034FF001025D\n:10F1A00007D01C310EF0BBFF012170680EF029FE64\n:10F1B00007E015310EF0B3FF3068017D70680EF086\n:10F1C00020FE14F0040F18BFFFDF14F0080F19D051\n:10F1D000CDF800A03068BDF800200223B0F86A1016\n:10F1E00061F30B02ADF8002090F86B0003220109D7\n:10F1F0009DF8010061F307108DF801006946706801\n:10F200000EF08DFF012F62D13068B0F84810E1B3E5\n:10F2100090F82200C0F34000B8BB70680EF095FF74\n:10F22000401CC7B23068C7F1FF05B0F84820B0F8FD\n:10F230005A10511AA942B8BF0D46AA423BD990F8BC\n:10F24000220010F0010F36D144F0100421467068FE\n:10F250000EF08BFFF81CC0B2ED1E284482B230685D\n:10F26000B0F86A10436EC1F30B0151FA83F190F8C4\n:10F2700060303E4F1944BC460023E1FB07C31B0925\n:10F280006FF0240C03FB0C1100E020E080F860100C\n:10F2900090F85F00012101F01FF90090BDF8000017\n:10F2A0009DF80210032340EA01400190042201A9C5\n:10F2B00070680EF034FF3068AAB2416C70680EF0CE\n:10F2C00082FF3068B0F85A102944A0F85A1014F0A0\n:10F2D000400F06D0D6E900100123062261310EF05E\n:10F2E0001EFF14F0200F18BFFFDF0020002818BFFA\n:10F2F000FFDF02B0BDE8F0872DE9F043194C89B07B\n:10F300002068002808BFFFDF20684178002944D129\n:10F310000178FF2941D0002680F83160A0F85A60BA\n:10F32000867080F83960304609F062FB104802AD03\n:10F3300000F1240191E80E1085E80E10D0E90D10BF\n:10F34000CDE9061002A809F041FB08F0BCFF2068D7\n:10F3500090F9610009F090F8064809F093F8064822\n:10F360000CE00000680000201A06002053E4B36E91\n:10F37000C8610200D0610200CD61020009F012FBF9\n:10F38000606809F038FB206890F8240010F0010F45\n:10F3900007D0252009F07EF80AE009B00C20BDE86E\n:10F3A000F08310F0020F18BF262069D009F072F820\n:10F3B000206890F85E10252008F043FF206880F850\n:10F3C0002C6009F00FFB206890F85E10002009F017\n:10F3D00028F90F21052008F0F8FF206890F82E107A\n:10F3E000002901BF90F82F10002990F8220010F09A\n:10F3F000040F74D006F0B8FE0546206829468068E0\n:10F4000007F0AAFBDFF82884074690FBF8F008FB1A\n:10F4100010704142284606F08EFB2168886097FBF9\n:10F42000F8F04A68104448600EF062FA014620681D\n:10F43000426891426ED8C0E90165FE4D4FF0010867\n:10F4400095F82D000EF063FA814695F82F000127FC\n:10F45000002818BFB9F1000F04D095F82D000EF068\n:10F460008AF8A0B195F8300000281CBF95F82E004E\n:10F47000002824D0687B05F10E01012815D019E081\n:10F4800010F0040F14BF2720FFDF8FD190E73A461A\n:10F490006F7305F10E0148460AF0B6F895F82D1085\n:10F4A00005F10E000EF035FB09E0487900F0C000D0\n:10F4B000402815D0414605F10E000AF0DDF820681D\n:10F4C00090F8220010F0040F24D095F82D000EF0D3\n:10F4D000EDF805001ED0102101F09AFC40B119E0B2\n:10F4E0000EF054FB3A4605F10E010AF08DF8E6E7FE\n:10F4F00020683A4600F11C01C77628460AF084F8D5\n:10F50000206800F11C0160680EF060FC0121606859\n:10F510000EF077FC2068417B0E3008F038FF206841\n:10F5200090F85C1061B3B0F85810A0F84810416D25\n:10F53000416490F82210C1F30011F1B9B0F86A00EB\n:10F540000221C0F30B05ADF80050684607F0B0FF8C\n:10F5500028B1BDF80000C0F30B00A84204D1BDF8EB\n:10F560000000401CADF800002168BDF80000B1F8B3\n:10F570006A2060F30B02A1F86A20206880F85C60C2\n:10F58000206890F85D1039B1B0F85010A0F8401024\n:10F59000C16CC16380F85D60B0F86A10426EC1F35F\n:10F5A0000B0151FA82F190F86020DFF88CC211440F\n:10F5B00063460022E1FB0C3212096FF0240302FBC8\n:10F5C000031180F860100EF00CFA032160680EF051\n:10F5D00090FA216881F8330009B00020BDE8F0837B\n:10F5E0009649886070472DE9F043944C83B02268B7\n:10F5F00092F831303BB1508C1D2808BFFFDF03B0BB\n:10F60000BDE8F0435FE401260027F1B1054692F81A\n:10F61000600008F03FFF206890F85F10FF2008F0BE\n:10F6200010FE20684FF4A57190F85F20002009F0CB\n:10F63000D4F8206890F8221011F0030F00F02C810C\n:10F64000002D00F0238100F027B992F822108046A7\n:10F65000D07EC1F30011002956D0054660680780AE\n:10F66000017821F020010170518C132937D01FDC63\n:10F67000102908BF022144D0122908BF062140D01A\n:10F68000FFDF6C4D606805F10E010EF091FB697BA8\n:10F6900060680EF0A9FB2068418C1D2918BF152950\n:10F6A00063D0B0F84820416C60680EF0B6FB5CE0B7\n:10F6B000152918BF1D29E3D14FF001010EF052FBAF\n:10F6C0006068017841F020010170216885B11C312A\n:10F6D0000EF07CFB012160680EF093FBD1E7002166\n:10F6E0000EF040FB6068017841F020010170C8E72E\n:10F6F00015310EF06BFB2068017D60680EF081FB18\n:10F70000BFE70EF02FFBBCE70021FFF728FC606885\n:10F71000C17811F03F0F28D0017911F0100F24D0DB\n:10F720000EF01EFB2368024693F82410C1F38000FC\n:10F73000C1F3400C604401F00101084493F82C101F\n:10F74000C1F3800CC1F34005AC4401F001016144F8\n:10F75000401AC1B293F85E0000F0BEFE0090032391\n:10F760000422694660680EF0DAFC2068002590F8F3\n:10F77000241090F82C0021EA000212F0010F18BFAB\n:10F7800001250ED111F0020F04D010F0020F08BFB6\n:10F79000022506D011F0040F03D010F0040F08BFAB\n:10F7A0000425B8F1000F2BD0012D1BD0022D08BF6E\n:10F7B00026201BD0042D14BFFFDF272016D0206881\n:10F7C00090F85E10252008F03CFD206890F822108B\n:10F7D000C1F3001169B101224FF49671002008F0C5\n:10F7E000FCFF0DE0252008F055FEE8E708F052FE8A\n:10F7F000E5E790F85E204FF49671002008F0EDFFE9\n:10F80000206890F82C10294380F82C1090F82420C0\n:10F8100032EA01011CD04670418C13292BD026DC22\n:10F82000102904BF03B0BDE8F083122923D007E0FC\n:10F8300040420F000C06002053E4B36E6800002025\n:10F84000C1F30010002818BFFFDF03B0BDE8F0834C\n:10F85000418C1D2908BF80F82C70DCD0C1F3001149\n:10F86000002914BF80F8316080F83170D3E7152982\n:10F8700018BF1D29DBD190F85E2003B04FF00101C5\n:10F88000BDE8F043084609F094B900BF90F85F2046\n:10F890000121084609F08DF92168002DC87E7CD031\n:10F8A0004A8C3D46C2F34000002808BF47F00805D7\n:10F8B00012F0400F18BF45F04005002819BFD1F8DD\n:10F8C0003C90B1F84080D1F84490B1F8488060682D\n:10F8D000072107800EF046FA002160680EF039FC1F\n:10F8E000294660680EF041FC15F0080F17D020681B\n:10F8F000BDF800100223B0F86A2062F30B01ADF8E6\n:10F90000001090F86B00032201099DF8010061F3DB\n:10F9100007108DF80100694660680EF000FC606811\n:10F920000EF0DCFA2168C0F1FE00B1F85A20A8EB15\n:10F9300002018142A8BF0146CFB2D019404544D24E\n:10F9400045F0100160680EF010FC60680EF0C6FA19\n:10F950002168C0F1FE00B1F85A10A8EB0101814204\n:10F96000A8BF0146CFB260680EF0EFFB3844421CDE\n:10F970002068B0F86A10436EC1F30B0151FA83F1AD\n:10F9800090F86030FE4D1944AC460023E1FB05C3FE\n:10F990004FEA131C6FF0240300E03CE00CFB031162\n:10F9A00080F8601090F85F00012100F095FD009054\n:10F9B000BDF800009DF80210032340EA01400190C9\n:10F9C000042201A960680EF0AAFB216891F82200C8\n:10F9D00010F0400F05D001230622613160680EF05F\n:10F9E0009EFB20683A46B0F85A0000EB09016068B7\n:10F9F0000EF0E9FB2068B0F85A103944A0F85A100C\n:10FA000009F0BFFC002818BFFFDF20684670867031\n:10FA100003B0BDE8F0830121FFF7A1FAF0E7D94870\n:10FA200010B50068417841B90078FF2805D0002161\n:10FA30000846FFF7D8FD002010BD09F05FF809F077\n:10FA40003EF808F007FF08F0B3FF0C2010BD2DE9C9\n:10FA5000F041CC4D0446174628680E4690F86C00DD\n:10FA6000002818BFFFDF2868002F80F86E7018BFCD\n:10FA7000BDE8F0812188A0F870106188A0F8861098\n:10FA8000A188A0F88810E188A0F88A1094F888115D\n:10FA900080F88C1090F82F10002749B1427B00F1BC\n:10FAA0000E01012A04D1497901F0C001402935D065\n:10FAB00090F8301041B1427B00F10E01012A04BFE1\n:10FAC000497911F0C00F29D000F17A00F3F794FAC8\n:10FAD0006868FF2E0178C1F380116176D0F80310B9\n:10FAE000C4F81A10B0F80700E08328681ED0C0F8E8\n:10FAF0008010E18BA0F8841000F17402511E304692\n:10FB00000DF014FF002808BFFFDF286890F873107D\n:10FB100041F0020180F87310BDE8F081D0F80E10BA\n:10FB2000C0F87A10418AA0F87E10D1E7C0F8807042\n:10FB3000A0F88470617E80F87310D4F81A104167C1\n:10FB4000E18BA0F87810BDE8F08170B58D4C0125EF\n:10FB5000206890F82200C0F3C00038B13C22FF2199\n:10FB6000A068FFF774FF206880F86C50206890F858\n:10FB7000220010F0010F1CBFA06801884FF03C026A\n:10FB800012BF01204FF6FF710020FEF717FD20681D\n:10FB900080F8395070BD7B49096881F832007047A0\n:10FBA0002DE9F041774C0026206841780127354641\n:10FBB000012906D0022901D003297DD0FFDFBDE84D\n:10FBC000F081817802250029418C46D0C1F34002A2\n:10FBD000002A08BF11F0010F6FD090F85F204FF09E\n:10FBE00001014FF0000008F0E4FF216891F82200C5\n:10FBF000C0F34000002814BF0C20222091F85F10B1\n:10FC000008F01FFB2068457090F8330058B108F0E9\n:10FC100068F8206890F85F0010F00C0F0CBF4020CF\n:10FC2000452008F077FF206890F83400002818BFBE\n:10FC300008F08FFF216891F85F0091F8691010F0CB\n:10FC40000C0F08BF0021962008F0F6FE09F090FB8B\n:10FC5000002818BFFFDFBDE8F081C1F3001282B1B8\n:10FC600010293FD090F8330020B108F03AF8402036\n:10FC700008F050FF206890F8221011F0040F36D0E1\n:10FC800043E090F8242090F82C309A422AD1B0F822\n:10FC90004800002808BF11F0010F05D111F0020F34\n:10FCA00008BF11F0200F6FD04FF001014FF000009E\n:10FCB000FFF799FC206801E041E035E0418C11F04C\n:10FCC000010F04BFC1F34001002907D1B0F85A1059\n:10FCD000B0F84820914218BFBDE8F08180F831703B\n:10FCE000BDE8F081BDE8F041002101207BE490F8FF\n:10FCF0003710012914BF0329102646F00E0190F891\n:10FD00005E204FF0000008F054FF206890F83400A7\n:10FD1000002818BF08F01DFF0021962008F08CFE77\n:10FD200020684570BDE8F081B0F85A10B0F848007E\n:10FD3000814242D0BDE8F0410121084653E4817878\n:10FD4000D9B1418C11F0010F22D080F86C7090F87D\n:10FD50006E20B0F870100120FEF730FC206845706E\n:10FD600008F0CCFE08F0ABFE08F074FD08F020FEB1\n:10FD7000BDE8F04103200AF07CB88178012004E05E\n:10FD800053E4B36E6800002017E0BDE8F0412AE4B8\n:10FD900011F0020F04BFFFDFBDE8F081B0F85A1088\n:10FDA000B0F84000814208D001210846FFF71BFC53\n:10FDB000216803204870BDE8F081BDE8F041FFF7FD\n:10FDC00082B8FFF780B810B5FE4C206890F8341068\n:10FDD00049B1383008F0CCFE18B921687F2081F88D\n:10FDE000380008F0ACFE206890F8330018B108F035\n:10FDF0009BFE07F08AFF0AF02EFCA8B1206890F85D\n:10FE00002210C1F3001179B14078022818BFFFDF3A\n:10FE100000210120FFF7E7FB2068417800291EBF81\n:10FE200040780128FFDF10BDBDE81040FFF74BB858\n:10FE30002DE9F047E34C0F4680462168B8F1030FE7\n:10FE4000488C08BFC0F3400508D000F0010591F8C8\n:10FE50003200002818BF4FF0010901D14FF000090E\n:10FE600008F00CFB0646B8F1030F0CBF4FF0020878\n:10FE70004FF0010835EA090008BFBDE8F0872068A7\n:10FE800090F8330068B10DF08FFD38700146FF28FF\n:10FE900007D06068C01C0DF060FD38780DF091FD52\n:10FEA000064360680178C1F3801221680B7D9A4295\n:10FEB00008D10622C01C1531FEF792FA002808BFAF\n:10FEC000012000D000203978FF2906D0C8B9206869\n:10FED00090F82D00884216D113E0A0B1616811F8A6\n:10FEE000030BC0F380100DF006FD05460DF061FE1A\n:10FEF00038B128460DF0DAFB18B1102100F088FF68\n:10FF000008B1012000E00020216891F8221011F0D2\n:10FF1000040F01D0F0B11AE0CEB9AB4890F8370029\n:10FF2000002818BF404515D1616811F8030BC0F3D4\n:10FF300080100DF0E0FC04460DF03BFE38B1204689\n:10FF40000DF0B4FB18B1102100F062FF10B10120D8\n:10FF5000BDE8F0870020BDE8F0872DE9F04F994D0E\n:10FF6000044683B0286800264078022818BFFFDFC7\n:10FF700028684FF07F0B90F8341049B1383008F002\n:10FF8000F7FD002804BF286880F838B008F0D7FDD6\n:10FF900068680DF009FF8046002C00F0458208F0EB\n:10FFA00010FA002800F04082012400274FF0FF09DA\n:10FFB000B8F1050F1ED1686890F8240000F01F000A\n:10FFC000102817D9286890F8360098B18DF800905D\n:10FFD00069460520FFF72CFF002800F025822868DD\n:10FFE00080F8A64069682222A730C91CFEF725FACE\n:10FFF00000F01ABA68680EF062F8002800F0148267\n:020000040001F9\n:100000004046DFF8C4814FF0030A062880F02182C1\n:10001000DFE800F0FCFCFC03FCFB8DF80090694677\n:100020000320FFF705FF002800F0F180296891F810\n:10003000340010B191F89C00D8B12868817801296A\n:100040004DD06868042107800DF08CFE08F10E0188\n:1000500068680DF0ADFE98F80D1068680DF0C4FEEC\n:100060002868B0F84020C16B68680DF0FAFE00F017\n:1000700063B99DF8000081F89C400A7881F89D20C2\n:10008000FF280FD001F19F029E310DF04FFC002898\n:1000900008BFFFDF286890F89E1041F0020180F849\n:1000A0009E100DE068680278C2F3801281F89E20ED\n:1000B000D0F80320C1F89F20B0F80700A1F8A300F2\n:1000C000286800F1A50490F838007F2808BFFFDFFA\n:1000D000286890F83810217080F838B0ADE790F8B3\n:1000E00022000721C0F3801938480479686869F351\n:1000F000861407800DF036FE002168680EF029F89E\n:10010000214668680EF031F80623002208F10E013E\n:1001100068680EF004F82868417B68680DF064FE9A\n:1001200068680DF0DBFE2968B1F84020C0F1FE01DF\n:100130008A42B8BF1146CFB2BA423CD9F81EC7B204\n:1001400044F0100B594668680EF00FF868680DF01F\n:10015000FCFF384400F101082868B0F86A10426ECC\n:10016000C1F30B0151FA82F190F86020184C0A4457\n:10017000A4460023E2FB04C319096FF0240301FB2A\n:10018000032180F8601090F85F004246012100F0E2\n:10019000A3F90190BDF804009DF80610032340EA7E\n:1001A00001400290042202A968680DF0B8FF594688\n:1001B00068680DF0DAFFB9F1000F0FD0D5E9001033\n:1001C000012307E0680000200C060020C86102003F\n:1001D00053E4B36E062261310DF0A1FF28683A4660\n:1001E000C16B68680DF0EFFF2868A0F85A70B0F88E\n:1001F00040108F420CBF0121002180F8311009F01E\n:10020000C0F8002818BFFFDF96E007E021E128686A\n:100210008078002840F00A8100F006B98DF800903F\n:1002200068680178C1F38019D0F803100191B0F823\n:100230000700ADF8080069460520FFF7F9FD002822\n:1002400028687DD0817800297CD090F85FB0D5E90E\n:100250000104D0F80F10C4F80E10B0F8131061822A\n:10026000417D2175817D6175B0F81710E182B0F88C\n:1002700019106180B0F81B10A180B0F81D10E1804A\n:1002800000F11F0104F1080015F085FE686890F880\n:10029000241001F01F01217690F82400400984F811\n:1002A000880184F864B084F865B01BF00C0F0CBFB3\n:1002B0000021012104F130000EF0ABF92868002282\n:1002C00090F8691084F8661090F8610084F867006F\n:1002D0009DF80010A868FFF7BAFB022009F0C9FDDD\n:1002E000B2480DF1040B08210468686807800DF01E\n:1002F00039FD002168680DF02CFF214668680DF07B\n:1003000034FF0623002208F10E0168680DF007FF94\n:100310002868417B68680DF067FD494668680DF004\n:1003200070FD06230122594668680DF0F8FE09F0B9\n:1003300028F8002818BFFFDF286880F801A077E0C0\n:100340006DE0FFE76868D5F808804FF00109027892\n:1003500098F80D10C2F34012114088F80D10D0F833\n:100360000F10C8F80E10B0F81310A8F81210417D45\n:1003700088F81410817D88F81510B0F81710A8F8C7\n:100380001610B0F81910A8F80210B0F81B10A8F851\n:100390000410B0F81D10A8F8061000F11F0108F1B4\n:1003A000080015F0F8FD686890F8241001F01F01AE\n:1003B00088F8181090F824000021400988F8880176\n:1003C00088F8649088F8659008F130000EF021F903\n:1003D0002868002290F8691088F8661090F861008B\n:1003E00088F867009DF80010A868FFF730FB2868C0\n:1003F00080F86C4090F86E20B0F870100120FEF785\n:10040000DDF82868477008F079FB08F058FB08F021\n:1004100021FA08F0CDFA012009F02BFD08E090F850\n:100420002200C0F3001008B1012601E0FEF74BFDE9\n:10043000286890F8330018B108F076FB07F065FCE7\n:1004400096B10AF008F960B100210120FFF7CBF85E\n:1004500013E0286890F82200C0F300100028E5D0CF\n:10046000E2E7FEF730FD08E028688178012904D131\n:1004700090F85F10FF2007F0E4FE2868417800291B\n:1004800019BF4178012903B0BDE8F08F40780328F7\n:1004900018BFFFDF03B0BDE8F08F70B5444C0646CF\n:1004A0000D462068807858B107F0F2FD21680346B8\n:1004B000304691F85F202946BDE870400AF085BAC1\n:1004C00007F0E6FD21680346304691F85E20294694\n:1004D000BDE870400AF079BA78B50C460021009169\n:1004E000082804BF4FF4C87040210DD0042804BF71\n:1004F0004FF4BF70102107D0022807BF01F1180088\n:10050000042101F128000821521D02FB01062848A0\n:100510009DF80010006890F8602062F3050141F03A\n:1005200040058DF8005090F85F00012829D002287E\n:100530002ED004281CBF0828FFDF2FD025F0800014\n:100540008DF80000C4EB041000EB80004FF01E019A\n:1005500001EB800006FB04041648844228BFFFDF3D\n:100560001548A0FB0410BDF80110000960F30C0150\n:10057000ADF80110BDF800009DF8021040EA0140FE\n:1005800078BD9DF8020020F0E0008DF80200D5E76C\n:100590009DF8020020F0E000203004E09DF8020009\n:1005A00020F0E00040308DF80200C7E7C86102008B\n:1005B00068000020C4BF0300898888880023C383A3\n:1005C000428401EBC202521EB2FBF1F1018470477A\n:1005D0002DE9F04104460026D9B3552333224FF4C8\n:1005E000FA4501297DD0022900F01481032918BFA2\n:1005F000BDE8F08104F17001207B00F01F00207342\n:1006000084F889605FF0000004EB000C9CF808C0DF\n:1006100003EA5C05ACEB050C0CF0FF0C0CF03305A9\n:1006200002EA9C0CAC440D180CEB1C1C0CF00F0CDB\n:1006300085F814C04D7E401CAC44C0B281F819C08E\n:100640000528E1D30CF0FF00252898BFBDE8F08114\n:10065000DCE0FFE704F17005802200212846FDF769\n:1006600016FFAE71EE712E736E73EE732E746E7193\n:10067000AE76EE76212085F84000492085F84100CD\n:10068000FE2085F874002588702200212046FDF7A1\n:10069000FEFE2580012584F8645084F865502820EA\n:1006A00084F86600002104F130000DF0B2FF1B2237\n:1006B000A4F84E20A4F85020A4F85220A4F8542006\n:1006C0004FF4A470A4F85600A4F8580065734FF4D2\n:1006D00048606080A4F8F060A4F8F260A4F8F460C8\n:1006E00000E023E0A4F8F660A4F8F86084F8FA606B\n:1006F00084F8FD60A4F8066184F80461A4F8186128\n:10070000A4F81A6184F8B66184F8B76184F8C0610E\n:1007100084F8C16184F88C6184F88F6184F8A861E1\n:10072000C4F8A061C4F8A461BDE8F081A4F8066132\n:1007300084F8FB606088FE490144B1FBF0F1A4F845\n:1007400090104BF68031A4F89210B4F806C0A4F8CB\n:100750009860B4F89C704FEACC0C4743BCFBF0FCAB\n:1007600097FBF0F70CF1010CA4F89C701FFA8CFCBD\n:100770000CFB00F704F17001A4F89AC0B7F5C84F5C\n:10078000C4BFACF1010CA1F82AC0B5FBF0FC0CF120\n:10079000010CA1F830C000F5802C0CF5EE3CACF15A\n:1007A0000105B5FBF0FCA1F820C0CD8B05FB00FCDA\n:1007B000BCFBF0F0C8830846217B01F01F012173C8\n:1007C0004676002104EB010C9CF808C003EA5C05A6\n:1007D000ACEB050C0CF0FF0C0CF0330502EA9C0CA2\n:1007E000AC4445180CEB1C1C0CF00F0C85F814C025\n:1007F000457E491CAC44C9B280F819C00529E1D333\n:100800000CF0FF00252898BFBDE8F081FFDFBDE8B0\n:10081000F08100BFB4F8B011B4F8B4316288A4F824\n:100820009860B4F89CC0DB000CFB02FCB3FBF1F356\n:100830009CFBF1FC5B1CA4F89CC09BB203FB01FC7D\n:1008400004F17000A4F89A30BCF5C84FC4BF5B1E19\n:100850004385B5FBF1F35B1C0386438C01EBC303BB\n:100860005B1EB3FBF1F30384C38B5A43B2FBF1F17C\n:10087000C183BDE8F0812DE9F04104460025A1B314\n:1008800055234FF4FA464FF0330C01297DD002294D\n:1008900000F0E080032918BFBDE8F08104F170008A\n:1008A000217B01F01F01217384F889500021621817\n:1008B000127A03EA5205521BD2B202F033050CEA57\n:1008C00092022A44451802EB121202F00F022A7516\n:1008D000457E491C2A44C9B242760529E7D3D0B2E5\n:1008E000252898BFBDE8F081B1E0FFE704F170066C\n:1008F000802200213046FDF7CAFDB571F5713573D0\n:100900007573F57335747571B576F576212086F8B3\n:100910004000492086F84100FE2086F874002688B1\n:10092000702200212046FDF7B2FD2680012684F8C2\n:10093000646084F86560282084F86600002104F172\n:1009400030000DF066FE1B22A4F84E20A4F85020C3\n:10095000A4F85220A4F854204FF4A470A4F8560030\n:10096000A4F858006673A4F8F850202084F8FA0020\n:1009700084F8F050C4F8F45084F8245184F82551D8\n:1009800084F82E5184F82F5100E005E084F81451CA\n:1009900084F82051BDE8F081618865480844B0FBC7\n:1009A000F1F0A4F890004BF68030A4F89200E288B1\n:1009B000A4F89850B4F89C70D2004F43B2FBF1F207\n:1009C00097FBF1F7521CA4F89C7092B202FB01F75E\n:1009D00004F17000A4F89A20B7F5C84FC4BF521EA6\n:1009E0004285B6FBF1F2521C028601F5802202F527\n:1009F000EE32561EB6FBF1F20284C68B06FB01F204\n:100A0000B2FBF1F1C1830146207B00F01F0020738F\n:100A10004D7600202218127A03EA5205521BD2B2F8\n:100A200002F033050CEA92022A440D1802EB12126E\n:100A300002F00F022A754D7E401C2A44C0B24A764D\n:100A40000528E7D3D0B2252898BFBDE8F081FFDFA5\n:100A5000BDE8F081D0F81811628804F1700348896C\n:100A6000C989A4F89850B4F89CC0C9000CFB02FCDA\n:100A7000B1FBF0F19CFBF0FC491CA4F89CC089B2CE\n:100A800001FB00FCA4F89A10BCF5C84FC4BF491E76\n:100A90005985B6FBF0F1491C1986598C00EBC10150\n:100AA000491EB1FBF0F11984D98B5143B1FBF0F031\n:100AB000D883BDE8F0812DE9F003447E0CB1252CEC\n:100AC00003D9BDE8F00312207047002A02BF0020BE\n:100AD000BDE8F003704791F80DC01F260123154DA6\n:100AE0004FF00008BCF1000F7AD0BCF1010F1EBF1F\n:100AF0001F20BDE8F0037047B0F800C00A7C8F7B70\n:100B000091F80F907A404F7C87EA090742EA072262\n:100B100082EA0C0C5FF000070CF0FF0999FAA9F9C2\n:100B20004FEA1C2C4FEA19699CFAACFC04E0000067\n:100B3000FFDB050053E4B36E4FEA1C6C49EA0C2C52\n:100B40000CEB0C1C7F1C9444FFB21FFA8CFC032F8F\n:100B5000E2D38CEA020CFB4F0022ECFB0572120977\n:100B60006FF0240502FB05C2D2B201EBD2078276F8\n:100B700002F007053F7A03FA05F52F4218BFC27647\n:100B80007ED104FB0CF2120C521CD2B25FF00004B6\n:100B900000EB040C9CF814C094453CBFA2EB0C0283\n:100BA000D2B212D30D194FF0000C2D7A03FA0CF7C4\n:100BB0003D421CBF521ED2B2002A69D00CF1010C7A\n:100BC0000CF0FF0CBCF1080FF0D304F1010C0CF099\n:100BD000FF04052CDCD33046BDE8F0037047FFE787\n:100BE00090F81AC00C7E474604FB02C2D54C4FF069\n:100BF000000CE2FB054C4FEA1C1C6FF024040CFBBC\n:100C00000422D2B201EBD204827602F0070C247ADD\n:100C100003FA0CFC14EA0C0F1FBFC2764046BDE875\n:100C2000F003704790F819C0B2FBFCF40CFB1422DF\n:100C3000521CD2B25FF0000400EB040C9CF814C00C\n:100C400094453CBFA2EB0C02D2B212D30D194FF067\n:100C5000000C2D7A03FA0CF815EA080F1CBF521E7F\n:100C6000D2B272B10CF1010C0CF0FF0CBCF1080F08\n:100C7000F0D304F1010C0CF0FF04052CDCD3AAE73F\n:100C800009E00CEBC401C1763846BDE8F0037047BB\n:100C90000CEBC401C1764046BDE8F0037047AA4A98\n:100CA000016812681140A94A126811430160704737\n:100CB00030B4A749A44B00244FF0010C0A78521C11\n:100CC000D2B20A70202A08BF0C700D781A680CFA8C\n:100CD00005F52A42F2D0097802680CFA01F1514078\n:100CE000016030BC704770B46FF01F02010C02EA63\n:100CF00090251F23A1F5AA4054381CBFA1F5AA4096\n:100D0000B0F1550009D0A1F52850AA381EBFA1F5B1\n:100D10002A40B0F1AA00012000D100204FF0000CC1\n:100D2000624601248CEA0106F6431643B6F1FF3F02\n:100D300011D005F001064FEA5C0C4CEAC63C03F00A\n:100D4000010652086D085B08641C42EAC632162C84\n:100D5000E8DD70BC704770BC0020704790F804C09C\n:100D60003CF01F011CBF0020704730B401785522B1\n:100D700002EA5103C91AC9B201F03304332303EA6A\n:100D800091012144447801EB111102EA5405641BDE\n:100D9000E4B204F0330503EA94042C4404EB141485\n:100DA00001F00F0104F00F040C448178C07802EACE\n:100DB0005105491BC9B201F0330503EA91012944E9\n:100DC00001EB111101F00F01214402EA5004001B54\n:100DD000C0B200F0330403EA9000204400EB10108E\n:100DE00000F00F00014402EA5C00ACEB0000C0B26E\n:100DF00000F0330203EA9000104400EB101000F002\n:100E00000F00084401288CBF0120002030BC70472F\n:100E10000A000ED00123012A0BDB491EC9B210F8CB\n:100E200001C0BCF1000F01D0002070475B1C934251\n:100E3000F3DD01207047002A08BF70471144401EAF\n:100E400012F0010F03D011F8013D00F8013F5208E4\n:100E500008BF704711F8013C437011F8023D00F8DB\n:100E6000023F521EF6D1704770B58CB000F11004ED\n:100E70001D4616460DF1FF3C5FF0080014F8012CEA\n:100E80008CF8012014F8022D0CF8022F401EF5D129\n:100E900001F1100C6C460DF10F0108201CF8012C1B\n:100EA0004A701CF8022D01F8022F401EF6D1204690\n:100EB00013F01CFB7EB16A1E04F130005FF00801E4\n:100EC00010F8013C537010F8023D02F8023F491E31\n:100ED000F6D10CB070BD08982860099868600A982F\n:100EE000A8600B98E8600CB070BD38B505460C469C\n:100EF000684607F03DFE002808BF38BD9DF9002078\n:100F00002272E07E607294F90A100020511A48BFE4\n:100F1000494295F82D308B42C8BF38BDFF2B08BF22\n:100F200038BDE17A491CC9B2E17295F82E30994278\n:100F300003D8A17A7F2918BF38BDA2720020E072C1\n:100F4000012038BD53E4B36E04620200086202005F\n:100F5000740000200C2818BF0B2810D00D2818BFD3\n:100F60001F280CD0202818BF212808D0222818BFFD\n:100F7000232804D024281EBF2628002070474FF0C5\n:100F8000010070470C2963D2DFE801F006090E1357\n:100F9000161B323C415C484E002A5BD058E0072AC1\n:100FA00018BF082A56D053E00C2A18BF0B2A51D07C\n:100FB0004EE00D2A4ED04BE0A2F10F000C2849D98B\n:100FC00046E023B1A2F110000B2843D940E0122AD9\n:100FD00018BF112A3ED090F8380020B1122A37D31A\n:100FE0001A2A37D934E0162A32D31A2A32D92FE0F6\n:100FF000A2F10F0103292DD990F8380008B31B2A5C\n:1010000028D925E0002B08BF042A21D122E013B102\n:10101000062A1FD01CE0012A1AD11BE01C2A1CBF83\n:101020001D2A1E2A16D013E01F2A18BF202A11D00D\n:10103000212A18BF222A0DD0232A1CBF242A262A9F\n:1010400008D005E013B10E2A04D001E0052A01D032\n:1010500000207047012070472DE9F0410D460446FD\n:10106000866805F02FFA58B905F07EF840F236711F\n:1010700004F061FDA060204605F024FA0028F3D0BA\n:1010800095B13046A16805F067FD00280CDD2844C5\n:10109000401EB0FBF5F707FB05F1304604F04BFDB1\n:1010A000A0603846BDE8F0810020BDE8F08170B551\n:1010B0000446904228BF70BD101B64280BD325182E\n:1010C0008D4206D8042105F07AFD00281CBF284671\n:1010D00070BD204670BD6420F1E711F00C0F13D0F5\n:1010E00001F0040100290DBF4022102296214FF487\n:1010F000167101F5BC71A0EB010388428CBF93FB14\n:10110000F2F0002080B27047022919BF6FF00D0184\n:1011100001EBD0006FF00E0101EB9000F2E7084404\n:1011200018449830002A14BF042100210844704755\n:1011300010B4002A14BF4FF429624FF4A472002B9C\n:1011400019BF4FF429634FF0080C4FF4A4734FF00C\n:10115000010C00280CBF0124002491F866001CF04B\n:101160000C0F08BF0020D11808449830002C14BF81\n:1011700004210021084410BC704700280CBF012343\n:10118000002391F86600002BA0F6482000F50050DF\n:1011900018BF04231844496A81422CBF0120002053\n:1011A00012F00C0118BF012131EA000014BF002029\n:1011B0000120704710B413680B66137813F00C030A\n:1011C00018BF0123527812F00C0218BF012253EA13\n:1011D000020C04BF10BC7047002B0CBF4FF4A4736B\n:1011E0004FF42963002A19BF4FF429624FF0080C0D\n:1011F0004FF4A4724FF0010C00280CBF012400240E\n:1012000091F866001CF00C0F08BF00201A4410442F\n:101210009830002C14BF0422002210444A6A8242F3\n:1012200024BF10BC704791F860004FF0030230F00B\n:101230000C0381F8603091F8610020F00C0081F817\n:10124000610008BF81F86020002808BF81F8612094\n:1012500010BC704710F0010F1CBF0120704710F048\n:10126000020F1CBF0220704710F0040018BF0820B6\n:1012700070472DE9F0470446174689464FF00108AC\n:1012800008460DF0FAF8054648460DF0FAF810F059\n:10129000010F18BF012624D015F0010F18BF01233C\n:1012A0002AD000BF56EA030108BF4FF0000810F033\n:1012B000070F08BF002615F0070F08BF002394F89A\n:1012C0006400B0420CBF00203046387094F86510BE\n:1012D000994208BF00237B70002808BF002B25D14E\n:1012E00015E010F0020F18BF0226D5D110F0040F40\n:1012F00014BF08260026CFE715F0020F18BF0223FF\n:10130000D0D115F0040F14BF08230023CAE74846C4\n:101310000DF0BDF8B4F87010401A00B247F6FE7137\n:10132000884201DC002801DC4FF0000816B1082ECD\n:101330000CD018E094F86400012818BF022812D0DD\n:1013400004281EBF0828FFDF032D0CD194F8C0012C\n:1013500048B1B4F8C401012894F8640006D0082804\n:1013600001D0082038704046BDE8F087042818BF37\n:101370000420F7D1F5E7012814BF0228704710F0C8\n:101380000C0018BF0420704738B4CBB2C1F3072C4F\n:10139000C1B2C0F30724012B07D0022B09D0042BC4\n:1013A00008BFBCF1040F2DD006E0BCF1010F03D142\n:1013B00028E0BCF1020F25D0012906D0022907D070\n:1013C000042908BF042C1DD004E0012C02D119E02F\n:1013D000022C17D001EA0C0161F3070204EA0301B1\n:1013E00061F30F22D1B211F0020F18BF022310D007\n:1013F000C2F307218DF8003011F0020F18BF02214F\n:101400001BD111E0214003EA0C03194061F30702EC\n:10141000E6E711F0010F18BF0123E9D111F0040F25\n:1014200014BF08230023E3E711F0010F18BF0121C7\n:1014300003D111F0040118BF08218DF80110082B09\n:1014400001BF000C012804208DF80000BDF8000049\n:1014500038BC70474FF0000C082902D0042909D08D\n:1014600011E001280FD10420907082F803C013808E\n:1014700001207047012806D00820907082F803C030\n:1014800013800120704700207047162A10D12A22AD\n:101490000C2818BF0D280FD04FF0230C1F280DD09B\n:1014A00031B10878012818BF002805D0162805D0CA\n:1014B00000207047012070471A70FBE783F800C0D6\n:1014C000F8E7012908D002290BD0042912BF082906\n:1014D00040F6A660704707E0002804BF40F2E240F3\n:1014E000704740F6C410704700B5FFDF40F2E2409D\n:1014F00000BD00000178406829B190F82C1190F8E7\n:101500008C0038B901E001F0BDBD19B1042901D04A\n:10151000012070470020704770B50C460546062133\n:1015200002F0C4FC606008B1002006E007212846F4\n:1015300002F0BCFC606018B101202070002070BD7A\n:10154000022070BD2DE9FC470C4606466946FFF7B0\n:10155000E3FF00287DD19DF8000050B1FDF7EEF8C3\n:10156000B0427CD0214630460AF008FC002873D1F6\n:101570002DE00DF097F9B04271D02146304612F0BF\n:10158000B6FA002868D1019D95F8F00022E001200C\n:1015900000E00020804695F839004FF0010A4FF036\n:1015A0000009F0B195F83A0080071AD584F8019047\n:1015B00084F800A084F80490E68095F83B1021722E\n:1015C000A98F6181E98FA18185F8399044E0019D5F\n:1015D00095F82C0170350028DBD1287F0028D8D061\n:1015E000D5E7304602F0A5FD070000D1FFDF384601\n:1015F00001F0B5FF40B184F801900F212170E68021\n:10160000208184F804A027E0304602F080FD070026\n:1016100000D1FFDFB8F1000F21D0384601F0F7FF0D\n:10162000B8B19DF8000038B90198D0F81801418888\n:10163000B14201D180F80090304607F00DFF84F8E8\n:1016400001900C21217084F80490E680697F21725A\n:1016500000E004E085F81C900120BDE8FC87002034\n:10166000FBE71CB56946FFF757FF00B1FFDF68468F\n:1016700001F014FDFE4900208968A1F8F2001CBDAC\n:101680002DE9FC4104460E46062002F0B7FB054654\n:10169000072002F0B3FB2844C7B20025A8463E4409\n:1016A00017E02088401C80B22080B04202D3404620\n:1016B000A4F8008080B2B84204D3B04202D2002025\n:1016C000BDE8FC816946FFF727FF0028F8D06D1CB4\n:1016D000EDB2AE42E5D84FF6FF7020801220EFE762\n:1016E00038B54FF6FF70ADF800000DE00621BDF8EB\n:1016F000000002F0EDFB04460721BDF8000002F0F7\n:10170000E7FB0CB100B1FFDF00216846FFF7B8FF2F\n:101710000028EBD038BD70B507F00CFF0BF034FF9C\n:10172000D44C4FF6FF76002526836683D2A0257021\n:1017300001680079A4F14002657042F8421FA11CC3\n:101740001071601C12F0EFFA1B2020814FF4A4717D\n:101750006181A081E18107212177617703212174D3\n:10176000042262746082A082A4F13E00E1820570CE\n:101770004680BF480C300570A4F11000057046800B\n:1017800084F8205070BD70B5B94C16460D466060A7\n:10179000217007F047FEFFF7A3FFFFF7BCFF20789B\n:1017A0000FF0BDFFB6480DF0D0F92178606812F057\n:1017B0005FFA20780BF0DCF8284608F0AFFEB0485E\n:1017C000FCF7C7FF217860680AF0B2FB3146207849\n:1017D00012F024FDBDE870400BF0D6BE10B5012418\n:1017E0000AB1002010BD21B1012903D000242046F8\n:1017F00010BD02210CF024FDF9E710B50378044672\n:10180000002B406813460A46014609D05FF00100EC\n:10181000FFF78EFC6168496A884203D9012010BD38\n:101820000020F5E7002010BD2DE9F04117468A7829\n:101830001E46804642B11546C87838B1044669074D\n:1018400006D52AB1012104E00725F5E70724F6E7CC\n:101850000021620702D508B1012000E0002001420A\n:1018600006D0012211464046FFF7C7FF98B93DE078\n:1018700051B1002201214046FFF7BFFF58B9600770\n:1018800034D50122114620E060B1012200214046FA\n:10189000FFF7B3FF10B10920BDE8F081680725D537\n:1018A000012206E068074FEA44700AD5002814DBDD\n:1018B000002201214046FFF7A0FFB8B125F0040542\n:1018C00014E0002812DA012200214046FFF795FFBC\n:1018D00060B100BF24F0040408E001221146404634\n:1018E000FFF78BFF10B125F00405F3E73D7034706E\n:1018F0000020D1E770B58AB0044600886946FFF73A\n:101900000BFE002806D1A08830B1012804D002289F\n:1019100002D012200AB070BD04AB03AA214668466B\n:10192000FFF782FF0500F5D19DF800100120002689\n:101930000029019906D081F8C101019991F80C1292\n:10194000B1BB2DE081F82F01019991F8561139B9F9\n:10195000019991F82E1119B9019991F8971009B1CF\n:101960003A2519E00199059681F82E01019A9DF812\n:101970000C0082F83001019B9DF8102083F8312182\n:10198000A388019CA4F832318DF814008DF815203D\n:1019900005AA0020FFF70EFC019880F82F6126E0D1\n:1019A000019991F8C01119B9019991F8971009B1ED\n:1019B0003A2519E00199059681F8C00101989DF832\n:1019C0000C2080F8C221019B9DF8100083F8C30110\n:1019D000A388019CA4F8C4318DF814208DF815005B\n:1019E00005AA0120FFF7E6FB019880F8C1612846AF\n:1019F00090E710B504460020A17801B90120E278F3\n:101A00000AB940F0020001F058FB002803D120463B\n:101A1000BDE810406EE710BD70B5044691F8650052\n:101A200091F866300D4610F00C0F00D1002321898B\n:101A3000A088FFF774FB696A814229D2401A401CD2\n:101A4000A1884008091A8AB2A2802189081A208137\n:101A5000668895F864101046FFF73FFB864200D277\n:101A600030466080E68895F8651020890AE000001D\n:101A70007800002018080020FFFFFFFF1F00000073\n:101A8000D8060020FFF729FB864200D23046E080CE\n:101A900070BDF0B585B00D46064603A9FFF73CFDC5\n:101AA00000282DD19DF80C0060B300220499FB2082\n:101AB000B1F84E30FB2B00D30346B1F85040FB2069\n:101AC000FB2C00D30446DFF85CC59CE88110009035\n:101AD0000197CDF808C0ADF80230ADF80640684671\n:101AE000FFF79AFF6E80BDF80400E880BDF808009B\n:101AF0006881BDF80200A880BDF80600288100209A\n:101B000005B0F0BD0122D1E72DE9F04186B00446D1\n:101B100000886946FFF700FD002876D12189E0881A\n:101B200001F0E4FA002870D1A188608801F0DEFAA3\n:101B300000286AD12189E08801F0CFFA002864D119\n:101B4000A188608801F0C9FA07005ED1208802A947\n:101B5000FFF79FFF00B1FFDFBDF81010628809207A\n:101B6000914252D3BDF80C10E28891424DD3BDF89A\n:101B70001210BDF80E2023891144A2881A44914204\n:101B800043D39DF80010019D4FF00008012640F658\n:101B9000480041B185F8B761019991F8F81105F550\n:101BA000DB7541B91AE085F82561019991F84A1170\n:101BB00005F5927509B13A2724E0E18869806188CA\n:101BC000E9802189814200D30146A980A188814210\n:101BD00000D208462881012201990FE0E18869803E\n:101BE0006188E9802189814200D30146A980A188CA\n:101BF000814200D208462881019900222846FFF739\n:101C00000BFF2E7085F80180384606B044E67BE76E\n:101C100070B504460CF0FCFDB0B12078182811D145\n:101C2000207901280ED1E088062102F03FF9040056\n:101C300008D0208807F010FC2088062102F048F91F\n:101C400000B1FFDF012070BDF74D28780028FAD0E1\n:101C5000002666701420207020223146201DFCF7DB\n:101C600016FC022020712E70ECE710B50446FCF73C\n:101C7000DBFC002813D0207817280FD1207968B119\n:101C8000E088072102F012F940B1008807F0E4FB78\n:101C9000E088072102F01CF900B1FFDF012010BD30\n:101CA0002DE9F0475FEA000800D1FFDFDE4802219E\n:101CB0001A308146FFF7E4FC00B1FFDFDA4C062062\n:101CC000678B02F09BF80546072002F097F828443E\n:101CD000C5B2681CC6B2608BB04203D14046FFF764\n:101CE000C4FF58B9608BA84203D14046FFF790FF6C\n:101CF00020B9608B4146FFF725FC38B1404601F022\n:101D000003FA0028E7D10120BDE8F0870221484608\n:101D1000FFF7B6FC10B9608BB842DCD14046BDE895\n:101D2000F04712F0C1BA10B501F053F908B10C2018\n:101D300010BD0BF07DFC002010BD10B504460078EE\n:101D400018B1012801D0122010BD01F053F920B1C3\n:101D50000BF0C0FD08B10C2010BD207801F013F984\n:101D6000E21D04F11703611CBDE810400BF0DABC62\n:101D700010B5044601F02DF908B10C2010BD2078F3\n:101D800028B1012803D0FF280BD0122010BD01F08C\n:101D9000FAF8611C0BF00CFC08B1002010BD072004\n:101DA00010BD01200BF03EFCF7E710B50BF095FDE0\n:101DB00008B1002010BD302010BD10B5044601F060\n:101DC00019F908B10C2010BD20460BF080FD002051\n:101DD00010BD10B501F00EF920B10BF07BFD08B17C\n:101DE0000C2010BD0BF0F6FC002010BDFF2181700F\n:101DF0004FF6FF7181808D4949680A7882718A881F\n:101E000002814988418101214170002070477CB5E1\n:101E10000025022A19D015DC12F10C0F15D009DCAF\n:101E200012F1280F11D012F1140F0ED012F1100F71\n:101E300011D10AE012F1080F07D012F1040F04D0FB\n:101E40004AB902E0D31E052B05D8012806D0022886\n:101E500008D003280AD0122528467CBD1046FDF77D\n:101E600013F8F9E710460CF06BFEF5E70846144648\n:101E70006946FFF751FB08B10225EDE79DF8000028\n:101E80000198002580F86740E6E710B51346012267\n:101E9000FEF7EAFF002010BD10B5044610F02FFA3F\n:101EA000052804D020460FF029FC002010BD0C208E\n:101EB00010BD10B5044601F09DF808B10C2010BD0E\n:101EC0002146002007F037FB002010BD10B5044666\n:101ED0000FF0A3FC50B108F0A6FD38B1207808F04F\n:101EE00029FB20780DF04DF9002010BD0C2010BD0D\n:101EF00010B5044601F07EF808B10C2010BD214653\n:101F0000012007F018FB002010BD38B504464FF63D\n:101F1000FF70ADF80000A079E179884216D02079F1\n:101F2000FCF7E3FA90B16079FCF7DFFA70B10022B8\n:101F3000A079114612F0A0FD40B90022E0791146C7\n:101F400012F09AFD10B9207A072801D9122038BD65\n:101F500008F076FD60B910F0D2F948B90021684662\n:101F6000FFF78EFB20B1204606F044F9002038BD73\n:101F70000C2038BD2DE9FC41817805461A2925D071\n:101F80000EDC16292ED2DFE801F02D2D2D2D2D216E\n:101F90002D2D2D2D2D2D2D2D2D2D2D2D2D21212195\n:101FA0002A291FD00BDCA1F11E010C291AD2DFE86F\n:101FB00001F019191919191919191919190D3A399D\n:101FC00004290FD2DFE801F00E020E022888B0F5D6\n:101FD000706F07D201276946FFF79EFA20B10220F1\n:101FE000BDE8FC811220FBE79DF8000000F0D2FF65\n:101FF000019C10B104F58A7401E004F5C6749DF8E3\n:10200000000000F0C7FF019E10B106F2151601E0B6\n:1020100006F28D166846FFF76DFA08B1207838B1E0\n:102020000C20DDE70C620200180800207800002078\n:102030002770A8783070684601F030F80020CFE7AC\n:102040007CB50D466946FFF767FA002618B12E6089\n:102050002E7102207CBD9DF8000000F09BFF019CCA\n:102060009DF80000703400F095FF019884F84260FC\n:1020700081682960017B297194F842100029F5D10B\n:1020800000207CBD10B5044600F0B4FF20B10BF079\n:1020900021FC08B10C2010BD207800F074FFE2791B\n:1020A000611C0BF093FD08B1002010BD022010BD93\n:1020B00010B5886E60B1002241F8682F0120CA7106\n:1020C0008979884012F0CCFC002800D01F2010BD78\n:1020D0000C2010BD1CB50C466946FFF71DFA002800\n:1020E00009D19DF8000000280198B0F8700000D0D8\n:1020F000401C208000201CBD1CB504460088694699\n:10210000FFF70AFA08B102201CBD606828B1DDE9BA\n:102110000001224601F04CF81CBDDDE90001FFF78B\n:10212000C7FF1CBD70B51C460D4618B1012801D073\n:10213000122070BD1946104601F078F830B12146E2\n:10214000284601F07DF808B1002070BD302070BD38\n:1021500070B5044600780E46012804D018B1022854\n:1021600001D0032840D1607828B1012803D002288B\n:1021700001D0032838D1E07B10B9A078012833D1F1\n:10218000A07830F005012FD110F0050F2CD0628916\n:10219000E188E0783346FFF7C5FF002825D1A07815\n:1021A00005281DD16589A289218920793346FFF749\n:1021B000B9FF002819D1012004EB40014A891544D8\n:1021C0002218D378927893420ED1CA8889888A429D\n:1021D0000AD1401CC0B20228EED3E088A84203D343\n:1021E000A07B08B1072801D9122070BD002070BD66\n:1021F00010B586B0044600F0E1FE10B10C2006B028\n:1022000010BD022104F10A0001F02FF8A0788DF82A\n:102210000800A0788DF8000060788DF80400207820\n:102220008DF80300A07B8DF80500E07B00B1012054\n:102230008DF80600A078C10717D0E07801F00CF8FF\n:102240008DF80100E088ADF80A006089ADF80C0057\n:10225000A078400716D5207900F0FEFF8DF8020027\n:102260002089ADF80E00A0890AE040070AD5E07881\n:1022700000F0F2FF8DF80200E088ADF80E006089F2\n:10228000ADF8100002A80FF0D4FA0028B7D16846C4\n:102290000CF07CFFB3E710B504460121FFF758FFAF\n:1022A000002803D12046BDE81040A1E710BD027808\n:1022B000012A01D0BAB118E042783AB1012A05D01A\n:1022C000022A12D189B1818879B100E059B14188DF\n:1022D00049B1808838B101EB8101490000EB8000F1\n:1022E000B1EB002F01D2002070471220704770B56B\n:1022F000044600780D46012809D010F000F80528A2\n:1023000003D00FF0A6F9002800D00C2070BD0CF00F\n:102310000AFE88B10CF01CFE0CF018FF0028F5D165\n:1023200025B160780CF0ACFE0028EFD1A188608860\n:10233000BDE870400FF0A3BA122070BD10B504467E\n:102340000121FFF7B4FF002804D12046BDE810406A\n:102350000121CCE710BDF0B5871FDDE9056540F62A\n:102360007B44A74213D28F1FA74210D288420ED8B7\n:10237000B2F5FA7F0BD2A3F10A00241FA04206D2C5\n:10238000521C4A43B2EB830F01DAAE4201D900205E\n:10239000F0BD0120F0BD2DE9FC47477A894604468F\n:1023A00017F0050F7ED0F8087CD194F83A0008B9F0\n:1023B000012F77D10025A8462E46F90789F0010A9A\n:1023C00019D0208A514600F031FFE8B360895146A8\n:1023D00000F036FFC0B3208A6189884262D8A18E9E\n:1023E000E08DCDE90001238D628CA18BE08AFFF79F\n:1023F000B2FF48B30125B8070ED504EB4500828E25\n:10240000C18DCDE90012038D428C818BC08AFFF70C\n:10241000A2FFC8B1A8466D1C78071ED504EB45067F\n:102420005146308A00F002FF70B17089514600F0C9\n:1024300007FF48B1308A7189884253D8B18EF08D38\n:10244000CDE90001338D00E00BE0728CB18BF08A96\n:10245000FFF781FF28B12E466D1CB9F1000F03D0A4\n:1024600030E03020BDE8FC87F80707D0780705D5B5\n:1024700004EB460160894989884233D1228A0121CF\n:102480001BE0414503D004EB4100008A024404EB09\n:102490004100C38A868AB34224D1838B468BB342E0\n:1024A00020D100E01EE0438C068CB3421AD1038D8C\n:1024B000C08C834216D1491CC9B2A942E1D36089BC\n:1024C00090420FD3207810B101280BD102E0A07800\n:1024D0000028F9D1607838B1012805D0022803D04E\n:1024E000032801D01220BDE70020BBE7002152E7FE\n:1024F0000178C90702D0406811F0A9BE11F076BE7C\n:1025000010B50078012800D00020FCF7B8FC0020AE\n:1025100010BD2DE9F0478EB00D46AFF6A422D2E9EA\n:102520000092014690462846FFF735FF06000CD181\n:1025300000F044FD40B9FE4F387828B90CF0B2F9EC\n:10254000A0F57F41FF3903D00C200EB0BDE8F08725\n:10255000032105F1100000F088FEF54809AA3E3875\n:102560000990F4480A90F248062110380B900CA804\n:1025700001F06AFC040037D00021FEF77CF904F179\n:1025800030017B8ABA8ACB830A84797C0091BA466F\n:102590003B7CBA8A798A208801F044FD00B1FFDFD4\n:1025A000208806F058FF218804F10E0000F02CFD71\n:1025B000E1A004F1120700680590032105A804F0CA\n:1025C0006DFF002005A90A5C3A54401CC0B20328E4\n:1025D000F9D3A88B6080688CA080288DE080687A11\n:1025E000410703D508270AE00920AEE7C10701D05B\n:1025F000012704E0800701D5022700E000273A46C2\n:10260000BAF8160011460FF0CFF90146A062204635\n:102610000FF0D8F93A4621460020FEF7AEFD00B98A\n:102620000926C34A21461C320020FEF7C3FD0027BD\n:1026300084F8767084F87770A87800F0A4FC60764F\n:10264000D5F80300C4F81A00B5F80700E083C4F811\n:10265000089084F80C80012084F8200101468DF850\n:102660000070684604F01AFF9DF8000000F00701B2\n:10267000C0F3C1021144C0F3401008448DF80000BB\n:10268000401D2076092801D20830207601212046FD\n:10269000FEF7F1F868780CF051FCEEBBA9782878C9\n:1026A000EA1C0CF01EFC48B10CF052FCA97828780A\n:1026B000EA1C0CF0BFFC060002D052E0122650E0EB\n:1026C000687A00F005010020CA0700D001208A07BF\n:1026D00001D540F00200490701D540F008000CF098\n:1026E000E9FB06003DD1214603200CF0CDFC06009D\n:1026F00037D10CF0D2FC060033D1697A01F0050124\n:102700008DF80810697AC90708D06889ADF80A0001\n:10271000288AADF80C0000E023E00120697A8A07DE\n:1027200000D5401C490707D505EB40004189ADF8AD\n:102730000E10008AADF8100002A80FF07AF80646D5\n:1027400095F83A0000B101200CF0C6FB4EB90CF030\n:10275000FDFC060005D1A98F20460FF00BF80600FE\n:1027600008D0208806F078FE2088062101F0B0FB12\n:1027700000B1FFDF3046E8E601460020C9E638B583\n:102780006B48007878B90FF0BAFD052805D00CF039\n:1027900089F8A0F57F41FF3905D068460FF0B3F8FE\n:1027A000040002D00CE00C2038BD0098008806F030\n:1027B00053FE00980621008801F08AFB00B1FFDF7C\n:1027C000204638BD1CB582894189CDE900120389B4\n:1027D000C28881884088FFF7BEFD08B100201CBD7B\n:1027E00030201CBD70B50546FFF7ECFF00280ED168\n:1027F0002888062101F05AFB040007D000F042FCB3\n:1028000020B1D4F81801017831B901E0022070BD7F\n:10281000D4F86411097809B13A2070BD052181719D\n:10282000D4F8181100200881D4F81811A88848811C\n:10283000D4F81811E8888881D4F818112889C8813B\n:10284000D4F81801028941898A4204D88279082A79\n:1028500001D88A4201D3122070BD29884180D4F862\n:10286000181102200870002070BD3EB50446FEF726\n:1028700075FAB0B12E480125A0F1400245702368D9\n:1028800042F8423F237900211371417069460620C6\n:1028900001F095FA00B1FFDF684601F06EFA10B161\n:1028A0000EE012203EBDBDF80440029880F8205191\n:1028B000684601F062FA18B9BDF80400A042F4D1EC\n:1028C00000203EBD70B505460088062101F0EEFAF5\n:1028D000040007D000F0D6FB20B1D4F81811087816\n:1028E00030B901E0022070BDD4F86401007808B16D\n:1028F0003A2070BDB020005D10F0010F22D0D5F855\n:1029000002004860D5F806008860D4F8180169898B\n:1029100010228181D4F8180105F10C010E3004F564\n:102920008C74FBF78AFD216803200870288805E075\n:1029300018080020840000201122330021684880FC\n:10294000002070BD0C2070BD38B504460078EF281B\n:102950004DD86088ADF80000009800F097FC88B36F\n:102960006188080708D4D4E9012082423FD8202A90\n:102970003DD3B0F5804F3AD8207B18B3072836D81E\n:10298000607B28B1012803D0022801D003282ED172\n:102990004A0703D4022801D0032805D1A07B08B13F\n:1029A000012824D1480707D4607D28B1012803D02D\n:1029B000022801D003281AD1C806E07D03D50128DA\n:1029C00015D110E013E0012801D003280FD1C8066B\n:1029D00009D4607E012803D0022801D0032806D143\n:1029E000A07E0F2803D8E07E18B1012801D0122064\n:1029F00038BD002038BDF8B514460D46064608F02F\n:102A00001FF808B10C20F8BD3046FFF79DFF0028E5\n:102A1000F9D1FCF73EFA2870B07554B9FF208DF853\n:102A2000000069460020FCF71EFA69460020FCF70A\n:102A30000EFA3046BDE8F840FCF752B90022DAE75A\n:102A40000078C10801D012207047FA4981F82000AF\n:102A50000020704710B504460078C00704D1608894\n:102A600010B1FCF7D7F980B12078618800F001023D\n:102A7000607800F02FFC002806D1FCF7B3F901467E\n:102A80006088884203D9072010BD122010BD6168FC\n:102A9000FCF7E9F9002010BD10B504460078C00726\n:102AA00004D1608810B1FBF78AFE70B1207861888C\n:102AB00000F00102607800F00DFC002804D160886D\n:102AC0006168FCF7C4F9002010BD122010BD7CB570\n:102AD000044640784225012808D8A078FBF767FE15\n:102AE00020B120781225012802D090B128467CBD63\n:102AF000FCF7DBF920B1A0880028F7D08028F5D8B2\n:102B0000FCF7DAF960B160780028EFD0207801286E\n:102B100008D006F0C3FD044607F05DFC00287FD016\n:102B20000C207CBDFBF7F5FF10B9FCF7B7F990B3AB\n:102B300007F086FF0028F3D1FBF700FEA0F57F41E8\n:102B4000FF39EDD1FCF707F8A68842F21070464332\n:102B5000A079FCF770F9FBF739FEF8B100220721E4\n:102B600001A801F071F9040058D0B3480021846035\n:102B70002046FDF72DFD2046FCF732FDAD4D04F15A\n:102B800030006A8AA98AC2830184FBF726FE60B1FD\n:102B9000E88A01210DE0FFE712207CBD31460020CC\n:102BA00007F0CBFC88B3FFDF44E0FCF787F9014670\n:102BB000E88A07F091FD0146A0620022204606F057\n:102BC00070FDFBF70AFE38B9FCF778F9024621469A\n:102BD0000120FEF7D2FAD0B1964A21461C320120DC\n:102BE000FEF7E8FA687C00902B7CAA8A698A208824\n:102BF00001F018FA00B1FFDF208806F02CFC314606\n:102C0000204607F09AFC00B1FFDF13E008E007213F\n:102C1000BDF8040001F05CF900B1FFDF09207CBDC4\n:102C200044B1208806F018FC2088072101F050F9F3\n:102C300000B1FFDF00207CBD002148E770B50D46E4\n:102C4000072101F033F9040003D094F88F0110B18B\n:102C50000AE0022070BD94F87D00142801D01528E8\n:102C600002D194F8DC0108B10C2070BD1022294675\n:102C700004F5C870FBF7E1FB012084F88F01002008\n:102C800070BD10B5072101F011F918B190F88F113E\n:102C900011B107E0022010BD90F87D10142903D077\n:102CA000152901D00C2010BD022180F88F110020C1\n:102CB00010BD2DE9FC410C464BF6803212219442A6\n:102CC0001DD8E4B16946FEF727FC002815D19DF810\n:102CD000000000F05FF9019E9DF80000703600F0E2\n:102CE00059F9019DAD1C2F88224639463046FDF723\n:102CF00065FC2888B842F6D10020BDE8FC81084672\n:102D0000FBE77CB5044600886946FEF705FC002811\n:102D100010D19DF8000000F03DF9019D9DF80000E4\n:102D2000703500F037F90198A27890F82C10914294\n:102D300001D10C207CBD7F212972A9720021E9728A\n:102D4000E17880F82D10217980F82E10A17880F894\n:102D50002C1000207CBD1CB50C466946FEF7DCFB40\n:102D600000280AD19DF8000000F014F9019890F8AD\n:102D70008C0000B10120207000201CBD7CB50D46E8\n:102D800014466946FEF7C8FB002809D19DF80000EB\n:102D900000F000F9019890F82C00012801D00C20D7\n:102DA0007CBD9DF8000000F0F5F8019890F87810CF\n:102DB000297090F87900207000207CBD70B50D4618\n:102DC0001646072101F072F818B381880124C388E0\n:102DD000428804EB4104AC4217D842F210746343BA\n:102DE000A4106243B3FBF2F2521E94B24FF4FA7293\n:102DF000944200D91446A54200D22C46491C641CBA\n:102E0000B4FBF1F24A43521E91B290F8C8211AB9AC\n:102E100001E0022070BD01843180002070BD10B53A\n:102E20000C46072101F042F840B1022C08D91220CB\n:102E300010BD000018080020780000200220F7E7ED\n:102E400014F0010180F8FD10C4F3400280F8FC206A\n:102E500004D090F8FA1009B107F054FC0020E7E71D\n:102E6000017889B1417879B141881B290CD38188D7\n:102E70001B2909D3C188022906D3F64902680A65CD\n:102E800040684865002070471220704710B504461E\n:102E90000EF086FD204607F0D8FB0020C8E710B5ED\n:102EA00007F0D6FB0020C3E72DE9F04115460F4699\n:102EB00006460122114638460EF076FD04460121F1\n:102EC000384607F009FC844200D20446012130460E\n:102ED00000F065F806460121002000F060F8311886\n:102EE000012096318C4206D901F19600611AB1FB9E\n:102EF000F0F0401C80B228800020BDE8F08110B5C1\n:102F0000044600F077F808B10C2091E7601C0AF045\n:102F100038FE207800F00100FBF718FE207800F062\n:102F200001000CF010F8002082E710B504460720DD\n:102F300000F056FF08B10C207AE72078C00711D0C6\n:102F400000226078114611F097FD08B112206FE75A\n:102F5000A06809F01DFB6078D4F8041009F021FB8B\n:102F6000002065E7002009F013FB00210846F5E783\n:102F700010B505F036FE00205AE710B5006805F0E0\n:102F800084F8002054E718B1022801D001207047CE\n:102F90000020704708B1002070470120704710B52D\n:102FA000012904D0022905D0FFDF204640E7C000F8\n:102FB000503001E080002C3084B2F6E710B50FF0FD\n:102FC0009EF9042803D0052801D0002030E7012015\n:102FD0002EE710B5FFF7F2FF10B10CF07BF828B91F\n:102FE00007F02EFD20B1FBF78CFD08B101201FE793\n:102FF00000201DE710B5FFF7E1FF18B907F020FD2D\n:10300000002800D0012013E72DE9FE4300250F46DC\n:1030100080460A260421404604F069FA4046FDF73E\n:103020003EFE062000F0EAFE044616E06946062051\n:1030300000F0C5FE0BE000BFBDF80400B84206D0AA\n:103040000298042241460E30FBF7CAF950B1684697\n:1030500000F093FE0500EFD0641E002C06DD002D6D\n:10306000E4D005E04046FDF723FEF5E705B9FFDFB4\n:10307000D8F80000FDF737FE761E01D00028C9D031\n:10308000BDE8FE8390F8F01090F88C0020B919B1DB\n:10309000042901D0012070470020704701780029E1\n:1030A0000AD0416891F8FA20002A05D0002281F860\n:1030B000FA20406807F026BB704770B514460546F5\n:1030C000012200F01BF9002806D121462846BDE860\n:1030D0007040002200F012B970BDFB2802D8B1F593\n:1030E000296F01D911207047002070471B38E12853\n:1030F00006D2B1F5A47F03D344F29020814201D9D6\n:1031000012207047002070471FB55249403191F896\n:103110002010CA0702D102781D2A0AD08A0702D4D9\n:1031200002781C2A28D049073DD40178152937D0C8\n:1031300039E08088ADF8000002A9FEF7EDF900B192\n:10314000FFDF9DF80800FFF725FF039810F8601FC8\n:103150008DF8021040788DF803000020ADF80400CF\n:1031600001B9FFDF9DF8030000B9FFDF6846FEF7F5\n:1031700040FCD8B1FFDF19E08088ADF800004FF4C3\n:103180002961FB20ADF80410ADF80200ADF806008F\n:10319000ADF808106846FEF73AFD38B1FFDF05E0EC\n:1031A000807BC00702D0002004B041E60120FBE78D\n:1031B000F8B50746508915460C4640B1B0F5004FAA\n:1031C00005D20022A878114611F056FC08B1122051\n:1031D000F8BDA06E04F1700630B1A97894F86E00C5\n:1031E000814201D00C20F8BD012184F86F10A9782C\n:1031F00084F86E106968A1666989A4F86C10288942\n:10320000B084002184F86F1028886946FEF762FFB9\n:10321000B08CBDF80010081A00B2002804DD214669\n:103220003846FEF745FFDDE70020F8BD042803D34C\n:1032300021B9B0F5804F01D90020704701207047B7\n:10324000042803D321B9B0F5804F01D9002070477D\n:1032500001207047D8070020012802D018B10020B3\n:103260007047022070470120704710B500224FF4CC\n:10327000C84408E030F81230A34200D9234620F8B1\n:103280001230521CD2B28A42F4D3D1E580B2C106C8\n:103290000BD401071CD481064FEAC07101D5B9B91E\n:1032A00000E099B1800713D410E0410610D48106E4\n:1032B0000ED4C1074FEA807104D0002902DB400719\n:1032C00004D405E0010703D4400701D4012070476E\n:1032D0000020704770B50C460546FF2904D8FBF75F\n:1032E0007CFA18B11F2C01D9122070BD2846FBF7BB\n:1032F0005EFA08B1002070BD422070BD0AB1012203\n:1033000000E00222024202D1C80802D109B1002025\n:10331000704711207047000030B5058825F400443F\n:1033200021448CB24FF4004194420AD2121B92B253\n:103330001B339A4201D2A94307E005F4004121431F\n:1033400003E0A21A92B2A9431143018030BD0844A0\n:10335000083050434A31084480B2704770B51D466A\n:1033600016460B46044629463046049AFFF7EFFFFF\n:103370000646B34200D2FFDF282200212046FBF799\n:1033800086F84FF6FF70A082283EB0B26577608065\n:10339000B0F5004F00D9FFDF618805F13C008142A4\n:1033A00000D2FFDF60880835401B343880B22080AF\n:1033B0001B2800D21B2020800020A07770BD8161D7\n:1033C000886170472DE9F05F0D46C188044600F121\n:1033D0002809008921F4004620F4004800F063FB2E\n:1033E00010B10020BDE8F09F4FF0000A4FF0010B34\n:1033F000B0450CD9617FA8EB0600401A0838854219\n:1034000019DC09EB06000021058041801AE0608884\n:10341000617F801B471A083F0DD41B2F00DAFFDFA6\n:10342000BD4201DC294600E0B9B2681A0204120C60\n:1034300004D0424502DD84F817A0D2E709EB06006C\n:103440000180428084F817B0CCE770B5044600F1E3\n:103450002802C088E37D20F400402BB1104402888C\n:10346000438813448B4201D2002070BD00258A425C\n:1034700002D30180458008E0891A0904090C4180C3\n:1034800003D0A01D00F01FFB08E0637F0088083315\n:10349000184481B26288A01DFFF73EFFE575012048\n:1034A00070BD70B5034600F12804C588808820F4FB\n:1034B00000462644A84202D10020188270BD988997\n:1034C0003588A84206D3401B75882D1A2044ADB21A\n:1034D000C01E05E02C1AA5B25C7F20443044401D7C\n:1034E0000C88AC4200D90D809C8924B10024147052\n:1034F0000988198270BD0124F9E770B5044600F10E\n:103500002801808820F400404518208A002825D012\n:10351000A189084480B2A08129886A881144814227\n:1035200000D2FFDF2888698800260844A1898842E4\n:1035300012D1A069807F2871698819B1201D00F01F\n:10354000C2FA08E0637F28880833184481B2628891\n:10355000201DFFF7E1FEA6812682012070BD2DE926\n:10356000F041418987880026044600F12805B942C8\n:1035700019D004F10A0800BF21F400402844418812\n:1035800019B1404600F09FFA08E0637F00880833D5\n:10359000184481B262884046FFF7BEFE761C6189FE\n:1035A000B6B2B942E8D13046BDE8F0812DE9F0412C\n:1035B00004460B4627892830A68827F40041B4F832\n:1035C0000A8001440D46B74201D10020ECE70AB160\n:1035D000481D106023B1627F691D1846FAF72DFF60\n:1035E0002E88698804F1080021B18A1996B200F08A\n:1035F0006AFA06E0637F62880833991989B2FFF797\n:103600008BFE474501D1208960813046CCE7818817\n:10361000C088814201D10120704700207047018994\n:103620008088814201D1012070470020704770B529\n:103630008588C38800F1280425F4004223F4004162\n:1036400014449D421AD08389058A5E1925886388AF\n:10365000EC18A64214D313B18B4211D30EE0437F72\n:1036600008325C192244408892B2801A80B2233317\n:10367000984201D211B103E08A4201D1002070BD0D\n:10368000012070BD2DE9F0478846C18804460089B5\n:1036900021F4004604F1280720F4004507EB060951\n:1036A00000F001FA002178BBB54204D9627FA81B63\n:1036B000801A002503E06088627F801B801A08382A\n:1036C00023D4E28962B1B9F80020B9F802303BB1E5\n:1036D000E81A2177404518DBE0893844801A09E070\n:1036E000801A217740450ADB607FE1890830304449\n:1036F00039440844C01EA4F81280BDE8F08745454F\n:1037000003DB01202077E7E7FFE761820020F4E791\n:103710002DE9F74F044600F12805C088884620F4BB\n:10372000004A608A05EB0A0608B1404502D2002033\n:10373000BDE8FE8FE08978B13788B6F8029007EBD4\n:103740000901884200D0FFDF207F4FF0000B50EAD4\n:10375000090106D088B33BE00027A07FB94630714D\n:10376000F2E7E18959B1607F2944083050440844A8\n:10377000B4F81F1020F8031D94F821108170E2891D\n:1037800007EB080002EB0801E1813080A6F802B0E7\n:1037900002985F4650B1637F30880833184481B285\n:1037A0006288A01DFFF7B8FDE78121E0607FE18915\n:1037B00008305044294408442DE0FFE7E089B4F87C\n:1037C0001F102844C01B20F8031D94F8211081709D\n:1037D00009EB0800E28981B202EB0800E081378042\n:1037E00071800298A0B1A01D00F06DF9A4F80EB090\n:1037F000A07F401CA077A07D08B1E088A08284F85B\n:1038000016B000BFA4F812B084F817B001208FE7FB\n:10381000E0892844C01B30F8031DA4F81F108078ED\n:1038200084F82100EEE710B5818800F1280321F427\n:1038300000442344848AC288A14212D0914210D00D\n:10384000818971B9826972B11046FFF7E8FE50B9FB\n:103850001089283220F400401044197900798842F8\n:1038600001D1002010BD184610BD00F12803407F93\n:1038700008300844C01E1060088808B9DB1E1360B9\n:1038800008884988084480B270472DE9F04100F16A\n:103890002806407F1C4608309046431808884D880B\n:1038A000069ADB1EA0B1C01C80B2904214D9801AC7\n:1038B000A04200DB204687B298183A464146FAF704\n:1038C0008FFD002816D1E01B84B2B844002005E02B\n:1038D000ED1CADB2F61EE8E7101A80B20119A9423C\n:1038E00006D8304422464146BDE8F041FAF778BD9B\n:1038F0004FF0FF3058E62DE9F04100F12804407FF9\n:103900001E46083090464318002508884F88069ABE\n:10391000DB1E90B1C01C80B2904212D9801AB04216\n:1039200000DB304685B299182A464046FAF785FDF5\n:10393000701B86B2A844002005E0FF1CBFB2E41E45\n:10394000EAE7101A80B28119B94206D82118324626\n:103950004046FAF772FDA81985B2284624E62DE9FB\n:10396000F04100F12804407F1E460830904643187D\n:10397000002508884F88069ADB1E90B1C01C80B2D3\n:10398000904212D9801AB04200DB304685B29818B6\n:103990002A464146FAF751FD701B86B2A844002022\n:1039A00005E0FF1CBFB2E41EEAE7101A80B28119DD\n:1039B000B94206D8204432464146FAF73EFDA819DE\n:1039C00085B22846F0E5401D704710B5044600F169\n:1039D0002801C288808820F400431944904206D010\n:1039E000A28922B9228A12B9A28A904201D100206A\n:1039F00010BD0888498831B1201D00F064F800200E\n:103A00002082012010BD637F62880833184481B290\n:103A1000201DFFF781FCF2E70021C181017741827F\n:103A2000C1758175704703881380C28942B1C2880D\n:103A300022F4004300F128021A440A60C08970474A\n:103A40000020704710B50446808AA0F57F41FF39F9\n:103A500000D0FFDFE088A082E08900B10120A075DE\n:103A600010BD4FF6FF71818200218175704710B53E\n:103A70000446808AA0F57F41FF3900D1FFDFA07D99\n:103A800028B9A088A18A884201D1002010BD012058\n:103A900010BD8188828A914201D1807D08B10020C9\n:103AA00070470120704720F4004221F400439A42FD\n:103AB00007D100F4004001F40041884201D0012008\n:103AC00070470020704730B5044600880D4620F44A\n:103AD0000040A84200D2FFDF21884FF40040884315\n:103AE0002843208030BD70B50C00054609D0082C55\n:103AF00000D2FFDF1DB1A1B2286800F044F8201DFC\n:103B000070BD0DB100202860002070BD002102684A\n:103B100003E093881268194489B2002AF9D100F0B1\n:103B200032B870B500260D460446082900D2FFDFE2\n:103B3000206808B91EE0044620688188A94202D0A6\n:103B400001680029F7D181880646A94201D10068A1\n:103B50000DE005F1080293B20022994209D32844EE\n:103B6000491B026081802168096821600160206032\n:103B700000E00026304670BD00230B608A8002689A\n:103B80000A600160704700234360021D01810260EA\n:103B90007047F0B50F460188408815460C181E4640\n:103BA000AC4200D3641B3044A84200D9FFDFA01907\n:103BB000A84200D9FFDF3819F0BD2DE9F041884651\n:103BC00006460188408815460C181F46AC4200D3B3\n:103BD000641B3844A84200D9FFDFE019A84200D98D\n:103BE000FFDF70883844708008EB0400BDE8F08186\n:103BF0002DE9F041054600881E461746841B88467D\n:103C0000BC4200D33C442C8068883044B84200D980\n:103C1000FFDFA019B84200D9FFDF68883044688010\n:103C200008EB0400E2E72DE9F04106881D46044652\n:103C3000701980B2174688462080B84201D3C01B55\n:103C400020806088A84200D2FFDF7019B84200D9F6\n:103C5000FFDF6088401B608008EB0600C6E730B5D8\n:103C60000D460188CC18944200D3A41A408898428B\n:103C700000D8FFDF281930BD2DE9F041C84D0446BA\n:103C80009046A8780E46A04200D8FFDF05EB8607D5\n:103C9000B86A50F8240000B1FFDFB868002816D0D9\n:103CA000304600F044F90146B868FFF73AFF0500D6\n:103CB0000CD0B86A082E40F8245000D3FFDFB94872\n:103CC0004246294650F82630204698472846BDE807\n:103CD000F0812DE9F8431E468C1991460F460546A2\n:103CE000FF2C00D9FFDFB14500D9FFDFE4B200951A\n:103CF0004DB300208046E81C20F00300A84200D00D\n:103D0000FFDF4946DFF89892684689F8001089F885\n:103D1000017089F8024089F8034089F8044089F865\n:103D2000054089F8066089F80770414600F008F9F7\n:103D3000002142460F464B460098C01C20F003006D\n:103D4000009012B10EE00120D4E703EB8106B062CF\n:103D5000002005E0D6F828C04CF82070401CC0B206\n:103D6000A042F7D30098491C00EB8400C9B2009030\n:103D70000829E1D3401BBDE8F88310B50446EDF7F0\n:103D80008EFA08B1102010BD2078854A618802EBB8\n:103D9000800092780EE0836A53F8213043B14A1CC8\n:103DA0006280A180806A50F82100A060002010BDD0\n:103DB000491C89B28A42EED86180052010BD70B5D9\n:103DC00005460C460846EDF76AFA08B1102070BDAA\n:103DD000082D01D3072070BD25700020608070BDC4\n:103DE0000EB56946FFF7EBFF00B1FFDF6846FFF74E\n:103DF000C4FF08B100200EBD01200EBD10B5044661\n:103E0000082800D3FFDF6648005D10BD3EB50546BB\n:103E100000246946FFF7D3FF18B1FFDF01E0641CFF\n:103E2000E4B26846FFF7A9FF0028F8D02846FFF75C\n:103E3000E5FF001BC0B23EBD59498978814201D9D6\n:103E4000C0B27047FF2070472DE9F041544B06295E\n:103E500003D007291CD19D7900E0002500244FF6EE\n:103E6000FF7603EB810713F801C00AE06319D7F866\n:103E700028E09BB25EF823E0BEF1000F04D0641C82\n:103E8000A4B2A445F2D8334603801846B34201D108\n:103E900000201CE7BDE8F041EEE6A0F57F43FF3BC4\n:103EA00001D0082901D300207047E5E6A0F57F4244\n:103EB000FF3A0BD0082909D2394A9378834205D9B1\n:103EC00002EB8101896A51F8200070470020704799\n:103ED0002DE9F04104460D46A4F57F4143F202006E\n:103EE000FF3902D0082D01D30720F0E62C494FF00E\n:103EF00000088A78A242F8D901EB8506B26A52F826\n:103F00002470002FF1D027483946203050F8252062\n:103F100020469047B16A284641F8248000F007F80F\n:103F200002463946B068FFF727FE0020CFE61D495C\n:103F3000403131F810004FF6FC71C01C084070474A\n:103F40002DE9F843164E8846054600242868C01C13\n:103F500020F0030028602046FFF7E9FF315D484369\n:103F6000B8F1000F01D0002200E02A68014600925B\n:103F700032B100274FEA0D00FFF7B5FD1FB106E093\n:103F800001270020F8E706EB8401009A8A6029687F\n:103F9000641C0844E4B22860082CD7D3EBE6000088\n:103FA0003C0800201862020070B50E461D461146FE\n:103FB00000F0D3F804462946304600F0D7F82044F4\n:103FC000001D70BD2DE9F04190460D4604004FF0F4\n:103FD000000610D00027E01C20F00300A04200D013\n:103FE000FFDFE5B141460020FFF77DFD0C3000EB1F\n:103FF000850617B113E00127EDE7614F04F10C00CE\n:10400000AA003C602572606000EB85002060002102\n:104010006068FAF73CFA41463868FFF764FD3046BD\n:10402000BDE8F0812DE9FF4F554C804681B02068F6\n:104030009A46934600B9FFDF2068027A424503D9C9\n:10404000416851F8280020B143F2020005B0BDE8F4\n:10405000F08F5146029800F080F886B258460E99CB\n:1040600000F084F885B27019001D87B22068A1465F\n:1040700039460068FFF755FD04001FD06780258092\n:104080002946201D0E9D07465A4601230095FFF73D\n:1040900065F92088314638440123029ACDF800A002\n:1040A000FFF75CF92088C1193846FFF788F9D9F87D\n:1040B00000004168002041F82840C7E70420C5E718\n:1040C00070B52F4C0546206800B9FFDF2068017AE3\n:1040D000A9420DD9426852F8251049B1002342F88F\n:1040E00025304A880068FFF747FD2168087A06E016\n:1040F00043F2020070BD4A6852F820202AB9401EDF\n:10410000C0B2F8D20868FFF701FD002070BD70B59D\n:104110001B4E05460024306800B9FFDF3068017A85\n:10412000A94204D9406850F8250000B1041D20467A\n:1041300070BD70B5124E05460024306800B9FFDF2F\n:104140003068017AA94206D9406850F8251011B1AB\n:1041500031F8040B4418204670BD10B50A46012101\n:10416000FFF7F5F8C01C20F0030010BD10B50A469B\n:104170000121FFF7ECF8C01C20F0030010BD000087\n:104180008C00002070B50446C2F110052819FAF71A\n:1041900054F915F0FF0109D0491ECAB28020A0547D\n:1041A0002046BDE870400021FAF771B970BD30B506\n:1041B00005E05B1EDBB2CC5CD55C6C40C454002BCC\n:1041C000F7D130BD10B5002409E00B78521E44EA47\n:1041D000430300F8013B11F8013BD2B2DC09002A8D\n:1041E000F3D110BD2DE9F04389B01E46DDE9107909\n:1041F00090460D00044622D002460846F949FDF7D4\n:1042000044FE102221463846FFF7DCFFE07B000623\n:1042100006D5F44A3946102310320846FFF7C7FF87\n:10422000102239464846FFF7CDFFF87B000606D539\n:10423000EC4A4946102310320846FFF7B8FF102217\n:1042400000212046FAF723F90DE0103EB6B208EB44\n:104250000601102322466846FFF7A9FF224628469A\n:104260006946FDF712FE102EEFD818D0F2B2414683\n:104270006846FFF787FF10234A46694604A8FFF700\n:1042800096FF1023224604A96846FFF790FF2246B6\n:1042900028466946FDF7F9FD09B0BDE8F083102313\n:1042A0003A464146EAE770B59CB01E4605461346BD\n:1042B00020980C468DF80800202219460DF10900BF\n:1042C000FAF7BBF8202221460DF12900FAF7B5F8DC\n:1042D00017A913A8CDE90001412302AA31462846B7\n:1042E000FFF780FF1CB070BD2DE9FF4F9FB014AEEB\n:1042F000DDE92D5410AFBB49CDE9007620232031F4\n:104300001AA8FFF76FFF4FF000088DF808804FF0F4\n:1043100001098DF8099054F8010FCDF80A00A08822\n:10432000ADF80E0014F8010C1022C0F340008DF817\n:10433000100055F8010FCDF81100A888ADF8150050\n:1043400015F8010C2C99C0F340008DF8170006A851\n:104350008246FAF772F80AA8834610222299FAF7E1\n:104360006CF8A0483523083802AA40688DF83C80D4\n:10437000CDE900760E901AA91F98FFF733FF8DF84C\n:1043800008808DF809902068CDF80A00A088ADF863\n:104390000E0014F8010C1022C0F340008DF810003C\n:1043A0002868CDF81100A888ADF8150015F8010CA3\n:1043B0002C99C0F340008DF817005046FAF73DF8ED\n:1043C000584610222299FAF738F8864835230838DB\n:1043D00002AA40688DF83C90CDE900760E901AA9AB\n:1043E0002098FFF7FFFE23B0BDE8F08FF0B59BB03B\n:1043F0000C460546DDE922101E461746DDE920324F\n:10440000D0F801C0CDF808C0B0F805C0ADF80CC0B8\n:104410000078C0F340008DF80E00D1F80100CDF80F\n:104420000F00B1F80500ADF8130008781946C0F385\n:1044300040008DF815001088ADF8160090788DF8C2\n:1044400018000DF119001022F9F7F7FF0DF12900FE\n:1044500010223146F9F7F1FF0DF1390010223946EB\n:10446000F9F7EBFF17A913A8CDE90001412302AA30\n:1044700021462846FFF7B6FE1BB0F0BDF0B5A3B04D\n:1044800017460D4604461E46102202A82899F9F741\n:10449000D4FF06A820223946F9F7CFFF0EA8202224\n:1044A0002946F9F7CAFF1EA91AA8CDE90001502331\n:1044B00002AA314616A8FFF795FE1698206023B091\n:1044C000F0BDF0B589B00446DDE90E070D46397838\n:1044D000109EC1F340018DF8001031789446C1F36D\n:1044E00040018DF801101968CDF802109988ADF8D7\n:1044F000061099798DF808100168CDF809108188A7\n:10450000ADF80D1080798DF80F0010236A466146D2\n:1045100004A8FFF74CFE2246284604A9FDF7B5FC87\n:10452000D6F801000090B6F80500ADF80400D7F801\n:104530000100CDF80600B7F80500ADF80A0000202C\n:10454000039010236A46214604A8FFF730FE224656\n:10455000284604A9FDF799FC09B0F0BD1FB51C68F9\n:1045600000945B68019313680293526803920246B9\n:1045700008466946FDF789FC1FBD10B588B00446A2\n:104580001068049050680590002006900790084637\n:104590006A4604A9FDF779FCBDF80000208008B048\n:1045A00010BD1FB51288ADF800201A88ADF80220A2\n:1045B0000022019202920392024608466946FDF7E4\n:1045C00064FC1FBD7FB5074B14460546083B9A1C8B\n:1045D0006846FFF7E6FF224669462846FFF7CDFF0B\n:1045E0007FBD00007062020070B5044600780E4680\n:1045F000012813D0052802D0092813D10EE0A068A5\n:1046000061690578042003F059FA052D0AD0782352\n:1046100000220420616903F0A7F903E00420616926\n:1046200003F04CFA31462046BDE8704001F08AB8EC\n:1046300010B500F12D03C2799C78411D144064F33C\n:104640000102C271D2070DD04A795C7922404A71C9\n:104650000A791B791A400A718278C9788A4200D98E\n:10466000817010BD00224A71F5E74178012900D020\n:104670000C21017070472DE9F04F93B04FF0000B03\n:104680000C690D468DF820B0097801260C201746DC\n:104690004FF00D084FF0110A4FF008091B2975D291\n:1046A000DFE811F01B00C40207031F035E03710360\n:1046B000A303B803F9031A0462049504A204EF04E7\n:1046C0002D05370555056005F305360639066806DC\n:1046D0008406FE062207EB06F00614B120781D289A\n:1046E0002AD0D5F808805FEA08004FD001208DF865\n:1046F0002000686A02220D908DF824200A208DF88F\n:104700002500A8690A90A8880028EED098F8001023\n:1047100091B10F2910D27DD2DFE801F07C1349DE80\n:10472000FCFBFAF9F8F738089CF6F50002282DD1C1\n:1047300024B120780C2801D00026F0E38DF8202049\n:10474000CBE10420696A03F0B9F9A8880728EED103\n:10475000204600F0F2FF022809D0204600F0EDFFCD\n:10476000032807D9204600F0E8FF072802D20120DD\n:10477000207004E0002CB8D020780128D7D198F818\n:104780000400C11F0A2902D30A2061E0C4E1A0701D\n:10479000D8F80010E162B8F80410218698F80600F5\n:1047A00084F83200012028700320207044E007289C\n:1047B000BDD1002C99D020780D28B8D198F80310DD\n:1047C00094F82F20C1F3C000C2F3C002104201D000\n:1047D000062000E00720890707D198F8051001425C\n:1047E000D2D198F806100142CED194F8312098F831\n:1047F000051020EA02021142C6D194F8322098F83E\n:10480000061090430142BFD198F80400C11F0A2945\n:10481000BAD200E008E2617D81427CD8D8F800106D\n:104820006160B8F80410218198F80600A072012098\n:1048300028700E20207003208DF82000686A0D90EB\n:1048400004F12D000990601D0A900F300B9022E1B9\n:104850002875FCE3412891D1204600F06EFF042822\n:1048600002D1E078C00704D1204600F066FF0F288F\n:1048700084D1A88CD5F80C8080B24FF0400BE6694B\n:10488000FFF745FC324641465B464E46CDF8009068\n:10489000FFF731F80B208DF82000686A0D90E06971\n:1048A0000990002108A8FFF79FFE2078042806D071\n:1048B000A07D58B1012809D003280AD04AE3052079\n:1048C0002070032028708DF82060CEE184F800A0CD\n:1048D00032E712202070EAE11128BCD1204600F016\n:1048E0002CFF042802D1E078C00719D0204600F040\n:1048F00024FF062805D1E078C00711D1A07D022849\n:104900000ED0204608E0CCE084E072E151E124E1E1\n:1049100003E1E9E019E0B0E100F00FFF11289AD1BE\n:10492000102208F1010104F13C00F9F786FD6078DE\n:1049300001286ED012202070E078C00760D0A07DE2\n:104940000028C8D00128C6D05AE0112890D12046AE\n:1049500000F0F3FE082804D0204600F0EEFE1328F5\n:1049600086D104F16C00102208F101010646F9F726\n:1049700064FD207808280DD014202070E178C80745\n:104980000DD0A07D02280AD06278022A04D0032824\n:10499000A1D035E00920F0E708B1012837D1C807D8\n:1049A00013D0A07D02281DD000200090D4E906215C\n:1049B00033460EA8FFF777FC10220EA904F13C0045\n:1049C000F9F70EFDC8B1042042E7D4E90912201D11\n:1049D0008DE8070004F12C0332460EA8616BFFF747\n:1049E00070FDE9E7606BC1F34401491E0068C840EF\n:1049F00000F0010040F08000D7E72078092806D1B8\n:104A000085F800908DF8209036E32870EFE30920B8\n:104A1000FBE79EE1112899D1204600F08EFE0A287E\n:104A200002D1E078C00704D1204600F086FE1528A8\n:104A30008CD104F13C00102208F101010646F9F77F\n:104A4000FCFC20780A2816D016202070D4E9093200\n:104A5000606B611D8DE80F0004F15C0304F16C02D2\n:104A600047310EA8FFF7C2FC10220EA93046F9F715\n:104A7000B7FC18B1F9E20B20207073E22046FFF773\n:104A8000D7FDA078216AC0F110020B18002118464A\n:104A9000F9F7FDFC26E3394608A8FFF7A5FD064611\n:104AA0003CE20228B7D1204600F047FE042804D398\n:104AB000204600F042FE082809D3204600F03DFEC3\n:104AC0000E2829D3204600F038FE122824D2A07DDB\n:104AD0000228A0D10E208DF82000686A0D9098F869\n:104AE00001008DF82400F5E3022894D1204600F05F\n:104AF00024FE002810D0204600F01FFE0128F9D027\n:104B0000204600F01AFE0C28F4D004208DF8240072\n:104B100098F801008DF8250060E21128FCD1002CE6\n:104B2000FAD020781728F7D16178606A022912D06C\n:104B30005FF0000101EB4101182606EBC1011022D4\n:104B4000405808F10101F9F778FC0420696A00F087\n:104B5000E7FD2670F0E50121ECE70B28DCD1002C05\n:104B6000DAD020781828D7D16078616A02281CD062\n:104B70005FF0000000EB4002102000EBC20009587B\n:104B8000B8F8010008806078616A02280FD0002020\n:104B900000EB4002142000EBC2000958404650F8D8\n:104BA000032F0A604068486039E00120E2E70120F5\n:104BB000EEE71128B0D1002CAED020781928ABD167\n:104BC0006178606A022912D05FF0000101EB4101B7\n:104BD0001C2202EBC1011022405808F10101F9F733\n:104BE0002CFC0420696A00F09BFD1A20B6E001212C\n:104BF000ECE7082890D1002C8ED020781A288BD191\n:104C0000606A98F80120017862F347010170616AD7\n:104C1000D8F8022041F8012FB8F806008880042057\n:104C2000696A00F07DFD90E2072011E638780128DE\n:104C300094D1182204F114007968F9F7FEFBE079A9\n:104C4000C10894F82F0001EAD001E07861F3000078\n:104C5000E070217D002974D12178032909D0C00793\n:104C600025D0032028708DF82090686A0D9041208F\n:104C700008E3607DA178884201D90620E8E5022694\n:104C80002671E179204621F0E001E171617A21F09D\n:104C9000F0016172A17A21F0F001A172FFF7C8FC66\n:104CA0002E708DF82090686A0D900720EAE20420AB\n:104CB000ABE6387805289DD18DF82000686A0D9004\n:104CC000B8680A900720ADF824000A988DF830B033\n:104CD0006168016021898180A17A8171042020703E\n:104CE000F8E23978052985D18DF82010696A0D918F\n:104CF000391D09AE0EC986E80E004121ADF8241019\n:104D00008DF830B01070A88CD7F80C8080B2402697\n:104D1000A769FFF70EFA41463A463346C846CDF832\n:104D20000090FEF71CFE002108A8FFF75DFCE0786C\n:104D300020F03E00801CE0702078052802D00F2073\n:104D40000CE04AE1A07D20B1012802D0032802D066\n:104D500002E10720BEE584F80080EDE42070EBE47A\n:104D6000102104F15C0002F0C2FB606BB0BBA07DBF\n:104D700018B1012801D00520FDE006202870F84870\n:104D80006063A063C2E23878022894D1387908B110\n:104D90002875B7E3A07D022802D0032805D022E0C1\n:104DA000B8680028F5D060631CE06078012806D060\n:104DB000A07994F82E10012805D0E94806E0A179E1\n:104DC00094F82E00F7E7B8680028E2D06063E07836\n:104DD000C00701D0012902D0E14803E003E0F868F0\n:104DE0000028D6D0A06306200FE68DF82090696ACF\n:104DF0000D91E1784846C90709D06178022903D1AD\n:104E0000A17D29B1012903D0A17D032900D007206C\n:104E1000287033E138780528BBD1207807281ED0C8\n:104E200084F800A005208DF82000686A0D90B8680D\n:104E30000A90ADF824A08DF830B003210170E1781C\n:104E4000CA070FD0A27D022A1AD000210091D4E90E\n:104E5000061204F15C03401CFFF725FA6BE384F8AB\n:104E60000090DFE7D4E90923211D8DE80E0004F14D\n:104E70002C0304F15C02401C616BFFF722FB5AE338\n:104E8000626BC1F34401491E1268CA4002F001017D\n:104E900041F08001DAE738780528BDD18DF820008F\n:104EA000686A0D90B8680A90ADF824A08DF830B00B\n:104EB000042100F8011B102204F15C01F9F7BDFA8E\n:104EC000002108A8FFF790FB2078092801D01320C3\n:104ED00044E70A2020709AE5E078C10742D0A17D1E\n:104EE000012902D0022927D038E0617808A80129D9\n:104EF00016D004F16C010091D4E9061204F15C03B0\n:104F0000001DFFF7BBFA0A20287003268DF82080C9\n:104F1000686A0D90002108A8FFF766FBE1E2C7E28E\n:104F200004F15C010091D4E9062104F16C03001D39\n:104F3000FFF7A4FA0026E9E7C0F3440114290DD2D3\n:104F40004FF0006101EBB0104FEAB060E0706078A4\n:104F5000012801D01020BDE40620FFE6607801287A\n:104F60003FF4B6AC0A2050E5E178C90708D0A17D2E\n:104F7000012903D10B202870042030E028702EE096\n:104F80000E2028706078616B012818D004F15C0352\n:104F900004F16C020EA8FFF7E1FA2046FFF748FB88\n:104FA000A0780EAEC0F1100230440021F9F76FFA7C\n:104FB00006208DF82000686A09960D909BE004F1A8\n:104FC0006C0304F15C020EA8FFF7C8FAE8E7397831\n:104FD000022903D139790029D0D0297592E28DF8C0\n:104FE0002000686A0D9056E538780728F6D1D4E994\n:104FF00009216078012808D004F16C00CDE9000295\n:10500000029105D104F16C0304E004F15C00F5E7C2\n:1050100004F15C0304F14C007A680646216AFFF74C\n:1050200063F96078012822D1A078216AC0F11002CA\n:105030000B1800211846F9F72AFAD4E90923606B06\n:1050400004F12D018DE80F0004F15C0300E05BE248\n:1050500004F16C0231460EA8FFF7C8F910220EA920\n:1050600004F13C00F9F7BCF908B10B20ACE485F879\n:10507000008000BF8DF82090686A0D908DF824A004\n:1050800009E538780528A9D18DF82000686A0D90C7\n:10509000B8680A90ADF824A08DF830B080F8008090\n:1050A000617801291AD0D4E9092104F12D03A66BF6\n:1050B00003910096CDE9013204F16C0304F15C0226\n:1050C00004F14C01401CFFF791F9002108A8FFF7FB\n:1050D0008BFA6078012805D015203FE6D4E9091243\n:1050E000631DE4E70E20287006208DF82000686A12\n:1050F000CDF824B00D90A0788DF82800CBE4387856\n:105100000328C0D1E079C00770D00F202870072095\n:1051100065E7387804286BD11422391D04F1140096\n:10512000F9F78BF9616A208CA1F80900616AA0780F\n:10513000C871E179626A01F003011172616A627AF1\n:105140000A73616AA07A81F8240016205DE485F86C\n:1051500000A08DF82090696A50460D9192E0000001\n:10516000706202003878052842D1B868A861617879\n:10517000606A022901D0012100E0002101EB410118\n:10518000142606EBC1014058082102F0B0F96178FD\n:10519000606A022901D0012100E0002101EB4101F8\n:1051A00006EBC101425802A8E169FFF70BFA6078EB\n:1051B000626A022801D0012000E0002000EB4001DB\n:1051C000102000EBC1000223105802A90932FEF79B\n:1051D000EEFF626AFD4B0EA80932A169FFF7E1F903\n:1051E0006178606A022904D0012103E044E18DE086\n:1051F000BFE0002101EB4101182606EBC101A278B6\n:1052000040580EA9F9F719F96178606A022901D0AE\n:10521000012100E0002101EB410106EBC1014158F1\n:10522000A0780B18C0F1100200211846F9F72FF9E9\n:1052300005208DF82000686A0D90A8690A90ADF8E5\n:1052400024A08DF830B0062101706278616A022ACC\n:1052500001D0012200E0002202EB420206EBC20272\n:10526000401C89581022F9F7E8F8002108A8FFF738\n:10527000BBF91220C5F818B028708DF82090686A24\n:105280000D900B208DF8240005E43878052870D1A6\n:105290008DF82000686A0D90B8680A900B20ADF870\n:1052A00024000A98072101706178626A022901D0FE\n:1052B000012100E0002101EB4103102101EBC301BA\n:1052C00051580988A0F801106178626A022902D059\n:1052D000012101E02FE1002101EB4103142101EB49\n:1052E000C30151580A6840F8032F4968416059E0EA\n:1052F0001920287001208DF8300074E616202870DF\n:105300008DF830B0002108A8FFF76EF9032617E1E9\n:1053100014202870AEE6387805282AD18DF82000B0\n:10532000686A0D90B8680A90ADF824A08DF830B086\n:1053300080F800906278616A4E46022A01D001220C\n:1053400000E0002202EB42021C2303EBC202401CDD\n:1053500089581022F9F771F8002108A8FFF744F9DD\n:10536000152028708DF82060686A0D908DF82460F3\n:1053700039E680E0387805287DD18DF82000686A0C\n:105380000D90B8680A90ADF8249009210170616908\n:10539000097849084170616951F8012FC0F802206D\n:1053A0008988C18020781C28A8D1A1E7E078C007AF\n:1053B00002D04FF0060C01E04FF0070C6078022895\n:1053C0000AD000BF4FF0000000EB040101F1090119\n:1053D00005D04FF0010004E04FF00100F4E74FF07A\n:1053E00000000B78204413EA0C030B7010F8092F0F\n:1053F00002EA0C02027004D14FF01B0C84F800C0CA\n:10540000D2B394F801C0BCF1010F00D09BB990F861\n:1054100000C0E0465FEACC7C04D028F001060670AC\n:10542000102606E05FEA887C05D528F002060670A3\n:1054300013262E70032694F801C0BCF1020F00D091\n:1054400092B991F800C05FEACC7804D02CF0010644\n:105450000E70172106E05FEA8C7805D52CF0020665\n:105460000E701921217000260078D0BBCAB3C3BBCF\n:105470001C20207035E012E002E03878062841D187\n:105480001A2015E4207801283CD00C283AD0204678\n:10549000FFF7EBF809208DF82000686A0D9031E0E5\n:1054A0003878052805D00620387003261820287083\n:1054B00046E005208DF82000696A0D91B9680A91CF\n:1054C0000221ADF8241001218DF830100A990870DE\n:1054D000287D4870394608A8FFF786F80646182048\n:1054E0002870012E0ED02BE001208DF82000686A74\n:1054F0000D9003208DF82400287D8DF8250085F877\n:1055000014B012E0287D80B11D2020701720287073\n:105510008DF82090686A0D9002208DF8240039469D\n:1055200008A8FFF761F806460AE00CB1FE202070DB\n:105530009DF8200020B1002108A8FFF755F80CE4E1\n:1055400013B03046BDE8F08F2DE9F04387B00C462C\n:105550004E6900218DF804100120257803460227AA\n:105560004FF007094FF0050C85B1012D53D0022DE6\n:1055700039D1FE2030708DF80030606A059003202C\n:105580008DF80400207E8DF8050063E02179012963\n:1055900025D002292DD0032928D0042923D1B17D7B\n:1055A000022920D131780D1F042D04D30A3D032D8B\n:1055B00001D31D2917D12189022914D38DF8047034\n:1055C000237020899DF80410884201E0686202007F\n:1055D00018D208208DF80000606A059057E07078B6\n:1055E0000128EBD0052007B0BDE8F0831D20307006\n:1055F000E4E771780229F5D131780C29F3D18DF8DF\n:105600000490DDE7083402F804CB94E80B0082E84C\n:105610000B000320E7E71578052DE4D18DF800C0D5\n:10562000656A0595956802958DF8101094F80480C8\n:10563000B8F1010F13D0B8F1020F2DD0B8F1030F5C\n:105640001CD0B8F1040FCED1ADF804700E20287034\n:10565000207E687000216846FEF7C6FF0CE0ADF8BA\n:1056600004700B202870207E002100F01F0068705D\n:105670006846FEF7B9FF37700020B4E7ADF8047054\n:105680008DF8103085F800C0207E687027701146B4\n:105690006846FEF7A9FFA6E7ADF804902B70207FBF\n:1056A0006870607F00F00100A870A07F00F01F000C\n:1056B000E870E27F2A71C0071CD094F8200000F047\n:1056C0000700687194F8210000F00700A87100211C\n:1056D0006846FEF789FF2868F062A8883086A879B6\n:1056E00086F83200A069407870752879B0700D2076\n:1056F0003070C1E7A9716971E9E700B587B0042886\n:105700000CD101208DF800008DF8040000200591D7\n:105710008DF8050001466846FEF766FF07B000BD3C\n:1057200070B50C46054602F0C9F921462846BDE889\n:1057300070407823002202F017B908B10078704752\n:105740000C20704770B50C0005784FF000010CD0AC\n:1057500021702146EFF7D1FD69482178405D8842EC\n:1057600001D1032070BD022070BDEFF7C6FD0020FF\n:1057700070BD0279012A05D000220A704B78012BF6\n:1057800002D003E0042070470A758A610279930011\n:10579000521C0271C15003207047F0B587B00F460C\n:1057A00005460124287905EB800050F8046C7078D8\n:1057B000411E02290AD252493A46083901EB8000BB\n:1057C000314650F8043C2846984704460CB1012C59\n:1057D00011D12879401E10F0FF00287101D0032458\n:1057E000E0E70A208DF80000706A0590002101961C\n:1057F0006846FFF7A7FF032CD4D007B02046F0BDC2\n:1058000070B515460A46044629461046FFF7C5FFFF\n:10581000064674B12078FE280BD1207C30B10020E0\n:105820002870294604F10C00FFF7B7FF2046FEF769\n:105830001CFF304670BD704770B50E4604467C2292\n:105840000021F8F724FE0225012E03D0022E04D0F9\n:10585000052070BD0120607000E065702046FEF7F5\n:1058600004FFA575002070BD28B1027C1AB10A465C\n:1058700000F10C01C4E70120704710B5044686B062\n:10588000042002F01BF92078FE2806D000208DF8B5\n:10589000000069462046FFF7E7FF06B010BD7CB563\n:1058A0000E4600218DF804104178012903D0022909\n:1058B00003D0002405E0046900E044690CB1217CB8\n:1058C00089B16D4601462846FFF753FF032809D1E9\n:1058D000324629462046FFF793FF9DF80410002921\n:1058E00000D004207CBD04F10C05EBE730B40C467D\n:1058F0000146034A204630BC024B0C3AFEF751BE2B\n:10590000AC6202006862020070B50D46040011D05E\n:1059100085B1220100212846F8F7B9FD102250492F\n:105920002846F8F78AFD4F48012101704470456010\n:10593000002070BD012070BD70B505460024494EA1\n:1059400011E07068AA7B00EB0410817B914208D1C2\n:10595000C17BEA7B914204D10C222946F8F740FD35\n:1059600030B1641CE4B230788442EAD3002070BDC8\n:10597000641CE0B270BD70B50546FFF7DDFF00287E\n:1059800005D1384C20786178884201D3002070BD61\n:105990006168102201EB00102946F8F74EFD2078CF\n:1059A000401CC0B2207070BD2E48007870472D4951\n:1059B0000878012802D0401E08700020704770B59A\n:1059C0000D460021917014461180022802D0102843\n:1059D00015D105E0288890B10121A17010800CE05C\n:1059E000284613B1FFF7C7FF01E0FFF7A5FFA0703E\n:1059F00010F0FF0F03D0A8892080002070BD012087\n:105A000070BD0023DBE770B5054614460E0009D0D3\n:105A100000203070A878012806D003D911490A78EF\n:105A200090420AD9012070BD24B1287820702888BE\n:105A3000000A5070022008700FE064B1496810221B\n:105A400001EB001120461039F8F7F7FC2878207395\n:105A50002888000A607310203070002070BD00009C\n:105A6000BB620200900000202DE9F04190460C46F8\n:105A700007460025FE48072F00EB881607D2DFE80F\n:105A800007F00707070704040400012500E0FFDF13\n:105A900006F81470002D13D0F548803000EB880113\n:105AA00091F82700202803D006EB4000447001E065\n:105AB00081F8264006EB44022020507081F82740F0\n:105AC000BDE8F081F0B51F4614460E460546202A73\n:105AD00000D1FFDFE649E648803100EB871C0CEB84\n:105AE000440001EB8702202E07D00CEB46014078E2\n:105AF0004B784870184620210AE092F8253040780B\n:105B000082F82500F6E701460CEB4100057040786D\n:105B1000A142F8D192F82740202C03D00CEB44048A\n:105B2000637001E082F826300CEB4104202363709F\n:105B300082F82710F0BD30B50D46CE4B4419002237\n:105B4000181A72EB020100D2FFDFCB48854200DD5C\n:105B5000FFDFC9484042854200DAFFDFC548401CEC\n:105B6000844207DA002C01DB204630BDC148401CCE\n:105B7000201830BDBF48C043FAE710B5044601689D\n:105B8000407ABE4A52F82020114450B10220084405\n:105B900020F07F40EDF763F894F90810BDE810405D\n:105BA000C9E70420F3E72DE9F047B14E803696F8B7\n:105BB0002D50DFF8BC9206EB850090F8264034E0CB\n:105BC00009EB85174FF0070817F81400012806D0D5\n:105BD00004282ED005282ED0062800D0FFDF01F0A3\n:105BE00025F9014607EB4400427806EB850080F872\n:105BF000262090F82720A24202D1202280F82720D8\n:105C0000084601F01EF92A4621460120FFF72CFF25\n:105C10009B48414600EB041002682046904796F8E6\n:105C20002D5006EB850090F82640202CC8D1BDE809\n:105C3000F087022000E003208046D0E710B58C4CAE\n:105C40002021803484F8251084F8261084F8271049\n:105C5000002084F8280084F82D0084F82E10411EBE\n:105C6000A16044F8100B2074607420736073A073FB\n:105C70008449E07720750870487000217C4A103C08\n:105C800002F81100491CC9B22029F9D30120ECF710\n:105C9000D6FE0020ECF7D3FE012084F82200EDF7B9\n:105CA000FFF87948EDF711F9764CA41E207077487B\n:105CB000EDF70BF96070BDE81040ECF74DBE10B584\n:105CC000ECF76FFE6F4CA41E2078EDF717F96078A3\n:105CD000EDF714F9BDE8104001F0E0B8202070475E\n:105CE0000020ECF785BE70B5054601240E46AC4099\n:105CF0005AB1FFF7F5FF0146654800EBC500C0F853\n:105D00001015C0F81465634801E06248001D046086\n:105D100070BD2DE9F34F564C0025803404EB810A09\n:105D200089B09AF82500202821D0691E0291544993\n:105D3000009501EB0017391D03AB07C983E8070085\n:105D4000A18BADF81C10A07F8DF81E009DF81500EA\n:105D5000A046C8B10226494951F820400399A2192A\n:105D6000114421F07F41019184B102210FE0012013\n:105D7000ECF765FE0020ECF762FEECF730FE01F078\n:105D80008DF884F82F50A9E00426E4E700218DF86F\n:105D90001810022801D0012820D103980119099870\n:105DA000081A801C9DF81C1020F07F4001B10221D0\n:105DB000353181420BD203208DF815000398C4F1D0\n:105DC0003201401A20F07F40322403900CE098F812\n:105DD000240018B901F043FA002863D0322C03D212\n:105DE00014B101F04FF801E001F058F8254A10789D\n:105DF00018B393465278039B121B00219DF818405C\n:105E0000994601281AD0032818D000208DF81E00CA\n:105E1000002A04DD981A039001208DF818009DF8DF\n:105E20001C0000B1022103981B4A20F07F40039020\n:105E300003AB099801F03EF810B110E00120E5E74E\n:105E40009DF81D0018B99BF80000032829D08DF893\n:105E50001C50CDF80C908DF818408DF81E509DF810\n:105E6000180010B30398012381190022184615E089\n:105E7000840A0020FF7F841E0020A107CC6202005C\n:105E8000840800209A00002017780100A75B010019\n:105E900000F0014004F50140FFFF3F00ECF722FE57\n:105EA00006E000200BB0BDE8F08F0120ECF7C7FD45\n:105EB00097F90C20012300200199ECF713FEF87BE1\n:105EC000C00701D0ECF7F7FE012188F82F108AF8FF\n:105ED000285020226946FE48F8F7AFFA0120E1E792\n:105EE0002DE9F05FDFF8E883064608EB860090F8BE\n:105EF0002550202D1FD0A8F180002C4600EB8617DE\n:105F0000A0F50079DFF8CCB305E0A24607EB4A0024\n:105F10004478202C0AD0ECF730FE09EB04135A46E3\n:105F200001211B1D00F0C6FF0028EED0AC4202D0BC\n:105F3000334652461EE0E84808B1AFF30080ECF764\n:105F40001CFE98F82F206AB1D8F80C20411C891A41\n:105F50000902CA1701EB12610912002902DD0020B3\n:105F6000BDE8F09F3146FFF7D4FE08B10120F7E706\n:105F700033462A4620210420FFF7A4FDEFE72DE950\n:105F8000F041D34C2569ECF7F8FD401B0002C11726\n:105F900000EB1160001200D4FFDF94F8220000B182\n:105FA000FFDF012784F8227094F82E00202800D10A\n:105FB000FFDF94F82E60202084F82E00002584F85E\n:105FC0002F5084F8205084F82150C4482560007870\n:105FD000022833D0032831D000202077A068401C4D\n:105FE00005D04FF0FF30A0600120ECF728FD002025\n:105FF000ECF725FDECF721FEECF719FEECF7EFFCD2\n:106000000EF0D6FDB648056005604FF0E0214FF474\n:106010000040B846C1F88002ECF7BBFE94F82D7042\n:106020003846FFF75DFF0028FAD0A948803800EB1A\n:10603000871010F81600022802D006E00120CCE7F5\n:106040003A4631460620FFF70FFD84F8238004EB23\n:10605000870090F82600202804D0A048801E4078B1\n:10606000ECF752FF207F002803D0ECF7D6FD257710\n:10607000657725E5964910B591F82D2000248039E3\n:1060800001EB821111F814302BB1641CE4B2202C06\n:10609000F8D3202010BD934901EB041108600020C3\n:1060A000C87321460120FFF7DFFC204610BD10B564\n:1060B000012801D0032800D171B3854A92F82D3010\n:1060C000834C0022803C04EB831300BF13F8124082\n:1060D0000CB1082010BD521CD2B2202AF6D37F4A40\n:1060E00048B1022807D0072916D2DFE801F01506CB\n:1060F000080A0C0E100000210AE01B2108E03A21DA\n:1061000006E0582104E0772102E0962100E0B52165\n:1061100051701070002010BD072010BD6F4810B5E1\n:106120004078ECF79CFD80B210BD10B5202811D24C\n:10613000674991F82D30A1F1800202EB831414F825\n:1061400010303BB191F82D3002EB831212F8102081\n:10615000012A01D0002010BD91F82D200146002019\n:10616000FFF782FC012010BD10B5ECF706FDBDE87D\n:106170001040ECF774BD2DE9F0410E46544F017804\n:106180002025803F0C4607EB831303E0254603EBF5\n:1061900045046478944202D0202CF7D108E0202CEA\n:1061A00006D0A14206D103EB41014978017007E016\n:1061B000002085E403EB440003EB45014078487080\n:1061C000494F7EB127B1002140F22D40AFF300804E\n:1061D0003078A04206D127B100214FF48660AFF39A\n:1061E0000080357027B1002140F23540AFF30080C8\n:1061F000012065E410B542680B689A1A1202D417A0\n:1062000002EB1462121216D4497A91B1427A82B921\n:10621000364A006852F82110126819441044001DD3\n:10622000891C081A0002C11700EB11600012322805\n:1062300001DB012010BD002010BD2DE9F047294EE3\n:10624000814606F500709846144600EB811712E06F\n:1062500006EB0415291D4846FFF7CCFF68B988F8FE\n:106260000040A97B99F80A00814201D80020DEE4B1\n:1062700007EB44004478202CEAD10120D7E42DE933\n:10628000F047824612480E4600EB8600DFF8548045\n:1062900090F825402020107008F5007099461546AA\n:1062A00000EB86170BE000BF08EB04105146001D01\n:1062B000FFF7A0FF28B107EB44002C704478202C96\n:1062C000F2D1297889F800104B46224631460FE07A\n:1062D000040B0020FFFF3F00000000009A00002098\n:1062E00000F500408408002000000000CC6202009D\n:1062F0005046BDE8F047A0E72DE9FC410F460446B3\n:106300000025FE4E10E000BF9DF80000256806EB5A\n:1063100000108168204600F0E1FD2068A84202D10B\n:106320000020BDE8FC8101256B4601AA39462046C4\n:10633000FFF7A5FF0028E7D02846F2E770B504462E\n:10634000EF480125A54300EB841100EB85104022A6\n:10635000F8F773F8EB4E26B1002140F29D40AFF301\n:106360000080E748803000EB850100EB8400D0F826\n:106370002500C1F8250026B1002140F2A140AFF36D\n:106380000080284670BD8A4203D003460520FFF7EF\n:1063900099BB202906D0DA4A02EB801000EB4100BD\n:1063A00040787047D649803101EB800090F8250095\n:1063B0007047D24901EB0010001DFFF7DEBB7CB532\n:1063C0001D46134604460E4600F1080221461846B3\n:1063D000ECF752FC94F908000F2804DD1F382072F6\n:1063E0002068401C206096B10220C74951F8261051\n:1063F000461820686946801B20F07F40206094F991\n:1064000008002844C01C1F2803DA012009E00420EA\n:10641000EBE701AAECF730FC9DF8040010B10098FE\n:10642000401C00900099206831440844C01C20F0B2\n:106430007F4060607CBDFEB50C46064609786079F9\n:10644000907220791F461546507279B12179002249\n:106450002846A368FFF7B3FFA9492846803191F881\n:106460002E20202A0AD00969491D0DE0D4E9022313\n:10647000217903B02846BDE8F040A0E7A349497858\n:10648000052900D20521314421F07F4100F026FD8D\n:1064900039462846FFF730FFD4E9023221796846B1\n:1064A000FFF78DFF2B4600213046019A00F002FDD8\n:1064B000002806D103B031462846BDE8F04000F080\n:1064C0000DBDFEBD2DE9F14F84B000F0C3FCF0B16D\n:1064D00000270498007800284FF000006DD1884D07\n:1064E000884C82468346803524B1002140F2045016\n:1064F000AFF3008095F82D8085F823B0002624B1F5\n:10650000002140F20950AFF3008017B105E00127E8\n:10651000DFE74046FFF712FF804624B1002140F23A\n:106520001150AFF30080ECF728FB814643466A46E2\n:106530000499FFF780FF24B1002140F21750AFF318\n:10654000008095F82E0020280CD029690098401A68\n:106550000002C21700EB1260001203D5684600F07B\n:10656000BDFC01264CB1002140F22150AFF3008068\n:10657000002140F22650AFF300806B46644A0021B0\n:10658000484600F097FC98B127B941466846FFF7A6\n:10659000B3FE064326B16846FFF7EFFA0499886018\n:1065A0004FF0010A24B1002140F23A50AFF30080CD\n:1065B00095F82300002897D1504605B073E42DE9E3\n:1065C000F04F89B08B46824600F044FC4C4C80343E\n:1065D00030B39BF80000002710B1012800D0FFDF86\n:1065E000484D25B1002140F2F950AFF300804349F6\n:1065F000012001EB0A18A946CDF81C005FEA090644\n:1066000004D0002140F20160AFF30080079800F051\n:1066100018FC94F82D50002084F8230067B119E08D\n:1066200094F82E000127202800D1FFDF9BF80000FE\n:106630000028D5D0FFDFD3E72846FFF77FFE0546C9\n:1066400026B1002140F20B60AFF3008094F82300E4\n:106650000028D3D126B1002140F21560AFF30080AD\n:10666000ECF78BFA2B4602AA59460790FFF7E3FE98\n:1066700098F80F005FEA060900F001008DF813009A\n:1066800004D0002140F21F60AFF300803B462A4651\n:1066900002A9CDF800A0079800F02BFC064604EBF9\n:1066A000850090F828000090B9F1000F04D0002177\n:1066B00040F22660AFF3008000F0B8FB0790B9F11C\n:1066C000000F04D0002140F22C60AFF3008094F85A\n:1066D0002300002892D1B9F1000F04D0002140F22C\n:1066E0003460AFF300800DF1080C9CE80E00C8E99F\n:1066F0000112C8F80C30BEB30CE000008408002082\n:10670000840A002000000000CC6202009A000020F1\n:10671000FFFF3F005FEA090604D0002140F241601C\n:10672000AFF300800098B84312D094F82E002028D0\n:106730000ED126B1002140F24660AFF3008028461A\n:10674000FFF7CEFB20B99BF80000D8B3012849D051\n:10675000B9F1000F04D0002140F26360AFF3008074\n:10676000284600F05CFB01265FEA090504D0002101\n:1067700040F26C60AFF30080079800F062FB25B137\n:1067800000214FF4CE60AFF300808EB194F82D005D\n:1067900004EB800090F82600202809D025B10021C4\n:1067A00040F27760AFF30080F7484078ECF7ACFB3D\n:1067B00025B1002140F27C60AFF3008009B0304683\n:1067C000BDE8F08FFFE7B9F1000F04D0002140F2DF\n:1067D0004E60AFF3008094F82D2051460420FFF75F\n:1067E00043F9C0E7002E3FF409AF002140F25960A1\n:1067F000AFF3008002E72DE9F84FE44D814695F8AC\n:106800002D004FF00008E24C4FF0010B474624B139\n:10681000002140F28A60AFF30080584600F011FB7F\n:1068200085F8237024B1002140F28F60AFF300801F\n:1068300095F82D00FFF782FD064695F8230028B154\n:10684000002CE4D0002140F295604BE024B10021FF\n:1068500040F29960AFF30080CC48803800EB86119D\n:1068600011F81900032856D1334605EB830A4A462E\n:106870009AF82500904201D1012000E0002000900C\n:106880000AF125000021FFF776FC0146009801423D\n:1068900003D001228AF82820AF77E1B324B1002188\n:1068A00040F29E60AFF30080324649460120FFF778\n:1068B000DBF89AF828A024B1002140F2A960AFF3D8\n:1068C000008000F0B3FA834624B1002140F2AE60AC\n:1068D000AFF3008095F8230038B1002C97D0002149\n:1068E00040F2B260AFF3008091E7BAF1000F07D039\n:1068F00095F82E00202803D13046FFF7F1FAE0B1D9\n:1069000024B1002140F2C660AFF30080304600F0B1\n:1069100086FA4FF0010824B1002140F2CF60AFF3B6\n:106920000080584600F08DFA24B1002140F2D36077\n:10693000AFF300804046BDE8F88F002CF1D0002175\n:1069400040F2C160AFF30080E6E70120ECF750B8F9\n:106950008D48007870472DE9F0418C4C94F82E005A\n:1069600020281FD194F82D6004EB860797F8255056\n:10697000202D00D1FFDF8549803901EB861000EB27\n:106980004500407807F8250F0120F87084F82300AF\n:10699000294684F82E50324602202234FFF764F84C\n:1069A0000020207005E42DE9F0417A4E774C012556\n:1069B00038B1012821D0022879D003287DD0FFDF0B\n:1069C00017E400F05FFAFFF7C6FF207E00B1FFDF9B\n:1069D00084F821500020ECF732F8A168481C04D05C\n:1069E000012300221846ECF77DF814F82E0F2178C9\n:1069F00006EB01110A68012154E0FFF7ACFF01200A\n:106A0000ECF71DF894F8210050B1A068401C07D0A5\n:106A100014F82E0F217806EB01110A68062141E0D7\n:106A2000207EDFF86481002708F10208012803D0E6\n:106A300002281ED0FFDFB5E7A777ECF7EEF898F84D\n:106A40000000032801D165772577607D524951F810\n:106A5000200094F8201051B948B161680123091A47\n:106A600000221846ECF73EF8022020769AE72776B7\n:106A700098E784F8205000F005FAA07F50B198F80C\n:106A8000010061680123091A00221846ECF72AF870\n:106A9000257600E0277614F82E0F217806EB0111F9\n:106AA0000A680021BDE8F041104700E005E03648E3\n:106AB0000078BDE8F041ECF727BAFFF74CFF14F877\n:106AC0002E0F217806EB01110A680521EAE710B5BF\n:106AD0002E4C94F82E00202800D1FFDF14F82E0F42\n:106AE00021782C4A02EB01110A68BDE8104004210C\n:106AF00010477CB5254C054694F82E00202800D17F\n:106B0000FFDFA068401C00D0FFDF94F82E00214971\n:106B100001AA01EB0010694690F90C002844ECF73B\n:106B2000ABF89DF904000F2801DD012000E00020F2\n:106B3000009908446168084420F07F41A16094F8FE\n:106B40002100002807D002B00123BDE870400022D8\n:106B50001846EBF7C7BF7CBD30B5104A0B1A541C62\n:106B6000B3EB940F1ED3451AB5EB940F1AD393428F\n:106B700003D9101A43185B1C14E0954210D9511A1E\n:106B80000844401C43420DE098000020040B002004\n:106B90000000000084080020CC620200FF7F841EF9\n:106BA000FFDF0023184630BD0123002201460220EA\n:106BB000EBF798BF0220EBF742BFEBF7DEBF2DE902\n:106BC000FE4FEE4C05468A4694F82E00202800D150\n:106BD000FFDFEA4E94F82E10A0462046A6F520725C\n:106BE00002EB011420218DF8001090F82D10376968\n:106BF00000EB8101D8F8000091F82590284402AA02\n:106C000001A90C36ECF738F89DF90800002802DDE0\n:106C10000198401C0190A0680199642D084452D34A\n:106C2000D74B00225B1B72EB02014CD36168411A07\n:106C300021F07F41B1F5800F45D220F07F40706098\n:106C400086F80AA098F82D1044466B464A4630460E\n:106C5000FFF7F3FAB0B3A068401C10D0EBF78DFF3C\n:106C6000A168081A0002C11700EB11600012022887\n:106C70002BDD0120EBF7E3FE4FF0FF30A06094F82E\n:106C80002D009DF8002020210F34FFF77CFBA17F11\n:106C9000BA4A803A02EB8111E27F01EB420148706F\n:106CA00054F80F0C284444F80F0C012020759DF86F\n:106CB0000000202803D0B3484078ECF725F90120E4\n:106CC000BDE8FE8F01E00020FAE77760FBE72DE9E1\n:106CD000F047AA4C074694F82D00A4F1800606EB75\n:106CE000801010F8170000B9FFDF94F82D50A0466F\n:106CF000A54C24B1002140F6EA00AFF3008040F635\n:106D0000F60940F6FF0A06EB851600BF16F81700D5\n:106D1000012819D0042811D005280FD006280DD03D\n:106D20001CB100214846AFF300800FF02DF8002C75\n:106D3000ECD000215046AFF30080E7E72A46394601\n:106D40000120FEF791FEF2E74FF0010A4FF0000933\n:106D5000454624B1002140F60610AFF300805046AE\n:106D600000F06FF885F8239024B1002140F60B1055\n:106D7000AFF3008095F82D00FFF7E0FA064695F88E\n:106D8000230028B1002CE4D0002140F611101FE0B0\n:106D900024B1002140F61510AFF3008005EB86000A\n:106DA00000F1270133463A462630FFF7E4F924B1D3\n:106DB000002140F61910AFF3008000F037F882464A\n:106DC00095F8230038B1002CC3D0002140F61F10E5\n:106DD000AFF30080BDE785F82D60012085F8230022\n:106DE000504600F02EF8002C04D0002140F62C1064\n:106DF000AFF30080BDE8F08730B504465F480D462C\n:106E000090F82D005D49803901EB801010F81400D6\n:106E100000B9FFDF5D4800EB0410C57330BD574972\n:106E200081F82D00012081F82300704710B55848E3\n:106E300008B1AFF30080EFF3108000F0010072B6EC\n:106E400010BD10B5002804D1524808B1AFF300803E\n:106E500062B610BD50480068C005C00D10D0103893\n:106E600040B2002804DB00F1E02090F8000405E0C7\n:106E700000F00F0000F1E02090F8140D4009704779\n:106E80000820704710B53D4C94F82400002804D128\n:106E9000F4F712FF012084F8240010BD10B5374C20\n:106EA00094F82400002804D0F4F72FFF002084F881\n:106EB000240010BD10B51C685B68241A181A24F051\n:106EC0007F4420F07F40A14206D8B4F5800F03D262\n:106ED000904201D8012010BD002010BDD0E9003241\n:106EE000D21A21F07F43114421F07F41C0E90031E3\n:106EF00070472DE9FC418446204815468038089C9F\n:106F000000EB85160F4616F81400012804D002285D\n:106F100002D00020BDE8FC810B46204A01216046DA\n:106F2000FFF7C8FFF0B101AB6A4629463846FFF7C4\n:106F3000A6F9B8B19DF804209DF800102846FFF787\n:106F400022FA06EB440148709DF8000020280DD07D\n:106F500006EB400044702A4621460320FEF784FDDC\n:106F60000120D7E72A4621460420F7E703480121FC\n:106F700000EB850000F8254FC170ECE7040B002002\n:106F8000FF1FA107980000200000000084080020D7\n:106F9000000000000000000004ED00E0FFFF3F00E3\n:106FA0002DE9F041044680074FF000054FF001063F\n:106FB0000CD56B480560066000F0E8F920B169481F\n:106FC000016841F48061016024F00204E0044FF0A4\n:106FD000FF3705D564484660C0F8087324F4805430\n:106FE000600003D56148056024F08044E0050FD5BA\n:106FF0005F48C0F80052C0F808735E490D60091D73\n:107000000D605C4A04210C321160066124F4807426\n:10701000A00409D558484660C0F80052C0F808736B\n:107020005648056024F40054C4F38030C4F3C031E2\n:10703000884200D0FFDF14F4404F14D0504846601F\n:10704000C0F808734F488660C0F80052C0F8087353\n:107050004D490D600A1D16608660C0F808730D600A\n:10706000166024F4404420050AD5484846608660EE\n:10707000C0F80873C0F848734548056024F40064FC\n:107080000DF070FD4348044200D0FFDFBDE8F08101\n:10709000F0B50022202501234FEA020420FA02F174\n:1070A000C9072DD051B2002910DB00BF4FEA51179C\n:1070B0004FEA870701F01F0607F1E02703FA06F6FB\n:1070C000C7F88061BFF34F8FBFF36F8F0CDB00BF3A\n:1070D0004FEA51174FEA870701F01F0607F1E02733\n:1070E00003FA06F6C7F8806204DB01F1E02181F8BB\n:1070F000004405E001F00F0101F1E02181F8144D99\n:1071000002F10102AA42C9D3F0BD10B5224C2060A1\n:107110000846F4F7EAFE2068FFF742FF2068FFF711\n:10712000B7FF0DF045F900F092F90DF01BFD0DF0E1\n:1071300058FCEBF7B5FEBDE810400DF0EDB910B509\n:10714000154C2068FFF72CFF2068FFF7A1FF0DF01A\n:1071500009FDF4F7C9FF0020206010BD0A20704728\n:10716000FC1F00403C17004000C0004004E5014007\n:10717000008000400485004000D0004004D500405D\n:1071800000E0004000F0004000F5004000B000408A\n:1071900008B50040FEFF0FFD9C00002070B5264999\n:1071A0000A680AB30022154601244B685B1C4B6039\n:1071B0000C2B00D34D600E7904FA06F30E681E42C4\n:1071C0000FD0EFF3108212F0010272B600D001224C\n:1071D0000C689C430C6002B962B6496801600020EB\n:1071E00070BD521C0C2AE0D3052070BD4FF0E02189\n:1071F0004FF48000C1F800027047EFF3108111F0E6\n:10720000010F72B64FF0010202FA00F20A48036859\n:1072100042EA0302026000D162B6E7E706480021B5\n:1072200001604160704701218140034800680840C7\n:1072300000D0012070470000A0000020012081073D\n:10724000086070470121880741600021C0F80011E3\n:1072500018480170704717490120087070474FF0B7\n:107260008040D0F80001012803D01248007800289F\n:1072700000D00120704710480068C00700D00120EE\n:1072800070470D480C300068C00700D001207047DF\n:107290000948143000687047074910310A68D20362\n:1072A00006D5096801F00301814201D10120704730\n:1072B00000207047A8000020080400404FF08050D4\n:1072C000D0F830010A2801D0002070470120704713\n:1072D00000B5FFF7F3FF20B14FF08050D0F8340134\n:1072E00008B1002000BD012000BD4FF08050D0F853\n:1072F00030010E2801D000207047012070474FF068\n:107300008050D0F83001062803D0401C01D0002066\n:107310007047012070474FF08050D0F830010D28A1\n:1073200001D000207047012070474FF08050D0F806\n:107330003001082801D000207047012070474FF02D\n:107340008050D0F83001102801D000207047012073\n:10735000704700B5FFF7F3FF30B9FFF7DCFF18B94E\n:10736000FFF7E3FF002800D0012000BD00B5FFF7C4\n:10737000C6FF38B14FF08050D0F83401062803D34F\n:10738000401C01D0002000BD012000BD00B5FFF76A\n:10739000B6FF48B14FF08050D0F83401062803D32F\n:1073A000401C01D0012000BD002000BD0021017063\n:1073B000084670470146002008707047EFF31081BF\n:1073C00001F0010172B60278012A01D0012200E029\n:1073D00000220123037001B962B60AB10020704790\n:1073E0004FF400507047E9E7EFF3108111F0010FFF\n:1073F00072B64FF00002027000D162B600207047F2\n:10740000F2E700002DE9F04115460E46044600273C\n:1074100000F0EBF8A84215D3002341200FE000BF95\n:1074200094F84220A25CF25494F84210491CB1FB3B\n:10743000F0F200FB12115B1C84F84210DBB2AB428D\n:10744000EED3012700F0DDF83846BDE8F08172493F\n:1074500010B5802081F800047049002081F84200B6\n:1074600081F84100433181F8420081F84100433105\n:1074700081F8420081F841006948FFF797FF6848AA\n:10748000401CFFF793FFEBF793FCBDE8104000F0C2\n:10749000B8B840207047614800F0A7B80A460146D6\n:1074A0005E48AFE7402070475C48433000F09DB82D\n:1074B0000A46014659484330A4E7402101700020A4\n:1074C000704710B504465548863000F08EF820709D\n:1074D000002010BD0A460146504810B58630FFF71F\n:1074E00091FF08B1002010BD42F2070010BD70B539\n:1074F0000C460646412900D9FFDF4A48006810388B\n:1075000040B200F054F8C5B20D2000F050F8C0B2FF\n:10751000854201D3012504E0002502E00DB1EBF71F\n:107520008AFC224631463D48FFF76CFF0028F5D023\n:1075300070BD2DE9F0413A4F0025064617F10407CA\n:1075400057F82540204600F041F810B36D1CEDB20D\n:10755000032DF5D33148433000F038F8002825D00A\n:107560002E4800F033F8002820D02C48863000F058\n:107570002DF800281AD0EBF734FC2948FFF71EFF3E\n:10758000B0F5005F00D0FFDFBDE8F0412448FFF711\n:107590002BBF94F841004121265414F8410F401CA0\n:1075A000B0FBF1F201FB12002070D3E74DE7002899\n:1075B00004DB00F1E02090F8000405E000F00F008B\n:1075C00000F1E02090F8140D4009704710F8411FB9\n:1075D0004122491CB1FBF2F302FB131140788142B6\n:1075E00001D1012070470020704710F8411F4078FA\n:1075F000814201D3081A02E0C0F141000844C0B240\n:10760000704710B50648FFF7D9FE002803D1BDE842\n:107610001040EBF7D1BB10BD0DE000E0340B0020B3\n:10762000AC00002004ED00E070B5154D2878401C3A\n:10763000C4B26878844202D000F0DBFA2C7070BDCE\n:107640002DE9F0410E4C4FF0E02600BF00F0C6FAE5\n:107650000EF09AFB40BF20BF677820786070D6F8A4\n:107660000052E9F798FE854305D1D6F8040210B917\n:107670002078B842EAD000F0ACFA0020BDE8F081F2\n:10768000BC0000202DE9F04101264FF0E02231033B\n:107690004FF000084046C2F88011BFF34F8FBFF390\n:1076A0006F8F204CC4F800010C2000F02EF81E4D06\n:1076B0002868C04340F30017286840F01000286095\n:1076C000C4F8046326607F1C02E000BF0EF05CFB80\n:1076D000D4F800010028F9D01FB9286820F0100064\n:1076E0002860124805686660C4F80863C4F8008121\n:1076F0000C2000F00AF82846BDE8F08110B50446D9\n:10770000FFF7C0FF2060002010BD002809DB00F05B\n:107710001F02012191404009800000F1E020C0F8E3\n:107720008012704700C0004010ED00E008C5004026\n:107730002DE9F047FF4C0646FF21A06800EB06123A\n:1077400011702178FF2910D04FF0080909EB0111C1\n:1077500009EB06174158C05900F0F4F9002807DD7D\n:10776000A168207801EB061108702670BDE8F0874B\n:1077700094F8008045460DE0A06809EB05114158DA\n:10778000C05900F0DFF9002806DCA068A84600EB2D\n:1077900008100578FF2DEFD1A06800EB061100EB73\n:1077A00008100D700670E1E7F0B5E24B04460020CA\n:1077B00001259A680C269B780CE000BF05EB0017AA\n:1077C000D75DA74204D106EB0017D7598F4204D0EA\n:1077D000401CC0B28342F1D8FF20F0BD70B5FFF766\n:1077E000ECF9D44C08252278A16805EB02128958DF\n:1077F00000F0A8F9012808DD2178A06805EB011147\n:107800004058BDE87040FFF7CFB9FFF7A1F8BDE8D9\n:107810007040EBF779BB2DE9F041C64C2578FFF7B6\n:10782000CCF9FF2D6ED04FF00808A26808EB0516C2\n:10783000915900F087F90228A06801DD80595DE0C8\n:1078400000EB051109782170022101EB0511425C62\n:107850005AB1521E4254815901F5800121F07F41F5\n:1078600081512846FFF764FF34E00423012203EB33\n:10787000051302EB051250F803C0875CBCF1000F42\n:1078800010D0BCF5007F10D9CCF3080250F806C028\n:107890000CEB423C2CF07F4C40F806C0C3589A1ABF\n:1078A000520A09E0FF2181540AE0825902EB4C326E\n:1078B00022F07F428251002242542846FFF738FFCF\n:1078C0000C21A06801EB05114158E06850F8272011\n:1078D000384690472078FF2814D0FFF76EF92278B9\n:1078E000A16808EB02124546895800F02BF90128DF\n:1078F00093DD2178A06805EB01114058BDE8F04107\n:10790000FFF752B9BDE8F081F0B51D4614460E46AA\n:107910000746FF2B00D3FFDFA00700D0FFDF85481D\n:10792000FF210022C0E90247C57006710170427054\n:1079300082701046012204E002EB0013401CE15467\n:10794000C0B2A842F8D3F0BD70B57A4C064665784F\n:107950002079854200D3FFDFE06840F82560607839\n:10796000401C6070284670BD2DE9FF5F1D468B46A8\n:107970000746FF24FFF721F9DFF8B891064699F88A\n:107980000100B84200D8FFDF00214FF001084FF09E\n:107990000C0A99F80220D9F808000EE008EB011350\n:1079A000C35CFF2B0ED0BB4205D10AEB011350F88C\n:1079B00003C0DC450CD0491CC9B28A42EED8FF2C6A\n:1079C00002D00DE00C46F6E799F803108A4203D185\n:1079D000FF2004B0BDE8F09F1446521C89F8022035\n:1079E00008EB04110AEB0412475440F802B00421DA\n:1079F000029B0022012B01EB04110CD040F8012066\n:107A00004FF4007808234FF0020C454513D9E905DF\n:107A1000C90D02D002E04550F2E7414606EB413283\n:107A200003EB041322F07F42C250691A0CEB0412DC\n:107A3000490A81540BE005B9012506EB453103EBFA\n:107A4000041321F07F41C1500CEB0411425499F80A\n:107A500000502046FFF76CFE99F80000A84201D0C4\n:107A6000FFF7BCFE3846B4E770B50C460546FFF795\n:107A7000A4F8064621462846FFF796FE0446FF284E\n:107A80001AD02C4D082101EB0411A868415830464A\n:107A900000F058F800F58050C11700EBD1404013BA\n:107AA0000221AA6801EB0411515C09B100EB4120ED\n:107AB000002800DC012070BD002070BD2DE9F047DA\n:107AC00088468146FFF770FE0746FF281BD0194DF8\n:107AD0002E78A8683146344605E0BC4206D02646DA\n:107AE00000EB06121478FF2CF7D10CE0FF2C0AD023\n:107AF000A6420CD100EB011000782870FF2804D0BA\n:107B0000FFF76CFE03E0002030E6FFF753F8414634\n:107B10004846FFF7A9FF0123A968024603EB0413B7\n:107B2000FF20C854A878401EB84200D1A87001EBCD\n:107B3000041001E0000C002001EB06110078087031\n:107B4000104613E6081A0002C11700EB116000127C\n:107B50007047000010B5202000F07FF8202000F0D2\n:107B60008DF84D49202081F80004E9F712FC4B49BB\n:107B700008604B48D0F8041341F00101C0F8041329\n:107B8000D0F8041341F08071C0F804134249012079\n:107B90001C39C1F8000110BD10B5202000F05DF8BF\n:107BA0003E480021C8380160001D01603D4A481E62\n:107BB00010603B4AC2F80803384B1960C2F8000154\n:107BC000C2F8600138490860BDE81040202000F08C\n:107BD00055B834493548091F086070473149334862\n:107BE000086070472D48C8380160001D521E0260B1\n:107BF00070472C4901200860BFF34F8F70472DE973\n:107C0000F0412849D0F8188028480860244CD4F85E\n:107C100000010025244E6F1E28B14046E9F712FBF3\n:107C200040B9002111E0D4F8600198B14046E9F76D\n:107C300009FB48B1C4F80051C4F860513760BDE891\n:107C4000F041202000F01AB831684046BDE8F0410C\n:107C50000EF0A4B8FFDFBDE8F08100280DDB00F0D6\n:107C60001F02012191404009800000F1E020C0F88E\n:107C70008011BFF34F8FBFF36F8F7047002809DB70\n:107C800000F01F02012191404009800000F1E02036\n:107C9000C0F880127047000020E000E0C8060240F3\n:107CA00000000240180502400004024001000001EB\n:107CB0005E4800210170417010218170704770B5DD\n:107CC000054616460C460220EAF714FE57490120E5\n:107CD00008705749F01E086056480560001F046090\n:107CE00070BD10B50220EAF705FE5049012008706A\n:107CF00051480021C0F80011C0F80411C0F8081163\n:107D00004E494FF40000086010BD48480178D9B1D1\n:107D10004B4A4FF4000111604749D1F8003100226D\n:107D2000002B1CBFD1F80431002B02D0D1F8081170\n:107D300019B142704FF0100104E04FF001014170A1\n:107D400040490968817002704FF00000EAF7D2BD27\n:107D500010B50220EAF7CEFD34480122002102705E\n:107D60003548C0F80011C0F80411C0F808110260CD\n:107D700010BD2E480178002904BF407870472E4876\n:107D8000D0F80011002904BF02207047D0F800117C\n:107D900000291CBFD0F80411002905D0D0F8080133\n:107DA000002804BF01207047002070471F4800B51D\n:107DB0000278214B4078C821491EC9B282B1D3F85C\n:107DC00000C1BCF1000F10D0D3F8000100281CBF87\n:107DD000D3F8040100280BD0D3F8080150B107E014\n:107DE000022802D0012805D002E00029E4D1FFDFFB\n:107DF000002000BD012000BD0C480178002904BF0F\n:107E0000807870470C48D0F8001100291CBFD0F8CA\n:107E10000411002902D0D0F8080110B14FF0100071\n:107E2000704708480068C0B270470000BE000020DC\n:107E300010F5004008F5004000F0004004F5014056\n:107E400008F5014000F400405748002101704170DE\n:107E5000704770B5064614460D460120EAF74AFD04\n:107E600052480660001D0460001D05605049002056\n:107E7000C1F850014F490320086050494E4808603E\n:107E8000091D4F48086070BD2DE9F0410546464880\n:107E90000C46012606704B4945EA024040F08070CE\n:107EA0000860FFF72CFA002804BF47480460002749\n:107EB000464CC4F80471474945480860002D02BF8C\n:107EC000C4F800622660BDE8F081012D18BFFFDF15\n:107ED000C4F80072266041493F480860BDE8F0815F\n:107EE0003148017871B13B4A394911603749D1F8BD\n:107EF00004210021002A08BF417002D0384A1268CC\n:107F0000427001700020EAF7F5BC2748017800298B\n:107F100004BF407870472D48D0F80401002808BFFE\n:107F200070472F480068C0B27047002808BF7047EC\n:107F30002DE9F0471C480078002808BFFFDF234CDC\n:107F4000D4F80401002818BFBDE8F0874FF00209FB\n:107F5000C4F80493234F3868C0F30018386840F021\n:107F600010003860D4F80401002804BF4FF4004525\n:107F70004FF0E02608D100BFC6F880520DF004FF94\n:107F8000D4F804010028F7D0B8F1000F03D1386805\n:107F900020F010003860C4F80893BDE8F0870B4962\n:107FA0000120886070470000C100002008F50040F3\n:107FB000001000401CF500405011004098F50140B1\n:107FC0000CF0004004F5004018F5004000F00040BF\n:107FD0000000020308F501400000020204F5014020\n:107FE00000F4004010ED00E0012804BF41F6A47049\n:107FF0007047022804BF41F288307047042804BF4C\n:1080000046F218007047082804BF47F2A0307047B6\n:1080100000B5FFDF41F6A47000BD10B5FE48002496\n:1080200001214470047044728472C17280F825404A\n:10803000C462846380F83C4080F83D40FF2180F8B2\n:108040003E105F2180F83F1018300DF09FFFF3497C\n:10805000601E0860091D0860091D0C60091D08608C\n:10806000091D0C60091D0860091D0860091D0860D4\n:10807000091D0860091D0860091D0860091D0860C8\n:10808000091D0860091D086010BDE549486070477A\n:10809000E448016801F00F01032904BF0120704783\n:1080A000016801F00F01042904BF02207047016834\n:1080B00001F00F01052904D0006800F00F00062828\n:1080C00007D1D948006810F0060F0CBF0820042023\n:1080D000704700B5FFDF012000BD012812BF022854\n:1080E00000207047042812BF08284FF4C87070475A\n:1080F00000B5FFDF002000BD012804BF2820704725\n:10810000022804BF18207047042812BF08284FF423\n:10811000A870704700B5FFDF282000BD70B5C148CA\n:10812000016801F00F01032908BF012414D0016880\n:1081300001F00F01042904BF022418210DD00168A9\n:1081400001F00F0105294BD0006800F00F00062850\n:108150001CBFFFDF012443D02821AF48C26A806AD8\n:10816000101A0E18082C04BF4EF6981547F2A030CE\n:108170002DD02046042C08BF4EF628350BD0012800\n:1081800008BF41F6A47506D0022C1ABFFFDF41F6E6\n:10819000A47541F28835012C08BF41F6A47016D0B1\n:1081A000022C08BF002005D0042C1ABFFFDF0020DE\n:1081B0004FF4C8702D1A022C08BF41F2883006D047\n:1081C000042C1ABFFFDF41F6A47046F21800281AEB\n:1081D0004FF47A7100F2E730B0FBF1F0304470BD3B\n:1081E0009148006810F0060F0CBF082404244FF4D7\n:1081F000A871B2E710B58D49026801F118040A634D\n:1082000042684A63007A81F83800207E48B1207FB6\n:10821000F6F781F9A07E011C18BF0121207FF6F737\n:1082200069F9607E002808BF10BD607FF6F773F91A\n:10823000E07E011C18BF0121607FBDE81040F6F709\n:1082400059B930B50024054601290AD0022908BFD2\n:108250004FF0807405D0042916BF08294FF0C74499\n:10826000FFDF44F4847040F480107149086045F4E5\n:10827000403001F1040140F00070086030BD30B5BD\n:108280000024054601290AD0022908BF4FF0807456\n:1082900005D0042916BF08294FF0C744FFDF44F476\n:1082A000847040F480106249086045F4403001F168\n:1082B000040140F0007008605E48D0F8000100281A\n:1082C00018BFFFDF30BD2DE9F04102274FF0E02855\n:1082D00001250024C8F88071BFF34F8FBFF36F8F63\n:1082E000554804600560FFF751F8544E18B13068E6\n:1082F00040F480603060FFF702F838B1306820F059\n:10830000690040F0960040F0004030604D494C4814\n:1083100008604FF01020806CB0F1FF3F04D04A4954\n:108320000A6860F317420A60484940F25B600860DF\n:10833000091F40F203100860081F05603949032037\n:10834000086043480560444A42491160444A434931\n:108350001160121F43491160016821F440710160EE\n:10836000016841F480710160C8F8807231491020C1\n:10837000C1F80403284880F83140C46228484068A6\n:10838000002808BFBDE8F081BDE8F0410047274A5A\n:108390000368C2F81A308088D08302F11800017295\n:1083A00070471D4B10B51A7A8A4208D10146062241\n:1083B000981CF6F715F8002804BF012010BD002016\n:1083C00010BD154890F825007047134A5170107081\n:1083D0007047F0B50546800000F1804000F5805000\n:1083E0008B88C0F820360B78D1F8011043EA0121C0\n:1083F000C0F8001605F10800012707FA00F61A4C2C\n:10840000002A04BF2068B04304D0012A18BFFFDF50\n:1084100020683043206029E0280C0020000E004036\n:10842000C40000201015004014140040100C00205F\n:108430001415004000100040FC1F00403C17004095\n:108440002C000089781700408C150040381500403A\n:108450005016004000000E0408F501404080004026\n:10846000A4F501401011004040160040206807FAB2\n:1084700005F108432060F0BD0CF0C4BCFE4890F844\n:1084800032007047FD4AC17811600068FC49000263\n:1084900008607047252808BF02210ED0262808BF93\n:1084A0001A210AD0272808BF502106D00A2894BFD5\n:1084B0000422062202EB4001C9B2F24A1160F249DD\n:1084C000086070472DE9F047EB4CA17A012956D09E\n:1084D000022918BFBDE8F087627E002A08BFBDE808\n:1084E000F087012950D0E17E667F0D1C18BF012561\n:1084F0005FF02401DFF894934FF00108C9F84C8035\n:10850000DFF88CA34718DAF80000B84228BFFFDF75\n:108510000020C9F84C01CAF80070300285F0010152\n:1085200040EA015040F0031194F82000820002F16B\n:10853000804202F5C042C2F81015D64901EB800115\n:10854000A07FC20002F1804202F5F832C2F8141591\n:10855000D14BC2F81035E27FD30003F1804303F51D\n:10856000F833C3F81415CD49C3F8101508FA00F014\n:1085700008FA02F10843CA490860BDE8F087227E84\n:10858000002AAED1BDE8F087A17E267F002914BF66\n:10859000012500251121ADE72DE9F041C14E8046AE\n:1085A00003200D46C6F80002BD49BF4808602846B2\n:1085B0000CF02CFCB04F0124B8F1000F04BFBC72CA\n:1085C000346026D0B8F1010F23D1B848006860B9F3\n:1085D00015F00C0F09D0C6F80443012000F0DAFEB4\n:1085E000F463346487F83C4002E0002000F0D2FEDF\n:1085F00028460CF0F3FC0220B872FEF7B7FE38B93B\n:10860000FEF7C4FE20B9AA48016841F4C021016008\n:1086100074609E48C4649E4800682946BDE8F041E5\n:1086200050E72DE9F0479F4E814603200D46C6F8DE\n:108630000002DFF86C829C48C8F8000008460CF085\n:10864000E5FB28460CF0CAFC01248B4FB9F1000F62\n:1086500003D0B9F1010F0AD031E0BC72B86B40F41D\n:108660008010B8634FF48010C8F8000027E00220A3\n:10867000B872B86B40F40010B8634FF40010C8F83B\n:1086800000008A48006860B915F00C0F09D0C6F8E0\n:108690000443012000F07EFEF463346487F83C401C\n:1086A00002E0002000F076FEFEF760FE38B9FEF72B\n:1086B0006DFE20B97E48016841F4C0210160EAF7EF\n:1086C000F7FA2946BDE8F047FCE62DE9F84F754C6E\n:1086D0008246032088461746C4F80002DFF8C0919E\n:1086E0007148C9F8000010460CF090FBDFF8C4B1E7\n:1086F000614E0125BAF1000F04BFCBF80040B572FE\n:1087000004D0BAF1010F18BFFFDF2FD06A48C0F8BC\n:1087100000806B4969480860B06B40F40020B0638A\n:10872000D4F800321021C4F808130020C4F8000265\n:10873000DFF890C18A03CCF80020C4F80001C4F827\n:108740000C01C4F81001C4F80401C4F81401C4F801\n:1087500018015D4800680090C4F80032C9F8002094\n:10876000C4F80413BAF1010F14D026E038460CF017\n:1087700035FCFEF7FBFD38B9FEF708FE20B94C4882\n:10878000016841F4C02101605048CBF8000002208C\n:10879000B072BBE74548006860B917F00C0F09D00C\n:1087A000C4F80453012000F0F5FDE563256486F864\n:1087B0003C5002E0002000F0EDFD4FF40020C9F82D\n:1087C00000003248C56432480068404528BFFFDFDA\n:1087D00039464046BDE8F84F74E62DE9F041264C95\n:1087E0000646002594F8310017468846002808BF41\n:1087F000FFDF16B1012E16D021E094F831000128D8\n:1088000008D094F83020394640460CF014FBE16A59\n:10881000451814E094F830103A4640460CF049FBF5\n:10882000E16A45180BE094F8310094F83010012803\n:108830003A46404609D00CF064FBE16A45183A46D6\n:1088400029463046BDE8F0413FE70CF014FBE16AF1\n:108850004518F4E72DE9F84F124CD4F8000220F047\n:108860000309D4F804034FF0100AC0F30018C4F849\n:1088700008A300262CE00000280C0020241500404E\n:108880001C150040081500405415004000800040B1\n:108890004C850040006000404C81004010110040B9\n:1088A00004F5014000100040000004048817004057\n:1088B00068150040ACF50140488500404881004003\n:1088C000A8F5014008F501401811004004100040CF\n:1088D000C4F80062FC48FB490160FC4D0127A97AFD\n:1088E000012902D0022903D015E0297E11B912E036\n:1088F000697E81B1A97FEA7F07FA01F107FA02F2E6\n:108900001143016095F82000800000F1804000F5DF\n:10891000C040C0F81065FF208DF80000C4F8106159\n:10892000276104E09DF80000401E8DF800009DF8CE\n:10893000000018B1D4F810010028F3D09DF8000011\n:10894000002808BFFFDFC4F81061002000F022FDFE\n:108950006E72AE72EF72C4F80092B8F1000F18BFD9\n:10896000C4F804A3BDE8F88FFF2008B58DF8000017\n:10897000D7480021C0F810110121016105E000BFB6\n:108980009DF80010491E8DF800109DF8001019B1D7\n:10899000D0F810110029F3D09DF80000002808BF7E\n:1089A000FFDF08BD0068CB4920F07F4008607047BA\n:1089B0004FF0E0200221C0F8801100F5C070BFF335\n:1089C0004F8FBFF36F8FC0F80011704710B490E85D\n:1089D0001C10C14981E81C10D0E90420C1E9042021\n:1089E00010BC70474FF0E0210220C1F80001704731\n:1089F000BA4908707047BA490860704770B50546B3\n:108A0000EAF756F9B14C2844E16A884298BFFFDF83\n:108A100001202074EAF74CF9B24A28440021606131\n:108A2000C2F84411B0490860A06BB04940F480001E\n:108A3000A063D001086070BD70B5A44C0546AC4A77\n:108A40000220207410680E4600F00F00032808BFB3\n:108A5000012213D0106800F00F00042808BF022282\n:108A60000CD0106800F00F0005281BD0106800F033\n:108A70000F0006281CBFFFDF012213D094F831003D\n:108A800094F83010012815D028460CF081FA954949\n:108A900060610020C1F844016169E06A08449249BC\n:108AA000086070BD9348006810F0060F0CBF0822E4\n:108AB0000422E3E7334628460CF038FAE7E7824918\n:108AC0004FF4800008608148816B21F4800181634C\n:108AD000002101747047C20002F1804202F5F832B1\n:108AE000854BC2F81035C2F81415012181407F482A\n:108AF00001607648826B1143816370477948012198\n:108B00004160C1600021C0F84411774801606F489E\n:108B1000C1627047794908606D48D0F8001241F091\n:108B20004001C0F8001270476948D0F8001221F0E7\n:108B30004001C0F800127149002008607047644885\n:108B4000D0F8001221F01001C0F80012012181615B\n:108B500070475E49FF2081F83E005D480021C0F863\n:108B60001C11D0F8001241F01001C0F8001270473B\n:108B7000574981B0D1F81C21012A0DD0534991F8F1\n:108B80003E10FF290DBF00204942017001B008BF0F\n:108B90007047012001B07047594A126802F07F0205\n:108BA000524202700020C1F81C0156480068009033\n:108BB000EFE7F0B517460C00064608BFFFDF434D50\n:108BC00014F0010F2F731CBF012CFFDF002E0CBF10\n:108BD000012002206872EC7201281CBF0228FFDF0E\n:108BE000F0BD3A4981F83F007047384A136C036082\n:108BF000506C086070472DE9F84F38480078042819\n:108C000028BFFFDF314CDFF8C080314D94F83C00C5\n:108C100000260127E0B1D5F8040110F1000918BFC2\n:108C20004FF00109D5F81001002818BF012050EAC3\n:108C300009014FF4002B17D08021C5F80813C8F89C\n:108C400000B084F83C6090F0010F18BFBDE8F88FC9\n:108C5000DFF89090D9F84C01002871D0A07A012853\n:108C60006FD002286ED0D1E0D5F80001DFF890A0D7\n:108C700030B3C5F800616F61FF20009002E0401E34\n:108C8000009005D0D5F81C0100280098F7D000B955\n:108C9000FFDFDAF8000000F07F0A94F83F0050454B\n:108CA0003CBF002000F076FB84F83EA0C5F81C61B4\n:108CB000C5F808731348006800902F64AF6326E07E\n:108CC00022E0000000000E0408F50140280C0020FE\n:108CD000001000403C150040100C0020C400002093\n:108CE00004150040008000404485004004F5014028\n:108CF000101500401414004004110040601500409D\n:108D0000481500401C110040B9F1000F03D0B9F123\n:108D1000000F2ED05CE0DAF8000000F07F0084F84D\n:108D20003E00C5F81C6194F83D1061B194F83F1005\n:108D300081421BD2002000F02DFB2F64AF6315E0B1\n:108D400064E04CE04EE0FE49096894F83F308AB296\n:108D5000090C984203D30F2A06D9022904D2012014\n:108D600000F018FB2F6401E02F64AF63F548006842\n:108D700000908022C5F80423F3498F64F348036808\n:108D8000A0F1040CDCF800C043F698273B4463458F\n:108D900015D2026842F210731A440260C1F84861A9\n:108DA000EC49EB480860091FEB480860EB48C0F845\n:108DB00000B0A06B40F40020A063BDE8F88F06600F\n:108DC000C1F84861C5F80823C8F800B0C1F8486187\n:108DD0008020C5F80803C8F800B0BDE8F88F207EF1\n:108DE00010B913E0607E88B1A07FE17F07FA00F040\n:108DF00007FA01F10843C8F8000094F82000800049\n:108E000000F1804000F5C040C0F81065C9F84C7012\n:108E1000D34800682064D34800686064D248A16BDE\n:108E20000160A663217C002019B1D9F84411012901\n:108E300000D00021A27A012A6ED0022A74D000BF8D\n:108E4000D5F8101101290CBF1021002141EA0008BA\n:108E5000C648016811F0FF0F03D0D5F8141101299D\n:108E600000D0002184F83210006810F0FF0F03D00A\n:108E7000D5F81801012800D0002084F83300BC4840\n:108E8000006884F83400FEF774FF012818BF002042\n:108E900084F83500C5F80061C5F80C61C5F81061AB\n:108EA000C5F80461C5F81461C5F81861B1480068D7\n:108EB0000090A548C0F84461AF480068DFF8BC9254\n:108EC0000090D9F80000A062A9F104000068E062F7\n:108ED000AB48016801F00F01032908BF012013D03E\n:108EE000016801F00F01042908BF02200CD00168BD\n:108EF00001F00F01052926D0006800F00F000628B8\n:108F00001CBFFFDF01201ED084F83000A07A84F857\n:108F1000310002282CD11EE0D5F80C01012814BF25\n:108F2000002008208CE7FFE7D5F80C01012814BFCA\n:108F300000200220934A1268012A14BF0422002252\n:108F4000104308437CE79048006810F0060F0CBF00\n:108F500008200420D8E7607850B18C490968097866\n:108F60000840217831EA000008BF84F8247001D05D\n:108F700084F82460DFF818A218F0020F06D0E9F791\n:108F800097FEA16A081ADAF81010884718F0010F46\n:108F900018BF4FF0000B0DD0E9F78AFEE16ADAF84E\n:108FA0001420081A594690477A48007810F0010FAB\n:108FB0002FD10CE018F0020F18BF4FF0010BEBD1CE\n:108FC00018F0080F18BF4FF0020BE5D1ECE7DFF8FF\n:108FD000BCB1DBF80000007800F00F00072828BFC4\n:108FE00084F8256015D2DBF80000062200F10901A3\n:108FF000A01CF5F7F5F940B9207ADBF800100978E4\n:10900000B0EBD11F08BF012001D04FF0000084F861\n:109010002500E17A4FF0000011F0020F1CBF18F09C\n:10902000020F18F0040F19D111F0100F1CBF94F8A3\n:109030003320002A02D094F835207AB111F0080FBD\n:109040001CBF94F82420002A08D111F0040F02D08C\n:1090500094F8251011B118F0010F01D04FF0010064\n:10906000617A19B168B1FFF7F5FB10E03E484A4953\n:109070000160D5F8000220F00300C5F80002E77295\n:1090800005E001290AD0022918BFFFDF0DD018F032\n:10909000010F14D0DAF80000804745E06672E772ED\n:1090A000A7729621227B002006E06672E7720220FA\n:1090B000A072227B96210120FFF78FFBE7E718F0D3\n:1090C000020F2AD018F0040F21D1FEF74FF9F0B9A2\n:1090D000FEF75CF9D8B931480168001F0068C0F399\n:1090E000006CC0F3425500F00F03C0F30312C0F34D\n:1090F0000320BCF1000F0AD0002B1CBF002A00285F\n:1091000005D1002918BF032D38BF48F0040827EA0D\n:109110009800DAF80410884706E018F0080F18BF26\n:10912000DAF8080056D08047A07A022818BFBDE8B8\n:10913000F88F207C002808BFBDE8F88F02492FE097\n:10914000741500401C11004000800040488500401C\n:1091500014100040ACF501404881004004F5014086\n:1091600004B500404C85004008F501404016004021\n:109170001014004018110040448100404485004014\n:109180001015004000140040141400400415004065\n:10919000100C0020C40000200000040454140040FF\n:1091A000C1F8446102281DD0012818BFFFDFE16A21\n:1091B0006069884298BFFFDFD4F81400C9F8000046\n:1091C000A06B4FF4800140F48000A06382480160EE\n:1091D000BDE8F88F18F0100F14BFDAF80C00FFDFAD\n:1091E000A1D1A1E76169E06A0844E7E738B57B49A6\n:1091F00004460220887201212046FFF763F9784A6D\n:1092000004F13D001060774B0020C3F8440176491B\n:10921000C1F80001C1F80C01C1F81001C1F8040146\n:10922000C1F81401C1F818017048006800900120CD\n:109230009864101D00681168884228BFFFDF38BDA0\n:109240002DE9F843654A88460024917A0125684F44\n:10925000012902D0022903D015E0117E11B912E0D4\n:10926000517E81B1917FD37F05FA01F105FA03F3B5\n:109270001943396092F82010890001F1804101F50D\n:10928000C041C1F8104506460220907201213046C7\n:10929000FFF718F9524906F13D000860514AC2F83B\n:1092A00044415148C0F80041C0F80C41C0F8104199\n:1092B000C0F80441C0F81441C0F818414B48006898\n:1092C00000909564081D00680968884228BFFFDF88\n:1092D000B8F1000F1CBF4FF400303860BDE8F883D0\n:1092E000022810B50DD0012804BF42F6CE3010BDC3\n:1092F000042817BF082843F6A440FFDF41F66A00A0\n:1093000010BDFDF7E5FF30B9FDF7F9FF002808BFF4\n:1093100041F6583001D041F2643041F29A010844DC\n:1093200010BD314910B50020C1F800023049314864\n:109330000860324930480860091D31480860091D3D\n:1093400030480860091D30480860091D2F48086032\n:10935000091D2F48086001200BF058FD1E494FF4ED\n:109360003810086010BD22494FF43810086070476B\n:109370002848016803291BBF00680228012000203B\n:109380007047244801680B291BBF00680A28012088\n:109390000020704720490968C9B9204A204913684C\n:1093A00070B123F0820343F07D0343F00043136068\n:1093B0000A6822F0100242F0600242F0004205E02A\n:1093C00023F0004313600A6822F000420A60034958\n:1093D00081F83D007047000004F50140280C002092\n:1093E00044850040008000400010004018110040FB\n:1093F00008F50140000004041011004098F50140F8\n:109400000410004044810040141000401C11004032\n:109410001010004050150040881700403C170040D5\n:109420007C17004010B5404822220021F5F72FF8A4\n:109430003D480024017821F010010170012104F061\n:10944000FFFE3A494FF6FF7081F822408884384980\n:109450000880488010BD704734498A8C824218BF0A\n:109460007047002081F822004FF6FF708884704713\n:109470002D49016070472E49088070472B498A8C1E\n:10948000A2F57F43FF3B03D00021016008467047EF\n:1094900091F822202549012A1ABF016001200020ED\n:1094A0007047224901F1220091F82220012A04BFCD\n:1094B00000207047012202701D48008888841046F1\n:1094C00070471B49488070471849194B8A8C5B8844\n:1094D0009A4206D191F82220002A1EBF0160012085\n:1094E0007047002070471148114A818C5288914280\n:1094F00009D14FF6FF71818410F8221F19B10021A4\n:10950000017001207047002070470848084A818C8C\n:109510005288914205D190F8220000281CBF0020FB\n:109520007047012070470000960C0020700C00204E\n:10953000CC0000207047584A012340B1012818BFD1\n:1095400070471370086890608888908170475370E6\n:109550000868C2F802008888D08070474E4A10B16F\n:10956000012807D00EE0507860B1D2F80200086000\n:10957000D08804E0107828B19068086090898880CD\n:109580000120704700207047434910B1012803D0E3\n:1095900006E0487810B903E0087808B10120704768\n:1095A0000020704730B58DB00C4605460D220021D5\n:1095B00004A8F4F76CFFE0788DF81F0020798DF88F\n:1095C0001E0060798DF81D00286800906868019081\n:1095D000A8680290E868039068460AF087FF207840\n:1095E0009DF82F1088420CD160789DF82E1088428B\n:1095F00007D1A0789DF82D10884202BF01200DB040\n:1096000030BD00200DB030BD30B50C4605468DB0E4\n:109610004FF0030104F1030012B1FDF749FF01E02F\n:10962000FDF765FF60790D2220F0C00040F040009A\n:109630006071002104A8F4F72AFFE0788DF81F007C\n:1096400020798DF81E0060798DF81D002868009043\n:1096500068680190A8680290E868039068460AF07C\n:1096600045FF9DF82F0020709DF82E0060709DF83A\n:109670002D00A0700DB030BD10B5002904464FF08C\n:10968000060102D0FDF714FF01E0FDF730FF60791D\n:1096900020F0C000607110BDD0000020FE4840687E\n:1096A00070472DE9F0410F46064601461446012059\n:1096B00005F06FF8054696F86500FEF795FC4AF24E\n:1096C000B12108444FF47A71B0FBF1F0718840F297\n:1096D00071225143C0EB4100001BA0F55A7402F007\n:1096E0005AFF002818BF1E3CAF4234BF28463846F8\n:1096F000A04203D2AF422CBF3C462C467462BDE868\n:10970000F0812DE9FF4F8BB0044690F86500884644\n:109710000390DDE90D1008430A90E0480027057822\n:109720000C2D28BFFFDFDE4E36F8159094F88851D7\n:109730000C2D28BFFFDFDA4830F81500484480B20E\n:10974000009094F87D000D280CBF012000200790A8\n:109750000D98002804BF94F82C0103282BD10798FA\n:1097600048B3B4F8AA01404525D1D4F83401C4F86F\n:109770002001608840F2E2414843C4F82401B4F873\n:109780007A01B4F806110844C4F82801204602F012\n:109790000CFFB4F8AE01E08294F8AC016075B4F847\n:1097A000B0016080B4F8B201A080B4F8B401E080E8\n:1097B000022084F82C01D4F884010990D4F88001A7\n:1097C0000690B4F80661B4F87801D4F874110191E8\n:1097D0000D9921B194F8401151B100F0D6B804F5BB\n:1097E000807104917431059104F5B075091D07E08D\n:1097F00004F5AA710491091D059104F5A275091DCE\n:109800000891B4F87010A8EB0000A8EB01010FFA62\n:1098100080F90FFA81FBB9F1000F05DAD4F8700175\n:1098200001900120D9460A909C484FF0000A007927\n:10983000A8B3F2F77FFB90B3B4F8180102282ED337\n:1098400094F82C0102282AD094F8430138BB94F8EC\n:10985000880100900C2828BFFFDF9148009930F85C\n:10986000110000F5C86080B2009094F82C01012826\n:109870007ED0608840F2E2414843009901F0E6F86A\n:10988000D4F8342180B206EB0B01A1EB0901821A56\n:1098900001FB02AAC4F83401012084F8430194F8C2\n:1098A0002C01002865D0012800F01482022800F065\n:1098B0007181032818BFFFDF00F04782A7EB0A0180\n:1098C0000198FCF738F90599012640F271220860E9\n:1098D0000898A0F80080002028702E710598006874\n:1098E000A8606188D4F834015143C0EB41006B4952\n:1098F000A0F54E70C8618969814287BF04990860EC\n:10990000049801600498616A0068084400F5D47006\n:10991000E86002F040FE10B1E8681E30E8606E7149\n:10992000B4F8F000A0EB080000B20028C4BF032088\n:109930006871079800280E9800F06982E0B100BFB6\n:10994000B4F8181100290CBF0020B4F81A01A4F8CB\n:109950001A0194F81C21401C504388420CD26879AB\n:10996000401E002808DD6E71B4F81A01401C01E0A9\n:109970000FE05AE0A4F81A010D98002800F06A825E\n:1099800094F84001002800F061820FB00220BDE889\n:10999000F08F94F8800003283DD03F4894F865107C\n:1099A00090F82C00F7F78DFDE18A40F271225143C7\n:1099B00000EB4100CDF80800D4F82401009901F033\n:1099C00045F8D4F82021D4F82811821A01FB02AA04\n:1099D000C4F820010099029801F038F8D4F8301149\n:1099E000C4F83001411A8A44608840F2E241484399\n:1099F000009901F02BF806EB0B01D4F82821A1EB1C\n:109A00000901891AD4F83421C4F83401821A491E94\n:109A100001FB02AA40E7E18A40F27122D4F8240156\n:109A2000514300EB41000290C6E70698002808BFAA\n:109A3000FFDF94F86510184890F82C00F7F741FD07\n:109A40000990E08A40F271214143099800EB4100FE\n:109A5000009900F0FBFFC4F83001608840F2E24159\n:109A60004843009900F0F2FFC4F8340103A902A8AA\n:109A7000FFF7BBF8DDE90160039FE9F7F0F8014665\n:109A80003046FDF769F800F10F06E9F711F9381AC9\n:109A9000801B009006E00000B80C0020E0000020D1\n:109AA000E4620200B4F83401214686B20120D4F801\n:109AB000289004F06EFE074694F86500FEF794FACD\n:109AC0004AF2B12108444FF47A7BB0FBFBF0618885\n:109AD00040F271225143C0EB4100801BA0F55A7641\n:109AE00002F059FD002818BF1E3EB94534BF384664\n:109AF0004846B04203D2B9452CBF4E463E46666248\n:109B000094F86500FEF7E9FA00F2E140B0FBFBF1E2\n:109B100006980F1894F86500FEF7DFFA064694F8E9\n:109B20006500FEF761FA30444AF2AB310844B0FBFD\n:109B3000FBF1E08A40F2712242430998D4F8306187\n:109B400000EB4200401A801B384400993138471A14\n:109B5000607D40F2E24110FB01F994F8650000904D\n:109B600010F00C0F0ABF00984EF62830FEF73CFAB2\n:109B70004AF2B1210844B0FBFBF000EB460000EBD9\n:109B800009060098FEF7B8FA304400F18401FE4857\n:109B9000816193E6E18A40F27122D4F824015143B5\n:109BA00000EB4100009900F051FFC4F830016188DA\n:109BB00040F2E2404843009900F048FFC4F8340105\n:109BC00087B221460120D4F828B004F0E2FD814696\n:109BD00094F86500FEF708FA4AF2B12101444FF407\n:109BE0007A70B1FBF0F0618840F271225143C0EB12\n:109BF0004100C01BA0F55A7702F0CDFC002818BF29\n:109C00001E3FCB4534BF48465846B84203D2CB45E9\n:109C10002CBF5F464F4667621EBB0E9808B394F890\n:109C200065603046FEF7E0F94AF2B12101444FF495\n:109C30007A70B1FBF0F0D4F83011E28A084440F2B7\n:109C40007123D4F824115A4301EB42010F1A304614\n:109C5000FEF752FA01460998401A3844A0F120074D\n:109C60000AE0E18A40F27122D4F82401514300EB6A\n:109C70004100D4F83011471AD4F82821D4F8201123\n:109C8000D4F8300101FB0209607D40F2E24110FB93\n:109C900001FB94F8656016F00C0F0ABF30464EF6D3\n:109CA0002830FEF7A1F94AF2B12101444FF47A704D\n:109CB000B1FBF0F000EB490000EB0B093046FEF77A\n:109CC0001BFA484400F16001AF488161012084F82B\n:109CD0002C01F3E5618840F271225143D4F834013C\n:109CE000D4F82821C0EB410101FB09F706EB0B0179\n:109CF000891AD4F820C1D4F83031491E0CFB023245\n:109D000001FB0029607D40F2E24110FB01FB94F869\n:109D1000656016F00C0F0ABF30464EF62830FEF78D\n:109D200063F94AF2B12101444FF47A70B1FBF0F0CB\n:109D300000EB490000EB0B093046FEF7DDF9484423\n:109D400000F1600190488161B8E5618840F27122BC\n:109D5000D4F834015143C0EB410000FB09F794F8FB\n:109D60007C0024281CBF94F87D0024280BD1B4F873\n:109D7000AA01A8EB000000B2002804DB94F8AD01B2\n:109D8000002818BF03900A9800B3FEB9099800286C\n:109D90001ABF06980028FFDF94F8650010F00C0F3A\n:109DA00014BF4EF62830FEF71FF94AF2B1210144E4\n:109DB0004FF47A70B1FBF0F03F1A94F86500FEF7AB\n:109DC0009BF90999081A3844A0F12007D4F83411F6\n:109DD00006EB0B0000FB01F6039810F00C0F0ABF16\n:109DE00003984EF62830FEF7FFF84AF2B1210144FD\n:109DF0004FF47A70B1FBF0F000EB46060398FEF7E3\n:109E00007BF9304400F160015F48816156E500282C\n:109E10007FF496AD94F82C0100283FF4ADAD618835\n:109E200040F27122D4F834015143C0EB410128467D\n:109E3000F7F712F90004000C3FF49EAD18990029C1\n:109E400018BF088001200FB0BDE8F08F94F87C01A6\n:109E5000FCF7D1FC94F87C012946FCF7B0FB20B15B\n:109E60000D9880F0010084F841010FB00020BDE89A\n:109E7000F08F2DE9F843454C0246434F00266168B8\n:109E8000606A052A60D2DFE802F003464B4F5600B5\n:109E9000A07A002560B101216846FDF709FB9DF815\n:109EA000000042F210710002B0FBF1F201FB12055A\n:109EB000F4F720FE4119A069FBF73DFEA06126746E\n:109EC000032060754FF0010884F81480607AD0B9DF\n:109ED000A06A80B1F4F70EFE0544F4F785FC411941\n:109EE000A06A884224BF401BA06204D2C4F8288024\n:109EF000F5F72BFE07E0207B04F11001FCF75FFB78\n:109F0000002808BFFFDF2684FCF739F87879BDE820\n:109F1000F843E8F7F9BFBDE8F843002100F0B3BD0E\n:109F2000C1F88001BDE8F883D1F88001BDE8F843AD\n:109F3000012100F0A8BD84F83060FCF720F87879A2\n:109F4000BDE8F843E8F7E0BFFFDFBDE8F8832DE99F\n:109F5000F04F0E4C824683B020788B4601270025B7\n:109F6000094E4FF00209032804BF207B50457DD1E4\n:109F7000606870612078032818BFFFDF4FF0030886\n:109F8000BBF1080F73D203E0E0000020B80C002002\n:109F9000DFE80BF0040F32322D9999926562F5F7E4\n:109FA000ABF9002818BFFFDF86F8028003B0BDE8D8\n:109FB000F08FF4F77AFF68B9F4F716FC0546E0690C\n:109FC000A84228BFE56105D2281A0421FCF7F7FD55\n:109FD000E56138B1F5F723FD002818BFFFDF03B0B6\n:109FE000BDE8F08F03B00020BDE8F04F41E703B0BB\n:109FF000BDE8F04FFEF7FFBD2775257494F83000DB\n:10A000004FF0010A58B14FF47A71A069FBF793FD44\n:10A01000A061002104F11000F7F71EF80EE0F4F73C\n:10A0200069FD82465146A069FBF785FDA061514656\n:10A0300004F11000F7F710F800F1010A208C411C20\n:10A040000A293CBF50442084606830B1208C401CF9\n:10A050000A2828BF84F8159001D284F81580607A08\n:10A06000A8B9A06AE8B1F4F745FD01E02FE02AE0C5\n:10A070008046F4F7B9FB00EB0801A06A884224BFD0\n:10A08000A0EB0800A0620CD2A762F5F75EFD207B72\n:10A09000FCF74BF82570707903B0BDE8F04FE8F796\n:10A0A00033BF207B04F11001FCF789FA002808BFB8\n:10A0B000FFDF03B0BDE8F08F207BFCF736F825709A\n:10A0C00003B0BDE8F08FFFDF03B0BDE8F08FBAF159\n:10A0D000200F28BFFFDFDFF8E886072138F81A00D5\n:10A0E000F9F7E4FE040008BFFFDFBAF1200F28BF34\n:10A0F000FFDF38F81A002188884218BFFFDF4FF0D1\n:10A10000200A7461BBF1080F80F06181DFE80BF079\n:10A110000496A0A099FEFDFCC4F88051F580C4F817\n:10A12000845194F8410138B9FCF71EF8D4F84C1169\n:10A13000FCF712FD00281BDCB4F83E11B4F87000E7\n:10A14000814206D1B4F8F410081AA4F8F6002046AB\n:10A1500005E0081AA4F8F600B4F83E112046A4F869\n:10A160007010D4F86811C4F84C11C0F870111DE0DB\n:10A17000B4F83C11B4F87000081AA4F8F600B4F86A\n:10A180003C112046A4F87010D4F84C11C4F86811A2\n:10A19000C4F87011D4F85411C4F80011D4F858114F\n:10A1A000C4F87411B4F85C11A4F8781102F008F93D\n:10A1B000FBF7B4FF804694F86500FDF715FF4AF2FF\n:10A1C000B12108444FF47A71B0FBF1F0D4F83411A6\n:10A1D00040F27122084461885143C0EB4100A0F174\n:10A1E000300AB8F1B70F98BF4FF0B70821460120E9\n:10A1F00004F0CFFA4044AAEB0000A0F21D38A246BA\n:10A200002146012004F0C5FADAF824109C3081427E\n:10A2100088BF0D1AC6F80C80454528BF4546B56075\n:10A22000D4F86C01A0F5D4703061FCF762FC84F8BE\n:10A23000407186F8029003B0BDE8F08F02F0A6F9F5\n:10A2400001E0FEF7D8FC84F8407103B0BDE8F08F60\n:10A25000FBF78AFFD4F8702101461046FCF77CFC1E\n:10A2600048B1628840F27123D4F834115A43C1EBEB\n:10A270004201B0FBF1F094F87D100D290FD0B4F835\n:10A280007010B4F83E210B189A42AEBF501C401C0F\n:10A290000844A4F83E0194F8420178B905E0B4F806\n:10A2A0003E01401CA4F83E0108E0B4F83E01B4F8B9\n:10A2B000F410884204BF401CA4F83E01B4F87A01AF\n:10A2C0000DF1040B401CA4F87A01B4F89A00B4F81C\n:10A2D0009810401AB4F87010401E08441FFA80F914\n:10A2E0000BE000231A462046CDF800B0FFF709FA2C\n:10A2F00068B3012818BFFFDF48D0B4F83E11A9EBBE\n:10A30000010000B2002802E053E047E05FE0E8DA35\n:10A31000082084F88D0084F88C70204601F012FE2D\n:10A3200084F82C5194F87C514FF6FF77202D00D300\n:10A33000FFDF28F8157094F87C01FBF7F6FE84F82F\n:10A340007CA1707903B0BDE8F04FE8F7DDBDA06EE9\n:10A35000002804BF03B0BDE8F08FB4F83E01B4F8A4\n:10A360009420801A01B20029DCBF03B0BDE8F08F51\n:10A37000B4F86C000144491E91FBF0F189B201FB75\n:10A380000020A4F8940003B0BDE8F08FB4F83E01BB\n:10A39000BDF804100844A4F83E01AEE7FEF7E4FA65\n:10A3A000FEF729FC4FF0E020C0F8809203B0BDE832\n:10A3B000F08F94F82C01042818BFFFDF84F82C518B\n:10A3C00094F87C514FF6FF77202DB2D3B0E7FFDF32\n:10A3D00003B0BDE8F08F10B5FA4C207850B10120E1\n:10A3E0006072F5F7D8FB2078032805D0207A002882\n:10A3F00008BF10BD0C2010BD207BFCF7FCF9207BB2\n:10A40000FCF765FC207BFBF790FE002808BFFFDF10\n:10A410000020207010BD2DE9F04FEA4F83B038784E\n:10A4200001244FF0000840B17C720120F5F7B3FB26\n:10A430003878032818BF387A0DD0DFF88C9389F864\n:10A44000034069460720F9F7BAFC002818BFFFDF70\n:10A450004FF6FF7440E0387BFCF7CDF9387BFCF712\n:10A4600036FC387BFBF761FE002808BFFFDF87F86A\n:10A470000080E2E7029800281CBF90F82C11002908\n:10A480002AD00088A0421CBFDFF834A34FF0200B75\n:10A490003AD00721F9F70AFD040008BFFFDF94F85E\n:10A4A0007C01FCF714FC84F82C8194F87C514FF665\n:10A4B000FF76202D28BFFFDF2AF8156094F87C0175\n:10A4C000FBF733FE84F87CB169460720F9F777FC87\n:10A4D000002818BFFFDF12E06846F9F74EFC00289D\n:10A4E000C8D011E0029800281CBF90F82C11002958\n:10A4F00005D00088A0F57F41FF39CAD104E0684645\n:10A50000F9F73BFC0028EDD089F8038087F830800C\n:10A5100087F80B8003B00020BDE8F08FAA4948718E\n:10A520000020887001220A7048700A71C870A5491D\n:10A53000087070E7A449087070472DE9F84FA14CE6\n:10A5400006460F462078002862D1A048FBF792FD0E\n:10A55000207320285CD04FF00308666084F80080E8\n:10A56000002565722572AEB1012106F58E70FCF7EB\n:10A57000BEFF0620F9F742FC81460720F9F73EFCB2\n:10A5800096F81C114844B1FBF0F200FB1210401C7D\n:10A5900086F81C01FBF7C2FD40F2F651884238BF35\n:10A5A00040F2F65000F5A0701FFA80F9F4F7A2FA15\n:10A5B000012680B3A672F4F717F9E061FBF7D4FD2A\n:10A5C000824601216846FCF769FF9DF8000042F2CF\n:10A5D00010710002B0FBF1F201FB120000EB090167\n:10A5E0005046FBF7A8FAA762A061267584F815808B\n:10A5F0002574207B04F11001FBF7E1FF002808BF60\n:10A60000FFDF25840020F5F7C6FA0020BDE8F88FAB\n:10A610000C20BDE8F88FFFE7E761FBF7A5FD494691\n:10A62000FBF789FAA061A57284F830600120FDF77C\n:10A6300054FD4FF47A7100F2E140B0FBF1F0381AAA\n:10A64000A0F5AB60A5626063CFE75F4948707047D3\n:10A650005D49087170475B4810B5417A00291CBFFD\n:10A66000002010BD816A51B990F8301039B1416AAB\n:10A67000406B814203D9F5F768FA002010BD012034\n:10A6800010BD2DE9F041504C0646E088401CE080AA\n:10A69000D4E902516078D6F8807120B13A46284654\n:10A6A000F6F705FD0546A068854205D02169281A00\n:10A6B00008442061FCF71DFAA560AF4209D896F85E\n:10A6C0002C01012805D0E078002804BF0120BDE856\n:10A6D000F0810020BDE8F08110B504460846FDF782\n:10A6E00083FC4AF2B12108444FF47A71B0FBF1F0D7\n:10A6F00040F2E241614300F54E7081428CBF081A7E\n:10A70000002010BD70B5044682B0002084F84001DE\n:10A7100094F8FB00002807BF94F82C01032802B02E\n:10A7200070BDFBF721FDD4F8702101461046FCF7FF\n:10A7300013FA0028DCBF02B070BD628840F27123BA\n:10A74000D4F834115A43C1EB4201B0FBF1F0B4F834\n:10A750007010401C0844A4F83C01B4F8F400B4F8AC\n:10A760003C21801A00B20028DCBF02B070BD01207D\n:10A7700084F84201B4F89A00B4F8982001AE801A27\n:10A78000401E084485B212E00096B4F83C11002344\n:10A7900001222046FEF7B5FF002804BF02B070BDBD\n:10A7A000012815D0022812BFFFDF02B070BDB4F837\n:10A7B0003C01281A00B20028BCBF02B070BDE3E71C\n:10A7C000F00C0020B80C0020E00000204F9F01009A\n:10A7D000B4F83C01BDF804100844A4F83C01E6E7D5\n:10A7E000F8B50422002506295BD2DFE801F0072630\n:10A7F0000319192A044680F82C2107E00446C948A9\n:10A80000C078002818BF84F82C210AD0FBF7B7FBCA\n:10A81000A4F87A51B4F87000A4F83E0184F84251CB\n:10A82000F8BD0095B4F8F410012300222046FEF78D\n:10A8300068FF002818BFFFDFE8E7032180F82C112C\n:10A84000F8BD0646876AB0F83401314685B201206A\n:10A8500003F09FFF044696F86500FDF7C5FB4AF23A\n:10A86000B12108444FF47A71B0FBF1F0718840F2E5\n:10A8700071225143C0EB4100401BA0F55A7501F015\n:10A880008AFE002818BF1E3DA74234BF2046384626\n:10A89000A84228BF2C4602D2A74228BF3C46746279\n:10A8A000F8BDFFDFF8BD2DE9F05F9E4EB1780229BB\n:10A8B00006BFF1880029BDE8F09F7469C4F88401DF\n:10A8C00094F86500FDF718FCD4F88411081AB168F3\n:10A8D0000144B160F1680844F060746994F8430180\n:10A8E000002808BFBDE8F09F94F82C01032818BF8A\n:10A8F000BDE8F09F94F8655037780C2F28BFFFDF34\n:10A90000894E36F8178094F888710C2F28BFFFDF26\n:10A9100036F81700404494F8888187B2B8F10C0FDC\n:10A9200028BFFFDF36F8180000F5C8601FFA80F86E\n:10A930002846FDF7E1FBD4F884114FF0000A0E1A07\n:10A9400015F00C0F0ABF28464EF62830FDF74CFBD9\n:10A950004FF47A7900F2E730B0FBF9F0361A284666\n:10A96000FDF7CAFBD4F8001115F00C0FA1EB000B9A\n:10A970000ABF28464EF62830FDF736FB4AF2B121D1\n:10A980000844B0FBF9F0ABEB0000A0F160017943A3\n:10A99000B1FBF8F1292202EB50006031A0EB51022B\n:10A9A00000EB5100B24201D8B04201D8F1F774FB7C\n:10A9B000608840F2E2414843394600F047F8C4F865\n:10A9C000340184F843A1BDE8F09F70B505465548B1\n:10A9D00090F802C0BCF1020F07BF406900F5C074D7\n:10A9E000524800F12404002904BF256070BD4FF4D3\n:10A9F0007A7601290DD002291CBFFFDF70BD1046F9\n:10AA0000FEF76EFC00F2E140B0FBF6F0281A206081\n:10AA100070BD1846FDF761FB00F2E140B0FBF6F0B7\n:10AA2000281A206070BD4148007800281CBF002013\n:10AA3000704710B50720F9F7D3F980F0010010BD79\n:10AA40003A480078002818BF0120704730B5024608\n:10AA50000020002908BF30BDA2FB0110490A41EACD\n:10AA6000C051400A4C1C40F100000022D4F1FF31DB\n:10AA700040F2A17572EB000038BFFFDF04F5F4600F\n:10AA8000B0FBF5F030BD2DE9F843284C0025814698\n:10AA900084F83050D4F8188084F82C10E5722570B2\n:10AAA0000127277239466068F5F792FD6168C1F8A1\n:10AAB0007081267B81F87C61C1F88091C1F8748136\n:10AAC000B1F80080202E28BFFFDF194820F816803B\n:10AAD000646884F82C510023A4F878511A4619466A\n:10AAE00020460095FEF70DFE002818BFFFDFC4F8D2\n:10AAF0002851C4F8205184F82C71A4F83E51A4F8D0\n:10AB00003C5184F84251B4F87000401EA4F8700023\n:10AB1000A4F87A51FBF733FA02484079BDE8F843CC\n:10AB2000E8F7F2B9E0000020E4620200B80C00206F\n:10AB3000F00C0020012804D0022805D0032808D1F9\n:10AB400005E0012907D004E0022904D001E004292E\n:10AB500001D000207047012070472DE9F0410E46DA\n:10AB6000044603F08AFC0546204603F08AFC0446AE\n:10AB7000F6F770FBFB4F010015D0386990F86420A0\n:10AB80008A4210D090F8C0311BB190F8C2312342F4\n:10AB90001FD02EB990F85D30234201D18A4218D8D7\n:10ABA00090F8C001A8B12846F6F754FB70B1396996\n:10ABB00091F86520824209D091F8C00118B191F84E\n:10ABC000C301284205D091F8C00110B10120BDE8B1\n:10ABD000F0810020FBE730B5E24C85B0E069002849\n:10ABE0005FD0142200216846F3F751FC206990F8E9\n:10ABF0006500FDF7F9F94FF47A7100F5FA70B0FBD2\n:10AC0000F1F5206990F86500FDF776FA2844ADF873\n:10AC1000060020690188ADF80010B0F87010ADF89A\n:10AC200004104188ADF8021090F8A20130B1A0697B\n:10AC3000C11C039103F002FB8DF81000206990F80D\n:10AC4000A1018DF80800E169684688472069002164\n:10AC500080F8A21180F8A1110399002921D090F861\n:10AC6000A01100291DD190F87C10272919D09DF83A\n:10AC70001010039A002914D013780124FF2B12D04E\n:10AC8000072B0ED102290CD15178FF2909D100BF21\n:10AC900080F8A0410399C0F8A4119DF8101080F825\n:10ACA000A31105B030BD1B29F2D9FAE770B5AD4C40\n:10ACB000206990F87D001B2800D0FFDF2069002567\n:10ACC00080F8A75090F8D40100B1FFDF206990F818\n:10ACD000A81041B180F8A8500188A0F8D81180F8D8\n:10ACE000D6510E2108E00188A0F8D81180F8D6517D\n:10ACF000012180F8DA110D2180F8D4110088F9F7CC\n:10AD000006FAF8F79FFE2079E8F7FEF8206980F848\n:10AD10007D5070BD70B5934CA07980072CD5A0787C\n:10AD2000002829D162692046D37801690D2B01F1F1\n:10AD300070005FD00DDCA3F102034FF001050B2B77\n:10AD400019D2DFE803F01A1844506127182C183A7A\n:10AD50006400152B6FD008DC112B4BD0122B5AD06E\n:10AD6000132B62D0142B06D166E0162B71D0172B53\n:10AD700070D0FF2B6FD0FFDF70BD91F87F200123D3\n:10AD80001946F6F7FFF80028F6D12169082081F866\n:10AD90007F0070BD1079BDE8704001F090BC91F863\n:10ADA0007E00C00700D1FFDF01F048FC206910F8E9\n:10ADB0007E1F21F00101017070BD91F87D00102807\n:10ADC00000D0FFDF2069112180F8A75008E091F83A\n:10ADD0007D00142800D0FFDF2069152180F8A750DE\n:10ADE00080F87D1070BD91F87D00152800D0FFDF40\n:10ADF000172005E091F87D00152800D0FFDF19200D\n:10AE0000216981F87D0070BDBDE870404EE7BDE866\n:10AE1000704001F028BC91F87C2001230021F6F756\n:10AE2000B1F800B9FFDF0E200FE011F87E0F20F01F\n:10AE3000040008701DE00FE091F87C200123002140\n:10AE4000F6F7A0F800B9FFDF1C20216981F87C002B\n:10AE500070BD12E01BE022E091F87E00C0F301100B\n:10AE6000012800D0FFDF206910F87E1F21F01001BB\n:10AE70000170BDE8704001F0E1BB91F87C20012336\n:10AE80000021F6F77FF800B9FFDF1F20DDE791F81A\n:10AE90007D00212801D000B1FFDF2220B0E7BDE80E\n:10AEA000704001F0D7BB2F48016991F87E2013074D\n:10AEB00002D501218170704742F0080281F87E209E\n:10AEC0008069C07881F8E10001F0AFBB10B5254C76\n:10AED00021690A88A1F8162281F8140291F8640009\n:10AEE00001F091FB216981F8180291F8650001F0E9\n:10AEF0008AFB216981F81902012081F812020020E1\n:10AF000081F8C0012079BDE81040E7F7FDBF10B51A\n:10AF1000144C05212069FFF763FC206990F85A1052\n:10AF2000012908D000F5F57103F001FC2079BDE896\n:10AF30001040E7F7E9BF022180F85A1010BD10B5A4\n:10AF4000084C01230921206990F87C207030F6F725\n:10AF500019F848B12169002001F8960F087301F82B\n:10AF60001A0C10BD000100200120A070F9E770B597\n:10AF7000F74D012329462869896990F87C200979D1\n:10AF80000E2A01D1122903D000241C2A03D004E088\n:10AF9000BDE87040D3E7142902D0202A07D008E08A\n:10AFA00080F87C4080F8A240BDE87040AFE71629E9\n:10AFB00006D0262A01D1162902D0172909D00CE083\n:10AFC00000F87C4F80F82640407821280CD01A20C9\n:10AFD00017E090F87D20222A07D0EA69002A03D0E2\n:10AFE000FF2901D180F8A23132E780F87D4001F0DD\n:10AFF00025FB286980F8974090F8C0010028F3D01D\n:10B000000020BDE8704061E710B5D14C216991F88E\n:10B010007C10202902D0262902D0A2E7FFF756FF94\n:10B020002169002081F87C0081F8A20099E72DE9D0\n:10B03000F843C74C206990F87C10202908D00027DD\n:10B0400090F87D10222905D07FB300F17C0503E044\n:10B050000127F5E700F17D0510F8B01F41F004016C\n:10B060000170A06903F015FA4FF00108002608B33B\n:10B070003946A069FFF771FDE0B16A46A169206910\n:10B08000F6F7F7F890B3A06903F001FA2169A1F887\n:10B09000AA01B1F8701001F0AAFA40B32069282182\n:10B0A00080F88D1080F88C8058E0FFE70220A070B7\n:10B0B000BDE8F883206990F8C00110B11E20FFF7A9\n:10B0C00005FFAFB1A0692169C07881F8E20008FAF4\n:10B0D00000F1C1F3006000B9FFDF20690A2180F8A8\n:10B0E0007C1090F8A20040B9FFDF06E009E02AE0FA\n:10B0F0002E7001F0A3FAFFF7D6FE206980F8976062\n:10B10000D6E7226992F8C00170B1B2F8703092F8B7\n:10B110006410B2F8C40102F5D572F6F79BF968B174\n:10B120002169252081F87C00206900F17D0180F8EB\n:10B1300097608D4212D180F87D600FE00020FFF70C\n:10B14000C5FE2E70F0E720699DF8001080F8AC1164\n:10B150009DF8011080F8AD1124202870206900F1BD\n:10B160007D018D4203D1BDE8F84301F067BA80F854\n:10B17000A2609DE770B5764C01230B21206990F801\n:10B180007D207030F5F7FEFE202650BB206901239C\n:10B19000002190F87D207030F5F7F4FE0125F0B124\n:10B1A000206990F87C0024281BD0A06903F04FF997\n:10B1B000C8B1206990F8B01041F0040180F8B010D7\n:10B1C000A1694A7902F0070280F85D20097901F04F\n:10B1D000070180F85C1090F8C1311BBB06E0A57038\n:10B1E00036E6A67034E6BDE870405CE690F8C03103\n:10B1F000C3B900F164035E788E4205D1197891429B\n:10B2000002D180F897500DE000F503710D700288AF\n:10B210004A8090F85C200A7190F85D0048712079AE\n:10B22000E7F772FE2169212081F87D00BDE87040BA\n:10B2300001F0FBB9F8B5464C206990F87E0010F09B\n:10B24000300F04D0A07840F00100A070F8BDA069D4\n:10B2500003F0E2F850B3A06903F0D8F80746A069FC\n:10B2600003F0D8F80646A06903F0CEF80546A069B9\n:10B2700003F0CEF801460097206933462A46303065\n:10B2800003F0BFF9A079800703D56069C07814285E\n:10B290000FD0216991F87C001C280AD091F85A003F\n:10B2A00001280ED091F8B70158B907E0BDE8F84081\n:10B2B000F9E52169012081F85A0002E091F8B60110\n:10B2C00030B1206910F87E1F41F0100101700EE0CE\n:10B2D00091F87E0001F5FC7240F0200081F87E00BC\n:10B2E00031F8300B03F017FA2079E7F70DFEBDE8CF\n:10B2F000F84001F09AB970B5154C206990F87E10AD\n:10B30000890707D590F87C20012308217030F5F7D4\n:10B3100039FEF8B1206990F8AA00800712D4A0691C\n:10B3200003F056F8216981F8AB00A06930F8052FC9\n:10B33000A1F8AC204088A1F8AE0011F8AA0F40F0A7\n:10B3400002000870206990F8AA10C90705D011E022\n:10B35000000100200120A0707AE590F87E008007AF\n:10B3600000D5FFDF206910F87E1F41F00201017057\n:10B3700001F05BF92069002590F87C10062906D1C0\n:10B3800080F87C5080F8A2502079E7F7BDFD206955\n:10B3900090F8A8110429DFD180F8A8512079E7F7A7\n:10B3A000B3FD206990F87C100029D5D180F8A25017\n:10B3B0004EE570B5FB4C01230021206990F87D20FB\n:10B3C0007030F5F7DFFD012578B9206990F87D2010\n:10B3D000122A0AD0012305217030F5F7D3FD10B1F0\n:10B3E0000820A07034E5A57032E5206990F8A80027\n:10B3F00008B901F01AF92169A06901F5847102F018\n:10B40000C8FF2169A069D83102F0CEFF206990F809\n:10B41000DC0100B1FFDF21690888A1F8DE0101F538\n:10B42000F071A06902F0A3FF2169A06901F5F47130\n:10B4300002F0A5FF206980F8DC51142180F87D100E\n:10B440002079BDE87040E7F75FBD70B5D54C0123AA\n:10B450000021206990F87D207030F5F793FD0125DB\n:10B46000A8B1A06902F04FFF98B1A0692169B0F8B6\n:10B470000D00A1F8AA01B1F8701001F0B8F858B1A8\n:10B480002069282180F88D1080F88C50E0E4A570A8\n:10B49000DEE4BDE8704006E5A0692169027981F823\n:10B4A000AC21B0F80520A1F8AE2102F01FFF216900\n:10B4B000A1F8B001A06902F01CFF2169A1F8B20156\n:10B4C000A06902F01DFF2169A1F8B4010D2081F8E7\n:10B4D0007D00BDE47CB5B34CA079C00738D0A0692D\n:10B4E00001230521C578206990F87D207030F5F79B\n:10B4F00049FD68B1AD1E0A2D06D2DFE805F0090945\n:10B500000505090905050909A07840F00800A070A3\n:10B51000A07800281CD1A06902F0BEFE00286ED0E1\n:10B52000A0690226C5781DB1012D01D0162D18D1B4\n:10B53000206990F87C00F5F70DFD90B1216991F834\n:10B540007C001F280DD0202803D0162D16D0A67001\n:10B550007CBD262081F87C00162D02D02A20FFF722\n:10B56000B5FC0C2D5BD00CDC0C2D48D2DFE805F0CF\n:10B5700036331F48BEBE4BB55ABE393C2020A070A2\n:10B580007CBD0120142D6ED008DC0D2D6CD0112D4A\n:10B590006BD0122D6ED0132D31D168E0152D7FD0D8\n:10B5A000162D6FD0182D6ED0FF2D28D198E0206970\n:10B5B0000123194690F87F207030F5F7E3FC00284E\n:10B5C00008D1A06902F0CCFE216981F88E01072024\n:10B5D00081F87F008CE001F0EDF889E0FFF735FF9E\n:10B5E00086E001F0C7F883E0206990F87D1011290A\n:10B5F00001D0A6707CE0122180F87D1078E075E023\n:10B60000FFF7D7FE74E0206990F87D001728F0D18D\n:10B6100001F014F821691B2081F87D0068E0FFF734\n:10B620006AFE65E0206990F87E00C00703D0A0782C\n:10B6300040F0010023E06946A06902F0D0FE9DF8C9\n:10B64000000000F02501206900F8B01F9DF80110EE\n:10B6500001F04901417000F0E8FF206910F87E1FF9\n:10B6600041F0010117E018E023E025E002E0FFF7D8\n:10B6700066FC3DE0216991F87E10490704D5A07071\n:10B6800036E00DE00FE011E000F0CFFF206910F888\n:10B690007E1F41F0040101702AE0FFF7CBFD27E097\n:10B6A00001F030F824E0FFF765FD21E0FFF7BFFC73\n:10B6B0001EE0A06900790DE0206910F8B01F41F08C\n:10B6C00004010170A06902F0F7FE162810D1A069EC\n:10B6D00002F0F6FEFFF798FC0AE0FFF748FC07E0EF\n:10B6E000E16919B1216981F8A20101E0FFF7DBFBF3\n:10B6F0002169F1E93002401C42F10002C1E9000277\n:10B700007CBD70B5274CA07900074AD5A0780028E9\n:10B7100047D1206990F8E400FE2800D1FFDF2069BE\n:10B72000FE21002580F8E41090F87D10192906D13B\n:10B7300080F8A75000F082FF206980F87D502069D2\n:10B7400090F87C101F2902D0272921D119E090F808\n:10B750007D00F5F7FFFB78B120692621012380F8F1\n:10B760007C1090F87D200B217030F5F70BFC78B938\n:10B770002A20FFF7ABFB0BE02169202081F87C0039\n:10B7800006E0012180F8A11180F87C5080F8A250D9\n:10B79000206990F87F10082903D10221217080F8D8\n:10B7A000E41021E40001002010B5FD4C216991F85E\n:10B7B000AC210AB991F8642081F8642091F8AD2198\n:10B7C0000AB991F8652081F8652010B10020FFF7D3\n:10B7D0007DFB206902F041FF002806D02069BDE80A\n:10B7E000104000F5F57102F0A2BF16E470B5EC4C04\n:10B7F00006460D46206990F8E400FE2800D0FFDFE1\n:10B800002269002082F8E46015B1A2F8A400E7E400\n:10B8100022F89E0F01201071E2E470B5E04C012384\n:10B820000021206990F87C207030F5F7ABFB0028F0\n:10B830007BD0206990F8B61111B190F8B71139B1E9\n:10B8400090F8C01100296FD090F8C11119B36BE0C6\n:10B8500090F87D1024291CD090F87C10242918D051\n:10B860005FF0000300F5D67200F5DB7102F096FE82\n:10B870002169002081F8B60101461420FFF7B6FFC8\n:10B88000216901F13000C28A21F8E62F408B4880FF\n:10B8900050E00123E6E790F87D2001230B21703072\n:10B8A000F5F770FB68BB206990F8640000F0ABFE10\n:10B8B0000646206990F8650000F0A5FE054620695F\n:10B8C00090F8C2113046FFF735F9D8B1206990F8E9\n:10B8D000C3112846FFF72EF9A0B12269B2F87030E3\n:10B8E00092F86410B2F8C40102F5D572F5F7B2FD12\n:10B8F00020B12169252081F87C001BE00020FFF7A2\n:10B90000E5FA11E020690123032190F87D207030D1\n:10B91000F5F738FB40B920690123022190F87D201A\n:10B920007030F5F72FFB08B1002059E400211620F4\n:10B93000FFF75CFF012053E410B5E8BB984C206989\n:10B9400090F87E10CA0702D00121092052E08A0730\n:10B950000AD501210C20FFF749FF206910F8AA1F22\n:10B9600041F00101017047E04A0702D5012113208F\n:10B9700040E00A0705D510F8E11F417101210720B9\n:10B9800038E011F0300F3BD090F8B711A1B990F822\n:10B99000B611E1B190F87D1024292FD090F87C10D9\n:10B9A00024292BD05FF0000300F5D67200F5DB717F\n:10B9B00002F0F4FD216900E022E011F87E0F20F092\n:10B9C000200040F010000870002081F83801206944\n:10B9D00090F87E10C90613D502F03FFEFFF797FAE4\n:10B9E000216901F13000C28A21F8E62F408B48809E\n:10B9F00001211520FFF7FAFE0120F6E60123D3E727\n:10BA00000020F2E670B5664C206990F8E410FE293B\n:10BA100078D1A178002975D190F87F2001231946AB\n:10BA20007030F5F7AFFA00286CD1206990F88C11CE\n:10BA300049B10021A0F89C1090F88D1180F8E61013\n:10BA4000002102205BE090F87D200123042170306A\n:10BA5000F5F798FA0546FFF76FFF002852D1284600\n:10BA600000F00CFF00284DD120690123002190F83F\n:10BA70007C207030F5F786FA78B120690123042123\n:10BA800090F87D207030F5F77DFA30B9206990F894\n:10BA9000960010B10021122031E0206990F87C203E\n:10BAA0000A2A0DD0002D2DD1012300217030F5F789\n:10BAB00069FA78B1206990F8A81104290AD105E043\n:10BAC00010F8E21F01710021072018E090F8AA0089\n:10BAD000800718D0FFF7A1FE002813D120690123A9\n:10BAE000002190F87C207030F5F74CFA002809D03E\n:10BAF000206990F8A001002804D00021FF20BDE8B3\n:10BB0000704073E609E000210C20FFF76FFE20690A\n:10BB100010F8AA1F41F0010101701DE43EB5054671\n:10BB20006846FDF7ABFC00B9FFDF22220021009838\n:10BB3000F2F7ADFC0321009802F096FB0098017823\n:10BB400021F010010170294602F0B3FB144C0D2DB9\n:10BB500043D00BDCA5F102050B2D19D2DFE805F06F\n:10BB600022184B191922185718192700152D5FD0C4\n:10BB700008DC112D28D0122D0BD0132D09D0142D37\n:10BB800006D155E0162D2CD0172D6AD0FF2D74D07C\n:10BB9000FFDFFDF786FC002800D1FFDF3EBD00007F\n:10BBA000000100202169009891F8E61017E0E26892\n:10BBB00000981178017191884171090A8171518849\n:10BBC000C171090A0172E4E70321009802F072FCD6\n:10BBD0000621009802F072FCDBE700980621017153\n:10BBE000D7E70098D4F8101091F8C221027191F8AB\n:10BBF000C3114171CDE72169009801F5887102F008\n:10BC0000D7FB21690098DC3102F0DCFBC1E7FA497F\n:10BC1000D1E90001CDE90101206901A990F8B00046\n:10BC200000F025008DF80400009802F006FCB0E753\n:10BC30002069B0F84810009802F0D6FB2069B0F8EF\n:10BC4000E810009802F0D4FB2069B0F84410009886\n:10BC500002F0D2FB2069B0F8E610009802F0D0FBA9\n:10BC600097E7216991F8C00100280098BCD111F82C\n:10BC7000642F02714978BCE7FFE7206990F8A3219F\n:10BC8000D0F8A411009802F022FB82E7DB4810B53F\n:10BC9000006990F8821041B990F87D2001230621B7\n:10BCA0007030F5F76FF9002800D001209DE570B5E0\n:10BCB000D24D286990F8801039B1012905D00229A8\n:10BCC00006D0032904D0FFDF03E4B0F8F41037E016\n:10BCD00090F87F10082936D0B0F89810B0F89A2064\n:10BCE00000248B1C9A4206D3511A891E0C04240C82\n:10BCF00001D0641EA4B290F8961039B190F87C205F\n:10BD0000012309217030F5F73DF940B3FFF7BEFF7D\n:10BD100078B129690020B1F89020B1F88E108B1C01\n:10BD20009A4203D3501A801E00D0401EA04200D277\n:10BD300084B20CB1641EA4B22869B0F8F410214496\n:10BD4000A0F8F0102DE5B0F898100329BDD330F815\n:10BD5000701F428D1144491CA0F8801021E5002479\n:10BD6000EAE770B50C4605464FF4087200212046FC\n:10BD7000F2F78DFB258014E5F8F7A2B92DE9F04123\n:10BD80000D4607460721F8F791F8041E3CD094F8B9\n:10BD9000C8010026A8B16E70092028700BE0268427\n:10BDA00084F8C861D4F8CA016860D4F8CE01A860EC\n:10BDB000B4F8D201A88194F8C8010028EFD12E71FF\n:10BDC000AEE094F8D40190B394F8D4010D2813D0C8\n:10BDD0000E2801D0FFDFA3E02088F8F798F9074686\n:10BDE000F7F745FE78B96E700E20287094F8D601EA\n:10BDF00028712088E88014E02088F8F788F9074641\n:10BE0000F7F735FE10B10020BDE8F0816E700D200F\n:10BE1000287094F8D60128712088E88094F8DA0117\n:10BE2000287284F8D4613846F7F71BFE78E0FFE704\n:10BE300094F80A0230B16E701020287084F80A62FB\n:10BE4000AF806DE094F8DC0190B16E700A2028702C\n:10BE50002088A880D4F8E011C5F80610D4F8E411C1\n:10BE6000C5F80A10B4F8E801E88184F8DC6157E00D\n:10BE700094F8040270B16E701A20287005E000BFBB\n:10BE800084F80462D4F80602686094F8040200287A\n:10BE9000F6D145E094F8EA0188B16E70152028705B\n:10BEA00008E000BF84F8EA6104F5F6702B1D07C8AE\n:10BEB00083E8070094F8EA010028F3D130E094F811\n:10BEC000F80170B16E701C20287084F8F861D4F805\n:10BED000FA016860D4F8FE01A860B4F80202A881F3\n:10BEE0001EE094F80C0238B11D20287084F80C6212\n:10BEF000D4F80E02686013E094F81202002883D090\n:10BF00006E701620287007E084F81262D4F81402CC\n:10BF10006860B4F81802288194F812020028F3D15E\n:10BF2000012071E735480021C16101620846704770\n:10BF300030B5324D0C46E860FFF7F4FF00B1FFDF8B\n:10BF40002C7130BD002180F87C1080F87D1080F8C5\n:10BF5000801090F8FB1009B1022100E00321FEF7E8\n:10BF60003FBC2DE9F041254C0546206909B100216F\n:10BF700004E0B0F80611B0F8F6201144A0F806115C\n:10BF800090F88C1139B990F87F2001231946703050\n:10BF9000F4F7F8FF30B1206930F89C1FB0F85A2050\n:10BFA00011440180206990F8A23033B1B0F89E109E\n:10BFB000B0F8F6201144A0F89E1090F9A670002F5A\n:10BFC00006DDB0F8A410B0F8F6201144A0F8A410D3\n:10BFD00001213D2615B180F88D6017E02278022AF4\n:10BFE0000ED0012A15D0A2784AB380F88C1012F036\n:10BFF000140F11D01E2117E0FC6202000001002086\n:10C0000090F8E620062A3CD016223AE080F88C1000\n:10C0100044E090F88E2134E0110702D580F88D605D\n:10C020003CE0910603D5232180F88D1036E090077F\n:10C0300000D1FFDF21692A2081F88D002AE02BB191\n:10C04000B0F89E20B0F8A0309A4210D2002F05DD43\n:10C05000B0F8A420B0F8A0309A4208D2B0F89C30D2\n:10C06000B0F89A20934204D390F88C310BB122227D\n:10C0700007E090F880303BB1B0F89830934209D394\n:10C08000082280F88D20C1E7B0F89820062A01D355\n:10C090003E22F6E7206990F88C1019B12069BDE8BE\n:10C0A000F0414FE7BDE8F0410021FEF799BB2DE9D3\n:10C0B000F047FF4C81460D4620690088F8F739F8B3\n:10C0C000060000D1FFDFA0782843A070A0794FF0D0\n:10C0D00000058006206904D5A0F8985080F8045126\n:10C0E00003E030F8981F491C0180FFF7CFFD4FF0A7\n:10C0F000010830B3E088000506D5206990F8821069\n:10C1000011B1A0F88E501CE02069B0F88E10491CC7\n:10C1100089B2A0F88E10B0F890208A4201D3531A49\n:10C1200000E0002327897F1DBB4201D880F896805C\n:10C13000914206D3A0F88E5080F80A822079E6F763\n:10C14000E3FEA0794FF0020710F0600F0ED02069D7\n:10C1500090F8801011B1032908D102E080F88080A6\n:10C1600001E080F880700121FEF73AFB206990F829\n:10C170008010012904D1E188C90501D580F88070BB\n:10C18000B9F1000F72D1E188890502D5A0F81851E4\n:10C1900004E0B0F81811491CA0F8181100F035FBA4\n:10C1A000FEF719FDFFF72EFC2769B7F8F800401CD1\n:10C1B000A7F8F80097F8FC0028B100F01BFFA8B121\n:10C1C000A7F8F85012E000F012FF08B1A7F8F850F5\n:10C1D00000F015FF50B197F80401401CC0B287F879\n:10C1E0000401022802D927F8F85F3D732069012372\n:10C1F000002190F87D207030F4F7C4FE20B920694A\n:10C2000090F87D000C2859D120690123002190F875\n:10C210007C207030F4F7B6FE48B32069012300217A\n:10C2200090F87F207030F4F7ADFE00B3206990F8ED\n:10C230008010022942D190F80401C0B93046F7F7C6\n:10C24000E6F9A0B1216991F8E400FE2836D1B1F8F1\n:10C25000F200012832D981F8FA80B1F89A00B1F8D9\n:10C260009820831E9A4203DB012004E032E025E09F\n:10C27000801A401E80B2B1F8F82023899A4201D377\n:10C28000012202E09A1A521C92B2904200D9104642\n:10C29000012801D181F8FA5091F86F2092B98A6E85\n:10C2A00082B1B1F89420B1F87010511A09B2002986\n:10C2B00008DD884200DB084680B203E021690120E6\n:10C2C00081F8FA502169B1F870201044A1F8F40007\n:10C2D000FFF7EDFCE088C0F340214846FFF741FE40\n:10C2E000206980F8FB50BDE8F047FDF7FCB87049C5\n:10C2F00002468878CB78184312D10846006942B1CB\n:10C300008979090703D590F87F00082808D0012013\n:10C310007047B0F84C10028E914201D8FEF7B1B9C7\n:10C320000020704770B5624C05460E46E0882843F1\n:10C33000E080A80703D5E80700D0FFDF6661EA07C1\n:10C340004FF000014FF001001AD0A661F278062AE2\n:10C3500002D00B2A14D10AE0226992F87D30172B03\n:10C360000ED10023E2E92E3302F8370C08E02269EF\n:10C3700092F87D30112B03D182F8811082F8A80049\n:10C38000AA0718D56269D278052A02D00B2A12D1E1\n:10C390000AE0216991F87D20152A0CD10022E1E9FB\n:10C3A000302201F83E0C06E0206990F87D20102A2A\n:10C3B00001D180F88210280601D50820E07083E4BE\n:10C3C0002DE9F84301273A4C002567F30701E58082\n:10C3D000A570E570257020618946804680F8FB7065\n:10C3E0000088F7F7A6FE00B9FFDF20690088FDF797\n:10C3F00042F820690088FDF764F82069B0F8F2106F\n:10C4000071B190F8E410FE290FD190F88C1189B128\n:10C4100090F87F20012319467030F4F7B3FD78B10E\n:10C42000206990F8E400FE2804D0206990F8E40028\n:10C43000FFF774FB206990F8FD1089B1258118E0A1\n:10C440002069A0F89C5090F88D1180F8E61000212A\n:10C450000220FFF7CBF9206980F8FA500220E7E7C5\n:10C4600090F8C81119B9018C8288914200D881884E\n:10C47000218130F8F61F491E8EB230F8021F314478\n:10C4800020F86019018831440180FFF7FFFB20B1DB\n:10C49000206930F88E1F314401802069B0F8F21015\n:10C4A000012902D8491CA0F8F2102EB102E00000C8\n:10C4B0000001002080F8045180F8FA5090F87D10B7\n:10C4C0000B2901D00C2916D1B0F87020B0F8AA3190\n:10C4D000D21A12B2002A0EDBD0F8AC11816090F8AB\n:10C4E000B01101730321F4F773F8206980F87D50CF\n:10C4F00080F8B27026E0242910D1B0F87010B0F89E\n:10C50000AA21891A09B2002908DB90F8C001FFF7B7\n:10C510004BF9206900F87D5F857613E090F87C1078\n:10C52000242901D025290DD1B0F87010B0F8AA0146\n:10C53000081A00B2002805DB0120FFF735F9206951\n:10C5400080F87C5020690146B0F8F6207030F4F78E\n:10C55000B2FAFC480090FC4BFC4A4146484600F0C9\n:10C560007DFC216A11B16078FCF7B5FA20690123DE\n:10C57000052190F87D207030F4F704FD002803D0E9\n:10C58000BDE8F84300F0FDB9BDE8F88300F015BD43\n:10C59000EF49C8617047EE48C069002800D001200B\n:10C5A0007047EB4A50701162704710B5044600881E\n:10C5B000A4F8CC01B4F8B001A4F8CE01B4F8B201EB\n:10C5C000A4F8D001B4F8B401A4F8D201012084F891\n:10C5D000C801DF480079E6F797FC02212046F3F70F\n:10C5E000F7FF002004F87D0F0320E07010BD401A13\n:10C5F00000B247F6FE71884201DC002801DC012010\n:10C6000070470020704710B5012808D0022808D0D4\n:10C61000042808D0082806D0FFDF204610BD0124DA\n:10C62000FBE70224F9E70324F7E7C9480021006982\n:10C6300020F8A41F8178491C81707047C44800B558\n:10C64000016911F8A60F401E40B20870002800DAF8\n:10C65000FFDF00BDBE482721006980F87C10002163\n:10C6600080F8A011704710B5B94C206990F8A81156\n:10C67000042916D190F87C20012300217030F4F7B2\n:10C6800081FC00B9FFDF206990F8AA10890703D464\n:10C69000062180F87C1004E0002180F8A21080F8C8\n:10C6A000A811206990F87E00800707D5FFF7C6FF24\n:10C6B000206910F87E1F21F00201017010BDA4490D\n:10C6C00010B5096991F87C200A2A09D191F8E22075\n:10C6D000824205D1002081F87C0081F8A20010BDC3\n:10C6E00091F87E20130706D522F0080081F87E001D\n:10C6F000BDE81040A2E7FF2801D0FFDF10BDBDE874\n:10C700001040A7E7F8B5924C01230A21206990F860\n:10C710007C207030F4F736FC38B3A06901F07CFE61\n:10C72000C8B1A06901F072FE0746A06901F072FE6F\n:10C730000646A06901F068FE0546A06901F068FEA2\n:10C7400001460097206933462A46303001F059FFF0\n:10C75000206901F082FF2169002081F8A20081F8A0\n:10C760007C00BDE8F840FEF7D2BBA07840F00100A5\n:10C77000A070F8BD10B5764C01230021206990F817\n:10C780007D207030F4F7FEFB30B1FFF74EFF2169DA\n:10C79000102081F87D0010BD20690123052190F84B\n:10C7A0007D207030F4F7EEFB08B1082000E0012096\n:10C7B000A07010BD70B5664C01230021206990F86F\n:10C7C0007D207030F4F7DEFB012588B1A06901F00F\n:10C7D000C4FD2169A1F8AA01B1F87010FFF707FFA5\n:10C7E00040B12069282180F88D1080F88C50E6E552\n:10C7F000A570E4E52169A06901F5D67101F0A8FDF5\n:10C8000021690B2081F87D00D9E510B5FEF779FF8D\n:10C81000FEF760FE4E4CA079400708D5A07830B9ED\n:10C82000206990F87F00072801D101202070FEF7D1\n:10C8300071FAA079C00609D5A07838B9206990F8B6\n:10C840007D100B2902D10C2180F87D10E0780007C3\n:10C850000ED520690123052190F87D207030F4F772\n:10C8600091FB30B10820A0702169002081F8D4012B\n:10C8700010BDBDE81040002000F0C4BB10B5344C22\n:10C88000216991F87D2048B3102A06D0142A07D0D8\n:10C89000152A1AD01B2A2CD11AE001210B2019E0ED\n:10C8A000FAF702FE0C2817D32069082100F58870DA\n:10C8B000FAF7FEFD28B120690421DC30FAF7F8FD13\n:10C8C00000B9FFDF0121042004E000F017F803E0C5\n:10C8D00001210620FEF78AFF012010BD212A08D180\n:10C8E00091F8970038B991F8C00110B191F8C101E1\n:10C8F00008B1002010BD01211720EBE770B5144CE2\n:10C900000025206990F88F1101290AD002292ED123\n:10C9100090F8A810F1B1062180F8E610012102205C\n:10C9200020E090F8D411002921D100F1C80300F5CE\n:10C930008471002200F5C870F4F796FA01210520F1\n:10C9400010E00000AFC00100EFC2010025C30100EC\n:10C950000001002090F8B000400701D5112000E050\n:10C960000D200121FEF742FF206980F88F5126E556\n:10C9700030B5FB4C05462078002818BFFFDFE57175\n:10C9800030BDF7490120887170472DE9F14FF54D11\n:10C990002846446804F1700794F86510608F94F895\n:10C9A0008280268F082978D0F4F797FBB8F1000F22\n:10C9B00004BF001D80B2864238BF304600F0FF0839\n:10C9C000DFF89C93E848C9F8240009F134006E6848\n:10C9D000406800F1700A90F882B096F86510358FC3\n:10C9E000708F08295DD0F4F778FB00BFBBF1000F12\n:10C9F00004BF001D80B2854238BF2846C0B29AF8F5\n:10CA00001210002918BF04210844C0B296F865101E\n:10CA1000FBF735FCB87C002847D007F15801D24815\n:10CA200091E80E1000F5027585E80E10B96EC0F899\n:10CA30002112F96EC0F8251200F58170FBF7DBFFBB\n:10CA4000C848007800280CBF0120002080F00101B8\n:10CA5000C6480176D7E91412C0E90412A0F5837222\n:10CA6000D9F82410FBF7F5F994F86500012808BF00\n:10CA700000220CD0022808BF012208D0042808BFD9\n:10CA8000032204D008281ABFFFDF002202224146F9\n:10CA90000120FBF7F9F90EE0FFE70421F4F71DFB95\n:10CAA00084E70421F4F719FBA0E7D9F82400FBF789\n:10CAB000A2FFFBF715FA009850B994F8650094F8B6\n:10CAC000661010F00C0F08BF00219620FBF7B4FF92\n:10CAD00094F8642001210020FCF76BF894F82C00F6\n:10CAE000012808BFFCF735F8022089F80000FCF7A0\n:10CAF0003FFC002818BFFFDFBDE8F88F2DE9F04F9D\n:10CB0000DFF860A28BB050469AF800204068AAF186\n:10CB10001401059190F8751000F1700504464FF06E\n:10CB200008080127AAF13406A1B3012900F0068103\n:10CB3000022900F00781032918BFFFDF00F01881E8\n:10CB4000306A0423017821F008010170AA7908EA0B\n:10CB5000C202114321F004010170EA7903EA820262\n:10CB6000114321F01001017095F80590F06AF6F775\n:10CB70005EFD8046FCF7C9FCB9F1020F00F00081B0\n:10CB8000B9F1010F00F00081B9F1030F00F000814D\n:10CB900000F003B9FFE795F80CC04FF002094FF021\n:10CBA000000BBCF1240F1CBF6B7B242B08D0BCF105\n:10CBB0001F0F18BFBCF1200F2AD0222B4DD077E0D9\n:10CBC00094F864109AB190F8AC01002874D0082948\n:10CBD00018BF042969D0082818BF042865D0012986\n:10CBE00018BF012853D000BF4FF0020164E090F855\n:10CBF0001201002860D0082918BF042955D0082840\n:10CC000018BF042851D0012918BF01283FD0EBE7F5\n:10CC1000222B22D0002A4BD090F8C20194F8641045\n:10CC200010F0040F18BF40460CD0082918BF042983\n:10CC30003BD0082818BF042837D0012918BF012885\n:10CC400025D0D1E710F0010F18BF3846EDD110F014\n:10CC5000020F18BF4846E8D12EE04AB390F8C2212F\n:10CC600090F85D0094F8641002EA000010F0040FE0\n:10CC700018BF40460ED0082918BF042915D008282F\n:10CC800018BF042811D0012918BF0128ACD14FF0DA\n:10CC9000010111E010F0010F18BF3846EBD110F080\n:10CCA000020F18BF4846E6D106E04FF0080103E046\n:10CCB00094F864100429F8D0A08E11F00C0F18BF5E\n:10CCC0004FF42960F4F709FA218E814238BF0846F3\n:10CCD000ADF80400A4F84C000598FCF7F5FB60B132\n:10CCE0007289316A42F48062728172694FF48060A5\n:10CCF000904703206871EF7022E709AA01A9F06A42\n:10CD0000F6F7CFFB306210B195F8371021B10598D6\n:10CD1000FCF7AEFB6F7113E79DF8241031B9A0F852\n:10CD200000B080F802B0012101F09EFABDF80410B5\n:10CD3000306A01F0C7FB85F8059001E70598FCF71C\n:10CD400097FBFDE6B4F84C00ADF8040009AA01A970\n:10CD5000F06AF6F7A6FB3062002808BFFFDFEFE6B7\n:10CD60002401002058010020300D0020380F002041\n:10CD70000598FCF7A9FB002808BFFFDFE0E600BF2D\n:10CD800030EA080009D106E030EA080005D102E0E7\n:10CD9000B8F1000F01D0012100E00021306A0278D3\n:10CDA00042EA01110170697C00291CBF69790129DF\n:10CDB0003BD005F15801FD4891E80E1000F50278CE\n:10CDC00088E80E10A96EC0F82112E96EC0F825128D\n:10CDD00000F58170FBF70FFE9AF8000000280CBFE9\n:10CDE00001210021F2480176D5E91212C0E90412AE\n:10CDF000A0F58371326AFBF72CF894F864000128DF\n:10CE000008BF00220CD0022808BF012208D0042845\n:10CE100008BF032204D008281ABFFFDF0022022225\n:10CE2000FB210020FBF730F803E0FBF7E4FDFBF704\n:10CE300057F8012194F865200846FBF7BAFE3771D0\n:10CE4000306A0188F181807830743770FCF799FA84\n:10CE5000002818BFFFDF0BB0BDE8F08F2DE9F043CD\n:10CE6000D44D87B081462878DDF838801E461746B5\n:10CE70000C4628B9002F1CBF002EB8F1000F00D1BE\n:10CE8000FFDFC5F81C80C5E90D94C5E905764FF0B4\n:10CE90000000A8716871E870A8702871C64E68819A\n:10CEA000A881307804F170072088F7F742F9E8622A\n:10CEB0002088F7F72CF92863FBF705FA94F9670047\n:10CEC000FBF7DAFA04F11200FBF76CFD04F10E0037\n:10CED000FBF7D8FA307800280CBF03200120FBF7BD\n:10CEE00087FDB64890E80E108DE80E10D0E90410CA\n:10CEF000CDE90410307800280CBFB148B148049047\n:10CF00006846FBF763FDF87EFBF7C4FAFBF76AFDA2\n:10CF100094F86F0078B9A06E68B1B88C39888842EF\n:10CF200009D1B4F86C1001220844B88494F86E005A\n:10CF3000A16EF8F7D8FE3078002804BFFF2094F8DF\n:10CF400064401AD094F8651097F81280258F608F8E\n:10CF5000082926D0F4F7C1F8B8F1000F04BF001D6E\n:10CF600080B2854238BF2846C0B2B97C002918BFBC\n:10CF70000421084494F86540C0B22146FBF77FF9CC\n:10CF80003078214688B10120FBF74BFB7068D0F860\n:10CF90000001FBF733FD0120FFF7F7FC07B0BDE808\n:10CFA000F0830421F4F799F8D6E70020FBF739FB6A\n:10CFB000FFF7A4FD07B0BDE8F0837F4800B5017816\n:10CFC0003438007819B1022818BFFFDF00BD0128EE\n:10CFD00018BFFFDF00BD774810B50078022818BFE2\n:10CFE000FFDFBDE8104000F070BA00F06EBA714883\n:10CFF000007970476F488089C0F3002070476D4802\n:10D00000C07870472DE9F04706006B48694D4068CD\n:10D0100000F17004686A90F8019018BF012E03D1E6\n:10D02000296B07F0F1FF6870687800274FF001085E\n:10D03000A0B101283CD0022860D003281CBFFFDF2C\n:10D04000BDE8F087012E08BFBDE8F087286BF6F732\n:10D05000E3FCE879BDE8F047E5F756BF012E14D0B0\n:10D06000A86A002808BFFFDF2889C21CD5E909107B\n:10D07000F1F7E3F9A86A686201224946286BF6F7DE\n:10D0800047FB022E08BFBDE8F087D4E91401401C1D\n:10D0900041F10001C4E91401E079012801D1E771EF\n:10D0A00001E084F80780E879BDE8F047E5F72CBF98\n:10D0B000012E14D0A86A002808BFFFDF2889C21CEF\n:10D0C000D5E90910F1F7B9F9A86A68620022494662\n:10D0D000286BF6F71DFB022E08BFBDE8F087D4E9E8\n:10D0E0001410491C40F10000C4E91410E079012833\n:10D0F0000CBFE77184F80780BDE8F087012E06D0E9\n:10D10000286BF6F789FC022E08BFBDE8F087D4E94A\n:10D110001410491C40F10000C4E91410E079012802\n:10D12000BFD1BCE72DE9F041234D2846A5F13404D9\n:10D13000406800F170062078012818BFFFDFB07842\n:10D140000127002158B1B1706289042042F0040225\n:10D150006281626990472878002818BF3771216A78\n:10D160000322087832EA000009D1628912F4806F44\n:10D1700005D042F002026281626902209047A169F3\n:10D180000020884760B3607950BB287818B30E48F8\n:10D19000007810F0100F04D10449097811F0100F35\n:10D1A0001ED06189E1B9A16AA9B90FE0300D002054\n:10D1B000380F0020240100205801002004630200E1\n:10D1C000BB220200A7A8010032010020218911B171\n:10D1D00010F0100F04D0BDE8F0410020FFF7D5BBE0\n:10D1E000BDE8F04100F071B92DE9F05FCC4E044686\n:10D1F0003046A6F134054068002700F1700A28780F\n:10D20000B846022818BFFFDFA889FF2240F400704B\n:10D21000A881706890F864101046FBF730F89AF80F\n:10D2200012004FF00109002C00F0F080FAF77DFEAB\n:10D23000FAF76BFE90B99AF8120078B1686A4178F3\n:10D2400061B100789AF80710C0F3C000884205D198\n:10D2500085F80290BDE8F05F00F037B9686A417860\n:10D260002981002908BFAF6203D0286BF6F70AFABC\n:10D27000A862A88940F02000A881EF70706800F1D2\n:10D28000700B044690F82C0001281BD1FBF757FCCB\n:10D2900059462046F3F729FEA0B13078002870687F\n:10D2A0000CBF00F59A7000F50170218841809BF851\n:10D2B000081001719BF80910417180F80090E8791D\n:10D2C000E5F722FE686A9AF806100078C0F380003D\n:10D2D00088423AD0706800F1700490F87500002818\n:10D2E0002FD002284AD06771307800281CBF2079DF\n:10D2F000002809D027716A89394642F010026A81F4\n:10D300006A694FF010009047E078A0B1E770FCF731\n:10D31000EAF8002808BFFFDF08206A89002142F0F0\n:10D3200008026A816A699047D4E91210491C40F1E9\n:10D330000000C4E91210A07901280CBFA77184F87D\n:10D340000690A88940F48070A881696A9AF807302D\n:10D350000878C0F3C0029A424DD1726800F0030011\n:10D3600002F17004012818BF02282DD003281CBF29\n:10D37000687940F0040012D068713CE0E86AF6F782\n:10D38000BCF8002808BFFFDFD4E91210491C40F1A7\n:10D390000000C4E91210E879E5F7B6FDA3E784F8C8\n:10D3A0000290AA89484642F40062AA816A8942F042\n:10D3B00001026A816A699047E079012801D1E77129\n:10D3C00019E084F8079016E04878D8B1A98941F4AB\n:10D3D0000061A981A96A71B1FB2884BF687940F016\n:10D3E0001000C9D8A879002808BFC84603D08020FB\n:10D3F0006A69002190470120A9698847E0B36879EC\n:10D40000A0B13AE0E0790128DBD1D8E7002818BFC5\n:10D41000FAF7C5FDA88940F04000A881E97801200D\n:10D42000491CC9B2E97001292DD8E5E7307890B9D7\n:10D430003C48007810F0100F04D13B49097811F0F6\n:10D44000100F1AD06989B9B9A96A21B9298911B10E\n:10D4500010F0100F11D0B8F1000F1CBF0120FFF722\n:10D46000D1FDFFF74BFBB8F1000F08BFBDE8F09FFF\n:10D470000220BDE8F05FC5E5FFE7B8F1000F1CBF73\n:10D480000020FFF7BFFDBDE8F05F00F01EB870B5EB\n:10D490000D4606462248224900784C6850B1FAF7FA\n:10D4A000F7FD034694F8642029463046BDE87040F5\n:10D4B000FDF78BBAFAF7ECFD034694F86420294691\n:10D4C0003046BDE8704004F0FCBE154910B54C680C\n:10D4D000FBF714FBFBF7F3FAFBF7BCF9FBF768FA71\n:10D4E000FAF7FEFC94F82C00012808BFFBF727FB95\n:10D4F00094F86F0038B9A06E28B1002294F86E003D\n:10D500001146F8F7F0FB094C00216269A0899047A9\n:10D51000E2696179A07890470020207010BD00007A\n:10D520005801002032010020300D0020240100208D\n:10D530002DE9F047FA4F894680463D782C0014D0FB\n:10D540000126012D11DB601EC4B207EBC40090F868\n:10D550005311414506D10622494600F5AA70F0F75D\n:10D560003FFF28B1761CAE42EDDD1020BDE8F0870C\n:10D570002046BDE8F087EA498A78824286BF08449F\n:10D5800090F843010020704710B540F2D3120021FB\n:10D59000E348F0F77CFF0822FF21E248F0F777FF2D\n:10D5A000E1480021417081704FF46171818010BDAC\n:10D5B0002DE9F0410E460546FFF7BAFFD84C10287A\n:10D5C00016D004EBC00191F85A0110F0010F1CBFF6\n:10D5D0000120BDE8F081607808283CBF012081F877\n:10D5E0005A011CD26078401C60700120BDE8F081B7\n:10D5F0006078082813D222780127501C207004EB91\n:10D60000C2083068C8F85401B088A8F85801102A38\n:10D6100028BFFFDF88F8535188F85A71E2E70020ED\n:10D62000BDE8F081C04988707047BF488078704776\n:10D630002DE9F041BA4D00272878401E44B2002C55\n:10D6400030DB00BF05EBC40090F85A0110F0010F69\n:10D6500024D06878E6B2401E687005EBC6083046F4\n:10D6600088F85A7100F0E8FA102817D12878401E7F\n:10D67000C0B22870B04211D005EBC001D1F85301FF\n:10D68000C8F85301D1F85701C8F85701287800F0BD\n:10D69000D3FA10281CBF284480F80361601E44B2EE\n:10D6A000002CCFDAA0488770BDE8F0819C498A78C9\n:10D6B000824286BF01EB0010C01C002070472DE99C\n:10D6C000F0470127994690463D460026FFF730FF78\n:10D6D000102820D0924C04EBC00191F85A1101F0AF\n:10D6E000010600F0A9FA102815D0B9F1000F18BFF3\n:10D6F00089F80000A17881420DD904EB001111F1E5\n:10D70000030F08D0204490F84B5190F83B010128BA\n:10D710000CBF0127002748EA060047EA0501084038\n:10D72000BDE8F0872DE9F05F1F4690468946064622\n:10D73000FFF7FEFE7A4C054610282ED000F07CFA4A\n:10D7400010281CBF1220BDE8F09FA07808283ED208\n:10D75000A6781022701CA07004EB061909F10300D2\n:10D760004146F3F768FB09F1830010223946F3F7CD\n:10D7700062FB10213846F3F74BFB3444102184F848\n:10D7800043014046F3F744FB84F84B0184F803510E\n:10D79000002084F83B01BDE8F09FA078082816D24D\n:10D7A00025784FF0000A681C207004EBC50BD9F8EF\n:10D7B0000000CBF85401B9F80400ABF85801102D63\n:10D7C00028BFFFDF8BF853618BF85AA1C0E7072011\n:10D7D000BDE8F09F2DE9F041514CA078401E45B2C4\n:10D7E000002DB8BFBDE8F081EAB2A078401EC1B2FA\n:10D7F000A17054FA85F090F803618A423DD004EBA1\n:10D80000011004EB0213D0F803C0C3F803C0D0F832\n:10D8100007C0C3F807C0D0F80BC0C3F80BC0D0F8DE\n:10D820000FC0C3F80FC0D0F883C0C3F883C0D0F8CE\n:10D8300087C0C3F887C0D0F88BC0C3F88BC0D0F8BE\n:10D840008F00C3F88F006318A01801EB410193F813\n:10D8500003C102EB420204EB410180F803C104EB77\n:10D860004202D1F80BC1C2F80BC1B1F80F11A2F8F6\n:10D870000F1193F83B1180F83B1104EBC60797F8A2\n:10D880005A0110F0010F1CD1304600F0D5F91028D4\n:10D8900017D12078401EC0B22070B04211D004EBE6\n:10D8A000C000D0F85311C7F85311D0F85701C7F88A\n:10D8B0005701207800F0C0F910281CBF204480F8E0\n:10D8C0000361681E45B2002D8EDABDE8F08116496D\n:10D8D0004870704714484078704738B14AF2B81120\n:10D8E000884203D810498880012070470020704783\n:10D8F0000D488088704710B5FFF71AFE102804D035\n:10D9000000F09AF9102818BF10BD082010BD044976\n:10D910008A78824286BF01EB001083300020704776\n:10D92000600F00206C01002060010020FE4B93F886\n:10D9300002C084459CBF00207047184490F8030142\n:10D9400003EBC00090F853310B70D0F85411116004\n:10D95000B0F85801908001207047F34A114491F8C3\n:10D960000321F2490A700268C1F8062080884881C4\n:10D97000704770B516460C460546FBF7D5F8FAF722\n:10D98000C4F9EA48407868B1E748817851B12A196A\n:10D99000002E0CBF8330C01CFAF791F9FAF7D8F9C2\n:10D9A000012070BD002070BD10B5FAF7FFF9002806\n:10D9B00004BFFF2010BDBDE81040FAF71DBAFAF70A\n:10D9C000F5B9D9498A7882429CBF00207047084443\n:10D9D00090F8030101EBC00090F85A0100F001003B\n:10D9E00070472DE9F047D04D00273E4628780028A3\n:10D9F00086BF4FF01009DFF83883BDE8F087AC78B8\n:10DA000021000CD00122012909DB601EC4B22819B3\n:10DA100090F80331B34203D0521C8A42F5DD4C46E4\n:10DA2000A14286BF05EB0410C01C002005EBC60A0E\n:10DA30009AF85A1111F0010F16D050B1102C04D0E1\n:10DA4000291991F83B11012903D01021F3F7E0F9CE\n:10DA500050B108F8074038467B1C9AF853210AF564\n:10DA6000AA71DFB2FAF7B5FC701CC6B22878B042D2\n:10DA7000C5D8BDE8F0872DE9F041AB4C002635460E\n:10DA8000A07800288CBFAA4FBDE8F0816119C0B210\n:10DA900091F80381A84286BF04EB0510C01C00204A\n:10DAA00091F83B11012903D01021F3F7B1F958B1D6\n:10DAB00004EBC800BD5590F8532100F5AA7130461B\n:10DAC000731CDEB2FAF785FC681CC5B2A078A842C8\n:10DAD000DCD8BDE8F0810144934810B500EB02109A\n:10DAE0000A4601218330FAF7EAF8BDE81040FAF758\n:10DAF0002FB90A468D4910B5497841B18A4B9978BA\n:10DB000029B10244D81CFAF7DAF8012010BD002030\n:10DB100010BD854A01EB410102EB41010268C1F8E9\n:10DB20000B218088A1F80F0170472DE9F0417E4D4F\n:10DB300007460024A878002898BFBDE8F081C0B24D\n:10DB4000A04217D905EB041010F1830612D0102162\n:10DB50003046F3F75DF968B904EB440005EB400883\n:10DB600008F20B113A463046FBF74EFDB8F80F01AC\n:10DB7000A8F80F01601CC4B2A878A042DFD8BDE8A5\n:10DB8000F081014610226B48F3F755B96948704798\n:10DB900065498A78824203D90A1892F843210AB16A\n:10DBA0000020704700EB400001EB400000F20B103A\n:10DBB00070475D498A78824206D9084490F83B0153\n:10DBC000002804BF01207047002070472DE9F04174\n:10DBD0000E460746144606213046F3F719F9524D12\n:10DBE00098B1A97871B105F59D7011F0010F18BFBA\n:10DBF00000F8014FA978490804D0447000F8024F9A\n:10DC0000491EFAD10120BDE8F08138463146FFF7C0\n:10DC10008FFC10280CD000F00FF8102818BF08282F\n:10DC200006D0284480F83B414FF00100BDE8F08168\n:10DC30004FF00000BDE8F0813B4B10B4844698786B\n:10DC400001000ED0012201290BDB401EC0B21C18BE\n:10DC500094F80341644504BF10BC7047521C8A42CB\n:10DC6000F3DD10BC1020704770B52F4C01466218D0\n:10DC7000A078401EC0B2A07092F8035181423CD0FF\n:10DC800004EB011304EB001C01EB4101DCF8036021\n:10DC9000C3F80360DCF80760C3F80760DCF80B60CA\n:10DCA000C3F80B60DCF80F60C3F80F60DCF883602A\n:10DCB000C3F88360DCF88760C3F88760DCF88B60AA\n:10DCC000C3F88B60DCF88FC0C3F88FC0231800EB5B\n:10DCD000400093F803C104EB400082F803C104EB59\n:10DCE0004101D0F80BC1C1F80BC1B0F80F01A1F888\n:10DCF0000F0193F83B0182F83B0104EBC50696F84F\n:10DD00005A0110F0010F18BF70BD2846FFF794FFAD\n:10DD1000102818BF70BD2078401EC0B22070A842E5\n:10DD200008BF70BD08E00000600F00206001002007\n:10DD30006C0100203311002004EBC000D0F8531117\n:10DD4000C6F85311D0F85701C6F857012078FFF7ED\n:10DD500073FF10281CBF204480F8035170BD0000E1\n:10DD60004078704730B50546007801F00F0220F08A\n:10DD70000F0010432870092912D2DFE801F00507CF\n:10DD800005070509050B0F0006240BE00C2409E02C\n:10DD9000222407E001240020E87003E00E2401E0C3\n:10DDA0000024FFDF6C7030BD007800F00F0070477A\n:10DDB0000A68C0F803208988A0F807107047D0F8D7\n:10DDC00003200A60B0F80700888070470A68C0F82E\n:10DDD00009208988A0F80D107047D0F809200A6042\n:10DDE000B0F80D00888070470278402322F040028E\n:10DDF00003EA81111143017070470078C0F380106D\n:10DE000070470278802322F0800203EAC111114397\n:10DE1000017070470078C009704770B514460E460F\n:10DE200005461F2A88BFFFDF2246314605F109005B\n:10DE3000F0F703FBA01D687070BD70B544780E4606\n:10DE40000546062C38BFFFDFA01F84B21F2C88BFF9\n:10DE50001F24224605F109013046F0F7EEFA20466C\n:10DE600070BD70B514460E4605461F2A88BFFFDFF9\n:10DE70002246314605F10900F0F7DFFAA01D68706F\n:10DE800070BD0968C0F80F1070470A88A0F8132009\n:10DE900089784175704790F8242001F01F0122F025\n:10DEA0001F02114380F824107047072988BF0721FB\n:10DEB00090F82420E02322F0E00203EA411111430C\n:10DEC00080F8241070471F3008F065B810B504467C\n:10DED00000F000FB002818BF204410BDC17811F0ED\n:10DEE0003F0F1BBF027912F0010F0022012211F037\n:10DEF0003F0F1BBF037913F0020F002301231A44C5\n:10DF000002EB4202530011F03F0F1BBF027912F0E7\n:10DF1000080F0022012203EB420311F03F0F1BBF49\n:10DF2000027912F0040F00220122134411F03F0F76\n:10DF30001BBF027912F0200F0022012202EBC20265\n:10DF400003EB420311F03F0F1BBF027912F0100FD9\n:10DF50000022012202EB42021A4411F03F0F1BBFC4\n:10DF6000007910F0400F00200120104410F0FF0055\n:10DF700014BF012100210844C0B2704770B5027877\n:10DF8000417802F00F02082A4DD2DFE802F00408BF\n:10DF90000B4C4C4C0F14881F1F280AD943E00C2946\n:10DFA00007D040E0881F1F2803D93CE0881F1F28A6\n:10DFB00039D8012070BD4A1EFE2A34D88446C07864\n:10DFC00000258209032A09D000F03F04601C884222\n:10DFD00004D86046FFF782FFA04201D9284670BDF1\n:10DFE0009CF803004FF0010610F03F0F1EBF1CF11C\n:10DFF0000400007810F0100F13D06446042160462E\n:10E0000000F068FA002818BF14EB0000E6D0017891\n:10E0100001F03F012529E1D280780221B1EB501FA8\n:10E02000DCD3304670BD002070BD70B5017801258D\n:10E0300001F00F01002404290AD007290DD0082976\n:10E040001CBF002070BD40780E2836D0204670BD21\n:10E050004078801F1F2830D9F8E7844640789CF824\n:10E0600003108A09032AF1D001F03F06711C814296\n:10E07000ECD86046FFF732FFB042E7D89CF80300C7\n:10E0800010F03F0F1EBF1CF10400007810F0100FBD\n:10E0900013D066460421604600F01CFA002818BF21\n:10E0A00016EB0000D2D0017801F03F012529CDD236\n:10E0B00080780221B1EB501FC8D3284670BD10B440\n:10E0C000017801F00F01032920D0052921D14478DE\n:10E0D000B0F81910B0F81BC0B0F81730827D222CB0\n:10E0E00017D1062915D3B1F5486F98BFBCF5FA7F53\n:10E0F0000FD272B1082A98BF8A420AD28B429CBFC3\n:10E10000B0F81D00B0F5486F03D805E040780C2842\n:10E1100002D010BC0020704710BC012070472DE9D0\n:10E12000F0411F4614460D00064608BFFFDF21469A\n:10E13000304600F0CFF9040008BFFFDF30193A463F\n:10E140002946BDE8F041F0F778B9C07800F03F000B\n:10E150007047C02202EA8111C27802F03F021143E7\n:10E16000C1707047C07880097047C9B201F00102E0\n:10E17000C1F340031A4402EB4202C1F3800303EBF4\n:10E180004202C1F3C00302EB4302C1F3001303EBED\n:10E1900043031A44C1F3401303EBC30302EB4302EE\n:10E1A000C1F380131A4412F0FF0202D0521CD2B203\n:10E1B0000171C37802F03F0103F0C0031943C1703D\n:10E1C000511C417070472DE9F0410546C078164654\n:10E1D00000F03F041019401C0F46FF2888BFFFDFE6\n:10E1E000281932463946001DF0F727F9A019401CBE\n:10E1F0006870BDE8F081C178407801F03F01401AB5\n:10E20000401E80B2704710B590F803C00B460CF06A\n:10E210003F0144780CF03F0CA4EB0C0CACF1010C6A\n:10E220001FFA8CF4944288BF14462BB10844011D98\n:10E2300022461846F0F701F9204610BD4078704795\n:10E2400000B5027801F0030322F003021A430270C2\n:10E25000012914BF0229002104D0032916BFFFDFC2\n:10E26000012100BD417000BD00B5027801F003033B\n:10E2700022F003021A430270012914BF022900216F\n:10E2800004D0032916BFFFDF012100BD417000BD8E\n:10E29000007800F003007047417841B1C078192838\n:10E2A00003D2BC4A105C884201D101207047002093\n:10E2B000704730B501240546C17019293CBFB548E7\n:10E2C000445C02D3FF2918BFFFDF6C7030BD70B50E\n:10E2D00015460E4604461B2A88BFFFDF65702A4696\n:10E2E0003146E01CBDE87040F0F7A7B8B0F8070071\n:10E2F0007047B0F809007047C172090A017370478E\n:10E30000B0F80B00704730B4B0F80720B0F809C07F\n:10E31000B0F805300179941F40F67A45AC4298BFB9\n:10E32000BCF5FA7F0ED269B1082998BF914209D293\n:10E3300093429FBFB0F80B00B0F5486F012030BC8E\n:10E3400098BF7047002030BC7047001D07F023BE07\n:10E35000021D0846114607F01EBEB0F809007047BE\n:10E36000007970470A684260496881607047426876\n:10E370000A60806848607047098881817047808999\n:10E38000088070470A68C0F80E204968C0F812106B\n:10E390007047D0F80E200A60D0F81200486070472D\n:10E3A0000968C0F816107047D0F81600086070476A\n:10E3B0000A68426049688160704742680A60806804\n:10E3C000486070470968C1607047C068086070475E\n:10E3D000007970470A684260496881607047426806\n:10E3E0000A608068486070470171090A417170478E\n:10E3F0008171090AC17170470172090A417270473F\n:10E400008172090AC172704780887047C08870475E\n:10E41000008970474089704701891B2924BF4189C1\n:10E42000B1F5A47F07D381881B2921BFC088B0F52F\n:10E43000A47F01207047002070470A684260496845\n:10E440008160704742680A6080684860704701795F\n:10E4500011F0070F1BBF407910F0070F00200120BB\n:10E460007047017911F0070F1BBF407910F0070FBB\n:10E470000020012070470171704700797047417199\n:10E480007047407970478171090AC1717047C0882F\n:10E4900070470179407901F007023F498A5C012AFF\n:10E4A00006D800F00700085C01289CBF01207047D7\n:10E4B00000207047017170470079704741717047C3\n:10E4C0004079704730B50C460546FB2988BFFFDF11\n:10E4D0006C7030BDC378024613F03F0008BF704730\n:10E4E0000520127903F03F0312F0010F37D0002905\n:10E4F00014BF0B20704700BF12F0020F32D0012969\n:10E5000014BF801D704700BF12F0040F2DD00229E8\n:10E5100014BF401C704700BF12F0080F28D0032919\n:10E5200014BF801C704700BF12F0100F23D00429C5\n:10E5300014BFC01C704700BF12F0200F1ED0052969\n:10E540001ABF1230C0B2704712F0400F19D006291E\n:10E550001ABF401CC0B27047072918D114E0002927\n:10E56000CAD114E00129CFD111E00229D4D10EE0A3\n:10E570000329D9D10BE00429DED108E00529E3D134\n:10E5800005E00629E8D102E0834288BF70470020F9\n:10E5900070470000246302001C63020030B490F84E\n:10E5A00064508C88B1F808C015F00C0F1BD000BF68\n:10E5B000B4F5296F98BF4FF4296490F8655015F0B1\n:10E5C0000C0F17D0BCF5296F98BF4FF4296C4A88FF\n:10E5D000C988A0F84420A0F84810A0F84640A0F848\n:10E5E0004AC030BC7047002B1CBF157815F00C0FCB\n:10E5F000DED1E2E7002B1CBF527812F00C0FE1D104\n:10E60000E5E7DDF800C08181C2810382A0F812C075\n:10E6100070471B2202838282C281828142800281F2\n:10E62000028042848284828359B14FF429614183FC\n:10E63000C18241820182C18041818180C184018582\n:10E6400070474FF4A4714183C18241820182C1802D\n:10E6500041818180C18401857047F0B4B0F84820C1\n:10E66000818F468EC58E8A4228BF0A4690F8651073\n:10E670004FF0000311F00C0F18BF4FF4296106D1C1\n:10E68000B0F84AC0B0F840108C4538BF61464286A9\n:10E69000C186048FB0F83AC0944238BF14468C4506\n:10E6A00038BF8C460487A0F83AC0B2420ABFA942DC\n:10E6B0004FF0010C4FF0000C058EB0F84410C28FE3\n:10E6C000848E914228BF114690F8642012F00C0FFE\n:10E6D00018BF4FF4296206D1B0F84660B0F8422066\n:10E6E000964238BF324690F85A60022E0AD0018610\n:10E6F0008286A9420ABFA2420120002040EA0C0003\n:10E70000F0BC70478D4238BF2946944238BF22463C\n:10E7100080F85A30EBE7508088899080C889D08093\n:10E72000088A1081488A508101201070704730B4E7\n:10E7300002884A80B0F830C0A1F804C0838ECB8034\n:10E74000428E0A81C48E4C81B0F85650A54204BF57\n:10E75000B0F85240944208D1B0F858409C4202BFF1\n:10E76000B0F854306345002301D04FF001030B7320\n:10E7700000F13003A0F852201A464B89D3848B88CD\n:10E780009384CA88A0F858204FF00100087030BC6C\n:10E79000704730B404460A46088E91F864104FF46E\n:10E7A000747311F00C0F1CBF03EB801080B21ED0ED\n:10E7B000918E814238BF0846118F92F865C01CF0D7\n:10E7C0000C0F1CBF03EB811189B218D0538F8B4201\n:10E7D00038BF194692F866301CF00C0F08BF0023B2\n:10E7E000002C0CBF0122002230BCF2F798BC022999\n:10E7F00007BF80003C30C000703080B2D8E7BCF169\n:10E80000020F07BF89003C31C900703189B2DDE7D2\n:10E810002DE9F041044606F099FCC8B9FE4F78682E\n:10E8200090F8221001260025012914D00178012931\n:10E830001BD090F8281001291CBF0020BDE8F081F2\n:10E84000657018212170D0F82A10616080F8285076\n:10E850000120BDE8F081657007212170416A616087\n:10E8600080F822500120BDE8F081657014212170EC\n:10E87000811C2022201DEFF7E0FD257279680D70C4\n:10E8800081F82850E54882888284C26B527B80F8E8\n:10E89000262080F82260C86B0088F5F738FCF5F771\n:10E8A000E0F8D5E7DC4840680178002914BF80888B\n:10E8B0004FF6FF70704730B5D74C83B00D462078C7\n:10E8C0007F2808BFFFDF94F900307F202070D4F844\n:10E8D00004C09CF85000062808BF002205D09CF810\n:10E8E000500008280CBF022201229CF85400CDE9F8\n:10E8F000000302929CF873309CF880200CF13201E6\n:10E90000284606F08FFC03B0BDE8304006F01FBE7D\n:10E910002DE9F04106F05FFC002818BF06F0E4FB8B\n:10E92000BD4C606800F1840290F87610895C80F834\n:10E930008010002003F07EF828B3FAF753F86068DF\n:10E94000B74990F855000D5C2846F9F7A3FD6068BB\n:10E950004FF0000680F8735090F8801011F00C0F03\n:10E960000CBF25200F20F9F76CFC606890F8801030\n:10E970000120F9F711FE606890F84010032918BFD4\n:10E9800002290FD103E0BDE8F04101F02FB990F862\n:10E9900076108430085C012804D101221146002041\n:10E9A000FAF707F9FAF7D5F8606890F88050012D6A\n:10E9B00007BF0127032100270521A068FFF799F869\n:10E9C000616881F8520040B1002F18BF402521D066\n:10E9D000F9F787F92846FAF79DF86068806DFAF72D\n:10E9E0000DF8606890F85410FF291CBF6D30FEF7D9\n:10E9F000B4FFFF21606880F8531080F8541080F84D\n:10EA0000626080F8616080F87D60062180F85010B7\n:10EA1000BDE8F08115F00C0F14BF55255025D7E740\n:10EA200070B57D4C0646606800F150052046806850\n:10EA300041B1D0F80510C5F81D10B0F80900A5F8CF\n:10EA4000210003E005F11D01FFF7B9F9A068FFF708\n:10EA5000D4F985F82400A0680021032E018002D09B\n:10EA6000052E04D03DE00321FFF77CF939E00521B4\n:10EA7000FFF778F96068C06B00F10E01A068FFF73E\n:10EA800000FA6068C06B00F11201A068FFF7FDF9A1\n:10EA9000D4E90110CA6B527D8275CA6BD28AC275E5\n:10EAA000120A0276CA6B52884276120A8276CA6BC2\n:10EAB0009288C276120A0277CA6BD2884277120A0B\n:10EAC0008277C96B0831FFF7FEF96068C06B017E81\n:10EAD000A068FFF7E0F9606890F88610A068FFF77B\n:10EAE000E4F905F11D01A068FFF770F995F824100D\n:10EAF000A068FFF786F9606800F1320590F8316090\n:10EB000090F8511091B190F84010032906D190F877\n:10EB10003910002918BF90F8560001D190F8530021\n:10EB2000FFF736F800281CBF012605462946A068D5\n:10EB3000FFF73EF93146A068BDE87040FFF754B9D1\n:10EB40003549496881F84B00704770B5324D002453\n:10EB50000126A8606968A1F8814081F8834081F8A6\n:10EB6000506091F85020022A1FBF91F850100129DF\n:10EB7000FFDF70BD06F0CDFA6868047080F82240AF\n:10EB800080F8284090F8520030B1F9F7CDFFF9F73E\n:10EB9000BCF8686880F852406868072180F84A40ED\n:10EBA00080F8396080F8404080F8554080F84B404C\n:10EBB00080F87D4080F8381070BD2DE9F041164C8A\n:10EBC000054686B0606890F85000012818BF0228FA\n:10EBD00005D003281EBF0C2006B0BDE8F081687A7E\n:10EBE000022839D0F9F76FFB0220F9F701FF0D4930\n:10EBF00001F10C0090E80D108DE80D10D1E907012E\n:10EC0000CDE904016846F9F7E1FE606890F94B0030\n:10EC1000F9F732FCA06807E07401002044110020DD\n:10EC20004363020040630200F9F7E5FEFC48F9F790\n:10EC3000B9FEFC48F9F726FC606890F831103230D4\n:10EC4000F9F7A5FB0F210720F9F7BFFB606890F8E3\n:10EC50003900E0B1FEF70FFF6168287A01F1840204\n:10EC600081F87600287A805C81F880006868886581\n:10EC70002A68CA65687A68B1012824D00525022867\n:10EC800008BF81F850506FD0032878D080E0FEF79D\n:10EC9000A8FEE1E7E44B91F83850002291F85500C6\n:10ECA000401CA3FB006C4FEA5C0CACEB8C0C60448A\n:10ECB00081F8550025FA00F010F0010F03D1501C27\n:10ECC000C2B2032AEAD3002681F87D6091F8490098\n:10ECD000002804BF91F85100002841D0F7F744FA0A\n:10ECE000074660683946406CF7F736FFDFF83C832B\n:10ECF000054690FBF8F008FB105041423846F6F705\n:10ED00001AFF6168486495FBF8F08A6F10448867C1\n:10ED1000FEF7EEFD01466068826F914220D847649D\n:10ED2000866790F8510000281CBF0120FEF7FDFE09\n:10ED30000121606890F84A20002A1CBF90F8492001\n:10ED4000002A0DD090F8313000F13202012B04D1AD\n:10ED5000527902F0C002402A08D03230FAF78CFC17\n:10ED60006168042081F8500012E008E00125FEF7F8\n:10ED70000DFF61682A463231FAF746FCF0E7002AB7\n:10ED800018BFFFDF012000F089FF606880F8505055\n:10ED900006B00020BDE8F08170B5A54D686890F818\n:10EDA000501004292ED005291CBF0C2070BD90F8EE\n:10EDB0007D100026002990F883104FEA511124D0CD\n:10EDC000002908BF012407D0012908BF022403D06D\n:10EDD000022914BF00240824C06D00281CBF002095\n:10EDE00000F05CFF6868806DF9F708FE686890F8CD\n:10EDF0004010022943D0032904BF90F86C10012968\n:10EE000041D04DE0FFF784FD52E0002908BF012406\n:10EE100007D0012908BF022403D0022914BF00240F\n:10EE20000824C06D00281CBF002000F037FF686870\n:10EE3000806DF9F7E3FD686890F84010022906D06C\n:10EE4000032904BF90F86C10012904D010E090F859\n:10EE50006C1002290CD1224614F00C0F04D090F84B\n:10EE60004C00012808BF042201210020F9F7A1FE6F\n:10EE70006868072180F8804080F8616016E090F8AB\n:10EE80006C1002290CD1224614F00C0F04D090F81B\n:10EE90004C00012808BF042201210020F9F789FE57\n:10EEA0006868082180F8804080F8616080F8501020\n:10EEB000002070BD5E49002210F0010F496802D0A9\n:10EEC000012281F8842010F0080F03D0114408209B\n:10EED00081F88400002070475549496881F848004E\n:10EEE000704710B5524C636893F83030022B14BF52\n:10EEF000032B00280BD100291ABF02290120002072\n:10EF00001146FEF7F8FC08281CBF012010BD606800\n:10EF100090F83000002816BF022800200120BDE82C\n:10EF20001040FAF731BB4248406890F830000028A2\n:10EF300016BF022800200120FAF726BB3C49496889\n:10EF400081F8300070473A49496881F84A007047B3\n:10EF500070B5374C616891F83000002816BF022860\n:10EF60000020012081F8310001F13201FAF7F6FAB0\n:10EF7000606890F83010022916BF03290121002192\n:10EF800080F8511090F8312000F132034FF0000565\n:10EF9000012A04BF5B7913F0C00F0AD000F13203DD\n:10EFA000012A04D15A7902F0C002402A01D000227D\n:10EFB00000E0012280F84920002A04BF002970BD2A\n:10EFC0008567F7F7D1F86168486491F85100002827\n:10EFD0001CBF0020FEF7A9FD0026606890F84A10CB\n:10EFE00000291ABF90F84910002970BD90F831200F\n:10EFF00000F13201012A04D1497901F0C001402910\n:10F0000005D02946BDE870403230FAF735BBFEF72F\n:10F01000BDFD61683246BDE870403231FAF7F4BA9E\n:10F020004063020046630200ABAAAAAA40420F0056\n:10F030007401002070B5FF4D0C4600280CBF012361\n:10F040000023696881F8393081F842004FF00800E8\n:10F0500081F856000CD1002C1ABF022C0120002090\n:10F060001146FEF748FC6968082881F8560001D06F\n:10F07000002070BD022C14BF032C1220F8D170BDEB\n:10F08000002818BF112070470328EA4A526808BFB9\n:10F09000D16382F840000020704710B5E54C6068ED\n:10F0A00090F8401003291CBF002180F8601001D0A7\n:10F0B000002010BD0123C16B1A460020F2F738F87A\n:10F0C0006168CA6B526A904294BF0120002081F8A7\n:10F0D0006000EDE7D748416891F84000032804D06C\n:10F0E000012818BF022807D004E091F84200012847\n:10F0F00008BF70470020704791F84100012814BFF5\n:10F1000003280120F6D1704770B5F9F7F7FCF9F73D\n:10F11000D6FCF9F79FFBF9F74BFCC64C002560685D\n:10F1200090F8520030B1F9F7FFFCF8F7EEFD606897\n:10F1300080F8525060680121A0F8815080F8835017\n:10F1400080F8501080F82850002070BDB94810B5E4\n:10F150004068643006F0B1FB002010BDB5480121C5\n:10F16000406890F84020032A03BF80F82A10C26B41\n:10F170001288002218BF80F82A20828580F8281083\n:10F180007047AC49496881F88600704701780023D0\n:10F1900011F0010FA749496809D04278032A08BF36\n:10F1A000CB6381F84020012281F884201346027845\n:10F1B00012F0040F0CD082784FF0000C032A08BF25\n:10F1C000C1F83CC081F840200B44082283F8842019\n:10F1D000C27881F830200279002A16BF022A012362\n:10F1E000002381F8393081F84120427981F83820B4\n:10F1F000807981F848004FF0000070478D484068E2\n:10F200008030704770B58B4C06460D46606890F8AC\n:10F210005000032818BFFFDF022E1EBF032EFFDFA2\n:10F2200070BD002D18BF06F0A1F900216068A0F89C\n:10F23000811080F88310012180F8501070BD00F01B\n:10F24000D5BC2DE9F0477B4C0646894660684FF0F7\n:10F250000108072E90F8397038BF032540D3082ED7\n:10F2600084BF0020BDE8F08790F85010062908BF41\n:10F27000002105D090F8501008290CBF022101216F\n:10F2800090F8800005F0AEFF002873D1A068C17827\n:10F2900011F03F0F12D0027912F0010F0ED0616809\n:10F2A0004FF0050591F85220002A18BFB9F1000F60\n:10F2B00016D091F88010012909D011E011F03F0F0C\n:10F2C0001ABF007910F0100F002F53D14CE04FF00F\n:10F2D00001024FF00501FEF74CFB616881F8520016\n:10F2E000A16808782944C0F3801030B1487900F053\n:10F2F000C000402808BF012000D00020616891F8BC\n:10F300005210002918BF002807D0FEF74DFB014618\n:10F31000606880F8531080F86180606890F853103E\n:10F32000FF292AD080F854100846FEF74AFB40EA2D\n:10F330000705606890F85320FF2A18BF002D10D0F1\n:10F34000072E0ED3A068C17811F03F0F09D00179C4\n:10F3500011F0020F05D00B21FEF7BDFB606880F8AD\n:10F3600062802846BDE8F087FEF75FF9002808BFF5\n:10F37000BDE8F0870120BDE8F087A36890F8392048\n:10F3800059191B78C3F3801C00F153036046FEF744\n:10F3900096F90546CDE72DE9F043264C87B0A068E5\n:10F3A000FEF7E0FE7F264FF00108002558B1022746\n:10F3B00001287DD0022800F0EF80F9F74BFA07B062\n:10F3C0000620BDE8F083F9F745FA616891F840003E\n:10F3D000032800F01581A068C27812F03F0F05D015\n:10F3E000037913F0100F18BF012700D10027002F59\n:10F3F00014BF0823012312F03F0F00F001810079B0\n:10F4000033EA000240F0FC8010F0020F08D091F8BF\n:10F410008000002105F064FE002808BF012000D014\n:10F4200000208DF80C508DF810508DF814504FF0CE\n:10F43000FF0801E074010020D0B105AA03A904A8C7\n:10F4400000F07AFC606890F831809DF80C0000288C\n:10F4500018BF48F002080BD1A068FEF7DBFC81461C\n:10F460000121A068FEF732FD4946F8F79AFF28B35C\n:10F47000FFB1012000F0DDFB002852D020787F286A\n:10F4800008BFFFDF94F900102670606890F85420E0\n:10F49000CDE90021029590F8733090F8802000F1BA\n:10F4A0003201404605F0BEFE606880F86C50A3E073\n:10F4B00038E041460020FFF7FEF9A1E0606890F8CF\n:10F4C0004100032818BF02282BD19DF81000002806\n:10F4D00027D09DF80C00002823D1F7B1012000F0BF\n:10F4E000A8FB00281DD020787F2808BFFFDF94F9F3\n:10F4F00000102670606890F85420CDE90021029534\n:10F5000090F8733090F8802000F13201FE2005F071\n:10F5100089FE606880F86C506EE0FE210020FFF7E5\n:10F52000CAF96DE0F9F796F9A0681821C27812F0CF\n:10F530003F0F65D00279914362D10421FEF7C6FCEA\n:10F54000616891F84020032A01BF8078B7EB501F13\n:10F5500091F86000002853D04FF0010000F069FBE3\n:10F56000E8B320787F2808BFFFDF94F900102670E9\n:10F57000606890F85420CDE90021029590F873302E\n:10F5800090F8802000F13201FF2005F04BFE60680A\n:10F5900080F86C8030E000BFF9F75CF9606890F8A3\n:10F5A000400003282CD0A0681821C27812F03F0F29\n:10F5B00026D0007931EA000022D1012000F039FB89\n:10F5C00068B120787F2808BFFFDF94F9001026700B\n:10F5D000606890F85420CDE90021029500E00FE02A\n:10F5E00090F8733090F8802000F13201FF2005F090\n:10F5F00019FE606880F86C7007B00320BDE8F083E6\n:10F6000007B00620BDE8F083F0B5FE4C074683B096\n:10F6100060686D460078002818BFFFDF002661682B\n:10F620008E70C86B02888A8042884A8382888A8367\n:10F63000C088C88381F8206047B10121A068FEF727\n:10F6400045FC0546A0680078C10907E06946A06846\n:10F65000FEF7B5FBA0680078C0F380116068012751\n:10F6600090F85120002A18BF002904D06A7902F0CE\n:10F67000C002402A26D090F84A20002A18BF00294C\n:10F6800003D0697911F0C00F1CD000F10E00E3F730\n:10F69000B3FC616891F85400FF2819D001F1080209\n:10F6A000C91DFEF743F9002808BFFFDF6068C17974\n:10F6B00041F00201C171D0F86D104161B0F87110D4\n:10F6C00001830FE02968C0F80E10A9884182E0E7A5\n:10F6D000C86B427ECA71D0F81A208A60C08B8881BC\n:10F6E0004E610E8360680770C26B90F84B1082F811\n:10F6F0006710C06B0088F4F70AFDF4F7A3F903B0B4\n:10F70000F0BD2DE9F041BF4C0546002760684FF081\n:10F7100001083E4690F84000012818BF022802D098\n:10F72000032818BFFFDF5DB1A068FEF727FC18B9FA\n:10F73000A068FEF77AFC18B100F08FFB074645E0A1\n:10F74000606890F850007F25801F06283ED2DFE8D1\n:10F7500000F003191924352FAA48F9F709FA0028EF\n:10F7600008BF2570F9F7EBF9606890F8520030B1E6\n:10F77000F9F7DAF9F8F7C9FA606880F85260F9F732\n:10F7800069F830E09F48F9F7F3F9002808BF2570C1\n:10F79000F9F7D5F905F0EAFEC3E09A48F9F7E8F978\n:10F7A000002808BF2570F9F7CAF9F9F753F81AE0ED\n:10F7B0009448F9F7DDF930B9257004E09148F9F77C\n:10F7C000D7F90028F8D0F9F7BAF9AAE0102F80F09D\n:10F7D0003881DFE807F01E9DA6AAF1F108B3F2F127\n:10F7E000F1F10C832051BDE8F041FFF791B80320FF\n:10F7F00002F020F9002870D000210320FFF710F953\n:10F80000012211461046F9F7D4F961680C2081F8FD\n:10F810005000BDE8F081606800F15005042002F05E\n:10F8200009F900287DD00E202870012002F0FDFC8F\n:10F83000A06861680078C0F3401081F8750000216D\n:10F840000520FFF7EDF87048A1684FF0200CC26B5F\n:10F850000B78527B23F020030CEA42121A430A7001\n:10F86000C16B95F825304A7B1A404A73C06B28213A\n:10F8700080F86610BDE8F081062002F0DBF8002871\n:10F880004FD0614D0F2085F85000022002F0CDFCD2\n:10F890006068012190F880200846F9F78AF9A0688D\n:10F8A00061680078C0F3401081F8750001210520DF\n:10F8B000FFF7B6F8E86B80F80D80A068017821F0BA\n:10F8C00020010170F9F75DFD002818BFFFDF282037\n:10F8D000E96B81F86600BDE8F08122E0052002F0C6\n:10F8E000A9F8F0B101210320FFF79AF8F9F749FDD3\n:10F8F000002818BFFFDF6068012190F880200846CB\n:10F90000F9F757F961680D2081F85000BDE8F081E2\n:10F910006068A0F8816080F8836080F85080BDE85E\n:10F92000F081BDE8F04100F061B96168032081F821\n:10F930005000BDE8F041082002F077BC606890F804\n:10F940008310490908BF012507D0012908BF0225F6\n:10F9500003D0022914BF00250825C06D00281CBF54\n:10F96000002000F09BF96068806DF9F747F8606847\n:10F9700090F84010022906D0032904BF90F86C10BB\n:10F98000012904D010E090F86C1002290CD12A460D\n:10F9900015F00C0F04D090F84C00012808BF042289\n:10F9A00001210020F9F705F96068072180F88050EF\n:10F9B00080F8616041E000E043E0606890F8831007\n:10F9C000490908BF012507D0012908BF022503D036\n:10F9D000022914BF00250825C06D00281CBF002087\n:10F9E00000F05CF96068806DF9F708F8606890F8DD\n:10F9F000401002290AD0032904BF90F86C10012995\n:10FA000008D014E0740100204411002090F86C101C\n:10FA100002290CD12A4615F00C0F04D090F84C00A6\n:10FA2000012808BF042201210020F9F7C2F860680C\n:10FA3000082180F8805080F8616080F85010BDE89F\n:10FA4000F081FFDFBDE8F08170B5FE4C606890F892\n:10FA5000503000210C2B38D001220D2B40D00E2B22\n:10FA600055D00F2B1CBFFFDF70BD042002F0DDFB63\n:10FA7000606890F880100E20F8F7E3FB606890F85B\n:10FA8000800010F00C0F14BF282100219620F8F7F9\n:10FA9000D3FFF9F75EF86068052190F88050A06800\n:10FAA000FEF727F8616881F8520048B115F00C0F95\n:10FAB0000CBF50255525F8F714F92846F9F72AF810\n:10FAC00061680B2081F8500070BDF9F742F8002101\n:10FAD0009620F8F7B1FF6168092081F8500070BDE9\n:10FAE00090F88010FF20F8F7ACFB606890F8800079\n:10FAF00010F00C0F14BF282100219620F8F79CFF6E\n:10FB0000F9F727F861680A2081F8500070BDA0F865\n:10FB1000811080F8831080F850200020FFF774FDDA\n:10FB2000BDE87040032002F080BB70B5C54C606832\n:10FB300090F850007F25801F062828BF70BDDFE8A1\n:10FB400000F0171F1D032A11BE48F9F711F800280D\n:10FB500008BF2570F8F7F3FFF8F77CFEBDE87040AA\n:10FB6000FEF7D6BEB748F9F703F8C8B9257017E015\n:10FB7000B448F8F7FDFF40B9257006E005F0F6FC43\n:10FB8000B048F8F7F5FF0028F6D0F8F7D8FFBDE841\n:10FB9000704000F02BB8AB48F8F7EAFF0028E5D03A\n:10FBA000F8F7CDFF60680021643005F037FEBDE84E\n:10FBB000704000F01BB870B5A24C06460D460129F6\n:10FBC00008D0606890F880203046BDE87040134649\n:10FBD00002F077BBF8F75CFA61680346304691F8AB\n:10FBE00080202946BDE8704002F06BBB70B5F8F785\n:10FBF00085FFF8F764FFF8F72DFEF8F7D9FE914C72\n:10FC00000025606890F8520030B1F8F78DFFF8F7E2\n:10FC10007CF8606880F852506068022180F85010CB\n:10FC2000A0F8815080F88350BDE87040002002F0B9\n:10FC3000FCBA70B5834D06460421A868FEF746F964\n:10FC4000044605F0C8FA002808BF70BD207800F00F\n:10FC50003F00252814D2F8F761FA217811F0800FBF\n:10FC60000CBF1E214FF49671B4F80120C2F30C02B0\n:10FC700012FB01F10A1AB2F5877F28BF814201D237\n:10FC8000002070BD68682188A0F88110A17880F8F4\n:10FC900083103046BDE8704001F0CCBE2DE9F04144\n:10FCA000684C0746606800F1810690F883004009BF\n:10FCB00008BF012507D0012808BF022503D002286C\n:10FCC00014BF00250825F8F78DFE307800F03F06B8\n:10FCD0003046F8F7DFFB606880F8736090F86C00DE\n:10FCE00002280CBF4020FF202946F8F7AAFA27B1C6\n:10FCF00029460120F8F795FC05E060682A46C16DA9\n:10FD00000120F8F7E2FCF8F724FF0521A068FDF7D1\n:10FD1000F0FE6168002881F8520008BFBDE8F0815C\n:10FD200015F00C0F0CBF50245524F7F7DAFF2046CE\n:10FD3000BDE8F041F8F7EEBE2DE9F74F414C002544\n:10FD4000914660688A4690F8510000280CBF4FF039\n:10FD500001084FF00008A0680178CE090121FEF7E4\n:10FD6000B5F836B1407900F0C000402808BF012640\n:10FD700000D00026606890F85210002961D090F8F9\n:10FD800040104FF0000B032906D190F839100029DC\n:10FD900018BF90F856700ED1A068C17811F03F0FCF\n:10FDA0001CBF007910F0010F02D105F061F940B3DA\n:10FDB000606890F85370FF2F18BF082F21D0384685\n:10FDC000FDF7D9FB002818BF4FF00108002E38D0EE\n:10FDD000606890F8620030B1FDF7F1FD054660689B\n:10FDE00080F862B02DE03846FDF791FD054601210F\n:10FDF000A068FEF76BF801462846F9F7D3FB0546E5\n:10FE00001FE0F6B1606890F86100D0B9A068C178D1\n:10FE100011F03F0F05D0017911F0010F18BF0B2130\n:10FE200000D105210022FDF7A4FD616881F8520090\n:10FE300038B1FDF7B9FDFF2803D06168012581F8CD\n:10FE4000530001E0740100208AF800500098067009\n:10FE500089F8008003B0BDE8F08F2DE9F04FFF4C2A\n:10FE600087B00025606890F850002E46801F4FF044\n:10FE70007F08062880F0D581DFE800F00308088BB2\n:10FE8000FDDB00F0F8FB054600F0CCB9F348F8F7CD\n:10FE90006FFE002808BF84F80080F8F750FEA068C5\n:10FEA000FDF782FF0546072861D1A068FEF75AF9E1\n:10FEB0000146606890F86C208A4258D190F8501042\n:10FEC000062908BF002005D090F8500008280CBF74\n:10FED0000220012005F08AF970B90321A068FDF71E\n:10FEE000F5FF002843D001884078C1F30B010009D9\n:10FEF00005F07BFC00283AD000212846FFF7A1F945\n:10FF0000A0B38DF80C608DF808608DF8046062680D\n:10FF1000FF2592F8500008280CBF02210121A0689B\n:10FF2000C37813F03F0F1CBF007910F0020F12D0FE\n:10FF300092F8800005F0D4F868B901AA03A902A8D4\n:10FF4000FFF7FAFE606890F831509DF80C00002829\n:10FF500018BF45F002052B469DF804209DF80810B7\n:10FF60009DF80C0000F0D5F9054603E0FFE705F029\n:10FF7000FDFA0225606890F85200002800F05281D6\n:10FF8000F8F7D2FDF7F7C1FE606880F8526000F024\n:10FF900049B9A068FDF708FF0646A1686068CA78FD\n:10FFA00090F86D309A4221D10A7990F86E309A42D9\n:10FFB0001CD14A7990F86F309A4217D18A7990F81B\n:10FFC00070309A4212D1CA7990F871309A420DD1AC\n:10FFD0000A7A90F872309A4208D1097890F8740041\n:10FFE000C1F38011814208BF012500D00025F8F738\n:10FFF00031FC9A48F8F7BCFD002808BF84F800805F\n:020000040002F8\n:10000000F8F79DFD042E11D185B120787F2808BF17\n:10001000FFDF94F9003084F80080606890F8732066\n:1000200090F87D1090F8540005F06EFB062500F066\n:10003000F9B802278948F8F79BFD002808BF84F823\n:100040000080F8F77CFDA068FDF7AEFE0546A068CD\n:10005000FEF788F8082D08BF00287CD1A0684FF073\n:100060000301C27812F03F0F75D0007931EA000029\n:1000700071D1606800E095E000F1500890F8390017\n:10008000002814BF98F8066098F803604FF0000944\n:1000900098F8020078B1FDF787FC0546FF280AD0E2\n:1000A0000146A068401DFDF758FCB5420CBF4FF05B\n:1000B00001094FF000090021A068FDF707FF0622A3\n:1000C00008F11D01EEF78CF940B9A068FDF795FE27\n:1000D00098F82410884208BF012000D0002059EA77\n:1000E00000095DD0606800F1320590F831A098F801\n:1000F000010038B13046FDF74BFD00281CBF054616\n:100100004FF0010A4FF00008A06801784FEAD11BB8\n:100110000121FDF7DBFEBBF1000F07D0407900F0B5\n:10012000C000402808BF4FF0010B01D04FF0000B7A\n:100130000121A068FDF7CAFE06222946EEF750F914\n:1001400030B9A068FDF766FE504508BF012501D013\n:100150004FF0000500E023E03BEA050018BFFF2E4A\n:100160000DD03046FDF7D3FB060008D00121A06872\n:10017000FDF7ACFE01463046F9F714FA804645EA31\n:10018000080019EA000F0BD060680121643005F007\n:1001900045FB01273846FFF737FA052002F045F8FE\n:1001A0003D463FE002252D48F8F7E2FC002808BF55\n:1001B00084F80080F8F7C3FCA068FDF7F5FD06465B\n:1001C000A068FDF7CFFF072E08BF00282AD1A0683E\n:1001D0004FF00101C27812F03F0F23D00279914312\n:1001E00020D1616801F150060021FDF76FFE062263\n:1001F00006F11D01EEF7F4F8A0B9A068FDF7FDFDCA\n:1002000096F8241088420DD160680121643005F011\n:1002100005FBFF21022000F009F8002818BF032584\n:1002200000E0FFDF07B02846BDE8F08F2DE9F0437E\n:100230000A4C0F4601466068002683B090F87D2086\n:10024000002A35D090F8500008280CBF022501255F\n:10025000A168C87810F03F0F02E000007401002090\n:10026000FD484FF000084FF07F0990F900001CBFD7\n:10027000097911F0100F22D07F2808BFFFDF94F911\n:10028000001084F80090606890F85420CDE90021B7\n:10029000029590F8733090F8802000F132013846D2\n:1002A00004F0C0FF05F0AAFA10B305F050F92CE0F5\n:1002B000002914BF0221012180F87D10C2E77F28A8\n:1002C00008BFFFDF94F9001084F80090606890F890\n:1002D0005420CDE90021029590F8733090F88020E9\n:1002E00000F13201384604F09DFF05F030F90CE0D2\n:1002F0000220FFF79EFC30B16068012680F86C8018\n:10030000F8F7A8FA01E005F031F903B03046BDE88E\n:10031000F0832DE9F047D04C054684B09A46174645\n:100320000E46A068FDF71EFF4FF00109002800F0FF\n:10033000CF804FF00208012808D0022800F00E817B\n:1003400005F014F904B04046BDE8F087A068092123\n:10035000C27812F03F0F00F059810279914340F0CA\n:100360005581616891F84010032906D012F0020F00\n:1003700008BFFF2118D05DB115E00021FDF7A6FDF3\n:1003800061680622C96B1A31EEF72AF848BB1EE0F5\n:10039000FDF740FD05460121A068FDF797FD2946C0\n:1003A000F7F7FFFF18B15146012000F051B960681E\n:1003B00090F84100032818BF022840F02781002E42\n:1003C0001CBFFE21012040F0438100F01FB9A0684E\n:1003D000FDF713FD6168C96B497E884208BF01269D\n:1003E00000D00026A068C17811F03F0F05D0017938\n:1003F00011F0020F01D06DB338E0616891F842202E\n:10040000012A01D096B11BE0D6B90021FDF75EFDAF\n:1004100061680268C96BC1F81A208088C883A06827\n:10042000FDF7EBFC6168C96B487609E091F8530071\n:1004300091F85610884203D004B04046BDE8F087DA\n:100440006068643005F02EFA002840D004B00F2018\n:10045000BDE8F08767B1FDF7DDFC05460121A06826\n:10046000FDF734FD2946F7F79CFF08B1012200E0B3\n:100470000022616891F84200012807D040B92EB9E6\n:1004800091F8533091F856108B4201D1012100E0D0\n:1004900000210A421BD0012808BF002E11D14FF0C5\n:1004A0000001A068FDF712FD61680268C96BC1F820\n:1004B0001A208088C883A068FDF79FFC6168C96B1B\n:1004C00048766068643005F0EDF90028BED19DE003\n:1004D00060682F46554690F840104FF002080329F7\n:1004E000AAD0A168CA7812F03F0F1BBF097911F09A\n:1004F000020F002201224FF0FF0A90F85010082945\n:100500000CBF0221012192B190F8800004F0E8FDB7\n:1005100068B95FB9A068FDF77DFC07460121A068B6\n:10052000FDF7D4FC3946F7F73CFF48B1AA465146DF\n:100530000020FFF77BFE002818BF4FF003087BE781\n:10054000606890F84100032818BF02287FF474AF58\n:10055000002E18BF4FF0FE0AE9D16DE7616891F8EF\n:100560004030032B52D0A0684FF0090CC27812F033\n:100570003F0F4BD002793CEA020C47D1022B06D048\n:1005800012F0020F08BFFF2161D0E5B35EE012F068\n:10059000020F4FF07F0801D04DB114E001F164006B\n:1005A00005F080F980B320787F2842D013E067B34C\n:1005B000FDF730FC05460121A068FDF787FC2946C0\n:1005C000F7F7EFFE08B36068643005F06BF9D8B157\n:1005D00020787F282DD094F9001084F8008060687E\n:1005E00090F85420CDE90021CDF8089090F87330B0\n:1005F00090F8802000F13201504604F013FE0D20E7\n:1006000004B0BDE8F08716E000E001E00220F7E763\n:10061000606890F84100032818BF0228F6D1002E28\n:10062000F4D04FF0FE014FF00200FEF744F9022033\n:10063000E6E7FFDFCFE7FDF7EDFB05460121A06808\n:10064000FDF744FC2946F7F7ACFE38B151460220CD\n:10065000FEF731F9DAE7000074010020606890F8D5\n:100660004100032818BF0228D0D1002E1CBFFE2154\n:100670000220EDD1CAE72DE9F84F4FF00008F74806\n:10068000F8F776FA7F27F54C002808BF2770F8F7AF\n:1006900056FAA068FDF788FB81460121FEF7D1FDDF\n:1006A000616891F88020012A14D0042A1CBF082A0E\n:1006B000FFDF00F0D781606890F8520038B1F8F79A\n:1006C00033FAF7F722FB6168002081F852004046B8\n:1006D000BDE8F88F0125E24EB9F1080F3AD2DFE804\n:1006E00009F03EC00439393914FC0546F8F7B2F870\n:1006F000002D72D0606890F84000012818BF0228D1\n:100700006BD120787F2869D122E018B391F840009E\n:10071000022802D0012818D01CE020787F2808BFCA\n:10072000FFDF94F90000277000906068FF2190F8C7\n:10073000733090F85420323004F02FFF61680020AD\n:100740004FF00C0881F87D00B5E720787F2860D154\n:10075000FFDF5EE0F8F77EF84FF00608ABE74FF0FA\n:100760000008002800F0508191F84000022836D09F\n:1007700001284BD003289ED1A068CA6BC37892F899\n:100780001AC0634521D1037992F81BC063451CD17F\n:10079000437992F81CC0634517D1837992F81DC044\n:1007A000634512D1C37992F81EC063450DD1037A17\n:1007B00092F81FC0634508D1037892F819C0C3F3BB\n:1007C0008013634508BF012300D0002391F8421035\n:1007D00001292CD0C3B300F013B93FE019E0207811\n:1007E0007F2808BFFFDF94F9000027700090606841\n:1007F000FF2190F8733090F85420323004F0CDFE91\n:1008000060684FF00C0880F87D5054E720787F280E\n:100810009ED094F90000277000906068FF2190F846\n:10082000733090F85420323004F0B7FE16E0002BFD\n:100830007ED102F11A01FDF7C2FAA068FDF7DDFAD8\n:100840006168C96B4876DBE0FFE796F85600082838\n:1008500070D096F8531081426AD0D5E04FF0060868\n:1008600029E7054691F8510000280CBF4FF0010B15\n:100870004FF0000B4FF00008A06810F8092BD209C8\n:1008800007D0407900F0C000402808BF4FF0010AAF\n:1008900001D04FF0000A91F84000032806D191F8EA\n:1008A0003900002818BF91F8569001D191F8539063\n:1008B0004846FDF72CF80090D8B34846FCF75BFE9D\n:1008C000002818BF4FF0010BBAF1000F37D0A06815\n:1008D000A14600F10901009800E0B6E0F8F762FED9\n:1008E0005FEA0008D9F8040090F8319018BF49F089\n:1008F0000209606890F84010032924D0F7F7AAFF96\n:10090000002DABD0F7F75DFD002808BFB8F1000F50\n:100910007DD020787F2808BFFFDF94F90000277082\n:1009200000906068494690F8733090F8542002E0D7\n:1009300066E004E068E0323004F02FFE8EE7606885\n:1009400090F83190D5E7A168C06BCA78837E9A424F\n:100950001BD10A79C37E9A4217D14A79037F9A4202\n:1009600013D18A79437F9A420FD1CA79837F9A4201\n:100970000BD10A7AC37F9A4207D10978407EC1F32E\n:100980008011814208BF012700D0002796F853004C\n:10099000082806D096F85610884208BF4FF0010983\n:1009A00001D04FF00009B8F1000F05D1BBF1000FE5\n:1009B00004D0F7F706FD08B1012000E000204DB19A\n:1009C00096F84210012903D021B957EA090101D054\n:1009D000012100E00021084216D0606890F8421022\n:1009E000012908BF002F0BD1C06B00F11A01A068CC\n:1009F000FDF7E5F9A068FDF700FA6168C96B487674\n:100A00004FF00E0857E602E0F7F724FF26E760688C\n:100A100090F84100032818BF02287FF41FAFBAF1F5\n:100A2000000F3FF41BAF20787F2808BFFFDF94F949\n:100A30000000277000906068FE2190F8733090F8F5\n:100A40005420323004F0A9FD08E791F8481000293D\n:100A500018BF00283FF47EAE0BE0000074010020B8\n:100A600044110020B9F1070F7FF474AE00283FF461\n:100A700071AEFEF790FC80461DE60000D0F8001134\n:100A800049B1D0E941231A448B691A448A61D0E9FB\n:100A90003F12D16003E0FE4AD0F8FC101162D0E9A9\n:100AA0003F1009B1086170470028FCD00021816126\n:100AB00070472DE9FF4F06460C46488883B040F248\n:100AC000E24148430190E08A002500FB01FA94F8D6\n:100AD0007C0090460D2822D00C2820D024281ED03F\n:100AE00094F87D0024281AD000208346069818B177\n:100AF0000121204603F0C0F894F8641094F86500D2\n:100B0000009094F8F0200F464FF47A794AB1012A08\n:100B100061D0022A44D0032A5DD0FFDFB5E0012076\n:100B2000E3E7B8F1000F00D1FFDFD94814F8641FE4\n:100B3000243090F83400F0F7C4FC01902078F8F7E6\n:100B4000CFFB4D4600F2E730B0FBF5F1DFF8409304\n:100B5000D9F80C0001EB00082078F8F7C1FB01463A\n:100B600014F86409022816D0012816D040F6340083\n:100B700008444AF2EF010844B0FBF5F10198D9F8B6\n:100B80001C20411A514402EB08000D18012084F882\n:100B9000F0002D1D78E02846EAE74FF4C860E7E74B\n:100BA000DFF8EC92A8F10100D9F80810014300D158\n:100BB000FFDFB848B8F1000F016801EB0A0506D065\n:100BC000D9F8080000F22630A84200D9FFDF032040\n:100BD00084F8F00058E094F87C20019D242A05D088\n:100BE00094F87D30242B01D0252A3AD1B4F8702016\n:100BF000B4F81031D21A521C12B2002A31DB94F828\n:100C0000122172B3174694F8132102B110460090D6\n:100C1000022916D0012916D040F6340049F60852B0\n:100C20008118022F12D0012F12D040F63400104448\n:100C3000814210D9081A00F5FA70B0FBF9F00544AA\n:100C40000FE04846EAE74FF4C860E7E74846EEE7BA\n:100C50004FF4C860EBE7401A00F5FA70B0FBF9F00A\n:100C60002D1AB8F1000F0FD0DFF82482D8F8080051\n:100C700018B9B8F8020000B1FFDFD8F8080000F298\n:100C80002630A84200D9FFDF05B9FFDF2946D4F896\n:100C9000F400F4F750FFC4F8F400B06000203070A6\n:100CA0004FF0010886F80480204603F040F8ABF1CD\n:100CB0000101084202D186F8058005E094F8F000B1\n:100CC000012844D003207071606A3946009A01F00F\n:100CD00042FBF060069830EA0B0035D029463046DA\n:100CE000F0F7BAF987B2204603F021F8B8420FD8DE\n:100CF000074686F8058005FB07F1D4F8F400F4F701\n:100D00001AFFB06029463046F0F7A6F9384487B29A\n:100D10003946204602F0B0FFB068C4F8F400A06E77\n:100D2000002811D0B4F87000B4F89420801A01B2F1\n:100D3000002909DD34F86C0F0144491E91FBF0F1E4\n:100D400089B201FB0020208507B0BDE8F08F0220AA\n:100D5000B9E72DE9F04106460C46012001F0DBFA27\n:100D6000C5B20B2001F0D7FAC0B2854200D0FFDF38\n:100D70000025082C7ED2DFE804F00461696965C6AD\n:100D80008293304601F0DDFA0621F3F78FF8040074\n:100D900000D1FFDF304601F0D4FA2188884200D02C\n:100DA000FFDF94F8F00000B9FFDF204602F00FFEED\n:100DB000374E21460020B5607580F561FDF7E9FCEE\n:100DC00000F19807606AB84217D994F86500F7F700\n:100DD0000BF9014694F864004FF47A72022828D087\n:100DE000012828D040F6340008444AF2473108442C\n:100DF000B0FBF2F1606A0844C51B21460020356152\n:100E0000FDF7C7FC618840F2E24251439830081A6E\n:100E1000A0F22630706194F8652094F86410606A3E\n:100E200001F099FAA0F5CB70B061BDE8F041F5F79B\n:100E300060BE1046D8E74FF4C860D5E7BDE8F04182\n:100E400002F02FBEBDE8F041F7F7D5BE304601F005\n:100E500078FA0621F3F72AF8040000D1FFDF3046C4\n:100E600001F06FFA2188884200D0FFDF01220021C3\n:100E7000204600E047E0BDE8F04101F089BAF7F70D\n:100E800073FDF7F7B8FE02204FF0E02104E0000008\n:100E9000CC11002084010020C1F88002BDE8F0815F\n:100EA000304601F04EFA0621F3F700F8040000D1B5\n:100EB000FFDF304601F045FA2188884200D0FFDF8D\n:100EC00094F8F000042800D0FFDF84F8F05094F884\n:100ED000FA504FF6FF76202D00D3FFDFFA4820F8B6\n:100EE000156094F8FA00F5F720F900B9FFDF20202B\n:100EF00084F8FA002046FFF7C1FDF4480078BDE809\n:100F0000F041E2F701B8FFDFC8E770B5EE4C00250D\n:100F1000443C84F82850E07868B1E570FEF71EF98B\n:100F20002078042803D0606AFFF7A8FD6562E748CF\n:100F30000078E1F7E9FFBDE8704001F03ABA70B51A\n:100F4000E14C0146443CE069F5F706FE6568A2788D\n:100F500090FBF5F172B140F27122B5FBF2F292B260\n:100F6000A36B01FB02F6B34202D901FB123200E08F\n:100F70000022A2634D43002800DAFFDF2946E06922\n:100F8000F4F7D9FDE06170BD2DE9F05FFEF736F9A9\n:100F90008246CD48683800F1240881684646D8F872\n:100FA0001800F4F7C8FD0146F069F5F7D5FD4FF0DC\n:100FB0000009074686F835903C4640F28F254E469C\n:100FC0001EE000BF0AEB06000079F7F70DF80146B6\n:100FD0004AF2B12001444FF47A70B1FBF0F008EB13\n:100FE0008602414692681044844207D3241A91F83D\n:100FF0003500A4F28F24401C88F83500761CF6B228\n:1010000098F83600B042DDD8002C10DD98F8351085\n:10101000404608EB81018968A14208D24168C91B9A\n:10102000B1F5247F00D30D466C4288F8359098F8CE\n:101030003560C3460AEB060898F80400F6F7D4FFBB\n:101040004AF2B12101444FF47A7AB1FBFAF298F8EE\n:101050000410082909D0042909D0002013180429F4\n:101060000AD0082908D0252207E0082000E0022045\n:1010700000EB40002830F1E70F22521D4FF4A8701A\n:10108000082914D0042915D0022916D04FF0080CD5\n:101090005FF0280012FB0C00184462190BEB86036A\n:1010A00010449A68D84690420BD8791925E04FF041\n:1010B000400CEFE74FF0100CECE74FF0040C182059\n:1010C000E8E798F8352098F836604046B24210D2EA\n:1010D000521C88F835203C1B986862198418084611\n:1010E000F6F782FF4AF2B1210144B1FBFAF001198F\n:1010F00003E080F83590D8F80410D8F81C00BDE85B\n:10110000F05FF4F718BD2DE9FE4F14460546FEF7D3\n:1011100075F8DFF8B4A10290AAF1440A50469AF893\n:1011200035604FF0000B0AEB86018968CAF83C1065\n:10113000F4B3044600780027042825D005283ED0C3\n:10114000FFDFA04639466069F4F7F5FC0746F5F77E\n:101150000BF881463946D8F80440F5F7FDFC401EEF\n:1011600090FBF4F0C14361433846F4F7E4FC0146D8\n:10117000C8F81C004846F5F7EFFC002800DDFFDF4B\n:10118000012188F813108DE0D4F81490D4F804806D\n:1011900001F07AF9070010D0387800B9FFDF7969DB\n:1011A00078684A460844414601F05AF9074600E08B\n:1011B0000BE04045C5D9FFDFC3E75F46C1E7606A82\n:1011C00001F004F940F6B837BBE7C1690AEB460005\n:1011D0000191408D10B35446DAF81400FFF7AFFECA\n:1011E0006168E069F4F7A7FC074684F835B0019C14\n:1011F000D0462046DAF81410F5F7AEFC81463946A1\n:101200002046F5F7A9FCD8F804200146B9FBF2F016\n:10121000B1FBF2F1884242D0012041E0F4F7A4FF93\n:10122000FFF78DFEFFF7B0FE9AF83510DAF804905C\n:101230000AEB81010746896800913946DAF81C00FB\n:10124000F5F78AFC00248046484504DB98FBF9F456\n:1012500004FB09F41AE0002052469AF8351007E022\n:1012600002EB800304F28F249B68401C1C44C0B234\n:101270008142F5D851B10120F6F7B6FE4AF2B1210C\n:1012800001444FF47A70B1FBF0F004440099A8EBEC\n:1012900004000C1A00D5FFDFCAF83C40A7E7002085\n:1012A00088F813009AF802005446B8B13946E0694C\n:1012B000F5F752FC0146A26B40F2712042438A428C\n:1012C00006D2C4F83CB009E03412002080010020AE\n:1012D000E06B511A884200D30846E063AF6085F89E\n:1012E00000B001202871029F94F835003F1DC05DB9\n:1012F000F6F77AFE4AF23B5101444FF47A70B1FBA3\n:10130000F0F0E16BFE300844E8602078042808D152\n:1013100094F8350004EB4000408D0A2801D20320E8\n:1013200000E00220687104EB4600408DC0B1284601\n:101330006168EFF791FE82B20020761C0CE000BFDE\n:1013400004EB4001B0424B8D13449BB24B8501D35B\n:101350005B1C4B85401CC0B294F836108142EFD222\n:10136000A8686061A06194F8350004EB4001488DE5\n:10137000401C488594F83500C05D082803D0042837\n:1013800003D000210BE0082100E0022101EB410124\n:1013900028314FF4A872082804D0042802D002286B\n:1013A00007D028220A44042805D0082803D0252184\n:1013B00002E01822F6E70F21491D08280CD0042866\n:1013C0000CD002280CD0082011FB0020E16B8842D1\n:1013D00008D20120BDE8FE8F4020F5E71020F3E79A\n:1013E0000420F1E70020F5E770B5FE4C061D14F867\n:1013F000352F905DF6F7F8FD4FF47A7100F2E73083\n:10140000B0FBF1F0D4F8071045182078805DF6F7AE\n:1014100073FE2178895D082903D0042903D00022B6\n:101420000BE0082200E0022202EB420228324FF4D5\n:10143000A873082904D0042902D0022907D0282340\n:101440001344042905D0082903D0252202E01823DB\n:10145000F6E70F22521D08290AD004290AD00229D2\n:101460000AD0082112FB0131081A281A293070BD50\n:101470004021F7E71021F5E70421F3E72DE9FF41CB\n:1014800007460C46012000F046FFC5B20B2000F0D5\n:1014900042FFC0B2854200D0FFDF20460126002572\n:1014A000D04C082869D2DFE800F004304646426894\n:1014B0006865667426746078002819D1FDF79EFE71\n:1014C000009594F835108DF808104188C90411D0A2\n:1014D000206C019003208DF80900C24824388560F3\n:1014E000C56125746846FDF768FB002800D0FFDF62\n:1014F000BDE8FF81FFF778FF0190E07C10B18DF827\n:101500000950EAE78DF80960E7E7607840B1207C90\n:1015100008B9FDF7F9FD6574BDE8FF41F4F72FBD8B\n:10152000A674FDF739FC0028E2D0FFDFE0E7BDE854\n:10153000FF41F7F760BBFDF761FE4088C00407D0AC\n:1015400001210320FDF75EFEA7480078E1F7DCFCEF\n:10155000002239466846FFF7D6FD38B1694638465D\n:1015600000F0EDFE0028C3D1FFDFC1E7E670FFF712\n:10157000CCFCBDE7BDE8FF41C7E4FFDFB8E7994910\n:1015800050B101228A704A6840F27123B2FBF3F233\n:1015900002EB0010886370470020887070472DE9C7\n:1015A000F05F894640F271218E4E48430025044683\n:1015B000706090462F46D0074AF2B12A4FF47A7BEA\n:1015C0000FD0B9F800004843B0600120F6F70CFDD9\n:1015D00000EB0A01B1FBFBF0241AB7680125A4F265\n:1015E0008F245FEA087016D539F8151040F2712083\n:1015F000414306EB85080820C8F80810F6F7F4FC0C\n:1016000000EB0A01B1FBFBF0241AD8F80800A4F2A1\n:101610008F2407446D1CA74219D9002D17D0391B00\n:10162000B1FBF5F0B268101AB1FBF5F205FB12122E\n:10163000801AB060012008E0B1FBF5F306EB8002F0\n:101640009468E31A401CC0B29360A842F4D3BDE88A\n:10165000F09F2DE9F041634C00262078042804D047\n:101660002078052801D00C2018E401206070607CEF\n:10167000002538B1EFF3108010F0010F72B610D0D2\n:1016800001270FE0FDF7BAFD074694F82000F5F7B3\n:10169000B2F87888C00411D000210320FDF7B2FD14\n:1016A0000CE00027607C38B1A07C28B1FDF72CFD50\n:1016B0006574A574F4F763FC07B962B694F820006A\n:1016C000F5F705FB94F8280030B184F8285020780D\n:1016D000052800D0FFDF0C26657000F06AFE30465A\n:1016E00012E4404810B5007808B1FFF7B2FF00F0EF\n:1016F000D4FE3C4900202439086210BD10B53A4C94\n:1017000058B1012807D0FFDFA06841F66A0188427E\n:1017100000D3FFDF10BD40F6C410A060F4E73249EB\n:1017200008B508702F4900200870487081F828001B\n:10173000C8700874487488742022486281F8202098\n:10174000243948704FF6FF7211F1680121F810201A\n:10175000401CC0B22028F9D30020FFF7CFFFFFF7CD\n:10176000C0FF1020ADF80000012269460420FFF7F9\n:1017700016FF08BD7FB51B4C05460E46207810B1FC\n:101780000C2004B070BD95F8652095F86410686A67\n:1017900000F0C5FEC5F80401656295F8F00000B1DF\n:1017A000FFDF104900202439C861052121706070D5\n:1017B00084F82800014604E004EB4102491C5085EE\n:1017C000C9B294F836208A42F6D284F83500304601\n:1017D000FFF7D5FE0548F4F74DFC84F820002028DB\n:1017E00007D105E0F0110020800100207D140200E7\n:1017F000FFDFF4F7B9FC606194F82010012268461D\n:10180000FFF781FC00B9FFDF94F82000694600F083\n:1018100096FD00B9FFDF0020B3E7F94810B5007866\n:1018200008B1002010BD0620F2F7DAFA80F00100BE\n:1018300010BDF8B5F24D0446287800B1FFDF002056\n:10184000009023780246DE0701466B4605D060888B\n:10185000A188ADF80010012211462678760706D53A\n:10186000E088248923F8114042F00802491C491EEF\n:1018700085F836101946FFF792FE0020F8BD1FB517\n:1018800011B1112004B010BDDD4C217809B10C203C\n:10189000F8E70022627004212170114605E000BFC4\n:1018A00004EB4103491C5A85C9B294F836308B4287\n:1018B000F6D284F83520FFF762FED248F4F7DAFB5F\n:1018C00084F82000202800D1FFDF00F0DDFD10B1FA\n:1018D000F4F74AFC05E0F4F747FC40F6B831F4F7BA\n:1018E0002AF9606194F8201001226846FFF70BFC8A\n:1018F00000B9FFDF94F82000694600F020FD00B930\n:10190000FFDF0020BEE770B5BD4C616A0160FFF7E4\n:10191000A0FE050002D1606AFFF7B0F80020606207\n:10192000284670BD7FB5B64C2178052901D00C2022\n:1019300027E7B3492439C860606A00B9FFDF606AED\n:1019400090F8F00000B1FFDF606A90F8FA002028FC\n:1019500000D0FFDFAC48F4F78DFB616A0546202814\n:1019600081F8FA000E8800D3FFDFA548443020F844\n:101970001560606A90F8FA00202800D1FFDF00238C\n:1019800001226846616AFFF794F8606A694690F838\n:10199000FA0000F0D4FC00B9FFDF00206062F0E63E\n:1019A000974924394870704710B540F2E24300FB74\n:1019B00003F4002000F0B3FD844201D9201A10BDC9\n:1019C000002010BD70B50D46064601460020FCF70C\n:1019D000E0FE044696F86500F6F706FB014696F829\n:1019E00064004FF47A72022815D0012815D040F611\n:1019F000340008444AF247310844B0FBF2F17088E1\n:101A000040F271225043C1EB4000A0F22630A542C3\n:101A100006D2214605E01046EBE74FF4C860E8E740\n:101A20002946814204D2A54201D2204600E0284640\n:101A3000706270BD70B50546FDF7E0FB7049007837\n:101A400024398C689834072D30D2DFE805F004344F\n:101A500034252C34340014214FF4A873042810D0FA\n:101A60000822082809D02A2102280FD011FB0240A1\n:101A700000222823D118441819E0402211FB02400B\n:101A8000F8E7102211FB02402E22F3E7042211FB9B\n:101A9000024000221823EDE7282100F04BFC04440B\n:101AA00004F5317403E004F5B07400E0FFDF54483E\n:101AB000C06BA04201D9012070BD002070BD70B57F\n:101AC0004F4C243C607870B1D4E904512846A26898\n:101AD000EFF7EDFA2061A84205D0A169401B084448\n:101AE000A061F5F706F82169A068884201D820783E\n:101AF00008B1002070BD012070BD2DE9F04F0546F2\n:101B000085B016460F461C461846F6F7F5FA05EB63\n:101B100047014718204600F0F5FB4AF2C5714FF423\n:101B20007A7908444D46B0FBF5F0384400F160087E\n:101B30003348761C24388068304404902046F6F7F9\n:101B4000DBFAA8EB0007204600F0DCFB0646204647\n:101B5000F6F74AFA301AB0FBF5F03A1A18252820A1\n:101B60004FF4C8764FF4BF774FF0020B082C30D0FB\n:101B7000042C2BD00021022C2ED0082311F1280197\n:101B800003EB830C0CEB831319440A444FF0000A57\n:101B9000082C29D0042C22D00021022C29D0054663\n:101BA000082001F5B07100BF00EB0010284481420D\n:101BB00032D2082C2AD0042C1ED00020022C28D08F\n:101BC0000821283001EB0111084434E03946102384\n:101BD000D6E731464023D3E704231831D0E73D460A\n:101BE00040F2EE311020DFE735464FF435614020FA\n:101BF000DAE70420B431D7E738461021E2E70000E5\n:101C0000F01100207D140200530D020030464021E7\n:101C1000D8E704211830D5E7082C4FD0042C4AD03F\n:101C20000021022C4DD0082311F12801C3EBC30081\n:101C300000EB4310084415182821204600F07AFBD9\n:101C400005EB4001082C42D0042C3DD00026022C8C\n:101C50003FD0082016F1280600EB801006EB80002C\n:101C60000E180120FA4D8DF804008DF800A08DF8B3\n:101C700005B0A86906F22A260499F3F75CFFCDE9BE\n:101C800002062046F6F7B0F94AF23B510144B1FB97\n:101C9000F9F0301AFE38E8630298C5F84080A86170\n:101CA00095F82000694600F04AFB002800D1FFDFCC\n:101CB00005B0BDE8F08F39461023B7E73146402321\n:101CC000B4E704231831B1E73E461020C4E74020B2\n:101CD000C2E704201836BFE72DE9FE4F06461C4632\n:101CE000174688464FF0010A1846F6F705FAD84D10\n:101CF000243DA9688A1907EB48011144471820467A\n:101D000000F000FB4FF47A7BD84600F6FB00B0FBF6\n:101D1000F8F0384400F120092046F6F7EDF9A968FB\n:101D20000246A9EB0100801B871A204600F0EAFA60\n:101D300005462046F6F758F9281AB0FBF8F03A1A8B\n:101D4000182528204FF4C8774FF4BF78082C2DD0E1\n:101D5000042C28D00021022C2BD0082311F12801BB\n:101D600003EB830C0CEB831319440A44082C28D092\n:101D7000042C21D00021022C28D00546082001F592\n:101D8000B07100BF00EB0010284481422AD2082C19\n:101D900022D0042C1DD00020022C20D00821283075\n:101DA00001EB01112CE041461023D9E739464023CD\n:101DB000D6E704231831D3E7454640F2EE31102030\n:101DC000E0E73D464FF435614020DBE70420B431C5\n:101DD000D8E740461021E3E738464021E0E70421F8\n:101DE0001830DDE7082C48D0042C43D00020022C0A\n:101DF00046D0082110F12800C1EBC10303EB4111CB\n:101E0000084415182821204600F094FA05EB4001FB\n:101E1000082C3BD0042C36D00027022C38D00820C8\n:101E200017F1280700EB801007EB80000C1804F571\n:101E300096740C98F6F7D8F84AF23B510144B1FB7E\n:101E4000FBF0834DFE30A5F12407E96B06F1FE029D\n:101E50000844B9680B191A44824224D93219114432\n:101E60000C1AFE342044B0F1807F37D2642C12D299\n:101E7000642011E040461021BEE738464021BBE710\n:101E800004211830B8E747461020CBE74020C9E7C7\n:101E900004201837C6E720460421F4F790FEE8B185\n:101EA000E86B2044E863E0F703FFB9682938314460\n:101EB0000844CDE9000995F835008DF808000220A6\n:101EC0008DF809006846FCF778FE00B1FFDFFCF7EB\n:101ED00063FF00B1FFDF5046BDE8FE8F4FF0000A00\n:101EE000F9E71FB500F021FB594C607880B994F8F0\n:101EF000201000226846FFF706F938B194F8200058\n:101F0000694600F01CFA18B9FFDF01E00120E0701B\n:101F1000F4F735F800206074A0741FBD2DE9F84F68\n:101F2000FDF76CF90646451CC07840090CD0012825\n:101F30000CD002280CD000202978824608064FF4E5\n:101F4000967407D41E2006E00120F5E70220F3E78F\n:101F50000820F1E72046B5F80120C2F30C0212FB7D\n:101F600000F7C80901D010B103E01E2401E0FFDF33\n:101F70000024F6F7D3F8A7EB00092878B77909EB26\n:101F80000408C0F3801010B120B1322504E04FF4F2\n:101F9000FA7501E0FFDF00250C2F00D3FFDF2D488D\n:101FA0002D4A30F81700291801FB0821501CB1FBFD\n:101FB000F0F5F6F76DF8F6F717F84FF47A7100F2CE\n:101FC0007160B0FBF1F1A9EB0100471BA7F15900CB\n:101FD000103FB0F5247F11D31D4E717829B9024608\n:101FE000534629462046FFF788FD00F09EFAF3F796\n:101FF000C6FF00207074B074BDE8F88F3078009090\n:102000005346224629463846FFF766FE0028F3D19C\n:1020100001210220FDF7F6F8BDE8F84F61E710B5A1\n:102020000446012903D10A482438007830B104203D\n:1020300084F8F000BDE81040F3F7A1BF00220121B1\n:10204000204600F0A5F934F8700F401C2080F1E71D\n:10205000F0110020646302003F420F002DE9F041BF\n:102060000746FDF7CBF8050000D1FFDF287810F018\n:102070000C0F01D0012100E00021F74C606A3030E4\n:10208000FCF7C7FA29783846EFF71BFAA4F12406C3\n:102090000146A069B26802446FB32878082803D0CB\n:1020A000042803D000230BE0082300E0022303EB05\n:1020B000430328334FF4A877082804D0042802D01B\n:1020C000022810D028273B4408280ED004280ED020\n:1020D00002280ED05FF00800C0EBC00707EB4010ED\n:1020E0001844983009E01827EDE74020F4E7102065\n:1020F000F2E70420F0E74FF4FC701044471828780A\n:102100003F1DF5F771FF014628784FF47A720228D7\n:102110001DD001281DD040F6340008444AF2EF01DA\n:102120000844B0FBF2F03A1A606A40F2E241B0466D\n:102130004788F0304F43316A81420DD03946206BD9\n:1021400000F08EF90646B84207D9FFDF05E01046D9\n:10215000E3E74FF4C860E0E70026C04880688642A5\n:1021600007D2616A40F271224888424306EB420678\n:1021700004E040F2E240B6FBF0F0616AC882606AB7\n:10218000297880F86410297880F865100521417558\n:10219000C08A6FF41C71484306EB400040F635419D\n:1021A000C8F81C00B0EB410F00D3FFDFBDE8F081A1\n:1021B00010B5052937D2DFE801F00509030D31001C\n:1021C000002100E00121BDE8104028E7032180F84C\n:1021D000F01010BD0446408840F2E24148439F4958\n:1021E000091D0860D4F818010089E082D4F81801AC\n:1021F00080796075D4F8180140896080D4F818019E\n:102200008089A080D4F81801C089E0802046A16AA6\n:10221000FFF7D8FB022084F8F00010BD816ABDE80A\n:102220001040FFF7CFBBFFDF10BD70B58A4C243CD8\n:102230000928A1683FD2DFE800F0050B0B15131544\n:1022400038380800BDE870404BE6BDE8704065E6F0\n:10225000022803D00020BDE87040FFE60120FAE725\n:10226000E16070BD032802D005281CD000E0E160C9\n:102270005FF0000600F059F9774D012085F828003D\n:1022800085F83460686AA9690026C0F8F41080F8FF\n:10229000F060E068FFF746FB00B1FFDFF3F76FFE89\n:1022A0006E74AE7470BD0126E4E76C480078BDE83A\n:1022B0007040E0F729BEFFDF70BD674924394860F0\n:1022C000704770B5644D0446243DB1B14FF47A7641\n:1022D000012903D0022905D0FFDF70BD1846F5F7AC\n:1022E000FCFE05E06888401C68801046F6F7F8FFA1\n:1022F00000F2E730B0FBF6F0201AA86070BD564837\n:1023000000787047082803D0042801D0F5F76CBE88\n:102310004EF628307047002804DB00F1E02090F8EA\n:10232000000405E000F00F0000F1E02090F8140D2B\n:102330004009704710F00C0000D008467047F4F7D1\n:102340003EB910B50446202800D3FFDF4248443090\n:1023500030F8140010BD70B505460C461046F5F770\n:1023600043FE4FF47A71022C0DD0012C0DD040F6B3\n:10237000340210444AF247321044B0FBF1F02844D2\n:1023800000F5CB7070BD0A46F3E74FF4C862F0E782\n:102390001FB513460A46044601466846FEF789FB08\n:1023A00094F8FA006946FFF7CAFF002800D1FFDF62\n:1023B0001FBD70B5284C0025257094F82000F3F758\n:1023C000B4FE00B9FFDF84F8205070BD2DE9F04164\n:1023D000050000D1FFDF204A0024243AD5F804612B\n:1023E0002046631E116A08E08869B04203D3984210\n:1023F00001D203460C460846C9680029F4D104B945\n:1024000004460021C5F80041F035C4B1E068E5603C\n:10241000E86000B105612E698846A96156B1B069CE\n:1024200030B16F69B84200D2FFDFB069C01BA8614C\n:10243000C6F81880084D5CB1207820B902E0E96048\n:102440001562E8E7FFDF6169606808442863ADE66C\n:10245000C5F83080AAE60000F011002080010020BD\n:1024600010B50C4601461046F4F776FB002806DA54\n:10247000211A491EB1FBF4F101FB040010BD90FBD1\n:10248000F4F101FB140010BD2E48016A002001E0A8\n:102490000846C9680029FBD170472DE9FE43294D44\n:1024A0000120287000264FF6FF7420E00621F1F786\n:1024B000FDFC070000D1FFDF97F8FA00F037F4F7D2\n:1024C00006FC07F80A6BA14617F8FA89B8F1200F45\n:1024D00000D3FFDF1B4A683222F8189097F8FA0001\n:1024E000F3F723FE00B9FFDF202087F8FA006946E2\n:1024F0000620F1F764FC50B1FFDF08E0029830B12C\n:1025000090F8F01019B10088A042CFD104E06846DD\n:10251000F1F733FC0028F1D02E70BDE8FE8310B532\n:10252000FFF719FF00F5C87010BD064800212430E0\n:1025300090F8352000EB4200418503480078E0F731\n:10254000E3BC0000CC11002080010020012804D051\n:10255000022805D0032808D105E0012907D004E0AE\n:10256000022904D001E0042901D000207047012095\n:102570007047F748806890F8A21029B1B0F89E1013\n:10258000B0F8A020914215D290F8A61029B1B0F869\n:10259000A410B0F8A02091420CD2B0F89C20B0F862\n:1025A0009A108A4206D290F88020B0F898001AB1AA\n:1025B000884203D3012070470628FBD200207047D1\n:1025C0002DE9F041E24D0746A86800F1700490F84B\n:1025D000140130B9E27B002301212046EEF7D2FC42\n:1025E00010B1A08D401CA08501263D21AFB92878EF\n:1025F000022808D001280AD06878C8B110F0140F5A\n:1026000009D01E2039E0162037E026773EE0A86882\n:1026100090F8160131E0020701D56177F5E78107EF\n:1026200001D02A2029E0800600D4FFDF232024E007\n:1026300094F8320028B1E08D411CE185218E88425A\n:1026400013D294F8360028B1A08E411CA186218EA9\n:1026500088420AD2A18D608D814203D3AA6892F884\n:10266000142112B9228E914201D3222005E0217C4F\n:1026700029B1218D814207D308206077C5E7208DDD\n:10268000062801D33E20F8E7207FB0B10020207358\n:10269000607320740221A868FFF78AFDA86890F88B\n:1026A000E410012904D1D0F81C110878401E0870EC\n:1026B000E878BDE8F041E0F727BCA868BDE8F04144\n:1026C0000021FFF775BDA2490C28896881F8E40054\n:1026D00014D0132812D0182810D0002211280ED0A0\n:1026E00007280BD015280AD0012807D0002805D0CC\n:1026F000022803D021F89E2F012008717047A1F80D\n:10270000A420704710B5924CA1680A88A1F86021F6\n:1027100081F85E0191F8640001F046FBA16881F840\n:10272000620191F8650001F03FFBA16881F8630147\n:10273000012081F85C01002081F82E01E078BDE8DD\n:102740001040E0F7E1BB70B5814C00231946A0684A\n:1027500090F87C207030EEF715FC00283DD0A06882\n:1027600090F820110025C9B3A1690978B1BB90F890\n:102770007D00EEF7EFFB88BBA168B1F870000A2876\n:102780002DD905220831E069EBF72AFE10B3A068C5\n:10279000D0F81C11087858B10522491CE069EBF704\n:1027A0001FFE002819D1A068D0F81C01007840B99C\n:1027B000A068E169D0F81C010A68C0F80120097915\n:1027C0004171A068D0F81C110878401C08700120E5\n:1027D000FFF779FFA06880F8205170BDFFE7A0687F\n:1027E00090F8241111B190F82511C1B390F82E1171\n:1027F0000029F2D090F82F110029EED190F87D0039\n:10280000EEF7A8FB0028E8D1A06890F8640001F07A\n:10281000CBFA0646A06890F8650001F0C5FA0546B7\n:10282000A06890F830113046FFF790FEA0B3A06882\n:1028300090F831112846FFF789FE68B3A268B2F814\n:10284000703092F86410B2F8320102F58872EEF737\n:1028500001FE20B3A168252081F87C00BDE7FFE7D9\n:1028600090F87D10242918D090F87C10242914D0D9\n:102870005FF0000300F5897200F59271FBF78EFEA0\n:10288000A16881F8245101F13000C28A21F8E62FB5\n:10289000408B4880142007E005E00123EAE7BDE80B\n:1028A000704000202EE71620BDE870400BE710B501\n:1028B000F4F7FAFD0C2813D3254C0821A068D0F8B2\n:1028C00018011E30F4F7F4FD28B1A0680421D830B7\n:1028D000F4F7EEFD00B9FFDFBDE810400320F2E69B\n:1028E00010BD10B51A4CA068D0F818110A78002A4B\n:1028F0001FD04988028891421BD190F87C20002388\n:1029000019467030EEF73EFB002812D0A068D0F8D0\n:1029100018110978022907D003290BD0042919D0EE\n:10292000052906D108200DE090F87D00EEF712FB96\n:1029300040B110BD90F8811039B190F8820000B913\n:10294000FFDF0A20BDE81040BDE6BDE81040AEE75D\n:102950008C01002090F8AA008007EAD10C20FFF734\n:10296000B2FEA068002120F89E1F01210171017BA9\n:1029700041F00101017310BD70B5F74CA268556EAE\n:10298000EEF702FDEBB2C1B200228B4203D0A36886\n:1029900083F8121102E0A16881F81221C5F3072122\n:1029A000C0F30720814203D0A16881F8130114E726\n:1029B000A06880F8132110E710B5E74C0421A06847\n:1029C000FFF7F6FBA06890F85A10012908D000F52F\n:1029D0009E71FBF7ACFEE078BDE81040E0F794BADA\n:1029E000022180F85A1010BD70B5DB4CA06890F839\n:1029F000E410FE2955D16178002952D190F87F204A\n:102A0000002301217030EEF7BDFA002849D1A068FB\n:102A100090F8141109B1022037E090F87C200023CF\n:102A200019467030EEF7AEFA28B1A06890F896001B\n:102A300008B1122029E0A068002590F87C20122A15\n:102A40001DD004DC032A23D0112A04D119E0182A4E\n:102A50001AD0232A26D0002304217030EEF792FAF0\n:102A600000281ED1A06890F87D10192971D020DCB3\n:102A700001292AD0022935D0032932D120E00B20A8\n:102A800003E0BDE8704012E70620BDE870401AE69A\n:102A900010F8E21F01710720FFF715FEA06880F80B\n:102AA0007C509AE61820FFF70EFEA068A0F89E5012\n:102AB00093E61D2918D01E2916D0212966D149E098\n:102AC00010F8E11F4171072070E00C20FFF7FBFDBB\n:102AD000A06820F8A45F817941F00101817100F8BC\n:102AE000275C53E013202CE090F8252182BB90F85E\n:102AF0002421B2B1242912D090F87C1024290ED0C0\n:102B00005FF0000300F5897200F59271FBF746FD56\n:102B1000A0681E2180F87D1080F8245103E0012375\n:102B2000F0E71E2932D1A068FBF797FDFFF744FFBD\n:102B3000A16801F13000C28A21F8E62F408B48805D\n:102B40001520FFF7C0FDA068A0F8A45080F87D50C4\n:102B50001CE02AE090F8971051B180F8125180F8EB\n:102B600013511820FFF7AFFDA068A0F8A4500DE0A6\n:102B700090F82F1151B990F82E1139B1C16DD0F8DC\n:102B80003001FFF7F9FE1820FFF79DFDA06890F8CF\n:102B9000E400FE2885D1FFF7A4FEA06890F8E400C9\n:102BA000FE2885D1BDE87040CDE51120FFF78BFDF3\n:102BB000A068CBE7684A0129926819D0002302294E\n:102BC0000FD003291ED010B301282BD0032807D122\n:102BD00092F87C00132803D0162801D0182804D1BD\n:102BE000704792F8E4000028FAD0D2F8180117E0F4\n:102BF00092F8E4000128F3D0D2F81C110878401EA6\n:102C00000870704792F8E4000328EED17047D2F8BC\n:102C10001801B2F870108288891A09B20029F5DB10\n:102C200003707047B2F87000B2F82211401A00B277\n:102C30000028F6DBD2F81C010178491E01707047AC\n:102C400070B5044690F87C0000250C2810D00D28A3\n:102C50002ED1D4F81811B4F870008988401C88422D\n:102C600026D1D4F864013C4E017811B3FFDF42E075\n:102C7000B4F87000B4F82211401C884218D1D4F87E\n:102C80001C01D0F80110A160407920730321204677\n:102C9000EDF7F1FDD4F81C01007800B9FFDF012148\n:102CA000FE20FFF787FF84F87C50012084F8B200F3\n:102CB00093E52188C180D4F81801D4F864114089C3\n:102CC0000881D4F81801D4F8641180894881D4F8B7\n:102CD0001801D4F86411C0898881D4F864010571A1\n:102CE000D4F8641109200870D4F864112088488051\n:102CF000F078E0F709F902212046EDF7BCFD032149\n:102D00002046FFF755FAB068D0F81801007802287D\n:102D100000D0FFDF0221FE20FFF74CFF84F87C503B\n:102D20005BE52DE9F0410C4C00260327D4F808C0E0\n:102D3000012598B12069C0788CF8E20005FA00F00E\n:102D4000C0F3C05000B9FFDFA06800F87C7F468464\n:102D500080F82650BDE8F0818C01002000239CF80B\n:102D60007D2019460CF17000EEF70CF970B1607817\n:102D70000028EFD12069C178A06880F8E11080F8C0\n:102D80007D70A0F8A46080F8A650E3E76570E1E7E5\n:102D9000F0B5F74C002385B0A068194690F87D2067\n:102DA0007030EEF7EFF8012580B1A06890F87C0054\n:102DB00023280ED024280CD06846F6F785FB68B18E\n:102DC000009801A9C0788DF8040008E0657005B08E\n:102DD000F0BD607840F020006070F8E70021A06846\n:102DE00003AB162290F87C00EEF74FFB002648B1AB\n:102DF000A0689DF80C20162180F80C2180F80D1198\n:102E0000192136E02069FBF722FB78B121690879A6\n:102E100000F00702A06880F85C20497901F0070102\n:102E200080F85D1090F82F310BBB03E00020FFF716\n:102E300078FFCCE790F82E31CBB900F164035F78CE\n:102E4000974205D11A788A4202D180F897500EE055\n:102E500000F5AC71028821F8022990F85C200A7113\n:102E600090F85D0048710D70E078E0F74DF8A068CB\n:102E7000212180F87D1080F8A650A0F8A460A6E774\n:102E8000F8B5BB4C00231946A06890F87D2070303F\n:102E9000EEF778F840B32069FBF7BEFA48B3206933\n:102EA000FBF7B4FA07462069FBF7B4FA0646206937\n:102EB000FBF7AAFA05462069FBF7AAFA0146009734\n:102EC000A06833462A463030FBF79BFBA1680125FA\n:102ED00091F87C001C2810D091F85A00012812D0DB\n:102EE00091F8250178B90BE0607840F0010060703E\n:102EF000F8BDBDE8F840002013E781F85A5002E021\n:102F000091F8240118B11E2081F87D000BE01D20EE\n:102F100081F87D0001F5A57231F8300BFBF7FBFB62\n:102F2000E078DFF7F1FFA068002120F8A41F85708A\n:102F3000F8BD10B58E4C00230921A06890F87C20C4\n:102F40007030EEF71FF848B16078002805D1A1680D\n:102F500001F8960F087301F81A0C10BD012060707B\n:102F600010BD7CB5824C00230721A06890F87C201E\n:102F70007030EEF707F838B36078002826D169463C\n:102F80002069FBF75FFA9DF80000002500F025019D\n:102F9000A06880F8B0109DF8011001F0490180F898\n:102FA000B11080F8A250D0F81811008849888142E9\n:102FB00000D0FFDFA068D0F818110D70D0F86411B0\n:102FC0000A7822B1FFDF16E0012060707CBD30F886\n:102FD000E82BCA80C16F0D71C16F009A8A60019A97\n:102FE000CA60C26F0821117030F8E81CC06F4180C0\n:102FF000E078DFF789FFA06880F87C507CBD70B571\n:103000005B4C00231946A06890F87D207030EDF7E6\n:10301000B9FF012540B9A0680023082190F87C2061\n:103020007030EDF7AFFF10B36078002820D1A068B2\n:1030300090F8AA00800712D42069FBF7C9F9A168AB\n:1030400081F8AB00206930F8052FA1F8AC2040884A\n:10305000A1F8AE0011F8AA0F40F002000870A068B5\n:103060004FF0000690F8AA10C90702D011E0657071\n:103070009DE490F87D20002319467030EDF782FF23\n:1030800000B9FFDFA06880F87D5080F8A650A0F856\n:10309000A460A06890F87C10012906D180F87C60BB\n:1030A00080F8A260E078DFF72FFFA168D1F818015F\n:1030B000098842888A42DBD101780429D8D1067078\n:1030C000E078DFF721FFA06890F87C100029CFD1CD\n:1030D00080F8A2606BE470B5254DA86890F87C106C\n:1030E0001A2902D00220687061E469780029FBD1B6\n:1030F000002480F8A74080F8A240D0F8181100887A\n:103100004988814200D0FFDFA868D0F818110C7000\n:10311000D0F864110A780AB1FFDF25E090F8A82002\n:1031200072B180F8A8400288CA80D0F864110C718E\n:10313000D0F864210E2111700188D0F864010DE0EF\n:1031400030F8E82BCA80C16F0C71C26F0121117277\n:10315000C26F0D21117030F8E81CC06F418000F083\n:10316000A1FEE878DFF7D0FEA86880F87C401EE476\n:103170008C01002070B5FA4CA16891F87C20162AC9\n:1031800001D0132A02D191F8A82012B10220607058\n:103190000DE46278002AFBD181F8E000002581F877\n:1031A000A75081F8A250D1F81801098840888842B8\n:1031B00000D0FFDFA068D0F818010078032800D005\n:1031C000FFDF0321FE20FFF7F5FCA068D0F86411B3\n:1031D0000A780AB1FFDF14E030F8E02BCA8010F85B\n:1031E000081BC26F1171C16F0D72C26F0D2111707A\n:1031F00030F8E81CC06F418000F054FEE078DFF743\n:1032000083FEA06880F87C504BE470B5D44C092153\n:103210000023A06890F87C207030EDF7B3FE002505\n:1032200018B12069007912281ED0A0680A21002355\n:1032300090F87C207030EDF7A5FE18B12069007978\n:10324000142814D02069007916281AD1A06890F8A3\n:103250007C101F2915D180F87C5080F8A250BDE861\n:1032600070401A20FFF74EBABDE8704061E6A068D2\n:1032700000F87C5F458480F82650BDE87040FFF779\n:103280009BBB0EE470B5B64C2079C00773D02069A3\n:1032900000230521C578A06890F87C207030EDF7F8\n:1032A00071FE98B1062D11D006DC022D0ED0042D32\n:1032B0000CD0052D06D109E00B2D07D00D2D05D022\n:1032C000112D03D0607840F008006070607800280D\n:1032D00051D12069FAF7E0FF00287ED0206900254F\n:1032E0000226C178891E162977D2DFE801F00B7615\n:1032F00034374722764D76254A457676763A5350CE\n:103300006A6D7073A0680023012190F87F207030EF\n:10331000EDF738FE08BB2069FBF722F8A16881F8B9\n:103320001601072081F87F0081F8A65081F8A2508D\n:1033300056E0FFF76AFF53E0A06890F87C100F2971\n:1033400001D066704CE0617839B980F88150122163\n:1033500080F87C1044E000F0D0FD41E000F0ACFDCE\n:103360003EE0FBF7A9F803283AD12069FBF7A8F85B\n:10337000FFF700FF34E03BE00079F9E7FFF7ABFE31\n:103380002EE0FFF73CFE2BE0FFF7EBFD28E0FFF718\n:10339000D0FD25E0A0680023194690F87D2070300C\n:1033A000EDF7F0FD012110B16078C8B901E061705E\n:1033B00016E0A06820F8A45F817000F8276C0FE089\n:1033C0000BE0FFF75DFD0BE000F034FD08E0FFF7D8\n:1033D000DFFC05E000F0FAFC02E00020FFF7A1FCB2\n:1033E000A268F2E93001401C41F10001C2E900018C\n:1033F0005EE42DE9F0415A4C2079800741D5607890\n:1034000000283ED1E06801270026C178204619290E\n:10341000856805F170006FD2DFE801F04B3E0D6F5B\n:10342000C1C1801C34C1556287C1C1C1C1BE8B9569\n:1034300098A4B0C1BA0095F87F2000230121EDF7D0\n:10344000A1FD00281DD1A068082180F87F1080F818\n:10345000A26090E0002395F87D201946EDF792FDDB\n:1034600010B1A06880F8A660A0680023194690F803\n:103470007C207030EDF786FD002802D0A06880F82F\n:10348000A26067E4002395F87C201946EDF77AFDE9\n:1034900000B9FFDF042008E0002395F87C201946DE\n:1034A000EDF770FD00B9FFDF0C20A16881F87C000A\n:1034B00050E4002395F87C201946EDF763FD00B930\n:1034C000FFDF0D20F1E7002395F87C201946EDF78A\n:1034D00059FD00B9FFDFA0680F2180F8A77008E050\n:1034E00095F87C00122800D0FFDFA068112180F839\n:1034F000A87080F87C102DE451E0002395F87C2022\n:103500001946EDF73FFD20B9A06890F8A80000B972\n:10351000FFDFA068132180F8A770EAE795F87C0028\n:10352000182800D0FFDF1A20BFE7BDE8F04100F007\n:1035300063BD002395F87C201946EDF723FD00B903\n:10354000FFDF0520B1E785F8A66003E4002395F8C6\n:103550007C201946EDF716FD00B9FFDF1C20A4E71B\n:103560008C010020002395F87D201946EDF70AFD17\n:1035700000B9FFDFA06880F8A66006E4002395F894\n:103580007C201946EDF7FEFC00B9FFDF1F208CE719\n:10359000BDE8F04100F0F8BC85F87D60D3E7FFDFBF\n:1035A0006FE710B5F74C6078002837D120794007D5\n:1035B0000FD5A06890F87C00032800D1FFDFA06839\n:1035C00090F87F10072904D101212170002180F893\n:1035D0007F10FFF70EFF00F0B5FCFFF753FEA07859\n:1035E000000716D5A0680023052190F87C207030D4\n:1035F000EDF7C8FC50B108206070A068D0F86411E5\n:1036000008780D2800D10020087002E00020F9F7AA\n:10361000F9FCA068BDE81040FFF712BB10BD2DE912\n:10362000F041D84C07464FF00005607808436070C1\n:10363000207981062046806802D5A0F8985004E0E1\n:10364000B0F89810491CA0F8981000F018FD012659\n:10365000F8B1A088000506D5A06890F8821011B1D5\n:10366000A0F88E5015E0A068B0F88E10491CA0F8A4\n:103670008E1000F0F3FCA068B0F88E10B0F8902027\n:10368000914206D3A0F88E5080F83A61E078DFF7D7\n:103690003BFC207910F0600F08D0A06890F88010F3\n:1036A00021B980F880600121FEF782FD1FB9FFF784\n:1036B00078FFFFF799F93846FEF782FFBDE8F04141\n:1036C000F5F711BFAF4A51789378194313D11146DA\n:1036D0000128896808D01079400703D591F87F0048\n:1036E000072808D001207047B1F84C00098E8842A5\n:1036F00001D8FEF7E4B900207047A249C278896872\n:10370000012A06D05AB1182A08D1B1F81011FAF7D7\n:10371000BABEB1F822114172090A81727047D1F81C\n:10372000181189884173090A8173704770B5954CE7\n:1037300005460E46A0882843A080A80703D5E807C1\n:1037400000D0FFDFE660E80700D02661A80719D5A2\n:10375000F078062802D00B2814D10BE0A06890F86E\n:103760007C1018290ED10021E0E93011012100F868\n:103770003E1C07E0A06890F87C10122902D10021BD\n:1037800080F88210280601D50820A07068050AD5A7\n:10379000A0688288B0F87010304600F07FFC304698\n:1037A000BDE87040A9E763E43EB505466846F5F715\n:1037B00065FE00B9FFDF222200210098EAF767FECC\n:1037C00003210098FAF750FD0098017821F01001CC\n:1037D00001702946FAF76DFD6A4C192D71D2DFE8A8\n:1037E00005F020180D3EC8C8C91266C8C9C959C815\n:1037F000C8C8C8BBC9C971718AC89300A1680098BC\n:1038000091F8151103E0A168009891F8E610017194\n:10381000B0E0A068D0F81C110098491CFAF795FD9B\n:10382000A8E0A1680098D1F8182192790271D1F826\n:10383000182112894271120A8271D1F81821528915\n:10384000C271120A0272D1F8182192894272120AC8\n:103850008272D1F81811C989FAF74EFD8AE0A06882\n:10386000D0F818110098091DFAF77CFDA068D0F86F\n:10387000181100980C31FAF77FFDA068D0F81811E4\n:1038800000981E31FAF77EFDA1680098D831FAF74A\n:1038900087FD6FE06269009811780171918841712C\n:1038A000090A81715188C171090A017262E03649C1\n:1038B000D1E90001CDE9010101A90098FAF78AFDDB\n:1038C00058E056E0A068B0F844100098FAF794FD6C\n:1038D000A068B0F8E6100098FAF792FDA068B0F87A\n:1038E00048100098FAF780FDA068B0F8E81000983A\n:1038F000FAF77EFD3EE0A168009891F83021027150\n:1039000091F83111417135E0A06890F81301EDF79D\n:1039100032FD01460098FAF7B2FDA06890F8120156\n:1039200000F03DFA70B1A06890F8640000F037FA3A\n:1039300040B1A06890F8121190F86400814201D063\n:10394000002002E0A06890F81201EDF714FD014696\n:103950000098FAF790FD0DE0A06890F80D1100981E\n:10396000FAF7A8FDA06890F80C110098FAF7A6FDE8\n:1039700000E0FFDFF5F795FD00B9FFDF0098FFF7E6\n:10398000BCFE3EBD8C0100207C63020010B5F94CEA\n:10399000A06890F8121109B990F8641080F86410CA\n:1039A00090F8131109B990F8651080F8651000209F\n:1039B000FEF7A8FEA068FAF750FE002806D0A0681F\n:1039C000BDE8104000F59E71FAF7B1BE10BDF8B524\n:1039D000E84E00250446B060B5807570B57035704E\n:1039E0000088F5F748FDB0680088F5F76AFDB4F87F\n:1039F000F800B168401C82B201F17000EDF75BF88D\n:103A000000B1FFDF94F87D00242809D1B4F87010CC\n:103A1000B4F81001081A00B2002801DB707830B148\n:103A200094F87C0024280AD0252808D015E0FFF758\n:103A3000ADFF84F87D50B16881F897500DE0B4F87F\n:103A40007010B4F81001081A00B2002805DB707875\n:103A500018B9FFF79BFF84F87C50A4F8F850FEF7E4\n:103A600088FD00281CD1B06890F8E400FE2801D041\n:103A7000FFF79AFEC0480090C04BC14A2146284635\n:103A8000F9F7ECF9B0680023052190F87C2070303C\n:103A9000EDF778FA002803D0BDE8F840F8F771BFD9\n:103AA000F8BD10B5FEF765FD20B10020BDE810405F\n:103AB0000146B4E5BDE81040F9F77FBA70B50C4691\n:103AC000154606464FF4B47200212046EAF7DFFCA3\n:103AD000268005B9FFDF2868C4F818016868C4F8B3\n:103AE0001C01A868C4F8640182E4F0F7E9BA2DE982\n:103AF000F0410D4607460621F0F7D8F9041E3DD0E7\n:103B0000D4F864110026087858B14A8821888A427E\n:103B100007D109280FD00E2819D00D2826D0082843\n:103B20003ED094F83A01D0B36E701020287084F81B\n:103B30003A61AF809AE06E7009202870D4F8640171\n:103B4000416869608168A9608089A88133E008467E\n:103B5000F0F7DDFA0746EFF78AFF70B96E700E20B6\n:103B60002870D4F864014068686011E00846F0F7F6\n:103B7000CEFA0746EFF77BFF08B1002081E46E70B4\n:103B80000D202870D4F8640141686960008928819B\n:103B9000D4F8640106703846EFF763FF66E00EE084\n:103BA0006E7008202870D4F86401416869608168EB\n:103BB000A960C068E860D4F86401067056E094F823\n:103BC0003C0198B16E70152028700AE084F83C61C1\n:103BD000D4F83E016860D4F84201A860D4F84601E8\n:103BE000E86094F83C010028F0D13FE094F84A01E5\n:103BF00058B16E701C20287084F84A610A2204F5BE\n:103C0000A671281DEAF719FC30E094F8560140B17E\n:103C10006E701D20287084F85661D4F858016860D1\n:103C200024E094F8340168B16E701A20287004E022\n:103C300084F83461D4F83601686094F834010028BF\n:103C4000F6D113E094F85C01002897D06E7016202E\n:103C5000287007E084F85C61D4F85E016860B4F80D\n:103C60006201288194F85C010028F3D1012008E466\n:103C7000404A5061D170704770B50D4604464EE021\n:103C8000B4F8F800401CA4F8F800B4F89800401C00\n:103C9000A4F89800204600F0F2F9B8B1B4F88E000C\n:103CA000401CA4F88E00204600F0D8F9B4F88E002D\n:103CB000B4F89010884209D30020A4F88E000120A7\n:103CC00084F83A012B48C078DFF71EF994F8A20077\n:103CD00020B1B4F89E00401CA4F89E0094F8A60001\n:103CE00020B1B4F8A400401CA4F8A40094F8140176\n:103CF00040B994F87F200023012104F17000EDF712\n:103D000041F920B1B4F89C00401CA4F89C00204666\n:103D1000FEF796FFB4F87000401CA4F870006D1E0A\n:103D2000ADB2ADD23FE5134AC2E90601704770B5A6\n:103D30000446B0F8980094F88010D1B1B4F89A1005\n:103D40000D1A2D1F94F8960040B194F87C200023A2\n:103D5000092104F17000EDF715F9B8B1B4F88E60DF\n:103D6000204600F08CF980B1B4F89000801B001F51\n:103D70000CE007E08C0100201F360200C53602006F\n:103D80002D370200C0F10205DCE72846A84200DA20\n:103D90000546002D01DC002005E5A8B203E510F082\n:103DA0000C0000D00120704710B5012808D002286F\n:103DB00008D0042808D0082806D0FFDF204610BD10\n:103DC0000124FBE70224F9E70324F7E770B5CC4CA4\n:103DD000A06890F87C001F2804D0607840F00100B3\n:103DE0006070E0E42069FAF73CFBD8B12069012259\n:103DF0000179407901F0070161F30705294600F0D8\n:103E0000070060F30F21A06880F8A2200022A0F82C\n:103E10009E20232200F87C2FD0F8B400BDE870402B\n:103E2000FEF7AABD0120FEF77CFFBDE870401E2012\n:103E3000FEF768BCF8B5B24C00230A21A06890F8E0\n:103E40007C207030EDF79EF838B32069FAF7E4FA79\n:103E5000C8B12069FAF7DAFA07462069FAF7DAFA00\n:103E600006462069FAF7D0FA05462069FAF7D0FA33\n:103E700001460097A06833462A463030FAF7C1FB66\n:103E8000A068FAF7EAFBA168002081F8A20081F897\n:103E90007C00BDE8F840FEF78FBD607840F001007F\n:103EA0006070F8BD964810B580680088F0F72FF96B\n:103EB000BDE81040EFF7C6BD10B5914CA36893F86C\n:103EC0007C00162802D00220607010BD60780028A7\n:103ED000FBD1D3F81801002200F11E010E30C833C7\n:103EE000ECF7C2FFA0680021C0E92E11012180F883\n:103EF0008110182180F87C1010BD10B5804CA0688E\n:103F000090F87C10132902D00220607010BD6178F7\n:103F10000029FBD1D0F8181100884988814200D0CF\n:103F2000FFDFA068D0F8181120692631FAF745FAAA\n:103F3000A1682069DC31FAF748FAA168162081F8F7\n:103F40007C0010BD10B56E4C207900071BD5607841\n:103F5000002818D1A068002190F8E400FEF72AFE9E\n:103F6000A06890F8E400FE2800D1FFDFA068FE21E1\n:103F700080F8E41090F87F10082904D10221217004\n:103F8000002180F87F1010BD70B55D4D2421002404\n:103F9000A86890F87D20212A05D090F87C20232A5B\n:103FA00018D0FFDFA0E590F8122112B990F8132184\n:103FB0002AB180F87D10A86880F8A64094E500F842\n:103FC0007D4F847690F8B1000028F4D00020FEF7F1\n:103FD00099FBF0E790F8122112B990F813212AB159\n:103FE00080F87C10A86880F8A2407DE580F87C40CD\n:103FF0000020FEF787FBF5E770B5414C0025A0686F\n:10400000D0F8181103884A889A4219D109780429EE\n:1040100016D190F87C20002319467030ECF7B2FFDF\n:1040200000B9FFDFA06890F8AA10890703D4012126\n:1040300080F87C1004E080F8A250D0F818010570D8\n:10404000A0680023194690F87D207030ECF79AFFA5\n:10405000002802D0A06880F8A65045E5B0F890206E\n:10406000B0F88E108A4201D3511A00E000218288F4\n:10407000521D8A4202D3012180F89610704710B574\n:1040800090F8821041B990F87C200023062170300E\n:10409000ECF778FF002800D0012010BD70B5114466\n:1040A000174D891D8CB2C078A968012806D040B18F\n:1040B000182805D191F8120138B109E0A1F8224180\n:1040C00012E5D1F8180184800EE591F8131191B131\n:1040D000FFF765FE80B1A86890F86400FFF75FFE07\n:1040E00050B1A86890F8121190F86420914203D062\n:1040F00090F8130100B90024A868A0F81041F3E477\n:104100008C01002070B58F4C0829207A6CD2DFE832\n:1041100001F004176464276B6B6458B1F4F7D3F8AB\n:10412000F5F7FFF80020A072F4F7B4F9BDE870408D\n:10413000F4F758BCF5F717F9BDE87040F1F71FBF69\n:10414000DEF7B6FDF5F752F8D4E90001F1F7F3FC1C\n:104150002060A07A401CC0B2A072282824D370BD71\n:10416000A07A0025401EC6B2E0683044F4F700FD96\n:1041700010B9E1687F208855A07A272828BF01253B\n:10418000DEF796FDA17A01EB4102C2EB81110844F2\n:104190002946F5F755F8A07A282809D2401CC0B264\n:1041A000A072282828BF70BDBDE87040F4F772B92E\n:1041B000207A002818BF00F086F8F4F74BFBF4F7DC\n:1041C000F7FBF5F7D0F80120E0725F480078DEF7E2\n:1041D0009BFEBDE87040F1F7D2BE002808BF70BD5D\n:1041E000BDE8704000F06FB8FFDF70BD10B5554CF2\n:1041F000207A002804BF0C2010BD00202072E0723D\n:10420000607AF2F7F8FA607AF2F761FD607AF1F716\n:104210008CFF00280CBF1F20002010BD002270B5AD\n:10422000484C06460D46207A68B12272E272607AE6\n:10423000F2F7E1FA607AF2F74AFD607AF1F775FF7A\n:10424000002808BFFFDF4048E560067070BD70B50C\n:10425000050007D0A5F5E8503C494C3881429CBF89\n:10426000122070BD374CE068002804BF092070BDE3\n:10427000207A00281CBF0C2070BD3548F1F7FAFEEB\n:104280006072202804BF1F2070BDF1F76DFF206011\n:104290001DB12946F1F74FFC2060012065602072B6\n:1042A00000F011F8002070BD2649CA7A002A04BF28\n:1042B000002070471E22027000224270CB684360CB\n:1042C000CA7201207047F0B585B0F1F74DFF1D4D62\n:1042D0000746394668682C6800EB80004600204697\n:1042E000F2F73AFCB04206DB6868811B3846F1F70A\n:1042F00022FC0446286040F2367621463846F2F722\n:104300002BFCB04204DA31463846F1F714FC04467F\n:1043100000208DF8000040F6E210039004208DF894\n:10432000050001208DF8040068460294F2F7CAF8EF\n:10433000687A6946F2F743F9002808BFFFDF05B045\n:10434000F0BD000074120020AC010020B5EB3C0071\n:10435000054102002DE9F0410C4612490D68114A51\n:10436000114908321160A0F12001312901D3012047\n:104370000CE0412810D040CC0C4F94E80E0007EB25\n:104380008000241F50F8807C3046B84720600548E4\n:10439000001D0560BDE8F081204601F0EBFCF5E76B\n:1043A00006207047100502400100000184630200EE\n:1043B00010B55548F2F7FAFF00B1FFDF5248401C34\n:1043C000F2F7F4FF002800D0FFDF10BD2DE9F14F18\n:1043D0004E4E82B0D6F800B001274B48F2F7EEFF00\n:1043E000DFF8248120B9002708F10100F2F7FCFF73\n:1043F000474C00254FF0030901206060C4F80051CC\n:10440000C4F80451029931602060DFF808A11BE074\n:10441000DAF80000C00617D50E2000F068F8EFF3B8\n:10442000108010F0010072B600D001200090C4F896\n:104430000493D4F8000120B9D4F8040108B901F0BC\n:10444000A3FC009800B962B6D4F8000118B9D4F8FA\n:1044500004010028DCD0D4F804010028CCD137B105\n:10446000C6F800B008F10100F2F7A8FF11E008F16A\n:104470000100F2F7A3FF0028B6D1C4F80893C4F8EE\n:104480000451C4F800510E2000F031F81E48F2F734\n:10449000ABFF0020BDE8FE8F2DE9F0438DB00D4647\n:1044A000064600240DF110090DF1200818E000BFA8\n:1044B00004EB4407102255F827106846E9F7BDFFC2\n:1044C00005EB8707102248467968E9F7B6FF68468A\n:1044D000FFF77CFF10224146B868E9F7AEFF641C85\n:1044E000B442E5DB0DB00020BDE8F0836EE70028A4\n:1044F00009DB00F01F02012191404009800000F11A\n:10450000E020C0F880127047AD01002004E50040B3\n:1045100000E0004010ED00E0B54900200870704751\n:1045200070B5B44D01232B60B34B1C68002CFCD03C\n:10453000002407E00E6806601E68002EFCD0001DF7\n:10454000091D641C9442F5D30020286018680028D7\n:10455000FCD070BD70B5A64E0446A84D3078022838\n:1045600000D0FFDFAC4200D3FFDF7169A44801290E\n:1045700003D847F23052944201DD03224271491CB4\n:104580007161291BC1609E49707800F02EF90028E6\n:1045900000D1FFDF70BD70B5954C0D466178884243\n:1045A00000D0FFDF954E082D4BD2DFE805F04A041E\n:1045B0001E2D4A4A4A382078022800D0FFDF032007\n:1045C0002070A078012801D020B108E0A06801F097\n:1045D00085F904E004F1080007C8FFF7A1FF0520F2\n:1045E0002070BDE87040F1F7CABCF1F7BDFD01468F\n:1045F0006068F2F7B1FAB04202D2616902290BD3C6\n:104600000320F2F7FAFD12E0F1F7AEFD0146606813\n:10461000F2F7A2FAB042F3D2BDE870409AE72078F0\n:1046200002280AD0052806D0FFDF04202070BDE84C\n:10463000704000F0D0B8022000E00320F2F7DDFD6A\n:10464000F3E7FFDF70BD70B50546F1F78DFD684CEF\n:1046500060602078012800D0FFDF694901200870E0\n:104660000020087104208D6048716448C8600220F1\n:104670002070607800F0B9F8002800D1FFDF70BD2D\n:1046800010B55B4C207838B90220F2F7CCFD18B990\n:104690000320F2F7C8FD08B1112010BD5948F1F709\n:1046A000E9FC6070202804D00120207000206061A7\n:1046B00010BD032010BD2DE9F0471446054600EB60\n:1046C00084000E46A0F1040801F01BF907464FF0E4\n:1046D000805001694F4306EB8401091FB14201D2AA\n:1046E000012100E0002189461CB10069B4EB900F64\n:1046F00002D90920BDE8F0872846DCF7A3FD90B970\n:10470000A84510D3BD4205D2B84503D245EA0600FC\n:10471000800701D01020EDE73046DCF793FD10B99B\n:10472000B9F1000F01D00F20E4E73748374900689E\n:10473000884205D0224631462846FFF7F1FE1AE0AE\n:10474000FFF79EFF0028D5D1294800218560C0E9E8\n:1047500003648170F2F7D3FD08B12D4801E04AF2FD\n:10476000F87060434FF47A7100F2E730B0FBF1F07B\n:104770001830FFF768FF0020BCE770B505464FF022\n:10478000805004696C432046DCF75CFD08B10F20C3\n:1047900070BD01F0B6F8A84201D8102070BD1A48CB\n:1047A0001A490068884203D0204601F097F810E0CB\n:1047B000FFF766FF0028F1D10D4801218460817068\n:1047C000F2F79DFD08B1134800E013481830FFF7D9\n:1047D0003AFF002070BD10B5054C6078F1F7A5FCDC\n:1047E00000B9FFDF0020207010BDF1F7E8BE000027\n:1047F000B001002004E5014000E40140105C0C0021\n:1048000084120020974502005C000020BEBAFECA58\n:1048100050280500645E0100A85B01007E4909681C\n:104820000160002070477C4908600020704701212A\n:104830008A0720B1012804D042F204007047916732\n:1048400000E0D1670020704774490120086042F2FF\n:104850000600704708B50423704A1907103230B1BA\n:10486000C1F80433106840F0010010600BE01068DC\n:1048700020F001001060C1F808330020C1F80801E1\n:10488000674800680090002008BD011F0B2909D867\n:10489000624910310A6822F01E0242EA40000860B4\n:1048A0000020704742F2050070470F2809D85B4985\n:1048B00010310A6822F4706242EA00200860002089\n:1048C000704742F205007047000100F18040C0F8D7\n:1048D000041900207047000100F18040C0F8081959\n:1048E00000207047000100F18040D0F80009086006\n:1048F00000207047012801D907207047494A52F823\n:10490000200002680A43026000207047012801D994\n:1049100007207047434A52F8200002688A43026029\n:1049200000207047012801D9072070473D4A52F8FE\n:104930002000006808600020704702003A494FF0EC\n:10494000000003D0012A01D0072070470A60704799\n:10495000020036494FF0000003D0012A01D00720A1\n:1049600070470A60704708B54FF40072510510B1E6\n:10497000C1F8042308E0C1F808230020C1F824018D\n:1049800027481C3000680090002008BD08B5802230\n:10499000D10510B1C1F8042308E0C1F808230020B4\n:1049A000C1F81C011E48143000680090002008BDAA\n:1049B00008B54FF48072910510B1C1F8042308E0E6\n:1049C000C1F808230020C1F82001154818300068FC\n:1049D0000090002008BD10493831096801600020AE\n:1049E000704770B54FF080450024C5F80841F2F7D4\n:1049F00092FC10B9F2F799FC28B1C5F82441C5F82A\n:104A00001C41C5F820414FF0E020802180F80014BF\n:104A10000121C0F8001170BD0004004000050040F5\n:104A2000080100404864020078050040800500400D\n:104A30006249634B0A6863499A42096801D1C1F32C\n:104A400010010160002070475C495D4B0A685D49B8\n:104A5000091D9A4201D1C0F3100008600020704780\n:104A60005649574B0A68574908319A4201D1C0F359\n:104A7000100008600020704730B5504B504D1C6846\n:104A800042F20803AC4202D0142802D203E01128FB\n:104A900001D3184630BDC3004B481844C0F8101568\n:104AA000C0F81425002030BD4449454B0A6842F245\n:104AB00009019A4202D0062802D203E0042801D359\n:104AC00008467047404A012142F8301000207047E4\n:104AD0003A493B4B0A6842F209019A4202D0062841\n:104AE00002D203E0042801D308467047364A012168\n:104AF00002EBC00041600020704770B52F4A304E75\n:104B0000314C156842F2090304EB8002B54204D02F\n:104B1000062804D2C2F8001807E0042801D318467A\n:104B200070BDC1F31000C2F80008002070BD70B560\n:104B3000224A234E244C156842F2090304EB8002FA\n:104B4000B54204D0062804D2D2F8000807E00428B1\n:104B500001D3184670BDD2F80008C0F310000860F9\n:104B6000002070BD174910B50831184808601120A1\n:104B7000154A002102EBC003C3F81015C3F8141541\n:104B8000401C1428F6D3002006E0042804D302EBCE\n:104B90008003C3F8001807E002EB8003D3F8004855\n:104BA000C4F31004C3F80048401C0628EDD310BD20\n:104BB0000449064808310860704700005C00002086\n:104BC000BEBAFECA00F5014000F001400000FEFF41\n:104BD000814B1B6803B19847BFF34F8F7F48016833\n:104BE0007F4A01F4E06111430160BFF34F8F00BFC2\n:104BF000FDE710B5EFF3108010F0010F72B601D091\n:104C0000012400E0002400F0DDF850B1DCF7BFFB28\n:104C1000F1F755F8F2F793FAF2F7BEFF7149002069\n:104C2000086004B962B6002010BD2DE9F0410C46C1\n:104C30000546EFF3108010F0010F72B601D0012687\n:104C400000E0002600F0BEF820B106B962B60820E8\n:104C5000BDE8F08101F01EF9DCF79DFB0246002063\n:104C600001234709BF0007F1E02700F01F01D7F833\n:104C70000071CF40F9071BD0202803D222FA00F19F\n:104C8000C90727D141B2002904DB01F1E02191F8E5\n:104C9000001405E001F00F0101F1E02191F8141D6D\n:104CA0004909082916D203FA01F717F0EC0F11D0C1\n:104CB000401C6428D5D3F2F74DFF4B4A4B490020E6\n:104CC000F2F790FF47494A4808602046DCF7C1FAEE\n:104CD00060B904E006B962B641F20100B8E73E48A7\n:104CE00004602DB12846DCF701FB18B1102428E040\n:104CF000404D19E02878022802D94FF4805420E072\n:104D000007240028687801D0D8B908E0C8B1202865\n:104D100017D8A878212814D8012812D001E0A87843\n:104D200078B9E8780B280CD8DCF735FB2946F2F780\n:104D3000ECF9F0F783FF00F017FE2846DCF7F4FAF1\n:104D4000044606B962B61CB1FFF753FF20467FE761\n:104D500000207DE710B5044600F034F800B10120D2\n:104D60002070002010BD244908600020704770B5F5\n:104D70000C4622490D682149214E08310E60102849\n:104D800007D011280CD012280FD0132811D00120E1\n:104D900013E0D4E90001FFF748FF354620600DE03D\n:104DA000FFF727FF0025206008E02068FFF7D2FF0B\n:104DB00003E0114920680860002020600F48001DB2\n:104DC000056070BD07480A490068884201D101208A\n:104DD0007047002070470000C80100200CED00E083\n:104DE0000400FA055C0000204814002000000020A8\n:104DF000BEBAFECA50640200040000201005024042\n:104E0000010000017D49C0B20860704700B57C49CF\n:104E1000012808BF03200CD0022808BF042008D0B6\n:104E2000042808BF062004D0082816BFFFDF05208D\n:104E300000BD086000BD70B505460C46164610461C\n:104E4000F3F7D2F8022C08BF4FF47A7105D0012C89\n:104E50000CBF4FF4C86140F6340144183046F3F7F4\n:104E60003CF9204449F6797108444FF47A71B0FB5B\n:104E7000F1F0281A70BD70B505460C460846F4F7E7\n:104E80002FFA022C08BF40F24C4105D0012C0CBF78\n:104E900040F634014FF4AF5149F6CA62511A084442\n:104EA0004FF47A7100F2E140B0FBF1F0281A801E55\n:104EB00070BD70B5064615460C460846F4F710FA64\n:104EC000022D08BF4FF47A7105D0012D0CBF4FF4AD\n:104ED000C86140F63401022C08BF40F24C4205D0B4\n:104EE000012C0CBF40F634024FF4AF52891A08442B\n:104EF00049F6FC6108444FF47A71B0FBF1F0301AC6\n:104F000070BD70B504460E460846F3F76DF80546C9\n:104F10003046F3F7E2F828444AF2AB3108444FF444\n:104F20007A71B0FBF1F0201A801E70BD2DE9F041BE\n:104F300007461E460D4614461046082A16BF04288A\n:104F40004EF62830F3F750F807EB4701C1EBC711D5\n:104F500000EBC100022D08BF40F24C4105D0012DED\n:104F60000CBF40F634014FF4AF5147182846F4F710\n:104F7000B7F9381A4FF47A7100F6B730B0FBF1F593\n:104F80002046F3F7B9F828443044401DBDE8F081CD\n:104F900070B5054614460E460846F3F725F805EBAE\n:104FA0004502C2EBC512C0EBC2053046F3F795F8D7\n:104FB0002D1A2046082C16BF04284EF62830F3F789\n:104FC00013F828444FF47A7100F6B730B0FBF1F5CE\n:104FD0002046F3F791F82844401D70BD0949082880\n:104FE00018BF0428086803BF20F46C5040F4444004\n:104FF00040F0004020F00040086070470C15004071\n:105000001015004040170040F0B585B00C4605462D\n:10501000F9F73EF907466E78204603A96A46EEF78F\n:1050200002FD81198EB258B1012F02D0032005B0C4\n:10503000F0BD204604AA0399EEF717FC049D01E099\n:10504000022F0FD1ED1C042E0FD32888BDF80010BD\n:10505000001D80B2884201D8864202D14FF0000084\n:10506000E5E702D34FF00200E1E74FF00100DEE791\n:10507000FA48C078FF2814BF0120002070472DE9AE\n:10508000F041F74C0746160060680D4603D0F9F76B\n:1050900069F8A0B121E0F9F765F8D8B96068F9F7C7\n:1050A00061F8D0B915F00C0F17D06068C17811F015\n:1050B0003F0F1CBF007910F0100F0ED00AE0022E37\n:1050C00008D0E6481FB1807DFF2806D002E0C078F6\n:1050D000FF2802D00120BDE8F0810020BDE8F0816A\n:1050E0000A4601460120CAE710B5DC4C1D2200210A\n:1050F000A01CE9F7CCF97F206077FF202074E070D6\n:10510000A075A08920F060002030A08100202070D0\n:1051100010BD70B5D249486001200870D248D1490D\n:10512000002541600570CD4C1D222946A01CE9F7E1\n:10513000AEF97F206077FF202074E070A075A08911\n:1051400020F060002030A081257070BD2DE9F0476F\n:10515000C24C06462078C24F4FF0010907F10808FB\n:10516000002520B13878D0B998F80000B8B198F887\n:10517000000068B387F80090D8F804103C2239B3D7\n:105180007570301DE9F759F90520307086F80490E4\n:105190003878002818BF88F8005005D015E03D7019\n:1051A000A11C4FF48E72EAE71D220021A01CE9F732\n:1051B0006EF97F206077FF202074E070A075A089D1\n:1051C00020F060002030A08125700120BDE8F0872C\n:1051D0000020BDE8F087A148007800280CBF01201E\n:1051E000002070470A460146002048E710B510B17C\n:1051F000022810D014E09A4C6068F8F7B3FF78B931\n:105200006068C17811F03F0F1CBF007910F0100FDB\n:1052100006D1012010BD9148007B10F0080FF8D195\n:10522000002010BD2DE9FF4F81B08C4D8346DDE994\n:105230000F042978DDF838A09846164600291CBFCF\n:1052400005B0BDE8F08F8849097800291CBF05B07A\n:10525000BDE8F08FE872B4B1012E08BF012708D075\n:10526000022E08BF022704D0042E16BF082E0327E3\n:10527000FFDFEF7385F81E804FF00008784F8CB188\n:10528000022C1DD020E0012E08BF012708D0022EDD\n:1052900008BF022704D0042E16BF082E0327FFDF05\n:1052A000AF73E7E77868F8F75DFF68B97868C178A9\n:1052B00011F03F0F1CBF007910F0100F04D110E067\n:1052C000287B10F0080F0CD14FF003017868F8F735\n:1052D000FDFD30B14178090929740088C0F30B0045\n:1052E0006882CDF800807868F8F73CFF0146012815\n:1052F000BDF8000005F102090CBF40F0010020F0EC\n:105300000100ADF8000099F80A2012F0020F4ED10A\n:10531000022918BF20F0020049D000BFADF80000FC\n:1053200010F0020F04D0002908BF40F0080801D097\n:1053300020F00808ADF800807868C17811F03F0FC0\n:105340001CBF007910F0020F0CD0314622464FF0FE\n:105350000100FFF794FE002804BF48F00400ADF8F8\n:10536000000006D099F80A00800860F38208ADF8C2\n:10537000008099F80A004109BDF8000061F3461069\n:10538000ADF8000080B20090BDF80000A8810421B3\n:105390007868F8F79BFD002804BFA88920F060001A\n:1053A0000CD0B0F80100C004C00C03D007E040F0FE\n:1053B0000200B3E7A88920F060004030A8815CB902\n:1053C00016F00C0F08D07868C17811F03F0F1CBFA1\n:1053D000007910F0100F0DD17868C17811F03F0FEF\n:1053E00008D0017911F0400F04D00621F8F76EFDC6\n:1053F00000786877314622460020FFF740FE60BB08\n:105400007968C87810F03F0F3FD0087910F0010F8D\n:105410003BD0504605F1040905F10308BAF1FF0F2E\n:105420000DD04A464146F8F781FA002808BFFFDF51\n:1054300098F8000040F0020088F8000025E00846D7\n:10544000F8F7DBFC88F800007868F8F7ADFC07286F\n:105450000CD249467868F8F7B2FC16E094120020A6\n:10546000CC010020D2120020D40100207868F8F787\n:105470009BFC072809D100217868F8F727FD01680F\n:10548000C9F800108088A9F804003146224601209E\n:10549000FFF7F5FD80BB7868C17811F03F0F2BD086\n:1054A000017911F0020F27D005F1170605F1160852\n:1054B000BBF1020F18BFBBF1030F08D0F8F774FC63\n:1054C00007280AD231467868F8F787FC12E002987C\n:1054D000016831608088B0800CE07868F8F764FC7F\n:1054E000072807D101217868F8F7F0FC01683160DE\n:1054F0008088B08088F800B0002C04BF05B0BDE8FB\n:10550000F08F7868F8F72EFE022804BF05B0BDE8DA\n:10551000F08F05F11F047868F8F76DFEAB7AC3F1E0\n:10552000FF01884228BF084605D9A98921F06001FA\n:1055300001F14001A981C2B203EB04017868F8F7D8\n:1055400062FEA97A0844A87205B0BDE8F08FB048A1\n:105550000178002918BF704701220270007B10F00B\n:10556000080F14BF07200620FCF75FBEA848C17BC8\n:10557000002908BF70470122818921F06001403174\n:1055800081810378002B18BF7047027011F0080F5B\n:1055900014BF07200620FCF748BE2DE9FF5F9C4F93\n:1055A000DDF838B0914638780E4600281CBF04B0AC\n:1055B000BDE8F09FBC1C1D2200212046E8F767FFD4\n:1055C000944D4FF0010A84F800A06868F8F7ECFBEE\n:1055D00018B3012826D0022829D0062818BFFFDFDB\n:1055E0002AD000BF04F11D016868F8F726FC20727C\n:1055F000484604F1020904F10108FF2821D04A4677\n:105600004146F8F793F9002808BFFFDF98F800003B\n:1056100040F0020088F8000031E0608940F013009B\n:105620006081DFE7608940F015006081E0E7608914\n:1056300040F010006081D5E7608940F01200608181\n:10564000D0E76868F8F7D9FB88F800006868F8F7D1\n:10565000ABFB072804D249466868F8F7B0FB0EE0B8\n:105660006868F8F7A1FB072809D100216868F8F7F6\n:105670002DFC0168C9F800108088A9F8040084F89E\n:1056800009B084F80CA000206073FF20A073A17AF9\n:1056900011F0040F08BF20752AD004F1150804F199\n:1056A0001409022E18BF032E09D06868F8F77CFB96\n:1056B00007280CD241466868F8F78FFB16E000987F\n:1056C0000168C8F800108088A8F804000EE0686837\n:1056D000F8F76AFB072809D101216868F8F7F6FB9B\n:1056E0000168C8F800108088A8F8040089F80060F4\n:1056F0007F20E0760398207787F800A004B006208A\n:10570000BDE8F05FFCF791BD2DE9FF5F424F814698\n:105710009A4638788B4600281CBF04B0BDE8F09F3D\n:105720003B48017831B1007B10F0100F04BF04B08A\n:10573000BDE8F09F1D227C6800212046E8F7A7FE07\n:1057400048464FF00108661C324D84F8008004F191\n:105750000209FF280BD04A463146F8F7E7F800283F\n:1057600008BFFFDF307840F0020030701CE068684E\n:10577000F8F743FB30706868F8F716FB072804D287\n:1057800049466868F8F71BFB0EE06868F8F70CFB01\n:10579000072809D100216868F8F798FB0168C9F863\n:1057A00000108088A9F8040004F11D016868F8F76A\n:1057B00044FB207284F809A060896BF3000040F07C\n:1057C0001A00608184F80C8000206073FF20A073B1\n:1057D00020757F20E0760298207787F8008004B05B\n:1057E0000720BDE8F05FFCF720BD094A137C834227\n:1057F00005BF508A88420020012070470448007B82\n:10580000C0F3411002280CBF0120002070470000A7\n:1058100094120020CC010020D4010020C2790D2375\n:1058200041B342BB8188012904D94908818004BF62\n:10583000012282800168012918BF002930D0016847\n:105840006FEA0101C1EBC10202EB011281796FEA3B\n:10585000010101EB8103C3EB811111444FEA914235\n:1058600001608188B2FBF1F301FB132181714FF0DC\n:10587000010102E01AB14FF00001C1717047818847\n:10588000FF2908D24FF6FF7202EA41018180FF2909\n:1058900084BFFF2282800168012918BF0029CED170\n:1058A0000360CCE7817931B1491E11F0FF018171AC\n:1058B0001CBF002070470120704710B50121C17145\n:1058C0008171818004460421F1F7E8FD002818BFAA\n:1058D00010BD2068401C206010BD00000B4A022152\n:1058E00011600B490B68002BFCD0084B1B1D186086\n:1058F00008680028FCD00020106008680028FCD050\n:1059000070474FF0805040697047000004E5014047\n:1059100000E4014002000B464FF00000014620D099\n:10592000012A04D0022A04D0032A0DD103E0012069\n:1059300002E0022015E00320072B05D2DFE803F088\n:105940000406080A0C0E100007207047012108E029\n:10595000022106E0032104E0042102E0052100E029\n:105960000621F0F7A4BB0000E24805218170002168\n:10597000017041707047E0490A78012A05D0CA6871\n:105980001044C8604038F1F7B4B88A6810448860A1\n:10599000F8E7002819D00378D849D94A13B1012B68\n:1059A0000ED011E00379012B00D06BB943790BB114\n:1059B000012B09D18368643B8B4205D2C0680EE09D\n:1059C0000379012B02D00BB10020704743790BB152\n:1059D000012BF9D1C368643B8B42F5D280689042B9\n:1059E000F2D801207047C44901220A70027972B1CD\n:1059F00000220A71427962B104224A7182685232ED\n:105A00008A60C068C860BB49022088707047032262\n:105A1000EFE70322F1E770B5B74D04460020287088\n:105A2000207988B100202871607978B10420B14EC6\n:105A30006871A168F068F0F77EF8A860E0685230FD\n:105A4000E8600320B07070BD0120ECE70320EEE7B2\n:105A50002DE9F04105460226F0F777FF006800B116\n:105A6000FFDFA44C01273DB12878B8B1012805D04B\n:105A7000022811D0032814D027710DE06868C828C7\n:105A800008D30421F1F79BF820B16868FFF773FF92\n:105A9000012603E0002601E000F014F93046BDE8DD\n:105AA000F08120780028F7D16868FFF772FF00289E\n:105AB000E2D06868017879B1A078042800D0FFDFCF\n:105AC00001216868FFF7A7FF8B49E07800F003F930\n:105AD0000028E1D1FFDFDFE7FFF785FF6770DBE735\n:105AE0002DE9F041834C0F46E178884200D0FFDF7A\n:105AF00000250126082F7DD2DFE807F0040B2828B7\n:105B00003D434F57A0780328C9D00228C7D0FFDFF4\n:105B1000C5E7A078032802D0022800D0FFDF0420C8\n:105B2000A07025712078B8BB0020FFF724FF7248D1\n:105B30000178012906D08068E06000F0EDF820616E\n:105B4000002023E0E078F0F734FCF5E7A0780328A4\n:105B500002D0022800D0FFDF207880BB022F08D0BF\n:105B60005FF00500F1F749FBA078032840D0A5704D\n:105B700095E70420F6E7A078042800D0FFDF022094\n:105B800004E0A078042800D0FFDF0120A168884746\n:105B9000FFF75EFF054633E003E0A078042800D05D\n:105BA000FFDFBDE8F04100F08DB8A078042804D0F4\n:105BB000617809B1022800D0FFDF207818B1BDE874\n:105BC000F04100F08AB8207920B10620F1F715FBEA\n:105BD00025710DE0607840B14749E07800F07BF82E\n:105BE00000B9FFDF65705AE704E00720F1F705FB15\n:105BF000A67054E7FFDF52E73DB1012D03D0FFDF70\n:105C0000022DF9D14BE70420C0E70320BEE770B5B1\n:105C1000050004D0374CA078052806D101E01020FB\n:105C200070BD0820F1F7FFFA08B1112070BD3548AA\n:105C3000F0F720FAE070202806D00121F1F7DCF817\n:105C40000020A560A07070BD032070BD294810B56C\n:105C5000017809B1112010BD8178052906D00129EC\n:105C600006D029B101210170002010BD0F2010BD08\n:105C700000F033F8F8E770B51E4C0546A07808B17F\n:105C8000012809D155B12846FFF783FE40B1287895\n:105C900040B1A078012809D00F2070BD102070BD40\n:105CA000072070BD2846FFF79EFE03E0002128462E\n:105CB000FFF7B1FE1049E07800F00DF800B9FFDF02\n:105CC000002070BD0B4810B5006900F01DF8BDE85C\n:105CD0001040F0F754B9F0F772BC064810B5C07820\n:105CE000F0F723FA00B9FFDF0820F1F786FABDE8E4\n:105CF000104039E6DC010020B41300203D8601008D\n:105D0000FF1FA107E15A02000C490A6848F202137A\n:105D10009A4302430A607047084A116848F2021326\n:105D200001EA03009943116070470246044B1020BA\n:105D30001344FC2B01D8116000207047C8060240B4\n:105D40000018FEBF1EF0040F0CBFEFF30880EFF346\n:105D50000980014A10470000FF7B010001B41EB416\n:105D600000B5F1F76DFC01B40198864601BC01B0A5\n:105D70001EBD00008269034981614FF0010010449B\n:105D8000704700005D5D02000FF20C0000F10000A2\n:105D9000694641F8080C20BF70470000FEDF184933\n:105DA0000978F9B90420714608421BD10699154AB1\n:105DB000914217DC0699022914DB02394878DF2862\n:105DC00010D10878FE2807D0FF280BD14FF0010032\n:105DD0004FF000020C4B184741F201000099019A64\n:105DE000094B1847094B002B02D01B68DB6818478A\n:105DF0004FF0FF3071464FF00002034B1847000090\n:105E000028ED00E000700200D14B020004000020E9\n:105E1000174818497047FFF7FBFFDBF7CFF900BDC4\n:105E2000154816490968884203D1154A13605B6812\n:105E3000184700BD20BFFDE70F4810490968884298\n:105E400010D1104B18684FF0FF318842F2D080F328\n:105E500008884FF02021884204DD0B4802680321A6\n:105E60000A4302600948804709488047FFDF000075\n:105E7000C8130020C81300200010000000000020FC\n:105E8000040000200070020014090040B92F000037\n:105E9000215E0200F0B44046494652465B460FB4CC\n:105EA00002A0013001B50648004700BF01BC86468C\n:105EB0000FBC8046894692469B46F0BC7047000066\n:105EC0000911000004207146084202D0EFF3098155\n:105ED00001E0EFF30881886902380078102813DBAD\n:105EE00020280FDB2C280BDB0A4A12680A4B9A4247\n:105EF00003D1602804DB094A10470220086070477C\n:105F0000074A1047074A1047074A12682C3212689E\n:105F1000104700005C000020BEBAFECA9B130000C0\n:105F2000554302006F4D0200040000200D4B0E4946\n:105F300008470E4B0C4908470D4B0B4908470D4BC2\n:105F4000094908470C4B084908470C4B06490847C4\n:105F50000B4B054908470B4B034908470A4B0249BD\n:105F60000847000041BF000079C10000792D000002\n:105F7000F32B0000812B0000012E0000B71300005E\n:105F80003F2900007D2F0000455D020000210160D7\n:105F90004160017270470A6802600B7903717047B3\n:105FA00089970000FF9800005B9A0000C59A0000E6\n:105FB000FF9A0000339B0000659B00009D9B000042\n:105FC0003D9C00007D980000859A0000331200007F\n:105FD0000744000053440000B94400004745000056\n:105FE0006146000037470000694700004148000053\n:105FF000DB4800002F490000154A0000354A000028\n:10600000AD160000D1160000F11500004D1600007D\n:10601000031700009717000003610000C36200002F\n:10602000A1660000BB67000043680000C168000073\n:10603000256900004D6A00001D6B0000896B00009F\n:10604000574A00005D4A0000674A0000CF4A00003E\n:10605000FB4A0000B74C0000E14C0000194D000065\n:10606000834D00006D4E0000834E00007744000019\n:10607000974E0000B94E0000FF4E000033120000A2\n:10608000331200003312000033120000C12500005B\n:1060900047260000632600007F2600000D28000030\n:1060A000A9260000B3260000F526000017270000EF\n:1060B000F3270000352800003312000033120000DF\n:1060C00097840000B7840000B9840000FD840000BC\n:1060D0002B8500001B860000A7860000BB86000001\n:1060E000098700001F880000C1890000E98A0000BC\n:1060F0003D740000018B00003312000033120000D9\n:10610000EBB700004DB90000A7B9000021BA0000AC\n:10611000CDBA0000010000000000000010011001D5\n:106120003A0200001A020000020004050600000006\n:1061300007111102FFFFFFFF0000FFFFF3B3000094\n:10614000273D0000532100008774000001900000EB\n:1061500000000000BF9200009B920000AD92000082\n:10616000000002000000000000020000000000002B\n:1061700000010000000000004382000023820000B4\n:10618000918200002D250000EF2400000F25000063\n:10619000DBAA000007AB00000FAD0000FD590000B6\n:1061A000B182000000000000E18200007B250000B9\n:1061B000000000000000000000000000F1AB000043\n:1061C00000000000915A00000300000001555555E1\n:1061D000D6BE898E00006606660C661200000A03B1\n:1061E000AE055208000056044608360CC7FD0000F4\n:1061F0005BFF0000A1FB0000C3FD0000A7A8010099\n:106200009B040100AAAED7AB15412010000000008E\n:10621000900A0000900A00007B5700007B570000A6\n:10622000E143000053B200000B7700006320000040\n:10623000BD3A020063BD0100BD570000BD5700001C\n:1062400005440000E5B2000093770000D72000006D\n:10625000EB3A020079BD0100700170014000380086\n:106260005C0024006801200200000300656C746279\n:10627000000000000000000000000000000000001E\n:106280008700000000000000000000000000000087\n:10629000BE83605ADB0B376038A5F5AA9183886C02\n:1062A000010000007746010049550100000000018F\n:1062B0000206030405000000070000FB349B5F801A\n:1062C000000080001000000000000000000000003E\n:1062D000060000000A000000320000007300000009\n:1062E000B4000000F401FA00960064004B00320094\n:1062F0001E0014000A000500020001000049000011\n:1063000000000000D7CF0100E9D1010025D1010034\n:10631000EBCF0100000000008FD40100000101025A\n:10632000010202030C0802170D0101020909010113\n:1063300006020918180301010909030305000000FA\n:10634000555555252627D6BE898E00002BFB01000A\n:1063500003F7010049FA01003FF20100BB220200ED\n:10636000B7FB0100F401FA00960064004B00320014\n:106370001E0014000A00050002000100254900006B\n:1063800000000000314A0200494A0200614A02004E\n:10639000794A0200A94A0200D14A0200FB4A0200DF\n:1063A0002F4B02007B470200B7460200A1430200C8\n:1063B0002B5D0200AD730100BD730100E9730100A4\n:1063C000BB740100C3740100D57401002F480200A2\n:1063D000494802001D4802002748020055480200B3\n:1063E0008B480200AB480200C9480200D7480200AF\n:1063F000E5480200F54802000D4902002549020067\n:106400003B4902005149020000000000DFBC0000CF\n:1064100035BD00004BBD000015590200CD43020000\n:10642000994402000F5C02004D5C0200775C0200A0\n:106430009D710100FD760100674902008D4902004F\n:10644000B1490200D74902001C0500402005004068\n:10645000001002007464020008000020E80100003F\n:106460004411000098640200F0010020D8110000DF\n:10647000A011000001181348140244200B440C061C\n:106480004813770B1B2034041ABA0401A40213101A\n:08649000327F0B744411C000BF\n:02000004000FEB\n:1040000000000420CDB20F00F5B20F00F7B20F0090\n:10401000F9B20F00FBB20F00FDB20F00000000006C\n:10402000000000000000000000000000C1450F007B\n:1040300001B30F000000000003B30F00214D0F007B\n:10404000354E0F0007B30F0007B30F0007B30F0083\n:1040500007B30F0007B30F0007B30F0007B30F003C\n:1040600007B30F0007B30F0007B30F0007B30F002C\n:1040700007B30F0007B30F0007B30F0007B30F001C\n:1040800007B30F0085720F0007B30F0007B30F00CF\n:1040900041730F0007B30F00814B0F0007B30F00F0\n:1040A00007B30F0007B30F0007B30F0007B30F00EC\n:1040B00007B30F0007B30F0000000000000000006E\n:1040C00007B30F0007B30F0007B30F0007B30F00CC\n:1040D00007B30F0007B30F0007B30F0005850F00EC\n:1040E00007B30F0007B30F0007B30F000000000075\n:1040F0000000000007B30F000000000007B30F002E\n:1041000000000000000000000000000000000000AF\n:10411000000000000000000000000000000000009F\n:10412000000000000000000000000000000000008F\n:10413000000000000000000000000000000000007F\n:10414000000000000000000000000000000000006F\n:10415000000000000000000000000000000000005F\n:10416000000000000000000000000000000000004F\n:10417000000000000000000000000000000000003F\n:10418000000000000000000000000000000000002F\n:10419000000000000000000000000000000000001F\n:1041A000000000000000000000000000000000000F\n:1041B00000000000000000000000000000000000FF\n:1041C00000000000000000000000000000000000EF\n:1041D00000000000000000000000000000000000DF\n:1041E00000000000000000000000000000000000CF\n:1041F00000000000000000000000000000000000BF\n:104200000348044B834202D0034B03B11847704765\n:10421000C8860020C8860020000000000548064926\n:104220000B1AD90F01EBA301491002D0034B03B1C4\n:1042300018477047C8860020C8860020000000008C\n:1042400010B5064C237843B9FFF7DAFF044B13B1DE\n:104250000448AFF300800123237010BDC8860020FE\n:10426000000000005CBD0F0008B5044B1BB1044901\n:104270000448AFF30080BDE80840CFE7000000002D\n:10428000CC8600205CBD0F00A3F5803A704700BFCC\n:10429000154B002B08BF114B9D46FFF7F5FF002182\n:1042A0008B460F461148124A121A00F075F80C4B53\n:1042B000002B00D098470B4B002B00D098470020D4\n:1042C000002104000D000B4800F016F800F040F843\n:1042D0002000290000F074FA00F014F80000080033\n:1042E000000000000000000000000420C88600203C\n:1042F000A4CE002025430F00002301461A4618468D\n:1043000000F09CB808B50021044600F0CBF8044B3F\n:104310001868C36B03B19847204600F029F900BF25\n:1043200058BB0F0038B5084B084D5B1B9C1007D0DD\n:10433000043B1D44013C55F804399847002CF9D141\n:10434000BDE8384007F002BCC8860020C4860020C3\n:1043500070B50D4E0D4D761BB61006D0002455F8E5\n:10436000043B01349847A642F9D1094E094D761B0A\n:1043700007F0E6FBB61006D0002455F8043B0134E4\n:104380009847A642F9D170BDBC860020BC860020AB\n:10439000C4860020BC860020830730B548D0541E58\n:1043A000002A3FD0CAB2034601E0013C3AD303F8E9\n:1043B000012B9D07F9D1032C2DD9CDB245EA052556\n:1043C0000F2C45EA054536D9A4F1100222F00F0C56\n:1043D00003F1200EE6444FEA121C03F1100242E9F9\n:1043E000045542E9025510327245F8D10CF1010230\n:1043F00014F00C0F03EB021204F00F0C13D0ACF10D\n:10440000040323F003030433134442F8045B934290\n:10441000FBD10CF003042CB1CAB21C4403F8012BED\n:104420009C42FBD130BD64461346002CF4D1F9E721\n:1044300003461446BFE71A46A446E0E770B4184C9A\n:104440002568D5F848411CB365681F2D25DC38B9AF\n:10445000AB1C0135656044F82310002070BC704728\n:1044600004EB850C0228CCF88820D4F888614FF042\n:10447000010202FA05F246EA0206C4F88861CCF8A5\n:104480000831E5D1D4F88C311343C4F88C31DFE71F\n:1044900005F5A674C5F84841D6E74FF0FF30DDE7D3\n:1044A00058BB0F002DE9F84F2B4B1F68D7F8486118\n:1044B0002DED028BC6B108EE100A8B464FF00108B5\n:1044C0004FF000097468651E0ED4013406EB8404B5\n:1044D000BBF1000F0CD0D4F800315B4508D0013D92\n:1044E0006B1CA4F10404F3D1BDEC028BBDE8F88F82\n:1044F00073682268013BAB420CBF7560C4F8009042\n:10450000002AECD0D6F88801D6F804A008FA05F104\n:1045100001420BD190477268524513D1D7F8483108\n:10452000B342DCD01E46002ECCD1DDE7D6F88C019C\n:1045300001420CD1D4F8801018EE100A904772682E\n:104540005245EBD0D7F84861002EBBD1CCE7D4F868\n:1045500080009047DFE700BF58BB0F00024B13B14C\n:104560000248FFF7C9BE70470000000025430F0056\n:10457000FEE700BF38B50C46E8B90968C9B10F4D70\n:10458000A9420BD06B1A3B2B11D93C22284606F0CE\n:10459000EDFE03E0CA5CEA54013BFBD2074800226F\n:1045A0003C2103F0D3F90023A887236038BD3D23C5\n:1045B000F2E70E23F9E70123F7E700BF807F002031\n:1045C000074A6FF002039E4502D1EFF3098101E033\n:1045D000EFF308818869A0F102000078104700BF5E\n:1045E00075450F0038B50446A8B10D4D00223C2199\n:1045F000284603F0ABF9AB8F83420ED12A4605F172\n:104600003C0152F8040B44F8040B8A42F9D10133FF\n:10461000AB87002038BD0E20FCE70B20FAE700BF77\n:10462000807F00200B2970B50446154608462FD917\n:104630002389053304EB43012044431ADAB2012AEB\n:1046400026D9814224D8134806F090FE2388522BA5\n:1046500006D1AB0711D062884CF668639A420CD041\n:104660000F2014E034F8022B824204D0AE89964227\n:1046700003F1010308D1002009E0218900230A3455\n:104680004FF6FE704FF440559942EBD80B2070BDA9\n:104690000920FCE7E486002008B5002203F056F963\n:1046A000034B1B88834214BF0B20002008BD00BFB2\n:1046B000E486002038B50C4C21684B1C054612D00E\n:1046C0000A484FF4805206F01FFE48B115B1206829\n:1046D00000F00CFC054920684FF4806200F026FCD5\n:1046E0004FF0FF33236038BD30840020F086002077\n:1046F0002DE9F041DFF84480044624F47F65184634\n:10470000D8F8003025F00F05AB420E46174609D009\n:10471000FFF7D0FF0848C8F800504FF480522946F0\n:1047200006F024FE0448C4F30B043A463146204404\n:10473000BDE8F04106F01ABEF0860020308400206B\n:10474000BFF34F8F0549064BCA6802F4E06213437A\n:10475000CB60BFF34F8F00BFFDE700BF00ED00E06F\n:104760000400FA054BDF704710DF704711DF704718\n:1047700013DF704718DF704760DF704769DF7047ED\n:1047800061DF70471FB50023CDE90133039368460D\n:1047900002230093FFF7EEFF05B05DF804FB08B5B8\n:1047A0004FF0E023D3F8F03DDB0700D500BEFFF764\n:1047B000C7FF0000014B1878704700BFF19600203A\n:1047C0002DE9FF484C4B40F60212C3F8402500F09B\n:1047D00005FA00F021FE002000F0AAFA00F09CFE8D\n:1047E00048B1052000F0A4FA00F0A8FE00F0CCFECD\n:1047F000062000F09DFA4FF08043DFF81081D3F8D7\n:104800001C55B12D0CBF0123002388F800304AD07D\n:10481000A5F1A8014C424C41384EDFF8F49004F069\n:10482000010333704FF08043D3F8007407F00107A1\n:10483000002C3BD14E2D38D0572D36D0304B1B6835\n:104840001A68304B9A4200D17FBB6D2D2ED01220BA\n:1048500000F0B0F9044633789BBB122000F0AAF9AF\n:1048600010B1122000F0A6F900F00100307000F045\n:1048700005FDDFF8A0B0824630B12CB9204B1B6893\n:104880001A68214B9A4257D04FF440535A684A4510\n:104890000ABF9B684FF4905303F500731B685B4598\n:1048A0003AD1012448E00124B6E701244FF08043C7\n:1048B00000226D2DC3F81C2500F0E480002CCAD125\n:1048C000C5E70120D0E7544636E03C4634E04FF4DB\n:1048D00080030B6071E0022000F02AFAA5F14E037C\n:1048E0005842584103F012FEAEE000221146C1E0EA\n:1048F00003F05CFEC6E000BF00A00040F19600207F\n:1049000034840020D51A5A007E67E54EF2960020C6\n:10491000DBE5B1517CB0EE87002CC2D1BAF1000FBB\n:10492000D1D0002FD1D0654B654A1B6865481A600D\n:10493000654B43F0010398474FF440535A684A458A\n:1049400008BF9B685D4A0CBF03F500734FF490539A\n:1049500012681B685B450CBF5C4B002313601CB9DD\n:10496000BAF1000F40F08E803378002BB3D00820CE\n:1049700000F0DEF998F800300BB9FFF703FF0123D0\n:104980004FF4742088F80030FFF7F2FE504B514985\n:104990001868019001A8FFF7E7FE4F4991F8163318\n:1049A0005A09EC231341DA0707D54C4B9A68002AC1\n:1049B0008DD01A6842F480021A600C22484B029390\n:1049C00000210DEB0200FFF7E7FC40F20113029A11\n:1049D000039303A94020FFF7D1FE0C2200210DEB29\n:1049E0000200FFF7D9FC9DF80C30029A43F0010356\n:1049F00003A9A0208DF80C30FFF7C0FE0C22002187\n:104A00000DEB0200FFF7C8FC01241723029AADF852\n:104A10000E3003A923208DF80C40FFF7AFFE0C22C7\n:104A200000210DEB0200FFF7B7FC0623029A8DF878\n:104A30000C4003A920208DF80E40ADF81030FFF790\n:104A40009DFE02A8FFF798FE4FF4405330785A6855\n:104A50004A450ABF9B684FF4905303F500731B68E7\n:104A60005B4504D0572D02D04E2D7FF43EAF01227E\n:104A700040F6B83100F0E8FC3378002B3FF438AF53\n:104A8000FFF774FE00F0EEF800F0F8FBA0B100F0C4\n:104A900043FD88B94FF440535B684B4506D198F805\n:104AA00000300BB9FFF76EFEFFF760FE034B1B688B\n:104AB00000221A6000F004FDFFF742FE348400205B\n:104AC000D51A5A000048E80160BB0F007E67E54E2A\n:104AD0005CBB0F009F470F0000E100E0409D0020FD\n:104AE0000080002010B58EB03423ADF802300DF1F7\n:104AF0000201002301A8ADF80430FFF741FE04468F\n:104B000040B9BDF80430102B07D0112B0CD001A8F0\n:104B100000F0CCFF20460EB010BD054B01221A70EC\n:104B2000072000F005F9F2E7014B18700820F8E7BC\n:104B3000F096002013B5002301A80193FFF712FEA1\n:104B4000044660B9019802F053FA019B0A2B09D080\n:104B5000092B09D00B2B02D1012004F09BFB20462E\n:104B600002B010BD2046F8E70220F6E708B5FFF7CF\n:104B7000B9FF0528FBD1FFF7DDFF0528F7D108BDF8\n:104B80000021024A084602F003BE00BF6D4B0F0031\n:104B90001F2884BF00F01F00044B054A98BF4FF048\n:104BA000A04300F5E07043F8202070470003005058\n:104BB0000C0003001F288ABF064B4FF0A04300F0F3\n:104BC0001F00D3F8103523FA00F0C04300F00100B5\n:104BD000704700BF000300507047000008B54FF059\n:104BE000804301220021DA601220C3F818159A6070\n:104BF000FFF7CEFF1220FFF7CBFF154B4FF4C85045\n:104C000043F001039847FFF7E7FF124A1E210820EF\n:104C100002F09AFD08B102F051FE02F0FBFC0E49D1\n:104C20000E4BE02081F823001B684FF47A72B3FB2F\n:104C3000F2F3013BB3F1807F08D24FF0E0225361E1\n:104C4000002381F8230093610723136108BD00BF8F\n:104C500070BB0F00F496002000ED00E038840020C7\n:104C6000704700004FF0E0224FF40031002310B5F0\n:104C70001361C2F8801102F1C04202F540524FF4B4\n:104C80008031C2F84813C2F80813012151609160C5\n:104C90004FF080420A4CD16002201F2B1A46C6BF3B\n:104CA00003F01F0221464FF0A04102F5E0720133EC\n:104CB000302B41F82200F0D1FFF7D2FF10BD00BF2A\n:104CC00000030050074B23F81010074B002282B05E\n:104CD000C3F81021D3F810210192019A01229A60A1\n:104CE00002B07047E898002000C001400A4A0B4B10\n:104CF00011681B68B1FBF3F203FB1211B1EB530F08\n:104D00004FEA530288BF591A4F2359430020B1FB81\n:104D1000F2F189B2FFF7D6BFE4980020F0980020A6\n:104D2000024A136801331360FFF7E0BFE4980020E4\n:104D30001B490A68082823D8DFE800F0130513226E\n:104D4000221A1E242A00174B40F6B83018604FF480\n:104D50007F4303F0103323F080539A4218BF0B6057\n:104D60007047104B4FF4967018604FF47F03F0E7D4\n:104D70000C4B64221A6070470A4B40F6B83018603A\n:104D80001346E6E7074B40F6B8301860FF23E0E72C\n:104D9000044B4FF4967018604FF0FF13D9E700BF33\n:104DA000F4980020F098002000F1804382B01A6847\n:104DB000002A14BF0120002004D000221A601B68C2\n:104DC0000193019B02B070470F4A1378D3B903785F\n:104DD0004FF08041C3F34003C1F88035037803F0FE\n:104DE0000103C1F87835094B1968C90706D4E021D9\n:104DF00083F800130121C3F88011196001230448CE\n:104E000013707047034870470499002000E100E0E8\n:104E10000000AD0B0C00AD0B014B02681A6070472F\n:104E2000009900204FF080434FF46072C3F80423D0\n:104E30007047000010B54FF08043D3F80443620779\n:104E400007D54FF48470FFF7AFFF10B11E4B1B68FE\n:104E50009847A30608D54FF48A70FFF7A5FF18B14D\n:104E60001A4B00201B689847600608D54FF48C70D9\n:104E7000FFF79AFF18B1154B01201B6898472106D0\n:104E800008D54FF48E70FFF78FFF18B1104B00203C\n:104E90001B689847E20508D54FF49070FFF784FF30\n:104EA00018B10B4B01201B689847A3050AD54FF496\n:104EB0009270FFF779FF28B1054BBDE810401B68E1\n:104EC0000220184710BD00BFF8980020FC98002071\n:104ED00000990020044AD2F80034DB07FBD50160BA\n:104EE000BFF35F8F704700BF00E001404FF0805379\n:104EF0001A69B0FBF2F302FB130373B9084B0222E9\n:104F0000C3F80425C3F80805D3F80024D207FBD55D\n:104F100000220448C3F8042570470348704700BFC7\n:104F200000E001400000AD0B0A00AD0BF8B50B4BE3\n:104F30001546012206460F46C3F804250024A54263\n:104F400004D1064B0022C3F80425F8BD57F82410FD\n:104F500006EB8400FFF7BEFF0134F0E700E00140FC\n:104F6000BFF34F8F0549064BCA6802F4E062134352\n:104F7000CB60BFF34F8F00BFFDE700BF00ED00E047\n:104F80000400FA054FF08053D3F83021082A06D1E7\n:104F9000D3F83431032B02D8024AD05C704700208A\n:104FA000704700BF76BB0F0008B54FF08053D3F8B1\n:104FB0003021082A4ED14FF080420021C2F80C1156\n:104FC000C2F81011C2F8381502F54042D3F80414A3\n:104FD000C2F82015D3F80814C2F82415D3F80C141D\n:104FE000C2F82815D3F81014C2F82C15D3F81414ED\n:104FF000C2F83015D3F81814C2F83415D3F81C14BD\n:10500000C2F84015D3F82014C2F84415D3F824147C\n:10501000C2F84815D3F82814C2F84C15D3F82C144C\n:10502000C2F85015D3F83014C2F85415D3F834141C\n:10503000C2F86015D3F83814C2F86415D3F83C14DC\n:10504000C2F86815D3F84014C2F86C15D3F844348C\n:10505000C2F87035FFF796FF18B1494B494AC3F8BB\n:105060008C26FFF78FFF18B1474BFB22C3F818259A\n:10507000FFF788FF70B14FF080414FF08053D1F8B7\n:10508000E42ED3F8583222F00F0203F00F0313433B\n:10509000C1F8E43EFFF776FF20B13C4B4FF40072BD\n:1050A000C3F840264FF08053D3F83031082B09D194\n:1050B0004FF08043D3F80024D10744BF6FF00102C2\n:1050C000C3F80024324AD2F8883043F47003C2F89F\n:1050D0008830BFF34F8FBFF36F8F4FF01023D3F89B\n:1050E0000C22D2071DD52B4B0122C3F80425D3F87F\n:1050F0000024002AFBD04FF01022D2F80C3223F00B\n:105100000103C2F80C32234BD3F80024002AFBD051\n:105110000022C3F80425D3F80024002AFBD0FFF7AF\n:105120001FFFD3F80022002A03DBD3F80432002B40\n:1051300022DA184B0122C3F80425D3F80024002AF0\n:10514000FBD04FF010221221C2F80012D3F8002435\n:10515000002AFBD04FF010231222C3F804220D4B7B\n:10516000D3F80024002AFBD00022C3F80425D3F88A\n:105170000024002AFBD0D2E7074B084A1A6008BD7A\n:10518000005000404881030000F0004000900240C1\n:1051900000ED00E000E00140388400200090D003E2\n:1051A00013DF704718DF7047064B1878012803D1CA\n:1051B000012904BF0221197012B1104602F07EBB12\n:1051C000704700BF3599002008B5FFF7F3FA88B1A2\n:1051D00011481C2101F098FF08B102F06FFB0F4944\n:1051E0000D4800231C2201F07FFF98B1BDE8084064\n:1051F00002F064BB4FF47F20FFF778FE07220749D7\n:105200004FF47F20FFF792FE054B1A78012A04BF66\n:1052100002221A7008BD00BF2C9900203899002086\n:105220003599002070B5124C124D134ED4F800344D\n:105230007BB1C4F80056C4F80456C4F80856C4F844\n:105240000C56C4F81056C4F81456C4F81856C4F8CE\n:105250001C5602F005FB05F0F4FF20B104F0DAFD66\n:10526000002005F003FA3378023B022BDED870BD34\n:10527000000001403546526E3599002013B54FF4B9\n:105280004053124A596891420CBF9C684FF48054B5\n:1052900001A800F0A7F92368013302D16368013344\n:1052A00011D0019B1A88012A0DD1588820B1996824\n:1052B0000022204602F04AFB019B5B881B1A5842E1\n:1052C000584102B010BD0020FBE700BFDBE5B15143\n:1052D00084B02DE9F34108AC84E80F009DF820402C\n:1052E000BDF8228001A80F4616461D4600F07AF947\n:1052F00054B9384B0122FF21A3F802809D601A8027\n:105300009980354B1A7012E0012C17D1314BBA1924\n:105310002A449A60A5221A80FF229A800C9AA3F848\n:105320000280C3E903765D619A612B4B1C70FFF725\n:105330004BFF02B0BDE8F04104B07047032C0FD121\n:10534000019A244B11881980518892689A60C3E9A8\n:105350000376AA2259809A805D611F4B0122D1E712\n:10536000022C15D1019A1B4B1188A5290AD10022C4\n:105370009A60FF221A60FF229A800022C3E903226A\n:105380005A61EAE719805188926859809A60F2E779\n:10539000052C0ED1FFF70EFA40B100F097FD08B1D1\n:1053A00002F08CFA0C4B03221A70C2E700F010FADC\n:1053B000F5E7042C08D1074B00229A60FF221A60FF\n:1053C000019A92889A80B2E7062CB2D1024B04224D\n:1053D000EAE700BF389900203599002000B50C4B52\n:1053E0001B7889B063B90B4B1B786BB905238DF81B\n:1053F0000C30079B009303AB0FCBFFF769FF03E073\n:1054000004F000FB0028EED009B05DF804FB00BFFB\n:1054100034990020289900201FB50023CDE90233DC\n:10542000074B019301F030FE30B906494FF47F235A\n:1054300001A84B6001F046FE05B05DF804FB00BF1B\n:10544000A9510F002C99002070B505460E460AB1EF\n:1054500080F00102154B02F001021A7000F0B0FF5B\n:10546000044628B935B100F08BFC0446FFF7DAFE9C\n:10547000204670BDBEB10E4B0E4A0F481D70294626\n:1054800002F0F8F84FF400444FF4FA7029464FF454\n:105490007A720023E6FB040106F0D0F92A460146A1\n:1054A000064802F0F9F800F06FF9DEE734990020C1\n:1054B00028990020DD530F007CBB0F0008990020C5\n:1054C0001FB5134B4FF0FF32C3F88020C3F8802183\n:1054D0004FF440530F4A596891420DD19C682046C1\n:1054E000FFF75EFE10B14FF000531C60204604B081\n:1054F000BDE8104000F09AB80023CDE902334FF424\n:10550000805406236846CDE90034FFF74BFEE9E7F7\n:1055100000E100E0DBE5B15107B501A800F062F859\n:10552000019B1A88A52A07D09888A0F1AA0358429F\n:10553000584103B05DF804FB0120FAE710B501F013\n:105540005DF9A8B10E4B0F4843F00103984701F0F5\n:10555000BFF808B102F0B2F901F050F908B102F059\n:10556000ADF901F001F9044638B102F0A7F904E001\n:1055700001F01EF904460028E4D1204610BD00BF0A\n:1055800080BB0F0000A8610000B589B003AB1422F6\n:1055900000211846FEF700FF02228DF80C200022A1\n:1055A00000920FC8FFF794FEFFF73CFE002009B001\n:1055B0005DF804FB13B5044601A800F013F8019B45\n:1055C0001A8822805A8862809A68A2609A88A2808B\n:1055D000DA68E2601A6922615A6962619B69A361B3\n:1055E00002B010BD014B0360704700BF00F00F0018\n:1055F000F0B50346186880F308885868FF2464B241\n:10560000EFF30585002D01D1A64600472546064645\n:1056100021273FBAF0B40024002500260027F0B46B\n:10562000F92040B2004700BFF0BD00BFFFF7E0BF68\n:1056300073B500230DF1020101A8ADF8023001930A\n:1056400002F0C4FDF8B9019C25785DB3174B93F8BF\n:105650003020032A28D00C2606FB00F29958E9B91D\n:1056600098189D5093F830200132D2B283F8302040\n:10567000BDF802300E4A9B08013B0434436084604D\n:10568000084602F085F8019B33B128B1184602F0B4\n:10569000B9FD08B102F012F902B070BD0130042862\n:1056A000DAD1F0E70720EEE70420ECE75499002078\n:1056B000F9560F00084609B102F000B97047000022\n:1056C00010B50C220B4B504319181A5882B193F89D\n:1056D00030208C68013AD2B283F8302000221A5070\n:1056E000C1E90122201F02F08DFD08B102F0E6F8A9\n:1056F000002010BD54990020214B70B50122214E8D\n:105700001A7096F8303003B970BD1E4C002523681E\n:1057100083B1013B042B07D8DFE803F01C0612031A\n:105720002800204600F0DEFEE8B2FFF7C9FF08B10E\n:1057300002F0C4F80135042D04F10C04E7D1E0E7D0\n:10574000A3686360204600F073FE0028ECD002F0EE\n:10575000B5F8E9E7204600F053FF00F02FFF08B14D\n:1057600002F0ACF80520FFF7E3FADDE700F074FF84\n:1057700000F092FFBDE870400620FFF7D9BA00BFE5\n:10578000289900205499002008B50E4B002283F878\n:10579000302004210139C3E901221A6003F10C030E\n:1057A000F8D1094800F03EFE02F0A8FC08B102F072\n:1057B00085F8064802F08EFC08B102F07FF8002060\n:1057C00008BD00BF54990020B5560F0031560F0098\n:1057D00008B50020FFF774FF0120FFF771FF0220DA\n:1057E000FFF76EFF0320FFF76BFFBDE8084002F0F4\n:1057F000CDBC006870476CDF70476DDF70476EDFAF\n:1058000070476FDF704772DF704773DF704774DF78\n:10581000704776DF704777DF70477ADF70477CDF4D\n:1058200070477FDF704786DF70478FDF704790DFFC\n:105830007047AFDF7047B0DF7047B1DF7047B2DF4E\n:105840007047B5DF704764DF704766DF70470C282C\n:1058500013D8DFE800F01412121212120912071204\n:10586000120D0B0002207047032070470420704780\n:10587000042914BF06200520704706207047012028\n:10588000704702F01BB810B5044608460321FFF725\n:10589000DEFF0246204601F075F918B1BDE8104060\n:1058A00002F00CB810BD00000346032B10B50846EB\n:1058B000144620D0042B23D169B1124B18884FF61F\n:1058C000FF7398421CD01321FFF7A3FFC0B1BDE8BE\n:1058D000104001F0F3BF104602F094F808B101F057\n:1058E000EDFF094B1B689C420AD1012203210748A6\n:1058F00001F048F9EAE70121FFF7A9FF0246F6E7C0\n:1059000010BD00BF3E840020489A0020F899002076\n:10591000F8B50A4DAB889E181D2E14460DDC2F6875\n:10592000FE1802F1010C07F803C07070B01C05F0FE\n:105930001DFDAB8802331A19AA80F8BDA899002072\n:10594000F0B54E4E317895B0002940F092804C4C25\n:10595000019110222046FEF71FFD4A4B019923605A\n:1059600018220EA8FEF718FD01238DF838302823E1\n:105970001093454B1B78002B7DD0444B04AC03F1B6\n:10598000100518685968224603C20833AB42144612\n:10599000F7D13F4C10220DEB0201E01D05F0B4FCE5\n:1059A000002868D03B4801210460FFF728FF08B1B8\n:1059B00001F084FF384B08AA03F1100C1746186851\n:1059C0005968154603C5083363452A46F7D1206850\n:1059D0000C903248A288A379ADF8342007600122E8\n:1059E00000218DF83630FFF70CFF08B101F066FF9B\n:1059F00003238DF84C3004238DF80E3041F23053E0\n:105A0000ADF81030264B08AA9B798DF812300DF1B5\n:105A10000F0104A8FFF717FF012210460DF10E0138\n:105A2000FFF776FF1F4805F04BFE1E49C2B2092062\n:105A3000FFF76EFF102208A90620FFF769FF104943\n:105A400019480EAAFFF7DFFE08B101F037FF164C28\n:105A5000042221780120FFF7DEFE08B101F02EFFBD\n:105A600020780121FFF7D1FE08B101F027FF0123C3\n:105A7000337015B0F0BD0623BEE700BF2C9A00209E\n:105A8000A899002088990020F4990020A9BB0F0054\n:105A9000B8990020449A0020BF990020289A00203D\n:105AA000F899002086BB0F003C840020F0B5044626\n:105AB0000146B1B0A84801F099F82388262B3BD8BD\n:105AC0000F2B04D8012B00F0CC8031B0F0BD103B7F\n:105AD000162BFAD801A252F823F000BF655B0F0025\n:105AE000735B0F00CB5A0F00A55B0F009F5C0F008C\n:105AF000CB5A0F00CB5A0F00CB5A0F00CB5A0F00D6\n:105B0000CB5A0F00BB5C0F00CB5A0F00CB5A0F00D3\n:105B1000CB5A0F00CB5A0F00CB5A0F00CB5A0F00B5\n:105B2000315D0F00CB5A0F00235D0F00CB5A0F00E1\n:105B3000CB5A0F00255C0F00513B9AB2052AC4D8FE\n:105B4000052BC2D801A252F823F000BF6F5C0F00F2\n:105B5000BB5C0F00CB5A0F00CB5A0F00475D0F0004\n:105B60000B5C0F007D4BA2881A807D4B00221A70BF\n:105B7000ABE78023794CADF824307A4B2088322271\n:105B80001A6010A9012309AAFFF759FE08B101F014\n:105B900095FE754B1B780BB9FFF7D2FE4FF6FF73DE\n:105BA000238092E7714B03AC9A79186899888DF835\n:105BB00022200790DA1DADF8201017332646106812\n:105BC0005168254603C508329A422C46F7D1684BE6\n:105BD00009AA03F11807154618685968144603C442\n:105BE0000833BB422246F7D1186820605B48614AFF\n:105BF000008810AB8521CDE91456FFF712FE00286E\n:105C00003FF463AF01F05AFE5FE7A379002B7FF406\n:105C10005CAF524B13211888FFF7FBFD00283FF4BF\n:105C200054AF79E0237A012B7FF44FAF4C4B002225\n:105C30001A704C4B19680139196069B910AB1422FC\n:105C40001846FEF7A9FB05228DF84020149A009211\n:105C50000FC8FFF73DFB38E731B0BDE8F040FFF774\n:105C60006FBE3E4B00211888FFF7EFFDD6E7A37902\n:105C7000002B3FF42AAFA27B043A022A3FF625AF5D\n:105C8000022B18BF01238DF840304FF4C173ADF8DB\n:105C90004430324B10A91888FFF7CDFDAFE7334AE7\n:105CA000258A508D02F118010023854218BF19463C\n:105CB0000732A088FFF7B7FDB0E7284B1C884FF6E6\n:105CC000FF75AC4227D02C4B1B78F3B12B49012335\n:105CD00008222046FFF7B1FDF0B902460146022333\n:105CE0002046FFF7AAFDB8B92A460C212046FFF747\n:105CF000A0FDA0F54053023B012B7FF6E6AE08283D\n:105D00003FF4E3AE112889D1DFE61A461946204652\n:105D1000FFF793FD82E7082031B0BDE8F04001F0C5\n:105D2000CDBD0E4B002218881146FFF780FD75E7A8\n:105D300000238DF840308DF84130084B10A91888A9\n:105D4000FFF773FDC1E6E188044B1729188828BFC7\n:105D50001721FFF776FD61E7F89900203E840020C7\n:105D60002C9A0020408400203F9A0020B8990020FF\n:105D7000D09900203A9A0020F4990020EC99002054\n:105D800030B5464A464800231370464A95B0137012\n:105D900000F048FB01F0F6FD0446002868D14248B7\n:105DA000FEF720FC002866D1404B01221A70112317\n:105DB0003F488DF8043005F083FC3D4982B201A8CC\n:105DC000FFF72DFD08B101F079FD0822002104A89C\n:105DD000FEF7E2FA0823ADF810301823ADF81230C0\n:105DE0000023ADF8143004A84FF4C873ADF8163092\n:105DF000FFF713FD08B101F061FD00210C2201A89D\n:105E0000FEF7CAFA0823ADF804302A4B02932A4859\n:105E10002A4B039301A900F02FFD08B101F04EFDBC\n:105E2000274D4022002104A8FEF7B6FA284605F0C7\n:105E300047FCADF810002846059505F041FC079594\n:105E4000204DADF81800284605F03AFC1123ADF8B6\n:105E5000300004A8ADF84C300D9500F0DBFF1A4B74\n:105E600030221A7007225A7010229A70FFF768FDCC\n:105E7000204615B030BD04A8FFF7BFFC08B101F003\n:105E80001DFD9DF8113004A801338DF81130FFF786\n:105E9000B2FC00288BD001F011FD88E73F9A00206A\n:105EA000A9580F00399A0020B8990020F4990020D1\n:105EB00086BB0F001D5F0F00F899002083580F006C\n:105EC0008DBB0F0098BB0F003A9A002010B50F4B06\n:105ED00001221A700E4B18884FF6FF73984207D0B4\n:105EE0001321FFF796FC08B101F0E8FC002010BD7B\n:105EF000084C2378002BF9D0074B1878FFF787FC64\n:105F000008B101F0DBFC00232370EFE73F9A00208B\n:105F10003E8400202C9A00203C840020F0B50B78B1\n:105F200089B005460C46092B35D8DFE813F02D0063\n:105F3000360041000A001900260007011001440044\n:105F4000150100F089FB0421FFF781FC0246284679\n:105F500000F018FEF8B109B0BDE8F04001F0AEBCA9\n:105F6000FFF7B4FF08B101F0A9FC00F095FB90B178\n:105F700009B0BDE8F04000F09DBBFFF7A7FF002887\n:105F8000F6D001F09BFCF3E7764B01221A704B68C8\n:105F90001A78754B1A7009B0F0BD724B02261E704C\n:105FA0004B681B78012BF6D100F008FB3146CBE79C\n:105FB0006C4B0322EEE70520FEF7BAFE694B1E7814\n:105FC000022E37D0032E59D0012EE4D104AB10227B\n:105FD00018460021FEF7E0F9634A237A12788DF81B\n:105FE0001020002203920C2B4FF00302CDE9012078\n:105FF00008D03146284600F0C5FD0028CBD001F07E\n:106000005DFCC8E763681846FFF7F3FB0590181DB1\n:10601000FFF7EFFB069003F10800FFF7EAFB07909C\n:1060200001A800F005FA0028B5D03146FFF70FFCB3\n:106030000246DFE7237A13F0030011D0C0F1040217\n:106040001A44D2B219464FF0000C0E46013167686F\n:10605000C9B2914207F806C0F7D11B1A0433237264\n:106060000123049363680693237A04A89B0805938D\n:1060700000F0C6FA00288ED00221D7E7207A8307E5\n:1060800002D03246314662E7384E0190314601F087\n:106090008FFC014618B12846FFF7F5FB7BE76168E6\n:1060A000019A306805F062F9019801F0E7FC0146B9\n:1060B0000028F0D101A9304601F0F0FC014600288B\n:1060C000E9D104230493019B9B08059304A833683A\n:1060D000069300F007FA074640B9254A237A11686B\n:1060E0000B441360234B32681A6054E709281BD114\n:1060F0001F4B217A1A68114419601F4B1B78002B23\n:106100003FF449AF1D4C2388013B9BB22380002BF9\n:106110007FF441AF284600F0FBFC08B101F0CEFB54\n:10612000174B1B88238036E7306801F06BFC014673\n:1061300010B12846FFF7A7FB3946ACE70E4B01220A\n:106140001A700F4A8B8813800C4A138023E70A4A7F\n:10615000002313700A4AF8E7054B196800F09CFC0D\n:10616000F8E600BF399A0020409A00204C9A00209F\n:10617000309A0020489A0020389A0020369A002051\n:10618000349A002018DF7047012973B514460D4674\n:106190001A4608D0032912D014B3204602B0BDE835\n:1061A000704001F08BBB0F4B1B78052BF4D10E4BCD\n:1061B0001B68002BF0D0214604209847ECE7094EDD\n:1061C0003378022BE8D1094B01925B689847064B64\n:1061D00035701B68002BDFD0019A21462846ECE77A\n:1061E00002B070BD589A0020509A00205C9A00209E\n:1061F00030B589B003AC142200212046FEF7CCF85C\n:10620000094B1B88ADF80E30084BDB680693002560\n:10621000079B8DF80C50009394E80F00FFF758F897\n:10622000284609B030BD00BF689A0020B49A00200B\n:1062300000B589B003238DF80C300A4B1B88ADF8EC\n:106240000E30094B5A6804929A68DB680693079BE4\n:106250000093059203AB0FCBFFF73AF8002009B08B\n:106260005DF804FB689A0020B49A002000B589B05C\n:1062700001238DF80C300F4B0F4A1B88ADF80E3000\n:106280004FF440535968914208BF9A680B4B5968C4\n:10629000049118BF4FF480529968DB68069305910A\n:1062A000009203AB0FCBFFF713F8002009B05DF8A5\n:1062B00004FB00BF689A0020DBE5B151B49A0020CE\n:1062C00000B589B003AB142200211846FEF764F82C\n:1062D00004228DF80C20002200920FC8FEF7F8FF70\n:1062E00009B05DF804FB0000194BF7B5194C1C60B0\n:1062F000194B02221A70FEF75DFA184B48B1196863\n:10630000204600F001FF00B303B0BDE8F04001F00B\n:10631000D5BA1D68124F013D2D0B013504464FF4CF\n:1063200040567368BB420CBFB0684FF4805000EB1E\n:1063300004300134FEF7DAFDA542F2D80023054807\n:1063400000931A460321FFF71FFF03B0F0BD00BF03\n:10635000CC9A0020C49A0020589A00206C9A002001\n:10636000DBE5B15170B50C4686B00321CDE90210D2\n:106370000546960802A8019304940596FFF702FFCC\n:10638000E0B1B4F5805F019B11D8012302A8CDE9EB\n:106390000235CDE90446FFF7F5FE78B9032302A8DC\n:1063A000CDE90235CDE90446FFF7ECFE06E01A46DA\n:1063B000E11AE81AFFF7D6FF0028E6D006B070BD54\n:1063C0001FB5114B0193114B114900241C70114B47\n:1063D00001A81C80CDE9024400F074FE0E4B10B100\n:1063E0001C7004B010BD4FF440520C4954688C42EC\n:1063F00007490CBF92684FF480524A60084A002156\n:10640000116001221A70ECE789610F00B09A002038\n:10641000C49A0020689A0020589A0020DBE5B15108\n:10642000549A0020014B1860704700BF509A00201A\n:1064300038B54368214C0FCB84E80F002278500711\n:1064400001D5910733D16068830730D1A3689D07D8\n:106450002DD1E16811F0030429D1184408441849EA\n:10646000B3F5204F086024D84FF4405315495D68B8\n:106470008D420ABF9B684FF46923C3F56A23984293\n:1064800017D8114B1149196011495960D10709D525\n:10649000104A9A60104B1B78012B0CD1FFF724FF98\n:1064A000204638BD92074CBF0C4A0D4AF1E706243E\n:1064B000F6E70C24F4E70824F2E700BFB49A0020C2\n:1064C0006C9A0020DBE5B1515C9A0020E9620F0074\n:1064D000C1620F006D620F00589A002031620F00F8\n:1064E000F1610F002DE9F04385B0002853D0816899\n:1064F00011F0030451D12C4B1B78052B4FD12B4E9F\n:1065000042683368DFF8AC9003EB82039500D9F85A\n:106510000020934207D94FF0FF3333600C2420460C\n:1065200005B0BDE8F0830391FEF744F9DFF88880F9\n:10653000039940B13368D8F800002A4600F0D4FD32\n:10654000D8B10446EBE74FF44053194A586837680E\n:10655000904208BF9868039118BF4FF48050002301\n:106560002A463844FEF7C4F80399D8F8000000958D\n:106570000B4600220121FFF707FE33681D44D9F8BE\n:10658000003035609D420CD1FEF714F90028C6D1C9\n:10659000FEF790F8C3E70E24C1E71024BFE70824F4\n:1065A000BDE70924BBE700BF589A0020549A002099\n:1065B000DBE5B1516C9A0020CC9A002070B50B4BF2\n:1065C0001D6885B90A4E3378042B0CD1094C0A4B4F\n:1065D00021781A780948FEF725F810B90523337099\n:1065E00070BD2570FCE70820FAE700BF549A002030\n:1065F000589A0020B09A0020B49A0020709A002087\n:10660000F8B5114B1A78032A03D0042A03D00824C2\n:1066100016E004221A700D4B1C68002CF7D10C4DAB\n:1066200043682F789E0007EB8303402B0AD88168CC\n:1066300008483246384404F099FE2B7833442B70D6\n:106640002046F8BD0924FBE7589A0020549A002000\n:10665000B09A0020709A002010B50B4C2378052BBF\n:1066600010D10A4B0A4A1B68116899420AD10623C5\n:106670002370084B1B685868FEF70EF808B907230B\n:10668000237010BD0820FCE7589A00206C9A002067\n:10669000549A0020CC9A0020044B1B78072B02D17F\n:1066A000034B9B6818470820704700BF589A00208A\n:1066B0005C9A002000B589B006238DF80C30079B4A\n:1066C000009303AB0FCBFEF703FE09B05DF804FBAC\n:1066D000F0B58DB005A8FEF76DFF089C002C3ED0EC\n:1066E0000B9E04F58053B3422DD91E4BA6F5805561\n:1066F00003EA55054FF440539B689C420BD8690050\n:106700002B46A4EB450201F5805106EB4500FFF74F\n:1067100029FE0DB0F0BD05F58053012701A8CDE994\n:106720000173CDE90337FFF72DFD0028F1D14FF4B8\n:10673000805301A8CDE9023301970497FFF722FDAA\n:106740000028E6D1DBE70123CDE90136A4084FF4A8\n:10675000805301A803930494FFF714FDD9E7204662\n:10676000D7E700BF00F0FFFF00B58DB005A8FEF72A\n:1067700021FF099880B1089B8BB94FF440530B4A15\n:10678000596891420ED19B6880080022039001A8AD\n:10679000CDE90123FFF7F6FC0DB05DF804FB0B9A81\n:1067A0001344F1E74FF48053EEE700BFDBE5B1514E\n:1067B00000B58DB005A8FEF7FDFE099898B1089BBD\n:1067C000A3B94FF440530C4A5968914211D19B68C8\n:1067D0000393800803214FF47422049001A8CDE9AB\n:1067E0000112FFF7CFFC0DB05DF804FB0B9A1344C8\n:1067F000EEE74FF48053EBE7DBE5B15110B58CB019\n:1068000005A8FEF7D7FE0898B8B10B9C00F5805399\n:10681000A34214D94FF440539B6898421BD80F4BA6\n:10682000A4F5805203EA52035900A0EB430201F59C\n:10683000805104EB4300FFF795FD0CB010BD8008BC\n:1068400003224FF48053049001A8CDE9012303945F\n:10685000FFF798FCF1E70E20EFE700BF00F0FFFF25\n:10686000A8DF7047AADF7047ADDF7047AEDF704723\n:10687000B0DF704762DF70472DE9F0470E4694B0F5\n:106880000546002800F00181002900F0FE804B68D9\n:10689000002B00F0FA804FF6FF7303800023ADF861\n:1068A0000A307B4B04AA03F1100C1746186859688C\n:1068B000144603C4083363452246F7D141F23053EE\n:1068C0000DF10A013846ADF80830FFF7D3FF044652\n:1068D000002840F0D6802A1D02A90120FFF7C0FF42\n:1068E0000446002840F0CD809DF80A30AB71014687\n:1068F0001C220DA8FDF750FD9DF834300E9443F096\n:1069000004038DF8343001AFAB798DF80E30214699\n:1069100041F2325303223846CDE91044CDE9124406\n:10692000ADF80C30FDF738FD9DF806308DF80440C9\n:1069300023F01F0343F00303214614224FF0110AF2\n:1069400008A88DF806308DF805A00DF10C08FDF7AC\n:1069500023FD4FF01409A8880A9405F1080308AA3A\n:106960000DA90C94CDE90887ADF82C90FFF77AFFBC\n:106970000446002840F0858001461C220DA8FDF742\n:106980000BFD9DF834300E9423F0180343F01803E8\n:106990008DF83430AB798DF80E30214641F2315309\n:1069A00003223846CDE91044CDE91244ADF80C304D\n:1069B000FDF7F2FC9DF806308DF8044023F01F032C\n:1069C00043F0130321464A4608A88DF806308DF897\n:1069D00005A0FDF7E1FC1723ADF82C30A8880A9438\n:1069E00005F1100308AA0DA90C94CDE90887FFF75B\n:1069F00039FF0446002844D101461C220DA8FDF7AA\n:106A0000CBFC9DF834300E9443F002038DF8343003\n:106A1000AB798DF80E30214641F2345303223846CB\n:106A2000CDE91044CDE91244ADF80C30FDF7B4FCCB\n:106A30009DF806308DF8054023F01F0343F0030353\n:106A400021464A4608A88DF806308DF804A0FDF7C7\n:106A5000A3FC02230A93ADF82C30A8880C9605F10C\n:106A6000200308AA0DA9CDE90887FFF7FBFE04461D\n:106A700038B97368AB62B36803B1EB62054B0122AE\n:106A80001A70204614B0BDE8F0870E24F9E700BF65\n:106A9000B9BB0F00D09A002070B5054686B070B320\n:106AA00002884FF6FF739A422BD0174B1B7843B3E3\n:106AB000164C1022080AE170207121FA02F0090E2A\n:106AC000072301266071A17102A800216370ADF84F\n:106AD00006302270A670FDF75FFC2B8AADF80830F7\n:106AE0000023ADF80C3028888DF80A600DF10603FC\n:106AF00002A9CDE90434FFF7B9FE06B070BD0E203F\n:106B0000FBE70820F9E700BFD09A0020D19A0020C7\n:106B100030B5044687B060B302884FF6FF739A42DF\n:106B200029D0164B1B7833B3154D11232B700B0A4C\n:106B30006970AB700B0C090EEB70297105230021F5\n:106B4000102202A8ADF80630FDF726FC238AADF826\n:106B5000083001238DF80A300023ADF80C3020886E\n:106B60000DF1060302A9CDE90435FFF77FFE07B05A\n:106B700030BD0E20FBE70820F9E700BFD09A0020C7\n:106B8000D19A002030B5044687B038B300884FF65C\n:106B9000FF73984224D0134B1B780BB3124D102374\n:106BA00069700321ADF80610AA7000211A4602A8E8\n:106BB0002B70FDF7F1FB238AADF8083001238DF827\n:106BC0000A300023ADF80C3020880DF1060302A92D\n:106BD000CDE90435FFF74AFE07B030BD0E20FBE7D4\n:106BE0000820F9E7D09A0020D19A002070B50D4610\n:106BF00088B0044650B149B1826A3AB10B88502B33\n:106C000049D005D8102B43D0112B54D008B070BDFB\n:106C1000512BFBD18E79022EF8D10A89038A9A4230\n:106C2000F4D18B7B043B022BF0D99DF816308DF804\n:106C3000106043F001038DF816300B8AADF8183060\n:106C40004B8AADF81A30082201F1140301A8002183\n:106C50000793FDF7A1FBA18A2088019601AACDF830\n:106C600008D0FFF701FE48B3E36A03B1984740F24A\n:106C7000FD132088ADF8143004A9FFF7F9FD0028B2\n:106C8000C4D0E36A002BC1D008B0BDE870401847FB\n:106C90008B882380BAE7C98803899942B6D1082333\n:106CA0008DF81030123535F8023C8DF81830059506\n:106CB00004A99047AAE74FF6FF73EAE7BDF8003052\n:106CC0002088DB07D3D5002604A9ADF81460FFF7B0\n:106CD000CFFD0028D5D1297D4B1E072B3ED8DFE8FC\n:106CE00003F004192226282A3B2C6B8A8DF80460B5\n:106CF000012B05D8062201212046FFF743FFBEE7FE\n:106D0000012315358DF80C300295A36A01A92046A0\n:106D100098477BE76A8A01239A428DF80430F0D8BD\n:106D200006220221E8E702238DF80430EDE7032371\n:106D3000FAE70423F8E70523F6E76B8A022B02D86B\n:106D400003220821D8E7B5F81530ADF80830002B3C\n:106D50000CBF07230623E7E70923E5E70322CBE778\n:106D6000A8DF7047AADF70472DE9F04180468EB05A\n:106D700015461F460E4611B9084600F09FFD15B98D\n:106D8000284600F09BFD1C220DEB02000021FDF7C0\n:106D900003FB9DF81C30ADF80480002443F002038F\n:106DA0008DF81C3021460123032268468DF80630F9\n:106DB000CDE90A44CDE90C440894FDF7EDFA3B789F\n:106DC0008DF800307B788DF801309DF8023023F08B\n:106DD0001F0343F002032146142202A88DF802305B\n:106DE000FDF7DAFA0A48CDF80CD001AB029302AAFB\n:106DF000149B0088ADF8105007A9ADF81240ADF80B\n:106E000014500696FFF7AEFF0EB0BDE8F08100BF4C\n:106E1000F89A002030B587B041F60A032B4AADF846\n:106E20000C30044603A901208DF80E00FFF798FFEF\n:106E30000546D8B92288E2B922894AB1244B009389\n:106E4000E16804F13C0342F62420FFF78DFFD8B936\n:106E5000228C4AB11F4B0093616A04F13C0342F655\n:106E60002620FFF781FF78B9A36B7BB9284607B0CE\n:106E700030BD194B0093616804F13C0342F62920B0\n:106E8000FFF772FF0028D7D00546EFE71A788DF894\n:106E900010205A888DF81120120A8DF812209A8835\n:106EA000DB888DF815301B0A8DF813208DF816300D\n:106EB000120A0A4B8DF814200093072204F13C03B8\n:106EC00004A942F65020FFF74FFFDDE7F89A0020B3\n:106ED000E89A0020D89A0020E09A0020F09A00203A\n:106EE00029DF704728DF7047064B182202FB00306D\n:106EF00000230422C0E90423037183608361C3601B\n:106F0000704700BF0C9B002023B502460846C968A5\n:106F100043680093044B53F82150436910F80C1B4D\n:106F2000A84702B020BD00BFFC9A002038B5194C1C\n:106F30002378182202FB03431A795869012A03D0E7\n:106F4000032A1AD00F2038BD134A996915689A6828\n:106F5000DB68A2EB0532B2F5805F184401EB053126\n:106F600000EB053034BF92084FF48062FFF7B8FFA2\n:106F70000028E8D10123A370E5E74FF080531B6997\n:106F80009BB2B0FBF3F0044B1B681844FFF7AAFF59\n:106F9000EEE700BF0C9B0020049C002070B5134D51\n:106FA0006C780A2C1FD02E783444E4B2092C84BFAC\n:106FB0000A3CE4B2182606FB0454A261207103C9FE\n:106FC000A360049BE360AB7804F1100282E8030045\n:106FD00023B100206B7801336B7070BDFFF7A6FF03\n:106FE0001128F7D1F5E70420F7E700BF0C9B00203C\n:106FF00070B5234CA3782BB100260228A67002D0CE\n:10700000032833D070BD25781E4A182101FB0541A5\n:10701000136889680133B1EB033F136014D86378B8\n:107020001660013B63706B1CDBB21821092B01FB5E\n:10703000054188BFA5F10903002004312370FFF743\n:1070400063FF2846FFF750FF6378002BDAD0A37860\n:10705000002BD7D1FFF76AFF0028D3D01128D1D059\n:107060002178182303FB0141043105E0217818231E\n:1070700003FB014104310D20BDE87040FFF744BF20\n:107080000C9B0020049C002008B50A4B00211960CD\n:10709000094B1980997008460131FFF725FF0A292D\n:1070A000F9D1064B00201860054BC3E90000C3E985\n:1070B000020008BD049C00200C9B0020009C0020C6\n:1070C000FC9A0020064A03461068042807D008608E\n:1070D000411C11601A68034B43F8202000207047C0\n:1070E000009C0020FC9A002013B5CC180C43A40788\n:1070F00008D1009313460A4601460120FFF74EFFD0\n:1071000002B010BD1020FBE707B500220B4600922D\n:1071100001460320FFF742FF03B05DF804FB0000C7\n:10712000094B5A7899780132D2B2914208BF0022B5\n:10713000197891421FBF02705878182202FB003064\n:1071400014BF043000207047089C0020082910B5A7\n:10715000044602D0002000F0B1FBD4E90030BDE8C5\n:107160001040184773B5054600240DF107000E4680\n:107170008DF8074000F0B0FB0DF10600FFF7D0FFDF\n:1071800090B10670094B9DF8062045605A709DF835\n:10719000070000F0C5FB24B9054B4FF48012C3F87B\n:1071A0000021204602B070BD0424F0E7089C0020B6\n:1071B00000E100E0204B21491A682F2300BF00BFE7\n:1071C00000BF00BF00BF00BF00BF00BF8A422FD07A\n:1071D00000BF00BF00BF00BF00BF00BF00BF00BFB7\n:1071E00000BF00BF00BF00BF00BF00BF00BF00BFA7\n:1071F00000BF00BF00BF00BF00BF00BF00BF00BF97\n:1072000000BF00BF00BF00BF00BF00BF00BF00BF86\n:1072100000BF00BF00BF00BF00BF00BF00BF00BF76\n:1072200000BF00BF00BF00BF00BF00BF00BF00BF66\n:10723000013BC3D1704700BF388400200024F40014\n:107240000C4B0D484FF4003210B5C3F880200124D8\n:107250004FF48033C0F84833C0F808334460FFF778\n:10726000A9FF064B846000201860FFF7A3FF044BC2\n:10727000187010BD00E100E000100140249D0020C6\n:10728000159D00202DE9F3412549264B0025C1F825\n:107290004051C1F84451C1F84851C1F84C51C1F8AE\n:1072A0000051C1F804511B68002B34D0D1F80445BB\n:1072B0001D49DFF888800968641A24F07F442F464E\n:1072C0001968A14212D81A7CDE69641A0D4462B1B1\n:1072D0005A691F7400929B690193424608216846CF\n:1072E00000F056FA08B100F0E9FABEB90F4A104BA7\n:1072F00011781B788B4205D10133DBB2022B08BF1A\n:107300000023137012780B4B43F822500A4B4FF4B2\n:107310008012C3F8002102B0BDE8F0813346CFE708\n:1073200000100140289D0020249D0020219D002068\n:10733000209D0020189D002000E100E04D710F000D\n:107340002DE9F74FA84AA94913780978A84C994222\n:107350003BD00133DBB2022B08BF00231370A549D9\n:107360001278A54B0F6853F822003B1823F07F4397\n:1073700000220B60236815461646944613B942B1A5\n:10738000236006E0196881420DD902B12360091A11\n:10739000196001262368DFF8689200930027BDB9C1\n:1073A000DFF868A268E0401A0E44D968D3F81CE000\n:1073B000C3F800C031B1BA1922F07F42C3E90121FC\n:1073C000DD611D4673460122D8E700252E46E1E720\n:1073D0002846ED69874BD0F804C01B68DFF830E21F\n:1073E0008168ACEB030222F07F42724500F2AD806F\n:1073F0000A4402600122027422680023C0E90133BA\n:10740000C361002A40F0AB802060C8E75A1C9AF89C\n:107410000210D4F800B0D2B291428AF8002004BF22\n:1074200000228AF80020182202FB03A31A79986828\n:10743000022A77D0032A00F08580012A1CD190F817\n:1074400010C0BCF1000F17D1D96841601A69826081\n:107450005A69C2609B698361684B1B78002B18BF17\n:1074600061464160B6E7904200F09E809046D26946\n:10747000002AF8D1002303749AF800309AF801200A\n:107480009A42C3D1236827B9009A9A4201D1002EAB\n:1074900042D0002B00F08580D3F80090584C554B1B\n:1074A000D4F804651868574F351A3B7825F07F45A6\n:1074B00003359BB94FF48033C4F84433C4F8043324\n:1074C000514B4FF400324FF00108C3F880211A608D\n:1074D000C4F80080FFF76EFE87F80080A9452CBF36\n:1074E0004844401920F07F40C4F84005D4F80435E2\n:1074F0009B1B23F07F43801B033320F07F4083429C\n:107500000AD9D4F80435C4F84035FFF753FE3E4B92\n:107510004FF40032C3F80021384B00221A7003B038\n:10752000BDE8F08F5A46D846A2E78BF81020DBF86A\n:107530001CB00123BBF1000FF7D1002B9CD0C4F885\n:1075400000B099E700231A46F4E7A3EB0C0323F0FD\n:107550007F438B4234BFCB1A002303604AE70168A4\n:10756000136899421BD85B1A1360C2614CE7A1EB08\n:107570000C01D3F81CC01A46BCF1000F0AD06346B8\n:10758000D3F800C08C45F2D3ACEB010CC3F800C0BB\n:107590009C4613460160C0F81CC0D861FFE6134644\n:1075A000EEE7FFF74DFEB7E7404510D1DBF81C30A2\n:1075B000236063B9DFF83CE001920121C9F80810AB\n:1075C000CEF800300D4B1970FFF7F4FD019A1368E7\n:1075D000D269C8F81C2012B111680B4413602368EB\n:1075E0005B4518BF012745E7209D0020219D002015\n:1075F000289D0020249D0020189D0020149D00201F\n:1076000000100140159D002000E100E0089C0020D2\n:10761000FEFF7F0008B5FFF713FE104B00200B2282\n:1076200018809A700E4B18600E4B18700E4B187025\n:107630000E4B4FF48012E021C3F8802183F814131D\n:107640001A6002F18042A2F56F22C2F8080583F8A1\n:107650001113074BD2F804251A6008BD089C0020BE\n:10766000289D0020209D0020219D002000E100E0B9\n:10767000249D0020074B9B784BB132B128B10368A1\n:10768000187C20B959745A61704707207047082048\n:10769000704700BF089C00202DE9F743DFF8848085\n:1076A00098F8023005460E461746ABB3A0B304293E\n:1076B00030D9436983B3437C0024012B0DF10700CB\n:1076C0000CBF8946A1468DF8074000F005F90DF181\n:1076D0000600FFF725FDD8B1012303700F4B45606D\n:1076E000D3F80435C0E90497C0E902369DF80630A6\n:1076F00088F801309DF8070000F012F924B9084B12\n:107700004FF48012C3F80021204603B0BDE8F08397\n:107710000424EFE70724F7E70824F5E70010014009\n:1077200000E100E0089C0020064A92783AB130B1AE\n:10773000426922B1002202740221FFF713BD082022\n:10774000704700BF089C00204B1C30B5DB0004468E\n:1077500012F003009BB20DD1074D2A601A44074B6B\n:107760001A60074B1870074B1870074B1C80074BAB\n:10777000198030BD0720FCE7349D0020309D00209B\n:107780002C9D00203C9D0020389D00203A9D00202B\n:107790002DE9F347DFF8C080B8F800308B42064689\n:1077A0000D4617464CD300240DF107008DF8074015\n:1077B00000F092F8244B254A25481B78008892F85F\n:1077C00000C084455FFA8CF138BF4C1CDBB238BF77\n:1077D000E4B2A3422ED014781178CBB2884286BF8F\n:1077E0000133DBB2002313709DF8070000F098F816\n:1077F0004FF6FF739C4225D0DFF86090D9F8002047\n:107800004FEAC40A42F8347002EBC403AEB1A5B12A\n:10781000104BB8F800001B682A4604FB00303146C4\n:1078200003F0A4FDD9F80030534400209D8002B03D\n:10783000BDE8F0874FF6FF74D6E700209880F6E7A2\n:107840000920F4E70420F2E73C9D00202C9D002055\n:107850003A9D0020309D0020389D0020349D00205E\n:1078600070B5104C104D22782B789A4200D170BD23\n:107870000E480F4A2378126806880E4802EBC301AF\n:10788000006852F83320898803FB060090470A49B4\n:1078900022780988D3B2914286BF0133DBB200233C\n:1078A0002370E0E73C9D00202C9D0020389D0020A7\n:1078B000349D0020309D00203A9D00201FB50021FE\n:1078C000CDE9021001AA44F20100ADF80410FCF762\n:1078D00066FF05B05DF804FB70B5EFF3108672B675\n:1078E0000C4A946801239CB993600B4B0B4DD3F861\n:1078F000801029401160C3F88050D3F88410516083\n:107900004FF0FF32C3F88420047006B962B670BD30\n:107910000370FAE7409D002000E100E0FC06FFBD97\n:1079200010B5084B9A685AB150B9EFF3108172B68E\n:10793000054A1C6814605C685460986001B962B6BE\n:1079400010BD00BF409D002000E100E003462AB1C9\n:1079500010881A4619448A4203D170474FF6FF70C7\n:10796000F7E712F8013B40BA80B25840C0F3031366\n:10797000584080EA0033580100F4FF509BB2584051\n:10798000E9E70000064B074A00201870064B1A6012\n:107990000822C3E90120C3E90300C3E905007047D9\n:1079A0004C9D0020509D002030B0002000207047EA\n:1079B00030B5F9B1124B5C6800220A60E4B1B0F551\n:1079C000167F1BD8D868013C01305C60D8601C6809\n:1079D00018694FF4177505FB00440C60012101FA8A\n:1079E00000F49969013000F00700214318619961A2\n:1079F000104630BD0E20FCE70420FAE70C20F8E723\n:107A000030B00020F0B51C498A689AB34D690E6801\n:107A1000AC1A04F0070423464FF4177707FB036CF6\n:107A2000604511D1012000FA03F58869684088613A\n:107A300000204E68D1F818C04FF0010E73440025A5\n:107A4000164403F007030AE0013303F007039D42E5\n:107A5000E4D11020EDE74AB1013A1C4601250EFAA7\n:107A600004F414EA0C0FA6EB0207F4D00DB1C1E93F\n:107A70000172F0BD0420FCE730B00020064A136913\n:107A80001268013B4FF4177103F0070301FB032356\n:107A9000C3F858020020704730B0002030B5C0B1A4\n:107AA000B9B10E4BDA68B2B1013ADA609A681C6873\n:107AB00001329A605A694FF4177505FB024404605D\n:107AC0000132D4F85802086002F007025A6100201F\n:107AD00030BD0E20FCE70420FAE700BF30B00020E4\n:107AE0003FB40C49086890B10B4B1C687CB10B4A41\n:107AF0001568CDE9025000238DF804300B60136047\n:107B000004AB13E90700234604B030BC184704B0A7\n:107B100030BC704754B0002058B0002064B0002042\n:107B2000DC2810B509D0DD2810D0C02816D1FFF709\n:107B3000D7FF0E4B0E4A1A6010BD0E4A0E4B196845\n:107B40001368581C1060C022CA54F2E7094A0A4B55\n:107B500019681368581C1060DB22F5E7064B054ACC\n:107B6000196813685C1CC8541460E2E74484002060\n:107B7000917B0F0054B0002064B00020C02802BFE9\n:107B8000014B024A1A60704744840020917B0F0029\n:107B9000C02810B409D0DB280BD0094B094A19685A\n:107BA00013685C1CC854146006E05DF8044BFFF7D2\n:107BB00097BF054B054A1A605DF8044B704700BF3C\n:107BC00064B0002054B0002044840020217B0F00CA\n:107BD00007B501228DF807000DF10701002002F022\n:107BE00085FD00280CBF0420002003B05DF804FBD5\n:107BF00010B5064A064C12682368D05CFFF7E8FF10\n:107C000010B923680133236010BD00BF68B00020A5\n:107C10005CB0002008B5C020FFF7DAFF28B9034B9D\n:107C20001B6813B9024B034A1A6008BD5CB0002000\n:107C300048840020F17B0F0008B5DB20FFF7C8FF68\n:107C400010B9024B024A1A6008BD00BF48840020E8\n:107C5000557C0F0010B50C4A0C4C12682368D35C9D\n:107C6000C02B03D0DB2B0DD0042010BDDC20FFF790\n:107C7000AFFF0028F9D12368054A01332360054B83\n:107C80001A60F2E7DD20F2E768B000205CB0002067\n:107C9000F17B0F00488400207FB5184C184D194E19\n:107CA000002002F0C3FC30B322689AB1296833681F\n:107CB00099420FD2012201A9002002F0C3FC10B9A1\n:107CC0004FF0FF3001E09DF804000F4BC0B21B687D\n:107CD0009847E5E70D4B1B686BB10292084A0221F9\n:107CE000126803928DF8041004AA12E9070004B088\n:107CF000BDE87040184704B070BD00BF64B00020FC\n:107D000054B0002050B000204484002058B000201F\n:107D1000014B18600020704758B00020034B1A78C0\n:107D20000AB901221A700020704700BF4CB0002031\n:107D3000014B0020187070474CB000202DE9F04F27\n:107D400085B0002851D02A4F3B78012B07D0022B59\n:107D500014BF08240424204605B0BDE8F08F254D4B\n:107D6000DFF8A090244E254CDFF89C80DFF89CA023\n:107D7000DFF89CB0C9F8001000232B6002233060AC\n:107D80003B70C4F800802A68D9F800309A4215D3B5\n:107D9000C4F80080FFF73EFF044608BB184B1B6881\n:107DA00001223A70E3B18DF80420326802922A6809\n:107DB000039204AA12E907009847CCE733682A68BF\n:107DC0009A5CC02A03D02A689B5CDB2B04D1236811\n:107DD000534508BFC4F800B023689847042801D170\n:107DE0000024B8E71128CED1FAE71024B3E700BF8A\n:107DF0004CB000205CB0002068B000204884002017\n:107E000058B0002060B00020157C0F00F17B0F00FF\n:107E1000397C0F00054B064A1860064B1960064B6B\n:107E200000201860054B1A60704700BF64B0002046\n:107E30007D7B0F0050B0002054B00020448400200F\n:107E4000064B07481B68DB00DBB2002203705B4275\n:107E500042708270C3700421FFF770BF94B000209D\n:107E60006CB0002070B52B4C2B4D02462378012BB3\n:107E700014D0022B21D0002B4BD1002A49D1274806\n:107E8000FFF752FC08B1FFF719FD254B1B68002BCB\n:107E90003FD0244ABDE8704010781847012A38D1F5\n:107EA0002968214B06311868FFF748FF08B1FFF732\n:107EB00005FD022323700022D8E7022A16D0032AE8\n:107EC0000CD032BB194B15481A6041F67F21FFF7E1\n:107ED000E3FBF0B1BDE87040FFF7F0BC144A136853\n:107EE000013303F0070313600023E3E70F4A13682D\n:107EF000052B0AD001331360074B19680A4BBDE804\n:107F0000704018680631FFF719BF064B01221A703E\n:107F1000EAE770BDB8B00020ACB0002070B000201F\n:107F2000A8B00020B0B00020C0B00020B4B0002045\n:107F300098B00020F0B585B004AB03E907009DF8C8\n:107F40000400032874D8DFE800F00802A3A601208B\n:107F500005B0BDE8F040FFF785BF039E544C032EEB\n:107F600040F28280029D6B7813F00F0265D00E2ADA\n:107F70007AD1042E55D02A78500652D5110650D504\n:107F80001A44AB781A44EB781A4412F0FF0248D135\n:107F9000B71E39462846FFF7D9FCEB5B834240D138\n:107FA00044492A780B6802F00702D8B282422BD1EA\n:107FB000013303F007030B60FFF742FF3E4B012242\n:107FC00030461A70FFF75AFD08B1FFF777FC3849C1\n:107FD0004FF41670FFF7ECFC002862D0042802D0A2\n:107FE0000020FFF76BFC35480521FFF713FF08B1B0\n:107FF000FFF764FC324B1B68002B56D04FF000009B\n:1080000005B0BDE8F040184720684FF41671FFF73F\n:1080100001FF08B1FFF752FC05B0BDE8F040FFF7E3\n:108020000FBF20684FF41671FFF7F4FE00283CD014\n:1080300005B0BDE8F040FFF741BC2978AA780B44B1\n:108040001344EA78134413F0FF030DD11D4A12685C\n:108050000132C1F3C20102F00702914204D11A4A6F\n:1080600003201370FFF7FEFE25681DB14FF4167153\n:108070002846D9E70E494FF41670FFF799FC60B116\n:10808000042802D02846FFF719FC0C480521CBE74D\n:108090000A480521C8E70320CAE720684FF4167193\n:1080A000C2E720684FF416719FE705B0F0BD00BF2E\n:1080B000BCB0002094B0002090B000209CB0002004\n:1080C000A4B0002098B00020B0B000200220FFF73C\n:1080D000C9BE0000074B10B5044618600648FFF7FC\n:1080E00017FE08B1FFF7EAFB002C0CBF0E200020A2\n:1080F00010BD00BFA4B00020357F0F00184A1948FA\n:10810000002310B51360184A1360184A1360184A08\n:108110001370184A1370184B184A01211960184B34\n:108120001960184B1970FFF7A5FA08B1032010BDAC\n:10813000FFF728FC0028FAD1FFF7F0FD0028F6D160\n:10814000114C4FF416702146FFF732FC0028EDD198\n:1081500020684FF41671BDE81040FFF75BBE00BF0A\n:10816000C0B00020CCBB0F00ACB00020B4B00020E9\n:1081700090B00020B8B0002094B00020CD800F0057\n:1081800098B00020B0B00020BCB000200C4A08B568\n:10819000002313600B4A1360FFF708FC08B1FFF7D8\n:1081A0008DFBFFF7C5FD08B1FFF788FB0648FFF719\n:1081B000BBFA042802D10020FFF780FB002008BD95\n:1081C000A8B00020A4B0002070B0002037B50D4644\n:1081D000044698B191B10A4B19780022019259B125\n:1081E00001A91A70FFF75AFC019B063B2B802368FC\n:1081F0000433236003B030BD0420FBE70E20F9E711\n:1082000090B000200438FFF7FDBB18DF7047000076\n:10821000F0B51D46154B87B018680F4659681B7A94\n:1082200003AC03C42370124B18685968114B0093B8\n:1082300001AC03C42046164603F042FA214602462A\n:10824000384603F093F801A803F03AFA01A9024670\n:10825000304603F08BF8684603F032FA694602466E\n:10826000284603F083F807B0F0BD00BFD0BB0F0075\n:10827000D9BB0F00312E30000120704710B51C46CD\n:108280000B781E2B0AD000232022052102F07AFC55\n:108290004FF6FF70A04228BF204610BD0020F9E72E\n:1082A000F8B5069F14460D463A46002118461E466C\n:1082B000FCF772F87CB14FF0E023D3F8F03DDB0718\n:1082C00000D500BE4FF0FF300AE0284600F0F8F974\n:1082D000013504F50074BC4206EB0401F5D32046D9\n:1082E000F8BD0000F8B50A4F0D461E460024069B57\n:1082F0009C4206EB040101D32046F8BD3A462846CD\n:1083000000F0B4FA0028F7D0013504F50074EEE768\n:10831000C4B0002030B5264D2A7A8DB09AB107AC92\n:108320001422002120460625FCF736F88DF81C5053\n:108330000B9B009394E80F00FCF7CAFF0620FCF7A4\n:10834000F7FC0DB030BD2B68002BFAD0194B197813\n:1083500019B105201A70FCF7EBFCD5E900329A42FE\n:10836000EFD307AC142200212046FCF715F86B7AF6\n:10837000DBB106234FF420424FF474214FF4602008\n:108380008DF81C3002F0C0FF0028D1D0102200214F\n:1083900003A8FCF701F84FF460224FF4205303A820\n:1083A000CDE90423FFF731FFC2E78DF81C30BFE7AA\n:1083B000C4B000204C840020024B0B604FF40073CB\n:1083C0001380704709010100012070470048704781\n:1083D000FA840020044B054A1878054B002814BF86\n:1083E00010461846704700BFE0B20020AF8400205E\n:1083F0004D8400202DE9FF411E4B187020B11E4B0B\n:108400002A229A720022DA721C4A1D4DDFF878C0C7\n:1084100017461C4BEE4603F110067446186859685F\n:10842000F046A8E803000833B342C646F6D12B78DD\n:1084300003F00F0310336B4413F8103CD373114B4C\n:1084400018685968A646AEE803000833B34274467C\n:10845000F6D115F8013B04A901EB1313654513F898\n:10846000103C9373A2F10202D3D100233B7404B0F9\n:10847000BDE8F081E0B20020FA84002064B300205F\n:1084800060000010E1BB0F006800001010B570B96B\n:10849000134B14481968022202F068FF01230133CC\n:1084A000DBB211485B0043F44073038010BD052824\n:1084B00014D80B4B53F82040204603F001F9C3B207\n:1084C0001F2B28BF1F23084A2046E118884202F1CB\n:1084D0000202E4D010F8014B1480F7E70020E5E732\n:1084E0000C850020E4B20020E2B200204DDF70478E\n:1084F0004EDF70474FDF704750DF704712DF704725\n:1085000000F0C8BE002000F033BD00001FB5244BB2\n:10851000402283F8272300238DF807304FF440537F\n:1085200004465A681F4B9A4227D10DF10700FFF706\n:10853000E5FF9DF8073003B30120FFF7D9FF0120C5\n:10854000FFF7D4FF0120FFF7D5FF02A8FFF7D4FF04\n:10855000029BDA0702D5002000F09CFE029B9B07DD\n:1085600002D5022000F096FE2046FFF743FF00F000\n:1085700027F802F059FE04B010BD002301A88DF8C1\n:108580000430FCF721FC084B039303A8FCF744FCE0\n:10859000FCF748FC4FF08043D3F838340293D7E718\n:1085A00000E100E0DBE5B15101850F00012000F0A2\n:1085B00071BE0120FCF7BCBB0220FCF7B9BB000078\n:1085C0007FB52F492F4802F0E7FF4FF440532E4A62\n:1085D000596891424CD11A78102A46D9142A186940\n:1085E00044D95B69294CB3FBF4F50A2201A904FBC9\n:1085F000153403F021F92649224802F0CDFF01A9E4\n:10860000204802F0C9FF23491E4802F0C5FF0A2294\n:1086100001A9284603F010F901A91A4802F0BCFF8D\n:108620001D49184802F0B8FF4FF47A760A2201A9D2\n:10863000B4FBF6F5284603F0FFF801A9114802F053\n:10864000ABFF15490F4802F0A7FF0A2201A906FB5C\n:10865000154003F0F1F801A90A4802F09DFF0F4907\n:10866000084802F099FF04B070BD00200023B9E76C\n:108670000B49044804B0BDE8704002F08DBF00BF54\n:10868000FFBB0F0024850020DBE5B15140420F0005\n:108690000CBC0F000ABC0F000EBC0F0019BC0F0071\n:1086A00010BC0F0010B503461C1A944200DB10BD2D\n:1086B0000C781CB1013103F8014BF5E72024FAE7EF\n:1086C0002DE9F3410C4605464FF400720021204687\n:1086D000FBF762FE6DB95E493E22204602F046FE7F\n:1086E000552384F8FE31AA2384F8FF3102B0BDE897\n:1086F000F081B5F5017F2DD8691EB1F5817F24BFCA\n:108700006FF4817805EB0801C9B10B02C1EBC151CF\n:1087100003F5807004EB412440F693651A1FB2F50F\n:10872000696F03F1010206D2AB4214BF91B24FF65A\n:10873000FF7124F8131090421346EFD1D6E7F823C7\n:10874000237004F109022346FF2003F8010F93422E\n:10875000FBD1DAE7B5F5027F3BD86FF4017C6544C5\n:108760003DB920463B490B22FFF79CFF2823E372CB\n:10877000203439492E014FF0000801EB05256FF038\n:108780001907022EB2D80B2229462046FFF78AFF8E\n:108790005923212269216374E3746376B31C84F83E\n:1087A0000D80A773E1732274A27484F8148084F896\n:1087B0001580A775E17522766383E86830B102F011\n:1087C0007FFFE061013620341035DAE74FF4E9101D\n:1087D000F7E7224B9D4289D86FF40277EA19012A04\n:1087E0000FD81D4B03EB0213D9680191084602F024\n:1087F00067FF01990246204602B0BDE8F04102F051\n:10880000B5BD6FF4FD76A9190902B1F5801FBFF45B\n:108810006DAF134B236003F1144303F52C1303F6E0\n:10882000023363600F4BC4F8FC314FF46963A361FA\n:108830004FF40053A5F20B254FF48072A3600A4B4E\n:108840006561E1602261E36104F12000D4E700BFCB\n:108850001CBC0F0047BC0F00D4BC0F000801010076\n:108860005546320A306FB10A29009A23F7B5654B95\n:1088700014460A689A420D4639D103F114434A68F6\n:1088800003F52C1303F602339A4230D1D1F8FC21C0\n:108890005D4B9A422BD18B6823F4FF5323F01E03C8\n:1088A0009B049B0CB3F5005F21D10B69B3F5807F6E\n:1088B0001DD1C86810F0FF0619D1CB69534A934205\n:1088C00005D0534A934215D0524A93420FD1A0F596\n:1088D0008053B3F5692F07D201234FF4807205F15D\n:1088E0002001FBF705FF22E0B0F5805F1FD34FF0BA\n:1088F000FF3021E001276772CB68B3F1102F1DD143\n:1089000004223431684602F031FD042205F13801B9\n:108910000DEB020002F02AFD009BB3F5742F03D18A\n:10892000019BB3F57E2F01D02772E0E7A772AB69F8\n:10893000002B37D14FF4007003B0F0BDA3F57422C3\n:10894000B2F5204F28D2E27A01F12007DAB9324A93\n:10895000934218D32B69B34215D90422B91968463A\n:1089600002F004FD009BD02B14D10422311D0DEB2D\n:108970000200394402F0FAFC264B019A9A424FF069\n:1089800001030DD1E372E8682A6901233946A0F595\n:10899000A030A6E70836DDE7B3F5805FC7D3012333\n:1089A0002372A4E72268934207D041F263018B420D\n:1089B00000D80AB14FF0FF3323606B6941F26302C4\n:1089C0009342B7D803F0070204EBD303012191408F\n:1089D0001A7B1142C8B204D16168024301311A7393\n:1089E0006160D4E900329A42A4D30120FBF762FE11\n:1089F000637A002B9ED0A37A002B9BD10123237294\n:108A000098E700BF5546320A306FB10A4028A5AD3D\n:108A10003C8263D629009A2300D80F004FF0805380\n:108A2000D3F83001082802D1D3F8343123B9A0F1AA\n:108A30000D0358425841704701207047094B0122ED\n:108A400083F8D8200260BFF36F8FBFF34F8F064AC1\n:108A5000904202D0043A904202D1002283F8D820FA\n:108A6000704700BF78B300205070024042DF70476B\n:108A700043DF704744DF704712DF704710B5134B78\n:108A8000134A5B68C3F3080373B9EFF310835BB950\n:108A900010494B681B0607D58024C1F8844092F822\n:108AA000D8307BB14C60F8E792F8D83033B101464A\n:108AB000BDE810400848012201F094B8BDE810401C\n:108AC000FFF7BCBFFFF7BAFF4C6010BD00ED00E040\n:108AD00078B3002000E100E07D8A0F000D4B1822E2\n:108AE00002FB0033598A1A8A521A998A92B28A4230\n:108AF00028BF0A46D9681423434303F1804303F592\n:108B00001C33C3F80016C3F80426034B03EB8000A4\n:108B1000FFF7B4BF78B300200470024007B54FF4EC\n:108B2000405300205A68084B9A420AD18DF807003A\n:108B30000DF10700FFF7A0FF9DF80700003818BFF0\n:108B4000012003B05DF804FBDBE5B15107B5FFF789\n:108B5000E5FF58B1002301A80193FFF78BFF0198AF\n:108B6000003818BF012003B05DF804FB4FF08043CC\n:108B7000D3F80C0400F00110A0F101135842584141\n:108B8000F1E70000074BD3F8C024D10309D406490C\n:108B90000648D1F8C010C3F8A017C3F8A427FFF700\n:108BA0006DBF70470070024078B3002048700240EB\n:108BB0000828F0B402D1F0BCFFF7E4BF0F4D104A13\n:108BC000182141436E1800F59473695852F82340F8\n:108BD000F788B388DB1B9BB2A4B2A34228BF23460D\n:108BE000142404FB0022C2F80017C2F80437054B16\n:108BF000F0BC03EB8000FFF741BF00BF78B300205B\n:108C0000007002402870024070470000014B802233\n:108C10005A60704700E100E0024B8022C3F88420D4\n:108C2000704700BF00E100E0074BD3F80014D3F811\n:108C300000240A43C3F800240022C3F858214FF44B\n:108C40008002C3F8042370470070024070B5887832\n:108C5000404D00F07F0318220C26C4095A4306FB3E\n:108C600004228E882A44C6F30A061681CA7802F0C6\n:108C70000302012A29D00121374A01FA03F5D4B9A8\n:108C800003F10C06B140C2F80413D2F8141503F531\n:108C900094732943C2F8141542F823402E4BC3F8AD\n:108CA000180540F48070C3F80C05BFF36F8FBFF355\n:108CB0004F8F012014E002339940C2F80413D2F818\n:108CC00010352B43C2F81035E8E7082B09D04FF0D8\n:108CD000E023D3F8F00D10F0010001D000BE002019\n:108CE00070BD1D4BDCB9B5F8D42012B18022C3F899\n:108CF0001C250022C3F85021D3F8002312F40012DF\n:108D000008BFC3F85421144B4FF44012C3F8042396\n:108D1000D3F8142542F48072C3F81425BEE700226C\n:108D2000C3F82C21B5F8C82012B18022C3F81C2545\n:108D3000094BD3F8002312F4001208BFC3F85421E2\n:108D4000064AC3F80423D3F8102542F48072C3F80E\n:108D50001025A3E778B3002000700240000820002F\n:108D60001D4B2DE9F041802201241C4DDFF8788055\n:108D7000C3F88420274604F10C03A21C07FA02F270\n:108D800007FA03F31343C5F80833A30003F1804344\n:108D900003F51C330026182202FB04805E60314676\n:108DA0009E620134FBF7F8FA082C4FF01802E2D16A\n:108DB0000B4BC5F808330B48C5F81C6531466E628D\n:108DC000AE64FBF7E9FA044BC5F814758022C5F8C8\n:108DD00010755A60BDE8F08100E100E000700240CB\n:108DE0000008300038B4002078B30020F7B51F46E3\n:108DF00001F07F0018231F4CCD090E4643430C2180\n:108E000001FB053104EB010C62500022ACF8047048\n:108E1000ACF8062018B1F5B1FFF760FE18E017BBFB\n:108E2000154BD3F88034C3F3C0139D421BD01348B5\n:108E3000FFF724FE124B5B68C3F30803003B18BF27\n:108E4000012300933A463B463146384600F0B5FED2\n:108E5000012003B0F0BD1C44A37A002BF8D0A5720A\n:108E6000FFF7A6FEF4E7002DD6D10648FFF706FE71\n:108E7000EEE700BF78B3002000700240507002405F\n:108E800000ED00E04C70024011F07F0008B507D102\n:108E90000D4B01225A65BFF36F8FBFF34F8F08BD93\n:108EA0000828F8D0084B41F48072C909C3F8182586\n:108EB000F1D1064B182202FB00339A7A002AEAD03D\n:108EC0009972FFF775FEE6E70070024078B3002064\n:108ED00011F0770F12D00A4B41F48072C3F80C15D1\n:108EE000C3F80C25CA09C3F8181504BF01F594711D\n:108EF00043F82120BFF36F8FBFF34F8F704700BF40\n:108F000000700240174B0122002110B5C3F8142550\n:108F1000C3F810250A468B0003F1804303F51C3388\n:108F2000013108295A609A62F5D10E4B0E4C5A62F3\n:108F30009A64C3F85821D3F80014D3F800240A43E4\n:108F4000C3F80024D3F80023C3F80823074AC3F862\n:108F500004230021DC222046FBF71EFA4023A382D3\n:108F6000238110BD0070024078B300200514C001B9\n:108F70002DE9F04FB24BB34AD3F80013002385B06C\n:108F80001C4601201D4621FA03F6F6070BD552F8C0\n:108F9000236046B100FA03F6344342F82350BFF38E\n:108FA0006F8FBFF34F8F0133192BECD1E20706D53A\n:108FB000FFF7A8FF00210122084600F0D5FD14F4B8\n:108FC000006FA14D08D09E4BD3F8A8369BB2A5F8F0\n:108FD000D230012385F8D730A30221D5984ED6F898\n:108FE000143513F4807302D0FFF7CCFD0123D6F8BB\n:108FF0001025D70540F1188195F8D7305BB1B5F849\n:10900000D2200023012185F8D73092B20091184672\n:10901000882100F0D2FD01220321002000F094FD00\n:10902000660228D5864BD3F8006406F4E062F005AA\n:10903000C3F8002406D50122C3F82C250421002002\n:1090400000F082FD71050FD57D4B0122C3F8082584\n:109050009A65D3F8002312F4001208BFC3F8542114\n:109060004FF40012C3F80423B20504D501220521F0\n:10907000002000F069FD23022BD5714BD3F880143A\n:10908000C9B28DF80810D3F88424D2B28DF8092023\n:10909000D3F888048DF80A00D3F88C048DF80B00FF\n:1090A000D3F890048DF80C00D3F894048DF80D00DB\n:1090B000D3F898048DF80E00D3F89C348DF80F3057\n:1090C0004F0601D1052A04D0012202A9002000F098\n:1090D0005EFD5E4B23405BB195F8D830002B40F02D\n:1090E000AB804FF0E023D3F8F03DDE0700D500BEA3\n:1090F000DFF85481DFF84891DFF858B14746002681\n:109100004FF0140A06F10C0324FA03F3D807F1B266\n:1091100022D50AFB0693082ED3F808273B6853FA9A\n:1091200082F33B604FF0180303FB0653D2B2D8889A\n:1091300012FA80F080B2D88000F08E803889904298\n:1091400040F08A80DB88BA889BB29A4240F28480E1\n:1091500011B95846FFF792FC0136092E07F118079E\n:10916000D0D13B4B2340002B5BD0354BD3F86C94D4\n:10917000C3F86C94BFF36F8FBFF34F8F14F4806408\n:1091800007D0D3F88044D3F880341906C4F3C01450\n:1091900070D54FF0000A2C4F00264FF0180B29FA1B\n:1091A00006F3DA07F0B201D4CEB9C4B1244B1422CD\n:1091B00002FB0633FA68D3F8083652FA83F2FA60F3\n:1091C0000BFB0652518A89B251FA83F39BB2538248\n:1091D000538A398A9BB299424FD9FFF77FFC0136F7\n:1091E000082E07F11807DAD100241826012704F108\n:1091F000100329FA03F3DB07E0B203D464B9BAF130\n:10920000000F09D006FB0452B8F80410D3889BB2B3\n:1092100099423DD9FFF7CCFC0134082C08F118081D\n:10922000E5D105B0BDE8F08F002B7FF4F4AE4FF42C\n:109230000013C6F80833EEE6002385F8D83057E768\n:10924000007002400071024078B30020FCFB1F0058\n:10925000000400014C700240182303FB0653DA8817\n:10926000BA80DA8801230093002392B2184600F0F6\n:10927000A4FC71E74FF0010A8DE7528A01230093A5\n:10928000002340F0800192B2184600F096FCA6E759\n:109290009772C1E7012813B5044600F0C380022885\n:1092A00059D0002855D1784BD3F80025002A50D149\n:1092B0004FF48002C3F808234FF40062C3F800247F\n:1092C000BFF36F8FBFF34F8FFFF7A8FB60B16F4BFA\n:1092D000D3F8001C032269BB49F27531C3F8001CA6\n:1092E000C3F8142DC3F8001C4FF08053D3F830316D\n:1092F000082B0CD1654BD3F8001CC022E9B949F208\n:109300007531C3F8001CC3F8142CC3F8001C5E4B65\n:109310000124C3F80045BFF36F8FBFF34F8FFFF7F2\n:1093200015FCB0B9FFF7FAFB50B102B0BDE8104030\n:10933000FFF79CBBC3F8142DD6E7C3F8142CE6E75F\n:109340004FF08043C3F80001D3F800210192019A45\n:109350001C6002B010BD4C4CD4F804351BB1FFF7B3\n:10936000F5FB0028F5D1D4F800341B05FBD54FF4EC\n:109370000063C4F80034BFF36F8FBFF34F8F4FF01B\n:109380008053D3F83031082B0CD1404BD3F8001C5C\n:1093900000293FD149F27532C3F8002CC3F8141CE0\n:1093A000C3F8002CFFF73AFB58B1384BD3F8001C38\n:1093B000A1BB49F27532C3F8002CC3F8141DC3F8E1\n:1093C000002C4FF08053D3F83031082B2E4B0AD1AC\n:1093D00040F2E372C3F800284022C3F80428BFF328\n:1093E0006F8FBFF34F8F80220121C3F81C25C3F874\n:1093F0000413274BC3F884215A60FFF7A7FB00280A\n:10940000FBD0214B0122C3F80425BFF36F8FBFF3BC\n:109410004F8F9EE70022C3F8142CC3E70022C3F845\n:10942000142DCEE7184BD3F80025002A91D0002246\n:10943000C3F80425BFF36F8FBFF34F8F144980200B\n:10944000C1F88400D3F80013C3F80813C3F800254B\n:10945000BFF36F8FBFF34F8FFFF760FB78B1FFF75C\n:1094600007FB0C4B5A68C2F30802003A18BF0122EE\n:109470000221002002B0BDE8104000F065BB4FF0B3\n:1094800080435C60EDE700BF0070024000E00640F2\n:1094900000E100E000ED00E00A44034690B288429B\n:1094A00002D39A89824202D25A89104480B270470C\n:1094B00082888A4210B504D884898B1A9BB29C4258\n:1094C00003D243891A44891A8BB2038210BD9308D0\n:1094D00013B501EB8303044699420BD112F003024A\n:1094E00006D0002301A8019301F040FF019B2360F7\n:1094F00002B010BD51F8040B2060EDE72DE9F043F8\n:1095000085B01446BDF83050AB4238BF4289A3EB5A\n:1095100005091FFA89F938BFA9EB0209828838BF0B\n:109520001FFA89F94A4588460746194605D2FFF7CA\n:10953000BFFF058AB0F80490ADB2B9F1000F1FD09B\n:10954000A14528BFA146BC88AC421DD9FA889DF828\n:1095500034003968661BA9EB04042C44B3B214FB35\n:1095600002F416FB02F60128B6B2A4B202FB051102\n:1095700016D099450BD802FB09F2404601F0F6FEE1\n:10958000484605B0BDE8F0832D1BADB2DCE732469E\n:10959000404601F0EBFE3968224608EB0600EDE795\n:1095A000994506D819FB02F292B24046FFF78FFFA9\n:1095B000E6E726F00305ADB22A4640460191FFF7E3\n:1095C00086FF16F0030628D001990D44C6F1040168\n:1095D00089B2A1424FF0000328BF2146641A0393C9\n:1095E00003ABA4B2A8191A4685420CD13B68013ED0\n:1095F000164419448B420BD1039BC8F80030002C51\n:10960000BED02246D1E715F801CB03F801CBEBE73A\n:1096100013F8012B06F8012FECE73968EFE713B5D3\n:10962000930800EB8303984209D112F0030204D09F\n:109630000B68019301A901F099FE02B010BD0C68FE\n:1096400040F8044BEFE770B59A42A2EB03041D46C5\n:1096500038BF4389A4B238BFE41A838838BFA4B2A4\n:10966000A3420E46114602D2FFF722FF848874B14E\n:109670008288AA4208D9C2880168304602FB0511D7\n:1096800001F074FE012070BDAD1AADB2F1E72046C5\n:10969000F9E72DE9F0430746B0F80E908588048A73\n:1096A0001646C288007A85B01FFA89F9A4B288BB31\n:1096B000A145A9EB040038BF7C8980B23CBF001BE8\n:1096C00080B2281A80B2864228BF06464C46AC4279\n:1096D00028D2A5EB0408751B386825441FFA88FCBE\n:1096E00015FB02F518FB02F8012B1FFA88F8ADB242\n:1096F00002FB040022D0664517D8724301F036FE03\n:10970000324649463846FFF7C7FEF881304605B075\n:10971000BDE8F083AE4221BF761B02FB0611A146D5\n:109720002E46D3E7641BA4B2D1E74246009101F074\n:109730001DFE009938682A464144DFE7664505D892\n:1097400016FB02F292B2FFF76AFFD9E728F0030492\n:10975000A4B22246CDE90001FFF761FF18F003082B\n:10976000019929D0C8F104039BB2AB4200980A6862\n:10977000039228BF2B46013CED1A0DF10C0C20443E\n:10978000ADB244466246013C1CF801EB00F801EF23\n:1097900014F0FF04F7D13868904408EB0304421E2C\n:1097A000A04504D11844002DAAD02A46CBE718F8CA\n:1097B00001CB02F801CFF3E73868F4E7B2F5004FC8\n:1097C00010D882805200C38092B29DF8003003729C\n:1097D000531E838152420023C38101604281038270\n:1097E0000120704700207047C189028A89B292B275\n:1097F0009142A1EB020338BF428980889BB23CBFF3\n:109800009B1A9BB2984228BF18467047C289038AA8\n:1098100092B29BB2D31A58425841704710B5C189D1\n:10982000028A848889B292B2914238BF4089A1EB02\n:1098300002039BB23CBF1B1A9BB2E01A80B210BD60\n:1098400038B5C289038A04469BB292B2FFF7FBFE89\n:10985000218A054682B289B22046FFF71DFE20828A\n:10986000284638BD73B5C389058A0026ADB20446C3\n:10987000CDE900569BB2FFF741FE218A054602461C\n:1098800089B22046FFF708FE2082284602B070BD4C\n:1098900038B5C589028AADB292B2AA42A5EB0203DD\n:1098A00088BF42899BB288BF9B1A828888BF9BB2BF\n:1098B0009A42044614D1007A90B938BD9B1A9BB2E3\n:1098C0009342FBD2E288206802FB030001F04EFDC8\n:1098D000012229462046FFF7DFFDE0810120ECE769\n:1098E0002B46EDE712B10023FFF7D3BE10467047B9\n:1098F0000023C381038283885B009BB25A1E5B42B4\n:10990000828143810120704701720120704700006D\n:109910000B4B63B10B4B1B78834206D90A4B1B6878\n:1099200000EB400003EBC0007047C01AC0B2012832\n:1099300003D8064B00EB4000F4E70020704700BF5F\n:109940000000000058B4002054B4002004BD0F00F3\n:1099500070B5104E054600242046FFF7D9FF436836\n:109960002846984733780134E4B20133A342F3DA4E\n:10997000372200210848FAF70FFD1022FF2107487F\n:10998000FAF70AFDBDE8704005481222FF21FAF7F8\n:1099900003BD00BF58B4002059B400205CB40020BF\n:1099A0006CB4002037B50C460546C868019200F03B\n:1099B000A5FDE368019A0021284603B0BDE83040C8\n:1099C000184773B5054614463AB90378012B04D1FC\n:1099D00010460191FFF720F90199281DFFF758FF64\n:1099E00006462CB92B78012B02D12046FFF70EF941\n:1099F00036B94FF0E023D3F8F03DDB0700D500BEC9\n:109A000002B070BD024B5878003818BF0120704773\n:109A100059B40020024B1878C0F38000704700BF93\n:109A200059B40020014B1878704700BF90B4002053\n:109A3000F8B5164E3178054629BB154C1548372226\n:109A4000FAF7AAFC201DFFF753FF134B1C60134BC2\n:109A500023B11348AFF30080124B1860104F00245D\n:109A60002046FFF755FF036898473B780134E4B27E\n:109A70000133A342F4DA2846FFF7C6F82846FFF779\n:109A8000C5F8012333700120F8BD00BF90B4002059\n:109A9000A486002059B4002094B4002000000000E7\n:109AA00058B4002054B400201FB54378023B0A4646\n:109AB000032B12D8DFE803F0022A1921204B197872\n:109AC0006FF300011970197800246FF341011970C8\n:109AD0005C70197864F3820119701A4B014618689A\n:109AE00004B0BDE81040FFF76CBF154B1978C907EB\n:109AF00023D5197841F00401EEE711490B78DC0712\n:109B00001BD50B786FF382030B70E6E70C490B78DB\n:109B10005B0712D50B786FF382030B700023CDE93E\n:109B20000133039303788DF8043005238DF8053055\n:109B3000044B01A91868FFF744FF04B010BD00BF33\n:109B400059B4002094B400201FB50023CDE901339F\n:109B50008DF804008DF8051001A811460393FFF756\n:109B6000A3FF05B05DF804FB1FB50023CDE9013369\n:109B700003938DF8040001238DF8081001A8114605\n:109B80008DF80530FFF790FF05B05DF804FB1FB5B9\n:109B9000144600230822CDE9013303938DF8040015\n:109BA00006230DEB02008DF8053001F0DFFB2146A6\n:109BB00001A8FFF779FF04B010BD1FB50024CDE95F\n:109BC00001448DF8040007208DF805008DF8081079\n:109BD00001A89DF8181003928DF80930FFF764FF73\n:109BE00004B010BD1FB54FF40063CDE901300391FF\n:109BF00001A81146FFF758FF05B05DF804FB00000F\n:109C000038B58B7803F07F03082B05460C4608D93E\n:109C10004FF0E023D3F8F03DDB0700D500BE002075\n:109C200038BD064B2046997801F00DFB0028EFD097\n:109C300021462846BDE83840FFF708B859B400204F\n:109C40002DE9F047DDE9085681460C4690469A46D4\n:109C50000027B84501DC01200EE06378052B04D114\n:109C6000E37803F0030353450AD04FF0E023D3F821\n:109C7000F03DDA0702D40020BDE8F08700BEFAE725\n:109C800021464846FFF7BCFF38B94FF0E023D3F830\n:109C9000F03DDB07EFD500BEEEE7A378DA0914BF8D\n:109CA00033702B70237801371C44D2E70B4B01F043\n:109CB0007F0203EB420303EBD1112031487910F00E\n:109CC000010008D14B795B0706D44B7943F00403BC\n:109CD0004B71012070470020704700BF59B400202D\n:109CE0000B4B01F07F0203EB420303EBD111203158\n:109CF0004B7913F0010209D14B79C3F380005B0764\n:109D000005D54B7962F382034B7170470020704791\n:109D100059B4002070B5164D01F07F0605EB4605DD\n:109D200005EBD11420346579ED0709D54FF0E02318\n:109D3000D3F8F03DDA0701D4002070BD00BEFBE788\n:109D4000657945F001056571FFF750F80028F4D1F9\n:109D5000637960F300036371637960F38203637175\n:109D60004FF0E023D3F8F03DDB07E5D500BEE4E794\n:109D700059B40020054B01F07F0203EB420303EBD3\n:109D8000D11191F8250000F00100704759B400206E\n:109D900010B50B4B01F07F0203EB420303EBD11430\n:109DA000203463799B0709D4FFF76EF8637943F099\n:109DB00002036371637943F00103637110BD00BF57\n:109DC00059B4002010B50B4B01F07F0203EB4203A6\n:109DD00003EBD114203463799B0709D5FFF778F89A\n:109DE00063796FF34103637163796FF30003637108\n:109DF00010BD00BF59B40020054B01F07F0203EBFA\n:109E0000420303EBD11191F82500C0F340007047E5\n:109E100059B400202DE9F04F87B001F012FA002864\n:109E200000F09182AF4B1D682B78012B02D10020EE\n:109E3000FEF7F2FE03A9281DFFF702FD2B78012B88\n:109E4000044602D10020FEF7E1FE002C00F07B82E8\n:109E50009DF80D30013B072B00F2B382DFE813F0D1\n:109E600008001300A8027E028D021F004A02AA0207\n:109E70009DF80C00FFF76CFD00F038FB9A4B9DF845\n:109E800010209A70CEE79DF80C00FFF761FD00F0FE\n:109E90002DFB964B002BC5D0FEF78EFBC2E7924CF4\n:109EA0009DF80C50237843F00103237094F825307B\n:109EB0006FF3000384F8253094F825306FF38203A4\n:109EC00084F8253094F826306FF3000384F82630A8\n:109ED00094F826306FF3820384F82630002000F0D7\n:109EE0000DFB9DF8106006F06002602A11D14FF062\n:109EF000E023D3F8F03DDC0700D500BE9DF80C0050\n:109F00000021FEF7C1FF9DF80C008021FEF7BCFF89\n:109F100088E7402A0DD176480028EFD000F0EEFA0D\n:109F200004AA00212846AFF3008000287FF47AAF0E\n:109F3000E4E706F01F06012E00F07181022E00F00A\n:109F40009881002ED3D1202A0FD19DF814300F2BE9\n:109F5000D4D82344D878FFF7DBFC01460028CDD0C5\n:109F600004AA2846FFF71EFDDFE7002ABFD19DF8AF\n:109F70001130092BBBD801A252F823F009A20F001F\n:109F8000F7A10F00EF9E0F00E3A10F00EF9E0F005F\n:109F9000A59F0F0021A10F00EF9E0F00BF9F0F0094\n:109FA000D59F0F0004A800F0AFFA9DF812102846C4\n:109FB000FEF73AFE237843F00203237032E763781A\n:109FC0008DF80A3001230DF10A0204A9284600F099\n:109FD00059FA27E79DF812906378994537D063784E\n:109FE0003BB12846FEF7BCFEA6782846FFF7B0FC3A\n:109FF000A670B9F1000F2AD009F1FF30C0B2FEF708\n:10A00000E9F910B14378022B08D04FF0E023D3F8E0\n:10A01000F03DDF077FF56BAF00BE68E7C379C3F3A0\n:10A020008012C3F340131B0143EA4213227822F04B\n:10A030003002134323704388C31800F109060093CC\n:10A04000009BB3420AD82B4B0BB1FEF7B2FA84F84F\n:10A05000019004A9284600F003FAE3E673780B2B7D\n:10A0600003BF337896F80380F6184FF00108737831\n:10A07000042BCAD1009B9A1B93B201934FF0000BA3\n:10A080001D4B1B785FFA8BF70133BB42BDDB3846B3\n:10A09000FFF73EFC31468368019A8246284698477E\n:10A0A0000828024639D9019B834236D3B8F1010F03\n:10A0B00006D1DAF8083011498B4208BF4FF0020888\n:10A0C0000021CBB298451DD83B4631460C48019241\n:10A0D00001F0E9F8084B019A1B7801339F421644BE\n:10A0E000AEDD92E794B4002059B40020B9850F008A\n:10A0F00000000000B3850F0058B40020A9A70F008E\n:10A100006CB40020B078034454FA83F30131D8785A\n:10A11000FF287FF47AAFDF70D3E70BF1010BAFE7D5\n:10A12000BDF81200030A5A1EC0B20E2A3FF6E6AE70\n:10A1300001A151F822F000BF75A10F009FA10F00EF\n:10A14000C1A10F00FD9E0F00FD9E0F00D5A10F00C5\n:10A150009FA10F00FD9E0F00FD9E0F00FD9E0F00B2\n:10A16000FD9E0F00FD9E0F00FD9E0F00FD9E0F0047\n:10A1700087A10F00FEF72AF91223024604A92846F8\n:10A1800000F080F9D1E6934B002B3FF4B7AEAFF36C\n:10A190000080024600283FF4AAAE4388EEE7022B77\n:10A1A00007D1FEF717F900283FF4A1AE4388024615\n:10A1B000E4E7894B002B3FF4A1AEAFF30080F2E758\n:10A1C000BDF81410FEF762F9024600283FF496AE7F\n:10A1D0000378D3E7814B002B3FF490AEAFF30080C0\n:10A1E000F2E7BDF81230012B7FF488AE237843F0FC\n:10A1F000080323702DE7BDF81230012B7FF47EAEEB\n:10A2000023786FF3C303F4E72378C3F340129B086A\n:10A2100003F002031343ADF80A300223D3E69DF89E\n:10A2200014300F2B3FF66AAE2344D878FFF770FB4B\n:10A23000014600283FF462AE04AA2846FFF7B2FBAD\n:10A2400000287FF4EFAD9DF8103013F060047FF428\n:10A2500055AE9DF811300A3B012B3FF64FAE00F092\n:10A260004DF99DF811300A2B7FF4F3AE8DF80A40BA\n:10A27000A8E69DF8141001F07F03082B3FF637AED7\n:10A2800004EB430303EBD113D87CFFF741FB0746F4\n:10A290002AB100283FF432AE04AA014661E69DF8D7\n:10A2A000113003F0FD02012A08D0002B7FF41FAE0D\n:10A2B0002846FFF7A1FDADF80A00AEE7BDF8122071\n:10A2C00022B9012B284612D1FFF77CFD002F3FF465\n:10A2D000A9AD04AA39462846FFF764FB002000F028\n:10A2E0000DF994F82630DE073FF59CADB1E6FFF797\n:10A2F0004FFDEBE79DF81010394B01F07F0403EBA5\n:10A30000440303EBD11393F825006FF3000083F8A7\n:10A31000250093F825006FF3820083F825003CB9EF\n:10A32000059B9DF811209DF80C0000F0FBF879E5E5\n:10A33000D87CFFF7EDFA48B94FF0E023D3F8F03DB1\n:10A34000D80700D500BE07B0BDE8F08F0469059BB3\n:10A350009DF811209DF80C00A04763E5204B1A786A\n:10A36000D1077FF55FAD1F4A002A3FF45BAD187837\n:10A37000C0F3C000AFF3008054E5194B1B78DA0737\n:10A380007FF550AD184B002B3FF44CADAFF3008080\n:10A3900048E5FFF7BDFA436913B19DF80C009847F3\n:10A3A0000134124B1B78E0B201338342F1DA39E514\n:10A3B0000024F6E7049B002B3FF434AD0598984742\n:10A3C00030E54FF0E023D3F8F03DDB077FF52AAD11\n:10A3D00000BE27E5000000000000000000000000B3\n:10A3E00059B40020000000000000000058B4002014\n:10A3F00037B514490446CA89888991F90050831AEF\n:10A400009BB2402B28BF4023002D10DA904214D07D\n:10A410001A4689680C48019300F0A8FF0A4A019B7C\n:10A420008021204603B0BDE83040FFF773BC904266\n:10A430004FF0000103D10022F3E78021FBE7024A3D\n:10A44000EFE700BF58B500206CB5002011F0800F79\n:10A450004FF000031A460CBF80211946FFF75ABC83\n:10A4600030B4074C05460B4608684968224603C2CB\n:10A470000022C4E902222846197830BCFFF7E6BF63\n:10A4800058B50020F8B5184E0C46054608684968CE\n:10A49000B260374603C70021F181E1888B4228BFB3\n:10A4A0000B46B381E18889B153B14AB94FF0E0233B\n:10A4B000D3F8F03DDA0701D40020F8BD00BEFBE779\n:10A4C0002846FFF795FF30B10120F6E721782846AE\n:10A4D000FFF7BCFFF7E74FF0E023D3F8F03DDB07D1\n:10A4E000EAD500BEE9E700BF58B5002002481422B3\n:10A4F0000021F9F751BF00BF58B50020014B18618A\n:10A50000704700BF58B5002010B50246044C0068E3\n:10A510005168234603C30023C4E9023310BD00BFC2\n:10A5200058B5002070B52D4C1E462378C909B1EBF3\n:10A53000D31F054618D04EB14FF0E023D3F8F03DBD\n:10A54000DA0701D4002070BD00BEFBE7244B13B135\n:10A550002146AFF3008023690BB90120F3E71F4ABE\n:10A56000022128469847F8E794F90030002B06DBD3\n:10A57000A0680028E6D01B49324600F0F7FEA2682A\n:10A58000E38932443344A260E2889BB29A42E38179\n:10A5900001D03F2E1ED823696BB921782846FFF7DA\n:10A5A00055FF0028D9D14FF0E023D3F8F03DDB0769\n:10A5B000C8D500BEC7E70121084A2846984701468A\n:10A5C0000028EAD12846FEF75FFC80212846FEF7E6\n:10A5D0005BFCC2E72846FFF70BFFE2E758B5002017\n:10A5E000000000006CB5002070B500F110050446B5\n:10A5F0002846FFF713F93F2817D9E1780020FFF725\n:10A6000055FB90B12846FFF709F93F28E17807D9B3\n:10A6100004F638024023BDE870400020FFF77ABB03\n:10A62000BDE870400020FFF75BBB70BD08B5044B70\n:10A6300040F6B80202FB00301030FFF7D5F808BD35\n:10A64000ACB5002070B540F6B804074E444304F1A1\n:10A65000100092B23044FFF705F905463019FFF7B4\n:10A66000C3FF284670BD00BFACB500202DE9F04106\n:10A670000446FFF7C7F910B90020BDE8F081FFF7E5\n:10A68000C9F906460028F7D140F6B801164D4C43EB\n:10A6900004F12408A8444046FFF7A6F80028EBD0B0\n:10A6A0002F193046B978FFF701FB0028E4D004F6F3\n:10A6B00078042544294640224046FFF7D3F8B9786C\n:10A6C000044668B103462A463046FFF723FB48B9E3\n:10A6D0004FF0E023D3F8F03DDB07CDD500BECCE74B\n:10A6E000FFF7FEFA2046C8E7ACB5002070B50B4C6A\n:10A6F00040F6B80303FB0044243492B205462046DA\n:10A70000FFF7F0F806462046FFF76EF83F2802D91B\n:10A710002846FFF7ABFF304670BD00BFACB5002048\n:10A7200037B5144C40F6B80200212046F9F734FE44\n:10A73000FF234FF4424201256371E2800023082287\n:10A7400063812273009304F138012B464FF4806239\n:10A7500004F110002581FFF731F800952B464FF4E6\n:10A76000806204F5876104F12400FFF727F803B045\n:10A7700030BD00BFACB5002010B50A4C0021052249\n:10A780002046F9F709FE04F110002434FFF7B0F871\n:10A790002046FFF7ADF820460121BDE81040FFF745\n:10A7A000B3B800BFACB50020F7B54B79022B064615\n:10A7B00003D00025284603B0F0BD8B79022BF8D1D9\n:10A7C000204FBB787BBB8B783B700C7809250C4401\n:10A7D00003E023781D44ADB21C446378242B1BD1C5\n:10A7E0009542F6D96378042B12D163790A2B0FD1E5\n:10A7F000154B277801930133009302231A46E11980\n:10A800003046FFF71DFA70B10E3517FA85F5ADB277\n:10A810000C48FFF7E9FECDE7052BE3D12146304692\n:10A82000FFF7EEF938B94FF0E023D3F8F03DDB073E\n:10A83000BFD500BEBDE7A3787B7023781D44ADB2C1\n:10A840001C44CFE7ACB50020AEB5002070B50B4678\n:10A850001146127802F06002202A45D1234E8A88E0\n:10A860003478944240D14A78203A032A3CD8DFE831\n:10A8700002F00213162F2BB91D4A0723FFF702FE21\n:10A88000012070BD022BFBD11A4B002BF8D01849C8\n:10A890000020AFF30080F3E7002BF1D1ECE713B910\n:10A8A000FFF7DEFDECE7022BEAD14C881248347149\n:10A8B00004F0010585F00101FFF726F80F4B002B8E\n:10A8C000DED0C4F3400229460020AFF30080D7E772\n:10A8D000002BE5D0022BD3D1094B002BD0D04988D7\n:10A8E0000020AFF30080CBE70020CAE7ACB5002022\n:10A8F000B2B5002000000000D0B50020000000002C\n:10A90000000000002DE9F347374D1C46EB788B42E1\n:10A9100007460E4607D0AB788B4258D1AB78B3428E\n:10A9200032D001245CE0A2B205F6380105F1100036\n:10A93000FEF7D8FF2D4B2BB92D4BEBB92A48FFF76B\n:10A9400053FEEBE76B79FF2BF6D005F638094FF095\n:10A95000000805F1100AA045EED019F8013B6A790C\n:10A960009A4206D15046FEF751FF10B96979AFF30C\n:10A97000008008F10108EEE71E48FEF747FF0028B7\n:10A98000DCD1FDF789F9D9E71B4B13B10020AFF3F8\n:10A9900000800020FFF76AFE0028C2D11748FEF7AA\n:10A9A00023FF0028BDD1002CBBD014F03F03B8D149\n:10A9B000A97801933846FFF779F9019B04460028EE\n:10A9C000AFD0A9781A463846FFF7A4F908E04FF04F\n:10A9D000E023D3F8F04D14F0010401D000BE0024B0\n:10A9E000204602B0BDE8F087ACB5002000000000B2\n:10A9F000997C0F00BCB5002000000000D0B50020FD\n:10AA000030B4104B02249A6B83F82C10996883F8A9\n:10AA1000304093F83C408A1A9A6224B942F2050504\n:10AA20009D8783F83E4051B14AB11A7BD20930BCB0\n:10AA300014BF93F82E1093F82F10FFF7A9B930BC6C\n:10AA4000704700BF64CE002038B5154B154C054645\n:10AA500073B1607BAFF3008050B942F2077384F8A2\n:10AA60003E00A38728460121BDE83840FFF7C8BF54\n:10AA7000A26BA36894F82F109B1AB3F5805F28BFD0\n:10AA80004FF48053084A9BB22846FFF743F930B988\n:10AA90004FF0E023D3F8F03DDB0700D500BE38BD12\n:10AAA0000000000064CE002064BE002073B5234C7B\n:10AAB000E28AA36852BA92B2054612B1B3FBF2F22F\n:10AAC00092B2A06BD4F81110B0FBF2F61B1AB3F5DA\n:10AAD000805F28BF4FF4805309BA009302FB16022F\n:10AAE000174B607B3144FDF7DBFB031E0CDA43F2AE\n:10AAF0000333A38701210023284684F83E3002B0A7\n:10AB0000BDE87040FFF77CBF94F82E1006D100938B\n:10AB10001A462846FFF751F802B070BD084A9BB2AA\n:10AB20002846FFF7F7F80028F6D14FF0E023D3F8D6\n:10AB3000F03DDB07F0D500BEEEE700BF64CE00209D\n:10AB400064BE0020C28A836852BA92B223B9002A36\n:10AB50000CBF002002207047C17B282904D1017B53\n:10AB6000C90906D1022070472A2902D1017BC909EF\n:10AB7000F8D122B1934234BF022000207047012057\n:10AB800070470000044880F83C1080F83D2080F8B1\n:10AB90003E300120704700BF64CE002002484022B2\n:10ABA0000021F9F7F9BB00BF64CE00200248402223\n:10ABB0000021F9F7F1BB00BF64CE002073B54B79DB\n:10ABC000082B054602D0002002B070BD8B79062B01\n:10ABD000F9D1CB79502BF6D1162A07D84FF0E023C4\n:10ABE000D3F8F03DD907EED500BEECE7164C8B78D4\n:10ABF00084F82D3004F12E030E78019304F12F0315\n:10AC0000009302231A463144FFF71AF838B94FF07F\n:10AC1000E023D3F8F03DDA07D5D500BED4E7002312\n:10AC200084F8303094F82F101F2322462846FFF76F\n:10AC300071F830B94FF0E023D3F8F03DDB0700D5D1\n:10AC400000BE1720C0E700BF64CE00207FB50646D7\n:10AC50001546A1B9137803F07F02022A48D16C7817\n:10AC6000012C45D16A88002A42D1AB883C4D95F829\n:10AC70003020042ADBB204D11946FFF789F80120FD\n:10AC80001AE095F82E10994218D1022AF7D1AA6B32\n:10AC9000AB689B1AAB62032385F8303005F12002C4\n:10ACA0000D23FFF737F80028E9D14FF0E023D3F860\n:10ACB000F03DDB0752D500BE04B070BD95F82F10F3\n:10ACC0009942DCD1002ADAD10191FFF753F80199BA\n:10ACD0000028D4D13046FFF78FF80028CFD10023C9\n:10ACE00085F830301E4A95F82F101F233046D8E7DC\n:10ACF00003F06003202B31D16B78FE2B13D0FF2B98\n:10AD00002CD16B8853BBE9888AB23ABB144B3046CE\n:10AD100099872946C3E90D2283F8302083F83E2025\n:10AD2000FFF79EFBABE76B88C3B9EB88012B15D10E\n:10AD30008DF80F300B4B1BB1AFF300808DF80F0077\n:10AD40009DF80F3053B1013B8DF80F300DF10F021C\n:10AD5000012329463046FFF795FB90E70020ABE73B\n:10AD600064CE0020000000002DE9F041AB4C94F8C7\n:10AD70003070012F90B005461E4600F0A181032FD0\n:10AD800000F00D82002F41D194F82F308B4201D07A\n:10AD9000012013E01F2E03D12268A14B9A4210D04C\n:10ADA00094F82E100423284684F83030FEF7F0FF84\n:10ADB00094F82F102846FEF7EBFF002010B0BDE8F6\n:10ADC000F081984B23626368E67BD4F8088084F8AE\n:10ADD0002C70C4E90937012384F8303006F0FD03F4\n:10ADE000282BC4E90D872BD12046FFF7ABFE014687\n:10ADF00018B12846FFF704FE08E0B8F1000F56D05E\n:10AE0000282E40F0A8812846FFF750FE94F83030F5\n:10AE1000022BBDD194F82E102846FEF7EDFF002836\n:10AE2000B6D1A368A26B94F82E10934240F2E08151\n:10AE3000207BC00900F0DC812846FEF7A9FFA7E7C8\n:10AE4000B8F1000F17D0237BDB0914D1B8F5805F70\n:10AE500001D90121CDE7744A1FFA88F32846FEF78D\n:10AE600059FF0028D2D14FF0E023D3F8F03DDA07A4\n:10AE7000A3D500BEA2E7252E677B08D8192E1AD8C5\n:10AE8000032E00F0F780122E00F09F8096B394F806\n:10AE90003C30002BDDD1A38E634A6449607BFDF713\n:10AEA000EDF9031ED5DB60D1A368002BD1D10223BD\n:10AEB00084F83030AAE71A3E0B2EE8D801A353F8E5\n:10AEC00026F000BF35B00F0015AF0F008FAE0F009A\n:10AED0008FAE0F008FAE0F008FAE0F008FAE0F0042\n:10AEE0008FAE0F008FAE0F0085AF0F008FAE0F003B\n:10AEF0002FAF0F003846FDF7BFF90028D4D194F8E2\n:10AF00003C30002BC3D140F20243A387002384F8D6\n:10AF10003E30BCE7464B002BC6D0E17C3846C1F33F\n:10AF2000400301F001020909FDF74EFAE5E70DF1D2\n:10AF3000160206A93846FDF73FFA069B13B1BDF885\n:10AF400016203AB994F83C30002BA0D140F20242CE\n:10AF5000A287DCE712BA013B1BBA0892324807937A\n:10AF6000082207A900F002FA0823A06800283FF48D\n:10AF700070AF834228BF034663632B4A94F82E10B8\n:10AF80009BB26BE70023CDE90733099308238DF8C3\n:10AF90001F300DF11602022306A938468DF8243021\n:10AFA000FDF70AFA069A002ACCD0BDF81630002B1D\n:10AFB000C8D012BA5BBA08921B48ADF826300C22F2\n:10AFC00007A900F0D3F90C23CFE72422002107A81A\n:10AFD000F9F7E2F980238DF81D30082202232021A1\n:10AFE00009A88DF81E308DF81F30F9F7D5F9102219\n:10AFF00020210BA8F9F7D0F9042220210FA8F9F796\n:10B00000CBF90FAB0BAA09A93846FDF701F90648A1\n:10B01000242207A900F0AAF92423A6E764CE002081\n:10B02000555342435553425364BE002073CE002013\n:10B03000C9830F0003238DF81C3000238DF81D30C9\n:10B040008DF81E308DF81F30704B8BB13846AFF342\n:10B0500000809DF81E3080F0010060F3C7130422C9\n:10B060006B488DF81E3007A900F080F904237CE7B7\n:10B070000120EEE71222002107A8F9F78DF9F0234D\n:10B0800094F83C208DF81C300A238DF823304FF0C3\n:10B09000000362F303038DF81E3094F83D308DF801\n:10B0A00028305B4894F83E308DF82930122207A9E9\n:10B0B00000F05CF90023A38784F83E30122354E7A4\n:10B0C000E37BA06B282B06D1636B30449842A063CE\n:10B0D000BFF4EDAE97E62A2B41D1E28A52BA92B282\n:10B0E0001AB1A368B3FBF2F292B2D4F81110484F30\n:10B0F000B0FBF2FC09BA02FB1C020096607B3B46E7\n:10B100006144FDF7EFF8002809DAA36B3344A36329\n:10B1100043F20333A387002384F83E3099E6864246\n:10B1200012D9321A40B1A36B03920344391838463E\n:10B13000A36300F0B5F9039A94F82F10002300934D\n:10B140002846FEF73AFD61E6A36B1E44636BA663D7\n:10B150009E42BFF4ACAE2846FFF776FC56E6237B52\n:10B160003044DB09A0630CD1A38E294A607B04F133\n:10B170000F01FDF783F8002803DA39462846FFF768\n:10B180003FFCD4E90D329A42BFF491AE4FF0E02378\n:10B19000D3F8F03DDB077FF539AE00BE36E694F814\n:10B1A0002E308B427FF432AE0D2E7FF42FAEE37B38\n:10B1B000282B09D02A2B14D0164B53B1607B04F1F5\n:10B1C0000F01AFF3008004E0134B13B1607BAFF3CA\n:10B1D0000080002384F83030104A94F82F101F2389\n:10B1E0003CE60F4B002BF4D0607BFDF793F8F0E7C3\n:10B1F0009B1AA362032384F830300A4A0D232846A1\n:10B20000FEF788FD00287FF4C3AD2CE600000000A7\n:10B2100064BE0020000000000000000064CE00209A\n:10B2200015830F0084CE002008B50020FEF700FC37\n:10B2300030B94FF0E023D3F8F03DDB0700D500BE76\n:10B2400008BDFEF7EFBB8388C07800F0030002283A\n:10B25000C3F30A0315D003281DD001280FD10229FA\n:10B2600040F2FF3208BF4FF480629A420FD24FF093\n:10B27000E023D3F8F00D10F0010008D000BE00204C\n:10B280007047022904D1B3F5007FF0D10120704747\n:10B29000402BFBD9EBE702290CBF4FF48062402220\n:10B2A0009A42F3D2E3E730B50A44914200D330BD6D\n:10B2B0004C78052C06D18C7804F07F0500EB450511\n:10B2C000E4092B550C782144EFE700000649074AB2\n:10B2D000074B9B1A03DD043BC858D050FBDCF9F741\n:10B2E00063FEF8F7D5FF000068BD0F000080002066\n:10B2F000C8860020FEE7FEE7FEE7FEE7FEE7FEE782\n:10B30000FEE7FEE7FEE7FEE7032A70B515D940EA3F\n:10B31000010C1CF0030F04460B4621D119462046B0\n:10B320000E680568B54204F1040403F1040317D163\n:10B33000043A032A20461946F0D8541EA2B100F15F\n:10B34000FF3C013901E0C3180CD01CF801EF11F8E3\n:10B35000012F9645A4EB0C03F5D0AEEB020070BDB7\n:10B36000541EECE7184670BD104670BD844641EA95\n:10B37000000313F003036DD1403A41D351F8043B6D\n:10B3800040F8043B51F8043B40F8043B51F8043BBF\n:10B3900040F8043B51F8043B40F8043B51F8043BAF\n:10B3A00040F8043B51F8043B40F8043B51F8043B9F\n:10B3B00040F8043B51F8043B40F8043B51F8043B8F\n:10B3C00040F8043B51F8043B40F8043B51F8043B7F\n:10B3D00040F8043B51F8043B40F8043B51F8043B6F\n:10B3E00040F8043B51F8043B40F8043B51F8043B5F\n:10B3F00040F8043B51F8043B40F8043B403ABDD2CE\n:10B40000303211D351F8043B40F8043B51F8043B6F\n:10B4100040F8043B51F8043B40F8043B51F8043B2E\n:10B4200040F8043B103AEDD20C3205D351F8043BFE\n:10B4300040F8043B043AF9D2043208D0D2071CBFCA\n:10B4400011F8013B00F8013B01D30B8803806046F3\n:10B45000704700BF082A13D38B078DD010F0030369\n:10B460008AD0C3F10403D21ADB071CBF11F8013BD9\n:10B4700000F8013B80D331F8023B20F8023B7BE728\n:10B48000043AD9D3013A11F8013B00F8013BF9D253\n:10B490000B7803704B7843708B78837060467047ED\n:10B4A00088420DD98B1883420AD900EB020CBAB13D\n:10B4B000624613F801CD02F801CD9942F9D17047E7\n:10B4C0000F2A0ED8034602F1FF3C4AB10CF1010CE1\n:10B4D000013B8C4411F8012B03F8012F6145F9D190\n:10B4E000704740EA01039B0750D1A2F1100370B5E9\n:10B4F00001F1200C23F00F0501F1100E00F11004F2\n:10B50000AC441B095EF8105C44F8105C5EF80C5CFF\n:10B5100044F80C5C5EF8085C44F8085C5EF8045C77\n:10B5200044F8045C0EF1100EE64504F11004E9D174\n:10B53000013312F00C0F01EB031102F00F0400EBCA\n:10B54000031327D0043C24F003064FEA940C1E4456\n:10B550001C1F8E465EF8045B44F8045FB442F9D1C8\n:10B560000CF1010402F0030203EB840301EB8401FC\n:10B5700002F1FF3C4AB10CF1010C013B8C4411F883\n:10B58000012B03F8012F6145F9D170BD02F1FF3C99\n:10B5900003469BE72246EBE7830710B5044610D12C\n:10B5A0000268A2F1013323EA020313F0803F08D1BD\n:10B5B00050F8042FA2F1013323EA020313F0803F75\n:10B5C000F6D003781BB110F8013F002BFBD100F03F\n:10B5D00003F8204610BD00BF80EA0102844612F045\n:10B5E000030F4FD111F0030F32D14DF8044D11F07C\n:10B5F000040F51F8043B0BD0A3F101329A4312F02F\n:10B60000803F04BF4CF8043B51F8043B16D100BF07\n:10B6100051F8044BA3F101329A4312F0803FA4F198\n:10B6200001320BD14CF8043BA24312F0803F04BF1F\n:10B6300051F8043B4CF8044BEAD023460CF8013B8C\n:10B6400013F0FF0F4FEA3323F8D15DF8044B704736\n:10B6500011F0010F06D011F8012B0CF8012B002A74\n:10B6600008BF704711F0020FBFD031F8022B12F063\n:10B67000FF0F16BF2CF8022B8CF8002012F47F4F1E\n:10B68000B3D1704711F8012B0CF8012B002AF9D126\n:10B69000704700BF00000000000000000000000034\n:10B6A000000000000000000000000000000000009A\n:10B6B000000000000000000000000000000000008A\n:10B6C00090F800F06DE9024520F007016FF0000CE2\n:10B6D00010F0070491F820F040F049804FF000048A\n:10B6E0006FF00700D1E9002391F840F000F1080065\n:10B6F00082FA4CF2A4FA8CF283FA4CF3A2FA8CF39D\n:10B700004BBBD1E9022382FA4CF200F10800A4FA03\n:10B710008CF283FA4CF3A2FA8CF3E3B9D1E9042357\n:10B7200082FA4CF200F10800A4FA8CF283FA4CF38E\n:10B73000A2FA8CF37BB9D1E9062301F1200182FA48\n:10B740004CF200F10800A4FA8CF283FA4CF3A2FA4E\n:10B750008CF3002BC6D0002A04BF04301A4612BA5C\n:10B76000B2FA82F2FDE8024500EBD2007047D1E95F\n:10B77000002304F00305C4F100004FEAC50514F0EE\n:10B78000040F91F840F00CFA05F562EA05021CBFBF\n:10B7900063EA050362464FF00004A9E7F0B5254FC0\n:10B7A000A2F1020E164605460C460FCF8BB0EC46B2\n:10B7B000ACE80F000FCFACE80F0097E803004CF89F\n:10B7C000040BBEF1220F8CF800102ED804F1FF3EBE\n:10B7D00070464FF0000CB5FBF6F206FB125328330F\n:10B7E0006B44614613F828CC00F801CF2B469E42EB\n:10B7F00001F1010C1546EED9002304F80C3089B193\n:10B80000A44472461EF8010F1CF8015D8EF800502A\n:10B810006FEA0E0302322344121B0B449A428CF847\n:10B820000000EEDB20460BB0F0BD002020700BB016\n:10B83000F0BD00BF34BD0F00FFF7B0BF53B94AB928\n:10B84000002908BF00281CBF4FF0FF314FF0FF3028\n:10B8500000F074B9ADF1080C6DE904CE00F006F803\n:10B86000DDF804E0DDE9022304B070472DE9F0477C\n:10B87000089D04468E46002B4DD18A42944669D9D4\n:10B88000B2FA82F252B101FA02F3C2F1200120FAB7\n:10B8900001F10CFA02FC41EA030E94404FEA1C4805\n:10B8A000210CBEFBF8F61FFA8CF708FB16E341EA01\n:10B8B000034306FB07F199420AD91CEB030306F187\n:10B8C000FF3080F01F81994240F21C81023E6344A8\n:10B8D0005B1AA4B2B3FBF8F008FB103344EA03444C\n:10B8E00000FB07F7A7420AD91CEB040400F1FF3361\n:10B8F00080F00A81A74240F207816444023840EA9E\n:10B900000640E41B00261DB1D4400023C5E90043D6\n:10B910003146BDE8F0878B4209D9002D00F0EF8059\n:10B920000026C5E9000130463146BDE8F087B3FA8C\n:10B9300083F6002E4AD18B4202D3824200F2F98074\n:10B94000841A61EB030301209E46002DE0D0C5E977\n:10B95000004EDDE702B9FFDEB2FA82F2002A40F0C3\n:10B960009280A1EB0C014FEA1C471FFA8CFE0126C6\n:10B97000200CB1FBF7F307FB131140EA01410EFB6A\n:10B9800003F0884208D91CEB010103F1FF3802D211\n:10B99000884200F2CB804346091AA4B2B1FBF7F00B\n:10B9A00007FB101144EA01440EFB00FEA64508D92E\n:10B9B0001CEB040400F1FF3102D2A64500F2BB806B\n:10B9C0000846A4EB0E0440EA03409CE7C6F12007BA\n:10B9D000B34022FA07FC4CEA030C20FA07F401FA00\n:10B9E00006F31C43F9404FEA1C4900FA06F3B1FB89\n:10B9F000F9F8200C1FFA8CFE09FB181140EA0141EE\n:10BA000008FB0EF0884202FA06F20BD91CEB01018A\n:10BA100008F1FF3A80F08880884240F28580A8F1E2\n:10BA200002086144091AA4B2B1FBF9F009FB101134\n:10BA300044EA014100FB0EFE8E4508D91CEB0101D2\n:10BA400000F1FF346CD28E456AD90238614440EA75\n:10BA50000840A0FB0294A1EB0E01A142C846A646F5\n:10BA600056D353D05DB1B3EB080261EB0E0101FA7E\n:10BA700007F722FA06F3F1401F43C5E900710026DB\n:10BA80003146BDE8F087C2F12003D8400CFA02FC31\n:10BA900021FA03F3914001434FEA1C471FFA8CFE41\n:10BAA000B3FBF7F007FB10360B0C43EA064300FB31\n:10BAB0000EF69E4204FA02F408D91CEB030300F1CF\n:10BAC000FF382FD29E422DD9023863449B1B89B286\n:10BAD000B3FBF7F607FB163341EA034106FB0EF30F\n:10BAE0008B4208D91CEB010106F1FF3816D28B42BC\n:10BAF00014D9023E6144C91A46EA004638E72E4688\n:10BB0000284605E70646E3E61846F8E64B45A9D27F\n:10BB1000B9EB020864EB0C0E0138A3E74646EAE7EE\n:10BB2000204694E74046D1E7D0467BE7023B61449C\n:10BB300032E7304609E76444023842E7704700BF05\n:10BB4000F8B500BFF8BC08BC9E467047F8B500BF0A\n:10BB5000F8BC08BC9E467047088000200010020018\n:10BB60000338FDD87047000000000000000000000E\n:10BB70000338FDD87047010000000000089900203C\n:10BB80000338FDD87047416461444655004D6573E4\n:10BB90006874617374696300302E392E32207331FA\n:10BBA000343020372E332E3000000000000000001B\n:10BBB00000000000000000000023D1BCEA5F7823F1\n:10BBC00015DEEF12120000000000000070B000202F\n:10BBD0004164616672756974006E52462055463242\n:10BBE00000303132333435363738394142434445F9\n:10BBF00046006E52462053657269616C0009045319\n:10BC00006F66744465766963653A200053002E00C0\n:10BC10006E6F7420666F756E640D0A00EB3C905574\n:10BC20004632205546322000020101000240000049\n:10BC300000F80201010001000000000009010100FC\n:10BC4000800029420042004D455348544153544915\n:10BC5000430046415431362020203C21646F6374F8\n:10BC60007970652068746D6C3E0A3C68746D6C3E3A\n:10BC70003C626F64793E3C7363726970743E0A6C17\n:10BC80006F636174696F6E2E7265706C6163652895\n:10BC90002268747470733A2F2F6275796D656163D1\n:10BCA0006F666665652E636F6D2F6D61726B2E62B8\n:10BCB0006972737322293B0A3C2F73637269707433\n:10BCC0003E3C2F626F64793E3C2F68746D6C3E0A77\n:10BCD00000000000494E464F5F554632545854000C\n:10BCE00024850020494E44455820202048544D00CA\n:10BCF0005ABC0F0043555252454E5420554632000F\n:10BD00000000000021A70F0079A70F00A9A70F00CE\n:10BD10004DA80F0005A90F00000000009DAB0F000B\n:10BD2000ADAB0F00BDAB0F004DAC0F0069AD0F0008\n:10BD30000000000030313233343536373839616233\n:10BD4000636465666768696A6B6C6D6E6F7071724B\n:10BD5000737475767778797A00000000000000002F\n:10BD60002885FF7F010000000880002000000000FF\n:10BD700000000000F48200205C830020C4830020C7\n:10BD800000000000000000000000000000000000B3\n:10BD900000000000000000000000000000000000A3\n:10BDA0000000000000000000000000000000000093\n:10BDB0000000000000000000000000000000000083\n:10BDC0000000000000000000000000000000000073\n:10BDD0000000000000000000000000000000000063\n:10BDE0000000000000000000000000000000000053\n:10BDF0000000000000000000000000000000000043\n:10BE00000000000000000000000000000000000032\n:10BE10000000000000000000010000000000000021\n:10BE20000E33CDAB34126DE6ECDE05000B000000E6\n:10BE30000000000000000000000000000000000002\n:10BE400000000000000000000000000000000000F2\n:10BE500000000000000000000000000000000000E2\n:10BE600000000000000000000000000000000000D2\n:10BE700000000000000000000000000000000000C2\n:10BE800000000000000000000000000000000000B2\n:10BE900000000000000000000000000000000000A2\n:10BEA0000000000000000000000000000000000092\n:10BEB0000000000000000000000000000000000082\n:10BEC0000000000000000000000000000000000072\n:10BED0000000000000000000000000000000000062\n:10BEE0000000000000000000000000000000000052\n:10BEF0000000000000000000000000000000000042\n:10BF00000000000000000000000000000000000031\n:10BF10000000000000000000000000000000000021\n:10BF20000000000000000000000000000000000011\n:10BF30000000000000000000000000000000000001\n:10BF400000000000000000000000000000000000F1\n:10BF500000000000000000000000000000000000E1\n:10BF600000000000000000000000000000000000D1\n:10BF700000000000000000000000000000000000C1\n:10BF800000000000000000000000000000000000B1\n:10BF900000000000000000000000000000000000A1\n:10BFA0000000000000000000000000000000000091\n:10BFB0000000000000000000000000000000000081\n:10BFC0000000000000000000000000000000000071\n:10BFD0000000000000000000000000000000000061\n:10BFE0000000000000000000000000000000000051\n:10BFF0000000000000000000000000000000000041\n:10C000000000000000000000000000000000000030\n:10C010000000000000000000000000000000000020\n:10C020000000000000000000000000000000000010\n:10C030000000000000000000000000000000000000\n:10C0400000000000000000000000000000000000F0\n:10C0500000000000000000000000000000000000E0\n:10C0600000000000000000000000000000000000D0\n:10C0700000000000000000000000000000000000C0\n:10C0800000000000000000000000000000000000B0\n:10C0900000000000000000000000000000000000A0\n:10C0A0000000000000000000000000000000000090\n:10C0B0000000000000000000000000000000000080\n:10C0C0000000000000000000000000000000000070\n:10C0D0000000000000000000000000000000000060\n:10C0E0000000000000000000000000000000000050\n:10C0F0000000000000000000000000000000000040\n:10C10000000000000000000000000000000000002F\n:10C11000000000000000000000000000000000001F\n:10C12000000000000000000000000000000000000F\n:10C1300000000000000000000000000000000000FF\n:10C1400000000000000000000000000000000000EF\n:10C1500000000000000000000000000000000000DF\n:10C1600000000000000000000000000000000000CF\n:10C1700000000000000000000000000000000000BF\n:10C1800000000000000000000000000000000000AF\n:10C190000000000000000000FFFFFFFF7C7F002088\n:10C1A0000090D003FF00FFFF320000007D7B0F00F6\n:10C1B000F17B0F0001090262000301008032080BCD\n:10C1C000000202020000090400000102020004054E\n:10C1D0002400200105240100010424020205240694\n:10C1E00000010705810308001009040100020A008C\n:10C1F000000007050202400000070582024000001F\n:10C200000904020002080650050705030240000069\n:10C210000705830240000009024B00020100803242\n:10C22000080B0002020200000904000001020200E3\n:10C230000405240020010524010001042402020554\n:10C24000240600010705810308001009040100020B\n:10C250000A000000070502024000000705820240B4\n:10C26000000012010002EF0201409A2329000001A0\n:10C2700001020301FDBB0F008DBB0F008DBB0F0042\n:10C2800064B30020F2BB0F00D9BB0F00554632202B\n:10C29000426F6F746C6F6164657220302E392E327C\n:10C2A000206C69622F6E726678202876322E302ECE\n:10C2B0003029206C69622F74696E79757362202849\n:10C2C000302E31322E302D3134352D673937373518\n:10C2D000653736393129206C69622F75663220281E\n:10C2E00072656D6F7465732F6F726967696E2F6306\n:10C2F0006F6E6669677570646174652D392D67614D\n:10C30000646262386337290D0A4D6F64656C3A20A8\n:10C3100068747470733A2F2F6275796D6561636FFD\n:10C32000666665652E636F6D2F6D61726B2E626937\n:10C330007273730D0A426F6172642D49443A204D45\n:10C340006573687461737469630D0A446174653A56\n:10C350002053657020203120323032340D0A000025\n:10C3600000000000000000000000000000000000CD\n:10C3700000000000000000000000000000000000BD\n:10C3800000000000000000000000000000000000AD\n:10C39000000000000000000000000000000000009D\n:10C3A000000000000000000000000000000000008D\n:10C3B000000000000000000000000000000000007D\n:10C3C000000000000000000000000000000000006D\n:10C3D000000000000000000000000000000000005D\n:10C3E000000000000000000000000000000000004D\n:10C3F000000000000000000000000000000000003D\n:10C40000000000000000000000000000010000002B\n:10C4100098B4002010000C000000E0FF1F00000096\n:10C42000000000005D450F0069420F0041420F000F\n:10D80000F1109E1E797A22200500000064000000BD\n:10D81000CC00000000001000CD000000000004005B\n:10D82000D000000029009A23D10000004028A5ADB7\n:10D83000D2000000200000000000000000000000F6\n:10D8400000000000000000000000000000000000D8\n:08D850000000000000000000D0\n:020000041000EA\n:0810140000400F0000E00F0096\n:00000001FF\n"
  },
  {
    "path": "bin/genpartitions.py",
    "content": "#!/usr/bin/env python2\n\n# This is a layout for 4MB of flash\n# Name,   Type, SubType, Offset,  Size, Flags\n# nvs,      data, nvs,     0x9000,  0x6000,\n# otadata,  data, ota,     , 0x2000,\n# app0,     app,  ota_0,   , 0x1c0000,\n# app1,     app,  ota_1,   , 0x1c0000,\n# spiffs,   data, spiffs,  , 0x06f000,\n\nstart = 0x9000\nnvssys = 0x3000\nnvsuser = 0x2000 # NOTE: ti seems total size of nvssys MUST be 0x5000 or device will bootloop\nnvs = nvssys + nvsuser\nota = 0x2000\n# app = 0x1c0000\nspi = 128 * 1024\n\n# treat sys part sizes + spiffs size as reserved, then calculate what appsize can be\nreserved = start + nvs + ota + spi\nmaxsize = 0x400000 # 4MB\n\napp = (maxsize - reserved) / 2\n\n# total = start + nvs + ota + 2 * app + spi\n\nnvskb = nvsuser / 1024\nspikb = spi / 1024\nappkb = app / 1024\n\ntable = \"\"\"\n# This is autogenerated by genpartions.py - change that tool instead!\n# appsize={appkb} KB, spiffs={spikb} KB, usernvs={nvskb} KB\n# Name,   Type, SubType, Offset,  Size, Flags\nnvs,      data, nvs,     0x{start:x},  0x{nvs:x},\notadata,  data, ota,     , 0x{ota:x},\napp0,     app,  ota_0,   , 0x{app:x},\napp1,     app,  ota_1,   , 0x{app:x},\nspiffs,   data, spiffs,  , 0x{spi:x} \"\"\".format(**locals())\n\nprint(table)\n"
  },
  {
    "path": "bin/kill-github-actions.sh",
    "content": "#!/bin/bash\n\n# Script to cancel all running GitHub Actions workflows\n# Requires GitHub CLI (gh) to be installed and authenticated\n\nset -e\n\n# Colors for output\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nYELLOW='\\033[1;33m'\nNC='\\033[0m' # No Color\n\n# Function to print colored output\nprint_status() {\n    echo -e \"${GREEN}[INFO]${NC} $1\"\n}\n\nprint_warning() {\n    echo -e \"${YELLOW}[WARN]${NC} $1\"\n}\n\nprint_error() {\n    echo -e \"${RED}[ERROR]${NC} $1\"\n}\n\n# Check if gh CLI is installed\nif ! command -v gh &> /dev/null; then\n    print_error \"GitHub CLI (gh) is not installed. Please install it first:\"\n    echo \"  brew install gh\"\n    echo \"  Or visit: https://cli.github.com/\"\n    exit 1\nfi\n\n# Check if authenticated\nif ! gh auth status &> /dev/null; then\n    print_error \"GitHub CLI is not authenticated. Please run:\"\n    echo \"  gh auth login\"\n    exit 1\nfi\n\n# Get repository info\nREPO=$(gh repo view --json owner,name -q '.owner.login + \"/\" + .name')\nif [[ -z \"$REPO\" ]]; then\n    print_error \"Could not determine repository. Make sure you're in a GitHub repository.\"\n    exit 1\nfi\n\nprint_status \"Working with repository: $REPO\"\n\n# Get all active workflows (both queued and in-progress)\nprint_status \"Fetching active workflows (queued and in-progress)...\"\nQUEUED_WORKFLOWS=$(gh run list --status queued --json databaseId,displayTitle,headBranch,status --limit 100)\nIN_PROGRESS_WORKFLOWS=$(gh run list --status in_progress --json databaseId,displayTitle,headBranch,status --limit 100)\n\n# Combine both lists\nALL_WORKFLOWS=$(echo \"$QUEUED_WORKFLOWS $IN_PROGRESS_WORKFLOWS\" | jq -s 'add | unique_by(.databaseId)')\n\nif [[ \"$ALL_WORKFLOWS\" == \"[]\" ]]; then\n    print_status \"No active workflows found.\"\n    exit 0\nfi\n\n# Parse and display active workflows\necho\nprint_warning \"Found active workflows:\"\necho \"$ALL_WORKFLOWS\" | jq -r '.[] | \"  - \\(.displayTitle) (Branch: \\(.headBranch), Status: \\(.status), ID: \\(.databaseId))\"'\n\necho\nread -p \"Do you want to cancel ALL these workflows? (y/N): \" -n 1 -r\necho\n\nif [[ ! $REPLY =~ ^[Yy]$ ]]; then\n    print_status \"Cancelled by user.\"\n    exit 0\nfi\n\n# Cancel each workflow\nprint_status \"Cancelling workflows...\"\nCANCELLED_COUNT=0\nFAILED_COUNT=0\n\nwhile IFS= read -r WORKFLOW_ID; do\n    if [[ -n \"$WORKFLOW_ID\" ]]; then\n        print_status \"Cancelling workflow ID: $WORKFLOW_ID\"\n        if gh run cancel \"$WORKFLOW_ID\" 2>/dev/null; then\n            ((CANCELLED_COUNT++))\n        else\n            print_error \"Failed to cancel workflow ID: $WORKFLOW_ID\"\n            ((FAILED_COUNT++))\n        fi\n    fi\ndone < <(echo \"$ALL_WORKFLOWS\" | jq -r '.[].databaseId')\n\necho\nprint_status \"Summary:\"\necho \"  - Cancelled: $CANCELLED_COUNT workflows\"\nif [[ $FAILED_COUNT -gt 0 ]]; then\n    echo \"  - Failed: $FAILED_COUNT workflows\"\nfi\n\nprint_status \"Done!\"\n\n# Optional: Show remaining active workflows\necho\nprint_status \"Checking for any remaining active workflows...\"\nREMAINING_QUEUED=$(gh run list --status queued --json databaseId --limit 10)\nREMAINING_IN_PROGRESS=$(gh run list --status in_progress --json databaseId --limit 10)\nREMAINING_ALL=$(echo \"$REMAINING_QUEUED $REMAINING_IN_PROGRESS\" | jq -s 'add | unique_by(.databaseId)')\n\nif [[ \"$REMAINING_ALL\" == \"[]\" ]]; then\n    print_status \"All workflows successfully cancelled.\"\nelse\n    REMAINING_COUNT=$(echo \"$REMAINING_ALL\" | jq '. | length')\n    print_warning \"Still $REMAINING_COUNT workflows active (may take a moment to update status)\"\nfi"
  },
  {
    "path": "bin/meshtasticd-start.sh",
    "content": "#!/usr/bin/env sh\n\nINSTANCE=$1\nCONF_DIR=\"/etc/meshtasticd/config.d\"\nVFS_DIR=\"/var/lib\"\n\n# If no instance ID provided, start bare daemon and exit\necho \"no instance ID provided, starting bare meshtasticd service\"\nif [ -z \"${INSTANCE}\" ]; then\n  /usr/bin/meshtasticd\n  exit 0\nfi\n\n# Make VFS dir if it does not exist\nif [ ! -d \"${VFS_DIR}/meshtasticd-${INSTANCE}\" ]; then\n  echo \"vfs for ${INSTANCE} does not exist, creating it.\"\n  mkdir \"${VFS_DIR}/meshtasticd-${INSTANCE}\"\nfi\n\n# Abort if config for $INSTANCE does not exist\nif [ ! -f \"${CONF_DIR}/config-${INSTANCE}.yaml\" ]; then\n  echo \"no config for ${INSTANCE} found in ${CONF_DIR}. refusing to start\" >&2\n  exit 1\nfi\n\n# Start meshtasticd with instance parameters\nprintf \"starting meshtasticd-%s..., ${INSTANCE}\"\nif /usr/bin/meshtasticd --config=\"${CONF_DIR}/config-${INSTANCE}.yaml\" --fsdir=\"${VFS_DIR}/meshtasticd-${INSTANCE}\"; then\n  echo \"ok\"\nelse\n  echo \"failed\"\nfi\n"
  },
  {
    "path": "bin/meshtasticd.service",
    "content": "[Unit]\nDescription=Meshtastic %i Daemon\nAfter=network-online.target\nStartLimitInterval=200\nStartLimitBurst=5\n\n[Service]\nAmbientCapabilities=CAP_NET_BIND_SERVICE\nUser=meshtasticd\nGroup=meshtasticd\nType=simple\nExecStart=/usr/bin/meshtasticd-start.sh %i\nRestart=always\nRestartSec=3\n\n[Install]\nWantedBy=multi-user.target\n"
  },
  {
    "path": "bin/native-gdbserver.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\npio run --environment native\ngdbserver --once localhost:2345 .pio/build/native/meshtasticd \"$@\"\n"
  },
  {
    "path": "bin/native-install.sh",
    "content": "#!/usr/bin/env bash\n\ncp \"release/meshtasticd_linux_$(uname -m)\" /usr/bin/meshtasticd\ncp \"bin/meshtasticd-start.sh\" /usr/bin/meshtasticd-start.sh\nmkdir -p /etc/meshtasticd\nif [[ -f \"/etc/meshtasticd/config.yaml\" ]]; then\n\tcp bin/config-dist.yaml /etc/meshtasticd/config-upgrade.yaml\nelse\n\tcp bin/config-dist.yaml /etc/meshtasticd/config.yaml\nfi\ncp bin/meshtasticd.service /usr/lib/systemd/system/meshtasticd.service\n"
  },
  {
    "path": "bin/native-run.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\npio run --environment native\n.pio/build/native/meshtasticd \"$@\"\n"
  },
  {
    "path": "bin/org.meshtastic.meshtasticd.desktop",
    "content": "[Desktop Entry]\nName=Meshtastic\nComment=Meshtastic App\nExec=meshtasticd\nIcon=org.meshtastic.meshtasticd\nTerminal=true\nType=Application\nCategories=Network;Chat;HamRadio;"
  },
  {
    "path": "bin/org.meshtastic.meshtasticd.metainfo.xml",
    "content": "<?xml version='1.0' encoding='UTF-8'?>\n<component type=\"desktop-application\">\n  <id>org.meshtastic.meshtasticd</id>\n\n  <name>Meshtastic</name>\n  <summary>Decentralized mesh communication</summary>\n\n  <metadata_license>CC-BY-4.0</metadata_license>\n  <project_license>GPL-3.0-or-later</project_license>\n\n  <developer id=\"org.meshtastic\">\n    <name>Meshtastic</name>\n  </developer>\n\n  <description>\n    <p>\n      Meshtastic is an open source project for creating off-grid, affordable, and resilient communication with LoRa mesh networks.\n    </p>\n  </description>\n\n  <launchable type=\"desktop-id\">org.meshtastic.meshtasticd.desktop</launchable>\n\n  <categories>\n    <category>Network</category>\n    <category>Chat</category>\n    <category>HamRadio</category>\n  </categories>\n  <keywords>\n    <keyword>mesh</keyword>\n    <keyword>LoRa</keyword>\n  </keywords>\n\n  <recommends>\n    <control>keyboard</control>\n    <control>pointing</control>\n    <control>touch</control>\n  </recommends>\n  <requires>\n    <display_length compare=\"ge\">360</display_length>\n  </requires>\n\n  <branding>\n    <color type=\"primary\" scheme_preference=\"light\">#97be89</color>\n    <color type=\"primary\" scheme_preference=\"dark\">#206538</color>\n  </branding>\n\n  <content_rating type=\"oars-1.1\">\n    <content_attribute id=\"social-chat\">intense</content_attribute>\n    <content_attribute id=\"social-location\">intense</content_attribute>\n  </content_rating>\n\n  <url type=\"bugtracker\">https://github.com/meshtastic/firmware/issues</url>\n  <url type=\"homepage\">https://meshtastic.org/</url>\n  <url type=\"donation\">https://opencollective.com/meshtastic</url>\n  <url type=\"faq\">https://meshtastic.org/docs/software/linux/usage/</url>\n  <url type=\"vcs-browser\">https://github.com/meshtastic/firmware/</url>\n\n  <screenshots>\n    <screenshot type=\"default\">\n      <image>https://meshtastic.org/img/software/meshtastic-ui/mui_home_dashboard_dark.webp</image>\n      <caption>Home Dashboard</caption>\n    </screenshot>\n    <screenshot>\n      <image>https://meshtastic.org/img/software/meshtastic-ui/mui_initial_boot.webp</image>\n      <caption>Setup</caption>\n    </screenshot>\n    <screenshot>\n      <image>https://meshtastic.org/img/software/meshtastic-ui/mui_node_list_dark.webp</image>\n      <caption>Nodes List</caption>\n    </screenshot>\n    <screenshot>\n      <image>https://meshtastic.org/img/software/meshtastic-ui/mui_chat_list_dark.webp</image>\n      <caption>Chats List</caption>\n    </screenshot>\n    <screenshot>\n      <image>https://meshtastic.org/img/software/meshtastic-ui/mui_chat_message_dark.webp</image>\n      <caption>Messages</caption>\n    </screenshot>\n    <screenshot>\n      <image>https://meshtastic.org/img/software/meshtastic-ui/mui_map_dark.webp</image>\n      <caption>Map</caption>\n    </screenshot>\n    <screenshot>\n      <image>https://meshtastic.org/img/software/meshtastic-ui/mui_settings_dark.webp</image>\n      <caption>Settings</caption>\n    </screenshot>\n  </screenshots>\n\n  <releases>\n    <release version=\"2.7.21\" date=\"2026-03-11\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.21</url>\n    </release>\n    <release version=\"2.7.20\" date=\"2026-02-11\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.20</url>\n    </release>\n    <release version=\"2.7.19\" date=\"2026-01-22\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.19</url>\n    </release>\n    <release version=\"2.7.18\" date=\"2026-01-02\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.18</url>\n    </release>\n    <release version=\"2.7.17\" date=\"2025-11-28\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.17</url>\n    </release>\n    <release version=\"2.7.16\" date=\"2025-11-19\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.16</url>\n    </release>\n    <release version=\"2.7.15\" date=\"2025-11-13\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.15</url>\n    </release>\n    <release version=\"2.7.14\" date=\"2025-11-03\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.14</url>\n    </release>\n    <release version=\"2.7.13\" date=\"2025-10-11\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.13</url>\n    </release>\n    <release version=\"2.7.12\" date=\"2025-10-01\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.12</url>\n    </release>\n    <release version=\"2.7.11\" date=\"2025-09-24\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.11</url>\n    </release>\n    <release version=\"2.7.10\" date=\"2025-09-18\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.10</url>\n    </release>\n    <release version=\"2.7.9\" date=\"2025-09-03\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.9</url>\n    </release>\n    <release version=\"2.7.8\" date=\"2025-08-30\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.8</url>\n    </release>\n    <release version=\"2.7.7\" date=\"2025-08-28\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.7</url>\n    </release>\n    <release version=\"2.7.6\" date=\"2025-08-12\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.6</url>\n    </release>\n    <release version=\"2.7.5\" date=\"2025-08-09\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.5</url>\n    </release>\n    <release version=\"2.7.4\" date=\"2025-07-19\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.4</url>\n    </release>\n    <release version=\"2.7.3\" date=\"2025-07-10\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.3</url>\n    </release>\n    <release version=\"2.7.2\" date=\"2025-07-04\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.2</url>\n    </release>\n    <release version=\"2.7.1\" date=\"2025-06-27\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.1</url>\n    </release>\n    <release version=\"2.7.0\" date=\"2025-06-20\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.0</url>\n    </release>\n    <release version=\"2.6.13\" date=\"2025-06-16\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.13</url>\n    </release>\n    <release version=\"2.6.12\" date=\"2025-06-15\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.12</url>\n    </release>\n    <release version=\"2.6.11\" date=\"2025-06-02\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.11</url>\n    </release>\n    <release version=\"2.6.10\" date=\"2025-05-25\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.10</url>\n    </release>\n    <release version=\"2.6.9\" date=\"2025-05-15\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.9</url>\n    </release>\n    <release version=\"2.6.8\" date=\"2025-05-05\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.8</url>\n    </release>\n    <release version=\"2.6.7\" date=\"2025-04-28\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.7</url>\n    </release>\n    <release version=\"2.6.6\" date=\"2025-04-15\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.6</url>\n    </release>\n    <release version=\"2.6.5\" date=\"2025-03-30\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.5</url>\n    </release>\n    <release version=\"2.6.4\" date=\"2025-03-28\">\n      <url type=\"details\">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.4</url>\n    </release>\n  </releases>\n</component>"
  },
  {
    "path": "bin/platformio-custom.py",
    "content": "#!/usr/bin/env python3\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821): For SConstruct imports\nimport sys\nfrom os.path import join\nimport subprocess\nimport json\nimport re\nfrom datetime import datetime\nfrom typing import Dict\n\nfrom readprops import readProps\n\nImport(\"env\")\nplatform = env.PioPlatform()\nprogname = env.get(\"PROGNAME\")\nlfsbin = f\"{progname.replace('firmware-', 'littlefs-')}.bin\"\nmanifest_ran = False\n\ndef infer_architecture(board_cfg):\n    try:\n        mcu = board_cfg.get(\"build.mcu\") if board_cfg else None\n    except KeyError:\n        mcu = None\n    except Exception:\n        mcu = None\n    if not mcu:\n        return None\n    mcu_l = str(mcu).lower()\n    if \"esp32s3\" in mcu_l:\n        return \"esp32-s3\"\n    if \"esp32c6\" in mcu_l:\n        return \"esp32-c6\"\n    if \"esp32c3\" in mcu_l:\n        return \"esp32-c3\"\n    if \"esp32\" in mcu_l:\n        return \"esp32\"\n    if \"rp2040\" in mcu_l:\n        return \"rp2040\"\n    if \"rp2350\" in mcu_l:\n        return \"rp2350\"\n    if \"nrf52\" in mcu_l or \"nrf52840\" in mcu_l:\n        return \"nrf52840\"\n    if \"stm32\" in mcu_l:\n        return \"stm32\"\n    return None\n\ndef manifest_gather(source, target, env):\n    global manifest_ran\n    if manifest_ran:\n        return\n    # Skip manifest generation if we cannot determine architecture (host/native builds)\n    board_arch = infer_architecture(env.BoardConfig())\n    if not board_arch:\n        print(f\"Skipping mtjson generation for unknown architecture (env={env.get('PIOENV')})\")\n        manifest_ran = True\n        return\n    manifest_ran = True\n    out = []\n    board_platform = env.BoardConfig().get(\"platform\")\n    board_mcu = env.BoardConfig().get(\"build.mcu\").lower()\n    needs_ota_suffix = board_platform == \"nordicnrf52\"\n    \n    # Mapping of bin files to their target partition names\n    # Maps the filename pattern to the partition name where it should be flashed\n    partition_map = {\n        f\"{progname}.bin\": \"app0\",              # primary application slot (app0 / OTA_0)\n        lfsbin: \"spiffs\",                        # filesystem image flashed to spiffs\n    }\n    \n    check_paths = [\n        progname,\n        f\"{progname}.elf\",\n        f\"{progname}.bin\",\n        f\"{progname}.factory.bin\",\n        f\"{progname}.hex\",\n        f\"{progname}.merged.hex\",\n        f\"{progname}.uf2\",\n        f\"{progname}.factory.uf2\",\n        f\"{progname}.zip\",\n        lfsbin,\n        f\"mt-{board_mcu}-ota.bin\",\n        \"bleota-c3.bin\"\n    ]\n    for p in check_paths:\n        f = env.File(env.subst(f\"$BUILD_DIR/{p}\"))\n        if f.exists():\n            manifest_name = p\n            if needs_ota_suffix and p == f\"{progname}.zip\":\n                manifest_name = f\"{progname}-ota.zip\"\n            d = {\n                \"name\": manifest_name,\n                \"md5\": f.get_content_hash(), # Returns MD5 hash\n                \"bytes\": f.get_size() # Returns file size in bytes\n            }\n            # Add part_name if this file represents a partition that should be flashed\n            if p in partition_map:\n                d[\"part_name\"] = partition_map[p]\n            out.append(d)\n            print(d)\n    manifest_write(out, env)\n\ndef manifest_write(files, env):\n    # Defensive: also skip manifest writing if we cannot determine architecture\n    def get_project_option(name):\n        try:\n            return env.GetProjectOption(name)\n        except Exception:\n            return None\n\n    def get_project_option_any(names):\n        for name in names:\n            val = get_project_option(name)\n            if val is not None:\n                return val\n        return None\n\n    def as_bool(val):\n        return str(val).strip().lower() in (\"1\", \"true\", \"yes\", \"on\")\n\n    def as_int(val):\n        try:\n            return int(str(val), 10)\n        except (TypeError, ValueError):\n            return None\n\n    def as_list(val):\n        return [item.strip() for item in str(val).split(\",\") if item.strip()]\n\n    manifest = {\n        \"version\": verObj[\"long\"],\n        \"build_epoch\": build_epoch,\n        \"platformioTarget\": env.get(\"PIOENV\"),\n        \"mcu\": env.get(\"BOARD_MCU\"),\n        \"repo\": repo_owner,\n        \"files\": files,\n        \"has_mui\": False,\n        \"has_inkhud\": False,\n    }\n    # Get partition table (generated in esp32_pre.py) if it exists\n    if env.get(\"custom_mtjson_part\"):\n        # custom_mtjson_part is a JSON string, convert it back to a dict\n        pj = json.loads(env.get(\"custom_mtjson_part\"))\n        manifest[\"part\"] = pj\n    # Enable has_mui for TFT builds\n    if (\"HAS_TFT\", 1) in env.get(\"CPPDEFINES\", []):\n        manifest[\"has_mui\"] = True\n    if \"MESHTASTIC_INCLUDE_INKHUD\" in env.get(\"CPPDEFINES\", []):\n        manifest[\"has_inkhud\"] = True\n\n    pioenv = env.get(\"PIOENV\")\n    device_meta = {}\n    device_meta_fields = [\n        (\"hwModel\", [\"custom_meshtastic_hw_model\"], as_int),\n        (\"hwModelSlug\", [\"custom_meshtastic_hw_model_slug\"], str),\n        (\"architecture\", [\"custom_meshtastic_architecture\"], str),\n        (\"activelySupported\", [\"custom_meshtastic_actively_supported\"], as_bool),\n        (\"displayName\", [\"custom_meshtastic_display_name\"], str),\n        (\"supportLevel\", [\"custom_meshtastic_support_level\"], as_int),\n        (\"images\", [\"custom_meshtastic_images\"], as_list),\n        (\"tags\", [\"custom_meshtastic_tags\"], as_list),\n        (\"requiresDfu\", [\"custom_meshtastic_requires_dfu\"], as_bool),\n        (\"partitionScheme\", [\"custom_meshtastic_partition_scheme\"], str),\n        (\"url\", [\"custom_meshtastic_url\"], str),\n        (\"key\", [\"custom_meshtastic_key\"], str),\n        (\"variant\", [\"custom_meshtastic_variant\"], str),\n    ]\n\n\n    for manifest_key, option_keys, caster in device_meta_fields:\n        raw_val = get_project_option_any(option_keys)\n        if raw_val is None:\n            continue\n        parsed = caster(raw_val) if callable(caster) else raw_val\n        if parsed is not None and parsed != \"\":\n            device_meta[manifest_key] = parsed\n\n    # Determine architecture once; if we can't infer it, skip manifest generation\n    board_arch = device_meta.get(\"architecture\") or infer_architecture(env.BoardConfig())\n    if not board_arch:\n        print(f\"Skipping mtjson write for unknown architecture (env={env.get('PIOENV')})\")\n        return\n\n    device_meta[\"architecture\"] = board_arch\n\n    # Always set requiresDfu: true for nrf52840 targets\n    if board_arch == \"nrf52840\":\n        device_meta[\"requiresDfu\"] = True\n\n    device_meta.setdefault(\"displayName\", pioenv)\n    device_meta.setdefault(\"activelySupported\", False)\n\n    if device_meta:\n        manifest.update(device_meta)\n\n    # Write the manifest to the build directory\n    with open(env.subst(\"$BUILD_DIR/${PROGNAME}.mt.json\"), \"w\") as f:\n        json.dump(manifest, f, indent=2)\n\nImport(\"projenv\")\n\nprefsLoc = projenv[\"PROJECT_DIR\"] + \"/version.properties\"\nverObj = readProps(prefsLoc)\nprint(f\"Using meshtastic platformio-custom.py, firmware version {verObj['long']} on {env.get('PIOENV')}\")\n\n# get repository owner if git is installed\ntry:\n    r_owner = (\n        subprocess.check_output([\"git\", \"config\", \"--get\", \"remote.origin.url\"])\n        .decode(\"utf-8\")\n        .strip().split(\"/\")\n    )\n    repo_owner = r_owner[-2] + \"/\" + r_owner[-1].replace(\".git\", \"\")\nexcept subprocess.CalledProcessError:\n    repo_owner = \"unknown\"\n\njsonLoc = env[\"PROJECT_DIR\"] + \"/userPrefs.jsonc\"\nwith open(jsonLoc) as f:\n    jsonStr = re.sub(\"//.*\",\"\", f.read(), flags=re.MULTILINE)\n    userPrefs = json.loads(jsonStr)\n\npref_flags = []\n# Pre-process the userPrefs\nfor pref in userPrefs:\n    if userPrefs[pref].startswith(\"{\"):\n        pref_flags.append(\"-D\" + pref + \"=\" + userPrefs[pref])\n    elif userPrefs[pref].lstrip(\"-\").replace(\".\", \"\").isdigit():\n        pref_flags.append(\"-D\" + pref + \"=\" + userPrefs[pref])\n    elif userPrefs[pref] == \"true\" or userPrefs[pref] == \"false\":\n        pref_flags.append(\"-D\" + pref + \"=\" + userPrefs[pref])\n    elif userPrefs[pref].startswith(\"meshtastic_\"):\n        pref_flags.append(\"-D\" + pref + \"=\" + userPrefs[pref])\n    # If the value is a string, we need to wrap it in quotes\n    else:\n        pref_flags.append(\"-D\" + pref + \"=\" + env.StringifyMacro(userPrefs[pref]) + \"\")\n\n# General options that are passed to the C and C++ compilers\n# Calculate unix epoch for current day (midnight)\ncurrent_date = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)\nbuild_epoch = int(current_date.timestamp())\n\nflags = [\n        \"-DAPP_VERSION=\" + verObj[\"long\"],\n        \"-DAPP_VERSION_SHORT=\" + verObj[\"short\"],\n        \"-DAPP_ENV=\" + env.get(\"PIOENV\"),\n        \"-DAPP_REPO=\" + repo_owner,\n        \"-DBUILD_EPOCH=\" + str(build_epoch),\n    ] + pref_flags\n\nprint(\"Using flags:\")\nfor flag in flags:\n    print(flag)\n\nprojenv.Append(\n    CCFLAGS=flags,\n)\n\nfor lb in env.GetLibBuilders():\n    if lb.name == \"meshtastic-device-ui\":\n        lb.env.Append(CPPDEFINES=[(\"APP_VERSION\", verObj[\"long\"])])\n        break\n\n# Get the display resolution from macros\ndef get_display_resolution(build_flags):\n    # Check \"DISPLAY_SIZE\" to determine the screen resolution\n    for flag in build_flags:\n        if isinstance(flag, tuple) and flag[0] == \"DISPLAY_SIZE\":\n            screen_width, screen_height = map(int, flag[1].split(\"x\"))\n            return screen_width, screen_height\n    print(\"No screen resolution defined in build_flags. Please define DISPLAY_SIZE.\")\n    exit(1)\n\ndef load_boot_logo(source, target, env):\n    build_flags = env.get(\"CPPDEFINES\", [])\n    logo_w, logo_h = get_display_resolution(build_flags)\n    print(f\"TFT build with {logo_w}x{logo_h} resolution detected\")\n\n    # Load the boot logo from `branding/logo_<width>x<height>.png` if it exists\n    source_path = join(env[\"PROJECT_DIR\"], \"branding\", f\"logo_{logo_w}x{logo_h}.png\")\n    dest_dir = join(env[\"PROJECT_DIR\"], \"data\", \"boot\")\n    dest_path = join(dest_dir, \"logo.png\")\n    if env.File(source_path).exists():\n        print(f\"Loading boot logo from {source_path}\")\n        # Prepare the destination\n        env.Execute(f\"mkdir -p {dest_dir} && rm -f {dest_path}\")\n        # Copy the logo to the `data/boot` directory\n        env.Execute(f\"cp {source_path} {dest_path}\")\n\n# Load the boot logo on TFT builds\nif (\"HAS_TFT\", 1) in env.get(\"CPPDEFINES\", []):\n    env.AddPreAction(f\"$BUILD_DIR/{lfsbin}\", load_boot_logo)\n\nboard_arch = infer_architecture(env.BoardConfig())\nshould_skip_manifest = board_arch is None\n\n# For host/native envs, avoid depending on 'buildprog' (some targets don't define it)\nmtjson_deps = [] if should_skip_manifest else [\"buildprog\"]\nif not should_skip_manifest and platform.name == \"espressif32\":\n    # Build littlefs image as part of mtjson target\n    # Equivalent to `pio run -t buildfs`\n    target_lfs = env.DataToBin(\n        join(\"$BUILD_DIR\", \"${ESP32_FS_IMAGE_NAME}\"), \"$PROJECT_DATA_DIR\"\n    )\n    mtjson_deps.append(target_lfs)\n\nif should_skip_manifest:\n    def skip_manifest(source, target, env):\n        print(f\"mtjson: skipped for native environment: {env.get('PIOENV')}\")\n\n    env.AddCustomTarget(\n        name=\"mtjson\",\n        dependencies=mtjson_deps,\n        actions=[skip_manifest],\n        title=\"Meshtastic Manifest (skipped)\",\n        description=\"mtjson generation is skipped for native environments\",\n        always_build=True,\n    )\nelse:\n    env.AddCustomTarget(\n        name=\"mtjson\",\n        dependencies=mtjson_deps,\n        actions=[manifest_gather],\n        title=\"Meshtastic Manifest\",\n        description=\"Generating Meshtastic manifest JSON + Checksums\",\n        always_build=True,\n    )\n\n    # Run manifest generation as part of the default build pipeline for non-native builds.\n    env.Default(\"mtjson\")\n"
  },
  {
    "path": "bin/platformio-pre.py",
    "content": "#!/usr/bin/env python3\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821): For SConstruct imports\nImport(\"env\")\nplatform = env.PioPlatform()\n\nif platform.name == \"native\":\n    env.Replace(PROGNAME=\"meshtasticd\")\nelse:\n    from readprops import readProps\n    prefsLoc = env[\"PROJECT_DIR\"] + \"/version.properties\"\n    verObj = readProps(prefsLoc)\n    env.Replace(PROGNAME=f\"firmware-{env.get('PIOENV')}-{verObj['long']}\")\n    env.Replace(ESP32_FS_IMAGE_NAME=f\"littlefs-{env.get('PIOENV')}-{verObj['long']}\")\n\n# Print the new program name for verification\nprint(f\"PROGNAME: {env.get('PROGNAME')}\")\nif platform.name == \"espressif32\":\n    print(f\"ESP32_FS_IMAGE_NAME: {env.get('ESP32_FS_IMAGE_NAME')}\")\n"
  },
  {
    "path": "bin/promote-release.sh",
    "content": "#!/usr/bin/env bash\n\nset -e \n\necho \"This script is only for developers who are publishing new builds on github.  Most users don't need it\"\n\nVERSION=`bin/buildinfo.py long`\n\n# Must have a V prefix to trigger github\ngit tag \"v${VERSION}\"\n\ngit push origin \"v${VERSION}\" # push the tag\n\necho \"Tag ${VERSION} pushed to github, github actions should now be building the draft release.  If it seems good, click to publish it\"\n"
  },
  {
    "path": "bin/read-system-info.sh",
    "content": "#!/usr/bin/env bash\n\nesptool.py --baud 115200 read_flash 0x1000 0xf000 system-info.img\n"
  },
  {
    "path": "bin/readprops.py",
    "content": "import configparser\nimport subprocess\nimport os\nrun_number = os.getenv('GITHUB_RUN_NUMBER', '0')\nbuild_location = os.getenv('BUILD_LOCATION', 'local')\n\ndef readProps(prefsLoc):\n    \"\"\"Read the version of our project as a string\"\"\"\n\n    config = configparser.RawConfigParser()\n    config.read(prefsLoc)\n    version = dict(config.items(\"VERSION\"))\n    verObj = dict(\n        short=\"{}.{}.{}\".format(version[\"major\"], version[\"minor\"], version[\"build\"]),\n        long=\"unset\",\n        deb=\"unset\",\n    )\n\n    # Try to find current build SHA if if the workspace is clean.  This could fail if git is not installed\n    try:\n        # Pin abbreviation length to keep local builds and CI matching (avoid auto-shortening)\n        sha = (\n            subprocess.check_output([\"git\", \"rev-parse\", \"--short=7\", \"HEAD\"])\n            .decode(\"utf-8\")\n            .strip()\n        )\n        isDirty = (\n            subprocess.check_output([\"git\", \"diff\", \"HEAD\"]).decode(\"utf-8\").strip()\n        )\n        suffix = sha\n        # if isDirty:\n        #     # short for 'dirty', we want to keep our verstrings source for protobuf reasons\n        #     suffix = sha + \"-d\"\n        verObj[\"long\"] = \"{}.{}\".format(verObj[\"short\"], suffix)\n        verObj[\"deb\"] = \"{}.{}~{}{}\".format(verObj[\"short\"], run_number, build_location, sha)\n    except:\n        # print(\"Unexpected error:\", sys.exc_info()[0])\n        # traceback.print_exc()\n        verObj[\"long\"] = verObj[\"short\"]\n        verObj[\"deb\"] = \"{}.{}~{}\".format(verObj[\"short\"], run_number, build_location)\n\n    # print(\"firmware version \" + verStr)\n    return verObj\n\n\n# print(\"path is\" + ','.join(sys.path))"
  },
  {
    "path": "bin/regen-protos.bat",
    "content": "@ECHO OFF\r\nSETLOCAL\r\n\r\ncd protobufs\r\n..\\nanopb-0.4.9\\generator-bin\\protoc.exe --experimental_allow_proto3_optional \"--nanopb_out=-S.cpp -v:..\\src\\mesh\\generated\" -I=..\\protobufs\\ ..\\protobufs\\meshtastic\\*.proto\r\nGOTO eof\r\n\r\n:eof\r\nENDLOCAL\r\nEXIT /B %ERRORLEVEL%\r\n"
  },
  {
    "path": "bin/regen-protos.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\necho \"This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.9 to be located in the\"\necho \"firmware root directory if the following step fails, you should download the correct\"\necho \"prebuilt binaries for your computer into nanopb-0.4.9\"\n\n# the nanopb tool seems to require that the .options file be in the current directory!\ncd protobufs\n../nanopb-0.4.9/generator-bin/protoc --experimental_allow_proto3_optional \"--nanopb_out=-S.cpp -v:../src/mesh/generated/\" -I=../protobufs meshtastic/*.proto\n"
  },
  {
    "path": "bin/rpkg.macros",
    "content": "function meshtastic_version {\n    meshtastic_version=$(python3 bin/buildinfo.py short)\n    echo -n \"$meshtastic_version\"\n}\nfunction web_version {\n    web_version=$(cat bin/web.version)\n    echo -n \"$web_version\"\n}\nfunction git_commits_num {\n    total_commits=$(git rev-list --all --count)\n    echo -n \"$total_commits\"\n}\nfunction git_commit_sha {\n    commit_sha=$(git rev-parse --short HEAD)\n    echo -n \"$commit_sha\"\n}"
  },
  {
    "path": "bin/s140_nrf52_7.3.0_softdevice.hex",
    "content": ":020000040000FA\n:1000000000040020810A000015070000610A0000BA\n:100010001F07000029070000330700000000000050\n:10002000000000000000000000000000A50A000021\n:100030003D070000000000004707000051070000D6\n:100040005B070000650700006F07000079070000EC\n:10005000830700008D07000097070000A10700003C\n:10006000AB070000B5070000BF070000C90700008C\n:10007000D3070000DD070000E7070000F1070000DC\n:10008000FB070000050800000F0800001908000029\n:10009000230800002D080000370800004108000078\n:1000A0004B080000550800005F08000069080000C8\n:1000B000730800007D080000870800009108000018\n:1000C0009B080000A5080000AF080000B908000068\n:1000D000C3080000CD080000D7080000E1080000B8\n:1000E000EB080000F5080000FF0800000909000007\n:1000F000130900001D090000270900003109000054\n:100100003B0900001FB500F003F88DE80F001FBD8C\n:1001100000F0ACBC40F6FC7108684FF01022401CA7\n:1001200008D00868401C09D00868401C04D0086842\n:1001300000F037BA9069F5E79069F9E7704770B554\n:100140000B46010B184400F6FF70040B4FF0805073\n:100150000022090303692403406943431D1B104621\n:1001600000F048FA29462046BDE8704000F042BA47\n:10017000F0B54FF6FF734FF4B4751A466E1E11E0DA\n:10018000A94201D3344600E00C46091B30F8027B3B\n:10019000641E3B441A44F9D19CB204EB134394B25D\n:1001A00004EB12420029EBD198B200EB134002EBB2\n:1001B000124140EA0140F0BDF34992B00446D1E952\n:1001C0000001CDE91001FF224021684600F0F4FB58\n:1001D00094E80F008DE80F00684610A902E004C8FB\n:1001E00041F8042D8842FAD110216846FFF7C0FF7C\n:1001F0001090AA208DF8440000F099F9FFF78AFFCB\n:1002000040F6FC7420684FF01025401C0FD0206889\n:1002100010226946803000F078F92068401C08D030\n:100220002068082210A900F070F900F061F9A869AF\n:10023000EEE7A869F5E74FF080500369406940F6A2\n:10024000FC71434308684FF01022401C06D0086838\n:1002500000F58050834203D2092070479069F7E788\n:100260000868401C04D00868401C03D00020704778\n:100270009069F9E70420704770B504460068C34DE3\n:10028000072876D2DFE800F033041929631E250021\n:10029000D4E9026564682946304600F062F92A46CE\n:1002A0002146304600F031F9AA002146304600F0E0\n:1002B00057FB002800D0032070BD00F009FC4FF46C\n:1002C000805007E0201D00F040F90028F4D100F034\n:1002D000FFFB60682860002070BD241D94E80700C3\n:1002E000920000F03DFB0028F6D00E2070BDFFF715\n:1002F000A2FF0028FAD1D4E901034FF0805100EBAE\n:10030000830208694D69684382420ED840F6F8704E\n:1003100005684FF010226D1C09D0056805EB8305B8\n:100320000B6949694B439D4203D9092070BD55694A\n:10033000F4E70168491C03D00068401C02D003E0C8\n:100340005069FAE70F2070BD2046FFF735FFFFF731\n:1003500072FF0028F7D1201D00F0F7F80028F2D135\n:1003600060680028F0D100F0E2F8FFF7D3FE00F05B\n:10037000BFF8072070BD10B50C46182802D0012028\n:10038000086010BD2068FFF777FF206010BD41684E\n:10039000054609B1012700E0002740F6F8742068FF\n:1003A0004FF01026401C2BD02068AA68920000F065\n:1003B000D7FA38B3A86881002068401C27D020688D\n:1003C000FFF7BDFED7B12068401C22D026684FF051\n:1003D0008050AC686D68016942695143A9420DD9EA\n:1003E000016940694143A14208D92146304600F0E5\n:1003F000B8F822462946304600F087F800F078F831\n:100400007069D2E700F093F8FFF784FEF6E77069B1\n:10041000D6E77669DBE740F6FC7420684FF01026DB\n:10042000401C23D02068401C0CD02068401C1FD0EA\n:100430002568206805F18005401C1BD027683879A5\n:10044000AA2819D040F6F8700168491C42D001680A\n:10045000491C45D00168491C3ED001680968491C07\n:100460003ED00168491C39D000683EE0B069DAE747\n:10047000B569DEE7B769E2E710212846FFF778FEA5\n:100480003968814222D12068401C05D0D4F8001080\n:1004900001F18002C03107E0B169F9E730B108CA63\n:1004A00051F8040D984201D1012000E000208A4259\n:1004B000F4D158B1286810B1042803D0FEE72846CB\n:1004C000FFF765FF3149686808600EE0FFF722FE1C\n:1004D00000F00EF87169BBE77169BFE7706904E06D\n:1004E0004FF480500168491C01D000F0CBFAFEE7C0\n:1004F000BFF34F8F26480168264A01F4E06111439B\n:100500000160BFF34F8F00BFFDE72DE9F0411746B3\n:100510000D460646002406E03046296800F054F8EF\n:10052000641C2D1D361DBC42F6D3BDE8F08140F69B\n:10053000FC700168491C04D0D0F800004FF48051D1\n:10054000FDE54FF010208069F8E74FF080510A690F\n:10055000496900684A43824201D810207047002050\n:10056000704770B50C4605464FF4806608E0284693\n:1005700000F017F8B44205D3A4F5806405F5805562\n:10058000002CF4D170BD0000F40A0000000000202F\n:100590000CED00E00400FA05144801680029FCD0C5\n:1005A0007047134A0221116010490B68002BFCD0E0\n:1005B0000F4B1B1D186008680028FCD0002010603D\n:1005C00008680028FCD07047094B10B501221A605A\n:1005D000064A1468002CFCD0016010680028FCD08A\n:1005E0000020186010680028FCD010BD00E4014015\n:1005F00004E5014070B50C46054600F073F810B9EB\n:1006000000F07EF828B121462846BDE8704000F091\n:1006100007B821462846BDE8704000F037B8000012\n:100620007FB5002200920192029203920A0B000B06\n:100630006946012302440AE0440900F01F0651F80C\n:10064000245003FA06F6354341F82450401C8242F8\n:10065000F2D80D490868009A10430860081D016827\n:10066000019A1143016000F03DF800280AD00649C4\n:1006700010310868029A10430860091D0868039A3F\n:10068000104308607FBD00000006004030B50F4CED\n:10069000002200BF04EB0213D3F800582DB9D3F8A1\n:1006A000045815B9D3F808581DB1521C082AF1D3C3\n:1006B00030BD082AFCD204EB0212C2F80008C3F8CD\n:1006C00004180220C3F8080830BD000000E0014013\n:1006D0004FF08050D0F83001082801D0002070473A\n:1006E000012070474FF08050D0F83011062905D016\n:1006F000D0F83001401C01D0002070470120704725\n:100700004FF08050D0F830010A2801D00020704707\n:100710000120704708208F490968095808471020B0\n:100720008C4909680958084714208A4909680958FA\n:100730000847182087490968095808473020854923\n:100740000968095808473820824909680958084744\n:100750003C20804909680958084740207D490968BC\n:100760000958084744207B49096809580847482028\n:1007700078490968095808474C207649096809589A\n:10078000084750207349096809580847542071499F\n:1007900009680958084758206E49096809580847E8\n:1007A0005C206C4909680958084760206949096854\n:1007B00009580847642067490968095808476820AC\n:1007C00064490968095808476C2062490968095852\n:1007D000084770205F4909680958084774205D4937\n:1007E00009680958084778205A490968095808478C\n:1007F0007C205849096809580847802055490968EC\n:10080000095808478420534909680958084788202F\n:1008100050490968095808478C204E490968095809\n:10082000084790204B4909680958084794204949CE\n:10083000096809580847982046490968095808472F\n:100840009C204449096809580847A0204149096883\n:1008500009580847A4203F49096809580847A820B3\n:100860003C49096809580847AC203A4909680958C1\n:100870000847B0203749096809580847B420354966\n:10088000096809580847B8203249096809580847D3\n:10089000BC203049096809580847C0202D4909681B\n:1008A00009580847C4202B49096809580847C82037\n:1008B0002849096809580847CC2026490968095879\n:1008C0000847D0202349096809580847D4202149FE\n:1008D000096809580847D8201E4909680958084777\n:1008E000DC201C49096809580847E02019490968B3\n:1008F00009580847E4201749096809580847E820BB\n:100900001449096809580847EC2012490968095830\n:100910000847F0200F49096809580847F4200D4995\n:10092000096809580847F8200A490968095808471A\n:10093000FC2008490968095808475FF48070054998\n:10094000096809580847000003480449024A034B54\n:100950007047000000000020000B0000000B0000AA\n:1009600040EA010310B59B070FD1042A0DD310C82C\n:1009700008C9121F9C42F8D020BA19BA884201D97E\n:10098000012010BD4FF0FF3010BD1AB1D30703D0C6\n:10099000521C07E0002010BD10F8013B11F8014B7C\n:1009A0001B1B07D110F8013B11F8014B1B1B01D198\n:1009B000921EF1D1184610BD02F0FF0343EA032254\n:1009C00042EA024200F005B87047704770474FF0A6\n:1009D00000020429C0F0128010F0030C00F01B800C\n:1009E000CCF1040CBCF1020F18BF00F8012BA8BF1A\n:1009F00020F8022BA1EB0C0100F00DB85FEAC17CDE\n:100A000024BF00F8012B00F8012B48BF00F8012B90\n:100A100070474FF0000200B51346944696462039C1\n:100A200022BFA0E80C50A0E80C50B1F12001BFF4A7\n:100A3000F7AF090728BFA0E80C5048BF0CC05DF80D\n:100A400004EB890028BF40F8042B08BF704748BF5B\n:100A500020F8022B11F0804F18BF00F8012B7047CF\n:100A6000014B1B68DB6818470000002009480A4951\n:100A70007047FFF7FBFFFFF745FB00BD20BFFDE719\n:100A8000064B1847064A1060016881F308884068E1\n:100A900000470000000B0000000B000017040000DE\n:100AA000000000201EF0040F0CBFEFF30881EFF3ED\n:100AB0000981886902380078182803D100E0000015\n:100AC000074A1047074A12682C3212681047000084\n:100AD00000B5054B1B68054A9B58984700BD0000B0\n:100AE0007703000000000020F00A0000040000006E\n:100AF000001000000000000000FFFFFF0090D00386\n:10100000C8130020395E020085C100009F5D020008\n:1010100085C1000085C1000085C1000000000000FE\n:10102000000000000000000000000000C55E02009B\n:1010300085C100000000000085C1000085C10000DE\n:101040002D5F0200335F020085C1000085C10000F2\n:1010500085C1000085C1000085C1000085C1000078\n:10106000395F020085C1000085C100003F5F0200BA\n:1010700085C10000455F02004B5F0200515F020026\n:1010800085C1000085C1000085C1000085C1000048\n:1010900085C1000085C1000085C1000085C1000038\n:1010A00085C10000575F020085C1000085C10000B6\n:1010B00085C1000085C1000085C1000085C1000018\n:1010C0005D5F020085C1000085C1000085C1000090\n:1010D00085C1000085C1000085C1000085C10000F8\n:1010E00085C1000085C1000085C1000085C10000E8\n:1010F00085C1000085C1000085C1000085C10000D8\n:1011000085C1000085C1000000F002F824F083FED4\n:101110000AA090E8000C82448344AAF10107DA4552\n:1011200001D124F078FEAFF2090EBAE80F0013F0F7\n:10113000010F18BFFB1A43F00103184718530200B0\n:10114000385302000A444FF0000C10F8013B13F032\n:10115000070408BF10F8014B1D1108BF10F8015B10\n:10116000641E05D010F8016B641E01F8016BF9D103\n:1011700013F0080F1EBF10F8014BAD1C0C1B09D15A\n:101180006D1E58BF01F801CBFAD505E014F8016BCC\n:1011900001F8016B6D1EF9D59142D6D3704700005E\n:1011A0000023002400250026103A28BF78C1FBD870\n:1011B000520728BF30C148BF0B6070471FB500F011\n:1011C00003F88DE80F001FBD24F022BE70B51A4C45\n:1011D00005460A202070A01C00F0D5F85920A080F8\n:1011E00029462046BDE8704008F082B908F08BB966\n:1011F00070B50C461149097829B1A0F160015E294A\n:1012000008D3012013E0602804D0692802D043F2FB\n:1012100001000CE020CC0A4E94E80E0006EB8000A2\n:10122000A0F58050241FD0F8806E2846B04720607B\n:1012300070BD012070470000080000201C00002045\n:10124000A05F02003249884201D20120704700208D\n:10125000704770B50446A0F500002E4EB0F1786FCF\n:1012600002D23444A4F500042948844201D2012565\n:1012700000E0002500F043F848B125B9B44204D39A\n:101280002548006808E0012070BD002070BD002DD9\n:10129000F9D1B442F9D321488442F6D2F3E710B52C\n:1012A0000446A0F50000B0F1786F03D21948044459\n:1012B000A4F5000400F023F84FF0804130B1164847\n:1012C000006804E08C4204D2012003E01348844209\n:1012D000F8D2002080F0010010BD10B520B1FFF75A\n:1012E000DEFF08B1012010BD002010BD10B520B1F7\n:1012F000FFF7AFFF08B1012010BD002010BD084866\n:1013000008490068884201D10120704700207047D9\n:1013100000700200000000202000002008000020D3\n:101320005C000020BEBAFECA10B5044600210120B0\n:1013300000F042F800210B2000F03EF800210820C8\n:1013400000F03AF80421192000F036F804210D20AD\n:1013500000F032F804210E2000F02EF804210F20B6\n:1013600000F02AF80421C84300F026F806211620D0\n:1013700000F022F80621152000F01EF82046FFF7A5\n:1013800025FF002010BD40F2231101807047FFF7B8\n:101390002DBF1148704710487047104A10B51468A7\n:1013A0000E4B0F4A08331A60FFF722FF0B48001D4F\n:1013B000046010BD704770474907090E002804DB20\n:1013C00000F1E02080F80014704700F00F0000F1F9\n:1013D000E02080F8141D704703F900421005024018\n:1013E00001000001FD48002101604160018170475A\n:1013F0002DE9FF4F93B09B46209F160004460DD069\n:101400001046FFF726FF18B1102017B0BDE8F08F87\n:101410003146012001F0D3FE0028F6D101258DF8D8\n:1014200042504FF4C050ADF84000002210A92846A9\n:1014300006F0C5FC0028E8D18DF84250A8464FF4CC\n:1014400028500025ADF840001C2229466846079523\n:101450000DF01DF89DF81C000DF11C0A20F00F0086\n:10146000401C20F0F00010308DF81C0020788DF822\n:101470001D0061789DF81E000DF1400961F34200E6\n:1014800040F001008DF81E009DF8000008AA40F011\n:1014900002008DF800002089ADF83000ADF8325020\n:1014A0006089ADF83400CDF82CA060680E900AA9D0\n:1014B000CDF82890684606F090FA0028A5D160681B\n:1014C000FFF70BFF40B16068FFF710FF20B96078AD\n:1014D00000F00300022801D0012000E00020BF4CF2\n:1014E00008AA0AA92072BDF8200020808DF8428049\n:1014F00042F60120ADF840009DF81E0020F00600E5\n:10150000801C20F001008DF81E000220ADF8300094\n:10151000ADF8340014A80E90684606F05EFA002874\n:1015200089D1BDF82000608036B1211D304600F021\n:101530005FF90028C2D109E0BBF1000F05D00CF023\n:1015400021FDE8BB0CF01EFDD0BBA58017B1012F1B\n:1015500043D04AE08DF8428042F6A620ADF8400024\n:1015600046461C220021684607950CF090FF9DF826\n:101570001C00ADF8346020F00F00401C20F0F0009B\n:1015800010308DF81C009DF81D0020F0FF008DF834\n:101590001D009DF81E0020F0060040F00100801C98\n:1015A0008DF81E009DF800008DF8446040F00200A8\n:1015B0008DF80000CDE90A9AADF8306011A800E07E\n:1015C00011E00E9008AA0AA9684606F006FA00285B\n:1015D000A6D1BDF82000E08008E00CF0D3FC10B9E3\n:1015E0000CF0D0FC08B103200FE7E58000200CE7E9\n:1015F0003EB50446794D0820ADF80000A88828B112\n:101600002046FFF726FE18B110203EBD06203EBD45\n:101610002146012001F0D3FD0028F8D12088ADF843\n:1016200004006088ADF80600A088ADF80800E088E6\n:10163000ADF80A00A88801AB6A46002106F0AAFDB1\n:10164000BDF800100829E2D003203EBD7FB5634DF0\n:101650000446A88868B1002002900820ADF8080070\n:10166000CDF80CD02046FFF7F4FD20B1102004B0D7\n:1016700070BD0620FBE7A98802AA4FF6FF7006F0AE\n:10168000CCFF0028F3D1BDF80810082901D00320B1\n:10169000EDE7BDF800102180BDF802106180BDF8B3\n:1016A0000410A180BDF80610E180E0E701B582B02A\n:1016B0000220ADF80000494802AB6A46408800218C\n:1016C00006F068FDBDF80010022900D003200EBD11\n:1016D0001CB5002100910221ADF800100190FFF728\n:1016E000DEFD08B110201CBD3C486A4641884FF61B\n:1016F000FF7006F092FFBDF800100229F3D003201E\n:101700001CBDFEB5354C06461546207A0F46C0076F\n:1017100005D00846FFF79DFD18B11020FEBD0F2033\n:10172000FEBDF82D01D90C20FEBD3046FFF791FD1E\n:1017300018BB208801A905F03AFE0028F4D13078C2\n:101740008DF80500208801A906F003FD0028EBD1E3\n:1017500000909DF800009DF8051040F002008DF803\n:101760000000090703D040F008008DF80000208831\n:10177000694606F08BFC0028D6D1ADF808502088C9\n:101780003B4602AA002106F005FDBDF80810A9425B\n:10179000CAD00320FEBD7CB5054600200090019014\n:1017A0000888ADF800000C4628460195FFF795FD26\n:1017B00018B92046FFF773FD08B110207CBD15B1A4\n:1017C000BDF8000060B105486A4601884FF6FF7019\n:1017D00006F023FFBDF8001021807CBD240200200C\n:1017E0000C20FAE72F48C088002800D0012070475D\n:1017F00030B5044693B000200D46014600901422F7\n:1018000001A80CF044FE1C22002108A80CF03FFEA9\n:101810009DF80000CDF808D020F00F00401C20F00B\n:10182000F00010308DF800009DF8010006AA20F0AD\n:10183000FF008DF801009DF8200001A940F0020092\n:101840008DF8200001208DF8460042F60420ADF806\n:10185000440011A801902088ADF83C006088ADF8E4\n:101860003E00A088ADF84000E088ADF842009DF849\n:10187000020020F00600801C20F001008DF802001C\n:101880000820ADF80C00ADF810000FA8059008A8CE\n:1018900006F0A3F8002803D1BDF818002880002026\n:1018A00013B030BD24020020F0B5007B059F1E461A\n:1018B00014460D46012800D0FFDF0C2030803A206E\n:1018C0003880002C08D0287A032806D0287B0128ED\n:1018D00000D0FFDF17206081F0BDA889FBE72DE96C\n:1018E000F0470D4686B095F80C900E991446B9F164\n:1018F000010F0BD01022007B2E8A9046052807D0BE\n:10190000062839D0FFDF06B0BDE8F0870222F2E7F3\n:10191000E8890C2200EB400002EB400018803320E5\n:101920000880002CEFD0E8896081002720E0009635\n:10193000688808F1020301AA696900F097FF06EBC5\n:101940000800801C07EB470186B204EB4102BDF89A\n:1019500004009081F848007808B1012300E00023DA\n:101960000DF1060140460E3214F029F87F1CBFB27B\n:101970006089B842DBD8C6E734200880E889B9F12D\n:10198000010F11D0122148430E301880002CBAD01C\n:10199000E88960814846B9F1010F00D00220207328\n:1019A00000270DF1040A1FE00621ECE70096688885\n:1019B00008F1020301AA696900F058FF06EB08006C\n:1019C000801C86B2B9F1010F12D007EBC70004EBFF\n:1019D0004000BDF80410C18110220AF1020110304C\n:1019E0000CF02BFD7F1CBFB26089B842DED88AE7BD\n:1019F00007EB470104EB4102BDF80400D0810AF176\n:101A000002014046103213F0FCFFEBE72DE9F047EE\n:101A10000E4688B090F80CC096F80C80378AF5898D\n:101A20000C20DFF81493109902F10C04BCF1030FA1\n:101A300008D0BCF1040F3DD0BCF1070F75D0FFDF1B\n:101A400008B061E705EB850C00EB4C0018803120F5\n:101A50000880002AF4D0A8F1060000F0FF0A5581A2\n:101A600024E01622002101A80CF011FD00977088D7\n:101A7000434601AA716900F0F9FEBDF80400208018\n:101A8000BDF80600E080BDF80800208199F800004C\n:101A900008B1012300E00023A21C0DF10A01504609\n:101AA00013F08DFF07EB080087B20A346D1EADB24C\n:101AB000D7D2C5E705EB850C00EB4C00188032202F\n:101AC0000880002ABCD0A8F1050000F0FF0A55816B\n:101AD00037E000977088434601AA716900F0C6FE9E\n:101AE0009DF80600BDF80410E1802179420860F3FA\n:101AF000000162F34101820862F38201C20862F3CD\n:101B0000C301020962F30411420962F3451182091B\n:101B100062F386112171C0096071BDF80700208150\n:101B200099F8000010B1012301E00EE000232246E5\n:101B30000DF10901504613F042FF07EB080087B290\n:101B40000A346D1EADB2C4D27AE7A8F1020084B2A5\n:101B500005FB08FC0CF10E00188035200880002AD7\n:101B6000A7D05581948100971FFA8CF370880E32AC\n:101B7000716900F07BFE63E72DE9F84F1E460A9D70\n:101B80000C4681462AB1607A00F58070D080E089E9\n:101B9000108199F80C000C274FF000084FF00E0A46\n:101BA0000D2872D2DFE800F09D070E1B272F374566\n:101BB000546972727200214648460095FFF774FE20\n:101BC000BDE8F88F207B9146082802D0032800D07A\n:101BD000FFDF3780302009E0A9F80A80F0E7207B9A\n:101BE0009146042800D0FFDF378031202880B9F1EA\n:101BF000000FF1D1E4E7207B9146042800D0FFDFFD\n:101C000037803220F2E7207B9146022800D0FFDFA8\n:101C100037803320EAE7207B1746022800D0FFDF19\n:101C20003420A6F800A02880002FC9D0A7F80A8089\n:101C3000C6E7207B1746042800D0FFDF3520A6F832\n:101C400000A02880002FBBD04046A7F80A8012E0F1\n:101C5000207B1746052802D0062800D0FFDF102081\n:101C6000308036202880002FAAD0E0897881A7F81C\n:101C70000E80B9F80E00B881A2E7207B91460728B4\n:101C800000D0FFDF37803720B0E72AE04FF01200A6\n:101C900018804FF038001700288091D0E0897881B3\n:101CA000A7F80E80A7F8108099F80C000A2805D034\n:101CB0000B2809D00C280DD0FFDF81E7207B0A28F4\n:101CC00000D0FFDF01200AE0207B0B2800D0FFDFDF\n:101CD000042004E0207B0C2800D0FFDF05203873AF\n:101CE0006EE7FFDF6CE770B50C46054601F0AAFB16\n:101CF00020B10078222804D2082070BD43F20200EF\n:101D000070BD0521284612F0D1F8206008B10020EE\n:101D100070BD032070BD30B44880087820F00F00FB\n:101D2000C01C20F0F000903001F8080B1DCA81E8BB\n:101D30001D0030BC07F05DBC100000202DE9FF47FE\n:101D400084B0002782460297079890468946123051\n:101D50000AF069FA401D20F00306079828B907A980\n:101D60005046FFF7C0FF002854D1B9F1000F05D04D\n:101D70000798017B19BB052504681BE098F8000053\n:101D8000092803D00D2812D0FFDF46E0079903256C\n:101D90004868B0B3497B42887143914239D98AB2CD\n:101DA000B3B2011D11F0F5FE0446078002E0079C66\n:101DB000042508340CB1208810B1032D29D02CE063\n:101DC0000798012112300AF060FAADF80C000246C3\n:101DD00002AB2946504608F0B8FA070001D1A01C12\n:101DE000029007983A461230C8F80400A8F802A0FA\n:101DF00003A94046029B0AF055FAD8B10A2817D227\n:101E000000E006E0DFE800F007091414100B0D14E1\n:101E10001412132014E6002012E6112010E6082008\n:101E20000EE643F203000BE6072009E60D2007E665\n:101E3000032005E6BDF80C002346CDE900702A46D4\n:101E40005046079900F022FD57B9032D08D1079895\n:101E5000B3B2417B406871438AB2011D11F0ADFEFF\n:101E6000B9F1000FD7D0079981F80C90D3E72DE98D\n:101E7000FE4F91461A881C468A468046FAB102AB4C\n:101E8000494608F062FA050019D04046A61C27888A\n:101E900012F04FF93246072629463B46009611F0CC\n:101EA0005EFD20882346CDE900504A465146404613\n:101EB00000F0ECFC002020800120BDE8FE8F002017\n:101EC000FBE710B586B01C46AAB104238DF800309C\n:101ED0001388ADF808305288ADF80A208A788DF85A\n:101EE0000E200988ADF80C1000236A462146FFF742\n:101EF00025FF06B010BD1020FBE770B50D4605218B\n:101F000011F0D4FF040000D1FFDF294604F11200D4\n:101F1000BDE870400AF0A2B92DE9F8430D468046AD\n:101F2000002607F063FB04462878102878D2DFE803\n:101F300000F0773B345331311231313108313131D6\n:101F400031312879001FC0B2022801D0102810D1E9\n:101F500014BBFFDF35E004B9FFDF0521404611F077\n:101F6000A5FF007B032806D004280BD0072828D023\n:101F7000FFDF072655E02879801FC0B2022820D055\n:101F800050B1F6E72879401FC0B2022819D01028B6\n:101F900017D0EEE704B9FFDF13E004B9FFDF2879BB\n:101FA00001280ED1172137E00521404611F07EFFB0\n:101FB000070000D1FFDF07F1120140460AF02BF9BC\n:101FC0002CB12A4621464046FFF7A5FE29E0132101\n:101FD000404602F01FFD24E004B9FFDF0521404622\n:101FE00011F064FF060000D1FFDF694606F1120020\n:101FF0000AF01BF9060000D0FFDFA988172901D2DB\n:10200000172200E00A46BDF80000824202D90146CC\n:1020100002E005E01729C5D3404600F047FCD0E7B1\n:10202000FFDF3046BDE8F883401D20F0030219B100\n:1020300002FB01F0001D00E000201044704713B5C2\n:10204000009858B10024684611F04DFD002C04D1D1\n:10205000F749009A4A6000220A701CBD0124002042\n:10206000F2E72DE9F0470C461546242200212046D0\n:102070000CF00DFA05B9FFDFA87860732888DFF847\n:10208000B0A3401D20F00301AF788946DAF80400C0\n:1020900011F047FD060000D1FFDF4FF00008266079\n:1020A000A6F8008077B109FB07F1091D0AD0DAF81C\n:1020B000040011F036FD060000D1FFDF6660C6F8AF\n:1020C000008001E0C4F80480298804F11200BDE812\n:1020D000F0470AF091B82DE9F047804601F112006F\n:1020E0000D4681460AF09FF8401DD14F20F00302B3\n:1020F0006E7B14462968786811F03EFD3EB104FB02\n:1021000006F2121D03D06968786811F035FD0520CC\n:1021100011F074FE0446052011F078FE201A012803\n:1021200002D1786811F0F2FC49464046BDE8F0471C\n:102130000AF078B870B50546052111F0B7FE040025\n:1021400000D1FFDF04F112012846BDE870400AF01B\n:1021500062B82DE9F04F91B04FF0000BADF828B008\n:10216000ADF804B047880C4605469246052138462E\n:1021700011F09CFE060000D1FFDF24B1A780A4F877\n:1021800006B0A4F808B0297809220B20B2EB111F81\n:1021900073D12A7A04F1100138274FF00C084FF060\n:1021A00012090291102A69D2DFE802F068F2F1F018\n:1021B0008008D3898EA03DDCF3EEB7B7307B0228D0\n:1021C00000D0FFDFA88908EBC001ADF80410302172\n:1021D000ADF82810002C25D06081B5F80E800027BE\n:1021E0001DE004EBC709317C89F80E10F189A9F8CC\n:1021F0000C10CDF800806888042305AA296900F036\n:1022000035FBBDF81410A9F8101008F10400BDF852\n:1022100016107F1C1FFA80F8A9F81210BFB260894F\n:10222000B842DED80CE1307B022800D0FFDFE9891C\n:1022300008EBC100ADF804003020ADF8280095F897\n:102240000C90002CA9F10400C0B20F90EAD061817B\n:10225000B5F81080002725E0CDF8008068884B464F\n:1022600003AA696900F002FB08EB09001FFA80F875\n:102270006F48007818B1012302E0DDE0DAE00023C6\n:1022800004EBC702009204A90C320F9813F097FBDD\n:10229000009ABDF80C007F1C1082009ABDF80E0059\n:1022A000BFB250826089B842D6D8C9E00AA800906F\n:1022B00001AB224629463046FFF711FBC0E0307BD8\n:1022C000082805D0FFDF03E0307B082800D0FFDFBF\n:1022D000E8891030ADF804003620ADF82800002C55\n:1022E0003FD0A9896181F189A18127E0307B09284C\n:1022F00000D0FFDFA88901460C30ADF8040037207C\n:10230000ADF82800002C2CD06181E8890090AB89C1\n:10231000688804F10C02296955E0E88939211030F8\n:1023200080B2ADF80400ADF82810002C72D0A98955\n:102330006181287A0E280AD002212173E989E1817E\n:10234000288A0090EB8968886969029A3BE001213C\n:10235000F3E70AA8009001AB224629463046FFF772\n:1023600055FB6DE0307B0A2800D0FFDFADF804900C\n:10237000ADF828704CB3A9896181A4F810B0A4F815\n:102380000EB0012020735BE020E002E030E038E096\n:1023900041E0307B0B2800D0FFDF288AADF82870A1\n:1023A0001230ADF8040084B104212173A989618140\n:1023B000E989E181298A2182688A00902B8A6888CC\n:1023C00004F11202696900F051FA39E0307B0C28FF\n:1023D00000D0FFDFADF80490ADF828703CB30521C4\n:1023E0002173A4F80AB0A4F80EB0A4F810B027E046\n:1023F0000AA8009001AB224629463046FFF754FA5E\n:102400001EE00AA8009001AB224629463046FFF79D\n:10241000B3FB15E034E03B21ADF80400ADF8281023\n:1024200074B30120E080A4F808B084F80AB007E093\n:1024300010000020FFDF03E0297A012917D0FFDF19\n:10244000BDF80400AAF800006CB1BDF82800208097\n:10245000BDF804006080BDF82800392803D03C286E\n:1024600001D086F80CB011B00020BDE8F08F3C21FF\n:10247000ADF80400ADF8281014B1697AA172DFE755\n:10248000AAF80000EFE72DE9F84356880F4680468A\n:1024900015460521304611F009FD040000D1FFDF8B\n:1024A000123400943B46414630466A680AF02EF8E2\n:1024B000B8E570B50D46052111F0F8FC040000D117\n:1024C000FFDF294604F11200BDE8704009F0B8BEF4\n:1024D00070B50D46052111F0E9FC040000D1FFDFC5\n:1024E000294604F11200BDE8704009F0D6BE70B56F\n:1024F0000546052111F0DAFC040000D1FFDF04F1EC\n:10250000080321462846BDE870400422AFE470B5B8\n:102510000546052111F0CAFC040000D1FFDF214669\n:1025200028462368BDE870400522A0E470B5064641\n:10253000052111F0BBFC040000D1FFDF04F1120003\n:1025400009F071FE401D20F0030511E0011D008817\n:102550000322431821463046FFF789FC00280BD0A0\n:10256000607BABB2684382B26068011D11F05BFB17\n:10257000606841880029E9D170BD70B50E460546F6\n:1025800007F034F8040000D1FFDF012020726672EA\n:102590006580207820F00F00C01C20F0F000303063\n:1025A0002070BDE8704007F024B8602801D00720F3\n:1025B00070470878C54900F0010008700020704796\n:1025C0002DE9F0438BB00D461446814606A9FFF76E\n:1025D0008AFB002814D14FF6FF7601274FF42058CC\n:1025E0008CB103208DF800001020ADF8100007A872\n:1025F000059007AA204604A913F005FA78B1072030\n:102600000BB0BDE8F0830820ADF808508DF80E70CF\n:102610008DF80000ADF80A60ADF80C800CE006986B\n:10262000A17801742188C1818DF80E70ADF8085031\n:10263000ADF80C80ADF80A606A4602214846069B58\n:10264000FFF77CFBDCE708B501228DF8022042F69B\n:102650000202ADF800200A4603236946FFF731FC69\n:1026600008BD08B501228DF8022042F60302ADF83C\n:1026700000200A4604236946FFF723FC08BD00B585\n:1026800087B079B102228DF800200A88ADF80820C1\n:102690004988ADF80A1000236A460521FFF74EFB72\n:1026A00007B000BD1020FBE709B1072309E40720AC\n:1026B000704770B588B00D461446064606A9FFF768\n:1026C00012FB00280ED17CB10620ADF808508DF821\n:1026D0000000ADF80A40069B6A460821DC813046BE\n:1026E000FFF72CFB08B070BD05208DF80000ADF899\n:1026F0000850F0E700B587B059B107238DF80030D6\n:10270000ADF80820039100236A460921FFF716FB64\n:10271000C6E71020C4E770B588B00C460646002511\n:1027200006A9FFF7E0FA0028DCD106980121123053\n:1027300009F0ABFD9CB12178062921D2DFE801F038\n:10274000200505160318801E80B2C01EE28880B2E4\n:102750000AB1A3681BB1824203D90C20C2E7102042\n:10276000C0E7042904D0A08850B901E00620B9E7E9\n:10277000012913D0022905D004291CD005292AD00B\n:102780000720AFE709208DF800006088ADF8080049\n:10279000E088ADF80A00A068039023E00A208DF8D5\n:1027A00000006088ADF80800E088ADF80A00A06875\n:1027B0000A25039016E00B208DF800006088ADF824\n:1027C0000800A088ADF80A00E088ADF80C00A06809\n:1027D0000B25049006E00C208DF8000060788DF841\n:1027E00008000C256A4629463046069BFFF7A6FAE4\n:1027F00078E700B587B00D228DF80020ADF80810FD\n:1028000000236A461946FFF799FA49E700B587B0F1\n:1028100071B102228DF800200A88ADF8082049889D\n:10282000ADF80A1000236A460621FFF787FA37E75A\n:10283000102035E770B586B0064601200D46ADF88C\n:1028400008108DF80000014600236A463046FFF765\n:1028500075FA040008D12946304605F0B5FC002180\n:10286000304605F0CFFC204606B070BDF8B51C46DA\n:1028700015460E46069F11F04AFC2346FF1DBCB2CA\n:1028800031462A46009411F036F8F8BD30B41146AE\n:10289000DDE902423CB1032903D0002330BC08F03B\n:1028A00032BE0123FAE71A8030BC704770B50C467F\n:1028B0000546FFF722FB2146284605F094FC2846F2\n:1028C000BDE87040012105F09DBC00001000002013\n:1028D0004FF0E0224FF400400021C2F88001BFF326\n:1028E0004F8FBFF36F8F1748016001601649900248\n:1028F00008607047134900B500220A600A60124B55\n:102900004FF060721A60002808BF00BD0F4A104BDC\n:10291000DFF840C001280CD002281CBFFFDF00BD3B\n:10292000032008601A604FF4000000BFCCF80000DC\n:1029300000BD022008601A604FF04070F6E700B555\n:10294000FFDF00BD00F5004008F50140A4020020B3\n:1029500014F5004004F5014070B50B2000F0BDF9FE\n:10296000082000F0BAF900210B2000F0D4F9002172\n:10297000082000F0D0F9F44C01256560A560002026\n:10298000C4F84001C4F84401C4F848010B2000F029\n:10299000B5F9082000F0B2F90B2000F091F925609C\n:1029A00070BD10B50B2000F098F9082000F095F9E3\n:1029B000E548012141608160E4490A68002AFCD1B0\n:1029C0000021C0F84011C0F84411C0F848110B2094\n:1029D00000F094F9BDE81040082000F08FB910B560\n:1029E0000B2000F08BF9BDE81040082000F086B9FC\n:1029F00000B530B1012806D0022806D0FFDF002044\n:102A000000BDD34800BDD34800BDD248001D00BD65\n:102A100070B5D1494FF000400860D04DC00BC5F8EB\n:102A20000803CF4800240460C5F840410820C4359D\n:102A300000F053F9C5F83C41CA48047070BD08B5B0\n:102A4000C14A002128B1012811D002281CD0FFDF83\n:102A500008BD4FF48030C2F80803C2F84803BB48F1\n:102A60003C300160C2F84011BDE80840D0E74FF4A7\n:102A70000030C2F80803C2F84803B448403001608F\n:102A8000C2F84411B3480CE04FF48020C2F80803A8\n:102A9000C2F84803AD4844300160C2F84811AD485F\n:102AA000001D0068009008BD70B516460D4604462E\n:102AB000022800D9FFDF0022A348012304F11001FE\n:102AC0008B4000EB8401C1F8405526B1C1F840218C\n:102AD000C0F8043303E0C0F80833C1F84021C0F85F\n:102AE000443370BD2DE9F0411D46144630B1012834\n:102AF00033D0022838D0FFDFBDE8F081891E0022E4\n:102B000021F07F411046FFF7CFFF012D23D0002099\n:102B1000944D924F012668703E61914900203C39E6\n:102B200008600220091D08608D49042030390860C2\n:102B30008B483D34046008206C6000F0DFF83004FE\n:102B4000C7F80403082000F0BBF88349F007091F09\n:102B500008602E70D0E70120DAE7012B02D00022B6\n:102B6000012005E00122FBE7012B04D00022022016\n:102B7000BDE8F04198E70122F9E774480068704722\n:102B800070B500F0D8F8704C0546D4F84001002626\n:102B9000012809D1D4F80803C00305D54FF48030CB\n:102BA000C4F80803C4F84061D4F8440101280CD1EA\n:102BB000D4F80803800308D54FF40030C4F80803A4\n:102BC000C4F84461012013F0EEFED4F84801012856\n:102BD0000CD1D4F80803400308D54FF48020C4F882\n:102BE0000803C4F84861022013F0DDFE5E4805606A\n:102BF00070BD70B500F09FF85A4D0446287850B16A\n:102C0000FFF706FF687818B10020687013F0CBFE5C\n:102C10005548046070BD0320F8E74FF0E0214FF401\n:102C20000010C1F800027047152000F067B84B494A\n:102C300001200861082000F061B848494FF47C1079\n:102C4000C1F808030020024601EB8003C3F84025C9\n:102C5000C3F84021401CC0B20628F5D37047410A92\n:102C600043F609525143C0F3080010FB02F000F58F\n:102C7000807001EB5020704710B5430B48F2376469\n:102C800063431B0C5C020C60384C03FB0400384BA4\n:102C90004CF2F72443435B0D13FB04F404EB402098\n:102CA00000F580704012107008681844086010BD6C\n:102CB0002C484068704729490120C1F8000270473C\n:102CC000002809DB00F01F0201219140400980002B\n:102CD00000F1E020C0F80011704700280DDB00F083\n:102CE0001F02012191404009800000F1E020C0F85E\n:102CF0008011BFF34F8FBFF36F8F7047002809DB40\n:102D000000F01F02012191404009800000F1E02005\n:102D1000C0F8801270474907090E002804DB00F153\n:102D2000E02080F80014704700F00F0000F1E02070\n:102D300080F8141D70470C48001F00680A4A0D49AE\n:102D4000121D11607047000000B0004004B5004043\n:102D50004081004044B1004008F50140008000403F\n:102D6000408500403C00002014050240F7C2FFFFF0\n:102D70006F0C0100010000010A4810B50468094900\n:102D800009480831086013F0A2FE0648001D0460DF\n:102D900010BD0649002008604FF0E0210220C1F874\n:102DA000800270471005024001000001FC1F004036\n:102DB000374901200860704770B50D2000F049F8D0\n:102DC000344C0020C4F800010125C4F804530D2040\n:102DD00000F050F825604FF0E0216014C1F80001C8\n:102DE00070BD10B50D2000F034F82A480121416073\n:102DF0000021C0F80011BDE810400D2000F03AB8E5\n:102E0000254810B504682449244808310860214940\n:102E1000D1F80001012804D0FFDF1F48001D046025\n:102E200010BD1B48001D00680022C0B2C1F800217F\n:102E300014F07FFBF1E710B5164800BFD0F8001181\n:102E40000029FBD0FFF7DCFFBDE810400D2000F0AB\n:102E500011B800280DDB00F01F020121914040094C\n:102E6000800000F1E020C0F88011BFF34F8FBFF366\n:102E70006F8F7047002809DB00F01F02012191408D\n:102E80004009800000F1E020C0F880127047000087\n:102E900004D5004000D000401005024001000001B0\n:102EA0004FF0E0214FF00070C1F8800101F5C071D2\n:102EB000BFF34F8FBFF36F8FC1F80001394B8022F2\n:102EC00083F8002441F8800C704700B502460420C6\n:102ED000354903E001EBC0031B792BB1401EC0B2A2\n:102EE000F8D2FFDFFF2000BD41F8302001EBC00128\n:102EF00000224A718A7101220A7100BD2A4A00210A\n:102F000002EBC0000171704710B50446042800D3DD\n:102F1000FFDF254800EBC4042079012800D0FFDF43\n:102F20006079A179401CC0B2814200D060714FF03D\n:102F3000E0214FF00070C1F8000210BD70B504250B\n:102F4000194E1A4C16E0217806EBC1000279012ACD\n:102F500008D1427983799A4204D04279827156F835\n:102F6000310080472078401CC0B22070042801D373\n:102F7000002020706D1EEDB2E5D270BD0C4810B57A\n:102F800004680B490B4808310860064890F80004B3\n:102F90004009042800D0FFDFFFF7D0FF0448001DE0\n:102FA000046010BD19E000E0E0050020580000209A\n:102FB00010050240010000010548064A01689142DF\n:102FC00001D1002101600449012008607047000020\n:102FD0005C000020BEBAFECA40E5014070B50C4658\n:102FE000054609F02FFC21462846BDE870400AF04E\n:102FF00010BD7047704770470021016081807047A5\n:103000002CFFFFFFDBE5B151007002002301FFFF41\n:103010008C00000078DB6A007A2E9AC67DB66CFAC6\n:10302000F35721CCC310D5E51471FB3C30B5FC4DF2\n:103030000446062CA9780ED2DFE804F0030E0E0E2B\n:103040000509FFDF08E0022906D0FFDF04E00329BD\n:1030500002D0FFDF00E0FFDFAC7030BD30B50446CA\n:103060001038EF4D07280CD2DFE800F0040C060CF6\n:103070000C0C0C00FFDF05E0287E112802D0FFDFDA\n:1030800000E0FFDF2C7630BD2DE9F04112F026FE86\n:10309000044614F063F8201AC5B2062010F0AEFE04\n:1030A0000446062010F0B2FE211ADD4C207E1228C4\n:1030B00018D000200F18072010F0A0FE06460720A9\n:1030C00010F0A4FE301A3918207E13280CD00020EE\n:1030D0000144A078042809D000200844281AC0B26E\n:1030E000BDE8F0810120E5E70120F1E70120F4E7E8\n:1030F000CB4810B590F825004108C94800F12600DA\n:1031000005D00EF0F5FEBDE8104006F08CB80EF0CC\n:10311000D0FEF8E730B50446A1F120000D460A289C\n:103120004AD2DFE800F005070C1C2328353A3F445B\n:10313000FFDF42E0207820283FD1FFDF3DE0B848A4\n:103140008178052939D0007E122836D020782428AD\n:1031500033D0252831D023282FD0FFDF2DE0207851\n:1031600022282AD0232828D8FFDF26E0207822280A\n:1031700023D0FFDF21E0207822281ED024281CD075\n:1031800026281AD0272818D0292816D0FFDF14E0C7\n:103190002078252811D0FFDF0FE0207825280CD0DB\n:1031A000FFDF0AE02078252807D0FFDF05E0207840\n:1031B000282802D0FFDF00E0FFDF257030BD1FB5FB\n:1031C00004466A46002001F0A5FEB4B1BDF8022015\n:1031D0004FF6FF700621824201D1ADF80210BDF812\n:1031E0000420824201D1ADF80410BDF808108142DC\n:1031F00003D14FF44860ADF8080068460FF0E2FADA\n:1032000006F011F804B010BD70B516460C46054620\n:10321000FEF71FF848B90CB1B44208D90C2070BDB4\n:1032200055F82400FEF715F808B1102070BD2046AF\n:10323000641EE4B2F4D270BD2DE9F04105461F468C\n:1032400090460E4600240068FEF750F830B9A98871\n:1032500028680844401EFEF749F808B110203FE7EF\n:1032600028680028A88802D0B84202D850E0002878\n:10327000F5D0092034E72968085DB8B1671CCA5D3C\n:10328000152A2ED03CDC152A3AD2DFE802F039129A\n:10329000222228282A2A313139393939393939391C\n:1032A00039392200085D30BB641CA4B2A242F9D8AF\n:1032B00033E00228DDD1A01C085C88F80000072854\n:1032C00001D2400701D40A200AE7307840F001001B\n:1032D00015E0C143C90707E0012807D010E0062028\n:1032E000FEE60107A1F180510029F5D01846F7E666\n:1032F0003078810701D50B20F2E640F002003070F3\n:103300002868005D384484B2A888A04202D2B0E7A1\n:103310004FF4485382B2A242ADD80020E0E610B587\n:10332000027843F2022354080122022C12D003DC5B\n:103330003CB1012C16D106E0032C10D07F2C11D10A\n:1033400012E0002011E080790324B4EB901F09D132\n:103350000A700BE08079B2EB901F03D1F8E7807917\n:103360008009F5D0184610BDFF200870002010BD60\n:1033700008B500208DF80000294890F82E1051B1B2\n:1033800090F82F0002280FD003280FD0FFDF00BFD6\n:103390009DF8000008BD22486946253001F009FE6D\n:1033A0000028F5D0FFDFF3E7032000E001208DF8CF\n:1033B0000000EDE738B50C460546694601F0F9FD19\n:1033C00000280DD19DF80010207861F3470020708F\n:1033D00055F8010FC4F80100A888A4F805000020E2\n:1033E00038BD38B5137888B102280FD0FF281BD01C\n:1033F0000CA46D46246800944C7905EB9414247851\n:1034000064F347031370032805D010E023F0FE0394\n:1034100013700228F7D1D8B240F001000AE0000092\n:10342000F00100200302FF0143F0FE00107010784D\n:1034300020F0010010700868C2F801008888A2F826\n:10344000050038BD022110F031BD38B50C460978B1\n:10345000222901D2082038BDADF800008DF80220E5\n:1034600068460EF087FD05F0DEFE050003D1212140\n:103470002046FFF74FFE284638BD1CB500208DF8CA\n:103480000000CDF80100ADF80500FB4890F82E00D3\n:10349000022801D0012000E000208DF807006846D6\n:1034A0000EF0F0FD002800D0FFDF1CBD00220A80D6\n:1034B000437892B263F3451222F040020A8000780A\n:1034C0000C282BD2DFE800F02A06090E1116191C71\n:1034D0001F220C2742F0110009E042F01D00088075\n:1034E0000020704742F0110012E042F0100040F05E\n:1034F0000200F4E742F01000F1E742F00100EEE7CD\n:1035000042F0010004E042F00200E8E742F002006D\n:1035100040F00400E3E742F00400E0E707207047D2\n:103520002DE9FF478AB00025BDF82C6082461C4675\n:1035300091468DF81C50700703D56068FDF789FE31\n:1035400068B9CD4F4FF0010897F82E0058B197F8A1\n:103550002F00022807D16068FDF7C8FE18B11020BF\n:103560000EB0BDE8F087300702D5A08980283DD88D\n:10357000700705D4B9F1000F02D097F8240098B372\n:10358000E07DC0F300108DF81B00627D0720032151\n:103590005AB3012A2CD0022AE2D0042AE0D18DF8B5\n:1035A0001710F00627D4A27D072022B3012A22D0CB\n:1035B000022A23D0042AD3D18DF819108DF8159042\n:1035C000606810B307A9FFF7AAFE0028C8D19DF8CC\n:1035D0001C00FF2816D0606850F8011FCDF80F10AE\n:1035E0008088ADF8130014E000E001E00720B7E7A1\n:1035F0008DF81780D5E78DF81980DFE702208DF868\n:103600001900DBE743F20220AAE7CDF80F50ADF82E\n:103610001350E07B40B9207C30B9607C20B9A07C9D\n:1036200010B9E07CC00601D0062099E78DF800A013\n:10363000BDF82C00ADF80200A0680190A0680290CF\n:1036400004F10F0001F0A9FC8DF80C00FFF790FECB\n:103650008DF80D009DF81C008DF80E008DF81650A9\n:103660008DF81850E07D08A900F00F008DF81A00C1\n:1036700068460FF0E3F905F0D6FD71E7F0B58FB0BD\n:1036800000258DF830508DF814508DF834500646D2\n:103690008DF82850019502950395049519B10FC92D\n:1036A00001AC84E80F00744CA078052801D00428F0\n:1036B0000CD101986168884200D120B90398E16873\n:1036C000884203D110B108200FB0F0BD207DC006A4\n:1036D00001D51F2700E0FF273B460DAA05A903A837\n:1036E000FFF7AAFD0028EFD1A08AC10702D0C006CB\n:1036F00000D4EE273B460AAA0CA901A8FFF79CFDBF\n:103700000028E1D19DF81400C00701D00A20DBE7B2\n:10371000A08A410708D4A17D31B19DF828108907FE\n:1037200002D043F20120CFE79DF82810C90709D045\n:10373000400707D4208818B144F25061884201D96B\n:103740000720C1E78DF818508DF81960BDF8080002\n:10375000ADF81A000198079006A80FF07BF905F064\n:1037600062FD0028B0D18DF820508DF82160BDF8A1\n:103770001000ADF822000398099008A80FF08CF90A\n:1037800005F051FD00289FD101AD241D95E80F00E3\n:1037900084E80F00002097E770B586B00D4604005E\n:1037A00005D0FDF7A3FD20B1102006B070BD0820A4\n:1037B000FBE72078C107A98802D0FF2902D303E0E4\n:1037C0001F2901D20920F0E7800763D4FFF75CFCD2\n:1037D00038B12178C1F3C100012804D0032802D0F8\n:1037E00005E01320E1E7244890F82400C8B1C80799\n:1037F0004FF001064FF0000502D08DF80F6001E098\n:103800008DF80F50FFF7B4FD8DF800002078694661\n:10381000C0F3C1008DF8010060788DF80250C20835\n:1038200001D00720C1E730B3C20701D08DF8026094\n:10383000820705D59DF8022042F002028DF8022091\n:10384000400705D59DF8020040F004008DF8020005\n:10385000002022780B18C2F38002DA7001EB4002DC\n:103860006388D380401CA388C0B253810228F0D360\n:10387000207A78B905E001E0F00100208DF80260BF\n:10388000E6E7607A30B9A07A20B9E07A10B9207BF7\n:10389000C00601D0062088E704F1080001F07DFB96\n:1038A0008DF80E0068460EF0F6FC05F0BCFC002812\n:1038B00089D18DF810608DF81150E088ADF81200B4\n:1038C000ADF8145004A80EF039FD05F0ACFC00284A\n:1038D00088D12078C00701D0152000E01320FFF721\n:1038E000BDFB002061E72DE9FF470220FD4E8DF86A\n:1038F00004000027708EADF80600B84643F20209B6\n:103900004CE001A810F039FA050006D0708EA8B37B\n:10391000A6F83280ADF806803EE0039CA07F010748\n:103920002DD504F124000090A28EBDF80800214698\n:1039300004F1360301F0BCFC050005D04D452AD04A\n:10394000112D3CD0FFDF3AE0A07F20F00801E07F9E\n:10395000420862F3C711A177810861F30000E077A4\n:1039600094F8210000F01F0084F820002078282817\n:1039700026D129212046FFF7CDFB21E014E04007A6\n:103980000AD5BDF8080004F10E0101F01CFB05008A\n:103990000DD04D4510D100257F1CFFB2022010F044\n:1039A0002DFA401CB842ACD8052D11D008E0A07FFC\n:1039B00020F00400A07703E0112D00D0FFDF0025E8\n:1039C000BDF806007086052D04D0284604B0C8E571\n:1039D000A6F832800020F9E770B50646FFF732FD01\n:1039E000054605F003FE040000D1FFDF6680207865\n:1039F00020F00F00801C20F0F00020302070032009\n:103A0000207295F83E006072BDE8704005F0F1BD8F\n:103A10002DE9F04786B0040000D1FFDF2078B14DDA\n:103A200020F00F00801C20F0F000703020706068E3\n:103A30000178491F1B2933D2DFE801F0FE32323210\n:103A400055FD320EFDFD42FC32323278FCFCFBFAB1\n:103A500032FCFCF9F8FCFC00C6883046FFF7F2FCAB\n:103A60000546304607F045FCE0B16068007A85F80D\n:103A70003E0021212846FFF74DFB3046FEF75AFB5A\n:103A8000304603F0D7FE3146012014F017F8A87F26\n:103A900020F01000A877FFF726FF002800D0FFDFF6\n:103AA00006B05EE5207820F0F00020302070032082\n:103AB000207266806068007A607205F09AFDD8E72F\n:103AC000C5882846FFF7BEFC00B9FFDF60680079B3\n:103AD000012800D0FFDF6068017A06B02846BDE803\n:103AE000F04707F0EBBDC6883046FFF7ABFC05009A\n:103AF00000D1FFDF05F07DFD606831460089288137\n:103B000060684089688160688089A881012013F01D\n:103B1000D5FF0020A875A87F00F003000228BFD1C0\n:103B2000FFF7E1FE0028BBD0FFDFB9E7007928B13D\n:103B30000228B5D03C28B3D0FFDFB1E705F059FD2E\n:103B40006668B6F806A0307A361D012806D0687E71\n:103B5000814605F0D4FA070003D101E0E878F7E7E1\n:103B6000FFDF00220221504610F097F9040000D137\n:103B7000FFDF22212046FFF7CDFA3079012800D05F\n:103B80000220A17F804668F30101A177308B20815C\n:103B9000708B6081B08BA08184F822908DF80880B2\n:103BA000B8680090F86801906A460321504610F00A\n:103BB00074F900B9FFDFB888ADF81000B8788DF857\n:103BC000120004AA0521504610F067F900B9FFDF82\n:103BD000B888ADF80C00F8788DF80E0003AA04211F\n:103BE000504610F05AF900B9FFDF062106F1120025\n:103BF0000DF00EF940B37079800700D5FFDF7179C1\n:103C0000E07D61F34700E075D6F80600A061708999\n:103C1000A083062106F10C000DF0FAF8F0B195F83A\n:103C200025004108607861F3470006E041E039E093\n:103C300071E059E04EE02FE043E06070D5F82600D7\n:103C4000C4F80200688D12E0E07D20F0FE00801CC8\n:103C5000E075D6F81200A061F08AD9E7607820F00C\n:103C6000FE00801C6070F068C4F80200308AE080BA\n:103C7000B8F1010F04D0B8F1020F05D0FFDF0FE754\n:103C80000320FFF7D3F90BE7287E122800D0FFDFCF\n:103C90001120FFF7E3F903E706B02046BDE8F0473F\n:103CA00001F092BD05F0A5FC15F8300F40F00200C0\n:103CB00005E005F09EFC15F8300F40F00400287078\n:103CC000EEE6287E13280AD01528D8D15FF016001A\n:103CD000FFF7C4F906B0BDE8F04705F08ABC142030\n:103CE000F6E70000F0010020A978052909D0042991\n:103CF000C5D105F07EFC022006B0BDE8F047FFF715\n:103D000095B900790028BAD0E87801F02DF905F0CE\n:103D100070FC0320F0E7287E122802D1687E01F0B3\n:103D200023F91120D4E72DE9F05F054600784FF024\n:103D300000080009DFF8B8A891460C46464601285D\n:103D40006ED002286DD007280BD00A286AD0FFDF7A\n:103D5000A9F8006014B1A4F8008066800020BDE8D6\n:103D6000F09F6968012704F108000B784FF0020BFF\n:103D70005B1F4FF6FF721B2B7ED2DFE803F0647DE2\n:103D80007D7D0E7D7D7D7D7D7D217D7D7D2BFDFC81\n:103D9000FBFA7D14D2F9E7F8F700C8884FF0120853\n:103DA000102621469AE14FF01C080A26BCB38888E9\n:103DB000A0806868807920726868C0796072C7E7FF\n:103DC0004FF01B08142654B30320207268688088C3\n:103DD000A080BDE70A793C2ABAD00D1D4FF010082B\n:103DE0002C26E4B16988A180298B6182298B2182EC\n:103DF000698BA182A98BE1826B790246A91D1846C5\n:103E0000FFF7EFFA2979002001290CD084F80FB0D0\n:103E1000FF212176E06120626062A06298E70FE0F6\n:103E20003BE15EE199E1E77320760AF1040090E856\n:103E30000E00DAF81000C4E90930C4E9071287E778\n:103E4000A9F800608AE72C264FF01D08002CF7D057\n:103E5000A28005460F1D897B008861F30000288041\n:103E6000B97A490861F341002880B97A890861F379\n:103E700082002880B97A00E00CE1C90861F3C30030\n:103E80002880B97AAA1C0911491C61F3041000F0BA\n:103E90007F0028807878B91CFFF7A3FA387D05F1F8\n:103EA000090207F11501FFF79CFA387B01F0A9F828\n:103EB0002874787B01F0A5F86874F87EA874787A85\n:103EC000E874387F2875B87B6875388AE882DAF834\n:103ED0001C10A961B97A504697F808A0C1F34111A6\n:103EE000012904D0008C504503D2824609E0FFDF4F\n:103EF00010E0022903D0288820F0600009E0504536\n:103F000004D1288820F06000403002E0288840F08A\n:103F100060002880A4F824A0524607F11D01A8697A\n:103F20009BE011264FF02008002C89D0A280686801\n:103F300004F10A02007920726868007B6072696887\n:103F40008B1D48791946FFF74CFA01E70A264FF016\n:103F50002108002CE9D08888A080686880792072C8\n:103F60006868C07960729AF8301006E078E06BE01B\n:103F700052E07FE019E003E03AE021F00401A6E01E\n:103F80000B264FF02208002CCFD0C888A08068688C\n:103F9000007920726868007A01F033F8607268680E\n:103FA000407A01F02EF8A072D2E61C264FF02608C7\n:103FB000002CBAD0A2806868407960726868007A84\n:103FC000A0720AF1040090E80E00DAF81000C4E9CB\n:103FD0000530C4E90312686800793C2803D04328FF\n:103FE00003D0FFDFB4E62772B2E684F808B0AFE68C\n:103FF00010264FF02408002C97D08888A08068688D\n:10400000807920816868807A608168680089A081F1\n:1040100068688089E0819BE610264FF02308002C19\n:1040200098D08888A0806868C088208168680089E6\n:10403000608168684089A08168688089E0819AF819\n:10404000301021F0020142E030264FF02508002C0C\n:104050009AD0A2806968282249680AF0EEF977E6CA\n:104060002A264FF02F08002C8ED0A28069682222C9\n:10407000091DF2E714264FF01B08002C84D0A28003\n:10408000686800790128B0D02772DAE90710C4E91E\n:1040900003105DE64A46214660E0287A012803D0F5\n:1040A000022817D0FFDF53E610264FF01F08002C20\n:1040B000A2D06888A080A8892081E8896081288AA8\n:1040C000A081688AE0819AF8301021F001018AF815\n:1040D00030103DE64FF012081026688800F07EFF91\n:1040E00036E6287AC8B3012838D0022836D003280B\n:1040F00001D0FFDF2CE609264FF01108002C8FD0ED\n:104100006F883846FFF79EF990F822A0A780687A5A\n:104110002072042138460FF0DBFE052138460FF0EF\n:10412000D7FE002138460FF0D3FE012138460FF0AC\n:10413000CFFE032138460FF0CBFE022138460FF0A8\n:10414000C7FE062138460FF0C3FE072138460FF0A0\n:10415000BFFE504600F008FFFAE5FFE72846BDE83D\n:10416000F05F01F0BBBC70B5012803D0052800D07A\n:10417000FFDF70BD8DB22846FFF764F9040000D15F\n:10418000FFDF20782128F4D005F030FA80B10178E3\n:1041900021F00F01891C21F0F00110310170022182\n:1041A000017245800020A075BDE8704005F021BA7D\n:1041B00021462846BDE870401322FFF746B92DE995\n:1041C000F04116460C00804600D1FFDF307820F029\n:1041D0000F00801C20F0F000103030702078012893\n:1041E00004D0022818D0FFDFBDE8F0814046FFF779\n:1041F00029F9050000D1FFDF0320A87505F0F9F9C2\n:1042000094E80F00083686E80F00F94810F8301FD0\n:1042100041F001010170E7E74046FFF713F905009F\n:1042200000D1FFDFA1884FF6FF700027814202D145\n:10423000E288824203D0814201D1E08840B105F09A\n:10424000D8F994E80F00083686E80F00AF75CBE781\n:10425000A87D0128C8D178230022414613F084FBB1\n:104260000220A875C0E738B50C4624285CD008DCCD\n:1042700020280FD0212825D022284BD0232806D152\n:104280004CE0252841D0262832D03F2851D00725A0\n:10429000284638BD0021052013F0E6FB08B11120A7\n:1042A00038BDA01C0EF0E1FA04F0BDFF0500EFD10F\n:1042B000002208231146052013F056FB0528E7D0FD\n:1042C000FFDFE5E76068FDF708F808B1102038BDAA\n:1042D000618820886A460EF071FD04F0A4FF050095\n:1042E000D6D160680028D3D0BDF800100180CFE798\n:1042F000206820B1FCF7FAFF08B11025C8E7204676\n:104300000EF03BFE1DE00546C2E7A17820880EF0C6\n:1043100086FD16E0086801F08DFEF4E7087800F0ED\n:1043200001000DF0B9FD0CE0618820880EF0C1FCA1\n:1043300007E0087800F001008DF8000068460EF0F4\n:10434000DFF804F070FFDEE770B505460C4608465E\n:10435000FCF7A5FF08B1102070BD202D07D0212D3E\n:104360000DD0222D0BD0252D09D0072070BD20881F\n:10437000A11C0DF065FEBDE8704004F054BF06209E\n:1043800070BD9B482530704708B5342200219848FD\n:104390000AF07DF80120FEF749FE1120FEF75EFECF\n:1043A00093496846263105F0B7F891489DF80020FA\n:1043B00010F8251F62F3470121F00101017000216F\n:1043C00041724FF46171A0F8071002218172FEF76B\n:1043D0008FFE00B1FFDFFDF705F801F0BEF908BD63\n:1043E00010B50C464022002120460AF050F8A07F6C\n:1043F00020F00300A077202020700020A07584F812\n:10440000230010BD70472DE9FC410746FCF721FF52\n:1044100010B11020BDE8FC81754E06F12501D6F8DB\n:1044200025000090B6F82950ADF8045096F82B40BE\n:104430008DF806403846FEF7BDFF0028EAD1FEF7AA\n:1044400057FE0028E6D0009946F8251FB580B471C4\n:10445000E0E710B50446FCF722FF08B1102010BDBC\n:1044600063486349224690F8250026314008FEF74C\n:10447000B8FF002010BD3EB504460D460846FCF7C7\n:104480000EFF08B110203EBD14B143F204003EBD42\n:1044900057488078052803D0042801D008203EBD65\n:1044A000694602A80AF012FC2A4669469DF80800EF\n:1044B000FEF797FF00203EBDFEB50D4604004FF00D\n:1044C000000712D00822FEF79FFE002812D1002616\n:1044D00009E000BF54F826006946FEF720FF0028D7\n:1044E00008D1761CF6B2AE42F4D30DF01CFC10B12C\n:1044F00043F20320FEBD3E4E86F824700CB3002725\n:104500001BE000BF54F8270002A9FEF708FF00B126\n:10451000FFDF9DF808008DF8000054F8270050F8E0\n:10452000011FCDF801108088ADF8050068460DF038\n:104530001FFC00B1FFDF7F1CFFB2AF42E2D386F861\n:1045400024500020FEBD2DE9F0418AB01546884672\n:1045500004001ED00F4608222946FEF755FE00280B\n:1045600011D1002613E000BF54F826006946103030\n:1045700000F01FFD002806D13FB157F82600FCF7D8\n:1045800068FE10B110200AB02EE6761CF6B2AE42DC\n:10459000EAD3681EC6B217E0701CC7B212E000BFB3\n:1045A00054F82600017C4A0854F827100B7CB2EB23\n:1045B000530F05D106221130113109F011FF50B10E\n:1045C0007F1CFFB2AF42EBD3761EF6B2E4D2464672\n:1045D00024B1012003E043F20520D4E700200DF0D0\n:1045E000ECFB10B90DF0F5FB20B143F20420CAE753\n:1045F000F001002064B300270DF1170826E000BF8A\n:1046000054F827006946103000F0D3FC00B1FFDFFA\n:1046100054F82700102250F8111FCDF8011080889F\n:10462000ADF8050054F827100DF1070009F005FF5B\n:1046300096B156F827101022404609F0FEFE684653\n:104640000DF07BFB00B1FFDF7F1CFFB2AF42D7D381\n:10465000FEF713FF002096E7404601F0DFFCEEE78F\n:1046600030B585B00446FDF7BDF830B906200FF02F\n:10467000C5FB10B1062005B030BD2046FCF7E9FDB2\n:1046800018B96068FCF732FE08B11020F3E76088C3\n:104690004AF2B811884206D82078F94D28B101288D\n:1046A00006D0022804D00720E5E7FEF721FD18E038\n:1046B0006078022804D0032802D043F20220DAE70F\n:1046C00085F82F00C1B200200090ADF80400022947\n:1046D0002CD0032927D0FFDF68460DF009FC04F039\n:1046E000A2FD0028C7D1606801F08BFC207858B18A\n:1046F00001208DF800000DF1010001F08FFC6846EB\n:104700000EF0FDFB00B1FFDF207885F82E00FEF7EC\n:10471000B4FE608860B1A88580B20DF046FB00B1A0\n:10472000FFDF0020A7E78DF80500D5E74020FAE776\n:104730004FF46170EFE710B50446FCF7B0FD20B907\n:10474000606838B1FCF7C9FD08B1102010BD606881\n:1047500001F064FCCA4830F82C1F6180C178617098\n:1047600080782070002010BD2DE9F843144689465A\n:104770000646FCF794FDA0B94846FCF7B7FD80B9A2\n:104780002046FCF7B3FD60B9BD4DA878012800D1E3\n:104790003CB13178FF2906D049B143F20400BDE8AD\n:1047A000F8831020FBE7012801D00420F7E7CCB301\n:1047B000052811D004280FD069462046FEF776FE62\n:1047C0000028ECD1217D49B1012909D0022909D065\n:1047D000032909D00720E2E70820E0E7024604E0C9\n:1047E000012202E0022200E003228046234617460F\n:1047F00000200099FEF794FE0028D0D1A0892880DF\n:10480000A07BE875BDF80000A882AF75BDF8001068\n:10481000090701D5A18931B1A1892980C00704D038\n:10482000032003E006E08021F7E70220FEF7FEFB0D\n:1048300086F800804946BDE8F8430020FEF71EBF19\n:104840007CB58F4C05460E46A078022803D003287D\n:1048500001D008207CBD15B143F204007CBD0720C7\n:104860000FF0D4FA10B9A078032806D0FEF70CFC9C\n:1048700028B1A078032804D009E012207CBD1320C1\n:104880007CBD304600F053FB0028F9D1E670FEF7FE\n:104890006FFD0AF058F901208DF800008DF8010035\n:1048A0008DF802502088ADF80400E07D8DF80600F8\n:1048B00068460EF0C1F904F0B6FC0028E0D1A078FB\n:1048C000032805D05FF00400FEF7B0FB00207CBD9C\n:1048D000E07800F03CFB0520F6E71CB510B143F290\n:1048E00004001CBD664CA078042803D0052801D024\n:1048F00008201CBD00208DF8000001218DF801105A\n:104900008DF8020068460EF097F904F08CFC002840\n:10491000EFD1A078052805D05FF00200FEF786FBF6\n:1049200000201CBDE07800F01FFB0320F6E72DE916\n:10493000FC4180460E4603250846FCF7D7FC0028BC\n:1049400066D14046FEF77EFD040004D02078222880\n:1049500004D208205EE543F202005BE5A07F00F090\n:1049600003073EB1012F0CD000203146FEF727FC93\n:104970000500EFD1012F06D0022F1AD0FFDF284605\n:1049800048E50120F1E7A07D3146022801D011B1B0\n:1049900007E011203EE56846FCF758FE0028D9D113\n:1049A0006946404606F04DFE0500E8D10120A0759D\n:1049B000E5E7A07D032804D1314890F83000C00716\n:1049C00001D02EB30EE026B1A07F40071ED40021F7\n:1049D00000E00121404606F054FE0500CFD1A0754D\n:1049E000002ECCD03146404600F0EDFA05461128A5\n:1049F000C5D1A07F4107C2D4316844F80E1F716849\n:104A0000616040F0040020740025B8E71125B6E786\n:104A10001020FFE470B50C460546FEF713FD0100BB\n:104A200005D022462846BDE87040FEF70EBD43F291\n:104A3000020070BD10B5012807D1114B9B78012BE6\n:104A400000D011B143F2040010BD0DF0E0F9BDE853\n:104A5000104004F0E8BB012300F090BA00231A468E\n:104A6000194600F08BBA70B506460C460846FCF7AE\n:104A7000F0FB18B92068FCF712FC18B1102070BDCB\n:104A8000F0010020F84D2A7E112A04D0132A00D309\n:104A90003EB10820F3E721463046FEF77DFE60B1C7\n:104AA000EDE70920132A0DD0142A0BD0A188FF2985\n:104AB000E5D31520FEF7D2FA0020D4E90012C5E9AB\n:104AC0000712DCE7A1881F29D9D31320F2E71CB510\n:104AD000E548007E132801D208201CBD00208DF877\n:104AE000000068460DF02AFC04F09DFB0028F4D17C\n:104AF0001120FEF7B3FA00201CBD2DE9F04FDFF8BE\n:104B000068A3814691B09AF818009B4615460C465A\n:104B1000132803D3FFF7DBFF00281FD12046FCF743\n:104B200098FBE8BB2846FCF794FBC8BB20784FF005\n:104B30000107C0074FF0000102D08DF83A7001E084\n:104B40008DF83A1020788846C0F3C1008DF8000037\n:104B500060788DF80910C10803D0072011B0BDE8B6\n:104B6000F08FB0B3C10701D08DF80970810705D56A\n:104B70009DF8091041F002018DF80910400705D594\n:104B80009DF8090040F004008DF809009DF8090027\n:104B9000810703D540F001008DF80900002000E0F6\n:104BA00015E06E4606EB400162884A81401CA288EF\n:104BB000C0B20A820328F5D32078C0F3C1000128CF\n:104BC00025D0032823D04846FCF743FB28B110200A\n:104BD000C4E7FFE78DF80970D8E799F800004008AE\n:104BE00008D0012809D0022807D0032805D043F2B5\n:104BF0000220B3E78DF8028001E08DF8027048468C\n:104C000050F8011FCDF803108088ADF80700FEF7BB\n:104C1000AFFB8DF801000021424606EB41002B88D6\n:104C2000C3826B888383AB884384EB880385491CEC\n:104C3000C285C9B282860329EFD3E088ADF83C0073\n:104C400068460DF053FC002887D19AF818005546A5\n:104C5000112801D0082081E706200FF0D7F838B1DD\n:104C60002078C0F3C100012804D0032802D006E058\n:104C7000122073E795F8240000283FF46EAFFEF78A\n:104C800003FA022801D2132068E7584600F04FF9D2\n:104C900000289DD185F819B068460DF06DFD04F02F\n:104CA000C2FA040094D1687E00F051F91220FEF798\n:104CB000D5F9204652E770B56B4D287E122801D0F9\n:104CC0000820DCE60DF05BFD04F0ADFA040005D130\n:104CD000687E00F049F91120FEF7C0F92046CEE6C3\n:104CE00070B5064615460C460846FCF7D8FA18B9C2\n:104CF0002846FCF7D4FA08B11020C0E62A4621461F\n:104D000030460EF03BF804F08EFA0028F5D12178F9\n:104D10007F29F2D10520B2E67CB505460C4608464F\n:104D2000FCF797FA08B110207CBD2846FEF78AFBF5\n:104D300020B10078222804D208207CBD43F2020072\n:104D40007CBD494890F83000400701D511207CBD5A\n:104D50002078C00802D16078C00801D007207CBD4F\n:104D6000ADF8005020788DF8020060788DF80300CF\n:104D70000220ADF8040068460CF03BFE04F053FA44\n:104D80007CBD70B586B014460D460646FEF75AFB4C\n:104D900028B10078222805D2082006B06FE643F239\n:104DA0000200FAE72846FCF7A1FA20B944B12046F0\n:104DB000FCF793FA08B11020EFE700202060A080F4\n:104DC000294890F83000800701D51120E5E703A9B4\n:104DD00030460CF05EFE10B104F025FADDE7ADF8C8\n:104DE0000060BDF81400ADF80200BDF81600ADF883\n:104DF0000400BDF81000BDF81210ADF80600ADF8C3\n:104E000008107DB1298809B1ADF80610698809B18B\n:104E1000ADF80210A98809B1ADF80810E98809B108\n:104E2000ADF80410DCB1BDF80610814201D9081AB2\n:104E30002080BDF80210BDF81400814201D9081A83\n:104E40006080BDF80800BDF80410BDF816200144CC\n:104E5000BDF812001044814201D9081AA0806846AA\n:104E60000CF0D5FEB8E70000F00100201CB56C493D\n:104E70000968CDE9001068460DF03AFB04F0D3F95B\n:104E80001CBD1CB500200090019068460DF030FB61\n:104E900004F0C9F91CBD70B505460C460846FCF780\n:104EA000FEF908B11020EAE5214628460DF012F976\n:104EB000BDE8704004F0B7B93EB505460C4608465B\n:104EC000FCF7EDF908B110203EBD002000900190E4\n:104ED0000290ADF800502089ADF8080020788DF8D8\n:104EE0000200606801902089ADF808006089ADF883\n:104EF0000A0068460DF000F904F095F93EBD0EB5C4\n:104F0000ADF800000020019068460DF0F5F804F0BF\n:104F10008AF90EBD10800888508048889080C88823\n:104F200010818888D080002050819081704710B512\n:104F3000044604F0E4F830B1407830B1204604F083\n:104F4000FCFB002010BD052010BD122010BD10B5C7\n:104F500004F0D5F8040000D1FFDF607800B9FFDF6E\n:104F60006078401E607010BD10B504F0C8F80400F1\n:104F700000D1FFDF6078401C607010BD1CB5ADF83B\n:104F800000008DF802308DF803108DF8042068467B\n:104F90000DF0B7FE04F047F91CBD0CB521A2D2E913\n:104FA0000012CDE900120079694601EB501000783B\n:104FB0000CBD0278520804D0012A02D043F202202C\n:104FC0007047FEF7ACB91FB56A46FFF7A3FF684606\n:104FD0000DF008FC04F027F904B010BD70B50C000A\n:104FE00006460DD0FEF72EFA050000D1FFDFA680A1\n:104FF00028892081288960816889A081A889E08129\n:105000003DE500B540B1012805D0022803D00328B2\n:1050100004D0FFDF002000BDFF2000BD042000BD44\n:1050200014610200070605040302010010B50446DE\n:10503000FCF70FF908B1102010BD2078C0F3021062\n:10504000042807D86078072804D3A178102901D84C\n:10505000814201D2072010BDE078410706D42179B2\n:105060004A0703D4000701D4080701D5062010BD64\n:10507000002010BD10B513785C08837F64F3C7135C\n:10508000837713789C08C37F64F30003C377107899\n:10509000C309487863F34100487013781C090B7802\n:1050A00064F347130B701378DB0863F30000487058\n:1050B0005078487110BD10B5C4780B7864F30003C4\n:1050C0000B70C478640864F341030B70C478A408BF\n:1050D00064F382030B70C478E40864F3C3030B70B9\n:1050E0000379117863F30001117003795B0863F3AE\n:1050F0004101117003799B0863F3820111700079FB\n:10510000C00860F3C301117010BD70B514460D46A0\n:10511000064604F06BFA80B10178182221F00F01E5\n:10512000891C21F0F001A03100F8081B214609F08C\n:1051300084F9BDE8704004F05CBA29463046BDE809\n:1051400070401322FEF781B92DE9F047064608A802\n:10515000904690E8300489461F46142200212846D4\n:1051600009F095F90021CAF80010B8F1000F03D03A\n:10517000B9F1000F03D114E03878C00711D02068CE\n:10518000FCF78DF8C0BBB8F1000F07D120681230D2\n:1051900028602068143068602068A8602168CAF818\n:1051A00000103878800724D56068FCF796F818BBA3\n:1051B000B9F1000F21D0FFF7E4F80168C6F86811D3\n:1051C0008188A6F86C11807986F86E0101F013FDD4\n:1051D000F94FEF60626862B196F8680106F26911F2\n:1051E00040081032FEF7FDF810223946606809F0D9\n:1051F00024F90020BDE8F08706E0606820B1E8608F\n:105200006068C6F86401F4E71020F3E730B505469E\n:1052100008780C4620F00F00401C20F0F0011031FF\n:1052200021700020607095F8230030B104280FD061\n:10523000052811D0062814D0FFDF20780121B1EB1A\n:10524000101F04D295F8200000F01F00607030BDE0\n:1052500021F0F000203002E021F0F000303020702A\n:10526000EBE721F0F0004030F9E7F0B591B002270C\n:1052700015460C4606463A46ADF80870092103ABC0\n:1052800005F063F80490002810D004208DF8040085\n:105290008DF80170E034099605948DF818500AA92C\n:1052A000684610F0FCFA00B1FFDF012011B0F0BD3C\n:1052B00010B588B00C460A99ADF80000CBB118685B\n:1052C000CDF80200D3F80400CDF80600ADF80A20AE\n:1052D000102203A809F0B1F868460DF0F3FA03F0C4\n:1052E000A2FF002803D1A17F41F01001A17708B0EF\n:1052F00010BD0020CDF80200E6E72DE9F84F064684\n:10530000808A0D4680B28246FEF79CF804463078CB\n:10531000DFF8A48200274FF00209A8F120080F2827\n:1053200070D2DFE800F06FF23708387D8CC8F1F0FA\n:10533000EFF35FF3F300A07F00F00300022809D031\n:105340005FF0000080F0010150460EF0AFFD050057\n:1053500003D101E00120F5E7FFDF98F85C10C907F1\n:1053600002D0D8F860000BE0032105F11D0012F017\n:10537000BEF8D5F81D009149B0FBF1F201FB120017\n:10538000C5F81D0070686867B068A8672078252890\n:1053900000D0FFDFCAE0A07F00F00300022809D0A0\n:1053A0005FF0000080F0010150460EF07FFD060026\n:1053B00003D101E00120F5E7FFDF3078810702D556\n:1053C0002178252904D040F001003070BDE8F88F25\n:1053D00085F80090307F287106F11D002D36C5E953\n:1053E0000206F3E7A07F00F00300022808D00020A7\n:1053F00080F0010150460EF059FD040004D102E096\n:105400000120F5E7A7E1FFDF2078C10604D50720DA\n:1054100028703D346C60D9E740F008002070D5E773\n:10542000E07F000700D5FFDF307CB28800F0010389\n:1054300001B05046BDE8F04F092106F064B804B948\n:10544000FFDF716821B1102204F1240008F0F5FF9C\n:1054500028212046FDF75EFEA07F00F00300022811\n:105460000ED104F12400002300901A462146504634\n:10547000FFF71EFF112807D029212046FDF74AFE1D\n:10548000307A84F82000A1E7A07F000700D5FFDF75\n:1054900014F81E0F40F008002070E782A761E76152\n:1054A000C109607861F34100014660F382016170D7\n:1054B000307AE0708AE7A07F00F00300022809D06C\n:1054C0005FF0000080F0010150460EF0EFFC040098\n:1054D00003D101E00120F5E7FFDF022104F185009F\n:1054E00012F005F80420287004F5B4706860B4F870\n:1054F00085002882304810387C346C61C5E9028010\n:1055000064E703E024E15BE02DE015E0A07F00F01C\n:105510000300022807D0002080F0010150460EF061\n:10552000C5FC18B901E00120F6E7FFDF324621464D\n:105530005046BDE8F84FE8E504B9FFDF20782128A0\n:10554000A1D93079012803D1E07F40F00800E0774D\n:10555000324621465046FFF7D8FD2046BDE8F84FB9\n:105560002321FDF7D7BD3279AA8005F1080309216F\n:10557000504604F0EAFEE86010B10520287025E7E7\n:10558000A07F00F00300022808D0002080F0010175\n:1055900050460EF08BFC040003D101E00120F5E73A\n:1055A000FFDF04F1620102231022081F0EF005FB49\n:1055B00007703179417009E75002002040420F0026\n:1055C000A07F00F00300022808D0002080F0010135\n:1055D00050460EF06BFC050003D101E00120F5E719\n:1055E000FFDF95F8840000F0030001287AD1A07F46\n:1055F00000F00307E07F10F0010602D0022F04D173\n:1056000033E095F8A000C0072BD0D5F8601121B386\n:1056100095F88320087C62F387000874A17FCA098B\n:10562000D5F8601162F341000874D5F8601166F393\n:1056300000000874AEB1D5F86001102204F1240115\n:10564000883508F0FAFE287E40F001002876287898\n:1056500020F0010005F8880900E016B1022F04D0FF\n:105660002DE095F88800C00727D0D5F85C1121B34C\n:1056700095F88320087C62F387000874A17FCA092B\n:10568000D5F85C1162F341000874D5F85C1166F33B\n:10569000000008748EB1D5F85C01102204F12401D9\n:1056A000883508F0CAFE287840F0010005F8180B8C\n:1056B000287820F0010005F8A009022F44D000202E\n:1056C00000EB400005EBC00090F88800800709D58A\n:1056D00095F87C00D5F86421400805F17D01103271\n:1056E000FDF77FFE8DF8009095F884006A4600F083\n:1056F00003008DF8010095F888108DF8021095F8D8\n:10570000A0008DF803002146504601F05DFA207894\n:10571000252805D0212807D0FFDF2078222803D9AB\n:1057200022212046FDF7F6FCA07F00F003000228AE\n:105730000CD0002080F0010150460EF0C9FB00287B\n:105740003FF44FAEFFDF41E60120B9E70120F1E76A\n:10575000706847703AE6FFDF38E670B5FE4C00250A\n:1057600084F85C50256610F066F804F110012046BC\n:1057700003F0F8FE84F8305070BD70B50D46FDF7AB\n:1057800061FE040000D1FFDF4FF4B872002128460B\n:1057900008F07DFE04F124002861A07F00F00300E2\n:1057A000022809D05FF0010105F1E00010F044F893\n:1057B000002800D0FFDF70BD0221F5E70A46014650\n:1057C00002F1E00010F059B870B50546406886B0A7\n:1057D00001780A2906D00D2933D00E292FD0FFDFFA\n:1057E00006B070BD86883046FDF72CFE040000D15F\n:1057F000FFDF20782128F3D028281BD168680221F8\n:105800000E3001F0D6F9A8B168680821801D01F0BA\n:10581000D0F978B104F1240130460DF00FFA03F00D\n:1058200002FD00B1FFDF06B02046BDE8704029212F\n:10583000FDF770BC06B0BDE8704003F0DABE012190\n:1058400001726868C6883046FDF7FCFD040000D18F\n:10585000FFDFA07F00F00301022902D120F0100039\n:10586000A077207821280AD06868017A09B10079E8\n:1058700080B1A07F00F00300022862D0FFDFA07F8C\n:1058800000F003000228ABD1FEF72DF80028A7D0C6\n:10589000FFDFA5E703F0ADFEA17F08062BD5E07F73\n:1058A000C00705D094F8200000F01F00102820D079\n:1058B0005FF0050084F82300207829281DD02428D3\n:1058C000DDD13146042012F0F9F822212046FDF7FF\n:1058D00021FCA07F00F00300022830D05FF0000020\n:1058E00080F0010130460EF0F3FA0028C7D0FFDF48\n:1058F000C5E70620DEE70420DCE701F0030002280C\n:1059000008D0002080F0010130460EF0CFFA0500EB\n:1059100003D101E00120F5E7FFDF25212046FDF757\n:10592000F9FB03208DF80000694605F1E0000FF057\n:105930009BFF0228A3D00028A1D0FFDF9FE7012012\n:10594000CEE703F056FE9AE72DE9F04387B099467B\n:10595000164688460746FDF775FD04004BD02078B3\n:10596000222848D3232846D0E07F000743D4A07FD5\n:1059700000F00300022809D05FF0000080F0010170\n:1059800038460EF093FA050002D00CE00120F5E74E\n:10599000A07F00F00300022805D001210022384634\n:1059A0000EF07BFA05466946284601F034F9009866\n:1059B00000B9FFDF45B10098E03505612078222865\n:1059C00006D0242804D007E000990020086103E0F5\n:1059D00025212046FDF79EFB00980121417047627A\n:1059E000868001A9C0E902890FF059FF022802D080\n:1059F000002800D0FFDF07B0BDE8F08370B586B0A7\n:105A00000546FDF71FFD017822291ED9807F00F091\n:105A10000300022808D0002080F0010128460EF083\n:105A200045FA04002FD101E00120F5E7FFDF2AE06D\n:105A3000B4F85E0004F1620630440178427829B17E\n:105A400021462846FFF711FCB0B9C9E6ADF804209D\n:105A50000921284602AB04F078FC03900028F4D01A\n:105A600005208DF80000694604F1E0000FF0FCFE0F\n:105A7000022801D000B1FFDF02231022314604F1D9\n:105A80005E000EF0D0F8B4F860000028D0D1A7E690\n:105A900010B586B00446FDF7D5FC017822291BD944\n:105AA000807F00F00300022808D0002080F0010170\n:105AB00020460EF0FBF9040003D101E00120F5E7D8\n:105AC000FFDF06208DF80000694604F1E0000FF0CA\n:105AD000CBFE002800D0FFDF06B010BD2DE9F05F3F\n:105AE00005460C4600270078904601093E4604F121\n:105AF000080BBA4602297DD0072902D00A2909D10C\n:105B000046E0686801780A2905D00D2930D00E29B1\n:105B10002ED0FFDFBBE114271C26002C6BD0808821\n:105B2000A080FDF78FFC5FEA000900D1FFDF99F844\n:105B300017005A46400809F11801FDF752FC686841\n:105B4000C0892082696851F8060FC4F812004868BD\n:105B5000C4F81600A07E01E03002002020F006000C\n:105B600040F00100A07699F81E0040F020014DE0C1\n:105B70001A270A26002CD1D0C088A080FDF762FC2D\n:105B8000050000D1FFDF59462846FFF73FFB7EE1C5\n:105B90000CB1A88BA080287A0B287DD006DC0128C8\n:105BA0007BD0022808D0032804D135E00D2875D019\n:105BB0000E2874D0FFDF6AE11E270926002CADD025\n:105BC000A088FDF73FFC5FEA000900D1FFDF287BDA\n:105BD00000F003000128207A1BD020F00100207281\n:105BE000297B890861F341002072297BC90861F390\n:105BF000820001E041E1F2E02072297B090961F3B2\n:105C0000C300207299F81E0040F0400189F81E1070\n:105C10003DE140F00100E2E713270D26002CAAD059\n:105C2000A088FDF70FFC8146807F00F0030002286A\n:105C300008D0002080F00101A0880EF037F905009F\n:105C400003D101E00120F5E7FFDF99F81E0000F025\n:105C50000302022A50D0686F817801F00301012904\n:105C6000217A4BD021F00101217283789B0863F3E4\n:105C7000410121728378DB0863F38201217283780A\n:105C80001B0963F3C3012172037863F306112172C8\n:105C9000437863F3C71103E061E0A9E090E0A1E07D\n:105CA000217284F809A0C178A172022A29D0027950\n:105CB000E17A62F30001E1720279520862F3410174\n:105CC000E1720279920862F38201E1720279D208EC\n:105CD00062F3C301E1724279217B62F30001217317\n:105CE0004279520862F3410121734279920862F3CA\n:105CF00082012173407928E0A86FADE741F00101EE\n:105D0000B2E74279E17A62F30001E1724279520826\n:105D100062F34101E1724279920862F38201E17219\n:105D20004279D20862F3C301E1720279217B62F306\n:105D3000000121730279520862F341012173027953\n:105D4000920862F3820121730079C00860F3C301F5\n:105D5000217399F80000232831D9262140E0182723\n:105D60001026E4B3A088FDF76DFB8346807F00F02A\n:105D70000300022809D0002080F00101A0880EF065\n:105D800095F85FEA000903D101E00120F4E7FFDFA5\n:105D9000E868A06099F8000040F0040189F800105C\n:105DA00099F80100800708D5012020739BF80000B6\n:105DB00023286CD92721584651E084F80CA066E0CE\n:105DC00015270F265CB1A088FDF73CFB8146062213\n:105DD0005946E86808F0C7FB0120A073A0E041E045\n:105DE00048463CE016270926E4B3287B20724EE0A3\n:105DF000287B19270E26ACB3C4F808A0A4F80CA081\n:105E0000012807D0022805D0032805D0042803D094\n:105E1000FFDF0DE0207207E0697B042801F00F012D\n:105E200041F0800121721ED0607A20F00300607280\n:105E3000A088FDF707FB05460078212827D02328F6\n:105E400000D0FFDFA87F00F00300022813D000205D\n:105E500080F00101A0880EF03BF822212846FDF7D2\n:105E600059F914E004E0607A20F00300401CDEE7FA\n:105E7000A8F8006010E00120EAE70CB16888A08073\n:105E8000287A68B301280AD002284FD0FFDFA8F88B\n:105E900000600CB1278066800020BDE8F09F1527C8\n:105EA0000F26002CE4D0A088FDF7CCFA807F00F00C\n:105EB0000300022808D0002080F00101A0880DF026\n:105EC000F5FF050003D101E00120F5E7FFDFD5F87C\n:105ED0001D000622594608F046FB84F80EA0D6E7BE\n:105EE00017270926002CC3D0A088FDF7ABFA8146FE\n:105EF000807F00F00300022808D0002080F001011C\n:105F0000A0880DF0D3FF050003D101E00120F5E7E3\n:105F1000FFDF6878800701D5022000E001202072B1\n:105F200099F800002328B2D9272159E719270E260E\n:105F3000002C9DD0A088FDF785FA5FEA000900D10A\n:105F4000FFDFC4F808A0A4F80CA084F808A0A07A89\n:105F500040F00300A07299F81E10C90961F3820095\n:105F6000A07299F81F2099F81E1012EAD11F05D0CF\n:105F700099F8201001F01F0110292BD020F0080003\n:105F8000A07299F81F10607A61F3C3006072697A99\n:105F900001F003010129A2D140F00400607299F8D8\n:105FA0001E0000F003000228E87A16D0217B60F37F\n:105FB00000012173AA7A607B62F300006073EA7AC1\n:105FC000520862F341012173A97A490861F3410043\n:105FD00060735CE740F00800D2E7617B60F300018A\n:105FE0006173AA7A207B62F300002073EA7A520878\n:105FF00062F341016173A97A490861F3410020739A\n:1060000045E710B5FE4C30B10146102204F12000E6\n:1060100008F013FA012084F8300010BD10B50446D2\n:1060200000F0E9FDF64920461022BDE8104020317D\n:1060300008F003BA70B5F24D06004FF0000413D01B\n:10604000FBF707F908B110240CE00621304608F0F0\n:1060500071FA411C05D028665FF0010085F85C00EC\n:1060600000E00724204670BD0020F7E7007810F01C\n:106070000F0204D0012A05D0022A0CD110E0000939\n:1060800009D10AE00009012807D0022805D0032819\n:1060900003D0042801D00720704708700020704703\n:1060A0000620704705282AD2DFE800F003070F1703\n:1060B0001F00087820F0FF001EE0087820F00F0095\n:1060C000401C20F0F000103016E0087820F00F009F\n:1060D000401C20F0F00020300EE0087820F00F0087\n:1060E000401C20F0F000303006E0087820F00F006F\n:1060F000401C20F0F000403008700020704707205E\n:1061000070472DE9F041804688B00D4600270846CB\n:10611000FBF7ECF8A8B94046FDF794F9040003D06A\n:106120002078222815D104E043F2020008B0BDE82F\n:10613000F08145B9A07F410603D500F00300022895\n:1061400001D01020F2E7A07FC10601D4010702D5DB\n:106150000DB10820EAE7E17F090701D50D20E5E749\n:1061600000F0030002280DD165B12846FEF75EFF5E\n:106170000700DBD1FBF736FB20B9E878800701D5B3\n:106180000620D3E7A07F00F00300022808D00020FB\n:1061900080F0010140460DF089FE060002D00FE0BC\n:1061A0000120F5E7A07F00F0030002280ED00020B8\n:1061B00080F00101002240460DF06FFE060007D07E\n:1061C000A07F00F00300022804D009E00120EFE7DF\n:1061D0000420ABE725B12A4631462046FEF74AFFA8\n:1061E0006946304600F017FD009800B9FFDF0099BE\n:1061F000022006F1E0024870C1F824804A610022C2\n:106200000A81A27F02F00302022A1CD00120087139\n:10621000287800F00102087E62F3010008762A78EF\n:10622000520862F3820008762A78920862F3C3006B\n:1062300008762A78D20862F30410087624212046D2\n:10624000FCF768FF33E035B30871301D88613078A2\n:10625000400908777078C0F340004877287800F04C\n:106260000102887F62F301008877A27FD20962F37E\n:1062700082008877E27F62F3C3008877727862F3E6\n:1062800004108877A878C87701F1210228462031C8\n:10629000FEF711FF03E00320087105200876252191\n:1062A0002046FCF737FFA07F20F04000A07701A92F\n:1062B00000980FF0F4FA022801D000B1FFDF384651\n:1062C00034E72DE9FF4F8DB09A4693460D460027DF\n:1062D0000D98FDF7B7F8060006D03078262806D0CE\n:1062E000082011B0BDE8F08F43F20200F9E7B07F5B\n:1062F00000F00309B9F1020F11D04DB95846FEF76D\n:1063000095FE0028EDD1B07F00F00300022806D0F2\n:10631000BBF1000F11D0FBF765FA20B10DE0BBF126\n:10632000000F50D109E006200DF068FD28B19BF860\n:106330000300800701D50620D3E7B07F00F00300FB\n:10634000022809D05FF0000080F001010D980DF0E7\n:10635000ADFD040003D101E00120F5E7FFDF852D4D\n:1063600027D007DCEDB1812D1DD0822D1DD0832DCE\n:1063700008D11CE0862D1ED0882D1ED0892D1ED060\n:106380008A2D1ED00F2020710F281CD003F02EF96B\n:10639000D8B101208DF81400201D06902079B0B1ED\n:1063A00056E10020EFE70120EDE70220EBE70320B4\n:1063B000E9E70520E7E70620E5E70820E3E709200D\n:1063C000E1E70A20DFE707208BE7112089E7B9F131\n:1063D000020F03D0A56F03D1A06F02E0656FFAE74B\n:1063E000606F804631D04FF0010001904FF0020005\n:1063F00000905A4621463046FEF73CFE02E000007F\n:10640000300200209BF8000000F00101A87861F341\n:106410000100A870B17FC90961F38200A870F17F03\n:1064200061F3C300A870617861F30410A87020784C\n:10643000400928706078C0F3400068709BF8020043\n:10644000E87000206871287103E0022001900120AB\n:106450000090A87898F80210C0F3C000C1F3C00102\n:10646000084003902CD05046FAF7F3FEC0BBDAF890\n:106470000C00FAF7EEFE98BBDAF81C00FAF7E9FE1A\n:1064800070BBDAF80C00A060DAF81C00E0606078FD\n:1064900098F8012042EA500161F34100607098F8D9\n:1064A0000210C0B200EA111161F300006070002018\n:1064B0002077009906F11700022907D0012106E094\n:1064C000607898F8012002EA5001E5E7002104EB2A\n:1064D000810148610199701C022902D0012101E06B\n:1064E00028E0002104EB81014861A87800F0030056\n:1064F000012857D198F8020000F00300012851D17B\n:10650000B9F1020F04D02A1D691D5846FEF7D3FDCC\n:10651000287998F8041008408DF82C00697998F8CB\n:10652000052011408DF8301008433BD05046FAF753\n:1065300090FE08B11020D4E60AF110018B46B9F1A3\n:10654000020F17D00846002104F18C03CDE90003A7\n:1065500004F5AE7202920BAB2046039AFEF7F4FDEF\n:106560000028E8D1B9F1020F08D0504608D14FF009\n:10657000010107E050464FF00101E5E75846F5E715\n:106580004FF0000104F1A403CDE9000304F5B0725B\n:10659000029281F001010CAB2046039AFEF7D4FD74\n:1065A0000028C8D16078800733D4A87898F8021002\n:1065B000C0F38000C1F3800108432AD0297898F8FD\n:1065C0000000F94AB9F1020F06D032F81120430059\n:1065D000DA4002F003070AE032F810204B00DA40FC\n:1065E00012F0030705D0012F0AD0022F0AD0032F83\n:1065F00006D0039A6AB1012906D0042904D008E024\n:106600000227F6E70127F4E7012801D0042800D18A\n:106610000427B07F40F08000B077F17F039860F3EB\n:106620000001F1776078800705D50320A0710398F9\n:1066300070B9002029E00220022F18D0012F18D0B5\n:10664000042F2AD00020A071B07F20F08000B07706\n:1066500025213046FCF75EFD05A904F1E0000FF0AE\n:1066600003F910B1022800D0FFDF002039E6A07145\n:10667000DFE7A0710D22002104F1200007F007FFE1\n:10668000207840F00200207001208DF8100004AA4C\n:1066900031460D9800F098FADAE70120A071D7E7AB\n:1066A0002DE9F04387B09046894604460025FCF763\n:1066B000C9FE060006D03078272806D0082007B08B\n:1066C000BDE8F08343F20200F9E7B07F00F0030079\n:1066D000022809D05FF0000080F0010120460DF093\n:1066E000E5FB040003D101E00120F5E7FFDFA77916\n:1066F0005FEA090005D0012821D0B9F1020F26D1A7\n:1067000010E0B8F1000F22D1012F05D0022F05D0E3\n:10671000032F05D0FFDF2EE00C252CE001252AE019\n:10672000022528E04046FAF794FDB0B9032F0ED1B8\n:106730001022414604F11D0007F07FFE1BE0012FEF\n:1067400002D0022F03D104E0B8F1000F13D00720CC\n:10675000B5E74046FAF77DFD08B11020AFE71022FB\n:10676000002104F11D0007F092FE0621404607F0CB\n:10677000E1FEC4F81D002078252140F002002070C1\n:106780003046FCF7C7FC2078C10713D020F0010089\n:10679000207002208DF8000004F11D0002908DF899\n:1067A00004506946C3300FF05FF8022803D010B1DF\n:1067B000FFDF00E02577002081E730B587B00D4688\n:1067C0000446FCF73FFE98B1807F00F003000228EA\n:1067D00011D0002080F0010120460DF067FB04007D\n:1067E0000ED02846FAF735FD38B1102007B030BD7D\n:1067F00043F20200FAE70120ECE72078400701D4D9\n:106800000820F3E7294604F13D002022054607F061\n:1068100014FE207840F01000207001070FD520F002\n:106820000800207007208DF80000694604F1E000A0\n:1068300001950FF019F8022801D000B1FFDF002008\n:10684000D4E770B50D460646FCF7FCFD18B101789B\n:10685000272921D102E043F2020070BD807F00F0C1\n:106860000300022808D0002080F0010130460DF01E\n:106870001DFB040003D101E00120F5E7FFDFA07953\n:10688000022809D16078C00706D02A462146304642\n:10689000FEF7EBFC10B10FE0082070BDB4F860000B\n:1068A0000E280BD204F1620102231022081F0DF002\n:1068B00084F9012101704570002070BD112070BD68\n:1068C00070B5064614460D460846FAF7C2FC18B9DC\n:1068D0002046FAF7E4FC08B1102070BDA6F57F4011\n:1068E000FF380ED03046FCF7ADFD38B14178224676\n:1068F0004B08811C1846FCF774FD07E043F20200C8\n:1069000070BD2046FDF7A5FD0028F9D11021E01D3E\n:1069100010F0EDFDE21D294604F1170000F08BF99F\n:10692000002070BD2DE9F04104468AB01546884626\n:1069300000270846FAF7DAFC18B92846FAF7D6FC19\n:1069400018B110200AB0BDE8F0812046FCF77AFDAE\n:10695000060003D0307827281BD102E043F2020062\n:10696000F0E7B07F00F00300022809D05FF00000DC\n:1069700080F0010120460DF099FA040003D101E0F6\n:106980000120F5E7FFDF2078400702D56078800717\n:1069900001D40820D6E7B07F00F00300022805D01C\n:1069A000A06F05D1A16F04E01C610200606FF8E7E1\n:1069B000616F407800B19DB1487810B1B8F1000F17\n:1069C0000ED0ADB1EA1D06A8E16800F034F910223E\n:1069D00006A905F1170007F003FD18B1042707E029\n:1069E0000720AFE71022E91D04F12D0007F025FD77\n:1069F000B8F1000F06D0102208F1070104F11D00C4\n:106A000007F01BFD2078252140F002002070304661\n:106A1000FCF780FB2078C10715D020F00100207022\n:106A200002208DF8000004F11D0002901030039048\n:106A30008DF804706946B3300EF016FF022803D0BB\n:106A400010B1FFDF00E0277700207BE7F8B515469F\n:106A50000E460746FCF7F6FC040004D020782228F6\n:106A600004D00820F8BD43F20200F8BDA07F00F07A\n:106A70000300022802D043F20500F8BD3046FAF7C1\n:106A8000E8FB18B92846FAF7E4FB08B11020F8BD76\n:106A900000953288B31C21463846FEF709FC1128C0\n:106AA00015D00028F3D1297C4A08A17F62F3C711D1\n:106AB000A177297CE27F61F30002E277297C8908D3\n:106AC00084F82010A17F21F04001A177F8BDA17FBB\n:106AD0000907FBD4D6F80200C4F83600D6F8060041\n:106AE000C4F83A003088A0861022294604F1240018\n:106AF00007F0A3FC287C4108E07F61F34100E077C8\n:106B0000297C61F38200E077287C800884F82100EA\n:106B1000A07F40F00800A0770020D3E770B50D46B5\n:106B200006460BB1072070BDFCF78CFC040007D0B3\n:106B30002078222802D3A07F800604D4082070BDCC\n:106B400043F2020070BDADB1294630460CF076F834\n:106B500002F069FB297C4A08A17F62F3C711A17783\n:106B6000297CE27F61F30002E277297C890884F8BE\n:106B7000201004E030460CF084F802F054FBA17FB2\n:106B800021F02001A17770BD70B50D46FCF75AFCCD\n:106B9000040005D02846FAF782FB20B1102070BD12\n:106BA00043F2020070BD29462046FEF72FFB00206D\n:106BB00070BD04E010F8012B0AB100207047491E97\n:106BC00089B2F7D20120704770B51546064602F02B\n:106BD0000DFD040000D1FFDF207820F00F00801CA5\n:106BE00020F0F0002030207066802868A060BDE8AA\n:106BF000704002F0FEBC10B5134C94F83000002831\n:106C000008D104F12001A1F110000EF06FFE012067\n:106C100084F8300010BD10B190F8B9202AB10A48AC\n:106C200090F8350018B1002003E0B83001E00648C4\n:106C300034300860704708B50023009313460A46B5\n:106C40000DF031FB08BD00003002002018B1817842\n:106C5000012938D101E010207047018842F6011265\n:106C6000881A914231D018DC42F60102A1EB0200F1\n:106C700091422AD00CDC41B3B1F5C05F25D06FF44E\n:106C8000C050081821D0A0F57060FF381BD11CE05F\n:106C900001281AD002280AD117E0B0F5807F14D05D\n:106CA00008DC012811D002280FD003280DD0FF28BE\n:106CB00009D10AE0B0F5817F07D0A0F580700338D4\n:106CC00003D0012801D0002070470F2070470A2808\n:106CD0001FD008DC0A2818D2DFE800F0191B1F1F9C\n:106CE000171F231D1F21102815D008DC0B2812D0D8\n:106CF0000C2810D00D2816D00F2806D10DE0112831\n:106D00000BD084280BD087280FD003207047002099\n:106D1000704705207047072070470F2070470420F8\n:106D20007047062070470C20704743F202007047FE\n:106D300038B50C46050041D06946FFF797F90028A1\n:106D400019D19DF80010607861F302006070694607\n:106D5000681CFFF78BF900280DD19DF800106078B2\n:106D600061F3C5006070A978C1F34101012903D026\n:106D7000022905D0072038BD217821F0200102E04A\n:106D8000217841F020012170410704D0A978C90879\n:106D900061F386106070607810F0380F07D0A97822\n:106DA000090961F3C710607010F0380F02D16078E4\n:106DB000400603D5207840F040002070002038BD08\n:106DC00070B504460020088015466068FFF7B0FFE4\n:106DD000002816D12089A189884211D8606880785E\n:106DE000C0070AD0B1F5007F0AD840F20120B1FBFC\n:106DF000F0F200FB1210288007E0B1F5FF7F01D907\n:106E00000C2070BD01F201212980002070BD10B559\n:106E10000478137864F3000313700478640864F34F\n:106E2000410313700478A40864F382031370047898\n:106E3000E40864F3C30313700478240964F30413AF\n:106E400013700478640964F34513137000788009A3\n:106E500060F38613137031B10878C10701D1800740\n:106E600001D5012000E0002060F3C713137010BDAE\n:106E70004278530702D002F0070306E012F0380F01\n:106E800002D0C2F3C20300E001234A7863F3020296\n:106E90004A70407810F0380F02D0C0F3C20005E00D\n:106EA000430702D000F0070000E0012060F3C502B4\n:106EB0004A7070472DE9F04F95B00D00824613D00F\n:106EC00012220021284607F0E2FA4FF6FF7B05AABE\n:106ED0000121584607F0A3F80024264637464FF410\n:106EE00020586FF4205972E0102015B0BDE8F08FE3\n:106EF0009DF81E0001280AD1BDF81C1041450BD099\n:106F000011EB09000AD001280CD002280CD0042C67\n:106F10000ED0052C0FD10DE0012400E00224BDF8B5\n:106F20001A6008E0032406E00424BDF81A7002E0A9\n:106F3000052400E00624BDF81A10514547D12C74F1\n:106F4000BEB34FF0000810AA4FF0070ACDE9028245\n:106F5000CDE900A80DF13C091023CDF81090424670\n:106F60003146584607F02BF908BBBDF83C002A46CD\n:106F7000C0B210A90EF045FDC8B9AE81CFB1CDE9C0\n:106F800000A80DF1080C0AAE40468CE8410213231C\n:106F900000223946584607F012F940B9BDF83C00C6\n:106FA000F11CC01EC0B22A1D0EF02BFD10B1032033\n:106FB0009BE70AE0BDF82900E881062C05D19DF881\n:106FC0001E00A872BDF81C00288100208DE705A8CE\n:106FD00007F031F800288BD0FFF779FE85E72DE91F\n:106FE000F0471C46DDE90978DDF8209015460E00D3\n:106FF000824600D1FFDF0CB1208818B1D5B1112035\n:10700000BDE8F087022D01D0012100E0002106F14A\n:10701000140005F0CDFEA8F8000002463B462946C4\n:10702000504603F092F9C9F8000008B9A41C3C606E\n:107030000020E5E71320E3E7F0B41446DDE904524D\n:107040008DB1002314B1022C09D101E0012306E027\n:107050000D7CEE0703D025F0010501230D742146B8\n:10706000F0BC04F050BA1A80F0BC70472DE9FE4F16\n:1070700091461A881C468A468046FAB102AB4946B8\n:1070800003F063F9050019D04046A61C27880DF0CF\n:1070900050F83246072629463B4600960CF05FFC26\n:1070A00020882346CDE900504A4651464046FFF726\n:1070B000C3FF002020800120BDE8FE8F0020FBE7F9\n:1070C0002DE9F04786B082460EA8904690E8B000C1\n:1070D000894604AA05A903A88DE807001E462A468A\n:1070E00021465046FFF77BFF039901B1012139701A\n:1070F000002818D1FA4904F1140204AB086003987F\n:1071000005998DE8070042464946504606F003FAC5\n:10711000A8B1092811D2DFE800F005080510100A0F\n:107120000C0C0E00002006B06AE71120FBE70720D8\n:10713000F9E70820F7E70D20F5E70320F3E7BDF8AE\n:1071400010100398CDE9000133462A4621465046E7\n:10715000FFF772FFE6E72DE9F04389B01646DDE957\n:1071600010870D4681461C461422002103A807F013\n:107170008EF9012002218DF810108DF80C008DF889\n:107180001170ADF8146064B1A278D20709D08DF8FF\n:107190001600E088ADF81A00A088ADF81800A068C5\n:1071A000079008A80095CDE90110424603A948467A\n:1071B0006B68FFF785FF09B0BDE8F083F0B58BB0D1\n:1071C00000240646069407940727089405A8099406\n:1071D000019400970294CDE903400D461023224606\n:1071E000304606F0ECFF78B90AA806A9019400978A\n:1071F0000294CDE90310BDF8143000222946304630\n:1072000006F07BFD002801D0FFF761FD0BB0F0BD5B\n:1072100006F00CBC2DE9FC410C468046002602F02D\n:10722000E5F9054620780D287ED2DFE800F0BC079E\n:1072300013B325BD49496383AF959B00A8480068F7\n:1072400020B1417841F010014170ADE0404602F0BC\n:10725000FDF9A9E0042140460CF028FE070000D10A\n:10726000FFDF07F11401404605F037FDA5BB1321F0\n:107270004046FDF7CFFB97E0042140460CF016FE98\n:10728000070000D1FFDFE088ADF800000020B881E2\n:107290009DF80000010704D5C00602D5A088B8817A\n:1072A00005E09DF8010040067ED5A088F88105B96B\n:1072B000FFDF22462946404601F0ACFC022673E07F\n:1072C000E188ADF800109DF8011009060FD50728D8\n:1072D00003D006280AD00AE024E0042140460CF03E\n:1072E000E5FD060000D1FFDFA088F0810226CDB9C0\n:1072F000FFDF17E0042140460CF0D8FD070000D165\n:10730000FFDF07F1140006F0C8FB90F0010F02D177\n:10731000E079000648D5387C022640F00200387437\n:1073200005B9FFDF224600E03DE02946404601F076\n:1073300071FC39E0042140460CF0B8FD017C002DC1\n:1073400001F00206C1F340016171017C21F00201EC\n:107350000174E7D1FFDFE5E702260121404602F094\n:10736000A7F921E0042140460CF0A0FD0546606825\n:1073700000902089ADF8040001226946404602F0E1\n:10738000B8F9287C20F0020028740DE0002DC9D146\n:10739000FFDFC7E7022600214046FBF799F8002DE2\n:1073A000C0D1FFDFBEE7FFDF3046BDE8FC813EB560\n:1073B0000C0009D001466B4601AA002006F084FFAC\n:1073C00020B1FFF784FC3EBD10203EBD0020208090\n:1073D000A0709DF8050002A900F00700FEF762FE0C\n:1073E00050B99DF8080020709DF8050002A9C0F36F\n:1073F000C200FEF757FE08B103203EBD9DF808000D\n:1074000060709DF80500C109A07861F30410A070B8\n:107410009DF80510890961F3C300A0709DF8041060\n:10742000890601D5022100E0012161F342009DF8A7\n:10743000001061F30000A07000203EBD70B514463E\n:1074400006460D4651EA040005D075B10846F9F725\n:1074500044FF78B901E0072070BD2946304606F0A8\n:107460009AFF10B1BDE8704031E454B12046F9F7FD\n:1074700034FF08B1102070BD21463046BDE8704091\n:1074800095E7002070BD2DE9FC5F0C46904605464F\n:10749000002701780822007A3E46B2EB111F7DD109\n:1074A00004F10A0100910A31821E4FF0020A04F130\n:1074B000080B0191092A72D2DFE802F0EDE005F530\n:1074C00028287BAACE00688804210CF0EFFC060077\n:1074D00000D1FFDFB08928B152270726C3E00000A2\n:1074E0009402002051271026002C7DD06888A080AF\n:1074F0000120A071A88900220099FFF79FFF0028B2\n:1075000073D1A8892081288AE081D1E0B5F8129052\n:10751000072824D1E87B000621D5512709F1140062\n:1075200086B2002CE1D0A88900220099FFF786FFDF\n:1075300000285AD16888A08084F806A0A8892081F4\n:107540000120A073288A2082A4F81290A88A0090B3\n:1075500068884B46A969019A01F038FBA8E05027DA\n:1075600009F1120086B2002C3ED0A88900225946AB\n:10757000FFF764FF002838D16888A080A889E080E0\n:10758000287A072813D002202073288AE081E87B1C\n:10759000C0096073A4F81090A88A01E085E082E039\n:1075A000009068884B4604F11202A969D4E70120D3\n:1075B000EAE7B5F81290512709F1140086B2002CC1\n:1075C00066D0688804210CF071FC83466888A0802E\n:1075D000A88900220099FFF731FF00286ED184F8B6\n:1075E00006A0A889208101E052E067E00420A07392\n:1075F000288A2082A4F81290A88A009068884B46B6\n:10760000A969019A01F0E2FAA989ABF80E104FE0DE\n:107610006888FBF717FF0746688804210CF046FCD2\n:10762000064607B9FFDF06B9FFDF687BC00702D057\n:107630005127142601E0502712264CB36888A080F9\n:10764000502F06D084F806A0287B594601F0CEFAC8\n:107650002EE0287BA11DF9E7FE49A88949898142CE\n:1076600005D1542706269CB16888A08020E05327C6\n:107670000BE06888A080A889E08019E06888042170\n:107680000CF014FC00B9FFDF55270826002CF0D1C0\n:10769000A8F8006011E056270726002CF8D068886B\n:1076A000A080002013E0FFDF02E0012808D0FFDF08\n:1076B000A8F800600CB1278066800020BDE8FC9F20\n:1076C00057270726002CE3D06888A080687AA0712D\n:1076D000EEE7401D20F0030009B14143091D01EB15\n:1076E0004000704713B5DB4A00201071009848B184\n:1076F000002468460CF0F7F9002C02D1D64A009914\n:1077000011601CBD01240020F4E770B50D4614463D\n:10771000064686B05C220021284606F0B8FE04B971\n:10772000FFDFA0786874A2782188284601F089FAE2\n:107730000020A881E881228805F11401304605F077\n:10774000B0FA6A460121304606F069FC1AE000BF33\n:107750009DF80300000715D5BDF806103046FFF769\n:107760002DFD9DF80300BDF8061040F010008DF8C7\n:107770000300BDF80300ADF81400FF233046059A5E\n:1077800006F0D1FD684606F056FC0028E0D006B0B1\n:1077900070BD10B50C4601F1140005F0BAFA0146AF\n:1077A000627C2046BDE8104001F080BA30B5044646\n:1077B000A84891B04FF6FF75C18905AA284606F082\n:1077C0002EFC30E09DF81E00A0422AD001282AD1CC\n:1077D000BDF81C00B0F5205F03D042F601018842DD\n:1077E00021D1002002AB0AAA0CA9019083E807006E\n:1077F00007200090BDF81A1010230022284606F03A\n:10780000DEFC38B9BDF828000BAAC0B20CA90EF0F6\n:10781000F8F810B1032011B030BD9DF82E00A04241\n:1078200001D10020F7E705A806F005FC0028C9D023\n:107830000520F0E770B5054604210CF037FB040085\n:1078400000D1FFDF04F114010C46284605F045FA8B\n:1078500021462846BDE8704005F046BA70B58AB0AA\n:107860000C460646FBF7EEFD050014D028782228CA\n:1078700027D30CB1A08890B101208DF80C00032013\n:107880008DF8100000208DF8110054B1A088ADF8DB\n:107890001800206807E043F202000AB070BD09201A\n:1078A000FBE7ADF818000590042130460CF0FEFA15\n:1078B000040000D1FFDF04F1140005F040FA0007D6\n:1078C00001D40820E9E701F091FE60B108A8022187\n:1078D0000094CDE9011095F8232003A93046636890\n:1078E000FFF7EEFBD9E71120D7E72DE9F04FB2F80B\n:1078F00002A0834689B0154689465046FBF7A2FD93\n:107900000746042150460CF0D1FA0026044605969D\n:107910004FF002080696ADF81C6007B9FFDF04B906\n:10792000FFDF4146504603F055FF50B907AA06A9AC\n:1079300005A88DE807004246214650466368FFF7D8\n:107940004EFB444807AB0660DDE9051204F1140064\n:10795000CDF80090CDE90320CDE9013197F823203F\n:10796000594650466B6805F033FA06000AD0022EDD\n:1079700004D0032E14D0042E00D0FFDF09B030460F\n:10798000BDE8F08FBDF81C000028F7D00599CDE9BF\n:1079900000104246214650466368FFF74DFBEDE775\n:1079A000687840F008006870E8E710B50C46FFF70B\n:1079B000BFF900280BD1607800F00701012905D13B\n:1079C00010F0380F02D02078810601D5072010BDB5\n:1079D00040F0C8002070002010BD2DE9F04F99B094\n:1079E00004464FF000081B48ADF81C80ADF820801D\n:1079F000ADF82480A0F80880ADF81480ADF81880A8\n:107A0000ADF82880ADF82C80007916460D46474623\n:107A1000012808D0022806D0032804D0042802D068\n:107A2000082019B0ACE72046F9F713FCF0BB284654\n:107A3000F9F70FFCD0BB6068F9F758FCB0BB606881\n:107A400068B160892189884202D8B1F5007F05D9E3\n:107A50000C20E6E7940200201800002080460EAAC1\n:107A600006A92846FFF7ACF90028DAD168688078C3\n:107A7000C0F34100022808D19DF8190010F0380F1A\n:107A800003D02869F9F729FC80B905A92069FFF717\n:107A90004FF90028C5D1206950B1607880079DF862\n:107AA000150000F0380002D5F0B301E011E0D8BBBA\n:107AB0009DF8140080060ED59DF8150010F0380FC3\n:107AC00003D06068F9F709FC18B96068F9F70EFC93\n:107AD00008B11020A5E70BA906A8FFF7C9F99DF882\n:107AE0002D000BA920F00700401C8DF82D006069C7\n:107AF000FFF75BFF002894D10AA9A069FFF718F9E6\n:107B000000288ED19DF8280080062BD4A06940B1B2\n:107B10009DF8290000F00701012923D110F0380F4A\n:107B200020D0E06828B100E01CE00078D0B11C282B\n:107B300018D20FAA611C2046FFF769F901213846C7\n:107B400061F30F2082468DF85210B94642F60300C9\n:107B50000F46ADF850000DF13F0218A928680DF04E\n:107B600052FF08B107205CE79DF8600015A9CDF829\n:107B70000090C01CCDE9019100F0FF0B00230BF237\n:107B80000122514614A806F075F9E8BBBDF854006F\n:107B90000C90FB482A8929690092CDE901106B8974\n:107BA000BDF838202868069906F064F9010077D1FD\n:107BB00020784FF0020AC10601D4800616D58DF850\n:107BC000527042F60210ADF85000CDF80C9008A9A2\n:107BD00003AACDF800A0CDE90121002340F2032241\n:107BE00014A80B9906F046F9010059D1E4484D4616\n:107BF00008380089ADF83D000FA8CDE90290CDF816\n:107C00000490CDF8109000E00CE04FF007095B46BF\n:107C10000022CDF80090BDF854104FF6FF7006F02A\n:107C20006CF810B1FFF753F8FBE69DF83C00000636\n:107C300024D52946012060F30F218DF852704FF4AE\n:107C400024500395ADF8500062789DF80C00002395\n:107C500062F300008DF80C006278CDF800A05208A5\n:107C600062F341008DF80C0003AACDE9012540F232\n:107C7000032214A806F0FEF8010011D1606880B359\n:107C80002069A0B905A906A8FFF7F2F86078800777\n:107C900007D49DF8150020F038008DF8150006E097\n:107CA00077E09DF8140040F040008DF814008DF846\n:107CB000527042F60110ADF85000208940F20121C7\n:107CC000B0FBF1F201FB1202606809ABCDF8008055\n:107CD000CDE90103002314A8059906F0CBF80100B3\n:107CE00057D12078C00728D00395A06950B90AA9B8\n:107CF00006A8FFF7BDF89DF8290020F00700401CFA\n:107D00008DF829009DF8280007A940F040008DF863\n:107D100028008DF8527042F60310ADF8500003AA07\n:107D2000CDF800A0CDE90121002340F2032214A8E0\n:107D30000A9906F09FF801002BD1E06868B3294644\n:107D4000012060F30F218DF8527042F60410ADF857\n:107D50005000E068002302788DF8582040788DF8B4\n:107D60005900E06816AA4088ADF85A00E06800792A\n:107D70008DF85C00E068C088ADF85D00CDF800903B\n:107D8000CDE901254FF4027214A806F073F8010042\n:107D900003D00C9800F0B6FF43E679480321083879\n:107DA000017156B100893080BDF824007080BDF8A3\n:107DB0002000B080BDF81C00F080002031E670B5D6\n:107DC00001258AB016460B46012802D0022816D19A\n:107DD00004E08DF80E504FF4205003E08DF80E5063\n:107DE00042F60100ADF80C005BB10024601C60F3AA\n:107DF0000F2404AA08A918460DF005FE18B10720A3\n:107E00004BE5102049E504A99DF820205C48CDE908\n:107E10000021801E02900023214603A802F20122C5\n:107E200006F028F810B1FEF752FF36E5544808383E\n:107E30000EB1C1883180057100202EE5F0B593B0F8\n:107E4000044601268DF83E6041F601000F46ADF86C\n:107E50003C0011AA0FA93046FFF7B1FF002837D127\n:107E60002000474C4FF00005A4F1080432D01C223A\n:107E7000002102A806F00BFB9DF808008DF83E607B\n:107E800040F020008DF8080042F60520ADF83C00D7\n:107E900004200797ADF82C00ADF8300039480A905F\n:107EA0000EA80D900E950FA80990ADF82E506A46B9\n:107EB00009A902A8FFF791FD002809D1BDF800002B\n:107EC0006081BDF80400A081401CE0812571002084\n:107ED00013B0F0BD6581A581BDF84400F4E72DE93C\n:107EE000F74F2749A0B00024083917940A79A14612\n:107EF000012A04D0022A02D0082023B040E5CA8813\n:107F0000824201D00620F8E721988A46824201D1B8\n:107F10000720F2E70120214660F30F21ADF8480069\n:107F20004FF6FF788DF86E000691ADF84A8042F664\n:107F3000020B8DF872401CA9ADF86CB0ADF8704022\n:107F40001391ADF8508012A806F0A4F800252E4633\n:107F50002F460DAB072212A9404606F09EF898B1B5\n:107F60000A2861D1B5B3AEB3ADF86450ADF8666020\n:107F70009DF85E008DF8144019AC012868D06FE0C0\n:107F80009C020020266102009DF83A001FB30128E0\n:107F900059D1BDF8381059451FD118A809A9019425\n:107FA0000294CDE9031007200090BDF8361010238D\n:107FB0000022404606F003F9B0BBBDF8600004287B\n:107FC00001D006284AD1BDF82410219881423AD127\n:107FD0000F2092E73AE0012835D1BDF83800B0F51E\n:107FE000205F03D042F6010188422CD1BAF8060086\n:107FF000BDF83610884201D1012700E0002705B105\n:108000009EB1219881421ED118A809AA0194029418\n:10801000CDE90320072000900D46102300224046A2\n:1080200006F0CDF800B902E02DE04E460BE0BDF8B9\n:108030006000022801D0102810D1C0B217AA09A9E7\n:108040000DF0DFFC50B9BDF8369082E7052054E70B\n:1080500005A917A8221D0DF0D6FC08B103204CE796\n:108060009DF814000023001DC2B28DF81420229840\n:108070000092CDE901401BA8069905F0FBFE10B95E\n:1080800002228AF80420FEF722FE36E710B50B46DE\n:10809000401E88B084B205AA00211846FEF7B7FE3C\n:1080A00000200DF1080C06AA05A901908CE8070034\n:1080B000072000900123002221464FF6FF7005F0B3\n:1080C0001CFE0446BDF81800012800D0FFDF204642\n:1080D000FEF7FDFD08B010BDF0B5FF4F044687B0B8\n:1080E00038790E46032804D0042802D0082007B0AF\n:1080F000F0BD04AA03A92046FEF762FE0500F6D1F2\n:1081000060688078C0F3410002280AD19DF80D0014\n:1081100010F0380F05D02069F9F7DFF808B110200A\n:10812000E5E7208905AA21698DE807006389BDF884\n:1081300010202068039905F09DFE10B1FEF7C7FDE1\n:10814000D5E716B1BDF814003080042038712846F8\n:10815000CDE7F8B50C0006460BD001464FF6FF758B\n:1081600000236A46284606F0AFF820B1FEF7AFFDBF\n:10817000F8BD1020F8BD69462046FEF7D9FD00285D\n:10818000F8D1A078314600F001032846009A06F0A5\n:10819000CAF8EBE730B587B0144600220DF1080CA1\n:1081A00005AD01928CE82C00072200920A46014698\n:1081B00023884FF6FF7005F0A0FDBDF81410218054\n:1081C000FEF785FD07B030BD70B50D4604210BF0FC\n:1081D0006DFE040000D1FFDF294604F11400BDE864\n:1081E000704004F0A5BD70B50D4604210BF05EFE95\n:1081F000040000D1FFDF294604F11400BDE87040FF\n:1082000004F0B9BD70B50D4604210BF04FFE04001B\n:1082100000D1FFDF294604F11400BDE8704004F0EE\n:10822000D1BD70B5054604210BF040FE040000D11D\n:10823000FFDF214628462368BDE870400122FEF793\n:1082400015BF70B5064604210BF030FE040000D1C6\n:10825000FFDF04F1140004F05CFD401D20F0030575\n:1082600011E0011D00880022431821463046FEF728\n:10827000FDFE00280BD0607CABB2684382B2A068E0\n:10828000011D0BF0D0FCA06841880029E9D170BD28\n:1082900070B5054604210BF009FE040000D1FFDF94\n:1082A000214628466368BDE870400222FEF7DEBE24\n:1082B00070B50E46054601F099F9040000D1FFDFC4\n:1082C0000120207266726580207820F00F00001D6A\n:1082D00020F0F00040302070BDE8704001F089B916\n:1082E00010B50446012900D0FFDF2046BDE810404C\n:1082F0000121FAF7EDB82DE9F04F97B04FF0000AE1\n:108300000C008346ADF814A0D04619D0E06830B117\n:10831000A068A8B10188ADF81410A0F800A05846D4\n:10832000FBF790F8070043F2020961D03878222861\n:108330005CD3042158460BF0B9FD050005D103E0DC\n:10834000102017B0BDE8F08FFFDF05F1140004F036\n:10835000E0FC401D20F00306A078012803D002288D\n:1083600001D00720EDE7218807AA584605F057FEFF\n:1083700030BB07A805F05FFE10BB07A805F05BFE49\n:1083800048B99DF82600012805D1BDF82400A0F5C4\n:108390002451023902D04FF45050D2E7E068B0B116\n:1083A000CDE902A00720009005AACDF804A0049210\n:1083B000A2882188BDF81430584605F09EFC10B103\n:1083C000FEF785FCBDE7A168BDF8140008809DF8A4\n:1083D0001F00C00602D543F20140B2E70B9838B146\n:1083E000A1780078012905D080071AD40820A8E7D1\n:1083F0004846A6E7C007F9D002208DF83C00A868DF\n:108400004FF00009A0B1697C4288714391420FD9B5\n:108410008AB2B3B2011D0BF0BCFB8046A0F800A0ED\n:1084200006E003208DF83C00D5F800804FF00109EC\n:108430009DF8200010F0380F00D1FFDF9DF82000DC\n:108440002649C0F3C200084497F8231010F8010C25\n:10845000884201D90F2074E72088ADF8400014A9A4\n:108460000095CDE90191434607220FA95846FEF732\n:1084700027FE002891D19DF8500050B9A07801281E\n:1084800007D1687CB3B2704382B2A868011D0BF0BB\n:1084900094FB002055E770B5064615460C46084685\n:1084A000FEF7D4FB002805D12A4621463046BDE818\n:1084B000704084E470BD12E570B51E4614460D0090\n:1084C0000ED06CB1616859B160B10349C98881426D\n:1084D00008D0072070BD000094020020296102002E\n:1084E0001020F7E72068FEF7B1FB0028F2D13246F2\n:1084F00021462846BDE87040FFF76FBA70B51546B3\n:108500000C0006D038B1FE490989814203D007200A\n:10851000E0E71020DEE72068FEF798FB0028D9D1BD\n:1085200029462046BDE87040D6E570B5064686B0BF\n:108530000D4614461046F8F7B2FED0BB6068F8F757\n:10854000D5FEB0BBA6F57F40FF3803D03046FAF722\n:1085500079FF80B128466946FEF7ACFC00280CD1B3\n:108560009DF810100F2008293DD2DFE801F0080621\n:108570000606060A0A0843F2020006B0AAE703202C\n:10858000FBE79DF80210012908D1BDF80010B1F5F4\n:10859000C05FF2D06FF4C052D142EED09DF8061009\n:1085A00001290DD1BDF80410A1F52851062907D2E3\n:1085B00000E029E0DFE801F0030304030303DCE744\n:1085C0009DF80A1001290FD1BDF80810B1F5245FFC\n:1085D000D3D0A1F60211B1F50051CED00129CCD0F3\n:1085E000022901D1C9E7FFDF606878B9002305AA35\n:1085F0002946304605F068FE10B1FEF768FBBCE77F\n:108600009DF81400800601D41020B6E76188224648\n:1086100028466368FFF7BEFDAFE72DE9F0438146CA\n:1086200087B0884614461046F8F739FE18B1102076\n:1086300007B0BDE8F083002306AA4146484605F08E\n:1086400043FE10B1FEF743FBF2E79DF81800C006A9\n:1086500002D543F20140EBE70025072705A8019565\n:1086600000970295CDE9035062884FF6FF734146AB\n:10867000484605F0A4FD060013D16068F8F70FFE28\n:1086800060B960680195CDE9025000970495238890\n:1086900062884146484605F092FD0646BDF8140042\n:1086A00020803046CEE739B1954B0A889B899A42A3\n:1086B00002D843F2030070471DE610B586B0904C17\n:1086C0000423ADF81430638943B1A4898C4201D2EC\n:1086D000914205D943F2030006B010BD0620FBE726\n:1086E000ADF81010002100910191ADF80030022189\n:1086F0008DF8021005A9029104A90391ADF812208A\n:108700006946FFF7F8FDE7E72DE9FC4781460D468E\n:108710000846F8F79EFD88BB4846FAF793FE5FEAE5\n:1087200000080AD098F80000222829D304214846DE\n:108730000BF0BCFB070005D103E043F20200BDE8EB\n:10874000FC87FFDF07F1140004F0F9FA06462878E9\n:10875000012803D0022804D00720F0E7B0070FD586\n:1087600002E016F01C0F0BD0A8792C1DC00709D011\n:10877000E08838B1A068F8F76CFD18B11020DEE78A\n:108780000820DCE721882A780720B1F5847F35D0DE\n:108790001EDC40F20315A1F20313A94226D00EDC21\n:1087A000B1F5807FCBD003DCF9B1012926D1C6E732\n:1087B000A1F58073013BC2D0012B1FD113E0012B27\n:1087C000BDD0022B1AD0032BB9D0042B16D112E046\n:1087D000A1F20912082A11D2DFE802F00B040410FA\n:1087E00010101004ABE7022AA9D007E0012AA6D096\n:1087F00004E0320700E0F206002AA0DACDB200F071\n:10880000F5FE50B198F82300CDE90005FA8923461A\n:1088100039464846FEF79FFC91E711208FE72DE986\n:10882000F04F8BB01F4615460C4683460026FAF7DC\n:1088300009FE28B10078222805D208200BB081E576\n:1088400043F20200FAE7B80801D00720F6E7032F49\n:1088500000D100274FF6FF79CCB1022D71D320460D\n:10886000F8F744FD30B904EB0508A8F10100F8F76A\n:108870003DFD08B11020E1E7AD1E38F8028CAAB228\n:108880002146484605F081FE40455AD1ADB21C490B\n:10889000B80702D58889401C00E001201FFA80F843\n:1088A000F80701D08F8900E04F4605AA4146584697\n:1088B00005F0B5FB4FF0070A4FF00009FCB1204668\n:1088C00008E0408810283CD8361D304486B2AE42BD\n:1088D00037D2A01902884245F3D352E09DF8170021\n:1088E00002074ED57CB304EB0608361DB8F80230FB\n:1088F000B6B2102B25D89A19AA4222D802E040E03D\n:1089000094020020B8F8002091421AD1C0061BD56D\n:10891000CDE900A90DF1080C0AAAA11948468CE876\n:108920000700B8F800100022584605F0E6F910B12B\n:10893000FEF7CDF982E7B8F80200BDF828108842AA\n:1089400002D00B207AE704E0B8F80200304486B287\n:1089500006E0C00604D55846FEF730FC00288AD150\n:108960009DF81700BDF81A1020F010008DF81700C0\n:10897000BDF81700ADF80000FF235846009A05F037\n:10898000D2FC05A805F057FB18B9BDF81A10B9427A\n:10899000A4D9042158460BF089FA040000D1FFDF66\n:1089A000A2895AB1CDE900A94D4600232146584677\n:1089B000FEF7D1FB0028BDD1A5813FE700203DE7B0\n:1089C0002DE9FF4F8BB01E4617000D464FF00004F7\n:1089D00012D0B00802D007200FB0B3E4032E00D1AC\n:1089E00000265DB10846F8F778FC28B93888691E7A\n:1089F0000844F8F772FC08B11020EDE7C74AB00749\n:108A000001D5D18900E00121F0074FF6FF7802D0AF\n:108A1000D089401E00E0404686B206AA0B9805F0B9\n:108A2000FEFA4FF000094FF0070B0DF1140A38E081\n:108A30009DF81B00000734D5CDF80490CDF800B0A8\n:108A4000CDF80890CDE9039A434600220B9805F033\n:108A5000B6FB60BB05B3BDF814103A882144281951\n:108A6000091D8A4230D3BDF81E2020F8022BBDF824\n:108A7000142020F8022BCDE900B9CDE90290CDF801\n:108A800010A0BDF81E10BDF8143000220B9805F0A0\n:108A900096FB08B103209FE7BDF814002044001D99\n:108AA00084B206A805F0C7FA20B10A2806D0FEF75E\n:108AB0000EF991E7BDF81E10B142B9D934B17DB1BC\n:108AC0003888A11C884203D20C2085E7052083E763\n:108AD00022462946404605F058FD014628190180E6\n:108AE000A41C3C80002077E710B50446F8F7D7FBBC\n:108AF00008B1102010BD8948C0892080002010BD19\n:108B0000F0B58BB00D4606461422002103A805F0EF\n:108B1000BEFC01208DF80C008DF8100000208DF8AF\n:108B20001100ADF814503046FAF78CFC48B10078CB\n:108B3000222812D3042130460BF0B8F9040005D1E5\n:108B400003E043F202000BB0F0BDFFDF04F11400BC\n:108B5000074604F0F4F8800601D40820F3E7207CEF\n:108B6000022140F00100207409A80094CDE9011011\n:108B7000072203A930466368FEF7A2FA20B1217CE0\n:108B800021F001012174DEE729463046F9F791FC16\n:108B900008A9384604F0C2F800B1FFDFBDF8204054\n:108BA000172C01D2172000E02046A84201D92C46FC\n:108BB00002E0172C00D2172421463046FFF713FBA2\n:108BC00021463046F9F799F90020BCE7F8B51C4674\n:108BD00015460E46069F0BF09AFA2346FF1DBCB2BF\n:108BE00031462A4600940AF086FEF8BD70B50C4660\n:108BF00005460E220021204605F049FC0020208079\n:108C00002DB1012D01D0FFDF64E4062000E0052036\n:108C1000A0715FE410B548800878134620F00F007B\n:108C2000001D20F0F00080300C4608701422194618\n:108C300004F1080005F001FC00F0DBFC374804609B\n:108C400010BD2DE9F047DFF8D890491D064621F008\n:108C5000030117460C46D9F800000AF062FF050030\n:108C600000D1FFDF4FF000083560A5F800802146F5\n:108C7000D9F800000AF055FF050000D1FFDF75604C\n:108C8000A5F800807FB104FB07F1091D0BD0D9F8CE\n:108C900000000AF046FF040000D1FFDFB460C4F812\n:108CA0000080BDE8F087C6F80880FAE72DE9F041BA\n:108CB0001746491D21F00302194D06460168144666\n:108CC00028680AF059FF2246716828680AF054FFA4\n:108CD0003FB104FB07F2121D03D0B16828680AF007\n:108CE0004BFF04200BF08AF8044604200BF08EF8AA\n:108CF000201A012804D12868BDE8F0410AF006BF17\n:108D0000BDE8F08110B50C4605F058F900B1FFDF61\n:108D10002046BDE81040FDF7DABF000094020020B5\n:108D20001800002038B50C468288817B19B1418932\n:108D3000914200D90A462280C188121D90B26A462B\n:108D40000AF0B2F8BDF80000032800D30320C1B236\n:108D5000208801F020F838BD38B50C468288817B28\n:108D600019B10189914200D90A462280C188121D99\n:108D700090B26A460AF098F8BDF80000022800D3C5\n:108D80000220C1B2208801F006F8401CC0B238BDF4\n:108D90002DE9FF5F82468B46F74814460BF103022C\n:108DA000D0E90110CDE9021022F0030201A84FF42E\n:108DB000907101920AF097FEF04E002C02D1F0491A\n:108DC000019A8A60019901440191B57F05F101057D\n:108DD00004D1E8B20CF098FD00B1FFDF019800EB80\n:108DE0000510C01C20F0030101915CB9707AB27AC1\n:108DF0001044C2B200200870B08C80B204F03DFF75\n:108E000000B1FFDF0198716A08440190214601A872\n:108E100000F084FF80460198C01C20F00300019000\n:108E2000B37AF27A717A04B100200AF052FF019904\n:108E300008440190214601A800F0B8FFCF48002760\n:108E40003D4690F801900CE0284600F04AFF0646A7\n:108E500081788088F9F7E8F871786D1C00FB01775C\n:108E6000EDB24D45F0D10198C01C20F003000190F7\n:108E700004B100203946F9F7E2F8019900270844C7\n:108E80000190BE483D4690F801900CE0284600F065\n:108E900028FF0646C1788088FEF71BFC71786D1CA0\n:108EA00000FB0177EDB24D45F0D10198C01C20F0D8\n:108EB0000300019004B100203946FEF713FC01992C\n:108EC0004FF0000908440190AC484D4647780EE049\n:108ED000284600F006FF0646807B30B106F1080008\n:108EE00002F09CF9727800FB02996D1CEDB2BD4254\n:108EF000EED10198C01C20F00300019004B10020C5\n:108F00009F494A78494602F08DF901990844019039\n:108F1000214601A800F0B8FE0198C01D20F007000E\n:108F20000190DAF80010814204D3A0EB0B01B1F5F7\n:108F3000803F04DB4FF00408CAF8000004E0CAF8E0\n:108F40000000B8F1000F03D0404604B0BDE8F09F28\n:108F500084BB8C490020019A0EF044FEFBF714FA02\n:108F6000864C207F0090607F012825D0002328B305\n:108F70000022824800211030F8F73AFA00B1FFDFF2\n:108F80007E49E07F2031FEF759FF00B1FFDF7B48CB\n:108F90004FF4F6720021443005F079FA7748042145\n:108FA000443080F8E91180F8EA11062180F8EB11CD\n:108FB000032101710020C8E70123D8E702AAD8E7FE\n:108FC00070B56E4C06464434207804EB4015E078CA\n:108FD000083598B9A01990F8E80100280FD0A078BA\n:108FE0000F2800D3FFDF20220021284605F04FFA8A\n:108FF000687866F3020068700120E070284670BD52\n:109000002DE9F04105460C460027007805219046E1\n:109010003E46B1EB101F00D0FFDF287A50B1012887\n:109020000ED0FFDFA8F800600CB12780668000201A\n:10903000BDE8F0810127092674B16888A08008E0A6\n:109040000227142644B16888A0802869E060A88AB5\n:109050002082287B2072E5E7A8F80060E7E730B5BA\n:10906000464C012000212070617020726072032242\n:10907000A272E07261772177217321740521218327\n:109080001F216183607440A161610A21A177E077AB\n:1090900039483B4DB0F801102184C07884F8220093\n:1090A0004FF4B06060626868C11C21F00301814226\n:1090B00000D0FFDF6868606030BD30B5304C1568A7\n:1090C000636810339D4202D20420136030BD2B4BE5\n:1090D0005D785A6802EB0512107051700320D08041\n:1090E000172090800120D0709070002090735878E5\n:1090F000401C5870606810306060002030BD70B552\n:1091000006461E480024457807E0204600F0E9FDA9\n:109110000178B14204D0641CE4B2AC42F5D1002025\n:1091200070BDF7B5074608780C4610B3FFF7E7FFA8\n:109130000546A7F12006202F06D0052E19D2DFE81C\n:1091400006F00F383815270000F0D6FD0DB169780C\n:1091500000E00021401AA17880B20844FF2808D816\n:10916000A07830B1A088022831D202E060881728A8\n:109170002DD20720FEBD000030610200B0030020A8\n:109180001C000020000000206E52463578000000D0\n:10919000207AE0B161881729EBD3A1881729E8D399\n:1091A000A1790029E5D0E1790029E2D0402804D94D\n:1091B000DFE7242F0BD1207A48B161884FF6FB708E\n:1091C000814202D8A188814201D90420D2E765B941\n:1091D000207802AA0121FFF770FF0028CAD1207869\n:1091E000FFF78DFF050000D1FFDF052E18D2DFE865\n:1091F00006F0030B0E081100A0786870A088E880C4\n:109200000FE06088A8800CE0A078A87009E0A07842\n:10921000E87006E054F8020FA8606068E86000E0BB\n:10922000FFDF0020A6E71A2835D00DDC132832D244\n:10923000DFE800F01B31203131272723252D313184\n:1092400029313131312F0F00302802D003DC1E28A4\n:1092500021D1072070473A3809281CD2DFE800F0F6\n:10926000151B0F1B1B1B1B1B07000020704743F225\n:109270000400704743F202007047042070470D203D\n:1092800070470F2070470820704711207047132047\n:109290007047062070470320704710B5007800F033\n:1092A000010009F0F3FDBDE81040BCE710B50078FF\n:1092B00000F0010009F0F3FDBDE81040B3E70EB582\n:1092C000017801F001018DF80010417801F00101F1\n:1092D0008DF801100178C1F340018DF8021041783A\n:1092E000C1F340018DF80310017889088DF804104E\n:1092F000417889088DF8051081788DF80610C178BD\n:109300008DF8071000798DF80800684608F0FDFD1B\n:10931000FFF789FF0EBD2DE9FC5FDFF8F883FE4CF7\n:1093200000264FF490771FE0012000F082FD01201D\n:10933000FFF746FE05463946D8F808000AF0F1FB6B\n:10934000686000B9FFDF686808F0AAFCB0B1284681\n:10935000FAF75EFB284600F072FD28B93A466968C4\n:10936000D8F808000AF008FC94F9E9010428DBDACF\n:1093700002200AF043FD07460025AAE03A46696844\n:10938000D8F808000AF0F8FBF2E7B8F802104046F7\n:10939000491C89B2A8F80210B94201D300214180CA\n:1093A0000221B8F802000AF081FD002866D0B8F862\n:1093B0000200694609F0CFFCFFF735FF00B1FFDF7F\n:1093C0009DF80000019078B1B8F802000AF0B1FEF3\n:1093D0005FEA000900D1FFDF48460AF020F918B122\n:1093E000B8F8020002F0E4F9B8F802000AF08FFEC3\n:1093F0005FEA000900D1FFDF48460AF008F9E8BB40\n:109400000321B8F802000AF051FD5FEA000B4BD1CE\n:10941000FFDF49E0DBF8100010B10078FF284DD0E5\n:10942000022000F006FD0220FFF7CAFD82464846F2\n:109430000AF0F9F9CAF8040000B9FFDFDAF804000D\n:109440000AF0C1FA002100900170B8F802105046ED\n:10945000AAF8021002F0B2F848460AF0B6FA00B9CB\n:10946000FFDF019800B10126504600F0E8FC18B972\n:109470009AF80100000705D5009800E027E0CBF836\n:10948000100011E0DBF8101039B10878401C10F022\n:10949000FF00087008D1FFDF06E0002211464846B1\n:1094A00000F0F0FB00B9FFDF94F9EA01022805DBC8\n:1094B000B8F8020002F049F80028ABD194F9E901AC\n:1094C000042804DB48460AF0E4FA00B101266D1CCA\n:1094D000EDB2BD4204D294F9EA010228BFF655AFBD\n:1094E000002E7FF41DAFBDE8FC5F032000F0A1BC9F\n:1094F00010B5884CE06008682061AFF2E510F9F71C\n:10950000E4FC607010BD844800214438017081483B\n:10951000017082494160704770B505464FF0805038\n:109520000C46D0F8A410491C05D1D0F8A810C943A6\n:109530000904090C0BD050F8A01F01F0010129709B\n:10954000416821608068A080287830B970BD06210C\n:1095500020460DF0CCFF01202870607940F0C0005B\n:10956000607170BD70B54FF080540D46D4F8801016\n:10957000491C0BD1D4F88410491C07D1D4F88810A9\n:10958000491C03D1D4F88C10491C0CD0D4F880109D\n:109590000160D4F884104160D4F888108160D4F858\n:1095A0008C10C16002E010210DF0A1FFD4F89000F2\n:1095B000401C0BD1D4F89400401C07D1D4F898007B\n:1095C000401C03D1D4F89C00401C09D054F8900FE3\n:1095D000286060686860A068A860E068E86070BDA6\n:1095E0002846BDE8704010210DF081BF4A4800793F\n:1095F000E6E470B5484CE07830B3207804EB4010D6\n:10960000407A00F00700204490F9E801002800DCCF\n:10961000FFDF2078002504EB4010407A00F00700BF\n:10962000011991F8E801401E81F8E8012078401CFA\n:10963000C0B220700F2800D12570A078401CA07007\n:109640000DF0D4FDE57070BDFFDF70BD3EB5054681\n:1096500003210AF02BFC044628460AF058FD054673\n:1096600004B9FFDF206918B10078FF2800D1FFDFBF\n:1096700001AA6946284600F005FB60B9FFDF0AE051\n:10968000002202A9284600F0FDFA00B9FFDF9DF88C\n:10969000080000B1FFDF9DF80000411E8DF80010AA\n:1096A000EED220690199884201D1002020613EBD9F\n:1096B00070B50546A0F57F400C46FF3800D1FFDFAE\n:1096C000012C01D0FFDF70BDFFF790FF040000D137\n:1096D000FFDF207820F00F00401D20F0F000503018\n:1096E000207065800020207201202073BDE870404A\n:1096F0007FE72DE9F04116460D460746FFF776FF56\n:10970000040000D1FFDF207820F00F00401D20F082\n:10971000F00005E01C000020F403002048140020A5\n:109720005030207067800120207228682061A8884E\n:10973000A0822673BDE8F0415BE77FB5FFF7DFFC51\n:10974000040000D1FFDF02A92046FFF7EBFA05462F\n:1097500003A92046FFF700FB8DF800508DF80100AB\n:10976000BDF80800001DADF80200BDF80C00001D9A\n:10977000ADF80400E088ADF80600684609F070FB1B\n:10978000002800D0FFDF7FBD2DE9F05FFC4E814651\n:10979000307810B10820BDE8F09F4846F7F77FFD0C\n:1097A00008B11020F7E7F74C207808B9FFF757FC0D\n:1097B000A17A607A4D460844C4B200F09DFAA042F6\n:1097C00007D2201AC1B22A460020FFF776FC0028F3\n:1097D000E1D17168EB48C91C002721F003017160D9\n:1097E000B3463E463D46BA463C4690F801800AE004\n:1097F000204600F076FA4178807B0E4410FB01553C\n:10980000641CE4B27F1C4445F2D10AEB870000EBF4\n:10981000C600DC4E00EB85005C46F17A012200EBCD\n:109820008100DBF80410451829464846FFF7B0FAD6\n:10983000070012D00020FFF762FC05000BD005F1F5\n:109840001300616820F00300884200D0FFDF7078C9\n:10985000401E7070656038469DE7002229464846E4\n:10986000FFF796FA00B1FFDFD9F8000060604FF60D\n:10987000FF7060800120207000208CE72DE9F0410E\n:109880000446BF4817460D46007810B10820BDE8D1\n:10989000F0810846F7F7DDFC08B11020F7E7B94E74\n:1098A000307808B9FFF7DBFB601E1E2807D8012CB3\n:1098B00023D12878FE2820D8B0770020E7E7A4F14C\n:1098C00020001F2805D8E0B23A462946BDE8F041FD\n:1098D00027E4A4F140001F2805D829462046BDE80A\n:1098E000F04100F0D4BAA4F1A0001F2805D8294601\n:1098F0002046BDE8F04100F006BB0720C7E72DE990\n:10990000F05F81460F460846F7F7C9FC48B948465C\n:10991000F7F7E3FC28B909F1030020F003014945FA\n:1099200001D0102037E797484FF0000B4430817882\n:1099300069B14178804600EB411408343E883A46CC\n:109940000021204600F089FA050004D027E0A7F89E\n:1099500000B005201FE7B9F1000F24D03888B042CD\n:1099600001D90C251FE0607800F00700824600F066\n:1099700060FA08EB0A063A4696F8E8014946401CA8\n:1099800086F8E801204600F068FA054696F8E801F6\n:10999000401E86F8E801032000F04BFA2DB10C2D93\n:1099A00001D0A7F800B02846F5E6754F5046BAF149\n:1099B000010F25D002280DD0BAF1030F35D0FFDFFB\n:1099C00098F801104046491CC9B288F801100F29C7\n:1099D00037D038E0606828B16078000702D460882A\n:1099E000FFF734FE98F8EA014446012802D178785E\n:1099F000F9F78AFA94F9EA010428E1DBFFDFDFE7EF\n:109A0000616821B14FF49072B8680AF0B5F898F81F\n:109A1000E9014446032802D17878F9F775FA94F9F8\n:109A2000E9010428CCDBFFDFCAE76078C00602D575\n:109A30006088FFF70BFE98F9EB010628C0DBFFDF1B\n:109A4000BEE780F801B08178491E88F8021096F8C8\n:109A5000E801401C86F8E801A5E770B50C4605460C\n:109A6000F7F7F7FB18B92046F7F719FC08B11020F3\n:109A700070BD28460BF07FFF207008B1002070BD3C\n:109A8000042070BD70B505460BF08EFFC4B22846A9\n:109A9000F7F723FC08B1102070BD35B128782C7081\n:109AA00018B1A04201D0072070BD2046FDF77EFE10\n:109AB000052805D10BF07BFF012801D0002070BDE7\n:109AC0000F2070BD70B5044615460E460846F7F7E0\n:109AD000C0FB18B92846F7F7E2FB08B1102070BDAB\n:109AE000022C03D0102C01D0092070BD2A4631462B\n:109AF00020460BF086FF0028F7D0052070BD70B51A\n:109B000014460D460646F7F7A4FB38B92846F7F782\n:109B1000C6FB18B92046F7F7E0FB08B1102070BD6E\n:109B20002246294630460BF06EFF0028F7D007206A\n:109B300070BD3EB50446F7F7B2FB08B110203EBD3C\n:109B4000684608F053F9FFF76EFB0028F7D19DF83F\n:109B500006002070BDF808006080BDF80A00A080F3\n:109B600000203EBD70B505460C460846F7F7B5FB2C\n:109B700020B95CB12068F7F792FB28B1102070BDC6\n:109B80001C000020B0030020A08828B121462846F0\n:109B9000BDE87040FDF762BE0920F0E770B50546EC\n:109BA0000C460846F7F755FBA0BB681E1E280ED8CA\n:109BB000032D01D90720E2E705B9FFDFFE4800EBDE\n:109BC000850050F8041C2046BDE870400847A5F108\n:109BD00020001F2805D821462846BDE87040FAF726\n:109BE00042BBA5F160001F2805D821462846BDE8E4\n:109BF0007040F8F7DABCF02D0DD0F12D15D0BF2D47\n:109C0000D8D1A078218800F0010001F08DFB98B137\n:109C10000020B4E703E0A068F7F71BFB08B11020B1\n:109C2000ADE7204609F081F902E0207809F0A0F9BB\n:109C3000BDE87040FFF7F7BA0820A0E770B504460A\n:109C40000D460846F7F72BFB30B9601E1E280FD8CB\n:109C50002846F7F7FEFA08B1102090E7012C03D050\n:109C6000022C01D0032C01D1062088E7072086E7CB\n:109C7000A4F120001F28F9D829462046BDE87040ED\n:109C8000FAF762BB09F092BC38B50446CB48007BBA\n:109C900000F00105F9B904F01DFC0DB1226800E0E7\n:109CA0000022C7484178C06807F06DFDC4481030F5\n:109CB000C0788DF8000010B1012802D004E0012026\n:109CC00000E000208DF80000684608F0FFF8BA4870\n:109CD000243808F0B5FE002D02D02068283020601E\n:109CE00038BD30B5B54D04466878A04200D8FFDFD6\n:109CF000686800EB041030BD70B5B04800252C46F4\n:109D0000467807E02046FFF7ECFF4078641C2844C3\n:109D1000C5B2E4B2B442F5D1284630E72DE9F041AE\n:109D20000C4607464FF0000800F01FF90646FF28D2\n:109D300001D94FF013083868C01C20F003023A60C4\n:109D400054EA080421D19D48F3B2072128300DF0D0\n:109D5000DBFD09E0072C10D2DFE804F00604080858\n:109D60000A040600974804E0974802E0974800E09C\n:109D700097480DF0E9FD054600E0FFDFA54200D061\n:109D8000FFDF641CE4B2072CE4D3386800EB061054\n:109D9000386040467BE5021D5143452900D24521EC\n:109DA0000844C01CB0FBF2F0C0B270472DE9FC5F64\n:109DB000064682484FF000088B464746444690F8D6\n:109DC000019022E02046FFF78CFF050000D1FFDF65\n:109DD000687869463844C7B22846FEF7A3FF824632\n:109DE00001A92846FEF7B8FF0346BDF80400524615\n:109DF000001D81B2BDF80000001D80B20AF0D4F849\n:109E00006A78641C00FB0288E4B24C45DAD1306801\n:109E1000C01C20F003003060BBF1000F00D0002018\n:109E2000424639460AF0CEF8316808443060BDE851\n:109E3000FC9F6249443108710020C87070475F4937\n:109E40004431CA782AB10A7801EB421108318142C3\n:109E500001D001207047002070472DE9F0410646EF\n:109E60000078154600F00F0400201080601E0F4699\n:109E7000052800D3FFDF50482A46183800EB84003D\n:109E8000394650F8043C3046BDE8F04118472DE90A\n:109E9000F0414A4E0C46402806D0412823D04228A3\n:109EA0002BD0432806D123E0A07861780D18E17803\n:109EB000814201D90720EAE42078012801D9132042\n:109EC000E5E4FF2D08D80BF009FF07460DF046F931\n:109ED000381A801EA84201DA1220D8E42068B06047\n:109EE000207930730DE0BDE8F041084600F078B805\n:109EF00008780228DED8307703E008780228D9D81D\n:109F000070770020C3E4F8B500242C4DA02805D0BC\n:109F1000A12815D0A22806D00720F8BD087800F0A7\n:109F20000100E8771FE00E4669463046FDF73DFD2B\n:109F30000028F2D130882884B07885F8220012E019\n:109F400008680921F82801D3820701D00846F8BD26\n:109F50006A7C02F00302012A04D16A8BD73293B2E1\n:109F60008342F3D868622046F8BD2DE9F047DFF858\n:109F70004C900026344699F8090099F80A2099F87F\n:109F800001700244D5B299F80B20104400F0FF088C\n:109F900008E02046FFF7A5FE817B407811FB0066B4\n:109FA000641CE4B2BC42F4D199F8091099F80A0093\n:109FB0002944294441440DE054610200B0030020CB\n:109FC0001C0000206741000045B30000DD2F0000A9\n:109FD000FB56010000B1012008443044BDE8F08781\n:109FE00038B50446407800F00300012803D0022869\n:109FF0000BD0072038BD606858B1F7F777F9D0B9B2\n:10A000006068F7F76AF920B915E06068F7F721F999\n:10A0100088B969462046FCF729F80028EAD160781B\n:10A0200000F00300022808D19DF8000028B1606804\n:10A03000F7F753F908B1102038BD6189F8290DD818\n:10A04000208988420AD8607800F003020A48012A71\n:10A0500006D1D731426A89B28A4201D2092038BD7D\n:10A0600094E80E0000F1100585E80E000AB9002101\n:10A070000183002038BD0000B00300202DE9F0412D\n:10A08000074614468846084601F08AFD064608EB56\n:10A0900088001C22796802EBC0000D18688C58B14A\n:10A0A0004146384601F08BFD014678680078C200D1\n:10A0B000082305F120000CE0E88CA8B141463846A1\n:10A0C00001F084FD0146786808234078C20005F15C\n:10A0D000240009F0A8FD38B1062121726681D0E97B\n:10A0E0000010C4E9031009E0287809280BD00520E6\n:10A0F000207266816868E060002028702046BDE814\n:10A10000F04101F02EBD072020726681F4E72DE9B1\n:10A11000F04116460D460746406801EB85011C22BA\n:10A1200002EBC1014418204601F072FD40B100214C\n:10A13000708865F30F2160F31F4106200DF0BEFC0F\n:10A1400009202070324629463846BDE8F04195E79F\n:10A150002DE9F0410E46074600241C21F07816E058\n:10A1600004EB8403726801EBC303D25C6AB1FFF7AE\n:10A170003DFA050000D1FFDF6F802A4621463046B8\n:10A18000FFF7C5FF0120BDE8F081641CE4B2A042E6\n:10A19000E6D80020F7E770B5064600241C21C078F9\n:10A1A0000AE000BF04EB8403726801EBC303D51817\n:10A1B0002A782AB1641CE4B2A042F3D8402070BDD2\n:10A1C00028220021284604F062F9706880892881DD\n:10A1D000204670BD70B5034600201C25DC780CE0DD\n:10A1E00000EB80065A6805EBC6063244167816B1B5\n:10A1F000128A8A4204D0401CC0B28442F0D8402067\n:10A2000070BDF0B5044600201C26E5780EE000BFC6\n:10A2100000EB8007636806EBC7073B441F788F425B\n:10A2200002D15B78934204D0401CC0B28542EFD883\n:10A230004020F0BD0078032801D0002070470120A5\n:10A2400070470078022801D0002070470120704735\n:10A250000078072801D000207047012070472DE9C1\n:10A26000F041064688461078F1781546884200D3BA\n:10A27000FFDF2C781C27641CF078E4B2A04201D8E0\n:10A28000201AC4B204EB8401706807EBC1010844D2\n:10A29000017821B14146884708B12C7073E72878CE\n:10A2A000A042E8D1402028706DE770B514460B88B5\n:10A2B0000122A240134207D113430B8001230A223B\n:10A2C000011D09F07AFC047070BD2DE9FF4F81B0CB\n:10A2D0000878DDE90E7B9A4691460E4640072CD45D\n:10A2E000019809F026FF040000D1FFDF07F1040800\n:10A2F00020461FFA88F109F065F8050000D1FFDF5C\n:10A30000204629466A4609F0B0FA0098A0F8037082\n:10A31000A0F805A0284609F056FB017869F306016C\n:10A320006BF3C711017020461FFA88F109F08DF810\n:10A3300000B9FFDF019807F094F906EB0900017FEF\n:10A34000491C017705B0BDE8F08F2DE9F84F0E46A6\n:10A350009A4691460746032109F0A8FD0446008D60\n:10A36000DFF8B885002518B198F80000B0421ED17A\n:10A37000384609F0DEFE070000D1FFDF09F10401D5\n:10A38000384689B209F01EF8050010D03846294633\n:10A390006A4609F06AFA009800210A460180817035\n:10A3A00007F01CFA0098C01DCAF8000021E098F8D8\n:10A3B0000000B04216D104F1260734F8341F012002\n:10A3C00000FA06F911EA090F00D0FFDF2088012307\n:10A3D00040EA090020800A22391D384609F008FCAD\n:10A3E000067006E0324604F1340104F12600FFF75E\n:10A3F0005CFF0A2188F800102846BDE8F88FFEB5FA\n:10A4000015460C46064602AB0C220621FFF79DFFBF\n:10A41000002827D00299607812220A70801C4870A8\n:10A4200008224A80A07002982988052381806988C3\n:10A43000C180A9880181E988418100250C20CDE9EE\n:10A440000005062221463046FFF73FFF294600223D\n:10A4500066F31F41F02310460DF086FA6078801CE9\n:10A4600060700120FEBDFEB514460D46062206466C\n:10A4700002AB1146FFF769FF002812D0029B1320A0\n:10A4800000211870A8785870022058809C800620FF\n:10A49000CDE900010246052329463046FFF715FFA6\n:10A4A0000120FEBD2DE9FE430C46804644E002AB90\n:10A4B0000E2207214046FFF748FF002841D0606880\n:10A4C0001C2267788678BF1C06EB860102EBC1016F\n:10A4D000451802981421017047700A214180698A49\n:10A4E0000181E98A4181A9888180A98981813046D9\n:10A4F00001F056FB029905230722C8806F700420E3\n:10A50000287000250E20CDE9000521464046FFF7C2\n:10A51000DCFE294666F30F2168F31F41F023002279\n:10A5200006200DF021FA6078FD49801C6070626899\n:10A530002046921CFFF793FE606880784028B6D1D1\n:10A540000120BDE8FE83FEB50D46064638E002ABAD\n:10A550000E2207213046FFF7F8FE002835D0686844\n:10A560001C23C17801EB810203EBC202841802981C\n:10A5700015220270627842700A224280A2894281CA\n:10A58000A2888281084601F00BFB01460298818077\n:10A59000618AC180E18A0181A088B8B10020207061\n:10A5A00000210E20CDE9000105230722294630466F\n:10A5B000FFF78BFE6A68DB492846D21CFFF74FFE87\n:10A5C0006868C0784028C2D10120FEBD0620E6E7B9\n:10A5D0002DE9FE430C46814644E0204601F002FB93\n:10A5E000D0B302AB082207214846FFF7AEFE002891\n:10A5F000A7D060681C2265780679AD1C06EB860141\n:10A6000002EBC10147180298B7F8108006210170CB\n:10A61000457004214180304601F0C2FA014602989B\n:10A6200005230722C180A0F804807D7008203870BF\n:10A630000025CDE9000521464846FFF746FE29469C\n:10A6400066F30F2169F31F41F023002206200DF06D\n:10A650008BF96078801C60706268B3492046121DD7\n:10A66000FFF7FDFD606801794029B6D1012068E758\n:10A670002DE9F34F83B00D4691E0284601F0B2FA80\n:10A6800000287DD068681C2290F806A00AEB8A0199\n:10A6900002EBC10144185146284601F097FAA1780F\n:10A6A000CB0069684978CA00014604F1240009F02A\n:10A6B000D6FA07468188E08B4FF00009091A8EB25E\n:10A6C00008B1C84607E04FF00108504601F053FAC0\n:10A6D00008B9B61CB6B2208BB04200D80646B346C5\n:10A6E00002AB324607210398FFF72FFE060007D082\n:10A6F000B8F1000F0BD0504601F03DFA10B106E062\n:10A7000000201FE60299B8884FF0020908800196E0\n:10A71000E28B3968ABEB09001FFA80F80A44039812\n:10A720004E46009209F005FDDDE90021F61D434685\n:10A73000009609F014F9E08B404480B2E083B988B8\n:10A74000884201D1012600E00026CDE900B6238A27\n:10A75000072229460398FFF7B8FD504601F00BFA8F\n:10A7600010B9E089401EE08156B1A078401CA0706D\n:10A770006868E978427811FB02F1CAB2012300E06F\n:10A7800007E081690E3009F018FA80F800A0002077\n:10A79000E0836A6865492846921DFFF760FD686896\n:10A7A000817940297FF469AF0120CBE570B5064679\n:10A7B00048680D4614468179402910D104EB840184\n:10A7C0001C2202EBC101084401F043FA002806D024\n:10A7D0006868294684713046BDE8704048E770BD1E\n:10A7E000FEB50C460746002645E0204601F0FAF982\n:10A7F000D8B360681C22417901EB810102EBC101F1\n:10A800004518688900B9FFDF02AB082207213846E6\n:10A81000FFF79BFD002833D00299607816220A705A\n:10A82000801C4870042048806068407901F0B8F9C5\n:10A83000014602980523072281806989C18008208A\n:10A84000CDE9000621463846FFF73FFD6078801CC1\n:10A850006070A88969890844B0F5803F00D3FFDFA4\n:10A86000A88969890844A8816E81626830492046B8\n:10A87000521DFFF7F4FC606841794029B5D10120F1\n:10A88000FEBD30B5438C458BC3F3C704002345B1EF\n:10A89000838B641EED1AC38A6D1E1D4495FBF3F372\n:10A8A000E4B22CB1008918B1A04200D8204603447C\n:10A8B0004FF6FF70834200D3034613800C7030BD07\n:10A8C0002DE9FC41074616460D46486802EB860115\n:10A8D0001C2202EBC10144186A4601A92046FFF779\n:10A8E000D0FFA089618901448AB2BDF8001091426D\n:10A8F00012D0081A00D5002060816868407940288D\n:10A900000AD1204601F09BF9002805D06868294645\n:10A9100046713846FFF764FFBDE8FC813000002037\n:10A9200035A2000043A2000051A2000053BC000069\n:10A930003FBC00002DE9FE4F0F468146154650886A\n:10A94000032109F0B3FA0190B9F8020001F01BF9F4\n:10A9500082460146019801F045F9002824D001986B\n:10A960001C2241680AEB8A0002EBC0000C1820464A\n:10A9700001F04EF9002817D1B9F80000E18A8842A9\n:10A980000ED8A18961B1B8420ED100265146019876\n:10A9900001F015F9218C01EB0008608B30B114E057\n:10A9A000504601F0E8F8A0B3BDE8FE8F504601F034\n:10A9B000E2F808B1678308E0022FF5D3B9F8040084\n:10A9C0006083618A884224D80226B81B87B2B8F80F\n:10A9D0000400A28B801A002814DD874200DA384672\n:10A9E0001FFA80FB688869680291D8F800100A4451\n:10A9F000009209F08CFBF61D009A5B4602990096C6\n:10AA000008F079FFA08B384480B2A083618B884224\n:10AA100007D96888019903B05246BDE8F04F01F0AC\n:10AA200035B91FD14FF009002872B9F802006881CA\n:10AA3000D8E90010C5E90410608BA881284601F010\n:10AA400090F85146019801F0BAF8014601980823A0\n:10AA500040680078C20004F1200009F0E4F800200A\n:10AA6000A0836083504601F086F810B9A089401E8B\n:10AA7000A0816888019903B00AF0FF02BDE8F04F99\n:10AA80001EE72DE9F041064615460F461C461846BE\n:10AA9000F6F7DFFB18B92068F6F701FC10B11020BB\n:10AAA000BDE8F0817168688C0978B0EBC10F01D303\n:10AAB0001320F5E73946304601F081F80146706809\n:10AAC00008230078C20005F1200009F076F8D4E9E7\n:10AAD0000012C0E900120020E2E710B5044603218D\n:10AAE00009F0E4F90146007800F00300022805D0DF\n:10AAF0002046BDE8104001F1140280E48A8A204615\n:10AB0000BDE81040AFE470B50446032109F0CEF96A\n:10AB1000054601462046FFF75BFD002816D0294672\n:10AB20002046FFF75DFE002810D029462046FFF79B\n:10AB30000AFD00280AD029462046FFF7B3FC00286A\n:10AB400004D029462046BDE8704091E570BD2DE94E\n:10AB5000F0410C4680461EE0E178427811FB02F19C\n:10AB6000CAB2816901230E3009F05DF80778606888\n:10AB70001C22C179491EC17107EB8701606802EB95\n:10AB8000C10146183946204601F02CF818B130466C\n:10AB900001F037F820B16068C1790029DCD17FE786\n:10ABA000FEF724FD050000D1FFDF0A202872384699\n:10ABB00000F0F6FF68813946204601F007F80146AB\n:10ABC000606808234078C20006F1240009F02BF8E1\n:10ABD000D0E90010C5E90310A5F80280284600F06E\n:10ABE000C0FFB07800B9FFDFB078401EB07057E703\n:10ABF00070B50C460546032109F058F90146406836\n:10AC0000C2792244C2712846BDE870409FE72DE911\n:10AC1000FE4F8246507814460F464FF00008002839\n:10AC20004FD0012807D0022822D0FFDF2068B8606B\n:10AC30006068F860B8E602AB0E2208215046FFF7C4\n:10AC400084FB0028F2D00298152105230170217899\n:10AC500041700A214180C0F80480C0F80880A0F843\n:10AC60000C80628882810E20CDE90008082221E054\n:10AC7000A678304600F094FF054606EB86012C22AC\n:10AC8000786802EBC1010822465A02AB11465046D1\n:10AC9000FFF75BFB0028C9D00298072101702178DB\n:10ACA00041700421418008218580C680CDE90018CB\n:10ACB00005230A4639465046FFF707FB87F8088008\n:10ACC00072E6A678022516B1022E13D0FFDF2A1DE8\n:10ACD000914602AB08215046FFF737FB0028A5D06C\n:10ACE00002980121022E01702178417045808680F2\n:10ACF00002D005E00625EAE7A188C180E18801814C\n:10AD0000CDE900980523082239465046D4E710B50E\n:10AD10000446032109F0CAF8014600F10802204662\n:10AD2000BDE8104073E72DE9F04F0F4605468DB0A2\n:10AD300014465088032109F0B9F84FF000088DF847\n:10AD400014800646ADF81680042F7BD36A78002A5B\n:10AD500078D028784FF6FF794FF01C0A132834D0AA\n:10AD600008DC012871D006284AD007286ED01228A6\n:10AD70000ED106E014286AD0152869D0162807D10C\n:10AD8000AAE10C2F04D1307800F00301022907D08A\n:10AD9000CDF80880CDF80C8068788DF808004CE07C\n:10ADA00040F0080030706878B07001208DF8140011\n:10ADB000A888ADF81800E888ADF81A002889ADF821\n:10ADC0001C006889ADF81E0011E1B078904239D1BD\n:10ADD0003078010736D5062F34D120F008003070C6\n:10ADE0006088414660F31F4100200CF067FE02209E\n:10ADF0008DF81400ADF81890A888ADF81A00F6E0A8\n:10AE0000082F1FD1A888EF88814600F0BCFE80463D\n:10AE10000146304600F0E6FE18B1404600F0ABFEB9\n:10AE2000B8B1FC48D0E90010CDE902106878ADF85F\n:10AE30000C908DF80800ADF80E70608802AA3146BB\n:10AE4000FFF7E5FE0DB0BDE8F08FB6E01EE041E093\n:10AE5000ECE0716808EB88002C2202EBC000085A75\n:10AE6000B842EFD1EB4802AAD0E90210CDE90210B6\n:10AE700068788DF8080008F0FF058DF80A506088A2\n:10AE80003146FFF7C4FE224629461FE0082FD9D1DC\n:10AE9000B5F80480E88800F076FE074601463046A3\n:10AEA00000F0A0FE0028CDD007EB870271680AEB06\n:10AEB000C2000844028A4245C4D101780829C1D1A0\n:10AEC000407869788842BDD1F9B222463046FFF712\n:10AED0001EF9B7E70E2F7FF45BAFE9886F898B46C9\n:10AEE000B5F808903046FFF775F9ABF140014029FD\n:10AEF00001D309204AE0B9F1170F01D3172F01D26E\n:10AF00000B2043E040280ED000EB800271680AEB72\n:10AF1000C20008440178012903D140786978884249\n:10AF200090D00A2032E03046FFF735F9014640283C\n:10AF30002BD001EB810372680AEBC30002EB00081F\n:10AF4000012288F800206A7888F801207068AA88B1\n:10AF50004089B84200D93846AD8903232372A282C2\n:10AF6000E7812082A4F80C906582084600F018FE64\n:10AF70006081A8F81490A8F81870A8F80E50A8F8E6\n:10AF800010B0204600F0EDFD5CE7042005212172A1\n:10AF9000A4F80A80E081012121739E49D1E90421AE\n:10AFA000CDE9022169788DF80810ADF80A006088B3\n:10AFB00002AA3146FFF72BFEE3E7062F89D3B078CC\n:10AFC00090421AD13078010717D520F00800307070\n:10AFD0006088414660F31F4100200CF06FFD0220A5\n:10AFE0008DF81400A888ADF81800ADF81A906088A4\n:10AFF000224605A9F9F7E3F824E704213046FFF7D4\n:10B0000000F905464028BFD0022083030090224665\n:10B010002946304600F003FE4146608865F30F2163\n:10B0200060F31F4106200CF049FD0BE70E2FABD15A\n:10B0300004213046FFF7E5F881464028A4D0414678\n:10B04000608869F30F2160F31F4106200CF036FD84\n:10B05000A8890B906889099070682F894089B84247\n:10B0600000D938468346B5F80680A8880A90484635\n:10B0700000F096FD60810B9818B1022000900B9BA8\n:10B0800024E0B8F1170F1ED3172F1CD30420207211\n:10B0900009986082E781A4F810B0A4F80C8009EB4D\n:10B0A000890271680AEBC2000D18DDE90913A5F8E1\n:10B0B0001480A5F818B0E9812B82204600F051FDDC\n:10B0C00006202870BEE601200B2300902246494648\n:10B0D000304600F0A4FDB5E6082F8DD1A988304692\n:10B0E000FFF778F80746402886D000F044FD002896\n:10B0F0009BD107EB870271680AEBC20008448046C7\n:10B1000000F086FD002890D1ED88B8F80E002844A4\n:10B11000B0F5803F05D360883A46314600F0B6FD71\n:10B1200090E6002DCED0A8F80E0060883A46314651\n:10B13000FFF73CFB08202072384600F031FD6081AB\n:10B14000A5811EE72DE9F05F0C4601281FD09579F7\n:10B1500092F8048092F8056005EB85011F2202EB4E\n:10B16000C10121F0030B08EB060111FB05F14FF6BD\n:10B17000FF7202EAC10909F1030115FB0611264F0E\n:10B1800021F0031ABB6840B101283ED125E0616877\n:10B19000E57891F800804E78DEE75946184608F0C9\n:10B1A000C0FC606000B9FFDF5A460021606803F010\n:10B1B0006EF9E5705146B86808F0B3FC6168486103\n:10B1C00000B9FFDF6068426902EB090181616068D4\n:10B1D00080F800806068467017E0606852464169F8\n:10B1E000184608F0C9FC5A466168B86808F0C4FC03\n:10B1F000032008F003FE0446032008F007FE201A8F\n:10B20000012802D1B86808F081FC0BEB0A00BDE808\n:10B21000F09F000060610200300000200246002123\n:10B2200002208FE7F7B5FF4C0A20164620700098E1\n:10B2300060B100254FEA0D0008F055FC0021A17017\n:10B240006670002D01D10099A160FEBD012500208E\n:10B25000F2E770B50C46154638220021204603F06F\n:10B2600016F9012666700A22002104F11C0003F081\n:10B270000EF905B9FFDF297A207861F3010020700B\n:10B28000A87900282DD02A4621460020FFF75AFF32\n:10B2900061684020E34A88706168C870616808711D\n:10B2A000616848716168887161682888088161688F\n:10B2B00068884881606886819078002811D061682C\n:10B2C0000620087761682888C885616828884886CC\n:10B2D00060680685606869889288018681864685EF\n:10B2E000828570BDC878002802D00022012029E79D\n:10B2F000704770B50546002165F31F4100200CF032\n:10B30000DDFB0321284608F0D1FD040000D1FFDF5A\n:10B3100021462846FEF71CFF002804D0207840F084\n:10B3200010002070012070BD70B505460C4603204A\n:10B3300008F056FD08B1002070BDBA4885708480C1\n:10B34000012070BD2DE9FF4180460E460F0CFEF72F\n:10B350004DF9050007D06F800321384608F0A6FD9F\n:10B36000040008D106E004B03846BDE8F0411321DE\n:10B37000F9F750BBFFDF5FEA080005D0B8F1060F10\n:10B3800018D0FFDFBDE8FF8120782A4620F00800B2\n:10B3900020700020ADF8020002208DF800004FF66A\n:10B3A000FF70ADF80400ADF8060069463846F8F7BE\n:10B3B00006FFE7E7C6F3072101EB81021C23606863\n:10B3C00003EBC202805C042803D008280AD0FFDF08\n:10B3D000D8E7012000904FF440432A46204600F071\n:10B3E0001EFCCFE704B02A462046BDE8F041FEF738\n:10B3F0008EBE2DE9F05F05464089002790460C4639\n:10B400003E46824600F0BFFB8146287AC01E0828CF\n:10B410006BD2DFE800F00D04192058363C47722744\n:10B420001026002C6CD0D5E90301C4E902015CE0D0\n:10B4300070271226002C63D00A2205F10C0104F1BA\n:10B44000080002F0FAFF50E071270C26002C57D0BC\n:10B45000E868A06049E0742710269CB3D5E9030191\n:10B46000C4E902016888032108F020FD8346FEF745\n:10B47000BDF802466888508049465846FEF7FEFDF2\n:10B4800033E075270A26ECB1A88920812DE07627C4\n:10B490001426BCB105F10C0004F1080307C883E8C9\n:10B4A000070022E07727102664B1D5E90301C4E93B\n:10B4B00002016888032108F0F9FC01466888FFF75B\n:10B4C00046FB12E01CE073270826CCB168880321F4\n:10B4D00008F0ECFC01460078C00606D56888FEF747\n:10B4E00037FE10B96888F8F777FAA8F800602CB131\n:10B4F0002780A4F806A066806888A080002086E6E1\n:10B50000A8F80060FAE72DE9FC410C461E461746F4\n:10B510008046032108F0CAFC05460A2C0AD2DFE85F\n:10B5200004F005050505050509090907042303E0DD\n:10B53000062301E0FFDF0023CDE9007622462946FD\n:10B540004046FEF7C2FEBDE8FC81F8B50546A0F511\n:10B550007F40FF382BD0284608F0D9FD040000D1E9\n:10B56000FFDF204608F05FF9002821D001466A4637\n:10B57000204608F07AF900980321B0F805602846C3\n:10B5800008F094FC0446052E13D0304600F0FBFA78\n:10B5900005460146204600F025FB40B1606805EBFA\n:10B5A00085013E2202EBC101405A002800D0012053\n:10B5B000F8BD007A0028FAD00020F8BDF8B504469E\n:10B5C000408808F0A4FD050000D1FFDF6A46284648\n:10B5D000616800F0C4FA01460098091F8BB230F888\n:10B5E000032F0280428842800188994205D1042AB3\n:10B5F00008D0052A20D0062A16D022461946FFF781\n:10B6000099F9F8BD001D0E46054601462246304612\n:10B61000F6F739FF0828F4D1224629463046FCF7D0\n:10B6200064F9F8BD30000020636864880A46011D93\n:10B630002046FAF789F9F4E72246001DFFF773FB6D\n:10B64000EFE770B50D460646032108F02FFC040015\n:10B6500004D02078000704D5112070BD43F2020009\n:10B6600070BD2A4621463046FEF7C9FE18B9286843\n:10B6700060616868A061207840F0080020700020B8\n:10B6800070BD70B50D460646032108F00FFC04009E\n:10B6900004D02078000704D4082070BD43F20200D3\n:10B6A00070BD2A4621463046FEF7DDFE00B9A58270\n:10B6B000207820F008002070002070BD2DE9F04FA8\n:10B6C0000E4691B08046032108F0F0FB0446404648\n:10B6D00008F02FFD07460020079008900990ADF86C\n:10B6E00030000A9002900390049004B9FFDF0DF13E\n:10B6F0000809FFB9FFDF1DE038460BA9002207F05B\n:10B7000055FF9DF82C0000F07F050A2D00D3FFDFC8\n:10B710006019017F491E01779DF82C00000609D5AC\n:10B720002A460CA907A8FEF7C0FD19F80510491C08\n:10B7300009F80510761EF6B2DED204F13400F84D99\n:10B7400004F1260BDFF8DCA304F12A07069010E0D1\n:10B750005846069900F08CFA064628700A2800D34D\n:10B76000FFDF5AF8261040468847E08CC05DB042A3\n:10B7700002D0208D0028EBD10A202870E94D4E46DA\n:10B7800028350EE00CA907A800F072FA0446375DD0\n:10B7900055F8240000B9FFDF55F82420394640460B\n:10B7A0009047BDF81E000028ECD111B0BDE8F08F25\n:10B7B00010B5032108F07AFB040000D1FFDF0A2254\n:10B7C000002104F11C0002F062FE207840F0040029\n:10B7D000207010BD10B50C46032108F067FB204413\n:10B7E000007F002800D0012010BD2DE9F84F8946C8\n:10B7F00015468246032108F059FB070004D028466D\n:10B80000F5F727FD40B903E043F20200BDE8F88FE9\n:10B810004846F5F744FD08B11020F7E7786828B1ED\n:10B8200069880089814201D90920EFE7B9F8000051\n:10B830001C2488B100F0A7F980460146384600F084\n:10B84000D1F988B108EB8800796804EBC000085C86\n:10B8500001280BD00820D9E73846FEF79CFC80462B\n:10B86000402807D11320D1E70520CFE7FDF7BEFE22\n:10B8700006000BD008EB8800796804EBC0000C18B8\n:10B88000B9F8000020B1E88910B113E01120BDE73C\n:10B890002888172802D36888172801D20720B5E71F\n:10B8A000686838B12B1D224641463846FFF7E9F853\n:10B8B0000028ABD104F10C0269462046FEF7E1FFF7\n:10B8C000288860826888E082B9F8000030B10220E0\n:10B8D0002070E889A080E889A0B12BE003202070C7\n:10B8E000A889A08078688178402905D180F80280F5\n:10B8F00039465046FEF7D6FD404600F051F9A9F80A\n:10B90000000021E07868218B4089884200D90846F0\n:10B910002083A6F802A004203072B9F800007081DC\n:10B92000E0897082F181208B3082A08AB08130461C\n:10B9300000F017F97868C178402905D180F80380B4\n:10B9400039465046FEF7FFFD00205FE770B50D4613\n:10B950000646032108F0AAFA04000ED0284600F09B\n:10B9600012F905460146204600F03CF918B1284678\n:10B9700000F001F920B1052070BD43F2020070BD56\n:10B9800005EB85011C22606802EBC101084400F050\n:10B990003FF908B1082070BD2A462146304600F024\n:10B9A00075F9002070BD2DE9F0410C461746804620\n:10B9B000032108F07BFA0546204600F0E4F804462F\n:10B9C00095B10146284600F00DF980B104EB8401E1\n:10B9D0001C22686802EBC1014618304600F018F9D5\n:10B9E00038B10820BDE8F08143F20200FAE70520F3\n:10B9F000F8E73B46324621462846FFF742F8002842\n:10BA0000F0D1E2B229464046FEF75AFF708C083862\n:10BA1000082803D242484078F7F776FA0020E1E799\n:10BA20002DE9F0410D4617468046032108F03EFA05\n:10BA30000446284600F0A7F8064624B13846F5F734\n:10BA400008FC38B902E043F20200CBE73868F5F7AA\n:10BA500000FC08B11020C5E73146204600F0C2F8CE\n:10BA600060B106EB86011C22606802EBC10145183B\n:10BA7000284600F0CDF818B10820B3E70520B1E75B\n:10BA8000B888A98A884201D90C20ABE76168E88CA4\n:10BA90004978B0EBC10F01D31320A3E7314620460C\n:10BAA00000F094F80146606808234078C20005F170\n:10BAB000240008F082F8D7E90012C0E90012F2B2BF\n:10BAC00021464046FEF772FE00208BE72DE9F04745\n:10BAD0000D461F4690468146032108F0E7F90446CB\n:10BAE000284600F050F806463CB14DB13846F5F70F\n:10BAF000F4FB50B11020BDE8F08743F20200FAE7F2\n:10BB0000606858B1A0F80C8027E03146204600F06C\n:10BB100069F818B1304600F02EF828B10520EAE7A0\n:10BB2000300000207861020006EB86011C2260686C\n:10BB300002EBC1014518284600F06AF808B1082058\n:10BB4000D9E7A5F80880F2B221464846FEF7B8FECC\n:10BB50001FB1A8896989084438800020CBE707F025\n:10BB600084BE017821F00F01491C21F0F001103151\n:10BB70000170FDF73EBD20B94E48807808B1012024\n:10BB80007047002070474B498988884201D10020C6\n:10BB90007047402801D2402000E0403880B2704712\n:10BBA00010B50446402800D9FFDF2046FFF7E3FF29\n:10BBB00010B14048808810BD4034A0B210BD40682C\n:10BBC00042690078484302EBC0007047C278406881\n:10BBD000037812FB03F24378406901FB032100EB79\n:10BBE000C1007047C2788A4209D9406801EB8101DF\n:10BBF0001C2202EBC101405C08B10120704700200B\n:10BC000070470078062801D901207047002070474E\n:10BC10000078062801D00120704700207047F0B45A\n:10BC200001EB81061C27446807EBC6063444049DDB\n:10BC300005262670E3802571F0BCFEF71FBA10B50B\n:10BC4000418911B1FFF7DDFF08B1002010BD0120CF\n:10BC500010BD10B5C18C8278B1EBC20F04D9C18977\n:10BC600011B1FFF7CEFF08B1002010BD012010BDBB\n:10BC700010B50C4601230A22011D07F0D4FF0078FD\n:10BC80002188012282409143218010BDF0B402EB53\n:10BC900082051C264C6806EBC505072363554B68D7\n:10BCA0001C79402C03D11A71F0BCFEF791BCF0BC9A\n:10BCB000704700003000002010B5EFF3108000F056\n:10BCC000010472B6FC484178491C41704078012853\n:10BCD00001D10BF0B3FA002C00D162B610BD70B5E3\n:10BCE000F54CA07848B90125A570FFF7E5FF0BF0EA\n:10BCF000B6FA20B100200BF080FA002070BD4FF0A2\n:10BD00008040E570C0F80453F7E770B5EFF310809A\n:10BD100000F0010572B6E84C607800B9FFDF60788A\n:10BD2000401E6070607808B90BF08CFA002D00D1CD\n:10BD300062B670BDE04810B5817821B10021C170B4\n:10BD40008170FFF7E2FF002010BD10B504460BF034\n:10BD500086FAD9498978084000D001202060002067\n:10BD600010BD10B5FFF7A8FF0BF079FA02220123EE\n:10BD7000D149540728B1D1480260236103200872D9\n:10BD800002E00A72C4F804330020887110BD2DE966\n:10BD9000F84FDFF824934278817889F80420002650\n:10BDA00089F80510074689F806600078DFF810B3B7\n:10BDB000354620B1012811D0022811D0FFDF0BF049\n:10BDC00060FA4FF0804498B10BF062FAB0420FD1A4\n:10BDD00030460BF061FA0028FAD042E00126EEE787\n:10BDE000FFF76AFF58460168C907FCD00226E6E75C\n:10BDF0000120E060C4F80451B2490E600107D1F897\n:10BE00004412B04AC1F3423124321160AD49343199\n:10BE100008604FF0020AC4F804A3A060AA480168B1\n:10BE2000C94341F3001101F10108016841F010011B\n:10BE3000016001E019F0A8FFD4F804010028F9D04E\n:10BE400030460BF029FA0028FAD0B8F1000F04D1DF\n:10BE50009D48016821F010010160C4F808A3C4F8EE\n:10BE6000045199F805004E4680B1387870B90BF04E\n:10BE7000F6F980460BF006FC6FF00042B8F1000FB7\n:10BE800002D0C6E9032001E0C6E90302DBF80000A6\n:10BE9000C00701D00BF0DFF9387810B13572BDE87A\n:10BEA000F88F4FF01808C4F808830127A7614FF4F2\n:10BEB0002070ADF8000000BFBDF80000411EADF8D5\n:10BEC0000010F9D2C4F80C51C4F810517A48C01DC2\n:10BED0000BF06CFA3570FFF744FF676179493079F0\n:10BEE00020310860C4F80483D9E770B5050000D19B\n:10BEF000FFDF4FF080424FF0FF30C2F8080300210F\n:10BF0000C2F80011C2F80411C2F80C11C2F81011E5\n:10BF1000694C61700BF0AFF910B10120A070607036\n:10BF200067480068C00701D00BF095F92846BDE8C6\n:10BF300070402CE76048007A002800D0012070474C\n:10BF40002DE9F04F61484FF0000A85B0D0F800B0FD\n:10BF5000D14657465D4A5E49083211608406D4F8DE\n:10BF6000080110B14FF0010801E04FF000080BF09C\n:10BF7000F0F978B1D4F8240100B101208246D4F858\n:10BF80001C0100B101208146D4F8200108B101272D\n:10BF900000E00027D4F8000100B101200490D4F89B\n:10BFA000040100B101200390D4F80C0100B101207C\n:10BFB0000290D4F8100100B101203F4D0190287883\n:10BFC00000260090B8F1000F04D0C4F808610120E9\n:10BFD0000BF013F9BAF1000F04D0C4F82461092062\n:10BFE0000BF00BF9B9F1000F04D0C4F81C610A2062\n:10BFF0000BF003F927B1C4F820610B200BF0FDF81A\n:10C000002D48C01D0BF0DAF900B1FFDFDFF8AC807E\n:10C010000498012780B1C4F80873E87818B1EE706D\n:10C0200000200BF0EAF8287A022805D103202872B4\n:10C030000221C8F800102761039808B1C4F8046110\n:10C04000029850B1C4F80C61287A032800D0FFDFB1\n:10C05000C8F800602F72FFF758FE019838B1C4F895\n:10C060001061287A012801D100F05CF8676100981E\n:10C0700038B12E70287A012801D1FFF772FEFFF740\n:10C0800044FE0D48C01D0BF0AFF91049091DC1F861\n:10C0900000B005B0BDE8F08F074810B5C01D0BF02B\n:10C0A0008DF90549B0B1012008704FF0E021C1F8C9\n:10C0B0000002BDE81040FFE544000020340C0040C1\n:10C0C0000C0400401805004010ED00E0100502408F\n:10C0D00001000001087A012801D1FFF742FEBDE806\n:10C0E000104024480BF080B970B5224CE41FA078B2\n:10C0F00008B90BF0A7F801208507A861207A00266F\n:10C10000032809D1D5F80C0120B900200BF0C4F8A0\n:10C110000028F7D1C5F80C6126724FF0FF30C5F842\n:10C12000080370BD70B5134CE41F6079F0B10128AD\n:10C1300003D0A179401E814218DA0BF090F8054631\n:10C140000BF0A0FA6179012902D9A179491CA171EA\n:10C150000DB1216900E0E168411A022902DA11F10A\n:10C16000020F06DC0DB1206100E0E060BDE8704028\n:10C17000F7E570BD4B0000200F4A12680D498A4256\n:10C180000CD118470C4A12680A4B9A4206D101B5E5\n:10C190000BF04AFA0BF01DFDBDE8014007490968A4\n:10C1A0000958084706480749054A064B70470000EA\n:10C1B00000000000BEBAFECA5C000020040000209F\n:10C1C000C8130020C8130020F8B51D46DDE9064756\n:10C1D0000E000AD007F0ADFF2346FF1DBCB231466A\n:10C1E0002A46009407F0BBFBF8BDD0192246194639\n:10C1F00002F023F92046F8BD70B50D460446102222\n:10C20000002102F044F9258117206081A07B40F0D5\n:10C210000A00A07370BD4FF6FF720A80014602202B\n:10C220000BF04CBC704700897047827BD30701D16B\n:10C23000920703D48089088000207047052070474A\n:10C24000827B920700D581817047014600200988D2\n:10C2500041F6FE52114200D00120704700B503465E\n:10C26000807BC00701D0052000BD59811846FFF72B\n:10C27000ECFFC00703D0987B40F004009873987BD4\n:10C2800040F001009873002000BD827B520700D56A\n:10C2900009B14089704717207047827B61F3C30260\n:10C2A000827370472DE9FC5F0E460446017896467E\n:10C2B000012000FA01F14DF6FF5201EA020962681D\n:10C2C0004FF6FF7B1188594502D10920BDE8FC9F3C\n:10C2D000B9F1000F05D041F6FE55294201D00120E9\n:10C2E000F4E741EA090111801D0014D000232B70EE\n:10C2F00094F800C0052103221F464FF0020ABCF14A\n:10C300000E0F76D2DFE80CF0F909252F47646B7722\n:10C31000479193B4D1D80420D8E7616820898B7BFA\n:10C320009B0767D517284AD30B89834247D389894E\n:10C33000172901D3814242D185F800A0A5F8010058\n:10C340003280616888816068817B21F0020181739D\n:10C35000C6E0042028702089A5F801006089A5F8AE\n:10C3600003003180BCE0208A3188C01D1FFA80F8AC\n:10C37000414524D3062028702089A5F80100608952\n:10C38000A5F80300A089A5F805000721208ACDE9BA\n:10C390000001636941E00CF0FF00082810D008207C\n:10C3A00028702089A5F801006089A5F80300318074\n:10C3B0006A1D694604F10C0009F025FB10B15EE02E\n:10C3C0001020EDE730889DF800100844308087E0A9\n:10C3D0000A2028702089A5F80100328044E00C2052\n:10C3E00028702089A5F801006089A5F80300318034\n:10C3F0003AE082E064E02189338800EB41021FFAD1\n:10C4000082F843453BD3B8F1050F38D30E222A708A\n:10C410000BEA4101CDE90010E36860882A467146C5\n:10C42000FFF7D2FEA6F800805AE04020287060890D\n:10C430003188C01C1FFA80F8414520D32878714606\n:10C4400020F03F00123028702089A5F80100608993\n:10C45000CDE9000260882A46E368FFF7B5FEA6F83A\n:10C460000080287840063BD461682089888037E0C6\n:10C47000A0893288401D1FFA80F8424501D2042766\n:10C480003DE0162028702089A5F801006089A5F8F4\n:10C490000300A089CDE9000160882A46714623691E\n:10C4A000FFF792FEA6F80080DEE718202870207AB9\n:10C4B0006870A6F800A013E061680A88920401D4AD\n:10C4C00005271CE0C9882289914201D0062716E081\n:10C4D0001E21297030806068018821F4005101809C\n:10C4E000B9F1000F0BD061887823002202200BF0F5\n:10C4F0003BFA61682078887006E033800327606823\n:10C50000018821EA090101803846DFE62DE9FF4F65\n:10C5100085B01746129C0D001E461CD03078C1070E\n:10C5200003D000F03F00192801D9012100E00021CB\n:10C530002046FFF7AAFEA8420DD32088A0F57F4130\n:10C54000FF3908D03078410601D4000605D508200F\n:10C5500009B0BDE8F08F0720FAE700208DF8000051\n:10C560008DF8010030786B1E00F03F0C0121A81EF1\n:10C570004FF0050A4FF002094FF0030B9AB2BCF1DD\n:10C58000200F75D2DFE80CF08B10745E7468748C29\n:10C59000749C74B574BA74C874D474E1747474F10E\n:10C5A00074EF74EE74ED748B052D78D18DF80090D6\n:10C5B000A0788DF804007088ADF8060030798DF809\n:10C5C0000100707800F03F000C2829D00ADCA0F1AF\n:10C5D0000200092863D2DFE800F0126215621A62D5\n:10C5E0001D622000122824D004DC0E281BD0102845\n:10C5F000DBD11BE016281FD01828D6D11FE02078E9\n:10C60000800701E020784007002848DAEEE0207833\n:10C610000007F9E72078C006F6E720788006F3E700\n:10C6200020784006F0E720780006EDE72088C00576\n:10C63000EAE720884005E7E720880005E4E720884E\n:10C64000C004E1E72078800729D5032D27D18DF894\n:10C6500000B0B6F8010081E0217849071FD5062D0A\n:10C660001DD381B27078012803D0022817D102E0CF\n:10C67000C9E0022000E0102004228DF8002072782A\n:10C680008DF80420801CB1FBF0F2ADF8062092B2C8\n:10C6900042438A4203D10397ADF80890A6E079E0BF\n:10C6A0002078000776D598B282088DF800A0ADF802\n:10C6B0000420B0EB820F6DD10297ADF8061095E023\n:10C6C0002178C90666D5022D64D381B206208DF883\n:10C6D0000000707802285DD3B1FBF0F28DF8040001\n:10C6E000ADF8062092B242438A4253D1ADF8089089\n:10C6F0007BE0207880064DD5072003E020784006B7\n:10C700007FD508208DF80000A088ADF80400ADF8B2\n:10C710000620ADF8081068E02078000671D50920E1\n:10C72000ADF804208DF80000ADF8061002975DE02A\n:10C730002188C90565D5022D63D381B20A208DF801\n:10C740000000707804285CD3C6E72088400558D5DF\n:10C75000012D56D10B208DF80000A088ADF8040003\n:10C7600044E021E026E016E0FFE72088000548D5F8\n:10C77000052D46D30C208DF80000A088ADF80400EC\n:10C78000B6F803006D1FADF80850ADF80600ADF81F\n:10C790000AA02AE035E02088C00432D5012D30D12E\n:10C7A0000D208DF8000021E02088800429D4B6F8FF\n:10C7B0000100E080A07B000723D5032D21D3307832\n:10C7C00000F03F001B2818D00F208DF800002088B3\n:10C7D00040F40050A4F80000B6F80100ADF80400E1\n:10C7E000ED1EADF80650ADF808B003976946059800\n:10C7F000F5F792FB050008D016E00E208DF800003A\n:10C80000EAE7072510E008250EE0307800F03F0049\n:10C810001B2809D01D2807D0022005990BF04EF9DE\n:10C82000208800F400502080A07B400708D52046D7\n:10C83000FFF70BFDC00703D1A07B20F00400A0731D\n:10C84000284685E61FB5022806D101208DF8000094\n:10C8500088B26946F5F760FB1FBD0000F8B51D46BC\n:10C86000DDE906470E000AD007F063FC2346FF1DF2\n:10C87000BCB231462A46009407F071F8F8BDD019D1\n:10C880002246194601F0D9FD2046F8BD2DE9FF4F9B\n:10C890008DB09B46DDE91B57DDF87CA00C46082BCC\n:10C8A00005D0E06901F0FEF850B11020D2E02888F0\n:10C8B000092140F0100028808AF80010022617E0B5\n:10C8C000E16901208871E2694FF420519180E169AA\n:10C8D0008872E06942F601010181E06900218173FB\n:10C8E0002888112140F0200028808AF800100426B2\n:10C8F00038780A900A2038704FF0020904F11800C5\n:10C900004D460C9001F0C6FBB04681E0BBF1100F24\n:10C910000ED1022D0CD0A9EB0800801C80B20221A0\n:10C92000CDE9001005AB52461E990D98FFF796FF12\n:10C93000BDF816101A98814203D9F74800790F9074\n:10C9400004E003D10A9808B138702FE04FF00201DB\n:10C95000CDE900190DF1160352461E990D98FFF707\n:10C960007DFF1D980088401B801B83B2C6F1FF002D\n:10C97000984200D203461E990BA8D9B15FF000027D\n:10C98000DDF878C0CDE9032009EB060189B2CDE9D5\n:10C9900001C10F980090BDF8161000220D9801F00B\n:10C9A0000EFC387070B1C0B2832807D0BDF81600F5\n:10C9B00020833AE00AEB09018A19E1E7022011B06D\n:10C9C000BDE8F08FBDF82C00811901F0FF08022DA1\n:10C9D0000DD09AF80120424506D1BDF820108142C1\n:10C9E00007D0B8F1FF0F04D09AF801801FE08AF851\n:10C9F0000180C94800680178052902D1BDF81610E8\n:10CA0000818009EB08001FFA80F905EB080085B268\n:10CA1000DDE90C1005AB0F9A01F03FFB28B91D981A\n:10CA20000088411B4145BFF671AF022D13D0BBF109\n:10CA3000100F0CD1A9EB0800801C81B20220CDE9B7\n:10CA4000000105AB52461E990D98FFF707FF1D9890\n:10CA50000580002038700020B1E72DE9F8439C469E\n:10CA6000089E13460027B26B9AB3491F8CB2F18F10\n:10CA7000A1F57F45FF3D05D05518AD882944891D96\n:10CA80008DB200E000252919B6F83C8008314145F7\n:10CA900020D82A44BCF8011022F8021BBCF803106D\n:10CAA00022F8021B984622F8024B914607F02FFB12\n:10CAB0004FF00C0C41464A462346CDF800C006F024\n:10CAC0001AFFF587B16B00202944A41D214408807A\n:10CAD00003E001E0092700E083273846BDE8F8833A\n:10CAE00010B50B88848F9C420CD9846BE0180488A5\n:10CAF00044B1848824F40044A41D23440B801060B6\n:10CB0000002010BD0A2010BD2DE9F0478AB0002595\n:10CB1000904689468246ADF8185007274BE00598A5\n:10CB200006888088000446D4A8F8006007A801950C\n:10CB300000970295CDE903504FF40073002231466F\n:10CB4000504601F03CFB04003CD1BDF81800ADF8A4\n:10CB50002000059804888188B44216D10A0414D4B0\n:10CB600001950295039521F400410097049541F445\n:10CB7000804342882146504601F0BFF804000BD1A3\n:10CB80000598818841F40041818005AA08A948469A\n:10CB9000FFF7A6FF0400DCD00097059802950195E9\n:10CBA000039504950188BDF81C300022504601F021\n:10CBB000A4F80A2C06D105AA06A94846FFF790FF5B\n:10CBC0000400ACD0ADF8185004E00598818821F439\n:10CBD0000041818005AA06A94846FFF781FF002889\n:10CBE000F3D00A2C03D020460AB0BDE8F08700201D\n:10CBF000FAE710B50C46896B86B051B10C218DF85F\n:10CC00000010A18FADF80810A16B01916946FAF7E9\n:10CC100001FB00204FF6FF71A063E187A08706B0FB\n:10CC200010BD2DE9F0410D460746896B0020069E98\n:10CC30001446002911D0012B0FD13246294638461F\n:10CC4000FFF762FF002808D1002C06D032462946A3\n:10CC50003846BDE8F04100F034BFBDE8F0812DE971\n:10CC6000FC411446DDE9087C0E46DDE90A15521D3B\n:10CC7000BCF800E092B2964502D20720BDE8FC81E4\n:10CC8000ACF8002017222A70A5F80160A5F803303F\n:10CC90000522CDE900423B462A46FFF7DFFD002092\n:10CCA000ECE770B50C46154648220021204601F0FD\n:10CCB000EEFB04F1080044F81C0F00204FF6FF7152\n:10CCC000E06161842084A5841720E08494F82A0020\n:10CCD00040F00A0084F82A0070BD4FF6FF720A8007\n:10CCE000014603200AF0EABE30B585B00C46054681\n:10CCF000FFF77FFFA18E284629B101218DF8001092\n:10CD00006946FAF787FA0020E0622063606305B0A5\n:10CD100030BDB0F8400070476000002090F8462019\n:10CD2000920703D4408808800020F4E70620F2E749\n:10CD300090F846209207EED5A0F84410EBE70146A4\n:10CD4000002009880A0700D5012011F0F00F01D05A\n:10CD500040F00200CA0501D540F004008A0501D563\n:10CD600040F008004A0501D540F010000905D2D571\n:10CD700040F02000CFE700B5034690F84600C0071A\n:10CD800001D0062000BDA3F842101846FFF7D7FFD8\n:10CD900010F03E0F05D093F8460040F0040083F8F1\n:10CDA000460013F8460F40F001001870002000BD47\n:10CDB00090F84620520700D511B1B0F84200AAE71A\n:10CDC0001720A8E710F8462F61F3C3020270A2E70C\n:10CDD0002DE9FF4F9BB00E00DDE92B34DDE929780A\n:10CDE000289D24D02878C10703D000F03F001928DF\n:10CDF00001D9012100E000212046FFF7D9FFB04210\n:10CE000015D32878410600F03F010CD41E290CD020\n:10CE1000218811F47F6F0AD13A8842B1A1F57F428F\n:10CE2000FF3A04D001E0122901D1000602D5042006\n:10CE30001FB0C5E5FA491D984FF0000A08718DF83A\n:10CE400018A08DF83CA00FAA0A60ADF81CA0ADF8A0\n:10CE500050A02978994601F03F02701F5B1C04F135\n:10CE6000180C4FF0060E4FF0040BCDF858C01F2AD7\n:10CE70007ED2DFE802F07D7D107D267DAC7DF47DE5\n:10CE8000F37DF27DF17DF47DF07D7D7DEF7DEE7DA6\n:10CE90007D7D7D7DED0094F84610B5F80100890791\n:10CEA00001D5032E02D08DF818B01EE34FF40061B7\n:10CEB000ADF85010608003218DF83C10ADF84000B3\n:10CEC000D4E2052EEFD1B5F801002083ADF81C00A7\n:10CED000B5F80310618308B1884201D9012079E1D6\n:10CEE0000020A07220814FF6FF702084169801F078\n:10CEF000D1F8052089F800000220029083460AAB91\n:10CF00001D9A16991B9801F0C8F890BB9DF82E0049\n:10CF1000012804D0022089F80100102003E001203C\n:10CF200089F8010002200590002203A90BA808F04F\n:10CF30006AFDE8BB9DF80C00059981423DD1398816\n:10CF4000801CA1EB0B01814237DB02990220CDE965\n:10CF500000010DF12A034A4641461B98FFF77EFC6B\n:10CF600002980BF1020B801C81B217AA029101E01A\n:10CF70009CE228E003A90BA808F045FD02999DF862\n:10CF80000C00CDE9000117AB4A4641461B98FFF75C\n:10CF900065FC9DF80C000AAB0BEB00011FFA81FB4E\n:10CFA00002991D9A084480B2029016991B9800E0DD\n:10CFB00003E001F072F80028B6D0BBF1020F02D0F6\n:10CFC000A7F800B04FE20A208DF818004BE20021CC\n:10CFD0000391072EFFF467AFB5F801002083ADF889\n:10CFE0001C00B5F80320628300283FF477AF90421D\n:10CFF0003FF674AF0120A072B5F805002081002033\n:10D00000A073E06900F04EFD78B9E16901208871F4\n:10D01000E2694FF420519180E1698872E16942F63A\n:10D0200001000881E06900218173F01F20841E98AF\n:10D03000606207206084169801F02CF8072089F8B8\n:10D0400000000120049002900020ADF82A0028E0A2\n:10D0500019E29FE135E1E5E012E2A8E080E043E07B\n:10D060000298012814D0E0698079012803D1BDF825\n:10D070002800ADF80E00049803ABCDE900B04A4695\n:10D0800041461B98FFF7EAFB0498001D80B204900C\n:10D09000BDF82A00ADF80C00ADF80E00059880B27E\n:10D0A00002900AAB1D9A16991B9800F0F6FF28B95A\n:10D0B00002983988001D05908142D1D2029801283A\n:10D0C00081D0E0698079012803D1BDF82800ADF84E\n:10D0D0000E00049803ABCDE900B04A4641461B98C8\n:10D0E000FFF7BCFB0298BDE1072E02D0152E7FF49E\n:10D0F000DAAEB5F801102183ADF81C10B5F80320A5\n:10D10000628300293FF4EAAE91423FF6E7AE012187\n:10D11000A1724FF0000BA4F808B084F80EB0052EF1\n:10D1200007D0C0B2691DE26908F06BFC00287FF4EB\n:10D130004AAF4FF6FF70208401A906AA14A8CDF8C3\n:10D1400000B081E885032878214600F03F031D9A4E\n:10D150001B98FFF79BFB8246208BADF81C0082E1F9\n:10D160000120032EC3D14021ADF85010B5F80110B5\n:10D170002183ADF81C100AAAB8F1000F00D00023DB\n:10D18000CDE9020304921D98CDF804800090388800\n:10D190000022401E83B21B9801F011F88DF8180090\n:10D1A00090BB0B2089F80000BDF8280035E04FF057\n:10D1B000010C052E9BD18020ADF85000B5F8011070\n:10D1C0002183B5F803002084ADF81C10B0F5007F72\n:10D1D00003D907208DF8180087E140F47C422284AF\n:10D1E0000CA8B8F1000F00D00023CDE90330CDE941\n:10D1F000018C1D9800903888401E83B21B9800F067\n:10D20000DEFF8DF8180018B18328A8D10220BFE0F6\n:10D210000D2189F80010BDF83000401C22E100000B\n:10D2200060000020032E04D248067FF53CAE0020AB\n:10D2300018E1B5F80110ADF81C102878400602D5A9\n:10D240008DF83CE002E007208DF83C004FF000082C\n:10D250000320CDE902081E9BCDF810801D98019394\n:10D26000A6F1030B00901FFA8BF342461B9800F0C7\n:10D2700044FD8DF818008DF83C80297849060DD5BD\n:10D280002088C00506D5208BBDF81C10884201D12E\n:10D29000C4F8248040468DF81880E3E0832801D14B\n:10D2A0004FF0020A4FF48070ADF85000BDF81C003A\n:10D2B0002083A4F820B01E986062032060841321AC\n:10D2C000CDE0052EFFF4EFADB5F80110ADF81C1060\n:10D2D000A28F6AB3A2F57F43FE3B29D008228DF8C6\n:10D2E0003C2000BF4FF0000B0523CDE9023BDDF8E9\n:10D2F00078C0CDF810B01D9A80B2CDF804C040F4CB\n:10D3000000430092B5F803201B9800F0F6FC8DF85E\n:10D310003CB04FF400718DF81800ADF85010832820\n:10D3200010D0F8B1A18FA1F57F40FE3807D0DCE026\n:10D330000B228DF83C204FF6FE72A287D2E7A4F8AC\n:10D340003CB0D2E000942B4631461E9A1B98FFF762\n:10D3500084FB8DF8180008B183284BD1BDF81C0060\n:10D36000208353E700942B4631461E9A1B98FFF703\n:10D3700074FB8DF81800E8BBE18FA06B0844831D97\n:10D380008DE888034388828801881B98FFF767FC33\n:10D39000824668E095F80180022E70D15FEA0800AD\n:10D3A00002D0B8F1010F6AD109208DF83C0007A81E\n:10D3B00000908DF840804346002221461B98FFF7DD\n:10D3C00030FC8DF842004FF0000B8DF843B050B99F\n:10D3D000B8F1010F12D0B8F1000F04D1A18FA1F55F\n:10D3E0007F40FF380AD0A08F40B18DF83CB04FF499\n:10D3F000806000E037E0ADF850000DE00FA91B9809\n:10D40000F9F708FF82468DF83CB04FF48060ADF824\n:10D410005000BAF1020F06D0FC480068C07928B16C\n:10D420008DF8180027E0A4F8188044E0BAF1000F46\n:10D4300003D081208DF818003DE007A800904346F6\n:10D44000012221461B98FFF7ECFB8DF818002146BE\n:10D450001B98FFF7CEFB9DF8180020B9192189F819\n:10D460000010012038809DF83C0020B10FA91B98C6\n:10D47000F9F7D0FE8246BAF1000F33D01BE018E076\n:10D480008DF818E031E02078000712D5012E10D178\n:10D490000A208DF83C00E088ADF8400003201B997D\n:10D4A0000AF00CFB0820ADF85000C0E648067FF5F6\n:10D4B000FAAC4FF0040A2088BDF8501008432080D1\n:10D4C000BDF8500080050BD5A18FA1F57F40FE3837\n:10D4D00006D11E98E06228982063A6864FF0030AC2\n:10D4E0005046A5E49DF8180078B1012089F80000A5\n:10D4F000297889F80110BDF81C10A9F802109DF8D0\n:10D50000181089F80410052038802088BDF85010C4\n:10D5100088432080E4E72DE9FF4F8846087895B0DE\n:10D52000012181404FF20900249C0140ADF82010F8\n:10D530002088DDF88890A0F57F424FF0000AFF3A7E\n:10D5400006D039B1000705D5012019B0BDE8F08F2C\n:10D550000820FAE7239E4FF0000B0EA886F800B0D3\n:10D5600018995D460988ADF83410A8498DF81CB0AB\n:10D57000179A0A718DF838B0086098F800000128F1\n:10D580003BD0022809D003286FD1307820F03F002B\n:10D590001D303070B8F80400E08098F800100320C7\n:10D5A000022904D1317821F03F011B31317094F808\n:10D5B0004610090759D505ABB9F1000F13D000216A\n:10D5C00002AA82E80B000720CDE90009BDF834006B\n:10D5D000B8F80410C01E83B20022159800F0EFFDC9\n:10D5E0000028D1D101E0F11CEAE7B8F80400A6F860\n:10D5F0000100BDF81400C01C04E198F805108DF876\n:10D600001C1098F80400012806D04FF4007A022874\n:10D610002CD00328B8D16CE12188B8F8080011F4A7\n:10D620000061ADF8201020D017281CD3B4F84010AA\n:10D63000814218D3B4F84410172901D3814212D182\n:10D64000317821F03F01C91C3170A6F80100032197\n:10D65000ADF83410A4F8440094F8460020F002001D\n:10D6600084F8460065E105257EE177E1208808F130\n:10D67000080700F4FE60ADF8200010F0F00F1BD09A\n:10D6800010F0C00F03D03888228B9042EBD199B9AB\n:10D69000B878C00710D0B9680720CDE902B1CDF83D\n:10D6A00004B00090CDF810B0FB88BA88398815987E\n:10D6B00000F023FB0028D6D12398BDF82010401C91\n:10D6C00080294ED006DC10290DD020290BD040290E\n:10D6D00087D124E0B1F5807F6ED051457ED0B1F581\n:10D6E000806F97D1DEE0C80601D5082000E0102049\n:10D6F00082460DA907AA0520CDE902218DF8380040\n:10D70000ADF83CB0CDE9049608A93888CDE9000110\n:10D710005346072221461598FFF7B8F8A8E09DF870\n:10D720001C2001214FF00A0A002A9BD105ABB9F158\n:10D73000000F00D00020CDE902100720CDE900093C\n:10D74000BDF834000493401E83B2218B002215984B\n:10D7500000F035FD8DF81C000B203070BDF8140072\n:10D7600020E09DF81C2001214FF00C0A002A22D154\n:10D7700013ABB9F1000F00D00020CDE90210072053\n:10D78000CDE900090493BDF83400228C401E83B219\n:10D79000218B159800F013FD8DF81C000D203070C2\n:10D7A000BDF84C00401CADF8340005208DF8380061\n:10D7B000208BADF83C00BCE03888218B88427FF498\n:10D7C00052AF9DF81C004FF0120A00281CD1606A6D\n:10D7D000A8B1B878C0073FF446AF00E018E0BA68D7\n:10D7E0000720CDE902B2CDF804B00090CDF810B01A\n:10D7F000FB88BA88159800F080FA8DF81C00132079\n:10D8000030700120ADF8340093E00000600000208B\n:10D810003988208B8142D2D19DF81C004FF0160A26\n:10D820000028A06B08D0E0B34FF6FF7000215F46E0\n:10D83000ADF808B0019027E068B1B978C907BED14A\n:10D84000E18F0DAB0844821D03968DE80C024388DE\n:10D850008288018809E0B878C007BCD0BA680DABEF\n:10D8600003968DE80C02BB88FA881598FFF7F7F944\n:10D8700005005ED0072D72D076E0019005AA02A9BE\n:10D880002046FFF72DF90146E28FBDF808008242DD\n:10D8900001D00029F1D0E08FA16B084407800198E6\n:10D8A000E08746E09DF81C004FF0180A40B1208B3D\n:10D8B000C8B13888208321461598FFF79AF938E0D7\n:10D8C00004F118000090237E012221461598FFF7ED\n:10D8D000A8F98DF81C000028EDD119203070012026\n:10D8E000ADF83400E7E7052521461598FFF781F9E3\n:10D8F0003AE0208800F40070ADF8200050452DD1AA\n:10D90000A08FA0F57F41FE3901D006252CE0D8F884\n:10D9100008004FF0160A48B1A063B8F80C10A187B0\n:10D920004FF6FF71E187A0F800B002E04FF6FF70FC\n:10D93000A087BDF8200030F47F611AD07823002240\n:10D94000032015990AF010F898F80000207120883B\n:10D95000BDF82010084320800EE000E00725208855\n:10D96000BDF8201088432080208810F47F6F1CD0E1\n:10D970003AE02188814321809DF8380020B10EA92A\n:10D980001598F9F747FC05469DF81C000028EBD0D8\n:10D9900086F801A001203070208B70809DF81C005B\n:10D9A00030710520ADF83400DEE7A18EE1B11898A2\n:10D9B0000DAB0088ADF834002398CDE90304CDE920\n:10D9C0000139206B0090E36A179A1598FFF700FA67\n:10D9D000054601208DF838000EA91598F9F71AFCB4\n:10D9E00000B10546A4F834B094F8460040070AD5C3\n:10D9F0002046FFF7A4F910F03E0F04D114F8460FAB\n:10DA000020F0040020701898BDF8341001802846DA\n:10DA10009BE500B585B0032806D102208DF80000F3\n:10DA200088B26946F9F7F6FB05B000BD10B5384C71\n:10DA30000B782268012B02D0022B2AD111E0137837\n:10DA40000BB1052B01D10423137023688A889A80B7\n:10DA50002268CB88D38022680B8913814989518140\n:10DA60000DE08B8893802268CB88D38022680B8955\n:10DA700013814B8953818B899381096911612168D5\n:10DA8000F9F7C8FB226800210228117003D0002892\n:10DA900000D0812010BD832010BD806B002800D0F5\n:10DAA000012070478178012909D10088B0F5205FF5\n:10DAB00003D042F60101884201D1002070470720BF\n:10DAC0007047F0B587B0002415460E460746ADF8FE\n:10DAD000184011E005980088288005980194811D60\n:10DAE000CDE902410721049400918388428801888E\n:10DAF000384600F002F930B905AA06A93046FEF70B\n:10DB0000EFFF0028E6D00A2800D1002007B0F0BDC2\n:10DB10006000002010B58B7883B102789A4205D15D\n:10DB20000B885BB102E08B79091D4BB18B789A426F\n:10DB3000F9D1B0F801300C88A342F4D1002010BD17\n:10DB4000812010BD072826D012B1012A27D103E079\n:10DB5000497801F0070102E04978C1F3C2010529C3\n:10DB60001DD2DFE801F00318080C12000AB10320EF\n:10DB700070470220704704280DD250B10DE00528EF\n:10DB800009D2801E022808D303E0062803D0032808\n:10DB900003D005207047002070470F207047812078\n:10DBA0007047C0B282060BD4000607D5FA48807AC7\n:10DBB0004143C01D01EBD00080B27047084670475A\n:10DBC0000020704770B513880B800B781C0625D594\n:10DBD000F14CA47A844204D843F01000087000206D\n:10DBE00070BD956800F0070605EBD0052D78F5406F\n:10DBF00065F304130B701378D17803F0030341EA43\n:10DC0000032140F20123B1FBF3F503FB15119268E8\n:10DC1000E41D00FB012000EBD40070BD906870BDD6\n:10DC200037B51446BDF804101180117841F0040195\n:10DC300011709DF804100A061ED5D74AA368C1F3D7\n:10DC40000011927A824208D8FE2811D1D21DD20842\n:10DC50004942184600F01BFC0AE003EBD00200F03A\n:10DC60000703012510789D40A84399400843107090\n:10DC7000207820F0100020703EBD2DE9F0410746CD\n:10DC8000C81C0E4620F00300B04202D08620BDE83A\n:10DC9000F081C14D002034462E60AF802881AA72E9\n:10DCA000E8801AE0E988491CE980810614D4E1780B\n:10DCB00000F0030041EA002040F20121B0FBF1F244\n:10DCC00001FB12012068FFF76CFF2989084480B22C\n:10DCD0002881381A3044A0600C3420784107E1D400\n:10DCE0000020D4E7AC4801220189C08800EB400045\n:10DCF00002EB8000084480B270472DE9FF4F89B0E5\n:10DD00001646DDE9168A0F46994623F44045084633\n:10DD100000F054FB040002D02078400703D4012017\n:10DD20000DB0BDE8F08F099806F086F802902078D3\n:10DD3000000606D59848817A0298814201D887204A\n:10DD4000EEE7224601A90298FFF73CFF8346002038\n:10DD50008DF80C004046B8F1070F1AD00122214679\n:10DD6000FFF7F0FE0028DBD12078400611D5022015\n:10DD70008DF80C00ADF81070BDF80400ADF812007D\n:10DD8000ADF814601898ADF81650CDF81CA0ADF899\n:10DD900018005FEA094004D500252E46A846012751\n:10DDA0000CE02178E07801F0030140EA012040F224\n:10DDB0000121B0FBF1F2804601FB12875FEA494086\n:10DDC00009D5B84507D1A178207901F0030140EACF\n:10DDD0000120B04201D3BE4201D90720A0E7A81913\n:10DDE0001FFA80F9B94501D90D2099E79DF80C007B\n:10DDF00028B103A90998F9F70BFA002890D1B84582\n:10DE000007D1A0784FEA192161F30100A07084F8CE\n:10DE100004901A9800B10580199850EA0A0027D09A\n:10DE2000199830B10BEB06002A46199900F005FB52\n:10DE30000EE00BEB06085746189E099806F067F9A6\n:10DE40002B46F61DB5B239464246009505F053FD06\n:10DE5000224601A90298FFF7B5FE9DF8040022466C\n:10DE600020F010008DF80400DDE90110FFF7D8FE66\n:10DE7000002055E72DE9FF4FDFF81C91824685B061\n:10DE8000B9F80610D9F8000001EB410100EB81045C\n:10DE900040F20120B2FBF0F1174600FB1175DDE9FD\n:10DEA000138B4E4629460698FFF77BFE0346FFF785\n:10DEB00019FF1844B1880C30884202D9842009B077\n:10DEC0002FE70698C6B2300603D5B00601D5062066\n:10DED000F5E7B9F80620521C92B2A9F80620BBF16A\n:10DEE000000F01D0ABF80020B00602D5C4F80880BE\n:10DEF0000AE0B9F808201A4492B2A9F80820D9F823\n:10DF00000000891A0844A0602246FE200699FFF707\n:10DF100087FEE77025712078390A61F301002A0A2B\n:10DF2000A17840F0040062F30101A17020709AF81A\n:10DF300002006071BAF80000E08000252573300609\n:10DF400002D599F80A7000E00127B00601D54FF01C\n:10DF500000084E4600244FF007090FE0CDE90258B3\n:10DF60000195CDF800900495F1882046129B089AFF\n:10DF7000FFF7C3FE0028A2D1641CE4B2BC42EDD37B\n:10DF800000209CE700B5FFF7ADFE03490C308A88FE\n:10DF9000904203D9842000BD00060020CA8808688A\n:10DFA00002EB420300EB8300521C037823F00403CE\n:10DFB0000370CA80002101730846ECE72DE9F047A1\n:10DFC000804600F0FBF9070005D000264446F74DD7\n:10DFD00040F2012916E00120BDE8F087204600F05C\n:10DFE000EDF90278C17802F0030241EA0222B2FBA5\n:10DFF000F9F309FB13210068FFF7D3FD3044641CDB\n:10E0000086B2A4B2E988601E8142E7DCA8F1010073\n:10E01000E8802889801B288100203870DCE710B553\n:10E02000144631B1491E218005F006FFA070002082\n:10E0300010BD012010BD70B50446DC48C1880368DE\n:10E0400001E0401C20802088884207D200EB40027B\n:10E0500013EB820202D015786D07F2D580B28842A8\n:10E0600016D2AAB15079A072D08820819178107907\n:10E0700001F0030140EA0120A081A078E11CFFF734\n:10E08000A1FD20612088401C2080E080002070BD20\n:10E090000A2070BD0121018270472DE9FF4F85B034\n:10E0A0004FF6FF798246A3F8009048681E460D4659\n:10E0B00080788DF8060048680088ADF804000020DC\n:10E0C0008DF80A00088A0C88A04200D304462C82EE\n:10E0D00051E03878400708D4641C288AA4B2401C58\n:10E0E000288208F10100C0B246E0288A401C28823C\n:10E0F000781D6968FFF70EFDD8BB3188494501D10D\n:10E10000601E30803188A1EB080030806888A04212\n:10E1100038D3B878397900F0030041EA002801A922\n:10E12000781DFFF7F7FC20BB298949452ED0002236\n:10E1300039460798FFF706FDD8B92989414518D116\n:10E14000E9680391B5F80AC0D7F808B05046CDF891\n:10E1500000C005F0DCFFDDF800C05A460CF1070CEA\n:10E160001FFA8CFC43460399CDF800C005F08DFBE7\n:10E1700060B1641CA4B200208046204600F01EF965\n:10E180000700A6D1641E2C820A2098E67480787954\n:10E19000B071F888B0803978F87801F0030140EA6E\n:10E1A00001207081A6F80C80504605F045FE3A46E5\n:10E1B00006F10801FFF706FD306100207FE62DE93A\n:10E1C000FF4F87B081461C469246DDF860B0DDF80F\n:10E1D0005480089800F0F2F8050002D02878400733\n:10E1E00002D401200BB09CE5484605F025FE2978B5\n:10E1F000090605D56D49897A814201D88720F1E762\n:10E20000CAF309062A4601A9FFF7DCFC0746149861\n:10E2100007281CD000222946FFF794FC0028E1D1F2\n:10E220002878400613D501208DF808000898ADF82D\n:10E230000C00BDF80400ADF80E00ADF81060ADF8AC\n:10E24000124002A94846F8F7E3FF0028CAD129780E\n:10E25000E87801F0030140EA0121AA78287902F068\n:10E26000030240EA0220564507D0B1F5007F04D9E9\n:10E27000611E814201DD0B20B4E7864201D90720EF\n:10E28000B0E7801B85B2A54200D92546BBF1000F3F\n:10E2900001D0ABF80050179818B1B9192A4600F010\n:10E2A000CCF8B8F1000F0DD03E4448464446169FC6\n:10E2B00005F03FFF2146FF1DBCB232462B460094BD\n:10E2C00005F04DFB00208DE72DE9F04107461D4686\n:10E2D0001646084600F072F8040002D02078400785\n:10E2E00001D40120D3E4384605F0A6FD21780906C3\n:10E2F00005D52E49897A814201D88720C7E4224674\n:10E300003146FFF75FFC65B12178E07801F0030149\n:10E3100040EA0120B0F5007F01D8012000E0002094\n:10E3200028700020B3E42DE9F04107461D4616464B\n:10E33000084600F043F8040002D02078400701D4DA\n:10E340000120A4E4384605F077FD2178090605D5BB\n:10E350001649897A814201D8872098E422463146BD\n:10E36000FFF75EFCFF2D14D02178E07801F0030266\n:10E3700040EA022040F20122B0FBF2F302FB13005C\n:10E3800015B900F2012080B2E070000A60F30101CB\n:10E39000217000207BE410B50C4600F00FF810B19E\n:10E3A0000178490704D4012010BD000000060020B8\n:10E3B000C18821804079A0700020F5E70749CA880C\n:10E3C000824209D340B1096800EB40006FF00B02B4\n:10E3D00002EB8000084470470020704700060020D0\n:10E3E00070B504460D4621462B460AB9002070BD83\n:10E3F00001E0491C5B1C501E021E03D008781E78E9\n:10E40000B042F6D008781E78801BF0E730B50C4695\n:10E4100001462346051B954206D202E0521E9D5C32\n:10E420008D54002AFAD107E004E01D780D70491CD4\n:10E430005B1C521E002AF8D130BDF0B50E460146D5\n:10E44000334680EA030404F00304B4B906E002B9D9\n:10E45000F0BD13F8017B01F8017B521E01F00307A8\n:10E46000002FF4D10C461D4602E080CD80C4121F5F\n:10E47000042AFAD221462B4600BF04E013F8014BD0\n:10E4800001F8014B521E002AF8D100BFE0E7F0B5B9\n:10E490000C460146E6B204E002B9F0BD01F8016B9A\n:10E4A000521E01F00307002FF6D10B46E5B245EAF4\n:10E4B000052545EA054501E020C3121F042AFBD2C9\n:10E4C000194602E001F8016B521E002AFAD100BF82\n:10E4D000E3E7000010B509F0A0FDF4F7F9F909F041\n:10E4E000E7FBBDE8104009F0AFBC302834BF012085\n:10E4F00000207047202834BF4FF0A0420C4A01236F\n:10E5000000F01F0003FA00F0002914BFC2F80C0548\n:10E51000C2F808057047202834BF4FF0A0410449D5\n:10E5200000F01F00012202FA00F0C1F81805704740\n:10E530000003005070B50346002002466FF02F051F\n:10E540000EE09C5CA4F130060A2E02D34FF0FF309F\n:10E5500070BD00EB800005EB4000521C2044D2B29D\n:10E560008A42EED370BD30B50A230BE0B0FBF3F462\n:10E5700003FB1404B0FBF3F08D183034521E05F881\n:10E58000014CD2B2002AF1D130BD30B500234FF694\n:10E59000FF7510E0040A44EA002084B2C85C6040C1\n:10E5A000C0F30314604005EA00344440E0B25B1C51\n:10E5B00084EA40109BB29342ECD330BD2DE9F04188\n:10E5C000FE4B0026012793F864501C7893F868C02E\n:10E5D000B8B183F89140A3F8921083F8902083F8A3\n:10E5E0008E70BCF1000F0CBF83F8946083F89450D8\n:10E5F000F3488068008805F08AFDBDE8F04105F029\n:10E6000021BA4FF6FF7083F89140A3F8920083F887\n:10E61000902083F88E70BCF1000F14BF83F89450E3\n:10E6200083F89460BDE8F0812DE9F041E44D29685C\n:10E6300091F89C200024012A23D091F89620012AE9\n:10E6400030D091F86C301422DC4E0127012B32D0EF\n:10E6500091F88E30012B4FD091F8A620012A1CBFD3\n:10E660000020BDE8F08144701F2200F8042B222214\n:10E67000A731FFF7E2FE286880F8A6400120BDE838\n:10E68000F08144701B220270D1F89D204260D1F8C5\n:10E69000A120826091F8A520027381F89C4001209E\n:10E6A000BDE8F081447007220270D1F898204260E2\n:10E6B00081F89640E2E78046447000F8042B20225F\n:10E6C0006E31FFF7BAFE88F80870286880F86C4051\n:10E6D00090F86E000028D1D1B6F87000A6F8980026\n:10E6E000A868417B86F89A1086F89670008805F035\n:10E6F0000EFD05F0B6F9C1E791F86C30012B0BD097\n:10E70000447017220270D1F890204260B1F8942032\n:10E71000028181F88E40B1E78046447000F8042BF6\n:10E7200020226E31FFF789FE88F80870286880F88B\n:10E730006C4090F86E000028A0D1CDE7A04800689A\n:10E7400090F86C10002914BFB0F870004FF6FF70FD\n:10E75000704770B59A4C06462068002808BFFFDF56\n:10E760000025206845706660002808BFFFDF20682C\n:10E77000417800291CBFFFDF70BDCC220021FFF7CC\n:10E7800086FE2068FF2101707F2180F83810132158\n:10E790004184282180F86910012180F85C1080F8FC\n:10E7A00061500AF0C1F9BDE8704009F0AEBA844981\n:10E7B0000968097881420CBF012000207047804819\n:10E7C000006890F82200C0F3400070477C48006861\n:10E7D00090F8220000F0010070477948006890F836\n:10E7E0002200C0F3001070472DE9F0437448002464\n:10E7F000036893F82400B3F822C0C0F38001C0F38B\n:10E800004002114400F001000844CCF3001121B390\n:10E81000BCF1100F02BF6B4931F81000BDE8F08366\n:10E82000BCF1120F18BFBCF1130F0ED0BCF1150FC5\n:10E830001EBFFFDF2046BDE8F0830021624A32F8A8\n:10E84000102010FB0120BDE8F083604A002132F85F\n:10E85000102010FB0120BDE8F08393F85E2093F8B0\n:10E860005F102E264FF47A774FF014084FF04009CE\n:10E87000022A04BF4AF2D745B5FBF7F510D0012AAA\n:10E8800004BF4AF22F75B5FBF7F510D04AF62315F1\n:10E89000B5FBF7F5082A08BF4E4613D0042A18D056\n:10E8A0002646082A0ED0042A13D0022A49D004F1A1\n:10E8B0002806042A0FD0082A1CBF4FF01908082286\n:10E8C00004D00AE04FF0140806F5A8764FF0400295\n:10E8D00003E006F5A8764FF0100218FB026212FB67\n:10E8E0000052C0EB00103A4D00EB800005EB8000B9\n:10E8F00010441CF0010F4FF4C8724FF4BF7504BFF1\n:10E90000CCF34006002E65D0CCF3400600F5A57090\n:10E91000EEB1082904BF174640260CD0042904BFD5\n:10E920002F46102607D0022907BF04F11807042636\n:10E9300004F12807082606EB860808EB86163E44F5\n:10E940001BE004F118064FF019080422C5E7082956\n:10E9500004BF164640270CD0042904BF2E461027BA\n:10E9600007D0022907BF04F11806042704F128067E\n:10E97000082707EB871706EB8706304400F19C0653\n:10E9800093F8690001F00C07002F08BF0020304405\n:10E9900018BF00F5416027D1082904BF164640275B\n:10E9A0001BD0042904BF2E46102716D0022906BF0B\n:10E9B00004F11806042704F128060CE00C060020D8\n:10E9C00068000020DC610200E4610200D461020002\n:10E9D000D4FEFFFF64E018BF0827C7EBC70707EBAB\n:10E9E000470706EB4706304498301CF0010F17D05C\n:10E9F000082908BF40210CD0042904BF2A46102151\n:10EA000007D0022907BF04F11802042104F12802EB\n:10EA1000082101EB410303EB0111114408443BE0E1\n:10EA2000082904BF944640260CD0042904BFAC46F4\n:10EA3000102607D0022907BF04F1180C042604F1A0\n:10EA4000280C082606EB8616B3F840300CEB860C33\n:10EA50006044EB2B20D944F2552C0B3303FB0CF311\n:10EA60009B0D082907D0042902D0022905D008E00F\n:10EA70002A46102108E0402106E004F11802042192\n:10EA800002E004F12802082101EB811102EB81016F\n:10EA900001F5A57103FB010000F5B470BDE8F0833A\n:10EAA00000F5A570082904BF944640260CD004291F\n:10EAB00004BFAC46102607D0022907BF04F1180C8A\n:10EAC000042604F1280C082606EB8616B3F8483015\n:10EAD0000CEB860C6044EB2BDED944F2552C0B3347\n:10EAE00003FB0CF39B0D0829C5D00429C0D00229D3\n:10EAF000C7D1C2E7FE4840F271210068806A4843EE\n:10EB00007047FB48006890F83700002818BF0120C4\n:10EB1000704710B5F74C207B022818BF032808D196\n:10EB2000207D04F115010EF0E6FE08281CBF01202F\n:10EB300010BD207B002816BF022800200120BDE860\n:10EB400010400AF021BDEB4908737047E849096895\n:10EB500081F8300070472DE9F047E54C2168087BCB\n:10EB6000002816BF022800200120487301F10E0181\n:10EB70000AF0F4FC2168087B022816BF0328012252\n:10EB8000002281F82F204FF0080081F82D00487BEB\n:10EB900001F10E034FF001064FF00007012804BFFA\n:10EBA0005B7913F0C00F0AD001F10E03012804D1E4\n:10EBB000587900F0C000402801D0002000E001207A\n:10EBC00081F82E00002A04BF91F8220010F0040FF3\n:10EBD00007D0087D01F115010EF08DFE216881F846\n:10EBE0002D002068476007F0BFFA2168C14D4FF043\n:10EBF0000009886095F82D000EF089FE804695F892\n:10EC00002F00002818BFB8F1000F04D095F82D0090\n:10EC10000EF0B1FC68B195F8300000281CBF95F8E3\n:10EC20002E0000281DD0697B05F10E0001290ED0B1\n:10EC300012E06E734A4605F10E0140460AF0E4FC0C\n:10EC400095F82D1005F10E000EF063FF09E04079F4\n:10EC500000F0C000402831D0394605F10E000AF01E\n:10EC60000BFD2068C77690F8220010F0040F08BF53\n:10EC7000BDE8F087002795F82D000EF017FD050080\n:10EC800008BFBDE8F087102102F0C2F8002818BFC5\n:10EC9000BDE8F08720683A4600F11C01C676284698\n:10ECA0000AF0B2FC206800F11C0160680FF08EF8D9\n:10ECB0006068BDE8F04701210FF0A3B80EF066FFD1\n:10ECC0004A4605F10E010AF09FFCCAE7884A12681D\n:10ECD000137B0370D2F80E000860508A888070475A\n:10ECE00078B584490446824E407B087332682078A8\n:10ECF00010706088ADF8000080B200F00101C0F330\n:10ED0000400341EA4301C0F3800341EA8301C0F3B9\n:10ED1000C00341EAC301C0F3001341EA0311C0F389\n:10ED2000401341EA4311C0F3801041EA801050843F\n:10ED3000E07D012808BF012507D0022808BF022571\n:10ED400003D0032814BFFFDF0825306880F85E5029\n:10ED5000607E012808BF012507D0022808BF0225D0\n:10ED600003D0032814BFFFDF0825316881F85F5006\n:10ED700091F83500012829D0207B81F82400488CA7\n:10ED80001D280CBF002060688862607D81F8370014\n:10ED9000A07B002816BF0228002001200875D4F8A7\n:10EDA0000F00C1F81500B4F81300A1F81900A07EF7\n:10EDB00091F86B2060F3071281F86B20E07E012848\n:10EDC00018BF002081F83400002078BD91F85E2043\n:10EDD0000420082A08BF81F85E00082D08BF81F8CA\n:10EDE0005F00C9E742480068408CC0F3001131B1B0\n:10EDF000C0F38000002804BF1F20704702E0C0F36A\n:10EE0000400109B10020704710F0010F14BFEE203F\n:10EE1000FF20704736480068408CC0F3001119B1DC\n:10EE2000C0F3800028B102E0C0F3400008B1002028\n:10EE30007047012070472E49002209684A664B8CB2\n:10EE40001D2B0CBF81F8682081F8680070470023F3\n:10EE5000274A126882F85D30D164A2F85000012080\n:10EE600082F85D007047224A0023126882F85C3005\n:10EE7000A2F858000120516582F85C0070471C49D7\n:10EE8000096881F8360070471949096881F86100FE\n:10EE900070471748006890F961007047144800688F\n:10EEA00090F82200C0F3401070471148006890F8B5\n:10EEB0002200C0F3C0007047012070470C48006872\n:10EEC00090F85F00704770B509F018FE09F0F7FD83\n:10EED00009F0C0FC09F06CFD054C2068416E491C2E\n:10EEE000416690F83300002558B109F01DFE03E09B\n:10EEF000680000200C06002008F007FF206880F85A\n:10EF000033502068457090F8391021B1BDE8704049\n:10EF100004200AF0AEBF90F86810D9B1406E81426B\n:10EF200018D804200AF0A5FF206890F8220010F0FD\n:10EF3000010F07D0A06843220188BDE8704001207E\n:10EF4000FFF73CBBBDE8704043224FF6FF71002045\n:10EF5000FFF734BBBDE8704000200AF08ABF2DE9FE\n:10EF6000F04782B00F468146FE4E4FF000083068F1\n:10EF7000458C15F0030F10D015F0010F05F00200BD\n:10EF800005D0002808BF4FF0010806D004E0002893\n:10EF900018BF4FF0020800D1FFDF4FF0000A5446BF\n:10EFA00015F0010F05F002000DD080B915F0040F27\n:10EFB0000DD04AF00800002F1CBF40F0010040F0C7\n:10EFC00002044DD09EE010B115F0040F0DD015F0E5\n:10EFD000070F10D015F0010F05F0020043D00028F4\n:10EFE00008BF15F0040F34D04AE0002F18BF4AF0D4\n:10EFF000090444D141E037B14AF00800044615F055\n:10F00000200F1BD07EE0316805F02002B1F84800E7\n:10F01000104308BF4AF0010474D04AF018000446B7\n:10F0200015F0200F6ED191F85E1011F00C0118BF91\n:10F030000121C94361F30000044663E0316891F89F\n:10F040005E1011F00C0118BF012161F300000446AD\n:10F0500058E04AF00800002F18BF40F0010451D1D9\n:10F0600040F010044EE0002818BF15F0040F07D040\n:10F07000002F18BF4AF00B0444D14AF0180441E0B5\n:10F0800015F0030F3DD115F0040F3AD077B1306879\n:10F090004AF0080490F85E0010F00C0118BF01213E\n:10F0A00061F3410415F0200F24D02BE0306805F007\n:10F0B0002002B0F84810114308BF4AF0030421D0E1\n:10F0C0004AF0180415F0200F0AD000BF90F85E0037\n:10F0D00010F00C0018BF0120C04360F3410411E0A0\n:10F0E00090F85E1011F00C0118BF0121C94361F3C3\n:10F0F0000004EBE710F00C0018BF012060F30004DF\n:10F1000000E0FFDF15F0400F1CD0CFB93168B1F837\n:10F110004800002804BF488C10F0010F0BD110F0FC\n:10F12000020F08BF10F0200F05D115F0010F08BF26\n:10F1300015F0020F04D091F85E0010F00C0F01D111\n:10F1400044F040047068A0F800A0017821F020018C\n:10F1500001704FF007010EF005FE414670680EF099\n:10F16000F8FF214670680FF000F814F0010F0CD082\n:10F170004FF006034FF000027B4970680EF0CFFF9E\n:10F180003068417B70680EF02FFE14F0020F18D02B\n:10F19000D6E90010B9F1000F4FF006034FF001025D\n:10F1A00007D01C310EF0BBFF012170680EF029FE64\n:10F1B00007E015310EF0B3FF3068017D70680EF086\n:10F1C00020FE14F0040F18BFFFDF14F0080F19D051\n:10F1D000CDF800A03068BDF800200223B0F86A1016\n:10F1E00061F30B02ADF8002090F86B0003220109D7\n:10F1F0009DF8010061F307108DF801006946706801\n:10F200000EF08DFF012F62D13068B0F84810E1B3E5\n:10F2100090F82200C0F34000B8BB70680EF095FF74\n:10F22000401CC7B23068C7F1FF05B0F84820B0F8FD\n:10F230005A10511AA942B8BF0D46AA423BD990F8BC\n:10F24000220010F0010F36D144F0100421467068FE\n:10F250000EF08BFFF81CC0B2ED1E284482B230685D\n:10F26000B0F86A10436EC1F30B0151FA83F190F8C4\n:10F2700060303E4F1944BC460023E1FB07C31B0925\n:10F280006FF0240C03FB0C1100E020E080F860100C\n:10F2900090F85F00012101F01FF90090BDF8000017\n:10F2A0009DF80210032340EA01400190042201A9C5\n:10F2B00070680EF034FF3068AAB2416C70680EF0CE\n:10F2C00082FF3068B0F85A102944A0F85A1014F0A0\n:10F2D000400F06D0D6E900100123062261310EF05E\n:10F2E0001EFF14F0200F18BFFFDF0020002818BFFA\n:10F2F000FFDF02B0BDE8F0872DE9F043194C89B07B\n:10F300002068002808BFFFDF20684178002944D129\n:10F310000178FF2941D0002680F83160A0F85A60BA\n:10F32000867080F83960304609F062FB104802AD03\n:10F3300000F1240191E80E1085E80E10D0E90D10BF\n:10F34000CDE9061002A809F041FB08F0BCFF2068D7\n:10F3500090F9610009F090F8064809F093F8064822\n:10F360000CE00000680000201A06002053E4B36E91\n:10F37000C8610200D0610200CD61020009F012FBF9\n:10F38000606809F038FB206890F8240010F0010F45\n:10F3900007D0252009F07EF80AE009B00C20BDE86E\n:10F3A000F08310F0020F18BF262069D009F072F820\n:10F3B000206890F85E10252008F043FF206880F850\n:10F3C0002C6009F00FFB206890F85E10002009F017\n:10F3D00028F90F21052008F0F8FF206890F82E107A\n:10F3E000002901BF90F82F10002990F8220010F09A\n:10F3F000040F74D006F0B8FE0546206829468068E0\n:10F4000007F0AAFBDFF82884074690FBF8F008FB1A\n:10F4100010704142284606F08EFB2168886097FBF9\n:10F42000F8F04A68104448600EF062FA014620681D\n:10F43000426891426ED8C0E90165FE4D4FF0010867\n:10F4400095F82D000EF063FA814695F82F000127FC\n:10F45000002818BFB9F1000F04D095F82D000EF068\n:10F460008AF8A0B195F8300000281CBF95F82E004E\n:10F47000002824D0687B05F10E01012815D019E081\n:10F4800010F0040F14BF2720FFDF8FD190E73A461A\n:10F490006F7305F10E0148460AF0B6F895F82D1085\n:10F4A00005F10E000EF035FB09E0487900F0C000D0\n:10F4B000402815D0414605F10E000AF0DDF820681D\n:10F4C00090F8220010F0040F24D095F82D000EF0D3\n:10F4D000EDF805001ED0102101F09AFC40B119E0B2\n:10F4E0000EF054FB3A4605F10E010AF08DF8E6E7FE\n:10F4F00020683A4600F11C01C77628460AF084F8D5\n:10F50000206800F11C0160680EF060FC0121606859\n:10F510000EF077FC2068417B0E3008F038FF206841\n:10F5200090F85C1061B3B0F85810A0F84810416D25\n:10F53000416490F82210C1F30011F1B9B0F86A00EB\n:10F540000221C0F30B05ADF80050684607F0B0FF8C\n:10F5500028B1BDF80000C0F30B00A84204D1BDF8EB\n:10F560000000401CADF800002168BDF80000B1F8B3\n:10F570006A2060F30B02A1F86A20206880F85C60C2\n:10F58000206890F85D1039B1B0F85010A0F8401024\n:10F59000C16CC16380F85D60B0F86A10426EC1F35F\n:10F5A0000B0151FA82F190F86020DFF88CC211440F\n:10F5B00063460022E1FB0C3212096FF0240302FBC8\n:10F5C000031180F860100EF00CFA032160680EF051\n:10F5D00090FA216881F8330009B00020BDE8F0837B\n:10F5E0009649886070472DE9F043944C83B02268B7\n:10F5F00092F831303BB1508C1D2808BFFFDF03B0BB\n:10F60000BDE8F0435FE401260027F1B1054692F81A\n:10F61000600008F03FFF206890F85F10FF2008F0BE\n:10F6200010FE20684FF4A57190F85F20002009F0CB\n:10F63000D4F8206890F8221011F0030F00F02C810C\n:10F64000002D00F0238100F027B992F822108046A7\n:10F65000D07EC1F30011002956D0054660680780AE\n:10F66000017821F020010170518C132937D01FDC63\n:10F67000102908BF022144D0122908BF062140D01A\n:10F68000FFDF6C4D606805F10E010EF091FB697BA8\n:10F6900060680EF0A9FB2068418C1D2918BF152950\n:10F6A00063D0B0F84820416C60680EF0B6FB5CE0B7\n:10F6B000152918BF1D29E3D14FF001010EF052FBAF\n:10F6C0006068017841F020010170216885B11C312A\n:10F6D0000EF07CFB012160680EF093FBD1E7002166\n:10F6E0000EF040FB6068017841F020010170C8E72E\n:10F6F00015310EF06BFB2068017D60680EF081FB18\n:10F70000BFE70EF02FFBBCE70021FFF728FC606885\n:10F71000C17811F03F0F28D0017911F0100F24D0DB\n:10F720000EF01EFB2368024693F82410C1F38000FC\n:10F73000C1F3400C604401F00101084493F82C101F\n:10F74000C1F3800CC1F34005AC4401F001016144F8\n:10F75000401AC1B293F85E0000F0BEFE0090032391\n:10F760000422694660680EF0DAFC2068002590F8F3\n:10F77000241090F82C0021EA000212F0010F18BFAB\n:10F7800001250ED111F0020F04D010F0020F08BFB6\n:10F79000022506D011F0040F03D010F0040F08BFAB\n:10F7A0000425B8F1000F2BD0012D1BD0022D08BF6E\n:10F7B00026201BD0042D14BFFFDF272016D0206881\n:10F7C00090F85E10252008F03CFD206890F822108B\n:10F7D000C1F3001169B101224FF49671002008F0C5\n:10F7E000FCFF0DE0252008F055FEE8E708F052FE8A\n:10F7F000E5E790F85E204FF49671002008F0EDFFE9\n:10F80000206890F82C10294380F82C1090F82420C0\n:10F8100032EA01011CD04670418C13292BD026DC22\n:10F82000102904BF03B0BDE8F083122923D007E0FC\n:10F8300040420F000C06002053E4B36E6800002025\n:10F84000C1F30010002818BFFFDF03B0BDE8F0834C\n:10F85000418C1D2908BF80F82C70DCD0C1F3001149\n:10F86000002914BF80F8316080F83170D3E7152982\n:10F8700018BF1D29DBD190F85E2003B04FF00101C5\n:10F88000BDE8F043084609F094B900BF90F85F2046\n:10F890000121084609F08DF92168002DC87E7CD031\n:10F8A0004A8C3D46C2F34000002808BF47F00805D7\n:10F8B00012F0400F18BF45F04005002819BFD1F8DD\n:10F8C0003C90B1F84080D1F84490B1F8488060682D\n:10F8D000072107800EF046FA002160680EF039FC1F\n:10F8E000294660680EF041FC15F0080F17D020681B\n:10F8F000BDF800100223B0F86A2062F30B01ADF8E6\n:10F90000001090F86B00032201099DF8010061F3DB\n:10F9100007108DF80100694660680EF000FC606811\n:10F920000EF0DCFA2168C0F1FE00B1F85A20A8EB15\n:10F9300002018142A8BF0146CFB2D019404544D24E\n:10F9400045F0100160680EF010FC60680EF0C6FA19\n:10F950002168C0F1FE00B1F85A10A8EB0101814204\n:10F96000A8BF0146CFB260680EF0EFFB3844421CDE\n:10F970002068B0F86A10436EC1F30B0151FA83F1AD\n:10F9800090F86030FE4D1944AC460023E1FB05C3FE\n:10F990004FEA131C6FF0240300E03CE00CFB031162\n:10F9A00080F8601090F85F00012100F095FD009054\n:10F9B000BDF800009DF80210032340EA01400190C9\n:10F9C000042201A960680EF0AAFB216891F82200C8\n:10F9D00010F0400F05D001230622613160680EF05F\n:10F9E0009EFB20683A46B0F85A0000EB09016068B7\n:10F9F0000EF0E9FB2068B0F85A103944A0F85A100C\n:10FA000009F0BFFC002818BFFFDF20684670867031\n:10FA100003B0BDE8F0830121FFF7A1FAF0E7D94870\n:10FA200010B50068417841B90078FF2805D0002161\n:10FA30000846FFF7D8FD002010BD09F05FF809F077\n:10FA40003EF808F007FF08F0B3FF0C2010BD2DE9C9\n:10FA5000F041CC4D0446174628680E4690F86C00DD\n:10FA6000002818BFFFDF2868002F80F86E7018BFCD\n:10FA7000BDE8F0812188A0F870106188A0F8861098\n:10FA8000A188A0F88810E188A0F88A1094F888115D\n:10FA900080F88C1090F82F10002749B1427B00F1BC\n:10FAA0000E01012A04D1497901F0C001402935D065\n:10FAB00090F8301041B1427B00F10E01012A04BFE1\n:10FAC000497911F0C00F29D000F17A00F3F794FAC8\n:10FAD0006868FF2E0178C1F380116176D0F80310B9\n:10FAE000C4F81A10B0F80700E08328681ED0C0F8E8\n:10FAF0008010E18BA0F8841000F17402511E304692\n:10FB00000DF014FF002808BFFFDF286890F873107D\n:10FB100041F0020180F87310BDE8F081D0F80E10BA\n:10FB2000C0F87A10418AA0F87E10D1E7C0F8807042\n:10FB3000A0F88470617E80F87310D4F81A104167C1\n:10FB4000E18BA0F87810BDE8F08170B58D4C0125EF\n:10FB5000206890F82200C0F3C00038B13C22FF2199\n:10FB6000A068FFF774FF206880F86C50206890F858\n:10FB7000220010F0010F1CBFA06801884FF03C026A\n:10FB800012BF01204FF6FF710020FEF717FD20681D\n:10FB900080F8395070BD7B49096881F832007047A0\n:10FBA0002DE9F041774C0026206841780127354641\n:10FBB000012906D0022901D003297DD0FFDFBDE84D\n:10FBC000F081817802250029418C46D0C1F34002A2\n:10FBD000002A08BF11F0010F6FD090F85F204FF09E\n:10FBE00001014FF0000008F0E4FF216891F82200C5\n:10FBF000C0F34000002814BF0C20222091F85F10B1\n:10FC000008F01FFB2068457090F8330058B108F0E9\n:10FC100068F8206890F85F0010F00C0F0CBF4020CF\n:10FC2000452008F077FF206890F83400002818BFBE\n:10FC300008F08FFF216891F85F0091F8691010F0CB\n:10FC40000C0F08BF0021962008F0F6FE09F090FB8B\n:10FC5000002818BFFFDFBDE8F081C1F3001282B1B8\n:10FC600010293FD090F8330020B108F03AF8402036\n:10FC700008F050FF206890F8221011F0040F36D0E1\n:10FC800043E090F8242090F82C309A422AD1B0F822\n:10FC90004800002808BF11F0010F05D111F0020F34\n:10FCA00008BF11F0200F6FD04FF001014FF000009E\n:10FCB000FFF799FC206801E041E035E0418C11F04C\n:10FCC000010F04BFC1F34001002907D1B0F85A1059\n:10FCD000B0F84820914218BFBDE8F08180F831703B\n:10FCE000BDE8F081BDE8F041002101207BE490F8FF\n:10FCF0003710012914BF0329102646F00E0190F891\n:10FD00005E204FF0000008F054FF206890F83400A7\n:10FD1000002818BF08F01DFF0021962008F08CFE77\n:10FD200020684570BDE8F081B0F85A10B0F848007E\n:10FD3000814242D0BDE8F0410121084653E4817878\n:10FD4000D9B1418C11F0010F22D080F86C7090F87D\n:10FD50006E20B0F870100120FEF730FC206845706E\n:10FD600008F0CCFE08F0ABFE08F074FD08F020FEB1\n:10FD7000BDE8F04103200AF07CB88178012004E05E\n:10FD800053E4B36E6800002017E0BDE8F0412AE4B8\n:10FD900011F0020F04BFFFDFBDE8F081B0F85A1088\n:10FDA000B0F84000814208D001210846FFF71BFC53\n:10FDB000216803204870BDE8F081BDE8F041FFF7FD\n:10FDC00082B8FFF780B810B5FE4C206890F8341068\n:10FDD00049B1383008F0CCFE18B921687F2081F88D\n:10FDE000380008F0ACFE206890F8330018B108F035\n:10FDF0009BFE07F08AFF0AF02EFCA8B1206890F85D\n:10FE00002210C1F3001179B14078022818BFFFDF3A\n:10FE100000210120FFF7E7FB2068417800291EBF81\n:10FE200040780128FFDF10BDBDE81040FFF74BB858\n:10FE30002DE9F047E34C0F4680462168B8F1030FE7\n:10FE4000488C08BFC0F3400508D000F0010591F8C8\n:10FE50003200002818BF4FF0010901D14FF000090E\n:10FE600008F00CFB0646B8F1030F0CBF4FF0020878\n:10FE70004FF0010835EA090008BFBDE8F0872068A7\n:10FE800090F8330068B10DF08FFD38700146FF28FF\n:10FE900007D06068C01C0DF060FD38780DF091FD52\n:10FEA000064360680178C1F3801221680B7D9A4295\n:10FEB00008D10622C01C1531FEF792FA002808BFAF\n:10FEC000012000D000203978FF2906D0C8B9206869\n:10FED00090F82D00884216D113E0A0B1616811F8A6\n:10FEE000030BC0F380100DF006FD05460DF061FE1A\n:10FEF00038B128460DF0DAFB18B1102100F088FF68\n:10FF000008B1012000E00020216891F8221011F0D2\n:10FF1000040F01D0F0B11AE0CEB9AB4890F8370029\n:10FF2000002818BF404515D1616811F8030BC0F3D4\n:10FF300080100DF0E0FC04460DF03BFE38B1204689\n:10FF40000DF0B4FB18B1102100F062FF10B10120D8\n:10FF5000BDE8F0870020BDE8F0872DE9F04F994D0E\n:10FF6000044683B0286800264078022818BFFFDFC7\n:10FF700028684FF07F0B90F8341049B1383008F002\n:10FF8000F7FD002804BF286880F838B008F0D7FDD6\n:10FF900068680DF009FF8046002C00F0458208F0EB\n:10FFA00010FA002800F04082012400274FF0FF09DA\n:10FFB000B8F1050F1ED1686890F8240000F01F000A\n:10FFC000102817D9286890F8360098B18DF800905D\n:10FFD00069460520FFF72CFF002800F025822868DD\n:10FFE00080F8A64069682222A730C91CFEF725FACE\n:10FFF00000F01ABA68680EF062F8002800F0148267\n:020000040001F9\n:100000004046DFF8C4814FF0030A062880F02182C1\n:10001000DFE800F0FCFCFC03FCFB8DF80090694677\n:100020000320FFF705FF002800F0F180296891F810\n:10003000340010B191F89C00D8B12868817801296A\n:100040004DD06868042107800DF08CFE08F10E0188\n:1000500068680DF0ADFE98F80D1068680DF0C4FEEC\n:100060002868B0F84020C16B68680DF0FAFE00F017\n:1000700063B99DF8000081F89C400A7881F89D20C2\n:10008000FF280FD001F19F029E310DF04FFC002898\n:1000900008BFFFDF286890F89E1041F0020180F849\n:1000A0009E100DE068680278C2F3801281F89E20ED\n:1000B000D0F80320C1F89F20B0F80700A1F8A300F2\n:1000C000286800F1A50490F838007F2808BFFFDFFA\n:1000D000286890F83810217080F838B0ADE790F8B3\n:1000E00022000721C0F3801938480479686869F351\n:1000F000861407800DF036FE002168680EF029F89E\n:10010000214668680EF031F80623002208F10E013E\n:1001100068680EF004F82868417B68680DF064FE9A\n:1001200068680DF0DBFE2968B1F84020C0F1FE01DF\n:100130008A42B8BF1146CFB2BA423CD9F81EC7B204\n:1001400044F0100B594668680EF00FF868680DF01F\n:10015000FCFF384400F101082868B0F86A10426ECC\n:10016000C1F30B0151FA82F190F86020184C0A4457\n:10017000A4460023E2FB04C319096FF0240301FB2A\n:10018000032180F8601090F85F004246012100F0E2\n:10019000A3F90190BDF804009DF80610032340EA7E\n:1001A00001400290042202A968680DF0B8FF594688\n:1001B00068680DF0DAFFB9F1000F0FD0D5E9001033\n:1001C000012307E0680000200C060020C86102003F\n:1001D00053E4B36E062261310DF0A1FF28683A4660\n:1001E000C16B68680DF0EFFF2868A0F85A70B0F88E\n:1001F00040108F420CBF0121002180F8311009F01E\n:10020000C0F8002818BFFFDF96E007E021E128686A\n:100210008078002840F00A8100F006B98DF800903F\n:1002200068680178C1F38019D0F803100191B0F823\n:100230000700ADF8080069460520FFF7F9FD002822\n:1002400028687DD0817800297CD090F85FB0D5E90E\n:100250000104D0F80F10C4F80E10B0F8131061822A\n:10026000417D2175817D6175B0F81710E182B0F88C\n:1002700019106180B0F81B10A180B0F81D10E1804A\n:1002800000F11F0104F1080015F085FE686890F880\n:10029000241001F01F01217690F82400400984F811\n:1002A000880184F864B084F865B01BF00C0F0CBFB3\n:1002B0000021012104F130000EF0ABF92868002282\n:1002C00090F8691084F8661090F8610084F867006F\n:1002D0009DF80010A868FFF7BAFB022009F0C9FDDD\n:1002E000B2480DF1040B08210468686807800DF01E\n:1002F00039FD002168680DF02CFF214668680DF07B\n:1003000034FF0623002208F10E0168680DF007FF94\n:100310002868417B68680DF067FD494668680DF004\n:1003200070FD06230122594668680DF0F8FE09F0B9\n:1003300028F8002818BFFFDF286880F801A077E0C0\n:100340006DE0FFE76868D5F808804FF00109027892\n:1003500098F80D10C2F34012114088F80D10D0F833\n:100360000F10C8F80E10B0F81310A8F81210417D45\n:1003700088F81410817D88F81510B0F81710A8F8C7\n:100380001610B0F81910A8F80210B0F81B10A8F851\n:100390000410B0F81D10A8F8061000F11F0108F1B4\n:1003A000080015F0F8FD686890F8241001F01F01AE\n:1003B00088F8181090F824000021400988F8880176\n:1003C00088F8649088F8659008F130000EF021F903\n:1003D0002868002290F8691088F8661090F861008B\n:1003E00088F867009DF80010A868FFF730FB2868C0\n:1003F00080F86C4090F86E20B0F870100120FEF785\n:10040000DDF82868477008F079FB08F058FB08F021\n:1004100021FA08F0CDFA012009F02BFD08E090F850\n:100420002200C0F3001008B1012601E0FEF74BFDE9\n:10043000286890F8330018B108F076FB07F065FCE7\n:1004400096B10AF008F960B100210120FFF7CBF85E\n:1004500013E0286890F82200C0F300100028E5D0CF\n:10046000E2E7FEF730FD08E028688178012904D131\n:1004700090F85F10FF2007F0E4FE2868417800291B\n:1004800019BF4178012903B0BDE8F08F40780328F7\n:1004900018BFFFDF03B0BDE8F08F70B5444C0646CF\n:1004A0000D462068807858B107F0F2FD21680346B8\n:1004B000304691F85F202946BDE870400AF085BAC1\n:1004C00007F0E6FD21680346304691F85E20294694\n:1004D000BDE870400AF079BA78B50C460021009169\n:1004E000082804BF4FF4C87040210DD0042804BF71\n:1004F0004FF4BF70102107D0022807BF01F1180088\n:10050000042101F128000821521D02FB01062848A0\n:100510009DF80010006890F8602062F3050141F03A\n:1005200040058DF8005090F85F00012829D002287E\n:100530002ED004281CBF0828FFDF2FD025F0800014\n:100540008DF80000C4EB041000EB80004FF01E019A\n:1005500001EB800006FB04041648844228BFFFDF3D\n:100560001548A0FB0410BDF80110000960F30C0150\n:10057000ADF80110BDF800009DF8021040EA0140FE\n:1005800078BD9DF8020020F0E0008DF80200D5E76C\n:100590009DF8020020F0E000203004E09DF8020009\n:1005A00020F0E00040308DF80200C7E7C86102008B\n:1005B00068000020C4BF0300898888880023C383A3\n:1005C000428401EBC202521EB2FBF1F1018470477A\n:1005D0002DE9F04104460026D9B3552333224FF4C8\n:1005E000FA4501297DD0022900F01481032918BFA2\n:1005F000BDE8F08104F17001207B00F01F00207342\n:1006000084F889605FF0000004EB000C9CF808C0DF\n:1006100003EA5C05ACEB050C0CF0FF0C0CF03305A9\n:1006200002EA9C0CAC440D180CEB1C1C0CF00F0CDB\n:1006300085F814C04D7E401CAC44C0B281F819C08E\n:100640000528E1D30CF0FF00252898BFBDE8F08114\n:10065000DCE0FFE704F17005802200212846FDF769\n:1006600016FFAE71EE712E736E73EE732E746E7193\n:10067000AE76EE76212085F84000492085F84100CD\n:10068000FE2085F874002588702200212046FDF7A1\n:10069000FEFE2580012584F8645084F865502820EA\n:1006A00084F86600002104F130000DF0B2FF1B2237\n:1006B000A4F84E20A4F85020A4F85220A4F8542006\n:1006C0004FF4A470A4F85600A4F8580065734FF4D2\n:1006D00048606080A4F8F060A4F8F260A4F8F460C8\n:1006E00000E023E0A4F8F660A4F8F86084F8FA606B\n:1006F00084F8FD60A4F8066184F80461A4F8186128\n:10070000A4F81A6184F8B66184F8B76184F8C0610E\n:1007100084F8C16184F88C6184F88F6184F8A861E1\n:10072000C4F8A061C4F8A461BDE8F081A4F8066132\n:1007300084F8FB606088FE490144B1FBF0F1A4F845\n:1007400090104BF68031A4F89210B4F806C0A4F8CB\n:100750009860B4F89C704FEACC0C4743BCFBF0FCAB\n:1007600097FBF0F70CF1010CA4F89C701FFA8CFCBD\n:100770000CFB00F704F17001A4F89AC0B7F5C84F5C\n:10078000C4BFACF1010CA1F82AC0B5FBF0FC0CF120\n:10079000010CA1F830C000F5802C0CF5EE3CACF15A\n:1007A0000105B5FBF0FCA1F820C0CD8B05FB00FCDA\n:1007B000BCFBF0F0C8830846217B01F01F012173C8\n:1007C0004676002104EB010C9CF808C003EA5C05A6\n:1007D000ACEB050C0CF0FF0C0CF0330502EA9C0CA2\n:1007E000AC4445180CEB1C1C0CF00F0C85F814C025\n:1007F000457E491CAC44C9B280F819C00529E1D333\n:100800000CF0FF00252898BFBDE8F081FFDFBDE8B0\n:10081000F08100BFB4F8B011B4F8B4316288A4F824\n:100820009860B4F89CC0DB000CFB02FCB3FBF1F356\n:100830009CFBF1FC5B1CA4F89CC09BB203FB01FC7D\n:1008400004F17000A4F89A30BCF5C84FC4BF5B1E19\n:100850004385B5FBF1F35B1C0386438C01EBC303BB\n:100860005B1EB3FBF1F30384C38B5A43B2FBF1F17C\n:10087000C183BDE8F0812DE9F04104460025A1B314\n:1008800055234FF4FA464FF0330C01297DD002294D\n:1008900000F0E080032918BFBDE8F08104F170008A\n:1008A000217B01F01F01217384F889500021621817\n:1008B000127A03EA5205521BD2B202F033050CEA57\n:1008C00092022A44451802EB121202F00F022A7516\n:1008D000457E491C2A44C9B242760529E7D3D0B2E5\n:1008E000252898BFBDE8F081B1E0FFE704F170066C\n:1008F000802200213046FDF7CAFDB571F5713573D0\n:100900007573F57335747571B576F576212086F8B3\n:100910004000492086F84100FE2086F874002688B1\n:10092000702200212046FDF7B2FD2680012684F8C2\n:10093000646084F86560282084F86600002104F172\n:1009400030000DF066FE1B22A4F84E20A4F85020C3\n:10095000A4F85220A4F854204FF4A470A4F8560030\n:10096000A4F858006673A4F8F850202084F8FA0020\n:1009700084F8F050C4F8F45084F8245184F82551D8\n:1009800084F82E5184F82F5100E005E084F81451CA\n:1009900084F82051BDE8F081618865480844B0FBC7\n:1009A000F1F0A4F890004BF68030A4F89200E288B1\n:1009B000A4F89850B4F89C70D2004F43B2FBF1F207\n:1009C00097FBF1F7521CA4F89C7092B202FB01F75E\n:1009D00004F17000A4F89A20B7F5C84FC4BF521EA6\n:1009E0004285B6FBF1F2521C028601F5802202F527\n:1009F000EE32561EB6FBF1F20284C68B06FB01F204\n:100A0000B2FBF1F1C1830146207B00F01F0020738F\n:100A10004D7600202218127A03EA5205521BD2B2F8\n:100A200002F033050CEA92022A440D1802EB12126E\n:100A300002F00F022A754D7E401C2A44C0B24A764D\n:100A40000528E7D3D0B2252898BFBDE8F081FFDFA5\n:100A5000BDE8F081D0F81811628804F1700348896C\n:100A6000C989A4F89850B4F89CC0C9000CFB02FCDA\n:100A7000B1FBF0F19CFBF0FC491CA4F89CC089B2CE\n:100A800001FB00FCA4F89A10BCF5C84FC4BF491E76\n:100A90005985B6FBF0F1491C1986598C00EBC10150\n:100AA000491EB1FBF0F11984D98B5143B1FBF0F031\n:100AB000D883BDE8F0812DE9F003447E0CB1252CEC\n:100AC00003D9BDE8F00312207047002A02BF0020BE\n:100AD000BDE8F003704791F80DC01F260123154DA6\n:100AE0004FF00008BCF1000F7AD0BCF1010F1EBF1F\n:100AF0001F20BDE8F0037047B0F800C00A7C8F7B70\n:100B000091F80F907A404F7C87EA090742EA072262\n:100B100082EA0C0C5FF000070CF0FF0999FAA9F9C2\n:100B20004FEA1C2C4FEA19699CFAACFC04E0000067\n:100B3000FFDB050053E4B36E4FEA1C6C49EA0C2C52\n:100B40000CEB0C1C7F1C9444FFB21FFA8CFC032F8F\n:100B5000E2D38CEA020CFB4F0022ECFB0572120977\n:100B60006FF0240502FB05C2D2B201EBD2078276F8\n:100B700002F007053F7A03FA05F52F4218BFC27647\n:100B80007ED104FB0CF2120C521CD2B25FF00004B6\n:100B900000EB040C9CF814C094453CBFA2EB0C0283\n:100BA000D2B212D30D194FF0000C2D7A03FA0CF7C4\n:100BB0003D421CBF521ED2B2002A69D00CF1010C7A\n:100BC0000CF0FF0CBCF1080FF0D304F1010C0CF099\n:100BD000FF04052CDCD33046BDE8F0037047FFE787\n:100BE00090F81AC00C7E474604FB02C2D54C4FF069\n:100BF000000CE2FB054C4FEA1C1C6FF024040CFBBC\n:100C00000422D2B201EBD204827602F0070C247ADD\n:100C100003FA0CFC14EA0C0F1FBFC2764046BDE875\n:100C2000F003704790F819C0B2FBFCF40CFB1422DF\n:100C3000521CD2B25FF0000400EB040C9CF814C00C\n:100C400094453CBFA2EB0C02D2B212D30D194FF067\n:100C5000000C2D7A03FA0CF815EA080F1CBF521E7F\n:100C6000D2B272B10CF1010C0CF0FF0CBCF1080F08\n:100C7000F0D304F1010C0CF0FF04052CDCD3AAE73F\n:100C800009E00CEBC401C1763846BDE8F0037047BB\n:100C90000CEBC401C1764046BDE8F0037047AA4A98\n:100CA000016812681140A94A126811430160704737\n:100CB00030B4A749A44B00244FF0010C0A78521C11\n:100CC000D2B20A70202A08BF0C700D781A680CFA8C\n:100CD00005F52A42F2D0097802680CFA01F1514078\n:100CE000016030BC704770B46FF01F02010C02EA63\n:100CF00090251F23A1F5AA4054381CBFA1F5AA4096\n:100D0000B0F1550009D0A1F52850AA381EBFA1F5B1\n:100D10002A40B0F1AA00012000D100204FF0000CC1\n:100D2000624601248CEA0106F6431643B6F1FF3F02\n:100D300011D005F001064FEA5C0C4CEAC63C03F00A\n:100D4000010652086D085B08641C42EAC632162C84\n:100D5000E8DD70BC704770BC0020704790F804C09C\n:100D60003CF01F011CBF0020704730B401785522B1\n:100D700002EA5103C91AC9B201F03304332303EA6A\n:100D800091012144447801EB111102EA5405641BDE\n:100D9000E4B204F0330503EA94042C4404EB141485\n:100DA00001F00F0104F00F040C448178C07802EACE\n:100DB0005105491BC9B201F0330503EA91012944E9\n:100DC00001EB111101F00F01214402EA5004001B54\n:100DD000C0B200F0330403EA9000204400EB10108E\n:100DE00000F00F00014402EA5C00ACEB0000C0B26E\n:100DF00000F0330203EA9000104400EB101000F002\n:100E00000F00084401288CBF0120002030BC70472F\n:100E10000A000ED00123012A0BDB491EC9B210F8CB\n:100E200001C0BCF1000F01D0002070475B1C934251\n:100E3000F3DD01207047002A08BF70471144401EAF\n:100E400012F0010F03D011F8013D00F8013F5208E4\n:100E500008BF704711F8013C437011F8023D00F8DB\n:100E6000023F521EF6D1704770B58CB000F11004ED\n:100E70001D4616460DF1FF3C5FF0080014F8012CEA\n:100E80008CF8012014F8022D0CF8022F401EF5D129\n:100E900001F1100C6C460DF10F0108201CF8012C1B\n:100EA0004A701CF8022D01F8022F401EF6D1204690\n:100EB00013F01CFB7EB16A1E04F130005FF00801E4\n:100EC00010F8013C537010F8023D02F8023F491E31\n:100ED000F6D10CB070BD08982860099868600A982F\n:100EE000A8600B98E8600CB070BD38B505460C469C\n:100EF000684607F03DFE002808BF38BD9DF9002078\n:100F00002272E07E607294F90A100020511A48BFE4\n:100F1000494295F82D308B42C8BF38BDFF2B08BF22\n:100F200038BDE17A491CC9B2E17295F82E30994278\n:100F300003D8A17A7F2918BF38BDA2720020E072C1\n:100F4000012038BD53E4B36E04620200086202005F\n:100F5000740000200C2818BF0B2810D00D2818BFD3\n:100F60001F280CD0202818BF212808D0222818BFFD\n:100F7000232804D024281EBF2628002070474FF0C5\n:100F8000010070470C2963D2DFE801F006090E1357\n:100F9000161B323C415C484E002A5BD058E0072AC1\n:100FA00018BF082A56D053E00C2A18BF0B2A51D07C\n:100FB0004EE00D2A4ED04BE0A2F10F000C2849D98B\n:100FC00046E023B1A2F110000B2843D940E0122AD9\n:100FD00018BF112A3ED090F8380020B1122A37D31A\n:100FE0001A2A37D934E0162A32D31A2A32D92FE0F6\n:100FF000A2F10F0103292DD990F8380008B31B2A5C\n:1010000028D925E0002B08BF042A21D122E013B102\n:10101000062A1FD01CE0012A1AD11BE01C2A1CBF83\n:101020001D2A1E2A16D013E01F2A18BF202A11D00D\n:10103000212A18BF222A0DD0232A1CBF242A262A9F\n:1010400008D005E013B10E2A04D001E0052A01D032\n:1010500000207047012070472DE9F0410D460446FD\n:10106000866805F02FFA58B905F07EF840F236711F\n:1010700004F061FDA060204605F024FA0028F3D0BA\n:1010800095B13046A16805F067FD00280CDD2844C5\n:10109000401EB0FBF5F707FB05F1304604F04BFDB1\n:1010A000A0603846BDE8F0810020BDE8F08170B551\n:1010B0000446904228BF70BD101B64280BD325182E\n:1010C0008D4206D8042105F07AFD00281CBF284671\n:1010D00070BD204670BD6420F1E711F00C0F13D0F5\n:1010E00001F0040100290DBF4022102296214FF487\n:1010F000167101F5BC71A0EB010388428CBF93FB14\n:10110000F2F0002080B27047022919BF6FF00D0184\n:1011100001EBD0006FF00E0101EB9000F2E7084404\n:1011200018449830002A14BF042100210844704755\n:1011300010B4002A14BF4FF429624FF4A472002B9C\n:1011400019BF4FF429634FF0080C4FF4A4734FF00C\n:10115000010C00280CBF0124002491F866001CF04B\n:101160000C0F08BF0020D11808449830002C14BF81\n:1011700004210021084410BC704700280CBF012343\n:10118000002391F86600002BA0F6482000F50050DF\n:1011900018BF04231844496A81422CBF0120002053\n:1011A00012F00C0118BF012131EA000014BF002029\n:1011B0000120704710B413680B66137813F00C030A\n:1011C00018BF0123527812F00C0218BF012253EA13\n:1011D000020C04BF10BC7047002B0CBF4FF4A4736B\n:1011E0004FF42963002A19BF4FF429624FF0080C0D\n:1011F0004FF4A4724FF0010C00280CBF012400240E\n:1012000091F866001CF00C0F08BF00201A4410442F\n:101210009830002C14BF0422002210444A6A8242F3\n:1012200024BF10BC704791F860004FF0030230F00B\n:101230000C0381F8603091F8610020F00C0081F817\n:10124000610008BF81F86020002808BF81F8612094\n:1012500010BC704710F0010F1CBF0120704710F048\n:10126000020F1CBF0220704710F0040018BF0820B6\n:1012700070472DE9F0470446174689464FF00108AC\n:1012800008460DF0FAF8054648460DF0FAF810F059\n:10129000010F18BF012624D015F0010F18BF01233C\n:1012A0002AD000BF56EA030108BF4FF0000810F033\n:1012B000070F08BF002615F0070F08BF002394F89A\n:1012C0006400B0420CBF00203046387094F86510BE\n:1012D000994208BF00237B70002808BF002B25D14E\n:1012E00015E010F0020F18BF0226D5D110F0040F40\n:1012F00014BF08260026CFE715F0020F18BF0223FF\n:10130000D0D115F0040F14BF08230023CAE74846C4\n:101310000DF0BDF8B4F87010401A00B247F6FE7137\n:10132000884201DC002801DC4FF0000816B1082ECD\n:101330000CD018E094F86400012818BF022812D0DD\n:1013400004281EBF0828FFDF032D0CD194F8C0012C\n:1013500048B1B4F8C401012894F8640006D0082804\n:1013600001D0082038704046BDE8F087042818BF37\n:101370000420F7D1F5E7012814BF0228704710F0C8\n:101380000C0018BF0420704738B4CBB2C1F3072C4F\n:10139000C1B2C0F30724012B07D0022B09D0042BC4\n:1013A00008BFBCF1040F2DD006E0BCF1010F03D142\n:1013B00028E0BCF1020F25D0012906D0022907D070\n:1013C000042908BF042C1DD004E0012C02D119E02F\n:1013D000022C17D001EA0C0161F3070204EA0301B1\n:1013E00061F30F22D1B211F0020F18BF022310D007\n:1013F000C2F307218DF8003011F0020F18BF02214F\n:101400001BD111E0214003EA0C03194061F30702EC\n:10141000E6E711F0010F18BF0123E9D111F0040F25\n:1014200014BF08230023E3E711F0010F18BF0121C7\n:1014300003D111F0040118BF08218DF80110082B09\n:1014400001BF000C012804208DF80000BDF8000049\n:1014500038BC70474FF0000C082902D0042909D08D\n:1014600011E001280FD10420907082F803C013808E\n:1014700001207047012806D00820907082F803C030\n:1014800013800120704700207047162A10D12A22AD\n:101490000C2818BF0D280FD04FF0230C1F280DD09B\n:1014A00031B10878012818BF002805D0162805D0CA\n:1014B00000207047012070471A70FBE783F800C0D6\n:1014C000F8E7012908D002290BD0042912BF082906\n:1014D00040F6A660704707E0002804BF40F2E240F3\n:1014E000704740F6C410704700B5FFDF40F2E2409D\n:1014F00000BD00000178406829B190F82C1190F8E7\n:101500008C0038B901E001F0BDBD19B1042901D04A\n:10151000012070470020704770B50C460546062133\n:1015200002F0C4FC606008B1002006E007212846F4\n:1015300002F0BCFC606018B101202070002070BD7A\n:10154000022070BD2DE9FC470C4606466946FFF7B0\n:10155000E3FF00287DD19DF8000050B1FDF7EEF8C3\n:10156000B0427CD0214630460AF008FC002873D1F6\n:101570002DE00DF097F9B04271D02146304612F0BF\n:10158000B6FA002868D1019D95F8F00022E001200C\n:1015900000E00020804695F839004FF0010A4FF036\n:1015A0000009F0B195F83A0080071AD584F8019047\n:1015B00084F800A084F80490E68095F83B1021722E\n:1015C000A98F6181E98FA18185F8399044E0019D5F\n:1015D00095F82C0170350028DBD1287F0028D8D061\n:1015E000D5E7304602F0A5FD070000D1FFDF384601\n:1015F00001F0B5FF40B184F801900F212170E68021\n:10160000208184F804A027E0304602F080FD070026\n:1016100000D1FFDFB8F1000F21D0384601F0F7FF0D\n:10162000B8B19DF8000038B90198D0F81801418888\n:10163000B14201D180F80090304607F00DFF84F8E8\n:1016400001900C21217084F80490E680697F21725A\n:1016500000E004E085F81C900120BDE8FC87002034\n:10166000FBE71CB56946FFF757FF00B1FFDF68468F\n:1016700001F014FDFE4900208968A1F8F2001CBDAC\n:101680002DE9FC4104460E46062002F0B7FB054654\n:10169000072002F0B3FB2844C7B20025A8463E4409\n:1016A00017E02088401C80B22080B04202D3404620\n:1016B000A4F8008080B2B84204D3B04202D2002025\n:1016C000BDE8FC816946FFF727FF0028F8D06D1CB4\n:1016D000EDB2AE42E5D84FF6FF7020801220EFE762\n:1016E00038B54FF6FF70ADF800000DE00621BDF8EB\n:1016F000000002F0EDFB04460721BDF8000002F0F7\n:10170000E7FB0CB100B1FFDF00216846FFF7B8FF2F\n:101710000028EBD038BD70B507F00CFF0BF034FF9C\n:10172000D44C4FF6FF76002526836683D2A0257021\n:1017300001680079A4F14002657042F8421FA11CC3\n:101740001071601C12F0EFFA1B2020814FF4A4717D\n:101750006181A081E18107212177617703212174D3\n:10176000042262746082A082A4F13E00E1820570CE\n:101770004680BF480C300570A4F11000057046800B\n:1017800084F8205070BD70B5B94C16460D466060A7\n:10179000217007F047FEFFF7A3FFFFF7BCFF20789B\n:1017A0000FF0BDFFB6480DF0D0F92178606812F057\n:1017B0005FFA20780BF0DCF8284608F0AFFEB0485E\n:1017C000FCF7C7FF217860680AF0B2FB3146207849\n:1017D00012F024FDBDE870400BF0D6BE10B5012418\n:1017E0000AB1002010BD21B1012903D000242046F8\n:1017F00010BD02210CF024FDF9E710B50378044672\n:10180000002B406813460A46014609D05FF00100EC\n:10181000FFF78EFC6168496A884203D9012010BD38\n:101820000020F5E7002010BD2DE9F04117468A7829\n:101830001E46804642B11546C87838B1044669074D\n:1018400006D52AB1012104E00725F5E70724F6E7CC\n:101850000021620702D508B1012000E0002001420A\n:1018600006D0012211464046FFF7C7FF98B93DE078\n:1018700051B1002201214046FFF7BFFF58B9600770\n:1018800034D50122114620E060B1012200214046FA\n:10189000FFF7B3FF10B10920BDE8F081680725D537\n:1018A000012206E068074FEA44700AD5002814DBDD\n:1018B000002201214046FFF7A0FFB8B125F0040542\n:1018C00014E0002812DA012200214046FFF795FFBC\n:1018D00060B100BF24F0040408E001221146404634\n:1018E000FFF78BFF10B125F00405F3E73D7034706E\n:1018F0000020D1E770B58AB0044600886946FFF73A\n:101900000BFE002806D1A08830B1012804D002289F\n:1019100002D012200AB070BD04AB03AA214668466B\n:10192000FFF782FF0500F5D19DF800100120002689\n:101930000029019906D081F8C101019991F80C1292\n:10194000B1BB2DE081F82F01019991F8561139B9F9\n:10195000019991F82E1119B9019991F8971009B1CF\n:101960003A2519E00199059681F82E01019A9DF812\n:101970000C0082F83001019B9DF8102083F8312182\n:10198000A388019CA4F832318DF814008DF815203D\n:1019900005AA0020FFF70EFC019880F82F6126E0D1\n:1019A000019991F8C01119B9019991F8971009B1ED\n:1019B0003A2519E00199059681F8C00101989DF832\n:1019C0000C2080F8C221019B9DF8100083F8C30110\n:1019D000A388019CA4F8C4318DF814208DF815005B\n:1019E00005AA0120FFF7E6FB019880F8C1612846AF\n:1019F00090E710B504460020A17801B90120E278F3\n:101A00000AB940F0020001F058FB002803D120463B\n:101A1000BDE810406EE710BD70B5044691F8650052\n:101A200091F866300D4610F00C0F00D1002321898B\n:101A3000A088FFF774FB696A814229D2401A401CD2\n:101A4000A1884008091A8AB2A2802189081A208137\n:101A5000668895F864101046FFF73FFB864200D277\n:101A600030466080E68895F8651020890AE000001D\n:101A70007800002018080020FFFFFFFF1F00000073\n:101A8000D8060020FFF729FB864200D23046E080CE\n:101A900070BDF0B585B00D46064603A9FFF73CFDC5\n:101AA00000282DD19DF80C0060B300220499FB2082\n:101AB000B1F84E30FB2B00D30346B1F85040FB2069\n:101AC000FB2C00D30446DFF85CC59CE88110009035\n:101AD0000197CDF808C0ADF80230ADF80640684671\n:101AE000FFF79AFF6E80BDF80400E880BDF808009B\n:101AF0006881BDF80200A880BDF80600288100209A\n:101B000005B0F0BD0122D1E72DE9F04186B00446D1\n:101B100000886946FFF700FD002876D12189E0881A\n:101B200001F0E4FA002870D1A188608801F0DEFAA3\n:101B300000286AD12189E08801F0CFFA002864D119\n:101B4000A188608801F0C9FA07005ED1208802A947\n:101B5000FFF79FFF00B1FFDFBDF81010628809207A\n:101B6000914252D3BDF80C10E28891424DD3BDF89A\n:101B70001210BDF80E2023891144A2881A44914204\n:101B800043D39DF80010019D4FF00008012640F658\n:101B9000480041B185F8B761019991F8F81105F550\n:101BA000DB7541B91AE085F82561019991F84A1170\n:101BB00005F5927509B13A2724E0E18869806188CA\n:101BC000E9802189814200D30146A980A188814210\n:101BD00000D208462881012201990FE0E18869803E\n:101BE0006188E9802189814200D30146A980A188CA\n:101BF000814200D208462881019900222846FFF739\n:101C00000BFF2E7085F80180384606B044E67BE76E\n:101C100070B504460CF0FCFDB0B12078182811D145\n:101C2000207901280ED1E088062102F03FF9040056\n:101C300008D0208807F010FC2088062102F048F91F\n:101C400000B1FFDF012070BDF74D28780028FAD0E1\n:101C5000002666701420207020223146201DFCF7DB\n:101C600016FC022020712E70ECE710B50446FCF73C\n:101C7000DBFC002813D0207817280FD1207968B119\n:101C8000E088072102F012F940B1008807F0E4FB78\n:101C9000E088072102F01CF900B1FFDF012010BD30\n:101CA0002DE9F0475FEA000800D1FFDFDE4802219E\n:101CB0001A308146FFF7E4FC00B1FFDFDA4C062062\n:101CC000678B02F09BF80546072002F097F828443E\n:101CD000C5B2681CC6B2608BB04203D14046FFF764\n:101CE000C4FF58B9608BA84203D14046FFF790FF6C\n:101CF00020B9608B4146FFF725FC38B1404601F022\n:101D000003FA0028E7D10120BDE8F0870221484608\n:101D1000FFF7B6FC10B9608BB842DCD14046BDE895\n:101D2000F04712F0C1BA10B501F053F908B10C2018\n:101D300010BD0BF07DFC002010BD10B504460078EE\n:101D400018B1012801D0122010BD01F053F920B1C3\n:101D50000BF0C0FD08B10C2010BD207801F013F984\n:101D6000E21D04F11703611CBDE810400BF0DABC62\n:101D700010B5044601F02DF908B10C2010BD2078F3\n:101D800028B1012803D0FF280BD0122010BD01F08C\n:101D9000FAF8611C0BF00CFC08B1002010BD072004\n:101DA00010BD01200BF03EFCF7E710B50BF095FDE0\n:101DB00008B1002010BD302010BD10B5044601F060\n:101DC00019F908B10C2010BD20460BF080FD002051\n:101DD00010BD10B501F00EF920B10BF07BFD08B17C\n:101DE0000C2010BD0BF0F6FC002010BDFF2181700F\n:101DF0004FF6FF7181808D4949680A7882718A881F\n:101E000002814988418101214170002070477CB5E1\n:101E10000025022A19D015DC12F10C0F15D009DCAF\n:101E200012F1280F11D012F1140F0ED012F1100F71\n:101E300011D10AE012F1080F07D012F1040F04D0FB\n:101E40004AB902E0D31E052B05D8012806D0022886\n:101E500008D003280AD0122528467CBD1046FDF77D\n:101E600013F8F9E710460CF06BFEF5E70846144648\n:101E70006946FFF751FB08B10225EDE79DF8000028\n:101E80000198002580F86740E6E710B51346012267\n:101E9000FEF7EAFF002010BD10B5044610F02FFA3F\n:101EA000052804D020460FF029FC002010BD0C208E\n:101EB00010BD10B5044601F09DF808B10C2010BD0E\n:101EC0002146002007F037FB002010BD10B5044666\n:101ED0000FF0A3FC50B108F0A6FD38B1207808F04F\n:101EE00029FB20780DF04DF9002010BD0C2010BD0D\n:101EF00010B5044601F07EF808B10C2010BD214653\n:101F0000012007F018FB002010BD38B504464FF63D\n:101F1000FF70ADF80000A079E179884216D02079F1\n:101F2000FCF7E3FA90B16079FCF7DFFA70B10022B8\n:101F3000A079114612F0A0FD40B90022E0791146C7\n:101F400012F09AFD10B9207A072801D9122038BD65\n:101F500008F076FD60B910F0D2F948B90021684662\n:101F6000FFF78EFB20B1204606F044F9002038BD73\n:101F70000C2038BD2DE9FC41817805461A2925D071\n:101F80000EDC16292ED2DFE801F02D2D2D2D2D216E\n:101F90002D2D2D2D2D2D2D2D2D2D2D2D2D21212195\n:101FA0002A291FD00BDCA1F11E010C291AD2DFE86F\n:101FB00001F019191919191919191919190D3A399D\n:101FC00004290FD2DFE801F00E020E022888B0F5D6\n:101FD000706F07D201276946FFF79EFA20B10220F1\n:101FE000BDE8FC811220FBE79DF8000000F0D2FF65\n:101FF000019C10B104F58A7401E004F5C6749DF8E3\n:10200000000000F0C7FF019E10B106F2151601E0B6\n:1020100006F28D166846FFF76DFA08B1207838B1E0\n:102020000C20DDE70C620200180800207800002078\n:102030002770A8783070684601F030F80020CFE7AC\n:102040007CB50D466946FFF767FA002618B12E6089\n:102050002E7102207CBD9DF8000000F09BFF019CCA\n:102060009DF80000703400F095FF019884F84260FC\n:1020700081682960017B297194F842100029F5D10B\n:1020800000207CBD10B5044600F0B4FF20B10BF079\n:1020900021FC08B10C2010BD207800F074FFE2791B\n:1020A000611C0BF093FD08B1002010BD022010BD93\n:1020B00010B5886E60B1002241F8682F0120CA7106\n:1020C0008979884012F0CCFC002800D01F2010BD78\n:1020D0000C2010BD1CB50C466946FFF71DFA002800\n:1020E00009D19DF8000000280198B0F8700000D0D8\n:1020F000401C208000201CBD1CB504460088694699\n:10210000FFF70AFA08B102201CBD606828B1DDE9BA\n:102110000001224601F04CF81CBDDDE90001FFF78B\n:10212000C7FF1CBD70B51C460D4618B1012801D073\n:10213000122070BD1946104601F078F830B12146E2\n:10214000284601F07DF808B1002070BD302070BD38\n:1021500070B5044600780E46012804D018B1022854\n:1021600001D0032840D1607828B1012803D002288B\n:1021700001D0032838D1E07B10B9A078012833D1F1\n:10218000A07830F005012FD110F0050F2CD0628916\n:10219000E188E0783346FFF7C5FF002825D1A07815\n:1021A00005281DD16589A289218920793346FFF749\n:1021B000B9FF002819D1012004EB40014A891544D8\n:1021C0002218D378927893420ED1CA8889888A429D\n:1021D0000AD1401CC0B20228EED3E088A84203D343\n:1021E000A07B08B1072801D9122070BD002070BD66\n:1021F00010B586B0044600F0E1FE10B10C2006B028\n:1022000010BD022104F10A0001F02FF8A0788DF82A\n:102210000800A0788DF8000060788DF80400207820\n:102220008DF80300A07B8DF80500E07B00B1012054\n:102230008DF80600A078C10717D0E07801F00CF8FF\n:102240008DF80100E088ADF80A006089ADF80C0057\n:10225000A078400716D5207900F0FEFF8DF8020027\n:102260002089ADF80E00A0890AE040070AD5E07881\n:1022700000F0F2FF8DF80200E088ADF80E006089F2\n:10228000ADF8100002A80FF0D4FA0028B7D16846C4\n:102290000CF07CFFB3E710B504460121FFF758FFAF\n:1022A000002803D12046BDE81040A1E710BD027808\n:1022B000012A01D0BAB118E042783AB1012A05D01A\n:1022C000022A12D189B1818879B100E059B14188DF\n:1022D00049B1808838B101EB8101490000EB8000F1\n:1022E000B1EB002F01D2002070471220704770B56B\n:1022F000044600780D46012809D010F000F80528A2\n:1023000003D00FF0A6F9002800D00C2070BD0CF00F\n:102310000AFE88B10CF01CFE0CF018FF0028F5D165\n:1023200025B160780CF0ACFE0028EFD1A188608860\n:10233000BDE870400FF0A3BA122070BD10B504467E\n:102340000121FFF7B4FF002804D12046BDE810406A\n:102350000121CCE710BDF0B5871FDDE9056540F62A\n:102360007B44A74213D28F1FA74210D288420ED8B7\n:10237000B2F5FA7F0BD2A3F10A00241FA04206D2C5\n:10238000521C4A43B2EB830F01DAAE4201D900205E\n:10239000F0BD0120F0BD2DE9FC47477A894604468F\n:1023A00017F0050F7ED0F8087CD194F83A0008B9F0\n:1023B000012F77D10025A8462E46F90789F0010A9A\n:1023C00019D0208A514600F031FFE8B360895146A8\n:1023D00000F036FFC0B3208A6189884262D8A18E9E\n:1023E000E08DCDE90001238D628CA18BE08AFFF79F\n:1023F000B2FF48B30125B8070ED504EB4500828E25\n:10240000C18DCDE90012038D428C818BC08AFFF70C\n:10241000A2FFC8B1A8466D1C78071ED504EB45067F\n:102420005146308A00F002FF70B17089514600F0C9\n:1024300007FF48B1308A7189884253D8B18EF08D38\n:10244000CDE90001338D00E00BE0728CB18BF08A96\n:10245000FFF781FF28B12E466D1CB9F1000F03D0A4\n:1024600030E03020BDE8FC87F80707D0780705D5B5\n:1024700004EB460160894989884233D1228A0121CF\n:102480001BE0414503D004EB4100008A024404EB09\n:102490004100C38A868AB34224D1838B468BB342E0\n:1024A00020D100E01EE0438C068CB3421AD1038D8C\n:1024B000C08C834216D1491CC9B2A942E1D36089BC\n:1024C00090420FD3207810B101280BD102E0A07800\n:1024D0000028F9D1607838B1012805D0022803D04E\n:1024E000032801D01220BDE70020BBE7002152E7FE\n:1024F0000178C90702D0406811F0A9BE11F076BE7C\n:1025000010B50078012800D00020FCF7B8FC0020AE\n:1025100010BD2DE9F0478EB00D46AFF6A422D2E9EA\n:102520000092014690462846FFF735FF06000CD181\n:1025300000F044FD40B9FE4F387828B90CF0B2F9EC\n:10254000A0F57F41FF3903D00C200EB0BDE8F08725\n:10255000032105F1100000F088FEF54809AA3E3875\n:102560000990F4480A90F248062110380B900CA804\n:1025700001F06AFC040037D00021FEF77CF904F179\n:1025800030017B8ABA8ACB830A84797C0091BA466F\n:102590003B7CBA8A798A208801F044FD00B1FFDFD4\n:1025A000208806F058FF218804F10E0000F02CFD71\n:1025B000E1A004F1120700680590032105A804F0CA\n:1025C0006DFF002005A90A5C3A54401CC0B20328E4\n:1025D000F9D3A88B6080688CA080288DE080687A11\n:1025E000410703D508270AE00920AEE7C10701D05B\n:1025F000012704E0800701D5022700E000273A46C2\n:10260000BAF8160011460FF0CFF90146A062204635\n:102610000FF0D8F93A4621460020FEF7AEFD00B98A\n:102620000926C34A21461C320020FEF7C3FD0027BD\n:1026300084F8767084F87770A87800F0A4FC60764F\n:10264000D5F80300C4F81A00B5F80700E083C4F811\n:10265000089084F80C80012084F8200101468DF850\n:102660000070684604F01AFF9DF8000000F00701B2\n:10267000C0F3C1021144C0F3401008448DF80000BB\n:10268000401D2076092801D20830207601212046FD\n:10269000FEF7F1F868780CF051FCEEBBA9782878C9\n:1026A000EA1C0CF01EFC48B10CF052FCA97828780A\n:1026B000EA1C0CF0BFFC060002D052E0122650E0EB\n:1026C000687A00F005010020CA0700D001208A07BF\n:1026D00001D540F00200490701D540F008000CF098\n:1026E000E9FB06003DD1214603200CF0CDFC06009D\n:1026F00037D10CF0D2FC060033D1697A01F0050124\n:102700008DF80810697AC90708D06889ADF80A0001\n:10271000288AADF80C0000E023E00120697A8A07DE\n:1027200000D5401C490707D505EB40004189ADF8AD\n:102730000E10008AADF8100002A80FF07AF80646D5\n:1027400095F83A0000B101200CF0C6FB4EB90CF030\n:10275000FDFC060005D1A98F20460FF00BF80600FE\n:1027600008D0208806F078FE2088062101F0B0FB12\n:1027700000B1FFDF3046E8E601460020C9E638B583\n:102780006B48007878B90FF0BAFD052805D00CF039\n:1027900089F8A0F57F41FF3905D068460FF0B3F8FE\n:1027A000040002D00CE00C2038BD0098008806F030\n:1027B00053FE00980621008801F08AFB00B1FFDF7C\n:1027C000204638BD1CB582894189CDE900120389B4\n:1027D000C28881884088FFF7BEFD08B100201CBD7B\n:1027E00030201CBD70B50546FFF7ECFF00280ED168\n:1027F0002888062101F05AFB040007D000F042FCB3\n:1028000020B1D4F81801017831B901E0022070BD7F\n:10281000D4F86411097809B13A2070BD052181719D\n:10282000D4F8181100200881D4F81811A88848811C\n:10283000D4F81811E8888881D4F818112889C8813B\n:10284000D4F81801028941898A4204D88279082A79\n:1028500001D88A4201D3122070BD29884180D4F862\n:10286000181102200870002070BD3EB50446FEF726\n:1028700075FAB0B12E480125A0F1400245702368D9\n:1028800042F8423F237900211371417069460620C6\n:1028900001F095FA00B1FFDF684601F06EFA10B161\n:1028A0000EE012203EBDBDF80440029880F8205191\n:1028B000684601F062FA18B9BDF80400A042F4D1EC\n:1028C00000203EBD70B505460088062101F0EEFAF5\n:1028D000040007D000F0D6FB20B1D4F81811087816\n:1028E00030B901E0022070BDD4F86401007808B16D\n:1028F0003A2070BDB020005D10F0010F22D0D5F855\n:1029000002004860D5F806008860D4F8180169898B\n:1029100010228181D4F8180105F10C010E3004F564\n:102920008C74FBF78AFD216803200870288805E075\n:1029300018080020840000201122330021684880FC\n:10294000002070BD0C2070BD38B504460078EF281B\n:102950004DD86088ADF80000009800F097FC88B36F\n:102960006188080708D4D4E9012082423FD8202A90\n:102970003DD3B0F5804F3AD8207B18B3072836D81E\n:10298000607B28B1012803D0022801D003282ED172\n:102990004A0703D4022801D0032805D1A07B08B13F\n:1029A000012824D1480707D4607D28B1012803D02D\n:1029B000022801D003281AD1C806E07D03D50128DA\n:1029C00015D110E013E0012801D003280FD1C8066B\n:1029D00009D4607E012803D0022801D0032806D143\n:1029E000A07E0F2803D8E07E18B1012801D0122064\n:1029F00038BD002038BDF8B514460D46064608F02F\n:102A00001FF808B10C20F8BD3046FFF79DFF0028E5\n:102A1000F9D1FCF73EFA2870B07554B9FF208DF853\n:102A2000000069460020FCF71EFA69460020FCF70A\n:102A30000EFA3046BDE8F840FCF752B90022DAE75A\n:102A40000078C10801D012207047FA4981F82000AF\n:102A50000020704710B504460078C00704D1608894\n:102A600010B1FCF7D7F980B12078618800F001023D\n:102A7000607800F02FFC002806D1FCF7B3F901467E\n:102A80006088884203D9072010BD122010BD6168FC\n:102A9000FCF7E9F9002010BD10B504460078C00726\n:102AA00004D1608810B1FBF78AFE70B1207861888C\n:102AB00000F00102607800F00DFC002804D160886D\n:102AC0006168FCF7C4F9002010BD122010BD7CB570\n:102AD000044640784225012808D8A078FBF767FE15\n:102AE00020B120781225012802D090B128467CBD63\n:102AF000FCF7DBF920B1A0880028F7D08028F5D8B2\n:102B0000FCF7DAF960B160780028EFD0207801286E\n:102B100008D006F0C3FD044607F05DFC00287FD016\n:102B20000C207CBDFBF7F5FF10B9FCF7B7F990B3AB\n:102B300007F086FF0028F3D1FBF700FEA0F57F41E8\n:102B4000FF39EDD1FCF707F8A68842F21070464332\n:102B5000A079FCF770F9FBF739FEF8B100220721E4\n:102B600001A801F071F9040058D0B3480021846035\n:102B70002046FDF72DFD2046FCF732FDAD4D04F15A\n:102B800030006A8AA98AC2830184FBF726FE60B1FD\n:102B9000E88A01210DE0FFE712207CBD31460020CC\n:102BA00007F0CBFC88B3FFDF44E0FCF787F9014670\n:102BB000E88A07F091FD0146A0620022204606F057\n:102BC00070FDFBF70AFE38B9FCF778F9024621469A\n:102BD0000120FEF7D2FAD0B1964A21461C320120DC\n:102BE000FEF7E8FA687C00902B7CAA8A698A208824\n:102BF00001F018FA00B1FFDF208806F02CFC314606\n:102C0000204607F09AFC00B1FFDF13E008E007213F\n:102C1000BDF8040001F05CF900B1FFDF09207CBDC4\n:102C200044B1208806F018FC2088072101F050F9F3\n:102C300000B1FFDF00207CBD002148E770B50D46E4\n:102C4000072101F033F9040003D094F88F0110B18B\n:102C50000AE0022070BD94F87D00142801D01528E8\n:102C600002D194F8DC0108B10C2070BD1022294675\n:102C700004F5C870FBF7E1FB012084F88F01002008\n:102C800070BD10B5072101F011F918B190F88F113E\n:102C900011B107E0022010BD90F87D10142903D077\n:102CA000152901D00C2010BD022180F88F110020C1\n:102CB00010BD2DE9FC410C464BF6803212219442A6\n:102CC0001DD8E4B16946FEF727FC002815D19DF810\n:102CD000000000F05FF9019E9DF80000703600F0E2\n:102CE00059F9019DAD1C2F88224639463046FDF723\n:102CF00065FC2888B842F6D10020BDE8FC81084672\n:102D0000FBE77CB5044600886946FEF705FC002811\n:102D100010D19DF8000000F03DF9019D9DF80000E4\n:102D2000703500F037F90198A27890F82C10914294\n:102D300001D10C207CBD7F212972A9720021E9728A\n:102D4000E17880F82D10217980F82E10A17880F894\n:102D50002C1000207CBD1CB50C466946FEF7DCFB40\n:102D600000280AD19DF8000000F014F9019890F8AD\n:102D70008C0000B10120207000201CBD7CB50D46E8\n:102D800014466946FEF7C8FB002809D19DF80000EB\n:102D900000F000F9019890F82C00012801D00C20D7\n:102DA0007CBD9DF8000000F0F5F8019890F87810CF\n:102DB000297090F87900207000207CBD70B50D4618\n:102DC0001646072101F072F818B381880124C388E0\n:102DD000428804EB4104AC4217D842F210746343BA\n:102DE000A4106243B3FBF2F2521E94B24FF4FA7293\n:102DF000944200D91446A54200D22C46491C641CBA\n:102E0000B4FBF1F24A43521E91B290F8C8211AB9AC\n:102E100001E0022070BD01843180002070BD10B53A\n:102E20000C46072101F042F840B1022C08D91220CB\n:102E300010BD000018080020780000200220F7E7ED\n:102E400014F0010180F8FD10C4F3400280F8FC206A\n:102E500004D090F8FA1009B107F054FC0020E7E71D\n:102E6000017889B1417879B141881B290CD38188D7\n:102E70001B2909D3C188022906D3F64902680A65CD\n:102E800040684865002070471220704710B504461E\n:102E90000EF086FD204607F0D8FB0020C8E710B5ED\n:102EA00007F0D6FB0020C3E72DE9F04115460F4699\n:102EB00006460122114638460EF076FD04460121F1\n:102EC000384607F009FC844200D20446012130460E\n:102ED00000F065F806460121002000F060F8311886\n:102EE000012096318C4206D901F19600611AB1FB9E\n:102EF000F0F0401C80B228800020BDE8F08110B5C1\n:102F0000044600F077F808B10C2091E7601C0AF045\n:102F100038FE207800F00100FBF718FE207800F062\n:102F200001000CF010F8002082E710B504460720DD\n:102F300000F056FF08B10C207AE72078C00711D0C6\n:102F400000226078114611F097FD08B112206FE75A\n:102F5000A06809F01DFB6078D4F8041009F021FB8B\n:102F6000002065E7002009F013FB00210846F5E783\n:102F700010B505F036FE00205AE710B5006805F0E0\n:102F800084F8002054E718B1022801D001207047CE\n:102F90000020704708B1002070470120704710B52D\n:102FA000012904D0022905D0FFDF204640E7C000F8\n:102FB000503001E080002C3084B2F6E710B50FF0FD\n:102FC0009EF9042803D0052801D0002030E7012015\n:102FD0002EE710B5FFF7F2FF10B10CF07BF828B91F\n:102FE00007F02EFD20B1FBF78CFD08B101201FE793\n:102FF00000201DE710B5FFF7E1FF18B907F020FD2D\n:10300000002800D0012013E72DE9FE4300250F46DC\n:1030100080460A260421404604F069FA4046FDF73E\n:103020003EFE062000F0EAFE044616E06946062051\n:1030300000F0C5FE0BE000BFBDF80400B84206D0AA\n:103040000298042241460E30FBF7CAF950B1684697\n:1030500000F093FE0500EFD0641E002C06DD002D6D\n:10306000E4D005E04046FDF723FEF5E705B9FFDFB4\n:10307000D8F80000FDF737FE761E01D00028C9D031\n:10308000BDE8FE8390F8F01090F88C0020B919B1DB\n:10309000042901D0012070470020704701780029E1\n:1030A0000AD0416891F8FA20002A05D0002281F860\n:1030B000FA20406807F026BB704770B514460546F5\n:1030C000012200F01BF9002806D121462846BDE860\n:1030D0007040002200F012B970BDFB2802D8B1F593\n:1030E000296F01D911207047002070471B38E12853\n:1030F00006D2B1F5A47F03D344F29020814201D9D6\n:1031000012207047002070471FB55249403191F896\n:103110002010CA0702D102781D2A0AD08A0702D4D9\n:1031200002781C2A28D049073DD40178152937D0C8\n:1031300039E08088ADF8000002A9FEF7EDF900B192\n:10314000FFDF9DF80800FFF725FF039810F8601FC8\n:103150008DF8021040788DF803000020ADF80400CF\n:1031600001B9FFDF9DF8030000B9FFDF6846FEF7F5\n:1031700040FCD8B1FFDF19E08088ADF800004FF4C3\n:103180002961FB20ADF80410ADF80200ADF806008F\n:10319000ADF808106846FEF73AFD38B1FFDF05E0EC\n:1031A000807BC00702D0002004B041E60120FBE78D\n:1031B000F8B50746508915460C4640B1B0F5004FAA\n:1031C00005D20022A878114611F056FC08B1122051\n:1031D000F8BDA06E04F1700630B1A97894F86E00C5\n:1031E000814201D00C20F8BD012184F86F10A9782C\n:1031F00084F86E106968A1666989A4F86C10288942\n:10320000B084002184F86F1028886946FEF762FFB9\n:10321000B08CBDF80010081A00B2002804DD214669\n:103220003846FEF745FFDDE70020F8BD042803D34C\n:1032300021B9B0F5804F01D90020704701207047B7\n:10324000042803D321B9B0F5804F01D9002070477D\n:1032500001207047D8070020012802D018B10020B3\n:103260007047022070470120704710B500224FF4CC\n:10327000C84408E030F81230A34200D9234620F8B1\n:103280001230521CD2B28A42F4D3D1E580B2C106C8\n:103290000BD401071CD481064FEAC07101D5B9B91E\n:1032A00000E099B1800713D410E0410610D48106E4\n:1032B0000ED4C1074FEA807104D0002902DB400719\n:1032C00004D405E0010703D4400701D4012070476E\n:1032D0000020704770B50C460546FF2904D8FBF75F\n:1032E0007CFA18B11F2C01D9122070BD2846FBF7BB\n:1032F0005EFA08B1002070BD422070BD0AB1012203\n:1033000000E00222024202D1C80802D109B1002025\n:10331000704711207047000030B5058825F400443F\n:1033200021448CB24FF4004194420AD2121B92B253\n:103330001B339A4201D2A94307E005F4004121431F\n:1033400003E0A21A92B2A9431143018030BD0844A0\n:10335000083050434A31084480B2704770B51D466A\n:1033600016460B46044629463046049AFFF7EFFFFF\n:103370000646B34200D2FFDF282200212046FBF799\n:1033800086F84FF6FF70A082283EB0B26577608065\n:10339000B0F5004F00D9FFDF618805F13C008142A4\n:1033A00000D2FFDF60880835401B343880B22080AF\n:1033B0001B2800D21B2020800020A07770BD8161D7\n:1033C000886170472DE9F05F0D46C188044600F121\n:1033D0002809008921F4004620F4004800F063FB2E\n:1033E00010B10020BDE8F09F4FF0000A4FF0010B34\n:1033F000B0450CD9617FA8EB0600401A0838854219\n:1034000019DC09EB06000021058041801AE0608884\n:10341000617F801B471A083F0DD41B2F00DAFFDFA6\n:10342000BD4201DC294600E0B9B2681A0204120C60\n:1034300004D0424502DD84F817A0D2E709EB06006C\n:103440000180428084F817B0CCE770B5044600F1E3\n:103450002802C088E37D20F400402BB1104402888C\n:10346000438813448B4201D2002070BD00258A425C\n:1034700002D30180458008E0891A0904090C4180C3\n:1034800003D0A01D00F01FFB08E0637F0088083315\n:10349000184481B26288A01DFFF73EFFE575012048\n:1034A00070BD70B5034600F12804C588808820F4FB\n:1034B00000462644A84202D10020188270BD988997\n:1034C0003588A84206D3401B75882D1A2044ADB21A\n:1034D000C01E05E02C1AA5B25C7F20443044401D7C\n:1034E0000C88AC4200D90D809C8924B10024147052\n:1034F0000988198270BD0124F9E770B5044600F10E\n:103500002801808820F400404518208A002825D012\n:10351000A189084480B2A08129886A881144814227\n:1035200000D2FFDF2888698800260844A1898842E4\n:1035300012D1A069807F2871698819B1201D00F01F\n:10354000C2FA08E0637F28880833184481B2628891\n:10355000201DFFF7E1FEA6812682012070BD2DE926\n:10356000F041418987880026044600F12805B942C8\n:1035700019D004F10A0800BF21F400402844418812\n:1035800019B1404600F09FFA08E0637F00880833D5\n:10359000184481B262884046FFF7BEFE761C6189FE\n:1035A000B6B2B942E8D13046BDE8F0812DE9F0412C\n:1035B00004460B4627892830A68827F40041B4F832\n:1035C0000A8001440D46B74201D10020ECE70AB160\n:1035D000481D106023B1627F691D1846FAF72DFF60\n:1035E0002E88698804F1080021B18A1996B200F08A\n:1035F0006AFA06E0637F62880833991989B2FFF797\n:103600008BFE474501D1208960813046CCE7818817\n:10361000C088814201D10120704700207047018994\n:103620008088814201D1012070470020704770B529\n:103630008588C38800F1280425F4004223F4004162\n:1036400014449D421AD08389058A5E1925886388AF\n:10365000EC18A64214D313B18B4211D30EE0437F72\n:1036600008325C192244408892B2801A80B2233317\n:10367000984201D211B103E08A4201D1002070BD0D\n:10368000012070BD2DE9F0478846C18804460089B5\n:1036900021F4004604F1280720F4004507EB060951\n:1036A00000F001FA002178BBB54204D9627FA81B63\n:1036B000801A002503E06088627F801B801A08382A\n:1036C00023D4E28962B1B9F80020B9F802303BB1E5\n:1036D000E81A2177404518DBE0893844801A09E070\n:1036E000801A217740450ADB607FE1890830304449\n:1036F00039440844C01EA4F81280BDE8F08745454F\n:1037000003DB01202077E7E7FFE761820020F4E791\n:103710002DE9F74F044600F12805C088884620F4BB\n:10372000004A608A05EB0A0608B1404502D2002033\n:10373000BDE8FE8FE08978B13788B6F8029007EBD4\n:103740000901884200D0FFDF207F4FF0000B50EAD4\n:10375000090106D088B33BE00027A07FB94630714D\n:10376000F2E7E18959B1607F2944083050440844A8\n:10377000B4F81F1020F8031D94F821108170E2891D\n:1037800007EB080002EB0801E1813080A6F802B0E7\n:1037900002985F4650B1637F30880833184481B285\n:1037A0006288A01DFFF7B8FDE78121E0607FE18915\n:1037B00008305044294408442DE0FFE7E089B4F87C\n:1037C0001F102844C01B20F8031D94F8211081709D\n:1037D00009EB0800E28981B202EB0800E081378042\n:1037E00071800298A0B1A01D00F06DF9A4F80EB090\n:1037F000A07F401CA077A07D08B1E088A08284F85B\n:1038000016B000BFA4F812B084F817B001208FE7FB\n:10381000E0892844C01B30F8031DA4F81F108078ED\n:1038200084F82100EEE710B5818800F1280321F427\n:1038300000442344848AC288A14212D0914210D00D\n:10384000818971B9826972B11046FFF7E8FE50B9FB\n:103850001089283220F400401044197900798842F8\n:1038600001D1002010BD184610BD00F12803407F93\n:1038700008300844C01E1060088808B9DB1E1360B9\n:1038800008884988084480B270472DE9F04100F16A\n:103890002806407F1C4608309046431808884D880B\n:1038A000069ADB1EA0B1C01C80B2904214D9801AC7\n:1038B000A04200DB204687B298183A464146FAF704\n:1038C0008FFD002816D1E01B84B2B844002005E02B\n:1038D000ED1CADB2F61EE8E7101A80B20119A9423C\n:1038E00006D8304422464146BDE8F041FAF778BD9B\n:1038F0004FF0FF3058E62DE9F04100F12804407FF9\n:103900001E46083090464318002508884F88069ABE\n:10391000DB1E90B1C01C80B2904212D9801AB04216\n:1039200000DB304685B299182A464046FAF785FDF5\n:10393000701B86B2A844002005E0FF1CBFB2E41E45\n:10394000EAE7101A80B28119B94206D82118324626\n:103950004046FAF772FDA81985B2284624E62DE9FB\n:10396000F04100F12804407F1E460830904643187D\n:10397000002508884F88069ADB1E90B1C01C80B2D3\n:10398000904212D9801AB04200DB304685B29818B6\n:103990002A464146FAF751FD701B86B2A844002022\n:1039A00005E0FF1CBFB2E41EEAE7101A80B28119DD\n:1039B000B94206D8204432464146FAF73EFDA819DE\n:1039C00085B22846F0E5401D704710B5044600F169\n:1039D0002801C288808820F400431944904206D010\n:1039E000A28922B9228A12B9A28A904201D100206A\n:1039F00010BD0888498831B1201D00F064F800200E\n:103A00002082012010BD637F62880833184481B290\n:103A1000201DFFF781FCF2E70021C181017741827F\n:103A2000C1758175704703881380C28942B1C2880D\n:103A300022F4004300F128021A440A60C08970474A\n:103A40000020704710B50446808AA0F57F41FF39F9\n:103A500000D0FFDFE088A082E08900B10120A075DE\n:103A600010BD4FF6FF71818200218175704710B53E\n:103A70000446808AA0F57F41FF3900D1FFDFA07D99\n:103A800028B9A088A18A884201D1002010BD012058\n:103A900010BD8188828A914201D1807D08B10020C9\n:103AA00070470120704720F4004221F400439A42FD\n:103AB00007D100F4004001F40041884201D0012008\n:103AC00070470020704730B5044600880D4620F44A\n:103AD0000040A84200D2FFDF21884FF40040884315\n:103AE0002843208030BD70B50C00054609D0082C55\n:103AF00000D2FFDF1DB1A1B2286800F044F8201DFC\n:103B000070BD0DB100202860002070BD002102684A\n:103B100003E093881268194489B2002AF9D100F0B1\n:103B200032B870B500260D460446082900D2FFDFE2\n:103B3000206808B91EE0044620688188A94202D0A6\n:103B400001680029F7D181880646A94201D10068A1\n:103B50000DE005F1080293B20022994209D32844EE\n:103B6000491B026081802168096821600160206032\n:103B700000E00026304670BD00230B608A8002689A\n:103B80000A600160704700234360021D01810260EA\n:103B90007047F0B50F460188408815460C181E4640\n:103BA000AC4200D3641B3044A84200D9FFDFA01907\n:103BB000A84200D9FFDF3819F0BD2DE9F041884651\n:103BC00006460188408815460C181F46AC4200D3B3\n:103BD000641B3844A84200D9FFDFE019A84200D98D\n:103BE000FFDF70883844708008EB0400BDE8F08186\n:103BF0002DE9F041054600881E461746841B88467D\n:103C0000BC4200D33C442C8068883044B84200D980\n:103C1000FFDFA019B84200D9FFDF68883044688010\n:103C200008EB0400E2E72DE9F04106881D46044652\n:103C3000701980B2174688462080B84201D3C01B55\n:103C400020806088A84200D2FFDF7019B84200D9F6\n:103C5000FFDF6088401B608008EB0600C6E730B5D8\n:103C60000D460188CC18944200D3A41A408898428B\n:103C700000D8FFDF281930BD2DE9F041C84D0446BA\n:103C80009046A8780E46A04200D8FFDF05EB8607D5\n:103C9000B86A50F8240000B1FFDFB868002816D0D9\n:103CA000304600F044F90146B868FFF73AFF0500D6\n:103CB0000CD0B86A082E40F8245000D3FFDFB94872\n:103CC0004246294650F82630204698472846BDE807\n:103CD000F0812DE9F8431E468C1991460F460546A2\n:103CE000FF2C00D9FFDFB14500D9FFDFE4B200951A\n:103CF0004DB300208046E81C20F00300A84200D00D\n:103D0000FFDF4946DFF89892684689F8001089F885\n:103D1000017089F8024089F8034089F8044089F865\n:103D2000054089F8066089F80770414600F008F9F7\n:103D3000002142460F464B460098C01C20F003006D\n:103D4000009012B10EE00120D4E703EB8106B062CF\n:103D5000002005E0D6F828C04CF82070401CC0B206\n:103D6000A042F7D30098491C00EB8400C9B2009030\n:103D70000829E1D3401BBDE8F88310B50446EDF7F0\n:103D80008EFA08B1102010BD2078854A618802EBB8\n:103D9000800092780EE0836A53F8213043B14A1CC8\n:103DA0006280A180806A50F82100A060002010BDD0\n:103DB000491C89B28A42EED86180052010BD70B5D9\n:103DC00005460C460846EDF76AFA08B1102070BDAA\n:103DD000082D01D3072070BD25700020608070BDC4\n:103DE0000EB56946FFF7EBFF00B1FFDF6846FFF74E\n:103DF000C4FF08B100200EBD01200EBD10B5044661\n:103E0000082800D3FFDF6648005D10BD3EB50546BB\n:103E100000246946FFF7D3FF18B1FFDF01E0641CFF\n:103E2000E4B26846FFF7A9FF0028F8D02846FFF75C\n:103E3000E5FF001BC0B23EBD59498978814201D9D6\n:103E4000C0B27047FF2070472DE9F041544B06295E\n:103E500003D007291CD19D7900E0002500244FF6EE\n:103E6000FF7603EB810713F801C00AE06319D7F866\n:103E700028E09BB25EF823E0BEF1000F04D0641C82\n:103E8000A4B2A445F2D8334603801846B34201D108\n:103E900000201CE7BDE8F041EEE6A0F57F43FF3BC4\n:103EA00001D0082901D300207047E5E6A0F57F4244\n:103EB000FF3A0BD0082909D2394A9378834205D9B1\n:103EC00002EB8101896A51F8200070470020704799\n:103ED0002DE9F04104460D46A4F57F4143F202006E\n:103EE000FF3902D0082D01D30720F0E62C494FF00E\n:103EF00000088A78A242F8D901EB8506B26A52F826\n:103F00002470002FF1D027483946203050F8252062\n:103F100020469047B16A284641F8248000F007F80F\n:103F200002463946B068FFF727FE0020CFE61D495C\n:103F3000403131F810004FF6FC71C01C084070474A\n:103F40002DE9F843164E8846054600242868C01C13\n:103F500020F0030028602046FFF7E9FF315D484369\n:103F6000B8F1000F01D0002200E02A68014600925B\n:103F700032B100274FEA0D00FFF7B5FD1FB106E093\n:103F800001270020F8E706EB8401009A8A6029687F\n:103F9000641C0844E4B22860082CD7D3EBE6000088\n:103FA0003C0800201862020070B50E461D461146FE\n:103FB00000F0D3F804462946304600F0D7F82044F4\n:103FC000001D70BD2DE9F04190460D4604004FF0F4\n:103FD000000610D00027E01C20F00300A04200D013\n:103FE000FFDFE5B141460020FFF77DFD0C3000EB1F\n:103FF000850617B113E00127EDE7614F04F10C00CE\n:10400000AA003C602572606000EB85002060002102\n:104010006068FAF73CFA41463868FFF764FD3046BD\n:10402000BDE8F0812DE9FF4F554C804681B02068F6\n:104030009A46934600B9FFDF2068027A424503D9C9\n:10404000416851F8280020B143F2020005B0BDE8F4\n:10405000F08F5146029800F080F886B258460E99CB\n:1040600000F084F885B27019001D87B22068A1465F\n:1040700039460068FFF755FD04001FD06780258092\n:104080002946201D0E9D07465A4601230095FFF73D\n:1040900065F92088314638440123029ACDF800A002\n:1040A000FFF75CF92088C1193846FFF788F9D9F87D\n:1040B00000004168002041F82840C7E70420C5E718\n:1040C00070B52F4C0546206800B9FFDF2068017AE3\n:1040D000A9420DD9426852F8251049B1002342F88F\n:1040E00025304A880068FFF747FD2168087A06E016\n:1040F00043F2020070BD4A6852F820202AB9401EDF\n:10410000C0B2F8D20868FFF701FD002070BD70B59D\n:104110001B4E05460024306800B9FFDF3068017A85\n:10412000A94204D9406850F8250000B1041D20467A\n:1041300070BD70B5124E05460024306800B9FFDF2F\n:104140003068017AA94206D9406850F8251011B1AB\n:1041500031F8040B4418204670BD10B50A46012101\n:10416000FFF7F5F8C01C20F0030010BD10B50A469B\n:104170000121FFF7ECF8C01C20F0030010BD000087\n:104180008C00002070B50446C2F110052819FAF71A\n:1041900054F915F0FF0109D0491ECAB28020A0547D\n:1041A0002046BDE870400021FAF771B970BD30B506\n:1041B00005E05B1EDBB2CC5CD55C6C40C454002BCC\n:1041C000F7D130BD10B5002409E00B78521E44EA47\n:1041D000430300F8013B11F8013BD2B2DC09002A8D\n:1041E000F3D110BD2DE9F04389B01E46DDE9107909\n:1041F00090460D00044622D002460846F949FDF7D4\n:1042000044FE102221463846FFF7DCFFE07B000623\n:1042100006D5F44A3946102310320846FFF7C7FF87\n:10422000102239464846FFF7CDFFF87B000606D539\n:10423000EC4A4946102310320846FFF7B8FF102217\n:1042400000212046FAF723F90DE0103EB6B208EB44\n:104250000601102322466846FFF7A9FF224628469A\n:104260006946FDF712FE102EEFD818D0F2B2414683\n:104270006846FFF787FF10234A46694604A8FFF700\n:1042800096FF1023224604A96846FFF790FF2246B6\n:1042900028466946FDF7F9FD09B0BDE8F083102313\n:1042A0003A464146EAE770B59CB01E4605461346BD\n:1042B00020980C468DF80800202219460DF10900BF\n:1042C000FAF7BBF8202221460DF12900FAF7B5F8DC\n:1042D00017A913A8CDE90001412302AA31462846B7\n:1042E000FFF780FF1CB070BD2DE9FF4F9FB014AEEB\n:1042F000DDE92D5410AFBB49CDE9007620232031F4\n:104300001AA8FFF76FFF4FF000088DF808804FF0F4\n:1043100001098DF8099054F8010FCDF80A00A08822\n:10432000ADF80E0014F8010C1022C0F340008DF817\n:10433000100055F8010FCDF81100A888ADF8150050\n:1043400015F8010C2C99C0F340008DF8170006A851\n:104350008246FAF772F80AA8834610222299FAF7E1\n:104360006CF8A0483523083802AA40688DF83C80D4\n:10437000CDE900760E901AA91F98FFF733FF8DF84C\n:1043800008808DF809902068CDF80A00A088ADF863\n:104390000E0014F8010C1022C0F340008DF810003C\n:1043A0002868CDF81100A888ADF8150015F8010CA3\n:1043B0002C99C0F340008DF817005046FAF73DF8ED\n:1043C000584610222299FAF738F8864835230838DB\n:1043D00002AA40688DF83C90CDE900760E901AA9AB\n:1043E0002098FFF7FFFE23B0BDE8F08FF0B59BB03B\n:1043F0000C460546DDE922101E461746DDE920324F\n:10440000D0F801C0CDF808C0B0F805C0ADF80CC0B8\n:104410000078C0F340008DF80E00D1F80100CDF80F\n:104420000F00B1F80500ADF8130008781946C0F385\n:1044300040008DF815001088ADF8160090788DF8C2\n:1044400018000DF119001022F9F7F7FF0DF12900FE\n:1044500010223146F9F7F1FF0DF1390010223946EB\n:10446000F9F7EBFF17A913A8CDE90001412302AA30\n:1044700021462846FFF7B6FE1BB0F0BDF0B5A3B04D\n:1044800017460D4604461E46102202A82899F9F741\n:10449000D4FF06A820223946F9F7CFFF0EA8202224\n:1044A0002946F9F7CAFF1EA91AA8CDE90001502331\n:1044B00002AA314616A8FFF795FE1698206023B091\n:1044C000F0BDF0B589B00446DDE90E070D46397838\n:1044D000109EC1F340018DF8001031789446C1F36D\n:1044E00040018DF801101968CDF802109988ADF8D7\n:1044F000061099798DF808100168CDF809108188A7\n:10450000ADF80D1080798DF80F0010236A466146D2\n:1045100004A8FFF74CFE2246284604A9FDF7B5FC87\n:10452000D6F801000090B6F80500ADF80400D7F801\n:104530000100CDF80600B7F80500ADF80A0000202C\n:10454000039010236A46214604A8FFF730FE224656\n:10455000284604A9FDF799FC09B0F0BD1FB51C68F9\n:1045600000945B68019313680293526803920246B9\n:1045700008466946FDF789FC1FBD10B588B00446A2\n:104580001068049050680590002006900790084637\n:104590006A4604A9FDF779FCBDF80000208008B048\n:1045A00010BD1FB51288ADF800201A88ADF80220A2\n:1045B0000022019202920392024608466946FDF7E4\n:1045C00064FC1FBD7FB5074B14460546083B9A1C8B\n:1045D0006846FFF7E6FF224669462846FFF7CDFF0B\n:1045E0007FBD00007062020070B5044600780E4680\n:1045F000012813D0052802D0092813D10EE0A068A5\n:1046000061690578042003F059FA052D0AD0782352\n:1046100000220420616903F0A7F903E00420616926\n:1046200003F04CFA31462046BDE8704001F08AB8EC\n:1046300010B500F12D03C2799C78411D144064F33C\n:104640000102C271D2070DD04A795C7922404A71C9\n:104650000A791B791A400A718278C9788A4200D98E\n:10466000817010BD00224A71F5E74178012900D020\n:104670000C21017070472DE9F04F93B04FF0000B03\n:104680000C690D468DF820B0097801260C201746DC\n:104690004FF00D084FF0110A4FF008091B2975D291\n:1046A000DFE811F01B00C40207031F035E03710360\n:1046B000A303B803F9031A0462049504A204EF04E7\n:1046C0002D05370555056005F305360639066806DC\n:1046D0008406FE062207EB06F00614B120781D289A\n:1046E0002AD0D5F808805FEA08004FD001208DF865\n:1046F0002000686A02220D908DF824200A208DF88F\n:104700002500A8690A90A8880028EED098F8001023\n:1047100091B10F2910D27DD2DFE801F07C1349DE80\n:10472000FCFBFAF9F8F738089CF6F50002282DD1C1\n:1047300024B120780C2801D00026F0E38DF8202049\n:10474000CBE10420696A03F0B9F9A8880728EED103\n:10475000204600F0F2FF022809D0204600F0EDFFCD\n:10476000032807D9204600F0E8FF072802D20120DD\n:10477000207004E0002CB8D020780128D7D198F818\n:104780000400C11F0A2902D30A2061E0C4E1A0701D\n:10479000D8F80010E162B8F80410218698F80600F5\n:1047A00084F83200012028700320207044E007289C\n:1047B000BDD1002C99D020780D28B8D198F80310DD\n:1047C00094F82F20C1F3C000C2F3C002104201D000\n:1047D000062000E00720890707D198F8051001425C\n:1047E000D2D198F806100142CED194F8312098F831\n:1047F000051020EA02021142C6D194F8322098F83E\n:10480000061090430142BFD198F80400C11F0A2945\n:10481000BAD200E008E2617D81427CD8D8F800106D\n:104820006160B8F80410218198F80600A072012098\n:1048300028700E20207003208DF82000686A0D90EB\n:1048400004F12D000990601D0A900F300B9022E1B9\n:104850002875FCE3412891D1204600F06EFF042822\n:1048600002D1E078C00704D1204600F066FF0F288F\n:1048700084D1A88CD5F80C8080B24FF0400BE6694B\n:10488000FFF745FC324641465B464E46CDF8009068\n:10489000FFF731F80B208DF82000686A0D90E06971\n:1048A0000990002108A8FFF79FFE2078042806D071\n:1048B000A07D58B1012809D003280AD04AE3052079\n:1048C0002070032028708DF82060CEE184F800A0CD\n:1048D00032E712202070EAE11128BCD1204600F016\n:1048E0002CFF042802D1E078C00719D0204600F040\n:1048F00024FF062805D1E078C00711D1A07D022849\n:104900000ED0204608E0CCE084E072E151E124E1E1\n:1049100003E1E9E019E0B0E100F00FFF11289AD1BE\n:10492000102208F1010104F13C00F9F786FD6078DE\n:1049300001286ED012202070E078C00760D0A07DE2\n:104940000028C8D00128C6D05AE0112890D12046AE\n:1049500000F0F3FE082804D0204600F0EEFE1328F5\n:1049600086D104F16C00102208F101010646F9F726\n:1049700064FD207808280DD014202070E178C80745\n:104980000DD0A07D02280AD06278022A04D0032824\n:10499000A1D035E00920F0E708B1012837D1C807D8\n:1049A00013D0A07D02281DD000200090D4E906215C\n:1049B00033460EA8FFF777FC10220EA904F13C0045\n:1049C000F9F70EFDC8B1042042E7D4E90912201D11\n:1049D0008DE8070004F12C0332460EA8616BFFF747\n:1049E00070FDE9E7606BC1F34401491E0068C840EF\n:1049F00000F0010040F08000D7E72078092806D1B8\n:104A000085F800908DF8209036E32870EFE30920B8\n:104A1000FBE79EE1112899D1204600F08EFE0A287E\n:104A200002D1E078C00704D1204600F086FE1528A8\n:104A30008CD104F13C00102208F101010646F9F77F\n:104A4000FCFC20780A2816D016202070D4E9093200\n:104A5000606B611D8DE80F0004F15C0304F16C02D2\n:104A600047310EA8FFF7C2FC10220EA93046F9F715\n:104A7000B7FC18B1F9E20B20207073E22046FFF773\n:104A8000D7FDA078216AC0F110020B18002118464A\n:104A9000F9F7FDFC26E3394608A8FFF7A5FD064611\n:104AA0003CE20228B7D1204600F047FE042804D398\n:104AB000204600F042FE082809D3204600F03DFEC3\n:104AC0000E2829D3204600F038FE122824D2A07DDB\n:104AD0000228A0D10E208DF82000686A0D9098F869\n:104AE00001008DF82400F5E3022894D1204600F05F\n:104AF00024FE002810D0204600F01FFE0128F9D027\n:104B0000204600F01AFE0C28F4D004208DF8240072\n:104B100098F801008DF8250060E21128FCD1002CE6\n:104B2000FAD020781728F7D16178606A022912D06C\n:104B30005FF0000101EB4101182606EBC1011022D4\n:104B4000405808F10101F9F778FC0420696A00F087\n:104B5000E7FD2670F0E50121ECE70B28DCD1002C05\n:104B6000DAD020781828D7D16078616A02281CD062\n:104B70005FF0000000EB4002102000EBC20009587B\n:104B8000B8F8010008806078616A02280FD0002020\n:104B900000EB4002142000EBC2000958404650F8D8\n:104BA000032F0A604068486039E00120E2E70120F5\n:104BB000EEE71128B0D1002CAED020781928ABD167\n:104BC0006178606A022912D05FF0000101EB4101B7\n:104BD0001C2202EBC1011022405808F10101F9F733\n:104BE0002CFC0420696A00F09BFD1A20B6E001212C\n:104BF000ECE7082890D1002C8ED020781A288BD191\n:104C0000606A98F80120017862F347010170616AD7\n:104C1000D8F8022041F8012FB8F806008880042057\n:104C2000696A00F07DFD90E2072011E638780128DE\n:104C300094D1182204F114007968F9F7FEFBE079A9\n:104C4000C10894F82F0001EAD001E07861F3000078\n:104C5000E070217D002974D12178032909D0C00793\n:104C600025D0032028708DF82090686A0D9041208F\n:104C700008E3607DA178884201D90620E8E5022694\n:104C80002671E179204621F0E001E171617A21F09D\n:104C9000F0016172A17A21F0F001A172FFF7C8FC66\n:104CA0002E708DF82090686A0D900720EAE20420AB\n:104CB000ABE6387805289DD18DF82000686A0D9004\n:104CC000B8680A900720ADF824000A988DF830B033\n:104CD0006168016021898180A17A8171042020703E\n:104CE000F8E23978052985D18DF82010696A0D918F\n:104CF000391D09AE0EC986E80E004121ADF8241019\n:104D00008DF830B01070A88CD7F80C8080B2402697\n:104D1000A769FFF70EFA41463A463346C846CDF832\n:104D20000090FEF71CFE002108A8FFF75DFCE0786C\n:104D300020F03E00801CE0702078052802D00F2073\n:104D40000CE04AE1A07D20B1012802D0032802D066\n:104D500002E10720BEE584F80080EDE42070EBE47A\n:104D6000102104F15C0002F0C2FB606BB0BBA07DBF\n:104D700018B1012801D00520FDE006202870F84870\n:104D80006063A063C2E23878022894D1387908B110\n:104D90002875B7E3A07D022802D0032805D022E0C1\n:104DA000B8680028F5D060631CE06078012806D060\n:104DB000A07994F82E10012805D0E94806E0A179E1\n:104DC00094F82E00F7E7B8680028E2D06063E07836\n:104DD000C00701D0012902D0E14803E003E0F868F0\n:104DE0000028D6D0A06306200FE68DF82090696ACF\n:104DF0000D91E1784846C90709D06178022903D1AD\n:104E0000A17D29B1012903D0A17D032900D007206C\n:104E1000287033E138780528BBD1207807281ED0C8\n:104E200084F800A005208DF82000686A0D90B8680D\n:104E30000A90ADF824A08DF830B003210170E1781C\n:104E4000CA070FD0A27D022A1AD000210091D4E90E\n:104E5000061204F15C03401CFFF725FA6BE384F8AB\n:104E60000090DFE7D4E90923211D8DE80E0004F14D\n:104E70002C0304F15C02401C616BFFF722FB5AE338\n:104E8000626BC1F34401491E1268CA4002F001017D\n:104E900041F08001DAE738780528BDD18DF820008F\n:104EA000686A0D90B8680A90ADF824A08DF830B00B\n:104EB000042100F8011B102204F15C01F9F7BDFA8E\n:104EC000002108A8FFF790FB2078092801D01320C3\n:104ED00044E70A2020709AE5E078C10742D0A17D1E\n:104EE000012902D0022927D038E0617808A80129D9\n:104EF00016D004F16C010091D4E9061204F15C03B0\n:104F0000001DFFF7BBFA0A20287003268DF82080C9\n:104F1000686A0D90002108A8FFF766FBE1E2C7E28E\n:104F200004F15C010091D4E9062104F16C03001D39\n:104F3000FFF7A4FA0026E9E7C0F3440114290DD2D3\n:104F40004FF0006101EBB0104FEAB060E0706078A4\n:104F5000012801D01020BDE40620FFE6607801287A\n:104F60003FF4B6AC0A2050E5E178C90708D0A17D2E\n:104F7000012903D10B202870042030E028702EE096\n:104F80000E2028706078616B012818D004F15C0352\n:104F900004F16C020EA8FFF7E1FA2046FFF748FB88\n:104FA000A0780EAEC0F1100230440021F9F76FFA7C\n:104FB00006208DF82000686A09960D909BE004F1A8\n:104FC0006C0304F15C020EA8FFF7C8FAE8E7397831\n:104FD000022903D139790029D0D0297592E28DF8C0\n:104FE0002000686A0D9056E538780728F6D1D4E994\n:104FF00009216078012808D004F16C00CDE9000295\n:10500000029105D104F16C0304E004F15C00F5E7C2\n:1050100004F15C0304F14C007A680646216AFFF74C\n:1050200063F96078012822D1A078216AC0F11002CA\n:105030000B1800211846F9F72AFAD4E90923606B06\n:1050400004F12D018DE80F0004F15C0300E05BE248\n:1050500004F16C0231460EA8FFF7C8F910220EA920\n:1050600004F13C00F9F7BCF908B10B20ACE485F879\n:10507000008000BF8DF82090686A0D908DF824A004\n:1050800009E538780528A9D18DF82000686A0D90C7\n:10509000B8680A90ADF824A08DF830B080F8008090\n:1050A000617801291AD0D4E9092104F12D03A66BF6\n:1050B00003910096CDE9013204F16C0304F15C0226\n:1050C00004F14C01401CFFF791F9002108A8FFF7FB\n:1050D0008BFA6078012805D015203FE6D4E9091243\n:1050E000631DE4E70E20287006208DF82000686A12\n:1050F000CDF824B00D90A0788DF82800CBE4387856\n:105100000328C0D1E079C00770D00F202870072095\n:1051100065E7387804286BD11422391D04F1140096\n:10512000F9F78BF9616A208CA1F80900616AA0780F\n:10513000C871E179626A01F003011172616A627AF1\n:105140000A73616AA07A81F8240016205DE485F86C\n:1051500000A08DF82090696A50460D9192E0000001\n:10516000706202003878052842D1B868A861617879\n:10517000606A022901D0012100E0002101EB410118\n:10518000142606EBC1014058082102F0B0F96178FD\n:10519000606A022901D0012100E0002101EB4101F8\n:1051A00006EBC101425802A8E169FFF70BFA6078EB\n:1051B000626A022801D0012000E0002000EB4001DB\n:1051C000102000EBC1000223105802A90932FEF79B\n:1051D000EEFF626AFD4B0EA80932A169FFF7E1F903\n:1051E0006178606A022904D0012103E044E18DE086\n:1051F000BFE0002101EB4101182606EBC101A278B6\n:1052000040580EA9F9F719F96178606A022901D0AE\n:10521000012100E0002101EB410106EBC1014158F1\n:10522000A0780B18C0F1100200211846F9F72FF9E9\n:1052300005208DF82000686A0D90A8690A90ADF8E5\n:1052400024A08DF830B0062101706278616A022ACC\n:1052500001D0012200E0002202EB420206EBC20272\n:10526000401C89581022F9F7E8F8002108A8FFF738\n:10527000BBF91220C5F818B028708DF82090686A24\n:105280000D900B208DF8240005E43878052870D1A6\n:105290008DF82000686A0D90B8680A900B20ADF870\n:1052A00024000A98072101706178626A022901D0FE\n:1052B000012100E0002101EB4103102101EBC301BA\n:1052C00051580988A0F801106178626A022902D059\n:1052D000012101E02FE1002101EB4103142101EB49\n:1052E000C30151580A6840F8032F4968416059E0EA\n:1052F0001920287001208DF8300074E616202870DF\n:105300008DF830B0002108A8FFF76EF9032617E1E9\n:1053100014202870AEE6387805282AD18DF82000B0\n:10532000686A0D90B8680A90ADF824A08DF830B086\n:1053300080F800906278616A4E46022A01D001220C\n:1053400000E0002202EB42021C2303EBC202401CDD\n:1053500089581022F9F771F8002108A8FFF744F9DD\n:10536000152028708DF82060686A0D908DF82460F3\n:1053700039E680E0387805287DD18DF82000686A0C\n:105380000D90B8680A90ADF8249009210170616908\n:10539000097849084170616951F8012FC0F802206D\n:1053A0008988C18020781C28A8D1A1E7E078C007AF\n:1053B00002D04FF0060C01E04FF0070C6078022895\n:1053C0000AD000BF4FF0000000EB040101F1090119\n:1053D00005D04FF0010004E04FF00100F4E74FF07A\n:1053E00000000B78204413EA0C030B7010F8092F0F\n:1053F00002EA0C02027004D14FF01B0C84F800C0CA\n:10540000D2B394F801C0BCF1010F00D09BB990F861\n:1054100000C0E0465FEACC7C04D028F001060670AC\n:10542000102606E05FEA887C05D528F002060670A3\n:1054300013262E70032694F801C0BCF1020F00D091\n:1054400092B991F800C05FEACC7804D02CF0010644\n:105450000E70172106E05FEA8C7805D52CF0020665\n:105460000E701921217000260078D0BBCAB3C3BBCF\n:105470001C20207035E012E002E03878062841D187\n:105480001A2015E4207801283CD00C283AD0204678\n:10549000FFF7EBF809208DF82000686A0D9031E0E5\n:1054A0003878052805D00620387003261820287083\n:1054B00046E005208DF82000696A0D91B9680A91CF\n:1054C0000221ADF8241001218DF830100A990870DE\n:1054D000287D4870394608A8FFF786F80646182048\n:1054E0002870012E0ED02BE001208DF82000686A74\n:1054F0000D9003208DF82400287D8DF8250085F877\n:1055000014B012E0287D80B11D2020701720287073\n:105510008DF82090686A0D9002208DF8240039469D\n:1055200008A8FFF761F806460AE00CB1FE202070DB\n:105530009DF8200020B1002108A8FFF755F80CE4E1\n:1055400013B03046BDE8F08F2DE9F04387B00C462C\n:105550004E6900218DF804100120257803460227AA\n:105560004FF007094FF0050C85B1012D53D0022DE6\n:1055700039D1FE2030708DF80030606A059003202C\n:105580008DF80400207E8DF8050063E02179012963\n:1055900025D002292DD0032928D0042923D1B17D7B\n:1055A000022920D131780D1F042D04D30A3D032D8B\n:1055B00001D31D2917D12189022914D38DF8047034\n:1055C000237020899DF80410884201E0686202007F\n:1055D00018D208208DF80000606A059057E07078B6\n:1055E0000128EBD0052007B0BDE8F0831D20307006\n:1055F000E4E771780229F5D131780C29F3D18DF8DF\n:105600000490DDE7083402F804CB94E80B0082E84C\n:105610000B000320E7E71578052DE4D18DF800C0D5\n:10562000656A0595956802958DF8101094F80480C8\n:10563000B8F1010F13D0B8F1020F2DD0B8F1030F5C\n:105640001CD0B8F1040FCED1ADF804700E20287034\n:10565000207E687000216846FEF7C6FF0CE0ADF8BA\n:1056600004700B202870207E002100F01F0068705D\n:105670006846FEF7B9FF37700020B4E7ADF8047054\n:105680008DF8103085F800C0207E687027701146B4\n:105690006846FEF7A9FFA6E7ADF804902B70207FBF\n:1056A0006870607F00F00100A870A07F00F01F000C\n:1056B000E870E27F2A71C0071CD094F8200000F047\n:1056C0000700687194F8210000F00700A87100211C\n:1056D0006846FEF789FF2868F062A8883086A879B6\n:1056E00086F83200A069407870752879B0700D2076\n:1056F0003070C1E7A9716971E9E700B587B0042886\n:105700000CD101208DF800008DF8040000200591D7\n:105710008DF8050001466846FEF766FF07B000BD3C\n:1057200070B50C46054602F0C9F921462846BDE889\n:1057300070407823002202F017B908B10078704752\n:105740000C20704770B50C0005784FF000010CD0AC\n:1057500021702146EFF7D1FD69482178405D8842EC\n:1057600001D1032070BD022070BDEFF7C6FD0020FF\n:1057700070BD0279012A05D000220A704B78012BF6\n:1057800002D003E0042070470A758A610279930011\n:10579000521C0271C15003207047F0B587B00F460C\n:1057A00005460124287905EB800050F8046C7078D8\n:1057B000411E02290AD252493A46083901EB8000BB\n:1057C000314650F8043C2846984704460CB1012C59\n:1057D00011D12879401E10F0FF00287101D0032458\n:1057E000E0E70A208DF80000706A0590002101961C\n:1057F0006846FFF7A7FF032CD4D007B02046F0BDC2\n:1058000070B515460A46044629461046FFF7C5FFFF\n:10581000064674B12078FE280BD1207C30B10020E0\n:105820002870294604F10C00FFF7B7FF2046FEF769\n:105830001CFF304670BD704770B50E4604467C2292\n:105840000021F8F724FE0225012E03D0022E04D0F9\n:10585000052070BD0120607000E065702046FEF7F5\n:1058600004FFA575002070BD28B1027C1AB10A465C\n:1058700000F10C01C4E70120704710B5044686B062\n:10588000042002F01BF92078FE2806D000208DF8B5\n:10589000000069462046FFF7E7FF06B010BD7CB563\n:1058A0000E4600218DF804104178012903D0022909\n:1058B00003D0002405E0046900E044690CB1217CB8\n:1058C00089B16D4601462846FFF753FF032809D1E9\n:1058D000324629462046FFF793FF9DF80410002921\n:1058E00000D004207CBD04F10C05EBE730B40C467D\n:1058F0000146034A204630BC024B0C3AFEF751BE2B\n:10590000AC6202006862020070B50D46040011D05E\n:1059100085B1220100212846F8F7B9FD102250492F\n:105920002846F8F78AFD4F48012101704470456010\n:10593000002070BD012070BD70B505460024494EA1\n:1059400011E07068AA7B00EB0410817B914208D1C2\n:10595000C17BEA7B914204D10C222946F8F740FD35\n:1059600030B1641CE4B230788442EAD3002070BDC8\n:10597000641CE0B270BD70B50546FFF7DDFF00287E\n:1059800005D1384C20786178884201D3002070BD61\n:105990006168102201EB00102946F8F74EFD2078CF\n:1059A000401CC0B2207070BD2E48007870472D4951\n:1059B0000878012802D0401E08700020704770B59A\n:1059C0000D460021917014461180022802D0102843\n:1059D00015D105E0288890B10121A17010800CE05C\n:1059E000284613B1FFF7C7FF01E0FFF7A5FFA0703E\n:1059F00010F0FF0F03D0A8892080002070BD012087\n:105A000070BD0023DBE770B5054614460E0009D0D3\n:105A100000203070A878012806D003D911490A78EF\n:105A200090420AD9012070BD24B1287820702888BE\n:105A3000000A5070022008700FE064B1496810221B\n:105A400001EB001120461039F8F7F7FC2878207395\n:105A50002888000A607310203070002070BD00009C\n:105A6000BB620200900000202DE9F04190460C46F8\n:105A700007460025FE48072F00EB881607D2DFE80F\n:105A800007F00707070704040400012500E0FFDF13\n:105A900006F81470002D13D0F548803000EB880113\n:105AA00091F82700202803D006EB4000447001E065\n:105AB00081F8264006EB44022020507081F82740F0\n:105AC000BDE8F081F0B51F4614460E460546202A73\n:105AD00000D1FFDFE649E648803100EB871C0CEB84\n:105AE000440001EB8702202E07D00CEB46014078E2\n:105AF0004B784870184620210AE092F8253040780B\n:105B000082F82500F6E701460CEB4100057040786D\n:105B1000A142F8D192F82740202C03D00CEB44048A\n:105B2000637001E082F826300CEB4104202363709F\n:105B300082F82710F0BD30B50D46CE4B4419002237\n:105B4000181A72EB020100D2FFDFCB48854200DD5C\n:105B5000FFDFC9484042854200DAFFDFC548401CEC\n:105B6000844207DA002C01DB204630BDC148401CCE\n:105B7000201830BDBF48C043FAE710B5044601689D\n:105B8000407ABE4A52F82020114450B10220084405\n:105B900020F07F40EDF763F894F90810BDE810405D\n:105BA000C9E70420F3E72DE9F047B14E803696F8B7\n:105BB0002D50DFF8BC9206EB850090F8264034E0CB\n:105BC00009EB85174FF0070817F81400012806D0D5\n:105BD00004282ED005282ED0062800D0FFDF01F0A3\n:105BE00025F9014607EB4400427806EB850080F872\n:105BF000262090F82720A24202D1202280F82720D8\n:105C0000084601F01EF92A4621460120FFF72CFF25\n:105C10009B48414600EB041002682046904796F8E6\n:105C20002D5006EB850090F82640202CC8D1BDE809\n:105C3000F087022000E003208046D0E710B58C4CAE\n:105C40002021803484F8251084F8261084F8271049\n:105C5000002084F8280084F82D0084F82E10411EBE\n:105C6000A16044F8100B2074607420736073A073FB\n:105C70008449E07720750870487000217C4A103C08\n:105C800002F81100491CC9B22029F9D30120ECF710\n:105C9000D6FE0020ECF7D3FE012084F82200EDF7B9\n:105CA000FFF87948EDF711F9764CA41E207077487B\n:105CB000EDF70BF96070BDE81040ECF74DBE10B584\n:105CC000ECF76FFE6F4CA41E2078EDF717F96078A3\n:105CD000EDF714F9BDE8104001F0E0B8202070475E\n:105CE0000020ECF785BE70B5054601240E46AC4099\n:105CF0005AB1FFF7F5FF0146654800EBC500C0F853\n:105D00001015C0F81465634801E06248001D046086\n:105D100070BD2DE9F34F564C0025803404EB810A09\n:105D200089B09AF82500202821D0691E0291544993\n:105D3000009501EB0017391D03AB07C983E8070085\n:105D4000A18BADF81C10A07F8DF81E009DF81500EA\n:105D5000A046C8B10226494951F820400399A2192A\n:105D6000114421F07F41019184B102210FE0012013\n:105D7000ECF765FE0020ECF762FEECF730FE01F078\n:105D80008DF884F82F50A9E00426E4E700218DF86F\n:105D90001810022801D0012820D103980119099870\n:105DA000081A801C9DF81C1020F07F4001B10221D0\n:105DB000353181420BD203208DF815000398C4F1D0\n:105DC0003201401A20F07F40322403900CE098F812\n:105DD000240018B901F043FA002863D0322C03D212\n:105DE00014B101F04FF801E001F058F8254A10789D\n:105DF00018B393465278039B121B00219DF818405C\n:105E0000994601281AD0032818D000208DF81E00CA\n:105E1000002A04DD981A039001208DF818009DF8DF\n:105E20001C0000B1022103981B4A20F07F40039020\n:105E300003AB099801F03EF810B110E00120E5E74E\n:105E40009DF81D0018B99BF80000032829D08DF893\n:105E50001C50CDF80C908DF818408DF81E509DF810\n:105E6000180010B30398012381190022184615E089\n:105E7000840A0020FF7F841E0020A107CC6202005C\n:105E8000840800209A00002017780100A75B010019\n:105E900000F0014004F50140FFFF3F00ECF722FE57\n:105EA00006E000200BB0BDE8F08F0120ECF7C7FD45\n:105EB00097F90C20012300200199ECF713FEF87BE1\n:105EC000C00701D0ECF7F7FE012188F82F108AF8FF\n:105ED000285020226946FE48F8F7AFFA0120E1E792\n:105EE0002DE9F05FDFF8E883064608EB860090F8BE\n:105EF0002550202D1FD0A8F180002C4600EB8617DE\n:105F0000A0F50079DFF8CCB305E0A24607EB4A0024\n:105F10004478202C0AD0ECF730FE09EB04135A46E3\n:105F200001211B1D00F0C6FF0028EED0AC4202D0BC\n:105F3000334652461EE0E84808B1AFF30080ECF764\n:105F40001CFE98F82F206AB1D8F80C20411C891A41\n:105F50000902CA1701EB12610912002902DD0020B3\n:105F6000BDE8F09F3146FFF7D4FE08B10120F7E706\n:105F700033462A4620210420FFF7A4FDEFE72DE950\n:105F8000F041D34C2569ECF7F8FD401B0002C11726\n:105F900000EB1160001200D4FFDF94F8220000B182\n:105FA000FFDF012784F8227094F82E00202800D10A\n:105FB000FFDF94F82E60202084F82E00002584F85E\n:105FC0002F5084F8205084F82150C4482560007870\n:105FD000022833D0032831D000202077A068401C4D\n:105FE00005D04FF0FF30A0600120ECF728FD002025\n:105FF000ECF725FDECF721FEECF719FEECF7EFFCD2\n:106000000EF0D6FDB648056005604FF0E0214FF474\n:106010000040B846C1F88002ECF7BBFE94F82D7042\n:106020003846FFF75DFF0028FAD0A948803800EB1A\n:10603000871010F81600022802D006E00120CCE7F5\n:106040003A4631460620FFF70FFD84F8238004EB23\n:10605000870090F82600202804D0A048801E4078B1\n:10606000ECF752FF207F002803D0ECF7D6FD257710\n:10607000657725E5964910B591F82D2000248039E3\n:1060800001EB821111F814302BB1641CE4B2202C06\n:10609000F8D3202010BD934901EB041108600020C3\n:1060A000C87321460120FFF7DFFC204610BD10B564\n:1060B000012801D0032800D171B3854A92F82D3010\n:1060C000834C0022803C04EB831300BF13F8124082\n:1060D0000CB1082010BD521CD2B2202AF6D37F4A40\n:1060E00048B1022807D0072916D2DFE801F01506CB\n:1060F000080A0C0E100000210AE01B2108E03A21DA\n:1061000006E0582104E0772102E0962100E0B52165\n:1061100051701070002010BD072010BD6F4810B5E1\n:106120004078ECF79CFD80B210BD10B5202811D24C\n:10613000674991F82D30A1F1800202EB831414F825\n:1061400010303BB191F82D3002EB831212F8102081\n:10615000012A01D0002010BD91F82D200146002019\n:10616000FFF782FC012010BD10B5ECF706FDBDE87D\n:106170001040ECF774BD2DE9F0410E46544F017804\n:106180002025803F0C4607EB831303E0254603EBF5\n:1061900045046478944202D0202CF7D108E0202CEA\n:1061A00006D0A14206D103EB41014978017007E016\n:1061B000002085E403EB440003EB45014078487080\n:1061C000494F7EB127B1002140F22D40AFF300804E\n:1061D0003078A04206D127B100214FF48660AFF39A\n:1061E0000080357027B1002140F23540AFF30080C8\n:1061F000012065E410B542680B689A1A1202D417A0\n:1062000002EB1462121216D4497A91B1427A82B921\n:10621000364A006852F82110126819441044001DD3\n:10622000891C081A0002C11700EB11600012322805\n:1062300001DB012010BD002010BD2DE9F047294EE3\n:10624000814606F500709846144600EB811712E06F\n:1062500006EB0415291D4846FFF7CCFF68B988F8FE\n:106260000040A97B99F80A00814201D80020DEE4B1\n:1062700007EB44004478202CEAD10120D7E42DE933\n:10628000F047824612480E4600EB8600DFF8548045\n:1062900090F825402020107008F5007099461546AA\n:1062A00000EB86170BE000BF08EB04105146001D01\n:1062B000FFF7A0FF28B107EB44002C704478202C96\n:1062C000F2D1297889F800104B46224631460FE07A\n:1062D000040B0020FFFF3F00000000009A00002098\n:1062E00000F500408408002000000000CC6202009D\n:1062F0005046BDE8F047A0E72DE9FC410F460446B3\n:106300000025FE4E10E000BF9DF80000256806EB5A\n:1063100000108168204600F0E1FD2068A84202D10B\n:106320000020BDE8FC8101256B4601AA39462046C4\n:10633000FFF7A5FF0028E7D02846F2E770B504462E\n:10634000EF480125A54300EB841100EB85104022A6\n:10635000F8F773F8EB4E26B1002140F29D40AFF301\n:106360000080E748803000EB850100EB8400D0F826\n:106370002500C1F8250026B1002140F2A140AFF36D\n:106380000080284670BD8A4203D003460520FFF7EF\n:1063900099BB202906D0DA4A02EB801000EB4100BD\n:1063A00040787047D649803101EB800090F8250095\n:1063B0007047D24901EB0010001DFFF7DEBB7CB532\n:1063C0001D46134604460E4600F1080221461846B3\n:1063D000ECF752FC94F908000F2804DD1F382072F6\n:1063E0002068401C206096B10220C74951F8261051\n:1063F000461820686946801B20F07F40206094F991\n:1064000008002844C01C1F2803DA012009E00420EA\n:10641000EBE701AAECF730FC9DF8040010B10098FE\n:10642000401C00900099206831440844C01C20F0B2\n:106430007F4060607CBDFEB50C46064609786079F9\n:10644000907220791F461546507279B12179002249\n:106450002846A368FFF7B3FFA9492846803191F881\n:106460002E20202A0AD00969491D0DE0D4E9022313\n:10647000217903B02846BDE8F040A0E7A349497858\n:10648000052900D20521314421F07F4100F026FD8D\n:1064900039462846FFF730FFD4E9023221796846B1\n:1064A000FFF78DFF2B4600213046019A00F002FDD8\n:1064B000002806D103B031462846BDE8F04000F080\n:1064C0000DBDFEBD2DE9F14F84B000F0C3FCF0B16D\n:1064D00000270498007800284FF000006DD1884D07\n:1064E000884C82468346803524B1002140F2045016\n:1064F000AFF3008095F82D8085F823B0002624B1F5\n:10650000002140F20950AFF3008017B105E00127E8\n:10651000DFE74046FFF712FF804624B1002140F23A\n:106520001150AFF30080ECF728FB814643466A46E2\n:106530000499FFF780FF24B1002140F21750AFF318\n:10654000008095F82E0020280CD029690098401A68\n:106550000002C21700EB1260001203D5684600F07B\n:10656000BDFC01264CB1002140F22150AFF3008068\n:10657000002140F22650AFF300806B46644A0021B0\n:10658000484600F097FC98B127B941466846FFF7A6\n:10659000B3FE064326B16846FFF7EFFA0499886018\n:1065A0004FF0010A24B1002140F23A50AFF30080CD\n:1065B00095F82300002897D1504605B073E42DE9E3\n:1065C000F04F89B08B46824600F044FC4C4C80343E\n:1065D00030B39BF80000002710B1012800D0FFDF86\n:1065E000484D25B1002140F2F950AFF300804349F6\n:1065F000012001EB0A18A946CDF81C005FEA090644\n:1066000004D0002140F20160AFF30080079800F051\n:1066100018FC94F82D50002084F8230067B119E08D\n:1066200094F82E000127202800D1FFDF9BF80000FE\n:106630000028D5D0FFDFD3E72846FFF77FFE0546C9\n:1066400026B1002140F20B60AFF3008094F82300E4\n:106650000028D3D126B1002140F21560AFF30080AD\n:10666000ECF78BFA2B4602AA59460790FFF7E3FE98\n:1066700098F80F005FEA060900F001008DF813009A\n:1066800004D0002140F21F60AFF300803B462A4651\n:1066900002A9CDF800A0079800F02BFC064604EBF9\n:1066A000850090F828000090B9F1000F04D0002177\n:1066B00040F22660AFF3008000F0B8FB0790B9F11C\n:1066C000000F04D0002140F22C60AFF3008094F85A\n:1066D0002300002892D1B9F1000F04D0002140F22C\n:1066E0003460AFF300800DF1080C9CE80E00C8E99F\n:1066F0000112C8F80C30BEB30CE000008408002082\n:10670000840A002000000000CC6202009A000020F1\n:10671000FFFF3F005FEA090604D0002140F241601C\n:10672000AFF300800098B84312D094F82E002028D0\n:106730000ED126B1002140F24660AFF3008028461A\n:10674000FFF7CEFB20B99BF80000D8B3012849D051\n:10675000B9F1000F04D0002140F26360AFF3008074\n:10676000284600F05CFB01265FEA090504D0002101\n:1067700040F26C60AFF30080079800F062FB25B137\n:1067800000214FF4CE60AFF300808EB194F82D005D\n:1067900004EB800090F82600202809D025B10021C4\n:1067A00040F27760AFF30080F7484078ECF7ACFB3D\n:1067B00025B1002140F27C60AFF3008009B0304683\n:1067C000BDE8F08FFFE7B9F1000F04D0002140F2DF\n:1067D0004E60AFF3008094F82D2051460420FFF75F\n:1067E00043F9C0E7002E3FF409AF002140F25960A1\n:1067F000AFF3008002E72DE9F84FE44D814695F8AC\n:106800002D004FF00008E24C4FF0010B474624B139\n:10681000002140F28A60AFF30080584600F011FB7F\n:1068200085F8237024B1002140F28F60AFF300801F\n:1068300095F82D00FFF782FD064695F8230028B154\n:10684000002CE4D0002140F295604BE024B10021FF\n:1068500040F29960AFF30080CC48803800EB86119D\n:1068600011F81900032856D1334605EB830A4A462E\n:106870009AF82500904201D1012000E0002000900C\n:106880000AF125000021FFF776FC0146009801423D\n:1068900003D001228AF82820AF77E1B324B1002188\n:1068A00040F29E60AFF30080324649460120FFF778\n:1068B000DBF89AF828A024B1002140F2A960AFF3D8\n:1068C000008000F0B3FA834624B1002140F2AE60AC\n:1068D000AFF3008095F8230038B1002C97D0002149\n:1068E00040F2B260AFF3008091E7BAF1000F07D039\n:1068F00095F82E00202803D13046FFF7F1FAE0B1D9\n:1069000024B1002140F2C660AFF30080304600F0B1\n:1069100086FA4FF0010824B1002140F2CF60AFF3B6\n:106920000080584600F08DFA24B1002140F2D36077\n:10693000AFF300804046BDE8F88F002CF1D0002175\n:1069400040F2C160AFF30080E6E70120ECF750B8F9\n:106950008D48007870472DE9F0418C4C94F82E005A\n:1069600020281FD194F82D6004EB860797F8255056\n:10697000202D00D1FFDF8549803901EB861000EB27\n:106980004500407807F8250F0120F87084F82300AF\n:10699000294684F82E50324602202234FFF764F84C\n:1069A0000020207005E42DE9F0417A4E774C012556\n:1069B00038B1012821D0022879D003287DD0FFDF0B\n:1069C00017E400F05FFAFFF7C6FF207E00B1FFDF9B\n:1069D00084F821500020ECF732F8A168481C04D05C\n:1069E000012300221846ECF77DF814F82E0F2178C9\n:1069F00006EB01110A68012154E0FFF7ACFF01200A\n:106A0000ECF71DF894F8210050B1A068401C07D0A5\n:106A100014F82E0F217806EB01110A68062141E0D7\n:106A2000207EDFF86481002708F10208012803D0E6\n:106A300002281ED0FFDFB5E7A777ECF7EEF898F84D\n:106A40000000032801D165772577607D524951F810\n:106A5000200094F8201051B948B161680123091A47\n:106A600000221846ECF73EF8022020769AE72776B7\n:106A700098E784F8205000F005FAA07F50B198F80C\n:106A8000010061680123091A00221846ECF72AF870\n:106A9000257600E0277614F82E0F217806EB0111F9\n:106AA0000A680021BDE8F041104700E005E03648E3\n:106AB0000078BDE8F041ECF727BAFFF74CFF14F877\n:106AC0002E0F217806EB01110A680521EAE710B5BF\n:106AD0002E4C94F82E00202800D1FFDF14F82E0F42\n:106AE00021782C4A02EB01110A68BDE8104004210C\n:106AF00010477CB5254C054694F82E00202800D17F\n:106B0000FFDFA068401C00D0FFDF94F82E00214971\n:106B100001AA01EB0010694690F90C002844ECF73B\n:106B2000ABF89DF904000F2801DD012000E00020F2\n:106B3000009908446168084420F07F41A16094F8FE\n:106B40002100002807D002B00123BDE870400022D8\n:106B50001846EBF7C7BF7CBD30B5104A0B1A541C62\n:106B6000B3EB940F1ED3451AB5EB940F1AD393428F\n:106B700003D9101A43185B1C14E0954210D9511A1E\n:106B80000844401C43420DE098000020040B002004\n:106B90000000000084080020CC620200FF7F841EF9\n:106BA000FFDF0023184630BD0123002201460220EA\n:106BB000EBF798BF0220EBF742BFEBF7DEBF2DE902\n:106BC000FE4FEE4C05468A4694F82E00202800D150\n:106BD000FFDFEA4E94F82E10A0462046A6F520725C\n:106BE00002EB011420218DF8001090F82D10376968\n:106BF00000EB8101D8F8000091F82590284402AA02\n:106C000001A90C36ECF738F89DF90800002802DDE0\n:106C10000198401C0190A0680199642D084452D34A\n:106C2000D74B00225B1B72EB02014CD36168411A07\n:106C300021F07F41B1F5800F45D220F07F40706098\n:106C400086F80AA098F82D1044466B464A4630460E\n:106C5000FFF7F3FAB0B3A068401C10D0EBF78DFF3C\n:106C6000A168081A0002C11700EB11600012022887\n:106C70002BDD0120EBF7E3FE4FF0FF30A06094F82E\n:106C80002D009DF8002020210F34FFF77CFBA17F11\n:106C9000BA4A803A02EB8111E27F01EB420148706F\n:106CA00054F80F0C284444F80F0C012020759DF86F\n:106CB0000000202803D0B3484078ECF725F90120E4\n:106CC000BDE8FE8F01E00020FAE77760FBE72DE9E1\n:106CD000F047AA4C074694F82D00A4F1800606EB75\n:106CE000801010F8170000B9FFDF94F82D50A0466F\n:106CF000A54C24B1002140F6EA00AFF3008040F635\n:106D0000F60940F6FF0A06EB851600BF16F81700D5\n:106D1000012819D0042811D005280FD006280DD03D\n:106D20001CB100214846AFF300800FF02DF8002C75\n:106D3000ECD000215046AFF30080E7E72A46394601\n:106D40000120FEF791FEF2E74FF0010A4FF0000933\n:106D5000454624B1002140F60610AFF300805046AE\n:106D600000F06FF885F8239024B1002140F60B1055\n:106D7000AFF3008095F82D00FFF7E0FA064695F88E\n:106D8000230028B1002CE4D0002140F611101FE0B0\n:106D900024B1002140F61510AFF3008005EB86000A\n:106DA00000F1270133463A462630FFF7E4F924B1D3\n:106DB000002140F61910AFF3008000F037F882464A\n:106DC00095F8230038B1002CC3D0002140F61F10E5\n:106DD000AFF30080BDE785F82D60012085F8230022\n:106DE000504600F02EF8002C04D0002140F62C1064\n:106DF000AFF30080BDE8F08730B504465F480D462C\n:106E000090F82D005D49803901EB801010F81400D6\n:106E100000B9FFDF5D4800EB0410C57330BD574972\n:106E200081F82D00012081F82300704710B55848E3\n:106E300008B1AFF30080EFF3108000F0010072B6EC\n:106E400010BD10B5002804D1524808B1AFF300803E\n:106E500062B610BD50480068C005C00D10D0103893\n:106E600040B2002804DB00F1E02090F8000405E0C7\n:106E700000F00F0000F1E02090F8140D4009704779\n:106E80000820704710B53D4C94F82400002804D128\n:106E9000F4F712FF012084F8240010BD10B5374C20\n:106EA00094F82400002804D0F4F72FFF002084F881\n:106EB000240010BD10B51C685B68241A181A24F051\n:106EC0007F4420F07F40A14206D8B4F5800F03D262\n:106ED000904201D8012010BD002010BDD0E9003241\n:106EE000D21A21F07F43114421F07F41C0E90031E3\n:106EF00070472DE9FC418446204815468038089C9F\n:106F000000EB85160F4616F81400012804D002285D\n:106F100002D00020BDE8FC810B46204A01216046DA\n:106F2000FFF7C8FFF0B101AB6A4629463846FFF7C4\n:106F3000A6F9B8B19DF804209DF800102846FFF787\n:106F400022FA06EB440148709DF8000020280DD07D\n:106F500006EB400044702A4621460320FEF784FDDC\n:106F60000120D7E72A4621460420F7E703480121FC\n:106F700000EB850000F8254FC170ECE7040B002002\n:106F8000FF1FA107980000200000000084080020D7\n:106F9000000000000000000004ED00E0FFFF3F00E3\n:106FA0002DE9F041044680074FF000054FF001063F\n:106FB0000CD56B480560066000F0E8F920B169481F\n:106FC000016841F48061016024F00204E0044FF0A4\n:106FD000FF3705D564484660C0F8087324F4805430\n:106FE000600003D56148056024F08044E0050FD5BA\n:106FF0005F48C0F80052C0F808735E490D60091D73\n:107000000D605C4A04210C321160066124F4807426\n:10701000A00409D558484660C0F80052C0F808736B\n:107020005648056024F40054C4F38030C4F3C031E2\n:10703000884200D0FFDF14F4404F14D0504846601F\n:10704000C0F808734F488660C0F80052C0F8087353\n:107050004D490D600A1D16608660C0F808730D600A\n:10706000166024F4404420050AD5484846608660EE\n:10707000C0F80873C0F848734548056024F40064FC\n:107080000DF070FD4348044200D0FFDFBDE8F08101\n:10709000F0B50022202501234FEA020420FA02F174\n:1070A000C9072DD051B2002910DB00BF4FEA51179C\n:1070B0004FEA870701F01F0607F1E02703FA06F6FB\n:1070C000C7F88061BFF34F8FBFF36F8F0CDB00BF3A\n:1070D0004FEA51174FEA870701F01F0607F1E02733\n:1070E00003FA06F6C7F8806204DB01F1E02181F8BB\n:1070F000004405E001F00F0101F1E02181F8144D99\n:1071000002F10102AA42C9D3F0BD10B5224C2060A1\n:107110000846F4F7EAFE2068FFF742FF2068FFF711\n:10712000B7FF0DF045F900F092F90DF01BFD0DF0E1\n:1071300058FCEBF7B5FEBDE810400DF0EDB910B509\n:10714000154C2068FFF72CFF2068FFF7A1FF0DF01A\n:1071500009FDF4F7C9FF0020206010BD0A20704728\n:10716000FC1F00403C17004000C0004004E5014007\n:10717000008000400485004000D0004004D500405D\n:1071800000E0004000F0004000F5004000B000408A\n:1071900008B50040FEFF0FFD9C00002070B5264999\n:1071A0000A680AB30022154601244B685B1C4B6039\n:1071B0000C2B00D34D600E7904FA06F30E681E42C4\n:1071C0000FD0EFF3108212F0010272B600D001224C\n:1071D0000C689C430C6002B962B6496801600020EB\n:1071E00070BD521C0C2AE0D3052070BD4FF0E02189\n:1071F0004FF48000C1F800027047EFF3108111F0E6\n:10720000010F72B64FF0010202FA00F20A48036859\n:1072100042EA0302026000D162B6E7E706480021B5\n:1072200001604160704701218140034800680840C7\n:1072300000D0012070470000A0000020012081073D\n:10724000086070470121880741600021C0F80011E3\n:1072500018480170704717490120087070474FF0B7\n:107260008040D0F80001012803D01248007800289F\n:1072700000D00120704710480068C00700D00120EE\n:1072800070470D480C300068C00700D001207047DF\n:107290000948143000687047074910310A68D20362\n:1072A00006D5096801F00301814201D10120704730\n:1072B00000207047A8000020080400404FF08050D4\n:1072C000D0F830010A2801D0002070470120704713\n:1072D00000B5FFF7F3FF20B14FF08050D0F8340134\n:1072E00008B1002000BD012000BD4FF08050D0F853\n:1072F00030010E2801D000207047012070474FF068\n:107300008050D0F83001062803D0401C01D0002066\n:107310007047012070474FF08050D0F830010D28A1\n:1073200001D000207047012070474FF08050D0F806\n:107330003001082801D000207047012070474FF02D\n:107340008050D0F83001102801D000207047012073\n:10735000704700B5FFF7F3FF30B9FFF7DCFF18B94E\n:10736000FFF7E3FF002800D0012000BD00B5FFF7C4\n:10737000C6FF38B14FF08050D0F83401062803D34F\n:10738000401C01D0002000BD012000BD00B5FFF76A\n:10739000B6FF48B14FF08050D0F83401062803D32F\n:1073A000401C01D0012000BD002000BD0021017063\n:1073B000084670470146002008707047EFF31081BF\n:1073C00001F0010172B60278012A01D0012200E029\n:1073D00000220123037001B962B60AB10020704790\n:1073E0004FF400507047E9E7EFF3108111F0010FFF\n:1073F00072B64FF00002027000D162B600207047F2\n:10740000F2E700002DE9F04115460E46044600273C\n:1074100000F0EBF8A84215D3002341200FE000BF95\n:1074200094F84220A25CF25494F84210491CB1FB3B\n:10743000F0F200FB12115B1C84F84210DBB2AB428D\n:10744000EED3012700F0DDF83846BDE8F08172493F\n:1074500010B5802081F800047049002081F84200B6\n:1074600081F84100433181F8420081F84100433105\n:1074700081F8420081F841006948FFF797FF6848AA\n:10748000401CFFF793FFEBF793FCBDE8104000F0C2\n:10749000B8B840207047614800F0A7B80A460146D6\n:1074A0005E48AFE7402070475C48433000F09DB82D\n:1074B0000A46014659484330A4E7402101700020A4\n:1074C000704710B504465548863000F08EF820709D\n:1074D000002010BD0A460146504810B58630FFF71F\n:1074E00091FF08B1002010BD42F2070010BD70B539\n:1074F0000C460646412900D9FFDF4A48006810388B\n:1075000040B200F054F8C5B20D2000F050F8C0B2FF\n:10751000854201D3012504E0002502E00DB1EBF71F\n:107520008AFC224631463D48FFF76CFF0028F5D023\n:1075300070BD2DE9F0413A4F0025064617F10407CA\n:1075400057F82540204600F041F810B36D1CEDB20D\n:10755000032DF5D33148433000F038F8002825D00A\n:107560002E4800F033F8002820D02C48863000F058\n:107570002DF800281AD0EBF734FC2948FFF71EFF3E\n:10758000B0F5005F00D0FFDFBDE8F0412448FFF711\n:107590002BBF94F841004121265414F8410F401CA0\n:1075A000B0FBF1F201FB12002070D3E74DE7002899\n:1075B00004DB00F1E02090F8000405E000F00F008B\n:1075C00000F1E02090F8140D4009704710F8411FB9\n:1075D0004122491CB1FBF2F302FB131140788142B6\n:1075E00001D1012070470020704710F8411F4078FA\n:1075F000814201D3081A02E0C0F141000844C0B240\n:10760000704710B50648FFF7D9FE002803D1BDE842\n:107610001040EBF7D1BB10BD0DE000E0340B0020B3\n:10762000AC00002004ED00E070B5154D2878401C3A\n:10763000C4B26878844202D000F0DBFA2C7070BDCE\n:107640002DE9F0410E4C4FF0E02600BF00F0C6FAE5\n:107650000EF09AFB40BF20BF677820786070D6F8A4\n:107660000052E9F798FE854305D1D6F8040210B917\n:107670002078B842EAD000F0ACFA0020BDE8F081F2\n:10768000BC0000202DE9F04101264FF0E02231033B\n:107690004FF000084046C2F88011BFF34F8FBFF390\n:1076A0006F8F204CC4F800010C2000F02EF81E4D06\n:1076B0002868C04340F30017286840F01000286095\n:1076C000C4F8046326607F1C02E000BF0EF05CFB80\n:1076D000D4F800010028F9D01FB9286820F0100064\n:1076E0002860124805686660C4F80863C4F8008121\n:1076F0000C2000F00AF82846BDE8F08110B50446D9\n:10770000FFF7C0FF2060002010BD002809DB00F05B\n:107710001F02012191404009800000F1E020C0F8E3\n:107720008012704700C0004010ED00E008C5004026\n:107730002DE9F047FF4C0646FF21A06800EB06123A\n:1077400011702178FF2910D04FF0080909EB0111C1\n:1077500009EB06174158C05900F0F4F9002807DD7D\n:10776000A168207801EB061108702670BDE8F0874B\n:1077700094F8008045460DE0A06809EB05114158DA\n:10778000C05900F0DFF9002806DCA068A84600EB2D\n:1077900008100578FF2DEFD1A06800EB061100EB73\n:1077A00008100D700670E1E7F0B5E24B04460020CA\n:1077B00001259A680C269B780CE000BF05EB0017AA\n:1077C000D75DA74204D106EB0017D7598F4204D0EA\n:1077D000401CC0B28342F1D8FF20F0BD70B5FFF766\n:1077E000ECF9D44C08252278A16805EB02128958DF\n:1077F00000F0A8F9012808DD2178A06805EB011147\n:107800004058BDE87040FFF7CFB9FFF7A1F8BDE8D9\n:107810007040EBF779BB2DE9F041C64C2578FFF7B6\n:10782000CCF9FF2D6ED04FF00808A26808EB0516C2\n:10783000915900F087F90228A06801DD80595DE0C8\n:1078400000EB051109782170022101EB0511425C62\n:107850005AB1521E4254815901F5800121F07F41F5\n:1078600081512846FFF764FF34E00423012203EB33\n:10787000051302EB051250F803C0875CBCF1000F42\n:1078800010D0BCF5007F10D9CCF3080250F806C028\n:107890000CEB423C2CF07F4C40F806C0C3589A1ABF\n:1078A000520A09E0FF2181540AE0825902EB4C326E\n:1078B00022F07F428251002242542846FFF738FFCF\n:1078C0000C21A06801EB05114158E06850F8272011\n:1078D000384690472078FF2814D0FFF76EF92278B9\n:1078E000A16808EB02124546895800F02BF90128DF\n:1078F00093DD2178A06805EB01114058BDE8F04107\n:10790000FFF752B9BDE8F081F0B51D4614460E46AA\n:107910000746FF2B00D3FFDFA00700D0FFDF85481D\n:10792000FF210022C0E90247C57006710170427054\n:1079300082701046012204E002EB0013401CE15467\n:10794000C0B2A842F8D3F0BD70B57A4C064665784F\n:107950002079854200D3FFDFE06840F82560607839\n:10796000401C6070284670BD2DE9FF5F1D468B46A8\n:107970000746FF24FFF721F9DFF8B891064699F88A\n:107980000100B84200D8FFDF00214FF001084FF09E\n:107990000C0A99F80220D9F808000EE008EB011350\n:1079A000C35CFF2B0ED0BB4205D10AEB011350F88C\n:1079B00003C0DC450CD0491CC9B28A42EED8FF2C6A\n:1079C00002D00DE00C46F6E799F803108A4203D185\n:1079D000FF2004B0BDE8F09F1446521C89F8022035\n:1079E00008EB04110AEB0412475440F802B00421DA\n:1079F000029B0022012B01EB04110CD040F8012066\n:107A00004FF4007808234FF0020C454513D9E905DF\n:107A1000C90D02D002E04550F2E7414606EB413283\n:107A200003EB041322F07F42C250691A0CEB0412DC\n:107A3000490A81540BE005B9012506EB453103EBFA\n:107A4000041321F07F41C1500CEB0411425499F80A\n:107A500000502046FFF76CFE99F80000A84201D0C4\n:107A6000FFF7BCFE3846B4E770B50C460546FFF795\n:107A7000A4F8064621462846FFF796FE0446FF284E\n:107A80001AD02C4D082101EB0411A868415830464A\n:107A900000F058F800F58050C11700EBD1404013BA\n:107AA0000221AA6801EB0411515C09B100EB4120ED\n:107AB000002800DC012070BD002070BD2DE9F047DA\n:107AC00088468146FFF770FE0746FF281BD0194DF8\n:107AD0002E78A8683146344605E0BC4206D02646DA\n:107AE00000EB06121478FF2CF7D10CE0FF2C0AD023\n:107AF000A6420CD100EB011000782870FF2804D0BA\n:107B0000FFF76CFE03E0002030E6FFF753F8414634\n:107B10004846FFF7A9FF0123A968024603EB0413B7\n:107B2000FF20C854A878401EB84200D1A87001EBCD\n:107B3000041001E0000C002001EB06110078087031\n:107B4000104613E6081A0002C11700EB116000127C\n:107B50007047000010B5202000F07FF8202000F0D2\n:107B60008DF84D49202081F80004E9F712FC4B49BB\n:107B700008604B48D0F8041341F00101C0F8041329\n:107B8000D0F8041341F08071C0F804134249012079\n:107B90001C39C1F8000110BD10B5202000F05DF8BF\n:107BA0003E480021C8380160001D01603D4A481E62\n:107BB00010603B4AC2F80803384B1960C2F8000154\n:107BC000C2F8600138490860BDE81040202000F08C\n:107BD00055B834493548091F086070473149334862\n:107BE000086070472D48C8380160001D521E0260B1\n:107BF00070472C4901200860BFF34F8F70472DE973\n:107C0000F0412849D0F8188028480860244CD4F85E\n:107C100000010025244E6F1E28B14046E9F712FBF3\n:107C200040B9002111E0D4F8600198B14046E9F76D\n:107C300009FB48B1C4F80051C4F860513760BDE891\n:107C4000F041202000F01AB831684046BDE8F0410C\n:107C50000EF0A4B8FFDFBDE8F08100280DDB00F0D6\n:107C60001F02012191404009800000F1E020C0F88E\n:107C70008011BFF34F8FBFF36F8F7047002809DB70\n:107C800000F01F02012191404009800000F1E02036\n:107C9000C0F880127047000020E000E0C8060240F3\n:107CA00000000240180502400004024001000001EB\n:107CB0005E4800210170417010218170704770B5DD\n:107CC000054616460C460220EAF714FE57490120E5\n:107CD00008705749F01E086056480560001F046090\n:107CE00070BD10B50220EAF705FE5049012008706A\n:107CF00051480021C0F80011C0F80411C0F8081163\n:107D00004E494FF40000086010BD48480178D9B1D1\n:107D10004B4A4FF4000111604749D1F8003100226D\n:107D2000002B1CBFD1F80431002B02D0D1F8081170\n:107D300019B142704FF0100104E04FF001014170A1\n:107D400040490968817002704FF00000EAF7D2BD27\n:107D500010B50220EAF7CEFD34480122002102705E\n:107D60003548C0F80011C0F80411C0F808110260CD\n:107D700010BD2E480178002904BF407870472E4876\n:107D8000D0F80011002904BF02207047D0F800117C\n:107D900000291CBFD0F80411002905D0D0F8080133\n:107DA000002804BF01207047002070471F4800B51D\n:107DB0000278214B4078C821491EC9B282B1D3F85C\n:107DC00000C1BCF1000F10D0D3F8000100281CBF87\n:107DD000D3F8040100280BD0D3F8080150B107E014\n:107DE000022802D0012805D002E00029E4D1FFDFFB\n:107DF000002000BD012000BD0C480178002904BF0F\n:107E0000807870470C48D0F8001100291CBFD0F8CA\n:107E10000411002902D0D0F8080110B14FF0100071\n:107E2000704708480068C0B270470000BE000020DC\n:107E300010F5004008F5004000F0004004F5014056\n:107E400008F5014000F400405748002101704170DE\n:107E5000704770B5064614460D460120EAF74AFD04\n:107E600052480660001D0460001D05605049002056\n:107E7000C1F850014F490320086050494E4808603E\n:107E8000091D4F48086070BD2DE9F0410546464880\n:107E90000C46012606704B4945EA024040F08070CE\n:107EA0000860FFF72CFA002804BF47480460002749\n:107EB000464CC4F80471474945480860002D02BF8C\n:107EC000C4F800622660BDE8F081012D18BFFFDF15\n:107ED000C4F80072266041493F480860BDE8F0815F\n:107EE0003148017871B13B4A394911603749D1F8BD\n:107EF00004210021002A08BF417002D0384A1268CC\n:107F0000427001700020EAF7F5BC2748017800298B\n:107F100004BF407870472D48D0F80401002808BFFE\n:107F200070472F480068C0B27047002808BF7047EC\n:107F30002DE9F0471C480078002808BFFFDF234CDC\n:107F4000D4F80401002818BFBDE8F0874FF00209FB\n:107F5000C4F80493234F3868C0F30018386840F021\n:107F600010003860D4F80401002804BF4FF4004525\n:107F70004FF0E02608D100BFC6F880520DF004FF94\n:107F8000D4F804010028F7D0B8F1000F03D1386805\n:107F900020F010003860C4F80893BDE8F0870B4962\n:107FA0000120886070470000C100002008F50040F3\n:107FB000001000401CF500405011004098F50140B1\n:107FC0000CF0004004F5004018F5004000F00040BF\n:107FD0000000020308F501400000020204F5014020\n:107FE00000F4004010ED00E0012804BF41F6A47049\n:107FF0007047022804BF41F288307047042804BF4C\n:1080000046F218007047082804BF47F2A0307047B6\n:1080100000B5FFDF41F6A47000BD10B5FE48002496\n:1080200001214470047044728472C17280F825404A\n:10803000C462846380F83C4080F83D40FF2180F8B2\n:108040003E105F2180F83F1018300DF09FFFF3497C\n:10805000601E0860091D0860091D0C60091D08608C\n:10806000091D0C60091D0860091D0860091D0860D4\n:10807000091D0860091D0860091D0860091D0860C8\n:10808000091D0860091D086010BDE549486070477A\n:10809000E448016801F00F01032904BF0120704783\n:1080A000016801F00F01042904BF02207047016834\n:1080B00001F00F01052904D0006800F00F00062828\n:1080C00007D1D948006810F0060F0CBF0820042023\n:1080D000704700B5FFDF012000BD012812BF022854\n:1080E00000207047042812BF08284FF4C87070475A\n:1080F00000B5FFDF002000BD012804BF2820704725\n:10810000022804BF18207047042812BF08284FF423\n:10811000A870704700B5FFDF282000BD70B5C148CA\n:10812000016801F00F01032908BF012414D0016880\n:1081300001F00F01042904BF022418210DD00168A9\n:1081400001F00F0105294BD0006800F00F00062850\n:108150001CBFFFDF012443D02821AF48C26A806AD8\n:10816000101A0E18082C04BF4EF6981547F2A030CE\n:108170002DD02046042C08BF4EF628350BD0012800\n:1081800008BF41F6A47506D0022C1ABFFFDF41F6E6\n:10819000A47541F28835012C08BF41F6A47016D0B1\n:1081A000022C08BF002005D0042C1ABFFFDF0020DE\n:1081B0004FF4C8702D1A022C08BF41F2883006D047\n:1081C000042C1ABFFFDF41F6A47046F21800281AEB\n:1081D0004FF47A7100F2E730B0FBF1F0304470BD3B\n:1081E0009148006810F0060F0CBF082404244FF4D7\n:1081F000A871B2E710B58D49026801F118040A634D\n:1082000042684A63007A81F83800207E48B1207FB6\n:10821000F6F781F9A07E011C18BF0121207FF6F737\n:1082200069F9607E002808BF10BD607FF6F773F91A\n:10823000E07E011C18BF0121607FBDE81040F6F709\n:1082400059B930B50024054601290AD0022908BFD2\n:108250004FF0807405D0042916BF08294FF0C74499\n:10826000FFDF44F4847040F480107149086045F4E5\n:10827000403001F1040140F00070086030BD30B5BD\n:108280000024054601290AD0022908BF4FF0807456\n:1082900005D0042916BF08294FF0C744FFDF44F476\n:1082A000847040F480106249086045F4403001F168\n:1082B000040140F0007008605E48D0F8000100281A\n:1082C00018BFFFDF30BD2DE9F04102274FF0E02855\n:1082D00001250024C8F88071BFF34F8FBFF36F8F63\n:1082E000554804600560FFF751F8544E18B13068E6\n:1082F00040F480603060FFF702F838B1306820F059\n:10830000690040F0960040F0004030604D494C4814\n:1083100008604FF01020806CB0F1FF3F04D04A4954\n:108320000A6860F317420A60484940F25B600860DF\n:10833000091F40F203100860081F05603949032037\n:10834000086043480560444A42491160444A434931\n:108350001160121F43491160016821F440710160EE\n:10836000016841F480710160C8F8807231491020C1\n:10837000C1F80403284880F83140C46228484068A6\n:10838000002808BFBDE8F081BDE8F0410047274A5A\n:108390000368C2F81A308088D08302F11800017295\n:1083A00070471D4B10B51A7A8A4208D10146062241\n:1083B000981CF6F715F8002804BF012010BD002016\n:1083C00010BD154890F825007047134A5170107081\n:1083D0007047F0B50546800000F1804000F5805000\n:1083E0008B88C0F820360B78D1F8011043EA0121C0\n:1083F000C0F8001605F10800012707FA00F61A4C2C\n:10840000002A04BF2068B04304D0012A18BFFFDF50\n:1084100020683043206029E0280C0020000E004036\n:10842000C40000201015004014140040100C00205F\n:108430001415004000100040FC1F00403C17004095\n:108440002C000089781700408C150040381500403A\n:108450005016004000000E0408F501404080004026\n:10846000A4F501401011004040160040206807FAB2\n:1084700005F108432060F0BD0CF0C4BCFE4890F844\n:1084800032007047FD4AC17811600068FC49000263\n:1084900008607047252808BF02210ED0262808BF93\n:1084A0001A210AD0272808BF502106D00A2894BFD5\n:1084B0000422062202EB4001C9B2F24A1160F249DD\n:1084C000086070472DE9F047EB4CA17A012956D09E\n:1084D000022918BFBDE8F087627E002A08BFBDE808\n:1084E000F087012950D0E17E667F0D1C18BF012561\n:1084F0005FF02401DFF894934FF00108C9F84C8035\n:10850000DFF88CA34718DAF80000B84228BFFFDF75\n:108510000020C9F84C01CAF80070300285F0010152\n:1085200040EA015040F0031194F82000820002F16B\n:10853000804202F5C042C2F81015D64901EB800115\n:10854000A07FC20002F1804202F5F832C2F8141591\n:10855000D14BC2F81035E27FD30003F1804303F51D\n:10856000F833C3F81415CD49C3F8101508FA00F014\n:1085700008FA02F10843CA490860BDE8F087227E84\n:10858000002AAED1BDE8F087A17E267F002914BF66\n:10859000012500251121ADE72DE9F041C14E8046AE\n:1085A00003200D46C6F80002BD49BF4808602846B2\n:1085B0000CF02CFCB04F0124B8F1000F04BFBC72CA\n:1085C000346026D0B8F1010F23D1B848006860B9F3\n:1085D00015F00C0F09D0C6F80443012000F0DAFEB4\n:1085E000F463346487F83C4002E0002000F0D2FEDF\n:1085F00028460CF0F3FC0220B872FEF7B7FE38B93B\n:10860000FEF7C4FE20B9AA48016841F4C021016008\n:1086100074609E48C4649E4800682946BDE8F041E5\n:1086200050E72DE9F0479F4E814603200D46C6F8DE\n:108630000002DFF86C829C48C8F8000008460CF085\n:10864000E5FB28460CF0CAFC01248B4FB9F1000F62\n:1086500003D0B9F1010F0AD031E0BC72B86B40F41D\n:108660008010B8634FF48010C8F8000027E00220A3\n:10867000B872B86B40F40010B8634FF40010C8F83B\n:1086800000008A48006860B915F00C0F09D0C6F8E0\n:108690000443012000F07EFEF463346487F83C401C\n:1086A00002E0002000F076FEFEF760FE38B9FEF72B\n:1086B0006DFE20B97E48016841F4C0210160EAF7EF\n:1086C000F7FA2946BDE8F047FCE62DE9F84F754C6E\n:1086D0008246032088461746C4F80002DFF8C0919E\n:1086E0007148C9F8000010460CF090FBDFF8C4B1E7\n:1086F000614E0125BAF1000F04BFCBF80040B572FE\n:1087000004D0BAF1010F18BFFFDF2FD06A48C0F8BC\n:1087100000806B4969480860B06B40F40020B0638A\n:10872000D4F800321021C4F808130020C4F8000265\n:10873000DFF890C18A03CCF80020C4F80001C4F827\n:108740000C01C4F81001C4F80401C4F81401C4F801\n:1087500018015D4800680090C4F80032C9F8002094\n:10876000C4F80413BAF1010F14D026E038460CF017\n:1087700035FCFEF7FBFD38B9FEF708FE20B94C4882\n:10878000016841F4C02101605048CBF8000002208C\n:10879000B072BBE74548006860B917F00C0F09D00C\n:1087A000C4F80453012000F0F5FDE563256486F864\n:1087B0003C5002E0002000F0EDFD4FF40020C9F82D\n:1087C00000003248C56432480068404528BFFFDFDA\n:1087D00039464046BDE8F84F74E62DE9F041264C95\n:1087E0000646002594F8310017468846002808BF41\n:1087F000FFDF16B1012E16D021E094F831000128D8\n:1088000008D094F83020394640460CF014FBE16A59\n:10881000451814E094F830103A4640460CF049FBF5\n:10882000E16A45180BE094F8310094F83010012803\n:108830003A46404609D00CF064FBE16A45183A46D6\n:1088400029463046BDE8F0413FE70CF014FBE16AF1\n:108850004518F4E72DE9F84F124CD4F8000220F047\n:108860000309D4F804034FF0100AC0F30018C4F849\n:1088700008A300262CE00000280C0020241500404E\n:108880001C150040081500405415004000800040B1\n:108890004C850040006000404C81004010110040B9\n:1088A00004F5014000100040000004048817004057\n:1088B00068150040ACF50140488500404881004003\n:1088C000A8F5014008F501401811004004100040CF\n:1088D000C4F80062FC48FB490160FC4D0127A97AFD\n:1088E000012902D0022903D015E0297E11B912E036\n:1088F000697E81B1A97FEA7F07FA01F107FA02F2E6\n:108900001143016095F82000800000F1804000F5DF\n:10891000C040C0F81065FF208DF80000C4F8106159\n:10892000276104E09DF80000401E8DF800009DF8CE\n:10893000000018B1D4F810010028F3D09DF8000011\n:10894000002808BFFFDFC4F81061002000F022FDFE\n:108950006E72AE72EF72C4F80092B8F1000F18BFD9\n:10896000C4F804A3BDE8F88FFF2008B58DF8000017\n:10897000D7480021C0F810110121016105E000BFB6\n:108980009DF80010491E8DF800109DF8001019B1D7\n:10899000D0F810110029F3D09DF80000002808BF7E\n:1089A000FFDF08BD0068CB4920F07F4008607047BA\n:1089B0004FF0E0200221C0F8801100F5C070BFF335\n:1089C0004F8FBFF36F8FC0F80011704710B490E85D\n:1089D0001C10C14981E81C10D0E90420C1E9042021\n:1089E00010BC70474FF0E0210220C1F80001704731\n:1089F000BA4908707047BA490860704770B50546B3\n:108A0000EAF756F9B14C2844E16A884298BFFFDF83\n:108A100001202074EAF74CF9B24A28440021606131\n:108A2000C2F84411B0490860A06BB04940F480001E\n:108A3000A063D001086070BD70B5A44C0546AC4A77\n:108A40000220207410680E4600F00F00032808BFB3\n:108A5000012213D0106800F00F00042808BF022282\n:108A60000CD0106800F00F0005281BD0106800F033\n:108A70000F0006281CBFFFDF012213D094F831003D\n:108A800094F83010012815D028460CF081FA954949\n:108A900060610020C1F844016169E06A08449249BC\n:108AA000086070BD9348006810F0060F0CBF0822E4\n:108AB0000422E3E7334628460CF038FAE7E7824918\n:108AC0004FF4800008608148816B21F4800181634C\n:108AD000002101747047C20002F1804202F5F832B1\n:108AE000854BC2F81035C2F81415012181407F482A\n:108AF00001607648826B1143816370477948012198\n:108B00004160C1600021C0F84411774801606F489E\n:108B1000C1627047794908606D48D0F8001241F091\n:108B20004001C0F8001270476948D0F8001221F0E7\n:108B30004001C0F800127149002008607047644885\n:108B4000D0F8001221F01001C0F80012012181615B\n:108B500070475E49FF2081F83E005D480021C0F863\n:108B60001C11D0F8001241F01001C0F8001270473B\n:108B7000574981B0D1F81C21012A0DD0534991F8F1\n:108B80003E10FF290DBF00204942017001B008BF0F\n:108B90007047012001B07047594A126802F07F0205\n:108BA000524202700020C1F81C0156480068009033\n:108BB000EFE7F0B517460C00064608BFFFDF434D50\n:108BC00014F0010F2F731CBF012CFFDF002E0CBF10\n:108BD000012002206872EC7201281CBF0228FFDF0E\n:108BE000F0BD3A4981F83F007047384A136C036082\n:108BF000506C086070472DE9F84F38480078042819\n:108C000028BFFFDF314CDFF8C080314D94F83C00C5\n:108C100000260127E0B1D5F8040110F1000918BFC2\n:108C20004FF00109D5F81001002818BF012050EAC3\n:108C300009014FF4002B17D08021C5F80813C8F89C\n:108C400000B084F83C6090F0010F18BFBDE8F88FC9\n:108C5000DFF89090D9F84C01002871D0A07A012853\n:108C60006FD002286ED0D1E0D5F80001DFF890A0D7\n:108C700030B3C5F800616F61FF20009002E0401E34\n:108C8000009005D0D5F81C0100280098F7D000B955\n:108C9000FFDFDAF8000000F07F0A94F83F0050454B\n:108CA0003CBF002000F076FB84F83EA0C5F81C61B4\n:108CB000C5F808731348006800902F64AF6326E07E\n:108CC00022E0000000000E0408F50140280C0020FE\n:108CD000001000403C150040100C0020C400002093\n:108CE00004150040008000404485004004F5014028\n:108CF000101500401414004004110040601500409D\n:108D0000481500401C110040B9F1000F03D0B9F123\n:108D1000000F2ED05CE0DAF8000000F07F0084F84D\n:108D20003E00C5F81C6194F83D1061B194F83F1005\n:108D300081421BD2002000F02DFB2F64AF6315E0B1\n:108D400064E04CE04EE0FE49096894F83F308AB296\n:108D5000090C984203D30F2A06D9022904D2012014\n:108D600000F018FB2F6401E02F64AF63F548006842\n:108D700000908022C5F80423F3498F64F348036808\n:108D8000A0F1040CDCF800C043F698273B4463458F\n:108D900015D2026842F210731A440260C1F84861A9\n:108DA000EC49EB480860091FEB480860EB48C0F845\n:108DB00000B0A06B40F40020A063BDE8F88F06600F\n:108DC000C1F84861C5F80823C8F800B0C1F8486187\n:108DD0008020C5F80803C8F800B0BDE8F88F207EF1\n:108DE00010B913E0607E88B1A07FE17F07FA00F040\n:108DF00007FA01F10843C8F8000094F82000800049\n:108E000000F1804000F5C040C0F81065C9F84C7012\n:108E1000D34800682064D34800686064D248A16BDE\n:108E20000160A663217C002019B1D9F84411012901\n:108E300000D00021A27A012A6ED0022A74D000BF8D\n:108E4000D5F8101101290CBF1021002141EA0008BA\n:108E5000C648016811F0FF0F03D0D5F8141101299D\n:108E600000D0002184F83210006810F0FF0F03D00A\n:108E7000D5F81801012800D0002084F83300BC4840\n:108E8000006884F83400FEF774FF012818BF002042\n:108E900084F83500C5F80061C5F80C61C5F81061AB\n:108EA000C5F80461C5F81461C5F81861B1480068D7\n:108EB0000090A548C0F84461AF480068DFF8BC9254\n:108EC0000090D9F80000A062A9F104000068E062F7\n:108ED000AB48016801F00F01032908BF012013D03E\n:108EE000016801F00F01042908BF02200CD00168BD\n:108EF00001F00F01052926D0006800F00F000628B8\n:108F00001CBFFFDF01201ED084F83000A07A84F857\n:108F1000310002282CD11EE0D5F80C01012814BF25\n:108F2000002008208CE7FFE7D5F80C01012814BFCA\n:108F300000200220934A1268012A14BF0422002252\n:108F4000104308437CE79048006810F0060F0CBF00\n:108F500008200420D8E7607850B18C490968097866\n:108F60000840217831EA000008BF84F8247001D05D\n:108F700084F82460DFF818A218F0020F06D0E9F791\n:108F800097FEA16A081ADAF81010884718F0010F46\n:108F900018BF4FF0000B0DD0E9F78AFEE16ADAF84E\n:108FA0001420081A594690477A48007810F0010FAB\n:108FB0002FD10CE018F0020F18BF4FF0010BEBD1CE\n:108FC00018F0080F18BF4FF0020BE5D1ECE7DFF8FF\n:108FD000BCB1DBF80000007800F00F00072828BFC4\n:108FE00084F8256015D2DBF80000062200F10901A3\n:108FF000A01CF5F7F5F940B9207ADBF800100978E4\n:10900000B0EBD11F08BF012001D04FF0000084F861\n:109010002500E17A4FF0000011F0020F1CBF18F09C\n:10902000020F18F0040F19D111F0100F1CBF94F8A3\n:109030003320002A02D094F835207AB111F0080FBD\n:109040001CBF94F82420002A08D111F0040F02D08C\n:1090500094F8251011B118F0010F01D04FF0010064\n:10906000617A19B168B1FFF7F5FB10E03E484A4953\n:109070000160D5F8000220F00300C5F80002E77295\n:1090800005E001290AD0022918BFFFDF0DD018F032\n:10909000010F14D0DAF80000804745E06672E772ED\n:1090A000A7729621227B002006E06672E7720220FA\n:1090B000A072227B96210120FFF78FFBE7E718F0D3\n:1090C000020F2AD018F0040F21D1FEF74FF9F0B9A2\n:1090D000FEF75CF9D8B931480168001F0068C0F399\n:1090E000006CC0F3425500F00F03C0F30312C0F34D\n:1090F0000320BCF1000F0AD0002B1CBF002A00285F\n:1091000005D1002918BF032D38BF48F0040827EA0D\n:109110009800DAF80410884706E018F0080F18BF26\n:10912000DAF8080056D08047A07A022818BFBDE8B8\n:10913000F88F207C002808BFBDE8F88F02492FE097\n:10914000741500401C11004000800040488500401C\n:1091500014100040ACF501404881004004F5014086\n:1091600004B500404C85004008F501404016004021\n:109170001014004018110040448100404485004014\n:109180001015004000140040141400400415004065\n:10919000100C0020C40000200000040454140040FF\n:1091A000C1F8446102281DD0012818BFFFDFE16A21\n:1091B0006069884298BFFFDFD4F81400C9F8000046\n:1091C000A06B4FF4800140F48000A06382480160EE\n:1091D000BDE8F88F18F0100F14BFDAF80C00FFDFAD\n:1091E000A1D1A1E76169E06A0844E7E738B57B49A6\n:1091F00004460220887201212046FFF763F9784A6D\n:1092000004F13D001060774B0020C3F8440176491B\n:10921000C1F80001C1F80C01C1F81001C1F8040146\n:10922000C1F81401C1F818017048006800900120CD\n:109230009864101D00681168884228BFFFDF38BDA0\n:109240002DE9F843654A88460024917A0125684F44\n:10925000012902D0022903D015E0117E11B912E0D4\n:10926000517E81B1917FD37F05FA01F105FA03F3B5\n:109270001943396092F82010890001F1804101F50D\n:10928000C041C1F8104506460220907201213046C7\n:10929000FFF718F9524906F13D000860514AC2F83B\n:1092A00044415148C0F80041C0F80C41C0F8104199\n:1092B000C0F80441C0F81441C0F818414B48006898\n:1092C00000909564081D00680968884228BFFFDF88\n:1092D000B8F1000F1CBF4FF400303860BDE8F883D0\n:1092E000022810B50DD0012804BF42F6CE3010BDC3\n:1092F000042817BF082843F6A440FFDF41F66A00A0\n:1093000010BDFDF7E5FF30B9FDF7F9FF002808BFF4\n:1093100041F6583001D041F2643041F29A010844DC\n:1093200010BD314910B50020C1F800023049314864\n:109330000860324930480860091D31480860091D3D\n:1093400030480860091D30480860091D2F48086032\n:10935000091D2F48086001200BF058FD1E494FF4ED\n:109360003810086010BD22494FF43810086070476B\n:109370002848016803291BBF00680228012000203B\n:109380007047244801680B291BBF00680A28012088\n:109390000020704720490968C9B9204A204913684C\n:1093A00070B123F0820343F07D0343F00043136068\n:1093B0000A6822F0100242F0600242F0004205E02A\n:1093C00023F0004313600A6822F000420A60034958\n:1093D00081F83D007047000004F50140280C002092\n:1093E00044850040008000400010004018110040FB\n:1093F00008F50140000004041011004098F50140F8\n:109400000410004044810040141000401C11004032\n:109410001010004050150040881700403C170040D5\n:109420007C17004010B5404822220021F5F72FF8A4\n:109430003D480024017821F010010170012104F061\n:10944000FFFE3A494FF6FF7081F822408884384980\n:109450000880488010BD704734498A8C824218BF0A\n:109460007047002081F822004FF6FF708884704713\n:109470002D49016070472E49088070472B498A8C1E\n:10948000A2F57F43FF3B03D00021016008467047EF\n:1094900091F822202549012A1ABF016001200020ED\n:1094A0007047224901F1220091F82220012A04BFCD\n:1094B00000207047012202701D48008888841046F1\n:1094C00070471B49488070471849194B8A8C5B8844\n:1094D0009A4206D191F82220002A1EBF0160012085\n:1094E0007047002070471148114A818C5288914280\n:1094F00009D14FF6FF71818410F8221F19B10021A4\n:10950000017001207047002070470848084A818C8C\n:109510005288914205D190F8220000281CBF0020FB\n:109520007047012070470000960C0020700C00204E\n:10953000CC0000207047584A012340B1012818BFD1\n:1095400070471370086890608888908170475370E6\n:109550000868C2F802008888D08070474E4A10B16F\n:10956000012807D00EE0507860B1D2F80200086000\n:10957000D08804E0107828B19068086090898880CD\n:109580000120704700207047434910B1012803D0E3\n:1095900006E0487810B903E0087808B10120704768\n:1095A0000020704730B58DB00C4605460D220021D5\n:1095B00004A8F4F76CFFE0788DF81F0020798DF88F\n:1095C0001E0060798DF81D00286800906868019081\n:1095D000A8680290E868039068460AF087FF207840\n:1095E0009DF82F1088420CD160789DF82E1088428B\n:1095F00007D1A0789DF82D10884202BF01200DB040\n:1096000030BD00200DB030BD30B50C4605468DB0E4\n:109610004FF0030104F1030012B1FDF749FF01E02F\n:10962000FDF765FF60790D2220F0C00040F040009A\n:109630006071002104A8F4F72AFFE0788DF81F007C\n:1096400020798DF81E0060798DF81D002868009043\n:1096500068680190A8680290E868039068460AF07C\n:1096600045FF9DF82F0020709DF82E0060709DF83A\n:109670002D00A0700DB030BD10B5002904464FF08C\n:10968000060102D0FDF714FF01E0FDF730FF60791D\n:1096900020F0C000607110BDD0000020FE4840687E\n:1096A00070472DE9F0410F46064601461446012059\n:1096B00005F06FF8054696F86500FEF795FC4AF24E\n:1096C000B12108444FF47A71B0FBF1F0718840F297\n:1096D00071225143C0EB4100001BA0F55A7402F007\n:1096E0005AFF002818BF1E3CAF4234BF28463846F8\n:1096F000A04203D2AF422CBF3C462C467462BDE868\n:10970000F0812DE9FF4F8BB0044690F86500884644\n:109710000390DDE90D1008430A90E0480027057822\n:109720000C2D28BFFFDFDE4E36F8159094F88851D7\n:109730000C2D28BFFFDFDA4830F81500484480B20E\n:10974000009094F87D000D280CBF012000200790A8\n:109750000D98002804BF94F82C0103282BD10798FA\n:1097600048B3B4F8AA01404525D1D4F83401C4F86F\n:109770002001608840F2E2414843C4F82401B4F873\n:109780007A01B4F806110844C4F82801204602F012\n:109790000CFFB4F8AE01E08294F8AC016075B4F847\n:1097A000B0016080B4F8B201A080B4F8B401E080E8\n:1097B000022084F82C01D4F884010990D4F88001A7\n:1097C0000690B4F80661B4F87801D4F874110191E8\n:1097D0000D9921B194F8401151B100F0D6B804F5BB\n:1097E000807104917431059104F5B075091D07E08D\n:1097F00004F5AA710491091D059104F5A275091DCE\n:109800000891B4F87010A8EB0000A8EB01010FFA62\n:1098100080F90FFA81FBB9F1000F05DAD4F8700175\n:1098200001900120D9460A909C484FF0000A007927\n:10983000A8B3F2F77FFB90B3B4F8180102282ED337\n:1098400094F82C0102282AD094F8430138BB94F8EC\n:10985000880100900C2828BFFFDF9148009930F85C\n:10986000110000F5C86080B2009094F82C01012826\n:109870007ED0608840F2E2414843009901F0E6F86A\n:10988000D4F8342180B206EB0B01A1EB0901821A56\n:1098900001FB02AAC4F83401012084F8430194F8C2\n:1098A0002C01002865D0012800F01482022800F065\n:1098B0007181032818BFFFDF00F04782A7EB0A0180\n:1098C0000198FCF738F90599012640F271220860E9\n:1098D0000898A0F80080002028702E710598006874\n:1098E000A8606188D4F834015143C0EB41006B4952\n:1098F000A0F54E70C8618969814287BF04990860EC\n:10990000049801600498616A0068084400F5D47006\n:10991000E86002F040FE10B1E8681E30E8606E7149\n:10992000B4F8F000A0EB080000B20028C4BF032088\n:109930006871079800280E9800F06982E0B100BFB6\n:10994000B4F8181100290CBF0020B4F81A01A4F8CB\n:109950001A0194F81C21401C504388420CD26879AB\n:10996000401E002808DD6E71B4F81A01401C01E0A9\n:109970000FE05AE0A4F81A010D98002800F06A825E\n:1099800094F84001002800F061820FB00220BDE889\n:10999000F08F94F8800003283DD03F4894F865107C\n:1099A00090F82C00F7F78DFDE18A40F271225143C7\n:1099B00000EB4100CDF80800D4F82401009901F033\n:1099C00045F8D4F82021D4F82811821A01FB02AA04\n:1099D000C4F820010099029801F038F8D4F8301149\n:1099E000C4F83001411A8A44608840F2E241484399\n:1099F000009901F02BF806EB0B01D4F82821A1EB1C\n:109A00000901891AD4F83421C4F83401821A491E94\n:109A100001FB02AA40E7E18A40F27122D4F8240156\n:109A2000514300EB41000290C6E70698002808BFAA\n:109A3000FFDF94F86510184890F82C00F7F741FD07\n:109A40000990E08A40F271214143099800EB4100FE\n:109A5000009900F0FBFFC4F83001608840F2E24159\n:109A60004843009900F0F2FFC4F8340103A902A8AA\n:109A7000FFF7BBF8DDE90160039FE9F7F0F8014665\n:109A80003046FDF769F800F10F06E9F711F9381AC9\n:109A9000801B009006E00000B80C0020E0000020D1\n:109AA000E4620200B4F83401214686B20120D4F801\n:109AB000289004F06EFE074694F86500FEF794FACD\n:109AC0004AF2B12108444FF47A7BB0FBFBF0618885\n:109AD00040F271225143C0EB4100801BA0F55A7641\n:109AE00002F059FD002818BF1E3EB94534BF384664\n:109AF0004846B04203D2B9452CBF4E463E46666248\n:109B000094F86500FEF7E9FA00F2E140B0FBFBF1E2\n:109B100006980F1894F86500FEF7DFFA064694F8E9\n:109B20006500FEF761FA30444AF2AB310844B0FBFD\n:109B3000FBF1E08A40F2712242430998D4F8306187\n:109B400000EB4200401A801B384400993138471A14\n:109B5000607D40F2E24110FB01F994F8650000904D\n:109B600010F00C0F0ABF00984EF62830FEF73CFAB2\n:109B70004AF2B1210844B0FBFBF000EB460000EBD9\n:109B800009060098FEF7B8FA304400F18401FE4857\n:109B9000816193E6E18A40F27122D4F824015143B5\n:109BA00000EB4100009900F051FFC4F830016188DA\n:109BB00040F2E2404843009900F048FFC4F8340105\n:109BC00087B221460120D4F828B004F0E2FD814696\n:109BD00094F86500FEF708FA4AF2B12101444FF407\n:109BE0007A70B1FBF0F0618840F271225143C0EB12\n:109BF0004100C01BA0F55A7702F0CDFC002818BF29\n:109C00001E3FCB4534BF48465846B84203D2CB45E9\n:109C10002CBF5F464F4667621EBB0E9808B394F890\n:109C200065603046FEF7E0F94AF2B12101444FF495\n:109C30007A70B1FBF0F0D4F83011E28A084440F2B7\n:109C40007123D4F824115A4301EB42010F1A304614\n:109C5000FEF752FA01460998401A3844A0F120074D\n:109C60000AE0E18A40F27122D4F82401514300EB6A\n:109C70004100D4F83011471AD4F82821D4F8201123\n:109C8000D4F8300101FB0209607D40F2E24110FB93\n:109C900001FB94F8656016F00C0F0ABF30464EF6D3\n:109CA0002830FEF7A1F94AF2B12101444FF47A704D\n:109CB000B1FBF0F000EB490000EB0B093046FEF77A\n:109CC0001BFA484400F16001AF488161012084F82B\n:109CD0002C01F3E5618840F271225143D4F834013C\n:109CE000D4F82821C0EB410101FB09F706EB0B0179\n:109CF000891AD4F820C1D4F83031491E0CFB023245\n:109D000001FB0029607D40F2E24110FB01FB94F869\n:109D1000656016F00C0F0ABF30464EF62830FEF78D\n:109D200063F94AF2B12101444FF47A70B1FBF0F0CB\n:109D300000EB490000EB0B093046FEF7DDF9484423\n:109D400000F1600190488161B8E5618840F27122BC\n:109D5000D4F834015143C0EB410000FB09F794F8FB\n:109D60007C0024281CBF94F87D0024280BD1B4F873\n:109D7000AA01A8EB000000B2002804DB94F8AD01B2\n:109D8000002818BF03900A9800B3FEB9099800286C\n:109D90001ABF06980028FFDF94F8650010F00C0F3A\n:109DA00014BF4EF62830FEF71FF94AF2B1210144E4\n:109DB0004FF47A70B1FBF0F03F1A94F86500FEF7AB\n:109DC0009BF90999081A3844A0F12007D4F83411F6\n:109DD00006EB0B0000FB01F6039810F00C0F0ABF16\n:109DE00003984EF62830FEF7FFF84AF2B1210144FD\n:109DF0004FF47A70B1FBF0F000EB46060398FEF7E3\n:109E00007BF9304400F160015F48816156E500282C\n:109E10007FF496AD94F82C0100283FF4ADAD618835\n:109E200040F27122D4F834015143C0EB410128467D\n:109E3000F7F712F90004000C3FF49EAD18990029C1\n:109E400018BF088001200FB0BDE8F08F94F87C01A6\n:109E5000FCF7D1FC94F87C012946FCF7B0FB20B15B\n:109E60000D9880F0010084F841010FB00020BDE89A\n:109E7000F08F2DE9F843454C0246434F00266168B8\n:109E8000606A052A60D2DFE802F003464B4F5600B5\n:109E9000A07A002560B101216846FDF709FB9DF815\n:109EA000000042F210710002B0FBF1F201FB12055A\n:109EB000F4F720FE4119A069FBF73DFEA06126746E\n:109EC000032060754FF0010884F81480607AD0B9DF\n:109ED000A06A80B1F4F70EFE0544F4F785FC411941\n:109EE000A06A884224BF401BA06204D2C4F8288024\n:109EF000F5F72BFE07E0207B04F11001FCF75FFB78\n:109F0000002808BFFFDF2684FCF739F87879BDE820\n:109F1000F843E8F7F9BFBDE8F843002100F0B3BD0E\n:109F2000C1F88001BDE8F883D1F88001BDE8F843AD\n:109F3000012100F0A8BD84F83060FCF720F87879A2\n:109F4000BDE8F843E8F7E0BFFFDFBDE8F8832DE99F\n:109F5000F04F0E4C824683B020788B4601270025B7\n:109F6000094E4FF00209032804BF207B50457DD1E4\n:109F7000606870612078032818BFFFDF4FF0030886\n:109F8000BBF1080F73D203E0E0000020B80C002002\n:109F9000DFE80BF0040F32322D9999926562F5F7E4\n:109FA000ABF9002818BFFFDF86F8028003B0BDE8D8\n:109FB000F08FF4F77AFF68B9F4F716FC0546E0690C\n:109FC000A84228BFE56105D2281A0421FCF7F7FD55\n:109FD000E56138B1F5F723FD002818BFFFDF03B0B6\n:109FE000BDE8F08F03B00020BDE8F04F41E703B0BB\n:109FF000BDE8F04FFEF7FFBD2775257494F83000DB\n:10A000004FF0010A58B14FF47A71A069FBF793FD44\n:10A01000A061002104F11000F7F71EF80EE0F4F73C\n:10A0200069FD82465146A069FBF785FDA061514656\n:10A0300004F11000F7F710F800F1010A208C411C20\n:10A040000A293CBF50442084606830B1208C401CF9\n:10A050000A2828BF84F8159001D284F81580607A08\n:10A06000A8B9A06AE8B1F4F745FD01E02FE02AE0C5\n:10A070008046F4F7B9FB00EB0801A06A884224BFD0\n:10A08000A0EB0800A0620CD2A762F5F75EFD207B72\n:10A09000FCF74BF82570707903B0BDE8F04FE8F796\n:10A0A00033BF207B04F11001FCF789FA002808BFB8\n:10A0B000FFDF03B0BDE8F08F207BFCF736F825709A\n:10A0C00003B0BDE8F08FFFDF03B0BDE8F08FBAF159\n:10A0D000200F28BFFFDFDFF8E886072138F81A00D5\n:10A0E000F9F7E4FE040008BFFFDFBAF1200F28BF34\n:10A0F000FFDF38F81A002188884218BFFFDF4FF0D1\n:10A10000200A7461BBF1080F80F06181DFE80BF079\n:10A110000496A0A099FEFDFCC4F88051F580C4F817\n:10A12000845194F8410138B9FCF71EF8D4F84C1169\n:10A13000FCF712FD00281BDCB4F83E11B4F87000E7\n:10A14000814206D1B4F8F410081AA4F8F6002046AB\n:10A1500005E0081AA4F8F600B4F83E112046A4F869\n:10A160007010D4F86811C4F84C11C0F870111DE0DB\n:10A17000B4F83C11B4F87000081AA4F8F600B4F86A\n:10A180003C112046A4F87010D4F84C11C4F86811A2\n:10A19000C4F87011D4F85411C4F80011D4F858114F\n:10A1A000C4F87411B4F85C11A4F8781102F008F93D\n:10A1B000FBF7B4FF804694F86500FDF715FF4AF2FF\n:10A1C000B12108444FF47A71B0FBF1F0D4F83411A6\n:10A1D00040F27122084461885143C0EB4100A0F174\n:10A1E000300AB8F1B70F98BF4FF0B70821460120E9\n:10A1F00004F0CFFA4044AAEB0000A0F21D38A246BA\n:10A200002146012004F0C5FADAF824109C3081427E\n:10A2100088BF0D1AC6F80C80454528BF4546B56075\n:10A22000D4F86C01A0F5D4703061FCF762FC84F8BE\n:10A23000407186F8029003B0BDE8F08F02F0A6F9F5\n:10A2400001E0FEF7D8FC84F8407103B0BDE8F08F60\n:10A25000FBF78AFFD4F8702101461046FCF77CFC1E\n:10A2600048B1628840F27123D4F834115A43C1EBEB\n:10A270004201B0FBF1F094F87D100D290FD0B4F835\n:10A280007010B4F83E210B189A42AEBF501C401C0F\n:10A290000844A4F83E0194F8420178B905E0B4F806\n:10A2A0003E01401CA4F83E0108E0B4F83E01B4F8B9\n:10A2B000F410884204BF401CA4F83E01B4F87A01AF\n:10A2C0000DF1040B401CA4F87A01B4F89A00B4F81C\n:10A2D0009810401AB4F87010401E08441FFA80F914\n:10A2E0000BE000231A462046CDF800B0FFF709FA2C\n:10A2F00068B3012818BFFFDF48D0B4F83E11A9EBBE\n:10A30000010000B2002802E053E047E05FE0E8DA35\n:10A31000082084F88D0084F88C70204601F012FE2D\n:10A3200084F82C5194F87C514FF6FF77202D00D300\n:10A33000FFDF28F8157094F87C01FBF7F6FE84F82F\n:10A340007CA1707903B0BDE8F04FE8F7DDBDA06EE9\n:10A35000002804BF03B0BDE8F08FB4F83E01B4F8A4\n:10A360009420801A01B20029DCBF03B0BDE8F08F51\n:10A37000B4F86C000144491E91FBF0F189B201FB75\n:10A380000020A4F8940003B0BDE8F08FB4F83E01BB\n:10A39000BDF804100844A4F83E01AEE7FEF7E4FA65\n:10A3A000FEF729FC4FF0E020C0F8809203B0BDE832\n:10A3B000F08F94F82C01042818BFFFDF84F82C518B\n:10A3C00094F87C514FF6FF77202DB2D3B0E7FFDF32\n:10A3D00003B0BDE8F08F10B5FA4C207850B10120E1\n:10A3E0006072F5F7D8FB2078032805D0207A002882\n:10A3F00008BF10BD0C2010BD207BFCF7FCF9207BB2\n:10A40000FCF765FC207BFBF790FE002808BFFFDF10\n:10A410000020207010BD2DE9F04FEA4F83B038784E\n:10A4200001244FF0000840B17C720120F5F7B3FB26\n:10A430003878032818BF387A0DD0DFF88C9389F864\n:10A44000034069460720F9F7BAFC002818BFFFDF70\n:10A450004FF6FF7440E0387BFCF7CDF9387BFCF712\n:10A4600036FC387BFBF761FE002808BFFFDF87F86A\n:10A470000080E2E7029800281CBF90F82C11002908\n:10A480002AD00088A0421CBFDFF834A34FF0200B75\n:10A490003AD00721F9F70AFD040008BFFFDF94F85E\n:10A4A0007C01FCF714FC84F82C8194F87C514FF665\n:10A4B000FF76202D28BFFFDF2AF8156094F87C0175\n:10A4C000FBF733FE84F87CB169460720F9F777FC87\n:10A4D000002818BFFFDF12E06846F9F74EFC00289D\n:10A4E000C8D011E0029800281CBF90F82C11002958\n:10A4F00005D00088A0F57F41FF39CAD104E0684645\n:10A50000F9F73BFC0028EDD089F8038087F830800C\n:10A5100087F80B8003B00020BDE8F08FAA4948718E\n:10A520000020887001220A7048700A71C870A5491D\n:10A53000087070E7A449087070472DE9F84FA14CE6\n:10A5400006460F462078002862D1A048FBF792FD0E\n:10A55000207320285CD04FF00308666084F80080E8\n:10A56000002565722572AEB1012106F58E70FCF7EB\n:10A57000BEFF0620F9F742FC81460720F9F73EFCB2\n:10A5800096F81C114844B1FBF0F200FB1210401C7D\n:10A5900086F81C01FBF7C2FD40F2F651884238BF35\n:10A5A00040F2F65000F5A0701FFA80F9F4F7A2FA15\n:10A5B000012680B3A672F4F717F9E061FBF7D4FD2A\n:10A5C000824601216846FCF769FF9DF8000042F2CF\n:10A5D00010710002B0FBF1F201FB120000EB090167\n:10A5E0005046FBF7A8FAA762A061267584F815808B\n:10A5F0002574207B04F11001FBF7E1FF002808BF60\n:10A60000FFDF25840020F5F7C6FA0020BDE8F88FAB\n:10A610000C20BDE8F88FFFE7E761FBF7A5FD494691\n:10A62000FBF789FAA061A57284F830600120FDF77C\n:10A6300054FD4FF47A7100F2E140B0FBF1F0381AAA\n:10A64000A0F5AB60A5626063CFE75F4948707047D3\n:10A650005D49087170475B4810B5417A00291CBFFD\n:10A66000002010BD816A51B990F8301039B1416AAB\n:10A67000406B814203D9F5F768FA002010BD012034\n:10A6800010BD2DE9F041504C0646E088401CE080AA\n:10A69000D4E902516078D6F8807120B13A46284654\n:10A6A000F6F705FD0546A068854205D02169281A00\n:10A6B00008442061FCF71DFAA560AF4209D896F85E\n:10A6C0002C01012805D0E078002804BF0120BDE856\n:10A6D000F0810020BDE8F08110B504460846FDF782\n:10A6E00083FC4AF2B12108444FF47A71B0FBF1F0D7\n:10A6F00040F2E241614300F54E7081428CBF081A7E\n:10A70000002010BD70B5044682B0002084F84001DE\n:10A7100094F8FB00002807BF94F82C01032802B02E\n:10A7200070BDFBF721FDD4F8702101461046FCF7FF\n:10A7300013FA0028DCBF02B070BD628840F27123BA\n:10A74000D4F834115A43C1EB4201B0FBF1F0B4F834\n:10A750007010401C0844A4F83C01B4F8F400B4F8AC\n:10A760003C21801A00B20028DCBF02B070BD01207D\n:10A7700084F84201B4F89A00B4F8982001AE801A27\n:10A78000401E084485B212E00096B4F83C11002344\n:10A7900001222046FEF7B5FF002804BF02B070BDBD\n:10A7A000012815D0022812BFFFDF02B070BDB4F837\n:10A7B0003C01281A00B20028BCBF02B070BDE3E71C\n:10A7C000F00C0020B80C0020E00000204F9F01009A\n:10A7D000B4F83C01BDF804100844A4F83C01E6E7D5\n:10A7E000F8B50422002506295BD2DFE801F0072630\n:10A7F0000319192A044680F82C2107E00446C948A9\n:10A80000C078002818BF84F82C210AD0FBF7B7FBCA\n:10A81000A4F87A51B4F87000A4F83E0184F84251CB\n:10A82000F8BD0095B4F8F410012300222046FEF78D\n:10A8300068FF002818BFFFDFE8E7032180F82C112C\n:10A84000F8BD0646876AB0F83401314685B201206A\n:10A8500003F09FFF044696F86500FDF7C5FB4AF23A\n:10A86000B12108444FF47A71B0FBF1F0718840F2E5\n:10A8700071225143C0EB4100401BA0F55A7501F015\n:10A880008AFE002818BF1E3DA74234BF2046384626\n:10A89000A84228BF2C4602D2A74228BF3C46746279\n:10A8A000F8BDFFDFF8BD2DE9F05F9E4EB1780229BB\n:10A8B00006BFF1880029BDE8F09F7469C4F88401DF\n:10A8C00094F86500FDF718FCD4F88411081AB168F3\n:10A8D0000144B160F1680844F060746994F8430180\n:10A8E000002808BFBDE8F09F94F82C01032818BF8A\n:10A8F000BDE8F09F94F8655037780C2F28BFFFDF34\n:10A90000894E36F8178094F888710C2F28BFFFDF26\n:10A9100036F81700404494F8888187B2B8F10C0FDC\n:10A9200028BFFFDF36F8180000F5C8601FFA80F86E\n:10A930002846FDF7E1FBD4F884114FF0000A0E1A07\n:10A9400015F00C0F0ABF28464EF62830FDF74CFBD9\n:10A950004FF47A7900F2E730B0FBF9F0361A284666\n:10A96000FDF7CAFBD4F8001115F00C0FA1EB000B9A\n:10A970000ABF28464EF62830FDF736FB4AF2B121D1\n:10A980000844B0FBF9F0ABEB0000A0F160017943A3\n:10A99000B1FBF8F1292202EB50006031A0EB51022B\n:10A9A00000EB5100B24201D8B04201D8F1F774FB7C\n:10A9B000608840F2E2414843394600F047F8C4F865\n:10A9C000340184F843A1BDE8F09F70B505465548B1\n:10A9D00090F802C0BCF1020F07BF406900F5C074D7\n:10A9E000524800F12404002904BF256070BD4FF4D3\n:10A9F0007A7601290DD002291CBFFFDF70BD1046F9\n:10AA0000FEF76EFC00F2E140B0FBF6F0281A206081\n:10AA100070BD1846FDF761FB00F2E140B0FBF6F0B7\n:10AA2000281A206070BD4148007800281CBF002013\n:10AA3000704710B50720F9F7D3F980F0010010BD79\n:10AA40003A480078002818BF0120704730B5024608\n:10AA50000020002908BF30BDA2FB0110490A41EACD\n:10AA6000C051400A4C1C40F100000022D4F1FF31DB\n:10AA700040F2A17572EB000038BFFFDF04F5F4600F\n:10AA8000B0FBF5F030BD2DE9F843284C0025814698\n:10AA900084F83050D4F8188084F82C10E5722570B2\n:10AAA0000127277239466068F5F792FD6168C1F8A1\n:10AAB0007081267B81F87C61C1F88091C1F8748136\n:10AAC000B1F80080202E28BFFFDF194820F816803B\n:10AAD000646884F82C510023A4F878511A4619466A\n:10AAE00020460095FEF70DFE002818BFFFDFC4F8D2\n:10AAF0002851C4F8205184F82C71A4F83E51A4F8D0\n:10AB00003C5184F84251B4F87000401EA4F8700023\n:10AB1000A4F87A51FBF733FA02484079BDE8F843CC\n:10AB2000E8F7F2B9E0000020E4620200B80C00206F\n:10AB3000F00C0020012804D0022805D0032808D1F9\n:10AB400005E0012907D004E0022904D001E004292E\n:10AB500001D000207047012070472DE9F0410E46DA\n:10AB6000044603F08AFC0546204603F08AFC0446AE\n:10AB7000F6F770FBFB4F010015D0386990F86420A0\n:10AB80008A4210D090F8C0311BB190F8C2312342F4\n:10AB90001FD02EB990F85D30234201D18A4218D8D7\n:10ABA00090F8C001A8B12846F6F754FB70B1396996\n:10ABB00091F86520824209D091F8C00118B191F84E\n:10ABC000C301284205D091F8C00110B10120BDE8B1\n:10ABD000F0810020FBE730B5E24C85B0E069002849\n:10ABE0005FD0142200216846F3F751FC206990F8E9\n:10ABF0006500FDF7F9F94FF47A7100F5FA70B0FBD2\n:10AC0000F1F5206990F86500FDF776FA2844ADF873\n:10AC1000060020690188ADF80010B0F87010ADF89A\n:10AC200004104188ADF8021090F8A20130B1A0697B\n:10AC3000C11C039103F002FB8DF81000206990F80D\n:10AC4000A1018DF80800E169684688472069002164\n:10AC500080F8A21180F8A1110399002921D090F861\n:10AC6000A01100291DD190F87C10272919D09DF83A\n:10AC70001010039A002914D013780124FF2B12D04E\n:10AC8000072B0ED102290CD15178FF2909D100BF21\n:10AC900080F8A0410399C0F8A4119DF8101080F825\n:10ACA000A31105B030BD1B29F2D9FAE770B5AD4C40\n:10ACB000206990F87D001B2800D0FFDF2069002567\n:10ACC00080F8A75090F8D40100B1FFDF206990F818\n:10ACD000A81041B180F8A8500188A0F8D81180F8D8\n:10ACE000D6510E2108E00188A0F8D81180F8D6517D\n:10ACF000012180F8DA110D2180F8D4110088F9F7CC\n:10AD000006FAF8F79FFE2079E8F7FEF8206980F848\n:10AD10007D5070BD70B5934CA07980072CD5A0787C\n:10AD2000002829D162692046D37801690D2B01F1F1\n:10AD300070005FD00DDCA3F102034FF001050B2B77\n:10AD400019D2DFE803F01A1844506127182C183A7A\n:10AD50006400152B6FD008DC112B4BD0122B5AD06E\n:10AD6000132B62D0142B06D166E0162B71D0172B53\n:10AD700070D0FF2B6FD0FFDF70BD91F87F200123D3\n:10AD80001946F6F7FFF80028F6D12169082081F866\n:10AD90007F0070BD1079BDE8704001F090BC91F863\n:10ADA0007E00C00700D1FFDF01F048FC206910F8E9\n:10ADB0007E1F21F00101017070BD91F87D00102807\n:10ADC00000D0FFDF2069112180F8A75008E091F83A\n:10ADD0007D00142800D0FFDF2069152180F8A750DE\n:10ADE00080F87D1070BD91F87D00152800D0FFDF40\n:10ADF000172005E091F87D00152800D0FFDF19200D\n:10AE0000216981F87D0070BDBDE870404EE7BDE866\n:10AE1000704001F028BC91F87C2001230021F6F756\n:10AE2000B1F800B9FFDF0E200FE011F87E0F20F01F\n:10AE3000040008701DE00FE091F87C200123002140\n:10AE4000F6F7A0F800B9FFDF1C20216981F87C002B\n:10AE500070BD12E01BE022E091F87E00C0F301100B\n:10AE6000012800D0FFDF206910F87E1F21F01001BB\n:10AE70000170BDE8704001F0E1BB91F87C20012336\n:10AE80000021F6F77FF800B9FFDF1F20DDE791F81A\n:10AE90007D00212801D000B1FFDF2220B0E7BDE80E\n:10AEA000704001F0D7BB2F48016991F87E2013074D\n:10AEB00002D501218170704742F0080281F87E209E\n:10AEC0008069C07881F8E10001F0AFBB10B5254C76\n:10AED00021690A88A1F8162281F8140291F8640009\n:10AEE00001F091FB216981F8180291F8650001F0E9\n:10AEF0008AFB216981F81902012081F812020020E1\n:10AF000081F8C0012079BDE81040E7F7FDBF10B51A\n:10AF1000144C05212069FFF763FC206990F85A1052\n:10AF2000012908D000F5F57103F001FC2079BDE896\n:10AF30001040E7F7E9BF022180F85A1010BD10B5A4\n:10AF4000084C01230921206990F87C207030F6F725\n:10AF500019F848B12169002001F8960F087301F82B\n:10AF60001A0C10BD000100200120A070F9E770B597\n:10AF7000F74D012329462869896990F87C200979D1\n:10AF80000E2A01D1122903D000241C2A03D004E088\n:10AF9000BDE87040D3E7142902D0202A07D008E08A\n:10AFA00080F87C4080F8A240BDE87040AFE71629E9\n:10AFB00006D0262A01D1162902D0172909D00CE083\n:10AFC00000F87C4F80F82640407821280CD01A20C9\n:10AFD00017E090F87D20222A07D0EA69002A03D0E2\n:10AFE000FF2901D180F8A23132E780F87D4001F0DD\n:10AFF00025FB286980F8974090F8C0010028F3D01D\n:10B000000020BDE8704061E710B5D14C216991F88E\n:10B010007C10202902D0262902D0A2E7FFF756FF94\n:10B020002169002081F87C0081F8A20099E72DE9D0\n:10B03000F843C74C206990F87C10202908D00027DD\n:10B0400090F87D10222905D07FB300F17C0503E044\n:10B050000127F5E700F17D0510F8B01F41F004016C\n:10B060000170A06903F015FA4FF00108002608B33B\n:10B070003946A069FFF771FDE0B16A46A169206910\n:10B08000F6F7F7F890B3A06903F001FA2169A1F887\n:10B09000AA01B1F8701001F0AAFA40B32069282182\n:10B0A00080F88D1080F88C8058E0FFE70220A070B7\n:10B0B000BDE8F883206990F8C00110B11E20FFF7A9\n:10B0C00005FFAFB1A0692169C07881F8E20008FAF4\n:10B0D00000F1C1F3006000B9FFDF20690A2180F8A8\n:10B0E0007C1090F8A20040B9FFDF06E009E02AE0FA\n:10B0F0002E7001F0A3FAFFF7D6FE206980F8976062\n:10B10000D6E7226992F8C00170B1B2F8703092F8B7\n:10B110006410B2F8C40102F5D572F6F79BF968B174\n:10B120002169252081F87C00206900F17D0180F8EB\n:10B1300097608D4212D180F87D600FE00020FFF70C\n:10B14000C5FE2E70F0E720699DF8001080F8AC1164\n:10B150009DF8011080F8AD1124202870206900F1BD\n:10B160007D018D4203D1BDE8F84301F067BA80F854\n:10B17000A2609DE770B5764C01230B21206990F801\n:10B180007D207030F5F7FEFE202650BB206901239C\n:10B19000002190F87D207030F5F7F4FE0125F0B124\n:10B1A000206990F87C0024281BD0A06903F04FF997\n:10B1B000C8B1206990F8B01041F0040180F8B010D7\n:10B1C000A1694A7902F0070280F85D20097901F04F\n:10B1D000070180F85C1090F8C1311BBB06E0A57038\n:10B1E00036E6A67034E6BDE870405CE690F8C03103\n:10B1F000C3B900F164035E788E4205D1197891429B\n:10B2000002D180F897500DE000F503710D700288AF\n:10B210004A8090F85C200A7190F85D0048712079AE\n:10B22000E7F772FE2169212081F87D00BDE87040BA\n:10B2300001F0FBB9F8B5464C206990F87E0010F09B\n:10B24000300F04D0A07840F00100A070F8BDA069D4\n:10B2500003F0E2F850B3A06903F0D8F80746A069FC\n:10B2600003F0D8F80646A06903F0CEF80546A069B9\n:10B2700003F0CEF801460097206933462A46303065\n:10B2800003F0BFF9A079800703D56069C07814285E\n:10B290000FD0216991F87C001C280AD091F85A003F\n:10B2A00001280ED091F8B70158B907E0BDE8F84081\n:10B2B000F9E52169012081F85A0002E091F8B60110\n:10B2C00030B1206910F87E1F41F0100101700EE0CE\n:10B2D00091F87E0001F5FC7240F0200081F87E00BC\n:10B2E00031F8300B03F017FA2079E7F70DFEBDE8CF\n:10B2F000F84001F09AB970B5154C206990F87E10AD\n:10B30000890707D590F87C20012308217030F5F7D4\n:10B3100039FEF8B1206990F8AA00800712D4A0691C\n:10B3200003F056F8216981F8AB00A06930F8052FC9\n:10B33000A1F8AC204088A1F8AE0011F8AA0F40F0A7\n:10B3400002000870206990F8AA10C90705D011E022\n:10B35000000100200120A0707AE590F87E008007AF\n:10B3600000D5FFDF206910F87E1F41F00201017057\n:10B3700001F05BF92069002590F87C10062906D1C0\n:10B3800080F87C5080F8A2502079E7F7BDFD206955\n:10B3900090F8A8110429DFD180F8A8512079E7F7A7\n:10B3A000B3FD206990F87C100029D5D180F8A25017\n:10B3B0004EE570B5FB4C01230021206990F87D20FB\n:10B3C0007030F5F7DFFD012578B9206990F87D2010\n:10B3D000122A0AD0012305217030F5F7D3FD10B1F0\n:10B3E0000820A07034E5A57032E5206990F8A80027\n:10B3F00008B901F01AF92169A06901F5847102F018\n:10B40000C8FF2169A069D83102F0CEFF206990F809\n:10B41000DC0100B1FFDF21690888A1F8DE0101F538\n:10B42000F071A06902F0A3FF2169A06901F5F47130\n:10B4300002F0A5FF206980F8DC51142180F87D100E\n:10B440002079BDE87040E7F75FBD70B5D54C0123AA\n:10B450000021206990F87D207030F5F793FD0125DB\n:10B46000A8B1A06902F04FFF98B1A0692169B0F8B6\n:10B470000D00A1F8AA01B1F8701001F0B8F858B1A8\n:10B480002069282180F88D1080F88C50E0E4A570A8\n:10B49000DEE4BDE8704006E5A0692169027981F823\n:10B4A000AC21B0F80520A1F8AE2102F01FFF216900\n:10B4B000A1F8B001A06902F01CFF2169A1F8B20156\n:10B4C000A06902F01DFF2169A1F8B4010D2081F8E7\n:10B4D0007D00BDE47CB5B34CA079C00738D0A0692D\n:10B4E00001230521C578206990F87D207030F5F79B\n:10B4F00049FD68B1AD1E0A2D06D2DFE805F0090945\n:10B500000505090905050909A07840F00800A070A3\n:10B51000A07800281CD1A06902F0BEFE00286ED0E1\n:10B52000A0690226C5781DB1012D01D0162D18D1B4\n:10B53000206990F87C00F5F70DFD90B1216991F834\n:10B540007C001F280DD0202803D0162D16D0A67001\n:10B550007CBD262081F87C00162D02D02A20FFF722\n:10B56000B5FC0C2D5BD00CDC0C2D48D2DFE805F0CF\n:10B5700036331F48BEBE4BB55ABE393C2020A070A2\n:10B580007CBD0120142D6ED008DC0D2D6CD0112D4A\n:10B590006BD0122D6ED0132D31D168E0152D7FD0D8\n:10B5A000162D6FD0182D6ED0FF2D28D198E0206970\n:10B5B0000123194690F87F207030F5F7E3FC00284E\n:10B5C00008D1A06902F0CCFE216981F88E01072024\n:10B5D00081F87F008CE001F0EDF889E0FFF735FF9E\n:10B5E00086E001F0C7F883E0206990F87D1011290A\n:10B5F00001D0A6707CE0122180F87D1078E075E023\n:10B60000FFF7D7FE74E0206990F87D001728F0D18D\n:10B6100001F014F821691B2081F87D0068E0FFF734\n:10B620006AFE65E0206990F87E00C00703D0A0782C\n:10B6300040F0010023E06946A06902F0D0FE9DF8C9\n:10B64000000000F02501206900F8B01F9DF80110EE\n:10B6500001F04901417000F0E8FF206910F87E1FF9\n:10B6600041F0010117E018E023E025E002E0FFF7D8\n:10B6700066FC3DE0216991F87E10490704D5A07071\n:10B6800036E00DE00FE011E000F0CFFF206910F888\n:10B690007E1F41F0040101702AE0FFF7CBFD27E097\n:10B6A00001F030F824E0FFF765FD21E0FFF7BFFC73\n:10B6B0001EE0A06900790DE0206910F8B01F41F08C\n:10B6C00004010170A06902F0F7FE162810D1A069EC\n:10B6D00002F0F6FEFFF798FC0AE0FFF748FC07E0EF\n:10B6E000E16919B1216981F8A20101E0FFF7DBFBF3\n:10B6F0002169F1E93002401C42F10002C1E9000277\n:10B700007CBD70B5274CA07900074AD5A0780028E9\n:10B7100047D1206990F8E400FE2800D1FFDF2069BE\n:10B72000FE21002580F8E41090F87D10192906D13B\n:10B7300080F8A75000F082FF206980F87D502069D2\n:10B7400090F87C101F2902D0272921D119E090F808\n:10B750007D00F5F7FFFB78B120692621012380F8F1\n:10B760007C1090F87D200B217030F5F70BFC78B938\n:10B770002A20FFF7ABFB0BE02169202081F87C0039\n:10B7800006E0012180F8A11180F87C5080F8A250D9\n:10B79000206990F87F10082903D10221217080F8D8\n:10B7A000E41021E40001002010B5FD4C216991F85E\n:10B7B000AC210AB991F8642081F8642091F8AD2198\n:10B7C0000AB991F8652081F8652010B10020FFF7D3\n:10B7D0007DFB206902F041FF002806D02069BDE80A\n:10B7E000104000F5F57102F0A2BF16E470B5EC4C04\n:10B7F00006460D46206990F8E400FE2800D0FFDFE1\n:10B800002269002082F8E46015B1A2F8A400E7E400\n:10B8100022F89E0F01201071E2E470B5E04C012384\n:10B820000021206990F87C207030F5F7ABFB0028F0\n:10B830007BD0206990F8B61111B190F8B71139B1E9\n:10B8400090F8C01100296FD090F8C11119B36BE0C6\n:10B8500090F87D1024291CD090F87C10242918D051\n:10B860005FF0000300F5D67200F5DB7102F096FE82\n:10B870002169002081F8B60101461420FFF7B6FFC8\n:10B88000216901F13000C28A21F8E62F408B4880FF\n:10B8900050E00123E6E790F87D2001230B21703072\n:10B8A000F5F770FB68BB206990F8640000F0ABFE10\n:10B8B0000646206990F8650000F0A5FE054620695F\n:10B8C00090F8C2113046FFF735F9D8B1206990F8E9\n:10B8D000C3112846FFF72EF9A0B12269B2F87030E3\n:10B8E00092F86410B2F8C40102F5D572F5F7B2FD12\n:10B8F00020B12169252081F87C001BE00020FFF7A2\n:10B90000E5FA11E020690123032190F87D207030D1\n:10B91000F5F738FB40B920690123022190F87D201A\n:10B920007030F5F72FFB08B1002059E400211620F4\n:10B93000FFF75CFF012053E410B5E8BB984C206989\n:10B9400090F87E10CA0702D00121092052E08A0730\n:10B950000AD501210C20FFF749FF206910F8AA1F22\n:10B9600041F00101017047E04A0702D5012113208F\n:10B9700040E00A0705D510F8E11F417101210720B9\n:10B9800038E011F0300F3BD090F8B711A1B990F822\n:10B99000B611E1B190F87D1024292FD090F87C10D9\n:10B9A00024292BD05FF0000300F5D67200F5DB717F\n:10B9B00002F0F4FD216900E022E011F87E0F20F092\n:10B9C000200040F010000870002081F83801206944\n:10B9D00090F87E10C90613D502F03FFEFFF797FAE4\n:10B9E000216901F13000C28A21F8E62F408B48809E\n:10B9F00001211520FFF7FAFE0120F6E60123D3E727\n:10BA00000020F2E670B5664C206990F8E410FE293B\n:10BA100078D1A178002975D190F87F2001231946AB\n:10BA20007030F5F7AFFA00286CD1206990F88C11CE\n:10BA300049B10021A0F89C1090F88D1180F8E61013\n:10BA4000002102205BE090F87D200123042170306A\n:10BA5000F5F798FA0546FFF76FFF002852D1284600\n:10BA600000F00CFF00284DD120690123002190F83F\n:10BA70007C207030F5F786FA78B120690123042123\n:10BA800090F87D207030F5F77DFA30B9206990F894\n:10BA9000960010B10021122031E0206990F87C203E\n:10BAA0000A2A0DD0002D2DD1012300217030F5F789\n:10BAB00069FA78B1206990F8A81104290AD105E043\n:10BAC00010F8E21F01710021072018E090F8AA0089\n:10BAD000800718D0FFF7A1FE002813D120690123A9\n:10BAE000002190F87C207030F5F74CFA002809D03E\n:10BAF000206990F8A001002804D00021FF20BDE8B3\n:10BB0000704073E609E000210C20FFF76FFE20690A\n:10BB100010F8AA1F41F0010101701DE43EB5054671\n:10BB20006846FDF7ABFC00B9FFDF22220021009838\n:10BB3000F2F7ADFC0321009802F096FB0098017823\n:10BB400021F010010170294602F0B3FB144C0D2DB9\n:10BB500043D00BDCA5F102050B2D19D2DFE805F06F\n:10BB600022184B191922185718192700152D5FD0C4\n:10BB700008DC112D28D0122D0BD0132D09D0142D37\n:10BB800006D155E0162D2CD0172D6AD0FF2D74D07C\n:10BB9000FFDFFDF786FC002800D1FFDF3EBD00007F\n:10BBA000000100202169009891F8E61017E0E26892\n:10BBB00000981178017191884171090A8171518849\n:10BBC000C171090A0172E4E70321009802F072FCD6\n:10BBD0000621009802F072FCDBE700980621017153\n:10BBE000D7E70098D4F8101091F8C221027191F8AB\n:10BBF000C3114171CDE72169009801F5887102F008\n:10BC0000D7FB21690098DC3102F0DCFBC1E7FA497F\n:10BC1000D1E90001CDE90101206901A990F8B00046\n:10BC200000F025008DF80400009802F006FCB0E753\n:10BC30002069B0F84810009802F0D6FB2069B0F8EF\n:10BC4000E810009802F0D4FB2069B0F84410009886\n:10BC500002F0D2FB2069B0F8E610009802F0D0FBA9\n:10BC600097E7216991F8C00100280098BCD111F82C\n:10BC7000642F02714978BCE7FFE7206990F8A3219F\n:10BC8000D0F8A411009802F022FB82E7DB4810B53F\n:10BC9000006990F8821041B990F87D2001230621B7\n:10BCA0007030F5F76FF9002800D001209DE570B5E0\n:10BCB000D24D286990F8801039B1012905D00229A8\n:10BCC00006D0032904D0FFDF03E4B0F8F41037E016\n:10BCD00090F87F10082936D0B0F89810B0F89A2064\n:10BCE00000248B1C9A4206D3511A891E0C04240C82\n:10BCF00001D0641EA4B290F8961039B190F87C205F\n:10BD0000012309217030F5F73DF940B3FFF7BEFF7D\n:10BD100078B129690020B1F89020B1F88E108B1C01\n:10BD20009A4203D3501A801E00D0401EA04200D277\n:10BD300084B20CB1641EA4B22869B0F8F410214496\n:10BD4000A0F8F0102DE5B0F898100329BDD330F815\n:10BD5000701F428D1144491CA0F8801021E5002479\n:10BD6000EAE770B50C4605464FF4087200212046FC\n:10BD7000F2F78DFB258014E5F8F7A2B92DE9F04123\n:10BD80000D4607460721F8F791F8041E3CD094F8B9\n:10BD9000C8010026A8B16E70092028700BE0268427\n:10BDA00084F8C861D4F8CA016860D4F8CE01A860EC\n:10BDB000B4F8D201A88194F8C8010028EFD12E71FF\n:10BDC000AEE094F8D40190B394F8D4010D2813D0C8\n:10BDD0000E2801D0FFDFA3E02088F8F798F9074686\n:10BDE000F7F745FE78B96E700E20287094F8D601EA\n:10BDF00028712088E88014E02088F8F788F9074641\n:10BE0000F7F735FE10B10020BDE8F0816E700D200F\n:10BE1000287094F8D60128712088E88094F8DA0117\n:10BE2000287284F8D4613846F7F71BFE78E0FFE704\n:10BE300094F80A0230B16E701020287084F80A62FB\n:10BE4000AF806DE094F8DC0190B16E700A2028702C\n:10BE50002088A880D4F8E011C5F80610D4F8E411C1\n:10BE6000C5F80A10B4F8E801E88184F8DC6157E00D\n:10BE700094F8040270B16E701A20287005E000BFBB\n:10BE800084F80462D4F80602686094F8040200287A\n:10BE9000F6D145E094F8EA0188B16E70152028705B\n:10BEA00008E000BF84F8EA6104F5F6702B1D07C8AE\n:10BEB00083E8070094F8EA010028F3D130E094F811\n:10BEC000F80170B16E701C20287084F8F861D4F805\n:10BED000FA016860D4F8FE01A860B4F80202A881F3\n:10BEE0001EE094F80C0238B11D20287084F80C6212\n:10BEF000D4F80E02686013E094F81202002883D090\n:10BF00006E701620287007E084F81262D4F81402CC\n:10BF10006860B4F81802288194F812020028F3D15E\n:10BF2000012071E735480021C16101620846704770\n:10BF300030B5324D0C46E860FFF7F4FF00B1FFDF8B\n:10BF40002C7130BD002180F87C1080F87D1080F8C5\n:10BF5000801090F8FB1009B1022100E00321FEF7E8\n:10BF60003FBC2DE9F041254C0546206909B100216F\n:10BF700004E0B0F80611B0F8F6201144A0F806115C\n:10BF800090F88C1139B990F87F2001231946703050\n:10BF9000F4F7F8FF30B1206930F89C1FB0F85A2050\n:10BFA00011440180206990F8A23033B1B0F89E109E\n:10BFB000B0F8F6201144A0F89E1090F9A670002F5A\n:10BFC00006DDB0F8A410B0F8F6201144A0F8A410D3\n:10BFD00001213D2615B180F88D6017E02278022AF4\n:10BFE0000ED0012A15D0A2784AB380F88C1012F036\n:10BFF000140F11D01E2117E0FC6202000001002086\n:10C0000090F8E620062A3CD016223AE080F88C1000\n:10C0100044E090F88E2134E0110702D580F88D605D\n:10C020003CE0910603D5232180F88D1036E090077F\n:10C0300000D1FFDF21692A2081F88D002AE02BB191\n:10C04000B0F89E20B0F8A0309A4210D2002F05DD43\n:10C05000B0F8A420B0F8A0309A4208D2B0F89C30D2\n:10C06000B0F89A20934204D390F88C310BB122227D\n:10C0700007E090F880303BB1B0F89830934209D394\n:10C08000082280F88D20C1E7B0F89820062A01D355\n:10C090003E22F6E7206990F88C1019B12069BDE8BE\n:10C0A000F0414FE7BDE8F0410021FEF799BB2DE9D3\n:10C0B000F047FF4C81460D4620690088F8F739F8B3\n:10C0C000060000D1FFDFA0782843A070A0794FF0D0\n:10C0D00000058006206904D5A0F8985080F8045126\n:10C0E00003E030F8981F491C0180FFF7CFFD4FF0A7\n:10C0F000010830B3E088000506D5206990F8821069\n:10C1000011B1A0F88E501CE02069B0F88E10491CC7\n:10C1100089B2A0F88E10B0F890208A4201D3531A49\n:10C1200000E0002327897F1DBB4201D880F896805C\n:10C13000914206D3A0F88E5080F80A822079E6F763\n:10C14000E3FEA0794FF0020710F0600F0ED02069D7\n:10C1500090F8801011B1032908D102E080F88080A6\n:10C1600001E080F880700121FEF73AFB206990F829\n:10C170008010012904D1E188C90501D580F88070BB\n:10C18000B9F1000F72D1E188890502D5A0F81851E4\n:10C1900004E0B0F81811491CA0F8181100F035FBA4\n:10C1A000FEF719FDFFF72EFC2769B7F8F800401CD1\n:10C1B000A7F8F80097F8FC0028B100F01BFFA8B121\n:10C1C000A7F8F85012E000F012FF08B1A7F8F850F5\n:10C1D00000F015FF50B197F80401401CC0B287F879\n:10C1E0000401022802D927F8F85F3D732069012372\n:10C1F000002190F87D207030F4F7C4FE20B920694A\n:10C2000090F87D000C2859D120690123002190F875\n:10C210007C207030F4F7B6FE48B32069012300217A\n:10C2200090F87F207030F4F7ADFE00B3206990F8ED\n:10C230008010022942D190F80401C0B93046F7F7C6\n:10C24000E6F9A0B1216991F8E400FE2836D1B1F8F1\n:10C25000F200012832D981F8FA80B1F89A00B1F8D9\n:10C260009820831E9A4203DB012004E032E025E09F\n:10C27000801A401E80B2B1F8F82023899A4201D377\n:10C28000012202E09A1A521C92B2904200D9104642\n:10C29000012801D181F8FA5091F86F2092B98A6E85\n:10C2A00082B1B1F89420B1F87010511A09B2002986\n:10C2B00008DD884200DB084680B203E021690120E6\n:10C2C00081F8FA502169B1F870201044A1F8F40007\n:10C2D000FFF7EDFCE088C0F340214846FFF741FE40\n:10C2E000206980F8FB50BDE8F047FDF7FCB87049C5\n:10C2F00002468878CB78184312D10846006942B1CB\n:10C300008979090703D590F87F00082808D0012013\n:10C310007047B0F84C10028E914201D8FEF7B1B9C7\n:10C320000020704770B5624C05460E46E0882843F1\n:10C33000E080A80703D5E80700D0FFDF6661EA07C1\n:10C340004FF000014FF001001AD0A661F278062AE2\n:10C3500002D00B2A14D10AE0226992F87D30172B03\n:10C360000ED10023E2E92E3302F8370C08E02269EF\n:10C3700092F87D30112B03D182F8811082F8A80049\n:10C38000AA0718D56269D278052A02D00B2A12D1E1\n:10C390000AE0216991F87D20152A0CD10022E1E9FB\n:10C3A000302201F83E0C06E0206990F87D20102A2A\n:10C3B00001D180F88210280601D50820E07083E4BE\n:10C3C0002DE9F84301273A4C002567F30701E58082\n:10C3D000A570E570257020618946804680F8FB7065\n:10C3E0000088F7F7A6FE00B9FFDF20690088FDF797\n:10C3F00042F820690088FDF764F82069B0F8F2106F\n:10C4000071B190F8E410FE290FD190F88C1189B128\n:10C4100090F87F20012319467030F4F7B3FD78B10E\n:10C42000206990F8E400FE2804D0206990F8E40028\n:10C43000FFF774FB206990F8FD1089B1258118E0A1\n:10C440002069A0F89C5090F88D1180F8E61000212A\n:10C450000220FFF7CBF9206980F8FA500220E7E7C5\n:10C4600090F8C81119B9018C8288914200D881884E\n:10C47000218130F8F61F491E8EB230F8021F314478\n:10C4800020F86019018831440180FFF7FFFB20B1DB\n:10C49000206930F88E1F314401802069B0F8F21015\n:10C4A000012902D8491CA0F8F2102EB102E00000C8\n:10C4B0000001002080F8045180F8FA5090F87D10B7\n:10C4C0000B2901D00C2916D1B0F87020B0F8AA3190\n:10C4D000D21A12B2002A0EDBD0F8AC11816090F8AB\n:10C4E000B01101730321F4F773F8206980F87D50CF\n:10C4F00080F8B27026E0242910D1B0F87010B0F89E\n:10C50000AA21891A09B2002908DB90F8C001FFF7B7\n:10C510004BF9206900F87D5F857613E090F87C1078\n:10C52000242901D025290DD1B0F87010B0F8AA0146\n:10C53000081A00B2002805DB0120FFF735F9206951\n:10C5400080F87C5020690146B0F8F6207030F4F78E\n:10C55000B2FAFC480090FC4BFC4A4146484600F0C9\n:10C560007DFC216A11B16078FCF7B5FA20690123DE\n:10C57000052190F87D207030F4F704FD002803D0E9\n:10C58000BDE8F84300F0FDB9BDE8F88300F015BD43\n:10C59000EF49C8617047EE48C069002800D001200B\n:10C5A0007047EB4A50701162704710B5044600881E\n:10C5B000A4F8CC01B4F8B001A4F8CE01B4F8B201EB\n:10C5C000A4F8D001B4F8B401A4F8D201012084F891\n:10C5D000C801DF480079E6F797FC02212046F3F70F\n:10C5E000F7FF002004F87D0F0320E07010BD401A13\n:10C5F00000B247F6FE71884201DC002801DC012010\n:10C6000070470020704710B5012808D0022808D0D4\n:10C61000042808D0082806D0FFDF204610BD0124DA\n:10C62000FBE70224F9E70324F7E7C9480021006982\n:10C6300020F8A41F8178491C81707047C44800B558\n:10C64000016911F8A60F401E40B20870002800DAF8\n:10C65000FFDF00BDBE482721006980F87C10002163\n:10C6600080F8A011704710B5B94C206990F8A81156\n:10C67000042916D190F87C20012300217030F4F7B2\n:10C6800081FC00B9FFDF206990F8AA10890703D464\n:10C69000062180F87C1004E0002180F8A21080F8C8\n:10C6A000A811206990F87E00800707D5FFF7C6FF24\n:10C6B000206910F87E1F21F00201017010BDA4490D\n:10C6C00010B5096991F87C200A2A09D191F8E22075\n:10C6D000824205D1002081F87C0081F8A20010BDC3\n:10C6E00091F87E20130706D522F0080081F87E001D\n:10C6F000BDE81040A2E7FF2801D0FFDF10BDBDE874\n:10C700001040A7E7F8B5924C01230A21206990F860\n:10C710007C207030F4F736FC38B3A06901F07CFE61\n:10C72000C8B1A06901F072FE0746A06901F072FE6F\n:10C730000646A06901F068FE0546A06901F068FEA2\n:10C7400001460097206933462A46303001F059FFF0\n:10C75000206901F082FF2169002081F8A20081F8A0\n:10C760007C00BDE8F840FEF7D2BBA07840F00100A5\n:10C77000A070F8BD10B5764C01230021206990F817\n:10C780007D207030F4F7FEFB30B1FFF74EFF2169DA\n:10C79000102081F87D0010BD20690123052190F84B\n:10C7A0007D207030F4F7EEFB08B1082000E0012096\n:10C7B000A07010BD70B5664C01230021206990F86F\n:10C7C0007D207030F4F7DEFB012588B1A06901F00F\n:10C7D000C4FD2169A1F8AA01B1F87010FFF707FFA5\n:10C7E00040B12069282180F88D1080F88C50E6E552\n:10C7F000A570E4E52169A06901F5D67101F0A8FDF5\n:10C8000021690B2081F87D00D9E510B5FEF779FF8D\n:10C81000FEF760FE4E4CA079400708D5A07830B9ED\n:10C82000206990F87F00072801D101202070FEF7D1\n:10C8300071FAA079C00609D5A07838B9206990F8B6\n:10C840007D100B2902D10C2180F87D10E0780007C3\n:10C850000ED520690123052190F87D207030F4F772\n:10C8600091FB30B10820A0702169002081F8D4012B\n:10C8700010BDBDE81040002000F0C4BB10B5344C22\n:10C88000216991F87D2048B3102A06D0142A07D0D8\n:10C89000152A1AD01B2A2CD11AE001210B2019E0ED\n:10C8A000FAF702FE0C2817D32069082100F58870DA\n:10C8B000FAF7FEFD28B120690421DC30FAF7F8FD13\n:10C8C00000B9FFDF0121042004E000F017F803E0C5\n:10C8D00001210620FEF78AFF012010BD212A08D180\n:10C8E00091F8970038B991F8C00110B191F8C101E1\n:10C8F00008B1002010BD01211720EBE770B5144CE2\n:10C900000025206990F88F1101290AD002292ED123\n:10C9100090F8A810F1B1062180F8E610012102205C\n:10C9200020E090F8D411002921D100F1C80300F5CE\n:10C930008471002200F5C870F4F796FA01210520F1\n:10C9400010E00000AFC00100EFC2010025C30100EC\n:10C950000001002090F8B000400701D5112000E050\n:10C960000D200121FEF742FF206980F88F5126E556\n:10C9700030B5FB4C05462078002818BFFFDFE57175\n:10C9800030BDF7490120887170472DE9F14FF54D11\n:10C990002846446804F1700794F86510608F94F895\n:10C9A0008280268F082978D0F4F797FBB8F1000F22\n:10C9B00004BF001D80B2864238BF304600F0FF0839\n:10C9C000DFF89C93E848C9F8240009F134006E6848\n:10C9D000406800F1700A90F882B096F86510358FC3\n:10C9E000708F08295DD0F4F778FB00BFBBF1000F12\n:10C9F00004BF001D80B2854238BF2846C0B29AF8F5\n:10CA00001210002918BF04210844C0B296F865101E\n:10CA1000FBF735FCB87C002847D007F15801D24815\n:10CA200091E80E1000F5027585E80E10B96EC0F899\n:10CA30002112F96EC0F8251200F58170FBF7DBFFBB\n:10CA4000C848007800280CBF0120002080F00101B8\n:10CA5000C6480176D7E91412C0E90412A0F5837222\n:10CA6000D9F82410FBF7F5F994F86500012808BF00\n:10CA700000220CD0022808BF012208D0042808BFD9\n:10CA8000032204D008281ABFFFDF002202224146F9\n:10CA90000120FBF7F9F90EE0FFE70421F4F71DFB95\n:10CAA00084E70421F4F719FBA0E7D9F82400FBF789\n:10CAB000A2FFFBF715FA009850B994F8650094F8B6\n:10CAC000661010F00C0F08BF00219620FBF7B4FF92\n:10CAD00094F8642001210020FCF76BF894F82C00F6\n:10CAE000012808BFFCF735F8022089F80000FCF7A0\n:10CAF0003FFC002818BFFFDFBDE8F88F2DE9F04F9D\n:10CB0000DFF860A28BB050469AF800204068AAF186\n:10CB10001401059190F8751000F1700504464FF06E\n:10CB200008080127AAF13406A1B3012900F0068103\n:10CB3000022900F00781032918BFFFDF00F01881E8\n:10CB4000306A0423017821F008010170AA7908EA0B\n:10CB5000C202114321F004010170EA7903EA820262\n:10CB6000114321F01001017095F80590F06AF6F775\n:10CB70005EFD8046FCF7C9FCB9F1020F00F00081B0\n:10CB8000B9F1010F00F00081B9F1030F00F000814D\n:10CB900000F003B9FFE795F80CC04FF002094FF021\n:10CBA000000BBCF1240F1CBF6B7B242B08D0BCF105\n:10CBB0001F0F18BFBCF1200F2AD0222B4DD077E0D9\n:10CBC00094F864109AB190F8AC01002874D0082948\n:10CBD00018BF042969D0082818BF042865D0012986\n:10CBE00018BF012853D000BF4FF0020164E090F855\n:10CBF0001201002860D0082918BF042955D0082840\n:10CC000018BF042851D0012918BF01283FD0EBE7F5\n:10CC1000222B22D0002A4BD090F8C20194F8641045\n:10CC200010F0040F18BF40460CD0082918BF042983\n:10CC30003BD0082818BF042837D0012918BF012885\n:10CC400025D0D1E710F0010F18BF3846EDD110F014\n:10CC5000020F18BF4846E8D12EE04AB390F8C2212F\n:10CC600090F85D0094F8641002EA000010F0040FE0\n:10CC700018BF40460ED0082918BF042915D008282F\n:10CC800018BF042811D0012918BF0128ACD14FF0DA\n:10CC9000010111E010F0010F18BF3846EBD110F080\n:10CCA000020F18BF4846E6D106E04FF0080103E046\n:10CCB00094F864100429F8D0A08E11F00C0F18BF5E\n:10CCC0004FF42960F4F709FA218E814238BF0846F3\n:10CCD000ADF80400A4F84C000598FCF7F5FB60B132\n:10CCE0007289316A42F48062728172694FF48060A5\n:10CCF000904703206871EF7022E709AA01A9F06A42\n:10CD0000F6F7CFFB306210B195F8371021B10598D6\n:10CD1000FCF7AEFB6F7113E79DF8241031B9A0F852\n:10CD200000B080F802B0012101F09EFABDF80410B5\n:10CD3000306A01F0C7FB85F8059001E70598FCF71C\n:10CD400097FBFDE6B4F84C00ADF8040009AA01A970\n:10CD5000F06AF6F7A6FB3062002808BFFFDFEFE6B7\n:10CD60002401002058010020300D0020380F002041\n:10CD70000598FCF7A9FB002808BFFFDFE0E600BF2D\n:10CD800030EA080009D106E030EA080005D102E0E7\n:10CD9000B8F1000F01D0012100E00021306A0278D3\n:10CDA00042EA01110170697C00291CBF69790129DF\n:10CDB0003BD005F15801FD4891E80E1000F50278CE\n:10CDC00088E80E10A96EC0F82112E96EC0F825128D\n:10CDD00000F58170FBF70FFE9AF8000000280CBFE9\n:10CDE00001210021F2480176D5E91212C0E90412AE\n:10CDF000A0F58371326AFBF72CF894F864000128DF\n:10CE000008BF00220CD0022808BF012208D0042845\n:10CE100008BF032204D008281ABFFFDF0022022225\n:10CE2000FB210020FBF730F803E0FBF7E4FDFBF704\n:10CE300057F8012194F865200846FBF7BAFE3771D0\n:10CE4000306A0188F181807830743770FCF799FA84\n:10CE5000002818BFFFDF0BB0BDE8F08F2DE9F043CD\n:10CE6000D44D87B081462878DDF838801E461746B5\n:10CE70000C4628B9002F1CBF002EB8F1000F00D1BE\n:10CE8000FFDFC5F81C80C5E90D94C5E905764FF0B4\n:10CE90000000A8716871E870A8702871C64E68819A\n:10CEA000A881307804F170072088F7F742F9E8622A\n:10CEB0002088F7F72CF92863FBF705FA94F9670047\n:10CEC000FBF7DAFA04F11200FBF76CFD04F10E0037\n:10CED000FBF7D8FA307800280CBF03200120FBF7BD\n:10CEE00087FDB64890E80E108DE80E10D0E90410CA\n:10CEF000CDE90410307800280CBFB148B148049047\n:10CF00006846FBF763FDF87EFBF7C4FAFBF76AFDA2\n:10CF100094F86F0078B9A06E68B1B88C39888842EF\n:10CF200009D1B4F86C1001220844B88494F86E005A\n:10CF3000A16EF8F7D8FE3078002804BFFF2094F8DF\n:10CF400064401AD094F8651097F81280258F608F8E\n:10CF5000082926D0F4F7C1F8B8F1000F04BF001D6E\n:10CF600080B2854238BF2846C0B2B97C002918BFBC\n:10CF70000421084494F86540C0B22146FBF77FF9CC\n:10CF80003078214688B10120FBF74BFB7068D0F860\n:10CF90000001FBF733FD0120FFF7F7FC07B0BDE808\n:10CFA000F0830421F4F799F8D6E70020FBF739FB6A\n:10CFB000FFF7A4FD07B0BDE8F0837F4800B5017816\n:10CFC0003438007819B1022818BFFFDF00BD0128EE\n:10CFD00018BFFFDF00BD774810B50078022818BFE2\n:10CFE000FFDFBDE8104000F070BA00F06EBA714883\n:10CFF000007970476F488089C0F3002070476D4802\n:10D00000C07870472DE9F04706006B48694D4068CD\n:10D0100000F17004686A90F8019018BF012E03D1E6\n:10D02000296B07F0F1FF6870687800274FF001085E\n:10D03000A0B101283CD0022860D003281CBFFFDF2C\n:10D04000BDE8F087012E08BFBDE8F087286BF6F732\n:10D05000E3FCE879BDE8F047E5F756BF012E14D0B0\n:10D06000A86A002808BFFFDF2889C21CD5E909107B\n:10D07000F1F7E3F9A86A686201224946286BF6F7DE\n:10D0800047FB022E08BFBDE8F087D4E91401401C1D\n:10D0900041F10001C4E91401E079012801D1E771EF\n:10D0A00001E084F80780E879BDE8F047E5F72CBF98\n:10D0B000012E14D0A86A002808BFFFDF2889C21CEF\n:10D0C000D5E90910F1F7B9F9A86A68620022494662\n:10D0D000286BF6F71DFB022E08BFBDE8F087D4E9E8\n:10D0E0001410491C40F10000C4E91410E079012833\n:10D0F0000CBFE77184F80780BDE8F087012E06D0E9\n:10D10000286BF6F789FC022E08BFBDE8F087D4E94A\n:10D110001410491C40F10000C4E91410E079012802\n:10D12000BFD1BCE72DE9F041234D2846A5F13404D9\n:10D13000406800F170062078012818BFFFDFB07842\n:10D140000127002158B1B1706289042042F0040225\n:10D150006281626990472878002818BF3771216A78\n:10D160000322087832EA000009D1628912F4806F44\n:10D1700005D042F002026281626902209047A169F3\n:10D180000020884760B3607950BB287818B30E48F8\n:10D19000007810F0100F04D10449097811F0100F35\n:10D1A0001ED06189E1B9A16AA9B90FE0300D002054\n:10D1B000380F0020240100205801002004630200E1\n:10D1C000BB220200A7A8010032010020218911B171\n:10D1D00010F0100F04D0BDE8F0410020FFF7D5BBE0\n:10D1E000BDE8F04100F071B92DE9F05FCC4E044686\n:10D1F0003046A6F134054068002700F1700A28780F\n:10D20000B846022818BFFFDFA889FF2240F400704B\n:10D21000A881706890F864101046FBF730F89AF80F\n:10D2200012004FF00109002C00F0F080FAF77DFEAB\n:10D23000FAF76BFE90B99AF8120078B1686A4178F3\n:10D2400061B100789AF80710C0F3C000884205D198\n:10D2500085F80290BDE8F05F00F037B9686A417860\n:10D260002981002908BFAF6203D0286BF6F70AFABC\n:10D27000A862A88940F02000A881EF70706800F1D2\n:10D28000700B044690F82C0001281BD1FBF757FCCB\n:10D2900059462046F3F729FEA0B13078002870687F\n:10D2A0000CBF00F59A7000F50170218841809BF851\n:10D2B000081001719BF80910417180F80090E8791D\n:10D2C000E5F722FE686A9AF806100078C0F380003D\n:10D2D00088423AD0706800F1700490F87500002818\n:10D2E0002FD002284AD06771307800281CBF2079DF\n:10D2F000002809D027716A89394642F010026A81F4\n:10D300006A694FF010009047E078A0B1E770FCF731\n:10D31000EAF8002808BFFFDF08206A89002142F0F0\n:10D3200008026A816A699047D4E91210491C40F1E9\n:10D330000000C4E91210A07901280CBFA77184F87D\n:10D340000690A88940F48070A881696A9AF807302D\n:10D350000878C0F3C0029A424DD1726800F0030011\n:10D3600002F17004012818BF02282DD003281CBF29\n:10D37000687940F0040012D068713CE0E86AF6F782\n:10D38000BCF8002808BFFFDFD4E91210491C40F1A7\n:10D390000000C4E91210E879E5F7B6FDA3E784F8C8\n:10D3A0000290AA89484642F40062AA816A8942F042\n:10D3B00001026A816A699047E079012801D1E77129\n:10D3C00019E084F8079016E04878D8B1A98941F4AB\n:10D3D0000061A981A96A71B1FB2884BF687940F016\n:10D3E0001000C9D8A879002808BFC84603D08020FB\n:10D3F0006A69002190470120A9698847E0B36879EC\n:10D40000A0B13AE0E0790128DBD1D8E7002818BFC5\n:10D41000FAF7C5FDA88940F04000A881E97801200D\n:10D42000491CC9B2E97001292DD8E5E7307890B9D7\n:10D430003C48007810F0100F04D13B49097811F0F6\n:10D44000100F1AD06989B9B9A96A21B9298911B10E\n:10D4500010F0100F11D0B8F1000F1CBF0120FFF722\n:10D46000D1FDFFF74BFBB8F1000F08BFBDE8F09FFF\n:10D470000220BDE8F05FC5E5FFE7B8F1000F1CBF73\n:10D480000020FFF7BFFDBDE8F05F00F01EB870B5EB\n:10D490000D4606462248224900784C6850B1FAF7FA\n:10D4A000F7FD034694F8642029463046BDE87040F5\n:10D4B000FDF78BBAFAF7ECFD034694F86420294691\n:10D4C0003046BDE8704004F0FCBE154910B54C680C\n:10D4D000FBF714FBFBF7F3FAFBF7BCF9FBF768FA71\n:10D4E000FAF7FEFC94F82C00012808BFFBF727FB95\n:10D4F00094F86F0038B9A06E28B1002294F86E003D\n:10D500001146F8F7F0FB094C00216269A0899047A9\n:10D51000E2696179A07890470020207010BD00007A\n:10D520005801002032010020300D0020240100208D\n:10D530002DE9F047FA4F894680463D782C0014D0FB\n:10D540000126012D11DB601EC4B207EBC40090F868\n:10D550005311414506D10622494600F5AA70F0F75D\n:10D560003FFF28B1761CAE42EDDD1020BDE8F0870C\n:10D570002046BDE8F087EA498A78824286BF08449F\n:10D5800090F843010020704710B540F2D3120021FB\n:10D59000E348F0F77CFF0822FF21E248F0F777FF2D\n:10D5A000E1480021417081704FF46171818010BDAC\n:10D5B0002DE9F0410E460546FFF7BAFFD84C10287A\n:10D5C00016D004EBC00191F85A0110F0010F1CBFF6\n:10D5D0000120BDE8F081607808283CBF012081F877\n:10D5E0005A011CD26078401C60700120BDE8F081B7\n:10D5F0006078082813D222780127501C207004EB91\n:10D60000C2083068C8F85401B088A8F85801102A38\n:10D6100028BFFFDF88F8535188F85A71E2E70020ED\n:10D62000BDE8F081C04988707047BF488078704776\n:10D630002DE9F041BA4D00272878401E44B2002C55\n:10D6400030DB00BF05EBC40090F85A0110F0010F69\n:10D6500024D06878E6B2401E687005EBC6083046F4\n:10D6600088F85A7100F0E8FA102817D12878401E7F\n:10D67000C0B22870B04211D005EBC001D1F85301FF\n:10D68000C8F85301D1F85701C8F85701287800F0BD\n:10D69000D3FA10281CBF284480F80361601E44B2EE\n:10D6A000002CCFDAA0488770BDE8F0819C498A78C9\n:10D6B000824286BF01EB0010C01C002070472DE99C\n:10D6C000F0470127994690463D460026FFF730FF78\n:10D6D000102820D0924C04EBC00191F85A1101F0AF\n:10D6E000010600F0A9FA102815D0B9F1000F18BFF3\n:10D6F00089F80000A17881420DD904EB001111F1E5\n:10D70000030F08D0204490F84B5190F83B010128BA\n:10D710000CBF0127002748EA060047EA0501084038\n:10D72000BDE8F0872DE9F05F1F4690468946064622\n:10D73000FFF7FEFE7A4C054610282ED000F07CFA4A\n:10D7400010281CBF1220BDE8F09FA07808283ED208\n:10D75000A6781022701CA07004EB061909F10300D2\n:10D760004146F3F768FB09F1830010223946F3F7CD\n:10D7700062FB10213846F3F74BFB3444102184F848\n:10D7800043014046F3F744FB84F84B0184F803510E\n:10D79000002084F83B01BDE8F09FA078082816D24D\n:10D7A00025784FF0000A681C207004EBC50BD9F8EF\n:10D7B0000000CBF85401B9F80400ABF85801102D63\n:10D7C00028BFFFDF8BF853618BF85AA1C0E7072011\n:10D7D000BDE8F09F2DE9F041514CA078401E45B2C4\n:10D7E000002DB8BFBDE8F081EAB2A078401EC1B2FA\n:10D7F000A17054FA85F090F803618A423DD004EBA1\n:10D80000011004EB0213D0F803C0C3F803C0D0F832\n:10D8100007C0C3F807C0D0F80BC0C3F80BC0D0F8DE\n:10D820000FC0C3F80FC0D0F883C0C3F883C0D0F8CE\n:10D8300087C0C3F887C0D0F88BC0C3F88BC0D0F8BE\n:10D840008F00C3F88F006318A01801EB410193F813\n:10D8500003C102EB420204EB410180F803C104EB77\n:10D860004202D1F80BC1C2F80BC1B1F80F11A2F8F6\n:10D870000F1193F83B1180F83B1104EBC60797F8A2\n:10D880005A0110F0010F1CD1304600F0D5F91028D4\n:10D8900017D12078401EC0B22070B04211D004EBE6\n:10D8A000C000D0F85311C7F85311D0F85701C7F88A\n:10D8B0005701207800F0C0F910281CBF204480F8E0\n:10D8C0000361681E45B2002D8EDABDE8F08116496D\n:10D8D0004870704714484078704738B14AF2B81120\n:10D8E000884203D810498880012070470020704783\n:10D8F0000D488088704710B5FFF71AFE102804D035\n:10D9000000F09AF9102818BF10BD082010BD044976\n:10D910008A78824286BF01EB001083300020704776\n:10D92000600F00206C01002060010020FE4B93F886\n:10D9300002C084459CBF00207047184490F8030142\n:10D9400003EBC00090F853310B70D0F85411116004\n:10D95000B0F85801908001207047F34A114491F8C3\n:10D960000321F2490A700268C1F8062080884881C4\n:10D97000704770B516460C460546FBF7D5F8FAF722\n:10D98000C4F9EA48407868B1E748817851B12A196A\n:10D99000002E0CBF8330C01CFAF791F9FAF7D8F9C2\n:10D9A000012070BD002070BD10B5FAF7FFF9002806\n:10D9B00004BFFF2010BDBDE81040FAF71DBAFAF70A\n:10D9C000F5B9D9498A7882429CBF00207047084443\n:10D9D00090F8030101EBC00090F85A0100F001003B\n:10D9E00070472DE9F047D04D00273E4628780028A3\n:10D9F00086BF4FF01009DFF83883BDE8F087AC78B8\n:10DA000021000CD00122012909DB601EC4B22819B3\n:10DA100090F80331B34203D0521C8A42F5DD4C46E4\n:10DA2000A14286BF05EB0410C01C002005EBC60A0E\n:10DA30009AF85A1111F0010F16D050B1102C04D0E1\n:10DA4000291991F83B11012903D01021F3F7E0F9CE\n:10DA500050B108F8074038467B1C9AF853210AF564\n:10DA6000AA71DFB2FAF7B5FC701CC6B22878B042D2\n:10DA7000C5D8BDE8F0872DE9F041AB4C002635460E\n:10DA8000A07800288CBFAA4FBDE8F0816119C0B210\n:10DA900091F80381A84286BF04EB0510C01C00204A\n:10DAA00091F83B11012903D01021F3F7B1F958B1D6\n:10DAB00004EBC800BD5590F8532100F5AA7130461B\n:10DAC000731CDEB2FAF785FC681CC5B2A078A842C8\n:10DAD000DCD8BDE8F0810144934810B500EB02109A\n:10DAE0000A4601218330FAF7EAF8BDE81040FAF758\n:10DAF0002FB90A468D4910B5497841B18A4B9978BA\n:10DB000029B10244D81CFAF7DAF8012010BD002030\n:10DB100010BD854A01EB410102EB41010268C1F8E9\n:10DB20000B218088A1F80F0170472DE9F0417E4D4F\n:10DB300007460024A878002898BFBDE8F081C0B24D\n:10DB4000A04217D905EB041010F1830612D0102162\n:10DB50003046F3F75DF968B904EB440005EB400883\n:10DB600008F20B113A463046FBF74EFDB8F80F01AC\n:10DB7000A8F80F01601CC4B2A878A042DFD8BDE8A5\n:10DB8000F081014610226B48F3F755B96948704798\n:10DB900065498A78824203D90A1892F843210AB16A\n:10DBA0000020704700EB400001EB400000F20B103A\n:10DBB00070475D498A78824206D9084490F83B0153\n:10DBC000002804BF01207047002070472DE9F04174\n:10DBD0000E460746144606213046F3F719F9524D12\n:10DBE00098B1A97871B105F59D7011F0010F18BFBA\n:10DBF00000F8014FA978490804D0447000F8024F9A\n:10DC0000491EFAD10120BDE8F08138463146FFF7C0\n:10DC10008FFC10280CD000F00FF8102818BF08282F\n:10DC200006D0284480F83B414FF00100BDE8F08168\n:10DC30004FF00000BDE8F0813B4B10B4844698786B\n:10DC400001000ED0012201290BDB401EC0B21C18BE\n:10DC500094F80341644504BF10BC7047521C8A42CB\n:10DC6000F3DD10BC1020704770B52F4C01466218D0\n:10DC7000A078401EC0B2A07092F8035181423CD0FF\n:10DC800004EB011304EB001C01EB4101DCF8036021\n:10DC9000C3F80360DCF80760C3F80760DCF80B60CA\n:10DCA000C3F80B60DCF80F60C3F80F60DCF883602A\n:10DCB000C3F88360DCF88760C3F88760DCF88B60AA\n:10DCC000C3F88B60DCF88FC0C3F88FC0231800EB5B\n:10DCD000400093F803C104EB400082F803C104EB59\n:10DCE0004101D0F80BC1C1F80BC1B0F80F01A1F888\n:10DCF0000F0193F83B0182F83B0104EBC50696F84F\n:10DD00005A0110F0010F18BF70BD2846FFF794FFAD\n:10DD1000102818BF70BD2078401EC0B22070A842E5\n:10DD200008BF70BD08E00000600F00206001002007\n:10DD30006C0100203311002004EBC000D0F8531117\n:10DD4000C6F85311D0F85701C6F857012078FFF7ED\n:10DD500073FF10281CBF204480F8035170BD0000E1\n:10DD60004078704730B50546007801F00F0220F08A\n:10DD70000F0010432870092912D2DFE801F00507CF\n:10DD800005070509050B0F0006240BE00C2409E02C\n:10DD9000222407E001240020E87003E00E2401E0C3\n:10DDA0000024FFDF6C7030BD007800F00F0070477A\n:10DDB0000A68C0F803208988A0F807107047D0F8D7\n:10DDC00003200A60B0F80700888070470A68C0F82E\n:10DDD00009208988A0F80D107047D0F809200A6042\n:10DDE000B0F80D00888070470278402322F040028E\n:10DDF00003EA81111143017070470078C0F380106D\n:10DE000070470278802322F0800203EAC111114397\n:10DE1000017070470078C009704770B514460E460F\n:10DE200005461F2A88BFFFDF2246314605F109005B\n:10DE3000F0F703FBA01D687070BD70B544780E4606\n:10DE40000546062C38BFFFDFA01F84B21F2C88BFF9\n:10DE50001F24224605F109013046F0F7EEFA20466C\n:10DE600070BD70B514460E4605461F2A88BFFFDFF9\n:10DE70002246314605F10900F0F7DFFAA01D68706F\n:10DE800070BD0968C0F80F1070470A88A0F8132009\n:10DE900089784175704790F8242001F01F0122F025\n:10DEA0001F02114380F824107047072988BF0721FB\n:10DEB00090F82420E02322F0E00203EA411111430C\n:10DEC00080F8241070471F3008F065B810B504467C\n:10DED00000F000FB002818BF204410BDC17811F0ED\n:10DEE0003F0F1BBF027912F0010F0022012211F037\n:10DEF0003F0F1BBF037913F0020F002301231A44C5\n:10DF000002EB4202530011F03F0F1BBF027912F0E7\n:10DF1000080F0022012203EB420311F03F0F1BBF49\n:10DF2000027912F0040F00220122134411F03F0F76\n:10DF30001BBF027912F0200F0022012202EBC20265\n:10DF400003EB420311F03F0F1BBF027912F0100FD9\n:10DF50000022012202EB42021A4411F03F0F1BBFC4\n:10DF6000007910F0400F00200120104410F0FF0055\n:10DF700014BF012100210844C0B2704770B5027877\n:10DF8000417802F00F02082A4DD2DFE802F00408BF\n:10DF90000B4C4C4C0F14881F1F280AD943E00C2946\n:10DFA00007D040E0881F1F2803D93CE0881F1F28A6\n:10DFB00039D8012070BD4A1EFE2A34D88446C07864\n:10DFC00000258209032A09D000F03F04601C884222\n:10DFD00004D86046FFF782FFA04201D9284670BDF1\n:10DFE0009CF803004FF0010610F03F0F1EBF1CF11C\n:10DFF0000400007810F0100F13D06446042160462E\n:10E0000000F068FA002818BF14EB0000E6D0017891\n:10E0100001F03F012529E1D280780221B1EB501FA8\n:10E02000DCD3304670BD002070BD70B5017801258D\n:10E0300001F00F01002404290AD007290DD0082976\n:10E040001CBF002070BD40780E2836D0204670BD21\n:10E050004078801F1F2830D9F8E7844640789CF824\n:10E0600003108A09032AF1D001F03F06711C814296\n:10E07000ECD86046FFF732FFB042E7D89CF80300C7\n:10E0800010F03F0F1EBF1CF10400007810F0100FBD\n:10E0900013D066460421604600F01CFA002818BF21\n:10E0A00016EB0000D2D0017801F03F012529CDD236\n:10E0B00080780221B1EB501FC8D3284670BD10B440\n:10E0C000017801F00F01032920D0052921D14478DE\n:10E0D000B0F81910B0F81BC0B0F81730827D222CB0\n:10E0E00017D1062915D3B1F5486F98BFBCF5FA7F53\n:10E0F0000FD272B1082A98BF8A420AD28B429CBFC3\n:10E10000B0F81D00B0F5486F03D805E040780C2842\n:10E1100002D010BC0020704710BC012070472DE9D0\n:10E12000F0411F4614460D00064608BFFFDF21469A\n:10E13000304600F0CFF9040008BFFFDF30193A463F\n:10E140002946BDE8F041F0F778B9C07800F03F000B\n:10E150007047C02202EA8111C27802F03F021143E7\n:10E16000C1707047C07880097047C9B201F00102E0\n:10E17000C1F340031A4402EB4202C1F3800303EBF4\n:10E180004202C1F3C00302EB4302C1F3001303EBED\n:10E1900043031A44C1F3401303EBC30302EB4302EE\n:10E1A000C1F380131A4412F0FF0202D0521CD2B203\n:10E1B0000171C37802F03F0103F0C0031943C1703D\n:10E1C000511C417070472DE9F0410546C078164654\n:10E1D00000F03F041019401C0F46FF2888BFFFDFE6\n:10E1E000281932463946001DF0F727F9A019401CBE\n:10E1F0006870BDE8F081C178407801F03F01401AB5\n:10E20000401E80B2704710B590F803C00B460CF06A\n:10E210003F0144780CF03F0CA4EB0C0CACF1010C6A\n:10E220001FFA8CF4944288BF14462BB10844011D98\n:10E2300022461846F0F701F9204610BD4078704795\n:10E2400000B5027801F0030322F003021A430270C2\n:10E25000012914BF0229002104D0032916BFFFDFC2\n:10E26000012100BD417000BD00B5027801F003033B\n:10E2700022F003021A430270012914BF022900216F\n:10E2800004D0032916BFFFDF012100BD417000BD8E\n:10E29000007800F003007047417841B1C078192838\n:10E2A00003D2BC4A105C884201D101207047002093\n:10E2B000704730B501240546C17019293CBFB548E7\n:10E2C000445C02D3FF2918BFFFDF6C7030BD70B50E\n:10E2D00015460E4604461B2A88BFFFDF65702A4696\n:10E2E0003146E01CBDE87040F0F7A7B8B0F8070071\n:10E2F0007047B0F809007047C172090A017370478E\n:10E30000B0F80B00704730B4B0F80720B0F809C07F\n:10E31000B0F805300179941F40F67A45AC4298BFB9\n:10E32000BCF5FA7F0ED269B1082998BF914209D293\n:10E3300093429FBFB0F80B00B0F5486F012030BC8E\n:10E3400098BF7047002030BC7047001D07F023BE07\n:10E35000021D0846114607F01EBEB0F809007047BE\n:10E36000007970470A684260496881607047426876\n:10E370000A60806848607047098881817047808999\n:10E38000088070470A68C0F80E204968C0F812106B\n:10E390007047D0F80E200A60D0F81200486070472D\n:10E3A0000968C0F816107047D0F81600086070476A\n:10E3B0000A68426049688160704742680A60806804\n:10E3C000486070470968C1607047C068086070475E\n:10E3D000007970470A684260496881607047426806\n:10E3E0000A608068486070470171090A417170478E\n:10E3F0008171090AC17170470172090A417270473F\n:10E400008172090AC172704780887047C08870475E\n:10E41000008970474089704701891B2924BF4189C1\n:10E42000B1F5A47F07D381881B2921BFC088B0F52F\n:10E43000A47F01207047002070470A684260496845\n:10E440008160704742680A6080684860704701795F\n:10E4500011F0070F1BBF407910F0070F00200120BB\n:10E460007047017911F0070F1BBF407910F0070FBB\n:10E470000020012070470171704700797047417199\n:10E480007047407970478171090AC1717047C0882F\n:10E4900070470179407901F007023F498A5C012AFF\n:10E4A00006D800F00700085C01289CBF01207047D7\n:10E4B00000207047017170470079704741717047C3\n:10E4C0004079704730B50C460546FB2988BFFFDF11\n:10E4D0006C7030BDC378024613F03F0008BF704730\n:10E4E0000520127903F03F0312F0010F37D0002905\n:10E4F00014BF0B20704700BF12F0020F32D0012969\n:10E5000014BF801D704700BF12F0040F2DD00229E8\n:10E5100014BF401C704700BF12F0080F28D0032919\n:10E5200014BF801C704700BF12F0100F23D00429C5\n:10E5300014BFC01C704700BF12F0200F1ED0052969\n:10E540001ABF1230C0B2704712F0400F19D006291E\n:10E550001ABF401CC0B27047072918D114E0002927\n:10E56000CAD114E00129CFD111E00229D4D10EE0A3\n:10E570000329D9D10BE00429DED108E00529E3D134\n:10E5800005E00629E8D102E0834288BF70470020F9\n:10E5900070470000246302001C63020030B490F84E\n:10E5A00064508C88B1F808C015F00C0F1BD000BF68\n:10E5B000B4F5296F98BF4FF4296490F8655015F0B1\n:10E5C0000C0F17D0BCF5296F98BF4FF4296C4A88FF\n:10E5D000C988A0F84420A0F84810A0F84640A0F848\n:10E5E0004AC030BC7047002B1CBF157815F00C0FCB\n:10E5F000DED1E2E7002B1CBF527812F00C0FE1D104\n:10E60000E5E7DDF800C08181C2810382A0F812C075\n:10E6100070471B2202838282C281828142800281F2\n:10E62000028042848284828359B14FF429614183FC\n:10E63000C18241820182C18041818180C184018582\n:10E6400070474FF4A4714183C18241820182C1802D\n:10E6500041818180C18401857047F0B4B0F84820C1\n:10E66000818F468EC58E8A4228BF0A4690F8651073\n:10E670004FF0000311F00C0F18BF4FF4296106D1C1\n:10E68000B0F84AC0B0F840108C4538BF61464286A9\n:10E69000C186048FB0F83AC0944238BF14468C4506\n:10E6A00038BF8C460487A0F83AC0B2420ABFA942DC\n:10E6B0004FF0010C4FF0000C058EB0F84410C28FE3\n:10E6C000848E914228BF114690F8642012F00C0FFE\n:10E6D00018BF4FF4296206D1B0F84660B0F8422066\n:10E6E000964238BF324690F85A60022E0AD0018610\n:10E6F0008286A9420ABFA2420120002040EA0C0003\n:10E70000F0BC70478D4238BF2946944238BF22463C\n:10E7100080F85A30EBE7508088899080C889D08093\n:10E72000088A1081488A508101201070704730B4E7\n:10E7300002884A80B0F830C0A1F804C0838ECB8034\n:10E74000428E0A81C48E4C81B0F85650A54204BF57\n:10E75000B0F85240944208D1B0F858409C4202BFF1\n:10E76000B0F854306345002301D04FF001030B7320\n:10E7700000F13003A0F852201A464B89D3848B88CD\n:10E780009384CA88A0F858204FF00100087030BC6C\n:10E79000704730B404460A46088E91F864104FF46E\n:10E7A000747311F00C0F1CBF03EB801080B21ED0ED\n:10E7B000918E814238BF0846118F92F865C01CF0D7\n:10E7C0000C0F1CBF03EB811189B218D0538F8B4201\n:10E7D00038BF194692F866301CF00C0F08BF0023B2\n:10E7E000002C0CBF0122002230BCF2F798BC022999\n:10E7F00007BF80003C30C000703080B2D8E7BCF169\n:10E80000020F07BF89003C31C900703189B2DDE7D2\n:10E810002DE9F041044606F099FCC8B9FE4F78682E\n:10E8200090F8221001260025012914D00178012931\n:10E830001BD090F8281001291CBF0020BDE8F081F2\n:10E84000657018212170D0F82A10616080F8285076\n:10E850000120BDE8F081657007212170416A616087\n:10E8600080F822500120BDE8F081657014212170EC\n:10E87000811C2022201DEFF7E0FD257279680D70C4\n:10E8800081F82850E54882888284C26B527B80F8E8\n:10E89000262080F82260C86B0088F5F738FCF5F771\n:10E8A000E0F8D5E7DC4840680178002914BF80888B\n:10E8B0004FF6FF70704730B5D74C83B00D462078C7\n:10E8C0007F2808BFFFDF94F900307F202070D4F844\n:10E8D00004C09CF85000062808BF002205D09CF810\n:10E8E000500008280CBF022201229CF85400CDE9F8\n:10E8F000000302929CF873309CF880200CF13201E6\n:10E90000284606F08FFC03B0BDE8304006F01FBE7D\n:10E910002DE9F04106F05FFC002818BF06F0E4FB8B\n:10E92000BD4C606800F1840290F87610895C80F834\n:10E930008010002003F07EF828B3FAF753F86068DF\n:10E94000B74990F855000D5C2846F9F7A3FD6068BB\n:10E950004FF0000680F8735090F8801011F00C0F03\n:10E960000CBF25200F20F9F76CFC606890F8801030\n:10E970000120F9F711FE606890F84010032918BFD4\n:10E9800002290FD103E0BDE8F04101F02FB990F862\n:10E9900076108430085C012804D101221146002041\n:10E9A000FAF707F9FAF7D5F8606890F88050012D6A\n:10E9B00007BF0127032100270521A068FFF799F869\n:10E9C000616881F8520040B1002F18BF402521D066\n:10E9D000F9F787F92846FAF79DF86068806DFAF72D\n:10E9E0000DF8606890F85410FF291CBF6D30FEF7D9\n:10E9F000B4FFFF21606880F8531080F8541080F84D\n:10EA0000626080F8616080F87D60062180F85010B7\n:10EA1000BDE8F08115F00C0F14BF55255025D7E740\n:10EA200070B57D4C0646606800F150052046806850\n:10EA300041B1D0F80510C5F81D10B0F80900A5F8CF\n:10EA4000210003E005F11D01FFF7B9F9A068FFF708\n:10EA5000D4F985F82400A0680021032E018002D09B\n:10EA6000052E04D03DE00321FFF77CF939E00521B4\n:10EA7000FFF778F96068C06B00F10E01A068FFF73E\n:10EA800000FA6068C06B00F11201A068FFF7FDF9A1\n:10EA9000D4E90110CA6B527D8275CA6BD28AC275E5\n:10EAA000120A0276CA6B52884276120A8276CA6BC2\n:10EAB0009288C276120A0277CA6BD2884277120A0B\n:10EAC0008277C96B0831FFF7FEF96068C06B017E81\n:10EAD000A068FFF7E0F9606890F88610A068FFF77B\n:10EAE000E4F905F11D01A068FFF770F995F824100D\n:10EAF000A068FFF786F9606800F1320590F8316090\n:10EB000090F8511091B190F84010032906D190F877\n:10EB10003910002918BF90F8560001D190F8530021\n:10EB2000FFF736F800281CBF012605462946A068D5\n:10EB3000FFF73EF93146A068BDE87040FFF754B9D1\n:10EB40003549496881F84B00704770B5324D002453\n:10EB50000126A8606968A1F8814081F8834081F8A6\n:10EB6000506091F85020022A1FBF91F850100129DF\n:10EB7000FFDF70BD06F0CDFA6868047080F82240AF\n:10EB800080F8284090F8520030B1F9F7CDFFF9F73E\n:10EB9000BCF8686880F852406868072180F84A40ED\n:10EBA00080F8396080F8404080F8554080F84B404C\n:10EBB00080F87D4080F8381070BD2DE9F041164C8A\n:10EBC000054686B0606890F85000012818BF0228FA\n:10EBD00005D003281EBF0C2006B0BDE8F081687A7E\n:10EBE000022839D0F9F76FFB0220F9F701FF0D4930\n:10EBF00001F10C0090E80D108DE80D10D1E907012E\n:10EC0000CDE904016846F9F7E1FE606890F94B0030\n:10EC1000F9F732FCA06807E07401002044110020DD\n:10EC20004363020040630200F9F7E5FEFC48F9F790\n:10EC3000B9FEFC48F9F726FC606890F831103230D4\n:10EC4000F9F7A5FB0F210720F9F7BFFB606890F8E3\n:10EC50003900E0B1FEF70FFF6168287A01F1840204\n:10EC600081F87600287A805C81F880006868886581\n:10EC70002A68CA65687A68B1012824D00525022867\n:10EC800008BF81F850506FD0032878D080E0FEF79D\n:10EC9000A8FEE1E7E44B91F83850002291F85500C6\n:10ECA000401CA3FB006C4FEA5C0CACEB8C0C60448A\n:10ECB00081F8550025FA00F010F0010F03D1501C27\n:10ECC000C2B2032AEAD3002681F87D6091F8490098\n:10ECD000002804BF91F85100002841D0F7F744FA0A\n:10ECE000074660683946406CF7F736FFDFF83C832B\n:10ECF000054690FBF8F008FB105041423846F6F705\n:10ED00001AFF6168486495FBF8F08A6F10448867C1\n:10ED1000FEF7EEFD01466068826F914220D847649D\n:10ED2000866790F8510000281CBF0120FEF7FDFE09\n:10ED30000121606890F84A20002A1CBF90F8492001\n:10ED4000002A0DD090F8313000F13202012B04D1AD\n:10ED5000527902F0C002402A08D03230FAF78CFC17\n:10ED60006168042081F8500012E008E00125FEF7F8\n:10ED70000DFF61682A463231FAF746FCF0E7002AB7\n:10ED800018BFFFDF012000F089FF606880F8505055\n:10ED900006B00020BDE8F08170B5A54D686890F818\n:10EDA000501004292ED005291CBF0C2070BD90F8EE\n:10EDB0007D100026002990F883104FEA511124D0CD\n:10EDC000002908BF012407D0012908BF022403D06D\n:10EDD000022914BF00240824C06D00281CBF002095\n:10EDE00000F05CFF6868806DF9F708FE686890F8CD\n:10EDF0004010022943D0032904BF90F86C10012968\n:10EE000041D04DE0FFF784FD52E0002908BF012406\n:10EE100007D0012908BF022403D0022914BF00240F\n:10EE20000824C06D00281CBF002000F037FF686870\n:10EE3000806DF9F7E3FD686890F84010022906D06C\n:10EE4000032904BF90F86C10012904D010E090F859\n:10EE50006C1002290CD1224614F00C0F04D090F84B\n:10EE60004C00012808BF042201210020F9F7A1FE6F\n:10EE70006868072180F8804080F8616016E090F8AB\n:10EE80006C1002290CD1224614F00C0F04D090F81B\n:10EE90004C00012808BF042201210020F9F789FE57\n:10EEA0006868082180F8804080F8616080F8501020\n:10EEB000002070BD5E49002210F0010F496802D0A9\n:10EEC000012281F8842010F0080F03D0114408209B\n:10EED00081F88400002070475549496881F848004E\n:10EEE000704710B5524C636893F83030022B14BF52\n:10EEF000032B00280BD100291ABF02290120002072\n:10EF00001146FEF7F8FC08281CBF012010BD606800\n:10EF100090F83000002816BF022800200120BDE82C\n:10EF20001040FAF731BB4248406890F830000028A2\n:10EF300016BF022800200120FAF726BB3C49496889\n:10EF400081F8300070473A49496881F84A007047B3\n:10EF500070B5374C616891F83000002816BF022860\n:10EF60000020012081F8310001F13201FAF7F6FAB0\n:10EF7000606890F83010022916BF03290121002192\n:10EF800080F8511090F8312000F132034FF0000565\n:10EF9000012A04BF5B7913F0C00F0AD000F13203DD\n:10EFA000012A04D15A7902F0C002402A01D000227D\n:10EFB00000E0012280F84920002A04BF002970BD2A\n:10EFC0008567F7F7D1F86168486491F85100002827\n:10EFD0001CBF0020FEF7A9FD0026606890F84A10CB\n:10EFE00000291ABF90F84910002970BD90F831200F\n:10EFF00000F13201012A04D1497901F0C001402910\n:10F0000005D02946BDE870403230FAF735BBFEF72F\n:10F01000BDFD61683246BDE870403231FAF7F4BA9E\n:10F020004063020046630200ABAAAAAA40420F0056\n:10F030007401002070B5FF4D0C4600280CBF012361\n:10F040000023696881F8393081F842004FF00800E8\n:10F0500081F856000CD1002C1ABF022C0120002090\n:10F060001146FEF748FC6968082881F8560001D06F\n:10F07000002070BD022C14BF032C1220F8D170BDEB\n:10F08000002818BF112070470328EA4A526808BFB9\n:10F09000D16382F840000020704710B5E54C6068ED\n:10F0A00090F8401003291CBF002180F8601001D0A7\n:10F0B000002010BD0123C16B1A460020F2F738F87A\n:10F0C0006168CA6B526A904294BF0120002081F8A7\n:10F0D0006000EDE7D748416891F84000032804D06C\n:10F0E000012818BF022807D004E091F84200012847\n:10F0F00008BF70470020704791F84100012814BFF5\n:10F1000003280120F6D1704770B5F9F7F7FCF9F73D\n:10F11000D6FCF9F79FFBF9F74BFCC64C002560685D\n:10F1200090F8520030B1F9F7FFFCF8F7EEFD606897\n:10F1300080F8525060680121A0F8815080F8835017\n:10F1400080F8501080F82850002070BDB94810B5E4\n:10F150004068643006F0B1FB002010BDB5480121C5\n:10F16000406890F84020032A03BF80F82A10C26B41\n:10F170001288002218BF80F82A20828580F8281083\n:10F180007047AC49496881F88600704701780023D0\n:10F1900011F0010FA749496809D04278032A08BF36\n:10F1A000CB6381F84020012281F884201346027845\n:10F1B00012F0040F0CD082784FF0000C032A08BF25\n:10F1C000C1F83CC081F840200B44082283F8842019\n:10F1D000C27881F830200279002A16BF022A012362\n:10F1E000002381F8393081F84120427981F83820B4\n:10F1F000807981F848004FF0000070478D484068E2\n:10F200008030704770B58B4C06460D46606890F8AC\n:10F210005000032818BFFFDF022E1EBF032EFFDFA2\n:10F2200070BD002D18BF06F0A1F900216068A0F89C\n:10F23000811080F88310012180F8501070BD00F01B\n:10F24000D5BC2DE9F0477B4C0646894660684FF0F7\n:10F250000108072E90F8397038BF032540D3082ED7\n:10F2600084BF0020BDE8F08790F85010062908BF41\n:10F27000002105D090F8501008290CBF022101216F\n:10F2800090F8800005F0AEFF002873D1A068C17827\n:10F2900011F03F0F12D0027912F0010F0ED0616809\n:10F2A0004FF0050591F85220002A18BFB9F1000F60\n:10F2B00016D091F88010012909D011E011F03F0F0C\n:10F2C0001ABF007910F0100F002F53D14CE04FF00F\n:10F2D00001024FF00501FEF74CFB616881F8520016\n:10F2E000A16808782944C0F3801030B1487900F053\n:10F2F000C000402808BF012000D00020616891F8BC\n:10F300005210002918BF002807D0FEF74DFB014618\n:10F31000606880F8531080F86180606890F853103E\n:10F32000FF292AD080F854100846FEF74AFB40EA2D\n:10F330000705606890F85320FF2A18BF002D10D0F1\n:10F34000072E0ED3A068C17811F03F0F09D00179C4\n:10F3500011F0020F05D00B21FEF7BDFB606880F8AD\n:10F3600062802846BDE8F087FEF75FF9002808BFF5\n:10F37000BDE8F0870120BDE8F087A36890F8392048\n:10F3800059191B78C3F3801C00F153036046FEF744\n:10F3900096F90546CDE72DE9F043264C87B0A068E5\n:10F3A000FEF7E0FE7F264FF00108002558B1022746\n:10F3B00001287DD0022800F0EF80F9F74BFA07B062\n:10F3C0000620BDE8F083F9F745FA616891F840003E\n:10F3D000032800F01581A068C27812F03F0F05D015\n:10F3E000037913F0100F18BF012700D10027002F59\n:10F3F00014BF0823012312F03F0F00F001810079B0\n:10F4000033EA000240F0FC8010F0020F08D091F8BF\n:10F410008000002105F064FE002808BF012000D014\n:10F4200000208DF80C508DF810508DF814504FF0CE\n:10F43000FF0801E074010020D0B105AA03A904A8C7\n:10F4400000F07AFC606890F831809DF80C0000288C\n:10F4500018BF48F002080BD1A068FEF7DBFC81461C\n:10F460000121A068FEF732FD4946F8F79AFF28B35C\n:10F47000FFB1012000F0DDFB002852D020787F286A\n:10F4800008BFFFDF94F900102670606890F85420E0\n:10F49000CDE90021029590F8733090F8802000F1BA\n:10F4A0003201404605F0BEFE606880F86C50A3E073\n:10F4B00038E041460020FFF7FEF9A1E0606890F8CF\n:10F4C0004100032818BF02282BD19DF81000002806\n:10F4D00027D09DF80C00002823D1F7B1012000F0BF\n:10F4E000A8FB00281DD020787F2808BFFFDF94F9F3\n:10F4F00000102670606890F85420CDE90021029534\n:10F5000090F8733090F8802000F13201FE2005F071\n:10F5100089FE606880F86C506EE0FE210020FFF7E5\n:10F52000CAF96DE0F9F796F9A0681821C27812F0CF\n:10F530003F0F65D00279914362D10421FEF7C6FCEA\n:10F54000616891F84020032A01BF8078B7EB501F13\n:10F5500091F86000002853D04FF0010000F069FBE3\n:10F56000E8B320787F2808BFFFDF94F900102670E9\n:10F57000606890F85420CDE90021029590F873302E\n:10F5800090F8802000F13201FF2005F04BFE60680A\n:10F5900080F86C8030E000BFF9F75CF9606890F8A3\n:10F5A000400003282CD0A0681821C27812F03F0F29\n:10F5B00026D0007931EA000022D1012000F039FB89\n:10F5C00068B120787F2808BFFFDF94F9001026700B\n:10F5D000606890F85420CDE90021029500E00FE02A\n:10F5E00090F8733090F8802000F13201FF2005F090\n:10F5F00019FE606880F86C7007B00320BDE8F083E6\n:10F6000007B00620BDE8F083F0B5FE4C074683B096\n:10F6100060686D460078002818BFFFDF002661682B\n:10F620008E70C86B02888A8042884A8382888A8367\n:10F63000C088C88381F8206047B10121A068FEF727\n:10F6400045FC0546A0680078C10907E06946A06846\n:10F65000FEF7B5FBA0680078C0F380116068012751\n:10F6600090F85120002A18BF002904D06A7902F0CE\n:10F67000C002402A26D090F84A20002A18BF00294C\n:10F6800003D0697911F0C00F1CD000F10E00E3F730\n:10F69000B3FC616891F85400FF2819D001F1080209\n:10F6A000C91DFEF743F9002808BFFFDF6068C17974\n:10F6B00041F00201C171D0F86D104161B0F87110D4\n:10F6C00001830FE02968C0F80E10A9884182E0E7A5\n:10F6D000C86B427ECA71D0F81A208A60C08B8881BC\n:10F6E0004E610E8360680770C26B90F84B1082F811\n:10F6F0006710C06B0088F4F70AFDF4F7A3F903B0B4\n:10F70000F0BD2DE9F041BF4C0546002760684FF081\n:10F7100001083E4690F84000012818BF022802D098\n:10F72000032818BFFFDF5DB1A068FEF727FC18B9FA\n:10F73000A068FEF77AFC18B100F08FFB074645E0A1\n:10F74000606890F850007F25801F06283ED2DFE8D1\n:10F7500000F003191924352FAA48F9F709FA0028EF\n:10F7600008BF2570F9F7EBF9606890F8520030B1E6\n:10F77000F9F7DAF9F8F7C9FA606880F85260F9F732\n:10F7800069F830E09F48F9F7F3F9002808BF2570C1\n:10F79000F9F7D5F905F0EAFEC3E09A48F9F7E8F978\n:10F7A000002808BF2570F9F7CAF9F9F753F81AE0ED\n:10F7B0009448F9F7DDF930B9257004E09148F9F77C\n:10F7C000D7F90028F8D0F9F7BAF9AAE0102F80F09D\n:10F7D0003881DFE807F01E9DA6AAF1F108B3F2F127\n:10F7E000F1F10C832051BDE8F041FFF791B80320FF\n:10F7F00002F020F9002870D000210320FFF710F953\n:10F80000012211461046F9F7D4F961680C2081F8FD\n:10F810005000BDE8F081606800F15005042002F05E\n:10F8200009F900287DD00E202870012002F0FDFC8F\n:10F83000A06861680078C0F3401081F8750000216D\n:10F840000520FFF7EDF87048A1684FF0200CC26B5F\n:10F850000B78527B23F020030CEA42121A430A7001\n:10F86000C16B95F825304A7B1A404A73C06B28213A\n:10F8700080F86610BDE8F081062002F0DBF8002871\n:10F880004FD0614D0F2085F85000022002F0CDFCD2\n:10F890006068012190F880200846F9F78AF9A0688D\n:10F8A00061680078C0F3401081F8750001210520DF\n:10F8B000FFF7B6F8E86B80F80D80A068017821F0BA\n:10F8C00020010170F9F75DFD002818BFFFDF282037\n:10F8D000E96B81F86600BDE8F08122E0052002F0C6\n:10F8E000A9F8F0B101210320FFF79AF8F9F749FDD3\n:10F8F000002818BFFFDF6068012190F880200846CB\n:10F90000F9F757F961680D2081F85000BDE8F081E2\n:10F910006068A0F8816080F8836080F85080BDE85E\n:10F92000F081BDE8F04100F061B96168032081F821\n:10F930005000BDE8F041082002F077BC606890F804\n:10F940008310490908BF012507D0012908BF0225F6\n:10F9500003D0022914BF00250825C06D00281CBF54\n:10F96000002000F09BF96068806DF9F747F8606847\n:10F9700090F84010022906D0032904BF90F86C10BB\n:10F98000012904D010E090F86C1002290CD12A460D\n:10F9900015F00C0F04D090F84C00012808BF042289\n:10F9A00001210020F9F705F96068072180F88050EF\n:10F9B00080F8616041E000E043E0606890F8831007\n:10F9C000490908BF012507D0012908BF022503D036\n:10F9D000022914BF00250825C06D00281CBF002087\n:10F9E00000F05CF96068806DF9F708F8606890F8DD\n:10F9F000401002290AD0032904BF90F86C10012995\n:10FA000008D014E0740100204411002090F86C101C\n:10FA100002290CD12A4615F00C0F04D090F84C00A6\n:10FA2000012808BF042201210020F9F7C2F860680C\n:10FA3000082180F8805080F8616080F85010BDE89F\n:10FA4000F081FFDFBDE8F08170B5FE4C606890F892\n:10FA5000503000210C2B38D001220D2B40D00E2B22\n:10FA600055D00F2B1CBFFFDF70BD042002F0DDFB63\n:10FA7000606890F880100E20F8F7E3FB606890F85B\n:10FA8000800010F00C0F14BF282100219620F8F7F9\n:10FA9000D3FFF9F75EF86068052190F88050A06800\n:10FAA000FEF727F8616881F8520048B115F00C0F95\n:10FAB0000CBF50255525F8F714F92846F9F72AF810\n:10FAC00061680B2081F8500070BDF9F742F8002101\n:10FAD0009620F8F7B1FF6168092081F8500070BDE9\n:10FAE00090F88010FF20F8F7ACFB606890F8800079\n:10FAF00010F00C0F14BF282100219620F8F79CFF6E\n:10FB0000F9F727F861680A2081F8500070BDA0F865\n:10FB1000811080F8831080F850200020FFF774FDDA\n:10FB2000BDE87040032002F080BB70B5C54C606832\n:10FB300090F850007F25801F062828BF70BDDFE8A1\n:10FB400000F0171F1D032A11BE48F9F711F800280D\n:10FB500008BF2570F8F7F3FFF8F77CFEBDE87040AA\n:10FB6000FEF7D6BEB748F9F703F8C8B9257017E015\n:10FB7000B448F8F7FDFF40B9257006E005F0F6FC43\n:10FB8000B048F8F7F5FF0028F6D0F8F7D8FFBDE841\n:10FB9000704000F02BB8AB48F8F7EAFF0028E5D03A\n:10FBA000F8F7CDFF60680021643005F037FEBDE84E\n:10FBB000704000F01BB870B5A24C06460D460129F6\n:10FBC00008D0606890F880203046BDE87040134649\n:10FBD00002F077BBF8F75CFA61680346304691F8AB\n:10FBE00080202946BDE8704002F06BBB70B5F8F785\n:10FBF00085FFF8F764FFF8F72DFEF8F7D9FE914C72\n:10FC00000025606890F8520030B1F8F78DFFF8F7E2\n:10FC10007CF8606880F852506068022180F85010CB\n:10FC2000A0F8815080F88350BDE87040002002F0B9\n:10FC3000FCBA70B5834D06460421A868FEF746F964\n:10FC4000044605F0C8FA002808BF70BD207800F00F\n:10FC50003F00252814D2F8F761FA217811F0800FBF\n:10FC60000CBF1E214FF49671B4F80120C2F30C02B0\n:10FC700012FB01F10A1AB2F5877F28BF814201D237\n:10FC8000002070BD68682188A0F88110A17880F8F4\n:10FC900083103046BDE8704001F0CCBE2DE9F04144\n:10FCA000684C0746606800F1810690F883004009BF\n:10FCB00008BF012507D0012808BF022503D002286C\n:10FCC00014BF00250825F8F78DFE307800F03F06B8\n:10FCD0003046F8F7DFFB606880F8736090F86C00DE\n:10FCE00002280CBF4020FF202946F8F7AAFA27B1C6\n:10FCF00029460120F8F795FC05E060682A46C16DA9\n:10FD00000120F8F7E2FCF8F724FF0521A068FDF7D1\n:10FD1000F0FE6168002881F8520008BFBDE8F0815C\n:10FD200015F00C0F0CBF50245524F7F7DAFF2046CE\n:10FD3000BDE8F041F8F7EEBE2DE9F74F414C002544\n:10FD4000914660688A4690F8510000280CBF4FF039\n:10FD500001084FF00008A0680178CE090121FEF7E4\n:10FD6000B5F836B1407900F0C000402808BF012640\n:10FD700000D00026606890F85210002961D090F8F9\n:10FD800040104FF0000B032906D190F839100029DC\n:10FD900018BF90F856700ED1A068C17811F03F0FCF\n:10FDA0001CBF007910F0010F02D105F061F940B3DA\n:10FDB000606890F85370FF2F18BF082F21D0384685\n:10FDC000FDF7D9FB002818BF4FF00108002E38D0EE\n:10FDD000606890F8620030B1FDF7F1FD054660689B\n:10FDE00080F862B02DE03846FDF791FD054601210F\n:10FDF000A068FEF76BF801462846F9F7D3FB0546E5\n:10FE00001FE0F6B1606890F86100D0B9A068C178D1\n:10FE100011F03F0F05D0017911F0010F18BF0B2130\n:10FE200000D105210022FDF7A4FD616881F8520090\n:10FE300038B1FDF7B9FDFF2803D06168012581F8CD\n:10FE4000530001E0740100208AF800500098067009\n:10FE500089F8008003B0BDE8F08F2DE9F04FFF4C2A\n:10FE600087B00025606890F850002E46801F4FF044\n:10FE70007F08062880F0D581DFE800F00308088BB2\n:10FE8000FDDB00F0F8FB054600F0CCB9F348F8F7CD\n:10FE90006FFE002808BF84F80080F8F750FEA068C5\n:10FEA000FDF782FF0546072861D1A068FEF75AF9E1\n:10FEB0000146606890F86C208A4258D190F8501042\n:10FEC000062908BF002005D090F8500008280CBF74\n:10FED0000220012005F08AF970B90321A068FDF71E\n:10FEE000F5FF002843D001884078C1F30B010009D9\n:10FEF00005F07BFC00283AD000212846FFF7A1F945\n:10FF0000A0B38DF80C608DF808608DF8046062680D\n:10FF1000FF2592F8500008280CBF02210121A0689B\n:10FF2000C37813F03F0F1CBF007910F0020F12D0FE\n:10FF300092F8800005F0D4F868B901AA03A902A8D4\n:10FF4000FFF7FAFE606890F831509DF80C00002829\n:10FF500018BF45F002052B469DF804209DF80810B7\n:10FF60009DF80C0000F0D5F9054603E0FFE705F029\n:10FF7000FDFA0225606890F85200002800F05281D6\n:10FF8000F8F7D2FDF7F7C1FE606880F8526000F024\n:10FF900049B9A068FDF708FF0646A1686068CA78FD\n:10FFA00090F86D309A4221D10A7990F86E309A42D9\n:10FFB0001CD14A7990F86F309A4217D18A7990F81B\n:10FFC00070309A4212D1CA7990F871309A420DD1AC\n:10FFD0000A7A90F872309A4208D1097890F8740041\n:10FFE000C1F38011814208BF012500D00025F8F738\n:10FFF00031FC9A48F8F7BCFD002808BF84F800805F\n:020000040002F8\n:10000000F8F79DFD042E11D185B120787F2808BF17\n:10001000FFDF94F9003084F80080606890F8732066\n:1000200090F87D1090F8540005F06EFB062500F066\n:10003000F9B802278948F8F79BFD002808BF84F823\n:100040000080F8F77CFDA068FDF7AEFE0546A068CD\n:10005000FEF788F8082D08BF00287CD1A0684FF073\n:100060000301C27812F03F0F75D0007931EA000029\n:1000700071D1606800E095E000F1500890F8390017\n:10008000002814BF98F8066098F803604FF0000944\n:1000900098F8020078B1FDF787FC0546FF280AD0E2\n:1000A0000146A068401DFDF758FCB5420CBF4FF05B\n:1000B00001094FF000090021A068FDF707FF0622A3\n:1000C00008F11D01EEF78CF940B9A068FDF795FE27\n:1000D00098F82410884208BF012000D0002059EA77\n:1000E00000095DD0606800F1320590F831A098F801\n:1000F000010038B13046FDF74BFD00281CBF054616\n:100100004FF0010A4FF00008A06801784FEAD11BB8\n:100110000121FDF7DBFEBBF1000F07D0407900F0B5\n:10012000C000402808BF4FF0010B01D04FF0000B7A\n:100130000121A068FDF7CAFE06222946EEF750F914\n:1001400030B9A068FDF766FE504508BF012501D013\n:100150004FF0000500E023E03BEA050018BFFF2E4A\n:100160000DD03046FDF7D3FB060008D00121A06872\n:10017000FDF7ACFE01463046F9F714FA804645EA31\n:10018000080019EA000F0BD060680121643005F007\n:1001900045FB01273846FFF737FA052002F045F8FE\n:1001A0003D463FE002252D48F8F7E2FC002808BF55\n:1001B00084F80080F8F7C3FCA068FDF7F5FD06465B\n:1001C000A068FDF7CFFF072E08BF00282AD1A0683E\n:1001D0004FF00101C27812F03F0F23D00279914312\n:1001E00020D1616801F150060021FDF76FFE062263\n:1001F00006F11D01EEF7F4F8A0B9A068FDF7FDFDCA\n:1002000096F8241088420DD160680121643005F011\n:1002100005FBFF21022000F009F8002818BF032584\n:1002200000E0FFDF07B02846BDE8F08F2DE9F0437E\n:100230000A4C0F4601466068002683B090F87D2086\n:10024000002A35D090F8500008280CBF022501255F\n:10025000A168C87810F03F0F02E000007401002090\n:10026000FD484FF000084FF07F0990F900001CBFD7\n:10027000097911F0100F22D07F2808BFFFDF94F911\n:10028000001084F80090606890F85420CDE90021B7\n:10029000029590F8733090F8802000F132013846D2\n:1002A00004F0C0FF05F0AAFA10B305F050F92CE0F5\n:1002B000002914BF0221012180F87D10C2E77F28A8\n:1002C00008BFFFDF94F9001084F80090606890F890\n:1002D0005420CDE90021029590F8733090F88020E9\n:1002E00000F13201384604F09DFF05F030F90CE0D2\n:1002F0000220FFF79EFC30B16068012680F86C8018\n:10030000F8F7A8FA01E005F031F903B03046BDE88E\n:10031000F0832DE9F047D04C054684B09A46174645\n:100320000E46A068FDF71EFF4FF00109002800F0FF\n:10033000CF804FF00208012808D0022800F00E817B\n:1003400005F014F904B04046BDE8F087A068092123\n:10035000C27812F03F0F00F059810279914340F0CA\n:100360005581616891F84010032906D012F0020F00\n:1003700008BFFF2118D05DB115E00021FDF7A6FDF3\n:1003800061680622C96B1A31EEF72AF848BB1EE0F5\n:10039000FDF740FD05460121A068FDF797FD2946C0\n:1003A000F7F7FFFF18B15146012000F051B960681E\n:1003B00090F84100032818BF022840F02781002E42\n:1003C0001CBFFE21012040F0438100F01FB9A0684E\n:1003D000FDF713FD6168C96B497E884208BF01269D\n:1003E00000D00026A068C17811F03F0F05D0017938\n:1003F00011F0020F01D06DB338E0616891F842202E\n:10040000012A01D096B11BE0D6B90021FDF75EFDAF\n:1004100061680268C96BC1F81A208088C883A06827\n:10042000FDF7EBFC6168C96B487609E091F8530071\n:1004300091F85610884203D004B04046BDE8F087DA\n:100440006068643005F02EFA002840D004B00F2018\n:10045000BDE8F08767B1FDF7DDFC05460121A06826\n:10046000FDF734FD2946F7F79CFF08B1012200E0B3\n:100470000022616891F84200012807D040B92EB9E6\n:1004800091F8533091F856108B4201D1012100E0D0\n:1004900000210A421BD0012808BF002E11D14FF0C5\n:1004A0000001A068FDF712FD61680268C96BC1F820\n:1004B0001A208088C883A068FDF79FFC6168C96B1B\n:1004C00048766068643005F0EDF90028BED19DE003\n:1004D00060682F46554690F840104FF002080329F7\n:1004E000AAD0A168CA7812F03F0F1BBF097911F09A\n:1004F000020F002201224FF0FF0A90F85010082945\n:100500000CBF0221012192B190F8800004F0E8FDB7\n:1005100068B95FB9A068FDF77DFC07460121A068B6\n:10052000FDF7D4FC3946F7F73CFF48B1AA465146DF\n:100530000020FFF77BFE002818BF4FF003087BE781\n:10054000606890F84100032818BF02287FF474AF58\n:10055000002E18BF4FF0FE0AE9D16DE7616891F8EF\n:100560004030032B52D0A0684FF0090CC27812F033\n:100570003F0F4BD002793CEA020C47D1022B06D048\n:1005800012F0020F08BFFF2161D0E5B35EE012F068\n:10059000020F4FF07F0801D04DB114E001F164006B\n:1005A00005F080F980B320787F2842D013E067B34C\n:1005B000FDF730FC05460121A068FDF787FC2946C0\n:1005C000F7F7EFFE08B36068643005F06BF9D8B157\n:1005D00020787F282DD094F9001084F8008060687E\n:1005E00090F85420CDE90021CDF8089090F87330B0\n:1005F00090F8802000F13201504604F013FE0D20E7\n:1006000004B0BDE8F08716E000E001E00220F7E763\n:10061000606890F84100032818BF0228F6D1002E28\n:10062000F4D04FF0FE014FF00200FEF744F9022033\n:10063000E6E7FFDFCFE7FDF7EDFB05460121A06808\n:10064000FDF744FC2946F7F7ACFE38B151460220CD\n:10065000FEF731F9DAE7000074010020606890F8D5\n:100660004100032818BF0228D0D1002E1CBFFE2154\n:100670000220EDD1CAE72DE9F84F4FF00008F74806\n:10068000F8F776FA7F27F54C002808BF2770F8F7AF\n:1006900056FAA068FDF788FB81460121FEF7D1FDDF\n:1006A000616891F88020012A14D0042A1CBF082A0E\n:1006B000FFDF00F0D781606890F8520038B1F8F79A\n:1006C00033FAF7F722FB6168002081F852004046B8\n:1006D000BDE8F88F0125E24EB9F1080F3AD2DFE804\n:1006E00009F03EC00439393914FC0546F8F7B2F870\n:1006F000002D72D0606890F84000012818BF0228D1\n:100700006BD120787F2869D122E018B391F840009E\n:10071000022802D0012818D01CE020787F2808BFCA\n:10072000FFDF94F90000277000906068FF2190F8C7\n:10073000733090F85420323004F02FFF61680020AD\n:100740004FF00C0881F87D00B5E720787F2860D154\n:10075000FFDF5EE0F8F77EF84FF00608ABE74FF0FA\n:100760000008002800F0508191F84000022836D09F\n:1007700001284BD003289ED1A068CA6BC37892F899\n:100780001AC0634521D1037992F81BC063451CD17F\n:10079000437992F81CC0634517D1837992F81DC044\n:1007A000634512D1C37992F81EC063450DD1037A17\n:1007B00092F81FC0634508D1037892F819C0C3F3BB\n:1007C0008013634508BF012300D0002391F8421035\n:1007D00001292CD0C3B300F013B93FE019E0207811\n:1007E0007F2808BFFFDF94F9000027700090606841\n:1007F000FF2190F8733090F85420323004F0CDFE91\n:1008000060684FF00C0880F87D5054E720787F280E\n:100810009ED094F90000277000906068FF2190F846\n:10082000733090F85420323004F0B7FE16E0002BFD\n:100830007ED102F11A01FDF7C2FAA068FDF7DDFAD8\n:100840006168C96B4876DBE0FFE796F85600082838\n:1008500070D096F8531081426AD0D5E04FF0060868\n:1008600029E7054691F8510000280CBF4FF0010B15\n:100870004FF0000B4FF00008A06810F8092BD209C8\n:1008800007D0407900F0C000402808BF4FF0010AAF\n:1008900001D04FF0000A91F84000032806D191F8EA\n:1008A0003900002818BF91F8569001D191F8539063\n:1008B0004846FDF72CF80090D8B34846FCF75BFE9D\n:1008C000002818BF4FF0010BBAF1000F37D0A06815\n:1008D000A14600F10901009800E0B6E0F8F762FED9\n:1008E0005FEA0008D9F8040090F8319018BF49F089\n:1008F0000209606890F84010032924D0F7F7AAFF96\n:10090000002DABD0F7F75DFD002808BFB8F1000F50\n:100910007DD020787F2808BFFFDF94F90000277082\n:1009200000906068494690F8733090F8542002E0D7\n:1009300066E004E068E0323004F02FFE8EE7606885\n:1009400090F83190D5E7A168C06BCA78837E9A424F\n:100950001BD10A79C37E9A4217D14A79037F9A4202\n:1009600013D18A79437F9A420FD1CA79837F9A4201\n:100970000BD10A7AC37F9A4207D10978407EC1F32E\n:100980008011814208BF012700D0002796F853004C\n:10099000082806D096F85610884208BF4FF0010983\n:1009A00001D04FF00009B8F1000F05D1BBF1000FE5\n:1009B00004D0F7F706FD08B1012000E000204DB19A\n:1009C00096F84210012903D021B957EA090101D054\n:1009D000012100E00021084216D0606890F8421022\n:1009E000012908BF002F0BD1C06B00F11A01A068CC\n:1009F000FDF7E5F9A068FDF700FA6168C96B487674\n:100A00004FF00E0857E602E0F7F724FF26E760688C\n:100A100090F84100032818BF02287FF41FAFBAF1F5\n:100A2000000F3FF41BAF20787F2808BFFFDF94F949\n:100A30000000277000906068FE2190F8733090F8F5\n:100A40005420323004F0A9FD08E791F8481000293D\n:100A500018BF00283FF47EAE0BE0000074010020B8\n:100A600044110020B9F1070F7FF474AE00283FF461\n:100A700071AEFEF790FC80461DE60000D0F8001134\n:100A800049B1D0E941231A448B691A448A61D0E9FB\n:100A90003F12D16003E0FE4AD0F8FC101162D0E9A9\n:100AA0003F1009B1086170470028FCD00021816126\n:100AB00070472DE9FF4F06460C46488883B040F248\n:100AC000E24148430190E08A002500FB01FA94F8D6\n:100AD0007C0090460D2822D00C2820D024281ED03F\n:100AE00094F87D0024281AD000208346069818B177\n:100AF0000121204603F0C0F894F8641094F86500D2\n:100B0000009094F8F0200F464FF47A794AB1012A08\n:100B100061D0022A44D0032A5DD0FFDFB5E0012076\n:100B2000E3E7B8F1000F00D1FFDFD94814F8641FE4\n:100B3000243090F83400F0F7C4FC01902078F8F7E6\n:100B4000CFFB4D4600F2E730B0FBF5F1DFF8409304\n:100B5000D9F80C0001EB00082078F8F7C1FB01463A\n:100B600014F86409022816D0012816D040F6340083\n:100B700008444AF2EF010844B0FBF5F10198D9F8B6\n:100B80001C20411A514402EB08000D18012084F882\n:100B9000F0002D1D78E02846EAE74FF4C860E7E74B\n:100BA000DFF8EC92A8F10100D9F80810014300D158\n:100BB000FFDFB848B8F1000F016801EB0A0506D065\n:100BC000D9F8080000F22630A84200D9FFDF032040\n:100BD00084F8F00058E094F87C20019D242A05D088\n:100BE00094F87D30242B01D0252A3AD1B4F8702016\n:100BF000B4F81031D21A521C12B2002A31DB94F828\n:100C0000122172B3174694F8132102B110460090D6\n:100C1000022916D0012916D040F6340049F60852B0\n:100C20008118022F12D0012F12D040F63400104448\n:100C3000814210D9081A00F5FA70B0FBF9F00544AA\n:100C40000FE04846EAE74FF4C860E7E74846EEE7BA\n:100C50004FF4C860EBE7401A00F5FA70B0FBF9F00A\n:100C60002D1AB8F1000F0FD0DFF82482D8F8080051\n:100C700018B9B8F8020000B1FFDFD8F8080000F298\n:100C80002630A84200D9FFDF05B9FFDF2946D4F896\n:100C9000F400F4F750FFC4F8F400B06000203070A6\n:100CA0004FF0010886F80480204603F040F8ABF1CD\n:100CB0000101084202D186F8058005E094F8F000B1\n:100CC000012844D003207071606A3946009A01F00F\n:100CD00042FBF060069830EA0B0035D029463046DA\n:100CE000F0F7BAF987B2204603F021F8B8420FD8DE\n:100CF000074686F8058005FB07F1D4F8F400F4F701\n:100D00001AFFB06029463046F0F7A6F9384487B29A\n:100D10003946204602F0B0FFB068C4F8F400A06E77\n:100D2000002811D0B4F87000B4F89420801A01B2F1\n:100D3000002909DD34F86C0F0144491E91FBF0F1E4\n:100D400089B201FB0020208507B0BDE8F08F0220AA\n:100D5000B9E72DE9F04106460C46012001F0DBFA27\n:100D6000C5B20B2001F0D7FAC0B2854200D0FFDF38\n:100D70000025082C7ED2DFE804F00461696965C6AD\n:100D80008293304601F0DDFA0621F3F78FF8040074\n:100D900000D1FFDF304601F0D4FA2188884200D02C\n:100DA000FFDF94F8F00000B9FFDF204602F00FFEED\n:100DB000374E21460020B5607580F561FDF7E9FCEE\n:100DC00000F19807606AB84217D994F86500F7F700\n:100DD0000BF9014694F864004FF47A72022828D087\n:100DE000012828D040F6340008444AF2473108442C\n:100DF000B0FBF2F1606A0844C51B21460020356152\n:100E0000FDF7C7FC618840F2E24251439830081A6E\n:100E1000A0F22630706194F8652094F86410606A3E\n:100E200001F099FAA0F5CB70B061BDE8F041F5F79B\n:100E300060BE1046D8E74FF4C860D5E7BDE8F04182\n:100E400002F02FBEBDE8F041F7F7D5BE304601F005\n:100E500078FA0621F3F72AF8040000D1FFDF3046C4\n:100E600001F06FFA2188884200D0FFDF01220021C3\n:100E7000204600E047E0BDE8F04101F089BAF7F70D\n:100E800073FDF7F7B8FE02204FF0E02104E0000008\n:100E9000CC11002084010020C1F88002BDE8F0815F\n:100EA000304601F04EFA0621F3F700F8040000D1B5\n:100EB000FFDF304601F045FA2188884200D0FFDF8D\n:100EC00094F8F000042800D0FFDF84F8F05094F884\n:100ED000FA504FF6FF76202D00D3FFDFFA4820F8B6\n:100EE000156094F8FA00F5F720F900B9FFDF20202B\n:100EF00084F8FA002046FFF7C1FDF4480078BDE809\n:100F0000F041E2F701B8FFDFC8E770B5EE4C00250D\n:100F1000443C84F82850E07868B1E570FEF71EF98B\n:100F20002078042803D0606AFFF7A8FD6562E748CF\n:100F30000078E1F7E9FFBDE8704001F03ABA70B51A\n:100F4000E14C0146443CE069F5F706FE6568A2788D\n:100F500090FBF5F172B140F27122B5FBF2F292B260\n:100F6000A36B01FB02F6B34202D901FB123200E08F\n:100F70000022A2634D43002800DAFFDF2946E06922\n:100F8000F4F7D9FDE06170BD2DE9F05FFEF736F9A9\n:100F90008246CD48683800F1240881684646D8F872\n:100FA0001800F4F7C8FD0146F069F5F7D5FD4FF0DC\n:100FB0000009074686F835903C4640F28F254E469C\n:100FC0001EE000BF0AEB06000079F7F70DF80146B6\n:100FD0004AF2B12001444FF47A70B1FBF0F008EB13\n:100FE0008602414692681044844207D3241A91F83D\n:100FF0003500A4F28F24401C88F83500761CF6B228\n:1010000098F83600B042DDD8002C10DD98F8351085\n:10101000404608EB81018968A14208D24168C91B9A\n:10102000B1F5247F00D30D466C4288F8359098F8CE\n:101030003560C3460AEB060898F80400F6F7D4FFBB\n:101040004AF2B12101444FF47A7AB1FBFAF298F8EE\n:101050000410082909D0042909D0002013180429F4\n:101060000AD0082908D0252207E0082000E0022045\n:1010700000EB40002830F1E70F22521D4FF4A8701A\n:10108000082914D0042915D0022916D04FF0080CD5\n:101090005FF0280012FB0C00184462190BEB86036A\n:1010A00010449A68D84690420BD8791925E04FF041\n:1010B000400CEFE74FF0100CECE74FF0040C182059\n:1010C000E8E798F8352098F836604046B24210D2EA\n:1010D000521C88F835203C1B986862198418084611\n:1010E000F6F782FF4AF2B1210144B1FBFAF001198F\n:1010F00003E080F83590D8F80410D8F81C00BDE85B\n:10110000F05FF4F718BD2DE9FE4F14460546FEF7D3\n:1011100075F8DFF8B4A10290AAF1440A50469AF893\n:1011200035604FF0000B0AEB86018968CAF83C1065\n:10113000F4B3044600780027042825D005283ED0C3\n:10114000FFDFA04639466069F4F7F5FC0746F5F77E\n:101150000BF881463946D8F80440F5F7FDFC401EEF\n:1011600090FBF4F0C14361433846F4F7E4FC0146D8\n:10117000C8F81C004846F5F7EFFC002800DDFFDF4B\n:10118000012188F813108DE0D4F81490D4F804806D\n:1011900001F07AF9070010D0387800B9FFDF7969DB\n:1011A00078684A460844414601F05AF9074600E08B\n:1011B0000BE04045C5D9FFDFC3E75F46C1E7606A82\n:1011C00001F004F940F6B837BBE7C1690AEB460005\n:1011D0000191408D10B35446DAF81400FFF7AFFECA\n:1011E0006168E069F4F7A7FC074684F835B0019C14\n:1011F000D0462046DAF81410F5F7AEFC81463946A1\n:101200002046F5F7A9FCD8F804200146B9FBF2F016\n:10121000B1FBF2F1884242D0012041E0F4F7A4FF93\n:10122000FFF78DFEFFF7B0FE9AF83510DAF804905C\n:101230000AEB81010746896800913946DAF81C00FB\n:10124000F5F78AFC00248046484504DB98FBF9F456\n:1012500004FB09F41AE0002052469AF8351007E022\n:1012600002EB800304F28F249B68401C1C44C0B234\n:101270008142F5D851B10120F6F7B6FE4AF2B1210C\n:1012800001444FF47A70B1FBF0F004440099A8EBEC\n:1012900004000C1A00D5FFDFCAF83C40A7E7002085\n:1012A00088F813009AF802005446B8B13946E0694C\n:1012B000F5F752FC0146A26B40F2712042438A428C\n:1012C00006D2C4F83CB009E03412002080010020AE\n:1012D000E06B511A884200D30846E063AF6085F89E\n:1012E00000B001202871029F94F835003F1DC05DB9\n:1012F000F6F77AFE4AF23B5101444FF47A70B1FBA3\n:10130000F0F0E16BFE300844E8602078042808D152\n:1013100094F8350004EB4000408D0A2801D20320E8\n:1013200000E00220687104EB4600408DC0B1284601\n:101330006168EFF791FE82B20020761C0CE000BFDE\n:1013400004EB4001B0424B8D13449BB24B8501D35B\n:101350005B1C4B85401CC0B294F836108142EFD222\n:10136000A8686061A06194F8350004EB4001488DE5\n:10137000401C488594F83500C05D082803D0042837\n:1013800003D000210BE0082100E0022101EB410124\n:1013900028314FF4A872082804D0042802D002286B\n:1013A00007D028220A44042805D0082803D0252184\n:1013B00002E01822F6E70F21491D08280CD0042866\n:1013C0000CD002280CD0082011FB0020E16B8842D1\n:1013D00008D20120BDE8FE8F4020F5E71020F3E79A\n:1013E0000420F1E70020F5E770B5FE4C061D14F867\n:1013F000352F905DF6F7F8FD4FF47A7100F2E73083\n:10140000B0FBF1F0D4F8071045182078805DF6F7AE\n:1014100073FE2178895D082903D0042903D00022B6\n:101420000BE0082200E0022202EB420228324FF4D5\n:10143000A873082904D0042902D0022907D0282340\n:101440001344042905D0082903D0252202E01823DB\n:10145000F6E70F22521D08290AD004290AD00229D2\n:101460000AD0082112FB0131081A281A293070BD50\n:101470004021F7E71021F5E70421F3E72DE9FF41CB\n:1014800007460C46012000F046FFC5B20B2000F0D5\n:1014900042FFC0B2854200D0FFDF20460126002572\n:1014A000D04C082869D2DFE800F004304646426894\n:1014B0006865667426746078002819D1FDF79EFE71\n:1014C000009594F835108DF808104188C90411D0A2\n:1014D000206C019003208DF80900C24824388560F3\n:1014E000C56125746846FDF768FB002800D0FFDF62\n:1014F000BDE8FF81FFF778FF0190E07C10B18DF827\n:101500000950EAE78DF80960E7E7607840B1207C90\n:1015100008B9FDF7F9FD6574BDE8FF41F4F72FBD8B\n:10152000A674FDF739FC0028E2D0FFDFE0E7BDE854\n:10153000FF41F7F760BBFDF761FE4088C00407D0AC\n:1015400001210320FDF75EFEA7480078E1F7DCFCEF\n:10155000002239466846FFF7D6FD38B1694638465D\n:1015600000F0EDFE0028C3D1FFDFC1E7E670FFF712\n:10157000CCFCBDE7BDE8FF41C7E4FFDFB8E7994910\n:1015800050B101228A704A6840F27123B2FBF3F233\n:1015900002EB0010886370470020887070472DE9C7\n:1015A000F05F894640F271218E4E48430025044683\n:1015B000706090462F46D0074AF2B12A4FF47A7BEA\n:1015C0000FD0B9F800004843B0600120F6F70CFDD9\n:1015D00000EB0A01B1FBFBF0241AB7680125A4F265\n:1015E0008F245FEA087016D539F8151040F2712083\n:1015F000414306EB85080820C8F80810F6F7F4FC0C\n:1016000000EB0A01B1FBFBF0241AD8F80800A4F2A1\n:101610008F2407446D1CA74219D9002D17D0391B00\n:10162000B1FBF5F0B268101AB1FBF5F205FB12122E\n:10163000801AB060012008E0B1FBF5F306EB8002F0\n:101640009468E31A401CC0B29360A842F4D3BDE88A\n:10165000F09F2DE9F041634C00262078042804D047\n:101660002078052801D00C2018E401206070607CEF\n:10167000002538B1EFF3108010F0010F72B610D0D2\n:1016800001270FE0FDF7BAFD074694F82000F5F7B3\n:10169000B2F87888C00411D000210320FDF7B2FD14\n:1016A0000CE00027607C38B1A07C28B1FDF72CFD50\n:1016B0006574A574F4F763FC07B962B694F820006A\n:1016C000F5F705FB94F8280030B184F8285020780D\n:1016D000052800D0FFDF0C26657000F06AFE30465A\n:1016E00012E4404810B5007808B1FFF7B2FF00F0EF\n:1016F000D4FE3C4900202439086210BD10B53A4C94\n:1017000058B1012807D0FFDFA06841F66A0188427E\n:1017100000D3FFDF10BD40F6C410A060F4E73249EB\n:1017200008B508702F4900200870487081F828001B\n:10173000C8700874487488742022486281F8202098\n:10174000243948704FF6FF7211F1680121F810201A\n:10175000401CC0B22028F9D30020FFF7CFFFFFF7CD\n:10176000C0FF1020ADF80000012269460420FFF7F9\n:1017700016FF08BD7FB51B4C05460E46207810B1FC\n:101780000C2004B070BD95F8652095F86410686A67\n:1017900000F0C5FEC5F80401656295F8F00000B1DF\n:1017A000FFDF104900202439C861052121706070D5\n:1017B00084F82800014604E004EB4102491C5085EE\n:1017C000C9B294F836208A42F6D284F83500304601\n:1017D000FFF7D5FE0548F4F74DFC84F820002028DB\n:1017E00007D105E0F0110020800100207D140200E7\n:1017F000FFDFF4F7B9FC606194F82010012268461D\n:10180000FFF781FC00B9FFDF94F82000694600F083\n:1018100096FD00B9FFDF0020B3E7F94810B5007866\n:1018200008B1002010BD0620F2F7DAFA80F00100BE\n:1018300010BDF8B5F24D0446287800B1FFDF002056\n:10184000009023780246DE0701466B4605D060888B\n:10185000A188ADF80010012211462678760706D53A\n:10186000E088248923F8114042F00802491C491EEF\n:1018700085F836101946FFF792FE0020F8BD1FB517\n:1018800011B1112004B010BDDD4C217809B10C203C\n:10189000F8E70022627004212170114605E000BFC4\n:1018A00004EB4103491C5A85C9B294F836308B4287\n:1018B000F6D284F83520FFF762FED248F4F7DAFB5F\n:1018C00084F82000202800D1FFDF00F0DDFD10B1FA\n:1018D000F4F74AFC05E0F4F747FC40F6B831F4F7BA\n:1018E0002AF9606194F8201001226846FFF70BFC8A\n:1018F00000B9FFDF94F82000694600F020FD00B930\n:10190000FFDF0020BEE770B5BD4C616A0160FFF7E4\n:10191000A0FE050002D1606AFFF7B0F80020606207\n:10192000284670BD7FB5B64C2178052901D00C2022\n:1019300027E7B3492439C860606A00B9FFDF606AED\n:1019400090F8F00000B1FFDF606A90F8FA002028FC\n:1019500000D0FFDFAC48F4F78DFB616A0546202814\n:1019600081F8FA000E8800D3FFDFA548443020F844\n:101970001560606A90F8FA00202800D1FFDF00238C\n:1019800001226846616AFFF794F8606A694690F838\n:10199000FA0000F0D4FC00B9FFDF00206062F0E63E\n:1019A000974924394870704710B540F2E24300FB74\n:1019B00003F4002000F0B3FD844201D9201A10BDC9\n:1019C000002010BD70B50D46064601460020FCF70C\n:1019D000E0FE044696F86500F6F706FB014696F829\n:1019E00064004FF47A72022815D0012815D040F611\n:1019F000340008444AF247310844B0FBF2F17088E1\n:101A000040F271225043C1EB4000A0F22630A542C3\n:101A100006D2214605E01046EBE74FF4C860E8E740\n:101A20002946814204D2A54201D2204600E0284640\n:101A3000706270BD70B50546FDF7E0FB7049007837\n:101A400024398C689834072D30D2DFE805F004344F\n:101A500034252C34340014214FF4A873042810D0FA\n:101A60000822082809D02A2102280FD011FB0240A1\n:101A700000222823D118441819E0402211FB02400B\n:101A8000F8E7102211FB02402E22F3E7042211FB9B\n:101A9000024000221823EDE7282100F04BFC04440B\n:101AA00004F5317403E004F5B07400E0FFDF54483E\n:101AB000C06BA04201D9012070BD002070BD70B57F\n:101AC0004F4C243C607870B1D4E904512846A26898\n:101AD000EFF7EDFA2061A84205D0A169401B084448\n:101AE000A061F5F706F82169A068884201D820783E\n:101AF00008B1002070BD012070BD2DE9F04F0546F2\n:101B000085B016460F461C461846F6F7F5FA05EB63\n:101B100047014718204600F0F5FB4AF2C5714FF423\n:101B20007A7908444D46B0FBF5F0384400F160087E\n:101B30003348761C24388068304404902046F6F7F9\n:101B4000DBFAA8EB0007204600F0DCFB0646204647\n:101B5000F6F74AFA301AB0FBF5F03A1A18252820A1\n:101B60004FF4C8764FF4BF774FF0020B082C30D0FB\n:101B7000042C2BD00021022C2ED0082311F1280197\n:101B800003EB830C0CEB831319440A444FF0000A57\n:101B9000082C29D0042C22D00021022C29D0054663\n:101BA000082001F5B07100BF00EB0010284481420D\n:101BB00032D2082C2AD0042C1ED00020022C28D08F\n:101BC0000821283001EB0111084434E03946102384\n:101BD000D6E731464023D3E704231831D0E73D460A\n:101BE00040F2EE311020DFE735464FF435614020FA\n:101BF000DAE70420B431D7E738461021E2E70000E5\n:101C0000F01100207D140200530D020030464021E7\n:101C1000D8E704211830D5E7082C4FD0042C4AD03F\n:101C20000021022C4DD0082311F12801C3EBC30081\n:101C300000EB4310084415182821204600F07AFBD9\n:101C400005EB4001082C42D0042C3DD00026022C8C\n:101C50003FD0082016F1280600EB801006EB80002C\n:101C60000E180120FA4D8DF804008DF800A08DF8B3\n:101C700005B0A86906F22A260499F3F75CFFCDE9BE\n:101C800002062046F6F7B0F94AF23B510144B1FB97\n:101C9000F9F0301AFE38E8630298C5F84080A86170\n:101CA00095F82000694600F04AFB002800D1FFDFCC\n:101CB00005B0BDE8F08F39461023B7E73146402321\n:101CC000B4E704231831B1E73E461020C4E74020B2\n:101CD000C2E704201836BFE72DE9FE4F06461C4632\n:101CE000174688464FF0010A1846F6F705FAD84D10\n:101CF000243DA9688A1907EB48011144471820467A\n:101D000000F000FB4FF47A7BD84600F6FB00B0FBF6\n:101D1000F8F0384400F120092046F6F7EDF9A968FB\n:101D20000246A9EB0100801B871A204600F0EAFA60\n:101D300005462046F6F758F9281AB0FBF8F03A1A8B\n:101D4000182528204FF4C8774FF4BF78082C2DD0E1\n:101D5000042C28D00021022C2BD0082311F12801BB\n:101D600003EB830C0CEB831319440A44082C28D092\n:101D7000042C21D00021022C28D00546082001F592\n:101D8000B07100BF00EB0010284481422AD2082C19\n:101D900022D0042C1DD00020022C20D00821283075\n:101DA00001EB01112CE041461023D9E739464023CD\n:101DB000D6E704231831D3E7454640F2EE31102030\n:101DC000E0E73D464FF435614020DBE70420B431C5\n:101DD000D8E740461021E3E738464021E0E70421F8\n:101DE0001830DDE7082C48D0042C43D00020022C0A\n:101DF00046D0082110F12800C1EBC10303EB4111CB\n:101E0000084415182821204600F094FA05EB4001FB\n:101E1000082C3BD0042C36D00027022C38D00820C8\n:101E200017F1280700EB801007EB80000C1804F571\n:101E300096740C98F6F7D8F84AF23B510144B1FB7E\n:101E4000FBF0834DFE30A5F12407E96B06F1FE029D\n:101E50000844B9680B191A44824224D93219114432\n:101E60000C1AFE342044B0F1807F37D2642C12D299\n:101E7000642011E040461021BEE738464021BBE710\n:101E800004211830B8E747461020CBE74020C9E7C7\n:101E900004201837C6E720460421F4F790FEE8B185\n:101EA000E86B2044E863E0F703FFB9682938314460\n:101EB0000844CDE9000995F835008DF808000220A6\n:101EC0008DF809006846FCF778FE00B1FFDFFCF7EB\n:101ED00063FF00B1FFDF5046BDE8FE8F4FF0000A00\n:101EE000F9E71FB500F021FB594C607880B994F8F0\n:101EF000201000226846FFF706F938B194F8200058\n:101F0000694600F01CFA18B9FFDF01E00120E0701B\n:101F1000F4F735F800206074A0741FBD2DE9F84F68\n:101F2000FDF76CF90646451CC07840090CD0012825\n:101F30000CD002280CD000202978824608064FF4E5\n:101F4000967407D41E2006E00120F5E70220F3E78F\n:101F50000820F1E72046B5F80120C2F30C0212FB7D\n:101F600000F7C80901D010B103E01E2401E0FFDF33\n:101F70000024F6F7D3F8A7EB00092878B77909EB26\n:101F80000408C0F3801010B120B1322504E04FF4F2\n:101F9000FA7501E0FFDF00250C2F00D3FFDF2D488D\n:101FA0002D4A30F81700291801FB0821501CB1FBFD\n:101FB000F0F5F6F76DF8F6F717F84FF47A7100F2CE\n:101FC0007160B0FBF1F1A9EB0100471BA7F15900CB\n:101FD000103FB0F5247F11D31D4E717829B9024608\n:101FE000534629462046FFF788FD00F09EFAF3F796\n:101FF000C6FF00207074B074BDE8F88F3078009090\n:102000005346224629463846FFF766FE0028F3D19C\n:1020100001210220FDF7F6F8BDE8F84F61E710B5A1\n:102020000446012903D10A482438007830B104203D\n:1020300084F8F000BDE81040F3F7A1BF00220121B1\n:10204000204600F0A5F934F8700F401C2080F1E71D\n:10205000F0110020646302003F420F002DE9F041BF\n:102060000746FDF7CBF8050000D1FFDF287810F018\n:102070000C0F01D0012100E00021F74C606A3030E4\n:10208000FCF7C7FA29783846EFF71BFAA4F12406C3\n:102090000146A069B26802446FB32878082803D0CB\n:1020A000042803D000230BE0082300E0022303EB05\n:1020B000430328334FF4A877082804D0042802D01B\n:1020C000022810D028273B4408280ED004280ED020\n:1020D00002280ED05FF00800C0EBC00707EB4010ED\n:1020E0001844983009E01827EDE74020F4E7102065\n:1020F000F2E70420F0E74FF4FC701044471828780A\n:102100003F1DF5F771FF014628784FF47A720228D7\n:102110001DD001281DD040F6340008444AF2EF01DA\n:102120000844B0FBF2F03A1A606A40F2E241B0466D\n:102130004788F0304F43316A81420DD03946206BD9\n:1021400000F08EF90646B84207D9FFDF05E01046D9\n:10215000E3E74FF4C860E0E70026C04880688642A5\n:1021600007D2616A40F271224888424306EB420678\n:1021700004E040F2E240B6FBF0F0616AC882606AB7\n:10218000297880F86410297880F865100521417558\n:10219000C08A6FF41C71484306EB400040F635419D\n:1021A000C8F81C00B0EB410F00D3FFDFBDE8F081A1\n:1021B00010B5052937D2DFE801F00509030D31001C\n:1021C000002100E00121BDE8104028E7032180F84C\n:1021D000F01010BD0446408840F2E24148439F4958\n:1021E000091D0860D4F818010089E082D4F81801AC\n:1021F00080796075D4F8180140896080D4F818019E\n:102200008089A080D4F81801C089E0802046A16AA6\n:10221000FFF7D8FB022084F8F00010BD816ABDE80A\n:102220001040FFF7CFBBFFDF10BD70B58A4C243CD8\n:102230000928A1683FD2DFE800F0050B0B15131544\n:1022400038380800BDE870404BE6BDE8704065E6F0\n:10225000022803D00020BDE87040FFE60120FAE725\n:10226000E16070BD032802D005281CD000E0E160C9\n:102270005FF0000600F059F9774D012085F828003D\n:1022800085F83460686AA9690026C0F8F41080F8FF\n:10229000F060E068FFF746FB00B1FFDFF3F76FFE89\n:1022A0006E74AE7470BD0126E4E76C480078BDE83A\n:1022B0007040E0F729BEFFDF70BD674924394860F0\n:1022C000704770B5644D0446243DB1B14FF47A7641\n:1022D000012903D0022905D0FFDF70BD1846F5F7AC\n:1022E000FCFE05E06888401C68801046F6F7F8FFA1\n:1022F00000F2E730B0FBF6F0201AA86070BD564837\n:1023000000787047082803D0042801D0F5F76CBE88\n:102310004EF628307047002804DB00F1E02090F8EA\n:10232000000405E000F00F0000F1E02090F8140D2B\n:102330004009704710F00C0000D008467047F4F7D1\n:102340003EB910B50446202800D3FFDF4248443090\n:1023500030F8140010BD70B505460C461046F5F770\n:1023600043FE4FF47A71022C0DD0012C0DD040F6B3\n:10237000340210444AF247321044B0FBF1F02844D2\n:1023800000F5CB7070BD0A46F3E74FF4C862F0E782\n:102390001FB513460A46044601466846FEF789FB08\n:1023A00094F8FA006946FFF7CAFF002800D1FFDF62\n:1023B0001FBD70B5284C0025257094F82000F3F758\n:1023C000B4FE00B9FFDF84F8205070BD2DE9F04164\n:1023D000050000D1FFDF204A0024243AD5F804612B\n:1023E0002046631E116A08E08869B04203D3984210\n:1023F00001D203460C460846C9680029F4D104B945\n:1024000004460021C5F80041F035C4B1E068E5603C\n:10241000E86000B105612E698846A96156B1B069CE\n:1024200030B16F69B84200D2FFDFB069C01BA8614C\n:10243000C6F81880084D5CB1207820B902E0E96048\n:102440001562E8E7FFDF6169606808442863ADE66C\n:10245000C5F83080AAE60000F011002080010020BD\n:1024600010B50C4601461046F4F776FB002806DA54\n:10247000211A491EB1FBF4F101FB040010BD90FBD1\n:10248000F4F101FB140010BD2E48016A002001E0A8\n:102490000846C9680029FBD170472DE9FE43294D44\n:1024A0000120287000264FF6FF7420E00621F1F786\n:1024B000FDFC070000D1FFDF97F8FA00F037F4F7D2\n:1024C00006FC07F80A6BA14617F8FA89B8F1200F45\n:1024D00000D3FFDF1B4A683222F8189097F8FA0001\n:1024E000F3F723FE00B9FFDF202087F8FA006946E2\n:1024F0000620F1F764FC50B1FFDF08E0029830B12C\n:1025000090F8F01019B10088A042CFD104E06846DD\n:10251000F1F733FC0028F1D02E70BDE8FE8310B532\n:10252000FFF719FF00F5C87010BD064800212430E0\n:1025300090F8352000EB4200418503480078E0F731\n:10254000E3BC0000CC11002080010020012804D051\n:10255000022805D0032808D105E0012907D004E0AE\n:10256000022904D001E0042901D000207047012095\n:102570007047F748806890F8A21029B1B0F89E1013\n:10258000B0F8A020914215D290F8A61029B1B0F869\n:10259000A410B0F8A02091420CD2B0F89C20B0F862\n:1025A0009A108A4206D290F88020B0F898001AB1AA\n:1025B000884203D3012070470628FBD200207047D1\n:1025C0002DE9F041E24D0746A86800F1700490F84B\n:1025D000140130B9E27B002301212046EEF7D2FC42\n:1025E00010B1A08D401CA08501263D21AFB92878EF\n:1025F000022808D001280AD06878C8B110F0140F5A\n:1026000009D01E2039E0162037E026773EE0A86882\n:1026100090F8160131E0020701D56177F5E78107EF\n:1026200001D02A2029E0800600D4FFDF232024E007\n:1026300094F8320028B1E08D411CE185218E88425A\n:1026400013D294F8360028B1A08E411CA186218EA9\n:1026500088420AD2A18D608D814203D3AA6892F884\n:10266000142112B9228E914201D3222005E0217C4F\n:1026700029B1218D814207D308206077C5E7208DDD\n:10268000062801D33E20F8E7207FB0B10020207358\n:10269000607320740221A868FFF78AFDA86890F88B\n:1026A000E410012904D1D0F81C110878401E0870EC\n:1026B000E878BDE8F041E0F727BCA868BDE8F04144\n:1026C0000021FFF775BDA2490C28896881F8E40054\n:1026D00014D0132812D0182810D0002211280ED0A0\n:1026E00007280BD015280AD0012807D0002805D0CC\n:1026F000022803D021F89E2F012008717047A1F80D\n:10270000A420704710B5924CA1680A88A1F86021F6\n:1027100081F85E0191F8640001F046FBA16881F840\n:10272000620191F8650001F03FFBA16881F8630147\n:10273000012081F85C01002081F82E01E078BDE8DD\n:102740001040E0F7E1BB70B5814C00231946A0684A\n:1027500090F87C207030EEF715FC00283DD0A06882\n:1027600090F820110025C9B3A1690978B1BB90F890\n:102770007D00EEF7EFFB88BBA168B1F870000A2876\n:102780002DD905220831E069EBF72AFE10B3A068C5\n:10279000D0F81C11087858B10522491CE069EBF704\n:1027A0001FFE002819D1A068D0F81C01007840B99C\n:1027B000A068E169D0F81C010A68C0F80120097915\n:1027C0004171A068D0F81C110878401C08700120E5\n:1027D000FFF779FFA06880F8205170BDFFE7A0687F\n:1027E00090F8241111B190F82511C1B390F82E1171\n:1027F0000029F2D090F82F110029EED190F87D0039\n:10280000EEF7A8FB0028E8D1A06890F8640001F07A\n:10281000CBFA0646A06890F8650001F0C5FA0546B7\n:10282000A06890F830113046FFF790FEA0B3A06882\n:1028300090F831112846FFF789FE68B3A268B2F814\n:10284000703092F86410B2F8320102F58872EEF737\n:1028500001FE20B3A168252081F87C00BDE7FFE7D9\n:1028600090F87D10242918D090F87C10242914D0D9\n:102870005FF0000300F5897200F59271FBF78EFEA0\n:10288000A16881F8245101F13000C28A21F8E62FB5\n:10289000408B4880142007E005E00123EAE7BDE80B\n:1028A000704000202EE71620BDE870400BE710B501\n:1028B000F4F7FAFD0C2813D3254C0821A068D0F8B2\n:1028C00018011E30F4F7F4FD28B1A0680421D830B7\n:1028D000F4F7EEFD00B9FFDFBDE810400320F2E69B\n:1028E00010BD10B51A4CA068D0F818110A78002A4B\n:1028F0001FD04988028891421BD190F87C20002388\n:1029000019467030EEF73EFB002812D0A068D0F8D0\n:1029100018110978022907D003290BD0042919D0EE\n:10292000052906D108200DE090F87D00EEF712FB96\n:1029300040B110BD90F8811039B190F8820000B913\n:10294000FFDF0A20BDE81040BDE6BDE81040AEE75D\n:102950008C01002090F8AA008007EAD10C20FFF734\n:10296000B2FEA068002120F89E1F01210171017BA9\n:1029700041F00101017310BD70B5F74CA268556EAE\n:10298000EEF702FDEBB2C1B200228B4203D0A36886\n:1029900083F8121102E0A16881F81221C5F3072122\n:1029A000C0F30720814203D0A16881F8130114E726\n:1029B000A06880F8132110E710B5E74C0421A06847\n:1029C000FFF7F6FBA06890F85A10012908D000F52F\n:1029D0009E71FBF7ACFEE078BDE81040E0F794BADA\n:1029E000022180F85A1010BD70B5DB4CA06890F839\n:1029F000E410FE2955D16178002952D190F87F204A\n:102A0000002301217030EEF7BDFA002849D1A068FB\n:102A100090F8141109B1022037E090F87C200023CF\n:102A200019467030EEF7AEFA28B1A06890F896001B\n:102A300008B1122029E0A068002590F87C20122A15\n:102A40001DD004DC032A23D0112A04D119E0182A4E\n:102A50001AD0232A26D0002304217030EEF792FAF0\n:102A600000281ED1A06890F87D10192971D020DCB3\n:102A700001292AD0022935D0032932D120E00B20A8\n:102A800003E0BDE8704012E70620BDE870401AE69A\n:102A900010F8E21F01710720FFF715FEA06880F80B\n:102AA0007C509AE61820FFF70EFEA068A0F89E5012\n:102AB00093E61D2918D01E2916D0212966D149E098\n:102AC00010F8E11F4171072070E00C20FFF7FBFDBB\n:102AD000A06820F8A45F817941F00101817100F8BC\n:102AE000275C53E013202CE090F8252182BB90F85E\n:102AF0002421B2B1242912D090F87C1024290ED0C0\n:102B00005FF0000300F5897200F59271FBF746FD56\n:102B1000A0681E2180F87D1080F8245103E0012375\n:102B2000F0E71E2932D1A068FBF797FDFFF744FFBD\n:102B3000A16801F13000C28A21F8E62F408B48805D\n:102B40001520FFF7C0FDA068A0F8A45080F87D50C4\n:102B50001CE02AE090F8971051B180F8125180F8EB\n:102B600013511820FFF7AFFDA068A0F8A4500DE0A6\n:102B700090F82F1151B990F82E1139B1C16DD0F8DC\n:102B80003001FFF7F9FE1820FFF79DFDA06890F8CF\n:102B9000E400FE2885D1FFF7A4FEA06890F8E400C9\n:102BA000FE2885D1BDE87040CDE51120FFF78BFDF3\n:102BB000A068CBE7684A0129926819D0002302294E\n:102BC0000FD003291ED010B301282BD0032807D122\n:102BD00092F87C00132803D0162801D0182804D1BD\n:102BE000704792F8E4000028FAD0D2F8180117E0F4\n:102BF00092F8E4000128F3D0D2F81C110878401EA6\n:102C00000870704792F8E4000328EED17047D2F8BC\n:102C10001801B2F870108288891A09B20029F5DB10\n:102C200003707047B2F87000B2F82211401A00B277\n:102C30000028F6DBD2F81C010178491E01707047AC\n:102C400070B5044690F87C0000250C2810D00D28A3\n:102C50002ED1D4F81811B4F870008988401C88422D\n:102C600026D1D4F864013C4E017811B3FFDF42E075\n:102C7000B4F87000B4F82211401C884218D1D4F87E\n:102C80001C01D0F80110A160407920730321204677\n:102C9000EDF7F1FDD4F81C01007800B9FFDF012148\n:102CA000FE20FFF787FF84F87C50012084F8B200F3\n:102CB00093E52188C180D4F81801D4F864114089C3\n:102CC0000881D4F81801D4F8641180894881D4F8B7\n:102CD0001801D4F86411C0898881D4F864010571A1\n:102CE000D4F8641109200870D4F864112088488051\n:102CF000F078E0F709F902212046EDF7BCFD032149\n:102D00002046FFF755FAB068D0F81801007802287D\n:102D100000D0FFDF0221FE20FFF74CFF84F87C503B\n:102D20005BE52DE9F0410C4C00260327D4F808C0E0\n:102D3000012598B12069C0788CF8E20005FA00F00E\n:102D4000C0F3C05000B9FFDFA06800F87C7F468464\n:102D500080F82650BDE8F0818C01002000239CF80B\n:102D60007D2019460CF17000EEF70CF970B1607817\n:102D70000028EFD12069C178A06880F8E11080F8C0\n:102D80007D70A0F8A46080F8A650E3E76570E1E7E5\n:102D9000F0B5F74C002385B0A068194690F87D2067\n:102DA0007030EEF7EFF8012580B1A06890F87C0054\n:102DB00023280ED024280CD06846F6F785FB68B18E\n:102DC000009801A9C0788DF8040008E0657005B08E\n:102DD000F0BD607840F020006070F8E70021A06846\n:102DE00003AB162290F87C00EEF74FFB002648B1AB\n:102DF000A0689DF80C20162180F80C2180F80D1198\n:102E0000192136E02069FBF722FB78B121690879A6\n:102E100000F00702A06880F85C20497901F0070102\n:102E200080F85D1090F82F310BBB03E00020FFF716\n:102E300078FFCCE790F82E31CBB900F164035F78CE\n:102E4000974205D11A788A4202D180F897500EE055\n:102E500000F5AC71028821F8022990F85C200A7113\n:102E600090F85D0048710D70E078E0F74DF8A068CB\n:102E7000212180F87D1080F8A650A0F8A460A6E774\n:102E8000F8B5BB4C00231946A06890F87D2070303F\n:102E9000EEF778F840B32069FBF7BEFA48B3206933\n:102EA000FBF7B4FA07462069FBF7B4FA0646206937\n:102EB000FBF7AAFA05462069FBF7AAFA0146009734\n:102EC000A06833462A463030FBF79BFBA1680125FA\n:102ED00091F87C001C2810D091F85A00012812D0DB\n:102EE00091F8250178B90BE0607840F0010060703E\n:102EF000F8BDBDE8F840002013E781F85A5002E021\n:102F000091F8240118B11E2081F87D000BE01D20EE\n:102F100081F87D0001F5A57231F8300BFBF7FBFB62\n:102F2000E078DFF7F1FFA068002120F8A41F85708A\n:102F3000F8BD10B58E4C00230921A06890F87C20C4\n:102F40007030EEF71FF848B16078002805D1A1680D\n:102F500001F8960F087301F81A0C10BD012060707B\n:102F600010BD7CB5824C00230721A06890F87C201E\n:102F70007030EEF707F838B36078002826D169463C\n:102F80002069FBF75FFA9DF80000002500F025019D\n:102F9000A06880F8B0109DF8011001F0490180F898\n:102FA000B11080F8A250D0F81811008849888142E9\n:102FB00000D0FFDFA068D0F818110D70D0F86411B0\n:102FC0000A7822B1FFDF16E0012060707CBD30F886\n:102FD000E82BCA80C16F0D71C16F009A8A60019A97\n:102FE000CA60C26F0821117030F8E81CC06F4180C0\n:102FF000E078DFF789FFA06880F87C507CBD70B571\n:103000005B4C00231946A06890F87D207030EDF7E6\n:10301000B9FF012540B9A0680023082190F87C2061\n:103020007030EDF7AFFF10B36078002820D1A068B2\n:1030300090F8AA00800712D42069FBF7C9F9A168AB\n:1030400081F8AB00206930F8052FA1F8AC2040884A\n:10305000A1F8AE0011F8AA0F40F002000870A068B5\n:103060004FF0000690F8AA10C90702D011E0657071\n:103070009DE490F87D20002319467030EDF782FF23\n:1030800000B9FFDFA06880F87D5080F8A650A0F856\n:10309000A460A06890F87C10012906D180F87C60BB\n:1030A00080F8A260E078DFF72FFFA168D1F818015F\n:1030B000098842888A42DBD101780429D8D1067078\n:1030C000E078DFF721FFA06890F87C100029CFD1CD\n:1030D00080F8A2606BE470B5254DA86890F87C106C\n:1030E0001A2902D00220687061E469780029FBD1B6\n:1030F000002480F8A74080F8A240D0F8181100887A\n:103100004988814200D0FFDFA868D0F818110C7000\n:10311000D0F864110A780AB1FFDF25E090F8A82002\n:1031200072B180F8A8400288CA80D0F864110C718E\n:10313000D0F864210E2111700188D0F864010DE0EF\n:1031400030F8E82BCA80C16F0C71C26F0121117277\n:10315000C26F0D21117030F8E81CC06F418000F083\n:10316000A1FEE878DFF7D0FEA86880F87C401EE476\n:103170008C01002070B5FA4CA16891F87C20162AC9\n:1031800001D0132A02D191F8A82012B10220607058\n:103190000DE46278002AFBD181F8E000002581F877\n:1031A000A75081F8A250D1F81801098840888842B8\n:1031B00000D0FFDFA068D0F818010078032800D005\n:1031C000FFDF0321FE20FFF7F5FCA068D0F86411B3\n:1031D0000A780AB1FFDF14E030F8E02BCA8010F85B\n:1031E000081BC26F1171C16F0D72C26F0D2111707A\n:1031F00030F8E81CC06F418000F054FEE078DFF743\n:1032000083FEA06880F87C504BE470B5D44C092153\n:103210000023A06890F87C207030EDF7B3FE002505\n:1032200018B12069007912281ED0A0680A21002355\n:1032300090F87C207030EDF7A5FE18B12069007978\n:10324000142814D02069007916281AD1A06890F8A3\n:103250007C101F2915D180F87C5080F8A250BDE861\n:1032600070401A20FFF74EBABDE8704061E6A068D2\n:1032700000F87C5F458480F82650BDE87040FFF779\n:103280009BBB0EE470B5B64C2079C00773D02069A3\n:1032900000230521C578A06890F87C207030EDF7F8\n:1032A00071FE98B1062D11D006DC022D0ED0042D32\n:1032B0000CD0052D06D109E00B2D07D00D2D05D022\n:1032C000112D03D0607840F008006070607800280D\n:1032D00051D12069FAF7E0FF00287ED0206900254F\n:1032E0000226C178891E162977D2DFE801F00B7615\n:1032F00034374722764D76254A457676763A5350CE\n:103300006A6D7073A0680023012190F87F207030EF\n:10331000EDF738FE08BB2069FBF722F8A16881F8B9\n:103320001601072081F87F0081F8A65081F8A2508D\n:1033300056E0FFF76AFF53E0A06890F87C100F2971\n:1033400001D066704CE0617839B980F88150122163\n:1033500080F87C1044E000F0D0FD41E000F0ACFDCE\n:103360003EE0FBF7A9F803283AD12069FBF7A8F85B\n:10337000FFF700FF34E03BE00079F9E7FFF7ABFE31\n:103380002EE0FFF73CFE2BE0FFF7EBFD28E0FFF718\n:10339000D0FD25E0A0680023194690F87D2070300C\n:1033A000EDF7F0FD012110B16078C8B901E061705E\n:1033B00016E0A06820F8A45F817000F8276C0FE089\n:1033C0000BE0FFF75DFD0BE000F034FD08E0FFF7D8\n:1033D000DFFC05E000F0FAFC02E00020FFF7A1FCB2\n:1033E000A268F2E93001401C41F10001C2E900018C\n:1033F0005EE42DE9F0415A4C2079800741D5607890\n:1034000000283ED1E06801270026C178204619290E\n:10341000856805F170006FD2DFE801F04B3E0D6F5B\n:10342000C1C1801C34C1556287C1C1C1C1BE8B9569\n:1034300098A4B0C1BA0095F87F2000230121EDF7D0\n:10344000A1FD00281DD1A068082180F87F1080F818\n:10345000A26090E0002395F87D201946EDF792FDDB\n:1034600010B1A06880F8A660A0680023194690F803\n:103470007C207030EDF786FD002802D0A06880F82F\n:10348000A26067E4002395F87C201946EDF77AFDE9\n:1034900000B9FFDF042008E0002395F87C201946DE\n:1034A000EDF770FD00B9FFDF0C20A16881F87C000A\n:1034B00050E4002395F87C201946EDF763FD00B930\n:1034C000FFDF0D20F1E7002395F87C201946EDF78A\n:1034D00059FD00B9FFDFA0680F2180F8A77008E050\n:1034E00095F87C00122800D0FFDFA068112180F839\n:1034F000A87080F87C102DE451E0002395F87C2022\n:103500001946EDF73FFD20B9A06890F8A80000B972\n:10351000FFDFA068132180F8A770EAE795F87C0028\n:10352000182800D0FFDF1A20BFE7BDE8F04100F007\n:1035300063BD002395F87C201946EDF723FD00B903\n:10354000FFDF0520B1E785F8A66003E4002395F8C6\n:103550007C201946EDF716FD00B9FFDF1C20A4E71B\n:103560008C010020002395F87D201946EDF70AFD17\n:1035700000B9FFDFA06880F8A66006E4002395F894\n:103580007C201946EDF7FEFC00B9FFDF1F208CE719\n:10359000BDE8F04100F0F8BC85F87D60D3E7FFDFBF\n:1035A0006FE710B5F74C6078002837D120794007D5\n:1035B0000FD5A06890F87C00032800D1FFDFA06839\n:1035C00090F87F10072904D101212170002180F893\n:1035D0007F10FFF70EFF00F0B5FCFFF753FEA07859\n:1035E000000716D5A0680023052190F87C207030D4\n:1035F000EDF7C8FC50B108206070A068D0F86411E5\n:1036000008780D2800D10020087002E00020F9F7AA\n:10361000F9FCA068BDE81040FFF712BB10BD2DE912\n:10362000F041D84C07464FF00005607808436070C1\n:10363000207981062046806802D5A0F8985004E0E1\n:10364000B0F89810491CA0F8981000F018FD012659\n:10365000F8B1A088000506D5A06890F8821011B1D5\n:10366000A0F88E5015E0A068B0F88E10491CA0F8A4\n:103670008E1000F0F3FCA068B0F88E10B0F8902027\n:10368000914206D3A0F88E5080F83A61E078DFF7D7\n:103690003BFC207910F0600F08D0A06890F88010F3\n:1036A00021B980F880600121FEF782FD1FB9FFF784\n:1036B00078FFFFF799F93846FEF782FFBDE8F04141\n:1036C000F5F711BFAF4A51789378194313D11146DA\n:1036D0000128896808D01079400703D591F87F0048\n:1036E000072808D001207047B1F84C00098E8842A5\n:1036F00001D8FEF7E4B900207047A249C278896872\n:10370000012A06D05AB1182A08D1B1F81011FAF7D7\n:10371000BABEB1F822114172090A81727047D1F81C\n:10372000181189884173090A8173704770B5954CE7\n:1037300005460E46A0882843A080A80703D5E807C1\n:1037400000D0FFDFE660E80700D02661A80719D5A2\n:10375000F078062802D00B2814D10BE0A06890F86E\n:103760007C1018290ED10021E0E93011012100F868\n:103770003E1C07E0A06890F87C10122902D10021BD\n:1037800080F88210280601D50820A07068050AD5A7\n:10379000A0688288B0F87010304600F07FFC304698\n:1037A000BDE87040A9E763E43EB505466846F5F715\n:1037B00065FE00B9FFDF222200210098EAF767FECC\n:1037C00003210098FAF750FD0098017821F01001CC\n:1037D00001702946FAF76DFD6A4C192D71D2DFE8A8\n:1037E00005F020180D3EC8C8C91266C8C9C959C815\n:1037F000C8C8C8BBC9C971718AC89300A1680098BC\n:1038000091F8151103E0A168009891F8E610017194\n:10381000B0E0A068D0F81C110098491CFAF795FD9B\n:10382000A8E0A1680098D1F8182192790271D1F826\n:10383000182112894271120A8271D1F81821528915\n:10384000C271120A0272D1F8182192894272120AC8\n:103850008272D1F81811C989FAF74EFD8AE0A06882\n:10386000D0F818110098091DFAF77CFDA068D0F86F\n:10387000181100980C31FAF77FFDA068D0F81811E4\n:1038800000981E31FAF77EFDA1680098D831FAF74A\n:1038900087FD6FE06269009811780171918841712C\n:1038A000090A81715188C171090A017262E03649C1\n:1038B000D1E90001CDE9010101A90098FAF78AFDDB\n:1038C00058E056E0A068B0F844100098FAF794FD6C\n:1038D000A068B0F8E6100098FAF792FDA068B0F87A\n:1038E00048100098FAF780FDA068B0F8E81000983A\n:1038F000FAF77EFD3EE0A168009891F83021027150\n:1039000091F83111417135E0A06890F81301EDF79D\n:1039100032FD01460098FAF7B2FDA06890F8120156\n:1039200000F03DFA70B1A06890F8640000F037FA3A\n:1039300040B1A06890F8121190F86400814201D063\n:10394000002002E0A06890F81201EDF714FD014696\n:103950000098FAF790FD0DE0A06890F80D1100981E\n:10396000FAF7A8FDA06890F80C110098FAF7A6FDE8\n:1039700000E0FFDFF5F795FD00B9FFDF0098FFF7E6\n:10398000BCFE3EBD8C0100207C63020010B5F94CEA\n:10399000A06890F8121109B990F8641080F86410CA\n:1039A00090F8131109B990F8651080F8651000209F\n:1039B000FEF7A8FEA068FAF750FE002806D0A0681F\n:1039C000BDE8104000F59E71FAF7B1BE10BDF8B524\n:1039D000E84E00250446B060B5807570B57035704E\n:1039E0000088F5F748FDB0680088F5F76AFDB4F87F\n:1039F000F800B168401C82B201F17000EDF75BF88D\n:103A000000B1FFDF94F87D00242809D1B4F87010CC\n:103A1000B4F81001081A00B2002801DB707830B148\n:103A200094F87C0024280AD0252808D015E0FFF758\n:103A3000ADFF84F87D50B16881F897500DE0B4F87F\n:103A40007010B4F81001081A00B2002805DB707875\n:103A500018B9FFF79BFF84F87C50A4F8F850FEF7E4\n:103A600088FD00281CD1B06890F8E400FE2801D041\n:103A7000FFF79AFEC0480090C04BC14A2146284635\n:103A8000F9F7ECF9B0680023052190F87C2070303C\n:103A9000EDF778FA002803D0BDE8F840F8F771BFD9\n:103AA000F8BD10B5FEF765FD20B10020BDE810405F\n:103AB0000146B4E5BDE81040F9F77FBA70B50C4691\n:103AC000154606464FF4B47200212046EAF7DFFCA3\n:103AD000268005B9FFDF2868C4F818016868C4F8B3\n:103AE0001C01A868C4F8640182E4F0F7E9BA2DE982\n:103AF000F0410D4607460621F0F7D8F9041E3DD0E7\n:103B0000D4F864110026087858B14A8821888A427E\n:103B100007D109280FD00E2819D00D2826D0082843\n:103B20003ED094F83A01D0B36E701020287084F81B\n:103B30003A61AF809AE06E7009202870D4F8640171\n:103B4000416869608168A9608089A88133E008467E\n:103B5000F0F7DDFA0746EFF78AFF70B96E700E20B6\n:103B60002870D4F864014068686011E00846F0F7F6\n:103B7000CEFA0746EFF77BFF08B1002081E46E70B4\n:103B80000D202870D4F8640141686960008928819B\n:103B9000D4F8640106703846EFF763FF66E00EE084\n:103BA0006E7008202870D4F86401416869608168EB\n:103BB000A960C068E860D4F86401067056E094F823\n:103BC0003C0198B16E70152028700AE084F83C61C1\n:103BD000D4F83E016860D4F84201A860D4F84601E8\n:103BE000E86094F83C010028F0D13FE094F84A01E5\n:103BF00058B16E701C20287084F84A610A2204F5BE\n:103C0000A671281DEAF719FC30E094F8560140B17E\n:103C10006E701D20287084F85661D4F858016860D1\n:103C200024E094F8340168B16E701A20287004E022\n:103C300084F83461D4F83601686094F834010028BF\n:103C4000F6D113E094F85C01002897D06E7016202E\n:103C5000287007E084F85C61D4F85E016860B4F80D\n:103C60006201288194F85C010028F3D1012008E466\n:103C7000404A5061D170704770B50D4604464EE021\n:103C8000B4F8F800401CA4F8F800B4F89800401C00\n:103C9000A4F89800204600F0F2F9B8B1B4F88E000C\n:103CA000401CA4F88E00204600F0D8F9B4F88E002D\n:103CB000B4F89010884209D30020A4F88E000120A7\n:103CC00084F83A012B48C078DFF71EF994F8A20077\n:103CD00020B1B4F89E00401CA4F89E0094F8A60001\n:103CE00020B1B4F8A400401CA4F8A40094F8140176\n:103CF00040B994F87F200023012104F17000EDF712\n:103D000041F920B1B4F89C00401CA4F89C00204666\n:103D1000FEF796FFB4F87000401CA4F870006D1E0A\n:103D2000ADB2ADD23FE5134AC2E90601704770B5A6\n:103D30000446B0F8980094F88010D1B1B4F89A1005\n:103D40000D1A2D1F94F8960040B194F87C200023A2\n:103D5000092104F17000EDF715F9B8B1B4F88E60DF\n:103D6000204600F08CF980B1B4F89000801B001F51\n:103D70000CE007E08C0100201F360200C53602006F\n:103D80002D370200C0F10205DCE72846A84200DA20\n:103D90000546002D01DC002005E5A8B203E510F082\n:103DA0000C0000D00120704710B5012808D002286F\n:103DB00008D0042808D0082806D0FFDF204610BD10\n:103DC0000124FBE70224F9E70324F7E770B5CC4CA4\n:103DD000A06890F87C001F2804D0607840F00100B3\n:103DE0006070E0E42069FAF73CFBD8B12069012259\n:103DF0000179407901F0070161F30705294600F0D8\n:103E0000070060F30F21A06880F8A2200022A0F82C\n:103E10009E20232200F87C2FD0F8B400BDE870402B\n:103E2000FEF7AABD0120FEF77CFFBDE870401E2012\n:103E3000FEF768BCF8B5B24C00230A21A06890F8E0\n:103E40007C207030EDF79EF838B32069FAF7E4FA79\n:103E5000C8B12069FAF7DAFA07462069FAF7DAFA00\n:103E600006462069FAF7D0FA05462069FAF7D0FA33\n:103E700001460097A06833462A463030FAF7C1FB66\n:103E8000A068FAF7EAFBA168002081F8A20081F897\n:103E90007C00BDE8F840FEF78FBD607840F001007F\n:103EA0006070F8BD964810B580680088F0F72FF96B\n:103EB000BDE81040EFF7C6BD10B5914CA36893F86C\n:103EC0007C00162802D00220607010BD60780028A7\n:103ED000FBD1D3F81801002200F11E010E30C833C7\n:103EE000ECF7C2FFA0680021C0E92E11012180F883\n:103EF0008110182180F87C1010BD10B5804CA0688E\n:103F000090F87C10132902D00220607010BD6178F7\n:103F10000029FBD1D0F8181100884988814200D0CF\n:103F2000FFDFA068D0F8181120692631FAF745FAAA\n:103F3000A1682069DC31FAF748FAA168162081F8F7\n:103F40007C0010BD10B56E4C207900071BD5607841\n:103F5000002818D1A068002190F8E400FEF72AFE9E\n:103F6000A06890F8E400FE2800D1FFDFA068FE21E1\n:103F700080F8E41090F87F10082904D10221217004\n:103F8000002180F87F1010BD70B55D4D2421002404\n:103F9000A86890F87D20212A05D090F87C20232A5B\n:103FA00018D0FFDFA0E590F8122112B990F8132184\n:103FB0002AB180F87D10A86880F8A64094E500F842\n:103FC0007D4F847690F8B1000028F4D00020FEF7F1\n:103FD00099FBF0E790F8122112B990F813212AB159\n:103FE00080F87C10A86880F8A2407DE580F87C40CD\n:103FF0000020FEF787FBF5E770B5414C0025A0686F\n:10400000D0F8181103884A889A4219D109780429EE\n:1040100016D190F87C20002319467030ECF7B2FFDF\n:1040200000B9FFDFA06890F8AA10890703D4012126\n:1040300080F87C1004E080F8A250D0F818010570D8\n:10404000A0680023194690F87D207030ECF79AFFA5\n:10405000002802D0A06880F8A65045E5B0F890206E\n:10406000B0F88E108A4201D3511A00E000218288F4\n:10407000521D8A4202D3012180F89610704710B574\n:1040800090F8821041B990F87C200023062170300E\n:10409000ECF778FF002800D0012010BD70B5114466\n:1040A000174D891D8CB2C078A968012806D040B18F\n:1040B000182805D191F8120138B109E0A1F8224180\n:1040C00012E5D1F8180184800EE591F8131191B131\n:1040D000FFF765FE80B1A86890F86400FFF75FFE07\n:1040E00050B1A86890F8121190F86420914203D062\n:1040F00090F8130100B90024A868A0F81041F3E477\n:104100008C01002070B58F4C0829207A6CD2DFE832\n:1041100001F004176464276B6B6458B1F4F7D3F8AB\n:10412000F5F7FFF80020A072F4F7B4F9BDE870408D\n:10413000F4F758BCF5F717F9BDE87040F1F71FBF69\n:10414000DEF7B6FDF5F752F8D4E90001F1F7F3FC1C\n:104150002060A07A401CC0B2A072282824D370BD71\n:10416000A07A0025401EC6B2E0683044F4F700FD96\n:1041700010B9E1687F208855A07A272828BF01253B\n:10418000DEF796FDA17A01EB4102C2EB81110844F2\n:104190002946F5F755F8A07A282809D2401CC0B264\n:1041A000A072282828BF70BDBDE87040F4F772B92E\n:1041B000207A002818BF00F086F8F4F74BFBF4F7DC\n:1041C000F7FBF5F7D0F80120E0725F480078DEF7E2\n:1041D0009BFEBDE87040F1F7D2BE002808BF70BD5D\n:1041E000BDE8704000F06FB8FFDF70BD10B5554CF2\n:1041F000207A002804BF0C2010BD00202072E0723D\n:10420000607AF2F7F8FA607AF2F761FD607AF1F716\n:104210008CFF00280CBF1F20002010BD002270B5AD\n:10422000484C06460D46207A68B12272E272607AE6\n:10423000F2F7E1FA607AF2F74AFD607AF1F775FF7A\n:10424000002808BFFFDF4048E560067070BD70B50C\n:10425000050007D0A5F5E8503C494C3881429CBF89\n:10426000122070BD374CE068002804BF092070BDE3\n:10427000207A00281CBF0C2070BD3548F1F7FAFEEB\n:104280006072202804BF1F2070BDF1F76DFF206011\n:104290001DB12946F1F74FFC2060012065602072B6\n:1042A00000F011F8002070BD2649CA7A002A04BF28\n:1042B000002070471E22027000224270CB684360CB\n:1042C000CA7201207047F0B585B0F1F74DFF1D4D62\n:1042D0000746394668682C6800EB80004600204697\n:1042E000F2F73AFCB04206DB6868811B3846F1F70A\n:1042F00022FC0446286040F2367621463846F2F722\n:104300002BFCB04204DA31463846F1F714FC04467F\n:1043100000208DF8000040F6E210039004208DF894\n:10432000050001208DF8040068460294F2F7CAF8EF\n:10433000687A6946F2F743F9002808BFFFDF05B045\n:10434000F0BD000074120020AC010020B5EB3C0071\n:10435000054102002DE9F0410C4612490D68114A51\n:10436000114908321160A0F12001312901D3012047\n:104370000CE0412810D040CC0C4F94E80E0007EB25\n:104380008000241F50F8807C3046B84720600548E4\n:10439000001D0560BDE8F081204601F0EBFCF5E76B\n:1043A00006207047100502400100000184630200EE\n:1043B00010B55548F2F7FAFF00B1FFDF5248401C34\n:1043C000F2F7F4FF002800D0FFDF10BD2DE9F14F18\n:1043D0004E4E82B0D6F800B001274B48F2F7EEFF00\n:1043E000DFF8248120B9002708F10100F2F7FCFF73\n:1043F000474C00254FF0030901206060C4F80051CC\n:10440000C4F80451029931602060DFF808A11BE074\n:10441000DAF80000C00617D50E2000F068F8EFF3B8\n:10442000108010F0010072B600D001200090C4F896\n:104430000493D4F8000120B9D4F8040108B901F0BC\n:10444000A3FC009800B962B6D4F8000118B9D4F8FA\n:1044500004010028DCD0D4F804010028CCD137B105\n:10446000C6F800B008F10100F2F7A8FF11E008F16A\n:104470000100F2F7A3FF0028B6D1C4F80893C4F8EE\n:104480000451C4F800510E2000F031F81E48F2F734\n:10449000ABFF0020BDE8FE8F2DE9F0438DB00D4647\n:1044A000064600240DF110090DF1200818E000BFA8\n:1044B00004EB4407102255F827106846E9F7BDFFC2\n:1044C00005EB8707102248467968E9F7B6FF68468A\n:1044D000FFF77CFF10224146B868E9F7AEFF641C85\n:1044E000B442E5DB0DB00020BDE8F0836EE70028A4\n:1044F00009DB00F01F02012191404009800000F11A\n:10450000E020C0F880127047AD01002004E50040B3\n:1045100000E0004010ED00E0B54900200870704751\n:1045200070B5B44D01232B60B34B1C68002CFCD03C\n:10453000002407E00E6806601E68002EFCD0001DF7\n:10454000091D641C9442F5D30020286018680028D7\n:10455000FCD070BD70B5A64E0446A84D3078022838\n:1045600000D0FFDFAC4200D3FFDF7169A44801290E\n:1045700003D847F23052944201DD03224271491CB4\n:104580007161291BC1609E49707800F02EF90028E6\n:1045900000D1FFDF70BD70B5954C0D466178884243\n:1045A00000D0FFDF954E082D4BD2DFE805F04A041E\n:1045B0001E2D4A4A4A382078022800D0FFDF032007\n:1045C0002070A078012801D020B108E0A06801F097\n:1045D00085F904E004F1080007C8FFF7A1FF0520F2\n:1045E0002070BDE87040F1F7CABCF1F7BDFD01468F\n:1045F0006068F2F7B1FAB04202D2616902290BD3C6\n:104600000320F2F7FAFD12E0F1F7AEFD0146606813\n:10461000F2F7A2FAB042F3D2BDE870409AE72078F0\n:1046200002280AD0052806D0FFDF04202070BDE84C\n:10463000704000F0D0B8022000E00320F2F7DDFD6A\n:10464000F3E7FFDF70BD70B50546F1F78DFD684CEF\n:1046500060602078012800D0FFDF694901200870E0\n:104660000020087104208D6048716448C8600220F1\n:104670002070607800F0B9F8002800D1FFDF70BD2D\n:1046800010B55B4C207838B90220F2F7CCFD18B990\n:104690000320F2F7C8FD08B1112010BD5948F1F709\n:1046A000E9FC6070202804D00120207000206061A7\n:1046B00010BD032010BD2DE9F0471446054600EB60\n:1046C00084000E46A0F1040801F01BF907464FF0E4\n:1046D000805001694F4306EB8401091FB14201D2AA\n:1046E000012100E0002189461CB10069B4EB900F64\n:1046F00002D90920BDE8F0872846DCF7A3FD90B970\n:10470000A84510D3BD4205D2B84503D245EA0600FC\n:10471000800701D01020EDE73046DCF793FD10B99B\n:10472000B9F1000F01D00F20E4E73748374900689E\n:10473000884205D0224631462846FFF7F1FE1AE0AE\n:10474000FFF79EFF0028D5D1294800218560C0E9E8\n:1047500003648170F2F7D3FD08B12D4801E04AF2FD\n:10476000F87060434FF47A7100F2E730B0FBF1F07B\n:104770001830FFF768FF0020BCE770B505464FF022\n:10478000805004696C432046DCF75CFD08B10F20C3\n:1047900070BD01F0B6F8A84201D8102070BD1A48CB\n:1047A0001A490068884203D0204601F097F810E0CB\n:1047B000FFF766FF0028F1D10D4801218460817068\n:1047C000F2F79DFD08B1134800E013481830FFF7D9\n:1047D0003AFF002070BD10B5054C6078F1F7A5FCDC\n:1047E00000B9FFDF0020207010BDF1F7E8BE000027\n:1047F000B001002004E5014000E40140105C0C0021\n:1048000084120020974502005C000020BEBAFECA58\n:1048100050280500645E0100A85B01007E4909681C\n:104820000160002070477C4908600020704701212A\n:104830008A0720B1012804D042F204007047916732\n:1048400000E0D1670020704774490120086042F2FF\n:104850000600704708B50423704A1907103230B1BA\n:10486000C1F80433106840F0010010600BE01068DC\n:1048700020F001001060C1F808330020C1F80801E1\n:10488000674800680090002008BD011F0B2909D867\n:10489000624910310A6822F01E0242EA40000860B4\n:1048A0000020704742F2050070470F2809D85B4985\n:1048B00010310A6822F4706242EA00200860002089\n:1048C000704742F205007047000100F18040C0F8D7\n:1048D000041900207047000100F18040C0F8081959\n:1048E00000207047000100F18040D0F80009086006\n:1048F00000207047012801D907207047494A52F823\n:10490000200002680A43026000207047012801D994\n:1049100007207047434A52F8200002688A43026029\n:1049200000207047012801D9072070473D4A52F8FE\n:104930002000006808600020704702003A494FF0EC\n:10494000000003D0012A01D0072070470A60704799\n:10495000020036494FF0000003D0012A01D00720A1\n:1049600070470A60704708B54FF40072510510B1E6\n:10497000C1F8042308E0C1F808230020C1F824018D\n:1049800027481C3000680090002008BD08B5802230\n:10499000D10510B1C1F8042308E0C1F808230020B4\n:1049A000C1F81C011E48143000680090002008BDAA\n:1049B00008B54FF48072910510B1C1F8042308E0E6\n:1049C000C1F808230020C1F82001154818300068FC\n:1049D0000090002008BD10493831096801600020AE\n:1049E000704770B54FF080450024C5F80841F2F7D4\n:1049F00092FC10B9F2F799FC28B1C5F82441C5F82A\n:104A00001C41C5F820414FF0E020802180F80014BF\n:104A10000121C0F8001170BD0004004000050040F5\n:104A2000080100404864020078050040800500400D\n:104A30006249634B0A6863499A42096801D1C1F32C\n:104A400010010160002070475C495D4B0A685D49B8\n:104A5000091D9A4201D1C0F3100008600020704780\n:104A60005649574B0A68574908319A4201D1C0F359\n:104A7000100008600020704730B5504B504D1C6846\n:104A800042F20803AC4202D0142802D203E01128FB\n:104A900001D3184630BDC3004B481844C0F8101568\n:104AA000C0F81425002030BD4449454B0A6842F245\n:104AB00009019A4202D0062802D203E0042801D359\n:104AC00008467047404A012142F8301000207047E4\n:104AD0003A493B4B0A6842F209019A4202D0062841\n:104AE00002D203E0042801D308467047364A012168\n:104AF00002EBC00041600020704770B52F4A304E75\n:104B0000314C156842F2090304EB8002B54204D02F\n:104B1000062804D2C2F8001807E0042801D318467A\n:104B200070BDC1F31000C2F80008002070BD70B560\n:104B3000224A234E244C156842F2090304EB8002FA\n:104B4000B54204D0062804D2D2F8000807E00428B1\n:104B500001D3184670BDD2F80008C0F310000860F9\n:104B6000002070BD174910B50831184808601120A1\n:104B7000154A002102EBC003C3F81015C3F8141541\n:104B8000401C1428F6D3002006E0042804D302EBCE\n:104B90008003C3F8001807E002EB8003D3F8004855\n:104BA000C4F31004C3F80048401C0628EDD310BD20\n:104BB0000449064808310860704700005C00002086\n:104BC000BEBAFECA00F5014000F001400000FEFF41\n:104BD000814B1B6803B19847BFF34F8F7F48016833\n:104BE0007F4A01F4E06111430160BFF34F8F00BFC2\n:104BF000FDE710B5EFF3108010F0010F72B601D091\n:104C0000012400E0002400F0DDF850B1DCF7BFFB28\n:104C1000F1F755F8F2F793FAF2F7BEFF7149002069\n:104C2000086004B962B6002010BD2DE9F0410C46C1\n:104C30000546EFF3108010F0010F72B601D0012687\n:104C400000E0002600F0BEF820B106B962B60820E8\n:104C5000BDE8F08101F01EF9DCF79DFB0246002063\n:104C600001234709BF0007F1E02700F01F01D7F833\n:104C70000071CF40F9071BD0202803D222FA00F19F\n:104C8000C90727D141B2002904DB01F1E02191F8E5\n:104C9000001405E001F00F0101F1E02191F8141D6D\n:104CA0004909082916D203FA01F717F0EC0F11D0C1\n:104CB000401C6428D5D3F2F74DFF4B4A4B490020E6\n:104CC000F2F790FF47494A4808602046DCF7C1FAEE\n:104CD00060B904E006B962B641F20100B8E73E48A7\n:104CE00004602DB12846DCF701FB18B1102428E040\n:104CF000404D19E02878022802D94FF4805420E072\n:104D000007240028687801D0D8B908E0C8B1202865\n:104D100017D8A878212814D8012812D001E0A87843\n:104D200078B9E8780B280CD8DCF735FB2946F2F780\n:104D3000ECF9F0F783FF00F017FE2846DCF7F4FAF1\n:104D4000044606B962B61CB1FFF753FF20467FE761\n:104D500000207DE710B5044600F034F800B10120D2\n:104D60002070002010BD244908600020704770B5F5\n:104D70000C4622490D682149214E08310E60102849\n:104D800007D011280CD012280FD0132811D00120E1\n:104D900013E0D4E90001FFF748FF354620600DE03D\n:104DA000FFF727FF0025206008E02068FFF7D2FF0B\n:104DB00003E0114920680860002020600F48001DB2\n:104DC000056070BD07480A490068884201D101208A\n:104DD0007047002070470000C80100200CED00E083\n:104DE0000400FA055C0000204814002000000020A8\n:104DF000BEBAFECA50640200040000201005024042\n:104E0000010000017D49C0B20860704700B57C49CF\n:104E1000012808BF03200CD0022808BF042008D0B6\n:104E2000042808BF062004D0082816BFFFDF05208D\n:104E300000BD086000BD70B505460C46164610461C\n:104E4000F3F7D2F8022C08BF4FF47A7105D0012C89\n:104E50000CBF4FF4C86140F6340144183046F3F7F4\n:104E60003CF9204449F6797108444FF47A71B0FB5B\n:104E7000F1F0281A70BD70B505460C460846F4F7E7\n:104E80002FFA022C08BF40F24C4105D0012C0CBF78\n:104E900040F634014FF4AF5149F6CA62511A084442\n:104EA0004FF47A7100F2E140B0FBF1F0281A801E55\n:104EB00070BD70B5064615460C460846F4F710FA64\n:104EC000022D08BF4FF47A7105D0012D0CBF4FF4AD\n:104ED000C86140F63401022C08BF40F24C4205D0B4\n:104EE000012C0CBF40F634024FF4AF52891A08442B\n:104EF00049F6FC6108444FF47A71B0FBF1F0301AC6\n:104F000070BD70B504460E460846F3F76DF80546C9\n:104F10003046F3F7E2F828444AF2AB3108444FF444\n:104F20007A71B0FBF1F0201A801E70BD2DE9F041BE\n:104F300007461E460D4614461046082A16BF04288A\n:104F40004EF62830F3F750F807EB4701C1EBC711D5\n:104F500000EBC100022D08BF40F24C4105D0012DED\n:104F60000CBF40F634014FF4AF5147182846F4F710\n:104F7000B7F9381A4FF47A7100F6B730B0FBF1F593\n:104F80002046F3F7B9F828443044401DBDE8F081CD\n:104F900070B5054614460E460846F3F725F805EBAE\n:104FA0004502C2EBC512C0EBC2053046F3F795F8D7\n:104FB0002D1A2046082C16BF04284EF62830F3F789\n:104FC00013F828444FF47A7100F6B730B0FBF1F5CE\n:104FD0002046F3F791F82844401D70BD0949082880\n:104FE00018BF0428086803BF20F46C5040F4444004\n:104FF00040F0004020F00040086070470C15004071\n:105000001015004040170040F0B585B00C4605462D\n:10501000F9F73EF907466E78204603A96A46EEF78F\n:1050200002FD81198EB258B1012F02D0032005B0C4\n:10503000F0BD204604AA0399EEF717FC049D01E099\n:10504000022F0FD1ED1C042E0FD32888BDF80010BD\n:10505000001D80B2884201D8864202D14FF0000084\n:10506000E5E702D34FF00200E1E74FF00100DEE791\n:10507000FA48C078FF2814BF0120002070472DE9AE\n:10508000F041F74C0746160060680D4603D0F9F76B\n:1050900069F8A0B121E0F9F765F8D8B96068F9F7C7\n:1050A00061F8D0B915F00C0F17D06068C17811F015\n:1050B0003F0F1CBF007910F0100F0ED00AE0022E37\n:1050C00008D0E6481FB1807DFF2806D002E0C078F6\n:1050D000FF2802D00120BDE8F0810020BDE8F0816A\n:1050E0000A4601460120CAE710B5DC4C1D2200210A\n:1050F000A01CE9F7CCF97F206077FF202074E070D6\n:10510000A075A08920F060002030A08100202070D0\n:1051100010BD70B5D249486001200870D248D1490D\n:10512000002541600570CD4C1D222946A01CE9F7E1\n:10513000AEF97F206077FF202074E070A075A08911\n:1051400020F060002030A081257070BD2DE9F0476F\n:10515000C24C06462078C24F4FF0010907F10808FB\n:10516000002520B13878D0B998F80000B8B198F887\n:10517000000068B387F80090D8F804103C2239B3D7\n:105180007570301DE9F759F90520307086F80490E4\n:105190003878002818BF88F8005005D015E03D7019\n:1051A000A11C4FF48E72EAE71D220021A01CE9F732\n:1051B0006EF97F206077FF202074E070A075A089D1\n:1051C00020F060002030A08125700120BDE8F0872C\n:1051D0000020BDE8F087A148007800280CBF01201E\n:1051E000002070470A460146002048E710B510B17C\n:1051F000022810D014E09A4C6068F8F7B3FF78B931\n:105200006068C17811F03F0F1CBF007910F0100FDB\n:1052100006D1012010BD9148007B10F0080FF8D195\n:10522000002010BD2DE9FF4F81B08C4D8346DDE994\n:105230000F042978DDF838A09846164600291CBFCF\n:1052400005B0BDE8F08F8849097800291CBF05B07A\n:10525000BDE8F08FE872B4B1012E08BF012708D075\n:10526000022E08BF022704D0042E16BF082E0327E3\n:10527000FFDFEF7385F81E804FF00008784F8CB188\n:10528000022C1DD020E0012E08BF012708D0022EDD\n:1052900008BF022704D0042E16BF082E0327FFDF05\n:1052A000AF73E7E77868F8F75DFF68B97868C178A9\n:1052B00011F03F0F1CBF007910F0100F04D110E067\n:1052C000287B10F0080F0CD14FF003017868F8F735\n:1052D000FDFD30B14178090929740088C0F30B0045\n:1052E0006882CDF800807868F8F73CFF0146012815\n:1052F000BDF8000005F102090CBF40F0010020F0EC\n:105300000100ADF8000099F80A2012F0020F4ED10A\n:10531000022918BF20F0020049D000BFADF80000FC\n:1053200010F0020F04D0002908BF40F0080801D097\n:1053300020F00808ADF800807868C17811F03F0FC0\n:105340001CBF007910F0020F0CD0314622464FF0FE\n:105350000100FFF794FE002804BF48F00400ADF8F8\n:10536000000006D099F80A00800860F38208ADF8C2\n:10537000008099F80A004109BDF8000061F3461069\n:10538000ADF8000080B20090BDF80000A8810421B3\n:105390007868F8F79BFD002804BFA88920F060001A\n:1053A0000CD0B0F80100C004C00C03D007E040F0FE\n:1053B0000200B3E7A88920F060004030A8815CB902\n:1053C00016F00C0F08D07868C17811F03F0F1CBFA1\n:1053D000007910F0100F0DD17868C17811F03F0FEF\n:1053E00008D0017911F0400F04D00621F8F76EFDC6\n:1053F00000786877314622460020FFF740FE60BB08\n:105400007968C87810F03F0F3FD0087910F0010F8D\n:105410003BD0504605F1040905F10308BAF1FF0F2E\n:105420000DD04A464146F8F781FA002808BFFFDF51\n:1054300098F8000040F0020088F8000025E00846D7\n:10544000F8F7DBFC88F800007868F8F7ADFC07286F\n:105450000CD249467868F8F7B2FC16E094120020A6\n:10546000CC010020D2120020D40100207868F8F787\n:105470009BFC072809D100217868F8F727FD01680F\n:10548000C9F800108088A9F804003146224601209E\n:10549000FFF7F5FD80BB7868C17811F03F0F2BD086\n:1054A000017911F0020F27D005F1170605F1160852\n:1054B000BBF1020F18BFBBF1030F08D0F8F774FC63\n:1054C00007280AD231467868F8F787FC12E002987C\n:1054D000016831608088B0800CE07868F8F764FC7F\n:1054E000072807D101217868F8F7F0FC01683160DE\n:1054F0008088B08088F800B0002C04BF05B0BDE8FB\n:10550000F08F7868F8F72EFE022804BF05B0BDE8DA\n:10551000F08F05F11F047868F8F76DFEAB7AC3F1E0\n:10552000FF01884228BF084605D9A98921F06001FA\n:1055300001F14001A981C2B203EB04017868F8F7D8\n:1055400062FEA97A0844A87205B0BDE8F08FB048A1\n:105550000178002918BF704701220270007B10F00B\n:10556000080F14BF07200620FCF75FBEA848C17BC8\n:10557000002908BF70470122818921F06001403174\n:1055800081810378002B18BF7047027011F0080F5B\n:1055900014BF07200620FCF748BE2DE9FF5F9C4F93\n:1055A000DDF838B0914638780E4600281CBF04B0AC\n:1055B000BDE8F09FBC1C1D2200212046E8F767FFD4\n:1055C000944D4FF0010A84F800A06868F8F7ECFBEE\n:1055D00018B3012826D0022829D0062818BFFFDFDB\n:1055E0002AD000BF04F11D016868F8F726FC20727C\n:1055F000484604F1020904F10108FF2821D04A4677\n:105600004146F8F793F9002808BFFFDF98F800003B\n:1056100040F0020088F8000031E0608940F013009B\n:105620006081DFE7608940F015006081E0E7608914\n:1056300040F010006081D5E7608940F01200608181\n:10564000D0E76868F8F7D9FB88F800006868F8F7D1\n:10565000ABFB072804D249466868F8F7B0FB0EE0B8\n:105660006868F8F7A1FB072809D100216868F8F7F6\n:105670002DFC0168C9F800108088A9F8040084F89E\n:1056800009B084F80CA000206073FF20A073A17AF9\n:1056900011F0040F08BF20752AD004F1150804F199\n:1056A0001409022E18BF032E09D06868F8F77CFB96\n:1056B00007280CD241466868F8F78FFB16E000987F\n:1056C0000168C8F800108088A8F804000EE0686837\n:1056D000F8F76AFB072809D101216868F8F7F6FB9B\n:1056E0000168C8F800108088A8F8040089F80060F4\n:1056F0007F20E0760398207787F800A004B006208A\n:10570000BDE8F05FFCF791BD2DE9FF5F424F814698\n:105710009A4638788B4600281CBF04B0BDE8F09F3D\n:105720003B48017831B1007B10F0100F04BF04B08A\n:10573000BDE8F09F1D227C6800212046E8F7A7FE07\n:1057400048464FF00108661C324D84F8008004F191\n:105750000209FF280BD04A463146F8F7E7F800283F\n:1057600008BFFFDF307840F0020030701CE068684E\n:10577000F8F743FB30706868F8F716FB072804D287\n:1057800049466868F8F71BFB0EE06868F8F70CFB01\n:10579000072809D100216868F8F798FB0168C9F863\n:1057A00000108088A9F8040004F11D016868F8F76A\n:1057B00044FB207284F809A060896BF3000040F07C\n:1057C0001A00608184F80C8000206073FF20A073B1\n:1057D00020757F20E0760298207787F8008004B05B\n:1057E0000720BDE8F05FFCF720BD094A137C834227\n:1057F00005BF508A88420020012070470448007B82\n:10580000C0F3411002280CBF0120002070470000A7\n:1058100094120020CC010020D4010020C2790D2375\n:1058200041B342BB8188012904D94908818004BF62\n:10583000012282800168012918BF002930D0016847\n:105840006FEA0101C1EBC10202EB011281796FEA3B\n:10585000010101EB8103C3EB811111444FEA914235\n:1058600001608188B2FBF1F301FB132181714FF0DC\n:10587000010102E01AB14FF00001C1717047818847\n:10588000FF2908D24FF6FF7202EA41018180FF2909\n:1058900084BFFF2282800168012918BF0029CED170\n:1058A0000360CCE7817931B1491E11F0FF018171AC\n:1058B0001CBF002070470120704710B50121C17145\n:1058C0008171818004460421F1F7E8FD002818BFAA\n:1058D00010BD2068401C206010BD00000B4A022152\n:1058E00011600B490B68002BFCD0084B1B1D186086\n:1058F00008680028FCD00020106008680028FCD050\n:1059000070474FF0805040697047000004E5014047\n:1059100000E4014002000B464FF00000014620D099\n:10592000012A04D0022A04D0032A0DD103E0012069\n:1059300002E0022015E00320072B05D2DFE803F088\n:105940000406080A0C0E100007207047012108E029\n:10595000022106E0032104E0042102E0052100E029\n:105960000621F0F7A4BB0000E24805218170002168\n:10597000017041707047E0490A78012A05D0CA6871\n:105980001044C8604038F1F7B4B88A6810448860A1\n:10599000F8E7002819D00378D849D94A13B1012B68\n:1059A0000ED011E00379012B00D06BB943790BB114\n:1059B000012B09D18368643B8B4205D2C0680EE09D\n:1059C0000379012B02D00BB10020704743790BB152\n:1059D000012BF9D1C368643B8B42F5D280689042B9\n:1059E000F2D801207047C44901220A70027972B1CD\n:1059F00000220A71427962B104224A7182685232ED\n:105A00008A60C068C860BB49022088707047032262\n:105A1000EFE70322F1E770B5B74D04460020287088\n:105A2000207988B100202871607978B10420B14EC6\n:105A30006871A168F068F0F77EF8A860E0685230FD\n:105A4000E8600320B07070BD0120ECE70320EEE7B2\n:105A50002DE9F04105460226F0F777FF006800B116\n:105A6000FFDFA44C01273DB12878B8B1012805D04B\n:105A7000022811D0032814D027710DE06868C828C7\n:105A800008D30421F1F79BF820B16868FFF773FF92\n:105A9000012603E0002601E000F014F93046BDE8DD\n:105AA000F08120780028F7D16868FFF772FF00289E\n:105AB000E2D06868017879B1A078042800D0FFDFCF\n:105AC00001216868FFF7A7FF8B49E07800F003F930\n:105AD0000028E1D1FFDFDFE7FFF785FF6770DBE735\n:105AE0002DE9F041834C0F46E178884200D0FFDF7A\n:105AF00000250126082F7DD2DFE807F0040B2828B7\n:105B00003D434F57A0780328C9D00228C7D0FFDFF4\n:105B1000C5E7A078032802D0022800D0FFDF0420C8\n:105B2000A07025712078B8BB0020FFF724FF7248D1\n:105B30000178012906D08068E06000F0EDF820616E\n:105B4000002023E0E078F0F734FCF5E7A0780328A4\n:105B500002D0022800D0FFDF207880BB022F08D0BF\n:105B60005FF00500F1F749FBA078032840D0A5704D\n:105B700095E70420F6E7A078042800D0FFDF022094\n:105B800004E0A078042800D0FFDF0120A168884746\n:105B9000FFF75EFF054633E003E0A078042800D05D\n:105BA000FFDFBDE8F04100F08DB8A078042804D0F4\n:105BB000617809B1022800D0FFDF207818B1BDE874\n:105BC000F04100F08AB8207920B10620F1F715FBEA\n:105BD00025710DE0607840B14749E07800F07BF82E\n:105BE00000B9FFDF65705AE704E00720F1F705FB15\n:105BF000A67054E7FFDF52E73DB1012D03D0FFDF70\n:105C0000022DF9D14BE70420C0E70320BEE770B5B1\n:105C1000050004D0374CA078052806D101E01020FB\n:105C200070BD0820F1F7FFFA08B1112070BD3548AA\n:105C3000F0F720FAE070202806D00121F1F7DCF817\n:105C40000020A560A07070BD032070BD294810B56C\n:105C5000017809B1112010BD8178052906D00129EC\n:105C600006D029B101210170002010BD0F2010BD08\n:105C700000F033F8F8E770B51E4C0546A07808B17F\n:105C8000012809D155B12846FFF783FE40B1287895\n:105C900040B1A078012809D00F2070BD102070BD40\n:105CA000072070BD2846FFF79EFE03E0002128462E\n:105CB000FFF7B1FE1049E07800F00DF800B9FFDF02\n:105CC000002070BD0B4810B5006900F01DF8BDE85C\n:105CD0001040F0F754B9F0F772BC064810B5C07820\n:105CE000F0F723FA00B9FFDF0820F1F786FABDE8E4\n:105CF000104039E6DC010020B41300203D8601008D\n:105D0000FF1FA107E15A02000C490A6848F202137A\n:105D10009A4302430A607047084A116848F2021326\n:105D200001EA03009943116070470246044B1020BA\n:105D30001344FC2B01D8116000207047C8060240B4\n:105D40000018FEBF1EF0040F0CBFEFF30880EFF346\n:105D50000980014A10470000FF7B010001B41EB416\n:105D600000B5F1F76DFC01B40198864601BC01B0A5\n:105D70001EBD00008269034981614FF0010010449B\n:105D8000704700005D5D02000FF20C0000F10000A2\n:105D9000694641F8080C20BF70470000FEDF184933\n:105DA0000978F9B90420714608421BD10699154AB1\n:105DB000914217DC0699022914DB02394878DF2862\n:105DC00010D10878FE2807D0FF280BD14FF0010032\n:105DD0004FF000020C4B184741F201000099019A64\n:105DE000094B1847094B002B02D01B68DB6818478A\n:105DF0004FF0FF3071464FF00002034B1847000090\n:105E000028ED00E000700200D14B020004000020E9\n:105E1000174818497047FFF7FBFFDBF7CFF900BDC4\n:105E2000154816490968884203D1154A13605B6812\n:105E3000184700BD20BFFDE70F4810490968884298\n:105E400010D1104B18684FF0FF318842F2D080F328\n:105E500008884FF02021884204DD0B4802680321A6\n:105E60000A4302600948804709488047FFDF000075\n:105E7000C8130020C81300200010000000000020FC\n:105E8000040000200070020014090040B92F000037\n:105E9000215E0200F0B44046494652465B460FB4CC\n:105EA00002A0013001B50648004700BF01BC86468C\n:105EB0000FBC8046894692469B46F0BC7047000066\n:105EC0000911000004207146084202D0EFF3098155\n:105ED00001E0EFF30881886902380078102813DBAD\n:105EE00020280FDB2C280BDB0A4A12680A4B9A4247\n:105EF00003D1602804DB094A10470220086070477C\n:105F0000074A1047074A1047074A12682C3212689E\n:105F1000104700005C000020BEBAFECA9B130000C0\n:105F2000554302006F4D0200040000200D4B0E4946\n:105F300008470E4B0C4908470D4B0B4908470D4BC2\n:105F4000094908470C4B084908470C4B06490847C4\n:105F50000B4B054908470B4B034908470A4B0249BD\n:105F60000847000041BF000079C10000792D000002\n:105F7000F32B0000812B0000012E0000B71300005E\n:105F80003F2900007D2F0000455D020000210160D7\n:105F90004160017270470A6802600B7903717047B3\n:105FA00089970000FF9800005B9A0000C59A0000E6\n:105FB000FF9A0000339B0000659B00009D9B000042\n:105FC0003D9C00007D980000859A0000331200007F\n:105FD0000744000053440000B94400004745000056\n:105FE0006146000037470000694700004148000053\n:105FF000DB4800002F490000154A0000354A000028\n:10600000AD160000D1160000F11500004D1600007D\n:10601000031700009717000003610000C36200002F\n:10602000A1660000BB67000043680000C168000073\n:10603000256900004D6A00001D6B0000896B00009F\n:10604000574A00005D4A0000674A0000CF4A00003E\n:10605000FB4A0000B74C0000E14C0000194D000065\n:10606000834D00006D4E0000834E00007744000019\n:10607000974E0000B94E0000FF4E000033120000A2\n:10608000331200003312000033120000C12500005B\n:1060900047260000632600007F2600000D28000030\n:1060A000A9260000B3260000F526000017270000EF\n:1060B000F3270000352800003312000033120000DF\n:1060C00097840000B7840000B9840000FD840000BC\n:1060D0002B8500001B860000A7860000BB86000001\n:1060E000098700001F880000C1890000E98A0000BC\n:1060F0003D740000018B00003312000033120000D9\n:10610000EBB700004DB90000A7B9000021BA0000AC\n:10611000CDBA0000010000000000000010011001D5\n:106120003A0200001A020000020004050600000006\n:1061300007111102FFFFFFFF0000FFFFF3B3000094\n:10614000273D0000532100008774000001900000EB\n:1061500000000000BF9200009B920000AD92000082\n:10616000000002000000000000020000000000002B\n:1061700000010000000000004382000023820000B4\n:10618000918200002D250000EF2400000F25000063\n:10619000DBAA000007AB00000FAD0000FD590000B6\n:1061A000B182000000000000E18200007B250000B9\n:1061B000000000000000000000000000F1AB000043\n:1061C00000000000915A00000300000001555555E1\n:1061D000D6BE898E00006606660C661200000A03B1\n:1061E000AE055208000056044608360CC7FD0000F4\n:1061F0005BFF0000A1FB0000C3FD0000A7A8010099\n:106200009B040100AAAED7AB15412010000000008E\n:10621000900A0000900A00007B5700007B570000A6\n:10622000E143000053B200000B7700006320000040\n:10623000BD3A020063BD0100BD570000BD5700001C\n:1062400005440000E5B2000093770000D72000006D\n:10625000EB3A020079BD0100700170014000380086\n:106260005C0024006801200200000300656C746279\n:10627000000000000000000000000000000000001E\n:106280008700000000000000000000000000000087\n:10629000BE83605ADB0B376038A5F5AA9183886C02\n:1062A000010000007746010049550100000000018F\n:1062B0000206030405000000070000FB349B5F801A\n:1062C000000080001000000000000000000000003E\n:1062D000060000000A000000320000007300000009\n:1062E000B4000000F401FA00960064004B00320094\n:1062F0001E0014000A000500020001000049000011\n:1063000000000000D7CF0100E9D1010025D1010034\n:10631000EBCF0100000000008FD40100000101025A\n:10632000010202030C0802170D0101020909010113\n:1063300006020918180301010909030305000000FA\n:10634000555555252627D6BE898E00002BFB01000A\n:1063500003F7010049FA01003FF20100BB220200ED\n:10636000B7FB0100F401FA00960064004B00320014\n:106370001E0014000A00050002000100254900006B\n:1063800000000000314A0200494A0200614A02004E\n:10639000794A0200A94A0200D14A0200FB4A0200DF\n:1063A0002F4B02007B470200B7460200A1430200C8\n:1063B0002B5D0200AD730100BD730100E9730100A4\n:1063C000BB740100C3740100D57401002F480200A2\n:1063D000494802001D4802002748020055480200B3\n:1063E0008B480200AB480200C9480200D7480200AF\n:1063F000E5480200F54802000D4902002549020067\n:106400003B4902005149020000000000DFBC0000CF\n:1064100035BD00004BBD000015590200CD43020000\n:10642000994402000F5C02004D5C0200775C0200A0\n:106430009D710100FD760100674902008D4902004F\n:10644000B1490200D74902001C0500402005004068\n:10645000001002007464020008000020E80100003F\n:106460004411000098640200F0010020D8110000DF\n:10647000A011000001181348140244200B440C061C\n:106480004813770B1B2034041ABA0401A40213101A\n:08649000327F0B744411C000BF\n:00000001FF\n"
  },
  {
    "path": "bin/setup-python-for-esp-debug.sh",
    "content": "# shellcheck shell=bash\n# (this minor script is actually shell agnostic, and is intended to be sourced rather than run in a subshell)\n\n# This is a little script you can source if you want to make ESP debugging work on a modern (24.04) ubuntu machine\n# It assumes you have built and installed python 2.7 from source with:\n# ./configure --enable-optimizations --enable-shared --enable-unicode=ucs4\n# sudo make clean\n# make\n# sudo make altinstall\n\nexport LD_LIBRARY_PATH=$HOME/packages/python-2.7.18/\nexport PYTHON_HOME=/usr/local/lib/python2.7/\n"
  },
  {
    "path": "bin/shame.py",
    "content": "import sys\nimport os\nimport json\nfrom github import Github\n\ndef parseFile(path):\n    with open(path, \"r\") as f:\n        data = json.loads(f)\n    for file in data[\"files\"]:\n        if file[\"name\"].endswith(\".bin\"):\n            return file[\"name\"], file[\"bytes\"]\n\nif len(sys.argv) != 4:\n    print(f\"expected usage: {sys.argv[0]} <PR number> <path to old-manifests> <path to new-manifests>\")\n    sys.exit(1)\n\npr_number = int(sys.argv[1])\n\ntoken = os.getenv(\"GITHUB_TOKEN\")\nif not token:\n    raise EnvironmentError(\"GITHUB_TOKEN not found in environment.\")\n\nrepo_name = os.getenv(\"GITHUB_REPOSITORY\")  # \"owner/repo\"\nif not repo_name:\n    raise EnvironmentError(\"GITHUB_REPOSITORY not found in environment.\")\n\noldFiles = sys.argv[2]\nold = set(os.path.join(oldFiles, f) for f in os.listdir(oldFiles) if os.path.isfile(f))\nnewFiles = sys.argv[3]\nnew = set(os.path.join(newFiles, f) for f in os.listdir(newFiles) if os.path.isfile(f))\n\nstartMarkdown = \"# Target Size Changes\\n\\n\"\nmarkdown = \"\"\n\nnewlyIntroduced = new - old\nif len(newlyIntroduced) > 0:\n    markdown += \"## Newly Introduced Targets\\n\\n\"\n    # create a table\n    markdown += \"| File | Size |\\n\"\n    markdown += \"| ---- | ---- |\\n\"\n    for f in newlyIntroduced:\n        name, size = parseFile(f)\n        markdown += f\"| `{name}` | {size}b |\\n\"\n\n# do not log removed targets\n# PRs only run a small subset of builds, so removed targets are not meaningful\n# since they are very likely to just be not ran in PR CI\n\nboth = old & new\ndegradations = []\nimprovements = []\nfor f in both:\n    oldName, oldSize = parseFile(f)\n    _, newSize = parseFile(f)\n    if oldSize != newSize:\n        if newSize < oldSize:\n            improvements.append((oldName, oldSize, newSize))\n        else:\n            degradations.append((oldName, oldSize, newSize))\n\nif len(degradations) > 0:\n    markdown += \"\\n## Degradation\\n\\n\"\n    # create a table\n    markdown += \"| File | Difference | Old Size | New Size |\\n\"\n    markdown += \"| ---- | ---------- | -------- | -------- |\\n\"\n    for oldName, oldSize, newSize in degradations:\n        markdown += f\"| `{oldName}` | **{oldSize - newSize}b** | {oldSize}b | {newSize}b |\\n\"\n\nif len(improvements) > 0:\n    markdown += \"\\n## Improvement\\n\\n\"\n    # create a table\n    markdown += \"| File | Difference | Old Size | New Size |\\n\"\n    markdown += \"| ---- | ---------- | -------- | -------- |\\n\"\n    for oldName, oldSize, newSize in improvements:\n        markdown += f\"| `{oldName}` | **{oldSize - newSize}b** | {oldSize}b | {newSize}b |\\n\"\n\nif len(markdown) == 0:\n    markdown = \"No changes in target sizes detected.\"\n\ng = Github(token)\nrepo = g.get_repo(repo_name)\npr = repo.get_pull(pr_number)\n\nexisting_comment = None\nfor comment in pr.get_issue_comments():\n    if comment.body.startswith(startMarkdown):\n        existing_comment = comment\n        break\n\nfinal_markdown = startMarkdown + markdown\n\nif existing_comment:\n    existing_comment.edit(body=final_markdown)\nelse:\n    pr.create_issue_comment(body=final_markdown)\n"
  },
  {
    "path": "bin/test-native-docker.sh",
    "content": "#!/usr/bin/env bash\n# Run native PlatformIO tests inside Docker (for macOS / non-Linux hosts).\n#\n# Usage:\n#   ./bin/test-native-docker.sh                          # run all native tests\n#   ./bin/test-native-docker.sh -f test_transmit_history  # run specific test filter\n#   ./bin/test-native-docker.sh --rebuild                 # force rebuild the image\n#\nset -euo pipefail\n\nSCRIPT_DIR=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nROOT_DIR=\"$(cd \"$SCRIPT_DIR/..\" && pwd)\"\nIMAGE_NAME=\"meshtastic-native-test\"\n\nREBUILD=false\nEXTRA_ARGS=()\n\nfor arg in \"$@\"; do\n    if [[ \"$arg\" == \"--rebuild\" ]]; then\n        REBUILD=true\n    else\n        EXTRA_ARGS+=(\"$arg\")\n    fi\ndone\n\nif $REBUILD || ! docker image inspect \"$IMAGE_NAME\" >/dev/null 2>&1; then\n    echo \"Building test image (first run may take a few minutes)...\"\n    docker build -t \"$IMAGE_NAME\" -f \"$ROOT_DIR/Dockerfile.test\" \"$ROOT_DIR\"\nfi\n\n# Disable BUILD_EPOCH to avoid full rebuilds between test runs (matches CI)\nsed_cmd='s/-DBUILD_EPOCH=$UNIX_TIME/#-DBUILD_EPOCH=$UNIX_TIME/'\n\n# Default: run all tests. Pass extra args (e.g. -f test_transmit_history) through.\nif [[ ${#EXTRA_ARGS[@]} -eq 0 ]]; then\n    CMD=(\"platformio\" \"test\" \"-e\" \"coverage\" \"-v\")\nelse\n    CMD=(\"platformio\" \"test\" \"-e\" \"coverage\" \"-v\" \"${EXTRA_ARGS[@]}\")\nfi\n\nexec docker run --rm \\\n    -v \"$ROOT_DIR:/src:ro\" \\\n    \"$IMAGE_NAME\" \\\n    bash -c \"rm -rf /tmp/fw-test && cp -a /src /tmp/fw-test && cd /tmp/fw-test && sed -i '${sed_cmd}' platformio.ini && ${CMD[*]}\"\n"
  },
  {
    "path": "bin/test-simulator.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\necho \"Starting simulator\"\n.pio/build/native/meshtasticd -s &\nsleep 20 # 5 seconds was not enough\n\necho \"Simulator started, launching python test...\"\npython3 -c 'from meshtastic.test import testSimulator; testSimulator()'\n\n"
  },
  {
    "path": "bin/uf2-convert.bat",
    "content": "@ECHO OFF\r\nSETLOCAL EnableDelayedExpansion\r\nTITLE Meshtastic uf2-convert\r\n\r\nSET \"SCRIPT_NAME=%~nx0\"\r\nSET \"DEBUG=0\"\r\nSET \"NRF=0\"\r\nSET \"UF2CONV_CMD=python3 .\\bin\\uf2conv.py\"\r\n\r\nGOTO getopts\r\n:help\r\nECHO.\r\nECHO Usage: %SCRIPT_NAME% -t [t-echo^|rak4631^|nano-g2-ultra^|wio-tracker-wm1110^|canaryone^|\r\nECHO                                 heltec-mesh-node-t114^|tracker-t1000-e^|rak_wismeshtap^|rak2560^|\r\nECHO                                 nrf52_promicro_diy_tcxo]\r\nECHO.\r\nECHO Options:\r\nECHO     -t target        Specify a platformio NRF target to build for. (required)\r\nECHO.\r\nECHO Example: %SCRIPT_NAME% -t rak4631\r\nGOTO eof\r\n\r\n:version\r\nECHO %SCRIPT_NAME% [Version 2.6.0]\r\nECHO Meshtastic\r\nGOTO eof\r\n\r\n:getopts\r\nIF \"%~1\"==\"\" GOTO endopts\r\nIF /I \"%~1\"==\"-?\" GOTO help\r\nIF /I \"%~1\"==\"-h\" GOTO help\r\nIF /I \"%~1\"==\"--help\" GOTO help\r\nIF /I \"%~1\"==\"-v\" GOTO version\r\nIF /I \"%~1\"==\"--version\" GOTO version\r\nIF /I \"%~1\"==\"--debug\" SET \"DEBUG=1\" & CALL :LOG_MESSAGE DEBUG \"DEBUG mode: enabled.\"\r\nIF /I \"%~1\"==\"-t\" SET \"TARGETNAME=%~2\" & SHIFT\r\nIF /I \"%~1\"==\"--target\" SET \"TARGETNAME=%~2\" & SHIFT\r\nSHIFT\r\nGOTO getopts\r\n:endopts\r\n\r\nCALL :LOG_MESSAGE DEBUG \"Checking TARGETNAME parameter...\"\r\nIF \"__!TARGETNAME!__\"==\"____\" (\r\n    CALL :LOG_MESSAGE DEBUG \"Missing -t target input.\"\r\n    GOTO help\r\n)\r\n\r\nIF %DEBUG% EQU 1 SET \"UF2CONV_CMD=REM python3 .\\bin\\uf2conv.py\"\r\n\r\nSET \"NRFTARGETS=t-echo rak4631 nano-g2-ultra wio-tracker-wm1110 canaryone heltec-mesh-node-t114 tracker-t1000-e rak_wismeshtap rak2560 nrf52_promicro_diy_tcxo\"\r\nFOR %%a IN (%NRFTARGETS%) DO (\r\n    IF /I \"%%a\"==\"!TARGETNAME!\" (\r\n        @REM We are working with any of %NRFTARGETS%.\r\n        SET \"NRF=1\"\r\n        GOTO end_loop_nrf\r\n    )\r\n)\r\n:end_loop_nrf\r\n\r\n@REM Building operations.\r\nIF !NRF! EQU 1 (\r\n    CALL :LOG_MESSAGE INFO \"Trying to build for !TARGETNAME!...\"\r\n    CALL :RUN_UF2CONV !TARGETNAME! || GOTO eof\r\n) ELSE (\r\n    CALL :LOG_MESSAGE WARN \"!TARGETNAME! is not supported...\"\r\n    GOTO eof\r\n)\r\n\r\nCALL :LOG_MESSAGE INFO \"Script complete!.\"\r\n\r\n\r\n:eof\r\nENDLOCAL\r\nEXIT /B %ERRORLEVEL%\r\n\r\n\r\n:RUN_UF2CONV\r\n@REM Subroutine used to run .\\bin\\uf2conv.py with arguments.\r\n@REM Also handles %ERRORLEVEL%.\r\n@REM CALL :RUN_UF2CONV [target]\r\n@REM.\r\n@REM Example:: CALL :RUN_UF2CONV rak4631\r\nIF %DEBUG% EQU 1 CALL :LOG_MESSAGE DEBUG \"About to run command: !UF2CONV_CMD! .\\.pio\\build\\%~1\\firmware.hex -c -o .\\.pio\\build\\%~1\\firmware.uf2 -f 0xADA52840\"\r\nCALL :RESET_ERROR\r\n!UF2CONV_CMD! .\\.pio\\build\\%~1\\firmware.hex -c -o .\\.pio\\build\\%~1\\firmware.uf2 -f 0xADA52840\r\nIF %ERRORLEVEL% NEQ 0 (\r\n    CALL :LOG_MESSAGE ERROR \"Error running command: !UF2CONV_CMD! .\\.pio\\build\\%~1\\firmware.hex -c -o .\\.pio\\build\\%~1\\firmware.uf2 -f 0xADA52840\"\r\n    EXIT /B %ERRORLEVEL%\r\n)\r\nGOTO :eof\r\n\r\n:LOG_MESSAGE\r\n@REM Subroutine used to print log messages in four different levels.\r\n@REM DEBUG messages only get printed if [-d] flag is passed to script.\r\n@REM CALL :LOG_MESSAGE [ERROR|INFO|WARN|DEBUG] \"Message\"\r\n@REM.\r\n@REM Example:: CALL :LOG_MESSAGE INFO \"Message.\"\r\nSET /A LOGCOUNTER=LOGCOUNTER+1\r\nIF \"%1\" == \"ERROR\" CALL :GET_TIMESTAMP & ECHO \u001b[91m%1 \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[91m%~2\u001b[0m\r\nIF \"%1\" == \"INFO\" CALL :GET_TIMESTAMP & ECHO \u001b[32m%1  \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[32m%~2\u001b[0m\r\nIF \"%1\" == \"WARN\" CALL :GET_TIMESTAMP & ECHO \u001b[33m%1  \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[33m%~2\u001b[0m\r\nIF \"%1\" == \"DEBUG\" IF %DEBUG% EQU 1 CALL :GET_TIMESTAMP & ECHO \u001b[34m%1 \u001b[0m\u001b[37m^| !TIMESTAMP! !LOGCOUNTER! \u001b[0m\u001b[34m%~2\u001b[0m\r\nGOTO :eof\r\n\r\n:GET_TIMESTAMP\r\n@REM Subroutine used to set !TIMESTAMP! to HH:MM:ss.\r\n@REM CALL :GET_TIMESTAMP\r\n@REM.\r\n@REM Updates: !TIMESTAMP!\r\nFOR /F \"tokens=1,2,3 delims=:,.\" %%a IN (\"%TIME%\") DO (\r\n    SET \"HH=%%a\"\r\n    SET \"MM=%%b\"\r\n    SET \"ss=%%c\"\r\n)\r\nSET \"TIMESTAMP=!HH!:!MM!:!ss!\"\r\nGOTO :eof\r\n\r\n:RESET_ERROR\r\n@REM Subroutine to reset %ERRORLEVEL% to 0.\r\n@REM CALL :RESET_ERROR\r\n@REM.\r\n@REM Updates: %ERRORLEVEL%\r\nEXIT /B 0\r\nGOTO :eof\r\n"
  },
  {
    "path": "bin/uf2conv.py",
    "content": "#!/usr/bin/env python3\nimport argparse\nimport os\nimport os.path\nimport re\nimport struct\nimport subprocess\nimport sys\n\nUF2_MAGIC_START0 = 0x0A324655  # \"UF2\\n\"\nUF2_MAGIC_START1 = 0x9E5D5157  # Randomly selected\nUF2_MAGIC_END = 0x0AB16F30  # Ditto\n\nfamilies = {\n    \"SAMD21\": 0x68ED2B88,\n    \"SAML21\": 0x1851780A,\n    \"SAMD51\": 0x55114460,\n    \"NRF52\": 0x1B57745F,\n    \"STM32F0\": 0x647824B6,\n    \"STM32F1\": 0x5EE21072,\n    \"STM32F2\": 0x5D1A0A2E,\n    \"STM32F3\": 0x6B846188,\n    \"STM32F4\": 0x57755A57,\n    \"STM32F7\": 0x53B80F00,\n    \"STM32G0\": 0x300F5633,\n    \"STM32G4\": 0x4C71240A,\n    \"STM32H7\": 0x6DB66082,\n    \"STM32L0\": 0x202E3A91,\n    \"STM32L1\": 0x1E1F432D,\n    \"STM32L4\": 0x00FF6919,\n    \"STM32L5\": 0x04240BDF,\n    \"STM32WB\": 0x70D16653,\n    \"STM32WL\": 0x21460FF0,\n    \"ATMEGA32\": 0x16573617,\n    \"MIMXRT10XX\": 0x4FB2D5BD,\n}\n\nINFO_FILE = \"/INFO_UF2.TXT\"\n\nappstartaddr = 0x2000\nfamilyid = 0x0\n\n\ndef is_uf2(buf):\n    w = struct.unpack(\"<II\", buf[0:8])\n    return w[0] == UF2_MAGIC_START0 and w[1] == UF2_MAGIC_START1\n\n\ndef is_hex(buf):\n    try:\n        w = buf[0:30].decode(\"utf-8\")\n    except UnicodeDecodeError:\n        return False\n    if w[0] == \":\" and re.match(b\"^[:0-9a-fA-F\\r\\n]+$\", buf):\n        return True\n    return False\n\n\ndef convert_from_uf2(buf):\n    global appstartaddr\n    numblocks = len(buf) // 512\n    curraddr = None\n    outp = b\"\"\n    for blockno in range(numblocks):\n        ptr = blockno * 512\n        block = buf[ptr : ptr + 512]\n        hd = struct.unpack(b\"<IIIIIIII\", block[0:32])\n        if hd[0] != UF2_MAGIC_START0 or hd[1] != UF2_MAGIC_START1:\n            print(\"Skipping block at \" + ptr + \"; bad magic\")\n            continue\n        if hd[2] & 1:\n            # NO-flash flag set; skip block\n            continue\n        datalen = hd[4]\n        if datalen > 476:\n            assert False, \"Invalid UF2 data size at \" + ptr\n        newaddr = hd[3]\n        if curraddr == None:\n            appstartaddr = newaddr\n            curraddr = newaddr\n        padding = newaddr - curraddr\n        if padding < 0:\n            assert False, \"Block out of order at \" + ptr\n        if padding > 10 * 1024 * 1024:\n            assert False, \"More than 10M of padding needed at \" + ptr\n        if padding % 4 != 0:\n            assert False, \"Non-word padding size at \" + ptr\n        while padding > 0:\n            padding -= 4\n            outp += b\"\\x00\\x00\\x00\\x00\"\n        outp += block[32 : 32 + datalen]\n        curraddr = newaddr + datalen\n    return outp\n\n\ndef convert_to_carray(file_content):\n    outp = \"const unsigned char bindata[] __attribute__((aligned(16))) = {\"\n    for i in range(len(file_content)):\n        if i % 16 == 0:\n            outp += \"\\n\"\n        outp += \"0x%02x, \" % ord(file_content[i])\n    outp += \"\\n};\\n\"\n    return outp\n\n\ndef convert_to_uf2(file_content):\n    global familyid\n    datapadding = b\"\"\n    while len(datapadding) < 512 - 256 - 32 - 4:\n        datapadding += b\"\\x00\\x00\\x00\\x00\"\n    numblocks = (len(file_content) + 255) // 256\n    outp = b\"\"\n    for blockno in range(numblocks):\n        ptr = 256 * blockno\n        chunk = file_content[ptr : ptr + 256]\n        flags = 0x0\n        if familyid:\n            flags |= 0x2000\n        hd = struct.pack(\n            b\"<IIIIIIII\",\n            UF2_MAGIC_START0,\n            UF2_MAGIC_START1,\n            flags,\n            ptr + appstartaddr,\n            256,\n            blockno,\n            numblocks,\n            familyid,\n        )\n        while len(chunk) < 256:\n            chunk += b\"\\x00\"\n        block = hd + chunk + datapadding + struct.pack(b\"<I\", UF2_MAGIC_END)\n        assert len(block) == 512\n        outp += block\n    return outp\n\n\nclass Block:\n    def __init__(self, addr):\n        self.addr = addr\n        self.bytes = bytearray(256)\n\n    def encode(self, blockno, numblocks):\n        global familyid\n        flags = 0x0\n        if familyid:\n            flags |= 0x2000\n        hd = struct.pack(\n            \"<IIIIIIII\",\n            UF2_MAGIC_START0,\n            UF2_MAGIC_START1,\n            flags,\n            self.addr,\n            256,\n            blockno,\n            numblocks,\n            familyid,\n        )\n        hd += self.bytes[0:256]\n        while len(hd) < 512 - 4:\n            hd += b\"\\x00\"\n        hd += struct.pack(\"<I\", UF2_MAGIC_END)\n        return hd\n\n\ndef convert_from_hex_to_uf2(buf):\n    global appstartaddr\n    appstartaddr = None\n    upper = 0\n    currblock = None\n    blocks = []\n    for line in buf.split(\"\\n\"):\n        if line[0] != \":\":\n            continue\n        i = 1\n        rec = []\n        while i < len(line) - 1:\n            rec.append(int(line[i : i + 2], 16))\n            i += 2\n        tp = rec[3]\n        if tp == 4:\n            upper = ((rec[4] << 8) | rec[5]) << 16\n        elif tp == 2:\n            upper = ((rec[4] << 8) | rec[5]) << 4\n            assert (upper & 0xFFFF) == 0\n        elif tp == 1:\n            break\n        elif tp == 0:\n            addr = upper | (rec[1] << 8) | rec[2]\n            if appstartaddr == None:\n                appstartaddr = addr\n            i = 4\n            while i < len(rec) - 1:\n                if not currblock or currblock.addr & ~0xFF != addr & ~0xFF:\n                    currblock = Block(addr & ~0xFF)\n                    blocks.append(currblock)\n                currblock.bytes[addr & 0xFF] = rec[i]\n                addr += 1\n                i += 1\n    numblocks = len(blocks)\n    resfile = b\"\"\n    for i in range(0, numblocks):\n        resfile += blocks[i].encode(i, numblocks)\n    return resfile\n\n\ndef to_str(b):\n    return b.decode(\"utf-8\")\n\n\ndef get_drives():\n    drives = []\n    if sys.platform == \"win32\":\n        r = subprocess.check_output(\n            [\n                \"wmic\",\n                \"PATH\",\n                \"Win32_LogicalDisk\",\n                \"get\",\n                \"DeviceID,\",\n                \"VolumeName,\",\n                \"FileSystem,\",\n                \"DriveType\",\n            ]\n        )\n        for line in to_str(r).split(\"\\n\"):\n            words = re.split(\"\\\\s+\", line)\n            if len(words) >= 3 and words[1] == \"2\" and words[2] == \"FAT\":\n                drives.append(words[0])\n    else:\n        rootpath = \"/media\"\n        if sys.platform == \"darwin\":\n            rootpath = \"/Volumes\"\n        elif sys.platform == \"linux\":\n            tmp = rootpath + \"/\" + os.environ[\"USER\"]\n            if os.path.isdir(tmp):\n                rootpath = tmp\n        for d in os.listdir(rootpath):\n            drives.append(os.path.join(rootpath, d))\n\n    def has_info(d):\n        try:\n            return os.path.isfile(d + INFO_FILE)\n        except:\n            return False\n\n    return list(filter(has_info, drives))\n\n\ndef board_id(path):\n    with open(path + INFO_FILE, mode=\"r\") as file:\n        file_content = file.read()\n    return re.search(\"Board-ID: ([^\\r\\n]*)\", file_content).group(1)\n\n\ndef list_drives():\n    for d in get_drives():\n        print(d, board_id(d))\n\n\ndef write_file(name, buf):\n    with open(name, \"wb\") as f:\n        f.write(buf)\n    print(\"Wrote %d bytes to %s\" % (len(buf), name))\n\n\ndef main():\n    global appstartaddr, familyid\n\n    def error(msg):\n        print(msg)\n        sys.exit(1)\n\n    parser = argparse.ArgumentParser(description=\"Convert to UF2 or flash directly.\")\n    parser.add_argument(\n        \"input\",\n        metavar=\"INPUT\",\n        type=str,\n        nargs=\"?\",\n        help=\"input file (HEX, BIN or UF2)\",\n    )\n    parser.add_argument(\n        \"-b\",\n        \"--base\",\n        dest=\"base\",\n        type=str,\n        default=\"0x2000\",\n        help=\"set base address of application for BIN format (default: 0x2000)\",\n    )\n    parser.add_argument(\n        \"-o\",\n        \"--output\",\n        metavar=\"FILE\",\n        dest=\"output\",\n        type=str,\n        help='write output to named file; defaults to \"flash.uf2\" or \"flash.bin\" where sensible',\n    )\n    parser.add_argument(\n        \"-d\", \"--device\", dest=\"device_path\", help=\"select a device path to flash\"\n    )\n    parser.add_argument(\n        \"-l\", \"--list\", action=\"store_true\", help=\"list connected devices\"\n    )\n    parser.add_argument(\n        \"-c\", \"--convert\", action=\"store_true\", help=\"do not flash, just convert\"\n    )\n    parser.add_argument(\n        \"-D\", \"--deploy\", action=\"store_true\", help=\"just flash, do not convert\"\n    )\n    parser.add_argument(\n        \"-f\",\n        \"--family\",\n        dest=\"family\",\n        type=str,\n        default=\"0x0\",\n        help=\"specify familyID - number or name (default: 0x0)\",\n    )\n    parser.add_argument(\n        \"-C\",\n        \"--carray\",\n        action=\"store_true\",\n        help=\"convert binary file to a C array, not UF2\",\n    )\n    args = parser.parse_args()\n    appstartaddr = int(args.base, 0)\n\n    if args.family.upper() in families:\n        familyid = families[args.family.upper()]\n    else:\n        try:\n            familyid = int(args.family, 0)\n        except ValueError:\n            error(\n                \"Family ID needs to be a number or one of: \"\n                + \", \".join(families.keys())\n            )\n\n    if args.list:\n        list_drives()\n    else:\n        if not args.input:\n            error(\"Need input file\")\n        with open(args.input, mode=\"rb\") as f:\n            inpbuf = f.read()\n        from_uf2 = is_uf2(inpbuf)\n        ext = \"uf2\"\n        if args.deploy:\n            outbuf = inpbuf\n        elif from_uf2:\n            outbuf = convert_from_uf2(inpbuf)\n            ext = \"bin\"\n        elif is_hex(inpbuf):\n            outbuf = convert_from_hex_to_uf2(inpbuf.decode(\"utf-8\"))\n        elif args.carray:\n            outbuf = convert_to_carray(inpbuf)\n            ext = \"h\"\n        else:\n            outbuf = convert_to_uf2(inpbuf)\n        print(\n            \"Converting to %s, output size: %d, start address: 0x%x\"\n            % (ext, len(outbuf), appstartaddr)\n        )\n        if args.convert or ext != \"uf2\":\n            drives = []\n            if args.output == None:\n                args.output = \"flash.\" + ext\n        else:\n            drives = get_drives()\n\n        if args.output:\n            write_file(args.output, outbuf)\n        else:\n            if len(drives) == 0:\n                error(\"No drive to deploy.\")\n        for d in drives:\n            print(\"Flashing %s (%s)\" % (d, board_id(d)))\n            write_file(d + \"/NEW.UF2\", outbuf)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bin/view-map.sh",
    "content": "#!/usr/bin/env bash\n\necho using amap tool to display memory map\namap .pio/build/output.map\n"
  },
  {
    "path": "bin/web.version",
    "content": "2.6.7"
  },
  {
    "path": "boards/CDEBYTE_EoRa-Hub.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default.csv\",\n      \"memory_type\": \"qio_qspi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"esp32s3\"\n  },\n  \"connectivity\": [\"wifi\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"CDEBYTE_EoRa-Hub\",\n  \"upload\": {\n    \"flash_size\": \"4MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 4194304,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.cdebyte.com/products/EoRa-HUB-900TB\",\n  \"vendor\": \"CDEBYTE\"\n}\n"
  },
  {
    "path": "boards/CDEBYTE_EoRa-S3.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-D CDEBYTE_EORA_S3\",\n      \"-D ARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-D ARDUINO_USB_MODE=0\",\n      \"-D ARDUINO_RUNNING_CORE=1\",\n      \"-D ARDUINO_EVENT_RUNNING_CORE=1\",\n      \"-D BOARD_HAS_PSRAM\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"dio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"CDEBYTE_EoRa-S3\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"CDEBYTE EoRa-S3\",\n  \"upload\": {\n    \"flash_size\": \"4MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 4194304,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.cdebyte.com/Module-Testkits-EoRaPI\",\n  \"vendor\": \"CDEBYTE\"\n}\n"
  },
  {
    "path": "boards/ESP32-S3-WROOM-1-N4.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-D ARDUINO_USB_CDC_ON_BOOT=0\",\n      \"-D ARDUINO_USB_MSC_ON_BOOT=0\",\n      \"-D ARDUINO_USB_DFU_ON_BOOT=0\",\n      \"-D ARDUINO_USB_MODE=0\",\n      \"-D ARDUINO_RUNNING_CORE=1\",\n      \"-D ARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"ESP32-S3-WROOM-1-N4\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"ESP32-S3-WROOM-1-N4 (4 MB Flash, No PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"4MB\",\n    \"maximum_ram_size\": 524288,\n    \"maximum_size\": 4194304,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf\",\n  \"vendor\": \"Espressif\"\n}\n"
  },
  {
    "path": "boards/ThinkNode-M1.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_TTGO_EINK -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"]\n    ],\n    \"usb_product\": \"elecrow_eink\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"ELECROW-ThinkNode-M1\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"elecrow eink\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.elecrow.com/thinknode-m1-meshtastic-lora-signal-transceiver-powered-by-nrf52840-with-154-screen-support-gps.html\",\n  \"vendor\": \"ELECROW\"\n}\n"
  },
  {
    "path": "boards/ThinkNode-M3.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"]\n    ],\n    \"usb_product\": \"elecrow_eink\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"ELECROW-ThinkNode-M3\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"elecrow nrf\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"\",\n  \"vendor\": \"ELECROW\"\n}\n"
  },
  {
    "path": "boards/ThinkNode-M4.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_ELECROW_M4 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"]\n    ],\n    \"usb_product\": \"elecrow_thinknode_m4\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"ELECROW-ThinkNode-M4\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"ELECROW ThinkNode m4\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.elecrow.com/thinknode-m4-power-bank-lora-device-with-meshtastic-lora-tracker-function-powered-by-nrf52840.html\",\n  \"vendor\": \"ELECROW\"\n}\n"
  },
  {
    "path": "boards/ThinkNode-M6.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_ELECROW_M6 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"]\n    ],\n    \"usb_product\": \"elecrow_thinknode_m6\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"ELECROW-ThinkNode-M6\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"ELECROW ThinkNode M6\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.elecrow.com/thinknode-m6-outdoor-solar-power-for-lora-powered-by-nrf52840-supports-gps.html\",\n  \"vendor\": \"ELECROW\"\n}\n"
  },
  {
    "path": "boards/bpi_picow_esp32_s3.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\",\n      \"-DBOARD_HAS_PSRAM\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"dio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"bpi_picow_esp32_s3\"\n  },\n  \"connectivity\": [\"wifi\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"BPI-PicoW-S3 (8 MB FLASH, 2 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://wiki.banana-pi.org/BPI-PicoW-S3\",\n  \"vendor\": \"BPI\"\n}\n"
  },
  {
    "path": "boards/canaryone.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_CANARY -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x009F\"]\n    ],\n    \"usb_product\": \"CanaryOne\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"canaryone\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Canary (Adafruit BSP)\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://canaryradio.io/\",\n  \"vendor\": \"Canary Radio Company\"\n}\n"
  },
  {
    "path": "boards/crowpanel.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\",\n      \"partitions\": \"default_16MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=0\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=0\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"ESP32-S3-WROOM-1-N16R8\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"ESP32-S3-WROOM-1-N16R8 (16 MB Flash, 8 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 524288,\n    \"maximum_size\": 16777216,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"monitor\": {\n    \"speed\": 115200\n  },\n  \"url\": \"https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf\",\n  \"vendor\": \"Espressif\"\n}\n"
  },
  {
    "path": "boards/eink0.1.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_TTGO_EINK -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [[\"0x239A\", \"0x4405\"]],\n    \"usb_product\": \"TTGO_eink\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"eink0.1\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"TTGO eink (Adafruit BSP)\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"require_upload_port\": true,\n    \"speed\": 115200,\n    \"protocol\": \"jlink\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"stlink\"]\n  },\n  \"url\": \"FIXME\",\n  \"vendor\": \"TTGO\"\n}\n"
  },
  {
    "path": "boards/esp32-s3-pico.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_16MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DARDUINO_ESP32S3_DEV\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DBOARD_HAS_PSRAM\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"esp32s3\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Waveshare ESP32-S3-Pico (16 MB FLASH, 2 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.waveshare.com/esp32-s3-pico.htm\",\n  \"vendor\": \"Waveshare\"\n}\n"
  },
  {
    "path": "boards/esp32-s3-zero.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"partitions\": \"default.csv\",\n      \"memory_type\": \"qio_qspi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DARDUINO_ESP32S3_DEV\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DBOARD_HAS_PSRAM\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"esp32s3\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"platforms\": [\"espressif32\"],\n  \"name\": \"Espressif ESP32-S3-FH4R2 (4 MB QD, 2MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"4MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 4194304,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html\",\n  \"vendor\": \"Espressif\"\n}\n"
  },
  {
    "path": "boards/gat562_mesh_trial_tracker.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"GAT562 Mesh Trial Tracker\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"gat562_mesh_trial_tracker\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\", \"freertos\"],\n  \"name\": \"GAT562 Mesh Trial Tracker\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"http://www.gat-iot.com/\",\n  \"vendor\": \"GAT-IOT\"\n}\n"
  },
  {
    "path": "boards/hackaday-communicator.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"hackaday-communicator\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"hackaday-communicator (16 MB FLASH, 8 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 1500000\n  },\n  \"url\": \"hackaday.com\",\n  \"vendor\": \"hackaday\"\n}\n"
  },
  {
    "path": "boards/heltec_mesh_node_t114.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DHELTEC_T114 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x2886\", \"0x1667\"]\n    ],\n    \"usb_product\": \"HT-n5262\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"heltec_mesh_node_t114\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Heltec nrf (Adafruit BSP)\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://heltec.org/project/mesh-node-t114/\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_mesh_pocket.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"]\n    ],\n    \"usb_product\": \"HT-n5262\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"heltec_mesh_pocket\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Heltec nrf (Adafruit BSP)\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://heltec.org/project/meshpocket/\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_mesh_solar.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x0071\"]\n    ],\n    \"usb_product\": \"HT-n5262\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"heltec_mesh_solar\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Heltec nrf (Adafruit BSP)\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://heltec.org/project/meshsolar/\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_v4.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_16MB.csv\",\n      \"memory_type\": \"qio_qspi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"qspi\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"heltec_v4\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"heltec_wifi_lora_32 v4 (16 MB FLASH, 2 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 2097152,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://heltec.org/\",\n  \"vendor\": \"heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_vision_master_e213.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_8MB.csv\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"opi\",\n    \"hwids\": [\n      [\"0x303A\", \"0x1001\"],\n      [\"0x303A\", \"0x0002\"]\n    ],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"heltec_vision_master_e213\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Heltec Vision Master E213\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://heltec.org/project/vision-master-e213/\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_vision_master_e290.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_8MB.csv\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"opi\",\n    \"hwids\": [\n      [\"0x303A\", \"0x1001\"],\n      [\"0x303A\", \"0x0002\"]\n    ],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"heltec_vision_master_e290\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Heltec Vision Master E290\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://heltec.org/project/vision-master-e290/\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_vision_master_t190.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_8MB.csv\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"opi\",\n    \"hwids\": [\n      [\"0x303A\", \"0x1001\"],\n      [\"0x303A\", \"0x0002\"]\n    ],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"heltec_vision_master_t190\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Heltec Vision Master t190\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://heltec.org/project/vision-master-t190/\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_wireless_tracker.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_8MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DHELTEC_WIRELESS_TRACKER\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"heltec_wireless_tracker\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Heltec Wireless Tracker\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://heltec.org/project/wireless-tracker/\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/heltec_wireless_tracker_v2.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_8MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"heltec_wireless_tracker_v2\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Heltec Wireless Tracker V2\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://heltec.org\",\n  \"vendor\": \"Heltec\"\n}\n"
  },
  {
    "path": "boards/icarus.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=0\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x2886\", \"0x0059\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"icarus\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"icarus\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 8388608,\n    \"maximum_size\": 8388608,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://icarus.azlan.works\",\n  \"vendor\": \"Muhammad Shah\"\n}\n"
  },
  {
    "path": "boards/me25ls01-4y10td.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DME25LS01_4Y10TD -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"ME25LS01-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"MINEWSEMI_ME25LS01\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Minesemi ME25LS01\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://en.minewsemi.com/lora-module/lr1110-nrf52840-me25LS01l\",\n  \"vendor\": \"Minesemi\"\n}\n"
  },
  {
    "path": "boards/mesh-tab.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default_16MB.csv\",\n      \"memory_type\": \"qio_qspi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x80D6\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"mesh-tab\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"ESP32-S3 WROOM-1 N16R2 (16 MB FLASH, 2 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 460800\n  },\n  \"url\": \"https://github.com/valzzu/Mesh-Tab\",\n  \"vendor\": \"Espressif\"\n}\n"
  },
  {
    "path": "boards/meshlink.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DMESHLINK -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x00B3\"],\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"MeshLink\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"meshlink\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"MeshLink\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"nrfutil\", \"jlink\", \"nrfjprog\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.loraitalia.it\",\n  \"vendor\": \"LoraItalia\"\n}\n"
  },
  {
    "path": "boards/meshtiny.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"MeshTiny\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"meshtiny\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\", \"freertos\"],\n  \"name\": \"MeshTiny\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://github.com/meshtastic/firmware\",\n  \"vendor\": \"MTools Tec\"\n}\n"
  },
  {
    "path": "boards/mini-epaper-s3.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"default.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_ESP32S3_DEV\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"esp32s3\"\n  },\n  \"connectivity\": [\"wifi\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"LilyGo Mini-Epaper-S3 (4 MB Flash, 2MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"4MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 4194304,\n    \"require_upload_port\": true,\n    \"speed\": 460800\n  },\n  \"url\": \"https://www.lilygo.cc\",\n  \"vendor\": \"LilyGo\"\n}\n"
  },
  {
    "path": "boards/minimesh_lite.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DMINIMESH_LITE -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"]\n    ],\n    \"usb_product\": \"Minimesh Lite\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"dls_Minimesh_Lite\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Minimesh Lite\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"nrfutil\", \"jlink\", \"nrfjprog\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://deeplabstudio.com\",\n  \"vendor\": \"Deeplab Studio\"\n}\n"
  },
  {
    "path": "boards/ms24sf1.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DMS24SF1 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"MS24SF1-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"MINEWSEMI_MS24SF1_SX1262\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"MINEWSEMI_MS24SF1_SX1262\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://en.minewsemi.com/lora-module/nrf52840-sx1262-ms24sf1\",\n  \"vendor\": \"Minesemi\"\n}\n"
  },
  {
    "path": "boards/muzi-base.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_MUZI_BASE -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [[\"0x239A\", \"0xcafe\"]],\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"muzi-base\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Muzi Base\",\n  \"url\": \"https://muzi.works/\",\n  \"vendor\": \"MuziWorks\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"blackmagic\",\n      \"cmsis-dap\",\n      \"mbed\",\n      \"stlink\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  }\n}\n"
  },
  {
    "path": "boards/my-esp32s3-diy-oled.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=0\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"my-esp32s3-diy-oled\"\n  },\n  \"connectivity\": [\"wifi\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Clone ESP32-S3-DevKitC-1 v1.1 (16 MB FLASH, 8 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html\",\n  \"vendor\": \"Espressif\"\n}\n"
  },
  {
    "path": "boards/my_esp32s3_diy_eink.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=0\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"my_esp32s3_diy_eink\"\n  },\n  \"connectivity\": [\"wifi\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Clone ESP32-S3-DevKitC-1 v1.1 (16 MB FLASH, 8 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html\",\n  \"vendor\": \"Espressif\"\n}\n"
  },
  {
    "path": "boards/nano-g2-ultra.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"BQ nRF52840\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"nano-g2-ultra\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"BQ nRF52840\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra\",\n  \"vendor\": \"BQ Consulting\"\n}\n"
  },
  {
    "path": "boards/nordic_pca10059.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DNORDIC_PCA10059 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"PCA10059\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"nRF52840 Dongle\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"nRF52840 Dongle\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle\",\n  \"vendor\": \"Nordic Semiconductor\"\n}\n"
  },
  {
    "path": "boards/nrf52840_dk.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_PCA10056 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [[\"0x239A\", \"0x4404\"]],\n    \"usb_product\": \"nrf52840dk\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"pca10056\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"A modified NRF52840-DK devboard (Adafruit BSP)\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"require_upload_port\": true,\n    \"speed\": 115200,\n    \"protocol\": \"jlink\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"stlink\"]\n  },\n  \"url\": \"https://meshtastic.org/\",\n  \"vendor\": \"Nordic Semi\"\n}\n"
  },
  {
    "path": "boards/promicro-nrf52840.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x00B3\"],\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"ProMicro compatible nRF52840\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"promicro_diy\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"ProMicro compatible nRF52840\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"nrfutil\", \"jlink\", \"nrfjprog\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.nologo.tech/product/otherboard/NRF52840.html\",\n  \"vendor\": \"Nologo\"\n}\n"
  },
  {
    "path": "boards/r1-neo.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"Muzi R1 Neo\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"r1-neo\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\", \"freertos\"],\n  \"name\": \"WisCore RAK4631 Board\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://muzi.works/\",\n  \"vendor\": \"Muzi Works\"\n}\n"
  },
  {
    "path": "boards/seeed-sensecap-indicator.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"partitions\": \"partition-table-8MB.csv\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=0\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"f_boot\": \"120000000L\",\n    \"boot\": \"qio\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"opi\",\n    \"hwids\": [[\"0x1A86\", \"0x7523\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"esp32s3\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Seeed Studio SenseCAP Indicator\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"require_upload_port\": false,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": false,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.seeedstudio.com/Indicator-for-Meshtastic.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/seeed-xiao-s3.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=0\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"opi\",\n    \"hwids\": [[\"0x2886\", \"0x0059\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"seeed-xiao-s3\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"seeed-xiao-s3\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 8388608,\n    \"maximum_size\": 8388608,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/seeed_solar_node.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [[\"0x2886\", \"0x0059\"]],\n    \"usb_product\": \"XIAO-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"seeed_solar_node\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"seeed_solar_node\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/Seeed-XIAO-BLE-Sense-nRF52840-p-5253.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/seeed_wio_tracker_L1.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x2886\", \"0x1668\"],\n      [\"0x2886\", \"0x1667\"]\n    ],\n    \"usb_product\": \"TRACKER L1\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"seeed_wio_tracker_L1\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"seeed_wio_tracker_L1\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/Wio-Tracker-L1-p-6477.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/seeed_xiao_nrf52840_kit.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [[\"0x2886\", \"0x0166\"]],\n    \"usb_product\": \"XIAO-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"seeed_xiao_nrf52840_kit\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"seeed_xiao_nrf52840_kit\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/XIAO-nRF52840-Wio-SX1262-Kit-for-Meshtastic-p-6400.html\",\n  \"vendor\": \"seeed\"\n}\n"
  },
  {
    "path": "boards/station-g2.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=0\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"station-g2\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"BQ Station G2\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://wiki.uniteng.com/en/meshtastic/station-g2\",\n  \"vendor\": \"BQ Consulting\"\n}\n"
  },
  {
    "path": "boards/t-beam-1w.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DLILYGO_TBEAM_1W\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"opi\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"t-beam-1w\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"LilyGo TBeam-1W\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"http://www.lilygo.cn/\",\n  \"vendor\": \"LilyGo\"\n}\n"
  },
  {
    "path": "boards/t-deck-pro.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_qspi\",\n      \"partitions\": \"default_16MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"esp32s3\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"LilyGo T-Deck Pro S3 (16M Flash 8M QSPI PSRAM )\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"monitor\": {\n    \"speed\": 115200\n  },\n  \"url\": \"https://lilygo.cc/products/t-deck-pro\",\n  \"vendor\": \"LilyGo\"\n}\n"
  },
  {
    "path": "boards/t-deck.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"t-deck\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"Espressif Systems LilyGO T-Deck (16 MB FLASH, 8 MB PSRAM)\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.lilygo.cc/en-pl/products/t-deck\",\n  \"vendor\": \"LilyGO\"\n}\n"
  },
  {
    "path": "boards/t-echo.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_TTGO_EINK -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x4405\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"]\n    ],\n    \"usb_product\": \"TTGO_eink\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"t-echo\",\n    \"variants_dir\": \"variants\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"onboard_tools\": [\"jlink\"],\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"TTGO eink (Adafruit BSP)\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://lilygo.cc/products/t-echo-lilygo\",\n  \"vendor\": \"LILYGO\"\n}\n"
  },
  {
    "path": "boards/t-watch-s3.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DT_WATCH_S3\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"psram_type\": \"opi\",\n    \"hwids\": [\n      [\"0x303A\", \"0x1001\"],\n      [\"0x303A\", \"0x0002\"]\n    ],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"t-watch-s3\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"LilyGo T-Watch 2020 V3\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"require_upload_port\": true,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.lilygo.cc/en-pl/products/t-watch-s3\",\n  \"vendor\": \"LilyGo\"\n}\n"
  },
  {
    "path": "boards/tbeam-s3-core.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DLILYGO_TBEAM_S3_CORE\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"dio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"tbeam-s3-core\"\n  },\n  \"connectivity\": [\"wifi\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"LilyGo TBeam-S3-Core\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8388608,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"http://www.lilygo.cn/\",\n  \"vendor\": \"LilyGo\"\n}\n"
  },
  {
    "path": "boards/tlora-t3s3-v1.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DLILYGO_T3S3_V1\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\",\n      \"-DBOARD_HAS_PSRAM\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"dio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"tlora-t3s3-v1\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"LilyGo TLora-T3S3-V1\",\n  \"upload\": {\n    \"flash_size\": \"4MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 4194304,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"http://www.lilygo.cn/\",\n  \"vendor\": \"LilyGo\"\n}\n"
  },
  {
    "path": "boards/tracker-t1000-e.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_WIO_WM1110 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"],\n      [\"0x2886\", \"0x0057\"]\n    ],\n    \"usb_product\": \"T1000-E-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"Seeed_T1000-E\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Seeed T1000-E\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/SenseCAP-Card-Tracker-T1000-E-for-Meshtastic-p-5913.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/unphone.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\",\n      \"partitions\": \"partition-table-8MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DBOARD_HAS_PSRAM\",\n      \"-DUNPHONE_SPIN=9\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=0\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"qio\",\n    \"hwids\": [\n      [\"0x16D0\", \"0x1178\"],\n      [\"0x303a\", \"0x1001\"]\n    ],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"unphone\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"lora\"],\n  \"debug\": {\n    \"default_tool\": \"esp-builtin\",\n    \"onboard_tools\": [\"esp-builtin\"],\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"unPhone\",\n  \"upload\": {\n    \"flash_size\": \"8MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 8323072,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://unphone.net/\",\n  \"vendor\": \"University of Sheffield\"\n}\n"
  },
  {
    "path": "boards/wio-sdk-wm1110.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_WIO_WM1110 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"Seeed_WIO_WM1110\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\", \"freertos\"],\n  \"name\": \"Seeed WIO WM1110\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/Wio-WM1110-Dev-Kit-p-5677.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/wio-t1000-s.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_WIO_WM1110 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"WIO-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"Seeed_WIO_WM1110\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Seeed WIO WM1110\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/LoRaWAN-Tracker-c-1938.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/wio-tracker-wm1110.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_WIO_WM1110 -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"WIO-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"Seeed_WIO_WM1110\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Seeed WIO WM1110\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/Wio-Tracker-1110-Dev-Board-p-5799.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "boards/wiphone.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32_out.ld\",\n      \"partitions\": \"default_16MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DARDUINO_WIPHONE14\",\n      \"-DBOARD_HAS_PSRAM\",\n      \"-mfix-esp32-psram-cache-issue\",\n      \"-mfix-esp32-psram-cache-strategy=memw\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"40000000L\",\n    \"flash_mode\": \"dio\",\n    \"mcu\": \"esp32\",\n    \"variant\": \"wiphone\",\n    \"board\": \"WiPhone\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\"],\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"WIPhone Integrated 1.4\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 532480,\n    \"maximum_size\": 6553600,\n    \"maximum_data_size\": 4521984,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.wiphone.io/\",\n  \"vendor\": \"HackEDA\"\n}\n"
  },
  {
    "path": "boards/wiscore_rak11200.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32_out.ld\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\"-DBOARD_HAS_PSRAM\", \"-DARDUINO_ESP32_DEV\"],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"40000000L\",\n    \"flash_mode\": \"dio\",\n    \"mcu\": \"esp32\",\n    \"variant\": \"WisCore_RAK11200_Board\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\", \"ethernet\", \"can\"],\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"WisCore RAK11200 Board\",\n  \"upload\": {\n    \"flash_size\": \"4MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 4194304,\n    \"protocols\": [\"esptool\", \"espota\", \"ftdi\"],\n    \"require_upload_port\": true,\n    \"speed\": 460800\n  },\n  \"url\": \"https://www.rakwireless.com\",\n  \"vendor\": \"RAKwireless\"\n}\n"
  },
  {
    "path": "boards/wiscore_rak3172.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"variant_h\": \"variant_RAK3172_MODULE.h\"\n    },\n    \"core\": \"stm32\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DSTM32WLxx -DSTM32WLE5xx -DARDUINO_RAK3172_MODULE\",\n    \"f_cpu\": \"48000000L\",\n    \"mcu\": \"stm32wle5ccu\",\n    \"variant\": \"STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U\",\n    \"product_line\": \"STM32WLE5xx\"\n  },\n  \"debug\": {\n    \"default_tools\": [\"stlink\"],\n    \"jlink_device\": \"STM32WLE5CC\",\n    \"openocd_target\": \"stm32wlx\",\n    \"svd_path\": \"STM32WLE5_CM4.svd\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"BB-STM32WL\",\n  \"upload\": {\n    \"maximum_ram_size\": 65536,\n    \"maximum_size\": 262144,\n    \"protocol\": \"cmsis-dap\",\n    \"protocols\": [\"cmsis-dap\", \"stlink\"]\n  },\n  \"url\": \"https://www.st.com/en/microcontrollers-microprocessors/stm32wl-series.html\",\n  \"vendor\": \"ST\"\n}\n"
  },
  {
    "path": "boards/wiscore_rak3312.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"esp32s3_out.ld\",\n      \"memory_type\": \"qio_opi\",\n      \"partitions\": \"default_16MB.csv\"\n    },\n    \"core\": \"esp32\",\n    \"extra_flags\": [\n      \"-DRAK3312\",\n      \"-DARDUINO_USB_CDC_ON_BOOT=1\",\n      \"-DARDUINO_USB_MODE=1\",\n      \"-DARDUINO_RUNNING_CORE=1\",\n      \"-DARDUINO_EVENT_RUNNING_CORE=1\",\n      \"-DBOARD_HAS_PSRAM\"\n    ],\n    \"f_cpu\": \"240000000L\",\n    \"f_flash\": \"80000000L\",\n    \"flash_mode\": \"dio\",\n    \"hwids\": [[\"0x303A\", \"0x1001\"]],\n    \"mcu\": \"esp32s3\",\n    \"variant\": \"rak3312\"\n  },\n  \"connectivity\": [\"wifi\", \"bluetooth\"],\n  \"debug\": {\n    \"openocd_target\": \"esp32s3.cfg\"\n  },\n  \"frameworks\": [\"arduino\", \"espidf\"],\n  \"name\": \"WisCore RAK3312 Board\",\n  \"upload\": {\n    \"flash_size\": \"16MB\",\n    \"maximum_ram_size\": 327680,\n    \"maximum_size\": 16777216,\n    \"use_1200bps_touch\": true,\n    \"wait_for_upload_port\": true,\n    \"require_upload_port\": true,\n    \"speed\": 921600\n  },\n  \"url\": \"https://www.rakwireless.com/en-us\",\n  \"vendor\": \"rakwireless\"\n}\n"
  },
  {
    "path": "boards/wiscore_rak4600.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52832_s132_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DNRF52832_XXAA -DNRF52\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"Feather nRF52832 Express\",\n    \"mcu\": \"nrf52832\",\n    \"variant\": \"WisCore_RAK4600_Board\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS132\",\n      \"sd_name\": \"s132\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B7\"\n    },\n    \"zephyr\": {\n      \"variant\": \"nrf52_adafruit_feather\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52832_xxAA\",\n    \"svd_path\": \"nrf52.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\", \"zephyr\"],\n  \"name\": \"Adafruit Bluefruit nRF52832 Feather\",\n  \"upload\": {\n    \"maximum_ram_size\": 65536,\n    \"maximum_size\": 524288,\n    \"require_upload_port\": true,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"]\n  },\n  \"url\": \"https://www.adafruit.com/product/3406\",\n  \"vendor\": \"Adafruit\"\n}\n"
  },
  {
    "path": "boards/wiscore_rak4631.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v6.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x8029\"],\n      [\"0x239A\", \"0x0029\"],\n      [\"0x239A\", \"0x002A\"],\n      [\"0x239A\", \"0x802A\"]\n    ],\n    \"usb_product\": \"WisCore RAK4631 Board\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"WisCore_RAK4631_Board\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"6.1.1\",\n      \"sd_fwid\": \"0x00B6\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\", \"freertos\"],\n  \"name\": \"WisCore RAK4631 Board\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\"jlink\", \"nrfjprog\", \"nrfutil\", \"stlink\"],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.rakwireless.com\",\n  \"vendor\": \"RAKwireless\"\n}\n"
  },
  {
    "path": "boards/xiao_ble_sense.json",
    "content": "{\n  \"build\": {\n    \"arduino\": {\n      \"ldscript\": \"nrf52840_s140_v7.ld\"\n    },\n    \"core\": \"nRF5\",\n    \"cpu\": \"cortex-m4\",\n    \"extra_flags\": \"-DARDUINO_MDBT50Q_RX -DNRF52840_XXAA\",\n    \"f_cpu\": \"64000000L\",\n    \"hwids\": [\n      [\"0x239A\", \"0x810B\"],\n      [\"0x239A\", \"0x010B\"],\n      [\"0x239A\", \"0x810C\"]\n    ],\n    \"usb_product\": \"XIAO-BOOT\",\n    \"mcu\": \"nrf52840\",\n    \"variant\": \"Seeed_XIAO_nRF52840_Sense\",\n    \"bsp\": {\n      \"name\": \"adafruit\"\n    },\n    \"softdevice\": {\n      \"sd_flags\": \"-DS140\",\n      \"sd_name\": \"s140\",\n      \"sd_version\": \"7.3.0\",\n      \"sd_fwid\": \"0x0123\"\n    },\n    \"bootloader\": {\n      \"settings_addr\": \"0xFF000\"\n    }\n  },\n  \"connectivity\": [\"bluetooth\"],\n  \"debug\": {\n    \"jlink_device\": \"nRF52840_xxAA\",\n    \"svd_path\": \"nrf52840.svd\",\n    \"openocd_target\": \"nrf52840-mdk-rs\"\n  },\n  \"frameworks\": [\"arduino\"],\n  \"name\": \"Seeed Xiao BLE Sense\",\n  \"upload\": {\n    \"maximum_ram_size\": 248832,\n    \"maximum_size\": 815104,\n    \"speed\": 115200,\n    \"protocol\": \"nrfutil\",\n    \"protocols\": [\n      \"jlink\",\n      \"nrfjprog\",\n      \"nrfutil\",\n      \"stlink\",\n      \"cmsis-dap\",\n      \"blackmagic\"\n    ],\n    \"use_1200bps_touch\": true,\n    \"require_upload_port\": true,\n    \"wait_for_upload_port\": true\n  },\n  \"url\": \"https://www.seeedstudio.com/Seeed-XIAO-BLE-Sense-nRF52840-p-5253.html\",\n  \"vendor\": \"Seeed Studio\"\n}\n"
  },
  {
    "path": "branding/README.md",
    "content": "# Meshtastic Branding / Whitelabeling\n\nThis directory is consumed during the creation of **event** firmware.\n\n`bin/platformio-custom.py` determines the display resolution, and locates the corresponding `logo_<width>x<height>.png`.\n\nEx:\n\n- `logo_800x480.png`\n- `logo_480x480.png`\n- `logo_480x320.png`\n- `logo_320x480.png`\n- `logo_320x240.png`\n\nThis file is copied to `data/boot/logo.png` before filesystem image compilation.\n\nFor additional examples see the [`event/defcon33` branch](https://github.com/meshtastic/firmware/tree/event/defcon33).\n"
  },
  {
    "path": "data/static/.gitkeep",
    "content": ""
  },
  {
    "path": "debian/.gitignore",
    "content": ".debhelper\ndebhelper-build-stamp\nmeshtasticd\nfiles\nmeshtasticd.substvars\nmeshtasticd.postrm.debhelper\n"
  },
  {
    "path": "debian/changelog",
    "content": "meshtasticd (2.7.21.0) unstable; urgency=medium\n\n  * Version 2.7.21\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Wed, 11 Mar 2026 11:45:36 +0000\n\nmeshtasticd (2.7.20.0) unstable; urgency=medium\n\n  * Version 2.7.20\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Wed, 11 Feb 2026 12:19:54 +0000\n\nmeshtasticd (2.7.19.0) unstable; urgency=medium\n\n  * Version 2.7.19\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Thu, 22 Jan 2026 22:17:40 +0000\n\nmeshtasticd (2.7.18.0) unstable; urgency=medium\n\n  * Version 2.7.18\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Fri, 02 Jan 2026 12:45:36 +0000\n\nmeshtasticd (2.7.17.0) unstable; urgency=medium\n\n  * Version 2.7.17\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Fri, 28 Nov 2025 15:11:34 +0000\n\nmeshtasticd (2.7.16.0) unstable; urgency=medium\n\n  * Version 2.7.16\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Wed, 19 Nov 2025 16:12:32 +0000\n\n\nmeshtasticd (2.7.15.0) unstable; urgency=medium\n\n  * Version 2.7.15\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Thu, 13 Nov 2025 12:31:57 +0000\n\nmeshtasticd (2.7.14.0) unstable; urgency=medium\n\n  * Version 2.7.14\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Mon, 03 Nov 2025 16:11:31 +0000\n\nmeshtasticd (2.7.13.0) unstable; urgency=medium\n\n  * Version 2.7.13\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Sat, 11 Oct 2025 15:27:28 +0000\n\nmeshtasticd (2.7.12.0) unstable; urgency=medium\n\n  [ Austin Lane ]\n  * Initial packaging\n  * Version 2.5.19\n\n  [  ]\n  * GitHub Actions Automatic version bump\n\n  [ GitHub Actions ]\n  * Version 2.7.12\n\n -- GitHub Actions <github-actions[bot]@users.noreply.github.com>  Wed, 01 Oct 2025 19:51:41 +0000\n"
  },
  {
    "path": "debian/ci_changelog.sh",
    "content": "#!/usr/bin/bash\nexport DEBFULLNAME=\"GitHub Actions\"\nexport DEBEMAIL=\"github-actions[bot]@users.noreply.github.com\"\nPKG_VERSION=$(python3 bin/buildinfo.py short)\n\ndch --newversion \"$PKG_VERSION.0\" \\\n\t--distribution unstable \\\n\t\"Version $PKG_VERSION\"\n"
  },
  {
    "path": "debian/ci_pack_sdeb.sh",
    "content": "#!/usr/bin/bash\nexport DEBEMAIL=\"jbennett@incomsystems.biz\"\nexport PLATFORMIO_LIBDEPS_DIR=pio/libdeps\nexport PLATFORMIO_PACKAGES_DIR=pio/packages\nexport PLATFORMIO_CORE_DIR=pio/core\nexport PLATFORMIO_SETTING_ENABLE_TELEMETRY=0\nexport PLATFORMIO_SETTING_CHECK_PLATFORMIO_INTERVAL=3650\nexport PLATFORMIO_SETTING_CHECK_PRUNE_SYSTEM_THRESHOLD=10240\n\n# Download libraries to `pio`\nplatformio pkg install -e native-tft\nplatformio pkg install -e native-tft -t platformio/tool-scons@4.40502.0\n# Mangle PlatformIO cache to prevent internet access at build-time\n# Simply adds 1 to all expiry (epoch) timestamps, adding ~500 years to expiry date\ncp pio/core/.cache/downloads/usage.db pio/core/.cache/downloads/usage.db.bak\njq -c 'with_entries(.value |= (. | tostring + \"1\" | tonumber))' pio/core/.cache/downloads/usage.db.bak >pio/core/.cache/downloads/usage.db\n# Compress `pio` directory to prevent dh_clean from sanitizing it\ntar -cf pio.tar pio/\nrm -rf pio\n# Download the meshtastic/web release build.tar to `web.tar`\nweb_ver=$(cat bin/web.version)\ncurl -L \"https://github.com/meshtastic/web/releases/download/v$web_ver/build.tar\" -o web.tar\n\npackage=$(dpkg-parsechangelog --show-field Source)\n\nrm -rf debian/changelog\ndch --create --distribution \"$SERIES\" --package \"$package\" --newversion \"$PKG_VERSION~$SERIES\" \\\n\t\"GitHub Actions Automatic packaging for $PKG_VERSION~$SERIES\"\n\n# Build the source deb\ndebuild -S -nc -k\"$GPG_KEY_ID\"\n"
  },
  {
    "path": "debian/control",
    "content": "Source: meshtasticd\nSection: misc\nPriority: optional\nMaintainer: Austin Lane <vidplace7@gmail.com>\nBuild-Depends: debhelper-compat (= 13),\n               libc6-dev (>= 2.38) | libbsd-dev,\n               lsb-release,\n               tar,\n               gzip,\n               platformio,\n               python3-protobuf,\n               python3-grpcio,\n               git,\n               g++,\n               pkg-config,\n               libyaml-cpp-dev,\n               libgpiod-dev,\n               libbluetooth-dev,\n               libusb-1.0-0-dev,\n               libi2c-dev,\n               libuv1-dev,\n               openssl,\n               libssl-dev,\n               libulfius-dev,\n               liborcania-dev,\n               libx11-dev,\n               libinput-dev,\n               libxkbcommon-x11-dev,\n               libsqlite3-dev,\n               libsdl2-dev\nStandards-Version: 4.6.2\nHomepage: https://github.com/meshtastic/firmware\nRules-Requires-Root: no\n\nPackage: meshtasticd\nArchitecture: any\nDepends: adduser,\n         ${misc:Depends},\n         ${shlibs:Depends}\nDescription: Meshtastic daemon for communicating with Meshtastic devices\n Meshtastic is an off-grid text communication platform that uses inexpensive \n LoRa radios.\n"
  },
  {
    "path": "debian/meshtasticd.dirs",
    "content": "var/lib/meshtasticd\netc/meshtasticd\netc/meshtasticd/config.d\netc/meshtasticd/available.d\nusr/share/meshtasticd/web\netc/meshtasticd/ssl\n"
  },
  {
    "path": "debian/meshtasticd.install",
    "content": ".pio/build/native-tft/meshtasticd  usr/bin\n\nbin/config.yaml                    etc/meshtasticd\nbin/config.d/*                     etc/meshtasticd/available.d\n\nbin/meshtasticd.service            lib/systemd/system\nbin/meshtasticd-start.sh           usr/bin\n\nweb/*                              usr/share/meshtasticd/web\n"
  },
  {
    "path": "debian/meshtasticd.postinst",
    "content": "#!/bin/sh\n# postinst script for meshtasticd\n#\n# see: dh_installdeb(1)\n\nset -e\n\n# summary of how this script can be called:\n#        * <postinst> `configure' <most-recently-configured-version>\n#        * <old-postinst> `abort-upgrade' <new version>\n#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>\n#          <new-version>\n#        * <postinst> `abort-remove'\n#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'\n#          <failed-install-package> <version> `removing'\n#          <conflicting-package> <version>\n# for details, see http://www.debian.org/doc/debian-policy/ or\n# the debian-policy package\n\n\ncase \"$1\" in\n    configure|reconfigure)\n    # create spi, gpio groups (for udev rules)\n    # these groups already exist on Raspberry Pi OS\n        getent group spi >/dev/null 2>/dev/null || addgroup --system spi\n        getent group gpio >/dev/null 2>/dev/null || addgroup --system gpio\n    # create a meshtasticd group and user\n        getent passwd meshtasticd >/dev/null 2>/dev/null || adduser --system --home /var/lib/meshtasticd --no-create-home meshtasticd\n        getent group meshtasticd >/dev/null 2>/dev/null || addgroup --system meshtasticd\n        adduser meshtasticd meshtasticd >/dev/null 2>/dev/null\n        adduser meshtasticd spi >/dev/null 2>/dev/null\n        adduser meshtasticd gpio >/dev/null 2>/dev/null\n    # add meshtasticd user to appropriate groups (if they exist)\n        getent group plugdev >/dev/null 2>/dev/null && adduser meshtasticd plugdev >/dev/null 2>/dev/null\n        getent group dialout >/dev/null 2>/dev/null && adduser meshtasticd dialout >/dev/null 2>/dev/null\n        getent group i2c >/dev/null 2>/dev/null && adduser meshtasticd i2c >/dev/null 2>/dev/null\n        getent group video >/dev/null 2>/dev/null && adduser meshtasticd video >/dev/null 2>/dev/null\n        getent group audio >/dev/null 2>/dev/null && adduser meshtasticd audio >/dev/null 2>/dev/null\n        getent group input >/dev/null 2>/dev/null && adduser meshtasticd input >/dev/null 2>/dev/null\n\n\n    # migrate /root/.portduino to /var/lib/meshtasticd/.portduino\n    # should only run once, upon upgrade from < 2.6.9\n    if [ -n \"$2\" ] && dpkg --compare-versions \"$2\" lt 2.6.9; then\n        if [ -d /root/.portduino ] && [ ! -e /var/lib/meshtasticd/.portduino ]; then\n            cp -r /root/.portduino /var/lib/meshtasticd/.portduino\n            echo \"Migrated meshtasticd VFS from /root/.portduino to /var/lib/meshtasticd/.portduino\"\n            echo \"meshtasticd now runs as the 'meshtasticd' user, not 'root'.\"\n            echo \"See https://github.com/meshtastic/firmware/pull/6718 for details\"\n        fi\n    fi\n\n    if [ -d /var/lib/meshtasticd ]; then\n        chown -R meshtasticd:meshtasticd /var/lib/meshtasticd\n    fi\n\n    if [ -d /etc/meshtasticd ]; then\n        chown -R meshtasticd:meshtasticd /etc/meshtasticd\n    fi\n\n    if [ -d /usr/share/meshtasticd ]; then\n        chown -R meshtasticd:meshtasticd /usr/share/meshtasticd\n    fi\n    ;;\n\n    abort-upgrade|abort-remove|abort-deconfigure)\n    ;;\n\n    *)\n        echo \"postinst called with unknown argument \\`$1'\" >&2\n        exit 1\n    ;;\nesac\n\n# dh_installdeb will replace this with shell code automatically\n# generated by other debhelper scripts.\n\n#DEBHELPER#\n\nexit 0\n"
  },
  {
    "path": "debian/meshtasticd.postrm",
    "content": "#!/bin/sh\n# postrm script for meshtasticd\n#\n# see: dh_installdeb(1)\n\nset -e\n\n# summary of how this script can be called:\n#        * <postrm> `remove'\n#        * <postrm> `purge'\n#        * <old-postrm> `upgrade' <new-version>\n#        * <new-postrm> `failed-upgrade' <old-version>\n#        * <new-postrm> `abort-install'\n#        * <new-postrm> `abort-install' <old-version>\n#        * <new-postrm> `abort-upgrade' <old-version>\n#        * <disappearer's-postrm> `disappear' <overwriter>\n#          <overwriter-version>\n# for details, see http://www.debian.org/doc/debian-policy/ or\n# the debian-policy package\n\n\ncase \"$1\" in\n    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)\n      # Only remove /var/lib/meshtasticd on purge\n      if [ \"${1}\" = \"purge\" ] ; then\n          rm -rf /var/lib/meshtasticd\n      fi\n    ;;\n\n    *)\n        echo \"postrm called with unknown argument \\`$1'\" >&2\n        exit 1\n    ;;\nesac\n\n# dh_installdeb will replace this with shell code automatically\n# generated by other debhelper scripts.\n\n#DEBHELPER#\n\nexit 0\n"
  },
  {
    "path": "debian/meshtasticd.udev",
    "content": "# Set spidev ownership to 'spi' group\nSUBSYSTEM==\"spidev\", KERNEL==\"spidev*\", GROUP=\"spi\", MODE=\"0660\"\n# Allow access to USB CH341 devices\nSUBSYSTEM==\"usb\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"5512\", MODE=\"0666\"\n# Set gpio ownership to 'gpio' group\nSUBSYSTEM==\"*gpiomem*\", GROUP=\"gpio\", MODE=\"0660\"\nSUBSYSTEM==\"gpio\", GROUP=\"gpio\", MODE=\"0660\"\n"
  },
  {
    "path": "debian/rules",
    "content": "#!/usr/bin/make -f\n# export DH_VERBOSE = 1\n\n# Use the \"dh\" sequencer\n%:\n\tdh $@\n\n# https://docs.platformio.org/en/latest/envvars.html\nPIO_ENV:=\\\n\tPLATFORMIO_CORE_DIR=pio/core \\\n\tPLATFORMIO_LIBDEPS_DIR=pio/libdeps \\\n\tPLATFORMIO_PACKAGES_DIR=pio/packages \\\n\tPLATFORMIO_SETTING_ENABLE_TELEMETRY=0 \\\n\tPLATFORMIO_SETTING_CHECK_PLATFORMIO_INTERVAL=3650 \\\n\tPLATFORMIO_SETTING_CHECK_PRUNE_SYSTEM_THRESHOLD=10240\n\n# Raspbian armhf builds should be compatible with armv6-hardfloat\n# https://www.valvers.com/open-software/raspberry-pi/bare-metal-programming-in-c-part-1/#rpi1-compiler-flags\nifneq (,$(findstring Raspbian,$(shell lsb_release -is)))\nifeq ($(DEB_BUILD_ARCH),armhf)\nPIO_ENV+=\\\n\tPLATFORMIO_BUILD_FLAGS=\"-mfloat-abi=hard -mfpu=vfp -march=armv6zk\"\nendif\nendif\n\noverride_dh_auto_build:\n\t# Extract tarballs within source deb\n\ttar -xf pio.tar\n\tmkdir -p web && tar -xf web.tar -C web\n\tgunzip web/ -r\n\t# Build with platformio\n\t$(PIO_ENV) platformio run -e native-tft\n\t# Move the binary and default config to the correct name\n\tcp bin/config-dist.yaml bin/config.yaml\n"
  },
  {
    "path": "debian/source/format",
    "content": "3.0 (native)"
  },
  {
    "path": "debian/source/include-binaries",
    "content": "pio.tar\nweb.tar"
  },
  {
    "path": "debian/source/options",
    "content": "extend-diff-ignore = \"\\.pio\""
  },
  {
    "path": "docker-compose.yml",
    "content": "# USB-Based Meshtastic container-node!\n\n# Copy .env.example to .env and set the USB_DEVICE and CONFIG_PATH variables\n\nservices:\n  meshtastic-node:\n    build: .\n    container_name: meshtasticd\n\n    # Pass USB device through to the container\n    devices:\n      - \"${USB_DEVICE}\"\n\n    # Mount local config file and named volume for data persistence\n    volumes:\n      - \"${CONFIG_PATH}:/etc/meshtasticd/config.yaml:ro\"\n      - meshtastic_data:/var/lib/meshtasticd\n\n    # Forward the container’s port 4403 to the host\n    ports:\n      - 4403:4403\n\n    restart: unless-stopped\n\nvolumes:\n  meshtastic_data:\n"
  },
  {
    "path": "extra_scripts/README.md",
    "content": "# extra_scripts\n\nThis directory contains special [scripts](https://docs.platformio.org/en/latest/scripting/index.html) that are used to modify the platformio environment in rare cases.\n"
  },
  {
    "path": "extra_scripts/disable_adafruit_usb.py",
    "content": "#!/usr/bin/env python3\n# trunk-ignore-all(flake8/F821)\n# trunk-ignore-all(ruff/F821)\n\nImport(\"env\")\n\n# print(\"Current CLI targets\", COMMAND_LINE_TARGETS)\n# print(\"Current Build targets\", BUILD_TARGETS)\n# print(\"CPP defs\", env.get(\"CPPDEFINES\"))\n# print(env.Dump())\n\n# Adafruit.py in the platformio build tree is a bit naive and always enables their USB stack for building.  We don't want this.\n# So come in after that python script has run and disable it.  This hack avoids us having to fork that big project and send in a PR\n# which might not be accepted. -@geeksville\n\nlib_builders = env.get(\"__PIO_LIB_BUILDERS\", None)\nif lib_builders is not None:\n    print(\"Disabling Adafruit USB stack\")\n    for k in lib_builders:\n        if k.name == \"Adafruit TinyUSB Library\":\n            libenv = k.env\n            # print(f\"{k.name }: { libenv.Dump() } \")\n            # libenv[\"CPPDEFINES\"].remove(\"USBCON\")\n            libenv[\"CPPDEFINES\"].remove(\"USE_TINYUSB\")\n\n# Custom actions when building program/firmware\n# env.AddPreAction(\"buildprog\", callback...)\n"
  },
  {
    "path": "extra_scripts/esp32_extra.py",
    "content": "#!/usr/bin/env python3\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821): For SConstruct imports\n# trunk-ignore-all(ruff/E402): Hacky esptool import\n# trunk-ignore-all(flake8/E402): Hacky esptool import\nimport sys\nfrom os.path import join\n\nImport(\"env\")\nplatform = env.PioPlatform()\n\nsys.path.append(join(platform.get_package_dir(\"tool-esptoolpy\")))\n# IntelHex workaround, remove after fixed upstream\n# https://github.com/platformio/platform-espressif32/issues/1632\ntry:\n    import intelhex\nexcept ImportError:\n    env.Execute(\"$PYTHONEXE -m pip install intelhex\")\nimport esptool\n\n\ndef esp32_create_combined_bin(source, target, env):\n    # this sub is borrowed from ESPEasy build toolchain. It's licensed under GPL V3\n    # https://github.com/letscontrolit/ESPEasy/blob/mega/tools/pio/post_esp32.py\n    print(\"Generating combined binary for serial flashing\")\n\n    app_offset = 0x10000\n\n    new_file_name = env.subst(\"$BUILD_DIR/${PROGNAME}.factory.bin\")\n    sections = env.subst(env.get(\"FLASH_EXTRA_IMAGES\"))\n    firmware_name = env.subst(\"$BUILD_DIR/${PROGNAME}.bin\")\n    chip = env.get(\"BOARD_MCU\")\n    board = env.BoardConfig()\n    flash_size = board.get(\"upload.flash_size\")\n    flash_freq = board.get(\"build.f_flash\", \"40m\")\n    flash_freq = flash_freq.replace(\"000000L\", \"m\")\n    flash_mode = board.get(\"build.flash_mode\", \"dio\")\n    memory_type = board.get(\"build.arduino.memory_type\", \"qio_qspi\")\n    if flash_mode == \"qio\" or flash_mode == \"qout\":\n        flash_mode = \"dio\"\n    if memory_type == \"opi_opi\" or memory_type == \"opi_qspi\":\n        flash_mode = \"dout\"\n    cmd = [\n        \"--chip\",\n        chip,\n        \"merge_bin\",\n        \"-o\",\n        new_file_name,\n        \"--flash_mode\",\n        flash_mode,\n        \"--flash_freq\",\n        flash_freq,\n        \"--flash_size\",\n        flash_size,\n    ]\n\n    print(\"    Offset | File\")\n    for section in sections:\n        sect_adr, sect_file = section.split(\" \", 1)\n        print(f\" -  {sect_adr} | {sect_file}\")\n        cmd += [sect_adr, sect_file]\n\n    print(f\" - {hex(app_offset)} | {firmware_name}\")\n    cmd += [hex(app_offset), firmware_name]\n\n    print(\"Using esptool.py arguments: %s\" % \" \".join(cmd))\n\n    esptool.main(cmd)\n\n\nenv.AddPostAction(\"$BUILD_DIR/${PROGNAME}.bin\", esp32_create_combined_bin)\n\nesp32_kind = env.GetProjectOption(\"custom_esp32_kind\")\nif esp32_kind == \"esp32\":\n    # Free up some IRAM by removing auxiliary SPI flash chip drivers.\n    # Wrapped stub symbols are defined in src/platform/esp32/iram-quirk.c.\n    env.Append(\n        LINKFLAGS=[\n            \"-Wl,--wrap=esp_flash_chip_gd\",\n            \"-Wl,--wrap=esp_flash_chip_issi\",\n            \"-Wl,--wrap=esp_flash_chip_winbond\",\n        ]\n    )\nelse:\n    # For newer ESP32 targets, using newlib nano works better.\n    env.Append(LINKFLAGS=[\"--specs=nano.specs\", \"-u\", \"_printf_float\"])\n"
  },
  {
    "path": "extra_scripts/esp32_pre.py",
    "content": "#!/usr/bin/env python3\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821): For SConstruct imports\nimport json\nimport sys\nfrom os.path import isfile\n\nImport(\"env\")\n\n\n# From https://github.com/platformio/platform-espressif32/blob/develop/builder/main.py\ndef _parse_size(value):\n    if isinstance(value, int):\n        return value\n    elif value.isdigit():\n        return int(value)\n    elif value.startswith(\"0x\"):\n        return int(value, 16)\n    elif value[-1].upper() in (\"K\", \"M\"):\n        base = 1024 if value[-1].upper() == \"K\" else 1024 * 1024\n        return int(value[:-1]) * base\n    return value\n\n\ndef _parse_partitions(env):\n    partitions_csv = env.subst(\"$PARTITIONS_TABLE_CSV\")\n    if not isfile(partitions_csv):\n        sys.stderr.write(\n            \"Could not find the file %s with partitions \" \"table.\\n\" % partitions_csv\n        )\n        env.Exit(1)\n        return\n\n    result = []\n    # The first offset is 0x9000 because partition table is flashed to 0x8000 and\n    # occupies an entire flash sector, which size is 0x1000\n    next_offset = 0x9000\n    with open(partitions_csv) as fp:\n        for line in fp.readlines():\n            line = line.strip()\n            if not line or line.startswith(\"#\"):\n                continue\n            tokens = [t.strip() for t in line.split(\",\")]\n            if len(tokens) < 5:\n                continue\n\n            bound = 0x10000 if tokens[1] in (\"0\", \"app\") else 4\n            calculated_offset = (next_offset + bound - 1) & ~(bound - 1)\n            partition = {\n                \"name\": tokens[0],\n                \"type\": tokens[1],\n                \"subtype\": tokens[2],\n                \"offset\": tokens[3] or calculated_offset,\n                \"size\": tokens[4],\n                \"flags\": tokens[5] if len(tokens) > 5 else None,\n            }\n            result.append(partition)\n            next_offset = _parse_size(partition[\"offset\"]) + _parse_size(\n                partition[\"size\"]\n            )\n\n    return result\n\n\ndef mtjson_esp32_part(target, source, env):\n    part = _parse_partitions(env)\n    pj = json.dumps(part)\n    # print(f\"JSON_PARTITIONS: {pj}\")\n    # Dump json string to 'custom_mtjson_part' variable to use later when writing the manifest\n    env.Replace(custom_mtjson_part=pj)\n\n\nenv.AddPreAction(\"mtjson\", mtjson_esp32_part)\n"
  },
  {
    "path": "extra_scripts/nrf52_extra.py",
    "content": "#!/usr/bin/env python3\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821): For SConstruct imports\n\nimport sys\nfrom os.path import basename\n\nImport(\"env\")\n\n\n# Custom HEX from ELF\n# Convert hex to uf2 for nrf52\ndef nrf52_hex_to_uf2(source, target, env):\n    hex_path = target[0].get_abspath()\n    # When using merged hex, drop 'merged' from uf2 filename\n    uf2_path = hex_path.replace(\".merged.\", \".\")\n    uf2_path = uf2_path.replace(\".hex\", \".uf2\")\n    env.Execute(\n        env.VerboseAction(\n            f'\"{sys.executable}\" ./bin/uf2conv.py \"{hex_path}\" -c -f 0xADA52840 -o \"{uf2_path}\"',\n            f\"Generating UF2 file from {basename(hex_path)}\",\n        )\n    )\n\n\ndef nrf52_mergehex(source, target, env):\n    hex_path = target[0].get_abspath()\n    merged_hex_path = hex_path.replace(\".hex\", \".merged.hex\")\n    merge_with = None\n    if \"wio-sdk-wm1110\" == str(env.get(\"PIOENV\")):\n        merge_with = env.subst(\"$PROJECT_DIR/bin/s140_nrf52_7.3.0_softdevice.hex\")\n    else:\n        print(\"merge_with not defined for this target\")\n\n    if merge_with is not None:\n        env.Execute(\n            env.VerboseAction(\n                f'\"$PROJECT_DIR/bin/mergehex\" -m \"{hex_path}\" \"{merge_with}\" -o \"{merged_hex_path}\"',\n                \"Merging HEX with SoftDevice\",\n            )\n        )\n        print(f'Merged file saved at \"{basename(merged_hex_path)}\"')\n        nrf52_hex_to_uf2([hex_path, merge_with], [env.File(merged_hex_path)], env)\n\n\n# if WM1110 target, merge hex with softdevice 7.3.0\nif \"wio-sdk-wm1110\" == env.get(\"PIOENV\"):\n    env.AddPostAction(\"$BUILD_DIR/${PROGNAME}.hex\", nrf52_mergehex)\nelse:\n    env.AddPostAction(\"$BUILD_DIR/${PROGNAME}.hex\", nrf52_hex_to_uf2)\n"
  },
  {
    "path": "extra_scripts/stm32_extra.py",
    "content": "#!/usr/bin/env python3\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821): For SConstruct imports\n\nImport(\"env\")\n\n# Custom HEX from ELF\nenv.AddPostAction(\n    \"$BUILD_DIR/${PROGNAME}.elf\",\n    env.VerboseAction(\n        \" \".join(\n            [\n                \"$OBJCOPY\",\n                \"-O\",\n                \"ihex\",\n                \"-R\",\n                \".eeprom\",\n                \"$BUILD_DIR/${PROGNAME}.elf\",\n                \"$BUILD_DIR/${PROGNAME}.hex\",\n            ]\n        ),\n        \"Building $BUILD_DIR/${PROGNAME}.hex\",\n    ),\n)\n"
  },
  {
    "path": "flake.nix",
    "content": "{\n  description = \"Nix flake to compile Meshtastic firmware\";\n\n  inputs = {\n    nixpkgs.url = \"github:NixOS/nixpkgs/nixpkgs-unstable\";\n\n    # Shim to make flake.nix work with stable Nix.\n    flake-compat = {\n      url = \"github:NixOS/flake-compat\";\n      flake = false;\n    };\n  };\n\n  outputs =\n    inputs:\n    let\n      lib = inputs.nixpkgs.lib;\n\n      forAllSystems =\n        fn:\n        lib.genAttrs lib.systems.flakeExposed (\n          system:\n          fn {\n            pkgs = import inputs.nixpkgs {\n              inherit system;\n            };\n            inherit system;\n          }\n        );\n    in\n    {\n      devShells = forAllSystems (\n        { pkgs, ... }:\n        let\n          python3 = pkgs.python312.withPackages (\n            ps: with ps; [\n              google\n            ]\n          );\n        in\n        {\n          default = pkgs.mkShell {\n            buildInputs = with pkgs; [\n              python3\n              platformio\n            ];\n\n            shellHook = ''\n              # Set up PlatformIO to use a local core directory.\n              export PLATFORMIO_CORE_DIR=$PWD/.platformio\n              # Tell pip to put packages into $PIP_PREFIX instead of the usual\n              # location. This is especially necessary under NixOS to avoid having\n              # pip trying to write to the read-only Nix store. For more info,\n              # see https://wiki.nixos.org/wiki/Python\n              export PIP_PREFIX=$PWD/.python3\n              export PYTHONPATH=\"$PIP_PREFIX/${python3.sitePackages}\"\n              export PATH=\"$PIP_PREFIX/bin:$PATH\"\n              # Avoids reproducibility issues with some Python packages\n              # See https://nixos.org/manual/nixpkgs/stable/#python-setup.py-bdist_wheel-cannot-create-.whl\n              unset SOURCE_DATE_EPOCH\n            '';\n          };\n        }\n      );\n    };\n}\n"
  },
  {
    "path": "meshtasticd.spec.rpkg",
    "content": "# meshtasticd spec file for RPM-based distributions\n#\n# Build locally with:\n# ```\n# sudo dnf install rpkg-util\n# rpkg local\n# ```\n#\n# See:\n# - https://docs.pagure.org/rpkg-util/v3/index.html\n# - https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/\n\n%global  meshtasticd_user          meshtasticd   \n\nName:           meshtasticd\n# Version Ex:   2.5.19\nVersion:        {{{ meshtastic_version }}}\n# Release Ex:   9127.daily.gitd7f5f620.fc41\nRelease:        {{{ git_commits_num }}}%{?copr_projectname:.%{copr_projectname}}.git{{{ git_commit_sha }}}%{?dist}\nVCS:            {{{ git_dir_vcs }}}\nSummary:        Meshtastic daemon for communicating with Meshtastic devices\n\nLicense:        GPL-3.0\nURL:            https://github.com/meshtastic/firmware\nSource0:        {{{ git_dir_pack }}}\nSource1:        https://github.com/meshtastic/web/releases/download/v{{{ web_version }}}/build.tar\n\nBuildRequires: systemd-rpm-macros\nBuildRequires: python3-devel\nBuildRequires: platformio\nBuildRequires: python3dist(protobuf)\nBuildRequires: python3dist(grpcio[protobuf])\nBuildRequires: python3dist(grpcio-tools)\nBuildRequires: git-core\nBuildRequires: gcc-c++\nBuildRequires: pkgconfig(yaml-cpp)\nBuildRequires: pkgconfig(libgpiod)\nBuildRequires: pkgconfig(bluez)\nBuildRequires: pkgconfig(libusb-1.0)\nBuildRequires: libi2c-devel\nBuildRequires: pkgconfig(libuv)\nBuildRequires: pkgconfig(sqlite3)\n# Web components:\nBuildRequires: pkgconfig(openssl)\nBuildRequires: pkgconfig(liborcania)\nBuildRequires: pkgconfig(libyder)\nBuildRequires: pkgconfig(libulfius)\n# TFT components:\nBuildRequires: pkgconfig(x11)\nBuildRequires: pkgconfig(libinput)\nBuildRequires: pkgconfig(xkbcommon-x11)\nBuildRequires: pkgconfig(sdl2)\n\n# libbsd is needed on older Fedora/RHEL to provide 'strlcpy'\n%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10\nBuildRequires: glibc-devel >= 2.38\n%else\nBuildRequires: pkgconfig(libbsd-overlay)\n%endif\n\nRequires:      systemd-udev\n\n# Declare that this package provides the user/group it creates in %pre\n# Required for Fedora 43+ which tracks users/groups as RPM dependencies\nProvides:      user(%{meshtasticd_user})\nProvides:      group(%{meshtasticd_user})\nProvides:      group(spi)\n\n%description\nMeshtastic daemon. Meshtastic is an off-grid\ntext communication platform that uses inexpensive LoRa radios.\n\n%prep\n{{{ git_dir_setup_macro }}}\n# Unpack the web files\nmkdir -p web\ntar -xf %{SOURCE1} -C web\ngzip -dr web\n\n%build\n# Use the “native-tft” environment from platformio to build a Linux binary\nplatformio run -e native-tft\n\n%install\n# Install meshtasticd binary\nmkdir -p %{buildroot}%{_bindir}\ninstall -m 0755 .pio/build/native-tft/meshtasticd %{buildroot}%{_bindir}/meshtasticd\n\n# Install portduino VFS dir\ninstall -p -d -m 0770 %{buildroot}%{_localstatedir}/lib/meshtasticd\n\n# Install udev rules\nmkdir -p %{buildroot}%{_udevrulesdir}\ninstall -m 0644 bin/99-meshtasticd-udev.rules %{buildroot}%{_udevrulesdir}/99-meshtasticd-udev.rules\n\n# Install config dirs\nmkdir -p %{buildroot}%{_sysconfdir}/meshtasticd\ninstall -m 0644 bin/config-dist.yaml %{buildroot}%{_sysconfdir}/meshtasticd/config.yaml\nmkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/config.d\nmkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/available.d\ncp -r bin/config.d/* %{buildroot}%{_sysconfdir}/meshtasticd/available.d\n\n# Install systemd service\ninstall -D -m 0644 bin/meshtasticd.service %{buildroot}%{_unitdir}/meshtasticd.service\n\n# Install meshtasticd start wrapper\ninstall -D -m 0755 bin/meshtasticd-start.sh %{buildroot}%{_bindir}/meshtasticd-start.sh\n\n# Install the web files under /usr/share/meshtasticd/web\nmkdir -p %{buildroot}%{_datadir}/meshtasticd/web\ncp -r web/* %{buildroot}%{_datadir}/meshtasticd/web\n# Install default SSL storage directory (for web)\nmkdir -p %{buildroot}%{_sysconfdir}/meshtasticd/ssl\n\n%pre\n# create spi group (for udev rules)\ngetent group spi > /dev/null || groupadd -r spi\n# create a meshtasticd group and user\ngetent group %{meshtasticd_user} > /dev/null || groupadd -r %{meshtasticd_user}\ngetent passwd %{meshtasticd_user} > /dev/null || \\\n    useradd -r -d %{_localstatedir}/lib/meshtasticd -g %{meshtasticd_user} -G spi \\\n    -s /sbin/nologin -c \"Meshtastic Daemon\" %{meshtasticd_user}\n# add meshtasticd user to appropriate groups (if they exist)\ngetent group gpio > /dev/null && usermod -a -G gpio %{meshtasticd_user} > /dev/null\ngetent group plugdev > /dev/null && usermod -a -G plugdev %{meshtasticd_user} > /dev/null\ngetent group dialout > /dev/null && usermod -a -G dialout %{meshtasticd_user} > /dev/null\ngetent group i2c > /dev/null && usermod -a -G i2c %{meshtasticd_user} > /dev/null\ngetent group video > /dev/null && usermod -a -G video %{meshtasticd_user} > /dev/null\ngetent group audio > /dev/null && usermod -a -G audio %{meshtasticd_user} > /dev/null\ngetent group input > /dev/null && usermod -a -G input %{meshtasticd_user} > /dev/null\nexit 0\n\n%triggerin -- meshtasticd < 2.6.9\n# migrate .portduino (if it exists and hasn’t already been copied)\nif [ -d /root/.portduino ] && [ ! -e /var/lib/meshtasticd/.portduino ]; then\n    mkdir -p /var/lib/meshtasticd\n    cp -r /root/.portduino /var/lib/meshtasticd/.portduino\n    chown -R %{meshtasticd_user}:%{meshtasticd_user} \\\n        %{_localstatedir}/lib/meshtasticd || :\n    # Fix SELinux labels if present (no-op on non-SELinux systems)\n    restorecon -R /var/lib/meshtasticd/.portduino 2>/dev/null || :\n    echo \"Migrated meshtasticd VFS from /root/.portduino to /var/lib/meshtasticd/.portduino\"\n    echo \"meshtasticd now runs as the 'meshtasticd' user, not 'root'.\"\n    echo \"See https://github.com/meshtastic/firmware/pull/6718 for details\"\nfi\n\n%post\n%systemd_post meshtasticd.service\n\n%preun\n%systemd_preun meshtasticd.service\n\n%postun\n%systemd_postun_with_restart meshtasticd.service\n\n%files\n%defattr(-,%{meshtasticd_user},%{meshtasticd_user})\n%license LICENSE\n%doc README.md\n%{_bindir}/meshtasticd\n%{_bindir}/meshtasticd-start.sh\n%dir %{_localstatedir}/lib/meshtasticd\n%{_udevrulesdir}/99-meshtasticd-udev.rules\n%dir %{_sysconfdir}/meshtasticd\n%dir %{_sysconfdir}/meshtasticd/config.d\n%dir %{_sysconfdir}/meshtasticd/available.d\n%config(noreplace) %{_sysconfdir}/meshtasticd/config.yaml\n%config %{_sysconfdir}/meshtasticd/available.d/*\n%{_unitdir}/meshtasticd.service\n%dir %{_datadir}/meshtasticd\n%dir %{_datadir}/meshtasticd/web\n%{_datadir}/meshtasticd/web/*\n%dir %{_sysconfdir}/meshtasticd/ssl\n\n%changelog\n%autochangelog\n"
  },
  {
    "path": "monitor/filter_c3_exception_decoder.py",
    "content": "# trunk-ignore-all(bandit/B404): subprocess is used to call addr2line\n# trunk-ignore-all(bandit/B603): subprocess is used to call addr2line\n\n# Copyright (c) 2014-present PlatformIO <contact@platformio.org>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nimport re\nimport subprocess\nimport sys\n\nfrom platformio.project.exception import PlatformioException\nfrom platformio.public import DeviceMonitorFilterBase, load_build_metadata\n\n# By design, __init__ is called inside miniterm and we can't pass context to it.\n# pylint: disable=attribute-defined-outside-init\n\nIS_WINDOWS = sys.platform.startswith(\"win\")\n\n\nclass Esp32C3ExceptionDecoder(DeviceMonitorFilterBase):\n    NAME = \"esp32_c3_exception_decoder\"\n\n    PCADDR_PATTERN = re.compile(r\"0x4[0-9a-f]{7}\", re.IGNORECASE)\n\n    def __call__(self):\n        self.buffer = \"\"\n        self.pcaddr_re = self.PCADDR_PATTERN\n\n        self.firmware_path = None\n        self.addr2line_path = None\n        self.enabled = self.setup_paths()\n\n        if self.config.get(\"env:\" + self.environment, \"build_type\") != \"debug\":\n            print(\"\"\"\nPlease build project in debug configuration to get more details about an exception.\nSee https://docs.platformio.org/page/projectconf/build_configurations.html\n\n\"\"\")\n\n        return self\n\n    def setup_paths(self):\n        self.project_dir = os.path.abspath(self.project_dir)\n        try:\n            data = load_build_metadata(self.project_dir, self.environment)\n            self.firmware_path = data[\"prog_path\"]\n            if not os.path.isfile(self.firmware_path):\n                sys.stderr.write(\n                    \"%s: disabling, firmware at %s does not exist, rebuild the project?\\n\"\n                    % (self.__class__.__name__, self.firmware_path)\n                )\n                return False\n\n            if self.addr2line_path is None:\n                cc_path = data.get(\"cc_path\", \"\")\n                if \"-gcc\" in cc_path:\n                    self.addr2line_path = cc_path.replace(\"-gcc\", \"-addr2line\")\n                else:\n                    sys.stderr.write(\n                        \"%s: disabling, failed to find addr2line.\\n\"\n                        % self.__class__.__name__\n                    )\n                    return False\n\n            if not os.path.isfile(self.addr2line_path):\n                sys.stderr.write(\n                    \"%s: disabling, addr2line at %s does not exist\\n\"\n                    % (self.__class__.__name__, self.addr2line_path)\n                )\n                return False\n\n            return True\n        except PlatformioException as e:\n            sys.stderr.write(\n                \"%s: disabling, exception while looking for addr2line: %s\\n\"\n                % (self.__class__.__name__, e)\n            )\n            return False\n\n    def rx(self, text):\n        if not self.enabled:\n            return text\n\n        last = 0\n        while True:\n            idx = text.find(\"\\n\", last)\n            if idx == -1:\n                if len(self.buffer) < 4096:\n                    self.buffer += text[last:]\n                break\n\n            line = text[last:idx]\n            if self.buffer:\n                line = self.buffer + line\n                self.buffer = \"\"\n            last = idx + 1\n\n            # Output each trace on a separate line below ours\n            # Logic identical to https://github.com/espressif/esp-idf/blob/master/tools/idf_monitor_base/logger.py#L131\n            for m in re.finditer(self.pcaddr_re, line):\n                if m is None:\n                    continue\n\n                trace = self.get_backtrace(m)\n                if len(trace) != \"\":\n                    text = text[:last] + trace + text[last:]\n                    last += len(trace)\n\n        return text\n\n    def get_backtrace(self, match):\n        trace = \"\\n\"\n        enc = \"mbcs\" if IS_WINDOWS else \"utf-8\"\n        args = [self.addr2line_path, \"-fipC\", \"-e\", self.firmware_path]\n        try:\n            addr = match.group()\n            output = subprocess.check_output(args + [addr]).decode(enc).strip()\n            output = output.replace(\n                \"\\n\", \"\\n     \"\n            )  # newlines happen with inlined methods\n            output = self.strip_project_dir(output)\n            # Output the trace in yellow color so that it is easier to spot\n            trace += \"\\033[33m=> %s: %s\\033[0m\\n\" % (addr, output)\n        except subprocess.CalledProcessError as e:\n            sys.stderr.write(\n                \"%s: failed to call %s: %s\\n\"\n                % (self.__class__.__name__, self.addr2line_path, e)\n            )\n        return trace\n\n    def strip_project_dir(self, trace):\n        while True:\n            idx = trace.find(self.project_dir)\n            if idx == -1:\n                break\n            trace = trace[:idx] + trace[idx + len(self.project_dir) + 1 :]\n        return trace\n"
  },
  {
    "path": "partition-table-8MB.csv",
    "content": "# This is a layout for 8MB of flash for MUI devices\n# Name,   Type, SubType, Offset,  Size, Flags\nnvs,      data, nvs,     0x9000,  0x5000,\notadata,  data, ota,     0xe000,  0x2000,\napp0,     app,  ota_0,   0x10000, 0x5C0000,\nflashApp, app,  ota_1,   0x5D0000,0x0A0000,\nspiffs,   data, spiffs,  0x670000,0x180000"
  },
  {
    "path": "partition-table.csv",
    "content": "# FIXME! using the genpartitions based table doesn't work on TTGO so for now I stay with my old memory map\n# This is a layout for 4MB of flash\n# Name,   Type, SubType, Offset,  Size, Flags\nnvs,      data, nvs,     0x009000, 0x005000,\notadata,  data, ota,     0x00e000, 0x002000,\napp,      app,  ota_0,   0x010000, 0x250000,\nflashApp, app,  ota_1,   0x260000, 0x0A0000,\nspiffs,   data, spiffs,  0x300000, 0x100000,"
  },
  {
    "path": "platformio.ini",
    "content": "; PlatformIO Project Configuration File\n; https://docs.platformio.org/page/projectconf.html\n\n[platformio]\ndefault_envs = tbeam\n\nextra_configs =\n\tvariants/*/*.ini\n\tvariants/*/*/platformio.ini\n\tvariants/*/diy/*/platformio.ini\n\tsrc/graphics/niche/InkHUD/PlatformioConfig.ini\n\ndescription = Meshtastic\n\n[env]\ntest_build_src = true\nextra_scripts =\n\tpre:bin/platformio-pre.py\n\tbin/platformio-custom.py\n; note: we add src to our include search path so that lmic_project_config can override\n; note: TINYGPS_OPTION_NO_CUSTOM_FIELDS is VERY important.  We don't use custom fields and somewhere in that pile\n; of code is a heap corruption bug!\n; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc\n; The Radiolib stuff will speed up building considerably. Exclud all the stuff we dont need.\nbuild_flags = -Wno-missing-field-initializers\n\n\t-Wno-format\n\t-Isrc -Isrc/mesh -Isrc/mesh/generated -Isrc/gps -Isrc/buzz -Wl,-Map,\"${platformio.build_dir}\"/output.map\n\t-DUSE_THREAD_NAMES\n\t-DTINYGPS_OPTION_NO_CUSTOM_FIELDS\n\t-DPB_ENABLE_MALLOC=1\n\t-DRADIOLIB_EXCLUDE_CC1101=1\n\t-DRADIOLIB_EXCLUDE_NRF24=1\n\t-DRADIOLIB_EXCLUDE_RF69=1\n\t-DRADIOLIB_EXCLUDE_SX1231=1\n\t-DRADIOLIB_EXCLUDE_SX1233=1\n\t-DRADIOLIB_EXCLUDE_SI443X=1\n\t-DRADIOLIB_EXCLUDE_RFM2X=1\n\t-DRADIOLIB_EXCLUDE_AFSK=1\n\t-DRADIOLIB_EXCLUDE_BELL=1\n\t-DRADIOLIB_EXCLUDE_HELLSCHREIBER=1\n\t-DRADIOLIB_EXCLUDE_MORSE=1\n\t-DRADIOLIB_EXCLUDE_RTTY=1\n\t-DRADIOLIB_EXCLUDE_SSTV=1\n\t-DRADIOLIB_EXCLUDE_AX25=1\n\t-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1\n\t-DRADIOLIB_EXCLUDE_BELL=1\n\t-DRADIOLIB_EXCLUDE_PAGER=1\n\t-DRADIOLIB_EXCLUDE_FSK4=1\n\t-DRADIOLIB_EXCLUDE_APRS=1\n\t-DRADIOLIB_EXCLUDE_LORAWAN=1\n\t-DMESHTASTIC_EXCLUDE_DROPZONE=1\n\t-DMESHTASTIC_EXCLUDE_REPLYBOT=1\n\t-DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1\n\t-DMESHTASTIC_EXCLUDE_HEALTH_TELEMETRY=1\n\t-DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware\n\t-DMESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE=1\n\t-DMESHTASTIC_EXCLUDE_POWERMON=1\n\t-DMESHTASTIC_EXCLUDE_STATUS=1\n\t-D MAX_THREADS=40 ; As we've split modules, we have more threads to manage\n\t-DLED_BUILTIN=-1\n\t#-DBUILD_EPOCH=$UNIX_TIME ; set in platformio-custom.py now\n\t#-D OLED_PL=1\n\t#-D DEBUG_HEAP=1 ; uncomment to add free heap space / memory leak debugging logs\n\t#-D DEBUG_LOOP_TIMING=1 ; uncomment to add main loop timing logs\n\nmonitor_speed = 115200\nmonitor_filters = direct\nlib_deps =\n\t# renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master\n\thttps://github.com/meshtastic/esp8266-oled-ssd1306/archive/21e484f409cde18d44012caef84c244eb5ca28f3.zip\n\t# renovate: datasource=git-refs depName=meshtastic-OneButton packageName=https://github.com/meshtastic/OneButton gitBranch=master\n\thttps://github.com/meshtastic/OneButton/archive/fa352d668c53f290cfa480a5f79ad422cd828c70.zip\n\t# renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master\n\thttps://github.com/meshtastic/arduino-fsm/archive/7db3702bf0cfe97b783d6c72595e3f38e0b19159.zip\n\t# renovate: datasource=git-refs depName=meshtastic-TinyGPSPlus packageName=https://github.com/meshtastic/TinyGPSPlus gitBranch=master\n\thttps://github.com/meshtastic/TinyGPSPlus/archive/71a82db35f3b973440044c476d4bcdc673b104f4.zip\n\t# renovate: datasource=git-refs depName=meshtastic-ArduinoThread packageName=https://github.com/meshtastic/ArduinoThread gitBranch=master\n\thttps://github.com/meshtastic/ArduinoThread/archive/b841b0415721f1341ea41cccfb4adccfaf951567.zip\n\t# renovate: datasource=custom.pio depName=Nanopb packageName=nanopb/library/Nanopb\n\tnanopb/Nanopb@0.4.91\n\t# renovate: datasource=custom.pio depName=ErriezCRC32 packageName=erriez/library/ErriezCRC32\n\terriez/ErriezCRC32@1.0.1\n\n; Used for the code analysis in PIO Home / Inspect\ncheck_tool = cppcheck\ncheck_skip_packages = yes\ncheck_flags =\n\t-DAPP_VERSION=1.0.0\n\t--suppressions-list=suppressions.txt\n\t--inline-suppr\n\n; Common settings for conventional (non Portduino) Arduino targets\n[arduino_base]\nframework = arduino\nlib_deps =\n\t${env.lib_deps}\n\t# renovate: datasource=custom.pio depName=NonBlockingRTTTL packageName=end2endzone/library/NonBlockingRTTTL\n\tend2endzone/NonBlockingRTTTL@1.4.0\nbuild_unflags =\n\t-std=c++11\n\t-std=gnu++11\nbuild_flags = ${env.build_flags} -Os\n\t-std=gnu++17\nbuild_src_filter = ${env.build_src_filter} -<platform/portduino/> -<graphics/niche/>\n\n; Common libs for communicating over TCP/IP networks such as MQTT\n[networking_base]\nlib_deps =\n\t# renovate: datasource=custom.pio depName=TBPubSubClient packageName=thingsboard/library/TBPubSubClient\n\tthingsboard/TBPubSubClient@2.12.1\n\t# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient\n\tarduino-libraries/NTPClient@3.2.1\n\n; Extra TCP/IP networking libs for supported devices\n[networking_extra]\nlib_deps =\n\t# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog\n\tarcao/Syslog@2.0.0\n\n[radiolib_base]\nlib_deps =\n\t# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib\n\tjgromes/RadioLib@7.6.0\n\n[device-ui_base]\nlib_deps =\n\t# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master\n\thttps://github.com/meshtastic/device-ui/archive/f36d2a953524e372b78c5b4147ec55f38716964e.zip\n\n; Common libs for environmental measurements in telemetry module\n[environmental_base]\nlib_deps =\n\t# renovate: datasource=custom.pio depName=Adafruit BusIO packageName=adafruit/library/Adafruit BusIO\n\tadafruit/Adafruit BusIO@1.17.4\n\t# renovate: datasource=custom.pio depName=Adafruit Unified Sensor packageName=adafruit/library/Adafruit Unified Sensor\n\tadafruit/Adafruit Unified Sensor@1.1.15\n\t# renovate: datasource=custom.pio depName=Adafruit BMP280 packageName=adafruit/library/Adafruit BMP280 Library\n\tadafruit/Adafruit BMP280 Library@3.0.0\n\t# renovate: datasource=custom.pio depName=Adafruit BMP085 packageName=adafruit/library/Adafruit BMP085 Library\n\tadafruit/Adafruit BMP085 Library@1.2.4\n\t# renovate: datasource=custom.pio depName=Adafruit BME280 packageName=adafruit/library/Adafruit BME280 Library\n\tadafruit/Adafruit BME280 Library@2.3.0\n\t# renovate: datasource=custom.pio depName=Adafruit DPS310 packageName=adafruit/library/Adafruit DPS310\n\tadafruit/Adafruit DPS310@1.1.6\n\t# renovate: datasource=custom.pio depName=Adafruit MCP9808 packageName=adafruit/library/Adafruit MCP9808 Library\n\tadafruit/Adafruit MCP9808 Library@2.0.2\n\t# renovate: datasource=custom.pio depName=Adafruit INA260 packageName=adafruit/library/Adafruit INA260 Library\n\tadafruit/Adafruit INA260 Library@1.5.3\n\t# renovate: datasource=custom.pio depName=Adafruit INA219 packageName=adafruit/library/Adafruit INA219\n\tadafruit/Adafruit INA219@1.2.3\n\t# renovate: datasource=custom.pio depName=Adafruit MPU6050 packageName=adafruit/library/Adafruit MPU6050\n\tadafruit/Adafruit MPU6050@2.2.9\n\t# renovate: datasource=custom.pio depName=Adafruit LIS3DH packageName=adafruit/library/Adafruit LIS3DH\n\tadafruit/Adafruit LIS3DH@1.3.0\n\t# renovate: datasource=custom.pio depName=Adafruit AHTX0 packageName=adafruit/library/Adafruit AHTX0\n\tadafruit/Adafruit AHTX0@2.0.6\n\t# renovate: datasource=custom.pio depName=Adafruit LSM6DS packageName=adafruit/library/Adafruit LSM6DS\n\tadafruit/Adafruit LSM6DS@4.7.4\n\t# renovate: datasource=custom.pio depName=Adafruit TSL2591 packageName=adafruit/library/Adafruit TSL2591 Library\n\tadafruit/Adafruit TSL2591 Library@1.4.5\n\t# renovate: datasource=custom.pio depName=EmotiBit MLX90632 packageName=emotibit/library/EmotiBit MLX90632\n\temotibit/EmotiBit MLX90632@1.0.8\n\t# renovate: datasource=custom.pio depName=Adafruit MLX90614 packageName=adafruit/library/Adafruit MLX90614 Library\n\tadafruit/Adafruit MLX90614 Library@2.1.6\n\t# renovate: datasource=git-refs depName=INA3221 packageName=https://github.com/sgtwilko/INA3221 gitBranch=FixOverflow\n\thttps://github.com/sgtwilko/INA3221/archive/bb03d7e9bfcc74fc798838a54f4f99738f29fc6a.zip\n\t# renovate: datasource=custom.pio depName=QMC5883L Compass packageName=mprograms/library/QMC5883LCompass\n\tmprograms/QMC5883LCompass@1.2.3\n\t# renovate: datasource=custom.pio depName=DFRobot_RTU packageName=dfrobot/library/DFRobot_RTU\n\tdfrobot/DFRobot_RTU@1.0.6\n\t# renovate: datasource=git-refs depName=DFRobot_RainfallSensor packageName=https://github.com/DFRobot/DFRobot_RainfallSensor gitBranch=master\n\thttps://github.com/DFRobot/DFRobot_RainfallSensor/archive/38fea5e02b40a5430be6dab39a99a6f6347d667e.zip\n\t# renovate: datasource=custom.pio depName=INA226 packageName=robtillaart/library/INA226\n\trobtillaart/INA226@0.6.6\n\t# renovate: datasource=custom.pio depName=SparkFun MAX3010x packageName=sparkfun/library/SparkFun MAX3010x Pulse and Proximity Sensor Library\n\tsparkfun/SparkFun MAX3010x Pulse and Proximity Sensor Library@1.1.2\n\t# renovate: datasource=custom.pio depName=SparkFun 9DoF IMU Breakout ICM 20948 packageName=sparkfun/library/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library\n\tsparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@1.3.2\n\t# renovate: datasource=custom.pio depName=Adafruit LTR390 Library packageName=adafruit/library/Adafruit LTR390 Library\n\tadafruit/Adafruit LTR390 Library@1.1.2\n\t# renovate: datasource=custom.pio depName=Adafruit PCT2075 packageName=adafruit/library/Adafruit PCT2075\n\tadafruit/Adafruit PCT2075@1.0.6\n\t# renovate: datasource=custom.pio depName=DFRobot_BMM150 packageName=dfrobot/library/DFRobot_BMM150\n\tdfrobot/DFRobot_BMM150@1.0.0\n\t# renovate: datasource=custom.pio depName=Adafruit_TSL2561 packageName=adafruit/library/Adafruit TSL2561\n\tadafruit/Adafruit TSL2561@1.1.3\n\t# renovate: datasource=custom.pio depName=BH1750_WE packageName=wollewald/library/BH1750_WE\n\twollewald/BH1750_WE@1.1.10\n\n; Common environmental sensor libraries (not included in native / portduino)\n[environmental_extra_common]\nlib_deps =\n\t# renovate: datasource=custom.pio depName=Adafruit BMP3XX packageName=adafruit/library/Adafruit BMP3XX Library\n\tadafruit/Adafruit BMP3XX Library@2.1.6\n\t# renovate: datasource=custom.pio depName=Adafruit MAX1704X packageName=adafruit/library/Adafruit MAX1704X\n\tadafruit/Adafruit MAX1704X@1.0.3\n\t# renovate: datasource=custom.pio depName=Adafruit SHTC3 packageName=adafruit/library/Adafruit SHTC3 Library\n\tadafruit/Adafruit SHTC3 Library@1.0.2\n\t# renovate: datasource=custom.pio depName=Adafruit LPS2X packageName=adafruit/library/Adafruit LPS2X\n\tadafruit/Adafruit LPS2X@2.0.6\n\t# renovate: datasource=custom.pio depName=Adafruit SHT31 packageName=adafruit/library/Adafruit SHT31 Library\n\tadafruit/Adafruit SHT31 Library@2.2.2\n\t# renovate: datasource=custom.pio depName=Adafruit VEML7700 packageName=adafruit/library/Adafruit VEML7700 Library\n\tadafruit/Adafruit VEML7700 Library@2.1.6\n\t# renovate: datasource=custom.pio depName=Adafruit SHT4x packageName=adafruit/library/Adafruit SHT4x Library\n\tadafruit/Adafruit SHT4x Library@1.0.5\n\t# renovate: datasource=custom.pio depName=SparkFun Qwiic Scale NAU7802 packageName=sparkfun/library/SparkFun Qwiic Scale NAU7802 Arduino Library\n\tsparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@1.0.6\n\t# renovate: datasource=custom.pio depName=ClosedCube OPT3001 packageName=closedcube/library/ClosedCube OPT3001\n\tclosedcube/ClosedCube OPT3001@1.1.2\n\t# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master\n\thttps://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip\n\t# renovate: datasource=custom.pio depName=Sensirion Core packageName=sensirion/library/Sensirion Core\n\tsensirion/Sensirion Core@0.7.3\n\t# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x\n\tsensirion/Sensirion I2C SCD4x@1.1.0\n\t# renovate: datasource=custom.pio depName=Sensirion I2C SFA3x packageName=sensirion/library/Sensirion I2C SFA3x\n\tsensirion/Sensirion I2C SFA3x@1.0.0\n\t# renovate: datasource=custom.pio depName=Sensirion I2C SCD30 packageName=sensirion/library/Sensirion I2C SCD30\n\tsensirion/Sensirion I2C SCD30@1.0.0\n\n; Environmental sensors with BSEC2 (Bosch proprietary IAQ)\n[environmental_extra]\nlib_deps =\n\t${environmental_extra_common.lib_deps}\n\t# renovate: datasource=custom.pio depName=Bosch BSEC2 packageName=boschsensortec/library/bsec2\n\tboschsensortec/bsec2@1.10.2610\n\t# renovate: datasource=custom.pio depName=Bosch BME68x packageName=boschsensortec/library/BME68x Sensor Library\n\tboschsensortec/BME68x Sensor Library@1.3.40408\n\n; Environmental sensors without BSEC (saves ~3.5KB DRAM for original ESP32 targets)\n[environmental_extra_no_bsec]\nlib_deps =\n\t${environmental_extra_common.lib_deps}\n\t# renovate: datasource=custom.pio depName=adafruit/Adafruit BME680 Library packageName=adafruit/library/Adafruit BME680\n\tadafruit/Adafruit BME680 Library@^2.0.5\n"
  },
  {
    "path": "pyocd.yaml",
    "content": "# This is a config file to control pyocd ICE debugger probe options (only used for NRF52 targets with hardware debugging connections)\n# for more info see FIXMEURL\n\n# console or telnet\nsemihost_console_type: telnet\nenable_semihosting: True\ntelnet_port: 4444\n"
  },
  {
    "path": "renovate.json",
    "content": "{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"extends\": [\n    \":dependencyDashboard\",\n    \":semanticCommitTypeAll(chore)\",\n    \":ignoreModulesAndTests\",\n    \"group:recommended\",\n    \"replacements:all\",\n    \"workarounds:all\"\n  ],\n  \"baseBranchPatterns\": [\"master\"],\n  \"forkProcessing\": \"enabled\",\n  \"ignoreDeps\": [\n    \"protobufs\"\n  ],\n  \"git-submodules\": {\n    \"enabled\": true\n  },\n  \"pip_requirements\": {\n    \"managerFilePatterns\": [\n      \"/bin/bump_metainfo/requirements.txt/\"\n    ]\n  },\n  \"commitMessageTopic\": \"{{depName}}\",\n  \"labels\": [\n    \"dependencies\"\n  ],\n  \"customDatasources\": {\n    \"pio\": {\n      \"description\": \"PlatformIO Registry\",\n      \"defaultRegistryUrlTemplate\": \"https://api.registry.platformio.org/v3/packages/{{packageName}}\",\n      \"format\": \"json\",\n      \"transformTemplates\": [\n        \"{\\\"releases\\\": [$map($.versions, function($v) { { \\\"version\\\": $v.name, \\\"releaseTimestamp\\\": $v.released_at } })], \\\"homepage\\\": $encodeUrl($join([\\\"https://registry.platformio.org/\\\",$.type,\\\"/\\\",$.owner.username,\\\"/\\\",$.name])) }\"\n      ]\n    }\n  },\n  \"customManagers\": [\n    {\n      \"customType\": \"regex\",\n      \"description\": \"Match meshtastic/web version\",\n      \"managerFilePatterns\": [\n        \"/bin/web.version/\"\n      ],\n      \"matchStrings\": [\n        \"(?<currentValue>.+)$\"\n      ],\n      \"datasourceTemplate\": \"github-releases\",\n      \"depNameTemplate\": \"meshtastic/web\",\n      \"versioningTemplate\": \"semver-coerced\"\n    },\n    {\n      \"customType\": \"regex\",\n      \"description\": \"Match normal PIO dependencies\",\n      \"managerFilePatterns\": [\n        \"/.*\\\\.ini$/\"\n      ],\n      \"matchStrings\": [\n        \"# renovate: datasource=(?<datasource>.*?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\\\s+?.+?@(?<currentValue>.+?)\\\\s\"\n      ],\n      \"versioningTemplate\": \"{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}\"\n    },\n    {\n      \"customType\": \"regex\",\n      \"description\": \"Match PIO zipped dependencies with github tag ref\",\n      \"managerFilePatterns\": [\n        \"/.*\\\\.ini$/\"\n      ],\n      \"matchStrings\": [\n        \"# renovate: datasource=github-tags(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\\\s+?https://.+?archive/(?<currentValue>.+?).zip\\\\s\"\n      ],\n      \"datasourceTemplate\": \"github-tags\",\n      \"versioningTemplate\": \"{{#if versioning}}{{{versioning}}}{{else}}semver-coerced{{/if}}\"\n    },\n    {\n      \"customType\": \"regex\",\n      \"description\": \"Match PIO zipped dependencies with git commit ref\",\n      \"managerFilePatterns\": [\n        \"/.*\\\\.ini$/\"\n      ],\n      \"matchStrings\": [\n        \"# renovate: datasource=git-refs(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\\\sgitBranch=(?<gitBranch>.+?)\\\\s+?https://.+?archive/(?<currentDigest>.+?).zip\\\\s\"\n      ],\n      \"datasourceTemplate\": \"git-refs\",\n      \"currentValueTemplate\": \"{{{gitBranch}}}\",\n      \"versioningTemplate\": \"{{#if versioning}}{{{versioning}}}{{else}}git{{/if}}\"\n    }\n  ],\n  \"packageRules\": [\n    {\n      \"matchDepNames\": [\n        \"meshtastic/device-ui\"\n      ],\n      \"reviewers\": [\n        \"mverch67\"\n      ],\n      \"changelogUrl\": \"https://github.com/meshtastic/device-ui/compare/{{currentDigest}}...{{newDigest}}\"\n    }\n  ]\n}\n"
  },
  {
    "path": "rpkg.conf",
    "content": "[rpkg]\nuser_macros = \"${git_props:root}/bin/rpkg.macros\"\n"
  },
  {
    "path": "shell.nix",
    "content": "(import (\n  let\n    lock = builtins.fromJSON (builtins.readFile ./flake.lock);\n    nodeName = lock.nodes.root.inputs.flake-compat;\n  in\n  fetchTarball {\n    url =\n      lock.nodes.${nodeName}.locked.url\n        or \"https://github.com/NixOS/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz\";\n    sha256 = lock.nodes.${nodeName}.locked.narHash;\n  }\n) { src = ./.; }).shellNix\n"
  },
  {
    "path": "src/AmbientLightingThread.h",
    "content": "#ifndef AMBIENTLIGHTINGTHREAD_H\n#define AMBIENTLIGHTINGTHREAD_H\n\n#include \"Observer.h\"\n#include \"configuration.h\"\n#include \"detect/ScanI2C.h\"\n#include \"sleep.h\"\n\n#ifdef HAS_NCP5623\n#include <Wire.h>\n\n#include <NCP5623.h>\n#endif\n\n#ifdef HAS_LP5562\n#include <graphics/NomadStarLED.h>\n#endif\n\n#ifdef HAS_NEOPIXEL\n#include <Adafruit_NeoPixel.h>\n#endif\n\n#ifdef UNPHONE\n#include \"unPhone.h\"\nextern unPhone unphone;\n#endif\n\nclass AmbientLightingThread : public concurrency::OSThread\n{\n    friend class StatusLEDModule; // Let the LEDStatusModule trigger the ambient lighting for notifications and battery status.\n    friend class ExternalNotificationModule; // Let the ExternalNotificationModule trigger the ambient lighting for notifications.\n\n  private:\n#ifdef HAS_NCP5623\n    NCP5623 rgb;\n#endif\n\n#ifdef HAS_LP5562\n    LP5562 rgbw;\n#endif\n\n#ifdef HAS_NEOPIXEL\n    Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NEOPIXEL_COUNT, NEOPIXEL_DATA, NEOPIXEL_TYPE);\n#endif\n\n  public:\n    explicit AmbientLightingThread(ScanI2C::DeviceType type) : OSThread(\"AmbientLighting\")\n    {\n        notifyDeepSleepObserver.observe(&notifyDeepSleep); // Let us know when shutdown() is issued.\n\n// Enables Ambient Lighting by default if conditions are meet.\n#ifdef HAS_RGB_LED\n#ifdef ENABLE_AMBIENTLIGHTING\n        moduleConfig.ambient_lighting.led_state = true;\n#endif\n#endif\n#if AMBIENT_LIGHTING_TEST\n        // define to enable test\n        moduleConfig.ambient_lighting.led_state = true;\n        moduleConfig.ambient_lighting.current = 10;\n        // Default to a color based on our node number\n        moduleConfig.ambient_lighting.red = (myNodeInfo.my_node_num & 0xFF0000) >> 16;\n        moduleConfig.ambient_lighting.green = (myNodeInfo.my_node_num & 0x00FF00) >> 8;\n        moduleConfig.ambient_lighting.blue = myNodeInfo.my_node_num & 0x0000FF;\n#endif\n#if defined(HAS_NCP5623) || defined(HAS_LP5562)\n        _type = type;\n        if (_type == ScanI2C::DeviceType::NONE) {\n            LOG_DEBUG(\"AmbientLighting Disable due to no RGB leds found on I2C bus\");\n            disable();\n            return;\n        }\n#endif\n#ifdef HAS_RGB_LED\n        LOG_DEBUG(\"AmbientLighting init\");\n#ifdef HAS_NCP5623\n        if (_type == ScanI2C::NCP5623) {\n            rgb.begin();\n#endif\n#ifdef HAS_LP5562\n            if (_type == ScanI2C::LP5562) {\n                rgbw.begin();\n#endif\n#ifdef RGBLED_RED\n                pinMode(RGBLED_RED, OUTPUT);\n                pinMode(RGBLED_GREEN, OUTPUT);\n                pinMode(RGBLED_BLUE, OUTPUT);\n#endif\n#ifdef HAS_NEOPIXEL\n                pixels.begin(); // Initialise the pixel(s)\n                pixels.clear(); // Set all pixel colors to 'off'\n                pixels.setBrightness(moduleConfig.ambient_lighting.current);\n#endif\n                if (!moduleConfig.ambient_lighting.led_state) {\n                    LOG_DEBUG(\"AmbientLighting Disable due to moduleConfig.ambient_lighting.led_state OFF\");\n                    disable();\n                    return;\n                }\n                setLighting(moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red,\n                            moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);\n#endif\n#if defined(HAS_NCP5623) || defined(HAS_LP5562)\n            }\n#endif\n        }\n\n      protected:\n        int32_t runOnce() override\n        {\n#ifdef HAS_RGB_LED\n#if defined(HAS_NCP5623) || defined(HAS_LP5562)\n            if ((_type == ScanI2C::NCP5623 || _type == ScanI2C::LP5562) && moduleConfig.ambient_lighting.led_state) {\n#endif\n                setLighting(moduleConfig.ambient_lighting.current, moduleConfig.ambient_lighting.red,\n                            moduleConfig.ambient_lighting.green, moduleConfig.ambient_lighting.blue);\n                return 30000; // 30 seconds to reset from any animations that may have been running from Ext. Notification\n#if defined(HAS_NCP5623) || defined(HAS_LP5562)\n            }\n#endif\n#endif\n            return disable();\n        }\n\n        // When shutdown() is issued, setLightingOff will be called.\n        CallbackObserver<AmbientLightingThread, void *> notifyDeepSleepObserver =\n            CallbackObserver<AmbientLightingThread, void *>(this, &AmbientLightingThread::setLightingOff);\n\n      private:\n        ScanI2C::DeviceType _type = ScanI2C::DeviceType::NONE;\n\n        // Turn RGB lighting off, is used in junction to shutdown()\n        int setLightingOff(void *unused)\n        {\n#ifdef HAS_NCP5623\n            rgb.setCurrent(0);\n            rgb.setRed(0);\n            rgb.setGreen(0);\n            rgb.setBlue(0);\n            LOG_INFO(\"OFF: NCP5623 Ambient lighting\");\n#endif\n#ifdef HAS_LP5562\n            rgbw.setCurrent(0);\n            rgbw.setRed(0);\n            rgbw.setGreen(0);\n            rgbw.setBlue(0);\n            rgbw.setWhite(0);\n            LOG_INFO(\"OFF: LP5562 Ambient lighting\");\n#endif\n#ifdef HAS_NEOPIXEL\n            pixels.clear();\n            pixels.show();\n            LOG_INFO(\"OFF: NeoPixel Ambient lighting\");\n#endif\n#ifdef RGBLED_CA\n            analogWrite(RGBLED_RED, 255 - 0);\n            analogWrite(RGBLED_GREEN, 255 - 0);\n            analogWrite(RGBLED_BLUE, 255 - 0);\n            LOG_INFO(\"OFF: Ambient light RGB Common Anode\");\n#elif defined(RGBLED_RED)\n        analogWrite(RGBLED_RED, 0);\n        analogWrite(RGBLED_GREEN, 0);\n        analogWrite(RGBLED_BLUE, 0);\n        LOG_INFO(\"OFF: Ambient light RGB Common Cathode\");\n#endif\n#ifdef UNPHONE\n            unphone.rgb(0, 0, 0);\n            LOG_INFO(\"OFF: unPhone Ambient lighting\");\n#endif\n            return 0;\n        }\n\n      protected:\n        void setLighting(float current, uint8_t red, uint8_t green, uint8_t blue)\n        {\n#ifdef HAS_NCP5623\n            rgb.setCurrent(current);\n            rgb.setRed(red);\n            rgb.setGreen(green);\n            rgb.setBlue(blue);\n            LOG_DEBUG(\"Init NCP5623 Ambient light w/ current=%f, red=%d, green=%d, blue=%d\", current, red, green, blue);\n#endif\n#ifdef HAS_LP5562\n            rgbw.setCurrent(current);\n            rgbw.setRed(red);\n            rgbw.setGreen(green);\n            rgbw.setBlue(blue);\n            LOG_DEBUG(\"Init LP5562 Ambient light w/ current=%f, red=%d, green=%d, blue=%d\", current, red, green, blue);\n#endif\n#ifdef HAS_NEOPIXEL\n            pixels.fill(pixels.Color(red, green, blue), 0, NEOPIXEL_COUNT);\n\n// RadioMaster Bandit has addressable LED at the two buttons\n// this allow us to set different lighting for them in variant.h file.\n#if defined(BUTTON1_COLOR) && defined(BUTTON1_COLOR_INDEX)\n            pixels.fill(BUTTON1_COLOR, BUTTON1_COLOR_INDEX, 1);\n#endif\n#if defined(BUTTON2_COLOR) && defined(BUTTON2_COLOR_INDEX)\n            pixels.fill(BUTTON2_COLOR, BUTTON2_COLOR_INDEX, 1);\n#endif\n            pixels.show();\n            // LOG_DEBUG(\"Init NeoPixel Ambient light w/ brightness(current)=%f, red=%d, green=%d, blue=%d\",\n            //        current, red, green, blue);\n#endif\n#ifdef RGBLED_CA\n            analogWrite(RGBLED_RED, 255 - red);\n            analogWrite(RGBLED_GREEN, 255 - green);\n            analogWrite(RGBLED_BLUE, 255 - blue);\n            LOG_DEBUG(\"Init Ambient light RGB Common Anode w/ red=%d, green=%d, blue=%d\", red, green, blue);\n#elif defined(RGBLED_RED)\n        analogWrite(RGBLED_RED, red);\n        analogWrite(RGBLED_GREEN, green);\n        analogWrite(RGBLED_BLUE, blue);\n        LOG_DEBUG(\"Init Ambient light RGB Common Cathode w/ red=%d, green=%d, blue=%d\", red, green, blue);\n#endif\n#ifdef UNPHONE\n            unphone.rgb(red, green, blue);\n            LOG_DEBUG(\"Init unPhone Ambient light w/ red=%d, green=%d, blue=%d\", red, green, blue);\n#endif\n        }\n    };\n#endif // AMBIENTLIGHTINGTHREAD_H"
  },
  {
    "path": "src/AudioThread.h",
    "content": "#pragma once\n#include \"PowerFSM.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"sleep.h\"\n#include <memory>\n\n#ifdef HAS_I2S\n#include <AudioFileSourcePROGMEM.h>\n#include <AudioGeneratorRTTTL.h>\n#include <AudioOutputI2S.h>\n#include <ESP8266SAM.h>\n\n#ifdef USE_XL9555\n#include \"ExtensionIOXL9555.hpp\"\nextern ExtensionIOXL9555 io;\n#endif\n\n#define AUDIO_THREAD_INTERVAL_MS 100\n\nclass AudioThread : public concurrency::OSThread\n{\n  public:\n    AudioThread() : OSThread(\"Audio\") { initOutput(); }\n\n    void beginRttl(const void *data, uint32_t len)\n    {\n#ifdef T_LORA_PAGER\n        io.digitalWrite(EXPANDS_AMP_EN, HIGH);\n#endif\n        setCPUFast(true);\n        rtttlFile = std::unique_ptr<AudioFileSourcePROGMEM>(new AudioFileSourcePROGMEM(data, len));\n        i2sRtttl = std::unique_ptr<AudioGeneratorRTTTL>(new AudioGeneratorRTTTL());\n        i2sRtttl->begin(rtttlFile.get(), audioOut.get());\n    }\n\n    // Also handles actually playing the RTTTL, needs to be called in loop\n    bool isPlaying()\n    {\n        if (i2sRtttl != nullptr) {\n            return i2sRtttl->isRunning() && i2sRtttl->loop();\n        }\n        return false;\n    }\n\n    void stop()\n    {\n        if (i2sRtttl != nullptr) {\n            i2sRtttl->stop();\n            i2sRtttl = nullptr;\n        }\n\n        rtttlFile = nullptr;\n\n        setCPUFast(false);\n#ifdef T_LORA_PAGER\n        io.digitalWrite(EXPANDS_AMP_EN, LOW);\n#endif\n    }\n\n    void readAloud(const char *text)\n    {\n        if (i2sRtttl != nullptr) {\n            i2sRtttl->stop();\n            i2sRtttl = nullptr;\n        }\n\n#ifdef T_LORA_PAGER\n        io.digitalWrite(EXPANDS_AMP_EN, HIGH);\n#endif\n        auto sam = std::unique_ptr<ESP8266SAM>(new ESP8266SAM);\n        sam->Say(audioOut.get(), text);\n        setCPUFast(false);\n#ifdef T_LORA_PAGER\n        io.digitalWrite(EXPANDS_AMP_EN, LOW);\n#endif\n    }\n\n  protected:\n    int32_t runOnce() override\n    {\n        canSleep = true; // Assume we should not keep the board awake\n\n        // if (i2sRtttl != nullptr && i2sRtttl->isRunning()) {\n        //     i2sRtttl->loop();\n        // }\n        return AUDIO_THREAD_INTERVAL_MS;\n    }\n\n  private:\n    void initOutput()\n    {\n        audioOut = std::unique_ptr<AudioOutputI2S>(new AudioOutputI2S(1, AudioOutputI2S::EXTERNAL_I2S));\n        audioOut->SetPinout(DAC_I2S_BCK, DAC_I2S_WS, DAC_I2S_DOUT, DAC_I2S_MCLK);\n        audioOut->SetGain(0.2);\n    };\n\n    std::unique_ptr<AudioGeneratorRTTTL> i2sRtttl = nullptr;\n    std::unique_ptr<AudioOutputI2S> audioOut = nullptr;\n\n    std::unique_ptr<AudioFileSourcePROGMEM> rtttlFile = nullptr;\n};\n\n#endif\n"
  },
  {
    "path": "src/BluetoothCommon.cpp",
    "content": "#include \"BluetoothCommon.h\"\n#include \"configuration.h\"\n\n// NRF52 wants these constants as byte arrays\n// Generated here https://yupana-engineering.com/online-uuid-to-c-array-converter - but in REVERSE BYTE ORDER\nconst uint8_t MESH_SERVICE_UUID_16[16u] = {0xfd, 0xea, 0x73, 0xe2, 0xca, 0x5d, 0xa8, 0x9f,\n                                           0x1f, 0x46, 0xa8, 0x15, 0x18, 0xb2, 0xa1, 0x6b};\nconst uint8_t TORADIO_UUID_16[16u] = {0xe7, 0x01, 0x44, 0x12, 0x66, 0x78, 0xdd, 0xa1,\n                                      0xad, 0x4d, 0x9e, 0x12, 0xd2, 0x76, 0x5c, 0xf7};\nconst uint8_t FROMRADIO_UUID_16[16u] = {0x02, 0x00, 0x12, 0xac, 0x42, 0x02, 0x78, 0xb8,\n                                        0xed, 0x11, 0x93, 0x49, 0x9e, 0xe6, 0x55, 0x2c};\nconst uint8_t FROMNUM_UUID_16[16u] = {0x53, 0x44, 0xe3, 0x47, 0x75, 0xaa, 0x70, 0xa6,\n                                      0x66, 0x4f, 0x00, 0xa8, 0x8c, 0xa1, 0x9d, 0xed};\nconst uint8_t LEGACY_LOGRADIO_UUID_16[16u] = {0xe2, 0xf2, 0x1e, 0xbe, 0xc5, 0x15, 0xcf, 0xaa,\n                                              0x6b, 0x43, 0xfa, 0x78, 0x38, 0xd2, 0x6f, 0x6c};\nconst uint8_t LOGRADIO_UUID_16[16u] = {0x47, 0x95, 0xDF, 0x8C, 0xDE, 0xE9, 0x44, 0x99,\n                                       0x23, 0x44, 0xE6, 0x06, 0x49, 0x6E, 0x3D, 0x5A};"
  },
  {
    "path": "src/BluetoothCommon.h",
    "content": "#pragma once\n\n#include <Arduino.h>\n\n/**\n * Common lib functions for all platforms that have bluetooth\n */\n\n#define MESH_SERVICE_UUID \"6ba1b218-15a8-461f-9fa8-5dcae273eafd\"\n\n#define TORADIO_UUID \"f75c76d2-129e-4dad-a1dd-7866124401e7\"\n#define FROMRADIO_UUID \"2c55e69e-4993-11ed-b878-0242ac120002\"\n#define FROMNUM_UUID \"ed9da18c-a800-4f66-a670-aa7547e34453\"\n#define LEGACY_LOGRADIO_UUID \"6c6fd238-78fa-436b-aacf-15c5be1ef2e2\"\n#define LOGRADIO_UUID \"5a3d6e49-06e6-4423-9944-e9de8cdf9547\"\n\n// NRF52 wants these constants as byte arrays\n// Generated here https://yupana-engineering.com/online-uuid-to-c-array-converter - but in REVERSE BYTE ORDER\nextern const uint8_t MESH_SERVICE_UUID_16[], TORADIO_UUID_16[16u], FROMRADIO_UUID_16[], FROMNUM_UUID_16[], LOGRADIO_UUID_16[];\n\n/// Given a level between 0-100, update the BLE attribute\nvoid updateBatteryLevel(uint8_t level);\n\nclass BluetoothApi\n{\n  public:\n    virtual void setup();\n    virtual void shutdown();\n    virtual void clearBonds();\n    virtual bool isConnected();\n    virtual int getRssi() = 0;\n};"
  },
  {
    "path": "src/BluetoothStatus.h",
    "content": "#pragma once\n#include \"Status.h\"\n#include \"assert.h\"\n#include \"configuration.h\"\n#include \"meshUtils.h\"\n#include <Arduino.h>\n\nnamespace meshtastic\n{\n\n// Describes the state of the Bluetooth connection\n// Allows display to handle pairing events without each UI needing to explicitly hook the Bluefruit / NimBLE code\nclass BluetoothStatus : public Status\n{\n  public:\n    enum class ConnectionState {\n        DISCONNECTED,\n        PAIRING,\n        CONNECTED,\n    };\n\n  private:\n    CallbackObserver<BluetoothStatus, const BluetoothStatus *> statusObserver =\n        CallbackObserver<BluetoothStatus, const BluetoothStatus *>(this, &BluetoothStatus::updateStatus);\n\n    ConnectionState state = ConnectionState::DISCONNECTED;\n    std::string passkey; // Stored as string, because Bluefruit allows passkeys with a leading zero\n\n  public:\n    BluetoothStatus() { statusType = STATUS_TYPE_BLUETOOTH; }\n\n    // New BluetoothStatus: connected or disconnected\n    explicit BluetoothStatus(ConnectionState state)\n    {\n        assert(state != ConnectionState::PAIRING); // If pairing, use constructor which specifies passkey\n        statusType = STATUS_TYPE_BLUETOOTH;\n        this->state = state;\n    }\n\n    // New BluetoothStatus: pairing, with passkey\n    explicit BluetoothStatus(const std::string &passkey) : Status()\n    {\n        statusType = STATUS_TYPE_BLUETOOTH;\n        this->state = ConnectionState::PAIRING;\n        this->passkey = passkey;\n    }\n\n    ConnectionState getConnectionState() const { return this->state; }\n\n    std::string getPasskey() const\n    {\n        assert(state == ConnectionState::PAIRING);\n        return this->passkey;\n    }\n\n    void observe(Observable<const BluetoothStatus *> *source) { statusObserver.observe(source); }\n\n    bool matches(const BluetoothStatus *newStatus) const\n    {\n        if (this->state == newStatus->getConnectionState()) {\n            // Same state: CONNECTED / DISCONNECTED\n            if (this->state != ConnectionState::PAIRING)\n                return true;\n            // Same state: PAIRING, and passkey matches\n            else if (this->getPasskey() == newStatus->getPasskey())\n                return true;\n        }\n\n        return false;\n    }\n\n    int updateStatus(const BluetoothStatus *newStatus)\n    {\n        // Has the status changed?\n        if (!matches(newStatus)) {\n            // Copy the members\n            state = newStatus->getConnectionState();\n            if (state == ConnectionState::PAIRING)\n                passkey = newStatus->getPasskey();\n\n            // Tell anyone interested that we have an update\n            onNewStatus.notifyObservers(this);\n\n            // Debug only:\n            switch (state) {\n            case ConnectionState::PAIRING:\n                LOG_DEBUG(\"BluetoothStatus PAIRING, key=%s\", passkey.c_str());\n                break;\n            case ConnectionState::CONNECTED:\n                LOG_DEBUG(\"BluetoothStatus CONNECTED\");\n#ifdef BLE_LED\n                digitalWrite(BLE_LED, LED_STATE_ON);\n#endif\n                break;\n\n            case ConnectionState::DISCONNECTED:\n                LOG_DEBUG(\"BluetoothStatus DISCONNECTED\");\n#ifdef BLE_LED\n                digitalWrite(BLE_LED, LED_STATE_OFF);\n#endif\n                break;\n            }\n        }\n\n        return 0;\n    }\n};\n\n} // namespace meshtastic\n\nextern meshtastic::BluetoothStatus *bluetoothStatus;\n"
  },
  {
    "path": "src/DebugConfiguration.cpp",
    "content": "/* based on https://github.com/arcao/Syslog\n\nMIT License\n\nCopyright (c) 2016 Martin Sloup\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.*/\n\n#include \"configuration.h\"\n\n#include \"DebugConfiguration.h\"\n\n#ifdef ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\n/// A C wrapper for LOG_DEBUG that can be used from arduino C libs that don't know about C++ or meshtastic\nextern \"C\" void logLegacy(const char *level, const char *fmt, ...)\n{\n    va_list args;\n    va_start(args, fmt);\n    if (console)\n        console->vprintf(level, fmt, args);\n    va_end(args);\n}\n\n#if HAS_NETWORKING\nnamespace meshtastic\n{\nSyslog::Syslog(UDP &client)\n{\n    this->_client = &client;\n    this->_server = NULL;\n    this->_port = 0;\n    this->_deviceHostname = SYSLOG_NILVALUE;\n    this->_appName = SYSLOG_NILVALUE;\n    this->_priDefault = LOGLEVEL_KERN;\n}\n\nSyslog &Syslog::server(const char *server, uint16_t port)\n{\n    if (this->_ip.fromString(server)) {\n        this->_server = NULL;\n    } else {\n        this->_server = server;\n    }\n    this->_port = port;\n    return *this;\n}\n\nSyslog &Syslog::server(IPAddress ip, uint16_t port)\n{\n    this->_ip = ip;\n    this->_server = NULL;\n    this->_port = port;\n    return *this;\n}\n\nSyslog &Syslog::deviceHostname(const char *deviceHostname)\n{\n    this->_deviceHostname = (deviceHostname == NULL) ? SYSLOG_NILVALUE : deviceHostname;\n    return *this;\n}\n\nSyslog &Syslog::appName(const char *appName)\n{\n    this->_appName = (appName == NULL) ? SYSLOG_NILVALUE : appName;\n    return *this;\n}\n\nSyslog &Syslog::defaultPriority(uint16_t pri)\n{\n    this->_priDefault = pri;\n    return *this;\n}\n\nSyslog &Syslog::logMask(uint8_t priMask)\n{\n    this->_priMask = priMask;\n    return *this;\n}\n\nvoid Syslog::enable()\n{\n    this->_client->begin(this->_port);\n    this->_enabled = true;\n}\n\nvoid Syslog::disable()\n{\n    this->_enabled = false;\n    this->_client->stop();\n}\n\nbool Syslog::isEnabled()\n{\n    return this->_enabled;\n}\n\nbool Syslog::vlogf(uint16_t pri, const char *fmt, va_list args)\n{\n    return this->vlogf(pri, this->_appName, fmt, args);\n}\n\nbool Syslog::vlogf(uint16_t pri, const char *appName, const char *fmt, va_list args)\n{\n    char *message;\n    size_t initialLen;\n    size_t len;\n    bool result;\n\n    initialLen = strlen(fmt);\n\n    message = new char[initialLen + 1];\n\n    len = vsnprintf(message, initialLen + 1, fmt, args);\n    if (len > initialLen) {\n        delete[] message;\n        message = new char[len + 1];\n\n        vsnprintf(message, len + 1, fmt, args);\n    }\n\n    result = this->_sendLog(pri, appName, message);\n\n    delete[] message;\n    return result;\n}\n\ninline bool Syslog::_sendLog(uint16_t pri, const char *appName, const char *message)\n{\n    int result;\n#ifdef ARCH_PORTDUINO\n    bool utf = !portduino_config.ascii_logs;\n#else\n    bool utf = true;\n#endif\n\n    if (!this->_enabled)\n        return false;\n\n    if ((this->_server == NULL && this->_ip == INADDR_NONE) || this->_port == 0)\n        return false;\n\n    // Check priority against priMask values.\n    if ((LOG_MASK(LOG_PRI(pri)) & this->_priMask) == 0)\n        return true;\n\n    // Set default facility if none specified.\n    if ((pri & LOG_FACMASK) == 0)\n        pri = LOG_MAKEPRI(LOG_FAC(this->_priDefault), pri);\n\n    if (this->_server != NULL) {\n        result = this->_client->beginPacket(this->_server, this->_port);\n    } else {\n        result = this->_client->beginPacket(this->_ip, this->_port);\n    }\n\n    if (result != 1)\n        return false;\n\n    this->_client->print('<');\n    this->_client->print(pri);\n    this->_client->print(F(\">1 - \"));\n    this->_client->print(this->_deviceHostname);\n    this->_client->print(' ');\n    this->_client->print(appName);\n    this->_client->print(F(\" - - - \"));\n    if (utf) {\n        this->_client->print(F(\"\\xEF\\xBB\\xBF\"));\n    } else {\n        this->_client->print(F(\" \"));\n    }\n    this->_client->print(F(\"[\"));\n    this->_client->print(int(millis() / 1000));\n    this->_client->print(F(\"]: \"));\n    this->_client->print(message);\n    this->_client->endPacket();\n\n    return true;\n}\n\n}; // namespace meshtastic\n\n#endif\n"
  },
  {
    "path": "src/DebugConfiguration.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n// Forward declarations\n#if defined(DEBUG_HEAP)\nclass MemGet;\nextern MemGet memGet;\n#endif\n\n// DEBUG LED\n#ifndef LED_STATE_ON\n#define LED_STATE_ON 1\n#endif\n\n// -----------------------------------------------------------------------------\n// DEBUG\n// -----------------------------------------------------------------------------\n\n#ifdef CONSOLE_MAX_BAUD\n#define SERIAL_BAUD CONSOLE_MAX_BAUD\n#else\n#define SERIAL_BAUD 115200 // Serial debug baud rate\n#endif\n\n#define MESHTASTIC_LOG_LEVEL_DEBUG \"DEBUG\"\n#define MESHTASTIC_LOG_LEVEL_INFO \"INFO \"\n#define MESHTASTIC_LOG_LEVEL_WARN \"WARN \"\n#define MESHTASTIC_LOG_LEVEL_ERROR \"ERROR\"\n#define MESHTASTIC_LOG_LEVEL_CRIT \"CRIT \"\n#define MESHTASTIC_LOG_LEVEL_TRACE \"TRACE\"\n#define MESHTASTIC_LOG_LEVEL_HEAP \"HEAP\"\n\n#include \"SerialConsole.h\"\n\n// If defined we will include support for ARM ICE \"semihosting\" for a virtual\n// console over the JTAG port (to replace the normal serial port)\n// Note: Normally this flag is passed into the gcc commandline by platformio.ini.\n// for an example see env:rak4631_dap.\n// #ifndef USE_SEMIHOSTING\n// #define USE_SEMIHOSTING\n// #endif\n\n#define DEBUG_PORT (*console) // Serial debug port\n\n#ifdef USE_SEGGER\n// #undef DEBUG_PORT\n#define LOG_DEBUG(...) SEGGER_RTT_printf(0, __VA_ARGS__)\n#define LOG_INFO(...) SEGGER_RTT_printf(0, __VA_ARGS__)\n#define LOG_WARN(...) SEGGER_RTT_printf(0, __VA_ARGS__)\n#define LOG_ERROR(...) SEGGER_RTT_printf(0, __VA_ARGS__)\n#define LOG_CRIT(...) SEGGER_RTT_printf(0, __VA_ARGS__)\n#define LOG_TRACE(...) SEGGER_RTT_printf(0, __VA_ARGS__)\n#else\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n#define LOG_DEBUG(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_DEBUG, __VA_ARGS__)\n#define LOG_INFO(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_INFO, __VA_ARGS__)\n#define LOG_WARN(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_WARN, __VA_ARGS__)\n#define LOG_ERROR(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_ERROR, __VA_ARGS__)\n#define LOG_CRIT(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_CRIT, __VA_ARGS__)\n#define LOG_TRACE(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_TRACE, __VA_ARGS__)\n#else\n#define LOG_DEBUG(...)\n#define LOG_INFO(...)\n#define LOG_WARN(...)\n#define LOG_ERROR(...)\n#define LOG_CRIT(...)\n#define LOG_TRACE(...)\n#endif\n#endif\n\n#if defined(DEBUG_HEAP)\n#define LOG_HEAP(...) DEBUG_PORT.log(MESHTASTIC_LOG_LEVEL_HEAP, __VA_ARGS__)\n\n// Macro-based heap debugging\n#define DEBUG_HEAP_BEFORE auto heapBefore = memGet.getFreeHeap();\n#define DEBUG_HEAP_AFTER(context, ptr)                                                                                           \\\n    do {                                                                                                                         \\\n        auto heapAfter = memGet.getFreeHeap();                                                                                   \\\n        if (heapBefore != heapAfter) {                                                                                           \\\n            LOG_HEAP(\"Alloc in %s pointer 0x%x, size: %u, free: %u\", context, ptr, heapBefore - heapAfter, heapAfter);           \\\n        }                                                                                                                        \\\n    } while (0)\n\n#else\n#define LOG_HEAP(...)\n#define DEBUG_HEAP_BEFORE\n#define DEBUG_HEAP_AFTER(context, ptr)\n#endif\n\n/// A C wrapper for LOG_DEBUG that can be used from arduino C libs that don't know about C++ or meshtastic\nextern \"C\" void logLegacy(const char *level, const char *fmt, ...);\n\n#define SYSLOG_NILVALUE \"-\"\n\n#define SYSLOG_CRIT 2  /* critical conditions */\n#define SYSLOG_ERR 3   /* error conditions */\n#define SYSLOG_WARN 4  /* warning conditions */\n#define SYSLOG_INFO 6  /* informational */\n#define SYSLOG_DEBUG 7 /* debug-level messages */\n// trace does not go out to syslog (yet?)\n\n#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */\n                         /* extract priority */\n#define LOG_PRI(p) ((p)&LOG_PRIMASK)\n#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))\n\n/* facility codes */\n#define LOGLEVEL_KERN (0 << 3)      /* kernel messages */\n#define LOGLEVEL_USER (1 << 3)      /* random user-level messages */\n#define LOGLEVEL_MAIL (2 << 3)      /* mail system */\n#define LOGLEVEL_DAEMON (3 << 3)    /* system daemons */\n#define LOGLEVEL_AUTH (4 << 3)      /* security/authorization messages */\n#define LOGLEVEL_SYSLOG (5 << 3)    /* messages generated internally by syslogd */\n#define LOGLEVEL_LPR (6 << 3)       /* line printer subsystem */\n#define LOGLEVEL_NEWS (7 << 3)      /* network news subsystem */\n#define LOGLEVEL_UUCP (8 << 3)      /* UUCP subsystem */\n#define LOGLEVEL_CRON (9 << 3)      /* clock daemon */\n#define LOGLEVEL_AUTHPRIV (10 << 3) /* security/authorization messages (private) */\n#define LOGLEVEL_FTP (11 << 3)      /* ftp daemon */\n\n/* other codes through 15 reserved for system use */\n#define LOGLEVEL_LOCAL0 (16 << 3) /* reserved for local use */\n#define LOGLEVEL_LOCAL1 (17 << 3) /* reserved for local use */\n#define LOGLEVEL_LOCAL2 (18 << 3) /* reserved for local use */\n#define LOGLEVEL_LOCAL3 (19 << 3) /* reserved for local use */\n#define LOGLEVEL_LOCAL4 (20 << 3) /* reserved for local use */\n#define LOGLEVEL_LOCAL5 (21 << 3) /* reserved for local use */\n#define LOGLEVEL_LOCAL6 (22 << 3) /* reserved for local use */\n#define LOGLEVEL_LOCAL7 (23 << 3) /* reserved for local use */\n\n#define LOG_NFACILITIES 24 /* current number of facilities */\n#define LOG_FACMASK 0x03f8 /* mask to extract facility part */\n                           /* facility of pri */\n#define LOG_FAC(p) (((p)&LOG_FACMASK) >> 3)\n\n#define LOG_MASK(pri) (1 << (pri))             /* mask for one priority */\n#define LOG_UPTO(pri) ((1 << ((pri) + 1)) - 1) /* all priorities through pri */\n\n// -----------------------------------------------------------------------------\n// AXP192 (Rev1-specific options)\n// -----------------------------------------------------------------------------\n\n#define GPS_POWER_CTRL_CH 3\n#define LORA_POWER_CTRL_CH 2\n\n// Default Bluetooth PIN\n#define defaultBLEPin 123456\n\n#if HAS_ETHERNET && !defined(USE_WS5500)\n#include <RAK13800_W5100S.h>\n#endif // HAS_ETHERNET\n\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n\n#if HAS_WIFI\n#include <WiFi.h>\n#endif // HAS_WIFI\n\n#if HAS_NETWORKING\n\nnamespace meshtastic\n{\nclass Syslog\n{\n  private:\n    UDP *_client;\n    IPAddress _ip;\n    const char *_server;\n    uint16_t _port;\n    const char *_deviceHostname;\n    const char *_appName;\n    uint16_t _priDefault;\n    uint8_t _priMask = 0xff;\n    bool _enabled = false;\n\n    bool _sendLog(uint16_t pri, const char *appName, const char *message);\n\n  public:\n    explicit Syslog(UDP &client);\n\n    Syslog &server(const char *server, uint16_t port);\n    Syslog &server(IPAddress ip, uint16_t port);\n    Syslog &deviceHostname(const char *deviceHostname);\n    Syslog &appName(const char *appName);\n    Syslog &defaultPriority(uint16_t pri = LOGLEVEL_KERN);\n    Syslog &logMask(uint8_t priMask);\n\n    void enable();\n    void disable();\n    bool isEnabled();\n\n    bool vlogf(uint16_t pri, const char *fmt, va_list args) __attribute__((format(printf, 3, 0)));\n    bool vlogf(uint16_t pri, const char *appName, const char *fmt, va_list args) __attribute__((format(printf, 3, 0)));\n};\n\n}; // namespace meshtastic\n\n#endif // HAS_NETWORKING\n"
  },
  {
    "path": "src/DisplayFormatters.cpp",
    "content": "#include \"DisplayFormatters.h\"\n\nconst char *DisplayFormatters::getModemPresetDisplayName(meshtastic_Config_LoRaConfig_ModemPreset preset, bool useShortName,\n                                                         bool usePreset)\n{\n\n    // If use_preset is false, always return \"Custom\"\n    if (!usePreset) {\n        return \"Custom\";\n    }\n\n    switch (preset) {\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:\n        return useShortName ? \"ShortT\" : \"ShortTurbo\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:\n        return useShortName ? \"ShortS\" : \"ShortSlow\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:\n        return useShortName ? \"ShortF\" : \"ShortFast\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:\n        return useShortName ? \"MedS\" : \"MediumSlow\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:\n        return useShortName ? \"MedF\" : \"MediumFast\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:\n        return useShortName ? \"LongS\" : \"LongSlow\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST:\n        return useShortName ? \"LongF\" : \"LongFast\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO:\n        return useShortName ? \"LongT\" : \"LongTurbo\";\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:\n        return useShortName ? \"LongM\" : \"LongMod\";\n        break;\n    default:\n        return useShortName ? \"Custom\" : \"Invalid\";\n        break;\n    }\n}\n\nconst char *DisplayFormatters::getDeviceRole(meshtastic_Config_DeviceConfig_Role role)\n{\n    switch (role) {\n    case meshtastic_Config_DeviceConfig_Role_CLIENT:\n        return \"Client\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE:\n        return \"Client Mute\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN:\n        return \"Client Hidden\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_CLIENT_BASE:\n        return \"Client Base\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND:\n        return \"Lost and Found\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_TRACKER:\n        return \"Tracker\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_SENSOR:\n        return \"Sensor\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_TAK:\n        return \"TAK\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_TAK_TRACKER:\n        return \"TAK Tracker\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_ROUTER:\n        return \"Router\";\n        break;\n    case meshtastic_Config_DeviceConfig_Role_ROUTER_LATE:\n        return \"Router Late\";\n        break;\n    default:\n        return \"Unknown\";\n        break;\n    }\n}"
  },
  {
    "path": "src/DisplayFormatters.h",
    "content": "#pragma once\n#include \"NodeDB.h\"\n\nclass DisplayFormatters\n{\n  public:\n    static const char *getModemPresetDisplayName(meshtastic_Config_LoRaConfig_ModemPreset preset, bool useShortName,\n                                                 bool usePreset);\n    static const char *getDeviceRole(meshtastic_Config_DeviceConfig_Role role);\n};\n"
  },
  {
    "path": "src/FSCommon.cpp",
    "content": "/**\n * @file FSCommon.cpp\n * @brief This file contains functions for common filesystem operations such as copying, renaming, listing and deleting files and\n * directories.\n *\n * The functions in this file are used to perform common filesystem operations such as copying, renaming, listing and deleting\n * files and directories. These functions are used in the Meshtastic-device project to manage files and directories on the\n * device's filesystem.\n *\n */\n#include \"FSCommon.h\"\n#include \"SPILock.h\"\n#include \"configuration.h\"\n\n// Software SPI is used by MUI so disable SD card here until it's also implemented\n#if defined(HAS_SDCARD) && !defined(SDCARD_USE_SOFT_SPI)\n#include <SD.h>\n#include <SPI.h>\n\n#ifdef SDCARD_USE_SPI1\nSPIClass SPI_HSPI(HSPI);\n#define SDHandler SPI_HSPI\n#else\n#define SDHandler SPI\n#endif\n\n#ifndef SD_SPI_FREQUENCY\n#define SD_SPI_FREQUENCY 4000000U\n#endif\n\n#endif // HAS_SDCARD\n\n/**\n * @brief Copies a file from one location to another.\n *\n * @param from The path of the source file.\n * @param to The path of the destination file.\n * @return true if the file was successfully copied, false otherwise.\n */\nbool copyFile(const char *from, const char *to)\n{\n#ifdef FSCom\n    // take SPI Lock\n    concurrency::LockGuard g(spiLock);\n    unsigned char cbuffer[16];\n\n    File f1 = FSCom.open(from, FILE_O_READ);\n    if (!f1) {\n        LOG_ERROR(\"Failed to open source file %s\", from);\n        return false;\n    }\n\n    File f2 = FSCom.open(to, FILE_O_WRITE);\n    if (!f2) {\n        LOG_ERROR(\"Failed to open destination file %s\", to);\n        return false;\n    }\n\n    while (f1.available() > 0) {\n        byte i = f1.read(cbuffer, 16);\n        f2.write(cbuffer, i);\n    }\n\n    f2.flush();\n    f2.close();\n    f1.close();\n    return true;\n#endif\n}\n\n/**\n * Renames a file from pathFrom to pathTo.\n *\n * @param pathFrom The original path of the file.\n * @param pathTo The new path of the file.\n *\n * @return True if the file was successfully renamed, false otherwise.\n */\nbool renameFile(const char *pathFrom, const char *pathTo)\n{\n#ifdef FSCom\n\n#ifdef ARCH_ESP32\n    // take SPI Lock\n    spiLock->lock();\n    // rename was fixed for ESP32 IDF LittleFS in April\n    bool result = FSCom.rename(pathFrom, pathTo);\n    spiLock->unlock();\n    return result;\n#else\n    // copyFile does its own locking.\n    if (copyFile(pathFrom, pathTo) && FSCom.remove(pathFrom)) {\n        return true;\n    } else {\n        return false;\n    }\n#endif\n\n#endif\n}\n\n#include <vector>\n\n/**\n * @brief Get the list of files in a directory.\n *\n * This function returns a list of files in a directory. The list includes the full path of each file.\n * We can't use SPILOCK here because of recursion. Callers of this function should use SPILOCK.\n *\n * @param dirname The name of the directory.\n * @param levels The number of levels of subdirectories to list.\n * @return A vector of strings containing the full path of each file in the directory.\n */\nstd::vector<meshtastic_FileInfo> getFiles(const char *dirname, uint8_t levels)\n{\n    std::vector<meshtastic_FileInfo> filenames = {};\n#ifdef FSCom\n    File root = FSCom.open(dirname, FILE_O_READ);\n    if (!root)\n        return filenames;\n    if (!root.isDirectory())\n        return filenames;\n\n    File file = root.openNextFile();\n    while (file) {\n        if (file.isDirectory() && !String(file.name()).endsWith(\".\")) {\n            if (levels) {\n#ifdef ARCH_ESP32\n                std::vector<meshtastic_FileInfo> subDirFilenames = getFiles(file.path(), levels - 1);\n#else\n                std::vector<meshtastic_FileInfo> subDirFilenames = getFiles(file.name(), levels - 1);\n#endif\n                filenames.insert(filenames.end(), subDirFilenames.begin(), subDirFilenames.end());\n                file.close();\n            }\n        } else {\n            meshtastic_FileInfo fileInfo = {\"\", static_cast<uint32_t>(file.size())};\n#ifdef ARCH_ESP32\n            strcpy(fileInfo.file_name, file.path());\n#else\n            strcpy(fileInfo.file_name, file.name());\n#endif\n            if (!String(fileInfo.file_name).endsWith(\".\")) {\n                filenames.push_back(fileInfo);\n            }\n            file.close();\n        }\n        file = root.openNextFile();\n    }\n    root.close();\n#endif\n    return filenames;\n}\n\n/**\n * Lists the contents of a directory.\n * We can't use SPILOCK here because of recursion. Callers of this function should use SPILOCK.\n *\n * @param dirname The name of the directory to list.\n * @param levels The number of levels of subdirectories to list.\n * @param del Whether or not to delete the contents of the directory after listing.\n */\nvoid listDir(const char *dirname, uint8_t levels, bool del)\n{\n#ifdef FSCom\n#if (defined(ARCH_ESP32) || defined(ARCH_RP2040) || defined(ARCH_PORTDUINO))\n    char buffer[255];\n#endif\n    File root = FSCom.open(dirname, FILE_O_READ);\n    if (!root) {\n        return;\n    }\n    if (!root.isDirectory()) {\n        return;\n    }\n\n    File file = root.openNextFile();\n    while (\n        file &&\n        file.name()[0]) { // This file.name() check is a workaround for a bug in the Adafruit LittleFS nrf52 glue (see issue 4395)\n        if (file.isDirectory() && !String(file.name()).endsWith(\".\")) {\n            if (levels) {\n#ifdef ARCH_ESP32\n                listDir(file.path(), levels - 1, del);\n                if (del) {\n                    LOG_DEBUG(\"Remove %s\", file.path());\n                    strncpy(buffer, file.path(), sizeof(buffer));\n                    file.close();\n                    FSCom.rmdir(buffer);\n                } else {\n                    file.close();\n                }\n#elif (defined(ARCH_RP2040) || defined(ARCH_PORTDUINO))\n                listDir(file.name(), levels - 1, del);\n                if (del) {\n                    LOG_DEBUG(\"Remove %s\", file.name());\n                    strncpy(buffer, file.name(), sizeof(buffer));\n                    file.close();\n                    FSCom.rmdir(buffer);\n                } else {\n                    file.close();\n                }\n#else\n                LOG_DEBUG(\" %s (directory)\", file.name());\n                listDir(file.name(), levels - 1, del);\n                file.close();\n#endif\n            }\n        } else {\n#ifdef ARCH_ESP32\n            if (del) {\n                LOG_DEBUG(\"Delete %s\", file.path());\n                strncpy(buffer, file.path(), sizeof(buffer));\n                file.close();\n                FSCom.remove(buffer);\n            } else {\n                LOG_DEBUG(\" %s (%i Bytes)\", file.path(), file.size());\n                file.close();\n            }\n#elif (defined(ARCH_RP2040) || defined(ARCH_PORTDUINO))\n            if (del) {\n                LOG_DEBUG(\"Delete %s\", file.name());\n                strncpy(buffer, file.name(), sizeof(buffer));\n                file.close();\n                FSCom.remove(buffer);\n            } else {\n                LOG_DEBUG(\" %s (%i Bytes)\", file.name(), file.size());\n                file.close();\n            }\n#else\n            LOG_DEBUG(\"   %s (%i Bytes)\", file.name(), file.size());\n            file.close();\n#endif\n        }\n        file = root.openNextFile();\n    }\n#ifdef ARCH_ESP32\n    if (del) {\n        LOG_DEBUG(\"Remove %s\", root.path());\n        strncpy(buffer, root.path(), sizeof(buffer));\n        root.close();\n        FSCom.rmdir(buffer);\n    } else {\n        root.close();\n    }\n#elif (defined(ARCH_RP2040) || defined(ARCH_PORTDUINO))\n    if (del) {\n        LOG_DEBUG(\"Remove %s\", root.name());\n        strncpy(buffer, root.name(), sizeof(buffer));\n        root.close();\n        FSCom.rmdir(buffer);\n    } else {\n        root.close();\n    }\n#else\n    root.close();\n#endif\n#endif\n}\n\n/**\n * @brief Removes a directory and all its contents.\n *\n * This function recursively removes a directory and all its contents, including subdirectories and files.\n *\n * @param dirname The name of the directory to remove.\n */\nvoid rmDir(const char *dirname)\n{\n#ifdef FSCom\n\n#if (defined(ARCH_ESP32) || defined(ARCH_RP2040) || defined(ARCH_PORTDUINO))\n    listDir(dirname, 10, true);\n#elif defined(ARCH_NRF52)\n    // nRF52 implementation of LittleFS has a recursive delete function\n    FSCom.rmdir_r(dirname);\n#endif\n\n#endif\n}\n\n/**\n * Some platforms (nrf52) might need to do an extra step before FSBegin().\n */\n__attribute__((weak, noinline)) void preFSBegin() {}\n\nvoid fsInit()\n{\n#ifdef FSCom\n    concurrency::LockGuard g(spiLock);\n    preFSBegin();\n    if (!FSBegin()) {\n        LOG_ERROR(\"Filesystem mount failed\");\n        // assert(0); This auto-formats the partition, so no need to fail here.\n    }\n#if defined(ARCH_ESP32)\n    LOG_DEBUG(\"Filesystem files (%d/%d Bytes):\", FSCom.usedBytes(), FSCom.totalBytes());\n#else\n    LOG_DEBUG(\"Filesystem files:\");\n#endif\n    listDir(\"/\", 10);\n#endif\n}\n\n/**\n * Initializes the SD card and mounts the file system.\n */\nvoid setupSDCard()\n{\n#if defined(HAS_SDCARD) && !defined(SDCARD_USE_SOFT_SPI)\n    concurrency::LockGuard g(spiLock);\n    SDHandler.begin(SPI_SCK, SPI_MISO, SPI_MOSI);\n    if (!SD.begin(SDCARD_CS, SDHandler, SD_SPI_FREQUENCY)) {\n        LOG_DEBUG(\"No SD_MMC card detected\");\n        return;\n    }\n    uint8_t cardType = SD.cardType();\n    if (cardType == CARD_NONE) {\n        LOG_DEBUG(\"No SD_MMC card attached\");\n        return;\n    }\n    LOG_DEBUG(\"SD_MMC Card Type: \");\n    if (cardType == CARD_MMC) {\n        LOG_DEBUG(\"MMC\");\n    } else if (cardType == CARD_SD) {\n        LOG_DEBUG(\"SDSC\");\n    } else if (cardType == CARD_SDHC) {\n        LOG_DEBUG(\"SDHC\");\n    } else {\n        LOG_DEBUG(\"UNKNOWN\");\n    }\n\n    uint64_t cardSize = SD.cardSize() / (1024 * 1024);\n    LOG_DEBUG(\"SD Card Size: %lu MB\", (uint32_t)cardSize);\n    LOG_DEBUG(\"Total space: %lu MB\", (uint32_t)(SD.totalBytes() / (1024 * 1024)));\n    LOG_DEBUG(\"Used space: %lu MB\", (uint32_t)(SD.usedBytes() / (1024 * 1024)));\n#endif\n}"
  },
  {
    "path": "src/FSCommon.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#include <vector>\n\n// Cross platform filesystem API\n\n#if defined(ARCH_PORTDUINO)\n// Portduino version\n#include \"PortduinoFS.h\"\n#define FSCom PortduinoFS\n#define FSBegin() true\n#define FILE_O_WRITE \"w\"\n#define FILE_O_READ \"r\"\n#endif\n\n#if defined(ARCH_STM32WL)\n// STM32WL\n#include \"LittleFS.h\"\n#define FSCom InternalFS\n#define FSBegin() FSCom.begin()\nusing namespace STM32_LittleFS_Namespace;\n#endif\n\n#if defined(ARCH_RP2040)\n// RP2040\n#include \"LittleFS.h\"\n#define FSCom LittleFS\n#define FSBegin() FSCom.begin() // set autoformat\n#define FILE_O_WRITE \"w\"\n#define FILE_O_READ \"r\"\n#endif\n\n#if defined(ARCH_ESP32)\n// ESP32 version\n#include \"LittleFS.h\"\n#define FSCom LittleFS\n#define FSBegin() FSCom.begin(true) // format on failure\n#define FILE_O_WRITE \"w\"\n#define FILE_O_READ \"r\"\n#endif\n\n#if defined(ARCH_NRF52)\n// NRF52 version\n#include \"InternalFileSystem.h\"\n#define FSCom InternalFS\n#define FSBegin() FSCom.begin() // InternalFS formats on failure\nusing namespace Adafruit_LittleFS_Namespace;\n#endif\n\nvoid fsInit();\nvoid fsListFiles();\nbool copyFile(const char *from, const char *to);\nbool renameFile(const char *pathFrom, const char *pathTo);\nstd::vector<meshtastic_FileInfo> getFiles(const char *dirname, uint8_t levels);\nvoid listDir(const char *dirname, uint8_t levels, bool del = false);\nvoid rmDir(const char *dirname);\nvoid setupSDCard();"
  },
  {
    "path": "src/Fusion/Fusion.h",
    "content": "/**\n * @file Fusion.h\n * @author Seb Madgwick\n * @brief Main header file for the Fusion library.  This is the only file that\n * needs to be included when using the library.\n */\n\n#ifndef FUSION_H\n#define FUSION_H\n\n//------------------------------------------------------------------------------\n// Includes\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"FusionAhrs.h\"\n#include \"FusionAxes.h\"\n#include \"FusionCalibration.h\"\n#include \"FusionCompass.h\"\n#include \"FusionConvention.h\"\n#include \"FusionMath.h\"\n#include \"FusionOffset.h\"\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionAhrs.c",
    "content": "/**\n * @file FusionAhrs.c\n * @author Seb Madgwick\n * @brief AHRS algorithm to combine gyroscope, accelerometer, and magnetometer\n * measurements into a single measurement of orientation relative to the Earth.\n */\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionAhrs.h\"\n#include <float.h> // FLT_MAX\n#include <math.h>  // atan2f, cosf, fabsf, powf, sinf\n\n//------------------------------------------------------------------------------\n// Definitions\n\n/**\n * @brief Initial gain used during the initialisation.\n */\n#define INITIAL_GAIN (10.0f)\n\n/**\n * @brief Initialisation period in seconds.\n */\n#define INITIALISATION_PERIOD (3.0f)\n\n//------------------------------------------------------------------------------\n// Function declarations\n\nstatic inline FusionVector HalfGravity(const FusionAhrs *const ahrs);\n\nstatic inline FusionVector HalfMagnetic(const FusionAhrs *const ahrs);\n\nstatic inline FusionVector Feedback(const FusionVector sensor, const FusionVector reference);\n\nstatic inline int Clamp(const int value, const int min, const int max);\n\n//------------------------------------------------------------------------------\n// Functions\n\n/**\n * @brief Initialises the AHRS algorithm structure.\n * @param ahrs AHRS algorithm structure.\n */\nvoid FusionAhrsInitialise(FusionAhrs *const ahrs)\n{\n    const FusionAhrsSettings settings = {\n        .convention = FusionConventionNwu,\n        .gain = 0.5f,\n        .gyroscopeRange = 0.0f,\n        .accelerationRejection = 90.0f,\n        .magneticRejection = 90.0f,\n        .recoveryTriggerPeriod = 0,\n    };\n    FusionAhrsSetSettings(ahrs, &settings);\n    FusionAhrsReset(ahrs);\n}\n\n/**\n * @brief Resets the AHRS algorithm.  This is equivalent to reinitialising the\n * algorithm while maintaining the current settings.\n * @param ahrs AHRS algorithm structure.\n */\nvoid FusionAhrsReset(FusionAhrs *const ahrs)\n{\n    ahrs->quaternion = FUSION_IDENTITY_QUATERNION;\n    ahrs->accelerometer = FUSION_VECTOR_ZERO;\n    ahrs->initialising = true;\n    ahrs->rampedGain = INITIAL_GAIN;\n    ahrs->angularRateRecovery = false;\n    ahrs->halfAccelerometerFeedback = FUSION_VECTOR_ZERO;\n    ahrs->halfMagnetometerFeedback = FUSION_VECTOR_ZERO;\n    ahrs->accelerometerIgnored = false;\n    ahrs->accelerationRecoveryTrigger = 0;\n    ahrs->accelerationRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod;\n    ahrs->magnetometerIgnored = false;\n    ahrs->magneticRecoveryTrigger = 0;\n    ahrs->magneticRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod;\n}\n\n/**\n * @brief Sets the AHRS algorithm settings.\n * @param ahrs AHRS algorithm structure.\n * @param settings Settings.\n */\nvoid FusionAhrsSetSettings(FusionAhrs *const ahrs, const FusionAhrsSettings *const settings)\n{\n    ahrs->settings.convention = settings->convention;\n    ahrs->settings.gain = settings->gain;\n    ahrs->settings.gyroscopeRange = settings->gyroscopeRange == 0.0f ? FLT_MAX : 0.98f * settings->gyroscopeRange;\n    ahrs->settings.accelerationRejection = settings->accelerationRejection == 0.0f\n                                               ? FLT_MAX\n                                               : powf(0.5f * sinf(FusionDegreesToRadians(settings->accelerationRejection)), 2);\n    ahrs->settings.magneticRejection =\n        settings->magneticRejection == 0.0f ? FLT_MAX : powf(0.5f * sinf(FusionDegreesToRadians(settings->magneticRejection)), 2);\n    ahrs->settings.recoveryTriggerPeriod = settings->recoveryTriggerPeriod;\n    ahrs->accelerationRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod;\n    ahrs->magneticRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod;\n    if ((settings->gain == 0.0f) ||\n        (settings->recoveryTriggerPeriod == 0)) { // disable acceleration and magnetic rejection features if gain is zero\n        ahrs->settings.accelerationRejection = FLT_MAX;\n        ahrs->settings.magneticRejection = FLT_MAX;\n    }\n    if (ahrs->initialising == false) {\n        ahrs->rampedGain = ahrs->settings.gain;\n    }\n    ahrs->rampedGainStep = (INITIAL_GAIN - ahrs->settings.gain) / INITIALISATION_PERIOD;\n}\n\n/**\n * @brief Updates the AHRS algorithm using the gyroscope, accelerometer, and\n * magnetometer measurements.\n * @param ahrs AHRS algorithm structure.\n * @param gyroscope Gyroscope measurement in degrees per second.\n * @param accelerometer Accelerometer measurement in g.\n * @param magnetometer Magnetometer measurement in arbitrary units.\n * @param deltaTime Delta time in seconds.\n */\nvoid FusionAhrsUpdate(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer,\n                      const FusionVector magnetometer, const float deltaTime)\n{\n#define Q ahrs->quaternion.element\n\n    // Store accelerometer\n    ahrs->accelerometer = accelerometer;\n\n    // Reinitialise if gyroscope range exceeded\n    if ((fabsf(gyroscope.axis.x) > ahrs->settings.gyroscopeRange) || (fabsf(gyroscope.axis.y) > ahrs->settings.gyroscopeRange) ||\n        (fabsf(gyroscope.axis.z) > ahrs->settings.gyroscopeRange)) {\n        const FusionQuaternion quaternion = ahrs->quaternion;\n        FusionAhrsReset(ahrs);\n        ahrs->quaternion = quaternion;\n        ahrs->angularRateRecovery = true;\n    }\n\n    // Ramp down gain during initialisation\n    if (ahrs->initialising) {\n        ahrs->rampedGain -= ahrs->rampedGainStep * deltaTime;\n        if ((ahrs->rampedGain < ahrs->settings.gain) || (ahrs->settings.gain == 0.0f)) {\n            ahrs->rampedGain = ahrs->settings.gain;\n            ahrs->initialising = false;\n            ahrs->angularRateRecovery = false;\n        }\n    }\n\n    // Calculate direction of gravity indicated by algorithm\n    const FusionVector halfGravity = HalfGravity(ahrs);\n\n    // Calculate accelerometer feedback\n    FusionVector halfAccelerometerFeedback = FUSION_VECTOR_ZERO;\n    ahrs->accelerometerIgnored = true;\n    if (FusionVectorIsZero(accelerometer) == false) {\n\n        // Calculate accelerometer feedback scaled by 0.5\n        ahrs->halfAccelerometerFeedback = Feedback(FusionVectorNormalise(accelerometer), halfGravity);\n\n        // Don't ignore accelerometer if acceleration error below threshold\n        if (ahrs->initialising ||\n            ((FusionVectorMagnitudeSquared(ahrs->halfAccelerometerFeedback) <= ahrs->settings.accelerationRejection))) {\n            ahrs->accelerometerIgnored = false;\n            ahrs->accelerationRecoveryTrigger -= 9;\n        } else {\n            ahrs->accelerationRecoveryTrigger += 1;\n        }\n\n        // Don't ignore accelerometer during acceleration recovery\n        if (ahrs->accelerationRecoveryTrigger > ahrs->accelerationRecoveryTimeout) {\n            ahrs->accelerationRecoveryTimeout = 0;\n            ahrs->accelerometerIgnored = false;\n        } else {\n            ahrs->accelerationRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod;\n        }\n        ahrs->accelerationRecoveryTrigger = Clamp(ahrs->accelerationRecoveryTrigger, 0, ahrs->settings.recoveryTriggerPeriod);\n\n        // Apply accelerometer feedback\n        if (ahrs->accelerometerIgnored == false) {\n            halfAccelerometerFeedback = ahrs->halfAccelerometerFeedback;\n        }\n    }\n\n    // Calculate magnetometer feedback\n    FusionVector halfMagnetometerFeedback = FUSION_VECTOR_ZERO;\n    ahrs->magnetometerIgnored = true;\n    if (FusionVectorIsZero(magnetometer) == false) {\n\n        // Calculate direction of magnetic field indicated by algorithm\n        const FusionVector halfMagnetic = HalfMagnetic(ahrs);\n\n        // Calculate magnetometer feedback scaled by 0.5\n        ahrs->halfMagnetometerFeedback =\n            Feedback(FusionVectorNormalise(FusionVectorCrossProduct(halfGravity, magnetometer)), halfMagnetic);\n\n        // Don't ignore magnetometer if magnetic error below threshold\n        if (ahrs->initialising ||\n            ((FusionVectorMagnitudeSquared(ahrs->halfMagnetometerFeedback) <= ahrs->settings.magneticRejection))) {\n            ahrs->magnetometerIgnored = false;\n            ahrs->magneticRecoveryTrigger -= 9;\n        } else {\n            ahrs->magneticRecoveryTrigger += 1;\n        }\n\n        // Don't ignore magnetometer during magnetic recovery\n        if (ahrs->magneticRecoveryTrigger > ahrs->magneticRecoveryTimeout) {\n            ahrs->magneticRecoveryTimeout = 0;\n            ahrs->magnetometerIgnored = false;\n        } else {\n            ahrs->magneticRecoveryTimeout = ahrs->settings.recoveryTriggerPeriod;\n        }\n        ahrs->magneticRecoveryTrigger = Clamp(ahrs->magneticRecoveryTrigger, 0, ahrs->settings.recoveryTriggerPeriod);\n\n        // Apply magnetometer feedback\n        if (ahrs->magnetometerIgnored == false) {\n            halfMagnetometerFeedback = ahrs->halfMagnetometerFeedback;\n        }\n    }\n\n    // Convert gyroscope to radians per second scaled by 0.5\n    const FusionVector halfGyroscope = FusionVectorMultiplyScalar(gyroscope, FusionDegreesToRadians(0.5f));\n\n    // Apply feedback to gyroscope\n    const FusionVector adjustedHalfGyroscope = FusionVectorAdd(\n        halfGyroscope,\n        FusionVectorMultiplyScalar(FusionVectorAdd(halfAccelerometerFeedback, halfMagnetometerFeedback), ahrs->rampedGain));\n\n    // Integrate rate of change of quaternion\n    ahrs->quaternion = FusionQuaternionAdd(\n        ahrs->quaternion,\n        FusionQuaternionMultiplyVector(ahrs->quaternion, FusionVectorMultiplyScalar(adjustedHalfGyroscope, deltaTime)));\n\n    // Normalise quaternion\n    ahrs->quaternion = FusionQuaternionNormalise(ahrs->quaternion);\n#undef Q\n}\n\n/**\n * @brief Returns the direction of gravity scaled by 0.5.\n * @param ahrs AHRS algorithm structure.\n * @return Direction of gravity scaled by 0.5.\n */\nstatic inline FusionVector HalfGravity(const FusionAhrs *const ahrs)\n{\n#define Q ahrs->quaternion.element\n    switch (ahrs->settings.convention) {\n    case FusionConventionNwu:\n    case FusionConventionEnu: {\n        const FusionVector halfGravity = {.axis = {\n                                              .x = Q.x * Q.z - Q.w * Q.y,\n                                              .y = Q.y * Q.z + Q.w * Q.x,\n                                              .z = Q.w * Q.w - 0.5f + Q.z * Q.z,\n                                          }}; // third column of transposed rotation matrix scaled by 0.5\n        return halfGravity;\n    }\n    case FusionConventionNed: {\n        const FusionVector halfGravity = {.axis = {\n                                              .x = Q.w * Q.y - Q.x * Q.z,\n                                              .y = -1.0f * (Q.y * Q.z + Q.w * Q.x),\n                                              .z = 0.5f - Q.w * Q.w - Q.z * Q.z,\n                                          }}; // third column of transposed rotation matrix scaled by -0.5\n        return halfGravity;\n    }\n    }\n    return FUSION_VECTOR_ZERO; // avoid compiler warning\n#undef Q\n}\n\n/**\n * @brief Returns the direction of the magnetic field scaled by 0.5.\n * @param ahrs AHRS algorithm structure.\n * @return Direction of the magnetic field scaled by 0.5.\n */\nstatic inline FusionVector HalfMagnetic(const FusionAhrs *const ahrs)\n{\n#define Q ahrs->quaternion.element\n    switch (ahrs->settings.convention) {\n    case FusionConventionNwu: {\n        const FusionVector halfMagnetic = {.axis = {\n                                               .x = Q.x * Q.y + Q.w * Q.z,\n                                               .y = Q.w * Q.w - 0.5f + Q.y * Q.y,\n                                               .z = Q.y * Q.z - Q.w * Q.x,\n                                           }}; // second column of transposed rotation matrix scaled by 0.5\n        return halfMagnetic;\n    }\n    case FusionConventionEnu: {\n        const FusionVector halfMagnetic = {.axis = {\n                                               .x = 0.5f - Q.w * Q.w - Q.x * Q.x,\n                                               .y = Q.w * Q.z - Q.x * Q.y,\n                                               .z = -1.0f * (Q.x * Q.z + Q.w * Q.y),\n                                           }}; // first column of transposed rotation matrix scaled by -0.5\n        return halfMagnetic;\n    }\n    case FusionConventionNed: {\n        const FusionVector halfMagnetic = {.axis = {\n                                               .x = -1.0f * (Q.x * Q.y + Q.w * Q.z),\n                                               .y = 0.5f - Q.w * Q.w - Q.y * Q.y,\n                                               .z = Q.w * Q.x - Q.y * Q.z,\n                                           }}; // second column of transposed rotation matrix scaled by -0.5\n        return halfMagnetic;\n    }\n    }\n    return FUSION_VECTOR_ZERO; // avoid compiler warning\n#undef Q\n}\n\n/**\n * @brief Returns the feedback.\n * @param sensor Sensor.\n * @param reference Reference.\n * @return Feedback.\n */\nstatic inline FusionVector Feedback(const FusionVector sensor, const FusionVector reference)\n{\n    if (FusionVectorDotProduct(sensor, reference) < 0.0f) { // if error is >90 degrees\n        return FusionVectorNormalise(FusionVectorCrossProduct(sensor, reference));\n    }\n    return FusionVectorCrossProduct(sensor, reference);\n}\n\n/**\n * @brief Returns a value limited to maximum and minimum.\n * @param value Value.\n * @param min Minimum value.\n * @param max Maximum value.\n * @return Value limited to maximum and minimum.\n */\nstatic inline int Clamp(const int value, const int min, const int max)\n{\n    if (value < min) {\n        return min;\n    }\n    if (value > max) {\n        return max;\n    }\n    return value;\n}\n\n/**\n * @brief Updates the AHRS algorithm using the gyroscope and accelerometer\n * measurements only.\n * @param ahrs AHRS algorithm structure.\n * @param gyroscope Gyroscope measurement in degrees per second.\n * @param accelerometer Accelerometer measurement in g.\n * @param deltaTime Delta time in seconds.\n */\nvoid FusionAhrsUpdateNoMagnetometer(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer,\n                                    const float deltaTime)\n{\n\n    // Update AHRS algorithm\n    FusionAhrsUpdate(ahrs, gyroscope, accelerometer, FUSION_VECTOR_ZERO, deltaTime);\n\n    // Zero heading during initialisation\n    if (ahrs->initialising) {\n        FusionAhrsSetHeading(ahrs, 0.0f);\n    }\n}\n\n/**\n * @brief Updates the AHRS algorithm using the gyroscope, accelerometer, and\n * heading measurements.\n * @param ahrs AHRS algorithm structure.\n * @param gyroscope Gyroscope measurement in degrees per second.\n * @param accelerometer Accelerometer measurement in g.\n * @param heading Heading measurement in degrees.\n * @param deltaTime Delta time in seconds.\n */\nvoid FusionAhrsUpdateExternalHeading(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer,\n                                     const float heading, const float deltaTime)\n{\n#define Q ahrs->quaternion.element\n\n    // Calculate roll\n    const float roll = atan2f(Q.w * Q.x + Q.y * Q.z, 0.5f - Q.y * Q.y - Q.x * Q.x);\n\n    // Calculate magnetometer\n    const float headingRadians = FusionDegreesToRadians(heading);\n    const float sinHeadingRadians = sinf(headingRadians);\n    const FusionVector magnetometer = {.axis = {\n                                           .x = cosf(headingRadians),\n                                           .y = -1.0f * cosf(roll) * sinHeadingRadians,\n                                           .z = sinHeadingRadians * sinf(roll),\n                                       }};\n\n    // Update AHRS algorithm\n    FusionAhrsUpdate(ahrs, gyroscope, accelerometer, magnetometer, deltaTime);\n#undef Q\n}\n\n/**\n * @brief Returns the quaternion describing the sensor relative to the Earth.\n * @param ahrs AHRS algorithm structure.\n * @return Quaternion describing the sensor relative to the Earth.\n */\nFusionQuaternion FusionAhrsGetQuaternion(const FusionAhrs *const ahrs)\n{\n    return ahrs->quaternion;\n}\n\n/**\n * @brief Sets the quaternion describing the sensor relative to the Earth.\n * @param ahrs AHRS algorithm structure.\n * @param quaternion Quaternion describing the sensor relative to the Earth.\n */\nvoid FusionAhrsSetQuaternion(FusionAhrs *const ahrs, const FusionQuaternion quaternion)\n{\n    ahrs->quaternion = quaternion;\n}\n\n/**\n * @brief Returns the linear acceleration measurement equal to the accelerometer\n * measurement with the 1 g of gravity removed.\n * @param ahrs AHRS algorithm structure.\n * @return Linear acceleration measurement in g.\n */\nFusionVector FusionAhrsGetLinearAcceleration(const FusionAhrs *const ahrs)\n{\n#define Q ahrs->quaternion.element\n\n    // Calculate gravity in the sensor coordinate frame\n    const FusionVector gravity = {.axis = {\n                                      .x = 2.0f * (Q.x * Q.z - Q.w * Q.y),\n                                      .y = 2.0f * (Q.y * Q.z + Q.w * Q.x),\n                                      .z = 2.0f * (Q.w * Q.w - 0.5f + Q.z * Q.z),\n                                  }}; // third column of transposed rotation matrix\n\n    // Remove gravity from accelerometer measurement\n    switch (ahrs->settings.convention) {\n    case FusionConventionNwu:\n    case FusionConventionEnu: {\n        return FusionVectorSubtract(ahrs->accelerometer, gravity);\n    }\n    case FusionConventionNed: {\n        return FusionVectorAdd(ahrs->accelerometer, gravity);\n    }\n    }\n    return FUSION_VECTOR_ZERO; // avoid compiler warning\n#undef Q\n}\n\n/**\n * @brief Returns the Earth acceleration measurement equal to accelerometer\n * measurement in the Earth coordinate frame with the 1 g of gravity removed.\n * @param ahrs AHRS algorithm structure.\n * @return Earth acceleration measurement in g.\n */\nFusionVector FusionAhrsGetEarthAcceleration(const FusionAhrs *const ahrs)\n{\n#define Q ahrs->quaternion.element\n#define A ahrs->accelerometer.axis\n\n    // Calculate accelerometer measurement in the Earth coordinate frame\n    const float qwqw = Q.w * Q.w; // calculate common terms to avoid repeated operations\n    const float qwqx = Q.w * Q.x;\n    const float qwqy = Q.w * Q.y;\n    const float qwqz = Q.w * Q.z;\n    const float qxqy = Q.x * Q.y;\n    const float qxqz = Q.x * Q.z;\n    const float qyqz = Q.y * Q.z;\n    FusionVector accelerometer = {.axis = {\n                                      .x = 2.0f * ((qwqw - 0.5f + Q.x * Q.x) * A.x + (qxqy - qwqz) * A.y + (qxqz + qwqy) * A.z),\n                                      .y = 2.0f * ((qxqy + qwqz) * A.x + (qwqw - 0.5f + Q.y * Q.y) * A.y + (qyqz - qwqx) * A.z),\n                                      .z = 2.0f * ((qxqz - qwqy) * A.x + (qyqz + qwqx) * A.y + (qwqw - 0.5f + Q.z * Q.z) * A.z),\n                                  }}; // rotation matrix multiplied with the accelerometer\n\n    // Remove gravity from accelerometer measurement\n    switch (ahrs->settings.convention) {\n    case FusionConventionNwu:\n    case FusionConventionEnu:\n        accelerometer.axis.z -= 1.0f;\n        break;\n    case FusionConventionNed:\n        accelerometer.axis.z += 1.0f;\n        break;\n    }\n    return accelerometer;\n#undef Q\n#undef A\n}\n\n/**\n * @brief Returns the AHRS algorithm internal states.\n * @param ahrs AHRS algorithm structure.\n * @return AHRS algorithm internal states.\n */\nFusionAhrsInternalStates FusionAhrsGetInternalStates(const FusionAhrs *const ahrs)\n{\n    const FusionAhrsInternalStates internalStates = {\n        .accelerationError = FusionRadiansToDegrees(FusionAsin(2.0f * FusionVectorMagnitude(ahrs->halfAccelerometerFeedback))),\n        .accelerometerIgnored = ahrs->accelerometerIgnored,\n        .accelerationRecoveryTrigger =\n            ahrs->settings.recoveryTriggerPeriod == 0\n                ? 0.0f\n                : (float)ahrs->accelerationRecoveryTrigger / (float)ahrs->settings.recoveryTriggerPeriod,\n        .magneticError = FusionRadiansToDegrees(FusionAsin(2.0f * FusionVectorMagnitude(ahrs->halfMagnetometerFeedback))),\n        .magnetometerIgnored = ahrs->magnetometerIgnored,\n        .magneticRecoveryTrigger = ahrs->settings.recoveryTriggerPeriod == 0\n                                       ? 0.0f\n                                       : (float)ahrs->magneticRecoveryTrigger / (float)ahrs->settings.recoveryTriggerPeriod,\n    };\n    return internalStates;\n}\n\n/**\n * @brief Returns the AHRS algorithm flags.\n * @param ahrs AHRS algorithm structure.\n * @return AHRS algorithm flags.\n */\nFusionAhrsFlags FusionAhrsGetFlags(const FusionAhrs *const ahrs)\n{\n    const FusionAhrsFlags flags = {\n        .initialising = ahrs->initialising,\n        .angularRateRecovery = ahrs->angularRateRecovery,\n        .accelerationRecovery = ahrs->accelerationRecoveryTrigger > ahrs->accelerationRecoveryTimeout,\n        .magneticRecovery = ahrs->magneticRecoveryTrigger > ahrs->magneticRecoveryTimeout,\n    };\n    return flags;\n}\n\n/**\n * @brief Sets the heading of the orientation measurement provided by the AHRS\n * algorithm.  This function can be used to reset drift in heading when the AHRS\n * algorithm is being used without a magnetometer.\n * @param ahrs AHRS algorithm structure.\n * @param heading Heading angle in degrees.\n */\nvoid FusionAhrsSetHeading(FusionAhrs *const ahrs, const float heading)\n{\n#define Q ahrs->quaternion.element\n    const float yaw = atan2f(Q.w * Q.z + Q.x * Q.y, 0.5f - Q.y * Q.y - Q.z * Q.z);\n    const float halfYawMinusHeading = 0.5f * (yaw - FusionDegreesToRadians(heading));\n    const FusionQuaternion rotation = {.element = {\n                                           .w = cosf(halfYawMinusHeading),\n                                           .x = 0.0f,\n                                           .y = 0.0f,\n                                           .z = -1.0f * sinf(halfYawMinusHeading),\n                                       }};\n    ahrs->quaternion = FusionQuaternionMultiply(rotation, ahrs->quaternion);\n#undef Q\n}\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionAhrs.h",
    "content": "/**\n * @file FusionAhrs.h\n * @author Seb Madgwick\n * @brief AHRS algorithm to combine gyroscope, accelerometer, and magnetometer\n * measurements into a single measurement of orientation relative to the Earth.\n */\n\n#ifndef FUSION_AHRS_H\n#define FUSION_AHRS_H\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionConvention.h\"\n#include \"FusionMath.h\"\n#include <stdbool.h>\n\n//------------------------------------------------------------------------------\n// Definitions\n\n/**\n * @brief AHRS algorithm settings.\n */\ntypedef struct {\n    FusionConvention convention;\n    float gain;\n    float gyroscopeRange;\n    float accelerationRejection;\n    float magneticRejection;\n    unsigned int recoveryTriggerPeriod;\n} FusionAhrsSettings;\n\n/**\n * @brief AHRS algorithm structure.  Structure members are used internally and\n * must not be accessed by the application.\n */\ntypedef struct {\n    FusionAhrsSettings settings;\n    FusionQuaternion quaternion;\n    FusionVector accelerometer;\n    bool initialising;\n    float rampedGain;\n    float rampedGainStep;\n    bool angularRateRecovery;\n    FusionVector halfAccelerometerFeedback;\n    FusionVector halfMagnetometerFeedback;\n    bool accelerometerIgnored;\n    int accelerationRecoveryTrigger;\n    int accelerationRecoveryTimeout;\n    bool magnetometerIgnored;\n    int magneticRecoveryTrigger;\n    int magneticRecoveryTimeout;\n} FusionAhrs;\n\n/**\n * @brief AHRS algorithm internal states.\n */\ntypedef struct {\n    float accelerationError;\n    bool accelerometerIgnored;\n    float accelerationRecoveryTrigger;\n    float magneticError;\n    bool magnetometerIgnored;\n    float magneticRecoveryTrigger;\n} FusionAhrsInternalStates;\n\n/**\n * @brief AHRS algorithm flags.\n */\ntypedef struct {\n    bool initialising;\n    bool angularRateRecovery;\n    bool accelerationRecovery;\n    bool magneticRecovery;\n} FusionAhrsFlags;\n\n//------------------------------------------------------------------------------\n// Function declarations\n\nvoid FusionAhrsInitialise(FusionAhrs *const ahrs);\n\nvoid FusionAhrsReset(FusionAhrs *const ahrs);\n\nvoid FusionAhrsSetSettings(FusionAhrs *const ahrs, const FusionAhrsSettings *const settings);\n\nvoid FusionAhrsUpdate(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer,\n                      const FusionVector magnetometer, const float deltaTime);\n\nvoid FusionAhrsUpdateNoMagnetometer(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer,\n                                    const float deltaTime);\n\nvoid FusionAhrsUpdateExternalHeading(FusionAhrs *const ahrs, const FusionVector gyroscope, const FusionVector accelerometer,\n                                     const float heading, const float deltaTime);\n\nFusionQuaternion FusionAhrsGetQuaternion(const FusionAhrs *const ahrs);\n\nvoid FusionAhrsSetQuaternion(FusionAhrs *const ahrs, const FusionQuaternion quaternion);\n\nFusionVector FusionAhrsGetLinearAcceleration(const FusionAhrs *const ahrs);\n\nFusionVector FusionAhrsGetEarthAcceleration(const FusionAhrs *const ahrs);\n\nFusionAhrsInternalStates FusionAhrsGetInternalStates(const FusionAhrs *const ahrs);\n\nFusionAhrsFlags FusionAhrsGetFlags(const FusionAhrs *const ahrs);\n\nvoid FusionAhrsSetHeading(FusionAhrs *const ahrs, const float heading);\n\n#endif\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionAxes.h",
    "content": "/**\n * @file FusionAxes.h\n * @author Seb Madgwick\n * @brief Swaps sensor axes for alignment with the body axes.\n */\n\n#ifndef FUSION_AXES_H\n#define FUSION_AXES_H\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionMath.h\"\n\n//------------------------------------------------------------------------------\n// Definitions\n\n/**\n * @brief Axes alignment describing the sensor axes relative to the body axes.\n * For example, if the body X axis is aligned with the sensor Y axis and the\n * body Y axis is aligned with sensor X axis but pointing the opposite direction\n * then alignment is +Y-X+Z.\n */\ntypedef enum {\n    FusionAxesAlignmentPXPYPZ, /* +X+Y+Z */\n    FusionAxesAlignmentPXNZPY, /* +X-Z+Y */\n    FusionAxesAlignmentPXNYNZ, /* +X-Y-Z */\n    FusionAxesAlignmentPXPZNY, /* +X+Z-Y */\n    FusionAxesAlignmentNXPYNZ, /* -X+Y-Z */\n    FusionAxesAlignmentNXPZPY, /* -X+Z+Y */\n    FusionAxesAlignmentNXNYPZ, /* -X-Y+Z */\n    FusionAxesAlignmentNXNZNY, /* -X-Z-Y */\n    FusionAxesAlignmentPYNXPZ, /* +Y-X+Z */\n    FusionAxesAlignmentPYNZNX, /* +Y-Z-X */\n    FusionAxesAlignmentPYPXNZ, /* +Y+X-Z */\n    FusionAxesAlignmentPYPZPX, /* +Y+Z+X */\n    FusionAxesAlignmentNYPXPZ, /* -Y+X+Z */\n    FusionAxesAlignmentNYNZPX, /* -Y-Z+X */\n    FusionAxesAlignmentNYNXNZ, /* -Y-X-Z */\n    FusionAxesAlignmentNYPZNX, /* -Y+Z-X */\n    FusionAxesAlignmentPZPYNX, /* +Z+Y-X */\n    FusionAxesAlignmentPZPXPY, /* +Z+X+Y */\n    FusionAxesAlignmentPZNYPX, /* +Z-Y+X */\n    FusionAxesAlignmentPZNXNY, /* +Z-X-Y */\n    FusionAxesAlignmentNZPYPX, /* -Z+Y+X */\n    FusionAxesAlignmentNZNXPY, /* -Z-X+Y */\n    FusionAxesAlignmentNZNYNX, /* -Z-Y-X */\n    FusionAxesAlignmentNZPXNY, /* -Z+X-Y */\n} FusionAxesAlignment;\n\n//------------------------------------------------------------------------------\n// Inline functions\n\n/**\n * @brief Swaps sensor axes for alignment with the body axes.\n * @param sensor Sensor axes.\n * @param alignment Axes alignment.\n * @return Sensor axes aligned with the body axes.\n */\nstatic inline FusionVector FusionAxesSwap(const FusionVector sensor, const FusionAxesAlignment alignment)\n{\n    FusionVector result;\n    switch (alignment) {\n    case FusionAxesAlignmentPXPYPZ:\n        break;\n    case FusionAxesAlignmentPXNZPY:\n        result.axis.x = +sensor.axis.x;\n        result.axis.y = -sensor.axis.z;\n        result.axis.z = +sensor.axis.y;\n        return result;\n    case FusionAxesAlignmentPXNYNZ:\n        result.axis.x = +sensor.axis.x;\n        result.axis.y = -sensor.axis.y;\n        result.axis.z = -sensor.axis.z;\n        return result;\n    case FusionAxesAlignmentPXPZNY:\n        result.axis.x = +sensor.axis.x;\n        result.axis.y = +sensor.axis.z;\n        result.axis.z = -sensor.axis.y;\n        return result;\n    case FusionAxesAlignmentNXPYNZ:\n        result.axis.x = -sensor.axis.x;\n        result.axis.y = +sensor.axis.y;\n        result.axis.z = -sensor.axis.z;\n        return result;\n    case FusionAxesAlignmentNXPZPY:\n        result.axis.x = -sensor.axis.x;\n        result.axis.y = +sensor.axis.z;\n        result.axis.z = +sensor.axis.y;\n        return result;\n    case FusionAxesAlignmentNXNYPZ:\n        result.axis.x = -sensor.axis.x;\n        result.axis.y = -sensor.axis.y;\n        result.axis.z = +sensor.axis.z;\n        return result;\n    case FusionAxesAlignmentNXNZNY:\n        result.axis.x = -sensor.axis.x;\n        result.axis.y = -sensor.axis.z;\n        result.axis.z = -sensor.axis.y;\n        return result;\n    case FusionAxesAlignmentPYNXPZ:\n        result.axis.x = +sensor.axis.y;\n        result.axis.y = -sensor.axis.x;\n        result.axis.z = +sensor.axis.z;\n        return result;\n    case FusionAxesAlignmentPYNZNX:\n        result.axis.x = +sensor.axis.y;\n        result.axis.y = -sensor.axis.z;\n        result.axis.z = -sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentPYPXNZ:\n        result.axis.x = +sensor.axis.y;\n        result.axis.y = +sensor.axis.x;\n        result.axis.z = -sensor.axis.z;\n        return result;\n    case FusionAxesAlignmentPYPZPX:\n        result.axis.x = +sensor.axis.y;\n        result.axis.y = +sensor.axis.z;\n        result.axis.z = +sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentNYPXPZ:\n        result.axis.x = -sensor.axis.y;\n        result.axis.y = +sensor.axis.x;\n        result.axis.z = +sensor.axis.z;\n        return result;\n    case FusionAxesAlignmentNYNZPX:\n        result.axis.x = -sensor.axis.y;\n        result.axis.y = -sensor.axis.z;\n        result.axis.z = +sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentNYNXNZ:\n        result.axis.x = -sensor.axis.y;\n        result.axis.y = -sensor.axis.x;\n        result.axis.z = -sensor.axis.z;\n        return result;\n    case FusionAxesAlignmentNYPZNX:\n        result.axis.x = -sensor.axis.y;\n        result.axis.y = +sensor.axis.z;\n        result.axis.z = -sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentPZPYNX:\n        result.axis.x = +sensor.axis.z;\n        result.axis.y = +sensor.axis.y;\n        result.axis.z = -sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentPZPXPY:\n        result.axis.x = +sensor.axis.z;\n        result.axis.y = +sensor.axis.x;\n        result.axis.z = +sensor.axis.y;\n        return result;\n    case FusionAxesAlignmentPZNYPX:\n        result.axis.x = +sensor.axis.z;\n        result.axis.y = -sensor.axis.y;\n        result.axis.z = +sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentPZNXNY:\n        result.axis.x = +sensor.axis.z;\n        result.axis.y = -sensor.axis.x;\n        result.axis.z = -sensor.axis.y;\n        return result;\n    case FusionAxesAlignmentNZPYPX:\n        result.axis.x = -sensor.axis.z;\n        result.axis.y = +sensor.axis.y;\n        result.axis.z = +sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentNZNXPY:\n        result.axis.x = -sensor.axis.z;\n        result.axis.y = -sensor.axis.x;\n        result.axis.z = +sensor.axis.y;\n        return result;\n    case FusionAxesAlignmentNZNYNX:\n        result.axis.x = -sensor.axis.z;\n        result.axis.y = -sensor.axis.y;\n        result.axis.z = -sensor.axis.x;\n        return result;\n    case FusionAxesAlignmentNZPXNY:\n        result.axis.x = -sensor.axis.z;\n        result.axis.y = +sensor.axis.x;\n        result.axis.z = -sensor.axis.y;\n        return result;\n    }\n    return sensor; // avoid compiler warning\n}\n\n#endif\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionCalibration.h",
    "content": "/**\n * @file FusionCalibration.h\n * @author Seb Madgwick\n * @brief Gyroscope, accelerometer, and magnetometer calibration models.\n */\n\n#ifndef FUSION_CALIBRATION_H\n#define FUSION_CALIBRATION_H\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionMath.h\"\n\n//------------------------------------------------------------------------------\n// Inline functions\n\n/**\n * @brief Gyroscope and accelerometer calibration model.\n * @param uncalibrated Uncalibrated measurement.\n * @param misalignment Misalignment matrix.\n * @param sensitivity Sensitivity.\n * @param offset Offset.\n * @return Calibrated measurement.\n */\nstatic inline FusionVector FusionCalibrationInertial(const FusionVector uncalibrated, const FusionMatrix misalignment,\n                                                     const FusionVector sensitivity, const FusionVector offset)\n{\n    return FusionMatrixMultiplyVector(misalignment,\n                                      FusionVectorHadamardProduct(FusionVectorSubtract(uncalibrated, offset), sensitivity));\n}\n\n/**\n * @brief Magnetometer calibration model.\n * @param uncalibrated Uncalibrated measurement.\n * @param softIronMatrix Soft-iron matrix.\n * @param hardIronOffset Hard-iron offset.\n * @return Calibrated measurement.\n */\nstatic inline FusionVector FusionCalibrationMagnetic(const FusionVector uncalibrated, const FusionMatrix softIronMatrix,\n                                                     const FusionVector hardIronOffset)\n{\n    return FusionMatrixMultiplyVector(softIronMatrix, FusionVectorSubtract(uncalibrated, hardIronOffset));\n}\n\n#endif\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionCompass.c",
    "content": "/**\n * @file FusionCompass.c\n * @author Seb Madgwick\n * @brief Tilt-compensated compass to calculate the magnetic heading using\n * accelerometer and magnetometer measurements.\n */\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionCompass.h\"\n#include \"FusionAxes.h\"\n#include <math.h> // atan2f\n\n//------------------------------------------------------------------------------\n// Functions\n\n/**\n * @brief Calculates the magnetic heading.\n * @param convention Earth axes convention.\n * @param accelerometer Accelerometer measurement in any calibrated units.\n * @param magnetometer Magnetometer measurement in any calibrated units.\n * @return Heading angle in degrees.\n */\nfloat FusionCompassCalculateHeading(const FusionConvention convention, const FusionVector accelerometer,\n                                    const FusionVector magnetometer)\n{\n    switch (convention) {\n    case FusionConventionNwu: {\n        const FusionVector west = FusionVectorNormalise(FusionVectorCrossProduct(accelerometer, magnetometer));\n        const FusionVector north = FusionVectorNormalise(FusionVectorCrossProduct(west, accelerometer));\n        return FusionRadiansToDegrees(atan2f(west.axis.x, north.axis.x));\n    }\n    case FusionConventionEnu: {\n        const FusionVector west = FusionVectorNormalise(FusionVectorCrossProduct(accelerometer, magnetometer));\n        const FusionVector north = FusionVectorNormalise(FusionVectorCrossProduct(west, accelerometer));\n        const FusionVector east = FusionVectorMultiplyScalar(west, -1.0f);\n        return FusionRadiansToDegrees(atan2f(north.axis.x, east.axis.x));\n    }\n    case FusionConventionNed: {\n        const FusionVector up = FusionVectorMultiplyScalar(accelerometer, -1.0f);\n        const FusionVector west = FusionVectorNormalise(FusionVectorCrossProduct(up, magnetometer));\n        const FusionVector north = FusionVectorNormalise(FusionVectorCrossProduct(west, up));\n        return FusionRadiansToDegrees(atan2f(west.axis.x, north.axis.x));\n    }\n    }\n    return 0; // avoid compiler warning\n}\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionCompass.h",
    "content": "/**\n * @file FusionCompass.h\n * @author Seb Madgwick\n * @brief Tilt-compensated compass to calculate the magnetic heading using\n * accelerometer and magnetometer measurements.\n */\n\n#ifndef FUSION_COMPASS_H\n#define FUSION_COMPASS_H\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionConvention.h\"\n#include \"FusionMath.h\"\n\n//------------------------------------------------------------------------------\n// Function declarations\n\nfloat FusionCompassCalculateHeading(const FusionConvention convention, const FusionVector accelerometer,\n                                    const FusionVector magnetometer);\n\n#endif\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionConvention.h",
    "content": "/**\n * @file FusionConvention.h\n * @author Seb Madgwick\n * @brief Earth axes convention.\n */\n\n#ifndef FUSION_CONVENTION_H\n#define FUSION_CONVENTION_H\n\n//------------------------------------------------------------------------------\n// Definitions\n\n/**\n * @brief Earth axes convention.\n */\ntypedef enum {\n    FusionConventionNwu, /* North-West-Up */\n    FusionConventionEnu, /* East-North-Up */\n    FusionConventionNed, /* North-East-Down */\n} FusionConvention;\n\n#endif\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionMath.h",
    "content": "/**\n * @file FusionMath.h\n * @author Seb Madgwick\n * @brief Math library.\n */\n\n#ifndef FUSION_MATH_H\n#define FUSION_MATH_H\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include <math.h> // M_PI, sqrtf, atan2f, asinf\n#include <stdbool.h>\n#include <stdint.h>\n\n//------------------------------------------------------------------------------\n// Definitions\n\n/**\n * @brief 3D vector.\n */\ntypedef union {\n    float array[3];\n\n    struct {\n        float x;\n        float y;\n        float z;\n    } axis;\n} FusionVector;\n\n/**\n * @brief Quaternion.\n */\ntypedef union {\n    float array[4];\n\n    struct {\n        float w;\n        float x;\n        float y;\n        float z;\n    } element;\n} FusionQuaternion;\n\n/**\n * @brief 3x3 matrix in row-major order.\n * See http://en.wikipedia.org/wiki/Row-major_order\n */\ntypedef union {\n    float array[3][3];\n\n    struct {\n        float xx;\n        float xy;\n        float xz;\n        float yx;\n        float yy;\n        float yz;\n        float zx;\n        float zy;\n        float zz;\n    } element;\n} FusionMatrix;\n\n/**\n * @brief Euler angles.  Roll, pitch, and yaw correspond to rotations around\n * X, Y, and Z respectively.\n */\ntypedef union {\n    float array[3];\n\n    struct {\n        float roll;\n        float pitch;\n        float yaw;\n    } angle;\n} FusionEuler;\n\n/**\n * @brief Vector of zeros.\n */\n#define FUSION_VECTOR_ZERO ((FusionVector){.array = {0.0f, 0.0f, 0.0f}})\n\n/**\n * @brief Vector of ones.\n */\n#define FUSION_VECTOR_ONES ((FusionVector){.array = {1.0f, 1.0f, 1.0f}})\n\n/**\n * @brief Identity quaternion.\n */\n#define FUSION_IDENTITY_QUATERNION ((FusionQuaternion){.array = {1.0f, 0.0f, 0.0f, 0.0f}})\n\n/**\n * @brief Identity matrix.\n */\n#define FUSION_IDENTITY_MATRIX ((FusionMatrix){.array = {{1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f}}})\n\n/**\n * @brief Euler angles of zero.\n */\n#define FUSION_EULER_ZERO ((FusionEuler){.array = {0.0f, 0.0f, 0.0f}})\n\n/**\n * @brief Pi. May not be defined in math.h.\n */\n#ifndef M_PI\n#define M_PI (3.14159265358979323846)\n#endif\n\n/**\n * @brief Include this definition or add as a preprocessor definition to use\n * normal square root operations.\n */\n// #define FUSION_USE_NORMAL_SQRT\n\n//------------------------------------------------------------------------------\n// Inline functions - Degrees and radians conversion\n\n/**\n * @brief Converts degrees to radians.\n * @param degrees Degrees.\n * @return Radians.\n */\nstatic inline float FusionDegreesToRadians(const float degrees)\n{\n    return degrees * ((float)M_PI / 180.0f);\n}\n\n/**\n * @brief Converts radians to degrees.\n * @param radians Radians.\n * @return Degrees.\n */\nstatic inline float FusionRadiansToDegrees(const float radians)\n{\n    return radians * (180.0f / (float)M_PI);\n}\n\n//------------------------------------------------------------------------------\n// Inline functions - Arc sine\n\n/**\n * @brief Returns the arc sine of the value.\n * @param value Value.\n * @return Arc sine of the value.\n */\nstatic inline float FusionAsin(const float value)\n{\n    if (value <= -1.0f) {\n        return (float)M_PI / -2.0f;\n    }\n    if (value >= 1.0f) {\n        return (float)M_PI / 2.0f;\n    }\n    return asinf(value);\n}\n\n//------------------------------------------------------------------------------\n// Inline functions - Fast inverse square root\n\n#ifndef FUSION_USE_NORMAL_SQRT\n\n/**\n * @brief Calculates the reciprocal of the square root.\n * See https://pizer.wordpress.com/2008/10/12/fast-inverse-square-root/\n * @param x Operand.\n * @return Reciprocal of the square root of x.\n */\nstatic inline float FusionFastInverseSqrt(const float x)\n{\n\n    typedef union {\n        float f;\n        int32_t i;\n    } Union32;\n\n    Union32 union32 = {.f = x};\n    union32.i = 0x5F1F1412 - (union32.i >> 1);\n    return union32.f * (1.69000231f - 0.714158168f * x * union32.f * union32.f);\n}\n\n#endif\n\n//------------------------------------------------------------------------------\n// Inline functions - Vector operations\n\n/**\n * @brief Returns true if the vector is zero.\n * @param vector Vector.\n * @return True if the vector is zero.\n */\nstatic inline bool FusionVectorIsZero(const FusionVector vector)\n{\n    return (vector.axis.x == 0.0f) && (vector.axis.y == 0.0f) && (vector.axis.z == 0.0f);\n}\n\n/**\n * @brief Returns the sum of two vectors.\n * @param vectorA Vector A.\n * @param vectorB Vector B.\n * @return Sum of two vectors.\n */\nstatic inline FusionVector FusionVectorAdd(const FusionVector vectorA, const FusionVector vectorB)\n{\n    const FusionVector result = {.axis = {\n                                     .x = vectorA.axis.x + vectorB.axis.x,\n                                     .y = vectorA.axis.y + vectorB.axis.y,\n                                     .z = vectorA.axis.z + vectorB.axis.z,\n                                 }};\n    return result;\n}\n\n/**\n * @brief Returns vector B subtracted from vector A.\n * @param vectorA Vector A.\n * @param vectorB Vector B.\n * @return Vector B subtracted from vector A.\n */\nstatic inline FusionVector FusionVectorSubtract(const FusionVector vectorA, const FusionVector vectorB)\n{\n    const FusionVector result = {.axis = {\n                                     .x = vectorA.axis.x - vectorB.axis.x,\n                                     .y = vectorA.axis.y - vectorB.axis.y,\n                                     .z = vectorA.axis.z - vectorB.axis.z,\n                                 }};\n    return result;\n}\n\n/**\n * @brief Returns the sum of the elements.\n * @param vector Vector.\n * @return Sum of the elements.\n */\nstatic inline float FusionVectorSum(const FusionVector vector)\n{\n    return vector.axis.x + vector.axis.y + vector.axis.z;\n}\n\n/**\n * @brief Returns the multiplication of a vector by a scalar.\n * @param vector Vector.\n * @param scalar Scalar.\n * @return Multiplication of a vector by a scalar.\n */\nstatic inline FusionVector FusionVectorMultiplyScalar(const FusionVector vector, const float scalar)\n{\n    const FusionVector result = {.axis = {\n                                     .x = vector.axis.x * scalar,\n                                     .y = vector.axis.y * scalar,\n                                     .z = vector.axis.z * scalar,\n                                 }};\n    return result;\n}\n\n/**\n * @brief Calculates the Hadamard product (element-wise multiplication).\n * @param vectorA Vector A.\n * @param vectorB Vector B.\n * @return Hadamard product.\n */\nstatic inline FusionVector FusionVectorHadamardProduct(const FusionVector vectorA, const FusionVector vectorB)\n{\n    const FusionVector result = {.axis = {\n                                     .x = vectorA.axis.x * vectorB.axis.x,\n                                     .y = vectorA.axis.y * vectorB.axis.y,\n                                     .z = vectorA.axis.z * vectorB.axis.z,\n                                 }};\n    return result;\n}\n\n/**\n * @brief Returns the cross product.\n * @param vectorA Vector A.\n * @param vectorB Vector B.\n * @return Cross product.\n */\nstatic inline FusionVector FusionVectorCrossProduct(const FusionVector vectorA, const FusionVector vectorB)\n{\n#define A vectorA.axis\n#define B vectorB.axis\n    const FusionVector result = {.axis = {\n                                     .x = A.y * B.z - A.z * B.y,\n                                     .y = A.z * B.x - A.x * B.z,\n                                     .z = A.x * B.y - A.y * B.x,\n                                 }};\n    return result;\n#undef A\n#undef B\n}\n\n/**\n * @brief Returns the dot product.\n * @param vectorA Vector A.\n * @param vectorB Vector B.\n * @return Dot product.\n */\nstatic inline float FusionVectorDotProduct(const FusionVector vectorA, const FusionVector vectorB)\n{\n    return FusionVectorSum(FusionVectorHadamardProduct(vectorA, vectorB));\n}\n\n/**\n * @brief Returns the vector magnitude squared.\n * @param vector Vector.\n * @return Vector magnitude squared.\n */\nstatic inline float FusionVectorMagnitudeSquared(const FusionVector vector)\n{\n    return FusionVectorSum(FusionVectorHadamardProduct(vector, vector));\n}\n\n/**\n * @brief Returns the vector magnitude.\n * @param vector Vector.\n * @return Vector magnitude.\n */\nstatic inline float FusionVectorMagnitude(const FusionVector vector)\n{\n    return sqrtf(FusionVectorMagnitudeSquared(vector));\n}\n\n/**\n * @brief Returns the normalised vector.\n * @param vector Vector.\n * @return Normalised vector.\n */\nstatic inline FusionVector FusionVectorNormalise(const FusionVector vector)\n{\n#ifdef FUSION_USE_NORMAL_SQRT\n    const float magnitudeReciprocal = 1.0f / sqrtf(FusionVectorMagnitudeSquared(vector));\n#else\n    const float magnitudeReciprocal = FusionFastInverseSqrt(FusionVectorMagnitudeSquared(vector));\n#endif\n    return FusionVectorMultiplyScalar(vector, magnitudeReciprocal);\n}\n\n//------------------------------------------------------------------------------\n// Inline functions - Quaternion operations\n\n/**\n * @brief Returns the sum of two quaternions.\n * @param quaternionA Quaternion A.\n * @param quaternionB Quaternion B.\n * @return Sum of two quaternions.\n */\nstatic inline FusionQuaternion FusionQuaternionAdd(const FusionQuaternion quaternionA, const FusionQuaternion quaternionB)\n{\n    const FusionQuaternion result = {.element = {\n                                         .w = quaternionA.element.w + quaternionB.element.w,\n                                         .x = quaternionA.element.x + quaternionB.element.x,\n                                         .y = quaternionA.element.y + quaternionB.element.y,\n                                         .z = quaternionA.element.z + quaternionB.element.z,\n                                     }};\n    return result;\n}\n\n/**\n * @brief Returns the multiplication of two quaternions.\n * @param quaternionA Quaternion A (to be post-multiplied).\n * @param quaternionB Quaternion B (to be pre-multiplied).\n * @return Multiplication of two quaternions.\n */\nstatic inline FusionQuaternion FusionQuaternionMultiply(const FusionQuaternion quaternionA, const FusionQuaternion quaternionB)\n{\n#define A quaternionA.element\n#define B quaternionB.element\n    const FusionQuaternion result = {.element = {\n                                         .w = A.w * B.w - A.x * B.x - A.y * B.y - A.z * B.z,\n                                         .x = A.w * B.x + A.x * B.w + A.y * B.z - A.z * B.y,\n                                         .y = A.w * B.y - A.x * B.z + A.y * B.w + A.z * B.x,\n                                         .z = A.w * B.z + A.x * B.y - A.y * B.x + A.z * B.w,\n                                     }};\n    return result;\n#undef A\n#undef B\n}\n\n/**\n * @brief Returns the multiplication of a quaternion with a vector.  This is a\n * normal quaternion multiplication where the vector is treated a\n * quaternion with a W element value of zero.  The quaternion is post-\n * multiplied by the vector.\n * @param quaternion Quaternion.\n * @param vector Vector.\n * @return Multiplication of a quaternion with a vector.\n */\nstatic inline FusionQuaternion FusionQuaternionMultiplyVector(const FusionQuaternion quaternion, const FusionVector vector)\n{\n#define Q quaternion.element\n#define V vector.axis\n    const FusionQuaternion result = {.element = {\n                                         .w = -Q.x * V.x - Q.y * V.y - Q.z * V.z,\n                                         .x = Q.w * V.x + Q.y * V.z - Q.z * V.y,\n                                         .y = Q.w * V.y - Q.x * V.z + Q.z * V.x,\n                                         .z = Q.w * V.z + Q.x * V.y - Q.y * V.x,\n                                     }};\n    return result;\n#undef Q\n#undef V\n}\n\n/**\n * @brief Returns the normalised quaternion.\n * @param quaternion Quaternion.\n * @return Normalised quaternion.\n */\nstatic inline FusionQuaternion FusionQuaternionNormalise(const FusionQuaternion quaternion)\n{\n#define Q quaternion.element\n#ifdef FUSION_USE_NORMAL_SQRT\n    const float magnitudeReciprocal = 1.0f / sqrtf(Q.w * Q.w + Q.x * Q.x + Q.y * Q.y + Q.z * Q.z);\n#else\n    const float magnitudeReciprocal = FusionFastInverseSqrt(Q.w * Q.w + Q.x * Q.x + Q.y * Q.y + Q.z * Q.z);\n#endif\n    const FusionQuaternion result = {.element = {\n                                         .w = Q.w * magnitudeReciprocal,\n                                         .x = Q.x * magnitudeReciprocal,\n                                         .y = Q.y * magnitudeReciprocal,\n                                         .z = Q.z * magnitudeReciprocal,\n                                     }};\n    return result;\n#undef Q\n}\n\n//------------------------------------------------------------------------------\n// Inline functions - Matrix operations\n\n/**\n * @brief Returns the multiplication of a matrix with a vector.\n * @param matrix Matrix.\n * @param vector Vector.\n * @return Multiplication of a matrix with a vector.\n */\nstatic inline FusionVector FusionMatrixMultiplyVector(const FusionMatrix matrix, const FusionVector vector)\n{\n#define R matrix.element\n    const FusionVector result = {.axis = {\n                                     .x = R.xx * vector.axis.x + R.xy * vector.axis.y + R.xz * vector.axis.z,\n                                     .y = R.yx * vector.axis.x + R.yy * vector.axis.y + R.yz * vector.axis.z,\n                                     .z = R.zx * vector.axis.x + R.zy * vector.axis.y + R.zz * vector.axis.z,\n                                 }};\n    return result;\n#undef R\n}\n\n//------------------------------------------------------------------------------\n// Inline functions - Conversion operations\n\n/**\n * @brief Converts a quaternion to a rotation matrix.\n * @param quaternion Quaternion.\n * @return Rotation matrix.\n */\nstatic inline FusionMatrix FusionQuaternionToMatrix(const FusionQuaternion quaternion)\n{\n#define Q quaternion.element\n    const float qwqw = Q.w * Q.w; // calculate common terms to avoid repeated operations\n    const float qwqx = Q.w * Q.x;\n    const float qwqy = Q.w * Q.y;\n    const float qwqz = Q.w * Q.z;\n    const float qxqy = Q.x * Q.y;\n    const float qxqz = Q.x * Q.z;\n    const float qyqz = Q.y * Q.z;\n    const FusionMatrix matrix = {.element = {\n                                     .xx = 2.0f * (qwqw - 0.5f + Q.x * Q.x),\n                                     .xy = 2.0f * (qxqy - qwqz),\n                                     .xz = 2.0f * (qxqz + qwqy),\n                                     .yx = 2.0f * (qxqy + qwqz),\n                                     .yy = 2.0f * (qwqw - 0.5f + Q.y * Q.y),\n                                     .yz = 2.0f * (qyqz - qwqx),\n                                     .zx = 2.0f * (qxqz - qwqy),\n                                     .zy = 2.0f * (qyqz + qwqx),\n                                     .zz = 2.0f * (qwqw - 0.5f + Q.z * Q.z),\n                                 }};\n    return matrix;\n#undef Q\n}\n\n/**\n * @brief Converts a quaternion to ZYX Euler angles in degrees.\n * @param quaternion Quaternion.\n * @return Euler angles in degrees.\n */\nstatic inline FusionEuler FusionQuaternionToEuler(const FusionQuaternion quaternion)\n{\n#define Q quaternion.element\n    const float halfMinusQySquared = 0.5f - Q.y * Q.y; // calculate common terms to avoid repeated operations\n    const FusionEuler euler = {.angle = {\n                                   .roll = FusionRadiansToDegrees(atan2f(Q.w * Q.x + Q.y * Q.z, halfMinusQySquared - Q.x * Q.x)),\n                                   .pitch = FusionRadiansToDegrees(FusionAsin(2.0f * (Q.w * Q.y - Q.z * Q.x))),\n                                   .yaw = FusionRadiansToDegrees(atan2f(Q.w * Q.z + Q.x * Q.y, halfMinusQySquared - Q.z * Q.z)),\n                               }};\n    return euler;\n#undef Q\n}\n\n#endif\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionOffset.c",
    "content": "/**\n * @file FusionOffset.c\n * @author Seb Madgwick\n * @brief Gyroscope offset correction algorithm for run-time calibration of the\n * gyroscope offset.\n */\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionOffset.h\"\n#include <math.h> // fabsf\n\n//------------------------------------------------------------------------------\n// Definitions\n\n/**\n * @brief Cutoff frequency in Hz.\n */\n#define CUTOFF_FREQUENCY (0.02f)\n\n/**\n * @brief Timeout in seconds.\n */\n#define TIMEOUT (5)\n\n/**\n * @brief Threshold in degrees per second.\n */\n#define THRESHOLD (3.0f)\n\n//------------------------------------------------------------------------------\n// Functions\n\n/**\n * @brief Initialises the gyroscope offset algorithm.\n * @param offset Gyroscope offset algorithm structure.\n * @param sampleRate Sample rate in Hz.\n */\nvoid FusionOffsetInitialise(FusionOffset *const offset, const unsigned int sampleRate)\n{\n    offset->filterCoefficient = 2.0f * (float)M_PI * CUTOFF_FREQUENCY * (1.0f / (float)sampleRate);\n    offset->timeout = TIMEOUT * sampleRate;\n    offset->timer = 0;\n    offset->gyroscopeOffset = FUSION_VECTOR_ZERO;\n}\n\n/**\n * @brief Updates the gyroscope offset algorithm and returns the corrected\n * gyroscope measurement.\n * @param offset Gyroscope offset algorithm structure.\n * @param gyroscope Gyroscope measurement in degrees per second.\n * @return Corrected gyroscope measurement in degrees per second.\n */\nFusionVector FusionOffsetUpdate(FusionOffset *const offset, FusionVector gyroscope)\n{\n\n    // Subtract offset from gyroscope measurement\n    gyroscope = FusionVectorSubtract(gyroscope, offset->gyroscopeOffset);\n\n    // Reset timer if gyroscope not stationary\n    if ((fabsf(gyroscope.axis.x) > THRESHOLD) || (fabsf(gyroscope.axis.y) > THRESHOLD) || (fabsf(gyroscope.axis.z) > THRESHOLD)) {\n        offset->timer = 0;\n        return gyroscope;\n    }\n\n    // Increment timer while gyroscope stationary\n    if (offset->timer < offset->timeout) {\n        offset->timer++;\n        return gyroscope;\n    }\n\n    // Adjust offset if timer has elapsed\n    offset->gyroscopeOffset =\n        FusionVectorAdd(offset->gyroscopeOffset, FusionVectorMultiplyScalar(gyroscope, offset->filterCoefficient));\n    return gyroscope;\n}\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/Fusion/FusionOffset.h",
    "content": "/**\n * @file FusionOffset.h\n * @author Seb Madgwick\n * @brief Gyroscope offset correction algorithm for run-time calibration of the\n * gyroscope offset.\n */\n\n#ifndef FUSION_OFFSET_H\n#define FUSION_OFFSET_H\n\n//------------------------------------------------------------------------------\n// Includes\n\n#include \"FusionMath.h\"\n\n//------------------------------------------------------------------------------\n// Definitions\n\n/**\n * @brief Gyroscope offset algorithm structure.  Structure members are used\n * internally and must not be accessed by the application.\n */\ntypedef struct {\n    float filterCoefficient;\n    unsigned int timeout;\n    unsigned int timer;\n    FusionVector gyroscopeOffset;\n} FusionOffset;\n\n//------------------------------------------------------------------------------\n// Function declarations\n\nvoid FusionOffsetInitialise(FusionOffset *const offset, const unsigned int sampleRate);\n\nFusionVector FusionOffsetUpdate(FusionOffset *const offset, FusionVector gyroscope);\n\n#endif\n\n//------------------------------------------------------------------------------\n// End of file\n"
  },
  {
    "path": "src/GPSStatus.h",
    "content": "#pragma once\n#include \"NodeDB.h\"\n#include \"Status.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n\nnamespace meshtastic\n{\n\n/// Describes the state of the GPS system.\nclass GPSStatus : public Status\n{\n\n  private:\n    CallbackObserver<GPSStatus, const GPSStatus *> statusObserver =\n        CallbackObserver<GPSStatus, const GPSStatus *>(this, &GPSStatus::updateStatus);\n\n    bool hasLock = false;     // default to false, until we complete our first read\n    bool isConnected = false; // Do we have a GPS we are talking to\n\n    bool isPowerSaving = false; // Are we in power saving state\n\n    meshtastic_Position p = meshtastic_Position_init_default;\n\n    /// Time of last valid GPS fix (millis since boot)\n    uint32_t lastFixMillis = 0;\n\n  public:\n    GPSStatus() { statusType = STATUS_TYPE_GPS; }\n\n    // preferred method\n    GPSStatus(bool hasLock, bool isConnected, bool isPowerSaving, const meshtastic_Position &pos) : Status()\n    {\n        this->hasLock = hasLock;\n        this->isConnected = isConnected;\n        this->isPowerSaving = isPowerSaving;\n\n        // all-in-one struct copy\n        this->p = pos;\n    }\n\n    GPSStatus(const GPSStatus &);\n    GPSStatus &operator=(const GPSStatus &);\n\n    void observe(Observable<const GPSStatus *> *source) { statusObserver.observe(source); }\n\n    bool getHasLock() const { return hasLock; }\n\n    bool getIsConnected() const { return isConnected; }\n\n    bool getIsPowerSaving() const { return isPowerSaving; }\n\n    int32_t getLatitude() const\n    {\n        if (config.position.fixed_position) {\n            meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n            return node->position.latitude_i;\n        } else {\n            return p.latitude_i;\n        }\n    }\n\n    int32_t getLongitude() const\n    {\n        if (config.position.fixed_position) {\n            meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n            return node->position.longitude_i;\n        } else {\n            return p.longitude_i;\n        }\n    }\n\n    int32_t getAltitude() const\n    {\n        if (config.position.fixed_position) {\n            meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n            return node->position.altitude;\n        } else {\n            return p.altitude;\n        }\n    }\n\n    uint32_t getDOP() const { return p.PDOP; }\n\n    uint32_t getHeading() const { return p.ground_track; }\n\n    uint32_t getNumSatellites() const { return p.sats_in_view; }\n\n    /// Return millis() when the last GPS fix occurred (0 = never)\n    uint32_t getLastFixMillis() const { return lastFixMillis; }\n\n    bool matches(const GPSStatus *newStatus) const\n    {\n#ifdef GPS_DEBUG\n        LOG_DEBUG(\"GPSStatus.match() new pos@%x to old pos@%x\", newStatus->p.timestamp, p.timestamp);\n#endif\n        return (newStatus->hasLock != hasLock || newStatus->isConnected != isConnected ||\n                newStatus->isPowerSaving != isPowerSaving || newStatus->p.latitude_i != p.latitude_i ||\n                newStatus->p.longitude_i != p.longitude_i || newStatus->p.altitude != p.altitude ||\n                newStatus->p.altitude_hae != p.altitude_hae || newStatus->p.PDOP != p.PDOP ||\n                newStatus->p.ground_track != p.ground_track || newStatus->p.ground_speed != p.ground_speed ||\n                newStatus->p.sats_in_view != p.sats_in_view);\n    }\n\n    int updateStatus(const GPSStatus *newStatus)\n    {\n        // Only update the status if values have actually changed\n        bool isDirty = matches(newStatus);\n\n        if (isDirty && p.timestamp && (newStatus->p.timestamp == p.timestamp)) {\n            // We can NEVER be in two locations at the same time! (also PR #886)\n            LOG_ERROR(\"BUG: Positional timestamp unchanged from prev solution\");\n        }\n\n        initialized = true;\n        hasLock = newStatus->hasLock;\n        isConnected = newStatus->isConnected;\n\n        p = newStatus->p;\n\n        if (isDirty) {\n            if (hasLock) {\n                // Record time of last valid GPS fix\n                lastFixMillis = millis();\n\n                // In debug logs, identify position by @timestamp:stage (stage 3 = notify)\n                LOG_DEBUG(\"New GPS pos@%x:3 lat=%f lon=%f alt=%d pdop=%.2f track=%.2f speed=%.2f sats=%d\", p.timestamp,\n                          p.latitude_i * 1e-7, p.longitude_i * 1e-7, p.altitude, p.PDOP * 1e-2, p.ground_track * 1e-5,\n                          p.ground_speed * 1e-2, p.sats_in_view);\n            } else {\n                LOG_DEBUG(\"No GPS lock\");\n            }\n            onNewStatus.notifyObservers(this);\n        }\n        return 0;\n    }\n};\n\n} // namespace meshtastic\n\nextern meshtastic::GPSStatus *gpsStatus;\n"
  },
  {
    "path": "src/GpioLogic.cpp",
    "content": "#include \"GpioLogic.h\"\n#include <assert.h>\n\nvoid GpioVirtPin::set(bool value)\n{\n    if (value != this->value) {\n        this->value = value ? PinState::On : PinState::Off;\n        if (dependentPin)\n            dependentPin->update();\n    }\n}\n\nvoid GpioHwPin::set(bool value)\n{\n    pinMode(num, OUTPUT);\n    digitalWrite(num, value);\n}\n\nGpioTransformer::GpioTransformer(GpioPin *outPin) : outPin(outPin) {}\n\nvoid GpioTransformer::set(bool value)\n{\n    outPin->set(value);\n}\n\nGpioUnaryTransformer::GpioUnaryTransformer(GpioVirtPin *inPin, GpioPin *outPin) : GpioTransformer(outPin), inPin(inPin)\n{\n    assert(!inPin->dependentPin); // We only allow one dependent pin\n    inPin->dependentPin = this;\n\n    // Don't update at construction time, because various GpioPins might be global constructor based not yet initied because\n    // order of operations for global constructors is not defined.\n    // update();\n}\n\n/**\n * Update the output pin based on the current state of the input pin.\n */\nvoid GpioUnaryTransformer::update()\n{\n    auto p = inPin->get();\n    if (p == GpioVirtPin::PinState::Unset)\n        return; // Not yet fully initialized\n\n    set(p);\n}\n\n/**\n * Update the output pin based on the current state of the input pin.\n */\nvoid GpioNotTransformer::update()\n{\n    auto p = inPin->get();\n    if (p == GpioVirtPin::PinState::Unset)\n        return; // Not yet fully initialized\n\n    set(!p);\n}\n\nGpioBinaryTransformer::GpioBinaryTransformer(GpioVirtPin *inPin1, GpioVirtPin *inPin2, GpioPin *outPin, Operation operation)\n    : GpioTransformer(outPin), inPin1(inPin1), inPin2(inPin2), operation(operation)\n{\n    assert(!inPin1->dependentPin); // We only allow one dependent pin\n    inPin1->dependentPin = this;\n    assert(!inPin2->dependentPin); // We only allow one dependent pin\n    inPin2->dependentPin = this;\n\n    // Don't update at construction time, because various GpioPins might be global constructor based not yet initiated because\n    // order of operations for global constructors is not defined.\n    // update();\n}\n\nvoid GpioBinaryTransformer::update()\n{\n    auto p1 = inPin1->get(), p2 = inPin2->get();\n    GpioVirtPin::PinState newValue = GpioVirtPin::PinState::Unset;\n\n    if (p1 == GpioVirtPin::PinState::Unset)\n        newValue = p2; // Not yet fully initialized\n    else if (p2 == GpioVirtPin::PinState::Unset)\n        newValue = p1; // Not yet fully initialized\n\n    // If we've already found our value just use it, otherwise need to do the operation\n    if (newValue == GpioVirtPin::PinState::Unset) {\n        switch (operation) {\n        case And:\n            newValue = (GpioVirtPin::PinState)(p1 && p2);\n            break;\n        case Or:\n            newValue = (GpioVirtPin::PinState)(p1 || p2);\n            break;\n        case Xor:\n            newValue = (GpioVirtPin::PinState)(p1 != p2);\n            break;\n        default:\n            assert(false);\n        }\n    }\n    set(newValue);\n}\n\nGpioSplitter::GpioSplitter(GpioPin *outPin1, GpioPin *outPin2) : outPin1(outPin1), outPin2(outPin2) {}\n"
  },
  {
    "path": "src/GpioLogic.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n/**This is a set of classes to mediate access to GPIOs in a structured way.  Most usage of GPIOs do not\n    require these classes!  But if your hardware has a GPIO that is 'shared' between multiple devices (i.e. a shared power enable)\n    then using these classes might be able to let you cleanly turn on that enable when either dependent device is needed.\n\n    Note: these classes are intended to be 99% inline for the common case so should have minimal impact on flash or RAM\n   requirements.\n*/\n\n/**\n * A logical GPIO pin (not necessary raw hardware).\n */\nclass GpioPin\n{\n  public:\n    virtual void set(bool value) = 0;\n};\n\n/**\n * A physical GPIO hw pin.\n */\nclass GpioHwPin : public GpioPin\n{\n    uint32_t num;\n\n  public:\n    explicit GpioHwPin(uint32_t num) : num(num) {}\n\n    void set(bool value);\n};\n\nclass GpioTransformer;\nclass GpioNotTransformer;\nclass GpioBinaryTransformer;\n\n/**\n * A virtual GPIO pin.\n */\nclass GpioVirtPin : public GpioPin\n{\n    friend class GpioBinaryTransformer;\n    friend class GpioUnaryTransformer;\n\n  public:\n    enum PinState { On = true, Off = false, Unset = 2 };\n\n    void set(bool value);\n    PinState get() const { return value; }\n\n  private:\n    PinState value = PinState::Unset;\n    GpioTransformer *dependentPin = NULL;\n};\n\n#include <assert.h>\n\n/**\n * A 'smart' trigger that can depend in a fake GPIO and if that GPIO changes, drive some other downstream GPIO to change.\n * notably: the set method is not public (because it always is calculated by a subclass)\n */\nclass GpioTransformer\n{\n  public:\n    /**\n     * Update the output pin based on the current state of the input pin.\n     */\n    virtual void update() = 0;\n\n  protected:\n    GpioTransformer(GpioPin *outPin);\n\n    void set(bool value);\n\n  private:\n    GpioPin *outPin;\n};\n\n/**\n * A transformer that just drives a hw pin based on a virtual pin.\n */\nclass GpioUnaryTransformer : public GpioTransformer\n{\n  public:\n    GpioUnaryTransformer(GpioVirtPin *inPin, GpioPin *outPin);\n\n  protected:\n    friend class GpioVirtPin;\n\n    /**\n     * Update the output pin based on the current state of the input pin.\n     */\n    virtual void update();\n\n    GpioVirtPin *inPin;\n};\n\n/**\n * A transformer that performs a unary NOT operation from an input.\n */\nclass GpioNotTransformer : public GpioUnaryTransformer\n{\n  public:\n    GpioNotTransformer(GpioVirtPin *inPin, GpioPin *outPin) : GpioUnaryTransformer(inPin, outPin) {}\n\n  protected:\n    friend class GpioVirtPin;\n\n    /**\n     * Update the output pin based on the current state of the input pin.\n     */\n    void update();\n};\n\n/**\n * A transformer that combines multiple virtual pins to drive an output pin\n */\nclass GpioBinaryTransformer : public GpioTransformer\n{\n\n  public:\n    enum Operation { And, Or, Xor };\n\n    GpioBinaryTransformer(GpioVirtPin *inPin1, GpioVirtPin *inPin2, GpioPin *outPin, Operation operation);\n\n  protected:\n    friend class GpioVirtPin;\n\n    /**\n     * Update the output pin based on the current state of the input pins.\n     */\n    void update();\n\n  private:\n    GpioVirtPin *inPin1;\n    GpioVirtPin *inPin2;\n    Operation operation;\n};\n\n/**\n * Sometimes a single output GPIO single needs to drive multiple physical GPIOs.  This class provides that.\n */\nclass GpioSplitter : public GpioPin\n{\n\n  public:\n    GpioSplitter(GpioPin *outPin1, GpioPin *outPin2);\n\n    void set(bool value)\n    {\n        outPin1->set(value);\n        outPin2->set(value);\n    }\n\n  private:\n    GpioPin *outPin1;\n    GpioPin *outPin2;\n};"
  },
  {
    "path": "src/MessageStore.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"FSCommon.h\"\n#include \"MessageStore.h\"\n#include \"NodeDB.h\"\n#include \"SPILock.h\"\n#include \"SafeFile.h\"\n#include \"gps/RTC.h\"\n#include \"graphics/draw/MessageRenderer.h\"\n#include <cstring> // memcpy\n\n#ifndef MESSAGE_TEXT_POOL_SIZE\n#define MESSAGE_TEXT_POOL_SIZE (MAX_MESSAGES_SAVED * MAX_MESSAGE_SIZE)\n#endif\n\n// Default autosave interval 2 hours, override per device later with -DMESSAGE_AUTOSAVE_INTERVAL_SEC=300 (etc)\n#ifndef MESSAGE_AUTOSAVE_INTERVAL_SEC\n#define MESSAGE_AUTOSAVE_INTERVAL_SEC (2 * 60 * 60)\n#endif\n\n// Global message text pool and state\nstatic char *g_messagePool = nullptr;\nstatic size_t g_poolWritePos = 0;\n\n// Reset pool (called on boot or clear)\nstatic inline void resetMessagePool()\n{\n    if (!g_messagePool) {\n        g_messagePool = static_cast<char *>(malloc(MESSAGE_TEXT_POOL_SIZE));\n        if (!g_messagePool) {\n            LOG_ERROR(\"MessageStore: Failed to allocate %d bytes for message pool\", MESSAGE_TEXT_POOL_SIZE);\n            return;\n        }\n    }\n    g_poolWritePos = 0;\n    memset(g_messagePool, 0, MESSAGE_TEXT_POOL_SIZE);\n}\n\n// Allocate text in pool and return offset\n// If not enough space remains, wrap around (ring buffer style)\nstatic inline uint16_t storeTextInPool(const char *src, size_t len)\n{\n    if (len >= MAX_MESSAGE_SIZE)\n        len = MAX_MESSAGE_SIZE - 1;\n\n    // Wrap pool if out of space\n    if (g_poolWritePos + len + 1 >= MESSAGE_TEXT_POOL_SIZE) {\n        g_poolWritePos = 0;\n    }\n\n    uint16_t offset = g_poolWritePos;\n    memcpy(&g_messagePool[g_poolWritePos], src, len);\n    g_messagePool[g_poolWritePos + len] = '\\0';\n    g_poolWritePos += (len + 1);\n    return offset;\n}\n\n// Retrieve a const pointer to message text by offset\nstatic inline const char *getTextFromPool(uint16_t offset)\n{\n    if (!g_messagePool || offset >= MESSAGE_TEXT_POOL_SIZE)\n        return \"\";\n    return &g_messagePool[offset];\n}\n\n// Helper: assign a timestamp (RTC if available, else boot-relative)\nstatic inline void assignTimestamp(StoredMessage &sm)\n{\n    uint32_t nowSecs = getValidTime(RTCQuality::RTCQualityDevice, true);\n    if (nowSecs) {\n        sm.timestamp = nowSecs;\n        sm.isBootRelative = false;\n    } else {\n        sm.timestamp = millis() / 1000;\n        sm.isBootRelative = true;\n    }\n}\n\n// Generic push with cap (used by live + persisted queues)\ntemplate <typename T> static inline void pushWithLimit(std::deque<T> &queue, const T &msg)\n{\n    if (queue.size() >= MAX_MESSAGES_SAVED)\n        queue.pop_front();\n    queue.push_back(msg);\n}\n\ntemplate <typename T> static inline void pushWithLimit(std::deque<T> &queue, T &&msg)\n{\n    if (queue.size() >= MAX_MESSAGES_SAVED)\n        queue.pop_front();\n    queue.emplace_back(std::move(msg));\n}\n\nMessageStore::MessageStore(const std::string &label)\n{\n    filename = \"/Messages_\" + label + \".msgs\";\n    resetMessagePool(); // initialize text pool on boot\n}\n\n// Live message handling (RAM only)\nvoid MessageStore::addLiveMessage(StoredMessage &&msg)\n{\n    pushWithLimit(liveMessages, std::move(msg));\n}\nvoid MessageStore::addLiveMessage(const StoredMessage &msg)\n{\n    pushWithLimit(liveMessages, msg);\n}\n\n#if ENABLE_MESSAGE_PERSISTENCE\nstatic bool g_messageStoreHasUnsavedChanges = false;\nstatic uint32_t g_lastAutoSaveMs = 0; // last time we actually saved\n\nstatic inline uint32_t autosaveIntervalMs()\n{\n    uint32_t sec = (uint32_t)MESSAGE_AUTOSAVE_INTERVAL_SEC;\n    if (sec < 60)\n        sec = 60;\n    return sec * 1000UL;\n}\n\nstatic inline bool reachedMs(uint32_t now, uint32_t target)\n{\n    return (int32_t)(now - target) >= 0;\n}\n\n// Mark new messages in RAM that need to be saved later\nstatic inline void markMessageStoreUnsaved()\n{\n    g_messageStoreHasUnsavedChanges = true;\n\n    if (g_lastAutoSaveMs == 0) {\n        g_lastAutoSaveMs = millis();\n    }\n}\n\n// Called periodically from the main loop in main.cpp\nstatic inline void autosaveTick(MessageStore *store)\n{\n    if (!store)\n        return;\n\n    uint32_t now = millis();\n\n    if (g_lastAutoSaveMs == 0) {\n        g_lastAutoSaveMs = now;\n        return;\n    }\n\n    if (!reachedMs(now, g_lastAutoSaveMs + autosaveIntervalMs()))\n        return;\n\n    // Autosave interval reached, only save if there are unsaved messages.\n    if (g_messageStoreHasUnsavedChanges) {\n        LOG_INFO(\"Autosaving MessageStore to flash\");\n        store->saveToFlash();\n    } else {\n        LOG_INFO(\"Autosave skipped, no changes to save\");\n        g_lastAutoSaveMs = now;\n    }\n}\n#endif\n\n// Add from incoming/outgoing packet\nconst StoredMessage &MessageStore::addFromPacket(const meshtastic_MeshPacket &packet)\n{\n    StoredMessage sm;\n    assignTimestamp(sm);\n    sm.channelIndex = packet.channel;\n\n    const char *payload = reinterpret_cast<const char *>(packet.decoded.payload.bytes);\n    size_t len = strnlen(payload, MAX_MESSAGE_SIZE - 1);\n    sm.textOffset = storeTextInPool(payload, len);\n    sm.textLength = len;\n\n    // Determine sender\n    uint32_t localNode = nodeDB->getNodeNum();\n    sm.sender = (packet.from == 0) ? localNode : packet.from;\n\n    sm.dest = packet.to;\n\n    bool isDM = (sm.dest != 0 && sm.dest != NODENUM_BROADCAST);\n\n    if (packet.from == 0) {\n        sm.type = isDM ? MessageType::DM_TO_US : MessageType::BROADCAST;\n        sm.ackStatus = AckStatus::NONE;\n    } else {\n        sm.type = isDM ? MessageType::DM_TO_US : MessageType::BROADCAST;\n        sm.ackStatus = AckStatus::ACKED;\n    }\n\n    addLiveMessage(sm);\n\n#if ENABLE_MESSAGE_PERSISTENCE\n    markMessageStoreUnsaved();\n#endif\n\n    return liveMessages.back();\n}\n\n// Outgoing/manual message\nvoid MessageStore::addFromString(uint32_t sender, uint8_t channelIndex, const std::string &text)\n{\n    StoredMessage sm;\n\n    // Always use our local time (helper handles RTC vs boot time)\n    assignTimestamp(sm);\n\n    sm.sender = sender;\n    sm.channelIndex = channelIndex;\n    sm.textOffset = storeTextInPool(text.c_str(), text.size());\n    sm.textLength = text.size();\n\n    // Use the provided destination\n    sm.dest = sender;\n    sm.type = MessageType::DM_TO_US;\n\n    // Outgoing messages always start with unknown ack status\n    sm.ackStatus = AckStatus::NONE;\n\n    addLiveMessage(sm);\n\n#if ENABLE_MESSAGE_PERSISTENCE\n    markMessageStoreUnsaved();\n#endif\n}\n\n#if ENABLE_MESSAGE_PERSISTENCE\n\n// Compact, fixed-size on-flash representation using offset + length\nstruct __attribute__((packed)) StoredMessageRecord {\n    uint32_t timestamp;\n    uint32_t sender;\n    uint8_t channelIndex;\n    uint32_t dest;\n    uint8_t isBootRelative;\n    uint8_t ackStatus;           // static_cast<uint8_t>(AckStatus)\n    uint8_t type;                // static_cast<uint8_t>(MessageType)\n    uint16_t textLength;         // message length\n    char text[MAX_MESSAGE_SIZE]; // store actual text here\n};\n\n// Serialize one StoredMessage to flash\nstatic inline void writeMessageRecord(SafeFile &f, const StoredMessage &m)\n{\n    StoredMessageRecord rec = {};\n    rec.timestamp = m.timestamp;\n    rec.sender = m.sender;\n    rec.channelIndex = m.channelIndex;\n    rec.dest = m.dest;\n    rec.isBootRelative = m.isBootRelative;\n    rec.ackStatus = static_cast<uint8_t>(m.ackStatus);\n    rec.type = static_cast<uint8_t>(m.type);\n    rec.textLength = m.textLength;\n\n    // Copy the actual text into the record from RAM pool\n    const char *txt = getTextFromPool(m.textOffset);\n    strncpy(rec.text, txt, MAX_MESSAGE_SIZE - 1);\n    rec.text[MAX_MESSAGE_SIZE - 1] = '\\0';\n\n    f.write(reinterpret_cast<const uint8_t *>(&rec), sizeof(rec));\n}\n\n// Deserialize one StoredMessage from flash; returns false on short read\nstatic inline bool readMessageRecord(File &f, StoredMessage &m)\n{\n    StoredMessageRecord rec = {};\n    if (f.readBytes(reinterpret_cast<char *>(&rec), sizeof(rec)) != sizeof(rec))\n        return false;\n\n    m.timestamp = rec.timestamp;\n    m.sender = rec.sender;\n    m.channelIndex = rec.channelIndex;\n    m.dest = rec.dest;\n    m.isBootRelative = rec.isBootRelative;\n    m.ackStatus = static_cast<AckStatus>(rec.ackStatus);\n    m.type = static_cast<MessageType>(rec.type);\n    m.textLength = rec.textLength;\n\n    // 💡 Re-store text into pool and update offset\n    m.textLength = strnlen(rec.text, MAX_MESSAGE_SIZE - 1);\n    m.textOffset = storeTextInPool(rec.text, m.textLength);\n\n    return true;\n}\n\nvoid MessageStore::saveToFlash()\n{\n#ifdef FSCom\n    // Ensure root exists\n    spiLock->lock();\n    FSCom.mkdir(\"/\");\n    spiLock->unlock();\n\n    SafeFile f(filename.c_str(), false);\n\n    spiLock->lock();\n    uint8_t count = static_cast<uint8_t>(liveMessages.size());\n    if (count > MAX_MESSAGES_SAVED)\n        count = MAX_MESSAGES_SAVED;\n    f.write(&count, 1);\n\n    for (uint8_t i = 0; i < count; ++i) {\n        writeMessageRecord(f, liveMessages[i]);\n    }\n    spiLock->unlock();\n\n    f.close();\n#endif\n\n    // Reset autosave state after any save\n    g_messageStoreHasUnsavedChanges = false;\n    g_lastAutoSaveMs = millis();\n}\n\nvoid MessageStore::loadFromFlash()\n{\n    std::deque<StoredMessage>().swap(liveMessages);\n    resetMessagePool(); // reset pool when loading\n\n#ifdef FSCom\n    concurrency::LockGuard guard(spiLock);\n\n    if (!FSCom.exists(filename.c_str()))\n        return;\n\n    auto f = FSCom.open(filename.c_str(), FILE_O_READ);\n    if (!f)\n        return;\n\n    uint8_t count = 0;\n    f.readBytes(reinterpret_cast<char *>(&count), 1);\n    if (count > MAX_MESSAGES_SAVED)\n        count = MAX_MESSAGES_SAVED;\n\n    for (uint8_t i = 0; i < count; ++i) {\n        StoredMessage m;\n        if (!readMessageRecord(f, m))\n            break;\n        liveMessages.push_back(m);\n    }\n\n    f.close();\n#endif\n    // Loading messages does not trigger an autosave\n    g_messageStoreHasUnsavedChanges = false;\n    g_lastAutoSaveMs = millis();\n}\n\n#else\n// If persistence is disabled, these functions become no-ops\nvoid MessageStore::saveToFlash() {}\nvoid MessageStore::loadFromFlash() {}\n#endif\n\n// Clear all messages (RAM + persisted queue)\nvoid MessageStore::clearAllMessages()\n{\n    std::deque<StoredMessage>().swap(liveMessages);\n    resetMessagePool();\n\n#ifdef FSCom\n    SafeFile f(filename.c_str(), false);\n    uint8_t count = 0;\n    f.write(&count, 1); // write \"0 messages\"\n    f.close();\n#endif\n\n#if ENABLE_MESSAGE_PERSISTENCE\n    g_messageStoreHasUnsavedChanges = false;\n    g_lastAutoSaveMs = millis();\n#endif\n}\n\n// Internal helper: erase first or last message matching a predicate\ntemplate <typename Predicate> static void eraseIf(std::deque<StoredMessage> &deque, Predicate pred, bool fromBack = false)\n{\n    if (fromBack) {\n        // Iterate from the back and erase all matches from the end\n        for (auto it = deque.rbegin(); it != deque.rend();) {\n            if (pred(*it)) {\n                it = std::deque<StoredMessage>::reverse_iterator(deque.erase(std::next(it).base()));\n            } else {\n                ++it;\n            }\n        }\n    } else {\n        // Manual forward search to erase all matches\n        for (auto it = deque.begin(); it != deque.end();) {\n            if (pred(*it)) {\n                it = deque.erase(it);\n            } else {\n                ++it;\n            }\n        }\n    }\n}\n\n// Delete oldest message (RAM + persisted queue)\nvoid MessageStore::deleteOldestMessage()\n{\n    eraseIf(liveMessages, [](StoredMessage &) { return true; });\n    saveToFlash();\n}\n\n// Delete oldest message in a specific channel\nvoid MessageStore::deleteOldestMessageInChannel(uint8_t channel)\n{\n    auto pred = [channel](const StoredMessage &m) { return m.type == MessageType::BROADCAST && m.channelIndex == channel; };\n    eraseIf(liveMessages, pred);\n    saveToFlash();\n}\n\nvoid MessageStore::deleteAllMessagesInChannel(uint8_t channel)\n{\n    auto pred = [channel](const StoredMessage &m) { return m.type == MessageType::BROADCAST && m.channelIndex == channel; };\n    eraseIf(liveMessages, pred, false /* delete ALL, not just first */);\n    saveToFlash();\n}\n\nvoid MessageStore::deleteAllMessagesWithPeer(uint32_t peer)\n{\n    uint32_t local = nodeDB->getNodeNum();\n    auto pred = [&](const StoredMessage &m) {\n        if (m.type != MessageType::DM_TO_US)\n            return false;\n        uint32_t other = (m.sender == local) ? m.dest : m.sender;\n        return other == peer;\n    };\n    eraseIf(liveMessages, pred, false);\n    saveToFlash();\n}\n\n// Delete oldest message in a direct chat with a node\nvoid MessageStore::deleteOldestMessageWithPeer(uint32_t peer)\n{\n    auto pred = [peer](const StoredMessage &m) {\n        if (m.type != MessageType::DM_TO_US)\n            return false;\n        uint32_t other = (m.sender == nodeDB->getNodeNum()) ? m.dest : m.sender;\n        return other == peer;\n    };\n    eraseIf(liveMessages, pred);\n    saveToFlash();\n}\n\nstd::deque<StoredMessage> MessageStore::getChannelMessages(uint8_t channel) const\n{\n    std::deque<StoredMessage> result;\n    for (const auto &m : liveMessages) {\n        if (m.type == MessageType::BROADCAST && m.channelIndex == channel) {\n            result.push_back(m);\n        }\n    }\n    return result;\n}\n\nstd::deque<StoredMessage> MessageStore::getDirectMessages() const\n{\n    std::deque<StoredMessage> result;\n    for (const auto &m : liveMessages) {\n        if (m.type == MessageType::DM_TO_US) {\n            result.push_back(m);\n        }\n    }\n    return result;\n}\n\n// Upgrade boot-relative timestamps once RTC is valid\n// Only same-boot boot-relative messages are healed.\n// Persisted boot-relative messages from old boots stay ??? forever.\nvoid MessageStore::upgradeBootRelativeTimestamps()\n{\n    uint32_t nowSecs = getValidTime(RTCQuality::RTCQualityDevice, true);\n    if (nowSecs == 0)\n        return; // Still no valid RTC\n\n    uint32_t bootNow = millis() / 1000;\n\n    auto fix = [&](std::deque<StoredMessage> &dq) {\n        for (auto &m : dq) {\n            if (m.isBootRelative && m.timestamp <= bootNow) {\n                uint32_t bootOffset = nowSecs - bootNow;\n                m.timestamp += bootOffset;\n                m.isBootRelative = false;\n            }\n        }\n    };\n    fix(liveMessages);\n}\n\nconst char *MessageStore::getText(const StoredMessage &msg)\n{\n    // Wrapper around the internal helper\n    return getTextFromPool(msg.textOffset);\n}\n\nuint16_t MessageStore::storeText(const char *src, size_t len)\n{\n    // Wrapper around the internal helper\n    return storeTextInPool(src, len);\n}\n\n#if ENABLE_MESSAGE_PERSISTENCE\nvoid messageStoreAutosaveTick()\n{\n    // Called from the main loop to check autosave timing\n    autosaveTick(&messageStore);\n}\n#endif\n\n// Global definition\nMessageStore messageStore(\"default\");\n#endif\n"
  },
  {
    "path": "src/MessageStore.h",
    "content": "#pragma once\n\n#if HAS_SCREEN\n\n// Disable debug logging entirely on release builds of HELTEC_MESH_SOLAR for space constraints\n#if defined(HELTEC_MESH_SOLAR)\n#define LOG_DEBUG(...)\n#endif\n\n// Enable or disable message persistence (flash storage)\n// Define -DENABLE_MESSAGE_PERSISTENCE=0 in build_flags to disable it entirely\n#ifndef ENABLE_MESSAGE_PERSISTENCE\n#define ENABLE_MESSAGE_PERSISTENCE 1\n#endif\n\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n#include <cstdint>\n#include <deque>\n#include <string>\n\n// How many messages are stored (RAM + flash).\n// Define -DMESSAGE_HISTORY_LIMIT=N in build_flags to control memory usage.\n#ifndef MESSAGE_HISTORY_LIMIT\n#define MESSAGE_HISTORY_LIMIT 20\n#endif\n\n// Internal alias used everywhere in code – do NOT redefine elsewhere.\n#define MAX_MESSAGES_SAVED MESSAGE_HISTORY_LIMIT\n\n// Maximum text payload size per message in bytes.\n// This still defines the max message length, but we no longer reserve this space per message.\n#define MAX_MESSAGE_SIZE 220\n\n// Total shared text pool size for all messages combined.\n// The text pool is RAM-only. Text is re-stored from flash into the pool on boot.\n#ifndef MESSAGE_TEXT_POOL_SIZE\n#define MESSAGE_TEXT_POOL_SIZE (MAX_MESSAGES_SAVED * MAX_MESSAGE_SIZE)\n#endif\n\n// Explicit message classification\nenum class MessageType : uint8_t {\n    BROADCAST = 0, // broadcast message\n    DM_TO_US = 1   // direct message addressed to this node\n};\n\n// Delivery status for messages we sent\nenum class AckStatus : uint8_t {\n    NONE = 0,    // just sent, waiting (no symbol shown)\n    ACKED = 1,   // got a valid ACK from destination\n    NACKED = 2,  // explicitly failed\n    TIMEOUT = 3, // no ACK after retry window\n    RELAYED = 4  // got an ACK from relay, not destination\n};\n\nstruct StoredMessage {\n    uint32_t timestamp;   // When message was created (secs since boot or RTC)\n    uint32_t sender;      // NodeNum of sender\n    uint8_t channelIndex; // Channel index used\n    uint32_t dest;        // Destination node (broadcast or direct)\n    MessageType type;     // Derived from dest (explicit classification)\n    bool isBootRelative;  // true = millis()/1000 fallback; false = epoch/RTC absolute\n    AckStatus ackStatus;  // Delivery status (only meaningful for our own sent messages)\n\n    // Text storage metadata — rebuilt from flash at boot\n    uint16_t textOffset; // Offset into global text pool (valid only after loadFromFlash())\n    uint16_t textLength; // Length of text in bytes\n\n    // Default constructor initializes all fields safely\n    StoredMessage()\n        : timestamp(0), sender(0), channelIndex(0), dest(0xffffffff), type(MessageType::BROADCAST), isBootRelative(false),\n          ackStatus(AckStatus::NONE), textOffset(0), textLength(0)\n    {\n    }\n};\n\nclass MessageStore\n{\n  public:\n    explicit MessageStore(const std::string &label);\n\n    // Live RAM methods (always current, used by UI and runtime)\n    void addLiveMessage(StoredMessage &&msg);\n    void addLiveMessage(const StoredMessage &msg); // convenience overload\n    const std::deque<StoredMessage> &getLiveMessages() const { return liveMessages; }\n\n    // Add new messages from packets or manual input\n    const StoredMessage &addFromPacket(const meshtastic_MeshPacket &mp);                // Incoming/outgoing → RAM only\n    void addFromString(uint32_t sender, uint8_t channelIndex, const std::string &text); // Manual add\n\n    // Persistence methods (used only on boot/shutdown)\n    void saveToFlash();   // Save messages to flash\n    void loadFromFlash(); // Load messages from flash\n\n    // Clear all messages (RAM + persisted queue + text pool)\n    void clearAllMessages();\n\n    // Delete helpers\n    void deleteOldestMessage(); // remove oldest from RAM (and flash on save)\n    void deleteOldestMessageInChannel(uint8_t channel);\n    void deleteOldestMessageWithPeer(uint32_t peer);\n    void deleteAllMessagesInChannel(uint8_t channel);\n    void deleteAllMessagesWithPeer(uint32_t peer);\n\n    // Unified accessor (for UI code, defaults to RAM buffer)\n    const std::deque<StoredMessage> &getMessages() const { return liveMessages; }\n\n    // Helper filters for future use\n    std::deque<StoredMessage> getChannelMessages(uint8_t channel) const; // Only broadcast messages on a channel\n    std::deque<StoredMessage> getDirectMessages() const;                 // Only direct messages\n\n    // Upgrade boot-relative timestamps once RTC is valid\n    void upgradeBootRelativeTimestamps();\n\n    // Retrieve the C-string text for a stored message\n    static const char *getText(const StoredMessage &msg);\n\n    // Allocate text into pool (used by sender-side code)\n    static uint16_t storeText(const char *src, size_t len);\n\n    // Used when loading from flash to rebuild the text pool\n    static uint16_t rebuildTextFromFlash(const char *src, size_t len);\n\n  private:\n    std::deque<StoredMessage> liveMessages; // Single in-RAM message buffer (also used for persistence)\n    std::string filename;                   // Flash filename for persistence\n};\n\n#if ENABLE_MESSAGE_PERSISTENCE\n// Called periodically from main loop to trigger time based autosave\nvoid messageStoreAutosaveTick();\n#endif\n\n// Global instance (defined in MessageStore.cpp)\nextern MessageStore messageStore;\n\n#endif\n"
  },
  {
    "path": "src/NodeStatus.h",
    "content": "#pragma once\n#include \"Status.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n\nnamespace meshtastic\n{\n\n/// Describes the state of the NodeDB system.\nclass NodeStatus : public Status\n{\n\n  private:\n    CallbackObserver<NodeStatus, const NodeStatus *> statusObserver =\n        CallbackObserver<NodeStatus, const NodeStatus *>(this, &NodeStatus::updateStatus);\n\n    uint16_t numOnline = 0;\n    uint16_t numTotal = 0;\n\n    uint16_t lastNumTotal = 0;\n\n  public:\n    bool forceUpdate = false;\n\n    NodeStatus() { statusType = STATUS_TYPE_NODE; }\n    NodeStatus(uint16_t numOnline, uint16_t numTotal, bool forceUpdate = false) : Status()\n    {\n        this->forceUpdate = forceUpdate;\n        this->numOnline = numOnline;\n        this->numTotal = numTotal;\n    }\n    NodeStatus(const NodeStatus &);\n    NodeStatus &operator=(const NodeStatus &);\n\n    void observe(Observable<const NodeStatus *> *source) { statusObserver.observe(source); }\n\n    uint16_t getNumOnline() const { return numOnline; }\n\n    uint16_t getNumTotal() const { return numTotal; }\n\n    uint16_t getLastNumTotal() const { return lastNumTotal; }\n\n    bool matches(const NodeStatus *newStatus) const\n    {\n        return (newStatus->getNumOnline() != numOnline || newStatus->getNumTotal() != numTotal);\n    }\n    int updateStatus(const NodeStatus *newStatus)\n    {\n        // Only update the status if values have actually changed\n        lastNumTotal = numTotal;\n        bool isDirty;\n        {\n            isDirty = matches(newStatus);\n            initialized = true;\n            numOnline = newStatus->getNumOnline();\n            numTotal = newStatus->getNumTotal();\n        }\n        if (isDirty || newStatus->forceUpdate) {\n            LOG_DEBUG(\"Node status update: %u online, %u total\", numOnline, numTotal);\n            onNewStatus.notifyObservers(this);\n        }\n        return 0;\n    }\n};\n\n} // namespace meshtastic\n\nextern meshtastic::NodeStatus *nodeStatus;"
  },
  {
    "path": "src/Observer.cpp",
    "content": "#include \"Observer.h\"\n#include \"configuration.h\"\n"
  },
  {
    "path": "src/Observer.h",
    "content": "#pragma once\n\n#include <Arduino.h>\n#include <list>\n\ntemplate <class T> class Observable;\n\n/**\n * An observer which can be mixed in as a baseclass.  Implement onNotify as a method in your class.\n */\ntemplate <class T> class Observer\n{\n    std::list<Observable<T> *> observables;\n\n  public:\n    virtual ~Observer();\n\n    /// Stop watching the observable\n    void unobserve(Observable<T> *o);\n\n    /// Start watching a specified observable\n    void observe(Observable<T> *o);\n\n  private:\n    friend class Observable<T>;\n\n  protected:\n    /**\n     * returns 0 if other observers should continue to be called\n     * returns !0 if the observe calls should be aborted and this result code returned for notifyObservers\n     **/\n    virtual int onNotify(T arg) = 0;\n};\n\n/**\n * An observer that calls an arbitrary method\n */\ntemplate <class Callback, class T> class CallbackObserver : public Observer<T>\n{\n    typedef int (Callback::*ObserverCallback)(T arg);\n\n    Callback *objPtr;\n    ObserverCallback method;\n\n  public:\n    CallbackObserver(Callback *_objPtr, ObserverCallback _method) : objPtr(_objPtr), method(_method) {}\n\n  protected:\n    virtual int onNotify(T arg) override { return (objPtr->*method)(arg); }\n};\n\n/**\n * An observable class that will notify observers anytime notifyObservers is called.  Argument type T can be any type, but for\n * performance reasons a pointer or word sized object is recommended.\n */\ntemplate <class T> class Observable\n{\n    std::list<Observer<T> *> observers;\n\n  public:\n    /**\n     * Tell all observers about a change, observers can process arg as they wish\n     *\n     * returns !0 if an observer chose to abort processing by returning this code\n     */\n    int notifyObservers(T arg)\n    {\n        for (typename std::list<Observer<T> *>::const_iterator iterator = observers.begin(); iterator != observers.end();\n             ++iterator) {\n            int result = (*iterator)->onNotify(arg);\n            if (result != 0)\n                return result;\n        }\n\n        return 0;\n    }\n\n  private:\n    friend class Observer<T>;\n\n    // Not called directly, instead call observer.observe\n    void addObserver(Observer<T> *o) { observers.push_back(o); }\n\n    void removeObserver(Observer<T> *o) { observers.remove(o); }\n};\n\ntemplate <class T> Observer<T>::~Observer()\n{\n    for (typename std::list<Observable<T> *>::const_iterator iterator = observables.begin(); iterator != observables.end();\n         ++iterator) {\n        (*iterator)->removeObserver(this);\n    }\n    observables.clear();\n}\n\ntemplate <class T> void Observer<T>::unobserve(Observable<T> *o)\n{\n    o->removeObserver(this);\n    observables.remove(o);\n}\n\ntemplate <class T> void Observer<T>::observe(Observable<T> *o)\n{\n    observables.push_back(o);\n    o->addObserver(this);\n}"
  },
  {
    "path": "src/Power.cpp",
    "content": "/**\n * @file Power.cpp\n * @brief This file contains the implementation of the Power class, which is\n * responsible for managing power-related functionality of the device. It\n * includes battery level sensing, power management unit (PMU) control, and\n * power state machine management. The Power class is used by the main device\n * class to manage power-related functionality.\n *\n * The file also includes implementations of various battery level sensors, such\n * as the AnalogBatteryLevel class, which assumes the battery voltage is\n * attached via a voltage-divider to an analog input.\n *\n * This file is part of the Meshtastic project.\n * For more information, see: https://meshtastic.org/\n */\n#include \"power.h\"\n#include \"MessageStore.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"Throttle.h\"\n#include \"buzz/buzz.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"meshUtils.h\"\n#include \"power/PowerHAL.h\"\n#include \"sleep.h\"\n\n#if defined(ARCH_PORTDUINO)\n#include \"api/WiFiServerAPI.h\"\n#include \"input/LinuxInputImpl.h\"\n#endif\n\n// Working USB detection for powered/charging states on the RAK platform\n#ifdef NRF_APM\n#include \"nrfx_power.h\"\n#endif\n\n#if defined(DEBUG_HEAP_MQTT) && !MESHTASTIC_EXCLUDE_MQTT\n#include \"mqtt/MQTT.h\"\n#include \"target_specific.h\"\n#if HAS_WIFI\n#include <WiFi.h>\n#endif\n\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n\n#endif\n\n#ifndef DELAY_FOREVER\n#define DELAY_FOREVER portMAX_DELAY\n#endif\n\n#if defined(BATTERY_PIN) && defined(ARCH_ESP32)\n\n#ifndef BAT_MEASURE_ADC_UNIT // ADC1 is default\nstatic const adc1_channel_t adc_channel = ADC_CHANNEL;\nstatic const adc_unit_t unit = ADC_UNIT_1;\n#else // ADC2\nstatic const adc2_channel_t adc_channel = ADC_CHANNEL;\nstatic const adc_unit_t unit = ADC_UNIT_2;\nRTC_NOINIT_ATTR uint64_t RTC_reg_b;\n\n#endif // BAT_MEASURE_ADC_UNIT\n\nesp_adc_cal_characteristics_t *adc_characs = (esp_adc_cal_characteristics_t *)calloc(1, sizeof(esp_adc_cal_characteristics_t));\n#ifndef ADC_ATTENUATION\nstatic const adc_atten_t atten = ADC_ATTEN_DB_12;\n#else\nstatic const adc_atten_t atten = ADC_ATTENUATION;\n#endif\n#endif // BATTERY_PIN && ARCH_ESP32\n\n#ifdef EXT_CHRG_DETECT\n#ifndef EXT_CHRG_DETECT_MODE\nstatic const uint8_t ext_chrg_detect_mode = INPUT;\n#else\nstatic const uint8_t ext_chrg_detect_mode = EXT_CHRG_DETECT_MODE;\n#endif\n#ifndef EXT_CHRG_DETECT_VALUE\nstatic const uint8_t ext_chrg_detect_value = HIGH;\n#else\nstatic const uint8_t ext_chrg_detect_value = EXT_CHRG_DETECT_VALUE;\n#endif\n#endif\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n#if __has_include(<Adafruit_INA219.h>)\nINA219Sensor ina219Sensor;\n#else\nNullSensor ina219Sensor;\n#endif\n\n#if __has_include(<INA226.h>)\nINA226Sensor ina226Sensor;\n#else\nNullSensor ina226Sensor;\n#endif\n\n#if __has_include(<Adafruit_INA260.h>)\nINA260Sensor ina260Sensor;\n#else\nNullSensor ina260Sensor;\n#endif\n\n#if __has_include(<INA3221.h>)\nINA3221Sensor ina3221Sensor;\n#else\nNullSensor ina3221Sensor;\n#endif\n\n#endif\n\n#if !MESHTASTIC_EXCLUDE_I2C\n#include \"modules/Telemetry/Sensor/MAX17048Sensor.h\"\n#include <utility>\nextern std::pair<uint8_t, TwoWire *> nodeTelemetrySensorsMap[_meshtastic_TelemetrySensorType_MAX + 1];\n#if HAS_TELEMETRY && (!MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_POWER_TELEMETRY)\n#if __has_include(<Adafruit_MAX1704X.h>)\nMAX17048Sensor max17048Sensor;\n#else\nNullSensor max17048Sensor;\n#endif\n#endif\n#endif\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && HAS_RAKPROT\nRAK9154Sensor rak9154Sensor;\n#endif\n\n#ifdef HAS_PPM\n// note: XPOWERS_CHIP_XXX must be defined in variant.h\n#include <XPowersLib.h>\nXPowersPPM *PPM = NULL;\n#endif\n\n#ifdef HAS_BQ27220\n#include \"bq27220.h\"\n#endif\n\n#ifdef HAS_PMU\nXPowersLibInterface *PMU = NULL;\n#else\n\n// Copy of the base class defined in axp20x.h.\n// I'd rather not include axp20x.h as it brings Wire dependency.\nclass HasBatteryLevel\n{\n  public:\n    /**\n     * Battery state of charge, from 0 to 100 or -1 for unknown\n     */\n    virtual int getBatteryPercent() { return -1; }\n\n    /**\n     * The raw voltage of the battery or NAN if unknown\n     */\n    virtual uint16_t getBattVoltage() { return 0; }\n\n    /**\n     * return true if there is a battery installed in this unit\n     */\n    virtual bool isBatteryConnect() { return false; }\n\n    virtual bool isVbusIn() { return false; }\n    virtual bool isCharging() { return false; }\n};\n#endif\n\nbool pmu_irq = false;\n\nPower *power;\n\nusing namespace meshtastic;\n\n// NRF52 has AREF_VOLTAGE defined in architecture.h but\n// make sure it's included. If something is wrong with NRF52\n// definition - compilation will fail on missing definition\n#if !defined(AREF_VOLTAGE) && !defined(ARCH_NRF52)\n#define AREF_VOLTAGE 3.3\n#endif\n\n/**\n * If this board has a battery level sensor, set this to a valid implementation\n */\nstatic HasBatteryLevel *batteryLevel; // Default to NULL for no battery level sensor\n\n#ifdef BATTERY_PIN\n\nvoid battery_adcEnable()\n{\n#ifdef ADC_CTRL // enable adc voltage divider when we need to read\n#ifdef ADC_USE_PULLUP\n    pinMode(ADC_CTRL, INPUT_PULLUP);\n#else\n#ifdef HELTEC_V3\n    pinMode(ADC_CTRL, INPUT);\n    uint8_t adc_ctl_enable_value = !(digitalRead(ADC_CTRL));\n    pinMode(ADC_CTRL, OUTPUT);\n    digitalWrite(ADC_CTRL, adc_ctl_enable_value);\n#else\n    pinMode(ADC_CTRL, OUTPUT);\n    digitalWrite(ADC_CTRL, ADC_CTRL_ENABLED);\n#endif\n#endif\n    delay(10);\n#endif\n}\n\nstatic void battery_adcDisable()\n{\n#ifdef ADC_CTRL // disable adc voltage divider when we need to read\n#ifdef ADC_USE_PULLUP\n    pinMode(ADC_CTRL, INPUT_PULLDOWN);\n#else\n#ifdef HELTEC_V3\n    pinMode(ADC_CTRL, ANALOG);\n#else\n    digitalWrite(ADC_CTRL, !ADC_CTRL_ENABLED);\n#endif\n#endif\n#endif\n}\n\n#endif\n\n/**\n * A simple battery level sensor that assumes the battery voltage is attached\n * via a voltage-divider to an analog input\n */\nclass AnalogBatteryLevel : public HasBatteryLevel\n{\n  public:\n    /**\n     * Battery state of charge, from 0 to 100 or -1 for unknown\n     */\n    virtual int getBatteryPercent() override\n    {\n#if defined(HAS_RAKPROT) && !defined(HAS_PMU)\n        if (hasRAK()) {\n            return rak9154Sensor.getBusBatteryPercent();\n        }\n#endif\n\n        float v = getBattVoltage();\n\n        if (v < noBatVolt)\n            return -1; // If voltage is super low assume no battery installed\n\n#ifdef NO_BATTERY_LEVEL_ON_CHARGE\n        // This does not work on a RAK4631 with battery connected\n        if (v > chargingVolt)\n            return 0; // While charging we can't report % full on the battery\n#endif\n        /**\n         * @brief   Battery voltage lookup table interpolation to obtain a more\n         * precise percentage rather than the old proportional one.\n         * @author  Gabriele Russo\n         * @date    06/02/2024\n         */\n        float battery_SOC = 0.0;\n        uint16_t voltage = v / NUM_CELLS; // single cell voltage (average)\n        for (int i = 0; i < NUM_OCV_POINTS; i++) {\n            if (OCV[i] <= voltage) {\n                if (i == 0) {\n                    battery_SOC = 100.0; // 100% full\n                } else {\n                    // interpolate between OCV[i] and OCV[i-1]\n                    battery_SOC = (float)100.0 / (NUM_OCV_POINTS - 1.0) *\n                                  (NUM_OCV_POINTS - 1.0 - i + ((float)voltage - OCV[i]) / (OCV[i - 1] - OCV[i]));\n                }\n                break;\n            }\n        }\n#if defined(BATTERY_CHARGING_INV)\n        // bit of trickery to show 99% up until the charge finishes\n        if (!digitalRead(BATTERY_CHARGING_INV) && battery_SOC > 99)\n            battery_SOC = 99;\n#endif\n        return clamp((int)(battery_SOC), 0, 100);\n    }\n\n    /**\n     * The raw voltage of the batteryin millivolts or NAN if unknown\n     */\n    virtual uint16_t getBattVoltage() override\n    {\n\n#if HAS_TELEMETRY && defined(HAS_RAKPROT) && !defined(HAS_PMU) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n        if (hasRAK()) {\n            return getRAKVoltage();\n        }\n#endif\n\n#if HAS_TELEMETRY && !defined(HAS_PMU) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n        if (hasINA()) {\n            return getINAVoltage();\n        }\n#endif\n\n#ifndef ADC_MULTIPLIER\n#define ADC_MULTIPLIER 2.0\n#endif\n\n#ifndef BATTERY_SENSE_SAMPLES\n#define BATTERY_SENSE_SAMPLES                                                                                                    \\\n    15 // Set the number of samples, it has an effect of increasing sensitivity in\n       // complex electromagnetic environment.\n#endif\n\n#ifdef BATTERY_PIN\n        // Override variant or default ADC_MULTIPLIER if we have the override pref\n        float operativeAdcMultiplier =\n            config.power.adc_multiplier_override > 0 ? config.power.adc_multiplier_override : ADC_MULTIPLIER;\n        // Do not call analogRead() often.\n        const uint32_t min_read_interval = 5000;\n        if (!initial_read_done || !Throttle::isWithinTimespanMs(last_read_time_ms, min_read_interval)) {\n            last_read_time_ms = millis();\n\n            uint32_t raw = 0;\n            float scaled = 0;\n\n            battery_adcEnable();\n#ifdef ARCH_ESP32 // ADC block for espressif platforms\n            raw = espAdcRead();\n            scaled = esp_adc_cal_raw_to_voltage(raw, adc_characs);\n            scaled *= operativeAdcMultiplier;\n#else // block for all other platforms\n            for (uint32_t i = 0; i < BATTERY_SENSE_SAMPLES; i++) {\n                raw += analogRead(BATTERY_PIN);\n            }\n            raw = raw / BATTERY_SENSE_SAMPLES;\n            scaled = operativeAdcMultiplier * ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * raw;\n#endif\n            battery_adcDisable();\n\n            if (!initial_read_done) {\n                // Flush the smoothing filter with an ADC reading, if the reading is\n                // plausibly correct\n                if (scaled > last_read_value)\n                    last_read_value = scaled;\n                initial_read_done = true;\n            } else {\n                // Already initialized - filter this reading\n                last_read_value += (scaled - last_read_value) * 0.5; // Virtual LPF\n            }\n\n            // LOG_DEBUG(\"battery gpio %d raw val=%u scaled=%u filtered=%u\",\n            // BATTERY_PIN, raw, (uint32_t)(scaled), (uint32_t) (last_read_value));\n        }\n        return last_read_value;\n#endif // BATTERY_PIN\n        return 0;\n    }\n\n#if defined(ARCH_ESP32) && !defined(HAS_PMU) && defined(BATTERY_PIN)\n    /**\n     * ESP32 specific function for getting calibrated ADC reads\n     */\n    uint32_t espAdcRead()\n    {\n\n        uint32_t raw = 0;\n        uint8_t raw_c = 0; // raw reading counter\n\n#ifndef BAT_MEASURE_ADC_UNIT // ADC1\n        for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) {\n            int val_ = adc1_get_raw(adc_channel);\n            if (val_ >= 0) { // save only valid readings\n                raw += val_;\n                raw_c++;\n            }\n            // delayMicroseconds(100);\n        }\n#else                            // ADC2\n#ifdef CONFIG_IDF_TARGET_ESP32S3 // ESP32S3\n        // ADC2 wifi bug workaround not required, breaks compile\n        // On ESP32S3, ADC2 can take turns with Wifi (?)\n\n        int32_t adc_buf;\n        esp_err_t read_result;\n\n        // Multiple samples\n        for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) {\n            adc_buf = 0;\n            read_result = -1;\n\n            read_result = adc2_get_raw(adc_channel, ADC_WIDTH_BIT_12, &adc_buf);\n            if (read_result == ESP_OK) {\n                raw += adc_buf;\n                raw_c++; // Count valid samples\n            } else {\n                LOG_DEBUG(\"An attempt to sample ADC2 failed\");\n            }\n        }\n\n#else  // Other ESP32\n        int32_t adc_buf = 0;\n        for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) {\n            // ADC2 wifi bug workaround, see\n            // https://github.com/espressif/arduino-esp32/issues/102\n            WRITE_PERI_REG(SENS_SAR_READ_CTRL2_REG, RTC_reg_b);\n            SET_PERI_REG_MASK(SENS_SAR_READ_CTRL2_REG, SENS_SAR2_DATA_INV);\n            adc2_get_raw(adc_channel, ADC_WIDTH_BIT_12, &adc_buf);\n            raw += adc_buf;\n            raw_c++;\n        }\n#endif // BAT_MEASURE_ADC_UNIT\n\n#endif // End BAT_MEASURE_ADC_UNIT\n        return (raw / (raw_c < 1 ? 1 : raw_c));\n    }\n#endif\n\n    /**\n     * return true if there is a battery installed in this unit\n     */\n    // if we have a integrated device with a battery, we can assume that the\n    // battery is always connected\n#ifdef BATTERY_IMMUTABLE\n    virtual bool isBatteryConnect() override { return true; }\n#elif defined(ADC_V)\n    virtual bool isBatteryConnect() override\n    {\n        int lastReading = digitalRead(ADC_V);\n        // 判断值是否变化\n        for (int i = 2; i < 500; i++) {\n            int reading = digitalRead(ADC_V);\n            if (reading != lastReading) {\n                return false; // 有变化，USB供电, 没接电池\n            }\n        }\n\n        return true;\n    }\n#else\n    virtual bool isBatteryConnect() override { return getBatteryPercent() != -1; }\n#endif\n\n    /// If we see a battery voltage higher than physics allows - assume charger is\n    /// pumping in power On some boards we don't have the power management chip\n    /// (like AXPxxxx) so we use EXT_PWR_DETECT GPIO pin to detect external power\n    /// source\n    virtual bool isVbusIn() override\n    {\n#ifdef EXT_PWR_DETECT\n#if defined(HELTEC_CAPSULE_SENSOR_V3) || defined(HELTEC_SENSOR_HUB)\n        // if external powered that pin will be pulled down\n        if (digitalRead(EXT_PWR_DETECT) == LOW) {\n            return true;\n        }\n        // if it's not LOW - check the battery\n#else\n        // if external powered that pin will be pulled up\n        if (digitalRead(EXT_PWR_DETECT) == HIGH) {\n            return true;\n        }\n        // if it's not HIGH - check the battery\n#endif\n        // If we have an EXT_PWR_DETECT pin and it indicates no external power, believe it.\n        return false;\n\n// technically speaking this should work for all(?) NRF52 boards\n// but needs testing across multiple devices. NRF52 USB would not even work if\n// VBUS was not properly connected and detected by the CPU\n#elif defined(MUZI_BASE) || defined(PROMICRO_DIY_TCXO)\n        return powerHAL_isVBUSConnected();\n#endif\n        return getBattVoltage() > chargingVolt;\n    }\n\n    /// Assume charging if we have a battery and external power is connected.\n    /// we can't be smart enough to say 'full'?\n    virtual bool isCharging() override\n    {\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(HAS_RAKPROT) && !defined(HAS_PMU)\n        if (hasRAK()) {\n            return (rak9154Sensor.isCharging()) ? OptTrue : OptFalse;\n        }\n#endif\n#if defined(ELECROW_ThinkNode_M6)\n        return digitalRead(EXT_CHRG_DETECT) == ext_chrg_detect_value || isVbusIn();\n#elif EXT_CHRG_DETECT\n        return digitalRead(EXT_CHRG_DETECT) == ext_chrg_detect_value;\n#elif defined(BATTERY_CHARGING_INV)\n        return !digitalRead(BATTERY_CHARGING_INV);\n#else\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !defined(DISABLE_INA_CHARGING_DETECTION)\n        if (hasINA()) {\n            // get current flow from INA sensor - negative value means power flowing\n            // into the battery default assuming  BATTERY+  <--> INA_VIN+ <--> SHUNT\n            // RESISTOR <--> INA_VIN- <--> LOAD\n            LOG_DEBUG(\"Using INA on I2C addr 0x%x for charging detection\", config.power.device_battery_ina_address);\n#if defined(INA_CHARGING_DETECTION_INVERT)\n            return getINACurrent() > 0;\n#else\n            return getINACurrent() < 0;\n#endif\n        }\n        return isBatteryConnect() && isVbusIn();\n#endif\n#endif\n        // by default, we check the battery voltage only\n        return isVbusIn();\n    }\n\n  private:\n    /// If we see a battery voltage higher than physics allows - assume charger is\n    /// pumping in power\n\n    /// For heltecs with no battery connected, the measured voltage is 2204, so\n    // need to be higher than that, in this case is 2500mV (3000-500)\n    const uint16_t OCV[NUM_OCV_POINTS] = {OCV_ARRAY};\n    const float chargingVolt = (OCV[0] + 10) * NUM_CELLS;\n    const float noBatVolt = (OCV[NUM_OCV_POINTS - 1] - 500) * NUM_CELLS;\n    // Start value from minimum voltage for the filter to not start from 0\n    // that could trigger some events.\n    // This value is over-written by the first ADC reading, it the voltage seems\n    // reasonable.\n    bool initial_read_done = false;\n    float last_read_value = (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS);\n    uint32_t last_read_time_ms = 0;\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(HAS_RAKPROT)\n\n    uint16_t getRAKVoltage() { return rak9154Sensor.getBusVoltageMv(); }\n\n    bool hasRAK()\n    {\n        if (!rak9154Sensor.isInitialized())\n            return rak9154Sensor.runOnce() > 0;\n        return rak9154Sensor.isRunning();\n    }\n#endif\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n    uint16_t getINAVoltage()\n    {\n        if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {\n            return ina219Sensor.getBusVoltageMv();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA226].first ==\n                   config.power.device_battery_ina_address) {\n            return ina226Sensor.getBusVoltageMv();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA260].first ==\n                   config.power.device_battery_ina_address) {\n            return ina260Sensor.getBusVoltageMv();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA3221].first ==\n                   config.power.device_battery_ina_address) {\n            return ina3221Sensor.getBusVoltageMv();\n        }\n        return 0;\n    }\n\n    int16_t getINACurrent()\n    {\n        if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {\n            return ina219Sensor.getCurrentMa();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA226].first ==\n                   config.power.device_battery_ina_address) {\n            return ina226Sensor.getCurrentMa();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA3221].first ==\n                   config.power.device_battery_ina_address) {\n            return ina3221Sensor.getCurrentMa();\n        }\n        return 0;\n    }\n\n    bool hasINA()\n    {\n        if (!config.power.device_battery_ina_address) {\n            return false;\n        }\n        if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA219].first == config.power.device_battery_ina_address) {\n            if (!ina219Sensor.isInitialized())\n                return ina219Sensor.runOnce() > 0;\n            return ina219Sensor.isRunning();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA226].first ==\n                   config.power.device_battery_ina_address) {\n            if (!ina226Sensor.isInitialized())\n                return ina226Sensor.runOnce() > 0;\n            return ina226Sensor.isRunning();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA260].first ==\n                   config.power.device_battery_ina_address) {\n            if (!ina260Sensor.isInitialized())\n                return ina260Sensor.runOnce() > 0;\n            return ina260Sensor.isRunning();\n        } else if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_INA3221].first ==\n                   config.power.device_battery_ina_address) {\n            if (!ina3221Sensor.isInitialized())\n                return ina3221Sensor.runOnce() > 0;\n            return ina3221Sensor.isRunning();\n        }\n        return false;\n    }\n#endif\n};\n\nstatic AnalogBatteryLevel analogLevel;\n\nPower::Power() : OSThread(\"Power\")\n{\n    statusHandler = {};\n    low_voltage_counter = 0;\n#ifdef DEBUG_HEAP\n    lastheap = memGet.getFreeHeap();\n#endif\n}\n\nbool Power::analogInit()\n{\n#ifdef EXT_PWR_DETECT\n#if defined(HELTEC_CAPSULE_SENSOR_V3) || defined(HELTEC_SENSOR_HUB)\n    pinMode(EXT_PWR_DETECT, INPUT_PULLUP);\n#else\n    pinMode(EXT_PWR_DETECT, INPUT);\n#endif\n#endif\n#ifdef EXT_CHRG_DETECT\n    pinMode(EXT_CHRG_DETECT, ext_chrg_detect_mode);\n#endif\n\n#ifdef BATTERY_PIN\n    LOG_DEBUG(\"Use analog input %d for battery level\", BATTERY_PIN);\n\n    // disable any internal pullups\n    pinMode(BATTERY_PIN, INPUT);\n\n#ifndef BATTERY_SENSE_RESOLUTION_BITS\n#define BATTERY_SENSE_RESOLUTION_BITS 10\n#endif\n\n#ifdef ARCH_ESP32 // ESP32 needs special analog stuff\n\n#ifndef ADC_WIDTH // max resolution by default\n    static const adc_bits_width_t width = ADC_WIDTH_BIT_12;\n#else\n    static const adc_bits_width_t width = ADC_WIDTH;\n#endif\n#ifndef BAT_MEASURE_ADC_UNIT // ADC1\n    adc1_config_width(width);\n    adc1_config_channel_atten(adc_channel, atten);\n#else // ADC2\n    adc2_config_channel_atten(adc_channel, atten);\n#ifndef CONFIG_IDF_TARGET_ESP32S3\n    // ADC2 wifi bug workaround\n    // Not required with ESP32S3, breaks compile\n    RTC_reg_b = READ_PERI_REG(SENS_SAR_READ_CTRL2_REG);\n#endif\n#endif\n    // calibrate ADC\n    esp_adc_cal_value_t val_type = esp_adc_cal_characterize(unit, atten, width, DEFAULT_VREF, adc_characs);\n    // show ADC characterization base\n    if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {\n        LOG_INFO(\"ADC config based on Two Point values stored in eFuse\");\n    } else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {\n        LOG_INFO(\"ADC config based on reference voltage stored in eFuse\");\n    }\n#ifdef CONFIG_IDF_TARGET_ESP32S3\n    // ESP32S3\n    else if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP_FIT) {\n        LOG_INFO(\"ADC config based on Two Point values and fitting curve \"\n                 \"coefficients stored in eFuse\");\n    }\n#endif\n    else {\n        LOG_INFO(\"ADC config based on default reference voltage\");\n    }\n#endif // ARCH_ESP32\n\n    // NRF52 ADC init moved to powerHAL_init in nrf52 platform\n\n#ifndef ARCH_ESP32\n    analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);\n#endif\n\n    batteryLevel = &analogLevel;\n    return true;\n#else\n    return false;\n#endif\n}\n\n/**\n * Initializes the Power class.\n *\n * @return true if the setup was successful, false otherwise.\n */\nbool Power::setup()\n{\n    bool found = false;\n    if (axpChipInit()) {\n        found = true;\n    } else if (cw2015Init()) {\n        found = true;\n    } else if (max17048Init()) {\n        found = true;\n    } else if (lipoChargerInit()) {\n        found = true;\n    } else if (serialBatteryInit()) {\n        found = true;\n    } else if (meshSolarInit()) {\n        found = true;\n    } else if (analogInit()) {\n        found = true;\n    } else {\n#ifdef NRF_APM\n        found = true;\n#endif\n    }\n#ifdef EXT_PWR_DETECT\n    attachInterrupt(\n        EXT_PWR_DETECT,\n        []() {\n            power->setIntervalFromNow(0);\n            runASAP = true;\n        },\n        CHANGE);\n#endif\n#ifdef BATTERY_CHARGING_INV\n    attachInterrupt(\n        BATTERY_CHARGING_INV,\n        []() {\n            power->setIntervalFromNow(0);\n            runASAP = true;\n        },\n        CHANGE);\n#endif\n#ifdef EXT_CHRG_DETECT\n    attachInterrupt(\n        EXT_CHRG_DETECT,\n        []() {\n            power->setIntervalFromNow(0);\n            runASAP = true;\n            BaseType_t higherWake = 0;\n        },\n        CHANGE);\n#endif\n    enabled = found;\n    low_voltage_counter = 0;\n\n    return found;\n}\n\nvoid Power::powerCommandsCheck()\n{\n    if (rebootAtMsec && millis() > rebootAtMsec) {\n        LOG_INFO(\"Rebooting\");\n        reboot();\n    }\n\n    if (shutdownAtMsec && millis() > shutdownAtMsec) {\n        shutdownAtMsec = 0;\n        shutdown();\n    }\n}\n\nvoid Power::reboot()\n{\n    notifyReboot.notifyObservers(NULL);\n#if defined(ARCH_ESP32)\n    ESP.restart();\n#elif defined(ARCH_NRF52)\n    NVIC_SystemReset();\n#elif defined(ARCH_RP2040)\n    rp2040.reboot();\n#elif defined(ARCH_PORTDUINO)\n    deInitApiServer();\n    if (aLinuxInputImpl)\n        aLinuxInputImpl->deInit();\n    SPI.end();\n    Wire.end();\n    Serial1.end();\n    if (screen) {\n        delete screen;\n        screen = nullptr;\n    }\n    LOG_DEBUG(\"final reboot!\");\n    ::reboot();\n#elif defined(ARCH_STM32WL)\n    HAL_NVIC_SystemReset();\n#else\n    rebootAtMsec = -1;\n    LOG_WARN(\"FIXME implement reboot for this platform. Note that some settings \"\n             \"require a restart to be applied\");\n#endif\n}\n\nvoid Power::shutdown()\n{\n\n#if HAS_SCREEN\n    if (screen) {\n#ifdef T_DECK_PRO\n        screen->showSimpleBanner(\"Device is powered off.\\nConnect USB to start!\",\n                                 0); // T-Deck Pro has no power button\n#elif defined(USE_EINK)\n        screen->showSimpleBanner(\"Shutting Down...\",\n                                 2250); // dismiss after 3 seconds to avoid the\n                                        // banner on the sleep screen\n#else\n        screen->showSimpleBanner(\"Shutting Down...\", 0); // stays on screen\n#endif\n    }\n#endif\n#if !defined(ARCH_STM32WL)\n    playShutdownMelody();\n#endif\n    nodeDB->saveToDisk();\n#if HAS_SCREEN\n    messageStore.saveToFlash();\n#endif\n#if defined(ARCH_NRF52) || defined(ARCH_ESP32) || defined(ARCH_RP2040)\n#ifdef PIN_LED1\n    ledOff(PIN_LED1);\n#endif\n#ifdef PIN_LED2\n    ledOff(PIN_LED2);\n#endif\n#ifdef PIN_LED3\n    ledOff(PIN_LED3);\n#endif\n#ifdef LED_NOTIFICATION\n    ledOff(LED_NOTIFICATION);\n#endif\n    doDeepSleep(DELAY_FOREVER, true, true);\n#elif defined(ARCH_PORTDUINO)\n    exit(EXIT_SUCCESS);\n#else\n    LOG_WARN(\"FIXME implement shutdown for this platform\");\n#endif\n}\n\n/// Reads power status to powerStatus singleton.\n//\n// TODO(girts): move this and other axp stuff to power.h/power.cpp.\nvoid Power::readPowerStatus()\n{\n    int32_t batteryVoltageMv = -1; // Assume unknown\n    int8_t batteryChargePercent = -1;\n    OptionalBool usbPowered = OptUnknown;\n    OptionalBool hasBattery = OptUnknown; // These must be static because NRF_APM\n                                          // code doesn't run every time\n    OptionalBool isChargingNow = OptUnknown;\n\n    if (batteryLevel) {\n        hasBattery = batteryLevel->isBatteryConnect() ? OptTrue : OptFalse;\n#ifndef NRF_APM\n        usbPowered = batteryLevel->isVbusIn() ? OptTrue : OptFalse;\n        isChargingNow = batteryLevel->isCharging() ? OptTrue : OptFalse;\n#endif\n        if (hasBattery) {\n            batteryVoltageMv = batteryLevel->getBattVoltage();\n            // If the AXP192 returns a valid battery percentage, use it\n            if (batteryLevel->getBatteryPercent() >= 0) {\n                batteryChargePercent = batteryLevel->getBatteryPercent();\n            } else {\n                // If the AXP192 returns a percentage less than 0, the feature is either\n                // not supported or there is an error In that case, we compute an\n                // estimate of the charge percent based on open circuit voltage table\n                // defined in power.h\n                batteryChargePercent = clamp((int)(((batteryVoltageMv - (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS)) * 1e2) /\n                                                   ((OCV[0] * NUM_CELLS) - (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS))),\n                                             0, 100);\n            }\n        }\n    }\n\n// FIXME: IMO we shouldn't be littering our code with all these ifdefs.  Way\n// better instead to make a Nrf52IsUsbPowered subclass (which shares a\n// superclass with the BatteryLevel stuff) that just provides a few methods. But\n// in the interest of fixing this bug I'm going to follow current practice.\n#ifdef NRF_APM // Section of code detects USB power on the RAK4631 and updates\n               // the power states.  Takes 20 seconds or so to detect changes.\n\n    nrfx_power_usb_state_t nrf_usb_state = nrfx_power_usbstatus_get();\n    // LOG_DEBUG(\"NRF Power %d\", nrf_usb_state);\n\n    // If changed to DISCONNECTED\n    if (nrf_usb_state == NRFX_POWER_USB_STATE_DISCONNECTED)\n        isChargingNow = usbPowered = OptFalse;\n    // If changed to CONNECTED / READY\n    else\n        isChargingNow = usbPowered = OptTrue;\n\n#endif\n\n    // Notify any status instances that are observing us\n    const PowerStatus powerStatus2 = PowerStatus(hasBattery, usbPowered, isChargingNow, batteryVoltageMv, batteryChargePercent);\n    if (millis() > lastLogTime + 50 * 1000) {\n        LOG_DEBUG(\"Battery: usbPower=%d, isCharging=%d, batMv=%d, batPct=%d\", powerStatus2.getHasUSB(),\n                  powerStatus2.getIsCharging(), powerStatus2.getBatteryVoltageMv(), powerStatus2.getBatteryChargePercent());\n        lastLogTime = millis();\n    }\n    newStatus.notifyObservers(&powerStatus2);\n#ifdef DEBUG_HEAP\n    if (lastheap != memGet.getFreeHeap()) {\n        // Use stack-allocated buffer to avoid heap allocations in monitoring code\n        char threadlist[256] = \"Threads running:\";\n        int threadlistLen = strlen(threadlist);\n        int running = 0;\n        for (int i = 0; i < MAX_THREADS; i++) {\n            auto thread = concurrency::mainController.get(i);\n            if ((thread != nullptr) && (thread->enabled)) {\n                // Use snprintf to safely append to stack buffer without heap allocation\n                int remaining = sizeof(threadlist) - threadlistLen - 1;\n                if (remaining > 0) {\n                    int written = snprintf(threadlist + threadlistLen, remaining, \" %s\", thread->ThreadName.c_str());\n                    if (written > 0 && written < remaining) {\n                        threadlistLen += written;\n                    }\n                }\n                running++;\n            }\n        }\n        LOG_HEAP(threadlist);\n        LOG_HEAP(\"Heap status: %d/%d bytes free (%d), running %d/%d threads\", memGet.getFreeHeap(), memGet.getHeapSize(),\n                 memGet.getFreeHeap() - lastheap, running, concurrency::mainController.size(false));\n        lastheap = memGet.getFreeHeap();\n    }\n#ifdef DEBUG_HEAP_MQTT\n    if (mqtt) {\n        // send MQTT-Packet with Heap-Size\n        uint8_t dmac[6];\n        getMacAddr(dmac); // Get our hardware ID\n        char mac[18];\n        sprintf(mac, \"!%02x%02x%02x%02x\", dmac[2], dmac[3], dmac[4], dmac[5]);\n\n        auto newHeap = memGet.getFreeHeap();\n        // Use stack-allocated buffers to avoid heap allocations in monitoring code\n        char heapTopic[128];\n        snprintf(heapTopic, sizeof(heapTopic), \"%s/2/heap/%s\", (*moduleConfig.mqtt.root ? moduleConfig.mqtt.root : \"msh\"), mac);\n        char heapString[16];\n        snprintf(heapString, sizeof(heapString), \"%u\", newHeap);\n        mqtt->pubSub.publish(heapTopic, heapString, false);\n\n        auto wifiRSSI = WiFi.RSSI();\n        char wifiTopic[128];\n        snprintf(wifiTopic, sizeof(wifiTopic), \"%s/2/wifi/%s\", (*moduleConfig.mqtt.root ? moduleConfig.mqtt.root : \"msh\"), mac);\n        char wifiString[16];\n        snprintf(wifiString, sizeof(wifiString), \"%d\", wifiRSSI);\n        mqtt->pubSub.publish(wifiTopic, wifiString, false);\n    }\n#endif\n\n#endif\n\n    // If we have a battery at all and it is less than 0%, force deep sleep if we\n    // have more than 10 low readings in a row. NOTE: min LiIon/LiPo voltage\n    // is 2.0 to 2.5V, current OCV min is set to 3100 that is large enough.\n    //\n\n    if (batteryLevel && powerStatus2.getHasBattery() && !powerStatus2.getHasUSB()) {\n        if (batteryLevel->getBattVoltage() < OCV[NUM_OCV_POINTS - 1]) {\n            low_voltage_counter++;\n            LOG_DEBUG(\"Low voltage counter: %d/10\", low_voltage_counter);\n            if (low_voltage_counter > 10) {\n                LOG_INFO(\"Low voltage detected, trigger deep sleep\");\n                powerFSM.trigger(EVENT_LOW_BATTERY);\n            }\n        } else {\n            low_voltage_counter = 0;\n        }\n    }\n}\n\nint32_t Power::runOnce()\n{\n    readPowerStatus();\n\n#ifdef HAS_PMU\n    // WE no longer use the IRQ line to wake the CPU (due to false wakes from\n    // sleep), but we do poll the IRQ status by reading the registers over I2C\n    if (PMU) {\n\n        PMU->getIrqStatus();\n\n        if (PMU->isVbusRemoveIrq()) {\n            LOG_INFO(\"USB unplugged\");\n            powerFSM.trigger(EVENT_POWER_DISCONNECTED);\n        }\n\n        if (PMU->isVbusInsertIrq()) {\n            LOG_INFO(\"USB plugged In\");\n            powerFSM.trigger(EVENT_POWER_CONNECTED);\n        }\n\n        /*\n        Other things we could check if we cared...\n\n        if (PMU->isBatChagerStartIrq()) {\n            LOG_DEBUG(\"Battery start charging\");\n        }\n        if (PMU->isBatChagerDoneIrq()) {\n            LOG_DEBUG(\"Battery fully charged\");\n        }\n        if (PMU->isBatInsertIrq()) {\n            LOG_DEBUG(\"Battery inserted\");\n        }\n        if (PMU->isBatRemoveIrq()) {\n            LOG_DEBUG(\"Battery removed\");\n        }\n        */\n#ifndef T_WATCH_S3 // FIXME - why is this triggering on the T-Watch S3?\n        if (PMU->isPekeyLongPressIrq()) {\n            LOG_DEBUG(\"PEK long button press\");\n            if (screen)\n                screen->setOn(false);\n        }\n#endif\n\n        PMU->clearIrqStatus();\n    }\n#endif\n    // Only read once every 20 seconds once the power status for the app has been\n    // initialized\n    return (statusHandler && statusHandler->isInitialized()) ? (1000 * 20) : RUN_SAME;\n}\n\n/**\n * Init the power manager chip\n *\n * axp192 power\n    DCDC1 0.7-3.5V @ 1200mA max -> OLED // If you turn this off you'll lose\n comms to the axp192 because the OLED and the axp192 share the same i2c bus,\n instead use ssd1306 sleep mode DCDC2 -> unused DCDC3 0.7-3.5V @ 700mA max ->\n ESP32 (keep this on!) LDO1 30mA -> charges GPS backup battery // charges the\n tiny J13 battery by the GPS to power the GPS ram (for a couple of days), can\n not be turned off LDO2 200mA -> LORA LDO3 200mA -> GPS\n *\n */\nbool Power::axpChipInit()\n{\n\n#ifdef HAS_PMU\n\n    TwoWire *w = NULL;\n\n    // Use macro to distinguish which wire is used by PMU\n#ifdef PMU_USE_WIRE1\n    w = &Wire1;\n#else\n    w = &Wire;\n#endif\n\n    /**\n     * It is not necessary to specify the wire pin,\n     * just input the wire, because the wire has been initialized in main.cpp\n     */\n    if (!PMU) {\n        PMU = new XPowersAXP2101(*w);\n        if (!PMU->init()) {\n            LOG_WARN(\"No AXP2101 power management\");\n            delete PMU;\n            PMU = NULL;\n        } else {\n            LOG_INFO(\"AXP2101 PMU init succeeded\");\n        }\n    }\n\n    if (!PMU) {\n        PMU = new XPowersAXP192(*w);\n        if (!PMU->init()) {\n            LOG_WARN(\"No AXP192 power management\");\n            delete PMU;\n            PMU = NULL;\n        } else {\n            LOG_INFO(\"AXP192 PMU init succeeded\");\n        }\n    }\n\n    if (!PMU) {\n        /*\n         * In XPowersLib, if the XPowersAXPxxx object is released, Wire.end() will\n         * be called at the same time. In order not to affect other devices, if the\n         * initialization of the PMU fails, Wire needs to be re-initialized once, if\n         * there are multiple devices sharing the bus.\n         * * */\n#ifndef PMU_USE_WIRE1\n        w->begin(I2C_SDA, I2C_SCL);\n#endif\n        return false;\n    }\n\n    batteryLevel = PMU;\n\n    if (PMU->getChipModel() == XPOWERS_AXP192) {\n\n        // lora radio power channel\n        PMU->setPowerChannelVoltage(XPOWERS_LDO2, 3300);\n        PMU->enablePowerOutput(XPOWERS_LDO2);\n\n        // oled module power channel,\n        // disable it will cause abnormal communication between boot and AXP power\n        // supply, do not turn it off\n        PMU->setPowerChannelVoltage(XPOWERS_DCDC1, 3300);\n        // enable oled power\n        PMU->enablePowerOutput(XPOWERS_DCDC1);\n\n        // gnss module power channel -  now turned on in setGpsPower\n        PMU->setPowerChannelVoltage(XPOWERS_LDO3, 3300);\n        // PMU->enablePowerOutput(XPOWERS_LDO3);\n\n        // protected oled power source\n        PMU->setProtectedChannel(XPOWERS_DCDC1);\n        // protected esp32 power source\n        PMU->setProtectedChannel(XPOWERS_DCDC3);\n\n        // disable not use channel\n        PMU->disablePowerOutput(XPOWERS_DCDC2);\n\n        // disable all axp chip interrupt\n        PMU->disableIRQ(XPOWERS_AXP192_ALL_IRQ);\n\n        // Set constant current charging current\n        PMU->setChargerConstantCurr(XPOWERS_AXP192_CHG_CUR_450MA);\n\n        // Set up the charging voltage\n        PMU->setChargeTargetVoltage(XPOWERS_AXP192_CHG_VOL_4V2);\n    } else if (PMU->getChipModel() == XPOWERS_AXP2101) {\n\n        /*The alternative version of T-Beam 1.1 differs from T-Beam V1.1 in that it\n         * uses an AXP2101 power chip*/\n        if (HW_VENDOR == meshtastic_HardwareModel_TBEAM) {\n            // Unuse power channel\n            PMU->disablePowerOutput(XPOWERS_DCDC2);\n            PMU->disablePowerOutput(XPOWERS_DCDC3);\n            PMU->disablePowerOutput(XPOWERS_DCDC4);\n            PMU->disablePowerOutput(XPOWERS_DCDC5);\n            PMU->disablePowerOutput(XPOWERS_ALDO1);\n            PMU->disablePowerOutput(XPOWERS_ALDO4);\n            PMU->disablePowerOutput(XPOWERS_BLDO1);\n            PMU->disablePowerOutput(XPOWERS_BLDO2);\n            PMU->disablePowerOutput(XPOWERS_DLDO1);\n            PMU->disablePowerOutput(XPOWERS_DLDO2);\n\n            // GNSS RTC PowerVDD 3300mV\n            PMU->setPowerChannelVoltage(XPOWERS_VBACKUP, 3300);\n            PMU->enablePowerOutput(XPOWERS_VBACKUP);\n\n            // ESP32 VDD 3300mV\n            //  ! No need to set, automatically open , Don't close it\n            //  PMU->setPowerChannelVoltage(XPOWERS_DCDC1, 3300);\n            //  PMU->setProtectedChannel(XPOWERS_DCDC1);\n\n            // LoRa VDD 3300mV\n            PMU->setPowerChannelVoltage(XPOWERS_ALDO2, 3300);\n            PMU->enablePowerOutput(XPOWERS_ALDO2);\n\n            // GNSS VDD 3300mV\n            PMU->setPowerChannelVoltage(XPOWERS_ALDO3, 3300);\n            PMU->enablePowerOutput(XPOWERS_ALDO3);\n        } else if (HW_VENDOR == meshtastic_HardwareModel_LILYGO_TBEAM_S3_CORE ||\n                   HW_VENDOR == meshtastic_HardwareModel_T_WATCH_S3) {\n            // t-beam s3 core\n            /**\n             * gnss module power channel\n             * The default ALDO4 is off, you need to turn on the GNSS power first,\n             * otherwise it will be invalid during initialization\n             */\n            PMU->setPowerChannelVoltage(XPOWERS_ALDO4, 3300);\n            PMU->enablePowerOutput(XPOWERS_ALDO4);\n\n            // lora radio power channel\n            PMU->setPowerChannelVoltage(XPOWERS_ALDO3, 3300);\n            PMU->enablePowerOutput(XPOWERS_ALDO3);\n\n            // m.2 interface\n            PMU->setPowerChannelVoltage(XPOWERS_DCDC3, 3300);\n            PMU->enablePowerOutput(XPOWERS_DCDC3);\n\n            /**\n             * ALDO2 cannot be turned off.\n             * It is a necessary condition for sensor communication.\n             * It must be turned on to properly access the sensor and screen\n             * It is also responsible for the power supply of PCF8563\n             */\n            PMU->setPowerChannelVoltage(XPOWERS_ALDO2, 3300);\n            PMU->enablePowerOutput(XPOWERS_ALDO2);\n\n            // 6-axis , magnetometer ,bme280 , oled screen power channel\n            PMU->setPowerChannelVoltage(XPOWERS_ALDO1, 3300);\n            PMU->enablePowerOutput(XPOWERS_ALDO1);\n\n            // sdcard (T-Beam S3) / gnns (T-Watch S3 Plus) power channel\n            PMU->setPowerChannelVoltage(XPOWERS_BLDO1, 3300);\n#ifndef T_WATCH_S3\n            PMU->enablePowerOutput(XPOWERS_BLDO1);\n#else\n            // DRV2605 power channel\n            PMU->setPowerChannelVoltage(XPOWERS_BLDO2, 3300);\n            PMU->enablePowerOutput(XPOWERS_BLDO2);\n#endif\n\n            // PMU->setPowerChannelVoltage(XPOWERS_DCDC4, 3300);\n            // PMU->enablePowerOutput(XPOWERS_DCDC4);\n\n            // not use channel\n            PMU->disablePowerOutput(XPOWERS_DCDC2); // not elicited\n            PMU->disablePowerOutput(XPOWERS_DCDC5); // not elicited\n            PMU->disablePowerOutput(XPOWERS_DLDO1); // Invalid power channel, it does not exist\n            PMU->disablePowerOutput(XPOWERS_DLDO2); // Invalid power channel, it does not exist\n            PMU->disablePowerOutput(XPOWERS_VBACKUP);\n        }\n\n        // disable all axp chip interrupt\n        PMU->disableIRQ(XPOWERS_AXP2101_ALL_IRQ);\n\n        // Set the constant current charging current of AXP2101, temporarily use\n        // 500mA by default\n        PMU->setChargerConstantCurr(XPOWERS_AXP2101_CHG_CUR_500MA);\n\n        // Set up the charging voltage\n        PMU->setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V2);\n    }\n\n    PMU->clearIrqStatus();\n\n    // TBeam1.1 /T-Beam S3-Core has no external TS detection,\n    // it needs to be disabled, otherwise it will cause abnormal charging\n    PMU->disableTSPinMeasure();\n\n    // PMU->enableSystemVoltageMeasure();\n    PMU->enableVbusVoltageMeasure();\n    PMU->enableBattVoltageMeasure();\n\n    if (PMU->isChannelAvailable(XPOWERS_DCDC1)) {\n        LOG_DEBUG(\"DC1  : %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_DCDC1) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_DCDC1));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_DCDC2)) {\n        LOG_DEBUG(\"DC2  : %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_DCDC2) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_DCDC2));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_DCDC3)) {\n        LOG_DEBUG(\"DC3  : %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_DCDC3) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_DCDC3));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_DCDC4)) {\n        LOG_DEBUG(\"DC4  : %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_DCDC4) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_DCDC4));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_LDO2)) {\n        LOG_DEBUG(\"LDO2 : %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_LDO2) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_LDO2));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_LDO3)) {\n        LOG_DEBUG(\"LDO3 : %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_LDO3) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_LDO3));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_ALDO1)) {\n        LOG_DEBUG(\"ALDO1: %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_ALDO1) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_ALDO1));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_ALDO2)) {\n        LOG_DEBUG(\"ALDO2: %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_ALDO2) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_ALDO2));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_ALDO3)) {\n        LOG_DEBUG(\"ALDO3: %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_ALDO3) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_ALDO3));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_ALDO4)) {\n        LOG_DEBUG(\"ALDO4: %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_ALDO4) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_ALDO4));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_BLDO1)) {\n        LOG_DEBUG(\"BLDO1: %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_BLDO1) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_BLDO1));\n    }\n    if (PMU->isChannelAvailable(XPOWERS_BLDO2)) {\n        LOG_DEBUG(\"BLDO2: %s   Voltage:%u mV \", PMU->isPowerChannelEnable(XPOWERS_BLDO2) ? \"+\" : \"-\",\n                  PMU->getPowerChannelVoltage(XPOWERS_BLDO2));\n    }\n\n// We can safely ignore this approach for most (or all) boards because MCU\n// turned off earlier than battery discharged to 2.6V.\n//\n// Unfortunately for now we can't use this killswitch for RAK4630-based boards\n// because they have a bug with battery voltage measurement. Probably it\n// sometimes drops to low values.\n#ifndef RAK4630\n    // Set PMU shutdown voltage at 2.6V to maximize battery utilization\n    PMU->setSysPowerDownVoltage(2600);\n#endif\n\n#ifdef PMU_IRQ\n    uint64_t pmuIrqMask = 0;\n\n    if (PMU->getChipModel() == XPOWERS_AXP192) {\n        pmuIrqMask = XPOWERS_AXP192_VBUS_INSERT_IRQ | XPOWERS_AXP192_BAT_INSERT_IRQ | XPOWERS_AXP192_PKEY_SHORT_IRQ;\n    } else if (PMU->getChipModel() == XPOWERS_AXP2101) {\n        pmuIrqMask = XPOWERS_AXP2101_VBUS_INSERT_IRQ | XPOWERS_AXP2101_BAT_INSERT_IRQ | XPOWERS_AXP2101_PKEY_SHORT_IRQ;\n    }\n\n    pinMode(PMU_IRQ, INPUT);\n    attachInterrupt(\n        PMU_IRQ, [] { pmu_irq = true; }, FALLING);\n\n    // we do not look for AXPXXX_CHARGING_FINISHED_IRQ & AXPXXX_CHARGING_IRQ\n    // because it occurs repeatedly while there is no battery also it could cause\n    // inadvertent waking from light sleep just because the battery filled we\n    // don't look for AXPXXX_BATT_REMOVED_IRQ because it occurs repeatedly while\n    // no battery installed we don't look at AXPXXX_VBUS_REMOVED_IRQ because we\n    // don't have anything hooked to vbus\n    PMU->enableIRQ(pmuIrqMask);\n\n    PMU->clearIrqStatus();\n#endif /*PMU_IRQ*/\n\n    readPowerStatus();\n\n    pmu_found = true;\n\n    return pmu_found;\n\n#else\n    return false;\n#endif\n}\n\n#if !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_MAX1704X.h>)\n\n/**\n * Wrapper class for an I2C MAX17048 Lipo battery sensor.\n */\nclass MAX17048BatteryLevel : public HasBatteryLevel\n{\n  private:\n    MAX17048Singleton *max17048 = nullptr;\n\n  public:\n    /**\n     * Init the I2C MAX17048 Lipo battery level sensor\n     */\n    bool runOnce()\n    {\n        if (max17048 == nullptr) {\n            max17048 = MAX17048Singleton::GetInstance();\n        }\n\n        // try to start if the sensor has been detected\n        if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MAX17048].first != 0) {\n            return max17048->runOnce(nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MAX17048].second);\n        }\n        return false;\n    }\n\n    /**\n     * Battery state of charge, from 0 to 100 or -1 for unknown\n     */\n    virtual int getBatteryPercent() override { return max17048->getBusBatteryPercent(); }\n\n    /**\n     * The raw voltage of the battery in millivolts, or NAN if unknown\n     */\n    virtual uint16_t getBattVoltage() override { return max17048->getBusVoltageMv(); }\n\n    /**\n     * return true if there is a battery installed in this unit\n     */\n    virtual bool isBatteryConnect() override { return max17048->isBatteryConnected(); }\n\n    /**\n     * return true if there is an external power source detected\n     */\n    virtual bool isVbusIn() override { return max17048->isExternallyPowered(); }\n\n    /**\n     * return true if the battery is currently charging\n     */\n    virtual bool isCharging() override { return max17048->isBatteryCharging(); }\n};\n\nMAX17048BatteryLevel max17048Level;\n\n/**\n * Init the Lipo battery level sensor\n */\nbool Power::max17048Init()\n{\n    bool result = max17048Level.runOnce();\n    LOG_DEBUG(\"Power::max17048Init lipo sensor is %s\", result ? \"ready\" : \"not ready yet\");\n    if (!result)\n        return false;\n    batteryLevel = &max17048Level;\n    return true;\n}\n\n#else\n/**\n * The Lipo battery level sensor is unavailable - default to AnalogBatteryLevel\n */\nbool Power::max17048Init()\n{\n    return false;\n}\n#endif\n\n#if !MESHTASTIC_EXCLUDE_I2C && HAS_CW2015\n\nclass CW2015BatteryLevel : public AnalogBatteryLevel\n{\n  public:\n    /**\n     * Battery state of charge, from 0 to 100 or -1 for unknown\n     */\n    virtual int getBatteryPercent() override\n    {\n        int data = -1;\n        Wire.beginTransmission(CW2015_ADDR);\n        Wire.write(0x04);\n        if (Wire.endTransmission() == 0) {\n            if (Wire.requestFrom(CW2015_ADDR, (uint8_t)1)) {\n                data = Wire.read();\n            }\n        }\n        return data;\n    }\n\n    /**\n     * The raw voltage of the battery in millivolts, or NAN if unknown\n     */\n    virtual uint16_t getBattVoltage() override\n    {\n        uint16_t mv = 0;\n        Wire.beginTransmission(CW2015_ADDR);\n        Wire.write(0x02);\n        if (Wire.endTransmission() == 0) {\n            if (Wire.requestFrom(CW2015_ADDR, (uint8_t)2)) {\n                mv = Wire.read();\n                mv <<= 8;\n                mv |= Wire.read();\n                // Voltage is read in  305uV units, convert to mV\n                mv = mv * 305 / 1000;\n            }\n        }\n        return mv;\n    }\n};\n\nCW2015BatteryLevel cw2015Level;\n\n/**\n * Init the CW2015 battery level sensor\n */\nbool Power::cw2015Init()\n{\n\n    Wire.beginTransmission(CW2015_ADDR);\n    uint8_t getInfo[] = {0x0a, 0x00};\n    Wire.write(getInfo, 2);\n    Wire.endTransmission();\n    delay(10);\n    Wire.beginTransmission(CW2015_ADDR);\n    Wire.write(0x00);\n    bool result = false;\n    if (Wire.endTransmission() == 0) {\n        if (Wire.requestFrom(CW2015_ADDR, (uint8_t)1)) {\n            uint8_t data = Wire.read();\n            LOG_DEBUG(\"CW2015 init read data: 0x%x\", data);\n            if (data == 0x73) {\n                result = true;\n                batteryLevel = &cw2015Level;\n            }\n        }\n    }\n    return result;\n}\n\n#else\n/**\n * The CW2015 battery level sensor is unavailable - default to AnalogBatteryLevel\n */\nbool Power::cw2015Init()\n{\n    return false;\n}\n#endif\n\n#if defined(HAS_PPM) && HAS_PPM\n\n/**\n * Adapter class for BQ25896/BQ27220 Lipo battery charger.\n */\nclass LipoCharger : public HasBatteryLevel\n{\n  private:\n    BQ27220 *bq = nullptr;\n\n  public:\n    /**\n     * Init the I2C BQ25896 Lipo battery charger\n     */\n    bool runOnce()\n    {\n        if (PPM == nullptr) {\n            PPM = new XPowersPPM;\n            bool result = PPM->init(Wire, I2C_SDA, I2C_SCL, BQ25896_ADDR);\n            if (result) {\n                LOG_INFO(\"PPM BQ25896 init succeeded\");\n                // Set the minimum operating voltage. Below this voltage, the PPM will\n                // protect PPM->setSysPowerDownVoltage(3100);\n\n                // Set input current limit, default is 500mA\n                // PPM->setInputCurrentLimit(800);\n\n                // Disable current limit pin\n                // PPM->disableCurrentLimitPin();\n\n                // Set the charging target voltage, Range:3840 ~ 4608mV ,step:16 mV\n                PPM->setChargeTargetVoltage(4288);\n\n                // Set the precharge current , Range: 64mA ~ 1024mA ,step:64mA\n                // PPM->setPrechargeCurr(64);\n\n                // The premise is that limit pin is disabled, or it will\n                // only follow the maximum charging current set by limit pin.\n                // Set the charging current , Range:0~5056mA ,step:64mA\n                PPM->setChargerConstantCurr(1024);\n\n                // To obtain voltage data, the ADC must be enabled first\n                PPM->enableMeasure();\n\n                // Turn on charging function\n                // If there is no battery connected, do not turn on the charging\n                // function\n                PPM->enableCharge();\n            } else {\n                LOG_WARN(\"PPM BQ25896 init failed\");\n                delete PPM;\n                PPM = nullptr;\n                return false;\n            }\n        }\n        if (bq == nullptr) {\n            bq = new BQ27220;\n            bq->setDefaultCapacity(BQ27220_DESIGN_CAPACITY);\n\n            bool result = bq->init();\n            if (result) {\n                LOG_DEBUG(\"BQ27220 design capacity: %d\", bq->getDesignCapacity());\n                LOG_DEBUG(\"BQ27220 fullCharge capacity: %d\", bq->getFullChargeCapacity());\n                LOG_DEBUG(\"BQ27220 remaining capacity: %d\", bq->getRemainingCapacity());\n                return true;\n            } else {\n                LOG_WARN(\"BQ27220 init failed\");\n                delete bq;\n                bq = nullptr;\n                return false;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Battery state of charge, from 0 to 100 or -1 for unknown\n     */\n    virtual int getBatteryPercent() override\n    {\n        return -1;\n        // return bq->getChargePercent(); // don't use BQ27220 for battery percent,\n        // it is not calibrated\n    }\n\n    /**\n     * The raw voltage of the battery in millivolts, or NAN if unknown\n     */\n    virtual uint16_t getBattVoltage() override { return bq->getVoltage(); }\n\n    /**\n     * return true if there is a battery installed in this unit\n     */\n    virtual bool isBatteryConnect() override { return PPM->getBattVoltage() > 0; }\n\n    /**\n     * return true if there is an external power source detected\n     */\n    virtual bool isVbusIn() override { return PPM->isVbusIn(); }\n\n    /**\n     * return true if the battery is currently charging\n     */\n    virtual bool isCharging() override\n    {\n        bool isCharging = PPM->isCharging();\n        if (isCharging) {\n            LOG_DEBUG(\"BQ27220 time to full charge: %d min\", bq->getTimeToFull());\n        } else {\n            if (!PPM->isVbusIn()) {\n                LOG_DEBUG(\"BQ27220 time to empty: %d min (%d mAh)\", bq->getTimeToEmpty(), bq->getRemainingCapacity());\n            }\n        }\n        return isCharging;\n    }\n};\n\nLipoCharger lipoCharger;\n\n/**\n * Init the Lipo battery charger\n */\nbool Power::lipoChargerInit()\n{\n    bool result = lipoCharger.runOnce();\n    LOG_DEBUG(\"Power::lipoChargerInit lipo sensor is %s\", result ? \"ready\" : \"not ready yet\");\n    if (!result)\n        return false;\n    batteryLevel = &lipoCharger;\n    return true;\n}\n\n#else\n/**\n * The Lipo battery level sensor is unavailable - default to AnalogBatteryLevel\n */\nbool Power::lipoChargerInit()\n{\n    return false;\n}\n#endif\n\n#ifdef HELTEC_MESH_SOLAR\n#include \"meshSolarApp.h\"\n\n/**\n * meshSolar class for an SMBUS battery sensor.\n */\nclass meshSolarBatteryLevel : public HasBatteryLevel\n{\n\n  public:\n    /**\n     * Init the I2C meshSolar battery level sensor\n     */\n    bool runOnce()\n    {\n        meshSolarStart();\n        return true;\n    }\n\n    /**\n     * Battery state of charge, from 0 to 100 or -1 for unknown\n     */\n    virtual int getBatteryPercent() override { return meshSolarGetBatteryPercent(); }\n\n    /**\n     * The raw voltage of the battery in millivolts, or NAN if unknown\n     */\n    virtual uint16_t getBattVoltage() override { return meshSolarGetBattVoltage(); }\n\n    /**\n     * return true if there is a battery installed in this unit\n     */\n    virtual bool isBatteryConnect() override { return meshSolarIsBatteryConnect(); }\n\n    /**\n     * return true if there is an external power source detected\n     */\n    virtual bool isVbusIn() override { return meshSolarIsVbusIn(); }\n\n    /**\n     * return true if the battery is currently charging\n     */\n    virtual bool isCharging() override { return meshSolarIsCharging(); }\n};\n\nmeshSolarBatteryLevel meshSolarLevel;\n\n/**\n * Init the meshSolar battery level sensor\n */\nbool Power::meshSolarInit()\n{\n    bool result = meshSolarLevel.runOnce();\n    LOG_DEBUG(\"Power::meshSolarInit mesh solar sensor is %s\", result ? \"ready\" : \"not ready yet\");\n    if (!result)\n        return false;\n    batteryLevel = &meshSolarLevel;\n    return true;\n}\n\n#else\n/**\n * The meshSolar battery level sensor is unavailable - default to\n * AnalogBatteryLevel\n */\nbool Power::meshSolarInit()\n{\n    return false;\n}\n#endif\n\n#ifdef HAS_SERIAL_BATTERY_LEVEL\n#include <SoftwareSerial.h>\n\n/**\n * SerialBatteryLevel class for pulling battery information from a secondary MCU over serial.\n */\nclass SerialBatteryLevel : public HasBatteryLevel\n{\n\n  public:\n    /**\n     * Init the I2C meshSolar battery level sensor\n     */\n    bool runOnce()\n    {\n        BatterySerial.begin(4800);\n\n        return true;\n    }\n\n    /**\n     * Battery state of charge, from 0 to 100 or -1 for unknown\n     */\n    virtual int getBatteryPercent() override { return v_percent; }\n\n    /**\n     * The raw voltage of the battery in millivolts, or NAN if unknown\n     */\n    virtual uint16_t getBattVoltage() override { return voltage * 1000; }\n\n    /**\n     * return true if there is a battery installed in this unit\n     */\n    virtual bool isBatteryConnect() override\n    {\n        // definitely need to gobble up more bytes at once\n        if (BatterySerial.available() > 5) {\n            // LOG_WARN(\"SerialBatteryLevel: %u bytes available\", BatterySerial.available());\n            while (BatterySerial.available() > 11) {\n                BatterySerial.read(); // flush old data\n            }\n            // LOG_WARN(\"SerialBatteryLevel: %u bytes now available\", BatterySerial.available());\n            int tries = 0;\n            while (BatterySerial.read() != 0xFE) {\n                tries++; // wait for start byte\n                if (tries > 10) {\n                    LOG_WARN(\"SerialBatteryLevel: no start byte found\");\n                    return 1;\n                }\n            }\n\n            Data[1] = BatterySerial.read();\n            Data[2] = BatterySerial.read();\n            Data[3] = BatterySerial.read();\n            Data[4] = BatterySerial.read();\n            Data[5] = BatterySerial.read();\n            if (Data[5] != 0xFD) {\n                LOG_WARN(\"SerialBatteryLevel: invalid end byte %02x\", Data[5]);\n                return true;\n            }\n            v_percent = Data[1];\n            voltage = Data[2] + (((float)Data[3]) / 100) + (((float)Data[4]) / 10000);\n            voltage *= 2;\n            // LOG_WARN(\"SerialBatteryLevel: received data %u, %f, %02x\", v_percent, voltage, Data[5]);\n            return true;\n        }\n        // This function runs first, so use it to grab the latest data from the secondary MCU\n        return true;\n    }\n\n    /**\n     * return true if there is an external power source detected\n     */\n    virtual bool isVbusIn() override\n    {\n#if defined(EXT_CHRG_DETECT)\n\n        return digitalRead(EXT_CHRG_DETECT) == ext_chrg_detect_value;\n\n#endif\n        return false;\n    }\n\n    virtual bool isCharging() override\n    {\n#ifdef EXT_CHRG_DETECT\n        return digitalRead(EXT_CHRG_DETECT) == ext_chrg_detect_value;\n\n#endif\n        // by default, we check the battery voltage only\n        return isVbusIn();\n    }\n\n  private:\n    SoftwareSerial BatterySerial = SoftwareSerial(SERIAL_BATTERY_RX, SERIAL_BATTERY_TX);\n    uint8_t Data[6] = {0};\n    int v_percent = 0;\n    float voltage = 0.0;\n};\n\nSerialBatteryLevel serialBatteryLevel;\n\n/**\n * Init the serial battery level sensor\n */\nbool Power::serialBatteryInit()\n{\n#ifdef EXT_PWR_DETECT\n    pinMode(EXT_PWR_DETECT, INPUT);\n#endif\n#ifdef EXT_CHRG_DETECT\n    pinMode(EXT_CHRG_DETECT, ext_chrg_detect_mode);\n#endif\n\n    bool result = serialBatteryLevel.runOnce();\n    LOG_DEBUG(\"Power::serialBatteryInit serial battery sensor is %s\", result ? \"ready\" : \"not ready yet\");\n    if (!result)\n        return false;\n    batteryLevel = &serialBatteryLevel;\n    return true;\n}\n\n#else\n/**\n * If this device has no serial battery level sensor, don't try to use it.\n */\nbool Power::serialBatteryInit()\n{\n    return false;\n}\n#endif\n"
  },
  {
    "path": "src/PowerFSM.cpp",
    "content": "/**\n * @file PowerFSM.cpp\n * @brief Implements the finite state machine for power management.\n *\n * This file contains the implementation of the finite state machine (FSM) for power management.\n * The FSM controls the power states of the device, including SDS (shallow deep sleep), LS (light sleep),\n * NB (normal mode), and POWER (powered mode). The FSM also handles transitions between states and\n * actions to be taken upon entering or exiting each state.\n */\n#include \"PowerFSM.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerMon.h\"\n#include \"configuration.h\"\n#include \"graphics/Screen.h\"\n#include \"main.h\"\n#include \"modules/StatusLEDModule.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n\n#if HAS_WIFI && !defined(ARCH_PORTDUINO) || defined(MESHTASTIC_EXCLUDE_WIFI)\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n\n#ifndef SLEEP_TIME\n#define SLEEP_TIME 30\n#endif\n#if MESHTASTIC_EXCLUDE_POWER_FSM\nFakeFsm powerFSM;\nvoid PowerFSM_setup(){};\n#else\n/// Should we behave as if we have AC power now?\nstatic bool isPowered()\n{\n// Circumvent the battery sensing logic and assumes constant power if no battery pin or power mgmt IC\n#if !defined(BATTERY_PIN) && !defined(HAS_AXP192) && !defined(HAS_AXP2101) && !defined(NRF_APM)\n    return true;\n#endif\n\n    bool isRouter = ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n                      config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)\n                         ? 1\n                         : 0);\n\n    // If we are not a router and we already have AC power go to POWER state after init, otherwise go to ON\n    // We assume routers might be powered all the time, but from a low current (solar) source\n    bool isPowerSavingMode = config.power.is_power_saving || isRouter;\n\n    /* To determine if we're externally powered, assumptions\n        1) If we're powered up and there's no battery, we must be getting power externally. (because we'd be dead otherwise)\n\n        2) If we detect USB power from the power management chip, we must be getting power externally.\n\n        3) On some boards we don't have the power management chip (like AXPxxxx) so we use EXT_PWR_DETECT GPIO pin to detect\n       external power source (see `isVbusIn()` in `Power.cpp`)\n    */\n    return !isPowerSavingMode && powerStatus && (!powerStatus->getHasBattery() || powerStatus->getHasUSB());\n}\n\nstatic void sdsEnter()\n{\n    LOG_POWERFSM(\"State: SDS\");\n    // FIXME - make sure GPS and LORA radio are off first - because we want close to zero current draw\n    doDeepSleep(Default::getConfiguredOrDefaultMs(config.power.sds_secs), false, false);\n}\n\nstatic void lowBattSDSEnter()\n{\n    LOG_POWERFSM(\"State: Lower batt SDS\");\n    doDeepSleep(Default::getConfiguredOrDefaultMs(config.power.sds_secs), false, true);\n}\nextern Power *power;\n\nstatic void shutdownEnter()\n{\n    LOG_POWERFSM(\"State: SHUTDOWN\");\n    shutdownAtMsec = millis();\n}\n\n#include \"error.h\"\n\nstatic uint32_t secsSlept;\n\nstatic void lsEnter()\n{\n    LOG_POWERFSM(\"lsEnter begin, ls_secs=%u\", config.power.ls_secs);\n    if (screen)\n        screen->setOn(false);\n    secsSlept = 0; // How long have we been sleeping this time\n\n    // LOG_INFO(\"lsEnter end\");\n}\n\nstatic void lsIdle()\n{\n    // LOG_INFO(\"lsIdle begin ls_secs=%u\", getPref_ls_secs());\n\n#ifdef ARCH_ESP32\n\n    // Do we have more sleeping to do?\n    if (secsSlept < config.power.ls_secs) {\n        // If some other service would stall sleep, don't let sleep happen yet\n        if (doPreflightSleep()) {\n            // Briefly come out of sleep long enough to blink the led once every few seconds\n            uint32_t sleepTime = SLEEP_TIME;\n\n            powerMon->setState(meshtastic_PowerMon_State_CPU_LightSleep);\n            statusLEDModule->setPowerLED(false);\n            esp_sleep_source_t wakeCause2 = doLightSleep(sleepTime * 1000LL);\n            powerMon->clearState(meshtastic_PowerMon_State_CPU_LightSleep);\n\n            switch (wakeCause2) {\n            case ESP_SLEEP_WAKEUP_TIMER:\n                // Normal case: timer expired, we should just go back to sleep ASAP\n\n                statusLEDModule->setPowerLED(true);\n                wakeCause2 = doLightSleep(100); // leave led on for 1ms\n\n                secsSlept += sleepTime;\n                // LOG_INFO(\"Sleep, flash led!\");\n                break;\n\n            case ESP_SLEEP_WAKEUP_UART:\n                // Not currently used (because uart triggers in hw have problems)\n                powerFSM.trigger(EVENT_SERIAL_CONNECTED);\n                break;\n\n            default:\n                // We woke for some other reason (button press, device IRQ interrupt)\n\n#ifdef BUTTON_PIN\n                bool pressed = !digitalRead(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN);\n#else\n                bool pressed = false;\n#endif\n                if (pressed) { // If we woke because of press, instead generate a PRESS event.\n                    powerFSM.trigger(EVENT_PRESS);\n                } else {\n                    // Otherwise let the NB state handle the IRQ (and that state will handle stuff like IRQs etc)\n                    // we lie and say \"wake timer\" because the interrupt will be handled by the regular IRQ code\n                    powerFSM.trigger(EVENT_WAKE_TIMER);\n                }\n                break;\n            }\n        } else {\n            // Someone says we can't sleep now, so just save some power by sleeping the CPU for 100ms or so\n            delay(100);\n        }\n    } else {\n        // Time to stop sleeping!\n        statusLEDModule->setPowerLED(false);\n        LOG_INFO(\"Reached ls_secs, service loop()\");\n        powerFSM.trigger(EVENT_WAKE_TIMER);\n    }\n#endif\n}\n\nstatic void lsExit()\n{\n    LOG_POWERFSM(\"State: lsExit\");\n}\n\nstatic void nbEnter()\n{\n    LOG_POWERFSM(\"State: nbEnter\");\n    if (screen)\n        screen->setOn(false);\n#ifdef ARCH_ESP32\n    // Only ESP32 should turn off bluetooth\n    setBluetoothEnable(false);\n#endif\n\n    // FIXME - check if we already have packets for phone and immediately trigger EVENT_PACKETS_FOR_PHONE\n}\n\nstatic void darkEnter()\n{\n    LOG_POWERFSM(\"State: darkEnter\");\n    setBluetoothEnable(true);\n    if (screen)\n        screen->setOn(false);\n}\n\nstatic void serialEnter()\n{\n    LOG_POWERFSM(\"State: serialEnter\");\n    setBluetoothEnable(false);\n    if (screen) {\n        screen->setOn(true);\n    }\n}\n\nstatic void serialExit()\n{\n    LOG_POWERFSM(\"State: serialExit\");\n    // Turn bluetooth back on when we leave serial stream API\n    setBluetoothEnable(true);\n}\n\nstatic void powerEnter()\n{\n    LOG_POWERFSM(\"State: powerEnter\");\n    if (!isPowered()) {\n        // If we got here, we are in the wrong state - we should be in powered, let that state handle things\n        LOG_INFO(\"Loss of power in Powered\");\n        powerFSM.trigger(EVENT_POWER_DISCONNECTED);\n    } else {\n        if (screen)\n            screen->setOn(true);\n        setBluetoothEnable(true);\n        // within enter() the function getState() returns the state we came from\n    }\n}\n\nstatic void powerIdle()\n{\n    // LOG_POWERFSM(\"State: powerIdle\"); // very chatty\n    if (!isPowered()) {\n        // If we got here, we are in the wrong state\n        LOG_INFO(\"Loss of power in Powered\");\n        powerFSM.trigger(EVENT_POWER_DISCONNECTED);\n    }\n}\n\nstatic void powerExit()\n{\n    LOG_POWERFSM(\"State: powerExit\");\n    setBluetoothEnable(true);\n}\n\nstatic void onEnter()\n{\n    LOG_POWERFSM(\"State: onEnter\");\n    if (screen)\n        screen->setOn(true);\n    setBluetoothEnable(true);\n}\n\nstatic void onIdle()\n{\n    LOG_POWERFSM(\"State: onIdle\");\n    if (isPowered()) {\n        // If we got here, we are in the wrong state - we should be in powered, let that state handle things\n        powerFSM.trigger(EVENT_POWER_CONNECTED);\n    }\n}\n\nstatic void bootEnter()\n{\n    LOG_POWERFSM(\"State: bootEnter\");\n}\n\nState stateSHUTDOWN(shutdownEnter, NULL, NULL, \"SHUTDOWN\");\nState stateSDS(sdsEnter, NULL, NULL, \"SDS\");\nState stateLowBattSDS(lowBattSDSEnter, NULL, NULL, \"SDS\");\nState stateLS(lsEnter, lsIdle, lsExit, \"LS\");\nState stateNB(nbEnter, NULL, NULL, \"NB\");\nState stateDARK(darkEnter, NULL, NULL, \"DARK\");\nState stateSERIAL(serialEnter, NULL, serialExit, \"SERIAL\");\nState stateBOOT(bootEnter, NULL, NULL, \"BOOT\");\nState stateON(onEnter, onIdle, NULL, \"ON\");\nState statePOWER(powerEnter, powerIdle, powerExit, \"POWER\");\nFsm powerFSM(&stateBOOT);\n\nvoid PowerFSM_setup()\n{\n    bool isRouter = ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n                      config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)\n                         ? 1\n                         : 0);\n    bool hasPower = isPowered();\n\n    LOG_INFO(\"PowerFSM init, USB power=%d\", hasPower ? 1 : 0);\n    powerFSM.add_timed_transition(&stateBOOT, hasPower ? &statePOWER : &stateON, 3 * 1000, NULL, \"boot timeout\");\n\n    // wake timer expired or a packet arrived\n    // if we are a router node, we go to NB (no need for bluetooth) otherwise we go to DARK (so we can send message to phone)\n#ifdef ARCH_ESP32\n    powerFSM.add_transition(&stateLS, isRouter ? &stateNB : &stateDARK, EVENT_WAKE_TIMER, NULL, \"Wake timer\");\n#else // Don't go into a no-bluetooth state on low power platforms\n    powerFSM.add_transition(&stateLS, &stateDARK, EVENT_WAKE_TIMER, NULL, \"Wake timer\");\n#endif\n\n    // We need this transition, because we might not transition if we were waiting to enter light-sleep, because when we wake from\n    // light sleep we _always_ transition to NB or dark and\n    powerFSM.add_transition(&stateLS, isRouter ? &stateNB : &stateDARK, EVENT_PACKET_FOR_PHONE, NULL,\n                            \"Received packet, exiting light sleep\");\n    powerFSM.add_transition(&stateNB, &stateNB, EVENT_PACKET_FOR_PHONE, NULL, \"Received packet, resetting win wake\");\n\n    // Handle press events - note: we ignore button presses when in API mode\n    powerFSM.add_transition(&stateLS, &stateON, EVENT_PRESS, NULL, \"Press\");\n    powerFSM.add_transition(&stateNB, &stateON, EVENT_PRESS, NULL, \"Press\");\n    powerFSM.add_transition(&stateDARK, isPowered() ? &statePOWER : &stateON, EVENT_PRESS, NULL, \"Press\");\n    powerFSM.add_transition(&statePOWER, &statePOWER, EVENT_PRESS, NULL, \"Press\");\n    powerFSM.add_transition(&stateON, &stateON, EVENT_PRESS, NULL, \"Press\"); // reenter On to restart our timers\n    powerFSM.add_transition(&stateSERIAL, &stateSERIAL, EVENT_PRESS, NULL,\n                            \"Press\"); // Allow button to work while in serial API\n\n    // Handle critically low power battery by forcing deep sleep\n    powerFSM.add_transition(&stateBOOT, &stateLowBattSDS, EVENT_LOW_BATTERY, NULL, \"LowBat\");\n    powerFSM.add_transition(&stateLS, &stateLowBattSDS, EVENT_LOW_BATTERY, NULL, \"LowBat\");\n    powerFSM.add_transition(&stateNB, &stateLowBattSDS, EVENT_LOW_BATTERY, NULL, \"LowBat\");\n    powerFSM.add_transition(&stateDARK, &stateLowBattSDS, EVENT_LOW_BATTERY, NULL, \"LowBat\");\n    powerFSM.add_transition(&stateON, &stateLowBattSDS, EVENT_LOW_BATTERY, NULL, \"LowBat\");\n    powerFSM.add_transition(&stateSERIAL, &stateLowBattSDS, EVENT_LOW_BATTERY, NULL, \"LowBat\");\n\n    // Handle being told to power off\n    powerFSM.add_transition(&stateBOOT, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, \"Shutdown\");\n    powerFSM.add_transition(&stateLS, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, \"Shutdown\");\n    powerFSM.add_transition(&stateNB, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, \"Shutdown\");\n    powerFSM.add_transition(&stateDARK, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, \"Shutdown\");\n    powerFSM.add_transition(&stateON, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, \"Shutdown\");\n    powerFSM.add_transition(&stateSERIAL, &stateSHUTDOWN, EVENT_SHUTDOWN, NULL, \"Shutdown\");\n\n    // Inputbroker\n    powerFSM.add_transition(&stateLS, &stateON, EVENT_INPUT, NULL, \"Input Device\");\n    powerFSM.add_transition(&stateNB, &stateON, EVENT_INPUT, NULL, \"Input Device\");\n    powerFSM.add_transition(&stateDARK, &stateON, EVENT_INPUT, NULL, \"Input Device\");\n    powerFSM.add_transition(&stateON, &stateON, EVENT_INPUT, NULL, \"Input Device\");       // restarts the sleep timer\n    powerFSM.add_transition(&statePOWER, &statePOWER, EVENT_INPUT, NULL, \"Input Device\"); // restarts the sleep timer\n\n    powerFSM.add_transition(&stateDARK, &stateON, EVENT_BLUETOOTH_PAIR, NULL, \"Bluetooth pairing\");\n    powerFSM.add_transition(&stateON, &stateON, EVENT_BLUETOOTH_PAIR, NULL, \"Bluetooth pairing\");\n\n    // if we are a router we don't turn the screen on for these things\n    if (!isRouter) {\n        // if any packet destined for phone arrives, turn on bluetooth at least\n        powerFSM.add_transition(&stateNB, &stateDARK, EVENT_PACKET_FOR_PHONE, NULL, \"Packet for phone\");\n\n        // Show the received text message\n        powerFSM.add_transition(&stateLS, &stateON, EVENT_RECEIVED_MSG, NULL, \"Received text\");\n        powerFSM.add_transition(&stateNB, &stateON, EVENT_RECEIVED_MSG, NULL, \"Received text\");\n        powerFSM.add_transition(&stateDARK, &stateON, EVENT_RECEIVED_MSG, NULL, \"Received text\");\n        powerFSM.add_transition(&stateON, &stateON, EVENT_RECEIVED_MSG, NULL, \"Received text\"); // restarts the sleep timer\n    }\n\n    // If we are not in statePOWER but get a serial connection, suppress sleep (and keep the screen on) while connected\n    powerFSM.add_transition(&stateLS, &stateSERIAL, EVENT_SERIAL_CONNECTED, NULL, \"serial API\");\n    powerFSM.add_transition(&stateNB, &stateSERIAL, EVENT_SERIAL_CONNECTED, NULL, \"serial API\");\n    powerFSM.add_transition(&stateDARK, &stateSERIAL, EVENT_SERIAL_CONNECTED, NULL, \"serial API\");\n    powerFSM.add_transition(&stateON, &stateSERIAL, EVENT_SERIAL_CONNECTED, NULL, \"serial API\");\n    powerFSM.add_transition(&statePOWER, &stateSERIAL, EVENT_SERIAL_CONNECTED, NULL, \"serial API\");\n\n    // If we get power connected, go to the power connect state\n    powerFSM.add_transition(&stateLS, &statePOWER, EVENT_POWER_CONNECTED, NULL, \"power connect\");\n    powerFSM.add_transition(&stateNB, &statePOWER, EVENT_POWER_CONNECTED, NULL, \"power connect\");\n    powerFSM.add_transition(&stateDARK, &statePOWER, EVENT_POWER_CONNECTED, NULL, \"power connect\");\n    powerFSM.add_transition(&stateON, &statePOWER, EVENT_POWER_CONNECTED, NULL, \"power connect\");\n\n    powerFSM.add_transition(&statePOWER, &stateON, EVENT_POWER_DISCONNECTED, NULL, \"power disconnected\");\n    // powerFSM.add_transition(&stateSERIAL, &stateON, EVENT_POWER_DISCONNECTED, NULL, \"power disconnected\");\n\n    // the only way to leave state serial is for the client to disconnect (or we timeout and force disconnect them)\n    // when we leave, go to ON (which might not be the correct state if we have power connected, we will fix that in onEnter)\n    powerFSM.add_transition(&stateSERIAL, &stateON, EVENT_SERIAL_DISCONNECTED, NULL, \"serial disconnect\");\n\n    powerFSM.add_transition(&stateDARK, &stateDARK, EVENT_CONTACT_FROM_PHONE, NULL, \"Contact from phone\");\n\n#ifdef USE_EINK\n    // Allow E-Ink devices to suppress the screensaver, if screen timeout set to 0\n    if (config.display.screen_on_secs > 0)\n#endif\n    {\n        powerFSM.add_timed_transition(&stateON, &stateDARK,\n                                      Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs),\n                                      NULL, \"Screen-on timeout\");\n        powerFSM.add_timed_transition(&statePOWER, &stateDARK,\n                                      Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs),\n                                      NULL, \"Screen-on timeout\");\n    }\n\n// We never enter light-sleep or NB states on NRF52 (because the CPU uses so little power normally)\n#ifdef ARCH_ESP32\n    // See: https://github.com/meshtastic/firmware/issues/1071\n    // Don't add power saving transitions if we are a power saving tracker or sensor or have Wifi enabled. Sleep will be initiated\n    // through the modules\n\n#if HAS_WIFI && !defined(MESHTASTIC_EXCLUDE_WIFI)\n    bool isTrackerOrSensor = config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER ||\n                             config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER ||\n                             config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR;\n\n    if ((isRouter || config.power.is_power_saving) && !isWifiAvailable() && !isTrackerOrSensor) {\n        powerFSM.add_timed_transition(&stateNB, &stateLS,\n                                      Default::getConfiguredOrDefaultMs(config.power.min_wake_secs, default_min_wake_secs), NULL,\n                                      \"Min wake timeout\");\n\n        // If ESP32 and using power-saving, timer mover from DARK to light-sleep\n        // Also serves purpose of the old DARK to DARK transition(?) See https://github.com/meshtastic/firmware/issues/3517\n        powerFSM.add_timed_transition(\n            &stateDARK, &stateLS,\n            Default::getConfiguredOrDefaultMs(config.power.wait_bluetooth_secs, default_wait_bluetooth_secs), NULL,\n            \"Bluetooth timeout\");\n    } else {\n        // If ESP32, but not using power-saving, check periodically if config has drifted out of stateDark\n        powerFSM.add_timed_transition(&stateDARK, &stateDARK,\n                                      Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs),\n                                      NULL, \"Screen-on timeout\");\n    }\n#endif // HAS_WIFI || !defined(MESHTASTIC_EXCLUDE_WIFI)\n\n#else // (not) ARCH_ESP32\n    // If not ESP32, light-sleep not used. Check periodically if config has drifted out of stateDark\n    powerFSM.add_timed_transition(&stateDARK, &stateDARK,\n                                  Default::getConfiguredOrDefaultMs(config.display.screen_on_secs, default_screen_on_secs), NULL,\n                                  \"Screen-on timeout\");\n#endif\n\n    powerFSM.run_machine(); // run one iteration of the state machine, so we run our on enter tasks for the initial DARK state\n}\n#endif\n"
  },
  {
    "path": "src/PowerFSM.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef PowerFSMDebug\n#define LOG_POWERFSM(...) LOG_DEBUG(__VA_ARGS__)\n#else\n#define LOG_POWERFSM(...)\n#endif\n\n// See sw-design.md for documentation\n\n#define EVENT_PRESS 1\n#define EVENT_WAKE_TIMER 2\n// #define EVENT_RECEIVED_PACKET 3\n#define EVENT_PACKET_FOR_PHONE 4\n#define EVENT_RECEIVED_MSG 5\n// #define EVENT_BOOT 6 // now done with a timed transition\n#define EVENT_BLUETOOTH_PAIR 7\n// #define EVENT_NODEDB_UPDATED 8     // Now defunct: NodeDB has a big enough change that we think you should turn on the screen\n#define EVENT_CONTACT_FROM_PHONE 9 // the phone just talked to us over bluetooth\n#define EVENT_LOW_BATTERY 10       // Battery is critically low, go to sleep\n#define EVENT_SERIAL_CONNECTED 11\n#define EVENT_SERIAL_DISCONNECTED 12\n#define EVENT_POWER_CONNECTED 13\n#define EVENT_POWER_DISCONNECTED 14\n#define EVENT_FIRMWARE_UPDATE 15 // We just received a new firmware update packet from the phone\n#define EVENT_SHUTDOWN 16        // force a full shutdown now (not just sleep)\n#define EVENT_INPUT 17           // input broker wants something, we need to wake up and enable screen\n\n#if MESHTASTIC_EXCLUDE_POWER_FSM\nclass FakeFsm\n{\n  public:\n    void trigger(int event)\n    {\n        if (event == EVENT_SERIAL_CONNECTED) {\n            serialConnected = true;\n        } else if (event == EVENT_SERIAL_DISCONNECTED) {\n            serialConnected = false;\n        }\n    };\n    bool getState() { return serialConnected; };\n\n  private:\n    bool serialConnected = false;\n};\nextern FakeFsm powerFSM;\nvoid PowerFSM_setup();\n\n#else\n#include <Fsm.h>\nextern Fsm powerFSM;\nextern State stateON, statePOWER, stateSERIAL, stateDARK;\n\nvoid PowerFSM_setup();\n#endif"
  },
  {
    "path": "src/PowerFSMThread.h",
    "content": "#include \"Default.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"power.h\"\n\nnamespace concurrency\n{\n/// Wrapper to convert our powerFSM stuff into a 'thread'\nclass PowerFSMThread : public OSThread\n{\n  public:\n    // callback returns the period for the next callback invocation (or 0 if we should no longer be called)\n    PowerFSMThread() : OSThread(\"PowerFSM\") {}\n\n  protected:\n    int32_t runOnce() override\n    {\n#if !MESHTASTIC_EXCLUDE_POWER_FSM\n        powerFSM.run_machine();\n\n        /// If we are in power state we force the CPU to wake every 10ms to check for serial characters (we don't yet wake\n        /// cpu for serial rx - FIXME)\n        const State *state = powerFSM.getState();\n        canSleep = (state != &statePOWER) && (state != &stateSERIAL);\n\n        if (powerStatus->getHasUSB()) {\n            timeLastPowered = millis();\n        } else if (config.power.on_battery_shutdown_after_secs > 0 && config.power.on_battery_shutdown_after_secs != UINT32_MAX &&\n                   millis() > (timeLastPowered +\n                               Default::getConfiguredOrDefaultMs(\n                                   config.power.on_battery_shutdown_after_secs))) { // shutdown after 30 minutes unpowered\n            powerFSM.trigger(EVENT_SHUTDOWN);\n        }\n\n        return 100;\n#else\n        return INT32_MAX;\n#endif\n    }\n};\n\n} // namespace concurrency"
  },
  {
    "path": "src/PowerMon.cpp",
    "content": "#include \"PowerMon.h\"\n#include \"NodeDB.h\"\n\n// Use the 'live' config flag to figure out if we should be showing this message\nbool PowerMon::is_power_enabled(uint64_t m)\n{\n    // FIXME: VERY STRANGE BUG: if I or in \"force_enabled || \" the flashed image on a rak4631 is not accepted by the bootloader as\n    // valid!!!  Possibly a linker/gcc/bootloader bug somewhere?\n    return ((m & config.power.powermon_enables) ? true : false);\n}\n\nvoid PowerMon::setState(_meshtastic_PowerMon_State state, const char *reason)\n{\n#ifdef USE_POWERMON\n    auto oldstates = states;\n    states |= state;\n    if (oldstates != states && is_power_enabled(state)) {\n        emitLog(reason);\n    }\n#endif\n}\n\nvoid PowerMon::clearState(_meshtastic_PowerMon_State state, const char *reason)\n{\n#ifdef USE_POWERMON\n    auto oldstates = states;\n    states &= ~state;\n    if (oldstates != states && is_power_enabled(state)) {\n        emitLog(reason);\n    }\n#endif\n}\n\nvoid PowerMon::emitLog(const char *reason)\n{\n#ifdef USE_POWERMON\n    // The nrf52 printf doesn't understand 64 bit ints, so if we ever reach that point this function will need to change.\n    LOG_INFO(\"S:PM:0x%08lx,%s\", (uint32_t)states, reason);\n#endif\n}\n\nPowerMon *powerMon;\n\nvoid powerMonInit()\n{\n    powerMon = new PowerMon();\n}"
  },
  {
    "path": "src/PowerMon.h",
    "content": "#pragma once\n#include \"configuration.h\"\n\n#include \"meshtastic/powermon.pb.h\"\n\n#ifndef MESHTASTIC_EXCLUDE_POWERMON\n#define USE_POWERMON // FIXME turn this only for certain builds\n#endif\n\n/**\n * The singleton class for monitoring power consumption of device\n * subsystems/modes.\n *\n * For more information see the PowerMon docs.\n */\nclass PowerMon\n{\n    uint64_t states = 0UL;\n\n    friend class PowerStressModule;\n\n    /**\n     * If stress testing we always want all events logged\n     */\n    bool force_enabled = false;\n\n  public:\n    PowerMon() {}\n\n    // Mark entry/exit of a power consuming state\n    void setState(_meshtastic_PowerMon_State state, const char *reason = \"\");\n    void clearState(_meshtastic_PowerMon_State state, const char *reason = \"\");\n\n  private:\n    // Emit the coded log message\n    void emitLog(const char *reason);\n\n    // Use the 'live' config flag to figure out if we should be showing this message\n    bool is_power_enabled(uint64_t m);\n};\n\nextern PowerMon *powerMon;\n\nvoid powerMonInit();"
  },
  {
    "path": "src/PowerStatus.h",
    "content": "#pragma once\n#include \"Status.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n\nnamespace meshtastic\n{\n\n/**\n * A boolean where we have a third state of Unknown\n */\nenum OptionalBool { OptFalse = 0, OptTrue = 1, OptUnknown = 2 };\n\n/// Describes the state of the Power system.\nclass PowerStatus : public Status\n{\n\n  private:\n    CallbackObserver<PowerStatus, const PowerStatus *> statusObserver =\n        CallbackObserver<PowerStatus, const PowerStatus *>(this, &PowerStatus::updateStatus);\n\n    /// Whether we have a battery connected\n    OptionalBool hasBattery = OptUnknown;\n    /// Battery voltage in mV, valid if haveBattery is true\n    int batteryVoltageMv = 0;\n    /// Battery charge percentage, either read directly or estimated\n    int8_t batteryChargePercent = 0;\n    /// Whether USB is connected\n    OptionalBool hasUSB = OptUnknown;\n    /// Whether we are charging the battery\n    OptionalBool isCharging = OptUnknown;\n\n  public:\n    PowerStatus() { statusType = STATUS_TYPE_POWER; }\n    PowerStatus(OptionalBool hasBattery, OptionalBool hasUSB, OptionalBool isCharging, int batteryVoltageMv = -1,\n                int8_t batteryChargePercent = 0)\n        : Status()\n    {\n        this->hasBattery = hasBattery;\n        this->hasUSB = hasUSB;\n        this->isCharging = isCharging;\n        this->batteryVoltageMv = batteryVoltageMv;\n        this->batteryChargePercent = batteryChargePercent;\n    }\n    PowerStatus(const PowerStatus &);\n    PowerStatus &operator=(const PowerStatus &);\n\n    void observe(Observable<const PowerStatus *> *source) { statusObserver.observe(source); }\n\n    bool getHasBattery() const { return hasBattery == OptTrue; }\n\n    bool getHasUSB() const { return hasUSB == OptTrue; }\n\n    /// Can we even know if this board has USB power or not\n    bool knowsUSB() const { return hasUSB != OptUnknown; }\n\n    bool getIsCharging() const { return isCharging == OptTrue; }\n\n    int getBatteryVoltageMv() const { return batteryVoltageMv; }\n\n    /**\n     * Note: for boards with battery pin or PMU, 0% battery means 'unknown/this board doesn't have a battery installed'\n     */\n#if defined(HAS_PMU) || defined(BATTERY_PIN)\n    uint8_t getBatteryChargePercent() const { return getHasBattery() ? batteryChargePercent : 0; }\n#endif\n\n    /**\n     * Note: for boards without battery pin and PMU, 101% battery means 'the board is using external power'\n     */\n#if !defined(HAS_PMU) && !defined(BATTERY_PIN)\n    uint8_t getBatteryChargePercent() const { return getHasBattery() ? batteryChargePercent : 101; }\n#endif\n\n    bool matches(const PowerStatus *newStatus) const\n    {\n        return (newStatus->getHasBattery() != hasBattery || newStatus->getHasUSB() != hasUSB ||\n                newStatus->getBatteryVoltageMv() != batteryVoltageMv);\n    }\n    int updateStatus(const PowerStatus *newStatus)\n    {\n        // Only update the status if values have actually changed\n        bool isDirty;\n        {\n            isDirty = matches(newStatus);\n            initialized = true;\n            hasBattery = newStatus->hasBattery;\n            batteryVoltageMv = newStatus->getBatteryVoltageMv();\n            batteryChargePercent = newStatus->getBatteryChargePercent();\n            hasUSB = newStatus->hasUSB;\n            isCharging = newStatus->isCharging;\n        }\n        if (isDirty) {\n            // LOG_DEBUG(\"Battery %dmV %d%%\", batteryVoltageMv, batteryChargePercent);\n            onNewStatus.notifyObservers(this);\n        }\n        return 0;\n    }\n};\n\n} // namespace meshtastic\n\nextern meshtastic::PowerStatus *powerStatus;\n"
  },
  {
    "path": "src/RF95Configuration.h",
    "content": "// TODO refactor this out with better radio configuration system\n#ifdef USE_RF95\n#define RF95_RESET LORA_RESET\n#define RF95_IRQ LORA_DIO0  // on SX1262 version this is a no connect DIO0\n#define RF95_DIO1 LORA_DIO1 // Note: not really used for RF95, but used for pure SX127x\n#endif\n"
  },
  {
    "path": "src/RedirectablePrint.cpp",
    "content": "#include \"RedirectablePrint.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"memGet.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n#include <assert.h>\n#include <cstring>\n#include <memory>\n#include <stdexcept>\n#include <sys/time.h>\n#include <time.h>\n\n#ifdef ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\n#if HAS_NETWORKING\nextern meshtastic::Syslog syslog;\n#endif\nvoid RedirectablePrint::rpInit()\n{\n#ifdef HAS_FREE_RTOS\n    inDebugPrint = xSemaphoreCreateMutexStatic(&this->_MutexStorageSpace);\n#endif\n}\n\nvoid RedirectablePrint::setDestination(Print *_dest)\n{\n    assert(_dest);\n    dest = _dest;\n}\n\nsize_t RedirectablePrint::write(uint8_t c)\n{\n    // Always send the characters to our segger JTAG debugger\n#ifdef USE_SEGGER\n    SEGGER_RTT_PutChar(SEGGER_STDOUT_CH, c);\n#endif\n    // Account for legacy config transition\n    bool serialEnabled = config.has_security ? config.security.serial_enabled : config.device.serial_enabled;\n    if (!config.has_lora || serialEnabled)\n        dest->write(c);\n\n    return 1; // We always claim one was written, rather than trusting what the\n              // serial port said (which could be zero)\n}\n\nsize_t RedirectablePrint::vprintf(const char *logLevel, const char *format, va_list arg)\n{\n    va_list copy;\n#if ENABLE_JSON_LOGGING || ARCH_PORTDUINO\n    static char printBuf[512];\n#else\n    static char printBuf[160];\n#endif\n\n#ifdef ARCH_PORTDUINO\n    bool color = !portduino_config.ascii_logs;\n#else\n    bool color = true;\n#endif\n\n    va_copy(copy, arg);\n    size_t len = vsnprintf(printBuf, sizeof(printBuf), format, copy);\n    va_end(copy);\n\n    // If the resulting string is longer than sizeof(printBuf)-1 characters, the remaining characters are still counted for the\n    // return value\n\n    if (len > sizeof(printBuf) - 1) {\n        len = sizeof(printBuf) - 1;\n        printBuf[sizeof(printBuf) - 2] = '\\n';\n    }\n    for (size_t f = 0; f < len; f++) {\n        if (!std::isprint(static_cast<unsigned char>(printBuf[f])) && printBuf[f] != '\\n')\n            printBuf[f] = '#';\n    }\n    if (color && logLevel != nullptr) {\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0)\n            Print::write(\"\\u001b[34m\", 5);\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_INFO) == 0)\n            Print::write(\"\\u001b[32m\", 5);\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_WARN) == 0)\n            Print::write(\"\\u001b[33m\", 5);\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_ERROR) == 0)\n            Print::write(\"\\u001b[31m\", 5);\n    }\n    len = Print::write(printBuf, len);\n    if (color && logLevel != nullptr) {\n        Print::write(\"\\u001b[0m\", 4);\n    }\n    return len;\n}\n\nvoid RedirectablePrint::log_to_serial(const char *logLevel, const char *format, va_list arg)\n{\n    size_t r = 0;\n\n#ifdef ARCH_PORTDUINO\n    bool color = !portduino_config.ascii_logs;\n#else\n    bool color = true;\n#endif\n\n    // include the header\n    if (color) {\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0)\n            Print::write(\"\\u001b[34m\", 5);\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_INFO) == 0)\n            Print::write(\"\\u001b[32m\", 5);\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_WARN) == 0)\n            Print::write(\"\\u001b[33m\", 5);\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_ERROR) == 0)\n            Print::write(\"\\u001b[31m\", 5);\n        if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_TRACE) == 0)\n            Print::write(\"\\u001b[35m\", 5);\n    }\n\n    uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // display local time on logfile\n    if (rtc_sec > 0) {\n        long hms = rtc_sec % SEC_PER_DAY;\n        // hms += tz.tz_dsttime * SEC_PER_HOUR;\n        // hms -= tz.tz_minuteswest * SEC_PER_MIN;\n        // mod `hms` to ensure in positive range of [0...SEC_PER_DAY)\n        hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;\n\n        // Tear apart hms into h:m:s\n        int hour = hms / SEC_PER_HOUR;\n        int min = (hms % SEC_PER_HOUR) / SEC_PER_MIN;\n        int sec = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN\n\n#ifdef ARCH_PORTDUINO\n        ::printf(\"%s \", logLevel);\n        if (color) {\n            ::printf(\"\\u001b[0m\");\n        }\n        ::printf(\"| %02d:%02d:%02d %u \", hour, min, sec, millis() / 1000);\n#else\n        printf(\"%s \", logLevel);\n        if (color) {\n            printf(\"\\u001b[0m\");\n        }\n        printf(\"| %02d:%02d:%02d %u \", hour, min, sec, millis() / 1000);\n#endif\n    } else {\n#ifdef ARCH_PORTDUINO\n        ::printf(\"%s \", logLevel);\n        if (color) {\n            ::printf(\"\\u001b[0m\");\n        }\n        ::printf(\"| ??:??:?? %u \", millis() / 1000);\n#else\n        printf(\"%s \", logLevel);\n        if (color) {\n            printf(\"\\u001b[0m\");\n        }\n        printf(\"| ??:??:?? %u \", millis() / 1000);\n#endif\n    }\n    auto thread = concurrency::OSThread::currentThread;\n    if (thread) {\n        print(\"[\");\n        // printf(\"%p \", thread);\n        // assert(thread->ThreadName.length());\n        print(thread->ThreadName);\n        print(\"] \");\n    }\n\n#ifdef DEBUG_HEAP\n    // Add heap free space bytes prefix before every log message\n#ifdef ARCH_PORTDUINO\n    ::printf(\"[heap %u] \", memGet.getFreeHeap());\n#else\n    printf(\"[heap %u] \", memGet.getFreeHeap());\n#endif\n#endif // DEBUG_HEAP\n\n    r += vprintf(logLevel, format, arg);\n}\n\nvoid RedirectablePrint::log_to_syslog(const char *logLevel, const char *format, va_list arg)\n{\n#if HAS_NETWORKING && !defined(ARCH_PORTDUINO)\n    // if syslog is in use, collect the log messages and send them to syslog\n    if (syslog.isEnabled()) {\n        int ll = 0;\n        switch (logLevel[0]) {\n        case 'D':\n            ll = SYSLOG_DEBUG;\n            break;\n        case 'I':\n            ll = SYSLOG_INFO;\n            break;\n        case 'W':\n            ll = SYSLOG_WARN;\n            break;\n        case 'E':\n            ll = SYSLOG_ERR;\n            break;\n        case 'C':\n            ll = SYSLOG_CRIT;\n            break;\n        default:\n            ll = 0;\n        }\n        auto thread = concurrency::OSThread::currentThread;\n        if (thread) {\n            syslog.vlogf(ll, thread->ThreadName.c_str(), format, arg);\n        } else {\n            syslog.vlogf(ll, format, arg);\n        }\n    }\n#endif\n}\n\nvoid RedirectablePrint::log_to_ble(const char *logLevel, const char *format, va_list arg)\n{\n#if !MESHTASTIC_EXCLUDE_BLUETOOTH\n    if (config.security.debug_log_api_enabled && !pauseBluetoothLogging) {\n        bool isBleConnected = false;\n#ifdef ARCH_ESP32\n        isBleConnected = nimbleBluetooth && nimbleBluetooth->isActive() && nimbleBluetooth->isConnected();\n#elif defined(ARCH_NRF52)\n        isBleConnected = nrf52Bluetooth != nullptr && nrf52Bluetooth->isConnected();\n#endif\n        if (isBleConnected) {\n            auto thread = concurrency::OSThread::currentThread;\n            meshtastic_LogRecord logRecord = meshtastic_LogRecord_init_zero;\n            logRecord.level = getLogLevel(logLevel);\n            vsprintf(logRecord.message, format, arg);\n            if (thread)\n                strcpy(logRecord.source, thread->ThreadName.c_str());\n            logRecord.time = getValidTime(RTCQuality::RTCQualityDevice, true);\n\n            auto buffer = std::unique_ptr<uint8_t[]>(new uint8_t[meshtastic_LogRecord_size]);\n            size_t size = pb_encode_to_bytes(buffer.get(), meshtastic_LogRecord_size, meshtastic_LogRecord_fields, &logRecord);\n#ifdef ARCH_ESP32\n            nimbleBluetooth->sendLog(buffer.get(), size);\n#elif defined(ARCH_NRF52)\n            nrf52Bluetooth->sendLog(buffer.get(), size);\n#endif\n        }\n    }\n#else\n    (void)logLevel;\n    (void)format;\n    (void)arg;\n#endif\n}\n\nmeshtastic_LogRecord_Level RedirectablePrint::getLogLevel(const char *logLevel)\n{\n    meshtastic_LogRecord_Level ll = meshtastic_LogRecord_Level_UNSET; // default to unset\n    switch (logLevel[0]) {\n    case 'D':\n        ll = meshtastic_LogRecord_Level_DEBUG;\n        break;\n    case 'I':\n        ll = meshtastic_LogRecord_Level_INFO;\n        break;\n    case 'W':\n        ll = meshtastic_LogRecord_Level_WARNING;\n        break;\n    case 'E':\n        ll = meshtastic_LogRecord_Level_ERROR;\n        break;\n    case 'C':\n        ll = meshtastic_LogRecord_Level_CRITICAL;\n        break;\n    }\n    return ll;\n}\n\nvoid RedirectablePrint::log(const char *logLevel, const char *format, ...)\n{\n\n    // append \\n to format\n    size_t len = strlen(format);\n    auto newFormat = std::unique_ptr<char[]>(new char[len + 2]);\n    strcpy(newFormat.get(), format);\n    newFormat[len] = '\\n';\n    newFormat[len + 1] = '\\0';\n\n#if ARCH_PORTDUINO\n    // level trace is special, two possible ways to handle it.\n    if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_TRACE) == 0) {\n        if (portduino_config.traceFilename != \"\") {\n            va_list arg;\n            va_start(arg, format);\n            try {\n                traceFile << va_arg(arg, char *) << std::endl;\n            } catch (const std::ios_base::failure &e) {\n            }\n            va_end(arg);\n        }\n        if (portduino_config.logoutputlevel < level_trace && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_TRACE) == 0) {\n            return;\n        }\n    }\n    if (portduino_config.logoutputlevel < level_debug && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0) {\n        return;\n    } else if (portduino_config.logoutputlevel < level_info && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_INFO) == 0) {\n        return;\n    } else if (portduino_config.logoutputlevel < level_warn && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_WARN) == 0) {\n        return;\n    }\n#endif\n    if (moduleConfig.serial.override_console_serial_port && strcmp(logLevel, MESHTASTIC_LOG_LEVEL_DEBUG) == 0) {\n        return;\n    }\n\n#ifdef HAS_FREE_RTOS\n    if (inDebugPrint != nullptr && xSemaphoreTake(inDebugPrint, portMAX_DELAY) == pdTRUE) {\n#else\n    if (!inDebugPrint) {\n        inDebugPrint = true;\n#endif\n\n        va_list arg;\n        va_list arg_copy;\n\n        va_start(arg, format);\n\n        va_copy(arg_copy, arg);\n        log_to_serial(logLevel, newFormat.get(), arg_copy);\n        va_end(arg_copy);\n\n        va_copy(arg_copy, arg);\n        log_to_syslog(logLevel, newFormat.get(), arg_copy);\n        va_end(arg_copy);\n\n        log_to_ble(logLevel, newFormat.get(), arg);\n\n        va_end(arg);\n#ifdef HAS_FREE_RTOS\n        xSemaphoreGive(inDebugPrint);\n#else\n        inDebugPrint = false;\n#endif\n    }\n\n    return;\n}\n\nvoid RedirectablePrint::hexDump(const char *logLevel, const unsigned char *buf, uint16_t len)\n{\n    const char alphabet[17] = \"0123456789abcdef\";\n    log(logLevel, \"    +------------------------------------------------+ +----------------+\");\n    log(logLevel, \"    |.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .a .b .c .d .e .f | |      ASCII     |\");\n    for (uint16_t i = 0; i < len; i += 16) {\n        if (i % 128 == 0)\n            log(logLevel, \"    +------------------------------------------------+ +----------------+\");\n        char s[] = \"     |                                                | |                |\\n\";\n        uint8_t ix = 5, iy = 56;\n        for (uint8_t j = 0; j < 16; j++) {\n            if (i + j < len) {\n                uint8_t c = buf[i + j];\n                s[ix++] = alphabet[(c >> 4) & 0x0F];\n                s[ix++] = alphabet[c & 0x0F];\n                ix++;\n                if (c > 31 && c < 128)\n                    s[iy++] = c;\n                else\n                    s[iy++] = '.';\n            }\n        }\n        uint8_t index = i / 16;\n        sprintf(s, \"%03x\", index);\n        s[3] = '.';\n        log(logLevel, s);\n    }\n    log(logLevel, \"    +------------------------------------------------+ +----------------+\");\n}\n\nstd::string RedirectablePrint::mt_sprintf(const std::string fmt_str, ...)\n{\n    int n = ((int)fmt_str.size()) * 2; /* Reserve two times as much as the length of the fmt_str */\n    std::unique_ptr<char[]> formatted;\n    va_list ap;\n    while (1) {\n        formatted.reset(new char[n]); /* Wrap the plain char array into the unique_ptr */\n        strcpy(&formatted[0], fmt_str.c_str());\n        va_start(ap, fmt_str);\n        int final_n = vsnprintf(&formatted[0], n, fmt_str.c_str(), ap);\n        va_end(ap);\n        if (final_n < 0 || final_n >= n)\n            n += abs(final_n - n + 1);\n        else\n            break;\n    }\n    return std::string(formatted.get());\n}\n"
  },
  {
    "path": "src/RedirectablePrint.h",
    "content": "#pragma once\n\n#include \"../freertosinc.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n#include <Print.h>\n#include <stdarg.h>\n#include <string>\n\n/**\n * A Printable that can be switched to squirt its bytes to a different sink.\n * This class is mostly useful to allow debug printing to be redirected away from Serial\n * to some other transport if we switch Serial usage (on the fly) to some other purpose.\n */\nclass RedirectablePrint : public Print\n{\n    Print *dest;\n\n#ifdef HAS_FREE_RTOS\n    SemaphoreHandle_t inDebugPrint = nullptr;\n    StaticSemaphore_t _MutexStorageSpace;\n#else\n    volatile bool inDebugPrint = false;\n#endif\n  public:\n    explicit RedirectablePrint(Print *_dest) : dest(_dest) {}\n\n    /**\n     * Set a new destination\n     */\n    void rpInit();\n    void setDestination(Print *dest);\n\n    virtual size_t write(uint8_t c);\n\n    /**\n     * Debug logging print message\n     *\n     * If the provide format string ends with a newline we assume it is the final print of a single\n     * log message.  Otherwise we assume more prints will come before the log message ends.  This\n     * allows you to call logDebug a few times to build up a single log message line if you wish.\n     */\n    void log(const char *logLevel, const char *format, ...) __attribute__((format(printf, 3, 4)));\n\n    /** like printf but va_list based */\n    size_t vprintf(const char *logLevel, const char *format, va_list arg);\n\n    void hexDump(const char *logLevel, const unsigned char *buf, uint16_t len);\n\n    std::string mt_sprintf(const std::string fmt_str, ...);\n\n  protected:\n    /// Subclasses can override if they need to change how we format over the serial port\n    virtual void log_to_serial(const char *logLevel, const char *format, va_list arg);\n    meshtastic_LogRecord_Level getLogLevel(const char *logLevel);\n\n  private:\n    void log_to_syslog(const char *logLevel, const char *format, va_list arg);\n    void log_to_ble(const char *logLevel, const char *format, va_list arg);\n};"
  },
  {
    "path": "src/SPILock.cpp",
    "content": "#include \"SPILock.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <assert.h>\n\nconcurrency::Lock *spiLock;\n\nvoid initSPI()\n{\n    assert(!spiLock);\n    spiLock = new concurrency::Lock();\n}"
  },
  {
    "path": "src/SPILock.h",
    "content": "#pragma once\n\n#include \"../concurrency/LockGuard.h\"\n\n/**\n * Used to provide mutual exclusion for access to the SPI bus.  Usage:\n * concurrency::LockGuard g(spiLock);\n */\nextern concurrency::Lock *spiLock;\n\n/** Setup SPI access and create the spiLock lock. */\nvoid initSPI();"
  },
  {
    "path": "src/SafeFile.cpp",
    "content": "#include \"SafeFile.h\"\n\n#ifdef FSCom\n\n// Only way to work on both esp32 and nrf52\nstatic File openFile(const char *filename, bool fullAtomic)\n{\n    concurrency::LockGuard g(spiLock);\n    LOG_DEBUG(\"Opening %s, fullAtomic=%d\", filename, fullAtomic);\n#ifdef ARCH_NRF52\n    FSCom.remove(filename);\n    return FSCom.open(filename, FILE_O_WRITE);\n#endif\n    if (!fullAtomic) {\n        FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists)\n    }\n\n    String filenameTmp = filename;\n    filenameTmp += \".tmp\";\n\n    // FIXME: If we are doing a full atomic write, we may need to remove the old tmp file now\n    // if (fullAtomic) {\n    //     FSCom.remove(filename);\n    // }\n\n    // clear any previous LFS errors\n    return FSCom.open(filenameTmp.c_str(), FILE_O_WRITE);\n}\n\nSafeFile::SafeFile(const char *_filename, bool fullAtomic)\n    : filename(_filename), f(openFile(_filename, fullAtomic)), fullAtomic(fullAtomic)\n{\n}\n\nsize_t SafeFile::write(uint8_t ch)\n{\n    if (!f)\n        return 0;\n\n    hash ^= ch;\n    return f.write(ch);\n}\n\nsize_t SafeFile::write(const uint8_t *buffer, size_t size)\n{\n    if (!f)\n        return 0;\n\n    for (size_t i = 0; i < size; i++) {\n        hash ^= buffer[i];\n    }\n    return f.write((uint8_t const *)buffer, size); // This nasty cast is _IMPORTANT_ otherwise the correct adafruit method does\n                                                   // not get used (they made a mistake in their typing)\n}\n\n/**\n * Atomically close the file (overwriting any old version) and readback the contents to confirm the hash matches\n *\n * @return false for failure\n */\nbool SafeFile::close()\n{\n    if (!f)\n        return false;\n\n    spiLock->lock();\n    f.close();\n    spiLock->unlock();\n\n#ifdef ARCH_NRF52\n    return true;\n#endif\n    if (!testReadback())\n        return false;\n\n    // Rename or overwrite (atomic operation)\n    String filenameTmp = filename;\n    filenameTmp += \".tmp\";\n    if (!renameFile(filenameTmp.c_str(), filename.c_str())) {\n        LOG_ERROR(\"Error: can't rename new pref file\");\n        return false;\n    }\n\n    return true;\n}\n\n/// Read our (closed) tempfile back in and compare the hash\nbool SafeFile::testReadback()\n{\n    concurrency::LockGuard g(spiLock);\n\n    String filenameTmp = filename;\n    filenameTmp += \".tmp\";\n    auto f2 = FSCom.open(filenameTmp.c_str(), FILE_O_READ);\n    if (!f2) {\n        LOG_ERROR(\"Can't open tmp file for readback\");\n        return false;\n    }\n\n    int c = 0;\n    uint8_t test_hash = 0;\n    while ((c = f2.read()) >= 0) {\n        test_hash ^= (uint8_t)c;\n    }\n    f2.close();\n\n    if (test_hash != hash) {\n        LOG_ERROR(\"Readback failed hash mismatch\");\n        return false;\n    }\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/SafeFile.h",
    "content": "#pragma once\n\n#include \"FSCommon.h\"\n#include \"SPILock.h\"\n#include \"configuration.h\"\n\n#ifdef FSCom\n\n/**\n * This class provides 'safe'/paranoid file writing.\n *\n * Some of our filesystems (in particular the nrf52) may have bugs beneath our layer.  Therefore we want to\n * be very careful about how we write files.  This class provides a restricted (Stream only) writing API for writing to files.\n *\n * Notably:\n * - we keep a simple xor hash of all characters that were written.\n * - We do not allow seeking (because we want to maintain our hash)\n * - we provide an close() method which is similar to close but returns false if we were unable to successfully write the\n * file.  Also this method\n * - atomically replaces any old version of the file on the disk with our new file (after first rereading the file from the disk\n * to confirm the hash matches)\n * - Some files are super huge so we can't do the full atomic rename/copy (because of filesystem size limits).  If !fullAtomic\n * then we still do the readback to verify file is valid so higher level code can handle failures.\n */\nclass SafeFile : public Print\n{\n  public:\n    explicit SafeFile(char const *filepath, bool fullAtomic = false);\n\n    virtual size_t write(uint8_t);\n    virtual size_t write(const uint8_t *buffer, size_t size);\n\n    /**\n     * Atomically close the file (deleting any old versions) and readback the contents to confirm the hash matches\n     *\n     * @return false for failure\n     */\n    bool close();\n\n  private:\n    /// Read our (closed) tempfile back in and compare the hash\n    bool testReadback();\n\n    String filename;\n    File f;\n    bool fullAtomic;\n    uint8_t hash = 0;\n};\n\n#endif"
  },
  {
    "path": "src/SerialConsole.cpp",
    "content": "#include \"SerialConsole.h\"\n#include \"Default.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n#include \"time.h\"\n\n#if defined(ARDUINO_USB_CDC_ON_BOOT) && ARDUINO_USB_CDC_ON_BOOT\n#define IS_USB_SERIAL\n#ifdef SERIAL_HAS_ON_RECEIVE\n#undef SERIAL_HAS_ON_RECEIVE\n#endif\n#include \"HWCDC.h\"\n#endif\n\n#ifdef RP2040_SLOW_CLOCK\n#define Port Serial2\n#else\n#ifdef USER_DEBUG_PORT // change by WayenWeng\n#define Port USER_DEBUG_PORT\n#else\n#define Port Serial\n#endif\n#endif\n// Defaulting to the formerly removed phone_timeout_secs value of 15 minutes\n#define SERIAL_CONNECTION_TIMEOUT (15 * 60) * 1000UL\n\nSerialConsole *console;\n\nvoid consoleInit()\n{\n    auto sc = new SerialConsole(); // Must be dynamically allocated because we are now inheriting from thread\n\n#if defined(SERIAL_HAS_ON_RECEIVE)\n    // onReceive does only exist for HardwareSerial not for USB CDC serial\n    Port.onReceive([sc]() { sc->rxInt(); });\n#else\n    (void)sc;\n#endif\n    DEBUG_PORT.rpInit(); // Simply sets up semaphore\n}\n\nvoid consolePrintf(const char *format, ...)\n{\n    va_list arg;\n    va_start(arg, format);\n    console->vprintf(nullptr, format, arg);\n    va_end(arg);\n    console->flush();\n}\n\nSerialConsole::SerialConsole() : StreamAPI(&Port), RedirectablePrint(&Port), concurrency::OSThread(\"SerialConsole\")\n{\n    api_type = TYPE_SERIAL;\n    assert(!console);\n    console = this;\n    canWrite = false; // We don't send packets to our port until it has talked to us first\n\n#ifdef RP2040_SLOW_CLOCK\n    Port.setTX(SERIAL2_TX);\n    Port.setRX(SERIAL2_RX);\n#endif\n    Port.begin(SERIAL_BAUD);\n#if defined(ARCH_NRF52) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(ARCH_RP2040) ||   \\\n    defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)\n    time_t timeout = millis();\n    while (!Port) {\n        if (Throttle::isWithinTimespanMs(timeout, FIVE_SECONDS_MS)) {\n            delay(100);\n        } else {\n            break;\n        }\n    }\n#endif\n#if !ARCH_PORTDUINO\n    emitRebooted();\n#endif\n}\n\nint32_t SerialConsole::runOnce()\n{\n#ifdef HELTEC_MESH_SOLAR\n    // After enabling the mesh solar serial port module configuration, command processing is handled by the serial port module.\n    if (moduleConfig.serial.enabled && moduleConfig.serial.override_console_serial_port &&\n        moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG) {\n        return 250;\n    }\n#endif\n\n    int32_t delay = runOncePart();\n#if defined(SERIAL_HAS_ON_RECEIVE) || defined(CONFIG_IDF_TARGET_ESP32S2)\n    return Port.available() ? delay : INT32_MAX;\n#elif defined(IS_USB_SERIAL)\n    return HWCDC::isPlugged() ? delay : (1000 * 20);\n#else\n    return delay;\n#endif\n}\n\nvoid SerialConsole::flush()\n{\n    Port.flush();\n}\n\n// trigger tx of serial data\nvoid SerialConsole::onNowHasData(uint32_t fromRadioNum)\n{\n    setIntervalFromNow(0);\n}\n\n// trigger rx of serial data\nvoid SerialConsole::rxInt()\n{\n    setIntervalFromNow(0);\n}\n\n// For the serial port we can't really detect if any client is on the other side, so instead just look for recent messages\nbool SerialConsole::checkIsConnected()\n{\n    return Throttle::isWithinTimespanMs(lastContactMsec, SERIAL_CONNECTION_TIMEOUT);\n}\n\n/**\n * we override this to notice when we've received a protobuf over the serial\n * stream.  Then we shut off debug serial output.\n */\nbool SerialConsole::handleToRadio(const uint8_t *buf, size_t len)\n{\n    // only talk to the API once the configuration has been loaded and we're sure the serial port is not disabled.\n    if (config.has_lora && config.security.serial_enabled) {\n        // Switch to protobufs for log messages\n        usingProtobufs = true;\n        canWrite = true;\n\n        return StreamAPI::handleToRadio(buf, len);\n    } else {\n        return false;\n    }\n}\n\nvoid SerialConsole::log_to_serial(const char *logLevel, const char *format, va_list arg)\n{\n    if (usingProtobufs && config.security.debug_log_api_enabled) {\n        meshtastic_LogRecord_Level ll = RedirectablePrint::getLogLevel(logLevel);\n        auto thread = concurrency::OSThread::currentThread;\n        emitLogRecord(ll, thread ? thread->ThreadName.c_str() : \"\", format, arg);\n    } else\n        RedirectablePrint::log_to_serial(logLevel, format, arg);\n}"
  },
  {
    "path": "src/SerialConsole.h",
    "content": "#pragma once\n\n#include \"RedirectablePrint.h\"\n#include \"StreamAPI.h\"\n/**\n * Provides both debug printing and, if the client starts sending protobufs to us, switches to send/receive protobufs\n * (and starts dropping debug printing - FIXME, eventually those prints should be encapsulated in protobufs).\n */\nclass SerialConsole : public StreamAPI, public RedirectablePrint, private concurrency::OSThread\n{\n    /**\n     * If true we are talking to a smart host and all messages (including log messages) must be framed as protobufs.\n     */\n    bool usingProtobufs = false;\n\n  public:\n    SerialConsole();\n\n    /**\n     * we override this to notice when we've received a protobuf over the serial stream.  Then we shunt off\n     * debug serial output.\n     */\n    virtual bool handleToRadio(const uint8_t *buf, size_t len) override;\n\n    virtual size_t write(uint8_t c) override\n    {\n        if (c == '\\n') // prefix any newlines with carriage return\n            RedirectablePrint::write('\\r');\n        return RedirectablePrint::write(c);\n    }\n\n    virtual int32_t runOnce() override;\n\n    void flush();\n    void rxInt();\n\n  protected:\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() override;\n\n    virtual void onNowHasData(uint32_t fromRadioNum) override;\n\n    /// Possibly switch to protobufs if we see a valid protobuf message\n    virtual void log_to_serial(const char *logLevel, const char *format, va_list arg);\n};\n\n// A simple wrapper to allow non class aware code write to the console\nvoid consolePrintf(const char *format, ...);\nvoid consoleInit();\n\nextern SerialConsole *console;"
  },
  {
    "path": "src/Status.h",
    "content": "#pragma once\n\n#include \"Observer.h\"\n\n// Constants for the various status types, so we can tell subclass instances apart\n#define STATUS_TYPE_BASE 0\n#define STATUS_TYPE_POWER 1\n#define STATUS_TYPE_GPS 2\n#define STATUS_TYPE_NODE 3\n#define STATUS_TYPE_BLUETOOTH 4\n\nnamespace meshtastic\n{\n\n// A base class for observable status\nclass Status\n{\n  protected:\n    // Allows us to observe an Observable\n    CallbackObserver<Status, const Status *> statusObserver =\n        CallbackObserver<Status, const Status *>(this, &Status::updateStatus);\n    bool initialized = false;\n    // Workaround for no typeid support\n    int statusType = 0;\n\n  public:\n    // Allows us to generate observable events\n    Observable<const Status *> onNewStatus;\n\n    // Enable polymorphism ?\n    virtual ~Status() = default;\n\n    Status()\n    {\n        if (!statusType) {\n            statusType = STATUS_TYPE_BASE;\n        }\n    }\n\n    // Prevent object copy/move\n    Status(const Status &) = delete;\n    Status &operator=(const Status &) = delete;\n\n    // Start observing a source of data\n    void observe(Observable<const Status *> *source) { statusObserver.observe(source); }\n\n    // Determines whether or not existing data matches the data in another Status instance\n    bool matches(const Status *otherStatus) const { return true; }\n\n    bool isInitialized() const { return initialized; }\n\n    int getStatusType() const { return statusType; }\n\n    // Called when the Observable we're observing generates a new notification\n    int updateStatus(const Status *newStatus) { return 0; }\n};\n}; // namespace meshtastic\n"
  },
  {
    "path": "src/airtime.cpp",
    "content": "#include \"airtime.h\"\n#include \"NodeDB.h\"\n#include \"configuration.h\"\n\nAirTime *airTime = NULL;\n\n// Don't read out of this directly. Use the helper functions.\n\nuint32_t air_period_tx[PERIODS_TO_LOG];\nuint32_t air_period_rx[PERIODS_TO_LOG];\n\nvoid AirTime::logAirtime(reportTypes reportType, uint32_t airtime_ms)\n{\n\n    if (reportType == TX_LOG) {\n        LOG_DEBUG(\"Packet TX: %ums\", airtime_ms);\n        this->airtimes.periodTX[0] = this->airtimes.periodTX[0] + airtime_ms;\n        air_period_tx[0] = air_period_tx[0] + airtime_ms;\n\n        this->utilizationTX[this->getPeriodUtilHour()] = this->utilizationTX[this->getPeriodUtilHour()] + airtime_ms;\n    } else if (reportType == RX_LOG) {\n        LOG_DEBUG(\"Packet RX: %ums\", airtime_ms);\n        this->airtimes.periodRX[0] = this->airtimes.periodRX[0] + airtime_ms;\n        air_period_rx[0] = air_period_rx[0] + airtime_ms;\n    } else if (reportType == RX_ALL_LOG) {\n        LOG_DEBUG(\"Packet RX (noise?) : %ums\", airtime_ms);\n        this->airtimes.periodRX_ALL[0] = this->airtimes.periodRX_ALL[0] + airtime_ms;\n    }\n\n    // Log all airtime type for channel utilization\n    this->channelUtilization[this->getPeriodUtilMinute()] = channelUtilization[this->getPeriodUtilMinute()] + airtime_ms;\n}\n\nuint8_t AirTime::currentPeriodIndex()\n{\n    return ((getSecondsSinceBoot() / SECONDS_PER_PERIOD) % PERIODS_TO_LOG);\n}\n\nuint8_t AirTime::getPeriodUtilMinute()\n{\n    return (getSecondsSinceBoot() / 10) % CHANNEL_UTILIZATION_PERIODS;\n}\n\nuint8_t AirTime::getPeriodUtilHour()\n{\n    return (getSecondsSinceBoot() / 60) % MINUTES_IN_HOUR;\n}\n\nvoid AirTime::airtimeRotatePeriod()\n{\n\n    if (this->airtimes.lastPeriodIndex != this->currentPeriodIndex()) {\n        LOG_DEBUG(\"Rotate airtimes to a new period = %u\", this->currentPeriodIndex());\n\n        for (int i = PERIODS_TO_LOG - 2; i >= 0; --i) {\n            this->airtimes.periodTX[i + 1] = this->airtimes.periodTX[i];\n            this->airtimes.periodRX[i + 1] = this->airtimes.periodRX[i];\n            this->airtimes.periodRX_ALL[i + 1] = this->airtimes.periodRX_ALL[i];\n\n            air_period_tx[i + 1] = this->airtimes.periodTX[i];\n            air_period_rx[i + 1] = this->airtimes.periodRX[i];\n        }\n\n        this->airtimes.periodTX[0] = 0;\n        this->airtimes.periodRX[0] = 0;\n        this->airtimes.periodRX_ALL[0] = 0;\n\n        air_period_tx[0] = 0;\n        air_period_rx[0] = 0;\n\n        this->airtimes.lastPeriodIndex = this->currentPeriodIndex();\n    }\n}\n\nuint32_t *AirTime::airtimeReport(reportTypes reportType)\n{\n\n    if (reportType == TX_LOG) {\n        return this->airtimes.periodTX;\n    } else if (reportType == RX_LOG) {\n        return this->airtimes.periodRX;\n    } else if (reportType == RX_ALL_LOG) {\n        return this->airtimes.periodRX_ALL;\n    }\n    return 0;\n}\n\nuint8_t AirTime::getPeriodsToLog()\n{\n    return PERIODS_TO_LOG;\n}\n\nuint32_t AirTime::getSecondsPerPeriod()\n{\n    return SECONDS_PER_PERIOD;\n}\n\nuint32_t AirTime::getSecondsSinceBoot()\n{\n    return this->secSinceBoot;\n}\n\nfloat AirTime::channelUtilizationPercent()\n{\n    uint32_t sum = 0;\n    for (uint32_t i = 0; i < CHANNEL_UTILIZATION_PERIODS; i++) {\n        sum += this->channelUtilization[i];\n    }\n\n    return (float(sum) / float(CHANNEL_UTILIZATION_PERIODS * 10 * 1000)) * 100;\n}\n\nfloat AirTime::utilizationTXPercent()\n{\n    uint32_t sum = 0;\n    for (uint32_t i = 0; i < MINUTES_IN_HOUR; i++) {\n        sum += this->utilizationTX[i];\n    }\n\n    return (float(sum) / float(MS_IN_HOUR)) * 100;\n}\n\nbool AirTime::isTxAllowedChannelUtil(bool polite)\n{\n    uint8_t percentage = (polite ? polite_channel_util_percent : max_channel_util_percent);\n    if (channelUtilizationPercent() < percentage) {\n        return true;\n    } else {\n        LOG_WARN(\"Ch. util >%d%%. Skip send\", percentage);\n        return false;\n    }\n}\n\nbool AirTime::isTxAllowedAirUtil()\n{\n    if (!config.lora.override_duty_cycle && myRegion->dutyCycle < 100) {\n        if (utilizationTXPercent() < myRegion->dutyCycle * polite_duty_cycle_percent / 100) {\n            return true;\n        } else {\n            LOG_WARN(\"TX air util. >%f%%. Skip send\", myRegion->dutyCycle * polite_duty_cycle_percent / 100);\n            return false;\n        }\n    }\n    return true;\n}\n\n// Get the amount of minutes we have to be silent before we can send again\nuint8_t AirTime::getSilentMinutes(float txPercent, float dutyCycle)\n{\n    float newTxPercent = txPercent;\n    for (int8_t i = MINUTES_IN_HOUR - 1; i >= 0; --i) {\n        newTxPercent -= ((float)this->utilizationTX[i] / (MS_IN_MINUTE * MINUTES_IN_HOUR / 100));\n        if (newTxPercent < dutyCycle)\n            return MINUTES_IN_HOUR - 1 - i;\n    }\n\n    return MINUTES_IN_HOUR;\n}\n\nAirTime::AirTime() : concurrency::OSThread(\"AirTime\"), airtimes({}) {}\n\nint32_t AirTime::runOnce()\n{\n    secSinceBoot++;\n\n    uint8_t utilPeriod = this->getPeriodUtilMinute();\n    uint8_t utilPeriodTX = this->getPeriodUtilHour();\n\n    if (firstTime) {\n\n        // Init utilizationTX window to all 0\n        for (uint32_t i = 0; i < MINUTES_IN_HOUR; i++) {\n            this->utilizationTX[i] = 0;\n        }\n\n        // Init channelUtilization window to all 0\n        for (uint32_t i = 0; i < CHANNEL_UTILIZATION_PERIODS; i++) {\n            this->channelUtilization[i] = 0;\n        }\n\n        // Init airtime windows to all 0\n        for (int i = 0; i < PERIODS_TO_LOG; i++) {\n            this->airtimes.periodTX[i] = 0;\n            this->airtimes.periodRX[i] = 0;\n            this->airtimes.periodRX_ALL[i] = 0;\n\n            // air_period_tx[i] = 0;\n            // air_period_rx[i] = 0;\n        }\n\n        firstTime = false;\n        lastUtilPeriod = utilPeriod;\n    } else {\n        this->airtimeRotatePeriod();\n\n        // Reset the channelUtilization window when we roll over\n        if (lastUtilPeriod != utilPeriod) {\n            lastUtilPeriod = utilPeriod;\n\n            this->channelUtilization[utilPeriod] = 0;\n        }\n\n        if (lastUtilPeriodTX != utilPeriodTX) {\n            lastUtilPeriodTX = utilPeriodTX;\n\n            this->utilizationTX[utilPeriodTX] = 0;\n        }\n    }\n    return (1000 * 1);\n}\n"
  },
  {
    "path": "src/airtime.h",
    "content": "#pragma once\n\n#include \"MeshRadio.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <functional>\n\n/*\n  TX_LOG      - Time on air this device has transmitted\n\n  RX_LOG      - Time on air used by valid and routable mesh packets, does not include\n                TX air time\n\n  RX_ALL_LOG  - Time of all received lora packets. This includes packets that are not\n                for meshtastic devices. Does not include TX air time.\n\n  Example analytics:\n\n  TX_LOG + RX_LOG = Total air time for a particular meshtastic channel.\n\n  TX_LOG + RX_LOG = Total air time for a particular meshtastic channel, including\n                    other lora radios.\n\n  RX_ALL_LOG - RX_LOG = Other lora radios on our frequency channel.\n*/\n\n#define CHANNEL_UTILIZATION_PERIODS 6\n#define SECONDS_PER_PERIOD 3600\n#define PERIODS_TO_LOG 8\n#define MINUTES_IN_HOUR 60\n#define SECONDS_IN_MINUTE 60\n#define MS_IN_MINUTE (SECONDS_IN_MINUTE * 1000)\n#define MS_IN_HOUR (MINUTES_IN_HOUR * SECONDS_IN_MINUTE * 1000)\n\nenum reportTypes { TX_LOG, RX_LOG, RX_ALL_LOG };\n\nvoid logAirtime(reportTypes reportType, uint32_t airtime_ms);\n\nuint32_t *airtimeReport(reportTypes reportType);\n\nclass AirTime : private concurrency::OSThread\n{\n\n  public:\n    AirTime();\n\n    void logAirtime(reportTypes reportType, uint32_t airtime_ms);\n    float channelUtilizationPercent();\n    float utilizationTXPercent();\n\n    float UtilizationPercentTX();\n    uint32_t channelUtilization[CHANNEL_UTILIZATION_PERIODS] = {0};\n    uint32_t utilizationTX[MINUTES_IN_HOUR] = {0};\n\n    void airtimeRotatePeriod();\n    uint8_t getPeriodsToLog();\n    uint32_t getSecondsPerPeriod();\n    uint32_t getSecondsSinceBoot();\n    uint32_t *airtimeReport(reportTypes reportType);\n    uint8_t getSilentMinutes(float txPercent, float dutyCycle);\n    bool isTxAllowedChannelUtil(bool polite = false);\n    bool isTxAllowedAirUtil();\n\n  private:\n    bool firstTime = true;\n    uint8_t lastUtilPeriod = 0;\n    uint8_t lastUtilPeriodTX = 0;\n    uint32_t secSinceBoot = 0;\n    uint8_t max_channel_util_percent = 40;\n    uint8_t polite_channel_util_percent = 25;\n    uint8_t polite_duty_cycle_percent = 50; // half of Duty Cycle allowance is ok for metadata\n\n    struct airtimeStruct {\n        uint32_t periodTX[PERIODS_TO_LOG];     // AirTime transmitted\n        uint32_t periodRX[PERIODS_TO_LOG];     // AirTime received and repeated (Only valid mesh packets)\n        uint32_t periodRX_ALL[PERIODS_TO_LOG]; // AirTime received regardless of valid mesh packet. Could include noise.\n        uint8_t lastPeriodIndex;\n    } airtimes;\n\n    uint8_t getPeriodUtilMinute();\n    uint8_t getPeriodUtilHour();\n    uint8_t currentPeriodIndex();\n\n  protected:\n    virtual int32_t runOnce() override;\n};\n\nextern AirTime *airTime;\n"
  },
  {
    "path": "src/buzz/BuzzerFeedbackThread.cpp",
    "content": "#include \"BuzzerFeedbackThread.h\"\n#include \"NodeDB.h\"\n#include \"buzz.h\"\n#include \"configuration.h\"\n\nBuzzerFeedbackThread *buzzerFeedbackThread;\n\nBuzzerFeedbackThread::BuzzerFeedbackThread()\n{\n    if (inputBroker)\n        inputObserver.observe(inputBroker);\n}\n\nint BuzzerFeedbackThread::handleInputEvent(const InputEvent *event)\n{\n    // Only provide feedback if buzzer is enabled for notifications\n    if (config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_DISABLED ||\n        config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_NOTIFICATIONS_ONLY ||\n        config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY) {\n        return 0; // Let other handlers process the event\n    }\n\n    // Handle different input events with appropriate buzzer feedback\n    switch (event->inputEvent) {\n#ifdef INPUTDRIVER_ENCODER_TYPE\n    case INPUT_BROKER_SELECT:\n    case INPUT_BROKER_SELECT_LONG:\n        playClick();\n        break;\n#else\n    case INPUT_BROKER_USER_PRESS:\n    case INPUT_BROKER_ALT_PRESS:\n    case INPUT_BROKER_SELECT:\n    case INPUT_BROKER_SELECT_LONG:\n        playBeep();\n        break;\n#endif\n\n    case INPUT_BROKER_UP:\n    case INPUT_BROKER_UP_LONG:\n    case INPUT_BROKER_DOWN:\n    case INPUT_BROKER_DOWN_LONG:\n    case INPUT_BROKER_LEFT:\n    case INPUT_BROKER_RIGHT:\n        playChirp(); // Navigation feedback\n        break;\n\n    case INPUT_BROKER_CANCEL:\n    case INPUT_BROKER_BACK:\n        playBoop(); // Cancel/back feedback\n        break;\n\n    case INPUT_BROKER_SEND_PING:\n        playComboTune(); // Ping sent feedback\n        break;\n\n    default:\n        // For other events, check if it's a printable character\n        if (event->kbchar >= 32 && event->kbchar <= 126) {\n            // Typing feedback - very short boop\n            // Removing this for now, too chatty\n            // playChirp();\n        }\n        break;\n    }\n\n    return 0; // Allow other handlers to process the event\n}\n"
  },
  {
    "path": "src/buzz/BuzzerFeedbackThread.h",
    "content": "#pragma once\n\n#include \"Observer.h\"\n#include \"concurrency/OSThread.h\"\n#include \"input/InputBroker.h\"\n\nclass BuzzerFeedbackThread\n{\n    CallbackObserver<BuzzerFeedbackThread, const InputEvent *> inputObserver =\n        CallbackObserver<BuzzerFeedbackThread, const InputEvent *>(this, &BuzzerFeedbackThread::handleInputEvent);\n\n  public:\n    BuzzerFeedbackThread();\n    int handleInputEvent(const InputEvent *event);\n};\n\nextern BuzzerFeedbackThread *buzzerFeedbackThread;\n"
  },
  {
    "path": "src/buzz/buzz.cpp",
    "content": "#include \"buzz.h\"\n#include \"NodeDB.h\"\n#include \"configuration.h\"\n\n#if !defined(ARCH_ESP32) && !defined(ARCH_RP2040) && !defined(ARCH_PORTDUINO)\n#include \"Tone.h\"\n#endif\n\n#if !defined(ARCH_PORTDUINO)\nextern \"C\" void delay(uint32_t dwMs);\n#endif\n\nstruct ToneDuration {\n    int frequency_khz;\n    int duration_ms;\n};\n\n// Some common frequencies.\n#define NOTE_SILENT 1\n#define NOTE_C3 131\n#define NOTE_CS3 139\n#define NOTE_D3 147\n#define NOTE_DS3 156\n#define NOTE_E3 165\n#define NOTE_F3 175\n#define NOTE_FS3 185\n#define NOTE_G3 196\n#define NOTE_GS3 208\n#define NOTE_A3 220\n#define NOTE_AS3 233\n#define NOTE_B3 247\n#define NOTE_CS4 277\n#define NOTE_B4 494\n#define NOTE_F5 698\n#define NOTE_G6 1568\n#define NOTE_E7 2637\n\n#define NOTE_C4 262\n#define NOTE_E4 330\n#define NOTE_G4 392\n#define NOTE_A4 440\n#define NOTE_C5 523\n#define NOTE_E5 659\n#define NOTE_G5 784\n\nconst int DURATION_1_16 = 62;  // 1/16 note\nconst int DURATION_1_8 = 125;  // 1/8 note\nconst int DURATION_1_4 = 250;  // 1/4 note\nconst int DURATION_1_2 = 500;  // 1/2 note\nconst int DURATION_3_4 = 750;  // 3/4 note\nconst int DURATION_1_1 = 1000; // 1/1 note\n\nvoid playTones(const ToneDuration *tone_durations, int size)\n{\n    if (config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_DISABLED ||\n        config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_NOTIFICATIONS_ONLY) {\n        // Buzzer is disabled or not set to system tones\n        return;\n    }\n#ifdef PIN_BUZZER\n    if (!config.device.buzzer_gpio)\n        config.device.buzzer_gpio = PIN_BUZZER;\n#endif\n    if (config.device.buzzer_gpio) {\n        for (int i = 0; i < size; i++) {\n            const auto &tone_duration = tone_durations[i];\n            tone(config.device.buzzer_gpio, tone_duration.frequency_khz, tone_duration.duration_ms);\n            // to distinguish the notes, set a minimum time between them.\n            delay(1.3 * tone_duration.duration_ms);\n        }\n    }\n}\n\nvoid playBeep()\n{\n    ToneDuration melody[] = {{NOTE_B3, DURATION_1_16}};\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playLongBeep()\n{\n    ToneDuration melody[] = {{NOTE_B3, DURATION_1_1}};\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playGPSEnableBeep()\n{\n#if defined(R1_NEO) || defined(MUZI_BASE)\n    ToneDuration melody[] = {\n        {NOTE_F5, DURATION_1_2}, {NOTE_G6, DURATION_1_8}, {NOTE_E7, DURATION_1_4}, {NOTE_SILENT, DURATION_1_2}};\n#else\n    ToneDuration melody[] = {{NOTE_C3, DURATION_1_8}, {NOTE_FS3, DURATION_1_4}, {NOTE_CS4, DURATION_1_4}};\n#endif\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playGPSDisableBeep()\n{\n#if defined(R1_NEO) || defined(MUZI_BASE)\n    ToneDuration melody[] = {{NOTE_B4, DURATION_1_16}, {NOTE_B4, DURATION_1_16},   {NOTE_SILENT, DURATION_1_8},\n                             {NOTE_F3, DURATION_1_16}, {NOTE_F3, DURATION_1_16},   {NOTE_SILENT, DURATION_1_8},\n                             {NOTE_C3, DURATION_1_1},  {NOTE_SILENT, DURATION_1_1}};\n#else\n    ToneDuration melody[] = {{NOTE_CS4, DURATION_1_8}, {NOTE_FS3, DURATION_1_4}, {NOTE_C3, DURATION_1_4}};\n#endif\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playStartMelody()\n{\n    ToneDuration melody[] = {{NOTE_FS3, DURATION_1_8}, {NOTE_AS3, DURATION_1_8}, {NOTE_CS4, DURATION_1_4}};\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playShutdownMelody()\n{\n    ToneDuration melody[] = {{NOTE_CS4, DURATION_1_8}, {NOTE_AS3, DURATION_1_8}, {NOTE_FS3, DURATION_1_4}};\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playChirp()\n{\n    // A short, friendly \"chirp\" sound for key presses\n    ToneDuration melody[] = {{NOTE_AS3, 20}}; // Short AS3 note\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playClick()\n{\n    // A very short \"click\" sound with minimum delay; ideal for rotary encoder events\n    ToneDuration melody[] = {{NOTE_AS3, 1}}; // Very Short AS3\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playBoop()\n{\n    // A short, friendly \"boop\" sound for button presses\n    ToneDuration melody[] = {{NOTE_A3, 50}}; // Very short A3 note\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid playLongPressLeadUp()\n{\n    // An ascending lead-up sequence for long press - builds anticipation\n    ToneDuration melody[] = {\n        {NOTE_C3, 100}, // Start low\n        {NOTE_E3, 100}, // Step up\n        {NOTE_G3, 100}, // Keep climbing\n        {NOTE_B3, 150}  // Peak with longer note for emphasis\n    };\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\n// Static state for progressive lead-up notes\nstatic int leadUpNoteIndex = 0;\nstatic const ToneDuration leadUpNotes[] = {\n    {NOTE_C3, 100}, // Start low\n    {NOTE_E3, 100}, // Step up\n    {NOTE_G3, 100}, // Keep climbing\n    {NOTE_B3, 150}  // Peak with longer note for emphasis\n};\nstatic const int leadUpNotesCount = sizeof(leadUpNotes) / sizeof(ToneDuration);\n\nbool playNextLeadUpNote()\n{\n    if (leadUpNoteIndex >= leadUpNotesCount) {\n        return false; // All notes have been played\n    }\n\n    // Use playTones to handle buzzer logic consistently\n    const auto &note = leadUpNotes[leadUpNoteIndex];\n    playTones(&note, 1); // Play single note using existing playTones function\n\n    leadUpNoteIndex++;\n\n    if (leadUpNoteIndex >= leadUpNotesCount) {\n        return false; // this was the final note\n    }\n    return true; // Note was played (playTones handles buzzer availability internally)\n}\n\nvoid resetLeadUpSequence()\n{\n    leadUpNoteIndex = 0;\n}\n\nvoid playComboTune()\n{\n    // Quick high-pitched notes with trills\n    ToneDuration melody[] = {\n        {NOTE_G3, 80},  // Quick chirp\n        {NOTE_B3, 60},  // Higher chirp\n        {NOTE_CS4, 80}, // Even higher\n        {NOTE_G3, 60},  // Quick trill down\n        {NOTE_CS4, 60}, // Quick trill up\n        {NOTE_B3, 120}  // Ending chirp\n    };\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid play4ClickDown()\n{\n    ToneDuration melody[] = {{NOTE_G5, 55}, {NOTE_E5, 55}, {NOTE_C5, 60},  {NOTE_A4, 55},  {NOTE_G4, 55},\n                             {NOTE_E4, 65}, {NOTE_C4, 80}, {NOTE_G3, 120}, {NOTE_E3, 160}, {NOTE_SILENT, 120}};\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}\n\nvoid play4ClickUp()\n{\n    // Quick high-pitched notes with trills\n    ToneDuration melody[] = {{NOTE_F5, 50}, {NOTE_G6, 45}, {NOTE_E7, 60}};\n    playTones(melody, sizeof(melody) / sizeof(ToneDuration));\n}"
  },
  {
    "path": "src/buzz/buzz.h",
    "content": "#pragma once\n\nvoid playBeep();\nvoid playLongBeep();\nvoid playStartMelody();\nvoid playShutdownMelody();\nvoid playGPSEnableBeep();\nvoid playGPSDisableBeep();\nvoid playComboTune();\nvoid play4ClickDown();\nvoid play4ClickUp();\nvoid playBoop();\nvoid playChirp();\nvoid playClick();\nvoid playLongPressLeadUp();\nbool playNextLeadUpNote();  // Play the next note in the lead-up sequence\nvoid resetLeadUpSequence(); // Reset the lead-up sequence to start from beginning"
  },
  {
    "path": "src/commands.h",
    "content": "/**\n * @brief This class enables on the fly software and hardware setup.\n *        It will contain all command messages to change internal settings.\n */\n\nenum class Cmd {\n    INVALID,\n    SET_ON,\n    SET_OFF,\n    ON_PRESS,\n    START_ALERT_FRAME,\n    STOP_ALERT_FRAME,\n    START_FIRMWARE_UPDATE_SCREEN,\n    STOP_BOOT_SCREEN,\n    SHOW_PREV_FRAME,\n    SHOW_NEXT_FRAME,\n    NOOP\n};"
  },
  {
    "path": "src/concurrency/BinarySemaphoreFreeRTOS.cpp",
    "content": "#include \"concurrency/BinarySemaphoreFreeRTOS.h\"\n#include \"configuration.h\"\n#include <assert.h>\n\n#ifdef HAS_FREE_RTOS\n\nnamespace concurrency\n{\n\nBinarySemaphoreFreeRTOS::BinarySemaphoreFreeRTOS() : semaphore(xSemaphoreCreateBinary())\n{\n    assert(semaphore);\n}\n\nBinarySemaphoreFreeRTOS::~BinarySemaphoreFreeRTOS()\n{\n    vSemaphoreDelete(semaphore);\n}\n\n/**\n * Returns false if we were interrupted\n */\nbool BinarySemaphoreFreeRTOS::take(uint32_t msec)\n{\n    return xSemaphoreTake(semaphore, pdMS_TO_TICKS(msec));\n}\n\nvoid BinarySemaphoreFreeRTOS::give()\n{\n    xSemaphoreGive(semaphore);\n}\n\nIRAM_ATTR void BinarySemaphoreFreeRTOS::giveFromISR(BaseType_t *pxHigherPriorityTaskWoken)\n{\n    xSemaphoreGiveFromISR(semaphore, pxHigherPriorityTaskWoken);\n}\n\n} // namespace concurrency\n\n#endif\n"
  },
  {
    "path": "src/concurrency/BinarySemaphoreFreeRTOS.h",
    "content": "#pragma once\n\n#include \"../freertosinc.h\"\n\nnamespace concurrency\n{\n\n#ifdef HAS_FREE_RTOS\n\nclass BinarySemaphoreFreeRTOS\n{\n    SemaphoreHandle_t semaphore;\n\n  public:\n    BinarySemaphoreFreeRTOS();\n    ~BinarySemaphoreFreeRTOS();\n\n    /**\n     * Returns false if we timed out\n     */\n    bool take(uint32_t msec);\n\n    void give();\n\n    void giveFromISR(BaseType_t *pxHigherPriorityTaskWoken);\n};\n\n#endif\n\n} // namespace concurrency"
  },
  {
    "path": "src/concurrency/BinarySemaphorePosix.cpp",
    "content": "#include \"concurrency/BinarySemaphorePosix.h\"\n#include \"configuration.h\"\n\n#ifndef HAS_FREE_RTOS\n\nnamespace concurrency\n{\n\nBinarySemaphorePosix::BinarySemaphorePosix() {}\n\nBinarySemaphorePosix::~BinarySemaphorePosix() {}\n\n/**\n * Returns false if we timed out\n */\nbool BinarySemaphorePosix::take(uint32_t msec)\n{\n    delay(msec); // FIXME\n    return false;\n}\n\nvoid BinarySemaphorePosix::give() {}\n\nIRAM_ATTR void BinarySemaphorePosix::giveFromISR(BaseType_t *pxHigherPriorityTaskWoken) {}\n\n} // namespace concurrency\n\n#endif"
  },
  {
    "path": "src/concurrency/BinarySemaphorePosix.h",
    "content": "#pragma once\n\n#include \"../freertosinc.h\"\n\nnamespace concurrency\n{\n\n#ifndef HAS_FREE_RTOS\n\nclass BinarySemaphorePosix\n{\n    // SemaphoreHandle_t semaphore;\n\n  public:\n    BinarySemaphorePosix();\n    ~BinarySemaphorePosix();\n\n    /**\n     * Returns false if we timed out\n     */\n    bool take(uint32_t msec);\n\n    void give();\n\n    void giveFromISR(BaseType_t *pxHigherPriorityTaskWoken);\n};\n\n#endif\n\n} // namespace concurrency"
  },
  {
    "path": "src/concurrency/InterruptableDelay.cpp",
    "content": "#include \"concurrency/InterruptableDelay.h\"\n#include \"configuration.h\"\n\nnamespace concurrency\n{\n\nInterruptableDelay::InterruptableDelay() {}\n\nInterruptableDelay::~InterruptableDelay() {}\n\n/**\n * Returns false if we were interrupted\n */\nbool InterruptableDelay::delay(uint32_t msec)\n{\n    // LOG_DEBUG(\"delay %u \", msec);\n\n    // sem take will return false if we timed out (i.e. were not interrupted)\n    bool r = semaphore.take(msec);\n\n    // LOG_DEBUG(\"interrupt=%d\", r);\n    return !r;\n}\n\nvoid InterruptableDelay::interrupt()\n{\n    semaphore.give();\n}\n\nIRAM_ATTR void InterruptableDelay::interruptFromISR(BaseType_t *pxHigherPriorityTaskWoken)\n{\n    semaphore.giveFromISR(pxHigherPriorityTaskWoken);\n}\n\n} // namespace concurrency"
  },
  {
    "path": "src/concurrency/InterruptableDelay.h",
    "content": "#pragma once\n\n#include \"../freertosinc.h\"\n\n#ifdef HAS_FREE_RTOS\n#include \"concurrency/BinarySemaphoreFreeRTOS.h\"\n#define BinarySemaphore BinarySemaphoreFreeRTOS\n#else\n#include \"concurrency/BinarySemaphorePosix.h\"\n#define BinarySemaphore BinarySemaphorePosix\n#endif\n\nnamespace concurrency\n{\n\n/**\n * An object that provides delay(msec) like functionality, but can be interrupted by calling interrupt().\n *\n * Useful for they top level loop() delay call to keep the CPU powered down until our next scheduled event or some external event.\n *\n * This is implemented for FreeRTOS but should be easy to port to other operating systems.\n */\nclass InterruptableDelay\n{\n    BinarySemaphore semaphore;\n\n  public:\n    InterruptableDelay();\n    ~InterruptableDelay();\n\n    /**\n     * Returns false if we were interrupted\n     */\n    bool delay(uint32_t msec);\n\n    void interrupt();\n\n    void interruptFromISR(BaseType_t *pxHigherPriorityTaskWoken);\n};\n\n} // namespace concurrency"
  },
  {
    "path": "src/concurrency/Lock.cpp",
    "content": "#include \"Lock.h\"\n#include \"configuration.h\"\n#include <cassert>\n\nnamespace concurrency\n{\n\n#ifdef HAS_FREE_RTOS\nLock::Lock() : handle(xSemaphoreCreateBinary())\n{\n    assert(handle);\n    if (xSemaphoreGive(handle) == false) {\n        abort();\n    }\n}\n\nvoid Lock::lock()\n{\n    if (xSemaphoreTake(handle, portMAX_DELAY) == false) {\n        abort();\n    }\n}\n\nvoid Lock::unlock()\n{\n    if (xSemaphoreGive(handle) == false) {\n        abort();\n    }\n}\n#else\nLock::Lock() {}\n\nvoid Lock::lock() {}\n\nvoid Lock::unlock() {}\n#endif\n\n} // namespace concurrency\n"
  },
  {
    "path": "src/concurrency/Lock.h",
    "content": "#pragma once\n\n#include \"../freertosinc.h\"\n\nnamespace concurrency\n{\n\n/**\n * @brief Simple wrapper around FreeRTOS API for implementing a mutex lock\n */\nclass Lock\n{\n  public:\n    Lock();\n\n    Lock(const Lock &) = delete;\n    Lock &operator=(const Lock &) = delete;\n\n    /// Locks the lock.\n    //\n    // Must not be called from an ISR.\n    void lock();\n\n    // Unlocks the lock.\n    //\n    // Must not be called from an ISR.\n    void unlock();\n\n  private:\n#ifdef HAS_FREE_RTOS\n    SemaphoreHandle_t handle;\n#endif\n};\n\n} // namespace concurrency\n"
  },
  {
    "path": "src/concurrency/LockGuard.cpp",
    "content": "#include \"LockGuard.h\"\n#include \"configuration.h\"\n\nnamespace concurrency\n{\n\nLockGuard::LockGuard(Lock *lock) : lock(lock)\n{\n    lock->lock();\n}\n\nLockGuard::~LockGuard()\n{\n    lock->unlock();\n}\n\n} // namespace concurrency\n"
  },
  {
    "path": "src/concurrency/LockGuard.h",
    "content": "#pragma once\n\n#include \"Lock.h\"\n\nnamespace concurrency\n{\n\n/**\n * @brief RAII lock guard\n */\nclass LockGuard\n{\n  public:\n    explicit LockGuard(Lock *lock);\n    ~LockGuard();\n\n    LockGuard(const LockGuard &) = delete;\n    LockGuard &operator=(const LockGuard &) = delete;\n\n  private:\n    Lock *lock;\n};\n\n} // namespace concurrency\n"
  },
  {
    "path": "src/concurrency/NotifiedWorkerThread.cpp",
    "content": "#include \"NotifiedWorkerThread.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n\nnamespace concurrency\n{\n\nstatic bool debugNotification;\n\n/**\n * Notify this thread so it can run\n */\nbool NotifiedWorkerThread::notify(uint32_t v, bool overwrite)\n{\n    bool r = notifyCommon(v, overwrite);\n\n    if (r)\n        mainDelay.interrupt();\n\n    return r;\n}\n\n/**\n * Notify this thread so it can run\n */\nIRAM_ATTR bool NotifiedWorkerThread::notifyCommon(uint32_t v, bool overwrite)\n{\n    if (overwrite || notification == 0) {\n        enabled = true;\n        setInterval(0); // Run ASAP\n        runASAP = true;\n\n        notification = v;\n        if (debugNotification) {\n            LOG_DEBUG(\"Set notification %d\", v);\n        }\n        return true;\n    } else {\n        if (debugNotification) {\n            LOG_DEBUG(\"Drop notification %d\", v);\n        }\n        return false;\n    }\n}\n\n/**\n * Notify from an ISR\n *\n * This must be inline or IRAM_ATTR on ESP32\n */\nIRAM_ATTR bool NotifiedWorkerThread::notifyFromISR(BaseType_t *highPriWoken, uint32_t v, bool overwrite)\n{\n    bool r = notifyCommon(v, overwrite);\n    if (r)\n        mainDelay.interruptFromISR(highPriWoken);\n\n    return r;\n}\n\n/**\n * Schedule a notification to fire in delay msecs\n */\nbool NotifiedWorkerThread::notifyLater(uint32_t delay, uint32_t v, bool overwrite)\n{\n    bool didIt = notify(v, overwrite);\n\n    if (didIt) {                   // If we didn't already have something queued, override the delay to be larger\n        setIntervalFromNow(delay); // a new version of setInterval relative to the current time\n        if (debugNotification) {\n            LOG_DEBUG(\"Delay notification %u\", delay);\n        }\n    }\n\n    return didIt;\n}\n\nvoid NotifiedWorkerThread::checkNotification()\n{\n    // Atomically read and clear. (This avoids a potential race condition where an interrupt handler could set a new notification\n    // after checkNotification reads but before it clears, which would cause us to miss that notification until the next one comes\n    // in.)\n    auto n = notification.exchange(0); // read+clear atomically: like `n = notification; notification = 0;` but interrupt-safe\n    if (n) {\n        onNotify(n);\n    }\n}\n\nint32_t NotifiedWorkerThread::runOnce()\n{\n    enabled = false; // Only run once per notification\n    checkNotification();\n\n    return RUN_SAME;\n}\n\n} // namespace concurrency"
  },
  {
    "path": "src/concurrency/NotifiedWorkerThread.h",
    "content": "#pragma once\n\n#include \"OSThread.h\"\n#include <atomic>\n\nnamespace concurrency\n{\n\n/**\n * @brief A worker thread that waits on a freertos notification\n */\nclass NotifiedWorkerThread : public OSThread\n{\n    /**\n     * The notification that was most recently used to wake the thread.  Read from runOnce()\n     */\n    std::atomic<uint32_t> notification{0};\n\n  public:\n    NotifiedWorkerThread(const char *name) : OSThread(name) {}\n\n    /**\n     * Notify this thread so it can run\n     */\n    bool notify(uint32_t v, bool overwrite);\n\n    /**\n     * Notify from an ISR\n     *\n     * This must be inline or IRAM_ATTR on ESP32\n     */\n    bool notifyFromISR(BaseType_t *highPriWoken, uint32_t v, bool overwrite);\n\n    /**\n     * Schedule a notification to fire in delay msecs\n     */\n    bool notifyLater(uint32_t delay, uint32_t v, bool overwrite);\n\n  protected:\n    virtual void onNotify(uint32_t notification) = 0;\n\n    /// just calls checkNotification()\n    virtual int32_t runOnce() override;\n\n    /// Sometimes we might want to check notifications independently of when our thread was getting woken up (i.e. if we are about\n    /// to change radio transmit/receive modes we want to handle any pending interrupts first).  You can call this method and if\n    /// any notifications are currently pending they will be handled immediately.\n    void checkNotification();\n\n  private:\n    /**\n     * Notify this thread so it can run\n     */\n    bool notifyCommon(uint32_t v, bool overwrite);\n};\n\n} // namespace concurrency\n"
  },
  {
    "path": "src/concurrency/OSThread.cpp",
    "content": "#include \"OSThread.h\"\n#include \"configuration.h\"\n#include \"memGet.h\"\n#include <assert.h>\n\nnamespace concurrency\n{\n\n/// Show debugging info for disabled threads\nbool OSThread::showDisabled;\n\n/// Show debugging info for threads when we run them\nbool OSThread::showRun = false;\n\n/// Show debugging info for threads we decide not to run;\nbool OSThread::showWaiting = false;\n\nconst OSThread *OSThread::currentThread;\n\nThreadController mainController, timerController;\nInterruptableDelay mainDelay;\n\nvoid OSThread::setup()\n{\n    mainController.ThreadName = \"mainController\";\n    timerController.ThreadName = \"timerController\";\n}\n\nOSThread::OSThread(const char *_name, uint32_t period, ThreadController *_controller)\n    : Thread(NULL, period), controller(_controller)\n{\n    assertIsSetup();\n\n    ThreadName = _name;\n\n    if (controller) {\n        bool added = controller->add(this);\n        assert(added);\n    }\n}\n\nOSThread::~OSThread()\n{\n    if (controller)\n        controller->remove(this);\n}\n\n/**\n * Wait a specified number msecs starting from the current time (rather than the last time we were run)\n */\nvoid OSThread::setIntervalFromNow(unsigned long _interval)\n{\n    // Save interval\n    interval = _interval;\n\n    // Cache the next run based on the last_run\n    _cached_next_run = millis() + interval;\n}\n\nbool OSThread::shouldRun(unsigned long time)\n{\n    bool r = Thread::shouldRun(time);\n\n    if (showRun && r) {\n        LOG_DEBUG(\"Thread %s: run\", ThreadName.c_str());\n    }\n\n    if (showWaiting && enabled && !r) {\n        LOG_DEBUG(\"Thread %s: wait %lu\", ThreadName.c_str(), interval);\n    }\n\n    if (showDisabled && !enabled) {\n        LOG_DEBUG(\"Thread %s: disabled\", ThreadName.c_str());\n    }\n\n    return r;\n}\n\nvoid OSThread::run()\n{\n#ifdef DEBUG_HEAP\n    auto heap = memGet.getFreeHeap();\n#endif\n    currentThread = this;\n    auto newDelay = runOnce();\n#ifdef DEBUG_HEAP\n    auto newHeap = memGet.getFreeHeap();\n    if (newHeap < heap)\n        LOG_HEAP(\"------ Thread %s leaked heap %d -> %d (%d) ------\", ThreadName.c_str(), heap, newHeap, newHeap - heap);\n    if (heap < newHeap)\n        LOG_HEAP(\"++++++ Thread %s freed heap %d -> %d (%d) ++++++\", ThreadName.c_str(), heap, newHeap, newHeap - heap);\n#endif\n#ifdef DEBUG_LOOP_TIMING\n    LOG_DEBUG(\"====== Thread next run in: %d\", newDelay);\n#endif\n    runned();\n\n    if (newDelay >= 0)\n        setInterval(newDelay);\n\n    currentThread = NULL;\n}\n\nint32_t OSThread::disable()\n{\n    enabled = false;\n    setInterval(INT32_MAX);\n\n    return INT32_MAX;\n}\n\n/**\n * This flag is set **only** when setup() starts, to provide a way for us to check for sloppy static constructor calls.\n * Call assertIsSetup() to force a crash if someone tries to create an instance too early.\n *\n * it is super important to never allocate those object statically.  instead, you should explicitly\n *  new them at a point where you are guaranteed that other objects that this instance\n * depends on have already been created.\n *\n * in particular, for OSThread that means \"all instances must be declared via new() in setup() or later\" -\n * this makes it guaranteed that the global mainController is fully constructed first.\n */\nbool hasBeenSetup;\n\nvoid assertIsSetup()\n{\n\n    /**\n     * Dear developer comrade - If this assert fails() that means you need to fix the following:\n     *\n     * This flag is set **only** when setup() starts, to provide a way for us to check for sloppy static constructor calls.\n     * Call assertIsSetup() to force a crash if someone tries to create an instance too early.\n     *\n     * it is super important to never allocate those object statically.  instead, you should explicitly\n     *  new them at a point where you are guaranteed that other objects that this instance\n     * depends on have already been created.\n     *\n     * in particular, for OSThread that means \"all instances must be declared via new() in setup() or later\" -\n     * this makes it guaranteed that the global mainController is fully constructed first.\n     */\n    assert(hasBeenSetup);\n}\n\n} // namespace concurrency\n"
  },
  {
    "path": "src/concurrency/OSThread.h",
    "content": "#pragma once\n\n#include <cstdlib>\n#include <stdint.h>\n\n#include \"Thread.h\"\n#include \"ThreadController.h\"\n#include \"concurrency/InterruptableDelay.h\"\n\nnamespace concurrency\n{\n\nextern ThreadController mainController, timerController;\nextern InterruptableDelay mainDelay;\n\n#define RUN_SAME -1\n\n/**\n * @brief Base threading\n *\n * This is a pseudo threading layer that is super easy to port, well suited to our slow network and very ram & power efficient.\n *\n * TODO FIXME @geeksville\n *\n * move more things into OSThreads\n * remove lock/lockguard\n *\n * move typedQueue into concurrency\n * remove freertos from typedqueue\n */\nclass OSThread : public Thread\n{\n    ThreadController *controller;\n\n    /// Show debugging info for disabled threads\n    static bool showDisabled;\n\n    /// Show debugging info for threads when we run them\n    static bool showRun;\n\n    /// Show debugging info for threads we decide not to run;\n    static bool showWaiting;\n\n  public:\n    /// For debug printing only (might be null)\n    static const OSThread *currentThread;\n\n    OSThread(const char *name, uint32_t period = 0, ThreadController *controller = &mainController);\n\n    virtual ~OSThread();\n\n    virtual bool shouldRun(unsigned long time);\n\n    static void setup();\n\n    virtual int32_t disable();\n\n    /**\n     * Wait a specified number msecs starting from the current time (rather than the last time we were run)\n     */\n    void setIntervalFromNow(unsigned long _interval);\n\n  protected:\n    /**\n     * The method that will be called each time our thread gets a chance to run\n     *\n     * Returns desired period for next invocation (or RUN_SAME for no change)\n     */\n    virtual int32_t runOnce() = 0;\n    bool sleepOnNextExecution = false;\n\n    // Do not override this\n    virtual void run();\n};\n\n/**\n * This flag is set **only** when setup() starts, to provide a way for us to check for sloppy static constructor calls.\n * Call assertIsSetup() to force a crash if someone tries to create an instance too early.\n *\n * it is super important to never allocate those object statically.  instead, you should explicitly\n *  new them at a point where you are guaranteed that other objects that this instance\n * depends on have already been created.\n *\n * in particular, for OSThread that means \"all instances must be declared via new() in setup() or later\" -\n * this makes it guaranteed that the global mainController is fully constructed first.\n */\nextern bool hasBeenSetup;\n\nvoid assertIsSetup();\n\n} // namespace concurrency"
  },
  {
    "path": "src/concurrency/Periodic.h",
    "content": "#pragma once\n\n#include <functional>\n#include <utility>\n\n#include \"concurrency/OSThread.h\"\n\nnamespace concurrency\n{\n\n/**\n * @brief Periodically invoke a callback.\n *        Supports both legacy function pointers and modern callables.\n */\nclass Periodic : public OSThread\n{\n  public:\n    // callback returns the period for the next callback invocation (or 0 if we should no longer be called)\n    Periodic(const char *name, int32_t (*cb)()) : OSThread(name), callback(cb) {}\n    Periodic(const char *name, std::function<int32_t()> cb) : OSThread(name), callback(std::move(cb)) {}\n\n  protected:\n    int32_t runOnce() override { return callback ? callback() : 0; }\n\n  private:\n    std::function<int32_t()> callback;\n};\n\n} // namespace concurrency\n"
  },
  {
    "path": "src/configuration.h",
    "content": "/*\n\nTTGO T-BEAM Tracker for The Things Network\n\nCopyright (C) 2018 by Xose Pérez <xose dot perez at gmail dot com>\n\nThis code requires LMIC library by Matthijs Kooijman\nhttps://github.com/matthijskooijman/arduino-lmic\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n*/\n\n#pragma once\n\n#include <Arduino.h>\n\n#if __has_include(\"Melopero_RV3028.h\")\n#include \"Melopero_RV3028.h\"\n#endif\n#if __has_include(\"SensorRtcHelper.hpp\")\n#include \"SensorRtcHelper.hpp\"\n#endif\n\n/* Offer chance for variant-specific defines */\n#include \"variant.h\"\n\n// -----------------------------------------------------------------------------\n// Display feature overrides\n// -----------------------------------------------------------------------------\n\n// Allow build environments to opt-in explicitly to the E-Ink UI stack while\n// keeping headless targets slim by default. Existing variants that already\n// define USE_EINK continue to work without additional flags.\n#ifndef MESHTASTIC_USE_EINK_UI\n#ifdef USE_EINK\n#define MESHTASTIC_USE_EINK_UI 1\n#else\n#define MESHTASTIC_USE_EINK_UI 0\n#endif\n#endif\n\n#if MESHTASTIC_USE_EINK_UI\n#ifndef USE_EINK\n#define USE_EINK\n#endif\n#else\n#undef USE_EINK\n#endif\n\n// -----------------------------------------------------------------------------\n// Version\n// -----------------------------------------------------------------------------\n\n// If app version is not specified we assume we are not being invoked by the build script\n#ifndef APP_VERSION\n#error APP_VERSION must be set by the build environment\n#endif\n\n// FIXME: This is still needed by the Bluetooth Stack and needs to be replaced by something better. Remnant of the old versioning\n// system.\n#ifndef HW_VERSION\n#define HW_VERSION \"1.0\"\n#endif\n\n// -----------------------------------------------------------------------------\n// Configuration\n// -----------------------------------------------------------------------------\n\n// Pre-hop drop handling (compile-time flag).\n#ifndef MESHTASTIC_PREHOP_DROP\n#define MESHTASTIC_PREHOP_DROP 0\n#endif\n\n/// Convert a preprocessor name into a quoted string\n#define xstr(s) ystr(s)\n#define ystr(s) #s\n\n/// Convert a preprocessor name into a quoted string and if that string is empty use \"unset\"\n#define optstr(s) (xstr(s)[0] ? xstr(s) : \"unset\")\n\n// Nop definition for these attributes that are specific to ESP32\n#ifndef EXT_RAM_ATTR\n#define EXT_RAM_ATTR\n#endif\n#ifndef IRAM_ATTR\n#define IRAM_ATTR\n#endif\n#ifndef RTC_DATA_ATTR\n#define RTC_DATA_ATTR\n#endif\n#ifndef EXT_RAM_BSS_ATTR\n#define EXT_RAM_BSS_ATTR EXT_RAM_ATTR\n#endif\n\n// -----------------------------------------------------------------------------\n// Regulatory overrides\n// -----------------------------------------------------------------------------\n\n// Override user saved region, for producing region-locked builds\n// #define REGULATORY_LORA_REGIONCODE meshtastic_Config_LoRaConfig_RegionCode_SG_923\n\n// Total system gain in dBm to subtract from Tx power to remain within regulatory and Tx PA limits\n// The value consists of PA gain + antenna gain (if variant has a non-removable antenna)\n// TX_GAIN_LORA should be set with definitions below for common modules, or in variant.h.\n\n// Gain for common modules with transmit PAs\n#ifdef EBYTE_E22_900M30S\n// 10dB PA gain and 30dB rated output; based on measurements from\n// https://github.com/S5NC/EBYTE_ESP32-S3/blob/main/E22-900M30S%20power%20output%20testing.txt\n#define TX_GAIN_LORA 7\n#define SX126X_MAX_POWER 22\n#endif\n\n#ifdef EBYTE_E22_900M33S\n// 25dB PA gain and 33dB rated output; based on TX Power Curve from E22-900M33S_UserManual_EN_v1.0.pdf\n#define TX_GAIN_LORA 25\n#define SX126X_MAX_POWER 8\n#endif\n\n#ifdef NICERF_MINIF27\n// Note that datasheet power level of 9 corresponds with SX1262 at 22dBm\n// Maximum output power of 29dBm with VCC_PA = 5V\n#define TX_GAIN_LORA 7\n#define SX126X_MAX_POWER 22\n#endif\n\n#ifdef NICERF_F30_HF\n// Maximum output power of 29.6dBm with VCC = 5V and SX1262 at 22dBm\n#define TX_GAIN_LORA 8\n#define SX126X_MAX_POWER 22\n#endif\n\n#ifdef NICERF_F30_LF\n// Maximum output power of 32.0dBm with VCC = 5V and SX1262 at 22dBm\n#define TX_GAIN_LORA 10\n#define SX126X_MAX_POWER 22\n#endif\n\n#ifdef USE_GC1109_PA\n// Power Amps are often non-linear, so we can use an array of values for the power curve\n#define NUM_PA_POINTS 22\n#define TX_GAIN_LORA 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 9, 9, 8, 7\n#endif\n\n#ifdef USE_KCT8103L_PA\n// Power Amps are often non-linear, so we can use an array of values for the power curve\n#define NUM_PA_POINTS 22\n#define TX_GAIN_LORA 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 12, 12, 11, 10, 9, 8, 7\n#endif\n\n#ifdef RAK13302\n#define NUM_PA_POINTS 22\n#define TX_GAIN_LORA 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8\n#endif\n\n// Default system gain to 0 if not defined\n#ifndef NUM_PA_POINTS\n#define NUM_PA_POINTS 1\n#endif\n\n#ifndef TX_GAIN_LORA\n#define TX_GAIN_LORA 0\n#endif\n\n#ifndef HAS_LORA_FEM\n#define HAS_LORA_FEM 0\n#endif\n\n// -----------------------------------------------------------------------------\n// Feature toggles\n// -----------------------------------------------------------------------------\n\n// Disable use of the NTP library and related features\n// #define DISABLE_NTP\n\n// Disable the welcome screen and allow\n// #define DISABLE_WELCOME_UNSET\n\n// -----------------------------------------------------------------------------\n// OLED & Input\n// -----------------------------------------------------------------------------\n#define SSD1306_ADDRESS_L 0x3C // Addr = 0\n#define SSD1306_ADDRESS_H 0x3D // Addr = 1\n\n#if defined(SEEED_WIO_TRACKER_L1) && !defined(SEEED_WIO_TRACKER_L1_EINK)\n#define SSD1306_ADDRESS SSD1306_ADDRESS_H\n#define USE_SH1106\n#endif\n#define ST7567_ADDRESS 0x3F\n\n// The SH1106 controller is almost, but not quite, the same as SSD1306\n// Define this if you know you have that controller or your \"SSD1306\" misbehaves.\n// #define USE_SH1106\n\n// Define if screen should be mirrored left to right\n// #define SCREEN_MIRROR\n\n// I2C Keyboards (M5Stack, RAK14004, T-Deck, T-Deck Pro, T-Lora Pager, CardKB, BBQ10, MPR121, TCA8418)\n#define CARDKB_ADDR 0x5F\n#define TDECK_KB_ADDR 0x55\n#define BBQ10_KB_ADDR 0x1F\n#define MPR121_KB_ADDR 0x5A\n#define TCA8418_KB_ADDR 0x34\n\n// -----------------------------------------------------------------------------\n// SENSOR\n// -----------------------------------------------------------------------------\n#define BME_ADDR 0x76\n#define BME_ADDR_ALTERNATE 0x77\n#define MCP9808_ADDR 0x18\n#define INA_ADDR 0x40\n#define INA_ADDR_ALTERNATE 0x41\n#define INA_ADDR_WAVESHARE_UPS 0x43\n#define INA3221_ADDR 0x42\n#define MAX1704X_ADDR 0x36\n#define QMC6310U_ADDR 0x1C\n#define QMI8658_ADDR 0x6B\n#define QMC5883L_ADDR 0x0D\n#define HMC5883L_ADDR 0x1E\n#define SHTC3_ADDR 0x70\n#define LPS22HB_ADDR 0x5C\n#define LPS22HB_ADDR_ALT 0x5D\n#define SFA30_ADDR 0x5D\n#define SHT31_4x_ADDR 0x44\n#define SHT31_4x_ADDR_ALT 0x45\n#define PMSA003I_ADDR 0x12\n#define QMA6100P_ADDR 0x12\n#define AHT10_ADDR 0x38\n#define RCWL9620_ADDR 0x57\n#define VEML7700_ADDR 0x10\n#define TSL25911_ADDR 0x29\n#define OPT3001_ADDR 0x45\n#define OPT3001_ADDR_ALT 0x44\n#define MLX90632_ADDR 0x3A\n#define DFROBOT_LARK_ADDR 0x42\n#define DFROBOT_RAIN_ADDR 0x1d\n#define NAU7802_ADDR 0x2A\n#define MAX30102_ADDR 0x57\n#define SCD4X_ADDR 0x62\n#define CW2015_ADDR 0x62\n#define MLX90614_ADDR_DEF 0x5A\n#define CGRADSENS_ADDR 0x66\n#define LTR390UV_ADDR 0x53\n#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 // same adress as TCA8418_KB\n#define PCT2075_ADDR 0x37\n#define BQ27220_ADDR 0x55 // same address as TDECK_KB\n#define BQ25896_ADDR 0x6B\n#define LTR553ALS_ADDR 0x23\n#define SEN5X_ADDR 0x69\n#define SCD30_ADDR 0x61\n\n// -----------------------------------------------------------------------------\n// ACCELEROMETER\n// -----------------------------------------------------------------------------\n#define MPU6050_ADDR 0x68\n#define STK8BXX_ADDR 0x18\n#define LIS3DH_ADDR 0x18\n#define LIS3DH_ADDR_ALT 0x19\n#define BMA423_ADDR 0x19\n#define LSM6DS3_ADDR 0x6A\n#define BMX160_ADDR 0x69\n#define ICM20948_ADDR 0x69\n#define ICM20948_ADDR_ALT 0x68\n#define BHI260AP_ADDR 0x28\n#define BMM150_ADDR 0x13\n#define DA217_ADDR 0x26\n#define BMI270_ADDR 0x68\n#define BMI270_ADDR_ALT 0x69\n\n// -----------------------------------------------------------------------------\n// LED\n// -----------------------------------------------------------------------------\n#define NCP5623_ADDR 0x38\n#define LP5562_ADDR 0x30\n\n// -----------------------------------------------------------------------------\n// Security\n// -----------------------------------------------------------------------------\n\n// -----------------------------------------------------------------------------\n// IO Expander\n// -----------------------------------------------------------------------------\n#define TCA9535_ADDR 0x20\n#define TCA9555_ADDR 0x26\n\n// -----------------------------------------------------------------------------\n// Touchscreen\n// -----------------------------------------------------------------------------\n#define FT6336U_ADDR 0x48\n#define CST328_ADDR 0x1A // same address as CST226SE\n#define CHSC6X_ADDR 0x2E\n#define CST226SE_ADDR_ALT 0x5A\n\n// -----------------------------------------------------------------------------\n// RAK12035VB Soil Monitor (using RAK12023 up to 3 RAK12035 monitors can be connected)\n// - the default i2c address for this sensor is 0x20, and users are instructed to\n// set 0x21 and 0x22 for the second and third sensor if present.\n// -----------------------------------------------------------------------------\n#define RAK120351_ADDR 0x20\n#define RAK120352_ADDR 0x21\n#define RAK120353_ADDR 0x22\n\n// -----------------------------------------------------------------------------\n// BIAS-T Generator\n// -----------------------------------------------------------------------------\n#define TPS65233_ADDR 0x60\n\n// convert 24-bit color to 16-bit (56K)\n#define COLOR565(r, g, b) (((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3))\n\n#if defined(VEXT_ENABLE) && !defined(VEXT_ON_VALUE)\n// Older variant.h files might not be defining this value, so stay with the old default\n#define VEXT_ON_VALUE LOW\n#endif\n\n// -----------------------------------------------------------------------------\n// Rotary encoder\n// -----------------------------------------------------------------------------\n#ifndef ROTARY_DELAY\n#define ROTARY_DELAY 5\n#endif\n\n// -----------------------------------------------------------------------------\n// GPS\n// -----------------------------------------------------------------------------\n\n#ifndef GPS_BAUDRATE\n#define GPS_BAUDRATE 9600\n#define GPS_BAUDRATE_FIXED 0\n#else\n#define GPS_BAUDRATE_FIXED 1\n#endif\n\n#ifndef GPS_THREAD_INTERVAL\n#define GPS_THREAD_INTERVAL 200\n#endif\n\n/* Step #2: follow with defines common to the architecture;\n   also enable HAS_ option not specifically disabled by variant.h */\n#include \"architecture.h\"\n\n#ifndef DEFAULT_REBOOT_SECONDS\n#define DEFAULT_REBOOT_SECONDS 7\n#endif\n\n#ifndef DEFAULT_SHUTDOWN_SECONDS\n#define DEFAULT_SHUTDOWN_SECONDS 2\n#endif\n\n#ifndef MINIMUM_SAFE_FREE_HEAP\n#define MINIMUM_SAFE_FREE_HEAP 1500\n#endif\n\n#ifndef WIRE_INTERFACES_COUNT\n// Officially an NRF52 macro\n// Repurposed cross-platform to identify devices using Wire1\n#if defined(I2C_SDA1) || defined(PIN_WIRE1_SDA)\n#define WIRE_INTERFACES_COUNT 2\n#elif HAS_WIRE\n#define WIRE_INTERFACES_COUNT 1\n#endif\n#endif\n\n/* Step #3: mop up with disabled values for HAS_ options not handled by the above two */\n\n#ifndef HAS_WIFI\n#define HAS_WIFI 0\n#endif\n#ifndef HAS_ETHERNET\n#define HAS_ETHERNET 0\n#endif\n#ifndef HAS_SCREEN\n#define HAS_SCREEN 0\n#endif\n#ifndef HAS_TFT\n#define HAS_TFT 0\n#endif\n#ifndef HAS_WIRE\n#define HAS_WIRE 0\n#endif\n#ifndef HAS_GPS\n#define HAS_GPS 0\n#endif\n#ifndef HAS_BUTTON\n#define HAS_BUTTON 0\n#endif\n#ifndef HAS_TRACKBALL\n#define HAS_TRACKBALL 0\n#endif\n#ifndef HAS_TOUCHSCREEN\n#define HAS_TOUCHSCREEN 0\n#endif\n#ifndef HAS_TELEMETRY\n#define HAS_TELEMETRY 0\n#endif\n#ifndef HAS_SENSOR\n#define HAS_SENSOR 0\n#endif\n#ifndef HAS_RADIO\n#define HAS_RADIO 0\n#endif\n#ifndef HAS_CPU_SHUTDOWN\n#define HAS_CPU_SHUTDOWN 0\n#endif\n#ifndef HAS_BLUETOOTH\n#define HAS_BLUETOOTH 0\n#endif\n#ifndef USE_TFTDISPLAY\n#define USE_TFTDISPLAY 0\n#endif\n\n#ifndef HW_VENDOR\n#error HW_VENDOR must be defined\n#endif\n\n#ifndef TB_DOWN\n#define TB_DOWN 255\n#endif\n#ifndef TB_UP\n#define TB_UP 255\n#endif\n#ifndef TB_LEFT\n#define TB_LEFT 255\n#endif\n#ifndef TB_RIGHT\n#define TB_RIGHT 255\n#endif\n#ifndef TB_PRESS\n#define TB_PRESS 255\n#endif\n\n// Support multiple RGB LED configuration\n#if defined(HAS_NCP5623) || defined(HAS_LP5562) || defined(RGBLED_RED) || defined(HAS_NEOPIXEL) || defined(UNPHONE)\n#define HAS_RGB_LED\n#endif\n\n#ifndef LED_STATE_ON\n#define LED_STATE_ON 1\n#endif\n#ifndef LED_STATE_OFF\n#define LED_STATE_OFF (LED_STATE_ON ^ 1)\n#endif\n\n#ifndef ledOff\n#define ledOff(pin) pinMode(pin, INPUT)\n#endif\n\n// default mapping of pins\n#if defined(PIN_BUTTON2) && !defined(CANCEL_BUTTON_PIN)\n#define ALT_BUTTON_PIN PIN_BUTTON2\n#endif\n#if defined ALT_BUTTON_PIN\n\n#ifndef ALT_BUTTON_ACTIVE_LOW\n#define ALT_BUTTON_ACTIVE_LOW true\n#endif\n#ifndef ALT_BUTTON_ACTIVE_PULLUP\n#define ALT_BUTTON_ACTIVE_PULLUP true\n#endif\n#endif\n\n// -----------------------------------------------------------------------------\n// Global switches to turn off features for a minimized build\n// -----------------------------------------------------------------------------\n\n// #define MESHTASTIC_MINIMIZE_BUILD 1\n#ifdef MESHTASTIC_MINIMIZE_BUILD\n#define MESHTASTIC_EXCLUDE_MODULES 1\n#define MESHTASTIC_EXCLUDE_WIFI 1\n#define MESHTASTIC_EXCLUDE_BLUETOOTH 1\n#define MESHTASTIC_EXCLUDE_GPS 1\n#define MESHTASTIC_EXCLUDE_SCREEN 1\n#define MESHTASTIC_EXCLUDE_MQTT 1\n#define MESHTASTIC_EXCLUDE_POWERMON 1\n#define MESHTASTIC_EXCLUDE_I2C 1\n#define MESHTASTIC_EXCLUDE_PKI 1\n#define MESHTASTIC_EXCLUDE_POWER_FSM 1\n#define MESHTASTIC_EXCLUDE_TZ 1\n#endif\n\n// Turn off all optional modules\n#ifdef MESHTASTIC_EXCLUDE_MODULES\n#define MESHTASTIC_EXCLUDE_AUDIO 1\n#define MESHTASTIC_EXCLUDE_DETECTIONSENSOR 1\n#define MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR 1\n#define MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR 1\n#define MESHTASTIC_EXCLUDE_HEALTH_TELEMETRY 1\n#define MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION 1\n#define MESHTASTIC_EXCLUDE_PAXCOUNTER 1\n#define MESHTASTIC_EXCLUDE_POWER_TELEMETRY 1\n#define MESHTASTIC_EXCLUDE_RANGETEST 1\n#define MESHTASTIC_EXCLUDE_REMOTEHARDWARE 1\n#define MESHTASTIC_EXCLUDE_STOREFORWARD 1\n#define MESHTASTIC_EXCLUDE_TEXTMESSAGE 1\n#define MESHTASTIC_EXCLUDE_TRAFFIC_MANAGEMENT 1\n#define MESHTASTIC_EXCLUDE_ATAK 1\n#define MESHTASTIC_EXCLUDE_CANNEDMESSAGES 1\n#define MESHTASTIC_EXCLUDE_NEIGHBORINFO 1\n#define MESHTASTIC_EXCLUDE_TRACEROUTE 1\n#define MESHTASTIC_EXCLUDE_WAYPOINT 1\n#define MESHTASTIC_EXCLUDE_INPUTBROKER 1\n#define MESHTASTIC_EXCLUDE_SERIAL 1\n#define MESHTASTIC_EXCLUDE_POWERSTRESS 1\n#define MESHTASTIC_EXCLUDE_ADMIN 1\n#endif\n\n// // Turn off wifi even if HW supports wifi (webserver relies on wifi and is also disabled)\n#ifdef MESHTASTIC_EXCLUDE_WIFI\n#define MESHTASTIC_EXCLUDE_WEBSERVER 1\n#undef HAS_WIFI\n#define HAS_WIFI 0\n#endif\n\n// Allow code that needs internet to just check HAS_NETWORKING rather than HAS_WIFI || HAS_ETHERNET\n#define HAS_NETWORKING (HAS_WIFI || HAS_ETHERNET)\n\n// // Turn off Bluetooth\n#ifdef MESHTASTIC_EXCLUDE_BLUETOOTH\n#undef HAS_BLUETOOTH\n#define HAS_BLUETOOTH 0\n#endif\n\n// // Turn off GPS\n#ifdef MESHTASTIC_EXCLUDE_GPS\n#undef HAS_GPS\n#define HAS_GPS 0\n#undef MESHTASTIC_EXCLUDE_RANGETEST\n#define MESHTASTIC_EXCLUDE_RANGETEST 1\n#endif\n\n// Turn off Screen\n#ifdef MESHTASTIC_EXCLUDE_SCREEN\n#undef HAS_SCREEN\n#define HAS_SCREEN 0\n#endif\n\n#include \"DebugConfiguration.h\"\n#include \"RF95Configuration.h\"\n"
  },
  {
    "path": "src/detect/LoRaRadioType.h",
    "content": "#pragma once\n\nenum LoRaRadioType {\n    NO_RADIO,\n    STM32WLx_RADIO,\n    SIM_RADIO,\n    RF95_RADIO,\n    SX1262_RADIO,\n    SX1268_RADIO,\n    LLCC68_RADIO,\n    SX1280_RADIO,\n    LR1110_RADIO,\n    LR1120_RADIO,\n    LR1121_RADIO\n};\n\nextern LoRaRadioType radioType;"
  },
  {
    "path": "src/detect/ScanI2C.cpp",
    "content": "#include \"ScanI2C.h\"\n\nconst ScanI2C::DeviceAddress ScanI2C::ADDRESS_NONE = ScanI2C::DeviceAddress();\nconst ScanI2C::FoundDevice ScanI2C::DEVICE_NONE = ScanI2C::FoundDevice(ScanI2C::DeviceType::NONE, ADDRESS_NONE);\n\nScanI2C::ScanI2C() = default;\n\nvoid ScanI2C::scanPort(ScanI2C::I2CPort port) {}\nvoid ScanI2C::scanPort(ScanI2C::I2CPort port, uint8_t *address, uint8_t asize) {}\n\nvoid ScanI2C::setSuppressScreen()\n{\n    shouldSuppressScreen = true;\n}\n\nScanI2C::FoundDevice ScanI2C::firstScreen() const\n{\n    // Allow to override the scanner results for screen\n    if (shouldSuppressScreen)\n        return DEVICE_NONE;\n\n    ScanI2C::DeviceType types[] = {SCREEN_SSD1306, SCREEN_SH1106, SCREEN_ST7567, SCREEN_UNKNOWN};\n    return firstOfOrNONE(4, types);\n}\n\nScanI2C::FoundDevice ScanI2C::firstRTC() const\n{\n    ScanI2C::DeviceType types[] = {RTC_RV3028, RTC_PCF8563, RTC_PCF85063, RTC_RX8130CE};\n    return firstOfOrNONE(4, types);\n}\n\nScanI2C::FoundDevice ScanI2C::firstKeyboard() const\n{\n    ScanI2C::DeviceType types[] = {CARDKB, TDECKKB, BBQ10KB, RAK14004, MPR121KB, TCA8418KB};\n    return firstOfOrNONE(6, types);\n}\n\nScanI2C::FoundDevice ScanI2C::firstAccelerometer() const\n{\n    ScanI2C::DeviceType types[] = {MPU6050, LIS3DH, BMA423, LSM6DS3, BMX160, STK8BAXX, ICM20948, QMA6100P, BMM150, BMI270};\n    return firstOfOrNONE(10, types);\n}\n\nScanI2C::FoundDevice ScanI2C::firstAQI() const\n{\n    ScanI2C::DeviceType types[] = {PMSA003I, SEN5X, SCD4X, SFA30};\n    return firstOfOrNONE(4, types);\n}\n\nScanI2C::FoundDevice ScanI2C::firstRGBLED() const\n{\n    ScanI2C::DeviceType types[] = {NCP5623, LP5562};\n    return firstOfOrNONE(2, types);\n}\n\nScanI2C::FoundDevice ScanI2C::find(ScanI2C::DeviceType) const\n{\n    return DEVICE_NONE;\n}\n\nbool ScanI2C::exists(ScanI2C::DeviceType) const\n{\n    return false;\n}\n\nScanI2C::FoundDevice ScanI2C::firstOfOrNONE(size_t count, ScanI2C::DeviceType *types) const\n{\n    return DEVICE_NONE;\n}\n\nsize_t ScanI2C::countDevices() const\n{\n    return 0;\n}\n\nScanI2C::DeviceAddress::DeviceAddress(ScanI2C::I2CPort port, uint8_t address) : port(port), address(address) {}\n\nScanI2C::DeviceAddress::DeviceAddress() : DeviceAddress(I2CPort::NO_I2C, 0) {}\n\nbool ScanI2C::DeviceAddress::operator<(const ScanI2C::DeviceAddress &other) const\n{\n    return\n        // If this one has no port and other has a port\n        (port == NO_I2C && other.port != NO_I2C)\n        // if both have a port and this one's address is lower\n        || (port != NO_I2C && other.port != NO_I2C && (address < other.address));\n}\n\nScanI2C::FoundDevice::FoundDevice(ScanI2C::DeviceType type, ScanI2C::DeviceAddress address) : type(type), address(address) {}\n"
  },
  {
    "path": "src/detect/ScanI2C.h",
    "content": "#pragma once\n\n#include <stddef.h>\n#include <stdint.h>\n\nclass ScanI2C\n{\n  public:\n    typedef enum DeviceType {\n        NONE,\n        SCREEN_SSD1306,\n        SCREEN_SH1106,\n        SCREEN_UNKNOWN, // has the same address as the two above but does not respond to the same commands\n        SCREEN_ST7567,\n        RTC_RV3028,\n        RTC_PCF8563,\n        RTC_PCF85063,\n        RTC_RX8130CE,\n        CARDKB,\n        TDECKKB,\n        BBQ10KB,\n        RAK14004,\n        PMU_AXP192_AXP2101, // has the same adress as the TCA8418KB\n        BME_680,\n        BME_280,\n        BMP_280,\n        BMP_085,\n        BMP_3XX,\n        INA260,\n        INA219,\n        INA3221,\n        MAX17048,\n        MCP9808,\n        SHT31,\n        SHT4X,\n        SHTC3,\n        LPS22HB,\n        QMC6310U,\n        QMC6310N,\n        QMI8658,\n        QMC5883L,\n        HMC5883L,\n        PMSA003I,\n        QMA6100P,\n        MPU6050,\n        LIS3DH,\n        BMA423,\n        BQ24295,\n        LSM6DS3,\n        TCA9535,\n        TCA9555,\n        VEML7700,\n        RCWL9620,\n        NCP5623,\n        LP5562,\n        TSL2591,\n        OPT3001,\n        MLX90632,\n        MLX90614,\n        AHT10,\n        BMX160,\n        DFROBOT_LARK,\n        NAU7802,\n        FT6336U,\n        STK8BAXX,\n        ICM20948,\n        SCD4X,\n        MAX30102,\n        TPS65233,\n        MPR121KB,\n        CGRADSENS,\n        INA226,\n        NXP_SE050,\n        DFROBOT_RAIN,\n        DPS310,\n        LTR390UV,\n        RAK12035,\n        TCA8418KB,\n        PCT2075,\n        CST328,\n        BQ25896,\n        BQ27220,\n        LTR553ALS,\n        BHI260AP,\n        BMM150,\n        TSL2561,\n        DRV2605,\n        BH1750,\n        DA217,\n        CHSC6X,\n        CST226SE,\n        BMI270,\n        SEN5X,\n        SFA30,\n        CW2015,\n        SCD30,\n        ADS1115\n    } DeviceType;\n\n    // typedef uint8_t DeviceAddress;\n    typedef enum I2CPort {\n        NO_I2C,\n        WIRE,\n        WIRE1,\n    } I2CPort;\n\n    typedef struct DeviceAddress {\n        // set default values for ADDRESS_NONE\n        I2CPort port = I2CPort::NO_I2C;\n        uint8_t address = 0;\n\n        explicit DeviceAddress(I2CPort port, uint8_t address);\n        DeviceAddress();\n\n        bool operator<(const DeviceAddress &other) const;\n    } DeviceAddress;\n\n    static const DeviceAddress ADDRESS_NONE;\n\n    typedef uint8_t RegisterAddress;\n\n    typedef struct FoundDevice {\n        DeviceType type;\n        DeviceAddress address;\n\n        explicit FoundDevice(DeviceType = DeviceType::NONE, DeviceAddress = ADDRESS_NONE);\n    } FoundDevice;\n\n    static const FoundDevice DEVICE_NONE;\n\n  public:\n    ScanI2C();\n\n    virtual void scanPort(ScanI2C::I2CPort);\n    virtual void scanPort(ScanI2C::I2CPort, uint8_t *, uint8_t);\n\n    /*\n     * A bit of a hack, this tells the scanner not to tell later systems there is a screen to avoid enabling it.\n     */\n    void setSuppressScreen();\n\n    FoundDevice firstScreen() const;\n\n    FoundDevice firstRTC() const;\n\n    FoundDevice firstKeyboard() const;\n\n    FoundDevice firstAccelerometer() const;\n\n    FoundDevice firstAQI() const;\n\n    FoundDevice firstRGBLED() const;\n\n    virtual FoundDevice find(DeviceType) const;\n\n    virtual bool exists(DeviceType) const;\n\n    virtual size_t countDevices() const;\n\n  protected:\n    virtual FoundDevice firstOfOrNONE(size_t, DeviceType[]) const;\n\n  private:\n    bool shouldSuppressScreen = false;\n};\n"
  },
  {
    "path": "src/detect/ScanI2CConsumer.cpp",
    "content": "#include \"ScanI2CConsumer.h\"\n#include <forward_list>\n\nstatic std::forward_list<ScanI2CConsumer *> ScanI2CConsumers;\n\nScanI2CConsumer::ScanI2CConsumer()\n{\n    ScanI2CConsumers.push_front(this);\n}\n\nvoid ScanI2CCompleted(ScanI2C *i2cScanner)\n{\n    for (ScanI2CConsumer *consumer : ScanI2CConsumers) {\n        consumer->i2cScanFinished(i2cScanner);\n    }\n}"
  },
  {
    "path": "src/detect/ScanI2CConsumer.h",
    "content": "#pragma once\n\n#include \"ScanI2C.h\"\n#include <stddef.h>\n\nclass ScanI2CConsumer\n{\n  public:\n    ScanI2CConsumer();\n    virtual void i2cScanFinished(ScanI2C *i2cScanner) = 0;\n};\n\nvoid ScanI2CCompleted(ScanI2C *i2cScanner);"
  },
  {
    "path": "src/detect/ScanI2CTwoWire.cpp",
    "content": "#include \"ScanI2CTwoWire.h\"\n#include \"configuration.h\"\n#include \"detect/ScanI2C.h\"\n\n#if !MESHTASTIC_EXCLUDE_I2C\n\n#include \"concurrency/LockGuard.h\"\n#if defined(ARCH_PORTDUINO)\n#include \"linux/LinuxHardwareI2C.h\"\n#endif\n#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)\n#include \"meshUtils.h\" // vformat\n\n#endif\n\nbool in_array(uint8_t *array, int size, uint8_t lookfor)\n{\n    int i;\n    for (i = 0; i < size; i++)\n        if (lookfor == array[i])\n            return true;\n    return false;\n}\n\nScanI2C::FoundDevice ScanI2CTwoWire::find(ScanI2C::DeviceType type) const\n{\n    concurrency::LockGuard guard((concurrency::Lock *)&lock);\n\n    return exists(type) ? ScanI2C::FoundDevice(type, deviceAddresses.at(type)) : DEVICE_NONE;\n}\n\nbool ScanI2CTwoWire::exists(ScanI2C::DeviceType type) const\n{\n    return deviceAddresses.find(type) != deviceAddresses.end();\n}\n\nScanI2C::FoundDevice ScanI2CTwoWire::firstOfOrNONE(size_t count, DeviceType types[]) const\n{\n    concurrency::LockGuard guard((concurrency::Lock *)&lock);\n\n    for (size_t k = 0; k < count; k++) {\n        ScanI2C::DeviceType current = types[k];\n\n        if (exists(current)) {\n            return ScanI2C::FoundDevice(current, deviceAddresses.at(current));\n        }\n    }\n\n    return DEVICE_NONE;\n}\n\nScanI2C::DeviceType ScanI2CTwoWire::probeOLED(ScanI2C::DeviceAddress addr) const\n{\n    TwoWire *i2cBus = fetchI2CBus(addr);\n\n    uint8_t r = 0;\n    uint8_t r_prev = 0;\n    uint8_t c = 0;\n    ScanI2C::DeviceType o_probe = ScanI2C::DeviceType::SCREEN_UNKNOWN;\n    do {\n        r_prev = r;\n        i2cBus->beginTransmission(addr.address);\n        i2cBus->write((uint8_t)0x00);\n        i2cBus->endTransmission();\n        i2cBus->requestFrom((int)addr.address, 1);\n        if (i2cBus->available()) {\n            r = i2cBus->read();\n        }\n        if (r == 0x80) {\n            LOG_INFO(\"QMC6310N found at address 0x%02X\", addr.address);\n            return ScanI2C::DeviceType::QMC6310N;\n        }\n        r &= 0x0f;\n\n        if (r == 0x08 || r == 0x00) {\n            logFoundDevice(\"SH1106\", (uint8_t)addr.address);\n            o_probe = SCREEN_SH1106; // SH1106\n        } else if (r == 0x03 || r == 0x04 || r == 0x06 || r == 0x07 || r == 0x05) {\n            logFoundDevice(\"SSD1306\", (uint8_t)addr.address);\n            o_probe = SCREEN_SSD1306; // SSD1306\n        }\n        c++;\n    } while ((r != r_prev) && (c < 4));\n    LOG_DEBUG(\"0x%x subtype probed in %i tries \", r, c);\n\n    return o_probe;\n}\nuint16_t ScanI2CTwoWire::getRegisterValue(const ScanI2CTwoWire::RegisterLocation &registerLocation,\n                                          ScanI2CTwoWire::ResponseWidth responseWidth, bool zeropad = false) const\n{\n    uint16_t value = 0x00;\n    TwoWire *i2cBus = fetchI2CBus(registerLocation.i2cAddress);\n\n    i2cBus->beginTransmission(registerLocation.i2cAddress.address);\n    i2cBus->write(registerLocation.registerAddress);\n    if (zeropad) {\n        // Lark Commands need the argument list length in 2 bytes.\n        i2cBus->write((int)0);\n        i2cBus->write((int)0);\n    }\n    i2cBus->endTransmission();\n    delay(20);\n    i2cBus->requestFrom(registerLocation.i2cAddress.address, responseWidth);\n    if (i2cBus->available() > 1) {\n        // Read MSB, then LSB\n        value = (uint16_t)i2cBus->read() << 8;\n        value |= i2cBus->read();\n    } else if (i2cBus->available()) {\n        value = i2cBus->read();\n    }\n    // Drain excess bytes\n    for (uint8_t i = 0; i < responseWidth - 1; i++) {\n        if (i2cBus->available())\n            i2cBus->read();\n    }\n    LOG_DEBUG(\"Register value from 0x%x: 0x%x\", registerLocation.i2cAddress.address, value);\n    return value;\n}\n\nbool ScanI2CTwoWire::i2cCommandResponseLength(ScanI2C::DeviceAddress addr, uint16_t command, uint8_t expectedLength) const\n{\n    TwoWire *i2cBus = fetchI2CBus(addr);\n    i2cBus->beginTransmission(addr.address);\n    if (command > 0xFF) {\n        i2cBus->write((uint8_t)(command >> 8));\n    }\n    i2cBus->write((uint8_t)(command & 0xFF));\n    if (i2cBus->endTransmission() != 0) {\n        return false;\n    }\n    delay(20);\n    uint8_t received = i2cBus->requestFrom(addr.address, expectedLength);\n    bool match = (received == expectedLength);\n    while (i2cBus->available())\n        i2cBus->read();\n    return match;\n}\n\n/// for SEN5X detection\n// Note, this code needs to be called before setting the I2C bus speed\n// for the screen at high speed. The speed needs to be at 100kHz, otherwise\n// detection will not work\nString readSEN5xProductName(TwoWire *i2cBus, uint8_t address)\n{\n    uint8_t cmd[] = {0xD0, 0x14};\n    uint8_t response[48] = {0};\n\n    i2cBus->beginTransmission(address);\n    i2cBus->write(cmd, 2);\n    if (i2cBus->endTransmission() != 0)\n        return \"\";\n\n    delay(20);\n    if (i2cBus->requestFrom(address, (uint8_t)48) != 48)\n        return \"\";\n\n    for (int i = 0; i < 48 && i2cBus->available(); ++i) {\n        response[i] = i2cBus->read();\n    }\n\n    char productName[33] = {0};\n    int j = 0;\n    for (int i = 0; i < 48 && j < 32; i += 3) {\n        if (response[i] >= 32 && response[i] <= 126)\n            productName[j++] = response[i];\n        else\n            break;\n\n        if (response[i + 1] >= 32 && response[i + 1] <= 126)\n            productName[j++] = response[i + 1];\n        else\n            break;\n    }\n\n    return String(productName);\n}\n\n#define SCAN_SIMPLE_CASE(ADDR, T, ...)                                                                                           \\\n    case ADDR:                                                                                                                   \\\n        logFoundDevice(__VA_ARGS__);                                                                                             \\\n        type = T;                                                                                                                \\\n        break;\n\nvoid ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)\n{\n    concurrency::LockGuard guard((concurrency::Lock *)&lock);\n\n    LOG_DEBUG(\"Scan for I2C devices on port %d\", port);\n\n    uint8_t err;\n\n    DeviceAddress addr(port, 0x00);\n\n    uint16_t registerValue = 0x00;\n    ScanI2C::DeviceType type;\n    TwoWire *i2cBus;\n#ifdef RV3028_RTC\n    Melopero_RV3028 rtc;\n#endif\n\n#if WIRE_INTERFACES_COUNT == 2\n    if (port == I2CPort::WIRE1) {\n        i2cBus = &Wire1;\n    } else {\n#endif\n        i2cBus = &Wire;\n#if WIRE_INTERFACES_COUNT == 2\n    }\n#endif\n\n    // We only need to scan 112 addresses, the rest is reserved for special purposes\n    // 0x00 General Call\n    // 0x01 CBUS addresses\n    // 0x02 Reserved for different bus formats\n    // 0x03 Reserved for future purposes\n    // 0x04-0x07 High Speed Master Code\n    // 0x78-0x7B 10-bit slave addressing\n    // 0x7C-0x7F Reserved for future purposes\n\n    for (addr.address = 8; addr.address < 120; addr.address++) {\n        if (asize != 0) {\n            if (!in_array(address, asize, (uint8_t)addr.address))\n                continue;\n            LOG_DEBUG(\"Scan address 0x%x\", (uint8_t)addr.address);\n        }\n        i2cBus->beginTransmission(addr.address);\n#ifdef ARCH_PORTDUINO\n        err = 2;\n        if ((addr.address >= 0x30 && addr.address <= 0x37) || (addr.address >= 0x50 && addr.address <= 0x5F)) {\n            if (i2cBus->read() != -1)\n                err = 0;\n        } else {\n            err = i2cBus->writeQuick((uint8_t)0);\n        }\n        if (err != 0)\n            err = 2;\n#else\n        err = i2cBus->endTransmission();\n#endif\n        type = NONE;\n        if (err == 0) {\n            switch (addr.address) {\n            case SSD1306_ADDRESS_H:\n            case SSD1306_ADDRESS_L:\n                type = probeOLED(addr);\n                break;\n\n#ifdef RV3028_RTC\n            case RV3028_RTC:\n                // foundDevices[addr] = RTC_RV3028;\n                type = RTC_RV3028;\n                logFoundDevice(\"RV3028\", (uint8_t)addr.address);\n                rtc.initI2C(*i2cBus);\n                // Update RTC EEPROM settings, if necessary\n                if (rtc.readEEPROMRegister(0x35) != 0x07) {\n                    rtc.writeEEPROMRegister(0x35, 0x07); // no Clkout\n                }\n                if (rtc.readEEPROMRegister(0x37) != 0xB4) {\n                    rtc.writeEEPROMRegister(0x37, 0xB4);\n                }\n                break;\n#endif\n\n#ifdef PCF8563_RTC\n                SCAN_SIMPLE_CASE(PCF8563_RTC, RTC_PCF8563, \"PCF8563\", (uint8_t)addr.address)\n#endif\n#ifdef RX8130CE_RTC\n                SCAN_SIMPLE_CASE(RX8130CE_RTC, RTC_RX8130CE, \"RX8130CE\", (uint8_t)addr.address)\n#endif\n\n#ifdef PCF85063_RTC\n                SCAN_SIMPLE_CASE(PCF85063_RTC, RTC_PCF85063, \"PCF85063\", (uint8_t)addr.address)\n#endif\n\n            case CARDKB_ADDR:\n                // Do we have the RAK14006 instead?\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x04), 1);\n                if (registerValue == 0x02) {\n                    // KEYPAD_VERSION\n                    logFoundDevice(\"RAK14004\", (uint8_t)addr.address);\n                    type = RAK14004;\n                } else {\n                    logFoundDevice(\"M5 cardKB\", (uint8_t)addr.address);\n                    type = CARDKB;\n                }\n                break;\n\n            case TDECK_KB_ADDR:\n                // Do we have the T-Deck keyboard or the T-Deck Pro battery sensor?\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x04), 1);\n                if (registerValue != 0) {\n                    logFoundDevice(\"BQ27220\", (uint8_t)addr.address);\n                    type = BQ27220;\n                } else {\n                    logFoundDevice(\"TDECKKB\", (uint8_t)addr.address);\n                    type = TDECKKB;\n                }\n                break;\n                SCAN_SIMPLE_CASE(BBQ10_KB_ADDR, BBQ10KB, \"BB Q10\", (uint8_t)addr.address);\n\n                SCAN_SIMPLE_CASE(ST7567_ADDRESS, SCREEN_ST7567, \"ST7567\", (uint8_t)addr.address);\n#ifdef HAS_NCP5623\n                SCAN_SIMPLE_CASE(NCP5623_ADDR, NCP5623, \"NCP5623\", (uint8_t)addr.address);\n#endif\n#ifdef HAS_LP5562\n                SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, \"LP5562\", (uint8_t)addr.address);\n#endif\n            case XPOWERS_AXP192_AXP2101_ADDRESS:\n                // Do we have the axp2101/192 or the TCA8418\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x90), 1);\n                if (registerValue == 0x0) {\n                    logFoundDevice(\"TCA8418\", (uint8_t)addr.address);\n                    type = TCA8418KB;\n                } else {\n                    logFoundDevice(\"AXP192/AXP2101\", (uint8_t)addr.address);\n                    type = PMU_AXP192_AXP2101;\n                }\n                break;\n            case BME_ADDR:\n            case BME_ADDR_ALTERNATE:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xD0), 1); // GET_ID\n                switch (registerValue) {\n                case 0x61:\n                    logFoundDevice(\"BME680\", (uint8_t)addr.address);\n                    type = BME_680;\n                    break;\n                case 0x60:\n                    logFoundDevice(\"BME280\", (uint8_t)addr.address);\n                    type = BME_280;\n                    break;\n                case 0x55:\n                    logFoundDevice(\"BMP085/BMP180\", (uint8_t)addr.address);\n                    type = BMP_085;\n                    break;\n                case 0x00:\n                    // do we have a DPS310 instead?\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0D), 1);\n                    switch (registerValue) {\n                    case 0x10:\n                        logFoundDevice(\"DPS310\", (uint8_t)addr.address);\n                        type = DPS310;\n                        break;\n                    }\n                    if (type == DPS310) {\n                        break;\n                    }\n                default:\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1); // GET_ID\n                    switch (registerValue) {\n                    case 0x50: // BMP-388 should be 0x50\n                        logFoundDevice(\"BMP-388\", (uint8_t)addr.address);\n                        type = BMP_3XX;\n                        break;\n                    case 0x60: // BMP-390 should be 0x60\n                        logFoundDevice(\"BMP-390\", (uint8_t)addr.address);\n                        type = BMP_3XX;\n                        break;\n                    case 0x58: // BMP-280 should be 0x58\n                    default:\n                        logFoundDevice(\"BMP-280\", (uint8_t)addr.address);\n                        type = BMP_280;\n                        break;\n                    }\n                    break;\n                }\n                break;\n#ifndef HAS_NCP5623\n            case AHT10_ADDR:\n                logFoundDevice(\"AHT10\", (uint8_t)addr.address);\n                type = AHT10;\n                break;\n#endif\n#if !defined(M5STACK_UNITC6L)\n            case INA_ADDR:\n            case INA_ADDR_ALTERNATE:\n            case INA_ADDR_WAVESHARE_UPS:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFE), 2);\n                LOG_DEBUG(\"Register MFG_UID: 0x%x\", registerValue);\n                if (registerValue == 0x5449) {\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFF), 2);\n                    LOG_DEBUG(\"Register DIE_UID: 0x%x\", registerValue);\n\n                    if (registerValue == 0x2260) {\n                        logFoundDevice(\"INA226\", (uint8_t)addr.address);\n                        type = INA226;\n                    } else {\n                        logFoundDevice(\"INA260\", (uint8_t)addr.address);\n                        type = INA260;\n                    }\n                } else { // Assume INA219 if INA260 ID is not found\n                    logFoundDevice(\"INA219\", (uint8_t)addr.address);\n                    type = INA219;\n                }\n                break;\n            case INA3221_ADDR:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFE), 2);\n                LOG_DEBUG(\"Register MFG_UID FE: 0x%x\", registerValue);\n                if (registerValue == 0x5449) {\n                    logFoundDevice(\"INA3221\", (uint8_t)addr.address);\n                    type = INA3221;\n                } else {\n                    /* check the first 2 bytes of the 6 byte response register\n                    LARK FW 1.0 should return:\n                    RESPONSE_STATUS STATUS_SUCCESS (0x53)\n                    RESPONSE_CMD CMD_GET_VERSION (0x05)\n                    RESPONSE_LEN_L 0x02\n                    RESPONSE_LEN_H 0x00\n                    RESPONSE_PAYLOAD 0x01\n                    RESPONSE_PAYLOAD+1 0x00\n                    */\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x05), 6, true);\n                    LOG_DEBUG(\"Register MFG_UID 05: 0x%x\", registerValue);\n                    if (registerValue == 0x5305) {\n                        logFoundDevice(\"DFRobot Lark\", (uint8_t)addr.address);\n                        type = DFROBOT_LARK;\n                    }\n                    // else: probably a RAK12500/UBLOX GPS on I2C\n                }\n                break;\n#endif\n            case MCP9808_ADDR:\n                // We need to check for STK8BAXX first, since register 0x07 is new data flag for the z-axis and can produce some\n                // weird result. and register 0x00 doesn't seems to be colliding with MCP9808 and LIS3DH chips.\n                {\n#ifdef HAS_STK8XXX\n                    // Check register 0x00 for 0x8700 response to ID STK8BA53 chip.\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 2);\n                    if (registerValue == 0x8700) {\n                        type = STK8BAXX;\n                        logFoundDevice(\"STK8BAXX\", (uint8_t)addr.address);\n                        break;\n                    }\n#endif\n\n                    // Check register 0x07 for 0x0400 response to ID MCP9808 chip.\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x07), 2);\n                    if (registerValue == 0x0400) {\n                        type = MCP9808;\n                        logFoundDevice(\"MCP9808\", (uint8_t)addr.address);\n                        break;\n                    }\n\n                    // Check register 0x0F for 0x3300 response to ID LIS3DH chip.\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 2);\n                    if (registerValue == 0x3300 || registerValue == 0x3333) { // RAK4631 WisBlock has LIS3DH register at 0x3333\n                        type = LIS3DH;\n                        logFoundDevice(\"LIS3DH\", (uint8_t)addr.address);\n                    }\n                    break;\n                }\n            case SHT31_4x_ADDR:     // same as OPT3001_ADDR_ALT\n            case SHT31_4x_ADDR_ALT: // same as OPT3001_ADDR\n                if (getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x7E), 2) == 0x5449) {\n                    type = OPT3001;\n                    logFoundDevice(\"OPT3001\", (uint8_t)addr.address);\n                } else if (i2cCommandResponseLength(addr, 0x89, 6)) { // SHT4x serial number (6 bytes inc. CRC)\n                    type = SHT4X;\n                    logFoundDevice(\"SHT4X\", (uint8_t)addr.address);\n                } else {\n                    type = SHT31;\n                    logFoundDevice(\"SHT31\", (uint8_t)addr.address);\n                }\n\n                break;\n\n                SCAN_SIMPLE_CASE(SHTC3_ADDR, SHTC3, \"SHTC3\", (uint8_t)addr.address)\n            case RCWL9620_ADDR:\n                // get MAX30102 PARTID\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFF), 1);\n                if (registerValue == 0x15) {\n                    type = MAX30102;\n                    logFoundDevice(\"MAX30102\", (uint8_t)addr.address);\n                    break;\n                } else {\n                    type = RCWL9620;\n                    logFoundDevice(\"RCWL9620\", (uint8_t)addr.address);\n                }\n                break;\n\n            case LPS22HB_ADDR_ALT:\n                // SFA30 detection: send 2-byte command 0xD060 (Get Device Marking) and check for 48-byte response\n                if (i2cCommandResponseLength(addr, 0xD060, 48)) {\n                    type = SFA30;\n                    logFoundDevice(\"SFA30\", (uint8_t)addr.address);\n                    break;\n                }\n                // Fallback: LPS22HB detection at alternate address using WHO_AM_I register (0x0F == 0xB1)\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 1);\n                if (registerValue == 0xB1) {\n                    type = LPS22HB;\n                    logFoundDevice(\"LPS22HB\", (uint8_t)addr.address);\n                }\n                break;\n                SCAN_SIMPLE_CASE(LPS22HB_ADDR, LPS22HB, \"LPS22HB\", (uint8_t)addr.address)\n                SCAN_SIMPLE_CASE(QMC6310U_ADDR, QMC6310U, \"QMC6310U\", (uint8_t)addr.address)\n\n            case QMI8658_ADDR:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0A), 1); // get ID\n                if (registerValue == 0xC0) {\n                    type = BQ24295;\n                    logFoundDevice(\"BQ24295\", (uint8_t)addr.address);\n                    break;\n                }\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x14), 1); // get ID\n                if ((registerValue & 0b00000011) == 0b00000010) {\n                    type = BQ25896;\n                    logFoundDevice(\"BQ25896\", (uint8_t)addr.address);\n                    break;\n                }\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 1); // get ID\n                if (registerValue == 0x6A) {\n                    type = LSM6DS3;\n                    logFoundDevice(\"LSM6DS3\", (uint8_t)addr.address);\n                } else {\n                    type = QMI8658;\n                    logFoundDevice(\"QMI8658\", (uint8_t)addr.address);\n                }\n                break;\n\n                SCAN_SIMPLE_CASE(QMC5883L_ADDR, QMC5883L, \"QMC5883L\", (uint8_t)addr.address)\n                SCAN_SIMPLE_CASE(HMC5883L_ADDR, HMC5883L, \"HMC5883L\", (uint8_t)addr.address)\n#ifdef HAS_QMA6100P\n                SCAN_SIMPLE_CASE(QMA6100P_ADDR, QMA6100P, \"QMA6100P\", (uint8_t)addr.address)\n#else\n                SCAN_SIMPLE_CASE(PMSA003I_ADDR, PMSA003I, \"PMSA003I\", (uint8_t)addr.address)\n#endif\n            case BMA423_ADDR: // this can also be LIS3DH_ADDR_ALT\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0F), 2);\n                if (registerValue == 0x3300 || registerValue == 0x3333) { // RAK4631 WisBlock has LIS3DH register at 0x3333\n                    type = LIS3DH;\n                    logFoundDevice(\"LIS3DH\", (uint8_t)addr.address);\n                } else {\n                    type = BMA423;\n                    logFoundDevice(\"BMA423\", (uint8_t)addr.address);\n                }\n                break;\n            case TCA9535_ADDR:\n            case RAK120352_ADDR:\n            case RAK120353_ADDR:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x02), 1);\n                if (registerValue == addr.address) { // RAK12035 returns its I2C address at 0x02 (eg 0x20)\n                    type = RAK12035;\n                    logFoundDevice(\"RAK12035\", (uint8_t)addr.address);\n                } else {\n                    type = TCA9535;\n                    logFoundDevice(\"TCA9535\", (uint8_t)addr.address);\n                }\n\n                break;\n\n                SCAN_SIMPLE_CASE(LSM6DS3_ADDR, LSM6DS3, \"LSM6DS3\", (uint8_t)addr.address);\n                SCAN_SIMPLE_CASE(VEML7700_ADDR, VEML7700, \"VEML7700\", (uint8_t)addr.address);\n            case TCA9555_ADDR:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x01), 1);\n                if (registerValue == 0x13) {\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1);\n                    if (registerValue == 0x81) {\n                        type = DA217;\n                        logFoundDevice(\"DA217\", (uint8_t)addr.address);\n                    } else {\n                        type = TCA9555;\n                        logFoundDevice(\"TCA9555\", (uint8_t)addr.address);\n                    }\n                } else {\n                    type = TCA9555;\n                    logFoundDevice(\"TCA9555\", (uint8_t)addr.address);\n                }\n                break;\n            case TSL25911_ADDR:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xA0 | 0x12), 1);\n                if (registerValue == 0x50) {\n                    type = TSL2591;\n                    logFoundDevice(\"TSL25911\", (uint8_t)addr.address);\n                } else {\n                    type = TSL2561;\n                    logFoundDevice(\"TSL2561\", (uint8_t)addr.address);\n                }\n                break;\n\n                SCAN_SIMPLE_CASE(MLX90632_ADDR, MLX90632, \"MLX90632\", (uint8_t)addr.address);\n                SCAN_SIMPLE_CASE(NAU7802_ADDR, NAU7802, \"NAU7802\", (uint8_t)addr.address);\n                SCAN_SIMPLE_CASE(MAX1704X_ADDR, MAX17048, \"MAX17048\", (uint8_t)addr.address);\n                SCAN_SIMPLE_CASE(DFROBOT_RAIN_ADDR, DFROBOT_RAIN, \"DFRobot Rain Gauge\", (uint8_t)addr.address);\n                SCAN_SIMPLE_CASE(LTR390UV_ADDR, LTR390UV, \"LTR390UV\", (uint8_t)addr.address);\n                SCAN_SIMPLE_CASE(PCT2075_ADDR, PCT2075, \"PCT2075\", (uint8_t)addr.address);\n                SCAN_SIMPLE_CASE(SCD30_ADDR, SCD30, \"SCD30\", (uint8_t)addr.address);\n            case CST328_ADDR:\n                // Do we have the CST328 or the CST226SE\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xAB), 1);\n                if (registerValue == 0xA9) {\n                    type = CST226SE;\n                    logFoundDevice(\"CST226SE\", (uint8_t)addr.address);\n                } else {\n                    type = CST328;\n                    logFoundDevice(\"CST328\", (uint8_t)addr.address);\n                }\n                break;\n\n                SCAN_SIMPLE_CASE(CHSC6X_ADDR, CHSC6X, \"CHSC6X\", (uint8_t)addr.address);\n            case LTR553ALS_ADDR:\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x86), 1); // Part ID register\n                if (registerValue == 0x92) {                                                       // LTR553ALS Part ID\n                    type = LTR553ALS;\n                    logFoundDevice(\"LTR553ALS\", (uint8_t)addr.address);\n                } else {\n                    // Test BH1750 - send power on command\n                    i2cBus->beginTransmission(addr.address);\n                    i2cBus->write(0x01); // Power On command\n                    uint8_t bh1750_error = i2cBus->endTransmission();\n                    if (bh1750_error == 0) {\n                        type = BH1750;\n                        logFoundDevice(\"BH1750\", (uint8_t)addr.address);\n                    } else {\n                        LOG_INFO(\"Device found at address 0x%x was not able to be enumerated\", (uint8_t)addr.address);\n                    }\n                }\n                break;\n\n                SCAN_SIMPLE_CASE(BHI260AP_ADDR, BHI260AP, \"BHI260AP\", (uint8_t)addr.address);\n            case SCD4X_ADDR: {\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x8), 1);\n                if (registerValue == 0x18) {\n                    logFoundDevice(\"CW2015\", (uint8_t)addr.address);\n                    type = CW2015;\n                } else {\n                    logFoundDevice(\"SCD4X\", (uint8_t)addr.address);\n                    type = SCD4X;\n                }\n                break;\n            }\n                SCAN_SIMPLE_CASE(BMM150_ADDR, BMM150, \"BMM150\", (uint8_t)addr.address);\n#ifdef HAS_TPS65233\n                SCAN_SIMPLE_CASE(TPS65233_ADDR, TPS65233, \"TPS65233\", (uint8_t)addr.address);\n#endif\n\n            case MLX90614_ADDR_DEF:\n                // Do we have the MLX90614 or the MPR121KB or the CST226SE\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x06), 1);\n                if (registerValue == 0xAB) {\n                    type = CST226SE;\n                    logFoundDevice(\"CST226SE\", (uint8_t)addr.address);\n                } else if (getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x0e), 1) == 0x5a) {\n                    type = MLX90614;\n                    logFoundDevice(\"MLX90614\", (uint8_t)addr.address);\n                } else {\n                    registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1); // DRV2605_REG_STATUS\n                    if (registerValue == 0xe0) {\n                        type = DRV2605;\n                        logFoundDevice(\"DRV2605\", (uint8_t)addr.address);\n                    } else {\n                        type = MPR121KB;\n                        logFoundDevice(\"MPR121KB\", (uint8_t)addr.address);\n                    }\n                }\n                break;\n\n            case ICM20948_ADDR:     // same as BMX160_ADDR, BMI270_ADDR_ALT, and SEN5X_ADDR\n            case ICM20948_ADDR_ALT: // same as MPU6050_ADDR, BMI270_ADDR\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1);\n#ifdef HAS_ICM20948\n                type = ICM20948;\n                logFoundDevice(\"ICM20948\", (uint8_t)addr.address);\n                break;\n#endif\n                if (registerValue == 0xEA) {\n                    type = ICM20948;\n                    logFoundDevice(\"ICM20948\", (uint8_t)addr.address);\n                    break;\n                } else if (registerValue == 0x24) {\n                    type = BMI270;\n                    logFoundDevice(\"BMI270\", (uint8_t)addr.address);\n                    break;\n                } else if (registerValue == 0xD8) { // BMX160 chip ID at register 0x00\n                    type = BMX160;\n                    logFoundDevice(\"BMX160\", (uint8_t)addr.address);\n                    break;\n                } else {\n                    String prod = \"\";\n                    prod = readSEN5xProductName(i2cBus, addr.address);\n                    if (prod.startsWith(\"SEN55\")) {\n                        type = SEN5X;\n                        logFoundDevice(\"Sensirion SEN55\", addr.address);\n                        break;\n                    } else if (prod.startsWith(\"SEN54\")) {\n                        type = SEN5X;\n                        logFoundDevice(\"Sensirion SEN54\", addr.address);\n                        break;\n                    } else if (prod.startsWith(\"SEN50\")) {\n                        type = SEN5X;\n                        logFoundDevice(\"Sensirion SEN50\", addr.address);\n                        break;\n                    }\n                    if (addr.address == BMX160_ADDR) {\n                        type = BMX160;\n                        logFoundDevice(\"BMX160\", (uint8_t)addr.address);\n                        break;\n                    } else {\n                        type = MPU6050;\n                        logFoundDevice(\"MPU6050\", (uint8_t)addr.address);\n                        break;\n                    }\n                }\n                break;\n\n            case CGRADSENS_ADDR:\n                // Register 0x00 of the RadSens sensor contains is product identifier 0x7D\n                // Undocumented, but some devices return a product identifier of 0x7A\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1);\n                if (registerValue == 0x7D || registerValue == 0x7A) {\n                    type = CGRADSENS;\n                    logFoundDevice(\"ClimateGuard RadSens\", (uint8_t)addr.address);\n                    break;\n                } else {\n                    LOG_DEBUG(\"Unexpected Device ID for RadSense: addr=0x%x id=0x%x\", CGRADSENS_ADDR, registerValue);\n                }\n                break;\n\n            case 0x48: {\n                i2cBus->beginTransmission(addr.address);\n                uint8_t getInfo[] = {0x5A, 0xC0, 0x00, 0xFF, 0xFC};\n                uint8_t expectedInfo[] = {0xa5, 0xE0, 0x00, 0x3F, 0x19};\n                uint8_t info[5];\n                size_t len = 0;\n                i2cBus->write(getInfo, 5);\n                i2cBus->endTransmission();\n                len = i2cBus->readBytes(info, 5);\n                if (len == 5 && memcmp(expectedInfo, info, len) == 0) {\n                    LOG_INFO(\"NXP SE050 crypto chip found\");\n                    type = NXP_SE050;\n                    break;\n                }\n\n                registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x01), 2);\n                if (registerValue == 0x8583 || registerValue == 0x8580) {\n                    type = ADS1115;\n                    logFoundDevice(\"ADS1115 ADC\", (uint8_t)addr.address);\n                    break;\n                }\n\n                LOG_INFO(\"FT6336U touchscreen found\");\n                type = FT6336U;\n                break;\n            }\n\n            default:\n                LOG_INFO(\"Device found at address 0x%x was not able to be enumerated\", (uint8_t)addr.address);\n            }\n        } else if (err == 4) {\n            LOG_ERROR(\"Unknown error at address 0x%x\", (uint8_t)addr.address);\n        }\n\n        // Check if a type was found for the enumerated device - save, if so\n        if (type != NONE) {\n            deviceAddresses[type] = addr;\n            foundDevices[addr] = type;\n        }\n    }\n}\n\nvoid ScanI2CTwoWire::scanPort(I2CPort port)\n{\n    scanPort(port, nullptr, 0);\n}\n\nTwoWire *ScanI2CTwoWire::fetchI2CBus(ScanI2C::DeviceAddress address)\n{\n    if (address.port == ScanI2C::I2CPort::WIRE) {\n        return &Wire;\n    } else {\n#if WIRE_INTERFACES_COUNT == 2\n        return &Wire1;\n#else\n        return &Wire;\n#endif\n    }\n}\n\nsize_t ScanI2CTwoWire::countDevices() const\n{\n    return foundDevices.size();\n}\n\nvoid ScanI2CTwoWire::logFoundDevice(const char *device, uint8_t address)\n{\n    LOG_INFO(\"%s found at address 0x%x\", device, address);\n}\n#endif\n"
  },
  {
    "path": "src/detect/ScanI2CTwoWire.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_I2C\n\n#include <map>\n#include <memory>\n#include <stddef.h>\n#include <stdint.h>\n\n#include <Wire.h>\n\n#include \"ScanI2C.h\"\n\n#include \"../concurrency/Lock.h\"\n\nclass ScanI2CTwoWire : public ScanI2C\n{\n  public:\n    void scanPort(ScanI2C::I2CPort) override;\n\n    void scanPort(ScanI2C::I2CPort, uint8_t *, uint8_t) override;\n\n    ScanI2C::FoundDevice find(ScanI2C::DeviceType) const override;\n\n    bool exists(ScanI2C::DeviceType) const override;\n\n    size_t countDevices() const override;\n\n    static TwoWire *fetchI2CBus(ScanI2C::DeviceAddress);\n\n  protected:\n    FoundDevice firstOfOrNONE(size_t, DeviceType[]) const override;\n\n  private:\n    typedef struct RegisterLocation {\n        DeviceAddress i2cAddress;\n        RegisterAddress registerAddress;\n\n        RegisterLocation(DeviceAddress deviceAddress, RegisterAddress registerAddress)\n            : i2cAddress(deviceAddress), registerAddress(registerAddress)\n        {\n        }\n\n    } RegisterLocation;\n\n    typedef uint8_t ResponseWidth;\n\n    std::map<ScanI2C::DeviceAddress, ScanI2C::DeviceType> foundDevices;\n\n    // note: prone to overwriting if multiple devices of a type are added at different addresses (rare?)\n    std::map<ScanI2C::DeviceType, ScanI2C::DeviceAddress> deviceAddresses;\n\n    concurrency::Lock lock;\n\n    uint16_t getRegisterValue(const RegisterLocation &, ResponseWidth, bool) const;\n\n    bool i2cCommandResponseLength(DeviceAddress addr, uint16_t command, uint8_t expectedLength) const;\n\n    DeviceType probeOLED(ScanI2C::DeviceAddress) const;\n\n    static void logFoundDevice(const char *device, uint8_t address);\n};\n#endif"
  },
  {
    "path": "src/detect/einkScan.h",
    "content": "#include \"../configuration.h\"\n\n#ifdef RAK_4631\n#include \"../main.h\"\n#include <SPI.h>\n\nvoid d_writeCommand(uint8_t c)\n{\n    SPI1.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));\n    if (PIN_EINK_DC >= 0)\n        digitalWrite(PIN_EINK_DC, LOW);\n    if (PIN_EINK_CS >= 0)\n        digitalWrite(PIN_EINK_CS, LOW);\n    SPI1.transfer(c);\n    if (PIN_EINK_CS >= 0)\n        digitalWrite(PIN_EINK_CS, HIGH);\n    if (PIN_EINK_DC >= 0)\n        digitalWrite(PIN_EINK_DC, HIGH);\n    SPI1.endTransaction();\n}\n\nvoid d_writeData(uint8_t d)\n{\n    SPI1.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));\n    if (PIN_EINK_CS >= 0)\n        digitalWrite(PIN_EINK_CS, LOW);\n    SPI1.transfer(d);\n    if (PIN_EINK_CS >= 0)\n        digitalWrite(PIN_EINK_CS, HIGH);\n    SPI1.endTransaction();\n}\n\nunsigned long d_waitWhileBusy(uint16_t busy_time)\n{\n    if (PIN_EINK_BUSY >= 0) {\n        delay(1); // add some margin to become active\n        unsigned long start = micros();\n        while (1) {\n            if (digitalRead(PIN_EINK_BUSY) != HIGH)\n                break;\n            delay(1);\n            if (digitalRead(PIN_EINK_BUSY) != HIGH)\n                break;\n            if (micros() - start > 10000000)\n                break;\n        }\n        unsigned long elapsed = micros() - start;\n        (void)start;\n        return elapsed;\n    } else\n        return busy_time;\n}\n\nvoid scanEInkDevice(void)\n{\n    SPI1.begin();\n    d_writeCommand(0x22);\n    d_writeData(0x83);\n    d_writeCommand(0x20);\n    eink_found = (d_waitWhileBusy(150) > 0) ? true : false;\n    if (eink_found)\n        LOG_DEBUG(\"EInk display found\");\n    else\n        LOG_DEBUG(\"EInk display not found\");\n    SPI1.end();\n}\n#endif"
  },
  {
    "path": "src/detect/reClockI2C.cpp",
    "content": "#include \"reClockI2C.h\"\n#include \"ScanI2CTwoWire.h\"\n\nuint32_t reClockI2C(uint32_t desiredClock, TwoWire *i2cBus, bool force)\n{\n\n    uint32_t currentClock = 0;\n\n    /* See https://github.com/arduino/Arduino/issues/11457\n      Currently, only ESP32 can getClock()\n      While all cores can setClock()\n      https://github.com/sandeepmistry/arduino-nRF5/blob/master/libraries/Wire/Wire.h#L50\n      https://github.com/earlephilhower/arduino-pico/blob/master/libraries/Wire/src/Wire.h#L60\n      https://github.com/stm32duino/Arduino_Core_STM32/blob/main/libraries/Wire/src/Wire.h#L103\n      For cases when I2C speed is different to the ones defined by sensors (see defines in sensor classes)\n      we need to reclock I2C and set it back to the previous desired speed.\n      Only for cases where we can know OR predefine the speed, we can do this.\n    */\n\n// TODO add getClock function or return a predefined clock speed per variant?\n#ifdef CAN_RECLOCK_I2C\n    currentClock = i2cBus->getClock();\n#endif\n\n    if ((currentClock != desiredClock) || force) {\n        LOG_DEBUG(\"Changing I2C clock to %u\", desiredClock);\n        i2cBus->setClock(desiredClock);\n    }\n\n    return currentClock;\n}\n"
  },
  {
    "path": "src/detect/reClockI2C.h",
    "content": "\n#ifndef RECLOCK_I2C_\n#define RECLOCK_I2C_\n\n#include \"ScanI2CTwoWire.h\"\n#include <Wire.h>\n#include <stdint.h>\n\nuint32_t reClockI2C(uint32_t desiredClock, TwoWire *i2cBus, bool force);\n\n#endif\n"
  },
  {
    "path": "src/error.h",
    "content": "#pragma once\n\n#include <Arduino.h>\n\n#include \"mesh/generated/meshtastic/mesh.pb.h\" // For CriticalErrorCode\n\n/// A macro that include filename and line\n#define RECORD_CRITICALERROR(code) recordCriticalError(code, __LINE__, __FILE__)\n\n/// Record an error that should be reported via analytics\nvoid recordCriticalError(meshtastic_CriticalErrorCode code = meshtastic_CriticalErrorCode_UNSPECIFIED, uint32_t address = 0,\n                         const char *filename = NULL);"
  },
  {
    "path": "src/freertosinc.h",
    "content": "#pragma once\n\n// The FreeRTOS includes are in a different directory on ESP32 and I can't figure out how to make that work with platformio gcc\n// options so this is my quick hack to make things work\n\n#if defined(ARDUINO_ARCH_ESP32)\n#define HAS_FREE_RTOS\n\n#include <freertos/FreeRTOS.h>\n#include <freertos/queue.h>\n#include <freertos/semphr.h>\n#include <freertos/task.h>\n#endif\n\n#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_RP2040)\n#define HAS_FREE_RTOS\n\n#include <FreeRTOS.h>\n#include <queue.h>\n#include <semphr.h>\n#include <task.h>\n#endif\n\n#ifdef HAS_FREE_RTOS\n\n// Include real FreeRTOS defs above\n\n#else\n\n// Include placeholder fake FreeRTOS defs\n\n#include <Arduino.h>\n\ntypedef uint32_t TickType_t;\ntypedef uint32_t BaseType_t;\n\n#define portMAX_DELAY UINT32_MAX\n\n#define tskIDLE_PRIORITY 0\n#define configMAX_PRIORITIES 10 // Highest priority level\n\n// Don't do anything on non free rtos platforms when done with the ISR\n#define portYIELD_FROM_ISR(x)\n\nenum eNotifyAction { eNoAction, eSetValueWithoutOverwrite, eSetValueWithOverwrite };\n\n#endif"
  },
  {
    "path": "src/gps/GPS.cpp",
    "content": "#include <cstring> // Include for strstr\n#include <vector>\n\n#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"Default.h\"\n#include \"GPS.h\"\n#include \"GpioLogic.h\"\n#include \"NodeDB.h\"\n#include \"PowerMon.h\"\n#include \"RTC.h\"\n#include \"Throttle.h\"\n#include \"buzz.h\"\n#include \"concurrency/Periodic.h\"\n#include \"meshUtils.h\"\n\n#include \"main.h\" // pmu_found\n#include \"sleep.h\"\n\n#include \"GPSUpdateScheduling.h\"\n#include \"cas.h\"\n#include \"ubx.h\"\n\n#ifdef ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#include \"meshUtils.h\"\n#include <algorithm>\n#include <ctime>\n#endif\n\n#ifndef GPS_RESET_MODE\n#define GPS_RESET_MODE HIGH\n#endif\n\n// Not all platforms have std::size().\ntemplate <typename T, std::size_t N> std::size_t array_count(const T (&)[N])\n{\n    return N;\n}\n\n#ifndef GPS_SERIAL_PORT\n#define GPS_SERIAL_PORT Serial1\n#endif\n\n#if defined(ARCH_NRF52)\nUart *GPS::_serial_gps = &GPS_SERIAL_PORT;\n#elif defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)\nHardwareSerial *GPS::_serial_gps = &GPS_SERIAL_PORT;\n#elif defined(ARCH_RP2040)\nSerialUART *GPS::_serial_gps = &GPS_SERIAL_PORT;\n#else\nHardwareSerial *GPS::_serial_gps = nullptr;\n#endif\n\nstd::unique_ptr<GPS> gps = nullptr;\n\nstatic GPSUpdateScheduling scheduling;\n\n/// Multiple GPS instances might use the same serial port (in sequence), but we can\n/// only init that port once.\nstatic bool didSerialInit;\n\nstatic struct uBloxGnssModelInfo {\n    char swVersion[30];\n    char hwVersion[10];\n    uint8_t extensionNo;\n    char extension[10][30];\n    uint8_t protocol_version;\n} ublox_info;\n\n#define GPS_SOL_EXPIRY_MS 5000 // in millis. give 1 second time to combine different sentences. NMEA Frequency isn't higher anyway\n#define NMEA_MSG_GXGSA \"GNGSA\" // GSA message (GPGSA, GNGSA etc)\n\n// For logging\nstatic const char *getGPSPowerStateString(GPSPowerState state)\n{\n    switch (state) {\n    case GPS_ACTIVE:\n        return \"ACTIVE\";\n    case GPS_IDLE:\n        return \"IDLE\";\n    case GPS_SOFTSLEEP:\n        return \"SOFTSLEEP\";\n    case GPS_HARDSLEEP:\n        return \"HARDSLEEP\";\n    case GPS_OFF:\n        return \"OFF\";\n    default:\n        assert(false);  // Unhandled enum value..\n        return \"FALSE\"; // to make new ESP-IDF happy\n    }\n}\n\n#ifdef PIN_GPS_SWITCH\n// If we have a hardware switch, define a periodic watcher outside of the GPS runOnce thread, since this can be sleeping\n// indefinitely\n\nint lastState = LOW;\nbool firstrun = true;\n\nstatic int32_t gpsSwitch()\n{\n    if (gps) {\n        int currentState = digitalRead(PIN_GPS_SWITCH);\n\n        // Respect explicit NOT_PRESENT mode and do not let the hardware switch re-enable GPS.\n        if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT) {\n            gps->disable();\n            lastState = currentState;\n            firstrun = false;\n            return 1000;\n        }\n\n        // if the switch is set to zero, disable the GPS Thread\n        if (firstrun)\n            if (currentState == LOW)\n                lastState = HIGH;\n\n        if (currentState != lastState) {\n            if (currentState == LOW) {\n                config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED;\n                if (!firstrun)\n                    playGPSDisableBeep();\n                gps->disable();\n            } else {\n                config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED;\n                if (!firstrun)\n                    playGPSEnableBeep();\n                gps->enable();\n            }\n            lastState = currentState;\n        }\n        firstrun = false;\n    }\n    return 1000;\n}\n\nstatic std::unique_ptr<concurrency::Periodic> gpsPeriodic;\n#endif\n\nstatic void UBXChecksum(uint8_t *message, size_t length)\n{\n    uint8_t CK_A = 0, CK_B = 0;\n\n    // Calculate the checksum, starting from the CLASS field (which is message[2])\n    for (size_t i = 2; i < length - 2; i++) {\n        CK_A = (CK_A + message[i]) & 0xFF;\n        CK_B = (CK_B + CK_A) & 0xFF;\n    }\n\n    // Place the calculated checksum values in the message\n    message[length - 2] = CK_A;\n    message[length - 1] = CK_B;\n}\n\n// Calculate the checksum for a CAS packet\nstatic void CASChecksum(uint8_t *message, size_t length)\n{\n    uint32_t cksum = ((uint32_t)message[5] << 24); // Message ID\n    cksum += ((uint32_t)message[4]) << 16;         // Class\n    cksum += message[2];                           // Payload Len\n\n    // Iterate over the payload as a series of uint32_t's and\n    // accumulate the cksum\n    for (size_t i = 0; i < (length - 10) / 4; i++) {\n        uint32_t pl = 0;\n        memcpy(&pl, (message + 6) + (i * sizeof(uint32_t)), sizeof(uint32_t)); // avoid pointer dereference\n        cksum += pl;\n    }\n\n    // Place the checksum values in the message\n    message[length - 4] = (cksum & 0xFF);\n    message[length - 3] = (cksum & (0xFF << 8)) >> 8;\n    message[length - 2] = (cksum & (0xFF << 16)) >> 16;\n    message[length - 1] = (cksum & (0xFF << 24)) >> 24;\n}\n\n// Function to create a ublox packet for editing in memory\nuint8_t GPS::makeUBXPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg)\n{\n    // Construct the UBX packet\n    UBXscratch[0] = 0xB5;         // header\n    UBXscratch[1] = 0x62;         // header\n    UBXscratch[2] = class_id;     // class\n    UBXscratch[3] = msg_id;       // id\n    UBXscratch[4] = payload_size; // length\n    UBXscratch[5] = 0x00;\n\n    UBXscratch[6 + payload_size] = 0x00; // CK_A\n    UBXscratch[7 + payload_size] = 0x00; // CK_B\n\n    for (int i = 0; i < payload_size; i++) {\n        UBXscratch[6 + i] = pgm_read_byte(&msg[i]);\n    }\n    UBXChecksum(UBXscratch, (payload_size + 8));\n    return (payload_size + 8);\n}\n\n// Function to create a CAS packet for editing in memory\nuint8_t GPS::makeCASPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg)\n{\n    // General CAS structure\n    //        | H1   | H2   | payload_len | cls  | msg  | Payload       ...   | Checksum                  |\n    // Size:  | 1    | 1    | 2           | 1    | 1    | payload_len         | 4                         |\n    // Pos:   | 0    | 1    | 2    | 3    | 4    | 5    | 6    | 7      ...   | 6 + payload_len ...       |\n    //        |------|------|-------------|------|------|------|--------------|---------------------------|\n    //        | 0xBA | 0xCE | 0xXX | 0xXX | 0xXX | 0xXX | 0xXX | 0xXX   ...   | 0xXX | 0xXX | 0xXX | 0xXX |\n\n    // Construct the CAS packet\n    UBXscratch[0] = 0xBA;         // header 1 (0xBA)\n    UBXscratch[1] = 0xCE;         // header 2 (0xCE)\n    UBXscratch[2] = payload_size; // length 1\n    UBXscratch[3] = 0;            // length 2\n    UBXscratch[4] = class_id;     // class\n    UBXscratch[5] = msg_id;       // id\n\n    UBXscratch[6 + payload_size] = 0x00; // Checksum\n    UBXscratch[7 + payload_size] = 0x00;\n    UBXscratch[8 + payload_size] = 0x00;\n    UBXscratch[9 + payload_size] = 0x00;\n\n    for (int i = 0; i < payload_size; i++) {\n        UBXscratch[6 + i] = pgm_read_byte(&msg[i]);\n    }\n    CASChecksum(UBXscratch, (payload_size + 10));\n\n#if defined(GPS_DEBUG) && defined(DEBUG_PORT)\n    LOG_DEBUG(\"CAS packet: \");\n    DEBUG_PORT.hexDump(MESHTASTIC_LOG_LEVEL_DEBUG, UBXscratch, payload_size + 10);\n#endif\n    return (payload_size + 10);\n}\n\nGPS_RESPONSE GPS::getACK(const char *message, uint32_t waitMillis)\n{\n    uint8_t buffer[768] = {0};\n    uint8_t b;\n    int bytesRead = 0;\n    uint32_t startTimeout = millis() + waitMillis;\n#ifdef GPS_DEBUG\n    std::string debugmsg = \"\";\n#endif\n    while (millis() < startTimeout) {\n        if (_serial_gps->available()) {\n            b = _serial_gps->read();\n\n#ifdef GPS_DEBUG\n            debugmsg += vformat(\"%c\", (b >= 32 && b <= 126) ? b : '.');\n#endif\n            buffer[bytesRead] = b;\n            bytesRead++;\n            if ((bytesRead == 767) || (b == '\\r')) {\n#ifdef GPS_DEBUG\n                LOG_DEBUG(debugmsg.c_str());\n#endif\n                if (strnstr((char *)buffer, message, bytesRead) != nullptr) {\n#ifdef GPS_DEBUG\n                    LOG_DEBUG(\"Found: %s\", message); // Log the found message\n#endif\n                    return GNSS_RESPONSE_OK;\n                } else {\n                    bytesRead = 0;\n                }\n            }\n        }\n    }\n    return GNSS_RESPONSE_NONE;\n}\n\nGPS_RESPONSE GPS::getACKCas(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis)\n{\n    uint32_t startTime = millis();\n    uint8_t buffer[CAS_ACK_NACK_MSG_SIZE] = {0};\n    uint8_t bufferPos = 0;\n\n    // CAS-ACK-(N)ACK structure\n    //         | H1   | H2   | Payload Len | cls  | msg  | Payload                   | Checksum (4)              |\n    //         |      |      |             |      |      | Cls  | Msg  | Reserved    |                           |\n    //         |------|------|-------------|------|------|------|------|-------------|---------------------------|\n    // ACK-NACK| 0xBA | 0xCE | 0x04 | 0x00 | 0x05 | 0x00 | 0xXX | 0xXX | 0x00 | 0x00 | 0xXX | 0xXX | 0xXX | 0xXX |\n    // ACK-ACK | 0xBA | 0xCE | 0x04 | 0x00 | 0x05 | 0x01 | 0xXX | 0xXX | 0x00 | 0x00 | 0xXX | 0xXX | 0xXX | 0xXX |\n\n    while (Throttle::isWithinTimespanMs(startTime, waitMillis)) {\n        if (_serial_gps->available()) {\n            buffer[bufferPos++] = _serial_gps->read();\n\n            // keep looking at the first two bytes of buffer until\n            // we have found the CAS frame header (0xBA, 0xCE), if not\n            // keep reading bytes until we find a frame header or we run\n            // out of time.\n            if ((bufferPos == 2) && !(buffer[0] == 0xBA && buffer[1] == 0xCE)) {\n                buffer[0] = buffer[1];\n                buffer[1] = 0;\n                bufferPos = 1;\n            }\n        }\n\n        // we have read all the bytes required for the Ack/Nack (14-bytes)\n        // and we must have found a frame to get this far\n        if (bufferPos == sizeof(buffer) - 1) {\n            uint8_t msg_cls = buffer[4];     // message class should be 0x05\n            uint8_t msg_msg_id = buffer[5];  // message id should be 0x00 or 0x01\n            uint8_t payload_cls = buffer[6]; // payload class id\n            uint8_t payload_msg = buffer[7]; // payload message id\n\n            // Check for an ACK-ACK for the specified class and message id\n            if ((msg_cls == 0x05) && (msg_msg_id == 0x01) && payload_cls == class_id && payload_msg == msg_id) {\n#ifdef GPS_DEBUG\n                LOG_INFO(\"Got ACK for class %02X message %02X in %dms\", class_id, msg_id, millis() - startTime);\n#endif\n                return GNSS_RESPONSE_OK;\n            }\n\n            // Check for an ACK-NACK for the specified class and message id\n            if ((msg_cls == 0x05) && (msg_msg_id == 0x00) && payload_cls == class_id && payload_msg == msg_id) {\n#ifdef GPS_DEBUG\n                LOG_WARN(\"Got NACK for class %02X message %02X in %dms\", class_id, msg_id, millis() - startTime);\n#endif\n                return GNSS_RESPONSE_NAK;\n            }\n\n            // This isn't the frame we are looking for, clear the buffer\n            // and try again until we run out of time.\n            memset(buffer, 0x0, sizeof(buffer));\n            bufferPos = 0;\n        }\n    }\n    return GNSS_RESPONSE_NONE;\n}\n\nGPS_RESPONSE GPS::getACK(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis)\n{\n    uint8_t b;\n    uint8_t ack = 0;\n    const uint8_t ackP[2] = {class_id, msg_id};\n    uint8_t buf[10] = {0xB5, 0x62, 0x05, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00};\n    uint32_t startTime = millis();\n    const char frame_errors[] = \"More than 100 frame errors\";\n    int sCounter = 0;\n#ifdef GPS_DEBUG\n    std::string debugmsg = \"\";\n#endif\n\n    for (int j = 2; j < 6; j++) {\n        buf[8] += buf[j];\n        buf[9] += buf[8];\n    }\n\n    for (int j = 0; j < 2; j++) {\n        buf[6 + j] = ackP[j];\n        buf[8] += buf[6 + j];\n        buf[9] += buf[8];\n    }\n\n    while (Throttle::isWithinTimespanMs(startTime, waitMillis)) {\n        if (ack > 9) {\n#ifdef GPS_DEBUG\n            LOG_INFO(\"Got ACK for class %02X message %02X in %dms\", class_id, msg_id, millis() - startTime);\n#endif\n            return GNSS_RESPONSE_OK; // ACK received\n        }\n        if (_serial_gps->available()) {\n            b = _serial_gps->read();\n            if (b == frame_errors[sCounter]) {\n                sCounter++;\n                if (sCounter == 26) {\n#ifdef GPS_DEBUG\n\n                    LOG_DEBUG(debugmsg.c_str());\n#endif\n                    return GNSS_RESPONSE_FRAME_ERRORS;\n                }\n            } else {\n                sCounter = 0;\n            }\n#ifdef GPS_DEBUG\n            debugmsg += vformat(\"%02X\", b);\n#endif\n            if (b == buf[ack]) {\n                ack++;\n            } else {\n                if (ack == 3 && b == 0x00) { // UBX-ACK-NAK message\n#ifdef GPS_DEBUG\n                    LOG_DEBUG(debugmsg.c_str());\n#endif\n                    LOG_WARN(\"Got NAK for class %02X message %02X\", class_id, msg_id);\n                    return GNSS_RESPONSE_NAK; // NAK received\n                }\n                ack = 0; // Reset the acknowledgement counter\n            }\n        }\n    }\n#ifdef GPS_DEBUG\n    LOG_DEBUG(debugmsg.c_str());\n    LOG_WARN(\"No response for class %02X message %02X\", class_id, msg_id);\n#endif\n    return GNSS_RESPONSE_NONE; // No response received within timeout\n}\n\n/**\n * @brief\n * @note   New method, this method can wait for the specified class and message ID, and return the payload\n * @param  *buffer: The message buffer, if there is a response payload message, it will be returned through the buffer parameter\n * @param  size:    size of buffer\n * @param  requestedClass:  request class constant\n * @param  requestedID:     request message ID constant\n * @retval length of payload message\n */\nint GPS::getACK(uint8_t *buffer, uint16_t size, uint8_t requestedClass, uint8_t requestedID, uint32_t waitMillis)\n{\n    uint16_t ubxFrameCounter = 0;\n    uint32_t startTime = millis();\n    uint16_t needRead = 0;\n\n    while (Throttle::isWithinTimespanMs(startTime, waitMillis)) {\n        if (_serial_gps->available()) {\n            int c = _serial_gps->read();\n            switch (ubxFrameCounter) {\n            case 0:\n                // ubxFrame 'μ'\n                if (c == 0xB5) {\n                    ubxFrameCounter++;\n                }\n                break;\n            case 1:\n                // ubxFrame 'b'\n                if (c == 0x62) {\n                    ubxFrameCounter++;\n                } else {\n                    ubxFrameCounter = 0;\n                }\n                break;\n            case 2:\n                // Class\n                if (c == requestedClass) {\n                    ubxFrameCounter++;\n                } else {\n                    ubxFrameCounter = 0;\n                }\n                break;\n            case 3:\n                // Message ID\n                if (c == requestedID) {\n                    ubxFrameCounter++;\n                } else {\n                    ubxFrameCounter = 0;\n                }\n                break;\n            case 4:\n                // Payload length lsb\n                needRead = c;\n                ubxFrameCounter++;\n                break;\n            case 5:\n                // Payload length msb\n                needRead |= (c << 8);\n                ubxFrameCounter++;\n                // Check for buffer overflow\n                if (needRead >= size) {\n                    ubxFrameCounter = 0;\n                    break;\n                }\n                if (_serial_gps->readBytes(buffer, needRead) != needRead) {\n                    ubxFrameCounter = 0;\n                } else {\n                    // return payload length\n#ifdef GPS_DEBUG\n                    LOG_INFO(\"Got ACK for class %02X message %02X in %dms\", requestedClass, requestedID, millis() - startTime);\n#endif\n                    return needRead;\n                }\n                break;\n\n            default:\n                break;\n            }\n        }\n    }\n    return 0;\n}\n\n#if GPS_BAUDRATE_FIXED\n// if GPS_BAUDRATE is specified in variant, only try that.\nstatic const int serialSpeeds[1] = {GPS_BAUDRATE};\nstatic const int rareSerialSpeeds[1] = {GPS_BAUDRATE};\n#else\nstatic const int serialSpeeds[3] = {9600, 115200, 38400};\nstatic const int rareSerialSpeeds[3] = {4800, 57600, GPS_BAUDRATE};\n#endif\n\n#ifndef GPS_PROBETRIES\n#define GPS_PROBETRIES 2\n#endif\n\n/**\n * @brief  Setup the GPS based on the model detected.\n *  We detect the GPS by cycling through a set of baud rates, first common then rare.\n *  For each baud rate, we run GPS::Probe to send commands and match the responses\n *  to known GPS responses.\n * @retval Whether setup reached the end of its potential to configure the GPS.\n */\nbool GPS::setup()\n{\n    if (!didSerialInit) {\n        int msglen = 0;\n        if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) {\n            if (probeTries < GPS_PROBETRIES) {\n                gnssModel = probe(serialSpeeds[speedSelect]);\n                if (gnssModel == GNSS_MODEL_UNKNOWN) {\n                    if (currentStep == 0 && ++speedSelect == array_count(serialSpeeds)) {\n                        speedSelect = 0;\n                        ++probeTries;\n                    }\n                }\n            }\n            // Rare Serial Speeds\n#ifndef CONFIG_IDF_TARGET_ESP32C6\n            if (probeTries == GPS_PROBETRIES) {\n                gnssModel = probe(rareSerialSpeeds[speedSelect]);\n                if (gnssModel == GNSS_MODEL_UNKNOWN) {\n                    if (currentStep == 0 && ++speedSelect == array_count(rareSerialSpeeds)) {\n                        LOG_WARN(\"Give up on GPS probe and set to %d\", GPS_BAUDRATE);\n                        return true;\n                    }\n                }\n            }\n#endif\n        }\n\n        if (gnssModel != GNSS_MODEL_UNKNOWN) {\n            setConnected();\n        } else {\n            return false;\n        }\n\n        if (gnssModel == GNSS_MODEL_MTK) {\n            /*\n             * t-beam-s3-core uses the same L76K GNSS module as t-echo.\n             * Unlike t-echo, L76K uses 9600 baud rate for communication by default.\n             * */\n\n            // Initialize the L76K Chip, use GPS + GLONASS + BEIDOU\n            _serial_gps->write(\"$PCAS04,7*1E\\r\\n\");\n            delay(250);\n            // only ask for RMC and GGA\n            _serial_gps->write(\"$PCAS03,1,0,0,0,1,0,0,0,0,0,,,0,0*02\\r\\n\");\n            delay(250);\n            // Switch to Vehicle Mode, since SoftRF enables Aviation < 2g\n            _serial_gps->write(\"$PCAS11,3*1E\\r\\n\");\n            delay(250);\n        } else if (gnssModel == GNSS_MODEL_MTK_L76B) {\n            // Waveshare Pico-GPS hat uses the L76B with 9600 baud\n            // Initialize the L76B Chip, use GPS + GLONASS\n            // See note in L76_Series_GNSS_Protocol_Specification, chapter 3.29\n            _serial_gps->write(\"$PMTK353,1,1,0,0,0*2B\\r\\n\");\n            // Above command will reset the GPS and takes longer before it will accept new commands\n            delay(1000);\n            // only ask for RMC and GGA (GNRMC and GNGGA)\n            // See note in L76_Series_GNSS_Protocol_Specification, chapter 2.1\n            _serial_gps->write(\"$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\\r\\n\");\n            delay(250);\n            // Enable SBAS\n            _serial_gps->write(\"$PMTK301,2*2E\\r\\n\");\n            delay(250);\n            // Enable PPS for 2D/3D fix only\n            _serial_gps->write(\"$PMTK285,3,100*3F\\r\\n\");\n            delay(250);\n            // Switch to Fitness Mode, for running and walking purpose with low speed (<5 m/s)\n            _serial_gps->write(\"$PMTK886,1*29\\r\\n\");\n            delay(250);\n        } else if (gnssModel == GNSS_MODEL_MTK_PA1010D) {\n            // PA1010D is used in the Pimoroni GPS board.\n\n            // Enable all constellations.\n            _serial_gps->write(\"$PMTK353,1,1,1,1,1*2A\\r\\n\");\n            // Above command will reset the GPS and takes longer before it will accept new commands\n            delay(1000);\n            // Only ask for RMC and GGA (GNRMC and GNGGA)\n            _serial_gps->write(\"$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\\r\\n\");\n            delay(250);\n            // Enable SBAS / WAAS\n            _serial_gps->write(\"$PMTK301,2*2E\\r\\n\");\n            delay(250);\n        } else if (gnssModel == GNSS_MODEL_MTK_PA1616S) {\n            // PA1616S is used in some GPS breakout boards from Adafruit\n            // PA1616S does not have GLONASS capability. PA1616D does, but is not implemented here.\n            _serial_gps->write(\"$PMTK353,1,0,0,0,0*2A\\r\\n\");\n            // Above command will reset the GPS and takes longer before it will accept new commands\n            delay(1000);\n            // Only ask for RMC and GGA (GNRMC and GNGGA)\n            _serial_gps->write(\"$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\\r\\n\");\n            delay(250);\n            // Enable SBAS / WAAS\n            _serial_gps->write(\"$PMTK301,2*2E\\r\\n\");\n            delay(250);\n        } else if (gnssModel == GNSS_MODEL_ATGM336H) {\n            // Set the initial configuration of the device - these _should_ work for most AT6558 devices\n            msglen = makeCASPacket(0x06, 0x07, sizeof(_message_CAS_CFG_NAVX_CONF), _message_CAS_CFG_NAVX_CONF);\n            _serial_gps->write(UBXscratch, msglen);\n            if (getACKCas(0x06, 0x07, 250) != GNSS_RESPONSE_OK) {\n                LOG_WARN(\"ATGM336H: Could not set Config\");\n            }\n\n            // Set the update frequency to 1Hz\n            msglen = makeCASPacket(0x06, 0x04, sizeof(_message_CAS_CFG_RATE_1HZ), _message_CAS_CFG_RATE_1HZ);\n            _serial_gps->write(UBXscratch, msglen);\n            if (getACKCas(0x06, 0x04, 250) != GNSS_RESPONSE_OK) {\n                LOG_WARN(\"ATGM336H: Could not set Update Frequency\");\n            }\n\n            // Set the NEMA output messages\n            // Ask for only RMC and GGA\n            uint8_t fields[] = {CAS_NEMA_RMC, CAS_NEMA_GGA};\n            for (unsigned int i = 0; i < sizeof(fields); i++) {\n                // Construct a CAS-CFG-MSG packet\n                uint8_t cas_cfg_msg_packet[] = {0x4e, fields[i], 0x01, 0x00};\n                msglen = makeCASPacket(0x06, 0x01, sizeof(cas_cfg_msg_packet), cas_cfg_msg_packet);\n                _serial_gps->write(UBXscratch, msglen);\n                if (getACKCas(0x06, 0x01, 250) != GNSS_RESPONSE_OK) {\n                    LOG_WARN(\"ATGM336H: Could not enable NMEA MSG: %d\", fields[i]);\n                }\n            }\n        } else if (gnssModel == GNSS_MODEL_UC6580) {\n            // The Unicore UC6580 can use a lot of sat systems, enable it to\n            // use GPS L1 & L5 + BDS B1I & B2a + GLONASS L1 + GALILEO E1 & E5a + SBAS + QZSS\n            // This will reset the receiver, so wait a bit afterwards\n            // The paranoid will wait for the OK*04 confirmation response after each command.\n            _serial_gps->write(\"$CFGSYS,h35155\\r\\n\");\n            delay(750);\n            // Must be done after the CFGSYS command\n            // Turn off GSV messages, we don't really care about which and where the sats are, maybe someday.\n            _serial_gps->write(\"$CFGMSG,0,3,0\\r\\n\");\n            delay(250);\n            // Turn off GSA messages, TinyGPS++ doesn't use this message.\n            _serial_gps->write(\"$CFGMSG,0,2,0\\r\\n\");\n            delay(250);\n            // Turn off NOTICE __TXT messages, these may provide Unicore some info but we don't care.\n            _serial_gps->write(\"$CFGMSG,6,0,0\\r\\n\");\n            delay(250);\n            _serial_gps->write(\"$CFGMSG,6,1,0\\r\\n\");\n            delay(250);\n        } else if (IS_ONE_OF(gnssModel, GNSS_MODEL_AG3335, GNSS_MODEL_AG3352)) {\n\n            if (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_IN ||\n                config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_NP_865) {\n                _serial_gps->write(\"$PAIR066,1,0,1,0,0,1*3B\\r\\n\"); // Enable GPS+GALILEO+NAVIC\n                // GPS GLONASS GALILEO BDS QZSS NAVIC\n                //  1    0       1      0   0    1\n            } else {\n                _serial_gps->write(\"$PAIR066,1,1,1,1,0,0*3A\\r\\n\"); // Enable GPS+GLONASS+GALILEO+BDS\n                // GPS GLONASS GALILEO BDS QZSS NAVIC\n                //  1    1       1      1   0    0\n            }\n            // Configure NMEA (sentences will output once per fix)\n            _serial_gps->write(\"$PAIR062,0,1*3F\\r\\n\"); // GGA ON\n            _serial_gps->write(\"$PAIR062,1,0*3F\\r\\n\"); // GLL OFF\n            _serial_gps->write(\"$PAIR062,2,0*3C\\r\\n\"); // GSA OFF\n            _serial_gps->write(\"$PAIR062,3,0*3D\\r\\n\"); // GSV OFF\n            _serial_gps->write(\"$PAIR062,4,1*3B\\r\\n\"); // RMC ON\n            _serial_gps->write(\"$PAIR062,5,0*3B\\r\\n\"); // VTG OFF\n            _serial_gps->write(\"$PAIR062,6,0*38\\r\\n\"); // ZDA ON\n\n            delay(250);\n            _serial_gps->write(\"$PAIR513*3D\\r\\n\"); // save configuration\n        } else if (gnssModel == GNSS_MODEL_UBLOX6) {\n            clearBuffer();\n            SEND_UBX_PACKET(0x06, 0x02, _message_DISABLE_TXT_INFO, \"disable text info messages\", 500);\n            SEND_UBX_PACKET(0x06, 0x39, _message_JAM_6_7, \"enable interference resistance\", 500);\n            SEND_UBX_PACKET(0x06, 0x23, _message_NAVX5, \"configure NAVX5 settings\", 500);\n\n            // Turn off unwanted NMEA messages, set update rate\n            SEND_UBX_PACKET(0x06, 0x08, _message_1HZ, \"set GPS update rate\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GLL, \"disable NMEA GLL\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GSA, \"enable NMEA GSA\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GSV, \"disable NMEA GSV\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_VTG, \"disable NMEA VTG\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_RMC, \"enable NMEA RMC\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GGA, \"enable NMEA GGA\", 500);\n\n            clearBuffer();\n            SEND_UBX_PACKET(0x06, 0x11, _message_CFG_RXM_ECO, \"enable powersave ECO mode for Neo-6\", 500);\n            SEND_UBX_PACKET(0x06, 0x3B, _message_CFG_PM2, \"enable powersave details for GPS\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_AID, \"disable UBX-AID\", 500);\n\n            msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE);\n            _serial_gps->write(UBXscratch, msglen);\n            if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) {\n                LOG_WARN(\"Unable to save GNSS module config\");\n            } else {\n                LOG_INFO(\"GNSS module config saved!\");\n            }\n        } else if (IS_ONE_OF(gnssModel, GNSS_MODEL_UBLOX7, GNSS_MODEL_UBLOX8, GNSS_MODEL_UBLOX9)) {\n            if (gnssModel == GNSS_MODEL_UBLOX7) {\n                LOG_DEBUG(\"Set GPS+SBAS\");\n                msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_7), _message_GNSS_7);\n                _serial_gps->write(UBXscratch, msglen);\n            } else { // 8,9\n                msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_8), _message_GNSS_8);\n                _serial_gps->write(UBXscratch, msglen);\n            }\n\n            if (getACK(0x06, 0x3e, 800) == GNSS_RESPONSE_NAK) {\n                // It's not critical if the module doesn't acknowledge this configuration.\n                LOG_DEBUG(\"reconfigure GNSS - defaults maintained. Is this module GPS-only?\");\n            } else {\n                if (gnssModel == GNSS_MODEL_UBLOX7) {\n                    LOG_INFO(\"GPS+SBAS configured\");\n                } else { // 8,9\n                    LOG_INFO(\"GPS+SBAS+GLONASS+Galileo configured\");\n                }\n                // Documentation say, we need wait at least 0.5s after reconfiguration of GNSS module, before sending next\n                // commands for the M8 it tends to be more... 1 sec should be enough ;>)\n                delay(1000);\n            }\n\n            // Disable Text Info messages //6,7,8,9\n            clearBuffer();\n            SEND_UBX_PACKET(0x06, 0x02, _message_DISABLE_TXT_INFO, \"disable text info messages\", 500);\n\n            if (gnssModel == GNSS_MODEL_UBLOX8) { // 8\n                clearBuffer();\n                SEND_UBX_PACKET(0x06, 0x39, _message_JAM_8, \"enable interference resistance\", 500);\n\n                clearBuffer();\n                SEND_UBX_PACKET(0x06, 0x23, _message_NAVX5_8, \"configure NAVX5_8 settings\", 500);\n            } else { // 6,7,9\n                SEND_UBX_PACKET(0x06, 0x39, _message_JAM_6_7, \"enable interference resistance\", 500);\n                SEND_UBX_PACKET(0x06, 0x23, _message_NAVX5, \"configure NAVX5 settings\", 500);\n            }\n            // Turn off unwanted NMEA messages, set update rate\n            SEND_UBX_PACKET(0x06, 0x08, _message_1HZ, \"set GPS update rate\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GLL, \"disable NMEA GLL\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GSA, \"enable NMEA GSA\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GSV, \"disable NMEA GSV\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_VTG, \"disable NMEA VTG\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_RMC, \"enable NMEA RMC\", 500);\n            SEND_UBX_PACKET(0x06, 0x01, _message_GGA, \"enable NMEA GGA\", 500);\n\n            if (ublox_info.protocol_version >= 18) {\n                clearBuffer();\n                SEND_UBX_PACKET(0x06, 0x86, _message_PMS, \"enable powersave for GPS\", 500);\n                SEND_UBX_PACKET(0x06, 0x3B, _message_CFG_PM2, \"enable powersave details for GPS\", 500);\n\n                // For M8 we want to enable NMEA version 4.10 so we can see the additional sats.\n                if (gnssModel == GNSS_MODEL_UBLOX8) {\n                    clearBuffer();\n                    SEND_UBX_PACKET(0x06, 0x17, _message_NMEA, \"enable NMEA 4.10\", 500);\n                }\n            } else {\n                SEND_UBX_PACKET(0x06, 0x11, _message_CFG_RXM_PSM, \"enable powersave mode for GPS\", 500);\n                SEND_UBX_PACKET(0x06, 0x3B, _message_CFG_PM2, \"enable powersave details for GPS\", 500);\n            }\n\n            msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE);\n            _serial_gps->write(UBXscratch, msglen);\n            if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) {\n                LOG_WARN(\"Unable to save GNSS module config\");\n            } else {\n                LOG_INFO(\"GNSS module configuration saved!\");\n            }\n        } else if (gnssModel == GNSS_MODEL_UBLOX10) {\n            delay(1000);\n            clearBuffer();\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_NMEA_RAM, \"disable NMEA messages in M10 RAM\", 300);\n            delay(750);\n            clearBuffer();\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_NMEA_BBR, \"disable NMEA messages in M10 BBR\", 300);\n            delay(750);\n            clearBuffer();\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_TXT_INFO_RAM, \"disable Info messages for M10 GPS RAM\", 300);\n            delay(750);\n            // Next disable Info txt messages in BBR layer\n            clearBuffer();\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_TXT_INFO_BBR, \"disable Info messages for M10 GPS BBR\", 300);\n            delay(750);\n            // Do M10 configuration for Power Management.\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_PM_RAM, \"enable powersave for M10 GPS RAM\", 300);\n            delay(750);\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_PM_BBR, \"enable powersave for M10 GPS BBR\", 300);\n            delay(750);\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ITFM_RAM, \"enable jam detection M10 GPS RAM\", 300);\n            delay(750);\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ITFM_BBR, \"enable jam detection M10 GPS BBR\", 300);\n            delay(750);\n            // Here is where the init commands should go to do further M10 initialization.\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_SBAS_RAM, \"disable SBAS M10 GPS RAM\", 300);\n            delay(750); // will cause a receiver restart so wait a bit\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_DISABLE_SBAS_BBR, \"disable SBAS M10 GPS BBR\", 300);\n            delay(750); // will cause a receiver restart so wait a bit\n\n            // Done with initialization, Now enable wanted NMEA messages in BBR layer so they will survive a periodic\n            // sleep.\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ENABLE_NMEA_BBR, \"enable messages for M10 GPS BBR\", 300);\n            delay(750);\n            // Next enable wanted NMEA messages in RAM layer\n            SEND_UBX_PACKET(0x06, 0x8A, _message_VALSET_ENABLE_NMEA_RAM, \"enable messages for M10 GPS RAM\", 500);\n            delay(750);\n\n            // As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR.\n            // BBR will survive a restart, and power off for a while, but modules with small backup\n            // batteries or super caps will not retain the config for a long power off time.\n            msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE_10), _message_SAVE_10);\n            _serial_gps->write(UBXscratch, msglen);\n            if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) {\n                LOG_WARN(\"Unable to save GNSS module config\");\n            } else {\n                LOG_INFO(\"GNSS module configuration saved!\");\n            }\n        } else if (gnssModel == GNSS_MODEL_CM121) {\n            // only ask for RMC and GGA\n            // enable GGA\n            _serial_gps->write(\"$CFGMSG,0,0,1,1*1B\\r\\n\");\n            delay(250);\n            // enable RMC\n            _serial_gps->write(\"$CFGMSG,0,4,1,1*1F\\r\\n\");\n            delay(250);\n        }\n        didSerialInit = true;\n    }\n\n    notifyDeepSleepObserver.observe(&notifyDeepSleep);\n\n    return true;\n}\n\nGPS::~GPS()\n{\n    // we really should unregister our sleep observer\n    notifyDeepSleepObserver.unobserve(&notifyDeepSleep);\n}\n\n// Put the GPS hardware into a specified state\nvoid GPS::setPowerState(GPSPowerState newState, uint32_t sleepTime)\n{\n    // Update the stored GPSPowerstate, and create local copies\n    GPSPowerState oldState = powerState;\n    powerState = newState;\n    LOG_INFO(\"GPS power state move from %s to %s\", getGPSPowerStateString(oldState), getGPSPowerStateString(newState));\n\n    switch (newState) {\n    case GPS_ACTIVE:\n    case GPS_IDLE:\n        if (oldState == GPS_ACTIVE || oldState == GPS_IDLE) // If hardware already awake, no changes needed\n            break;\n        if (oldState != GPS_ACTIVE && oldState != GPS_IDLE) // If hardware just waking now, clear buffer\n            clearBuffer();\n        powerMon->setState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing)\n        writePinEN(true);                                         // Power (EN pin): on\n        setPowerPMU(true);                                        // Power (PMU): on\n        writePinStandby(false);                                   // Standby (pin): awake (not standby)\n        setPowerUBLOX(true);                                      // Standby (UBLOX): awake\n        break;\n\n    case GPS_SOFTSLEEP:\n        powerMon->clearState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing)\n        writePinEN(true);                                           // Power (EN pin): on\n        setPowerPMU(true);                                          // Power (PMU): on\n        writePinStandby(true);                                      // Standby (pin): asleep (not awake)\n        setPowerUBLOX(false, sleepTime);                            // Standby (UBLOX): asleep, timed\n        break;\n\n    case GPS_HARDSLEEP:\n        powerMon->clearState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing)\n        writePinEN(false);                                          // Power (EN pin): off\n        setPowerPMU(false);                                         // Power (PMU): off\n        writePinStandby(true);                                      // Standby (pin): asleep (not awake)\n        setPowerUBLOX(false, sleepTime);                            // Standby (UBLOX): asleep, timed\n#ifdef GNSS_AIROHA\n        digitalWrite(PIN_GPS_EN, LOW);\n#endif\n        break;\n\n    case GPS_OFF:\n        assert(sleepTime == 0);                                     // This is an indefinite sleep\n        powerMon->clearState(meshtastic_PowerMon_State_GPS_Active); // Report change for power monitoring (during testing)\n        writePinEN(false);                                          // Power (EN pin): off\n        setPowerPMU(false);                                         // Power (PMU): off\n        writePinStandby(true);                                      // Standby (pin): asleep\n        setPowerUBLOX(false, 0);                                    // Standby (UBLOX): asleep, indefinitely\n#ifdef GNSS_AIROHA\n        digitalWrite(PIN_GPS_EN, LOW);\n#endif\n        break;\n    }\n}\n\n// Set power with EN pin, if relevant\nvoid GPS::writePinEN(bool on)\n{\n    // Abort: if conflict with Canned Messages when using Wisblock(?)\n    if ((HW_VENDOR == meshtastic_HardwareModel_RAK4631 || HW_VENDOR == meshtastic_HardwareModel_WISMESH_TAP) &&\n        (rotaryEncoderInterruptImpl1 || upDownInterruptImpl1))\n        return;\n\n    // Write and log\n    enablePin->set(on);\n#ifdef GPS_DEBUG\n    LOG_DEBUG(\"Pin EN %s\", on == HIGH ? \"HI\" : \"LOW\");\n#endif\n}\n\n// Set the value of the STANDBY pin, if relevant\n// true for standby state, false for awake\nvoid GPS::writePinStandby(bool standby)\n{\n#ifdef PIN_GPS_STANDBY // Specifically the standby pin for L76B, L76K and clones\n    bool val;\n    if (standby)\n        val = GPS_STANDBY_ACTIVE;\n    else\n        val = !GPS_STANDBY_ACTIVE;\n\n    // Write and log\n    pinMode(PIN_GPS_STANDBY, OUTPUT);\n    digitalWrite(PIN_GPS_STANDBY, val);\n\n    // Enter backup mode on PA1010D; TODO: may be applicable to other MTK GPS too\n    if (IS_ONE_OF(gnssModel, GNSS_MODEL_MTK_PA1010D)) {\n        _serial_gps->write(\"$PMTK225,4*2F\\r\\n\");\n    }\n\n#ifdef GPS_DEBUG\n    LOG_DEBUG(\"Pin STANDBY %s\", val == HIGH ? \"HI\" : \"LOW\");\n#endif\n#endif\n}\n\n// Enable / Disable GPS with PMU, if present\nvoid GPS::setPowerPMU(bool on)\n{\n    // We only have PMUs on the T-Beam, and that board has a tiny battery to save GPS ephemera,\n    // so treat as a standby.\n#ifdef HAS_PMU\n    // Abort: if no PMU\n    if (!pmu_found)\n        return;\n\n    // Abort: if PMU not initialized\n    if (!PMU)\n        return;\n\n    uint8_t model = PMU->getChipModel();\n    if (model == XPOWERS_AXP2101) {\n        if (HW_VENDOR == meshtastic_HardwareModel_TBEAM) {\n            // t-beam v1.2 GNSS power channel\n            on ? PMU->enablePowerOutput(XPOWERS_ALDO3) : PMU->disablePowerOutput(XPOWERS_ALDO3);\n        } else if (HW_VENDOR == meshtastic_HardwareModel_LILYGO_TBEAM_S3_CORE) {\n            // t-beam-s3-core GNSS power channel\n            on ? PMU->enablePowerOutput(XPOWERS_ALDO4) : PMU->disablePowerOutput(XPOWERS_ALDO4);\n        } else if (HW_VENDOR == meshtastic_HardwareModel_T_WATCH_S3) {\n            // t-watch-s3-plus GNSS power channel\n            on ? PMU->enablePowerOutput(XPOWERS_BLDO1) : PMU->disablePowerOutput(XPOWERS_BLDO1);\n        }\n    } else if (model == XPOWERS_AXP192) {\n        // t-beam v1.1 GNSS  power channel\n        on ? PMU->enablePowerOutput(XPOWERS_LDO3) : PMU->disablePowerOutput(XPOWERS_LDO3);\n    }\n#ifdef GPS_DEBUG\n    LOG_DEBUG(\"PMU %s\", on ? \"on\" : \"off\");\n#endif\n#endif\n}\n\n// Set UBLOX power, if relevant\nvoid GPS::setPowerUBLOX(bool on, uint32_t sleepMs)\n{\n    // Abort: if not UBLOX hardware\n    if (!IS_ONE_OF(gnssModel, GNSS_MODEL_UBLOX6, GNSS_MODEL_UBLOX7, GNSS_MODEL_UBLOX8, GNSS_MODEL_UBLOX9, GNSS_MODEL_UBLOX10))\n        return;\n\n    // If waking\n    if (on) {\n        gps->_serial_gps->write(0xFF);\n        clearBuffer(); // This often returns old data, so drop it\n    }\n\n    // If putting to sleep\n    else {\n        uint8_t msglen;\n\n        // If we're being asked to sleep indefinitely, make *sure* we're awake first, to process the new sleep command\n        if (sleepMs == 0) {\n            setPowerUBLOX(true);\n            delay(500);\n        }\n\n        // Determine hardware version\n        if (gnssModel != GNSS_MODEL_UBLOX10) {\n            // Encode the sleep time in millis into the packet\n            for (int i = 0; i < 4; i++)\n                _message_PMREQ[0 + i] = sleepMs >> (i * 8);\n\n            // Record the message length\n            msglen = gps->makeUBXPacket(0x02, 0x41, sizeof(_message_PMREQ), _message_PMREQ);\n        } else {\n            // Encode the sleep time in millis into the packet\n            for (int i = 0; i < 4; i++)\n                _message_PMREQ_10[4 + i] = sleepMs >> (i * 8);\n\n            // Record the message length\n            msglen = gps->makeUBXPacket(0x02, 0x41, sizeof(_message_PMREQ_10), _message_PMREQ_10);\n        }\n\n        // Send the UBX packet\n        gps->_serial_gps->write(gps->UBXscratch, msglen);\n#ifdef GPS_DEBUG\n        LOG_DEBUG(\"UBLOX: sleep for %dmS\", sleepMs);\n#endif\n    }\n}\n\n/// Record that we have a GPS\nvoid GPS::setConnected()\n{\n    if (!hasGPS) {\n        hasGPS = true;\n        shouldPublish = true;\n    }\n}\n\n// We want a GPS lock. Wake the hardware\nvoid GPS::up()\n{\n    scheduling.informSearching();\n    setPowerState(GPS_ACTIVE);\n}\n\n// We've got a GPS lock. Enter a low power state, potentially.\nvoid GPS::down()\n{\n    scheduling.informGotLock();\n    uint32_t predictedSearchDuration = scheduling.predictedSearchDurationMs();\n    uint32_t sleepTime = scheduling.msUntilNextSearch();\n    uint32_t updateInterval = Default::getConfiguredOrDefaultMs(config.position.gps_update_interval);\n\n    LOG_DEBUG(\"%us until next search\", sleepTime / 1000);\n\n    // If update interval less than 10 seconds, no attempt to sleep\n    if (updateInterval <= GPS_UPDATE_ALWAYS_ON_THRESHOLD_MS || sleepTime == 0)\n        setPowerState(GPS_IDLE);\n\n    else {\n// Check whether the GPS hardware is capable of GPS_SOFTSLEEP\n// If not, fallback to GPS_HARDSLEEP instead\n#ifdef PIN_GPS_STANDBY // L76B, L76K and clones have a standby pin\n        bool softsleepSupported = true;\n#else\n        bool softsleepSupported = false;\n#endif\n        // U-blox is supported via PMREQ\n        if (IS_ONE_OF(gnssModel, GNSS_MODEL_UBLOX6, GNSS_MODEL_UBLOX7, GNSS_MODEL_UBLOX8, GNSS_MODEL_UBLOX9, GNSS_MODEL_UBLOX10))\n            softsleepSupported = true;\n\n        if (softsleepSupported) {\n            // How long does gps_update_interval need to be, for GPS_HARDSLEEP to become more efficient than\n            // GPS_SOFTSLEEP? Heuristic equation. A compromise manually fitted to power observations from U-blox NEO-6M\n            // and M10050 https://www.desmos.com/calculator/6gvjghoumr This is not particularly accurate, but probably an\n            // improvement over a single, fixed threshold\n            uint32_t hardsleepThreshold = (2750 * pow(predictedSearchDuration / 1000, 1.22));\n            LOG_DEBUG(\"gps_update_interval >= %us needed to justify hardsleep\", hardsleepThreshold / 1000);\n\n            // If update interval too short: softsleep (if supported by hardware)\n            if (updateInterval < hardsleepThreshold) {\n                setPowerState(GPS_SOFTSLEEP, sleepTime);\n                return;\n            }\n        }\n        // If update interval long enough (or softsleep unsupported): hardsleep instead\n        setPowerState(GPS_HARDSLEEP, sleepTime);\n        // Reset the fix quality to 0, since we're off.\n        fixQual = 0;\n    }\n}\n\nvoid GPS::publishUpdate()\n{\n    if (shouldPublish) {\n        shouldPublish = false;\n\n        // In debug logs, identify position by @timestamp:stage (stage 2 = publish)\n        LOG_DEBUG(\"Publish pos@%x:2, hasVal=%d, Sats=%d, GPSlock=%d\", p.timestamp, hasValidLocation, p.sats_in_view, hasLock());\n\n        // Notify any status instances that are observing us\n        const meshtastic::GPSStatus status = meshtastic::GPSStatus(hasValidLocation, isConnected(), isPowerSaving(), p);\n        newStatus.notifyObservers(&status);\n        if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n            positionModule->handleNewPosition();\n        }\n    }\n}\n\nint32_t GPS::runOnce()\n{\n    if (!GPSInitFinished) {\n        if (!_serial_gps || config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT) {\n            LOG_INFO(\"GPS set to not-present. Skip probe\");\n            return disable();\n        }\n        if (!setup())\n            return currentDelay; // Setup failed, re-run in two seconds\n\n        // We have now loaded our saved preferences from flash\n        if (config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n            return disable();\n        }\n        GPSInitFinished = true;\n        publishUpdate();\n    }\n\n    // ======================== GPS_ACTIVE state ========================\n    // In GPS_ACTIVE state, GPS is powered on and we're receiving NMEA messages.\n    // We use the following logic to determine when to update the local position\n    // or time by running GPS::publishUpdate.\n    // Note: Local position update is asynchronous to position broadcast. We\n    // generally run this state every gps_update_interval seconds, and in most cases\n    // gps_update_interval is faster than the position broadcast interval so there's a\n    // fresh position ready when the device wants to broadcast one on the mesh.\n    //\n    // 1. Got a time for the first time --> set the time, don't publish.\n    // 2. Got a lock for the first time\n    //   --> If gps_update_interval is <= 10s --> publishUpdate\n    //   --> Otherwise, hold for MIN(gps_update_interval - GPS_UPDATE_ALWAYS_ON_THRESHOLD_MS, 20s)\n    //  3. Got a lock after turning back on\n    //   --> If gps_update_interval is <= 10s --> publishUpdate\n    //   --> Otherwise, hold for MIN(gps_update_interval - GPS_UPDATE_ALWAYS_ON_THRESHOLD_MS, 20s)\n    // 4. Hold has expired\n    //   --> If we have a time and a location --> publishUpdate\n    //   --> down()\n    // 5. Search time has expired\n    //   --> If we have a time and a location --> publishUpdate\n    //   --> If we had a location before but don't now --> publishUpdate\n    //   --> down()\n    if (whileActive()) {\n        // if we have received valid NMEA claim we are connected\n        setConnected();\n    }\n\n    // If we're due for an update, wake the GPS\n    if (!config.position.fixed_position && powerState != GPS_ACTIVE && scheduling.isUpdateDue())\n        up();\n\n    // quality of the previous fix. We set it to 0 when we go down, so it's a way\n    // to check if we're getting a lock after being GPS_OFF.\n    uint8_t prev_fixQual = fixQual;\n\n    if (powerState == GPS_ACTIVE) {\n        // if gps_update_interval is <=10s, GPS never goes off, so we treat that differently\n        uint32_t updateInterval = Default::getConfiguredOrDefaultMs(config.position.gps_update_interval);\n\n        // 1. Got a time for the first time\n        bool gotTime = (getRTCQuality() >= RTCQualityGPS);\n        if (!gotTime && lookForTime()) { // Note: we count on this && short-circuiting and not resetting the RTC time\n            gotTime = true;\n        }\n\n        // 2. Got a lock for the first time, or 3. Got a lock after turning back on\n        bool gotLoc = lookForLocation();\n        if (gotLoc) {\n#ifdef GPS_DEBUG\n            if (!hasValidLocation) { // declare that we have location ASAP\n                LOG_DEBUG(\"hasValidLocation RISING EDGE\");\n            }\n#endif\n            if (updateInterval <= GPS_UPDATE_ALWAYS_ON_THRESHOLD_MS) {\n                hasValidLocation = true;\n                shouldPublish = true;\n            } else if (!hasValidLocation || prev_fixQual == 0 || (fixHoldEnds + GPS_THREAD_INTERVAL) < millis()) {\n                hasValidLocation = true;\n                // Hold for up to 20secs after getting a lock to download ephemeris etc\n                uint32_t holdTime = updateInterval - GPS_UPDATE_ALWAYS_ON_THRESHOLD_MS;\n                if (holdTime > GPS_FIX_HOLD_MAX_MS)\n                    holdTime = GPS_FIX_HOLD_MAX_MS;\n                fixHoldEnds = millis() + holdTime;\n#ifdef GPS_DEBUG\n                LOG_DEBUG(\"Holding for %ums after lock\", holdTime);\n#endif\n            }\n        }\n\n        bool tooLong = scheduling.searchedTooLong();\n        if (tooLong && !gotLoc) {\n            LOG_WARN(\"Couldn't publish a valid location: didn't get a GPS lock in time\");\n            // we didn't get a location during this ack window, therefore declare loss of lock\n            if (hasValidLocation) {\n                p = meshtastic_Position_init_default;\n                hasValidLocation = false;\n                shouldPublish = true;\n#ifdef GPS_DEBUG\n                LOG_DEBUG(\"hasValidLocation FALLING EDGE\");\n#endif\n            }\n        }\n\n        // Hold has expired , Search time has expired, we got a time only, or we never needed to hold.\n        bool holdExpired = (fixHoldEnds != 0 && millis() > fixHoldEnds);\n        if (shouldPublish || tooLong || holdExpired) {\n            if (gotTime && hasValidLocation) {\n                shouldPublish = true;\n            }\n            if (shouldPublish) {\n                fixHoldEnds = 0;\n                publishUpdate();\n            }\n\n            // There's a chance we just got a time, so keep going to see if we can get a location too\n            if (tooLong || holdExpired) {\n                down();\n            }\n\n#ifdef GPS_DEBUG\n        } else if (fixHoldEnds != 0) {\n            LOG_DEBUG(\"Holding for GPS data download: %d ms (numSats=%d)\", fixHoldEnds - millis(), p.sats_in_view);\n#endif\n        }\n    }\n    // ===================== end GPS_ACTIVE state ========================\n\n    if (config.position.fixed_position == true && hasValidLocation)\n        return disable(); // This should trigger when we have a fixed position, and get that first position\n\n    // 9600bps is approx 1 byte per msec, so considering our buffer size we never need to wake more often than 200ms\n    // if not awake we can run super infrequently (once every 5 secs?) to see if we need to wake.\n    return (powerState == GPS_ACTIVE) ? GPS_THREAD_INTERVAL : 5000;\n}\n\n// clear the GPS rx/tx buffer as quickly as possible\nvoid GPS::clearBuffer()\n{\n#ifdef ARCH_ESP32\n    _serial_gps->flush(false);\n#else\n    int x = _serial_gps->available();\n    while (x--)\n        _serial_gps->read();\n#endif\n}\n\n/// Prepare the GPS for the cpu entering deep or light sleep, expect to be gone for at least 100s of msecs\nint GPS::prepareDeepSleep(void *unused)\n{\n    LOG_INFO(\"GPS deep sleep!\");\n    disable();\n    return 0;\n}\n\nstatic const char *PROBE_MESSAGE = \"Trying %s (%s)...\";\nstatic const char *DETECTED_MESSAGE = \"%s detected\";\n\n#define PROBE_SIMPLE(CHIP, TOWRITE, RESPONSE, DRIVER, TIMEOUT, ...)                                                              \\\n    do {                                                                                                                         \\\n        LOG_DEBUG(PROBE_MESSAGE, TOWRITE, CHIP);                                                                                 \\\n        clearBuffer();                                                                                                           \\\n        _serial_gps->write(TOWRITE \"\\r\\n\");                                                                                      \\\n        if (getACK(RESPONSE, TIMEOUT) == GNSS_RESPONSE_OK) {                                                                     \\\n            LOG_INFO(DETECTED_MESSAGE, CHIP);                                                                                    \\\n            return DRIVER;                                                                                                       \\\n        }                                                                                                                        \\\n    } while (0)\n\n#define PROBE_FAMILY(FAMILY_NAME, COMMAND, RESPONSE_MAP, TIMEOUT)                                                                \\\n    do {                                                                                                                         \\\n        LOG_DEBUG(PROBE_MESSAGE, COMMAND, FAMILY_NAME);                                                                          \\\n        clearBuffer();                                                                                                           \\\n        _serial_gps->write(COMMAND \"\\r\\n\");                                                                                      \\\n        GnssModel_t detectedDriver = getProbeResponse(TIMEOUT, RESPONSE_MAP, serialSpeed);                                       \\\n        if (detectedDriver != GNSS_MODEL_UNKNOWN) {                                                                              \\\n            return detectedDriver;                                                                                               \\\n        }                                                                                                                        \\\n    } while (0)\n\nGnssModel_t GPS::probe(int serialSpeed)\n{\n    uint8_t buffer[768] = {0};\n\n    switch (currentStep) {\n    case 0: {\n#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)\n        _serial_gps->end();\n        _serial_gps->begin(serialSpeed);\n#elif defined(ARCH_RP2040)\n        _serial_gps->end();\n        _serial_gps->setFIFOSize(256);\n        _serial_gps->begin(serialSpeed);\n#else\n        if (_serial_gps->baudRate() != serialSpeed) {\n            LOG_DEBUG(\"Set GPS Baud to %i\", serialSpeed);\n            _serial_gps->updateBaudRate(serialSpeed);\n        }\n#endif\n\n        memset(&ublox_info, 0, sizeof(ublox_info));\n        delay(100);\n\n#if defined(PIN_GPS_RESET) && PIN_GPS_RESET != -1\n        digitalWrite(PIN_GPS_RESET, GPS_RESET_MODE); // assert for 10ms\n        delay(10);\n        digitalWrite(PIN_GPS_RESET, !GPS_RESET_MODE);\n\n        // attempt to detect the chip based on boot messages\n        std::vector<ChipInfo> passive_detect = {\n            {\"AG3335\", \"$PAIR021,AG3335\", GNSS_MODEL_AG3335},\n            {\"AG3352\", \"$PAIR021,AG3352\", GNSS_MODEL_AG3352},\n            {\"RYS3520\", \"$PAIR021,REYAX_RYS3520_V2\", GNSS_MODEL_AG3352},\n            {\"UC6580\", \"UC6580\", GNSS_MODEL_UC6580},\n            // as L76K is sort of a last ditch effort, we won't attempt to detect it by startup messages for now.\n            /*{\"L76K\", \"SW=URANUS\", GNSS_MODEL_MTK}*/};\n        GnssModel_t detectedDriver = getProbeResponse(500, passive_detect, serialSpeed);\n        if (detectedDriver != GNSS_MODEL_UNKNOWN) {\n            return detectedDriver;\n        }\n#endif\n        // Close all NMEA sentences, valid for L76K, ATGM336H (and likely other AT6558 devices)\n        _serial_gps->write(\"$PCAS03,0,0,0,0,0,0,0,0,0,0,,,0,0*02\\r\\n\");\n        delay(20);\n        // Close NMEA sequences on Ublox\n        _serial_gps->write(\"$PUBX,40,GLL,0,0,0,0,0,0*5C\\r\\n\");\n        _serial_gps->write(\"$PUBX,40,GSV,0,0,0,0,0,0*59\\r\\n\");\n        _serial_gps->write(\"$PUBX,40,VTG,0,0,0,0,0,0*5E\\r\\n\");\n        delay(20);\n        // Close NMEA sequences on CM121\n        _serial_gps->write(\"$CFGMSG,0,1,0,1*1B\\r\\n\");\n        _serial_gps->write(\"$CFGMSG,0,2,0,1*18\\r\\n\");\n        _serial_gps->write(\"$CFGMSG,0,3,0,1*19\\r\\n\");\n        currentDelay = 20;\n        currentStep = 1;\n        return GNSS_MODEL_UNKNOWN;\n    }\n    case 1: {\n\n        // Unicore UFirebirdII Series: UC6580, UM620, UM621, UM670A, UM680A, or UM681A,or CM121\n        std::vector<ChipInfo> unicore = {\n            {\"UC6580\", \"UC6580\", GNSS_MODEL_UC6580}, {\"UM600\", \"UM600\", GNSS_MODEL_UC6580}, {\"CM121\", \"CM121\", GNSS_MODEL_CM121}};\n        PROBE_FAMILY(\"Unicore Family\", \"$PDTINFO\", unicore, 500);\n        currentDelay = 20;\n        currentStep = 2;\n        return GNSS_MODEL_UNKNOWN;\n    }\n    case 2: {\n        std::vector<ChipInfo> atgm = {\n            {\"ATGM336H\", \"$GPTXT,01,01,02,HW=ATGM336H\", GNSS_MODEL_ATGM336H},\n            /* ATGM332D series (-11(GPS), -21(BDS), -31(GPS+BDS), -51(GPS+GLONASS), -71-0(GPS+BDS+GLONASS)) based on AT6558 */\n            {\"ATGM332D\", \"$GPTXT,01,01,02,HW=ATGM332D\", GNSS_MODEL_ATGM336H}};\n        PROBE_FAMILY(\"ATGM33xx Family\", \"$PCAS06,1*1A\", atgm, 500);\n        currentDelay = 20;\n        currentStep = 3;\n        return GNSS_MODEL_UNKNOWN;\n    }\n    case 3: {\n        /* Airoha (Mediatek) AG3335A/M/S, A3352Q, Quectel L89 2.0, SimCom SIM65M */\n        _serial_gps->write(\"$PAIR062,2,0*3C\\r\\n\"); // GSA OFF to reduce volume\n        _serial_gps->write(\"$PAIR062,3,0*3D\\r\\n\"); // GSV OFF to reduce volume\n        _serial_gps->write(\"$PAIR513*3D\\r\\n\");     // save configuration\n        std::vector<ChipInfo> airoha = {{\"AG3335\", \"$PAIR021,AG3335\", GNSS_MODEL_AG3335},\n                                        {\"AG3352\", \"$PAIR021,AG3352\", GNSS_MODEL_AG3352},\n                                        {\"RYS3520\", \"$PAIR021,REYAX_RYS3520_V2\", GNSS_MODEL_AG3352}};\n        PROBE_FAMILY(\"Airoha Family\", \"$PAIR021*39\", airoha, 1000);\n        currentDelay = 20;\n        currentStep = 4;\n        return GNSS_MODEL_UNKNOWN;\n    }\n    case 4: {\n        PROBE_SIMPLE(\"LC86\", \"$PQTMVERNO*58\", \"$PQTMVERNO,LC86\", GNSS_MODEL_AG3352, 500);\n        PROBE_SIMPLE(\"L76K\", \"$PCAS06,0*1B\", \"$GPTXT,01,01,02,SW=\", GNSS_MODEL_MTK, 500);\n        currentDelay = 20;\n        currentStep = 5;\n        return GNSS_MODEL_UNKNOWN;\n    }\n    case 5: {\n\n        // Close all NMEA sentences, valid for MTK3333 and MTK3339 platforms\n        _serial_gps->write(\"$PMTK514,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*2E\\r\\n\");\n        delay(20);\n        std::vector<ChipInfo> mtk = {{\"L76B\", \"Quectel-L76B\", GNSS_MODEL_MTK_L76B}, {\"PA1010D\", \"1010D\", GNSS_MODEL_MTK_PA1010D},\n                                     {\"PA1616S\", \"1616S\", GNSS_MODEL_MTK_PA1616S},  {\"LS20031\", \"MC-1513\", GNSS_MODEL_MTK_L76B},\n                                     {\"L96\", \"Quectel-L96\", GNSS_MODEL_MTK_L76B},   {\"L80-R\", \"_3337_\", GNSS_MODEL_MTK_L76B},\n                                     {\"L80\", \"_3339_\", GNSS_MODEL_MTK_L76B}};\n\n        PROBE_FAMILY(\"MTK Family\", \"$PMTK605*31\", mtk, 500);\n        currentDelay = 20;\n        currentStep = 6;\n        return GNSS_MODEL_UNKNOWN;\n    }\n    case 6: {\n        uint8_t cfg_rate[] = {0xB5, 0x62, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00};\n        UBXChecksum(cfg_rate, sizeof(cfg_rate));\n        clearBuffer();\n        _serial_gps->write(cfg_rate, sizeof(cfg_rate));\n        // Check that the returned response class and message ID are correct\n        GPS_RESPONSE response = getACK(0x06, 0x08, 750);\n        if (response == GNSS_RESPONSE_NONE) {\n            LOG_WARN(\"No GNSS Module (baudrate %d)\", serialSpeed);\n            currentDelay = 2000;\n            currentStep = 0;\n            return GNSS_MODEL_UNKNOWN;\n        } else if (response == GNSS_RESPONSE_FRAME_ERRORS) {\n            LOG_INFO(\"UBlox Frame Errors (baudrate %d)\", serialSpeed);\n        }\n\n        memset(buffer, 0, sizeof(buffer));\n        uint8_t _message_MONVER[8] = {\n            0xB5, 0x62, // Sync message for UBX protocol\n            0x0A, 0x04, // Message class and ID (UBX-MON-VER)\n            0x00, 0x00, // Length of payload (we're asking for an answer, so no payload)\n            0x00, 0x00  // Checksum\n        };\n        //  Get Ublox gnss module hardware and software info\n        UBXChecksum(_message_MONVER, sizeof(_message_MONVER));\n        clearBuffer();\n        _serial_gps->write(_message_MONVER, sizeof(_message_MONVER));\n\n        uint16_t len = getACK(buffer, sizeof(buffer), 0x0A, 0x04, 1200);\n        if (len) {\n            uint16_t position = 0;\n            for (int i = 0; i < 30; i++) {\n                ublox_info.swVersion[i] = buffer[position];\n                position++;\n            }\n            for (int i = 0; i < 10; i++) {\n                ublox_info.hwVersion[i] = buffer[position];\n                position++;\n            }\n\n            while (len >= position + 30) {\n                for (int i = 0; i < 30; i++) {\n                    ublox_info.extension[ublox_info.extensionNo][i] = buffer[position];\n                    position++;\n                }\n                ublox_info.extensionNo++;\n                if (ublox_info.extensionNo > 9)\n                    break;\n            }\n\n            LOG_DEBUG(\"Module Info : \");\n            LOG_DEBUG(\"Soft version: %s\", ublox_info.swVersion);\n            LOG_DEBUG(\"Hard version: %s\", ublox_info.hwVersion);\n            LOG_DEBUG(\"Extensions:%d\", ublox_info.extensionNo);\n            for (int i = 0; i < ublox_info.extensionNo; i++) {\n                LOG_DEBUG(\"  %s\", ublox_info.extension[i]);\n            }\n\n            memset(buffer, 0, sizeof(buffer));\n\n            // tips: extensionNo field is 0 on some 6M GNSS modules\n            for (int i = 0; i < ublox_info.extensionNo; ++i) {\n                if (!strncmp(ublox_info.extension[i], \"MOD=\", 4)) {\n                    strncpy((char *)buffer, &(ublox_info.extension[i][4]), sizeof(buffer));\n                } else if (!strncmp(ublox_info.extension[i], \"PROTVER\", 7)) {\n                    char *ptr = nullptr;\n                    memset(buffer, 0, sizeof(buffer));\n                    strncpy((char *)buffer, &(ublox_info.extension[i][8]), sizeof(buffer));\n                    LOG_DEBUG(\"Protocol Version:%s\", (char *)buffer);\n                    if (strlen((char *)buffer)) {\n                        ublox_info.protocol_version = strtoul((char *)buffer, &ptr, 10);\n                        LOG_DEBUG(\"ProtVer=%d\", ublox_info.protocol_version);\n                    } else {\n                        ublox_info.protocol_version = 0;\n                    }\n                }\n            }\n            if (strncmp(ublox_info.hwVersion, \"00040007\", 8) == 0) {\n                LOG_INFO(DETECTED_MESSAGE, \"U-blox 6\", \"6\");\n                return GNSS_MODEL_UBLOX6;\n            } else if (strncmp(ublox_info.hwVersion, \"00070000\", 8) == 0) {\n                LOG_INFO(DETECTED_MESSAGE, \"U-blox 7\", \"7\");\n                return GNSS_MODEL_UBLOX7;\n            } else if (strncmp(ublox_info.hwVersion, \"00080000\", 8) == 0) {\n                LOG_INFO(DETECTED_MESSAGE, \"U-blox 8\", \"8\");\n                return GNSS_MODEL_UBLOX8;\n            } else if (strncmp(ublox_info.hwVersion, \"00190000\", 8) == 0) {\n                LOG_INFO(DETECTED_MESSAGE, \"U-blox 9\", \"9\");\n                return GNSS_MODEL_UBLOX9;\n            } else if (strncmp(ublox_info.hwVersion, \"000A0000\", 8) == 0) {\n                LOG_INFO(DETECTED_MESSAGE, \"U-blox 10\", \"10\");\n                return GNSS_MODEL_UBLOX10;\n            }\n        }\n    }\n    }\n    LOG_WARN(\"No GNSS Module (baudrate %d)\", serialSpeed);\n    currentDelay = 2000;\n    currentStep = 0;\n    return GNSS_MODEL_UNKNOWN;\n}\n\nGnssModel_t GPS::getProbeResponse(unsigned long timeout, const std::vector<ChipInfo> &responseMap, int serialSpeed)\n{\n    // Calculate buffer size based on baud rate - 256 bytes for 9600 baud as baseline\n    // Higher baud rates get proportionally larger buffers to handle more data\n    int bufferSize = (serialSpeed * 256) / 9600;\n    // Clamp buffer size between reasonable limits\n    if (bufferSize < 128)\n        bufferSize = 128;\n    if (bufferSize > 2048)\n        bufferSize = 2048;\n\n    auto response = std::unique_ptr<char[]>(new char[bufferSize]); // Dynamically allocate based on baud rate\n    uint16_t responseLen = 0;\n    unsigned long start = millis();\n    while (millis() - start < timeout) {\n        if (_serial_gps->available()) {\n            char c = _serial_gps->read();\n\n            // Add char to buffer if there's space\n            if (responseLen < bufferSize - 1) {\n                response[responseLen++] = c;\n                response[responseLen] = '\\0';\n            }\n\n            if (c == ',' || (responseLen >= 2 && response[responseLen - 2] == '\\r' && response[responseLen - 1] == '\\n')) {\n                // check if we can see our chips\n                for (const auto &chipInfo : responseMap) {\n                    if (strstr(response.get(), chipInfo.detectionString.c_str()) != nullptr) {\n#ifdef GPS_DEBUG\n                        LOG_DEBUG(response.get());\n#endif\n                        LOG_INFO(\"%s detected\", chipInfo.chipName.c_str());\n                        return chipInfo.driver;\n                    }\n                }\n            }\n            if (responseLen >= 2 && response[responseLen - 2] == '\\r' && response[responseLen - 1] == '\\n') {\n#ifdef GPS_DEBUG\n                LOG_DEBUG(response.get());\n#endif\n                // Reset the response buffer for the next potential message\n                responseLen = 0;\n                response[0] = '\\0';\n            }\n        }\n    }\n#ifdef GPS_DEBUG\n    LOG_DEBUG(response.get());\n#endif\n    return GNSS_MODEL_UNKNOWN; // Return unknown on timeout\n}\n\nstd::unique_ptr<GPS> GPS::createGps()\n{\n    int8_t _rx_gpio = config.position.rx_gpio;\n    int8_t _tx_gpio = config.position.tx_gpio;\n    int8_t _en_gpio = config.position.gps_en_gpio;\n\n#if defined(GPS_RX_PIN)\n    if (!_rx_gpio)\n        _rx_gpio = GPS_RX_PIN;\n#endif\n#if defined(GPS_TX_PIN)\n    if (!_tx_gpio)\n        _tx_gpio = GPS_TX_PIN;\n#endif\n#if defined(PIN_GPS_EN)\n    if (!_en_gpio)\n        _en_gpio = PIN_GPS_EN;\n#endif\n#ifdef ARCH_PORTDUINO\n    if (!portduino_config.has_gps)\n        return nullptr;\n#endif\n    if (!_rx_gpio || !_serial_gps) // Configured to have no GPS at all\n        return nullptr;\n\n    auto new_gps = std::unique_ptr<GPS>(new GPS());\n    new_gps->rx_gpio = _rx_gpio;\n    new_gps->tx_gpio = _tx_gpio;\n\n    GpioVirtPin *virtPin = new GpioVirtPin();\n    new_gps->enablePin = virtPin; // Always at least populate a virtual pin\n    if (_en_gpio) {\n        GpioPin *p = new GpioHwPin(_en_gpio);\n\n        if (!GPS_EN_ACTIVE) { // Need to invert the pin before hardware\n            new GpioNotTransformer(\n                virtPin,\n                p); // We just leave this created object on the heap so it can stay watching virtPin and driving en_gpio\n        } else {\n            new GpioUnaryTransformer(\n                virtPin,\n                p); // We just leave this created object on the heap so it can stay watching virtPin and driving en_gpio\n        }\n    }\n\n#ifdef PIN_GPS_PPS\n    // pulse per second\n    pinMode(PIN_GPS_PPS, INPUT);\n#endif\n\n#ifdef PIN_GPS_SWITCH\n    // toggle GPS via external GPIO switch\n    pinMode(PIN_GPS_SWITCH, INPUT);\n    gpsPeriodic = std::unique_ptr<concurrency::Periodic>(new concurrency::Periodic(\"GPSSwitch\", gpsSwitch));\n#endif\n\n// Currently disabled per issue #525 (TinyGPS++ crash bug)\n// when fixed upstream, can be un-disabled to enable 3D FixType and PDOP\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n    // see NMEAGPS.h\n    gsafixtype.begin(reader, NMEA_MSG_GXGSA, 2);\n    gsapdop.begin(reader, NMEA_MSG_GXGSA, 15);\n    LOG_DEBUG(\"Use \" NMEA_MSG_GXGSA \" for 3DFIX and PDOP\");\n#endif\n\n    // Make sure the GPS is awake before performing any init.\n    new_gps->up();\n\n#ifdef PIN_GPS_RESET\n    pinMode(PIN_GPS_RESET, OUTPUT);\n    digitalWrite(PIN_GPS_RESET, !GPS_RESET_MODE);\n#endif\n\n    if (_serial_gps) {\n#ifdef ARCH_ESP32\n        // In esp32 framework, setRxBufferSize needs to be initialized before Serial\n        _serial_gps->setRxBufferSize(SERIAL_BUFFER_SIZE); // the default is 256\n#endif\n\n        LOG_DEBUG(\"Use GPIO%d for GPS RX\", new_gps->rx_gpio);\n        LOG_DEBUG(\"Use GPIO%d for GPS TX\", new_gps->tx_gpio);\n\n//  ESP32 has a special set of parameters vs other arduino ports\n#if defined(ARCH_ESP32)\n        _serial_gps->begin(GPS_BAUDRATE, SERIAL_8N1, new_gps->rx_gpio, new_gps->tx_gpio);\n#elif defined(ARCH_RP2040)\n        _serial_gps->setPinout(new_gps->tx_gpio, new_gps->rx_gpio);\n        _serial_gps->setFIFOSize(256);\n        _serial_gps->begin(GPS_BAUDRATE);\n#elif defined(ARCH_NRF52)\n        _serial_gps->setPins(new_gps->rx_gpio, new_gps->tx_gpio);\n        _serial_gps->begin(GPS_BAUDRATE);\n#elif defined(ARCH_STM32WL)\n        _serial_gps->setTx(new_gps->tx_gpio);\n        _serial_gps->setRx(new_gps->rx_gpio);\n        _serial_gps->begin(GPS_BAUDRATE);\n#elif defined(ARCH_PORTDUINO)\n        // Portduino can't set the GPS pins directly.\n        _serial_gps->begin(GPS_BAUDRATE);\n#else\n#error Unsupported architecture!\n#endif\n    }\n    return new_gps;\n}\n\nstatic int32_t toDegInt(RawDegrees d)\n{\n    int32_t degMult = 10000000; // 1e7\n    int32_t r = d.deg * degMult + d.billionths / 100;\n    if (d.negative)\n        r *= -1;\n    return r;\n}\n\n/**\n * Perform any processing that should be done only while the GPS is awake and looking for a fix.\n * Override this method to check for new locations\n *\n * @return true if we've set a new time\n */\nbool GPS::lookForTime()\n{\n    auto ti = reader.time;\n    auto d = reader.date;\n    if (ti.isValid() && d.isValid()) { // Note: we don't check for updated, because we'll only be called if needed\n        /* Convert to unix time\nThe Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1,\n1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z).\n*/\n        struct tm t;\n        t.tm_sec = ti.second() + round(ti.age() / 1000);\n        t.tm_min = ti.minute();\n        t.tm_hour = ti.hour();\n        t.tm_mday = d.day();\n        t.tm_mon = d.month() - 1;\n        t.tm_year = d.year() - 1900;\n        t.tm_isdst = false;\n        if (t.tm_mon > -1) {\n            if (perhapsSetRTC(RTCQualityGPS, t) == RTCSetResultSuccess) {\n                LOG_DEBUG(\"NMEA GPS time set %02d-%02d-%02d %02d:%02d:%02d age %d\", d.year(), d.month(), t.tm_mday, t.tm_hour,\n                          t.tm_min, t.tm_sec, ti.age());\n                return true;\n            } else {\n                return false;\n            }\n        } else\n            return false;\n    } else\n        return false;\n}\n\n/**\n * Perform any processing that should be done only while the GPS is awake and looking for a fix.\n * Override this method to check for new locations\n *\n * @return true if we've acquired a new location\n */\nbool GPS::lookForLocation()\n{\n    // By default, TinyGPS++ does not parse GPGSA lines, which give us\n    //   the 2D/3D fixType (see NMEAGPS.h)\n    // At a minimum, use the fixQuality indicator in GPGGA (FIXME?)\n    fixQual = reader.fixQuality();\n\n#ifndef TINYGPS_OPTION_NO_STATISTICS\n    if (reader.failedChecksum() > lastChecksumFailCount) {\n// In a GPS_DEBUG build we want to log all of these. In production, we only care if there are many of them.\n#ifndef GPS_DEBUG\n        if (reader.failedChecksum() > 4)\n#endif\n            LOG_WARN(\"%u new GPS checksum failures, for a total of %u\", reader.failedChecksum() - lastChecksumFailCount,\n                     reader.failedChecksum());\n        lastChecksumFailCount = reader.failedChecksum();\n    }\n#endif\n\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n    fixType = atoi(gsafixtype.value()); // will set to zero if no data\n#endif\n\n    // check if GPS has an acceptable lock\n    if (!hasLock())\n        return false;\n\n#ifdef GPS_DEBUG\n    LOG_DEBUG(\"AGE: LOC=%d FIX=%d DATE=%d TIME=%d\", reader.location.age(),\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n              gsafixtype.age(),\n#else\n              0,\n#endif\n              reader.date.age(), reader.time.age());\n#endif // GPS_DEBUG\n\n    // Is this a new point or are we re-reading the previous one?\n    if (!reader.location.isUpdated() && !reader.altitude.isUpdated())\n        return false;\n\n    // check if a complete GPS solution set is available for reading\n    //   tinyGPSDatum::age() also includes isValid() test\n    // FIXME\n    if (!((reader.location.age() < GPS_SOL_EXPIRY_MS) &&\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n          (gsafixtype.age() < GPS_SOL_EXPIRY_MS) &&\n#endif\n          (reader.time.age() < GPS_SOL_EXPIRY_MS) && (reader.date.age() < GPS_SOL_EXPIRY_MS))) {\n        LOG_WARN(\"SOME data is TOO OLD: LOC %u, TIME %u, DATE %u\", reader.location.age(), reader.time.age(), reader.date.age());\n        return false;\n    }\n\n    // We know the solution is fresh and valid, so just read the data\n    auto loc = reader.location.value();\n\n    // Bail out EARLY to avoid overwriting previous good data (like #857)\n    if (toDegInt(loc.lat) > 900000000) {\n#ifdef GPS_DEBUG\n        LOG_DEBUG(\"Bail out EARLY on LAT %i\", toDegInt(loc.lat));\n#endif\n        return false;\n    }\n    if (toDegInt(loc.lng) > 1800000000) {\n#ifdef GPS_DEBUG\n        LOG_DEBUG(\"Bail out EARLY on LNG %i\", toDegInt(loc.lng));\n#endif\n        return false;\n    }\n\n    p.location_source = meshtastic_Position_LocSource_LOC_INTERNAL;\n\n    // Dilution of precision (an accuracy metric) is reported in 10^2 units, so we need to scale down when we use it\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n    p.HDOP = reader.hdop.value();\n    p.PDOP = TinyGPSPlus::parseDecimal(gsapdop.value());\n#else\n    // FIXME! naive PDOP emulation (assumes VDOP==HDOP)\n    // correct formula is PDOP = SQRT(HDOP^2 + VDOP^2)\n    p.HDOP = reader.hdop.value();\n    p.PDOP = 1.41 * reader.hdop.value();\n#endif\n\n    // Discard incomplete or erroneous readings\n    if (reader.hdop.value() == 0) {\n        LOG_WARN(\"BOGUS hdop.value() REJECTED: %d\", reader.hdop.value());\n        return false;\n    }\n\n    p.latitude_i = toDegInt(loc.lat);\n    p.longitude_i = toDegInt(loc.lng);\n\n    p.altitude_geoidal_separation = reader.geoidHeight.meters();\n    p.altitude_hae = reader.altitude.meters() + p.altitude_geoidal_separation;\n    p.altitude = reader.altitude.meters();\n\n    p.fix_quality = fixQual;\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n    p.fix_type = fixType;\n#endif\n\n    // positional timestamp\n    struct tm t;\n    t.tm_sec = reader.time.second();\n    t.tm_min = reader.time.minute();\n    t.tm_hour = reader.time.hour();\n    t.tm_mday = reader.date.day();\n    t.tm_mon = reader.date.month() - 1;\n    t.tm_year = reader.date.year() - 1900;\n    t.tm_isdst = false;\n    p.timestamp = gm_mktime(&t);\n\n    // Nice to have, if available\n    if (reader.satellites.isUpdated()) {\n        p.sats_in_view = reader.satellites.value();\n    }\n\n    if (reader.course.isUpdated() && reader.course.isValid()) {\n        if (reader.course.value() < 36000) { // sanity check\n            p.ground_track =\n                reader.course.value() * 1e3; // Scale the heading (in degrees * 10^-2) to match the expected degrees * 10^-5\n        } else {\n            LOG_WARN(\"BOGUS course.value() REJECTED: %d\", reader.course.value());\n        }\n    }\n\n    if (reader.speed.isUpdated() && reader.speed.isValid()) {\n        p.ground_speed = reader.speed.kmph();\n    }\n\n    return true;\n}\n\nbool GPS::hasLock()\n{\n    // Using GPGGA fix quality indicator\n    if (fixQual >= 1 && fixQual <= 5) {\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n        // Use GPGSA fix type 2D/3D (better) if available\n        if (fixType == 3 || fixType == 0) // zero means \"no data received\"\n#endif\n            return true;\n    }\n\n    return false;\n}\n\nbool GPS::hasFlow()\n{\n    return reader.passedChecksum() > 0;\n}\n\nbool GPS::whileActive()\n{\n    unsigned int charsInBuf = 0;\n    bool isValid = false;\n#ifdef GPS_DEBUG\n    std::string debugmsg = \"\";\n#endif\n    if (powerState != GPS_ACTIVE) {\n        clearBuffer();\n        return false;\n    }\n#ifdef SERIAL_BUFFER_SIZE\n    if (_serial_gps->available() >= SERIAL_BUFFER_SIZE - 1) {\n        LOG_WARN(\"GPS Buffer full with %u bytes waiting. Flush to avoid corruption\", _serial_gps->available());\n        clearBuffer();\n    }\n#endif\n    // First consume any chars that have piled up at the receiver\n    while (_serial_gps->available() > 0) {\n        int c = _serial_gps->read();\n        UBXscratch[charsInBuf] = c;\n#ifdef GPS_DEBUG\n        debugmsg += vformat(\"%c\", (c >= 32 && c <= 126) ? c : '.');\n#endif\n        isValid |= reader.encode(c);\n        if (charsInBuf > sizeof(UBXscratch) - 10 || c == '\\r') {\n            if (strnstr((char *)UBXscratch, \"$GPTXT,01,01,02,u-blox ag - www.u-blox.com*50\", charsInBuf)) {\n                rebootsSeen++;\n            }\n            charsInBuf = 0;\n        } else {\n            charsInBuf++;\n        }\n    }\n#ifdef GPS_DEBUG\n    if (debugmsg != \"\") {\n        LOG_DEBUG(debugmsg.c_str());\n    }\n#endif\n    return isValid;\n}\nvoid GPS::enable()\n{\n    // Clear the old scheduling info (reset the lock-time prediction)\n    scheduling.reset();\n\n    enabled = true;\n    setInterval(GPS_THREAD_INTERVAL);\n\n    scheduling.informSearching();\n    setPowerState(GPS_ACTIVE);\n}\n\nint32_t GPS::disable()\n{\n    enabled = false;\n    setInterval(INT32_MAX);\n    setPowerState(GPS_OFF);\n\n    return INT32_MAX;\n}\n\nvoid GPS::toggleGpsMode()\n{\n    if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n        config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED;\n        LOG_INFO(\"User toggled GpsMode. Now DISABLED\");\n        playGPSDisableBeep();\n#ifdef GNSS_AIROHA\n        if (powerState == GPS_ACTIVE) {\n            LOG_DEBUG(\"User power Off GPS\");\n            digitalWrite(PIN_GPS_EN, LOW);\n        }\n#endif\n        disable();\n    } else if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_DISABLED) {\n        config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED;\n        LOG_INFO(\"User toggled GpsMode. Now ENABLED\");\n        playGPSEnableBeep();\n        enable();\n    }\n}\n#endif // Exclude GPS\n"
  },
  {
    "path": "src/gps/GPS.h",
    "content": "#pragma once\n#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_GPS\n\n#include <memory>\n\n#include \"GPSStatus.h\"\n#include \"GpioLogic.h\"\n#include \"Observer.h\"\n#include \"TinyGPS++.h\"\n#include \"concurrency/OSThread.h\"\n#include \"input/RotaryEncoderInterruptImpl1.h\"\n#include \"input/UpDownInterruptImpl1.h\"\n#include \"modules/PositionModule.h\"\n\n// Allow defining the polarity of the ENABLE output.  default is active high\n#ifndef GPS_EN_ACTIVE\n#define GPS_EN_ACTIVE 1\n#endif\n\n// Allow defining the polarity of the STANDBY output.  default is LOW for standby\n#ifndef GPS_STANDBY_ACTIVE\n#define GPS_STANDBY_ACTIVE LOW\n#endif\n\nstatic constexpr uint32_t GPS_UPDATE_ALWAYS_ON_THRESHOLD_MS = 10 * 1000UL;\nstatic constexpr uint32_t GPS_FIX_HOLD_MAX_MS = 20000;\n\ntypedef enum {\n    GNSS_MODEL_ATGM336H,\n    GNSS_MODEL_MTK,\n    GNSS_MODEL_UBLOX6,\n    GNSS_MODEL_UBLOX7,\n    GNSS_MODEL_UBLOX8,\n    GNSS_MODEL_UBLOX9,\n    GNSS_MODEL_UBLOX10,\n    GNSS_MODEL_UC6580,\n    GNSS_MODEL_UNKNOWN,\n    GNSS_MODEL_MTK_L76B,\n    GNSS_MODEL_MTK_PA1010D,\n    GNSS_MODEL_MTK_PA1616S,\n    GNSS_MODEL_AG3335,\n    GNSS_MODEL_AG3352,\n    GNSS_MODEL_LS20031,\n    GNSS_MODEL_CM121\n} GnssModel_t;\n\ntypedef enum {\n    GNSS_RESPONSE_NONE,\n    GNSS_RESPONSE_NAK,\n    GNSS_RESPONSE_FRAME_ERRORS,\n    GNSS_RESPONSE_OK,\n} GPS_RESPONSE;\n\nenum GPSPowerState : uint8_t {\n    GPS_ACTIVE,    // Awake and want a position\n    GPS_IDLE,      // Awake, but not wanting another position yet\n    GPS_SOFTSLEEP, // Physically powered on, but soft-sleeping\n    GPS_HARDSLEEP, // Physically powered off, but scheduled to wake\n    GPS_OFF        // Powered off indefinitely\n};\n\nstruct ChipInfo {\n    String chipName;        // The name of the chip (for logging)\n    String detectionString; // The string to match in the response\n    GnssModel_t driver;     // The driver to use\n};\n/**\n * A gps class that only reads from the GPS periodically and keeps the gps powered down except when reading\n *\n * When new data is available it will notify observers.\n */\nclass GPS : private concurrency::OSThread\n{\n  public:\n    meshtastic_Position p = meshtastic_Position_init_default;\n\n    /** This is normally bound to config.position.gps_en_gpio but some rare boards (like heltec tracker) need more advanced\n     * implementations. Those boards will set this public variable to a custom implementation.\n     *\n     * Normally set by GPS::createGPS()\n     */\n    GpioVirtPin *enablePin = NULL;\n\n    virtual ~GPS();\n\n    /** We will notify this observable anytime GPS state has changed meaningfully */\n    Observable<const meshtastic::GPSStatus *> newStatus;\n\n    /**\n     * Returns true if we succeeded\n     */\n    virtual bool setup();\n\n    // re-enable the thread\n    void enable();\n\n    // Disable the thread\n    int32_t disable() override;\n\n    // toggle between enabled/disabled\n    void toggleGpsMode();\n\n    // Change the power state of the GPS - for power saving / shutdown\n    void setPowerState(GPSPowerState newState, uint32_t sleepMs = 0);\n\n    /// Returns true if we have acquired GPS lock.\n    virtual bool hasLock();\n\n    /// Returns true if there's valid data flow with the chip.\n    virtual bool hasFlow();\n\n    /// Return true if we are connected to a GPS\n    bool isConnected() const { return hasGPS; }\n\n    bool isPowerSaving() const { return config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED; }\n\n    // Empty the input buffer as quickly as possible\n    void clearBuffer();\n\n    // Creates an instance of the GPS class.\n    // Returns the new instance or null if the GPS is not present.\n    static std::unique_ptr<GPS> createGps();\n\n    // Wake the GPS hardware - ready for an update\n    void up();\n\n    // Let the GPS hardware save power between updates\n    void down();\n\n  private:\n    GPS() : concurrency::OSThread(\"GPS\") {}\n\n    /// Record that we have a GPS\n    void setConnected();\n\n    /** Subclasses should look for serial rx characters here and feed it to their GPS parser\n     *\n     * Return true if we received a valid message from the GPS\n     */\n    virtual bool whileActive();\n\n    /**\n     * Perform any processing that should be done only while the GPS is awake and looking for a fix.\n     * Override this method to check for new locations\n     *\n     * @return true if we've acquired a time\n     */\n    virtual bool lookForTime();\n\n    /**\n     * Perform any processing that should be done only while the GPS is awake and looking for a fix.\n     * Override this method to check for new locations\n     *\n     * @return true if we've acquired a new location\n     */\n    virtual bool lookForLocation();\n\n    GnssModel_t gnssModel = GNSS_MODEL_UNKNOWN;\n\n    TinyGPSPlus reader;\n    uint8_t fixQual = 0; // fix quality from GPGGA\n    uint32_t lastChecksumFailCount = 0;\n    uint8_t currentStep = 0;\n    int32_t currentDelay = 2000;\n\n#ifndef TINYGPS_OPTION_NO_CUSTOM_FIELDS\n    // (20210908) TinyGps++ can only read the GPGSA \"FIX TYPE\" field\n    // via optional feature \"custom fields\", currently disabled (bug #525)\n    TinyGPSCustom gsafixtype; // custom extract fix type from GPGSA\n    TinyGPSCustom gsapdop;    // custom extract PDOP from GPGSA\n    uint8_t fixType = 0;      // fix type from GPGSA\n#endif\n\n    uint32_t fixHoldEnds = 0;\n    uint32_t rx_gpio = 0;\n    uint32_t tx_gpio = 0;\n\n    uint8_t speedSelect = 0;\n    uint8_t probeTries = 0;\n\n    /**\n     * hasValidLocation - indicates that the position variables contain a complete\n     *   GPS location, valid and fresh (< gps_update_interval + position_broadcast_secs)\n     */\n    bool hasValidLocation = false; // default to false, until we complete our first read\n\n    bool shouldPublish = false; // If we've changed GPS state, this will force a publish the next loop()\n\n    bool hasGPS = false; // Do we have a GPS we are talking to\n\n    bool GPSInitFinished = false; // Init thread finished?\n    bool GPSInitStarted = false;  // Init thread finished?\n\n    GPSPowerState powerState = GPS_OFF; // GPS_ACTIVE if we want a location right now\n\n    uint8_t numSatellites = 0;\n\n    CallbackObserver<GPS, void *> notifyDeepSleepObserver = CallbackObserver<GPS, void *>(this, &GPS::prepareDeepSleep);\n\n    /** If !NULL we will use this serial port to construct our GPS */\n#if defined(ARCH_RP2040)\n    static SerialUART *_serial_gps;\n#elif defined(ARCH_NRF52)\n    static Uart *_serial_gps;\n#else\n    static HardwareSerial *_serial_gps;\n#endif\n\n    // Create a ublox packet for editing in memory\n    uint8_t makeUBXPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg);\n    uint8_t makeCASPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg);\n\n    // scratch space for creating ublox packets\n    uint8_t UBXscratch[250] = {0};\n\n    int rebootsSeen = 0;\n\n    int getACK(uint8_t *buffer, uint16_t size, uint8_t requestedClass, uint8_t requestedID, uint32_t waitMillis);\n    GPS_RESPONSE getACK(uint8_t c, uint8_t i, uint32_t waitMillis);\n    GPS_RESPONSE getACK(const char *message, uint32_t waitMillis);\n\n    GPS_RESPONSE getACKCas(uint8_t class_id, uint8_t msg_id, uint32_t waitMillis);\n\n    /// Prepare the GPS for the cpu entering deep sleep, expect to be gone for at least 100s of msecs\n    /// always returns 0 to indicate okay to sleep\n    int prepareDeepSleep(void *unused);\n\n    /** Set power with EN pin, if relevant\n     */\n    void writePinEN(bool on);\n\n    /** Set the value of the STANDBY pin, if relevant\n     */\n    void writePinStandby(bool standby);\n\n    /** Set GPS power with PMU, if relevant\n     */\n    void setPowerPMU(bool on);\n\n    /** Set UBLOX power, if relevant\n     */\n    void setPowerUBLOX(bool on, uint32_t sleepMs = 0);\n\n    /**\n     * Tell users we have new GPS readings\n     */\n    void publishUpdate();\n\n    virtual int32_t runOnce() override;\n\n    GnssModel_t getProbeResponse(unsigned long timeout, const std::vector<ChipInfo> &responseMap, int serialSpeed);\n\n    // Get GNSS model\n    GnssModel_t probe(int serialSpeed);\n\n    // delay counter to allow more sats before fixed position stops GPS thread\n    uint8_t fixeddelayCtr = 0;\n};\n\nextern std::unique_ptr<GPS> gps;\n#endif // Exclude GPS\n"
  },
  {
    "path": "src/gps/GPSUpdateScheduling.cpp",
    "content": "#include \"GPSUpdateScheduling.h\"\n\n#include \"Default.h\"\n\n// Mark the time when searching for GPS position begins\nvoid GPSUpdateScheduling::informSearching()\n{\n    searchStartedMs = millis();\n}\n\n// Mark the time when searching for GPS is complete,\n// then update the predicted lock-time\nvoid GPSUpdateScheduling::informGotLock()\n{\n    searchEndedMs = millis();\n    LOG_DEBUG(\"Took %us to get lock\", (searchEndedMs - searchStartedMs) / 1000);\n    updateLockTimePrediction();\n}\n\n// Clear old lock-time prediction data.\n// When re-enabling GPS with user button.\nvoid GPSUpdateScheduling::reset()\n{\n    searchStartedMs = 0;\n    searchEndedMs = 0;\n    searchCount = 0;\n    predictedMsToGetLock = 0;\n}\n\n// How many milliseconds before we should next search for GPS position\n// Used by GPS hardware directly, to enter timed hardware sleep\nuint32_t GPSUpdateScheduling::msUntilNextSearch()\n{\n    uint32_t now = millis();\n\n    // Target interval (seconds), between GPS updates\n    uint32_t updateInterval = Default::getConfiguredOrDefaultMs(config.position.gps_update_interval, default_gps_update_interval);\n\n    // Check how long until we should start searching, to hopefully hit our target interval\n    uint32_t dueAtMs = searchEndedMs + updateInterval;\n    uint32_t compensatedStart = dueAtMs - predictedMsToGetLock;\n    int32_t remainingMs = compensatedStart - now;\n\n    // If we should have already started (negative value), start ASAP\n    if (remainingMs < 0)\n        remainingMs = 0;\n\n    return (uint32_t)remainingMs;\n}\n\n// How long have we already been searching?\n// Used to abort a search in progress, if it runs unacceptably long\nuint32_t GPSUpdateScheduling::elapsedSearchMs()\n{\n    // If searching\n    if (searchStartedMs > searchEndedMs)\n        return millis() - searchStartedMs;\n\n    // If not searching - 0ms. We shouldn't really consume this value\n    else\n        return 0;\n}\n\n// Is it now time to begin searching for a GPS position?\nbool GPSUpdateScheduling::isUpdateDue()\n{\n    return (msUntilNextSearch() == 0);\n}\n\n// Have we been searching for a GPS position for too long?\nbool GPSUpdateScheduling::searchedTooLong()\n{\n    uint32_t minimumOrConfiguredSecs =\n        Default::getConfiguredOrMinimumValue(config.position.position_broadcast_secs, default_broadcast_interval_secs);\n    uint32_t maxSearchMs = Default::getConfiguredOrDefaultMs(minimumOrConfiguredSecs, default_broadcast_interval_secs);\n    // If broadcast interval set to max, no such thing as \"too long\"\n    if (maxSearchMs == UINT32_MAX)\n        return false;\n\n    // If we've been searching longer than our position broadcast interval: that's too long\n    else if (elapsedSearchMs() > maxSearchMs)\n        return true;\n\n    // Otherwise, not too long yet!\n    else\n        return false;\n}\n\n// Updates the predicted time-to-get-lock, by exponentially smoothing the latest observation\nvoid GPSUpdateScheduling::updateLockTimePrediction()\n{\n\n    // How long did it take to get GPS lock this time?\n    // Duration between down() calls\n    int32_t lockTime = searchEndedMs - searchStartedMs;\n    if (lockTime < 0)\n        lockTime = 0;\n\n    // Ignore the first lock-time: likely to be long, will skew data\n\n    // Second locktime: likely stable. Use to initialize the smoothing filter\n    if (searchCount == 1)\n        predictedMsToGetLock = lockTime;\n\n    // Third locktime and after: predict using exponential smoothing. Respond slowly to changes\n    else if (searchCount > 1)\n        predictedMsToGetLock = (lockTime * weighting) + (predictedMsToGetLock * (1 - weighting));\n\n    searchCount++; // Only tracked so we can disregard initial lock-times\n\n    LOG_DEBUG(\"Predict %us to get next lock\", predictedMsToGetLock / 1000);\n}\n\n// How long do we expect to spend searching for a lock?\nuint32_t GPSUpdateScheduling::predictedSearchDurationMs()\n{\n    return GPSUpdateScheduling::predictedMsToGetLock;\n}\n"
  },
  {
    "path": "src/gps/GPSUpdateScheduling.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n// Encapsulates code responsible for the timing of GPS updates\nclass GPSUpdateScheduling\n{\n  public:\n    // Marks the time of these events, for calculation use\n    void informSearching();\n    void informGotLock(); // Predicted lock-time is recalculated here\n\n    void reset();           // Reset the prediction - after GPS::disable() / GPS::enable()\n    bool isUpdateDue();     // Is it time to begin searching for a GPS position?\n    bool searchedTooLong(); // Have we been searching for too long?\n\n    uint32_t msUntilNextSearch(); // How long until we need to begin searching for a GPS? Info provided to GPS hardware for sleep\n    uint32_t elapsedSearchMs();   // How long have we been searching so far?\n    uint32_t predictedSearchDurationMs(); // How long do we expect to spend searching for a lock?\n\n  private:\n    void updateLockTimePrediction(); // Called from informGotLock\n    uint32_t searchStartedMs = 0;\n    uint32_t searchEndedMs = 0;\n    uint32_t searchCount = 0;\n    uint32_t predictedMsToGetLock = 0;\n\n    const float weighting = 0.2; // Controls exponential smoothing of lock-times prediction. 20% weighting of \"latest lock-time\".\n};"
  },
  {
    "path": "src/gps/GeoCoord.cpp",
    "content": "#include \"GeoCoord.h\"\n\nGeoCoord::GeoCoord()\n{\n    _dirty = true;\n}\n\nGeoCoord::GeoCoord(int32_t lat, int32_t lon, int32_t alt) : _latitude(lat), _longitude(lon), _altitude(alt)\n{\n    GeoCoord::setCoords();\n}\n\nGeoCoord::GeoCoord(float lat, float lon, int32_t alt) : _altitude(alt)\n{\n    // Change decimal representation to int32_t. I.e., 12.345 becomes 123450000\n    _latitude = int32_t(lat * 1e+7);\n    _longitude = int32_t(lon * 1e+7);\n    GeoCoord::setCoords();\n}\n\nGeoCoord::GeoCoord(double lat, double lon, int32_t alt) : _altitude(alt)\n{\n    // Change decimal representation to int32_t. I.e., 12.345 becomes 123450000\n    _latitude = int32_t(lat * 1e+7);\n    _longitude = int32_t(lon * 1e+7);\n    GeoCoord::setCoords();\n}\n\n// Initialize all the coordinate systems\nvoid GeoCoord::setCoords()\n{\n    double lat = _latitude * 1e-7;\n    double lon = _longitude * 1e-7;\n    GeoCoord::latLongToDMS(lat, lon, _dms);\n    GeoCoord::latLongToUTM(lat, lon, _utm);\n    GeoCoord::latLongToMGRS(lat, lon, _mgrs);\n    GeoCoord::latLongToOSGR(lat, lon, _osgr);\n    GeoCoord::latLongToOLC(lat, lon, _olc);\n    _dirty = false;\n}\n\nvoid GeoCoord::updateCoords(int32_t lat, int32_t lon, int32_t alt)\n{\n    // If marked dirty or new coordinates\n    if (_dirty || _latitude != lat || _longitude != lon || _altitude != alt) {\n        _dirty = true;\n        _latitude = lat;\n        _longitude = lon;\n        _altitude = alt;\n        setCoords();\n    }\n}\n\nvoid GeoCoord::updateCoords(const double lat, const double lon, const int32_t alt)\n{\n    int32_t iLat = lat * 1e+7;\n    int32_t iLon = lon * 1e+7;\n    // If marked dirty or new coordinates\n    if (_dirty || _latitude != iLat || _longitude != iLon || _altitude != alt) {\n        _dirty = true;\n        _latitude = iLat;\n        _longitude = iLon;\n        _altitude = alt;\n        setCoords();\n    }\n}\n\nvoid GeoCoord::updateCoords(const float lat, const float lon, const int32_t alt)\n{\n    int32_t iLat = lat * 1e+7;\n    int32_t iLon = lon * 1e+7;\n    // If marked dirty or new coordinates\n    if (_dirty || _latitude != iLat || _longitude != iLon || _altitude != alt) {\n        _dirty = true;\n        _latitude = iLat;\n        _longitude = iLon;\n        _altitude = alt;\n        setCoords();\n    }\n}\n\n/**\n * Converts lat long coordinates from decimal degrees to degrees minutes seconds format.\n * DD°MM'SS\"C DDD°MM'SS\"C\n */\nvoid GeoCoord::latLongToDMS(const double lat, const double lon, DMS &dms)\n{\n    if (lat < 0)\n        dms.latCP = 'S';\n    else\n        dms.latCP = 'N';\n\n    double latDeg = lat;\n\n    if (lat < 0)\n        latDeg = latDeg * -1;\n\n    dms.latDeg = floor(latDeg);\n    double latMin = (latDeg - dms.latDeg) * 60;\n    dms.latMin = floor(latMin);\n    dms.latSec = (latMin - dms.latMin) * 60;\n\n    if (lon < 0)\n        dms.lonCP = 'W';\n    else\n        dms.lonCP = 'E';\n\n    double lonDeg = lon;\n\n    if (lon < 0)\n        lonDeg = lonDeg * -1;\n\n    dms.lonDeg = floor(lonDeg);\n    double lonMin = (lonDeg - dms.lonDeg) * 60;\n    dms.lonMin = floor(lonMin);\n    dms.lonSec = (lonMin - dms.lonMin) * 60;\n}\n\n/**\n * Converts lat long coordinates to UTM.\n * based on this: https://github.com/walvok/LatLonToUTM/blob/master/latlon_utm.ino\n */\nvoid GeoCoord::latLongToUTM(const double lat, const double lon, UTM &utm)\n{\n\n    const std::string latBands = \"CDEFGHJKLMNPQRSTUVWXX\";\n    utm.zone = int((lon + 180) / 6 + 1);\n    utm.band = latBands[int(lat / 8 + 10)];\n    double a = 6378137;                                                // WGS84 - equatorial radius\n    double k0 = 0.9996;                                                // UTM point scale on the central meridian\n    double eccSquared = 0.00669438;                                    // eccentricity squared\n    double lonTemp = (lon + 180) - int((lon + 180) / 360) * 360 - 180; // Make sure the longitude is between -180.00 .. 179.9\n    double latRad = toRadians(lat);\n    double lonRad = toRadians(lonTemp);\n\n    // Special Zones for Norway and Svalbard\n    if (lat >= 56.0 && lat < 64.0 && lonTemp >= 3.0 && lonTemp < 12.0) // Norway\n        utm.zone = 32;\n    if (lat >= 72.0 && lat < 84.0) { // Svalbard\n        if (lonTemp >= 0.0 && lonTemp < 9.0)\n            utm.zone = 31;\n        else if (lonTemp >= 9.0 && lonTemp < 21.0)\n            utm.zone = 33;\n        else if (lonTemp >= 21.0 && lonTemp < 33.0)\n            utm.zone = 35;\n        else if (lonTemp >= 33.0 && lonTemp < 42.0)\n            utm.zone = 37;\n    }\n\n    double lonOrigin = (utm.zone - 1) * 6 - 180 + 3; // puts origin in middle of zone\n    double lonOriginRad = toRadians(lonOrigin);\n    double eccPrimeSquared = (eccSquared) / (1 - eccSquared);\n    double N = a / sqrt(1 - eccSquared * sin(latRad) * sin(latRad));\n    double T = tan(latRad) * tan(latRad);\n    double C = eccPrimeSquared * cos(latRad) * cos(latRad);\n    double A = cos(latRad) * (lonRad - lonOriginRad);\n    double M =\n        a * ((1 - eccSquared / 4 - 3 * eccSquared * eccSquared / 64 - 5 * eccSquared * eccSquared * eccSquared / 256) * latRad -\n             (3 * eccSquared / 8 + 3 * eccSquared * eccSquared / 32 + 45 * eccSquared * eccSquared * eccSquared / 1024) *\n                 sin(2 * latRad) +\n             (15 * eccSquared * eccSquared / 256 + 45 * eccSquared * eccSquared * eccSquared / 1024) * sin(4 * latRad) -\n             (35 * eccSquared * eccSquared * eccSquared / 3072) * sin(6 * latRad));\n    utm.easting = (double)(k0 * N *\n                               (A + (1 - T + C) * pow(A, 3) / 6 +\n                                (5 - 18 * T + T * T + 72 * C - 58 * eccPrimeSquared) * A * A * A * A * A / 120) +\n                           500000.0);\n    utm.northing =\n        (double)(k0 * (M + N * tan(latRad) *\n                               (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24 +\n                                (61 - 58 * T + T * T + 600 * C - 330 * eccPrimeSquared) * A * A * A * A * A * A / 720)));\n\n    if (lat < 0)\n        utm.northing += 10000000.0; // 10000000 meter offset for southern hemisphere\n}\n\n// Converts lat long coordinates to an MGRS.\nvoid GeoCoord::latLongToMGRS(const double lat, const double lon, MGRS &mgrs)\n{\n    const std::string e100kLetters[3] = {\"ABCDEFGH\", \"JKLMNPQR\", \"STUVWXYZ\"};\n    const std::string n100kLetters[2] = {\"ABCDEFGHJKLMNPQRSTUV\", \"FGHJKLMNPQRSTUVABCDE\"};\n    UTM utm;\n    latLongToUTM(lat, lon, utm);\n    mgrs.zone = utm.zone;\n    mgrs.band = utm.band;\n    double col = floor(utm.easting / 100000);\n    mgrs.east100k = e100kLetters[(mgrs.zone - 1) % 3][col - 1];\n    double row = (int32_t)floor(utm.northing / 100000.0) % 20;\n    mgrs.north100k = n100kLetters[(mgrs.zone - 1) % 2][row];\n    mgrs.easting = (int32_t)utm.easting % 100000;\n    mgrs.northing = (int32_t)utm.northing % 100000;\n}\n\n/**\n * Converts lat long coordinates to Ordnance Survey Grid Reference (UK National Grid Ref).\n * Based on: https://www.movable-type.co.uk/scripts/latlong-os-gridref.html\n */\nvoid GeoCoord::latLongToOSGR(const double lat, const double lon, OSGR &osgr)\n{\n    const char letter[] = \"ABCDEFGHJKLMNOPQRSTUVWXYZ\"; // No 'I' in OSGR\n    double a = 6377563.396;                            // Airy 1830 semi-major axis\n    double b = 6356256.909;                            // Airy 1830 semi-minor axis\n    double f0 = 0.9996012717;                          // National Grid point scale factor on the central meridian\n    double phi0 = toRadians(49);\n    double lambda0 = toRadians(-2);\n    double n0 = -100000;\n    double e0 = 400000;\n    double e2 = 1 - (b * b) / (a * a); // eccentricity squared\n    double n = (a - b) / (a + b);\n\n    double osgb_Latitude;\n    double osgb_Longitude;\n    convertWGS84ToOSGB36(lat, lon, osgb_Latitude, osgb_Longitude);\n    double phi = osgb_Latitude;     // already in radians\n    double lambda = osgb_Longitude; // already in radians\n    double v = a * f0 / sqrt(1 - e2 * sin(phi) * sin(phi));\n    double rho = a * f0 * (1 - e2) / pow(1 - e2 * sin(phi) * sin(phi), 1.5);\n    double eta2 = v / rho - 1;\n    double mA = (1 + n + (5 / 4) * n * n + (5 / 4) * n * n * n) * (phi - phi0);\n    double mB = (3 * n + 3 * n * n + (21 / 8) * n * n * n) * sin(phi - phi0) * cos(phi + phi0);\n    // loss of precision in mC & mD due to floating point rounding can cause inaccuracy of northing by a few meters\n    double mC = (15 / 8 * n * n + 15 / 8 * n * n * n) * sin(2 * (phi - phi0)) * cos(2 * (phi + phi0));\n    double mD = (35 / 24) * n * n * n * sin(3 * (phi - phi0)) * cos(3 * (phi + phi0));\n    double m = b * f0 * (mA - mB + mC - mD);\n\n    double cos3Phi = cos(phi) * cos(phi) * cos(phi);\n    double cos5Phi = cos3Phi * cos(phi) * cos(phi);\n    double tan2Phi = tan(phi) * tan(phi);\n    double tan4Phi = tan2Phi * tan2Phi;\n    double I = m + n0;\n    double II = (v / 2) * sin(phi) * cos(phi);\n    double III = (v / 24) * sin(phi) * cos3Phi * (5 - tan2Phi + 9 * eta2);\n    double IIIA = (v / 720) * sin(phi) * cos5Phi * (61 - 58 * tan2Phi + tan4Phi);\n    double IV = v * cos(phi);\n    double V = (v / 6) * cos3Phi * (v / rho - tan2Phi);\n    double VI = (v / 120) * cos5Phi * (5 - 18 * tan2Phi + tan4Phi + 14 * eta2 - 58 * tan2Phi * eta2);\n\n    double deltaLambda = lambda - lambda0;\n    double deltaLambda2 = deltaLambda * deltaLambda;\n    double northing =\n        I + II * deltaLambda2 + III * deltaLambda2 * deltaLambda2 + IIIA * deltaLambda2 * deltaLambda2 * deltaLambda2;\n    double easting = e0 + IV * deltaLambda + V * deltaLambda2 * deltaLambda + VI * deltaLambda2 * deltaLambda2 * deltaLambda;\n\n    if (easting < 0 || easting > 700000 || northing < 0 || northing > 1300000) // Check if out of boundaries\n        osgr = {'I', 'I', 0, 0};\n    else {\n        uint32_t e100k = floor(easting / 100000);\n        uint32_t n100k = floor(northing / 100000);\n        int8_t l1 = (19 - n100k) - (19 - n100k) % 5 + floor((e100k + 10) / 5);\n        int8_t l2 = (19 - n100k) * 5 % 25 + e100k % 5;\n        osgr.e100k = letter[l1];\n        osgr.n100k = letter[l2];\n        osgr.easting = floor((int)easting % 100000);\n        osgr.northing = floor((int)northing % 100000);\n    }\n}\n\n/**\n * Converts lat long coordinates to Open Location Code.\n * Based on: https://github.com/google/open-location-code/blob/main/c/src/olc.c\n */\nvoid GeoCoord::latLongToOLC(double lat, double lon, OLC &olc)\n{\n    char tempCode[] = \"1234567890abc\";\n    const char kAlphabet[] = \"23456789CFGHJMPQRVWX\";\n    double latitude;\n    double longitude = lon;\n    double latitude_degrees = std::min(90.0, std::max(-90.0, lat));\n\n    if (latitude_degrees < 90) // Check latitude less than lat max\n        latitude = latitude_degrees;\n    else {\n        double precision;\n        if (OLC_CODE_LEN <= 10)\n            precision = pow_neg(20, floor((OLC_CODE_LEN / -2) + 2));\n        else\n            precision = pow_neg(20, -3) / pow(5, OLC_CODE_LEN - 10);\n        latitude = latitude_degrees - precision / 2;\n    }\n    while (longitude < -180) // Normalize longitude\n        longitude += 360;\n    while (longitude >= 180)\n        longitude -= 360;\n    int64_t lat_val = 90 * 2.5e7;\n    int64_t lng_val = 180 * 8.192e6;\n    lat_val += latitude * 2.5e7;\n    lng_val += longitude * 8.192e6;\n    size_t pos = OLC_CODE_LEN;\n\n    if (OLC_CODE_LEN > 10) { // Compute grid part of code if needed\n        for (size_t i = 0; i < 5; i++) {\n            int lat_digit = lat_val % 5;\n            int lng_digit = lng_val % 4;\n            int ndx = lat_digit * 4 + lng_digit;\n            tempCode[pos--] = kAlphabet[ndx];\n            lat_val /= 5;\n            lng_val /= 4;\n        }\n    } else {\n        lat_val /= pow(5, 5);\n        lng_val /= pow(4, 5);\n    }\n\n    pos = 10;\n\n    for (size_t i = 0; i < 5; i++) { // Compute pair section of code\n        int lat_ndx = lat_val % 20;\n        int lng_ndx = lng_val % 20;\n        tempCode[pos--] = kAlphabet[lng_ndx];\n        tempCode[pos--] = kAlphabet[lat_ndx];\n        lat_val /= 20;\n        lng_val /= 20;\n\n        if (i == 0)\n            tempCode[pos--] = '+';\n    }\n\n    if (OLC_CODE_LEN < 9) { // Add padding if needed\n        for (size_t i = OLC_CODE_LEN; i < 9; i++)\n            tempCode[i] = '0';\n        tempCode[9] = '+';\n    }\n\n    size_t char_count = OLC_CODE_LEN;\n    if (10 > char_count) {\n        char_count = 10;\n    }\n    for (size_t i = 0; i < char_count; i++) {\n        olc.code[i] = tempCode[i];\n    }\n    olc.code[char_count] = '\\0';\n}\n\n// Converts the coordinate in WGS84 datum to the OSGB36 datum.\nvoid GeoCoord::convertWGS84ToOSGB36(const double lat, const double lon, double &osgb_Latitude, double &osgb_Longitude)\n{\n    // Convert lat long to cartesian\n    double phi = toRadians(lat);\n    double lambda = toRadians(lon);\n    double h = 0.0;                  // No OSTN height data used, some loss of accuracy (up to 5m)\n    double wgsA = 6378137;           // WGS84 datum semi major axis\n    double wgsF = 1 / 298.257223563; // WGS84 datum flattening\n    double ecc = 2 * wgsF - wgsF * wgsF;\n    double vee = wgsA / sqrt(1 - ecc * pow(sin(phi), 2));\n    double wgsX = (vee + h) * cos(phi) * cos(lambda);\n    double wgsY = (vee + h) * cos(phi) * sin(lambda);\n    double wgsZ = ((1 - ecc) * vee + h) * sin(phi);\n\n    // 7-parameter Helmert transform\n    double tx = -446.448;                  // x shift in meters\n    double ty = 125.157;                   // y shift in meters\n    double tz = -542.060;                  // z shift in meters\n    double s = 20.4894 / 1e6 + 1;          // scale normalized parts per million to (s + 1)\n    double rx = toRadians(-0.1502 / 3600); // x rotation normalize arcseconds to radians\n    double ry = toRadians(-0.2470 / 3600); // y rotation normalize arcseconds to radians\n    double rz = toRadians(-0.8421 / 3600); // z rotation normalize arcseconds to radians\n    double osgbX = tx + wgsX * s - wgsY * rz + wgsZ * ry;\n    double osgbY = ty + wgsX * rz + wgsY * s - wgsZ * rx;\n    double osgbZ = tz - wgsX * ry + wgsY * rx + wgsZ * s;\n\n    // Convert cartesian to lat long\n    double airyA = 6377563.396;     // Airy1830 datum semi major axis\n    double airyB = 6356256.909;     // Airy1830 datum semi minor axis\n    double airyF = 1 / 299.3249646; // Airy1830 datum flattening\n    double airyEcc = 2 * airyF - airyF * airyF;\n    double airyEcc2 = airyEcc / (1 - airyEcc);\n    double p = sqrt(osgbX * osgbX + osgbY * osgbY);\n    double R = sqrt(p * p + osgbZ * osgbZ);\n    double tanBeta = (airyB * osgbZ) / (airyA * p) * (1 + airyEcc2 * airyB / R);\n    double sinBeta = tanBeta / sqrt(1 + tanBeta * tanBeta);\n    double cosBeta = sinBeta / tanBeta;\n    osgb_Latitude = atan2(osgbZ + airyEcc2 * airyB * sinBeta * sinBeta * sinBeta,\n                          p - airyEcc * airyA * cosBeta * cosBeta * cosBeta); // leave in radians\n    osgb_Longitude = atan2(osgbY, osgbX);                                     // leave in radians\n    // osgb height = p*cos(osgb.latitude) + osgbZ*sin(osgb.latitude) -\n    //(airyA*airyA/(airyA / sqrt(1 - airyEcc*sin(osgb.latitude)*sin(osgb.latitude)))); // Not used, no OSTN data\n}\n\n/// Ported from my old java code, returns distance in meters along the globe\n/// surface (by Haversine formula)\nfloat GeoCoord::latLongToMeter(double lat_a, double lng_a, double lat_b, double lng_b)\n{\n    // Don't do math if the points are the same\n    if (lat_a == lat_b && lng_a == lng_b)\n        return 0.0;\n\n    double a1 = lat_a / DEG_CONVERT;\n    double a2 = lng_a / DEG_CONVERT;\n    double b1 = lat_b / DEG_CONVERT;\n    double b2 = lng_b / DEG_CONVERT;\n    double cos_b1 = cos(b1);\n    double cos_a1 = cos(a1);\n    double t1 = cos_a1 * cos(a2) * cos_b1 * cos(b2);\n    double t2 = cos_a1 * sin(a2) * cos_b1 * sin(b2);\n    double t3 = sin(a1) * sin(b1);\n    double tt = acos(t1 + t2 + t3);\n    if (std::isnan(tt))\n        tt = 0.0; // Must have been the same point?\n\n    return (float)(6366000 * tt);\n}\n\n/**\n * Computes the bearing in degrees between two points on Earth.  Ported from my\n * old Gaggle android app.\n *\n * @param lat1\n * Latitude of the first point\n * @param lon1\n * Longitude of the first point\n * @param lat2\n * Latitude of the second point\n * @param lon2\n * Longitude of the second point\n * @return Bearing from point 1 to point 2 in radians. A value of 0 means due\n * north.\n */\nfloat GeoCoord::bearing(double lat1, double lon1, double lat2, double lon2)\n{\n    double lat1Rad = toRadians(lat1);\n    double lat2Rad = toRadians(lat2);\n    double deltaLonRad = toRadians(lon2 - lon1);\n    double y = sin(deltaLonRad) * cos(lat2Rad);\n    double x = cos(lat1Rad) * sin(lat2Rad) - (sin(lat1Rad) * cos(lat2Rad) * cos(deltaLonRad));\n    return atan2(y, x);\n}\n\n/**\n * Ported from http://www.edwilliams.org/avform147.htm#Intro\n * @brief Convert from meters to range in radians on a great circle\n * @param range_meters\n * The range in meters\n * @return range in radians on a great circle\n */\nfloat GeoCoord::rangeMetersToRadians(double range_meters)\n{\n    // 1 nm is 1852 meters\n    double distance_nm = range_meters * 1852;\n    return (PI / (180 * 60)) * distance_nm;\n}\n\n/**\n * Ported from http://www.edwilliams.org/avform147.htm#Intro\n * @brief Convert from radians to range in meters on a great circle\n * @param range_radians\n * The range in radians\n * @return Range in meters on a great circle\n */\nfloat GeoCoord::rangeRadiansToMeters(double range_radians)\n{\n    double distance_nm = ((180 * 60) / PI) * range_radians;\n    // 1 meter is 0.000539957 nm\n    return distance_nm * 0.000539957;\n}\n\n// Find distance from point to passed in point\nint32_t GeoCoord::distanceTo(const GeoCoord &pointB)\n{\n    return latLongToMeter(this->getLatitude() * 1e-7, this->getLongitude() * 1e-7, pointB.getLatitude() * 1e-7,\n                          pointB.getLongitude() * 1e-7);\n}\n\n// Find bearing from point to passed in point\nint32_t GeoCoord::bearingTo(const GeoCoord &pointB)\n{\n    return bearing(this->getLatitude() * 1e-7, this->getLongitude() * 1e-7, pointB.getLatitude() * 1e-7,\n                   pointB.getLongitude() * 1e-7);\n}\n\n/**\n * Create a new point based on the passed-in point\n * Ported from http://www.edwilliams.org/avform147.htm#LL\n * @param bearing\n * The bearing in radians\n * @param range_meters\n * range in meters\n * @return GeoCoord object of point at bearing and range from initial point\n */\nstd::shared_ptr<GeoCoord> GeoCoord::pointAtDistance(double bearing, double range_meters)\n{\n    double range_radians = rangeMetersToRadians(range_meters);\n    double lat1 = this->getLatitude() * 1e-7;\n    double lon1 = this->getLongitude() * 1e-7;\n    double lat = asin(sin(lat1) * cos(range_radians) + cos(lat1) * sin(range_radians) * cos(bearing));\n    double dlon = atan2(sin(bearing) * sin(range_radians) * cos(lat1), cos(range_radians) - sin(lat1) * sin(lat));\n    double lon = fmod(lon1 - dlon + PI, 2 * PI) - PI;\n\n    return std::make_shared<GeoCoord>(double(lat), double(lon), this->getAltitude());\n}\n\n/**\n * Convert bearing to degrees\n * @param bearing\n * The bearing in string format\n * @return Bearing in degrees\n */\nunsigned int GeoCoord::bearingToDegrees(const char *bearing)\n{\n    if (strcmp(bearing, \"N\") == 0)\n        return 0;\n    else if (strcmp(bearing, \"NNE\") == 0)\n        return 22;\n    else if (strcmp(bearing, \"NE\") == 0)\n        return 45;\n    else if (strcmp(bearing, \"ENE\") == 0)\n        return 67;\n    else if (strcmp(bearing, \"E\") == 0)\n        return 90;\n    else if (strcmp(bearing, \"ESE\") == 0)\n        return 112;\n    else if (strcmp(bearing, \"SE\") == 0)\n        return 135;\n    else if (strcmp(bearing, \"SSE\") == 0)\n        return 157;\n    else if (strcmp(bearing, \"S\") == 0)\n        return 180;\n    else if (strcmp(bearing, \"SSW\") == 0)\n        return 202;\n    else if (strcmp(bearing, \"SW\") == 0)\n        return 225;\n    else if (strcmp(bearing, \"WSW\") == 0)\n        return 247;\n    else if (strcmp(bearing, \"W\") == 0)\n        return 270;\n    else if (strcmp(bearing, \"WNW\") == 0)\n        return 292;\n    else if (strcmp(bearing, \"NW\") == 0)\n        return 315;\n    else if (strcmp(bearing, \"NNW\") == 0)\n        return 337;\n    else\n        return 0;\n}\n\n/**\n * Convert bearing to string\n * @param degrees\n * The bearing in degrees\n * @return Bearing in string format\n */\nconst char *GeoCoord::degreesToBearing(unsigned int degrees)\n{\n    if (degrees >= 348 || degrees < 11)\n        return \"N\";\n    else if (degrees >= 11 && degrees < 34)\n        return \"NNE\";\n    else if (degrees >= 34 && degrees < 56)\n        return \"NE\";\n    else if (degrees >= 56 && degrees < 79)\n        return \"ENE\";\n    else if (degrees >= 79 && degrees < 101)\n        return \"E\";\n    else if (degrees >= 101 && degrees < 124)\n        return \"ESE\";\n    else if (degrees >= 124 && degrees < 146)\n        return \"SE\";\n    else if (degrees >= 146 && degrees < 169)\n        return \"SSE\";\n    else if (degrees >= 169 && degrees < 191)\n        return \"S\";\n    else if (degrees >= 191 && degrees < 214)\n        return \"SSW\";\n    else if (degrees >= 214 && degrees < 236)\n        return \"SW\";\n    else if (degrees >= 236 && degrees < 259)\n        return \"WSW\";\n    else if (degrees >= 259 && degrees < 281)\n        return \"W\";\n    else if (degrees >= 281 && degrees < 304)\n        return \"WNW\";\n    else if (degrees >= 304 && degrees < 326)\n        return \"NW\";\n    else if (degrees >= 326 && degrees < 348)\n        return \"NNW\";\n    else\n        return \"N\";\n}\n\ndouble GeoCoord::pow_neg(double base, double exponent)\n{\n    if (exponent == 0) {\n        return 1;\n    } else if (exponent > 0) {\n        return pow(base, exponent);\n    }\n    return 1 / pow(base, -exponent);\n}\n\ndouble GeoCoord::toRadians(double deg)\n{\n    return deg * PI / 180;\n}\n\ndouble GeoCoord::toDegrees(double r)\n{\n    return r * 180 / PI;\n}\n"
  },
  {
    "path": "src/gps/GeoCoord.h",
    "content": "#pragma once\n\n#include <algorithm>\n#include <cstdint>\n#include <cstring>\n#include <math.h>\n#include <memory>\n#include <stdexcept>\n#include <stdint.h>\n#include <string>\n\n#define PI 3.1415926535897932384626433832795\n#define OLC_CODE_LEN 11\n#define DEG_CONVERT (180 / PI)\n\n// GeoCoord structs/classes\n// A struct to hold the data for a DMS coordinate.\nstruct DMS {\n    uint8_t latDeg;\n    uint8_t latMin;\n    uint32_t latSec;\n    char latCP;\n    uint8_t lonDeg;\n    uint8_t lonMin;\n    uint32_t lonSec;\n    char lonCP;\n};\n\n// A struct to hold the data for a UTM coordinate, this is also used when creating an MGRS coordinate.\nstruct UTM {\n    uint8_t zone;\n    char band;\n    uint32_t easting;\n    uint32_t northing;\n};\n\n// A struct to hold the data for a MGRS coordinate.\nstruct MGRS {\n    uint8_t zone;\n    char band;\n    char east100k;\n    char north100k;\n    uint32_t easting;\n    uint32_t northing;\n};\n\n// A struct to hold the data for a OSGR coordinate\nstruct OSGR {\n    char e100k;\n    char n100k;\n    uint32_t easting;\n    uint32_t northing;\n};\n\n// A struct to hold the data for a OLC coordinate\nstruct OLC {\n    char code[OLC_CODE_LEN + 1]; // +1 for null termination\n};\n\nclass GeoCoord\n{\n  private:\n    int32_t _latitude = 0;\n    int32_t _longitude = 0;\n    int32_t _altitude = 0;\n\n    DMS _dms = {};\n    UTM _utm = {};\n    MGRS _mgrs = {};\n    OSGR _osgr = {};\n    OLC _olc = {};\n\n    bool _dirty = true;\n\n    void setCoords();\n\n  public:\n    GeoCoord();\n    GeoCoord(int32_t lat, int32_t lon, int32_t alt);\n    GeoCoord(double lat, double lon, int32_t alt);\n    GeoCoord(float lat, float lon, int32_t alt);\n\n    void updateCoords(const int32_t lat, const int32_t lon, const int32_t alt);\n    void updateCoords(const double lat, const double lon, const int32_t alt);\n    void updateCoords(const float lat, const float lon, const int32_t alt);\n\n    // Conversions\n    static void latLongToDMS(const double lat, const double lon, DMS &dms);\n    static void latLongToUTM(const double lat, const double lon, UTM &utm);\n    static void latLongToMGRS(const double lat, const double lon, MGRS &mgrs);\n    static void latLongToOSGR(const double lat, const double lon, OSGR &osgr);\n    static void latLongToOLC(const double lat, const double lon, OLC &olc);\n    static void convertWGS84ToOSGB36(const double lat, const double lon, double &osgb_Latitude, double &osgb_Longitude);\n    static float latLongToMeter(double lat_a, double lng_a, double lat_b, double lng_b);\n    static float bearing(double lat1, double lon1, double lat2, double lon2);\n    static float rangeRadiansToMeters(double range_radians);\n    static float rangeMetersToRadians(double range_meters);\n    static unsigned int bearingToDegrees(const char *bearing);\n    static const char *degreesToBearing(unsigned int degrees);\n\n    // Raises a number to an exponent, handling negative exponents.\n    static double pow_neg(double base, double exponent);\n    static double toRadians(double deg);\n    static double toDegrees(double r);\n\n    // Point to point conversions\n    int32_t distanceTo(const GeoCoord &pointB);\n    int32_t bearingTo(const GeoCoord &pointB);\n    std::shared_ptr<GeoCoord> pointAtDistance(double bearing, double range);\n\n    // Lat lon alt getters\n    int32_t getLatitude() const { return _latitude; }\n    int32_t getLongitude() const { return _longitude; }\n    int32_t getAltitude() const { return _altitude; }\n\n    // DMS getters\n    uint8_t getDMSLatDeg() const { return _dms.latDeg; }\n    uint8_t getDMSLatMin() const { return _dms.latMin; }\n    uint32_t getDMSLatSec() const { return _dms.latSec; }\n    char getDMSLatCP() const { return _dms.latCP; }\n    uint8_t getDMSLonDeg() const { return _dms.lonDeg; }\n    uint8_t getDMSLonMin() const { return _dms.lonMin; }\n    uint32_t getDMSLonSec() const { return _dms.lonSec; }\n    char getDMSLonCP() const { return _dms.lonCP; }\n\n    // UTM getters\n    uint8_t getUTMZone() const { return _utm.zone; }\n    char getUTMBand() const { return _utm.band; }\n    uint32_t getUTMEasting() const { return _utm.easting; }\n    uint32_t getUTMNorthing() const { return _utm.northing; }\n\n    // MGRS getters\n    uint8_t getMGRSZone() const { return _mgrs.zone; }\n    char getMGRSBand() const { return _mgrs.band; }\n    char getMGRSEast100k() const { return _mgrs.east100k; }\n    char getMGRSNorth100k() const { return _mgrs.north100k; }\n    uint32_t getMGRSEasting() const { return _mgrs.easting; }\n    uint32_t getMGRSNorthing() const { return _mgrs.northing; }\n\n    // OSGR getters\n    char getOSGRE100k() const { return _osgr.e100k; }\n    char getOSGRN100k() const { return _osgr.n100k; }\n    uint32_t getOSGREasting() const { return _osgr.easting; }\n    uint32_t getOSGRNorthing() const { return _osgr.northing; }\n\n    // OLC getter\n    void getOLCCode(char *code) { strncpy(code, _olc.code, OLC_CODE_LEN + 1); } // +1 for null termination\n};"
  },
  {
    "path": "src/gps/NMEAWPL.cpp",
    "content": "#if !MESHTASTIC_EXCLUDE_GPS\n#include \"NMEAWPL.h\"\n#include \"GeoCoord.h\"\n#include \"RTC.h\"\n#include <time.h>\n\n/* -------------------------------------------\n *        1       2 3        4 5    6\n *        |       | |        | |    |\n * $--WPL,llll.ll,a,yyyyy.yy,a,c--c*hh<CR><LF>\n *\n * Field Number:\n * 1 Latitude\n * 2 N or S (North or South)\n * 3 Longitude\n * 4 E or W (East or West)\n * 5 Waypoint name\n * 6 Checksum\n * -------------------------------------------\n */\n\nuint32_t printWPL(char *buf, size_t bufsz, const meshtastic_PositionLite &pos, const char *name, bool isCaltopoMode)\n{\n    GeoCoord geoCoord(pos.latitude_i, pos.longitude_i, pos.altitude);\n    char type = isCaltopoMode ? 'P' : 'N';\n    uint32_t len = snprintf(buf, bufsz, \"\\r\\n$G%cWPL,%02d%07.4f,%c,%03d%07.4f,%c,%s\", type, geoCoord.getDMSLatDeg(),\n                            (abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6, geoCoord.getDMSLatCP(),\n                            geoCoord.getDMSLonDeg(), (abs(geoCoord.getLongitude()) - geoCoord.getDMSLonDeg() * 1e+7) * 6e-6,\n                            geoCoord.getDMSLonCP(), name);\n    uint32_t chk = 0;\n    for (uint32_t i = 1; i < len; i++) {\n        chk ^= buf[i];\n    }\n    len += snprintf(buf + len, bufsz - len, \"*%02X\\r\\n\", chk);\n    return len;\n}\n\nuint32_t printWPL(char *buf, size_t bufsz, const meshtastic_Position &pos, const char *name, bool isCaltopoMode)\n{\n    GeoCoord geoCoord(pos.latitude_i, pos.longitude_i, pos.altitude);\n    char type = isCaltopoMode ? 'P' : 'N';\n    uint32_t len = snprintf(buf, bufsz, \"$G%cWPL,%02d%07.4f,%c,%03d%07.4f,%c,%s\", type, geoCoord.getDMSLatDeg(),\n                            (abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6, geoCoord.getDMSLatCP(),\n                            geoCoord.getDMSLonDeg(), (abs(geoCoord.getLongitude()) - geoCoord.getDMSLonDeg() * 1e+7) * 6e-6,\n                            geoCoord.getDMSLonCP(), name);\n    uint32_t chk = 0;\n    for (uint32_t i = 1; i < len; i++) {\n        chk ^= buf[i];\n    }\n    len += snprintf(buf + len, bufsz - len, \"*%02X\\r\\n\", chk);\n    return len;\n}\n/* -------------------------------------------\n *        1         2       3 4       5 6 7  8   9  10 11 12 13  14   15\n *        |         |       | |       | | |  |   |   | |   | |   |    |\n * $--GGA,hhmmss.ss,ddmm.mm,a,ddmm.mm,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh<CR><LF>\n *\n * Field Number:\n *  1 UTC of this position report, hh is hours, mm is minutes, ss.ss is seconds.\n *  2 Latitude\n *  3 N or S (North or South)\n *  4 Longitude\n *  5 E or W (East or West)\n *  6 GPS Quality Indicator (non null)\n *  7 Number of satellites in use, 00 - 12\n *  8 Horizontal Dilution of precision (meters)\n *  9 Antenna Altitude above/below mean-sea-level (geoid) (in meters)\n * 10 Units of antenna altitude, meters\n * 11 Geoidal separation, the difference between the WGS-84 earth ellipsoid and mean-sea-level (geoid), \"-\" means mean-sea-level\n * below ellipsoid 12 Units of geoidal separation, meters 13 Age of differential GPS data, time in seconds since last SC104 type 1\n * or 9 update, null field when DGPS is not used 14 Differential reference station ID, 0000-1023 15 Checksum\n * -------------------------------------------\n */\n\nuint32_t printGGA(char *buf, size_t bufsz, const meshtastic_Position &pos)\n{\n    GeoCoord geoCoord(pos.latitude_i, pos.longitude_i, pos.altitude);\n    time_t timestamp = pos.timestamp;\n\n    tm *t = gmtime(&timestamp);\n    if (getRTCQuality() > 0) { // use the device clock if we got time from somewhere. If not, use the GPS timestamp.\n        uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice);\n        timestamp = rtc_sec;\n        t = gmtime(&timestamp);\n    }\n\n    uint32_t len = snprintf(\n        buf, bufsz, \"$GNGGA,%02d%02d%02d.%02d,%02d%07.4f,%c,%03d%07.4f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d\", t->tm_hour,\n        t->tm_min, t->tm_sec, pos.timestamp_millis_adjust, geoCoord.getDMSLatDeg(),\n        (abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6, geoCoord.getDMSLatCP(), geoCoord.getDMSLonDeg(),\n        (abs(geoCoord.getLongitude()) - geoCoord.getDMSLonDeg() * 1e+7) * 6e-6, geoCoord.getDMSLonCP(), pos.fix_quality,\n        pos.sats_in_view, pos.HDOP, geoCoord.getAltitude(), 'M', pos.altitude_geoidal_separation, 'M', 0, 0);\n\n    uint32_t chk = 0;\n    for (uint32_t i = 1; i < len; i++) {\n        chk ^= buf[i];\n    }\n    len += snprintf(buf + len, bufsz - len, \"*%02X\\r\\n\", chk);\n    return len;\n}\n\n#endif"
  },
  {
    "path": "src/gps/NMEAWPL.h",
    "content": "#pragma once\n\n#include \"main.h\"\n#include <Arduino.h>\n\nuint32_t printWPL(char *buf, size_t bufsz, const meshtastic_Position &pos, const char *name, bool isCaltopoMode = false);\nuint32_t printWPL(char *buf, size_t bufsz, const meshtastic_PositionLite &pos, const char *name, bool isCaltopoMode = false);\nuint32_t printGGA(char *buf, size_t bufsz, const meshtastic_Position &pos);"
  },
  {
    "path": "src/gps/RTC.cpp",
    "content": "#include \"RTC.h\"\n#include \"configuration.h\"\n#include \"detect/ScanI2C.h\"\n#include \"main.h\"\n#include <Throttle.h>\n#include <sys/time.h>\n#include <time.h>\n\nstatic RTCQuality currentQuality = RTCQualityNone;\nuint32_t lastSetFromPhoneNtpOrGps = 0;\n\nstatic uint32_t lastTimeValidationWarning = 0;\nstatic const uint32_t TIME_VALIDATION_WARNING_INTERVAL_MS = 15000; // 15 seconds\n\nRTCQuality getRTCQuality()\n{\n    return currentQuality;\n}\n\n// stuff that really should be in in the instance instead...\nstatic uint32_t\n    timeStartMsec; // Once we have a GPS lock, this is where we hold the initial msec clock that corresponds to that time\nstatic uint64_t zeroOffsetSecs; // GPS based time in secs since 1970 - only updated once on initial lock\n\n/**\n * Reads the current date and time from the RTC module and updates the system time.\n * @return True if the RTC was successfully read and the system time was updated, false otherwise.\n */\nRTCSetResult readFromRTC()\n{\n    struct timeval tv; /* btw settimeofday() is helpful here too*/\n#ifdef RV3028_RTC\n    if (rtc_found.address == RV3028_RTC) {\n        uint32_t now = millis();\n        Melopero_RV3028 rtc;\n#if WIRE_INTERFACES_COUNT == 2\n        rtc.initI2C(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);\n#else\n        rtc.initI2C();\n#endif\n        tm t;\n        t.tm_year = rtc.getYear() - 1900;\n        t.tm_mon = rtc.getMonth() - 1;\n        t.tm_mday = rtc.getDate();\n        t.tm_hour = rtc.getHour();\n        t.tm_min = rtc.getMinute();\n        t.tm_sec = rtc.getSecond();\n        tv.tv_sec = gm_mktime(&t);\n        tv.tv_usec = 0;\n        uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms\n\n#ifdef BUILD_EPOCH\n        if (tv.tv_sec < BUILD_EPOCH) {\n            if (Throttle::isWithinTimespanMs(lastTimeValidationWarning, TIME_VALIDATION_WARNING_INTERVAL_MS) == false) {\n                LOG_WARN(\"Ignore time (%ld) before build epoch (%ld)!\", printableEpoch, BUILD_EPOCH);\n            }\n            return RTCSetResultInvalidTime;\n        }\n#endif\n\n        LOG_DEBUG(\"Read RTC time from RV3028 getTime as %02d-%02d-%02d %02d:%02d:%02d (%ld)\", t.tm_year + 1900, t.tm_mon + 1,\n                  t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, printableEpoch);\n        if (currentQuality == RTCQualityNone) {\n            timeStartMsec = now;\n            zeroOffsetSecs = tv.tv_sec;\n            currentQuality = RTCQualityDevice;\n        }\n        return RTCSetResultSuccess;\n    } else {\n        LOG_WARN(\"RTC not found (found address 0x%02X)\", rtc_found.address);\n    }\n#elif defined(PCF8563_RTC) || defined(PCF85063_RTC)\n#if defined(PCF8563_RTC)\n    if (rtc_found.address == PCF8563_RTC) {\n        SensorPCF8563 rtc;\n#elif defined(PCF85063_RTC)\n    if (rtc_found.address == PCF85063_RTC) {\n        SensorPCF85063 rtc;\n\n#endif\n        uint32_t now = millis();\n\n#if WIRE_INTERFACES_COUNT == 2\n        rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);\n#else\n        rtc.begin(Wire);\n#endif\n\n        RTC_DateTime datetime = rtc.getDateTime();\n        tm t = datetime.toUnixTime();\n        tv.tv_sec = gm_mktime(&t);\n        tv.tv_usec = 0;\n        uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms\n\n#ifdef BUILD_EPOCH\n        if (tv.tv_sec < BUILD_EPOCH) {\n            if (Throttle::isWithinTimespanMs(lastTimeValidationWarning, TIME_VALIDATION_WARNING_INTERVAL_MS) == false) {\n                LOG_WARN(\"Ignore time (%ld) before build epoch (%ld)!\", printableEpoch, BUILD_EPOCH);\n                lastTimeValidationWarning = millis();\n            }\n            return RTCSetResultInvalidTime;\n        }\n#endif\n\n        LOG_DEBUG(\"Read RTC time from %s getDateTime as %02d-%02d-%02d %02d:%02d:%02d (%ld)\", rtc.getChipName(), t.tm_year + 1900,\n                  t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, printableEpoch);\n        if (currentQuality == RTCQualityNone) {\n            timeStartMsec = now;\n            zeroOffsetSecs = tv.tv_sec;\n            currentQuality = RTCQualityDevice;\n        }\n        return RTCSetResultSuccess;\n    } else {\n        LOG_WARN(\"RTC not found (found address 0x%02X)\", rtc_found.address);\n    }\n#elif defined(RX8130CE_RTC)\n    if (rtc_found.address == RX8130CE_RTC) {\n        uint32_t now = millis();\n#ifdef MUZI_BASE\n        ArtronShop_RX8130CE rtc(&Wire1);\n#else\n        ArtronShop_RX8130CE rtc(&Wire);\n#endif\n        tm t;\n        if (rtc.getTime(&t)) {\n            tv.tv_sec = gm_mktime(&t);\n            tv.tv_usec = 0;\n\n            uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms\n            LOG_DEBUG(\"Read RTC time from RX8130CE getDateTime as %02d-%02d-%02d %02d:%02d:%02d (%ld)\", t.tm_year + 1900,\n                      t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, printableEpoch);\n#ifdef BUILD_EPOCH\n            if (tv.tv_sec < BUILD_EPOCH) {\n                if (Throttle::isWithinTimespanMs(lastTimeValidationWarning, TIME_VALIDATION_WARNING_INTERVAL_MS) == false) {\n                    LOG_WARN(\"Ignore time (%ld) before build epoch (%ld)!\", printableEpoch, BUILD_EPOCH);\n                    lastTimeValidationWarning = millis();\n                }\n                return RTCSetResultInvalidTime;\n            }\n#endif\n            if (currentQuality == RTCQualityNone) {\n                timeStartMsec = now;\n                zeroOffsetSecs = tv.tv_sec;\n                currentQuality = RTCQualityDevice;\n            }\n            return RTCSetResultSuccess;\n        }\n    }\n#else\n    if (!gettimeofday(&tv, NULL)) {\n        uint32_t now = millis();\n        uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms\n        LOG_DEBUG(\"Read RTC time as %ld\", printableEpoch);\n        timeStartMsec = now;\n        zeroOffsetSecs = tv.tv_sec;\n        return RTCSetResultSuccess;\n    }\n#endif\n    return RTCSetResultNotSet;\n}\n\n/**\n * Sets the RTC (Real-Time Clock) if the provided time is of higher quality than the current RTC time.\n *\n * @param q The quality of the provided time.\n * @param tv A pointer to a timeval struct containing the time to potentially set the RTC to.\n * @return RTCSetResult\n *\n * If we haven't yet set our RTC this boot, set it from a GPS derived time\n */\nRTCSetResult perhapsSetRTC(RTCQuality q, const struct timeval *tv, bool forceUpdate)\n{\n    static uint32_t lastSetMsec = 0;\n    uint32_t now = millis();\n    uint32_t printableEpoch = tv->tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms\n#ifdef BUILD_EPOCH\n    if (tv->tv_sec < BUILD_EPOCH) {\n        if (Throttle::isWithinTimespanMs(lastTimeValidationWarning, TIME_VALIDATION_WARNING_INTERVAL_MS) == false) {\n            LOG_WARN(\"Ignore time (%ld) before build epoch (%ld)!\", printableEpoch, BUILD_EPOCH);\n            lastTimeValidationWarning = millis();\n        }\n        return RTCSetResultInvalidTime;\n    } else if ((uint64_t)tv->tv_sec > ((uint64_t)BUILD_EPOCH + FORTY_YEARS)) {\n        if (Throttle::isWithinTimespanMs(lastTimeValidationWarning, TIME_VALIDATION_WARNING_INTERVAL_MS) == false) {\n            // Calculate max allowed time safely to avoid overflow in logging\n            uint64_t maxAllowedTime = (uint64_t)BUILD_EPOCH + FORTY_YEARS;\n            uint32_t maxAllowedPrintable = (maxAllowedTime > UINT32_MAX) ? UINT32_MAX : (uint32_t)maxAllowedTime;\n            LOG_WARN(\"Ignore time (%ld) too far in the future (build epoch: %ld, max allowed: %ld)!\", printableEpoch,\n                     (uint32_t)BUILD_EPOCH, maxAllowedPrintable);\n            lastTimeValidationWarning = millis();\n        }\n        return RTCSetResultInvalidTime;\n    }\n#endif\n\n    bool shouldSet;\n    if (forceUpdate) {\n        shouldSet = true;\n        LOG_DEBUG(\"Override current RTC quality (%s) with incoming time of RTC quality of %s\", RtcName(currentQuality),\n                  RtcName(q));\n    } else if (q > currentQuality) {\n        shouldSet = true;\n        LOG_DEBUG(\"Upgrade time to quality %s\", RtcName(q));\n    } else if (q == RTCQualityGPS) {\n        shouldSet = true;\n        LOG_DEBUG(\"Reapply GPS time: %ld secs\", printableEpoch);\n    } else if (q == RTCQualityNTP && !Throttle::isWithinTimespanMs(lastSetMsec, (12 * 60 * 60 * 1000UL))) {\n        // Every 12 hrs we will slam in a new NTP or Phone GPS / NTP time, to correct for local RTC clock drift\n        shouldSet = true;\n        LOG_DEBUG(\"Reapply external time to correct clock drift %ld secs\", printableEpoch);\n    } else {\n        shouldSet = false;\n        LOG_DEBUG(\"Current RTC quality: %s. Ignore time of RTC quality of %s\", RtcName(currentQuality), RtcName(q));\n    }\n\n    if (shouldSet) {\n        currentQuality = q;\n        lastSetMsec = now;\n        if (currentQuality >= RTCQualityNTP) {\n            lastSetFromPhoneNtpOrGps = now;\n        }\n\n        // This delta value works on all platforms\n        timeStartMsec = now;\n        zeroOffsetSecs = tv->tv_sec;\n        // If this platform has a settable RTC, set it\n#ifdef RV3028_RTC\n        if (rtc_found.address == RV3028_RTC) {\n            Melopero_RV3028 rtc;\n#if WIRE_INTERFACES_COUNT == 2\n            rtc.initI2C(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);\n#else\n            rtc.initI2C();\n#endif\n            tm *t = gmtime(&tv->tv_sec);\n            rtc.setTime(t->tm_year + 1900, t->tm_mon + 1, t->tm_wday, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec);\n            LOG_DEBUG(\"RV3028_RTC setTime %02d-%02d-%02d %02d:%02d:%02d (%ld)\", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,\n                      t->tm_hour, t->tm_min, t->tm_sec, printableEpoch);\n        } else {\n            LOG_WARN(\"RTC not found (found address 0x%02X)\", rtc_found.address);\n        }\n#elif defined(PCF8563_RTC) || defined(PCF85063_RTC)\n#if defined(PCF8563_RTC)\n        if (rtc_found.address == PCF8563_RTC) {\n            SensorPCF8563 rtc;\n#elif defined(PCF85063_RTC)\n        if (rtc_found.address == PCF85063_RTC) {\n            SensorPCF85063 rtc;\n\n#endif\n\n#if WIRE_INTERFACES_COUNT == 2\n            rtc.begin(rtc_found.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);\n#else\n            rtc.begin(Wire);\n#endif\n            tm *t = gmtime(&tv->tv_sec);\n            rtc.setDateTime(*t);\n            LOG_DEBUG(\"%s setDateTime %02d-%02d-%02d %02d:%02d:%02d (%ld)\", rtc.getChipName(), t->tm_year + 1900, t->tm_mon + 1,\n                      t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, printableEpoch);\n        } else {\n            LOG_WARN(\"RTC not found (found address 0x%02X)\", rtc_found.address);\n        }\n#elif defined(RX8130CE_RTC)\n        if (rtc_found.address == RX8130CE_RTC) {\n#ifdef MUZI_BASE\n            ArtronShop_RX8130CE rtc(&Wire1);\n#else\n            ArtronShop_RX8130CE rtc(&Wire);\n#endif\n            tm *t = gmtime(&tv->tv_sec);\n            if (rtc.setTime(*t)) {\n                LOG_DEBUG(\"RX8130CE setDateTime %02d-%02d-%02d %02d:%02d:%02d (%ld)\", t->tm_year + 1900, t->tm_mon + 1,\n                          t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, printableEpoch);\n            } else {\n                LOG_WARN(\"Failed to set time for RX8130CE\");\n            }\n        }\n#elif defined(ARCH_ESP32)\n        settimeofday(tv, NULL);\n#endif\n\n        readFromRTC();\n        return RTCSetResultSuccess;\n    } else {\n        return RTCSetResultNotSet; // RTC was already set with a higher quality time\n    }\n}\n\nconst char *RtcName(RTCQuality quality)\n{\n    switch (quality) {\n    case RTCQualityNone:\n        return \"None\";\n    case RTCQualityDevice:\n        return \"Device\";\n    case RTCQualityFromNet:\n        return \"Net\";\n    case RTCQualityNTP:\n        return \"NTP\";\n    case RTCQualityGPS:\n        return \"GPS\";\n    default:\n        return \"Unknown\";\n    }\n}\n\n/**\n * Sets the RTC time if the provided time is of higher quality than the current RTC time.\n *\n * @param q The quality of the provided time.\n * @param t The time to potentially set the RTC to.\n * @return True if the RTC was set to the provided time, false otherwise.\n */\nRTCSetResult perhapsSetRTC(RTCQuality q, const struct tm &t)\n{\n    /* Convert to unix time\n    The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970\n    (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z).\n    */\n    // horrible hack to make mktime TZ agnostic - best practise according to\n    // https://www.gnu.org/software/libc/manual/html_node/Broken_002ddown-Time.html\n    time_t res = gm_mktime(&t);\n    struct timeval tv;\n    tv.tv_sec = res;\n    tv.tv_usec = 0;                      // time.centisecond() * (10 / 1000);\n    uint32_t printableEpoch = tv.tv_sec; // Print lib only supports 32 bit but time_t can be 64 bit on some platforms\n#ifdef BUILD_EPOCH\n    if (tv.tv_sec < BUILD_EPOCH) {\n        if (Throttle::isWithinTimespanMs(lastTimeValidationWarning, TIME_VALIDATION_WARNING_INTERVAL_MS) == false) {\n            LOG_WARN(\"Ignore time (%lu) before build epoch (%lu)!\", printableEpoch, BUILD_EPOCH);\n            lastTimeValidationWarning = millis();\n        }\n        return RTCSetResultInvalidTime;\n    } else if ((uint64_t)tv.tv_sec > ((uint64_t)BUILD_EPOCH + FORTY_YEARS)) {\n        if (Throttle::isWithinTimespanMs(lastTimeValidationWarning, TIME_VALIDATION_WARNING_INTERVAL_MS) == false) {\n            // Calculate max allowed time safely to avoid overflow in logging\n            uint64_t maxAllowedTime = (uint64_t)BUILD_EPOCH + FORTY_YEARS;\n            uint32_t maxAllowedPrintable = (maxAllowedTime > UINT32_MAX) ? UINT32_MAX : (uint32_t)maxAllowedTime;\n            LOG_WARN(\"Ignore time (%lu) too far in the future (build epoch: %lu, max allowed: %lu)!\", printableEpoch,\n                     (uint32_t)BUILD_EPOCH, maxAllowedPrintable);\n            lastTimeValidationWarning = millis();\n        }\n        return RTCSetResultInvalidTime;\n    }\n#endif\n\n    // LOG_DEBUG(\"Got time from GPS month=%d, year=%d, unixtime=%ld\", t.tm_mon, t.tm_year, tv.tv_sec);\n    if (t.tm_year < 0 || t.tm_year >= 300) {\n        // LOG_DEBUG(\"Ignore invalid GPS month=%d, year=%d, unixtime=%ld\", t.tm_mon, t.tm_year, tv.tv_sec);\n        return RTCSetResultInvalidTime;\n    } else {\n        return perhapsSetRTC(q, &tv);\n    }\n}\n\n/**\n * Returns the timezone offset in seconds.\n *\n * @return The timezone offset in seconds.\n */\nint32_t getTZOffset()\n{\n#if MESHTASTIC_EXCLUDE_TZ\n    return 0;\n#else\n    time_t now = getTime(false);\n    struct tm *gmt;\n    gmt = gmtime(&now);\n    gmt->tm_isdst = -1;\n    return (int32_t)difftime(now, mktime(gmt));\n#endif\n}\n\n/**\n * Returns the current time in seconds since the Unix epoch (January 1, 1970).\n *\n * @return The current time in seconds since the Unix epoch.\n */\nuint32_t getTime(bool local)\n{\n    if (local) {\n        return (((uint32_t)millis() - timeStartMsec) / 1000) + zeroOffsetSecs + getTZOffset();\n    } else {\n        return (((uint32_t)millis() - timeStartMsec) / 1000) + zeroOffsetSecs;\n    }\n}\n\n/**\n * Returns the current time from the RTC if the quality of the time is at least minQuality.\n *\n * @param minQuality The minimum quality of the RTC time required for it to be considered valid.\n * @return The current time from the RTC if it meets the minimum quality requirement, or 0 if the time is not valid.\n */\nuint32_t getValidTime(RTCQuality minQuality, bool local)\n{\n    return (currentQuality >= minQuality) ? getTime(local) : 0;\n}\n\ntime_t gm_mktime(const struct tm *tm)\n{\n#if !MESHTASTIC_EXCLUDE_TZ\n    time_t result = 0;\n\n    // First, get us to the start of tm->year, by calculating the number of days since the Unix epoch.\n    int year = 1900 + tm->tm_year; // tm_year is years since 1900\n    int year_minus_one = year - 1;\n    int days_before_this_year = 0;\n    days_before_this_year += year_minus_one * 365;\n    // leap days: every 4 years, except 100s, but including 400s.\n    days_before_this_year += year_minus_one / 4 - year_minus_one / 100 + year_minus_one / 400;\n    // subtract from 1970-01-01 to get days since epoch\n    days_before_this_year -= 719162; // (1969 * 365 + 1969 / 4 - 1969 / 100 + 1969 / 400);\n\n    // Now, within this tm->year, compute the days *before* this tm->month starts.\n    static const int days_before_month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; // non-leap year\n    int days_this_year_before_this_month = days_before_month[tm->tm_mon];                             // tm->tm_mon is 0..11\n\n    // If this is a leap year, and we're past February, add a day:\n    if (tm->tm_mon >= 2 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) {\n        days_this_year_before_this_month += 1;\n    }\n\n    // And within this month:\n    int days_this_month_before_today = tm->tm_mday - 1; // tm->tm_mday is 1..31\n\n    // Now combine them all together, and convert days to seconds:\n    result += (days_before_this_year + days_this_year_before_this_month + days_this_month_before_today);\n    result *= 86400L;\n\n    // Finally, add in the hours, minutes, and seconds of today:\n    result += tm->tm_hour * 3600;\n    result += tm->tm_min * 60;\n    result += tm->tm_sec;\n\n    return result;\n#else\n    struct tm tmCopy = *tm;\n    return mktime(&tmCopy);\n#endif\n}\n"
  },
  {
    "path": "src/gps/RTC.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#include \"sys/time.h\"\n#include <Arduino.h>\n\n#ifdef RX8130CE_RTC\n#include <ArtronShop_RX8130CE.h>\n#endif\n\nenum RTCQuality {\n\n    /// We haven't had our RTC set yet\n    RTCQualityNone = 0,\n\n    /// We got time from an onboard peripheral after boot.\n    RTCQualityDevice = 1,\n\n    /// Some other node gave us a time we can use\n    RTCQualityFromNet = 2,\n\n    /// Our time is based on NTP\n    RTCQualityNTP = 3,\n\n    /// Our time is based on our own GPS\n    RTCQualityGPS = 4\n};\n\n/// The RTC set result codes\n/// Used to indicate the result of an attempt to set the RTC.\nenum RTCSetResult {\n    RTCSetResultNotSet = 0,      ///< RTC was set successfully\n    RTCSetResultSuccess = 1,     ///< RTC was set successfully\n    RTCSetResultInvalidTime = 3, ///< The provided time was invalid (e.g., before the build epoch)\n    RTCSetResultError = 4        ///< An error occurred while setting the RTC\n};\n\nRTCQuality getRTCQuality();\n\nextern uint32_t lastSetFromPhoneNtpOrGps;\n\n/// If we haven't yet set our RTC this boot, set it from a GPS derived time\nRTCSetResult perhapsSetRTC(RTCQuality q, const struct timeval *tv, bool forceUpdate = false);\nRTCSetResult perhapsSetRTC(RTCQuality q, const struct tm &t);\n\n/// Return a string name for the quality\nconst char *RtcName(RTCQuality quality);\n\n/// Return time since 1970 in secs.  While quality is RTCQualityNone we will be returning time based at zero\nuint32_t getTime(bool local = false);\n\n/// Return time since 1970 in secs.  If quality is RTCQualityNone return zero\nuint32_t getValidTime(RTCQuality minQuality, bool local = false);\n\nRTCSetResult readFromRTC();\n\ntime_t gm_mktime(const struct tm *tm);\n\n#define SEC_PER_DAY 86400\n#define SEC_PER_HOUR 3600\n#define SEC_PER_MIN 60\n#ifdef BUILD_EPOCH\nstatic constexpr uint64_t FORTY_YEARS = (40ULL * 365 * SEC_PER_DAY); // Use 64-bit arithmetic to prevent overflow\n#endif\n"
  },
  {
    "path": "src/gps/cas.h",
    "content": "#pragma once\n\n// CASIC binary message definitions\n// Reference: https://www.icofchina.com/d/file/xiazai/2020-09-22/20f1b42b3a11ac52089caf3603b43fb5.pdf\n// ATGM33H-5N: https://www.icofchina.com/pro/mokuai/2016-08-01/4.html\n// (https://www.icofchina.com/d/file/xiazai/2016-12-05/b5c57074f4b1fcc62ba8c7868548d18a.pdf)\n\n// NEMA (Class ID - 0x4e) message IDs\n#define CAS_NEMA_GGA 0x00\n#define CAS_NEMA_GLL 0x01\n#define CAS_NEMA_GSA 0x02\n#define CAS_NEMA_GSV 0x03\n#define CAS_NEMA_RMC 0x04\n#define CAS_NEMA_VTG 0x05\n#define CAS_NEMA_GST 0x07\n#define CAS_NEMA_ZDA 0x08\n#define CAS_NEMA_DHV 0x0D\n\n// Size of a CAS-ACK-(N)ACK message (14 bytes)\n#define CAS_ACK_NACK_MSG_SIZE 0x0E\n\n// CFG-RST (0x06, 0x02)\n// Factory reset\nstatic const uint8_t _message_CAS_CFG_RST_FACTORY[] = {\n    0xFF, 0x03, // Fields to clear\n    0x01,       // Reset Mode: Controlled Software reset\n    0x03        // Startup Mode: Factory\n};\n\n// CFG_RATE (0x06, 0x01)\n// 1HZ update rate, this should always be the case after\n// factory reset but update it regardless\nstatic const uint8_t _message_CAS_CFG_RATE_1HZ[] = {\n    0xE8, 0x03, // Update Rate: 0x03E8 = 1000ms\n    0x00, 0x00  // Reserved\n};\n\n// CFG-NAVX (0x06, 0x07)\n// Initial ATGM33H-5N configuration, Updates for Dynamic Mode, Fix Mode, and SV system\n// Quirk: The ATGM33H-5N-31 should only support GPS+BDS, however it will happily enable\n//  and use GPS+BDS+GLONASS iff the correct CFG_NAVX command is used.\nstatic const uint8_t _message_CAS_CFG_NAVX_CONF[] = {\n    0x03, 0x01, 0x00, 0x00, // Update Mask: Dynamic Mode, Fix Mode, Nav Settings\n    0x03,                   // Dynamic Mode: Automotive\n    0x03,                   // Fix Mode: Auto 2D/3D\n    0x00,                   // Min SV\n    0x00,                   // Max SVs\n    0x00,                   // Min CNO\n    0x00,                   // Reserved1\n    0x00,                   // Init 3D fix\n    0x00,                   // Min Elevation\n    0x00,                   // Dr Limit\n    0x07,                   // Nav System: 2^0 = GPS, 2^1 = BDS 2^2 = GLONASS: 2^3\n                            // 3=GPS+BDS, 7=GPS+BDS+GLONASS\n    0x00, 0x00,             // Rollover Week\n    0x00, 0x00, 0x00, 0x00, // Fix Altitude\n    0x00, 0x00, 0x00, 0x00, // Fix Height Error\n    0x00, 0x00, 0x00, 0x00, // PDOP Maximum\n    0x00, 0x00, 0x00, 0x00, // TDOP Maximum\n    0x00, 0x00, 0x00, 0x00, // Position Accuracy Max\n    0x00, 0x00, 0x00, 0x00, // Time Accuracy Max\n    0x00, 0x00, 0x00, 0x00  // Static Hold Threshold\n};\n"
  },
  {
    "path": "src/gps/ubx.h",
    "content": "static const char *failMessage = \"Unable to %s\";\n\n#define SEND_UBX_PACKET(TYPE, ID, DATA, ERRMSG, TIMEOUT)                                                                         \\\n    do {                                                                                                                         \\\n        msglen = makeUBXPacket(TYPE, ID, sizeof(DATA), DATA);                                                                    \\\n        _serial_gps->write(UBXscratch, msglen);                                                                                  \\\n        if (getACK(TYPE, ID, TIMEOUT) != GNSS_RESPONSE_OK) {                                                                     \\\n            LOG_WARN(failMessage, #ERRMSG);                                                                                      \\\n        }                                                                                                                        \\\n    } while (0)\n\n// Power Management\n\nstatic uint8_t _message_PMREQ[] PROGMEM = {\n    0x00, 0x00, 0x00, 0x00, // 4 bytes duration of request task (milliseconds)\n    0x02, 0x00, 0x00, 0x00  // Bitfield, set backup = 1\n};\n\nstatic uint8_t _message_PMREQ_10[] PROGMEM = {\n    0x00,                   // version (0 for this version)\n    0x00, 0x00, 0x00,       // Reserved 1\n    0x00, 0x00, 0x00, 0x00, // 4 bytes duration of request task (milliseconds)\n    0x06, 0x00, 0x00, 0x00, // Bitfield, set backup =1 and force =1\n    0x08, 0x00, 0x00, 0x00  // wakeupSources Wake on uartrx\n};\n\nstatic const uint8_t _message_CFG_RXM_PSM[] PROGMEM = {\n    0x08, // Reserved\n    0x01  // Power save mode\n};\n\n// only for Neo-6\nstatic const uint8_t _message_CFG_RXM_ECO[] PROGMEM = {\n    0x08, // Reserved\n    0x04  // eco mode\n};\n\nstatic const uint8_t _message_CFG_PM2[] PROGMEM = {\n    0x01,                   // version\n    0x00,                   // Reserved 1, set to 0x06 by u-Center\n    0x00,                   // Reserved 2\n    0x00,                   // Reserved 1\n    0x00, 0x11, 0x03, 0x00, // flags-> cyclic mode, wait for normal fix ok, do not wake to update RTC, doNotEnterOff,\n                            // LimitPeakCurrent\n    0xE8, 0x03, 0x00, 0x00, // update period 1000 ms\n    0x10, 0x27, 0x00, 0x00, // search period 10s\n    0x00, 0x00, 0x00, 0x00, // Grid offset 0\n    0x01, 0x00,             // onTime 1 second\n    0x00, 0x00,             // min search time 0\n    0x00, 0x00,             // 0x2C, 0x01,  // reserved 4\n    0x00, 0x00,             // 0x00, 0x00,  // reserved 5\n    0x00, 0x00, 0x00, 0x00, // 0x4F, 0xC1, 0x03, 0x00, // reserved 6\n    0x00, 0x00, 0x00, 0x00, // 0x87, 0x02, 0x00, 0x00, // reserved 7\n    0x00,                   // 0xFF,        // reserved 8\n    0x00,                   // 0x00,        // reserved 9\n    0x00, 0x00,             // 0x00, 0x00,  // reserved 10\n    0x00, 0x00, 0x00, 0x00  // 0x64, 0x40, 0x01, 0x00  // reserved 11\n};\n\n// Constellation setup, none required for Neo-6\n\n// For Neo-7 GPS & SBAS\nstatic const uint8_t _message_GNSS_7[] = {\n    0x00, // msgVer (0 for this version)\n    0x00, // numTrkChHw (max number of hardware channels, read only, so it's always 0)\n    0xff, // numTrkChUse (max number of channels to use, 0xff = max available)\n    0x02, // numConfigBlocks (number of GNSS systems), most modules support maximum 3 GNSS systems\n    // GNSS config format: gnssId, resTrkCh, maxTrkCh, reserved1, flags\n    0x00, 0x08, 0x10, 0x00, 0x01, 0x00, 0x00, 0x01, // GPS\n    0x01, 0x01, 0x03, 0x00, 0x01, 0x00, 0x00, 0x01  // SBAS\n};\n\n// It's not critical if the module doesn't acknowledge this configuration.\n// The module should operate adequately with its factory or previously saved settings.\n// It appears that there is a firmware bug in some GPS modules: When an attempt is made\n// to overwrite a saved state with identical values, no ACK/NAK is received, contrary to\n// what is specified in the Ublox documentation.\n// There is also a possibility that the module may be GPS-only.\n\n// For M8 GPS, GLONASS, Galileo, SBAS, QZSS\nstatic const uint8_t _message_GNSS_8[] = {\n    0x00,                                           // msgVer (0 for this version)\n    0x00,                                           // numTrkChHw (max number of hardware channels, read only, so it's always 0)\n    0xff,                                           // numTrkChUse (max number of channels to use, 0xff = max available)\n    0x05,                                           // numConfigBlocks (number of GNSS systems)\n                                                    // GNSS config format: gnssId, resTrkCh, maxTrkCh, reserved1, flags\n    0x00, 0x08, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, // GPS\n    0x01, 0x01, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // SBAS\n    0x02, 0x04, 0x08, 0x00, 0x01, 0x00, 0x01, 0x01, // Galileo\n    0x05, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // QZSS\n    0x06, 0x08, 0x0E, 0x00, 0x01, 0x00, 0x01, 0x01  // GLONASS\n};\n/*\n// For M8 GPS, GLONASS, BeiDou, SBAS, QZSS\nstatic const uint8_t _message_GNSS_8_B[] = {\n 0x00, // msgVer (0 for this version)\n 0x00, // numTrkChHw (max number of hardware channels, read only, so it's always 0)\n 0xff, // numTrkChUse (max number of channels to use, 0xff = max available) read only for protocol >23\n 0x05, // numConfigBlocks (number of GNSS systems)\n       // GNSS config format: gnssId, resTrkCh, maxTrkCh, reserved1, flags\n 0x00, 0x08, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, // GPS\n 0x01, 0x01, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // SBAS\n 0x03, 0x08, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, // BeiDou\n 0x05, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // QZSS\n 0x06, 0x08, 0x0E, 0x00, 0x01, 0x00, 0x01, 0x01  // GLONASS\n};\n*/\n\n// For M8 we want to enable NMEA version 4.10 messages to allow for Galileo and or BeiDou\nstatic const uint8_t _message_NMEA[]{\n    0x00,                              // filter flags\n    0x41,                              // NMEA Version\n    0x00,                              // Max number of SVs to report per TaklerId\n    0x02,                              // flags\n    0x00, 0x00, 0x00, 0x00,            // gnssToFilter\n    0x00,                              // svNumbering\n    0x00,                              // mainTalkerId\n    0x00,                              // gsvTalkerId\n    0x01,                              // Message version\n    0x00, 0x00,                        // bdsTalkerId 2 chars 0=default\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Reserved\n};\n// Enable jamming/interference monitor\n\n// For Neo-6, Max-7 and Neo-7\nstatic const uint8_t _message_JAM_6_7[] = {\n    0xf3, 0xac, 0x62, 0xad, // config1 bbThreshold = 3, cwThreshold = 15, enable = 1, reserved bits 0x16B156\n    0x1e, 0x03, 0x00, 0x00  // config2 antennaSetting Unknown = 0, reserved 3, = 0x00,0x00, reserved 2 = 0x31E\n};\n\n// For M8\nstatic const uint8_t _message_JAM_8[] = {\n    0xf3, 0xac, 0x62, 0xad, // config1 bbThreshold = 3, cwThreshold = 15, enable1 = 1, reserved bits 0x16B156\n    0x1e, 0x43, 0x00, 0x00  // config2 antennaSetting Unknown = 0, enable2 = 1, generalBits = 0x31E\n};\n\n// Configure navigation engine expert settings:\n// there are many variations of what were Reserved fields for the Neo-6 in later versions\n// ToDo: check UBX-MON-VER for module type and protocol version\n\n// For the Neo-6\nstatic const uint8_t _message_NAVX5[] = {\n    0x00, 0x00,             // msgVer (0 for this version)\n    0x4c, 0x66,             // mask1\n    0x00, 0x00, 0x00, 0x00, // Reserved 0\n    0x00,                   // Reserved 1\n    0x00,                   // Reserved 2\n    0x03,                   // minSVs (Minimum number of satellites for navigation) = 3\n    0x10,                   // maxSVs (Maximum number of satellites for navigation) = 16\n    0x06,                   // minCNO (Minimum satellite signal level for navigation) = 6 dBHz\n    0x00,                   // Reserved 5\n    0x00,                   // iniFix3D (Initial fix must be 3D) (0 = false 1 = true)\n    0x00,                   // Reserved 6\n    0x00,                   // Reserved 7\n    0x00,                   // Reserved 8\n    0x00, 0x00,             // wknRollover 0 = firmware default\n    0x00, 0x00, 0x00, 0x00, // Reserved 9\n    0x00,                   // Reserved 10\n    0x00,                   // Reserved 11\n    0x00,                   // usePPP (Precise Point Positioning) (0 = false, 1 = true)\n    0x01,                   // useAOP  (AssistNow Autonomous configuration) = 1 (enabled)\n    0x00,                   // Reserved 12\n    0x00,                   // Reserved 13\n    0x00, 0x00,             // aopOrbMaxErr = 0 to reset to firmware default\n    0x00,                   // Reserved 14\n    0x00,                   // Reserved 15\n    0x00, 0x00,             // Reserved 3\n    0x00, 0x00, 0x00, 0x00  // Reserved 4\n};\n// For the M8\nstatic const uint8_t _message_NAVX5_8[] = {\n    0x02, 0x00,             // msgVer (2 for this version)\n    0x4c, 0x66,             // mask1\n    0x00, 0x00, 0x00, 0x00, // mask2\n    0x00, 0x00,             // Reserved 1\n    0x03,                   // minSVs (Minimum number of satellites for navigation) = 3\n    0x10,                   // maxSVs (Maximum number of satellites for navigation) = 16\n    0x06,                   // minCNO (Minimum satellite signal level for navigation) = 6 dBHz\n    0x00,                   // Reserved 2\n    0x00,                   // iniFix3D (Initial fix must be 3D) (0 = false 1 = true)\n    0x00, 0x00,             // Reserved 3\n    0x00,                   // ackAiding\n    0x00, 0x00,             // wknRollover 0 = firmware default\n    0x00,                   // sigAttenCompMode\n    0x00,                   // Reserved 4\n    0x00, 0x00,             // Reserved 5\n    0x00, 0x00,             // Reserved 6\n    0x00,                   // usePPP (Precise Point Positioning) (0 = false, 1 = true)\n    0x01,                   // aopCfg  (AssistNow Autonomous configuration) = 1 (enabled)\n    0x00, 0x00,             // Reserved 7\n    0x00, 0x00,             // aopOrbMaxErr = 0 to reset to firmware default\n    0x00, 0x00, 0x00, 0x00, // Reserved 8\n    0x00, 0x00, 0x00,       // Reserved 9\n    0x00                    // useAdr\n};\n\n// Set GPS update rate to 1Hz\n// Lowering the update rate helps to save power.\n// Additionally, for some new modules like the M9/M10, an update rate lower than 5Hz\n// is recommended to avoid a known issue with satellites disappearing.\n// The module defaults for M8, M9, M10 are the same as we use here so no update is necessary\nstatic const uint8_t _message_1HZ[] = {\n    0xE8, 0x03, // Measurement Rate (1000ms for 1Hz)\n    0x01, 0x00, // Navigation rate, always 1 in GPS mode\n    0x01, 0x00  // Time reference\n};\n\n// Disable GLL. GLL - Geographic position (latitude and longitude), which provides the current geographical\n// coordinates.\nstatic const uint8_t _message_GLL[] = {\n    0xF0, 0x01, // NMEA ID for GLL\n    0x00,       // Rate for DDC\n    0x00,       // Rate for UART1\n    0x00,       // Rate for UART2\n    0x00,       // Rate for USB\n    0x00,       // Rate for SPI\n    0x00        // Reserved\n};\n\n// Disable GSA. GSA - GPS DOP and active satellites, used for detailing the satellites used in the positioning and\n// the DOP (Dilution of Precision)\nstatic const uint8_t _message_GSA[] = {\n    0xF0, 0x02, // NMEA ID for GSA\n    0x00,       // Rate for DDC\n    0x00,       // Rate for UART1\n    0x00,       // Rate for UART2\n    0x00,       // Rate for USB useful for native linux\n    0x00,       // Rate for SPI\n    0x00        // Reserved\n};\n\n// Disable GSV. GSV - Satellites in view, details the number and location of satellites in view.\nstatic const uint8_t _message_GSV[] = {\n    0xF0, 0x03, // NMEA ID for GSV\n    0x00,       // Rate for DDC\n    0x00,       // Rate for UART1\n    0x00,       // Rate for UART2\n    0x00,       // Rate for USB\n    0x00,       // Rate for SPI\n    0x00        // Reserved\n};\n\n// Disable VTG. VTG - Track made good and ground speed, which provides course and speed information relative to\n// the ground.\nstatic const uint8_t _message_VTG[] = {\n    0xF0, 0x05, // NMEA ID for VTG\n    0x00,       // Rate for DDC\n    0x00,       // Rate for UART1\n    0x00,       // Rate for UART2\n    0x00,       // Rate for USB\n    0x00,       // Rate for SPI\n    0x00        // Reserved\n};\n\n// Enable RMC. RMC - Recommended Minimum data, the essential gps pvt (position, velocity, time) data.\nstatic const uint8_t _message_RMC[] = {\n    0xF0, 0x04, // NMEA ID for RMC\n    0x00,       // Rate for DDC\n    0x01,       // Rate for UART1\n    0x00,       // Rate for UART2\n    0x01,       // Rate for USB useful for native linux\n    0x00,       // Rate for SPI\n    0x00        // Reserved\n};\n\n// Enable GGA. GGA - Global Positioning System Fix Data, which provides 3D location and accuracy data.\nstatic const uint8_t _message_GGA[] = {\n    0xF0, 0x00, // NMEA ID for GGA\n    0x00,       // Rate for DDC\n    0x01,       // Rate for UART1\n    0x00,       // Rate for UART2\n    0x01,       // Rate for USB, useful for native linux\n    0x00,       // Rate for SPI\n    0x00        // Reserved\n};\n\n// Disable UBX-AID-ALPSRV as it may confuse TinyGPS. The Neo-6 seems to send this message\n// whether the AID Autonomous is enabled or not\nstatic const uint8_t _message_AID[] = {\n    0x0B, 0x32, // NMEA ID for UBX-AID-ALPSRV\n    0x00,       // Rate for DDC\n    0x00,       // Rate for UART1\n    0x00,       // Rate for UART2\n    0x00,       // Rate for USB\n    0x00,       // Rate for SPI\n    0x00        // Reserved\n};\n\n// Turn off TEXT INFO Messages for all but M10 series\n\n// B5 62 06 02 0A 00 01 00 00 00 03 03 00 03 03 00 1F 20\nstatic const uint8_t _message_DISABLE_TXT_INFO[] = {\n    0x01,             // Protocol ID for NMEA\n    0x00, 0x00, 0x00, // Reserved\n    0x03,             // I2C\n    0x03,             // I/O Port 1\n    0x00,             // I/O Port 2\n    0x03,             // USB\n    0x03,             // SPI\n    0x00              // Reserved\n};\n\n// The Power Management configuration allows the GPS module to operate in different power modes for optimized\n// power consumption. The modes supported are: 0x00 = Full power: The module operates at full power with no power\n// saving. 0x01 = Balanced: The module dynamically adjusts the tracking behavior to balance power consumption.\n// 0x02 = Interval: The module operates in a periodic mode, cycling between tracking and power saving states.\n// 0x03 = Aggressive with 1 Hz: The module operates in a power saving mode with a 1 Hz update rate.\n// 0x04 = Aggressive with 2 Hz: The module operates in a power saving mode with a 2 Hz update rate.\n// 0x05 = Aggressive with 4 Hz: The module operates in a power saving mode with a 4 Hz update rate.\n// The 'period' field specifies the position update and search period. It is only valid when the powerSetupValue\n// is set to Interval; otherwise, it must be set to '0'. The 'onTime' field specifies the duration of the ON phase\n// and must be smaller than the period. It is only valid when the powerSetupValue is set to Interval; otherwise,\n// it must be set to '0'.\n// This command applies to M8 products\nstatic const uint8_t _message_PMS[] = {\n    0x00,       // Version (0)\n    0x03,       // Power setup value 3 = Agressive 1Hz\n    0x00, 0x00, // period: not applicable, set to 0\n    0x00, 0x00, // onTime: not applicable, set to 0\n    0x00, 0x00  // reserved, generated by u-center\n};\n\nstatic const uint8_t _message_SAVE[] = {\n    0x00, 0x00, 0x00, 0x00, // clearMask: no sections cleared\n    0xFF, 0xFF, 0x00, 0x00, // saveMask: save all sections\n    0x00, 0x00, 0x00, 0x00, // loadMask: no sections loaded\n    0x17                    // deviceMask: BBR, Flash, EEPROM, and SPI Flash\n};\n\nstatic const uint8_t _message_SAVE_10[] = {\n    0x00, 0x00, 0x00, 0x00, // clearMask: no sections cleared\n    0xFF, 0xFF, 0x00, 0x00, // saveMask: save all sections\n    0x00, 0x00, 0x00, 0x00, // loadMask: no sections loaded\n    0x01                    // deviceMask: only save to BBR\n};\n\n// As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR.\n// BBR will survive a restart, and power off for a while, but modules with small backup\n// batteries or super caps will not retain the config for a long power off time.\n// for all configurations using sleep / low power modes, V_BCKP needs to be hooked to permanent power for fast acquisition after\n// sleep\n\n// VALSET Commands for M10\n// Please refer to the M10 Protocol Specification:\n// https://content.u-blox.com/sites/default/files/u-blox-M10-SPG-5.10_InterfaceDescription_UBX-21035062.pdf\n// Where the VALSET/VALGET/VALDEL commands are described in detail.\n// and:\n// https://content.u-blox.com/sites/default/files/u-blox-M10-ROM-5.10_ReleaseNotes_UBX-22001426.pdf\n// for interesting insights.\n//\n// Integration manual:\n// https://content.u-blox.com/sites/default/files/documents/SAM-M10Q_IntegrationManual_UBX-22020019.pdf\n// has details on low-power modes\n\n/*\nOPERATEMODE E1 2 (0 | 1 | 2)\nPOSUPDATEPERIOD U4 5\nACQPERIOD U4 10\nGRIDOFFSET U4 0\nONTIME U2 1\nMINACQTIME U1 0\nMAXACQTIME U1 0\nDONOTENTEROFF L 1\nWAITTIMEFIX  L 1\nUPDATEEPH L 1\nEXTINTWAKE L 0 no ext ints\nEXTINTBACKUP L 0 no ext ints\nEXTINTINACTIVE L 0 no ext ints\nEXTINTACTIVITY U4 0 no ext ints\nLIMITPEAKCURRENT L 1\n\n// Ram layer config message:\n// b5 62 06 8a 26 00 00 01 00 00 01 00 d0 20 02 02 00 d0 40 05 00 00 00 05 00 d0 30 01 00 08 00 d0 10 01 09 00 d0 10 01 10 00 d0\n// 10 01 8b de\n\n// BBR layer config message:\n// b5 62 06 8a 26 00 00 02 00 00 01 00 d0 20 02 02 00 d0 40 05 00 00 00 05 00 d0 30 01 00 08 00 d0 10 01 09 00 d0 10 01 10 00 d0\n// 10 01 8c 03\n*/\nstatic const uint8_t _message_VALSET_PM_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd0, 0x20, 0x02, 0x02, 0x00, 0xd0, 0x40,\n                                                 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0xd0, 0x30, 0x01, 0x00, 0x08, 0x00, 0xd0,\n                                                 0x10, 0x01, 0x09, 0x00, 0xd0, 0x10, 0x01, 0x10, 0x00, 0xd0, 0x10, 0x01};\nstatic const uint8_t _message_VALSET_PM_BBR[] = {0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0xd0, 0x20, 0x02, 0x02, 0x00, 0xd0, 0x40,\n                                                 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0xd0, 0x30, 0x01, 0x00, 0x08, 0x00, 0xd0,\n                                                 0x10, 0x01, 0x09, 0x00, 0xd0, 0x10, 0x01, 0x10, 0x00, 0xd0, 0x10, 0x01};\n\n/*\nCFG-ITFM replaced by 5 valset messages which can be combined into one for RAM and one for BBR\n\n20410001 bbthreshold U1 3\n20410002 cwthreshold U1 15\n1041000d enable L        0 -> 1\n20410010 ant E1          0\n10410013 enable aux L    0 -> 1\n\n\nb5 62 06 8a 0e 00 00 01 00 00 0d 00 41 10 01 13 00 41 10 01 63 c6\n*/\nstatic const uint8_t _message_VALSET_ITFM_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x0d, 0x00, 0x41,\n                                                   0x10, 0x01, 0x13, 0x00, 0x41, 0x10, 0x01};\nstatic const uint8_t _message_VALSET_ITFM_BBR[] = {0x00, 0x02, 0x00, 0x00, 0x0d, 0x00, 0x41,\n                                                   0x10, 0x01, 0x13, 0x00, 0x41, 0x10, 0x01};\n\n// Turn off all NMEA messages:\n// Ram layer config message:\n// b5 62 06 8a 22 00 00 01 00 00 c0 00 91 20 00 ca 00 91 20 00 c5 00 91 20 00 ac 00 91 20 00 b1 00 91 20 00 bb 00 91 20 00 40 8f\n\n// Disable GLL, GSV, VTG messages in BBR layer\n// BBR layer config message:\n// b5 62 06 8a 13 00 00 02 00 00 ca 00 91 20 00 c5 00 91 20 00 b1 00 91 20 00 f8 4e\n\nstatic const uint8_t _message_VALSET_DISABLE_NMEA_RAM[] = {\n    /*0x00, 0x01, 0x00, 0x00, 0xca, 0x00, 0x91, 0x20, 0x00, 0xc5, 0x00, 0x91, 0x20, 0x00, 0xb1, 0x00, 0x91, 0x20, 0x00 */\n    0x00, 0x01, 0x00, 0x00, 0xc0, 0x00, 0x91, 0x20, 0x00, 0xca, 0x00, 0x91, 0x20, 0x00, 0xc5, 0x00, 0x91,\n    0x20, 0x00, 0xac, 0x00, 0x91, 0x20, 0x00, 0xb1, 0x00, 0x91, 0x20, 0x00, 0xbb, 0x00, 0x91, 0x20, 0x00};\n\nstatic const uint8_t _message_VALSET_DISABLE_NMEA_BBR[] = {0x00, 0x02, 0x00, 0x00, 0xca, 0x00, 0x91, 0x20, 0x00, 0xc5,\n                                                           0x00, 0x91, 0x20, 0x00, 0xb1, 0x00, 0x91, 0x20, 0x00};\n\n// Turn off text info messages:\n// Ram layer config message:\n// b5 62 06 8a 09 00 00 01 00 00 07 00 92 20 06 59 50\n\n// BBR layer config message:\n// b5 62 06 8a 09 00 00 02 00 00 07 00 92 20 06 5a 58\n\n// Turn NMEA GGA, RMC messages on:\n// Layer config messages:\n// RAM:\n// b5 62 06 8a 0e 00 00 01 00 00 bb 00 91 20 01 ac 00 91 20 01 6a 8f\n// BBR:\n// b5 62 06 8a 0e 00 00 02 00 00 bb 00 91 20 01 ac 00 91 20 01 6b 9c\n// FLASH:\n// b5 62 06 8a 0e 00 00 04 00 00 bb 00 91 20 01 ac 00 91 20 01 6d b6\n// Doing this for the FLASH layer isn't really required since we save the config to flash later\n\nstatic const uint8_t _message_VALSET_DISABLE_TXT_INFO_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 0x92, 0x20, 0x03};\nstatic const uint8_t _message_VALSET_DISABLE_TXT_INFO_BBR[] = {0x00, 0x02, 0x00, 0x00, 0x07, 0x00, 0x92, 0x20, 0x03};\n\nstatic const uint8_t _message_VALSET_ENABLE_NMEA_RAM[] = {0x00, 0x01, 0x00, 0x00, 0xbb, 0x00, 0x91,\n                                                          0x20, 0x01, 0xac, 0x00, 0x91, 0x20, 0x01};\nstatic const uint8_t _message_VALSET_ENABLE_NMEA_BBR[] = {0x00, 0x02, 0x00, 0x00, 0xbb, 0x00, 0x91,\n                                                          0x20, 0x01, 0xac, 0x00, 0x91, 0x20, 0x01};\nstatic const uint8_t _message_VALSET_DISABLE_SBAS_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x31,\n                                                           0x10, 0x00, 0x05, 0x00, 0x31, 0x10, 0x00};\nstatic const uint8_t _message_VALSET_DISABLE_SBAS_BBR[] = {0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x31,\n                                                           0x10, 0x00, 0x05, 0x00, 0x31, 0x10, 0x00};\n\n/*\nOperational issues with the M10:\n\nPowerSave doesn't work with SBAS, seems like you can have SBAS enabled, but it will never lock\nonto the SBAS sats.\nPowerSave doesn't work with BDS B1C, u-blox says use B1l instead.\nBDS B1l cannot be enabled with BDS B1C or GLONASS L1OF, so GLONASS will work with B1C, but not B1l\nSo no powersave with GLONASS and BDS B1l enabled.\nSo disable GLONASS and use BDS B1l, which is part of the default M10 config.\n\nGNSS configuration:\n\nDefault GNSS configuration is: GPS, Galileo, BDS B1l, with QZSS and SBAS enabled.\nThe PMREQ puts the receiver to sleep and wakeup re-acquires really fast and seems to not need\nthe PM config. Lets try without it.\nPMREQ sort of works with SBAS, but the awake time is too short to re-acquire any SBAS sats.\nThe definition of \"Got Fix\" doesn't seem to include SBAS. Much more too this...\nEven if it was, it can take minutes (up to 12.5),\neven under good sat visibility conditions to re-acquire the SBAS data.\n\nAnother effect fo the quick transition to sleep is that no other sats will be acquired so the\nsat count will tend to remain at what the initial fix was.\n*/\n\n// GNSS disable SBAS as recommended by u-blox if using GNSS defaults and power save mode\n/*\nRam layer config message:\nb5 62 06 8a 0e 00 00 01 00 00 20 00 31 10 00 05 00 31 10 00 46 87\n\nBBR layer config message:\nb5 62 06 8a 0e 00 00 02 00 00 20 00 31 10 00 05 00 31 10 00 47 94\n*/\n"
  },
  {
    "path": "src/graphics/EInkDisplay2.cpp",
    "content": "#include \"configuration.h\"\n\n#ifdef USE_EINK\n#include \"EInkDisplay2.h\"\n#include \"SPILock.h\"\n#include \"main.h\"\n#include <SPI.h>\n\n#ifdef GXEPD2_DRIVER_0\n#include \"einkDetect.h\"\n#endif\n\n/*\n    The macros EINK_DISPLAY_MODEL, EINK_WIDTH, and EINK_HEIGHT are defined as build_flags in a variant's platformio.ini\n    Previously, these macros were defined at the top of this file.\n\n    For archival reasons, note that the following configurations had also been tested during this period:\n    * ifdef RAK4631\n        - 4.2 inch\n          EINK_DISPLAY_MODEL: GxEPD2_420_M01\n          EINK_WIDTH: 300\n          EINK_WIDTH: 400\n\n        - 2.9 inch\n          EINK_DISPLAY_MODEL: GxEPD2_290_T5D\n          EINK_WIDTH: 296\n          EINK_HEIGHT: 128\n\n        - 1.54 inch\n          EINK_DISPLAY_MODEL: GxEPD2_154_M09\n          EINK_WIDTH: 200\n          EINK_HEIGHT: 200\n*/\n\n// Constructor\nEInkDisplay::EInkDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus)\n{\n    // Set dimensions in OLEDDisplay base class\n    this->geometry = GEOMETRY_RAWMODE;\n    this->displayWidth = EINK_WIDTH;\n    this->displayHeight = EINK_HEIGHT;\n\n    // Round shortest side up to nearest byte, to prevent truncation causing an undersized buffer\n    uint16_t shortSide = min(EINK_WIDTH, EINK_HEIGHT);\n    uint16_t longSide = max(EINK_WIDTH, EINK_HEIGHT);\n    if (shortSide % 8 != 0)\n        shortSide = (shortSide | 7) + 1;\n\n    this->displayBufferSize = longSide * (shortSide / 8);\n}\n\n/**\n * Force a display update if we haven't drawn within the specified msecLimit\n */\nbool EInkDisplay::forceDisplay(uint32_t msecLimit)\n{\n    // No need to grab this lock because we are on our own SPI bus\n    // concurrency::LockGuard g(spiLock);\n\n    uint32_t now = millis();\n    uint32_t sinceLast = now - lastDrawMsec;\n\n    if (adafruitDisplay && (sinceLast > msecLimit || lastDrawMsec == 0))\n        lastDrawMsec = now;\n    else\n        return false;\n\n    // FIXME - only draw bits have changed (use backbuf similar to the other displays)\n    const bool flipped = config.display.flip_screen;\n    // HACK for L1 EInk\n#if defined(SEEED_WIO_TRACKER_L1_EINK)\n    // For SEEED_WIO_TRACKER_L1_EINK, setRotation(3) is correct but mirrored; flip both axes\n    for (uint32_t y = 0; y < displayHeight; y++) {\n        for (uint32_t x = 0; x < displayWidth; x++) {\n            auto b = buffer[x + (y / 8) * displayWidth];\n            auto isset = b & (1 << (y & 7));\n            adafruitDisplay->drawPixel((displayWidth - 1) - x, (displayHeight - 1) - y, isset ? GxEPD_BLACK : GxEPD_WHITE);\n        }\n    }\n#else\n    for (uint32_t y = 0; y < displayHeight; y++) {\n        for (uint32_t x = 0; x < displayWidth; x++) {\n            auto b = buffer[x + (y / 8) * displayWidth];\n            auto isset = b & (1 << (y & 7));\n            if (flipped)\n                adafruitDisplay->drawPixel((displayWidth - 1) - x, (displayHeight - 1) - y, isset ? GxEPD_BLACK : GxEPD_WHITE);\n            else\n                adafruitDisplay->drawPixel(x, y, isset ? GxEPD_BLACK : GxEPD_WHITE);\n        }\n    }\n#endif\n\n    // Trigger the refresh in GxEPD2\n    LOG_DEBUG(\"Update E-Paper\");\n    adafruitDisplay->nextPage();\n\n    // End the update process\n    endUpdate();\n\n    LOG_DEBUG(\"done\");\n    return true;\n}\n\n// End the update process - virtual method, overridden in derived class\nvoid EInkDisplay::endUpdate()\n{\n    // Power off display hardware, then deep-sleep (Except Wireless Paper V1.1, no deep-sleep)\n    adafruitDisplay->hibernate();\n}\n\n// Write the buffer to the display memory\nvoid EInkDisplay::display(void)\n{\n    // We don't allow regular 'dumb' display() calls to draw on eink until we've shown\n    // at least one forceDisplay() keyframe.  This prevents flashing when we should the critical\n    // bootscreen (that we want to look nice)\n\n    if (lastDrawMsec) {\n        forceDisplay(slowUpdateMsec); // Show the first screen a few seconds after boot, then slower\n    }\n}\n\n// Send a command to the display (low level function)\nvoid EInkDisplay::sendCommand(uint8_t com)\n{\n    (void)com;\n    // Drop all commands to device (we just update the buffer)\n}\n\nvoid EInkDisplay::setDetected(uint8_t detected)\n{\n    (void)detected;\n}\n\n// Connect to the display - variant specific\nbool EInkDisplay::connect()\n{\n    LOG_INFO(\"Do EInk init\");\n\n#ifdef PIN_EINK_EN\n    // backlight power, HIGH is backlight on, LOW is off\n    pinMode(PIN_EINK_EN, OUTPUT);\n#ifdef ELECROW_ThinkNode_M1\n    // ThinkNode M1 has a hardware dimmable backlight. Start enabled\n    digitalWrite(PIN_EINK_EN, HIGH);\n#elif defined(MINI_EPAPER_S3)\n    // T-Mini Epaper S3 requires panel power rail enabled before SPI transfer.\n    digitalWrite(PIN_EINK_EN, HIGH);\n    delay(10);\n#else\n    digitalWrite(PIN_EINK_EN, LOW);\n#endif\n#endif\n\n#if defined(TTGO_T_ECHO) || defined(ELECROW_ThinkNode_M1) || defined(T_ECHO_LITE) || defined(TTGO_T_ECHO_PLUS)\n    {\n        auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, SPI1);\n\n        adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n        adafruitDisplay->init();\n#if defined(ELECROW_ThinkNode_M1) || defined(T_ECHO_LITE)\n        adafruitDisplay->setRotation(4);\n#else\n        adafruitDisplay->setRotation(3);\n#endif\n        adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);\n    }\n#elif defined(ELECROW_ThinkNode_M5)\n    {\n        // Start HSPI\n        hspi = new SPIClass(HSPI);\n        hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS\n\n        auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *hspi);\n\n        adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n        adafruitDisplay->init();\n\n        adafruitDisplay->setRotation(4);\n\n        adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);\n    }\n#elif defined(MESHLINK)\n    {\n        auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, SPI1);\n\n        adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n        adafruitDisplay->init();\n        adafruitDisplay->setRotation(3);\n        adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);\n    }\n#elif defined(RAK4630) || defined(MAKERPYTHON)\n    {\n        if (eink_found) {\n            auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);\n            adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n            adafruitDisplay->init(115200, true, 10, false, SPI1, SPISettings(4000000, MSBFIRST, SPI_MODE0));\n            // RAK14000 2.13 inch b/w 250x122 does actually now support fast refresh\n            adafruitDisplay->setRotation(3);\n            // Fast refresh support for  1.54, 2.13 RAK14000 b/w , 2.9 and 4.2\n            // adafruitDisplay->setRotation(1);\n            adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight);\n        } else {\n            (void)adafruitDisplay;\n        }\n    }\n\n#elif defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E290) || defined(TLORA_T3S3_EPAPER) ||                 \\\n    defined(CROWPANEL_ESP32S3_5_EPAPER) || defined(CROWPANEL_ESP32S3_4_EPAPER) || defined(CROWPANEL_ESP32S3_2_EPAPER) ||         \\\n    defined(MINI_EPAPER_S3)\n    {\n        // Start HSPI\n        hspi = new SPIClass(HSPI);\n        hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS\n        // VExt already enabled in setup()\n        // RTC GPIO hold disabled in setup()\n\n        // Create GxEPD2 objects\n        auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *hspi);\n        adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n\n        // Init GxEPD2\n        adafruitDisplay->init();\n#if defined(MINI_EPAPER_S3)\n        adafruitDisplay->setRotation(3);\n#else\n        adafruitDisplay->setRotation(3);\n#if defined(CROWPANEL_ESP32S3_5_EPAPER) || defined(CROWPANEL_ESP32S3_4_EPAPER)\n        adafruitDisplay->setRotation(0);\n#endif\n#endif\n    }\n#elif defined(PCA10059) || defined(ME25LS01)\n    {\n        auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);\n        adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n        adafruitDisplay->init(115200, true, 40, false, SPI1, SPISettings(4000000, MSBFIRST, SPI_MODE0));\n        adafruitDisplay->setRotation(0);\n        adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);\n    }\n#elif defined(M5_COREINK) || defined(T_DECK_PRO)\n    auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);\n    adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n    adafruitDisplay->init(115200, true, 40, false, SPI, SPISettings(4000000, MSBFIRST, SPI_MODE0));\n    adafruitDisplay->setRotation(0);\n    adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);\n#elif defined(my) || defined(ESP32_S3_PICO)\n    {\n        auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);\n        adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n        adafruitDisplay->init(115200, true, 40, false, SPI, SPISettings(4000000, MSBFIRST, SPI_MODE0));\n        adafruitDisplay->setRotation(1);\n        adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);\n    }\n#elif defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK)\n    {\n        spi1 = &SPI1;\n        spi1->begin();\n        // VExt already enabled in setup()\n        // RTC GPIO hold disabled in setup()\n\n        // Create GxEPD2 objects\n        auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *spi1);\n        adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);\n\n        // Init GxEPD2\n        adafruitDisplay->init();\n        adafruitDisplay->setRotation(3);\n        adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);\n    }\n#elif defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213)\n\n    // Detect display model, before starting SPI\n    EInkDetectionResult displayModel = detectEInk();\n\n    // Start HSPI\n    hspi = new SPIClass(HSPI);\n    hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS\n\n    // Create GxEPD2 object\n    adafruitDisplay = new GxEPD2_Multi<GXEPD2_DRIVER_0, GXEPD2_DRIVER_1>((uint8_t)displayModel, PIN_EINK_CS, PIN_EINK_DC,\n                                                                         PIN_EINK_RES, PIN_EINK_BUSY, *hspi);\n\n    // Init GxEPD2\n    adafruitDisplay->init();\n    adafruitDisplay->setRotation(3);\n\n#endif\n\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/EInkDisplay2.h",
    "content": "#pragma once\n\n#ifdef USE_EINK\n\n#include \"GxEPD2_BW.h\"\n#include <OLEDDisplay.h>\n\n#ifdef GXEPD2_DRIVER_0 // If variant has multiple possible display models\n#include \"GxEPD2Multi.h\"\n#endif\n\n// Limit how often we push a full E-Ink refresh. T-Deck Pro needs faster updates for typing.\n#ifndef EINK_FORCE_DISPLAY_THROTTLE_MS\n#if defined(T_DECK_PRO)\n#define EINK_FORCE_DISPLAY_THROTTLE_MS 200\n#else\n#define EINK_FORCE_DISPLAY_THROTTLE_MS 1000\n#endif\n#endif\n\n/**\n * An adapter class that allows using the GxEPD2 library as if it was an OLEDDisplay implementation.\n *\n * Note: EInkDynamicDisplay derives from this class.\n *\n * Remaining TODO:\n * optimize display() to only draw changed pixels (see other OLED subclasses for examples)\n * implement displayOn/displayOff to turn off the TFT device (and backlight)\n * Use the fast NRF52 SPI API rather than the slow standard arduino version\n *\n * turn radio back on - currently with both on spi bus is fucked? or are we leaving chip select asserted?\n * Suggestion: perhaps similar to HELTEC_WIRELESS_PAPER issue, which resolved with rtc_gpio_hold_dis()\n */\nclass EInkDisplay : public OLEDDisplay\n{\n    /// How often should we update the display\n    /// thereafter we do once per 5 minutes\n    uint32_t slowUpdateMsec = 5 * 60 * 1000;\n\n  public:\n    /* constructor\n    FIXME - the parameters are not used, just a temporary hack to keep working like the old displays\n    */\n    EInkDisplay(uint8_t, int, int, OLEDDISPLAY_GEOMETRY, HW_I2C);\n\n    // Write the buffer to the display memory (for eink we only do this occasionally)\n    virtual void display(void) override;\n\n    /**\n     * Force a display update if we haven't drawn within the specified msecLimit\n     *\n     * @return true if we did draw the screen\n     */\n    virtual bool forceDisplay(uint32_t msecLimit = EINK_FORCE_DISPLAY_THROTTLE_MS);\n\n    /**\n     * Run any code needed to complete an update, after the physical refresh has completed.\n     * Split from forceDisplay(), to enable async refresh in derived EInkDynamicDisplay class.\n     *\n     */\n    virtual void endUpdate();\n\n    /**\n     * shim to make the abstraction happy\n     *\n     */\n    void setDetected(uint8_t detected);\n\n  protected:\n    // the header size of the buffer used, e.g. for the SPI command header\n    virtual int getBufferOffset(void) override { return 0; }\n\n    // Send a command to the display (low level function)\n    virtual void sendCommand(uint8_t com) override;\n\n    // Connect to the display\n    virtual bool connect() override;\n\n#ifdef GXEPD2_DRIVER_0\n    // AdafruitGFX display object - wrapper for multiple drivers\n    // Allows runtime detection of multiple displays\n    // Avoid this situation if possible!\n    GxEPD2_Multi<GXEPD2_DRIVER_0, GXEPD2_DRIVER_1> *adafruitDisplay = NULL;\n#else\n    // AdafruitGFX display object (for single display model) - instantiated in connect(), variant specific\n    GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT> *adafruitDisplay = NULL;\n#endif\n\n    // If display uses HSPI\n#if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E213) ||               \\\n    defined(HELTEC_VISION_MASTER_E290) || defined(TLORA_T3S3_EPAPER) || defined(CROWPANEL_ESP32S3_5_EPAPER) ||                   \\\n    defined(CROWPANEL_ESP32S3_4_EPAPER) || defined(CROWPANEL_ESP32S3_2_EPAPER) || defined(ELECROW_ThinkNode_M5) ||               \\\n    defined(MINI_EPAPER_S3)\n    SPIClass *hspi = NULL;\n#endif\n\n#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK)\n    SPIClass *spi1 = NULL;\n#endif\n\n  private:\n    // FIXME quick hack to limit drawing to a very slow rate\n    uint32_t lastDrawMsec = 0;\n};\n\n#endif\n"
  },
  {
    "path": "src/graphics/EInkDynamicDisplay.cpp",
    "content": "#include \"Throttle.h\"\n#include \"configuration.h\"\n\n#if defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY)\n#include \"EInkDynamicDisplay.h\"\n\n// Constructor\nEInkDynamicDisplay::EInkDynamicDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus)\n    : EInkDisplay(address, sda, scl, geometry, i2cBus), NotifiedWorkerThread(\"EInkDynamicDisplay\")\n{\n    // If tracking ghost pixels, grab memory\n#ifdef EINK_LIMIT_GHOSTING_PX\n    dirtyPixels = std::unique_ptr<uint8_t[]>(new uint8_t[EInkDisplay::displayBufferSize]()); // Init with zeros\n#endif\n}\n\n// Destructor\nEInkDynamicDisplay::~EInkDynamicDisplay()\n{\n    // If we were tracking ghost pixels, free the memory\n#ifdef EINK_LIMIT_GHOSTING_PX\n    dirtyPixels = nullptr;\n#endif\n}\n\n// Screen requests a BACKGROUND frame\nvoid EInkDynamicDisplay::display()\n{\n    addFrameFlag(BACKGROUND);\n    update();\n}\n\n// Screen requests a RESPONSIVE frame\nbool EInkDynamicDisplay::forceDisplay(uint32_t msecLimit)\n{\n    addFrameFlag(RESPONSIVE);\n    return update(); // (Unutilized) Base class promises to return true if update ran\n}\n\n// Add flag for the next frame\nvoid EInkDynamicDisplay::addFrameFlag(frameFlagTypes flag)\n{\n    // OR the new flag into the existing flags\n    this->frameFlags = (frameFlagTypes)(this->frameFlags | flag);\n}\n\n// GxEPD2 code to set fast refresh\nvoid EInkDynamicDisplay::configForFastRefresh()\n{\n    // Variant-specific code can go here\n#if defined(PRIVATE_HW)\n#else\n    // Otherwise:\n    adafruitDisplay->setPartialWindow(0, 0, adafruitDisplay->width(), adafruitDisplay->height());\n#endif\n}\n\n// GxEPD2 code to set full refresh\nvoid EInkDynamicDisplay::configForFullRefresh()\n{\n    // Variant-specific code can go here\n#if defined(PRIVATE_HW)\n#else\n    // Otherwise:\n    adafruitDisplay->setFullWindow();\n#endif\n}\n\n// Run any relevant GxEPD2 code, so next update will use correct refresh type\nvoid EInkDynamicDisplay::applyRefreshMode()\n{\n    // Change from FULL to FAST\n    if (currentConfig == FULL && refresh == FAST) {\n        configForFastRefresh();\n        currentConfig = FAST;\n    }\n\n    // Change from FAST back to FULL\n    else if (currentConfig == FAST && refresh == FULL) {\n        configForFullRefresh();\n        currentConfig = FULL;\n    }\n}\n\n// Update fastRefreshCount\nvoid EInkDynamicDisplay::adjustRefreshCounters()\n{\n    if (refresh == FAST)\n        fastRefreshCount++;\n\n    else if (refresh == FULL)\n        fastRefreshCount = 0;\n}\n\n// Trigger the display update by calling base class\nbool EInkDynamicDisplay::update()\n{\n    // Determine the refresh mode to use, and start the update\n    bool refreshApproved = determineMode();\n    if (refreshApproved) {\n        EInkDisplay::forceDisplay(0); // Bypass base class' own rate-limiting system\n        storeAndReset();              // Store the result of this loop for next time. Note: call *before* endOrDetach()\n        endOrDetach();                // endUpdate() right now, or set the async refresh flag (if FULL and HAS_EINK_ASYNCFULL)\n    } else\n        storeAndReset(); // No update, no post-update code, just store the results\n\n    return refreshApproved; // (Unutilized) Base class promises to return true if update ran\n}\n\n// Figure out who runs the post-update code\nvoid EInkDynamicDisplay::endOrDetach()\n{\n    // If the GxEPD2 version reports that it has the async modifications\n#ifdef HAS_EINK_ASYNCFULL\n    if (previousRefresh == FULL) {\n        asyncRefreshRunning = true; // Set the flag - checked in determineMode(); cleared by onNotify()\n\n        if (previousFrameFlags & BLOCKING)\n            awaitRefresh();\n        else {\n            // Async begins\n            LOG_DEBUG(\"Async full-refresh begins (drop frames)\");\n            notifyLater(intervalPollAsyncRefresh, DUE_POLL_ASYNCREFRESH, true); // Hand-off to NotifiedWorkerThread\n        }\n    }\n\n    // Fast Refresh\n    else if (previousRefresh == FAST)\n        EInkDisplay::endUpdate(); // Still block while updating, but EInkDisplay needs us to call endUpdate() ourselves.\n\n        // Fallback - If using an unmodified version of GxEPD2 for some reason\n#else\n    if (previousRefresh == FULL || previousRefresh == FAST) { // If refresh wasn't skipped (on unspecified..)\n        LOG_WARN(\n            \"GxEPD2 version has not been modified to support async refresh; using fallback behavior. Please update lib_deps in \"\n            \"variant's platformio.ini file\");\n        EInkDisplay::endUpdate();\n    }\n#endif\n}\n\n// Assess situation, pick a refresh type\nbool EInkDynamicDisplay::determineMode()\n{\n    checkInitialized();\n    checkForPromotion();\n#if defined(HAS_EINK_ASYNCFULL)\n    checkBusyAsyncRefresh();\n#endif\n    checkRateLimiting();\n\n    // If too soon for a new frame, or display busy, abort early\n    if (refresh == SKIPPED)\n        return false; // No refresh\n\n    // -- New frame is due --\n\n    resetRateLimiting(); // Once determineMode() ends, will have to wait again\n    hashImage();         // Generate here, so we can still copy it to previousImageHash, even if we skip the comparison check\n    LOG_DEBUG(\"determineMode(): \"); // Begin log entry\n\n    // Once mode determined, any remaining checks will bypass\n    checkCosmetic();\n    checkDemandingFast();\n    checkFrameMatchesPrevious();\n    checkConsecutiveFastRefreshes();\n#ifdef EINK_LIMIT_GHOSTING_PX\n    checkExcessiveGhosting();\n#endif\n    checkFastRequested();\n\n    if (refresh == UNSPECIFIED)\n        LOG_WARN(\"There was a flaw in the determineMode() logic\");\n\n    // -- Decision has been reached --\n    applyRefreshMode();\n    adjustRefreshCounters();\n\n#ifdef EINK_LIMIT_GHOSTING_PX\n    // Full refresh clears any ghosting\n    if (refresh == FULL)\n        resetGhostPixelTracking();\n#endif\n\n    // Return - call a refresh or not?\n    if (refresh == SKIPPED)\n        return false; // Don't trigger a refresh\n    else\n        return true; // Do trigger a refresh\n}\n\n// Is this the very first frame?\nvoid EInkDynamicDisplay::checkInitialized()\n{\n    if (!initialized) {\n        // Undo GxEPD2_BW::partialWindow(), if set by developer in EInkDisplay::connect()\n        configForFullRefresh();\n\n        // Clear any existing image, so we can draw logo with fast-refresh, but also to set GxEPD2_EPD::_initial_write\n        adafruitDisplay->clearScreen();\n\n        LOG_DEBUG(\"initialized, \");\n        initialized = true;\n\n        // Use a fast-refresh for the next frame; no skipping or else blank screen when waking from deep sleep\n        addFrameFlag(DEMAND_FAST);\n    }\n}\n\n// Was a frame skipped (rate, display busy) that should have been a FAST refresh?\nvoid EInkDynamicDisplay::checkForPromotion()\n{\n    // If a frame was skipped (rate, display busy), then promote a BACKGROUND frame\n    // Because we DID want a RESPONSIVE/COSMETIC/DEMAND_FULL frame last time, we just didn't get it\n\n    switch (previousReason) {\n    case ASYNC_REFRESH_BLOCKED_DEMANDFAST:\n        addFrameFlag(DEMAND_FAST);\n        break;\n    case ASYNC_REFRESH_BLOCKED_COSMETIC:\n        addFrameFlag(COSMETIC);\n        break;\n    case ASYNC_REFRESH_BLOCKED_RESPONSIVE:\n    case EXCEEDED_RATELIMIT_FAST:\n        addFrameFlag(RESPONSIVE);\n        break;\n    default:\n        break;\n    }\n}\n\n// Is it too soon for another frame of this type?\nvoid EInkDynamicDisplay::checkRateLimiting()\n{\n    // Sanity check: millis() overflow - just let the update run..\n    if (previousRunMs > millis())\n        return;\n\n    // Skip update: too soon for BACKGROUND\n    if (frameFlags == BACKGROUND) {\n        if (Throttle::isWithinTimespanMs(previousRunMs, 30000)) {\n            refresh = SKIPPED;\n            reason = EXCEEDED_RATELIMIT_FULL;\n            return;\n        }\n    }\n\n    // No rate-limit for these special cases\n    if (frameFlags & COSMETIC || frameFlags & DEMAND_FAST)\n        return;\n\n    // Skip update: too soon for RESPONSIVE\n    if (frameFlags & RESPONSIVE) {\n        if (Throttle::isWithinTimespanMs(previousRunMs, 1000)) {\n            refresh = SKIPPED;\n            reason = EXCEEDED_RATELIMIT_FAST;\n            LOG_DEBUG(\"refresh=SKIPPED, reason=EXCEEDED_RATELIMIT_FAST, frameFlags=0x%x\", frameFlags);\n            return;\n        }\n    }\n}\n\n// Is this frame COSMETIC (splash screens?)\nvoid EInkDynamicDisplay::checkCosmetic()\n{\n    // If a decision was already reached, don't run the check\n    if (refresh != UNSPECIFIED)\n        return;\n\n    // A full refresh is requested for cosmetic purposes: we have a decision\n    if (frameFlags & COSMETIC) {\n        refresh = FULL;\n        reason = FLAGGED_COSMETIC;\n        LOG_DEBUG(\"refresh=FULL, reason=FLAGGED_COSMETIC, frameFlags=0x%x\", frameFlags);\n    }\n}\n\n// Is this a one-off special circumstance, where we REALLY want a fast refresh?\nvoid EInkDynamicDisplay::checkDemandingFast()\n{\n    // If a decision was already reached, don't run the check\n    if (refresh != UNSPECIFIED)\n        return;\n\n    // A fast refresh is demanded: we have a decision\n    if (frameFlags & DEMAND_FAST) {\n        refresh = FAST;\n        reason = FLAGGED_DEMAND_FAST;\n        LOG_DEBUG(\"refresh=FAST, reason=FLAGGED_DEMAND_FAST, frameFlags=0x%x\", frameFlags);\n    }\n}\n\n// Does the new frame match the currently displayed image?\nvoid EInkDynamicDisplay::checkFrameMatchesPrevious()\n{\n    // If a decision was already reached, don't run the check\n    if (refresh != UNSPECIFIED)\n        return;\n\n    // If frame is *not* a duplicate, abort the check\n    if (imageHash != previousImageHash)\n        return;\n\n#if !defined(EINK_BACKGROUND_USES_FAST)\n    // If BACKGROUND, and last update was FAST: redraw the same image in FULL (for display health + image quality)\n    if (frameFlags == BACKGROUND && fastRefreshCount > 0) {\n        refresh = FULL;\n        reason = REDRAW_WITH_FULL;\n        LOG_DEBUG(\"refresh=FULL, reason=REDRAW_WITH_FULL, frameFlags=0x%x\", frameFlags);\n        return;\n    }\n#endif\n\n    // Not redrawn, not COSMETIC, not DEMAND_FAST\n    refresh = SKIPPED;\n    reason = FRAME_MATCHED_PREVIOUS;\n    LOG_DEBUG(\"refresh=SKIPPED, reason=FRAME_MATCHED_PREVIOUS, frameFlags=0x%x\", frameFlags);\n}\n\n// Have too many fast-refreshes occurred consecutively, since last full refresh?\nvoid EInkDynamicDisplay::checkConsecutiveFastRefreshes()\n{\n    // If a decision was already reached, don't run the check\n    if (refresh != UNSPECIFIED)\n        return;\n\n    // Bypass limit if UNLIMITED_FAST mode is active\n    if (frameFlags & UNLIMITED_FAST) {\n        refresh = FAST;\n        reason = NO_OBJECTIONS;\n        LOG_DEBUG(\"refresh=FAST, reason=UNLIMITED_FAST_MODE_ACTIVE, frameFlags=0x%x\", frameFlags);\n        return;\n    }\n\n    // If too many FAST refreshes consecutively - force a FULL refresh\n    if (fastRefreshCount >= EINK_LIMIT_FASTREFRESH) {\n        refresh = FULL;\n        reason = EXCEEDED_LIMIT_FASTREFRESH;\n        LOG_DEBUG(\"refresh=FULL, reason=EXCEEDED_LIMIT_FASTREFRESH, frameFlags=0x%x\", frameFlags);\n    }\n}\n\n// No objections, we can perform fast-refresh, if desired\nvoid EInkDynamicDisplay::checkFastRequested()\n{\n    if (refresh != UNSPECIFIED)\n        return;\n\n    if (frameFlags == BACKGROUND) {\n#ifdef EINK_BACKGROUND_USES_FAST\n        // If we want BACKGROUND to use fast. (FULL only when a limit is hit)\n        refresh = FAST;\n        reason = BACKGROUND_USES_FAST;\n        LOG_DEBUG(\"refresh=FAST, reason=BACKGROUND_USES_FAST, fastRefreshCount=%lu, frameFlags=0x%x\", fastRefreshCount,\n                  frameFlags);\n#else\n        // If we do want to use FULL for BACKGROUND updates\n        refresh = FULL;\n        reason = FLAGGED_BACKGROUND;\n        LOG_DEBUG(\"refresh=FULL, reason=FLAGGED_BACKGROUND\");\n#endif\n    }\n\n    // Sanity: confirm that we did ask for a RESPONSIVE frame.\n    if (frameFlags & RESPONSIVE) {\n        refresh = FAST;\n        reason = NO_OBJECTIONS;\n        LOG_DEBUG(\"refresh=FAST, reason=NO_OBJECTIONS, fastRefreshCount=%lu, frameFlags=0x%x\", fastRefreshCount, frameFlags);\n    }\n}\n\n// Reset the timer used for rate-limiting\nvoid EInkDynamicDisplay::resetRateLimiting()\n{\n    previousRunMs = millis();\n}\n\n// Generate a hash of this frame, to compare against previous update\nvoid EInkDynamicDisplay::hashImage()\n{\n    imageHash = 0;\n\n    // Sum all bytes of the image buffer together\n    for (uint16_t b = 0; b < (displayWidth / 8) * displayHeight; b++) {\n        imageHash ^= buffer[b] << b;\n    }\n}\n\n// Store the results of determineMode() for future use, and reset for next call\nvoid EInkDynamicDisplay::storeAndReset()\n{\n    previousFrameFlags = frameFlags;\n    previousRefresh = refresh;\n    previousReason = reason;\n\n    // Only store image hash if the display will update\n    if (refresh != SKIPPED) {\n        previousImageHash = imageHash;\n    }\n\n    frameFlags = BACKGROUND;\n    refresh = UNSPECIFIED;\n}\n\n#ifdef EINK_LIMIT_GHOSTING_PX\n// Count how many ghost pixels the new image will display\nvoid EInkDynamicDisplay::countGhostPixels()\n{\n    // If a decision was already reached, don't run the check\n    if (refresh != UNSPECIFIED)\n        return;\n\n    // Start a new count\n    ghostPixelCount = 0;\n\n    // Check new image, bit by bit, for any white pixels at locations marked \"dirty\"\n    for (uint16_t i = 0; i < displayBufferSize; i++) {\n        for (uint8_t bit = 0; bit < 7; bit++) {\n\n            const bool dirty = (dirtyPixels[i] >> bit) & 1;       // Has pixel location been drawn to since full-refresh?\n            const bool shouldBeBlank = !((buffer[i] >> bit) & 1); // Is pixel location white in the new image?\n\n            // If pixel is (or has been) black since last full-refresh, and now is white: ghosting\n            if (dirty && shouldBeBlank)\n                ghostPixelCount++;\n\n            // Update the dirty status for this pixel - will this location become a ghost if set white in future?\n            if (!dirty && !shouldBeBlank)\n                dirtyPixels[i] |= (1 << bit);\n        }\n    }\n\n    LOG_DEBUG(\"ghostPixels=%hu, \", ghostPixelCount);\n}\n\n// Check if ghost pixel count exceeds the defined limit\nvoid EInkDynamicDisplay::checkExcessiveGhosting()\n{\n    // If a decision was already reached, don't run the check\n    if (refresh != UNSPECIFIED)\n        return;\n\n    countGhostPixels();\n\n    // If too many ghost pixels, select full refresh\n    if (ghostPixelCount > EINK_LIMIT_GHOSTING_PX) {\n        refresh = FULL;\n        reason = EXCEEDED_GHOSTINGLIMIT;\n        LOG_DEBUG(\"refresh=FULL, reason=EXCEEDED_GHOSTINGLIMIT, frameFlags=0x%x\", frameFlags);\n    }\n}\n\n// Clear the dirty pixels array. Call when full-refresh cleans the display.\nvoid EInkDynamicDisplay::resetGhostPixelTracking()\n{\n    // Copy the current frame into dirtyPixels[] from the display buffer\n    memcpy(dirtyPixels.get(), EInkDisplay::buffer, EInkDisplay::displayBufferSize);\n}\n#endif // EINK_LIMIT_GHOSTING_PX\n\n// Handle any asyc tasks\nvoid EInkDynamicDisplay::onNotify(uint32_t notification)\n{\n    // Which task\n    switch (notification) {\n    case DUE_POLL_ASYNCREFRESH:\n        pollAsyncRefresh();\n        break;\n    }\n}\n\n#ifdef HAS_EINK_ASYNCFULL\n// Public: wait for an refresh already in progress, then run the post-update code. See Screen::setScreensaverFrames()\nvoid EInkDynamicDisplay::joinAsyncRefresh()\n{\n    // If no async refresh running, nothing to do\n    if (!asyncRefreshRunning)\n        return;\n\n    LOG_DEBUG(\"Join an async refresh in progress\");\n\n    // Continually poll the BUSY pin\n    while (adafruitDisplay->epd2.isBusy())\n        yield();\n\n    // If asyncRefreshRunning flag is still set, but display's BUSY pin reports the refresh is done\n    adafruitDisplay->endAsyncFull(); // Run the end of nextPage() code\n    EInkDisplay::endUpdate();        // Run base-class code to finish off update (NOT our derived class override)\n    asyncRefreshRunning = false;     // Unset the flag\n    LOG_DEBUG(\"Refresh complete\");\n\n    // Note: this code only works because of a modification to meshtastic/GxEPD2.\n    // It is only equipped to intercept calls to nextPage()\n}\n\n// Called from NotifiedWorkerThread. Run the post-update code if the hardware is ready\nvoid EInkDynamicDisplay::pollAsyncRefresh()\n{\n    // In theory, this condition should never be met\n    if (!asyncRefreshRunning)\n        return;\n\n    // Still running, check back later\n    if (adafruitDisplay->epd2.isBusy()) {\n        // Schedule next call of pollAsyncRefresh()\n        NotifiedWorkerThread::notifyLater(intervalPollAsyncRefresh, DUE_POLL_ASYNCREFRESH, true);\n        return;\n    }\n\n    // If asyncRefreshRunning flag is still set, but display's BUSY pin reports the refresh is done\n    adafruitDisplay->endAsyncFull(); // Run the end of nextPage() code\n    EInkDisplay::endUpdate();        // Run base-class code to finish off update (NOT our derived class override)\n    asyncRefreshRunning = false;     // Unset the flag\n    LOG_DEBUG(\"Async full-refresh complete\");\n\n    // Note: this code only works because of a modification to meshtastic/GxEPD2.\n    // It is only equipped to intercept calls to nextPage()\n}\n\n// Check the status of \"async full-refresh\"; skip if running\nvoid EInkDynamicDisplay::checkBusyAsyncRefresh()\n{\n    // No refresh taking place, continue with determineMode()\n    if (!asyncRefreshRunning)\n        return;\n\n    // Full refresh still running\n    if (adafruitDisplay->epd2.isBusy()) {\n        // No refresh\n        refresh = SKIPPED;\n\n        // Set the reason, marking what type of frame we're skipping\n        if (frameFlags & DEMAND_FAST)\n            reason = ASYNC_REFRESH_BLOCKED_DEMANDFAST;\n        else if (frameFlags & COSMETIC)\n            reason = ASYNC_REFRESH_BLOCKED_COSMETIC;\n        else if (frameFlags & RESPONSIVE)\n            reason = ASYNC_REFRESH_BLOCKED_RESPONSIVE;\n        else\n            reason = ASYNC_REFRESH_BLOCKED_BACKGROUND;\n\n        return;\n    }\n\n    // Async refresh appears to have stopped, but wasn't caught by onNotify()\n    else\n        pollAsyncRefresh(); // Check (and terminate) the async refresh manually\n}\n\n// Hold control while an async refresh runs\nvoid EInkDynamicDisplay::awaitRefresh()\n{\n    // Continually poll the BUSY pin\n    while (adafruitDisplay->epd2.isBusy())\n        yield();\n\n    // End the full-refresh process\n    adafruitDisplay->endAsyncFull(); // Run the end of nextPage() code\n    EInkDisplay::endUpdate();        // Run base-class code to finish off update (NOT our derived class override)\n    asyncRefreshRunning = false;     // Unset the flag\n}\n#endif // HAS_EINK_ASYNCFULL\n\n#endif // USE_EINK_DYNAMICDISPLAY\n"
  },
  {
    "path": "src/graphics/EInkDynamicDisplay.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#include <memory>\n\n#if defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY)\n\n#include \"EInkDisplay2.h\"\n#include \"GxEPD2_BW.h\"\n#include \"concurrency/NotifiedWorkerThread.h\"\n\n/*\n    Derives from the EInkDisplay adapter class.\n    Accepts suggestions from Screen class about frame type.\n    Determines which refresh type is most suitable.\n    (Full, Fast, Skip)\n*/\n\nclass EInkDynamicDisplay : public EInkDisplay, protected concurrency::NotifiedWorkerThread\n{\n  public:\n    // Constructor\n    // ( Parameters unused, passed to EInkDisplay. Maintains compatibility OLEDDisplay class )\n    EInkDynamicDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus);\n    ~EInkDynamicDisplay();\n\n    // Methods to enable or disable unlimited fast refresh mode\n    void enableUnlimitedFastMode() { addFrameFlag(UNLIMITED_FAST); }\n    void disableUnlimitedFastMode() { frameFlags = (frameFlagTypes)(frameFlags & ~UNLIMITED_FAST); }\n\n    // What kind of frame is this\n    enum frameFlagTypes : uint8_t {\n        BACKGROUND = (1 << 0),  // For frames via display()\n        RESPONSIVE = (1 << 1),  // For frames via forceDisplay()\n        COSMETIC = (1 << 2),    // For splashes\n        DEMAND_FAST = (1 << 3), // Special case only\n        BLOCKING = (1 << 4),    // Modifier - block while refresh runs\n        UNLIMITED_FAST = (1 << 5)\n    };\n    void addFrameFlag(frameFlagTypes flag);\n\n    // Set the correct frame flag, then call universal \"update()\" method\n    void display() override;\n    bool forceDisplay(uint32_t msecLimit) override; // Shadows base class. Parameter and return val unused.\n\n  protected:\n    enum refreshTypes : uint8_t { // Which refresh operation will be used\n        UNSPECIFIED,\n        FULL,\n        FAST,\n        SKIPPED,\n    };\n    enum reasonTypes : uint8_t { // How was the decision reached\n        NO_OBJECTIONS,\n        ASYNC_REFRESH_BLOCKED_DEMANDFAST,\n        ASYNC_REFRESH_BLOCKED_COSMETIC,\n        ASYNC_REFRESH_BLOCKED_RESPONSIVE,\n        ASYNC_REFRESH_BLOCKED_BACKGROUND,\n        EXCEEDED_RATELIMIT_FAST,\n        EXCEEDED_RATELIMIT_FULL,\n        FLAGGED_COSMETIC,\n        FLAGGED_DEMAND_FAST,\n        EXCEEDED_LIMIT_FASTREFRESH,\n        EXCEEDED_GHOSTINGLIMIT,\n        FRAME_MATCHED_PREVIOUS,\n        BACKGROUND_USES_FAST,\n        FLAGGED_BACKGROUND,\n        REDRAW_WITH_FULL,\n    };\n\n    enum notificationTypes : uint8_t { // What was onNotify() called for\n        NONE = 0,                      // This behavior (NONE=0) is fixed by NotifiedWorkerThread class\n        DUE_POLL_ASYNCREFRESH = 1,\n    };\n    const uint32_t intervalPollAsyncRefresh = 100;\n\n    void onNotify(uint32_t notification) override; // Handle any async tasks - overrides NotifiedWorkerThread\n    void configForFastRefresh();                   // GxEPD2 code to set fast-refresh\n    void configForFullRefresh();                   // GxEPD2 code to set full-refresh\n    bool determineMode();                          // Assess situation, pick a refresh type\n    void applyRefreshMode();                       // Run any relevant GxEPD2 code, so next update will use correct refresh type\n    void adjustRefreshCounters();                  // Update fastRefreshCount\n    bool update();                                 // Trigger the display update - determine mode, then call base class\n    void endOrDetach();                            // Run the post-update code, or delegate it off to checkBusyAsyncRefresh()\n\n    // Checks as part of determineMode()\n    void checkInitialized();              // Is this the very first frame?\n    void checkForPromotion();             // Was a frame skipped (rate, display busy) that should have been a FAST refresh?\n    void checkRateLimiting();             // Is this frame too soon?\n    void checkCosmetic();                 // Was the COSMETIC flag set?\n    void checkDemandingFast();            // Was the DEMAND_FAST flag set?\n    void checkFrameMatchesPrevious();     // Does the new frame match the existing display image?\n    void checkConsecutiveFastRefreshes(); // Too many fast-refreshes consecutively?\n    void checkFastRequested();            // Was the flag set for RESPONSIVE, or only BACKGROUND?\n\n    void resetRateLimiting(); // Set previousRunMs - this now counts as an update, for rate-limiting\n    void hashImage();         // Generate a hashed version of this frame, to compare against previous update\n    void storeAndReset();     // Keep results of determineMode() for later, tidy-up for next call\n\n    // What we are determining for this frame\n    frameFlagTypes frameFlags = BACKGROUND; // Frame characteristics - determineMode() input\n    refreshTypes refresh = UNSPECIFIED;     // Refresh type - determineMode() output\n    reasonTypes reason = NO_OBJECTIONS;     // Reason - why was refresh type used\n\n    // What happened last time determineMode() ran\n    frameFlagTypes previousFrameFlags = BACKGROUND; // (Previous) Frame flags\n    refreshTypes previousRefresh = UNSPECIFIED;     // (Previous) Outcome\n    reasonTypes previousReason = NO_OBJECTIONS;     // (Previous) Reason\n\n    bool initialized = false;          // Have we drawn at least one frame yet?\n    uint32_t previousRunMs = -1;       // When did determineMode() last run (rather than rejecting for rate-limiting)\n    uint32_t imageHash = 0;            // Hash of the current frame. Don't bother updating if nothing has changed!\n    uint32_t previousImageHash = 0;    // Hash of the previous update's frame\n    uint32_t fastRefreshCount = 0;     // How many fast-refreshes consecutively since last full refresh?\n    refreshTypes currentConfig = FULL; // Which refresh type is GxEPD2 currently configured for\n\n    // Optional - track ghosting, pixel by pixel\n    // May 2024: no longer used by any display. Kept for possible future use.\n#ifdef EINK_LIMIT_GHOSTING_PX\n    void countGhostPixels();                // Count any pixels which have moved from black to white since last full-refresh\n    void checkExcessiveGhosting();          // Check if ghosting exceeds defined limit\n    void resetGhostPixelTracking();         // Clear the dirty pixels array. Call when full-refresh cleans the display.\n    std::unique_ptr<uint8_t[]> dirtyPixels; // Any pixels that have been black since last full-refresh (dynamically allocated mem)\n    uint32_t ghostPixelCount = 0;           // Number of pixels with problematic ghosting. Retained here for LOG_DEBUG use\n#endif\n\n    // Conditional - async full refresh - only with modified meshtastic/GxEPD2\n#if defined(HAS_EINK_ASYNCFULL)\n  public:\n    void joinAsyncRefresh(); // Main thread joins an async refresh already in progress. Blocks, then runs post-update code\n\n  protected:\n    void pollAsyncRefresh();          // Run the post-update code if the hardware is ready\n    void checkBusyAsyncRefresh();     // Check if display is busy running an async full-refresh (rejecting new frames)\n    void awaitRefresh();              // Hold control while an async refresh runs\n    void endUpdate() override {}      // Disable base-class behavior of running post-update immediately after forceDisplay()\n    bool asyncRefreshRunning = false; // Flag, checked by checkBusyAsyncRefresh()\n#else\n  public:\n    void joinAsyncRefresh() {} // Dummy method\n\n  protected:\n    void pollAsyncRefresh() {} // Dummy method. In theory, not reachable\n#endif\n};\n\n// Hide the ugly casts used in Screen.cpp\n#define EINK_ADD_FRAMEFLAG(display, flag) static_cast<EInkDynamicDisplay *>(display)->addFrameFlag(EInkDynamicDisplay::flag)\n#define EINK_JOIN_ASYNCREFRESH(display) static_cast<EInkDynamicDisplay *>(display)->joinAsyncRefresh()\n\n#else // !USE_EINK_DYNAMICDISPLAY\n// Dummy-macro, removes the need for include guards\n#define EINK_ADD_FRAMEFLAG(display, flag)\n#define EINK_JOIN_ASYNCREFRESH(display)\n#endif"
  },
  {
    "path": "src/graphics/EmoteRenderer.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n\n#include \"graphics/EmoteRenderer.h\"\n#include <algorithm>\n#include <cstring>\n\nnamespace graphics\n{\nnamespace EmoteRenderer\n{\n\nstatic inline int getStringWidth(OLEDDisplay *display, const char *text, size_t len)\n{\n#if defined(OLED_UA) || defined(OLED_RU)\n    return display->getStringWidth(text, len, true);\n#else\n    (void)len;\n    return display->getStringWidth(text);\n#endif\n}\n\nsize_t utf8CharLen(uint8_t c)\n{\n    if ((c & 0xE0) == 0xC0)\n        return 2;\n    if ((c & 0xF0) == 0xE0)\n        return 3;\n    if ((c & 0xF8) == 0xF0)\n        return 4;\n    return 1;\n}\n\nstatic inline bool isPossibleEmoteLead(uint8_t c)\n{\n    // All supported emoji labels in emotes.cpp are currently in these UTF-8 lead ranges.\n    return c == 0xE2 || c == 0xF0;\n}\n\nstatic inline int getUtf8ChunkWidth(OLEDDisplay *display, const char *text, size_t len)\n{\n    char chunk[5] = {0, 0, 0, 0, 0};\n    if (len > 4)\n        len = 4;\n    memcpy(chunk, text, len);\n    return getStringWidth(display, chunk, len);\n}\n\nstatic inline bool isFE0FAt(const char *s, size_t pos, size_t len)\n{\n    return pos + 2 < len && static_cast<uint8_t>(s[pos]) == 0xEF && static_cast<uint8_t>(s[pos + 1]) == 0xB8 &&\n           static_cast<uint8_t>(s[pos + 2]) == 0x8F;\n}\n\nstatic inline bool isSkinToneAt(const char *s, size_t pos, size_t len)\n{\n    return pos + 3 < len && static_cast<uint8_t>(s[pos]) == 0xF0 && static_cast<uint8_t>(s[pos + 1]) == 0x9F &&\n           static_cast<uint8_t>(s[pos + 2]) == 0x8F &&\n           (static_cast<uint8_t>(s[pos + 3]) >= 0xBB && static_cast<uint8_t>(s[pos + 3]) <= 0xBF);\n}\n\nstatic inline size_t ignorableModifierLenAt(const char *s, size_t pos, size_t len)\n{\n    // Skip modifiers that do not change which bitmap we render.\n    if (isFE0FAt(s, pos, len))\n        return 3;\n    if (isSkinToneAt(s, pos, len))\n        return 4;\n    return 0;\n}\n\nconst Emote *findEmoteByLabel(const char *label, const Emote *emoteSet, int emoteCount)\n{\n    if (!label || !*label)\n        return nullptr;\n\n    for (int i = 0; i < emoteCount; ++i) {\n        if (emoteSet[i].label && strcmp(label, emoteSet[i].label) == 0)\n            return &emoteSet[i];\n    }\n\n    return nullptr;\n}\n\nstatic bool matchAtIgnoringModifiers(const char *text, size_t textLen, size_t pos, const char *label, size_t &textConsumed,\n                                     size_t &matchScore)\n{\n    // Treat FE0F and skin-tone modifiers as optional while matching.\n    textConsumed = 0;\n    matchScore = 0;\n    if (!label || !*label || pos >= textLen)\n        return false;\n\n    const size_t labelLen = strlen(label);\n    size_t ti = pos;\n    size_t li = 0;\n\n    while (true) {\n        while (ti < textLen) {\n            const size_t skipLen = ignorableModifierLenAt(text, ti, textLen);\n            if (!skipLen)\n                break;\n            ti += skipLen;\n        }\n        while (li < labelLen) {\n            const size_t skipLen = ignorableModifierLenAt(label, li, labelLen);\n            if (!skipLen)\n                break;\n            li += skipLen;\n        }\n\n        if (li >= labelLen) {\n            while (ti < textLen) {\n                const size_t skipLen = ignorableModifierLenAt(text, ti, textLen);\n                if (!skipLen)\n                    break;\n                ti += skipLen;\n            }\n            textConsumed = ti - pos;\n            return textConsumed > 0;\n        }\n\n        if (ti >= textLen)\n            return false;\n\n        const uint8_t tc = static_cast<uint8_t>(text[ti]);\n        const uint8_t lc = static_cast<uint8_t>(label[li]);\n        const size_t tlen = utf8CharLen(tc);\n        const size_t llen = utf8CharLen(lc);\n\n        if (tlen != llen || ti + tlen > textLen || li + llen > labelLen)\n            return false;\n        if (memcmp(text + ti, label + li, tlen) != 0)\n            return false;\n\n        ti += tlen;\n        li += llen;\n        matchScore += llen;\n    }\n}\n\nconst Emote *findEmoteAt(const char *text, size_t textLen, size_t pos, size_t &matchLen, const Emote *emoteSet, int emoteCount)\n{\n    // Prefer the longest matching label at this byte offset.\n    const Emote *matched = nullptr;\n    matchLen = 0;\n    size_t bestScore = 0;\n    if (!text || pos >= textLen)\n        return nullptr;\n\n    if (!isPossibleEmoteLead(static_cast<uint8_t>(text[pos])))\n        return nullptr;\n\n    for (int i = 0; i < emoteCount; ++i) {\n        const char *label = emoteSet[i].label;\n        if (!label || !*label)\n            continue;\n        if (static_cast<uint8_t>(label[0]) != static_cast<uint8_t>(text[pos]))\n            continue;\n\n        const size_t labelLen = strlen(label);\n        if (labelLen == 0)\n            continue;\n\n        size_t candidateLen = 0;\n        size_t candidateScore = 0;\n        if (pos + labelLen <= textLen && memcmp(text + pos, label, labelLen) == 0) {\n            candidateLen = labelLen;\n            candidateScore = labelLen;\n        } else if (matchAtIgnoringModifiers(text, textLen, pos, label, candidateLen, candidateScore)) {\n            // Matched with FE0F/skin tone modifiers treated as optional.\n        } else {\n            continue;\n        }\n\n        if (candidateScore > bestScore) {\n            matched = &emoteSet[i];\n            matchLen = candidateLen;\n            bestScore = candidateScore;\n        }\n    }\n\n    return matched;\n}\n\nstatic LineMetrics analyzeLineInternal(OLEDDisplay *display, const char *line, size_t lineLen, int fallbackHeight,\n                                       const Emote *emoteSet, int emoteCount, int emoteSpacing)\n{\n    // Scan once to collect width and tallest emote for this line.\n    LineMetrics metrics{0, fallbackHeight, false};\n    if (!line)\n        return metrics;\n\n    for (size_t i = 0; i < lineLen;) {\n        size_t matchLen = 0;\n        const Emote *matched = findEmoteAt(line, lineLen, i, matchLen, emoteSet, emoteCount);\n        if (matched) {\n            metrics.hasEmote = true;\n            metrics.tallestHeight = std::max(metrics.tallestHeight, matched->height);\n            if (display)\n                metrics.width += matched->width + emoteSpacing;\n            i += matchLen;\n            continue;\n        }\n\n        const size_t skipLen = ignorableModifierLenAt(line, i, lineLen);\n        if (skipLen) {\n            i += skipLen;\n            continue;\n        }\n\n        const size_t charLen = utf8CharLen(static_cast<uint8_t>(line[i]));\n        if (display)\n            metrics.width += getUtf8ChunkWidth(display, line + i, charLen);\n        i += charLen;\n    }\n\n    return metrics;\n}\n\nLineMetrics analyzeLine(OLEDDisplay *display, const char *line, int fallbackHeight, const Emote *emoteSet, int emoteCount,\n                        int emoteSpacing)\n{\n    return analyzeLineInternal(display, line, line ? strlen(line) : 0, fallbackHeight, emoteSet, emoteCount, emoteSpacing);\n}\n\nint maxEmoteHeight(const Emote *emoteSet, int emoteCount)\n{\n    int tallest = 0;\n    for (int i = 0; i < emoteCount; ++i) {\n        if (emoteSet[i].label && *emoteSet[i].label)\n            tallest = std::max(tallest, emoteSet[i].height);\n    }\n    return tallest;\n}\n\nint measureStringWithEmotes(OLEDDisplay *display, const char *line, const Emote *emoteSet, int emoteCount, int emoteSpacing)\n{\n    if (!display)\n        return 0;\n\n    if (!line || !*line)\n        return 0;\n\n    return analyzeLine(display, line, 0, emoteSet, emoteCount, emoteSpacing).width;\n}\n\nstatic int appendTextSpanAndMeasure(OLEDDisplay *display, int cursorX, int fontY, const char *text, size_t len, bool draw,\n                                    bool fauxBold)\n{\n    // Draw plain-text runs in chunks so UTF-8 stays intact.\n    if (!text || len == 0)\n        return cursorX;\n\n    char chunk[33];\n    size_t pos = 0;\n    while (pos < len) {\n        size_t chunkLen = 0;\n        while (pos + chunkLen < len) {\n            const size_t charLen = utf8CharLen(static_cast<uint8_t>(text[pos + chunkLen]));\n            if (chunkLen + charLen >= sizeof(chunk))\n                break;\n            chunkLen += charLen;\n        }\n\n        if (chunkLen == 0) {\n            chunkLen = std::min(len - pos, sizeof(chunk) - 1);\n        }\n\n        memcpy(chunk, text + pos, chunkLen);\n        chunk[chunkLen] = '\\0';\n        if (draw) {\n            if (fauxBold)\n                display->drawString(cursorX + 1, fontY, chunk);\n            display->drawString(cursorX, fontY, chunk);\n        }\n        cursorX += getStringWidth(display, chunk, chunkLen);\n        pos += chunkLen;\n    }\n\n    return cursorX;\n}\n\nsize_t truncateToWidth(OLEDDisplay *display, const char *line, char *out, size_t outSize, int maxWidth, const char *ellipsis,\n                       const Emote *emoteSet, int emoteCount, int emoteSpacing)\n{\n    if (!out || outSize == 0)\n        return 0;\n\n    out[0] = '\\0';\n    if (!display || !line || maxWidth <= 0)\n        return 0;\n\n    const size_t lineLen = strlen(line);\n    const int suffixWidth =\n        (ellipsis && *ellipsis) ? measureStringWithEmotes(display, ellipsis, emoteSet, emoteCount, emoteSpacing) : 0;\n    const char *suffix = (ellipsis && suffixWidth <= maxWidth) ? ellipsis : \"\";\n    const size_t suffixLen = strlen(suffix);\n    const int availableWidth = maxWidth - (*suffix ? suffixWidth : 0);\n\n    if (measureStringWithEmotes(display, line, emoteSet, emoteCount, emoteSpacing) <= maxWidth) {\n        strncpy(out, line, outSize - 1);\n        out[outSize - 1] = '\\0';\n        return strlen(out);\n    }\n\n    int used = 0;\n    size_t cut = 0;\n    for (size_t i = 0; i < lineLen;) {\n        // Keep whole emotes together when deciding where to cut.\n        int tokenWidth = 0;\n        size_t advance = 0;\n\n        if (isPossibleEmoteLead(static_cast<uint8_t>(line[i]))) {\n            size_t matchLen = 0;\n            const Emote *matched = findEmoteAt(line, lineLen, i, matchLen, emoteSet, emoteCount);\n            if (matched) {\n                tokenWidth = matched->width + emoteSpacing;\n                advance = matchLen;\n            }\n        }\n\n        if (advance == 0) {\n            const size_t skipLen = ignorableModifierLenAt(line, i, lineLen);\n            if (skipLen) {\n                i += skipLen;\n                cut = i;\n                continue;\n            }\n\n            const size_t charLen = utf8CharLen(static_cast<uint8_t>(line[i]));\n            tokenWidth = getUtf8ChunkWidth(display, line + i, charLen);\n            advance = charLen;\n        }\n\n        if (used + tokenWidth > availableWidth)\n            break;\n\n        used += tokenWidth;\n        i += advance;\n        cut = i;\n    }\n\n    if (cut == 0) {\n        strncpy(out, suffix, outSize - 1);\n        out[outSize - 1] = '\\0';\n        return strlen(out);\n    }\n\n    size_t copyLen = cut;\n    if (copyLen > outSize - 1)\n        copyLen = outSize - 1;\n    if (suffixLen > 0 && copyLen + suffixLen > outSize - 1) {\n        copyLen = (outSize - 1 > suffixLen) ? (outSize - 1 - suffixLen) : 0;\n    }\n\n    memcpy(out, line, copyLen);\n    size_t totalLen = copyLen;\n    if (suffixLen > 0 && totalLen < outSize - 1) {\n        memcpy(out + totalLen, suffix, std::min(suffixLen, outSize - 1 - totalLen));\n        totalLen += std::min(suffixLen, outSize - 1 - totalLen);\n    }\n    out[totalLen] = '\\0';\n    return totalLen;\n}\n\nvoid drawStringWithEmotes(OLEDDisplay *display, int x, int y, const char *line, int fontHeight, const Emote *emoteSet,\n                          int emoteCount, int emoteSpacing, bool fauxBold)\n{\n    if (!line)\n        return;\n\n    const size_t lineLen = strlen(line);\n    // Center text vertically when any emote is taller than the font.\n    const int maxIconHeight =\n        analyzeLineInternal(nullptr, line, lineLen, fontHeight, emoteSet, emoteCount, emoteSpacing).tallestHeight;\n    const int lineHeight = std::max(fontHeight, maxIconHeight);\n    const int fontY = y + (lineHeight - fontHeight) / 2;\n\n    int cursorX = x;\n    bool inBold = false;\n\n    for (size_t i = 0; i < lineLen;) {\n        // Toggle faux bold.\n        if (fauxBold && i + 1 < lineLen && line[i] == '*' && line[i + 1] == '*') {\n            inBold = !inBold;\n            i += 2;\n            continue;\n        }\n\n        const size_t skipLen = ignorableModifierLenAt(line, i, lineLen);\n        if (skipLen) {\n            i += skipLen;\n            continue;\n        }\n\n        size_t matchLen = 0;\n        const Emote *matched = findEmoteAt(line, lineLen, i, matchLen, emoteSet, emoteCount);\n        if (matched) {\n            const int iconY = y + (lineHeight - matched->height) / 2;\n            display->drawXbm(cursorX, iconY, matched->width, matched->height, matched->bitmap);\n            cursorX += matched->width + emoteSpacing;\n            i += matchLen;\n            continue;\n        }\n\n        size_t next = i;\n        while (next < lineLen) {\n            // Stop the text run before the next emote or bold marker.\n            if (fauxBold && next + 1 < lineLen && line[next] == '*' && line[next + 1] == '*')\n                break;\n\n            if (ignorableModifierLenAt(line, next, lineLen))\n                break;\n\n            size_t nextMatchLen = 0;\n            if (findEmoteAt(line, lineLen, next, nextMatchLen, emoteSet, emoteCount) != nullptr)\n                break;\n\n            next += utf8CharLen(static_cast<uint8_t>(line[next]));\n        }\n\n        if (next == i)\n            next += utf8CharLen(static_cast<uint8_t>(line[i]));\n\n        cursorX = appendTextSpanAndMeasure(display, cursorX, fontY, line + i, next - i, true, fauxBold && inBold);\n        i = next;\n    }\n}\n\n} // namespace EmoteRenderer\n} // namespace graphics\n\n#endif // HAS_SCREEN\n"
  },
  {
    "path": "src/graphics/EmoteRenderer.h",
    "content": "#pragma once\n#include \"configuration.h\"\n\n#if HAS_SCREEN\n#include \"graphics/emotes.h\"\n#include <Arduino.h>\n#include <OLEDDisplay.h>\n#include <string>\n#include <vector>\n\nnamespace graphics\n{\nnamespace EmoteRenderer\n{\n\nstruct LineMetrics {\n    int width;\n    int tallestHeight;\n    bool hasEmote;\n};\n\nsize_t utf8CharLen(uint8_t c);\n\nconst Emote *findEmoteByLabel(const char *label, const Emote *emoteSet = emotes, int emoteCount = numEmotes);\nconst Emote *findEmoteAt(const char *text, size_t textLen, size_t pos, size_t &matchLen, const Emote *emoteSet = emotes,\n                         int emoteCount = numEmotes);\ninline const Emote *findEmoteAt(const std::string &text, size_t pos, size_t &matchLen, const Emote *emoteSet = emotes,\n                                int emoteCount = numEmotes)\n{\n    return findEmoteAt(text.c_str(), text.length(), pos, matchLen, emoteSet, emoteCount);\n}\n\nLineMetrics analyzeLine(OLEDDisplay *display, const char *line, int fallbackHeight = 0, const Emote *emoteSet = emotes,\n                        int emoteCount = numEmotes, int emoteSpacing = 1);\ninline LineMetrics analyzeLine(OLEDDisplay *display, const std::string &line, int fallbackHeight = 0,\n                               const Emote *emoteSet = emotes, int emoteCount = numEmotes, int emoteSpacing = 1)\n{\n    return analyzeLine(display, line.c_str(), fallbackHeight, emoteSet, emoteCount, emoteSpacing);\n}\nint maxEmoteHeight(const Emote *emoteSet = emotes, int emoteCount = numEmotes);\n\nint measureStringWithEmotes(OLEDDisplay *display, const char *line, const Emote *emoteSet = emotes, int emoteCount = numEmotes,\n                            int emoteSpacing = 1);\ninline int measureStringWithEmotes(OLEDDisplay *display, const std::string &line, const Emote *emoteSet = emotes,\n                                   int emoteCount = numEmotes, int emoteSpacing = 1)\n{\n    return measureStringWithEmotes(display, line.c_str(), emoteSet, emoteCount, emoteSpacing);\n}\nsize_t truncateToWidth(OLEDDisplay *display, const char *line, char *out, size_t outSize, int maxWidth,\n                       const char *ellipsis = \"...\", const Emote *emoteSet = emotes, int emoteCount = numEmotes,\n                       int emoteSpacing = 1);\ninline std::string truncateToWidth(OLEDDisplay *display, const std::string &line, int maxWidth,\n                                   const std::string &ellipsis = \"...\", const Emote *emoteSet = emotes,\n                                   int emoteCount = numEmotes, int emoteSpacing = 1)\n{\n    if (!display || maxWidth <= 0)\n        return \"\";\n    if (measureStringWithEmotes(display, line.c_str(), emoteSet, emoteCount, emoteSpacing) <= maxWidth)\n        return line;\n\n    std::vector<char> out(line.length() + ellipsis.length() + 1, '\\0');\n    truncateToWidth(display, line.c_str(), out.data(), out.size(), maxWidth, ellipsis.c_str(), emoteSet, emoteCount,\n                    emoteSpacing);\n    return std::string(out.data());\n}\n\nvoid drawStringWithEmotes(OLEDDisplay *display, int x, int y, const char *line, int fontHeight, const Emote *emoteSet = emotes,\n                          int emoteCount = numEmotes, int emoteSpacing = 1, bool fauxBold = true);\ninline void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, int fontHeight,\n                                 const Emote *emoteSet = emotes, int emoteCount = numEmotes, int emoteSpacing = 1,\n                                 bool fauxBold = true)\n{\n    drawStringWithEmotes(display, x, y, line.c_str(), fontHeight, emoteSet, emoteCount, emoteSpacing, fauxBold);\n}\n\n} // namespace EmoteRenderer\n} // namespace graphics\n\n#endif // HAS_SCREEN\n"
  },
  {
    "path": "src/graphics/GxEPD2Multi.h",
    "content": "// Wrapper class for GxEPD2_BW\n\n// Generic signature at build-time, so that we can detect display model at run-time\n// Workaround for issue of GxEPD2_BW objects not having a shared base class\n// Only exposes methods which we are actually using\n\ntemplate <typename Driver0, typename Driver1> class GxEPD2_Multi\n{\n  public:\n    void drawPixel(int16_t x, int16_t y, uint16_t color)\n    {\n        if (which == 0)\n            driver0->drawPixel(x, y, color);\n        else\n            driver1->drawPixel(x, y, color);\n    }\n\n    bool nextPage()\n    {\n        if (which == 0)\n            return driver0->nextPage();\n        else\n            return driver1->nextPage();\n    }\n\n    void hibernate()\n    {\n        if (which == 0)\n            driver0->hibernate();\n        else\n            driver1->hibernate();\n    }\n\n    void init(uint32_t serial_diag_bitrate = 0)\n    {\n        if (which == 0)\n            driver0->init(serial_diag_bitrate);\n        else\n            driver1->init(serial_diag_bitrate);\n    }\n\n    void init(uint32_t serial_diag_bitrate, bool initial, uint16_t reset_duration = 20, bool pulldown_rst_mode = false)\n    {\n        if (which == 0)\n            driver0->init(serial_diag_bitrate, initial, reset_duration, pulldown_rst_mode);\n        else\n            driver1->init(serial_diag_bitrate, initial, reset_duration, pulldown_rst_mode);\n    }\n\n    void setRotation(uint8_t x)\n    {\n        if (which == 0)\n            driver0->setRotation(x);\n        else\n            driver1->setRotation(x);\n    }\n\n    void setPartialWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h)\n    {\n        if (which == 0)\n            driver0->setPartialWindow(x, y, w, h);\n        else\n            driver1->setPartialWindow(x, y, w, h);\n    }\n\n    void setFullWindow()\n    {\n        if (which == 0)\n            driver0->setFullWindow();\n        else\n            driver1->setFullWindow();\n    }\n\n    int16_t width()\n    {\n        if (which == 0)\n            return driver0->width();\n        else\n            return driver1->width();\n    }\n\n    int16_t height()\n    {\n        if (which == 0)\n            return driver0->height();\n        else\n            return driver1->height();\n    }\n\n    void clearScreen(uint8_t value = 0xFF)\n    {\n        if (which == 0)\n            driver0->clearScreen();\n        else\n            driver1->clearScreen();\n    }\n\n    void endAsyncFull()\n    {\n        if (which == 0)\n            driver0->endAsyncFull();\n        else\n            driver1->endAsyncFull();\n    }\n\n    // Exposes methods of the GxEPD2_EPD object which is usually available as GxEPD2_BW::epd\n    class Epd2Wrapper\n    {\n      public:\n        bool isBusy() { return m_epd2->isBusy(); }\n        GxEPD2_EPD *m_epd2;\n    } epd2;\n\n    // Constructor\n    // Select driver by passing whichDriver as 0 or 1\n    GxEPD2_Multi(uint8_t whichDriver, int16_t cs, int16_t dc, int16_t rst, int16_t busy, SPIClass &spi)\n    {\n        assert(whichDriver == 0 || whichDriver == 1);\n        which = whichDriver;\n        LOG_DEBUG(\"GxEPD2_Multi driver: %d\", which);\n\n        if (which == 0) {\n            driver0 = new GxEPD2_BW<Driver0, Driver0::HEIGHT>(Driver0(cs, dc, rst, busy, spi));\n            epd2.m_epd2 = &(driver0->epd2);\n        } else if (which == 1) {\n            driver1 = new GxEPD2_BW<Driver1, Driver1::HEIGHT>(Driver1(cs, dc, rst, busy, spi));\n            epd2.m_epd2 = &(driver1->epd2);\n        }\n    }\n\n  private:\n    uint8_t which;\n    GxEPD2_BW<Driver0, Driver0::HEIGHT> *driver0;\n    GxEPD2_BW<Driver1, Driver1::HEIGHT> *driver1;\n};"
  },
  {
    "path": "src/graphics/NomadStarLED.h",
    "content": "#ifdef HAS_LP5562\n#include <Wire.h>\n\n#include <LP5562.h>\nextern LP5562 rgbw;\n\n#endif"
  },
  {
    "path": "src/graphics/Panel_sdl.cpp",
    "content": "/*----------------------------------------------------------------------------/\n  Lovyan GFX - Graphics library for embedded devices.\n\nOriginal Source:\n https://github.com/lovyan03/LovyanGFX/\n\nLicence:\n [FreeBSD](https://github.com/lovyan03/LovyanGFX/blob/master/license.txt)\n\nAuthor:\n [lovyan03](https://twitter.com/lovyan03)\n\nContributors:\n [ciniml](https://github.com/ciniml)\n [mongonta0716](https://github.com/mongonta0716)\n [tobozo](https://github.com/tobozo)\n\nPorting for SDL:\n [imliubo](https://github.com/imliubo)\n/----------------------------------------------------------------------------*/\n#include \"Panel_sdl.hpp\"\n\n#if defined(SDL_h_)\n\n// #include \"../common.hpp\"\n// #include \"../../misc/common_function.hpp\"\n// #include \"../../Bus.hpp\"\n\n#include <list>\n#include <math.h>\n#include <vector>\n#ifndef M_PI\n#define M_PI 3.14159265358979323846\n#endif\n\nnamespace lgfx\n{\ninline namespace v1\n{\nSDL_Keymod Panel_sdl::_keymod = KMOD_NONE;\nstatic SDL_semaphore *_update_in_semaphore = nullptr;\nstatic SDL_semaphore *_update_out_semaphore = nullptr;\nvolatile static uint32_t _in_step_exec = 0;\nvolatile static uint32_t _msec_step_exec = 512;\nstatic bool _inited = false;\nstatic bool _all_close = false;\n\nvolatile uint8_t Panel_sdl::_gpio_dummy_values[EMULATED_GPIO_MAX];\n\nstatic inline void *heap_alloc_dma(size_t length)\n{\n    return malloc(length);\n} // aligned_alloc(16, length);\nstatic inline void heap_free(void *buf)\n{\n    free(buf);\n}\n\nstatic std::list<monitor_t *> _list_monitor;\n\nstatic monitor_t *const getMonitorByWindowID(uint32_t windowID)\n{\n    for (auto &m : _list_monitor) {\n        if (SDL_GetWindowID(m->window) == windowID) {\n            return m;\n        }\n    }\n    return nullptr;\n}\n//----------------------------------------------------------------------------\n\nstatic std::vector<Panel_sdl::KeyCodeMapping_t> _key_code_map;\n\nvoid Panel_sdl::addKeyCodeMapping(SDL_KeyCode keyCode, uint8_t gpio)\n{\n    if (gpio > EMULATED_GPIO_MAX)\n        return;\n    KeyCodeMapping_t map;\n    map.keycode = keyCode;\n    map.gpio = gpio;\n    _key_code_map.push_back(map);\n}\n\nint Panel_sdl::getKeyCodeMapping(SDL_KeyCode keyCode)\n{\n    for (const auto &i : _key_code_map) {\n        if (i.keycode == keyCode)\n            return i.gpio;\n    }\n    return -1;\n}\n\nvoid Panel_sdl::_event_proc(void)\n{\n    SDL_Event event;\n    while (SDL_PollEvent(&event)) {\n        if ((event.type == SDL_KEYDOWN) || (event.type == SDL_KEYUP)) {\n            auto mon = getMonitorByWindowID(event.button.windowID);\n            int gpio = -1;\n\n            /// Check key mapping\n            gpio = getKeyCodeMapping((SDL_KeyCode)event.key.keysym.sym);\n            if (gpio < 0) {\n                switch (event.key.keysym.sym) { /// M5StackのBtnA～BtnCのエミュレート;\n                // case SDLK_LEFT:  gpio = 39; break;\n                // case SDLK_DOWN:  gpio = 38; break;\n                // case SDLK_RIGHT: gpio = 37; break;\n                // case SDLK_UP:    gpio = 36; break;\n\n                /// L/Rキーで画面回転\n                case SDLK_r:\n                case SDLK_l:\n                    if (event.type == SDL_KEYDOWN && event.key.keysym.mod == _keymod) {\n                        if (mon != nullptr) {\n                            mon->frame_rotation = (mon->frame_rotation += event.key.keysym.sym == SDLK_r ? 1 : -1);\n                            int x, y, w, h;\n                            SDL_GetWindowSize(mon->window, &w, &h);\n                            SDL_GetWindowPosition(mon->window, &x, &y);\n                            SDL_SetWindowSize(mon->window, h, w);\n                            SDL_SetWindowPosition(mon->window, x + (w - h) / 2, y + (h - w) / 2);\n                            mon->panel->sdl_invalidate();\n                        }\n                    }\n                    break;\n\n                /// 1～6キーで画面拡大率変更\n                case SDLK_1:\n                case SDLK_2:\n                case SDLK_3:\n                case SDLK_4:\n                case SDLK_5:\n                case SDLK_6:\n                    if (event.type == SDL_KEYDOWN && event.key.keysym.mod == _keymod) {\n                        if (mon != nullptr) {\n                            int size = 1 + (event.key.keysym.sym - SDLK_1);\n                            _update_scaling(mon, size, size);\n                        }\n                    }\n                    break;\n                default:\n                    continue;\n                }\n            }\n\n            if (event.type == SDL_KEYDOWN) {\n                Panel_sdl::gpio_lo(gpio);\n            } else {\n                Panel_sdl::gpio_hi(gpio);\n            }\n        } else if (event.type == SDL_MOUSEBUTTONDOWN || event.type == SDL_MOUSEBUTTONUP || event.type == SDL_MOUSEMOTION) {\n            auto mon = getMonitorByWindowID(event.button.windowID);\n            if (mon != nullptr) {\n                {\n                    int x, y, w, h;\n                    SDL_GetWindowSize(mon->window, &w, &h);\n                    SDL_GetMouseState(&x, &y);\n                    float sf = sinf(mon->frame_angle * M_PI / 180);\n                    float cf = cosf(mon->frame_angle * M_PI / 180);\n                    x -= w / 2.0f;\n                    y -= h / 2.0f;\n                    float nx = y * sf + x * cf;\n                    float ny = y * cf - x * sf;\n                    if (mon->frame_rotation & 1) {\n                        std::swap(w, h);\n                    }\n                    x = (nx * mon->frame_width / w) + (mon->frame_width >> 1);\n                    y = (ny * mon->frame_height / h) + (mon->frame_height >> 1);\n                    mon->touch_x = x - mon->frame_inner_x;\n                    mon->touch_y = y - mon->frame_inner_y;\n                }\n                if (event.type == SDL_MOUSEBUTTONDOWN && event.button.button == SDL_BUTTON_LEFT) {\n                    mon->touched = true;\n                }\n                if (event.type == SDL_MOUSEBUTTONUP && event.button.button == SDL_BUTTON_LEFT) {\n                    mon->touched = false;\n                }\n            }\n        } else if (event.type == SDL_WINDOWEVENT) {\n            auto monitor = getMonitorByWindowID(event.window.windowID);\n            if (monitor) {\n                if (event.window.event == SDL_WINDOWEVENT_RESIZED) {\n                    int mw, mh;\n                    SDL_GetRendererOutputSize(monitor->renderer, &mw, &mh);\n                    if (monitor->frame_rotation & 1) {\n                        std::swap(mw, mh);\n                    }\n                    monitor->scaling_x = (mw * 2 / monitor->frame_width) / 2.0f;\n                    monitor->scaling_y = (mh * 2 / monitor->frame_height) / 2.0f;\n                    monitor->panel->sdl_invalidate();\n                } else if (event.window.event == SDL_WINDOWEVENT_CLOSE) {\n                    monitor->closing = true;\n                }\n            }\n        } else if (event.type == SDL_QUIT) {\n            for (auto &m : _list_monitor) {\n                m->closing = true;\n            }\n        }\n    }\n}\n\n/// デバッガでステップ実行されていることを検出するスレッド用関数。\nstatic int detectDebugger(bool *running)\n{\n    uint32_t prev_ms = SDL_GetTicks();\n    do {\n        SDL_Delay(1);\n        uint32_t ms = SDL_GetTicks();\n        /// 時間間隔が広すぎる場合はステップ実行中 (ブレークポイントで止まった)と判断する。\n        /// また、解除されたと判断した後も1023msecほど状態を維持する。\n        if (ms - prev_ms > 64) {\n            _in_step_exec = _msec_step_exec;\n        } else if (_in_step_exec) {\n            --_in_step_exec;\n        }\n        prev_ms = ms;\n    } while (*running);\n    return 0;\n}\n\nvoid Panel_sdl::_update_proc(void)\n{\n    for (auto it = _list_monitor.begin(); it != _list_monitor.end();) {\n        if ((*it)->closing) {\n            if ((*it)->texture_frameimage) {\n                SDL_DestroyTexture((*it)->texture_frameimage);\n            }\n            SDL_DestroyTexture((*it)->texture);\n            SDL_DestroyRenderer((*it)->renderer);\n            SDL_DestroyWindow((*it)->window);\n            _list_monitor.erase(it++);\n            if (_list_monitor.empty()) {\n                _all_close = true;\n                return;\n            }\n            continue;\n        }\n        (*it)->panel->sdl_update();\n        ++it;\n    }\n}\n\nint Panel_sdl::setup(void)\n{\n    if (_inited)\n        return 1;\n    _inited = true;\n\n    /// Add default keycode mapping\n    /// M5StackのBtnA～BtnCのエミュレート;\n    addKeyCodeMapping(SDLK_LEFT, 39);\n    addKeyCodeMapping(SDLK_DOWN, 38);\n    addKeyCodeMapping(SDLK_RIGHT, 37);\n    addKeyCodeMapping(SDLK_UP, 36);\n\n    SDL_CreateThread((SDL_ThreadFunction)detectDebugger, \"dbg\", &_inited);\n\n    _update_in_semaphore = SDL_CreateSemaphore(0);\n    _update_out_semaphore = SDL_CreateSemaphore(0);\n    for (size_t pin = 0; pin < EMULATED_GPIO_MAX; ++pin) {\n        gpio_hi(pin);\n    }\n    /*Initialize the SDL*/\n    SDL_Init(SDL_INIT_VIDEO);\n    SDL_StartTextInput();\n\n    // SDL_SetThreadPriority(SDL_ThreadPriority::SDL_THREAD_PRIORITY_HIGH);\n    return 0;\n}\n\nint Panel_sdl::loop(void)\n{\n    if (!_inited)\n        return 1;\n\n    _event_proc();\n    SDL_SemWaitTimeout(_update_in_semaphore, 1);\n    _update_proc();\n    _event_proc();\n    if (SDL_SemValue(_update_out_semaphore) == 0) {\n        SDL_SemPost(_update_out_semaphore);\n    }\n\n    return _all_close;\n}\n\nint Panel_sdl::close(void)\n{\n    if (!_inited)\n        return 1;\n    _inited = false;\n\n    SDL_StopTextInput();\n    SDL_DestroySemaphore(_update_in_semaphore);\n    SDL_DestroySemaphore(_update_out_semaphore);\n    SDL_Quit();\n    return 0;\n}\n\nint Panel_sdl::main(int (*fn)(bool *), uint32_t msec_step_exec)\n{\n    _msec_step_exec = msec_step_exec;\n\n    /// SDLの準備\n    if (0 != Panel_sdl::setup()) {\n        return 1;\n    }\n\n    /// ユーザコード関数の動作・停止フラグ\n    bool running = true;\n\n    /// ユーザコード関数を起動する\n    auto thread = SDL_CreateThread((SDL_ThreadFunction)fn, \"fn\", &running);\n\n    /// 全部のウィンドウが閉じられるまでSDLのイベント・描画処理を継続\n    while (0 == Panel_sdl::loop()) {\n    };\n\n    /// ユーザコード関数を終了する\n    running = false;\n    SDL_WaitThread(thread, nullptr);\n\n    /// SDLを終了する\n    return Panel_sdl::close();\n}\n\nvoid Panel_sdl::setScaling(uint_fast8_t scaling_x, uint_fast8_t scaling_y)\n{\n    monitor.scaling_x = scaling_x;\n    monitor.scaling_y = scaling_y;\n}\n\nvoid Panel_sdl::setFrameImage(const void *frame_image, int frame_width, int frame_height, int inner_x, int inner_y)\n{\n    monitor.frame_image = frame_image;\n    monitor.frame_width = frame_width;\n    monitor.frame_height = frame_height;\n    monitor.frame_inner_x = inner_x;\n    monitor.frame_inner_y = inner_y;\n}\n\nvoid Panel_sdl::setFrameRotation(uint_fast16_t frame_rotation)\n{\n    monitor.frame_rotation = frame_rotation;\n    monitor.frame_angle = (monitor.frame_rotation) * 90;\n}\n\nPanel_sdl::~Panel_sdl(void)\n{\n    _list_monitor.remove(&monitor);\n    SDL_DestroyMutex(_sdl_mutex);\n}\n\nPanel_sdl::Panel_sdl(void) : Panel_FrameBufferBase()\n{\n    _sdl_mutex = SDL_CreateMutex();\n    _auto_display = true;\n    monitor.panel = this;\n}\n\nbool Panel_sdl::init(bool use_reset)\n{\n    initFrameBuffer(_cfg.panel_width * 4, _cfg.panel_height);\n    bool res = Panel_FrameBufferBase::init(use_reset);\n\n    _list_monitor.push_back(&monitor);\n\n    return res;\n}\n\ncolor_depth_t Panel_sdl::setColorDepth(color_depth_t depth)\n{\n    auto bits = depth & color_depth_t::bit_mask;\n    if (bits >= 16) {\n        depth = (bits > 16) ? rgb888_3Byte : rgb565_2Byte;\n    } else {\n        depth = (depth == color_depth_t::grayscale_8bit) ? grayscale_8bit : rgb332_1Byte;\n    }\n    _write_depth = depth;\n    _read_depth = depth;\n\n    return depth;\n}\n\nPanel_sdl::lock_t::lock_t(Panel_sdl *parent) : _parent{parent}\n{\n    SDL_LockMutex(parent->_sdl_mutex);\n};\n\nPanel_sdl::lock_t::~lock_t(void)\n{\n    ++_parent->_modified_counter;\n    SDL_UnlockMutex(_parent->_sdl_mutex);\n    if (SDL_SemValue(_update_in_semaphore) < 2) {\n        SDL_SemPost(_update_in_semaphore);\n        if (!_in_step_exec) {\n            SDL_SemWaitTimeout(_update_out_semaphore, 1);\n        }\n    }\n};\n\nvoid Panel_sdl::drawPixelPreclipped(uint_fast16_t x, uint_fast16_t y, uint32_t rawcolor)\n{\n    lock_t lock(this);\n    Panel_FrameBufferBase::drawPixelPreclipped(x, y, rawcolor);\n}\n\nvoid Panel_sdl::writeFillRectPreclipped(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h, uint32_t rawcolor)\n{\n    lock_t lock(this);\n    Panel_FrameBufferBase::writeFillRectPreclipped(x, y, w, h, rawcolor);\n}\n\nvoid Panel_sdl::writeBlock(uint32_t rawcolor, uint32_t length)\n{\n    //    lock_t lock(this);\n    Panel_FrameBufferBase::writeBlock(rawcolor, length);\n}\n\nvoid Panel_sdl::writeImage(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h, pixelcopy_t *param, bool use_dma)\n{\n    lock_t lock(this);\n    Panel_FrameBufferBase::writeImage(x, y, w, h, param, use_dma);\n}\n\nvoid Panel_sdl::writeImageARGB(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h, pixelcopy_t *param)\n{\n    lock_t lock(this);\n    Panel_FrameBufferBase::writeImageARGB(x, y, w, h, param);\n}\n\nvoid Panel_sdl::writePixels(pixelcopy_t *param, uint32_t len, bool use_dma)\n{\n    lock_t lock(this);\n    Panel_FrameBufferBase::writePixels(param, len, use_dma);\n}\n\nvoid Panel_sdl::display(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h)\n{\n    (void)x;\n    (void)y;\n    (void)w;\n    (void)h;\n    if (_in_step_exec) {\n        if (_display_counter != _modified_counter) {\n            do {\n                SDL_SemPost(_update_in_semaphore);\n                SDL_SemWaitTimeout(_update_out_semaphore, 1);\n            } while (_display_counter != _modified_counter);\n            SDL_Delay(1);\n        }\n    }\n}\n\nuint_fast8_t Panel_sdl::getTouchRaw(touch_point_t *tp, uint_fast8_t count)\n{\n    (void)count;\n    tp->x = monitor.touch_x;\n    tp->y = monitor.touch_y;\n    tp->size = monitor.touched ? 1 : 0;\n    tp->id = 0;\n    return monitor.touched;\n}\n\nvoid Panel_sdl::setWindowTitle(const char *title)\n{\n    _window_title = title;\n    if (monitor.window) {\n        SDL_SetWindowTitle(monitor.window, _window_title);\n    }\n}\n\nvoid Panel_sdl::_update_scaling(monitor_t *mon, float sx, float sy)\n{\n    mon->scaling_x = sx;\n    mon->scaling_y = sy;\n    int nw = mon->frame_width;\n    int nh = mon->frame_height;\n    if (mon->frame_rotation & 1) {\n        std::swap(nw, nh);\n    }\n\n    int x, y, w, h;\n    int rw, rh;\n    SDL_GetRendererOutputSize(mon->renderer, &rw, &rh);\n    SDL_GetWindowSize(mon->window, &w, &h);\n    nw = nw * sx * w / rw;\n    nh = nh * sy * h / rh;\n    SDL_GetWindowPosition(mon->window, &x, &y);\n    SDL_SetWindowSize(mon->window, nw, nh);\n    SDL_SetWindowPosition(mon->window, x + (w - nw) / 2, y + (h - nh) / 2);\n    mon->panel->sdl_invalidate();\n}\n\nvoid Panel_sdl::sdl_create(monitor_t *m)\n{\n    int flag = SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI;\n#if SDL_FULLSCREEN\n    flag |= SDL_WINDOW_FULLSCREEN;\n#endif\n\n    if (m->frame_width < _cfg.panel_width) {\n        m->frame_width = _cfg.panel_width;\n    }\n    if (m->frame_height < _cfg.panel_height) {\n        m->frame_height = _cfg.panel_height;\n    }\n\n    int window_width = m->frame_width * m->scaling_x;\n    int window_height = m->frame_height * m->scaling_y;\n    int scaling_x = m->scaling_x;\n    int scaling_y = m->scaling_y;\n    if (m->frame_rotation & 1) {\n        std::swap(window_width, window_height);\n        std::swap(scaling_x, scaling_y);\n    }\n\n    {\n        m->window = SDL_CreateWindow(_window_title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, window_width, window_height,\n                                     flag); /*last param. SDL_WINDOW_BORDERLESS to hide borders*/\n    }\n    m->renderer = SDL_CreateRenderer(m->window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);\n    m->texture =\n        SDL_CreateTexture(m->renderer, SDL_PIXELFORMAT_RGB24, SDL_TEXTUREACCESS_STREAMING, _cfg.panel_width, _cfg.panel_height);\n    SDL_SetTextureBlendMode(m->texture, SDL_BLENDMODE_NONE);\n\n    if (m->frame_image) {\n        // 枠画像用のサーフェイスを作成\n        auto sf = SDL_CreateRGBSurfaceFrom((void *)m->frame_image, m->frame_width, m->frame_height, 32, m->frame_width * 4,\n                                           0xFF000000, 0xFF0000, 0xFF00, 0xFF);\n        if (sf != nullptr) {\n            // 枠画像からテクスチャを作成\n            m->texture_frameimage = SDL_CreateTextureFromSurface(m->renderer, sf);\n            SDL_FreeSurface(sf);\n        }\n    }\n    SDL_SetTextureBlendMode(m->texture_frameimage, SDL_BLENDMODE_BLEND);\n    _update_scaling(m, scaling_x, scaling_y);\n}\n\nvoid Panel_sdl::sdl_update(void)\n{\n    if (monitor.renderer == nullptr) {\n        sdl_create(&monitor);\n    }\n\n    bool step_exec = _in_step_exec;\n\n    if (_texupdate_counter != _modified_counter) {\n        pixelcopy_t pc(nullptr, color_depth_t::rgb888_3Byte, _write_depth, false);\n        if (_write_depth == rgb565_2Byte) {\n            pc.fp_copy = pixelcopy_t::copy_rgb_fast<bgr888_t, swap565_t>;\n        } else if (_write_depth == rgb888_3Byte) {\n            pc.fp_copy = pixelcopy_t::copy_rgb_fast<bgr888_t, bgr888_t>;\n        } else if (_write_depth == rgb332_1Byte) {\n            pc.fp_copy = pixelcopy_t::copy_rgb_fast<bgr888_t, rgb332_t>;\n        } else if (_write_depth == grayscale_8bit) {\n            pc.fp_copy = pixelcopy_t::copy_rgb_fast<bgr888_t, grayscale_t>;\n        }\n\n        if (0 == SDL_LockMutex(_sdl_mutex)) {\n            _texupdate_counter = _modified_counter;\n            for (int y = 0; y < _cfg.panel_height; ++y) {\n                pc.src_x32 = 0;\n                pc.src_data = _lines_buffer[y];\n                pc.fp_copy(&_texturebuf[y * _cfg.panel_width], 0, _cfg.panel_width, &pc);\n            }\n            SDL_UnlockMutex(_sdl_mutex);\n            SDL_UpdateTexture(monitor.texture, nullptr, _texturebuf, _cfg.panel_width * sizeof(rgb888_t));\n        }\n    }\n\n    int angle = monitor.frame_angle;\n    int target = (monitor.frame_rotation) * 90;\n    angle = (((target * 4) + (angle * 4) + (angle < target ? 8 : 0)) >> 3);\n\n    if (monitor.frame_angle != angle) { // 表示する向きを変える\n        monitor.frame_angle = angle;\n        sdl_invalidate();\n    } else if (monitor.frame_rotation & ~3u) {\n        monitor.frame_rotation &= 3;\n        monitor.frame_angle = (monitor.frame_rotation) * 90;\n        sdl_invalidate();\n    }\n\n    if (_invalidated || (_display_counter != _texupdate_counter)) {\n        SDL_RendererInfo info;\n        if (0 == SDL_GetRendererInfo(monitor.renderer, &info)) {\n            // ステップ実行中はVSYNCを待機しない\n            if (((bool)(info.flags & SDL_RENDERER_PRESENTVSYNC)) == step_exec) {\n                SDL_RenderSetVSync(monitor.renderer, !step_exec);\n            }\n        }\n        {\n            int red = 0;\n            int green = 0;\n            int blue = 0;\n#if defined(M5GFX_BACK_COLOR)\n            red = ((M5GFX_BACK_COLOR) >> 16) & 0xFF;\n            green = ((M5GFX_BACK_COLOR) >> 8) & 0xFF;\n            blue = ((M5GFX_BACK_COLOR)) & 0xFF;\n#endif\n            SDL_SetRenderDrawColor(monitor.renderer, red, green, blue, 0xFF);\n        }\n        SDL_RenderClear(monitor.renderer);\n        if (_invalidated) {\n            _invalidated = false;\n            int mw, mh;\n            SDL_GetRendererOutputSize(monitor.renderer, &mw, &mh);\n        }\n        render_texture(monitor.texture, monitor.frame_inner_x, monitor.frame_inner_y, _cfg.panel_width, _cfg.panel_height, angle);\n        render_texture(monitor.texture_frameimage, 0, 0, monitor.frame_width, monitor.frame_height, angle);\n        SDL_RenderPresent(monitor.renderer);\n        _display_counter = _texupdate_counter;\n        if (_invalidated) {\n            _invalidated = false;\n            SDL_SetRenderDrawColor(monitor.renderer, 0, 0, 0, 0xFF);\n            SDL_RenderClear(monitor.renderer);\n            render_texture(monitor.texture, monitor.frame_inner_x, monitor.frame_inner_y, _cfg.panel_width, _cfg.panel_height,\n                           angle);\n            render_texture(monitor.texture_frameimage, 0, 0, monitor.frame_width, monitor.frame_height, angle);\n            SDL_RenderPresent(monitor.renderer);\n        }\n    }\n}\n\nvoid Panel_sdl::render_texture(SDL_Texture *texture, int tx, int ty, int tw, int th, float angle)\n{\n    SDL_Point pivot;\n    pivot.x = (monitor.frame_width / 2.0f - tx) * (float)monitor.scaling_x;\n    pivot.y = (monitor.frame_height / 2.0f - ty) * (float)monitor.scaling_y;\n    SDL_Rect dstrect;\n    dstrect.w = tw * monitor.scaling_x;\n    dstrect.h = th * monitor.scaling_y;\n    int mw, mh;\n    SDL_GetRendererOutputSize(monitor.renderer, &mw, &mh);\n    dstrect.x = mw / 2.0f - pivot.x;\n    dstrect.y = mh / 2.0f - pivot.y;\n    SDL_RenderCopyEx(monitor.renderer, texture, nullptr, &dstrect, angle, &pivot, SDL_RendererFlip::SDL_FLIP_NONE);\n}\n\nbool Panel_sdl::initFrameBuffer(size_t width, size_t height)\n{\n    uint8_t **lineArray = (uint8_t **)heap_alloc_dma(height * sizeof(uint8_t *));\n    if (nullptr == lineArray) {\n        return false;\n    }\n\n    _texturebuf = (rgb888_t *)heap_alloc_dma(width * height * sizeof(rgb888_t));\n\n    /// 8byte alignment;\n    width = (width + 7) & ~7u;\n\n    _lines_buffer = lineArray;\n    memset(lineArray, 0, height * sizeof(uint8_t *));\n\n    uint8_t *framebuffer = (uint8_t *)heap_alloc_dma(width * height + 16);\n\n    auto fb = framebuffer;\n    {\n        for (size_t y = 0; y < height; ++y) {\n            lineArray[y] = fb;\n            fb += width;\n        }\n    }\n    return true;\n}\n\nvoid Panel_sdl::deinitFrameBuffer(void)\n{\n    auto lines = _lines_buffer;\n    _lines_buffer = nullptr;\n    if (lines != nullptr) {\n        heap_free(lines[0]);\n        heap_free(lines);\n    }\n    if (_texturebuf) {\n        heap_free(_texturebuf);\n        _texturebuf = nullptr;\n    }\n}\n\n//----------------------------------------------------------------------------\n} // namespace v1\n} // namespace lgfx\n\n#endif\n"
  },
  {
    "path": "src/graphics/Panel_sdl.hpp",
    "content": "/*----------------------------------------------------------------------------/\n  Lovyan GFX - Graphics library for embedded devices.\n\nOriginal Source:\n https://github.com/lovyan03/LovyanGFX/\n\nLicence:\n [FreeBSD](https://github.com/lovyan03/LovyanGFX/blob/master/license.txt)\n\nAuthor:\n [lovyan03](https://twitter.com/lovyan03)\n\nContributors:\n [ciniml](https://github.com/ciniml)\n [mongonta0716](https://github.com/mongonta0716)\n [tobozo](https://github.com/tobozo)\n\nPorting for SDL:\n [imliubo](https://github.com/imliubo)\n/----------------------------------------------------------------------------*/\n#pragma once\n\n#define SDL_MAIN_HANDLED\n// cppcheck-suppress preprocessorErrorDirective\n#if __has_include(<SDL2/SDL.h>)\n#include <SDL2/SDL.h>\n#include <SDL2/SDL_main.h>\n#elif __has_include(<SDL.h>)\n#include <SDL.h>\n#include <SDL_main.h>\n#endif\n\n#if defined(SDL_h_)\n#include \"lgfx/v1/Touch.hpp\"\n#include \"lgfx/v1/misc/range.hpp\"\n#include \"lgfx/v1/panel/Panel_FrameBufferBase.hpp\"\n#include <cstdint>\n\nnamespace lgfx\n{\ninline namespace v1\n{\n\nstruct Panel_sdl;\nstruct monitor_t {\n    SDL_Window *window = nullptr;\n    SDL_Renderer *renderer = nullptr;\n    SDL_Texture *texture = nullptr;\n    SDL_Texture *texture_frameimage = nullptr;\n    Panel_sdl *panel = nullptr;\n\n    // 外枠\n    const void *frame_image = 0;\n    uint_fast16_t frame_width = 0;\n    uint_fast16_t frame_height = 0;\n    uint_fast16_t frame_inner_x = 0;\n    uint_fast16_t frame_inner_y = 0;\n    int_fast16_t frame_rotation = 0;\n    int_fast16_t frame_angle = 0;\n\n    float scaling_x = 1;\n    float scaling_y = 1;\n    int_fast16_t touch_x, touch_y;\n    bool touched = false;\n    bool closing = false;\n};\n//----------------------------------------------------------------------------\n\nstruct Touch_sdl : public ITouch {\n    bool init(void) override { return true; }\n    void wakeup(void) override {}\n    void sleep(void) override {}\n    bool isEnable(void) override { return true; };\n    uint_fast8_t getTouchRaw(touch_point_t *tp, uint_fast8_t count) override { return 0; }\n};\n\n//----------------------------------------------------------------------------\n\nstruct Panel_sdl : public Panel_FrameBufferBase {\n    static constexpr size_t EMULATED_GPIO_MAX = 128;\n    static volatile uint8_t _gpio_dummy_values[EMULATED_GPIO_MAX];\n\n  public:\n    Panel_sdl(void);\n    virtual ~Panel_sdl(void);\n\n    bool init(bool use_reset) override;\n\n    color_depth_t setColorDepth(color_depth_t depth) override;\n\n    void display(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h) override;\n\n    // void setInvert(bool invert) override {}\n    void drawPixelPreclipped(uint_fast16_t x, uint_fast16_t y, uint32_t rawcolor) override;\n    void writeFillRectPreclipped(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h, uint32_t rawcolor) override;\n    void writeBlock(uint32_t rawcolor, uint32_t length) override;\n    void writeImage(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h, pixelcopy_t *param,\n                    bool use_dma) override;\n    void writeImageARGB(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h, pixelcopy_t *param) override;\n    void writePixels(pixelcopy_t *param, uint32_t len, bool use_dma) override;\n\n    uint_fast8_t getTouchRaw(touch_point_t *tp, uint_fast8_t count) override;\n\n    void setWindowTitle(const char *title);\n    void setScaling(uint_fast8_t scaling_x, uint_fast8_t scaling_y);\n    void setFrameImage(const void *frame_image, int frame_width, int frame_height, int inner_x, int inner_y);\n    void setFrameRotation(uint_fast16_t frame_rotaion);\n    void setBrightness(uint8_t brightness) override{};\n\n    static volatile void gpio_hi(uint32_t pin) { _gpio_dummy_values[pin & (EMULATED_GPIO_MAX - 1)] = 1; }\n    static volatile void gpio_lo(uint32_t pin) { _gpio_dummy_values[pin & (EMULATED_GPIO_MAX - 1)] = 0; }\n    static volatile bool gpio_in(uint32_t pin) { return _gpio_dummy_values[pin & (EMULATED_GPIO_MAX - 1)]; }\n\n    static int setup(void);\n    static int loop(void);\n    static int close(void);\n\n    static int main(int (*fn)(bool *), uint32_t msec_step_exec = 512);\n\n    static void setShortcutKeymod(SDL_Keymod keymod) { _keymod = keymod; }\n\n    struct KeyCodeMapping_t {\n        SDL_KeyCode keycode = SDLK_UNKNOWN;\n        uint8_t gpio = 0;\n    };\n    static void addKeyCodeMapping(SDL_KeyCode keyCode, uint8_t gpio);\n    static int getKeyCodeMapping(SDL_KeyCode keyCode);\n\n  protected:\n    const char *_window_title = \"LGFX Simulator\";\n    SDL_mutex *_sdl_mutex = nullptr;\n\n    void sdl_create(monitor_t *m);\n    void sdl_update(void);\n\n    touch_point_t _touch_point;\n    monitor_t monitor;\n\n    rgb888_t *_texturebuf = nullptr;\n    uint_fast16_t _modified_counter;\n    uint_fast16_t _texupdate_counter;\n    uint_fast16_t _display_counter;\n    bool _invalidated;\n\n    static void _event_proc(void);\n    static void _update_proc(void);\n    static void _update_scaling(monitor_t *m, float sx, float sy);\n    void sdl_invalidate(void) { _invalidated = true; }\n    void render_texture(SDL_Texture *texture, int tx, int ty, int tw, int th, float angle);\n    bool initFrameBuffer(size_t width, size_t height);\n    void deinitFrameBuffer(void);\n\n    static SDL_Keymod _keymod;\n\n    struct lock_t {\n        lock_t(Panel_sdl *parent);\n        ~lock_t();\n\n      protected:\n        Panel_sdl *_parent;\n    };\n};\n//----------------------------------------------------------------------------\n} // namespace v1\n} // namespace lgfx\n#endif"
  },
  {
    "path": "src/graphics/PointStruct.h",
    "content": "struct PointStruct {\n    int x;\n    int y;\n};"
  },
  {
    "path": "src/graphics/Screen.cpp",
    "content": "/*\nBaseUI\n\nDeveloped and Maintained By:\n- Ronald Garcia (HarukiToreda) – Lead development and implementation.\n- JasonP (Xaositek)  – Screen layout and icon design, UI improvements and testing.\n- TonyG (Tropho) – Project management, structural planning, and testing\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n*/\n#include \"Screen.h\"\n#include \"NodeDB.h\"\n#include \"PowerMon.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n#include \"meshUtils.h\"\n#if HAS_SCREEN\n#include <OLEDDisplay.h>\n\n#include \"DisplayFormatters.h\"\n#include \"TimeFormatters.h\"\n#include \"draw/ClockRenderer.h\"\n#include \"draw/DebugRenderer.h\"\n#include \"draw/MenuHandler.h\"\n#include \"draw/MessageRenderer.h\"\n#include \"draw/NodeListRenderer.h\"\n#include \"draw/NotificationRenderer.h\"\n#include \"draw/UIRenderer.h\"\n#include \"modules/CannedMessageModule.h\"\n\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#include \"buzz.h\"\n#endif\n#include \"FSCommon.h\"\n#include \"MeshService.h\"\n#include \"MessageStore.h\"\n#include \"RadioLibInterface.h\"\n#include \"error.h\"\n#include \"gps/GeoCoord.h\"\n#include \"gps/RTC.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/emotes.h\"\n#include \"graphics/images.h\"\n#include \"input/TouchScreenImpl1.h\"\n#include \"main.h\"\n#include \"mesh-pb-constants.h\"\n#include \"mesh/Channels.h\"\n#include \"mesh/generated/meshtastic/deviceonly.pb.h\"\n#include \"modules/ExternalNotificationModule.h\"\n#include \"modules/TextMessageModule.h\"\n#include \"modules/WaypointModule.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\nextern MessageStore messageStore;\n\n#if USE_TFTDISPLAY\nextern uint16_t TFT_MESH;\n#else\nuint16_t TFT_MESH = COLOR565(0x67, 0xEA, 0x94);\n#endif\n\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n\n#ifdef ARCH_ESP32\n#endif\n\n#if ARCH_PORTDUINO\n#include \"modules/StoreForwardModule.h\"\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\n#if defined(T_LORA_PAGER)\n// KB backlight control\n#include \"input/cardKbI2cImpl.h\"\n#endif\n\nusing namespace meshtastic; /** @todo remove */\n\nnamespace graphics\n{\n\n// This means the *visible* area (sh1106 can address 132, but shows 128 for example)\n#define IDLE_FRAMERATE 1 // in fps\n\n// DEBUG\n#define NUM_EXTRA_FRAMES 3 // text message and debug frame\n// if defined a pixel will blink to show redraws\n// #define SHOW_REDRAWS\n#define ASCII_BELL '\\x07'\n// A text message frame + debug frame + all the node infos\nFrameCallback *normalFrames;\nstatic uint32_t targetFramerate = IDLE_FRAMERATE;\n// Global variables for alert banner - explicitly define with extern \"C\" linkage to prevent optimization\n\nuint32_t logo_timeout = 5000; // 4 seconds for EACH logo\n\n// Threshold values for the GPS lock accuracy bar display\nuint32_t dopThresholds[5] = {2000, 1000, 500, 200, 100};\n\n// At some point, we're going to ask all of the modules if they would like to display a screen frame\n// we'll need to hold onto pointers for the modules that can draw a frame.\nstd::vector<MeshModule *> moduleFrames;\n\n#if HAS_GPS\n// GeoCoord object for the screen\nGeoCoord geoCoord;\n#endif\n\n#ifdef SHOW_REDRAWS\nstatic bool heartbeat = false;\n#endif\n\n#include \"graphics/ScreenFonts.h\"\n#include <Throttle.h>\n\n// Usage: int stringWidth = formatDateTime(datetimeStr, sizeof(datetimeStr), rtc_sec, display);\n// End Functions to write date/time to the screen\n\nextern bool hasUnreadMessage;\n\n// ==============================\n// Overlay Alert Banner Renderer\n// ==============================\n// Displays a temporary centered banner message (e.g., warning, status, etc.)\n// The banner appears in the center of the screen and disappears after the specified duration\n\nvoid Screen::showSimpleBanner(const char *message, uint32_t durationMs)\n{\n    BannerOverlayOptions options;\n    options.message = message;\n    options.durationMs = durationMs;\n    options.notificationType = notificationTypeEnum::text_banner;\n    showOverlayBanner(options);\n}\n\n// Called to trigger a banner with custom message and duration\nvoid Screen::showOverlayBanner(BannerOverlayOptions banner_overlay_options)\n{\n#ifdef USE_EINK\n    EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // Skip full refresh for all overlay menus\n#endif\n    // Store the message and set the expiration timestamp\n    strncpy(NotificationRenderer::alertBannerMessage, banner_overlay_options.message, 255);\n    NotificationRenderer::alertBannerMessage[255] = '\\0'; // Ensure null termination\n    NotificationRenderer::alertBannerUntil =\n        (banner_overlay_options.durationMs == 0) ? 0 : millis() + banner_overlay_options.durationMs;\n    NotificationRenderer::optionsArrayPtr = banner_overlay_options.optionsArrayPtr;\n    NotificationRenderer::optionsEnumPtr = banner_overlay_options.optionsEnumPtr;\n    NotificationRenderer::alertBannerOptions = banner_overlay_options.optionsCount;\n    NotificationRenderer::alertBannerCallback = banner_overlay_options.bannerCallback;\n    NotificationRenderer::curSelected = banner_overlay_options.InitialSelected;\n    NotificationRenderer::pauseBanner = false;\n    NotificationRenderer::current_notification_type = notificationTypeEnum::selection_picker;\n    static OverlayCallback overlays[] = {graphics::UIRenderer::drawNavigationBar, NotificationRenderer::drawBannercallback};\n    ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n    ui->setTargetFPS(60);\n    ui->update();\n}\n\n// Called to trigger a banner with custom message and duration\nvoid Screen::showNodePicker(const char *message, uint32_t durationMs, std::function<void(uint32_t)> bannerCallback)\n{\n#ifdef USE_EINK\n    EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // Skip full refresh for all overlay menus\n#endif\n    nodeDB->pause_sort(true);\n    // Store the message and set the expiration timestamp\n    strncpy(NotificationRenderer::alertBannerMessage, message, 255);\n    NotificationRenderer::alertBannerMessage[255] = '\\0'; // Ensure null termination\n    NotificationRenderer::alertBannerUntil = (durationMs == 0) ? 0 : millis() + durationMs;\n    NotificationRenderer::alertBannerCallback = bannerCallback;\n    NotificationRenderer::pauseBanner = false;\n    NotificationRenderer::curSelected = 0;\n    NotificationRenderer::current_notification_type = notificationTypeEnum::node_picker;\n\n    static OverlayCallback overlays[] = {graphics::UIRenderer::drawNavigationBar, NotificationRenderer::drawBannercallback};\n    ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n    ui->setTargetFPS(60);\n    ui->update();\n}\n\n// Called to trigger a banner with custom message and duration\nvoid Screen::showNumberPicker(const char *message, uint32_t durationMs, uint8_t digits,\n                              std::function<void(uint32_t)> bannerCallback)\n{\n#ifdef USE_EINK\n    EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // Skip full refresh for all overlay menus\n#endif\n    // Store the message and set the expiration timestamp\n    strncpy(NotificationRenderer::alertBannerMessage, message, 255);\n    NotificationRenderer::alertBannerMessage[255] = '\\0'; // Ensure null termination\n    NotificationRenderer::alertBannerUntil = (durationMs == 0) ? 0 : millis() + durationMs;\n    NotificationRenderer::alertBannerCallback = bannerCallback;\n    NotificationRenderer::pauseBanner = false;\n    NotificationRenderer::curSelected = 0;\n    NotificationRenderer::current_notification_type = notificationTypeEnum::number_picker;\n    NotificationRenderer::numDigits = digits;\n    NotificationRenderer::currentNumber = 0;\n\n    static OverlayCallback overlays[] = {graphics::UIRenderer::drawNavigationBar, NotificationRenderer::drawBannercallback};\n    ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n    ui->setTargetFPS(60);\n    ui->update();\n}\n\nvoid Screen::showTextInput(const char *header, const char *initialText, uint32_t durationMs,\n                           std::function<void(const std::string &)> textCallback)\n{\n    LOG_INFO(\"showTextInput called with header='%s', durationMs=%d\", header ? header : \"NULL\", durationMs);\n\n    // Start OnScreenKeyboardModule session (non-touch variant)\n    OnScreenKeyboardModule::instance().start(header, initialText, durationMs, textCallback);\n    NotificationRenderer::textInputCallback = textCallback;\n\n    // Store the message and set the expiration timestamp (use same pattern as other notifications)\n    strncpy(NotificationRenderer::alertBannerMessage, header ? header : \"Text Input\", 255);\n    NotificationRenderer::alertBannerMessage[255] = '\\0';\n    NotificationRenderer::alertBannerUntil = (durationMs == 0) ? 0 : millis() + durationMs;\n    NotificationRenderer::pauseBanner = false;\n    NotificationRenderer::current_notification_type = notificationTypeEnum::text_input;\n\n    // Set the overlay using the same pattern as other notification types\n    static OverlayCallback overlays[] = {graphics::UIRenderer::drawNavigationBar, NotificationRenderer::drawBannercallback};\n    ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n    ui->setTargetFPS(60);\n    ui->update();\n}\n\nstatic void drawModuleFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    uint8_t module_frame;\n    // there's a little but in the UI transition code\n    // where it invokes the function at the correct offset\n    // in the array of \"drawScreen\" functions; however,\n    // the passed-state doesn't quite reflect the \"current\"\n    // screen, so we have to detect it.\n    if (state->frameState == IN_TRANSITION && state->transitionFrameRelationship == TransitionRelationship_INCOMING) {\n        // if we're transitioning from the end of the frame list back around to the first\n        // frame, then we want this to be `0`\n        module_frame = state->transitionFrameTarget;\n    } else {\n        // otherwise, just display the module frame that's aligned with the current frame\n        module_frame = state->currentFrame;\n    }\n    MeshModule &pi = *moduleFrames.at(module_frame);\n    pi.drawFrame(display, state, x, y);\n}\n\n/**\n * Given a recent lat/lon return a guess of the heading the user is walking on.\n *\n * We keep a series of \"after you've gone 10 meters, what is your heading since\n * the last reference point?\"\n */\nfloat Screen::estimatedHeading(double lat, double lon)\n{\n    static double oldLat, oldLon;\n    static float b;\n\n    if (oldLat == 0) {\n        // just prepare for next time\n        oldLat = lat;\n        oldLon = lon;\n\n        return b;\n    }\n\n    float d = GeoCoord::latLongToMeter(oldLat, oldLon, lat, lon);\n    if (d < 10) // haven't moved enough, just keep current bearing\n        return b;\n\n    b = GeoCoord::bearing(oldLat, oldLon, lat, lon) * RAD_TO_DEG;\n    oldLat = lat;\n    oldLon = lon;\n\n    return b;\n}\n\n/// We will skip one node - the one for us, so we just blindly loop over all\n/// nodes\nstatic int8_t prevFrame = -1;\n\n// Combined dynamic node list frame cycling through LastHeard, HopSignal, and Distance modes\n// Uses a single frame and changes data every few seconds (E-Ink variant is separate)\n\n#if defined(ESP_PLATFORM) && (defined(USE_ST7789) || defined(USE_ST7796))\nSPIClass SPI1(HSPI);\n#endif\n\nScreen::Screen(ScanI2C::DeviceAddress address, meshtastic_Config_DisplayConfig_OledType screenType, OLEDDISPLAY_GEOMETRY geometry)\n    : concurrency::OSThread(\"Screen\"), address_found(address), model(screenType), geometry(geometry), cmdQueue(32)\n{\n    graphics::normalFrames = new FrameCallback[MAX_NUM_NODES + NUM_EXTRA_FRAMES];\n\n    int32_t rawRGB = uiconfig.screen_rgb_color;\n\n    // Only validate the combined value once\n    if (rawRGB > 0 && rawRGB <= 255255255) {\n        LOG_INFO(\"Setting screen RGB color to user chosen: 0x%06X\", rawRGB);\n        // Extract each component as a normal int first\n        int r = (rawRGB >> 16) & 0xFF;\n        int g = (rawRGB >> 8) & 0xFF;\n        int b = rawRGB & 0xFF;\n        if (r >= 0 && r <= 255 && g >= 0 && g <= 255 && b >= 0 && b <= 255) {\n            TFT_MESH = COLOR565(static_cast<uint8_t>(r), static_cast<uint8_t>(g), static_cast<uint8_t>(b));\n        }\n#ifdef TFT_MESH_OVERRIDE\n    } else if (rawRGB == 0) {\n        LOG_INFO(\"Setting screen RGB color to TFT_MESH_OVERRIDE: 0x%04X\", TFT_MESH_OVERRIDE);\n        // Default to TFT_MESH_OVERRIDE if available\n        TFT_MESH = TFT_MESH_OVERRIDE;\n#endif\n    } else {\n        // Default best readable yellow color\n        LOG_INFO(\"Setting screen RGB color to default: (255,255,128)\");\n        TFT_MESH = COLOR565(255, 255, 128);\n    }\n\n#if defined(USE_SH1106) || defined(USE_SH1107) || defined(USE_SH1107_128_64)\n    dispdev = new SH1106Wire(address.address, -1, -1, geometry,\n                             (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n#elif defined(USE_ST7789)\n#ifdef ESP_PLATFORM\n    dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT, ST7789_SDA,\n                            ST7789_MISO, ST7789_SCK);\n#else\n    dispdev = new ST7789Spi(&SPI1, ST7789_RESET, ST7789_RS, ST7789_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);\n#endif\n#elif defined(USE_ST7796)\n#ifdef ESP_PLATFORM\n    dispdev = new ST7796Spi(&SPI1, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT, ST7796_SDA,\n                            ST7796_MISO, ST7796_SCK, TFT_SPI_FREQUENCY);\n#else\n    dispdev = new ST7796Spi(&SPI1, ST7796_RESET, ST7796_RS, ST7796_NSS, GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);\n#endif\n#elif defined(USE_SSD1306)\n    dispdev = new SSD1306Wire(address.address, -1, -1, geometry,\n                              (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n#elif defined(USE_SPISSD1306)\n    dispdev = new SSD1306Spi(SSD1306_RESET, SSD1306_RS, SSD1306_NSS, GEOMETRY_64_48);\n    if (!dispdev->init()) {\n        LOG_DEBUG(\"Error: SSD1306 not detected!\");\n    } else {\n        static_cast<SSD1306Spi *>(dispdev)->setHorizontalOffset(32);\n        LOG_INFO(\"SSD1306 init success\");\n    }\n#elif defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7789_CS) ||    \\\n    defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(HACKADAY_COMMUNICATOR)\n    dispdev = new TFTDisplay(address.address, -1, -1, geometry,\n                             (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n#elif defined(USE_EINK) && !defined(USE_EINK_DYNAMICDISPLAY)\n    dispdev = new EInkDisplay(address.address, -1, -1, geometry,\n                              (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n#elif defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY)\n    dispdev = new EInkDynamicDisplay(address.address, -1, -1, geometry,\n                                     (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n#elif defined(USE_ST7567)\n    dispdev = new ST7567Wire(address.address, -1, -1, geometry,\n                             (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n#elif ARCH_PORTDUINO\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        if (portduino_config.displayPanel != no_screen) {\n            LOG_DEBUG(\"Make TFTDisplay!\");\n            dispdev = new TFTDisplay(address.address, -1, -1, geometry,\n                                     (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n        } else {\n            dispdev = new AutoOLEDWire(address.address, -1, -1, geometry,\n                                       (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n            isAUTOOled = true;\n        }\n    }\n#else\n    dispdev = new AutoOLEDWire(address.address, -1, -1, geometry,\n                               (address.port == ScanI2C::I2CPort::WIRE1) ? HW_I2C::I2C_TWO : HW_I2C::I2C_ONE);\n    isAUTOOled = true;\n#endif\n\n#if defined(USE_ST7789)\n    static_cast<ST7789Spi *>(dispdev)->setRGB(TFT_MESH);\n#elif defined(USE_ST7796)\n    static_cast<ST7796Spi *>(dispdev)->setRGB(TFT_MESH);\n#endif\n\n    ui = new OLEDDisplayUi(dispdev);\n    cmdQueue.setReader(this);\n}\n\nScreen::~Screen()\n{\n    delete[] graphics::normalFrames;\n}\n\n/**\n * Prepare the display for the unit going to the lowest power mode possible.  Most screens will just\n * poweroff, but eink screens will show a \"I'm sleeping\" graphic, possibly with a QR code\n */\nvoid Screen::doDeepSleep()\n{\n#ifdef USE_EINK\n    setOn(false, graphics::UIRenderer::drawDeepSleepFrame);\n#else\n    // Without E-Ink display:\n    setOn(false);\n#endif\n}\n\nvoid Screen::handleSetOn(bool on, FrameCallback einkScreensaver)\n{\n    if (!useDisplay)\n        return;\n\n    if (on != screenOn) {\n        if (on) {\n            LOG_INFO(\"Turn on screen\");\n            powerMon->setState(meshtastic_PowerMon_State_Screen_On);\n#ifdef T_WATCH_S3\n            PMU->enablePowerOutput(XPOWERS_ALDO2);\n#endif\n\n// some screens seem to need a kick in the pants to turn back on\n#if defined(MUZI_BASE) || defined(M5STACK_CARDPUTER_ADV)\n            dispdev->init();\n            dispdev->setBrightness(brightness);\n            dispdev->flipScreenVertically();\n            dispdev->resetDisplay();\n#ifdef SCREEN_12V_ENABLE\n            digitalWrite(SCREEN_12V_ENABLE, HIGH);\n#endif\n            delay(100);\n#endif\n#if !ARCH_PORTDUINO\n            dispdev->displayOn();\n#endif\n\n#ifdef PIN_EINK_EN\n            if (uiconfig.screen_brightness == 1)\n                digitalWrite(PIN_EINK_EN, HIGH);\n#elif defined(PCA_PIN_EINK_EN)\n            if (uiconfig.screen_brightness > 0)\n                io.digitalWrite(PCA_PIN_EINK_EN, HIGH);\n#endif\n\n#if defined(ST7789_CS) &&                                                                                                        \\\n    !defined(M5STACK) // set display brightness when turning on screens. Just moved function from TFTDisplay to here.\n            static_cast<TFTDisplay *>(dispdev)->setDisplayBrightness(brightness);\n#endif\n\n            dispdev->displayOn();\n#if defined(HELTEC_TRACKER_V1_X) || defined(HELTEC_WIRELESS_TRACKER_V2)\n            ui->init();\n#endif\n#if defined(USE_ST7789) && defined(VTFT_LEDA)\n#ifdef VTFT_CTRL\n            pinMode(VTFT_CTRL, OUTPUT);\n            digitalWrite(VTFT_CTRL, LOW);\n#endif\n            ui->init();\n#ifdef ESP_PLATFORM\n            analogWrite(VTFT_LEDA, BRIGHTNESS_DEFAULT);\n#else\n            pinMode(VTFT_LEDA, OUTPUT);\n            digitalWrite(VTFT_LEDA, TFT_BACKLIGHT_ON);\n#endif\n#endif\n#ifdef USE_ST7796\n            ui->init();\n#ifdef ESP_PLATFORM\n            analogWrite(VTFT_LEDA, BRIGHTNESS_DEFAULT);\n#else\n            pinMode(VTFT_LEDA, OUTPUT);\n            digitalWrite(VTFT_LEDA, TFT_BACKLIGHT_ON);\n#endif\n#endif\n            enabled = true;\n            setInterval(0); // Draw ASAP\n            runASAP = true;\n        } else {\n            powerMon->clearState(meshtastic_PowerMon_State_Screen_On);\n#ifdef USE_EINK\n            // eInkScreensaver parameter is usually NULL (default argument), default frame used instead\n            setScreensaverFrames(einkScreensaver);\n#endif\n\n#ifdef PIN_EINK_EN\n            digitalWrite(PIN_EINK_EN, LOW);\n#elif defined(PCA_PIN_EINK_EN)\n            io.digitalWrite(PCA_PIN_EINK_EN, LOW);\n#endif\n\n            dispdev->displayOff();\n\n#ifdef SCREEN_12V_ENABLE\n            digitalWrite(SCREEN_12V_ENABLE, LOW);\n#endif\n#ifdef USE_ST7789\n            SPI1.end();\n#if defined(ARCH_ESP32)\n#ifdef VTFT_LEDA\n            pinMode(VTFT_LEDA, ANALOG);\n#endif\n#ifdef VTFT_CTRL\n            pinMode(VTFT_CTRL, ANALOG);\n#endif\n            pinMode(ST7789_RESET, ANALOG);\n            pinMode(ST7789_RS, ANALOG);\n            pinMode(ST7789_NSS, ANALOG);\n#else\n            nrf_gpio_cfg_default(VTFT_LEDA);\n            nrf_gpio_cfg_default(VTFT_CTRL);\n            nrf_gpio_cfg_default(ST7789_RESET);\n            nrf_gpio_cfg_default(ST7789_RS);\n            nrf_gpio_cfg_default(ST7789_NSS);\n#endif\n#endif\n#ifdef USE_ST7796\n            SPI1.end();\n#if defined(ARCH_ESP32)\n            pinMode(VTFT_LEDA, OUTPUT);\n            digitalWrite(VTFT_LEDA, LOW);\n            pinMode(ST7796_RESET, ANALOG);\n            pinMode(ST7796_RS, ANALOG);\n            pinMode(ST7796_NSS, ANALOG);\n#else\n            nrf_gpio_cfg_default(VTFT_LEDA);\n            nrf_gpio_cfg_default(ST7796_RESET);\n            nrf_gpio_cfg_default(ST7796_RS);\n            nrf_gpio_cfg_default(ST7796_NSS);\n#endif\n#endif\n\n#ifdef T_WATCH_S3\n            PMU->disablePowerOutput(XPOWERS_ALDO2);\n#endif\n            enabled = false;\n        }\n        screenOn = on;\n    }\n}\n\nvoid Screen::setup()\n{\n\n    // Enable display rendering\n    useDisplay = true;\n\n    // Load saved brightness from UI config\n    // For OLED displays (SSD1306), default brightness is 255 if not set\n    if (uiconfig.screen_brightness == 0) {\n#if defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107)\n        brightness = 255; // Default for OLED\n#else\n        brightness = BRIGHTNESS_DEFAULT;\n#endif\n    } else {\n        brightness = uiconfig.screen_brightness;\n    }\n\n    // Detect OLED subtype (if supported by board variant)\n#ifdef AutoOLEDWire_h\n    if (isAUTOOled)\n        static_cast<AutoOLEDWire *>(dispdev)->setDetected(model);\n#endif\n\n#if defined(USE_SH1107_128_64) || defined(USE_SH1107)\n    static_cast<SH1106Wire *>(dispdev)->setSubtype(7);\n#endif\n\n#if defined(USE_ST7789) && defined(TFT_MESH)\n    // Apply custom RGB color (e.g. Heltec T114/T190)\n    static_cast<ST7789Spi *>(dispdev)->setRGB(TFT_MESH);\n#endif\n#if defined(MUZI_BASE)\n    dispdev->delayPoweron = true;\n#endif\n#if defined(USE_ST7796) && defined(TFT_MESH)\n    // Custom text color, if defined in variant.h\n    static_cast<ST7796Spi *>(dispdev)->setRGB(TFT_MESH);\n#endif\n\n    // Initialize display and UI system\n    ui->init();\n    displayWidth = dispdev->width();\n    displayHeight = dispdev->height();\n\n    ui->setTimePerTransition(0);           // Disable animation delays\n    ui->setIndicatorPosition(BOTTOM);      // Not used (indicators disabled below)\n    ui->setIndicatorDirection(LEFT_RIGHT); // Not used (indicators disabled below)\n    ui->setFrameAnimation(SLIDE_LEFT);     // Used only when indicators are active\n    ui->disableAllIndicators();            // Disable page indicator dots\n    ui->getUiState()->userData = this;     // Allow static callbacks to access Screen instance\n\n    // Apply loaded brightness\n#if defined(ST7789_CS)\n    static_cast<TFTDisplay *>(dispdev)->setDisplayBrightness(brightness);\n#elif defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107) || defined(USE_SPISSD1306)\n    dispdev->setBrightness(brightness);\n#endif\n    LOG_INFO(\"Applied screen brightness: %d\", brightness);\n\n    // Set custom overlay callbacks\n    static OverlayCallback overlays[] = {\n        graphics::UIRenderer::drawNavigationBar // Custom indicator icons for each frame\n    };\n    ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n\n    // Enable UTF-8 to display mapping\n    dispdev->setFontTableLookupFunction(customFontTableLookup);\n\n#ifdef USERPREFS_OEM_TEXT\n    logo_timeout *= 2; // Give more time for branded boot logos\n#endif\n\n    // Configure alert frames (e.g., \"Resuming...\" or region name)\n    EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // Skip slow refresh\n    alertFrames[0] = [this](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) {\n#ifdef ARCH_ESP32\n        if (wakeCause == ESP_SLEEP_WAKEUP_TIMER || wakeCause == ESP_SLEEP_WAKEUP_EXT1)\n            graphics::UIRenderer::drawFrameText(display, state, x, y, \"Resuming...\");\n        else\n#endif\n        {\n            const char *region = myRegion ? myRegion->name : nullptr;\n            graphics::UIRenderer::drawIconScreen(region, display, state, x, y);\n        }\n    };\n    ui->setFrames(alertFrames, 1);\n    ui->disableAutoTransition(); // Require manual navigation between frames\n\n    // Log buffer for on-screen logs (3 lines max)\n    dispdev->setLogBuffer(3, 32);\n\n    // Optional screen mirroring or flipping (e.g. for T-Beam orientation)\n#ifdef SCREEN_MIRROR\n    dispdev->mirrorScreen();\n#else\n    if (!config.display.flip_screen) {\n#if defined(ST7701_CS) || defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7789_CS) ||      \\\n    defined(RAK14014) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(HACKADAY_COMMUNICATOR)\n        static_cast<TFTDisplay *>(dispdev)->flipScreenVertically();\n#elif defined(USE_ST7789)\n        static_cast<ST7789Spi *>(dispdev)->flipScreenVertically();\n#elif defined(USE_ST7796)\n        static_cast<ST7796Spi *>(dispdev)->mirrorScreen();\n#elif !defined(M5STACK_UNITC6L)\n        dispdev->flipScreenVertically();\n#endif\n    }\n#endif\n\n    // Generate device ID from MAC address\n    uint8_t dmac[6];\n    getMacAddr(dmac);\n    snprintf(screen->ourId, sizeof(screen->ourId), \"%02x%02x\", dmac[4], dmac[5]);\n\n#if ARCH_PORTDUINO\n    handleSetOn(false); // Ensure proper init for Arduino targets\n#endif\n\n    //  Turn on display and trigger first draw\n    handleSetOn(true);\n    graphics::currentResolution = graphics::determineScreenResolution(dispdev->height(), dispdev->width());\n    ui->update();\n#ifndef USE_EINK\n    ui->update(); // Some SSD1306 clones drop the first draw, so run twice\n#endif\n    serialSinceMsec = millis();\n\n#if ARCH_PORTDUINO\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        if (portduino_config.touchscreenModule) {\n            touchScreenImpl1 =\n                new TouchScreenImpl1(dispdev->getWidth(), dispdev->getHeight(), static_cast<TFTDisplay *>(dispdev)->getTouch);\n            touchScreenImpl1->init();\n        }\n    }\n#elif HAS_TOUCHSCREEN && !defined(USE_EINK) && !HAS_CST226SE\n    touchScreenImpl1 =\n        new TouchScreenImpl1(dispdev->getWidth(), dispdev->getHeight(), static_cast<TFTDisplay *>(dispdev)->getTouch);\n    touchScreenImpl1->init();\n#endif\n\n    // Subscribe to device status updates\n    powerStatusObserver.observe(&powerStatus->onNewStatus);\n    gpsStatusObserver.observe(&gpsStatus->onNewStatus);\n    nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n\n#if !MESHTASTIC_EXCLUDE_ADMIN\n    adminMessageObserver.observe(adminModule);\n#endif\n    if (inputBroker)\n        inputObserver.observe(inputBroker);\n\n    // Load persisted messages into RAM\n    messageStore.loadFromFlash();\n    LOG_INFO(\"MessageStore loaded from flash\");\n\n    // Notify modules that support UI events\n    MeshModule::observeUIEvents(&uiFrameEventObserver);\n}\n\nvoid Screen::setOn(bool on, FrameCallback einkScreensaver)\n{\n#if defined(T_LORA_PAGER)\n    if (cardKbI2cImpl)\n        cardKbI2cImpl->toggleBacklight(on);\n#endif\n    if (!on)\n        // We handle off commands immediately, because they might be called because the CPU is shutting down\n        handleSetOn(false, einkScreensaver);\n    else\n        enqueueCmd(ScreenCmd{.cmd = Cmd::SET_ON});\n}\n\nvoid Screen::forceDisplay(bool forceUiUpdate)\n{\n    // Nasty hack to force epaper updates for 'key' frames.  FIXME, cleanup.\n#ifdef USE_EINK\n    // If requested, make sure queued commands are run, and UI has rendered a new frame\n    if (forceUiUpdate) {\n        // Force a display refresh, in addition to the UI update\n        // Changing the GPS status bar icon apparently doesn't register as a change in image\n        // (False negative of the image hashing algorithm used to skip identical frames)\n        EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST);\n\n        // No delay between UI frame rendering\n        setFastFramerate();\n\n        // Make sure all CMDs have run first\n        while (!cmdQueue.isEmpty())\n            runOnce();\n\n        // Ensure at least one frame has drawn\n        uint64_t startUpdate;\n        do {\n            startUpdate = millis(); // Handle impossibly unlikely corner case of a millis() overflow..\n            delay(10);\n            ui->update();\n        } while (ui->getUiState()->lastUpdate < startUpdate);\n\n        // Return to normal frame rate\n        targetFramerate = IDLE_FRAMERATE;\n        ui->setTargetFPS(targetFramerate);\n    }\n\n    // Tell EInk class to update the display\n    static_cast<EInkDisplay *>(dispdev)->forceDisplay();\n#else\n    // No delay between UI frame rendering\n    if (forceUiUpdate) {\n        setFastFramerate();\n    }\n#endif\n}\n\nstatic uint32_t lastScreenTransition;\n\nint32_t Screen::runOnce()\n{\n    // If we don't have a screen, don't ever spend any CPU for us.\n    if (!useDisplay) {\n        enabled = false;\n        return RUN_SAME;\n    }\n\n    if (displayHeight == 0) {\n        displayHeight = dispdev->getHeight();\n    }\n\n    // Detect frame transitions and clear message cache when leaving text message screen\n    {\n        static int8_t lastFrameIndex = -1;\n        int8_t currentFrameIndex = ui->getUiState()->currentFrame;\n        int8_t textMsgIndex = framesetInfo.positions.textMessage;\n\n        if (lastFrameIndex != -1 && currentFrameIndex != lastFrameIndex) {\n\n            if (lastFrameIndex == textMsgIndex && currentFrameIndex != textMsgIndex) {\n                graphics::MessageRenderer::clearMessageCache();\n            }\n        }\n\n        lastFrameIndex = currentFrameIndex;\n    }\n\n    menuHandler::handleMenuSwitch(dispdev);\n\n    // Show boot screen for first logo_timeout seconds, then switch to normal operation.\n    // serialSinceMsec adjusts for additional serial wait time during nRF52 bootup\n    static bool showingBootScreen = true;\n    if (showingBootScreen && (millis() > (logo_timeout + serialSinceMsec))) {\n        LOG_INFO(\"Done with boot screen\");\n        stopBootScreen();\n        showingBootScreen = false;\n    }\n\n#ifdef USERPREFS_OEM_TEXT\n    static bool showingOEMBootScreen = true;\n    if (showingOEMBootScreen && (millis() > ((logo_timeout / 2) + serialSinceMsec))) {\n        LOG_INFO(\"Switch to OEM screen...\");\n        // Change frames.\n        static FrameCallback bootOEMFrames[] = {graphics::UIRenderer::drawOEMBootScreen};\n        static const int bootOEMFrameCount = sizeof(bootOEMFrames) / sizeof(bootOEMFrames[0]);\n        ui->setFrames(bootOEMFrames, bootOEMFrameCount);\n        ui->update();\n#ifndef USE_EINK\n        ui->update();\n#endif\n        showingOEMBootScreen = false;\n    }\n#endif\n\n#ifndef DISABLE_WELCOME_UNSET\n    if (!NotificationRenderer::isOverlayBannerShowing() && config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n#if defined(M5STACK_UNITC6L)\n        menuHandler::LoraRegionPicker();\n#else\n        menuHandler::OnboardMessage();\n#endif\n    }\n#endif\n    if (!NotificationRenderer::isOverlayBannerShowing() && rebootAtMsec != 0 && !suppressRebootBanner) {\n        showSimpleBanner(\"Rebooting...\", 0);\n    }\n\n    // Process incoming commands.\n    for (;;) {\n        ScreenCmd cmd;\n        if (!cmdQueue.dequeue(&cmd, 0)) {\n            break;\n        }\n        switch (cmd.cmd) {\n        case Cmd::SET_ON:\n            handleSetOn(true);\n            break;\n        case Cmd::SET_OFF:\n            handleSetOn(false);\n            break;\n        case Cmd::ON_PRESS:\n            if (NotificationRenderer::current_notification_type != notificationTypeEnum::text_input) {\n                showFrame(FrameDirection::NEXT);\n            }\n            break;\n        case Cmd::SHOW_PREV_FRAME:\n            if (NotificationRenderer::current_notification_type != notificationTypeEnum::text_input) {\n                showFrame(FrameDirection::PREVIOUS);\n            }\n            break;\n        case Cmd::SHOW_NEXT_FRAME:\n            if (NotificationRenderer::current_notification_type != notificationTypeEnum::text_input) {\n                showFrame(FrameDirection::NEXT);\n            }\n            break;\n        case Cmd::START_ALERT_FRAME: {\n            showingBootScreen = false; // this should avoid the edge case where an alert triggers before the boot screen goes away\n            showingNormalScreen = false;\n            NotificationRenderer::pauseBanner = true;\n            alertFrames[0] = alertFrame;\n#ifdef USE_EINK\n            EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // Use fast-refresh for next frame, no skip please\n            EINK_ADD_FRAMEFLAG(dispdev, BLOCKING);    // Edge case: if this frame is promoted to COSMETIC, wait for update\n            handleSetOn(true); // Ensure power-on to receive deep-sleep screensaver (PowerFSM should handle?)\n#endif\n            setFrameImmediateDraw(alertFrames);\n            break;\n        }\n        case Cmd::START_FIRMWARE_UPDATE_SCREEN:\n            handleStartFirmwareUpdateScreen();\n            break;\n        case Cmd::STOP_ALERT_FRAME:\n            NotificationRenderer::pauseBanner = false;\n            // Return from one-off alert mode back to regular frames.\n            if (!showingNormalScreen && NotificationRenderer::current_notification_type != notificationTypeEnum::text_input) {\n                setFrames();\n            }\n            break;\n        case Cmd::STOP_BOOT_SCREEN:\n            EINK_ADD_FRAMEFLAG(dispdev, COSMETIC); // E-Ink: Explicitly use full-refresh for next frame\n            if (NotificationRenderer::current_notification_type != notificationTypeEnum::text_input) {\n                setFrames();\n            }\n            break;\n        case Cmd::NOOP:\n            break;\n        default:\n            LOG_ERROR(\"Invalid screen cmd\");\n        }\n    }\n\n    if (!screenOn) { // If we didn't just wake and the screen is still off, then\n                     // stop updating until it is on again\n        enabled = false;\n        return 0;\n    }\n\n    // this must be before the frameState == FIXED check, because we always\n    // want to draw at least one FIXED frame before doing forceDisplay\n    ui->update();\n\n    // Switch to a low framerate (to save CPU) when we are not in transition\n    // but we should only call setTargetFPS when framestate changes, because\n    // otherwise that breaks animations.\n\n    if (targetFramerate != IDLE_FRAMERATE && ui->getUiState()->frameState == FIXED) {\n        // oldFrameState = ui->getUiState()->frameState;\n        targetFramerate = IDLE_FRAMERATE;\n\n        ui->setTargetFPS(targetFramerate);\n        forceDisplay();\n    }\n\n    // While showing the bootscreen or Bluetooth pair screen all of our\n    // standard screen switching is stopped.\n    if (showingNormalScreen) {\n        // standard screen loop handling here\n        if (config.display.auto_screen_carousel_secs > 0 &&\n            NotificationRenderer::current_notification_type != notificationTypeEnum::text_input &&\n            !Throttle::isWithinTimespanMs(lastScreenTransition, config.display.auto_screen_carousel_secs * 1000)) {\n\n            // If an E-Ink display struggles with fast refresh, force carousel to use full refresh instead\n            // Carousel is potentially a major source of E-Ink display wear\n#if !defined(EINK_BACKGROUND_USES_FAST)\n            EINK_ADD_FRAMEFLAG(dispdev, COSMETIC);\n#endif\n\n            LOG_DEBUG(\"LastScreenTransition exceeded %ums transition to next frame\", (millis() - lastScreenTransition));\n            handleOnPress();\n        }\n    }\n\n    // LOG_DEBUG(\"want fps %d, fixed=%d\", targetFramerate,\n    // ui->getUiState()->frameState); If we are scrolling we need to be called\n    // soon, otherwise just 1 fps (to save CPU) We also ask to be called twice\n    // as fast as we really need so that any rounding errors still result with\n    // the correct framerate\n    return (1000 / targetFramerate);\n}\n\n/* show a message that the SSL cert is being built\n * it is expected that this will be used during the boot phase */\nvoid Screen::setSSLFrames()\n{\n    if (address_found.address) {\n        // LOG_DEBUG(\"Show SSL frames\");\n        static FrameCallback sslFrames[] = {NotificationRenderer::drawSSLScreen};\n        ui->setFrames(sslFrames, 1);\n        ui->update();\n    }\n}\n\n#ifdef USE_EINK\n/// Determine which screensaver frame to use, then set the FrameCallback\nvoid Screen::setScreensaverFrames(FrameCallback einkScreensaver)\n{\n    // Retain specified frame / overlay callback beyond scope of this method\n    static FrameCallback screensaverFrame;\n    static OverlayCallback screensaverOverlay;\n\n#if defined(HAS_EINK_ASYNCFULL) && defined(USE_EINK_DYNAMICDISPLAY)\n    // Join (await) a currently running async refresh, then run the post-update code.\n    // Avoid skipping of screensaver frame. Would otherwise be handled by NotifiedWorkerThread.\n    EINK_JOIN_ASYNCREFRESH(dispdev);\n#endif\n\n    // If: one-off screensaver frame passed as argument. Handles doDeepSleep()\n    if (einkScreensaver != NULL) {\n        screensaverFrame = einkScreensaver;\n        ui->setFrames(&screensaverFrame, 1);\n    }\n\n    // Else, display the usual \"overlay\" screensaver\n    else {\n        screensaverOverlay = graphics::UIRenderer::drawScreensaverOverlay;\n        ui->setOverlays(&screensaverOverlay, 1);\n    }\n\n    // Request new frame, ASAP\n    setFastFramerate();\n    uint64_t startUpdate;\n    do {\n        startUpdate = millis(); // Handle impossibly unlikely corner case of a millis() overflow..\n        delay(1);\n        ui->update();\n    } while (ui->getUiState()->lastUpdate < startUpdate);\n\n    // Old EInkDisplay class\n#if !defined(USE_EINK_DYNAMICDISPLAY)\n    static_cast<EInkDisplay *>(dispdev)->forceDisplay(0); // Screen::forceDisplay(), but override rate-limit\n#endif\n\n    // Prepare now for next frame, shown when display wakes\n    ui->setOverlays(NULL, 0);  // Clear overlay\n    setFrames(FOCUS_PRESERVE); // Return to normal display updates, showing same frame as before screensaver, ideally\n\n    // Pick a refresh method, for when display wakes\n#ifdef EINK_HASQUIRK_GHOSTING\n    EINK_ADD_FRAMEFLAG(dispdev, COSMETIC); // Really ugly to see ghosting from \"screen paused\"\n#else\n    EINK_ADD_FRAMEFLAG(dispdev, RESPONSIVE); // Really nice to wake screen with a fast-refresh\n#endif\n}\n#endif\n\n// Regenerate the normal set of frames, focusing a specific frame if requested\n// Called when a frame should be added / removed, or custom frames should be cleared\nvoid Screen::setFrames(FrameFocus focus)\n{\n    // Block setFrames calls when virtual keyboard is active to prevent overlay interference\n    if (NotificationRenderer::current_notification_type == notificationTypeEnum::text_input) {\n        return;\n    }\n\n    uint8_t originalPosition = ui->getUiState()->currentFrame;\n    uint8_t previousFrameCount = framesetInfo.frameCount;\n    FramesetInfo fsi; // Location of specific frames, for applying focus parameter\n\n    graphics::UIRenderer::rebuildFavoritedNodes();\n\n    LOG_DEBUG(\"Show standard frames\");\n    showingNormalScreen = true;\n\n    indicatorIcons.clear();\n\n    size_t numframes = 0;\n\n    // If we have a critical fault, show it first\n    fsi.positions.fault = numframes;\n    if (error_code) {\n        normalFrames[numframes++] = NotificationRenderer::drawCriticalFaultFrame;\n        indicatorIcons.push_back(icon_error);\n        focus = FOCUS_FAULT; // Change our \"focus\" parameter, to ensure we show the fault frame\n    }\n\n#if defined(DISPLAY_CLOCK_FRAME)\n    if (!hiddenFrames.clock) {\n        fsi.positions.clock = numframes;\n#if defined(M5STACK_UNITC6L)\n        normalFrames[numframes++] = graphics::ClockRenderer::drawAnalogClockFrame;\n#else\n        normalFrames[numframes++] = uiconfig.is_clockface_analog ? graphics::ClockRenderer::drawAnalogClockFrame\n                                                                 : graphics::ClockRenderer::drawDigitalClockFrame;\n#endif\n        indicatorIcons.push_back(digital_icon_clock);\n    }\n#endif\n\n    if (!hiddenFrames.home) {\n        fsi.positions.home = numframes;\n        normalFrames[numframes++] = graphics::UIRenderer::drawDeviceFocused;\n        indicatorIcons.push_back(icon_home);\n    }\n\n    fsi.positions.textMessage = numframes;\n    normalFrames[numframes++] = graphics::MessageRenderer::drawTextMessageFrame;\n    indicatorIcons.push_back(icon_mail);\n\n#ifndef USE_EINK\n    if (!hiddenFrames.nodelist_nodes) {\n        fsi.positions.nodelist_nodes = numframes;\n        normalFrames[numframes++] = graphics::NodeListRenderer::drawDynamicListScreen_Nodes;\n        indicatorIcons.push_back(icon_nodes);\n    }\n    if (!hiddenFrames.nodelist_location) {\n        fsi.positions.nodelist_location = numframes;\n        normalFrames[numframes++] = graphics::NodeListRenderer::drawDynamicListScreen_Location;\n        indicatorIcons.push_back(icon_list);\n    }\n#endif\n\n// Show detailed node views only on E-Ink builds\n#ifdef USE_EINK\n    if (!hiddenFrames.nodelist_lastheard) {\n        fsi.positions.nodelist_lastheard = numframes;\n        normalFrames[numframes++] = graphics::NodeListRenderer::drawLastHeardScreen;\n        indicatorIcons.push_back(icon_nodes);\n    }\n    if (!hiddenFrames.nodelist_hopsignal) {\n        fsi.positions.nodelist_hopsignal = numframes;\n        normalFrames[numframes++] = graphics::NodeListRenderer::drawHopSignalScreen;\n        indicatorIcons.push_back(icon_signal);\n    }\n    if (!hiddenFrames.nodelist_distance) {\n        fsi.positions.nodelist_distance = numframes;\n        normalFrames[numframes++] = graphics::NodeListRenderer::drawDistanceScreen;\n        indicatorIcons.push_back(icon_distance);\n    }\n#endif\n#if HAS_GPS\n#ifdef USE_EINK\n    if (!hiddenFrames.nodelist_bearings) {\n        fsi.positions.nodelist_bearings = numframes;\n        normalFrames[numframes++] = graphics::NodeListRenderer::drawNodeListWithCompasses;\n        indicatorIcons.push_back(icon_list);\n    }\n#endif\n    if (!hiddenFrames.gps) {\n        fsi.positions.gps = numframes;\n        normalFrames[numframes++] = graphics::UIRenderer::drawCompassAndLocationScreen;\n        indicatorIcons.push_back(icon_compass);\n    }\n#endif\n    if (RadioLibInterface::instance && !hiddenFrames.lora) {\n        fsi.positions.lora = numframes;\n        normalFrames[numframes++] = graphics::DebugRenderer::drawLoRaFocused;\n        indicatorIcons.push_back(icon_radio);\n    }\n    if (!hiddenFrames.system) {\n        fsi.positions.system = numframes;\n        normalFrames[numframes++] = graphics::DebugRenderer::drawSystemScreen;\n        indicatorIcons.push_back(icon_system);\n    }\n#if !defined(DISPLAY_CLOCK_FRAME)\n    if (!hiddenFrames.clock) {\n        fsi.positions.clock = numframes;\n        normalFrames[numframes++] = uiconfig.is_clockface_analog ? graphics::ClockRenderer::drawAnalogClockFrame\n                                                                 : graphics::ClockRenderer::drawDigitalClockFrame;\n        indicatorIcons.push_back(digital_icon_clock);\n    }\n#endif\n    if (!hiddenFrames.chirpy) {\n        fsi.positions.chirpy = numframes;\n        normalFrames[numframes++] = graphics::DebugRenderer::drawChirpy;\n        indicatorIcons.push_back(chirpy_small);\n    }\n\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n    if (!hiddenFrames.wifi && isWifiAvailable()) {\n        fsi.positions.wifi = numframes;\n        normalFrames[numframes++] = graphics::DebugRenderer::drawDebugInfoWiFiTrampoline;\n        indicatorIcons.push_back(icon_wifi);\n    }\n#endif\n\n    // Beware of what changes you make in this code!\n    // We pass numframes into GetMeshModulesWithUIFrames() which is highly important!\n    // Inside of that callback, goes over to MeshModule.cpp and we run\n    // modulesWithUIFrames.resize(startIndex, nullptr), to insert nullptr\n    // entries until we're ready to start building the matching entries.\n    // We are doing our best to keep the normalFrames vector\n    // and the moduleFrames vector in lock step.\n    moduleFrames = MeshModule::GetMeshModulesWithUIFrames(numframes);\n    LOG_DEBUG(\"Show %d module frames\", moduleFrames.size());\n\n    for (auto i = moduleFrames.begin(); i != moduleFrames.end(); ++i) {\n        // Draw the module frame, using the hack described above\n        if (*i != nullptr) {\n            normalFrames[numframes] = drawModuleFrame;\n\n            // Check if the module being drawn has requested focus\n            // We will honor this request later, if setFrames was triggered by a UIFrameEvent\n            MeshModule *m = *i;\n            if (m && m->isRequestingFocus())\n                fsi.positions.focusedModule = numframes;\n            if (m && m == waypointModule)\n                fsi.positions.waypoint = numframes;\n\n            indicatorIcons.push_back(icon_module);\n            numframes++;\n        }\n    }\n\n    LOG_DEBUG(\"Added modules.  numframes: %d\", numframes);\n\n    // We don't show the node info of our node (if we have it yet - we should)\n    size_t numMeshNodes = nodeDB->getNumMeshNodes();\n    if (numMeshNodes > 0)\n        numMeshNodes--;\n\n    if (!hiddenFrames.show_favorites) {\n        // Temporary array to hold favorite node frames\n        std::vector<FrameCallback> favoriteFrames;\n\n        for (size_t i = 0; i < nodeDB->getNumMeshNodes(); i++) {\n            const meshtastic_NodeInfoLite *n = nodeDB->getMeshNodeByIndex(i);\n            if (n && n->num != nodeDB->getNodeNum() && n->is_favorite) {\n                favoriteFrames.push_back(graphics::UIRenderer::drawNodeInfo);\n            }\n        }\n\n        // Insert favorite frames *after* collecting them all\n        if (!favoriteFrames.empty()) {\n            fsi.positions.firstFavorite = numframes;\n            for (const auto &f : favoriteFrames) {\n                normalFrames[numframes++] = f;\n                indicatorIcons.push_back(icon_node);\n            }\n            fsi.positions.lastFavorite = numframes - 1;\n        } else {\n            fsi.positions.firstFavorite = 255;\n            fsi.positions.lastFavorite = 255;\n        }\n    }\n\n    fsi.frameCount = numframes;   // Total framecount is used to apply FOCUS_PRESERVE\n    this->frameCount = numframes; // Save frame count for use in custom overlay\n    LOG_DEBUG(\"Finished build frames. numframes: %d\", numframes);\n\n    ui->setFrames(normalFrames, numframes);\n    ui->disableAllIndicators();\n\n    // Add overlays: frame icons and alert banner)\n    static OverlayCallback overlays[] = {graphics::UIRenderer::drawNavigationBar, NotificationRenderer::drawBannercallback};\n    ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n\n    prevFrame = -1; // Force drawNodeInfo to pick a new node (because our list just changed)\n\n    // Focus on a specific frame, in the frame set we just created\n    switch (focus) {\n    case FOCUS_DEFAULT:\n        ui->switchToFrame(fsi.positions.deviceFocused);\n        break;\n    case FOCUS_FAULT:\n        ui->switchToFrame(fsi.positions.fault);\n        break;\n    case FOCUS_MODULE:\n        // Whichever frame was marked by MeshModule::requestFocus(), if any\n        // If no module requested focus, will show the first frame instead\n        ui->switchToFrame(fsi.positions.focusedModule);\n        break;\n    case FOCUS_CLOCK:\n        // Whichever frame was marked by MeshModule::requestFocus(), if any\n        // If no module requested focus, will show the first frame instead\n        ui->switchToFrame(fsi.positions.clock);\n        break;\n    case FOCUS_SYSTEM:\n        ui->switchToFrame(fsi.positions.system);\n        break;\n\n    case FOCUS_PRESERVE:\n        //  No more adjustment — force stay on same index\n        if (previousFrameCount > fsi.frameCount) {\n            ui->switchToFrame(originalPosition - 1);\n        } else if (previousFrameCount < fsi.frameCount) {\n            ui->switchToFrame(originalPosition + 1);\n        } else {\n            ui->switchToFrame(originalPosition);\n        }\n        break;\n    }\n\n    // Store the info about this frameset, for future setFrames calls\n    this->framesetInfo = fsi;\n\n    setFastFramerate(); // Draw ASAP\n}\n\nvoid Screen::setFrameImmediateDraw(FrameCallback *drawFrames)\n{\n    ui->disableAllIndicators();\n    ui->setFrames(drawFrames, 1);\n    setFastFramerate();\n}\n\nvoid Screen::toggleFrameVisibility(const std::string &frameName)\n{\n#ifndef USE_EINK\n    if (frameName == \"nodelist_nodes\") {\n        hiddenFrames.nodelist_nodes = !hiddenFrames.nodelist_nodes;\n    }\n    if (frameName == \"nodelist_location\") {\n        hiddenFrames.nodelist_location = !hiddenFrames.nodelist_location;\n    }\n#endif\n#ifdef USE_EINK\n    if (frameName == \"nodelist_lastheard\") {\n        hiddenFrames.nodelist_lastheard = !hiddenFrames.nodelist_lastheard;\n    }\n    if (frameName == \"nodelist_hopsignal\") {\n        hiddenFrames.nodelist_hopsignal = !hiddenFrames.nodelist_hopsignal;\n    }\n    if (frameName == \"nodelist_distance\") {\n        hiddenFrames.nodelist_distance = !hiddenFrames.nodelist_distance;\n    }\n#endif\n#if HAS_GPS\n#ifdef USE_EINK\n    if (frameName == \"nodelist_bearings\") {\n        hiddenFrames.nodelist_bearings = !hiddenFrames.nodelist_bearings;\n    }\n#endif\n    if (frameName == \"gps\") {\n        hiddenFrames.gps = !hiddenFrames.gps;\n    }\n#endif\n    if (frameName == \"lora\") {\n        hiddenFrames.lora = !hiddenFrames.lora;\n    }\n    if (frameName == \"clock\") {\n        hiddenFrames.clock = !hiddenFrames.clock;\n    }\n    if (frameName == \"show_favorites\") {\n        hiddenFrames.show_favorites = !hiddenFrames.show_favorites;\n    }\n    if (frameName == \"chirpy\") {\n        hiddenFrames.chirpy = !hiddenFrames.chirpy;\n    }\n}\n\nbool Screen::isFrameHidden(const std::string &frameName) const\n{\n#ifndef USE_EINK\n    if (frameName == \"nodelist_nodes\")\n        return hiddenFrames.nodelist_nodes;\n    if (frameName == \"nodelist_location\")\n        return hiddenFrames.nodelist_location;\n#endif\n#ifdef USE_EINK\n    if (frameName == \"nodelist_lastheard\")\n        return hiddenFrames.nodelist_lastheard;\n    if (frameName == \"nodelist_hopsignal\")\n        return hiddenFrames.nodelist_hopsignal;\n    if (frameName == \"nodelist_distance\")\n        return hiddenFrames.nodelist_distance;\n#endif\n#if HAS_GPS\n#ifdef USE_EINK\n    if (frameName == \"nodelist_bearings\")\n        return hiddenFrames.nodelist_bearings;\n#endif\n    if (frameName == \"gps\")\n        return hiddenFrames.gps;\n#endif\n    if (frameName == \"lora\")\n        return hiddenFrames.lora;\n    if (frameName == \"clock\")\n        return hiddenFrames.clock;\n    if (frameName == \"show_favorites\")\n        return hiddenFrames.show_favorites;\n    if (frameName == \"chirpy\")\n        return hiddenFrames.chirpy;\n\n    return false;\n}\n\nvoid Screen::handleStartFirmwareUpdateScreen()\n{\n    LOG_DEBUG(\"Show firmware screen\");\n    showingNormalScreen = false;\n    EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // E-Ink: Explicitly use fast-refresh for next frame\n\n    static FrameCallback frames[] = {graphics::NotificationRenderer::drawFrameFirmware};\n    setFrameImmediateDraw(frames);\n}\n\nvoid Screen::blink()\n{\n    setFastFramerate();\n    uint8_t count = 10;\n    dispdev->setBrightness(254);\n    while (count > 0) {\n        dispdev->fillRect(0, 0, dispdev->getWidth(), dispdev->getHeight());\n        dispdev->display();\n        delay(50);\n        dispdev->clear();\n        dispdev->display();\n        delay(50);\n        count = count - 1;\n    }\n    // The dispdev->setBrightness does not work for t-deck display, it seems to run the setBrightness function in\n    // OLEDDisplay.\n    dispdev->setBrightness(brightness);\n}\n\nvoid Screen::increaseBrightness()\n{\n    brightness = ((brightness + 62) > 254) ? brightness : (brightness + 62);\n\n#if defined(ST7789_CS)\n    // run the setDisplayBrightness function. This works on t-decks\n    static_cast<TFTDisplay *>(dispdev)->setDisplayBrightness(brightness);\n#endif\n\n    /* TO DO: add little popup in center of screen saying what brightness level it is set to*/\n}\n\nvoid Screen::decreaseBrightness()\n{\n    brightness = (brightness < 70) ? brightness : (brightness - 62);\n\n#if defined(ST7789_CS)\n    static_cast<TFTDisplay *>(dispdev)->setDisplayBrightness(brightness);\n#endif\n\n    /* TO DO: add little popup in center of screen saying what brightness level it is set to*/\n}\n\nvoid Screen::handleOnPress()\n{\n    // If screen was off, just wake it, otherwise advance to next frame\n    // If we are in a transition, the press must have bounced, drop it.\n    if (ui->getUiState()->frameState == FIXED) {\n        ui->nextFrame();\n        lastScreenTransition = millis();\n        setFastFramerate();\n    }\n}\n\nvoid Screen::showFrame(FrameDirection direction)\n{\n    // Only advance frames when UI is stable\n    if (ui->getUiState()->frameState == FIXED) {\n\n        if (direction == FrameDirection::NEXT) {\n            ui->nextFrame();\n        } else {\n            ui->previousFrame();\n        }\n\n        lastScreenTransition = millis();\n        setFastFramerate();\n    }\n}\n\n#ifndef SCREEN_TRANSITION_FRAMERATE\n#define SCREEN_TRANSITION_FRAMERATE 30 // fps\n#endif\n\nvoid Screen::setFastFramerate()\n{\n#if defined(M5STACK_UNITC6L)\n    dispdev->clear();\n    dispdev->display();\n#endif\n    // We are about to start a transition so speed up fps\n    targetFramerate = SCREEN_TRANSITION_FRAMERATE;\n\n    ui->setTargetFPS(targetFramerate);\n    setInterval(0); // redraw ASAP\n    runASAP = true;\n}\n\nint Screen::handleStatusUpdate(const meshtastic::Status *arg)\n{\n    switch (arg->getStatusType()) {\n    case STATUS_TYPE_NODE:\n        if (showingNormalScreen && nodeStatus->getLastNumTotal() != nodeStatus->getNumTotal()) {\n            setFrames(FOCUS_PRESERVE); // Regen the list of screen frames (returning to same frame, if possible)\n        }\n        nodeDB->updateGUI = false;\n        break;\n    case STATUS_TYPE_POWER: {\n        bool currentUSB = powerStatus->getHasUSB();\n        if (currentUSB != lastPowerUSBState) {\n            lastPowerUSBState = currentUSB;\n            forceDisplay(true);\n        }\n        break;\n    }\n    }\n\n    return 0;\n}\n\n// Handles when message is received; will jump to text message frame.\nint Screen::handleTextMessage(const meshtastic_MeshPacket *packet)\n{\n    if (showingNormalScreen) {\n        if (packet->from == 0) {\n            // Outgoing message (likely sent from phone)\n            devicestate.has_rx_text_message = false;\n            memset(&devicestate.rx_text_message, 0, sizeof(devicestate.rx_text_message));\n            hiddenFrames.textMessage = true;\n            hasUnreadMessage = false; // Clear unread state when user replies\n\n            setFrames(FOCUS_PRESERVE); // Stay on same frame, silently update frame list\n        } else {\n            // Incoming message\n            devicestate.has_rx_text_message = true; // Needed to include the message frame\n            hasUnreadMessage = true;                // Enables mail icon in the header\n            setFrames(FOCUS_PRESERVE);              // Refresh frame list without switching view (no-op during text_input)\n\n            // Only wake/force display if the configuration allows it\n            if (shouldWakeOnReceivedMessage()) {\n                setOn(true);    // Wake up the screen first\n                forceDisplay(); // Forces screen redraw\n            }\n            // === Prepare banner/popup content ===\n            const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet->from);\n            const meshtastic_Channel channel =\n                channels.getByIndex(packet->channel ? packet->channel : channels.getPrimaryIndex());\n            const char *longName = (node && node->has_user) ? node->user.long_name : nullptr;\n\n            const char *msgRaw = reinterpret_cast<const char *>(packet->decoded.payload.bytes);\n\n            char banner[256];\n\n            bool isAlert = false;\n\n            if (moduleConfig.external_notification.alert_bell || moduleConfig.external_notification.alert_bell_vibra ||\n                moduleConfig.external_notification.alert_bell_buzzer)\n                // Check for bell character to determine if this message is an alert\n                for (size_t i = 0; i < packet->decoded.payload.size && i < 100; i++) {\n                    if (msgRaw[i] == ASCII_BELL) {\n                        isAlert = true;\n                        break;\n                    }\n                }\n\n            // Unlike generic messages, alerts (when enabled via the ext notif module) ignore any\n            // 'mute' preferences set to any specific node or channel.\n            // If on-screen keyboard is active, show a transient popup over keyboard instead of interrupting it\n            if (NotificationRenderer::current_notification_type == notificationTypeEnum::text_input) {\n                // Wake and force redraw so popup is visible immediately\n                if (shouldWakeOnReceivedMessage()) {\n                    setOn(true);\n                    forceDisplay();\n                }\n\n                // Build popup: title = message source name, content = message text (sanitized)\n                // Title\n                char titleBuf[64] = {0};\n                if (longName && longName[0]) {\n                    // Sanitize sender name\n                    std::string t = sanitizeString(longName);\n                    strncpy(titleBuf, t.c_str(), sizeof(titleBuf) - 1);\n                } else {\n                    strncpy(titleBuf, \"Message\", sizeof(titleBuf) - 1);\n                }\n\n                // Content: payload bytes may not be null-terminated, remove ASCII_BELL and sanitize\n                char content[256] = {0};\n                {\n                    std::string raw;\n                    raw.reserve(packet->decoded.payload.size);\n                    for (size_t i = 0; i < packet->decoded.payload.size; ++i) {\n                        char c = msgRaw[i];\n                        if (c == ASCII_BELL)\n                            continue; // strip bell\n                        raw.push_back(c);\n                    }\n                    std::string sanitized = sanitizeString(raw);\n                    strncpy(content, sanitized.c_str(), sizeof(content) - 1);\n                }\n\n                NotificationRenderer::showKeyboardMessagePopupWithTitle(titleBuf, content, 3000);\n\n// Maintain existing buzzer behavior on M5 if applicable\n#if defined(M5STACK_UNITC6L)\n                if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY ||\n                    (isAlert && moduleConfig.external_notification.alert_bell_buzzer) ||\n                    (!isBroadcast(packet->to) && isToUs(packet))) {\n                    playLongBeep();\n                }\n#endif\n            } else {\n                // No keyboard active: use regular banner flow, respecting mute settings\n                if (isAlert) {\n                    if (longName && longName[0]) {\n                        snprintf(banner, sizeof(banner), \"Alert Received from\\n%s\", longName);\n                    } else {\n                        strcpy(banner, \"Alert Received\");\n                    }\n                    screen->showSimpleBanner(banner, 3000);\n                } else if (!channel.settings.has_module_settings || !channel.settings.module_settings.is_muted) {\n                    if (longName && longName[0]) {\n                        if (currentResolution == ScreenResolution::UltraLow) {\n                            strcpy(banner, \"New Message\");\n                        } else {\n                            snprintf(banner, sizeof(banner), \"New Message from\\n%s\", longName);\n                        }\n                    } else {\n                        strcpy(banner, \"New Message\");\n                    }\n#if defined(M5STACK_UNITC6L)\n                    screen->setOn(true);\n                    screen->showSimpleBanner(banner, 1500);\n                    if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY ||\n                        (isAlert && moduleConfig.external_notification.alert_bell_buzzer) ||\n                        (!isBroadcast(packet->to) && isToUs(packet))) {\n                        // Beep if not in DIRECT_MSG_ONLY mode or if in DIRECT_MSG_ONLY mode and either\n                        // - packet contains an alert and alert bell buzzer is enabled\n                        // - packet is a non-broadcast that is addressed to this node\n                        playLongBeep();\n                    }\n#else\n                    screen->showSimpleBanner(banner, 3000);\n#endif\n                }\n            }\n        }\n    }\n\n    return 0;\n}\n\n// Triggered by MeshModules\nint Screen::handleUIFrameEvent(const UIFrameEvent *event)\n{\n    // Block UI frame events when virtual keyboard is active\n    if (NotificationRenderer::current_notification_type == notificationTypeEnum::text_input) {\n        return 0;\n    }\n\n    if (showingNormalScreen) {\n        // Regenerate the frameset, potentially honoring a module's internal requestFocus() call\n        if (event->action == UIFrameEvent::Action::REGENERATE_FRAMESET) {\n            setFrames(FOCUS_MODULE);\n        }\n\n        // Regenerate the frameset, while attempting to maintain focus on the current frame\n        else if (event->action == UIFrameEvent::Action::REGENERATE_FRAMESET_BACKGROUND) {\n            setFrames(FOCUS_PRESERVE);\n        }\n\n        // Don't regenerate the frameset, just re-draw whatever is on screen ASAP\n        else if (event->action == UIFrameEvent::Action::REDRAW_ONLY) {\n            setFastFramerate();\n        }\n\n        // Jump directly to the Text Message screen\n        else if (event->action == UIFrameEvent::Action::SWITCH_TO_TEXTMESSAGE) {\n            setFrames(FOCUS_PRESERVE); // preserve current frame ordering\n            ui->switchToFrame(framesetInfo.positions.textMessage);\n            setFastFramerate(); // force redraw ASAP\n        }\n    }\n\n    return 0;\n}\n\nint Screen::handleInputEvent(const InputEvent *event)\n{\n    LOG_INPUT(\"Screen Input event %u! kb %u\", event->inputEvent, event->kbchar);\n    if (!screenOn)\n        return 0;\n\n    // Handle text input notifications specially - pass input to virtual keyboard\n    if (NotificationRenderer::current_notification_type == notificationTypeEnum::text_input) {\n        NotificationRenderer::inEvent = *event;\n        static OverlayCallback overlays[] = {graphics::UIRenderer::drawNavigationBar, NotificationRenderer::drawBannercallback};\n        ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n        setFastFramerate(); // Draw ASAP\n        ui->update();\n        return 0;\n    }\n\n#ifdef USE_EINK // the screen is the last input handler, so if an event makes it here, we can assume it will prompt a screen draw.\n    EINK_ADD_FRAMEFLAG(dispdev, DEMAND_FAST); // Use fast-refresh for next frame, no skip please\n    EINK_ADD_FRAMEFLAG(dispdev, BLOCKING);    // Edge case: if this frame is promoted to COSMETIC, wait for update\n    handleSetOn(true);                        // Ensure power-on to receive deep-sleep screensaver (PowerFSM should handle?)\n    setFastFramerate();                       // Draw ASAP\n#endif\n    if (NotificationRenderer::isOverlayBannerShowing()) {\n        NotificationRenderer::inEvent = *event;\n        static OverlayCallback overlays[] = {graphics::UIRenderer::drawNavigationBar, NotificationRenderer::drawBannercallback};\n        ui->setOverlays(overlays, sizeof(overlays) / sizeof(overlays[0]));\n        setFastFramerate(); // Draw ASAP\n        ui->update();\n\n        menuHandler::handleMenuSwitch(dispdev);\n        return 0;\n    }\n    // UP/DOWN in message screen scrolls through message threads\n    if (ui->getUiState()->currentFrame == framesetInfo.positions.textMessage) {\n\n        if (event->inputEvent == INPUT_BROKER_UP) {\n            if (messageStore.getMessages().empty()) {\n                cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);\n            } else {\n                graphics::MessageRenderer::scrollUp();\n                setFastFramerate(); // match existing behavior\n                return 0;\n            }\n        }\n\n        if (event->inputEvent == INPUT_BROKER_DOWN) {\n            if (messageStore.getMessages().empty()) {\n                cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);\n            } else {\n                graphics::MessageRenderer::scrollDown();\n                setFastFramerate();\n                return 0;\n            }\n        }\n    }\n    // UP/DOWN in node list screens scrolls through node pages\n    if (ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_nodes ||\n        ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_location ||\n        ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_lastheard ||\n        ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_hopsignal ||\n        ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_distance ||\n        ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_bearings) {\n        if (event->inputEvent == INPUT_BROKER_UP) {\n            graphics::NodeListRenderer::scrollUp();\n            setFastFramerate();\n            return 0;\n        }\n\n        if (event->inputEvent == INPUT_BROKER_DOWN) {\n            graphics::NodeListRenderer::scrollDown();\n            setFastFramerate();\n            return 0;\n        }\n    }\n    // Use left or right input from a keyboard to move between frames,\n    // so long as a mesh module isn't using these events for some other purpose\n    if (showingNormalScreen) {\n\n        // Ask any MeshModules if they're handling keyboard input right now\n        bool inputIntercepted = false;\n        for (MeshModule *module : moduleFrames) {\n            if (module && module->interceptingKeyboardInput())\n                inputIntercepted = true;\n        }\n\n        // If no modules are using the input, move between frames\n        if (!inputIntercepted) {\n#if defined(INPUTDRIVER_ENCODER_TYPE) && INPUTDRIVER_ENCODER_TYPE == 2\n            bool handledEncoderScroll = false;\n            const bool isTextMessageFrame = (framesetInfo.positions.textMessage != 255 &&\n                                             this->ui->getUiState()->currentFrame == framesetInfo.positions.textMessage &&\n                                             !messageStore.getMessages().empty());\n            if (isTextMessageFrame) {\n                if (event->inputEvent == INPUT_BROKER_UP_LONG) {\n                    graphics::MessageRenderer::nudgeScroll(-1);\n                    handledEncoderScroll = true;\n                } else if (event->inputEvent == INPUT_BROKER_DOWN_LONG) {\n                    graphics::MessageRenderer::nudgeScroll(1);\n                    handledEncoderScroll = true;\n                }\n            }\n\n            if (handledEncoderScroll) {\n                setFastFramerate();\n                return 0;\n            }\n#endif\n            if (event->inputEvent == INPUT_BROKER_LEFT || event->inputEvent == INPUT_BROKER_ALT_PRESS) {\n                showFrame(FrameDirection::PREVIOUS);\n            } else if (event->inputEvent == INPUT_BROKER_RIGHT || event->inputEvent == INPUT_BROKER_USER_PRESS) {\n                showFrame(FrameDirection::NEXT);\n            } else if (event->inputEvent == INPUT_BROKER_FN_F1) {\n                this->ui->switchToFrame(0);\n                lastScreenTransition = millis();\n                setFastFramerate();\n            } else if (event->inputEvent == INPUT_BROKER_FN_F2) {\n                this->ui->switchToFrame(1);\n                lastScreenTransition = millis();\n                setFastFramerate();\n            } else if (event->inputEvent == INPUT_BROKER_FN_F3) {\n                this->ui->switchToFrame(2);\n                lastScreenTransition = millis();\n                setFastFramerate();\n            } else if (event->inputEvent == INPUT_BROKER_FN_F4) {\n                this->ui->switchToFrame(3);\n                lastScreenTransition = millis();\n                setFastFramerate();\n            } else if (event->inputEvent == INPUT_BROKER_FN_F5) {\n                this->ui->switchToFrame(4);\n                lastScreenTransition = millis();\n                setFastFramerate();\n            } else if (event->inputEvent == INPUT_BROKER_UP_LONG) {\n                // Long press up button for fast frame switching\n                showPrevFrame();\n            } else if (event->inputEvent == INPUT_BROKER_DOWN_LONG) {\n                // Long press down button for fast frame switching\n                showNextFrame();\n            } else if ((event->inputEvent == INPUT_BROKER_UP || event->inputEvent == INPUT_BROKER_DOWN) &&\n                       this->ui->getUiState()->currentFrame == framesetInfo.positions.home) {\n                cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);\n            } else if (event->inputEvent == INPUT_BROKER_SELECT) {\n                if (this->ui->getUiState()->currentFrame == framesetInfo.positions.home) {\n                    menuHandler::homeBaseMenu();\n                } else if (this->ui->getUiState()->currentFrame == framesetInfo.positions.system) {\n                    menuHandler::systemBaseMenu();\n#if HAS_GPS\n                } else if (this->ui->getUiState()->currentFrame == framesetInfo.positions.gps && gps) {\n                    menuHandler::positionBaseMenu();\n#endif\n                } else if (this->ui->getUiState()->currentFrame == framesetInfo.positions.clock) {\n                    menuHandler::clockMenu();\n                } else if (this->ui->getUiState()->currentFrame == framesetInfo.positions.lora) {\n                    menuHandler::loraMenu();\n                } else if (this->ui->getUiState()->currentFrame == framesetInfo.positions.textMessage) {\n                    if (!messageStore.getMessages().empty()) {\n                        menuHandler::messageResponseMenu();\n                    } else {\n                        if (currentResolution == ScreenResolution::UltraLow) {\n                            menuHandler::textMessageMenu();\n                        } else {\n                            menuHandler::textMessageBaseMenu();\n                        }\n                    }\n                } else if (framesetInfo.positions.firstFavorite != 255 &&\n                           this->ui->getUiState()->currentFrame >= framesetInfo.positions.firstFavorite &&\n                           this->ui->getUiState()->currentFrame <= framesetInfo.positions.lastFavorite) {\n                    menuHandler::favoriteBaseMenu();\n                } else if (this->ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_nodes ||\n                           this->ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_location ||\n                           this->ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_lastheard ||\n                           this->ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_hopsignal ||\n                           this->ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_distance ||\n                           this->ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_hopsignal ||\n                           this->ui->getUiState()->currentFrame == framesetInfo.positions.nodelist_bearings) {\n                    menuHandler::nodeListMenu();\n                } else if (this->ui->getUiState()->currentFrame == framesetInfo.positions.wifi) {\n                    menuHandler::wifiBaseMenu();\n                }\n            } else if (event->inputEvent == INPUT_BROKER_BACK) {\n                showFrame(FrameDirection::PREVIOUS);\n            } else if (event->inputEvent == INPUT_BROKER_CANCEL) {\n                setOn(false);\n            }\n        }\n    }\n\n    return 0;\n}\n\nint Screen::handleAdminMessage(AdminModule_ObserverData *arg)\n{\n    switch (arg->request->which_payload_variant) {\n    // Node removed manually (i.e. via app)\n    case meshtastic_AdminMessage_remove_by_nodenum_tag:\n        setFrames(FOCUS_PRESERVE);\n        *arg->result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    // Default no-op, in case the admin message observable gets used by other classes in future\n    default:\n        break;\n    }\n    return 0;\n}\n\nbool Screen::isOverlayBannerShowing()\n{\n    return NotificationRenderer::isOverlayBannerShowing();\n}\n\n} // namespace graphics\n\n#else\ngraphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {}\n#endif // HAS_SCREEN\n\nbool shouldWakeOnReceivedMessage()\n{\n    /*\n    The goal here is to determine when we do NOT wake up the screen on message received:\n    - Any ext. notifications are turned on\n    - If role is not CLIENT / CLIENT_MUTE / CLIENT_HIDDEN / CLIENT_BASE\n    - If the battery level is very low\n    */\n    if (moduleConfig.external_notification.enabled) {\n        return false;\n    }\n    if (!IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_CLIENT,\n                   meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE, meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN,\n                   meshtastic_Config_DeviceConfig_Role_CLIENT_BASE)) {\n        return false;\n    }\n    if (powerStatus && powerStatus->getBatteryChargePercent() < 10) {\n        return false;\n    }\n    return true;\n}\n"
  },
  {
    "path": "src/graphics/Screen.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#include \"detect/ScanI2C.h\"\n#include \"mesh/generated/meshtastic/config.pb.h\"\n#include <OLEDDisplay.h>\n#include <functional>\n#include <string>\n#include <vector>\n\n#define getStringCenteredX(s) ((SCREEN_WIDTH - display->getStringWidth(s)) / 2)\nnamespace graphics\n{\nenum notificationTypeEnum { none, text_banner, selection_picker, node_picker, number_picker, text_input };\n\nstruct BannerOverlayOptions {\n    const char *message;\n    uint32_t durationMs = 30000;\n    const char **optionsArrayPtr = nullptr;\n    const int *optionsEnumPtr = nullptr;\n    uint8_t optionsCount = 0;\n    std::function<void(int)> bannerCallback = nullptr;\n    int8_t InitialSelected = 0;\n    notificationTypeEnum notificationType = notificationTypeEnum::text_banner;\n};\n} // namespace graphics\n\nbool shouldWakeOnReceivedMessage();\n\n#if !HAS_SCREEN\n#include \"power.h\"\nnamespace graphics\n{\n// Noop class for boards without screen.\nclass Screen\n{\n  public:\n    enum FrameFocus : uint8_t {\n        FOCUS_DEFAULT,  // No specific frame\n        FOCUS_PRESERVE, // Return to the previous frame\n        FOCUS_FAULT,\n        FOCUS_MODULE, // Note: target module should call requestFocus(), otherwise no info about which module to focus\n        FOCUS_CLOCK,\n        FOCUS_SYSTEM,\n    };\n\n    explicit Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY);\n    void onPress() {}\n    void setup() {}\n    void setOn(bool) {}\n    void doDeepSleep() {}\n    void forceDisplay(bool forceUiUpdate = false) {}\n    void startFirmwareUpdateScreen() {}\n    void increaseBrightness() {}\n    void decreaseBrightness() {}\n    void startAlert(const char *) {}\n    void showSimpleBanner(const char *message, uint32_t durationMs = 0) {}\n    void showOverlayBanner(BannerOverlayOptions) {}\n    void setFrames(FrameFocus focus) {}\n    void endAlert() {}\n};\n} // namespace graphics\n#else\n#include <cstring>\n\n#include <OLEDDisplayUi.h>\n\n#include \"../configuration.h\"\n#include \"gps/GeoCoord.h\"\n#include \"graphics/ScreenFonts.h\"\n\n#ifdef USE_ST7567\n#include <ST7567Wire.h>\n#elif defined(USE_SH1106) || defined(USE_SH1107) || defined(USE_SH1107_128_64)\n#include <SH1106Wire.h>\n#elif defined(USE_SSD1306)\n#include <SSD1306Wire.h>\n#elif defined(USE_ST7789)\n#include <ST7789Spi.h>\n#elif defined(USE_SPISSD1306)\n#include <SSD1306Spi.h>\n#elif defined(USE_ST7796)\n#include <ST7796Spi.h>\n#else\n// the SH1106/SSD1306 variant is auto-detected\n#include <AutoOLEDWire.h>\n#endif\n\n#include \"EInkDisplay2.h\"\n#include \"EInkDynamicDisplay.h\"\n#include \"PointStruct.h\"\n#include \"TFTDisplay.h\"\n#include \"TypedQueue.h\"\n#include \"commands.h\"\n#include \"concurrency/LockGuard.h\"\n#include \"concurrency/OSThread.h\"\n#include \"graphics/draw/MenuHandler.h\"\n#include \"input/InputBroker.h\"\n#include \"mesh/MeshModule.h\"\n#include \"modules/AdminModule.h\"\n#include \"power.h\"\n#include <string>\n#include <vector>\n\n// 0 to 255, though particular variants might define different defaults\n#ifndef BRIGHTNESS_DEFAULT\n#define BRIGHTNESS_DEFAULT 150\n#endif\n\n// Meters to feet conversion\n#ifndef METERS_TO_FEET\n#define METERS_TO_FEET 3.28\n#endif\n\n// Feet to miles conversion\n#ifndef MILES_TO_FEET\n#define MILES_TO_FEET 5280\n#endif\n\n// Intuitive colors. E-Ink display is inverted from OLED(?)\n#define EINK_BLACK OLEDDISPLAY_COLOR::WHITE\n#define EINK_WHITE OLEDDISPLAY_COLOR::BLACK\n\n// Base segment dimensions for T-Watch segmented display\n#define SEGMENT_WIDTH 16\n#define SEGMENT_HEIGHT 4\n\n/// Convert an integer GPS coords to a floating point\n#define DegD(i) (i * 1e-7)\nextern bool hasUnreadMessage;\nnamespace\n{\n/// A basic 2D point class for drawing\nclass Point\n{\n  public:\n    float x, y;\n\n    Point(float _x, float _y) : x(_x), y(_y) {}\n\n    /// Apply a rotation around zero (standard rotation matrix math)\n    void rotate(float radian)\n    {\n        float cos = cosf(radian), sin = sinf(radian);\n        float rx = x * cos + y * sin, ry = -x * sin + y * cos;\n\n        x = rx;\n        y = ry;\n    }\n\n    void translate(int16_t dx, int dy)\n    {\n        x += dx;\n        y += dy;\n    }\n\n    void scale(float f)\n    {\n        // We use -f here to counter the flip that happens\n        // on the y axis when drawing and rotating on screen\n        x *= f;\n        y *= -f;\n    }\n};\n\n} // namespace\n\nnamespace graphics\n{\n\nenum class FrameDirection { NEXT, PREVIOUS };\n\n// Forward declarations\nclass Screen;\n\n/// Handles gathering and displaying debug information.\nclass DebugInfo\n{\n  public:\n    DebugInfo(const DebugInfo &) = delete;\n    DebugInfo &operator=(const DebugInfo &) = delete;\n\n  private:\n    friend Screen;\n\n    DebugInfo() {}\n\n    /// Renders the debug screen.\n    void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    void drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    void drawFrameWiFi(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n    /// Protects all of internal state.\n    concurrency::Lock lock;\n};\n\n/**\n * @brief This class deals with showing things on the screen of the device.\n *\n * @details Other than setup(), this class is thread-safe as long as drawFrame is not called\n *          multiple times simultaneously. All state-changing calls are queued and executed\n *          when the main loop calls us.\n */\nclass Screen : public concurrency::OSThread\n{\n    CallbackObserver<Screen, const meshtastic::Status *> powerStatusObserver =\n        CallbackObserver<Screen, const meshtastic::Status *>(this, &Screen::handleStatusUpdate);\n    CallbackObserver<Screen, const meshtastic::Status *> gpsStatusObserver =\n        CallbackObserver<Screen, const meshtastic::Status *>(this, &Screen::handleStatusUpdate);\n    CallbackObserver<Screen, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<Screen, const meshtastic::Status *>(this, &Screen::handleStatusUpdate);\n    CallbackObserver<Screen, const UIFrameEvent *> uiFrameEventObserver =\n        CallbackObserver<Screen, const UIFrameEvent *>(this, &Screen::handleUIFrameEvent); // Sent by Mesh Modules\n    CallbackObserver<Screen, const InputEvent *> inputObserver =\n        CallbackObserver<Screen, const InputEvent *>(this, &Screen::handleInputEvent);\n    CallbackObserver<Screen, AdminModule_ObserverData *> adminMessageObserver =\n        CallbackObserver<Screen, AdminModule_ObserverData *>(this, &Screen::handleAdminMessage);\n\n  public:\n    OLEDDisplay *getDisplayDevice() { return dispdev; }\n    explicit Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY);\n\n    // Screen dimension accessors\n    inline int getHeight() const { return displayHeight; }\n    inline int getWidth() const { return displayWidth; }\n    size_t frameCount = 0; // Total number of active frames\n    ~Screen();\n\n    // Which frame we want to be displayed, after we regen the frameset by calling setFrames\n    enum FrameFocus : uint8_t {\n        FOCUS_DEFAULT,  // No specific frame\n        FOCUS_PRESERVE, // Return to the previous frame\n        FOCUS_FAULT,\n        FOCUS_MODULE, // Note: target module should call requestFocus(), otherwise no info about which module to focus\n        FOCUS_CLOCK,\n        FOCUS_SYSTEM,\n    };\n\n    // Regenerate the normal set of frames, focusing a specific frame if requested\n    // Call when a frame should be added / removed, or custom frames should be cleared\n    void setFrames(FrameFocus focus = FOCUS_DEFAULT);\n\n    std::vector<const uint8_t *> indicatorIcons; // Per-frame custom icon pointers\n    Screen(const Screen &) = delete;\n    Screen &operator=(const Screen &) = delete;\n\n    ScanI2C::DeviceAddress address_found;\n    meshtastic_Config_DisplayConfig_OledType model;\n    OLEDDISPLAY_GEOMETRY geometry;\n\n    bool isOverlayBannerShowing();\n\n    bool isScreenOn() { return screenOn; }\n\n    // Stores the last 4 of our hardware ID, to make finding the device for pairing easier\n    // FIXME: Needs refactoring and getMacAddr needs to be moved to a utility class\n    char ourId[5];\n\n    /// Initializes the UI, turns on the display, starts showing boot screen.\n    //\n    // Not thread safe - must be called before any other methods are called.\n    void setup();\n\n    /// Turns the screen on/off. Optionally, pass a custom screensaver frame for E-Ink\n    void setOn(bool on, FrameCallback einkScreensaver = NULL);\n    /**\n     * Prepare the display for the unit going to the lowest power mode possible.  Most screens will just\n     * poweroff, but eink screens will show a \"I'm sleeping\" graphic, possibly with a QR code\n     */\n    void doDeepSleep();\n\n    void blink();\n\n    // Draw north\n    float estimatedHeading(double lat, double lon);\n\n    /// Handle button press, trackball or swipe action)\n    void onPress() { enqueueCmd(ScreenCmd{.cmd = Cmd::ON_PRESS}); }\n    void showPrevFrame() { enqueueCmd(ScreenCmd{.cmd = Cmd::SHOW_PREV_FRAME}); }\n    void showNextFrame() { enqueueCmd(ScreenCmd{.cmd = Cmd::SHOW_NEXT_FRAME}); }\n    void showFrame(FrameDirection direction);\n\n    // generic alert start\n    void startAlert(FrameCallback _alertFrame)\n    {\n        alertFrame = _alertFrame;\n        ScreenCmd cmd;\n        cmd.cmd = Cmd::START_ALERT_FRAME;\n        enqueueCmd(cmd);\n    }\n\n    void startAlert(const char *_alertMessage)\n    {\n        startAlert([_alertMessage](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void {\n            uint16_t x_offset = display->width() / 2;\n            display->setTextAlignment(TEXT_ALIGN_CENTER);\n            display->setFont(FONT_MEDIUM);\n            display->drawString(x_offset + x, 26 + y, _alertMessage);\n        });\n    }\n\n    void endAlert()\n    {\n        ScreenCmd cmd;\n        cmd.cmd = Cmd::STOP_ALERT_FRAME;\n        enqueueCmd(cmd);\n    }\n\n    void showSimpleBanner(const char *message, uint32_t durationMs = 0);\n    void showOverlayBanner(BannerOverlayOptions);\n\n    void showNodePicker(const char *message, uint32_t durationMs, std::function<void(uint32_t)> bannerCallback);\n    void showNumberPicker(const char *message, uint32_t durationMs, uint8_t digits, std::function<void(uint32_t)> bannerCallback);\n    void showTextInput(const char *header, const char *initialText, uint32_t durationMs,\n                       std::function<void(const std::string &)> textCallback);\n\n    void requestMenu(graphics::menuHandler::screenMenus menuToShow)\n    {\n        graphics::menuHandler::menuQueue = menuToShow;\n        runNow();\n    }\n\n    void startFirmwareUpdateScreen()\n    {\n        ScreenCmd cmd;\n        cmd.cmd = Cmd::START_FIRMWARE_UPDATE_SCREEN;\n        enqueueCmd(cmd);\n    }\n\n    // Function to allow the AccelerometerThread to set the heading if a sensor provides it\n    // Mutex needed?\n    void setHeading(long _heading)\n    {\n        hasCompass = true;\n        compassHeading = fmod(_heading, 360);\n    }\n\n    bool hasHeading() { return hasCompass; }\n\n    long getHeading() { return compassHeading; }\n\n    void setEndCalibration(uint32_t _endCalibrationAt) { endCalibrationAt = _endCalibrationAt; }\n    uint32_t getEndCalibration() { return endCalibrationAt; }\n\n    // functions for display brightness\n    void increaseBrightness();\n    void decreaseBrightness();\n\n    /// Stops showing the boot screen.\n    void stopBootScreen() { enqueueCmd(ScreenCmd{.cmd = Cmd::STOP_BOOT_SCREEN}); }\n\n    void runNow()\n    {\n        setFastFramerate();\n        enqueueCmd(ScreenCmd{.cmd = Cmd::NOOP});\n    }\n\n    /// Overrides the default utf8 character conversion, to replace empty space with question marks\n    static char customFontTableLookup(const uint8_t ch)\n    {\n        // UTF-8 to font table index converter\n        // Code from http://playground.arduino.cc/Main/Utf8ascii\n        static uint8_t LASTCHAR;\n        static bool SKIPREST; // Only display a single unconvertable-character symbol per sequence of unconvertable characters\n\n        if (ch < 128) { // Standard ASCII-set 0..0x7F handling\n            LASTCHAR = 0;\n            SKIPREST = false;\n            return ch;\n        }\n\n        uint8_t last = LASTCHAR; // get last char\n        LASTCHAR = ch;\n\n        switch (last) {\n        case 0xC2: {\n            SKIPREST = false;\n            return (uint8_t)ch;\n        }\n\n        case 0xC3: {\n            SKIPREST = false;\n            return (uint8_t)(ch | 0xC0);\n        }\n        }\n\n        // We want to strip out prefix chars for two-byte char formats\n        if (ch == 0xC2 || ch == 0xC3)\n            return (uint8_t)0;\n\n#if defined(OLED_PL)\n\n        switch (last) {\n        case 0xC3: {\n\n            if (ch == 147)\n                return (uint8_t)(ch); // Ó\n            else if (ch == 179)\n                return (uint8_t)(148); // ó\n            else\n                return (uint8_t)(ch | 0xC0);\n            break;\n        }\n\n        case 0xC4: {\n            SKIPREST = false;\n            return (uint8_t)(ch);\n        }\n\n        case 0xC5: {\n            SKIPREST = false;\n            if (ch == 132)\n                return (uint8_t)(136); // ń\n            else if (ch == 186)\n                return (uint8_t)(137); // ź\n            else\n                return (uint8_t)(ch);\n            break;\n        }\n        }\n\n        // We want to strip out prefix chars for two-byte char formats\n        if (ch == 0xC2 || ch == 0xC3 || ch == 0xC4 || ch == 0xC5)\n            return (uint8_t)0;\n\n#endif\n\n#if defined(OLED_UA) || defined(OLED_RU)\n\n        switch (last) {\n        case 0xC3: {\n            SKIPREST = false;\n            return (uint8_t)(ch | 0xC0);\n        }\n        // map UTF-8 cyrillic chars to it Windows-1251 (CP-1251) ASCII codes\n        // note: in this case we must use compatible font - provided ArialMT_Plain_10/16/24 by 'ThingPulse/esp8266-oled-ssd1306'\n        // library have empty chars for non-latin ASCII symbols\n        case 0xD0: {\n            SKIPREST = false;\n            if (ch == 132)\n                return (uint8_t)(170); // Є\n            if (ch == 134)\n                return (uint8_t)(178); // І\n            if (ch == 135)\n                return (uint8_t)(175); // Ї\n            if (ch == 129)\n                return (uint8_t)(168); // Ё\n            if (ch > 143 && ch < 192)\n                return (uint8_t)(ch + 48);\n            break;\n        }\n        case 0xD1: {\n            SKIPREST = false;\n            if (ch == 148)\n                return (uint8_t)(186); // є\n            if (ch == 150)\n                return (uint8_t)(179); // і\n            if (ch == 151)\n                return (uint8_t)(191); // ї\n            if (ch == 145)\n                return (uint8_t)(184); // ё\n            if (ch > 127 && ch < 144)\n                return (uint8_t)(ch + 112);\n            break;\n        }\n        case 0xD2: {\n            SKIPREST = false;\n            if (ch == 144)\n                return (uint8_t)(165); // Ґ\n            if (ch == 145)\n                return (uint8_t)(180); // ґ\n            break;\n        }\n        }\n\n        // We want to strip out prefix chars for two-byte char formats\n        if (ch == 0xC2 || ch == 0xC3 || ch == 0x82 || ch == 0xD0 || ch == 0xD1)\n            return (uint8_t)0;\n\n#endif\n\n#if defined(OLED_CS)\n\n        switch (last) {\n        case 0xC2: {\n            SKIPREST = false;\n            return (uint8_t)ch;\n        }\n\n        case 0xC3: {\n            SKIPREST = false;\n            return (uint8_t)(ch | 0xC0);\n        }\n\n        case 0xC4: {\n            SKIPREST = false;\n            if (ch == 140)\n                return (uint8_t)(129); // Č\n            if (ch == 141)\n                return (uint8_t)(138); // č\n            if (ch == 142)\n                return (uint8_t)(130); // Ď\n            if (ch == 143)\n                return (uint8_t)(139); // ď\n            if (ch == 154)\n                return (uint8_t)(131); // Ě\n            if (ch == 155)\n                return (uint8_t)(140); // ě\n            // Slovak specific glyphs\n            if (ch == 185)\n                return (uint8_t)(147); // Ĺ\n            if (ch == 186)\n                return (uint8_t)(148); // ĺ\n            if (ch == 189)\n                return (uint8_t)(149); // Ľ\n            if (ch == 190)\n                return (uint8_t)(150); // ľ\n            break;\n        }\n\n        case 0xC5: {\n            SKIPREST = false;\n            if (ch == 135)\n                return (uint8_t)(132); // Ň\n            if (ch == 136)\n                return (uint8_t)(141); // ň\n            if (ch == 152)\n                return (uint8_t)(133); // Ř\n            if (ch == 153)\n                return (uint8_t)(142); // ř\n            if (ch == 160)\n                return (uint8_t)(134); // Š\n            if (ch == 161)\n                return (uint8_t)(143); // š\n            if (ch == 164)\n                return (uint8_t)(135); // Ť\n            if (ch == 165)\n                return (uint8_t)(144); // ť\n            if (ch == 174)\n                return (uint8_t)(136); // Ů\n            if (ch == 175)\n                return (uint8_t)(145); // ů\n            if (ch == 189)\n                return (uint8_t)(137); // Ž\n            if (ch == 190)\n                return (uint8_t)(146); // ž\n            // Slovak specific glyphs\n            if (ch == 148)\n                return (uint8_t)(151); // Ŕ\n            if (ch == 149)\n                return (uint8_t)(152); // ŕ\n            break;\n        }\n        }\n\n        // We want to strip out prefix chars for two-byte char formats\n        if (ch == 0xC2 || ch == 0xC3 || ch == 0xC4 || ch == 0xC5)\n            return (uint8_t)0;\n\n#endif\n\n#if defined(OLED_GR)\n\n        switch (last) {\n        case 0xC3: {\n            SKIPREST = false;\n            return (uint8_t)(ch | 0xC0);\n        }\n        // Map UTF-8 Greek chars to Windows-1253 (CP-1253) ASCII codes\n        case 0xCE: {\n            SKIPREST = false;\n            // Uppercase Greek: Α-Ρ (U+0391-U+03A1) -> CP-1253 193-209\n            if (ch >= 145 && ch <= 161)\n                return (uint8_t)(ch + 48);\n            // Uppercase Greek: Σ-Ω (U+03A3-U+03A9) -> CP-1253 211-217\n            else if (ch >= 163 && ch <= 169)\n                return (uint8_t)(ch + 48);\n            // Lowercase Greek: α-ρ (U+03B1-U+03C1) -> CP-1253 225-241\n            else if (ch >= 177 && ch <= 193)\n                return (uint8_t)(ch + 48);\n            break;\n        }\n        case 0xCF: {\n            SKIPREST = false;\n            // Lowercase Greek: ς-ω (U+03C2-U+03C9) -> CP-1253 242-249\n            if (ch >= 130 && ch <= 137)\n                return (uint8_t)(ch + 112);\n            break;\n        }\n        }\n\n        // We want to strip out prefix chars for two-byte Greek char formats\n        if (ch == 0xC2 || ch == 0xC3 || ch == 0xCE || ch == 0xCF)\n            return (uint8_t)0;\n\n#endif\n\n        // If we already returned an unconvertable-character symbol for this unconvertable-character sequence, return NULs for the\n        // rest of it\n        if (SKIPREST)\n            return (uint8_t)0;\n        SKIPREST = true;\n\n        return (uint8_t)191; // otherwise: return ¿ if character can't be converted (note that the font map we're using doesn't\n                             // stick to standard EASCII codes)\n    }\n\n    /// Returns a handle to the DebugInfo screen.\n    //\n    // Use this handle to set things like battery status, user count, GPS status, etc.\n    DebugInfo *debug_info() { return &debugInfo; }\n\n    // Handle observer events\n    int handleStatusUpdate(const meshtastic::Status *arg);\n    int handleTextMessage(const meshtastic_MeshPacket *packet);\n    int handleUIFrameEvent(const UIFrameEvent *arg);\n    int handleInputEvent(const InputEvent *arg);\n    int handleAdminMessage(AdminModule_ObserverData *arg);\n\n    /// Used to force (super slow) eink displays to draw critical frames\n    void forceDisplay(bool forceUiUpdate = false);\n\n    /// Draws our SSL cert screen during boot (called from WebServer)\n    void setSSLFrames();\n\n    // Menu-driven Show / Hide Toggle\n    void toggleFrameVisibility(const std::string &frameName);\n    bool isFrameHidden(const std::string &frameName) const;\n\n#ifdef USE_EINK\n    /// Draw an image to remain on E-Ink display after screen off\n    void setScreensaverFrames(FrameCallback einkScreensaver = NULL);\n#endif\n\n  protected:\n    /// Updates the UI.\n    //\n    // Called periodically from the main loop.\n    int32_t runOnce() final;\n\n    bool isAUTOOled = false;\n\n    // Screen dimensions (for convenience)\n    // Defined during Screen::setup\n    uint16_t displayWidth = 0;\n    uint16_t displayHeight = 0;\n\n  private:\n    FrameCallback alertFrames[1];\n    struct ScreenCmd {\n        Cmd cmd;\n        union {\n            uint32_t bluetooth_pin;\n            char *print_text;\n        };\n    };\n\n    /// Enques given command item to be processed by main loop().\n    bool enqueueCmd(const ScreenCmd &cmd)\n    {\n        if (!useDisplay)\n            return false; // not enqueued if our display is not in use\n        else {\n            bool success = cmdQueue.enqueue(cmd, 0);\n            enabled = true; // handle ASAP (we are the registered reader for cmdQueue, but might have been disabled)\n            return success;\n        }\n    }\n\n    // Implementations of various commands, called from doTask().\n    void handleSetOn(bool on, FrameCallback einkScreensaver = NULL);\n    void handleOnPress();\n    void handleStartFirmwareUpdateScreen();\n\n    // Info collected by setFrames method.\n    // Index location of specific frames.\n    // - Used to apply the FrameFocus parameter of setFrames\n    // - Used to dismiss the currently shown frame (txt; waypoint) by CardKB combo\n    struct FramesetInfo {\n        struct FramePositions {\n            uint8_t fault = 255;\n            uint8_t waypoint = 255;\n            uint8_t focusedModule = 255;\n            uint8_t log = 255;\n            uint8_t settings = 255;\n            uint8_t wifi = 255;\n            uint8_t deviceFocused = 255;\n            uint8_t system = 255;\n            uint8_t gps = 255;\n            uint8_t home = 255;\n            uint8_t textMessage = 255;\n            uint8_t nodelist_nodes = 255;\n            uint8_t nodelist_location = 255;\n            uint8_t nodelist_lastheard = 255;\n            uint8_t nodelist_hopsignal = 255;\n            uint8_t nodelist_distance = 255;\n            uint8_t nodelist_bearings = 255;\n            uint8_t clock = 255;\n            uint8_t chirpy = 255;\n            uint8_t firstFavorite = 255;\n            uint8_t lastFavorite = 255;\n            uint8_t lora = 255;\n        } positions;\n\n        uint8_t frameCount = 0;\n    } framesetInfo;\n\n    struct hiddenFrames {\n        bool textMessage = false;\n        bool waypoint = false;\n        bool wifi = false;\n        bool system = false;\n        bool home = false;\n        bool clock = false;\n#ifndef USE_EINK\n        bool nodelist_nodes = false;\n        bool nodelist_location = false;\n#endif\n#ifdef USE_EINK\n        bool nodelist_lastheard = false;\n        bool nodelist_hopsignal = false;\n        bool nodelist_distance = false;\n#endif\n#if HAS_GPS\n#ifdef USE_EINK\n        bool nodelist_bearings = false;\n#endif\n        bool gps = false;\n#endif\n        bool lora = false;\n        bool show_favorites = false;\n        bool chirpy = true;\n    } hiddenFrames;\n\n    /// Try to start drawing ASAP\n    void setFastFramerate();\n\n    // Sets frame up for immediate drawing\n    void setFrameImmediateDraw(FrameCallback *drawFrames);\n\n    /// callback for current alert frame\n    FrameCallback alertFrame;\n\n    /// Queue of commands to execute in doTask.\n    TypedQueue<ScreenCmd> cmdQueue;\n    /// Whether we are using a display\n    bool useDisplay = false;\n    /// Whether the display is currently powered\n    bool screenOn = false;\n    // Whether we are showing the regular screen (as opposed to booth screen or\n    // Bluetooth PIN screen)\n    bool showingNormalScreen = false;\n    /// Track USB power state to only wake screen on actual power state changes\n    bool lastPowerUSBState = false;\n\n    // Implementation to Adjust Brightness\n    uint8_t brightness = BRIGHTNESS_DEFAULT; // H = 254, MH = 192, ML = 130 L = 103\n\n    bool hasCompass = false;\n    float compassHeading;\n    uint32_t endCalibrationAt;\n\n    /// Holds state for debug information\n    DebugInfo debugInfo;\n\n    /// Display device\n#ifdef USE_ST7789\n    ST7789Spi *dispdev;\n#else\n    OLEDDisplay *dispdev;\n#endif\n\n    /// UI helper for rendering to frames and switching between them\n    OLEDDisplayUi *ui;\n};\n\n} // namespace graphics\n\n// Extern declarations for function symbols used in UIRenderer\nextern std::vector<std::string> functionSymbol;\nextern std::string functionSymbolString;\nextern graphics::Screen *screen;\n\n#endif"
  },
  {
    "path": "src/graphics/ScreenFonts.h",
    "content": "#pragma once\n\n#ifdef OLED_PL\n#include \"graphics/fonts/OLEDDisplayFontsPL.h\"\n#endif\n\n#ifdef OLED_RU\n#include \"graphics/fonts/OLEDDisplayFontsRU.h\"\n#endif\n\n#ifdef OLED_UA\n#include \"graphics/fonts/OLEDDisplayFontsUA.h\"\n#endif\n\n#ifdef OLED_CS\n#include \"graphics/fonts/OLEDDisplayFontsCS.h\"\n#endif\n\n#ifdef OLED_GR\n#include \"graphics/fonts/OLEDDisplayFontsGR.h\"\n#endif\n\n#if defined(CROWPANEL_ESP32S3_5_EPAPER) && defined(USE_EINK)\n#include \"graphics/fonts/EinkDisplayFonts.h\"\n#endif\n\n#ifdef OLED_GR\n#define FONT_SMALL_LOCAL ArialMT_Plain_10_GR // Height: 13\n#else\n#ifdef OLED_PL\n#define FONT_SMALL_LOCAL ArialMT_Plain_10_PL\n#else\n#ifdef OLED_RU\n#define FONT_SMALL_LOCAL ArialMT_Plain_10_RU\n#else\n#ifdef OLED_UA\n#define FONT_SMALL_LOCAL ArialMT_Plain_10_UA // Height: 13\n#else\n#ifdef OLED_CS\n#define FONT_SMALL_LOCAL ArialMT_Plain_10_CS\n#else\n#define FONT_SMALL_LOCAL ArialMT_Plain_10 // Height: 13\n#endif\n#endif\n#endif\n#endif\n#endif\n#ifdef OLED_GR\n#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_GR // Height: 19\n#else\n#ifdef OLED_PL\n#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_PL // Height: 19\n#else\n#ifdef OLED_RU\n#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_RU // Height: 19\n#else\n#ifdef OLED_UA\n#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_UA // Height: 19\n#else\n#ifdef OLED_CS\n#define FONT_MEDIUM_LOCAL ArialMT_Plain_16_CS\n#else\n#define FONT_MEDIUM_LOCAL ArialMT_Plain_16 // Height: 19\n#endif\n#endif\n#endif\n#endif\n#endif\n#ifdef OLED_GR\n#define FONT_LARGE_LOCAL ArialMT_Plain_24_GR // Height: 28\n#else\n#ifdef OLED_PL\n#define FONT_LARGE_LOCAL ArialMT_Plain_24_PL // Height: 28\n#else\n#ifdef OLED_RU\n#define FONT_LARGE_LOCAL ArialMT_Plain_24_RU // Height: 28\n#else\n#ifdef OLED_UA\n#define FONT_LARGE_LOCAL ArialMT_Plain_24_UA // Height: 28\n#else\n#ifdef OLED_CS\n#define FONT_LARGE_LOCAL ArialMT_Plain_24_CS // Height: 28\n#else\n#define FONT_LARGE_LOCAL ArialMT_Plain_24 // Height: 28\n#endif\n#endif\n#endif\n#endif\n#endif\n\n#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) ||      \\\n     defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) ||             \\\n     defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796)) &&                                                                   \\\n    !defined(DISPLAY_FORCE_SMALL_FONTS)\n// The screen is bigger so use bigger fonts\n#define FONT_SMALL FONT_MEDIUM_LOCAL // Height: 19\n#define FONT_MEDIUM FONT_LARGE_LOCAL // Height: 28\n#define FONT_LARGE FONT_LARGE_LOCAL  // Height: 28\n#elif defined(M5STACK_UNITC6L)\n#define FONT_SMALL FONT_SMALL_LOCAL  // Height: 13\n#define FONT_MEDIUM FONT_SMALL_LOCAL // Height: 13\n#define FONT_LARGE FONT_SMALL_LOCAL  // Height: 13\n#else\n#define FONT_SMALL FONT_SMALL_LOCAL   // Height: 13\n#define FONT_MEDIUM FONT_MEDIUM_LOCAL // Height: 19\n#define FONT_LARGE FONT_LARGE_LOCAL   // Height: 28\n#endif\n\n#if defined(CROWPANEL_ESP32S3_5_EPAPER) && defined(USE_EINK)\n#undef FONT_SMALL\n#undef FONT_MEDIUM\n#undef FONT_LARGE\n#define FONT_SMALL Monospaced_plain_30\n#define FONT_MEDIUM Monospaced_plain_30\n#define FONT_LARGE Monospaced_plain_30\n#endif\n\n#define _fontHeight(font) ((font)[1] + 1) // height is position 1\n\n#define FONT_HEIGHT_SMALL _fontHeight(FONT_SMALL)\n#define FONT_HEIGHT_MEDIUM _fontHeight(FONT_MEDIUM)\n#define FONT_HEIGHT_LARGE _fontHeight(FONT_LARGE)\n"
  },
  {
    "path": "src/graphics/ScreenGlobals.cpp",
    "content": "#include <string>\n#include <vector>\n\n// Global variables for screen function overlay\nstd::vector<std::string> functionSymbol;\nstd::string functionSymbolString;\n"
  },
  {
    "path": "src/graphics/SharedUIDisplay.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"MeshService.h\"\n#include \"RTC.h\"\n#include \"draw/NodeListRenderer.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/draw/UIRenderer.h\"\n#include \"main.h\"\n#include \"meshtastic/config.pb.h\"\n#include \"modules/ExternalNotificationModule.h\"\n#include \"power.h\"\n#include <OLEDDisplay.h>\n#include <graphics/images.h>\n\nnamespace graphics\n{\n\nScreenResolution determineScreenResolution(int16_t screenheight, int16_t screenwidth)\n{\n\n#ifdef FORCE_LOW_RES\n    return ScreenResolution::Low;\n#else\n    // Unit C6L and other ultra low res screens\n    if (screenwidth <= 64 || screenheight <= 48) {\n        return ScreenResolution::UltraLow;\n    }\n\n    // Standard OLED screens\n    if (screenwidth > 128 && screenheight <= 64) {\n        return ScreenResolution::Low;\n    }\n\n    // High Resolutions screens like T114, TDeck, TLora Pager, etc\n    if (screenwidth > 128) {\n        return ScreenResolution::High;\n    }\n\n    // Default to low resolution\n    return ScreenResolution::Low;\n#endif\n}\n\nvoid decomposeTime(uint32_t rtc_sec, int &hour, int &minute, int &second)\n{\n    hour = 0;\n    minute = 0;\n    second = 0;\n    if (rtc_sec == 0)\n        return;\n    uint32_t hms = (rtc_sec % SEC_PER_DAY + SEC_PER_DAY) % SEC_PER_DAY;\n    hour = hms / SEC_PER_HOUR;\n    minute = (hms % SEC_PER_HOUR) / SEC_PER_MIN;\n    second = hms % SEC_PER_MIN;\n}\n\n// === Shared External State ===\nbool hasUnreadMessage = false;\nScreenResolution currentResolution = ScreenResolution::Low;\n\n// === Internal State ===\nbool isBoltVisibleShared = true;\nuint32_t lastBlinkShared = 0;\nbool isMailIconVisible = true;\nuint32_t lastMailBlink = 0;\n\n// *********************************\n// * Rounded Header when inverted *\n// *********************************\nvoid drawRoundedHighlight(OLEDDisplay *display, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r)\n{\n    // Draw the center and side rectangles\n    display->fillRect(x + r, y, w - 2 * r, h);         // center bar\n    display->fillRect(x, y + r, r, h - 2 * r);         // left edge\n    display->fillRect(x + w - r, y + r, r, h - 2 * r); // right edge\n\n    // Draw the rounded corners using filled circles\n    display->fillCircle(x + r + 1, y + r, r);             // top-left\n    display->fillCircle(x + w - r - 1, y + r, r);         // top-right\n    display->fillCircle(x + r + 1, y + h - r - 1, r);     // bottom-left\n    display->fillCircle(x + w - r - 1, y + h - r - 1, r); // bottom-right\n}\n\n// *************************\n// * Common Header Drawing *\n// *************************\nvoid drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y, const char *titleStr, bool force_no_invert, bool show_date)\n{\n    constexpr int HEADER_OFFSET_Y = 1;\n    y += HEADER_OFFSET_Y;\n\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    const int xOffset = 4;\n    const int highlightHeight = FONT_HEIGHT_SMALL - 1;\n    const bool isInverted = (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_INVERTED);\n    const bool isBold = config.display.heading_bold;\n\n    const int screenW = display->getWidth();\n    const int screenH = display->getHeight();\n\n    if (!force_no_invert) {\n        // === Inverted Header Background ===\n        if (isInverted) {\n            display->setColor(BLACK);\n            display->fillRect(0, 0, screenW, highlightHeight + 2);\n            display->setColor(WHITE);\n            drawRoundedHighlight(display, x, y, screenW, highlightHeight, 2);\n            display->setColor(BLACK);\n        } else {\n            display->setColor(BLACK);\n            display->fillRect(0, 0, screenW, highlightHeight + 2);\n            display->setColor(WHITE);\n            if (currentResolution == ScreenResolution::High) {\n                display->drawLine(0, 20, screenW, 20);\n            } else {\n                display->drawLine(0, 14, screenW, 14);\n            }\n        }\n\n        // === Screen Title ===\n        const char *headerTitle = titleStr ? titleStr : \"\";\n        const int titleWidth = UIRenderer::measureStringWithEmotes(display, headerTitle);\n        const int titleX = (SCREEN_WIDTH - titleWidth) / 2;\n        UIRenderer::drawStringWithEmotes(display, titleX, y, headerTitle, FONT_HEIGHT_SMALL, 1, config.display.heading_bold);\n    }\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    // === Battery State ===\n    int chargePercent = powerStatus->getBatteryChargePercent();\n    bool isCharging = powerStatus->getIsCharging();\n    bool usbPowered = powerStatus->getHasUSB();\n\n    if (chargePercent >= 100) {\n        isCharging = false;\n    }\n    if (chargePercent == 101) {\n        usbPowered = true; // Forcing this flag on for the express purpose that some devices have no concept of having a USB cable\n                           // plugged in\n    }\n\n    uint32_t now = millis();\n\n#ifndef USE_EINK\n    if (isCharging && now - lastBlinkShared > 500) {\n        isBoltVisibleShared = !isBoltVisibleShared;\n        lastBlinkShared = now;\n    }\n#endif\n\n    bool useHorizontalBattery = (currentResolution == ScreenResolution::High && screenW >= screenH);\n    const int textY = y + (highlightHeight - FONT_HEIGHT_SMALL) / 2;\n\n    int batteryX = 1;\n    int batteryY = HEADER_OFFSET_Y + 1;\n#if !defined(M5STACK_UNITC6L)\n    // === Battery Icons ===\n    if (usbPowered && !isCharging) { // This is a basic check to determine USB Powered is flagged but not charging\n        batteryX += 1;\n        batteryY += 2;\n        if (currentResolution == ScreenResolution::High) {\n            display->drawXbm(batteryX, batteryY, 19, 12, imgUSB_HighResolution);\n            batteryX += 20; // Icon + 1 pixel\n        } else {\n            display->drawXbm(batteryX, batteryY, 10, 8, imgUSB);\n            batteryX += 11; // Icon + 1 pixel\n        }\n    } else {\n        if (useHorizontalBattery) {\n            batteryX += 1;\n            batteryY += 2;\n            display->drawXbm(batteryX, batteryY, 9, 13, batteryBitmap_h_bottom);\n            display->drawXbm(batteryX + 9, batteryY, 9, 13, batteryBitmap_h_top);\n            if (isCharging && isBoltVisibleShared)\n                display->drawXbm(batteryX + 4, batteryY, 9, 13, lightning_bolt_h);\n            else {\n                display->drawLine(batteryX + 5, batteryY, batteryX + 10, batteryY);\n                display->drawLine(batteryX + 5, batteryY + 12, batteryX + 10, batteryY + 12);\n                int fillWidth = 14 * chargePercent / 100;\n                display->fillRect(batteryX + 1, batteryY + 1, fillWidth, 11);\n            }\n            batteryX += 18; // Icon + 2 pixels\n        } else {\n#ifdef USE_EINK\n            batteryY += 2;\n#endif\n            display->drawXbm(batteryX, batteryY, 7, 11, batteryBitmap_v);\n            if (isCharging && isBoltVisibleShared)\n                display->drawXbm(batteryX + 1, batteryY + 3, 5, 5, lightning_bolt_v);\n            else {\n                display->drawXbm(batteryX - 1, batteryY + 4, 8, 3, batteryBitmap_sidegaps_v);\n                int fillHeight = 8 * chargePercent / 100;\n                int fillY = batteryY - fillHeight;\n                display->fillRect(batteryX + 1, fillY + 10, 5, fillHeight);\n            }\n            batteryX += 9; // Icon + 2 pixels\n        }\n    }\n\n    if (chargePercent != 101) {\n        // === Battery % Display ===\n        char chargeStr[4];\n        snprintf(chargeStr, sizeof(chargeStr), \"%d\", chargePercent);\n        int chargeNumWidth = display->getStringWidth(chargeStr);\n        display->drawString(batteryX, textY, chargeStr);\n        display->drawString(batteryX + chargeNumWidth - 1, textY, \"%\");\n        if (isBold) {\n            display->drawString(batteryX + 1, textY, chargeStr);\n            display->drawString(batteryX + chargeNumWidth, textY, \"%\");\n        }\n    }\n\n    // === Time and Right-aligned Icons ===\n    uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true);\n    char timeStr[10] = \"--:--\";                          // Fallback display\n    int timeStrWidth = display->getStringWidth(\"12:34\"); // Default alignment\n    int timeX = screenW - xOffset - timeStrWidth + 4;\n\n    if (rtc_sec > 0) {\n        // === Build Time String ===\n        int hour, minute, second;\n        graphics::decomposeTime(rtc_sec, hour, minute, second);\n        snprintf(timeStr, sizeof(timeStr), \"%d:%02d\", hour, minute);\n\n        // === Build Date String ===\n        char datetimeStr[25];\n        UIRenderer::formatDateTime(datetimeStr, sizeof(datetimeStr), rtc_sec, display, false);\n        char dateLine[40];\n\n        if (currentResolution == ScreenResolution::High) {\n            snprintf(dateLine, sizeof(dateLine), \"%s\", datetimeStr);\n        } else {\n            if (hasUnreadMessage) {\n                snprintf(dateLine, sizeof(dateLine), \"%s\", &datetimeStr[5]);\n            } else {\n                snprintf(dateLine, sizeof(dateLine), \"%s\", &datetimeStr[2]);\n            }\n        }\n\n        if (config.display.use_12h_clock) {\n            bool isPM = hour >= 12;\n            hour %= 12;\n            if (hour == 0)\n                hour = 12;\n            snprintf(timeStr, sizeof(timeStr), \"%d:%02d%s\", hour, minute, isPM ? \"p\" : \"a\");\n        }\n\n        if (show_date) {\n            timeStrWidth = display->getStringWidth(dateLine);\n        } else {\n            timeStrWidth = display->getStringWidth(timeStr);\n        }\n        timeX = screenW - xOffset - timeStrWidth + 3;\n\n        // === Show Mail or Mute Icon to the Left of Time ===\n        int iconRightEdge = timeX - 2;\n\n        bool showMail = false;\n\n#ifndef USE_EINK\n        if (hasUnreadMessage) {\n            if (now - lastMailBlink > 500) {\n                isMailIconVisible = !isMailIconVisible;\n                lastMailBlink = now;\n            }\n            showMail = isMailIconVisible;\n        }\n#else\n        if (hasUnreadMessage) {\n            showMail = true;\n        }\n#endif\n\n        if (showMail) {\n            if (useHorizontalBattery) {\n                int iconW = 16, iconH = 12;\n                int iconX = iconRightEdge - iconW;\n                int iconY = textY + (FONT_HEIGHT_SMALL - iconH) / 2 - 1;\n                if (isInverted && !force_no_invert) {\n                    display->setColor(WHITE);\n                    display->fillRect(iconX - 1, iconY - 1, iconW + 3, iconH + 2);\n                    display->setColor(BLACK);\n                } else {\n                    display->setColor(BLACK);\n                    display->fillRect(iconX - 1, iconY - 1, iconW + 3, iconH + 2);\n                    display->setColor(WHITE);\n                }\n                display->drawRect(iconX, iconY, iconW + 1, iconH);\n                display->drawLine(iconX, iconY, iconX + iconW / 2, iconY + iconH - 4);\n                display->drawLine(iconX + iconW, iconY, iconX + iconW / 2, iconY + iconH - 4);\n            } else {\n                int iconX = iconRightEdge - (mail_width - 2);\n                int iconY = textY + (FONT_HEIGHT_SMALL - mail_height) / 2;\n                if (isInverted && !force_no_invert) {\n                    display->setColor(WHITE);\n                    display->fillRect(iconX - 1, iconY - 1, mail_width + 2, mail_height + 2);\n                    display->setColor(BLACK);\n                } else {\n                    display->setColor(BLACK);\n                    display->fillRect(iconX - 1, iconY - 1, mail_width + 2, mail_height + 2);\n                    display->setColor(WHITE);\n                }\n                display->drawXbm(iconX, iconY, mail_width, mail_height, mail);\n            }\n        } else if (externalNotificationModule->getMute()) {\n            if (currentResolution == ScreenResolution::High) {\n                int iconX = iconRightEdge - mute_symbol_big_width;\n                int iconY = textY + (FONT_HEIGHT_SMALL - mute_symbol_big_height) / 2;\n\n                if (isInverted && !force_no_invert) {\n                    display->setColor(WHITE);\n                    display->fillRect(iconX - 1, iconY - 1, mute_symbol_big_width + 2, mute_symbol_big_height + 2);\n                    display->setColor(BLACK);\n                } else {\n                    display->setColor(BLACK);\n                    display->fillRect(iconX - 1, iconY - 1, mute_symbol_big_width + 2, mute_symbol_big_height + 2);\n                    display->setColor(WHITE);\n                }\n                display->drawXbm(iconX, iconY, mute_symbol_big_width, mute_symbol_big_height, mute_symbol_big);\n            } else {\n                int iconX = iconRightEdge - mute_symbol_width;\n                int iconY = textY + (FONT_HEIGHT_SMALL - mail_height) / 2;\n\n                if (isInverted && !force_no_invert) {\n                    display->setColor(WHITE);\n                    display->fillRect(iconX - 1, iconY - 1, mute_symbol_width + 2, mute_symbol_height + 2);\n                    display->setColor(BLACK);\n                } else {\n                    display->setColor(BLACK);\n                    display->fillRect(iconX - 1, iconY - 1, mute_symbol_width + 2, mute_symbol_height + 2);\n                    display->setColor(WHITE);\n                }\n                display->drawXbm(iconX, iconY, mute_symbol_width, mute_symbol_height, mute_symbol);\n            }\n        }\n\n        if (show_date) {\n            // === Draw Date ===\n            display->drawString(timeX, textY, dateLine);\n            if (isBold)\n                display->drawString(timeX - 1, textY, dateLine);\n        } else {\n            // === Draw Time ===\n            display->drawString(timeX, textY, timeStr);\n            if (isBold)\n                display->drawString(timeX - 1, textY, timeStr);\n        }\n\n    } else {\n        // === No Time Available: Mail/Mute Icon Moves to Far Right ===\n        int iconRightEdge = screenW - xOffset;\n\n        bool showMail = false;\n\n#ifndef USE_EINK\n        if (hasUnreadMessage) {\n            if (now - lastMailBlink > 500) {\n                isMailIconVisible = !isMailIconVisible;\n                lastMailBlink = now;\n            }\n            showMail = isMailIconVisible;\n        }\n#else\n        if (hasUnreadMessage) {\n            showMail = true;\n        }\n#endif\n\n        if (showMail) {\n            if (useHorizontalBattery) {\n                int iconW = 16, iconH = 12;\n                int iconX = iconRightEdge - iconW;\n                int iconY = textY + (FONT_HEIGHT_SMALL - iconH) / 2 - 1;\n                display->drawRect(iconX, iconY, iconW + 1, iconH);\n                display->drawLine(iconX, iconY, iconX + iconW / 2, iconY + iconH - 4);\n                display->drawLine(iconX + iconW, iconY, iconX + iconW / 2, iconY + iconH - 4);\n            } else {\n                int iconX = iconRightEdge - mail_width;\n                int iconY = textY + (FONT_HEIGHT_SMALL - mail_height) / 2;\n                display->drawXbm(iconX, iconY, mail_width, mail_height, mail);\n            }\n        } else if (externalNotificationModule->getMute()) {\n            if (currentResolution == ScreenResolution::High) {\n                int iconX = iconRightEdge - mute_symbol_big_width;\n                int iconY = textY + (FONT_HEIGHT_SMALL - mute_symbol_big_height) / 2;\n                display->drawXbm(iconX, iconY, mute_symbol_big_width, mute_symbol_big_height, mute_symbol_big);\n            } else {\n                int iconX = iconRightEdge - mute_symbol_width;\n                int iconY = textY + (FONT_HEIGHT_SMALL - mail_height) / 2;\n                display->drawXbm(iconX, iconY, mute_symbol_width, mute_symbol_height, mute_symbol);\n            }\n        }\n    }\n#endif\n    display->setColor(WHITE); // Reset for other UI\n}\n\nconst int *getTextPositions(OLEDDisplay *display)\n{\n    static int textPositions[7]; // Static array that persists beyond function scope\n\n    if (currentResolution == ScreenResolution::High) {\n        textPositions[0] = textZeroLine;\n        textPositions[1] = textFirstLine_medium;\n        textPositions[2] = textSecondLine_medium;\n        textPositions[3] = textThirdLine_medium;\n        textPositions[4] = textFourthLine_medium;\n        textPositions[5] = textFifthLine_medium;\n        textPositions[6] = textSixthLine_medium;\n    } else {\n        textPositions[0] = textZeroLine;\n        textPositions[1] = textFirstLine;\n        textPositions[2] = textSecondLine;\n        textPositions[3] = textThirdLine;\n        textPositions[4] = textFourthLine;\n        textPositions[5] = textFifthLine;\n        textPositions[6] = textSixthLine;\n    }\n    return textPositions;\n}\n\n// *************************\n// * Common Footer Drawing *\n// *************************\nvoid drawCommonFooter(OLEDDisplay *display, int16_t x, int16_t y)\n{\n    if (!isAPIConnected(service->api_state))\n        return;\n\n    const int scale = (currentResolution == ScreenResolution::High) ? 2 : 1;\n    display->setColor(BLACK);\n    display->fillRect(0, SCREEN_HEIGHT - (1 * scale) - (connection_icon_height * scale), (connection_icon_width * scale),\n                      (connection_icon_height * scale) + (2 * scale));\n    display->setColor(WHITE);\n    if (currentResolution == ScreenResolution::High) {\n        const int bytesPerRow = (connection_icon_width + 7) / 8;\n        int iconX = 0;\n        int iconY = SCREEN_HEIGHT - (connection_icon_height * 2);\n\n        for (int yy = 0; yy < connection_icon_height; ++yy) {\n            const uint8_t *rowPtr = connection_icon + yy * bytesPerRow;\n            for (int xx = 0; xx < connection_icon_width; ++xx) {\n                const uint8_t byteVal = pgm_read_byte(rowPtr + (xx >> 3));\n                const uint8_t bitMask = 1U << (xx & 7); // XBM is LSB-first\n                if (byteVal & bitMask) {\n                    display->fillRect(iconX + xx * scale, iconY + yy * scale, scale, scale);\n                }\n            }\n        }\n\n    } else {\n        display->drawXbm(0, SCREEN_HEIGHT - connection_icon_height, connection_icon_width, connection_icon_height,\n                         connection_icon);\n    }\n}\n\nbool isAllowedPunctuation(char c)\n{\n    const std::string allowed = \".,!?;:-_()[]{}'\\\"@#$/\\\\&+=%~^ \";\n    return allowed.find(c) != std::string::npos;\n}\n\nstatic void replaceAll(std::string &s, const std::string &from, const std::string &to)\n{\n    if (from.empty())\n        return;\n    size_t pos = 0;\n    while ((pos = s.find(from, pos)) != std::string::npos) {\n        s.replace(pos, from.size(), to);\n        pos += to.size();\n    }\n}\n\nstd::string sanitizeString(const std::string &input)\n{\n    std::string output;\n    bool inReplacement = false;\n\n    // Make a mutable copy so we can normalize UTF-8 “smart punctuation” into ASCII first.\n    std::string s = input;\n\n    // Curly single quotes: ‘ ’\n    replaceAll(s, \"\\xE2\\x80\\x98\", \"'\"); // U+2018\n    replaceAll(s, \"\\xE2\\x80\\x99\", \"'\"); // U+2019\n\n    // Curly double quotes: “ ”\n    replaceAll(s, \"\\xE2\\x80\\x9C\", \"\\\"\"); // U+201C\n    replaceAll(s, \"\\xE2\\x80\\x9D\", \"\\\"\"); // U+201D\n\n    // En dash / Em dash: – —\n    replaceAll(s, \"\\xE2\\x80\\x93\", \"-\"); // U+2013\n    replaceAll(s, \"\\xE2\\x80\\x94\", \"-\"); // U+2014\n\n    // Non-breaking space\n    replaceAll(s, \"\\xC2\\xA0\", \" \"); // U+00A0\n\n    // Now do your original sanitize pass over the normalized string.\n    for (unsigned char uc : s) {\n        char c = static_cast<char>(uc);\n        if (std::isalnum(uc) || isAllowedPunctuation(c)) {\n            output += c;\n            inReplacement = false;\n        } else {\n            if (!inReplacement) {\n                output += static_cast<char>(0xBF); // ISO-8859-1 for inverted question mark\n                inReplacement = true;\n            }\n        }\n    }\n\n    return output;\n}\n\n} // namespace graphics\n#endif\n"
  },
  {
    "path": "src/graphics/SharedUIDisplay.h",
    "content": "#pragma once\n\n#include <OLEDDisplay.h>\n#include <string>\n\nnamespace graphics\n{\n\n// =======================\n// Shared UI Helpers\n// =======================\n\n#define textZeroLine 0\n// Consistent Line Spacing - this is standard for all display and the fall-back spacing\n#define textFirstLine (FONT_HEIGHT_SMALL - 1)\n#define textSecondLine (textFirstLine + (FONT_HEIGHT_SMALL - 5))\n#define textThirdLine (textSecondLine + (FONT_HEIGHT_SMALL - 5))\n#define textFourthLine (textThirdLine + (FONT_HEIGHT_SMALL - 5))\n#define textFifthLine (textFourthLine + (FONT_HEIGHT_SMALL - 5))\n#define textSixthLine (textFifthLine + (FONT_HEIGHT_SMALL - 5))\n\n// Consistent Line Spacing for devices like T114 and TEcho/ThinkNode M1 of devices\n#define textFirstLine_medium (FONT_HEIGHT_SMALL + 1)\n#define textSecondLine_medium (textFirstLine_medium + FONT_HEIGHT_SMALL)\n#define textThirdLine_medium (textSecondLine_medium + FONT_HEIGHT_SMALL)\n#define textFourthLine_medium (textThirdLine_medium + FONT_HEIGHT_SMALL)\n#define textFifthLine_medium (textFourthLine_medium + FONT_HEIGHT_SMALL)\n#define textSixthLine_medium (textFifthLine_medium + FONT_HEIGHT_SMALL)\n\n// Consistent Line Spacing for devices like VisionMaster T190\n#define textFirstLine_large (FONT_HEIGHT_SMALL + 1)\n#define textSecondLine_large (textFirstLine_large + (FONT_HEIGHT_SMALL + 5))\n#define textThirdLine_large (textSecondLine_large + (FONT_HEIGHT_SMALL + 5))\n#define textFourthLine_large (textThirdLine_large + (FONT_HEIGHT_SMALL + 5))\n#define textFifthLine_large (textFourthLine_large + (FONT_HEIGHT_SMALL + 5))\n#define textSixthLine_large (textFifthLine_large + (FONT_HEIGHT_SMALL + 5))\n\n// Quick screen access\n#define SCREEN_WIDTH display->getWidth()\n#define SCREEN_HEIGHT display->getHeight()\n\n// Shared state (declare inside namespace)\nextern bool hasUnreadMessage;\nenum class ScreenResolution : uint8_t { UltraLow = 0, Low = 1, High = 2 };\nextern ScreenResolution currentResolution;\nScreenResolution determineScreenResolution(int16_t screenheight, int16_t screenwidth);\n\nvoid decomposeTime(uint32_t rtc_sec, int &hour, int &minute, int &second);\n\n// Rounded highlight (used for inverted headers)\nvoid drawRoundedHighlight(OLEDDisplay *display, int16_t x, int16_t y, int16_t w, int16_t h, int16_t r);\n\n// Shared battery/time/mail header\nvoid drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y, const char *titleStr = \"\", bool force_no_invert = false,\n                      bool show_date = false);\n\n// Shared battery/time/mail header\nvoid drawCommonFooter(OLEDDisplay *display, int16_t x, int16_t y);\n\nconst int *getTextPositions(OLEDDisplay *display);\n\nbool isAllowedPunctuation(char c);\n\nstd::string sanitizeString(const std::string &input);\n\nstatic inline bool isAPIConnected(uint8_t state)\n{\n    static constexpr bool connectedStates[] = {\n        /* STATE_NONE    */ false,\n        /* STATE_BLE     */ true,\n        /* STATE_WIFI    */ true,\n        /* STATE_SERIAL  */ true,\n        /* STATE_PACKET  */ true,\n        /* STATE_HTTP    */ true,\n        /* STATE_ETH     */ true,\n    };\n    return state < sizeof(connectedStates) ? connectedStates[state] : false;\n}\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/TFTDisplay.cpp",
    "content": "#include \"configuration.h\"\n#include \"main.h\"\n#if USE_TFTDISPLAY\n\n#if ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\n#ifndef TFT_BACKLIGHT_ON\n#define TFT_BACKLIGHT_ON HIGH\n#endif\n\n#ifdef GPIO_EXTENDER\n#include <SparkFunSX1509.h>\n#include <Wire.h>\nextern SX1509 gpioExtender;\n#endif\n\n#ifdef TFT_MESH_OVERRIDE\nuint16_t TFT_MESH = TFT_MESH_OVERRIDE;\n#else\nuint16_t TFT_MESH = COLOR565(0x67, 0xEA, 0x94);\n#endif\n\n#if defined(ST7735S)\n#include <LovyanGFX.hpp> // Graphics and font library for ST7735 driver chip\n\n#ifndef TFT_INVERT\n#define TFT_INVERT true\n#endif\n\nclass LGFX : public lgfx::LGFX_Device\n{\n    lgfx::Panel_ST7735S _panel_instance;\n    lgfx::Bus_SPI _bus_instance;\n    lgfx::Light_PWM _light_instance;\n\n  public:\n    LGFX(void)\n    {\n        {\n            auto cfg = _bus_instance.config();\n\n            // configure SPI\n            cfg.spi_host = ST7735_SPI_HOST; // ESP32-S2,S3,C3 : SPI2_HOST or SPI3_HOST / ESP32 : VSPI_HOST or HSPI_HOST\n            cfg.spi_mode = 0;\n            cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing\n                                            // 80MHz by an integer)\n            cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving\n            cfg.spi_3wire = false;              // Set to true if reception is done on the MOSI pin\n            cfg.use_lock = true;                // Set to true to use transaction locking\n            cfg.dma_channel = SPI_DMA_CH_AUTO;  // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch /\n                                                // SPI_DMA_CH_AUTO=auto setting)\n            cfg.pin_sclk = ST7735_SCK;          // Set SPI SCLK pin number\n            cfg.pin_mosi = ST7735_SDA;          // Set SPI MOSI pin number\n            cfg.pin_miso = ST7735_MISO;         // Set SPI MISO pin number (-1 = disable)\n            cfg.pin_dc = ST7735_RS;             // Set SPI DC pin number (-1 = disable)\n\n            _bus_instance.config(cfg);              // applies the set value to the bus.\n            _panel_instance.setBus(&_bus_instance); // set the bus on the panel.\n        }\n\n        {                                        // Set the display panel control.\n            auto cfg = _panel_instance.config(); // Gets a structure for display panel settings.\n\n            cfg.pin_cs = ST7735_CS;     // Pin number where CS is connected (-1 = disable)\n            cfg.pin_rst = ST7735_RESET; // Pin number where RST is connected  (-1 = disable)\n            cfg.pin_busy = ST7735_BUSY; // Pin number where BUSY is connected (-1 = disable)\n\n            // The following setting values ​​are general initial values ​​for each panel, so please comment out any\n            // unknown items and try them.\n\n            cfg.panel_width = TFT_WIDTH;   // actual displayable width\n            cfg.panel_height = TFT_HEIGHT; // actual displayable height\n            cfg.offset_x = TFT_OFFSET_X;   // Panel offset amount in X direction\n            cfg.offset_y = TFT_OFFSET_Y;   // Panel offset amount in Y direction\n            cfg.offset_rotation = 0;       // Rotation direction value offset 0~7 (4~7 is upside down)\n            cfg.dummy_read_pixel = 8;      // Number of bits for dummy read before pixel readout\n            cfg.dummy_read_bits = 1;       // Number of bits for dummy read before non-pixel data read\n            cfg.readable = true;           // Set to true if data can be read\n            cfg.invert = TFT_INVERT;       // Set to true if the light/darkness of the panel is reversed\n            cfg.rgb_order = false;         // Set to true if the panel's red and blue are swapped\n            cfg.dlen_16bit =\n                false;             // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI\n            cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.)\n\n            // Set the following only when the display is shifted with a driver with a variable number of pixels, such as the\n            // ST7735 or ILI9163.\n            cfg.memory_width = TFT_WIDTH;   // Maximum width supported by the driver IC\n            cfg.memory_height = TFT_HEIGHT; // Maximum height supported by the driver IC\n            _panel_instance.config(cfg);\n        }\n\n#ifdef TFT_BL\n        // Set the backlight control\n        {\n            auto cfg = _light_instance.config(); // Gets a structure for backlight settings.\n\n            cfg.pin_bl = TFT_BL; // Pin number to which the backlight is connected\n            cfg.invert = true;   // true to invert the brightness of the backlight\n            // cfg.freq = 44100;    // PWM frequency of backlight\n            // cfg.pwm_channel = 1; // PWM channel number to use\n\n            _light_instance.config(cfg);\n            _panel_instance.setLight(&_light_instance); // Set the backlight on the panel.\n        }\n#endif\n\n        setPanel(&_panel_instance);\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(RAK14014)\n#include <RAK14014_FT6336U.h>\n#include <TFT_eSPI.h>\nTFT_eSPI *tft = nullptr;\nFT6336U ft6336u;\n\nstatic uint8_t _rak14014_touch_int = false; // TP interrupt generation flag.\nstatic void rak14014_tpIntHandle(void)\n{\n    _rak14014_touch_int = true;\n}\n\n#elif defined(HACKADAY_COMMUNICATOR)\n#include <Arduino_GFX_Library.h>\nArduino_DataBus *bus = nullptr;\nArduino_GFX *tft = nullptr;\n\n#elif defined(ST72xx_DE)\n#include <LovyanGFX.hpp>\n#include <TCA9534.h>\n#include <lgfx/v1/platforms/esp32s3/Bus_RGB.hpp>\n#include <lgfx/v1/platforms/esp32s3/Panel_RGB.hpp>\nTCA9534 ioex;\n\nclass LGFX : public lgfx::LGFX_Device\n{\n    lgfx::Bus_RGB _bus_instance;\n    lgfx::Panel_RGB _panel_instance;\n    lgfx::Touch_GT911 _touch_instance;\n\n  public:\n    const uint16_t screenWidth = TFT_WIDTH;\n    const uint16_t screenHeight = TFT_HEIGHT;\n\n    bool init_impl(bool use_reset, bool use_clear) override\n    {\n        ioex.attach(Wire);\n        ioex.setDeviceAddress(0x18);\n        ioex.config(1, TCA9534::Config::OUT);\n        ioex.config(2, TCA9534::Config::OUT);\n        ioex.config(3, TCA9534::Config::OUT);\n        ioex.config(4, TCA9534::Config::OUT);\n\n        ioex.output(1, TCA9534::Level::H);\n        ioex.output(3, TCA9534::Level::L);\n        ioex.output(4, TCA9534::Level::H);\n\n        pinMode(1, OUTPUT);\n        digitalWrite(1, LOW);\n        ioex.output(2, TCA9534::Level::L);\n        delay(20);\n        ioex.output(2, TCA9534::Level::H);\n        delay(100);\n        pinMode(1, INPUT);\n\n        return LGFX_Device::init_impl(use_reset, use_clear);\n    }\n\n    LGFX(void)\n    {\n        {\n            auto cfg = _panel_instance.config();\n\n            cfg.memory_width = screenWidth;\n            cfg.memory_height = screenHeight;\n            cfg.panel_width = screenWidth;\n            cfg.panel_height = screenHeight;\n            cfg.offset_x = 0;\n            cfg.offset_y = 0;\n            cfg.offset_rotation = 0;\n            _panel_instance.config(cfg);\n        }\n\n        {\n            auto cfg = _panel_instance.config_detail();\n            cfg.use_psram = 0;\n            _panel_instance.config_detail(cfg);\n        }\n\n        {\n            auto cfg = _bus_instance.config();\n            cfg.panel = &_panel_instance;\n            cfg.pin_d0 = ST72xx_B0;  // B0\n            cfg.pin_d1 = ST72xx_B1;  // B1\n            cfg.pin_d2 = ST72xx_B2;  // B2\n            cfg.pin_d3 = ST72xx_B3;  // B3\n            cfg.pin_d4 = ST72xx_B4;  // B4\n            cfg.pin_d5 = ST72xx_G0;  // G0\n            cfg.pin_d6 = ST72xx_G1;  // G1\n            cfg.pin_d7 = ST72xx_G2;  // G2\n            cfg.pin_d8 = ST72xx_G3;  // G3\n            cfg.pin_d9 = ST72xx_G4;  // G4\n            cfg.pin_d10 = ST72xx_G5; // G5\n            cfg.pin_d11 = ST72xx_R0; // R0\n            cfg.pin_d12 = ST72xx_R1; // R1\n            cfg.pin_d13 = ST72xx_R2; // R2\n            cfg.pin_d14 = ST72xx_R3; // R3\n            cfg.pin_d15 = ST72xx_R4; // R4\n\n            cfg.pin_henable = ST72xx_DE;\n            cfg.pin_vsync = ST72xx_VSYNC;\n            cfg.pin_hsync = ST72xx_HSYNC;\n            cfg.pin_pclk = ST72xx_PCLK;\n            cfg.freq_write = 13000000;\n\n#ifdef ST7265_HSYNC_POLARITY\n            cfg.hsync_polarity = ST7265_HSYNC_POLARITY;\n            cfg.hsync_front_porch = ST7265_HSYNC_FRONT_PORCH; // 8;\n            cfg.hsync_pulse_width = ST7265_HSYNC_PULSE_WIDTH; // 4;\n            cfg.hsync_back_porch = ST7265_HSYNC_BACK_PORCH;   // 8;\n\n            cfg.vsync_polarity = ST7265_VSYNC_POLARITY;       // 0;\n            cfg.vsync_front_porch = ST7265_VSYNC_FRONT_PORCH; // 8;\n            cfg.vsync_pulse_width = ST7265_VSYNC_PULSE_WIDTH; // 4;\n            cfg.vsync_back_porch = ST7265_VSYNC_BACK_PORCH;   // 8;\n\n            cfg.pclk_idle_high = 1;\n            cfg.pclk_active_neg = ST7265_PCLK_ACTIVE_NEG; // 0;\n            // cfg.pclk_idle_high = 0;\n            // cfg.de_idle_high = 1;\n#endif\n\n#ifdef ST7262_HSYNC_POLARITY\n            cfg.hsync_polarity = ST7262_HSYNC_POLARITY;\n            cfg.hsync_front_porch = ST7262_HSYNC_FRONT_PORCH; // 8;\n            cfg.hsync_pulse_width = ST7262_HSYNC_PULSE_WIDTH; // 4;\n            cfg.hsync_back_porch = ST7262_HSYNC_BACK_PORCH;   // 8;\n\n            cfg.vsync_polarity = ST7262_VSYNC_POLARITY;       // 0;\n            cfg.vsync_front_porch = ST7262_VSYNC_FRONT_PORCH; // 8;\n            cfg.vsync_pulse_width = ST7262_VSYNC_PULSE_WIDTH; // 4;\n            cfg.vsync_back_porch = ST7262_VSYNC_BACK_PORCH;   // 8;\n\n            cfg.pclk_idle_high = 1;\n            cfg.pclk_active_neg = ST7262_PCLK_ACTIVE_NEG; // 0;\n            // cfg.pclk_idle_high = 0;\n            // cfg.de_idle_high = 1;\n#endif\n\n#ifdef SC7277_HSYNC_POLARITY\n            cfg.hsync_polarity = SC7277_HSYNC_POLARITY;\n            cfg.hsync_front_porch = SC7277_HSYNC_FRONT_PORCH; // 8;\n            cfg.hsync_pulse_width = SC7277_HSYNC_PULSE_WIDTH; // 4;\n            cfg.hsync_back_porch = SC7277_HSYNC_BACK_PORCH;   // 8;\n\n            cfg.vsync_polarity = SC7277_VSYNC_POLARITY;       // 0;\n            cfg.vsync_front_porch = SC7277_VSYNC_FRONT_PORCH; // 8;\n            cfg.vsync_pulse_width = SC7277_VSYNC_PULSE_WIDTH; // 4;\n            cfg.vsync_back_porch = SC7277_VSYNC_BACK_PORCH;   // 8;\n\n            cfg.pclk_idle_high = 1;\n            cfg.pclk_active_neg = SC7277_PCLK_ACTIVE_NEG; // 0;\n            // cfg.pclk_idle_high = 0;\n            // cfg.de_idle_high = 1;\n#endif\n\n            _bus_instance.config(cfg);\n        }\n        _panel_instance.setBus(&_bus_instance);\n\n        {\n            auto cfg = _touch_instance.config();\n            cfg.x_min = 0;\n            cfg.x_max = TFT_WIDTH;\n            cfg.y_min = 0;\n            cfg.y_max = TFT_HEIGHT;\n            cfg.pin_int = -1;\n            cfg.pin_rst = -1;\n            cfg.bus_shared = true;\n            cfg.offset_rotation = 0;\n\n            cfg.i2c_port = 0;\n            cfg.i2c_addr = 0x5D;\n            cfg.pin_sda = I2C_SDA;\n            cfg.pin_scl = I2C_SCL;\n            cfg.freq = 400000;\n            _touch_instance.config(cfg);\n            _panel_instance.setTouch(&_touch_instance);\n        }\n\n        setPanel(&_panel_instance);\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(ILI9488_CS)\n#include <LovyanGFX.hpp> // Graphics and font library for ILI9488 driver chip\n\nclass LGFX : public lgfx::LGFX_Device\n{\n    lgfx::Panel_ILI9488 _panel_instance;\n    lgfx::Bus_SPI _bus_instance;\n    lgfx::Light_PWM _light_instance;\n    lgfx::Touch_GT911 _touch_instance;\n\n  public:\n    LGFX(void)\n    {\n        {\n            auto cfg = _bus_instance.config();\n\n            // configure SPI\n            cfg.spi_host = ILI9488_SPI_HOST; // ESP32-S2,S3,C3 : SPI2_HOST or SPI3_HOST / ESP32 : VSPI_HOST or HSPI_HOST\n            cfg.spi_mode = 0;\n            cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing\n                                            // 80MHz by an integer)\n            cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving\n            cfg.spi_3wire = false;              // Set to true if reception is done on the MOSI pin\n            cfg.use_lock = true;                // Set to true to use transaction locking\n            cfg.dma_channel = SPI_DMA_CH_AUTO;  // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch /\n                                                // SPI_DMA_CH_AUTO=auto setting)\n            cfg.pin_sclk = ILI9488_SCK;         // Set SPI SCLK pin number\n            cfg.pin_mosi = ILI9488_SDA;         // Set SPI MOSI pin number\n            cfg.pin_miso = ILI9488_MISO;        // Set SPI MISO pin number (-1 = disable)\n            cfg.pin_dc = ILI9488_RS;            // Set SPI DC pin number (-1 = disable)\n\n            _bus_instance.config(cfg);              // applies the set value to the bus.\n            _panel_instance.setBus(&_bus_instance); // set the bus on the panel.\n        }\n\n        {                                        // Set the display panel control.\n            auto cfg = _panel_instance.config(); // Gets a structure for display panel settings.\n\n            cfg.pin_cs = ILI9488_CS; // Pin number where CS is connected (-1 = disable)\n            cfg.pin_rst = -1;        // Pin number where RST is connected  (-1 = disable)\n            cfg.pin_busy = -1;       // Pin number where BUSY is connected (-1 = disable)\n\n            // The following setting values ​​are general initial values ​​for each panel, so please comment out any\n            // unknown items and try them.\n\n            cfg.memory_width = TFT_WIDTH;                 // Maximum width supported by the driver IC\n            cfg.memory_height = TFT_HEIGHT;               // Maximum height supported by the driver IC\n            cfg.panel_width = TFT_WIDTH;                  // actual displayable width\n            cfg.panel_height = TFT_HEIGHT;                // actual displayable height\n            cfg.offset_x = TFT_OFFSET_X;                  // Panel offset amount in X direction\n            cfg.offset_y = TFT_OFFSET_Y;                  // Panel offset amount in Y direction\n            cfg.offset_rotation = TFT_OFFSET_ROTATION;    // Rotation direction value offset 0~7 (4~7 is mirrored)\n#ifdef TFT_DUMMY_READ_PIXELS\n            cfg.dummy_read_pixel = TFT_DUMMY_READ_PIXELS; // Number of bits for dummy read before pixel readout\n#else\n            cfg.dummy_read_pixel = 9; // Number of bits for dummy read before pixel readout\n#endif\n            cfg.dummy_read_bits = 1;                      // Number of bits for dummy read before non-pixel data read\n            cfg.readable = true;                          // Set to true if data can be read\n            cfg.invert = true;                            // Set to true if the light/darkness of the panel is reversed\n            cfg.rgb_order = false;                        // Set to true if the panel's red and blue are swapped\n            cfg.dlen_16bit =\n                false;             // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI\n            cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.)\n\n            // Set the following only when the display is shifted with a driver with a variable number of pixels, such as the\n            // ST7735 or ILI9163.\n            // cfg.memory_width = TFT_WIDTH;   // Maximum width supported by the driver IC\n            // cfg.memory_height = TFT_HEIGHT; // Maximum height supported by the driver IC\n            _panel_instance.config(cfg);\n        }\n\n#ifdef ILI9488_BL\n        // Set the backlight control\n        {\n            auto cfg = _light_instance.config(); // Gets a structure for backlight settings.\n\n            cfg.pin_bl = ILI9488_BL; // Pin number to which the backlight is connected\n            cfg.invert = false;      // true to invert the brightness of the backlight\n            // cfg.freq = 44100;    // PWM frequency of backlight\n            // cfg.pwm_channel = 1; // PWM channel number to use\n\n            _light_instance.config(cfg);\n            _panel_instance.setLight(&_light_instance); // Set the backlight on the panel.\n        }\n#endif\n\n#if HAS_TOUCHSCREEN\n        // Configure settings for touch screen control.\n        {\n            auto cfg = _touch_instance.config();\n\n            cfg.pin_cs = -1;\n            cfg.x_min = 0;\n            cfg.x_max = TFT_HEIGHT - 1;\n            cfg.y_min = 0;\n            cfg.y_max = TFT_WIDTH - 1;\n            cfg.pin_int = SCREEN_TOUCH_INT;\n#ifdef SCREEN_TOUCH_RST\n            cfg.pin_rst = SCREEN_TOUCH_RST;\n#endif\n            cfg.bus_shared = true;\n            cfg.offset_rotation = TFT_OFFSET_ROTATION;\n            // cfg.freq = 2500000;\n\n            // I2C\n            cfg.i2c_port = TOUCH_I2C_PORT;\n            cfg.i2c_addr = TOUCH_SLAVE_ADDRESS;\n#ifdef SCREEN_TOUCH_USE_I2C1\n            cfg.pin_sda = I2C_SDA1;\n            cfg.pin_scl = I2C_SCL1;\n#else\n            cfg.pin_sda = I2C_SDA;\n            cfg.pin_scl = I2C_SCL;\n#endif\n            // cfg.freq = 400000;\n\n            _touch_instance.config(cfg);\n            _panel_instance.setTouch(&_touch_instance);\n        }\n#endif\n\n        setPanel(&_panel_instance);\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(ST7789_CS)\n#include <LovyanGFX.hpp> // Graphics and font library for ST7735 driver chip\n#ifdef HELTEC_V4_TFT\n#include \"chsc6x.h\"\n#include \"lgfx/v1/Touch.hpp\"\nnamespace lgfx\n{\ninline namespace v1\n{\nclass TOUCH_CHSC6X : public ITouch\n{\n  public:\n    TOUCH_CHSC6X(void)\n    {\n        _cfg.i2c_addr = TOUCH_SLAVE_ADDRESS;\n        _cfg.x_min = 0;\n        _cfg.x_max = 240;\n        _cfg.y_min = 0;\n        _cfg.y_max = 320;\n    };\n\n    bool init(void) override\n    {\n        if (chsc6xTouch == nullptr) {\n            chsc6xTouch = new chsc6x(&Wire1, TOUCH_SDA_PIN, TOUCH_SCL_PIN, TOUCH_INT_PIN, TOUCH_RST_PIN);\n        }\n        chsc6xTouch->chsc6x_init();\n        return true;\n    };\n\n    uint_fast8_t getTouchRaw(touch_point_t *tp, uint_fast8_t count) override\n    {\n        uint16_t raw_x, raw_y;\n        if (chsc6xTouch->chsc6x_read_touch_info(&raw_x, &raw_y) == 0) {\n            tp[0].x = 320 - 1 - raw_y;\n            tp[0].y = 240 - 1 - raw_x;\n            tp[0].size = 1;\n            tp[0].id = 1;\n            return 1;\n        }\n        tp[0].size = 0;\n        return 0;\n    };\n\n    void wakeup(void) override{};\n    void sleep(void) override{};\n\n  private:\n    chsc6x *chsc6xTouch = nullptr;\n};\n} // namespace v1\n} // namespace lgfx\n#endif\nclass LGFX : public lgfx::LGFX_Device\n{\n    lgfx::Panel_ST7789 _panel_instance;\n    lgfx::Bus_SPI _bus_instance;\n    lgfx::Light_PWM _light_instance;\n#if HAS_TOUCHSCREEN\n#if defined(T_WATCH_S3) || defined(ELECROW)\n    lgfx::Touch_FT5x06 _touch_instance;\n#elif defined(HELTEC_V4_TFT)\n    lgfx::TOUCH_CHSC6X _touch_instance;\n#else\n    lgfx::Touch_GT911 _touch_instance;\n#endif\n#endif\n\n  public:\n    LGFX(void)\n    {\n        {\n            auto cfg = _bus_instance.config();\n\n            // SPI\n            cfg.spi_host = ST7789_SPI_HOST;\n            cfg.spi_mode = 0;\n            cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing\n                                            // 80MHz by an integer)\n            cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving\n            cfg.spi_3wire = false;\n            cfg.use_lock = true;               // Set to true to use transaction locking\n            cfg.dma_channel = SPI_DMA_CH_AUTO; // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch /\n                                               // SPI_DMA_CH_AUTO=auto setting)\n            cfg.pin_sclk = ST7789_SCK;         // Set SPI SCLK pin number\n            cfg.pin_mosi = ST7789_SDA;         // Set SPI MOSI pin number\n            cfg.pin_miso = ST7789_MISO;        // Set SPI MISO pin number (-1 = disable)\n            cfg.pin_dc = ST7789_RS;            // Set SPI DC pin number (-1 = disable)\n\n            _bus_instance.config(cfg);              // applies the set value to the bus.\n            _panel_instance.setBus(&_bus_instance); // set the bus on the panel.\n        }\n\n        {                                        // Set the display panel control.\n            auto cfg = _panel_instance.config(); // Gets a structure for display panel settings.\n\n            cfg.pin_cs = ST7789_CS;     // Pin number where CS is connected (-1 = disable)\n            cfg.pin_rst = ST7789_RESET; // Pin number where RST is connected  (-1 = disable)\n            cfg.pin_busy = ST7789_BUSY; // Pin number where BUSY is connected (-1 = disable)\n\n            // The following setting values ​​are general initial values ​​for each panel, so please comment out any\n            // unknown items and try them.\n#if defined(T_WATCH_S3)\n            cfg.panel_width = 240;\n            cfg.panel_height = 240;\n            cfg.memory_width = 240;\n            cfg.memory_height = 320;\n            cfg.offset_x = 0;\n            cfg.offset_y = 0;                             // No vertical shift needed — panel is top-aligned\n            cfg.offset_rotation = 2;                      // Rotate 180° to correct upside-down layout\n#else\n            cfg.memory_width = TFT_WIDTH;              // Maximum width supported by the driver IC\n            cfg.memory_height = TFT_HEIGHT;            // Maximum height supported by the driver IC\n            cfg.panel_width = TFT_WIDTH;               // actual displayable width\n            cfg.panel_height = TFT_HEIGHT;             // actual displayable height\n            cfg.offset_x = TFT_OFFSET_X;               // Panel offset amount in X direction\n            cfg.offset_y = TFT_OFFSET_Y;               // Panel offset amount in Y direction\n            cfg.offset_rotation = TFT_OFFSET_ROTATION; // Rotation direction value offset 0~7 (4~7 is mirrored)\n#endif\n#ifdef TFT_DUMMY_READ_PIXELS\n            cfg.dummy_read_pixel = TFT_DUMMY_READ_PIXELS; // Number of bits for dummy read before pixel readout\n#else\n            cfg.dummy_read_pixel = 9;                  // Number of bits for dummy read before pixel readout\n#endif\n            cfg.dummy_read_bits = 1;                      // Number of bits for dummy read before non-pixel data read\n            cfg.readable = true;                          // Set to true if data can be read\n            cfg.invert = true;                            // Set to true if the light/darkness of the panel is reversed\n            cfg.rgb_order = false;                        // Set to true if the panel's red and blue are swapped\n            cfg.dlen_16bit =\n                false;             // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI\n            cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.)\n\n            // Set the following only when the display is shifted with a driver with a variable number of pixels, such as the\n            // ST7735 or ILI9163.\n            // cfg.memory_width = TFT_WIDTH;   // Maximum width supported by the driver IC\n            // cfg.memory_height = TFT_HEIGHT; // Maximum height supported by the driver IC\n            _panel_instance.config(cfg);\n        }\n\n#ifdef ST7789_BL\n        // Set the backlight control. (delete if not necessary)\n        {\n            auto cfg = _light_instance.config(); // Gets a structure for backlight settings.\n\n            cfg.pin_bl = ST7789_BL; // Pin number to which the backlight is connected\n            cfg.invert = false;     // true to invert the brightness of the backlight\n            // cfg.pwm_channel = 0;\n\n            _light_instance.config(cfg);\n            _panel_instance.setLight(&_light_instance); // Set the backlight on the panel.\n        }\n#endif\n\n#if HAS_TOUCHSCREEN\n        // Configure settings for touch screen control.\n        {\n            auto cfg = _touch_instance.config();\n\n            cfg.pin_cs = -1;\n            cfg.x_min = 0;\n            cfg.x_max = TFT_HEIGHT - 1;\n            cfg.y_min = 0;\n            cfg.y_max = TFT_WIDTH - 1;\n            cfg.pin_int = SCREEN_TOUCH_INT;\n#ifdef SCREEN_TOUCH_RST\n            cfg.pin_rst = SCREEN_TOUCH_RST;\n#endif\n            cfg.bus_shared = true;\n            cfg.offset_rotation = TFT_OFFSET_ROTATION;\n            // cfg.freq = 2500000;\n\n            // I2C\n            cfg.i2c_port = TOUCH_I2C_PORT;\n            cfg.i2c_addr = TOUCH_SLAVE_ADDRESS;\n#ifdef SCREEN_TOUCH_USE_I2C1\n            cfg.pin_sda = I2C_SDA1;\n            cfg.pin_scl = I2C_SCL1;\n#else\n            cfg.pin_sda = I2C_SDA;\n            cfg.pin_scl = I2C_SCL;\n#endif\n            // cfg.freq = 400000;\n\n            _touch_instance.config(cfg);\n            _panel_instance.setTouch(&_touch_instance);\n        }\n#endif\n\n        setPanel(&_panel_instance); // Sets the panel to use.\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(ST7796_CS)\n#include <LovyanGFX.hpp> // Graphics and font library for ST7796 driver chip\n\nclass LGFX : public lgfx::LGFX_Device\n{\n    lgfx::Panel_ST7796 _panel_instance;\n    lgfx::Bus_SPI _bus_instance;\n    lgfx::Light_PWM _light_instance;\n\n  public:\n    LGFX(void)\n    {\n        {\n            auto cfg = _bus_instance.config();\n\n            // SPI\n            cfg.spi_host = ST7796_SPI_HOST;\n            cfg.spi_mode = 0;\n            cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing\n                                            // 80MHz by an integer)\n            cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving\n            cfg.spi_3wire = false;\n            cfg.use_lock = true;               // Set to true to use transaction locking\n            cfg.dma_channel = SPI_DMA_CH_AUTO; // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch /\n                                               // SPI_DMA_CH_AUTO=auto setting)\n            cfg.pin_sclk = ST7796_SCK;         // Set SPI SCLK pin number\n            cfg.pin_mosi = ST7796_SDA;         // Set SPI MOSI pin number\n            cfg.pin_miso = ST7796_MISO;        // Set SPI MISO pin number (-1 = disable)\n            cfg.pin_dc = ST7796_RS;            // Set SPI DC pin number (-1 = disable)\n\n            _bus_instance.config(cfg);              // applies the set value to the bus.\n            _panel_instance.setBus(&_bus_instance); // set the bus on the panel.\n        }\n\n        {                                        // Set the display panel control.\n            auto cfg = _panel_instance.config(); // Gets a structure for display panel settings.\n\n            cfg.pin_cs = ST7796_CS;     // Pin number where CS is connected (-1 = disable)\n            cfg.pin_rst = ST7796_RESET; // Pin number where RST is connected  (-1 = disable)\n            cfg.pin_busy = ST7796_BUSY; // Pin number where BUSY is connected (-1 = disable)\n\n            // cfg.memory_width = TFT_WIDTH;              // Maximum width supported by the driver IC\n            // cfg.memory_height = TFT_HEIGHT;            // Maximum height supported by the driver IC\n            cfg.panel_width = TFT_WIDTH;                  // actual displayable width\n            cfg.panel_height = TFT_HEIGHT;                // actual displayable height\n            cfg.offset_x = TFT_OFFSET_X;                  // Panel offset amount in X direction\n            cfg.offset_y = TFT_OFFSET_Y;                  // Panel offset amount in Y direction\n            cfg.offset_rotation = TFT_OFFSET_ROTATION;    // Rotation direction value offset 0~7 (4~7 is mirrored)\n#ifdef TFT_DUMMY_READ_PIXELS\n            cfg.dummy_read_pixel = TFT_DUMMY_READ_PIXELS; // Number of bits for dummy read before pixel readout\n#else\n            cfg.dummy_read_pixel = 8; // Number of bits for dummy read before pixel readout\n#endif\n            cfg.dummy_read_bits = 1;                      // Number of bits for dummy read before non-pixel data read\n            cfg.readable = true;                          // Set to true if data can be read\n            cfg.invert = true;                            // Set to true if the light/darkness of the panel is reversed\n            cfg.rgb_order = false;                        // Set to true if the panel's red and blue are swapped\n            cfg.dlen_16bit =\n                false;             // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI\n            cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.)\n\n            _panel_instance.config(cfg);\n        }\n\n#ifdef ST7796_BL\n        // Set the backlight control. (delete if not necessary)\n        {\n            auto cfg = _light_instance.config(); // Gets a structure for backlight settings.\n\n            cfg.pin_bl = ST7796_BL; // Pin number to which the backlight is connected\n            cfg.invert = false;     // true to invert the brightness of the backlight\n            cfg.freq = 44100;\n            cfg.pwm_channel = 7;\n\n            _light_instance.config(cfg);\n            _panel_instance.setLight(&_light_instance); // Set the backlight on the panel.\n        }\n#endif\n\n        setPanel(&_panel_instance); // Sets the panel to use.\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER)\n\n#include <LovyanGFX.hpp> // Graphics and font library for ILI9341/ILI9342 driver chip\n\n#if defined(ILI9341_BACKLIGHT_EN) && !defined(TFT_BL)\n#define TFT_BL ILI9341_BACKLIGHT_EN\n#endif\n\nclass LGFX : public lgfx::LGFX_Device\n{\n#if defined(ILI9341_DRIVER)\n    lgfx::Panel_ILI9341 _panel_instance;\n#elif defined(ILI9342_DRIVER)\n    lgfx::Panel_ILI9342 _panel_instance;\n#endif\n    lgfx::Bus_SPI _bus_instance;\n    lgfx::Light_PWM _light_instance;\n\n  public:\n    LGFX(void)\n    {\n        {\n            auto cfg = _bus_instance.config();\n\n            // configure SPI\n#if defined(ILI9341_DRIVER)\n            cfg.spi_host = ILI9341_SPI_HOST; // ESP32-S2,S3,C3 : SPI2_HOST or SPI3_HOST / ESP32 : VSPI_HOST or HSPI_HOST\n#elif defined(ILI9342_DRIVER)\n            cfg.spi_host = ILI9342_SPI_HOST; // ESP32-S2,S3,C3 : SPI2_HOST or SPI3_HOST / ESP32 : VSPI_HOST or HSPI_HOST\n#endif\n            cfg.spi_mode = 0;\n            cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing\n                                            // 80MHz by an integer)\n            cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving\n            cfg.spi_3wire = false;              // Set to true if reception is done on the MOSI pin\n            cfg.use_lock = true;                // Set to true to use transaction locking\n            cfg.dma_channel = SPI_DMA_CH_AUTO;  // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch /\n                                                // SPI_DMA_CH_AUTO=auto setting)\n            cfg.pin_sclk = TFT_SCLK;            // Set SPI SCLK pin number\n            cfg.pin_mosi = TFT_MOSI;            // Set SPI MOSI pin number\n            cfg.pin_miso = TFT_MISO;            // Set SPI MISO pin number (-1 = disable)\n            cfg.pin_dc = TFT_DC;                // Set SPI DC pin number (-1 = disable)\n\n            _bus_instance.config(cfg);              // applies the set value to the bus.\n            _panel_instance.setBus(&_bus_instance); // set the bus on the panel.\n        }\n\n        {                                        // Set the display panel control.\n            auto cfg = _panel_instance.config(); // Gets a structure for display panel settings.\n\n            cfg.pin_cs = TFT_CS;     // Pin number where CS is connected (-1 = disable)\n            cfg.pin_rst = TFT_RST;   // Pin number where RST is connected  (-1 = disable)\n            cfg.pin_busy = TFT_BUSY; // Pin number where BUSY is connected (-1 = disable)\n\n            // The following setting values ​​are general initial values ​​for each panel, so please comment out any\n            // unknown items and try them.\n\n            cfg.panel_width = TFT_WIDTH;   // actual displayable width\n            cfg.panel_height = TFT_HEIGHT; // actual displayable height\n            cfg.offset_x = TFT_OFFSET_X;   // Panel offset amount in X direction\n            cfg.offset_y = TFT_OFFSET_Y;   // Panel offset amount in Y direction\n            cfg.offset_rotation = 0;       // Rotation direction value offset 0~7 (4~7 is upside down)\n            cfg.dummy_read_pixel = 8;      // Number of bits for dummy read before pixel readout\n            cfg.dummy_read_bits = 1;       // Number of bits for dummy read before non-pixel data read\n            cfg.readable = true;           // Set to true if data can be read\n            cfg.invert = false;            // Set to true if the light/darkness of the panel is reversed\n            cfg.rgb_order = false;         // Set to true if the panel's red and blue are swapped\n            cfg.dlen_16bit =\n                false;             // Set to true for panels that transmit data length in 16-bit units with 16-bit parallel or SPI\n            cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.)\n\n            // Set the following only when the display is shifted with a driver with a variable number of pixels, such as the\n            // ST7735 or ILI9163.\n            cfg.memory_width = TFT_WIDTH;   // Maximum width supported by the driver IC\n            cfg.memory_height = TFT_HEIGHT; // Maximum height supported by the driver IC\n            _panel_instance.config(cfg);\n        }\n\n#ifdef TFT_BL\n        // Set the backlight control\n        {\n            auto cfg = _light_instance.config(); // Gets a structure for backlight settings.\n\n            cfg.pin_bl = TFT_BL; // Pin number to which the backlight is connected\n            cfg.invert = false;  // true to invert the brightness of the backlight\n            // cfg.freq = 44100;    // PWM frequency of backlight\n            // cfg.pwm_channel = 1; // PWM channel number to use\n\n            _light_instance.config(cfg);\n            _panel_instance.setLight(&_light_instance); // Set the backlight on the panel.\n        }\n#endif\n\n        setPanel(&_panel_instance);\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(ST7735_CS)\n#include <TFT_eSPI.h> // Graphics and font library for ILI9342 driver chip\n\nstatic TFT_eSPI *tft = nullptr; // Invoke library, pins defined in User_Setup.h\n#elif ARCH_PORTDUINO\n#include \"Panel_sdl.hpp\"\n#include <LovyanGFX.hpp> // Graphics and font library for ST7735 driver chip\n\nclass LGFX : public lgfx::LGFX_Device\n{\n    lgfx::Bus_SPI _bus_instance;\n\n    lgfx::ITouch *_touch_instance;\n\n  public:\n    lgfx::Panel_Device *_panel_instance;\n\n    LGFX(void)\n    {\n        if (portduino_config.displayPanel == st7789)\n            _panel_instance = new lgfx::Panel_ST7789;\n        else if (portduino_config.displayPanel == st7735)\n            _panel_instance = new lgfx::Panel_ST7735;\n        else if (portduino_config.displayPanel == st7735s)\n            _panel_instance = new lgfx::Panel_ST7735S;\n        else if (portduino_config.displayPanel == st7796)\n            _panel_instance = new lgfx::Panel_ST7796;\n        else if (portduino_config.displayPanel == ili9341)\n            _panel_instance = new lgfx::Panel_ILI9341;\n        else if (portduino_config.displayPanel == ili9342)\n            _panel_instance = new lgfx::Panel_ILI9342;\n        else if (portduino_config.displayPanel == ili9488)\n            _panel_instance = new lgfx::Panel_ILI9488;\n        else if (portduino_config.displayPanel == hx8357d)\n            _panel_instance = new lgfx::Panel_HX8357D;\n#if defined(SDL_h_)\n\n        else if (portduino_config.displayPanel == x11)\n            _panel_instance = new lgfx::Panel_sdl;\n#endif\n        else {\n            _panel_instance = new lgfx::Panel_NULL;\n            LOG_ERROR(\"Unknown display panel configured!\");\n        }\n\n        auto buscfg = _bus_instance.config();\n        buscfg.spi_mode = 0;\n        buscfg.spi_host = portduino_config.display_spi_dev_int;\n\n        buscfg.pin_dc = portduino_config.displayDC.pin; // Set SPI DC pin number (-1 = disable)\n\n        _bus_instance.config(buscfg); // applies the set value to the bus.\n        if (portduino_config.displayPanel != x11)\n            _panel_instance->setBus(&_bus_instance); // set the bus on the panel.\n\n        auto cfg = _panel_instance->config(); // Gets a structure for display panel settings.\n        LOG_DEBUG(\"Width: %d, Height: %d\", portduino_config.displayWidth, portduino_config.displayHeight);\n        cfg.pin_cs = portduino_config.displayCS.pin; // Pin number where CS is connected (-1 = disable)\n        cfg.pin_rst = portduino_config.displayReset.pin;\n        if (portduino_config.displayRotate) {\n            cfg.panel_width = portduino_config.displayHeight; // actual displayable width\n            cfg.panel_height = portduino_config.displayWidth; // actual displayable height\n        } else {\n            cfg.panel_width = portduino_config.displayWidth;   // actual displayable width\n            cfg.panel_height = portduino_config.displayHeight; // actual displayable height\n        }\n        cfg.offset_x = portduino_config.displayOffsetX;             // Panel offset amount in X direction\n        cfg.offset_y = portduino_config.displayOffsetY;             // Panel offset amount in Y direction\n        cfg.offset_rotation = portduino_config.displayOffsetRotate; // Rotation direction value offset 0~7 (4~7 is mirrored)\n        cfg.invert = portduino_config.displayInvert;                // Set to true if the light/darkness of the panel is reversed\n\n        _panel_instance->config(cfg);\n\n        // Configure settings for touch  control.\n        if (portduino_config.touchscreenModule) {\n            if (portduino_config.touchscreenModule == xpt2046) {\n                _touch_instance = new lgfx::Touch_XPT2046;\n            } else if (portduino_config.touchscreenModule == stmpe610) {\n                _touch_instance = new lgfx::Touch_STMPE610;\n            } else if (portduino_config.touchscreenModule == ft5x06) {\n                _touch_instance = new lgfx::Touch_FT5x06;\n            }\n            auto touch_cfg = _touch_instance->config();\n\n            touch_cfg.pin_cs = portduino_config.touchscreenCS.pin;\n            touch_cfg.x_min = 0;\n            touch_cfg.x_max = portduino_config.displayHeight - 1;\n            touch_cfg.y_min = 0;\n            touch_cfg.y_max = portduino_config.displayWidth - 1;\n            touch_cfg.pin_int = portduino_config.touchscreenIRQ.pin;\n            touch_cfg.bus_shared = true;\n            touch_cfg.offset_rotation = portduino_config.touchscreenRotate;\n            if (portduino_config.touchscreenI2CAddr != -1) {\n                touch_cfg.i2c_addr = portduino_config.touchscreenI2CAddr;\n            } else {\n                touch_cfg.spi_host = portduino_config.touchscreen_spi_dev_int;\n            }\n\n            _touch_instance->config(touch_cfg);\n            _panel_instance->setTouch(_touch_instance);\n        }\n#if defined(SDL_h_)\n        if (portduino_config.displayPanel == x11) {\n            lgfx::Panel_sdl *sdl_panel_ = (lgfx::Panel_sdl *)_panel_instance;\n            sdl_panel_->setup();\n            sdl_panel_->addKeyCodeMapping(SDLK_RETURN, SDL_SCANCODE_KP_ENTER);\n        }\n#endif\n        setPanel(_panel_instance); // Sets the panel to use.\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(HX8357_CS)\n#include <LovyanGFX.hpp> // Graphics and font library for HX8357 driver chip\n\nclass LGFX : public lgfx::LGFX_Device\n{\n    lgfx::Panel_HX8357D _panel_instance;\n    lgfx::Bus_SPI _bus_instance;\n#if defined(USE_XPT2046)\n    lgfx::Touch_XPT2046 _touch_instance;\n#endif\n\n  public:\n    LGFX(void)\n    {\n        // Panel_HX8357D\n        {\n            // configure SPI\n            auto cfg = _bus_instance.config();\n\n            cfg.spi_host = HX8357_SPI_HOST;\n            cfg.spi_mode = 0;\n            cfg.freq_write = SPI_FREQUENCY; // SPI clock for transmission (up to 80MHz, rounded to the value obtained by dividing\n                                            // 80MHz by an integer)\n            cfg.freq_read = SPI_READ_FREQUENCY; // SPI clock when receiving\n            cfg.spi_3wire = false;              // Set to true if reception is done on the MOSI pin\n            cfg.use_lock = true;                // Set to true to use transaction locking\n            cfg.dma_channel = SPI_DMA_CH_AUTO;  // SPI_DMA_CH_AUTO; // Set DMA channel to use (0=not use DMA / 1=1ch / 2=ch /\n                                                // SPI_DMA_CH_AUTO=auto setting)\n            cfg.pin_sclk = HX8357_SCK;          // Set SPI SCLK pin number\n            cfg.pin_mosi = HX8357_MOSI;         // Set SPI MOSI pin number\n            cfg.pin_miso = HX8357_MISO;         // Set SPI MISO pin number (-1 = disable)\n            cfg.pin_dc = HX8357_RS;             // Set SPI DC pin number (-1 = disable)\n\n            _bus_instance.config(cfg);              // applies the set value to the bus.\n            _panel_instance.setBus(&_bus_instance); // set the bus on the panel.\n        }\n        {\n            // Set the display panel control.\n            auto cfg = _panel_instance.config(); // Gets a structure for display panel settings.\n\n            cfg.pin_cs = HX8357_CS;     // Pin number where CS is connected (-1 = disable)\n            cfg.pin_rst = HX8357_RESET; // Pin number where RST is connected  (-1 = disable)\n            cfg.pin_busy = HX8357_BUSY; // Pin number where BUSY is connected (-1 = disable)\n\n            cfg.panel_width = TFT_WIDTH;               // actual displayable width\n            cfg.panel_height = TFT_HEIGHT;             // actual displayable height\n            cfg.offset_x = TFT_OFFSET_X;               // Panel offset amount in X direction\n            cfg.offset_y = TFT_OFFSET_Y;               // Panel offset amount in Y direction\n            cfg.offset_rotation = TFT_OFFSET_ROTATION; // Rotation direction value offset 0~7 (4~7 is upside down)\n            cfg.dummy_read_pixel = 8;                  // Number of bits for dummy read before pixel readout\n            cfg.dummy_read_bits = 1;                   // Number of bits for dummy read before non-pixel data read\n            cfg.readable = true;                       // Set to true if data can be read\n            cfg.invert = TFT_INVERT;                   // Set to true if the light/darkness of the panel is reversed\n            cfg.rgb_order = false;                     // Set to true if the panel's red and blue are swapped\n            cfg.dlen_16bit = false;\n            cfg.bus_shared = true; // If the bus is shared with the SD card, set to true (bus control with drawJpgFile etc.)\n\n            _panel_instance.config(cfg);\n        }\n#if defined(USE_XPT2046)\n        {\n            // Configure settings for touch control.\n            auto touch_cfg = _touch_instance.config();\n\n            touch_cfg.pin_cs = TOUCH_CS;\n            touch_cfg.x_min = 0;\n            touch_cfg.x_max = TFT_HEIGHT - 1;\n            touch_cfg.y_min = 0;\n            touch_cfg.y_max = TFT_WIDTH - 1;\n            touch_cfg.pin_int = -1;\n            touch_cfg.bus_shared = true;\n            touch_cfg.offset_rotation = 1;\n\n            _touch_instance.config(touch_cfg);\n            _panel_instance.setTouch(&_touch_instance);\n        }\n#endif\n        setPanel(&_panel_instance);\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#elif defined(ST7701_CS)\n#include <LovyanGFX.hpp> // Graphics and font library for ST7701 driver chip\n#include <lgfx/v1/platforms/esp32s3/Bus_RGB.hpp>\n#include <lgfx/v1/platforms/esp32s3/Panel_RGB.hpp>\n\nclass PanelInit_ST7701 : public lgfx::Panel_ST7701\n{\n  public:\n    const uint8_t *getInitCommands(uint8_t listno) const override\n    {\n        // 180 degree hw rotation: vertical flip, horizontal flip\n        static constexpr const uint8_t list1[] = {0x36, 1,   0x10,                         // MADCTL for vertical flip\n                                                  0xFF, 5,   0x77, 0x01, 0x00, 0x00, 0x10, // Command2 BK0 SEL\n                                                  0xC7, 1,   0x04, // SDIR: X-direction Control (Horizontal Flip)\n                                                  0xFF, 5,   0x77, 0x01, 0x00, 0x00, 0x00, // Command2 BK0 DIS\n                                                  0xFF, 0xFF};\n        switch (listno) {\n        case 1:\n            return list1;\n        default:\n            return lgfx::Panel_ST7701::getInitCommands(listno);\n        }\n    }\n};\n\nclass LGFX : public lgfx::LGFX_Device\n{\n    PanelInit_ST7701 _panel_instance;\n    lgfx::Bus_RGB _bus_instance;\n    lgfx::Light_PWM _light_instance;\n    lgfx::Touch_FT5x06 _touch_instance;\n\n  public:\n    LGFX(void)\n    {\n        {\n            auto cfg = _panel_instance.config();\n            cfg.memory_width = 800;\n            cfg.memory_height = 480;\n            cfg.panel_width = TFT_WIDTH;\n            cfg.panel_height = TFT_HEIGHT;\n            cfg.offset_x = TFT_OFFSET_X;\n            cfg.offset_y = TFT_OFFSET_Y;\n            _panel_instance.config(cfg);\n        }\n\n        {\n            auto cfg = _panel_instance.config_detail();\n            cfg.pin_cs = ST7701_CS;\n            cfg.pin_sclk = ST7701_SCK;\n            cfg.pin_mosi = ST7701_SDA;\n            // cfg.use_psram = 1;\n            _panel_instance.config_detail(cfg);\n        }\n\n        {\n            auto cfg = _bus_instance.config();\n            cfg.panel = &_panel_instance;\n#ifdef SENSECAP_INDICATOR\n            cfg.pin_d0 = GPIO_NUM_15; // B0\n            cfg.pin_d1 = GPIO_NUM_14; // B1\n            cfg.pin_d2 = GPIO_NUM_13; // B2\n            cfg.pin_d3 = GPIO_NUM_12; // B3\n            cfg.pin_d4 = GPIO_NUM_11; // B4\n\n            cfg.pin_d5 = GPIO_NUM_10; // G0\n            cfg.pin_d6 = GPIO_NUM_9;  // G1\n            cfg.pin_d7 = GPIO_NUM_8;  // G2\n            cfg.pin_d8 = GPIO_NUM_7;  // G3\n            cfg.pin_d9 = GPIO_NUM_6;  // G4\n            cfg.pin_d10 = GPIO_NUM_5; // G5\n\n            cfg.pin_d11 = GPIO_NUM_4; // R0\n            cfg.pin_d12 = GPIO_NUM_3; // R1\n            cfg.pin_d13 = GPIO_NUM_2; // R2\n            cfg.pin_d14 = GPIO_NUM_1; // R3\n            cfg.pin_d15 = GPIO_NUM_0; // R4\n\n            cfg.pin_henable = GPIO_NUM_18;\n            cfg.pin_vsync = GPIO_NUM_17;\n            cfg.pin_hsync = GPIO_NUM_16;\n            cfg.pin_pclk = GPIO_NUM_21;\n            cfg.freq_write = 12000000;\n\n            cfg.hsync_polarity = 0;\n            cfg.hsync_front_porch = 10;\n            cfg.hsync_pulse_width = 8;\n            cfg.hsync_back_porch = 50;\n\n            cfg.vsync_polarity = 0;\n            cfg.vsync_front_porch = 10;\n            cfg.vsync_pulse_width = 8;\n            cfg.vsync_back_porch = 20;\n\n            cfg.pclk_active_neg = 0;\n            cfg.de_idle_high = 1;\n            cfg.pclk_idle_high = 0;\n#endif\n            _bus_instance.config(cfg);\n        }\n        _panel_instance.setBus(&_bus_instance);\n\n        {\n            auto cfg = _light_instance.config();\n            cfg.pin_bl = ST7701_BL;\n            _light_instance.config(cfg);\n        }\n        _panel_instance.light(&_light_instance);\n\n        {\n            auto cfg = _touch_instance.config();\n            cfg.pin_cs = -1;\n            cfg.x_min = 0;\n            cfg.x_max = 479;\n            cfg.y_min = 0;\n            cfg.y_max = 479;\n            cfg.pin_int = -1; // don't use SCREEN_TOUCH_INT;\n            cfg.pin_rst = SCREEN_TOUCH_RST;\n            cfg.bus_shared = true;\n            cfg.offset_rotation = TFT_OFFSET_ROTATION;\n\n            cfg.i2c_port = TOUCH_I2C_PORT;\n            cfg.i2c_addr = TOUCH_SLAVE_ADDRESS;\n            cfg.pin_sda = I2C_SDA;\n            cfg.pin_scl = I2C_SCL;\n            cfg.freq = 400000;\n            _touch_instance.config(cfg);\n            _panel_instance.setTouch(&_touch_instance);\n        }\n\n        setPanel(&_panel_instance);\n    }\n};\n\nstatic LGFX *tft = nullptr;\n\n#endif\n\n#include \"SPILock.h\"\n#include \"TFTDisplay.h\"\n#include <SPI.h>\n\n#ifdef UNPHONE\n#include \"unPhone.h\"\nextern unPhone unphone;\n#endif\n\nGpioPin *TFTDisplay::backlightEnable = NULL;\n\nTFTDisplay::TFTDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY geometry, HW_I2C i2cBus)\n{\n    LOG_DEBUG(\"TFTDisplay!\");\n\n#ifdef TFT_BL\n    GpioPin *p = new GpioHwPin(TFT_BL);\n\n    if (!TFT_BACKLIGHT_ON) { // Need to invert the pin before hardware\n        auto virtPin = new GpioVirtPin();\n        new GpioNotTransformer(\n            virtPin, p); // We just leave this created object on the heap so it can stay watching virtPin and driving en_gpio\n        p = virtPin;\n    }\n#else\n    GpioPin *p = new GpioVirtPin(); // Just simulate a pin\n#endif\n    backlightEnable = p;\n\n#if ARCH_PORTDUINO\n    if (portduino_config.displayRotate) {\n        setGeometry(GEOMETRY_RAWMODE, portduino_config.displayWidth, portduino_config.displayWidth);\n    } else {\n        setGeometry(GEOMETRY_RAWMODE, portduino_config.displayHeight, portduino_config.displayHeight);\n    }\n\n#elif defined(SCREEN_ROTATE)\n    setGeometry(GEOMETRY_RAWMODE, TFT_HEIGHT, TFT_WIDTH);\n#else\n    setGeometry(GEOMETRY_RAWMODE, TFT_WIDTH, TFT_HEIGHT);\n#endif\n}\n\nTFTDisplay::~TFTDisplay()\n{\n    // Clean up allocated line pixel buffer to prevent memory leak\n    if (linePixelBuffer != nullptr) {\n        free(linePixelBuffer);\n        linePixelBuffer = nullptr;\n    }\n}\n\n// Write the buffer to the display memory\nvoid TFTDisplay::display(bool fromBlank)\n{\n    if (fromBlank)\n        tft->fillScreen(TFT_BLACK);\n\n    concurrency::LockGuard g(spiLock);\n\n    uint32_t x, y;\n    uint32_t y_byteIndex;\n    uint8_t y_byteMask;\n    uint32_t x_FirstPixelUpdate;\n    uint32_t x_LastPixelUpdate;\n    bool isset, dblbuf_isset;\n    uint16_t colorTftMesh, colorTftBlack;\n    bool somethingChanged = false;\n\n    // Store colors byte-reversed so that TFT_eSPI doesn't have to swap bytes in a separate step\n    colorTftMesh = __builtin_bswap16(TFT_MESH);\n    colorTftBlack = __builtin_bswap16(TFT_BLACK);\n\n    y = 0;\n    while (y < displayHeight) {\n        y_byteIndex = (y / 8) * displayWidth;\n        y_byteMask = (1 << (y & 7));\n\n        // Step 1: Do a quick scan of 8 rows together. This allows fast-forwarding over unchanged screen areas.\n        if (y_byteMask == 1) {\n            if (!fromBlank) {\n                for (x = 0; x < displayWidth; x++) {\n                    if (buffer[x + y_byteIndex] != buffer_back[x + y_byteIndex])\n                        break;\n                }\n            } else {\n                for (x = 0; x < displayWidth; x++) {\n                    if (buffer[x + y_byteIndex] != 0)\n                        break;\n                }\n            }\n            if (x >= displayWidth) {\n                // No changed pixels found in these 8 rows, fast-forward to the next 8\n                y = y + 8;\n                continue;\n            }\n        }\n\n        // Step 2: Scan each of the 8 rows individually. Find the first pixel in each row that needs updating\n        for (x_FirstPixelUpdate = 0; x_FirstPixelUpdate < displayWidth; x_FirstPixelUpdate++) {\n            isset = buffer[x_FirstPixelUpdate + y_byteIndex] & y_byteMask;\n\n            if (!fromBlank) {\n                // get src pixel in the page based ordering the OLED lib uses\n                dblbuf_isset = buffer_back[x_FirstPixelUpdate + y_byteIndex] & y_byteMask;\n                if (isset != dblbuf_isset) {\n                    break;\n                }\n            } else if (isset) {\n                break;\n            }\n        }\n\n        // Did we find a pixel that needs updating on this row?\n        if (x_FirstPixelUpdate < displayWidth) {\n\n            // Quickly write out the first changed pixel (saves another array lookup)\n            linePixelBuffer[x_FirstPixelUpdate] = isset ? colorTftMesh : colorTftBlack;\n            x_LastPixelUpdate = x_FirstPixelUpdate;\n\n            // Step 3: copy all remaining pixels in this row into the pixel line buffer,\n            // while also recording the last pixel in the row that needs updating\n            for (x = x_FirstPixelUpdate + 1; x < displayWidth; x++) {\n                isset = buffer[x + y_byteIndex] & y_byteMask;\n                linePixelBuffer[x] = isset ? colorTftMesh : colorTftBlack;\n\n                if (!fromBlank) {\n                    dblbuf_isset = buffer_back[x + y_byteIndex] & y_byteMask;\n                    if (isset != dblbuf_isset) {\n                        x_LastPixelUpdate = x;\n                    }\n                } else if (isset) {\n                    x_LastPixelUpdate = x;\n                }\n            }\n#if defined(HACKADAY_COMMUNICATOR)\n            tft->draw16bitBeRGBBitmap(x_FirstPixelUpdate, y, &linePixelBuffer[x_FirstPixelUpdate],\n                                      (x_LastPixelUpdate - x_FirstPixelUpdate + 1), 1);\n#else\n            // Step 4: Send the changed pixels on this line to the screen as a single block transfer.\n            // This function accepts pixel data MSB first so it can dump the memory straight out the SPI port.\n            tft->pushRect(x_FirstPixelUpdate, y, (x_LastPixelUpdate - x_FirstPixelUpdate + 1), 1,\n                          &linePixelBuffer[x_FirstPixelUpdate]);\n#endif\n            somethingChanged = true;\n        }\n        y++;\n    }\n    // Copy the Buffer to the Back Buffer\n    if (somethingChanged)\n        memcpy(buffer_back, buffer, displayBufferSize);\n}\n\nvoid TFTDisplay::sdlLoop()\n{\n#if defined(SDL_h_)\n    static int lastPressed = 0;\n    static int shuttingDown = false;\n    if (portduino_config.displayPanel == x11) {\n        lgfx::Panel_sdl *sdl_panel_ = (lgfx::Panel_sdl *)tft->_panel_instance;\n        if (sdl_panel_->loop() && !shuttingDown) {\n            LOG_WARN(\"Window Closed!\");\n            InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_SHUTDOWN, .kbchar = 0, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        }\n        // debounce\n        if (lastPressed != 0 && !sdl_panel_->gpio_in(lastPressed))\n            return;\n        if (!sdl_panel_->gpio_in(37)) {\n            lastPressed = 37;\n            InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_RIGHT, .kbchar = 0, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        } else if (!sdl_panel_->gpio_in(36)) {\n            lastPressed = 36;\n            InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_UP, .kbchar = 0, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        } else if (!sdl_panel_->gpio_in(38)) {\n            lastPressed = 38;\n            InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_DOWN, .kbchar = 0, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        } else if (!sdl_panel_->gpio_in(39)) {\n            lastPressed = 39;\n            InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_LEFT, .kbchar = 0, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        } else if (!sdl_panel_->gpio_in(SDL_SCANCODE_KP_ENTER)) {\n            lastPressed = SDL_SCANCODE_KP_ENTER;\n            InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_SELECT, .kbchar = 0, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        } else {\n            lastPressed = 0;\n        }\n    }\n#endif\n}\n\n// Send a command to the display (low level function)\nvoid TFTDisplay::sendCommand(uint8_t com)\n{\n    // handle display on/off directly\n    switch (com) {\n    case DISPLAYON: {\n        // LOG_DEBUG(\"Display on\");\n        backlightEnable->set(true);\n#if ARCH_PORTDUINO\n        display(true);\n        if (portduino_config.displayBacklight.pin > 0)\n            digitalWrite(portduino_config.displayBacklight.pin, TFT_BACKLIGHT_ON);\n#elif defined(HACKADAY_COMMUNICATOR)\n        tft->displayOn();\n#elif !defined(RAK14014) && !defined(M5STACK) && !defined(UNPHONE)\n        tft->wakeup();\n        tft->powerSaveOff();\n#endif\n\n#ifdef VTFT_CTRL\n        digitalWrite(VTFT_CTRL, LOW);\n#endif\n#ifdef UNPHONE\n        unphone.backlight(true); // using unPhone library\n#endif\n#ifdef RAK14014\n#elif !defined(M5STACK) && !defined(ST7789_CS) &&                                                                                \\\n    !defined(HACKADAY_COMMUNICATOR) // T-Deck gets brightness set in Screen.cpp in the handleSetOn function\n        tft->setBrightness(172);\n#endif\n        break;\n    }\n    case DISPLAYOFF: {\n        // LOG_DEBUG(\"Display off\");\n        backlightEnable->set(false);\n#if ARCH_PORTDUINO\n        tft->clear();\n        if (portduino_config.displayBacklight.pin > 0)\n            digitalWrite(portduino_config.displayBacklight.pin, !TFT_BACKLIGHT_ON);\n#elif defined(HACKADAY_COMMUNICATOR)\n        tft->displayOff();\n#elif !defined(RAK14014) && !defined(M5STACK) && !defined(UNPHONE)\n        tft->sleep();\n        tft->powerSaveOn();\n#endif\n\n#ifdef VTFT_CTRL\n        digitalWrite(VTFT_CTRL, HIGH);\n#endif\n#ifdef UNPHONE\n        unphone.backlight(false); // using unPhone library\n#endif\n#ifdef RAK14014\n#elif !defined(M5STACK) && !defined(HACKADAY_COMMUNICATOR)\n        tft->setBrightness(0);\n#endif\n        break;\n    }\n    default:\n        break;\n    }\n\n    // Drop all other commands to device (we just update the buffer)\n}\n\nvoid TFTDisplay::setDisplayBrightness(uint8_t _brightness)\n{\n#ifdef RAK14014\n    // todo\n#elif !defined(HACKADAY_COMMUNICATOR)\n    tft->setBrightness(_brightness);\n    LOG_DEBUG(\"Brightness is set to value: %i \", _brightness);\n#endif\n}\n\nvoid TFTDisplay::flipScreenVertically()\n{\n#if defined(T_WATCH_S3)\n    LOG_DEBUG(\"Flip TFT vertically\"); // T-Watch S3 right-handed orientation\n    tft->setRotation(0);\n#endif\n}\n\nbool TFTDisplay::hasTouch(void)\n{\n#ifdef RAK14014\n    return true;\n#elif !defined(M5STACK) && !defined(HACKADAY_COMMUNICATOR)\n    return tft->touch() != nullptr;\n#else\n    return false;\n#endif\n}\n\nbool TFTDisplay::getTouch(int16_t *x, int16_t *y)\n{\n#ifdef RAK14014\n    if (_rak14014_touch_int) {\n        _rak14014_touch_int = false;\n        /* The X and Y axes have to be switched */\n        *y = ft6336u.read_touch1_x();\n        *x = TFT_HEIGHT - ft6336u.read_touch1_y();\n        return true;\n    } else {\n        return false;\n    }\n#elif !defined(M5STACK) && !defined(HACKADAY_COMMUNICATOR)\n    return tft->getTouch(x, y);\n#else\n    return false;\n#endif\n}\n\nvoid TFTDisplay::setDetected(uint8_t detected)\n{\n    (void)detected;\n}\n\n// Connect to the display\nbool TFTDisplay::connect()\n{\n    concurrency::LockGuard g(spiLock);\n    LOG_INFO(\"Do TFT init\");\n#ifdef RAK14014\n    tft = new TFT_eSPI;\n#elif defined(HACKADAY_COMMUNICATOR)\n    bus = new Arduino_ESP32SPI(TFT_DC, TFT_CS, 38 /* SCK */, 21 /* MOSI */, GFX_NOT_DEFINED /* MISO */, HSPI /* spi_num */);\n    tft = new Arduino_NV3007(bus, 40, 0 /* rotation */, false /* IPS */, 142 /* width */, 428 /* height */, 12 /* col offset 1 */,\n                             0 /* row offset 1 */, 14 /* col offset 2 */, 0 /* row offset 2 */, nv3007_279_init_operations,\n                             sizeof(nv3007_279_init_operations));\n\n#else\n    tft = new LGFX;\n#endif\n\n    backlightEnable->set(true);\n    LOG_INFO(\"Power to TFT Backlight\");\n\n#ifdef UNPHONE\n    unphone.backlight(true); // using unPhone library\n#endif\n#ifdef HACKADAY_COMMUNICATOR\n    bool beginStatus = tft->begin();\n    if (beginStatus)\n        LOG_DEBUG(\"TFT Success!\");\n    else\n        LOG_ERROR(\"TFT Fail!\");\n#else\n    tft->init();\n#endif\n\n#if defined(M5STACK)\n    tft->setRotation(0);\n#elif defined(RAK14014)\n    tft->setRotation(1);\n    tft->setSwapBytes(true);\n    //    tft->fillScreen(TFT_BLACK);\n    ft6336u.begin();\n    pinMode(SCREEN_TOUCH_INT, INPUT_PULLUP);\n    attachInterrupt(digitalPinToInterrupt(SCREEN_TOUCH_INT), rak14014_tpIntHandle, FALLING);\n#elif defined(T_DECK) || defined(PICOMPUTER_S3) || defined(CHATTER_2)\n    tft->setRotation(1); // T-Deck has the TFT in landscape\n#elif defined(T_WATCH_S3)\n    tft->setRotation(2); // T-Watch S3 left-handed orientation\n#elif ARCH_PORTDUINO || defined(SENSECAP_INDICATOR) || defined(T_LORA_PAGER)\n    tft->setRotation(0); // use config.yaml to set rotation\n#else\n    tft->setRotation(3); // Orient horizontal and wide underneath the silkscreen name label\n#endif\n    tft->fillScreen(TFT_BLACK);\n\n    if (this->linePixelBuffer == NULL) {\n        this->linePixelBuffer = (uint16_t *)malloc(sizeof(uint16_t) * displayWidth);\n\n        if (!this->linePixelBuffer) {\n            LOG_ERROR(\"Not enough memory to create TFT line buffer\\n\");\n            return false;\n        }\n    }\n    return true;\n}\n\n#endif // USE_TFTDISPLAY\n"
  },
  {
    "path": "src/graphics/TFTDisplay.h",
    "content": "#pragma once\n\n#include <GpioLogic.h>\n#include <OLEDDisplay.h>\n\n/**\n * An adapter class that allows using the LovyanGFX library as if it was an OLEDDisplay implementation.\n *\n * Remaining TODO:\n * optimize display() to only draw changed pixels (see other OLED subclasses for examples)\n * Use the fast NRF52 SPI API rather than the slow standard arduino version\n *\n * turn radio back on - currently with both on spi bus is fucked? or are we leaving chip select asserted?\n */\nclass TFTDisplay : public OLEDDisplay\n{\n  public:\n    /* constructor\n    FIXME - the parameters are not used, just a temporary hack to keep working like the old displays\n    */\n    TFTDisplay(uint8_t, int, int, OLEDDISPLAY_GEOMETRY, HW_I2C);\n\n    // Destructor to clean up allocated memory\n    ~TFTDisplay();\n\n    // Write the buffer to the display memory\n    virtual void display() override { display(false); };\n    virtual void display(bool fromBlank);\n    void sdlLoop();\n\n    // Turn the display upside down\n    virtual void flipScreenVertically();\n\n    // Touch screen (static handlers)\n    static bool hasTouch(void);\n    static bool getTouch(int16_t *x, int16_t *y);\n\n    // Functions for changing display brightness\n    void setDisplayBrightness(uint8_t);\n\n    /**\n     * shim to make the abstraction happy\n     *\n     */\n    void setDetected(uint8_t detected);\n\n    /**\n     * This is normally managed entirely by TFTDisplay, but some rare applications (heltec tracker) might need to replace the\n     * default GPIO behavior with something a bit more complex.\n     *\n     * We (cruftily) make it static so that variant.cpp can access it without needing a ptr to the TFTDisplay instance.\n     */\n    static GpioPin *backlightEnable;\n\n  protected:\n    // the header size of the buffer used, e.g. for the SPI command header\n    virtual int getBufferOffset(void) override { return 0; }\n\n    // Send a command to the display (low level function)\n    virtual void sendCommand(uint8_t com) override;\n\n    // Connect to the display\n    virtual bool connect() override;\n\n    uint16_t *linePixelBuffer = nullptr;\n};"
  },
  {
    "path": "src/graphics/TimeFormatters.cpp",
    "content": "#include \"TimeFormatters.h\"\n#include \"configuration.h\"\n#include \"gps/RTC.h\"\n#include \"mesh/NodeDB.h\"\n#include <cstring>\n\nbool deltaToTimestamp(uint32_t secondsAgo, uint8_t *hours, uint8_t *minutes, int32_t *daysAgo)\n{\n    // Cache the result - avoid frequent recalculation\n    static uint8_t hoursCached = 0, minutesCached = 0;\n    static uint32_t daysAgoCached = 0;\n    static uint32_t secondsAgoCached = 0;\n    static bool validCached = false;\n\n    // Abort: if timezone not set\n    if (strlen(config.device.tzdef) == 0) {\n        validCached = false;\n        return validCached;\n    }\n\n    // Abort: if invalid pointers passed\n    if (hours == nullptr || minutes == nullptr || daysAgo == nullptr) {\n        validCached = false;\n        return validCached;\n    }\n\n    // Abort: if time seems invalid.. (> 6 months ago, probably seen before RTC set)\n    if (secondsAgo > SEC_PER_DAY * 30UL * 6) {\n        validCached = false;\n        return validCached;\n    }\n\n    // If repeated request, don't bother recalculating\n    if (secondsAgo - secondsAgoCached < 60 && secondsAgoCached != 0) {\n        if (validCached) {\n            *hours = hoursCached;\n            *minutes = minutesCached;\n            *daysAgo = daysAgoCached;\n        }\n        return validCached;\n    }\n\n    // Get local time\n    uint32_t secondsRTC = getValidTime(RTCQuality::RTCQualityDevice, true); // Get local time\n\n    // Abort: if RTC not set\n    if (!secondsRTC) {\n        validCached = false;\n        return validCached;\n    }\n\n    // Get absolute time when last seen\n    uint32_t secondsSeenAt = secondsRTC - secondsAgo;\n\n    // Calculate daysAgo\n    *daysAgo = (secondsRTC / SEC_PER_DAY) - (secondsSeenAt / SEC_PER_DAY); // How many \"midnights\" have passed\n\n    // Get seconds since midnight\n    uint32_t hms = (secondsRTC - secondsAgo) % SEC_PER_DAY;\n    hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;\n\n    // Tear apart hms into hours and minutes\n    *hours = hms / SEC_PER_HOUR;\n    *minutes = (hms % SEC_PER_HOUR) / SEC_PER_MIN;\n\n    // Cache the result\n    daysAgoCached = *daysAgo;\n    hoursCached = *hours;\n    minutesCached = *minutes;\n    secondsAgoCached = secondsAgo;\n\n    validCached = true;\n    return validCached;\n}\n\nvoid getTimeAgoStr(uint32_t agoSecs, char *timeStr, uint8_t maxLength)\n{\n    // Use an absolute timestamp in some cases.\n    // Particularly useful with E-Ink displays. Static UI, fewer refreshes.\n    uint8_t timestampHours, timestampMinutes;\n    int32_t daysAgo;\n    bool useTimestamp = deltaToTimestamp(agoSecs, &timestampHours, &timestampMinutes, &daysAgo);\n\n    if (agoSecs < 120) // last 2 mins?\n        snprintf(timeStr, maxLength, \"%u seconds ago\", agoSecs);\n    // -- if suitable for timestamp --\n    else if (useTimestamp && agoSecs < 15 * SECONDS_IN_MINUTE) // Last 15 minutes\n        snprintf(timeStr, maxLength, \"%u minutes ago\", agoSecs / SECONDS_IN_MINUTE);\n    else if (useTimestamp && daysAgo == 0) // Today\n        snprintf(timeStr, maxLength, \"Last seen: %02u:%02u\", (unsigned int)timestampHours, (unsigned int)timestampMinutes);\n    else if (useTimestamp && daysAgo == 1) // Yesterday\n        snprintf(timeStr, maxLength, \"Seen yesterday\");\n    else if (useTimestamp && daysAgo > 1) // Last six months (capped by deltaToTimestamp method)\n        snprintf(timeStr, maxLength, \"%li days ago\", (long)daysAgo);\n    // -- if using time delta instead --\n    else if (agoSecs < 120 * 60) // last 2 hrs\n        snprintf(timeStr, maxLength, \"%u minutes ago\", agoSecs / 60);\n    // Only show hours ago if it's been less than 6 months. Otherwise, we may have bad data.\n    else if ((agoSecs / 60 / 60) < (730 * 6))\n        snprintf(timeStr, maxLength, \"%u hours ago\", agoSecs / 60 / 60);\n    else\n        snprintf(timeStr, maxLength, \"unknown age\");\n}\n\nvoid getUptimeStr(uint32_t uptimeMillis, const char *prefix, char *uptimeStr, uint8_t maxLength, bool includeSecs)\n{\n    uint32_t days = uptimeMillis / 86400000;\n    uint32_t hours = (uptimeMillis % 86400000) / 3600000;\n    uint32_t mins = (uptimeMillis % 3600000) / 60000;\n    uint32_t secs = (uptimeMillis % 60000) / 1000;\n\n    if (days) {\n        snprintf(uptimeStr, maxLength, \"%s%ud %uh\", prefix, days, hours);\n    } else if (hours) {\n        snprintf(uptimeStr, maxLength, \"%s%uh %um\", prefix, hours, mins);\n    } else if (!includeSecs) {\n        snprintf(uptimeStr, maxLength, \"%s%um\", prefix, mins);\n    } else if (mins) {\n        snprintf(uptimeStr, maxLength, \"%s%um %us\", prefix, mins, secs);\n    } else {\n        snprintf(uptimeStr, maxLength, \"%s%us\", prefix, secs);\n    }\n}"
  },
  {
    "path": "src/graphics/TimeFormatters.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#include \"gps/RTC.h\"\n#include <airtime.h>\n#include <cstdint>\n\n/**\n * Convert a delta in seconds ago to timestamp information (hours, minutes, days ago).\n *\n * @param secondsAgo Number of seconds ago to convert\n * @param hours Pointer to store the hours (0-23)\n * @param minutes Pointer to store the minutes (0-59)\n * @param daysAgo Pointer to store the number of days ago\n * @return true if conversion was successful, false if invalid input or time not available\n */\nbool deltaToTimestamp(uint32_t secondsAgo, uint8_t *hours, uint8_t *minutes, int32_t *daysAgo);\n\n/**\n * Get a human-readable string representing the time ago in a format like \"2 days, 3 hours, 15 minutes\".\n *\n * @param agoSecs Number of seconds ago to convert\n * @param timeStr Pointer to store the resulting string\n * @param maxLength Maximum length of the resulting string buffer\n */\nvoid getTimeAgoStr(uint32_t agoSecs, char *timeStr, uint8_t maxLength);\n\n/**\n * Get a compact human-readable string that only shows the largest non-zero time components.\n * For example, 0 days 1 hour 2 minutes will display as \"1h 2m\" but 1 day 2 hours 3 minutes\n * will display as \"1d 2h\".\n */\nvoid getUptimeStr(uint32_t uptimeMillis, const char *prefix, char *uptimeStr, uint8_t maxLength, bool includeSecs = false);\n"
  },
  {
    "path": "src/graphics/VirtualKeyboard.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"VirtualKeyboard.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"main.h\"\n#include <Arduino.h>\n#include <vector>\n\nnamespace graphics\n{\n\nVirtualKeyboard::VirtualKeyboard() : cursorRow(0), cursorCol(0), lastActivityTime(millis())\n{\n    initializeKeyboard();\n    // Set cursor to H(2, 5)\n    cursorRow = 2;\n    cursorCol = 5;\n}\n\nVirtualKeyboard::~VirtualKeyboard() {}\n\nvoid VirtualKeyboard::initializeKeyboard()\n{\n    // New 4 row, 11 column keyboard layout:\n    static const char LAYOUT[KEYBOARD_ROWS][KEYBOARD_COLS] = {{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\\b'},\n                                                              {'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '\\n'},\n                                                              {'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', ' '},\n                                                              {'z', 'x', 'c', 'v', 'b', 'n', 'm', '.', ',', '?', '\\x1b'}};\n\n    // Derive layout dimensions and assert they match the configured keyboard grid\n    constexpr int LAYOUT_ROWS = (int)(sizeof(LAYOUT) / sizeof(LAYOUT[0]));\n    constexpr int LAYOUT_COLS = (int)(sizeof(LAYOUT[0]) / sizeof(LAYOUT[0][0]));\n    static_assert(LAYOUT_ROWS == KEYBOARD_ROWS, \"LAYOUT rows must equal KEYBOARD_ROWS\");\n    static_assert(LAYOUT_COLS == KEYBOARD_COLS, \"LAYOUT cols must equal KEYBOARD_COLS\");\n\n    // Initialize all keys to empty first\n    for (int row = 0; row < LAYOUT_ROWS; row++) {\n        for (int col = 0; col < LAYOUT_COLS; col++) {\n            keyboard[row][col] = {0, VK_CHAR, 0, 0, 0, 0};\n        }\n    }\n\n    // Fill keyboard from the 2D layout\n    for (int row = 0; row < LAYOUT_ROWS; row++) {\n        for (int col = 0; col < LAYOUT_COLS; col++) {\n            char ch = LAYOUT[row][col];\n            // No empty slots in the simplified layout\n\n            VirtualKeyType type = VK_CHAR;\n            if (ch == '\\b') {\n                type = VK_BACKSPACE;\n            } else if (ch == '\\n') {\n                type = VK_ENTER;\n            } else if (ch == '\\x1b') { // ESC\n                type = VK_ESC;\n            } else if (ch == ' ') {\n                type = VK_SPACE;\n            }\n\n            // Make action keys wider to fit text while keeping the last column aligned\n            uint8_t width = (type == VK_BACKSPACE || type == VK_ENTER || type == VK_SPACE) ? (KEY_WIDTH * 3) : KEY_WIDTH;\n            keyboard[row][col] = {ch, type, (uint8_t)(col * KEY_WIDTH), (uint8_t)(row * KEY_HEIGHT), width, KEY_HEIGHT};\n        }\n    }\n}\n\nvoid VirtualKeyboard::draw(OLEDDisplay *display, int16_t offsetX, int16_t offsetY)\n{\n    // Repeat ticking is driven by NotificationRenderer once per frame\n    // Base styles\n    display->setColor(WHITE);\n    display->setFont(FONT_SMALL);\n\n    // Screen geometry\n    const int screenW = display->getWidth();\n    const int screenH = display->getHeight();\n\n    // Decide wide-screen mode: if there is comfortable width, allow taller keys and reserve fixed width for last column labels\n    // Heuristic: if screen width >= 200px (e.g., 240x135), treat as wide\n    const bool isWide = screenW >= 200;\n\n    // Determine last-column label max width\n    display->setFont(FONT_SMALL);\n    const int wENTER = display->getStringWidth(\"ENTER\");\n    int lastColLabelW = wENTER; // ENTER is usually the widest\n    // Smaller padding on very small screens to avoid excessive whitespace\n    const int lastColPad = (screenW <= 128 ? 2 : 6);\n    const int reservedLastColW = lastColLabelW + lastColPad; // reserved width for last column keys\n\n    // Always reserve width for the rightmost text column to avoid overlap on small screens\n    int cellW = 0;\n    int leftoverW = 0;\n    {\n        const int leftCols = KEYBOARD_COLS - 1; // 10 input characters\n        int usableW = screenW - reservedLastColW;\n        if (usableW < leftCols) {\n            // Guard: ensure at least 1px per left cell if labels are extremely wide (unlikely)\n            usableW = leftCols;\n        }\n        cellW = usableW / leftCols;\n        leftoverW = usableW - cellW * leftCols; // distribute extra pixels over left columns (left to right)\n    }\n\n    // Dynamic key geometry\n    int cellH = KEY_HEIGHT;\n    int keyboardStartY = 0;\n    if (screenH <= 64) {\n        const int headerHeight = headerText.empty() ? 0 : (FONT_HEIGHT_SMALL - 2);\n        const int gapBelowHeader = 0;\n        const int singleLineBoxHeight = FONT_HEIGHT_SMALL;\n        const int gapAboveKeyboard = 0;\n        keyboardStartY = offsetY + headerHeight + gapBelowHeader + singleLineBoxHeight + gapAboveKeyboard;\n        if (keyboardStartY < 0)\n            keyboardStartY = 0;\n        if (keyboardStartY > screenH)\n            keyboardStartY = screenH;\n        int keyboardHeight = screenH - keyboardStartY;\n        cellH = std::max(1, keyboardHeight / KEYBOARD_ROWS);\n    } else if (isWide) {\n        // For wide screens (e.g., T114 240x135), prefer square keys: height equals left-column key width.\n        cellH = std::max((int)KEY_HEIGHT, cellW);\n\n        // Guarantee at least 2 lines of input are visible by reducing cell height minimally if needed.\n        // Replicate the spacing used in drawInputArea(): headerGap=1, box-to-header gap=1, gap above keyboard=1\n        display->setFont(FONT_SMALL);\n        const int headerHeight = headerText.empty() ? 0 : (FONT_HEIGHT_SMALL + 1);\n        const int headerToBoxGap = 1;\n        const int gapAboveKb = 1;\n        const int minBoxHeightForTwoLines = 2 * FONT_HEIGHT_SMALL + 2; // inner 1px top/bottom\n        int maxKeyboardHeight = screenH - (offsetY + headerHeight + headerToBoxGap + minBoxHeightForTwoLines + gapAboveKb);\n        int maxCellHAllowed = maxKeyboardHeight / KEYBOARD_ROWS;\n        if (maxCellHAllowed < (int)KEY_HEIGHT)\n            maxCellHAllowed = KEY_HEIGHT;\n        if (maxCellHAllowed > 0 && cellH > maxCellHAllowed) {\n            cellH = maxCellHAllowed;\n        }\n        // Keyboard placement from bottom for wide screens\n        int keyboardHeight = KEYBOARD_ROWS * cellH;\n        keyboardStartY = screenH - keyboardHeight;\n        if (keyboardStartY < 0)\n            keyboardStartY = 0;\n    } else {\n        // Default (non-wide, non-64px) behavior: use key height heuristic and place at bottom\n        cellH = KEY_HEIGHT;\n        int keyboardHeight = KEYBOARD_ROWS * cellH;\n        keyboardStartY = screenH - keyboardHeight;\n        if (keyboardStartY < 0)\n            keyboardStartY = 0;\n    }\n\n    // Draw input area above keyboard\n    drawInputArea(display, offsetX, offsetY, keyboardStartY);\n\n    // Precompute per-column x and width with leftover distributed over left columns for even spacing\n    int colX[KEYBOARD_COLS];\n    int colW[KEYBOARD_COLS];\n    int runningX = offsetX;\n    for (int col = 0; col < KEYBOARD_COLS - 1; ++col) {\n        int wcol = cellW + (col < leftoverW ? 1 : 0);\n        colX[col] = runningX;\n        colW[col] = wcol;\n        runningX += wcol;\n    }\n    // Last column\n    colX[KEYBOARD_COLS - 1] = runningX;\n    colW[KEYBOARD_COLS - 1] = reservedLastColW;\n\n    // Draw keyboard grid\n    for (int row = 0; row < KEYBOARD_ROWS; row++) {\n        for (int col = 0; col < KEYBOARD_COLS; col++) {\n            const VirtualKey &k = keyboard[row][col];\n            if (k.character != 0 || k.type != VK_CHAR) {\n                const bool isLastCol = (col == KEYBOARD_COLS - 1);\n                int x = colX[col];\n                int w = colW[col];\n                int y = offsetY + keyboardStartY + row * cellH;\n                int h = cellH;\n                bool selected = (row == cursorRow && col == cursorCol);\n                drawKey(display, k, selected, x, y, (uint8_t)w, (uint8_t)h, isLastCol);\n            }\n        }\n    }\n}\n\nvoid VirtualKeyboard::drawInputArea(OLEDDisplay *display, int16_t offsetX, int16_t offsetY, int16_t keyboardStartY)\n{\n    display->setColor(WHITE);\n\n    const int screenWidth = display->getWidth();\n    const int screenHeight = display->getHeight();\n    // Use the standard small font metrics for input box sizing (restore original size)\n    const int inputLineH = FONT_HEIGHT_SMALL;\n\n    // Header uses the standard small (which may be larger on big screens)\n    display->setFont(FONT_SMALL);\n    int headerHeight = 0;\n    if (!headerText.empty()) {\n        // Draw header and reserve exact font height (plus a tighter gap) to maximize input area\n        display->drawString(offsetX + 2, offsetY, headerText.c_str());\n        if (screenHeight <= 64) {\n            headerHeight = FONT_HEIGHT_SMALL - 2; // 11px\n        } else {\n            headerHeight = FONT_HEIGHT_SMALL; // no extra padding baked in\n        }\n    }\n\n    const int boxX = offsetX;\n    const int boxWidth = screenWidth;\n    int boxY;\n    int boxHeight;\n    if (screenHeight <= 64) {\n        const int gapBelowHeader = 0;\n        const int fixedBoxHeight = inputLineH;\n        const int gapAboveKeyboard = 0;\n        boxY = offsetY + headerHeight + gapBelowHeader;\n        boxHeight = fixedBoxHeight;\n        if (boxY + boxHeight + gapAboveKeyboard > keyboardStartY) {\n            int over = boxY + boxHeight + gapAboveKeyboard - keyboardStartY;\n            boxHeight = std::max(1, fixedBoxHeight - over);\n        }\n    } else {\n        const int gapBelowHeader = 1;\n        int gapAboveKeyboard = 1;\n        int tmpBoxY = offsetY + headerHeight + gapBelowHeader;\n        const int minBoxHeight = inputLineH + 2;\n        int availableH = keyboardStartY - tmpBoxY - gapAboveKeyboard;\n        if (availableH < minBoxHeight)\n            availableH = minBoxHeight;\n        boxY = tmpBoxY;\n        boxHeight = availableH;\n    }\n\n    // Draw box border\n    display->drawRect(boxX, boxY, boxWidth, boxHeight);\n\n    display->setFont(FONT_SMALL);\n\n    // Text rendering: multi-line if space allows (>= 2 lines), else single-line with leading ellipsis\n    const int textX = boxX + 2;\n    const int maxTextWidth = boxWidth - 4;\n    const int maxLines = (boxHeight - 2) / inputLineH;\n    if (maxLines >= 2) {\n        // Inner bounds for caret clamping\n        const int innerLeft = boxX + 1;\n        const int innerRight = boxX + boxWidth - 2;\n        const int innerTop = boxY + 1;\n        const int innerBottom = boxY + boxHeight - 2;\n\n        // Wrap text greedily into lines that fit maxTextWidth\n        std::vector<std::string> lines;\n        {\n            std::string remaining = inputText;\n            while (!remaining.empty()) {\n                int bestLen = 0;\n                for (int len = 1; len <= (int)remaining.size(); ++len) {\n                    int w = display->getStringWidth(remaining.substr(0, len).c_str());\n                    if (w <= maxTextWidth)\n                        bestLen = len;\n                    else\n                        break;\n                }\n                if (bestLen == 0) {\n                    // At least show one character to make progress\n                    bestLen = 1;\n                }\n                lines.emplace_back(remaining.substr(0, bestLen));\n                remaining.erase(0, bestLen);\n            }\n        }\n\n        const bool scrolledUp = ((int)lines.size() > maxLines);\n        int caretX = textX;\n        int caretY = innerTop;\n\n        // Leave a small top gap to render '...' without replacing the first line\n        const int topInset = 2;\n        const int lineStep = std::max(1, inputLineH - 1); // slightly tighter than font height\n        int lineY = innerTop + topInset;\n\n        if (scrolledUp) {\n            // Draw three small dots centered horizontally, vertically at the midpoint of the gap\n            // between the inner top and the first line's top baseline. This avoids using a tall glyph.\n            const int firstLineTop = lineY;                                   // baseline top for the first visible line\n            const int gapMidY = innerTop + (firstLineTop - innerTop) / 2 + 1; // shift down 1px as requested\n            const int centerX = boxX + boxWidth / 2;\n            const int dotSpacing = 3; // px between dots\n            const int dotSize = 1;    // small square dot\n            display->fillRect(centerX - dotSpacing, gapMidY, dotSize, dotSize);\n            display->fillRect(centerX, gapMidY, dotSize, dotSize);\n            display->fillRect(centerX + dotSpacing, gapMidY, dotSize, dotSize);\n        }\n\n        // How many lines fit with our top inset and tighter step\n        const int linesCapacity = std::max(1, (innerBottom - lineY + 1) / lineStep);\n        const int linesToShow = std::min((int)lines.size(), linesCapacity);\n        const int startIndex = scrolledUp ? ((int)lines.size() - linesToShow) : 0;\n\n        for (int i = 0; i < linesToShow; ++i) {\n            const std::string &chunk = lines[startIndex + i];\n            display->drawString(textX, lineY, chunk.c_str());\n            caretX = textX + display->getStringWidth(chunk.c_str());\n            caretY = lineY;\n            lineY += lineStep;\n        }\n\n        // Draw caret at end of the last visible line\n        int caretPadY = 2;\n        if (boxHeight >= inputLineH + 4)\n            caretPadY = 3;\n        int cursorTop = caretY + caretPadY;\n        // Use lineStep so caret height matches the row spacing\n        int cursorH = lineStep - caretPadY * 2;\n        if (cursorH < 1)\n            cursorH = 1;\n        // Clamp vertical bounds to stay inside the inner rect\n        if (cursorTop < innerTop)\n            cursorTop = innerTop;\n        if (cursorTop + cursorH - 1 > innerBottom)\n            cursorH = innerBottom - cursorTop + 1;\n        if (cursorH < 1)\n            cursorH = 1;\n        // Only draw if cursor is inside inner bounds\n        if (caretX >= innerLeft && caretX <= innerRight) {\n            display->drawVerticalLine(caretX, cursorTop, cursorH);\n        }\n    } else {\n        std::string displayText = inputText;\n        int textW = display->getStringWidth(displayText.c_str());\n        std::string scrolled = displayText;\n        if (textW > maxTextWidth) {\n            // Trim from the left until it fits\n            while (textW > maxTextWidth && !scrolled.empty()) {\n                scrolled.erase(0, 1);\n                textW = display->getStringWidth(scrolled.c_str());\n            }\n            // Add leading ellipsis and ensure it still fits\n            if (scrolled != displayText) {\n                scrolled = \"...\" + scrolled;\n                textW = display->getStringWidth(scrolled.c_str());\n                // If adding ellipsis causes overflow, trim more after the ellipsis\n                while (textW > maxTextWidth && scrolled.size() > 3) {\n                    scrolled.erase(3, 1); // remove chars after the ellipsis\n                    textW = display->getStringWidth(scrolled.c_str());\n                }\n            }\n        } else {\n            // Keep textW in sync with what we draw\n            textW = display->getStringWidth(scrolled.c_str());\n        }\n\n        int textY;\n        if (screenHeight <= 64) {\n            textY = boxY + (boxHeight - inputLineH) / 2;\n        } else {\n            const int innerTop = boxY + 1;\n            const int innerBottom = boxY + boxHeight - 2;\n\n            // Center text vertically within inner box for single-line, then clamp so it never overlaps borders\n            int innerH = innerBottom - innerTop + 1;\n            textY = innerTop + std::max(0, (innerH - inputLineH) / 2);\n            // Clamp fully inside the inner rect\n            if (textY < innerTop)\n                textY = innerTop;\n            int maxTop = innerBottom - inputLineH + 1;\n            if (textY > maxTop)\n                textY = maxTop;\n        }\n\n        if (!scrolled.empty()) {\n            display->drawString(textX, textY, scrolled.c_str());\n        }\n\n        int cursorX = textX + textW;\n        if (screenHeight > 64) {\n            const int innerRight = boxX + boxWidth - 2;\n            if (cursorX > innerRight)\n                cursorX = innerRight;\n        }\n\n        int cursorTop, cursorH;\n        if (screenHeight <= 64) {\n            cursorH = 10;\n            cursorTop = boxY + (boxHeight - cursorH) / 2;\n        } else {\n            const int innerLeft = boxX + 1;\n            const int innerRight = boxX + boxWidth - 2;\n            const int innerTop = boxY + 1;\n            const int innerBottom = boxY + boxHeight - 2;\n\n            cursorTop = boxY + 2;\n            cursorH = boxHeight - 4;\n            if (cursorH < 1)\n                cursorH = 1;\n            if (cursorTop < innerTop)\n                cursorTop = innerTop;\n            if (cursorTop + cursorH - 1 > innerBottom)\n                cursorH = innerBottom - cursorTop + 1;\n            if (cursorH < 1)\n                cursorH = 1;\n\n            if (cursorX < innerLeft || cursorX > innerRight)\n                return;\n        }\n\n        display->drawVerticalLine(cursorX, cursorTop, cursorH);\n    }\n}\n\nvoid VirtualKeyboard::drawKey(OLEDDisplay *display, const VirtualKey &key, bool selected, int16_t x, int16_t y, uint8_t width,\n                              uint8_t height, bool isLastCol)\n{\n    // Draw key content\n    display->setFont(FONT_SMALL);\n    const int fontH = FONT_HEIGHT_SMALL;\n    // Build label and metrics first\n    std::string keyText;\n    if (key.type == VK_BACKSPACE || key.type == VK_ENTER || key.type == VK_SPACE || key.type == VK_ESC) {\n        // Keep literal text labels for the action keys on the rightmost column\n        keyText = (key.type == VK_BACKSPACE) ? \"BACK\"\n                  : (key.type == VK_ENTER)   ? \"ENTER\"\n                  : (key.type == VK_SPACE)   ? \"SPACE\"\n                  : (key.type == VK_ESC)     ? \"ESC\"\n                                             : \"\";\n    } else {\n        char c = getCharForKey(key, false);\n        if (c >= 'a' && c <= 'z') {\n            c = c - 'a' + 'A';\n        }\n        keyText = (key.character == ' ' || key.character == '_') ? \"_\" : std::string(1, c);\n        // Show the common \"/\" pairing next to \"?\" like on a real keyboard\n        if (key.type == VK_CHAR && key.character == '?') {\n            keyText = \"?/\";\n        }\n    }\n\n    int textWidth = display->getStringWidth(keyText.c_str());\n    // Label alignment\n    // - Rightmost action column: right-align text with a small right padding (~2px) so it hugs screen edge neatly.\n    // - Other keys: center horizontally; use ceil-style rounding to avoid appearing left-biased on odd widths.\n    int textX;\n    if (isLastCol) {\n        const int rightPad = 1;\n        textX = x + width - textWidth - rightPad;\n        if (textX < x)\n            textX = x; // guard\n    } else {\n        if (display->getHeight() <= 64 && (key.character >= '0' && key.character <= '9')) {\n            textX = x + (width - textWidth + 1) / 2;\n        } else {\n            textX = x + (width - textWidth) / 2;\n        }\n    }\n    int contentTop = y;\n    int contentH = height;\n    if (selected) {\n        display->setColor(WHITE);\n        bool isAction = (key.type == VK_BACKSPACE || key.type == VK_ENTER || key.type == VK_SPACE || key.type == VK_ESC);\n\n        if (display->getHeight() <= 64 && !isAction) {\n            display->fillRect(x, y, width, height);\n        } else if (isAction) {\n            const int padX = 1;\n            const int padY = 2;\n            int hlW = textWidth + padX * 2;\n            int hlX = textX - padX;\n\n            if (hlX < x) {\n                hlW -= (x - hlX);\n                hlX = x;\n            }\n            int maxW = (x + width) - hlX;\n            if (hlW > maxW)\n                hlW = maxW;\n            if (hlW < 1)\n                hlW = 1;\n\n            int hlH = std::min(fontH + padY * 2, (int)height);\n            int hlY = y + (height - hlH) / 2;\n            display->fillRect(hlX, hlY, hlW, hlH);\n            contentTop = hlY;\n            contentH = hlH;\n        } else {\n            display->fillRect(x, y, width, height);\n        }\n        display->setColor(BLACK);\n    } else {\n        display->setColor(WHITE);\n    }\n\n    int centeredTextY;\n    if (display->getHeight() <= 64) {\n        centeredTextY = y + (height - fontH) / 2;\n    } else {\n        centeredTextY = contentTop + (contentH - fontH) / 2;\n    }\n    if (display->getHeight() > 64) {\n        if (centeredTextY < contentTop)\n            centeredTextY = contentTop;\n        if (centeredTextY + fontH > contentTop + contentH)\n            centeredTextY = std::max(contentTop, contentTop + contentH - fontH);\n    }\n\n    if (display->getHeight() <= 64 && keyText.size() == 1) {\n        char ch = keyText[0];\n        if (ch == '.' || ch == ',' || ch == ';') {\n            centeredTextY -= 1;\n        }\n    }\n#ifdef MUZI_BASE // Correct issue with character vertical position on MUZI_BASE\n    centeredTextY -= 2;\n#endif\n    display->drawString(textX, centeredTextY, keyText.c_str());\n}\n\nchar VirtualKeyboard::getCharForKey(const VirtualKey &key, bool isLongPress)\n{\n    if (key.type != VK_CHAR) {\n        return key.character;\n    }\n\n    char c = key.character;\n\n    // Long-press: letters become uppercase; for \"?\" provide \"/\" like a typical keyboard\n    if (isLongPress) {\n        if (c >= 'a' && c <= 'z') {\n            c = (char)(c - 'a' + 'A');\n        } else if (c == '?') {\n            c = '/';\n        }\n    }\n\n    return c;\n}\n\nvoid VirtualKeyboard::moveCursorDelta(int dRow, int dCol)\n{\n    resetTimeout();\n    // wrap around rows and cols in the 4x11 grid\n    int r = (int)cursorRow + dRow;\n    int c = (int)cursorCol + dCol;\n    if (r < 0)\n        r = KEYBOARD_ROWS - 1;\n    else if (r >= KEYBOARD_ROWS)\n        r = 0;\n    if (c < 0)\n        c = KEYBOARD_COLS - 1;\n    else if (c >= KEYBOARD_COLS)\n        c = 0;\n    cursorRow = (uint8_t)r;\n    cursorCol = (uint8_t)c;\n}\n\nvoid VirtualKeyboard::moveCursorUp()\n{\n    moveCursorDelta(-1, 0);\n}\nvoid VirtualKeyboard::moveCursorDown()\n{\n    moveCursorDelta(1, 0);\n}\nvoid VirtualKeyboard::moveCursorLeft()\n{\n    resetTimeout();\n\n    if (cursorCol > 0) {\n        cursorCol--;\n    } else {\n        if (cursorRow > 0) {\n            cursorRow--;\n            cursorCol = KEYBOARD_COLS - 1;\n        } else {\n            cursorRow = KEYBOARD_ROWS - 1;\n            cursorCol = KEYBOARD_COLS - 1;\n        }\n    }\n}\nvoid VirtualKeyboard::moveCursorRight()\n{\n    resetTimeout();\n\n    if (cursorCol < KEYBOARD_COLS - 1) {\n        cursorCol++;\n    } else {\n        if (cursorRow < KEYBOARD_ROWS - 1) {\n            cursorRow++;\n            cursorCol = 0;\n        } else {\n            cursorRow = 0;\n            cursorCol = 0;\n        }\n    }\n}\n\nvoid VirtualKeyboard::handlePress()\n{\n    resetTimeout(); // Reset timeout on any input activity\n\n    const VirtualKey &key = keyboard[cursorRow][cursorCol];\n\n    // Don't handle press if the key is empty (but allow special keys)\n    if (key.character == 0 && key.type == VK_CHAR) {\n        return;\n    }\n\n    // For character keys, insert lowercase character\n    if (key.type == VK_CHAR) {\n        insertCharacter(getCharForKey(key, false)); // false = lowercase/normal char\n        return;\n    }\n\n    // Handle non-character keys immediately\n    switch (key.type) {\n    case VK_BACKSPACE:\n        deleteCharacter();\n        break;\n    case VK_ENTER:\n        submitText();\n        break;\n    case VK_SPACE:\n        insertCharacter(' ');\n        break;\n    case VK_ESC:\n        if (onTextEntered) {\n            std::function<void(const std::string &)> callback = onTextEntered;\n            onTextEntered = nullptr;\n            inputText = \"\";\n            callback(\"\");\n        }\n        return;\n    default:\n        break;\n    }\n}\n\nvoid VirtualKeyboard::handleLongPress()\n{\n    resetTimeout(); // Reset timeout on any input activity\n\n    const VirtualKey &key = keyboard[cursorRow][cursorCol];\n\n    // Don't handle press if the key is empty (but allow special keys)\n    if (key.character == 0 && key.type == VK_CHAR) {\n        return;\n    }\n\n    // For character keys, insert uppercase/alternate character\n    if (key.type == VK_CHAR) {\n        insertCharacter(getCharForKey(key, true)); // true = uppercase/alternate char\n        return;\n    }\n\n    switch (key.type) {\n    case VK_BACKSPACE:\n        // One-shot: delete up to 5 characters on long press\n        for (int i = 0; i < 5; ++i) {\n            if (inputText.empty())\n                break;\n            deleteCharacter();\n        }\n        break;\n    case VK_ENTER:\n        submitText();\n        break;\n    case VK_SPACE:\n        insertCharacter(' ');\n        break;\n    case VK_ESC:\n        if (onTextEntered) {\n            onTextEntered(\"\");\n        }\n        break;\n    default:\n        break;\n    }\n}\n\nvoid VirtualKeyboard::insertCharacter(char c)\n{\n    if (inputText.length() < 160) { // Reasonable text length limit\n        inputText += c;\n    }\n}\n\nvoid VirtualKeyboard::deleteCharacter()\n{\n    if (!inputText.empty()) {\n        inputText.pop_back();\n    }\n}\n\nvoid VirtualKeyboard::submitText()\n{\n    LOG_INFO(\"Virtual keyboard: submitting text '%s'\", inputText.c_str());\n\n    // Only submit if text is not empty\n    if (!inputText.empty() && onTextEntered) {\n        // Store callback and text to submit before clearing callback\n        std::function<void(const std::string &)> callback = onTextEntered;\n        std::string textToSubmit = inputText;\n        onTextEntered = nullptr;\n        // Don't clear inputText here - let the calling module handle cleanup\n        // inputText = \"\";  // Removed: keep text visible until module cleans up\n        callback(textToSubmit);\n    } else if (inputText.empty()) {\n        // For empty text, just ignore the submission - don't clear callback\n        // This keeps the virtual keyboard responsive for further input\n        LOG_INFO(\"Virtual keyboard: empty text submitted, ignoring - keyboard remains active\");\n    } else {\n        // No callback available\n        if (screen) {\n            screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n        }\n    }\n}\n\nvoid VirtualKeyboard::setInputText(const std::string &text)\n{\n    inputText = text;\n}\n\nstd::string VirtualKeyboard::getInputText() const\n{\n    return inputText;\n}\n\nvoid VirtualKeyboard::setHeader(const std::string &header)\n{\n    headerText = header;\n}\n\nvoid VirtualKeyboard::setCallback(std::function<void(const std::string &)> callback)\n{\n    onTextEntered = callback;\n}\n\nvoid VirtualKeyboard::resetTimeout()\n{\n    lastActivityTime = millis();\n}\n\nbool VirtualKeyboard::isTimedOut() const\n{\n    return (millis() - lastActivityTime) > TIMEOUT_MS;\n}\n\n} // namespace graphics\n#endif"
  },
  {
    "path": "src/graphics/VirtualKeyboard.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#include <OLEDDisplay.h>\n#include <functional>\n#include <string>\n\nnamespace graphics\n{\n\nenum VirtualKeyType { VK_CHAR, VK_BACKSPACE, VK_ENTER, VK_SHIFT, VK_ESC, VK_SPACE };\n\nstruct VirtualKey {\n    char character;\n    VirtualKeyType type;\n    uint8_t x;\n    uint8_t y;\n    uint8_t width;\n    uint8_t height;\n};\n\nclass VirtualKeyboard\n{\n  public:\n    VirtualKeyboard();\n    ~VirtualKeyboard();\n\n    void draw(OLEDDisplay *display, int16_t offsetX, int16_t offsetY);\n    void setInputText(const std::string &text);\n    std::string getInputText() const;\n    void setHeader(const std::string &header);\n    void setCallback(std::function<void(const std::string &)> callback);\n\n    // Navigation methods for encoder input\n    void moveCursorUp();\n    void moveCursorDown();\n    void moveCursorLeft();\n    void moveCursorRight();\n    void handlePress();\n    void handleLongPress();\n\n    // Timeout management\n    void resetTimeout();\n    bool isTimedOut() const;\n\n  private:\n    static const uint8_t KEYBOARD_ROWS = 4;\n    static const uint8_t KEYBOARD_COLS = 11;\n    static const uint8_t KEY_WIDTH = 9;\n    static const uint8_t KEY_HEIGHT = 9;        // Compressed to fit 4 rows on 64px displays\n    static const uint8_t KEYBOARD_START_Y = 26; // Start just below input box bottom\n\n    VirtualKey keyboard[KEYBOARD_ROWS][KEYBOARD_COLS];\n\n    std::string inputText;\n    std::string headerText;\n    std::function<void(const std::string &)> onTextEntered;\n\n    uint8_t cursorRow;\n    uint8_t cursorCol;\n\n    // Timeout management for auto-exit\n    uint32_t lastActivityTime;\n    static const uint32_t TIMEOUT_MS = 60000; // 1 minute timeout\n\n    void initializeKeyboard();\n    void drawKey(OLEDDisplay *display, const VirtualKey &key, bool selected, int16_t x, int16_t y, uint8_t w, uint8_t h,\n                 bool isLastCol);\n    void drawInputArea(OLEDDisplay *display, int16_t offsetX, int16_t offsetY, int16_t keyboardStartY);\n\n    // Unified cursor movement helper\n    void moveCursorDelta(int dRow, int dCol);\n\n    char getCharForKey(const VirtualKey &key, bool isLongPress = false);\n    void insertCharacter(char c);\n    void deleteCharacter();\n    void submitText();\n};\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/draw/ClockRenderer.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"ClockRenderer.h\"\n#include \"gps/RTC.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/draw/UIRenderer.h\"\n#include \"graphics/images.h\"\n#include \"main.h\"\n\n#if !MESHTASTIC_EXCLUDE_BLUETOOTH\n#include \"nimble/NimbleBluetooth.h\"\n#endif\n\nnamespace graphics\n{\n\nnamespace ClockRenderer\n{\n\n// Segment bitmaps for numerals 0-9 stored in flash to save RAM.\n// Each row is a digit, each column is a segment state (1 = on, 0 = off).\n// Segment layout reference:\n//\n//             ___1___\n//           6 |     | 2\n//             |_7___|\n//           5 |     | 3\n//             |___4_|\n//\n// Segment order: [1, 2, 3, 4, 5, 6, 7]\n//\nstatic const uint8_t PROGMEM digitSegments[10][7] = {\n    {1, 1, 1, 1, 1, 1, 0}, // 0\n    {0, 1, 1, 0, 0, 0, 0}, // 1\n    {1, 1, 0, 1, 1, 0, 1}, // 2\n    {1, 1, 1, 1, 0, 0, 1}, // 3\n    {0, 1, 1, 0, 0, 1, 1}, // 4\n    {1, 0, 1, 1, 0, 1, 1}, // 5\n    {1, 0, 1, 1, 1, 1, 1}, // 6\n    {1, 1, 1, 0, 0, 1, 0}, // 7\n    {1, 1, 1, 1, 1, 1, 1}, // 8\n    {1, 1, 1, 1, 0, 1, 1}  // 9\n};\n\nvoid drawSegmentedDisplayColon(OLEDDisplay *display, int x, int y, float scale)\n{\n    uint16_t segmentWidth = SEGMENT_WIDTH * scale;\n    uint16_t segmentHeight = SEGMENT_HEIGHT * scale;\n\n    uint16_t cellHeight = (segmentWidth * 2) + (segmentHeight * 3) + 8;\n\n    uint16_t topAndBottomX = x + static_cast<uint16_t>(4 * scale);\n\n    uint16_t quarterCellHeight = cellHeight / 4;\n\n    uint16_t topY = y + quarterCellHeight;\n    uint16_t bottomY = y + (quarterCellHeight * 3);\n\n    display->fillRect(topAndBottomX, topY, segmentHeight, segmentHeight);\n    display->fillRect(topAndBottomX, bottomY, segmentHeight, segmentHeight);\n}\n\nvoid drawSegmentedDisplayCharacter(OLEDDisplay *display, int x, int y, uint8_t number, float scale)\n{\n    // Read 7-segment pattern for the digit from flash\n    uint8_t seg[7];\n    for (uint8_t i = 0; i < 7; i++) {\n        seg[i] = pgm_read_byte(&digitSegments[number][i]);\n    }\n\n    uint16_t segmentWidth = SEGMENT_WIDTH * scale;\n    uint16_t segmentHeight = SEGMENT_HEIGHT * scale;\n\n    // Precompute segment positions\n    uint16_t segmentOneX = x + segmentHeight + 2;\n    uint16_t segmentOneY = y;\n\n    uint16_t segmentTwoX = segmentOneX + segmentWidth + 2;\n    uint16_t segmentTwoY = segmentOneY + segmentHeight + 2;\n\n    uint16_t segmentThreeX = segmentTwoX;\n    uint16_t segmentThreeY = segmentTwoY + segmentWidth + 2 + segmentHeight + 2;\n\n    uint16_t segmentFourX = segmentOneX;\n    uint16_t segmentFourY = segmentThreeY + segmentWidth + 2;\n\n    uint16_t segmentFiveX = x;\n    uint16_t segmentFiveY = segmentThreeY;\n\n    uint16_t segmentSixX = x;\n    uint16_t segmentSixY = segmentTwoY;\n\n    uint16_t segmentSevenX = segmentOneX;\n    uint16_t segmentSevenY = segmentTwoY + segmentWidth + 2;\n\n    // Draw only the active segments\n    if (seg[0])\n        drawHorizontalSegment(display, segmentOneX, segmentOneY, segmentWidth, segmentHeight);\n    if (seg[1])\n        drawVerticalSegment(display, segmentTwoX, segmentTwoY, segmentWidth, segmentHeight);\n    if (seg[2])\n        drawVerticalSegment(display, segmentThreeX, segmentThreeY, segmentWidth, segmentHeight);\n    if (seg[3])\n        drawHorizontalSegment(display, segmentFourX, segmentFourY, segmentWidth, segmentHeight);\n    if (seg[4])\n        drawVerticalSegment(display, segmentFiveX, segmentFiveY, segmentWidth, segmentHeight);\n    if (seg[5])\n        drawVerticalSegment(display, segmentSixX, segmentSixY, segmentWidth, segmentHeight);\n    if (seg[6])\n        drawHorizontalSegment(display, segmentSevenX, segmentSevenY, segmentWidth, segmentHeight);\n}\n\nvoid drawHorizontalSegment(OLEDDisplay *display, int x, int y, int width, int height)\n{\n    int halfHeight = height / 2;\n\n    // draw central rectangle\n    display->fillRect(x, y, width, height);\n\n    // draw end triangles\n    display->fillTriangle(x, y, x, y + height - 1, x - halfHeight, y + halfHeight);\n\n    display->fillTriangle(x + width, y, x + width + halfHeight, y + halfHeight, x + width, y + height - 1);\n}\n\nvoid drawVerticalSegment(OLEDDisplay *display, int x, int y, int width, int height)\n{\n    int halfHeight = height / 2;\n\n    // draw central rectangle\n    display->fillRect(x, y, height, width);\n\n    // draw end triangles\n    display->fillTriangle(x + halfHeight, y - halfHeight, x + height - 1, y, x, y);\n\n    display->fillTriangle(x, y + width, x + height - 1, y + width, x + halfHeight, y + width + halfHeight);\n}\n\nvoid drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    // === Set Title, Blank for Clock\n    const char *titleStr = \"\";\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr, true, true);\n\n    uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // Display local timezone\n    char timeString[16];\n    int hour = 0;\n    int minute = 0;\n    int second = 0;\n\n    if (rtc_sec > 0) {\n        long hms = rtc_sec % SEC_PER_DAY;\n        hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;\n\n        hour = hms / SEC_PER_HOUR;\n        minute = (hms % SEC_PER_HOUR) / SEC_PER_MIN;\n        second = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN\n    }\n\n    bool isPM = hour >= 12;\n    if (config.display.use_12h_clock) {\n        hour %= 12;\n        if (hour == 0) {\n            hour = 12;\n        }\n        snprintf(timeString, sizeof(timeString), \"%d:%02d\", hour, minute);\n    } else {\n        snprintf(timeString, sizeof(timeString), \"%02d:%02d\", hour, minute);\n    }\n\n    // Format seconds string\n    char secondString[8];\n    snprintf(secondString, sizeof(secondString), \"%02d\", second);\n\n    static bool scaleInitialized = false;\n    static float scale = 0.75f;\n    static float segmentWidth = SEGMENT_WIDTH * 0.75f;\n    static float segmentHeight = SEGMENT_HEIGHT * 0.75f;\n\n    if (!scaleInitialized) {\n        float screenwidth_target_ratio = 0.80f; // Target 80% of display width (adjustable)\n        float max_scale = 3.5f;                 // Safety limit to avoid runaway scaling\n        float step = 0.05f;                     // Step increment per iteration\n\n        float target_width = display->getWidth() * screenwidth_target_ratio;\n        float target_height =\n            display->getHeight() -\n            ((currentResolution == ScreenResolution::High)\n                 ? 46\n                 : 33); // Be careful adjusting this number, we have to account for header and the text under the time\n\n        float calculated_width_size = 0.0f;\n        float calculated_height_size = 0.0f;\n\n        while (true) {\n            segmentWidth = SEGMENT_WIDTH * scale;\n            segmentHeight = SEGMENT_HEIGHT * scale;\n\n            calculated_width_size = segmentHeight + ((segmentWidth + (segmentHeight * 2) + 4) * 4);\n            calculated_height_size = segmentHeight + ((segmentHeight + (segmentHeight * 2) + 4) * 2);\n\n            if (calculated_width_size >= target_width || calculated_height_size >= target_height || scale >= max_scale) {\n                break;\n            }\n\n            scale += step;\n        }\n\n        // If we overshot width, back off one step and recompute segment sizes\n        if (calculated_width_size > target_width || calculated_height_size > target_height) {\n            scale -= step;\n            segmentWidth = SEGMENT_WIDTH * scale;\n            segmentHeight = SEGMENT_HEIGHT * scale;\n        }\n\n        scaleInitialized = true;\n    }\n\n    // calculate hours:minutes string width\n    size_t len = strlen(timeString);\n    uint16_t timeStringWidth = len * 5;\n\n    for (size_t i = 0; i < len; i++) {\n        char character = timeString[i];\n\n        if (character == ':') {\n            timeStringWidth += segmentHeight;\n        } else {\n            timeStringWidth += segmentWidth + (segmentHeight * 2) + 4;\n        }\n    }\n\n    uint16_t hourMinuteTextX = (display->getWidth() / 2) - (timeStringWidth / 2);\n    uint16_t startingHourMinuteTextX = hourMinuteTextX;\n\n    uint16_t hourMinuteTextY = (display->getHeight() / 2) - (((segmentWidth * 2) + (segmentHeight * 3) + 8) / 2) + 2;\n\n    // iterate over characters in hours:minutes string and draw segmented characters\n    for (size_t i = 0; i < len; i++) {\n        char character = timeString[i];\n\n        if (character == ':') {\n            drawSegmentedDisplayColon(display, hourMinuteTextX, hourMinuteTextY, scale);\n\n            hourMinuteTextX += segmentHeight + 6;\n            if (scale >= 2.0f) {\n                hourMinuteTextX += (uint16_t)(4.5f * scale);\n            }\n        } else {\n            drawSegmentedDisplayCharacter(display, hourMinuteTextX, hourMinuteTextY, character - '0', scale);\n\n            hourMinuteTextX += segmentWidth + (segmentHeight * 2) + 4;\n        }\n\n        hourMinuteTextX += 5;\n    }\n\n    // draw seconds string + AM/PM\n    display->setFont(FONT_SMALL);\n    int xOffset = -1;\n    if (currentResolution == ScreenResolution::High) {\n        xOffset = 0;\n    }\n    if (hour >= 10) {\n        if (currentResolution == ScreenResolution::High) {\n            xOffset += 32;\n        } else {\n            xOffset += 18;\n        }\n    }\n\n    if (config.display.use_12h_clock) {\n        display->drawString(startingHourMinuteTextX + xOffset, (display->getHeight() - hourMinuteTextY) - 1, isPM ? \"pm\" : \"am\");\n    }\n\n#ifndef USE_EINK\n    xOffset = (currentResolution == ScreenResolution::High) ? 18 : 10;\n    if (scale >= 2.0f) {\n        xOffset -= (int)(4.5f * scale);\n    }\n    display->drawString(startingHourMinuteTextX + timeStringWidth - xOffset, (display->getHeight() - hourMinuteTextY) - 1,\n                        secondString);\n#endif\n\n    graphics::drawCommonFooter(display, x, y);\n}\n\n// Draw an analog clock\nvoid drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    // === Set Title, Blank for Clock\n    const char *titleStr = \"\";\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr, true, true);\n\n    // clock face center coordinates\n    int16_t centerX = display->getWidth() / 2;\n    int16_t centerY = display->getHeight() / 2;\n\n    // clock face radius\n    int16_t radius = (std::min(display->getWidth(), display->getHeight()) / 2) * 0.9;\n#ifdef T_WATCH_S3\n    radius = (display->getWidth() / 2) * 0.8;\n#endif\n\n    // noon (0 deg) coordinates (outermost circle)\n    int16_t noonX = centerX;\n    int16_t noonY = centerY - radius;\n\n    // second hand radius and y coordinate (outermost circle)\n    int16_t secondHandNoonY = noonY + 1;\n\n    // tick mark outer y coordinate; (first nested circle)\n    int16_t tickMarkOuterNoonY = secondHandNoonY;\n\n    double secondsTickMarkInnerNoonY = noonY + ((currentResolution == ScreenResolution::High) ? 8 : 4);\n    double hoursTickMarkInnerNoonY = noonY + ((currentResolution == ScreenResolution::High) ? 16 : 6);\n\n    // minute hand y coordinate\n    int16_t minuteHandNoonY = secondsTickMarkInnerNoonY + 4;\n\n    // hour string y coordinate\n    int16_t hourStringNoonY = minuteHandNoonY + 18;\n\n    // hour hand radius and y coordinate\n    int16_t hourHandRadius = radius * 0.35;\n    if (currentResolution == ScreenResolution::High) {\n        hourHandRadius = radius * 0.55;\n    }\n    int16_t hourHandNoonY = centerY - hourHandRadius;\n\n    display->setColor(OLEDDISPLAY_COLOR::WHITE);\n    display->drawCircle(centerX, centerY, radius);\n\n    uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // Display local timezone\n    if (rtc_sec > 0) {\n        int hour, minute, second;\n        decomposeTime(rtc_sec, hour, minute, second);\n\n        if (config.display.use_12h_clock) {\n            bool isPM = hour >= 12;\n            display->setFont(FONT_SMALL);\n            int yOffset = (currentResolution == ScreenResolution::High) ? 1 : 0;\n#ifdef USE_EINK\n            yOffset += 3;\n#endif\n            display->drawString(centerX - (display->getStringWidth(isPM ? \"pm\" : \"am\") / 2), centerY + yOffset,\n                                isPM ? \"pm\" : \"am\");\n        }\n        hour %= 12;\n        if (hour == 0)\n            hour = 12;\n\n        int16_t degreesPerHour = 30;\n        int16_t degreesPerMinuteOrSecond = 6;\n\n        double hourBaseAngle = hour * degreesPerHour;\n        double hourAngleOffset = ((double)minute / 60) * degreesPerHour;\n        double hourAngle = radians(hourBaseAngle + hourAngleOffset);\n\n        double minuteBaseAngle = minute * degreesPerMinuteOrSecond;\n        double minuteAngleOffset = ((double)second / 60) * degreesPerMinuteOrSecond;\n        double minuteAngle = radians(minuteBaseAngle + minuteAngleOffset);\n\n        double secondAngle = radians(second * degreesPerMinuteOrSecond);\n\n        double hourX = sin(-hourAngle) * (hourHandNoonY - centerY) + noonX;\n        double hourY = cos(-hourAngle) * (hourHandNoonY - centerY) + centerY;\n\n        double minuteX = sin(-minuteAngle) * (minuteHandNoonY - centerY) + noonX;\n        double minuteY = cos(-minuteAngle) * (minuteHandNoonY - centerY) + centerY;\n\n        double secondX = sin(-secondAngle) * (secondHandNoonY - centerY) + noonX;\n        double secondY = cos(-secondAngle) * (secondHandNoonY - centerY) + centerY;\n\n        display->setFont(FONT_MEDIUM);\n\n        // draw minute and hour tick marks and hour numbers\n        for (uint16_t angle = 0; angle < 360; angle += 6) {\n            double angleInRadians = radians(angle);\n\n            double sineAngleInRadians = sin(-angleInRadians);\n            double cosineAngleInRadians = cos(-angleInRadians);\n\n            double endX = sineAngleInRadians * (tickMarkOuterNoonY - centerY) + noonX;\n            double endY = cosineAngleInRadians * (tickMarkOuterNoonY - centerY) + centerY;\n\n            if (angle % degreesPerHour == 0) {\n                double startX = sineAngleInRadians * (hoursTickMarkInnerNoonY - centerY) + noonX;\n                double startY = cosineAngleInRadians * (hoursTickMarkInnerNoonY - centerY) + centerY;\n\n                // draw hour tick mark\n                display->drawLine(startX, startY, endX, endY);\n\n                static char buffer[2];\n\n                uint8_t hourInt = (angle / 30);\n\n                if (hourInt == 0) {\n                    hourInt = 12;\n                }\n\n                // hour number x offset needs to be adjusted for some cases\n                int8_t hourStringXOffset;\n                int8_t hourStringYOffset = 13;\n\n                switch (hourInt) {\n                case 3:\n                    hourStringXOffset = 5;\n                    break;\n                case 9:\n                    hourStringXOffset = 7;\n                    break;\n                case 10:\n                case 11:\n                    hourStringXOffset = 8;\n                    break;\n                case 12:\n                    hourStringXOffset = 13;\n                    break;\n                default:\n                    hourStringXOffset = 6;\n                    break;\n                }\n\n                double hourStringX = (sineAngleInRadians * (hourStringNoonY - centerY) + noonX) - hourStringXOffset;\n                double hourStringY = (cosineAngleInRadians * (hourStringNoonY - centerY) + centerY) - hourStringYOffset;\n\n#ifdef T_WATCH_S3\n                // draw hour number\n                display->drawStringf(hourStringX, hourStringY, buffer, \"%d\", hourInt);\n#else\n#ifdef USE_EINK\n                if (currentResolution == ScreenResolution::High) {\n                    // draw hour number\n                    display->drawStringf(hourStringX, hourStringY, buffer, \"%d\", hourInt);\n                }\n#else\n                if (currentResolution == ScreenResolution::High &&\n                    (hourInt == 3 || hourInt == 6 || hourInt == 9 || hourInt == 12)) {\n                    // draw hour number\n                    display->drawStringf(hourStringX, hourStringY, buffer, \"%d\", hourInt);\n                }\n#endif\n#endif\n            }\n\n            if (angle % degreesPerMinuteOrSecond == 0) {\n                double startX = sineAngleInRadians * (secondsTickMarkInnerNoonY - centerY) + noonX;\n                double startY = cosineAngleInRadians * (secondsTickMarkInnerNoonY - centerY) + centerY;\n\n                if (currentResolution == ScreenResolution::High) {\n                    // draw minute tick mark\n                    display->drawLine(startX, startY, endX, endY);\n                }\n            }\n        }\n\n        // draw hour hand\n        display->drawLine(centerX, centerY, hourX, hourY);\n\n        // draw minute hand\n        display->drawLine(centerX, centerY, minuteX, minuteY);\n#ifndef USE_EINK\n        // draw second hand\n        display->drawLine(centerX, centerY, secondX, secondY);\n#endif\n    }\n    graphics::drawCommonFooter(display, x, y);\n}\n\n} // namespace ClockRenderer\n\n} // namespace graphics\n#endif"
  },
  {
    "path": "src/graphics/draw/ClockRenderer.h",
    "content": "#pragma once\n\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nnamespace graphics\n{\n\n/// Forward declarations\nclass Screen;\n\nnamespace ClockRenderer\n{\n\n// Clock frame functions\nvoid drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n// Segmented display functions\nvoid drawSegmentedDisplayCharacter(OLEDDisplay *display, int x, int y, uint8_t number, float scale = 1);\nvoid drawSegmentedDisplayColon(OLEDDisplay *display, int x, int y, float scale = 1);\nvoid drawHorizontalSegment(OLEDDisplay *display, int x, int y, int width, int height);\nvoid drawVerticalSegment(OLEDDisplay *display, int x, int y, int width, int height);\n\n// UI elements for clock displays\n// void drawWatchFaceToggleButton(OLEDDisplay *display, int16_t x, int16_t y, bool digitalMode = true, float scale = 1);\n\n} // namespace ClockRenderer\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/draw/CompassRenderer.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"CompassRenderer.h\"\n#include \"NodeDB.h\"\n#include \"UIRenderer.h\"\n#include \"configuration.h\"\n#include \"gps/GeoCoord.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include <cmath>\n\nnamespace graphics\n{\nnamespace CompassRenderer\n{\n\n// Point helper class for compass calculations\nstruct Point {\n    float x, y;\n    Point(float x, float y) : x(x), y(y) {}\n\n    void rotate(float angle)\n    {\n        float cos_a = cos(angle);\n        float sin_a = sin(angle);\n        float new_x = x * cos_a - y * sin_a;\n        float new_y = x * sin_a + y * cos_a;\n        x = new_x;\n        y = new_y;\n    }\n\n    void scale(float factor)\n    {\n        x *= factor;\n        y *= factor;\n    }\n\n    void translate(float dx, float dy)\n    {\n        x += dx;\n        y += dy;\n    }\n};\n\nvoid drawCompassNorth(OLEDDisplay *display, int16_t compassX, int16_t compassY, float myHeading, int16_t radius)\n{\n    // Show the compass heading (not implemented in original)\n    // This could draw a \"N\" indicator or north arrow\n    // For now, we'll draw a simple north indicator\n    // const float radius = 17.0f;\n    if (currentResolution == ScreenResolution::High) {\n        radius += 4;\n    }\n    Point north(0, -radius);\n    if (uiconfig.compass_mode != meshtastic_CompassMode_FIXED_RING)\n        north.rotate(-myHeading);\n    north.translate(compassX, compassY);\n\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    display->setColor(BLACK);\n    if (currentResolution == ScreenResolution::High) {\n        display->fillRect(north.x - 8, north.y - 1, display->getStringWidth(\"N\") + 3, FONT_HEIGHT_SMALL - 6);\n    } else {\n        display->fillRect(north.x - 4, north.y - 1, display->getStringWidth(\"N\") + 2, FONT_HEIGHT_SMALL - 6);\n    }\n    display->setColor(WHITE);\n    display->drawString(north.x, north.y - 3, \"N\");\n}\n\nvoid drawNodeHeading(OLEDDisplay *display, int16_t compassX, int16_t compassY, uint16_t compassDiam, float headingRadian)\n{\n    Point tip(0.0f, -0.5f), tail(0.0f, 0.35f); // pointing up initially\n    float arrowOffsetX = 0.14f, arrowOffsetY = 0.9f;\n    Point leftArrow(tip.x - arrowOffsetX, tip.y + arrowOffsetY), rightArrow(tip.x + arrowOffsetX, tip.y + arrowOffsetY);\n\n    Point *arrowPoints[] = {&tip, &tail, &leftArrow, &rightArrow};\n\n    for (int i = 0; i < 4; i++) {\n        arrowPoints[i]->rotate(headingRadian);\n        arrowPoints[i]->scale(compassDiam * 0.6);\n        arrowPoints[i]->translate(compassX, compassY);\n    }\n\n#ifdef USE_EINK\n    display->drawTriangle(tip.x, tip.y, rightArrow.x, rightArrow.y, tail.x, tail.y);\n#else\n    display->fillTriangle(tip.x, tip.y, rightArrow.x, rightArrow.y, tail.x, tail.y);\n#endif\n    display->drawTriangle(tip.x, tip.y, leftArrow.x, leftArrow.y, tail.x, tail.y);\n}\n\nvoid drawArrowToNode(OLEDDisplay *display, int16_t x, int16_t y, int16_t size, float bearing)\n{\n    float radians = bearing * DEG_TO_RAD;\n\n    Point tip(0, -size / 2);\n    Point left(-size / 6, size / 4);\n    Point right(size / 6, size / 4);\n    Point tail(0, size / 4.5);\n\n    tip.rotate(radians);\n    left.rotate(radians);\n    right.rotate(radians);\n    tail.rotate(radians);\n\n    tip.translate(x, y);\n    left.translate(x, y);\n    right.translate(x, y);\n    tail.translate(x, y);\n\n    display->fillTriangle(tip.x, tip.y, left.x, left.y, tail.x, tail.y);\n    display->fillTriangle(tip.x, tip.y, right.x, right.y, tail.x, tail.y);\n}\n\nfloat estimatedHeading(double lat, double lon)\n{\n    // Simple magnetic declination estimation\n    // This is a very basic implementation - the original might be more sophisticated\n    return 0.0f; // Return 0 for now, indicating no heading available\n}\n\nuint16_t getCompassDiam(uint32_t displayWidth, uint32_t displayHeight)\n{\n    // Calculate appropriate compass diameter based on display size\n    uint16_t minDimension = (displayWidth < displayHeight) ? displayWidth : displayHeight;\n    uint16_t maxDiam = minDimension / 3; // Use 1/3 of the smaller dimension\n\n    // Ensure minimum and maximum bounds\n    if (maxDiam < 16)\n        maxDiam = 16;\n    if (maxDiam > 64)\n        maxDiam = 64;\n\n    return maxDiam;\n}\n\n} // namespace CompassRenderer\n} // namespace graphics\n#endif"
  },
  {
    "path": "src/graphics/draw/CompassRenderer.h",
    "content": "#pragma once\n\n#include \"graphics/Screen.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nnamespace graphics\n{\n\n/// Forward declarations\nclass Screen;\n\n/**\n * @brief Compass and navigation drawing functions\n *\n * Contains all functions related to drawing compass elements, headings,\n * navigation arrows, and location-based UI components.\n */\nnamespace CompassRenderer\n{\n// Compass drawing functions\nvoid drawCompassNorth(OLEDDisplay *display, int16_t compassX, int16_t compassY, float myHeading, int16_t radius);\nvoid drawNodeHeading(OLEDDisplay *display, int16_t compassX, int16_t compassY, uint16_t compassDiam, float headingRadian);\nvoid drawArrowToNode(OLEDDisplay *display, int16_t x, int16_t y, int16_t size, float bearing);\n\n// Navigation and location functions\nfloat estimatedHeading(double lat, double lon);\nuint16_t getCompassDiam(uint32_t displayWidth, uint32_t displayHeight);\n\n} // namespace CompassRenderer\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/draw/DebugRenderer.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"../Screen.h\"\n#include \"DebugRenderer.h\"\n#include \"FSCommon.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"Throttle.h\"\n#include \"UIRenderer.h\"\n#include \"airtime.h\"\n#include \"gps/RTC.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/TimeFormatters.h\"\n#include \"graphics/images.h\"\n#include \"main.h\"\n#include \"mesh/Channels.h\"\n#include \"mesh/generated/meshtastic/deviceonly.pb.h\"\n#include \"sleep.h\"\n\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n#include \"mesh/wifi/WiFiAPClient.h\"\n#include <WiFi.h>\n#ifdef ARCH_ESP32\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n#endif\n\n#ifdef ARCH_ESP32\n#include \"modules/StoreForwardModule.h\"\n#endif\n#include <DisplayFormatters.h>\n#include <RadioLibInterface.h>\n#include <target_specific.h>\n\nusing namespace meshtastic;\n\n// External variables\nextern graphics::Screen *screen;\nextern PowerStatus *powerStatus;\nextern NodeStatus *nodeStatus;\nextern GPSStatus *gpsStatus;\nextern Channels channels;\nextern AirTime *airTime;\n\n// External functions from Screen.cpp\nextern bool heartbeat;\n\n#ifdef ARCH_ESP32\nextern StoreForwardModule *storeForwardModule;\n#endif\n\nnamespace graphics\n{\nnamespace DebugRenderer\n{\n\nvoid drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->setFont(FONT_SMALL);\n\n    // The coordinates define the left starting point of the text\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) {\n        display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL);\n        display->setColor(BLACK);\n    }\n\n    char channelStr[20];\n    snprintf(channelStr, sizeof(channelStr), \"#%s\", channels.getName(channels.getPrimaryIndex()));\n    // Display nodes status\n    if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT) {\n        UIRenderer::drawNodes(display, x + (SCREEN_WIDTH * 0.25), y + 2, nodeStatus);\n    } else {\n        UIRenderer::drawNodes(display, x + (SCREEN_WIDTH * 0.25), y + 3, nodeStatus);\n    }\n#if HAS_GPS\n    // Display GPS status\n    if (config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n        UIRenderer::drawGpsPowerStatus(display, x, y + 2, gpsStatus);\n    } else {\n        if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT) {\n            UIRenderer::drawGps(display, x + (SCREEN_WIDTH * 0.63), y + 2, gpsStatus);\n        } else {\n            UIRenderer::drawGps(display, x + (SCREEN_WIDTH * 0.63), y + 3, gpsStatus);\n        }\n    }\n#endif\n    display->setColor(WHITE);\n    // Draw the channel name\n    display->drawString(x, y + FONT_HEIGHT_SMALL, channelStr);\n    // Draw our hardware ID to assist with bluetooth pairing. Either prefix with Info or S&F Logo\n    if (moduleConfig.store_forward.enabled) {\n#ifdef ARCH_ESP32\n        if (!Throttle::isWithinTimespanMs(storeForwardModule->lastHeartbeat,\n                                          (storeForwardModule->heartbeatInterval * 1200))) { // no heartbeat, overlap a bit\n#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) ||      \\\n     defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) ||             \\\n     defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796) || ARCH_PORTDUINO) &&                                                 \\\n    !defined(DISPLAY_FORCE_SMALL_FONTS)\n            display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12,\n                                   8, imgQuestionL1);\n            display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 12,\n                                   8, imgQuestionL2);\n#else\n            display->drawFastImage(x + SCREEN_WIDTH - 10 - display->getStringWidth(screen->ourId), y + 2 + FONT_HEIGHT_SMALL, 8,\n                                   8, imgQuestion);\n#endif\n        } else {\n#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) ||      \\\n     defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) ||             \\\n     defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796)) &&                                                                   \\\n    !defined(DISPLAY_FORCE_SMALL_FONTS)\n            display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 16,\n                                   8, imgSFL1);\n            display->drawFastImage(x + SCREEN_WIDTH - 18 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 16,\n                                   8, imgSFL2);\n#else\n            display->drawFastImage(x + SCREEN_WIDTH - 13 - display->getStringWidth(screen->ourId), y + 2 + FONT_HEIGHT_SMALL, 11,\n                                   8, imgSF);\n#endif\n        }\n#endif\n    } else {\n        // TODO: Raspberry Pi supports more than just the one screen size\n#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) ||      \\\n     defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) ||             \\\n     defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796) || ARCH_PORTDUINO) &&                                                 \\\n    !defined(DISPLAY_FORCE_SMALL_FONTS)\n        display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 3 + FONT_HEIGHT_SMALL, 12, 8,\n                               imgInfoL1);\n        display->drawFastImage(x + SCREEN_WIDTH - 14 - display->getStringWidth(screen->ourId), y + 11 + FONT_HEIGHT_SMALL, 12, 8,\n                               imgInfoL2);\n#else\n        display->drawFastImage(x + SCREEN_WIDTH - 10 - display->getStringWidth(screen->ourId), y + 2 + FONT_HEIGHT_SMALL, 8, 8,\n                               imgInfo);\n#endif\n    }\n\n    display->drawString(x + SCREEN_WIDTH - display->getStringWidth(screen->ourId), y + FONT_HEIGHT_SMALL, screen->ourId);\n\n    // Draw any log messages\n    display->drawLogBuffer(x, y + (FONT_HEIGHT_SMALL * 2));\n\n    /* Display a heartbeat pixel that blinks every time the frame is redrawn */\n#ifdef SHOW_REDRAWS\n    if (heartbeat)\n        display->setPixel(0, 0);\n    heartbeat = !heartbeat;\n#endif\n}\n\n// ****************************\n// * WiFi Screen              *\n// ****************************\nvoid drawFrameWiFi(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = \"WiFi\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    const char *wifiName = config.network.wifi_ssid;\n\n    if (WiFi.status() != WL_CONNECTED) {\n        display->drawString(x, getTextPositions(display)[line++], \"WiFi: Not Connected\");\n    } else {\n        display->drawString(x, getTextPositions(display)[line++], \"WiFi: Connected\");\n\n        char rssiStr[32];\n        snprintf(rssiStr, sizeof(rssiStr), \"RSSI: %d\", WiFi.RSSI());\n        display->drawString(x, getTextPositions(display)[line++], rssiStr);\n    }\n\n    /*\n    - WL_CONNECTED: assigned when connected to a WiFi network;\n    - WL_NO_SSID_AVAIL: assigned when no SSID are available;\n    - WL_CONNECT_FAILED: assigned when the connection fails for all the attempts;\n    - WL_CONNECTION_LOST: assigned when the connection is lost;\n    - WL_DISCONNECTED: assigned when disconnected from a network;\n    - WL_IDLE_STATUS: it is a temporary status assigned when WiFi.begin() is called and remains active until the number of\n    attempts expires (resulting in WL_CONNECT_FAILED) or a connection is established (resulting in WL_CONNECTED);\n    - WL_SCAN_COMPLETED: assigned when the scan networks is completed;\n    - WL_NO_SHIELD: assigned when no WiFi shield is present;\n\n    */\n    if (WiFi.status() == WL_CONNECTED) {\n        char ipStr[64];\n        snprintf(ipStr, sizeof(ipStr), \"IP: %s\", WiFi.localIP().toString().c_str());\n        display->drawString(x, getTextPositions(display)[line++], ipStr);\n    } else if (WiFi.status() == WL_NO_SSID_AVAIL) {\n        display->drawString(x, getTextPositions(display)[line++], \"SSID Not Found\");\n    } else if (WiFi.status() == WL_CONNECTION_LOST) {\n        display->drawString(x, getTextPositions(display)[line++], \"Connection Lost\");\n    } else if (WiFi.status() == WL_IDLE_STATUS) {\n        display->drawString(x, getTextPositions(display)[line++], \"Idle ... Reconnecting\");\n    } else if (WiFi.status() == WL_CONNECT_FAILED) {\n        display->drawString(x, getTextPositions(display)[line++], \"Connection Failed\");\n    }\n#ifdef ARCH_ESP32\n    else {\n        // Codes:\n        // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#wi-fi-reason-code\n        display->drawString(x, getTextPositions(display)[line++],\n                            WiFi.disconnectReasonName(static_cast<wifi_err_reason_t>(getWifiDisconnectReason())));\n    }\n#else\n    else {\n        char statusStr[32];\n        snprintf(statusStr, sizeof(statusStr), \"Unknown status: %d\", WiFi.status());\n        display->drawString(x, getTextPositions(display)[line++], statusStr);\n    }\n#endif\n\n    char ssidStr[64];\n    snprintf(ssidStr, sizeof(ssidStr), \"SSID: %s\", wifiName);\n    display->drawString(x, getTextPositions(display)[line++], ssidStr);\n\n    display->drawString(x, getTextPositions(display)[line++], \"URL: http://meshtastic.local\");\n\n    graphics::drawCommonFooter(display, x, y);\n\n    /* Display a heartbeat pixel that blinks every time the frame is redrawn */\n#ifdef SHOW_REDRAWS\n    if (heartbeat)\n        display->setPixel(0, 0);\n    heartbeat = !heartbeat;\n#endif\n#endif\n}\n\nvoid drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->setFont(FONT_SMALL);\n\n    // The coordinates define the left starting point of the text\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) {\n        display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL);\n        display->setColor(BLACK);\n    }\n\n    char batStr[20];\n    if (powerStatus->getHasBattery()) {\n        int batV = powerStatus->getBatteryVoltageMv() / 1000;\n        int batCv = (powerStatus->getBatteryVoltageMv() % 1000) / 10;\n\n        snprintf(batStr, sizeof(batStr), \"B %01d.%02dV %3d%% %c%c\", batV, batCv, powerStatus->getBatteryChargePercent(),\n                 powerStatus->getIsCharging() ? '+' : ' ', powerStatus->getHasUSB() ? 'U' : ' ');\n\n        // Line 1\n        display->drawString(x, y, batStr);\n        if (config.display.heading_bold)\n            display->drawString(x + 1, y, batStr);\n    } else {\n        // Line 1\n        display->drawString(x, y, \"USB\");\n        if (config.display.heading_bold)\n            display->drawString(x + 1, y, \"USB\");\n    }\n\n    uint32_t currentMillis = millis();\n    uint32_t seconds = currentMillis / 1000;\n    uint32_t minutes = seconds / 60;\n    uint32_t hours = minutes / 60;\n    uint32_t days = hours / 24;\n    // currentMillis %= 1000;\n    // seconds %= 60;\n    // minutes %= 60;\n    // hours %= 24;\n\n    // Show uptime as days, hours, minutes OR seconds\n    std::string uptime = UIRenderer::drawTimeDelta(days, hours, minutes, seconds);\n\n    // Line 1 (Still)\n    if (currentResolution != graphics::ScreenResolution::UltraLow) {\n        display->drawString(x + SCREEN_WIDTH - display->getStringWidth(uptime.c_str()), y, uptime.c_str());\n        if (config.display.heading_bold)\n            display->drawString(x - 1 + SCREEN_WIDTH - display->getStringWidth(uptime.c_str()), y, uptime.c_str());\n\n        display->setColor(WHITE);\n    }\n    // Setup string to assemble analogClock string\n    std::string analogClock = \"\";\n\n    uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true); // Display local timezone\n    if (rtc_sec > 0) {\n        long hms = rtc_sec % SEC_PER_DAY;\n        // hms += tz.tz_dsttime * SEC_PER_HOUR;\n        // hms -= tz.tz_minuteswest * SEC_PER_MIN;\n        // mod `hms` to ensure in positive range of [0...SEC_PER_DAY)\n        hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;\n\n        // Tear apart hms into h:m:s\n        int hour, min, sec;\n        graphics::decomposeTime(rtc_sec, hour, min, sec);\n\n        char timebuf[12];\n\n        if (config.display.use_12h_clock) {\n            std::string meridiem = \"am\";\n            if (hour >= 12) {\n                if (hour > 12)\n                    hour -= 12;\n                meridiem = \"pm\";\n            }\n            if (hour == 00) {\n                hour = 12;\n            }\n            snprintf(timebuf, sizeof(timebuf), \"%d:%02d:%02d%s\", hour, min, sec, meridiem.c_str());\n        } else {\n            snprintf(timebuf, sizeof(timebuf), \"%02d:%02d:%02d\", hour, min, sec);\n        }\n        analogClock += timebuf;\n    }\n\n    // Line 2\n    display->drawString(x, y + FONT_HEIGHT_SMALL * 1, analogClock.c_str());\n\n    // Display Channel Utilization\n    char chUtil[13];\n    snprintf(chUtil, sizeof(chUtil), \"ChUtil %2.0f%%\", airTime->channelUtilizationPercent());\n    display->drawString(x + SCREEN_WIDTH - display->getStringWidth(chUtil), y + FONT_HEIGHT_SMALL * 1, chUtil);\n\n#if HAS_GPS\n    if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n        // Line 3\n        if (uiconfig.gps_format != meshtastic_DeviceUIConfig_GpsCoordinateFormat_DMS) // if DMS then don't draw altitude\n            UIRenderer::drawGpsAltitude(display, x, y + FONT_HEIGHT_SMALL * 2, gpsStatus);\n\n        // Line 4\n        UIRenderer::drawGpsCoordinates(display, x, y + FONT_HEIGHT_SMALL * 3, gpsStatus);\n    } else {\n        UIRenderer::drawGpsPowerStatus(display, x, y + FONT_HEIGHT_SMALL * 2, gpsStatus);\n    }\n#endif\n/* Display a heartbeat pixel that blinks every time the frame is redrawn */\n#ifdef SHOW_REDRAWS\n    if (heartbeat)\n        display->setPixel(0, 0);\n    heartbeat = !heartbeat;\n#endif\n}\n\n// Trampoline functions for DebugInfo class access\nvoid drawDebugInfoTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    drawFrame(display, state, x, y);\n}\n\nvoid drawDebugInfoSettingsTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    drawFrameSettings(display, state, x, y);\n}\n\nvoid drawDebugInfoWiFiTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    drawFrameWiFi(display, state, x, y);\n}\n\n// ****************************\n// * LoRa Focused Screen      *\n// ****************************\nvoid drawLoRaFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = (currentResolution == ScreenResolution::High) ? \"LoRa Info\" : \"LoRa\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    // === First Row: Region / BLE Name ===\n    graphics::UIRenderer::drawNodes(display, x, getTextPositions(display)[line] + 2, nodeStatus, 0, true, \"\");\n\n    uint8_t dmac[6];\n    char shortnameble[35];\n    getMacAddr(dmac);\n    snprintf(screen->ourId, sizeof(screen->ourId), \"%02x%02x\", dmac[4], dmac[5]);\n    if (currentResolution == ScreenResolution::UltraLow) {\n        snprintf(shortnameble, sizeof(shortnameble), \"%s\", screen->ourId);\n    } else {\n        snprintf(shortnameble, sizeof(shortnameble), \"BLE: %s\", screen->ourId);\n    }\n    int textWidth = display->getStringWidth(shortnameble);\n    int nameX = (SCREEN_WIDTH - textWidth);\n    display->drawString(nameX, getTextPositions(display)[line++], shortnameble);\n\n    // === Second Row: Role ===\n    auto role = DisplayFormatters::getDeviceRole(config.device.role);\n    char device_role[25];\n    snprintf(device_role, sizeof(device_role), \"Role: %s\", role);\n    textWidth = display->getStringWidth(device_role);\n    nameX = (SCREEN_WIDTH - textWidth) / 2;\n    display->drawString(nameX, getTextPositions(display)[line++], device_role);\n\n    // === Third Row: Radio Preset ===\n    auto mode = DisplayFormatters::getModemPresetDisplayName(config.lora.modem_preset, false, config.lora.use_preset);\n\n    char regionradiopreset[25];\n    const char *region = myRegion ? myRegion->name : NULL;\n    if (region != nullptr) {\n        if (currentResolution == ScreenResolution::UltraLow) {\n            snprintf(regionradiopreset, sizeof(regionradiopreset), \"%s\", region);\n        } else {\n            snprintf(regionradiopreset, sizeof(regionradiopreset), \"%s/%s\", region, mode);\n        }\n    }\n    textWidth = display->getStringWidth(regionradiopreset);\n    nameX = (SCREEN_WIDTH - textWidth) / 2;\n    display->drawString(nameX, getTextPositions(display)[line++], regionradiopreset);\n\n    // === Fourth Row: Frequency / ChanNum ===\n    char frequencyslot[35];\n    char freqStr[16];\n    float freq = RadioLibInterface::instance->getFreq();\n    snprintf(freqStr, sizeof(freqStr), \"%.3f\", freq);\n    if (config.lora.channel_num == 0) {\n        if (currentResolution == ScreenResolution::UltraLow) {\n            snprintf(frequencyslot, sizeof(frequencyslot), \"%sMHz\", freqStr);\n        } else {\n            snprintf(frequencyslot, sizeof(frequencyslot), \"Freq: %sMHz\", freqStr);\n        }\n    } else {\n        if (currentResolution == ScreenResolution::UltraLow) {\n            snprintf(frequencyslot, sizeof(frequencyslot), \"%sMHz (%d)\", freqStr, config.lora.channel_num);\n        } else {\n            snprintf(frequencyslot, sizeof(frequencyslot), \"Freq: %sMHz (%d)\", freqStr, config.lora.channel_num);\n        }\n    }\n    size_t len = strlen(frequencyslot);\n    if (len >= 4 && strcmp(frequencyslot + len - 4, \" (0)\") == 0) {\n        frequencyslot[len - 4] = '\\0'; // Remove the last three characters\n    }\n    textWidth = display->getStringWidth(frequencyslot);\n    nameX = (SCREEN_WIDTH - textWidth) / 2;\n    display->drawString(nameX, getTextPositions(display)[line++], frequencyslot);\n\n#if !defined(M5STACK_UNITC6L)\n    // === Fifth Row: Channel Utilization ===\n    const char *chUtil = \"ChUtil:\";\n    char chUtilPercentage[10];\n    snprintf(chUtilPercentage, sizeof(chUtilPercentage), \"%2.0f%%\", airTime->channelUtilizationPercent());\n\n    int chUtil_x = (currentResolution == ScreenResolution::High) ? display->getStringWidth(chUtil) + 10\n                                                                 : display->getStringWidth(chUtil) + 5;\n    int chUtil_y = getTextPositions(display)[line] + 3;\n\n    int chutil_bar_width = (currentResolution == ScreenResolution::High) ? 100 : 50;\n    int chutil_bar_height = (currentResolution == ScreenResolution::High) ? 12 : 7;\n    int extraoffset = (currentResolution == ScreenResolution::High) ? 6 : 3;\n    int chutil_percent = airTime->channelUtilizationPercent();\n\n    int centerofscreen = SCREEN_WIDTH / 2;\n    int total_line_content_width = (chUtil_x + chutil_bar_width + display->getStringWidth(chUtilPercentage) + extraoffset) / 2;\n    int starting_position = centerofscreen - total_line_content_width;\n\n    display->drawString(starting_position, getTextPositions(display)[line], chUtil);\n\n    // Force 56% or higher to show a full 100% bar, text would still show related percent.\n    if (chutil_percent >= 61) {\n        chutil_percent = 100;\n    }\n\n    // Weighting for nonlinear segments\n    float milestone1 = 25;\n    float milestone2 = 40;\n    float weight1 = 0.45; // Weight for 0–25%\n    float weight2 = 0.35; // Weight for 25–40%\n    float weight3 = 0.20; // Weight for 40–100%\n    float totalWeight = weight1 + weight2 + weight3;\n\n    int seg1 = chutil_bar_width * (weight1 / totalWeight);\n    int seg2 = chutil_bar_width * (weight2 / totalWeight);\n    int seg3 = chutil_bar_width * (weight3 / totalWeight);\n\n    int fillRight = 0;\n\n    if (chutil_percent <= milestone1) {\n        fillRight = (seg1 * (chutil_percent / milestone1));\n    } else if (chutil_percent <= milestone2) {\n        fillRight = seg1 + (seg2 * ((chutil_percent - milestone1) / (milestone2 - milestone1)));\n    } else {\n        fillRight = seg1 + seg2 + (seg3 * ((chutil_percent - milestone2) / (100 - milestone2)));\n    }\n\n    // Draw outline\n    display->drawRect(starting_position + chUtil_x, chUtil_y, chutil_bar_width, chutil_bar_height);\n\n    // Fill progress\n    if (fillRight > 0) {\n        display->fillRect(starting_position + chUtil_x, chUtil_y, fillRight, chutil_bar_height);\n    }\n\n    display->drawString(starting_position + chUtil_x + chutil_bar_width + extraoffset, getTextPositions(display)[line++],\n                        chUtilPercentage);\n#endif\n    graphics::drawCommonFooter(display, x, y);\n}\n\n// ****************************\n// *      System Screen       *\n// ****************************\nvoid drawSystemScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    // === Set Title\n    const char *titleStr = \"System\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    // === Layout ===\n    int line = 1;\n    const int barHeight = 6;\n    const int labelX = x;\n    int barsOffset = (currentResolution == ScreenResolution::High) ? 24 : 0;\n#ifdef USE_EINK\n#ifndef T_DECK_PRO\n    barsOffset -= 12;\n#endif\n#endif\n    int barX = x + barsOffset;\n    if (currentResolution == ScreenResolution::UltraLow) {\n        barX += 45;\n    } else {\n        barX += 40;\n    }\n    auto drawUsageRow = [&](const char *label, uint32_t used, uint32_t total, bool isHeap = false) {\n        if (total == 0)\n            return;\n\n        int percent = (used * 100) / total;\n\n        char combinedStr[24];\n        if (currentResolution == ScreenResolution::High) {\n            snprintf(combinedStr, sizeof(combinedStr), \"%s%3d%%  %u/%uKB\", (percent > 80) ? \"! \" : \"\", percent, used / 1024,\n                     total / 1024);\n        } else {\n            snprintf(combinedStr, sizeof(combinedStr), \"%s%3d%%\", (percent > 80) ? \"! \" : \"\", percent);\n        }\n\n        int textWidth = display->getStringWidth(combinedStr);\n        int adjustedBarWidth = SCREEN_WIDTH - barX - textWidth - 6;\n        if (adjustedBarWidth < 10)\n            adjustedBarWidth = 10;\n\n        int fillWidth = (used * adjustedBarWidth) / total;\n\n        // Label\n        display->setTextAlignment(TEXT_ALIGN_LEFT);\n        display->drawString(labelX, getTextPositions(display)[line], label);\n#if !defined(M5STACK_UNITC6L)\n        // Bar\n        int barY = getTextPositions(display)[line] + (FONT_HEIGHT_SMALL - barHeight) / 2;\n        display->setColor(WHITE);\n        display->drawRect(barX, barY, adjustedBarWidth, barHeight);\n\n        display->fillRect(barX, barY, fillWidth, barHeight);\n        display->setColor(WHITE);\n#endif\n        // Value string\n        display->setTextAlignment(TEXT_ALIGN_RIGHT);\n        display->drawString(SCREEN_WIDTH, getTextPositions(display)[line], combinedStr);\n    };\n\n    // === Memory values ===\n    uint32_t heapUsed = memGet.getHeapSize() - memGet.getFreeHeap();\n    uint32_t heapTotal = memGet.getHeapSize();\n\n    uint32_t psramUsed = memGet.getPsramSize() - memGet.getFreePsram();\n    uint32_t psramTotal = memGet.getPsramSize();\n\n    uint32_t flashUsed = 0, flashTotal = 0;\n#ifdef ESP32\n    flashUsed = FSCom.usedBytes();\n    flashTotal = FSCom.totalBytes();\n#endif\n\n    uint32_t sdUsed = 0, sdTotal = 0;\n    bool hasSD = false;\n    /*\n    #ifdef HAS_SDCARD\n        hasSD = SD.cardType() != CARD_NONE;\n        if (hasSD) {\n            sdUsed = SD.usedBytes();\n            sdTotal = SD.totalBytes();\n        }\n    #endif\n    */\n    // === Draw memory rows\n    drawUsageRow(\"Heap:\", heapUsed, heapTotal, true);\n#ifdef ESP32\n    if (psramUsed > 0) {\n        line += 1;\n        drawUsageRow(\"PSRAM:\", psramUsed, psramTotal);\n    }\n    if (flashTotal > 0) {\n        line += 1;\n        drawUsageRow(\"Flash:\", flashUsed, flashTotal);\n    }\n#endif\n    if (hasSD && sdTotal > 0) {\n        line += 1;\n        drawUsageRow(\"SD:\", sdUsed, sdTotal);\n    }\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    // System Uptime\n    if (line < 2) {\n        line += 1;\n    }\n    line += 1;\n\n    char appversionstr[35];\n    char appversionstr_formatted[40];\n\n    const char *ver = optstr(APP_VERSION);\n    char verbuf[32];\n    strncpy(verbuf, ver, sizeof(verbuf) - 1);\n    verbuf[sizeof(verbuf) - 1] = '\\0';\n\n    char *lastDot = strrchr(verbuf, '.');\n\n    if (currentResolution == ScreenResolution::UltraLow) {\n        if (lastDot != nullptr) {\n            *lastDot = '\\0';\n        }\n        snprintf(appversionstr, sizeof(appversionstr), \"Ver: %s\", verbuf);\n    } else {\n        if (lastDot) {\n            size_t prefixLen = (size_t)(lastDot - verbuf);\n            snprintf(appversionstr_formatted, sizeof(appversionstr_formatted), \"Ver: %.*s\", (int)prefixLen, verbuf);\n            strncat(appversionstr_formatted, \" (\", sizeof(appversionstr_formatted) - strlen(appversionstr_formatted) - 1);\n            strncat(appversionstr_formatted, lastDot + 1, sizeof(appversionstr_formatted) - strlen(appversionstr_formatted) - 1);\n            strncat(appversionstr_formatted, \")\", sizeof(appversionstr_formatted) - strlen(appversionstr_formatted) - 1);\n            strncpy(appversionstr, appversionstr_formatted, sizeof(appversionstr) - 1);\n            appversionstr[sizeof(appversionstr) - 1] = '\\0';\n        } else {\n            snprintf(appversionstr, sizeof(appversionstr), \"Ver: %s\", verbuf);\n        }\n    }\n    int textWidth = display->getStringWidth(appversionstr);\n    int nameX = (SCREEN_WIDTH - textWidth) / 2;\n\n    display->drawString(nameX, getTextPositions(display)[line++], appversionstr);\n\n    if (SCREEN_HEIGHT > 64 || (SCREEN_HEIGHT <= 64 && line <= 5)) { // Only show uptime if the screen can show it\n        char uptimeStr[32] = \"\";\n        getUptimeStr(millis(), \"Up: \", uptimeStr, sizeof(uptimeStr));\n        textWidth = display->getStringWidth(uptimeStr);\n        nameX = (SCREEN_WIDTH - textWidth) / 2;\n        display->drawString(nameX, getTextPositions(display)[line++], uptimeStr);\n    }\n\n    if (SCREEN_HEIGHT > 64 || (SCREEN_HEIGHT <= 64 && line <= 5)) { // Only show API state if the screen can show it\n        char api_state[32] = \"\";\n        const char *clientWord = nullptr;\n\n        // Determine if narrow or wide screen\n        if (currentResolution == ScreenResolution::High) {\n            clientWord = \"Client\";\n        } else {\n            clientWord = \"App\";\n        }\n        snprintf(api_state, sizeof(api_state), \"No %ss Connected\", clientWord);\n\n        if (service->api_state == service->STATE_BLE) {\n            snprintf(api_state, sizeof(api_state), \"%s Connected (BLE)\", clientWord);\n        } else if (service->api_state == service->STATE_WIFI) {\n            snprintf(api_state, sizeof(api_state), \"%s Connected (WiFi)\", clientWord);\n        } else if (service->api_state == service->STATE_SERIAL) {\n            snprintf(api_state, sizeof(api_state), \"%s Connected (Serial)\", clientWord);\n        } else if (service->api_state == service->STATE_PACKET) {\n            snprintf(api_state, sizeof(api_state), \"%s Connected (Internal)\", clientWord);\n        } else if (service->api_state == service->STATE_HTTP) {\n            snprintf(api_state, sizeof(api_state), \"%s Connected (HTTP)\", clientWord);\n        } else if (service->api_state == service->STATE_ETH) {\n            snprintf(api_state, sizeof(api_state), \"%s Connected (Ethernet)\", clientWord);\n        }\n        if (api_state[0] != '\\0') {\n            display->drawString((SCREEN_WIDTH - display->getStringWidth(api_state)) / 2, getTextPositions(display)[line++],\n                                api_state);\n        }\n    }\n\n    graphics::drawCommonFooter(display, x, y);\n}\n\n// ****************************\n// * Chirpy Screen      *\n// ****************************\nvoid drawChirpy(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n    int iconX = SCREEN_WIDTH - chirpy_width - (chirpy_width / 3);\n    int iconY = (SCREEN_HEIGHT - chirpy_height) / 2;\n    int textX_offset = 10;\n    if (currentResolution == ScreenResolution::High) {\n        textX_offset = textX_offset * 4;\n        const int scale = 2;\n        const int bytesPerRow = (chirpy_width + 7) / 8;\n\n        for (int yy = 0; yy < chirpy_height; ++yy) {\n            iconX = SCREEN_WIDTH - (chirpy_width * 2) - ((chirpy_width * 2) / 3);\n            iconY = (SCREEN_HEIGHT - (chirpy_height * 2)) / 2;\n            const uint8_t *rowPtr = chirpy + yy * bytesPerRow;\n            for (int xx = 0; xx < chirpy_width; ++xx) {\n                const uint8_t byteVal = pgm_read_byte(rowPtr + (xx >> 3));\n                const uint8_t bitMask = 1U << (xx & 7); // XBM is LSB-first\n                if (byteVal & bitMask) {\n                    display->fillRect(iconX + xx * scale, iconY + yy * scale, scale, scale);\n                }\n            }\n        }\n    } else {\n        display->drawXbm(iconX, iconY, chirpy_width, chirpy_height, chirpy);\n    }\n\n    int textX = (display->getWidth() / 2) - textX_offset - (display->getStringWidth(\"Hello\") / 2);\n    display->drawString(textX, getTextPositions(display)[line++], \"Hello\");\n    textX = (display->getWidth() / 2) - textX_offset - (display->getStringWidth(\"World!\") / 2);\n    display->drawString(textX, getTextPositions(display)[line++], \"World!\");\n}\n\n} // namespace DebugRenderer\n} // namespace graphics\n#endif\n"
  },
  {
    "path": "src/graphics/draw/DebugRenderer.h",
    "content": "#pragma once\n\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nnamespace graphics\n{\n\n/// Forward declarations\nclass Screen;\nclass DebugInfo;\n\n/**\n * @brief Debug and diagnostic drawing functions\n *\n * Contains all functions related to drawing debug information,\n * WiFi status, settings screens, and diagnostic data.\n */\nnamespace DebugRenderer\n{\n// Debug frame functions\nvoid drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawFrameSettings(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawFrameWiFi(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n// Trampoline functions for framework callback compatibility\nvoid drawDebugInfoTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawDebugInfoSettingsTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawDebugInfoWiFiTrampoline(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n// LoRa information display\nvoid drawLoRaFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n// System screen display\nvoid drawSystemScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n// Chirpy screen display\nvoid drawChirpy(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n} // namespace DebugRenderer\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/draw/DrawRenderers.h",
    "content": "#pragma once\n\n/**\n * @brief Master include file for all Screen draw renderers\n *\n * This file includes all the individual renderer headers to provide\n * a convenient single include for accessing all draw functions.\n */\n\n#include \"graphics/draw/ClockRenderer.h\"\n#include \"graphics/draw/CompassRenderer.h\"\n#include \"graphics/draw/DebugRenderer.h\"\n#include \"graphics/draw/NodeListRenderer.h\"\n#include \"graphics/draw/UIRenderer.h\"\n\nnamespace graphics\n{\n\n/**\n * @brief Collection of all draw renderers\n *\n * This namespace provides access to all the specialized rendering\n * functions organized by category.\n */\nnamespace DrawRenderers\n{\n// Re-export all renderer namespaces for convenience\nusing namespace ClockRenderer;\nusing namespace CompassRenderer;\nusing namespace DebugRenderer;\nusing namespace NodeListRenderer;\n\n} // namespace DrawRenderers\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/draw/MenuHandler.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"ClockRenderer.h\"\n#include \"Default.h\"\n#include \"GPS.h\"\n#include \"MenuHandler.h\"\n#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"MessageStore.h\"\n#include \"NodeDB.h\"\n#include \"buzz.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/draw/MessageRenderer.h\"\n#include \"graphics/draw/UIRenderer.h\"\n#include \"input/RotaryEncoderInterruptImpl1.h\"\n#include \"input/UpDownInterruptImpl1.h\"\n#include \"main.h\"\n#include \"mesh/Default.h\"\n#include \"mesh/MeshTypes.h\"\n#include \"modules/AdminModule.h\"\n#include \"modules/CannedMessageModule.h\"\n#include \"modules/ExternalNotificationModule.h\"\n#include \"modules/KeyVerificationModule.h\"\n#include \"modules/TraceRouteModule.h\"\n#include <algorithm>\n#include <array>\n#include <cmath>\n#include <functional>\n#include <utility>\n\nextern uint16_t TFT_MESH;\n\nnamespace graphics\n{\n\nnamespace\n{\n\n// Caller must ensure the provided options array outlives the banner callback.\ntemplate <typename T, size_t N, typename Callback>\nBannerOverlayOptions createStaticBannerOptions(const char *message, const MenuOption<T> (&options)[N],\n                                               std::array<const char *, N> &labels, Callback &&onSelection)\n{\n    for (size_t i = 0; i < N; ++i) {\n        labels[i] = options[i].label;\n    }\n\n    const MenuOption<T> *optionsPtr = options;\n    auto callback = std::function<void(const MenuOption<T> &, int)>(std::forward<Callback>(onSelection));\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = message;\n    bannerOptions.optionsArrayPtr = labels.data();\n    bannerOptions.optionsCount = static_cast<uint8_t>(N);\n    bannerOptions.bannerCallback = [optionsPtr, callback](int selected) -> void { callback(optionsPtr[selected], selected); };\n    return bannerOptions;\n}\n\n} // namespace\n\nmenuHandler::screenMenus menuHandler::menuQueue = MenuNone;\nuint32_t menuHandler::pickedNodeNum = 0;\nbool test_enabled = false;\nuint8_t test_count = 0;\n\nvoid menuHandler::loraMenu()\n{\n    static const char *optionsArray[] = {\"Back\", \"Device Role\", \"Radio Preset\", \"Frequency Slot\", \"LoRa Region\"};\n    enum optionsNumbers { Back = 0, DeviceRolePicker = 1, RadioPresetPicker = 2, FrequencySlot = 3, LoraPicker = 4 };\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"LoRa Actions\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 5;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Back) {\n            // No action\n        } else if (selected == DeviceRolePicker) {\n            menuHandler::menuQueue = menuHandler::DeviceRolePicker;\n        } else if (selected == RadioPresetPicker) {\n            menuHandler::menuQueue = menuHandler::RadioPresetPicker;\n        } else if (selected == FrequencySlot) {\n            menuHandler::menuQueue = menuHandler::FrequencySlot;\n        } else if (selected == LoraPicker) {\n            menuHandler::menuQueue = menuHandler::LoraPicker;\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::OnboardMessage()\n{\n    static const char *optionsArray[] = {\"OK\", \"Got it!\"};\n    enum optionsNumbers { OK, got };\n    BannerOverlayOptions bannerOptions;\n#if HAS_TFT\n    bannerOptions.message = \"Welcome to Meshtastic!\\nSwipe to navigate and\\nlong press to select\\nor open a menu.\";\n#elif defined(BUTTON_PIN)\n    bannerOptions.message = \"Welcome to Meshtastic!\\nClick to navigate and\\nlong press to select\\nor open a menu.\";\n#else\n    bannerOptions.message = \"Welcome to Meshtastic!\\nUse the Select button\\nto open menus\\nand make selections.\";\n#endif\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 2;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        menuHandler::menuQueue = menuHandler::NoTimeoutLoraPicker;\n        screen->runNow();\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::LoraRegionPicker(uint32_t duration)\n{\n    static const LoraRegionOption regionOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"US\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_US},\n        {\"EU_433\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_EU_433},\n        {\"EU_868\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_EU_868},\n        {\"CN\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_CN},\n        {\"JP\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_JP},\n        {\"ANZ\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_ANZ},\n        {\"KR\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_KR},\n        {\"TW\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_TW},\n        {\"RU\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_RU},\n        {\"IN\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_IN},\n        {\"NZ_865\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_NZ_865},\n        {\"TH\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_TH},\n        {\"LORA_24\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_LORA_24},\n        {\"UA_433\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_UA_433},\n        {\"UA_868\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_UA_868},\n        {\"MY_433\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_MY_433},\n        {\"MY_919\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_MY_919},\n        {\"SG_923\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_SG_923},\n        {\"PH_433\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_PH_433},\n        {\"PH_868\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_PH_868},\n        {\"PH_915\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_PH_915},\n        {\"ANZ_433\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_ANZ_433},\n        {\"KZ_433\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_KZ_433},\n        {\"KZ_863\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_KZ_863},\n        {\"NP_865\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_NP_865},\n        {\"BR_902\", OptionsAction::Select, meshtastic_Config_LoRaConfig_RegionCode_BR_902},\n    };\n\n    constexpr size_t regionCount = sizeof(regionOptions) / sizeof(regionOptions[0]);\n    static std::array<const char *, regionCount> regionLabels{};\n\n    const char *bannerMessage = \"Set the LoRa region\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerMessage = \"LoRa Region\";\n    }\n\n    auto bannerOptions =\n        createStaticBannerOptions(bannerMessage, regionOptions, regionLabels, [](const LoraRegionOption &option, int) -> void {\n            if (!option.hasValue) {\n                return;\n            }\n\n            auto selectedRegion = option.value;\n            if (config.lora.region == selectedRegion) {\n                return;\n            }\n\n            config.lora.region = selectedRegion;\n            auto changes = SEGMENT_CONFIG;\n\n#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI)\n            if (crypto) {\n                crypto->ensurePkiKeys(config.security, owner);\n            }\n#endif\n            config.lora.tx_enabled = true;\n            initRegion();\n            if (myRegion->dutyCycle < 100) {\n                config.lora.ignore_mqtt = true; // Ignore MQTT by default if region has a duty cycle limit\n            }\n\n            if (strncmp(moduleConfig.mqtt.root, default_mqtt_root, strlen(default_mqtt_root)) == 0) {\n                //  Default broker is in use, so subscribe to the appropriate MQTT root topic for this region\n                sprintf(moduleConfig.mqtt.root, \"%s/%s\", default_mqtt_root, myRegion->name);\n                changes |= SEGMENT_MODULECONFIG;\n            }\n\n            service->reloadConfig(changes);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        });\n\n    bannerOptions.durationMs = duration;\n\n    int initialSelection = 0;\n    for (size_t i = 0; i < regionCount; ++i) {\n        if (regionOptions[i].hasValue && regionOptions[i].value == config.lora.region) {\n            initialSelection = static_cast<int>(i);\n            break;\n        }\n    }\n    bannerOptions.InitialSelected = initialSelection;\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::deviceRolePicker()\n{\n    static const char *optionsArray[] = {\"Back\", \"Client\", \"Client Mute\", \"Lost and Found\", \"Tracker\"};\n    enum optionsNumbers {\n        Back = 0,\n        devicerole_client = 1,\n        devicerole_clientmute = 2,\n        devicerole_lostandfound = 3,\n        devicerole_tracker = 4\n    };\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Device Role\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 5;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Back) {\n            menuHandler::menuQueue = menuHandler::LoraMenu;\n            screen->runNow();\n            return;\n        } else if (selected == devicerole_client) {\n            config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n        } else if (selected == devicerole_clientmute) {\n            config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE;\n        } else if (selected == devicerole_lostandfound) {\n            config.device.role = meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND;\n        } else if (selected == devicerole_tracker) {\n            config.device.role = meshtastic_Config_DeviceConfig_Role_TRACKER;\n        }\n        service->reloadConfig(SEGMENT_CONFIG);\n        rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::FrequencySlotPicker()\n{\n\n    enum ReplyOptions : int { Back = -1 };\n    constexpr int MAX_CHANNEL_OPTIONS = 202;\n    static const char *optionsArray[MAX_CHANNEL_OPTIONS];\n    static int optionsEnumArray[MAX_CHANNEL_OPTIONS];\n    static char channelText[MAX_CHANNEL_OPTIONS - 1][12];\n    int options = 0;\n    optionsArray[options] = \"Back\";\n    optionsEnumArray[options++] = Back;\n    optionsArray[options] = \"Slot 0 (Auto)\";\n    optionsEnumArray[options++] = 0;\n\n    // Calculate number of channels (copied from RadioInterface::applyModemConfig())\n\n    meshtastic_Config_LoRaConfig &loraConfig = config.lora;\n    double bw = loraConfig.use_preset ? modemPresetToBwKHz(loraConfig.modem_preset, myRegion->wideLora)\n                                      : bwCodeToKHz(loraConfig.bandwidth);\n\n    uint32_t numChannels = 0;\n    if (myRegion) {\n        // Match RadioInterface::applyModemConfig(): include padding, add spacing in numerator, and use round()\n        const double spacing = myRegion->profile->spacing;\n        const double padding = myRegion->profile->padding;\n        const double channelBandwidthMHz = bw / 1000.0;\n        const double numerator = (myRegion->freqEnd - myRegion->freqStart) + spacing;\n        const double denominator = spacing + (padding * 2) + channelBandwidthMHz;\n        if (denominator > 0.0) {\n            numChannels = static_cast<uint32_t>(round(numerator / denominator));\n        } else {\n            LOG_WARN(\"Invalid region configuration: non-positive channel spacing/width\");\n        }\n    } else {\n        LOG_WARN(\"Region not set, cannot calculate number of channels\");\n        return;\n    }\n\n    if (numChannels > (uint32_t)(MAX_CHANNEL_OPTIONS - 2))\n        numChannels = (uint32_t)(MAX_CHANNEL_OPTIONS - 2);\n\n    for (uint32_t ch = 1; ch <= numChannels; ch++) {\n        snprintf(channelText[ch - 1], sizeof(channelText[ch - 1]), \"Slot %lu\", (unsigned long)ch);\n        optionsArray[options] = channelText[ch - 1];\n        optionsEnumArray[options++] = (int)ch;\n    }\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Frequency Slot\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.optionsCount = options;\n\n    // Start highlight on current channel if possible, otherwise on \"1\"\n    int initial = (int)config.lora.channel_num + 1;\n    if (initial < 2 || initial > (int)numChannels + 1)\n        initial = 1;\n    bannerOptions.InitialSelected = initial;\n\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Back) {\n            menuHandler::menuQueue = menuHandler::LoraMenu;\n            screen->runNow();\n            return;\n        }\n\n        config.lora.channel_num = selected;\n        service->reloadConfig(SEGMENT_CONFIG);\n        rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n    };\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::radioPresetPicker()\n{\n    static const RadioPresetOption presetOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"LongTurbo\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO},\n        {\"LongModerate\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE},\n        {\"LongFast\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST},\n        {\"MediumSlow\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW},\n        {\"MediumFast\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST},\n        {\"ShortSlow\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW},\n        {\"ShortFast\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST},\n        {\"ShortTurbo\", OptionsAction::Select, meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO},\n    };\n\n    constexpr size_t presetCount = sizeof(presetOptions) / sizeof(presetOptions[0]);\n    static std::array<const char *, presetCount> presetLabels{};\n\n    auto bannerOptions =\n        createStaticBannerOptions(\"Radio Preset\", presetOptions, presetLabels, [](const RadioPresetOption &option, int) -> void {\n            if (option.action == OptionsAction::Back) {\n                menuHandler::menuQueue = menuHandler::LoraMenu;\n                screen->runNow();\n                return;\n            }\n\n            if (!option.hasValue) {\n                return;\n            }\n\n            config.lora.modem_preset = option.value;\n            config.lora.channel_num = 0;        // Reset to default channel for the preset\n            config.lora.override_frequency = 0; // Clear any custom frequency\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        });\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::twelveHourPicker()\n{\n    static const char *optionsArray[] = {\"Back\", \"12-hour\", \"24-hour\"};\n    enum optionsNumbers { Back = 0, twelve = 1, twentyfour = 2 };\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Time Format\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 3;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Back) {\n            menuHandler::menuQueue = menuHandler::ClockMenu;\n            screen->runNow();\n        } else if (selected == twelve) {\n            config.display.use_12h_clock = true;\n        } else {\n            config.display.use_12h_clock = false;\n        }\n        service->reloadConfig(SEGMENT_CONFIG);\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\n// Reusable confirmation prompt function\nvoid menuHandler::showConfirmationBanner(const char *message, std::function<void()> onConfirm)\n{\n    static const char *confirmOptions[] = {\"No\", \"Yes\"};\n    BannerOverlayOptions confirmBanner;\n    confirmBanner.message = message;\n    confirmBanner.optionsArrayPtr = confirmOptions;\n    confirmBanner.optionsCount = 2;\n    confirmBanner.bannerCallback = [onConfirm](int confirmSelected) -> void {\n        if (confirmSelected == 1) {\n            onConfirm();\n        }\n    };\n    screen->showOverlayBanner(confirmBanner);\n}\n\nvoid menuHandler::clockFacePicker()\n{\n    static const ClockFaceOption clockFaceOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"Digital\", OptionsAction::Select, false},\n        {\"Analog\", OptionsAction::Select, true},\n    };\n\n    constexpr size_t clockFaceCount = sizeof(clockFaceOptions) / sizeof(clockFaceOptions[0]);\n    static std::array<const char *, clockFaceCount> clockFaceLabels{};\n\n    auto bannerOptions = createStaticBannerOptions(\"Which Face?\", clockFaceOptions, clockFaceLabels,\n                                                   [](const ClockFaceOption &option, int) -> void {\n                                                       if (option.action == OptionsAction::Back) {\n                                                           menuHandler::menuQueue = menuHandler::ClockMenu;\n                                                           screen->runNow();\n                                                           return;\n                                                       }\n\n                                                       if (!option.hasValue) {\n                                                           return;\n                                                       }\n\n                                                       if (uiconfig.is_clockface_analog == option.value) {\n                                                           return;\n                                                       }\n\n                                                       uiconfig.is_clockface_analog = option.value;\n                                                       saveUIConfig();\n                                                       screen->setFrames(Screen::FOCUS_CLOCK);\n                                                   });\n\n    bannerOptions.InitialSelected = uiconfig.is_clockface_analog ? 2 : 1;\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::TZPicker()\n{\n    static const TimezoneOption timezoneOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"US/Hawaii\", OptionsAction::Select, \"HST10\"},\n        {\"US/Alaska\", OptionsAction::Select, \"AKST9AKDT,M3.2.0,M11.1.0\"},\n        {\"US/Pacific\", OptionsAction::Select, \"PST8PDT,M3.2.0,M11.1.0\"},\n        {\"US/Arizona\", OptionsAction::Select, \"MST7\"},\n        {\"US/Mountain\", OptionsAction::Select, \"MST7MDT,M3.2.0,M11.1.0\"},\n        {\"US/Central\", OptionsAction::Select, \"CST6CDT,M3.2.0,M11.1.0\"},\n        {\"US/Eastern\", OptionsAction::Select, \"EST5EDT,M3.2.0,M11.1.0\"},\n        {\"BR/Brasilia\", OptionsAction::Select, \"BRT3\"},\n        {\"UTC\", OptionsAction::Select, \"UTC0\"},\n        {\"EU/Western\", OptionsAction::Select, \"GMT0BST,M3.5.0/1,M10.5.0\"},\n        {\"EU/Central\", OptionsAction::Select, \"CET-1CEST,M3.5.0,M10.5.0/3\"},\n        {\"EU/Eastern\", OptionsAction::Select, \"EET-2EEST,M3.5.0/3,M10.5.0/4\"},\n        {\"Asia/Kolkata\", OptionsAction::Select, \"IST-5:30\"},\n        {\"Asia/Hong_Kong\", OptionsAction::Select, \"HKT-8\"},\n        {\"AU/AWST\", OptionsAction::Select, \"AWST-8\"},\n        {\"AU/ACST\", OptionsAction::Select, \"ACST-9:30ACDT,M10.1.0,M4.1.0/3\"},\n        {\"AU/AEST\", OptionsAction::Select, \"AEST-10AEDT,M10.1.0,M4.1.0/3\"},\n        {\"Pacific/NZ\", OptionsAction::Select, \"NZST-12NZDT,M9.5.0,M4.1.0/3\"},\n    };\n\n    constexpr size_t timezoneCount = sizeof(timezoneOptions) / sizeof(timezoneOptions[0]);\n    static std::array<const char *, timezoneCount> timezoneLabels{};\n\n    auto bannerOptions = createStaticBannerOptions(\n        \"Pick Timezone\", timezoneOptions, timezoneLabels, [](const TimezoneOption &option, int) -> void {\n            if (option.action == OptionsAction::Back) {\n                menuHandler::menuQueue = menuHandler::ClockMenu;\n                screen->runNow();\n                return;\n            }\n\n            if (!option.hasValue) {\n                return;\n            }\n\n            if (strncmp(config.device.tzdef, option.value, sizeof(config.device.tzdef)) == 0) {\n                return;\n            }\n\n            strncpy(config.device.tzdef, option.value, sizeof(config.device.tzdef));\n            config.device.tzdef[sizeof(config.device.tzdef) - 1] = '\\0';\n\n            setenv(\"TZ\", config.device.tzdef, 1);\n            service->reloadConfig(SEGMENT_CONFIG);\n        });\n\n    int initialSelection = 0;\n    for (size_t i = 0; i < timezoneCount; ++i) {\n        if (timezoneOptions[i].hasValue &&\n            strncmp(config.device.tzdef, timezoneOptions[i].value, sizeof(config.device.tzdef)) == 0) {\n            initialSelection = static_cast<int>(i);\n            break;\n        }\n    }\n    bannerOptions.InitialSelected = initialSelection;\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::clockMenu()\n{\n#if defined(M5STACK_UNITC6L)\n    static const char *optionsArray[] = {\"Back\", \"Time Format\", \"Timezone\"};\n#else\n    static const char *optionsArray[] = {\"Back\", \"Clock Face\", \"Time Format\", \"Timezone\"};\n#endif\n    enum optionsNumbers { Back = 0, Clock = 1, Time = 2, Timezone = 3 };\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Clock Action\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 4;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Clock) {\n            menuHandler::menuQueue = menuHandler::ClockFacePicker;\n            screen->runNow();\n        } else if (selected == Time) {\n            menuHandler::menuQueue = menuHandler::TwelveHourPicker;\n            screen->runNow();\n        } else if (selected == Timezone) {\n            menuHandler::menuQueue = menuHandler::TzPicker;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\nvoid menuHandler::messageResponseMenu()\n{\n    enum optionsNumbers { Back = 0, ViewMode, DeleteMenu, ReplyMenu, MuteChannel, Aloud, enumEnd };\n\n    static const char *optionsArray[enumEnd];\n    static int optionsEnumArray[enumEnd];\n    int options = 0;\n\n    auto mode = graphics::MessageRenderer::getThreadMode();\n    int threadChannel = graphics::MessageRenderer::getThreadChannel();\n\n    optionsArray[options] = \"Back\";\n    optionsEnumArray[options++] = Back;\n\n    // New Reply submenu (replaces Preset and Freetext directly in this menu)\n    optionsArray[options] = \"Reply\";\n    optionsEnumArray[options++] = ReplyMenu;\n\n    optionsArray[options] = \"View Chats\";\n    optionsEnumArray[options++] = ViewMode;\n\n    // If viewing ALL chats, hide “Mute Chat”\n    if (mode != graphics::MessageRenderer::ThreadMode::ALL && mode != graphics::MessageRenderer::ThreadMode::DIRECT) {\n        const uint8_t chIndex = (threadChannel != 0) ? (uint8_t)threadChannel : channels.getPrimaryIndex();\n        const auto &chan = channels.getByIndex(chIndex);\n\n        optionsArray[options] = chan.settings.module_settings.is_muted ? \"Unmute Channel\" : \"Mute Channel\";\n        optionsEnumArray[options++] = MuteChannel;\n    }\n\n    // Delete submenu\n    optionsArray[options] = \"Delete\";\n    optionsEnumArray[options++] = DeleteMenu;\n\n#ifdef HAS_I2S\n    optionsArray[options] = \"Read Aloud\";\n    optionsEnumArray[options++] = Aloud;\n#endif\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Message Action\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Message\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        LOG_DEBUG(\"messageResponseMenu: selected %d\", selected);\n\n        auto mode = graphics::MessageRenderer::getThreadMode();\n        int ch = graphics::MessageRenderer::getThreadChannel();\n        uint32_t peer = graphics::MessageRenderer::getThreadPeer();\n\n        LOG_DEBUG(\"[ReplyCtx] mode=%d ch=%d peer=0x%08x\", (int)mode, ch, (unsigned int)peer);\n\n        if (selected == ViewMode) {\n            menuHandler::menuQueue = menuHandler::MessageViewModeMenu;\n            screen->runNow();\n\n            // Reply submenu\n        } else if (selected == ReplyMenu) {\n            menuHandler::menuQueue = menuHandler::ReplyMenu;\n            screen->runNow();\n\n        } else if (selected == MuteChannel) {\n            const uint8_t chIndex = (ch != 0) ? (uint8_t)ch : channels.getPrimaryIndex();\n            auto &chan = channels.getByIndex(chIndex);\n            if (chan.settings.has_module_settings) {\n                chan.settings.module_settings.is_muted = !chan.settings.module_settings.is_muted;\n                nodeDB->saveToDisk();\n            }\n\n        } else if (selected == DeleteMenu) {\n            menuHandler::menuQueue = menuHandler::DeleteMessagesMenu;\n            screen->runNow();\n\n#ifdef HAS_I2S\n        } else if (selected == Aloud) {\n            const meshtastic_MeshPacket &mp = devicestate.rx_text_message;\n            const char *msg = reinterpret_cast<const char *>(mp.decoded.payload.bytes);\n            audioThread->readAloud(msg);\n#endif\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::replyMenu()\n{\n    enum replyOptions { Back = 0, ReplyPreset, ReplyFreetext, enumEnd };\n\n    static const char *optionsArray[enumEnd];\n    static int optionsEnumArray[enumEnd];\n    int options = 0;\n\n    // Back\n    optionsArray[options] = \"Back\";\n    optionsEnumArray[options++] = Back;\n\n    // Preset reply\n    optionsArray[options] = \"With Preset\";\n    optionsEnumArray[options++] = ReplyPreset;\n\n    // Freetext reply (only when keyboard exists)\n    if (kb_found) {\n        optionsArray[options] = \"With Freetext\";\n        optionsEnumArray[options++] = ReplyFreetext;\n    }\n\n    BannerOverlayOptions bannerOptions;\n\n    // Dynamic title based on thread mode\n    auto mode = graphics::MessageRenderer::getThreadMode();\n    if (mode == graphics::MessageRenderer::ThreadMode::CHANNEL) {\n        bannerOptions.message = \"Reply to Channel\";\n    } else if (mode == graphics::MessageRenderer::ThreadMode::DIRECT) {\n        bannerOptions.message = \"Reply to DM\";\n    } else {\n        // View All\n        bannerOptions.message = \"Reply to Last Msg\";\n    }\n\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.InitialSelected = 1;\n\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        auto mode = graphics::MessageRenderer::getThreadMode();\n        int ch = graphics::MessageRenderer::getThreadChannel();\n        uint32_t peer = graphics::MessageRenderer::getThreadPeer();\n\n        if (selected == Back) {\n            menuHandler::menuQueue = menuHandler::MessageResponseMenu;\n            screen->runNow();\n            return;\n        }\n\n        // Preset reply\n        if (selected == ReplyPreset) {\n\n            if (mode == graphics::MessageRenderer::ThreadMode::CHANNEL) {\n                cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST, ch);\n\n            } else if (mode == graphics::MessageRenderer::ThreadMode::DIRECT) {\n                cannedMessageModule->LaunchWithDestination(peer);\n\n            } else {\n                // Fallback for last received message\n                if (devicestate.rx_text_message.to == NODENUM_BROADCAST) {\n                    cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST, devicestate.rx_text_message.channel);\n                } else {\n                    cannedMessageModule->LaunchWithDestination(devicestate.rx_text_message.from);\n                }\n            }\n\n            return;\n        }\n\n        // Freetext reply\n        if (selected == ReplyFreetext) {\n\n            if (mode == graphics::MessageRenderer::ThreadMode::CHANNEL) {\n                cannedMessageModule->LaunchFreetextWithDestination(NODENUM_BROADCAST, ch);\n\n            } else if (mode == graphics::MessageRenderer::ThreadMode::DIRECT) {\n                cannedMessageModule->LaunchFreetextWithDestination(peer);\n\n            } else {\n                // Fallback for last received message\n                if (devicestate.rx_text_message.to == NODENUM_BROADCAST) {\n                    cannedMessageModule->LaunchFreetextWithDestination(NODENUM_BROADCAST, devicestate.rx_text_message.channel);\n                } else {\n                    cannedMessageModule->LaunchFreetextWithDestination(devicestate.rx_text_message.from);\n                }\n            }\n\n            return;\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\nvoid menuHandler::deleteMessagesMenu()\n{\n    enum optionsNumbers { Back = 0, DeleteOldest, DeleteThis, DeleteAll, enumEnd };\n\n    static const char *optionsArray[enumEnd];\n    static int optionsEnumArray[enumEnd];\n    int options = 0;\n\n    auto mode = graphics::MessageRenderer::getThreadMode();\n\n    optionsArray[options] = \"Back\";\n    optionsEnumArray[options++] = Back;\n\n    optionsArray[options] = \"Delete Oldest\";\n    optionsEnumArray[options++] = DeleteOldest;\n\n    // If viewing ALL chats → hide “Delete This Chat”\n    if (mode != graphics::MessageRenderer::ThreadMode::ALL) {\n        optionsArray[options] = \"Delete This Chat\";\n        optionsEnumArray[options++] = DeleteThis;\n    }\n    if (currentResolution == ScreenResolution::UltraLow) {\n        optionsArray[options] = \"Delete All\";\n    } else {\n        optionsArray[options] = \"Delete All Chats\";\n    }\n    optionsEnumArray[options++] = DeleteAll;\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Delete Messages\";\n\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.bannerCallback = [mode](int selected) -> void {\n        int ch = graphics::MessageRenderer::getThreadChannel();\n        uint32_t peer = graphics::MessageRenderer::getThreadPeer();\n\n        if (selected == Back) {\n            menuHandler::menuQueue = menuHandler::MessageResponseMenu;\n            screen->runNow();\n            return;\n        }\n\n        if (selected == DeleteAll) {\n            LOG_INFO(\"Deleting all messages\");\n            messageStore.clearAllMessages();\n            graphics::MessageRenderer::clearThreadRegistries();\n            graphics::MessageRenderer::clearMessageCache();\n            return;\n        }\n\n        if (selected == DeleteOldest) {\n            LOG_INFO(\"Deleting oldest message\");\n\n            if (mode == graphics::MessageRenderer::ThreadMode::ALL) {\n                messageStore.deleteOldestMessage();\n            } else if (mode == graphics::MessageRenderer::ThreadMode::CHANNEL) {\n                messageStore.deleteOldestMessageInChannel(ch);\n            } else if (mode == graphics::MessageRenderer::ThreadMode::DIRECT) {\n                messageStore.deleteOldestMessageWithPeer(peer);\n            }\n            return;\n        }\n\n        // This only appears in non-ALL modes\n        if (selected == DeleteThis) {\n            LOG_INFO(\"Deleting all messages in this thread\");\n\n            if (mode == graphics::MessageRenderer::ThreadMode::CHANNEL) {\n                messageStore.deleteAllMessagesInChannel(ch);\n            } else if (mode == graphics::MessageRenderer::ThreadMode::DIRECT) {\n                messageStore.deleteAllMessagesWithPeer(peer);\n            }\n            return;\n        }\n    };\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::messageViewModeMenu()\n{\n    auto encodeChannelId = [](int ch) -> int { return 100 + ch; };\n    auto isChannelSel = [](int id) -> bool { return id >= 100 && id < 200; };\n\n    static std::vector<std::string> labels;\n    static std::vector<int> ids;\n    static std::vector<uint32_t> idToPeer; // DM lookup\n\n    labels.clear();\n    ids.clear();\n    idToPeer.clear();\n\n    labels.push_back(\"Back\");\n    ids.push_back(-1);\n    labels.push_back(\"View All Chats\");\n    ids.push_back(-2);\n\n    // Channels with messages\n    for (int ch = 0; ch < 8; ++ch) {\n        auto msgs = messageStore.getChannelMessages((uint8_t)ch);\n        if (!msgs.empty()) {\n            char buf[40];\n            const char *cname = channels.getName(ch);\n            snprintf(buf, sizeof(buf), cname && cname[0] ? \"#%s\" : \"#Ch%d\", cname ? cname : \"\", ch);\n            labels.push_back(buf);\n            ids.push_back(encodeChannelId(ch));\n            LOG_DEBUG(\"messageViewModeMenu: Added live channel %s (id=%d)\", buf, encodeChannelId(ch));\n        }\n    }\n\n    // Registry channels\n    for (int ch : graphics::MessageRenderer::getSeenChannels()) {\n        if (ch < 0 || ch >= 8)\n            continue;\n        auto msgs = messageStore.getChannelMessages((uint8_t)ch);\n        if (msgs.empty())\n            continue;\n        int enc = encodeChannelId(ch);\n        if (std::find(ids.begin(), ids.end(), enc) == ids.end()) {\n            char buf[40];\n            const char *cname = channels.getName(ch);\n            snprintf(buf, sizeof(buf), cname && cname[0] ? \"#%s\" : \"#Ch%d\", cname ? cname : \"\", ch);\n            labels.push_back(buf);\n            ids.push_back(enc);\n            LOG_DEBUG(\"messageViewModeMenu: Added registry channel %s (id=%d)\", buf, enc);\n        }\n    }\n\n    // Gather unique peers\n    auto dms = messageStore.getDirectMessages();\n    std::vector<uint32_t> uniquePeers;\n    for (const auto &m : dms) {\n        uint32_t peer = (m.sender == nodeDB->getNodeNum()) ? m.dest : m.sender;\n        if (peer != nodeDB->getNodeNum() && std::find(uniquePeers.begin(), uniquePeers.end(), peer) == uniquePeers.end())\n            uniquePeers.push_back(peer);\n    }\n    for (uint32_t peer : graphics::MessageRenderer::getSeenPeers()) {\n        if (peer != nodeDB->getNodeNum() && std::find(uniquePeers.begin(), uniquePeers.end(), peer) == uniquePeers.end())\n            uniquePeers.push_back(peer);\n    }\n    std::sort(uniquePeers.begin(), uniquePeers.end());\n\n    // Encode peers\n    for (size_t i = 0; i < uniquePeers.size(); ++i) {\n        uint32_t peer = uniquePeers[i];\n        auto node = nodeDB->getMeshNode(peer);\n        std::string name;\n        if (node && node->has_user)\n            name = sanitizeString(node->user.long_name).substr(0, 15);\n        else {\n            char buf[20];\n            snprintf(buf, sizeof(buf), \"Node %08X\", peer);\n            name = buf;\n        }\n        labels.push_back(\"@\" + name);\n        int encPeer = 1000 + (int)idToPeer.size();\n        ids.push_back(encPeer);\n        idToPeer.push_back(peer);\n        LOG_DEBUG(\"messageViewModeMenu: Added DM %s peer=0x%08x id=%d\", name.c_str(), (unsigned int)peer, encPeer);\n    }\n\n    // Active ID\n    int activeId = -2;\n    auto mode = graphics::MessageRenderer::getThreadMode();\n    if (mode == graphics::MessageRenderer::ThreadMode::CHANNEL)\n        activeId = encodeChannelId(graphics::MessageRenderer::getThreadChannel());\n    else if (mode == graphics::MessageRenderer::ThreadMode::DIRECT) {\n        uint32_t cur = graphics::MessageRenderer::getThreadPeer();\n        for (size_t i = 0; i < idToPeer.size(); ++i)\n            if (idToPeer[i] == cur) {\n                activeId = 1000 + (int)i;\n                break;\n            }\n    }\n\n    LOG_DEBUG(\"messageViewModeMenu: Active thread id=%d\", activeId);\n\n    // Build banner\n    static std::vector<const char *> options;\n    static std::vector<int> optionIds;\n    options.clear();\n    optionIds.clear();\n\n    int initialIndex = 0;\n    for (size_t i = 0; i < labels.size(); i++) {\n        options.push_back(labels[i].c_str());\n        optionIds.push_back(ids[i]);\n        if (ids[i] == activeId)\n            initialIndex = (int)i;\n    }\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Select Conversation\";\n    bannerOptions.optionsArrayPtr = options.data();\n    bannerOptions.optionsEnumPtr = optionIds.data();\n    bannerOptions.optionsCount = options.size();\n    bannerOptions.InitialSelected = initialIndex;\n\n    bannerOptions.bannerCallback = [=](int selected) -> void {\n        LOG_DEBUG(\"messageViewModeMenu: selected=%d\", selected);\n        if (selected == -1) {\n            menuHandler::menuQueue = menuHandler::MessageResponseMenu;\n            screen->runNow();\n        } else if (selected == -2) {\n            graphics::MessageRenderer::setThreadMode(graphics::MessageRenderer::ThreadMode::ALL);\n        } else if (isChannelSel(selected)) {\n            int ch = selected - 100;\n            graphics::MessageRenderer::setThreadMode(graphics::MessageRenderer::ThreadMode::CHANNEL, ch);\n        } else if (selected >= 1000) {\n            int idx = selected - 1000;\n            if (idx >= 0 && (size_t)idx < idToPeer.size()) {\n                uint32_t peer = idToPeer[idx];\n                graphics::MessageRenderer::setThreadMode(graphics::MessageRenderer::ThreadMode::DIRECT, -1, peer);\n            }\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::homeBaseMenu()\n{\n    enum optionsNumbers { Back, Mute, Backlight, Position, Preset, Freetext, Sleep, enumEnd };\n\n    static const char *optionsArray[enumEnd] = {\"Back\"};\n    static int optionsEnumArray[enumEnd] = {Back};\n    int options = 1;\n\n    if (moduleConfig.external_notification.enabled && externalNotificationModule &&\n        config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DISABLED) {\n        if (!externalNotificationModule->getMute()) {\n            optionsArray[options] = \"Temporarily Mute\";\n        } else {\n            optionsArray[options] = \"Unmute\";\n        }\n        optionsEnumArray[options++] = Mute;\n    }\n#if defined(PIN_EINK_EN) || defined(PCA_PIN_EINK_EN)\n    optionsArray[options] = \"Toggle Backlight\";\n    optionsEnumArray[options++] = Backlight;\n#else\n    optionsArray[options] = \"Sleep Screen\";\n    optionsEnumArray[options++] = Sleep;\n#endif\n    if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n        optionsArray[options] = \"Send Position\";\n    } else {\n        optionsArray[options] = \"Send Node Info\";\n    }\n    optionsEnumArray[options++] = Position;\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Home Action\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Home\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Mute) {\n            if (moduleConfig.external_notification.enabled && externalNotificationModule) {\n                externalNotificationModule->setMute(!externalNotificationModule->getMute());\n                IF_SCREEN(if (!externalNotificationModule->getMute()) externalNotificationModule->stopNow();)\n            }\n        } else if (selected == Backlight) {\n            screen->setOn(false);\n#if defined(PIN_EINK_EN)\n            if (uiconfig.screen_brightness == 1) {\n                uiconfig.screen_brightness = 0;\n                digitalWrite(PIN_EINK_EN, LOW);\n            } else {\n                uiconfig.screen_brightness = 1;\n                digitalWrite(PIN_EINK_EN, HIGH);\n            }\n            saveUIConfig();\n#elif defined(PCA_PIN_EINK_EN)\n            if (uiconfig.screen_brightness > 0) {\n                uiconfig.screen_brightness = 0;\n                io.digitalWrite(PCA_PIN_EINK_EN, LOW);\n            } else {\n                uiconfig.screen_brightness = 1;\n                io.digitalWrite(PCA_PIN_EINK_EN, HIGH);\n            }\n            saveUIConfig();\n#endif\n        } else if (selected == Sleep) {\n            screen->setOn(false);\n        } else if (selected == Position) {\n            service->refreshLocalMeshNode();\n            if (service->trySendPosition(NODENUM_BROADCAST, true)) {\n                IF_SCREEN(screen->showSimpleBanner(\"Position\\nSent\", 3000));\n            } else {\n                IF_SCREEN(screen->showSimpleBanner(\"Node Info\\nSent\", 3000));\n            }\n        } else if (selected == Preset) {\n            cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);\n        } else if (selected == Freetext) {\n            cannedMessageModule->LaunchFreetextWithDestination(NODENUM_BROADCAST);\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::textMessageMenu()\n{\n    cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);\n}\n\nvoid menuHandler::textMessageBaseMenu()\n{\n    enum optionsNumbers { Back, Preset, Freetext, enumEnd };\n\n    static const char *optionsArray[enumEnd] = {\"Back\"};\n    static int optionsEnumArray[enumEnd] = {Back};\n    int options = 1;\n    optionsArray[options] = \"New Preset Msg\";\n    optionsEnumArray[options++] = Preset;\n    if (kb_found) {\n        optionsArray[options] = \"New Freetext Msg\";\n        optionsEnumArray[options++] = Freetext;\n    }\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Message Action\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Preset) {\n            cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);\n        } else if (selected == Freetext) {\n            cannedMessageModule->LaunchFreetextWithDestination(NODENUM_BROADCAST);\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::systemBaseMenu()\n{\n    enum optionsNumbers { Back, Notifications, ScreenOptions, Bluetooth, WiFiToggle, PowerMenu, Test, enumEnd };\n    static const char *optionsArray[enumEnd] = {\"Back\"};\n    static int optionsEnumArray[enumEnd] = {Back};\n    int options = 1;\n\n    optionsArray[options] = \"Notifications\";\n    optionsEnumArray[options++] = Notifications;\n\n    optionsArray[options] = \"Display Options\";\n    optionsEnumArray[options++] = ScreenOptions;\n\n    if (currentResolution == ScreenResolution::UltraLow) {\n        optionsArray[options] = \"Bluetooth\";\n    } else {\n        optionsArray[options] = \"Bluetooth Toggle\";\n    }\n    optionsEnumArray[options++] = Bluetooth;\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n    optionsArray[options] = \"WiFi Toggle\";\n    optionsEnumArray[options++] = WiFiToggle;\n#endif\n\n    if (currentResolution == ScreenResolution::UltraLow) {\n        optionsArray[options] = \"Power\";\n    } else {\n        optionsArray[options] = \"Reboot/Shutdown\";\n    }\n    optionsEnumArray[options++] = PowerMenu;\n\n    if (test_enabled) {\n        optionsArray[options] = \"Test Menu\";\n        optionsEnumArray[options++] = Test;\n    }\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"System Action\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"System\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Notifications) {\n            menuHandler::menuQueue = menuHandler::BuzzerModeMenuPicker;\n            screen->runNow();\n        } else if (selected == ScreenOptions) {\n            menuHandler::menuQueue = menuHandler::ScreenOptionsMenu;\n            screen->runNow();\n        } else if (selected == PowerMenu) {\n            menuHandler::menuQueue = menuHandler::PowerMenu;\n            screen->runNow();\n        } else if (selected == Test) {\n            menuHandler::menuQueue = menuHandler::TestMenu;\n            screen->runNow();\n        } else if (selected == Bluetooth) {\n            menuQueue = BluetoothToggleMenu;\n            screen->runNow();\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n        } else if (selected == WiFiToggle) {\n            menuQueue = WifiToggleMenu;\n            screen->runNow();\n#endif\n        } else if (selected == Back && !test_enabled) {\n            test_count++;\n            if (test_count > 4) {\n                test_enabled = true;\n            }\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::favoriteBaseMenu()\n{\n    enum optionsNumbers { Back, Preset, Freetext, GoToChat, Remove, TraceRoute, enumEnd };\n\n    static const char *optionsArray[enumEnd] = {\"Back\"};\n    static int optionsEnumArray[enumEnd] = {Back};\n    int options = 1;\n\n    // Only show \"View Conversation\" if a message exists with this node\n    uint32_t peer = graphics::UIRenderer::currentFavoriteNodeNum;\n    bool hasConversation = false;\n    for (const auto &m : messageStore.getMessages()) {\n        if ((m.sender == peer || m.dest == peer)) {\n            hasConversation = true;\n            break;\n        }\n    }\n    if (hasConversation) {\n        optionsArray[options] = \"Go To Chat\";\n        optionsEnumArray[options++] = GoToChat;\n    }\n    if (currentResolution == ScreenResolution::UltraLow) {\n        optionsArray[options] = \"New Preset\";\n    } else {\n        optionsArray[options] = \"New Preset Msg\";\n    }\n    optionsEnumArray[options++] = Preset;\n\n    if (kb_found) {\n        optionsArray[options] = \"New Freetext Msg\";\n        optionsEnumArray[options++] = Freetext;\n    }\n\n    if (currentResolution != ScreenResolution::UltraLow) {\n        optionsArray[options] = \"Trace Route\";\n        optionsEnumArray[options++] = TraceRoute;\n    }\n    optionsArray[options] = \"Remove Favorite\";\n    optionsEnumArray[options++] = Remove;\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Favorites Action\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Favorites\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Preset) {\n            cannedMessageModule->LaunchWithDestination(graphics::UIRenderer::currentFavoriteNodeNum);\n        } else if (selected == Freetext) {\n            cannedMessageModule->LaunchFreetextWithDestination(graphics::UIRenderer::currentFavoriteNodeNum);\n        }\n        // Handle new Go To Thread action\n        else if (selected == GoToChat) {\n            // Switch thread to direct conversation with this node\n            graphics::MessageRenderer::setThreadMode(graphics::MessageRenderer::ThreadMode::DIRECT, -1,\n                                                     graphics::UIRenderer::currentFavoriteNodeNum);\n\n            // Manually create and send a UIFrameEvent to trigger the jump\n            UIFrameEvent evt;\n            evt.action = UIFrameEvent::Action::SWITCH_TO_TEXTMESSAGE;\n            screen->handleUIFrameEvent(&evt);\n        } else if (selected == Remove) {\n            menuHandler::menuQueue = menuHandler::RemoveFavorite;\n            screen->runNow();\n        } else if (selected == TraceRoute) {\n            if (traceRouteModule) {\n                traceRouteModule->launch(graphics::UIRenderer::currentFavoriteNodeNum);\n            }\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::positionBaseMenu()\n{\n    enum class PositionAction {\n        GpsToggle,\n        GpsFormat,\n        CompassMenu,\n        CompassCalibrate,\n        GPSSmartPosition,\n        GPSUpdateInterval,\n        GPSPositionBroadcast\n    };\n\n    static const PositionMenuOption baseOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"On/Off Toggle\", OptionsAction::Select, static_cast<int>(PositionAction::GpsToggle)},\n        {\"Format\", OptionsAction::Select, static_cast<int>(PositionAction::GpsFormat)},\n        {\"Smart Position\", OptionsAction::Select, static_cast<int>(PositionAction::GPSSmartPosition)},\n        {\"Update Interval\", OptionsAction::Select, static_cast<int>(PositionAction::GPSUpdateInterval)},\n        {\"Broadcast Interval\", OptionsAction::Select, static_cast<int>(PositionAction::GPSPositionBroadcast)},\n        {\"Compass\", OptionsAction::Select, static_cast<int>(PositionAction::CompassMenu)},\n    };\n\n    static const PositionMenuOption calibrateOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"On/Off Toggle\", OptionsAction::Select, static_cast<int>(PositionAction::GpsToggle)},\n        {\"Format\", OptionsAction::Select, static_cast<int>(PositionAction::GpsFormat)},\n        {\"Smart Position\", OptionsAction::Select, static_cast<int>(PositionAction::GPSSmartPosition)},\n        {\"Update Interval\", OptionsAction::Select, static_cast<int>(PositionAction::GPSUpdateInterval)},\n        {\"Broadcast Interval\", OptionsAction::Select, static_cast<int>(PositionAction::GPSPositionBroadcast)},\n        {\"Compass\", OptionsAction::Select, static_cast<int>(PositionAction::CompassMenu)},\n        {\"Compass Calibrate\", OptionsAction::Select, static_cast<int>(PositionAction::CompassCalibrate)},\n    };\n\n    constexpr size_t baseCount = sizeof(baseOptions) / sizeof(baseOptions[0]);\n    constexpr size_t calibrateCount = sizeof(calibrateOptions) / sizeof(calibrateOptions[0]);\n    static std::array<const char *, baseCount> baseLabels{};\n    static std::array<const char *, calibrateCount> calibrateLabels{};\n\n    auto onSelection = [](const PositionMenuOption &option, int) -> void {\n        if (option.action == OptionsAction::Back) {\n            return;\n        }\n\n        if (!option.hasValue) {\n            return;\n        }\n\n        auto action = static_cast<PositionAction>(option.value);\n        switch (action) {\n        case PositionAction::GpsToggle:\n            menuQueue = GpsToggleMenu;\n            screen->runNow();\n            break;\n        case PositionAction::GpsFormat:\n            menuQueue = GpsFormatMenu;\n            screen->runNow();\n            break;\n        case PositionAction::CompassMenu:\n            menuQueue = CompassPointNorthMenu;\n            screen->runNow();\n            break;\n        case PositionAction::CompassCalibrate:\n            if (accelerometerThread) {\n                accelerometerThread->calibrate(30);\n            }\n            break;\n        case PositionAction::GPSSmartPosition:\n            menuQueue = GpsSmartPositionMenu;\n            screen->runNow();\n            break;\n        case PositionAction::GPSUpdateInterval:\n            menuQueue = GpsUpdateIntervalMenu;\n            screen->runNow();\n            break;\n        case PositionAction::GPSPositionBroadcast:\n            menuQueue = GpsPositionBroadcastMenu;\n            screen->runNow();\n            break;\n        }\n    };\n\n    BannerOverlayOptions bannerOptions;\n    if (accelerometerThread) {\n        bannerOptions = createStaticBannerOptions(\"GPS Action\", calibrateOptions, calibrateLabels, onSelection);\n    } else {\n        bannerOptions = createStaticBannerOptions(\"GPS Action\", baseOptions, baseLabels, onSelection);\n    }\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::nodeListMenu()\n{\n    enum optionsNumbers { Back, NodePicker, TraceRoute, Verify, Reset, NodeNameLength, enumEnd };\n    static const char *optionsArray[enumEnd] = {\"Back\"};\n    static int optionsEnumArray[enumEnd] = {Back};\n    int options = 1;\n\n    optionsArray[options] = \"Node Actions / Settings\";\n    optionsEnumArray[options++] = NodePicker;\n\n    if (currentResolution != ScreenResolution::UltraLow) {\n        optionsArray[options] = \"Show Long/Short Name\";\n        optionsEnumArray[options++] = NodeNameLength;\n    }\n    optionsArray[options] = \"Reset NodeDB\";\n    optionsEnumArray[options++] = Reset;\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Node Action\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == NodePicker) {\n            menuQueue = NodePickerMenu;\n            screen->runNow();\n        } else if (selected == Reset) {\n            menuQueue = ResetNodeDbMenu;\n            screen->runNow();\n        } else if (selected == NodeNameLength) {\n            menuHandler::menuQueue = menuHandler::NodeNameLengthMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::NodePicker()\n{\n    const char *NODE_PICKER_TITLE;\n    if (currentResolution == ScreenResolution::UltraLow) {\n        NODE_PICKER_TITLE = \"Pick Node\";\n    } else {\n        NODE_PICKER_TITLE = \"Pick A Node\";\n    }\n    screen->showNodePicker(NODE_PICKER_TITLE, 30000, [](uint32_t nodenum) -> void {\n        LOG_INFO(\"Nodenum: %u\", nodenum);\n        // Store the selection so the Manage Node menu knows which node to operate on\n        menuHandler::pickedNodeNum = nodenum;\n        // Keep UI favorite context in sync (used elsewhere for some node-based actions)\n        graphics::UIRenderer::currentFavoriteNodeNum = nodenum;\n        menuQueue = ManageNodeMenu;\n        screen->runNow();\n    });\n}\n\nvoid menuHandler::manageNodeMenu()\n{\n    // If we don't have a node selected yet, go fast exit\n    auto node = nodeDB->getMeshNode(menuHandler::pickedNodeNum);\n    if (!node) {\n        return;\n    }\n    enum optionsNumbers { Back, Favorite, Mute, TraceRoute, KeyVerification, Ignore, enumEnd };\n    static const char *optionsArray[enumEnd] = {\"Back\"};\n    static int optionsEnumArray[enumEnd] = {Back};\n    int options = 1;\n\n    if (node->is_favorite) {\n        optionsArray[options] = \"Unfavorite\";\n    } else {\n        optionsArray[options] = \"Favorite\";\n    }\n    optionsEnumArray[options++] = Favorite;\n\n    bool isMuted = (node->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) != 0;\n    if (isMuted) {\n        optionsArray[options] = \"Unmute Notifications\";\n    } else {\n        optionsArray[options] = \"Mute Notifications\";\n    }\n    optionsEnumArray[options++] = Mute;\n\n    optionsArray[options] = \"Trace Route\";\n    optionsEnumArray[options++] = TraceRoute;\n\n    optionsArray[options] = \"Key Verification\";\n    optionsEnumArray[options++] = KeyVerification;\n\n    if (node->is_ignored) {\n        optionsArray[options] = \"Unignore Node\";\n    } else {\n        optionsArray[options] = \"Ignore Node\";\n    }\n    optionsEnumArray[options++] = Ignore;\n\n    BannerOverlayOptions bannerOptions;\n\n    std::string title = \"\";\n    if (node->has_user && node->user.long_name && node->user.long_name[0]) {\n        title += sanitizeString(node->user.long_name).substr(0, 15);\n    } else {\n        char buf[20];\n        snprintf(buf, sizeof(buf), \"%08X\", (unsigned int)node->num);\n        title += buf;\n    }\n    bannerOptions.message = title.c_str();\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Back) {\n            menuQueue = NodeBaseMenu;\n            screen->runNow();\n            return;\n        }\n\n        if (selected == Favorite) {\n            const auto *n = nodeDB->getMeshNode(menuHandler::pickedNodeNum);\n            if (!n) {\n                return;\n            }\n            if (n->is_favorite) {\n                LOG_INFO(\"Removing node %08X from favorites\", menuHandler::pickedNodeNum);\n                nodeDB->set_favorite(false, menuHandler::pickedNodeNum);\n            } else {\n                LOG_INFO(\"Adding node %08X to favorites\", menuHandler::pickedNodeNum);\n                nodeDB->set_favorite(true, menuHandler::pickedNodeNum);\n            }\n            screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n            return;\n        }\n\n        if (selected == Mute) {\n            auto n = nodeDB->getMeshNode(menuHandler::pickedNodeNum);\n            if (!n) {\n                return;\n            }\n\n            if (n->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) {\n                n->bitfield &= ~NODEINFO_BITFIELD_IS_MUTED_MASK;\n                LOG_INFO(\"Unmuted node %08X\", menuHandler::pickedNodeNum);\n            } else {\n                n->bitfield |= NODEINFO_BITFIELD_IS_MUTED_MASK;\n                LOG_INFO(\"Muted node %08X\", menuHandler::pickedNodeNum);\n            }\n            nodeDB->notifyObservers(true);\n            nodeDB->saveToDisk();\n            screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n            return;\n        }\n\n        if (selected == TraceRoute) {\n            LOG_INFO(\"Starting traceroute to %08X\", menuHandler::pickedNodeNum);\n            if (traceRouteModule) {\n                traceRouteModule->startTraceRoute(menuHandler::pickedNodeNum);\n            }\n            return;\n        }\n\n        if (selected == KeyVerification) {\n            LOG_INFO(\"Initiating key verification with %08X\", menuHandler::pickedNodeNum);\n            if (keyVerificationModule) {\n                keyVerificationModule->sendInitialRequest(menuHandler::pickedNodeNum);\n            }\n            return;\n        }\n\n        if (selected == Ignore) {\n            auto n = nodeDB->getMeshNode(menuHandler::pickedNodeNum);\n            if (!n) {\n                return;\n            }\n\n            if (n->is_ignored) {\n                n->is_ignored = false;\n                LOG_INFO(\"Unignoring node %08X\", menuHandler::pickedNodeNum);\n            } else {\n                n->is_ignored = true;\n                LOG_INFO(\"Ignoring node %08X\", menuHandler::pickedNodeNum);\n            }\n            nodeDB->notifyObservers(true);\n            nodeDB->saveToDisk();\n            screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n            return;\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::nodeNameLengthMenu()\n{\n    static const NodeNameOption nodeNameOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"Long\", OptionsAction::Select, true},\n        {\"Short\", OptionsAction::Select, false},\n    };\n\n    constexpr size_t nodeNameCount = sizeof(nodeNameOptions) / sizeof(nodeNameOptions[0]);\n    static std::array<const char *, nodeNameCount> nodeNameLabels{};\n\n    auto bannerOptions = createStaticBannerOptions(\"Node Name Length\", nodeNameOptions, nodeNameLabels,\n                                                   [](const NodeNameOption &option, int) -> void {\n                                                       if (option.action == OptionsAction::Back) {\n                                                           menuQueue = NodeBaseMenu;\n                                                           screen->runNow();\n                                                           return;\n                                                       }\n\n                                                       if (!option.hasValue) {\n                                                           return;\n                                                       }\n\n                                                       if (config.display.use_long_node_name == option.value) {\n                                                           return;\n                                                       }\n\n                                                       config.display.use_long_node_name = option.value;\n                                                       saveUIConfig();\n                                                       service->reloadConfig(SEGMENT_CONFIG);\n                                                       LOG_INFO(\"Setting names to %s\", option.value ? \"long\" : \"short\");\n                                                   });\n\n    int initialSelection = config.display.use_long_node_name ? 1 : 2;\n    bannerOptions.InitialSelected = initialSelection;\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::resetNodeDBMenu()\n{\n    static const char *optionsArray[] = {\"Back\", \"Reset All\", \"Preserve Favorites\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Confirm Reset NodeDB\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 3;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 1 || selected == 2) {\n            disableBluetooth();\n            screen->setFrames(Screen::FOCUS_DEFAULT);\n        }\n        if (selected == 1) {\n            LOG_INFO(\"Initiate node-db reset\");\n            nodeDB->resetNodes();\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        } else if (selected == 2) {\n            LOG_INFO(\"Initiate node-db reset but keeping favorites\");\n            nodeDB->resetNodes(1);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        } else if (selected == 0) {\n            menuQueue = NodeBaseMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::compassNorthMenu()\n{\n    static const CompassOption compassOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"Dynamic\", OptionsAction::Select, meshtastic_CompassMode_DYNAMIC},\n        {\"Fixed Ring\", OptionsAction::Select, meshtastic_CompassMode_FIXED_RING},\n        {\"Freeze Heading\", OptionsAction::Select, meshtastic_CompassMode_FREEZE_HEADING},\n    };\n\n    constexpr size_t compassCount = sizeof(compassOptions) / sizeof(compassOptions[0]);\n    static std::array<const char *, compassCount> compassLabels{};\n\n    auto bannerOptions = createStaticBannerOptions(\"North Directions?\", compassOptions, compassLabels,\n                                                   [](const CompassOption &option, int) -> void {\n                                                       if (option.action == OptionsAction::Back) {\n                                                           menuQueue = PositionBaseMenu;\n                                                           screen->runNow();\n                                                           return;\n                                                       }\n\n                                                       if (!option.hasValue) {\n                                                           return;\n                                                       }\n\n                                                       if (uiconfig.compass_mode == option.value) {\n                                                           return;\n                                                       }\n\n                                                       uiconfig.compass_mode = option.value;\n                                                       saveUIConfig();\n                                                       screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n                                                   });\n\n    int initialSelection = 0;\n    for (size_t i = 0; i < compassCount; ++i) {\n        if (compassOptions[i].hasValue && uiconfig.compass_mode == compassOptions[i].value) {\n            initialSelection = static_cast<int>(i);\n            break;\n        }\n    }\n    bannerOptions.InitialSelected = initialSelection;\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\n#if !MESHTASTIC_EXCLUDE_GPS\nvoid menuHandler::GPSToggleMenu()\n{\n    static const GPSToggleOption gpsToggleOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"Enabled\", OptionsAction::Select, meshtastic_Config_PositionConfig_GpsMode_ENABLED},\n        {\"Disabled\", OptionsAction::Select, meshtastic_Config_PositionConfig_GpsMode_DISABLED},\n    };\n\n    constexpr size_t toggleCount = sizeof(gpsToggleOptions) / sizeof(gpsToggleOptions[0]);\n    static std::array<const char *, toggleCount> toggleLabels{};\n\n    auto bannerOptions =\n        createStaticBannerOptions(\"Toggle GPS\", gpsToggleOptions, toggleLabels, [](const GPSToggleOption &option, int) -> void {\n            if (option.action == OptionsAction::Back) {\n                menuQueue = PositionBaseMenu;\n                screen->runNow();\n                return;\n            }\n\n            if (!option.hasValue) {\n                return;\n            }\n\n            if (config.position.gps_mode == option.value) {\n                return;\n            }\n\n            config.position.gps_mode = option.value;\n            if (option.value == meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n                playGPSEnableBeep();\n                gps->enable();\n            } else {\n                playGPSDisableBeep();\n                gps->disable();\n            }\n            service->reloadConfig(SEGMENT_CONFIG);\n        });\n\n    int initialSelection = 0;\n    for (size_t i = 0; i < toggleCount; ++i) {\n        if (gpsToggleOptions[i].hasValue && config.position.gps_mode == gpsToggleOptions[i].value) {\n            initialSelection = static_cast<int>(i);\n            break;\n        }\n    }\n    bannerOptions.InitialSelected = initialSelection;\n\n    screen->showOverlayBanner(bannerOptions);\n}\nvoid menuHandler::GPSFormatMenu()\n{\n    static const GPSFormatOption formatOptionsHigh[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"Decimal Degrees\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_DEC},\n        {\"Degrees Minutes Seconds\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_DMS},\n        {\"Universal Transverse Mercator\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_UTM},\n        {\"Military Grid Reference System\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_MGRS},\n        {\"Open Location Code\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_OLC},\n        {\"Ordnance Survey Grid Ref\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_OSGR},\n        {\"Maidenhead Locator\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS},\n    };\n\n    static const GPSFormatOption formatOptionsLow[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"DEC\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_DEC},\n        {\"DMS\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_DMS},\n        {\"UTM\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_UTM},\n        {\"MGRS\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_MGRS},\n        {\"OLC\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_OLC},\n        {\"OSGR\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_OSGR},\n        {\"MLS\", OptionsAction::Select, meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS},\n    };\n\n    constexpr size_t formatCount = sizeof(formatOptionsHigh) / sizeof(formatOptionsHigh[0]);\n    static std::array<const char *, formatCount> formatLabelsHigh{};\n    static std::array<const char *, formatCount> formatLabelsLow{};\n\n    auto onSelection = [](const GPSFormatOption &option, int) -> void {\n        if (option.action == OptionsAction::Back) {\n            menuQueue = PositionBaseMenu;\n            screen->runNow();\n            return;\n        }\n\n        if (!option.hasValue) {\n            return;\n        }\n\n        if (uiconfig.gps_format == option.value) {\n            return;\n        }\n\n        uiconfig.gps_format = option.value;\n        saveUIConfig();\n        service->reloadConfig(SEGMENT_CONFIG);\n    };\n\n    BannerOverlayOptions bannerOptions;\n    int initialSelection = 0;\n\n    if (currentResolution == ScreenResolution::High) {\n        bannerOptions = createStaticBannerOptions(\"GPS Format\", formatOptionsHigh, formatLabelsHigh, onSelection);\n        for (size_t i = 0; i < formatCount; ++i) {\n            if (formatOptionsHigh[i].hasValue && uiconfig.gps_format == formatOptionsHigh[i].value) {\n                initialSelection = static_cast<int>(i);\n                break;\n            }\n        }\n    } else {\n        bannerOptions = createStaticBannerOptions(\"GPS Format\", formatOptionsLow, formatLabelsLow, onSelection);\n        for (size_t i = 0; i < formatCount; ++i) {\n            if (formatOptionsLow[i].hasValue && uiconfig.gps_format == formatOptionsLow[i].value) {\n                initialSelection = static_cast<int>(i);\n                break;\n            }\n        }\n    }\n\n    bannerOptions.InitialSelected = initialSelection;\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::GPSSmartPositionMenu()\n{\n    static const char *optionsArray[] = {\"Back\", \"Enabled\", \"Disabled\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Toggle Smart Position\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Smrt Postn\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 3;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 0) {\n            menuQueue = PositionBaseMenu;\n            screen->runNow();\n        } else if (selected == 1) {\n            config.position.position_broadcast_smart_enabled = true;\n            saveUIConfig();\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        } else if (selected == 2) {\n            config.position.position_broadcast_smart_enabled = false;\n            saveUIConfig();\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        }\n    };\n    bannerOptions.InitialSelected = config.position.position_broadcast_smart_enabled ? 1 : 2;\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::GPSUpdateIntervalMenu()\n{\n    static const char *optionsArray[] = {\"Back\",      \"8 seconds\", \"20 seconds\", \"40 seconds\",  \"1 minute\",   \"80 seconds\",\n                                         \"2 minutes\", \"5 minutes\", \"10 minutes\", \"15 minutes\",  \"30 minutes\", \"1 hour\",\n                                         \"6 hours\",   \"12 hours\",  \"24 hours\",   \"At Boot Only\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Update Interval\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 16;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 0) {\n            menuQueue = PositionBaseMenu;\n            screen->runNow();\n        } else if (selected == 1) {\n            config.position.gps_update_interval = 8;\n        } else if (selected == 2) {\n            config.position.gps_update_interval = 20;\n        } else if (selected == 3) {\n            config.position.gps_update_interval = 40;\n        } else if (selected == 4) {\n            config.position.gps_update_interval = 60;\n        } else if (selected == 5) {\n            config.position.gps_update_interval = 80;\n        } else if (selected == 6) {\n            config.position.gps_update_interval = 120;\n        } else if (selected == 7) {\n            config.position.gps_update_interval = 300;\n        } else if (selected == 8) {\n            config.position.gps_update_interval = 600;\n        } else if (selected == 9) {\n            config.position.gps_update_interval = 900;\n        } else if (selected == 10) {\n            config.position.gps_update_interval = 1800;\n        } else if (selected == 11) {\n            config.position.gps_update_interval = 3600;\n        } else if (selected == 12) {\n            config.position.gps_update_interval = 21600;\n        } else if (selected == 13) {\n            config.position.gps_update_interval = 43200;\n        } else if (selected == 14) {\n            config.position.gps_update_interval = 86400;\n        } else if (selected == 15) {\n            config.position.gps_update_interval = 2147483647; // At Boot Only\n        }\n\n        if (selected != 0) {\n            saveUIConfig();\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        }\n    };\n\n    if (config.position.gps_update_interval == 8) {\n        bannerOptions.InitialSelected = 1;\n    } else if (config.position.gps_update_interval == 20) {\n        bannerOptions.InitialSelected = 2;\n    } else if (config.position.gps_update_interval == 40) {\n        bannerOptions.InitialSelected = 3;\n    } else if (config.position.gps_update_interval == 60) {\n        bannerOptions.InitialSelected = 4;\n    } else if (config.position.gps_update_interval == 80) {\n        bannerOptions.InitialSelected = 5;\n    } else if (config.position.gps_update_interval == 120) {\n        bannerOptions.InitialSelected = 6;\n    } else if (config.position.gps_update_interval == 300) {\n        bannerOptions.InitialSelected = 7;\n    } else if (config.position.gps_update_interval == 600) {\n        bannerOptions.InitialSelected = 8;\n    } else if (config.position.gps_update_interval == 900) {\n        bannerOptions.InitialSelected = 9;\n    } else if (config.position.gps_update_interval == 1800) {\n        bannerOptions.InitialSelected = 10;\n    } else if (config.position.gps_update_interval == 3600) {\n        bannerOptions.InitialSelected = 11;\n    } else if (config.position.gps_update_interval == 21600) {\n        bannerOptions.InitialSelected = 12;\n    } else if (config.position.gps_update_interval == 43200) {\n        bannerOptions.InitialSelected = 13;\n    } else if (config.position.gps_update_interval == 86400) {\n        bannerOptions.InitialSelected = 14;\n    } else if (config.position.gps_update_interval == 2147483647) { // At Boot Only\n        bannerOptions.InitialSelected = 15;\n    } else {\n        bannerOptions.InitialSelected = 0;\n    }\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::GPSPositionBroadcastMenu()\n{\n    static const char *optionsArray[] = {\"Back\",     \"1 minute\", \"90 seconds\", \"5 minutes\", \"15 minutes\", \"1 hour\",\n                                         \"2 hours\",  \"3 hours\",  \"4 hours\",    \"5 hours\",   \"6 hours\",    \"12 hours\",\n                                         \"18 hours\", \"24 hours\", \"36 hours\",   \"48 hours\",  \"72 hours\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Broadcast Interval\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 17;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 0) {\n            menuQueue = PositionBaseMenu;\n            screen->runNow();\n        } else if (selected == 1) {\n            config.position.position_broadcast_secs = 60;\n        } else if (selected == 2) {\n            config.position.position_broadcast_secs = 90;\n        } else if (selected == 3) {\n            config.position.position_broadcast_secs = 300;\n        } else if (selected == 4) {\n            config.position.position_broadcast_secs = 900;\n        } else if (selected == 5) {\n            config.position.position_broadcast_secs = 3600;\n        } else if (selected == 6) {\n            config.position.position_broadcast_secs = 7200;\n        } else if (selected == 7) {\n            config.position.position_broadcast_secs = 10800;\n        } else if (selected == 8) {\n            config.position.position_broadcast_secs = 14400;\n        } else if (selected == 9) {\n            config.position.position_broadcast_secs = 18000;\n        } else if (selected == 10) {\n            config.position.position_broadcast_secs = 21600;\n        } else if (selected == 11) {\n            config.position.position_broadcast_secs = 43200;\n        } else if (selected == 12) {\n            config.position.position_broadcast_secs = 64800;\n        } else if (selected == 13) {\n            config.position.position_broadcast_secs = 86400;\n        } else if (selected == 14) {\n            config.position.position_broadcast_secs = 129600;\n        } else if (selected == 15) {\n            config.position.position_broadcast_secs = 172800;\n        } else if (selected == 16) {\n            config.position.position_broadcast_secs = 259200;\n        }\n\n        if (selected != 0) {\n            saveUIConfig();\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        }\n    };\n\n    if (config.position.position_broadcast_secs == 60) {\n        bannerOptions.InitialSelected = 1;\n    } else if (config.position.position_broadcast_secs == 90) {\n        bannerOptions.InitialSelected = 2;\n    } else if (config.position.position_broadcast_secs == 300) {\n        bannerOptions.InitialSelected = 3;\n    } else if (config.position.position_broadcast_secs == 900) {\n        bannerOptions.InitialSelected = 4;\n    } else if (config.position.position_broadcast_secs == 3600) {\n        bannerOptions.InitialSelected = 5;\n    } else if (config.position.position_broadcast_secs == 7200) {\n        bannerOptions.InitialSelected = 6;\n    } else if (config.position.position_broadcast_secs == 10800) {\n        bannerOptions.InitialSelected = 7;\n    } else if (config.position.position_broadcast_secs == 14400) {\n        bannerOptions.InitialSelected = 8;\n    } else if (config.position.position_broadcast_secs == 18000) {\n        bannerOptions.InitialSelected = 9;\n    } else if (config.position.position_broadcast_secs == 21600) {\n        bannerOptions.InitialSelected = 10;\n    } else if (config.position.position_broadcast_secs == 43200) {\n        bannerOptions.InitialSelected = 11;\n    } else if (config.position.position_broadcast_secs == 64800) {\n        bannerOptions.InitialSelected = 12;\n    } else if (config.position.position_broadcast_secs == 86400) {\n        bannerOptions.InitialSelected = 13;\n    } else if (config.position.position_broadcast_secs == 129600) {\n        bannerOptions.InitialSelected = 14;\n    } else if (config.position.position_broadcast_secs == 172800) {\n        bannerOptions.InitialSelected = 15;\n    } else if (config.position.position_broadcast_secs == 259200) {\n        bannerOptions.InitialSelected = 16;\n    } else {\n        bannerOptions.InitialSelected = 0;\n    }\n    screen->showOverlayBanner(bannerOptions);\n}\n\n#endif\n\nvoid menuHandler::bluetoothToggleMenu()\n{\n    static const char *optionsArray[] = {\"Back\", \"Enabled\", \"Disabled\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Toggle Bluetooth\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Bluetooth\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 3;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 0)\n            return;\n        else if (selected != (config.bluetooth.enabled ? 1 : 2)) {\n            InputEvent event = {.inputEvent = (input_broker_event)170, .kbchar = 170, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        }\n    };\n    bannerOptions.InitialSelected = config.bluetooth.enabled ? 1 : 2;\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::BuzzerModeMenu()\n{\n    static const char *optionsArray[] = {\"All Enabled\", \"All Disabled\", \"Notifications\", \"System Only\", \"DMs Only\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Notification Sounds\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 5;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        config.device.buzzer_mode = (meshtastic_Config_DeviceConfig_BuzzerMode)selected;\n        service->reloadConfig(SEGMENT_CONFIG);\n    };\n    bannerOptions.InitialSelected = config.device.buzzer_mode;\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::BrightnessPickerMenu()\n{\n    static const char *optionsArray[] = {\"Back\", \"Low\", \"Medium\", \"High\"};\n\n    // Get current brightness level to set initial selection\n    int currentSelection = 1; // Default to Medium\n    if (uiconfig.screen_brightness >= 255) {\n        currentSelection = 3; // Very High\n    } else if (uiconfig.screen_brightness >= 128) {\n        currentSelection = 2; // High\n    } else {\n        currentSelection = 1; // Medium\n    }\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Brightness\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 4;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 1) { // Medium\n            uiconfig.screen_brightness = 64;\n        } else if (selected == 2) { // High\n            uiconfig.screen_brightness = 128;\n        } else if (selected == 3) { // Very High\n            uiconfig.screen_brightness = 255;\n        }\n\n        if (selected != 0) { // Not \"Back\"\n                             // Apply brightness immediately\n#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190)\n            // For HELTEC devices, use analogWrite to control backlight\n            analogWrite(VTFT_LEDA, uiconfig.screen_brightness);\n#elif defined(ST7789_CS) || defined(ST7796_CS)\n            static_cast<TFTDisplay *>(screen->getDisplayDevice())->setDisplayBrightness(uiconfig.screen_brightness);\n#elif defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107)\n            screen->getDisplayDevice()->setBrightness(uiconfig.screen_brightness);\n#endif\n\n            // Save to device\n            saveUIConfig();\n\n            LOG_INFO(\"Screen brightness set to %d\", uiconfig.screen_brightness);\n        }\n    };\n    bannerOptions.InitialSelected = currentSelection;\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::switchToMUIMenu()\n{\n    static const char *optionsArray[] = {\"No\", \"Yes\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Switch to MUI?\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 2;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 1) {\n            config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_COLOR;\n            config.bluetooth.enabled = false;\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::TFTColorPickerMenu(OLEDDisplay *display)\n{\n    static const ScreenColorOption colorOptions[] = {\n        {\"Back\", OptionsAction::Back},\n        {\"Default\", OptionsAction::Select, ScreenColor(0, 0, 0, true)},\n        {\"Meshtastic Green\", OptionsAction::Select, ScreenColor(0x67, 0xEA, 0x94)},\n        {\"Yellow\", OptionsAction::Select, ScreenColor(255, 255, 128)},\n        {\"Red\", OptionsAction::Select, ScreenColor(255, 64, 64)},\n        {\"Orange\", OptionsAction::Select, ScreenColor(255, 160, 20)},\n        {\"Purple\", OptionsAction::Select, ScreenColor(204, 153, 255)},\n        {\"Blue\", OptionsAction::Select, ScreenColor(0, 0, 255)},\n        {\"Teal\", OptionsAction::Select, ScreenColor(16, 102, 102)},\n        {\"Cyan\", OptionsAction::Select, ScreenColor(0, 255, 255)},\n        {\"Ice\", OptionsAction::Select, ScreenColor(173, 216, 230)},\n        {\"Pink\", OptionsAction::Select, ScreenColor(255, 105, 180)},\n        {\"White\", OptionsAction::Select, ScreenColor(255, 255, 255)},\n        {\"Gray\", OptionsAction::Select, ScreenColor(128, 128, 128)},\n    };\n\n    constexpr size_t colorCount = sizeof(colorOptions) / sizeof(colorOptions[0]);\n    static std::array<const char *, colorCount> colorLabels{};\n\n    auto bannerOptions = createStaticBannerOptions(\n        \"Select Screen Color\", colorOptions, colorLabels, [display](const ScreenColorOption &option, int) -> void {\n            if (option.action == OptionsAction::Back) {\n                menuQueue = SystemBaseMenu;\n                screen->runNow();\n                return;\n            }\n\n            if (!option.hasValue) {\n                return;\n            }\n\n#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || defined(T_DECK) || defined(T_LORA_PAGER) ||          \\\n    HAS_TFT || defined(HACKADAY_COMMUNICATOR)\n            const ScreenColor &color = option.value;\n            if (color.useVariant) {\n                LOG_INFO(\"Setting color to system default or defined variant\");\n            } else {\n                LOG_INFO(\"Setting color to %s\", option.label);\n            }\n\n            uint8_t r = color.r;\n            uint8_t g = color.g;\n            uint8_t b = color.b;\n\n            display->setColor(BLACK);\n            display->fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);\n            display->setColor(WHITE);\n\n            if (color.useVariant || (r == 0 && g == 0 && b == 0)) {\n#ifdef TFT_MESH_OVERRIDE\n                TFT_MESH = TFT_MESH_OVERRIDE;\n#else\n                TFT_MESH = COLOR565(255, 255, 128);\n#endif\n            } else {\n                TFT_MESH = COLOR565(r, g, b);\n            }\n\n#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190)\n            static_cast<ST7789Spi *>(screen->getDisplayDevice())->setRGB(TFT_MESH);\n#endif\n\n            screen->setFrames(graphics::Screen::FOCUS_SYSTEM);\n            if (color.useVariant || (r == 0 && g == 0 && b == 0)) {\n                uiconfig.screen_rgb_color = 0;\n            } else {\n                uiconfig.screen_rgb_color =\n                    (static_cast<uint32_t>(r) << 16) | (static_cast<uint32_t>(g) << 8) | static_cast<uint32_t>(b);\n            }\n            LOG_INFO(\"Storing Value of %d to uiconfig.screen_rgb_color\", uiconfig.screen_rgb_color);\n            saveUIConfig();\n#endif\n        });\n\n    int initialSelection = 0;\n    if (uiconfig.screen_rgb_color == 0) {\n        initialSelection = 1;\n    } else {\n        uint32_t currentColor = uiconfig.screen_rgb_color;\n        for (size_t i = 0; i < colorCount; ++i) {\n            if (!colorOptions[i].hasValue) {\n                continue;\n            }\n            const ScreenColor &color = colorOptions[i].value;\n            if (color.useVariant) {\n                continue;\n            }\n            uint32_t encoded =\n                (static_cast<uint32_t>(color.r) << 16) | (static_cast<uint32_t>(color.g) << 8) | static_cast<uint32_t>(color.b);\n            if (encoded == currentColor) {\n                initialSelection = static_cast<int>(i);\n                break;\n            }\n        }\n    }\n    bannerOptions.InitialSelected = initialSelection;\n\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::rebootMenu()\n{\n    static const char *optionsArray[] = {\"Back\", \"Confirm\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Reboot Device?\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Reboot\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 2;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 1) {\n            IF_SCREEN(screen->showSimpleBanner(\"Rebooting...\", 0));\n            nodeDB->saveToDisk();\n            messageStore.saveToFlash();\n            rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        } else {\n            menuQueue = PowerMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::shutdownMenu()\n{\n    static const char *optionsArray[] = {\"Back\", \"Confirm\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Shutdown Device?\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Shutdown\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 2;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 1) {\n            InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_SHUTDOWN, .kbchar = 0, .touchX = 0, .touchY = 0};\n            inputBroker->injectInputEvent(&event);\n        } else {\n            menuQueue = PowerMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::removeFavoriteMenu()\n{\n\n    static const char *optionsArray[] = {\"Back\", \"Yes\"};\n    BannerOverlayOptions bannerOptions;\n    std::string message = \"Unfavorite This Node?\\n\";\n    auto node = nodeDB->getMeshNode(graphics::UIRenderer::currentFavoriteNodeNum);\n    if (node && node->has_user) {\n        message += sanitizeString(node->user.long_name).substr(0, 15);\n    }\n    bannerOptions.message = message.c_str();\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 2;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == 1) {\n            LOG_INFO(\"Removing %x as favorite node\", graphics::UIRenderer::currentFavoriteNodeNum);\n            nodeDB->set_favorite(false, graphics::UIRenderer::currentFavoriteNodeNum);\n            screen->setFrames(graphics::Screen::FOCUS_DEFAULT);\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::traceRouteMenu()\n{\n    screen->showNodePicker(\"Node to Trace\", 30000, [](uint32_t nodenum) -> void {\n        LOG_INFO(\"Menu: Node picker selected node 0x%08x, traceRouteModule=%p\", nodenum, traceRouteModule);\n        if (traceRouteModule) {\n            traceRouteModule->startTraceRoute(nodenum);\n        }\n    });\n}\n\nvoid menuHandler::testMenu()\n{\n\n    enum optionsNumbers { Back, NumberPicker, ShowChirpy };\n    static const char *optionsArray[4] = {\"Back\"};\n    static int optionsEnumArray[4] = {Back};\n    int options = 1;\n\n    optionsArray[options] = \"Number Picker\";\n    optionsEnumArray[options++] = NumberPicker;\n\n    optionsArray[options] = screen->isFrameHidden(\"chirpy\") ? \"Show Chirpy\" : \"Hide Chirpy\";\n    optionsEnumArray[options++] = ShowChirpy;\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Hidden Test Menu\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == NumberPicker) {\n            menuQueue = NumberTest;\n            screen->runNow();\n        } else if (selected == ShowChirpy) {\n            screen->toggleFrameVisibility(\"chirpy\");\n            screen->setFrames(Screen::FOCUS_SYSTEM);\n\n        } else {\n            menuQueue = SystemBaseMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::numberTest()\n{\n    screen->showNumberPicker(\"Pick a number\\n \", 30000, 4,\n                             [](int number_picked) -> void { LOG_WARN(\"Nodenum: %u\", number_picked); });\n}\n\nvoid menuHandler::wifiBaseMenu()\n{\n    enum optionsNumbers { Back, Wifi_toggle };\n\n    static const char *optionsArray[] = {\"Back\", \"WiFi Toggle\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"WiFi Menu\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 2;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Wifi_toggle) {\n            menuQueue = WifiToggleMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::wifiToggleMenu()\n{\n    enum optionsNumbers { Back, Wifi_disable, Wifi_enable };\n\n    static const char *optionsArray[] = {\"Back\", \"WiFi Disabled\", \"WiFi Enabled\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"WiFi Actions\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 3;\n    if (config.network.wifi_enabled == true)\n        bannerOptions.InitialSelected = 2;\n    else\n        bannerOptions.InitialSelected = 1;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Wifi_disable) {\n            config.network.wifi_enabled = false;\n            config.bluetooth.enabled = true;\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        } else if (selected == Wifi_enable) {\n            config.network.wifi_enabled = true;\n            config.bluetooth.enabled = false;\n            service->reloadConfig(SEGMENT_CONFIG);\n            rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000);\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::screenOptionsMenu()\n{\n    // Check if brightness is supported\n#if defined(T_DECK)\n    // TDeck Doesn't seem to support brightness at all, at least not reliably\n    bool hasSupportBrightness = false;\n#elif defined(ST7789_CS) || defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107)\n    bool hasSupportBrightness = true;\n#else\n    bool hasSupportBrightness = false;\n#endif\n\n    enum optionsNumbers { Back, Brightness, ScreenColor, FrameToggles, DisplayUnits, MessageBubbles };\n    static const char *optionsArray[6] = {\"Back\"};\n    static int optionsEnumArray[6] = {Back};\n    int options = 1;\n\n    // Only show brightness for B&W displays\n    if (hasSupportBrightness) {\n        optionsArray[options] = \"Brightness\";\n        optionsEnumArray[options++] = Brightness;\n    }\n\n    // Only show screen color for TFT displays\n#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || defined(T_DECK) || defined(T_LORA_PAGER) ||          \\\n    HAS_TFT || defined(HACKADAY_COMMUNICATOR)\n    optionsArray[options] = \"Screen Color\";\n    optionsEnumArray[options++] = ScreenColor;\n#endif\n\n    optionsArray[options] = \"Frame Visibility\";\n    optionsEnumArray[options++] = FrameToggles;\n\n    optionsArray[options] = \"Display Units\";\n    optionsEnumArray[options++] = DisplayUnits;\n\n    optionsArray[options] = \"Message Bubbles\";\n    optionsEnumArray[options++] = MessageBubbles;\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Display Options\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Brightness) {\n            menuHandler::menuQueue = menuHandler::BrightnessPicker;\n            screen->runNow();\n        } else if (selected == ScreenColor) {\n            menuHandler::menuQueue = menuHandler::TftColorMenuPicker;\n            screen->runNow();\n        } else if (selected == FrameToggles) {\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == DisplayUnits) {\n            menuHandler::menuQueue = menuHandler::DisplayUnits;\n            screen->runNow();\n        } else if (selected == MessageBubbles) {\n            menuHandler::menuQueue = menuHandler::MessageBubblesMenu;\n            screen->runNow();\n        } else {\n            menuQueue = SystemBaseMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::powerMenu()\n{\n\n    enum optionsNumbers { Back, Reboot, Shutdown, MUI };\n    static const char *optionsArray[4] = {\"Back\"};\n    static int optionsEnumArray[4] = {Back};\n    int options = 1;\n\n    optionsArray[options] = \"Reboot\";\n    optionsEnumArray[options++] = Reboot;\n\n    optionsArray[options] = \"Shutdown\";\n    optionsEnumArray[options++] = Shutdown;\n\n#if HAS_TFT\n    optionsArray[options] = \"Switch to MUI\";\n    optionsEnumArray[options++] = MUI;\n#endif\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Reboot / Shutdown\";\n    if (currentResolution == ScreenResolution::UltraLow) {\n        bannerOptions.message = \"Power\";\n    }\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == Reboot) {\n            menuHandler::menuQueue = menuHandler::RebootMenu;\n            screen->runNow();\n        } else if (selected == Shutdown) {\n            menuHandler::menuQueue = menuHandler::ShutdownMenu;\n            screen->runNow();\n        } else if (selected == MUI) {\n            menuHandler::menuQueue = menuHandler::MuiPicker;\n            screen->runNow();\n        } else {\n            menuQueue = SystemBaseMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::keyVerificationInitMenu()\n{\n    screen->showNodePicker(\"Node to Verify\", 30000,\n                           [](uint32_t selected) -> void { keyVerificationModule->sendInitialRequest(selected); });\n}\n\nvoid menuHandler::keyVerificationFinalPrompt()\n{\n    char message[40] = {0};\n    memset(message, 0, sizeof(message));\n    sprintf(message, \"Verification: \\n\");\n    keyVerificationModule->generateVerificationCode(message + 15); // send the toPhone packet\n\n    if (screen) {\n        static const char *optionsArray[] = {\"Reject\", \"Accept\"};\n        graphics::BannerOverlayOptions options;\n        options.message = message;\n        options.durationMs = 30000;\n        options.optionsArrayPtr = optionsArray;\n        options.optionsCount = 2;\n        options.notificationType = graphics::notificationTypeEnum::selection_picker;\n        options.bannerCallback = [=](int selected) {\n            if (selected == 1) {\n                auto remoteNodePtr = nodeDB->getMeshNode(keyVerificationModule->getCurrentRemoteNode());\n                remoteNodePtr->bitfield |= NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK;\n            }\n        };\n        screen->showOverlayBanner(options);\n    }\n}\n\nvoid menuHandler::frameTogglesMenu()\n{\n    enum optionsNumbers {\n        Finish,\n        nodelist_nodes,\n        nodelist_location,\n        nodelist_lastheard,\n        nodelist_hopsignal,\n        nodelist_distance,\n        nodelist_bearings,\n        gps_position,\n        lora,\n        clock,\n        show_favorites,\n        show_env_telemetry,\n        show_aq_telemetry,\n        show_power,\n        enumEnd\n    };\n    static const char *optionsArray[enumEnd] = {\"Finish\"};\n    static int optionsEnumArray[enumEnd] = {Finish};\n    int options = 1;\n\n    // Track last selected index (not enum value!)\n    static int lastSelectedIndex = 0;\n\n#ifndef USE_EINK\n    optionsArray[options] = screen->isFrameHidden(\"nodelist_nodes\") ? \"Show Node Lists\" : \"Hide Node Lists\";\n    optionsEnumArray[options++] = nodelist_nodes;\n#else\n    optionsArray[options] = screen->isFrameHidden(\"nodelist_lastheard\") ? \"Show NL - Last Heard\" : \"Hide NL - Last Heard\";\n    optionsEnumArray[options++] = nodelist_lastheard;\n    optionsArray[options] = screen->isFrameHidden(\"nodelist_hopsignal\") ? \"Show NL - Hops/Signal\" : \"Hide NL - Hops/Signal\";\n    optionsEnumArray[options++] = nodelist_hopsignal;\n#endif\n\n#if HAS_GPS\n#ifndef USE_EINK\n    optionsArray[options] = screen->isFrameHidden(\"nodelist_location\") ? \"Show Position Lists\" : \"Hide Position Lists\";\n    optionsEnumArray[options++] = nodelist_location;\n#else\n    optionsArray[options] = screen->isFrameHidden(\"nodelist_distance\") ? \"Show NL - Distance\" : \"Hide NL - Distance\";\n    optionsEnumArray[options++] = nodelist_distance;\n    optionsArray[options] = screen->isFrameHidden(\"nodelist_bearings\") ? \"Show NL - Bearings\" : \"Hide NL - Bearings\";\n    optionsEnumArray[options++] = nodelist_bearings;\n#endif\n\n    optionsArray[options] = screen->isFrameHidden(\"gps\") ? \"Show Position\" : \"Hide Position\";\n    optionsEnumArray[options++] = gps_position;\n#endif\n\n    optionsArray[options] = screen->isFrameHidden(\"lora\") ? \"Show LoRa\" : \"Hide LoRa\";\n    optionsEnumArray[options++] = lora;\n\n    optionsArray[options] = screen->isFrameHidden(\"clock\") ? \"Show Clock\" : \"Hide Clock\";\n    optionsEnumArray[options++] = clock;\n\n    optionsArray[options] = screen->isFrameHidden(\"show_favorites\") ? \"Show Favorites\" : \"Hide Favorites\";\n    optionsEnumArray[options++] = show_favorites;\n\n    optionsArray[options] = moduleConfig.telemetry.environment_screen_enabled ? \"Hide Env. Telemetry\" : \"Show Env. Telemetry\";\n    optionsEnumArray[options++] = show_env_telemetry;\n\n    optionsArray[options] = moduleConfig.telemetry.air_quality_screen_enabled ? \"Hide AQ Telemetry\" : \"Show AQ Telemetry\";\n    optionsEnumArray[options++] = show_aq_telemetry;\n\n    optionsArray[options] = moduleConfig.telemetry.power_screen_enabled ? \"Hide Power\" : \"Show Power\";\n    optionsEnumArray[options++] = show_power;\n\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Show/Hide Frames\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = options;\n    bannerOptions.optionsEnumPtr = optionsEnumArray;\n    bannerOptions.InitialSelected = lastSelectedIndex; // Use index, not enum value\n\n    bannerOptions.bannerCallback = [options](int selected) mutable -> void {\n        // Find the index of selected in optionsEnumArray\n        int idx = 0;\n        for (; idx < options; ++idx) {\n            if (optionsEnumArray[idx] == selected)\n                break;\n        }\n        lastSelectedIndex = idx;\n\n        if (selected == Finish) {\n            screen->setFrames(Screen::FOCUS_DEFAULT);\n        } else if (selected == nodelist_nodes) {\n            screen->toggleFrameVisibility(\"nodelist_nodes\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == nodelist_location) {\n            screen->toggleFrameVisibility(\"nodelist_location\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == nodelist_lastheard) {\n            screen->toggleFrameVisibility(\"nodelist_lastheard\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == nodelist_hopsignal) {\n            screen->toggleFrameVisibility(\"nodelist_hopsignal\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == nodelist_distance) {\n            screen->toggleFrameVisibility(\"nodelist_distance\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == nodelist_bearings) {\n            screen->toggleFrameVisibility(\"nodelist_bearings\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == gps_position) {\n            screen->toggleFrameVisibility(\"gps\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == lora) {\n            screen->toggleFrameVisibility(\"lora\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == clock) {\n            screen->toggleFrameVisibility(\"clock\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == show_favorites) {\n            screen->toggleFrameVisibility(\"show_favorites\");\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == show_env_telemetry) {\n            moduleConfig.telemetry.environment_screen_enabled = !moduleConfig.telemetry.environment_screen_enabled;\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == show_aq_telemetry) {\n            moduleConfig.telemetry.air_quality_screen_enabled = !moduleConfig.telemetry.air_quality_screen_enabled;\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        } else if (selected == show_power) {\n            moduleConfig.telemetry.power_screen_enabled = !moduleConfig.telemetry.power_screen_enabled;\n            menuHandler::menuQueue = menuHandler::FrameToggles;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::displayUnitsMenu()\n{\n    enum optionsNumbers { Back, MetricUnits, ImperialUnits };\n\n    static const char *optionsArray[] = {\"Back\", \"Metric\", \"Imperial\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \" Select display units\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 3;\n    if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL)\n        bannerOptions.InitialSelected = 2;\n    else\n        bannerOptions.InitialSelected = 1;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == MetricUnits) {\n            config.display.units = meshtastic_Config_DisplayConfig_DisplayUnits_METRIC;\n            service->reloadConfig(SEGMENT_CONFIG);\n        } else if (selected == ImperialUnits) {\n            config.display.units = meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL;\n            service->reloadConfig(SEGMENT_CONFIG);\n        } else {\n            menuHandler::menuQueue = menuHandler::ScreenOptionsMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::messageBubblesMenu()\n{\n    enum optionsNumbers { Back, ShowBubbles, HideBubbles };\n\n    static const char *optionsArray[] = {\"Back\", \"Show Bubbles\", \"Hide Bubbles\"};\n    BannerOverlayOptions bannerOptions;\n    bannerOptions.message = \"Message Bubbles\";\n    bannerOptions.optionsArrayPtr = optionsArray;\n    bannerOptions.optionsCount = 3;\n    bannerOptions.InitialSelected = config.display.enable_message_bubbles ? 1 : 2;\n    bannerOptions.bannerCallback = [](int selected) -> void {\n        if (selected == ShowBubbles) {\n            config.display.enable_message_bubbles = true;\n            service->reloadConfig(SEGMENT_CONFIG);\n            LOG_INFO(\"Message bubbles enabled\");\n        } else if (selected == HideBubbles) {\n            config.display.enable_message_bubbles = false;\n            service->reloadConfig(SEGMENT_CONFIG);\n            LOG_INFO(\"Message bubbles disabled\");\n        } else {\n            menuHandler::menuQueue = menuHandler::ScreenOptionsMenu;\n            screen->runNow();\n        }\n    };\n    screen->showOverlayBanner(bannerOptions);\n}\n\nvoid menuHandler::handleMenuSwitch(OLEDDisplay *display)\n{\n    if (menuQueue != MenuNone)\n        test_count = 0;\n    switch (menuQueue) {\n    case MenuNone:\n        break;\n    case LoraMenu:\n        loraMenu();\n        break;\n    case LoraPicker:\n        LoraRegionPicker();\n        break;\n    case DeviceRolePicker:\n        deviceRolePicker();\n        break;\n    case RadioPresetPicker:\n        radioPresetPicker();\n        break;\n    case FrequencySlot:\n        FrequencySlotPicker();\n        break;\n    case NoTimeoutLoraPicker:\n        LoraRegionPicker(0);\n        break;\n    case TzPicker:\n        TZPicker();\n        break;\n    case TwelveHourPicker:\n        twelveHourPicker();\n        break;\n    case ClockFacePicker:\n        clockFacePicker();\n        break;\n    case ClockMenu:\n        clockMenu();\n        break;\n    case SystemBaseMenu:\n        systemBaseMenu();\n        break;\n    case PositionBaseMenu:\n        positionBaseMenu();\n        break;\n    case NodeBaseMenu:\n        nodeListMenu();\n        break;\n#if !MESHTASTIC_EXCLUDE_GPS\n    case GpsToggleMenu:\n        GPSToggleMenu();\n        break;\n    case GpsFormatMenu:\n        GPSFormatMenu();\n        break;\n    case GpsSmartPositionMenu:\n        GPSSmartPositionMenu();\n        break;\n    case GpsUpdateIntervalMenu:\n        GPSUpdateIntervalMenu();\n        break;\n    case GpsPositionBroadcastMenu:\n        GPSPositionBroadcastMenu();\n        break;\n#endif\n    case CompassPointNorthMenu:\n        compassNorthMenu();\n        break;\n    case ResetNodeDbMenu:\n        resetNodeDBMenu();\n        break;\n    case BuzzerModeMenuPicker:\n        BuzzerModeMenu();\n        break;\n    case MuiPicker:\n        switchToMUIMenu();\n        break;\n    case TftColorMenuPicker:\n        TFTColorPickerMenu(display);\n        break;\n    case BrightnessPicker:\n        BrightnessPickerMenu();\n        break;\n    case NodeNameLengthMenu:\n        nodeNameLengthMenu();\n        break;\n    case RebootMenu:\n        rebootMenu();\n        break;\n    case ShutdownMenu:\n        shutdownMenu();\n        break;\n    case NodePickerMenu:\n        NodePicker();\n        break;\n    case ManageNodeMenu:\n        manageNodeMenu();\n        break;\n    case RemoveFavorite:\n        removeFavoriteMenu();\n        break;\n    case TraceRouteMenu:\n        traceRouteMenu();\n        break;\n    case TestMenu:\n        testMenu();\n        break;\n    case NumberTest:\n        numberTest();\n        break;\n    case WifiToggleMenu:\n        wifiToggleMenu();\n        break;\n    case KeyVerificationInit:\n        keyVerificationInitMenu();\n        break;\n    case KeyVerificationFinalPrompt:\n        keyVerificationFinalPrompt();\n        break;\n    case BluetoothToggleMenu:\n        bluetoothToggleMenu();\n        break;\n    case ScreenOptionsMenu:\n        screenOptionsMenu();\n        break;\n    case PowerMenu:\n        powerMenu();\n        break;\n    case FrameToggles:\n        frameTogglesMenu();\n        break;\n    case DisplayUnits:\n        displayUnitsMenu();\n        break;\n    case ThrottleMessage:\n        screen->showSimpleBanner(\"Too Many Attempts\\nTry again in 60 seconds.\", 5000);\n        break;\n    case MessageResponseMenu:\n        messageResponseMenu();\n        break;\n    case ReplyMenu:\n        replyMenu();\n        break;\n    case DeleteMessagesMenu:\n        deleteMessagesMenu();\n        break;\n    case MessageViewModeMenu:\n        messageViewModeMenu();\n        break;\n    case MessageBubblesMenu:\n        messageBubblesMenu();\n        break;\n    }\n    menuQueue = MenuNone;\n}\n\nvoid menuHandler::saveUIConfig()\n{\n    nodeDB->saveProto(\"/prefs/uiconfig.proto\", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg, &uiconfig);\n}\n\n} // namespace graphics\n\n#endif"
  },
  {
    "path": "src/graphics/draw/MenuHandler.h",
    "content": "#pragma once\n#if HAS_SCREEN\n#include \"configuration.h\"\nnamespace graphics\n{\n\nclass menuHandler\n{\n  public:\n    enum screenMenus {\n        MenuNone,\n        LoraMenu,\n        LoraPicker,\n        DeviceRolePicker,\n        RadioPresetPicker,\n        FrequencySlot,\n        NoTimeoutLoraPicker,\n        TzPicker,\n        TwelveHourPicker,\n        ClockFacePicker,\n        ClockMenu,\n        PositionBaseMenu,\n        NodeBaseMenu,\n        GpsToggleMenu,\n        GpsFormatMenu,\n        GpsSmartPositionMenu,\n        GpsUpdateIntervalMenu,\n        GpsPositionBroadcastMenu,\n        CompassPointNorthMenu,\n        ResetNodeDbMenu,\n        BuzzerModeMenuPicker,\n        MuiPicker,\n        TftColorMenuPicker,\n        BrightnessPicker,\n        RebootMenu,\n        ShutdownMenu,\n        NodePickerMenu,\n        ManageNodeMenu,\n        RemoveFavorite,\n        TestMenu,\n        NumberTest,\n        WifiToggleMenu,\n        BluetoothToggleMenu,\n        ScreenOptionsMenu,\n        PowerMenu,\n        SystemBaseMenu,\n        KeyVerificationInit,\n        KeyVerificationFinalPrompt,\n        TraceRouteMenu,\n        ThrottleMessage,\n        MessageResponseMenu,\n        MessageViewModeMenu,\n        ReplyMenu,\n        DeleteMessagesMenu,\n        NodeNameLengthMenu,\n        FrameToggles,\n        DisplayUnits,\n        MessageBubblesMenu\n    };\n    static screenMenus menuQueue;\n    static uint32_t pickedNodeNum; // node selected by NodePicker for ManageNodeMenu\n\n    static void OnboardMessage();\n    static void LoraRegionPicker(uint32_t duration = 30000);\n    static void loraMenu();\n    static void deviceRolePicker();\n    static void radioPresetPicker();\n    static void FrequencySlotPicker();\n    static void handleMenuSwitch(OLEDDisplay *display);\n    static void showConfirmationBanner(const char *message, std::function<void()> onConfirm);\n    static void clockMenu();\n    static void TZPicker();\n    static void twelveHourPicker();\n    static void clockFacePicker();\n    static void messageResponseMenu();\n    static void messageViewModeMenu();\n    static void replyMenu();\n    static void deleteMessagesMenu();\n    static void homeBaseMenu();\n    static void textMessageBaseMenu();\n    static void systemBaseMenu();\n    static void favoriteBaseMenu();\n    static void positionBaseMenu();\n    static void compassNorthMenu();\n    static void GPSToggleMenu();\n    static void GPSFormatMenu();\n    static void GPSSmartPositionMenu();\n    static void GPSUpdateIntervalMenu();\n    static void GPSPositionBroadcastMenu();\n    static void BuzzerModeMenu();\n    static void switchToMUIMenu();\n    static void TFTColorPickerMenu(OLEDDisplay *display);\n    static void nodeListMenu();\n    static void resetNodeDBMenu();\n    static void BrightnessPickerMenu();\n    static void rebootMenu();\n    static void shutdownMenu();\n    static void NodePicker();\n    static void manageNodeMenu();\n    static void addFavoriteMenu();\n    static void removeFavoriteMenu();\n    static void traceRouteMenu();\n    static void testMenu();\n    static void numberTest();\n    static void wifiBaseMenu();\n    static void wifiToggleMenu();\n    static void screenOptionsMenu();\n    static void powerMenu();\n    static void nodeNameLengthMenu();\n    static void frameTogglesMenu();\n    static void displayUnitsMenu();\n    static void messageBubblesMenu();\n    static void textMessageMenu();\n\n  private:\n    static void saveUIConfig();\n    static void keyVerificationInitMenu();\n    static void keyVerificationFinalPrompt();\n    static void bluetoothToggleMenu();\n};\n\n/* Generic Menu Options designations  */\nenum class OptionsAction { Back, Select };\n\ntemplate <typename T> struct MenuOption {\n    const char *label;\n    OptionsAction action;\n    bool hasValue;\n    T value;\n\n    MenuOption(const char *labelIn, OptionsAction actionIn, T valueIn)\n        : label(labelIn), action(actionIn), hasValue(true), value(valueIn)\n    {\n    }\n\n    MenuOption(const char *labelIn, OptionsAction actionIn) : label(labelIn), action(actionIn), hasValue(false), value() {}\n};\n\nstruct ScreenColor {\n    uint8_t r;\n    uint8_t g;\n    uint8_t b;\n    bool useVariant;\n\n    explicit ScreenColor(uint8_t rIn = 0, uint8_t gIn = 0, uint8_t bIn = 0, bool variantIn = false)\n        : r(rIn), g(gIn), b(bIn), useVariant(variantIn)\n    {\n    }\n};\n\nusing RadioPresetOption = MenuOption<meshtastic_Config_LoRaConfig_ModemPreset>;\nusing LoraRegionOption = MenuOption<meshtastic_Config_LoRaConfig_RegionCode>;\nusing TimezoneOption = MenuOption<const char *>;\nusing CompassOption = MenuOption<meshtastic_CompassMode>;\nusing ScreenColorOption = MenuOption<ScreenColor>;\nusing GPSToggleOption = MenuOption<meshtastic_Config_PositionConfig_GpsMode>;\nusing GPSFormatOption = MenuOption<meshtastic_DeviceUIConfig_GpsCoordinateFormat>;\nusing NodeNameOption = MenuOption<bool>;\nusing PositionMenuOption = MenuOption<int>;\nusing ManageNodeOption = MenuOption<int>;\nusing ClockFaceOption = MenuOption<bool>;\n\n} // namespace graphics\n#endif\n"
  },
  {
    "path": "src/graphics/draw/MessageRenderer.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"MessageRenderer.h\"\n\n// Core includes\n#include \"MessageStore.h\"\n#include \"NodeDB.h\"\n#include \"UIRenderer.h\"\n#include \"gps/RTC.h\"\n#include \"graphics/EmoteRenderer.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/TimeFormatters.h\"\n#include \"graphics/emotes.h\"\n#include \"main.h\"\n#include \"meshUtils.h\"\n#include <string>\n#include <vector>\n\n// External declarations\nextern bool hasUnreadMessage;\nextern graphics::Screen *screen;\n\nusing graphics::Emote;\nusing graphics::emotes;\nusing graphics::numEmotes;\n\nnamespace graphics\n{\nnamespace MessageRenderer\n{\n\nstatic std::vector<std::string> cachedLines;\nstatic std::vector<int> cachedHeights;\nstatic bool manualScrolling = false;\n\n// Scroll state (file scope so we can reset on new message)\nfloat scrollY = 0.0f;\nuint32_t lastTime = 0;\nuint32_t scrollStartDelay = 0;\nuint32_t pauseStart = 0;\nbool waitingToReset = false;\nbool scrollStarted = false;\nstatic bool didReset = false;\nstatic constexpr int MESSAGE_BLOCK_GAP = 6;\n\nvoid scrollUp()\n{\n    manualScrolling = true;\n    scrollY -= 12;\n    if (scrollY < 0)\n        scrollY = 0;\n}\n\nvoid scrollDown()\n{\n    manualScrolling = true;\n\n    int totalHeight = 0;\n    for (int h : cachedHeights)\n        totalHeight += h;\n\n    int visibleHeight = screen->getHeight() - (FONT_HEIGHT_SMALL * 2);\n    int maxScroll = totalHeight - visibleHeight;\n    if (maxScroll < 0)\n        maxScroll = 0;\n\n    scrollY += 12;\n    if (scrollY > maxScroll)\n        scrollY = maxScroll;\n}\n\nvoid drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, const Emote *emotes, int emoteCount)\n{\n    graphics::EmoteRenderer::drawStringWithEmotes(display, x, y, line, FONT_HEIGHT_SMALL, emotes, emoteCount);\n}\n\n// Reset scroll state when new messages arrive\nvoid resetScrollState()\n{\n    scrollY = 0.0f;\n    scrollStarted = false;\n    waitingToReset = false;\n    scrollStartDelay = millis();\n    lastTime = millis();\n    manualScrolling = false;\n    didReset = false;\n}\n\nvoid nudgeScroll(int8_t direction)\n{\n    if (direction == 0)\n        return;\n\n    if (cachedHeights.empty()) {\n        scrollY = 0.0f;\n        return;\n    }\n\n    OLEDDisplay *display = (screen != nullptr) ? screen->getDisplayDevice() : nullptr;\n    const int displayHeight = display ? display->getHeight() : 64;\n    const int navHeight = FONT_HEIGHT_SMALL;\n    const int usableHeight = std::max(0, displayHeight - navHeight);\n\n    int totalHeight = 0;\n    for (int h : cachedHeights)\n        totalHeight += h;\n\n    if (totalHeight <= usableHeight) {\n        scrollY = 0.0f;\n        return;\n    }\n\n    const int scrollStop = std::max(0, totalHeight - usableHeight + cachedHeights.back());\n    const int step = std::max(FONT_HEIGHT_SMALL, usableHeight / 3);\n\n    float newScroll = scrollY + static_cast<float>(direction) * static_cast<float>(step);\n    if (newScroll < 0.0f)\n        newScroll = 0.0f;\n    if (newScroll > scrollStop)\n        newScroll = static_cast<float>(scrollStop);\n\n    if (newScroll != scrollY) {\n        scrollY = newScroll;\n        waitingToReset = false;\n        scrollStarted = false;\n        scrollStartDelay = millis();\n        lastTime = millis();\n    }\n}\n\n// Fully free cached message data from heap\nvoid clearMessageCache()\n{\n    std::vector<std::string>().swap(cachedLines);\n    std::vector<int>().swap(cachedHeights);\n\n    // Reset scroll so we rebuild cleanly next time we enter the screen\n    resetScrollState();\n}\n\n// Current thread state\nstatic ThreadMode currentMode = ThreadMode::ALL;\nstatic int currentChannel = -1;\nstatic uint32_t currentPeer = 0;\n\n// Registry of seen threads for manual toggle\nstatic std::vector<int> seenChannels;\nstatic std::vector<uint32_t> seenPeers;\n\n// Public helper so menus / store can clear stale registries\nvoid clearThreadRegistries()\n{\n    seenChannels.clear();\n    seenPeers.clear();\n}\n\n// Setter so other code can switch threads\nvoid setThreadMode(ThreadMode mode, int channel /* = -1 */, uint32_t peer /* = 0 */)\n{\n    currentMode = mode;\n    currentChannel = channel;\n    currentPeer = peer;\n    didReset = false; // force reset when mode changes\n\n    // Track channels we’ve seen\n    if (mode == ThreadMode::CHANNEL && channel >= 0) {\n        if (std::find(seenChannels.begin(), seenChannels.end(), channel) == seenChannels.end()) {\n            seenChannels.push_back(channel);\n        }\n    }\n\n    // Track DMs we’ve seen\n    if (mode == ThreadMode::DIRECT && peer != 0) {\n        if (std::find(seenPeers.begin(), seenPeers.end(), peer) == seenPeers.end()) {\n            seenPeers.push_back(peer);\n        }\n    }\n}\n\nThreadMode getThreadMode()\n{\n    return currentMode;\n}\n\nint getThreadChannel()\n{\n    return currentChannel;\n}\n\nuint32_t getThreadPeer()\n{\n    return currentPeer;\n}\n\n// Accessors for menuHandler\nconst std::vector<int> &getSeenChannels()\n{\n    return seenChannels;\n}\nconst std::vector<uint32_t> &getSeenPeers()\n{\n    return seenPeers;\n}\n\nstatic int centerYForRow(int y, int size)\n{\n    int midY = y + (FONT_HEIGHT_SMALL / 2);\n    return midY - (size / 2);\n}\n\n// Helpers for drawing status marks (thickened strokes)\nstatic void drawCheckMark(OLEDDisplay *display, int x, int y, int size)\n{\n    int topY = centerYForRow(y, size);\n    display->setColor(WHITE);\n    display->drawLine(x, topY + size / 2, x + size / 3, topY + size);\n    display->drawLine(x, topY + size / 2 + 1, x + size / 3, topY + size + 1);\n    display->drawLine(x + size / 3, topY + size, x + size, topY);\n    display->drawLine(x + size / 3, topY + size + 1, x + size, topY + 1);\n}\n\nstatic void drawXMark(OLEDDisplay *display, int x, int y, int size = 8)\n{\n    int topY = centerYForRow(y, size);\n    display->setColor(WHITE);\n    display->drawLine(x, topY, x + size, topY + size);\n    display->drawLine(x, topY + 1, x + size, topY + size + 1);\n    display->drawLine(x + size, topY, x, topY + size);\n    display->drawLine(x + size, topY + 1, x, topY + size + 1);\n}\n\nstatic void drawRelayMark(OLEDDisplay *display, int x, int y, int size = 8)\n{\n    int r = size / 2;\n    int centerY = centerYForRow(y, size) + r;\n    int centerX = x + r;\n    display->setColor(WHITE);\n    display->drawCircle(centerX, centerY, r);\n    display->drawLine(centerX, centerY - 2, centerX, centerY);\n    display->setPixel(centerX, centerY + 2);\n    display->drawLine(centerX - 1, centerY - 4, centerX + 1, centerY - 4);\n}\n\nstatic inline int getRenderedLineWidth(OLEDDisplay *display, const std::string &line, const Emote *emotes, int emoteCount)\n{\n    return graphics::EmoteRenderer::analyzeLine(display, line, 0, emotes, emoteCount).width;\n}\n\nstruct MessageBlock {\n    size_t start;\n    size_t end;\n    bool mine;\n};\n\nstatic int getDrawnLinePixelBottom(int lineTopY, const std::string &line, bool isHeaderLine)\n{\n    if (isHeaderLine) {\n        return lineTopY + (FONT_HEIGHT_SMALL - 1);\n    }\n\n    const int tallest = graphics::EmoteRenderer::analyzeLine(nullptr, line, FONT_HEIGHT_SMALL, emotes, numEmotes).tallestHeight;\n\n    const int lineHeight = std::max(FONT_HEIGHT_SMALL, tallest);\n    const int iconTop = lineTopY + (lineHeight - tallest) / 2;\n\n    return iconTop + tallest - 1;\n}\n\nstatic std::vector<MessageBlock> buildMessageBlocks(const std::vector<bool> &isHeaderVec, const std::vector<bool> &isMineVec)\n{\n    std::vector<MessageBlock> blocks;\n    if (isHeaderVec.empty())\n        return blocks;\n\n    size_t start = 0;\n    bool mine = isMineVec[0];\n\n    for (size_t i = 1; i < isHeaderVec.size(); ++i) {\n        if (isHeaderVec[i]) {\n            MessageBlock b;\n            b.start = start;\n            b.end = i - 1;\n            b.mine = mine;\n            blocks.push_back(b);\n\n            start = i;\n            mine = isMineVec[i];\n        }\n    }\n\n    MessageBlock last;\n    last.start = start;\n    last.end = isHeaderVec.size() - 1;\n    last.mine = mine;\n    blocks.push_back(last);\n\n    return blocks;\n}\n\nstatic void drawMessageScrollbar(OLEDDisplay *display, int visibleHeight, int totalHeight, int scrollOffset, int startY)\n{\n    if (totalHeight <= visibleHeight)\n        return; // no scrollbar needed\n\n    int scrollbarX = display->getWidth() - 2;\n    int scrollbarHeight = visibleHeight;\n    int thumbHeight = std::max(6, (scrollbarHeight * visibleHeight) / totalHeight);\n    int maxScroll = std::max(1, totalHeight - visibleHeight);\n    int thumbY = startY + (scrollbarHeight - thumbHeight) * scrollOffset / maxScroll;\n\n    for (int i = 0; i < thumbHeight; i++) {\n        display->setPixel(scrollbarX, thumbY + i);\n    }\n}\n\nvoid drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    // Ensure any boot-relative timestamps are upgraded if RTC is valid\n    messageStore.upgradeBootRelativeTimestamps();\n\n    if (!didReset) {\n        resetScrollState();\n        didReset = true;\n    }\n\n    // Clear the unread message indicator when viewing the message\n    hasUnreadMessage = false;\n\n    // Filter messages based on thread mode\n    std::deque<StoredMessage> filtered;\n    for (const auto &m : messageStore.getLiveMessages()) {\n        bool include = false;\n        switch (currentMode) {\n        case ThreadMode::ALL:\n            include = true;\n            break;\n        case ThreadMode::CHANNEL:\n            if (m.type == MessageType::BROADCAST && (int)m.channelIndex == currentChannel)\n                include = true;\n            break;\n        case ThreadMode::DIRECT:\n            if (m.dest != NODENUM_BROADCAST && (m.sender == currentPeer || m.dest == currentPeer))\n                include = true;\n            break;\n        }\n        if (include)\n            filtered.push_back(m);\n    }\n\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    const int navHeight = FONT_HEIGHT_SMALL;\n    const int scrollBottom = SCREEN_HEIGHT - navHeight;\n    const int usableHeight = scrollBottom;\n    constexpr int LEFT_MARGIN = 2;\n    constexpr int RIGHT_MARGIN = 2;\n    constexpr int SCROLLBAR_WIDTH = 3;\n    constexpr int BUBBLE_PAD_X = 3;\n    constexpr int BUBBLE_PAD_Y = 4;\n    constexpr int BUBBLE_RADIUS = 4;\n    constexpr int BUBBLE_MIN_W = 24;\n    constexpr int BUBBLE_TEXT_INDENT = 2;\n\n    // Check if bubbles are enabled\n    const bool showBubbles = config.display.enable_message_bubbles;\n    const int textIndent = showBubbles ? (BUBBLE_PAD_X + BUBBLE_TEXT_INDENT) : LEFT_MARGIN;\n\n    // Derived widths\n    const int leftTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - (showBubbles ? (BUBBLE_PAD_X * 2) : 0);\n    const int rightTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - SCROLLBAR_WIDTH;\n\n    // Title string depending on mode\n    char titleStr[48];\n    snprintf(titleStr, sizeof(titleStr), \"Messages\");\n    switch (currentMode) {\n    case ThreadMode::ALL:\n        snprintf(titleStr, sizeof(titleStr), \"Messages\");\n        break;\n    case ThreadMode::CHANNEL: {\n        const char *cname = channels.getName(currentChannel);\n        if (cname && cname[0]) {\n            snprintf(titleStr, sizeof(titleStr), \"#%s\", cname);\n        } else {\n            snprintf(titleStr, sizeof(titleStr), \"Ch%d\", currentChannel);\n        }\n        break;\n    }\n    case ThreadMode::DIRECT: {\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(currentPeer);\n        if (node && node->has_user && node->user.short_name[0]) {\n            snprintf(titleStr, sizeof(titleStr), \"@%s\", node->user.short_name);\n        } else {\n            snprintf(titleStr, sizeof(titleStr), \"@%08x\", currentPeer);\n        }\n        break;\n    }\n    }\n\n    if (filtered.empty()) {\n        // If current conversation is empty go back to ALL view\n        if (currentMode != ThreadMode::ALL) {\n            setThreadMode(ThreadMode::ALL);\n            resetScrollState();\n            return; // Next draw will rerun in ALL mode\n        }\n\n        // Still in ALL mode and no messages at all → show placeholder\n        graphics::drawCommonHeader(display, x, y, titleStr);\n        didReset = false;\n        const char *messageString = \"No messages\";\n        int center_text = (SCREEN_WIDTH / 2) - (display->getStringWidth(messageString) / 2);\n        display->drawString(center_text, getTextPositions(display)[2], messageString);\n        graphics::drawCommonFooter(display, x, y);\n        return;\n    }\n\n    // Build lines for filtered messages (newest first)\n    std::vector<std::string> allLines;\n    std::vector<bool> isMine;   // track alignment\n    std::vector<bool> isHeader; // track header lines\n    std::vector<AckStatus> ackForLine;\n\n    for (auto it = filtered.rbegin(); it != filtered.rend(); ++it) {\n        const auto &m = *it;\n\n        // Channel / destination labeling\n        char chanType[32] = \"\";\n        if (currentMode == ThreadMode::ALL) {\n            if (m.dest == NODENUM_BROADCAST) {\n                const char *name = channels.getName(m.channelIndex);\n                if (currentResolution == ScreenResolution::Low || currentResolution == ScreenResolution::UltraLow) {\n                    if (strcmp(name, \"ShortTurbo\") == 0)\n                        name = \"ShortT\";\n                    else if (strcmp(name, \"ShortSlow\") == 0)\n                        name = \"ShortS\";\n                    else if (strcmp(name, \"ShortFast\") == 0)\n                        name = \"ShortF\";\n                    else if (strcmp(name, \"MediumSlow\") == 0)\n                        name = \"MedS\";\n                    else if (strcmp(name, \"MediumFast\") == 0)\n                        name = \"MedF\";\n                    else if (strcmp(name, \"LongSlow\") == 0)\n                        name = \"LongS\";\n                    else if (strcmp(name, \"LongFast\") == 0)\n                        name = \"LongF\";\n                    else if (strcmp(name, \"LongTurbo\") == 0)\n                        name = \"LongT\";\n                    else if (strcmp(name, \"LongMod\") == 0)\n                        name = \"LongM\";\n                }\n                snprintf(chanType, sizeof(chanType), \"#%s\", name);\n            } else {\n                snprintf(chanType, sizeof(chanType), \"(DM)\");\n            }\n        }\n\n        // Calculate how long ago\n        uint32_t nowSecs = getValidTime(RTCQuality::RTCQualityDevice, true);\n        uint32_t seconds = 0;\n        bool invalidTime = true;\n\n        if (m.timestamp > 0 && nowSecs > 0) {\n            if (nowSecs >= m.timestamp) {\n                seconds = nowSecs - m.timestamp;\n                invalidTime = (seconds > 315360000); // >10 years\n            } else {\n                uint32_t ahead = m.timestamp - nowSecs;\n                if (ahead <= 600) { // allow small skew\n                    seconds = 0;\n                    invalidTime = false;\n                }\n            }\n        } else if (m.timestamp > 0 && nowSecs == 0) {\n            // RTC not valid: only trust boot-relative if same boot\n            uint32_t bootNow = millis() / 1000;\n            if (m.isBootRelative && m.timestamp <= bootNow) {\n                seconds = bootNow - m.timestamp;\n                invalidTime = false;\n            } else {\n                invalidTime = true; // old persisted boot-relative, ignore until healed\n            }\n        }\n\n        char timeBuf[16];\n        if (invalidTime) {\n            snprintf(timeBuf, sizeof(timeBuf), \"???\");\n        } else if (seconds < 60) {\n            snprintf(timeBuf, sizeof(timeBuf), \"%us\", seconds);\n        } else if (seconds < 3600) {\n            snprintf(timeBuf, sizeof(timeBuf), \"%um\", seconds / 60);\n        } else if (seconds < 86400) {\n            snprintf(timeBuf, sizeof(timeBuf), \"%uh\", seconds / 3600);\n        } else {\n            snprintf(timeBuf, sizeof(timeBuf), \"%ud\", seconds / 86400);\n        }\n\n        // Build header line for this message\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(m.sender);\n        meshtastic_NodeInfoLite *node_recipient = nodeDB->getMeshNode(m.dest);\n\n        char senderName[64] = \"\";\n        if (node && node->has_user) {\n            if (node->user.long_name[0]) {\n                strncpy(senderName, node->user.long_name, sizeof(senderName) - 1);\n            } else if (node->user.short_name[0]) {\n                strncpy(senderName, node->user.short_name, sizeof(senderName) - 1);\n            }\n            senderName[sizeof(senderName) - 1] = '\\0';\n        }\n        if (!senderName[0]) {\n            snprintf(senderName, sizeof(senderName), \"(%08x)\", m.sender);\n        }\n\n        // If this is *our own* message, override senderName to who the recipient was\n        bool mine = (m.sender == nodeDB->getNodeNum());\n        if (mine && node_recipient && node_recipient->has_user) {\n            if (node_recipient->user.long_name[0]) {\n                strncpy(senderName, node_recipient->user.long_name, sizeof(senderName) - 1);\n                senderName[sizeof(senderName) - 1] = '\\0';\n            } else if (node_recipient->user.short_name[0]) {\n                strncpy(senderName, node_recipient->user.short_name, sizeof(senderName) - 1);\n                senderName[sizeof(senderName) - 1] = '\\0';\n            }\n        }\n        // If recipient info is missing/empty, prefer a recipient identifier for outbound messages.\n        if (mine && (!node_recipient || !node_recipient->has_user ||\n                     (!node_recipient->user.long_name[0] && !node_recipient->user.short_name[0]))) {\n            snprintf(senderName, sizeof(senderName), \"(%08x)\", m.dest);\n        }\n\n        // Shrink Sender name if needed\n        int availWidth = (mine ? rightTextWidth : leftTextWidth) - display->getStringWidth(timeBuf) -\n                         display->getStringWidth(chanType) - graphics::UIRenderer::measureStringWithEmotes(display, \"   @...\");\n        if (availWidth < 0)\n            availWidth = 0;\n        char truncatedSender[64];\n        graphics::UIRenderer::truncateStringWithEmotes(display, senderName, truncatedSender, sizeof(truncatedSender), availWidth);\n\n        // Final header line\n        char headerStr[128];\n        if (mine) {\n            if (currentMode == ThreadMode::ALL) {\n                if (strcmp(chanType, \"(DM)\") == 0) {\n                    snprintf(headerStr, sizeof(headerStr), \"%s to %s\", timeBuf, truncatedSender);\n                } else {\n                    snprintf(headerStr, sizeof(headerStr), \"%s to %s\", timeBuf, chanType);\n                }\n            } else {\n                snprintf(headerStr, sizeof(headerStr), \"%s\", timeBuf);\n            }\n        } else {\n            snprintf(headerStr, sizeof(headerStr), chanType[0] ? \"%s @%s %s\" : \"%s @%s\", timeBuf, truncatedSender, chanType);\n        }\n\n        // Push header line\n        allLines.push_back(headerStr);\n        isMine.push_back(mine);\n        isHeader.push_back(true);\n        ackForLine.push_back(m.ackStatus);\n\n        const char *msgText = MessageStore::getText(m);\n\n        int wrapWidth = mine ? rightTextWidth : leftTextWidth;\n        std::vector<std::string> wrapped = generateLines(display, \"\", msgText, wrapWidth);\n        for (auto &ln : wrapped) {\n            allLines.push_back(ln);\n            isMine.push_back(mine);\n            isHeader.push_back(false);\n            ackForLine.push_back(AckStatus::NONE);\n        }\n    }\n\n    // Cache lines and heights\n    cachedLines = allLines;\n    cachedHeights = calculateLineHeights(cachedLines, emotes, isHeader);\n\n    std::vector<MessageBlock> blocks = buildMessageBlocks(isHeader, isMine);\n\n    // Scrolling logic (unchanged)\n    int totalHeight = 0;\n    for (size_t i = 0; i < cachedHeights.size(); ++i)\n        totalHeight += cachedHeights[i];\n    int usableScrollHeight = usableHeight;\n    int scrollStop = std::max(0, totalHeight - usableScrollHeight + cachedHeights.back());\n\n#ifndef USE_EINK\n    uint32_t now = millis();\n    float delta = (now - lastTime) / 400.0f;\n    lastTime = now;\n    const float scrollSpeed = 2.0f;\n\n    if (scrollStartDelay == 0)\n        scrollStartDelay = now;\n    if (!scrollStarted && now - scrollStartDelay > 2000)\n        scrollStarted = true;\n\n    if (!manualScrolling && totalHeight > usableScrollHeight) {\n        if (scrollStarted) {\n            if (!waitingToReset) {\n                scrollY += delta * scrollSpeed;\n                if (scrollY >= scrollStop) {\n                    scrollY = scrollStop;\n                    waitingToReset = true;\n                    pauseStart = lastTime;\n                }\n            } else if (lastTime - pauseStart > 3000) {\n                scrollY = 0;\n                waitingToReset = false;\n                scrollStarted = false;\n                scrollStartDelay = lastTime;\n            }\n        }\n    } else if (!manualScrolling) {\n        scrollY = 0;\n    }\n#else\n    // E-Ink: disable autoscroll\n    scrollY = 0.0f;\n    waitingToReset = false;\n    scrollStarted = false;\n    lastTime = millis();\n#endif\n\n    int finalScroll = (int)scrollY;\n    int yOffset = -finalScroll + getTextPositions(display)[1];\n    const int contentTop = getTextPositions(display)[1];\n    const int contentBottom = scrollBottom; // already excludes nav line\n    const int rightEdge = SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN;\n    const int bubbleGapY = std::max(1, MESSAGE_BLOCK_GAP / 2);\n\n    std::vector<int> lineTop;\n    lineTop.resize(cachedLines.size());\n    {\n        int acc = 0;\n        for (size_t i = 0; i < cachedLines.size(); ++i) {\n            lineTop[i] = yOffset + acc;\n            acc += cachedHeights[i];\n        }\n    }\n\n    // Draw bubbles (only if enabled)\n    if (showBubbles) {\n        for (size_t bi = 0; bi < blocks.size(); ++bi) {\n            const auto &b = blocks[bi];\n            if (b.start >= cachedLines.size() || b.end >= cachedLines.size() || b.start > b.end)\n                continue;\n\n            int visualTop = lineTop[b.start];\n\n            int topY;\n            if (isHeader[b.start]) {\n                // Header start\n                constexpr int BUBBLE_PAD_TOP_HEADER = 1; // try 1 or 2\n                topY = visualTop - BUBBLE_PAD_TOP_HEADER;\n            } else {\n                // Body start\n                const bool thisLineHasEmote =\n                    graphics::EmoteRenderer::analyzeLine(nullptr, cachedLines[b.start].c_str(), 0, emotes, numEmotes).hasEmote;\n                if (thisLineHasEmote) {\n                    constexpr int EMOTE_PADDING_ABOVE = 4;\n                    visualTop -= EMOTE_PADDING_ABOVE;\n                }\n                topY = visualTop - BUBBLE_PAD_Y;\n            }\n            int visualBottom = getDrawnLinePixelBottom(lineTop[b.end], cachedLines[b.end], isHeader[b.end]);\n            int bottomY = visualBottom + BUBBLE_PAD_Y;\n\n            if (bi + 1 < blocks.size()) {\n                int nextHeaderIndex = (int)blocks[bi + 1].start;\n                int nextTop = lineTop[nextHeaderIndex];\n                int maxBottom = nextTop - 1 - bubbleGapY;\n                if (bottomY > maxBottom)\n                    bottomY = maxBottom;\n            }\n\n            if (bottomY <= topY + 2)\n                continue;\n\n            if (bottomY < contentTop || topY > contentBottom - 1)\n                continue;\n\n            int maxLineW = 0;\n\n            for (size_t i = b.start; i <= b.end; ++i) {\n                int w = 0;\n                if (isHeader[i]) {\n                    w = graphics::UIRenderer::measureStringWithEmotes(display, cachedLines[i].c_str());\n                    if (b.mine)\n                        w += 12; // room for ACK/NACK/relay mark\n                } else {\n                    w = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes);\n                }\n                if (w > maxLineW)\n                    maxLineW = w;\n            }\n\n            int bubbleW = std::max(BUBBLE_MIN_W, maxLineW + (textIndent * 2));\n            int bubbleH = (bottomY - topY) + 1;\n            int bubbleX = 0;\n            if (b.mine) {\n                bubbleX = rightEdge - bubbleW;\n            } else {\n                bubbleX = x;\n            }\n            if (bubbleX < x)\n                bubbleX = x;\n            if (bubbleX + bubbleW > rightEdge)\n                bubbleW = std::max(1, rightEdge - bubbleX);\n\n            // Draw rounded rectangle bubble\n            if (bubbleW > BUBBLE_RADIUS * 2 && bubbleH > BUBBLE_RADIUS * 2) {\n                const int r = BUBBLE_RADIUS;\n                const int bx = bubbleX;\n                const int by = topY;\n                const int bw = bubbleW;\n                const int bh = bubbleH;\n\n                // Draw the 4 corner arcs using drawCircleQuads\n                display->drawCircleQuads(bx + r, by + r, r, 0x2);                   // Top-left\n                display->drawCircleQuads(bx + bw - r - 1, by + r, r, 0x1);          // Top-right\n                display->drawCircleQuads(bx + r, by + bh - r - 1, r, 0x4);          // Bottom-left\n                display->drawCircleQuads(bx + bw - r - 1, by + bh - r - 1, r, 0x8); // Bottom-right\n\n                // Draw the 4 edges between corners\n                display->drawHorizontalLine(bx + r, by, bw - 2 * r);          // Top edge\n                display->drawHorizontalLine(bx + r, by + bh - 1, bw - 2 * r); // Bottom edge\n                display->drawVerticalLine(bx, by + r, bh - 2 * r);            // Left edge\n                display->drawVerticalLine(bx + bw - 1, by + r, bh - 2 * r);   // Right edge\n            } else if (bubbleW > 1 && bubbleH > 1) {\n                // Fallback to simple rectangle for very small bubbles\n                display->drawRect(bubbleX, topY, bubbleW, bubbleH);\n            }\n        }\n    } // end if (showBubbles)\n\n    // Render visible lines\n    int lineY = yOffset;\n    for (size_t i = 0; i < cachedLines.size(); ++i) {\n\n        if (lineY > -cachedHeights[i] && lineY < scrollBottom) {\n            if (isHeader[i]) {\n\n                int w = graphics::UIRenderer::measureStringWithEmotes(display, cachedLines[i].c_str());\n                int headerX;\n                if (isMine[i]) {\n                    // push header left to avoid overlap with scrollbar\n                    headerX = (SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN) - w - (showBubbles ? textIndent : 0);\n                    if (headerX < LEFT_MARGIN)\n                        headerX = LEFT_MARGIN;\n                } else {\n                    headerX = x + textIndent;\n                }\n                graphics::UIRenderer::drawStringWithEmotes(display, headerX, lineY, cachedLines[i].c_str(), FONT_HEIGHT_SMALL, 1,\n                                                           false);\n\n                // Draw underline just under header text\n                int underlineY = lineY + FONT_HEIGHT_SMALL;\n\n                int underlineW = w;\n                int maxW = rightEdge - headerX;\n                if (maxW < 0)\n                    maxW = 0;\n                if (underlineW > maxW)\n                    underlineW = maxW;\n\n                for (int px = 0; px < underlineW; ++px) {\n                    display->setPixel(headerX + px, underlineY);\n                }\n\n                // Draw ACK/NACK mark for our own messages\n                if (isMine[i]) {\n                    int markX = headerX - 10;\n                    int markY = lineY;\n                    if (ackForLine[i] == AckStatus::ACKED) {\n                        // Destination ACK\n                        drawCheckMark(display, markX, markY, 8);\n                    } else if (ackForLine[i] == AckStatus::NACKED || ackForLine[i] == AckStatus::TIMEOUT) {\n                        // Failure or timeout\n                        drawXMark(display, markX, markY, 8);\n                    } else if (ackForLine[i] == AckStatus::RELAYED) {\n                        // Relay ACK\n                        drawRelayMark(display, markX, markY, 8);\n                    }\n                    // AckStatus::NONE → show nothing\n                }\n\n            } else {\n                // Render message line\n                if (isMine[i]) {\n                    // Calculate actual rendered width including emotes\n                    int renderedWidth = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes);\n                    int rightX = (SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN) - renderedWidth - (showBubbles ? textIndent : 0);\n                    if (rightX < LEFT_MARGIN)\n                        rightX = LEFT_MARGIN;\n\n                    drawStringWithEmotes(display, rightX, lineY, cachedLines[i], emotes, numEmotes);\n                } else {\n                    drawStringWithEmotes(display, x + textIndent, lineY, cachedLines[i], emotes, numEmotes);\n                }\n            }\n        }\n\n        lineY += cachedHeights[i];\n    }\n\n    // Draw scrollbar\n    drawMessageScrollbar(display, usableHeight, totalHeight, finalScroll, getTextPositions(display)[1]);\n    graphics::drawCommonHeader(display, x, y, titleStr);\n    graphics::drawCommonFooter(display, x, y);\n}\n\nstd::vector<std::string> generateLines(OLEDDisplay *display, const char *headerStr, const char *messageBuf, int textWidth)\n{\n    std::vector<std::string> lines;\n\n    // Only push headerStr if it's not empty (prevents extra blank line after headers)\n    if (headerStr && headerStr[0] != '\\0') {\n        lines.push_back(std::string(headerStr));\n    }\n\n    std::string line, word;\n    for (int i = 0; messageBuf[i]; ++i) {\n        char ch = messageBuf[i];\n        if ((unsigned char)messageBuf[i] == 0xE2 && (unsigned char)messageBuf[i + 1] == 0x80 &&\n            (unsigned char)messageBuf[i + 2] == 0x99) {\n            ch = '\\''; // plain apostrophe\n            i += 2;    // skip over the extra UTF-8 bytes\n        }\n        if (ch == '\\n') {\n            if (!word.empty())\n                line += word;\n            if (!line.empty())\n                lines.push_back(line);\n            line.clear();\n            word.clear();\n        } else if (ch == ' ') {\n            line += word + ' ';\n            word.clear();\n        } else {\n            word += ch;\n            std::string test = line + word;\n            uint16_t strWidth = graphics::UIRenderer::measureStringWithEmotes(display, test.c_str());\n            if (strWidth > textWidth) {\n                if (!line.empty())\n                    lines.push_back(line);\n                line = word;\n                word.clear();\n            }\n        }\n    }\n\n    if (!word.empty())\n        line += word;\n    if (!line.empty())\n        lines.push_back(line);\n\n    return lines;\n}\nstd::vector<int> calculateLineHeights(const std::vector<std::string> &lines, const Emote *emotes,\n                                      const std::vector<bool> &isHeaderVec)\n{\n    // Tunables for layout control\n    constexpr int HEADER_UNDERLINE_GAP = 0; // space between underline and first body line\n    constexpr int HEADER_UNDERLINE_PIX = 1; // underline thickness (1px row drawn)\n    constexpr int BODY_LINE_LEADING = -4;   // default vertical leading for normal body lines\n    constexpr int EMOTE_PADDING_ABOVE = 4;  // space above emote line (added to line above)\n    constexpr int EMOTE_PADDING_BELOW = 3;  // space below emote line (added to emote line)\n\n    std::vector<int> rowHeights;\n    rowHeights.reserve(lines.size());\n    std::vector<graphics::EmoteRenderer::LineMetrics> lineMetrics;\n    lineMetrics.reserve(lines.size());\n\n    for (const auto &line : lines) {\n        lineMetrics.push_back(graphics::EmoteRenderer::analyzeLine(nullptr, line, FONT_HEIGHT_SMALL, emotes, numEmotes));\n    }\n\n    for (size_t idx = 0; idx < lines.size(); ++idx) {\n        const int baseHeight = FONT_HEIGHT_SMALL;\n        int lineHeight = baseHeight;\n\n        const int tallestEmote = lineMetrics[idx].tallestHeight;\n        const bool hasEmote = lineMetrics[idx].hasEmote;\n        const bool nextHasEmote = (idx + 1 < lines.size()) && lineMetrics[idx + 1].hasEmote;\n\n        if (isHeaderVec[idx]) {\n            // Header line spacing\n            lineHeight = baseHeight + HEADER_UNDERLINE_PIX + HEADER_UNDERLINE_GAP;\n        } else {\n            // Base spacing for normal lines\n            int desiredBody = baseHeight + BODY_LINE_LEADING;\n\n            if (hasEmote) {\n                // Emote line: add overshoot + bottom padding\n                int overshoot = std::max(0, tallestEmote - baseHeight);\n                lineHeight = desiredBody + overshoot + EMOTE_PADDING_BELOW;\n            } else {\n                // Regular line: no emote → standard spacing\n                lineHeight = desiredBody;\n\n                // If next line has an emote → add top padding *here*\n                if (nextHasEmote) {\n                    lineHeight += EMOTE_PADDING_ABOVE;\n                }\n            }\n\n            // Add block gap if next is a header\n            if (idx + 1 < lines.size() && isHeaderVec[idx + 1]) {\n                lineHeight += MESSAGE_BLOCK_GAP;\n            }\n        }\n\n        rowHeights.push_back(lineHeight);\n    }\n\n    return rowHeights;\n}\n\nvoid handleNewMessage(OLEDDisplay *display, const StoredMessage &sm, const meshtastic_MeshPacket &packet)\n{\n    if (packet.from != 0) {\n        hasUnreadMessage = true;\n\n        // Determine if message belongs to a muted channel\n        bool isChannelMuted = false;\n        if (sm.type == MessageType::BROADCAST) {\n            const meshtastic_Channel channel = channels.getByIndex(packet.channel ? packet.channel : channels.getPrimaryIndex());\n            if (channel.settings.has_module_settings && channel.settings.module_settings.is_muted)\n                isChannelMuted = true;\n        }\n\n        // Banner logic\n        const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet.from);\n        char longName[64] = \"?\";\n        if (node && node->has_user) {\n            if (node->user.long_name[0]) {\n                strncpy(longName, node->user.long_name, sizeof(longName) - 1);\n                longName[sizeof(longName) - 1] = '\\0';\n            } else if (node->user.short_name[0]) {\n                strncpy(longName, node->user.short_name, sizeof(longName) - 1);\n                longName[sizeof(longName) - 1] = '\\0';\n            }\n        }\n        int availWidth = display->getWidth() - ((currentResolution == ScreenResolution::High) ? 40 : 20);\n        if (availWidth < 0)\n            availWidth = 0;\n        char truncatedLongName[64];\n        graphics::UIRenderer::truncateStringWithEmotes(display, longName, truncatedLongName, sizeof(truncatedLongName),\n                                                       availWidth);\n        const char *msgRaw = reinterpret_cast<const char *>(packet.decoded.payload.bytes);\n\n        char banner[256];\n        bool isAlert = false;\n\n        // Check if alert detection is enabled via external notification module\n        if (moduleConfig.external_notification.alert_bell || moduleConfig.external_notification.alert_bell_vibra ||\n            moduleConfig.external_notification.alert_bell_buzzer) {\n            for (size_t i = 0; i < packet.decoded.payload.size && i < 100; i++) {\n                if (msgRaw[i] == '\\x07') {\n                    isAlert = true;\n                    break;\n                }\n            }\n        }\n\n        if (isAlert) {\n            if (truncatedLongName[0])\n                snprintf(banner, sizeof(banner), \"Alert Received from\\n%s\", truncatedLongName);\n            else\n                strcpy(banner, \"Alert Received\");\n        } else {\n            // Skip muted channels unless it's an alert\n            if (isChannelMuted)\n                return;\n\n            if (truncatedLongName[0]) {\n                if (currentResolution == ScreenResolution::UltraLow) {\n                    strcpy(banner, \"New Message\");\n                } else {\n                    snprintf(banner, sizeof(banner), \"New Message from\\n%s\", truncatedLongName);\n                }\n            } else\n                strcpy(banner, \"New Message\");\n        }\n\n        // Append context (which channel or DM) so the banner shows where the message arrived\n        {\n            char contextBuf[64] = \"\";\n            if (sm.type == MessageType::BROADCAST) {\n                const char *cname = channels.getName(sm.channelIndex);\n                if (cname && cname[0])\n                    snprintf(contextBuf, sizeof(contextBuf), \"in #%s\", cname);\n                else\n                    snprintf(contextBuf, sizeof(contextBuf), \"in Ch%d\", sm.channelIndex);\n            }\n\n            if (contextBuf[0]) {\n                size_t cur = strlen(banner);\n                if (cur + 1 < sizeof(banner)) {\n                    if (cur > 0 && banner[cur - 1] != '\\n') {\n                        banner[cur] = '\\n';\n                        banner[cur + 1] = '\\0';\n                        cur++;\n                    }\n                    strncat(banner, contextBuf, sizeof(banner) - cur - 1);\n                }\n            }\n        }\n\n        // Shorter banner if already in a conversation (Channel or Direct)\n        bool inThread = (getThreadMode() != ThreadMode::ALL);\n\n        if (shouldWakeOnReceivedMessage()) {\n            screen->setOn(true);\n        }\n\n        screen->showSimpleBanner(banner, inThread ? 1000 : 3000);\n    }\n\n    // Always focus into the correct conversation thread when a message with real text arrives\n    const char *msgText = MessageStore::getText(sm);\n    if (msgText && msgText[0] != '\\0') {\n        setThreadFor(sm, packet);\n    }\n\n    // Reset scroll for a clean start\n    resetScrollState();\n}\n\nvoid setThreadFor(const StoredMessage &sm, const meshtastic_MeshPacket &packet)\n{\n    if (packet.to == 0 || packet.to == NODENUM_BROADCAST) {\n        setThreadMode(ThreadMode::CHANNEL, sm.channelIndex);\n    } else {\n        uint32_t localNode = nodeDB->getNodeNum();\n        uint32_t peer = (sm.sender == localNode) ? packet.to : sm.sender;\n        setThreadMode(ThreadMode::DIRECT, -1, peer);\n    }\n}\n\n} // namespace MessageRenderer\n} // namespace graphics\n#endif\n"
  },
  {
    "path": "src/graphics/draw/MessageRenderer.h",
    "content": "#pragma once\n#include \"MessageStore.h\" // for StoredMessage\n#if HAS_SCREEN\n#include \"OLEDDisplay.h\"\n#include \"OLEDDisplayUi.h\"\n#include \"graphics/emotes.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\" // for meshtastic_MeshPacket\n#include <cstdint>\n#include <string>\n#include <vector>\n\nnamespace graphics\n{\nnamespace MessageRenderer\n{\n\n// Thread filter modes\nenum class ThreadMode { ALL, CHANNEL, DIRECT };\n\n// Setter for switching thread mode\nvoid setThreadMode(ThreadMode mode, int channel = -1, uint32_t peer = 0);\n\n// Getter for current mode\nThreadMode getThreadMode();\n\n// Getter for current channel (valid if mode == CHANNEL)\nint getThreadChannel();\n\n// Getter for current peer (valid if mode == DIRECT)\nuint32_t getThreadPeer();\n\n// Registry accessors for menuHandler\nconst std::vector<int> &getSeenChannels();\nconst std::vector<uint32_t> &getSeenPeers();\n\nvoid clearThreadRegistries();\n\n// Text and emote rendering\nvoid drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, const Emote *emotes, int emoteCount);\n\n/// Draws the text message frame for displaying received messages\nvoid drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n// Function to generate lines with word wrapping\nstd::vector<std::string> generateLines(OLEDDisplay *display, const char *headerStr, const char *messageBuf, int textWidth);\n\n// Function to calculate heights for each line\nstd::vector<int> calculateLineHeights(const std::vector<std::string> &lines, const Emote *emotes,\n                                      const std::vector<bool> &isHeaderVec);\n\n// Reset scroll state when new messages arrive\nvoid resetScrollState();\n\n// Manual scroll control for encoder-style inputs\nvoid nudgeScroll(int8_t direction);\n\n// Helper to auto-select the correct thread mode from a message\nvoid setThreadFor(const StoredMessage &sm, const meshtastic_MeshPacket &packet);\n\n// Handles a new incoming/outgoing message: banner, wake, thread select, scroll reset\nvoid handleNewMessage(OLEDDisplay *display, const StoredMessage &sm, const meshtastic_MeshPacket &packet);\n\n// Clear Message Line Cache from Message Renderer\nvoid clearMessageCache();\n\nvoid scrollUp();\nvoid scrollDown();\n\n} // namespace MessageRenderer\n} // namespace graphics\n#endif"
  },
  {
    "path": "src/graphics/draw/NodeListRenderer.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"CompassRenderer.h\"\n#include \"NodeDB.h\"\n#include \"NodeListRenderer.h\"\n#include \"UIRenderer.h\"\n#include \"gps/GeoCoord.h\"\n#include \"gps/RTC.h\" // for getTime() function\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/images.h\"\n#include \"meshUtils.h\"\n#include <algorithm>\n\n// Forward declarations for functions defined in Screen.cpp\nnamespace graphics\n{\nextern bool haveGlyphs(const char *str);\n} // namespace graphics\n\n// Global screen instance\nextern graphics::Screen *screen;\n\n#if defined(M5STACK_UNITC6L)\nstatic uint32_t lastSwitchTime = 0;\n#endif\nnamespace graphics\n{\nnamespace NodeListRenderer\n{\n\n// Function moved from Screen.cpp to NodeListRenderer.cpp since it's primarily used here\nvoid drawScaledXBitmap16x16(int x, int y, int width, int height, const uint8_t *bitmapXBM, OLEDDisplay *display)\n{\n    for (int row = 0; row < height; row++) {\n        uint8_t rowMask = (1 << row);\n        for (int col = 0; col < width; col++) {\n            uint8_t colData = pgm_read_byte(&bitmapXBM[col]);\n            if (colData & rowMask) {\n                // Note: rows become X, columns become Y after transpose\n                display->fillRect(x + row * 2, y + col * 2, 2, 2);\n            }\n        }\n    }\n}\n\n// Static variables for dynamic cycling\nstatic ListMode_Node currentMode_Nodes = MODE_LAST_HEARD;\nstatic ListMode_Location currentMode_Location = MODE_DISTANCE;\nstatic int scrollIndex = 0;\n// Popup overlay state\nstatic uint32_t popupTime = 0;\nstatic int popupTotal = 0;\nstatic int popupStart = 0;\nstatic int popupEnd = 0;\nstatic int popupPage = 1;\nstatic int popupMaxPage = 1;\n\nstatic const uint32_t POPUP_DURATION_MS = 1000; // 1 second visible\n\n// =============================\n// Scrolling Logic\n// =============================\nvoid scrollUp()\n{\n    if (scrollIndex > 0)\n        scrollIndex--;\n\n    popupTime = millis(); // show popup\n}\n\nvoid scrollDown()\n{\n    scrollIndex++;\n    popupTime = millis();\n}\n\n// =============================\n// Utility Functions\n// =============================\n\nstd::string getSafeNodeName(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int columnWidth)\n{\n    (void)display;\n    (void)columnWidth;\n\n    auto fallbackId = [&] {\n        char id[12];\n        std::snprintf(id, sizeof(id), \"(%04X)\", static_cast<uint16_t>(node ? (node->num & 0xFFFF) : 0));\n        return std::string(id);\n    };\n\n    // 1) Choose target candidate (long vs short) only if present\n    const char *raw = nullptr;\n    if (node && node->has_user) {\n        raw = config.display.use_long_node_name ? node->user.long_name : node->user.short_name;\n    }\n\n    // 2) Preserve UTF-8 names so emotes can be detected and rendered.\n    std::string nodeName = (raw && *raw) ? std::string(raw) : std::string{};\n    if (nodeName.empty()) {\n        nodeName = fallbackId();\n    }\n\n    return nodeName;\n}\n\nconst char *getCurrentModeTitle_Nodes(int screenWidth)\n{\n    switch (currentMode_Nodes) {\n    case MODE_LAST_HEARD:\n        return \"Last Heard\";\n    case MODE_HOP_SIGNAL:\n#ifdef USE_EINK\n        return \"Hops/Sig\";\n#else\n        return (currentResolution == ScreenResolution::High) ? \"Hops/Signal\" : \"Hops/Sig\";\n#endif\n    default:\n        return \"Nodes\";\n    }\n}\n\nconst char *getCurrentModeTitle_Location(int screenWidth)\n{\n    switch (currentMode_Location) {\n    case MODE_DISTANCE:\n        return \"Distance\";\n    case MODE_BEARING:\n        return \"Bearings\";\n    default:\n        return \"Nodes\";\n    }\n}\n\nstatic int getNodeNameMaxWidth(int columnWidth, int baseWidth)\n{\n    if (!config.display.use_long_node_name)\n        return baseWidth;\n\n    const int legacyLongNameWidth = columnWidth - ((currentResolution == ScreenResolution::High) ? 65 : 38);\n    return std::max(0, std::min(baseWidth, legacyLongNameWidth));\n}\n\n// Use dynamic timing based on mode\nunsigned long getModeCycleIntervalMs()\n{\n    return 3000;\n}\n\nint calculateMaxScroll(int totalEntries, int visibleRows)\n{\n    return max(0, (totalEntries - 1) / (visibleRows * 2));\n}\n\nvoid drawColumnSeparator(OLEDDisplay *display, int16_t x, int16_t yStart, int16_t yEnd)\n{\n    x = (currentResolution == ScreenResolution::High) ? x - 2 : (currentResolution == ScreenResolution::Low) ? x - 1 : x;\n    for (int y = yStart; y <= yEnd; y += 2) {\n        display->setPixel(x, y);\n    }\n}\n\nvoid drawScrollbar(OLEDDisplay *display, int visibleNodeRows, int totalEntries, int scrollIndex, int columns, int scrollStartY)\n{\n    if (totalEntries <= visibleNodeRows * columns)\n        return;\n\n    int scrollbarHeight = display->getHeight() - scrollStartY - 10;\n    int thumbHeight = max(4, (scrollbarHeight * visibleNodeRows * columns) / totalEntries);\n    int thumbY = scrollStartY + (scrollIndex * (scrollbarHeight - thumbHeight)) /\n                                    max(1, max(0, (totalEntries - 1) / (visibleNodeRows * columns)));\n\n    int scrollbarX = display->getWidth() - 2;\n    for (int i = 0; i < thumbHeight; i++) {\n        display->setPixel(scrollbarX, thumbY + i);\n    }\n}\n\n// =============================\n// Entry Renderers\n// =============================\n\nvoid drawEntryLastHeard(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth)\n{\n    bool isLeftCol = (x < SCREEN_WIDTH / 2);\n    int nameMaxWidth = getNodeNameMaxWidth(columnWidth, columnWidth - 25);\n    int timeOffset = (currentResolution == ScreenResolution::High) ? (isLeftCol ? 7 : 10) : (isLeftCol ? 3 : 7);\n\n    const int nameX = x + ((currentResolution == ScreenResolution::High) ? 6 : 3);\n    char nodeName[96];\n    UIRenderer::truncateStringWithEmotes(display, getSafeNodeName(display, node, columnWidth).c_str(), nodeName, sizeof(nodeName),\n                                         nameMaxWidth);\n    bool isMuted = (node->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) != 0;\n\n    char timeStr[10];\n    uint32_t seconds = sinceLastSeen(node);\n    if (seconds == 0 || seconds == UINT32_MAX) {\n        snprintf(timeStr, sizeof(timeStr), \"?\");\n    } else {\n        uint32_t minutes = seconds / 60, hours = minutes / 60, days = hours / 24;\n        snprintf(timeStr, sizeof(timeStr), (days > 365 ? \"?\" : \"%d%c\"),\n                 (days    ? days\n                  : hours ? hours\n                          : minutes),\n                 (days    ? 'd'\n                  : hours ? 'h'\n                          : 'm'));\n    }\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    UIRenderer::drawStringWithEmotes(display, nameX, y, nodeName, FONT_HEIGHT_SMALL, 1, false);\n    if (node->is_favorite) {\n        if (currentResolution == ScreenResolution::High) {\n            drawScaledXBitmap16x16(x, y + 6, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint, display);\n        } else {\n            display->drawXbm(x, y + 5, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint);\n        }\n    }\n    if (node->is_ignored || isMuted) {\n        if (currentResolution == ScreenResolution::High) {\n            display->drawLine(x + 8, y + 8, (isLeftCol ? 0 : x - 4) + nameMaxWidth - 17, y + 8);\n        } else {\n            display->drawLine(x + 4, y + 6, (isLeftCol ? 0 : x - 3) + nameMaxWidth - 4, y + 6);\n        }\n    }\n\n    int rightEdge = x + columnWidth - timeOffset;\n    if (timeStr[strlen(timeStr) - 1] == 'm') // Fix the fact that our fonts don't line up well all the time\n        rightEdge -= 1;\n    int textWidth = display->getStringWidth(timeStr);\n    display->drawString(rightEdge - textWidth, y, timeStr);\n}\n\nvoid drawEntryHopSignal(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth)\n{\n    bool isLeftCol = (x < SCREEN_WIDTH / 2);\n\n    int nameMaxWidth = getNodeNameMaxWidth(columnWidth, columnWidth - 25);\n    int barsOffset = (currentResolution == ScreenResolution::High) ? (isLeftCol ? 20 : 24) : (isLeftCol ? 15 : 19);\n    int hopOffset = (currentResolution == ScreenResolution::High) ? (isLeftCol ? 21 : 29) : (isLeftCol ? 13 : 17);\n\n    int barsXOffset = columnWidth - barsOffset;\n\n    const int nameX = x + ((currentResolution == ScreenResolution::High) ? 6 : 3);\n    char nodeName[96];\n    UIRenderer::truncateStringWithEmotes(display, getSafeNodeName(display, node, columnWidth).c_str(), nodeName, sizeof(nodeName),\n                                         nameMaxWidth);\n    bool isMuted = (node->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) != 0;\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n\n    UIRenderer::drawStringWithEmotes(display, nameX, y, nodeName, FONT_HEIGHT_SMALL, 1, false);\n    if (node->is_favorite) {\n        if (currentResolution == ScreenResolution::High) {\n            drawScaledXBitmap16x16(x, y + 6, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint, display);\n        } else {\n            display->drawXbm(x, y + 5, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint);\n        }\n    }\n    if (node->is_ignored || isMuted) {\n        if (currentResolution == ScreenResolution::High) {\n            display->drawLine(x + 8, y + 8, (isLeftCol ? 0 : x - 4) + nameMaxWidth - 17, y + 8);\n        } else {\n            display->drawLine(x + 4, y + 6, (isLeftCol ? 0 : x - 3) + nameMaxWidth - 4, y + 6);\n        }\n    }\n\n    // Draw signal strength bars\n    int bars = (node->snr > 5) ? 4 : (node->snr > 0) ? 3 : (node->snr > -5) ? 2 : (node->snr > -10) ? 1 : 0;\n    int barWidth = 2;\n    int barStartX = x + barsXOffset;\n    int barStartY = y + 1 + (FONT_HEIGHT_SMALL / 2) + 2;\n\n    for (int b = 0; b < 4; b++) {\n        if (b < bars) {\n            int height = (b * 2);\n            display->fillRect(barStartX + (b * (barWidth + 1)), barStartY - height, barWidth, height);\n        }\n    }\n\n    // Draw hop count\n    char hopStr[6] = \"\";\n    if (node->has_hops_away && node->hops_away > 0)\n        snprintf(hopStr, sizeof(hopStr), \"[%d]\", node->hops_away);\n\n    if (hopStr[0] != '\\0') {\n        int rightEdge = x + columnWidth - hopOffset;\n        int textWidth = display->getStringWidth(hopStr);\n        display->drawString(rightEdge - textWidth, y, hopStr);\n    }\n}\n\nvoid drawNodeDistance(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth)\n{\n    bool isLeftCol = (x < SCREEN_WIDTH / 2);\n    int nameMaxWidth =\n        getNodeNameMaxWidth(columnWidth, columnWidth - ((currentResolution == ScreenResolution::High) ? (isLeftCol ? 25 : 28)\n                                                                                                      : (isLeftCol ? 20 : 22)));\n\n    const int nameX = x + ((currentResolution == ScreenResolution::High) ? 6 : 3);\n    char nodeName[96];\n    UIRenderer::truncateStringWithEmotes(display, getSafeNodeName(display, node, columnWidth).c_str(), nodeName, sizeof(nodeName),\n                                         nameMaxWidth);\n    bool isMuted = (node->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) != 0;\n    char distStr[10] = \"\";\n\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    if (nodeDB->hasValidPosition(ourNode) && nodeDB->hasValidPosition(node)) {\n        double lat1 = ourNode->position.latitude_i * 1e-7;\n        double lon1 = ourNode->position.longitude_i * 1e-7;\n        double lat2 = node->position.latitude_i * 1e-7;\n        double lon2 = node->position.longitude_i * 1e-7;\n\n        double earthRadiusKm = 6371.0;\n        double dLat = (lat2 - lat1) * DEG_TO_RAD;\n        double dLon = (lon2 - lon1) * DEG_TO_RAD;\n\n        double a =\n            sin(dLat / 2) * sin(dLat / 2) + cos(lat1 * DEG_TO_RAD) * cos(lat2 * DEG_TO_RAD) * sin(dLon / 2) * sin(dLon / 2);\n        double c = 2 * atan2(sqrt(a), sqrt(1 - a));\n        double distanceKm = earthRadiusKm * c;\n\n        if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) {\n            double miles = distanceKm * 0.621371;\n            if (miles < 0.1) {\n                int feet = (int)(miles * 5280);\n                if (feet < 1000)\n                    snprintf(distStr, sizeof(distStr), \"%dft\", feet);\n                else\n                    snprintf(distStr, sizeof(distStr), \"¼mi\"); // 4-char max\n            } else {\n                int roundedMiles = (int)(miles + 0.5);\n                if (roundedMiles < 1000)\n                    snprintf(distStr, sizeof(distStr), \"%dmi\", roundedMiles);\n                else\n                    snprintf(distStr, sizeof(distStr), \"999\"); // Max display cap\n            }\n        } else {\n            if (distanceKm < 1.0) {\n                int meters = (int)(distanceKm * 1000);\n                if (meters < 1000)\n                    snprintf(distStr, sizeof(distStr), \"%dm\", meters);\n                else\n                    snprintf(distStr, sizeof(distStr), \"1k\");\n            } else {\n                int km = (int)(distanceKm + 0.5);\n                if (km < 1000)\n                    snprintf(distStr, sizeof(distStr), \"%dk\", km);\n                else\n                    snprintf(distStr, sizeof(distStr), \"999\");\n            }\n        }\n    }\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    UIRenderer::drawStringWithEmotes(display, nameX, y, nodeName, FONT_HEIGHT_SMALL, 1, false);\n    if (node->is_favorite) {\n        if (currentResolution == ScreenResolution::High) {\n            drawScaledXBitmap16x16(x, y + 6, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint, display);\n        } else {\n            display->drawXbm(x, y + 5, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint);\n        }\n    }\n    if (node->is_ignored || isMuted) {\n        if (currentResolution == ScreenResolution::High) {\n            display->drawLine(x + 8, y + 8, (isLeftCol ? 0 : x - 4) + nameMaxWidth - 17, y + 8);\n        } else {\n            display->drawLine(x + 4, y + 6, (isLeftCol ? 0 : x - 3) + nameMaxWidth - 4, y + 6);\n        }\n    }\n\n    if (strlen(distStr) > 0) {\n        int offset = (currentResolution == ScreenResolution::High)\n                         ? (isLeftCol ? 7 : 10) // Offset for Wide Screens (Left Column:Right Column)\n                         : (isLeftCol ? 4 : 7); // Offset for Narrow Screens (Left Column:Right Column)\n        int rightEdge = x + columnWidth - offset;\n        int textWidth = display->getStringWidth(distStr);\n        display->drawString(rightEdge - textWidth, y, distStr);\n    }\n}\n\nvoid drawEntryDynamic_Nodes(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth)\n{\n    switch (currentMode_Nodes) {\n    case MODE_LAST_HEARD:\n        drawEntryLastHeard(display, node, x, y, columnWidth);\n        break;\n    case MODE_HOP_SIGNAL:\n        drawEntryHopSignal(display, node, x, y, columnWidth);\n        break;\n    default:\n        break;\n    }\n}\n\nvoid drawEntryCompass(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth)\n{\n    bool isLeftCol = (x < SCREEN_WIDTH / 2);\n\n    // Adjust max text width depending on column and screen width\n    int nameMaxWidth =\n        getNodeNameMaxWidth(columnWidth, columnWidth - ((currentResolution == ScreenResolution::High) ? (isLeftCol ? 25 : 28)\n                                                                                                      : (isLeftCol ? 20 : 22)));\n\n    const int nameX = x + ((currentResolution == ScreenResolution::High) ? 6 : 3);\n    char nodeName[96];\n    UIRenderer::truncateStringWithEmotes(display, getSafeNodeName(display, node, columnWidth).c_str(), nodeName, sizeof(nodeName),\n                                         nameMaxWidth);\n    bool isMuted = (node->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) != 0;\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    UIRenderer::drawStringWithEmotes(display, nameX, y, nodeName, FONT_HEIGHT_SMALL, 1, false);\n    if (node->is_favorite) {\n        if (currentResolution == ScreenResolution::High) {\n            drawScaledXBitmap16x16(x, y + 6, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint, display);\n        } else {\n            display->drawXbm(x, y + 5, smallbulletpoint_width, smallbulletpoint_height, smallbulletpoint);\n        }\n    }\n    if (node->is_ignored || isMuted) {\n        if (currentResolution == ScreenResolution::High) {\n            display->drawLine(x + 8, y + 8, (isLeftCol ? 0 : x - 4) + nameMaxWidth - 17, y + 8);\n        } else {\n            display->drawLine(x + 4, y + 6, (isLeftCol ? 0 : x - 3) + nameMaxWidth - 4, y + 6);\n        }\n    }\n}\n\nvoid drawCompassArrow(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth, float myHeading,\n                      double userLat, double userLon)\n{\n    if (!nodeDB->hasValidPosition(node))\n        return;\n\n    bool isLeftCol = (x < SCREEN_WIDTH / 2);\n    int arrowXOffset = (currentResolution == ScreenResolution::High) ? (isLeftCol ? 22 : 24) : (isLeftCol ? 12 : 18);\n\n    int centerX = x + columnWidth - arrowXOffset;\n    int centerY = y + FONT_HEIGHT_SMALL / 2;\n\n    double nodeLat = node->position.latitude_i * 1e-7;\n    double nodeLon = node->position.longitude_i * 1e-7;\n    float bearing = GeoCoord::bearing(userLat, userLon, nodeLat, nodeLon);\n    float bearingToNode = RAD_TO_DEG * bearing;\n    float relativeBearing = fmod((bearingToNode - myHeading + 360), 360);\n    // Shrink size by 2px\n    int size = FONT_HEIGHT_SMALL - 5;\n    CompassRenderer::drawArrowToNode(display, centerX, centerY, size, relativeBearing);\n    /*\n    float angle = relativeBearing * DEG_TO_RAD;\n    float halfSize = size / 2.0;\n\n    // Point of the arrow\n    int tipX = centerX + halfSize * cos(angle);\n    int tipY = centerY - halfSize * sin(angle);\n\n    float baseAngle = radians(35);\n    float sideLen = halfSize * 0.95;\n    float notchInset = halfSize * 0.35;\n\n    // Left and right corners\n    int leftX = centerX + sideLen * cos(angle + PI - baseAngle);\n    int leftY = centerY - sideLen * sin(angle + PI - baseAngle);\n\n    int rightX = centerX + sideLen * cos(angle + PI + baseAngle);\n    int rightY = centerY - sideLen * sin(angle + PI + baseAngle);\n\n    // Center notch (cut-in)\n    int notchX = centerX - notchInset * cos(angle);\n    int notchY = centerY + notchInset * sin(angle);\n\n    // Draw the chevron-style arrowhead\n    display->fillTriangle(tipX, tipY, leftX, leftY, notchX, notchY);\n    display->fillTriangle(tipX, tipY, notchX, notchY, rightX, rightY);\n    */\n}\n\n// =============================\n// Main Screen Functions\n// =============================\n\nvoid drawNodeListScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *title,\n                        EntryRenderer renderer, NodeExtrasRenderer extras, float heading, double lat, double lon)\n{\n    const int COMMON_HEADER_HEIGHT = FONT_HEIGHT_SMALL - 1;\n    const int rowYOffset = FONT_HEIGHT_SMALL - 3;\n    bool locationScreen = false;\n\n    if (strcmp(title, \"Bearings\") == 0)\n        locationScreen = true;\n    else if (strcmp(title, \"Distance\") == 0)\n        locationScreen = true;\n    display->clear();\n\n    // Draw the battery/time header\n    graphics::drawCommonHeader(display, x, y, title);\n\n    // Space below header\n    y += COMMON_HEADER_HEIGHT;\n\n    int totalColumns = 1; // Default to 1 column\n\n    if (config.display.use_long_node_name) {\n        if (SCREEN_WIDTH <= 240) {\n            totalColumns = 1;\n        } else if (SCREEN_WIDTH > 240) {\n            totalColumns = 2;\n        }\n    } else {\n        if (SCREEN_WIDTH <= 64) {\n            totalColumns = 1;\n        } else if (SCREEN_WIDTH > 64 && SCREEN_WIDTH <= 240) {\n            totalColumns = 2;\n        } else {\n            totalColumns = 3;\n        }\n    }\n\n    int columnWidth = display->getWidth() / totalColumns;\n\n    int totalEntries = nodeDB->getNumMeshNodes();\n    int totalRowsAvailable = (display->getHeight() - y) / rowYOffset;\n    int numskipped = 0;\n    int visibleNodeRows = totalRowsAvailable;\n\n    // Build filtered + ordered list\n    std::vector<int> drawList;\n    drawList.reserve(totalEntries);\n    for (int i = 0; i < totalEntries; i++) {\n        auto *n = nodeDB->getMeshNodeByIndex(i);\n\n        if (!n)\n            continue;\n        if (n->num == nodeDB->getNodeNum())\n            continue;\n        if (locationScreen && !n->has_position)\n            continue;\n\n        drawList.push_back(n->num);\n    }\n    totalEntries = drawList.size();\n    int perPage = visibleNodeRows * totalColumns;\n\n    int maxScroll = 0;\n    if (perPage > 0) {\n        maxScroll = max(0, (totalEntries - 1) / perPage);\n    }\n\n    if (scrollIndex > maxScroll)\n        scrollIndex = maxScroll;\n    int startIndex = scrollIndex * visibleNodeRows * totalColumns;\n    int endIndex = min(startIndex + visibleNodeRows * totalColumns, totalEntries);\n    int yOffset = 0;\n    int col = 0;\n    int lastNodeY = y;\n    int shownCount = 0;\n    int rowCount = 0;\n\n    for (int idx = startIndex; idx < endIndex; idx++) {\n        uint32_t nodeNum = drawList[idx];\n        auto *node = nodeDB->getMeshNode(nodeNum);\n        int xPos = x + (col * columnWidth);\n        int yPos = y + yOffset;\n\n        renderer(display, node, xPos, yPos, columnWidth);\n\n        if (extras)\n            extras(display, node, xPos, yPos, columnWidth, heading, lat, lon);\n\n        lastNodeY = max(lastNodeY, yPos + FONT_HEIGHT_SMALL);\n        yOffset += rowYOffset;\n        shownCount++;\n        rowCount++;\n\n        if (rowCount >= totalRowsAvailable) {\n            yOffset = 0;\n            rowCount = 0;\n            col++;\n            if (col > (totalColumns - 1))\n                break;\n        }\n    }\n\n    // This should correct the scrollbar\n    totalEntries -= numskipped;\n\n    // Draw column separator\n    if (currentResolution != ScreenResolution::UltraLow && shownCount > 0) {\n        const int firstNodeY = y + 3;\n        for (int horizontal_offset = 1; horizontal_offset < totalColumns; horizontal_offset++) {\n            drawColumnSeparator(display, columnWidth * horizontal_offset, firstNodeY, lastNodeY);\n        }\n    }\n\n    const int scrollStartY = y + 3;\n    drawScrollbar(display, visibleNodeRows, totalEntries, scrollIndex, totalColumns, scrollStartY);\n    graphics::drawCommonFooter(display, x, y);\n\n    // Scroll Popup Overlay\n    if (millis() - popupTime < POPUP_DURATION_MS) {\n        popupTotal = totalEntries;\n\n        popupStart = startIndex + 1;\n        popupEnd = min(startIndex + perPage, totalEntries);\n\n        popupPage = (scrollIndex + 1);\n        popupMaxPage = max(1, (totalEntries + perPage - 1) / perPage);\n\n        char buf[32];\n        snprintf(buf, sizeof(buf), \"%d-%d/%d  Pg %d/%d\", popupStart, popupEnd, popupTotal, popupPage, popupMaxPage);\n\n        display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n        // Box padding\n        int padding = 2;\n        int textW = display->getStringWidth(buf);\n        int textH = FONT_HEIGHT_SMALL;\n        int boxWidth = textW + padding * 3;\n        int boxHeight = textH + padding * 2;\n\n        // Center of usable screen area:\n        int headerHeight = FONT_HEIGHT_SMALL - 1;\n        int footerHeight = FONT_HEIGHT_SMALL + 2;\n\n        int usableTop = headerHeight;\n        int usableBottom = display->getHeight() - footerHeight;\n        int usableHeight = usableBottom - usableTop;\n\n        // Center point inside usable area\n        int boxLeft = (display->getWidth() - boxWidth) / 2;\n        int boxTop = usableTop + (usableHeight - boxHeight) / 2;\n\n        // Draw Box\n        display->setColor(BLACK);\n        display->fillRect(boxLeft - 1, boxTop - 1, boxWidth + 2, boxHeight + 2);\n        display->fillRect(boxLeft, boxTop - 2, boxWidth, 1);\n        display->fillRect(boxLeft, boxTop + boxHeight + 1, boxWidth, 1);\n        display->fillRect(boxLeft - 2, boxTop, 1, boxHeight);\n        display->fillRect(boxLeft + boxWidth + 1, boxTop, 1, boxHeight);\n        display->setColor(WHITE);\n        display->drawRect(boxLeft, boxTop, boxWidth, boxHeight);\n        display->setColor(BLACK);\n        display->fillRect(boxLeft, boxTop, 1, 1);\n        display->fillRect(boxLeft + boxWidth - 1, boxTop, 1, 1);\n        display->fillRect(boxLeft, boxTop + boxHeight - 1, 1, 1);\n        display->fillRect(boxLeft + boxWidth - 1, boxTop + boxHeight - 1, 1, 1);\n        display->setColor(WHITE);\n\n        // Text\n        display->drawString(boxLeft + padding, boxTop + padding, buf);\n    }\n}\n\n// =============================\n// Screen Frame Functions\n// =============================\n\n#ifndef USE_EINK\n// Node list for Last Heard and Hop Signal views\nvoid drawDynamicListScreen_Nodes(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    // Static variables to track mode and duration\n    static ListMode_Node lastRenderedMode = MODE_COUNT_NODE;\n    static unsigned long modeStartTime = 0;\n\n    unsigned long now = millis();\n\n#if defined(M5STACK_UNITC6L)\n    display->clear();\n    if (now - lastSwitchTime >= 3000) {\n        display->display();\n        lastSwitchTime = now;\n    }\n#endif\n    // On very first call (on boot or state enter)\n    if (lastRenderedMode == MODE_COUNT_NODE) {\n        currentMode_Nodes = MODE_LAST_HEARD;\n        modeStartTime = now;\n    }\n\n    // Time to switch to next mode?\n    if (now - modeStartTime >= getModeCycleIntervalMs()) {\n        currentMode_Nodes = static_cast<ListMode_Node>((currentMode_Nodes + 1) % MODE_COUNT_NODE);\n        modeStartTime = now;\n    }\n\n    // Render screen based on currentMode\n    const char *title = getCurrentModeTitle_Nodes(display->getWidth());\n    drawNodeListScreen(display, state, x, y, title, drawEntryDynamic_Nodes);\n\n    // Track the last mode to avoid reinitializing modeStartTime\n    lastRenderedMode = currentMode_Nodes;\n}\n\n// Node list for Distance and Bearings views\nvoid drawDynamicListScreen_Location(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    // Static variables to track mode and duration\n    static ListMode_Location lastRenderedMode = MODE_COUNT_LOCATION;\n    static unsigned long modeStartTime = 0;\n\n    unsigned long now = millis();\n\n#if defined(M5STACK_UNITC6L)\n    display->clear();\n    if (now - lastSwitchTime >= 3000) {\n        display->display();\n        lastSwitchTime = now;\n    }\n#endif\n    // On very first call (on boot or state enter)\n    if (lastRenderedMode == MODE_COUNT_LOCATION) {\n        currentMode_Location = MODE_DISTANCE;\n        modeStartTime = now;\n    }\n\n    // Time to switch to next mode?\n    if (now - modeStartTime >= getModeCycleIntervalMs()) {\n        currentMode_Location = static_cast<ListMode_Location>((currentMode_Location + 1) % MODE_COUNT_LOCATION);\n        modeStartTime = now;\n    }\n\n    // Render screen based on currentMode\n    const char *title = getCurrentModeTitle_Location(display->getWidth());\n\n    // Render screen based on currentMode_Location\n    if (currentMode_Location == MODE_DISTANCE) {\n        drawNodeListScreen(display, state, x, y, title, drawNodeDistance);\n    } else if (currentMode_Location == MODE_BEARING) {\n        drawNodeListWithCompasses(display, state, x, y);\n    }\n\n    // Track the last mode to avoid reinitializing modeStartTime\n    lastRenderedMode = currentMode_Location;\n}\n#endif\n\n#ifdef USE_EINK\nvoid drawLastHeardScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    const char *title = \"Last Heard\";\n    drawNodeListScreen(display, state, x, y, title, drawEntryLastHeard);\n}\n\nvoid drawHopSignalScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n#ifdef USE_EINK\n    const char *title = \"Hops/Sig\";\n#else\n\n    const char *title = \"Hops/Signal\";\n#endif\n    drawNodeListScreen(display, state, x, y, title, drawEntryHopSignal);\n}\nvoid drawDistanceScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    const char *title = \"Distance\";\n    drawNodeListScreen(display, state, x, y, title, drawNodeDistance);\n}\n#endif\nvoid drawNodeListWithCompasses(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    float heading = 0;\n    bool validHeading = false;\n    auto ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    double lat = DegD(ourNode->position.latitude_i);\n    double lon = DegD(ourNode->position.longitude_i);\n\n#if defined(M5STACK_UNITC6L)\n    display->clear();\n    uint32_t now = millis();\n    if (now - lastSwitchTime >= 2000) {\n        display->display();\n        lastSwitchTime = now;\n    }\n#endif\n    if (uiconfig.compass_mode != meshtastic_CompassMode_FREEZE_HEADING) {\n#if HAS_GPS\n        if (screen->hasHeading()) {\n            heading = screen->getHeading(); // degrees\n            validHeading = true;\n        } else {\n            heading = screen->estimatedHeading(lat, lon);\n            validHeading = !isnan(heading);\n        }\n#endif\n\n        if (!validHeading)\n            return;\n    }\n    drawNodeListScreen(display, state, x, y, \"Bearings\", drawEntryCompass, drawCompassArrow, heading, lat, lon);\n}\n\n/// Draw a series of fields in a column, wrapping to multiple columns if needed\nvoid drawColumns(OLEDDisplay *display, int16_t x, int16_t y, const char **fields)\n{\n    // The coordinates define the left starting point of the text\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    const char **f = fields;\n    int xo = x, yo = y;\n    while (*f) {\n        display->drawString(xo, yo, *f);\n        if ((display->getColor() == BLACK) && config.display.heading_bold)\n            display->drawString(xo + 1, yo, *f);\n\n        display->setColor(WHITE);\n        yo += FONT_HEIGHT_SMALL;\n        if (yo > SCREEN_HEIGHT - FONT_HEIGHT_SMALL) {\n            xo += SCREEN_WIDTH / 2;\n            yo = 0;\n        }\n        f++;\n    }\n}\n\n} // namespace NodeListRenderer\n} // namespace graphics\n#endif\n"
  },
  {
    "path": "src/graphics/draw/NodeListRenderer.h",
    "content": "#pragma once\n\n#include \"graphics/Screen.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n#include <string>\n\nnamespace graphics\n{\n\n/// Forward declarations\nclass Screen;\n\n/**\n * @brief Node list and entry rendering functions\n *\n * Contains all functions related to drawing node lists and individual node entries\n * including last heard, hop signal, distance, and compass views.\n */\nnamespace NodeListRenderer\n{\n// Entry renderer function types\ntypedef void (*EntryRenderer)(OLEDDisplay *, meshtastic_NodeInfoLite *, int16_t, int16_t, int);\ntypedef void (*NodeExtrasRenderer)(OLEDDisplay *, meshtastic_NodeInfoLite *, int16_t, int16_t, int, float, double, double);\n\n// Node list mode enumeration for Last Heard and Hop Signal views\nenum ListMode_Node { MODE_LAST_HEARD = 0, MODE_HOP_SIGNAL = 1, MODE_COUNT_NODE = 2 };\n\n// Node list mode enumeration for Distance and Bearings views\nenum ListMode_Location { MODE_DISTANCE = 0, MODE_BEARING = 1, MODE_COUNT_LOCATION = 2 };\n\n// Main node list screen function\nvoid drawNodeListScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *title,\n                        EntryRenderer renderer, NodeExtrasRenderer extras = nullptr, float heading = 0, double lat = 0,\n                        double lon = 0);\n\n// Entry renderers\nvoid drawEntryLastHeard(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth);\nvoid drawEntryHopSignal(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth);\nvoid drawNodeDistance(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth);\nvoid drawEntryDynamic_Nodes(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth);\nvoid drawEntryCompass(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth);\n\n// Extras renderers\nvoid drawCompassArrow(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int16_t x, int16_t y, int columnWidth, float myHeading,\n                      double userLat, double userLon);\n\n// Screen frame functions\nvoid drawLastHeardScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawHopSignalScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawDistanceScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawDynamicListScreen_Nodes(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawDynamicListScreen_Location(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\nvoid drawNodeListWithCompasses(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n// Utility functions\nconst char *getCurrentModeTitle_Nodes(int screenWidth);\nconst char *getCurrentModeTitle_Location(int screenWidth);\nstd::string getSafeNodeName(OLEDDisplay *display, meshtastic_NodeInfoLite *node, int columnWidth);\nvoid drawColumns(OLEDDisplay *display, int16_t x, int16_t y, const char **fields);\n\n// Scrolling controls\nvoid scrollUp();\nvoid scrollDown();\n\n// Bitmap drawing function\nvoid drawScaledXBitmap16x16(int x, int y, int width, int height, const uint8_t *bitmapXBM, OLEDDisplay *display);\n\n} // namespace NodeListRenderer\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/draw/NotificationRenderer.cpp",
    "content": "#include \"configuration.h\"\n\n#if HAS_SCREEN\n#include \"DisplayFormatters.h\"\n#include \"NodeDB.h\"\n#include \"NotificationRenderer.h\"\n#include \"UIRenderer.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/images.h\"\n#include \"input/RotaryEncoderInterruptImpl1.h\"\n#include \"input/UpDownInterruptImpl1.h\"\n#if HAS_BUTTON\n#include \"input/ButtonThread.h\"\n#endif\n#include \"main.h\"\n#include <algorithm>\n#include <string>\n#include <vector>\n#if HAS_TRACKBALL\n#include \"input/TrackballInterruptImpl1.h\"\n#endif\n\n#ifdef ARCH_ESP32\n#include \"esp_task_wdt.h\"\n#endif\n\nusing namespace meshtastic;\n\n#if HAS_BUTTON\n// Global button thread pointer defined in main.cpp\nextern ::ButtonThread *UserButtonThread;\n#endif\n\n// External references to global variables from Screen.cpp\nextern std::vector<std::string> functionSymbol;\nextern std::string functionSymbolString;\nextern bool hasUnreadMessage;\n\nnamespace graphics\n{\nint bannerSignalBars = -1;\nInputEvent NotificationRenderer::inEvent;\nint8_t NotificationRenderer::curSelected = 0;\nchar NotificationRenderer::alertBannerMessage[256] = {0};\nuint32_t NotificationRenderer::alertBannerUntil = 0;  // 0 is a special case meaning forever\nuint8_t NotificationRenderer::alertBannerOptions = 0; // last x lines are selectable options\nconst char **NotificationRenderer::optionsArrayPtr = nullptr;\nconst int *NotificationRenderer::optionsEnumPtr = nullptr;\nstd::function<void(int)> NotificationRenderer::alertBannerCallback = NULL;\nbool NotificationRenderer::pauseBanner = false;\nnotificationTypeEnum NotificationRenderer::current_notification_type = notificationTypeEnum::none;\nuint32_t NotificationRenderer::numDigits = 0;\nuint32_t NotificationRenderer::currentNumber = 0;\nVirtualKeyboard *NotificationRenderer::virtualKeyboard = nullptr;\nstd::function<void(const std::string &)> NotificationRenderer::textInputCallback = nullptr;\n\nuint32_t pow_of_10(uint32_t n)\n{\n    uint32_t ret = 1;\n    for (uint32_t i = 0; i < n; i++) {\n        ret *= 10;\n    }\n    return ret;\n}\n\n// Used on boot when a certificate is being created\nvoid NotificationRenderer::drawSSLScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    display->setFont(FONT_SMALL);\n    display->drawString(64 + x, y, \"Creating SSL certificate\");\n\n#ifdef ARCH_ESP32\n    yield();\n    esp_task_wdt_reset();\n#endif\n\n    display->setFont(FONT_SMALL);\n    if ((millis() / 1000) % 2) {\n        display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, \"Please wait . . .\");\n    } else {\n        display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, \"Please wait . .  \");\n    }\n}\n\nvoid NotificationRenderer::resetBanner()\n{\n    notificationTypeEnum previousType = current_notification_type;\n\n    alertBannerMessage[0] = '\\0';\n    current_notification_type = notificationTypeEnum::none;\n\n    OnScreenKeyboardModule::instance().clearPopup();\n\n    inEvent.inputEvent = INPUT_BROKER_NONE;\n    inEvent.kbchar = 0;\n    curSelected = 0;\n    alertBannerOptions = 0; // last x lines are selectable options\n    optionsArrayPtr = nullptr;\n    optionsEnumPtr = nullptr;\n    alertBannerCallback = NULL;\n    pauseBanner = false;\n    numDigits = 0;\n    currentNumber = 0;\n\n    nodeDB->pause_sort(false);\n\n    // If we're exiting from text_input (virtual keyboard), stop module and trigger frame update\n    // to ensure any messages received during keyboard use are now displayed\n    if (previousType == notificationTypeEnum::text_input && screen) {\n        OnScreenKeyboardModule::instance().stop(false);\n        screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n    }\n}\n\nvoid NotificationRenderer::drawBannercallback(OLEDDisplay *display, OLEDDisplayUiState *state)\n{\n    // Handle text_input notifications first - they have their own timeout/banner logic\n    if (current_notification_type == notificationTypeEnum::text_input) {\n        // Check for timeout and reset if needed for text input\n        if (millis() > alertBannerUntil && alertBannerUntil > 0) {\n            resetBanner();\n            return;\n        }\n        drawTextInput(display, state);\n        return;\n    }\n\n    if (millis() > alertBannerUntil && alertBannerUntil > 0) {\n        resetBanner();\n    }\n\n    // Exit if no banner is showing or banner is paused\n    if (!isOverlayBannerShowing() || pauseBanner) {\n        return;\n    }\n\n    switch (current_notification_type) {\n    case notificationTypeEnum::none:\n        // Do nothing - no notification to display\n        break;\n    case notificationTypeEnum::text_input:\n        // Already handled above with dedicated logic (early return). Keep a case here to satisfy -Wswitch.\n        break;\n    case notificationTypeEnum::text_banner:\n    case notificationTypeEnum::selection_picker:\n        drawAlertBannerOverlay(display, state);\n        break;\n    case notificationTypeEnum::node_picker:\n        drawNodePicker(display, state);\n        break;\n    case notificationTypeEnum::number_picker:\n        drawNumberPicker(display, state);\n        break;\n    }\n}\n\nvoid NotificationRenderer::drawNumberPicker(OLEDDisplay *display, OLEDDisplayUiState *state)\n{\n    const char *lineStarts[MAX_LINES + 1] = {0};\n    uint16_t lineCount = 0;\n\n    // Parse lines\n    char *alertEnd = alertBannerMessage + strnlen(alertBannerMessage, sizeof(alertBannerMessage));\n    lineStarts[lineCount] = alertBannerMessage;\n\n    // Find lines\n    while ((lineCount < MAX_LINES) && (lineStarts[lineCount] < alertEnd)) {\n        lineStarts[lineCount + 1] = std::find((char *)lineStarts[lineCount], alertEnd, '\\n');\n        if (lineStarts[lineCount + 1][0] == '\\n')\n            lineStarts[lineCount + 1] += 1;\n        lineCount++;\n    }\n    // modulo to extract\n    uint8_t this_digit = (currentNumber % (pow_of_10(numDigits - curSelected))) / (pow_of_10(numDigits - curSelected - 1));\n    // Handle input\n    if (inEvent.inputEvent == INPUT_BROKER_UP || inEvent.inputEvent == INPUT_BROKER_ALT_PRESS ||\n        inEvent.inputEvent == INPUT_BROKER_UP_LONG) {\n        if (this_digit == 9) {\n            currentNumber -= 9 * (pow_of_10(numDigits - curSelected - 1));\n        } else {\n            currentNumber += (pow_of_10(numDigits - curSelected - 1));\n        }\n    } else if (inEvent.inputEvent == INPUT_BROKER_DOWN || inEvent.inputEvent == INPUT_BROKER_USER_PRESS ||\n               inEvent.inputEvent == INPUT_BROKER_DOWN_LONG) {\n        if (this_digit == 0) {\n            currentNumber += 9 * (pow_of_10(numDigits - curSelected - 1));\n        } else {\n            currentNumber -= (pow_of_10(numDigits - curSelected - 1));\n        }\n    } else if (inEvent.inputEvent == INPUT_BROKER_ANYKEY) {\n        if (inEvent.kbchar > 47 && inEvent.kbchar < 58) { // have a digit\n            currentNumber -= this_digit * (pow_of_10(numDigits - curSelected - 1));\n            currentNumber += (inEvent.kbchar - 48) * (pow_of_10(numDigits - curSelected - 1));\n            curSelected++;\n        }\n    } else if (inEvent.inputEvent == INPUT_BROKER_SELECT || inEvent.inputEvent == INPUT_BROKER_RIGHT) {\n        curSelected++;\n    } else if (inEvent.inputEvent == INPUT_BROKER_LEFT) {\n        curSelected--;\n    } else if ((inEvent.inputEvent == INPUT_BROKER_CANCEL || inEvent.inputEvent == INPUT_BROKER_ALT_LONG) &&\n               alertBannerUntil != 0) {\n        resetBanner();\n        return;\n    }\n    if (curSelected == static_cast<int8_t>(numDigits)) {\n        alertBannerCallback(currentNumber);\n        resetBanner();\n        return;\n    }\n\n    inEvent.inputEvent = INPUT_BROKER_NONE;\n    if (alertBannerMessage[0] == '\\0')\n        return;\n\n    uint16_t totalLines = lineCount + 2;\n    const char *linePointers[totalLines + 1] = {0}; // this is sort of a dynamic allocation\n\n    // copy the linestarts to display to the linePointers holder\n    for (uint16_t i = 0; i < lineCount; i++) {\n        linePointers[i] = lineStarts[i];\n    }\n    std::string digits = \" \";\n    std::string arrowPointer = \" \";\n    for (uint16_t i = 0; i < numDigits; i++) {\n        // Modulo minus modulo to return just the current number\n        digits += std::to_string((currentNumber % (pow_of_10(numDigits - i))) / (pow_of_10(numDigits - i - 1))) + \" \";\n        if (curSelected == i) {\n            arrowPointer += \"^ \";\n        } else {\n            arrowPointer += \"_ \";\n        }\n    }\n\n    linePointers[lineCount++] = digits.c_str();\n    linePointers[lineCount++] = arrowPointer.c_str();\n\n    drawNotificationBox(display, state, linePointers, totalLines, 0);\n}\n\nvoid NotificationRenderer::drawNodePicker(OLEDDisplay *display, OLEDDisplayUiState *state)\n{\n    static uint32_t selectedNodenum = 0;\n\n    // === Layout Configuration ===\n    constexpr uint16_t vPadding = 2;\n    alertBannerOptions = nodeDB->getNumMeshNodes() - 1;\n\n    // let the box drawing function calculate the widths?\n\n    const char *lineStarts[MAX_LINES + 1] = {0};\n    uint16_t lineCount = 0;\n\n    // Parse lines\n    char *alertEnd = alertBannerMessage + strnlen(alertBannerMessage, sizeof(alertBannerMessage));\n    lineStarts[lineCount] = alertBannerMessage;\n\n    while ((lineCount < MAX_LINES) && (lineStarts[lineCount] < alertEnd)) {\n        lineStarts[lineCount + 1] = std::find((char *)lineStarts[lineCount], alertEnd, '\\n');\n        if (lineStarts[lineCount + 1][0] == '\\n')\n            lineStarts[lineCount + 1] += 1;\n        lineCount++;\n    }\n\n    // Handle input\n    if (inEvent.inputEvent == INPUT_BROKER_UP || inEvent.inputEvent == INPUT_BROKER_LEFT ||\n        inEvent.inputEvent == INPUT_BROKER_ALT_PRESS || inEvent.inputEvent == INPUT_BROKER_UP_LONG) {\n        curSelected--;\n    } else if (inEvent.inputEvent == INPUT_BROKER_DOWN || inEvent.inputEvent == INPUT_BROKER_RIGHT ||\n               inEvent.inputEvent == INPUT_BROKER_USER_PRESS || inEvent.inputEvent == INPUT_BROKER_DOWN_LONG) {\n        curSelected++;\n    } else if (inEvent.inputEvent == INPUT_BROKER_SELECT) {\n        alertBannerCallback(selectedNodenum);\n        resetBanner();\n        return;\n    } else if ((inEvent.inputEvent == INPUT_BROKER_CANCEL || inEvent.inputEvent == INPUT_BROKER_ALT_LONG) &&\n               alertBannerUntil != 0) {\n        resetBanner();\n        return;\n    }\n\n    if (curSelected == -1)\n        curSelected = alertBannerOptions - 1;\n    if (curSelected == alertBannerOptions)\n        curSelected = 0;\n\n    inEvent.inputEvent = INPUT_BROKER_NONE;\n    if (alertBannerMessage[0] == '\\0')\n        return;\n\n    uint16_t totalLines = lineCount + alertBannerOptions;\n    uint16_t screenHeight = display->height();\n    uint8_t effectiveLineHeight = FONT_HEIGHT_SMALL - 3;\n    uint8_t visibleTotalLines = std::min<uint8_t>(totalLines, (screenHeight - vPadding * 2) / effectiveLineHeight);\n    uint8_t linesShown = lineCount;\n    const char *linePointers[visibleTotalLines + 1] = {0}; // this is sort of a dynamic allocation\n\n    // copy the linestarts to display to the linePointers holder\n    for (int i = 0; i < lineCount; i++) {\n        linePointers[i] = lineStarts[i];\n    }\n    char scratchLineBuffer[visibleTotalLines - lineCount][64];\n\n    uint8_t firstOptionToShow = 0;\n    if (curSelected > 1 && alertBannerOptions > visibleTotalLines - lineCount) {\n        if (curSelected > alertBannerOptions - visibleTotalLines + lineCount)\n            firstOptionToShow = alertBannerOptions - visibleTotalLines + lineCount;\n        else\n            firstOptionToShow = curSelected - 1;\n    } else {\n        firstOptionToShow = 0;\n    }\n    int scratchLineNum = 0;\n    for (int i = firstOptionToShow; i < alertBannerOptions && linesShown < visibleTotalLines; i++, linesShown++) {\n        char tempName[48] = {0};\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i + 1);\n        if (node && node->has_user) {\n            const char *rawName = nullptr;\n            if (node->user.long_name[0]) {\n                rawName = node->user.long_name;\n            } else if (node->user.short_name[0]) {\n                rawName = node->user.short_name;\n            }\n            if (rawName) {\n                const int arrowWidth = (currentResolution == ScreenResolution::High)\n                                           ? UIRenderer::measureStringWithEmotes(display, \">  <\")\n                                           : UIRenderer::measureStringWithEmotes(display, \"><\");\n                const int maxTextWidth = std::max(0, display->getWidth() - 28 - arrowWidth);\n                UIRenderer::truncateStringWithEmotes(display, rawName, tempName, sizeof(tempName), maxTextWidth);\n            }\n        } else {\n            snprintf(tempName, sizeof(tempName), \"(%04X)\", (uint16_t)(node ? (node->num & 0xFFFF) : 0));\n        }\n        if (!tempName[0]) {\n            snprintf(tempName, sizeof(tempName), \"(%04X)\", (uint16_t)(node ? (node->num & 0xFFFF) : 0));\n        }\n        if (i == curSelected) {\n            selectedNodenum = node ? node->num : 0;\n            if (currentResolution == ScreenResolution::High) {\n                strncpy(scratchLineBuffer[scratchLineNum], \"> \", 3);\n                strncpy(scratchLineBuffer[scratchLineNum] + 2, tempName, sizeof(scratchLineBuffer[scratchLineNum]) - 3);\n                scratchLineBuffer[scratchLineNum][sizeof(scratchLineBuffer[scratchLineNum]) - 1] = '\\0';\n                const size_t used = strnlen(scratchLineBuffer[scratchLineNum], sizeof(scratchLineBuffer[scratchLineNum]) - 1);\n                strncpy(scratchLineBuffer[scratchLineNum] + used, \" <\", sizeof(scratchLineBuffer[scratchLineNum]) - used - 1);\n            } else {\n                strncpy(scratchLineBuffer[scratchLineNum], \">\", 2);\n                strncpy(scratchLineBuffer[scratchLineNum] + 1, tempName, sizeof(scratchLineBuffer[scratchLineNum]) - 2);\n                scratchLineBuffer[scratchLineNum][sizeof(scratchLineBuffer[scratchLineNum]) - 1] = '\\0';\n                const size_t used = strnlen(scratchLineBuffer[scratchLineNum], sizeof(scratchLineBuffer[scratchLineNum]) - 1);\n                strncpy(scratchLineBuffer[scratchLineNum] + used, \"<\", sizeof(scratchLineBuffer[scratchLineNum]) - used - 1);\n            }\n            scratchLineBuffer[scratchLineNum][sizeof(scratchLineBuffer[scratchLineNum]) - 1] = '\\0';\n        } else {\n            strncpy(scratchLineBuffer[scratchLineNum], tempName, sizeof(scratchLineBuffer[scratchLineNum]) - 1);\n            scratchLineBuffer[scratchLineNum][sizeof(scratchLineBuffer[scratchLineNum]) - 1] = '\\0';\n        }\n        linePointers[linesShown] = scratchLineBuffer[scratchLineNum++];\n    }\n    drawNotificationBox(display, state, linePointers, totalLines, firstOptionToShow);\n}\n\nvoid NotificationRenderer::drawAlertBannerOverlay(OLEDDisplay *display, OLEDDisplayUiState *state)\n{\n    // === Layout Configuration ===\n    constexpr uint16_t vPadding = 2;\n\n    uint16_t optionWidths[alertBannerOptions] = {0};\n    uint16_t maxWidth = 0;\n    uint16_t arrowsWidth = display->getStringWidth(\">  <\", 4, true);\n    uint16_t lineWidths[MAX_LINES] = {0};\n    uint16_t lineLengths[MAX_LINES] = {0};\n    const char *lineStarts[MAX_LINES + 1] = {0};\n    uint16_t lineCount = 0;\n    char lineBuffer[40] = {0};\n\n    // Parse lines\n    char *alertEnd = alertBannerMessage + strnlen(alertBannerMessage, sizeof(alertBannerMessage));\n    lineStarts[lineCount] = alertBannerMessage;\n\n    while ((lineCount < MAX_LINES) && (lineStarts[lineCount] < alertEnd)) {\n        lineStarts[lineCount + 1] = std::find((char *)lineStarts[lineCount], alertEnd, '\\n');\n        lineLengths[lineCount] = lineStarts[lineCount + 1] - lineStarts[lineCount];\n        if (lineStarts[lineCount + 1][0] == '\\n')\n            lineStarts[lineCount + 1] += 1;\n        lineWidths[lineCount] = display->getStringWidth(lineStarts[lineCount], lineLengths[lineCount], true);\n        if (lineWidths[lineCount] > maxWidth)\n            maxWidth = lineWidths[lineCount];\n        lineCount++;\n    }\n\n    // Measure option widths\n    for (int i = 0; i < alertBannerOptions; i++) {\n        optionWidths[i] = display->getStringWidth(optionsArrayPtr[i], strlen(optionsArrayPtr[i]), true);\n        if (optionWidths[i] > maxWidth)\n            maxWidth = optionWidths[i];\n        if (optionWidths[i] + arrowsWidth > maxWidth)\n            maxWidth = optionWidths[i] + arrowsWidth;\n    }\n\n    // Handle input\n    if (alertBannerOptions > 0) {\n        if (inEvent.inputEvent == INPUT_BROKER_UP || inEvent.inputEvent == INPUT_BROKER_LEFT ||\n            inEvent.inputEvent == INPUT_BROKER_ALT_PRESS || inEvent.inputEvent == INPUT_BROKER_UP_LONG) {\n            curSelected--;\n        } else if (inEvent.inputEvent == INPUT_BROKER_DOWN || inEvent.inputEvent == INPUT_BROKER_RIGHT ||\n                   inEvent.inputEvent == INPUT_BROKER_USER_PRESS || inEvent.inputEvent == INPUT_BROKER_DOWN_LONG) {\n            curSelected++;\n        } else if (inEvent.inputEvent == INPUT_BROKER_SELECT) {\n            if (optionsEnumPtr != nullptr) {\n                alertBannerCallback(optionsEnumPtr[curSelected]);\n                optionsEnumPtr = nullptr;\n            } else {\n                alertBannerCallback(curSelected);\n            }\n            resetBanner();\n            return;\n        } else if ((inEvent.inputEvent == INPUT_BROKER_CANCEL || inEvent.inputEvent == INPUT_BROKER_ALT_LONG) &&\n                   alertBannerUntil != 0) {\n            resetBanner();\n            return;\n        }\n\n        if (curSelected == -1)\n            curSelected = alertBannerOptions - 1;\n        if (curSelected == alertBannerOptions)\n            curSelected = 0;\n    } else {\n        if (inEvent.inputEvent == INPUT_BROKER_SELECT || inEvent.inputEvent == INPUT_BROKER_ALT_LONG ||\n            inEvent.inputEvent == INPUT_BROKER_CANCEL) {\n            resetBanner();\n            return;\n        }\n    }\n\n    inEvent.inputEvent = INPUT_BROKER_NONE;\n    if (alertBannerMessage[0] == '\\0')\n        return;\n\n    uint16_t totalLines = lineCount + alertBannerOptions;\n\n    uint16_t screenHeight = display->height();\n    uint8_t effectiveLineHeight = FONT_HEIGHT_SMALL - 3;\n    uint8_t visibleTotalLines = std::min<uint8_t>(totalLines, (screenHeight - vPadding * 2) / effectiveLineHeight);\n    uint8_t linesShown = lineCount;\n    const char *linePointers[visibleTotalLines + 1] = {0}; // this is sort of a dynamic allocation\n\n    // copy the linestarts to display to the linePointers holder\n    for (int i = 0; i < lineCount; i++) {\n        linePointers[i] = lineStarts[i];\n    }\n\n    uint8_t firstOptionToShow = 0;\n    if (alertBannerOptions > 0) {\n        if (visibleTotalLines - lineCount == 1) {\n            firstOptionToShow = curSelected;\n        } else if (curSelected > 1 && alertBannerOptions > visibleTotalLines - lineCount) {\n            if (curSelected > alertBannerOptions - visibleTotalLines + lineCount)\n                firstOptionToShow = alertBannerOptions - visibleTotalLines + lineCount;\n            else\n                firstOptionToShow = curSelected - 1;\n        } else {\n            firstOptionToShow = 0;\n        }\n    }\n    // Useful log line for troubleshooting:\n    /* LOG_WARN(\"alertBannerOptions: %u, curSelected: %u, visibleTotalLines: %u, lineCount: %u, firstOptionToShow: %u\",\n             alertBannerOptions, curSelected, visibleTotalLines, lineCount, firstOptionToShow); */\n\n    for (int i = firstOptionToShow; i < alertBannerOptions && linesShown < visibleTotalLines; i++, linesShown++) {\n        if (i == curSelected) {\n            if (currentResolution == ScreenResolution::High) {\n                strncpy(lineBuffer, \"> \", 3);\n                strncpy(lineBuffer + 2, optionsArrayPtr[i], 36);\n                strncpy(lineBuffer + strlen(optionsArrayPtr[i]) + 2, \" <\", 3);\n            } else {\n                strncpy(lineBuffer, \">\", 2);\n                strncpy(lineBuffer + 1, optionsArrayPtr[i], 37);\n                strncpy(lineBuffer + strlen(optionsArrayPtr[i]) + 1, \"<\", 2);\n            }\n            lineBuffer[39] = '\\0';\n            linePointers[linesShown] = lineBuffer;\n        } else {\n            linePointers[linesShown] = optionsArrayPtr[i];\n        }\n    }\n    if (alertBannerOptions > 0) {\n        drawNotificationBox(display, state, linePointers, totalLines, firstOptionToShow, maxWidth);\n    } else {\n        drawNotificationBox(display, state, linePointers, totalLines, firstOptionToShow);\n    }\n}\n\nvoid NotificationRenderer::drawNotificationBox(OLEDDisplay *display, OLEDDisplayUiState *state, const char *lines[],\n                                               uint16_t totalLines, uint8_t firstOptionToShow, uint16_t maxWidth)\n{\n\n    bool is_picker = false;\n    uint16_t lineCount = 0;\n    // Layout Configuration\n    constexpr uint16_t hPadding = 5;\n    constexpr uint16_t vPadding = 2;\n    bool needs_bell = false;\n    uint16_t lineWidths[totalLines] = {0};\n    uint16_t lineLengths[totalLines] = {0};\n\n    if (maxWidth != 0)\n        is_picker = true;\n\n    // Setup font and alignment\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    // Track widest line INCLUDING bars (but don't change per-line widths)\n    uint16_t widestLineWithBars = 0;\n\n    while (lines[lineCount] != nullptr) {\n        auto newlinePointer = strchr(lines[lineCount], '\\n');\n        if (newlinePointer)\n            lineLengths[lineCount] = (newlinePointer - lines[lineCount]); // Check for newlines first\n        else // if the newline wasn't found, then pull string length from strlen\n            lineLengths[lineCount] = strlen(lines[lineCount]);\n\n        if (current_notification_type == notificationTypeEnum::node_picker) {\n            char measureBuffer[64] = {0};\n            strncpy(measureBuffer, lines[lineCount], std::min<size_t>(lineLengths[lineCount], sizeof(measureBuffer) - 1));\n            lineWidths[lineCount] = UIRenderer::measureStringWithEmotes(display, measureBuffer);\n        } else {\n            lineWidths[lineCount] = display->getStringWidth(lines[lineCount], lineLengths[lineCount], true);\n        }\n\n        // Consider extra width for signal bars on lines that contain \"Signal:\"\n        uint16_t potentialWidth = lineWidths[lineCount];\n        if (graphics::bannerSignalBars >= 0 && strncmp(lines[lineCount], \"Signal:\", 7) == 0) {\n            const int totalBars = 5;\n            const int barWidth = 3;\n            const int barSpacing = 2;\n            const int gap = 6; // space between text and bars\n            int barsWidth = totalBars * barWidth + (totalBars - 1) * barSpacing + gap;\n            potentialWidth += barsWidth;\n        }\n\n        if (potentialWidth > widestLineWithBars)\n            widestLineWithBars = potentialWidth;\n\n        if (!is_picker) {\n            needs_bell |= (strstr(alertBannerMessage, \"Alert Received\") != nullptr);\n            if (lineWidths[lineCount] > maxWidth)\n                maxWidth = lineWidths[lineCount];\n        }\n        lineCount++;\n    }\n    // count lines\n\n    // Ensure box accounts for signal bars if present\n    if (widestLineWithBars > maxWidth)\n        maxWidth = widestLineWithBars;\n\n    uint16_t boxWidth = hPadding * 2 + maxWidth;\n\n    if (needs_bell) {\n        if ((currentResolution == ScreenResolution::High) && boxWidth <= 150)\n            boxWidth += 26;\n        if ((currentResolution == ScreenResolution::Low || currentResolution == ScreenResolution::UltraLow) && boxWidth <= 100)\n            boxWidth += 20;\n    }\n\n    uint16_t screenHeight = display->height();\n    uint8_t effectiveLineHeight = FONT_HEIGHT_SMALL - 3;\n    uint8_t visibleTotalLines = std::min<uint8_t>(lineCount, (screenHeight - vPadding * 2) / effectiveLineHeight);\n    uint16_t contentHeight = visibleTotalLines * effectiveLineHeight;\n    uint16_t boxHeight = contentHeight + vPadding * 2;\n    if (visibleTotalLines == 1) {\n        boxHeight += (currentResolution == ScreenResolution::High) ? 4 : 3;\n    }\n\n    int16_t boxLeft = (display->width() / 2) - (boxWidth / 2);\n    if (totalLines > visibleTotalLines) {\n        boxWidth += (currentResolution == ScreenResolution::High) ? 4 : 2;\n    }\n    int16_t boxTop = (display->height() / 2) - (boxHeight / 2);\n    boxHeight += (currentResolution == ScreenResolution::High) ? 2 : 1;\n#if defined(M5STACK_UNITC6L)\n    if (visibleTotalLines == 1) {\n        boxTop += 25;\n    }\n    if (alertBannerOptions < 3) {\n        int missingLines = 3 - alertBannerOptions;\n        int moveUp = missingLines * (effectiveLineHeight / 2);\n        boxTop -= moveUp;\n        if (boxTop < 0)\n            boxTop = 0;\n    }\n#endif\n\n    // Draw Box\n    display->setColor(BLACK);\n    display->fillRect(boxLeft - 1, boxTop - 1, boxWidth + 2, boxHeight + 2);\n    display->fillRect(boxLeft, boxTop - 2, boxWidth, 1);\n    display->fillRect(boxLeft, boxTop + boxHeight + 1, boxWidth, 1);\n    display->fillRect(boxLeft - 2, boxTop, 1, boxHeight);\n    display->fillRect(boxLeft + boxWidth + 1, boxTop, 1, boxHeight);\n    display->setColor(WHITE);\n    display->drawRect(boxLeft, boxTop, boxWidth, boxHeight);\n    display->setColor(BLACK);\n    display->fillRect(boxLeft, boxTop, 1, 1);\n    display->fillRect(boxLeft + boxWidth - 1, boxTop, 1, 1);\n    display->fillRect(boxLeft, boxTop + boxHeight - 1, 1, 1);\n    display->fillRect(boxLeft + boxWidth - 1, boxTop + boxHeight - 1, 1, 1);\n    display->setColor(WHITE);\n\n    // Draw Content\n    int16_t lineY = boxTop + vPadding;\n    for (int i = 0; i < lineCount; i++) {\n        int16_t textX = boxLeft + (boxWidth - lineWidths[i]) / 2;\n        if (needs_bell && i == 0) {\n            int bellY = lineY + (FONT_HEIGHT_SMALL - 8) / 2;\n            display->drawXbm(textX - 10, bellY, 8, 8, bell_alert);\n            display->drawXbm(textX + lineWidths[i] + 2, bellY, 8, 8, bell_alert);\n        }\n        char lineBuffer[lineLengths[i] + 1];\n        strncpy(lineBuffer, lines[i], lineLengths[i]);\n        lineBuffer[lineLengths[i]] = '\\0';\n        // Determine if this is a pop-up or a pick list\n        if (alertBannerOptions > 0 && i == 0) {\n            // Pick List\n            display->setColor(WHITE);\n            int background_yOffset = 1;\n            // Determine if we have low hanging characters\n            if (strchr(lineBuffer, 'p') || strchr(lineBuffer, 'g') || strchr(lineBuffer, 'y') || strchr(lineBuffer, 'j')) {\n                background_yOffset = -1;\n            }\n            display->fillRect(boxLeft, boxTop + 1, boxWidth, effectiveLineHeight - background_yOffset);\n            display->setColor(BLACK);\n            int yOffset = 3;\n            if (current_notification_type == notificationTypeEnum::node_picker) {\n                UIRenderer::drawStringWithEmotes(display, textX, lineY - yOffset, lineBuffer, FONT_HEIGHT_SMALL, 1, false);\n            } else {\n                display->drawString(textX, lineY - yOffset, lineBuffer);\n            }\n            display->setColor(WHITE);\n            lineY += (effectiveLineHeight - 2 - background_yOffset);\n        } else {\n            // Pop-up\n            // If this is the Signal line, center text + bars as one group\n            bool isSignalLine = (graphics::bannerSignalBars >= 0 && strstr(lineBuffer, \"Signal:\") != nullptr);\n            if (isSignalLine) {\n                const int totalBars = 5;\n                const int barWidth = 3;\n                const int barSpacing = 2;\n                const int barHeightStep = 2;\n                const int gap = 6;\n\n                int textWidth = display->getStringWidth(lineBuffer, strlen(lineBuffer), true);\n                int barsWidth = totalBars * barWidth + (totalBars - 1) * barSpacing + gap;\n                int totalWidth = textWidth + barsWidth;\n                int groupStartX = boxLeft + (boxWidth - totalWidth) / 2;\n\n                if (current_notification_type == notificationTypeEnum::node_picker) {\n                    UIRenderer::drawStringWithEmotes(display, groupStartX, lineY, lineBuffer, FONT_HEIGHT_SMALL, 1, false);\n                } else {\n                    display->drawString(groupStartX, lineY, lineBuffer);\n                }\n\n                int baseX = groupStartX + textWidth + gap;\n                int baseY = lineY + effectiveLineHeight - 1;\n                for (int b = 0; b < totalBars; b++) {\n                    int barHeight = (b + 1) * barHeightStep;\n                    int x = baseX + b * (barWidth + barSpacing);\n                    int y = baseY - barHeight;\n\n                    if (b < graphics::bannerSignalBars) {\n                        display->fillRect(x, y, barWidth, barHeight);\n                    } else {\n                        display->drawRect(x, y, barWidth, barHeight);\n                    }\n                }\n            } else {\n                if (current_notification_type == notificationTypeEnum::node_picker) {\n                    UIRenderer::drawStringWithEmotes(display, textX, lineY, lineBuffer, FONT_HEIGHT_SMALL, 1, false);\n                } else {\n                    display->drawString(textX, lineY, lineBuffer);\n                }\n            }\n            lineY += (effectiveLineHeight);\n        }\n    }\n\n    // Scroll Bar (Thicker, inside box, not over title)\n    if (totalLines > visibleTotalLines) {\n        const uint8_t scrollBarWidth = 5;\n        int16_t scrollBarX = boxLeft + boxWidth - scrollBarWidth - 2;\n        int16_t scrollBarY = boxTop + vPadding + effectiveLineHeight;\n        uint16_t scrollBarHeight = boxHeight - vPadding * 2 - effectiveLineHeight;\n\n        float ratio = (float)visibleTotalLines / totalLines;\n        uint16_t indicatorHeight = std::max((int)(scrollBarHeight * ratio), 4);\n        float scrollRatio = (float)(firstOptionToShow + lineCount - visibleTotalLines) / (totalLines - visibleTotalLines);\n        uint16_t indicatorY = scrollBarY + scrollRatio * (scrollBarHeight - indicatorHeight);\n\n        display->drawRect(scrollBarX, scrollBarY, scrollBarWidth, scrollBarHeight);\n        display->fillRect(scrollBarX + 1, indicatorY, scrollBarWidth - 2, indicatorHeight);\n    }\n}\n\n/// Draw the last text message we received\nvoid NotificationRenderer::drawCriticalFaultFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_MEDIUM);\n\n    char tempBuf[24];\n    snprintf(tempBuf, sizeof(tempBuf), \"Critical fault #%d\", error_code);\n    display->drawString(0 + x, 0 + y, tempBuf);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    display->drawString(0 + x, FONT_HEIGHT_MEDIUM + y, \"For help, please visit \\nmeshtastic.org\");\n}\n\nvoid NotificationRenderer::drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    display->setFont(FONT_MEDIUM);\n    display->drawString(64 + x, y, \"Updating\");\n\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->drawStringMaxWidth(0 + x, 2 + y + FONT_HEIGHT_SMALL * 2, x + display->getWidth(),\n                                \"Please be patient and do not power off.\");\n}\n\nvoid NotificationRenderer::drawTextInput(OLEDDisplay *display, OLEDDisplayUiState *state)\n{\n    if (virtualKeyboard) {\n        // Check for timeout and auto-exit if needed\n        if (virtualKeyboard->isTimedOut()) {\n            LOG_INFO(\"Virtual keyboard timeout - auto-exiting\");\n            // Cancel virtual keyboard - call callback with empty string to indicate timeout\n            auto callback = textInputCallback; // Store callback before clearing\n\n            // Clean up first to prevent re-entry\n            delete virtualKeyboard;\n            virtualKeyboard = nullptr;\n            textInputCallback = nullptr;\n            resetBanner();\n\n            // Call callback after cleanup\n            if (callback) {\n                callback(\"\");\n            }\n\n            // Restore normal overlays\n            if (screen) {\n                screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n            }\n            return;\n        }\n\n        if (inEvent.inputEvent != INPUT_BROKER_NONE) {\n            bool handled = OnScreenKeyboardModule::processVirtualKeyboardInput(inEvent, virtualKeyboard);\n            if (!handled && inEvent.inputEvent == INPUT_BROKER_CANCEL) {\n                auto callback = textInputCallback;\n                delete virtualKeyboard;\n                virtualKeyboard = nullptr;\n                textInputCallback = nullptr;\n                resetBanner();\n                if (callback) {\n                    callback(\"\");\n                }\n                if (screen) {\n                    screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n                }\n                return;\n            }\n\n            // Consume the event after processing for virtual keyboard\n            inEvent.inputEvent = INPUT_BROKER_NONE;\n        }\n\n        // Re-check pointer before drawing to avoid use-after-free and crashes\n        if (!virtualKeyboard) {\n            // Ensure we exit text_input state and restore frames\n            if (current_notification_type == notificationTypeEnum::text_input) {\n                resetBanner();\n            }\n            if (screen) {\n                screen->setFrames(graphics::Screen::FOCUS_PRESERVE);\n            }\n            // If screen is null, do nothing (safe fallback)\n            return;\n        }\n\n        // Clear the screen to avoid overlapping with underlying frames or overlays\n        display->setColor(BLACK);\n        display->fillRect(0, 0, display->getWidth(), display->getHeight());\n        display->setColor(WHITE);\n        // Draw the virtual keyboard\n        virtualKeyboard->draw(display, 0, 0);\n\n        // Draw transient popup overlay (if any) managed by OnScreenKeyboardModule\n        OnScreenKeyboardModule::instance().drawPopupOverlay(display);\n    } else {\n        // If virtualKeyboard is null, reset the banner to avoid getting stuck\n        LOG_INFO(\"Virtual keyboard is null - resetting banner\");\n        resetBanner();\n    }\n}\n\nbool NotificationRenderer::isOverlayBannerShowing()\n{\n    return strlen(alertBannerMessage) > 0 && (alertBannerUntil == 0 || millis() <= alertBannerUntil);\n}\n\nvoid NotificationRenderer::showKeyboardMessagePopupWithTitle(const char *title, const char *content, uint32_t durationMs)\n{\n    if (!title || !content || current_notification_type != notificationTypeEnum::text_input)\n        return;\n    OnScreenKeyboardModule::instance().showPopup(title, content, durationMs);\n}\n\n} // namespace graphics\n#endif\n"
  },
  {
    "path": "src/graphics/draw/NotificationRenderer.h",
    "content": "#pragma once\n\n#include \"OLEDDisplay.h\"\n#include \"OLEDDisplayUi.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/VirtualKeyboard.h\"\n#include \"modules/OnScreenKeyboardModule.h\"\n#include <functional>\n#include <string>\n#define MAX_LINES 5\n\nnamespace graphics\n{\n\nclass NotificationRenderer\n{\n  public:\n    static InputEvent inEvent;\n    static char inKeypress;\n    static int8_t curSelected;\n    static char alertBannerMessage[256];\n    static uint32_t alertBannerUntil; // 0 is a special case meaning forever\n    static const char **optionsArrayPtr;\n    static const int *optionsEnumPtr;\n    static uint8_t alertBannerOptions; // last x lines are selectable options\n    static std::function<void(int)> alertBannerCallback;\n    static uint32_t numDigits;\n    static uint32_t currentNumber;\n    static VirtualKeyboard *virtualKeyboard;\n    static std::function<void(const std::string &)> textInputCallback;\n\n    static bool pauseBanner;\n\n    static void resetBanner();\n    static void showKeyboardMessagePopupWithTitle(const char *title, const char *content, uint32_t durationMs);\n    static void drawBannercallback(OLEDDisplay *display, OLEDDisplayUiState *state);\n    static void drawAlertBannerOverlay(OLEDDisplay *display, OLEDDisplayUiState *state);\n    static void drawNumberPicker(OLEDDisplay *display, OLEDDisplayUiState *state);\n    static void drawNodePicker(OLEDDisplay *display, OLEDDisplayUiState *state);\n    static void drawTextInput(OLEDDisplay *display, OLEDDisplayUiState *state);\n    static void drawNotificationBox(OLEDDisplay *display, OLEDDisplayUiState *state, const char *lines[MAX_LINES + 1],\n                                    uint16_t totalLines, uint8_t firstOptionToShow, uint16_t maxWidth = 0);\n\n    static void drawCriticalFaultFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    static void drawSSLScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    static bool isOverlayBannerShowing();\n\n    static graphics::notificationTypeEnum current_notification_type;\n};\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/draw/UIRenderer.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"CompassRenderer.h\"\n#include \"GPSStatus.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"NodeListRenderer.h\"\n#include \"UIRenderer.h\"\n#include \"airtime.h\"\n#include \"gps/GeoCoord.h\"\n#include \"graphics/EmoteRenderer.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/TimeFormatters.h\"\n#include \"graphics/images.h\"\n#include \"main.h\"\n#include \"target_specific.h\"\n#include <OLEDDisplay.h>\n#include <RTC.h>\n#include <cstring>\n\n// External variables\nextern graphics::Screen *screen;\n#if defined(M5STACK_UNITC6L)\nstatic uint32_t lastSwitchTime = 0;\n#endif\nnamespace graphics\n{\nNodeNum UIRenderer::currentFavoriteNodeNum = 0;\nstd::vector<meshtastic_NodeInfoLite *> graphics::UIRenderer::favoritedNodes;\n\nstatic inline void drawSatelliteIcon(OLEDDisplay *display, int16_t x, int16_t y)\n{\n    int yOffset = (currentResolution == ScreenResolution::High) ? -5 : 1;\n    if (currentResolution == ScreenResolution::High) {\n        NodeListRenderer::drawScaledXBitmap16x16(x, y + yOffset, imgSatellite_width, imgSatellite_height, imgSatellite, display);\n    } else {\n        display->drawXbm(x + 1, y + yOffset, imgSatellite_width, imgSatellite_height, imgSatellite);\n    }\n}\n\nvoid graphics::UIRenderer::rebuildFavoritedNodes()\n{\n    favoritedNodes.clear();\n    size_t total = nodeDB->getNumMeshNodes();\n    for (size_t i = 0; i < total; i++) {\n        meshtastic_NodeInfoLite *n = nodeDB->getMeshNodeByIndex(i);\n        if (!n || n->num == nodeDB->getNodeNum())\n            continue;\n        if (n->is_favorite)\n            favoritedNodes.push_back(n);\n    }\n\n    std::sort(favoritedNodes.begin(), favoritedNodes.end(),\n              [](const meshtastic_NodeInfoLite *a, const meshtastic_NodeInfoLite *b) { return a->num < b->num; });\n}\n\n#if !MESHTASTIC_EXCLUDE_GPS\n// GeoCoord object for coordinate conversions\nextern GeoCoord geoCoord;\n\n// Threshold values for the GPS lock accuracy bar display\nextern uint32_t dopThresholds[5];\n\n// Draw GPS status summary\nvoid UIRenderer::drawGps(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gps)\n{\n    // Draw satellite image\n    if (currentResolution == ScreenResolution::High) {\n        NodeListRenderer::drawScaledXBitmap16x16(x, y - 2, imgSatellite_width, imgSatellite_height, imgSatellite, display);\n    } else {\n        display->drawXbm(x + 1, y + 1, imgSatellite_width, imgSatellite_height, imgSatellite);\n    }\n    char textString[10];\n\n    if (config.position.fixed_position) {\n        // GPS coordinates are currently fixed\n        snprintf(textString, sizeof(textString), \"Fixed\");\n    }\n    if (!gps->getIsConnected()) {\n        snprintf(textString, sizeof(textString), \"No Lock\");\n    }\n    if (!gps->getHasLock()) {\n        // Draw \"No sats\" to the right of the icon with slightly more gap\n        snprintf(textString, sizeof(textString), \"No Sats\");\n    } else {\n        snprintf(textString, sizeof(textString), \"%u sats\", gps->getNumSatellites());\n    }\n    if (currentResolution == ScreenResolution::High) {\n        display->drawString(x + 18, y, textString);\n    } else {\n        display->drawString(x + 11, y, textString);\n    }\n}\n\n// Draw status when GPS is disabled or not present\nvoid UIRenderer::drawGpsPowerStatus(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gps)\n{\n    const char *displayLine;\n    int pos;\n    if (y < FONT_HEIGHT_SMALL) { // Line 1: use short string\n        displayLine = config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT ? \"No GPS\" : \"GPS off\";\n        pos = display->getWidth() - display->getStringWidth(displayLine);\n    } else {\n        displayLine = config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT ? \"GPS not present\"\n                                                                                                       : \"GPS is disabled\";\n        pos = (display->getWidth() - display->getStringWidth(displayLine)) / 2;\n    }\n    display->drawString(x + pos, y, displayLine);\n}\n\nvoid UIRenderer::drawGpsAltitude(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gps)\n{\n    char displayLine[32];\n    if (!gps->getIsConnected() && !config.position.fixed_position) {\n        // displayLine = \"No GPS Module\";\n        // display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine);\n    } else if (!gps->getHasLock() && !config.position.fixed_position) {\n        // displayLine = \"No GPS Lock\";\n        // display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine);\n    } else {\n        geoCoord.updateCoords(int32_t(gps->getLatitude()), int32_t(gps->getLongitude()), int32_t(gps->getAltitude()));\n        if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL)\n            snprintf(displayLine, sizeof(displayLine), \"Altitude: %.0fft\", geoCoord.getAltitude() * METERS_TO_FEET);\n        else\n            snprintf(displayLine, sizeof(displayLine), \"Altitude: %.0im\", geoCoord.getAltitude());\n        display->drawString(x + (display->getWidth() - (display->getStringWidth(displayLine))) / 2, y, displayLine);\n    }\n}\n\n// Draw GPS status coordinates\nvoid UIRenderer::drawGpsCoordinates(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gps,\n                                    const char *mode)\n{\n    auto gpsFormat = uiconfig.gps_format;\n    char displayLine[32];\n\n    if (!gps->getIsConnected() && !config.position.fixed_position) {\n        if (strcmp(mode, \"line1\") == 0) {\n            strcpy(displayLine, \"No GPS present\");\n            display->drawString(x, y, displayLine);\n        }\n    } else if (!gps->getHasLock() && !config.position.fixed_position) {\n        if (strcmp(mode, \"line1\") == 0) {\n            strcpy(displayLine, \"No GPS Lock\");\n            display->drawString(x, y, displayLine);\n        }\n    } else {\n\n        geoCoord.updateCoords(int32_t(gps->getLatitude()), int32_t(gps->getLongitude()), int32_t(gps->getAltitude()));\n\n        if (gpsFormat != meshtastic_DeviceUIConfig_GpsCoordinateFormat_DMS) {\n            char coordinateLine_1[22];\n            char coordinateLine_2[22];\n            if (gpsFormat == meshtastic_DeviceUIConfig_GpsCoordinateFormat_DEC) { // Decimal Degrees\n                snprintf(coordinateLine_1, sizeof(coordinateLine_1), \"Lat: %f\", geoCoord.getLatitude() * 1e-7);\n                snprintf(coordinateLine_2, sizeof(coordinateLine_2), \"Lon: %f\", geoCoord.getLongitude() * 1e-7);\n            } else if (gpsFormat == meshtastic_DeviceUIConfig_GpsCoordinateFormat_UTM) { // Universal Transverse Mercator\n                snprintf(coordinateLine_1, sizeof(coordinateLine_1), \"%2i%1c %06u E\", geoCoord.getUTMZone(),\n                         geoCoord.getUTMBand(), geoCoord.getUTMEasting());\n                snprintf(coordinateLine_2, sizeof(coordinateLine_2), \"%07u N\", geoCoord.getUTMNorthing());\n            } else if (gpsFormat == meshtastic_DeviceUIConfig_GpsCoordinateFormat_MGRS) { // Military Grid Reference System\n                snprintf(coordinateLine_1, sizeof(coordinateLine_1), \"%2i%1c %1c%1c\", geoCoord.getMGRSZone(),\n                         geoCoord.getMGRSBand(), geoCoord.getMGRSEast100k(), geoCoord.getMGRSNorth100k());\n                snprintf(coordinateLine_2, sizeof(coordinateLine_2), \"%05u E %05u N\", geoCoord.getMGRSEasting(),\n                         geoCoord.getMGRSNorthing());\n            } else if (gpsFormat == meshtastic_DeviceUIConfig_GpsCoordinateFormat_OLC) { // Open Location Code\n                geoCoord.getOLCCode(coordinateLine_1);\n                coordinateLine_2[0] = '\\0';\n            } else if (gpsFormat == meshtastic_DeviceUIConfig_GpsCoordinateFormat_OSGR) { // Ordnance Survey Grid Reference\n                if (geoCoord.getOSGRE100k() == 'I' || geoCoord.getOSGRN100k() == 'I') { // OSGR is only valid around the UK region\n                    snprintf(coordinateLine_1, sizeof(coordinateLine_1), \"%s\", \"Out of Boundary\");\n                    coordinateLine_2[0] = '\\0';\n                } else {\n                    snprintf(coordinateLine_1, sizeof(coordinateLine_1), \"%1c%1c\", geoCoord.getOSGRE100k(),\n                             geoCoord.getOSGRN100k());\n                    snprintf(coordinateLine_2, sizeof(coordinateLine_2), \"%05u E %05u N\", geoCoord.getOSGREasting(),\n                             geoCoord.getOSGRNorthing());\n                }\n            } else if (gpsFormat == meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS) { // Maidenhead Locator System\n                double lat = geoCoord.getLatitude() * 1e-7;\n                double lon = geoCoord.getLongitude() * 1e-7;\n\n                // Normalize\n                if (lat > 90.0)\n                    lat = 90.0;\n                if (lat < -90.0)\n                    lat = -90.0;\n                while (lon < -180.0)\n                    lon += 360.0;\n                while (lon >= 180.0)\n                    lon -= 360.0;\n\n                double adjLon = lon + 180.0;\n                double adjLat = lat + 90.0;\n\n                char maiden[10]; // enough for 8-char + null\n\n                // Field (2 letters)\n                int lonField = int(adjLon / 20.0);\n                int latField = int(adjLat / 10.0);\n                adjLon -= lonField * 20.0;\n                adjLat -= latField * 10.0;\n\n                // Square (2 digits)\n                int lonSquare = int(adjLon / 2.0);\n                int latSquare = int(adjLat / 1.0);\n                adjLon -= lonSquare * 2.0;\n                adjLat -= latSquare * 1.0;\n\n                // Subsquare (2 letters)\n                double lonUnit = 2.0 / 24.0;\n                double latUnit = 1.0 / 24.0;\n                int lonSub = int(adjLon / lonUnit);\n                int latSub = int(adjLat / latUnit);\n\n                snprintf(maiden, sizeof(maiden), \"%c%c%c%c%c%c\", 'A' + lonField, 'A' + latField, '0' + lonSquare, '0' + latSquare,\n                         'A' + lonSub, 'A' + latSub);\n\n                snprintf(coordinateLine_1, sizeof(coordinateLine_1), \"MH: %s\", maiden);\n                coordinateLine_2[0] = '\\0'; // only need one line\n            }\n\n            if (strcmp(mode, \"line1\") == 0) {\n                display->drawString(x, y, coordinateLine_1);\n            } else if (strcmp(mode, \"line2\") == 0) {\n                display->drawString(x, y, coordinateLine_2);\n            } else if (strcmp(mode, \"combined\") == 0) {\n                display->drawString(x, y, coordinateLine_1);\n                if (coordinateLine_2[0] != '\\0') {\n                    display->drawString(x + display->getStringWidth(coordinateLine_1), y, coordinateLine_2);\n                }\n            }\n\n        } else {\n            char coordinateLine_1[22];\n            char coordinateLine_2[22];\n            snprintf(coordinateLine_1, sizeof(coordinateLine_1), \"Lat: %2i° %2i' %2u\\\" %1c\", geoCoord.getDMSLatDeg(),\n                     geoCoord.getDMSLatMin(), geoCoord.getDMSLatSec(), geoCoord.getDMSLatCP());\n            snprintf(coordinateLine_2, sizeof(coordinateLine_2), \"Lon: %3i° %2i' %2u\\\" %1c\", geoCoord.getDMSLonDeg(),\n                     geoCoord.getDMSLonMin(), geoCoord.getDMSLonSec(), geoCoord.getDMSLonCP());\n            if (strcmp(mode, \"line1\") == 0) {\n                display->drawString(x, y, coordinateLine_1);\n            } else if (strcmp(mode, \"line2\") == 0) {\n                display->drawString(x, y, coordinateLine_2);\n            } else { // both\n                display->drawString(x, y, coordinateLine_1);\n                display->drawString(x, y + 10, coordinateLine_2);\n            }\n        }\n    }\n}\n#endif // !MESHTASTIC_EXCLUDE_GPS\n\n// Draw nodes status\nvoid UIRenderer::drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::NodeStatus *nodeStatus, int node_offset,\n                           bool show_total, const char *additional_words)\n{\n    char usersString[20];\n    int nodes_online = (nodeStatus->getNumOnline() > 0) ? nodeStatus->getNumOnline() + node_offset : 0;\n\n    snprintf(usersString, sizeof(usersString), \"%d %s\", nodes_online, additional_words);\n\n    if (show_total) {\n        int nodes_total = (nodeStatus->getNumTotal() > 0) ? nodeStatus->getNumTotal() + node_offset : 0;\n        snprintf(usersString, sizeof(usersString), \"%d/%d %s\", nodes_online, nodes_total, additional_words);\n    }\n\n#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) ||      \\\n     defined(ST7789_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(HX8357_CS) || defined(ST7796_CS) ||             \\\n     defined(HACKADAY_COMMUNICATOR) || defined(USE_ST7796)) &&                                                                   \\\n    !defined(DISPLAY_FORCE_SMALL_FONTS)\n\n    if (currentResolution == ScreenResolution::High) {\n        NodeListRenderer::drawScaledXBitmap16x16(x, y - 1, 8, 8, imgUser, display);\n    } else {\n        display->drawFastImage(x, y + 3, 8, 8, imgUser);\n    }\n#else\n    if (currentResolution == ScreenResolution::High) {\n        NodeListRenderer::drawScaledXBitmap16x16(x, y - 1, 8, 8, imgUser, display);\n    } else {\n        display->drawFastImage(x, y + 1, 8, 8, imgUser);\n    }\n#endif\n    int string_offset = (currentResolution == ScreenResolution::High) ? 9 : 0;\n    display->drawString(x + 10 + string_offset, y - 2, usersString);\n}\n\n// **********************\n// * Favorite Node Info *\n// **********************\n// cppcheck-suppress constParameterPointer; signature must match FrameCallback typedef from OLEDDisplayUi library\nvoid UIRenderer::drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    if (favoritedNodes.empty())\n        return;\n\n    // --- Only display if index is valid ---\n    int nodeIndex = state->currentFrame - (screen->frameCount - favoritedNodes.size());\n    if (nodeIndex < 0 || nodeIndex >= (int)favoritedNodes.size())\n        return;\n\n    meshtastic_NodeInfoLite *node = favoritedNodes[nodeIndex];\n    if (!node || node->num == nodeDB->getNodeNum() || !node->is_favorite)\n        return;\n    display->clear();\n#if defined(M5STACK_UNITC6L)\n    uint32_t now = millis();\n    if (now - lastSwitchTime >= 10000) // 10000 ms = 10 秒\n    {\n        display->display();\n        lastSwitchTime = now;\n    }\n#endif\n    currentFavoriteNodeNum = node->num;\n    // === Create the shortName and title string ===\n    const char *shortName = (node->has_user && node->user.short_name[0]) ? node->user.short_name : \"Node\";\n    char titlestr[40];\n    snprintf(titlestr, sizeof(titlestr), \"*%s*\", shortName);\n\n    // === Draw battery/time/mail header (common across screens) ===\n    graphics::drawCommonHeader(display, x, y, titlestr);\n\n    // ===== DYNAMIC ROW STACKING WITH YOUR MACROS =====\n    // 1. Each potential info row has a macro-defined Y position (not regular increments!).\n    // 2. Each row is only shown if it has valid data.\n    // 3. Each row \"moves up\" if previous are empty, so there are never any blank rows.\n    // 4. The first line is ALWAYS at your macro position; subsequent lines use the next available macro slot.\n\n    // List of available macro Y positions in order, from top to bottom.\n    int line = 1; // which slot to use next\n    // === 1. Long Name (always try to show first) ===\n    const char *username;\n    if (currentResolution == ScreenResolution::UltraLow) {\n        username = (node->has_user && node->user.long_name[0]) ? node->user.short_name : nullptr;\n    } else {\n        username = (node->has_user && node->user.long_name[0]) ? node->user.long_name : nullptr;\n    }\n\n    if (username) {\n        // Print node's long name (e.g. \"Backpack Node\")\n        UIRenderer::drawStringWithEmotes(display, x, getTextPositions(display)[line++], username, FONT_HEIGHT_SMALL, 1, false);\n    }\n\n    // === 2. Signal and Hops (combined on one line, if available) ===\n    char signalHopsStr[32] = \"\";\n    bool haveSignal = false;\n    int bars = 0;\n\n    // Helper to get SNR limit based on modem preset\n    auto getSnrLimit = [](meshtastic_Config_LoRaConfig_ModemPreset preset) -> float {\n        switch (preset) {\n        case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:\n        case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:\n        case meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST:\n            return -6.0f;\n        case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:\n        case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:\n            return -5.5f;\n        case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:\n        case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:\n        case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:\n            return -4.5f;\n        default:\n            return -6.0f;\n        }\n    };\n\n    // Calculate signal grade using modem preset and SNR only\n    float snrLimit = getSnrLimit(config.lora.modem_preset);\n    float snr = node->snr;\n\n    // Determine signal quality label and bars using SNR-only grading\n    const char *qualityLabel = nullptr;\n\n    if (snr > snrLimit + 10) {\n        qualityLabel = \"Good\";\n        bars = 4;\n    } else if (snr > snrLimit + 6) {\n        qualityLabel = \"Good\";\n        bars = 3;\n    } else if (snr > snrLimit + 2) {\n        qualityLabel = \"Good\";\n        bars = 2;\n    } else if (snr > snrLimit - 4) {\n        qualityLabel = \"Fair\";\n        bars = 1;\n    } else {\n        qualityLabel = \"Bad\";\n        bars = 1;\n    }\n\n    // Add extra spacing on the left if we have an API connection to account for the common footer icons\n    const char *leftSideSpacing =\n        graphics::isAPIConnected(service->api_state) ? (currentResolution == ScreenResolution::High ? \"     \" : \"   \") : \" \";\n\n    // --- Build the Signal/Hops line ---\n    // Only show signal if we have valid SNR\n    if (snr > -100 && snr != 0) {\n        snprintf(signalHopsStr, sizeof(signalHopsStr), \"%sSig:%s\", leftSideSpacing, qualityLabel);\n        haveSignal = true;\n    }\n\n    if (node->hops_away > 0) {\n        size_t len = strlen(signalHopsStr);\n        if (haveSignal) {\n            snprintf(signalHopsStr + len, sizeof(signalHopsStr) - len, \" [#]\");\n        } else {\n            snprintf(signalHopsStr, sizeof(signalHopsStr), \"[#]\");\n        }\n    }\n\n    if (signalHopsStr[0]) {\n        int yPos = getTextPositions(display)[line++];\n        int curX = x;\n\n        // Split combined string into signal text and hop suffix\n        char sigPart[20] = \"\";\n        const char *hopPart = nullptr;\n\n        char *bracket = strchr(signalHopsStr, '[');\n        if (bracket) {\n            size_t n = (size_t)(bracket - signalHopsStr);\n            if (n >= sizeof(sigPart))\n                n = sizeof(sigPart) - 1;\n            memcpy(sigPart, signalHopsStr, n);\n            sigPart[n] = '\\0';\n\n            // Trim trailing spaces\n            while (strlen(sigPart) && sigPart[strlen(sigPart) - 1] == ' ') {\n                sigPart[strlen(sigPart) - 1] = '\\0';\n            }\n\n            hopPart = bracket; // \"[n Hop(s)]\"\n        } else {\n            strncpy(sigPart, signalHopsStr, sizeof(sigPart) - 1);\n            sigPart[sizeof(sigPart) - 1] = '\\0';\n        }\n\n        // Draw signal quality text\n        display->drawString(curX, yPos, sigPart);\n        curX += display->getStringWidth(sigPart) + 4;\n\n        // Draw signal bars (skip on UltraLow, text only)\n        if (currentResolution != ScreenResolution::UltraLow && haveSignal && bars > 0) {\n            const int kMaxBars = 4;\n            if (bars < 1)\n                bars = 1;\n            if (bars > kMaxBars)\n                bars = kMaxBars;\n\n            int barX = curX;\n\n            const bool hi = (currentResolution == ScreenResolution::High);\n            int barWidth = hi ? 2 : 1;\n            int barGap = hi ? 2 : 1;\n            int maxBarHeight = FONT_HEIGHT_SMALL - 7;\n            if (!hi)\n                maxBarHeight -= 1;\n            int barY = yPos + (FONT_HEIGHT_SMALL - maxBarHeight) / 2;\n\n            for (int bi = 0; bi < kMaxBars; bi++) {\n                int barHeight = maxBarHeight * (bi + 1) / kMaxBars;\n                if (barHeight < 2)\n                    barHeight = 2;\n\n                int bx = barX + bi * (barWidth + barGap);\n                int by = barY + maxBarHeight - barHeight;\n\n                if (bi < bars) {\n                    display->fillRect(bx, by, barWidth, barHeight);\n                } else {\n                    int baseY = barY + maxBarHeight - 1;\n                    display->drawHorizontalLine(bx, baseY, barWidth);\n                }\n            }\n\n            curX += (kMaxBars * barWidth) + ((kMaxBars - 1) * barGap) + 2;\n        }\n\n        // Draw hops AFTER the bars as: [ number + hop icon ]\n        if (hopPart && node->hops_away > 0) {\n\n            // open bracket\n            display->drawString(curX, yPos, \"[\");\n            curX += display->getStringWidth(\"[\") + 1;\n\n            // hop count\n            char hopCount[6];\n            snprintf(hopCount, sizeof(hopCount), \"%d\", node->hops_away);\n            display->drawString(curX, yPos, hopCount);\n            curX += display->getStringWidth(hopCount) + 2;\n\n            // hop icon\n            const int iconY = yPos + (FONT_HEIGHT_SMALL - hop_height) / 2;\n            display->drawXbm(curX, iconY, hop_width, hop_height, hop);\n            curX += hop_width + 1;\n\n            // closing bracket\n            display->drawString(curX, yPos, \"]\");\n        }\n    }\n\n    // === 3. Heard (last seen, skip if node never seen) ===\n    char seenStr[20] = \"\";\n    uint32_t seconds = sinceLastSeen(node);\n    if (seconds != 0 && seconds != UINT32_MAX) {\n        uint32_t minutes = seconds / 60, hours = minutes / 60, days = hours / 24;\n        // Format as \"Heard:Xm ago\", \"Heard:Xh ago\", or \"Heard:Xd ago\"\n        snprintf(seenStr, sizeof(seenStr), (days > 365 ? \" Heard:?\" : \"%sHeard:%d%c ago\"), leftSideSpacing,\n                 (days    ? days\n                  : hours ? hours\n                          : minutes),\n                 (days    ? 'd'\n                  : hours ? 'h'\n                          : 'm'));\n    }\n    if (seenStr[0]) {\n        display->drawString(x, getTextPositions(display)[line++], seenStr);\n    }\n#if !defined(M5STACK_UNITC6L)\n    // === 4. Uptime (only show if metric is present) ===\n    char uptimeStr[32] = \"\";\n    if (node->has_device_metrics && node->device_metrics.has_uptime_seconds) {\n        char upPrefix[12]; // enough for leftSideSpacing + \"Up:\"\n        snprintf(upPrefix, sizeof(upPrefix), \"%sUp:\", leftSideSpacing);\n        getUptimeStr(node->device_metrics.uptime_seconds * 1000, upPrefix, uptimeStr, sizeof(uptimeStr));\n    }\n    if (uptimeStr[0]) {\n        display->drawString(x, getTextPositions(display)[line++], uptimeStr);\n    }\n\n    // === 5. Distance (only if both nodes have GPS position) ===\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    char distStr[24] = \"\"; // Make buffer big enough for any string\n    bool haveDistance = false;\n\n    if (nodeDB->hasValidPosition(ourNode) && nodeDB->hasValidPosition(node)) {\n        double lat1 = ourNode->position.latitude_i * 1e-7;\n        double lon1 = ourNode->position.longitude_i * 1e-7;\n        double lat2 = node->position.latitude_i * 1e-7;\n        double lon2 = node->position.longitude_i * 1e-7;\n        double earthRadiusKm = 6371.0;\n        double dLat = (lat2 - lat1) * DEG_TO_RAD;\n        double dLon = (lon2 - lon1) * DEG_TO_RAD;\n        double a =\n            sin(dLat / 2) * sin(dLat / 2) + cos(lat1 * DEG_TO_RAD) * cos(lat2 * DEG_TO_RAD) * sin(dLon / 2) * sin(dLon / 2);\n        double c = 2 * atan2(sqrt(a), sqrt(1 - a));\n        double distanceKm = earthRadiusKm * c;\n\n        if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) {\n            double miles = distanceKm * 0.621371;\n            if (miles < 0.1) {\n                int feet = (int)(miles * 5280);\n                if (feet > 0 && feet < 1000) {\n                    snprintf(distStr, sizeof(distStr), \"%sDistance:%dft\", leftSideSpacing, feet);\n                    haveDistance = true;\n                } else if (feet >= 1000) {\n                    snprintf(distStr, sizeof(distStr), \"%sDistance:¼mi\", leftSideSpacing);\n                    haveDistance = true;\n                }\n            } else {\n                int roundedMiles = (int)(miles + 0.5);\n                if (roundedMiles > 0 && roundedMiles < 1000) {\n                    snprintf(distStr, sizeof(distStr), \"%sDistance:%dmi\", leftSideSpacing, roundedMiles);\n                    haveDistance = true;\n                }\n            }\n        } else {\n            if (distanceKm < 1.0) {\n                int meters = (int)(distanceKm * 1000);\n                if (meters > 0 && meters < 1000) {\n                    snprintf(distStr, sizeof(distStr), \"%sDistance:%dm\", leftSideSpacing, meters);\n                    haveDistance = true;\n                } else if (meters >= 1000) {\n                    snprintf(distStr, sizeof(distStr), \"%sDistance:1km\", leftSideSpacing);\n                    haveDistance = true;\n                }\n            } else {\n                int km = (int)(distanceKm + 0.5);\n                if (km > 0 && km < 1000) {\n                    snprintf(distStr, sizeof(distStr), \"%sDistance:%dkm\", leftSideSpacing, km);\n                    haveDistance = true;\n                }\n            }\n        }\n    }\n    if (haveDistance && distStr[0]) {\n        display->drawString(x, getTextPositions(display)[line++], distStr);\n    }\n\n    // === 6. Battery after Distance line, otherwise next available line ===\n    char batLine[32] = \"\";\n    bool haveBatLine = false;\n\n    if (node->has_device_metrics) {\n        bool hasPct = node->device_metrics.has_battery_level;\n        bool hasVolt = node->device_metrics.has_voltage && node->device_metrics.voltage > 0.001f;\n\n        int pct = 0;\n        float volt = 0.0f;\n\n        if (hasPct) {\n            pct = (int)node->device_metrics.battery_level;\n        }\n\n        if (hasVolt) {\n            volt = node->device_metrics.voltage;\n        }\n\n        if (hasPct && pct > 0 && pct <= 100) {\n            // Normal battery percentage\n            if (hasVolt) {\n                snprintf(batLine, sizeof(batLine), \"%sBat:%d%% (%.2fV)\", leftSideSpacing, pct, volt);\n            } else {\n                snprintf(batLine, sizeof(batLine), \"%sBat:%d%%\", leftSideSpacing, pct);\n            }\n            haveBatLine = true;\n        } else if (hasPct && pct > 100) {\n            // Plugged in\n            if (hasVolt) {\n                snprintf(batLine, sizeof(batLine), \"%sPlugged In (%.2fV)\", leftSideSpacing, volt);\n            } else {\n                snprintf(batLine, sizeof(batLine), \"%sPlugged In\", leftSideSpacing);\n            }\n            haveBatLine = true;\n        } else if (!hasPct && hasVolt) {\n            // Voltage only\n            snprintf(batLine, sizeof(batLine), \"%sBat:%.2fV\", leftSideSpacing, volt);\n            haveBatLine = true;\n        }\n    }\n\n    const int maxTextLines = (currentResolution == ScreenResolution::High) ? 6 : 5;\n\n    // Only draw battery if it fits within the allowed lines\n    if (haveBatLine && line <= maxTextLines) {\n        display->drawString(x, getTextPositions(display)[line++], batLine);\n    }\n\n    // --- Compass Rendering: landscape (wide) screens use the original side-aligned logic ---\n    if (SCREEN_WIDTH > SCREEN_HEIGHT) {\n        bool showCompass = false;\n        if (ourNode && (nodeDB->hasValidPosition(ourNode) || screen->hasHeading()) && nodeDB->hasValidPosition(node)) {\n            showCompass = true;\n        }\n        if (showCompass) {\n            const int16_t topY = getTextPositions(display)[1];\n            const int16_t bottomY = SCREEN_HEIGHT - (FONT_HEIGHT_SMALL - 1);\n            const int16_t usableHeight = bottomY - topY - 5;\n            int16_t compassRadius = usableHeight / 2;\n            if (compassRadius < 8)\n                compassRadius = 8;\n            const int16_t compassDiam = compassRadius * 2;\n            const int16_t compassX = x + SCREEN_WIDTH - compassRadius - 8;\n            const int16_t compassY = topY + (usableHeight / 2) + ((FONT_HEIGHT_SMALL - 1) / 2) + 2;\n\n            const auto &op = ourNode->position;\n            float myHeading = screen->hasHeading() ? screen->getHeading() * PI / 180\n                                                   : screen->estimatedHeading(DegD(op.latitude_i), DegD(op.longitude_i));\n\n            const auto &p = node->position;\n            /* unused\n            float d =\n                GeoCoord::latLongToMeter(DegD(p.latitude_i), DegD(p.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i));\n            */\n            float bearing = GeoCoord::bearing(DegD(op.latitude_i), DegD(op.longitude_i), DegD(p.latitude_i), DegD(p.longitude_i));\n            if (uiconfig.compass_mode == meshtastic_CompassMode_FREEZE_HEADING) {\n                myHeading = 0;\n            } else {\n                bearing -= myHeading;\n            }\n\n            display->drawCircle(compassX, compassY, compassRadius);\n            CompassRenderer::drawCompassNorth(display, compassX, compassY, myHeading, compassRadius);\n            CompassRenderer::drawNodeHeading(display, compassX, compassY, compassDiam, bearing);\n        }\n        // else show nothing\n    } else {\n        // Portrait or square: put compass at the bottom and centered, scaled to fit available space\n        bool showCompass = false;\n        if (ourNode && (nodeDB->hasValidPosition(ourNode) || screen->hasHeading()) && nodeDB->hasValidPosition(node)) {\n            showCompass = true;\n        }\n        if (showCompass) {\n            int yBelowContent = (line > 0 && line <= 5) ? (getTextPositions(display)[line - 1] + FONT_HEIGHT_SMALL + 2)\n                                                        : getTextPositions(display)[1];\n            const int margin = 4;\n// --------- PATCH FOR EINK NAV BAR (ONLY CHANGE BELOW) -----------\n#if defined(USE_EINK)\n            const int iconSize = (currentResolution == ScreenResolution::High) ? 16 : 8;\n            const int navBarHeight = iconSize + 6;\n#else\n            const int navBarHeight = 0;\n#endif\n            int availableHeight = SCREEN_HEIGHT - yBelowContent - navBarHeight - margin;\n            // --------- END PATCH FOR EINK NAV BAR -----------\n\n            if (availableHeight < FONT_HEIGHT_SMALL * 2)\n                return;\n\n            int compassRadius = availableHeight / 2;\n            if (compassRadius < 8)\n                compassRadius = 8;\n            if (compassRadius * 2 > SCREEN_WIDTH - 16)\n                compassRadius = (SCREEN_WIDTH - 16) / 2;\n\n            int compassX = x + SCREEN_WIDTH / 2;\n            int compassY = yBelowContent + availableHeight / 2;\n\n            const auto &op = ourNode->position;\n            float myHeading = 0;\n            if (uiconfig.compass_mode != meshtastic_CompassMode_FREEZE_HEADING) {\n                myHeading = screen->hasHeading() ? screen->getHeading() * PI / 180\n                                                 : screen->estimatedHeading(DegD(op.latitude_i), DegD(op.longitude_i));\n            }\n            graphics::CompassRenderer::drawCompassNorth(display, compassX, compassY, myHeading, compassRadius);\n\n            const auto &p = node->position;\n            /* unused\n            float d =\n                GeoCoord::latLongToMeter(DegD(p.latitude_i), DegD(p.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i));\n            */\n            float bearing = GeoCoord::bearing(DegD(op.latitude_i), DegD(op.longitude_i), DegD(p.latitude_i), DegD(p.longitude_i));\n            if (uiconfig.compass_mode != meshtastic_CompassMode_FREEZE_HEADING)\n                bearing -= myHeading;\n            graphics::CompassRenderer::drawNodeHeading(display, compassX, compassY, compassRadius * 2, bearing);\n\n            display->drawCircle(compassX, compassY, compassRadius);\n        }\n        // else show nothing\n    }\n#endif\n    graphics::drawCommonFooter(display, x, y);\n}\n\n// ****************************\n// * Device Focused Screen    *\n// ****************************\nvoid UIRenderer::drawDeviceFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n\n    // === Header ===\n    if (currentResolution == ScreenResolution::UltraLow) {\n        graphics::drawCommonHeader(display, x, y, \"Home\");\n    } else {\n        graphics::drawCommonHeader(display, x, y, \"\");\n    }\n\n    // === Content below header ===\n\n    // Determine if we need to show 4 or 5 rows on the screen\n    int rows = 4;\n    if (!config.bluetooth.enabled) {\n        rows = 5;\n    }\n\n    // === First Row: Region / Channel Utilization and Uptime ===\n    bool origBold = config.display.heading_bold;\n    config.display.heading_bold = false;\n\n    // Display Region and Channel Utilization\n    if (currentResolution == ScreenResolution::UltraLow) {\n        drawNodes(display, x, getTextPositions(display)[line] + 2, nodeStatus, -1, false, \"online\");\n    } else {\n        drawNodes(display, x + 1, getTextPositions(display)[line] + 2, nodeStatus, -1, false, \"online\");\n    }\n    char uptimeStr[32] = \"\";\n    if (currentResolution != ScreenResolution::UltraLow) {\n        getUptimeStr(millis(), \"Up: \", uptimeStr, sizeof(uptimeStr));\n    }\n    display->drawString(SCREEN_WIDTH - display->getStringWidth(uptimeStr), getTextPositions(display)[line++], uptimeStr);\n\n    // === Second Row: Satellites and Voltage ===\n    config.display.heading_bold = false;\n\n#if HAS_GPS\n    if (config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n        const char *displayLine;\n        if (config.position.fixed_position) {\n            displayLine = \"Fixed GPS\";\n        } else {\n            displayLine = config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT ? \"No GPS\" : \"GPS off\";\n        }\n        drawSatelliteIcon(display, x, getTextPositions(display)[line]);\n        int xOffset = (currentResolution == ScreenResolution::High) ? 6 : 0;\n        display->drawString(x + 11 + xOffset, getTextPositions(display)[line], displayLine);\n    } else {\n        UIRenderer::drawGps(display, 0, getTextPositions(display)[line], gpsStatus);\n    }\n#endif\n\n#if defined(M5STACK_UNITC6L)\n    line += 1;\n\n    // === Node Identity ===\n    int textWidth = 0;\n    int nameX = 0;\n    const char *shortName = owner.short_name ? owner.short_name : \"\";\n\n    // === ShortName Centered ===\n    textWidth = UIRenderer::measureStringWithEmotes(display, shortName);\n    nameX = (SCREEN_WIDTH - textWidth) / 2;\n    UIRenderer::drawStringWithEmotes(display, nameX, getTextPositions(display)[line++], shortName, FONT_HEIGHT_SMALL, 1, false);\n#else\n    if (powerStatus->getHasBattery()) {\n        char batStr[20];\n        int batV = powerStatus->getBatteryVoltageMv() / 1000;\n        int batCv = (powerStatus->getBatteryVoltageMv() % 1000) / 10;\n        snprintf(batStr, sizeof(batStr), \"%01d.%02dV\", batV, batCv);\n        display->drawString(x + SCREEN_WIDTH - display->getStringWidth(batStr), getTextPositions(display)[line++], batStr);\n    } else {\n        display->drawString(x + SCREEN_WIDTH - display->getStringWidth(\"USB\"), getTextPositions(display)[line++], \"USB\");\n    }\n\n    config.display.heading_bold = origBold;\n\n    // === Third Row: Channel Utilization Bluetooth Off (Only If Actually Off) ===\n    const char *chUtil = \"ChUtil:\";\n    char chUtilPercentage[10];\n    snprintf(chUtilPercentage, sizeof(chUtilPercentage), \"%2.0f%%\", airTime->channelUtilizationPercent());\n\n    int chUtil_x = (currentResolution == ScreenResolution::High) ? display->getStringWidth(chUtil) + 10\n                                                                 : display->getStringWidth(chUtil) + 5;\n    int chUtil_y = getTextPositions(display)[line] + 3;\n\n    int chutil_bar_width = (currentResolution == ScreenResolution::High) ? 100 : 50;\n    if (!config.bluetooth.enabled) {\n#if defined(USE_EINK)\n        chutil_bar_width = (currentResolution == ScreenResolution::High) ? 50 : 30;\n#else\n        chutil_bar_width = (currentResolution == ScreenResolution::High) ? 80 : 40;\n#endif\n    }\n    int chutil_bar_height = (currentResolution == ScreenResolution::High) ? 12 : 7;\n    int extraoffset = (currentResolution == ScreenResolution::High) ? 6 : 3;\n    if (!config.bluetooth.enabled) {\n        extraoffset = (currentResolution == ScreenResolution::High) ? 6 : 1;\n    }\n    int chutil_percent = airTime->channelUtilizationPercent();\n\n    int centerofscreen = SCREEN_WIDTH / 2;\n    int total_line_content_width = (chUtil_x + chutil_bar_width + display->getStringWidth(chUtilPercentage) + extraoffset) / 2;\n    int starting_position = centerofscreen - total_line_content_width;\n    if (!config.bluetooth.enabled) {\n        starting_position = 0;\n    }\n\n    display->drawString(starting_position, getTextPositions(display)[line], chUtil);\n\n    // Force 56% or higher to show a full 100% bar, text would still show related percent.\n    if (chutil_percent >= 61) {\n        chutil_percent = 100;\n    }\n\n    // Weighting for nonlinear segments\n    float milestone1 = 25;\n    float milestone2 = 40;\n    float weight1 = 0.45; // Weight for 0–25%\n    float weight2 = 0.35; // Weight for 25–40%\n    float weight3 = 0.20; // Weight for 40–100%\n    float totalWeight = weight1 + weight2 + weight3;\n\n    int seg1 = chutil_bar_width * (weight1 / totalWeight);\n    int seg2 = chutil_bar_width * (weight2 / totalWeight);\n    int seg3 = chutil_bar_width * (weight3 / totalWeight);\n\n    int fillRight = 0;\n\n    if (chutil_percent <= milestone1) {\n        fillRight = (seg1 * (chutil_percent / milestone1));\n    } else if (chutil_percent <= milestone2) {\n        fillRight = seg1 + (seg2 * ((chutil_percent - milestone1) / (milestone2 - milestone1)));\n    } else {\n        fillRight = seg1 + seg2 + (seg3 * ((chutil_percent - milestone2) / (100 - milestone2)));\n    }\n\n    // Draw outline\n    display->drawRect(starting_position + chUtil_x, chUtil_y, chutil_bar_width, chutil_bar_height);\n\n    // Fill progress\n    if (fillRight > 0) {\n        display->fillRect(starting_position + chUtil_x, chUtil_y, fillRight, chutil_bar_height);\n    }\n\n    display->drawString(starting_position + chUtil_x + chutil_bar_width + extraoffset, getTextPositions(display)[line],\n                        chUtilPercentage);\n\n    if (!config.bluetooth.enabled) {\n        display->drawString(SCREEN_WIDTH - display->getStringWidth(\"BT off\"), getTextPositions(display)[line], \"BT off\");\n    }\n\n    line += 1;\n\n    // === Fourth & Fifth Rows: Node Identity ===\n    int textWidth = 0;\n    int nameX = 0;\n    int yOffset = (currentResolution == ScreenResolution::High) ? 0 : 5;\n    const char *longName = (ourNode && ourNode->has_user && ourNode->user.long_name[0]) ? ourNode->user.long_name : \"\";\n    const char *shortName = owner.short_name ? owner.short_name : \"\";\n    char combinedName[96];\n    if (longName[0] && shortName[0]) {\n        snprintf(combinedName, sizeof(combinedName), \"%s (%s)\", longName, shortName);\n    } else if (longName[0]) {\n        strncpy(combinedName, longName, sizeof(combinedName) - 1);\n        combinedName[sizeof(combinedName) - 1] = '\\0';\n    } else {\n        strncpy(combinedName, shortName, sizeof(combinedName) - 1);\n        combinedName[sizeof(combinedName) - 1] = '\\0';\n    }\n    if (SCREEN_WIDTH - UIRenderer::measureStringWithEmotes(display, combinedName) > 10) {\n        textWidth = UIRenderer::measureStringWithEmotes(display, combinedName);\n        nameX = (SCREEN_WIDTH - textWidth) / 2;\n        UIRenderer::drawStringWithEmotes(\n            display, nameX, ((rows == 4) ? getTextPositions(display)[line++] : getTextPositions(display)[line++]) + yOffset,\n            combinedName, FONT_HEIGHT_SMALL, 1, false);\n    } else {\n        // === LongName Centered ===\n        textWidth = UIRenderer::measureStringWithEmotes(display, longName);\n        nameX = (SCREEN_WIDTH - textWidth) / 2;\n        UIRenderer::drawStringWithEmotes(display, nameX, getTextPositions(display)[line++], longName, FONT_HEIGHT_SMALL, 1,\n                                         false);\n\n        // === ShortName Centered ===\n        textWidth = UIRenderer::measureStringWithEmotes(display, shortName);\n        nameX = (SCREEN_WIDTH - textWidth) / 2;\n        UIRenderer::drawStringWithEmotes(display, nameX, getTextPositions(display)[line++], shortName, FONT_HEIGHT_SMALL, 1,\n                                         false);\n    }\n#endif\n    graphics::drawCommonFooter(display, x, y);\n}\n\n// Start Functions to write date/time to the screen\n// Helper function to check if a year is a leap year\nconstexpr bool isLeapYear(int year)\n{\n    return (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));\n}\n\n// Array of days in each month (non-leap year)\nconst int daysInMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n\n// Fills the buffer with a formatted date/time string and returns pixel width\nint UIRenderer::formatDateTime(char *buf, size_t bufSize, uint32_t rtc_sec, OLEDDisplay *display, bool includeTime)\n{\n    int sec = rtc_sec % 60;\n    rtc_sec /= 60;\n    int min = rtc_sec % 60;\n    rtc_sec /= 60;\n    int hour = rtc_sec % 24;\n    rtc_sec /= 24;\n\n    int year = 1970;\n    while (true) {\n        int daysInYear = isLeapYear(year) ? 366 : 365;\n        if (rtc_sec >= (uint32_t)daysInYear) {\n            rtc_sec -= daysInYear;\n            year++;\n        } else {\n            break;\n        }\n    }\n\n    int month = 0;\n    while (month < 12) {\n        int dim = daysInMonth[month];\n        if (month == 1 && isLeapYear(year))\n            dim++;\n        if (rtc_sec >= (uint32_t)dim) {\n            rtc_sec -= dim;\n            month++;\n        } else {\n            break;\n        }\n    }\n\n    int day = rtc_sec + 1;\n\n    if (includeTime) {\n        snprintf(buf, bufSize, \"%04d-%02d-%02d %02d:%02d:%02d\", year, month + 1, day, hour, min, sec);\n    } else {\n        snprintf(buf, bufSize, \"%04d-%02d-%02d\", year, month + 1, day);\n    }\n\n    return display->getStringWidth(buf);\n}\n\n// Check if the display can render a string (detect special chars; emoji)\nbool UIRenderer::haveGlyphs(const char *str)\n{\n#if defined(OLED_PL) || defined(OLED_UA) || defined(OLED_RU) || defined(OLED_CS)\n    // Don't want to make any assumptions about custom language support\n    return true;\n#endif\n\n    // Check each character with the lookup function for the OLED library\n    // We're not really meant to use this directly..\n    bool have = true;\n    for (uint16_t i = 0; i < strlen(str); i++) {\n        uint8_t result = Screen::customFontTableLookup((uint8_t)str[i]);\n        // If font doesn't support a character, it is substituted for ¿\n        if (result == 191 && (uint8_t)str[i] != 191) {\n            have = false;\n            break;\n        }\n    }\n\n    // LOG_DEBUG(\"haveGlyphs=%d\", have);\n    return have;\n}\n\n#ifdef USE_EINK\n/// Used on eink displays while in deep sleep\nvoid UIRenderer::drawDeepSleepFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n\n    // Next frame should use full-refresh, and block while running, else device will sleep before async callback\n    EINK_ADD_FRAMEFLAG(display, COSMETIC);\n    EINK_ADD_FRAMEFLAG(display, BLOCKING);\n\n    LOG_DEBUG(\"Draw deep sleep screen\");\n\n    // Display displayStr on the screen\n    graphics::UIRenderer::drawIconScreen(\"Sleeping\", display, state, x, y);\n}\n\n/// Used on eink displays when screen updates are paused\nvoid UIRenderer::drawScreensaverOverlay(OLEDDisplay *display, OLEDDisplayUiState *state)\n{\n    LOG_DEBUG(\"Draw screensaver overlay\");\n\n    EINK_ADD_FRAMEFLAG(display, COSMETIC); // Full refresh for screensaver\n\n    // Config\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    const char *pauseText = \"Screen Paused\";\n    const char *idText = owner.short_name;\n    const bool useId = (idText && idText[0]);\n    constexpr uint8_t padding = 2;\n    constexpr uint8_t dividerGap = 1;\n\n    // Text widths\n    const uint16_t idTextWidth = useId ? UIRenderer::measureStringWithEmotes(display, idText) : 0;\n    const uint16_t pauseTextWidth = display->getStringWidth(pauseText, strlen(pauseText));\n    const uint16_t boxWidth = padding + (useId ? idTextWidth + padding : 0) + pauseTextWidth + padding;\n    const uint16_t boxHeight = FONT_HEIGHT_SMALL + (padding * 2);\n\n    // Flush with bottom\n    const int16_t boxLeft = (display->width() / 2) - (boxWidth / 2);\n    const int16_t boxTop = display->height() - boxHeight;\n    const int16_t boxBottom = display->height() - 1;\n    const int16_t idTextLeft = boxLeft + padding;\n    const int16_t idTextTop = boxTop + padding;\n    const int16_t pauseTextLeft = boxLeft + (useId ? idTextWidth + (padding * 2) : 0) + padding;\n    const int16_t pauseTextTop = boxTop + padding;\n    const int16_t dividerX = boxLeft + padding + idTextWidth + padding;\n    const int16_t dividerTop = boxTop + dividerGap;\n    const int16_t dividerBottom = boxBottom - dividerGap;\n\n    // Draw: box\n    display->setColor(EINK_WHITE);\n    display->fillRect(boxLeft, boxTop, boxWidth, boxHeight);\n    display->setColor(EINK_BLACK);\n    display->drawRect(boxLeft, boxTop, boxWidth, boxHeight);\n\n    // Draw: text\n    if (useId)\n        UIRenderer::drawStringWithEmotes(display, idTextLeft, idTextTop, idText, FONT_HEIGHT_SMALL, 1, false);\n    display->drawString(pauseTextLeft, pauseTextTop, pauseText);\n    display->drawString(pauseTextLeft + 1, pauseTextTop, pauseText); // Faux bold\n\n    // Draw: divider\n    if (useId)\n        display->drawLine(dividerX, dividerTop, dividerX, dividerBottom);\n}\n#endif\n\n/**\n * Draw the icon with extra info printed around the corners\n */\nvoid UIRenderer::drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    // draw an xbm image.\n    // Please note that everything that should be transitioned\n    // needs to be drawn relative to x and y\n\n    // draw centered icon left to right and centered above the one line of app text\n#if defined(M5STACK_UNITC6L)\n    display->drawXbm(x + (SCREEN_WIDTH - 50) / 2, y + (SCREEN_HEIGHT - 28) / 2, icon_width, icon_height, icon_bits);\n    display->setFont(FONT_MEDIUM);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    // Draw region in upper left\n    if (upperMsg) {\n        int msgWidth = display->getStringWidth(upperMsg);\n        int msgX = x + (SCREEN_WIDTH - msgWidth) / 2;\n        int msgY = y;\n        display->drawString(msgX, msgY, upperMsg);\n    }\n    // Draw version and short name in bottom middle\n    char footer[64];\n    if (owner.short_name && owner.short_name[0]) {\n        snprintf(footer, sizeof(footer), \"%s   %s\", xstr(APP_VERSION_SHORT), owner.short_name);\n    } else {\n        snprintf(footer, sizeof(footer), \"%s\", xstr(APP_VERSION_SHORT));\n    }\n    int footerW = UIRenderer::measureStringWithEmotes(display, footer);\n    int footerX = x + ((SCREEN_WIDTH - footerW) / 2);\n    UIRenderer::drawStringWithEmotes(display, footerX, y + SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM, footer, FONT_HEIGHT_SMALL, 1,\n                                     false);\n    screen->forceDisplay();\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT); // Restore left align, just to be kind to any other unsuspecting code\n#else\n    display->drawXbm(x + (SCREEN_WIDTH - icon_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - icon_height) / 2 + 2,\n                     icon_width, icon_height, icon_bits);\n\n    display->setFont(FONT_MEDIUM);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    const char *title = \"meshtastic.org\";\n    display->drawString(x + getStringCenteredX(title), y + SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM, title);\n    display->setFont(FONT_SMALL);\n    // Draw region in upper left\n    if (upperMsg)\n        display->drawString(x + 0, y + 0, upperMsg);\n\n    // Draw version and short name in upper right\n    const char *version = xstr(APP_VERSION_SHORT);\n    int versionX = x + SCREEN_WIDTH - display->getStringWidth(version);\n    display->drawString(versionX, y + 0, version);\n    if (owner.short_name && owner.short_name[0]) {\n        const char *shortName = owner.short_name;\n        int shortNameW = UIRenderer::measureStringWithEmotes(display, shortName);\n        int shortNameX = x + SCREEN_WIDTH - shortNameW;\n        UIRenderer::drawStringWithEmotes(display, shortNameX, y + FONT_HEIGHT_SMALL, shortName, FONT_HEIGHT_SMALL, 1, false);\n    }\n    screen->forceDisplay();\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT); // Restore left align, just to be kind to any other unsuspecting code\n#endif\n}\n\n// ****************************\n// * My Position Screen       *\n// ****************************\nvoid UIRenderer::drawCompassAndLocationScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = \"Position\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    // === First Row: My Location ===\n#if HAS_GPS\n    bool origBold = config.display.heading_bold;\n    config.display.heading_bold = false;\n\n    const char *displayLine = \"\"; // Initialize to empty string by default\n\n    if (config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n        if (config.position.fixed_position) {\n            displayLine = \"Fixed GPS\";\n        } else {\n            displayLine = config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT ? \"No GPS\" : \"GPS off\";\n        }\n        drawSatelliteIcon(display, x, getTextPositions(display)[line]);\n        int xOffset = (currentResolution == ScreenResolution::High) ? 6 : 0;\n        display->drawString(x + 11 + xOffset, getTextPositions(display)[line++], displayLine);\n    } else {\n        // Onboard GPS\n        UIRenderer::drawGps(display, 0, getTextPositions(display)[line++], gpsStatus);\n    }\n\n    config.display.heading_bold = origBold;\n\n    // === Update GeoCoord ===\n    geoCoord.updateCoords(int32_t(gpsStatus->getLatitude()), int32_t(gpsStatus->getLongitude()),\n                          int32_t(gpsStatus->getAltitude()));\n\n    // === Determine Compass Heading ===\n    float heading = 0;\n    bool validHeading = false;\n    if (uiconfig.compass_mode == meshtastic_CompassMode_FREEZE_HEADING) {\n        validHeading = true;\n    } else {\n        if (screen->hasHeading()) {\n            heading = radians(screen->getHeading());\n            validHeading = true;\n        } else {\n            heading = screen->estimatedHeading(geoCoord.getLatitude() * 1e-7, geoCoord.getLongitude() * 1e-7);\n            validHeading = !isnan(heading);\n        }\n    }\n\n    // If GPS is off, no need to display these parts\n    if (strcmp(displayLine, \"GPS off\") != 0 && strcmp(displayLine, \"No GPS\") != 0) {\n        // === Second Row: Last GPS Fix ===\n        if (gpsStatus->getLastFixMillis() > 0) {\n            uint32_t delta = millis() - gpsStatus->getLastFixMillis();\n            char uptimeStr[32];\n#if defined(USE_EINK)\n            // E-Ink: skip seconds, show only days/hours/mins\n            getUptimeStr(delta, \"Last: \", uptimeStr, sizeof(uptimeStr), false);\n#else\n            // Non E-Ink: include seconds where useful\n            getUptimeStr(delta, \"Last: \", uptimeStr, sizeof(uptimeStr), true);\n#endif\n\n            display->drawString(0, getTextPositions(display)[line++], uptimeStr);\n        } else {\n            display->drawString(0, getTextPositions(display)[line++], \"Last: ?\");\n        }\n\n        // === Third Row: Line 1 GPS Info ===\n        UIRenderer::drawGpsCoordinates(display, x, getTextPositions(display)[line++], gpsStatus, \"line1\");\n\n        if (uiconfig.gps_format != meshtastic_DeviceUIConfig_GpsCoordinateFormat_OLC &&\n            uiconfig.gps_format != meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS) {\n            // === Fourth Row: Line 2 GPS Info ===\n            UIRenderer::drawGpsCoordinates(display, x, getTextPositions(display)[line++], gpsStatus, \"line2\");\n        }\n\n        // === Final Row: Altitude ===\n        char altitudeLine[32] = {0};\n        int32_t alt = geoCoord.getAltitude();\n        if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) {\n            snprintf(altitudeLine, sizeof(altitudeLine), \"Alt: %.0fft\", alt * METERS_TO_FEET);\n        } else {\n            snprintf(altitudeLine, sizeof(altitudeLine), \"Alt: %.0im\", alt);\n        }\n        display->drawString(x, getTextPositions(display)[line++], altitudeLine);\n    }\n#if !defined(M5STACK_UNITC6L)\n    // === Draw Compass if heading is valid ===\n    if (validHeading) {\n        // --- Compass Rendering: landscape (wide) screens use original side-aligned logic ---\n        if (SCREEN_WIDTH > SCREEN_HEIGHT) {\n            const int16_t topY = getTextPositions(display)[1];\n            const int16_t bottomY = SCREEN_HEIGHT - (FONT_HEIGHT_SMALL - 1); // nav row height\n            const int16_t usableHeight = bottomY - topY - 5;\n\n            int16_t compassRadius = usableHeight / 2;\n            if (compassRadius < 8)\n                compassRadius = 8;\n            const int16_t compassDiam = compassRadius * 2;\n            const int16_t compassX = x + SCREEN_WIDTH - compassRadius - 8;\n\n            // Center vertically and nudge down slightly to keep \"N\" clear of header\n            const int16_t compassY = topY + (usableHeight / 2) + ((FONT_HEIGHT_SMALL - 1) / 2) + 2;\n\n            CompassRenderer::drawNodeHeading(display, compassX, compassY, compassDiam, -heading);\n            display->drawCircle(compassX, compassY, compassRadius);\n\n            // \"N\" label\n            float northAngle = 0;\n            if (uiconfig.compass_mode != meshtastic_CompassMode_FIXED_RING)\n                northAngle = -heading;\n            float radius = compassRadius;\n            int16_t nX = compassX + (radius - 1) * sin(northAngle);\n            int16_t nY = compassY - (radius - 1) * cos(northAngle);\n            int16_t nLabelWidth = display->getStringWidth(\"N\") + 2;\n            int16_t nLabelHeightBox = FONT_HEIGHT_SMALL + 1;\n\n            display->setColor(BLACK);\n            display->fillRect(nX - nLabelWidth / 2, nY - nLabelHeightBox / 2, nLabelWidth, nLabelHeightBox);\n            display->setColor(WHITE);\n            display->setFont(FONT_SMALL);\n            display->setTextAlignment(TEXT_ALIGN_CENTER);\n            display->drawString(nX, nY - FONT_HEIGHT_SMALL / 2, \"N\");\n        } else {\n            // Portrait or square: put compass at the bottom and centered, scaled to fit available space\n            // For E-Ink screens, account for navigation bar at the bottom!\n            int yBelowContent = getTextPositions(display)[5] + FONT_HEIGHT_SMALL + 2;\n            const int margin = 4;\n            int availableHeight =\n#if defined(USE_EINK)\n                SCREEN_HEIGHT - yBelowContent - 24; // Leave extra space for nav bar on E-Ink\n#else\n                SCREEN_HEIGHT - yBelowContent - margin;\n#endif\n\n            if (availableHeight < FONT_HEIGHT_SMALL * 2)\n                return;\n\n            int compassRadius = availableHeight / 2;\n            if (compassRadius < 8)\n                compassRadius = 8;\n            if (compassRadius * 2 > SCREEN_WIDTH - 16)\n                compassRadius = (SCREEN_WIDTH - 16) / 2;\n\n            int compassX = x + SCREEN_WIDTH / 2;\n            int compassY = yBelowContent + availableHeight / 2;\n\n            CompassRenderer::drawNodeHeading(display, compassX, compassY, compassRadius * 2, -heading);\n            display->drawCircle(compassX, compassY, compassRadius);\n\n            // \"N\" label\n            float northAngle = 0;\n            if (uiconfig.compass_mode != meshtastic_CompassMode_FIXED_RING)\n                northAngle = -heading;\n            float radius = compassRadius;\n            int16_t nX = compassX + (radius - 1) * sin(northAngle);\n            int16_t nY = compassY - (radius - 1) * cos(northAngle);\n            int16_t nLabelWidth = display->getStringWidth(\"N\") + 2;\n            int16_t nLabelHeightBox = FONT_HEIGHT_SMALL + 1;\n\n            display->setColor(BLACK);\n            display->fillRect(nX - nLabelWidth / 2, nY - nLabelHeightBox / 2, nLabelWidth, nLabelHeightBox);\n            display->setColor(WHITE);\n            display->setFont(FONT_SMALL);\n            display->setTextAlignment(TEXT_ALIGN_CENTER);\n            display->drawString(nX, nY - FONT_HEIGHT_SMALL / 2, \"N\");\n        }\n    }\n#endif\n#endif // HAS_GPS\n    graphics::drawCommonFooter(display, x, y);\n}\n\n#ifdef USERPREFS_OEM_TEXT\n\nvoid UIRenderer::drawOEMIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    static const uint8_t xbm[] = USERPREFS_OEM_IMAGE_DATA;\n    if (currentResolution == ScreenResolution::High) {\n        display->drawXbm(x + (SCREEN_WIDTH - USERPREFS_OEM_IMAGE_WIDTH) / 2,\n                         y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - USERPREFS_OEM_IMAGE_HEIGHT) / 2 + 2, USERPREFS_OEM_IMAGE_WIDTH,\n                         USERPREFS_OEM_IMAGE_HEIGHT, xbm);\n    } else {\n\n        display->drawXbm(x + (SCREEN_WIDTH - USERPREFS_OEM_IMAGE_WIDTH) / 2,\n                         y + (SCREEN_HEIGHT - USERPREFS_OEM_IMAGE_HEIGHT) / 2 + 2, USERPREFS_OEM_IMAGE_WIDTH,\n                         USERPREFS_OEM_IMAGE_HEIGHT, xbm);\n    }\n\n    switch (USERPREFS_OEM_FONT_SIZE) {\n    case 0:\n        display->setFont(FONT_SMALL);\n        break;\n    case 2:\n        display->setFont(FONT_LARGE);\n        break;\n    default:\n        display->setFont(FONT_MEDIUM);\n        break;\n    }\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    const char *title = USERPREFS_OEM_TEXT;\n    if (currentResolution == ScreenResolution::High) {\n        display->drawString(x + getStringCenteredX(title), y + SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM, title);\n    }\n    display->setFont(FONT_SMALL);\n\n    // Draw region in upper left\n    if (upperMsg)\n        display->drawString(x + 0, y + 0, upperMsg);\n\n    // Draw version and shortname in upper right\n    const char *version = xstr(APP_VERSION_SHORT);\n    int versionX = x + SCREEN_WIDTH - display->getStringWidth(version);\n    display->drawString(versionX, y + 0, version);\n    if (owner.short_name && owner.short_name[0]) {\n        const char *shortName = owner.short_name;\n        int shortNameW = UIRenderer::measureStringWithEmotes(display, shortName);\n        int shortNameX = x + SCREEN_WIDTH - shortNameW;\n        UIRenderer::drawStringWithEmotes(display, shortNameX, y + FONT_HEIGHT_SMALL, shortName, FONT_HEIGHT_SMALL, 1, false);\n    }\n    screen->forceDisplay();\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT); // Restore left align, just to be kind to any other unsuspecting code\n}\n\nvoid UIRenderer::drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    // Draw region in upper left\n    const char *region = myRegion ? myRegion->name : NULL;\n    drawOEMIconScreen(region, display, state, x, y);\n}\n\n#endif\n\n// Navigation bar overlay implementation\nstatic int8_t lastFrameIndex = -1;\nstatic uint32_t lastFrameChangeTime = 0;\nconstexpr uint32_t ICON_DISPLAY_DURATION_MS = 2000;\n\n// cppcheck-suppress constParameterPointer; signature must match OverlayCallback typedef from OLEDDisplayUi library\nvoid UIRenderer::drawNavigationBar(OLEDDisplay *display, OLEDDisplayUiState *state)\n{\n    int currentFrame = state->currentFrame;\n\n    // Detect frame change and record time\n    if (currentFrame != lastFrameIndex) {\n        lastFrameIndex = currentFrame;\n        lastFrameChangeTime = millis();\n    }\n\n    const int iconSize = (currentResolution == ScreenResolution::High) ? 16 : 8;\n    const int spacing = (currentResolution == ScreenResolution::High) ? 8 : 4;\n    const int bigOffset = (currentResolution == ScreenResolution::High) ? 1 : 0;\n\n    const size_t totalIcons = screen->indicatorIcons.size();\n    if (totalIcons == 0)\n        return;\n\n    const int navPadding = (currentResolution == ScreenResolution::High) ? 24 : 12; // padding per side\n\n    int usableWidth = SCREEN_WIDTH - (navPadding * 2);\n    if (usableWidth < iconSize)\n        usableWidth = iconSize;\n\n    const size_t iconsPerPage = usableWidth / (iconSize + spacing);\n    const size_t currentPage = currentFrame / iconsPerPage;\n    const size_t pageStart = currentPage * iconsPerPage;\n    const size_t pageEnd = min(pageStart + iconsPerPage, totalIcons);\n\n    const int totalWidth = (pageEnd - pageStart) * iconSize + (pageEnd - pageStart - 1) * spacing;\n    const int xStart = (SCREEN_WIDTH - totalWidth) / 2;\n\n    bool navBarVisible = millis() - lastFrameChangeTime <= ICON_DISPLAY_DURATION_MS;\n    int y = navBarVisible ? (SCREEN_HEIGHT - iconSize - 1) : SCREEN_HEIGHT;\n\n#if defined(USE_EINK)\n    // Only show bar briefly after switching frames\n    static uint32_t navBarLastShown = 0;\n    static bool cosmeticRefreshDone = false;\n    static bool navBarPrevVisible = false;\n\n    if (navBarVisible && !navBarPrevVisible) {\n        EINK_ADD_FRAMEFLAG(display, DEMAND_FAST); // Fast refresh when showing nav bar\n        cosmeticRefreshDone = false;\n        navBarLastShown = millis();\n    }\n\n    if (!navBarVisible && navBarPrevVisible) {\n        EINK_ADD_FRAMEFLAG(display, DEMAND_FAST); // Fast refresh when hiding nav bar\n        navBarLastShown = millis();               // Mark when it disappeared\n    }\n\n    if (!navBarVisible && navBarLastShown != 0 && !cosmeticRefreshDone) {\n        if (millis() - navBarLastShown > 10000) {  // 10s after hidden\n            EINK_ADD_FRAMEFLAG(display, COSMETIC); // One-time ghost cleanup\n            cosmeticRefreshDone = true;\n        }\n    }\n\n    navBarPrevVisible = navBarVisible;\n#endif\n\n    // Pre-calculate bounding rect\n    const int rectX = xStart - 2 - bigOffset;\n    const int rectWidth = totalWidth + 4 + (bigOffset * 2);\n    const int rectHeight = iconSize + 6;\n\n    // Clear background and draw border\n    display->setColor(BLACK);\n    display->fillRect(rectX + 1, y - 2, rectWidth - 2, rectHeight - 2);\n    display->setColor(WHITE);\n    display->drawRect(rectX, y - 2, rectWidth, rectHeight);\n\n    // Icon drawing loop for the current page\n    for (size_t i = pageStart; i < pageEnd; ++i) {\n        const uint8_t *icon = screen->indicatorIcons[i];\n        const int x = xStart + (i - pageStart) * (iconSize + spacing);\n        const bool isActive = (i == static_cast<size_t>(currentFrame));\n\n        if (isActive) {\n            display->setColor(WHITE);\n            display->fillRect(x - 2, y - 2, iconSize + 4, iconSize + 4);\n            display->setColor(BLACK);\n        }\n\n        if (currentResolution == ScreenResolution::High) {\n            NodeListRenderer::drawScaledXBitmap16x16(x, y, 8, 8, icon, display);\n        } else {\n            display->drawXbm(x, y, iconSize, iconSize, icon);\n        }\n\n        if (isActive) {\n            display->setColor(WHITE);\n        }\n    }\n\n    // Compact arrow drawer\n    auto drawArrow = [&](bool rightSide) {\n        display->setColor(WHITE);\n\n        const int offset = (currentResolution == ScreenResolution::High) ? 3 : 1;\n        const int halfH = rectHeight / 2;\n\n        const int top = (y - 2) + (rectHeight - halfH) / 2;\n        const int bottom = top + halfH - 1;\n        const int midY = top + (halfH / 2);\n\n        const int maxW = 4;\n\n        // Determine left X coordinate\n        int baseX = rightSide ? (rectX + rectWidth + offset) : // right arrow\n                        (rectX - offset - 1);                  // left arrow\n\n        for (int yy = top; yy <= bottom; yy++) {\n            int dist = abs(yy - midY);\n            int lineW = maxW - (dist * maxW / (halfH / 2));\n            if (lineW < 1)\n                lineW = 1;\n\n            if (rightSide) {\n                display->drawHorizontalLine(baseX, yy, lineW);\n            } else {\n                display->drawHorizontalLine(baseX - lineW + 1, yy, lineW);\n            }\n        }\n    };\n    // Right arrow\n    if (pageEnd < totalIcons) {\n        drawArrow(true);\n    }\n\n    // Left arrow\n    if (pageStart > 0) {\n        drawArrow(false);\n    }\n\n    // Knock the corners off the square\n    display->setColor(BLACK);\n    display->drawRect(rectX, y - 2, 1, 1);\n    display->drawRect(rectX + rectWidth - 1, y - 2, 1, 1);\n    display->setColor(WHITE);\n}\n\nvoid UIRenderer::drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *message)\n{\n    uint16_t x_offset = display->width() / 2;\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    display->setFont(FONT_MEDIUM);\n    display->drawString(x_offset + x, 26 + y, message);\n}\n\nstd::string UIRenderer::drawTimeDelta(uint32_t days, uint32_t hours, uint32_t minutes, uint32_t seconds)\n{\n    std::string uptime;\n\n    if (days > (HOURS_IN_MONTH * 6))\n        uptime = \"?\";\n    else if (days >= 2)\n        uptime = std::to_string(days) + \"d\";\n    else if (hours >= 2)\n        uptime = std::to_string(hours) + \"h\";\n    else if (minutes >= 1)\n        uptime = std::to_string(minutes) + \"m\";\n    else\n        uptime = std::to_string(seconds) + \"s\";\n    return uptime;\n}\n\nint UIRenderer::measureStringWithEmotes(OLEDDisplay *display, const char *line, int emoteSpacing)\n{\n    return graphics::EmoteRenderer::measureStringWithEmotes(display, line, graphics::emotes, graphics::numEmotes, emoteSpacing);\n}\n\nsize_t UIRenderer::truncateStringWithEmotes(OLEDDisplay *display, const char *line, char *out, size_t outSize, int maxWidth,\n                                            const char *ellipsis, int emoteSpacing)\n{\n    return graphics::EmoteRenderer::truncateToWidth(display, line, out, outSize, maxWidth, ellipsis, graphics::emotes,\n                                                    graphics::numEmotes, emoteSpacing);\n}\n\nvoid UIRenderer::drawStringWithEmotes(OLEDDisplay *display, int x, int y, const char *line, int fontHeight, int emoteSpacing,\n                                      bool fauxBold)\n{\n    graphics::EmoteRenderer::drawStringWithEmotes(display, x, y, line, fontHeight, graphics::emotes, graphics::numEmotes,\n                                                  emoteSpacing, fauxBold);\n}\n\n} // namespace graphics\n\n#endif // HAS_SCREEN\n"
  },
  {
    "path": "src/graphics/draw/UIRenderer.h",
    "content": "#pragma once\n\n#include \"NodeDB.h\"\n#include \"graphics/EmoteRenderer.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/emotes.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n#include <string>\n\n#define HOURS_IN_MONTH 730\n\n// Forward declarations for status types\nnamespace meshtastic\n{\nclass PowerStatus;\nclass NodeStatus;\nclass GPSStatus;\n} // namespace meshtastic\n\nnamespace graphics\n{\n\n/// Forward declarations\nclass Screen;\n\n/**\n * @brief UI utility drawing functions\n *\n * Contains utility functions for drawing common UI elements, overlays,\n * battery indicators, and other shared graphical components.\n */\nclass UIRenderer\n{\n  public:\n    // Common UI elements\n    static void drawNodes(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::NodeStatus *nodeStatus,\n                          int node_offset = 0, bool show_total = true, const char *additional_words = \"\");\n\n    // GPS status functions\n    static void drawGps(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gpsStatus);\n    static void drawGpsCoordinates(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gpsStatus,\n                                   const char *mode = \"line1\");\n    static void drawGpsAltitude(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gpsStatus);\n    static void drawGpsPowerStatus(OLEDDisplay *display, int16_t x, int16_t y, const meshtastic::GPSStatus *gpsStatus);\n\n    // Overlay and special screens\n    static void drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *text);\n\n    // Navigation bar overlay\n    static void drawNavigationBar(OLEDDisplay *display, OLEDDisplayUiState *state);\n\n    static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n    static void drawDeviceFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n    // Icon and screen drawing functions\n    static void drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n    // Compass and location screen\n    static void drawCompassAndLocationScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n    static NodeNum currentFavoriteNodeNum;\n    static std::vector<meshtastic_NodeInfoLite *> favoritedNodes;\n    static void rebuildFavoritedNodes();\n\n// OEM screens\n#ifdef USERPREFS_OEM_TEXT\n    static void drawOEMIconScreen(const char *upperMsg, OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    static void drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n#endif\n\n#ifdef USE_EINK\n    /// Used on eink displays while in deep sleep\n    static void drawDeepSleepFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n    /// Used on eink displays when screen updates are paused\n    static void drawScreensaverOverlay(OLEDDisplay *display, OLEDDisplayUiState *state);\n#endif\n\n    static std::string drawTimeDelta(uint32_t days, uint32_t hours, uint32_t minutes, uint32_t seconds);\n    static int formatDateTime(char *buffer, size_t bufferSize, uint32_t rtc_sec, OLEDDisplay *display, bool showTime);\n\n    // Shared BaseUI emote helpers.\n    static int measureStringWithEmotes(OLEDDisplay *display, const char *line, int emoteSpacing = 1);\n    static inline int measureStringWithEmotes(OLEDDisplay *display, const std::string &line, int emoteSpacing = 1)\n    {\n        return measureStringWithEmotes(display, line.c_str(), emoteSpacing);\n    }\n    static size_t truncateStringWithEmotes(OLEDDisplay *display, const char *line, char *out, size_t outSize, int maxWidth,\n                                           const char *ellipsis = \"...\", int emoteSpacing = 1);\n    static inline std::string truncateStringWithEmotes(OLEDDisplay *display, const std::string &line, int maxWidth,\n                                                       const std::string &ellipsis = \"...\", int emoteSpacing = 1)\n    {\n        return graphics::EmoteRenderer::truncateToWidth(display, line, maxWidth, ellipsis, graphics::emotes, graphics::numEmotes,\n                                                        emoteSpacing);\n    }\n    static void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const char *line, int fontHeight, int emoteSpacing = 1,\n                                     bool fauxBold = true);\n    static inline void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, int fontHeight,\n                                            int emoteSpacing = 1, bool fauxBold = true)\n    {\n        drawStringWithEmotes(display, x, y, line.c_str(), fontHeight, emoteSpacing, fauxBold);\n    }\n\n    // Check if the display can render a string (detect special chars; emoji)\n    static bool haveGlyphs(const char *str);\n}; // namespace UIRenderer\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/emotes.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n#include \"emotes.h\"\n\nnamespace graphics\n{\n\n// Always define Emote list and count\nconst Emote emotes[] = {\n#ifndef EXCLUDE_EMOJI\n    // --- Thumbs ---\n    {\"\\U0001F44D\", thumbup, thumbs_width, thumbs_height},   // 👍 Thumbs Up\n    {\"\\U0001F44E\", thumbdown, thumbs_width, thumbs_height}, // 👎 Thumbs Down\n\n    // --- Smileys (Multiple Unicode Aliases) ---\n    {\"\\U0001F60A\", smiling_eyes, smiling_eyes_width, smiling_eyes_height},             // 😊 Smiling Eyes\n    {\"\\U0001F600\", grinning, grinning_width, grinning_height},                         // 😀 Grinning Face\n    {\"\\U0001F642\", slightly_smiling, slightly_smiling_width, slightly_smiling_height}, // 🙂 Slightly Smiling Face\n    {\"\\U0001F609\", winking_face, winking_face_width, winking_face_height},             // 😉 Winking Face\n    {\"\\U0001F601\", grinning_smiling_eyes, grinning_smiling_eyes_width, grinning_smiling_eyes_height}, // 😁 Grinning Smiling Eyes\n    {\"\\U0001F60D\", heart_eyes, heart_eyes_width, heart_eyes_height},                                  // 😍 Heart Eyes\n    {\"\\U0001F970\", heart_smile, heart_smile_width, heart_smile_height}, // 🥰 Smiling Face with Hearts\n\n    // --- Question/Alert ---\n    {\"\\u2753\", question, question_width, question_height},    // ❓ Question Mark\n    {\"\\u203C\\uFE0F\", bang, bang_width, bang_height},          // ‼️ Double Exclamation Mark\n    {\"\\u26A0\\uFE0F\", caution, caution_width, caution_height}, // ⚠️ Warning Sign\n\n    // --- Laughing Faces ---\n    {\"\\U0001F602\", haha, haha_width, haha_height}, // 😂 Face with Tears of Joy\n    {\"\\U0001F923\", rofl, rofl_width, rofl_height}, // 🤣 Rolling on the Floor Laughing\n    {\"\\U0001F606\", smiling_closed_eyes, smiling_closed_eyes_width, smiling_closed_eyes_height}, // 😆 Smiling Closed Eyes\n    {\"\\U0001F605\", haha, haha_width, haha_height},                                              // 😅 Smiling with Sweat\n    {\"\\U0001F604\", grinning_smiling_eyes_2, grinning_smiling_eyes_2_width,\n     grinning_smiling_eyes_2_height}, // 😄 Grinning Face with Smiling Eyes\n    {\"\\U0001F62D\", loudly_crying_face, loudly_crying_face_width, loudly_crying_face_height}, // 😭 Loudly Crying Face\n    {\"\\U0001F92E\", vomiting, vomiting_width, vomiting_height},                               // 🤮 Face Vomiting\n    {\"\\U0001F60E\", cool, cool_width, cool_height},                                           // 😎 Smiling Face with Sunglasses\n    {\"\\U0001F440\", eyes, eyes_width, eyes_height},                                           // 👀 Eyes\n    {\"\\U0001F441\\uFE0F\", eye, eye_width, eye_height},                                        // 👁️ Eye\n\n    // --- Gestures and People ---\n    {\"\\U0001F44B\", wave_icon, wave_icon_width, wave_icon_height},             // 👋 Waving Hand\n    {\"\\u270C\\uFE0F\", peace_sign, peace_sign_width, peace_sign_height},        // ✌️ Victory Hand\n    {\"\\U0001F596\", vulcan_salute, vulcan_salute_width, vulcan_salute_height}, // 🖖 Vulcan Salute\n    {\"\\U0001F64F\", praying, praying_width, praying_height},                   // 🙏 Praying Hands\n    {\"\\U0001F4AA\", strong, strong_width, strong_height},                      // 💪 Flexed Biceps\n    {\"\\U0001F937\", shrug, shrug_width, shrug_height},                         // 🤷 Person Shrugging\n    {\"\\U0001F920\", cowboy, cowboy_width, cowboy_height},                      // 🤠 Cowboy Hat Face\n    {\"\\U0001F3A7\", deadmau5, deadmau5_width, deadmau5_height},                // 🎧 Headphones\n\n    // --- Symbols ---\n    {\"\\u2714\\uFE0F\", check_mark, check_mark_width, check_mark_height}, // ✔️ Check Mark\n    {\"\\u2705\", check_mark, check_mark_width, check_mark_height},       // ✅ Check Mark Button\n    {\"\\u2611\\uFE0F\", check_mark, check_mark_width, check_mark_height}, // ☑️ Check Box with Check\n    {\"\\U0001F3E0\", house, house_width, house_height},                  // 🏠 House\n\n    // --- Weather ---\n    {\"\\u2600\", sun, sun_width, sun_height},                                   // ☀ Sun (without variation selector)\n    {\"\\u2600\\uFE0F\", sun, sun_width, sun_height},                             // ☀️ Sun (with variation selector)\n    {\"\\U0001F327\\uFE0F\", rain, rain_width, rain_height},                      // 🌧️ Cloud with Rain\n    {\"\\u2601\\uFE0F\", cloud, cloud_width, cloud_height},                       // ☁️ Cloud\n    {\"\\U0001F32B\\uFE0F\", fog, fog_width, fog_height},                         // 🌫️ Fog\n    {\"\\u2744\\uFE0F\", snowflake, snowflake_width, snowflake_height},           // ❄️ Snowflake\n    {\"\\U0001F4A7\", drop, drop_width, drop_height},                            // 💧 Droplet\n    {\"\\U0001F321\\uFE0F\", thermometer, thermometer_width, thermometer_height}, // 🌡️ Thermometer\n    {\"\\U0001F326\\uFE0F\", sun_behind_raincloud, sun_behind_raincloud_width,\n     sun_behind_raincloud_height},                                                        // 🌦️ Sun Behind Rain Cloud\n    {\"\\u26C5\", sun_behind_cloud, sun_behind_cloud_width, sun_behind_cloud_height},        // ⛅ Sun Behind Cloud\n    {\"\\u26C5\\uFE0F\", sun_behind_cloud, sun_behind_cloud_width, sun_behind_cloud_height},  // ⛅️ Sun Behind Cloud\n    {\"\\U0001F328\\uFE0F\", cloud_with_snow, cloud_with_snow_width, cloud_with_snow_height}, // 🌨️ Cloud with Snow\n    {\"\\U0001F329\\uFE0F\", cloud_with_lightning, cloud_with_lightning_width,\n     cloud_with_lightning_height}, // 🌩️ Cloud with Lightning\n    {\"\\u26C8\", cloud_with_lightning_rain, cloud_with_lightning_rain_width,\n     cloud_with_lightning_rain_height}, // ⛈ Cloud with Lightning and Rain\n    {\"\\u26C8\\uFE0F\", cloud_with_lightning_rain, cloud_with_lightning_rain_width,\n     cloud_with_lightning_rain_height},                                 // ⛈️ Cloud with Lightning and Rain\n    {\"\\U0001F32C\\uFE0F\", wind_face, wind_face_width, wind_face_height}, // 🌬️ Wind Face\n\n    // --- Moon Phases ---\n    {\"\\U0001F311\", new_moon, new_moon_width, new_moon_height},                                     // 🌑 New Moon\n    {\"\\U0001F312\", waxing_crescent_moon, waxing_crescent_moon_width, waxing_crescent_moon_height}, // 🌒 Waxing Crescent Moon\n    {\"\\U0001F313\", first_quarter_moon, first_quarter_moon_width, first_quarter_moon_height},       // 🌓 First Quarter Moon\n    {\"\\U0001F314\", waxing_gibbous_moon, waxing_gibbous_moon_width, waxing_gibbous_moon_height},    // 🌔 Waxing Gibbous Moon\n    {\"\\U0001F315\", full_moon, full_moon_width, full_moon_height},                                  // 🌕 Full Moon\n    {\"\\U0001F316\", waning_gibbous_moon, waning_gibbous_moon_width, waning_gibbous_moon_height},    // 🌖 Waning Gibbous Moon\n    {\"\\U0001F317\", last_quarter_moon, last_quarter_moon_width, last_quarter_moon_height},          // 🌗 Last Quarter Moon\n    {\"\\U0001F318\", waning_crescent_moon, waning_crescent_moon_width, waning_crescent_moon_height}, // 🌘 Waning Crescent Moon\n    {\"\\U0001F31B\", first_quarter_moon_face, first_quarter_moon_face_width,\n     first_quarter_moon_face_height}, // 🌛 First Quarter Moon Face\n\n    // --- Misc Faces ---\n    {\"\\U0001F608\", devil, devil_width, devil_height}, // 😈 Smiling Face with Horns\n    {\"\\U0001F921\", clown, clown_width, clown_height}, // 🤡 Clown Face\n    {\"\\U0001F916\", robo, robo_width, robo_height},    // 🤖 Robot Face\n\n    // --- Hearts (Multiple Unicode Aliases) ---\n    {\"\\u2665\", heart, heart_width, heart_height},       // ♥ Black Heart Suit\n    {\"\\u2665\\uFE0F\", heart, heart_width, heart_height}, // ♥️ Black Heart Suit (emoji presentation)\n    {\"\\u2764\\uFE0F\", heart, heart_width, heart_height}, // ❤️ Red Heart\n    {\"\\U0001F9E1\", heart, heart_width, heart_height},   // 🧡 Orange Heart\n    {\"\\U00002763\", heart, heart_width, heart_height},   // ❣ Heart Exclamation\n    {\"\\U00002764\", heart, heart_width, heart_height},   // ❤ Red Heart (legacy)\n    {\"\\U0001F495\", heart, heart_width, heart_height},   // 💕 Two Hearts\n    {\"\\U0001F496\", heart, heart_width, heart_height},   // 💖 Sparkling Heart\n    {\"\\U0001F497\", heart, heart_width, heart_height},   // 💗 Growing Heart\n    {\"\\U0001F498\", heart, heart_width, heart_height},   // 💘 Heart with Arrow\n\n    // --- Objects ---\n    {\"\\U0001F4A9\", poo, poo_width, poo_height},                      // 💩 Pile of Poo\n    {\"\\U0001F514\", bell_icon, bell_icon_width, bell_icon_height},    // 🔔 Bell\n    {\"\\U0001F4CB\", clipboard, clipboard_width, clipboard_height},    // 📋 Clipboard\n    {\"\\U0001F36A\", cookie, cookie_width, cookie_height},             // 🍪 Cookie\n    {\"\\U0001F370\", shortcake, shortcake_width, shortcake_height},    // 🍰 Shortcake\n    {\"\\U0001F351\", peach, peach_width, peach_height},                // 🍑 Peach\n    {\"\\U0001F983\", turkey, turkey_width, turkey_height},             // 🦃 Turkey\n    {\"\\U0001F357\", turkey_leg, turkey_leg_width, turkey_leg_height}, // 🍗 Poultry Leg\n    {\"\\U0001F525\", fire, fire_width, fire_height},                   // 🔥 Fire\n    {\"\\u2728\", sparkles, sparkles_width, sparkles_height},           // ✨ Sparkles\n    {\"\\U0001F573\\uFE0F\", hole, hole_width, hole_height},             // 🕳️ Hole\n    {\"\\U0001F3B3\", bowling, bowling_width, bowling_height},          // 🎳 Bowling\n\n    // --- Arrows ---\n    {\"\\u2193\", downwards_arrow, downwards_arrow_width, downwards_arrow_height},          // ↓ Downwards Arrow\n    {\"\\u2193\\uFE0E\", downwards_arrow, downwards_arrow_width, downwards_arrow_height},    // ↓︎ Downwards Arrow (text)\n    {\"\\u2193\\uFE0F\", downwards_arrow, downwards_arrow_width, downwards_arrow_height},    // ↓️ Downwards Arrow (emoji)\n    {\"\\u2199\", south_west_arrow, south_west_arrow_width, south_west_arrow_height},       // ↙ South West Arrow\n    {\"\\u2199\\uFE0E\", south_west_arrow, south_west_arrow_width, south_west_arrow_height}, // ↙︎ South West Arrow (text)\n    {\"\\u2199\\uFE0F\", south_west_arrow, south_west_arrow_width, south_west_arrow_height}, // ↙️ South West Arrow (emoji)\n    {\"\\u2190\", leftwards_arrow, leftwards_arrow_width, leftwards_arrow_height},          // ← Leftwards Arrow\n    {\"\\u2190\\uFE0E\", leftwards_arrow, leftwards_arrow_width, leftwards_arrow_height},    // ←︎ Leftwards Arrow (text)\n    {\"\\u2190\\uFE0F\", leftwards_arrow, leftwards_arrow_width, leftwards_arrow_height},    // ←️ Leftwards Arrow (emoji)\n    {\"\\u2196\", north_west_arrow, north_west_arrow_width, north_west_arrow_height},       // ↖ North West Arrow\n    {\"\\u2196\\uFE0E\", north_west_arrow, north_west_arrow_width, north_west_arrow_height}, // ↖︎ North West Arrow (text)\n    {\"\\u2196\\uFE0F\", north_west_arrow, north_west_arrow_width, north_west_arrow_height}, // ↖️ North West Arrow (emoji)\n    {\"\\u2191\", upwards_arrow, upwards_arrow_width, upwards_arrow_height},                // ↑ Upwards Arrow\n    {\"\\u2191\\uFE0E\", upwards_arrow, upwards_arrow_width, upwards_arrow_height},          // ↑︎ Upwards Arrow (text)\n    {\"\\u2191\\uFE0F\", upwards_arrow, upwards_arrow_width, upwards_arrow_height},          // ↑️ Upwards Arrow (emoji)\n    {\"\\u2197\", north_east_arrow, north_east_arrow_width, north_east_arrow_height},       // ↗ North East Arrow\n    {\"\\u2197\\uFE0E\", north_east_arrow, north_east_arrow_width, north_east_arrow_height}, // ↗︎ North East Arrow (text)\n    {\"\\u2197\\uFE0F\", north_east_arrow, north_east_arrow_width, north_east_arrow_height}, // ↗️ North East Arrow (emoji)\n    {\"\\u2192\", rightwards_arrow, rightwards_arrow_width, rightwards_arrow_height},       // → Rightwards Arrow\n    {\"\\u2192\\uFE0E\", rightwards_arrow, rightwards_arrow_width, rightwards_arrow_height}, // →︎ Rightwards Arrow (text)\n    {\"\\u2192\\uFE0F\", rightwards_arrow, rightwards_arrow_width, rightwards_arrow_height}, // →️ Rightwards Arrow (emoji)\n    {\"\\u2198\", south_east_arrow, south_east_arrow_width, south_east_arrow_height},       // ↘ South East Arrow\n    {\"\\u2198\\uFE0E\", south_east_arrow, south_east_arrow_width, south_east_arrow_height}, // ↘︎ South East Arrow (text)\n    {\"\\u2198\\uFE0F\", south_east_arrow, south_east_arrow_width, south_east_arrow_height}, // ↘️ South East Arrow (emoji)\n\n    // --- Halloween ---\n    {\"\\U0001F383\", jack_o_lantern, jack_o_lantern_width, jack_o_lantern_height}, // 🎃 Jack-O-Lantern\n    {\"\\U0001F47B\", ghost, ghost_width, ghost_height},                            // 👻 Ghost\n    {\"\\U0001F480\", skull, skull_width, skull_height}                             // 💀 Skull\n#endif\n};\n\nconst int numEmotes = sizeof(emotes) / sizeof(emotes[0]);\n\n#ifndef EXCLUDE_EMOJI\nconst unsigned char thumbup[] PROGMEM = {0x00, 0x03, 0x80, 0x04, 0x80, 0x04, 0x40, 0x04, 0x20, 0x02, 0x18,\n                                         0x02, 0x06, 0x3F, 0x06, 0x40, 0x06, 0x70, 0x06, 0x40, 0x06, 0x70,\n                                         0x06, 0x40, 0x06, 0x30, 0x08, 0x20, 0xF0, 0x1F, 0x00, 0x00};\n\nconst unsigned char thumbdown[] PROGMEM = {0xF0, 0x1F, 0x08, 0x20, 0x06, 0x30, 0x06, 0x40, 0x06, 0x70, 0x06,\n                                           0x40, 0x06, 0x70, 0x06, 0x40, 0x06, 0x3F, 0x18, 0x02, 0x20, 0x02,\n                                           0x40, 0x04, 0x80, 0x04, 0x80, 0x04, 0x00, 0x03, 0x00, 0x00};\n\nconst unsigned char smiling_eyes[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x24, 0x24, 0x52,\n                                              0x4A, 0x02, 0x40, 0x02, 0x40, 0x22, 0x44, 0x22, 0x44, 0xC2, 0x43,\n                                              0x04, 0x20, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char grinning[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x44, 0x22, 0x42,\n                                          0x42, 0x02, 0x40, 0x02, 0x40, 0xF2, 0x4F, 0x12, 0x48, 0x22, 0x44,\n                                          0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char slightly_smiling[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x44, 0x22, 0x42,\n                                                  0x42, 0x02, 0x40, 0x02, 0x40, 0x12, 0x48, 0x12, 0x48, 0x22, 0x44,\n                                                  0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char winking_face[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x44, 0x20, 0x42,\n                                              0x46, 0x02, 0x40, 0x02, 0x40, 0x12, 0x48, 0x12, 0x48, 0x22, 0x44,\n                                              0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char grinning_smiling_eyes[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x24, 0x24, 0x52,\n                                                       0x4A, 0x02, 0x40, 0xFA, 0x5F, 0x0A, 0x50, 0x0A, 0x50, 0x12, 0x48,\n                                                       0x24, 0x24, 0xC4, 0x23, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char heart_smile[] PROGMEM = {0x00, 0x00, 0x6C, 0x07, 0x7C, 0x18, 0x7C, 0x20, 0x38, 0x24, 0x52,\n                                             0x0A, 0x02, 0xD8, 0x02, 0xF8, 0x22, 0xFC, 0x20, 0x74, 0xDB, 0x23,\n                                             0x1F, 0x00, 0x1F, 0x20, 0x0E, 0x18, 0xE4, 0x07, 0x00, 0x00};\n\nconst unsigned char heart_eyes[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x54, 0x2A, 0xFA,\n                                            0x5F, 0x72, 0x4E, 0x22, 0x44, 0x02, 0x40, 0x12, 0x48, 0x12, 0x48,\n                                            0x24, 0x24, 0xC4, 0x23, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char question[] PROGMEM = {0xE0, 0x07, 0x10, 0x08, 0x08, 0x10, 0x88, 0x11, 0x48, 0x12, 0x48,\n                                          0x12, 0x48, 0x12, 0x30, 0x11, 0x80, 0x08, 0x40, 0x04, 0x40, 0x02,\n                                          0xC0, 0x03, 0x00, 0x00, 0xC0, 0x03, 0x40, 0x02, 0x80, 0x01};\n\nconst unsigned char bang[] PROGMEM = {0x30, 0x0C, 0x48, 0x12, 0x48, 0x12, 0x48, 0x12, 0x48, 0x12, 0x48,\n                                      0x12, 0x48, 0x12, 0x48, 0x12, 0x48, 0x12, 0x48, 0x12, 0x30, 0x0C,\n                                      0x00, 0x00, 0x30, 0x0C, 0x48, 0x12, 0x30, 0x0C, 0x00, 0x00};\n\nconst unsigned char haha[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x24, 0x24, 0x52,\n                                      0x4A, 0x0A, 0x50, 0x0E, 0x70, 0xF2, 0x4F, 0x12, 0x48, 0x32, 0x44,\n                                      0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char rofl[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x84, 0x21, 0x84, 0x20, 0x02,\n                                      0x4C, 0x02, 0x4A, 0x1A, 0x49, 0x8A, 0x48, 0x42, 0x48, 0x22, 0x44,\n                                      0xE4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char smiling_closed_eyes[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x24, 0x24, 0x42,\n                                                     0x42, 0x22, 0x44, 0x02, 0x40, 0xF2, 0x4F, 0x12, 0x48, 0x22, 0x44,\n                                                     0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char grinning_smiling_eyes_2[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x24, 0x24, 0x52,\n                                                         0x4A, 0x02, 0x40, 0x02, 0x40, 0xF2, 0x4F, 0x12, 0x48, 0x22, 0x44,\n                                                         0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char loudly_crying_face[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x34, 0x2C, 0x4A,\n                                                    0x52, 0x12, 0x48, 0x12, 0x48, 0x92, 0x49, 0x52, 0x4A, 0x52, 0x4A,\n                                                    0x54, 0x2A, 0x94, 0x29, 0x18, 0x18, 0xF0, 0x0F, 0x00, 0x00};\n\nconst unsigned char wave_icon[] PROGMEM = {0x00, 0x00, 0xC0, 0x18, 0x30, 0x21, 0x48, 0x5A, 0x94, 0x64, 0x24,\n                                           0x25, 0x4A, 0x24, 0x12, 0x44, 0x22, 0x44, 0x04, 0x40, 0x08, 0x40,\n                                           0x12, 0x40, 0x22, 0x20, 0xC4, 0x10, 0x18, 0x0F, 0x00, 0x00};\n\nconst unsigned char cowboy[] PROGMEM = {0x70, 0x0E, 0x8F, 0xF1, 0x11, 0x88, 0x21, 0x84, 0xC2, 0x43, 0x1E,\n                                        0x78, 0xE2, 0x47, 0x42, 0x42, 0x12, 0x48, 0x12, 0x48, 0x22, 0x44,\n                                        0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char deadmau5[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0xE4, 0x27, 0x12, 0x48, 0x0A,\n                                          0x50, 0x0E, 0x70, 0x11, 0x88, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98,\n                                          0x19, 0x98, 0x19, 0x98, 0x11, 0x88, 0x0E, 0x70, 0x00, 0x00};\n\nconst unsigned char sun[] PROGMEM = {0x00, 0x00, 0x80, 0x01, 0xEC, 0x37, 0xFC, 0x3F, 0xF8, 0x1F, 0xFC,\n                                     0x3F, 0xFE, 0x7F, 0xFC, 0x3F, 0xFC, 0x3F, 0xFE, 0x7F, 0xFC, 0x3F,\n                                     0xF8, 0x1F, 0xFC, 0x3F, 0xEC, 0x37, 0x80, 0x01, 0x00, 0x00};\n\nconst unsigned char rain[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x1F, 0xFC, 0x3F, 0xFE,\n                                      0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFC, 0x3F, 0x00, 0x00, 0x48, 0x12,\n                                      0x48, 0x12, 0x24, 0x09, 0x24, 0x09, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char cloud[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x1F, 0xFC,\n                                       0x3F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFC, 0x3F, 0xF8, 0x1F,\n                                       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char fog[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x54, 0x55, 0x22, 0x22, 0x00,\n                                     0x00, 0x44, 0x44, 0xAA, 0x2A, 0x11, 0x11, 0x00, 0x00, 0x88, 0x88,\n                                     0x54, 0x55, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char devil[] PROGMEM = {0x06, 0x60, 0xCA, 0x53, 0x32, 0x4C, 0x22, 0x44, 0x44, 0x22, 0x3A,\n                                       0x5C, 0x32, 0x4C, 0x52, 0x4A, 0x72, 0x4E, 0x02, 0x40, 0x22, 0x44,\n                                       0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char heart[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x3C, 0x3C, 0x7E, 0x7E, 0xFE, 0x7F, 0xFE,\n                                       0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFC, 0x3F, 0xF8, 0x1F, 0xF8, 0x1F,\n                                       0xF0, 0x0F, 0xE0, 0x07, 0xC0, 0x03, 0x80, 0x01, 0x00, 0x00};\n\nconst unsigned char poo[] PROGMEM = {0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x04, 0xF0,\n                                     0x08, 0x10, 0x10, 0x48, 0x12, 0x08, 0x18, 0xE8, 0x21, 0x1C, 0x40,\n                                     0x42, 0x42, 0x82, 0x41, 0x02, 0x30, 0xFC, 0x0F, 0x00, 0x00};\n\nconst unsigned char bell_icon[] PROGMEM = {0x00, 0x00, 0x80, 0x01, 0x80, 0x01, 0xE0, 0x07, 0xF0, 0x0F, 0xF0,\n                                           0x0F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xF8, 0x1F, 0xFC, 0x3F,\n                                           0xFC, 0x3F, 0xFE, 0x7F, 0xFE, 0x7F, 0x80, 0x01, 0x00, 0x00};\n\nconst unsigned char cookie[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x34, 0x22, 0x32,\n                                        0x40, 0x02, 0x58, 0x82, 0x5B, 0x92, 0x43, 0x82, 0x43, 0x02, 0x40,\n                                        0x64, 0x28, 0x64, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char fire[] PROGMEM = {0x30, 0x00, 0xF0, 0x00, 0xF8, 0x03, 0xF8, 0x07, 0xFC, 0x1F, 0xFC,\n                                      0x1F, 0xFE, 0x3E, 0x7E, 0x3E, 0x3E, 0x7C, 0x1E, 0x78, 0x1E, 0x70,\n                                      0x1C, 0x70, 0x1C, 0x70, 0x38, 0x38, 0x30, 0x38, 0x60, 0x0C};\n\nconst unsigned char peace_sign[] PROGMEM = {0xC0, 0x30, 0x40, 0x29, 0x40, 0x25, 0x40, 0x15, 0x40, 0x12, 0x38,\n                                            0x0A, 0x54, 0x68, 0x54, 0x58, 0x54, 0x44, 0x3C, 0x22, 0x04, 0x22,\n                                            0x04, 0x12, 0x08, 0x10, 0x10, 0x08, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char praying[] PROGMEM = {0x00, 0x00, 0x40, 0x02, 0xA0, 0x05, 0x90, 0x09, 0x90, 0x09, 0x90,\n                                         0x09, 0x98, 0x19, 0x94, 0x29, 0xA4, 0x25, 0xA4, 0x25, 0x84, 0x21,\n                                         0x84, 0x21, 0x86, 0x61, 0x4E, 0x72, 0x7F, 0x7E, 0x3F, 0xFC};\n\nconst unsigned char sparkles[] PROGMEM = {0x00, 0x00, 0x10, 0x00, 0x38, 0x04, 0x10, 0x04, 0x00, 0x0E, 0x00,\n                                          0x1F, 0x80, 0x3F, 0xE0, 0xFF, 0x80, 0x3F, 0x10, 0x1F, 0x10, 0x0E,\n                                          0x38, 0x04, 0xFE, 0x04, 0x38, 0x00, 0x10, 0x00, 0x10, 0x00};\n\nconst unsigned char clown[] PROGMEM = {0x00, 0x00, 0xEE, 0x77, 0x1A, 0x58, 0x06, 0x60, 0x24, 0x24, 0x72,\n                                       0x4E, 0x22, 0x44, 0x82, 0x41, 0x82, 0x41, 0x1A, 0x58, 0xF2, 0x4F,\n                                       0x14, 0x28, 0xE4, 0x27, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char robo[] PROGMEM = {0x80, 0x01, 0xC0, 0x03, 0x80, 0x01, 0xFC, 0x3F, 0x04, 0x20, 0x74,\n                                      0x2E, 0x52, 0x4A, 0x72, 0x4E, 0x02, 0x40, 0x02, 0x40, 0xA2, 0x4A,\n                                      0x52, 0x45, 0x04, 0x20, 0x04, 0x20, 0xFC, 0x3F, 0x00, 0x00};\n\nconst unsigned char hole[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n                                      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x3C, 0x3C,\n                                      0x06, 0x60, 0x0C, 0x30, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char bowling[] PROGMEM = {0x00, 0x38, 0x00, 0x44, 0x00, 0x44, 0x00, 0x44, 0x00, 0x28, 0x00,\n                                         0x38, 0x00, 0x28, 0x78, 0x44, 0x84, 0x82, 0x22, 0x83, 0x52, 0x83,\n                                         0x02, 0x83, 0x02, 0x45, 0x84, 0x44, 0x78, 0x38, 0x00, 0x00};\n\nconst unsigned char vulcan_salute[] PROGMEM = {0x08, 0x02, 0x16, 0x0D, 0x15, 0x15, 0x15, 0x15, 0xA9, 0x12, 0x4A,\n                                               0x0A, 0x02, 0x38, 0x04, 0x48, 0x04, 0x44, 0x04, 0x22, 0x04, 0x22,\n                                               0x04, 0x12, 0x08, 0x10, 0x10, 0x08, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char jack_o_lantern[] PROGMEM = {0xC0, 0x00, 0x80, 0x01, 0xB8, 0x1D, 0xC4, 0x23, 0x22, 0x44, 0x05,\n                                                0xA0, 0x31, 0x8C, 0x51, 0x8A, 0x61, 0x86, 0x09, 0x90, 0xB9, 0x9D,\n                                                0x49, 0x92, 0xB2, 0x4D, 0x42, 0x42, 0x04, 0x20, 0xF8, 0x1F};\n\nconst unsigned char ghost[] PROGMEM = {0xC0, 0x03, 0xF0, 0x0F, 0xF8, 0x1F, 0xDC, 0x3B, 0xBC, 0x3D, 0xDF,\n                                       0xFB, 0xFF, 0xFF, 0x1F, 0xF8, 0x1E, 0x78, 0x1C, 0x38, 0x3C, 0x3C,\n                                       0xFC, 0x3F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0x8C, 0x31};\n\nconst unsigned char skull[] PROGMEM = {0xE0, 0x07, 0xF8, 0x1F, 0xFC, 0x3F, 0xFE, 0x7F, 0xFE, 0x7F, 0xC7,\n                                       0xE3, 0x87, 0xE1, 0x87, 0xE1, 0x8F, 0xF1, 0xFE, 0x7F, 0x7C, 0x3E,\n                                       0xFC, 0x3F, 0xFC, 0x3F, 0xFC, 0x3F, 0xF8, 0x1F, 0xB0, 0x0D};\n\nconst unsigned char vomiting[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x04, 0x20, 0x22,\n                                          0x44, 0x42, 0x42, 0x22, 0x44, 0x02, 0x40, 0x02, 0x40, 0xC2, 0x43,\n                                          0x64, 0x26, 0x64, 0x26, 0x68, 0x16, 0x50, 0x0A, 0xF8, 0x1F};\n\nconst unsigned char cool[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0xFC, 0x3F, 0xFA,\n                                      0x5F, 0x72, 0x4E, 0x02, 0x40, 0x12, 0x48, 0x12, 0x48, 0x22, 0x44,\n                                      0xC4, 0x23, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char shortcake[] PROGMEM = {0x00, 0x00, 0x00, 0x0F, 0x80, 0x3F, 0xE0, 0xFC, 0xE0, 0xE1, 0xF0,\n                                           0xB8, 0x10, 0x87, 0xC8, 0x80, 0x3C, 0xE0, 0x06, 0x98, 0x02, 0xC7,\n                                           0xE2, 0x30, 0x1A, 0x0E, 0xC6, 0x01, 0x32, 0x00, 0x0E, 0x00};\n\nconst unsigned char caution[] PROGMEM = {0x00, 0x00, 0x80, 0x01, 0xC0, 0x03, 0xC0, 0x03, 0x60, 0x06, 0x60,\n                                         0x06, 0x70, 0x0E, 0x70, 0x0E, 0x78, 0x1E, 0x78, 0x1E, 0x7C, 0x3E,\n                                         0xFC, 0x3F, 0x7E, 0x7E, 0x7E, 0x7E, 0xFC, 0x3F, 0x00, 0x00};\n\nconst unsigned char clipboard[] PROGMEM = {0xC0, 0x03, 0x7E, 0x7E, 0xC2, 0x43, 0xFA, 0x5F, 0x0A, 0x5B, 0xFA,\n                                           0x5F, 0x8A, 0x54, 0xFA, 0x5F, 0x4A, 0x58, 0xFA, 0x5F, 0x2A, 0x51,\n                                           0xFA, 0x5F, 0x0A, 0x59, 0xFA, 0x5F, 0x02, 0x40, 0xFE, 0x7F};\n\nconst unsigned char snowflake[] PROGMEM = {0x00, 0x00, 0x40, 0x01, 0x88, 0x08, 0x8C, 0x18, 0xD0, 0x05, 0x60,\n                                           0x03, 0x32, 0x26, 0x1C, 0x1C, 0x32, 0x26, 0x60, 0x03, 0xD0, 0x05,\n                                           0x8C, 0x18, 0x88, 0x08, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char drop[] PROGMEM = {0x00, 0x00, 0x00, 0x01, 0x80, 0x03, 0xC0, 0x07, 0xE0, 0x0F, 0xE0,\n                                      0x0F, 0xF0, 0x1F, 0xF0, 0x1F, 0xF8, 0x3F, 0xF8, 0x3F, 0xF8, 0x3F,\n                                      0xF8, 0x3F, 0xF0, 0x1F, 0xE0, 0x0F, 0x80, 0x03, 0x00, 0x00};\n\nconst unsigned char thermometer[] PROGMEM = {0x00, 0x00, 0x0C, 0x00, 0x16, 0x00, 0x2E, 0x00, 0x5C, 0x00, 0xB8,\n                                             0x00, 0x70, 0x01, 0xE0, 0x02, 0xC0, 0x05, 0x80, 0x3B, 0x00, 0x47,\n                                             0x00, 0xBE, 0x00, 0x9E, 0x00, 0xBE, 0x00, 0x7C, 0x00, 0x38};\n\nconst unsigned char sun_behind_raincloud[] PROGMEM = {0xC0, 0x03, 0x20, 0x04, 0x10, 0x0E, 0x38, 0x1F, 0xFC, 0x37, 0xEE,\n                                                      0x77, 0xDE, 0x7B, 0x3E, 0x7C, 0xFC, 0x3F, 0x00, 0x00, 0x48, 0x12,\n                                                      0x48, 0x12, 0x24, 0x09, 0x24, 0x09, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char sun_behind_cloud[] PROGMEM = {0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x04, 0x0E, 0x3C, 0x1B, 0xFC,\n                                                  0x3B, 0xFE, 0x7B, 0xFA, 0x7B, 0xF6, 0x7D, 0x0C, 0x3E, 0xF8, 0x1F,\n                                                  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char cloud_with_snow[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x1F, 0xFC, 0x3F, 0xFE,\n                                                 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFC, 0x3F, 0x00, 0x00, 0x08, 0x02,\n                                                 0x40, 0x10, 0x00, 0x00, 0x24, 0x09, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char cloud_with_lightning[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x1F, 0xFC, 0x3F, 0xFE,\n                                                      0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFC, 0x3F, 0x00, 0x01, 0x80, 0x01,\n                                                      0x80, 0x01, 0xC0, 0x07, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01};\n\nconst unsigned char cloud_with_lightning_rain[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x1F, 0xFC, 0x3F, 0xFE,\n                                                           0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFC, 0x3F, 0x00, 0x01, 0x90, 0x21,\n                                                           0x90, 0x21, 0xC8, 0x17, 0x08, 0x13, 0x00, 0x03, 0x00, 0x01};\n\nconst unsigned char wind_face[] PROGMEM = {0xFF, 0x00, 0x01, 0x01, 0x01, 0x01, 0xF9, 0x00, 0xF9, 0x01, 0xD9,\n                                           0x01, 0x99, 0x01, 0xF9, 0x01, 0xF9, 0x33, 0xFD, 0x4B, 0xFD, 0x85,\n                                           0xFD, 0x9A, 0xFD, 0x75, 0xFD, 0x09, 0xFD, 0x01, 0xFF, 0x00};\n\nconst unsigned char new_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x18, 0x04, 0x20, 0x04, 0x20, 0x02,\n                                          0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40,\n                                          0x04, 0x20, 0x04, 0x20, 0x18, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char waxing_crescent_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x1F, 0x04, 0x3E, 0x04, 0x3C, 0x02,\n                                                      0x78, 0x02, 0x78, 0x02, 0x78, 0x02, 0x78, 0x02, 0x78, 0x02, 0x78,\n                                                      0x04, 0x3C, 0x04, 0x3E, 0x18, 0x1F, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char first_quarter_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x1F, 0x04, 0x3F, 0x04, 0x3F, 0x02,\n                                                    0x7F, 0x02, 0x7F, 0x02, 0x7F, 0x02, 0x7F, 0x02, 0x7F, 0x02, 0x7F,\n                                                    0x04, 0x3F, 0x04, 0x3F, 0x18, 0x1F, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char waxing_gibbous_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0x18, 0x1F, 0x84, 0x3F, 0xC4, 0x3F, 0xC2,\n                                                     0x7F, 0xC2, 0x7F, 0xC2, 0x7F, 0xC2, 0x7F, 0xC2, 0x7F, 0xC2, 0x7F,\n                                                     0xC4, 0x3F, 0x84, 0x3F, 0x18, 0x1F, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char full_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0xF8, 0x1F, 0xFC, 0x3F, 0xFC, 0x3F, 0xFE,\n                                           0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x7F, 0xFE, 0x7F,\n                                           0xFC, 0x3F, 0xFC, 0x3F, 0xF8, 0x1F, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char waning_gibbous_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0xF8, 0x18, 0xFC, 0x21, 0xFC, 0x23, 0xFE,\n                                                     0x43, 0xFE, 0x43, 0xFE, 0x43, 0xFE, 0x43, 0xFE, 0x43, 0xFE, 0x43,\n                                                     0xFC, 0x23, 0xFC, 0x21, 0xF8, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char last_quarter_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0xF8, 0x18, 0xFC, 0x20, 0xFC, 0x20, 0xFE,\n                                                   0x40, 0xFE, 0x40, 0xFE, 0x40, 0xFE, 0x40, 0xFE, 0x40, 0xFE, 0x40,\n                                                   0xFC, 0x20, 0xFC, 0x20, 0xF8, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char waning_crescent_moon[] PROGMEM = {0x00, 0x00, 0xE0, 0x07, 0xF8, 0x18, 0x7C, 0x20, 0x3C, 0x20, 0x1E,\n                                                      0x40, 0x1E, 0x40, 0x1E, 0x40, 0x1E, 0x40, 0x1E, 0x40, 0x1E, 0x40,\n                                                      0x3C, 0x20, 0x7C, 0x20, 0xF8, 0x18, 0xE0, 0x07, 0x00, 0x00};\n\nconst unsigned char first_quarter_moon_face[] PROGMEM = {0x00, 0x0F, 0x00, 0x12, 0x00, 0x24, 0x00, 0x44, 0x00, 0x48, 0x00,\n                                                         0x88, 0x00, 0x84, 0x80, 0x93, 0x80, 0x80, 0x03, 0x81, 0x8D, 0x80,\n                                                         0x71, 0x40, 0x82, 0x41, 0x02, 0x20, 0x0C, 0x18, 0xF0, 0x07};\n\nconst unsigned char peach[] PROGMEM = {0x70, 0x0F, 0x88, 0x10, 0x78, 0x1F, 0x88, 0x11, 0x04, 0x22, 0x02,\n                                       0x44, 0x02, 0x44, 0x02, 0x44, 0x02, 0x44, 0x02, 0x42, 0x02, 0x40,\n                                       0x04, 0x20, 0x04, 0x20, 0x08, 0x10, 0x30, 0x0C, 0xC0, 0x03};\n\nconst unsigned char turkey[] PROGMEM = {0x00, 0x00, 0x38, 0x00, 0x44, 0x38, 0x56, 0x54, 0x45, 0x52, 0xE2,\n                                        0x21, 0x2C, 0x56, 0x14, 0x58, 0x0A, 0x37, 0x86, 0x68, 0x82, 0x50,\n                                        0x82, 0x20, 0x04, 0x41, 0xF8, 0x7F, 0x40, 0x02, 0xF0, 0x07};\n\nconst unsigned char turkey_leg[] PROGMEM = {0x0C, 0x00, 0x1E, 0x00, 0x1F, 0x00, 0x2F, 0x00, 0x46, 0x00, 0x88,\n                                            0x01, 0x10, 0x0E, 0x20, 0x30, 0x20, 0x40, 0x40, 0x40, 0x40, 0x80,\n                                            0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x43, 0x00, 0x3C};\n\nconst unsigned char south_west_arrow[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x1C, 0x00, 0x3E, 0x00,\n                                                  0x1F, 0x80, 0x0F, 0xC2, 0x07, 0xE6, 0x03, 0xFE, 0x01, 0xFE, 0x00,\n                                                  0x7E, 0x00, 0x7E, 0x00, 0xFE, 0x00, 0xFE, 0x01, 0x00, 0x00};\n\nconst unsigned char south_east_arrow[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x38, 0x00, 0x7C, 0x00, 0xF8,\n                                                  0x00, 0xF0, 0x01, 0xE0, 0x43, 0xC0, 0x67, 0x80, 0x7F, 0x00, 0x7F,\n                                                  0x00, 0x7E, 0x00, 0x7E, 0x00, 0x7F, 0x80, 0x7F, 0x00, 0x00};\n\nconst unsigned char north_west_arrow[] PROGMEM = {0x00, 0x00, 0xFE, 0x01, 0xFE, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0xFE,\n                                                  0x00, 0xFE, 0x01, 0xE6, 0x03, 0xC2, 0x07, 0x80, 0x0F, 0x00, 0x1F,\n                                                  0x00, 0x3E, 0x00, 0x1C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char north_east_arrow[] PROGMEM = {0x00, 0x00, 0x80, 0x7F, 0x00, 0x7F, 0x00, 0x7E, 0x00, 0x7E, 0x00,\n                                                  0x7F, 0x80, 0x7F, 0xC0, 0x67, 0xE0, 0x43, 0xF0, 0x01, 0xF8, 0x00,\n                                                  0x7C, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char downwards_arrow[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0,\n                                                 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xFC, 0x3F,\n                                                 0xF8, 0x1F, 0xF0, 0x0F, 0xE0, 0x07, 0xC0, 0x03, 0x80, 0x01};\n\nconst unsigned char leftwards_arrow[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x30, 0x00, 0x38, 0x00, 0x3C,\n                                                 0x00, 0xFE, 0x3F, 0xFF, 0x3F, 0xFF, 0x3F, 0xFE, 0x3F, 0x3C, 0x00,\n                                                 0x38, 0x00, 0x30, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char upwards_arrow[] PROGMEM = {0x80, 0x01, 0xC0, 0x03, 0xE0, 0x07, 0xF0, 0x0F, 0xF8, 0x1F, 0xFC,\n                                               0x3F, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03,\n                                               0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char rightwards_arrow[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x1C, 0x00,\n                                                  0x3C, 0xFC, 0x7F, 0xFC, 0xFF, 0xFC, 0xFF, 0xFC, 0x7F, 0x00, 0x3C,\n                                                  0x00, 0x1C, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00};\n\nconst unsigned char strong[] PROGMEM = {0x38, 0x00, 0x44, 0x00, 0x62, 0x00, 0x42, 0x00, 0x42, 0x00, 0x3A,\n                                        0x00, 0x11, 0x3C, 0x11, 0x42, 0xD1, 0x81, 0x31, 0x82, 0x11, 0x82,\n                                        0x21, 0x80, 0x01, 0x80, 0x01, 0x80, 0x02, 0x40, 0xFC, 0x3F};\n\nconst unsigned char check_mark[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x70, 0x00, 0x3C, 0x00,\n                                            0x1E, 0x00, 0x0F, 0x80, 0x07, 0xC3, 0x03, 0xEE, 0x03, 0xFC, 0x01,\n                                            0xF8, 0x00, 0xF0, 0x00, 0x70, 0x00, 0x60, 0x00, 0x20, 0x00};\n\nconst unsigned char house[] PROGMEM = {0x80, 0x01, 0x5C, 0x02, 0x34, 0x04, 0x14, 0x08, 0x0C, 0x10, 0x04,\n                                       0x20, 0x02, 0x40, 0xFF, 0xFF, 0x02, 0x40, 0x7A, 0x5F, 0x4A, 0x55,\n                                       0x4A, 0x5F, 0x6A, 0x55, 0x4A, 0x5F, 0x4A, 0x40, 0xFE, 0x7F};\n\nconst unsigned char shrug[] PROGMEM = {0xC0, 0x03, 0x20, 0x04, 0x10, 0x08, 0x50, 0x0A, 0x10, 0x08, 0x90,\n                                       0x09, 0x27, 0xE4, 0x49, 0x92, 0xAA, 0x55, 0x16, 0x68, 0x12, 0x48,\n                                       0x02, 0x40, 0x02, 0x40, 0x0C, 0x30, 0x08, 0x10, 0xF8, 0x1F};\n\nconst unsigned char eyes[] PROGMEM = {0x00, 0x00, 0x3C, 0x3C, 0x42, 0x42, 0x81, 0x81, 0x85, 0x85, 0x8F,\n                                      0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F,\n                                      0x85, 0x85, 0x81, 0x81, 0x42, 0x42, 0x3C, 0x3C, 0x00, 0x00};\n\nconst unsigned char eye[] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0xF8, 0x1F, 0xF4,\n                                     0x2F, 0x7A, 0x5E, 0x39, 0x9C, 0x39, 0x9C, 0x7A, 0x5E, 0xF4, 0x2F,\n                                     0xF8, 0x1F, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n#endif\n\n} // namespace graphics\n#endif\n"
  },
  {
    "path": "src/graphics/emotes.h",
    "content": "#pragma once\n#include <Arduino.h>\n\nnamespace graphics\n{\n\n// === Emote List ===\nstruct Emote {\n    const char *label;\n    const unsigned char *bitmap;\n    int width;\n    int height;\n};\n\nextern const Emote emotes[/* numEmotes */];\nextern const int numEmotes;\n\n#ifndef EXCLUDE_EMOJI\n// === Emote Bitmaps ===\n#define thumbs_height 16\n#define thumbs_width 16\nextern const unsigned char thumbup[] PROGMEM;\nextern const unsigned char thumbdown[] PROGMEM;\n\n#define smiling_eyes_height 16\n#define smiling_eyes_width 16\nextern const unsigned char smiling_eyes[] PROGMEM;\n\n#define grinning_height 16\n#define grinning_width 16\nextern const unsigned char grinning[] PROGMEM;\n\n#define slightly_smiling_height 16\n#define slightly_smiling_width 16\nextern const unsigned char slightly_smiling[] PROGMEM;\n\n#define winking_face_height 16\n#define winking_face_width 16\nextern const unsigned char winking_face[] PROGMEM;\n\n#define grinning_smiling_eyes_height 16\n#define grinning_smiling_eyes_width 16\nextern const unsigned char grinning_smiling_eyes[] PROGMEM;\n\n#define heart_smile_height 16\n#define heart_smile_width 16\nextern const unsigned char heart_smile[] PROGMEM;\n\n#define heart_eyes_height 16\n#define heart_eyes_width 16\nextern const unsigned char heart_eyes[] PROGMEM;\n\n#define question_height 16\n#define question_width 16\nextern const unsigned char question[] PROGMEM;\n\n#define bang_height 16\n#define bang_width 16\nextern const unsigned char bang[] PROGMEM;\n\n#define haha_height 16\n#define haha_width 16\nextern const unsigned char haha[] PROGMEM;\n\n#define rofl_height 16\n#define rofl_width 16\nextern const unsigned char rofl[] PROGMEM;\n\n#define smiling_closed_eyes_height 16\n#define smiling_closed_eyes_width 16\nextern const unsigned char smiling_closed_eyes[] PROGMEM;\n\n#define grinning_smiling_eyes_2_height 16\n#define grinning_smiling_eyes_2_width 16\nextern const unsigned char grinning_smiling_eyes_2[] PROGMEM;\n\n#define loudly_crying_face_height 16\n#define loudly_crying_face_width 16\nextern const unsigned char loudly_crying_face[] PROGMEM;\n\n#define wave_icon_height 16\n#define wave_icon_width 16\nextern const unsigned char wave_icon[] PROGMEM;\n\n#define cowboy_height 16\n#define cowboy_width 16\nextern const unsigned char cowboy[] PROGMEM;\n\n#define deadmau5_height 16\n#define deadmau5_width 16\nextern const unsigned char deadmau5[] PROGMEM;\n\n#define sun_height 16\n#define sun_width 16\nextern const unsigned char sun[] PROGMEM;\n\n#define rain_height 16\n#define rain_width 16\nextern const unsigned char rain[] PROGMEM;\n\n#define cloud_height 16\n#define cloud_width 16\nextern const unsigned char cloud[] PROGMEM;\n\n#define fog_height 16\n#define fog_width 16\nextern const unsigned char fog[] PROGMEM;\n\n#define devil_height 16\n#define devil_width 16\nextern const unsigned char devil[] PROGMEM;\n\n#define heart_height 16\n#define heart_width 16\nextern const unsigned char heart[] PROGMEM;\n\n#define poo_height 16\n#define poo_width 16\nextern const unsigned char poo[] PROGMEM;\n\n#define bell_icon_width 16\n#define bell_icon_height 16\nextern const unsigned char bell_icon[] PROGMEM;\n\n#define cookie_width 16\n#define cookie_height 16\nextern const unsigned char cookie[] PROGMEM;\n\n#define fire_width 16\n#define fire_height 16\nextern const unsigned char fire[] PROGMEM;\n\n#define peace_sign_width 16\n#define peace_sign_height 16\nextern const unsigned char peace_sign[] PROGMEM;\n\n#define praying_width 16\n#define praying_height 16\nextern const unsigned char praying[] PROGMEM;\n\n#define sparkles_width 16\n#define sparkles_height 16\nextern const unsigned char sparkles[] PROGMEM;\n\n#define clown_width 16\n#define clown_height 16\nextern const unsigned char clown[] PROGMEM;\n\n#define robo_width 16\n#define robo_height 16\nextern const unsigned char robo[] PROGMEM;\n\n#define hole_width 16\n#define hole_height 16\nextern const unsigned char hole[] PROGMEM;\n\n#define bowling_width 16\n#define bowling_height 16\nextern const unsigned char bowling[] PROGMEM;\n\n#define vulcan_salute_width 16\n#define vulcan_salute_height 16\nextern const unsigned char vulcan_salute[] PROGMEM;\n\n#define jack_o_lantern_width 16\n#define jack_o_lantern_height 16\nextern const unsigned char jack_o_lantern[] PROGMEM;\n\n#define ghost_width 16\n#define ghost_height 16\nextern const unsigned char ghost[] PROGMEM;\n\n#define skull_width 16\n#define skull_height 16\nextern const unsigned char skull[] PROGMEM;\n\n#define vomiting_width 16\n#define vomiting_height 16\nextern const unsigned char vomiting[] PROGMEM;\n\n#define cool_width 16\n#define cool_height 16\nextern const unsigned char cool[] PROGMEM;\n\n#define shortcake_width 16\n#define shortcake_height 16\nextern const unsigned char shortcake[] PROGMEM;\n\n#define caution_width 16\n#define caution_height 16\nextern const unsigned char caution[] PROGMEM;\n\n#define clipboard_width 16\n#define clipboard_height 16\nextern const unsigned char clipboard[] PROGMEM;\n\n#define snowflake_width 16\n#define snowflake_height 16\nextern const unsigned char snowflake[] PROGMEM;\n\n#define drop_width 16\n#define drop_height 16\nextern const unsigned char drop[] PROGMEM;\n\n#define thermometer_width 16\n#define thermometer_height 16\nextern const unsigned char thermometer[] PROGMEM;\n\n#define sun_behind_raincloud_width 16\n#define sun_behind_raincloud_height 16\nextern const unsigned char sun_behind_raincloud[] PROGMEM;\n\n#define sun_behind_cloud_width 16\n#define sun_behind_cloud_height 16\nextern const unsigned char sun_behind_cloud[] PROGMEM;\n\n#define cloud_with_snow_width 16\n#define cloud_with_snow_height 16\nextern const unsigned char cloud_with_snow[] PROGMEM;\n\n#define cloud_with_lightning_width 16\n#define cloud_with_lightning_height 16\nextern const unsigned char cloud_with_lightning[] PROGMEM;\n\n#define cloud_with_lightning_rain_width 16\n#define cloud_with_lightning_rain_height 16\nextern const unsigned char cloud_with_lightning_rain[] PROGMEM;\n\n#define wind_face_width 16\n#define wind_face_height 16\nextern const unsigned char wind_face[] PROGMEM;\n\n#define new_moon_width 16\n#define new_moon_height 16\nextern const unsigned char new_moon[] PROGMEM;\n\n#define waxing_crescent_moon_width 16\n#define waxing_crescent_moon_height 16\nextern const unsigned char waxing_crescent_moon[] PROGMEM;\n\n#define first_quarter_moon_width 16\n#define first_quarter_moon_height 16\nextern const unsigned char first_quarter_moon[] PROGMEM;\n\n#define waxing_gibbous_moon_width 16\n#define waxing_gibbous_moon_height 16\nextern const unsigned char waxing_gibbous_moon[] PROGMEM;\n\n#define full_moon_width 16\n#define full_moon_height 16\nextern const unsigned char full_moon[] PROGMEM;\n\n#define waning_gibbous_moon_width 16\n#define waning_gibbous_moon_height 16\nextern const unsigned char waning_gibbous_moon[] PROGMEM;\n\n#define last_quarter_moon_width 16\n#define last_quarter_moon_height 16\nextern const unsigned char last_quarter_moon[] PROGMEM;\n\n#define waning_crescent_moon_width 16\n#define waning_crescent_moon_height 16\nextern const unsigned char waning_crescent_moon[] PROGMEM;\n\n#define first_quarter_moon_face_width 16\n#define first_quarter_moon_face_height 16\nextern const unsigned char first_quarter_moon_face[] PROGMEM;\n\n#define peach_width 16\n#define peach_height 16\nextern const unsigned char peach[] PROGMEM;\n\n#define turkey_width 16\n#define turkey_height 16\nextern const unsigned char turkey[] PROGMEM;\n\n#define turkey_leg_width 16\n#define turkey_leg_height 16\nextern const unsigned char turkey_leg[] PROGMEM;\n\n#define south_west_arrow_width 16\n#define south_west_arrow_height 16\nextern const unsigned char south_west_arrow[] PROGMEM;\n\n#define south_east_arrow_width 16\n#define south_east_arrow_height 16\nextern const unsigned char south_east_arrow[] PROGMEM;\n\n#define north_west_arrow_width 16\n#define north_west_arrow_height 16\nextern const unsigned char north_west_arrow[] PROGMEM;\n\n#define north_east_arrow_width 16\n#define north_east_arrow_height 16\nextern const unsigned char north_east_arrow[] PROGMEM;\n\n#define downwards_arrow_width 16\n#define downwards_arrow_height 16\nextern const unsigned char downwards_arrow[] PROGMEM;\n\n#define leftwards_arrow_width 16\n#define leftwards_arrow_height 16\nextern const unsigned char leftwards_arrow[] PROGMEM;\n\n#define upwards_arrow_width 16\n#define upwards_arrow_height 16\nextern const unsigned char upwards_arrow[] PROGMEM;\n\n#define rightwards_arrow_width 16\n#define rightwards_arrow_height 16\nextern const unsigned char rightwards_arrow[] PROGMEM;\n\n#define strong_width 16\n#define strong_height 16\nextern const unsigned char strong[] PROGMEM;\n\n#define check_mark_width 16\n#define check_mark_height 16\nextern const unsigned char check_mark[] PROGMEM;\n\n#define house_width 16\n#define house_height 16\nextern const unsigned char house[] PROGMEM;\n\n#define shrug_width 16\n#define shrug_height 16\nextern const unsigned char shrug[] PROGMEM;\n\n#define eyes_width 16\n#define eyes_height 16\nextern const unsigned char eyes[] PROGMEM;\n\n#define eye_width 16\n#define eye_height 16\nextern const unsigned char eye[] PROGMEM;\n#endif // EXCLUDE_EMOJI\n\n} // namespace graphics\n"
  },
  {
    "path": "src/graphics/fonts/EinkDisplayFonts.cpp",
    "content": "#ifdef USE_EINK\n\n#include \"EinkDisplayFonts.h\"\n\n// Created by https://oleddisplay.squix.ch/ Consider a donation\n// In case of problems make sure that you are using the font file with the correct version!\nconst uint8_t Monospaced_plain_30[] PROGMEM = {\n    0x12, // Width: 18\n    0x24, // Height: 36\n    0x20, // First Char: 32\n    0xE0, // Numbers of Chars: 224\n\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x12, // 32:65535\n    0x00, 0x00, 0x36, 0x12, // 33:0\n    0x00, 0x36, 0x3E, 0x12, // 34:54\n    0x00, 0x74, 0x57, 0x12, // 35:116\n    0x00, 0xCB, 0x54, 0x12, // 36:203\n    0x01, 0x1F, 0x54, 0x12, // 37:287\n    0x01, 0x73, 0x59, 0x12, // 38:371\n    0x01, 0xCC, 0x2F, 0x12, // 39:460\n    0x01, 0xFB, 0x40, 0x12, // 40:507\n    0x02, 0x3B, 0x3A, 0x12, // 41:571\n    0x02, 0x75, 0x4D, 0x12, // 42:629\n    0x02, 0xC2, 0x4E, 0x12, // 43:706\n    0x03, 0x10, 0x36, 0x12, // 44:784\n    0x03, 0x46, 0x3F, 0x12, // 45:838\n    0x03, 0x85, 0x36, 0x12, // 46:901\n    0x03, 0xBB, 0x51, 0x12, // 47:955\n    0x04, 0x0C, 0x4E, 0x12, // 48:1036\n    0x04, 0x5A, 0x54, 0x12, // 49:1114\n    0x04, 0xAE, 0x4F, 0x12, // 50:1198\n    0x04, 0xFD, 0x4E, 0x12, // 51:1277\n    0x05, 0x4B, 0x53, 0x12, // 52:1355\n    0x05, 0x9E, 0x4E, 0x12, // 53:1438\n    0x05, 0xEC, 0x4E, 0x12, // 54:1516\n    0x06, 0x3A, 0x4D, 0x12, // 55:1594\n    0x06, 0x87, 0x4F, 0x12, // 56:1671\n    0x06, 0xD6, 0x4E, 0x12, // 57:1750\n    0x07, 0x24, 0x36, 0x12, // 58:1828\n    0x07, 0x5A, 0x36, 0x12, // 59:1882\n    0x07, 0x90, 0x4F, 0x12, // 60:1936\n    0x07, 0xDF, 0x4E, 0x12, // 61:2015\n    0x08, 0x2D, 0x4E, 0x12, // 62:2093\n    0x08, 0x7B, 0x48, 0x12, // 63:2171\n    0x08, 0xC3, 0x59, 0x12, // 64:2243\n    0x09, 0x1C, 0x59, 0x12, // 65:2332\n    0x09, 0x75, 0x4F, 0x12, // 66:2421\n    0x09, 0xC4, 0x4F, 0x12, // 67:2500\n    0x0A, 0x13, 0x4E, 0x12, // 68:2579\n    0x0A, 0x61, 0x4F, 0x12, // 69:2657\n    0x0A, 0xB0, 0x4D, 0x12, // 70:2736\n    0x0A, 0xFD, 0x54, 0x12, // 71:2813\n    0x0B, 0x51, 0x4F, 0x12, // 72:2897\n    0x0B, 0xA0, 0x4F, 0x12, // 73:2976\n    0x0B, 0xEF, 0x44, 0x12, // 74:3055\n    0x0C, 0x33, 0x59, 0x12, // 75:3123\n    0x0C, 0x8C, 0x54, 0x12, // 76:3212\n    0x0C, 0xE0, 0x54, 0x12, // 77:3296\n    0x0D, 0x34, 0x4F, 0x12, // 78:3380\n    0x0D, 0x83, 0x53, 0x12, // 79:3459\n    0x0D, 0xD6, 0x52, 0x12, // 80:3542\n    0x0E, 0x28, 0x53, 0x12, // 81:3624\n    0x0E, 0x7B, 0x59, 0x12, // 82:3707\n    0x0E, 0xD4, 0x4F, 0x12, // 83:3796\n    0x0F, 0x23, 0x57, 0x12, // 84:3875\n    0x0F, 0x7A, 0x4E, 0x12, // 85:3962\n    0x0F, 0xC8, 0x51, 0x12, // 86:4040\n    0x10, 0x19, 0x57, 0x12, // 87:4121\n    0x10, 0x70, 0x59, 0x12, // 88:4208\n    0x10, 0xC9, 0x56, 0x12, // 89:4297\n    0x11, 0x1F, 0x54, 0x12, // 90:4383\n    0x11, 0x73, 0x45, 0x12, // 91:4467\n    0x11, 0xB8, 0x54, 0x12, // 92:4536\n    0x12, 0x0C, 0x3B, 0x12, // 93:4620\n    0x12, 0x47, 0x52, 0x12, // 94:4679\n    0x12, 0x99, 0x5A, 0x12, // 95:4761\n    0x12, 0xF3, 0x34, 0x12, // 96:4851\n    0x13, 0x27, 0x4F, 0x12, // 97:4903\n    0x13, 0x76, 0x53, 0x12, // 98:4982\n    0x13, 0xC9, 0x4F, 0x12, // 99:5065\n    0x14, 0x18, 0x4F, 0x12, // 100:5144\n    0x14, 0x67, 0x53, 0x12, // 101:5223\n    0x14, 0xBA, 0x4D, 0x12, // 102:5306\n    0x15, 0x07, 0x4F, 0x12, // 103:5383\n    0x15, 0x56, 0x4F, 0x12, // 104:5462\n    0x15, 0xA5, 0x4F, 0x12, // 105:5541\n    0x15, 0xF4, 0x3B, 0x12, // 106:5620\n    0x16, 0x2F, 0x54, 0x12, // 107:5679\n    0x16, 0x83, 0x4F, 0x12, // 108:5763\n    0x16, 0xD2, 0x54, 0x12, // 109:5842\n    0x17, 0x26, 0x4F, 0x12, // 110:5926\n    0x17, 0x75, 0x4E, 0x12, // 111:6005\n    0x17, 0xC3, 0x53, 0x12, // 112:6083\n    0x18, 0x16, 0x50, 0x12, // 113:6166\n    0x18, 0x66, 0x52, 0x12, // 114:6246\n    0x18, 0xB8, 0x4A, 0x12, // 115:6328\n    0x19, 0x02, 0x4A, 0x12, // 116:6402\n    0x19, 0x4C, 0x4F, 0x12, // 117:6476\n    0x19, 0x9B, 0x4D, 0x12, // 118:6555\n    0x19, 0xE8, 0x57, 0x12, // 119:6632\n    0x1A, 0x3F, 0x54, 0x12, // 120:6719\n    0x1A, 0x93, 0x52, 0x12, // 121:6803\n    0x1A, 0xE5, 0x4A, 0x12, // 122:6885\n    0x1B, 0x2F, 0x4B, 0x12, // 123:6959\n    0x1B, 0x7A, 0x32, 0x12, // 124:7034\n    0x1B, 0xAC, 0x4E, 0x12, // 125:7084\n    0x1B, 0xFA, 0x4E, 0x12, // 126:7162\n    0x1C, 0x48, 0x55, 0x12, // 127:7240\n    0x1C, 0x9D, 0x55, 0x12, // 128:7325\n    0x1C, 0xF2, 0x55, 0x12, // 129:7410\n    0x1D, 0x47, 0x55, 0x12, // 130:7495\n    0x1D, 0x9C, 0x55, 0x12, // 131:7580\n    0x1D, 0xF1, 0x55, 0x12, // 132:7665\n    0x1E, 0x46, 0x55, 0x12, // 133:7750\n    0x1E, 0x9B, 0x55, 0x12, // 134:7835\n    0x1E, 0xF0, 0x55, 0x12, // 135:7920\n    0x1F, 0x45, 0x55, 0x12, // 136:8005\n    0x1F, 0x9A, 0x55, 0x12, // 137:8090\n    0x1F, 0xEF, 0x55, 0x12, // 138:8175\n    0x20, 0x44, 0x55, 0x12, // 139:8260\n    0x20, 0x99, 0x55, 0x12, // 140:8345\n    0x20, 0xEE, 0x55, 0x12, // 141:8430\n    0x21, 0x43, 0x55, 0x12, // 142:8515\n    0x21, 0x98, 0x55, 0x12, // 143:8600\n    0x21, 0xED, 0x55, 0x12, // 144:8685\n    0x22, 0x42, 0x55, 0x12, // 145:8770\n    0x22, 0x97, 0x55, 0x12, // 146:8855\n    0x22, 0xEC, 0x55, 0x12, // 147:8940\n    0x23, 0x41, 0x55, 0x12, // 148:9025\n    0x23, 0x96, 0x55, 0x12, // 149:9110\n    0x23, 0xEB, 0x55, 0x12, // 150:9195\n    0x24, 0x40, 0x55, 0x12, // 151:9280\n    0x24, 0x95, 0x55, 0x12, // 152:9365\n    0x24, 0xEA, 0x55, 0x12, // 153:9450\n    0x25, 0x3F, 0x55, 0x12, // 154:9535\n    0x25, 0x94, 0x55, 0x12, // 155:9620\n    0x25, 0xE9, 0x55, 0x12, // 156:9705\n    0x26, 0x3E, 0x55, 0x12, // 157:9790\n    0x26, 0x93, 0x55, 0x12, // 158:9875\n    0x26, 0xE8, 0x55, 0x12, // 159:9960\n    0xFF, 0xFF, 0x00, 0x12, // 160:65535\n    0x27, 0x3D, 0x37, 0x12, // 161:10045\n    0x27, 0x74, 0x4A, 0x12, // 162:10100\n    0x27, 0xBE, 0x54, 0x12, // 163:10174\n    0x28, 0x12, 0x54, 0x12, // 164:10258\n    0x28, 0x66, 0x56, 0x12, // 165:10342\n    0x28, 0xBC, 0x32, 0x12, // 166:10428\n    0x28, 0xEE, 0x49, 0x12, // 167:10478\n    0x29, 0x37, 0x42, 0x12, // 168:10551\n    0x29, 0x79, 0x58, 0x12, // 169:10617\n    0x29, 0xD1, 0x49, 0x12, // 170:10705\n    0x2A, 0x1A, 0x4F, 0x12, // 171:10778\n    0x2A, 0x69, 0x4E, 0x12, // 172:10857\n    0x2A, 0xB7, 0x3F, 0x12, // 173:10935\n    0x2A, 0xF6, 0x58, 0x12, // 174:10998\n    0x2B, 0x4E, 0x43, 0x12, // 175:11086\n    0x2B, 0x91, 0x3E, 0x12, // 176:11153\n    0x2B, 0xCF, 0x4F, 0x12, // 177:11215\n    0x2C, 0x1E, 0x3F, 0x12, // 178:11294\n    0x2C, 0x5D, 0x43, 0x12, // 179:11357\n    0x2C, 0xA0, 0x42, 0x12, // 180:11424\n    0x2C, 0xE2, 0x59, 0x12, // 181:11490\n    0x2D, 0x3B, 0x4F, 0x12, // 182:11579\n    0x2D, 0x8A, 0x35, 0x12, // 183:11658\n    0x2D, 0xBF, 0x3C, 0x12, // 184:11711\n    0x2D, 0xFB, 0x3F, 0x12, // 185:11771\n    0x2E, 0x3A, 0x49, 0x12, // 186:11834\n    0x2E, 0x83, 0x53, 0x12, // 187:11907\n    0x2E, 0xD6, 0x54, 0x12, // 188:11990\n    0x2F, 0x2A, 0x4F, 0x12, // 189:12074\n    0x2F, 0x79, 0x54, 0x12, // 190:12153\n    0x2F, 0xCD, 0x4A, 0x12, // 191:12237\n    0x30, 0x17, 0x59, 0x12, // 192:12311\n    0x30, 0x70, 0x59, 0x12, // 193:12400\n    0x30, 0xC9, 0x59, 0x12, // 194:12489\n    0x31, 0x22, 0x59, 0x12, // 195:12578\n    0x31, 0x7B, 0x59, 0x12, // 196:12667\n    0x31, 0xD4, 0x59, 0x12, // 197:12756\n    0x32, 0x2D, 0x54, 0x12, // 198:12845\n    0x32, 0x81, 0x4F, 0x12, // 199:12929\n    0x32, 0xD0, 0x4F, 0x12, // 200:13008\n    0x33, 0x1F, 0x4F, 0x12, // 201:13087\n    0x33, 0x6E, 0x4F, 0x12, // 202:13166\n    0x33, 0xBD, 0x4F, 0x12, // 203:13245\n    0x34, 0x0C, 0x4F, 0x12, // 204:13324\n    0x34, 0x5B, 0x4F, 0x12, // 205:13403\n    0x34, 0xAA, 0x4F, 0x12, // 206:13482\n    0x34, 0xF9, 0x4F, 0x12, // 207:13561\n    0x35, 0x48, 0x4E, 0x12, // 208:13640\n    0x35, 0x96, 0x4F, 0x12, // 209:13718\n    0x35, 0xE5, 0x53, 0x12, // 210:13797\n    0x36, 0x38, 0x53, 0x12, // 211:13880\n    0x36, 0x8B, 0x53, 0x12, // 212:13963\n    0x36, 0xDE, 0x53, 0x12, // 213:14046\n    0x37, 0x31, 0x53, 0x12, // 214:14129\n    0x37, 0x84, 0x4F, 0x12, // 215:14212\n    0x37, 0xD3, 0x56, 0x12, // 216:14291\n    0x38, 0x29, 0x4E, 0x12, // 217:14377\n    0x38, 0x77, 0x4E, 0x12, // 218:14455\n    0x38, 0xC5, 0x4E, 0x12, // 219:14533\n    0x39, 0x13, 0x4E, 0x12, // 220:14611\n    0x39, 0x61, 0x56, 0x12, // 221:14689\n    0x39, 0xB7, 0x53, 0x12, // 222:14775\n    0x3A, 0x0A, 0x54, 0x12, // 223:14858\n    0x3A, 0x5E, 0x4F, 0x12, // 224:14942\n    0x3A, 0xAD, 0x4F, 0x12, // 225:15021\n    0x3A, 0xFC, 0x4F, 0x12, // 226:15100\n    0x3B, 0x4B, 0x4F, 0x12, // 227:15179\n    0x3B, 0x9A, 0x4F, 0x12, // 228:15258\n    0x3B, 0xE9, 0x4F, 0x12, // 229:15337\n    0x3C, 0x38, 0x59, 0x12, // 230:15416\n    0x3C, 0x91, 0x4F, 0x12, // 231:15505\n    0x3C, 0xE0, 0x53, 0x12, // 232:15584\n    0x3D, 0x33, 0x53, 0x12, // 233:15667\n    0x3D, 0x86, 0x53, 0x12, // 234:15750\n    0x3D, 0xD9, 0x53, 0x12, // 235:15833\n    0x3E, 0x2C, 0x4F, 0x12, // 236:15916\n    0x3E, 0x7B, 0x4F, 0x12, // 237:15995\n    0x3E, 0xCA, 0x4F, 0x12, // 238:16074\n    0x3F, 0x19, 0x4F, 0x12, // 239:16153\n    0x3F, 0x68, 0x4E, 0x12, // 240:16232\n    0x3F, 0xB6, 0x4F, 0x12, // 241:16310\n    0x40, 0x05, 0x4E, 0x12, // 242:16389\n    0x40, 0x53, 0x4E, 0x12, // 243:16467\n    0x40, 0xA1, 0x4E, 0x12, // 244:16545\n    0x40, 0xEF, 0x4E, 0x12, // 245:16623\n    0x41, 0x3D, 0x4E, 0x12, // 246:16701\n    0x41, 0x8B, 0x53, 0x12, // 247:16779\n    0x41, 0xDE, 0x52, 0x12, // 248:16862\n    0x42, 0x30, 0x4F, 0x12, // 249:16944\n    0x42, 0x7F, 0x4F, 0x12, // 250:17023\n    0x42, 0xCE, 0x4F, 0x12, // 251:17102\n    0x43, 0x1D, 0x4F, 0x12, // 252:17181\n    0x43, 0x6C, 0x52, 0x12, // 253:17260\n    0x43, 0xBE, 0x53, 0x12, // 254:17342\n    0x44, 0x11, 0x52, 0x12, // 255:17425\n\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF,\n    0x1F, 0x0F, 0x00, 0xC0, 0xFF, 0x1F, 0x0F, 0x00, 0xC0, 0xFF, 0x1F, 0x0F, // 33\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x3F, // 34\n    0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x38, 0x08, 0x00, 0x00, 0x70, 0xB8, 0x0F, 0x00, 0x00,\n    0x70, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x80, 0xFF, 0x38, 0x00, 0x00, 0xC0, 0x7F,\n    0x38, 0x08, 0x00, 0xC0, 0x70, 0xB8, 0x0F, 0x00, 0x00, 0x70, 0xFC, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0xFC, 0x3F,\n    0x00, 0x00, 0xC0, 0xFF, 0x38, 0x00, 0x00, 0xC0, 0x7F, 0x38, 0x00, 0x00, 0xC0, 0x70, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,\n    0x00, 0x00, 0x70, // 35\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x07, 0x00, 0x00,\n    0xF8, 0x03, 0x07, 0x00, 0x00, 0xFC, 0x03, 0x0E, 0x00, 0x00, 0x1E, 0x07, 0x0E, 0x00, 0x00, 0x0E, 0x06, 0x0E, 0x00, 0x00, 0x0E,\n    0x06, 0x0E, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0E, 0x0C, 0x0E, 0x00, 0x00, 0x0E, 0x0C,\n    0x0E, 0x00, 0x00, 0x0E, 0x1C, 0x0F, 0x00, 0x00, 0x1C, 0xF8, 0x07, 0x00, 0x00, 0x1C, 0xF8, 0x03, 0x00, 0x00, 0x00, 0xE0,\n    0x01, // 36\n    0x00, 0x1F, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x10, 0x00, 0x00, 0xC0, 0x71, 0x18, 0x00, 0x00, 0xC0, 0x60, 0x08, 0x00, 0x00, 0xC0,\n    0x60, 0x0C, 0x00, 0x00, 0xC0, 0x60, 0x04, 0x00, 0x00, 0xC0, 0x71, 0x06, 0x00, 0x00, 0x80, 0x3F, 0x02, 0x00, 0x00, 0x00, 0x1F,\n    0xE3, 0x03, 0x00, 0x00, 0x00, 0xF1, 0x07, 0x00, 0x00, 0x80, 0x39, 0x0E, 0x00, 0x00, 0x80, 0x18, 0x0C, 0x00, 0x00, 0xC0, 0x18,\n    0x0C, 0x00, 0x00, 0x40, 0x18, 0x0C, 0x00, 0x00, 0x60, 0x38, 0x0E, 0x00, 0x00, 0x20, 0xF0, 0x07, 0x00, 0x00, 0x00, 0xC0,\n    0x03, // 37\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00,\n    0x1F, 0x87, 0x07, 0x00, 0x80, 0xFF, 0x03, 0x0F, 0x00, 0x80, 0xFF, 0x01, 0x0F, 0x00, 0xC0, 0xE3, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x07, 0x0E, 0x00, 0xC0, 0x01, 0x1F, 0x0E, 0x00, 0xC0, 0x01, 0x3E, 0x0E, 0x00, 0xC0, 0x01, 0x7C, 0x07, 0x00, 0x80, 0x03, 0xF0,\n    0x07, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x7E, 0x0E,\n    0x00, 0x00, 0x00, 0x1E, 0x08, // 38\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F,\n    0x00, 0x00, 0x00, 0xC0, 0x3F, // 39\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0x00, 0xFE,\n    0xFF, 0x0F, 0x00, 0x80, 0x3F, 0x80, 0x3F, 0x00, 0xE0, 0x03, 0x00, 0xF8, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0x20, 0x00, 0x00,\n    0x80, // 40\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x80, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0xE0, 0x03, 0x00, 0xF8, 0x00, 0x80, 0x3F,\n    0x80, 0x3F, 0x00, 0x00, 0xFE, 0xFF, 0x0F, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0x7F, // 41\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x86, 0x01, 0x00, 0x00, 0x00,\n    0xCC, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xC0, 0xFF,\n    0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x00,\n    0x00, 0x00, 0x00, 0xCC, 0x00, 0x00, 0x00, 0x00, 0x86, 0x01, 0x00, 0x00, 0x00, 0x84, // 42\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xF8,\n    0xFF, 0x07, 0x00, 0x00, 0xF8, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C,\n    0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00,\n    0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x0F, // 44\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,\n    0x18, // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,\n    0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0F, // 46\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,\n    0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00,\n    0xFE, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x7E, 0x00,\n    0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x40, // 47\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0xC0, 0x03, 0x00, 0x0F, 0x00, 0xC0, 0x01, 0x06, 0x0E, 0x00, 0xC0, 0x01,\n    0x07, 0x0E, 0x00, 0xC0, 0x01, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x02, 0x0E, 0x00, 0xC0, 0x03, 0x00, 0x0F, 0x00, 0x80, 0x0F, 0xC0,\n    0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x3F, // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00, 0x0E, 0x00, 0xC0, 0x03, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,\n    0x0E, // 49\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00, 0x0F, 0x00, 0xC0,\n    0x01, 0x80, 0x0F, 0x00, 0xC0, 0x01, 0xC0, 0x0F, 0x00, 0xC0, 0x01, 0xE0, 0x0E, 0x00, 0xC0, 0x01, 0xF0, 0x0E, 0x00, 0xC0, 0x01,\n    0x78, 0x0E, 0x00, 0xC0, 0x01, 0x3C, 0x0E, 0x00, 0xC0, 0x01, 0x1E, 0x0E, 0x00, 0xC0, 0x03, 0x0F, 0x0E, 0x00, 0x80, 0x87, 0x0F,\n    0x0E, 0x00, 0x80, 0xFF, 0x07, 0x0E, 0x00, 0x00, 0xFF, 0x01, 0x0E, 0x00, 0x00, 0xFC, 0x00, 0x0E, // 50\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0x80,\n    0x03, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0xC1, 0x03, 0x0E, 0x00, 0x80, 0xC3, 0x06, 0x0F, 0x00, 0x80, 0xFF, 0x8E,\n    0x07, 0x00, 0x00, 0x7F, 0xFE, 0x07, 0x00, 0x00, 0x3E, 0xFC, 0x03, 0x00, 0x00, 0x00, 0xF0, // 51\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00,\n    0x00, 0x7F, 0x00, 0x00, 0x00, 0xC0, 0x77, 0x00, 0x00, 0x00, 0xE0, 0x71, 0x00, 0x00, 0x00, 0x78, 0x70, 0x00, 0x00, 0x00, 0x1E,\n    0x70, 0x00, 0x00, 0x00, 0x0F, 0x70, 0x00, 0x00, 0xC0, 0x03, 0x70, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF,\n    0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, // 52\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0x03, 0x07, 0x00, 0xC0,\n    0xFF, 0x01, 0x0E, 0x00, 0xC0, 0xFF, 0x01, 0x0E, 0x00, 0xC0, 0xC1, 0x01, 0x0E, 0x00, 0xC0, 0xC1, 0x01, 0x0E, 0x00, 0xC0, 0xC1,\n    0x01, 0x0E, 0x00, 0xC0, 0xC1, 0x01, 0x0E, 0x00, 0xC0, 0xC1, 0x03, 0x0E, 0x00, 0xC0, 0xC1, 0x03, 0x07, 0x00, 0xC0, 0x81, 0x87,\n    0x07, 0x00, 0xC0, 0x81, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0xFC, // 53\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x80, 0x1F, 0x87, 0x07, 0x00, 0x80, 0x87, 0x03, 0x0F, 0x00, 0xC0, 0x83, 0x01, 0x0E, 0x00, 0xC0, 0xC1,\n    0x01, 0x0E, 0x00, 0xC0, 0xC1, 0x01, 0x0E, 0x00, 0xC0, 0xC1, 0x01, 0x0E, 0x00, 0xC0, 0xC1, 0x03, 0x0F, 0x00, 0xC0, 0x81, 0x87,\n    0x07, 0x00, 0x80, 0x83, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, // 54\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0,\n    0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x08, 0x00, 0xC0, 0x01, 0x00, 0x0F, 0x00, 0xC0, 0x01, 0xE0, 0x0F, 0x00, 0xC0, 0x01,\n    0xF8, 0x07, 0x00, 0xC0, 0x01, 0xFF, 0x01, 0x00, 0xC0, 0xE1, 0x3F, 0x00, 0x00, 0xC0, 0xF9, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x01,\n    0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x01, // 55\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x3E, 0xFC, 0x03, 0x00, 0x00,\n    0x7F, 0xFE, 0x07, 0x00, 0x80, 0xFF, 0x8E, 0x07, 0x00, 0xC0, 0xC3, 0x06, 0x0F, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0xC3, 0x06, 0x0F, 0x00, 0x80, 0xFF, 0x8E,\n    0x07, 0x00, 0x00, 0x7F, 0xFE, 0x07, 0x00, 0x00, 0x3E, 0xFC, 0x03, 0x00, 0x00, 0x00, 0xF8, 0x01, // 56\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x80,\n    0xFF, 0x07, 0x07, 0x00, 0x80, 0x87, 0x07, 0x0E, 0x00, 0xC0, 0x03, 0x0F, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x0E, 0x00, 0xC0, 0x01,\n    0x0E, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x0E, 0x00, 0xC0, 0x01, 0x0E, 0x0F, 0x00, 0xC0, 0x03, 0x87, 0x07, 0x00, 0x80, 0x87, 0xE1,\n    0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0x00, 0xF0, 0x3F, // 57\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0xF0,\n    0x00, 0x0F, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0xF0, 0x00, 0x0F, // 58\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0xF0, 0x00, 0xFF, 0x01, 0x00, 0xF0,\n    0x00, 0xFF, 0x00, 0x00, 0xF0, 0x00, 0x3F, 0x00, 0x00, 0xF0, 0x00, 0x0F, // 59\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00,\n    0x00, 0x1B, 0x00, 0x00, 0x00, 0x80, 0x3B, 0x00, 0x00, 0x00, 0x80, 0x33, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0xC0,\n    0x71, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x70, 0xC0,\n    0x01, 0x00, 0x00, 0x70, 0xC0, 0x01, 0x00, 0x00, 0x30, 0x80, 0x01, 0x00, 0x00, 0x38, 0x80, 0x03, // 60\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00,\n    0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80,\n    0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31,\n    0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, // 61\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x80, 0x03, 0x00, 0x00, 0x30, 0x80, 0x01, 0x00, 0x00, 0x70, 0xC0, 0x01, 0x00, 0x00,\n    0x70, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x00, 0xC0,\n    0x71, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x80, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x1B,\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 62\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x3E, 0x0F, 0x00, 0xC0, 0x01,\n    0x3F, 0x0F, 0x00, 0xC0, 0xC1, 0x3F, 0x0F, 0x00, 0xC0, 0xC1, 0x03, 0x00, 0x00, 0xC0, 0xF3, 0x01, 0x00, 0x00, 0x80, 0xFF, 0x00,\n    0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x1E, // 63\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xF0, 0x00, 0x1F, 0x00, 0x00,\n    0x38, 0x00, 0x38, 0x00, 0x00, 0x0C, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x7C, 0xE0, 0x00, 0x00, 0x06, 0xFF, 0xC1, 0x00, 0x00, 0x83,\n    0x83, 0xC3, 0x00, 0x00, 0x83, 0x01, 0x87, 0x01, 0x00, 0xC3, 0x00, 0x86, 0x01, 0x00, 0xC3, 0x00, 0x86, 0x01, 0x00, 0xC3, 0x00,\n    0x86, 0x01, 0x00, 0xC7, 0x00, 0x86, 0x01, 0x00, 0x86, 0x01, 0xC3, 0x01, 0x00, 0x9E, 0x83, 0xC3, 0x01, 0x00, 0xFC, 0xFF, 0x07,\n    0x00, 0x00, 0xF0, 0xFF, 0x07, // 64\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x80, 0xFF, 0x71, 0x00, 0x00, 0xC0, 0x3F,\n    0x70, 0x00, 0x00, 0xC0, 0x03, 0x70, 0x00, 0x00, 0xC0, 0x3F, 0x70, 0x00, 0x00, 0x80, 0xFF, 0x71, 0x00, 0x00, 0x00, 0xFC, 0x7F,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x00, 0x00, 0x0C, // 65\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0xC3, 0x07, 0x0F, 0x00, 0x80, 0xFF, 0x0E,\n    0x07, 0x00, 0x00, 0x7F, 0xFE, 0x07, 0x00, 0x00, 0x3E, 0xFC, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x01, // 66\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00,\n    0xFE, 0xFF, 0x01, 0x00, 0x00, 0x1F, 0xE0, 0x03, 0x00, 0x80, 0x07, 0x80, 0x07, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00,\n    0x0E, 0x00, 0xC0, 0x03, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0x00, 0x07, 0x80, 0x03, // 67\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0x80, 0x07, 0x80, 0x07, 0x00, 0x00, 0x1F, 0xE0,\n    0x03, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0xF0, 0x3F, // 68\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03,\n    0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 69\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xC0, 0x81,\n    0x03, 0x00, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xC0, 0x81, 0x03,\n    0x00, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xC0, 0x01, // 70\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00,\n    0xFE, 0xFF, 0x01, 0x00, 0x00, 0x1F, 0xE0, 0x03, 0x00, 0x80, 0x07, 0x80, 0x07, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x07,\n    0x0E, 0x00, 0xC0, 0x01, 0x07, 0x0F, 0x00, 0x80, 0x03, 0xFF, 0x07, 0x00, 0x00, 0x07, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xFF,\n    0x03, // 71\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03,\n    0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, // 72\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0,\n    0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0xFF,\n    0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00,\n    0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 73\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,\n    0x00, 0x00, 0x07, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0xFF,\n    0x03, 0x00, 0xC0, 0xFF, 0xFF, // 74\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0xF0,\n    0x07, 0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x00, 0x3C, 0x3E, 0x00, 0x00, 0x00, 0x1E, 0xFC, 0x00, 0x00, 0x00, 0x0F, 0xF0,\n    0x01, 0x00, 0x80, 0x03, 0xE0, 0x07, 0x00, 0xC0, 0x01, 0x80, 0x0F, 0x00, 0xC0, 0x00, 0x00, 0x0F, 0x00, 0x40, 0x00, 0x00, 0x0C,\n    0x00, 0x00, 0x00, 0x00, 0x08, // 75\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,\n    0x0E, // 76\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0x03, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00,\n    0x0F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00,\n    0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF,\n    0x0F, // 77\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xE0,\n    0x07, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x80,\n    0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, // 78\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00,\n    0x07, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x3F, // 79\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01,\n    0x07, 0x00, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x83, 0x07,\n    0x00, 0x00, 0x80, 0xC7, 0x03, 0x00, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x7C, // 80\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x3E, 0x00, 0x80, 0x03, 0x00,\n    0x7F, 0x00, 0x80, 0x0F, 0xC0, 0xF7, 0x00, 0x00, 0xFF, 0xFF, 0x63, 0x00, 0x00, 0xFE, 0xFF, 0x41, 0x00, 0x00, 0xF0, 0x3F, // 81\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01,\n    0x07, 0x00, 0x00, 0xC0, 0x01, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x0F, 0x00, 0x00, 0xC0, 0x83, 0x1F, 0x00, 0x00, 0x80, 0xC7, 0x7D,\n    0x00, 0x00, 0x80, 0xFF, 0xF9, 0x01, 0x00, 0x00, 0xFF, 0xF0, 0x07, 0x00, 0x00, 0x7C, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E,\n    0x00, 0x00, 0x00, 0x00, 0x08, // 82\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x07, 0x00, 0x00, 0xFF, 0x00, 0x07, 0x00, 0x80,\n    0xFF, 0x01, 0x0E, 0x00, 0x80, 0xC7, 0x01, 0x0E, 0x00, 0xC0, 0xC3, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x03, 0x0E, 0x00, 0xC0, 0x81, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x8F,\n    0x07, 0x00, 0x80, 0x03, 0xFE, 0x07, 0x00, 0x80, 0x03, 0xFC, 0x03, 0x00, 0x00, 0x00, 0xF8, 0x01, // 83\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0,\n    0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0xFF,\n    0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00,\n    0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00,\n    0x00, 0xC0, 0x01, // 84\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0,\n    0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x80,\n    0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, // 85\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0x80,\n    0xFF, 0x03, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x00,\n    0xE0, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0x3F,\n    0x00, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xC0, // 86\n    0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xF0,\n    0x01, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x00, 0xE0,\n    0x0F, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00,\n    0x00, 0xC0, 0x01, // 87\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x08, 0x00, 0xC0, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x03, 0x00, 0x0F, 0x00, 0xC0,\n    0x07, 0xC0, 0x0F, 0x00, 0x80, 0x1F, 0xE0, 0x03, 0x00, 0x00, 0x3E, 0xF8, 0x01, 0x00, 0x00, 0x7C, 0x7E, 0x00, 0x00, 0x00, 0xF0,\n    0x1F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x7C, 0x7C,\n    0x00, 0x00, 0x00, 0x3E, 0xF8, 0x01, 0x00, 0x80, 0x0F, 0xE0, 0x03, 0x00, 0xC0, 0x07, 0xC0, 0x0F, 0x00, 0xC0, 0x03, 0x00, 0x0F,\n    0x00, 0xC0, 0x00, 0x00, 0x0C, // 88\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xC0,\n    0x0F, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x00, 0xE0,\n    0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x00, 0xFC, 0x00,\n    0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00,\n    0x00, 0x40, // 89\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x80, 0x0F, 0x00, 0xC0,\n    0x01, 0xC0, 0x0F, 0x00, 0xC0, 0x01, 0xF0, 0x0F, 0x00, 0xC0, 0x01, 0xF8, 0x0E, 0x00, 0xC0, 0x01, 0x7E, 0x0E, 0x00, 0xC0, 0x01,\n    0x1F, 0x0E, 0x00, 0xC0, 0xC1, 0x0F, 0x0E, 0x00, 0xC0, 0xE1, 0x03, 0x0E, 0x00, 0xC0, 0xF9, 0x01, 0x0E, 0x00, 0xC0, 0x7D, 0x00,\n    0x0E, 0x00, 0xC0, 0x3F, 0x00, 0x0E, 0x00, 0xC0, 0x0F, 0x00, 0x0E, 0x00, 0xC0, 0x07, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00,\n    0x0E, // 90\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF,\n    0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00,\n    0xE0, 0x00, 0xE0, 0x00, 0x00, 0xE0, // 91\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0,\n    0x07, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x00, 0xE0,\n    0x0F, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xC0,\n    0x0F, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,\n    0x40, // 92\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0xE0, 0x00, 0x00, 0xE0, 0x00, 0xE0, 0x00,\n    0x00, 0xE0, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, // 93\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00,\n    0x1C, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x01,\n    0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00,\n    0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, // 94\n    0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,\n    0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,\n    0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,\n    0x07, 0x00, 0x00, 0x00, 0x00, 0x07, // 95\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\n    0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x03,\n    0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x02, // 96\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0xF1, 0x07, 0x00, 0x00,\n    0xE0, 0xF8, 0x07, 0x00, 0x00, 0xE0, 0x38, 0x0F, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70,\n    0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x06, 0x00, 0x00, 0x70, 0x1C, 0x07, 0x00, 0x00, 0xE0, 0x9C,\n    0x01, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 97\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0xE0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xF0, 0x00,\n    0x0F, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 98\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,\n    0x80, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0xE0, 0xC3, 0x07, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0xF0,\n    0x00, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00,\n    0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x81, 0x03, // 99\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00,\n    0xE0, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x81,\n    0x03, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x00,\n    0xC0, 0xFF, 0x03, 0x00, 0x00, 0xE0, 0x9D, 0x07, 0x00, 0x00, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70,\n    0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0xF0, 0x1C,\n    0x0E, 0x00, 0x00, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0xE0, 0x1F, 0x07, 0x00, 0x00, 0xC0, 0x9F, 0x03, 0x00, 0x00, 0x00, 0x1F, // 101\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,\n    0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF,\n    0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0x71, 0x00, 0x00, 0x00, 0xE0, 0x70, 0x00, 0x00, 0x00, 0xE0, 0x70, 0x00,\n    0x00, 0x00, 0xE0, 0x70, 0x00, 0x00, 0x00, 0xE0, 0x70, 0x00, 0x00, 0x00, 0xE0, 0x70, // 102\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00,\n    0xE0, 0xFF, 0xC7, 0x01, 0x00, 0xE0, 0x81, 0xC7, 0x01, 0x00, 0xF0, 0x00, 0x8F, 0x03, 0x00, 0x70, 0x00, 0x8E, 0x03, 0x00, 0x70,\n    0x00, 0x8E, 0x03, 0x00, 0x70, 0x00, 0x8E, 0x03, 0x00, 0x70, 0x00, 0x8E, 0x03, 0x00, 0xE0, 0x00, 0xC7, 0x03, 0x00, 0xC0, 0x81,\n    0xE3, 0x01, 0x00, 0xF0, 0xFF, 0xFF, 0x01, 0x00, 0xF0, 0xFF, 0xFF, 0x00, 0x00, 0xF0, 0xFF, 0x3F, // 103\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0xE0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 104\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00,\n    0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0xE0, 0xF0,\n    0xFF, 0x0F, 0x00, 0xE0, 0xF0, 0xFF, 0x0F, 0x00, 0xE0, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 105\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00,\n    0x70, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x80, 0x03, 0x00, 0x70,\n    0x00, 0xC0, 0x03, 0xE0, 0xF0, 0xFF, 0xFF, 0x01, 0xE0, 0xF0, 0xFF, 0xFF, 0x00, 0xE0, 0xF0, 0xFF, 0x7F, // 106\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0xE0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00,\n    0x1F, 0x00, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0xC0, 0xFB, 0x00, 0x00, 0x00, 0xE0, 0xF3, 0x03, 0x00, 0x00, 0xF0, 0xC1,\n    0x07, 0x00, 0x00, 0xF0, 0x80, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x10, 0x00,\n    0x08, // 107\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0,\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x01, 0x00, 0xE0, 0xFF,\n    0xFF, 0x03, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 108\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00,\n    0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xF0,\n    0xFF, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00,\n    0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF,\n    0x0F, // 109\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00,\n    0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00,\n    0xE0, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0xE0, 0x81,\n    0x07, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 111\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0x00,\n    0xF0, 0xFF, 0xFF, 0x03, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xF0, 0x00,\n    0x0F, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 112\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00,\n    0xE0, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x81,\n    0x03, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0x00, 0xF0, 0xFF, 0xFF, 0x03, // 113\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00,\n    0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xE0, // 114\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x83, 0x03, 0x00, 0x00,\n    0xE0, 0x07, 0x07, 0x00, 0x00, 0xE0, 0x0F, 0x07, 0x00, 0x00, 0xF0, 0x0E, 0x0E, 0x00, 0x00, 0x70, 0x0E, 0x0E, 0x00, 0x00, 0x70,\n    0x0E, 0x0E, 0x00, 0x00, 0x70, 0x1E, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0F, 0x00, 0x00, 0x70, 0xFC,\n    0x07, 0x00, 0x00, 0xE0, 0xF8, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x01, // 115\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,\n    0x70, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x03, 0x00, 0x80, 0xFF, 0xFF, 0x07, 0x00, 0x80, 0xFF,\n    0xFF, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00,\n    0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, // 116\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x00,\n    0xF0, 0xFF, 0x07, 0x00, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, // 117\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x00,\n    0xE0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00,\n    0x00, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xE0, 0x3F,\n    0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, // 118\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0x00,\n    0x00, 0xFC, 0x0F, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x00,\n    0x1E, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xC0,\n    0x0F, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00,\n    0x00, 0x00, 0x30, // 119\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x00,\n    0x70, 0x00, 0x0F, 0x00, 0x00, 0xF0, 0xC1, 0x07, 0x00, 0x00, 0xE0, 0xE3, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0x00,\n    0x7F, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0xE0, 0xE3, 0x03, 0x00, 0x00, 0xF0, 0xC1,\n    0x07, 0x00, 0x00, 0x70, 0x00, 0x0F, 0x00, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x00, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,\n    0x08, // 120\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x80, 0x03, 0x00,\n    0xF0, 0x03, 0x80, 0x03, 0x00, 0xE0, 0x1F, 0x80, 0x03, 0x00, 0x80, 0x7F, 0xC0, 0x03, 0x00, 0x00, 0xFC, 0xF3, 0x01, 0x00, 0x00,\n    0xF0, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x80, 0x7F,\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, // 121\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00,\n    0x70, 0x00, 0x0F, 0x00, 0x00, 0x70, 0xC0, 0x0F, 0x00, 0x00, 0x70, 0xE0, 0x0F, 0x00, 0x00, 0x70, 0xF8, 0x0F, 0x00, 0x00, 0x70,\n    0x7C, 0x0E, 0x00, 0x00, 0x70, 0x3F, 0x0E, 0x00, 0x00, 0xF0, 0x0F, 0x0E, 0x00, 0x00, 0xF0, 0x07, 0x0E, 0x00, 0x00, 0xF0, 0x03,\n    0x0E, 0x00, 0x00, 0xF0, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, // 122\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0xFF,\n    0xFB, 0x7F, 0x00, 0xC0, 0xFF, 0xFB, 0xFF, 0x00, 0xE0, 0xFF, 0xF1, 0xFF, 0x01, 0xE0, 0x01, 0x00, 0xE0, 0x01, 0xE0, 0x00, 0x00,\n    0xC0, 0x01, 0xE0, 0x00, 0x00, 0xC0, 0x01, 0xE0, 0x00, 0x00, 0xC0, 0x01, // 123\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF,\n    0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0xFF, 0x07, // 124\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,\n    0x00, 0x00, 0xC0, 0x01, 0xE0, 0x00, 0x00, 0xC0, 0x01, 0xE0, 0x00, 0x00, 0xC0, 0x01, 0xE0, 0x01, 0x00, 0xE0, 0x01, 0xE0, 0xFF,\n    0xF1, 0xFF, 0x00, 0xC0, 0xFF, 0xFB, 0xFF, 0x00, 0x80, 0xFF, 0xFB, 0x7F, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x0E,\n    0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 125\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18,\n    0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0E, // 126\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 127\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 128\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 129\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 130\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 131\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 132\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 133\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 134\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 135\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 136\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 137\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 138\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 139\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 140\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 141\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 142\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 143\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 144\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 145\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 146\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 147\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 148\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 149\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 150\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 151\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 152\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 153\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 154\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 155\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 156\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 157\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 158\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80,\n    0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01,\n    0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00,\n    0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0x01, 0x00, 0x80, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF,\n    0x01, // 159\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,\n    0xF8, 0xFF, 0x03, 0x00, 0xF0, 0xF8, 0xFF, 0x03, 0x00, 0xF0, 0xF8, 0xFF, 0x03, // 161\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00,\n    0x80, 0xFF, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00,\n    0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xE0, 0x00, 0x07, // 162\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0E, 0x00, 0x00,\n    0x00, 0x07, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x0E, 0x00, 0x00, 0xFC, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0x80, 0xFF,\n    0xFF, 0x0F, 0x00, 0x80, 0x07, 0x07, 0x0E, 0x00, 0xC0, 0x03, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x07,\n    0x0E, 0x00, 0xC0, 0x01, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00,\n    0x0E, // 163\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00, 0x00,\n    0x70, 0x80, 0x03, 0x00, 0x00, 0xE0, 0xDE, 0x01, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x00, 0xC0,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x80, 0x61,\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0xE0, 0xDE, 0x01, 0x00, 0x00, 0x70, 0x80, 0x03, 0x00, 0x00, 0x20, 0x00,\n    0x01, // 164\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC1, 0x18, 0x00, 0x00, 0xC0, 0xC3, 0x18, 0x00, 0x00, 0xC0,\n    0xCF, 0x18, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x00, 0x00, 0x00, 0xFC, 0x18, 0x00, 0x00, 0x00, 0xF8, 0x1B, 0x00, 0x00, 0x00, 0xE0,\n    0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xF8, 0x1B, 0x00, 0x00, 0x00, 0xFC, 0x18,\n    0x00, 0x00, 0x00, 0xFF, 0x18, 0x00, 0x00, 0xC0, 0xCF, 0x18, 0x00, 0x00, 0xC0, 0xC3, 0x18, 0x00, 0x00, 0xC0, 0xC1, 0x18, 0x00,\n    0x00, 0x40, // 165\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF,\n    0xC3, 0xFF, 0x01, 0x80, 0xFF, 0xC3, 0xFF, 0x01, // 166\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x8F, 0x1F, 0x38, 0x00, 0x80, 0xDF, 0x1F, 0x70, 0x00, 0x80, 0xFF, 0x38, 0x60, 0x00, 0xC0, 0x71, 0x30, 0x60, 0x00, 0xC0, 0xE0,\n    0x60, 0x60, 0x00, 0xC0, 0xC0, 0xE0, 0x60, 0x00, 0xC0, 0xC0, 0xC1, 0x71, 0x00, 0xC0, 0x80, 0xE3, 0x3F, 0x00, 0xC0, 0x81, 0xBF,\n    0x3F, 0x00, 0x80, 0x03, 0x3F, 0x0E, 0x00, 0x00, 0x00, 0x1E, // 167\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,\n    0x00, 0x00, 0xE0, // 168\n    0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00, 0x1C, 0xE0, 0x00, 0x00, 0x00,\n    0x8E, 0xCF, 0x01, 0x00, 0x00, 0xE6, 0x9F, 0x01, 0x00, 0x00, 0x63, 0x38, 0x03, 0x00, 0x00, 0x33, 0x30, 0x03, 0x00, 0x00, 0x33,\n    0x30, 0x03, 0x00, 0x00, 0x33, 0x30, 0x03, 0x00, 0x00, 0x33, 0x30, 0x03, 0x00, 0x00, 0x63, 0x18, 0x03, 0x00, 0x00, 0x06, 0x80,\n    0x01, 0x00, 0x00, 0x0E, 0xC0, 0x01, 0x00, 0x00, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00,\n    0x00, 0x00, 0xC0, 0x0F, // 169\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0xF0, 0x30, 0x00, 0x00, 0x80, 0xF9, 0x31, 0x00, 0x00, 0xC0, 0x98, 0x33, 0x00, 0x00, 0xC0, 0x0C, 0x33, 0x00, 0x00, 0xC0, 0x0C,\n    0x33, 0x00, 0x00, 0xC0, 0x0C, 0x33, 0x00, 0x00, 0xC0, 0x0C, 0x33, 0x00, 0x00, 0xC0, 0x8C, 0x31, 0x00, 0x00, 0x80, 0xCD, 0x30,\n    0x00, 0x00, 0x80, 0xFF, 0x33, 0x00, 0x00, 0x00, 0xFF, 0x33, // 170\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,\n    0x00, 0x1F, 0x00, 0x00, 0x00, 0x80, 0x3B, 0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x70,\n    0xC0, 0x01, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x80, 0x3B,\n    0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x70, 0xC0, 0x01, // 171\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00,\n    0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x80, 0x3F, // 172\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,\n    0x18, // 173\n    0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00, 0x1C, 0xE0, 0x00, 0x00, 0x00,\n    0x0E, 0xC0, 0x01, 0x00, 0x00, 0x06, 0x80, 0x01, 0x00, 0x00, 0xF3, 0x3F, 0x03, 0x00, 0x00, 0xF3, 0x3F, 0x03, 0x00, 0x00, 0x33,\n    0x07, 0x03, 0x00, 0x00, 0x33, 0x1F, 0x03, 0x00, 0x00, 0xF3, 0x3D, 0x03, 0x00, 0x00, 0xE3, 0x30, 0x03, 0x00, 0x00, 0x06, 0xA0,\n    0x01, 0x00, 0x00, 0x0E, 0xC0, 0x01, 0x00, 0x00, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00,\n    0x00, 0x00, 0xC0, 0x0F, // 174\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01,\n    0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00,\n    0x00, 0x00, 0xC0, 0x01, // 175\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x1F, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x60,\n    0x00, 0x00, 0x00, 0xC0, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x1F, // 176\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00,\n    0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0xF8,\n    0x7F, 0x0C, 0x00, 0x00, 0xF8, 0x7F, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03,\n    0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x0C, // 177\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0xC0, 0x80, 0x03, 0x00, 0x00, 0xC0, 0xC0, 0x03, 0x00, 0x00, 0xC0, 0xE0,\n    0x03, 0x00, 0x00, 0xC0, 0x70, 0x03, 0x00, 0x00, 0xC0, 0x39, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x03, 0x00, 0x00, 0x00, 0x07,\n    0x03, // 178\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x03, 0x00, 0x00, 0xC0, 0x0C, 0x03, 0x00, 0x00, 0xC0, 0x0C,\n    0x03, 0x00, 0x00, 0xC0, 0x0C, 0x03, 0x00, 0x00, 0xC0, 0x0C, 0x03, 0x00, 0x00, 0xC0, 0x9C, 0x03, 0x00, 0x00, 0x80, 0xFF, 0x01,\n    0x00, 0x00, 0x80, 0xF3, // 179\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03,\n    0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x00, 0x10, // 180\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0x00,\n    0xF0, 0xFF, 0xFF, 0x03, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x80,\n    0x07, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E,\n    0x00, 0x00, 0x00, 0x00, 0x0E, // 181\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x80,\n    0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0xFF,\n    0x03, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, 0xFF, 0x7F, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, 0xFF, 0x7F, // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x80,\n    0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F, // 183\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,\n    0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x01, // 184\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0xC0, 0x00, 0x03, 0x00, 0x00, 0xC0, 0xFF,\n    0x03, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,\n    0x03, // 185\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x7E, 0x30, 0x00, 0x00, 0x00, 0xFF, 0x30, 0x00, 0x00, 0x80, 0xC3, 0x31, 0x00, 0x00, 0xC0, 0x81, 0x33, 0x00, 0x00, 0xC0, 0x00,\n    0x33, 0x00, 0x00, 0xC0, 0x00, 0x33, 0x00, 0x00, 0xC0, 0x00, 0x33, 0x00, 0x00, 0xC0, 0x81, 0x33, 0x00, 0x00, 0x80, 0xC3, 0x31,\n    0x00, 0x00, 0x00, 0xFF, 0x30, 0x00, 0x00, 0x00, 0x7E, 0x30, // 186\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xC0, 0x01, 0x00, 0x00,\n    0xE0, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0x80, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x70, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x71,\n    0x00, 0x00, 0x00, 0x80, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 187\n    0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0xC0, 0x18, 0x00, 0x00, 0x60, 0xC0, 0x0C, 0x00, 0x00, 0x30, 0xC0, 0x0C, 0x00, 0x00, 0xF0,\n    0xFF, 0x0C, 0x00, 0x00, 0xF0, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x06, 0x18, 0x00, 0x00, 0xC0,\n    0x06, 0x1E, 0x00, 0x00, 0x00, 0x06, 0x1B, 0x00, 0x00, 0x00, 0x83, 0x19, 0x00, 0x00, 0x00, 0xE3, 0x18, 0x00, 0x00, 0x00, 0x33,\n    0x18, 0x00, 0x00, 0x00, 0xF3, 0xFF, 0x00, 0x00, 0x80, 0xF1, 0xFF, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00,\n    0x18, // 188\n    0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0xC0, 0x18, 0x00, 0x00, 0x60, 0xC0, 0x0C, 0x00, 0x00, 0x30, 0xC0, 0x0C, 0x00, 0x00, 0xF0,\n    0xFF, 0x0C, 0x00, 0x00, 0xF0, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0x00, 0xC0,\n    0x66, 0xC0, 0x00, 0x00, 0x00, 0x36, 0xE0, 0x00, 0x00, 0x00, 0x33, 0xF0, 0x00, 0x00, 0x00, 0x33, 0xF8, 0x00, 0x00, 0x00, 0x33,\n    0xDC, 0x00, 0x00, 0x00, 0x73, 0xCE, 0x00, 0x00, 0x80, 0xE1, 0xC7, 0x00, 0x00, 0x80, 0xC1, 0xC1, // 189\n    0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x60, 0x0C, 0x00, 0x00, 0x30, 0xC0, 0x0C, 0x00, 0x00, 0x30,\n    0xC3, 0x0C, 0x00, 0x00, 0x30, 0xC3, 0x0C, 0x00, 0x00, 0x30, 0xC3, 0x06, 0x00, 0x00, 0x30, 0xC3, 0x06, 0x18, 0x00, 0x30, 0xE7,\n    0x06, 0x1E, 0x00, 0xE0, 0x7F, 0x06, 0x1B, 0x00, 0xE0, 0x3C, 0x83, 0x19, 0x00, 0x00, 0x00, 0xE3, 0x18, 0x00, 0x00, 0x00, 0x33,\n    0x18, 0x00, 0x00, 0x00, 0xF3, 0xFF, 0x00, 0x00, 0x80, 0xF1, 0xFF, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00,\n    0x18, // 190\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00,\n    0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xCF, 0x03, 0x00, 0x00, 0xC0, 0x83, 0x03, 0x00, 0xF0,\n    0xFC, 0x81, 0x03, 0x00, 0xF0, 0xFC, 0x80, 0x03, 0x00, 0xF0, 0x7C, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00,\n    0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xE0, // 191\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x02, 0xFC, 0x7F, 0x00, 0x00, 0x86, 0xFF, 0x71, 0x00, 0x00, 0xCE, 0x3F,\n    0x70, 0x00, 0x00, 0xDC, 0x03, 0x70, 0x00, 0x00, 0xD8, 0x3F, 0x70, 0x00, 0x00, 0x90, 0xFF, 0x71, 0x00, 0x00, 0x00, 0xFC, 0x7F,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x00, 0x00, 0x0C, // 192\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x90, 0xFF, 0x71, 0x00, 0x00, 0xD8, 0x3F,\n    0x70, 0x00, 0x00, 0xDC, 0x03, 0x70, 0x00, 0x00, 0xCE, 0x3F, 0x70, 0x00, 0x00, 0x86, 0xFF, 0x71, 0x00, 0x00, 0x02, 0xFC, 0x7F,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x00, 0x00, 0x0C, // 193\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x10, 0xE0, 0xFF, 0x00, 0x00, 0x18, 0xFC, 0x7F, 0x00, 0x00, 0x9C, 0xFF, 0x71, 0x00, 0x00, 0xC6, 0x3F,\n    0x70, 0x00, 0x00, 0xC2, 0x03, 0x70, 0x00, 0x00, 0xC6, 0x3F, 0x70, 0x00, 0x00, 0x9C, 0xFF, 0x71, 0x00, 0x00, 0x18, 0xFC, 0x7F,\n    0x00, 0x00, 0x10, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x00, 0x00, 0x0C, // 194\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x0C, 0xE0, 0xFF, 0x00, 0x00, 0x0E, 0xFC, 0x7F, 0x00, 0x00, 0x86, 0xFF, 0x71, 0x00, 0x00, 0xC6, 0x3F,\n    0x70, 0x00, 0x00, 0xCE, 0x03, 0x70, 0x00, 0x00, 0xCC, 0x3F, 0x70, 0x00, 0x00, 0x8C, 0xFF, 0x71, 0x00, 0x00, 0x0E, 0xFC, 0x7F,\n    0x00, 0x00, 0x06, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x00, 0x00, 0x0C, // 195\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x0E, 0xE0, 0xFF, 0x00, 0x00, 0x0E, 0xFC, 0x7F, 0x00, 0x00, 0x8E, 0xFF, 0x71, 0x00, 0x00, 0xC0, 0x3F,\n    0x70, 0x00, 0x00, 0xC0, 0x03, 0x70, 0x00, 0x00, 0xC0, 0x3F, 0x70, 0x00, 0x00, 0x8E, 0xFF, 0x71, 0x00, 0x00, 0x0E, 0xFC, 0x7F,\n    0x00, 0x00, 0x0E, 0xE0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x00, 0x00, 0x0C, // 196\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x3C, 0xF0, 0x7F, 0x00, 0x00, 0x7E, 0xFE, 0x7F, 0x00, 0x00, 0xE7, 0xFF, 0x70, 0x00, 0x00, 0xC3, 0x1F,\n    0x70, 0x00, 0x00, 0xC3, 0x01, 0x70, 0x00, 0x00, 0xC3, 0x1F, 0x70, 0x00, 0x00, 0xE7, 0xFF, 0x70, 0x00, 0x00, 0x7E, 0xFE, 0x7F,\n    0x00, 0x00, 0x3C, 0xF0, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x00, 0x00, 0x0C, // 197\n    0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x03, 0x00, 0x00,\n    0xF8, 0x7F, 0x00, 0x00, 0x80, 0xFF, 0x77, 0x00, 0x00, 0xC0, 0x7F, 0x70, 0x00, 0x00, 0xC0, 0x07, 0x70, 0x00, 0x00, 0xC0, 0x01,\n    0x70, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x81, 0x03,\n    0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x01, 0x00,\n    0x0E, // 198\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00,\n    0xFE, 0xFF, 0x01, 0x00, 0x00, 0x1F, 0xE0, 0x03, 0x00, 0x80, 0x07, 0x80, 0x07, 0x00, 0x80, 0x03, 0x00, 0x07, 0x03, 0xC0, 0x01,\n    0x00, 0x0E, 0x03, 0xC0, 0x01, 0x00, 0x0E, 0x03, 0xC0, 0x01, 0x00, 0x3E, 0x03, 0xC0, 0x01, 0x00, 0xFE, 0x03, 0xC0, 0x01, 0x00,\n    0xCE, 0x01, 0xC0, 0x03, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0x00, 0x07, 0x80, 0x03, // 199\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC2, 0x81, 0x03, 0x0E, 0x00, 0xC6, 0x81, 0x03, 0x0E, 0x00, 0xCE, 0x81,\n    0x03, 0x0E, 0x00, 0xDC, 0x81, 0x03, 0x0E, 0x00, 0xD8, 0x81, 0x03, 0x0E, 0x00, 0xD0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03,\n    0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 200\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xD0, 0x81, 0x03, 0x0E, 0x00, 0xD8, 0x81,\n    0x03, 0x0E, 0x00, 0xDC, 0x81, 0x03, 0x0E, 0x00, 0xCE, 0x81, 0x03, 0x0E, 0x00, 0xC6, 0x81, 0x03, 0x0E, 0x00, 0xC2, 0x81, 0x03,\n    0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 201\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xD0, 0xFF, 0xFF, 0x0F, 0x00, 0xD8, 0x81, 0x03, 0x0E, 0x00, 0xDC, 0x81, 0x03, 0x0E, 0x00, 0xC6, 0x81,\n    0x03, 0x0E, 0x00, 0xC2, 0x81, 0x03, 0x0E, 0x00, 0xC6, 0x81, 0x03, 0x0E, 0x00, 0xDC, 0x81, 0x03, 0x0E, 0x00, 0xD8, 0x81, 0x03,\n    0x0E, 0x00, 0xD0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 202\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xCE, 0xFF, 0xFF, 0x0F, 0x00, 0xCE, 0x81, 0x03, 0x0E, 0x00, 0xCE, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xCE, 0x81, 0x03, 0x0E, 0x00, 0xCE, 0x81, 0x03,\n    0x0E, 0x00, 0xCE, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 203\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0,\n    0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC2, 0x01, 0x00, 0x0E, 0x00, 0xC6, 0x01, 0x00, 0x0E, 0x00, 0xCE, 0xFF,\n    0xFF, 0x0F, 0x00, 0xDC, 0xFF, 0xFF, 0x0F, 0x00, 0xD8, 0xFF, 0xFF, 0x0F, 0x00, 0xD0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00,\n    0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 204\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0,\n    0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xD0, 0x01, 0x00, 0x0E, 0x00, 0xD8, 0xFF,\n    0xFF, 0x0F, 0x00, 0xDC, 0xFF, 0xFF, 0x0F, 0x00, 0xCE, 0xFF, 0xFF, 0x0F, 0x00, 0xC6, 0x01, 0x00, 0x0E, 0x00, 0xC2, 0x01, 0x00,\n    0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 205\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0,\n    0x01, 0x00, 0x0E, 0x00, 0xD0, 0x01, 0x00, 0x0E, 0x00, 0xD8, 0x01, 0x00, 0x0E, 0x00, 0xDC, 0x01, 0x00, 0x0E, 0x00, 0xC6, 0xFF,\n    0xFF, 0x0F, 0x00, 0xC2, 0xFF, 0xFF, 0x0F, 0x00, 0xC6, 0xFF, 0xFF, 0x0F, 0x00, 0xDC, 0x01, 0x00, 0x0E, 0x00, 0xD8, 0x01, 0x00,\n    0x0E, 0x00, 0xD0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 206\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0,\n    0x01, 0x00, 0x0E, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0xFF,\n    0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xCE, 0x01, 0x00,\n    0x0E, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, // 207\n    0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0x81,\n    0x03, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0x80, 0x07, 0x80, 0x07, 0x00, 0x00, 0x1F, 0xE0,\n    0x03, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0xF0, 0x3F, // 208\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC6,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC7, 0x07, 0x00, 0x00, 0x00, 0x03, 0x3F, 0x00, 0x00, 0x00, 0x03, 0xFC, 0x00, 0x00, 0x00, 0x03, 0xE0,\n    0x07, 0x00, 0x00, 0x06, 0x80, 0x1F, 0x00, 0x00, 0x06, 0x00, 0xFC, 0x00, 0x00, 0x06, 0x00, 0xF0, 0x03, 0x00, 0x07, 0x00, 0x80,\n    0x0F, 0x00, 0xC3, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, // 209\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0x82, 0x03, 0x00, 0x07, 0x00, 0xC6, 0x01, 0x00, 0x0E, 0x00, 0xCE, 0x01,\n    0x00, 0x0E, 0x00, 0xDC, 0x01, 0x00, 0x0E, 0x00, 0xD8, 0x01, 0x00, 0x0E, 0x00, 0xD0, 0x01, 0x00, 0x0E, 0x00, 0x80, 0x03, 0x00,\n    0x07, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x3F, // 210\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0x80, 0x03, 0x00, 0x07, 0x00, 0xD0, 0x01, 0x00, 0x0E, 0x00, 0xD8, 0x01,\n    0x00, 0x0E, 0x00, 0xDC, 0x01, 0x00, 0x0E, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xC6, 0x01, 0x00, 0x0E, 0x00, 0x82, 0x03, 0x00,\n    0x07, 0x00, 0x80, 0x0F, 0xC0, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x3F, // 211\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x90, 0x0F, 0xC0, 0x07, 0x00, 0x98, 0x03, 0x00, 0x07, 0x00, 0xDC, 0x01, 0x00, 0x0E, 0x00, 0xC6, 0x01,\n    0x00, 0x0E, 0x00, 0xC2, 0x01, 0x00, 0x0E, 0x00, 0xC6, 0x01, 0x00, 0x0E, 0x00, 0xDC, 0x01, 0x00, 0x0E, 0x00, 0x98, 0x03, 0x00,\n    0x07, 0x00, 0x90, 0x0F, 0xC0, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x3F, // 212\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x8C, 0x0F, 0xC0, 0x07, 0x00, 0x8E, 0x03, 0x00, 0x07, 0x00, 0xC6, 0x01, 0x00, 0x0E, 0x00, 0xC6, 0x01,\n    0x00, 0x0E, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xCC, 0x01, 0x00, 0x0E, 0x00, 0xCC, 0x01, 0x00, 0x0E, 0x00, 0x8E, 0x03, 0x00,\n    0x07, 0x00, 0x86, 0x0F, 0xC0, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x3F, // 213\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x8E, 0x0F, 0xC0, 0x07, 0x00, 0x8E, 0x03, 0x00, 0x07, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01,\n    0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xCE, 0x01, 0x00, 0x0E, 0x00, 0x8E, 0x03, 0x00,\n    0x07, 0x00, 0x8E, 0x0F, 0xC0, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x3F, // 214\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00, 0x00, 0x70, 0x80, 0x03, 0x00, 0x00,\n    0xE0, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0xE1, 0x00, 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00,\n    0x1E, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0x00, 0xC0, 0xE1,\n    0x00, 0x00, 0x00, 0xE0, 0xC0, 0x01, 0x00, 0x00, 0x70, 0x80, 0x03, 0x00, 0x00, 0x20, 0x00, 0x01, // 215\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xF0, 0x3F, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00,\n    0xFF, 0xFF, 0x03, 0x00, 0x80, 0x0F, 0xF0, 0x07, 0x00, 0x80, 0x03, 0x38, 0x07, 0x00, 0xC0, 0x01, 0x1C, 0x0E, 0x00, 0xC0, 0x01,\n    0x06, 0x0E, 0x00, 0xC0, 0x81, 0x03, 0x0E, 0x00, 0xC0, 0xC1, 0x01, 0x0E, 0x00, 0xC0, 0xE1, 0x00, 0x0E, 0x00, 0x80, 0x73, 0x00,\n    0x07, 0x00, 0x80, 0x1F, 0xC0, 0x07, 0x00, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x01, 0x00, 0xC0, 0xF1, 0x3F, 0x00,\n    0x00, 0xC0, // 216\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0,\n    0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x02, 0x00, 0x00, 0x0F, 0x00, 0x06, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00,\n    0x00, 0x0E, 0x00, 0x1C, 0x00, 0x00, 0x0E, 0x00, 0x18, 0x00, 0x00, 0x0E, 0x00, 0x10, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x80,\n    0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, // 217\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0,\n    0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x00, 0x18, 0x00,\n    0x00, 0x0E, 0x00, 0x1C, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x06, 0x00, 0x00, 0x0F, 0x00, 0x02, 0x00, 0x80,\n    0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, // 218\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0,\n    0xFF, 0xFF, 0x07, 0x00, 0x10, 0x00, 0x80, 0x07, 0x00, 0x18, 0x00, 0x00, 0x0F, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x06, 0x00,\n    0x00, 0x0E, 0x00, 0x06, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x18, 0x00, 0x00, 0x0F, 0x00, 0x10, 0x00, 0x80,\n    0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, // 219\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0,\n    0xFF, 0xFF, 0x07, 0x00, 0x0E, 0x00, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x00, 0x0F, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x0F, 0x00, 0x0E, 0x00, 0x80,\n    0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, // 220\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xC0,\n    0x0F, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x10, 0xF8, 0x01, 0x00, 0x00, 0x18, 0xE0,\n    0xFF, 0x0F, 0x00, 0x1C, 0x80, 0xFF, 0x0F, 0x00, 0x0E, 0xE0, 0xFF, 0x0F, 0x00, 0x06, 0xF8, 0x01, 0x00, 0x00, 0x02, 0xFC, 0x00,\n    0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00,\n    0x00, 0x40, // 221\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xC0,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x1C,\n    0x70, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x00, 0x3C, 0x78,\n    0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0xE0, 0x0F, // 222\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0x80,\n    0xFF, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x07, 0x00, 0xE0, 0xE0,\n    0x01, 0x0E, 0x00, 0xE0, 0xF0, 0x03, 0x0E, 0x00, 0xE0, 0xF8, 0x07, 0x0E, 0x00, 0xE0, 0x19, 0x06, 0x0E, 0x00, 0xC0, 0x0F, 0x0E,\n    0x0E, 0x00, 0x80, 0x0F, 0x1C, 0x0F, 0x00, 0x00, 0x0E, 0xF8, 0x07, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x00, 0xE0,\n    0x01, // 223\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0xF1, 0x07, 0x00, 0x10,\n    0xE0, 0xF8, 0x07, 0x00, 0x30, 0xE0, 0x38, 0x0F, 0x00, 0x70, 0x70, 0x1C, 0x0E, 0x00, 0xE0, 0x70, 0x1C, 0x0E, 0x00, 0xC0, 0x73,\n    0x1C, 0x0E, 0x00, 0x00, 0x73, 0x1C, 0x0E, 0x00, 0x00, 0x72, 0x1C, 0x06, 0x00, 0x00, 0x70, 0x1C, 0x07, 0x00, 0x00, 0xE0, 0x9C,\n    0x01, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 224\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0xF1, 0x07, 0x00, 0x00,\n    0xE0, 0xF8, 0x07, 0x00, 0x00, 0xE0, 0x38, 0x0F, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x72, 0x1C, 0x0E, 0x00, 0x00, 0x73,\n    0x1C, 0x0E, 0x00, 0xC0, 0x73, 0x1C, 0x0E, 0x00, 0xE0, 0x70, 0x1C, 0x06, 0x00, 0x70, 0x70, 0x1C, 0x07, 0x00, 0x30, 0xE0, 0x9C,\n    0x01, 0x00, 0x10, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 225\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0xF1, 0x07, 0x00, 0x00,\n    0xE2, 0xF8, 0x07, 0x00, 0x80, 0xE3, 0x38, 0x0F, 0x00, 0xC0, 0x71, 0x1C, 0x0E, 0x00, 0xF0, 0x70, 0x1C, 0x0E, 0x00, 0x30, 0x70,\n    0x1C, 0x0E, 0x00, 0xF0, 0x70, 0x1C, 0x0E, 0x00, 0xC0, 0x71, 0x1C, 0x06, 0x00, 0x80, 0x73, 0x1C, 0x07, 0x00, 0x00, 0xE2, 0x9C,\n    0x01, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 226\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0xF1, 0x07, 0x00, 0xC0,\n    0xE1, 0xF8, 0x07, 0x00, 0xE0, 0xE1, 0x38, 0x0F, 0x00, 0x60, 0x70, 0x1C, 0x0E, 0x00, 0x60, 0x70, 0x1C, 0x0E, 0x00, 0xE0, 0x70,\n    0x1C, 0x0E, 0x00, 0xC0, 0x71, 0x1C, 0x0E, 0x00, 0x80, 0x71, 0x1C, 0x06, 0x00, 0x80, 0x71, 0x1C, 0x07, 0x00, 0xE0, 0xE1, 0x9C,\n    0x01, 0x00, 0x60, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 227\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0xF1, 0x07, 0x00, 0x00,\n    0xE0, 0xF8, 0x07, 0x00, 0xE0, 0xE0, 0x38, 0x0F, 0x00, 0xE0, 0x70, 0x1C, 0x0E, 0x00, 0xE0, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70,\n    0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x06, 0x00, 0xE0, 0x70, 0x1C, 0x07, 0x00, 0xE0, 0xE0, 0x9C,\n    0x01, 0x00, 0xE0, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 228\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0xF1, 0x07, 0x00, 0x00,\n    0xE0, 0xF8, 0x07, 0x00, 0xF0, 0xE0, 0x38, 0x0F, 0x00, 0xF8, 0x71, 0x1C, 0x0E, 0x00, 0x9C, 0x73, 0x1C, 0x0E, 0x00, 0x0C, 0x73,\n    0x1C, 0x0E, 0x00, 0x0C, 0x73, 0x1C, 0x0E, 0x00, 0x9C, 0x73, 0x1C, 0x06, 0x00, 0xF8, 0x71, 0x1C, 0x07, 0x00, 0xF0, 0xE0, 0x9C,\n    0x01, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 229\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xE0, 0xF8, 0x07, 0x00, 0x00, 0x70, 0xF8, 0x0F, 0x00, 0x00,\n    0x70, 0x3C, 0x0F, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0xF0, 0x1C, 0x0F, 0x00, 0x00, 0xE0,\n    0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xF0, 0x1C, 0x07, 0x00, 0x00, 0x70, 0x1C,\n    0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0xF0, 0x1C, 0x0E, 0x00, 0x00, 0xF0, 0x1F, 0x0E, 0x00, 0x00, 0xE0, 0x1F, 0x07,\n    0x00, 0x00, 0x80, 0x1F, 0x07, // 230\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,\n    0x80, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0xE0, 0xC3, 0x07, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0xF0,\n    0x00, 0x0F, 0x03, 0x00, 0x70, 0x00, 0x0E, 0x03, 0x00, 0x70, 0x00, 0x0E, 0x03, 0x00, 0x70, 0x00, 0x3E, 0x03, 0x00, 0x70, 0x00,\n    0xFE, 0x03, 0x00, 0x70, 0x00, 0xCE, 0x01, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x81, 0x03, // 231\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x10,\n    0xC0, 0xFF, 0x03, 0x00, 0x30, 0xE0, 0x9D, 0x07, 0x00, 0x70, 0xE0, 0x1C, 0x07, 0x00, 0xE0, 0x70, 0x1C, 0x0E, 0x00, 0xC0, 0x73,\n    0x1C, 0x0E, 0x00, 0x00, 0x73, 0x1C, 0x0E, 0x00, 0x00, 0x72, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0xF0, 0x1C,\n    0x0E, 0x00, 0x00, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0xE0, 0x1F, 0x07, 0x00, 0x00, 0xC0, 0x9F, 0x03, 0x00, 0x00, 0x00, 0x1F, // 232\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x00,\n    0xC0, 0xFF, 0x03, 0x00, 0x00, 0xE0, 0x9D, 0x07, 0x00, 0x00, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0x72, 0x1C, 0x0E, 0x00, 0x00, 0x73,\n    0x1C, 0x0E, 0x00, 0xC0, 0x73, 0x1C, 0x0E, 0x00, 0xE0, 0x70, 0x1C, 0x0E, 0x00, 0x70, 0x70, 0x1C, 0x0E, 0x00, 0x30, 0xF0, 0x1C,\n    0x0E, 0x00, 0x10, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0xE0, 0x1F, 0x07, 0x00, 0x00, 0xC0, 0x9F, 0x03, 0x00, 0x00, 0x00, 0x1F, // 233\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x00,\n    0xC2, 0xFF, 0x03, 0x00, 0x80, 0xE3, 0x9D, 0x07, 0x00, 0xC0, 0xE1, 0x1C, 0x07, 0x00, 0xF0, 0x70, 0x1C, 0x0E, 0x00, 0x30, 0x70,\n    0x1C, 0x0E, 0x00, 0xF0, 0x70, 0x1C, 0x0E, 0x00, 0xC0, 0x71, 0x1C, 0x0E, 0x00, 0x80, 0x73, 0x1C, 0x0E, 0x00, 0x00, 0xF2, 0x1C,\n    0x0E, 0x00, 0x00, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0xE0, 0x1F, 0x07, 0x00, 0x00, 0xC0, 0x9F, 0x03, 0x00, 0x00, 0x00, 0x1F, // 234\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x00,\n    0xC0, 0xFF, 0x03, 0x00, 0xE0, 0xE0, 0x9D, 0x07, 0x00, 0xE0, 0xE0, 0x1C, 0x07, 0x00, 0xE0, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70,\n    0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0xE0, 0x70, 0x1C, 0x0E, 0x00, 0xE0, 0xF0, 0x1C,\n    0x0E, 0x00, 0xE0, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0xE0, 0x1F, 0x07, 0x00, 0x00, 0xC0, 0x9F, 0x03, 0x00, 0x00, 0x00, 0x1F, // 235\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x10,\n    0x70, 0x00, 0x0E, 0x00, 0x30, 0x70, 0x00, 0x0E, 0x00, 0x70, 0x70, 0x00, 0x0E, 0x00, 0xE0, 0x70, 0x00, 0x0E, 0x00, 0xC0, 0xF3,\n    0xFF, 0x0F, 0x00, 0x00, 0xF3, 0xFF, 0x0F, 0x00, 0x00, 0xF2, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 236\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00,\n    0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x72, 0x00, 0x0E, 0x00, 0x00, 0xF3,\n    0xFF, 0x0F, 0x00, 0xC0, 0xF3, 0xFF, 0x0F, 0x00, 0xE0, 0xF0, 0xFF, 0x0F, 0x00, 0x70, 0x00, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x00,\n    0x0E, 0x00, 0x10, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 237\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00,\n    0x72, 0x00, 0x0E, 0x00, 0x80, 0x73, 0x00, 0x0E, 0x00, 0xC0, 0x71, 0x00, 0x0E, 0x00, 0xF0, 0x70, 0x00, 0x0E, 0x00, 0x30, 0xF0,\n    0xFF, 0x0F, 0x00, 0xF0, 0xF0, 0xFF, 0x0F, 0x00, 0xC0, 0xF1, 0xFF, 0x0F, 0x00, 0x80, 0x03, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 238\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00,\n    0x70, 0x00, 0x0E, 0x00, 0xE0, 0x70, 0x00, 0x0E, 0x00, 0xE0, 0x70, 0x00, 0x0E, 0x00, 0xE0, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xF0,\n    0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0xE0, 0x00, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0x00,\n    0x0E, 0x00, 0xE0, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, // 239\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x20,\n    0xE6, 0xFF, 0x07, 0x00, 0x60, 0xE2, 0x81, 0x07, 0x00, 0xE0, 0xF3, 0x00, 0x0F, 0x00, 0xE0, 0x73, 0x00, 0x0E, 0x00, 0xC0, 0x77,\n    0x00, 0x0E, 0x00, 0x80, 0x7F, 0x00, 0x0E, 0x00, 0x80, 0x7E, 0x00, 0x0E, 0x00, 0xC0, 0x7C, 0x00, 0x0F, 0x00, 0xC0, 0xF8, 0x81,\n    0x07, 0x00, 0x40, 0xF0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x7F, // 240\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0xC0,\n    0xF1, 0xFF, 0x0F, 0x00, 0xE0, 0xF1, 0xFF, 0x0F, 0x00, 0x60, 0xC0, 0x01, 0x00, 0x00, 0x60, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x60,\n    0x00, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x00, 0x80, 0x71, 0x00, 0x00, 0x00, 0x80, 0x71, 0x00, 0x00, 0x00, 0xE0, 0xF1, 0x00,\n    0x00, 0x00, 0x60, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x80, 0xFF, 0x0F, // 241\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x10,\n    0xE0, 0xFF, 0x07, 0x00, 0x30, 0xE0, 0x81, 0x07, 0x00, 0x70, 0xF0, 0x00, 0x0F, 0x00, 0xE0, 0x70, 0x00, 0x0E, 0x00, 0xC0, 0x73,\n    0x00, 0x0E, 0x00, 0x00, 0x73, 0x00, 0x0E, 0x00, 0x00, 0x72, 0x00, 0x0E, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0xE0, 0x81,\n    0x07, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 242\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00,\n    0xE0, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0x72, 0x00, 0x0E, 0x00, 0x00, 0x73,\n    0x00, 0x0E, 0x00, 0xC0, 0x73, 0x00, 0x0E, 0x00, 0xE0, 0x70, 0x00, 0x0E, 0x00, 0x70, 0xF0, 0x00, 0x0F, 0x00, 0x30, 0xE0, 0x81,\n    0x07, 0x00, 0x10, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 243\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00,\n    0xE0, 0xFF, 0x07, 0x00, 0x00, 0xE2, 0x81, 0x07, 0x00, 0x80, 0xF3, 0x00, 0x0F, 0x00, 0xE0, 0x71, 0x00, 0x0E, 0x00, 0x70, 0x70,\n    0x00, 0x0E, 0x00, 0x70, 0x70, 0x00, 0x0E, 0x00, 0xE0, 0x71, 0x00, 0x0E, 0x00, 0x80, 0xF3, 0x00, 0x0F, 0x00, 0x00, 0xE2, 0x81,\n    0x07, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 244\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0xC0,\n    0xE1, 0xFF, 0x07, 0x00, 0xE0, 0xE1, 0x81, 0x07, 0x00, 0x60, 0xF0, 0x00, 0x0F, 0x00, 0x60, 0x70, 0x00, 0x0E, 0x00, 0xE0, 0x70,\n    0x00, 0x0E, 0x00, 0xC0, 0x71, 0x00, 0x0E, 0x00, 0x80, 0x71, 0x00, 0x0E, 0x00, 0x80, 0xF1, 0x00, 0x0F, 0x00, 0xE0, 0xE1, 0x81,\n    0x07, 0x00, 0x60, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 245\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0xE0,\n    0xE0, 0xFF, 0x07, 0x00, 0xE0, 0xE0, 0x81, 0x07, 0x00, 0xE0, 0xF0, 0x00, 0x0F, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0xE0, 0xF0, 0x00, 0x0F, 0x00, 0xE0, 0xE0, 0x81,\n    0x07, 0x00, 0xE0, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 246\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xF0, 0xCC, 0x03, 0x00, 0x00, 0xF0,\n    0xCC, 0x03, 0x00, 0x00, 0xF0, 0xCC, 0x03, 0x00, 0x00, 0xF0, 0xCC, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C,\n    0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C, // 247\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x7F, 0x0E, 0x00, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0x00,\n    0xE0, 0xFF, 0x03, 0x00, 0x00, 0xE0, 0xC1, 0x07, 0x00, 0x00, 0xF0, 0xE0, 0x07, 0x00, 0x00, 0x70, 0x70, 0x0E, 0x00, 0x00, 0x70,\n    0x38, 0x0E, 0x00, 0x00, 0x70, 0x1C, 0x0E, 0x00, 0x00, 0x70, 0x0E, 0x0E, 0x00, 0x00, 0xE0, 0x07, 0x0F, 0x00, 0x00, 0xE0, 0x83,\n    0x07, 0x00, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0x00, 0x38, 0xFE, 0x00, 0x00, 0x00, 0x10, // 248\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x10,\n    0xF0, 0xFF, 0x07, 0x00, 0x30, 0xF0, 0xFF, 0x07, 0x00, 0x70, 0x00, 0x00, 0x0F, 0x00, 0xE0, 0x00, 0x00, 0x0E, 0x00, 0xC0, 0x03,\n    0x00, 0x0E, 0x00, 0x00, 0x03, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, // 249\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x00,\n    0xF0, 0xFF, 0x07, 0x00, 0x00, 0xF0, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x02, 0x00, 0x0E, 0x00, 0x00, 0x03,\n    0x00, 0x0E, 0x00, 0xC0, 0x03, 0x00, 0x0E, 0x00, 0xE0, 0x00, 0x00, 0x06, 0x00, 0x70, 0x00, 0x00, 0x07, 0x00, 0x30, 0x00, 0x80,\n    0x01, 0x00, 0x10, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, // 250\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x00,\n    0xF0, 0xFF, 0x07, 0x00, 0x00, 0xF2, 0xFF, 0x07, 0x00, 0x80, 0x03, 0x00, 0x0F, 0x00, 0xC0, 0x01, 0x00, 0x0E, 0x00, 0xF0, 0x00,\n    0x00, 0x0E, 0x00, 0x30, 0x00, 0x00, 0x0E, 0x00, 0xF0, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x01, 0x00, 0x07, 0x00, 0x80, 0x03, 0x80,\n    0x01, 0x00, 0x00, 0xF2, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, // 251\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0x00, 0x00,\n    0xF0, 0xFF, 0x07, 0x00, 0xE0, 0xF0, 0xFF, 0x07, 0x00, 0xE0, 0x00, 0x00, 0x0F, 0x00, 0xE0, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0xE0, 0x00, 0x00, 0x07, 0x00, 0xE0, 0x00, 0x80,\n    0x01, 0x00, 0xE0, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0x0F, // 252\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x80, 0x03, 0x00,\n    0xF0, 0x03, 0x80, 0x03, 0x00, 0xE0, 0x1F, 0x80, 0x03, 0x00, 0x80, 0x7F, 0xC0, 0x03, 0x00, 0x02, 0xFC, 0xF3, 0x01, 0x00, 0x03,\n    0xF0, 0xFF, 0x01, 0xC0, 0x03, 0xC0, 0x7F, 0x00, 0xE0, 0x00, 0xF0, 0x0F, 0x00, 0x70, 0x00, 0xFE, 0x03, 0x00, 0x30, 0x80, 0x7F,\n    0x00, 0x00, 0x10, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10, // 253\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x03, 0xE0,\n    0xFF, 0xFF, 0xFF, 0x03, 0xE0, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0x81, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x07, 0x00, 0x00, 0x70,\n    0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x0E, 0x00, 0x00, 0xF0, 0x00,\n    0x0F, 0x00, 0x00, 0xE0, 0x81, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, // 254\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x80, 0x03, 0x00,\n    0xF0, 0x03, 0x80, 0x03, 0xE0, 0xE0, 0x1F, 0x80, 0x03, 0xE0, 0x80, 0x7F, 0xC0, 0x03, 0xE0, 0x00, 0xFC, 0xF3, 0x01, 0x00, 0x00,\n    0xF0, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0xE0, 0x00, 0xFE, 0x03, 0x00, 0xE0, 0x80, 0x7F,\n    0x00, 0x00, 0xE0, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x10 // 255\n};\n\n#endif // USE_EINK\n"
  },
  {
    "path": "src/graphics/fonts/EinkDisplayFonts.h",
    "content": "#ifndef EINKDISPLAYFONTS_h\n#define EINKDISPLAYFONTS_h\n\n#ifdef USE_EINK\n\n#ifdef ARDUINO\n#include <Arduino.h>\n#elif __MBED__\n#define PROGMEM\n#endif\n\n/**\n * Monospaced Plain 30\n */\nextern const uint8_t Monospaced_plain_30[] PROGMEM;\n\n#endif // USE_EINK\n\n#endif\n"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsCS.cpp",
    "content": "#ifdef OLED_CS\n\n#include \"OLEDDisplayFontsCS.h\"\n\n// Font generated or edited with the glyphEditor\nconst uint8_t ArialMT_Plain_10_CS[] PROGMEM = {\n    0x0A, // Width: 10\n    0x0D, // Height: 13\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x03, // 32\n    0x00, 0x00, 0x04, 0x03, // 33\n    0x00, 0x04, 0x05, 0x04, // 34\n    0x00, 0x09, 0x09, 0x06, // 35\n    0x00, 0x12, 0x0A, 0x06, // 36\n    0x00, 0x1C, 0x10, 0x09, // 37\n    0x00, 0x2C, 0x0E, 0x08, // 38\n    0x00, 0x3A, 0x01, 0x02, // 39\n    0x00, 0x3B, 0x06, 0x04, // 40\n    0x00, 0x41, 0x06, 0x04, // 41\n    0x00, 0x47, 0x05, 0x04, // 42\n    0x00, 0x4C, 0x09, 0x06, // 43\n    0x00, 0x55, 0x04, 0x03, // 44\n    0x00, 0x59, 0x03, 0x03, // 45\n    0x00, 0x5C, 0x04, 0x03, // 46\n    0x00, 0x60, 0x05, 0x04, // 47\n    0x00, 0x65, 0x0A, 0x06, // 48\n    0x00, 0x6F, 0x08, 0x05, // 49\n    0x00, 0x77, 0x0A, 0x06, // 50\n    0x00, 0x81, 0x0A, 0x06, // 51\n    0x00, 0x8B, 0x0B, 0x07, // 52\n    0x00, 0x96, 0x0A, 0x06, // 53\n    0x00, 0xA0, 0x0A, 0x06, // 54\n    0x00, 0xAA, 0x09, 0x06, // 55\n    0x00, 0xB3, 0x0A, 0x06, // 56\n    0x00, 0xBD, 0x0A, 0x06, // 57\n    0x00, 0xC7, 0x04, 0x03, // 58\n    0x00, 0xCB, 0x04, 0x03, // 59\n    0x00, 0xCF, 0x0A, 0x06, // 60\n    0x00, 0xD9, 0x09, 0x06, // 61\n    0x00, 0xE2, 0x09, 0x06, // 62\n    0x00, 0xEB, 0x0B, 0x07, // 63\n    0x00, 0xF6, 0x14, 0x0B, // 64\n    0x01, 0x0A, 0x0E, 0x08, // 65\n    0x01, 0x18, 0x0C, 0x07, // 66\n    0x01, 0x24, 0x0C, 0x07, // 67\n    0x01, 0x30, 0x0B, 0x07, // 68\n    0x01, 0x3B, 0x0C, 0x07, // 69\n    0x01, 0x47, 0x09, 0x06, // 70\n    0x01, 0x50, 0x0D, 0x08, // 71\n    0x01, 0x5D, 0x0C, 0x07, // 72\n    0x01, 0x69, 0x04, 0x03, // 73\n    0x01, 0x6D, 0x08, 0x05, // 74\n    0x01, 0x75, 0x0E, 0x08, // 75\n    0x01, 0x83, 0x0C, 0x07, // 76\n    0x01, 0x8F, 0x10, 0x09, // 77\n    0x01, 0x9F, 0x0C, 0x07, // 78\n    0x01, 0xAB, 0x0E, 0x08, // 79\n    0x01, 0xB9, 0x0B, 0x07, // 80\n    0x01, 0xC4, 0x0E, 0x08, // 81\n    0x01, 0xD2, 0x0C, 0x07, // 82\n    0x01, 0xDE, 0x0C, 0x07, // 83\n    0x01, 0xEA, 0x0B, 0x07, // 84\n    0x01, 0xF5, 0x0C, 0x07, // 85\n    0x02, 0x01, 0x0D, 0x08, // 86\n    0x02, 0x0E, 0x11, 0x0A, // 87\n    0x02, 0x1F, 0x0E, 0x08, // 88\n    0x02, 0x2D, 0x0D, 0x08, // 89\n    0x02, 0x3A, 0x0C, 0x07, // 90\n    0x02, 0x46, 0x06, 0x04, // 91\n    0x02, 0x4C, 0x06, 0x04, // 92\n    0x02, 0x52, 0x04, 0x03, // 93\n    0x02, 0x56, 0x09, 0x06, // 94\n    0x02, 0x5F, 0x0C, 0x07, // 95\n    0x02, 0x6B, 0x03, 0x03, // 96\n    0x02, 0x6E, 0x0A, 0x06, // 97\n    0x02, 0x78, 0x0A, 0x06, // 98\n    0x02, 0x82, 0x0A, 0x06, // 99\n    0x02, 0x8C, 0x0A, 0x06, // 100\n    0x02, 0x96, 0x0A, 0x06, // 101\n    0x02, 0xA0, 0x05, 0x04, // 102\n    0x02, 0xA5, 0x0A, 0x06, // 103\n    0x02, 0xAF, 0x0A, 0x06, // 104\n    0x02, 0xB9, 0x04, 0x03, // 105\n    0x02, 0xBD, 0x04, 0x03, // 106\n    0x02, 0xC1, 0x08, 0x05, // 107\n    0x02, 0xC9, 0x04, 0x03, // 108\n    0x02, 0xCD, 0x10, 0x09, // 109\n    0x02, 0xDD, 0x0A, 0x06, // 110\n    0x02, 0xE7, 0x0A, 0x06, // 111\n    0x02, 0xF1, 0x0A, 0x06, // 112\n    0x02, 0xFB, 0x0A, 0x06, // 113\n    0x03, 0x05, 0x05, 0x04, // 114\n    0x03, 0x0A, 0x08, 0x05, // 115\n    0x03, 0x12, 0x06, 0x04, // 116\n    0x03, 0x18, 0x0A, 0x06, // 117\n    0x03, 0x22, 0x09, 0x06, // 118\n    0x03, 0x2B, 0x0E, 0x08, // 119\n    0x03, 0x39, 0x0A, 0x06, // 120\n    0x03, 0x43, 0x09, 0x06, // 121\n    0x03, 0x4C, 0x0A, 0x06, // 122\n    0x03, 0x56, 0x06, 0x04, // 123\n    0x03, 0x5C, 0x04, 0x03, // 124\n    0x03, 0x60, 0x05, 0x04, // 125\n    0x03, 0x65, 0x09, 0x06, // 126\n    0xFF, 0xFF, 0x00, 0x0A, // 127\n    0xFF, 0xFF, 0x00, 0x0A, // 128\n    0x03, 0x6E, 0x0C, 0x07, // 129\n    0x03, 0x7A, 0x0B, 0x07, // 130\n    0x03, 0x85, 0x0C, 0x07, // 131\n    0x03, 0x91, 0x0C, 0x07, // 132\n    0x03, 0x9D, 0x0C, 0x07, // 133\n    0x03, 0xA9, 0x0C, 0x07, // 134\n    0x03, 0xB5, 0x0B, 0x07, // 135\n    0x03, 0xC0, 0x0C, 0x07, // 136\n    0x03, 0xCC, 0x0C, 0x07, // 137\n    0x03, 0xD8, 0x0A, 0x06, // 138\n    0x03, 0xE2, 0x0D, 0x08, // 139\n    0x03, 0xEF, 0x0A, 0x06, // 140\n    0x03, 0xF9, 0x0A, 0x06, // 141\n    0x04, 0x03, 0x07, 0x05, // 142\n    0x04, 0x0A, 0x08, 0x05, // 143\n    0x04, 0x12, 0x07, 0x05, // 144\n    0x04, 0x19, 0x0A, 0x06, // 145\n    0x04, 0x23, 0x0A, 0x06, // 146\n    0x04, 0x2D, 0x0C, 0x07, // 147\n    0x04, 0x39, 0x05, 0x04, // 148\n    0x04, 0x3E, 0x0C, 0x07, // 149\n    0x04, 0x4A, 0x07, 0x05, // 150\n    0x04, 0x51, 0x0C, 0x07, // 151\n    0x04, 0x5D, 0x07, 0x05, // 152\n    0xFF, 0xFF, 0x00, 0x0A, // 153\n    0xFF, 0xFF, 0x00, 0x0A, // 154\n    0xFF, 0xFF, 0x00, 0x0A, // 155\n    0xFF, 0xFF, 0x00, 0x0A, // 156\n    0xFF, 0xFF, 0x00, 0x0A, // 157\n    0xFF, 0xFF, 0x00, 0x0A, // 158\n    0xFF, 0xFF, 0x00, 0x0A, // 159\n    0xFF, 0xFF, 0x00, 0x0A, // 160\n    0x04, 0x64, 0x04, 0x03, // 161\n    0x04, 0x68, 0x0A, 0x06, // 162\n    0x04, 0x72, 0x0C, 0x07, // 163\n    0x04, 0x7E, 0x0A, 0x06, // 164\n    0x04, 0x88, 0x0A, 0x06, // 165\n    0x04, 0x92, 0x04, 0x03, // 166\n    0x04, 0x96, 0x0A, 0x06, // 167\n    0x04, 0xA0, 0x05, 0x04, // 168\n    0x04, 0xA5, 0x0D, 0x08, // 169\n    0x04, 0xB2, 0x07, 0x05, // 170\n    0x04, 0xB9, 0x0A, 0x06, // 171\n    0x04, 0xC3, 0x09, 0x06, // 172\n    0x04, 0xCC, 0x03, 0x03, // 173\n    0x04, 0xCF, 0x0D, 0x08, // 174\n    0x04, 0xDC, 0x0B, 0x07, // 175\n    0x04, 0xE7, 0x07, 0x05, // 176\n    0x04, 0xEE, 0x0A, 0x06, // 177\n    0x04, 0xF8, 0x05, 0x04, // 178\n    0x04, 0xFD, 0x05, 0x04, // 179\n    0x05, 0x02, 0x05, 0x04, // 180\n    0x05, 0x07, 0x0A, 0x06, // 181\n    0x05, 0x11, 0x09, 0x06, // 182\n    0x05, 0x1A, 0x03, 0x03, // 183\n    0x05, 0x1D, 0x06, 0x04, // 184\n    0x05, 0x23, 0x05, 0x04, // 185\n    0x05, 0x28, 0x07, 0x05, // 186\n    0x05, 0x2F, 0x0A, 0x06, // 187\n    0x05, 0x39, 0x10, 0x09, // 188\n    0x05, 0x49, 0x10, 0x09, // 189\n    0x05, 0x59, 0x10, 0x09, // 190\n    0x05, 0x69, 0x0A, 0x06, // 191\n    0x05, 0x73, 0x0E, 0x08, // 192\n    0x05, 0x81, 0x0E, 0x08, // 193\n    0x05, 0x8F, 0x0E, 0x08, // 194\n    0x05, 0x9D, 0x0E, 0x08, // 195\n    0x05, 0xAB, 0x0E, 0x08, // 196\n    0x05, 0xB9, 0x0E, 0x08, // 197\n    0x05, 0xC7, 0x12, 0x0A, // 198\n    0x05, 0xD9, 0x0C, 0x07, // 199\n    0x05, 0xE5, 0x0C, 0x07, // 200\n    0x05, 0xF1, 0x0C, 0x07, // 201\n    0x05, 0xFD, 0x0C, 0x07, // 202\n    0x06, 0x09, 0x0C, 0x07, // 203\n    0x06, 0x15, 0x05, 0x04, // 204\n    0x06, 0x1A, 0x04, 0x03, // 205\n    0x06, 0x1E, 0x04, 0x03, // 206\n    0x06, 0x22, 0x05, 0x04, // 207\n    0x06, 0x27, 0x0B, 0x07, // 208\n    0x06, 0x32, 0x0C, 0x07, // 209\n    0x06, 0x3E, 0x0E, 0x08, // 210\n    0x06, 0x4C, 0x0E, 0x08, // 211\n    0x06, 0x5A, 0x0E, 0x08, // 212\n    0x06, 0x68, 0x0E, 0x08, // 213\n    0x06, 0x76, 0x0E, 0x08, // 214\n    0x06, 0x84, 0x0A, 0x06, // 215\n    0x06, 0x8E, 0x0D, 0x08, // 216\n    0x06, 0x9B, 0x0C, 0x07, // 217\n    0x06, 0xA7, 0x0C, 0x07, // 218\n    0x06, 0xB3, 0x0C, 0x07, // 219\n    0x06, 0xBF, 0x0C, 0x07, // 220\n    0x06, 0xCB, 0x0D, 0x08, // 221\n    0x06, 0xD8, 0x0B, 0x07, // 222\n    0x06, 0xE3, 0x0C, 0x07, // 223\n    0x06, 0xEF, 0x0A, 0x06, // 224\n    0x06, 0xF9, 0x0A, 0x06, // 225\n    0x07, 0x03, 0x0A, 0x06, // 226\n    0x07, 0x0D, 0x0A, 0x06, // 227\n    0x07, 0x17, 0x0A, 0x06, // 228\n    0x07, 0x21, 0x0A, 0x06, // 229\n    0x07, 0x2B, 0x10, 0x09, // 230\n    0x07, 0x3B, 0x0A, 0x06, // 231\n    0x07, 0x45, 0x0A, 0x06, // 232\n    0x07, 0x4F, 0x0A, 0x06, // 233\n    0x07, 0x59, 0x0A, 0x06, // 234\n    0x07, 0x63, 0x0A, 0x06, // 235\n    0x07, 0x6D, 0x05, 0x04, // 236\n    0x07, 0x72, 0x04, 0x03, // 237\n    0x07, 0x76, 0x05, 0x04, // 238\n    0x07, 0x7B, 0x05, 0x04, // 239\n    0x07, 0x80, 0x0A, 0x06, // 240\n    0x07, 0x8A, 0x0A, 0x06, // 241\n    0x07, 0x94, 0x0A, 0x06, // 242\n    0x07, 0x9E, 0x0A, 0x06, // 243\n    0x07, 0xA8, 0x0A, 0x06, // 244\n    0x07, 0xB2, 0x0A, 0x06, // 245\n    0x07, 0xBC, 0x0A, 0x06, // 246\n    0x07, 0xC6, 0x09, 0x06, // 247\n    0x07, 0xCF, 0x0A, 0x06, // 248\n    0x07, 0xD9, 0x0A, 0x06, // 249\n    0x07, 0xE3, 0x0A, 0x06, // 250\n    0x07, 0xED, 0x0A, 0x06, // 251\n    0x07, 0xF7, 0x0A, 0x06, // 252\n    0x08, 0x01, 0x09, 0x06, // 253\n    0x08, 0x0A, 0x0A, 0x06, // 254\n    0x08, 0x14, 0x09, 0x06, // 255\n    // Font Data:\n    0x00, 0x00, 0xF8, 0x02,                                                                                                 // 33\n    0x38, 0x00, 0x00, 0x00, 0x38,                                                                                           // 34\n    0xA0, 0x03, 0xE0, 0x00, 0xB8, 0x03, 0xE0, 0x00, 0xB8,                                                                   // 35\n    0x30, 0x01, 0x28, 0x02, 0xF8, 0x07, 0x48, 0x02, 0x90, 0x01,                                                             // 36\n    0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x03, 0xC0, 0x00, 0xB0, 0x01, 0x48, 0x02, 0x80, 0x01,                         // 37\n    0x80, 0x01, 0x50, 0x02, 0x68, 0x02, 0xA8, 0x02, 0x18, 0x01, 0x80, 0x03, 0x80, 0x02,                                     // 38\n    0x38,                                                                                                                   // 39\n    0xE0, 0x03, 0x10, 0x04, 0x08, 0x08,                                                                                     // 40\n    0x08, 0x08, 0x10, 0x04, 0xE0, 0x03,                                                                                     // 41\n    0x28, 0x00, 0x18, 0x00, 0x28,                                                                                           // 42\n    0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40,                                                                   // 43\n    0x00, 0x00, 0x00, 0x06,                                                                                                 // 44\n    0x80, 0x00, 0x80,                                                                                                       // 45\n    0x00, 0x00, 0x00, 0x02,                                                                                                 // 46\n    0x00, 0x03, 0xE0, 0x00, 0x18,                                                                                           // 47\n    0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                                             // 48\n    0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03,                                                                         // 49\n    0x10, 0x02, 0x08, 0x03, 0x88, 0x02, 0x48, 0x02, 0x30, 0x02,                                                             // 50\n    0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                             // 51\n    0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x80,                                                       // 52\n    0x60, 0x01, 0x38, 0x02, 0x28, 0x02, 0x28, 0x02, 0xC8, 0x01,                                                             // 53\n    0xF0, 0x01, 0x28, 0x02, 0x28, 0x02, 0x28, 0x02, 0xD0, 0x01,                                                             // 54\n    0x08, 0x00, 0x08, 0x03, 0xC8, 0x00, 0x38, 0x00, 0x08,                                                                   // 55\n    0xB0, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                             // 56\n    0x70, 0x01, 0x88, 0x02, 0x88, 0x02, 0x88, 0x02, 0xF0, 0x01,                                                             // 57\n    0x00, 0x00, 0x20, 0x02,                                                                                                 // 58\n    0x00, 0x00, 0x20, 0x06,                                                                                                 // 59\n    0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01,                                                             // 60\n    0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0,                                                                   // 61\n    0x00, 0x00, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x40,                                                                   // 62\n    0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xC8, 0x02, 0x48, 0x00, 0x30,                                                       // 63\n    0x00, 0x00, 0xC0, 0x03, 0x30, 0x04, 0xD0, 0x09, 0x28, 0x0A, 0x28, 0x0A, 0xC8, 0x0B, 0x68, 0x0A, 0x10, 0x05, 0xE0, 0x04, // 64\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 65\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01,                                                 // 66\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01,                                                 // 67\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0xE0,                                                       // 68\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02,                                                 // 69\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x08,                                                                   // 70\n    0x00, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x50, 0x01, 0xC0,                                           // 71\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                                                 // 72\n    0x00, 0x00, 0xF8, 0x03,                                                                                                 // 73\n    0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                                         // 74\n    0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                                     // 75\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,                                                 // 76\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03,                         // 77\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03,                                                 // 78\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                     // 79\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                                       // 80\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x08, 0x03, 0xF0, 0x02,                                     // 81\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0xC8, 0x00, 0x30, 0x03,                                                 // 82\n    0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01,                                                 // 83\n    0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08,                                                       // 84\n    0x00, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                 // 85\n    0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08,                                           // 86\n    0x18, 0x00, 0xE0, 0x01, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x02, 0xE0, 0x01, 0x18,                   // 87\n    0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                                     // 88\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08,                                           // 89\n    0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02,                                                 // 90\n    0x00, 0x00, 0xF8, 0x0F, 0x08, 0x08,                                                                                     // 91\n    0x18, 0x00, 0xE0, 0x00, 0x00, 0x03,                                                                                     // 92\n    0x08, 0x08, 0xF8, 0x0F,                                                                                                 // 93\n    0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x40,                                                                   // 94\n    0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,                                                 // 95\n    0x08, 0x00, 0x10,                                                                                                       // 96\n    0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03,                                                             // 97\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 98\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01,                                                             // 99\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03,                                                             // 100\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02,                                                             // 101\n    0x20, 0x00, 0xF0, 0x03, 0x28,                                                                                           // 102\n    0x00, 0x00, 0xC0, 0x05, 0x20, 0x0A, 0x20, 0x0A, 0xE0, 0x07,                                                             // 103\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                                             // 104\n    0x00, 0x00, 0xE8, 0x03,                                                                                                 // 105\n    0x00, 0x08, 0xE8, 0x07,                                                                                                 // 106\n    0xF8, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02,                                                                         // 107\n    0x00, 0x00, 0xF8, 0x03,                                                                                                 // 108\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                         // 109\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                                             // 110\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 111\n    0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 112\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xE0, 0x0F,                                                             // 113\n    0x00, 0x00, 0xE0, 0x03, 0x20,                                                                                           // 114\n    0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x20, 0x01,                                                                         // 115\n    0x20, 0x00, 0xF8, 0x03, 0x20, 0x02,                                                                                     // 116\n    0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,                                                             // 117\n    0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20,                                                                   // 118\n    0xE0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x01,                                     // 119\n    0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                                                             // 120\n    0x20, 0x00, 0xC0, 0x09, 0x00, 0x06, 0xC0, 0x01, 0x20,                                                                   // 121\n    0x20, 0x02, 0x20, 0x03, 0xA0, 0x02, 0x60, 0x02, 0x20, 0x02,                                                             // 122\n    0x80, 0x00, 0x78, 0x0F, 0x08, 0x08,                                                                                     // 123\n    0x00, 0x00, 0xF8, 0x0F,                                                                                                 // 124\n    0x08, 0x08, 0x78, 0x0F, 0x80,                                                                                           // 125\n    0xC0, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x00, 0xC0,                                                                   // 126\n    0x00, 0x00, 0xF0, 0x01, 0x09, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x10, 0x01,                                                 // 129\n    0x00, 0x00, 0xF8, 0x03, 0x09, 0x02, 0x0A, 0x02, 0x11, 0x01, 0xE0,                                                       // 130\n    0x00, 0x00, 0xF8, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x48, 0x02,                                                 // 131\n    0x00, 0x00, 0xF8, 0x03, 0x31, 0x00, 0x42, 0x00, 0x81, 0x01, 0xF8, 0x03,                                                 // 132\n    0x00, 0x00, 0xF8, 0x03, 0x49, 0x00, 0x4A, 0x00, 0xC9, 0x00, 0x30, 0x03,                                                 // 133\n    0x00, 0x00, 0x30, 0x01, 0x49, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x90, 0x01,                                                 // 134\n    0x00, 0x00, 0x08, 0x00, 0x09, 0x00, 0xFA, 0x03, 0x09, 0x00, 0x08,                                                       // 135\n    0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x05, 0x02, 0x02, 0x02, 0xF8, 0x01,                                                 // 136\n    0x08, 0x03, 0x88, 0x02, 0xC9, 0x02, 0x6A, 0x02, 0x39, 0x02, 0x18, 0x02,                                                 // 137\n    0x00, 0x00, 0xC0, 0x01, 0x24, 0x02, 0x28, 0x02, 0x44, 0x01,                                                             // 138\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03, 0x00, 0x00, 0x18,                                           // 139\n    0x00, 0x00, 0xC0, 0x01, 0xA4, 0x02, 0xA8, 0x02, 0xC4, 0x02,                                                             // 140\n    0x00, 0x00, 0xE0, 0x03, 0x24, 0x00, 0x28, 0x00, 0xC4, 0x03,                                                             // 141\n    0x00, 0x00, 0xE4, 0x03, 0x28, 0x00, 0x04,                                                                               // 142\n    0x40, 0x02, 0xA4, 0x02, 0xA8, 0x02, 0x24, 0x01,                                                                         // 143\n    0x20, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x18,                                                                               // 144\n    0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x14, 0x02, 0xE8, 0x03,                                                             // 145\n    0x20, 0x02, 0x24, 0x03, 0xA8, 0x02, 0x64, 0x02, 0x20, 0x02,                                                             // 146\n    0x00, 0x00, 0xFA, 0x03, 0x01, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,                                                 // 147\n    0x00, 0x00, 0xFA, 0x03, 0x01,                                                                                           // 148\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x18, 0x02, 0x00, 0x02,                                                 // 149\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x18,                                                                               // 150\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x4A, 0x00, 0xC9, 0x00, 0x30, 0x03,                                                 // 151\n    0x00, 0x00, 0xE0, 0x03, 0x28, 0x00, 0x04,                                                                               // 152\n    0x00, 0x00, 0xA0, 0x0F,                                                                                                 // 161\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x0F, 0x78, 0x02, 0x40, 0x01,                                                             // 162\n    0x40, 0x02, 0x70, 0x03, 0xC8, 0x02, 0x48, 0x02, 0x08, 0x02, 0x10, 0x02,                                                 // 163\n    0x00, 0x00, 0xE0, 0x01, 0x20, 0x01, 0x20, 0x01, 0xE0, 0x01,                                                             // 164\n    0x48, 0x01, 0x70, 0x01, 0xC0, 0x03, 0x70, 0x01, 0x48, 0x01,                                                             // 165\n    0x00, 0x00, 0x38, 0x0F,                                                                                                 // 166\n    0xD0, 0x04, 0x28, 0x09, 0x48, 0x09, 0x48, 0x0A, 0x90, 0x05,                                                             // 167\n    0x08, 0x00, 0x00, 0x00, 0x08,                                                                                           // 168\n    0xE0, 0x00, 0x10, 0x01, 0x48, 0x02, 0xA8, 0x02, 0xA8, 0x02, 0x10, 0x01, 0xE0,                                           // 169\n    0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x78,                                                                               // 170\n    0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02,                                                             // 171\n    0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0,                                                                   // 172\n    0x80, 0x00, 0x80,                                                                                                       // 173\n    0xE0, 0x00, 0x10, 0x01, 0xE8, 0x02, 0x68, 0x02, 0xC8, 0x02, 0x10, 0x01, 0xE0,                                           // 174\n    0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,                                                       // 175\n    0x00, 0x00, 0x38, 0x00, 0x28, 0x00, 0x38,                                                                               // 176\n    0x40, 0x02, 0x40, 0x02, 0xF0, 0x03, 0x40, 0x02, 0x40, 0x02,                                                             // 177\n    0x48, 0x00, 0x68, 0x00, 0x58,                                                                                           // 178\n    0x48, 0x00, 0x58, 0x00, 0x68,                                                                                           // 179\n    0x00, 0x00, 0x10, 0x00, 0x08,                                                                                           // 180\n    0x00, 0x00, 0xE0, 0x0F, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,                                                             // 181\n    0x70, 0x00, 0xF8, 0x0F, 0x08, 0x00, 0xF8, 0x0F, 0x08,                                                                   // 182\n    0x00, 0x00, 0x40,                                                                                                       // 183\n    0x00, 0x00, 0x00, 0x14, 0x00, 0x18,                                                                                     // 184\n    0x00, 0x00, 0x10, 0x00, 0x78,                                                                                           // 185\n    0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                                                               // 186\n    0x00, 0x00, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01,                                                             // 187\n    0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0xC0, 0x00, 0x20, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01,                         // 188\n    0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0x80, 0x00, 0x60, 0x00, 0x50, 0x02, 0x48, 0x03, 0xC0, 0x02,                         // 189\n    0x48, 0x00, 0x58, 0x00, 0x68, 0x03, 0x80, 0x00, 0x60, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01,                         // 190\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x09, 0xA0, 0x09, 0x00, 0x04,                                                             // 191\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 192\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 193\n    0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 194\n    0x00, 0x02, 0xC2, 0x01, 0xB1, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 195\n    0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x88, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 196\n    0x00, 0x02, 0xC0, 0x01, 0xBE, 0x00, 0x8A, 0x00, 0xBE, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 197\n    0x00, 0x03, 0xC0, 0x00, 0xE0, 0x00, 0x98, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02,             // 198\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x16, 0x08, 0x1A, 0x10, 0x01,                                                 // 199\n    0x00, 0x00, 0xF8, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02,                                                 // 200\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x48, 0x02,                                                 // 201\n    0x00, 0x00, 0xFA, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02,                                                 // 202\n    0x00, 0x00, 0xF8, 0x03, 0x4A, 0x02, 0x48, 0x02, 0x4A, 0x02, 0x48, 0x02,                                                 // 203\n    0x00, 0x00, 0xF9, 0x03, 0x02,                                                                                           // 204\n    0x02, 0x00, 0xF9, 0x03,                                                                                                 // 205\n    0x01, 0x00, 0xFA, 0x03,                                                                                                 // 206\n    0x02, 0x00, 0xF8, 0x03, 0x02,                                                                                           // 207\n    0x40, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x10, 0x01, 0xE0,                                                       // 208\n    0x00, 0x00, 0xFA, 0x03, 0x31, 0x00, 0x42, 0x00, 0x81, 0x01, 0xF8, 0x03,                                                 // 209\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01,                                     // 210\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x08, 0x02, 0xF0, 0x01,                                     // 211\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0xF0, 0x01,                                     // 212\n    0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x09, 0x02, 0xF0, 0x01,                                     // 213\n    0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x08, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01,                                     // 214\n    0x10, 0x01, 0xA0, 0x00, 0xE0, 0x00, 0xA0, 0x00, 0x10, 0x01,                                                             // 215\n    0x00, 0x00, 0xF0, 0x02, 0x08, 0x03, 0xC8, 0x02, 0x28, 0x02, 0x18, 0x03, 0xE8,                                           // 216\n    0x00, 0x00, 0xF8, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                 // 217\n    0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                 // 218\n    0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0xF8, 0x01,                                                 // 219\n    0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0xF8, 0x01,                                                 // 220\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC2, 0x03, 0x21, 0x00, 0x10, 0x00, 0x08,                                           // 221\n    0x00, 0x00, 0xF8, 0x03, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0xE0,                                                       // 222\n    0x00, 0x00, 0xF0, 0x03, 0x08, 0x01, 0x48, 0x02, 0xB0, 0x02, 0x80, 0x01,                                                 // 223\n    0x00, 0x00, 0x00, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE0, 0x03,                                                             // 224\n    0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE0, 0x03,                                                             // 225\n    0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE8, 0x03,                                                             // 226\n    0x00, 0x00, 0x08, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE4, 0x03,                                                             // 227\n    0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA0, 0x02, 0xE8, 0x03,                                                             // 228\n    0x00, 0x00, 0x00, 0x03, 0xAE, 0x02, 0xAA, 0x02, 0xEE, 0x03,                                                             // 229\n    0x00, 0x00, 0x40, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02,                         // 230\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x16, 0x20, 0x1A, 0x40, 0x01,                                                             // 231\n    0x00, 0x00, 0xC0, 0x01, 0xA4, 0x02, 0xA8, 0x02, 0xC0, 0x02,                                                             // 232\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC0, 0x02,                                                             // 233\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC8, 0x02,                                                             // 234\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA0, 0x02, 0xC8, 0x02,                                                             // 235\n    0x00, 0x00, 0xE4, 0x03, 0x08,                                                                                           // 236\n    0x08, 0x00, 0xE4, 0x03,                                                                                                 // 237\n    0x08, 0x00, 0xE4, 0x03, 0x08,                                                                                           // 238\n    0x08, 0x00, 0xE0, 0x03, 0x08,                                                                                           // 239\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x38, 0x02, 0xE0, 0x01,                                                             // 240\n    0x00, 0x00, 0xE8, 0x03, 0x24, 0x00, 0x28, 0x00, 0xC4, 0x03,                                                             // 241\n    0x00, 0x00, 0xC0, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC0, 0x01,                                                             // 242\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC0, 0x01,                                                             // 243\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC8, 0x01,                                                             // 244\n    0x00, 0x00, 0xC8, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC4, 0x01,                                                             // 245\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x20, 0x02, 0xC8, 0x01,                                                             // 246\n    0x40, 0x00, 0x40, 0x00, 0x50, 0x01, 0x40, 0x00, 0x40,                                                                   // 247\n    0x00, 0x00, 0xC0, 0x02, 0xA0, 0x03, 0x60, 0x02, 0xA0, 0x01,                                                             // 248\n    0x00, 0x00, 0xE0, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03,                                                             // 249\n    0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x04, 0x02, 0xE0, 0x03,                                                             // 250\n    0x00, 0x00, 0xE8, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03,                                                             // 251\n    0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x00, 0x02, 0xE8, 0x03,                                                             // 252\n    0x20, 0x00, 0xC0, 0x09, 0x08, 0x06, 0xC4, 0x01, 0x20,                                                                   // 253\n    0x00, 0x00, 0xF8, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 254\n    0x20, 0x00, 0xC8, 0x09, 0x00, 0x06, 0xC8, 0x01, 0x20,                                                                   // 255\n};\n\nconst uint8_t ArialMT_Plain_16_CS[] PROGMEM = {\n    0x10, // Width: 16\n    0x13, // Height: 19\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x04, // 32\n    0x00, 0x00, 0x08, 0x04, // 33\n    0x00, 0x08, 0x0D, 0x06, // 34\n    0x00, 0x15, 0x1A, 0x0A, // 35\n    0x00, 0x2F, 0x17, 0x09, // 36\n    0x00, 0x46, 0x26, 0x0E, // 37\n    0x00, 0x6C, 0x1D, 0x0B, // 38\n    0x00, 0x89, 0x04, 0x03, // 39\n    0x00, 0x8D, 0x0C, 0x05, // 40\n    0x00, 0x99, 0x0B, 0x05, // 41\n    0x00, 0xA4, 0x0D, 0x06, // 42\n    0x00, 0xB1, 0x17, 0x09, // 43\n    0x00, 0xC8, 0x09, 0x04, // 44\n    0x00, 0xD1, 0x0B, 0x05, // 45\n    0x00, 0xDC, 0x08, 0x04, // 46\n    0x00, 0xE4, 0x0A, 0x05, // 47\n    0x00, 0xEE, 0x17, 0x09, // 48\n    0x01, 0x05, 0x11, 0x07, // 49\n    0x01, 0x16, 0x17, 0x09, // 50\n    0x01, 0x2D, 0x17, 0x09, // 51\n    0x01, 0x44, 0x17, 0x09, // 52\n    0x01, 0x5B, 0x17, 0x09, // 53\n    0x01, 0x72, 0x17, 0x09, // 54\n    0x01, 0x89, 0x16, 0x09, // 55\n    0x01, 0x9F, 0x17, 0x09, // 56\n    0x01, 0xB6, 0x17, 0x09, // 57\n    0x01, 0xCD, 0x05, 0x03, // 58\n    0x01, 0xD2, 0x06, 0x03, // 59\n    0x01, 0xD8, 0x17, 0x09, // 60\n    0x01, 0xEF, 0x17, 0x09, // 61\n    0x02, 0x06, 0x17, 0x09, // 62\n    0x02, 0x1D, 0x16, 0x09, // 63\n    0x02, 0x33, 0x2F, 0x11, // 64\n    0x02, 0x62, 0x1D, 0x0B, // 65\n    0x02, 0x7F, 0x1D, 0x0B, // 66\n    0x02, 0x9C, 0x20, 0x0C, // 67\n    0x02, 0xBC, 0x20, 0x0C, // 68\n    0x02, 0xDC, 0x1D, 0x0B, // 69\n    0x02, 0xF9, 0x19, 0x0A, // 70\n    0x03, 0x12, 0x20, 0x0C, // 71\n    0x03, 0x32, 0x1D, 0x0B, // 72\n    0x03, 0x4F, 0x05, 0x03, // 73\n    0x03, 0x54, 0x14, 0x08, // 74\n    0x03, 0x68, 0x1D, 0x0B, // 75\n    0x03, 0x85, 0x17, 0x09, // 76\n    0x03, 0x9C, 0x23, 0x0D, // 77\n    0x03, 0xBF, 0x1D, 0x0B, // 78\n    0x03, 0xDC, 0x20, 0x0C, // 79\n    0x03, 0xFC, 0x1C, 0x0B, // 80\n    0x04, 0x18, 0x20, 0x0C, // 81\n    0x04, 0x38, 0x1D, 0x0B, // 82\n    0x04, 0x55, 0x1D, 0x0B, // 83\n    0x04, 0x72, 0x19, 0x0A, // 84\n    0x04, 0x8B, 0x1D, 0x0B, // 85\n    0x04, 0xA8, 0x1C, 0x0B, // 86\n    0x04, 0xC4, 0x2B, 0x10, // 87\n    0x04, 0xEF, 0x20, 0x0C, // 88\n    0x05, 0x0F, 0x19, 0x0A, // 89\n    0x05, 0x28, 0x1A, 0x0A, // 90\n    0x05, 0x42, 0x0C, 0x05, // 91\n    0x05, 0x4E, 0x0B, 0x05, // 92\n    0x05, 0x59, 0x09, 0x04, // 93\n    0x05, 0x62, 0x14, 0x08, // 94\n    0x05, 0x76, 0x1B, 0x0A, // 95\n    0x05, 0x91, 0x07, 0x04, // 96\n    0x05, 0x98, 0x17, 0x09, // 97\n    0x05, 0xAF, 0x17, 0x09, // 98\n    0x05, 0xC6, 0x14, 0x08, // 99\n    0x05, 0xDA, 0x17, 0x09, // 100\n    0x05, 0xF1, 0x17, 0x09, // 101\n    0x06, 0x08, 0x0A, 0x05, // 102\n    0x06, 0x12, 0x17, 0x09, // 103\n    0x06, 0x29, 0x14, 0x08, // 104\n    0x06, 0x3D, 0x05, 0x03, // 105\n    0x06, 0x42, 0x06, 0x03, // 106\n    0x06, 0x48, 0x17, 0x09, // 107\n    0x06, 0x5F, 0x05, 0x03, // 108\n    0x06, 0x64, 0x23, 0x0D, // 109\n    0x06, 0x87, 0x14, 0x08, // 110\n    0x06, 0x9B, 0x17, 0x09, // 111\n    0x06, 0xB2, 0x17, 0x09, // 112\n    0x06, 0xC9, 0x18, 0x09, // 113\n    0x06, 0xE1, 0x0D, 0x06, // 114\n    0x06, 0xEE, 0x14, 0x08, // 115\n    0x07, 0x02, 0x0B, 0x05, // 116\n    0x07, 0x0D, 0x14, 0x08, // 117\n    0x07, 0x21, 0x13, 0x08, // 118\n    0x07, 0x34, 0x1F, 0x0C, // 119\n    0x07, 0x53, 0x14, 0x08, // 120\n    0x07, 0x67, 0x13, 0x08, // 121\n    0x07, 0x7A, 0x14, 0x08, // 122\n    0x07, 0x8E, 0x0F, 0x06, // 123\n    0x07, 0x9D, 0x06, 0x03, // 124\n    0x07, 0xA3, 0x0E, 0x06, // 125\n    0x07, 0xB1, 0x17, 0x09, // 126\n    0xFF, 0xFF, 0x00, 0x10, // 127\n    0xFF, 0xFF, 0x00, 0x10, // 128\n    0x07, 0xC8, 0x20, 0x0C, // 129\n    0x07, 0xE8, 0x20, 0x0C, // 130\n    0x08, 0x08, 0x1D, 0x0B, // 131\n    0x08, 0x25, 0x1D, 0x0B, // 132\n    0x08, 0x42, 0x1D, 0x0B, // 133\n    0x08, 0x5F, 0x1D, 0x0B, // 134\n    0x08, 0x7C, 0x19, 0x0A, // 135\n    0x08, 0x95, 0x1D, 0x0B, // 136\n    0x08, 0xB2, 0x1A, 0x0A, // 137\n    0x08, 0xCC, 0x14, 0x08, // 138\n    0x08, 0xE0, 0x1C, 0x0B, // 139\n    0x08, 0xFC, 0x17, 0x09, // 140\n    0x09, 0x13, 0x14, 0x08, // 141\n    0x09, 0x27, 0x0D, 0x06, // 142\n    0x09, 0x34, 0x14, 0x08, // 143\n    0x09, 0x48, 0x10, 0x07, // 144\n    0x09, 0x58, 0x14, 0x08, // 145\n    0x09, 0x6C, 0x14, 0x08, // 146\n    0x09, 0x80, 0x17, 0x09, // 147\n    0x09, 0x97, 0x07, 0x04, // 148\n    0x09, 0x9E, 0x17, 0x09, // 149\n    0x09, 0xB5, 0x0A, 0x05, // 150\n    0x09, 0xBF, 0x1D, 0x0B, // 151\n    0x09, 0xDC, 0x0D, 0x06, // 152\n    0xFF, 0xFF, 0x00, 0x10, // 153\n    0xFF, 0xFF, 0x00, 0x10, // 154\n    0xFF, 0xFF, 0x00, 0x10, // 155\n    0xFF, 0xFF, 0x00, 0x10, // 156\n    0xFF, 0xFF, 0x00, 0x10, // 157\n    0xFF, 0xFF, 0x00, 0x10, // 158\n    0xFF, 0xFF, 0x00, 0x10, // 159\n    0xFF, 0xFF, 0x00, 0x10, // 160\n    0x09, 0xE9, 0x09, 0x04, // 161\n    0x09, 0xF2, 0x17, 0x09, // 162\n    0x0A, 0x09, 0x17, 0x09, // 163\n    0x0A, 0x20, 0x14, 0x08, // 164\n    0x0A, 0x34, 0x1A, 0x0A, // 165\n    0x0A, 0x4E, 0x06, 0x03, // 166\n    0x0A, 0x54, 0x17, 0x09, // 167\n    0x0A, 0x6B, 0x07, 0x04, // 168\n    0x0A, 0x72, 0x23, 0x0D, // 169\n    0x0A, 0x95, 0x0E, 0x06, // 170\n    0x0A, 0xA3, 0x14, 0x08, // 171\n    0x0A, 0xB7, 0x17, 0x09, // 172\n    0x0A, 0xCE, 0x0B, 0x05, // 173\n    0x0A, 0xD9, 0x23, 0x0D, // 174\n    0x0A, 0xFC, 0x19, 0x0A, // 175\n    0x0B, 0x15, 0x0D, 0x06, // 176\n    0x0B, 0x22, 0x17, 0x09, // 177\n    0x0B, 0x39, 0x0E, 0x06, // 178\n    0x0B, 0x47, 0x0D, 0x06, // 179\n    0x0B, 0x54, 0x0A, 0x05, // 180\n    0x0B, 0x5E, 0x17, 0x09, // 181\n    0x0B, 0x75, 0x19, 0x0A, // 182\n    0x0B, 0x8E, 0x08, 0x04, // 183\n    0x0B, 0x96, 0x0C, 0x05, // 184\n    0x0B, 0xA2, 0x0B, 0x05, // 185\n    0x0B, 0xAD, 0x0D, 0x06, // 186\n    0x0B, 0xBA, 0x17, 0x09, // 187\n    0x0B, 0xD1, 0x26, 0x0E, // 188\n    0x0B, 0xF7, 0x26, 0x0E, // 189\n    0x0C, 0x1D, 0x26, 0x0E, // 190\n    0x0C, 0x43, 0x1A, 0x0A, // 191\n    0x0C, 0x5D, 0x1D, 0x0B, // 192\n    0x0C, 0x7A, 0x1D, 0x0B, // 193\n    0x0C, 0x97, 0x1D, 0x0B, // 194\n    0x0C, 0xB4, 0x1D, 0x0B, // 195\n    0x0C, 0xD1, 0x1D, 0x0B, // 196\n    0x0C, 0xEE, 0x1D, 0x0B, // 197\n    0x0D, 0x0B, 0x2C, 0x10, // 198\n    0x0D, 0x37, 0x20, 0x0C, // 199\n    0x0D, 0x57, 0x1D, 0x0B, // 200\n    0x0D, 0x74, 0x1D, 0x0B, // 201\n    0x0D, 0x91, 0x1D, 0x0B, // 202\n    0x0D, 0xAE, 0x1D, 0x0B, // 203\n    0x0D, 0xCB, 0x05, 0x03, // 204\n    0x0D, 0xD0, 0x07, 0x04, // 205\n    0x0D, 0xD7, 0x0A, 0x05, // 206\n    0x0D, 0xE1, 0x07, 0x04, // 207\n    0x0D, 0xE8, 0x20, 0x0C, // 208\n    0x0E, 0x08, 0x1D, 0x0B, // 209\n    0x0E, 0x25, 0x20, 0x0C, // 210\n    0x0E, 0x45, 0x20, 0x0C, // 211\n    0x0E, 0x65, 0x20, 0x0C, // 212\n    0x0E, 0x85, 0x20, 0x0C, // 213\n    0x0E, 0xA5, 0x20, 0x0C, // 214\n    0x0E, 0xC5, 0x17, 0x09, // 215\n    0x0E, 0xDC, 0x20, 0x0C, // 216\n    0x0E, 0xFC, 0x1D, 0x0B, // 217\n    0x0F, 0x19, 0x1D, 0x0B, // 218\n    0x0F, 0x36, 0x1D, 0x0B, // 219\n    0x0F, 0x53, 0x1D, 0x0B, // 220\n    0x0F, 0x70, 0x19, 0x0A, // 221\n    0x0F, 0x89, 0x1D, 0x0B, // 222\n    0x0F, 0xA6, 0x17, 0x09, // 223\n    0x0F, 0xBD, 0x17, 0x09, // 224\n    0x0F, 0xD4, 0x17, 0x09, // 225\n    0x0F, 0xEB, 0x17, 0x09, // 226\n    0x10, 0x02, 0x17, 0x09, // 227\n    0x10, 0x19, 0x17, 0x09, // 228\n    0x10, 0x30, 0x17, 0x09, // 229\n    0x10, 0x47, 0x29, 0x0F, // 230\n    0x10, 0x70, 0x14, 0x08, // 231\n    0x10, 0x84, 0x17, 0x09, // 232\n    0x10, 0x9B, 0x17, 0x09, // 233\n    0x10, 0xB2, 0x17, 0x09, // 234\n    0x10, 0xC9, 0x17, 0x09, // 235\n    0x10, 0xE0, 0x05, 0x03, // 236\n    0x10, 0xE5, 0x07, 0x04, // 237\n    0x10, 0xEC, 0x0A, 0x05, // 238\n    0x10, 0xF6, 0x07, 0x04, // 239\n    0x10, 0xFD, 0x17, 0x09, // 240\n    0x11, 0x14, 0x14, 0x08, // 241\n    0x11, 0x28, 0x17, 0x09, // 242\n    0x11, 0x3F, 0x17, 0x09, // 243\n    0x11, 0x56, 0x17, 0x09, // 244\n    0x11, 0x6D, 0x17, 0x09, // 245\n    0x11, 0x84, 0x17, 0x09, // 246\n    0x11, 0x9B, 0x17, 0x09, // 247\n    0x11, 0xB2, 0x17, 0x09, // 248\n    0x11, 0xC9, 0x14, 0x08, // 249\n    0x11, 0xDD, 0x14, 0x08, // 250\n    0x11, 0xF1, 0x14, 0x08, // 251\n    0x12, 0x05, 0x14, 0x08, // 252\n    0x12, 0x19, 0x13, 0x08, // 253\n    0x12, 0x2C, 0x17, 0x09, // 254\n    0x12, 0x43, 0x13, 0x08, // 255\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x5F,                               // 33\n    0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // 34\n    0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00, 0xB8, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00,\n    0xB8, 0x08, 0x00, 0x80, 0x08, // 35\n    0x00, 0x00, 0x00, 0xE0, 0x10, 0x00, 0x10, 0x21, 0x00, 0x08, 0x41, 0x00, 0xFC, 0xFF, 0x00, 0x08, 0x42, 0x00, 0x10, 0x22, 0x00,\n    0x20, 0x1C, // 36\n    0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x61, 0x00, 0xF0, 0x18, 0x00, 0x00, 0x06, 0x00,\n    0xC0, 0x01, 0x00, 0x30, 0x3C, 0x00, 0x08, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x3C, // 37\n    0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x70, 0x22, 0x00, 0x88, 0x41, 0x00, 0x08, 0x43, 0x00, 0x88, 0x44, 0x00, 0x70, 0x28, 0x00,\n    0x00, 0x10, 0x00, 0x00, 0x28, 0x00, 0x00, 0x44,                               // 38\n    0x00, 0x00, 0x00, 0x78,                                                       // 39\n    0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x70, 0xC0, 0x01, 0x08, 0x00, 0x02,       // 40\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x70, 0xC0, 0x01, 0x80, 0x3F,             // 41\n    0x10, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x38, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x10, // 42\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x02,                                                       // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01,             // 44\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,                   // 46\n    0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00, 0x18,       // 47\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00,\n    0xE0, 0x1F,                                                                                           // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0xF8, 0x7F, // 49\n    0x00, 0x00, 0x00, 0x20, 0x40, 0x00, 0x10, 0x60, 0x00, 0x08, 0x50, 0x00, 0x08, 0x48, 0x00, 0x08, 0x44, 0x00, 0x10, 0x43, 0x00,\n    0xE0, 0x40, // 50\n    0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x88, 0x41, 0x00, 0xF0, 0x22, 0x00,\n    0x00, 0x1C, // 51\n    0x00, 0x0C, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x09, 0x00, 0xC0, 0x08, 0x00, 0x20, 0x08, 0x00, 0x10, 0x08, 0x00, 0xF8, 0x7F, 0x00,\n    0x00, 0x08, // 52\n    0x00, 0x00, 0x00, 0xC0, 0x11, 0x00, 0xB8, 0x20, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x08, 0x21, 0x00,\n    0x08, 0x1E, // 53\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x21, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x10, 0x21, 0x00,\n    0x20, 0x1E, // 54\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x78, 0x00, 0x08, 0x07, 0x00, 0xC8, 0x00, 0x00, 0x28, 0x00, 0x00,\n    0x18, // 55\n    0x00, 0x00, 0x00, 0x60, 0x1C, 0x00, 0x90, 0x22, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x90, 0x22, 0x00,\n    0x60, 0x1C, // 56\n    0x00, 0x00, 0x00, 0xE0, 0x11, 0x00, 0x10, 0x22, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x10, 0x22, 0x00,\n    0xE0, 0x1F,                         // 57\n    0x00, 0x00, 0x00, 0x40, 0x40,       // 58\n    0x00, 0x00, 0x00, 0x40, 0xC0, 0x01, // 59\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00,\n    0x40, 0x10, // 60\n    0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00,\n    0x80, 0x08, // 61\n    0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00,\n    0x00, 0x02, // 62\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x5C, 0x00, 0x08, 0x02, 0x00, 0x10, 0x01, 0x00,\n    0xE0, // 63\n    0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0xC0, 0x40, 0x00, 0x20, 0x80, 0x00, 0x10, 0x1E, 0x01, 0x10, 0x21, 0x01, 0x88, 0x40, 0x02,\n    0x48, 0x40, 0x02, 0x48, 0x40, 0x02, 0x48, 0x20, 0x02, 0x88, 0x7C, 0x02, 0xC8, 0x43, 0x02, 0x10, 0x40, 0x02, 0x10, 0x20, 0x01,\n    0x60, 0x10, 0x01, 0x80, 0x8F, // 64\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x08, 0x04, 0x00, 0x70, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 65\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x90, 0x22, 0x00, 0x60, 0x1C, // 66\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 67\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 68\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 69\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x08, // 70\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x12, 0x00, 0x00, 0x0E, // 71\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,\n    0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xF8, 0x7F,                                                                         // 72\n    0x00, 0x00, 0x00, 0xF8, 0x7F,                                                                                           // 73\n    0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x3F, // 74\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x03, 0x00, 0x40, 0x04, 0x00,\n    0x20, 0x18, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, // 75\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, // 76\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 77\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 78\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 79\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x10, 0x01, 0x00, 0xE0, // 80\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x50, 0x00,\n    0x08, 0x50, 0x00, 0x10, 0x20, 0x00, 0x20, 0x70, 0x00, 0xC0, 0x4F, // 81\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x06, 0x00,\n    0x08, 0x1A, 0x00, 0x10, 0x21, 0x00, 0xE0, 0x40, // 82\n    0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x90, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 83\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, // 84\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 85\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00,\n    0x00, 0x07, 0x00, 0xE0, 0x00, 0x00, 0x18, // 86\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00,\n    0x18, // 87\n    0x00, 0x40, 0x00, 0x08, 0x20, 0x00, 0x10, 0x10, 0x00, 0x60, 0x0C, 0x00, 0x80, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00,\n    0x60, 0x0C, 0x00, 0x10, 0x10, 0x00, 0x08, 0x20, 0x00, 0x00, 0x40, // 88\n    0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x08, // 89\n    0x00, 0x40, 0x00, 0x08, 0x60, 0x00, 0x08, 0x58, 0x00, 0x08, 0x44, 0x00, 0x08, 0x43, 0x00, 0x88, 0x40, 0x00, 0x68, 0x40, 0x00,\n    0x18, 0x40, 0x00, 0x08, 0x40,                                                                                           // 90\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02,                                                 // 91\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60,                                                       // 92\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF8, 0xFF, 0x03,                                                                   // 93\n    0x00, 0x01, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x01, // 94\n    0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02,\n    0x00, 0x00, 0x02, 0x00, 0x00, 0x02,       // 95\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, // 96\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 97\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F,                                                                                                             // 98\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, // 99\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0xF8, 0x7F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17,                                                 // 101\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x48, 0x00, 0x00, 0x48, // 102\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x01, 0x80, 0x20, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x80, 0x20, 0x01,\n    0xC0, 0xFF,                                                                                                             // 103\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 104\n    0x00, 0x00, 0x00, 0xC8, 0x7F,                                                                                           // 105\n    0x00, 0x00, 0x02, 0xC8, 0xFF, 0x01,                                                                                     // 106\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x19, 0x00, 0x80, 0x20, 0x00,\n    0x40, 0x40,                   // 107\n    0x00, 0x00, 0x00, 0xF8, 0x7F, // 108\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, 0x00,\n    0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F,                                     // 109\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 111\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 112\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0xC0, 0xFF, 0x03,                                                                                                       // 113\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40,                                           // 114\n    0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x38, // 115\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40,                                                       // 116\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 117\n    0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0,       // 118\n    0xC0, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00,\n    0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1F, 0x00, 0xC0,                                                             // 119\n    0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, // 120\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x00, 0xE0, 0x01, 0x00, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0,       // 121\n    0x40, 0x40, 0x00, 0x40, 0x60, 0x00, 0x40, 0x58, 0x00, 0x40, 0x44, 0x00, 0x40, 0x43, 0x00, 0xC0, 0x40, 0x00, 0x40, 0x40, // 122\n    0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xF0, 0xFB, 0x01, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02,                               // 123\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03,                                                                                     // 124\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF0, 0xFB, 0x01, 0x00, 0x04, 0x00, 0x00, 0x04,                                     // 125\n    0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x01, // 126\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x09, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x0A, 0x40, 0x00,\n    0x09, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 129\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x09, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x0A, 0x40, 0x00,\n    0x09, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 130\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x09, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x0A, 0x41, 0x00,\n    0x09, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 131\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x81, 0x00, 0x00, 0x02, 0x03, 0x00, 0x02, 0x04, 0x00,\n    0x01, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 132\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x09, 0x02, 0x00, 0x0A, 0x02, 0x00, 0x0A, 0x06, 0x00,\n    0x09, 0x1A, 0x00, 0x10, 0x21, 0x00, 0xE0, 0x40, // 133\n    0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x90, 0x20, 0x00, 0x08, 0x41, 0x00, 0x09, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x0A, 0x42, 0x00,\n    0x09, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 134\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x09, 0x00, 0x00, 0xFA, 0x7F, 0x00, 0x0A, 0x00, 0x00, 0x09, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, // 135\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x06, 0x40, 0x00, 0x09, 0x40, 0x00, 0x09, 0x40, 0x00,\n    0x06, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 136\n    0x00, 0x40, 0x00, 0x08, 0x60, 0x00, 0x08, 0x58, 0x00, 0x09, 0x44, 0x00, 0x0A, 0x43, 0x00, 0x8A, 0x40, 0x00, 0x69, 0x40, 0x00,\n    0x18, 0x40, 0x00, 0x08, 0x40,                                                                                           // 137\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x48, 0x40, 0x00, 0x50, 0x40, 0x00, 0x50, 0x40, 0x00, 0x88, 0x20, // 138\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0xF8, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x38, // 139\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x48, 0x44, 0x00, 0x50, 0x44, 0x00, 0x50, 0x44, 0x00, 0x88, 0x24, 0x00,\n    0x00, 0x17,                                                                                                             // 140\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x88, 0x00, 0x00, 0x50, 0x00, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x80, 0x7F, // 141\n    0x00, 0x00, 0x00, 0xC8, 0x7F, 0x00, 0x90, 0x00, 0x00, 0x50, 0x00, 0x00, 0x48,                                           // 142\n    0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x48, 0x44, 0x00, 0x50, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x80, 0x38, // 143\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70,                         // 144\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x0C, 0x40, 0x00, 0x12, 0x40, 0x00, 0x12, 0x40, 0x00, 0x0C, 0x20, 0x00, 0xC0, 0x7F, // 145\n    0x40, 0x40, 0x00, 0x40, 0x60, 0x00, 0x48, 0x58, 0x00, 0x50, 0x44, 0x00, 0x50, 0x43, 0x00, 0xC8, 0x40, 0x00, 0x40, 0x40, // 146\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x02, 0x40, 0x00, 0x01, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40,                               // 147\n    0x00, 0x00, 0x00, 0xFA, 0x7F, 0x00, 0x01, // 148\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x38, 0x40, 0x00,\n    0x00, 0x40,                                                 // 149\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x38, // 150\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x0A, 0x02, 0x00, 0x09, 0x06, 0x00,\n    0x08, 0x1A, 0x00, 0x10, 0x21, 0x00, 0xE0, 0x40,                               // 151\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x50, 0x00, 0x00, 0x48, // 152\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xFF, 0x03,                         // 161\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x03, 0x40, 0xF0, 0x00, 0x40, 0x4E, 0x00, 0xC0, 0x41, 0x00, 0xB8, 0x20, 0x00,\n    0x00, 0x11, // 162\n    0x00, 0x41, 0x00, 0xE0, 0x31, 0x00, 0x10, 0x2F, 0x00, 0x08, 0x21, 0x00, 0x08, 0x21, 0x00, 0x08, 0x40, 0x00, 0x10, 0x40, 0x00,\n    0x20, 0x20,                                                                                                             // 163\n    0x00, 0x00, 0x00, 0x40, 0x0B, 0x00, 0x80, 0x04, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00, 0x80, 0x04, 0x00, 0x40, 0x0B, // 164\n    0x08, 0x0A, 0x00, 0x10, 0x0A, 0x00, 0x60, 0x0A, 0x00, 0x80, 0x0B, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x0B, 0x00, 0x60, 0x0A, 0x00,\n    0x10, 0x0A, 0x00, 0x08, 0x0A,       // 165\n    0x00, 0x00, 0x00, 0xF8, 0xF1, 0x03, // 166\n    0x00, 0x86, 0x00, 0x70, 0x09, 0x01, 0xC8, 0x10, 0x02, 0x88, 0x10, 0x02, 0x08, 0x21, 0x02, 0x08, 0x61, 0x02, 0x30, 0xD2, 0x01,\n    0x00, 0x0C,                               // 167\n    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // 168\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xC8, 0x47, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00,\n    0x28, 0x48, 0x00, 0x48, 0x44, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F,                                     // 169\n    0xD0, 0x00, 0x00, 0x48, 0x01, 0x00, 0x28, 0x01, 0x00, 0x28, 0x01, 0x00, 0xF0, 0x01,                                     // 170\n    0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, // 171\n    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00,\n    0x80, 0x0F,                                                       // 172\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 173\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xE8, 0x4F, 0x00, 0x28, 0x41, 0x00, 0x28, 0x41, 0x00, 0x28, 0x43, 0x00,\n    0x28, 0x45, 0x00, 0xC8, 0x48, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 174\n    0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x04,                                                       // 175\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x48, 0x00, 0x00, 0x48, 0x00, 0x00, 0x30, // 176\n    0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0xE0, 0x4F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41,                                                                         // 177\n    0x10, 0x01, 0x00, 0x88, 0x01, 0x00, 0x48, 0x01, 0x00, 0x48, 0x01, 0x00, 0x30, 0x01, // 178\n    0x90, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x28, 0x01, 0x00, 0xD8,       // 179\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08,                         // 180\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00,\n    0xC0, 0x7F, // 181\n    0xF0, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0xF8, 0xFF, 0x03, 0x08,                                                       // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,                               // 183\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03,       // 184\n    0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x01,             // 185\n    0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0xF0, // 186\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00,\n    0x00, 0x04, // 187\n    0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x40, 0x00, 0xF8, 0x21, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00,\n    0x80, 0x01, 0x00, 0x40, 0x30, 0x00, 0x30, 0x28, 0x00, 0x08, 0x24, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x20, // 188\n    0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x40, 0x00, 0xF8, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00,\n    0x80, 0x00, 0x00, 0x60, 0x44, 0x00, 0x10, 0x62, 0x00, 0x08, 0x52, 0x00, 0x00, 0x52, 0x00, 0x00, 0x4C, // 189\n    0x90, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x41, 0x00, 0x28, 0x21, 0x00, 0xD8, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00,\n    0x80, 0x00, 0x00, 0x40, 0x30, 0x00, 0x30, 0x28, 0x00, 0x08, 0x24, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x20, // 190\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x10, 0x01, 0x00, 0x08, 0x02, 0x40, 0x07, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02,\n    0x00, 0x00, 0x01, 0x00, 0xC0, // 191\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x71, 0x04, 0x00, 0x0A, 0x04, 0x00, 0x70, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 192\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x0A, 0x04, 0x00, 0x71, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 193\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x72, 0x04, 0x00, 0x09, 0x04, 0x00, 0x71, 0x04, 0x00,\n    0x82, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 194\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x72, 0x04, 0x00, 0x09, 0x04, 0x00, 0x72, 0x04, 0x00,\n    0x81, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 195\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x72, 0x04, 0x00, 0x08, 0x04, 0x00, 0x72, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 196\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x7E, 0x04, 0x00, 0x0A, 0x04, 0x00, 0x7E, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 197\n    0x00, 0x60, 0x00, 0x00, 0x18, 0x00, 0x00, 0x06, 0x00, 0x80, 0x05, 0x00, 0x60, 0x04, 0x00, 0x18, 0x04, 0x00, 0x08, 0x04, 0x00,\n    0x08, 0x04, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, // 198\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x02, 0x08, 0xC0, 0x02,\n    0x08, 0x40, 0x03, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 199\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x09, 0x41, 0x00, 0x0A, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 200\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x09, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 201\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x09, 0x41, 0x00, 0x09, 0x41, 0x00,\n    0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 202\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40,             // 203\n    0x01, 0x00, 0x00, 0xFA, 0x7F,                               // 204\n    0x00, 0x00, 0x00, 0xFA, 0x7F, 0x00, 0x01,                   // 205\n    0x02, 0x00, 0x00, 0xF9, 0x7F, 0x00, 0x01, 0x00, 0x00, 0x02, // 206\n    0x02, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x02,                   // 207\n    0x00, 0x02, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 208\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x82, 0x00, 0x00, 0x01, 0x03, 0x00, 0x02, 0x04, 0x00,\n    0x01, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 209\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x09, 0x40, 0x00, 0x0A, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 210\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 211\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x09, 0x40, 0x00,\n    0x0A, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 212\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x0A, 0x40, 0x00,\n    0x09, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 213\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x0A, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 214\n    0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x05, 0x00, 0x80, 0x08, 0x00,\n    0x40, 0x10, // 215\n    0x00, 0x00, 0x00, 0xC0, 0x4F, 0x00, 0x20, 0x30, 0x00, 0x10, 0x30, 0x00, 0x08, 0x4C, 0x00, 0x08, 0x42, 0x00, 0x08, 0x41, 0x00,\n    0xC8, 0x40, 0x00, 0x30, 0x20, 0x00, 0x30, 0x10, 0x00, 0xC8, 0x0F, // 216\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x01, 0x40, 0x00, 0x02, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 217\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x01, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 218\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00,\n    0x02, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 219\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 220\n    0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x02, 0x7E, 0x00, 0x81, 0x01, 0x00, 0x40, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x08, // 221\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00,\n    0x20, 0x10, 0x00, 0x40, 0x08, 0x00, 0x80, 0x07, // 222\n    0x00, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x08, 0x20, 0x00, 0x88, 0x43, 0x00, 0x70, 0x42, 0x00, 0x00, 0x44, 0x00,\n    0x00, 0x38, // 223\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x48, 0x44, 0x00, 0x50, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 224\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 225\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x48, 0x42, 0x00, 0x50, 0x22, 0x00,\n    0x80, 0x7F, // 226\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x50, 0x42, 0x00, 0x48, 0x22, 0x00,\n    0x80, 0x7F, // 227\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x50, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 228\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x5C, 0x44, 0x00, 0x54, 0x44, 0x00, 0x5C, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 229\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x3F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00, 0x00, 0x17, // 230\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x02, 0x40, 0xC0, 0x02, 0x40, 0x40, 0x03, 0x80, 0x20, // 231\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x48, 0x44, 0x00, 0x50, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17, // 232\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17, // 233\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x48, 0x44, 0x00, 0x90, 0x24, 0x00,\n    0x00, 0x17, // 234\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x50, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17,                                                 // 235\n    0x08, 0x00, 0x00, 0xD0, 0x7F,                               // 236\n    0x00, 0x00, 0x00, 0xD0, 0x7F, 0x00, 0x08,                   // 237\n    0x10, 0x00, 0x00, 0xC8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x10, // 238\n    0x10, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x10,                   // 239\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0xA0, 0x20, 0x00, 0x68, 0x40, 0x00, 0x58, 0x40, 0x00, 0x70, 0x40, 0x00, 0xE8, 0x20, 0x00,\n    0x00, 0x1F,                                                                                                             // 240\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x90, 0x00, 0x00, 0x48, 0x00, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x80, 0x7F, // 241\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x48, 0x40, 0x00, 0x50, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 242\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 243\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x48, 0x40, 0x00, 0x90, 0x20, 0x00,\n    0x00, 0x1F, // 244\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x50, 0x40, 0x00, 0x88, 0x20, 0x00,\n    0x00, 0x1F, // 245\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x50, 0x40, 0x00, 0x40, 0x40, 0x00, 0x50, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 246\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x80, 0x0A, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x02, // 247\n    0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x80, 0x30, 0x00, 0x40, 0x48, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x80, 0x21, 0x00,\n    0x40, 0x1F,                                                                                                             // 248\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 249\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x10, 0x40, 0x00, 0x08, 0x20, 0x00, 0xC0, 0x7F, // 250\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x10, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0xC0, 0x7F, // 251\n    0x00, 0x00, 0x00, 0xD0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x10, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 252\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x10, 0xE0, 0x01, 0x08, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0,       // 253\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F,                                                                                                       // 254\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x10, 0x38, 0x02, 0x00, 0xE0, 0x01, 0x10, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0, // 255\n};\n\nconst uint8_t ArialMT_Plain_24_CS[] PROGMEM = {\n    0x18, // Width: 24\n    0x1C, // Height: 28\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x06, // 32\n    0x00, 0x00, 0x13, 0x06, // 33\n    0x00, 0x13, 0x1A, 0x08, // 34\n    0x00, 0x2D, 0x33, 0x0E, // 35\n    0x00, 0x60, 0x2F, 0x0D, // 36\n    0x00, 0x8F, 0x4F, 0x15, // 37\n    0x00, 0xDE, 0x3B, 0x10, // 38\n    0x01, 0x19, 0x0A, 0x04, // 39\n    0x01, 0x23, 0x1C, 0x08, // 40\n    0x01, 0x3F, 0x1B, 0x08, // 41\n    0x01, 0x5A, 0x21, 0x0A, // 42\n    0x01, 0x7B, 0x32, 0x0E, // 43\n    0x01, 0xAD, 0x10, 0x05, // 44\n    0x01, 0xBD, 0x1B, 0x08, // 45\n    0x01, 0xD8, 0x0F, 0x05, // 46\n    0x01, 0xE7, 0x19, 0x08, // 47\n    0x02, 0x00, 0x2F, 0x0D, // 48\n    0x02, 0x2F, 0x23, 0x0A, // 49\n    0x02, 0x52, 0x2F, 0x0D, // 50\n    0x02, 0x81, 0x2F, 0x0D, // 51\n    0x02, 0xB0, 0x2F, 0x0D, // 52\n    0x02, 0xDF, 0x2F, 0x0D, // 53\n    0x03, 0x0E, 0x2F, 0x0D, // 54\n    0x03, 0x3D, 0x2D, 0x0D, // 55\n    0x03, 0x6A, 0x2F, 0x0D, // 56\n    0x03, 0x99, 0x2F, 0x0D, // 57\n    0x03, 0xC8, 0x0F, 0x05, // 58\n    0x03, 0xD7, 0x10, 0x05, // 59\n    0x03, 0xE7, 0x2F, 0x0D, // 60\n    0x04, 0x16, 0x2F, 0x0D, // 61\n    0x04, 0x45, 0x2E, 0x0D, // 62\n    0x04, 0x73, 0x2E, 0x0D, // 63\n    0x04, 0xA1, 0x5B, 0x18, // 64\n    0x04, 0xFC, 0x3B, 0x10, // 65\n    0x05, 0x37, 0x3B, 0x10, // 66\n    0x05, 0x72, 0x3F, 0x11, // 67\n    0x05, 0xB1, 0x3F, 0x11, // 68\n    0x05, 0xF0, 0x3B, 0x10, // 69\n    0x06, 0x2B, 0x35, 0x0F, // 70\n    0x06, 0x60, 0x43, 0x12, // 71\n    0x06, 0xA3, 0x3B, 0x10, // 72\n    0x06, 0xDE, 0x0F, 0x05, // 73\n    0x06, 0xED, 0x27, 0x0B, // 74\n    0x07, 0x14, 0x3F, 0x11, // 75\n    0x07, 0x53, 0x2F, 0x0D, // 76\n    0x07, 0x82, 0x43, 0x12, // 77\n    0x07, 0xC5, 0x3B, 0x10, // 78\n    0x08, 0x00, 0x47, 0x13, // 79\n    0x08, 0x47, 0x3A, 0x10, // 80\n    0x08, 0x81, 0x47, 0x13, // 81\n    0x08, 0xC8, 0x3F, 0x11, // 82\n    0x09, 0x07, 0x3B, 0x10, // 83\n    0x09, 0x42, 0x35, 0x0F, // 84\n    0x09, 0x77, 0x3B, 0x10, // 85\n    0x09, 0xB2, 0x39, 0x10, // 86\n    0x09, 0xEB, 0x59, 0x18, // 87\n    0x0A, 0x44, 0x3B, 0x10, // 88\n    0x0A, 0x7F, 0x3D, 0x11, // 89\n    0x0A, 0xBC, 0x37, 0x0F, // 90\n    0x0A, 0xF3, 0x14, 0x06, // 91\n    0x0B, 0x07, 0x1B, 0x08, // 92\n    0x0B, 0x22, 0x18, 0x07, // 93\n    0x0B, 0x3A, 0x2A, 0x0C, // 94\n    0x0B, 0x64, 0x34, 0x0E, // 95\n    0x0B, 0x98, 0x11, 0x06, // 96\n    0x0B, 0xA9, 0x2F, 0x0D, // 97\n    0x0B, 0xD8, 0x33, 0x0E, // 98\n    0x0C, 0x0B, 0x2B, 0x0C, // 99\n    0x0C, 0x36, 0x2F, 0x0D, // 100\n    0x0C, 0x65, 0x2F, 0x0D, // 101\n    0x0C, 0x94, 0x1A, 0x08, // 102\n    0x0C, 0xAE, 0x2F, 0x0D, // 103\n    0x0C, 0xDD, 0x2F, 0x0D, // 104\n    0x0D, 0x0C, 0x0F, 0x05, // 105\n    0x0D, 0x1B, 0x10, 0x05, // 106\n    0x0D, 0x2B, 0x2F, 0x0D, // 107\n    0x0D, 0x5A, 0x0F, 0x05, // 108\n    0x0D, 0x69, 0x47, 0x13, // 109\n    0x0D, 0xB0, 0x2F, 0x0D, // 110\n    0x0D, 0xDF, 0x2F, 0x0D, // 111\n    0x0E, 0x0E, 0x33, 0x0E, // 112\n    0x0E, 0x41, 0x30, 0x0D, // 113\n    0x0E, 0x71, 0x1E, 0x09, // 114\n    0x0E, 0x8F, 0x2B, 0x0C, // 115\n    0x0E, 0xBA, 0x1B, 0x08, // 116\n    0x0E, 0xD5, 0x2F, 0x0D, // 117\n    0x0F, 0x04, 0x2A, 0x0C, // 118\n    0x0F, 0x2E, 0x42, 0x12, // 119\n    0x0F, 0x70, 0x2B, 0x0C, // 120\n    0x0F, 0x9B, 0x2A, 0x0C, // 121\n    0x0F, 0xC5, 0x2B, 0x0C, // 122\n    0x0F, 0xF0, 0x1C, 0x08, // 123\n    0x10, 0x0C, 0x10, 0x05, // 124\n    0x10, 0x1C, 0x1B, 0x08, // 125\n    0x10, 0x37, 0x32, 0x0E, // 126\n    0xFF, 0xFF, 0x00, 0x18, // 127\n    0xFF, 0xFF, 0x00, 0x18, // 128\n    0x10, 0x69, 0x3F, 0x11, // 129\n    0x10, 0xA8, 0x3F, 0x11, // 130\n    0x10, 0xE7, 0x3B, 0x10, // 131\n    0x11, 0x22, 0x3B, 0x10, // 132\n    0x11, 0x5D, 0x3F, 0x11, // 133\n    0x11, 0x9C, 0x3B, 0x10, // 134\n    0x11, 0xD7, 0x35, 0x0F, // 135\n    0x12, 0x0C, 0x3B, 0x10, // 136\n    0x12, 0x47, 0x37, 0x0F, // 137\n    0x12, 0x7E, 0x2B, 0x0C, // 138\n    0x12, 0xA9, 0x3A, 0x10, // 139\n    0x12, 0xE3, 0x2F, 0x0D, // 140\n    0x13, 0x12, 0x2F, 0x0D, // 141\n    0x13, 0x41, 0x1E, 0x09, // 142\n    0x13, 0x5F, 0x2B, 0x0C, // 143\n    0x13, 0x8A, 0x26, 0x0B, // 144\n    0x13, 0xB0, 0x2F, 0x0D, // 145\n    0x13, 0xDF, 0x2B, 0x0C, // 146\n    0x14, 0x0A, 0x2F, 0x0D, // 147\n    0x14, 0x39, 0x15, 0x07, // 148\n    0x14, 0x4E, 0x2F, 0x0D, // 149\n    0x14, 0x7D, 0x1A, 0x08, // 150\n    0x14, 0x97, 0x3F, 0x11, // 151\n    0x14, 0xD6, 0x1E, 0x09, // 152\n    0xFF, 0xFF, 0x00, 0x18, // 153\n    0xFF, 0xFF, 0x00, 0x18, // 154\n    0xFF, 0xFF, 0x00, 0x18, // 155\n    0xFF, 0xFF, 0x00, 0x18, // 156\n    0xFF, 0xFF, 0x00, 0x18, // 157\n    0xFF, 0xFF, 0x00, 0x18, // 158\n    0xFF, 0xFF, 0x00, 0x18, // 159\n    0xFF, 0xFF, 0x00, 0x18, // 160\n    0x14, 0xF4, 0x14, 0x06, // 161\n    0x15, 0x08, 0x2B, 0x0C, // 162\n    0x15, 0x33, 0x2F, 0x0D, // 163\n    0x15, 0x62, 0x33, 0x0E, // 164\n    0x15, 0x95, 0x31, 0x0E, // 165\n    0x15, 0xC6, 0x10, 0x05, // 166\n    0x15, 0xD6, 0x2F, 0x0D, // 167\n    0x16, 0x05, 0x19, 0x08, // 168\n    0x16, 0x1E, 0x46, 0x13, // 169\n    0x16, 0x64, 0x1A, 0x08, // 170\n    0x16, 0x7E, 0x27, 0x0B, // 171\n    0x16, 0xA5, 0x2F, 0x0D, // 172\n    0x16, 0xD4, 0x1B, 0x08, // 173\n    0x16, 0xEF, 0x46, 0x13, // 174\n    0x17, 0x35, 0x31, 0x0E, // 175\n    0x17, 0x66, 0x1E, 0x09, // 176\n    0x17, 0x84, 0x33, 0x0E, // 177\n    0x17, 0xB7, 0x1A, 0x08, // 178\n    0x17, 0xD1, 0x1A, 0x08, // 179\n    0x17, 0xEB, 0x19, 0x08, // 180\n    0x18, 0x04, 0x2F, 0x0D, // 181\n    0x18, 0x33, 0x31, 0x0E, // 182\n    0x18, 0x64, 0x12, 0x06, // 183\n    0x18, 0x76, 0x18, 0x07, // 184\n    0x18, 0x8E, 0x16, 0x07, // 185\n    0x18, 0xA4, 0x1E, 0x09, // 186\n    0x18, 0xC2, 0x2E, 0x0D, // 187\n    0x18, 0xF0, 0x4F, 0x15, // 188\n    0x19, 0x3F, 0x4B, 0x14, // 189\n    0x19, 0x8A, 0x4B, 0x14, // 190\n    0x19, 0xD5, 0x33, 0x0E, // 191\n    0x1A, 0x08, 0x3B, 0x10, // 192\n    0x1A, 0x43, 0x3B, 0x10, // 193\n    0x1A, 0x7E, 0x3B, 0x10, // 194\n    0x1A, 0xB9, 0x3B, 0x10, // 195\n    0x1A, 0xF4, 0x3B, 0x10, // 196\n    0x1B, 0x2F, 0x3B, 0x10, // 197\n    0x1B, 0x6A, 0x5B, 0x18, // 198\n    0x1B, 0xC5, 0x3F, 0x11, // 199\n    0x1C, 0x04, 0x3B, 0x10, // 200\n    0x1C, 0x3F, 0x3B, 0x10, // 201\n    0x1C, 0x7A, 0x3B, 0x10, // 202\n    0x1C, 0xB5, 0x3B, 0x10, // 203\n    0x1C, 0xF0, 0x11, 0x06, // 204\n    0x1D, 0x01, 0x11, 0x06, // 205\n    0x1D, 0x12, 0x15, 0x07, // 206\n    0x1D, 0x27, 0x15, 0x07, // 207\n    0x1D, 0x3C, 0x3F, 0x11, // 208\n    0x1D, 0x7B, 0x3B, 0x10, // 209\n    0x1D, 0xB6, 0x47, 0x13, // 210\n    0x1D, 0xFD, 0x47, 0x13, // 211\n    0x1E, 0x44, 0x47, 0x13, // 212\n    0x1E, 0x8B, 0x47, 0x13, // 213\n    0x1E, 0xD2, 0x47, 0x13, // 214\n    0x1F, 0x19, 0x2B, 0x0C, // 215\n    0x1F, 0x44, 0x47, 0x13, // 216\n    0x1F, 0x8B, 0x3B, 0x10, // 217\n    0x1F, 0xC6, 0x3B, 0x10, // 218\n    0x20, 0x01, 0x3B, 0x10, // 219\n    0x20, 0x3C, 0x3B, 0x10, // 220\n    0x20, 0x77, 0x3D, 0x11, // 221\n    0x20, 0xB4, 0x3A, 0x10, // 222\n    0x20, 0xEE, 0x37, 0x0F, // 223\n    0x21, 0x25, 0x2F, 0x0D, // 224\n    0x21, 0x54, 0x2F, 0x0D, // 225\n    0x21, 0x83, 0x2F, 0x0D, // 226\n    0x21, 0xB2, 0x2F, 0x0D, // 227\n    0x21, 0xE1, 0x2F, 0x0D, // 228\n    0x22, 0x10, 0x2F, 0x0D, // 229\n    0x22, 0x3F, 0x53, 0x16, // 230\n    0x22, 0x92, 0x2B, 0x0C, // 231\n    0x22, 0xBD, 0x2F, 0x0D, // 232\n    0x22, 0xEC, 0x2F, 0x0D, // 233\n    0x23, 0x1B, 0x2F, 0x0D, // 234\n    0x23, 0x4A, 0x2F, 0x0D, // 235\n    0x23, 0x79, 0x11, 0x06, // 236\n    0x23, 0x8A, 0x11, 0x06, // 237\n    0x23, 0x9B, 0x15, 0x07, // 238\n    0x23, 0xB0, 0x15, 0x07, // 239\n    0x23, 0xC5, 0x2F, 0x0D, // 240\n    0x23, 0xF4, 0x2F, 0x0D, // 241\n    0x24, 0x23, 0x2F, 0x0D, // 242\n    0x24, 0x52, 0x2F, 0x0D, // 243\n    0x24, 0x81, 0x2F, 0x0D, // 244\n    0x24, 0xB0, 0x2F, 0x0D, // 245\n    0x24, 0xDF, 0x2F, 0x0D, // 246\n    0x25, 0x0E, 0x32, 0x0E, // 247\n    0x25, 0x40, 0x33, 0x0E, // 248\n    0x25, 0x73, 0x2F, 0x0D, // 249\n    0x25, 0xA2, 0x2F, 0x0D, // 250\n    0x25, 0xD1, 0x2F, 0x0D, // 251\n    0x26, 0x00, 0x2F, 0x0D, // 252\n    0x26, 0x2F, 0x2A, 0x0C, // 253\n    0x26, 0x59, 0x2F, 0x0D, // 254\n    0x26, 0x88, 0x2A, 0x0C, // 255\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x33, 0x00, 0xE0, 0xFF, 0x33, // 33\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,\n    0x07, 0x00, 0x00, 0xE0, 0x07, // 34\n    0x00, 0x0C, 0x03, 0x00, 0x00, 0x0C, 0x33, 0x00, 0x00, 0x0C, 0x3F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0xE0,\n    0x0F, 0x03, 0x00, 0x60, 0x0C, 0x33, 0x00, 0x00, 0x0C, 0x3F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0xE0, 0x0F,\n    0x03, 0x00, 0x60, 0x0C, 0x03, 0x00, 0x00, 0x0C, 0x03, // 35\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x06, 0x00, 0xC0, 0x0F, 0x1E, 0x00, 0xC0, 0x18, 0x1C, 0x00, 0x60, 0x18, 0x38, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0xF0, 0xFF, 0xFF, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x60, 0x38, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xC1,\n    0x1F, 0x00, 0x00, 0x81, 0x07, // 36\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20,\n    0x20, 0x20, 0x00, 0x60, 0x30, 0x38, 0x00, 0xC0, 0x1F, 0x1E, 0x00, 0x80, 0x8F, 0x0F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0,\n    0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x8F, 0x0F, 0x00, 0xC0, 0xC3, 0x1F, 0x00, 0xE0, 0x60, 0x30, 0x00, 0x20, 0x20, 0x20,\n    0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x0F, // 37\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x80, 0xE3, 0x1C, 0x00, 0xC0, 0x77, 0x38, 0x00, 0xE0,\n    0x3C, 0x30, 0x00, 0x60, 0x38, 0x30, 0x00, 0x60, 0x78, 0x30, 0x00, 0xE0, 0xEC, 0x38, 0x00, 0xC0, 0x8F, 0x1B, 0x00, 0x80, 0x03,\n    0x1F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xC0, 0x38, 0x00, 0x00, 0x00, 0x10, // 38\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07,                                           // 39\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x80, 0x0F, 0xF0, 0x01, 0xC0, 0x01, 0x80, 0x03, 0x60,\n    0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x04, // 40\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x06, 0xC0, 0x01, 0x80, 0x03, 0x80, 0x0F, 0xF0, 0x01, 0x00,\n    0xFE, 0x7F, 0x00, 0x00, 0xF0, 0x0F, // 41\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x80, // 42\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n    0x60, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,                                                 // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0xF0, 0x01, // 44\n    0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01,                                                       // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 46\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x60, // 47\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0xFF,\n    0x0F, 0x00, 0x00, 0xFE, 0x03, // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 49\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0xC0, 0x03, 0x38, 0x00, 0xC0, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x36, 0x00, 0x60,\n    0x00, 0x33, 0x00, 0x60, 0x80, 0x31, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0x60, 0x30, 0x00, 0xC0, 0x30, 0x30, 0x00, 0xC0, 0x1F,\n    0x30, 0x00, 0x00, 0x0F, 0x30, // 50\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0xC0, 0x01, 0x0E, 0x00, 0xC0, 0x00, 0x1C, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0xC0, 0x38, 0x30, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0x80, 0xC7,\n    0x0F, 0x00, 0x00, 0x80, 0x07, // 51\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x3C, 0x03, 0x00, 0x00,\n    0x0E, 0x03, 0x00, 0x80, 0x07, 0x03, 0x00, 0xC0, 0x01, 0x03, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x00, 0x03, // 52\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x80, 0x3F, 0x0E, 0x00, 0xE0, 0x1F, 0x18, 0x00, 0x60, 0x08, 0x30, 0x00, 0x60,\n    0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x1C, 0x00, 0x60, 0xF0,\n    0x0F, 0x00, 0x00, 0xE0, 0x03, // 53\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x03, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x63, 0x1C, 0x00, 0xC0, 0x30, 0x38, 0x00, 0x60,\n    0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0xE0, 0x30, 0x18, 0x00, 0xC0, 0xF1,\n    0x0F, 0x00, 0x80, 0xC1, 0x07, // 54\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60,\n    0x80, 0x3F, 0x00, 0x60, 0xE0, 0x03, 0x00, 0x60, 0x78, 0x00, 0x00, 0x60, 0x0E, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0xE0, 0x01,\n    0x00, 0x00, 0x60, // 55\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0xE0, 0x38, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0xE0, 0x38, 0x30, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0x80, 0xC7,\n    0x1F, 0x00, 0x00, 0x80, 0x07, // 56\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x0C, 0x00, 0x80, 0x7F, 0x1C, 0x00, 0xC0, 0x61, 0x38, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60,\n    0xC0, 0x30, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0x60, 0x18, 0x00, 0xC0, 0x31, 0x1E, 0x00, 0x80, 0xFF,\n    0x0F, 0x00, 0x00, 0xFE, 0x01,                                                                   // 57\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30,       // 58\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x03, 0x00, 0x06, 0xF0, 0x01, // 59\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00,\n    0xD8, 0x00, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06,\n    0x03, 0x00, 0x00, 0x03, 0x06, // 60\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00,\n    0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C,\n    0x01, 0x00, 0x00, 0x8C, 0x01, // 61\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00,\n    0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x70,\n    0x00, 0x00, 0x00, 0x20, // 62\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60,\n    0x80, 0x33, 0x00, 0x60, 0xC0, 0x33, 0x00, 0x60, 0xE0, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xC0, 0x38, 0x00, 0x00, 0xC0, 0x1F,\n    0x00, 0x00, 0x00, 0x07, // 63\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x1E, 0xF0, 0x00, 0x00, 0x07, 0xC0, 0x01, 0x80,\n    0xC3, 0x87, 0x01, 0xC0, 0xF1, 0x9F, 0x03, 0xC0, 0x38, 0x18, 0x03, 0xC0, 0x0C, 0x30, 0x03, 0x60, 0x0E, 0x30, 0x06, 0x60, 0x06,\n    0x30, 0x06, 0x60, 0x06, 0x18, 0x06, 0x60, 0x06, 0x0C, 0x06, 0x60, 0x0C, 0x1E, 0x06, 0x60, 0xF8, 0x3F, 0x06, 0xE0, 0xFE, 0x31,\n    0x06, 0xC0, 0x0E, 0x30, 0x06, 0xC0, 0x01, 0x18, 0x03, 0x80, 0x03, 0x1C, 0x03, 0x00, 0x07, 0x8F, 0x01, 0x00, 0xFE, 0x87, 0x01,\n    0x00, 0xF8, 0xC1, 0x00, 0x00, 0x00, 0x40, // 64\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80,\n    0x8F, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0x00, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 65\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0xC0, 0x78, 0x30, 0x00, 0xC0, 0xFF, 0x18, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0x00, 0x80, 0x07, // 66\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02,\n    0x03, // 67\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0xE0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0E, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC,\n    0x01, // 68\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 69\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30,\n    0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, // 70\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x60,\n    0x30, 0x00, 0x60, 0x60, 0x30, 0x00, 0xE0, 0x60, 0x38, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0x61, 0x18, 0x00, 0x80, 0xE3, 0x0F,\n    0x00, 0x00, 0xE2, 0x0F, // 71\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 72\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F,             // 73\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, // 74\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00,\n    0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xE7, 0x01, 0x00, 0x80, 0x83,\n    0x07, 0x00, 0xC0, 0x01, 0x0F, 0x00, 0xE0, 0x00, 0x1E, 0x00, 0x60, 0x00, 0x38, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x20, // 75\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, // 76\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0,\n    0x0F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x3F, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x3F,\n    0x00, 0xE0, 0xFF, 0x3F, // 77\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 78\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 79\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,\n    0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,\n    0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0x0F, // 80\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x0C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x36, 0x00, 0x60, 0x00, 0x36, 0x00, 0xE0, 0x00, 0x3C, 0x00, 0xC0, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x3F,\n    0x00, 0x00, 0xFF, 0x77, 0x00, 0x00, 0xFC, 0x61, // 81\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x70, 0x00, 0x00, 0x60, 0xF0, 0x00, 0x00, 0x60, 0xF0,\n    0x03, 0x00, 0x60, 0xB0, 0x07, 0x00, 0xE0, 0x18, 0x1F, 0x00, 0xC0, 0x1F, 0x3C, 0x00, 0x80, 0x0F, 0x30, 0x00, 0x00, 0x00,\n    0x20, // 82\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x0F, 0x00, 0xC0, 0x1F, 0x1C, 0x00, 0xC0, 0x18, 0x18, 0x00, 0x60,\n    0x38, 0x38, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x70,\n    0x30, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xE1, 0x18, 0x00, 0x80, 0xC3, 0x0F, 0x00, 0x00, 0x83, 0x07, // 83\n    0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 84\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 85\n    0x20, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00,\n    0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF8,\n    0x01, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x20, // 86\n    0x60, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x03,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xE0, 0x0F,\n    0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x80, 0xFF, 0x00, 0x00,\n    0xE0, 0x07, 0x00, 0x00, 0x60, // 87\n    0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x30, 0x00, 0x60, 0x00, 0x3C, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0xC0, 0x83, 0x07, 0x00, 0x00,\n    0xCF, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xCF, 0x03, 0x00, 0xC0, 0x03,\n    0x07, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, // 88\n    0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x1E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E,\n    0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, // 89\n    0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x38, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x37, 0x00, 0x60, 0x80, 0x33, 0x00, 0x60,\n    0xC0, 0x31, 0x00, 0x60, 0xE0, 0x30, 0x00, 0x60, 0x38, 0x30, 0x00, 0x60, 0x1C, 0x30, 0x00, 0x60, 0x0E, 0x30, 0x00, 0x60, 0x07,\n    0x30, 0x00, 0xE0, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30,                                           // 90\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, // 91\n    0x60, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00,\n    0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 92\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, 0xE0, 0xFF, 0xFF, 0x07, 0xE0,\n    0xFF, 0xFF, 0x07, // 93\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xE0,\n    0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,\n    0x20, // 94\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00,\n    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,                                           // 95\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x80, // 96\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00,\n    0x86, 0x31, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x18, 0x00, 0x00, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 97\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00,\n    0x0C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C,\n    0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xE0, 0x03, // 98\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x18,\n    0x0C, // 99\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0xE0, 0xFF,\n    0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04, // 101\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x06, 0x00, 0x00, 0x60,\n    0x06, 0x00, 0x00, 0x60, 0x06, // 102\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x83, 0x01, 0x00, 0xF8, 0x8F, 0x03, 0x00, 0x1C, 0x1C, 0x07, 0x00, 0x0E, 0x38, 0x06, 0x00,\n    0x06, 0x30, 0x06, 0x00, 0x06, 0x30, 0x06, 0x00, 0x06, 0x30, 0x06, 0x00, 0x0C, 0x18, 0x07, 0x00, 0x18, 0x8C, 0x03, 0x00, 0xFE,\n    0xFF, 0x01, 0x00, 0xFE, 0xFF, // 103\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xF8, 0x3F,                                                                   // 104\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F,       // 105\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x60, 0xFE, 0xFF, 0x07, 0x60, 0xFE, 0xFF, 0x03, // 106\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xE0, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0x0C, 0x0E, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x02,\n    0x30, 0x00, 0x00, 0x00, 0x20,                                                             // 107\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 108\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00,\n    0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, // 109\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xF8, 0x3F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 111\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x18, 0x0C, 0x00, 0x00,\n    0x0C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C,\n    0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xE0, 0x03, // 112\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0xFE,\n    0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, // 113\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, // 114\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0C, 0x00, 0x00, 0x7C, 0x1C, 0x00, 0x00, 0xEE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x31, 0x00, 0x00, 0xC6, 0x31, 0x00, 0x00, 0x8E, 0x39, 0x00, 0x00, 0x9C, 0x1F, 0x00, 0x00, 0x18,\n    0x0F, // 115\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, // 116\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 117\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,\n    0x06, // 118\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,\n    0x80, 0x1F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x7E, 0x00,\n    0x00, 0x00, 0x0E, // 119\n    0x00, 0x02, 0x20, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00,\n    0xC0, 0x01, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x02,\n    0x20, // 120\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0x00, 0xF0, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x07, 0x00,\n    0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,\n    0x06, // 121\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x3E, 0x00, 0x00, 0x06, 0x37, 0x00, 0x00,\n    0xC6, 0x33, 0x00, 0x00, 0xE6, 0x30, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x3E, 0x30, 0x00, 0x00, 0x1E, 0x30, 0x00, 0x00, 0x06,\n    0x30, // 122\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x03, 0x00, 0xC0, 0x7F, 0xFE, 0x03, 0xE0, 0x3F, 0xFC, 0x07, 0x60,\n    0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06,                                                       // 123\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0xE0, 0xFF, 0xFF, 0x0F, // 124\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, 0xE0, 0x3F, 0xFC, 0x07, 0xC0, 0x7F, 0xFF, 0x03, 0x00,\n    0xC0, 0x03, 0x00, 0x00, 0x80, 0x01, // 125\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60, // 126\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0x62, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x66, 0x00,\n    0x30, 0x00, 0x62, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02,\n    0x03, // 129\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0x62, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x66, 0x00,\n    0x30, 0x00, 0xE2, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0E, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC,\n    0x01, // 130\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x62, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x66, 0x30,\n    0x30, 0x00, 0x62, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 131\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x02, 0x0E, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x0C, 0x70, 0x00, 0x00, 0x0C, 0xE0, 0x01, 0x00, 0x06, 0x80,\n    0x03, 0x00, 0x02, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 132\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x62, 0x30, 0x00, 0x00, 0x66, 0x30, 0x00, 0x00, 0x6C, 0x70, 0x00, 0x00, 0x6C, 0xF0, 0x00, 0x00, 0x66, 0xF0,\n    0x03, 0x00, 0x62, 0xB0, 0x07, 0x00, 0xE0, 0x18, 0x1F, 0x00, 0xC0, 0x1F, 0x3C, 0x00, 0x80, 0x0F, 0x30, 0x00, 0x00, 0x00,\n    0x20, // 133\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x0F, 0x00, 0xC0, 0x1F, 0x1C, 0x00, 0xC0, 0x18, 0x18, 0x00, 0x62,\n    0x38, 0x38, 0x00, 0x66, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x62, 0x70,\n    0x30, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xE1, 0x18, 0x00, 0x80, 0xC3, 0x0F, 0x00, 0x00, 0x83, 0x07, // 134\n    0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x66,\n    0x00, 0x00, 0x00, 0xEC, 0xFF, 0x3F, 0x00, 0xEC, 0xFF, 0x3F, 0x00, 0x66, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 135\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x1B, 0x00, 0x30, 0x00, 0x11, 0x00, 0x30, 0x00, 0x1B, 0x00, 0x30, 0x00, 0x0E, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 136\n    0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x38, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x37, 0x00, 0x60, 0x80, 0x33, 0x00, 0x62,\n    0xC0, 0x31, 0x00, 0x66, 0xE0, 0x30, 0x00, 0x6C, 0x38, 0x30, 0x00, 0x6C, 0x1C, 0x30, 0x00, 0x66, 0x0E, 0x30, 0x00, 0x62, 0x07,\n    0x30, 0x00, 0xE0, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, // 137\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x20, 0x0E, 0x38, 0x00, 0x60,\n    0x06, 0x30, 0x00, 0xC0, 0x06, 0x30, 0x00, 0xC0, 0x06, 0x30, 0x00, 0x60, 0x0E, 0x38, 0x00, 0x20, 0x1C, 0x1C, 0x00, 0x00, 0x18,\n    0x0C, // 138\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0xE0, 0xFF,\n    0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0xE0, 0x01, // 139\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x20, 0xCE, 0x38, 0x00, 0x60,\n    0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x30, 0x00, 0x60, 0xCE, 0x38, 0x00, 0x20, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04, // 140\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x20, 0x18, 0x00, 0x00, 0x60,\n    0x0C, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xF8, 0x3F, // 141\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0xC0,\n    0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x20, 0x06, // 142\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0C, 0x00, 0x00, 0x7C, 0x1C, 0x00, 0x20, 0xEE, 0x38, 0x00, 0x60, 0xC6, 0x30, 0x00, 0xC0,\n    0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x31, 0x00, 0x60, 0xC6, 0x31, 0x00, 0x20, 0x8E, 0x39, 0x00, 0x00, 0x9C, 0x1F, 0x00, 0x00, 0x18,\n    0x0F, // 143\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0xE0, 0x01, // 144\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x70,\n    0x00, 0x30, 0x00, 0xD8, 0x00, 0x30, 0x00, 0x88, 0x00, 0x30, 0x00, 0xD8, 0x00, 0x18, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 145\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x3E, 0x00, 0x20, 0x06, 0x37, 0x00, 0x60,\n    0xC6, 0x33, 0x00, 0xC0, 0xE6, 0x30, 0x00, 0xC0, 0x76, 0x30, 0x00, 0x60, 0x3E, 0x30, 0x00, 0x20, 0x1E, 0x30, 0x00, 0x00, 0x06,\n    0x30, // 146\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE8, 0xFF, 0x3F, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x06,\n    0x00, 0x30, 0x00, 0x02, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, // 147\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE8, 0xFF, 0x3F, 0x00, 0xEE, 0xFF, 0x3F, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x02, // 148\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x60, 0x03, 0x30, 0x00, 0xE0, 0x01,\n    0x30, 0x00, 0x00, 0x00, 0x30, // 149\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,\n    0x03, 0x00, 0x00, 0xE0, 0x01, // 150\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x68, 0x70, 0x00, 0x00, 0x6E, 0xF0, 0x00, 0x00, 0x66, 0xF0,\n    0x03, 0x00, 0x62, 0xB0, 0x07, 0x00, 0xE0, 0x18, 0x1F, 0x00, 0xC0, 0x1F, 0x3C, 0x00, 0x80, 0x0F, 0x30, 0x00, 0x00, 0x00,\n    0x20, // 151\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x80, 0x0C, 0x00, 0x00, 0xE0,\n    0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x20, 0x06,                                                                   // 152\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0x07, 0x00, 0xE6, 0xFF, 0x07, // 161\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x9C, 0x07, 0x00, 0x0E, 0x78, 0x00, 0x00,\n    0x06, 0x3F, 0x00, 0x00, 0xF6, 0x30, 0x00, 0x00, 0x0E, 0x30, 0x00, 0xE0, 0x0D, 0x1C, 0x00, 0x00, 0x1C, 0x0E, 0x00, 0x00, 0x10,\n    0x06, // 162\n    0x00, 0x60, 0x10, 0x00, 0x00, 0x60, 0x38, 0x00, 0x00, 0x7F, 0x1C, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xE0, 0x19, 0x00, 0x60,\n    0x60, 0x18, 0x00, 0x60, 0x60, 0x18, 0x00, 0x60, 0x60, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0xC0, 0x01, 0x30, 0x00, 0x80, 0x01,\n    0x38, 0x00, 0x00, 0x00, 0x10, // 163\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0xF7, 0x0E, 0x00, 0x00, 0xFE, 0x07, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00,\n    0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0xFE,\n    0x07, 0x00, 0x00, 0xF7, 0x0E, 0x00, 0x00, 0x02, 0x04, // 164\n    0xE0, 0x60, 0x06, 0x00, 0xC0, 0x61, 0x06, 0x00, 0x80, 0x67, 0x06, 0x00, 0x00, 0x7E, 0x06, 0x00, 0x00, 0x7C, 0x06, 0x00, 0x00,\n    0xF0, 0x3F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x7C, 0x06, 0x00, 0x00, 0x7E, 0x06, 0x00, 0x80, 0x67, 0x06, 0x00, 0xC0, 0x61,\n    0x06, 0x00, 0xE0, 0x60, 0x06, 0x00, 0x20,                                                       // 165\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0xF8, 0x0F, 0xE0, 0x7F, 0xF8, 0x0F, // 166\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x80, 0xF3, 0xC1, 0x00, 0xC0, 0x1F, 0xC3, 0x03, 0xE0, 0x0C, 0x07, 0x03, 0x60,\n    0x1C, 0x06, 0x06, 0x60, 0x18, 0x0C, 0x06, 0x60, 0x30, 0x1C, 0x06, 0xE0, 0x70, 0x38, 0x07, 0xC0, 0xE1, 0xF4, 0x03, 0x80, 0xC1,\n    0xE7, 0x01, 0x00, 0x80, 0x03, // 167\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x60, // 168\n    0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x80, 0x01, 0x0C, 0x00, 0xC0, 0x79, 0x1C, 0x00, 0xC0,\n    0xFE, 0x19, 0x00, 0x60, 0x86, 0x31, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03,\n    0x33, 0x00, 0x60, 0x87, 0x33, 0x00, 0xC0, 0x86, 0x19, 0x00, 0xC0, 0x85, 0x1C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x07, 0x07,\n    0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, // 169\n    0x00, 0x00, 0x00, 0x00, 0xC0, 0x1C, 0x00, 0x00, 0xE0, 0x3E, 0x00, 0x00, 0x60, 0x32, 0x00, 0x00, 0x60, 0x32, 0x00, 0x00, 0xE0,\n    0x3F, 0x00, 0x00, 0xC0, 0x3F, // 170\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00,\n    0x84, 0x10, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x04, 0x10, // 171\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFC,\n    0x01, 0x00, 0x00, 0xFC, 0x01, // 172\n    0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 173\n    0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x80, 0x01, 0x0C, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0xFE, 0x1B, 0x00, 0x60, 0xFE, 0x33, 0x00, 0x60, 0x66, 0x30, 0x00, 0x60, 0x66, 0x30, 0x00, 0x60, 0xE6, 0x30, 0x00, 0x60, 0xFE,\n    0x31, 0x00, 0x60, 0x3C, 0x33, 0x00, 0xC0, 0x00, 0x1A, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x07, 0x07,\n    0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, // 174\n    0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C,\n    0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00,\n    0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, // 175\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20,\n    0x08, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x80, 0x03, // 176\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00,\n    0x60, 0x30, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, // 177\n    0x40, 0x20, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x38, 0x00, 0x00, 0x20, 0x2C, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0xE0,\n    0x23, 0x00, 0x00, 0xC0, 0x21, // 178\n    0x40, 0x10, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0xE0,\n    0x3D, 0x00, 0x00, 0xC0, 0x1D, // 179\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x20, // 180\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 181\n    0x00, 0x0F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xE0,\n    0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF,\n    0xFF, 0x07, 0x60, 0x00, 0x00, 0x00, 0x60,                                                                   // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 183\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xC0, 0x02, 0x00, 0x00, 0x80, 0x03, 0x00,\n    0x00, 0x00, 0x01, // 184\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xE0,\n    0x3F, // 185\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xE0,\n    0x38, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x0F, // 186\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00,\n    0x78, 0x0F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x84, 0x10, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x80, // 187\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x20, 0x00, 0xE0, 0x3F, 0x38, 0x00, 0xE0,\n    0x3F, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x38,\n    0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x0C, 0x00, 0xC0, 0x01, 0x0E, 0x00, 0xE0, 0x80, 0x0B,\n    0x00, 0x60, 0xC0, 0x08, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x08, // 188\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x20, 0x00, 0xE0, 0x3F, 0x30, 0x00, 0xE0,\n    0x3F, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70,\n    0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x4E, 0x20, 0x00, 0x00, 0x67, 0x30, 0x00, 0xC0, 0x21, 0x38, 0x00, 0xE0, 0x20, 0x2C,\n    0x00, 0x60, 0x20, 0x26, 0x00, 0x00, 0xE0, 0x27, 0x00, 0x00, 0xC0, 0x21, // 189\n    0x40, 0x10, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x22, 0x20, 0x00, 0x20, 0x22, 0x30, 0x00, 0xE0,\n    0x3D, 0x38, 0x00, 0xC0, 0x1D, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70,\n    0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0E, 0x0C, 0x00, 0x00, 0x07, 0x0E, 0x00, 0x80, 0x83, 0x0B, 0x00, 0xE0, 0xC0, 0x08,\n    0x00, 0x60, 0xE0, 0x3F, 0x00, 0x20, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x08, // 190\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x1E, 0x03, 0x00,\n    0x00, 0x07, 0x07, 0x00, 0xE6, 0x03, 0x06, 0x00, 0xE6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,\n    0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, // 191\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x82,\n    0x8F, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x6E, 0x80, 0x01, 0x00, 0xE8, 0x83, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0x00, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 192\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80,\n    0x8F, 0x01, 0x00, 0xE8, 0x83, 0x01, 0x00, 0x6E, 0x80, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x82, 0x8F, 0x01, 0x00, 0x00, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 193\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x88,\n    0x8F, 0x01, 0x00, 0xEC, 0x83, 0x01, 0x00, 0x66, 0x80, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x8C, 0x8F, 0x01, 0x00, 0x08, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 194\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x0C, 0xFE, 0x01, 0x00, 0x8E,\n    0x8F, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x66, 0x80, 0x01, 0x00, 0xEC, 0x83, 0x01, 0x00, 0x8C, 0x8F, 0x01, 0x00, 0x0E, 0xFE,\n    0x01, 0x00, 0x06, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 195\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x8C,\n    0x8F, 0x01, 0x00, 0xEC, 0x83, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x8C, 0x8F, 0x01, 0x00, 0x0C, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 196\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x9C,\n    0x8F, 0x01, 0x00, 0xE2, 0x83, 0x01, 0x00, 0x62, 0x80, 0x01, 0x00, 0xE2, 0x83, 0x01, 0x00, 0x9C, 0x8F, 0x01, 0x00, 0x00, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 197\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00,\n    0xBC, 0x01, 0x00, 0x00, 0x8F, 0x01, 0x00, 0xC0, 0x83, 0x01, 0x00, 0xE0, 0x80, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0x60, 0x80,\n    0x01, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30,\n    0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00,\n    0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 198\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x02, 0x60, 0x00, 0x30, 0x02, 0x60, 0x00, 0xF0, 0x02, 0x60, 0x00, 0xB0, 0x03, 0x60, 0x00,\n    0x30, 0x01, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02,\n    0x03, // 199\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x62, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x6E, 0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 200\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x6E, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x62, 0x30,\n    0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 201\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x6C, 0x30,\n    0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 202\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x6C, 0x30,\n    0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 203\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0xEE, 0xFF, 0x3F, 0x00, 0x08, // 204\n    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xEE, 0xFF, 0x3F, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0x02, // 205\n    0x08, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x08, // 206\n    0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x0C, // 207\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0xE0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0E, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC,\n    0x01, // 208\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x8C,\n    0x03, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x70, 0x00, 0x00, 0x0C, 0xE0, 0x01, 0x00, 0x0C, 0x80,\n    0x03, 0x00, 0x0E, 0x00, 0x0F, 0x00, 0x06, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 209\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x62, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0x68, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 210\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x68, 0x00, 0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0x66, 0x00,\n    0x30, 0x00, 0x62, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 211\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x68, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x66, 0x00,\n    0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0xE8, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 212\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xCC,\n    0x00, 0x18, 0x00, 0xEE, 0x00, 0x38, 0x00, 0x66, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x6C, 0x00,\n    0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0xE6, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 213\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0xEC, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 214\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x8E, 0x03, 0x00, 0x00, 0xDC, 0x01, 0x00, 0x00,\n    0xF8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xDC, 0x01, 0x00, 0x00, 0x8E, 0x03, 0x00, 0x00, 0x06,\n    0x03, // 215\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x21, 0x00, 0x00, 0xFF, 0x77, 0x00, 0x80, 0x07, 0x3F, 0x00, 0xC0, 0x01, 0x1E, 0x00, 0xC0,\n    0x00, 0x1F, 0x00, 0xE0, 0x80, 0x3B, 0x00, 0x60, 0xC0, 0x31, 0x00, 0x60, 0xE0, 0x30, 0x00, 0x60, 0x70, 0x30, 0x00, 0x60, 0x38,\n    0x30, 0x00, 0x60, 0x1C, 0x30, 0x00, 0xE0, 0x0E, 0x38, 0x00, 0xC0, 0x07, 0x18, 0x00, 0xC0, 0x03, 0x1C, 0x00, 0xE0, 0x07, 0x0F,\n    0x00, 0x70, 0xFF, 0x07, 0x00, 0x20, 0xFC, 0x01, // 216\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x02, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 217\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x02, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 218\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x08, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x0C, 0x00,\n    0x30, 0x00, 0x08, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 219\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x0C, 0x00,\n    0x30, 0x00, 0x0C, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 220\n    0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x1E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x08, 0xF0, 0x3F, 0x00, 0x0E, 0xF0, 0x3F, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x02, 0x1E,\n    0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, // 221\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00,\n    0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03,\n    0x06, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x86, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xF8, // 222\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x08, 0x00, 0x60, 0x00, 0x1C, 0x00, 0x60, 0x00, 0x38, 0x00, 0xE0, 0x78, 0x30, 0x00, 0xC0, 0x7F, 0x30, 0x00, 0x80, 0xC7,\n    0x30, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x0F, // 223\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x20, 0x86, 0x31, 0x00, 0x60,\n    0x86, 0x31, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x80, 0xC6, 0x18, 0x00, 0x00, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 224\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x00, 0x86, 0x31, 0x00, 0x80,\n    0x86, 0x31, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x60, 0xC6, 0x18, 0x00, 0x20, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 225\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x80, 0x8C, 0x39, 0x00, 0xC0, 0x86, 0x31, 0x00, 0x60,\n    0x86, 0x31, 0x00, 0x60, 0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x18, 0x00, 0x80, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 226\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0xC0, 0x1C, 0x1F, 0x00, 0xE0, 0x8C, 0x39, 0x00, 0x60, 0x86, 0x31, 0x00, 0x60,\n    0x86, 0x31, 0x00, 0xC0, 0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x18, 0x00, 0xE0, 0xCE, 0x0C, 0x00, 0x60, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 227\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0xC0, 0x8C, 0x39, 0x00, 0xC0, 0x86, 0x31, 0x00, 0x00,\n    0x86, 0x31, 0x00, 0x00, 0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x18, 0x00, 0xC0, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 228\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x70, 0x86, 0x31, 0x00, 0x88,\n    0x86, 0x31, 0x00, 0x88, 0xC6, 0x30, 0x00, 0x88, 0xC6, 0x18, 0x00, 0x70, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 229\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x00, 0x00, 0x9C, 0x1F, 0x00, 0x00, 0xCC, 0x39, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0x66, 0x18, 0x00, 0x00, 0x6E, 0x1C, 0x00, 0x00, 0xFC,\n    0x0F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xCC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30,\n    0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xCC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xE0, 0x04, // 230\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x02, 0x00,\n    0x06, 0x30, 0x02, 0x00, 0x06, 0xF0, 0x02, 0x00, 0x06, 0xB0, 0x03, 0x00, 0x0E, 0x38, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x18,\n    0x0C, // 231\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x20, 0xCE, 0x38, 0x00, 0x60,\n    0xC6, 0x30, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x80, 0xC6, 0x30, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04, // 232\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x80,\n    0xC6, 0x30, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x60, 0xC6, 0x30, 0x00, 0x20, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04, // 233\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x80, 0xCE, 0x38, 0x00, 0xC0,\n    0xC6, 0x30, 0x00, 0x60, 0xC6, 0x30, 0x00, 0x60, 0xC6, 0x30, 0x00, 0xC0, 0xCE, 0x38, 0x00, 0x80, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04, // 234\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0xC0, 0xCE, 0x38, 0x00, 0xC0,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0xC0, 0xCE, 0x38, 0x00, 0xC0, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04,                                                                         // 235\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0xE0, 0xFE, 0x3F, 0x00, 0x80, // 236\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0x20, // 237\n    0x80, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0x80, // 238\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, // 239\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1D, 0x1C, 0x00, 0xA0, 0x0F, 0x38, 0x00, 0xA0,\n    0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0xC0, 0x06, 0x30, 0x00, 0xC0, 0x0F, 0x38, 0x00, 0x20, 0x1F, 0x1C, 0x00, 0x00, 0xFC,\n    0x0F, 0x00, 0x00, 0xE0, 0x07, // 240\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0xC0, 0xFE, 0x3F, 0x00, 0xE0, 0x18, 0x00, 0x00, 0x60,\n    0x0C, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0xE0, 0x0E, 0x00, 0x00, 0x60, 0xFC,\n    0x3F, 0x00, 0x00, 0xF8, 0x3F, // 241\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x20, 0x0E, 0x38, 0x00, 0x60,\n    0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0x80, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 242\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x80,\n    0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0x20, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 243\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x80, 0x0E, 0x38, 0x00, 0xC0,\n    0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0x80, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 244\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0xC0, 0x1C, 0x1C, 0x00, 0xE0, 0x0E, 0x38, 0x00, 0x60,\n    0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0xC0, 0x06, 0x30, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0xE0, 0x1C, 0x1C, 0x00, 0x60, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 245\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0xC0,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0xC0, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 246\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0xB6, 0x01, 0x00, 0x00, 0xB6, 0x01, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 247\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x67, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00,\n    0x0E, 0x3F, 0x00, 0x00, 0x86, 0x33, 0x00, 0x00, 0xE6, 0x31, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x3E, 0x38, 0x00, 0x00, 0x1C,\n    0x1C, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0xF3, 0x07, // 248\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x20, 0x00, 0x38, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x80, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 249\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x80, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x18, 0x00, 0x20, 0x00, 0x0C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 250\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x80, 0x00, 0x38, 0x00, 0xC0,\n    0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x80, 0x00, 0x0C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 251\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0xC0, 0x00, 0x38, 0x00, 0xC0,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x00, 0x0C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 252\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0x00, 0xF0, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x07, 0x80,\n    0x00, 0xFE, 0x03, 0xE0, 0x00, 0xFC, 0x00, 0x60, 0xC0, 0x1F, 0x00, 0x20, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,\n    0x06, // 253\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x1C, 0x18, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x03, // 254\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0xC0, 0xF0, 0x01, 0x06, 0xC0, 0x80, 0x0F, 0x07, 0x00,\n    0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0xC0, 0xC0, 0x1F, 0x00, 0xC0, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,\n    0x06, // 255\n};\n\n#endif // OLED_CS"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsCS.h",
    "content": "#ifndef OLEDDISPLAYFONTSCS_h\n#define OLEDDISPLAYFONTSCS_h\n\n#ifdef ARDUINO\n#include <Arduino.h>\n#elif __MBED__\n#define PROGMEM\n#endif\n\n/**\n * Localization for Czech and Slovak language containing glyphs with diacritic.\n */\nextern const uint8_t ArialMT_Plain_10_CS[] PROGMEM;\nextern const uint8_t ArialMT_Plain_16_CS[] PROGMEM;\nextern const uint8_t ArialMT_Plain_24_CS[] PROGMEM;\n#endif"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsGR.cpp",
    "content": "#ifdef OLED_GR\n\n#include \"OLEDDisplayFontsGR.h\"\n\n/**\n * Greek font for OLED displays - ArialMT Plain 10pt\n * Contains ASCII 32-127 + Greek characters mapped to CP-1253 positions (192-254)\n *\n * Generated using ThingPulse OLED font converter\n * Font: Arial, Size: 10px\n * Character set: Basic Latin + Greek (Α-Ω, α-ω, accented)\n *\n * CP-1253 Greek character mapping:\n * 193-209: Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ\n * 211-217: Σ Τ Υ Φ Χ Ψ Ω\n * 225-241: α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ\n * 242-249: ς σ τ υ φ χ ψ ω\n */\nconst uint8_t ArialMT_Plain_10_GR[] PROGMEM = {\n    0x0A, // Width: 10\n    0x0D, // Height: 13\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n\n    // Jump Table (4 bytes per character: offset high, offset low, size, width)\n    // Characters 32-127: Standard ASCII\n    0xFF, 0xFF, 0x00, 0x03, // 32 space\n    0x00, 0x00, 0x04, 0x03, // 33 !\n    0x00, 0x04, 0x05, 0x04, // 34 \"\n    0x00, 0x09, 0x09, 0x06, // 35 #\n    0x00, 0x12, 0x0A, 0x06, // 36 $\n    0x00, 0x1C, 0x10, 0x09, // 37 %\n    0x00, 0x2C, 0x0E, 0x08, // 38 &\n    0x00, 0x3A, 0x01, 0x02, // 39 '\n    0x00, 0x3B, 0x06, 0x04, // 40 (\n    0x00, 0x41, 0x06, 0x04, // 41 )\n    0x00, 0x47, 0x05, 0x04, // 42 *\n    0x00, 0x4C, 0x09, 0x06, // 43 +\n    0x00, 0x55, 0x04, 0x03, // 44 ,\n    0x00, 0x59, 0x03, 0x03, // 45 -\n    0x00, 0x5C, 0x04, 0x03, // 46 .\n    0x00, 0x60, 0x05, 0x04, // 47 /\n    0x00, 0x65, 0x0A, 0x06, // 48 0\n    0x00, 0x6F, 0x08, 0x05, // 49 1\n    0x00, 0x77, 0x0A, 0x06, // 50 2\n    0x00, 0x81, 0x0A, 0x06, // 51 3\n    0x00, 0x8B, 0x0B, 0x07, // 52 4\n    0x00, 0x96, 0x0A, 0x06, // 53 5\n    0x00, 0xA0, 0x0A, 0x06, // 54 6\n    0x00, 0xAA, 0x09, 0x06, // 55 7\n    0x00, 0xB3, 0x0A, 0x06, // 56 8\n    0x00, 0xBD, 0x0A, 0x06, // 57 9\n    0x00, 0xC7, 0x04, 0x03, // 58 :\n    0x00, 0xCB, 0x04, 0x03, // 59 ;\n    0x00, 0xCF, 0x0A, 0x06, // 60 <\n    0x00, 0xD9, 0x09, 0x06, // 61 =\n    0x00, 0xE2, 0x09, 0x06, // 62 >\n    0x00, 0xEB, 0x0B, 0x07, // 63 ?\n    0x00, 0xF6, 0x14, 0x0B, // 64 @\n    0x01, 0x0A, 0x0E, 0x08, // 65 A\n    0x01, 0x18, 0x0C, 0x07, // 66 B\n    0x01, 0x24, 0x0C, 0x07, // 67 C\n    0x01, 0x30, 0x0B, 0x07, // 68 D\n    0x01, 0x3B, 0x0C, 0x07, // 69 E\n    0x01, 0x47, 0x09, 0x06, // 70 F\n    0x01, 0x50, 0x0D, 0x08, // 71 G\n    0x01, 0x5D, 0x0C, 0x07, // 72 H\n    0x01, 0x69, 0x04, 0x03, // 73 I\n    0x01, 0x6D, 0x08, 0x05, // 74 J\n    0x01, 0x75, 0x0E, 0x08, // 75 K\n    0x01, 0x83, 0x0C, 0x07, // 76 L\n    0x01, 0x8F, 0x10, 0x09, // 77 M\n    0x01, 0x9F, 0x0C, 0x07, // 78 N\n    0x01, 0xAB, 0x0E, 0x08, // 79 O\n    0x01, 0xB9, 0x0B, 0x07, // 80 P\n    0x01, 0xC4, 0x0E, 0x08, // 81 Q\n    0x01, 0xD2, 0x0C, 0x07, // 82 R\n    0x01, 0xDE, 0x0C, 0x07, // 83 S\n    0x01, 0xEA, 0x0B, 0x07, // 84 T\n    0x01, 0xF5, 0x0C, 0x07, // 85 U\n    0x02, 0x01, 0x0D, 0x08, // 86 V\n    0x02, 0x0E, 0x11, 0x0A, // 87 W\n    0x02, 0x1F, 0x0E, 0x08, // 88 X\n    0x02, 0x2D, 0x0D, 0x08, // 89 Y\n    0x02, 0x3A, 0x0C, 0x07, // 90 Z\n    0x02, 0x46, 0x06, 0x04, // 91 [\n    0x02, 0x4C, 0x06, 0x04, // 92 backslash\n    0x02, 0x52, 0x04, 0x03, // 93 ]\n    0x02, 0x56, 0x09, 0x06, // 94 ^\n    0x02, 0x5F, 0x0C, 0x07, // 95 _\n    0x02, 0x6B, 0x03, 0x03, // 96 `\n    0x02, 0x6E, 0x0A, 0x06, // 97 a\n    0x02, 0x78, 0x0A, 0x06, // 98 b\n    0x02, 0x82, 0x0A, 0x06, // 99 c\n    0x02, 0x8C, 0x0A, 0x06, // 100 d\n    0x02, 0x96, 0x0A, 0x06, // 101 e\n    0x02, 0xA0, 0x05, 0x04, // 102 f\n    0x02, 0xA5, 0x0A, 0x06, // 103 g\n    0x02, 0xAF, 0x0A, 0x06, // 104 h\n    0x02, 0xB9, 0x04, 0x03, // 105 i\n    0x02, 0xBD, 0x04, 0x03, // 106 j\n    0x02, 0xC1, 0x08, 0x05, // 107 k\n    0x02, 0xC9, 0x04, 0x03, // 108 l\n    0x02, 0xCD, 0x10, 0x09, // 109 m\n    0x02, 0xDD, 0x0A, 0x06, // 110 n\n    0x02, 0xE7, 0x0A, 0x06, // 111 o\n    0x02, 0xF1, 0x0A, 0x06, // 112 p\n    0x02, 0xFB, 0x0A, 0x06, // 113 q\n    0x03, 0x05, 0x05, 0x04, // 114 r\n    0x03, 0x0A, 0x08, 0x05, // 115 s\n    0x03, 0x12, 0x06, 0x04, // 116 t\n    0x03, 0x18, 0x0A, 0x06, // 117 u\n    0x03, 0x22, 0x09, 0x06, // 118 v\n    0x03, 0x2B, 0x0E, 0x08, // 119 w\n    0x03, 0x39, 0x0A, 0x06, // 120 x\n    0x03, 0x43, 0x09, 0x06, // 121 y\n    0x03, 0x4C, 0x0A, 0x06, // 122 z\n    0x03, 0x56, 0x06, 0x04, // 123 {\n    0x03, 0x5C, 0x04, 0x03, // 124 |\n    0x03, 0x60, 0x05, 0x04, // 125 }\n    0x03, 0x65, 0x09, 0x06, // 126 ~\n    0xFF, 0xFF, 0x00, 0x03, // 127\n    // Characters 128-191: Placeholders (extended ASCII)\n    0xFF, 0xFF, 0x00, 0x03, // 128\n    0xFF, 0xFF, 0x00, 0x03, // 129\n    0xFF, 0xFF, 0x00, 0x03, // 130\n    0xFF, 0xFF, 0x00, 0x03, // 131\n    0xFF, 0xFF, 0x00, 0x03, // 132\n    0xFF, 0xFF, 0x00, 0x03, // 133\n    0xFF, 0xFF, 0x00, 0x03, // 134\n    0xFF, 0xFF, 0x00, 0x03, // 135\n    0xFF, 0xFF, 0x00, 0x03, // 136\n    0xFF, 0xFF, 0x00, 0x03, // 137\n    0xFF, 0xFF, 0x00, 0x03, // 138\n    0xFF, 0xFF, 0x00, 0x03, // 139\n    0xFF, 0xFF, 0x00, 0x03, // 140\n    0xFF, 0xFF, 0x00, 0x03, // 141\n    0xFF, 0xFF, 0x00, 0x03, // 142\n    0xFF, 0xFF, 0x00, 0x03, // 143\n    0xFF, 0xFF, 0x00, 0x03, // 144\n    0xFF, 0xFF, 0x00, 0x03, // 145\n    0xFF, 0xFF, 0x00, 0x03, // 146\n    0xFF, 0xFF, 0x00, 0x03, // 147\n    0xFF, 0xFF, 0x00, 0x03, // 148\n    0xFF, 0xFF, 0x00, 0x03, // 149\n    0xFF, 0xFF, 0x00, 0x03, // 150\n    0xFF, 0xFF, 0x00, 0x03, // 151\n    0xFF, 0xFF, 0x00, 0x03, // 152\n    0xFF, 0xFF, 0x00, 0x03, // 153\n    0xFF, 0xFF, 0x00, 0x03, // 154\n    0xFF, 0xFF, 0x00, 0x03, // 155\n    0xFF, 0xFF, 0x00, 0x03, // 156\n    0xFF, 0xFF, 0x00, 0x03, // 157\n    0xFF, 0xFF, 0x00, 0x03, // 158\n    0xFF, 0xFF, 0x00, 0x03, // 159\n    0xFF, 0xFF, 0x00, 0x03, // 160\n    0xFF, 0xFF, 0x00, 0x03, // 161\n    0xFF, 0xFF, 0x00, 0x03, // 162\n    0xFF, 0xFF, 0x00, 0x03, // 163\n    0xFF, 0xFF, 0x00, 0x03, // 164\n    0xFF, 0xFF, 0x00, 0x03, // 165\n    0xFF, 0xFF, 0x00, 0x03, // 166\n    0xFF, 0xFF, 0x00, 0x03, // 167\n    0xFF, 0xFF, 0x00, 0x03, // 168\n    0xFF, 0xFF, 0x00, 0x03, // 169\n    0xFF, 0xFF, 0x00, 0x03, // 170\n    0xFF, 0xFF, 0x00, 0x03, // 171\n    0xFF, 0xFF, 0x00, 0x03, // 172\n    0xFF, 0xFF, 0x00, 0x03, // 173\n    0xFF, 0xFF, 0x00, 0x03, // 174\n    0xFF, 0xFF, 0x00, 0x03, // 175\n    0xFF, 0xFF, 0x00, 0x03, // 176\n    0xFF, 0xFF, 0x00, 0x03, // 177\n    0xFF, 0xFF, 0x00, 0x03, // 178\n    0xFF, 0xFF, 0x00, 0x03, // 179\n    0xFF, 0xFF, 0x00, 0x03, // 180\n    0xFF, 0xFF, 0x00, 0x03, // 181\n    0xFF, 0xFF, 0x00, 0x03, // 182\n    0xFF, 0xFF, 0x00, 0x03, // 183\n    0xFF, 0xFF, 0x00, 0x03, // 184\n    0xFF, 0xFF, 0x00, 0x03, // 185\n    0xFF, 0xFF, 0x00, 0x03, // 186\n    0xFF, 0xFF, 0x00, 0x03, // 187\n    0xFF, 0xFF, 0x00, 0x03, // 188\n    0xFF, 0xFF, 0x00, 0x03, // 189\n    0xFF, 0xFF, 0x00, 0x03, // 190\n    0xFF, 0xFF, 0x00, 0x03, // 191\n    // Characters 192-255: Greek letters (CP-1253 positions)\n    0xFF, 0xFF, 0x00, 0x03, // 192 (unused)\n    0x03, 0x6E, 0x0E, 0x08, // 193 Α Alpha\n    0x03, 0x7C, 0x0C, 0x07, // 194 Β Beta\n    0x03, 0x88, 0x09, 0x06, // 195 Γ Gamma\n    0x03, 0x91, 0x0C, 0x07, // 196 Δ Delta\n    0x03, 0x9D, 0x0C, 0x07, // 197 Ε Epsilon\n    0x03, 0xA9, 0x0A, 0x06, // 198 Ζ Zeta\n    0x03, 0xB3, 0x0C, 0x07, // 199 Η Eta\n    0x03, 0xBF, 0x0E, 0x08, // 200 Θ Theta\n    0x03, 0xCD, 0x04, 0x03, // 201 Ι Iota\n    0x03, 0xD1, 0x0E, 0x08, // 202 Κ Kappa\n    0x03, 0xDF, 0x0E, 0x08, // 203 Λ Lambda\n    0x03, 0xED, 0x10, 0x09, // 204 Μ Mu\n    0x03, 0xFD, 0x0C, 0x07, // 205 Ν Nu\n    0x04, 0x09, 0x0C, 0x07, // 206 Ξ Xi\n    0x04, 0x15, 0x0E, 0x08, // 207 Ο Omicron\n    0x04, 0x23, 0x0C, 0x07, // 208 Π Pi\n    0x04, 0x2F, 0x0B, 0x07, // 209 Ρ Rho\n    0xFF, 0xFF, 0x00, 0x03, // 210 (unused)\n    0x04, 0x3A, 0x0C, 0x07, // 211 Σ Sigma\n    0x04, 0x46, 0x0B, 0x07, // 212 Τ Tau\n    0x04, 0x51, 0x0D, 0x08, // 213 Υ Upsilon\n    0x04, 0x5E, 0x0E, 0x08, // 214 Φ Phi\n    0x04, 0x6C, 0x0E, 0x08, // 215 Χ Chi\n    0x04, 0x7A, 0x0E, 0x08, // 216 Ψ Psi\n    0x04, 0x88, 0x0E, 0x08, // 217 Ω Omega\n    0xFF, 0xFF, 0x00, 0x03, // 218\n    0xFF, 0xFF, 0x00, 0x03, // 219\n    0xFF, 0xFF, 0x00, 0x03, // 220\n    0xFF, 0xFF, 0x00, 0x03, // 221\n    0xFF, 0xFF, 0x00, 0x03, // 222\n    0xFF, 0xFF, 0x00, 0x03, // 223\n    0xFF, 0xFF, 0x00, 0x03, // 224\n    0x04, 0x96, 0x0A, 0x06, // 225 α alpha\n    0x04, 0xA0, 0x0A, 0x06, // 226 β beta\n    0x04, 0xAA, 0x09, 0x06, // 227 γ gamma\n    0x04, 0xB3, 0x0A, 0x06, // 228 δ delta\n    0x04, 0xBD, 0x08, 0x05, // 229 ε epsilon\n    0x04, 0xC5, 0x08, 0x05, // 230 ζ zeta\n    0x04, 0xCD, 0x0A, 0x06, // 231 η eta\n    0x04, 0xD7, 0x0A, 0x06, // 232 θ theta\n    0x04, 0xE1, 0x04, 0x03, // 233 ι iota\n    0x04, 0xE5, 0x08, 0x05, // 234 κ kappa\n    0x04, 0xED, 0x0A, 0x06, // 235 λ lambda\n    0x04, 0xF7, 0x0A, 0x06, // 236 μ mu\n    0x05, 0x01, 0x08, 0x05, // 237 ν nu\n    0x05, 0x09, 0x0A, 0x06, // 238 ξ xi\n    0x05, 0x13, 0x0A, 0x06, // 239 ο omicron\n    0x05, 0x1D, 0x0A, 0x06, // 240 π pi\n    0x05, 0x27, 0x0A, 0x06, // 241 ρ rho\n    0x05, 0x31, 0x08, 0x05, // 242 ς final sigma\n    0x05, 0x39, 0x0A, 0x06, // 243 σ sigma\n    0x05, 0x43, 0x06, 0x04, // 244 τ tau\n    0x05, 0x49, 0x0A, 0x06, // 245 υ upsilon\n    0x05, 0x53, 0x0C, 0x07, // 246 φ phi\n    0x05, 0x5F, 0x0A, 0x06, // 247 χ chi\n    0x05, 0x69, 0x0C, 0x07, // 248 ψ psi\n    0x05, 0x75, 0x0C, 0x07, // 249 ω omega\n    0xFF, 0xFF, 0x00, 0x03, // 250\n    0xFF, 0xFF, 0x00, 0x03, // 251\n    0xFF, 0xFF, 0x00, 0x03, // 252\n    0xFF, 0xFF, 0x00, 0x03, // 253\n    0xFF, 0xFF, 0x00, 0x03, // 254\n    0xFF, 0xFF, 0x00, 0x03, // 255\n\n    // Font Data - Basic ASCII (32-127)\n    0x00, 0x00, 0xF8, 0x02,                                                                         // 33 !\n    0x38, 0x00, 0x00, 0x00, 0x38,                                                                   // 34 \"\n    0xA0, 0x03, 0xE0, 0x00, 0xB8, 0x03, 0xE0, 0x00, 0xB8,                                           // 35 #\n    0x30, 0x01, 0x28, 0x02, 0xF8, 0x07, 0x48, 0x02, 0x90, 0x01,                                     // 36 $\n    0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x03, 0xC0, 0x00, 0xB0, 0x01, 0x48, 0x02, 0x80, 0x01, // 37 %\n    0x80, 0x01, 0x50, 0x02, 0x68, 0x02, 0xA8, 0x02, 0x18, 0x01, 0x80, 0x03, 0x80, 0x02,             // 38 &\n    0x38,                                                                                           // 39 '\n    0xE0, 0x03, 0x10, 0x04, 0x08, 0x08,                                                             // 40 (\n    0x08, 0x08, 0x10, 0x04, 0xE0, 0x03,                                                             // 41 )\n    0x28, 0x00, 0x18, 0x00, 0x28,                                                                   // 42 *\n    0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40,                                           // 43 +\n    0x00, 0x00, 0x00, 0x06,                                                                         // 44 ,\n    0x80, 0x00, 0x80,                                                                               // 45 -\n    0x00, 0x00, 0x00, 0x02,                                                                         // 46 .\n    0x00, 0x03, 0xE0, 0x00, 0x18,                                                                   // 47 /\n    0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                     // 48 0\n    0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03,                                                 // 49 1\n    0x10, 0x02, 0x08, 0x03, 0x88, 0x02, 0x48, 0x02, 0x30, 0x02,                                     // 50 2\n    0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                     // 51 3\n    0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x80,                               // 52 4\n    0x60, 0x01, 0x38, 0x02, 0x28, 0x02, 0x28, 0x02, 0xC8, 0x01,                                     // 53 5\n    0xF0, 0x01, 0x28, 0x02, 0x28, 0x02, 0x28, 0x02, 0xD0, 0x01,                                     // 54 6\n    0x08, 0x00, 0x08, 0x03, 0xC8, 0x00, 0x38, 0x00, 0x08,                                           // 55 7\n    0xB0, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                     // 56 8\n    0x70, 0x01, 0x88, 0x02, 0x88, 0x02, 0x88, 0x02, 0xF0, 0x01,                                     // 57 9\n    0x00, 0x00, 0x20, 0x02,                                                                         // 58 :\n    0x00, 0x00, 0x20, 0x06,                                                                         // 59 ;\n    0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01,                                     // 60 <\n    0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0,                                           // 61 =\n    0x00, 0x00, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x40,                                           // 62 >\n    0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xC8, 0x02, 0x48, 0x00, 0x30,                               // 63 ?\n    0x00, 0x00, 0xC0, 0x03, 0x30, 0x04, 0xD0, 0x09, 0x28, 0x0A, 0x28, 0x0A, 0xC8, 0x0B, 0x68, 0x0A, 0x10, 0x05, 0xE0,\n    0x04,                                                                                                 // 64 @\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02,                   // 65 A\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01,                               // 66 B\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01,                               // 67 C\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0xE0,                                     // 68 D\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02,                               // 69 E\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x08,                                                 // 70 F\n    0x00, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x50, 0x01, 0xC0,                         // 71 G\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                               // 72 H\n    0x00, 0x00, 0xF8, 0x03,                                                                               // 73 I\n    0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                       // 74 J\n    0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                   // 75 K\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,                               // 76 L\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03,       // 77 M\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03,                               // 78 N\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                   // 79 O\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                     // 80 P\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x08, 0x03, 0xF0, 0x02,                   // 81 Q\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0xC8, 0x00, 0x30, 0x03,                               // 82 R\n    0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01,                               // 83 S\n    0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08,                                     // 84 T\n    0x00, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                               // 85 U\n    0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08,                         // 86 V\n    0x18, 0x00, 0xE0, 0x01, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x02, 0xE0, 0x01, 0x18, // 87 W\n    0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                   // 88 X\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08,                         // 89 Y\n    0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02,                               // 90 Z\n    0x00, 0x00, 0xF8, 0x0F, 0x08, 0x08,                                                                   // 91 [\n    0x18, 0x00, 0xE0, 0x00, 0x00, 0x03,                                                                   // 92 backslash\n    0x08, 0x08, 0xF8, 0x0F,                                                                               // 93 ]\n    0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x40,                                                 // 94 ^\n    0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,                               // 95 _\n    0x08, 0x00, 0x10,                                                                                     // 96 `\n    0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03,                                           // 97 a\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                           // 98 b\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01,                                           // 99 c\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03,                                           // 100 d\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02,                                           // 101 e\n    0x20, 0x00, 0xF0, 0x03, 0x28,                                                                         // 102 f\n    0x00, 0x00, 0xC0, 0x05, 0x20, 0x0A, 0x20, 0x0A, 0xE0, 0x07,                                           // 103 g\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                           // 104 h\n    0x00, 0x00, 0xE8, 0x03,                                                                               // 105 i\n    0x00, 0x08, 0xE8, 0x07,                                                                               // 106 j\n    0xF8, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02,                                                       // 107 k\n    0x00, 0x00, 0xF8, 0x03,                                                                               // 108 l\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,       // 109 m\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                           // 110 n\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                           // 111 o\n    0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                           // 112 p\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xE0, 0x0F,                                           // 113 q\n    0x00, 0x00, 0xE0, 0x03, 0x20,                                                                         // 114 r\n    0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x20, 0x01,                                                       // 115 s\n    0x20, 0x00, 0xF8, 0x03, 0x20, 0x02,                                                                   // 116 t\n    0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,                                           // 117 u\n    0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20,                                                 // 118 v\n    0xE0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x01,                   // 119 w\n    0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                                           // 120 x\n    0x20, 0x00, 0xC0, 0x09, 0x00, 0x06, 0xC0, 0x01, 0x20,                                                 // 121 y\n    0x20, 0x02, 0x20, 0x03, 0xA0, 0x02, 0x60, 0x02, 0x20, 0x02,                                           // 122 z\n    0x80, 0x00, 0x78, 0x0F, 0x08, 0x08,                                                                   // 123 {\n    0x00, 0x00, 0xF8, 0x0F,                                                                               // 124 |\n    0x08, 0x08, 0x78, 0x0F, 0x80,                                                                         // 125 }\n    0xC0, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x00, 0xC0,                                                 // 126 ~\n\n    // Greek uppercase letters (193-217 in CP-1253)\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02,             // Α Alpha (same as A)\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01,                         // Β Beta (same as B)\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, 0x00, 0x18,                                           // Γ Gamma\n    0x00, 0x02, 0x80, 0x01, 0x60, 0x00, 0x10, 0x00, 0x60, 0x00, 0x80, 0x01, 0x00, 0x02,             // Δ Delta\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02,                         // Ε Epsilon (same as E)\n    0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02,                                     // Ζ Zeta (same as Z)\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                         // Η Eta (same as H)\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0x08, 0x02, 0xF0, 0x01,             // Θ Theta\n    0x00, 0x00, 0xF8, 0x03,                                                                         // Ι Iota (same as I)\n    0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,             // Κ Kappa (same as K)\n    0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02,             // Λ Lambda\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03, // Μ Mu (same as M)\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03,                         // Ν Nu (same as N)\n    0x00, 0x00, 0x48, 0x02, 0x48, 0x02, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02,                         // Ξ Xi\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,             // Ο Omicron (same as O)\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03,                         // Π Pi\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                               // Ρ Rho (same as P)\n    0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01,                         // Σ Sigma\n    0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08,                               // Τ Tau (same as T)\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08,                   // Υ Upsilon (same as Y)\n    0x00, 0x00, 0x70, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x88, 0x00, 0x70, 0x00, 0x00,                   // Φ Phi\n    0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,             // Χ Chi (same as X)\n    0x00, 0x00, 0x08, 0x00, 0xF0, 0x01, 0x08, 0x02, 0xF8, 0x03, 0x08, 0x02, 0xF0, 0x01,             // Ψ Psi\n    0x00, 0x00, 0x08, 0x02, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01, 0x08, 0x02,             // Ω Omega\n\n    // Greek lowercase letters (225-249 in CP-1253)\n    0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03,             // α alpha\n    0x00, 0x00, 0xF8, 0x07, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,             // β beta\n    0x00, 0x04, 0x20, 0x02, 0xC0, 0x01, 0x20, 0x00, 0x20,                   // γ gamma\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x50, 0x01,             // δ delta\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40,                   // ε epsilon\n    0x00, 0x04, 0x00, 0x03, 0xE0, 0x00, 0x18,                               // ζ zeta\n    0x00, 0x00, 0xE0, 0x05, 0x20, 0x0A, 0x20, 0x02, 0xC0, 0x01,             // η eta\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0xA0, 0x02, 0xC0, 0x01,             // θ theta\n    0x00, 0x00, 0xE0, 0x03,                                                 // ι iota\n    0xE0, 0x03, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                         // κ kappa\n    0x00, 0x02, 0x80, 0x01, 0x40, 0x00, 0x20, 0x00, 0xE0, 0x03,             // λ lambda\n    0x00, 0x00, 0xE0, 0x0F, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,             // μ mu\n    0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x03,                         // ν nu\n    0x00, 0x04, 0xC0, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x01,             // ξ xi\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,             // ο omicron\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03,             // π pi\n    0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,             // ρ rho\n    0x00, 0x04, 0x00, 0x03, 0xA0, 0x02, 0x40, 0x01,                         // ς final sigma\n    0x00, 0x00, 0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03,             // σ sigma\n    0x20, 0x00, 0xE0, 0x03, 0x20,                                           // τ tau\n    0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,             // υ upsilon\n    0x00, 0x00, 0xC0, 0x00, 0x20, 0x01, 0xE0, 0x03, 0x20, 0x01, 0xC0,       // φ phi\n    0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,             // χ chi\n    0x00, 0x00, 0x20, 0x00, 0xC0, 0x05, 0x20, 0x02, 0xE0, 0x03, 0x20,       // ψ psi\n    0x00, 0x00, 0x20, 0x02, 0xC0, 0x01, 0x20, 0x02, 0xC0, 0x01, 0x20, 0x02, // ω omega\n};\n\n// Placeholder for 16pt font - needs to be generated with font converter tool\nconst uint8_t ArialMT_Plain_16_GR[] PROGMEM = {\n    0x10, // Width: 16\n    0x13, // Height: 19\n    0x20, // First Char: 32\n    0x01, // Number of chars: 1 (placeholder)\n    // Minimal placeholder - replace with full font data\n    0xFF, 0xFF, 0x00, 0x04, // 32 space\n    // Font Data:\n    // (empty placeholder)\n};\n\n// Placeholder for 24pt font - needs to be generated with font converter tool\nconst uint8_t ArialMT_Plain_24_GR[] PROGMEM = {\n    0x18, // Width: 24\n    0x1C, // Height: 28\n    0x20, // First Char: 32\n    0x01, // Number of chars: 1 (placeholder)\n    // Minimal placeholder - replace with full font data\n    0xFF, 0xFF, 0x00, 0x06, // 32 space\n    // Font Data:\n    // (empty placeholder)\n};\n\n#endif // OLED_GR\n"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsGR.h",
    "content": "#ifndef OLEDDISPLAYFONTSGR_h\n#define OLEDDISPLAYFONTSGR_h\n\n#ifdef ARDUINO\n#include <Arduino.h>\n#elif __MBED__\n#define PROGMEM\n#endif\n\n/**\n * Localization for Greek language containing glyphs for the Greek alphabet.\n * Uses Windows-1253 (CP-1253) encoding for Greek characters.\n *\n * Supported characters:\n * - Uppercase Greek: Α-Ω (U+0391 to U+03A9)\n * - Lowercase Greek: α-ω (U+03B1 to U+03C9)\n * - Accented Greek: ά, έ, ή, ί, ό, ύ, ώ, etc.\n */\nextern const uint8_t ArialMT_Plain_10_GR[] PROGMEM;\nextern const uint8_t ArialMT_Plain_16_GR[] PROGMEM;\nextern const uint8_t ArialMT_Plain_24_GR[] PROGMEM;\n#endif\n"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsPL.cpp",
    "content": "// trunk-ignore-all(clang-format): Preserve long lines\n#ifdef OLED_PL\n#include \"OLEDDisplayFontsPL.h\"\n\nconst uint8_t ArialMT_Plain_10_PL[] PROGMEM = {\n    0x0A, // Width: 10\n    0x0D, // Height: 13\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x03, // 32\n    0x00, 0x00, 0x04, 0x03, // 33\n    0x00, 0x04, 0x05, 0x04, // 34\n    0x00, 0x09, 0x09, 0x06, // 35\n    0x00, 0x12, 0x0A, 0x06, // 36\n    0x00, 0x1C, 0x10, 0x09, // 37\n    0x00, 0x2C, 0x0E, 0x08, // 38\n    0x00, 0x3A, 0x01, 0x02, // 39\n    0x00, 0x3B, 0x06, 0x04, // 40\n    0x00, 0x41, 0x06, 0x04, // 41\n    0x00, 0x47, 0x05, 0x04, // 42\n    0x00, 0x4C, 0x09, 0x06, // 43\n    0x00, 0x55, 0x04, 0x03, // 44\n    0x00, 0x59, 0x03, 0x03, // 45\n    0x00, 0x5C, 0x04, 0x03, // 46\n    0x00, 0x60, 0x05, 0x04, // 47\n    0x00, 0x65, 0x0A, 0x06, // 48\n    0x00, 0x6F, 0x08, 0x05, // 49\n    0x00, 0x77, 0x0A, 0x06, // 50\n    0x00, 0x81, 0x0A, 0x06, // 51\n    0x00, 0x8B, 0x0B, 0x07, // 52\n    0x00, 0x96, 0x0A, 0x06, // 53\n    0x00, 0xA0, 0x0A, 0x06, // 54\n    0x00, 0xAA, 0x09, 0x06, // 55\n    0x00, 0xB3, 0x0A, 0x06, // 56\n    0x00, 0xBD, 0x0A, 0x06, // 57\n    0x00, 0xC7, 0x04, 0x03, // 58\n    0x00, 0xCB, 0x04, 0x03, // 59\n    0x00, 0xCF, 0x0A, 0x06, // 60\n    0x00, 0xD9, 0x09, 0x06, // 61\n    0x00, 0xE2, 0x09, 0x06, // 62\n    0x00, 0xEB, 0x0B, 0x07, // 63\n    0x00, 0xF6, 0x14, 0x0B, // 64\n    0x01, 0x0A, 0x0E, 0x08, // 65\n    0x01, 0x18, 0x0C, 0x07, // 66\n    0x01, 0x24, 0x0C, 0x07, // 67\n    0x01, 0x30, 0x0B, 0x07, // 68\n    0x01, 0x3B, 0x0C, 0x07, // 69\n    0x01, 0x47, 0x09, 0x06, // 70\n    0x01, 0x50, 0x0D, 0x08, // 71\n    0x01, 0x5D, 0x0C, 0x07, // 72\n    0x01, 0x69, 0x04, 0x03, // 73\n    0x01, 0x6D, 0x08, 0x05, // 74\n    0x01, 0x75, 0x0E, 0x08, // 75\n    0x01, 0x83, 0x0C, 0x07, // 76\n    0x01, 0x8F, 0x10, 0x09, // 77\n    0x01, 0x9F, 0x0C, 0x07, // 78\n    0x01, 0xAB, 0x0E, 0x08, // 79\n    0x01, 0xB9, 0x0B, 0x07, // 80\n    0x01, 0xC4, 0x0E, 0x08, // 81\n    0x01, 0xD2, 0x0C, 0x07, // 82\n    0x01, 0xDE, 0x0C, 0x07, // 83\n    0x01, 0xEA, 0x0B, 0x07, // 84\n    0x01, 0xF5, 0x0C, 0x07, // 85\n    0x02, 0x01, 0x0D, 0x08, // 86\n    0x02, 0x0E, 0x11, 0x0A, // 87\n    0x02, 0x1F, 0x0E, 0x08, // 88\n    0x02, 0x2D, 0x0D, 0x08, // 89\n    0x02, 0x3A, 0x0C, 0x07, // 90\n    0x02, 0x46, 0x06, 0x04, // 91\n    0x02, 0x4C, 0x06, 0x04, // 92\n    0x02, 0x52, 0x04, 0x03, // 93\n    0x02, 0x56, 0x09, 0x06, // 94\n    0x02, 0x5F, 0x0C, 0x07, // 95\n    0x02, 0x6B, 0x03, 0x03, // 96\n    0x02, 0x6E, 0x0A, 0x06, // 97\n    0x02, 0x78, 0x0A, 0x06, // 98\n    0x02, 0x82, 0x0A, 0x06, // 99\n    0x02, 0x8C, 0x0A, 0x06, // 100\n    0x02, 0x96, 0x0A, 0x06, // 101\n    0x02, 0xA0, 0x05, 0x04, // 102\n    0x02, 0xA5, 0x0A, 0x06, // 103\n    0x02, 0xAF, 0x0A, 0x06, // 104\n    0x02, 0xB9, 0x04, 0x03, // 105\n    0x02, 0xBD, 0x04, 0x03, // 106\n    0x02, 0xC1, 0x08, 0x05, // 107\n    0x02, 0xC9, 0x04, 0x03, // 108\n    0x02, 0xCD, 0x10, 0x09, // 109\n    0x02, 0xDD, 0x0A, 0x06, // 110\n    0x02, 0xE7, 0x0A, 0x06, // 111\n    0x02, 0xF1, 0x0A, 0x06, // 112\n    0x02, 0xFB, 0x0A, 0x06, // 113\n    0x03, 0x05, 0x05, 0x04, // 114\n    0x03, 0x0A, 0x08, 0x05, // 115\n    0x03, 0x12, 0x06, 0x04, // 116\n    0x03, 0x18, 0x0A, 0x06, // 117\n    0x03, 0x22, 0x09, 0x06, // 118\n    0x03, 0x2B, 0x0E, 0x08, // 119\n    0x03, 0x39, 0x0A, 0x06, // 120\n    0x03, 0x43, 0x09, 0x06, // 121\n    0x03, 0x4C, 0x0A, 0x06, // 122\n    0x03, 0x56, 0x06, 0x04, // 123\n    0x03, 0x5C, 0x04, 0x03, // 124\n    0x03, 0x60, 0x05, 0x04, // 125\n    0x03, 0x65, 0x09, 0x06, // 126\n    0xFF, 0xFF, 0x00, 0x0A, // 127\n    0xFF, 0xFF, 0x00, 0x0A, // 128\n    0x03, 0x6E, 0x0C, 0x07, // 129\n    0x03, 0x7A, 0x05, 0x04, // 130\n    0x03, 0x7F, 0x0C, 0x07, // 131\n    0x03, 0x8B, 0x0E, 0x08, // 132\n    0x03, 0x99, 0x0A, 0x06, // 133\n    0x03, 0xA3, 0x0C, 0x07, // 134\n    0x03, 0xAF, 0x0A, 0x06, // 135\n    0x03, 0xB9, 0x0A, 0x06, // 136\n    0x03, 0xC3, 0x0A, 0x06, // 137\n    0xFF, 0xFF, 0x00, 0x0A, // 138\n    0xFF, 0xFF, 0x00, 0x0A, // 139\n    0xFF, 0xFF, 0x00, 0x0A, // 140\n    0xFF, 0xFF, 0x00, 0x0A, // 141\n    0xFF, 0xFF, 0x00, 0x0A, // 142\n    0xFF, 0xFF, 0x00, 0x0A, // 143\n    0xFF, 0xFF, 0x00, 0x0A, // 144\n    0xFF, 0xFF, 0x00, 0x0A, // 145\n    0xFF, 0xFF, 0x00, 0x0A, // 146\n    0x03, 0xCD, 0x0E, 0x08, // 147\n    0x03, 0xDB, 0x0A, 0x06, // 148\n    0xFF, 0xFF, 0x00, 0x0A, // 149\n    0xFF, 0xFF, 0x00, 0x0A, // 150\n    0xFF, 0xFF, 0x00, 0x0A, // 151\n    0x03, 0xE5, 0x0C, 0x07, // 152\n    0x03, 0xF1, 0x0A, 0x06, // 153\n    0x03, 0xFB, 0x0C, 0x07, // 154\n    0x04, 0x07, 0x08, 0x05, // 155\n    0xFF, 0xFF, 0x00, 0x0A, // 156\n    0xFF, 0xFF, 0x00, 0x0A, // 157\n    0xFF, 0xFF, 0x00, 0x0A, // 158\n    0xFF, 0xFF, 0x00, 0x0A, // 159\n    0xFF, 0xFF, 0x00, 0x0A, // 160\n    0x04, 0x0F, 0x04, 0x03, // 161\n    0x04, 0x13, 0x0A, 0x06, // 162\n    0x04, 0x1D, 0x0C, 0x07, // 163\n    0x04, 0x29, 0x0A, 0x06, // 164\n    0x04, 0x33, 0x0A, 0x06, // 165\n    0x04, 0x3D, 0x04, 0x03, // 166\n    0x04, 0x41, 0x0A, 0x06, // 167\n    0x04, 0x4B, 0x05, 0x04, // 168\n    0x04, 0x50, 0x0D, 0x08, // 169\n    0x04, 0x5D, 0x07, 0x05, // 170\n    0x04, 0x64, 0x0A, 0x06, // 171\n    0x04, 0x6E, 0x09, 0x06, // 172\n    0x04, 0x77, 0x03, 0x03, // 173\n    0x04, 0x7A, 0x0D, 0x08, // 174\n    0x04, 0x87, 0x0B, 0x07, // 175\n    0x04, 0x92, 0x07, 0x05, // 176\n    0x04, 0x99, 0x0A, 0x06, // 177\n    0x04, 0xA3, 0x05, 0x04, // 178\n    0x04, 0xA8, 0x05, 0x04, // 179\n    0x04, 0xAD, 0x05, 0x04, // 180\n    0x04, 0xB2, 0x0A, 0x06, // 181\n    0x04, 0xBC, 0x09, 0x06, // 182\n    0x04, 0xC5, 0x03, 0x03, // 183\n    0x04, 0xC8, 0x06, 0x04, // 184\n    0x04, 0xCE, 0x0C, 0x07, // 185\n    0x04, 0xDA, 0x07, 0x05, // 186\n    0x04, 0xE1, 0x0C, 0x07, // 187\n    0x04, 0xED, 0x0A, 0x06, // 188\n    0x04, 0xF7, 0x10, 0x09, // 189\n    0x05, 0x07, 0x10, 0x09, // 190\n    0x05, 0x17, 0x0A, 0x06, // 191\n    0x05, 0x21, 0x0E, 0x08, // 192\n    0x05, 0x2F, 0x0E, 0x08, // 193\n    0x05, 0x3D, 0x0E, 0x08, // 194\n    0x05, 0x4B, 0x0E, 0x08, // 195\n    0x05, 0x59, 0x0E, 0x08, // 196\n    0x05, 0x67, 0x0E, 0x08, // 197\n    0x05, 0x75, 0x12, 0x0A, // 198\n    0x05, 0x87, 0x0C, 0x07, // 199\n    0x05, 0x93, 0x0C, 0x07, // 200\n    0x05, 0x9F, 0x0C, 0x07, // 201\n    0x05, 0xAB, 0x0C, 0x07, // 202\n    0x05, 0xB7, 0x0C, 0x07, // 203\n    0x05, 0xC3, 0x05, 0x04, // 204\n    0x05, 0xC8, 0x04, 0x03, // 205\n    0x05, 0xCC, 0x04, 0x03, // 206\n    0x05, 0xD0, 0x05, 0x04, // 207\n    0x05, 0xD5, 0x0B, 0x07, // 208\n    0x05, 0xE0, 0x0C, 0x07, // 209\n    0x05, 0xEC, 0x0E, 0x08, // 210\n    0x05, 0xFA, 0x0E, 0x08, // 211\n    0x06, 0x08, 0x0E, 0x08, // 212\n    0x06, 0x16, 0x0E, 0x08, // 213\n    0x06, 0x24, 0x0E, 0x08, // 214\n    0x06, 0x32, 0x0A, 0x06, // 215\n    0x06, 0x3C, 0x0D, 0x08, // 216\n    0x06, 0x49, 0x0C, 0x07, // 217\n    0x06, 0x55, 0x0C, 0x07, // 218\n    0x06, 0x61, 0x0C, 0x07, // 219\n    0x06, 0x6D, 0x0C, 0x07, // 220\n    0x06, 0x79, 0x0D, 0x08, // 221\n    0x06, 0x86, 0x0B, 0x07, // 222\n    0x06, 0x91, 0x0C, 0x07, // 223\n    0x06, 0x9D, 0x0A, 0x06, // 224\n    0x06, 0xA7, 0x0A, 0x06, // 225\n    0x06, 0xB1, 0x0A, 0x06, // 226\n    0x06, 0xBB, 0x0A, 0x06, // 227\n    0x06, 0xC5, 0x0A, 0x06, // 228\n    0x06, 0xCF, 0x0A, 0x06, // 229\n    0x06, 0xD9, 0x10, 0x09, // 230\n    0x06, 0xE9, 0x0A, 0x06, // 231\n    0x06, 0xF3, 0x0A, 0x06, // 232\n    0x06, 0xFD, 0x0A, 0x06, // 233\n    0x07, 0x07, 0x0A, 0x06, // 234\n    0x07, 0x11, 0x0A, 0x06, // 235\n    0x07, 0x1B, 0x05, 0x04, // 236\n    0x07, 0x20, 0x04, 0x03, // 237\n    0x07, 0x24, 0x05, 0x04, // 238\n    0x07, 0x29, 0x05, 0x04, // 239\n    0x07, 0x2E, 0x0A, 0x06, // 240\n    0x07, 0x38, 0x0A, 0x06, // 241\n    0x07, 0x42, 0x0A, 0x06, // 242\n    0x07, 0x4C, 0x0A, 0x06, // 243\n    0x07, 0x56, 0x0A, 0x06, // 244\n    0x07, 0x60, 0x0A, 0x06, // 245\n    0x07, 0x6A, 0x0A, 0x06, // 246\n    0x07, 0x74, 0x09, 0x06, // 247\n    0x07, 0x7D, 0x0A, 0x06, // 248\n    0x07, 0x87, 0x0A, 0x06, // 249\n    0x07, 0x91, 0x0A, 0x06, // 250\n    0x07, 0x9B, 0x0A, 0x06, // 251\n    0x07, 0xA5, 0x0A, 0x06, // 252\n    0x07, 0xAF, 0x09, 0x06, // 253\n    0x07, 0xB8, 0x0A, 0x06, // 254\n    0x07, 0xC2, 0x09, 0x06, // 255\n    // Font Data:\n    0x00, 0x00, 0xF8, 0x02, // 33\n    0x38, 0x00, 0x00, 0x00, 0x38, // 34\n    0xA0, 0x03, 0xE0, 0x00, 0xB8, 0x03, 0xE0, 0x00, 0xB8, // 35\n    0x30, 0x01, 0x28, 0x02, 0xF8, 0x07, 0x48, 0x02, 0x90, 0x01, // 36\n    0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x03, 0xC0, 0x00, 0xB0, 0x01, 0x48, 0x02, 0x80, 0x01, // 37\n    0x80, 0x01, 0x50, 0x02, 0x68, 0x02, 0xA8, 0x02, 0x18, 0x01, 0x80, 0x03, 0x80, 0x02, // 38\n    0x38, // 39\n    0xE0, 0x03, 0x10, 0x04, 0x08, 0x08, // 40\n    0x08, 0x08, 0x10, 0x04, 0xE0, 0x03, // 41\n    0x28, 0x00, 0x18, 0x00, 0x28, // 42\n    0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40, // 43\n    0x00, 0x00, 0x00, 0x06, // 44\n    0x80, 0x00, 0x80, // 45\n    0x00, 0x00, 0x00, 0x02, // 46\n    0x00, 0x03, 0xE0, 0x00, 0x18, // 47\n    0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01, // 48\n    0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03, // 49\n    0x10, 0x02, 0x08, 0x03, 0x88, 0x02, 0x48, 0x02, 0x30, 0x02, // 50\n    0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01, // 51\n    0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x80, // 52\n    0x60, 0x01, 0x38, 0x02, 0x28, 0x02, 0x28, 0x02, 0xC8, 0x01, // 53\n    0xF0, 0x01, 0x28, 0x02, 0x28, 0x02, 0x28, 0x02, 0xD0, 0x01, // 54\n    0x08, 0x00, 0x08, 0x03, 0xC8, 0x00, 0x38, 0x00, 0x08, // 55\n    0xB0, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01, // 56\n    0x70, 0x01, 0x88, 0x02, 0x88, 0x02, 0x88, 0x02, 0xF0, 0x01, // 57\n    0x00, 0x00, 0x20, 0x02, // 58\n    0x00, 0x00, 0x20, 0x06, // 59\n    0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01, // 60\n    0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, // 61\n    0x00, 0x00, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x40, // 62\n    0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xC8, 0x02, 0x48, 0x00, 0x30, // 63\n    0x00, 0x00, 0xC0, 0x03, 0x30, 0x04, 0xD0, 0x09, 0x28, 0x0A, 0x28, 0x0A, 0xC8, 0x0B, 0x68, 0x0A, 0x10, 0x05, 0xE0, 0x04, // 64\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02, // 65\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01, // 66\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, // 67\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0xE0, // 68\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, // 69\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x08, // 70\n    0x00, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x50, 0x01, 0xC0, // 71\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03, // 72\n    0x00, 0x00, 0xF8, 0x03, // 73\n    0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01, // 74\n    0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02, // 75\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, // 76\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03, // 77\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03, // 78\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01, // 79\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30, // 80\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x08, 0x03, 0xF0, 0x02, // 81\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0xC8, 0x00, 0x30, 0x03, // 82\n    0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01, // 83\n    0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, // 84\n    0x00, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01, // 85\n    0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08, // 86\n    0x18, 0x00, 0xE0, 0x01, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x02, 0xE0, 0x01, 0x18, // 87\n    0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02, // 88\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08, // 89\n    0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02, // 90\n    0x00, 0x00, 0xF8, 0x0F, 0x08, 0x08, // 91\n    0x18, 0x00, 0xE0, 0x00, 0x00, 0x03, // 92\n    0x08, 0x08, 0xF8, 0x0F, // 93\n    0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x40, // 94\n    0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, // 95\n    0x08, 0x00, 0x10, // 96\n    0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03, // 97\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 98\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01, // 99\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03, // 100\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02, // 101\n    0x20, 0x00, 0xF0, 0x03, 0x28, // 102\n    0x00, 0x00, 0xC0, 0x05, 0x20, 0x0A, 0x20, 0x0A, 0xE0, 0x07, // 103\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 104\n    0x00, 0x00, 0xE8, 0x03, // 105\n    0x00, 0x08, 0xE8, 0x07, // 106\n    0xF8, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02, // 107\n    0x00, 0x00, 0xF8, 0x03, // 108\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 109\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03, // 110\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 111\n    0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 112\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xE0, 0x0F, // 113\n    0x00, 0x00, 0xE0, 0x03, 0x20, // 114\n    0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x20, 0x01, // 115\n    0x20, 0x00, 0xF8, 0x03, 0x20, 0x02, // 116\n    0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03, // 117\n    0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, // 118\n    0xE0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x01, // 119\n    0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02, // 120\n    0x20, 0x00, 0xC0, 0x09, 0x00, 0x06, 0xC0, 0x01, 0x20, // 121\n    0x20, 0x02, 0x20, 0x03, 0xA0, 0x02, 0x60, 0x02, 0x20, 0x02, // 122\n    0x80, 0x00, 0x78, 0x0F, 0x08, 0x08, // 123\n    0x00, 0x00, 0xF8, 0x0F, // 124\n    0x08, 0x08, 0x78, 0x0F, 0x80, // 125\n    0xC0, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x00, 0xC0, // 126\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x02, 0x20, 0x02, 0x00, 0x02, 0x00, 0x02, // 129\n    0x40, 0x00, 0xF8, 0x03, 0x20, // 130\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x44, 0x00, 0x82, 0x01, 0xF8, 0x03, // 131\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x0D, 0x00, 0x0A, // 132\n    0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x0E, 0xE0, 0x0B, // 133\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x10, 0x01, // 134\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x28, 0x02, 0x44, 0x01, // 135\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x28, 0x00, 0xC4, 0x03, // 136\n    0x20, 0x02, 0x20, 0x03, 0xA8, 0x02, 0x64, 0x02, 0x20, 0x02, // 137\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0xF0, 0x01, // 147\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x28, 0x02, 0xC4, 0x01, // 148\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x0E, 0x48, 0x0A, 0x48, 0x02, // 152\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x0E, 0xC0, 0x0A, // 153\n    0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x90, 0x01, // 154\n    0x40, 0x02, 0xA0, 0x02, 0xA8, 0x02, 0x24, 0x01, // 155\n    0x00, 0x00, 0xA0, 0x0F, // 161\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x0F, 0x78, 0x02, 0x40, 0x01, // 162\n    0x40, 0x02, 0x70, 0x03, 0xC8, 0x02, 0x48, 0x02, 0x08, 0x02, 0x10, 0x02, // 163\n    0x00, 0x00, 0xE0, 0x01, 0x20, 0x01, 0x20, 0x01, 0xE0, 0x01, // 164\n    0x48, 0x01, 0x70, 0x01, 0xC0, 0x03, 0x70, 0x01, 0x48, 0x01, // 165\n    0x00, 0x00, 0x38, 0x0F, // 166\n    0xD0, 0x04, 0x28, 0x09, 0x48, 0x09, 0x48, 0x0A, 0x90, 0x05, // 167\n    0x08, 0x00, 0x00, 0x00, 0x08, // 168\n    0xE0, 0x00, 0x10, 0x01, 0x48, 0x02, 0xA8, 0x02, 0xA8, 0x02, 0x10, 0x01, 0xE0, // 169\n    0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x78, // 170\n    0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, // 171\n    0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0, // 172\n    0x80, 0x00, 0x80, // 173\n    0xE0, 0x00, 0x10, 0x01, 0xE8, 0x02, 0x68, 0x02, 0xC8, 0x02, 0x10, 0x01, 0xE0, // 174\n    0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, // 175\n    0x00, 0x00, 0x38, 0x00, 0x28, 0x00, 0x38, // 176\n    0x40, 0x02, 0x40, 0x02, 0xF0, 0x03, 0x40, 0x02, 0x40, 0x02, // 177\n    0x48, 0x00, 0x68, 0x00, 0x58, // 178\n    0x48, 0x00, 0x58, 0x00, 0x68, // 179\n    0x00, 0x00, 0x10, 0x00, 0x08, // 180\n    0x00, 0x00, 0xE0, 0x0F, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03, // 181\n    0x70, 0x00, 0xF8, 0x0F, 0x08, 0x00, 0xF8, 0x0F, 0x08, // 182\n    0x00, 0x00, 0x40, // 183\n    0x00, 0x00, 0x00, 0x14, 0x00, 0x18, // 184\n    0x08, 0x03, 0x88, 0x02, 0xCA, 0x02, 0x69, 0x02, 0x38, 0x02, 0x18, 0x02, // 185\n    0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30, // 186\n    0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x6A, 0x02, 0x38, 0x02, 0x18, 0x02, // 187\n    0x20, 0x02, 0x20, 0x03, 0xA8, 0x02, 0x60, 0x02, 0x20, 0x02, // 188\n    0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0x80, 0x00, 0x60, 0x00, 0x50, 0x02, 0x48, 0x03, 0xC0, 0x02, // 189\n    0x48, 0x00, 0x58, 0x00, 0x68, 0x03, 0x80, 0x00, 0x60, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01, // 190\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x09, 0xA0, 0x09, 0x00, 0x04, // 191\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 192\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02, // 193\n    0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x89, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 194\n    0x00, 0x02, 0xC2, 0x01, 0xB1, 0x00, 0x8A, 0x00, 0xB1, 0x00, 0xC0, 0x01, 0x00, 0x02, // 195\n    0x00, 0x02, 0xC0, 0x01, 0xB2, 0x00, 0x88, 0x00, 0xB2, 0x00, 0xC0, 0x01, 0x00, 0x02, // 196\n    0x00, 0x02, 0xC0, 0x01, 0xBE, 0x00, 0x8A, 0x00, 0xBE, 0x00, 0xC0, 0x01, 0x00, 0x02, // 197\n    0x00, 0x03, 0xC0, 0x00, 0xE0, 0x00, 0x98, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, // 198\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x16, 0x08, 0x1A, 0x10, 0x01, // 199\n    0x00, 0x00, 0xF8, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02, // 200\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x4A, 0x02, 0x49, 0x02, 0x48, 0x02, // 201\n    0x00, 0x00, 0xFA, 0x03, 0x49, 0x02, 0x4A, 0x02, 0x48, 0x02, 0x48, 0x02, // 202\n    0x00, 0x00, 0xF8, 0x03, 0x4A, 0x02, 0x48, 0x02, 0x4A, 0x02, 0x48, 0x02, // 203\n    0x00, 0x00, 0xF9, 0x03, 0x02, // 204\n    0x02, 0x00, 0xF9, 0x03, // 205\n    0x01, 0x00, 0xFA, 0x03, // 206\n    0x02, 0x00, 0xF8, 0x03, 0x02, // 207\n    0x40, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x10, 0x01, 0xE0, // 208\n    0x00, 0x00, 0xFA, 0x03, 0x31, 0x00, 0x42, 0x00, 0x81, 0x01, 0xF8, 0x03, // 209\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01, // 210\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x08, 0x02, 0xF0, 0x01, // 211\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0xF0, 0x01, // 212\n    0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x09, 0x02, 0x0A, 0x02, 0x09, 0x02, 0xF0, 0x01, // 213\n    0x00, 0x00, 0xF0, 0x01, 0x0A, 0x02, 0x08, 0x02, 0x0A, 0x02, 0x08, 0x02, 0xF0, 0x01, // 214\n    0x10, 0x01, 0xA0, 0x00, 0xE0, 0x00, 0xA0, 0x00, 0x10, 0x01, // 215\n    0x00, 0x00, 0xF0, 0x02, 0x08, 0x03, 0xC8, 0x02, 0x28, 0x02, 0x18, 0x03, 0xE8, // 216\n    0x00, 0x00, 0xF8, 0x01, 0x01, 0x02, 0x02, 0x02, 0x00, 0x02, 0xF8, 0x01, // 217\n    0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x00, 0x02, 0xF8, 0x01, // 218\n    0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x01, 0x02, 0x02, 0x02, 0xF8, 0x01, // 219\n    0x00, 0x00, 0xF8, 0x01, 0x02, 0x02, 0x00, 0x02, 0x02, 0x02, 0xF8, 0x01, // 220\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC2, 0x03, 0x21, 0x00, 0x10, 0x00, 0x08, // 221\n    0x00, 0x00, 0xF8, 0x03, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0xE0, // 222\n    0x00, 0x00, 0xF0, 0x03, 0x08, 0x01, 0x48, 0x02, 0xB0, 0x02, 0x80, 0x01, // 223\n    0x00, 0x00, 0x00, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE0, 0x03, // 224\n    0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE0, 0x03, // 225\n    0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA4, 0x02, 0xE8, 0x03, // 226\n    0x00, 0x00, 0x08, 0x03, 0xA4, 0x02, 0xA8, 0x02, 0xE4, 0x03, // 227\n    0x00, 0x00, 0x00, 0x03, 0xA8, 0x02, 0xA0, 0x02, 0xE8, 0x03, // 228\n    0x00, 0x00, 0x00, 0x03, 0xAE, 0x02, 0xAA, 0x02, 0xEE, 0x03, // 229\n    0x00, 0x00, 0x40, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02, // 230\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x16, 0x20, 0x1A, 0x40, 0x01, // 231\n    0x00, 0x00, 0xC0, 0x01, 0xA4, 0x02, 0xA8, 0x02, 0xC0, 0x02, // 232\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC0, 0x02, // 233\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA4, 0x02, 0xC8, 0x02, // 234\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA0, 0x02, 0xC8, 0x02, // 235\n    0x00, 0x00, 0xE4, 0x03, 0x08, // 236\n    0x08, 0x00, 0xE4, 0x03, // 237\n    0x08, 0x00, 0xE4, 0x03, 0x08, // 238\n    0x08, 0x00, 0xE0, 0x03, 0x08, // 239\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x38, 0x02, 0xE0, 0x01, // 240\n    0x00, 0x00, 0xE8, 0x03, 0x24, 0x00, 0x28, 0x00, 0xC4, 0x03, // 241\n    0x00, 0x00, 0xC0, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC0, 0x01, // 242\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC0, 0x01, // 243\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x24, 0x02, 0xC8, 0x01, // 244\n    0x00, 0x00, 0xC8, 0x01, 0x24, 0x02, 0x28, 0x02, 0xC4, 0x01, // 245\n    0x00, 0x00, 0xC0, 0x01, 0x28, 0x02, 0x20, 0x02, 0xC8, 0x01, // 246\n    0x40, 0x00, 0x40, 0x00, 0x50, 0x01, 0x40, 0x00, 0x40, // 247\n    0x00, 0x00, 0xC0, 0x02, 0xA0, 0x03, 0x60, 0x02, 0xA0, 0x01, // 248\n    0x00, 0x00, 0xE0, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03, // 249\n    0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x04, 0x02, 0xE0, 0x03, // 250\n    0x00, 0x00, 0xE8, 0x01, 0x04, 0x02, 0x08, 0x02, 0xE0, 0x03, // 251\n    0x00, 0x00, 0xE0, 0x01, 0x08, 0x02, 0x00, 0x02, 0xE8, 0x03, // 252\n    0x20, 0x00, 0xC0, 0x09, 0x08, 0x06, 0xC4, 0x01, 0x20, // 253\n    0x00, 0x00, 0xF8, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01, // 254\n    0x20, 0x00, 0xC8, 0x09, 0x00, 0x06, 0xC8, 0x01, 0x20, // 255\n};\n\nconst uint8_t ArialMT_Plain_16_PL[] PROGMEM = {\n    0x10, // Width: 16\n    0x13, // Height: 19\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x04, // 32\n    0x00, 0x00, 0x08, 0x04, // 33\n    0x00, 0x08, 0x0D, 0x06, // 34\n    0x00, 0x15, 0x1A, 0x0A, // 35\n    0x00, 0x2F, 0x17, 0x09, // 36\n    0x00, 0x46, 0x26, 0x0E, // 37\n    0x00, 0x6C, 0x1D, 0x0B, // 38\n    0x00, 0x89, 0x04, 0x03, // 39\n    0x00, 0x8D, 0x0C, 0x05, // 40\n    0x00, 0x99, 0x0B, 0x05, // 41\n    0x00, 0xA4, 0x0D, 0x06, // 42\n    0x00, 0xB1, 0x17, 0x09, // 43\n    0x00, 0xC8, 0x09, 0x04, // 44\n    0x00, 0xD1, 0x0B, 0x05, // 45\n    0x00, 0xDC, 0x08, 0x04, // 46\n    0x00, 0xE4, 0x0A, 0x05, // 47\n    0x00, 0xEE, 0x17, 0x09, // 48\n    0x01, 0x05, 0x11, 0x07, // 49\n    0x01, 0x16, 0x17, 0x09, // 50\n    0x01, 0x2D, 0x17, 0x09, // 51\n    0x01, 0x44, 0x17, 0x09, // 52\n    0x01, 0x5B, 0x17, 0x09, // 53\n    0x01, 0x72, 0x17, 0x09, // 54\n    0x01, 0x89, 0x16, 0x09, // 55\n    0x01, 0x9F, 0x17, 0x09, // 56\n    0x01, 0xB6, 0x17, 0x09, // 57\n    0x01, 0xCD, 0x05, 0x03, // 58\n    0x01, 0xD2, 0x06, 0x03, // 59\n    0x01, 0xD8, 0x17, 0x09, // 60\n    0x01, 0xEF, 0x17, 0x09, // 61\n    0x02, 0x06, 0x17, 0x09, // 62\n    0x02, 0x1D, 0x16, 0x09, // 63\n    0x02, 0x33, 0x2F, 0x11, // 64\n    0x02, 0x62, 0x1D, 0x0B, // 65\n    0x02, 0x7F, 0x1D, 0x0B, // 66\n    0x02, 0x9C, 0x20, 0x0C, // 67\n    0x02, 0xBC, 0x20, 0x0C, // 68\n    0x02, 0xDC, 0x1D, 0x0B, // 69\n    0x02, 0xF9, 0x19, 0x0A, // 70\n    0x03, 0x12, 0x20, 0x0C, // 71\n    0x03, 0x32, 0x1D, 0x0B, // 72\n    0x03, 0x4F, 0x05, 0x03, // 73\n    0x03, 0x54, 0x14, 0x08, // 74\n    0x03, 0x68, 0x1D, 0x0B, // 75\n    0x03, 0x85, 0x17, 0x09, // 76\n    0x03, 0x9C, 0x23, 0x0D, // 77\n    0x03, 0xBF, 0x1D, 0x0B, // 78\n    0x03, 0xDC, 0x20, 0x0C, // 79\n    0x03, 0xFC, 0x1C, 0x0B, // 80\n    0x04, 0x18, 0x20, 0x0C, // 81\n    0x04, 0x38, 0x1D, 0x0B, // 82\n    0x04, 0x55, 0x1D, 0x0B, // 83\n    0x04, 0x72, 0x19, 0x0A, // 84\n    0x04, 0x8B, 0x1D, 0x0B, // 85\n    0x04, 0xA8, 0x1C, 0x0B, // 86\n    0x04, 0xC4, 0x2B, 0x10, // 87\n    0x04, 0xEF, 0x20, 0x0C, // 88\n    0x05, 0x0F, 0x19, 0x0A, // 89\n    0x05, 0x28, 0x1A, 0x0A, // 90\n    0x05, 0x42, 0x0C, 0x05, // 91\n    0x05, 0x4E, 0x0B, 0x05, // 92\n    0x05, 0x59, 0x09, 0x04, // 93\n    0x05, 0x62, 0x14, 0x08, // 94\n    0x05, 0x76, 0x1B, 0x0A, // 95\n    0x05, 0x91, 0x07, 0x04, // 96\n    0x05, 0x98, 0x17, 0x09, // 97\n    0x05, 0xAF, 0x17, 0x09, // 98\n    0x05, 0xC6, 0x14, 0x08, // 99\n    0x05, 0xDA, 0x17, 0x09, // 100\n    0x05, 0xF1, 0x17, 0x09, // 101\n    0x06, 0x08, 0x0A, 0x05, // 102\n    0x06, 0x12, 0x17, 0x09, // 103\n    0x06, 0x29, 0x14, 0x08, // 104\n    0x06, 0x3D, 0x05, 0x03, // 105\n    0x06, 0x42, 0x06, 0x03, // 106\n    0x06, 0x48, 0x17, 0x09, // 107\n    0x06, 0x5F, 0x05, 0x03, // 108\n    0x06, 0x64, 0x23, 0x0D, // 109\n    0x06, 0x87, 0x14, 0x08, // 110\n    0x06, 0x9B, 0x17, 0x09, // 111\n    0x06, 0xB2, 0x17, 0x09, // 112\n    0x06, 0xC9, 0x18, 0x09, // 113\n    0x06, 0xE1, 0x0D, 0x06, // 114\n    0x06, 0xEE, 0x14, 0x08, // 115\n    0x07, 0x02, 0x0B, 0x05, // 116\n    0x07, 0x0D, 0x14, 0x08, // 117\n    0x07, 0x21, 0x13, 0x08, // 118\n    0x07, 0x34, 0x1F, 0x0C, // 119\n    0x07, 0x53, 0x14, 0x08, // 120\n    0x07, 0x67, 0x13, 0x08, // 121\n    0x07, 0x7A, 0x14, 0x08, // 122\n    0x07, 0x8E, 0x0F, 0x06, // 123\n    0x07, 0x9D, 0x06, 0x03, // 124\n    0x07, 0xA3, 0x0E, 0x06, // 125\n    0x07, 0xB1, 0x17, 0x09, // 126\n    0xFF, 0xFF, 0x00, 0x10, // 127\n    0xFF, 0xFF, 0x00, 0x10, // 128\n    0x07, 0xC8, 0x17, 0x09, // 129\n    0x07, 0xDF, 0x07, 0x04, // 130\n    0x07, 0xE6, 0x1D, 0x0B, // 131\n    0x08, 0x03, 0x1E, 0x0B, // 132\n    0x08, 0x21, 0x1B, 0x0A, // 133\n    0x08, 0x3C, 0x20, 0x0C, // 134\n    0x08, 0x5C, 0x14, 0x08, // 135\n    0x08, 0x70, 0x14, 0x08, // 136\n    0x08, 0x84, 0x14, 0x08, // 137\n    0xFF, 0xFF, 0x00, 0x10, // 138\n    0xFF, 0xFF, 0x00, 0x10, // 139\n    0xFF, 0xFF, 0x00, 0x10, // 140\n    0xFF, 0xFF, 0x00, 0x10, // 141\n    0xFF, 0xFF, 0x00, 0x10, // 142\n    0xFF, 0xFF, 0x00, 0x10, // 143\n    0xFF, 0xFF, 0x00, 0x10, // 144\n    0xFF, 0xFF, 0x00, 0x10, // 145\n    0xFF, 0xFF, 0x00, 0x10, // 146\n    0x08, 0x98, 0x20, 0x0C, // 147\n    0x08, 0xB8, 0x17, 0x09, // 148\n    0xFF, 0xFF, 0x00, 0x10, // 149\n    0xFF, 0xFF, 0x00, 0x10, // 150\n    0xFF, 0xFF, 0x00, 0x10, // 151\n    0x08, 0xCF, 0x1D, 0x0B, // 152\n    0x08, 0xEC, 0x17, 0x09, // 153\n    0x09, 0x03, 0x1D, 0x0B, // 154\n    0x09, 0x20, 0x14, 0x08, // 155\n    0xFF, 0xFF, 0x00, 0x10, // 156\n    0xFF, 0xFF, 0x00, 0x10, // 157\n    0xFF, 0xFF, 0x00, 0x10, // 158\n    0xFF, 0xFF, 0x00, 0x10, // 159\n    0xFF, 0xFF, 0x00, 0x10, // 160\n    0x09, 0x34, 0x09, 0x04, // 161\n    0x09, 0x3D, 0x17, 0x09, // 162\n    0x09, 0x54, 0x17, 0x09, // 163\n    0x09, 0x6B, 0x14, 0x08, // 164\n    0x09, 0x7F, 0x1A, 0x0A, // 165\n    0x09, 0x99, 0x06, 0x03, // 166\n    0x09, 0x9F, 0x17, 0x09, // 167\n    0x09, 0xB6, 0x07, 0x04, // 168\n    0x09, 0xBD, 0x23, 0x0D, // 169\n    0x09, 0xE0, 0x0E, 0x06, // 170\n    0x09, 0xEE, 0x14, 0x08, // 171\n    0x0A, 0x02, 0x17, 0x09, // 172\n    0x0A, 0x19, 0x0B, 0x05, // 173\n    0x0A, 0x24, 0x23, 0x0D, // 174\n    0x0A, 0x47, 0x19, 0x0A, // 175\n    0x0A, 0x60, 0x0D, 0x06, // 176\n    0x0A, 0x6D, 0x17, 0x09, // 177\n    0x0A, 0x84, 0x0E, 0x06, // 178\n    0x0A, 0x92, 0x0D, 0x06, // 179\n    0x0A, 0x9F, 0x0A, 0x05, // 180\n    0x0A, 0xA9, 0x17, 0x09, // 181\n    0x0A, 0xC0, 0x19, 0x0A, // 182\n    0x0A, 0xD9, 0x08, 0x04, // 183\n    0x0A, 0xE1, 0x0C, 0x05, // 184\n    0x0A, 0xED, 0x1A, 0x0A, // 185\n    0x0B, 0x07, 0x0D, 0x06, // 186\n    0x0B, 0x14, 0x1A, 0x0A, // 187\n    0x0B, 0x2E, 0x14, 0x08, // 188\n    0x0B, 0x42, 0x26, 0x0E, // 189\n    0x0B, 0x68, 0x26, 0x0E, // 190\n    0x0B, 0x8E, 0x1A, 0x0A, // 191\n    0x0B, 0xA8, 0x1D, 0x0B, // 192\n    0x0B, 0xC5, 0x1D, 0x0B, // 193\n    0x0B, 0xE2, 0x1D, 0x0B, // 194\n    0x0B, 0xFF, 0x1D, 0x0B, // 195\n    0x0C, 0x1C, 0x1D, 0x0B, // 196\n    0x0C, 0x39, 0x1D, 0x0B, // 197\n    0x0C, 0x56, 0x2C, 0x10, // 198\n    0x0C, 0x82, 0x20, 0x0C, // 199\n    0x0C, 0xA2, 0x1D, 0x0B, // 200\n    0x0C, 0xBF, 0x1D, 0x0B, // 201\n    0x0C, 0xDC, 0x1D, 0x0B, // 202\n    0x0C, 0xF9, 0x1D, 0x0B, // 203\n    0x0D, 0x16, 0x05, 0x03, // 204\n    0x0D, 0x1B, 0x07, 0x04, // 205\n    0x0D, 0x22, 0x0A, 0x05, // 206\n    0x0D, 0x2C, 0x07, 0x04, // 207\n    0x0D, 0x33, 0x20, 0x0C, // 208\n    0x0D, 0x53, 0x1D, 0x0B, // 209\n    0x0D, 0x70, 0x20, 0x0C, // 210\n    0x0D, 0x90, 0x20, 0x0C, // 211\n    0x0D, 0xB0, 0x20, 0x0C, // 212\n    0x0D, 0xD0, 0x20, 0x0C, // 213\n    0x0D, 0xF0, 0x20, 0x0C, // 214\n    0x0E, 0x10, 0x17, 0x09, // 215\n    0x0E, 0x27, 0x20, 0x0C, // 216\n    0x0E, 0x47, 0x1D, 0x0B, // 217\n    0x0E, 0x64, 0x1D, 0x0B, // 218\n    0x0E, 0x81, 0x1D, 0x0B, // 219\n    0x0E, 0x9E, 0x1D, 0x0B, // 220\n    0x0E, 0xBB, 0x19, 0x0A, // 221\n    0x0E, 0xD4, 0x1D, 0x0B, // 222\n    0x0E, 0xF1, 0x17, 0x09, // 223\n    0x0F, 0x08, 0x17, 0x09, // 224\n    0x0F, 0x1F, 0x17, 0x09, // 225\n    0x0F, 0x36, 0x17, 0x09, // 226\n    0x0F, 0x4D, 0x17, 0x09, // 227\n    0x0F, 0x64, 0x17, 0x09, // 228\n    0x0F, 0x7B, 0x17, 0x09, // 229\n    0x0F, 0x92, 0x29, 0x0F, // 230\n    0x0F, 0xBB, 0x14, 0x08, // 231\n    0x0F, 0xCF, 0x17, 0x09, // 232\n    0x0F, 0xE6, 0x17, 0x09, // 233\n    0x0F, 0xFD, 0x17, 0x09, // 234\n    0x10, 0x14, 0x17, 0x09, // 235\n    0x10, 0x2B, 0x05, 0x03, // 236\n    0x10, 0x30, 0x07, 0x04, // 237\n    0x10, 0x37, 0x0A, 0x05, // 238\n    0x10, 0x41, 0x07, 0x04, // 239\n    0x10, 0x48, 0x17, 0x09, // 240\n    0x10, 0x5F, 0x14, 0x08, // 241\n    0x10, 0x73, 0x17, 0x09, // 242\n    0x10, 0x8A, 0x17, 0x09, // 243\n    0x10, 0xA1, 0x17, 0x09, // 244\n    0x10, 0xB8, 0x17, 0x09, // 245\n    0x10, 0xCF, 0x17, 0x09, // 246\n    0x10, 0xE6, 0x17, 0x09, // 247\n    0x10, 0xFD, 0x17, 0x09, // 248\n    0x11, 0x14, 0x14, 0x08, // 249\n    0x11, 0x28, 0x14, 0x08, // 250\n    0x11, 0x3C, 0x14, 0x08, // 251\n    0x11, 0x50, 0x14, 0x08, // 252\n    0x11, 0x64, 0x13, 0x08, // 253\n    0x11, 0x77, 0x17, 0x09, // 254\n    0x11, 0x8E, 0x13, 0x08, // 255\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x5F, // 33\n    0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // 34\n    0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00, 0xB8, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00, 0xB8, 0x08, 0x00, 0x80, 0x08, // 35\n    0x00, 0x00, 0x00, 0xE0, 0x10, 0x00, 0x10, 0x21, 0x00, 0x08, 0x41, 0x00, 0xFC, 0xFF, 0x00, 0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 36\n    0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x61, 0x00, 0xF0, 0x18, 0x00, 0x00, 0x06, 0x00, 0xC0, 0x01, 0x00, 0x30, 0x3C, 0x00, 0x08, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x3C, // 37\n    0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x70, 0x22, 0x00, 0x88, 0x41, 0x00, 0x08, 0x43, 0x00, 0x88, 0x44, 0x00, 0x70, 0x28, 0x00, 0x00, 0x10, 0x00, 0x00, 0x28, 0x00, 0x00, 0x44, // 38\n    0x00, 0x00, 0x00, 0x78, // 39\n    0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x70, 0xC0, 0x01, 0x08, 0x00, 0x02, // 40\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x70, 0xC0, 0x01, 0x80, 0x3F, // 41\n    0x10, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x38, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x10, // 42\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, // 44\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, // 46\n    0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00, 0x18, // 47\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0xE0, 0x1F, // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0xF8, 0x7F, // 49\n    0x00, 0x00, 0x00, 0x20, 0x40, 0x00, 0x10, 0x60, 0x00, 0x08, 0x50, 0x00, 0x08, 0x48, 0x00, 0x08, 0x44, 0x00, 0x10, 0x43, 0x00, 0xE0, 0x40, // 50\n    0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x88, 0x41, 0x00, 0xF0, 0x22, 0x00, 0x00, 0x1C, // 51\n    0x00, 0x0C, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x09, 0x00, 0xC0, 0x08, 0x00, 0x20, 0x08, 0x00, 0x10, 0x08, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x08, // 52\n    0x00, 0x00, 0x00, 0xC0, 0x11, 0x00, 0xB8, 0x20, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x08, 0x21, 0x00, 0x08, 0x1E, // 53\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x21, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x10, 0x21, 0x00, 0x20, 0x1E, // 54\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x78, 0x00, 0x08, 0x07, 0x00, 0xC8, 0x00, 0x00, 0x28, 0x00, 0x00, 0x18, // 55\n    0x00, 0x00, 0x00, 0x60, 0x1C, 0x00, 0x90, 0x22, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x90, 0x22, 0x00, 0x60, 0x1C, // 56\n    0x00, 0x00, 0x00, 0xE0, 0x11, 0x00, 0x10, 0x22, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x10, 0x22, 0x00, 0xE0, 0x1F, // 57\n    0x00, 0x00, 0x00, 0x40, 0x40, // 58\n    0x00, 0x00, 0x00, 0x40, 0xC0, 0x01, // 59\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x40, 0x10, // 60\n    0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, // 61\n    0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x02, // 62\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x5C, 0x00, 0x08, 0x02, 0x00, 0x10, 0x01, 0x00, 0xE0, // 63\n    0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0xC0, 0x40, 0x00, 0x20, 0x80, 0x00, 0x10, 0x1E, 0x01, 0x10, 0x21, 0x01, 0x88, 0x40, 0x02, 0x48, 0x40, 0x02, 0x48, 0x40, 0x02, 0x48, 0x20, 0x02, 0x88, 0x7C, 0x02, 0xC8, 0x43, 0x02, 0x10, 0x40, 0x02, 0x10, 0x20, 0x01, 0x60, 0x10, 0x01, 0x80, 0x8F, // 64\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x08, 0x04, 0x00, 0x70, 0x04, 0x00, 0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 65\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x90, 0x22, 0x00, 0x60, 0x1C, // 66\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 67\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 68\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 69\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, // 70\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x12, 0x00, 0x00, 0x0E, // 71\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xF8, 0x7F, // 72\n    0x00, 0x00, 0x00, 0xF8, 0x7F, // 73\n    0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x3F, // 74\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x03, 0x00, 0x40, 0x04, 0x00, 0x20, 0x18, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, // 75\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, // 76\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 77\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 78\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 79\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x10, 0x01, 0x00, 0xE0, // 80\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x50, 0x00, 0x08, 0x50, 0x00, 0x10, 0x20, 0x00, 0x20, 0x70, 0x00, 0xC0, 0x4F, // 81\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x06, 0x00, 0x08, 0x1A, 0x00, 0x10, 0x21, 0x00, 0xE0, 0x40, // 82\n    0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x90, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 83\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 84\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 85\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00, 0x00, 0x07, 0x00, 0xE0, 0x00, 0x00, 0x18, // 86\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x00, 0x08, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00, 0x18, // 87\n    0x00, 0x40, 0x00, 0x08, 0x20, 0x00, 0x10, 0x10, 0x00, 0x60, 0x0C, 0x00, 0x80, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00, 0x60, 0x0C, 0x00, 0x10, 0x10, 0x00, 0x08, 0x20, 0x00, 0x00, 0x40, // 88\n    0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, // 89\n    0x00, 0x40, 0x00, 0x08, 0x60, 0x00, 0x08, 0x58, 0x00, 0x08, 0x44, 0x00, 0x08, 0x43, 0x00, 0x88, 0x40, 0x00, 0x68, 0x40, 0x00, 0x18, 0x40, 0x00, 0x08, 0x40, // 90\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02, // 91\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60, // 92\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF8, 0xFF, 0x03, // 93\n    0x00, 0x01, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x01, // 94\n    0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // 95\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, // 96\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00, 0x80, 0x7F, // 97\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 98\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, // 99\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0xF8, 0x7F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00, 0x00, 0x17, // 101\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x48, 0x00, 0x00, 0x48, // 102\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x01, 0x80, 0x20, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x80, 0x20, 0x01, 0xC0, 0xFF, // 103\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 104\n    0x00, 0x00, 0x00, 0xC8, 0x7F, // 105\n    0x00, 0x00, 0x02, 0xC8, 0xFF, 0x01, // 106\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x19, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, // 107\n    0x00, 0x00, 0x00, 0xF8, 0x7F, // 108\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 109\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 111\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 112\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0xC0, 0xFF, 0x03, // 113\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, // 114\n    0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x38, // 115\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, // 116\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 117\n    0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, // 118\n    0xC0, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1F, 0x00, 0xC0, // 119\n    0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, // 120\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x00, 0xE0, 0x01, 0x00, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0, // 121\n    0x40, 0x40, 0x00, 0x40, 0x60, 0x00, 0x40, 0x58, 0x00, 0x40, 0x44, 0x00, 0x40, 0x43, 0x00, 0xC0, 0x40, 0x00, 0x40, 0x40, // 122\n    0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xF0, 0xFB, 0x01, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02, // 123\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, // 124\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF0, 0xFB, 0x01, 0x00, 0x04, 0x00, 0x00, 0x04, // 125\n    0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, // 126\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x42, 0x00, 0x00, 0x41, 0x00, 0x80, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, // 129\n    0x00, 0x01, 0x00, 0xF8, 0x7F, 0x00, 0x80, // 130\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x03, 0x00, 0x04, 0x04, 0x00, 0x02, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 131\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x08, 0x04, 0x00, 0x70, 0x04, 0x00, 0x80, 0x07, 0x00, 0x00, 0x9C, 0x01, 0x00, 0x60, 0x02, // 132\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00, 0x80, 0x7F, 0x03, 0x00, 0x80, 0x04, // 133\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 134\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x80, 0x20, // 135\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x80, 0x7F, // 136\n    0x40, 0x40, 0x00, 0x40, 0x60, 0x00, 0x40, 0x58, 0x00, 0x50, 0x44, 0x00, 0x48, 0x43, 0x00, 0xC0, 0x40, 0x00, 0x40, 0x40, // 137\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 147\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 148\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0xC1, 0x01, 0x08, 0x41, 0x02, 0x08, 0x41, 0x00, 0x08, 0x40, // 152\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x03, 0x40, 0xC4, 0x04, 0x80, 0x24, 0x00, 0x00, 0x17, // 153\n    0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x90, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x09, 0x42, 0x00, 0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 154\n    0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x80, 0x38, // 155\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xFF, 0x03, // 161\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x03, 0x40, 0xF0, 0x00, 0x40, 0x4E, 0x00, 0xC0, 0x41, 0x00, 0xB8, 0x20, 0x00, 0x00, 0x11, // 162\n    0x00, 0x41, 0x00, 0xE0, 0x31, 0x00, 0x10, 0x2F, 0x00, 0x08, 0x21, 0x00, 0x08, 0x21, 0x00, 0x08, 0x40, 0x00, 0x10, 0x40, 0x00, 0x20, 0x20, // 163\n    0x00, 0x00, 0x00, 0x40, 0x0B, 0x00, 0x80, 0x04, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00, 0x80, 0x04, 0x00, 0x40, 0x0B, // 164\n    0x08, 0x0A, 0x00, 0x10, 0x0A, 0x00, 0x60, 0x0A, 0x00, 0x80, 0x0B, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x0B, 0x00, 0x60, 0x0A, 0x00, 0x10, 0x0A, 0x00, 0x08, 0x0A, // 165\n    0x00, 0x00, 0x00, 0xF8, 0xF1, 0x03, // 166\n    0x00, 0x86, 0x00, 0x70, 0x09, 0x01, 0xC8, 0x10, 0x02, 0x88, 0x10, 0x02, 0x08, 0x21, 0x02, 0x08, 0x61, 0x02, 0x30, 0xD2, 0x01, 0x00, 0x0C, // 167\n    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // 168\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xC8, 0x47, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00, 0x48, 0x44, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 169\n    0xD0, 0x00, 0x00, 0x48, 0x01, 0x00, 0x28, 0x01, 0x00, 0x28, 0x01, 0x00, 0xF0, 0x01, // 170\n    0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, // 171\n    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x0F, // 172\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 173\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xE8, 0x4F, 0x00, 0x28, 0x41, 0x00, 0x28, 0x41, 0x00, 0x28, 0x43, 0x00, 0x28, 0x45, 0x00, 0xC8, 0x48, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 174\n    0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, // 175\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x48, 0x00, 0x00, 0x48, 0x00, 0x00, 0x30, // 176\n    0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0xE0, 0x4F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, // 177\n    0x10, 0x01, 0x00, 0x88, 0x01, 0x00, 0x48, 0x01, 0x00, 0x48, 0x01, 0x00, 0x30, 0x01, // 178\n    0x90, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x28, 0x01, 0x00, 0xD8, // 179\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, // 180\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 181\n    0xF0, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x08, // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // 183\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, // 184\n    0x00, 0x40, 0x00, 0x08, 0x60, 0x00, 0x08, 0x58, 0x00, 0x08, 0x44, 0x00, 0x0A, 0x43, 0x00, 0x89, 0x40, 0x00, 0x68, 0x40, 0x00, 0x18, 0x40, 0x00, 0x08, 0x40, // 185\n    0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0xF0, // 186\n    0x00, 0x40, 0x00, 0x08, 0x60, 0x00, 0x08, 0x58, 0x00, 0x08, 0x44, 0x00, 0x0A, 0x43, 0x00, 0x88, 0x40, 0x00, 0x68, 0x40, 0x00, 0x18, 0x40, 0x00, 0x08, 0x40, // 187\n    0x40, 0x40, 0x00, 0x40, 0x60, 0x00, 0x40, 0x58, 0x00, 0x50, 0x44, 0x00, 0x40, 0x43, 0x00, 0xC0, 0x40, 0x00, 0x40, 0x40, // 188\n    0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x40, 0x00, 0xF8, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0x80, 0x00, 0x00, 0x60, 0x44, 0x00, 0x10, 0x62, 0x00, 0x08, 0x52, 0x00, 0x00, 0x52, 0x00, 0x00, 0x4C, // 189\n    0x90, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x41, 0x00, 0x28, 0x21, 0x00, 0xD8, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0x80, 0x00, 0x00, 0x40, 0x30, 0x00, 0x30, 0x28, 0x00, 0x08, 0x24, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x20, // 190\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x10, 0x01, 0x00, 0x08, 0x02, 0x40, 0x07, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0xC0, // 191\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x71, 0x04, 0x00, 0x0A, 0x04, 0x00, 0x70, 0x04, 0x00, 0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 192\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x0A, 0x04, 0x00, 0x71, 0x04, 0x00, 0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 193\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x72, 0x04, 0x00, 0x09, 0x04, 0x00, 0x71, 0x04, 0x00, 0x82, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 194\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x72, 0x04, 0x00, 0x09, 0x04, 0x00, 0x72, 0x04, 0x00, 0x81, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 195\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x72, 0x04, 0x00, 0x08, 0x04, 0x00, 0x72, 0x04, 0x00, 0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 196\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x7E, 0x04, 0x00, 0x0A, 0x04, 0x00, 0x7E, 0x04, 0x00, 0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 197\n    0x00, 0x60, 0x00, 0x00, 0x18, 0x00, 0x00, 0x06, 0x00, 0x80, 0x05, 0x00, 0x60, 0x04, 0x00, 0x18, 0x04, 0x00, 0x08, 0x04, 0x00, 0x08, 0x04, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, // 198\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x02, 0x08, 0xC0, 0x02, 0x08, 0x40, 0x03, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 199\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x09, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 200\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x09, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 201\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x09, 0x41, 0x00, 0x09, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 202\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 203\n    0x01, 0x00, 0x00, 0xFA, 0x7F, // 204\n    0x00, 0x00, 0x00, 0xFA, 0x7F, 0x00, 0x01, // 205\n    0x02, 0x00, 0x00, 0xF9, 0x7F, 0x00, 0x01, 0x00, 0x00, 0x02, // 206\n    0x02, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x02, // 207\n    0x00, 0x02, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 208\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x82, 0x00, 0x00, 0x01, 0x03, 0x00, 0x02, 0x04, 0x00, 0x01, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 209\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x09, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 210\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 211\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x09, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 212\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x09, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 213\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x08, 0x40, 0x00, 0x0A, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 214\n    0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x05, 0x00, 0x80, 0x08, 0x00, 0x40, 0x10, // 215\n    0x00, 0x00, 0x00, 0xC0, 0x4F, 0x00, 0x20, 0x30, 0x00, 0x10, 0x30, 0x00, 0x08, 0x4C, 0x00, 0x08, 0x42, 0x00, 0x08, 0x41, 0x00, 0xC8, 0x40, 0x00, 0x30, 0x20, 0x00, 0x30, 0x10, 0x00, 0xC8, 0x0F, // 216\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x01, 0x40, 0x00, 0x02, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 217\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x01, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 218\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x01, 0x40, 0x00, 0x01, 0x40, 0x00, 0x02, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 219\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 220\n    0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x02, 0x7E, 0x00, 0x81, 0x01, 0x00, 0x40, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, // 221\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x40, 0x08, 0x00, 0x80, 0x07, // 222\n    0x00, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x08, 0x20, 0x00, 0x88, 0x43, 0x00, 0x70, 0x42, 0x00, 0x00, 0x44, 0x00, 0x00, 0x38, // 223\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x48, 0x44, 0x00, 0x50, 0x42, 0x00, 0x40, 0x22, 0x00, 0x80, 0x7F, // 224\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x42, 0x00, 0x40, 0x22, 0x00, 0x80, 0x7F, // 225\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x48, 0x42, 0x00, 0x50, 0x22, 0x00, 0x80, 0x7F, // 226\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x50, 0x42, 0x00, 0x48, 0x22, 0x00, 0x80, 0x7F, // 227\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x50, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x42, 0x00, 0x40, 0x22, 0x00, 0x80, 0x7F, // 228\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x5C, 0x44, 0x00, 0x54, 0x44, 0x00, 0x5C, 0x42, 0x00, 0x40, 0x22, 0x00, 0x80, 0x7F, // 229\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00, 0x80, 0x3F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00, 0x00, 0x17, // 230\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x02, 0x40, 0xC0, 0x02, 0x40, 0x40, 0x03, 0x80, 0x20, // 231\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x48, 0x44, 0x00, 0x50, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00, 0x00, 0x17, // 232\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x80, 0x24, 0x00, 0x00, 0x17, // 233\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x50, 0x44, 0x00, 0x48, 0x44, 0x00, 0x48, 0x44, 0x00, 0x90, 0x24, 0x00, 0x00, 0x17, // 234\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x50, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x80, 0x24, 0x00, 0x00, 0x17, // 235\n    0x08, 0x00, 0x00, 0xD0, 0x7F, // 236\n    0x00, 0x00, 0x00, 0xD0, 0x7F, 0x00, 0x08, // 237\n    0x10, 0x00, 0x00, 0xC8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x10, // 238\n    0x10, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x10, // 239\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0xA0, 0x20, 0x00, 0x68, 0x40, 0x00, 0x58, 0x40, 0x00, 0x70, 0x40, 0x00, 0xE8, 0x20, 0x00, 0x00, 0x1F, // 240\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x90, 0x00, 0x00, 0x48, 0x00, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x80, 0x7F, // 241\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x48, 0x40, 0x00, 0x50, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 242\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 243\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x48, 0x40, 0x00, 0x90, 0x20, 0x00, 0x00, 0x1F, // 244\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x50, 0x40, 0x00, 0x48, 0x40, 0x00, 0x50, 0x40, 0x00, 0x88, 0x20, 0x00, 0x00, 0x1F, // 245\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x50, 0x40, 0x00, 0x40, 0x40, 0x00, 0x50, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 246\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x80, 0x0A, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // 247\n    0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x80, 0x30, 0x00, 0x40, 0x48, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x80, 0x21, 0x00, 0x40, 0x1F, // 248\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 249\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x10, 0x40, 0x00, 0x08, 0x20, 0x00, 0xC0, 0x7F, // 250\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x10, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0xC0, 0x7F, // 251\n    0x00, 0x00, 0x00, 0xD0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x10, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 252\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x10, 0xE0, 0x01, 0x08, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0, // 253\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 254\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x10, 0x38, 0x02, 0x00, 0xE0, 0x01, 0x10, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0, // 255\n};\n\nconst uint8_t ArialMT_Plain_24_PL[] PROGMEM = {\n    0x18, // Width: 24\n    0x1C, // Height: 28\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x06, // 32\n    0x00, 0x00, 0x13, 0x06, // 33\n    0x00, 0x13, 0x1A, 0x08, // 34\n    0x00, 0x2D, 0x33, 0x0E, // 35\n    0x00, 0x60, 0x2F, 0x0D, // 36\n    0x00, 0x8F, 0x4F, 0x15, // 37\n    0x00, 0xDE, 0x3B, 0x10, // 38\n    0x01, 0x19, 0x0A, 0x04, // 39\n    0x01, 0x23, 0x1C, 0x08, // 40\n    0x01, 0x3F, 0x1B, 0x08, // 41\n    0x01, 0x5A, 0x21, 0x0A, // 42\n    0x01, 0x7B, 0x32, 0x0E, // 43\n    0x01, 0xAD, 0x10, 0x05, // 44\n    0x01, 0xBD, 0x1B, 0x08, // 45\n    0x01, 0xD8, 0x0F, 0x05, // 46\n    0x01, 0xE7, 0x19, 0x08, // 47\n    0x02, 0x00, 0x2F, 0x0D, // 48\n    0x02, 0x2F, 0x23, 0x0A, // 49\n    0x02, 0x52, 0x2F, 0x0D, // 50\n    0x02, 0x81, 0x2F, 0x0D, // 51\n    0x02, 0xB0, 0x2F, 0x0D, // 52\n    0x02, 0xDF, 0x2F, 0x0D, // 53\n    0x03, 0x0E, 0x2F, 0x0D, // 54\n    0x03, 0x3D, 0x2D, 0x0D, // 55\n    0x03, 0x6A, 0x2F, 0x0D, // 56\n    0x03, 0x99, 0x2F, 0x0D, // 57\n    0x03, 0xC8, 0x0F, 0x05, // 58\n    0x03, 0xD7, 0x10, 0x05, // 59\n    0x03, 0xE7, 0x2F, 0x0D, // 60\n    0x04, 0x16, 0x2F, 0x0D, // 61\n    0x04, 0x45, 0x2E, 0x0D, // 62\n    0x04, 0x73, 0x2E, 0x0D, // 63\n    0x04, 0xA1, 0x5B, 0x18, // 64\n    0x04, 0xFC, 0x3B, 0x10, // 65\n    0x05, 0x37, 0x3B, 0x10, // 66\n    0x05, 0x72, 0x3F, 0x11, // 67\n    0x05, 0xB1, 0x3F, 0x11, // 68\n    0x05, 0xF0, 0x3B, 0x10, // 69\n    0x06, 0x2B, 0x35, 0x0F, // 70\n    0x06, 0x60, 0x43, 0x12, // 71\n    0x06, 0xA3, 0x3B, 0x10, // 72\n    0x06, 0xDE, 0x0F, 0x05, // 73\n    0x06, 0xED, 0x27, 0x0B, // 74\n    0x07, 0x14, 0x3F, 0x11, // 75\n    0x07, 0x53, 0x2F, 0x0D, // 76\n    0x07, 0x82, 0x43, 0x12, // 77\n    0x07, 0xC5, 0x3B, 0x10, // 78\n    0x08, 0x00, 0x47, 0x13, // 79\n    0x08, 0x47, 0x3A, 0x10, // 80\n    0x08, 0x81, 0x47, 0x13, // 81\n    0x08, 0xC8, 0x3F, 0x11, // 82\n    0x09, 0x07, 0x3B, 0x10, // 83\n    0x09, 0x42, 0x35, 0x0F, // 84\n    0x09, 0x77, 0x3B, 0x10, // 85\n    0x09, 0xB2, 0x39, 0x10, // 86\n    0x09, 0xEB, 0x59, 0x18, // 87\n    0x0A, 0x44, 0x3B, 0x10, // 88\n    0x0A, 0x7F, 0x3D, 0x11, // 89\n    0x0A, 0xBC, 0x37, 0x0F, // 90\n    0x0A, 0xF3, 0x14, 0x06, // 91\n    0x0B, 0x07, 0x1B, 0x08, // 92\n    0x0B, 0x22, 0x18, 0x07, // 93\n    0x0B, 0x3A, 0x2A, 0x0C, // 94\n    0x0B, 0x64, 0x34, 0x0E, // 95\n    0x0B, 0x98, 0x11, 0x06, // 96\n    0x0B, 0xA9, 0x2F, 0x0D, // 97\n    0x0B, 0xD8, 0x33, 0x0E, // 98\n    0x0C, 0x0B, 0x2B, 0x0C, // 99\n    0x0C, 0x36, 0x2F, 0x0D, // 100\n    0x0C, 0x65, 0x2F, 0x0D, // 101\n    0x0C, 0x94, 0x1A, 0x08, // 102\n    0x0C, 0xAE, 0x2F, 0x0D, // 103\n    0x0C, 0xDD, 0x2F, 0x0D, // 104\n    0x0D, 0x0C, 0x0F, 0x05, // 105\n    0x0D, 0x1B, 0x10, 0x05, // 106\n    0x0D, 0x2B, 0x2F, 0x0D, // 107\n    0x0D, 0x5A, 0x0F, 0x05, // 108\n    0x0D, 0x69, 0x47, 0x13, // 109\n    0x0D, 0xB0, 0x2F, 0x0D, // 110\n    0x0D, 0xDF, 0x2F, 0x0D, // 111\n    0x0E, 0x0E, 0x33, 0x0E, // 112\n    0x0E, 0x41, 0x30, 0x0D, // 113\n    0x0E, 0x71, 0x1E, 0x09, // 114\n    0x0E, 0x8F, 0x2B, 0x0C, // 115\n    0x0E, 0xBA, 0x1B, 0x08, // 116\n    0x0E, 0xD5, 0x2F, 0x0D, // 117\n    0x0F, 0x04, 0x2A, 0x0C, // 118\n    0x0F, 0x2E, 0x42, 0x12, // 119\n    0x0F, 0x70, 0x2B, 0x0C, // 120\n    0x0F, 0x9B, 0x2A, 0x0C, // 121\n    0x0F, 0xC5, 0x2B, 0x0C, // 122\n    0x0F, 0xF0, 0x1C, 0x08, // 123\n    0x10, 0x0C, 0x10, 0x05, // 124\n    0x10, 0x1C, 0x1B, 0x08, // 125\n    0x10, 0x37, 0x32, 0x0E, // 126\n    0xFF, 0xFF, 0x00, 0x18, // 127\n    0xFF, 0xFF, 0x00, 0x18, // 128\n    0x10, 0x69, 0x2F, 0x0D, // 129\n    0x10, 0x98, 0x16, 0x07, // 130\n    0x10, 0xAE, 0x3B, 0x10, // 131\n    0x10, 0xE9, 0x40, 0x11, // 132\n    0x11, 0x29, 0x34, 0x0E, // 133\n    0x11, 0x5D, 0x3F, 0x11, // 134\n    0x11, 0x9C, 0x2B, 0x0C, // 135\n    0x11, 0xC7, 0x2F, 0x0D, // 136\n    0x11, 0xF6, 0x2B, 0x0C, // 137\n    0xFF, 0xFF, 0x00, 0x18, // 138\n    0xFF, 0xFF, 0x00, 0x18, // 139\n    0xFF, 0xFF, 0x00, 0x18, // 140\n    0xFF, 0xFF, 0x00, 0x18, // 141\n    0xFF, 0xFF, 0x00, 0x18, // 142\n    0xFF, 0xFF, 0x00, 0x18, // 143\n    0xFF, 0xFF, 0x00, 0x18, // 144\n    0xFF, 0xFF, 0x00, 0x18, // 145\n    0xFF, 0xFF, 0x00, 0x18, // 146\n    0x12, 0x21, 0x47, 0x13, // 147\n    0x12, 0x68, 0x2F, 0x0D, // 148\n    0xFF, 0xFF, 0x00, 0x18, // 149\n    0xFF, 0xFF, 0x00, 0x18, // 150\n    0xFF, 0xFF, 0x00, 0x18, // 151\n    0x12, 0x97, 0x3B, 0x10, // 152\n    0x12, 0xD2, 0x2F, 0x0D, // 153\n    0x13, 0x01, 0x3B, 0x10, // 154\n    0x13, 0x3C, 0x2B, 0x0C, // 155\n    0xFF, 0xFF, 0x00, 0x18, // 156\n    0xFF, 0xFF, 0x00, 0x18, // 157\n    0xFF, 0xFF, 0x00, 0x18, // 158\n    0xFF, 0xFF, 0x00, 0x18, // 159\n    0xFF, 0xFF, 0x00, 0x18, // 160\n    0x13, 0x67, 0x14, 0x06, // 161\n    0x13, 0x7B, 0x2B, 0x0C, // 162\n    0x13, 0xA6, 0x2F, 0x0D, // 163\n    0x13, 0xD5, 0x33, 0x0E, // 164\n    0x14, 0x08, 0x31, 0x0E, // 165\n    0x14, 0x39, 0x10, 0x05, // 166\n    0x14, 0x49, 0x2F, 0x0D, // 167\n    0x14, 0x78, 0x19, 0x08, // 168\n    0x14, 0x91, 0x46, 0x13, // 169\n    0x14, 0xD7, 0x1A, 0x08, // 170\n    0x14, 0xF1, 0x27, 0x0B, // 171\n    0x15, 0x18, 0x2F, 0x0D, // 172\n    0x15, 0x47, 0x1B, 0x08, // 173\n    0x15, 0x62, 0x46, 0x13, // 174\n    0x15, 0xA8, 0x31, 0x0E, // 175\n    0x15, 0xD9, 0x1E, 0x09, // 176\n    0x15, 0xF7, 0x33, 0x0E, // 177\n    0x16, 0x2A, 0x1A, 0x08, // 178\n    0x16, 0x44, 0x1A, 0x08, // 179\n    0x16, 0x5E, 0x19, 0x08, // 180\n    0x16, 0x77, 0x2F, 0x0D, // 181\n    0x16, 0xA6, 0x31, 0x0E, // 182\n    0x16, 0xD7, 0x12, 0x06, // 183\n    0x16, 0xE9, 0x18, 0x07, // 184\n    0x17, 0x01, 0x37, 0x0F, // 185\n    0x17, 0x38, 0x1E, 0x09, // 186\n    0x17, 0x56, 0x37, 0x0F, // 187\n    0x17, 0x8D, 0x2B, 0x0C, // 188\n    0x17, 0xB8, 0x4B, 0x14, // 189\n    0x18, 0x03, 0x4B, 0x14, // 190\n    0x18, 0x4E, 0x33, 0x0E, // 191\n    0x18, 0x81, 0x3B, 0x10, // 192\n    0x18, 0xBC, 0x3B, 0x10, // 193\n    0x18, 0xF7, 0x3B, 0x10, // 194\n    0x19, 0x32, 0x3B, 0x10, // 195\n    0x19, 0x6D, 0x3B, 0x10, // 196\n    0x19, 0xA8, 0x3B, 0x10, // 197\n    0x19, 0xE3, 0x5B, 0x18, // 198\n    0x1A, 0x3E, 0x3F, 0x11, // 199\n    0x1A, 0x7D, 0x3B, 0x10, // 200\n    0x1A, 0xB8, 0x3B, 0x10, // 201\n    0x1A, 0xF3, 0x3B, 0x10, // 202\n    0x1B, 0x2E, 0x3B, 0x10, // 203\n    0x1B, 0x69, 0x11, 0x06, // 204\n    0x1B, 0x7A, 0x11, 0x06, // 205\n    0x1B, 0x8B, 0x15, 0x07, // 206\n    0x1B, 0xA0, 0x15, 0x07, // 207\n    0x1B, 0xB5, 0x3F, 0x11, // 208\n    0x1B, 0xF4, 0x3B, 0x10, // 209\n    0x1C, 0x2F, 0x47, 0x13, // 210\n    0x1C, 0x76, 0x47, 0x13, // 211\n    0x1C, 0xBD, 0x47, 0x13, // 212\n    0x1D, 0x04, 0x47, 0x13, // 213\n    0x1D, 0x4B, 0x47, 0x13, // 214\n    0x1D, 0x92, 0x2B, 0x0C, // 215\n    0x1D, 0xBD, 0x47, 0x13, // 216\n    0x1E, 0x04, 0x3B, 0x10, // 217\n    0x1E, 0x3F, 0x3B, 0x10, // 218\n    0x1E, 0x7A, 0x3B, 0x10, // 219\n    0x1E, 0xB5, 0x3B, 0x10, // 220\n    0x1E, 0xF0, 0x3D, 0x11, // 221\n    0x1F, 0x2D, 0x3A, 0x10, // 222\n    0x1F, 0x67, 0x37, 0x0F, // 223\n    0x1F, 0x9E, 0x2F, 0x0D, // 224\n    0x1F, 0xCD, 0x2F, 0x0D, // 225\n    0x1F, 0xFC, 0x2F, 0x0D, // 226\n    0x20, 0x2B, 0x2F, 0x0D, // 227\n    0x20, 0x5A, 0x2F, 0x0D, // 228\n    0x20, 0x89, 0x2F, 0x0D, // 229\n    0x20, 0xB8, 0x53, 0x16, // 230\n    0x21, 0x0B, 0x2B, 0x0C, // 231\n    0x21, 0x36, 0x2F, 0x0D, // 232\n    0x21, 0x65, 0x2F, 0x0D, // 233\n    0x21, 0x94, 0x2F, 0x0D, // 234\n    0x21, 0xC3, 0x2F, 0x0D, // 235\n    0x21, 0xF2, 0x11, 0x06, // 236\n    0x22, 0x03, 0x11, 0x06, // 237\n    0x22, 0x14, 0x15, 0x07, // 238\n    0x22, 0x29, 0x15, 0x07, // 239\n    0x22, 0x3E, 0x2F, 0x0D, // 240\n    0x22, 0x6D, 0x2F, 0x0D, // 241\n    0x22, 0x9C, 0x2F, 0x0D, // 242\n    0x22, 0xCB, 0x2F, 0x0D, // 243\n    0x22, 0xFA, 0x2F, 0x0D, // 244\n    0x23, 0x29, 0x2F, 0x0D, // 245\n    0x23, 0x58, 0x2F, 0x0D, // 246\n    0x23, 0x87, 0x32, 0x0E, // 247\n    0x23, 0xB9, 0x33, 0x0E, // 248\n    0x23, 0xEC, 0x2F, 0x0D, // 249\n    0x24, 0x1B, 0x2F, 0x0D, // 250\n    0x24, 0x4A, 0x2F, 0x0D, // 251\n    0x24, 0x79, 0x2F, 0x0D, // 252\n    0x24, 0xA8, 0x2A, 0x0C, // 253\n    0x24, 0xD2, 0x2F, 0x0D, // 254\n    0x25, 0x01, 0x2A, 0x0C, // 255\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x33, 0x00, 0xE0, 0xFF, 0x33, // 33\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07, // 34\n    0x00, 0x0C, 0x03, 0x00, 0x00, 0x0C, 0x33, 0x00, 0x00, 0x0C, 0x3F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0xE0, 0x0F, 0x03, 0x00, 0x60, 0x0C, 0x33, 0x00, 0x00, 0x0C, 0x3F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0xE0, 0x0F, 0x03, 0x00, 0x60, 0x0C, 0x03, 0x00, 0x00, 0x0C, 0x03, // 35\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x06, 0x00, 0xC0, 0x0F, 0x1E, 0x00, 0xC0, 0x18, 0x1C, 0x00, 0x60, 0x18, 0x38, 0x00, 0x60, 0x30, 0x30, 0x00, 0xF0, 0xFF, 0xFF, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x60, 0x38, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xC1, 0x1F, 0x00, 0x00, 0x81, 0x07, // 36\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x20, 0x00, 0x60, 0x30, 0x38, 0x00, 0xC0, 0x1F, 0x1E, 0x00, 0x80, 0x8F, 0x0F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x8F, 0x0F, 0x00, 0xC0, 0xC3, 0x1F, 0x00, 0xE0, 0x60, 0x30, 0x00, 0x20, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x0F, // 37\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x80, 0xE3, 0x1C, 0x00, 0xC0, 0x77, 0x38, 0x00, 0xE0, 0x3C, 0x30, 0x00, 0x60, 0x38, 0x30, 0x00, 0x60, 0x78, 0x30, 0x00, 0xE0, 0xEC, 0x38, 0x00, 0xC0, 0x8F, 0x1B, 0x00, 0x80, 0x03, 0x1F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xC0, 0x38, 0x00, 0x00, 0x00, 0x10, // 38\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07, // 39\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x80, 0x0F, 0xF0, 0x01, 0xC0, 0x01, 0x80, 0x03, 0x60, 0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x04, // 40\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x06, 0xC0, 0x01, 0x80, 0x03, 0x80, 0x0F, 0xF0, 0x01, 0x00, 0xFE, 0x7F, 0x00, 0x00, 0xF0, 0x0F, // 41\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x80, // 42\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0xF0, 0x01, // 44\n    0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 46\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x60, // 47\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0x03, // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 49\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0xC0, 0x03, 0x38, 0x00, 0xC0, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x36, 0x00, 0x60, 0x00, 0x33, 0x00, 0x60, 0x80, 0x31, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0x60, 0x30, 0x00, 0xC0, 0x30, 0x30, 0x00, 0xC0, 0x1F, 0x30, 0x00, 0x00, 0x0F, 0x30, // 50\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0xC0, 0x01, 0x0E, 0x00, 0xC0, 0x00, 0x1C, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0xC0, 0x38, 0x30, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0x80, 0xC7, 0x0F, 0x00, 0x00, 0x80, 0x07, // 51\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x3C, 0x03, 0x00, 0x00, 0x0E, 0x03, 0x00, 0x80, 0x07, 0x03, 0x00, 0xC0, 0x01, 0x03, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, // 52\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x80, 0x3F, 0x0E, 0x00, 0xE0, 0x1F, 0x18, 0x00, 0x60, 0x08, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x1C, 0x00, 0x60, 0xF0, 0x0F, 0x00, 0x00, 0xE0, 0x03, // 53\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x03, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x63, 0x1C, 0x00, 0xC0, 0x30, 0x38, 0x00, 0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0xE0, 0x30, 0x18, 0x00, 0xC0, 0xF1, 0x0F, 0x00, 0x80, 0xC1, 0x07, // 54\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x80, 0x3F, 0x00, 0x60, 0xE0, 0x03, 0x00, 0x60, 0x78, 0x00, 0x00, 0x60, 0x0E, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x60, // 55\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0xE0, 0x38, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0xE0, 0x38, 0x30, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0x00, 0x80, 0x07, // 56\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x0C, 0x00, 0x80, 0x7F, 0x1C, 0x00, 0xC0, 0x61, 0x38, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0x60, 0x18, 0x00, 0xC0, 0x31, 0x1E, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0x01, // 57\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, // 58\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x03, 0x00, 0x06, 0xF0, 0x01, // 59\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x03, 0x06, // 60\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, // 61\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x20, // 62\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60, 0x80, 0x33, 0x00, 0x60, 0xC0, 0x33, 0x00, 0x60, 0xE0, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xC0, 0x38, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0x07, // 63\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x1E, 0xF0, 0x00, 0x00, 0x07, 0xC0, 0x01, 0x80, 0xC3, 0x87, 0x01, 0xC0, 0xF1, 0x9F, 0x03, 0xC0, 0x38, 0x18, 0x03, 0xC0, 0x0C, 0x30, 0x03, 0x60, 0x0E, 0x30, 0x06, 0x60, 0x06, 0x30, 0x06, 0x60, 0x06, 0x18, 0x06, 0x60, 0x06, 0x0C, 0x06, 0x60, 0x0C, 0x1E, 0x06, 0x60, 0xF8, 0x3F, 0x06, 0xE0, 0xFE, 0x31, 0x06, 0xC0, 0x0E, 0x30, 0x06, 0xC0, 0x01, 0x18, 0x03, 0x80, 0x03, 0x1C, 0x03, 0x00, 0x07, 0x8F, 0x01, 0x00, 0xFE, 0x87, 0x01, 0x00, 0xF8, 0xC1, 0x00, 0x00, 0x00, 0x40, // 64\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 65\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0xC0, 0x78, 0x30, 0x00, 0xC0, 0xFF, 0x18, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0x00, 0x80, 0x07, // 66\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02, 0x03, // 67\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0E, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 68\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 69\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, // 70\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x60, 0x30, 0x00, 0x60, 0x60, 0x30, 0x00, 0xE0, 0x60, 0x38, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0x61, 0x18, 0x00, 0x80, 0xE3, 0x0F, 0x00, 0x00, 0xE2, 0x0F, // 71\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 72\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 73\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, // 74\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xE7, 0x01, 0x00, 0x80, 0x83, 0x07, 0x00, 0xC0, 0x01, 0x0F, 0x00, 0xE0, 0x00, 0x1E, 0x00, 0x60, 0x00, 0x38, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, // 75\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 76\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 77\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 78\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 79\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0x0F, // 80\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x0C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x36, 0x00, 0x60, 0x00, 0x36, 0x00, 0xE0, 0x00, 0x3C, 0x00, 0xC0, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x3F, 0x00, 0x00, 0xFF, 0x77, 0x00, 0x00, 0xFC, 0x61, // 81\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x70, 0x00, 0x00, 0x60, 0xF0, 0x00, 0x00, 0x60, 0xF0, 0x03, 0x00, 0x60, 0xB0, 0x07, 0x00, 0xE0, 0x18, 0x1F, 0x00, 0xC0, 0x1F, 0x3C, 0x00, 0x80, 0x0F, 0x30, 0x00, 0x00, 0x00, 0x20, // 82\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x0F, 0x00, 0xC0, 0x1F, 0x1C, 0x00, 0xC0, 0x18, 0x18, 0x00, 0x60, 0x38, 0x38, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x70, 0x30, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xE1, 0x18, 0x00, 0x80, 0xC3, 0x0F, 0x00, 0x00, 0x83, 0x07, // 83\n    0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 84\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 85\n    0x20, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x20, // 86\n    0x60, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x80, 0xFF, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x60, // 87\n    0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x30, 0x00, 0x60, 0x00, 0x3C, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0xC0, 0x83, 0x07, 0x00, 0x00, 0xCF, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xCF, 0x03, 0x00, 0xC0, 0x03, 0x07, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, // 88\n    0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, // 89\n    0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x38, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x37, 0x00, 0x60, 0x80, 0x33, 0x00, 0x60, 0xC0, 0x31, 0x00, 0x60, 0xE0, 0x30, 0x00, 0x60, 0x38, 0x30, 0x00, 0x60, 0x1C, 0x30, 0x00, 0x60, 0x0E, 0x30, 0x00, 0x60, 0x07, 0x30, 0x00, 0xE0, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, // 90\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, // 91\n    0x60, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 92\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, // 93\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x20, // 94\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, // 95\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x80, // 96\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x18, 0x00, 0x00, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x20, // 97\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xE0, 0x03, // 98\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x18, 0x0C, // 99\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xF0, 0x04, // 101\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x60, 0x06, // 102\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x83, 0x01, 0x00, 0xF8, 0x8F, 0x03, 0x00, 0x1C, 0x1C, 0x07, 0x00, 0x0E, 0x38, 0x06, 0x00, 0x06, 0x30, 0x06, 0x00, 0x06, 0x30, 0x06, 0x00, 0x06, 0x30, 0x06, 0x00, 0x0C, 0x18, 0x07, 0x00, 0x18, 0x8C, 0x03, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0xFE, 0xFF, // 103\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, // 104\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F, // 105\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x60, 0xFE, 0xFF, 0x07, 0x60, 0xFE, 0xFF, 0x03, // 106\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0x0C, 0x0E, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x02, 0x30, 0x00, 0x00, 0x00, 0x20, // 107\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 108\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, // 109\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 111\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xE0, 0x03, // 112\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, // 113\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, // 114\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0C, 0x00, 0x00, 0x7C, 0x1C, 0x00, 0x00, 0xEE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x31, 0x00, 0x00, 0xC6, 0x31, 0x00, 0x00, 0x8E, 0x39, 0x00, 0x00, 0x9C, 0x1F, 0x00, 0x00, 0x18, 0x0F, // 115\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, // 116\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, // 117\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, // 118\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x0E, // 119\n    0x00, 0x02, 0x20, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x02, 0x20, // 120\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0x00, 0xF0, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, // 121\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x3E, 0x00, 0x00, 0x06, 0x37, 0x00, 0x00, 0xC6, 0x33, 0x00, 0x00, 0xE6, 0x30, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x3E, 0x30, 0x00, 0x00, 0x1E, 0x30, 0x00, 0x00, 0x06, 0x30, // 122\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x03, 0x00, 0xC0, 0x7F, 0xFE, 0x03, 0xE0, 0x3F, 0xFC, 0x07, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, // 123\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0xE0, 0xFF, 0xFF, 0x0F, // 124\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, 0xE0, 0x3F, 0xFC, 0x07, 0xC0, 0x7F, 0xFF, 0x03, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x80, 0x01, // 125\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60, // 126\n    0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 129\n    0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, // 130\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x10, 0x3C, 0x00, 0x00, 0x1C, 0x70, 0x00, 0x00, 0x0C, 0xE0, 0x01, 0x00, 0x04, 0x80, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 131\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xB0, 0x03, 0x00, 0x00, 0x00, 0x03, // 132\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x18, 0x00, 0x00, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0x01, 0x00, 0x00, 0xA0, 0x03, 0x00, 0x00, 0x00, 0x03, // 133\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x68, 0x00, 0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x62, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02, 0x03, // 134\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x80, 0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0x20, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x18, 0x0C, // 135\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0xE0, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, // 136\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x3E, 0x00, 0x00, 0x06, 0x37, 0x00, 0x80, 0xC6, 0x33, 0x00, 0xE0, 0xE6, 0x30, 0x00, 0x60, 0x76, 0x30, 0x00, 0x20, 0x3E, 0x30, 0x00, 0x00, 0x1E, 0x30, 0x00, 0x00, 0x06, 0x30, // 137\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x68, 0x00, 0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0xE2, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 147\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x06, 0x30, 0x00, 0x80, 0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0x60, 0x0E, 0x38, 0x00, 0x20, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 148\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0xF0, 0x01, 0x60, 0x30, 0xB0, 0x03, 0x60, 0x30, 0x30, 0x03, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 152\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0xF0, 0x01, 0x00, 0xC6, 0xB0, 0x03, 0x00, 0xCE, 0x38, 0x03, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xF0, 0x04, // 153\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x0F, 0x00, 0xC0, 0x1F, 0x1C, 0x00, 0xC0, 0x18, 0x18, 0x00, 0x60, 0x38, 0x38, 0x00, 0x60, 0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x6E, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x62, 0x70, 0x30, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xE1, 0x18, 0x00, 0x80, 0xC3, 0x0F, 0x00, 0x00, 0x83, 0x07, // 154\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0C, 0x00, 0x00, 0x7C, 0x1C, 0x00, 0x00, 0xEE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x80, 0xC6, 0x30, 0x00, 0xE0, 0xC6, 0x31, 0x00, 0x60, 0xC6, 0x31, 0x00, 0x20, 0x8E, 0x39, 0x00, 0x00, 0x9C, 0x1F, 0x00, 0x00, 0x18, 0x0F, // 155\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0x07, 0x00, 0xE6, 0xFF, 0x07, // 161\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x9C, 0x07, 0x00, 0x0E, 0x78, 0x00, 0x00, 0x06, 0x3F, 0x00, 0x00, 0xF6, 0x30, 0x00, 0x00, 0x0E, 0x30, 0x00, 0xE0, 0x0D, 0x1C, 0x00, 0x00, 0x1C, 0x0E, 0x00, 0x00, 0x10, 0x06, // 162\n    0x00, 0x60, 0x10, 0x00, 0x00, 0x60, 0x38, 0x00, 0x00, 0x7F, 0x1C, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xE0, 0x19, 0x00, 0x60, 0x60, 0x18, 0x00, 0x60, 0x60, 0x18, 0x00, 0x60, 0x60, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0xC0, 0x01, 0x30, 0x00, 0x80, 0x01, 0x38, 0x00, 0x00, 0x00, 0x10, // 163\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0xF7, 0x0E, 0x00, 0x00, 0xFE, 0x07, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0xFE, 0x07, 0x00, 0x00, 0xF7, 0x0E, 0x00, 0x00, 0x02, 0x04, // 164\n    0xE0, 0x60, 0x06, 0x00, 0xC0, 0x61, 0x06, 0x00, 0x80, 0x67, 0x06, 0x00, 0x00, 0x7E, 0x06, 0x00, 0x00, 0x7C, 0x06, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x7C, 0x06, 0x00, 0x00, 0x7E, 0x06, 0x00, 0x80, 0x67, 0x06, 0x00, 0xC0, 0x61, 0x06, 0x00, 0xE0, 0x60, 0x06, 0x00, 0x20, // 165\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0xF8, 0x0F, 0xE0, 0x7F, 0xF8, 0x0F, // 166\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x80, 0xF3, 0xC1, 0x00, 0xC0, 0x1F, 0xC3, 0x03, 0xE0, 0x0C, 0x07, 0x03, 0x60, 0x1C, 0x06, 0x06, 0x60, 0x18, 0x0C, 0x06, 0x60, 0x30, 0x1C, 0x06, 0xE0, 0x70, 0x38, 0x07, 0xC0, 0xE1, 0xF4, 0x03, 0x80, 0xC1, 0xE7, 0x01, 0x00, 0x80, 0x03, // 167\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 168\n    0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x80, 0x01, 0x0C, 0x00, 0xC0, 0x79, 0x1C, 0x00, 0xC0, 0xFE, 0x19, 0x00, 0x60, 0x86, 0x31, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x87, 0x33, 0x00, 0xC0, 0x86, 0x19, 0x00, 0xC0, 0x85, 0x1C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, // 169\n    0x00, 0x00, 0x00, 0x00, 0xC0, 0x1C, 0x00, 0x00, 0xE0, 0x3E, 0x00, 0x00, 0x60, 0x32, 0x00, 0x00, 0x60, 0x32, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xC0, 0x3F, // 170\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x84, 0x10, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x04, 0x10, // 171\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFC, 0x01, // 172\n    0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 173\n    0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x80, 0x01, 0x0C, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0xFE, 0x1B, 0x00, 0x60, 0xFE, 0x33, 0x00, 0x60, 0x66, 0x30, 0x00, 0x60, 0x66, 0x30, 0x00, 0x60, 0xE6, 0x30, 0x00, 0x60, 0xFE, 0x31, 0x00, 0x60, 0x3C, 0x33, 0x00, 0xC0, 0x00, 0x1A, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, // 174\n    0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, // 175\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x80, 0x03, // 176\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, // 177\n    0x40, 0x20, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x38, 0x00, 0x00, 0x20, 0x2C, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0xE0, 0x23, 0x00, 0x00, 0xC0, 0x21, // 178\n    0x40, 0x10, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00, 0xC0, 0x1D, // 179\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, // 180\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, // 181\n    0x00, 0x0F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x00, 0x60, // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 183\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xC0, 0x02, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x01, // 184\n    0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x38, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x37, 0x00, 0x60, 0x80, 0x33, 0x00, 0x60, 0xC0, 0x31, 0x00, 0x68, 0xE0, 0x30, 0x00, 0x6E, 0x38, 0x30, 0x00, 0x66, 0x1C, 0x30, 0x00, 0x62, 0x0E, 0x30, 0x00, 0x60, 0x07, 0x30, 0x00, 0xE0, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, // 185\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x0F, // 186\n    0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x38, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x37, 0x00, 0x60, 0x80, 0x33, 0x00, 0x60, 0xC0, 0x31, 0x00, 0x6C, 0xE0, 0x30, 0x00, 0x6C, 0x38, 0x30, 0x00, 0x60, 0x1C, 0x30, 0x00, 0x60, 0x0E, 0x30, 0x00, 0x60, 0x07, 0x30, 0x00, 0xE0, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, // 187\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x3E, 0x00, 0x00, 0x06, 0x37, 0x00, 0xC0, 0xC6, 0x33, 0x00, 0xC0, 0xE6, 0x30, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x3E, 0x30, 0x00, 0x00, 0x1E, 0x30, 0x00, 0x00, 0x06, 0x30, // 188\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x20, 0x00, 0xE0, 0x3F, 0x30, 0x00, 0xE0, 0x3F, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x4E, 0x20, 0x00, 0x00, 0x67, 0x30, 0x00, 0xC0, 0x21, 0x38, 0x00, 0xE0, 0x20, 0x2C, 0x00, 0x60, 0x20, 0x26, 0x00, 0x00, 0xE0, 0x27, 0x00, 0x00, 0xC0, 0x21, // 189\n    0x40, 0x10, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x22, 0x20, 0x00, 0x20, 0x22, 0x30, 0x00, 0xE0, 0x3D, 0x38, 0x00, 0xC0, 0x1D, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0E, 0x0C, 0x00, 0x00, 0x07, 0x0E, 0x00, 0x80, 0x83, 0x0B, 0x00, 0xE0, 0xC0, 0x08, 0x00, 0x60, 0xE0, 0x3F, 0x00, 0x20, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x08, // 190\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x1E, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0xE6, 0x03, 0x06, 0x00, 0xE6, 0x01, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, // 191\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x82, 0x8F, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x6E, 0x80, 0x01, 0x00, 0xE8, 0x83, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 192\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0xE8, 0x83, 0x01, 0x00, 0x6E, 0x80, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x82, 0x8F, 0x01, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 193\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x88, 0x8F, 0x01, 0x00, 0xEC, 0x83, 0x01, 0x00, 0x66, 0x80, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x8C, 0x8F, 0x01, 0x00, 0x08, 0xFE, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 194\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x0C, 0xFE, 0x01, 0x00, 0x8E, 0x8F, 0x01, 0x00, 0xE6, 0x83, 0x01, 0x00, 0x66, 0x80, 0x01, 0x00, 0xEC, 0x83, 0x01, 0x00, 0x8C, 0x8F, 0x01, 0x00, 0x0E, 0xFE, 0x01, 0x00, 0x06, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 195\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x8C, 0x8F, 0x01, 0x00, 0xEC, 0x83, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x8C, 0x8F, 0x01, 0x00, 0x0C, 0xFE, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 196\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x9C, 0x8F, 0x01, 0x00, 0xE2, 0x83, 0x01, 0x00, 0x62, 0x80, 0x01, 0x00, 0xE2, 0x83, 0x01, 0x00, 0x9C, 0x8F, 0x01, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 197\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xBC, 0x01, 0x00, 0x00, 0x8F, 0x01, 0x00, 0xC0, 0x83, 0x01, 0x00, 0xE0, 0x80, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 198\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x02, 0x60, 0x00, 0x30, 0x02, 0x60, 0x00, 0xF0, 0x02, 0x60, 0x00, 0xB0, 0x03, 0x60, 0x00, 0x30, 0x01, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02, 0x03, // 199\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x62, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x6E, 0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 200\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x6E, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x62, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 201\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x66, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x68, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 202\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 203\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0xEE, 0xFF, 0x3F, 0x00, 0x08, // 204\n    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xEE, 0xFF, 0x3F, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0x02, // 205\n    0x08, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0xE6, 0xFF, 0x3F, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, // 206\n    0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, // 207\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0E, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 208\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x8C, 0x03, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x70, 0x00, 0x00, 0x0C, 0xE0, 0x01, 0x00, 0x0C, 0x80, 0x03, 0x00, 0x0E, 0x00, 0x0F, 0x00, 0x06, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 209\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x62, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0x68, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 210\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x68, 0x00, 0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x62, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 211\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x68, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0xE8, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 212\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xCC, 0x00, 0x18, 0x00, 0xEE, 0x00, 0x38, 0x00, 0x66, 0x00, 0x30, 0x00, 0x66, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x6E, 0x00, 0x30, 0x00, 0xE6, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 213\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x6C, 0x00, 0x30, 0x00, 0xEC, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 214\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x8E, 0x03, 0x00, 0x00, 0xDC, 0x01, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xDC, 0x01, 0x00, 0x00, 0x8E, 0x03, 0x00, 0x00, 0x06, 0x03, // 215\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x21, 0x00, 0x00, 0xFF, 0x77, 0x00, 0x80, 0x07, 0x3F, 0x00, 0xC0, 0x01, 0x1E, 0x00, 0xC0, 0x00, 0x1F, 0x00, 0xE0, 0x80, 0x3B, 0x00, 0x60, 0xC0, 0x31, 0x00, 0x60, 0xE0, 0x30, 0x00, 0x60, 0x70, 0x30, 0x00, 0x60, 0x38, 0x30, 0x00, 0x60, 0x1C, 0x30, 0x00, 0xE0, 0x0E, 0x38, 0x00, 0xC0, 0x07, 0x18, 0x00, 0xC0, 0x03, 0x1C, 0x00, 0xE0, 0x07, 0x0F, 0x00, 0x70, 0xFF, 0x07, 0x00, 0x20, 0xFC, 0x01, // 216\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x02, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 217\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x02, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 218\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x08, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x06, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x08, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 219\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x03, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x03, // 220\n    0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x08, 0xF0, 0x3F, 0x00, 0x0E, 0xF0, 0x3F, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x02, 0x1E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, // 221\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x86, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0xF8, // 222\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x60, 0x00, 0x1C, 0x00, 0x60, 0x00, 0x38, 0x00, 0xE0, 0x78, 0x30, 0x00, 0xC0, 0x7F, 0x30, 0x00, 0x80, 0xC7, 0x30, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x0F, // 223\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x20, 0x86, 0x31, 0x00, 0x60, 0x86, 0x31, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x80, 0xC6, 0x18, 0x00, 0x00, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x20, // 224\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x00, 0x86, 0x31, 0x00, 0x80, 0x86, 0x31, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x60, 0xC6, 0x18, 0x00, 0x20, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x20, // 225\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x80, 0x8C, 0x39, 0x00, 0xC0, 0x86, 0x31, 0x00, 0x60, 0x86, 0x31, 0x00, 0x60, 0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x18, 0x00, 0x80, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x20, // 226\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0xC0, 0x1C, 0x1F, 0x00, 0xE0, 0x8C, 0x39, 0x00, 0x60, 0x86, 0x31, 0x00, 0x60, 0x86, 0x31, 0x00, 0xC0, 0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x18, 0x00, 0xE0, 0xCE, 0x0C, 0x00, 0x60, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x20, // 227\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0xC0, 0x8C, 0x39, 0x00, 0xC0, 0x86, 0x31, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00, 0xC6, 0x30, 0x00, 0xC0, 0xC6, 0x18, 0x00, 0xC0, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x20, // 228\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x70, 0x86, 0x31, 0x00, 0x88, 0x86, 0x31, 0x00, 0x88, 0xC6, 0x30, 0x00, 0x88, 0xC6, 0x18, 0x00, 0x70, 0xCE, 0x0C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x20, // 229\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x00, 0x00, 0x9C, 0x1F, 0x00, 0x00, 0xCC, 0x39, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0x66, 0x18, 0x00, 0x00, 0x6E, 0x1C, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xCC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xCC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xE0, 0x04, // 230\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x02, 0x00, 0x06, 0x30, 0x02, 0x00, 0x06, 0xF0, 0x02, 0x00, 0x06, 0xB0, 0x03, 0x00, 0x0E, 0x38, 0x01, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x18, 0x0C, // 231\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x20, 0xCE, 0x38, 0x00, 0x60, 0xC6, 0x30, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x80, 0xC6, 0x30, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xF0, 0x04, // 232\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x80, 0xC6, 0x30, 0x00, 0xE0, 0xC6, 0x30, 0x00, 0x60, 0xC6, 0x30, 0x00, 0x20, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xF0, 0x04, // 233\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0x80, 0xCE, 0x38, 0x00, 0xC0, 0xC6, 0x30, 0x00, 0x60, 0xC6, 0x30, 0x00, 0x60, 0xC6, 0x30, 0x00, 0xC0, 0xCE, 0x38, 0x00, 0x80, 0xDC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xF0, 0x04, // 234\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xDC, 0x1C, 0x00, 0xC0, 0xCE, 0x38, 0x00, 0xC0, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0xC0, 0xCE, 0x38, 0x00, 0xC0, 0xDC, 0x18, 0x00, 0x00, 0xF8, 0x0C, 0x00, 0x00, 0xF0, 0x04, // 235\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0xE0, 0xFE, 0x3F, 0x00, 0x80, // 236\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0x20, // 237\n    0x80, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x80, // 238\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, // 239\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1D, 0x1C, 0x00, 0xA0, 0x0F, 0x38, 0x00, 0xA0, 0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0xC0, 0x06, 0x30, 0x00, 0xC0, 0x0F, 0x38, 0x00, 0x20, 0x1F, 0x1C, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x00, 0xE0, 0x07, // 240\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0xC0, 0xFE, 0x3F, 0x00, 0xE0, 0x18, 0x00, 0x00, 0x60, 0x0C, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0xC0, 0x06, 0x00, 0x00, 0xE0, 0x0E, 0x00, 0x00, 0x60, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, // 241\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x20, 0x0E, 0x38, 0x00, 0x60, 0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0x80, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 242\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x80, 0x06, 0x30, 0x00, 0xE0, 0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0x20, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 243\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x80, 0x0E, 0x38, 0x00, 0xC0, 0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0x80, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 244\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0xC0, 0x1C, 0x1C, 0x00, 0xE0, 0x0E, 0x38, 0x00, 0x60, 0x06, 0x30, 0x00, 0x60, 0x06, 0x30, 0x00, 0xC0, 0x06, 0x30, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0xE0, 0x1C, 0x1C, 0x00, 0x60, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 245\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0xC0, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0xC0, 0x0E, 0x38, 0x00, 0xC0, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 246\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xB6, 0x01, 0x00, 0x00, 0xB6, 0x01, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 247\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x67, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x3F, 0x00, 0x00, 0x86, 0x33, 0x00, 0x00, 0xE6, 0x31, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x3E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0xF3, 0x07, // 248\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x20, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x80, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, // 249\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x80, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x18, 0x00, 0x20, 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, // 250\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x80, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x80, 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, // 251\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0xC0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x00, 0x0C, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, // 252\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0x00, 0xF0, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x07, 0x80, 0x00, 0xFE, 0x03, 0xE0, 0x00, 0xFC, 0x00, 0x60, 0xC0, 0x1F, 0x00, 0x20, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, // 253\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x1C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, // 254\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0xC0, 0xF0, 0x01, 0x06, 0xC0, 0x80, 0x0F, 0x07, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0xC0, 0xC0, 0x1F, 0x00, 0xC0, 0xF8, 0x03, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x06, // 255\n};\n\n#endif // OLED_PL"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsPL.h",
    "content": "#ifndef OLEDDISPLAYFONTSPL_h\n#define OLEDDISPLAYFONTSPL_h\n\n#ifdef ARDUINO\n#include <Arduino.h>\n#elif __MBED__\n#define PROGMEM\n#endif\nextern const uint8_t ArialMT_Plain_10_PL[] PROGMEM;\nextern const uint8_t ArialMT_Plain_16_PL[] PROGMEM;\nextern const uint8_t ArialMT_Plain_24_PL[] PROGMEM;\n#endif"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsRU.cpp",
    "content": "#ifdef OLED_RU\n\n#include \"OLEDDisplayFontsRU.h\"\n\n// Font generated or edited with the glyphEditor\nconst uint8_t ArialMT_Plain_10_RU[] PROGMEM = {\n    0x0A, // Width: 10\n    0x0D, // Height: 13\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x0A, // 32\n    0x00, 0x00, 0x04, 0x03, // 33\n    0x00, 0x04, 0x05, 0x04, // 34\n    0x00, 0x09, 0x09, 0x06, // 35\n    0x00, 0x12, 0x0A, 0x06, // 36\n    0x00, 0x1C, 0x10, 0x09, // 37\n    0x00, 0x2C, 0x0E, 0x08, // 38\n    0x00, 0x3A, 0x01, 0x02, // 39\n    0x00, 0x3B, 0x06, 0x04, // 40\n    0x00, 0x41, 0x06, 0x04, // 41\n    0x00, 0x47, 0x05, 0x04, // 42\n    0x00, 0x4C, 0x09, 0x06, // 43\n    0x00, 0x55, 0x04, 0x03, // 44\n    0x00, 0x59, 0x03, 0x03, // 45\n    0x00, 0x5C, 0x04, 0x03, // 46\n    0x00, 0x60, 0x05, 0x04, // 47\n    0x00, 0x65, 0x0A, 0x06, // 48\n    0x00, 0x6F, 0x08, 0x05, // 49\n    0x00, 0x77, 0x0A, 0x06, // 50\n    0x00, 0x81, 0x0A, 0x06, // 51\n    0x00, 0x8B, 0x0B, 0x07, // 52\n    0x00, 0x96, 0x0A, 0x06, // 53\n    0x00, 0xA0, 0x0A, 0x06, // 54\n    0x00, 0xAA, 0x09, 0x06, // 55\n    0x00, 0xB3, 0x0A, 0x06, // 56\n    0x00, 0xBD, 0x0A, 0x06, // 57\n    0x00, 0xC7, 0x04, 0x03, // 58\n    0x00, 0xCB, 0x04, 0x03, // 59\n    0x00, 0xCF, 0x0A, 0x06, // 60\n    0x00, 0xD9, 0x09, 0x06, // 61\n    0x00, 0xE2, 0x09, 0x06, // 62\n    0x00, 0xEB, 0x0B, 0x07, // 63\n    0x00, 0xF6, 0x14, 0x0B, // 64\n    0x01, 0x0A, 0x0E, 0x08, // 65\n    0x01, 0x18, 0x0C, 0x07, // 66\n    0x01, 0x24, 0x0C, 0x07, // 67\n    0x01, 0x30, 0x0B, 0x07, // 68\n    0x01, 0x3B, 0x0C, 0x07, // 69\n    0x01, 0x47, 0x09, 0x06, // 70\n    0x01, 0x50, 0x0D, 0x08, // 71\n    0x01, 0x5D, 0x0C, 0x07, // 72\n    0x01, 0x69, 0x04, 0x03, // 73\n    0x01, 0x6D, 0x08, 0x05, // 74\n    0x01, 0x75, 0x0E, 0x08, // 75\n    0x01, 0x83, 0x0C, 0x07, // 76\n    0x01, 0x8F, 0x10, 0x09, // 77\n    0x01, 0x9F, 0x0C, 0x07, // 78\n    0x01, 0xAB, 0x0E, 0x08, // 79\n    0x01, 0xB9, 0x0B, 0x07, // 80\n    0x01, 0xC4, 0x0E, 0x08, // 81\n    0x01, 0xD2, 0x0C, 0x07, // 82\n    0x01, 0xDE, 0x0C, 0x07, // 83\n    0x01, 0xEA, 0x0B, 0x07, // 84\n    0x01, 0xF5, 0x0C, 0x07, // 85\n    0x02, 0x01, 0x0D, 0x08, // 86\n    0x02, 0x0E, 0x11, 0x0A, // 87\n    0x02, 0x1F, 0x0E, 0x08, // 88\n    0x02, 0x2D, 0x0D, 0x08, // 89\n    0x02, 0x3A, 0x0C, 0x07, // 90\n    0x02, 0x46, 0x06, 0x04, // 91\n    0x02, 0x4C, 0x06, 0x04, // 92\n    0x02, 0x52, 0x04, 0x03, // 93\n    0x02, 0x56, 0x09, 0x06, // 94\n    0x02, 0x5F, 0x0C, 0x07, // 95\n    0x02, 0x6B, 0x03, 0x03, // 96\n    0x02, 0x6E, 0x0A, 0x06, // 97\n    0x02, 0x78, 0x0A, 0x06, // 98\n    0x02, 0x82, 0x0A, 0x06, // 99\n    0x02, 0x8C, 0x0A, 0x06, // 100\n    0x02, 0x96, 0x0A, 0x06, // 101\n    0x02, 0xA0, 0x05, 0x04, // 102\n    0x02, 0xA5, 0x0A, 0x06, // 103\n    0x02, 0xAF, 0x0A, 0x06, // 104\n    0x02, 0xB9, 0x04, 0x03, // 105\n    0x02, 0xBD, 0x04, 0x03, // 106\n    0x02, 0xC1, 0x08, 0x05, // 107\n    0x02, 0xC9, 0x04, 0x03, // 108\n    0x02, 0xCD, 0x10, 0x09, // 109\n    0x02, 0xDD, 0x0A, 0x06, // 110\n    0x02, 0xE7, 0x0A, 0x06, // 111\n    0x02, 0xF1, 0x0A, 0x06, // 112\n    0x02, 0xFB, 0x0A, 0x06, // 113\n    0x03, 0x05, 0x05, 0x04, // 114\n    0x03, 0x0A, 0x08, 0x05, // 115\n    0x03, 0x12, 0x06, 0x04, // 116\n    0x03, 0x18, 0x0A, 0x06, // 117\n    0x03, 0x22, 0x09, 0x06, // 118\n    0x03, 0x2B, 0x0E, 0x08, // 119\n    0x03, 0x39, 0x0A, 0x06, // 120\n    0x03, 0x43, 0x09, 0x06, // 121\n    0x03, 0x4C, 0x0A, 0x06, // 122\n    0x03, 0x56, 0x06, 0x04, // 123\n    0x03, 0x5C, 0x04, 0x03, // 124\n    0x03, 0x60, 0x05, 0x04, // 125\n    0x03, 0x65, 0x09, 0x06, // 126\n    0xFF, 0xFF, 0x00, 0x0A, // 127\n    0xFF, 0xFF, 0x00, 0x0A, // 128\n    0xFF, 0xFF, 0x00, 0x0A, // 129\n    0xFF, 0xFF, 0x00, 0x0A, // 130\n    0xFF, 0xFF, 0x00, 0x0A, // 131\n    0xFF, 0xFF, 0x00, 0x0A, // 132\n    0xFF, 0xFF, 0x00, 0x0A, // 133\n    0xFF, 0xFF, 0x00, 0x0A, // 134\n    0xFF, 0xFF, 0x00, 0x0A, // 135\n    0xFF, 0xFF, 0x00, 0x0A, // 136\n    0xFF, 0xFF, 0x00, 0x0A, // 137\n    0xFF, 0xFF, 0x00, 0x0A, // 138\n    0xFF, 0xFF, 0x00, 0x0A, // 139\n    0xFF, 0xFF, 0x00, 0x0A, // 140\n    0xFF, 0xFF, 0x00, 0x0A, // 141\n    0xFF, 0xFF, 0x00, 0x0A, // 142\n    0xFF, 0xFF, 0x00, 0x0A, // 143\n    0xFF, 0xFF, 0x00, 0x0A, // 144\n    0xFF, 0xFF, 0x00, 0x0A, // 145\n    0xFF, 0xFF, 0x00, 0x0A, // 146\n    0xFF, 0xFF, 0x00, 0x0A, // 147\n    0xFF, 0xFF, 0x00, 0x0A, // 148\n    0xFF, 0xFF, 0x00, 0x0A, // 149\n    0xFF, 0xFF, 0x00, 0x0A, // 150\n    0xFF, 0xFF, 0x00, 0x0A, // 151\n    0xFF, 0xFF, 0x00, 0x0A, // 152\n    0xFF, 0xFF, 0x00, 0x0A, // 153\n    0xFF, 0xFF, 0x00, 0x0A, // 154\n    0xFF, 0xFF, 0x00, 0x0A, // 155\n    0xFF, 0xFF, 0x00, 0x0A, // 156\n    0xFF, 0xFF, 0x00, 0x0A, // 157\n    0xFF, 0xFF, 0x00, 0x0A, // 158\n    0xFF, 0xFF, 0x00, 0x0A, // 159\n    0xFF, 0xFF, 0x00, 0x0A, // 160\n    0x03, 0x6E, 0x04, 0x03, // 161\n    0x03, 0x72, 0x0A, 0x06, // 162\n    0x03, 0x7C, 0x0C, 0x07, // 163\n    0x03, 0x88, 0x0A, 0x06, // 164\n    0x03, 0x92, 0x0A, 0x06, // 165\n    0x03, 0x9C, 0x04, 0x03, // 166\n    0x03, 0xA0, 0x0A, 0x06, // 167\n    0x03, 0xAA, 0x0C, 0x07, // 168\n    0x03, 0xB6, 0x0D, 0x08, // 169\n    0x03, 0xC3, 0x07, 0x05, // 170\n    0x03, 0xCA, 0x0A, 0x06, // 171\n    0x03, 0xD4, 0x09, 0x06, // 172\n    0x03, 0xDD, 0x03, 0x03, // 173\n    0x03, 0xE0, 0x0D, 0x08, // 174\n    0x03, 0xED, 0x0B, 0x07, // 175\n    0x03, 0xF8, 0x07, 0x05, // 176\n    0x03, 0xFF, 0x0A, 0x06, // 177\n    0x04, 0x09, 0x05, 0x04, // 178\n    0x04, 0x0E, 0x05, 0x04, // 179\n    0x04, 0x13, 0x05, 0x04, // 180\n    0x04, 0x18, 0x0A, 0x06, // 181\n    0x04, 0x22, 0x09, 0x06, // 182\n    0x04, 0x2B, 0x03, 0x03, // 183\n    0x04, 0x2E, 0x0B, 0x07, // 184\n    0x04, 0x39, 0x0B, 0x07, // 185\n    0x04, 0x44, 0x07, 0x05, // 186\n    0x04, 0x4B, 0x0A, 0x06, // 187\n    0x04, 0x55, 0x10, 0x09, // 188\n    0x04, 0x65, 0x10, 0x09, // 189\n    0x04, 0x75, 0x10, 0x09, // 190\n    0x04, 0x85, 0x0A, 0x06, // 191\n    0x04, 0x8F, 0x0C, 0x07, // 192\n    0x04, 0x9B, 0x0C, 0x07, // 193\n    0x04, 0xA7, 0x0C, 0x07, // 194\n    0x04, 0xB3, 0x0B, 0x07, // 195\n    0x04, 0xBE, 0x0C, 0x07, // 196\n    0x04, 0xCA, 0x0C, 0x07, // 197\n    0x04, 0xD6, 0x0C, 0x07, // 198\n    0x04, 0xE2, 0x0C, 0x07, // 199\n    0x04, 0xEE, 0x0C, 0x07, // 200\n    0x04, 0xFA, 0x0C, 0x07, // 201\n    0x05, 0x06, 0x0C, 0x07, // 202\n    0x05, 0x12, 0x0C, 0x07, // 203\n    0x05, 0x1E, 0x0C, 0x07, // 204\n    0x05, 0x2A, 0x0C, 0x07, // 205\n    0x05, 0x36, 0x0C, 0x07, // 206\n    0x05, 0x42, 0x0C, 0x07, // 207\n    0x05, 0x4E, 0x0B, 0x07, // 208\n    0x05, 0x59, 0x0C, 0x07, // 209\n    0x05, 0x65, 0x0B, 0x07, // 210\n    0x05, 0x70, 0x0C, 0x07, // 211\n    0x05, 0x7C, 0x0B, 0x07, // 212\n    0x05, 0x87, 0x0C, 0x07, // 213\n    0x05, 0x93, 0x0C, 0x07, // 214\n    0x05, 0x9F, 0x0C, 0x07, // 215\n    0x05, 0xAB, 0x0C, 0x07, // 216\n    0x05, 0xB7, 0x0E, 0x08, // 217\n    0x05, 0xC5, 0x0C, 0x07, // 218\n    0x05, 0xD1, 0x0C, 0x07, // 219\n    0x05, 0xDD, 0x0C, 0x07, // 220\n    0x05, 0xE9, 0x0C, 0x07, // 221\n    0x05, 0xF5, 0x0C, 0x07, // 222\n    0x06, 0x01, 0x0C, 0x07, // 223\n    0x06, 0x0D, 0x0C, 0x07, // 224\n    0x06, 0x19, 0x0C, 0x07, // 225\n    0x06, 0x25, 0x0C, 0x07, // 226\n    0x06, 0x31, 0x0B, 0x07, // 227\n    0x06, 0x3C, 0x0C, 0x07, // 228\n    0x06, 0x48, 0x0B, 0x07, // 229\n    0x06, 0x53, 0x0C, 0x07, // 230\n    0x06, 0x5F, 0x0C, 0x07, // 231\n    0x06, 0x6B, 0x0C, 0x07, // 232\n    0x06, 0x77, 0x0C, 0x07, // 233\n    0x06, 0x83, 0x0C, 0x07, // 234\n    0x06, 0x8F, 0x0C, 0x07, // 235\n    0x06, 0x9B, 0x0C, 0x07, // 236\n    0x06, 0xA7, 0x0C, 0x07, // 237\n    0x06, 0xB3, 0x0C, 0x07, // 238\n    0x06, 0xBF, 0x0C, 0x07, // 239\n    0x06, 0xCB, 0x0B, 0x07, // 240\n    0x06, 0xD6, 0x0C, 0x07, // 241\n    0x06, 0xE2, 0x0B, 0x07, // 242\n    0x06, 0xED, 0x0C, 0x07, // 243\n    0x06, 0xF9, 0x0B, 0x07, // 244\n    0x07, 0x04, 0x0C, 0x07, // 245\n    0x07, 0x10, 0x0C, 0x07, // 246\n    0x07, 0x1C, 0x0C, 0x07, // 247\n    0x07, 0x28, 0x0C, 0x07, // 248\n    0x07, 0x34, 0x0E, 0x08, // 249\n    0x07, 0x42, 0x0C, 0x07, // 250\n    0x07, 0x4E, 0x0C, 0x07, // 251\n    0x07, 0x5A, 0x0C, 0x07, // 252\n    0x07, 0x66, 0x0C, 0x07, // 253\n    0x07, 0x72, 0x0C, 0x07, // 254\n    0x07, 0x7E, 0x0C, 0x07, // 255\n\n    // Font Data:\n    0x00, 0x00, 0xF8, 0x02,                                                                                                 // 33\n    0x38, 0x00, 0x00, 0x00, 0x38,                                                                                           // 34\n    0xA0, 0x03, 0xE0, 0x00, 0xB8, 0x03, 0xE0, 0x00, 0xB8,                                                                   // 35\n    0x30, 0x01, 0x28, 0x02, 0xF8, 0x07, 0x48, 0x02, 0x90, 0x01,                                                             // 36\n    0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x03, 0xC0, 0x00, 0xB0, 0x01, 0x48, 0x02, 0x80, 0x01,                         // 37\n    0x80, 0x01, 0x50, 0x02, 0x68, 0x02, 0xA8, 0x02, 0x18, 0x01, 0x80, 0x03, 0x80, 0x02,                                     // 38\n    0x38,                                                                                                                   // 39\n    0xE0, 0x03, 0x10, 0x04, 0x08, 0x08,                                                                                     // 40\n    0x08, 0x08, 0x10, 0x04, 0xE0, 0x03,                                                                                     // 41\n    0x28, 0x00, 0x18, 0x00, 0x28,                                                                                           // 42\n    0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40,                                                                   // 43\n    0x00, 0x00, 0x00, 0x06,                                                                                                 // 44\n    0x80, 0x00, 0x80,                                                                                                       // 45\n    0x00, 0x00, 0x00, 0x02,                                                                                                 // 46\n    0x00, 0x03, 0xE0, 0x00, 0x18,                                                                                           // 47\n    0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                                             // 48\n    0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03,                                                                         // 49\n    0x10, 0x02, 0x08, 0x03, 0x88, 0x02, 0x48, 0x02, 0x30, 0x02,                                                             // 50\n    0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                             // 51\n    0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x80,                                                       // 52\n    0x60, 0x01, 0x38, 0x02, 0x28, 0x02, 0x28, 0x02, 0xC8, 0x01,                                                             // 53\n    0xF0, 0x01, 0x28, 0x02, 0x28, 0x02, 0x28, 0x02, 0xD0, 0x01,                                                             // 54\n    0x08, 0x00, 0x08, 0x03, 0xC8, 0x00, 0x38, 0x00, 0x08,                                                                   // 55\n    0xB0, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                             // 56\n    0x70, 0x01, 0x88, 0x02, 0x88, 0x02, 0x88, 0x02, 0xF0, 0x01,                                                             // 57\n    0x00, 0x00, 0x20, 0x02,                                                                                                 // 58\n    0x00, 0x00, 0x20, 0x06,                                                                                                 // 59\n    0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01,                                                             // 60\n    0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0,                                                                   // 61\n    0x00, 0x00, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x40,                                                                   // 62\n    0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xC8, 0x02, 0x48, 0x00, 0x30,                                                       // 63\n    0x00, 0x00, 0xC0, 0x03, 0x30, 0x04, 0xD0, 0x09, 0x28, 0x0A, 0x28, 0x0A, 0xC8, 0x0B, 0x68, 0x0A, 0x10, 0x05, 0xE0, 0x04, // 64\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 65\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01,                                                 // 66\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01,                                                 // 67\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0xE0,                                                       // 68\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02,                                                 // 69\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x08,                                                                   // 70\n    0x00, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x50, 0x01, 0xC0,                                           // 71\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                                                 // 72\n    0x00, 0x00, 0xF8, 0x03,                                                                                                 // 73\n    0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                                         // 74\n    0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                                     // 75\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,                                                 // 76\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03,                         // 77\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03,                                                 // 78\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                     // 79\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                                       // 80\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x08, 0x03, 0xF0, 0x02,                                     // 81\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0xC8, 0x00, 0x30, 0x03,                                                 // 82\n    0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01,                                                 // 83\n    0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08,                                                       // 84\n    0x00, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                 // 85\n    0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08,                                           // 86\n    0x18, 0x00, 0xE0, 0x01, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x02, 0xE0, 0x01, 0x18,                   // 87\n    0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                                     // 88\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08,                                           // 89\n    0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02,                                                 // 90\n    0x00, 0x00, 0xF8, 0x0F, 0x08, 0x08,                                                                                     // 91\n    0x18, 0x00, 0xE0, 0x00, 0x00, 0x03,                                                                                     // 92\n    0x08, 0x08, 0xF8, 0x0F,                                                                                                 // 93\n    0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x40,                                                                   // 94\n    0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,                                                 // 95\n    0x08, 0x00, 0x10,                                                                                                       // 96\n    0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03,                                                             // 97\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 98\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01,                                                             // 99\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03,                                                             // 100\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02,                                                             // 101\n    0x20, 0x00, 0xF0, 0x03, 0x28,                                                                                           // 102\n    0x00, 0x00, 0xC0, 0x05, 0x20, 0x0A, 0x20, 0x0A, 0xE0, 0x07,                                                             // 103\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                                             // 104\n    0x00, 0x00, 0xE8, 0x03,                                                                                                 // 105\n    0x00, 0x08, 0xE8, 0x07,                                                                                                 // 106\n    0xF8, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02,                                                                         // 107\n    0x00, 0x00, 0xF8, 0x03,                                                                                                 // 108\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                         // 109\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                                             // 110\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 111\n    0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 112\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xE0, 0x0F,                                                             // 113\n    0x00, 0x00, 0xE0, 0x03, 0x20,                                                                                           // 114\n    0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x20, 0x01,                                                                         // 115\n    0x20, 0x00, 0xF8, 0x03, 0x20, 0x02,                                                                                     // 116\n    0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,                                                             // 117\n    0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20,                                                                   // 118\n    0xE0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x01,                                     // 119\n    0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                                                             // 120\n    0x20, 0x00, 0xC0, 0x09, 0x00, 0x06, 0xC0, 0x01, 0x20,                                                                   // 121\n    0x20, 0x02, 0x20, 0x03, 0xA0, 0x02, 0x60, 0x02, 0x20, 0x02,                                                             // 122\n    0x80, 0x00, 0x78, 0x0F, 0x08, 0x08,                                                                                     // 123\n    0x00, 0x00, 0xF8, 0x0F,                                                                                                 // 124\n    0x08, 0x08, 0x78, 0x0F, 0x80,                                                                                           // 125\n    0xC0, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x00, 0xC0,                                                                   // 126\n    0x00, 0x00, 0xA0, 0x0F,                                                                                                 // 161\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x0F, 0x78, 0x02, 0x40, 0x01,                                                             // 162\n    0x40, 0x02, 0x70, 0x03, 0xC8, 0x02, 0x48, 0x02, 0x08, 0x02, 0x10, 0x02,                                                 // 163\n    0x00, 0x00, 0xE0, 0x01, 0x20, 0x01, 0x20, 0x01, 0xE0, 0x01,                                                             // 164\n    0x48, 0x01, 0x70, 0x01, 0xC0, 0x03, 0x70, 0x01, 0x48, 0x01,                                                             // 165\n    0x00, 0x00, 0x38, 0x0F,                                                                                                 // 166\n    0xD0, 0x04, 0x28, 0x09, 0x48, 0x09, 0x48, 0x0A, 0x90, 0x05,                                                             // 167\n    0x00, 0x00, 0xE0, 0x03, 0xA8, 0x02, 0xA0, 0x02, 0xA8, 0x02, 0x20, 0x02,                                                 // 168\n    0xE0, 0x00, 0x10, 0x01, 0x48, 0x02, 0xA8, 0x02, 0xA8, 0x02, 0x10, 0x01, 0xE0,                                           // 169\n    0x68, 0x00, 0x68, 0x00, 0x68, 0x00, 0x78,                                                                               // 170\n    0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02,                                                             // 171\n    0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0,                                                                   // 172\n    0x80, 0x00, 0x80,                                                                                                       // 173\n    0xE0, 0x00, 0x10, 0x01, 0xE8, 0x02, 0x68, 0x02, 0xC8, 0x02, 0x10, 0x01, 0xE0,                                           // 174\n    0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,                                                       // 175\n    0x00, 0x00, 0x38, 0x00, 0x28, 0x00, 0x38,                                                                               // 176\n    0x40, 0x02, 0x40, 0x02, 0xF0, 0x03, 0x40, 0x02, 0x40, 0x02,                                                             // 177\n    0x48, 0x00, 0x68, 0x00, 0x58,                                                                                           // 178\n    0x48, 0x00, 0x58, 0x00, 0x68,                                                                                           // 179\n    0x00, 0x00, 0x10, 0x00, 0x08,                                                                                           // 180\n    0x00, 0x00, 0xE0, 0x0F, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,                                                             // 181\n    0x70, 0x00, 0xF8, 0x0F, 0x08, 0x00, 0xF8, 0x0F, 0x08,                                                                   // 182\n    0x00, 0x00, 0x40,                                                                                                       // 183\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA0, 0x02, 0xA8, 0x02, 0xC0,                                                       // 184\n    0x00, 0x00, 0xF0, 0x03, 0x40, 0x00, 0x80, 0x00, 0xF8, 0x03, 0x08,                                                       // 185\n    0x30, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                                                               // 186\n    0x00, 0x00, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01,                                                             // 187\n    0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0xC0, 0x00, 0x20, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01,                         // 188\n    0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0x80, 0x00, 0x60, 0x00, 0x50, 0x02, 0x48, 0x03, 0xC0, 0x02,                         // 189\n    0x48, 0x00, 0x58, 0x00, 0x68, 0x03, 0x80, 0x00, 0x60, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01,                         // 190\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x09, 0xA0, 0x09, 0x00, 0x04,                                                             // 191\n    0x00, 0x00, 0xF0, 0x03, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0xF0, 0x03,                                                 // 192\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x88, 0x01,                                                 // 193\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                 // 194\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x18,                                                       // 195\n    0x00, 0x00, 0x00, 0x02, 0xFC, 0x03, 0x04, 0x02, 0xFC, 0x03, 0x00, 0x02,                                                 // 196\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x08, 0x02,                                                 // 197\n    0x00, 0x00, 0xB8, 0x03, 0x40, 0x00, 0xF8, 0x03, 0x40, 0x00, 0xB8, 0x03,                                                 // 198\n    0x00, 0x00, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                 // 199\n    0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0xF8, 0x03,                                                 // 200\n    0x00, 0x00, 0xE0, 0x03, 0x08, 0x01, 0x90, 0x00, 0x48, 0x00, 0xE0, 0x03,                                                 // 201\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0xA0, 0x00, 0x10, 0x01, 0x08, 0x02,                                                 // 202\n    0x00, 0x00, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03,                                                 // 203\n    0x00, 0x00, 0xF8, 0x03, 0x10, 0x00, 0x60, 0x00, 0x10, 0x00, 0xF8, 0x03,                                                 // 204\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                                                 // 205\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                                 // 206\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03,                                                 // 207\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                                       // 208\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01,                                                 // 209\n    0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08,                                                       // 210\n    0x00, 0x00, 0x38, 0x00, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0xF8, 0x01,                                                 // 211\n    0x00, 0x00, 0x70, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x88, 0x00, 0x70,                                                       // 212\n    0x00, 0x00, 0x18, 0x03, 0xA0, 0x00, 0x40, 0x00, 0xA0, 0x00, 0x18, 0x03,                                                 // 213\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x02,                                                 // 214\n    0x00, 0x00, 0x38, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                                                 // 215\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03,                                                 // 216\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x06,                                     // 217\n    0x00, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x40, 0x02, 0x40, 0x02, 0x80, 0x01,                                                 // 218\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x02, 0x40, 0x02, 0x80, 0x01, 0xF8, 0x03,                                                 // 219\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x80, 0x01,                                                 // 220\n    0x00, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01,                                                 // 221\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0xF0, 0x01, 0x08, 0x02, 0xF0, 0x01,                                                 // 222\n    0x00, 0x00, 0x30, 0x02, 0x48, 0x01, 0xC8, 0x00, 0x48, 0x00, 0xF8, 0x03,                                                 // 223\n    0x00, 0x00, 0x00, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x03,                                                 // 224\n    0x00, 0x00, 0xE0, 0x01, 0x50, 0x02, 0x50, 0x02, 0x48, 0x02, 0x88, 0x01,                                                 // 225\n    0x00, 0x00, 0xE0, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x40, 0x01,                                                 // 226\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x60,                                                       // 227\n    0x00, 0x00, 0x00, 0x02, 0xC0, 0x03, 0x20, 0x02, 0xE0, 0x03, 0x00, 0x02,                                                 // 228\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0xC0,                                                       // 229\n    0x00, 0x00, 0x60, 0x03, 0x80, 0x00, 0xE0, 0x03, 0x80, 0x00, 0x60, 0x03,                                                 // 230\n    0x00, 0x00, 0x20, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x40, 0x01,                                                 // 231\n    0x00, 0x00, 0xE0, 0x03, 0x00, 0x01, 0x80, 0x00, 0x40, 0x00, 0xE0, 0x03,                                                 // 232\n    0x00, 0x00, 0xE0, 0x03, 0x00, 0x01, 0x98, 0x00, 0x40, 0x00, 0xE0, 0x03,                                                 // 233\n    0x00, 0x00, 0xE0, 0x03, 0x80, 0x00, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                                                 // 234\n    0x00, 0x00, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03,                                                 // 235\n    0x00, 0x00, 0xE0, 0x03, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0xE0, 0x03,                                                 // 236\n    0x00, 0x00, 0xE0, 0x03, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xE0, 0x03,                                                 // 237\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                 // 238\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03,                                                 // 239\n    0x00, 0x00, 0xE0, 0x03, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x40,                                                       // 240\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x40, 0x02,                                                 // 241\n    0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20,                                                       // 242\n    0x00, 0x00, 0x60, 0x00, 0x80, 0x02, 0x80, 0x02, 0x80, 0x02, 0xE0, 0x01,                                                 // 243\n    0x00, 0x00, 0xC0, 0x00, 0x20, 0x01, 0xE0, 0x03, 0x20, 0x01, 0xC0,                                                       // 244\n    0x00, 0x00, 0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                                                 // 245\n    0x00, 0x00, 0xE0, 0x03, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x02,                                                 // 246\n    0x00, 0x00, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xE0, 0x03,                                                 // 247\n    0x00, 0x00, 0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03,                                                 // 248\n    0x00, 0x00, 0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x06,                                     // 249\n    0x00, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01,                                                 // 250\n    0x00, 0x00, 0xE0, 0x03, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01, 0xE0, 0x03,                                                 // 251\n    0x00, 0x00, 0xE0, 0x03, 0x80, 0x02, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01,                                                 // 252\n    0x00, 0x00, 0x40, 0x01, 0x20, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x01,                                                 // 253\n    0x00, 0x00, 0xE0, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02, 0xC0, 0x01,                                                 // 254\n    0x00, 0x00, 0x40, 0x02, 0xA0, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0xE0, 0x03,                                                 // 255\n};\n\n// Font generated or edited with the glyphEditor (@mrekin)\nconst uint8_t ArialMT_Plain_16_RU[] PROGMEM = {\n    0x10, // Width: 16\n    0x13, // Height: 19\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x04, // 32\n    0x00, 0x00, 0x08, 0x05, // 33\n    0x00, 0x08, 0x0D, 0x06, // 34\n    0x00, 0x15, 0x1A, 0x09, // 35\n    0x00, 0x2F, 0x17, 0x09, // 36\n    0x00, 0x46, 0x26, 0x0E, // 37\n    0x00, 0x6C, 0x1D, 0x0B, // 38\n    0x00, 0x89, 0x04, 0x03, // 39\n    0x00, 0x8D, 0x0C, 0x05, // 40\n    0x00, 0x99, 0x0B, 0x05, // 41\n    0x00, 0xA4, 0x0D, 0x06, // 42\n    0x00, 0xB1, 0x17, 0x09, // 43\n    0x00, 0xC8, 0x09, 0x04, // 44\n    0x00, 0xD1, 0x0B, 0x05, // 45\n    0x00, 0xDC, 0x08, 0x04, // 46\n    0x00, 0xE4, 0x0A, 0x04, // 47\n    0x00, 0xEE, 0x17, 0x09, // 48\n    0x01, 0x05, 0x11, 0x09, // 49\n    0x01, 0x16, 0x17, 0x09, // 50\n    0x01, 0x2D, 0x17, 0x09, // 51\n    0x01, 0x44, 0x17, 0x09, // 52\n    0x01, 0x5B, 0x17, 0x09, // 53\n    0x01, 0x72, 0x17, 0x09, // 54\n    0x01, 0x89, 0x16, 0x09, // 55\n    0x01, 0x9F, 0x17, 0x09, // 56\n    0x01, 0xB6, 0x17, 0x09, // 57\n    0x01, 0xCD, 0x05, 0x04, // 58\n    0x01, 0xD2, 0x06, 0x04, // 59\n    0x01, 0xD8, 0x17, 0x09, // 60\n    0x01, 0xEF, 0x17, 0x09, // 61\n    0x02, 0x06, 0x17, 0x09, // 62\n    0x02, 0x1D, 0x16, 0x09, // 63\n    0x02, 0x33, 0x2F, 0x10, // 64\n    0x02, 0x62, 0x1D, 0x0B, // 65\n    0x02, 0x7F, 0x1D, 0x0B, // 66\n    0x02, 0x9C, 0x20, 0x0C, // 67\n    0x02, 0xBC, 0x20, 0x0C, // 68\n    0x02, 0xDC, 0x1D, 0x0B, // 69\n    0x02, 0xF9, 0x19, 0x0A, // 70\n    0x03, 0x12, 0x20, 0x0C, // 71\n    0x03, 0x32, 0x1D, 0x0B, // 72\n    0x03, 0x4F, 0x05, 0x03, // 73\n    0x03, 0x54, 0x14, 0x08, // 74\n    0x03, 0x68, 0x1D, 0x0B, // 75\n    0x03, 0x85, 0x17, 0x09, // 76\n    0x03, 0x9C, 0x23, 0x0D, // 77\n    0x03, 0xBF, 0x1D, 0x0B, // 78\n    0x03, 0xDC, 0x20, 0x0C, // 79\n    0x03, 0xFC, 0x1C, 0x0B, // 80\n    0x04, 0x18, 0x20, 0x0C, // 81\n    0x04, 0x38, 0x1D, 0x0B, // 82\n    0x04, 0x55, 0x1D, 0x0B, // 83\n    0x04, 0x72, 0x19, 0x09, // 84\n    0x04, 0x8B, 0x1D, 0x0B, // 85\n    0x04, 0xA8, 0x1C, 0x0B, // 86\n    0x04, 0xC4, 0x2B, 0x0F, // 87\n    0x04, 0xEF, 0x20, 0x0B, // 88\n    0x05, 0x0F, 0x19, 0x09, // 89\n    0x05, 0x28, 0x1A, 0x09, // 90\n    0x05, 0x42, 0x0C, 0x04, // 91\n    0x05, 0x4E, 0x0B, 0x04, // 92\n    0x05, 0x59, 0x09, 0x04, // 93\n    0x05, 0x62, 0x14, 0x07, // 94\n    0x05, 0x76, 0x1B, 0x09, // 95\n    0x05, 0x91, 0x07, 0x05, // 96\n    0x05, 0x98, 0x17, 0x09, // 97\n    0x05, 0xAF, 0x17, 0x09, // 98\n    0x05, 0xC6, 0x14, 0x08, // 99\n    0x05, 0xDA, 0x17, 0x09, // 100\n    0x05, 0xF1, 0x17, 0x09, // 101\n    0x06, 0x08, 0x0A, 0x04, // 102\n    0x06, 0x12, 0x17, 0x09, // 103\n    0x06, 0x29, 0x14, 0x08, // 104\n    0x06, 0x3D, 0x05, 0x04, // 105\n    0x06, 0x42, 0x06, 0x03, // 106\n    0x06, 0x48, 0x17, 0x08, // 107\n    0x06, 0x5F, 0x05, 0x03, // 108\n    0x06, 0x64, 0x23, 0x0D, // 109\n    0x06, 0x87, 0x14, 0x08, // 110\n    0x06, 0x9B, 0x17, 0x09, // 111\n    0x06, 0xB2, 0x17, 0x09, // 112\n    0x06, 0xC9, 0x18, 0x09, // 113\n    0x06, 0xE1, 0x0D, 0x05, // 114\n    0x06, 0xEE, 0x14, 0x08, // 115\n    0x07, 0x02, 0x0B, 0x04, // 116\n    0x07, 0x0D, 0x14, 0x08, // 117\n    0x07, 0x21, 0x13, 0x07, // 118\n    0x07, 0x34, 0x1F, 0x0B, // 119\n    0x07, 0x53, 0x14, 0x07, // 120\n    0x07, 0x67, 0x13, 0x07, // 121\n    0x07, 0x7A, 0x14, 0x07, // 122\n    0x07, 0x8E, 0x0F, 0x05, // 123\n    0x07, 0x9D, 0x06, 0x03, // 124\n    0x07, 0xA3, 0x0E, 0x05, // 125\n    0x07, 0xB1, 0x17, 0x09, // 126\n    0xFF, 0xFF, 0x00, 0x10, // 127\n    0xFF, 0xFF, 0x00, 0x10, // 128\n    0xFF, 0xFF, 0x00, 0x10, // 129\n    0xFF, 0xFF, 0x00, 0x10, // 130\n    0xFF, 0xFF, 0x00, 0x10, // 131\n    0xFF, 0xFF, 0x00, 0x10, // 132\n    0xFF, 0xFF, 0x00, 0x10, // 133\n    0xFF, 0xFF, 0x00, 0x10, // 134\n    0xFF, 0xFF, 0x00, 0x10, // 135\n    0xFF, 0xFF, 0x00, 0x10, // 136\n    0xFF, 0xFF, 0x00, 0x10, // 137\n    0xFF, 0xFF, 0x00, 0x10, // 138\n    0xFF, 0xFF, 0x00, 0x10, // 139\n    0xFF, 0xFF, 0x00, 0x10, // 140\n    0xFF, 0xFF, 0x00, 0x10, // 141\n    0xFF, 0xFF, 0x00, 0x10, // 142\n    0xFF, 0xFF, 0x00, 0x10, // 143\n    0xFF, 0xFF, 0x00, 0x10, // 144\n    0xFF, 0xFF, 0x00, 0x10, // 145\n    0xFF, 0xFF, 0x00, 0x10, // 146\n    0xFF, 0xFF, 0x00, 0x10, // 147\n    0xFF, 0xFF, 0x00, 0x10, // 148\n    0xFF, 0xFF, 0x00, 0x10, // 149\n    0xFF, 0xFF, 0x00, 0x10, // 150\n    0xFF, 0xFF, 0x00, 0x10, // 151\n    0xFF, 0xFF, 0x00, 0x10, // 152\n    0xFF, 0xFF, 0x00, 0x10, // 153\n    0xFF, 0xFF, 0x00, 0x10, // 154\n    0xFF, 0xFF, 0x00, 0x10, // 155\n    0xFF, 0xFF, 0x00, 0x10, // 156\n    0xFF, 0xFF, 0x00, 0x10, // 157\n    0xFF, 0xFF, 0x00, 0x10, // 158\n    0xFF, 0xFF, 0x00, 0x10, // 159\n    0xFF, 0xFF, 0x00, 0x10, // 160\n    0x07, 0xC8, 0x09, 0x05, // 161\n    0x07, 0xD1, 0x17, 0x09, // 162\n    0x07, 0xE8, 0x17, 0x09, // 163\n    0x07, 0xFF, 0x14, 0x09, // 164\n    0x08, 0x13, 0x1A, 0x09, // 165\n    0x08, 0x2D, 0x06, 0x03, // 166\n    0x08, 0x33, 0x17, 0x09, // 167\n    0x08, 0x4A, 0x1D, 0x0B, // 168\n    0x08, 0x67, 0x23, 0x0C, // 169\n    0x08, 0x8A, 0x0E, 0x05, // 170\n    0x08, 0x98, 0x14, 0x09, // 171\n    0x08, 0xAC, 0x17, 0x09, // 172\n    0x08, 0xC3, 0x0B, 0x05, // 173\n    0x08, 0xCE, 0x23, 0x0C, // 174\n    0x08, 0xF1, 0x19, 0x09, // 175\n    0x09, 0x0A, 0x0D, 0x06, // 176\n    0x09, 0x17, 0x17, 0x09, // 177\n    0x09, 0x2E, 0x0E, 0x05, // 178\n    0x09, 0x3C, 0x0D, 0x05, // 179\n    0x09, 0x49, 0x0A, 0x05, // 180\n    0x09, 0x53, 0x17, 0x09, // 181\n    0x09, 0x6A, 0x19, 0x09, // 182\n    0x09, 0x83, 0x08, 0x05, // 183\n    0x09, 0x8B, 0x17, 0x09, // 184\n    0x09, 0xA2, 0x0B, 0x05, // 185\n    0x09, 0xAD, 0x0D, 0x05, // 186\n    0x09, 0xBA, 0x17, 0x09, // 187\n    0x09, 0xD1, 0x26, 0x0D, // 188\n    0x09, 0xF7, 0x26, 0x0D, // 189\n    0x0A, 0x1D, 0x26, 0x0D, // 190\n    0x0A, 0x43, 0x1B, 0x0C, // 191\n    0x0A, 0x5E, 0x1D, 0x0B, // 192\n    0x0A, 0x7B, 0x1A, 0x0B, // 193\n    0x0A, 0x95, 0x1D, 0x0B, // 194\n    0x0A, 0xB2, 0x19, 0x09, // 195\n    0x0A, 0xCB, 0x1E, 0x0B, // 196\n    0x0A, 0xE9, 0x1D, 0x0B, // 197\n    0x0B, 0x06, 0x2C, 0x0F, // 198\n    0x0B, 0x32, 0x1A, 0x0A, // 199\n    0x0B, 0x4C, 0x20, 0x0C, // 200\n    0x0B, 0x6C, 0x20, 0x0C, // 201\n    0x0B, 0x8C, 0x1A, 0x09, // 202\n    0x0B, 0xA6, 0x1A, 0x0B, // 203\n    0x0B, 0xC0, 0x23, 0x0D, // 204\n    0x0B, 0xE3, 0x1D, 0x0B, // 205\n    0x0C, 0x00, 0x20, 0x0C, // 206\n    0x0C, 0x20, 0x1D, 0x0C, // 207\n    0x0C, 0x3D, 0x1C, 0x0B, // 208\n    0x0C, 0x59, 0x20, 0x0C, // 209\n    0x0C, 0x79, 0x19, 0x09, // 210\n    0x0C, 0x92, 0x1C, 0x0A, // 211\n    0x0C, 0xAE, 0x23, 0x0D, // 212\n    0x0C, 0xD1, 0x20, 0x0B, // 213\n    0x0C, 0xF1, 0x21, 0x0C, // 214\n    0x0D, 0x12, 0x1A, 0x0B, // 215\n    0x0D, 0x2C, 0x26, 0x0F, // 216\n    0x0D, 0x52, 0x2A, 0x0F, // 217\n    0x0D, 0x7C, 0x23, 0x0D, // 218\n    0x0D, 0x9F, 0x23, 0x0E, // 219\n    0x0D, 0xC2, 0x1A, 0x0A, // 220\n    0x0D, 0xDC, 0x1D, 0x0C, // 221\n    0x0D, 0xF9, 0x2C, 0x10, // 222\n    0x0E, 0x25, 0x20, 0x0C, // 223\n    0x0E, 0x45, 0x17, 0x09, // 224\n    0x0E, 0x5C, 0x1A, 0x09, // 225\n    0x0E, 0x76, 0x14, 0x09, // 226\n    0x0E, 0x8A, 0x10, 0x06, // 227\n    0x0E, 0x9A, 0x1B, 0x09, // 228\n    0x0E, 0xB5, 0x17, 0x09, // 229\n    0x0E, 0xCC, 0x20, 0x0B, // 230\n    0x0E, 0xEC, 0x11, 0x07, // 231\n    0x0E, 0xFD, 0x17, 0x09, // 232\n    0x0F, 0x14, 0x17, 0x09, // 233\n    0x0F, 0x2B, 0x14, 0x07, // 234\n    0x0F, 0x3F, 0x17, 0x09, // 235\n    0x0F, 0x56, 0x1D, 0x0B, // 236\n    0x0F, 0x73, 0x17, 0x09, // 237\n    0x0F, 0x8A, 0x17, 0x09, // 238\n    0x0F, 0xA1, 0x17, 0x09, // 239\n    0x0F, 0xB8, 0x17, 0x09, // 240\n    0x0F, 0xCF, 0x14, 0x08, // 241\n    0x0F, 0xE3, 0x13, 0x07, // 242\n    0x0F, 0xF6, 0x13, 0x07, // 243\n    0x10, 0x09, 0x23, 0x0D, // 244\n    0x10, 0x2C, 0x17, 0x09, // 245\n    0x10, 0x43, 0x1A, 0x0A, // 246\n    0x10, 0x5D, 0x14, 0x08, // 247\n    0x10, 0x71, 0x23, 0x0D, // 248\n    0x10, 0x94, 0x23, 0x0D, // 249\n    0x10, 0xB7, 0x1A, 0x0A, // 250\n    0x10, 0xD1, 0x1D, 0x0C, // 251\n    0x10, 0xEE, 0x17, 0x09, // 252\n    0x11, 0x05, 0x14, 0x08, // 253\n    0x11, 0x19, 0x20, 0x0C, // 254\n    0x11, 0x39, 0x17, 0x09, // 255\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x5F,                               // 33\n    0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // 34\n    0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00, 0xB8, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00,\n    0xB8, 0x08, 0x00, 0x80, 0x08, // 35\n    0x00, 0x00, 0x00, 0xE0, 0x10, 0x00, 0x10, 0x21, 0x00, 0x08, 0x41, 0x00, 0xFC, 0xFF, 0x00, 0x08, 0x42, 0x00, 0x08, 0x22, 0x00,\n    0x30, 0x1C, // 36\n    0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x61, 0x00, 0xF0, 0x18, 0x00, 0x00, 0x06, 0x00,\n    0xC0, 0x01, 0x00, 0x30, 0x3C, 0x00, 0x08, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x3C, // 37\n    0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x70, 0x22, 0x00, 0x88, 0x41, 0x00, 0x08, 0x43, 0x00, 0x88, 0x44, 0x00, 0x70, 0x28, 0x00,\n    0x00, 0x10, 0x00, 0x00, 0x28, 0x00, 0x00, 0x44,                               // 38\n    0x00, 0x00, 0x00, 0x78,                                                       // 39\n    0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x70, 0xC0, 0x01, 0x08, 0x00, 0x02,       // 40\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x70, 0xC0, 0x01, 0x80, 0x3F,             // 41\n    0x10, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x38, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x10, // 42\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x02,                                                       // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01,             // 44\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,                   // 46\n    0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00, 0x18,       // 47\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00,\n    0xE0, 0x1F,                                                                                           // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0xF8, 0x7F, // 49\n    0x00, 0x00, 0x00, 0x20, 0x40, 0x00, 0x10, 0x60, 0x00, 0x08, 0x50, 0x00, 0x08, 0x48, 0x00, 0x08, 0x44, 0x00, 0x18, 0x43, 0x00,\n    0xE0, 0x40, // 50\n    0x00, 0x00, 0x00, 0x20, 0x30, 0x00, 0x10, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x88, 0x41, 0x00, 0xF0, 0x22, 0x00,\n    0x00, 0x1C, // 51\n    0x00, 0x0C, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x09, 0x00, 0xC0, 0x08, 0x00, 0x20, 0x08, 0x00, 0x10, 0x08, 0x00, 0xF8, 0x7F, 0x00,\n    0x00, 0x08, // 52\n    0x00, 0x00, 0x00, 0xC0, 0x11, 0x00, 0xB8, 0x20, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x08, 0x21, 0x00,\n    0x08, 0x1E, // 53\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x21, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x10, 0x21, 0x00,\n    0x20, 0x1E, // 54\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x78, 0x00, 0x88, 0x07, 0x00, 0x68, 0x00, 0x00,\n    0x18, // 55\n    0x00, 0x00, 0x00, 0x60, 0x1C, 0x00, 0x90, 0x22, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x90, 0x22, 0x00,\n    0x60, 0x1C, // 56\n    0x00, 0x00, 0x00, 0xE0, 0x11, 0x00, 0x10, 0x22, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x10, 0x22, 0x00,\n    0xE0, 0x1F,                         // 57\n    0x00, 0x00, 0x00, 0x40, 0x40,       // 58\n    0x00, 0x00, 0x00, 0x40, 0xC0, 0x01, // 59\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00,\n    0x40, 0x10, // 60\n    0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00,\n    0x80, 0x08, // 61\n    0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00,\n    0x00, 0x02, // 62\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x5C, 0x00, 0x08, 0x02, 0x00, 0x10, 0x01, 0x00,\n    0xE0, // 63\n    0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0xC0, 0x40, 0x00, 0x20, 0x80, 0x00, 0x10, 0x1E, 0x01, 0x10, 0x21, 0x01, 0x88, 0x40, 0x02,\n    0x48, 0x40, 0x02, 0x48, 0x40, 0x02, 0x48, 0x20, 0x02, 0x88, 0x7C, 0x02, 0xC8, 0x43, 0x02, 0x10, 0x40, 0x02, 0x10, 0x20, 0x01,\n    0x60, 0x10, 0x01, 0x80, 0x8F, // 64\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x08, 0x04, 0x00, 0x70, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 65\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x90, 0x22, 0x00, 0x60, 0x1C, // 66\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 67\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 68\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 69\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x08, // 70\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x12, 0x00, 0x00, 0x0E, // 71\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,\n    0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xF8, 0x7F,                                                                         // 72\n    0x00, 0x00, 0x00, 0xF8, 0x7F,                                                                                           // 73\n    0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x3F, // 74\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x03, 0x00, 0x40, 0x04, 0x00,\n    0x20, 0x18, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, // 75\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, // 76\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 77\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 78\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 79\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x10, 0x01, 0x00, 0xE0, // 80\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x50, 0x00,\n    0x08, 0x50, 0x00, 0x10, 0x20, 0x00, 0x20, 0x70, 0x00, 0xC0, 0x5F, // 81\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x06, 0x00,\n    0x08, 0x1A, 0x00, 0x10, 0x21, 0x00, 0xE0, 0x40, // 82\n    0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x90, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 83\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, // 84\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 85\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00,\n    0x00, 0x07, 0x00, 0xE0, 0x00, 0x00, 0x18, // 86\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00,\n    0x18, // 87\n    0x00, 0x40, 0x00, 0x08, 0x20, 0x00, 0x10, 0x10, 0x00, 0x60, 0x0C, 0x00, 0x80, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00,\n    0x60, 0x0C, 0x00, 0x10, 0x10, 0x00, 0x08, 0x20, 0x00, 0x00, 0x40, // 88\n    0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x08, // 89\n    0x00, 0x40, 0x00, 0x08, 0x60, 0x00, 0x08, 0x58, 0x00, 0x08, 0x44, 0x00, 0x08, 0x43, 0x00, 0x88, 0x40, 0x00, 0x68, 0x40, 0x00,\n    0x18, 0x40, 0x00, 0x08, 0x40,                                                                                           // 90\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02,                                                 // 91\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60,                                                       // 92\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF8, 0xFF, 0x03,                                                                   // 93\n    0x00, 0x01, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x01, // 94\n    0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02,\n    0x00, 0x00, 0x02, 0x00, 0x00, 0x02,       // 95\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, // 96\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 97\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F,                                                                                                             // 98\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, // 99\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0xF8, 0x7F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17,                                                 // 101\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x48, 0x00, 0x00, 0x48, // 102\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x01, 0x80, 0x20, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x80, 0x20, 0x01,\n    0xC0, 0xFF,                                                                                                             // 103\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 104\n    0x00, 0x00, 0x00, 0xC8, 0x7F,                                                                                           // 105\n    0x00, 0x00, 0x02, 0xC8, 0xFF, 0x01,                                                                                     // 106\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x19, 0x00, 0x80, 0x20, 0x00,\n    0x40, 0x40,                   // 107\n    0x00, 0x00, 0x00, 0xF8, 0x7F, // 108\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, 0x00,\n    0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F,                                     // 109\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 111\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x80, 0x60, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 112\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0xC0, 0xFF, 0x03,                                                                                                       // 113\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40,                                           // 114\n    0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x38, // 115\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40,                                                       // 116\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 117\n    0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0,       // 118\n    0xC0, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00,\n    0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1F, 0x00, 0xC0,                                                             // 119\n    0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, // 120\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x00, 0xC0, 0x01, 0x00, 0x78, 0x00, 0x00, 0x07, 0x00, 0xC0,       // 121\n    0x40, 0x40, 0x00, 0x40, 0x60, 0x00, 0x40, 0x58, 0x00, 0x40, 0x44, 0x00, 0x40, 0x43, 0x00, 0xC0, 0x40, 0x00, 0x40, 0x40, // 122\n    0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xF0, 0xFB, 0x01, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02,                               // 123\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03,                                                                                     // 124\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF0, 0xFB, 0x01, 0x00, 0x04, 0x00, 0x00, 0x04,                                     // 125\n    0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x01,                                           // 126\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xFF, 0x03, // 161\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x03, 0x40, 0xF0, 0x00, 0x40, 0x4E, 0x00, 0xC0, 0x41, 0x00, 0xB8, 0x20, 0x00,\n    0x00, 0x11, // 162\n    0x00, 0x41, 0x00, 0xF0, 0x31, 0x00, 0x18, 0x2F, 0x00, 0x08, 0x21, 0x00, 0x08, 0x61, 0x00, 0x08, 0x40, 0x00, 0x10, 0x40, 0x00,\n    0x20, 0x20,                                                                                                             // 163\n    0x00, 0x00, 0x00, 0x40, 0x0B, 0x00, 0x80, 0x04, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00, 0x80, 0x04, 0x00, 0x40, 0x0B, // 164\n    0x08, 0x0A, 0x00, 0x10, 0x0A, 0x00, 0x60, 0x0A, 0x00, 0x80, 0x0B, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x0B, 0x00, 0x60, 0x0A, 0x00,\n    0x10, 0x0A, 0x00, 0x08, 0x0A,       // 165\n    0x00, 0x00, 0x00, 0xF8, 0xF1, 0x03, // 166\n    0x00, 0x86, 0x00, 0x70, 0x09, 0x01, 0xC8, 0x10, 0x02, 0x88, 0x10, 0x02, 0x08, 0x21, 0x02, 0x08, 0x61, 0x02, 0x30, 0xD2, 0x01,\n    0x00, 0x0C, // 167\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x09, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x09, 0x41, 0x00,\n    0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 168\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xC8, 0x47, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00,\n    0x28, 0x48, 0x00, 0x48, 0x44, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F,                                     // 169\n    0xD0, 0x00, 0x00, 0x48, 0x01, 0x00, 0x28, 0x01, 0x00, 0x28, 0x01, 0x00, 0xF0, 0x01,                                     // 170\n    0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, // 171\n    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00,\n    0x80, 0x0F,                                                       // 172\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 173\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xE8, 0x4F, 0x00, 0x28, 0x41, 0x00, 0x28, 0x41, 0x00, 0x28, 0x43, 0x00,\n    0x28, 0x45, 0x00, 0xC8, 0x48, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 174\n    0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x04,                                                       // 175\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x48, 0x00, 0x00, 0x48, 0x00, 0x00, 0x30, // 176\n    0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0xE0, 0x4F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41,                                                                         // 177\n    0x10, 0x01, 0x00, 0x88, 0x01, 0x00, 0x48, 0x01, 0x00, 0x48, 0x01, 0x00, 0x30, 0x01, // 178\n    0x90, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x28, 0x01, 0x00, 0xD8,       // 179\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08,                         // 180\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00,\n    0xC0, 0x7F, // 181\n    0xF0, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0xF8, 0xFF, 0x03, 0x08,                         // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // 183\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x90, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x90, 0x24, 0x00,\n    0x00, 0x17,                                                                   // 184\n    0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x01,             // 185\n    0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0xF0, // 186\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00,\n    0x00, 0x04, // 187\n    0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x40, 0x00, 0xF8, 0x21, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00,\n    0x80, 0x01, 0x00, 0x40, 0x30, 0x00, 0x30, 0x28, 0x00, 0x08, 0x24, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x20, // 188\n    0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x40, 0x00, 0xF8, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00,\n    0x80, 0x00, 0x00, 0x60, 0x44, 0x00, 0x10, 0x62, 0x00, 0x08, 0x52, 0x00, 0x00, 0x52, 0x00, 0x00, 0x4C, // 189\n    0x90, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x41, 0x00, 0x28, 0x21, 0x00, 0xD8, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00,\n    0x80, 0x00, 0x00, 0x40, 0x30, 0x00, 0x30, 0x28, 0x00, 0x08, 0x24, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x20, // 190\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x60, 0x03, 0x00, 0x3B, 0x02, 0x00, 0x3B, 0x02,\n    0x00, 0x00, 0x03, 0x00, 0x80, 0x01, // 191\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x08, 0x04, 0x00, 0x70, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 192\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x66, 0x00, 0x08, 0x3C, // 193\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x90, 0x22, 0x00, 0x60, 0x1C, // 194\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x18, // 195\n    0x00, 0xC0, 0x01, 0x00, 0x60, 0x00, 0xF0, 0x5F, 0x00, 0x18, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0xC0, 0x01, // 196\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 197\n    0x08, 0x40, 0x00, 0x08, 0x60, 0x00, 0x38, 0x38, 0x00, 0xE0, 0x0C, 0x00, 0x80, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x00,\n    0xF8, 0x7F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x80, 0x07, 0x00, 0xE0, 0x0C, 0x00, 0x38, 0x38, 0x00, 0x08, 0x60, 0x00,\n    0x08, 0x40, // 198\n    0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00, 0x08, 0x42, 0x00,\n    0x10, 0x22, 0x00, 0xE0, 0x1D, // 199\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0xF8, 0x7F, // 200\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x20, 0x00, 0x01, 0x10, 0x00, 0x02, 0x08, 0x00, 0x02, 0x04, 0x00, 0x02, 0x02, 0x00,\n    0x01, 0x01, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0xF8, 0x7F, // 201\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00, 0x40, 0x04, 0x00, 0x20, 0x08, 0x00, 0x10, 0x10, 0x00,\n    0x08, 0x20, 0x00, 0x08, 0x40, // 202\n    0x00, 0x40, 0x00, 0x00, 0x60, 0x00, 0xF0, 0x3F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0xF8, 0x7F, // 203\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x10, 0x00,\n    0x00, 0x0C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 204\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,\n    0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xF8, 0x7F, // 205\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 206\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, // 207\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x10, 0x01, 0x00, 0xE0, // 208\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 209\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, // 210\n    0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0xE0, 0x80, 0x00, 0x80, 0x83, 0x00, 0x00, 0xE6, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x07, 0x00,\n    0xC0, 0x01, 0x00, 0x60, 0x00, 0x00, 0x18, // 211\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x60, 0x18, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0xF8, 0x7F, 0x00,\n    0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0x60, 0x18, 0x00, 0xC0, 0x0F, // 212\n    0x08, 0x40, 0x00, 0x08, 0x20, 0x00, 0x10, 0x10, 0x00, 0x60, 0x0C, 0x00, 0x80, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00,\n    0x60, 0x0C, 0x00, 0x10, 0x10, 0x00, 0x08, 0x20, 0x00, 0x08, 0x40, // 213\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0xC0, 0x01, // 214\n    0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x04, 0x00, 0xF8, 0x7F, // 215\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, // 216\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0xC0,\n    0x01, // 217\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x63, 0x00, 0x00, 0x3E, // 218\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x63, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F, // 219\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x63, 0x00, 0x00, 0x3E, // 220\n    0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x10, 0x61, 0x00, 0x10, 0x31, 0x00, 0xE0, 0x1F, // 221\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x80, 0x0F, 0x00, 0xE0, 0x18, 0x00,\n    0x30, 0x30, 0x00, 0x18, 0x60, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x18, 0x60, 0x00, 0x30, 0x30, 0x00, 0xE0, 0x18, 0x00,\n    0x80, 0x0F, // 222\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x61, 0x00, 0x18, 0x13, 0x00, 0x08, 0x0A, 0x00, 0x08, 0x06, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0xF8, 0x7F, // 223\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 224\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x30, 0x73, 0x00, 0x90, 0x40, 0x00, 0x90, 0x40, 0x00, 0x90, 0x40, 0x00, 0x98, 0x61, 0x00,\n    0x18, 0x3F, 0x00, 0x00, 0x0C,                                                                                           // 225\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0xC0, 0x6E, 0x00, 0x80, 0x3B, // 226\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40,                         // 227\n    0x00, 0xC0, 0x01, 0x00, 0x70, 0x00, 0x80, 0x5F, 0x00, 0xC0, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00,\n    0xC0, 0x7F, 0x00, 0x00, 0xC0, 0x01, // 228\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17, // 229\n    0x40, 0x40, 0x00, 0xC0, 0x70, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x04, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x0E, 0x00, 0x00, 0x3B, 0x00, 0xC0, 0x60, 0x00, 0x40, 0x40,                                     // 230\n    0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x3B, // 231\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00,\n    0xC0, 0x7F, // 232\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0x20, 0x08, 0x00, 0x20, 0x04, 0x00, 0x10, 0x02, 0x00,\n    0xC0, 0x7F,                                                                                                             // 233\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1B, 0x00, 0xC0, 0x70, 0x00, 0x40, 0x40, // 234\n    0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x80, 0x7F, 0x00, 0xC0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00,\n    0xC0, 0x7F, // 235\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x38, 0x00,\n    0xC0, 0x07, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x7F, // 236\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n    0xC0, 0x7F, // 237\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 238\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00,\n    0xC0, 0x7F, // 239\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x80, 0x60, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F,                                                                                                             // 240\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, // 241\n    0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40,       // 242\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x00, 0xC0, 0x01, 0x00, 0x78, 0x00, 0x00, 0x07, 0x00, 0xC0,       // 243\n    0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0xC0, 0x60, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0xC0, 0x60, 0x00, 0xE0, 0xFF, 0x03,\n    0xC0, 0x60, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0xC0, 0x60, 0x00, 0x80, 0x3F, // 244\n    0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00,\n    0x40, 0x40, // 245\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0xC0, 0x7F, 0x00, 0x00, 0xC0,                                                                                           // 246\n    0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0xC0, 0x7F, // 247\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, // 248\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xC0, // 249\n    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00,\n    0x00, 0x64, 0x00, 0x00, 0x38, // 250\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x6C, 0x00,\n    0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, // 251\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x6C, 0x00,\n    0x00, 0x38,                                                                                                             // 252\n    0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x80, 0x20, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0xC0, 0x24, 0x00, 0x80, 0x1F, // 253\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1E, 0x00, 0x80, 0x33, 0x00, 0xC0, 0x60, 0x00,\n    0x40, 0x40, 0x00, 0xC0, 0x60, 0x00, 0x80, 0x31, 0x00, 0x00, 0x1F, // 254\n    0x00, 0x00, 0x00, 0x80, 0x43, 0x00, 0xC0, 0x7A, 0x00, 0x40, 0x0C, 0x00, 0x40, 0x04, 0x00, 0x40, 0x04, 0x00, 0xC0, 0x06, 0x00,\n    0xC0, 0x7F, // 255\n};\n\n// Font generated or edited with the glyphEditor (@mrekin)\nconst uint8_t ArialMT_Plain_24_RU[] PROGMEM = {\n    0x18, // Width: 24\n    0x1C, // Height: 28\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x07, // 32\n    0x00, 0x00, 0x13, 0x08, // 33\n    0x00, 0x13, 0x1A, 0x09, // 34\n    0x00, 0x2D, 0x33, 0x0D, // 35\n    0x00, 0x60, 0x2F, 0x0D, // 36\n    0x00, 0x8F, 0x4F, 0x15, // 37\n    0x00, 0xDE, 0x3B, 0x10, // 38\n    0x01, 0x19, 0x0A, 0x05, // 39\n    0x01, 0x23, 0x1C, 0x08, // 40\n    0x01, 0x3F, 0x1B, 0x08, // 41\n    0x01, 0x5A, 0x21, 0x09, // 42\n    0x01, 0x7B, 0x32, 0x0E, // 43\n    0x01, 0xAD, 0x10, 0x07, // 44\n    0x01, 0xBD, 0x1B, 0x08, // 45\n    0x01, 0xD8, 0x0F, 0x07, // 46\n    0x01, 0xE7, 0x19, 0x07, // 47\n    0x02, 0x00, 0x2F, 0x0D, // 48\n    0x02, 0x2F, 0x23, 0x0D, // 49\n    0x02, 0x52, 0x2F, 0x0D, // 50\n    0x02, 0x81, 0x2F, 0x0D, // 51\n    0x02, 0xB0, 0x2F, 0x0D, // 52\n    0x02, 0xDF, 0x2F, 0x0D, // 53\n    0x03, 0x0E, 0x2F, 0x0D, // 54\n    0x03, 0x3D, 0x2D, 0x0D, // 55\n    0x03, 0x6A, 0x2F, 0x0D, // 56\n    0x03, 0x99, 0x2F, 0x0D, // 57\n    0x03, 0xC8, 0x0F, 0x07, // 58\n    0x03, 0xD7, 0x10, 0x07, // 59\n    0x03, 0xE7, 0x2F, 0x0E, // 60\n    0x04, 0x16, 0x2F, 0x0E, // 61\n    0x04, 0x45, 0x2E, 0x0E, // 62\n    0x04, 0x73, 0x2E, 0x0D, // 63\n    0x04, 0xA1, 0x5B, 0x18, // 64\n    0x04, 0xFC, 0x3B, 0x0F, // 65\n    0x05, 0x37, 0x3B, 0x10, // 66\n    0x05, 0x72, 0x3F, 0x11, // 67\n    0x05, 0xB1, 0x3F, 0x11, // 68\n    0x05, 0xF0, 0x3B, 0x10, // 69\n    0x06, 0x2B, 0x35, 0x0F, // 70\n    0x06, 0x60, 0x43, 0x13, // 71\n    0x06, 0xA3, 0x3B, 0x11, // 72\n    0x06, 0xDE, 0x0F, 0x06, // 73\n    0x06, 0xED, 0x27, 0x0C, // 74\n    0x07, 0x14, 0x3F, 0x10, // 75\n    0x07, 0x53, 0x2F, 0x0D, // 76\n    0x07, 0x82, 0x43, 0x13, // 77\n    0x07, 0xC5, 0x3B, 0x11, // 78\n    0x08, 0x00, 0x47, 0x13, // 79\n    0x08, 0x47, 0x3A, 0x10, // 80\n    0x08, 0x81, 0x47, 0x13, // 81\n    0x08, 0xC8, 0x3F, 0x11, // 82\n    0x09, 0x07, 0x3B, 0x10, // 83\n    0x09, 0x42, 0x35, 0x0E, // 84\n    0x09, 0x77, 0x3B, 0x11, // 85\n    0x09, 0xB2, 0x39, 0x0F, // 86\n    0x09, 0xEB, 0x59, 0x17, // 87\n    0x0A, 0x44, 0x3B, 0x0F, // 88\n    0x0A, 0x7F, 0x3D, 0x10, // 89\n    0x0A, 0xBC, 0x37, 0x0F, // 90\n    0x0A, 0xF3, 0x14, 0x07, // 91\n    0x0B, 0x07, 0x1B, 0x07, // 92\n    0x0B, 0x22, 0x18, 0x07, // 93\n    0x0B, 0x3A, 0x2A, 0x0C, // 94\n    0x0B, 0x64, 0x34, 0x0D, // 95\n    0x0B, 0x98, 0x11, 0x08, // 96\n    0x0B, 0xA9, 0x2F, 0x0D, // 97\n    0x0B, 0xD8, 0x33, 0x0E, // 98\n    0x0C, 0x0B, 0x2B, 0x0C, // 99\n    0x0C, 0x36, 0x2F, 0x0E, // 100\n    0x0C, 0x65, 0x2F, 0x0D, // 101\n    0x0C, 0x94, 0x1A, 0x07, // 102\n    0x0C, 0xAE, 0x2F, 0x0E, // 103\n    0x0C, 0xDD, 0x2F, 0x0E, // 104\n    0x0D, 0x0C, 0x0F, 0x05, // 105\n    0x0D, 0x1B, 0x10, 0x06, // 106\n    0x0D, 0x2B, 0x2F, 0x0C, // 107\n    0x0D, 0x5A, 0x0F, 0x06, // 108\n    0x0D, 0x69, 0x47, 0x14, // 109\n    0x0D, 0xB0, 0x2F, 0x0E, // 110\n    0x0D, 0xDF, 0x2F, 0x0D, // 111\n    0x0E, 0x0E, 0x33, 0x0E, // 112\n    0x0E, 0x41, 0x30, 0x0E, // 113\n    0x0E, 0x71, 0x1E, 0x08, // 114\n    0x0E, 0x8F, 0x2B, 0x0C, // 115\n    0x0E, 0xBA, 0x1B, 0x07, // 116\n    0x0E, 0xD5, 0x2F, 0x0E, // 117\n    0x0F, 0x04, 0x2A, 0x0B, // 118\n    0x0F, 0x2E, 0x42, 0x11, // 119\n    0x0F, 0x70, 0x2B, 0x0B, // 120\n    0x0F, 0x9B, 0x2A, 0x0C, // 121\n    0x0F, 0xC5, 0x2B, 0x0C, // 122\n    0x0F, 0xF0, 0x1C, 0x08, // 123\n    0x10, 0x0C, 0x10, 0x06, // 124\n    0x10, 0x1C, 0x1B, 0x08, // 125\n    0x10, 0x37, 0x32, 0x0E, // 126\n    0xFF, 0xFF, 0x00, 0x18, // 127\n    0xFF, 0xFF, 0x00, 0x18, // 128\n    0xFF, 0xFF, 0x00, 0x18, // 129\n    0xFF, 0xFF, 0x00, 0x18, // 130\n    0xFF, 0xFF, 0x00, 0x18, // 131\n    0xFF, 0xFF, 0x00, 0x18, // 132\n    0xFF, 0xFF, 0x00, 0x18, // 133\n    0xFF, 0xFF, 0x00, 0x18, // 134\n    0xFF, 0xFF, 0x00, 0x18, // 135\n    0xFF, 0xFF, 0x00, 0x18, // 136\n    0xFF, 0xFF, 0x00, 0x18, // 137\n    0xFF, 0xFF, 0x00, 0x18, // 138\n    0xFF, 0xFF, 0x00, 0x18, // 139\n    0xFF, 0xFF, 0x00, 0x18, // 140\n    0xFF, 0xFF, 0x00, 0x18, // 141\n    0xFF, 0xFF, 0x00, 0x18, // 142\n    0xFF, 0xFF, 0x00, 0x18, // 143\n    0xFF, 0xFF, 0x00, 0x18, // 144\n    0xFF, 0xFF, 0x00, 0x18, // 145\n    0xFF, 0xFF, 0x00, 0x18, // 146\n    0xFF, 0xFF, 0x00, 0x18, // 147\n    0xFF, 0xFF, 0x00, 0x18, // 148\n    0xFF, 0xFF, 0x00, 0x18, // 149\n    0xFF, 0xFF, 0x00, 0x18, // 150\n    0xFF, 0xFF, 0x00, 0x18, // 151\n    0xFF, 0xFF, 0x00, 0x18, // 152\n    0xFF, 0xFF, 0x00, 0x18, // 153\n    0xFF, 0xFF, 0x00, 0x18, // 154\n    0xFF, 0xFF, 0x00, 0x18, // 155\n    0xFF, 0xFF, 0x00, 0x18, // 156\n    0xFF, 0xFF, 0x00, 0x18, // 157\n    0xFF, 0xFF, 0x00, 0x18, // 158\n    0xFF, 0xFF, 0x00, 0x18, // 159\n    0xFF, 0xFF, 0x00, 0x07, // 160\n    0x10, 0x69, 0x14, 0x08, // 161\n    0x10, 0x7D, 0x2B, 0x0D, // 162\n    0x10, 0xA8, 0x2F, 0x0D, // 163\n    0x10, 0xD7, 0x33, 0x0D, // 164\n    0x11, 0x0A, 0x31, 0x0D, // 165\n    0x11, 0x3B, 0x10, 0x06, // 166\n    0x11, 0x4B, 0x2F, 0x0D, // 167\n    0x11, 0x7A, 0x3B, 0x10, // 168\n    0x11, 0xB5, 0x46, 0x12, // 169\n    0x11, 0xFB, 0x1A, 0x09, // 170\n    0x12, 0x15, 0x27, 0x0D, // 171\n    0x12, 0x3C, 0x2F, 0x0E, // 172\n    0x12, 0x6B, 0x1B, 0x08, // 173\n    0x12, 0x86, 0x46, 0x12, // 174\n    0x12, 0xCC, 0x31, 0x0D, // 175\n    0x12, 0xFD, 0x1E, 0x0A, // 176\n    0x13, 0x1B, 0x33, 0x0D, // 177\n    0x13, 0x4E, 0x1A, 0x08, // 178\n    0x13, 0x68, 0x1A, 0x08, // 179\n    0x13, 0x82, 0x19, 0x08, // 180\n    0x13, 0x9B, 0x2F, 0x0E, // 181\n    0x13, 0xCA, 0x31, 0x0D, // 182\n    0x13, 0xFB, 0x12, 0x08, // 183\n    0x14, 0x0D, 0x2F, 0x0D, // 184\n    0x14, 0x3C, 0x16, 0x08, // 185\n    0x14, 0x52, 0x1E, 0x09, // 186\n    0x14, 0x70, 0x2E, 0x0D, // 187\n    0x14, 0x9E, 0x4F, 0x14, // 188\n    0x14, 0xED, 0x4B, 0x14, // 189\n    0x15, 0x38, 0x4B, 0x14, // 190\n    0x15, 0x83, 0x3B, 0x12, // 191\n    0x15, 0xBE, 0x3B, 0x0F, // 192\n    0x15, 0xF9, 0x3B, 0x10, // 193\n    0x16, 0x34, 0x3B, 0x10, // 194\n    0x16, 0x6F, 0x31, 0x0D, // 195\n    0x16, 0xA0, 0x3C, 0x10, // 196\n    0x16, 0xDC, 0x3B, 0x10, // 197\n    0x17, 0x17, 0x57, 0x16, // 198\n    0x17, 0x6E, 0x33, 0x0F, // 199\n    0x17, 0xA1, 0x3B, 0x11, // 200\n    0x17, 0xDC, 0x3B, 0x11, // 201\n    0x18, 0x17, 0x37, 0x0E, // 202\n    0x18, 0x4E, 0x37, 0x10, // 203\n    0x18, 0x85, 0x43, 0x13, // 204\n    0x18, 0xC8, 0x3B, 0x11, // 205\n    0x19, 0x03, 0x47, 0x13, // 206\n    0x19, 0x4A, 0x3B, 0x11, // 207\n    0x19, 0x85, 0x3A, 0x10, // 208\n    0x19, 0xBF, 0x3F, 0x11, // 209\n    0x19, 0xFE, 0x35, 0x0E, // 210\n    0x1A, 0x33, 0x39, 0x0F, // 211\n    0x1A, 0x6C, 0x42, 0x12, // 212\n    0x1A, 0xAE, 0x3B, 0x0F, // 213\n    0x1A, 0xE9, 0x43, 0x12, // 214\n    0x1B, 0x2C, 0x37, 0x10, // 215\n    0x1B, 0x63, 0x4F, 0x16, // 216\n    0x1B, 0xB2, 0x58, 0x17, // 217\n    0x1C, 0x0A, 0x47, 0x13, // 218\n    0x1C, 0x51, 0x4B, 0x15, // 219\n    0x1C, 0x9C, 0x3B, 0x10, // 220\n    0x1C, 0xD7, 0x3F, 0x11, // 221\n    0x1D, 0x16, 0x5B, 0x18, // 222\n    0x1D, 0x71, 0x3B, 0x11, // 223\n    0x1D, 0xAC, 0x2F, 0x0D, // 224\n    0x1D, 0xDB, 0x33, 0x0E, // 225\n    0x1E, 0x0E, 0x2F, 0x0D, // 226\n    0x1E, 0x3D, 0x22, 0x09, // 227\n    0x1E, 0x5F, 0x33, 0x0E, // 228\n    0x1E, 0x92, 0x2F, 0x0D, // 229\n    0x1E, 0xC1, 0x3F, 0x10, // 230\n    0x1F, 0x00, 0x27, 0x0B, // 231\n    0x1F, 0x27, 0x2F, 0x0D, // 232\n    0x1F, 0x56, 0x2F, 0x0D, // 233\n    0x1F, 0x85, 0x27, 0x0B, // 234\n    0x1F, 0xAC, 0x2F, 0x0E, // 235\n    0x1F, 0xDB, 0x3B, 0x11, // 236\n    0x20, 0x16, 0x2F, 0x0D, // 237\n    0x20, 0x45, 0x2F, 0x0D, // 238\n    0x20, 0x74, 0x2B, 0x0D, // 239\n    0x20, 0x9F, 0x33, 0x0E, // 240\n    0x20, 0xD2, 0x2B, 0x0C, // 241\n    0x20, 0xFD, 0x2A, 0x0B, // 242\n    0x21, 0x27, 0x2A, 0x0C, // 243\n    0x21, 0x51, 0x4B, 0x14, // 244\n    0x21, 0x9C, 0x2B, 0x0B, // 245\n    0x21, 0xC7, 0x33, 0x0E, // 246\n    0x21, 0xFA, 0x2B, 0x0D, // 247\n    0x22, 0x25, 0x47, 0x13, // 248\n    0x22, 0x6C, 0x4B, 0x14, // 249\n    0x22, 0xB7, 0x37, 0x0F, // 250\n    0x22, 0xEE, 0x3B, 0x11, // 251\n    0x23, 0x29, 0x2F, 0x0D, // 252\n    0x23, 0x58, 0x2B, 0x0C, // 253\n    0x23, 0x83, 0x43, 0x12, // 254\n    0x23, 0xC6, 0x2B, 0x0D, // 255\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x33, 0x00, 0xE0, 0xFF, 0x33, // 33\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,\n    0x07, 0x00, 0x00, 0xE0, 0x07, // 34\n    0x00, 0x0C, 0x03, 0x00, 0x00, 0x0C, 0x33, 0x00, 0x00, 0x0C, 0x3F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0xE0,\n    0x0F, 0x03, 0x00, 0x60, 0x0C, 0x33, 0x00, 0x00, 0x0C, 0x3F, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0x80, 0xFF, 0x03, 0x00, 0xE0, 0x0F,\n    0x03, 0x00, 0x60, 0x0C, 0x03, 0x00, 0x00, 0x0C, 0x03, // 35\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x06, 0x00, 0xC0, 0x0F, 0x1E, 0x00, 0xC0, 0x18, 0x1C, 0x00, 0x60, 0x18, 0x38, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0xF0, 0xFF, 0xFF, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x60, 0x30, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xC1,\n    0x1F, 0x00, 0x80, 0x81, 0x07, // 36\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20,\n    0x20, 0x20, 0x00, 0x60, 0x30, 0x38, 0x00, 0xC0, 0x1F, 0x1E, 0x00, 0x80, 0x8F, 0x0F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0,\n    0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x8F, 0x0F, 0x00, 0xC0, 0xC3, 0x1F, 0x00, 0xE0, 0x60, 0x30, 0x00, 0x60, 0x20, 0x20,\n    0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x0F, // 37\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x80, 0xE3, 0x1C, 0x00, 0xC0, 0x7F, 0x30, 0x00, 0xE0,\n    0x3C, 0x30, 0x00, 0x60, 0x38, 0x30, 0x00, 0x60, 0x78, 0x30, 0x00, 0xE0, 0xEC, 0x38, 0x00, 0xC0, 0x8F, 0x1B, 0x00, 0x80, 0x03,\n    0x1F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x80, 0x38, 0x00, 0x00, 0x00, 0x10, // 38\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07,                                           // 39\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0xFE, 0x7F, 0x00, 0x80, 0x0F, 0xF0, 0x01, 0xC0, 0x01, 0x80, 0x03, 0x60,\n    0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x04, // 40\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x06, 0xC0, 0x01, 0x80, 0x03, 0x80, 0x0F, 0xF0, 0x01, 0x00,\n    0xFE, 0x7F, 0x00, 0x00, 0xF0, 0x0F, // 41\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x80, // 42\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n    0x60, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0x0F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,                                                 // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0xF0, 0x01, // 44\n    0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01,                                                       // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 46\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x60, // 47\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x80, 0xFF, 0x1F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0xFF,\n    0x0F, 0x00, 0x00, 0xFE, 0x03, // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 49\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0xC0, 0x03, 0x38, 0x00, 0xC0, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x36, 0x00, 0x60,\n    0x00, 0x33, 0x00, 0x60, 0x80, 0x33, 0x00, 0x60, 0xC0, 0x31, 0x00, 0x60, 0x60, 0x30, 0x00, 0xC0, 0x30, 0x30, 0x00, 0xC0, 0x1F,\n    0x30, 0x00, 0x00, 0x0F, 0x30, // 50\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0xC0, 0x01, 0x0E, 0x00, 0xC0, 0x00, 0x1C, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0xC0, 0x38, 0x30, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0x80, 0xC7,\n    0x0F, 0x00, 0x00, 0x80, 0x07, // 51\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x3C, 0x03, 0x00, 0x00,\n    0x0E, 0x03, 0x00, 0x80, 0x07, 0x03, 0x00, 0xC0, 0x01, 0x03, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x00, 0x03, // 52\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x80, 0x3F, 0x1E, 0x00, 0xE0, 0x1F, 0x18, 0x00, 0x60, 0x08, 0x30, 0x00, 0x60,\n    0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x18, 0x1C, 0x00, 0x60, 0xF0,\n    0x0F, 0x00, 0x00, 0xE0, 0x03, // 53\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x03, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x63, 0x1C, 0x00, 0xC0, 0x30, 0x38, 0x00, 0x60,\n    0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0x60, 0x18, 0x30, 0x00, 0xE0, 0x30, 0x18, 0x00, 0xC0, 0xF1,\n    0x0F, 0x00, 0x80, 0xC1, 0x07, // 54\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60,\n    0x80, 0x3F, 0x00, 0x60, 0xF0, 0x03, 0x00, 0x60, 0x78, 0x00, 0x00, 0x60, 0x0E, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0xE0, 0x01,\n    0x00, 0x00, 0x60, // 55\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0xC0, 0x6F, 0x18, 0x00, 0xE0, 0x38, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0xE0, 0x38, 0x30, 0x00, 0xC0, 0x7F, 0x18, 0x00, 0x80, 0xC7,\n    0x1F, 0x00, 0x00, 0x80, 0x07, // 56\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x0C, 0x00, 0x80, 0x7F, 0x1C, 0x00, 0xC0, 0x61, 0x38, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60,\n    0xC0, 0x30, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0xC0, 0x30, 0x00, 0x60, 0x60, 0x18, 0x00, 0xC0, 0x31, 0x1E, 0x00, 0x80, 0xFF,\n    0x0F, 0x00, 0x00, 0xFE, 0x01,                                                                   // 57\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30,       // 58\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x03, 0x00, 0x06, 0xF0, 0x01, // 59\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00,\n    0xD8, 0x00, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06,\n    0x03, 0x00, 0x00, 0x03, 0x06, // 60\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00,\n    0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x8C,\n    0x01, 0x00, 0x00, 0x8C, 0x01, // 61\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00,\n    0x8C, 0x01, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x70,\n    0x00, 0x00, 0x00, 0x20, // 62\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60,\n    0x80, 0x33, 0x00, 0x60, 0xC0, 0x33, 0x00, 0x60, 0xE0, 0x00, 0x00, 0xE0, 0x30, 0x00, 0x00, 0xC0, 0x38, 0x00, 0x00, 0xC0, 0x1F,\n    0x00, 0x00, 0x00, 0x07, // 63\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0x1E, 0xF0, 0x00, 0x00, 0x07, 0xC0, 0x01, 0x80,\n    0xC3, 0x87, 0x01, 0xC0, 0xF1, 0x9F, 0x03, 0xC0, 0x38, 0x18, 0x03, 0xC0, 0x0C, 0x30, 0x03, 0x60, 0x0E, 0x30, 0x06, 0x60, 0x06,\n    0x30, 0x06, 0x60, 0x06, 0x18, 0x06, 0x60, 0x06, 0x1C, 0x06, 0x60, 0x0C, 0x1E, 0x06, 0x60, 0xF8, 0x3F, 0x06, 0xE0, 0xFE, 0x31,\n    0x06, 0xC0, 0x0E, 0x30, 0x06, 0xC0, 0x01, 0x18, 0x03, 0x80, 0x03, 0x1C, 0x03, 0x00, 0x07, 0x8F, 0x01, 0x00, 0xFE, 0x87, 0x01,\n    0x00, 0xF8, 0xC1, 0x00, 0x00, 0x00, 0x40, // 64\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80,\n    0x8F, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0x00, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 65\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0xC0, 0x78, 0x30, 0x00, 0xC0, 0xFF, 0x18, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0x00, 0x80, 0x07, // 66\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02,\n    0x03, // 67\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0xE0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0E, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC,\n    0x01, // 68\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 69\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30,\n    0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, // 70\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x60,\n    0x30, 0x00, 0x60, 0x60, 0x30, 0x00, 0xE0, 0x60, 0x38, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0x61, 0x18, 0x00, 0x80, 0xE3, 0x0F,\n    0x00, 0x00, 0xE2, 0x0F, // 71\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 72\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F,             // 73\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F, // 74\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00,\n    0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xE7, 0x01, 0x00, 0x80, 0x83,\n    0x07, 0x00, 0xC0, 0x01, 0x0F, 0x00, 0xE0, 0x00, 0x1E, 0x00, 0x60, 0x00, 0x38, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x20, // 75\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, // 76\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0,\n    0x0F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x3F, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x3F,\n    0x00, 0xE0, 0xFF, 0x3F, // 77\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80,\n    0x07, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 78\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 79\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,\n    0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,\n    0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0x0F, // 80\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x36, 0x00, 0x60, 0x00, 0x36, 0x00, 0xE0, 0x00, 0x3C, 0x00, 0xC0, 0x00, 0x1C, 0x00, 0xC0, 0x01, 0x3C, 0x00, 0x80, 0x07, 0x3F,\n    0x00, 0x00, 0xFF, 0x77, 0x00, 0x00, 0xFC, 0x61, // 81\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x70, 0x00, 0x00, 0x60, 0xF0, 0x00, 0x00, 0x60, 0xF0,\n    0x03, 0x00, 0x60, 0xB0, 0x07, 0x00, 0xE0, 0x18, 0x1F, 0x00, 0xC0, 0x1F, 0x3C, 0x00, 0x80, 0x0F, 0x30, 0x00, 0x00, 0x00,\n    0x20, // 82\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x0F, 0x00, 0xC0, 0x1F, 0x1C, 0x00, 0xC0, 0x18, 0x18, 0x00, 0x60,\n    0x38, 0x38, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x70, 0x30, 0x00, 0x60, 0x70,\n    0x30, 0x00, 0xC0, 0x60, 0x18, 0x00, 0xC0, 0xE1, 0x1C, 0x00, 0x80, 0xC3, 0x0F, 0x00, 0x00, 0x83, 0x07, // 83\n    0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 84\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x07, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1C, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, 0x07, // 85\n    0x20, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00,\n    0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF8,\n    0x01, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x20, // 86\n    0x60, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x80, 0xFF, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xE0, 0x03,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xE0, 0x0F,\n    0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x80, 0xFF, 0x00, 0x00,\n    0xE0, 0x07, 0x00, 0x00, 0x60, // 87\n    0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x30, 0x00, 0x60, 0x00, 0x3C, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0xC0, 0x83, 0x0F, 0x00, 0x00,\n    0xCF, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80, 0xCF, 0x03, 0x00, 0xC0, 0x83,\n    0x07, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x20, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, // 88\n    0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x1E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E,\n    0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, // 89\n    0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x38, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x37, 0x00, 0x60, 0x80, 0x33, 0x00, 0x60,\n    0xC0, 0x31, 0x00, 0x60, 0xE0, 0x30, 0x00, 0x60, 0x38, 0x30, 0x00, 0x60, 0x1C, 0x30, 0x00, 0x60, 0x0E, 0x30, 0x00, 0x60, 0x07,\n    0x30, 0x00, 0xE0, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30,                                           // 90\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, // 91\n    0x60, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00,\n    0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 92\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, 0xE0, 0xFF, 0xFF, 0x07, 0xE0,\n    0xFF, 0xFF, 0x07, // 93\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xE0,\n    0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,\n    0x20, // 94\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00,\n    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,                                           // 95\n    0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x80, // 96\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00,\n    0x86, 0x31, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x18, 0x00, 0x00, 0xCE, 0x1C, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 97\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00,\n    0x0C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C,\n    0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, // 98\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x18, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x18,\n    0x0C, // 99\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0xE0, 0xFF,\n    0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xCC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04, // 101\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x06, 0x00, 0x00, 0x60,\n    0x06, 0x00, 0x00, 0x60, 0x06, // 102\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x83, 0x01, 0x00, 0xF8, 0x8F, 0x03, 0x00, 0x1C, 0x1C, 0x07, 0x00, 0x0E, 0x38, 0x06, 0x00,\n    0x06, 0x30, 0x06, 0x00, 0x06, 0x30, 0x06, 0x00, 0x06, 0x30, 0x06, 0x00, 0x0C, 0x18, 0x07, 0x00, 0x18, 0x8C, 0x03, 0x00, 0xFE,\n    0xFF, 0x03, 0x00, 0xFE, 0xFF, // 103\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xF8, 0x3F,                                                                   // 104\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xFE, 0x3F, 0x00, 0x60, 0xFE, 0x3F,       // 105\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x60, 0xFE, 0xFF, 0x07, 0x60, 0xFE, 0xFF, 0x03, // 106\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xE0, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x98, 0x07, 0x00, 0x00, 0x0C, 0x0F, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x02,\n    0x30, 0x00, 0x00, 0x00, 0x20,                                                             // 107\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 108\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00,\n    0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xF8, 0x3F, // 109\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xF8, 0x3F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 111\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x18, 0x0C, 0x00, 0x00,\n    0x0C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C,\n    0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, // 112\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0xFE,\n    0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, // 113\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, // 114\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0C, 0x00, 0x00, 0x7C, 0x1C, 0x00, 0x00, 0xEE, 0x38, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x31, 0x00, 0x00, 0xC6, 0x31, 0x00, 0x00, 0x8E, 0x39, 0x00, 0x00, 0x9C, 0x1F, 0x00, 0x00, 0x18,\n    0x0F, // 115\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, // 116\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 117\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00,\n    0x00, 0x38, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,\n    0x06, // 118\n    0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00,\n    0x80, 0x1F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x7E, 0x00,\n    0x00, 0x00, 0x0E, // 119\n    0x00, 0x02, 0x20, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00,\n    0xC0, 0x01, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x02,\n    0x20, // 120\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0x00, 0xF0, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x07, 0x00,\n    0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,\n    0x06, // 121\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x3C, 0x00, 0x00, 0x06, 0x3E, 0x00, 0x00, 0x06, 0x37, 0x00, 0x00,\n    0xC6, 0x33, 0x00, 0x00, 0xE6, 0x30, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x3E, 0x30, 0x00, 0x00, 0x1E, 0x30, 0x00, 0x00, 0x06,\n    0x30, // 122\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x03, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0xE0, 0x3F, 0xFC, 0x07, 0x60,\n    0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06,                                                       // 123\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0xE0, 0xFF, 0xFF, 0x0F, // 124\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x06, 0xE0, 0x3F, 0xFC, 0x07, 0xC0, 0xFF, 0xFF, 0x03, 0x00,\n    0xC0, 0x03, 0x00, 0x00, 0x80, 0x01, // 125\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60,                                                                         // 126\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0xFF, 0x07, 0x00, 0xE6, 0xFF, 0x07, // 161\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x9C, 0x07, 0x00, 0x0E, 0x78, 0x00, 0x00,\n    0x06, 0x3F, 0x00, 0x00, 0xE6, 0x30, 0x00, 0x00, 0x1E, 0x30, 0x00, 0xE0, 0x0D, 0x18, 0x00, 0x00, 0x1C, 0x0E, 0x00, 0x00, 0x10,\n    0x06, // 162\n    0x00, 0x60, 0x10, 0x00, 0x00, 0x60, 0x38, 0x00, 0x80, 0x7F, 0x1C, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0xE0, 0x19, 0x00, 0x60,\n    0x60, 0x18, 0x00, 0x60, 0x60, 0x18, 0x00, 0x60, 0x60, 0x30, 0x00, 0xE0, 0x00, 0x30, 0x00, 0xC0, 0x01, 0x30, 0x00, 0x80, 0x01,\n    0x38, 0x00, 0x00, 0x00, 0x10, // 163\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0xF7, 0x0E, 0x00, 0x00, 0xFE, 0x07, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00,\n    0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x0C, 0x03, 0x00, 0x00, 0xFE,\n    0x07, 0x00, 0x00, 0xF7, 0x0E, 0x00, 0x00, 0x02, 0x04, // 164\n    0xE0, 0x60, 0x06, 0x00, 0xC0, 0x61, 0x06, 0x00, 0x80, 0x67, 0x06, 0x00, 0x00, 0x6E, 0x06, 0x00, 0x00, 0x7C, 0x06, 0x00, 0x00,\n    0xF0, 0x3F, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x7C, 0x06, 0x00, 0x00, 0x7E, 0x06, 0x00, 0x80, 0x67, 0x06, 0x00, 0xC0, 0x61,\n    0x06, 0x00, 0xE0, 0x60, 0x06, 0x00, 0x20,                                                       // 165\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0xF8, 0x0F, 0xE0, 0x7F, 0xF8, 0x0F, // 166\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x80, 0xF3, 0xC1, 0x00, 0xC0, 0x1F, 0xC3, 0x03, 0xE0, 0x0C, 0x07, 0x03, 0x60,\n    0x1C, 0x06, 0x06, 0x60, 0x18, 0x0C, 0x06, 0x60, 0x30, 0x1C, 0x06, 0xE0, 0x70, 0x38, 0x07, 0xC0, 0xE1, 0xF4, 0x03, 0x80, 0xC1,\n    0xE7, 0x01, 0x00, 0x80, 0x03, // 167\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x6C,\n    0x30, 0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x6C, 0x30,\n    0x30, 0x00, 0x6C, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 168\n    0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x80, 0x01, 0x0C, 0x00, 0xC0, 0x78, 0x1C, 0x00, 0xC0,\n    0xFE, 0x19, 0x00, 0x60, 0x86, 0x31, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03, 0x33, 0x00, 0x60, 0x03,\n    0x33, 0x00, 0x60, 0x87, 0x33, 0x00, 0xC0, 0x86, 0x19, 0x00, 0xC0, 0x85, 0x1C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x07, 0x07,\n    0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, // 169\n    0x00, 0x00, 0x00, 0x00, 0xC0, 0x1C, 0x00, 0x00, 0xE0, 0x3E, 0x00, 0x00, 0x60, 0x32, 0x00, 0x00, 0x60, 0x32, 0x00, 0x00, 0xE0,\n    0x3F, 0x00, 0x00, 0xC0, 0x3F, // 170\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00,\n    0x84, 0x10, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x04, 0x10, // 171\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFC,\n    0x01, 0x00, 0x00, 0xFC, 0x01, // 172\n    0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 173\n    0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0x07, 0x07, 0x00, 0x80, 0x01, 0x0C, 0x00, 0xC0, 0x00, 0x1C, 0x00, 0xC0,\n    0xFE, 0x1B, 0x00, 0x60, 0xFE, 0x33, 0x00, 0x60, 0x66, 0x30, 0x00, 0x60, 0x66, 0x30, 0x00, 0x60, 0xE6, 0x30, 0x00, 0x60, 0xFE,\n    0x31, 0x00, 0x60, 0x3C, 0x33, 0x00, 0xC0, 0x00, 0x1A, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x07, 0x07,\n    0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xF8, // 174\n    0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C,\n    0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00,\n    0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, // 175\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20,\n    0x08, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x80, 0x03, // 176\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00,\n    0x60, 0x30, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60,\n    0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, // 177\n    0x40, 0x20, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x38, 0x00, 0x00, 0x20, 0x2C, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0xE0,\n    0x23, 0x00, 0x00, 0xC0, 0x21, // 178\n    0x40, 0x10, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0xE0,\n    0x3D, 0x00, 0x00, 0xC0, 0x1D, // 179\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x20, // 180\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xFE, 0x3F, // 181\n    0x00, 0x0F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xE0,\n    0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF,\n    0xFF, 0x07, 0x60, 0x00, 0x00, 0x00, 0x60,                                                                   // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 183\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x80, 0x9C, 0x1C, 0x00, 0x00, 0x8C, 0x30, 0x00, 0x00,\n    0x86, 0x30, 0x00, 0x00, 0x86, 0x30, 0x00, 0x00, 0x86, 0x30, 0x00, 0x00, 0x8C, 0x30, 0x00, 0x80, 0x9C, 0x18, 0x00, 0x00, 0xF8,\n    0x1C, 0x00, 0x00, 0xF0, 0x0C, // 184\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xE0,\n    0x3F, // 185\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xE0,\n    0x38, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x0F, // 186\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00,\n    0x78, 0x0F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x84, 0x10, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x78, 0x0F, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x80, // 187\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x20, 0x00, 0xE0, 0x3F, 0x38, 0x00, 0xE0,\n    0x3F, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x78,\n    0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x80, 0x07, 0x0C, 0x00, 0xC0, 0x01, 0x0E, 0x00, 0xE0, 0x80, 0x0B,\n    0x00, 0x60, 0xC0, 0x08, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x08, // 188\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x20, 0x00, 0xE0, 0x3F, 0x30, 0x00, 0xE0,\n    0x3F, 0x1C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70,\n    0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x4E, 0x20, 0x00, 0x00, 0x67, 0x30, 0x00, 0xC0, 0x21, 0x38, 0x00, 0xE0, 0x20, 0x2C,\n    0x00, 0x60, 0x20, 0x26, 0x00, 0x00, 0xE0, 0x27, 0x00, 0x00, 0xC0, 0x21, // 189\n    0x40, 0x10, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x22, 0x20, 0x00, 0x20, 0x22, 0x30, 0x00, 0xE0,\n    0x3D, 0x38, 0x00, 0xC0, 0x1D, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70,\n    0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0E, 0x0C, 0x00, 0x00, 0x07, 0x0E, 0x00, 0x80, 0x83, 0x0B, 0x00, 0xE0, 0xC0, 0x09,\n    0x00, 0x60, 0xE0, 0x3F, 0x00, 0x20, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x08, // 190\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0xF0, 0x01, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x0C, 0x03, 0x00, 0xF6, 0x07, 0x03, 0x00, 0xF6, 0x07, 0x03, 0x00, 0x00,\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x90, 0x03, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xE0, // 191\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x80,\n    0x8F, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x60, 0x80, 0x01, 0x00, 0xE0, 0x83, 0x01, 0x00, 0x80, 0x8F, 0x01, 0x00, 0x00, 0xFE,\n    0x01, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x30, // 192\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0x60, 0x60, 0x38, 0x00, 0x60, 0xE0, 0x1F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x80, 0x07, // 193\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0xC0, 0x78, 0x30, 0x00, 0xC0, 0xFF, 0x18, 0x00, 0x80, 0xC7, 0x1F, 0x00, 0x00, 0x80, 0x07, // 194\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 195\n    0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x3E, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x33, 0x00, 0xE0,\n    0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x01, // 196\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60,\n    0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x00, 0x30, // 197\n    0x60, 0x00, 0x20, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x3C, 0x00, 0xE0, 0x00, 0x1F, 0x00, 0xC0, 0x87, 0x07, 0x00, 0x00,\n    0xCF, 0x03, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF,\n    0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xFC, 0x00,\n    0x00, 0x00, 0xCF, 0x03, 0x00, 0xC0, 0x87, 0x07, 0x00, 0xE0, 0x01, 0x1F, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x38, 0x00,\n    0x60, 0x00, 0x20, // 198\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x00, 0x80, 0x03, 0x0E, 0x00, 0xC0, 0x03, 0x1C, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x78, 0x30, 0x00, 0xE0, 0x7C,\n    0x38, 0x00, 0xC0, 0xEF, 0x1F, 0x00, 0x00, 0xC7, 0x0F, // 199\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00,\n    0x00, 0x0F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x1E,\n    0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 200\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x06,\n    0x00, 0x0F, 0x00, 0x0C, 0x80, 0x03, 0x00, 0x08, 0xE0, 0x01, 0x00, 0x08, 0x70, 0x00, 0x00, 0x08, 0x3C, 0x00, 0x00, 0x0C, 0x0E,\n    0x00, 0x00, 0x86, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 201\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xCF, 0x03, 0x00, 0xC0, 0x87, 0x07, 0x00, 0xE0, 0x00,\n    0x1F, 0x00, 0x60, 0x00, 0x3C, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x20, // 202\n    0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0xE0,\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 203\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0,\n    0x0F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x0F, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F,\n    0x00, 0xE0, 0xFF, 0x3F, // 204\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 205\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0F, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0xE0, 0x00, 0x38, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F,\n    0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 206\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 207\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,\n    0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,\n    0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0x0F, // 208\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x80, 0x07, 0x0E, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0,\n    0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00,\n    0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x18, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x03, 0x0F, 0x00, 0x00, 0x02,\n    0x03, // 209\n    0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,\n    0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, // 210\n    0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x30, 0x00, 0x80, 0x07, 0x30, 0x00, 0x00, 0x1E, 0x30, 0x00, 0x00,\n    0x78, 0x30, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x7C,\n    0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x20, // 211\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x01, 0x00, 0x00, 0x8F, 0x03, 0x00, 0x00, 0x03, 0x07, 0x00, 0x80,\n    0x01, 0x06, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x80, 0x01,\n    0x0C, 0x00, 0x80, 0x01, 0x0C, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x87, 0x03, 0x00, 0x00, 0xFE, 0x01,\n    0x00, 0x00, 0xF8, // 212\n    0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x30, 0x00, 0x60, 0x00, 0x38, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0xC0, 0x83, 0x07, 0x00, 0x00,\n    0xCF, 0x03, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x80, 0xCF, 0x03, 0x00, 0xC0, 0x83,\n    0x07, 0x00, 0xE0, 0x01, 0x1E, 0x00, 0x60, 0x00, 0x38, 0x00, 0x20, 0x00, 0x30, 0x00, 0x20, 0x00, 0x20, // 213\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xF0,\n    0x00, 0x00, 0x00, 0xF0, // 214\n    0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 215\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xE0, 0xFF,\n    0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 216\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xE0, 0xFF,\n    0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xF0, 0x01,\n    0x00, 0x00, 0xF0, 0x01, // 217\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xE0,\n    0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30,\n    0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0xE0, 0x1C,\n    0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x80, 0x07, // 218\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00,\n    0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30,\n    0x30, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0xE0, 0x1C, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 219\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00,\n    0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30,\n    0x30, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0xE0, 0x1C, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x80, 0x07, // 220\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x80, 0x03, 0x0E, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x60,\n    0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30, 0x30, 0x00, 0x60, 0x30,\n    0x30, 0x00, 0xC0, 0x30, 0x18, 0x00, 0xC0, 0x30, 0x1C, 0x00, 0x80, 0x33, 0x0E, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC,\n    0x03, // 221\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n    0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x03,\n    0x1E, 0x00, 0xE0, 0x00, 0x18, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30,\n    0x00, 0x60, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0xE0, 0x00, 0x38, 0x00, 0xC0, 0x01, 0x1C, 0x00, 0x80, 0x07, 0x0F, 0x00,\n    0x00, 0xFF, 0x07, 0x00, 0x00, 0xFC, 0x01, // 222\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x30, 0x00, 0x80, 0x0F, 0x38, 0x00, 0xC0, 0x1D, 0x1E, 0x00, 0xE0,\n    0xB8, 0x0F, 0x00, 0x60, 0xF0, 0x03, 0x00, 0x60, 0xF0, 0x01, 0x00, 0x60, 0x70, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30,\n    0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x3F, // 223\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0E, 0x00, 0x00, 0x1C, 0x1F, 0x00, 0x00, 0x8C, 0x39, 0x00, 0x00, 0x86, 0x31, 0x00, 0x00,\n    0x86, 0x31, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x10, 0x00, 0x00, 0xCE, 0x18, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF8,\n    0x3F, 0x00, 0x00, 0x00, 0x20, // 224\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0xC0, 0x19, 0x1E, 0x00, 0xE0, 0x0C, 0x38, 0x00, 0x60,\n    0x0C, 0x30, 0x00, 0x60, 0x04, 0x30, 0x00, 0x60, 0x04, 0x30, 0x00, 0x60, 0x0C, 0x30, 0x00, 0x60, 0x0C, 0x38, 0x00, 0x60, 0x78,\n    0x1E, 0x00, 0x70, 0xF0, 0x0F, 0x00, 0x10, 0xC0, 0x03, // 225\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x84, 0x31, 0x00, 0x00,\n    0x84, 0x31, 0x00, 0x00, 0x84, 0x31, 0x00, 0x00, 0x84, 0x31, 0x00, 0x00, 0xCC, 0x31, 0x00, 0x00, 0xFC, 0x31, 0x00, 0x00, 0x78,\n    0x1B, 0x00, 0x00, 0x00, 0x0E, // 226\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, // 227\n    0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x30, 0x00, 0x00,\n    0x04, 0x30, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0xF0, // 228\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xCC, 0x1C, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xDC, 0x18, 0x00, 0x00, 0xF8,\n    0x0C, 0x00, 0x00, 0xF0, 0x04, // 229\n    0x00, 0x04, 0x20, 0x00, 0x00, 0x04, 0x38, 0x00, 0x00, 0x0C, 0x3C, 0x00, 0x00, 0x38, 0x0F, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00,\n    0xC0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xC0,\n    0x01, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x38, 0x0F, 0x00, 0x00, 0x0C, 0x1C, 0x00, 0x00, 0x04, 0x38, 0x00, 0x00, 0x04,\n    0x20, // 230\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1C, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x86, 0x20, 0x00, 0x00,\n    0x86, 0x20, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xFC, 0x31, 0x00, 0x00, 0x7C, 0x3F, 0x00, 0x00, 0x30, 0x1F, // 231\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,\n    0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xFC, 0x3F, // 232\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x60, 0xFC, 0x3F, 0x00, 0xC0, 0x00, 0x3C, 0x00, 0x80,\n    0x00, 0x0F, 0x00, 0x80, 0xC0, 0x03, 0x00, 0x80, 0xE0, 0x01, 0x00, 0xC0, 0x70, 0x00, 0x00, 0x60, 0x18, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xFC, 0x3F, // 233\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0xC0, 0x01, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x3C, 0x1E, 0x00, 0x00, 0x0C, 0x3C, 0x00, 0x00, 0x04, 0x30, // 234\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xFC, 0x3F, // 235\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,\n    0x78, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xE0,\n    0x03, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, // 236\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,\n    0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xFC, 0x3F, // 237\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8,\n    0x0F, 0x00, 0x00, 0xF0, 0x07, // 238\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n    0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC,\n    0x3F, // 239\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x18, 0x0C, 0x00, 0x00,\n    0x0C, 0x18, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x1C,\n    0x1C, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, // 240\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x18, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x18,\n    0x0C, // 241\n    0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00,\n    0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,\n    0x04, // 242\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x06, 0x00, 0xF0, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x07, 0x00,\n    0x00, 0xFE, 0x03, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,\n    0x06, // 243\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x18, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00,\n    0x06, 0x30, 0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x80, 0xFF, 0xFF, 0x01, 0x80, 0xFF,\n    0xFF, 0x01, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x30,\n    0x00, 0x00, 0x1C, 0x18, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x07, // 244\n    0x00, 0x02, 0x20, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00,\n    0xC0, 0x01, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x38, 0x0E, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x02,\n    0x20, // 245\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0xF0, // 246\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC,\n    0x3F, // 247\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, // 248\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00,\n    0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC,\n    0x3F, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0xF0, // 249\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00,\n    0xFC, 0x3F, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0,\n    0x30, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x0F, // 250\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00,\n    0xC0, 0x30, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x31, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x80,\n    0x1F, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, // 251\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00,\n    0xC0, 0x30, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0xC0, 0x30, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x80, 0x3B, 0x00, 0x00, 0x00,\n    0x1F, 0x00, 0x00, 0x00, 0x0E, // 252\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x1C, 0x0E, 0x00, 0x00, 0x0C, 0x1C, 0x00, 0x00, 0x06, 0x38, 0x00, 0x00,\n    0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xC6, 0x30, 0x00, 0x00, 0xCC, 0x38, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF0,\n    0x07, // 253\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,\n    0x80, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x3C, 0x1E, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x06,\n    0x30, 0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0xF8, 0x1F,\n    0x00, 0x00, 0xE0, 0x07, // 254\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x30, 0x00, 0x00, 0xFC, 0x38, 0x00, 0x00, 0xCC, 0x1D, 0x00, 0x00, 0x8C, 0x0F, 0x00, 0x00,\n    0x84, 0x03, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC,\n    0x3F, // 255\n};\n\n#endif // OLED_RU"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsRU.h",
    "content": "#ifndef OLEDDISPLAYFONTSRU_h\n#define OLEDDISPLAYFONTSRU_h\n\n#ifdef ARDUINO\n#include <Arduino.h>\n#elif __MBED__\n#define PROGMEM\n#endif\n\nextern const uint8_t ArialMT_Plain_10_RU[] PROGMEM;\nextern const uint8_t ArialMT_Plain_16_RU[] PROGMEM;\nextern const uint8_t ArialMT_Plain_24_RU[] PROGMEM;\n#endif"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsUA.cpp",
    "content": "#ifdef OLED_UA\n\n#include \"OLEDDisplayFontsUA.h\"\n\n// Font generated or edited with the glyphEditor\nconst uint8_t ArialMT_Plain_10_UA[] PROGMEM = {\n    0x0A, // Width: 10\n    0x0D, // Height: 13\n    0x20, // First char: 32\n    0xE0, // Number of chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x0A, // 32\n    0x00, 0x00, 0x04, 0x03, // 33\n    0x00, 0x04, 0x05, 0x04, // 34\n    0x00, 0x09, 0x09, 0x06, // 35\n    0x00, 0x12, 0x0A, 0x06, // 36\n    0x00, 0x1C, 0x10, 0x09, // 37\n    0x00, 0x2C, 0x0E, 0x08, // 38\n    0x00, 0x3A, 0x01, 0x02, // 39\n    0x00, 0x3B, 0x06, 0x04, // 40\n    0x00, 0x41, 0x06, 0x04, // 41\n    0x00, 0x47, 0x05, 0x04, // 42\n    0x00, 0x4C, 0x09, 0x06, // 43\n    0x00, 0x55, 0x04, 0x03, // 44\n    0x00, 0x59, 0x03, 0x03, // 45\n    0x00, 0x5C, 0x04, 0x03, // 46\n    0x00, 0x60, 0x05, 0x04, // 47\n    0x00, 0x65, 0x0A, 0x06, // 48\n    0x00, 0x6F, 0x08, 0x05, // 49\n    0x00, 0x77, 0x0A, 0x06, // 50\n    0x00, 0x81, 0x0A, 0x06, // 51\n    0x00, 0x8B, 0x0B, 0x07, // 52\n    0x00, 0x96, 0x0A, 0x06, // 53\n    0x00, 0xA0, 0x0A, 0x06, // 54\n    0x00, 0xAA, 0x09, 0x06, // 55\n    0x00, 0xB3, 0x0A, 0x06, // 56\n    0x00, 0xBD, 0x0A, 0x06, // 57\n    0x00, 0xC7, 0x04, 0x03, // 58\n    0x00, 0xCB, 0x04, 0x03, // 59\n    0x00, 0xCF, 0x0A, 0x06, // 60\n    0x00, 0xD9, 0x09, 0x06, // 61\n    0x00, 0xE2, 0x09, 0x06, // 62\n    0x00, 0xEB, 0x0B, 0x07, // 63\n    0x00, 0xF6, 0x14, 0x0B, // 64\n    0x01, 0x0A, 0x0E, 0x08, // 65\n    0x01, 0x18, 0x0C, 0x07, // 66\n    0x01, 0x24, 0x0C, 0x07, // 67\n    0x01, 0x30, 0x0B, 0x07, // 68\n    0x01, 0x3B, 0x0C, 0x07, // 69\n    0x01, 0x47, 0x09, 0x06, // 70\n    0x01, 0x50, 0x0D, 0x08, // 71\n    0x01, 0x5D, 0x0C, 0x07, // 72\n    0x01, 0x69, 0x04, 0x03, // 73\n    0x01, 0x6D, 0x08, 0x05, // 74\n    0x01, 0x75, 0x0E, 0x08, // 75\n    0x01, 0x83, 0x0C, 0x07, // 76\n    0x01, 0x8F, 0x10, 0x09, // 77\n    0x01, 0x9F, 0x0C, 0x07, // 78\n    0x01, 0xAB, 0x0E, 0x08, // 79\n    0x01, 0xB9, 0x0B, 0x07, // 80\n    0x01, 0xC4, 0x0E, 0x08, // 81\n    0x01, 0xD2, 0x0C, 0x07, // 82\n    0x01, 0xDE, 0x0C, 0x07, // 83\n    0x01, 0xEA, 0x0B, 0x07, // 84\n    0x01, 0xF5, 0x0C, 0x07, // 85\n    0x02, 0x01, 0x0D, 0x08, // 86\n    0x02, 0x0E, 0x11, 0x0A, // 87\n    0x02, 0x1F, 0x0E, 0x08, // 88\n    0x02, 0x2D, 0x0D, 0x08, // 89\n    0x02, 0x3A, 0x0C, 0x07, // 90\n    0x02, 0x46, 0x06, 0x04, // 91\n    0x02, 0x4C, 0x06, 0x04, // 92\n    0x02, 0x52, 0x04, 0x03, // 93\n    0x02, 0x56, 0x09, 0x06, // 94\n    0x02, 0x5F, 0x0C, 0x07, // 95\n    0x02, 0x6B, 0x03, 0x03, // 96\n    0x02, 0x6E, 0x0A, 0x06, // 97\n    0x02, 0x78, 0x0A, 0x06, // 98\n    0x02, 0x82, 0x0A, 0x06, // 99\n    0x02, 0x8C, 0x0A, 0x06, // 100\n    0x02, 0x96, 0x0A, 0x06, // 101\n    0x02, 0xA0, 0x05, 0x04, // 102\n    0x02, 0xA5, 0x0A, 0x06, // 103\n    0x02, 0xAF, 0x0A, 0x06, // 104\n    0x02, 0xB9, 0x04, 0x03, // 105\n    0x02, 0xBD, 0x04, 0x03, // 106\n    0x02, 0xC1, 0x08, 0x05, // 107\n    0x02, 0xC9, 0x04, 0x03, // 108\n    0x02, 0xCD, 0x10, 0x09, // 109\n    0x02, 0xDD, 0x0A, 0x06, // 110\n    0x02, 0xE7, 0x0A, 0x06, // 111\n    0x02, 0xF1, 0x0A, 0x06, // 112\n    0x02, 0xFB, 0x0A, 0x06, // 113\n    0x03, 0x05, 0x05, 0x04, // 114\n    0x03, 0x0A, 0x08, 0x05, // 115\n    0x03, 0x12, 0x06, 0x04, // 116\n    0x03, 0x18, 0x0A, 0x06, // 117\n    0x03, 0x22, 0x09, 0x06, // 118\n    0x03, 0x2B, 0x0E, 0x08, // 119\n    0x03, 0x39, 0x0A, 0x06, // 120\n    0x03, 0x43, 0x09, 0x06, // 121\n    0x03, 0x4C, 0x0A, 0x06, // 122\n    0x03, 0x56, 0x06, 0x04, // 123\n    0x03, 0x5C, 0x04, 0x03, // 124\n    0x03, 0x60, 0x05, 0x04, // 125\n    0x03, 0x65, 0x09, 0x06, // 126\n    0xFF, 0xFF, 0x00, 0x0A, // 127\n    0xFF, 0xFF, 0x00, 0x0A, // 128\n    0xFF, 0xFF, 0x00, 0x0A, // 129\n    0xFF, 0xFF, 0x00, 0x0A, // 130\n    0xFF, 0xFF, 0x00, 0x0A, // 131\n    0xFF, 0xFF, 0x00, 0x0A, // 132\n    0xFF, 0xFF, 0x00, 0x0A, // 133\n    0xFF, 0xFF, 0x00, 0x0A, // 134\n    0xFF, 0xFF, 0x00, 0x0A, // 135\n    0xFF, 0xFF, 0x00, 0x0A, // 136\n    0xFF, 0xFF, 0x00, 0x0A, // 137\n    0xFF, 0xFF, 0x00, 0x0A, // 138\n    0xFF, 0xFF, 0x00, 0x0A, // 139\n    0xFF, 0xFF, 0x00, 0x0A, // 140\n    0xFF, 0xFF, 0x00, 0x0A, // 141\n    0xFF, 0xFF, 0x00, 0x0A, // 142\n    0xFF, 0xFF, 0x00, 0x0A, // 143\n    0xFF, 0xFF, 0x00, 0x0A, // 144\n    0xFF, 0xFF, 0x00, 0x0A, // 145\n    0xFF, 0xFF, 0x00, 0x0A, // 146\n    0xFF, 0xFF, 0x00, 0x0A, // 147\n    0xFF, 0xFF, 0x00, 0x0A, // 148\n    0xFF, 0xFF, 0x00, 0x0A, // 149\n    0xFF, 0xFF, 0x00, 0x0A, // 150\n    0xFF, 0xFF, 0x00, 0x0A, // 151\n    0xFF, 0xFF, 0x00, 0x0A, // 152\n    0xFF, 0xFF, 0x00, 0x0A, // 153\n    0xFF, 0xFF, 0x00, 0x0A, // 154\n    0xFF, 0xFF, 0x00, 0x0A, // 155\n    0xFF, 0xFF, 0x00, 0x0A, // 156\n    0xFF, 0xFF, 0x00, 0x0A, // 157\n    0xFF, 0xFF, 0x00, 0x0A, // 158\n    0xFF, 0xFF, 0x00, 0x0A, // 159\n    0xFF, 0xFF, 0x00, 0x0A, // 160\n    0x03, 0x6E, 0x04, 0x03, // 161\n    0x03, 0x72, 0x0A, 0x06, // 162\n    0x03, 0x7C, 0x0C, 0x07, // 163\n    0x03, 0x88, 0x0A, 0x06, // 164\n    0x03, 0x92, 0x09, 0x06, // 165\n    0x03, 0x9B, 0x04, 0x03, // 166\n    0x03, 0x9F, 0x0A, 0x06, // 167\n    0x03, 0xA9, 0x0C, 0x07, // 168\n    0x03, 0xB5, 0x0D, 0x08, // 169\n    0x03, 0xC2, 0x0C, 0x07, // 170\n    0x03, 0xCE, 0x0A, 0x06, // 171\n    0x03, 0xD8, 0x09, 0x06, // 172\n    0x03, 0xE1, 0x03, 0x03, // 173\n    0x03, 0xE4, 0x0D, 0x08, // 174\n    0x03, 0xF1, 0x0C, 0x07, // 175\n    0x03, 0xFD, 0x07, 0x05, // 176\n    0x04, 0x04, 0x0A, 0x06, // 177\n    0x04, 0x0E, 0x0C, 0x07, // 178\n    0x04, 0x1A, 0x0C, 0x07, // 179\n    0x04, 0x26, 0x07, 0x05, // 180\n    0x04, 0x2D, 0x0A, 0x06, // 181\n    0x04, 0x37, 0x09, 0x06, // 182\n    0x04, 0x40, 0x03, 0x03, // 183\n    0x04, 0x43, 0x0B, 0x07, // 184\n    0x04, 0x4E, 0x0B, 0x07, // 185\n    0x04, 0x59, 0x0C, 0x07, // 186\n    0x04, 0x65, 0x0A, 0x06, // 187\n    0x04, 0x6F, 0x10, 0x09, // 188\n    0x04, 0x7F, 0x10, 0x09, // 189\n    0x04, 0x8F, 0x10, 0x09, // 190\n    0x04, 0x9F, 0x06, 0x04, // 191\n    0x04, 0xA5, 0x0A, 0x06, // 192\n    0x04, 0xAF, 0x0A, 0x06, // 193\n    0x04, 0xB9, 0x0A, 0x06, // 194\n    0x04, 0xC3, 0x09, 0x06, // 195\n    0x04, 0xCC, 0x0A, 0x06, // 196\n    0x04, 0xD6, 0x0A, 0x06, // 197\n    0x04, 0xE0, 0x0A, 0x06, // 198\n    0x04, 0xEA, 0x08, 0x05, // 199\n    0x04, 0xF2, 0x0A, 0x06, // 200\n    0x04, 0xFC, 0x0A, 0x06, // 201\n    0x05, 0x06, 0x0A, 0x06, // 202\n    0x05, 0x10, 0x0A, 0x06, // 203\n    0x05, 0x1A, 0x0A, 0x06, // 204\n    0x05, 0x24, 0x0A, 0x06, // 205\n    0x05, 0x2E, 0x0A, 0x06, // 206\n    0x05, 0x38, 0x0A, 0x06, // 207\n    0x05, 0x42, 0x09, 0x06, // 208\n    0x05, 0x4B, 0x0A, 0x06, // 209\n    0x05, 0x55, 0x09, 0x06, // 210\n    0x05, 0x5E, 0x0A, 0x06, // 211\n    0x05, 0x68, 0x09, 0x06, // 212\n    0x05, 0x71, 0x0A, 0x06, // 213\n    0x05, 0x7B, 0x0A, 0x06, // 214\n    0x05, 0x85, 0x08, 0x05, // 215\n    0x05, 0x8D, 0x0A, 0x06, // 216\n    0x05, 0x97, 0x0C, 0x07, // 217\n    0x05, 0xA3, 0x0A, 0x06, // 218\n    0x05, 0xAD, 0x0A, 0x06, // 219\n    0x05, 0xB7, 0x08, 0x05, // 220\n    0x05, 0xBF, 0x0A, 0x06, // 221\n    0x05, 0xC9, 0x0A, 0x06, // 222\n    0x05, 0xD3, 0x0A, 0x06, // 223\n    0x05, 0xDD, 0x08, 0x05, // 224\n    0x05, 0xE5, 0x08, 0x05, // 225\n    0x05, 0xED, 0x08, 0x05, // 226\n    0x05, 0xF5, 0x07, 0x05, // 227\n    0x05, 0xFC, 0x0A, 0x06, // 228\n    0x06, 0x06, 0x09, 0x06, // 229\n    0x06, 0x0F, 0x0A, 0x06, // 230\n    0x06, 0x19, 0x08, 0x05, // 231\n    0x06, 0x21, 0x0A, 0x06, // 232\n    0x06, 0x2B, 0x0A, 0x06, // 233\n    0x06, 0x35, 0x06, 0x04, // 234\n    0x06, 0x3B, 0x08, 0x05, // 235\n    0x06, 0x43, 0x0A, 0x06, // 236\n    0x06, 0x4D, 0x08, 0x05, // 237\n    0x06, 0x55, 0x08, 0x05, // 238\n    0x06, 0x5D, 0x08, 0x05, // 239\n    0x06, 0x65, 0x05, 0x04, // 240\n    0x06, 0x6A, 0x08, 0x05, // 241\n    0x06, 0x72, 0x05, 0x04, // 242\n    0x06, 0x77, 0x08, 0x05, // 243\n    0x06, 0x7F, 0x09, 0x06, // 244\n    0x06, 0x88, 0x0A, 0x06, // 245\n    0x06, 0x92, 0x08, 0x05, // 246\n    0x06, 0x9A, 0x08, 0x05, // 247\n    0x06, 0xA2, 0x0A, 0x06, // 248\n    0x06, 0xAC, 0x0C, 0x07, // 249\n    0x06, 0xB8, 0x08, 0x05, // 250\n    0x06, 0xC0, 0x08, 0x05, // 251\n    0x06, 0xC8, 0x08, 0x05, // 252\n    0x06, 0xD0, 0x08, 0x05, // 253\n    0x06, 0xD8, 0x0A, 0x06, // 254\n    0x06, 0xE2, 0x08, 0x05, // 255\n    // Font Data:\n    0x00, 0x00, 0xF8, 0x02,                                                                                                 // 33\n    0x38, 0x00, 0x00, 0x00, 0x38,                                                                                           // 34\n    0xA0, 0x03, 0xE0, 0x00, 0xB8, 0x03, 0xE0, 0x00, 0xB8,                                                                   // 35\n    0x30, 0x01, 0x28, 0x02, 0xF8, 0x07, 0x48, 0x02, 0x90, 0x01,                                                             // 36\n    0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x30, 0x03, 0xC0, 0x00, 0xB0, 0x01, 0x48, 0x02, 0x80, 0x01,                         // 37\n    0x80, 0x01, 0x50, 0x02, 0x68, 0x02, 0xA8, 0x02, 0x18, 0x01, 0x80, 0x03, 0x80, 0x02,                                     // 38\n    0x38,                                                                                                                   // 39\n    0xE0, 0x03, 0x10, 0x04, 0x08, 0x08,                                                                                     // 40\n    0x08, 0x08, 0x10, 0x04, 0xE0, 0x03,                                                                                     // 41\n    0x28, 0x00, 0x18, 0x00, 0x28,                                                                                           // 42\n    0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40,                                                                   // 43\n    0x00, 0x00, 0x00, 0x06,                                                                                                 // 44\n    0x80, 0x00, 0x80,                                                                                                       // 45\n    0x00, 0x00, 0x00, 0x02,                                                                                                 // 46\n    0x00, 0x03, 0xE0, 0x00, 0x18,                                                                                           // 47\n    0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                                             // 48\n    0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0xF8, 0x03,                                                                         // 49\n    0x10, 0x02, 0x08, 0x03, 0x88, 0x02, 0x48, 0x02, 0x30, 0x02,                                                             // 50\n    0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                             // 51\n    0xC0, 0x00, 0xA0, 0x00, 0x90, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x80,                                                       // 52\n    0x60, 0x01, 0x38, 0x02, 0x28, 0x02, 0x28, 0x02, 0xC8, 0x01,                                                             // 53\n    0xF0, 0x01, 0x28, 0x02, 0x28, 0x02, 0x28, 0x02, 0xD0, 0x01,                                                             // 54\n    0x08, 0x00, 0x08, 0x03, 0xC8, 0x00, 0x38, 0x00, 0x08,                                                                   // 55\n    0xB0, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                             // 56\n    0x70, 0x01, 0x88, 0x02, 0x88, 0x02, 0x88, 0x02, 0xF0, 0x01,                                                             // 57\n    0x00, 0x00, 0x20, 0x02,                                                                                                 // 58\n    0x00, 0x00, 0x20, 0x06,                                                                                                 // 59\n    0x00, 0x00, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01,                                                             // 60\n    0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0,                                                                   // 61\n    0x00, 0x00, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0x40,                                                                   // 62\n    0x10, 0x00, 0x08, 0x00, 0x08, 0x00, 0xC8, 0x02, 0x48, 0x00, 0x30,                                                       // 63\n    0x00, 0x00, 0xC0, 0x03, 0x30, 0x04, 0xD0, 0x09, 0x28, 0x0A, 0x28, 0x0A, 0xC8, 0x0B, 0x68, 0x0A, 0x10, 0x05, 0xE0, 0x04, // 64\n    0x00, 0x02, 0xC0, 0x01, 0xB0, 0x00, 0x88, 0x00, 0xB0, 0x00, 0xC0, 0x01, 0x00, 0x02,                                     // 65\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01,                                                 // 66\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01,                                                 // 67\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01, 0xE0,                                                       // 68\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02,                                                 // 69\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x08,                                                                   // 70\n    0x00, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x50, 0x01, 0xC0,                                           // 71\n    0x00, 0x00, 0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                                                 // 72\n    0x00, 0x00, 0xF8, 0x03,                                                                                                 // 73\n    0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                                         // 74\n    0x00, 0x00, 0xF8, 0x03, 0x80, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                                     // 75\n    0x00, 0x00, 0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02,                                                 // 76\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x30, 0x00, 0xF8, 0x03,                         // 77\n    0x00, 0x00, 0xF8, 0x03, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0xF8, 0x03,                                                 // 78\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                     // 79\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                                       // 80\n    0x00, 0x00, 0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x08, 0x03, 0xF0, 0x02,                                     // 81\n    0x00, 0x00, 0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0xC8, 0x00, 0x30, 0x03,                                                 // 82\n    0x00, 0x00, 0x30, 0x01, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x90, 0x01,                                                 // 83\n    0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08,                                                       // 84\n    0x00, 0x00, 0xF8, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x01,                                                 // 85\n    0x08, 0x00, 0x70, 0x00, 0x80, 0x01, 0x00, 0x02, 0x80, 0x01, 0x70, 0x00, 0x08,                                           // 86\n    0x18, 0x00, 0xE0, 0x01, 0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0xF0, 0x01, 0x00, 0x02, 0xE0, 0x01, 0x18,                   // 87\n    0x00, 0x02, 0x08, 0x01, 0x90, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x01, 0x00, 0x02,                                     // 88\n    0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0xC0, 0x03, 0x20, 0x00, 0x10, 0x00, 0x08,                                           // 89\n    0x08, 0x03, 0x88, 0x02, 0xC8, 0x02, 0x68, 0x02, 0x38, 0x02, 0x18, 0x02,                                                 // 90\n    0x00, 0x00, 0xF8, 0x0F, 0x08, 0x08,                                                                                     // 91\n    0x18, 0x00, 0xE0, 0x00, 0x00, 0x03,                                                                                     // 92\n    0x08, 0x08, 0xF8, 0x0F,                                                                                                 // 93\n    0x40, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0x40,                                                                   // 94\n    0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,                                                 // 95\n    0x08, 0x00, 0x10,                                                                                                       // 96\n    0x00, 0x00, 0x00, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x03,                                                             // 97\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 98\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01,                                                             // 99\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xF8, 0x03,                                                             // 100\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xC0, 0x02,                                                             // 101\n    0x20, 0x00, 0xF0, 0x03, 0x28,                                                                                           // 102\n    0x00, 0x00, 0xC0, 0x05, 0x20, 0x0A, 0x20, 0x0A, 0xE0, 0x07,                                                             // 103\n    0x00, 0x00, 0xF8, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                                             // 104\n    0x00, 0x00, 0xE8, 0x03,                                                                                                 // 105\n    0x00, 0x08, 0xE8, 0x07,                                                                                                 // 106\n    0xF8, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02,                                                                         // 107\n    0x00, 0x00, 0xF8, 0x03,                                                                                                 // 108\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                         // 109\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xC0, 0x03,                                                             // 110\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 111\n    0x00, 0x00, 0xE0, 0x0F, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                             // 112\n    0x00, 0x00, 0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xE0, 0x0F,                                                             // 113\n    0x00, 0x00, 0xE0, 0x03, 0x20,                                                                                           // 114\n    0x40, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x20, 0x01,                                                                         // 115\n    0x20, 0x00, 0xF8, 0x03, 0x20, 0x02,                                                                                     // 116\n    0x00, 0x00, 0xE0, 0x01, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,                                                             // 117\n    0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20,                                                                   // 118\n    0xE0, 0x01, 0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xC0, 0x01, 0x00, 0x02, 0xE0, 0x01,                                     // 119\n    0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                                                             // 120\n    0x20, 0x00, 0xC0, 0x09, 0x00, 0x06, 0xC0, 0x01, 0x20,                                                                   // 121\n    0x20, 0x02, 0x20, 0x03, 0xA0, 0x02, 0x60, 0x02, 0x20, 0x02,                                                             // 122\n    0x80, 0x00, 0x78, 0x0F, 0x08, 0x08,                                                                                     // 123\n    0x00, 0x00, 0xF8, 0x0F,                                                                                                 // 124\n    0x08, 0x08, 0x78, 0x0F, 0x80,                                                                                           // 125\n    0xC0, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x80, 0x00, 0xC0,                                                                   // 126\n    0x00, 0x00, 0xA0, 0x0F,                                                                                                 // 161\n    0x00, 0x00, 0xC0, 0x01, 0xA0, 0x0F, 0x78, 0x02, 0x40, 0x01,                                                             // 162\n    0x40, 0x02, 0x70, 0x03, 0xC8, 0x02, 0x48, 0x02, 0x08, 0x02, 0x10, 0x02,                                                 // 163\n    0x00, 0x00, 0xE0, 0x01, 0x20, 0x01, 0x20, 0x01, 0xE0, 0x01,                                                             // 164\n    0x00, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08, 0x00, 0x0C,                                                                   // 165\n    0x00, 0x00, 0x38, 0x0F,                                                                                                 // 166\n    0xD0, 0x04, 0x28, 0x09, 0x48, 0x09, 0x48, 0x0A, 0x90, 0x05,                                                             // 167\n    0x00, 0x00, 0xE0, 0x03, 0xA8, 0x02, 0xA0, 0x02, 0xA8, 0x02, 0x20, 0x02,                                                 // 168\n    0xE0, 0x00, 0x10, 0x01, 0x48, 0x02, 0xA8, 0x02, 0xA8, 0x02, 0x10, 0x01, 0xE0,                                           // 169\n    0x00, 0x00, 0xF0, 0x01, 0x58, 0x03, 0x48, 0x02, 0x08, 0x02, 0x10, 0x01,                                                 // 170\n    0x00, 0x00, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02,                                                             // 171\n    0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0xE0,                                                                   // 172\n    0x80, 0x00, 0x80,                                                                                                       // 173\n    0xE0, 0x00, 0x10, 0x01, 0xE8, 0x02, 0x68, 0x02, 0xC8, 0x02, 0x10, 0x01, 0xE0,                                           // 174\n    0x00, 0x00, 0x08, 0x02, 0x0A, 0x02, 0xF8, 0x03, 0x0A, 0x02, 0x08, 0x02,                                                 // 175\n    0x00, 0x00, 0x38, 0x00, 0x28, 0x00, 0x38,                                                                               // 176\n    0x40, 0x02, 0x40, 0x02, 0xF0, 0x03, 0x40, 0x02, 0x40, 0x02,                                                             // 177\n    0x00, 0x00, 0x08, 0x02, 0x08, 0x02, 0xF8, 0x03, 0x08, 0x02, 0x08, 0x02,                                                 // 178\n    0x00, 0x00, 0x20, 0x02, 0x20, 0x02, 0xE8, 0x03, 0x20, 0x02, 0x20, 0x02,                                                 // 179\n    0x00, 0x00, 0xE0, 0x03, 0x20, 0x00, 0x30,                                                                               // 180\n    0x00, 0x00, 0xE0, 0x0F, 0x00, 0x02, 0x00, 0x02, 0xE0, 0x03,                                                             // 181\n    0x70, 0x00, 0xF8, 0x0F, 0x08, 0x00, 0xF8, 0x0F, 0x08,                                                                   // 182\n    0x00, 0x00, 0x40,                                                                                                       // 183\n    0x00, 0x00, 0xC0, 0x01, 0xA8, 0x02, 0xA0, 0x02, 0xA8, 0x02, 0xC0,                                                       // 184\n    0x00, 0x00, 0xF0, 0x03, 0x40, 0x00, 0x80, 0x00, 0xF8, 0x03, 0x08,                                                       // 185\n    0x00, 0x00, 0xE0, 0x01, 0x50, 0x02, 0x50, 0x02, 0x10, 0x02, 0x20, 0x01,                                                 // 186\n    0x00, 0x00, 0x40, 0x02, 0x80, 0x01, 0x40, 0x02, 0x80, 0x01,                                                             // 187\n    0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0xC0, 0x00, 0x20, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01,                         // 188\n    0x00, 0x00, 0x10, 0x02, 0x78, 0x01, 0x80, 0x00, 0x60, 0x00, 0x50, 0x02, 0x48, 0x03, 0xC0, 0x02,                         // 189\n    0x48, 0x00, 0x58, 0x00, 0x68, 0x03, 0x80, 0x00, 0x60, 0x01, 0x90, 0x01, 0xC8, 0x03, 0x00, 0x01,                         // 190\n    0x28, 0x02, 0xE0, 0x03, 0x28, 0x02,                                                                                     // 191\n    0xF0, 0x03, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0xF0, 0x03,                                                             // 192\n    0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x88, 0x01,                                                             // 193\n    0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                             // 194\n    0xF8, 0x03, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x18,                                                                   // 195\n    0x00, 0x02, 0xFC, 0x03, 0x04, 0x02, 0xFC, 0x03, 0x00, 0x02,                                                             // 196\n    0xF8, 0x03, 0x48, 0x02, 0x48, 0x02, 0x48, 0x02, 0x08, 0x02,                                                             // 197\n    0xB8, 0x03, 0x40, 0x00, 0xF8, 0x03, 0x40, 0x00, 0xB8, 0x03,                                                             // 198\n    0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xB0, 0x01,                                                                         // 199\n    0xF8, 0x03, 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0xF8, 0x03,                                                             // 200\n    0xE0, 0x03, 0x08, 0x01, 0x90, 0x00, 0x48, 0x00, 0xE0, 0x03,                                                             // 201\n    0xF8, 0x03, 0x40, 0x00, 0xA0, 0x00, 0x10, 0x01, 0x08, 0x02,                                                             // 202\n    0x00, 0x02, 0xF0, 0x01, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03,                                                             // 203\n    0xF8, 0x03, 0x10, 0x00, 0x60, 0x00, 0x10, 0x00, 0xF8, 0x03,                                                             // 204\n    0xF8, 0x03, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                                                             // 205\n    0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0xF0, 0x01,                                                             // 206\n    0xF8, 0x03, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xF8, 0x03,                                                             // 207\n    0xF8, 0x03, 0x48, 0x00, 0x48, 0x00, 0x48, 0x00, 0x30,                                                                   // 208\n    0xF0, 0x01, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, 0x10, 0x01,                                                             // 209\n    0x08, 0x00, 0x08, 0x00, 0xF8, 0x03, 0x08, 0x00, 0x08,                                                                   // 210\n    0x38, 0x00, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0xF8, 0x01,                                                             // 211\n    0x70, 0x00, 0x88, 0x00, 0xF8, 0x03, 0x88, 0x00, 0x70,                                                                   // 212\n    0x18, 0x03, 0xA0, 0x00, 0x40, 0x00, 0xA0, 0x00, 0x18, 0x03,                                                             // 213\n    0xF8, 0x03, 0x00, 0x02, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x02,                                                             // 214\n    0x38, 0x00, 0x40, 0x00, 0x40, 0x00, 0xF8, 0x03,                                                                         // 215\n    0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03,                                                             // 216\n    0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x02, 0xF8, 0x03, 0x00, 0x06,                                                 // 217\n    0x08, 0x00, 0xF8, 0x03, 0x40, 0x02, 0x40, 0x02, 0x80, 0x01,                                                             // 218\n    0xF8, 0x03, 0x40, 0x02, 0x40, 0x02, 0x80, 0x01, 0xF8, 0x03,                                                             // 219\n    0xF8, 0x03, 0x40, 0x02, 0x40, 0x02, 0x80, 0x01,                                                                         // 220\n    0x10, 0x01, 0x08, 0x02, 0x48, 0x02, 0x48, 0x02, 0xF0, 0x01,                                                             // 221\n    0xF8, 0x03, 0x40, 0x00, 0xF0, 0x01, 0x08, 0x02, 0xF0, 0x01,                                                             // 222\n    0x30, 0x02, 0x48, 0x01, 0xC8, 0x00, 0x48, 0x00, 0xF8, 0x03,                                                             // 223\n    0x00, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xE0, 0x01,                                                                         // 224\n    0xE0, 0x01, 0x50, 0x02, 0x48, 0x02, 0x88, 0x01,                                                                         // 225\n    0xE0, 0x03, 0xA0, 0x02, 0xA0, 0x02, 0x40, 0x01,                                                                         // 226\n    0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0x60,                                                                               // 227\n    0x00, 0x02, 0xC0, 0x03, 0x20, 0x02, 0xE0, 0x03, 0x00, 0x02,                                                             // 228\n    0xC0, 0x01, 0xA0, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0xC0,                                                                   // 229\n    0x60, 0x03, 0x80, 0x00, 0xE0, 0x03, 0x80, 0x00, 0x60, 0x03,                                                             // 230\n    0x20, 0x02, 0xA0, 0x02, 0xA0, 0x02, 0x40, 0x01,                                                                         // 231\n    0xE0, 0x03, 0x00, 0x01, 0x80, 0x00, 0x40, 0x00, 0xE0, 0x03,                                                             // 232\n    0xE0, 0x03, 0x08, 0x01, 0x88, 0x00, 0x48, 0x00, 0xE0, 0x03,                                                             // 233\n    0xE0, 0x03, 0x80, 0x00, 0x60, 0x03,                                                                                     // 234\n    0x00, 0x02, 0xC0, 0x01, 0x20, 0x00, 0xE0, 0x03,                                                                         // 235\n    0xE0, 0x03, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0xE0, 0x03,                                                             // 236\n    0xE0, 0x03, 0x80, 0x00, 0x80, 0x00, 0xE0, 0x03,                                                                         // 237\n    0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0xC0, 0x01,                                                                         // 238\n    0xE0, 0x03, 0x20, 0x00, 0x20, 0x00, 0xE0, 0x03,                                                                         // 239\n    0xE0, 0x03, 0xA0, 0x00, 0x40,                                                                                           // 240\n    0xC0, 0x01, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01,                                                                         // 241\n    0x20, 0x00, 0xE0, 0x03, 0x20,                                                                                           // 242\n    0x60, 0x00, 0x80, 0x02, 0x80, 0x02, 0xE0, 0x01,                                                                         // 243\n    0xC0, 0x00, 0x20, 0x01, 0xE0, 0x03, 0x20, 0x01, 0xC0,                                                                   // 244\n    0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02,                                                             // 245\n    0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x06,                                                                         // 246\n    0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0xE0, 0x03,                                                                         // 247\n    0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03,                                                             // 248\n    0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x02, 0xE0, 0x03, 0x00, 0x06,                                                 // 249\n    0x20, 0x00, 0xE0, 0x03, 0x80, 0x02, 0x00, 0x01,                                                                         // 250\n    0xE0, 0x03, 0x80, 0x02, 0x00, 0x01, 0xE0, 0x03,                                                                         // 251\n    0xE0, 0x03, 0x80, 0x02, 0x80, 0x02, 0x00, 0x01,                                                                         // 252\n    0x40, 0x01, 0x20, 0x02, 0xA0, 0x02, 0xC0, 0x01,                                                                         // 253\n    0xE0, 0x03, 0x80, 0x00, 0xC0, 0x01, 0x20, 0x02, 0xC0, 0x01,                                                             // 254\n    0x40, 0x02, 0xA0, 0x01, 0xA0, 0x00, 0xE0, 0x03,                                                                         // 255\n};\n\nconst uint8_t ArialMT_Plain_16_UA[] PROGMEM = {\n    0x10, // Width: 16\n    0x13, // Height: 19\n    0x20, // First Char: 32\n    0xE0, // Numbers of Chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x04, // 32= :65535\n    0x00, 0x00, 0x08, 0x05, // 33=!:0\n    0x00, 0x08, 0x0D, 0x06, // 34=\":8\n    0x00, 0x15, 0x1A, 0x09, // 35=#:21\n    0x00, 0x2F, 0x17, 0x09, // 36=$:47\n    0x00, 0x46, 0x26, 0x0E, // 37=%:70\n    0x00, 0x6C, 0x1D, 0x0B, // 38=&:108\n    0x00, 0x89, 0x04, 0x03, // 39=':137\n    0x00, 0x8D, 0x0C, 0x05, // 40=(:141\n    0x00, 0x99, 0x0B, 0x05, // 41=):153\n    0x00, 0xA4, 0x0D, 0x06, // 42=*:164\n    0x00, 0xB1, 0x17, 0x09, // 43=+:177\n    0x00, 0xC8, 0x09, 0x04, // 44=,:200\n    0x00, 0xD1, 0x0B, 0x05, // 45=-:209\n    0x00, 0xDC, 0x08, 0x04, // 46=.:220\n    0x00, 0xE4, 0x0A, 0x04, // 47=/:228\n    0x00, 0xEE, 0x17, 0x09, // 48=0:238\n    0x01, 0x05, 0x11, 0x09, // 49=1:261\n    0x01, 0x16, 0x17, 0x09, // 50=2:278\n    0x01, 0x2D, 0x17, 0x09, // 51=3:301\n    0x01, 0x44, 0x17, 0x09, // 52=4:324\n    0x01, 0x5B, 0x17, 0x09, // 53=5:347\n    0x01, 0x72, 0x17, 0x09, // 54=6:370\n    0x01, 0x89, 0x16, 0x09, // 55=7:393\n    0x01, 0x9F, 0x17, 0x09, // 56=8:415\n    0x01, 0xB6, 0x17, 0x09, // 57=9:438\n    0x01, 0xCD, 0x05, 0x04, // 58=::461\n    0x01, 0xD2, 0x06, 0x04, // 59=;:466\n    0x01, 0xD8, 0x17, 0x09, // 60=<:472\n    0x01, 0xEF, 0x17, 0x09, // 61==:495\n    0x02, 0x06, 0x17, 0x09, // 62=>:518\n    0x02, 0x1D, 0x16, 0x09, // 63=?:541\n    0x02, 0x33, 0x2F, 0x10, // 64=@:563\n    0x02, 0x62, 0x1D, 0x0B, // 65=A:610\n    0x02, 0x7F, 0x1D, 0x0B, // 66=B:639\n    0x02, 0x9C, 0x20, 0x0C, // 67=C:668\n    0x02, 0xBC, 0x20, 0x0C, // 68=D:700\n    0x02, 0xDC, 0x1D, 0x0B, // 69=E:732\n    0x02, 0xF9, 0x19, 0x0A, // 70=F:761\n    0x03, 0x12, 0x20, 0x0C, // 71=G:786\n    0x03, 0x32, 0x1D, 0x0B, // 72=H:818\n    0x03, 0x4F, 0x05, 0x03, // 73=I:847\n    0x03, 0x54, 0x14, 0x08, // 74=J:852\n    0x03, 0x68, 0x1D, 0x0B, // 75=K:872\n    0x03, 0x85, 0x17, 0x09, // 76=L:901\n    0x03, 0x9C, 0x23, 0x0D, // 77=M:924\n    0x03, 0xBF, 0x1D, 0x0B, // 78=N:959\n    0x03, 0xDC, 0x20, 0x0C, // 79=O:988\n    0x03, 0xFC, 0x1C, 0x0B, // 80=P:1020\n    0x04, 0x18, 0x20, 0x0C, // 81=Q:1048\n    0x04, 0x38, 0x1D, 0x0B, // 82=R:1080\n    0x04, 0x55, 0x1D, 0x0B, // 83=S:1109\n    0x04, 0x72, 0x19, 0x09, // 84=T:1138\n    0x04, 0x8B, 0x1D, 0x0B, // 85=U:1163\n    0x04, 0xA8, 0x1C, 0x0B, // 86=V:1192\n    0x04, 0xC4, 0x2B, 0x0F, // 87=W:1220\n    0x04, 0xEF, 0x20, 0x0B, // 88=X:1263\n    0x05, 0x0F, 0x19, 0x09, // 89=Y:1295\n    0x05, 0x28, 0x1A, 0x09, // 90=Z:1320\n    0x05, 0x42, 0x0C, 0x04, // 91=[:1346\n    0x05, 0x4E, 0x0B, 0x04, // 92=\\:1358\n    0x05, 0x59, 0x09, 0x04, // 93=]:1369\n    0x05, 0x62, 0x14, 0x07, // 94=^:1378\n    0x05, 0x76, 0x1B, 0x09, // 95=_:1398\n    0x05, 0x91, 0x07, 0x05, // 96=`:1425\n    0x05, 0x98, 0x17, 0x09, // 97=a:1432\n    0x05, 0xAF, 0x17, 0x09, // 98=b:1455\n    0x05, 0xC6, 0x14, 0x08, // 99=c:1478\n    0x05, 0xDA, 0x17, 0x09, // 100=d:1498\n    0x05, 0xF1, 0x17, 0x09, // 101=e:1521\n    0x06, 0x08, 0x0A, 0x04, // 102=f:1544\n    0x06, 0x12, 0x17, 0x09, // 103=g:1554\n    0x06, 0x29, 0x14, 0x08, // 104=h:1577\n    0x06, 0x3D, 0x05, 0x04, // 105=i:1597\n    0x06, 0x42, 0x06, 0x03, // 106=j:1602\n    0x06, 0x48, 0x17, 0x08, // 107=k:1608\n    0x06, 0x5F, 0x05, 0x03, // 108=l:1631\n    0x06, 0x64, 0x23, 0x0D, // 109=m:1636\n    0x06, 0x87, 0x14, 0x08, // 110=n:1671\n    0x06, 0x9B, 0x17, 0x09, // 111=o:1691\n    0x06, 0xB2, 0x17, 0x09, // 112=p:1714\n    0x06, 0xC9, 0x18, 0x09, // 113=q:1737\n    0x06, 0xE1, 0x0D, 0x05, // 114=r:1761\n    0x06, 0xEE, 0x14, 0x08, // 115=s:1774\n    0x07, 0x02, 0x0B, 0x04, // 116=t:1794\n    0x07, 0x0D, 0x14, 0x08, // 117=u:1805\n    0x07, 0x21, 0x13, 0x07, // 118=v:1825\n    0x07, 0x34, 0x1F, 0x0B, // 119=w:1844\n    0x07, 0x53, 0x14, 0x07, // 120=x:1875\n    0x07, 0x67, 0x13, 0x07, // 121=y:1895\n    0x07, 0x7A, 0x14, 0x07, // 122=z:1914\n    0x07, 0x8E, 0x0F, 0x05, // 123={:1934\n    0x07, 0x9D, 0x06, 0x03, // 124=|:1949\n    0x07, 0xA3, 0x0E, 0x05, // 125=}:1955\n    0x07, 0xB1, 0x17, 0x09, // 126=~:1969\n    0x07, 0xC8, 0x1D, 0x0C, // 127=:1992\n    0x07, 0xE5, 0x26, 0x0E, // 1026=Ђ:2021\n    0x08, 0x0B, 0x19, 0x09, // 1027=Ѓ:2059\n    0x08, 0x24, 0x06, 0x04, // 8218=‚:2084\n    0x08, 0x2A, 0x10, 0x06, // 1107=ѓ:2090\n    0x08, 0x3A, 0x09, 0x05, // 8222=„:2106\n    0x08, 0x43, 0x26, 0x10, // 8230=…:2115\n    0x08, 0x69, 0x16, 0x09, // 8224=†:2153\n    0x08, 0x7F, 0x17, 0x09, // 8225=‡:2175\n    0x08, 0x96, 0x17, 0x09, // 8364=€:2198\n    0x08, 0xAD, 0x32, 0x11, // 8240=‰:2221\n    0x08, 0xDF, 0x2F, 0x11, // 1033=Љ:2271\n    0x09, 0x0E, 0x0B, 0x05, // 8249=‹:2318\n    0x09, 0x19, 0x2C, 0x10, // 1034=Њ:2329\n    0x09, 0x45, 0x1A, 0x09, // 1036=Ќ:2373\n    0x09, 0x5F, 0x23, 0x0D, // 1035=Ћ:2399\n    0x09, 0x82, 0x1D, 0x0C, // 1039=Џ:2434\n    0x09, 0x9F, 0x15, 0x08, // 1106=ђ:2463\n    0x09, 0xB4, 0x04, 0x04, // 8216=‘:2484\n    0x09, 0xB8, 0x04, 0x04, // 8217=’:2488\n    0x09, 0xBC, 0x07, 0x05, // 8220=“:2492\n    0x09, 0xC3, 0x0A, 0x05, // 8221=”:2499\n    0x09, 0xCD, 0x0E, 0x06, // 8226=•:2509\n    0x09, 0xDB, 0x1A, 0x09, // 8211=–:2523\n    0x09, 0xF5, 0x2F, 0x10, // 8212=—:2549\n    0x0A, 0x24, 0x1D, 0x0C, // 65533=�:2596\n    0x0A, 0x41, 0x2C, 0x10, // 8482=™:2625\n    0x0A, 0x6D, 0x29, 0x0F, // 1113=љ:2669\n    0x0A, 0x96, 0x0B, 0x05, // 8250=›:2710\n    0x0A, 0xA1, 0x23, 0x0D, // 1114=њ:2721\n    0x0A, 0xC4, 0x14, 0x07, // 1116=ќ:2756\n    0x0A, 0xD8, 0x14, 0x08, // 1115=ћ:2776\n    0x0A, 0xEC, 0x14, 0x08, // 1119=џ:2796\n    0xFF, 0xFF, 0x00, 0x04, // 160= :65535\n    0x0B, 0x00, 0x1C, 0x0A, // 1038=Ў:2816\n    0x0B, 0x1C, 0x13, 0x07, // 1118=ў:2844\n    0x0B, 0x2F, 0x14, 0x08, // 1032=Ј:2863\n    0x0B, 0x43, 0x14, 0x09, // 164=¤:2883\n    0x0B, 0x57, 0x16, 0x08, // 1168=Ґ:2903\n    0x0B, 0x6D, 0x06, 0x03, // 166=¦:2925\n    0x0B, 0x73, 0x17, 0x09, // 167=§:2931\n    0x0B, 0x8A, 0x1D, 0x0B, // 1025=Ё:2954\n    0x0B, 0xA7, 0x23, 0x0C, // 169=©:2983\n    0x0B, 0xCA, 0x20, 0x0C, // 1028=Є:3018\n    0x0B, 0xEA, 0x14, 0x09, // 171=«:3050\n    0x0B, 0xFE, 0x17, 0x09, // 172=¬:3070\n    0x0C, 0x15, 0x0B, 0x05, // 173=­:3093\n    0x0C, 0x20, 0x23, 0x0C, // 174=®:3104\n    0x0C, 0x43, 0x07, 0x03, // 1031=Ї:3139\n    0x0C, 0x4A, 0x0D, 0x06, // 176=°:3146\n    0x0C, 0x57, 0x17, 0x09, // 177=±:3159\n    0x0C, 0x6E, 0x05, 0x03, // 1030=І:3182\n    0x0C, 0x73, 0x05, 0x04, // 1110=і:3187\n    0x0C, 0x78, 0x10, 0x07, // 1169=ґ:3192\n    0x0C, 0x88, 0x17, 0x09, // 181=µ:3208\n    0x0C, 0x9F, 0x19, 0x09, // 182=¶:3231\n    0x0C, 0xB8, 0x08, 0x05, // 183=·:3256\n    0x0C, 0xC0, 0x17, 0x09, // 1105=ё:3264\n    0x0C, 0xD7, 0x2F, 0x11, // 8470=№:3287\n    0x0D, 0x06, 0x14, 0x08, // 1108=є:3334\n    0x0D, 0x1A, 0x17, 0x09, // 187=»:3354\n    0x0D, 0x31, 0x06, 0x03, // 1112=ј:3377\n    0x0D, 0x37, 0x1D, 0x0B, // 1029=Ѕ:3383\n    0x0D, 0x54, 0x14, 0x08, // 1109=ѕ:3412\n    0x0D, 0x68, 0x07, 0x03, // 1111=ї:3432\n    0x0D, 0x6F, 0x1D, 0x0B, // 1040=А:3439\n    0x0D, 0x8C, 0x1D, 0x0B, // 1041=Б:3468\n    0x0D, 0xA9, 0x1D, 0x0B, // 1042=В:3497\n    0x0D, 0xC6, 0x19, 0x09, // 1043=Г:3526\n    0x0D, 0xDF, 0x1E, 0x0B, // 1044=Д:3551\n    0x0D, 0xFD, 0x1D, 0x0B, // 1045=Е:3581\n    0x0E, 0x1A, 0x29, 0x0E, // 1046=Ж:3610\n    0x0E, 0x43, 0x1A, 0x0A, // 1047=З:3651\n    0x0E, 0x5D, 0x20, 0x0C, // 1048=И:3677\n    0x0E, 0x7D, 0x20, 0x0C, // 1049=Й:3709\n    0x0E, 0x9D, 0x1A, 0x09, // 1050=К:3741\n    0x0E, 0xB7, 0x1D, 0x0B, // 1051=Л:3767\n    0x0E, 0xD4, 0x23, 0x0D, // 1052=М:3796\n    0x0E, 0xF7, 0x1D, 0x0B, // 1053=Н:3831\n    0x0F, 0x14, 0x20, 0x0C, // 1054=О:3860\n    0x0F, 0x34, 0x1D, 0x0B, // 1055=П:3892\n    0x0F, 0x51, 0x1C, 0x0B, // 1056=Р:3921\n    0x0F, 0x6D, 0x20, 0x0C, // 1057=С:3949\n    0x0F, 0x8D, 0x19, 0x09, // 1058=Т:3981\n    0x0F, 0xA6, 0x1C, 0x0A, // 1059=У:4006\n    0x0F, 0xC2, 0x1D, 0x0B, // 1060=Ф:4034\n    0x0F, 0xDF, 0x20, 0x0B, // 1061=Х:4063\n    0x0F, 0xFF, 0x21, 0x0C, // 1062=Ц:4095\n    0x10, 0x20, 0x1A, 0x0A, // 1063=Ч:4128\n    0x10, 0x3A, 0x23, 0x0D, // 1064=Ш:4154\n    0x10, 0x5D, 0x27, 0x0E, // 1065=Щ:4189\n    0x10, 0x84, 0x23, 0x0D, // 1066=Ъ:4228\n    0x10, 0xA7, 0x26, 0x0E, // 1067=Ы:4263\n    0x10, 0xCD, 0x1D, 0x0B, // 1068=Ь:4301\n    0x10, 0xEA, 0x20, 0x0C, // 1069=Э:4330\n    0x11, 0x0A, 0x2C, 0x10, // 1070=Ю:4362\n    0x11, 0x36, 0x20, 0x0C, // 1071=Я:4406\n    0x11, 0x56, 0x17, 0x09, // 1072=а:4438\n    0x11, 0x6D, 0x17, 0x09, // 1073=б:4461\n    0x11, 0x84, 0x17, 0x09, // 1074=в:4484\n    0x11, 0x9B, 0x10, 0x06, // 1075=г:4507\n    0x11, 0xAB, 0x18, 0x09, // 1076=д:4523\n    0x11, 0xC3, 0x17, 0x09, // 1077=е:4547\n    0x11, 0xDA, 0x1D, 0x0A, // 1078=ж:4570\n    0x11, 0xF7, 0x11, 0x07, // 1079=з:4599\n    0x12, 0x08, 0x14, 0x08, // 1080=и:4616\n    0x12, 0x1C, 0x14, 0x08, // 1081=й:4636\n    0x12, 0x30, 0x14, 0x07, // 1082=к:4656\n    0x12, 0x44, 0x14, 0x08, // 1083=л:4676\n    0x12, 0x58, 0x1D, 0x0B, // 1084=м:4696\n    0x12, 0x75, 0x14, 0x08, // 1085=н:4725\n    0x12, 0x89, 0x17, 0x09, // 1086=о:4745\n    0x12, 0xA0, 0x14, 0x08, // 1087=п:4768\n    0x12, 0xB4, 0x17, 0x09, // 1088=р:4788\n    0x12, 0xCB, 0x14, 0x08, // 1089=с:4811\n    0x12, 0xDF, 0x13, 0x07, // 1090=т:4831\n    0x12, 0xF2, 0x13, 0x07, // 1091=у:4850\n    0x13, 0x05, 0x23, 0x0D, // 1092=ф:4869\n    0x13, 0x28, 0x14, 0x07, // 1093=х:4904\n    0x13, 0x3C, 0x1B, 0x09, // 1094=ц:4924\n    0x13, 0x57, 0x14, 0x08, // 1095=ч:4951\n    0x13, 0x6B, 0x1D, 0x0B, // 1096=ш:4971\n    0x13, 0x88, 0x21, 0x0B, // 1097=щ:5000\n    0x13, 0xA9, 0x1A, 0x0A, // 1098=ъ:5033\n    0x13, 0xC3, 0x20, 0x0C, // 1099=ы:5059\n    0x13, 0xE3, 0x17, 0x09, // 1100=ь:5091\n    0x13, 0xFA, 0x14, 0x08, // 1101=э:5114\n    0x14, 0x0E, 0x20, 0x0C, // 1102=ю:5134\n    0x14, 0x2E, 0x17, 0x09, // 1103=я:5166\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x5F,                               // 33\n    0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // 34\n    0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00, 0xB8, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x78, 0x00, 0xC0, 0x0F, 0x00,\n    0xB8, 0x08, 0x00, 0x80, 0x08, // 35\n    0x00, 0x00, 0x00, 0xE0, 0x10, 0x00, 0x10, 0x21, 0x00, 0x08, 0x43, 0x00, 0xFC, 0xFF, 0x00, 0x08, 0x42, 0x00, 0x18, 0x22, 0x00,\n    0x20, 0x1C, // 36\n    0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x61, 0x00, 0xF0, 0x18, 0x00, 0x00, 0x06, 0x00,\n    0xC0, 0x01, 0x00, 0x30, 0x3C, 0x00, 0x08, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x3C, // 37\n    0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x70, 0x22, 0x00, 0x88, 0x41, 0x00, 0x08, 0x43, 0x00, 0x88, 0x44, 0x00, 0x70, 0x28, 0x00,\n    0x00, 0x10, 0x00, 0x00, 0x28, 0x00, 0x00, 0x44,                               // 38\n    0x00, 0x00, 0x00, 0x78,                                                       // 39\n    0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x70, 0xC0, 0x01, 0x08, 0x00, 0x02,       // 40\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x70, 0xC0, 0x01, 0x80, 0x3F,             // 41\n    0x10, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x38, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x10, // 42\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x02,                                                       // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01,             // 44\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,                   // 46\n    0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00, 0x18,       // 47\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00,\n    0xE0, 0x1F,                                                                                           // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0xF8, 0x7F, // 49\n    0x00, 0x00, 0x00, 0x20, 0x40, 0x00, 0x10, 0x60, 0x00, 0x08, 0x50, 0x00, 0x08, 0x48, 0x00, 0x08, 0x44, 0x00, 0x10, 0x43, 0x00,\n    0xE0, 0x40, // 50\n    0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x88, 0x41, 0x00, 0xF0, 0x22, 0x00,\n    0x00, 0x1C, // 51\n    0x00, 0x0C, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x09, 0x00, 0xC0, 0x08, 0x00, 0x20, 0x08, 0x00, 0x10, 0x08, 0x00, 0xF8, 0x7F, 0x00,\n    0x00, 0x08, // 52\n    0x00, 0x00, 0x00, 0xC0, 0x11, 0x00, 0xB8, 0x20, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x08, 0x21, 0x00,\n    0x08, 0x1E, // 53\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x10, 0x21, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x88, 0x40, 0x00, 0x10, 0x21, 0x00,\n    0x20, 0x1E, // 54\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x78, 0x00, 0x88, 0x07, 0x00, 0x68, 0x00, 0x00,\n    0x18, // 55\n    0x00, 0x00, 0x00, 0x60, 0x1C, 0x00, 0x90, 0x22, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x90, 0x22, 0x00,\n    0x60, 0x1C, // 56\n    0x00, 0x00, 0x00, 0xE0, 0x11, 0x00, 0x10, 0x22, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x08, 0x44, 0x00, 0x10, 0x22, 0x00,\n    0xE0, 0x1F,                         // 57\n    0x00, 0x00, 0x00, 0x40, 0x40,       // 58\n    0x00, 0x00, 0x00, 0x40, 0xC0, 0x01, // 59\n    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00,\n    0x40, 0x10, // 60\n    0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00,\n    0x80, 0x08, // 61\n    0x00, 0x00, 0x00, 0x40, 0x10, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00,\n    0x00, 0x02, // 62\n    0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x5C, 0x00, 0x08, 0x02, 0x00, 0x10, 0x01, 0x00,\n    0xE0, // 63\n    0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0xC0, 0x40, 0x00, 0x20, 0x80, 0x00, 0x10, 0x1E, 0x01, 0x10, 0x21, 0x01, 0x88, 0x40, 0x02,\n    0x48, 0x40, 0x02, 0x48, 0x40, 0x02, 0x48, 0x20, 0x02, 0x88, 0x7C, 0x02, 0xC8, 0x43, 0x02, 0x10, 0x40, 0x02, 0x10, 0x20, 0x01,\n    0x60, 0x10, 0x01, 0x80, 0x8F, // 64\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x08, 0x04, 0x00, 0x70, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 65\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x90, 0x22, 0x00, 0x60, 0x1C, // 66\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 67\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 68\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 69\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x08, // 70\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x12, 0x00, 0x00, 0x0E, // 71\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,\n    0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xF8, 0x7F,                                                                         // 72\n    0x00, 0x00, 0x00, 0xF8, 0x7F,                                                                                           // 73\n    0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x3F, // 74\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x03, 0x00, 0x40, 0x04, 0x00,\n    0x20, 0x18, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, // 75\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, // 76\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 77\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x10, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x7F, // 78\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 79\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x10, 0x01, 0x00, 0xE0, // 80\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x50, 0x00,\n    0x08, 0x50, 0x00, 0x10, 0x20, 0x00, 0x20, 0x70, 0x00, 0xC0, 0x4F, // 81\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x0E, 0x00,\n    0x08, 0x1A, 0x00, 0x10, 0x21, 0x00, 0xE0, 0x40, // 82\n    0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x90, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 83\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, // 84\n    0x00, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xF8, 0x1F, // 85\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00,\n    0x00, 0x07, 0x00, 0xE0, 0x00, 0x00, 0x18, // 86\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x03, 0x00, 0x70, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1E, 0x00, 0xE0, 0x01, 0x00,\n    0x18, // 87\n    0x00, 0x40, 0x00, 0x08, 0x20, 0x00, 0x10, 0x18, 0x00, 0x60, 0x04, 0x00, 0x80, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00,\n    0x60, 0x0C, 0x00, 0x10, 0x10, 0x00, 0x08, 0x20, 0x00, 0x00, 0x40, // 88\n    0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x7E, 0x00, 0x80, 0x01, 0x00, 0x40, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x08, // 89\n    0x00, 0x40, 0x00, 0x08, 0x60, 0x00, 0x08, 0x58, 0x00, 0x08, 0x44, 0x00, 0x08, 0x43, 0x00, 0x88, 0x40, 0x00, 0x68, 0x40, 0x00,\n    0x18, 0x40, 0x00, 0x08, 0x40,                                                                                           // 90\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02,                                                 // 91\n    0x18, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x60,                                                       // 92\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF8, 0xFF, 0x03,                                                                   // 93\n    0x00, 0x01, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x01, // 94\n    0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02,\n    0x00, 0x00, 0x02, 0x00, 0x00, 0x02,       // 95\n    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, // 96\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 97\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F,                                                                                                             // 98\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, // 99\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0xF8, 0x7F, // 100\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17,                                                 // 101\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x48, 0x00, 0x00, 0x48, // 102\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x01, 0x80, 0x20, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x40, 0x40, 0x02, 0x80, 0x20, 0x01,\n    0xC0, 0xFF,                                                                                                             // 103\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 104\n    0x00, 0x00, 0x00, 0xC8, 0x7F,                                                                                           // 105\n    0x00, 0x00, 0x02, 0xC8, 0xFF, 0x01,                                                                                     // 106\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x19, 0x00, 0x80, 0x20, 0x00,\n    0x40, 0x40,                   // 107\n    0x00, 0x00, 0x00, 0xF8, 0x7F, // 108\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, 0x00,\n    0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F,                                     // 109\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x7F, // 110\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 111\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 112\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0xC0, 0xFF, 0x03,                                                                                                       // 113\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40,                                           // 114\n    0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x38, // 115\n    0x40, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40,                                                       // 116\n    0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x7F, // 117\n    0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0,       // 118\n    0xC0, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00,\n    0x00, 0x1C, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1F, 0x00, 0xC0,                                                             // 119\n    0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, // 120\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x00, 0xC0, 0x01, 0x00, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0,       // 121\n    0x40, 0x40, 0x00, 0x40, 0x60, 0x00, 0x40, 0x58, 0x00, 0x40, 0x44, 0x00, 0x40, 0x43, 0x00, 0xC0, 0x40, 0x00, 0x40, 0x40, // 122\n    0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xF0, 0xFB, 0x01, 0x08, 0x00, 0x02, 0x08, 0x00, 0x02,                               // 123\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03,                                                                                     // 124\n    0x08, 0x00, 0x02, 0x08, 0x00, 0x02, 0xF0, 0xFB, 0x01, 0x00, 0x04, 0x00, 0x00, 0x04,                                     // 125\n    0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,\n    0x00, 0x01, // 126\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00,\n    0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0xE0, 0x7F, // 127\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x01, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x3E, // 1026\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08,                                                                         // 1027\n    0x00, 0x00, 0x00, 0x00, 0xC0, 0x01,                                                             // 8218\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x40, // 1107\n    0x00, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01,                                           // 8222\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, // 8230\n    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00,\n    0x40, // 8224\n    0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0xF8, 0xFF, 0x03, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00,\n    0x40, 0x40, // 8225\n    0x00, 0x05, 0x00, 0xC0, 0x1F, 0x00, 0x20, 0x25, 0x00, 0x10, 0x45, 0x00, 0x08, 0x45, 0x00, 0x08, 0x45, 0x00, 0x08, 0x45, 0x00,\n    0x10, 0x20, // 8364\n    0xF0, 0x00, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x71, 0x00, 0xF0, 0x0C, 0x00, 0x00, 0x03, 0x00, 0xE0, 0x3C, 0x00,\n    0x18, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x42, 0x00,\n    0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x3C, // 8240\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x3F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41, 0x00, 0x00, 0x3E,                                     // 1033\n    0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, // 8249\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,\n    0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x3E, // 1034\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x82, 0x02, 0x00, 0x61, 0x04, 0x00, 0x10, 0x08, 0x00,\n    0x08, 0x30, 0x00, 0x08, 0x40, // 1036\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x01, 0x00,\n    0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x7E, // 1035\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, // 1039\n    0x10, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x90, 0x00, 0x00, 0x50, 0x00, 0x00, 0x50, 0x00, 0x00, 0x40, 0x00, 0x02, 0x80, 0xFF,\n    0x03,                                                                               // 1106\n    0x00, 0x00, 0x00, 0x38,                                                             // 8216\n    0x00, 0x00, 0x00, 0x38,                                                             // 8217\n    0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,                                           // 8220\n    0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,                         // 8221\n    0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x07, 0x00, 0x80, 0x07, 0x00, 0x00, 0x03, // 8226\n    0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x04, 0x00, 0x00, 0x04, // 8211\n    0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x04, 0x00, 0x00, 0x04, // 8212\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0x20, 0x40, 0x00,\n    0x20, 0x40, 0x00, 0x20, 0x40, 0x00, 0xE0, 0x7F, // 65533\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x18, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x00, 0xE0, 0x00, 0x00, 0x18, 0x00, 0x00,\n    0xF8, 0x01, // 8482\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x3F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00,\n    0xC0, 0x7F, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x64, 0x00, 0x00,\n    0x38,                                                             // 1113\n    0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, // 8250\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xC0, 0x7F, 0x00,\n    0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x38, // 1114\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x10, 0x04, 0x00, 0x08, 0x1B, 0x00, 0xC0, 0x20, 0x00, 0x40,\n    0x40, // 1116\n    0x10, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x90, 0x00, 0x00, 0x50, 0x00, 0x00, 0x50, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80,\n    0x7F, // 1115\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x40, 0x00, 0xC0,\n    0x7F, // 1119\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x40, 0x00, 0x81, 0x41, 0x00, 0x02, 0x66, 0x00, 0x02, 0x18, 0x00, 0x02, 0x06, 0x00,\n    0x81, 0x01, 0x00, 0x60, 0x00, 0x00, 0x18,                                                                         // 1038\n    0xC0, 0x01, 0x00, 0x08, 0x06, 0x02, 0x10, 0x38, 0x02, 0x10, 0xC0, 0x01, 0x10, 0x38, 0x00, 0x08, 0x07, 0x00, 0xC0, // 1118\n    0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8,\n    0x3F, // 1032\n    0x00, 0x00, 0x00, 0x40, 0x0B, 0x00, 0x80, 0x04, 0x00, 0x40, 0x08, 0x00, 0x40, 0x08, 0x00, 0x80, 0x04, 0x00, 0x40, 0x0B, // 164\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x0F,                               // 1168\n    0x00, 0x00, 0x00, 0xF8, 0xF1, 0x03, // 166\n    0x00, 0x86, 0x00, 0x70, 0x09, 0x01, 0xC8, 0x10, 0x02, 0x88, 0x10, 0x02, 0x08, 0x21, 0x02, 0x08, 0x61, 0x02, 0x30, 0xD2, 0x01,\n    0x00, 0x0C, // 167\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00, 0x0A, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 1025\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xC8, 0x47, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00, 0x28, 0x48, 0x00,\n    0x28, 0x48, 0x00, 0x48, 0x44, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 169\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x11, 0x00, 0x10, 0x21, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 1028\n    0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, // 171\n    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00,\n    0x80, 0x0F,                                                       // 172\n    0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, // 173\n    0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0xE8, 0x4F, 0x00, 0x28, 0x41, 0x00, 0x28, 0x41, 0x00, 0x28, 0x43, 0x00,\n    0x28, 0x45, 0x00, 0xC8, 0x48, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 174\n    0x02, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x02,                                           // 1031\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x48, 0x00, 0x00, 0x48, 0x00, 0x00, 0x30,       // 176\n    0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0xE0, 0x4F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41,                                                                                     // 177\n    0x00, 0x00, 0x00, 0xF8, 0x7F,                                                                   // 1030\n    0x00, 0x00, 0x00, 0xC8, 0x7F,                                                                   // 1110\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x78, // 1169\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00,\n    0xC0, 0x7F, // 181\n    0xF0, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0x01, 0x00, 0xF8, 0xFF, 0x03, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0xF8, 0xFF, 0x03, 0x08,                         // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // 183\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x50, 0x44, 0x00, 0x40, 0x44, 0x00, 0x50, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17, // 1105\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x20, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x08, 0x00,\n    0x00, 0x10, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x27, 0x00, 0x40, 0x28, 0x00, 0x40, 0x28, 0x00, 0x40, 0x28, 0x00,\n    0x40, 0x28, 0x00, 0x80, 0x27, // 8470\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x20, 0x00, 0x00,\n    0x11, // 1108\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00,\n    0x00, 0x04,                         // 187\n    0x00, 0x00, 0x02, 0xC8, 0xFF, 0x01, // 1112\n    0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x90, 0x20, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x42, 0x00,\n    0x08, 0x42, 0x00, 0x10, 0x22, 0x00, 0x20, 0x1C, // 1029\n    0x00, 0x00, 0x00, 0x80, 0x23, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80,\n    0x38,                                     // 1109\n    0x10, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x10, // 1111\n    0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1C, 0x00, 0x80, 0x07, 0x00, 0x70, 0x04, 0x00, 0x08, 0x04, 0x00, 0x70, 0x04, 0x00,\n    0x80, 0x07, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, // 1040\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x00, 0x3E, // 1041\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x90, 0x22, 0x00, 0x60, 0x1C, // 1042\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, // 1043\n    0x00, 0xC0, 0x03, 0x00, 0x60, 0x00, 0x00, 0x5C, 0x00, 0xF8, 0x43, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0xC0, 0x03, // 1044\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x08, 0x40, // 1045\n    0x08, 0x30, 0x00, 0x10, 0x08, 0x00, 0x60, 0x04, 0x00, 0x80, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xF8, 0x7F, 0x00,\n    0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00, 0x60, 0x04, 0x00, 0x10, 0x08, 0x00, 0x08, 0x30, 0x00, 0x08,\n    0x40, // 1046\n    0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00, 0x88, 0x42, 0x00,\n    0x70, 0x42, 0x00, 0x00, 0x3C, // 1047\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00,\n    0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 1048\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x01, 0x04, 0x00, 0x02, 0x02, 0x00, 0x02, 0x01, 0x00,\n    0x82, 0x00, 0x00, 0x41, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 1049\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00, 0x60, 0x04, 0x00, 0x10, 0x08, 0x00,\n    0x08, 0x30, 0x00, 0x08, 0x40, // 1050\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x3F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, // 1051\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x30, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x1C, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x7F, // 1052\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,\n    0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xF8, 0x7F, // 1053\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00, 0xC0, 0x0F, // 1054\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, // 1055\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x10, 0x01, 0x00, 0xE0, // 1056\n    0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00,\n    0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, // 1057\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00,\n    0x08, 0x00, 0x00, 0x08, // 1058\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x40, 0x00, 0x80, 0x41, 0x00, 0x00, 0x66, 0x00, 0x00, 0x18, 0x00, 0x00, 0x06, 0x00,\n    0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x18, // 1059\n    0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x40, 0x08, 0x00, 0x20, 0x10, 0x00, 0x20, 0x10, 0x00, 0xF8, 0x7F, 0x00, 0x20, 0x10, 0x00,\n    0x20, 0x10, 0x00, 0x40, 0x08, 0x00, 0x80, 0x07, // 1060\n    0x00, 0x40, 0x00, 0x08, 0x20, 0x00, 0x10, 0x18, 0x00, 0x60, 0x04, 0x00, 0x80, 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x02, 0x00,\n    0x60, 0x0C, 0x00, 0x10, 0x10, 0x00, 0x08, 0x20, 0x00, 0x00, 0x40, // 1061\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0xC0, 0x03, // 1062\n    0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x02, 0x00, 0xF8, 0x7F, // 1063\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, // 1064\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0xC0, 0x03, // 1065\n    0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x3E, // 1066\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F, // 1067\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x41, 0x00,\n    0x00, 0x41, 0x00, 0x00, 0x41, 0x00, 0x00, 0x3E, // 1068\n    0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x41, 0x00, 0x08, 0x41, 0x00,\n    0x08, 0x41, 0x00, 0x10, 0x21, 0x00, 0x20, 0x11, 0x00, 0xC0, 0x0F, // 1069\n    0x00, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0xC0, 0x0F, 0x00, 0x20, 0x10, 0x00,\n    0x10, 0x20, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x08, 0x40, 0x00, 0x10, 0x20, 0x00, 0x20, 0x10, 0x00,\n    0xC0, 0x0F, // 1070\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x40, 0x00, 0x10, 0x21, 0x00, 0x08, 0x1A, 0x00, 0x08, 0x0E, 0x00, 0x08, 0x02, 0x00,\n    0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0x08, 0x02, 0x00, 0xF8, 0x7F, // 1071\n    0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x80, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x42, 0x00, 0x40, 0x22, 0x00,\n    0x80, 0x7F, // 1072\n    0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x90, 0x20, 0x00, 0x48, 0x40, 0x00, 0x48, 0x40, 0x00, 0x48, 0x40, 0x00, 0x88, 0x20, 0x00,\n    0x08, 0x1F, // 1073\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00,\n    0x80, 0x3B,                                                                                     // 1074\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, // 1075\n    0x00, 0xC0, 0x01, 0x00, 0x70, 0x00, 0xC0, 0x4F, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0xC0, 0x7F, 0x00,\n    0x00, 0xC0, 0x01, // 1076\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x24, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00,\n    0x00, 0x17, // 1077\n    0xC0, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,\n    0x00, 0x1B, 0x00, 0xC0, 0x20, 0x00, 0x40, 0x40,                                                       // 1078\n    0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x3B, // 1079\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x30, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0xC0,\n    0x7F, // 1080\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x08, 0x30, 0x00, 0x10, 0x0C, 0x00, 0x10, 0x02, 0x00, 0x90, 0x01, 0x00, 0xC8,\n    0x7F, // 1081\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0xC0, 0x20, 0x00, 0x40,\n    0x40, // 1082\n    0x00, 0x40, 0x00, 0xC0, 0x3F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0,\n    0x7F, // 1083\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00,\n    0x00, 0x06, 0x00, 0xC0, 0x01, 0x00, 0xC0, 0x7F, // 1084\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0xC0,\n    0x7F, // 1085\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 1086\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0,\n    0x7F, // 1087\n    0x00, 0x00, 0x00, 0xC0, 0xFF, 0x03, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00,\n    0x00, 0x1F, // 1088\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80,\n    0x20,                                                                                                             // 1089\n    0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, // 1090\n    0xC0, 0x01, 0x00, 0x00, 0x06, 0x02, 0x00, 0x38, 0x02, 0x00, 0xC0, 0x01, 0x00, 0x38, 0x00, 0x00, 0x07, 0x00, 0xC0, // 1091\n    0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0xF8, 0xFF, 0x03,\n    0x80, 0x20, 0x00, 0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 1092\n    0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1B, 0x00, 0x80, 0x20, 0x00, 0x40,\n    0x40, // 1093\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,\n    0xC0, 0x7F, 0x00, 0x00, 0xC0, 0x03, // 1094\n    0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0xC0,\n    0x7F, // 1095\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, // 1096\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x40, 0x00,\n    0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0xC0, 0x03, // 1097\n    0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00,\n    0x00, 0x44, 0x00, 0x00, 0x38, // 1098\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00,\n    0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x7F, // 1099\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00, 0x00, 0x44, 0x00,\n    0x00, 0x38, // 1100\n    0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x80, 0x20, 0x00, 0x40, 0x44, 0x00, 0x40, 0x44, 0x00, 0x80, 0x24, 0x00, 0x00,\n    0x1F, // 1101\n    0x00, 0x00, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1F, 0x00, 0x80, 0x20, 0x00, 0x40, 0x40, 0x00,\n    0x40, 0x40, 0x00, 0x40, 0x40, 0x00, 0x80, 0x20, 0x00, 0x00, 0x1F, // 1102\n    0x00, 0x00, 0x00, 0x80, 0x63, 0x00, 0x40, 0x14, 0x00, 0x40, 0x0C, 0x00, 0x40, 0x04, 0x00, 0x40, 0x04, 0x00, 0x40, 0x04, 0x00,\n    0xC0, 0x7F, // 1103\n};\n\nconst uint8_t ArialMT_Plain_24_UA[] PROGMEM = {\n    0x18, // Width: 24\n    0x1C, // Height: 28\n    0x20, // First Char: 32\n    0xE0, // Numbers of Chars: 224\n    // Jump Table:\n    0xFF, 0xFF, 0x00, 0x07, // 32= :65535\n    0x00, 0x00, 0x13, 0x08, // 33=!:0\n    0x00, 0x13, 0x1A, 0x09, // 34=\":19\n    0x00, 0x2D, 0x33, 0x0D, // 35=#:45\n    0x00, 0x60, 0x2F, 0x0D, // 36=$:96\n    0x00, 0x8F, 0x4F, 0x15, // 37=%:143\n    0x00, 0xDE, 0x3B, 0x10, // 38=&:222\n    0x01, 0x19, 0x0A, 0x05, // 39=':281\n    0x01, 0x23, 0x1C, 0x08, // 40=(:291\n    0x01, 0x3F, 0x1B, 0x08, // 41=):319\n    0x01, 0x5A, 0x22, 0x09, // 42=*:346\n    0x01, 0x7C, 0x33, 0x0E, // 43=+:380\n    0x01, 0xAF, 0x10, 0x07, // 44=,:431\n    0x01, 0xBF, 0x1B, 0x08, // 45=-:447\n    0x01, 0xDA, 0x0F, 0x07, // 46=.:474\n    0x01, 0xE9, 0x1A, 0x07, // 47=/:489\n    0x02, 0x03, 0x2F, 0x0D, // 48=0:515\n    0x02, 0x32, 0x23, 0x0D, // 49=1:562\n    0x02, 0x55, 0x2F, 0x0D, // 50=2:597\n    0x02, 0x84, 0x2F, 0x0D, // 51=3:644\n    0x02, 0xB3, 0x2F, 0x0D, // 52=4:691\n    0x02, 0xE2, 0x2F, 0x0D, // 53=5:738\n    0x03, 0x11, 0x2F, 0x0D, // 54=6:785\n    0x03, 0x40, 0x2E, 0x0D, // 55=7:832\n    0x03, 0x6E, 0x2F, 0x0D, // 56=8:878\n    0x03, 0x9D, 0x2F, 0x0D, // 57=9:925\n    0x03, 0xCC, 0x0F, 0x07, // 58=::972\n    0x03, 0xDB, 0x10, 0x07, // 59=;:987\n    0x03, 0xEB, 0x2F, 0x0E, // 60=<:1003\n    0x04, 0x1A, 0x2F, 0x0E, // 61==:1050\n    0x04, 0x49, 0x2E, 0x0E, // 62=>:1097\n    0x04, 0x77, 0x2E, 0x0D, // 63=?:1143\n    0x04, 0xA5, 0x5C, 0x18, // 64=@:1189\n    0x05, 0x01, 0x3B, 0x0F, // 65=A:1281\n    0x05, 0x3C, 0x3B, 0x10, // 66=B:1340\n    0x05, 0x77, 0x3F, 0x11, // 67=C:1399\n    0x05, 0xB6, 0x3F, 0x11, // 68=D:1462\n    0x05, 0xF5, 0x3B, 0x10, // 69=E:1525\n    0x06, 0x30, 0x36, 0x0F, // 70=F:1584\n    0x06, 0x66, 0x43, 0x13, // 71=G:1638\n    0x06, 0xA9, 0x3B, 0x11, // 72=H:1705\n    0x06, 0xE4, 0x0F, 0x06, // 73=I:1764\n    0x06, 0xF3, 0x27, 0x0C, // 74=J:1779\n    0x07, 0x1A, 0x3F, 0x10, // 75=K:1818\n    0x07, 0x59, 0x2F, 0x0D, // 76=L:1881\n    0x07, 0x88, 0x43, 0x13, // 77=M:1928\n    0x07, 0xCB, 0x3B, 0x11, // 78=N:1995\n    0x08, 0x06, 0x47, 0x13, // 79=O:2054\n    0x08, 0x4D, 0x3A, 0x10, // 80=P:2125\n    0x08, 0x87, 0x48, 0x13, // 81=Q:2183\n    0x08, 0xCF, 0x3F, 0x11, // 82=R:2255\n    0x09, 0x0E, 0x3B, 0x10, // 83=S:2318\n    0x09, 0x49, 0x36, 0x0E, // 84=T:2377\n    0x09, 0x7F, 0x3B, 0x11, // 85=U:2431\n    0x09, 0xBA, 0x39, 0x0F, // 86=V:2490\n    0x09, 0xF3, 0x5A, 0x17, // 87=W:2547\n    0x0A, 0x4D, 0x3B, 0x0F, // 88=X:2637\n    0x0A, 0x88, 0x3D, 0x10, // 89=Y:2696\n    0x0A, 0xC5, 0x37, 0x0F, // 90=Z:2757\n    0x0A, 0xFC, 0x14, 0x07, // 91=[:2812\n    0x0B, 0x10, 0x1B, 0x07, // 92=\\:2832\n    0x0B, 0x2B, 0x18, 0x07, // 93=]:2859\n    0x0B, 0x43, 0x2A, 0x0C, // 94=^:2883\n    0x0B, 0x6D, 0x34, 0x0D, // 95=_:2925\n    0x0B, 0xA1, 0x12, 0x08, // 96=`:2977\n    0x0B, 0xB3, 0x2F, 0x0D, // 97=a:2995\n    0x0B, 0xE2, 0x33, 0x0E, // 98=b:3042\n    0x0C, 0x15, 0x2B, 0x0C, // 99=c:3093\n    0x0C, 0x40, 0x2F, 0x0E, // 100=d:3136\n    0x0C, 0x6F, 0x2F, 0x0D, // 101=e:3183\n    0x0C, 0x9E, 0x1A, 0x07, // 102=f:3230\n    0x0C, 0xB8, 0x30, 0x0E, // 103=g:3256\n    0x0C, 0xE8, 0x2F, 0x0E, // 104=h:3304\n    0x0D, 0x17, 0x0F, 0x05, // 105=i:3351\n    0x0D, 0x26, 0x10, 0x06, // 106=j:3366\n    0x0D, 0x36, 0x2F, 0x0C, // 107=k:3382\n    0x0D, 0x65, 0x0F, 0x06, // 108=l:3429\n    0x0D, 0x74, 0x47, 0x14, // 109=m:3444\n    0x0D, 0xBB, 0x2F, 0x0E, // 110=n:3515\n    0x0D, 0xEA, 0x2F, 0x0D, // 111=o:3562\n    0x0E, 0x19, 0x33, 0x0E, // 112=p:3609\n    0x0E, 0x4C, 0x30, 0x0E, // 113=q:3660\n    0x0E, 0x7C, 0x1E, 0x08, // 114=r:3708\n    0x0E, 0x9A, 0x2B, 0x0C, // 115=s:3738\n    0x0E, 0xC5, 0x1B, 0x07, // 116=t:3781\n    0x0E, 0xE0, 0x2F, 0x0E, // 117=u:3808\n    0x0F, 0x0F, 0x2A, 0x0B, // 118=v:3855\n    0x0F, 0x39, 0x42, 0x11, // 119=w:3897\n    0x0F, 0x7B, 0x2B, 0x0B, // 120=x:3963\n    0x0F, 0xA6, 0x2A, 0x0C, // 121=y:4006\n    0x0F, 0xD0, 0x2B, 0x0C, // 122=z:4048\n    0x0F, 0xFB, 0x1C, 0x08, // 123={:4091\n    0x10, 0x17, 0x10, 0x06, // 124=|:4119\n    0x10, 0x27, 0x1B, 0x08, // 125=}:4135\n    0x10, 0x42, 0x33, 0x0E, // 126=~:4162\n    0xFF, 0xFF, 0x00, 0x12, // 127:65535\n    0x10, 0x75, 0x4F, 0x15, // 1026=� �..:4213\n    0x10, 0xC4, 0x32, 0x0D, // 1027=� �.:4292\n    0x10, 0xF6, 0x0C, 0x05, // 8218=��.�.:4342\n    0x11, 0x02, 0x22, 0x09, // 1107=�.�..:4354\n    0x11, 0x24, 0x1C, 0x08, // 8222=��.�.:4388\n    0x11, 0x40, 0x4B, 0x18, // 8230=��.�.:4416\n    0x11, 0x8B, 0x32, 0x0D, // 8224=��.� :4491\n    0x11, 0xBD, 0x33, 0x0D, // 8225=��.�.:4541\n    0x11, 0xF0, 0x2F, 0x0D, // 8364=��..�.:4592\n    0x12, 0x1F, 0x63, 0x1A, // 8240=��.��:4639\n    0x12, 0x82, 0x5F, 0x19, // 1033=� �.�:4738\n    0x12, 0xE1, 0x17, 0x08, // 8249=��.�..:4833\n    0x12, 0xF8, 0x5B, 0x18, // 1034=� �.:4856\n    0x13, 0x53, 0x37, 0x0E, // 1036=� �.:4947\n    0x13, 0x8A, 0x4F, 0x16, // 1035=� �..:5002\n    0x13, 0xD9, 0x3B, 0x11, // 1039=� �.:5081\n    0x14, 0x14, 0x30, 0x0E, // 1106=�.�..:5140\n    0x14, 0x44, 0x0A, 0x05, // 8216=��.Ч.:5188\n    0x14, 0x4E, 0x0A, 0x05, // 8217=��.�..:5198\n    0x14, 0x58, 0x1A, 0x08, // 8220=��.�.:5208\n    0x14, 0x72, 0x1A, 0x08, // 8221=��.�.:5234\n    0x14, 0x8C, 0x1B, 0x08, // 8226=��.�.:5260\n    0x14, 0xA7, 0x33, 0x0D, // 8211=��.�..:5287\n    0x14, 0xDA, 0x5F, 0x18, // 8212=��.�..:5338\n    0xFF, 0xFF, 0x00, 0x12, // 65533=��.�.:65535\n    0x15, 0x39, 0x5B, 0x18, // 8482=��..�.:5433\n    0x15, 0x94, 0x53, 0x16, // 1113=�.�..:5524\n    0x15, 0xE7, 0x1B, 0x08, // 8250=��.�.:5607\n    0x16, 0x02, 0x4B, 0x14, // 1114=�.�.:5634\n    0x16, 0x4D, 0x2B, 0x0B, // 1116=�.�.:5709\n    0x16, 0x78, 0x2F, 0x0E, // 1115=�.�.�:5752\n    0x16, 0xA7, 0x2F, 0x0D, // 1119=�.�.:5799\n    0xFF, 0xFF, 0x00, 0x07, // 160=�.� :65535\n    0x16, 0xD6, 0x36, 0x0F, // 1038=� �.:5846\n    0x17, 0x0C, 0x2A, 0x0C, // 1118=�.�.:5900\n    0x17, 0x36, 0x27, 0x0C, // 1032=� �..:5942\n    0x17, 0x5D, 0x33, 0x0D, // 164=�.�.:5981\n    0x17, 0x90, 0x2A, 0x0C, // 1168=�.�.:6032\n    0x17, 0xBA, 0x10, 0x06, // 166=�.�.:6074\n    0x17, 0xCA, 0x2F, 0x0D, // 167=�.�.:6090\n    0x17, 0xF9, 0x3B, 0x10, // 1025=� �.:6137\n    0x18, 0x34, 0x47, 0x12, // 169=�.��:6196\n    0x18, 0x7B, 0x3F, 0x11, // 1028=� �..:6267\n    0x18, 0xBA, 0x27, 0x0D, // 171=�.�.:6330\n    0x18, 0xE1, 0x2F, 0x0E, // 172=�.�.:6369\n    0x19, 0x10, 0x1B, 0x08, // 173=�.�:6416\n    0x19, 0x2B, 0x47, 0x12, // 174=�.�.:6443\n    0x19, 0x72, 0x15, 0x06, // 1031=� �..:6514\n    0x19, 0x87, 0x1E, 0x0A, // 176=�.��:6535\n    0x19, 0xA5, 0x33, 0x0D, // 177=�.�.:6565\n    0x19, 0xD8, 0x0F, 0x06, // 1030=� �. :6616\n    0x19, 0xE7, 0x0F, 0x05, // 1110=�.�..:6631\n    0x19, 0xF6, 0x22, 0x0A, // 1169=�.�.:6646\n    0x1A, 0x18, 0x2F, 0x0E, // 181=�.�.:6680\n    0x1A, 0x47, 0x32, 0x0D, // 182=�.�.:6727\n    0x1A, 0x79, 0x13, 0x08, // 183=�.��:6777\n    0x1A, 0x8C, 0x2F, 0x0D, // 1105=�.�.:6796\n    0x1A, 0xBB, 0x63, 0x1A, // 8470=��..�..:6843\n    0x1B, 0x1E, 0x2B, 0x0C, // 1108=�.�..:6942\n    0x1B, 0x49, 0x2F, 0x0D, // 187=�.�.:6985\n    0x1B, 0x78, 0x10, 0x06, // 1112=�.Ч.:7032\n    0x1B, 0x88, 0x3B, 0x10, // 1029=� �..:7048\n    0x1B, 0xC3, 0x2B, 0x0C, // 1109=�.�..:7107\n    0x1B, 0xEE, 0x16, 0x06, // 1111=�.�..:7150\n    0x1C, 0x04, 0x3B, 0x0F, // 1040=� �.:7172\n    0x1C, 0x3F, 0x3B, 0x10, // 1041=� �.:7231\n    0x1C, 0x7A, 0x3B, 0x10, // 1042=� �..:7290\n    0x1C, 0xB5, 0x32, 0x0D, // 1043=� �..:7349\n    0x1C, 0xE7, 0x40, 0x10, // 1044=� �..:7399\n    0x1D, 0x27, 0x3B, 0x10, // 1045=� �..:7463\n    0x1D, 0x62, 0x57, 0x16, // 1046=� �..:7522\n    0x1D, 0xB9, 0x37, 0x0F, // 1047=� �..:7609\n    0x1D, 0xF0, 0x3B, 0x11, // 1048=� Ч.:7664\n    0x1E, 0x2B, 0x3B, 0x11, // 1049=� �..:7723\n    0x1E, 0x66, 0x37, 0x0E, // 1050=� �.:7782\n    0x1E, 0x9D, 0x37, 0x10, // 1051=� �.�:7837\n    0x1E, 0xD4, 0x43, 0x13, // 1052=� �.:7892\n    0x1F, 0x17, 0x3B, 0x11, // 1053=� �.:7959\n    0x1F, 0x52, 0x47, 0x13, // 1054=� �.:8018\n    0x1F, 0x99, 0x3B, 0x11, // 1055=� �.:8089\n    0x1F, 0xD4, 0x3A, 0x10, // 1056=� � :8148\n    0x20, 0x0E, 0x3F, 0x11, // 1057=� �.:8206\n    0x20, 0x4D, 0x36, 0x0E, // 1058=� �.:8269\n    0x20, 0x83, 0x36, 0x0F, // 1059=� �.:8323\n    0x20, 0xB9, 0x43, 0x12, // 1060=� �.:8377\n    0x20, 0xFC, 0x3B, 0x0F, // 1061=� �.:8444\n    0x21, 0x37, 0x44, 0x12, // 1062=� �.:8503\n    0x21, 0x7B, 0x37, 0x10, // 1063=� �.:8571\n    0x21, 0xB2, 0x53, 0x16, // 1064=� �.:8626\n    0x22, 0x05, 0x5C, 0x17, // 1065=� ��:8709\n    0x22, 0x61, 0x47, 0x13, // 1066=� �.:8801\n    0x22, 0xA8, 0x4B, 0x15, // 1067=� �.:8872\n    0x22, 0xF3, 0x3B, 0x10, // 1068=� �.:8947\n    0x23, 0x2E, 0x3F, 0x11, // 1069=� �:9006\n    0x23, 0x6D, 0x5B, 0x18, // 1070=� �.:9069\n    0x23, 0xC8, 0x3B, 0x11, // 1071=� �.:9160\n    0x24, 0x03, 0x2F, 0x0D, // 1072=� ��:9219\n    0x24, 0x32, 0x33, 0x0E, // 1073=� �.:9266\n    0x24, 0x65, 0x2F, 0x0D, // 1074=� �.:9317\n    0x24, 0x94, 0x22, 0x09, // 1075=� �.:9364\n    0x24, 0xB6, 0x34, 0x0E, // 1076=� �.:9398\n    0x24, 0xEA, 0x2F, 0x0D, // 1077=� �.:9450\n    0x25, 0x19, 0x3B, 0x10, // 1078=� �.:9497\n    0x25, 0x54, 0x27, 0x0B, // 1079=� ��:9556\n    0x25, 0x7B, 0x2F, 0x0D, // 1080=� �.:9595\n    0x25, 0xAA, 0x2F, 0x0D, // 1081=� �..:9642\n    0x25, 0xD9, 0x2B, 0x0B, // 1082=� �.:9689\n    0x26, 0x04, 0x2F, 0x0E, // 1083=� �.:9732\n    0x26, 0x33, 0x3B, 0x11, // 1084=� �:9779\n    0x26, 0x6E, 0x2F, 0x0D, // 1085=� �.:9838\n    0x26, 0x9D, 0x2F, 0x0D, // 1086=� �.:9885\n    0x26, 0xCC, 0x2F, 0x0D, // 1087=� �.:9932\n    0x26, 0xFB, 0x33, 0x0E, // 1088=�.�.:9979\n    0x27, 0x2E, 0x2B, 0x0C, // 1089=�.�.:10030\n    0x27, 0x59, 0x26, 0x0B, // 1090=�.�..:10073\n    0x27, 0x7F, 0x2A, 0x0C, // 1091=�.�.:10111\n    0x27, 0xA9, 0x4B, 0x14, // 1092=�.�..:10153\n    0x27, 0xF4, 0x2B, 0x0B, // 1093=�.�..:10228\n    0x28, 0x1F, 0x34, 0x0E, // 1094=�.�. :10271\n    0x28, 0x53, 0x2B, 0x0D, // 1095=�.�..:10323\n    0x28, 0x7E, 0x47, 0x13, // 1096=�.�..:10366\n    0x28, 0xC5, 0x4C, 0x14, // 1097=�.�.�:10437\n    0x29, 0x11, 0x37, 0x0F, // 1098=�.�.:10513\n    0x29, 0x48, 0x3B, 0x11, // 1099=�.�..:10568\n    0x29, 0x83, 0x2F, 0x0D, // 1100=�.�.:10627\n    0x29, 0xB2, 0x2B, 0x0C, // 1101=�.�.:10674\n    0x29, 0xDD, 0x43, 0x12, // 1102=�.�.:10717\n    0x2A, 0x20, 0x2B, 0x0D, // 1103=�.�.:10784\n    // Font Data:\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xCF, 0x00, 0x80, 0xFF, 0xCF, // 33\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,\n    0x1F, 0x00, 0x00, 0x80, 0x1F, // 34\n    0x00, 0x30, 0x0C, 0x00, 0x00, 0x30, 0xCC, 0x00, 0x00, 0x30, 0xFE, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x80,\n    0x3F, 0x0C, 0x00, 0x80, 0x31, 0xCC, 0x00, 0x00, 0x30, 0xFE, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0xFE, 0x0D, 0x00, 0x80, 0x3F,\n    0x0C, 0x00, 0x80, 0x31, 0x0C, 0x00, 0x00, 0x30, 0x0C, // 35\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x18, 0x00, 0x00, 0x3F, 0x78, 0x00, 0x00, 0x63, 0x70, 0x00, 0x80, 0x61, 0xE0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0x81, 0xC1, 0x00, 0x00, 0x83, 0x61, 0x00, 0x00, 0x07,\n    0x7F, 0x00, 0x00, 0x04, 0x1E, // 36\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80,\n    0x80, 0x80, 0x00, 0x80, 0xC1, 0xE0, 0x00, 0x00, 0x7F, 0x78, 0x00, 0x00, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0,\n    0x03, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x3C, 0x3E, 0x00, 0x00, 0x0F, 0x7F, 0x00, 0x80, 0x83, 0xC1, 0x00, 0x80, 0x80, 0x80,\n    0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x3E, // 37\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x8E, 0x73, 0x00, 0x00, 0xDF, 0xE1, 0x00, 0x80,\n    0xF3, 0xC0, 0x00, 0x80, 0xE1, 0xC0, 0x00, 0x80, 0xE1, 0xC1, 0x00, 0x80, 0xB3, 0xE3, 0x00, 0x00, 0x3F, 0x6E, 0x00, 0x00, 0x0E,\n    0x7C, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0xE2, 0x00, 0x00, 0x00, 0x40, // 38\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x80, 0x1F,                                           // 39\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x3F, 0x00, 0x00, 0xF8, 0xFF, 0x01, 0x00, 0x3E, 0xC0, 0x07, 0x00, 0x07, 0x00, 0x0E, 0x80,\n    0x01, 0x00, 0x18, 0x80, 0x00, 0x00, 0x10, // 40\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x10, 0x80, 0x01, 0x00, 0x18, 0x00, 0x07, 0x00, 0x0E, 0x00, 0x3E, 0xC0, 0x07, 0x00,\n    0xF8, 0xFF, 0x01, 0x00, 0xC0, 0x3F, // 41\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x80,\n    0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x02, // 42\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0x80, 0x01, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,                                           // 43\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0xC0, 0x07, // 44\n    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06,                                                       // 45\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, // 46\n    0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x80,\n    0x0F, 0x00, 0x00, 0x80, 0x01, // 47\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x07, 0x70, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x80,\n    0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xF8, 0x0F, // 48\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 49\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC0, 0x00, 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x03, 0xF0, 0x00, 0x80, 0x01, 0xD8, 0x00, 0x80,\n    0x01, 0xCC, 0x00, 0x80, 0x01, 0xC6, 0x00, 0x80, 0x01, 0xC3, 0x00, 0x80, 0x81, 0xC1, 0x00, 0x00, 0xC3, 0xC0, 0x00, 0x00, 0x7F,\n    0xC0, 0x00, 0x00, 0x3C, 0xC0, // 50\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x03, 0x70, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x00, 0xE3, 0xC0, 0x00, 0x00, 0xBF, 0x61, 0x00, 0x00, 0x1E,\n    0x3F, 0x00, 0x00, 0x00, 0x1E, // 51\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF0, 0x0C, 0x00, 0x00,\n    0x38, 0x0C, 0x00, 0x00, 0x1E, 0x0C, 0x00, 0x00, 0x07, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00,\n    0x0C, 0x00, 0x00, 0x00, 0x0C, // 52\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x18, 0x00, 0x00, 0xFE, 0x38, 0x00, 0x80, 0x7F, 0x60, 0x00, 0x80, 0x21, 0xC0, 0x00, 0x80,\n    0x31, 0xC0, 0x00, 0x80, 0x31, 0xC0, 0x00, 0x80, 0x31, 0xC0, 0x00, 0x80, 0x31, 0xC0, 0x00, 0x80, 0x61, 0x70, 0x00, 0x80, 0xC1,\n    0x3F, 0x00, 0x00, 0x80, 0x0F, // 53\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x8F, 0x71, 0x00, 0x00, 0xC3, 0xE0, 0x00, 0x80,\n    0x61, 0xC0, 0x00, 0x80, 0x61, 0xC0, 0x00, 0x80, 0x61, 0xC0, 0x00, 0x80, 0x61, 0xC0, 0x00, 0x80, 0xC3, 0x60, 0x00, 0x00, 0xC7,\n    0x3F, 0x00, 0x00, 0x06, 0x1F, // 54\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80,\n    0x01, 0xFE, 0x00, 0x80, 0xC1, 0x0F, 0x00, 0x80, 0xE1, 0x01, 0x00, 0x80, 0x39, 0x00, 0x00, 0x80, 0x0D, 0x00, 0x00, 0x80, 0x07,\n    0x00, 0x00, 0x80, 0x01, // 55\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x1E, 0x7F, 0x00, 0x00, 0xBF, 0x61, 0x00, 0x80, 0xE3, 0xC0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xE3, 0xC0, 0x00, 0x00, 0xBF, 0x61, 0x00, 0x00, 0x1E,\n    0x7F, 0x00, 0x00, 0x00, 0x1E, // 56\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x30, 0x00, 0x00, 0xFE, 0x71, 0x00, 0x00, 0x87, 0xE1, 0x00, 0x80, 0x01, 0xC3, 0x00, 0x80,\n    0x01, 0xC3, 0x00, 0x80, 0x01, 0xC3, 0x00, 0x80, 0x01, 0xC3, 0x00, 0x80, 0x81, 0x61, 0x00, 0x00, 0xC7, 0x78, 0x00, 0x00, 0xFE,\n    0x3F, 0x00, 0x00, 0xF8, 0x07,                                                                   // 57\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0,       // 58\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC0, 0x0C, 0x00, 0x18, 0xC0, 0x07, // 59\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00,\n    0x60, 0x03, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x18,\n    0x0C, 0x00, 0x00, 0x0C, 0x18, // 60\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00,\n    0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x30,\n    0x06, 0x00, 0x00, 0x30, 0x06, // 61\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00,\n    0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xC0,\n    0x01, 0x00, 0x00, 0x80, // 62\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80,\n    0x01, 0xCE, 0x00, 0x80, 0x01, 0xCF, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x00, 0xE3, 0x00, 0x00, 0x00, 0x7F,\n    0x00, 0x00, 0x00, 0x1C, // 63\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0x00, 0x78, 0xC0, 0x03, 0x00, 0x1C, 0x00, 0x07, 0x00,\n    0x0E, 0x1F, 0x06, 0x00, 0xC7, 0x7F, 0x0E, 0x00, 0xE3, 0x60, 0x0C, 0x00, 0x33, 0xC0, 0x0C, 0x80, 0x39, 0xC0, 0x18, 0x80, 0x19,\n    0xC0, 0x18, 0x80, 0x19, 0x60, 0x18, 0x80, 0x19, 0x30, 0x18, 0x80, 0x31, 0x78, 0x18, 0x80, 0xE1, 0xFF, 0x18, 0x80, 0xFB, 0xC7,\n    0x18, 0x00, 0x3B, 0xC0, 0x18, 0x00, 0x07, 0x60, 0x0C, 0x00, 0x0E, 0x70, 0x0C, 0x00, 0x1C, 0x3C, 0x06, 0x00, 0xF8, 0x1F, 0x06,\n    0x00, 0xE0, 0x07, 0x03, 0x00, 0x00, 0x00, 0x01, // 64\n    0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00,\n    0x3E, 0x06, 0x00, 0x80, 0x0F, 0x06, 0x00, 0x80, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x06, 0x00, 0x00, 0x3E, 0x06, 0x00, 0x00, 0xF8,\n    0x07, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xC0, // 65\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC0, 0x00, 0x00, 0xE3, 0xC1, 0x00, 0x00, 0xFF, 0x61, 0x00, 0x00, 0x1E, 0x7F, 0x00, 0x00, 0x00, 0x1E, // 66\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00,\n    0x03, 0x60, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01,\n    0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x0E, 0x3C, 0x00, 0x00, 0x08,\n    0x0C, // 67\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80,\n    0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01,\n    0xC0, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF0,\n    0x07, // 68\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0x01, 0xC0, // 69\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80,\n    0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1,\n    0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0x01, // 70\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00,\n    0x03, 0x60, 0x00, 0x80, 0x03, 0x60, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x81,\n    0xC1, 0x00, 0x80, 0x81, 0xC1, 0x00, 0x80, 0x83, 0xC1, 0x00, 0x00, 0x83, 0x61, 0x00, 0x00, 0x87, 0x61, 0x00, 0x00, 0x8E, 0x3F,\n    0x00, 0x00, 0x88, 0x3F, // 71\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 72\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF,             // 73\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, // 74\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,\n    0xC0, 0x01, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x9C, 0x07, 0x00, 0x00, 0x0E,\n    0x1E, 0x00, 0x00, 0x07, 0x3C, 0x00, 0x80, 0x03, 0x78, 0x00, 0x80, 0x01, 0xE0, 0x00, 0x80, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0x80, // 75\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, // 76\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00,\n    0x3F, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xFC, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0xFF, 0xFF,\n    0x00, 0x80, 0xFF, 0xFF, // 77\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 78\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00,\n    0x03, 0x60, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01,\n    0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x1E, 0x3C,\n    0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF0, 0x07, // 79\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80,\n    0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81,\n    0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x3C, // 80\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07, 0x30, 0x00, 0x00,\n    0x03, 0x60, 0x00, 0x80, 0x03, 0x60, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01,\n    0xD8, 0x00, 0x80, 0x01, 0xD8, 0x00, 0x80, 0x03, 0xF0, 0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x1E, 0xFC,\n    0x00, 0x00, 0xFC, 0xDF, 0x01, 0x00, 0xF0, 0x87, 0x01, // 81\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80,\n    0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x01, 0x00, 0x80, 0xC1, 0x03, 0x00, 0x80, 0xC1,\n    0x0F, 0x00, 0x80, 0xC1, 0x1E, 0x00, 0x80, 0x63, 0x7C, 0x00, 0x00, 0x7F, 0xF0, 0x00, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00,\n    0x80, // 82\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0x7F, 0x70, 0x00, 0x00, 0x63, 0x60, 0x00, 0x80,\n    0xE1, 0xE0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC1, 0x00, 0x80, 0x83, 0xE1, 0x00, 0x00, 0x87, 0x63, 0x00, 0x00, 0x0E, 0x3F, 0x00, 0x00, 0x0C, 0x1E, // 83\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 84\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,\n    0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x0F, // 85\n    0x80, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00,\n    0x00, 0x3F, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0xE0,\n    0x07, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, // 86\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x80, 0x0F,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x80, 0x3F,\n    0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xFE, 0x03, 0x00,\n    0x80, 0x1F, 0x00, 0x00, 0x80, 0x01, // 87\n    0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x07, 0x78, 0x00, 0x00, 0x0F, 0x1E, 0x00, 0x00,\n    0x3C, 0x0F, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0x1E, 0x0F, 0x00, 0x00, 0x0F,\n    0x1C, 0x00, 0x80, 0x07, 0x78, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x80, // 88\n    0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,\n    0x78, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x78,\n    0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, // 89\n    0x00, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xE0, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x01, 0xDC, 0x00, 0x80, 0x01, 0xCE, 0x00, 0x80,\n    0x01, 0xC7, 0x00, 0x80, 0x81, 0xC3, 0x00, 0x80, 0xE1, 0xC0, 0x00, 0x80, 0x71, 0xC0, 0x00, 0x80, 0x39, 0xC0, 0x00, 0x80, 0x1D,\n    0xC0, 0x00, 0x80, 0x07, 0xC0, 0x00, 0x80, 0x03, 0xC0, 0x00, 0x80, 0x01, 0xC0,                                           // 90\n    0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 0x80, 0xFF, 0xFF, 0x1F, 0x80, 0x01, 0x00, 0x18, 0x80, 0x01, 0x00, 0x18, // 91\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00,\n    0x00, 0xF8, 0x00, 0x00, 0x00, 0xC0, // 92\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x80, 0x01, 0x00, 0x18, 0x80, 0xFF, 0xFF, 0x1F, 0x80,\n    0xFF, 0xFF, 0x1F, // 93\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80,\n    0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00,\n    0x80, // 94\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00,\n    0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,\n    0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18,                                                 // 95\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x02, // 96\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x38, 0x00, 0x00, 0x70, 0x7C, 0x00, 0x00, 0x30, 0xE6, 0x00, 0x00, 0x18, 0xC6, 0x00, 0x00,\n    0x18, 0xC6, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0x63, 0x00, 0x00, 0x38, 0x63, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xE0,\n    0xFF, 0x00, 0x00, 0x00, 0x80, // 97\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00,\n    0x30, 0x60, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70,\n    0x70, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x80, 0x0F, // 98\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x60,\n    0x30, // 99\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x70, 0x30, 0x00, 0x80, 0xFF,\n    0xFF, 0x00, 0x80, 0xFF, 0xFF, // 100\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x73, 0x00, 0x00, 0x38, 0xE3, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x38, 0xE3, 0x00, 0x00, 0x70, 0x63, 0x00, 0x00, 0xE0,\n    0x33, 0x00, 0x00, 0xC0, 0x13, // 101\n    0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x19, 0x00, 0x00, 0x80,\n    0x19, 0x00, 0x00, 0x80, 0x19, // 102\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0F, 0x06, 0x00, 0xE0, 0x3F, 0x0E, 0x00, 0x70, 0x70, 0x1C, 0x00, 0x38, 0xE0, 0x18, 0x00,\n    0x18, 0xC0, 0x18, 0x00, 0x18, 0xC0, 0x18, 0x00, 0x18, 0xC0, 0x18, 0x00, 0x30, 0x60, 0x1C, 0x00, 0x60, 0x30, 0x0E, 0x00, 0xF8,\n    0xFF, 0x07, 0x00, 0xF8, 0xFF, 0x03, // 103\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF0,\n    0xFF, 0x00, 0x00, 0xE0, 0xFF,                                                                   // 104\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF9, 0xFF, 0x00, 0x80, 0xF9, 0xFF,       // 105\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x80, 0xF9, 0xFF, 0x1F, 0x80, 0xF9, 0xFF, 0x0F, // 106\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,\n    0x80, 0x03, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x60, 0x1E, 0x00, 0x00, 0x30, 0x38, 0x00, 0x00, 0x18, 0xF0, 0x00, 0x00, 0x08,\n    0xC0, 0x00, 0x00, 0x00, 0x80,                                                             // 107\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 108\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x00, 0x00, 0xE0,\n    0xFF, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00,\n    0x00, 0x00, 0xF0, 0xFF, 0x00, 0x00, 0xE0, 0xFF, // 109\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF0,\n    0xFF, 0x00, 0x00, 0xE0, 0xFF, // 110\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0xE0,\n    0x3F, 0x00, 0x00, 0xC0, 0x1F, // 111\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0x60, 0x30, 0x00, 0x00,\n    0x30, 0x60, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70,\n    0x70, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xC0, 0x0F, // 112\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 0xF8,\n    0xFF, 0x1F, 0x00, 0xF8, 0xFF, 0x1F, // 113\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, // 114\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x30, 0x00, 0x00, 0xF0, 0x71, 0x00, 0x00, 0xB8, 0xE3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC7, 0x00, 0x00, 0x18, 0xC7, 0x00, 0x00, 0x38, 0xE6, 0x00, 0x00, 0x70, 0x7E, 0x00, 0x00, 0x60,\n    0x3C, // 115\n    0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, // 116\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x3F, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 117\n    0x00, 0x18, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00,\n    0x00, 0xE0, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00,\n    0x18, // 118\n    0x00, 0x38, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00,\n    0x00, 0x7E, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x80,\n    0x0F, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF8, 0x01,\n    0x00, 0x00, 0x38, // 119\n    0x00, 0x08, 0x80, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x78, 0xF0, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00,\n    0x00, 0x07, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0x70, 0xF0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x08,\n    0x80, // 120\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x18, 0x00, 0xC0, 0x07, 0x18, 0x00, 0x00, 0x3E, 0x1C, 0x00,\n    0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00,\n    0x18, // 121\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x18, 0xF0, 0x00, 0x00, 0x18, 0xF8, 0x00, 0x00, 0x18, 0xDC, 0x00, 0x00,\n    0x18, 0xCF, 0x00, 0x00, 0x98, 0xC3, 0x00, 0x00, 0xD8, 0xC1, 0x00, 0x00, 0xF8, 0xC0, 0x00, 0x00, 0x78, 0xC0, 0x00, 0x00, 0x18,\n    0xC0, // 122\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0xFF, 0xF9, 0x0F, 0x80, 0xFF, 0xF0, 0x1F, 0x80,\n    0x01, 0x00, 0x18, 0x80, 0x01, 0x00, 0x18,                                                       // 123\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x3F, 0x80, 0xFF, 0xFF, 0x3F, // 124\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x80, 0x01, 0x00, 0x18, 0x80, 0xFF, 0xF0, 0x1F, 0x00, 0xFF, 0xFD, 0x0F, 0x00,\n    0x00, 0x0F, 0x00, 0x00, 0x00, 0x06, // 125\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n    0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x01, // 126\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1,\n    0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x80, 0x61, 0x60, 0x00, 0x80, 0x61, 0xC0, 0x00, 0x80, 0x61, 0xC0, 0x00, 0x00, 0x60, 0xC0,\n    0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0xC0, 0x71, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x1F, // 1026\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0xA0, 0x01, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x98, 0x01, 0x00, 0x00, 0x88, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,                         // 1027\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0xC0, 0x07, // 8218\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x80,\n    0x1B, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x80, 0x18, 0x00, 0x00, 0x00, 0x18, // 1107\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x0C, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0xC0, 0x0C, 0x00, 0x00, 0xC0, 0x07, // 8222\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, // 8230\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,\n    0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, // 8224\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18,\n    0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, // 8225\n    0x00, 0x30, 0x03, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x36, 0x3B, 0x00, 0x00, 0x33, 0x73, 0x00, 0x00,\n    0x33, 0x63, 0x00, 0x80, 0x31, 0xC3, 0x00, 0x80, 0x31, 0xC3, 0x00, 0x80, 0x31, 0xC3, 0x00, 0x80, 0x31, 0xC3, 0x00, 0x80, 0x31,\n    0xC0, 0x00, 0x00, 0x03, 0x60, // 8364\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80,\n    0xC1, 0xE0, 0x00, 0x00, 0x7F, 0xF8, 0x00, 0x00, 0x3E, 0x3E, 0x00, 0x00, 0xC0, 0x07, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x3E,\n    0x3E, 0x00, 0x80, 0x0F, 0x7F, 0x00, 0x80, 0x81, 0xC1, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x00, 0x7F,\n    0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x80, 0xC1, 0x00,\n    0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x3E, // 8240\n    0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0,\n    0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00,\n    0x00, 0x80, 0x61, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x1E, // 1033\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00,\n    0x10, 0x40, // 8249\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0,\n    0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0x61, 0x00,\n    0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x1E, // 1034\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x20, 0x60, 0x03, 0x00, 0x38, 0x78, 0x07, 0x00, 0x18, 0x1E, 0x0E, 0x00, 0x08, 0x07,\n    0x38, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0x80, // 1036\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1,\n    0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x00, 0x60, 0x00,\n    0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0xFF, // 1035\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1039\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00,\n    0x33, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x38, 0x00, 0x18, 0x00, 0xF0,\n    0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x0F,                         // 1106\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0x19, // 8216\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x80, 0x0F, // 8217\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x1F, 0x00, 0x00, 0x80, 0x19, // 8220\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,\n    0x19, 0x00, 0x00, 0x80, 0x0F, // 8221\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00, 0xE0, 0x07, 0x00, 0x00,\n    0xE0, 0x07, 0x00, 0x00, 0xC0, 0x03, // 8226\n    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, // 8211\n    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,\n    0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06,\n    0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00,\n    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, // 8212\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x1E, 0x00,\n    0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,\n    0x80, 0xFF, 0x01, 0x00, 0x80, 0xFF, 0x01, // 8482\n    0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18,\n    0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3,\n    0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00,\n    0x3C, // 1113\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00,\n    0x80, 0x0F, 0x00, 0x00, 0x00, 0x02, // 8250\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3,\n    0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x3C, // 1114\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x02, 0x02, 0x00, 0x80,\n    0x03, 0x07, 0x00, 0x80, 0xC1, 0x0D, 0x00, 0x80, 0xF0, 0x38, 0x00, 0x00, 0x18, 0x70, 0x00, 0x00, 0x18, 0xE0, 0x00, 0x00, 0x00,\n    0x80, // 1116\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00,\n    0x33, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF0,\n    0xFF, 0x00, 0x00, 0xE0, 0xFF, // 1115\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1119\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x1E, 0xC0, 0x00, 0x18, 0x78, 0xC0, 0x00, 0x30,\n    0xE0, 0xC1, 0x00, 0x20, 0x80, 0x77, 0x00, 0x20, 0x00, 0x3E, 0x00, 0x20, 0x80, 0x07, 0x00, 0x30, 0xE0, 0x01, 0x00, 0x18, 0x78,\n    0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x01, // 1038\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x18, 0x80, 0xC1, 0x07, 0x18, 0x00, 0x03, 0x3E, 0x1C, 0x00,\n    0x02, 0xF8, 0x0F, 0x00, 0x02, 0xF0, 0x03, 0x00, 0x02, 0x7F, 0x00, 0x00, 0xE3, 0x0F, 0x00, 0x80, 0xF9, 0x00, 0x00, 0x00,\n    0x18, // 1118\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, // 1032\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0xDC, 0x3B, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x30, 0x0C, 0x00, 0x00,\n    0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x30, 0x0C, 0x00, 0x00, 0xF8,\n    0x1F, 0x00, 0x00, 0xDC, 0x3B, 0x00, 0x00, 0x08, 0x10, // 164\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0xFC,\n    0x01,                                                                                           // 1168\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xE1, 0x3F, 0x80, 0xFF, 0xE1, 0x3F, // 166\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xCE, 0x07, 0x03, 0x00, 0x7F, 0x0C, 0x0F, 0x80, 0x33, 0x1C, 0x0C, 0x80,\n    0x71, 0x18, 0x18, 0x80, 0x61, 0x30, 0x18, 0x80, 0xC1, 0x70, 0x18, 0x80, 0xC3, 0xE1, 0x1C, 0x00, 0x87, 0xD3, 0x0F, 0x00, 0x06,\n    0x9F, 0x07, 0x00, 0x00, 0x0E, // 167\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0xB0,\n    0xC1, 0xC0, 0x00, 0xB0, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0xB0, 0xC1, 0xC0, 0x00, 0xB0, 0xC1,\n    0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0x01, 0xC0, // 1025\n    0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0xE7, 0x71, 0x00, 0x00,\n    0xFB, 0x67, 0x00, 0x80, 0x19, 0xC6, 0x00, 0x80, 0x0D, 0xCC, 0x00, 0x80, 0x0D, 0xCC, 0x00, 0x80, 0x0D, 0xCC, 0x00, 0x80, 0x0D,\n    0xCC, 0x00, 0x80, 0x1D, 0xCE, 0x00, 0x00, 0x1B, 0x66, 0x00, 0x00, 0x17, 0x72, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x1C, 0x1C,\n    0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xE0, 0x03, // 169\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xCE, 0x3C, 0x00, 0x00, 0xC7, 0x70, 0x00, 0x00,\n    0xC3, 0x60, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0x01,\n    0xC0, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x0F, 0x78, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x08,\n    0x08, // 1028\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00,\n    0x10, 0x42, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x10, 0x40, // 171\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xF0,\n    0x07, 0x00, 0x00, 0xF0, 0x07, // 172\n    0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,\n    0x00, 0x06, 0x00, 0x00, 0x00, 0x06, // 173\n    0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00,\n    0xFB, 0x6F, 0x00, 0x80, 0xF9, 0xCF, 0x00, 0x80, 0x99, 0xC1, 0x00, 0x80, 0x99, 0xC1, 0x00, 0x80, 0x99, 0xC3, 0x00, 0x80, 0xF9,\n    0xC7, 0x00, 0x80, 0xF1, 0xCC, 0x00, 0x00, 0x03, 0x68, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x1C, 0x1C,\n    0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xE0, 0x03, // 174\n    0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x30, 0x00, 0x00, 0x00,\n    0x30, // 1031\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80,\n    0x20, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0E, // 176\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00,\n    0x80, 0xC1, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80,\n    0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1,                                     // 177\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1030\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF9, 0xFF, 0x00, 0x80, 0xF9, 0xFF, // 1110\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x80, 0x1F, // 1169\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0x00, 0x60, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 181\n    0x00, 0x3C, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x80,\n    0xFF, 0xFF, 0x1F, 0x80, 0xFF, 0xFF, 0x1F, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 0x80, 0xFF,\n    0xFF, 0x1F, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,                                                                   // 182\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 183\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x73, 0x00, 0x00, 0x3B, 0xE3, 0x00, 0x00,\n    0x1B, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x3B, 0xE3, 0x00, 0x00, 0x73, 0x63, 0x00, 0x00, 0xE0,\n    0x33, 0x00, 0x00, 0xC0, 0x13, // 1105\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,\n    0x1C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00,\n    0x0E, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x78, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x63, 0x00, 0x00, 0xF0, 0x67, 0x00, 0x00, 0x38, 0x6E, 0x00, 0x00, 0x18, 0x6C, 0x00,\n    0x00, 0x18, 0x6C, 0x00, 0x00, 0x38, 0x6E, 0x00, 0x00, 0xF0, 0x67, 0x00, 0x00, 0xE0, 0x63, // 8470\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x70, 0x73, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0x60, 0x00, 0x00, 0x70, 0x78, 0x00, 0x00, 0x60,\n    0x18, // 1108\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00,\n    0xE0, 0x3D, 0x00, 0x00, 0x80, 0x0F, 0x00, 0x00, 0x10, 0x42, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00, 0x80,\n    0x0F, 0x00, 0x00, 0x00, 0x02,                                                                   // 187\n    0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x80, 0xF9, 0xFF, 0x1F, 0x80, 0xF9, 0xFF, 0x0F, // 1112\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x3C, 0x00, 0x00, 0x7F, 0x70, 0x00, 0x00, 0x63, 0x60, 0x00, 0x80,\n    0xE1, 0xE0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC1, 0x00, 0x80, 0x83, 0xE1, 0x00, 0x00, 0x87, 0x63, 0x00, 0x00, 0x0E, 0x3F, 0x00, 0x00, 0x0C, 0x1E, // 1029\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x30, 0x00, 0x00, 0xF0, 0x71, 0x00, 0x00, 0xB8, 0xE3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC7, 0x00, 0x00, 0x18, 0xC7, 0x00, 0x00, 0x38, 0xE6, 0x00, 0x00, 0x70, 0x7E, 0x00, 0x00, 0x60,\n    0x3C, // 1109\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,\n    0x03, // 1111\n    0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00,\n    0x3E, 0x06, 0x00, 0x80, 0x0F, 0x06, 0x00, 0x80, 0x01, 0x06, 0x00, 0x80, 0x0F, 0x06, 0x00, 0x00, 0x3E, 0x06, 0x00, 0x00, 0xF8,\n    0x07, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xC0, // 1040\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0x81, 0x61, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x1E, // 1041\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC0, 0x00, 0x00, 0xE3, 0xC1, 0x00, 0x00, 0xFF, 0x61, 0x00, 0x00, 0x1E, 0x7F, 0x00, 0x00, 0x00, 0x1E, // 1042\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 1043\n    0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xDF, 0x00, 0x80, 0xFF, 0xC7, 0x00, 0x80,\n    0x7F, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01,\n    0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xC0,\n    0x0F, // 1044\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80,\n    0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0x01, 0xC0, // 1045\n    0x80, 0x01, 0x80, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x00, 0x07, 0x3C, 0x00, 0x00, 0x1E, 0x0E, 0x00, 0x00,\n    0x38, 0x07, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x80, 0xFF,\n    0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xE0, 0x03,\n    0x00, 0x00, 0x38, 0x07, 0x00, 0x00, 0x1E, 0x0E, 0x00, 0x00, 0x07, 0x3C, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x01, 0xC0, 0x00,\n    0x80, 0x01, 0x80, // 1046\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x08, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07, 0x78, 0x00, 0x80, 0x03, 0x60, 0x00, 0x80,\n    0x01, 0xE0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x00, 0xE3,\n    0xE1, 0x00, 0x00, 0xBF, 0x73, 0x00, 0x00, 0x1C, 0x3F, 0x00, 0x00, 0x00, 0x1E, // 1047\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00,\n    0x00, 0x3C, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x38,\n    0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1048\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x70, 0x00, 0x18,\n    0x00, 0x3C, 0x00, 0x30, 0x00, 0x0E, 0x00, 0x20, 0x80, 0x07, 0x00, 0x20, 0xC0, 0x01, 0x00, 0x20, 0xF0, 0x00, 0x00, 0x30, 0x38,\n    0x00, 0x00, 0x18, 0x1E, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1049\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x78, 0x07, 0x00, 0x00, 0x1E, 0x0E, 0x00, 0x00, 0x07,\n    0x38, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0x80, // 1050\n    0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1051\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00,\n    0x3F, 0x00, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xFC, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xF8, 0x03, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0xFF, 0xFF,\n    0x00, 0x80, 0xFF, 0xFF, // 1052\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1053\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00,\n    0x03, 0x60, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01,\n    0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x03, 0xE0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x1E, 0x3C,\n    0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF0, 0x07, // 1054\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1055\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80,\n    0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x80, 0x81,\n    0x01, 0x00, 0x80, 0x81, 0x01, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x3C, // 1056\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00,\n    0x03, 0x60, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01,\n    0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x0E, 0x3C, 0x00, 0x00, 0x08,\n    0x0C, // 1057\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01,\n    0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, // 1058\n    0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x1E, 0xC0, 0x00, 0x00, 0x78, 0xC0, 0x00, 0x00,\n    0xE0, 0xC1, 0x00, 0x00, 0x80, 0x77, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x78,\n    0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x01, // 1059\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x03, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00,\n    0x0E, 0x38, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x06,\n    0x30, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0xF8, 0x0F,\n    0x00, 0x00, 0xE0, 0x03, // 1060\n    0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0xC0, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x07, 0x78, 0x00, 0x00, 0x0F, 0x1E, 0x00, 0x00,\n    0x3C, 0x0F, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0x1E, 0x0F, 0x00, 0x00, 0x0F,\n    0x1C, 0x00, 0x80, 0x07, 0x78, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x80, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x80, // 1061\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,\n    0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0,\n    0x1F, 0x00, 0x00, 0xC0, 0x1F, // 1062\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x80, 0xFF, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80,\n    0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1063\n    0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0xFF,\n    0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF,\n    0xFF, // 1064\n    0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0xFF,\n    0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00,\n    0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xC0, 0x1F, // 1065\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80,\n    0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0,\n    0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0x61,\n    0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x1E, // 1066\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00,\n    0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0,\n    0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1067\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00,\n    0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0,\n    0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x80, 0x61, 0x00, 0x00, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x1E, // 1068\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x0F, 0x78, 0x00, 0x00, 0x03, 0x60, 0x00, 0x80,\n    0x03, 0xE0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1, 0xC0, 0x00, 0x80, 0xC1,\n    0xC0, 0x00, 0x00, 0xC3, 0x60, 0x00, 0x00, 0xC7, 0x70, 0x00, 0x00, 0xCE, 0x38, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF0,\n    0x07, // 1069\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00,\n    0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x1E, 0x3C, 0x00, 0x00, 0x07,\n    0x70, 0x00, 0x00, 0x03, 0x60, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0,\n    0x00, 0x80, 0x01, 0xC0, 0x00, 0x80, 0x01, 0xC0, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 0x1E, 0x3C, 0x00,\n    0x00, 0xFC, 0x1F, 0x00, 0x00, 0xF0, 0x07, // 1070\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x7F, 0xF0, 0x00, 0x80, 0x63, 0x7C, 0x00, 0x80,\n    0xC1, 0x1E, 0x00, 0x80, 0xC1, 0x0F, 0x00, 0x80, 0xC1, 0x03, 0x00, 0x80, 0xC1, 0x01, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1,\n    0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xC1, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, // 1071\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x38, 0x00, 0x00, 0x70, 0x7C, 0x00, 0x00, 0x30, 0xE6, 0x00, 0x00, 0x18, 0xC6, 0x00, 0x00,\n    0x18, 0xC6, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0x63, 0x00, 0x00, 0x38, 0x63, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xE0,\n    0xFF, 0x00, 0x00, 0x00, 0x80, // 1072\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x73, 0x70, 0x00, 0x00, 0x31, 0xE0, 0x00, 0x80,\n    0x19, 0xC0, 0x00, 0x80, 0x19, 0xC0, 0x00, 0x80, 0x19, 0xC0, 0x00, 0x80, 0x19, 0xC0, 0x00, 0x80, 0x39, 0xE0, 0x00, 0x80, 0x71,\n    0x70, 0x00, 0x80, 0xE1, 0x3F, 0x00, 0x80, 0x80, 0x0F, // 1073\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0xF0, 0xE7, 0x00, 0x00, 0xF0,\n    0x7E, 0x00, 0x00, 0x00, 0x3C, // 1074\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, // 1075\n    0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xFC, 0x00, 0x00, 0xF8, 0xDF, 0x00, 0x00, 0xF8, 0xC3, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0x00, 0xC0, 0x0F, 0x00, 0x00, 0xC0, 0x0F, // 1076\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x73, 0x00, 0x00, 0x38, 0xE3, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x38, 0xE3, 0x00, 0x00, 0x70, 0x63, 0x00, 0x00, 0xE0,\n    0x33, 0x00, 0x00, 0xC0, 0x13, // 1077\n    0x00, 0x18, 0xE0, 0x00, 0x00, 0x18, 0x70, 0x00, 0x00, 0xF8, 0x38, 0x00, 0x00, 0xE0, 0x0D, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00,\n    0x00, 0x02, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xE0,\n    0x0D, 0x00, 0x00, 0xF8, 0x38, 0x00, 0x00, 0x18, 0x70, 0x00, 0x00, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x80, // 1078\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x30, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x38, 0xE7, 0x00, 0x00, 0xF0, 0x7F, 0x00, 0x00, 0xE0, 0x3C, // 1079\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00,\n    0x00, 0x3C, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1080\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x80, 0x01, 0xF0, 0x00, 0x00,\n    0x03, 0x3C, 0x00, 0x00, 0x02, 0x0F, 0x00, 0x00, 0x82, 0x07, 0x00, 0x00, 0xE2, 0x01, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x80, 0xF9,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1081\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,\n    0x00, 0x07, 0x00, 0x00, 0xC0, 0x0D, 0x00, 0x00, 0xF0, 0x38, 0x00, 0x00, 0x18, 0x70, 0x00, 0x00, 0x18, 0xE0, 0x00, 0x00, 0x00,\n    0x80, // 1082\n    0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0x7F, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1083\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,\n    0xF0, 0x03, 0x00, 0x00, 0x80, 0x3F, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x80,\n    0x1F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1084\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,\n    0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1085\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0xE0,\n    0x3F, 0x00, 0x00, 0xC0, 0x1F, // 1086\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,\n    0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1087\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0x60, 0x30, 0x00, 0x00,\n    0x30, 0x60, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70,\n    0x70, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xC0, 0x0F, // 1088\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x60,\n    0x30, // 1089\n    0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00,\n    0xF8, 0xFF, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, // 1090\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x18, 0x00, 0xC0, 0x07, 0x18, 0x00, 0x00, 0x3E, 0x1C, 0x00,\n    0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x7F, 0x00, 0x00, 0xE0, 0x0F, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00,\n    0x18, // 1091\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00,\n    0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x70, 0x60, 0x00, 0x80, 0xFF, 0xFF, 0x1F, 0x80, 0xFF,\n    0xFF, 0x1F, 0x00, 0x70, 0x60, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xE0,\n    0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0xC0, 0x1F, // 1092\n    0x00, 0x08, 0x80, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x78, 0xF0, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00,\n    0x00, 0x07, 0x00, 0x00, 0x80, 0x1F, 0x00, 0x00, 0xE0, 0x38, 0x00, 0x00, 0x70, 0xF0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x08,\n    0x80, // 1093\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0x00, 0xC0, 0x1F, // 1094\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00,\n    0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,\n    0xFF, // 1095\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1096\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00,\n    0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,\n    0xFF, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0xC0,\n    0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x1F, 0x00, 0x00, 0xC0, 0x1F, // 1097\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00,\n    0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00,\n    0xC3, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x3C, // 1098\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00,\n    0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00,\n    0x7E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, // 1099\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00,\n    0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00,\n    0x7E, 0x00, 0x00, 0x00, 0x3C, // 1100\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x18, 0x00, 0x00, 0x70, 0x78, 0x00, 0x00, 0x38, 0x60, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00,\n    0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x18, 0xC3, 0x00, 0x00, 0x70, 0x73, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0xC0,\n    0x1F, // 1101\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,\n    0x00, 0x03, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0x3F, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x18,\n    0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x18, 0xC0, 0x00, 0x00, 0x38, 0xE0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 0xE0, 0x3F,\n    0x00, 0x00, 0xC0, 0x1F, // 1102\n    0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xC1, 0x00, 0x00, 0xF0, 0xE3, 0x00, 0x00, 0x38, 0x7B, 0x00, 0x00, 0x18, 0x1A, 0x00, 0x00,\n    0x18, 0x0E, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0xF8,\n    0xFF, // 1103\n};\n\n#endif // OLED_UA"
  },
  {
    "path": "src/graphics/fonts/OLEDDisplayFontsUA.h",
    "content": "#ifndef OLEDDISPLAYFONTSUA_h\n#define OLEDDISPLAYFONTSUA_h\n\n#ifdef ARDUINO\n#include <Arduino.h>\n#elif __MBED__\n#define PROGMEM\n#endif\n\nextern const uint8_t ArialMT_Plain_10_UA[] PROGMEM;\nextern const uint8_t ArialMT_Plain_16_UA[] PROGMEM;\nextern const uint8_t ArialMT_Plain_24_UA[] PROGMEM;\n#endif"
  },
  {
    "path": "src/graphics/images.h",
    "content": "#pragma once\n\n#define SATELLITE_IMAGE_WIDTH 16\n#define SATELLITE_IMAGE_HEIGHT 15\nconst uint8_t SATELLITE_IMAGE[] PROGMEM = {0x00, 0x08, 0x00, 0x1C, 0x00, 0x0E, 0x20, 0x07, 0x70, 0x02,\n                                           0xF8, 0x00, 0xF0, 0x01, 0xE0, 0x03, 0xC8, 0x01, 0x9C, 0x54,\n                                           0x0E, 0x52, 0x07, 0x48, 0x02, 0x26, 0x00, 0x10, 0x00, 0x0E};\n\n#define imgSatellite_width 8\n#define imgSatellite_height 8\nconst uint8_t imgSatellite[] PROGMEM = {\n    0b00000000, 0b00000000, 0b00000000, 0b00011000, 0b11011011, 0b11111111, 0b11011011, 0b00011000,\n};\n\nconst uint8_t imgUSB[] PROGMEM = {0x00, 0xfc, 0xf0, 0xfc, 0x88, 0xff, 0x86, 0xfe, 0x85, 0xfe, 0x89, 0xff, 0xf1, 0xfc, 0x00, 0xfc};\nconst uint8_t imgUSB_HighResolution[] PROGMEM = {0x00, 0x3e, 0xf8, 0x80, 0x43, 0xf8, 0xc0, 0xc2, 0xff, 0x60, 0x42, 0xfc,\n                                                 0x3c, 0xc2, 0xff, 0x22, 0x42, 0xf8, 0x3d, 0x42, 0xf8, 0x22, 0xc2, 0xff,\n                                                 0x61, 0x42, 0xfc, 0xc0, 0xc2, 0xff, 0x80, 0x43, 0xf8, 0x00, 0x3e, 0xf8};\nconst uint8_t imgPower[] PROGMEM = {0x40, 0x40, 0x40, 0x58, 0x48, 0x08, 0x08, 0x08,\n                                    0x1C, 0x22, 0x22, 0x41, 0x7F, 0x22, 0x22, 0x22};\nconst uint8_t imgUser[] PROGMEM = {0x3C, 0x42, 0x99, 0xA5, 0xA5, 0x99, 0x42, 0x3C};\nconst uint8_t imgPositionEmpty[] PROGMEM = {0x20, 0x30, 0x28, 0x24, 0x42, 0xFF};\nconst uint8_t imgPositionSolid[] PROGMEM = {0x20, 0x30, 0x38, 0x3C, 0x7E, 0xFF};\n\nconst uint8_t bluetoothConnectedIcon[36] PROGMEM = {0xfe, 0x01, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0xe3, 0x1f,\n                                                    0xf3, 0x3f, 0x33, 0x30, 0x33, 0x33, 0x33, 0x33, 0x03, 0x33, 0xff, 0x33,\n                                                    0xfe, 0x31, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xf0, 0x3f, 0xe0, 0x1f};\n\n#if (defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7701_CS) || defined(ST7735_CS) ||      \\\n     defined(ST7789_CS) || defined(USE_ST7789) || defined(HX8357_CS) || defined(ILI9488_CS) || defined(ST7796_CS) ||             \\\n     defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR) || ARCH_PORTDUINO) &&                                                 \\\n    !defined(DISPLAY_FORCE_SMALL_FONTS)\nconst uint8_t imgQuestionL1[] PROGMEM = {0xff, 0x01, 0x01, 0x32, 0x7b, 0x49, 0x49, 0x6f, 0x26, 0x01, 0x01, 0xff};\nconst uint8_t imgQuestionL2[] PROGMEM = {0x0f, 0x08, 0x08, 0x08, 0x06, 0x0f, 0x0f, 0x06, 0x08, 0x08, 0x08, 0x0f};\nconst uint8_t imgInfoL1[] PROGMEM = {0xff, 0x01, 0x01, 0x01, 0x1e, 0x7f, 0x1e, 0x01, 0x01, 0x01, 0x01, 0xff};\nconst uint8_t imgInfoL2[] PROGMEM = {0x0f, 0x08, 0x08, 0x08, 0x06, 0x0f, 0x0f, 0x06, 0x08, 0x08, 0x08, 0x0f};\nconst uint8_t imgSFL1[] PROGMEM = {0xb6, 0x8f, 0x19, 0x11, 0x31, 0xe3, 0xc2, 0x01,\n                                   0x01, 0xf9, 0xf9, 0x89, 0x89, 0x89, 0x09, 0xeb};\nconst uint8_t imgSFL2[] PROGMEM = {0x0e, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08,\n                                   0x00, 0x0f, 0x0f, 0x00, 0x08, 0x08, 0x08, 0x0f};\n#else\nconst uint8_t imgInfo[] PROGMEM = {0xff, 0x81, 0x00, 0xfb, 0xfb, 0x00, 0x81, 0xff};\nconst uint8_t imgQuestion[] PROGMEM = {0xbf, 0x41, 0xc0, 0x8b, 0xdb, 0x70, 0xa1, 0xdf};\nconst uint8_t imgSF[] PROGMEM = {0xd2, 0xb7, 0xad, 0xbb, 0x92, 0x01, 0xfd, 0xfd, 0x15, 0x85, 0xf5};\n#endif\n\n// === Horizontal battery  ===\n// Basic battery design and all related pieces\nconst unsigned char batteryBitmap_h_bottom[] PROGMEM = {\n    0b00011110, 0b00000000, 0b00000001, 0b00000000, 0b00000001, 0b00000000, 0b00000001, 0b00000000, 0b00000001,\n    0b00000000, 0b00000001, 0b00000000, 0b00000001, 0b00000000, 0b00000001, 0b00000000, 0b00000001, 0b00000000,\n    0b00000001, 0b00000000, 0b00000001, 0b00000000, 0b00000001, 0b00000000, 0b00011110, 0b00000000};\n\nconst unsigned char batteryBitmap_h_top[] PROGMEM = {\n    0b00111100, 0b00000000, 0b01000000, 0b00000000, 0b01000000, 0b00000000, 0b01000000, 0b00000000, 0b01000000,\n    0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b01000000, 0b00000000,\n    0b01000000, 0b00000000, 0b01000000, 0b00000000, 0b01000000, 0b00000000, 0b00111100, 0b00000000};\n\n// Lightning Bolt\nconst unsigned char lightning_bolt_h[] PROGMEM = {\n    0b00000000, 0b00000000, 0b00100000, 0b00000000, 0b00110000, 0b00000000, 0b00111000, 0b00000000, 0b00111100,\n    0b00000000, 0b00011110, 0b00000000, 0b11111111, 0b00000000, 0b01111000, 0b00000000, 0b00111100, 0b00000000,\n    0b00011100, 0b00000000, 0b00001100, 0b00000000, 0b00000100, 0b00000000, 0b00000000, 0b00000000};\n\n// === Vertical battery ===\n// Basic battery design and all related pieces\nconst unsigned char batteryBitmap_v[] PROGMEM = {0b00011100, 0b00111110, 0b01000001, 0b01000001, 0b00000000, 0b00000000,\n                                                 0b00000000, 0b01000001, 0b01000001, 0b01000001, 0b00111110};\n// This is the left and right bars for the fill in\nconst unsigned char batteryBitmap_sidegaps_v[] PROGMEM = {0b10000010, 0b10000010, 0b10000010};\n// Lightning Bolt\nconst unsigned char lightning_bolt_v[] PROGMEM = {0b00000100, 0b00000110, 0b00011111, 0b00001100, 0b00000100};\n\n#define mail_width 10\n#define mail_height 7\nstatic const unsigned char mail[] PROGMEM = {\n    0b11111111, 0b00, // Top line\n    0b10000001, 0b00, // Edges\n    0b11000011, 0b00, // Diagonals start\n    0b10100101, 0b00, // Inner M part\n    0b10011001, 0b00, // Inner M part\n    0b10000001, 0b00, // Edges\n    0b11111111, 0b00  // Bottom line\n};\n\n// Hop icon (9x10)\n#define hop_width 9\n#define hop_height 10\nconst uint8_t hop[] PROGMEM = {0x05, 0x00, 0x07, 0x00, 0x05, 0x00, 0x38, 0x00, 0x28, 0x00,\n                               0x38, 0x00, 0xC0, 0x01, 0x40, 0x01, 0xC0, 0x01, 0x40, 0x00};\n\n// 📬 Mail / Message\nconst uint8_t icon_mail[] PROGMEM = {\n    0b11111111, // ████████ top border\n    0b10000001, // █      █ sides\n    0b11000011, // ██    ██ diagonal\n    0b10100101, // █ █  █ █ inner M\n    0b10011001, // █  ██  █ inner M\n    0b10000001, // █      █ sides\n    0b10000001, // █      █ sides\n    0b11111111  // ████████ bottom\n};\n\n// 📍 GPS Screen / Location Pin\nconst unsigned char icon_compass[] PROGMEM = {\n    0x3C, // Row 0: ..####..\n    0x52, // Row 1: .#..#.#.\n    0x91, // Row 2: #...#..#\n    0x91, // Row 3: #...#..#\n    0x91, // Row 4: #...#..#\n    0x81, // Row 5: #......#\n    0x42, // Row 6: .#....#.\n    0x3C  // Row 7: ..####..\n};\n\nconst uint8_t icon_radio[] PROGMEM = {\n    0x0F, // Row 0: ####....\n    0x10, // Row 1: ....#...\n    0x27, // Row 2: ###..#..\n    0x48, // Row 3: ...#..#.\n    0x93, // Row 4: ##..#..#\n    0xA4, // Row 5: ..#..#.#\n    0xA8, // Row 6: ...#.#.#\n    0xA9  // Row 7: #..#.#.#\n};\n\n// 🪙 System Icon\nconst uint8_t icon_system[] PROGMEM = {\n    0x24, // Row 0: ..#..#..\n    0x3C, // Row 1: ..####..\n    0xC3, // Row 2: ##....##\n    0x5A, // Row 3: .#.##.#.\n    0x5A, // Row 4: .#.##.#.\n    0xC3, // Row 5: ##....##\n    0x3C, // Row 6: ..####..\n    0x24  // Row 7: ..#..#..\n};\n\n// 🌐 Wi-Fi\nconst uint8_t icon_wifi[] PROGMEM = {0b00000000, 0b00011000, 0b00111100, 0b01111110,\n                                     0b11011011, 0b00011000, 0b00011000, 0b00000000};\n\nconst uint8_t icon_nodes[] PROGMEM = {\n    0xF9, // Row 0  #..#######\n    0x00, // Row 1\n    0xF9, // Row 2  #..#######\n    0x00, // Row 3\n    0xF9, // Row 4  #..#######\n    0x00, // Row 5\n    0xF9, // Row 6  #..#######\n    0x00  // Row 7\n};\n\n// ➤ Chevron Triangle Arrow Icon (8x8)\nconst uint8_t icon_list[] PROGMEM = {\n    0x10, // Row 0: ...#....\n    0x10, // Row 1: ...#....\n    0x38, // Row 2: ..###...\n    0x38, // Row 3: ..###...\n    0x7C, // Row 4: .#####..\n    0x6C, // Row 5: .##.##..\n    0xC6, // Row 6: ##...##.\n    0x82  // Row 7: #.....#.\n};\n\n// 📶 Signal Bars Icon (left to right, small to large with spacing)\nconst uint8_t icon_signal[] PROGMEM = {\n    0b00000000, // ░░░░░░░\n    0b10000000, // ░░░░░░░\n    0b10100000, // ░░░░█░█\n    0b10100000, // ░░░░█░█\n    0b10101000, // ░░█░█░█\n    0b10101000, // ░░█░█░█\n    0b10101010, // █░█░█░█\n    0b11111111  // ███████\n};\n\n// ↔️ Distance / Measurement Icon (double-ended arrow)\nconst uint8_t icon_distance[] PROGMEM = {\n    0b00000000, // ░░░░░░░░\n    0b10000001, // █░░░░░█ arrowheads\n    0b01000010, // ░█░░░█░\n    0b00100100, // ░░█░█░░\n    0b00011000, // ░░░██░░ center\n    0b00100100, // ░░█░█░░\n    0b01000010, // ░█░░░█░\n    0b10000001  // █░░░░░█\n};\n\n// ⚠️ Error / Fault\nconst uint8_t icon_error[] PROGMEM = {\n    0b00011000, // ░░░██░░░\n    0b00011000, // ░░░██░░░\n    0b00011000, // ░░░██░░░\n    0b00011000, // ░░░██░░░\n    0b00000000, // ░░░░░░░░\n    0b00011000, // ░░░██░░░\n    0b00000000, // ░░░░░░░░\n    0b00000000  // ░░░░░░░░\n};\n\n// 🏠 Optimized Home Icon (8x8)\nconst uint8_t icon_home[] PROGMEM = {\n    0b00011000, //    ██\n    0b00111100, //   ████\n    0b01111110, //  ██████\n    0b11111111, // ███████\n    0b11000011, // ██    ██\n    0b11011011, // ██ ██ ██\n    0b11011011, // ██ ██ ██\n    0b11111111  // ███████\n};\n\n// 🔧 Generic module (gear-like shape)\nconst uint8_t icon_module[] PROGMEM = {\n    0b00011000, // ░░░██░░░\n    0b00111100, // ░░████░░\n    0b01111110, // ░██████░\n    0b11011011, // ██░██░██\n    0b11011011, // ██░██░██\n    0b01111110, // ░██████░\n    0b00111100, // ░░████░░\n    0b00011000  // ░░░██░░░\n};\n\n#define mute_symbol_width 8\n#define mute_symbol_height 8\nconst uint8_t mute_symbol[] PROGMEM = {\n    0b00011001, // █\n    0b00100110, //  █\n    0b00100100, //   ████\n    0b01001010, //  █ █  █\n    0b01010010, //  █  █ █\n    0b01100010, // ████████\n    0b11111111, //    █  █\n    0b10011000, //        █\n};\n\n#define mute_symbol_big_width 16\n#define mute_symbol_big_height 16\nconst uint8_t mute_symbol_big[] PROGMEM = {0b00000001, 0b00000000, 0b11000010, 0b00000011, 0b00110100, 0b00001100, 0b00011000,\n                                           0b00001000, 0b00011000, 0b00010000, 0b00101000, 0b00010000, 0b01001000, 0b00010000,\n                                           0b10001000, 0b00010000, 0b00001000, 0b00010001, 0b00001000, 0b00010010, 0b00001000,\n                                           0b00010100, 0b00000100, 0b00101000, 0b11111100, 0b00111111, 0b01000000, 0b00100010,\n                                           0b10000000, 0b01000001, 0b00000000, 0b10000000};\n\n// Bell icon for Alert Message\n#define bell_alert_width 8\n#define bell_alert_height 8\nconst unsigned char bell_alert[] PROGMEM = {0b00011000, 0b00100100, 0b00100100, 0b01000010,\n                                            0b01000010, 0b01000010, 0b11111111, 0b00011000};\n\n#define key_symbol_width 8\n#define key_symbol_height 8\nconst uint8_t key_symbol[] PROGMEM = {0b00000000, 0b00000000, 0b00000110, 0b11111001,\n                                      0b10101001, 0b10000110, 0b00000000, 0b00000000};\n\n#define placeholder_width 8\n#define placeholder_height 8\nconst uint8_t placeholder[] PROGMEM = {0b11111111, 0b11111111, 0b11111111, 0b11111111,\n                                       0b11111111, 0b11111111, 0b11111111, 0b11111111};\n\n#define icon_node_width 8\n#define icon_node_height 8\nstatic const uint8_t icon_node[] PROGMEM = {\n    0x10, //    #\n    0x10, //    #     ← antenna\n    0x10, //    #\n    0xFE, // #######  ← device top\n    0x82, // #     #\n    0xAA, // # # # #  ← body with pattern\n    0x92, // #  #  #\n    0xFE  // #######  ← device base\n};\n\n#define bluetoothdisabled_width 8\n#define bluetoothdisabled_height 8\nconst uint8_t bluetoothdisabled[] PROGMEM = {0b11101100, 0b01010100, 0b01001100, 0b01010100,\n                                             0b01001100, 0b00000000, 0b00000000, 0b00000000};\n\n#define smallbulletpoint_width 8\n#define smallbulletpoint_height 8\nconst uint8_t smallbulletpoint[] PROGMEM = {0b00000011, 0b00000011, 0b00000000, 0b00000000,\n                                            0b00000000, 0b00000000, 0b00000000, 0b00000000};\n\n// Digital Clock\n#define digital_icon_clock_width 8\n#define digital_icon_clock_height 8\nconst uint8_t digital_icon_clock[] PROGMEM = {0b00111100, 0b01000010, 0b10000101, 0b10101001,\n                                              0b10010001, 0b10000001, 0b01000010, 0b00111100};\n// Analog Clock\n#define analog_icon_clock_width 8\n#define analog_icon_clock_height 8\nconst uint8_t analog_icon_clock[] PROGMEM = {0b11111111, 0b01000010, 0b00100100, 0b00011000,\n                                             0b00100100, 0b01000010, 0b01000010, 0b11111111};\n\n#define chirpy_width 38\n#define chirpy_height 50\nconst uint8_t chirpy[] = {\n    0xfe, 0xff, 0xff, 0xff, 0xdf, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x80, 0xe3, 0x01,\n    0x00, 0x00, 0xc0, 0xe7, 0x01, 0x00, 0x00, 0xc0, 0xe7, 0x01, 0x00, 0x00, 0xc0, 0xe7, 0x01, 0x00, 0x00, 0x80, 0xe3, 0x01, 0x00,\n    0x00, 0x00, 0xe0, 0x81, 0xff, 0xff, 0x7f, 0xe0, 0xc1, 0xff, 0xff, 0xff, 0xe0, 0xc1, 0xff, 0xff, 0xff, 0xe0, 0xc1, 0xcf, 0x7f,\n    0xfe, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc,\n    0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0,\n    0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0x87, 0x3f, 0xfc, 0xe0, 0xc1,\n    0x87, 0x3f, 0xfc, 0xe0, 0xc1, 0xcf, 0x7f, 0xfe, 0xe0, 0xc1, 0xff, 0xff, 0xff, 0xe0, 0xc1, 0xff, 0xff, 0xff, 0xe0, 0x81, 0xff,\n    0xff, 0x7f, 0xe0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0xc3, 0x00, 0xe0, 0x01, 0x00, 0xc3,\n    0x00, 0xe0, 0x01, 0x80, 0xe1, 0x01, 0xe0, 0x01, 0x80, 0xe1, 0x01, 0xe0, 0x01, 0xc0, 0x30, 0x03, 0xe0, 0x01, 0xc0, 0x30, 0x03,\n    0xe0, 0x01, 0x60, 0x18, 0x06, 0xe0, 0x01, 0x60, 0x18, 0x06, 0xe0, 0x01, 0x30, 0x0c, 0x0c, 0xe0, 0x01, 0x30, 0x0c, 0x0c, 0xe0,\n    0x01, 0x18, 0x06, 0x18, 0xe0, 0x01, 0x18, 0x06, 0x18, 0xe0, 0x01, 0x0c, 0x03, 0x30, 0xe0, 0x01, 0x0c, 0x03, 0x30, 0xe0, 0x01,\n    0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0xfe, 0xff, 0xff, 0xff, 0xdf};\n\n#define chirpy_small_image_width 8\n#define chirpy_small_image_height 8\nconst uint8_t chirpy_small[] = {0x7f, 0x41, 0x55, 0x55, 0x55, 0x55, 0x41, 0x7f};\n\n#define connection_icon_width 7\n#define connection_icon_height 5\nconst uint8_t connection_icon[] = {0x36, 0x41, 0x5D, 0x41, 0x36};\n\n#ifdef M5STACK_UNITC6L\n#include \"img/icon_small.xbm\"\n#else\n#include \"img/icon.xbm\"\n#endif\nstatic_assert(sizeof(icon_bits) >= 0, \"Silence unused variable warning\");"
  },
  {
    "path": "src/graphics/img/icon.xbm",
    "content": "#ifndef USERPREFS_HAS_SPLASH\n#define icon_width 50\n#define icon_height 28\nstatic uint8_t icon_bits[] = {\n  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, \n  0x00, 0x00, 0x00, 0x80, 0x07, 0xC0, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x1F, \n  0xC0, 0x0F, 0x00, 0x00, 0x00, 0xE0, 0x0F, 0xE0, 0x0F, 0x00, 0x00, 0x00, \n  0xE0, 0x0F, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0xF0, 0x07, 0xF0, 0x3F, 0x00, \n  0x00, 0x00, 0xF8, 0x03, 0xF8, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0x03, 0xFC, \n  0x7F, 0x00, 0x00, 0x00, 0xFC, 0x01, 0xFC, 0xFE, 0x00, 0x00, 0x00, 0xFE, \n  0x00, 0xFE, 0xFC, 0x01, 0x00, 0x00, 0xFE, 0x00, 0x7F, 0xFC, 0x01, 0x00, \n  0x00, 0x7F, 0x00, 0x3F, 0xF8, 0x03, 0x00, 0x80, 0x3F, 0x80, 0x3F, 0xF0, \n  0x07, 0x00, 0x80, 0x3F, 0xC0, 0x1F, 0xF0, 0x07, 0x00, 0xC0, 0x1F, 0xC0, \n  0x0F, 0xE0, 0x0F, 0x00, 0xE0, 0x0F, 0xE0, 0x0F, 0xC0, 0x1F, 0x00, 0xE0, \n  0x0F, 0xF0, 0x07, 0x80, 0x1F, 0x00, 0xF0, 0x07, 0xF8, 0x03, 0x80, 0x3F, \n  0x00, 0xF8, 0x03, 0xF8, 0x03, 0x00, 0x7F, 0x00, 0xFC, 0x03, 0xFC, 0x01, \n  0x00, 0x7E, 0x00, 0xFC, 0x01, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0xFE, 0x00, \n  0xFE, 0x00, 0x00, 0xFC, 0x01, 0x7E, 0x00, 0x7F, 0x00, 0x00, 0xF8, 0x01, \n  0x7E, 0x00, 0x3E, 0x00, 0x00, 0xF8, 0x01, 0x38, 0x00, 0x3C, 0x00, 0x00, \n  0x70, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, \n  0x00, 0x00, 0x00, 0x00, };\n#endif"
  },
  {
    "path": "src/graphics/img/icon_small.xbm",
    "content": "#ifndef USERPREFS_HAS_SPLASH\n#define icon_width 50\n#define icon_height 20\nstatic uint8_t icon_bits[] = {\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n  0x80, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x80,\n  0x07, 0xc0, 0x07, 0x00, 0x00, 0x00, 0xc0, 0x0f,\n  0xc0, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0x07, 0xe0,\n  0x0f, 0x00, 0x00, 0x00, 0xe0, 0x07, 0xf0, 0x1f,\n  0x00, 0x00, 0x00, 0xf0, 0x03, 0xf0, 0x3f, 0x00,\n  0x00, 0x00, 0xf8, 0x03, 0xf8, 0x7f, 0x00, 0x00,\n  0x00, 0xf8, 0x01, 0xfc, 0x7e, 0x00, 0x00, 0x00,\n  0xfc, 0x00, 0xfc, 0xfc, 0x00, 0x00, 0x00, 0xfe,\n  0x00, 0x7e, 0xf8, 0x00, 0x00, 0x00, 0x7e, 0x00,\n  0x3f, 0xf8, 0x01, 0x00, 0x00, 0x3f, 0x00, 0x1f,\n  0xf0, 0x01, 0x00, 0x00, 0x1f, 0x80, 0x1f, 0xe0,\n  0x03, 0x00, 0x80, 0x1f, 0xc0, 0x0f, 0xe0, 0x03,\n  0x00, 0x80, 0x0f, 0xc0, 0x07, 0xc0, 0x07, 0x00,\n  0xc0, 0x0f, 0xe0, 0x07, 0x80, 0x0f, 0x00, 0xe0,\n  0x07, 0xf0, 0x03, 0x80, 0x1f, 0x00, 0xe0, 0x03,\n  0xf8, 0x03, 0x00, 0x1f, 0x00, 0xf0, 0x03, 0xf8,\n  0x01, 0x00, 0x3f, 0x00, 0xf8, 0x01, 0xfc, 0x00,\n  0x00, 0x7e, 0x00, 0xfc, 0x00, 0xfe, 0x00, 0x00,\n  0x7e, 0x00, 0xfc, 0x00, 0x7e, 0x00, 0x00, 0xfc,\n  0x00, 0x7e, 0x00, 0x3f, 0x00, 0x00, 0xf8, 0x00,\n  0x7e, 0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0x38,\n  0x00, 0x1c, 0x00, 0x00, 0x70, 0x00, 0x10, 0x00,\n  0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,\n  0x00, 0x00, 0x00, 0x00 };\n#endif"
  },
  {
    "path": "src/graphics/niche/Drivers/Backlight/LatchingBacklight.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./LatchingBacklight.h\"\n\n#include \"assert.h\"\n\n#include \"sleep.h\"\n\nusing namespace NicheGraphics::Drivers;\n\n// Private constructor\n// Called by getInstance\nLatchingBacklight::LatchingBacklight()\n{\n    // Attach the deep sleep callback\n    deepSleepObserver.observe(&notifyDeepSleep);\n}\n\n// Get access to (or create) the singleton instance of this class\nLatchingBacklight *LatchingBacklight::getInstance()\n{\n    // Instantiate the class the first time this method is called\n    static LatchingBacklight *const singletonInstance = new LatchingBacklight;\n\n    return singletonInstance;\n}\n\n// Which pin controls the backlight?\n// Is the light active HIGH (default) or active LOW?\nvoid LatchingBacklight::setPin(uint8_t pin, bool activeWhen)\n{\n    this->pin = pin;\n    this->logicActive = activeWhen;\n\n    pinMode(pin, OUTPUT);\n    off(); // Explicit off seem required by T-Echo?\n}\n\n// Called when device is shutting down\n// Ensures the backlight is off\nint LatchingBacklight::beforeDeepSleep(void *unused)\n{\n    // Contingency only\n    // - pin wasn't set\n    if (pin != static_cast<uint8_t>(-1)) {\n        off();\n        pinMode(pin, INPUT); // High impedance - unnecessary?\n    } else\n        LOG_WARN(\"LatchingBacklight instantiated, but pin not set\");\n    return 0; // Continue with deep sleep\n}\n\n// Turn the backlight on *temporarily*\n// This should be used for momentary illumination, such as while a button is held\n// The effect on the backlight is the same; peek and latch are separated to simplify short vs long press button handling\nvoid LatchingBacklight::peek()\n{\n    assert(pin != static_cast<uint8_t>(-1));\n    digitalWrite(pin, logicActive); // On\n    on = true;\n    latched = false;\n}\n\n// Turn the backlight on, and keep it on\n// This should be used when the backlight should remain active, even after user input ends\n// e.g. when enabled via the menu\n// The effect on the backlight is the same; peek and latch are separated to simplify short vs long press button handling\nvoid LatchingBacklight::latch()\n{\n    assert(pin != static_cast<uint8_t>(-1));\n\n    // Blink if moving from peek to latch\n    // Indicates to user that the transition has taken place\n    if (on && !latched) {\n        digitalWrite(pin, !logicActive); // Off\n        delay(25);\n        digitalWrite(pin, logicActive); // On\n        delay(25);\n        digitalWrite(pin, !logicActive); // Off\n        delay(25);\n    }\n\n    digitalWrite(pin, logicActive); // On\n    on = true;\n    latched = true;\n}\n\n// Turn the backlight off\n// Suitable for ending both peek and latch\nvoid LatchingBacklight::off()\n{\n    assert(pin != static_cast<uint8_t>(-1));\n    digitalWrite(pin, !logicActive); // Off\n    on = false;\n    latched = false;\n}\n\nbool LatchingBacklight::isOn()\n{\n    return on;\n}\n\nbool LatchingBacklight::isLatched()\n{\n    return latched;\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/Drivers/Backlight/LatchingBacklight.h",
    "content": "/*\n\n    Singleton class\n    On-demand control of a display's backlight, connected to a GPIO\n    Initial use case is control of T-Echo's frontlight, via the capacitive touch button\n\n    - momentary on\n    - latched on\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"Observer.h\"\n\nnamespace NicheGraphics::Drivers\n{\n\nclass LatchingBacklight\n{\n  public:\n    static LatchingBacklight *getInstance(); // Create or get the singleton instance\n    void setPin(uint8_t pin, bool activeWhen = HIGH);\n\n    int beforeDeepSleep(void *unused); // Callback for auto-shutoff\n\n    void peek();  // Backlight on temporarily, e.g. while button held\n    void latch(); // Backlight on permanently, e.g. toggled via menu\n    void off();   // Backlight off. Suitable for both peek and latch\n\n    bool isOn(); // Either peek or latch\n    bool isLatched();\n\n  private:\n    LatchingBacklight(); // Constructor made private: force use of getInstance\n\n    // Get notified when the system is shutting down\n    CallbackObserver<LatchingBacklight, void *> deepSleepObserver =\n        CallbackObserver<LatchingBacklight, void *>(this, &LatchingBacklight::beforeDeepSleep);\n\n    uint8_t pin = static_cast<uint8_t>(-1);\n    bool logicActive = HIGH; // Is light active HIGH or active LOW\n\n    bool on = false;      // Is light on (either peek or latched)\n    bool latched = false; // Is light latched on\n};\n\n} // namespace NicheGraphics::Drivers"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/DEPG0213BNS800.cpp",
    "content": "#include \"./DEPG0213BNS800.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Describes the operation performed when a \"fast refresh\" is performed\n// Source: Modified from GxEPD2 (GxEPD2_213_BN)\nstatic const uint8_t LUT_FAST[] = {\n    // 1     2     3\n    0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // B2B (Existing black pixels)\n    0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // B2W (New white pixels)\n    0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // W2B (New black pixels)\n    0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // W2W (Existing white pixels)\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // VCOM\n\n    0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,             // 1. Any pixels changing W2B or B2W. Two medium taps.\n    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             // 2. All pixels. One short tap.\n    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             // 3. Cooldown\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,             //\n    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, //\n};\n\n// How strongly the pixels are pulled and pushed\nvoid DEPG0213BNS800::configVoltages()\n{\n    switch (updateType) {\n    case FAST:\n        // Reference: display datasheet, GxEPD1\n        sendCommand(0x03); // Gate voltage\n        sendData(0x17);    // VGH: 20V\n\n        // Reference: display datasheet, GxEPD1\n        sendCommand(0x04); // Source voltage\n        sendData(0x41);    // VSH1: 15V\n        sendData(0x00);    // VSH2: NA\n        sendData(0x32);    // VSL: -15V\n\n        // GxEPD1 sets this at -1.2V, but that seems to be drive the pixels very hard\n        sendCommand(0x2C); // VCOM voltage\n        sendData(0x08);    // VCOM: -0.2V\n        break;\n\n    case FULL:\n    default:\n        // From OTP memory\n        break;\n    }\n}\n\n// Load settings about how the pixels are moved from old state to new state during a refresh\n// - manually specified,\n// - or with stored values from displays OTP memory\nvoid DEPG0213BNS800::configWaveform()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x3C); // Border waveform:\n        sendData(0x80);    // VSS\n\n        sendCommand(0x32);                    // Write LUT register from MCU:\n        sendData(LUT_FAST, sizeof(LUT_FAST)); // (describes operation for a FAST refresh)\n        break;\n\n    case FULL:\n    default:\n        // From OTP memory\n        break;\n    }\n}\n\n// Describes the sequence of events performed by the displays controller IC during a refresh\n// Includes \"power up\", \"load settings from memory\", \"update the pixels\", etc\nvoid DEPG0213BNS800::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xCF);    // Differential, use manually loaded waveform\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Non-differential, load waveform from OTP\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid DEPG0213BNS800::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 500); // At least 500ms, then poll every 50ms\n    case FULL:\n    default:\n        return beginPolling(100, 3500); // At least 3500ms, then poll every 100ms\n    }\n}\n\n// For this display, we do not need to re-write the new image.\n// We're overriding SSD16XX::finalizeUpdate to make this small optimization.\n// The display does also work just fine with the generic SSD16XX method, though.\nvoid DEPG0213BNS800::finalizeUpdate()\n{\n    // Put a copy of the image into the \"old memory\".\n    // Used with differential refreshes (e.g. FAST update), to determine which px need to move, and which can remain in place\n    // We need to keep the \"old memory\" up to date, because don't know whether next refresh will be FULL or FAST etc.\n    if (updateType != FULL) {\n        // writeNewImage(); // Not required for this display\n        writeOldImage();\n        sendCommand(0x7F); // Terminate image write without update\n        wait();\n    }\n\n    // Enter deep-sleep to save a few µA\n    // Waking from this requires that display's reset pin is broken out\n    if (pin_rst != 0xFF)\n        deepSleep();\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/DEPG0213BNS800.h",
    "content": "/*\n\nE-Ink display driver\n    - DEPG0213BNS800\n    - Manufacturer: DKE\n    - Size: 2.13 inch\n    - Resolution: 122px x 250px\n    - Flex connector marking (not a unique identifier): FPC-7528B\n\n    Note: this is from an older generation of DKE panels, which still used Solomon Systech controller ICs.\n    DKE's website suggests that the latest DEPG0213BN displays may use Fitipower controllers instead.\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass DEPG0213BNS800 : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 122;\n    static constexpr uint32_t height = 250;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    DEPG0213BNS800() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte\n\n  protected:\n    void configVoltages() override;\n    void configWaveform() override;\n    void configUpdateSequence() override;\n    void detachFromUpdate() override;\n    void finalizeUpdate() override; // Only overridden for a slight optimization\n};\n\n} // namespace NicheGraphics::Drivers\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/DEPG0290BNS800.cpp",
    "content": "#include \"./DEPG0290BNS800.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Describes the operation performed when a \"fast refresh\" is performed\n// Source: custom, with DEPG0150BNS810 as a reference\nstatic const uint8_t LUT_FAST[] = {\n    // 1     2     3     4\n    0x40, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // B2B (Existing black pixels)\n    0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // B2W (New white pixels)\n    0x00, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // W2B (New black pixels)\n    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // W2W (Existing white pixels)\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // VCOM\n\n    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 1. Tap existing black pixels back into place\n    0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 2. Move new pixels\n    0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 3. New pixels, and also existing black pixels\n    0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // 4. All pixels, then cooldown\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n\n    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00,\n};\n\n// How strongly the pixels are pulled and pushed\nvoid DEPG0290BNS800::configVoltages()\n{\n    switch (updateType) {\n    case FAST:\n        // Listed as \"typical\" in datasheet\n        sendCommand(0x04);\n        sendData(0x41); // VSH1 15V\n        sendData(0x00); // VSH2 NA\n        sendData(0x32); // VSL -15V\n        break;\n\n    case FULL:\n    default:\n        // From OTP memory\n        break;\n    }\n}\n\n// Load settings about how the pixels are moved from old state to new state during a refresh\n// - manually specified,\n// - or with stored values from displays OTP memory\nvoid DEPG0290BNS800::configWaveform()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x3C); // Border waveform:\n        sendData(0x60);    // Actively hold screen border during update\n\n        sendCommand(0x32);                    // Write LUT register from MCU:\n        sendData(LUT_FAST, sizeof(LUT_FAST)); // (describes operation for a FAST refresh)\n        break;\n\n    case FULL:\n    default:\n        // From OTP memory\n        break;\n    }\n}\n\n// Describes the sequence of events performed by the displays controller IC during a refresh\n// Includes \"power up\", \"load settings from memory\", \"update the pixels\", etc\nvoid DEPG0290BNS800::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xCF);    // Differential, use manually loaded waveform\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Non-differential, load waveform from OTP\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid DEPG0290BNS800::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 450); // At least 450ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 3000); // At least 3 seconds for full refresh\n    }\n}\n\n// For this display, we do not need to re-write the new image.\n// We're overriding SSD16XX::finalizeUpdate to make this small optimization.\n// The display does also work just fine with the generic SSD16XX method, though.\nvoid DEPG0290BNS800::finalizeUpdate()\n{\n    // Put a copy of the image into the \"old memory\".\n    // Used with differential refreshes (e.g. FAST update), to determine which px need to move, and which can remain in place\n    // We need to keep the \"old memory\" up to date, because don't know whether next refresh will be FULL or FAST etc.\n    if (updateType != FULL) {\n        // writeNewImage(); // Not required for this display\n        writeOldImage();\n        sendCommand(0x7F); // Terminate image write without update\n        wait();\n    }\n\n    // Enter deep-sleep to save a few µA\n    // Waking from this requires that display's reset pin is broken out\n    if (pin_rst != 0xFF)\n        deepSleep();\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/DEPG0290BNS800.h",
    "content": "/*\n\nE-Ink display driver\n    - DEPG0290BNS800\n    - Manufacturer: DKE\n    - Size: 2.9 inch\n    - Resolution: 128px x 296px\n    - Flex connector marking (not a unique identifier): FPC-7519 rev.b\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass DEPG0290BNS800 : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 128;\n    static constexpr uint32_t height = 296;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    DEPG0290BNS800() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte\n\n  protected:\n    void configVoltages() override;\n    void configWaveform() override;\n    void configUpdateSequence() override;\n    void detachFromUpdate() override;\n    void finalizeUpdate() override; // Only overridden for a slight optimization\n};\n\n} // namespace NicheGraphics::Drivers\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/E0213A367.cpp",
    "content": "#include \"./E0213A367.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Map the display controller IC's output to the connected panel\nvoid E0213A367::configScanning()\n{\n    // \"Driver output control\"\n    // Scan gates from 0 to 249 (vertical resolution 250px)\n    sendCommand(0x01);\n    sendData(0xF9);\n    sendData(0x00);\n}\n\n// Specify which information is used to control the sequence of voltages applied to move the pixels\nvoid E0213A367::configWaveform()\n{\n    // This command (0x37) is poorly documented\n    // As of July 2025, the datasheet for this display's controller IC is unavailable\n    // The values are supplied by Heltec, who presumably have privileged access to information from the display manufacturer\n    // Datasheet for the similar SSD1680 IC hints at the function of this command:\n\n    // \"Spare VCOM OTP selection\":\n    // Unclear why 0x40 is set. Sane values for related SSD1680 seem to be 0x80 or 0x00.\n    // Maybe value is redundant? No noticeable impact when set to 0x00.\n    // We'll leave it set to 0x40, following Heltec's lead, just in case.\n\n    // \"Display Mode\"\n    // Seems to specify whether a waveform stored in OTP should use display mode 1 or 2 (full refresh or differential refresh)\n\n    // Unusual that waveforms are programmed to OTP, but this meta information is not ..?\n\n    sendCommand(0x37); // \"Write Register for Display Option\" ?\n    sendData(0x40);    // \"Spare VCOM OTP selection\" ?\n    sendData(0x80);    // \"Display Mode for WS[7:0]\" ?\n    sendData(0x03);    // \"Display Mode for WS[15:8]\" ?\n    sendData(0x0E);    // \"Display Mode [23:16]\" ?\n\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x3C); // Border waveform:\n        sendData(0x81);    // As specified by Heltec. Actually VCOM (0x80)?. Bit 0 seems redundant here.\n        break;\n    case FULL:\n    default:\n        sendCommand(0x3C); // Border waveform:\n        sendData(0x01);    // Follow LUT 1 (blink same as white pixels)\n        break;\n    }\n}\n\n// Tell controller IC which operations to run\nvoid E0213A367::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Will load LUT from OTP memory, Display mode 2 \"differential refresh\"\n        break;\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Will load LUT from OTP memory, Display mode 1 \"full refresh\"\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid E0213A367::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 500); // At least 500ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 1500); // At least 1.5 seconds for full refresh\n    }\n}\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/E0213A367.h",
    "content": "/*\n\nE-Ink display driver\n    - SSD1682\n    - Manufacturer: SEEKINK\n    - Size: 2.13 inch\n    - Resolution: 122px x 255px\n    - Flex connector marking: HINK-E0213A162-A1 (hidden, printed on reverse)\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD1682.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass E0213A367 : public SSD1682\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 122;\n    static constexpr uint32_t height = 250;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    E0213A367() : SSD1682(width, height, supported, 0) {}\n\n  protected:\n    void configScanning() override;\n    void configWaveform() override;\n    void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/EInk.cpp",
    "content": "#include \"./EInk.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Separate from EInk::begin method, as derived class constructors can probably supply these parameters as constants\nEInk::EInk(uint16_t width, uint16_t height, UpdateTypes supported)\n    : concurrency::OSThread(\"EInkDriver\"), width(width), height(height), supportedUpdateTypes(supported)\n{\n    OSThread::disable();\n}\n\n// Used by NicheGraphics implementations to check if a display supports a specific refresh operation.\n// Whether or not the update type is supported is specified in the constructor\nbool EInk::supports(UpdateTypes type)\n{\n    // The EInkUpdateTypes enum assigns each type a unique bit. We are checking if that bit is set.\n    if (supportedUpdateTypes & type)\n        return true;\n    else\n        return false;\n}\n\n// Begins using the OSThread to detect when a display update is complete\n// This allows the refresh operation to run \"asynchronously\".\n// Rather than blocking execution waiting for the update to complete, we are periodically checking the hardware's BUSY pin\n// The expectedDuration argument allows us to delay the start of this checking, if we know \"roughly\" how long an update takes.\n// Potentially, a display without hardware BUSY could rely entirely on \"expectedDuration\",\n// provided its isUpdateDone() override always returns true.\nvoid EInk::beginPolling(uint32_t interval, uint32_t expectedDuration)\n{\n    updateRunning = true;\n    pollingInterval = interval;\n    pollingBegunAt = millis();\n\n    // To minimize load, we can choose to delay polling for a few seconds, if we know roughly how long the update will take\n    // By default, expectedDuration is 0, and we'll start polling immediately\n    OSThread::setIntervalFromNow(expectedDuration);\n    OSThread::enabled = true;\n}\n\n// Meshtastic's pseudo-threading layer\n// We're using this as a timer, to periodically check if an update is complete\n// This is what allows us to update the display asynchronously\nint32_t EInk::runOnce()\n{\n    // Check for polling timeout\n    // Manually set at 10 seconds, in case some big task holds up the firmware's cooperative multitasking\n    if (millis() - pollingBegunAt > 10000)\n        failed = true;\n\n    // Handle failure\n    // - polling timeout\n    // - other error (derived classes)\n    if (failed) {\n        LOG_WARN(\"Display update failed. Check wiring & power supply.\");\n        updateRunning = false;\n        failed = false;\n        return disable();\n    }\n\n    // If update not yet done\n    if (!isUpdateDone())\n        return pollingInterval; // Poll again in a few ms\n\n    // If update done\n    finalizeUpdate();      // Any post-update code: power down panel hardware, hibernate, etc\n    updateRunning = false; // Change what we report via EInk::busy()\n    return disable();      // Stop polling\n}\n\n// Wait for an in progress update to complete before continuing\n// Run a normal (async) update first, *then* call await\nvoid EInk::await()\n{\n    // Stop our concurrency thread\n    OSThread::disable();\n\n    // Sit and block until the update is complete\n    while (updateRunning) {\n        runOnce();\n        yield();\n    }\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/EInk.h",
    "content": "/*\n\n    Base class for E-Ink display drivers\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n#include \"configuration.h\"\n\n#include \"concurrency/OSThread.h\"\n#include <SPI.h>\n\nnamespace NicheGraphics::Drivers\n{\n\nclass EInk : private concurrency::OSThread\n{\n  public:\n    // Different possible operations used to update an E-Ink display\n    // Some displays will not support all operations\n    // Each value needs a unique bit. In some cases, we might set more than one bit (e.g. EInk::supportedUpdateType)\n    enum UpdateTypes : uint8_t {\n        UNSPECIFIED = 0,\n        FULL = 1 << 0,\n        FAST = 1 << 1, // \"Partial Refresh\"\n    };\n\n    EInk(uint16_t width, uint16_t height, UpdateTypes supported);\n    virtual void begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst = -1) = 0;\n    virtual void update(uint8_t *imageData, UpdateTypes type) = 0; // Change the display image\n    void await();                                                  // Wait for an in-progress update to complete before proceeding\n    bool supports(UpdateTypes type);                               // Can display perform a certain update type\n    bool busy() { return updateRunning; }                          // Display able to update right now?\n\n    const uint16_t width; // Public so that NicheGraphics implementations can access. Safe because const.\n    const uint16_t height;\n\n  protected:\n    void beginPolling(uint32_t interval, uint32_t expectedDuration); // Begin checking repeatedly if update finished\n    virtual bool isUpdateDone() = 0;                                 // Check once if update finished\n    virtual void finalizeUpdate() {}                                 // Run any post-update code\n    bool failed = false;                                             // If an error occurred during update\n\n  private:\n    int32_t runOnce() override; // Repeated checking if update finished\n\n    const UpdateTypes supportedUpdateTypes; // Capabilities of a derived display class\n    bool updateRunning = false;             // see EInk::busy()\n    uint32_t pollingInterval = 0;           // How often to check if update complete (ms)\n    uint32_t pollingBegunAt = 0;            // To timeout during polling\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/GDEW0102T4.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./GDEW0102T4.h\"\n\n#include <cstring>\n\nusing namespace NicheGraphics::Drivers;\n\n// LUTs from GxEPD2_102.cpp (GDEW0102T4 / UC8175).\nstatic const uint8_t LUT_W_FULL[] = {\n    0x60, 0x5A, 0x5A, 0x00, 0x00, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\nstatic const uint8_t LUT_B_FULL[] = {\n    0x90, 0x5A, 0x5A, 0x00, 0x00, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\nstatic const uint8_t LUT_W_FAST[] = {\n    0x60, 0x01, 0x01, 0x00, 0x00, 0x01, //\n    0x80, 0x12, 0x00, 0x00, 0x00, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\nstatic const uint8_t LUT_B_FAST[] = {\n    0x90, 0x01, 0x01, 0x00, 0x00, 0x01, //\n    0x40, 0x14, 0x00, 0x00, 0x00, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\nGDEW0102T4::GDEW0102T4() : UC8175(width, height, supported) {}\n\nvoid GDEW0102T4::setFastConfig(FastConfig cfg)\n{\n    // Clamp out only clearly invalid PLL settings.\n    if (cfg.reg30 < 0x05)\n        cfg.reg30 = 0x05;\n    fastConfig = cfg;\n}\n\nGDEW0102T4::FastConfig GDEW0102T4::getFastConfig() const\n{\n    return fastConfig;\n}\n\nvoid GDEW0102T4::configCommon()\n{\n    // Init path aligned with GxEPD2_GDEW0102T4 (UC8175 family).\n    sendCommand(0xD2);\n    sendData(0x3F);\n\n    sendCommand(0x00);\n    sendData(0x6F);\n\n    sendCommand(0x01);\n    sendData(0x03);\n    sendData(0x00);\n    sendData(0x2B);\n    sendData(0x2B);\n\n    sendCommand(0x06);\n    sendData(0x3F);\n\n    sendCommand(0x2A);\n    sendData(0x00);\n    sendData(0x00);\n\n    sendCommand(0x30); // PLL / drive clock\n    sendData(0x13);\n\n    sendCommand(0x50); // Last border/data interval; subtle but can affect artifacts\n    sendData(0x57);\n\n    sendCommand(0x60);\n    sendData(0x22);\n\n    sendCommand(0x61);\n    sendData(width);\n    sendData(height);\n\n    sendCommand(0x82); // VCOM DC setting\n    sendData(0x12);\n\n    sendCommand(0xE3);\n    sendData(0x33);\n}\n\nvoid GDEW0102T4::configFull()\n{\n    sendCommand(0x23);\n    sendData(LUT_W_FULL, sizeof(LUT_W_FULL));\n    sendCommand(0x24);\n    sendData(LUT_B_FULL, sizeof(LUT_B_FULL));\n\n    powerOn();\n}\n\nvoid GDEW0102T4::configFast()\n{\n    uint8_t lutW[sizeof(LUT_W_FAST)];\n    uint8_t lutB[sizeof(LUT_B_FAST)];\n    memcpy(lutW, LUT_W_FAST, sizeof(LUT_W_FAST));\n    memcpy(lutB, LUT_B_FAST, sizeof(LUT_B_FAST));\n\n    // Second stage duration bytes are the main \"darkness vs ghosting\" control for this panel.\n    lutW[7] = fastConfig.lutW2;\n    lutB[7] = fastConfig.lutB2;\n\n    sendCommand(0x30);\n    sendData(fastConfig.reg30);\n\n    sendCommand(0x50);\n    sendData(fastConfig.reg50);\n\n    sendCommand(0x82);\n    sendData(fastConfig.reg82);\n\n    sendCommand(0x23);\n    sendData(lutW, sizeof(lutW));\n    sendCommand(0x24);\n    sendData(lutB, sizeof(lutB));\n\n    powerOn();\n}\n\nvoid GDEW0102T4::writeOldImage()\n{\n    // On this panel, FULL refresh is most reliable when \"old image\" is all white.\n    if (updateType == FULL) {\n        sendCommand(0x10);\n        // Use buffered writes of 0xFF to avoid per-byte SPI transactions.\n        const uint16_t chunkSize = 64;\n        uint8_t ffBuf[chunkSize];\n        memset(ffBuf, 0xFF, sizeof(ffBuf));\n\n        uint32_t remaining = bufferSize;\n        while (remaining > 0) {\n            uint16_t toSend = remaining > chunkSize ? chunkSize : static_cast<uint16_t>(remaining);\n            sendData(ffBuf, toSend);\n            remaining -= toSend;\n        }\n        return;\n    }\n\n    // FAST refresh uses differential data (previous frame as old image).\n    if (previousBuffer) {\n        writeImage(0x10, previousBuffer);\n    } else {\n        writeImage(0x10, buffer);\n    }\n}\n\nvoid GDEW0102T4::finalizeUpdate()\n{\n    // Keep panel out of deep-sleep between updates for better reliability of repeated FAST refresh.\n    powerOff();\n}\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/GDEW0102T4.h",
    "content": "/*\n\nE-Ink display driver\n    - GDEW0102T4\n    - Controller: UC8175\n    - Size: 1.02 inch\n    - Resolution: 80px x 128px\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./UC8175.h\"\n\nnamespace NicheGraphics::Drivers\n{\n\nclass GDEW0102T4 : public UC8175\n{\n  private:\n    static constexpr uint16_t width = 80;\n    static constexpr uint16_t height = 128;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    struct FastConfig {\n        uint8_t reg30;\n        uint8_t reg50;\n        uint8_t reg82;\n        uint8_t lutW2;\n        uint8_t lutB2;\n    };\n\n    GDEW0102T4();\n    void setFastConfig(FastConfig cfg);\n    FastConfig getFastConfig() const;\n\n  protected:\n    void configCommon() override;\n    void configFull() override;\n    void configFast() override;\n    void writeOldImage() override;\n    void finalizeUpdate() override;\n\n  private:\n    FastConfig fastConfig = {0x13, 0xF2, 0x12, 0x0E, 0x14};\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/GDEY0154D67.cpp",
    "content": "#include \"./GDEY0154D67.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Map the display controller IC's output to the connected panel\nvoid GDEY0154D67::configScanning()\n{\n    // \"Driver output control\"\n    sendCommand(0x01);\n    sendData(0xC7); // Scan until gate 199 (200px vertical res.)\n    sendData(0x00);\n    sendData(0x00);\n}\n\n// Specify which information is used to control the sequence of voltages applied to move the pixels\n// - For this display, configUpdateSequence() specifies that a suitable LUT will be loaded from\n//   the controller IC's OTP memory, when the update procedure begins.\nvoid GDEY0154D67::configWaveform()\n{\n    sendCommand(0x3C); // Border waveform:\n    sendData(0x05);    // Screen border should follow LUT1 waveform (actively drive pixels white)\n\n    sendCommand(0x18); // Temperature sensor:\n    sendData(0x80);    // Use internal temperature sensor to select an appropriate refresh waveform\n}\n\nvoid GDEY0154D67::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Will load LUT from OTP memory, Display mode 2 \"differential refresh\"\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Will load LUT from OTP memory\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid GDEY0154D67::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 300); // At least 300ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 1500); // At least 1.5 seconds for full refresh\n    }\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/GDEY0154D67.h",
    "content": "/*\n\nE-Ink display driver\n    - GDEY0154D67\n    - Manufacturer: Goodisplay\n    - Size: 1.54 inch\n    - Resolution: 200px x 200px\n    - Flex connector marking (not a unique identifier): FPC-B001\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass GDEY0154D67 : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 200;\n    static constexpr uint32_t height = 200;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    GDEY0154D67() : SSD16XX(width, height, supported) {}\n\n  protected:\n    void configScanning() override;\n    void configWaveform() override;\n    void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/GDEY0213B74.cpp",
    "content": "#include \"./GDEY0213B74.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Map the display controller IC's output to the connected panel\nvoid GDEY0213B74::configScanning()\n{\n    // \"Driver output control\"\n    sendCommand(0x01);\n    sendData(0xF9);\n    sendData(0x00);\n    sendData(0x00);\n}\n\n// Specify which information is used to control the sequence of voltages applied to move the pixels\n// - For this display, configUpdateSequence() specifies that a suitable LUT will be loaded from\n//   the controller IC's OTP memory, when the update procedure begins.\nvoid GDEY0213B74::configWaveform()\n{\n    sendCommand(0x3C); // Border waveform:\n    sendData(0x05);    // Screen border should follow LUT1 waveform (actively drive pixels white)\n\n    sendCommand(0x18); // Temperature sensor:\n    sendData(0x80);    // Use internal temperature sensor to select an appropriate refresh waveform\n}\n\nvoid GDEY0213B74::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Will load LUT from OTP memory, Display mode 2 \"differential refresh\"\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Will load LUT from OTP memory\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid GDEY0213B74::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 500); // At least 500ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 2000); // At least 2 seconds for full refresh\n    }\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/GDEY0213B74.h",
    "content": "/*\n\nE-Ink display driver\n    - GDEY0213B74\n    - Manufacturer: Goodisplay\n    - Size: 2.13 inch\n    - Resolution: 250px x 122px\n    - Flex connector marking (not a unique identifier):\n      - FPC-A002\n      - FPC-A005 20.06.15 TRX\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass GDEY0213B74 : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 122;\n    static constexpr uint32_t height = 250;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    GDEY0213B74() : SSD16XX(width, height, supported) {}\n\n  protected:\n    virtual void configScanning() override;\n    virtual void configWaveform() override;\n    virtual void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/HINK_E0213A289.cpp",
    "content": "#include \"./HINK_E0213A289.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Map the display controller IC's output to the connected panel\nvoid HINK_E0213A289::configScanning()\n{\n    // \"Driver output control\"\n    // Scan gates from 0 to 249 (vertical resolution 250px)\n    sendCommand(0x01);\n    sendData(0xF9); // Maximum gate # (249, bits 0-7)\n    sendData(0x00); // Maximum gate # (bit 8)\n    sendData(0x00); // (Do not invert scanning order)\n}\n\n// Specify which information is used to control the sequence of voltages applied to move the pixels\n// - For this display, configUpdateSequence() specifies that a suitable LUT will be loaded from\n//   the controller IC's OTP memory, when the update procedure begins.\nvoid HINK_E0213A289::configWaveform()\n{\n    sendCommand(0x3C); // Border waveform:\n    sendData(0x05);    // Screen border should follow LUT1 waveform (actively drive pixels white)\n\n    sendCommand(0x18); // Temperature sensor:\n    sendData(0x80);    // Use internal temperature sensor to select an appropriate refresh waveform\n}\n\n// Describes the sequence of events performed by the displays controller IC during a refresh\n// Includes \"power up\", \"load settings from memory\", \"update the pixels\", etc\nvoid HINK_E0213A289::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Will load LUT from OTP memory, Display mode 2 \"differential refresh\"\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Will load LUT from OTP memory\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid HINK_E0213A289::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 500); // At least 500ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 1000); // At least 1 second for full refresh (quick; display only blinks pixels once)\n    }\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/HINK_E0213A289.h",
    "content": "/*\n\nE-Ink display driver\n    - HINK_E0213A289\n    - Manufacturer: Holitech\n    - Size: 2.13 inch\n    - Resolution: 122px x 250px\n    - Flex connector label (not a unique identifier): FPC-7528B\n\n    Note: as of Feb. 2025, these panels are used for \"WeActStudio 2.13in B&W\" display modules\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass HINK_E0213A289 : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 122;\n    static constexpr uint32_t height = 250;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    HINK_E0213A289() : SSD16XX(width, height, supported, 1) {}\n\n  protected:\n    void configScanning() override;\n    void configWaveform() override;\n    void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/HINK_E042A87.cpp",
    "content": "#include \"./HINK_E042A87.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Load settings about how the pixels are moved from old state to new state during a refresh\n// - manually specified,\n// - or with stored values from displays OTP memory\nvoid HINK_E042A87::configWaveform()\n{\n    sendCommand(0x3C); // Border waveform:\n    sendData(0x01);    // Follow LUT for VSH1\n\n    sendCommand(0x18); // Temperature sensor:\n    sendData(0x80);    // Use internal temperature sensor to select an appropriate refresh waveform\n}\n\n// Describes the sequence of events performed by the displays controller IC during a refresh\n// Includes \"power up\", \"load settings from memory\", \"update the pixels\", etc\nvoid HINK_E042A87::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x21); // Use both \"old\" and \"new\" image memory (differential)\n        sendData(0x00);\n        sendData(0x00);\n\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Differential, load waveform from OTP\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x21); // Bypass \"old\" image memory (non-differential)\n        sendData(0x40);\n        sendData(0x00);\n\n        sendCommand(0x22); // Set \"update sequence\":\n        sendData(0xF7);    // Non-differential, load waveform from OTP\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid HINK_E042A87::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 1000); // At least 1 second, then check every 50ms\n    case FULL:\n    default:\n        return beginPolling(100, 3500); // At least 3.5 seconds, then check every 100ms\n    }\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/HINK_E042A87.h",
    "content": "/*\n\nE-Ink display driver\n    - HINK-E042A87\n    - Manufacturer: Holitech\n    - Size: 4.2 inch\n    - Resolution: 400px x 300px\n    - Flex connector marking (not a unique identifier): HINK-E042A07-FPC-A1\n    - Silver sticker with QR code, marked: HE042A87\n\n    Note: as of Feb. 2025, these panels are used for \"WeActStudio 4.2in B&W\" display modules\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass HINK_E042A87 : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 400;\n    static constexpr uint32_t height = 300;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    HINK_E042A87() : SSD16XX(width, height, supported) {}\n\n  protected:\n    void configWaveform() override;\n    void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.cpp",
    "content": "#include \"./LCMEN2R13ECC1.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Map the display controller IC's output to the connected panel\nvoid LCMEN2R13ECC1::configScanning()\n{\n    // \"Driver output control\"\n    sendCommand(0x01);\n    sendData(0xF9);\n    sendData(0x00);\n    sendData(0x00);\n\n    // To-do: delete this method?\n    // Values set here might be redundant: F9, 00, 00 seems to be default\n}\n\n// Specify which information is used to control the sequence of voltages applied to move the pixels\n// - For this display, configUpdateSequence() specifies that a suitable LUT will be loaded from\n//   the controller IC's OTP memory, when the update procedure begins.\nvoid LCMEN2R13ECC1::configWaveform()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x3C); // Border waveform:\n        sendData(0x85);\n        break;\n\n    case FULL:\n    default:\n        // From OTP memory\n        break;\n    }\n}\n\nvoid LCMEN2R13ECC1::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Will load LUT from OTP memory, Display mode 2 \"differential refresh\"\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Will load LUT from OTP memory\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid LCMEN2R13ECC1::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 800); // At least 500ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 2500); // At least 2 seconds for full refresh\n    }\n}\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h",
    "content": "/*\n\nE-Ink display driver\n    - SSD1680\n    - Manufacturer: WISEVAST\n    - Size: 2.13 inch\n    - Resolution: 122px x 255px\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass LCMEN2R13ECC1 : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 122;\n    static constexpr uint32_t height = 250;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    LCMEN2R13ECC1() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte\n\n  protected:\n    virtual void configScanning() override;\n    virtual void configWaveform() override;\n    virtual void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/LCMEN2R13EFC1.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./LCMEN2R13EFC1.h\"\n\n#include <assert.h>\n\n#include \"SPILock.h\"\n\nusing namespace NicheGraphics::Drivers;\n\n// Look up table: fast refresh, common electrode\nstatic const uint8_t LUT_FAST_VCOMDC[] = {\n    0x01, 0x06, 0x03, 0x02, 0x01, 0x01, 0x01, //\n    0x01, 0x06, 0x02, 0x01, 0x01, 0x01, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\n// Look up table: fast refresh, pixels which remain white\nstatic const uint8_t LUT_FAST_WW[] = {\n    0x01, 0x06, 0x03, 0x02, 0x81, 0x01, 0x01, //\n    0x01, 0x06, 0x02, 0x01, 0x01, 0x01, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\n// Look up table: fast refresh, pixel which change from black to white\nstatic const uint8_t LUT_FAST_BW[] = {\n    0x01, 0x86, 0x83, 0x82, 0x81, 0x01, 0x01, //\n    0x01, 0x86, 0x82, 0x01, 0x01, 0x01, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\n// Look up table: fast refresh, pixels which change from white to black\nstatic const uint8_t LUT_FAST_WB[] = {\n    0x01, 0x46, 0x43, 0x02, 0x01, 0x01, 0x01, //\n    0x01, 0x46, 0x42, 0x01, 0x01, 0x01, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\n// Look up table: fast refresh, pixels which remain black\nstatic const uint8_t LUT_FAST_BB[] = {\n    0x01, 0x06, 0x03, 0x42, 0x41, 0x01, 0x01, //\n    0x01, 0x06, 0x02, 0x01, 0x01, 0x01, 0x01, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //\n};\n\nLCMEN213EFC1::LCMEN213EFC1() : EInk(width, height, supported)\n{\n    // Pre-calculate size of the image buffer, for convenience\n\n    // Determine the X dimension of the image buffer, in bytes.\n    // Along rows, pixels are stored 8 per byte.\n    // Not all display widths are divisible by 8. Need to make sure bytecount accommodates padding for these.\n    bufferRowSize = ((width - 1) / 8) + 1;\n\n    // Total size of image buffer, in bytes.\n    bufferSize = bufferRowSize * height;\n}\n\nvoid LCMEN213EFC1::begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst)\n{\n    this->spi = spi;\n    this->pin_dc = pin_dc;\n    this->pin_cs = pin_cs;\n    this->pin_busy = pin_busy;\n    this->pin_rst = pin_rst;\n\n    pinMode(pin_dc, OUTPUT);\n    pinMode(pin_cs, OUTPUT);\n    pinMode(pin_busy, INPUT);\n\n    // Reset is active low, hold high\n    pinMode(pin_rst, INPUT_PULLUP);\n\n    reset();\n}\n\n// Display an image on the display\nvoid LCMEN213EFC1::update(uint8_t *imageData, UpdateTypes type)\n{\n    this->updateType = type;\n    this->buffer = imageData;\n\n    reset();\n\n    // Config\n    if (updateType == FULL)\n        configFull();\n    else\n        configFast();\n\n    // Transfer image data\n    if (updateType == FULL) {\n        writeNewImage();\n        writeOldImage();\n    } else {\n        writeNewImage();\n    }\n\n    sendCommand(0x04); // Power on the panel voltage\n    wait();\n\n    sendCommand(0x12); // Begin executing the update\n\n    // Let the update run async, on display hardware. Base class will poll completion, then finalize.\n    // For a blocking update, call await after update\n    detachFromUpdate();\n}\n\nvoid LCMEN213EFC1::wait()\n{\n    // Busy when LOW\n    while (digitalRead(pin_busy) == LOW)\n        yield();\n}\n\nvoid LCMEN213EFC1::reset()\n{\n    pinMode(pin_rst, OUTPUT);\n    digitalWrite(pin_rst, LOW);\n    delay(10);\n    pinMode(pin_rst, INPUT_PULLUP);\n    wait();\n\n    sendCommand(0x12);\n    wait();\n}\n\nvoid LCMEN213EFC1::sendCommand(const uint8_t command)\n{\n    // Take firmware's SPI lock\n    spiLock->lock();\n\n    spi->beginTransaction(spiSettings);\n    digitalWrite(pin_dc, LOW); // DC pin low indicates command\n    digitalWrite(pin_cs, LOW);\n    spi->transfer(command);\n    digitalWrite(pin_cs, HIGH);\n    digitalWrite(pin_dc, HIGH);\n    spi->endTransaction();\n\n    spiLock->unlock();\n}\n\nvoid LCMEN213EFC1::sendData(uint8_t data)\n{\n    sendData(&data, 1);\n}\n\nvoid LCMEN213EFC1::sendData(const uint8_t *data, uint32_t size)\n{\n    // Take firmware's SPI lock\n    spiLock->lock();\n\n    spi->beginTransaction(spiSettings);\n    digitalWrite(pin_dc, HIGH); // DC pin HIGH indicates data, instead of command\n    digitalWrite(pin_cs, LOW);\n\n    // Platform-specific SPI command\n    // Mothballing. This display model is only used by Heltec Wireless Paper (ESP32)\n#if defined(ARCH_ESP32)\n    spi->transferBytes(data, NULL, size); // NULL for a \"write only\" transfer\n#elif defined(ARCH_NRF52)\n    spi->transfer(data, NULL, size); // NULL for a \"write only\" transfer\n#else\n#error Not implemented yet? Feel free to add other platforms here.\n#endif\n\n    digitalWrite(pin_cs, HIGH);\n    digitalWrite(pin_dc, HIGH);\n    spi->endTransaction();\n\n    spiLock->unlock();\n}\n\nvoid LCMEN213EFC1::configFull()\n{\n    sendCommand(0x00); // Panel setting register\n    sendData(0b11 << 6 // Display resolution\n             | 1 << 4  // B&W only\n             | 1 << 3  // Vertical scan direction\n             | 1 << 2  // Horizontal scan direction\n             | 1 << 1  // Shutdown: no\n             | 1 << 0  // Reset: no\n    );\n\n    sendCommand(0x50);     // VCOM and data interval setting register\n    sendData(0b10 << 6     // Border driven white\n             | 0b11 << 4   // Invert image colors: no\n             | 0b0111 << 0 // Interval between VCOM on and image data (default)\n    );\n}\n\nvoid LCMEN213EFC1::configFast()\n{\n    sendCommand(0x00); // Panel setting register\n    sendData(0b11 << 6 // Display resolution\n             | 1 << 5  // LUT from registers (set below)\n             | 1 << 4  // B&W only\n             | 1 << 3  // Vertical scan direction\n             | 1 << 2  // Horizontal scan direction\n             | 1 << 1  // Shutdown: no\n             | 1 << 0  // Reset: no\n    );\n\n    sendCommand(0x50);     // VCOM and data interval setting register\n    sendData(0b11 << 6     // Border floating\n             | 0b01 << 4   // Invert image colors: no\n             | 0b0111 << 0 // Interval between VCOM on and image data (default)\n    );\n\n    // Load the various LUTs\n    sendCommand(0x20); // VCOM\n    sendData(LUT_FAST_VCOMDC, sizeof(LUT_FAST_VCOMDC));\n\n    sendCommand(0x21); // White -> White\n    sendData(LUT_FAST_WW, sizeof(LUT_FAST_WW));\n\n    sendCommand(0x22); // Black -> White\n    sendData(LUT_FAST_BW, sizeof(LUT_FAST_BW));\n\n    sendCommand(0x23); // White -> Black\n    sendData(LUT_FAST_WB, sizeof(LUT_FAST_WB));\n\n    sendCommand(0x24); // Black -> Black\n    sendData(LUT_FAST_BB, sizeof(LUT_FAST_BB));\n}\n\nvoid LCMEN213EFC1::writeNewImage()\n{\n    sendCommand(0x13);\n    sendData(buffer, bufferSize);\n}\n\nvoid LCMEN213EFC1::writeOldImage()\n{\n    sendCommand(0x10);\n    sendData(buffer, bufferSize);\n}\n\nvoid LCMEN213EFC1::detachFromUpdate()\n{\n    // To save power / cycles, displays can choose to specify an \"expected duration\" for various refresh types\n    // If we know a full-refresh takes at least 4 seconds, we can delay polling until 3 seconds have passed\n    // If not implemented, we'll just poll right from the get-go\n    switch (updateType) {\n    case FULL:\n        EInk::beginPolling(10, 3650);\n        break;\n    case FAST:\n        EInk::beginPolling(10, 720);\n        break;\n    default:\n        assert(false);\n    }\n}\n\nbool LCMEN213EFC1::isUpdateDone()\n{\n    // Busy when LOW\n    if (digitalRead(pin_busy) == LOW)\n        return false;\n    else\n        return true;\n}\n\nvoid LCMEN213EFC1::finalizeUpdate()\n{\n    // Power off the panel voltages\n    sendCommand(0x02);\n    wait();\n\n    // Put a copy of the image into the \"old memory\".\n    // Used with differential refreshes (e.g. FAST update), to determine which px need to move, and which can remain in place\n    // We need to keep the \"old memory\" up to date, because don't know whether next refresh will be FULL or FAST etc.\n    if (updateType != FULL) {\n        writeOldImage();\n        wait();\n    }\n}\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h",
    "content": "/*\n\nE-Ink display driver\n    - LCMEN213EFC1\n    - Manufacturer: Wisevast\n    - Size: 2.13 inch\n    - Resolution: 122px x 250px\n    - Flex connector marking (not a unique identifier): HINK-E0213A162-FPC-A0 (Hidden, printed on back-side)\n\nNote: this display uses an uncommon controller IC, Fitipower JD79656.\nIt is implemented as a \"one-off\", directly inheriting the EInk base class, unlike SSD16XX displays.\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./EInk.h\"\n\nnamespace NicheGraphics::Drivers\n{\n\nclass LCMEN213EFC1 : public EInk\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 122;\n    static constexpr uint32_t height = 250;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    LCMEN213EFC1();\n    void begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst);\n    void update(uint8_t *imageData, UpdateTypes type) override;\n\n  protected:\n    void wait();\n    void reset();\n    void sendCommand(const uint8_t command);\n    void sendData(const uint8_t data);\n    void sendData(const uint8_t *data, uint32_t size);\n    void configFull(); // Configure display for FULL refresh\n    void configFast(); // Configure display for FAST refresh\n    void writeNewImage();\n    void writeOldImage(); // Used for \"differential update\", aka FAST refresh\n\n    void detachFromUpdate();\n    bool isUpdateDone();\n    void finalizeUpdate();\n\n  protected:\n    uint8_t bufferOffsetX = 0; // In bytes. Panel x=0 does not always align with controller x=0. Quirky internal wiring?\n    uint8_t bufferRowSize = 0; // In bytes. Rows store 8 pixels per byte. Rounded up to fit (e.g. 122px would require 16 bytes)\n    uint32_t bufferSize = 0;   // In bytes. Rows * Columns\n    uint8_t *buffer = nullptr;\n    UpdateTypes updateType = UpdateTypes::UNSPECIFIED;\n\n    uint8_t pin_dc = -1;\n    uint8_t pin_cs = -1;\n    uint8_t pin_busy = -1;\n    uint8_t pin_rst = -1;\n    SPIClass *spi = nullptr;\n    SPISettings spiSettings = SPISettings(6000000, MSBFIRST, SPI_MODE0);\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/README.md",
    "content": "# NicheGraphics - E-Ink Driver\n\nA driver for E-Ink SPI displays. Suitable for re-use by various NicheGraphics UIs.\n\nYour UI should use the class `NicheGraphics::Drivers::EInk` .\nWhen you set up a hardware variant, you will use one of the specific display model classes, which extend the EInk class.\n\nAn example setup might look like this:\n\n```cpp\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // An imaginary UI\n    YourCustomUI *yourUI = new YourCustomUI();\n\n    // Setup SPI\n    SPIClass *hspi = new SPIClass(HSPI);\n    hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);\n\n    // Setup EInk driver\n    Drivers::EInk *driver = new Drivers::DEPG0290BNS800;\n    driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY);\n\n    // Pass the driver to your UI\n    YourUI::driver = driver;\n}\n```\n\n- [Methods](#methods)\n  - [`update(uint8_t *imageData, UpdateTypes type)`](#updateuint8_t-imagedata-updatetypes-type)\n  - [`await()`](#await)\n  - [`supports(UpdateTypes type)`](#supportsupdatetypes-type)\n  - [`busy()`](#busy)\n  - [`width()`](#width)\n  - [`height()`](#height)\n- [Supporting New Displays](#supporting-new-displays)\n  - [Controller IC](#controller-ic)\n  - [Finding Information](#finding-information)\n\n## Methods\n\n### `update(uint8_t *imageData, UpdateTypes type)`\n\nUpdate the image on the display\n\n- _`imageData`_ to draw to the display.\n- _`type`_ which type of update to perform.\n  - `FULL`\n  - `FAST` (partial refresh)\n  - (Other custom types may be possible)\n\nThe imageData is a 1-bit image. X-Pixels are 8-per byte, with the MSB being the leftmost pixel. This was not an InkHUD design decision; it is the raw format accepted by the E-Ink display controllers ICs.\n\n_To-do: add a helper method to `InkHUD::Drivers::EInk` to do this arithmetic for you._\n\n```cpp\nuint16_t w = driver::width();\nuint16_t h = driver::height();\n\nuint8_t image[ (w/8) * h ]; // X pixels are 8-per-byte\n\nimage[0] |= (1 << 7); // Set pixel x=0, y=0\nimage[0] |= (1 << 0); // Set pixel x=7, y=0\nimage[1] |= (1 << 7); // Set pixel x=8, y=0\n\nuint8_t x = 12;\nuint8_t y = 2;\nuint8_t yBytes = y * (w/8);\nuint8_t xBytes = x / 8;\nuint8_t xBits = (7-x) % 8;\nimage[yByte + xByte] |= (1 << xBits); // Set pixel x=12, y=2\n```\n\n### `await()`\n\nWait for an in-progress update to complete before continuing\n\n### `supports(UpdateTypes type)`\n\nCheck if display supports a specific update type. `true` if supported.\n\n- _`type`_ type to check\n\n### `busy()`\n\nCheck if display is already performing an `update()`. `true` if already updating.\n\n### `width()`\n\nWidth of the display, in pixels. Note: most displays are portrait. Your UI will need to implement rotation in software.\n\n### `height()`\n\nHeight of the display, in pixels. Note: most displays are portrait. Your UI will need to implement rotation in software.\n\n## Supporting New Displays\n\n_This topic is not covered in depth, but these notes may be helpful._\n\nThe `InkHUD::Drivers::EInk` class contains only the mechanism for implementing an E-Ink driver on-top of Meshtastic's `OSThread`. A driver for a specific display needs to extend this class.\n\n### Controller IC\n\nIf your display uses a controller IC from Solomon Systech, you can probably extend the existing `Drivers::SSD16XX` class, making only minor modifications.\n\nAt this stage, displays using controller ICS from other manufacturers (UltraChip, Fitipower, etc) need to manually implemented. See `Drivers::LCMEN2R13EFC1` for an example.\n\nGeneric base classes for manufacturers other than Solomon Systech might be added here in future.\n\n### Finding Information\n\n#### Flex-Connector Labels\n\nThe orange flex-connector attached to E-Ink displays is often printed with an identifying label. This is not a _totally_ unique identifier, but does give a very strong clue as to the true model of the display, which can be used to search out further information.\n\n#### Datasheets\n\nThe manufacturer of a DIY display module may publish a datasheet. These are often incomplete, but might reveal the true model of the display, or the controller IC.\n\nIf you can determine the true model name of the display, you can likely find a more complete datasheet on the display manufacturer's website. This will often provide a \"typical operating sequence\"; a general overview of the code used to drive the display\n\n#### Example Code\n\nThe manufacturer of a DIY module may publish example code. You may have more luck finding example code published by the display manufacturer themselves, if you can determine the true model of the panel. These examples are a very valuable reference.\n\n#### Other E-Ink drivers\n\nLibraries like ZinggJM's GxEPD2 can be valuable sources of information, although your panel may not be _specifically_ supported, and only _compatible_ with a driver there, so some caution is advised.\n\nThe display selection file in GxEPD2's Hello World example is also a useful resource for matching \"flex connector labels\" with display models, but the flex connector label is _not_ a unique identifier, so this is only another clue.\n"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/SSD1682.cpp",
    "content": "#include \"./SSD1682.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\nSSD1682::SSD1682(uint16_t width, uint16_t height, EInk::UpdateTypes supported, uint8_t bufferOffsetX)\n    : SSD16XX(width, height, supported, bufferOffsetX)\n{\n}\n\n// SSD1682 only accepts single-byte x and y values\n// This causes an incompatibility with the default SSD16XX::configFullscreen\nvoid SSD1682::configFullscreen()\n{\n    // Define the boundaries of the \"fullscreen\" region, for the controller IC\n    static const uint8_t sx = bufferOffsetX; // Notice the offset\n    static const uint8_t sy = 0;\n    static const uint8_t ex = bufferRowSize + bufferOffsetX - 1; // End is \"max index\", not \"count\". Minus 1 handles this\n    static const uint8_t ey = height;\n\n    // Data entry mode - Left to Right, Top to Bottom\n    sendCommand(0x11);\n    sendData(0x03);\n\n    // Select controller IC memory region to display a fullscreen image\n    sendCommand(0x44); // Memory X start - end\n    sendData(sx);\n    sendData(ex);\n    sendCommand(0x45); // Memory Y start - end\n    sendData(sy);\n    sendData(ey);\n\n    // Place the cursor at the start of this memory region, ready to send image data x=0 y=0\n    sendCommand(0x4E); // Memory cursor X\n    sendData(sx);\n    sendCommand(0x4F); // Memory cursor y\n    sendData(sy);\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/SSD1682.h",
    "content": "/*\n\nE-Ink base class for displays based on SSD1682\n\nSSD1682 has a few quirks. We're implementing them here in a new base class,\nto avoid re-implementing them every time we need to add a new SSD1682-based display.\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\n\nclass SSD1682 : public SSD16XX\n{\n  public:\n    SSD1682(uint16_t width, uint16_t height, EInk::UpdateTypes supported, uint8_t bufferOffsetX = 0);\n    virtual void configFullscreen(); // Select memory region on controller IC\n    virtual void deepSleep() {}      // Not usable (image memory not retained)\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/SSD16XX.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./SSD16XX.h\"\n\n#include \"SPILock.h\"\n\nusing namespace NicheGraphics::Drivers;\n\nSSD16XX::SSD16XX(uint16_t width, uint16_t height, UpdateTypes supported, uint8_t bufferOffsetX)\n    : EInk(width, height, supported), bufferOffsetX(bufferOffsetX)\n{\n    // Pre-calculate size of the image buffer, for convenience\n\n    // Determine the X dimension of the image buffer, in bytes.\n    // Along rows, pixels are stored 8 per byte.\n    // Not all display widths are divisible by 8. Need to make sure bytecount accommodates padding for these.\n    bufferRowSize = ((width - 1) / 8) + 1;\n\n    // Total size of image buffer, in bytes.\n    bufferSize = bufferRowSize * height;\n}\n\nvoid SSD16XX::begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst)\n{\n    this->spi = spi;\n    this->pin_dc = pin_dc;\n    this->pin_cs = pin_cs;\n    this->pin_busy = pin_busy;\n    this->pin_rst = pin_rst;\n\n    pinMode(pin_dc, OUTPUT);\n    pinMode(pin_cs, OUTPUT);\n    pinMode(pin_busy, INPUT);\n\n    // If using a reset pin, hold high\n    // Reset is active low for Solomon Systech ICs\n    if (pin_rst != 0xFF)\n        pinMode(pin_rst, INPUT_PULLUP);\n\n    reset();\n}\n\n// Poll the displays busy pin until an operation is complete\n// Timeout and set fail flag if something went wrong and the display got stuck\nvoid SSD16XX::wait(uint32_t timeout)\n{\n    // Don't bother waiting if part of the update sequence failed\n    // In that situation, we're now just failing-through the process, until we can try again with next update.\n    if (failed)\n        return;\n\n    uint32_t startMs = millis();\n\n    // Busy when HIGH\n    while (digitalRead(pin_busy) == HIGH) {\n        // Check for timeout\n        if (millis() - startMs > timeout) {\n            failed = true;\n            break;\n        }\n        yield();\n    }\n}\n\nvoid SSD16XX::reset()\n{\n    // Check if reset pin is defined\n    if (pin_rst != 0xFF) {\n        pinMode(pin_rst, OUTPUT);\n        digitalWrite(pin_rst, LOW);\n        delay(10);\n        digitalWrite(pin_rst, HIGH);\n        delay(10);\n        wait();\n    }\n\n    sendCommand(0x12);\n    wait();\n}\n\nvoid SSD16XX::sendCommand(const uint8_t command)\n{\n    // Abort if part of the update sequence failed\n    // This will unlock again once we have failed-through the entire process\n    if (failed)\n        return;\n\n    // Take firmware's SPI lock\n    spiLock->lock();\n\n    spi->beginTransaction(spiSettings);\n    digitalWrite(pin_dc, LOW); // DC pin low indicates command\n    digitalWrite(pin_cs, LOW);\n    spi->transfer(command);\n    digitalWrite(pin_cs, HIGH);\n    digitalWrite(pin_dc, HIGH);\n    spi->endTransaction();\n\n    spiLock->unlock();\n}\n\nvoid SSD16XX::sendData(uint8_t data)\n{\n    sendData(&data, 1);\n}\n\nvoid SSD16XX::sendData(const uint8_t *data, uint32_t size)\n{\n    // Abort if part of the update sequence failed\n    // This will unlock again once we have failed-through the entire process\n    if (failed)\n        return;\n\n    // Take firmware's SPI lock\n    spiLock->lock();\n\n    spi->beginTransaction(spiSettings);\n    digitalWrite(pin_dc, HIGH); // DC pin HIGH indicates data, instead of command\n    digitalWrite(pin_cs, LOW);\n\n    // Platform-specific SPI command\n#if defined(ARCH_ESP32)\n    spi->transferBytes(data, NULL, size); // NULL for a \"write only\" transfer\n#elif defined(ARCH_NRF52)\n    spi->transfer(data, NULL, size); // NULL for a \"write only\" transfer\n#else\n#error Not implemented yet? Feel free to add other platforms here.\n#endif\n\n    digitalWrite(pin_cs, HIGH);\n    digitalWrite(pin_dc, HIGH);\n    spi->endTransaction();\n\n    spiLock->unlock();\n}\n\nvoid SSD16XX::configFullscreen()\n{\n    // Placing this code in a separate method because it's probably pretty consistent between displays\n    // Should make it tidier to override SSD16XX::configure\n\n    // Define the boundaries of the \"fullscreen\" region, for the controller IC\n    static const uint16_t sx = bufferOffsetX; // Notice the offset\n    static const uint16_t sy = 0;\n    static const uint16_t ex = bufferRowSize + bufferOffsetX - 1; // End is \"max index\", not \"count\". Minus 1 handles this\n    static const uint16_t ey = height;\n\n    // Split into bytes\n    static const uint8_t sy1 = sy & 0xFF;\n    static const uint8_t sy2 = (sy >> 8) & 0xFF;\n    static const uint8_t ey1 = ey & 0xFF;\n    static const uint8_t ey2 = (ey >> 8) & 0xFF;\n\n    // Data entry mode - Left to Right, Top to Bottom\n    sendCommand(0x11);\n    sendData(0x03);\n\n    // Select controller IC memory region to display a fullscreen image\n    sendCommand(0x44); // Memory X start - end\n    sendData(sx);\n    sendData(ex);\n    sendCommand(0x45); // Memory Y start - end\n    sendData(sy1);\n    sendData(sy2);\n    sendData(ey1);\n    sendData(ey2);\n\n    // Place the cursor at the start of this memory region, ready to send image data x=0 y=0\n    sendCommand(0x4E); // Memory cursor X\n    sendData(sx);\n    sendCommand(0x4F); // Memory cursor y\n    sendData(sy1);\n    sendData(sy2);\n}\n\nvoid SSD16XX::update(uint8_t *imageData, UpdateTypes type)\n{\n    this->updateType = type;\n    this->buffer = imageData;\n\n    reset();\n\n    configFullscreen();\n    configScanning(); // Virtual, unused by base class\n    configVoltages(); // Virtual, unused by base class\n    configWaveform(); // Virtual, unused by base class\n    wait();\n\n    if (updateType == FULL) {\n        writeNewImage();\n        writeOldImage();\n    } else {\n        writeNewImage();\n    }\n\n    configUpdateSequence();\n    sendCommand(0x20); // Begin executing the update\n\n    // Let the update run async, on display hardware. Base class will poll completion, then finalize.\n    // For a blocking update, call await after update\n    detachFromUpdate();\n}\n\n// Send SPI commands for controller IC to begin executing the refresh operation\nvoid SSD16XX::configUpdateSequence()\n{\n    switch (updateType) {\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Non-differential, load waveform from OTP\n        break;\n    }\n}\n\nvoid SSD16XX::writeNewImage()\n{\n    sendCommand(0x24);\n    sendData(buffer, bufferSize);\n}\n\nvoid SSD16XX::writeOldImage()\n{\n    sendCommand(0x26);\n    sendData(buffer, bufferSize);\n}\n\nvoid SSD16XX::detachFromUpdate()\n{\n    // To save power / cycles, displays can choose to specify an \"expected duration\" for various refresh types\n    // If we know a full-refresh takes at least 4 seconds, we can delay polling until 3 seconds have passed\n    // If not implemented, we'll just poll right from the get-go\n    switch (updateType) {\n    default:\n        EInk::beginPolling(100, 0);\n    }\n}\n\nbool SSD16XX::isUpdateDone()\n{\n    // Busy when HIGH\n    if (digitalRead(pin_busy) == HIGH)\n        return false;\n    else\n        return true;\n}\n\nvoid SSD16XX::finalizeUpdate()\n{\n    // Put a copy of the image into the \"old memory\".\n    // Used with differential refreshes (e.g. FAST update), to determine which px need to move, and which can remain in place\n    // We need to keep the \"old memory\" up to date, because don't know whether next refresh will be FULL or FAST etc.\n    if (updateType != FULL) {\n        writeNewImage(); // Only required by some controller variants. Todo: Override just for GDEY0154D678?\n        writeOldImage();\n        sendCommand(0x7F); // Terminate image write without update\n        wait();\n    }\n\n    // Enter deep-sleep to save a few µA\n    // Waking from this requires that display's reset pin is broken out\n    if (pin_rst != 0xFF)\n        deepSleep();\n}\n\n// Enter a lower-power state\n// May only save a few µA..\nvoid SSD16XX::deepSleep()\n{\n    sendCommand(0x10); // Enter deep sleep\n    sendData(0x01);    // Mode 1: preserve image RAM\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/SSD16XX.h",
    "content": "/*\n\nE-Ink base class for displays based on SSD16XX\n\nMost (but not all) SPI E-Ink displays use this family of controller IC.\nImplementing new SSD16XX displays should be fairly painless.\nSee DEPG0154BNS800 and DEPG0290BNS800 for examples.\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./EInk.h\"\n\nnamespace NicheGraphics::Drivers\n{\n\nclass SSD16XX : public EInk\n{\n  public:\n    SSD16XX(uint16_t width, uint16_t height, UpdateTypes supported, uint8_t bufferOffsetX = 0);\n    virtual void begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst = -1);\n    virtual void update(uint8_t *imageData, UpdateTypes type) override;\n\n  protected:\n    virtual void wait(uint32_t timeout = 1000);\n    virtual void reset();\n    virtual void sendCommand(const uint8_t command);\n    virtual void sendData(const uint8_t data);\n    virtual void sendData(const uint8_t *data, uint32_t size);\n    virtual void configFullscreen();     // Select memory region on controller IC\n    virtual void configScanning() {}     // Optional. First & last gates, scan direction, etc\n    virtual void configVoltages() {}     // Optional. Manual panel voltages, soft-start, etc\n    virtual void configWaveform() {}     // Optional. LUT, panel border, temperature sensor, etc\n    virtual void configUpdateSequence(); // Tell controller IC which operations to run\n\n    virtual void writeNewImage();\n    virtual void writeOldImage(); // Image which can be used at *next* update for \"differential refresh\"\n\n    virtual void detachFromUpdate();\n    virtual bool isUpdateDone() override;\n    virtual void finalizeUpdate() override;\n    virtual void deepSleep();\n\n  protected:\n    uint8_t bufferOffsetX = 0; // In bytes. Panel x=0 does not always align with controller x=0. Quirky internal wiring?\n    uint8_t bufferRowSize = 0; // In bytes. Rows store 8 pixels per byte. Rounded up to fit (e.g. 122px would require 16 bytes)\n    uint32_t bufferSize = 0;   // In bytes. Rows * Columns\n    uint8_t *buffer = nullptr;\n    UpdateTypes updateType = UpdateTypes::UNSPECIFIED;\n\n    uint8_t pin_dc = -1;\n    uint8_t pin_cs = -1;\n    uint8_t pin_busy = -1;\n    uint8_t pin_rst = -1;\n    SPIClass *spi = nullptr;\n    SPISettings spiSettings = SPISettings(4000000, MSBFIRST, SPI_MODE0);\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/UC8175.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./UC8175.h\"\n\n#include <cstring>\n\n#include \"SPILock.h\"\n\nusing namespace NicheGraphics::Drivers;\n\nUC8175::UC8175(uint16_t width, uint16_t height, UpdateTypes supported) : EInk(width, height, supported)\n{\n    bufferRowSize = ((width - 1) / 8) + 1;\n    bufferSize = bufferRowSize * height;\n}\n\nvoid UC8175::begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst)\n{\n    this->spi = spi;\n    this->pin_dc = pin_dc;\n    this->pin_cs = pin_cs;\n    this->pin_busy = pin_busy;\n    this->pin_rst = pin_rst;\n\n    pinMode(pin_dc, OUTPUT);\n    pinMode(pin_cs, OUTPUT);\n    pinMode(pin_busy, INPUT);\n\n    // Reset is active LOW, hold HIGH when idle.\n    if (pin_rst != (uint8_t)-1) {\n        pinMode(pin_rst, OUTPUT);\n        digitalWrite(pin_rst, HIGH);\n    }\n\n    if (!previousBuffer) {\n        previousBuffer = new uint8_t[bufferSize];\n        if (previousBuffer)\n            memset(previousBuffer, 0xFF, bufferSize);\n    }\n}\n\nvoid UC8175::update(uint8_t *imageData, UpdateTypes type)\n{\n    buffer = imageData;\n    updateType = (type == UpdateTypes::UNSPECIFIED) ? UpdateTypes::FULL : type;\n\n    if (updateType == FAST && hasPreviousBuffer && previousBuffer && memcmp(previousBuffer, buffer, bufferSize) == 0)\n        return;\n\n    reset();\n    configCommon();\n\n    if (updateType == FAST)\n        configFast();\n    else\n        configFull();\n\n    writeOldImage();\n    writeNewImage();\n    sendCommand(0x12); // Display refresh.\n\n    if (previousBuffer) {\n        memcpy(previousBuffer, buffer, bufferSize);\n        hasPreviousBuffer = true;\n    }\n\n    detachFromUpdate();\n}\n\nvoid UC8175::wait(uint32_t timeoutMs)\n{\n    if (failed)\n        return;\n\n    uint32_t started = millis();\n    while (digitalRead(pin_busy) == BUSY_ACTIVE) {\n        if ((millis() - started) > timeoutMs) {\n            failed = true;\n            break;\n        }\n        yield();\n    }\n}\n\nvoid UC8175::reset()\n{\n    if (pin_rst != (uint8_t)-1) {\n        digitalWrite(pin_rst, LOW);\n        delay(20);\n        digitalWrite(pin_rst, HIGH);\n        delay(20);\n    } else {\n        sendCommand(0x12); // Software reset.\n        delay(10);\n    }\n\n    wait(3000);\n}\n\nvoid UC8175::sendCommand(uint8_t command)\n{\n    if (failed)\n        return;\n\n    spiLock->lock();\n    spi->beginTransaction(spiSettings);\n    digitalWrite(pin_dc, LOW);\n    digitalWrite(pin_cs, LOW);\n    spi->transfer(command);\n    digitalWrite(pin_cs, HIGH);\n    digitalWrite(pin_dc, HIGH);\n    spi->endTransaction();\n    spiLock->unlock();\n}\n\nvoid UC8175::sendData(uint8_t data)\n{\n    sendData(&data, 1);\n}\n\nvoid UC8175::sendData(const uint8_t *data, uint32_t size)\n{\n    if (failed)\n        return;\n\n    spiLock->lock();\n    spi->beginTransaction(spiSettings);\n    digitalWrite(pin_dc, HIGH);\n    digitalWrite(pin_cs, LOW);\n\n#if defined(ARCH_ESP32)\n    spi->transferBytes(data, NULL, size);\n#elif defined(ARCH_NRF52)\n    spi->transfer(data, NULL, size);\n#else\n    for (uint32_t i = 0; i < size; ++i)\n        spi->transfer(data[i]);\n#endif\n\n    digitalWrite(pin_cs, HIGH);\n    digitalWrite(pin_dc, HIGH);\n    spi->endTransaction();\n    spiLock->unlock();\n}\n\nvoid UC8175::powerOn()\n{\n    sendCommand(0x04);\n    wait(2000);\n}\n\nvoid UC8175::powerOff()\n{\n    sendCommand(0x02); // Power off.\n    wait(1500);\n}\n\nvoid UC8175::writeImage(uint8_t command, const uint8_t *image)\n{\n    sendCommand(command);\n    sendData(image, bufferSize);\n}\n\nvoid UC8175::writeOldImage()\n{\n    if (updateType == FAST && previousBuffer)\n        writeImage(0x10, previousBuffer);\n    else\n        writeImage(0x10, buffer);\n}\n\nvoid UC8175::writeNewImage()\n{\n    writeImage(0x13, buffer);\n}\n\nvoid UC8175::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 400);\n    case FULL:\n    default:\n        return beginPolling(100, 2000);\n    }\n}\n\nbool UC8175::isUpdateDone()\n{\n    return digitalRead(pin_busy) != BUSY_ACTIVE;\n}\n\nvoid UC8175::finalizeUpdate()\n{\n    powerOff();\n\n    if (pin_rst != (uint8_t)-1) {\n        sendCommand(0x07); // Deep sleep.\n        sendData(0xA5);\n    }\n}\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/UC8175.h",
    "content": "// E-Ink base class for displays based on UC8175 / UC8176 style controller ICs.\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./EInk.h\"\n\nnamespace NicheGraphics::Drivers\n{\n\nclass UC8175 : public EInk\n{\n  public:\n    UC8175(uint16_t width, uint16_t height, UpdateTypes supported);\n    void begin(SPIClass *spi, uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_rst = -1) override;\n    void update(uint8_t *imageData, UpdateTypes type) override;\n\n  protected:\n    virtual void wait(uint32_t timeoutMs = 1000);\n    virtual void reset();\n    virtual void sendCommand(uint8_t command);\n    virtual void sendData(uint8_t data);\n    virtual void sendData(const uint8_t *data, uint32_t size);\n\n    virtual void configCommon() = 0; // Always run\n    virtual void configFull() = 0;   // Run when updateType == FULL\n    virtual void configFast() = 0;   // Run when updateType == FAST\n\n    virtual void powerOn();\n    virtual void powerOff();\n    virtual void writeOldImage();\n    virtual void writeNewImage();\n    virtual void writeImage(uint8_t command, const uint8_t *image);\n\n    virtual void detachFromUpdate();\n    virtual bool isUpdateDone() override;\n    virtual void finalizeUpdate() override;\n\n  protected:\n    static constexpr uint8_t BUSY_ACTIVE = LOW;\n\n    uint16_t bufferRowSize = 0;\n    uint32_t bufferSize = 0;\n    uint8_t *buffer = nullptr;\n    uint8_t *previousBuffer = nullptr;\n    bool hasPreviousBuffer = false;\n    UpdateTypes updateType = UpdateTypes::UNSPECIFIED;\n\n    uint8_t pin_dc = (uint8_t)-1;\n    uint8_t pin_cs = (uint8_t)-1;\n    uint8_t pin_busy = (uint8_t)-1;\n    uint8_t pin_rst = (uint8_t)-1;\n    SPIClass *spi = nullptr;\n    SPISettings spiSettings = SPISettings(8000000, MSBFIRST, SPI_MODE0);\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/ZJY122250_0213BAAMFGN.cpp",
    "content": "#include \"./ZJY122250_0213BAAMFGN.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Map the display controller IC's output to the connected panel\nvoid ZJY122250_0213BAAMFGN::configScanning()\n{\n    // \"Driver output control\"\n    // Scan gates from 0 to 249 (vertical resolution 250px)\n    sendCommand(0x01);\n    sendData(0xF9);\n    sendData(0x00);\n    sendData(0x00);\n}\n\n// Specify which information is used to control the sequence of voltages applied to move the pixels\n// - For this display, configUpdateSequence() specifies that a suitable LUT will be loaded from\n//   the controller IC's OTP memory, when the update procedure begins.\nvoid ZJY122250_0213BAAMFGN::configWaveform()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x3C); // Border waveform:\n        sendData(0x80);    // VCOM\n        break;\n    case FULL:\n    default:\n        sendCommand(0x3C); // Border waveform:\n        sendData(0x01);    // Follow LUT 1 (blink same as white pixels)\n        break;\n    }\n\n    sendCommand(0x18); // Temperature sensor:\n    sendData(0x80);    // Use internal temperature sensor to select an appropriate refresh waveform\n}\n\nvoid ZJY122250_0213BAAMFGN::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Will load LUT from OTP memory, Display mode 2 \"differential refresh\"\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Will load LUT from OTP memory\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid ZJY122250_0213BAAMFGN::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 500); // At least 500ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 2000); // At least 2 seconds for full refresh\n    }\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/ZJY122250_0213BAAMFGN.h",
    "content": "/*\n\nE-Ink display driver\n    - ZJY122250_0213BAAMFGN\n    - Manufacturer: Zhongjingyuan\n    - Size: 2.13 inch\n    - Resolution: 250px x 122px\n    - Flex connector marking (not a unique identifier): FPC-A002\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass ZJY122250_0213BAAMFGN : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 122;\n    static constexpr uint32_t height = 250;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    ZJY122250_0213BAAMFGN() : SSD16XX(width, height, supported) {}\n\n  protected:\n    virtual void configScanning() override;\n    virtual void configWaveform() override;\n    virtual void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/ZJY128296_029EAAMFGN.cpp",
    "content": "#include \"./ZJY128296_029EAAMFGN.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\nusing namespace NicheGraphics::Drivers;\n\n// Map the display controller IC's output to the connected panel\nvoid ZJY128296_029EAAMFGN::configScanning()\n{\n    // \"Driver output control\"\n    // Scan gates from 0 to 295 (vertical resolution 296px)\n    sendCommand(0x01);\n    sendData(0x27); // Number of gates (295, bits 0-7)\n    sendData(0x01); // Number of gates (295, bit 8)\n    sendData(0x00); // (Do not invert scanning order)\n}\n\n// Specify which information is used to control the sequence of voltages applied to move the pixels\n// - For this display, configUpdateSequence() specifies that a suitable LUT will be loaded from\n//   the controller IC's OTP memory, when the update procedure begins.\nvoid ZJY128296_029EAAMFGN::configWaveform()\n{\n    sendCommand(0x3C); // Border waveform:\n    sendData(0x05);    // Screen border should follow LUT1 waveform (actively drive pixels white)\n\n    sendCommand(0x18); // Temperature sensor:\n    sendData(0x80);    // Use internal temperature sensor to select an appropriate refresh waveform\n}\n\nvoid ZJY128296_029EAAMFGN::configUpdateSequence()\n{\n    switch (updateType) {\n    case FAST:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xFF);    // Will load LUT from OTP memory, Display mode 2 \"differential refresh\"\n        break;\n\n    case FULL:\n    default:\n        sendCommand(0x22); // Set \"update sequence\"\n        sendData(0xF7);    // Will load LUT from OTP memory\n        break;\n    }\n}\n\n// Once the refresh operation has been started,\n// begin periodically polling the display to check for completion, using the normal Meshtastic threading code\n// Only used when refresh is \"async\"\nvoid ZJY128296_029EAAMFGN::detachFromUpdate()\n{\n    switch (updateType) {\n    case FAST:\n        return beginPolling(50, 300); // At least 300ms for fast refresh\n    case FULL:\n    default:\n        return beginPolling(100, 2000); // At least 2 seconds for full refresh\n    }\n}\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/ZJY128296_029EAAMFGN.h",
    "content": "/*\n\nE-Ink display driver\n    - ZJY128296-029EAAMFGN\n    - Manufacturer: Zhongjingyuan\n    - Size: 2.9 inch\n    - Resolution: 128px x 296px\n    - Flex connector label (not a unique identifier): FPC-A005 20.06.15 TRX\n\n    Note: as of Feb. 2025, these panels are used for \"WeActStudio 2.9in B&W\" display modules\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./SSD16XX.h\"\n\nnamespace NicheGraphics::Drivers\n{\nclass ZJY128296_029EAAMFGN : public SSD16XX\n{\n    // Display properties\n  private:\n    static constexpr uint32_t width = 128;\n    static constexpr uint32_t height = 296;\n    static constexpr UpdateTypes supported = (UpdateTypes)(FULL | FAST);\n\n  public:\n    ZJY128296_029EAAMFGN() : SSD16XX(width, height, supported) {}\n\n  protected:\n    void configScanning() override;\n    void configWaveform() override;\n    void configUpdateSequence() override;\n    void detachFromUpdate() override;\n};\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/EInk/ZJY200200_0154DAAMFGN.h",
    "content": "/*\n\nE-Ink display driver\n    - ZJY200200-0154DAAMFGN\n    - Manufacturer: Zhongjingyuan\n    - Size: 1.54 inch\n    - Resolution: 200px x 200px\n    - Flex connector marking: FPC-B001\n\n    Note: as of Feb. 2025, these panels are used for \"WeActStudio 1.54in B&W\" display modules\n\n    This *is* a distinct panel, however the driver is currently identical to GDEY0154D67\n    We recognize it as separate now, to avoid breaking any custom builds if the drivers do need to diverge in future.\n\n*/\n\n#pragma once\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"configuration.h\"\n\n#include \"./GDEY0154D67.h\"\n\nnamespace NicheGraphics::Drivers\n{\n\ntypedef GDEY0154D67 ZJY200200_0154DAAMFGN;\n\n} // namespace NicheGraphics::Drivers\n\n#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS"
  },
  {
    "path": "src/graphics/niche/Drivers/README.md",
    "content": "# NicheGraphics - Drivers\n\nCommon drivers which can be used by various NicheGraphics UIs\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans12pt_Win1250.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans12pt_Win1250\n*/\nconst uint8_t FreeSans12pt_Win1250Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x00, 0x30, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x24, 0x00, 0x04, 0x80, 0x01, 0x90, 0x00, 0x62, 0x00, 0x30, 0xFE, 0x04, 0x10, 0x5F, 0x02, 0x0B, 0x00, 0x7F, 0xE0, 0x0C, 0x1C, 0x02, 0x83, 0x81, 0x9F, 0xF0, 0x02, 0x1E, 0x00, 0x41, 0xC0, 0x0E, 0x7F, 0x81, 0x78, 0x18, 0x62, 0x00, 0xFF, 0xC0,\n/* 0x02 */ 0x00, 0xFF, 0x80, 0x61, 0x13, 0xF0, 0x62, 0x60, 0x07, 0xFC, 0x00, 0x83, 0x80, 0x10, 0xF0, 0x33, 0xF6, 0x01, 0x41, 0xC0, 0x18, 0x38, 0x03, 0xFF, 0xE0, 0x47, 0x02, 0x08, 0x20, 0x61, 0xC4, 0x06, 0x17, 0x00, 0x22, 0x00, 0x02, 0x40, 0x00, 0x48, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x3C, 0x00,\n/* 0x03 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x04, 0x08, 0x48, 0x70, 0xE1, 0xC3, 0x87, 0x0E, 0x08, 0x10, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA1, 0x81, 0x8D, 0x87, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x04 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x10, 0x02, 0x48, 0xE0, 0x61, 0xC1, 0xCC, 0x0E, 0x78, 0x1C, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xFC, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x05 */ 0x00, 0x18, 0x00, 0x00, 0x40, 0x01, 0x90, 0x01, 0xF4, 0x08, 0x12, 0x23, 0xC1, 0x91, 0x2C, 0x1C, 0x8A, 0xC3, 0x64, 0x64, 0x13, 0x22, 0x41, 0x98, 0x26, 0x2C, 0xC4, 0x22, 0x60, 0x42, 0x13, 0x04, 0x30, 0x80, 0x61, 0xA4, 0x02, 0x18, 0x20, 0x03, 0x41, 0x00, 0x20, 0x08, 0x02, 0x00, 0x60, 0x40, 0x03, 0xF8,\n/* 0x06 */ 0x00, 0x10, 0x00, 0x03, 0x00, 0x1C, 0x48, 0x00, 0xB4, 0x80, 0x09, 0xF9, 0xC0, 0xE0, 0xE4, 0x0C, 0x02, 0x8F, 0x80, 0x38, 0x88, 0x01, 0x0D, 0x00, 0x18, 0x30, 0x01, 0x60, 0x80, 0x13, 0x18, 0x03, 0xF2, 0xC0, 0x20, 0x26, 0x06, 0x07, 0xFF, 0xA0, 0x02, 0x39, 0x00, 0x14, 0x70, 0x01, 0xC3, 0x00, 0x18, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x10, 0x37, 0xE2, 0x61, 0x00, 0x0C, 0xC6, 0x10, 0x98, 0x0C, 0x63, 0x00, 0x00, 0xC6, 0x00,\n/* 0x09 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x00, 0x37, 0xE0,\n/* 0x0A */\n/* 0x0B */ 0x1F, 0x07, 0xC1, 0x86, 0x41, 0x10, 0x0C, 0x04, 0x80, 0x40, 0x18, 0x00, 0x00, 0xC0, 0x00, 0x06, 0x00, 0x00, 0x30, 0x00, 0x01, 0x40, 0x00, 0x0A, 0x00, 0x00, 0x88, 0x00, 0x04, 0x40, 0x00, 0x41, 0x00, 0x02, 0x04, 0x00, 0x20, 0x20, 0x02, 0x00, 0x80, 0x20, 0x02, 0x02, 0x00, 0x08, 0x20, 0x00, 0x22, 0x00, 0x00, 0xE0, 0x00,\n/* 0x0C */ 0x01, 0x00, 0x00, 0x38, 0x00, 0x04, 0xC0, 0x01, 0x08, 0x00, 0x18, 0x80, 0x1C, 0x10, 0x02, 0x07, 0x80, 0x81, 0x10, 0x1F, 0xC2, 0x02, 0x00, 0x60, 0x80, 0x1A, 0x20, 0x1C, 0x42, 0x1C, 0x08, 0xFE, 0x03, 0xA0, 0x01, 0x8C, 0x01, 0xC1, 0x43, 0xD0, 0x27, 0x81, 0xF8,\n/* 0x0D */\n/* 0x0E */ 0x00, 0xE0, 0x00, 0x11, 0x00, 0x01, 0x10, 0x00, 0x0B, 0x00, 0x03, 0xF8, 0x00, 0x60, 0x60, 0x09, 0x02, 0x00, 0xA0, 0x10, 0x16, 0x01, 0x01, 0x40, 0x10, 0x10, 0x01, 0x01, 0x00, 0x08, 0x10, 0x00, 0x82, 0x1F, 0x08, 0x3F, 0x90, 0x44, 0x00, 0x06, 0xBF, 0xFF, 0xAF, 0xF0, 0xFF, 0xFF, 0x0F, 0xE3, 0xFB, 0xFC,\n/* 0x0F */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x40, 0x12, 0x34, 0x00, 0x69, 0x40, 0x01, 0x49, 0xE0, 0xF1, 0xCD, 0x06, 0x8E, 0x28, 0x14, 0x71, 0x40, 0xA3, 0x8B, 0xFD, 0x14, 0x50, 0x68, 0xA2, 0x81, 0x4D, 0x97, 0xFA, 0x44, 0xBF, 0xD6, 0x31, 0x02, 0xE0, 0xC8, 0x16, 0x08, 0x61, 0x08, 0x21, 0xF0, 0x80, 0xF8, 0x78, 0x00,\n/* 0x10 */ 0x00, 0xF0, 0x00, 0x3A, 0x00, 0x07, 0xC0, 0x00, 0xA8, 0x00, 0x1F, 0x00, 0x02, 0xB0, 0x00, 0x52, 0x00, 0x0A, 0x40, 0x02, 0x48, 0x00, 0x49, 0x00, 0x09, 0x30, 0x01, 0x22, 0x01, 0xC4, 0x70, 0xF0, 0x85, 0xE1, 0x10, 0x88, 0x37, 0x20, 0x03, 0x9C, 0x00, 0x37, 0x00, 0x06, 0x40, 0x01, 0x86, 0x00,\n/* 0x11 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x60, 0x02, 0x36, 0x00, 0x09, 0x04, 0x0C, 0x48, 0x60, 0xC1, 0xC3, 0x0F, 0x0E, 0x00, 0x08, 0x70, 0x00, 0x23, 0x80, 0x63, 0x84, 0x01, 0x9F, 0x20, 0x0C, 0xFD, 0x80, 0x27, 0xE4, 0x03, 0x3F, 0x30, 0x33, 0xE0, 0xC0, 0x00, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x12 */ 0x00, 0xC2, 0x00, 0x1C, 0x24, 0x02, 0x18, 0x60, 0x64, 0x02, 0x02, 0x40, 0x20, 0x00, 0xF2, 0x03, 0x89, 0xE0, 0x7C, 0x80, 0x0E, 0x25, 0x80, 0xE1, 0x00, 0x1A, 0x08, 0x71, 0xB0, 0xC4, 0x39, 0x84, 0xC2, 0xCC, 0x40, 0x76, 0x7C, 0x05, 0xBB, 0x80, 0x4C, 0xE0, 0x0A, 0x78, 0x00, 0x9C, 0x00, 0x0F, 0x00, 0x00,\n/* 0x13 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x60, 0xC1, 0xC6, 0xC9, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xF8, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x14 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x20, 0x22, 0x33, 0x01, 0x89, 0x20, 0x02, 0x48, 0x60, 0xE1, 0xC8, 0x80, 0x8E, 0x46, 0x46, 0x72, 0x32, 0x33, 0x9F, 0x9F, 0x94, 0x78, 0x78, 0xA0, 0x00, 0x0D, 0x80, 0x00, 0x44, 0x0E, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x15 */ 0x03, 0xFC, 0x20, 0x38, 0x1C, 0x81, 0x80, 0x1D, 0x08, 0x00, 0x32, 0x60, 0x00, 0x89, 0x00, 0x02, 0x18, 0x00, 0x08, 0x61, 0xC3, 0x22, 0x8D, 0x93, 0x72, 0x00, 0x00, 0x48, 0x00, 0x01, 0x20, 0x00, 0x04, 0x9F, 0xFF, 0x92, 0x60, 0x0E, 0x44, 0xFF, 0xF2, 0x11, 0xC3, 0x88, 0x21, 0xF8, 0x40, 0x40, 0x02, 0x00, 0xC0, 0x30, 0x00, 0xFF, 0x00,\n/* 0x16 */ 0x03, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x01, 0xE0, 0x03, 0xF0, 0x03, 0xF0, 0x27, 0xF0, 0x6F, 0x70, 0x6E, 0x60, 0xFC, 0x60, 0xFC, 0x7E, 0xFC, 0x7E, 0xFC, 0x3F, 0xF4, 0x1F, 0xF4, 0x1F, 0xF0, 0x0E, 0x70, 0x0E, 0x30, 0x1C, 0x38, 0x38, 0x0F, 0xF0,\n/* 0x17 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x00, 0x21, 0xC0, 0x02, 0x8E, 0x20, 0xF4, 0x70, 0x84, 0x11, 0x82, 0x40, 0x84, 0x01, 0x03, 0x20, 0x0F, 0x85, 0x80, 0x03, 0x04, 0x00, 0x04, 0x30, 0x78, 0x10, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x18 */ 0x00, 0xFC, 0x00, 0x02, 0x06, 0x00, 0x08, 0x24, 0x00, 0x21, 0xA4, 0x00, 0x4C, 0x48, 0x00, 0xA0, 0x50, 0x01, 0x92, 0x60, 0x03, 0x24, 0xC0, 0x06, 0x01, 0x81, 0x28, 0x03, 0x49, 0x6C, 0xC4, 0xAD, 0xD8, 0x16, 0xA4, 0xCC, 0xC4, 0x44, 0x86, 0x13, 0x05, 0x00, 0x28, 0x0A, 0x00, 0x50, 0x14, 0x00, 0x90, 0x48, 0x01, 0x20, 0x90, 0x02, 0x41, 0x20, 0x00, 0x00,\n/* 0x19 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x49, 0xC3, 0x81, 0xC0, 0x00, 0x0E, 0x78, 0xF0, 0x77, 0xEF, 0xC3, 0xA7, 0x4E, 0x15, 0x0A, 0x10, 0xA7, 0x8F, 0x0D, 0x80, 0x00, 0x44, 0x00, 0x06, 0x33, 0xF0, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1A */ 0xFF, 0xFF, 0x00, 0x06, 0x00, 0x0C, 0x3E, 0x18, 0x82, 0x32, 0x02, 0x64, 0x04, 0xC8, 0x09, 0x80, 0x23, 0x00, 0x86, 0x02, 0x0C, 0x08, 0x18, 0x10, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x81, 0x80, 0x03, 0x00, 0x07, 0xFF, 0xF8,\n/* 0x1B */ 0x00, 0xFE, 0x00, 0x03, 0x81, 0x80, 0x04, 0x00, 0x60, 0x08, 0x00, 0x30, 0x10, 0x00, 0x10, 0x30, 0x07, 0x88, 0x23, 0xC8, 0x08, 0x22, 0x00, 0x04, 0x60, 0x00, 0x44, 0x60, 0x00, 0x84, 0x63, 0x03, 0x04, 0x61, 0xFC, 0x04, 0x6B, 0x00, 0x9E, 0xA5, 0x01, 0x6A, 0xD5, 0x01, 0x43, 0xA8, 0x81, 0x05, 0xD0, 0x82, 0x0A, 0xA0, 0x82, 0x05, 0xC0, 0x82, 0x02, 0x61, 0xFF, 0x0C, 0x1E, 0x00, 0xF0,\n/* 0x1C */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x30, 0x02, 0x32, 0x00, 0x09, 0x00, 0x00, 0x48, 0x20, 0x61, 0xC3, 0x84, 0x0E, 0x1C, 0x78, 0x70, 0x40, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA0, 0x03, 0x0D, 0x83, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1D */ 0x01, 0xFE, 0x00, 0x3A, 0x1C, 0x03, 0x00, 0x30, 0x23, 0x1E, 0xC3, 0x38, 0x03, 0x10, 0xC3, 0x09, 0x00, 0x18, 0x68, 0x00, 0xC1, 0x40, 0x00, 0x0A, 0x07, 0x80, 0x50, 0x46, 0x02, 0x80, 0x00, 0x1A, 0x1E, 0x00, 0xCB, 0x10, 0x0D, 0x03, 0x00, 0x48, 0x60, 0x06, 0x40, 0x00, 0x22, 0x0C, 0x02, 0x10, 0x60, 0x60, 0x43, 0xFC, 0x01, 0xE0, 0x00, 0x00,\n/* 0x1E */ 0x01, 0xF0, 0x00, 0xEA, 0xC0, 0x31, 0x5F, 0x04, 0x5F, 0x88, 0x80, 0xA0, 0x48, 0x0E, 0x02, 0x8F, 0x40, 0x3C, 0x10, 0x21, 0x66, 0x87, 0x15, 0x98, 0x71, 0x41, 0x02, 0x14, 0x00, 0x01, 0x40, 0x00, 0x14, 0x00, 0x01, 0x21, 0xFE, 0x12, 0x00, 0x02, 0x10, 0x00, 0x60, 0x80, 0x0C, 0x06, 0x01, 0x80, 0x3F, 0xE0,\n/* 0x1F */ 0x0E, 0x00, 0x13, 0x00, 0x23, 0x00, 0xF3, 0x01, 0x31, 0x01, 0x11, 0x03, 0xD3, 0x06, 0xF2, 0x30, 0x34, 0xC7, 0x25, 0x33, 0x2B, 0xC2, 0x57, 0x04, 0x3A, 0x08, 0x72, 0x30, 0xA3, 0xC3, 0x40, 0x04, 0x40, 0x18, 0x40, 0x60, 0x7F, 0x80,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xFF, 0xF0, 0xF0,\n/* '\"' 0x22 */ 0xCF, 0x3C, 0xF3, 0x8A, 0x20,\n/* '#' 0x23 */ 0x06, 0x30, 0x31, 0x03, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC0, 0xC6, 0x06, 0x30,\n/* '$' 0x24 */ 0x04, 0x03, 0xE1, 0xFF, 0x72, 0x7C, 0x47, 0x88, 0xF1, 0x07, 0xA0, 0x7E, 0x03, 0xF0, 0x17, 0x02, 0x7C, 0x47, 0x88, 0xF1, 0x1B, 0x26, 0x7F, 0xC3, 0xE0, 0x10, 0x02, 0x00,\n/* '%' 0x25 */ 0x00, 0x06, 0x03, 0xC0, 0x40, 0x7E, 0x0C, 0x0E, 0x70, 0x80, 0xC3, 0x18, 0x0C, 0x31, 0x00, 0xE7, 0x30, 0x07, 0xE6, 0x00, 0x3C, 0x40, 0x00, 0x0C, 0x7C, 0x00, 0x8F, 0xE0, 0x19, 0xC7, 0x01, 0x18, 0x30, 0x31, 0x83, 0x02, 0x1C, 0x70, 0x40, 0xFE, 0x04, 0x07, 0xC0,\n/* '&' 0x26 */ 0x0F, 0x00, 0x7E, 0x03, 0x9C, 0x0C, 0x30, 0x30, 0xC0, 0xE7, 0x01, 0xF8, 0x03, 0x80, 0x3E, 0x01, 0xCC, 0x6E, 0x39, 0xB0, 0x7C, 0xC0, 0xF3, 0x03, 0xCE, 0x1F, 0x9F, 0xE6, 0x3E, 0x1C,\n/* ''' 0x27 */ 0xFF, 0xA0,\n/* '(' 0x28 */ 0x08, 0x8C, 0x46, 0x31, 0x98, 0xC6, 0x31, 0x8C, 0x63, 0x08, 0x63, 0x08, 0x61, 0x0C, 0x20,\n/* ')' 0x29 */ 0x82, 0x18, 0xC3, 0x18, 0xC3, 0x18, 0xC6, 0x31, 0x8C, 0x62, 0x31, 0x88, 0xC4, 0x62, 0x00,\n/* '*' 0x2A */ 0x10, 0x23, 0x5B, 0xE3, 0x8D, 0x91, 0x00,\n/* '+' 0x2B */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0xFF, 0xFF, 0xF0, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0,\n/* ',' 0x2C */ 0xF5, 0x60,\n/* '-' 0x2D */ 0xFF, 0xF0,\n/* '.' 0x2E */ 0xF0,\n/* '/' 0x2F */ 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x00,\n/* '0' 0x30 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x6C, 0x0F, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3E, 0x0E, 0xC1, 0x9C, 0x71, 0xFC, 0x1F, 0x00,\n/* '1' 0x31 */ 0x08, 0xCF, 0xFF, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18,\n/* '2' 0x32 */ 0x1F, 0x0F, 0xF9, 0x87, 0x60, 0x7C, 0x06, 0x00, 0xC0, 0x18, 0x07, 0x01, 0xC0, 0xF0, 0x78, 0x1C, 0x06, 0x00, 0xC0, 0x30, 0x07, 0xFF, 0xFF, 0xE0,\n/* '3' 0x33 */ 0x3F, 0x0F, 0xF3, 0x87, 0x60, 0x6C, 0x0C, 0x01, 0x80, 0x60, 0x78, 0x0F, 0x80, 0x18, 0x01, 0x80, 0x3C, 0x07, 0x80, 0xD8, 0x73, 0xFC, 0x3F, 0x00,\n/* '4' 0x34 */ 0x01, 0x80, 0x70, 0x0E, 0x03, 0xC0, 0xD8, 0x1B, 0x06, 0x61, 0x8C, 0x21, 0x8C, 0x33, 0x06, 0x7F, 0xFF, 0xFE, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80,\n/* '5' 0x35 */ 0x3F, 0xCF, 0xF9, 0x80, 0x30, 0x06, 0x00, 0xDE, 0x1F, 0xE7, 0x0E, 0x00, 0xE0, 0x0C, 0x01, 0x80, 0x30, 0x07, 0x81, 0xB8, 0x73, 0xFC, 0x1F, 0x00,\n/* '6' 0x36 */ 0x0F, 0x07, 0xF9, 0xC3, 0x30, 0x74, 0x01, 0x80, 0x33, 0xC7, 0xFE, 0xF1, 0xDC, 0x1F, 0x01, 0xE0, 0x3C, 0x06, 0xC1, 0xDC, 0x71, 0xFC, 0x1F, 0x00,\n/* '7' 0x37 */ 0xFF, 0xFF, 0xFC, 0x01, 0x00, 0x60, 0x18, 0x02, 0x00, 0xC0, 0x30, 0x06, 0x01, 0x80, 0x30, 0x04, 0x01, 0x80, 0x30, 0x06, 0x01, 0x80, 0x30, 0x00,\n/* '8' 0x38 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x66, 0x0C, 0xC1, 0x8C, 0x61, 0xF8, 0x3F, 0x8E, 0x3B, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xD8, 0x31, 0xFC, 0x1F, 0x00,\n/* '9' 0x39 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x6C, 0x07, 0x80, 0xF0, 0x1E, 0x07, 0x61, 0xEF, 0xFC, 0x79, 0x80, 0x30, 0x05, 0xC1, 0x98, 0x73, 0xFC, 0x1E, 0x00,\n/* ':' 0x3A */ 0xF0, 0x00, 0x03, 0xC0,\n/* ';' 0x3B */ 0xF0, 0x00, 0x0F, 0x56,\n/* '<' 0x3C */ 0x00, 0x70, 0x1E, 0x0F, 0x83, 0xC0, 0xF0, 0x0E, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x10,\n/* '=' 0x3D */ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,\n/* '>' 0x3E */ 0xE0, 0x07, 0x80, 0x1F, 0x00, 0x7C, 0x00, 0xF0, 0x07, 0x01, 0xE0, 0xF0, 0x3C, 0x0F, 0x00, 0x80, 0x00,\n/* '?' 0x3F */ 0x3F, 0x1F, 0xEE, 0x1F, 0x03, 0xC0, 0xC0, 0x30, 0x0C, 0x06, 0x03, 0x81, 0xC0, 0xE0, 0x30, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x00,\n/* '@' 0x40 */ 0x00, 0xFE, 0x00, 0x0F, 0xFE, 0x00, 0xF0, 0x3E, 0x07, 0x00, 0x3C, 0x38, 0x00, 0x38, 0xC1, 0xE0, 0x66, 0x0F, 0xD9, 0xD8, 0x61, 0xC3, 0xC3, 0x07, 0x0F, 0x1C, 0x1C, 0x3C, 0x60, 0x60, 0xF1, 0x81, 0x83, 0xC6, 0x06, 0x1B, 0x18, 0x38, 0xEE, 0x71, 0xE7, 0x18, 0xFD, 0xF8, 0x71, 0xE7, 0xC0, 0xE0, 0x00, 0x01, 0xE0, 0x00, 0x01, 0xFF, 0xC0, 0x01, 0xFC, 0x00,\n/* 'A' 0x41 */ 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 'B' 0x42 */ 0xFF, 0xC7, 0xFF, 0x30, 0x1D, 0x80, 0x6C, 0x03, 0x60, 0x1B, 0x00, 0xD8, 0x0C, 0xFF, 0xC7, 0xFF, 0x30, 0x0D, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x06, 0xFF, 0xF7, 0xFE, 0x00,\n/* 'C' 0x43 */ 0x07, 0xE0, 0x3F, 0xF0, 0xE0, 0x73, 0x80, 0x76, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x00, 0xDC, 0x03, 0x1E, 0x0E, 0x1F, 0xF8, 0x0F, 0xC0,\n/* 'D' 0x44 */ 0xFF, 0xC3, 0xFF, 0x8C, 0x07, 0x30, 0x0E, 0xC0, 0x1B, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x3C, 0x00, 0xF0, 0x03, 0xC0, 0x1F, 0x00, 0x6C, 0x03, 0xB0, 0x1C, 0xFF, 0xE3, 0xFE, 0x00,\n/* 'E' 0x45 */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 'F' 0x46 */ 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xFF, 0xDF, 0xFB, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x00,\n/* 'G' 0x47 */ 0x07, 0xF0, 0x1F, 0xFC, 0x3C, 0x1E, 0x70, 0x07, 0x60, 0x03, 0xE0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x7F, 0xC0, 0x7F, 0xC0, 0x03, 0xC0, 0x03, 0x60, 0x03, 0x60, 0x07, 0x30, 0x0F, 0x3C, 0x1F, 0x1F, 0xFB, 0x07, 0xE1,\n/* 'H' 0x48 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xC0,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'J' 0x4A */ 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x3C, 0x1E, 0x0F, 0x07, 0xC7, 0x7F, 0x1F, 0x00,\n/* 'K' 0x4B */ 0xC0, 0x3E, 0x03, 0xB0, 0x39, 0x83, 0x8C, 0x38, 0x63, 0x83, 0x38, 0x19, 0xC0, 0xDE, 0x07, 0xB8, 0x38, 0xE1, 0x83, 0x0C, 0x1C, 0x60, 0x73, 0x01, 0x98, 0x0E, 0xC0, 0x3E, 0x00, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xFF, 0xFF, 0xF0,\n/* 'M' 0x4D */ 0xE0, 0x07, 0xE0, 0x07, 0xF0, 0x0F, 0xF0, 0x0F, 0xD0, 0x0F, 0xD8, 0x1B, 0xD8, 0x1B, 0xD8, 0x1B, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xC6, 0x63, 0xC6, 0x63, 0xC6, 0x63, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC1, 0x83,\n/* 'N' 0x4E */ 0xE0, 0x1F, 0x00, 0xFC, 0x07, 0xE0, 0x3D, 0x81, 0xEE, 0x0F, 0x30, 0x79, 0xC3, 0xC6, 0x1E, 0x18, 0xF0, 0xE7, 0x83, 0x3C, 0x1D, 0xE0, 0x6F, 0x01, 0xF8, 0x0F, 0xC0, 0x3E, 0x01, 0xC0,\n/* 'O' 0x4F */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x00, 0x18, 0xC0, 0x18, 0x78, 0x3C, 0x1F, 0xFC, 0x03, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x8F, 0xFE, 0xC0, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x06, 0xFF, 0xEF, 0xFC, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00,\n/* 'Q' 0x51 */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x01, 0x98, 0xC0, 0xFC, 0x78, 0x3C, 0x1F, 0xFF, 0x03, 0xF9, 0x80, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x0C, 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x70,\n/* 'S' 0x53 */ 0x0F, 0xE0, 0x7F, 0xC3, 0x83, 0x98, 0x07, 0x60, 0x0D, 0x80, 0x07, 0x00, 0x1E, 0x00, 0x3F, 0x80, 0x3F, 0xC0, 0x0F, 0x80, 0x07, 0xC0, 0x0F, 0x00, 0x3E, 0x00, 0xDE, 0x0E, 0x3F, 0xF0, 0x3F, 0x80,\n/* 'T' 0x54 */ 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 'U' 0x55 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x80, 0xEE, 0x0E, 0x3F, 0xE0, 0xFC, 0x00,\n/* 'V' 0x56 */ 0xC0, 0x0F, 0x00, 0x7E, 0x01, 0x98, 0x06, 0x60, 0x39, 0xC0, 0xC3, 0x03, 0x0C, 0x1C, 0x38, 0x60, 0x61, 0x81, 0x8E, 0x07, 0x30, 0x0C, 0xC0, 0x37, 0x00, 0xF8, 0x01, 0xE0, 0x07, 0x80, 0x1C, 0x00,\n/* 'W' 0x57 */ 0xE0, 0x30, 0x1D, 0x80, 0xE0, 0x76, 0x07, 0x81, 0xDC, 0x1E, 0x06, 0x70, 0x7C, 0x18, 0xC1, 0xB0, 0xE3, 0x0C, 0xC3, 0x8C, 0x33, 0x0C, 0x38, 0xC6, 0x30, 0x67, 0x18, 0xC1, 0x98, 0x67, 0x06, 0x61, 0xD8, 0x1D, 0x83, 0x60, 0x3C, 0x0D, 0x80, 0xF0, 0x3E, 0x03, 0xC0, 0x70, 0x0F, 0x01, 0xC0, 0x18, 0x07, 0x00,\n/* 'X' 0x58 */ 0xE0, 0x1D, 0x80, 0xE7, 0x03, 0x0E, 0x1C, 0x18, 0x60, 0x73, 0x00, 0xFC, 0x01, 0xE0, 0x07, 0x00, 0x1E, 0x00, 0xF8, 0x03, 0x30, 0x1C, 0xE0, 0xE1, 0x83, 0x07, 0x1C, 0x0E, 0xE0, 0x1B, 0x00, 0x70,\n/* 'Y' 0x59 */ 0xC0, 0x0F, 0x80, 0x76, 0x01, 0x9C, 0x0C, 0x38, 0x70, 0x61, 0x81, 0xCE, 0x03, 0x30, 0x0F, 0x80, 0x1E, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x03, 0x80, 0x18, 0x01, 0xC0, 0x1C, 0x00, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFF, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCF, 0xF0,\n/* '\\' 0x5C */ 0x81, 0x81, 0x02, 0x06, 0x04, 0x08, 0x18, 0x10, 0x20, 0x60, 0x40, 0x81, 0x81, 0x02, 0x06, 0x04,\n/* ']' 0x5D */ 0xFF, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xF0,\n/* '^' 0x5E */ 0x0C, 0x0E, 0x05, 0x86, 0xC3, 0x21, 0x19, 0x8C, 0x83, 0xC1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xFE,\n/* '`' 0x60 */ 0xE3, 0x8C, 0x30,\n/* 'a' 0x61 */ 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 'b' 0x62 */ 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0xF8, 0xDF, 0xCF, 0x0E, 0xE0, 0x7C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xE0, 0x6F, 0x0E, 0xDF, 0xCC, 0xF8,\n/* 'c' 0x63 */ 0x1F, 0x0F, 0xE6, 0x1F, 0x83, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x38, 0x37, 0x1C, 0xFE, 0x1F, 0x00,\n/* 'd' 0x64 */ 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x3C, 0xCF, 0xFB, 0x8F, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8F, 0x3F, 0x63, 0xCC,\n/* 'e' 0x65 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x3C, 0x07, 0xFF, 0xFF, 0xFE, 0x00, 0xC0, 0x1C, 0x0D, 0xC3, 0x1F, 0xC1, 0xF0,\n/* 'f' 0x66 */ 0x3B, 0xD8, 0xC6, 0x7F, 0xEC, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x00,\n/* 'g' 0x67 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xB1, 0xE6, 0x00, 0xC0, 0x3E, 0x0E, 0x7F, 0xC7, 0xE0,\n/* 'h' 0x68 */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x33, 0xCD, 0xFB, 0xC7, 0xE0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x30,\n/* 'i' 0x69 */ 0xF0, 0x3F, 0xFF, 0xFF, 0xF0,\n/* 'j' 0x6A */ 0x33, 0x00, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0xB8, 0xC6, 0x31, 0xCC, 0x3B, 0x06, 0xC1, 0xF0, 0x30,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'm' 0x6D */ 0xCF, 0x1F, 0x6F, 0xDF, 0xFC, 0x78, 0xFC, 0x18, 0x3C, 0x0C, 0x1E, 0x06, 0x0F, 0x03, 0x07, 0x81, 0x83, 0xC0, 0xC1, 0xE0, 0x60, 0xF0, 0x30, 0x78, 0x18, 0x3C, 0x0C, 0x18,\n/* 'n' 0x6E */ 0xCF, 0x37, 0xEF, 0x1F, 0x83, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0,\n/* 'o' 0x6F */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x1F, 0xC1, 0xF0,\n/* 'p' 0x70 */ 0xCF, 0x8D, 0xFC, 0xF0, 0xEE, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3E, 0x06, 0xF0, 0xEF, 0xFC, 0xCF, 0x8C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 'q' 0x71 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xF1, 0xE6, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60,\n/* 'r' 0x72 */ 0xCF, 0x7F, 0x38, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 's' 0x73 */ 0x3E, 0x1F, 0xEE, 0x1B, 0x00, 0xC0, 0x3C, 0x07, 0xF0, 0x3F, 0x01, 0xF0, 0x3E, 0x1D, 0xFE, 0x3F, 0x00,\n/* 't' 0x74 */ 0x63, 0x19, 0xFF, 0xB1, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0xE7,\n/* 'u' 0x75 */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x7E, 0x3D, 0xFB, 0x3C, 0xC0,\n/* 'v' 0x76 */ 0xE0, 0x6C, 0x0D, 0x81, 0xB8, 0x63, 0x0C, 0x61, 0x8E, 0x60, 0xCC, 0x19, 0x83, 0xE0, 0x3C, 0x07, 0x00, 0xE0,\n/* 'w' 0x77 */ 0xC1, 0xC1, 0xB0, 0xE1, 0xD8, 0x70, 0xCC, 0x2C, 0x66, 0x36, 0x31, 0x9B, 0x18, 0xCD, 0x98, 0x64, 0x6C, 0x16, 0x36, 0x0F, 0x1A, 0x07, 0x8F, 0x03, 0x83, 0x80, 0xC1, 0xC0,\n/* 'x' 0x78 */ 0xC1, 0xF8, 0x66, 0x30, 0xCC, 0x3E, 0x07, 0x00, 0xC0, 0x78, 0x36, 0x0C, 0xC6, 0x3B, 0x06, 0xC0, 0xC0,\n/* 'y' 0x79 */ 0xE0, 0x6C, 0x0D, 0x83, 0x38, 0x63, 0x0C, 0x63, 0x0C, 0x60, 0xCC, 0x1B, 0x03, 0x60, 0x3C, 0x07, 0x00, 0xE0, 0x18, 0x03, 0x00, 0xE0, 0x78, 0x0E, 0x00,\n/* 'z' 0x7A */ 0xFF, 0xFF, 0xF0, 0x18, 0x0C, 0x07, 0x03, 0x81, 0xC0, 0x60, 0x30, 0x18, 0x0E, 0x03, 0xFF, 0xFF, 0xC0,\n/* '{' 0x7B */ 0x19, 0xCC, 0x63, 0x18, 0xC6, 0x31, 0x99, 0x86, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x1C, 0x60,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,\n/* '}' 0x7D */ 0xC7, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x0C, 0x33, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x73, 0x00,\n/* '~' 0x7E */ 0x70, 0x3E, 0x09, 0xE4, 0x1F, 0x03, 0x80,\n/* 0x7F */\n/* 0x80 */ 0x01, 0xF0, 0x1F, 0xF0, 0xE0, 0xC7, 0x00, 0x18, 0x00, 0xC0, 0x07, 0xFF, 0x3F, 0xFC, 0x30, 0x01, 0xFF, 0x8F, 0xFC, 0x0C, 0x00, 0x18, 0x00, 0x70, 0x00, 0xE0, 0x81, 0xFE, 0x03, 0xF0,\n/* 0x81 */\n/* 0x82 */ 0xF5, 0x80,\n/* 0x83 */\n/* 0x84 */ 0xCF, 0x34, 0x51, 0x88,\n/* 0x85 */ 0xC6, 0x3C, 0x63,\n/* 0x86 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x00,\n/* 0x87 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x0F, 0xFF, 0xFF, 0x0C, 0x03, 0x00, 0xC0, 0x30,\n/* 0x88 */\n/* 0x89 */ 0x38, 0x18, 0x00, 0xF8, 0x30, 0x03, 0x18, 0xC0, 0x04, 0x11, 0x80, 0x0C, 0x66, 0x00, 0x0F, 0x8C, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x40, 0x00, 0x01, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x31, 0xC0, 0xE0, 0x67, 0xC3, 0xC1, 0x98, 0xCC, 0xC3, 0x20, 0x90, 0x8C, 0x63, 0x33, 0x10, 0x7C, 0x3C, 0x60, 0x70, 0x38,\n/* 0x8A */ 0x0C, 0x40, 0x1F, 0x00, 0x38, 0x03, 0xF8, 0x1F, 0xF0, 0xE0, 0xE6, 0x01, 0xD8, 0x03, 0x60, 0x01, 0xC0, 0x07, 0x80, 0x0F, 0xE0, 0x0F, 0xF0, 0x03, 0xE0, 0x01, 0xF0, 0x03, 0xC0, 0x0F, 0x80, 0x37, 0x83, 0x8F, 0xFC, 0x0F, 0xE0,\n/* 0x8B */ 0x2F, 0x49, 0x99,\n/* 0x8C */ 0x01, 0x80, 0x0C, 0x00, 0x60, 0x00, 0x00, 0x0F, 0xE0, 0x7F, 0xC3, 0x83, 0x98, 0x07, 0x60, 0x0D, 0x80, 0x07, 0x00, 0x1E, 0x00, 0x3F, 0x80, 0x3F, 0xC0, 0x0F, 0x80, 0x07, 0xC0, 0x0F, 0x00, 0x3E, 0x00, 0xDE, 0x0E, 0x3F, 0xF0, 0x3F, 0x80,\n/* 0x8D */ 0x0C, 0xC0, 0xF8, 0x07, 0x0F, 0xFF, 0xFF, 0xF0, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 0x8E */ 0x0C, 0xC0, 0x3C, 0x00, 0xE1, 0xFF, 0xFF, 0xFF, 0x80, 0x1C, 0x01, 0xC0, 0x1C, 0x00, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x01, 0xFF, 0xFF, 0xFF, 0x80,\n/* 0x8F */ 0x01, 0x80, 0x18, 0x01, 0x80, 0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0xE0, 0x0E, 0x00, 0xE0, 0x06, 0x00, 0x70, 0x07, 0x00, 0x70, 0x03, 0x00, 0x38, 0x03, 0x80, 0x38, 0x01, 0x80, 0x1C, 0x01, 0xC0, 0x0F, 0xFF, 0xFF, 0xFC,\n/* 0x90 */\n/* 0x91 */ 0x6A, 0xF0,\n/* 0x92 */ 0xF5, 0x60,\n/* 0x93 */ 0x4E, 0x28, 0xA2, 0xCF, 0x30,\n/* 0x94 */ 0xCF, 0x34, 0x51, 0x4E, 0x20,\n/* 0x95 */ 0x7B, 0xFF, 0xFF, 0xFD, 0xE0,\n/* 0x96 */ 0xFF, 0xFF, 0xF0,\n/* 0x97 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 0x98 */\n/* 0x99 */ 0xFF, 0x70, 0x1F, 0xFD, 0xC0, 0x71, 0x87, 0x83, 0xC6, 0x1E, 0x0F, 0x18, 0x68, 0x3C, 0x61, 0xB1, 0xB1, 0x86, 0xC6, 0xC6, 0x19, 0x1B, 0x18, 0x66, 0xCC, 0x61, 0x9B, 0x31, 0x86, 0x3C, 0xC6, 0x18, 0xE3, 0x18, 0x63, 0x8C,\n/* 0x9A */ 0x63, 0x0D, 0x83, 0x60, 0x70, 0x00, 0x0F, 0x87, 0xFB, 0x86, 0xC0, 0x30, 0x0F, 0x01, 0xFC, 0x0F, 0xC0, 0x7C, 0x0F, 0x87, 0x7F, 0x8F, 0xC0,\n/* 0x9B */ 0x99, 0x92, 0xF4,\n/* 0x9C */ 0x07, 0x03, 0x80, 0xC0, 0x60, 0x00, 0x0F, 0x87, 0xFB, 0x86, 0xC0, 0x30, 0x0F, 0x01, 0xFC, 0x0F, 0xC0, 0x7C, 0x0F, 0x87, 0x7F, 0x8F, 0xC0,\n/* 0x9D */ 0x03, 0x06, 0x66, 0x64, 0x60, 0xF8, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x38,\n/* 0x9E */ 0x63, 0x0C, 0x83, 0x60, 0x70, 0x00, 0x3F, 0xFF, 0xFC, 0x06, 0x03, 0x01, 0xC0, 0xE0, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x80, 0xFF, 0xFF, 0xF0,\n/* 0x9F */ 0x07, 0x01, 0x80, 0xC0, 0x20, 0x00, 0x3F, 0xFF, 0xFC, 0x06, 0x03, 0x01, 0xC0, 0xE0, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x80, 0xFF, 0xFF, 0xF0,\n/* 0xA0 */\n/* 0xA1 */ 0xC6, 0xD9, 0xB1, 0xC0,\n/* 0xA2 */ 0x83, 0x8D, 0xF1, 0xC0,\n/* 0xA3 */ 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x18, 0x80, 0xCC, 0x06, 0xC0, 0x3C, 0x01, 0xC0, 0x3C, 0x01, 0x60, 0x03, 0x00, 0x18, 0x00, 0xC0, 0x06, 0x00, 0x3F, 0xF9, 0xFF, 0xC0,\n/* 0xA4 */ 0xDD, 0xFF, 0xD8, 0xD8, 0x3C, 0x1E, 0x0F, 0x8D, 0xFF, 0xDD, 0x80,\n/* 0xA5 */ 0x03, 0x80, 0x03, 0xC0, 0x07, 0xC0, 0x07, 0xC0, 0x04, 0xE0, 0x0C, 0xE0, 0x0C, 0xE0, 0x08, 0x70, 0x18, 0x70, 0x18, 0x70, 0x10, 0x38, 0x3F, 0xF8, 0x3F, 0xF8, 0x30, 0x1C, 0x70, 0x0C, 0x60, 0x0C, 0x60, 0x0E, 0xE0, 0x06, 0x00, 0x0E, 0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x0F,\n/* 0xA6 */ 0xFF, 0xFF, 0xF0, 0x3F, 0xFF, 0xFC,\n/* 0xA7 */ 0x0F, 0x03, 0xF0, 0xE7, 0x18, 0x63, 0x0C, 0x70, 0x07, 0x03, 0xF8, 0xC3, 0x98, 0x3B, 0x03, 0xF0, 0x37, 0x06, 0x78, 0xC7, 0xB0, 0x7C, 0x03, 0x80, 0x39, 0x83, 0x30, 0x67, 0x1C, 0x7F, 0x07, 0xC0,\n/* 0xA8 */ 0xCF, 0x30,\n/* 0xA9 */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xE3, 0x1C, 0x73, 0xF3, 0x99, 0x86, 0x6C, 0xC1, 0x8F, 0x30, 0x03, 0xCC, 0x00, 0xF3, 0x00, 0x3C, 0xC1, 0x8D, 0x98, 0x66, 0x77, 0xF3, 0x8E, 0x79, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAA */ 0x0F, 0xC0, 0xFF, 0xC3, 0x03, 0x98, 0x07, 0x60, 0x0D, 0x80, 0x07, 0x00, 0x1E, 0x00, 0x3F, 0x80, 0x3F, 0xC0, 0x0F, 0x80, 0x07, 0xC0, 0x0F, 0x00, 0x3E, 0x00, 0xDC, 0x0E, 0x3F, 0xF0, 0x3F, 0x00, 0x20, 0x01, 0xE0, 0x01, 0x80, 0x06, 0x00, 0xF0, 0x00,\n/* 0xAB */ 0x21, 0x63, 0xE7, 0x84, 0x84, 0xE7, 0x63, 0x21,\n/* 0xAC */ 0xFF, 0xFF, 0xFF, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03,\n/* 0xAD */ 0xFF, 0xF0,\n/* 0xAE */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xFF, 0x1C, 0x7F, 0xF3, 0x9B, 0x04, 0x6C, 0xC1, 0x8F, 0x30, 0x43, 0xCF, 0xF0, 0xF3, 0xFC, 0x3C, 0xC1, 0x0D, 0xB0, 0x66, 0x7C, 0x1B, 0x8F, 0x07, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAF */ 0x03, 0x00, 0x18, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0x80, 0x1C, 0x01, 0xC0, 0x1C, 0x00, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x01, 0xFF, 0xFF, 0xFF, 0x80,\n/* 0xB0 */ 0x38, 0xFB, 0x1C, 0x18, 0x38, 0xDF, 0x1C,\n/* 0xB1 */ 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x7F, 0xE7, 0xFE, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xB2 */ 0x76, 0x31, 0x87, 0x80,\n/* 0xB3 */ 0x66, 0x66, 0x66, 0x67, 0x7E, 0xE6, 0x66, 0x66, 0x66,\n/* 0xB4 */ 0x3B, 0x99, 0x80,\n/* 0xB5 */ 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x1C, 0xE3, 0xCF, 0xEF, 0xFC, 0x7C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 0xB6 */ 0x1F, 0xE7, 0xFD, 0xF3, 0x7E, 0x6F, 0xCD, 0xF9, 0xBF, 0x37, 0xE6, 0x7C, 0xCF, 0x98, 0xF3, 0x06, 0x60, 0xCC, 0x19, 0x83, 0x30, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x60, 0xCC,\n/* 0xB7 */ 0xF0,\n/* 0xB8 */ 0x10, 0xF0, 0xE3, 0x78,\n/* 0xB9 */ 0x1F, 0x01, 0xFC, 0x1C, 0x70, 0xC1, 0x80, 0x0C, 0x00, 0xE0, 0xFF, 0x1F, 0x18, 0xC0, 0xC6, 0x06, 0x38, 0x70, 0xFF, 0xE3, 0xC7, 0x00, 0x30, 0x03, 0x00, 0x18, 0x00, 0xC0, 0x03, 0xC0,\n/* 0xBA */ 0x3F, 0x1F, 0xEE, 0x1B, 0x00, 0xC0, 0x3C, 0x07, 0xF0, 0x3E, 0x01, 0xF0, 0x3C, 0x0D, 0xDE, 0x7F, 0x02, 0x01, 0xE0, 0x18, 0x46, 0x0F, 0x00,\n/* 0xBB */ 0x88, 0xC6, 0xE7, 0x21, 0x21, 0xE7, 0xC6, 0x88,\n/* 0xBC */ 0xC3, 0x31, 0x8C, 0x63, 0x10, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xFF, 0xFF, 0xF0,\n/* 0xBD */ 0x77, 0x66, 0xCC, 0xC8,\n/* 0xBE */ 0xC7, 0x9B, 0x36, 0xCC, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x80,\n/* 0xBF */ 0x0C, 0x03, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF0, 0x18, 0x0C, 0x07, 0x03, 0x81, 0xC0, 0x60, 0x30, 0x18, 0x0E, 0x03, 0xFF, 0xFF, 0xC0,\n/* 0xC0 */ 0x03, 0x80, 0x18, 0x00, 0x40, 0x00, 0x00, 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x0C, 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x70,\n/* 0xC1 */ 0x01, 0xC0, 0x0C, 0x00, 0x20, 0x00, 0x00, 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC2 */ 0x07, 0x00, 0x3E, 0x01, 0x8C, 0x00, 0x00, 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC3 */ 0x10, 0x40, 0x63, 0x00, 0xF8, 0x01, 0xE0, 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC4 */ 0x0C, 0xC0, 0x33, 0x00, 0x00, 0x01, 0xE0, 0x07, 0x80, 0x1E, 0x00, 0xFC, 0x03, 0x30, 0x0C, 0xC0, 0x73, 0x81, 0x86, 0x06, 0x18, 0x38, 0x70, 0xC0, 0xC3, 0xFF, 0x1F, 0xFE, 0x60, 0x19, 0x80, 0x6E, 0x01, 0xF0, 0x03, 0xC0, 0x0C,\n/* 0xC5 */ 0x18, 0x0C, 0x06, 0x00, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xFF, 0xFF, 0xF0,\n/* 0xC6 */ 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x7E, 0x03, 0xFF, 0x0E, 0x07, 0x38, 0x07, 0x60, 0x06, 0xC0, 0x03, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x18, 0x00, 0x30, 0x00, 0x60, 0x00, 0xE0, 0x06, 0xC0, 0x0D, 0xC0, 0x31, 0xE0, 0xE1, 0xFF, 0x80, 0xFC, 0x00,\n/* 0xC7 */ 0x07, 0xE0, 0x3F, 0xF0, 0xE0, 0x73, 0x80, 0x66, 0x00, 0x7C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x01, 0xDC, 0x03, 0x1C, 0x1E, 0x1F, 0xF8, 0x0F, 0xC0, 0x08, 0x00, 0x1E, 0x00, 0x0C, 0x01, 0x18, 0x01, 0xE0, 0x00,\n/* 0xC8 */ 0x06, 0x30, 0x07, 0xC0, 0x07, 0x00, 0x3F, 0x01, 0xFF, 0x87, 0x03, 0x9C, 0x03, 0xB0, 0x03, 0x60, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0C, 0x00, 0x18, 0x00, 0x30, 0x00, 0x70, 0x03, 0x60, 0x06, 0xE0, 0x18, 0xF0, 0x70, 0xFF, 0xC0, 0x7E, 0x00,\n/* 0xC9 */ 0x07, 0x00, 0x60, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 0xCA */ 0xFF, 0xE7, 0xFF, 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x18, 0x00, 0xFF, 0xE7, 0xFF, 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x18, 0x00, 0xFF, 0xF7, 0xFF, 0x80, 0x18, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x01, 0xE0,\n/* 0xCB */ 0x19, 0x81, 0x98, 0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFE, 0xFF, 0xEC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xCC */ 0x08, 0xC0, 0xF8, 0x07, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFE, 0xFF, 0xEC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xCD */ 0x36, 0xC0, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,\n/* 0xCE */ 0x39, 0xFC, 0x40, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 0xCF */ 0x18, 0xC0, 0x3E, 0x00, 0x70, 0x3F, 0xF0, 0xFF, 0xE3, 0x01, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1F, 0x00, 0x3C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x3C, 0x00, 0xF0, 0x07, 0xC0, 0x1B, 0x00, 0xEC, 0x07, 0x3F, 0xF8, 0xFF, 0x80,\n/* 0xD0 */ 0x7F, 0xE0, 0xFF, 0xE1, 0x80, 0xE3, 0x00, 0xE6, 0x00, 0xCC, 0x01, 0xD8, 0x01, 0xB0, 0x03, 0xFE, 0x07, 0xFC, 0x0D, 0x80, 0x1B, 0x00, 0x36, 0x00, 0x6C, 0x01, 0x98, 0x07, 0x30, 0x1C, 0x7F, 0xF0, 0xFF, 0xC0,\n/* 0xD1 */ 0x01, 0x80, 0x18, 0x01, 0x80, 0x00, 0x0E, 0x01, 0xF0, 0x0F, 0xC0, 0x7E, 0x03, 0xD8, 0x1E, 0xE0, 0xF3, 0x07, 0x9C, 0x3C, 0x61, 0xE1, 0x8F, 0x0E, 0x78, 0x33, 0xC1, 0xDE, 0x06, 0xF0, 0x1F, 0x80, 0xFC, 0x03, 0xE0, 0x1C,\n/* 0xD2 */ 0x0C, 0xC0, 0x3C, 0x00, 0xE1, 0xC0, 0x3E, 0x01, 0xF8, 0x0F, 0xC0, 0x7B, 0x03, 0xDC, 0x1E, 0x60, 0xF3, 0x87, 0x8C, 0x3C, 0x31, 0xE1, 0xCF, 0x06, 0x78, 0x3B, 0xC0, 0xDE, 0x03, 0xF0, 0x1F, 0x80, 0x7C, 0x03, 0x80,\n/* 0xD3 */ 0x00, 0xE0, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xFF, 0xE0, 0xF0, 0x78, 0x60, 0x0C, 0x60, 0x03, 0x30, 0x01, 0xB0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0x80, 0x03, 0x60, 0x03, 0x30, 0x01, 0x8C, 0x01, 0x87, 0x83, 0xC1, 0xFF, 0xC0, 0x3F, 0x80,\n/* 0xD4 */ 0x03, 0xC0, 0x01, 0xE0, 0x01, 0x98, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xFF, 0xE0, 0xF0, 0x78, 0x60, 0x0C, 0x60, 0x03, 0x30, 0x01, 0xB0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0x80, 0x03, 0x60, 0x03, 0x30, 0x01, 0x8C, 0x01, 0x87, 0x83, 0xC1, 0xFF, 0xC0, 0x3F, 0x80,\n/* 0xD5 */ 0x03, 0xB8, 0x01, 0x98, 0x00, 0x98, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xFF, 0xE0, 0xF0, 0x78, 0x60, 0x0C, 0x60, 0x03, 0x30, 0x01, 0xB0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0x80, 0x03, 0x60, 0x03, 0x30, 0x01, 0x8C, 0x01, 0x87, 0x83, 0xC1, 0xFF, 0xC0, 0x3F, 0x80,\n/* 0xD6 */ 0x06, 0x30, 0x03, 0x18, 0x00, 0x00, 0x00, 0xFE, 0x01, 0xFF, 0xC1, 0xE0, 0xF0, 0xC0, 0x18, 0xC0, 0x06, 0x60, 0x03, 0x60, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x06, 0xC0, 0x06, 0x60, 0x03, 0x18, 0x03, 0x0F, 0x07, 0x83, 0xFF, 0x80, 0x7F, 0x00,\n/* 0xD7 */ 0x81, 0xC3, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0xC3, 0x81,\n/* 0xD8 */ 0x0C, 0xC0, 0x1E, 0x00, 0x78, 0x3F, 0xF8, 0xFF, 0xF3, 0x00, 0xEC, 0x01, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x03, 0x3F, 0xF8, 0xFF, 0xF3, 0x00, 0xEC, 0x01, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x06, 0xC0, 0x1C,\n/* 0xD9 */ 0x03, 0x00, 0x7C, 0x03, 0x70, 0x19, 0x80, 0xF8, 0x03, 0xC3, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3E, 0x03, 0xB8, 0x38, 0xFF, 0x83, 0xF0,\n/* 0xDA */ 0x03, 0x80, 0x18, 0x01, 0x80, 0x00, 0x0C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF8, 0x0E, 0xE0, 0xE3, 0xFE, 0x0F, 0xC0,\n/* 0xDB */ 0x0E, 0xE0, 0x66, 0x03, 0x60, 0x00, 0x0C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF8, 0x0E, 0xE0, 0xE3, 0xFE, 0x0F, 0xC0,\n/* 0xDC */ 0x0C, 0xC0, 0x66, 0x00, 0x01, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1F, 0x01, 0xDC, 0x1C, 0x7F, 0xC1, 0xF8, 0x00,\n/* 0xDD */ 0x01, 0x80, 0x0C, 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0F, 0x80, 0x76, 0x01, 0x9C, 0x0C, 0x38, 0x70, 0x61, 0x81, 0xCE, 0x03, 0x30, 0x0F, 0x80, 0x1E, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 0xDE */ 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x04, 0x00, 0x78, 0x01, 0x81, 0x18, 0x0F, 0x00,\n/* 0xDF */ 0x1F, 0x0F, 0xF3, 0x87, 0x60, 0x6C, 0x0D, 0x81, 0xB0, 0x66, 0x38, 0xC7, 0xD8, 0x1B, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x3E, 0x0E, 0xCF, 0x99, 0xE0,\n/* 0xE0 */ 0x0C, 0x61, 0x8C, 0x03, 0x3D, 0xFC, 0xE3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x00,\n/* 0xE1 */ 0x07, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x00, 0x03, 0xF0, 0x7F, 0x8E, 0x1C, 0xC0, 0xC0, 0x0C, 0x01, 0xC3, 0xFC, 0xF8, 0xCC, 0x0C, 0xC0, 0xCE, 0x3C, 0x7E, 0xF3, 0xC7,\n/* 0xE2 */ 0x0C, 0x01, 0xE0, 0x1B, 0x03, 0x30, 0x00, 0x03, 0xF0, 0x7F, 0x8E, 0x1C, 0xC0, 0xC0, 0x0C, 0x01, 0xC3, 0xFC, 0xF8, 0xCC, 0x0C, 0xC0, 0xCE, 0x3C, 0x7E, 0xF3, 0xC7,\n/* 0xE3 */ 0x20, 0x82, 0x10, 0x3F, 0x01, 0xE0, 0x00, 0x03, 0xF0, 0x7F, 0x8E, 0x1C, 0xC0, 0xC0, 0x0C, 0x01, 0xC3, 0xFC, 0xF8, 0xCC, 0x0C, 0xC0, 0xCE, 0x3C, 0x7E, 0xF3, 0xC7,\n/* 0xE4 */ 0x19, 0x81, 0x98, 0x00, 0x00, 0x00, 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 0xE5 */ 0x3B, 0x30, 0x06, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x30,\n/* 0xE6 */ 0x07, 0x01, 0x80, 0xC0, 0x20, 0x00, 0x07, 0xC3, 0xF9, 0x87, 0xE0, 0xF0, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0E, 0x0D, 0xC7, 0x3F, 0x87, 0xC0,\n/* 0xE7 */ 0x1F, 0x0F, 0xE7, 0x1D, 0x83, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x38, 0x37, 0x1C, 0xFE, 0x1F, 0x02, 0x00, 0xE0, 0x0C, 0x23, 0x07, 0x80,\n/* 0xE8 */ 0x21, 0x0C, 0xC1, 0xE0, 0x78, 0x00, 0x07, 0xC3, 0xF9, 0x87, 0xE0, 0xF0, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0E, 0x0D, 0xC7, 0x3F, 0x87, 0xC0,\n/* 0xE9 */ 0x03, 0x00, 0xC0, 0x30, 0x04, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0x78, 0x0F, 0xFF, 0xFF, 0xFC, 0x01, 0x80, 0x38, 0x1B, 0x86, 0x3F, 0x83, 0xE0,\n/* 0xEA */ 0x1F, 0x07, 0xF1, 0x87, 0x60, 0x6C, 0x07, 0xFF, 0xFF, 0xFE, 0x00, 0xC0, 0x1C, 0x1D, 0x87, 0x1F, 0xC1, 0xF8, 0x06, 0x01, 0x80, 0x30, 0x06, 0x00, 0x78,\n/* 0xEB */ 0x31, 0x86, 0x30, 0x00, 0x00, 0x01, 0xF0, 0x7F, 0x1C, 0x77, 0x03, 0xC0, 0x7F, 0xFF, 0xFF, 0xE0, 0x0C, 0x01, 0xC0, 0xDC, 0x31, 0xFC, 0x1F, 0x00,\n/* 0xEC */ 0x31, 0x82, 0x60, 0x6C, 0x07, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0x78, 0x0F, 0xFF, 0xFF, 0xFC, 0x01, 0x80, 0x38, 0x1B, 0x86, 0x3F, 0x83, 0xE0,\n/* 0xED */ 0x39, 0x99, 0x80, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x80,\n/* 0xEE */ 0x71, 0xED, 0xA3, 0x00, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 0xEF */ 0x00, 0x67, 0x00, 0x66, 0x00, 0x64, 0x00, 0x6C, 0x00, 0x60, 0x1E, 0x60, 0x3F, 0xE0, 0x71, 0xE0, 0xE0, 0xE0, 0xC0, 0x60, 0xC0, 0x60, 0xC0, 0x60, 0xC0, 0x60, 0xC0, 0x60, 0xE0, 0xE0, 0x71, 0xE0, 0x3F, 0x60, 0x1E, 0x60,\n/* 0xF0 */ 0x00, 0x60, 0x06, 0x03, 0xF0, 0x06, 0x00, 0x61, 0xE6, 0x3F, 0xE7, 0x1E, 0xE0, 0xEC, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xE0, 0xE7, 0x1E, 0x3F, 0xE1, 0xE6,\n/* 0xF1 */ 0x03, 0x81, 0xC0, 0x60, 0x30, 0x00, 0x33, 0xCD, 0xFB, 0xC7, 0xE0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x30,\n/* 0xF2 */ 0x31, 0x84, 0xC1, 0xA0, 0x38, 0x00, 0x33, 0xCD, 0xFB, 0xC7, 0xE0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x30,\n/* 0xF3 */ 0x07, 0x00, 0xC0, 0x30, 0x04, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF4 */ 0x0C, 0x03, 0xC0, 0xD8, 0x19, 0x80, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF5 */ 0x0C, 0xC3, 0xB8, 0x66, 0x0D, 0x80, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF6 */ 0x31, 0x86, 0x30, 0x00, 0x00, 0x01, 0xF0, 0x7F, 0x1C, 0x77, 0x07, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0xC1, 0xDC, 0x71, 0xFC, 0x1F, 0x00,\n/* 0xF7 */ 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00,\n/* 0xF8 */ 0xC7, 0x37, 0x8E, 0x03, 0x3D, 0xFC, 0xE3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x00,\n/* 0xF9 */ 0x0E, 0x07, 0xC1, 0xB8, 0x6C, 0x1F, 0x03, 0x8C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x07, 0xE3, 0xDF, 0xB3, 0xCC,\n/* 0xFA */ 0x03, 0x01, 0x80, 0x60, 0x30, 0x00, 0x30, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x1F, 0x8F, 0x7E, 0xCF, 0x30,\n/* 0xFB */ 0x1D, 0xC6, 0x61, 0xB0, 0xCC, 0x00, 0x30, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x1F, 0x8F, 0x7E, 0xCF, 0x30,\n/* 0xFC */ 0x31, 0x8C, 0x60, 0x00, 0x00, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x7E, 0x3D, 0xFB, 0x3C, 0xC0,\n/* 0xFD */ 0x03, 0x80, 0x60, 0x18, 0x06, 0x00, 0x01, 0xC0, 0xD8, 0x1B, 0x06, 0x70, 0xC6, 0x18, 0xC6, 0x18, 0xC1, 0x98, 0x36, 0x06, 0xC0, 0x78, 0x0E, 0x01, 0xC0, 0x30, 0x06, 0x01, 0xC0, 0xF0, 0x1C, 0x00,\n/* 0xFE */ 0x61, 0x86, 0x3E, 0xF9, 0x86, 0x18, 0x61, 0x86, 0x18, 0x61, 0x87, 0x8E, 0x10, 0x83, 0xC3, 0x78,\n/* 0xFF */ 0xF0,\n};\n\nconst GFXglyph FreeSans12pt_Win1250Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   19,  20,  21,   1,  -17 },\n/* 0x02 */ {    48,   19,  20,  21,   1,  -17 },\n/* 0x03 */ {    96,   21,  20,  23,   1,  -17 },\n/* 0x04 */ {   149,   21,  20,  23,   1,  -17 },\n/* 0x05 */ {   202,   20,  20,  22,   1,  -17 },\n/* 0x06 */ {   252,   20,  20,  22,   1,  -17 },\n/* 0x07 */ {   302,    0,   0,   8,   0,    0 },\n/* 0x08 */ {   302,   23,  20,  25,   1,  -17 },\n/* 0x09 */ {   360,   23,  16,  25,   1,  -16 },\n/* 0x0A */ {   406,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   406,   21,  20,  23,   1,  -17 },\n/* 0x0C */ {   459,   19,  18,  21,   1,  -15 },\n/* 0x0D */ {   502,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   502,   20,  20,  22,   1,  -17 },\n/* 0x0F */ {   552,   21,  21,  23,   1,  -18 },\n/* 0x10 */ {   608,   19,  20,  21,   1,  -17 },\n/* 0x11 */ {   656,   21,  20,  23,   1,  -17 },\n/* 0x12 */ {   709,   20,  20,  22,   1,  -17 },\n/* 0x13 */ {   759,   21,  20,  23,   1,  -17 },\n/* 0x14 */ {   812,   21,  20,  23,   1,  -17 },\n/* 0x15 */ {   865,   22,  20,  24,   1,  -17 },\n/* 0x16 */ {   920,   16,  20,  18,   1,  -17 },\n/* 0x17 */ {   960,   21,  20,  23,   1,  -17 },\n/* 0x18 */ {  1013,   23,  20,  25,   1,  -17 },\n/* 0x19 */ {  1071,   21,  20,  23,   1,  -17 },\n/* 0x1A */ {  1124,   15,  19,  17,   1,  -16 },\n/* 0x1B */ {  1160,   24,  21,  26,   1,  -18 },\n/* 0x1C */ {  1223,   21,  20,  23,   1,  -17 },\n/* 0x1D */ {  1276,   21,  21,  23,   1,  -18 },\n/* 0x1E */ {  1332,   20,  20,  22,   1,  -17 },\n/* 0x1F */ {  1382,   15,  20,  17,   1,  -17 },\n/* ' ' 0x20 */ {  1420,    0,   0,   6,   0,    0 },\n/* '!' 0x21 */ {  1420,    2,  18,   8,   3,  -16 },\n/* '\"' 0x22 */ {  1425,    6,   6,   8,   1,  -15 },\n/* '#' 0x23 */ {  1430,   13,  16,  13,   0,  -14 },\n/* '$' 0x24 */ {  1456,   11,  20,  13,   1,  -16 },\n/* '%' 0x25 */ {  1484,   20,  17,  21,   1,  -15 },\n/* '&' 0x26 */ {  1527,   14,  17,  16,   1,  -15 },\n/* ''' 0x27 */ {  1557,    2,   6,   5,   1,  -15 },\n/* '(' 0x28 */ {  1559,    5,  23,   8,   2,  -16 },\n/* ')' 0x29 */ {  1574,    5,  23,   8,   1,  -16 },\n/* '*' 0x2A */ {  1589,    7,   7,   9,   1,  -16 },\n/* '+' 0x2B */ {  1596,   10,  11,  14,   2,   -9 },\n/* ',' 0x2C */ {  1610,    2,   6,   7,   2,    0 },\n/* '-' 0x2D */ {  1612,    6,   2,   8,   1,   -6 },\n/* '.' 0x2E */ {  1614,    2,   2,   6,   2,    0 },\n/* '/' 0x2F */ {  1615,    7,  18,   7,   0,  -16 },\n/* '0' 0x30 */ {  1631,   11,  17,  13,   1,  -15 },\n/* '1' 0x31 */ {  1655,    5,  17,  13,   3,  -15 },\n/* '2' 0x32 */ {  1666,   11,  17,  13,   1,  -15 },\n/* '3' 0x33 */ {  1690,   11,  17,  13,   1,  -15 },\n/* '4' 0x34 */ {  1714,   11,  17,  13,   1,  -15 },\n/* '5' 0x35 */ {  1738,   11,  17,  13,   1,  -15 },\n/* '6' 0x36 */ {  1762,   11,  17,  13,   1,  -15 },\n/* '7' 0x37 */ {  1786,   11,  17,  13,   1,  -15 },\n/* '8' 0x38 */ {  1810,   11,  17,  13,   1,  -15 },\n/* '9' 0x39 */ {  1834,   11,  17,  13,   1,  -15 },\n/* ':' 0x3A */ {  1858,    2,  13,   6,   2,  -11 },\n/* ';' 0x3B */ {  1862,    2,  16,   6,   2,  -10 },\n/* '<' 0x3C */ {  1866,   12,  11,  14,   1,   -9 },\n/* '=' 0x3D */ {  1883,   12,   6,  14,   1,   -7 },\n/* '>' 0x3E */ {  1892,   12,  11,  14,   1,   -9 },\n/* '?' 0x3F */ {  1909,   10,  18,  13,   2,  -16 },\n/* '@' 0x40 */ {  1932,   22,  21,  24,   1,  -16 },\n/* 'A' 0x41 */ {  1990,   14,  18,  16,   1,  -16 },\n/* 'B' 0x42 */ {  2022,   13,  18,  16,   2,  -16 },\n/* 'C' 0x43 */ {  2052,   15,  18,  17,   1,  -16 },\n/* 'D' 0x44 */ {  2086,   14,  18,  17,   2,  -16 },\n/* 'E' 0x45 */ {  2118,   12,  18,  15,   2,  -16 },\n/* 'F' 0x46 */ {  2145,   11,  18,  14,   2,  -16 },\n/* 'G' 0x47 */ {  2170,   16,  18,  18,   1,  -16 },\n/* 'H' 0x48 */ {  2206,   13,  18,  17,   2,  -16 },\n/* 'I' 0x49 */ {  2236,    2,  18,   7,   2,  -16 },\n/* 'J' 0x4A */ {  2241,    9,  18,  13,   1,  -16 },\n/* 'K' 0x4B */ {  2262,   13,  18,  16,   2,  -16 },\n/* 'L' 0x4C */ {  2292,   10,  18,  14,   2,  -16 },\n/* 'M' 0x4D */ {  2315,   16,  18,  20,   2,  -16 },\n/* 'N' 0x4E */ {  2351,   13,  18,  18,   2,  -16 },\n/* 'O' 0x4F */ {  2381,   17,  18,  19,   1,  -16 },\n/* 'P' 0x50 */ {  2420,   12,  18,  16,   2,  -16 },\n/* 'Q' 0x51 */ {  2447,   17,  19,  19,   1,  -16 },\n/* 'R' 0x52 */ {  2488,   14,  18,  17,   2,  -16 },\n/* 'S' 0x53 */ {  2520,   14,  18,  16,   1,  -16 },\n/* 'T' 0x54 */ {  2552,   12,  18,  15,   1,  -16 },\n/* 'U' 0x55 */ {  2579,   13,  18,  17,   2,  -16 },\n/* 'V' 0x56 */ {  2609,   14,  18,  15,   1,  -16 },\n/* 'W' 0x57 */ {  2641,   22,  18,  22,   0,  -16 },\n/* 'X' 0x58 */ {  2691,   14,  18,  16,   1,  -16 },\n/* 'Y' 0x59 */ {  2723,   14,  18,  16,   1,  -16 },\n/* 'Z' 0x5A */ {  2755,   13,  18,  15,   1,  -16 },\n/* '[' 0x5B */ {  2785,    4,  23,   7,   2,  -16 },\n/* '\\' 0x5C */ {  2797,    7,  18,   7,   0,  -16 },\n/* ']' 0x5D */ {  2813,    4,  23,   7,   1,  -16 },\n/* '^' 0x5E */ {  2825,    9,   9,  11,   1,  -15 },\n/* '_' 0x5F */ {  2836,   15,   1,  13,  -1,    5 },\n/* '`' 0x60 */ {  2838,    5,   4,   6,   1,  -16 },\n/* 'a' 0x61 */ {  2841,   12,  13,  13,   1,  -11 },\n/* 'b' 0x62 */ {  2861,   12,  18,  13,   1,  -16 },\n/* 'c' 0x63 */ {  2888,   10,  13,  12,   1,  -11 },\n/* 'd' 0x64 */ {  2905,   11,  18,  13,   1,  -16 },\n/* 'e' 0x65 */ {  2930,   11,  13,  13,   1,  -11 },\n/* 'f' 0x66 */ {  2948,    5,  18,   7,   1,  -16 },\n/* 'g' 0x67 */ {  2960,   11,  18,  13,   1,  -11 },\n/* 'h' 0x68 */ {  2985,   10,  18,  13,   1,  -16 },\n/* 'i' 0x69 */ {  3008,    2,  18,   5,   2,  -16 },\n/* 'j' 0x6A */ {  3013,    4,  23,   6,   0,  -16 },\n/* 'k' 0x6B */ {  3025,   10,  18,  12,   1,  -16 },\n/* 'l' 0x6C */ {  3048,    2,  18,   5,   1,  -16 },\n/* 'm' 0x6D */ {  3053,   17,  13,  19,   1,  -11 },\n/* 'n' 0x6E */ {  3081,   10,  13,  13,   1,  -11 },\n/* 'o' 0x6F */ {  3098,   11,  13,  13,   1,  -11 },\n/* 'p' 0x70 */ {  3116,   12,  17,  13,   1,  -11 },\n/* 'q' 0x71 */ {  3142,   11,  17,  13,   1,  -11 },\n/* 'r' 0x72 */ {  3166,    6,  13,   8,   1,  -11 },\n/* 's' 0x73 */ {  3176,   10,  13,  12,   1,  -11 },\n/* 't' 0x74 */ {  3193,    5,  16,   7,   1,  -14 },\n/* 'u' 0x75 */ {  3203,   10,  13,  13,   1,  -11 },\n/* 'v' 0x76 */ {  3220,   11,  13,  12,   0,  -11 },\n/* 'w' 0x77 */ {  3238,   17,  13,  17,   0,  -11 },\n/* 'x' 0x78 */ {  3266,   10,  13,  11,   1,  -11 },\n/* 'y' 0x79 */ {  3283,   11,  18,  11,   0,  -11 },\n/* 'z' 0x7A */ {  3308,   10,  13,  12,   1,  -11 },\n/* '{' 0x7B */ {  3325,    5,  23,   8,   1,  -16 },\n/* '|' 0x7C */ {  3340,    2,  23,   6,   2,  -16 },\n/* '}' 0x7D */ {  3346,    5,  23,   8,   2,  -16 },\n/* '~' 0x7E */ {  3361,   10,   5,  12,   1,   -9 },\n/* 0x7F */ {  3368,    0,   0,   0,   0,    0 },\n/* 0x80 */ {  3368,   14,  17,  16,   1,  -17 },\n/* 0x81 */ {  3398,    0,   0,   8,   0,    0 },\n/* 0x82 */ {  3398,    2,   5,   6,   2,   -2 },\n/* 0x83 */ {  3400,    0,   0,   8,   0,    0 },\n/* 0x84 */ {  3400,    6,   5,  10,   2,   -2 },\n/* 0x85 */ {  3404,   12,   2,  16,   2,   -2 },\n/* 0x86 */ {  3407,   10,  21,  13,   2,  -17 },\n/* 0x87 */ {  3434,   10,  20,  13,   2,  -17 },\n/* 0x88 */ {  3459,    0,   0,   8,   0,    0 },\n/* 0x89 */ {  3459,   23,  18,  24,   0,  -18 },\n/* 0x8A */ {  3511,   14,  21,  16,   1,  -21 },\n/* 0x8B */ {  3548,    3,   8,   6,   1,  -11 },\n/* 0x8C */ {  3551,   14,  22,  16,   1,  -22 },\n/* 0x8D */ {  3590,   12,  21,  15,   1,  -21 },\n/* 0x8E */ {  3622,   13,  21,  15,   1,  -21 },\n/* 0x8F */ {  3657,   13,  22,  15,   1,  -22 },\n/* 0x90 */ {  3693,    0,   0,   8,   0,    0 },\n/* 0x91 */ {  3693,    2,   6,   6,   2,  -18 },\n/* 0x92 */ {  3695,    2,   6,   6,   2,  -18 },\n/* 0x93 */ {  3697,    6,   6,  10,   2,  -18 },\n/* 0x94 */ {  3702,    6,   6,  10,   2,  -18 },\n/* 0x95 */ {  3707,    6,   6,  10,   2,  -11 },\n/* 0x96 */ {  3712,   10,   2,  12,   1,   -8 },\n/* 0x97 */ {  3715,   22,   2,  24,   1,   -8 },\n/* 0x98 */ {  3721,    0,   0,   8,   0,    0 },\n/* 0x99 */ {  3721,   22,  13,  24,   2,  -18 },\n/* 0x9A */ {  3757,   10,  18,  12,   1,  -18 },\n/* 0x9B */ {  3780,    3,   8,   6,   2,  -10 },\n/* 0x9C */ {  3783,   10,  18,  12,   1,  -18 },\n/* 0x9D */ {  3806,    8,  18,  11,   1,  -18 },\n/* 0x9E */ {  3824,   10,  18,  12,   1,  -18 },\n/* 0x9F */ {  3847,   10,  18,  12,   1,  -18 },\n/* 0xA0 */ {  3870,    0,   0,   7,   0,    0 },\n/* 0xA1 */ {  3870,    7,   4,   8,   0,  -18 },\n/* 0xA2 */ {  3874,    7,   4,   8,   0,  -18 },\n/* 0xA3 */ {  3878,   13,  18,  15,   1,  -18 },\n/* 0xA4 */ {  3908,    9,   9,  13,   2,  -13 },\n/* 0xA5 */ {  3919,   16,  23,  16,   1,  -18 },\n/* 0xA6 */ {  3965,    2,  23,   6,   2,  -18 },\n/* 0xA7 */ {  3971,   11,  23,  13,   1,  -18 },\n/* 0xA8 */ {  4003,    6,   2,   8,   1,  -17 },\n/* 0xA9 */ {  4005,   18,  17,  19,   1,  -17 },\n/* 0xAA */ {  4044,   14,  23,  16,   1,  -18 },\n/* 0xAB */ {  4085,    8,   8,  12,   2,  -11 },\n/* 0xAC */ {  4093,   12,   6,  14,   1,   -9 },\n/* 0xAD */ {  4102,    6,   2,   8,   1,   -8 },\n/* 0xAE */ {  4104,   18,  17,  19,   1,  -17 },\n/* 0xAF */ {  4143,   13,  21,  15,   1,  -21 },\n/* 0xB0 */ {  4178,    7,   8,  15,   4,  -17 },\n/* 0xB1 */ {  4185,   12,  15,  14,   1,  -15 },\n/* 0xB2 */ {  4208,    5,   5,   8,   1,    0 },\n/* 0xB3 */ {  4212,    4,  18,   6,   1,  -18 },\n/* 0xB4 */ {  4221,    5,   4,   8,   2,  -18 },\n/* 0xB5 */ {  4224,   12,  17,  13,   2,  -13 },\n/* 0xB6 */ {  4250,   11,  21,  13,   2,  -18 },\n/* 0xB7 */ {  4279,    2,   2,   6,   2,   -8 },\n/* 0xB8 */ {  4280,    6,   5,   8,   1,    0 },\n/* 0xB9 */ {  4284,   13,  18,  13,   1,  -13 },\n/* 0xBA */ {  4314,   10,  18,  12,   1,  -13 },\n/* 0xBB */ {  4337,    8,   8,  12,   2,  -10 },\n/* 0xBC */ {  4345,   10,  18,  14,   2,  -18 },\n/* 0xBD */ {  4368,    8,   4,   8,   0,  -18 },\n/* 0xBE */ {  4372,    7,  18,   9,   1,  -18 },\n/* 0xBF */ {  4388,   10,  17,  12,   1,  -17 },\n/* 0xC0 */ {  4410,   14,  22,  17,   2,  -22 },\n/* 0xC1 */ {  4449,   14,  22,  16,   1,  -22 },\n/* 0xC2 */ {  4488,   14,  22,  16,   1,  -22 },\n/* 0xC3 */ {  4527,   14,  22,  16,   1,  -22 },\n/* 0xC4 */ {  4566,   14,  21,  16,   1,  -21 },\n/* 0xC5 */ {  4603,   10,  22,  14,   2,  -22 },\n/* 0xC6 */ {  4631,   15,  22,  17,   1,  -22 },\n/* 0xC7 */ {  4673,   15,  23,  17,   1,  -18 },\n/* 0xC8 */ {  4717,   15,  21,  17,   1,  -21 },\n/* 0xC9 */ {  4757,   12,  22,  15,   2,  -22 },\n/* 0xCA */ {  4790,   13,  23,  15,   2,  -18 },\n/* 0xCB */ {  4828,   12,  21,  15,   2,  -21 },\n/* 0xCC */ {  4860,   12,  21,  15,   2,  -21 },\n/* 0xCD */ {  4892,    4,  22,   7,   1,  -22 },\n/* 0xCE */ {  4903,    6,  22,   7,   0,  -22 },\n/* 0xCF */ {  4920,   14,  21,  17,   2,  -21 },\n/* 0xD0 */ {  4957,   15,  18,  17,   1,  -18 },\n/* 0xD1 */ {  4991,   13,  22,  18,   2,  -22 },\n/* 0xD2 */ {  5027,   13,  21,  18,   2,  -21 },\n/* 0xD3 */ {  5062,   17,  22,  19,   1,  -22 },\n/* 0xD4 */ {  5109,   17,  22,  19,   1,  -22 },\n/* 0xD5 */ {  5156,   17,  22,  19,   1,  -22 },\n/* 0xD6 */ {  5203,   17,  21,  19,   1,  -21 },\n/* 0xD7 */ {  5248,    8,   9,  14,   3,  -10 },\n/* 0xD8 */ {  5257,   14,  21,  17,   2,  -21 },\n/* 0xD9 */ {  5294,   13,  24,  17,   2,  -24 },\n/* 0xDA */ {  5333,   13,  22,  17,   2,  -22 },\n/* 0xDB */ {  5369,   13,  22,  17,   2,  -22 },\n/* 0xDC */ {  5405,   13,  21,  17,   2,  -21 },\n/* 0xDD */ {  5440,   14,  22,  16,   1,  -22 },\n/* 0xDE */ {  5479,   12,  23,  15,   1,  -18 },\n/* 0xDF */ {  5514,   11,  18,  14,   2,  -18 },\n/* 0xE0 */ {  5539,    6,  18,   8,   1,  -18 },\n/* 0xE1 */ {  5553,   12,  18,  13,   1,  -18 },\n/* 0xE2 */ {  5580,   12,  18,  13,   1,  -18 },\n/* 0xE3 */ {  5607,   12,  18,  13,   1,  -18 },\n/* 0xE4 */ {  5634,   12,  17,  13,   1,  -17 },\n/* 0xE5 */ {  5660,    5,  22,   6,   0,  -22 },\n/* 0xE6 */ {  5674,   10,  18,  12,   1,  -18 },\n/* 0xE7 */ {  5697,   10,  18,  12,   1,  -13 },\n/* 0xE8 */ {  5720,   10,  18,  12,   1,  -18 },\n/* 0xE9 */ {  5743,   11,  18,  13,   1,  -18 },\n/* 0xEA */ {  5768,   11,  18,  13,   1,  -13 },\n/* 0xEB */ {  5793,   11,  17,  13,   1,  -17 },\n/* 0xEC */ {  5817,   11,  18,  13,   1,  -18 },\n/* 0xED */ {  5842,    5,  18,   5,   0,  -18 },\n/* 0xEE */ {  5854,    6,  18,   6,   0,  -18 },\n/* 0xEF */ {  5868,   16,  18,  18,   1,  -18 },\n/* 0xF0 */ {  5904,   12,  18,  14,   1,  -18 },\n/* 0xF1 */ {  5931,   10,  18,  13,   1,  -18 },\n/* 0xF2 */ {  5954,   10,  18,  13,   1,  -18 },\n/* 0xF3 */ {  5977,   11,  18,  13,   1,  -18 },\n/* 0xF4 */ {  6002,   11,  18,  13,   1,  -18 },\n/* 0xF5 */ {  6027,   11,  18,  13,   1,  -18 },\n/* 0xF6 */ {  6052,   11,  17,  13,   1,  -17 },\n/* 0xF7 */ {  6076,   12,  11,  14,   1,  -11 },\n/* 0xF8 */ {  6093,    6,  18,   8,   1,  -18 },\n/* 0xF9 */ {  6107,   10,  19,  13,   1,  -19 },\n/* 0xFA */ {  6131,   10,  18,  13,   1,  -18 },\n/* 0xFB */ {  6154,   10,  18,  13,   1,  -18 },\n/* 0xFC */ {  6177,   10,  17,  13,   1,  -17 },\n/* 0xFD */ {  6199,   11,  23,  11,   0,  -18 },\n/* 0xFE */ {  6231,    6,  21,   7,   1,  -16 },\n/* 0xFF */ {  6247,    2,   2,   8,   3,  -17 },\n};\n\nconst GFXfont FreeSans12pt_Win1250 PROGMEM = {\n(uint8_t*)FreeSans12pt_Win1250Bitmaps,\n(GFXglyph*)FreeSans12pt_Win1250Glyphs,\n0x01, 0xFF, 19\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans12pt_Win1251.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans12pt_Win1251\n*/\nconst uint8_t FreeSans12pt_Win1251Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x00, 0x30, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x24, 0x00, 0x04, 0x80, 0x01, 0x90, 0x00, 0x62, 0x00, 0x30, 0xFE, 0x04, 0x10, 0x5F, 0x02, 0x0B, 0x00, 0x7F, 0xE0, 0x0C, 0x1C, 0x02, 0x83, 0x81, 0x9F, 0xF0, 0x02, 0x1E, 0x00, 0x41, 0xC0, 0x0E, 0x7F, 0x81, 0x78, 0x18, 0x62, 0x00, 0xFF, 0xC0,\n/* 0x02 */ 0x00, 0xFF, 0x80, 0x61, 0x13, 0xF0, 0x62, 0x60, 0x07, 0xFC, 0x00, 0x83, 0x80, 0x10, 0xF0, 0x33, 0xF6, 0x01, 0x41, 0xC0, 0x18, 0x38, 0x03, 0xFF, 0xE0, 0x47, 0x02, 0x08, 0x20, 0x61, 0xC4, 0x06, 0x17, 0x00, 0x22, 0x00, 0x02, 0x40, 0x00, 0x48, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x3C, 0x00,\n/* 0x03 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x04, 0x08, 0x48, 0x70, 0xE1, 0xC3, 0x87, 0x0E, 0x08, 0x10, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA1, 0x81, 0x8D, 0x87, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x04 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x10, 0x02, 0x48, 0xE0, 0x61, 0xC1, 0xCC, 0x0E, 0x78, 0x1C, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xFC, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x05 */ 0x00, 0x18, 0x00, 0x00, 0x40, 0x01, 0x90, 0x01, 0xF4, 0x08, 0x12, 0x23, 0xC1, 0x91, 0x2C, 0x1C, 0x8A, 0xC3, 0x64, 0x64, 0x13, 0x22, 0x41, 0x98, 0x26, 0x2C, 0xC4, 0x22, 0x60, 0x42, 0x13, 0x04, 0x30, 0x80, 0x61, 0xA4, 0x02, 0x18, 0x20, 0x03, 0x41, 0x00, 0x20, 0x08, 0x02, 0x00, 0x60, 0x40, 0x03, 0xF8,\n/* 0x06 */ 0x00, 0x10, 0x00, 0x03, 0x00, 0x1C, 0x48, 0x00, 0xB4, 0x80, 0x09, 0xF9, 0xC0, 0xE0, 0xE4, 0x0C, 0x02, 0x8F, 0x80, 0x38, 0x88, 0x01, 0x0D, 0x00, 0x18, 0x30, 0x01, 0x60, 0x80, 0x13, 0x18, 0x03, 0xF2, 0xC0, 0x20, 0x26, 0x06, 0x07, 0xFF, 0xA0, 0x02, 0x39, 0x00, 0x14, 0x70, 0x01, 0xC3, 0x00, 0x18, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x10, 0x37, 0xE2, 0x61, 0x00, 0x0C, 0xC6, 0x10, 0x98, 0x0C, 0x63, 0x00, 0x00, 0xC6, 0x00,\n/* 0x09 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x00, 0x37, 0xE0,\n/* 0x0A */\n/* 0x0B */ 0x1F, 0x07, 0xC1, 0x86, 0x41, 0x10, 0x0C, 0x04, 0x80, 0x40, 0x18, 0x00, 0x00, 0xC0, 0x00, 0x06, 0x00, 0x00, 0x30, 0x00, 0x01, 0x40, 0x00, 0x0A, 0x00, 0x00, 0x88, 0x00, 0x04, 0x40, 0x00, 0x41, 0x00, 0x02, 0x04, 0x00, 0x20, 0x20, 0x02, 0x00, 0x80, 0x20, 0x02, 0x02, 0x00, 0x08, 0x20, 0x00, 0x22, 0x00, 0x00, 0xE0, 0x00,\n/* 0x0C */ 0x01, 0x00, 0x00, 0x38, 0x00, 0x04, 0xC0, 0x01, 0x08, 0x00, 0x18, 0x80, 0x1C, 0x10, 0x02, 0x07, 0x80, 0x81, 0x10, 0x1F, 0xC2, 0x02, 0x00, 0x60, 0x80, 0x1A, 0x20, 0x1C, 0x42, 0x1C, 0x08, 0xFE, 0x03, 0xA0, 0x01, 0x8C, 0x01, 0xC1, 0x43, 0xD0, 0x27, 0x81, 0xF8,\n/* 0x0D */\n/* 0x0E */ 0x00, 0xE0, 0x00, 0x11, 0x00, 0x01, 0x10, 0x00, 0x0B, 0x00, 0x03, 0xF8, 0x00, 0x60, 0x60, 0x09, 0x02, 0x00, 0xA0, 0x10, 0x16, 0x01, 0x01, 0x40, 0x10, 0x10, 0x01, 0x01, 0x00, 0x08, 0x10, 0x00, 0x82, 0x1F, 0x08, 0x3F, 0x90, 0x44, 0x00, 0x06, 0xBF, 0xFF, 0xAF, 0xF0, 0xFF, 0xFF, 0x0F, 0xE3, 0xFB, 0xFC,\n/* 0x0F */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x40, 0x12, 0x34, 0x00, 0x69, 0x40, 0x01, 0x49, 0xE0, 0xF1, 0xCD, 0x06, 0x8E, 0x28, 0x14, 0x71, 0x40, 0xA3, 0x8B, 0xFD, 0x14, 0x50, 0x68, 0xA2, 0x81, 0x4D, 0x97, 0xFA, 0x44, 0xBF, 0xD6, 0x31, 0x02, 0xE0, 0xC8, 0x16, 0x08, 0x61, 0x08, 0x21, 0xF0, 0x80, 0xF8, 0x78, 0x00,\n/* 0x10 */ 0x00, 0xF0, 0x00, 0x3A, 0x00, 0x07, 0xC0, 0x00, 0xA8, 0x00, 0x1F, 0x00, 0x02, 0xB0, 0x00, 0x52, 0x00, 0x0A, 0x40, 0x02, 0x48, 0x00, 0x49, 0x00, 0x09, 0x30, 0x01, 0x22, 0x01, 0xC4, 0x70, 0xF0, 0x85, 0xE1, 0x10, 0x88, 0x37, 0x20, 0x03, 0x9C, 0x00, 0x37, 0x00, 0x06, 0x40, 0x01, 0x86, 0x00,\n/* 0x11 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x60, 0x02, 0x36, 0x00, 0x09, 0x04, 0x0C, 0x48, 0x60, 0xC1, 0xC3, 0x0F, 0x0E, 0x00, 0x08, 0x70, 0x00, 0x23, 0x80, 0x63, 0x84, 0x01, 0x9F, 0x20, 0x0C, 0xFD, 0x80, 0x27, 0xE4, 0x03, 0x3F, 0x30, 0x33, 0xE0, 0xC0, 0x00, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x12 */ 0x00, 0xC2, 0x00, 0x1C, 0x24, 0x02, 0x18, 0x60, 0x64, 0x02, 0x02, 0x40, 0x20, 0x00, 0xF2, 0x03, 0x89, 0xE0, 0x7C, 0x80, 0x0E, 0x25, 0x80, 0xE1, 0x00, 0x1A, 0x08, 0x71, 0xB0, 0xC4, 0x39, 0x84, 0xC2, 0xCC, 0x40, 0x76, 0x7C, 0x05, 0xBB, 0x80, 0x4C, 0xE0, 0x0A, 0x78, 0x00, 0x9C, 0x00, 0x0F, 0x00, 0x00,\n/* 0x13 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x60, 0xC1, 0xC6, 0xC9, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xF8, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x14 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x20, 0x22, 0x33, 0x01, 0x89, 0x20, 0x02, 0x48, 0x60, 0xE1, 0xC8, 0x80, 0x8E, 0x46, 0x46, 0x72, 0x32, 0x33, 0x9F, 0x9F, 0x94, 0x78, 0x78, 0xA0, 0x00, 0x0D, 0x80, 0x00, 0x44, 0x0E, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x15 */ 0x03, 0xFC, 0x20, 0x38, 0x1C, 0x81, 0x80, 0x1D, 0x08, 0x00, 0x32, 0x60, 0x00, 0x89, 0x00, 0x02, 0x18, 0x00, 0x08, 0x61, 0xC3, 0x22, 0x8D, 0x93, 0x72, 0x00, 0x00, 0x48, 0x00, 0x01, 0x20, 0x00, 0x04, 0x9F, 0xFF, 0x92, 0x60, 0x0E, 0x44, 0xFF, 0xF2, 0x11, 0xC3, 0x88, 0x21, 0xF8, 0x40, 0x40, 0x02, 0x00, 0xC0, 0x30, 0x00, 0xFF, 0x00,\n/* 0x16 */ 0x03, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x01, 0xE0, 0x03, 0xF0, 0x03, 0xF0, 0x27, 0xF0, 0x6F, 0x70, 0x6E, 0x60, 0xFC, 0x60, 0xFC, 0x7E, 0xFC, 0x7E, 0xFC, 0x3F, 0xF4, 0x1F, 0xF4, 0x1F, 0xF0, 0x0E, 0x70, 0x0E, 0x30, 0x1C, 0x38, 0x38, 0x0F, 0xF0,\n/* 0x17 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x00, 0x21, 0xC0, 0x02, 0x8E, 0x20, 0xF4, 0x70, 0x84, 0x11, 0x82, 0x40, 0x84, 0x01, 0x03, 0x20, 0x0F, 0x85, 0x80, 0x03, 0x04, 0x00, 0x04, 0x30, 0x78, 0x10, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x18 */ 0x00, 0xFC, 0x00, 0x02, 0x06, 0x00, 0x08, 0x24, 0x00, 0x21, 0xA4, 0x00, 0x4C, 0x48, 0x00, 0xA0, 0x50, 0x01, 0x92, 0x60, 0x03, 0x24, 0xC0, 0x06, 0x01, 0x81, 0x28, 0x03, 0x49, 0x6C, 0xC4, 0xAD, 0xD8, 0x16, 0xA4, 0xCC, 0xC4, 0x44, 0x86, 0x13, 0x05, 0x00, 0x28, 0x0A, 0x00, 0x50, 0x14, 0x00, 0x90, 0x48, 0x01, 0x20, 0x90, 0x02, 0x41, 0x20, 0x00, 0x00,\n/* 0x19 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x49, 0xC3, 0x81, 0xC0, 0x00, 0x0E, 0x78, 0xF0, 0x77, 0xEF, 0xC3, 0xA7, 0x4E, 0x15, 0x0A, 0x10, 0xA7, 0x8F, 0x0D, 0x80, 0x00, 0x44, 0x00, 0x06, 0x33, 0xF0, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1A */ 0xFF, 0xFF, 0x00, 0x06, 0x00, 0x0C, 0x3E, 0x18, 0x82, 0x32, 0x02, 0x64, 0x04, 0xC8, 0x09, 0x80, 0x23, 0x00, 0x86, 0x02, 0x0C, 0x08, 0x18, 0x10, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x81, 0x80, 0x03, 0x00, 0x07, 0xFF, 0xF8,\n/* 0x1B */ 0x00, 0xFE, 0x00, 0x03, 0x81, 0x80, 0x04, 0x00, 0x60, 0x08, 0x00, 0x30, 0x10, 0x00, 0x10, 0x30, 0x07, 0x88, 0x23, 0xC8, 0x08, 0x22, 0x00, 0x04, 0x60, 0x00, 0x44, 0x60, 0x00, 0x84, 0x63, 0x03, 0x04, 0x61, 0xFC, 0x04, 0x6B, 0x00, 0x9E, 0xA5, 0x01, 0x6A, 0xD5, 0x01, 0x43, 0xA8, 0x81, 0x05, 0xD0, 0x82, 0x0A, 0xA0, 0x82, 0x05, 0xC0, 0x82, 0x02, 0x61, 0xFF, 0x0C, 0x1E, 0x00, 0xF0,\n/* 0x1C */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x30, 0x02, 0x32, 0x00, 0x09, 0x00, 0x00, 0x48, 0x20, 0x61, 0xC3, 0x84, 0x0E, 0x1C, 0x78, 0x70, 0x40, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA0, 0x03, 0x0D, 0x83, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1D */ 0x01, 0xFE, 0x00, 0x3A, 0x1C, 0x03, 0x00, 0x30, 0x23, 0x1E, 0xC3, 0x38, 0x03, 0x10, 0xC3, 0x09, 0x00, 0x18, 0x68, 0x00, 0xC1, 0x40, 0x00, 0x0A, 0x07, 0x80, 0x50, 0x46, 0x02, 0x80, 0x00, 0x1A, 0x1E, 0x00, 0xCB, 0x10, 0x0D, 0x03, 0x00, 0x48, 0x60, 0x06, 0x40, 0x00, 0x22, 0x0C, 0x02, 0x10, 0x60, 0x60, 0x43, 0xFC, 0x01, 0xE0, 0x00, 0x00,\n/* 0x1E */ 0x01, 0xF0, 0x00, 0xEA, 0xC0, 0x31, 0x5F, 0x04, 0x5F, 0x88, 0x80, 0xA0, 0x48, 0x0E, 0x02, 0x8F, 0x40, 0x3C, 0x10, 0x21, 0x66, 0x87, 0x15, 0x98, 0x71, 0x41, 0x02, 0x14, 0x00, 0x01, 0x40, 0x00, 0x14, 0x00, 0x01, 0x21, 0xFE, 0x12, 0x00, 0x02, 0x10, 0x00, 0x60, 0x80, 0x0C, 0x06, 0x01, 0x80, 0x3F, 0xE0,\n/* 0x1F */ 0x0E, 0x00, 0x13, 0x00, 0x23, 0x00, 0xF3, 0x01, 0x31, 0x01, 0x11, 0x03, 0xD3, 0x06, 0xF2, 0x30, 0x34, 0xC7, 0x25, 0x33, 0x2B, 0xC2, 0x57, 0x04, 0x3A, 0x08, 0x72, 0x30, 0xA3, 0xC3, 0x40, 0x04, 0x40, 0x18, 0x40, 0x60, 0x7F, 0x80,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xFF, 0xF0, 0xF0,\n/* '\"' 0x22 */ 0xCF, 0x3C, 0xF3, 0x8A, 0x20,\n/* '#' 0x23 */ 0x06, 0x30, 0x31, 0x03, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC0, 0xC6, 0x06, 0x30,\n/* '$' 0x24 */ 0x04, 0x03, 0xE1, 0xFF, 0x72, 0x7C, 0x47, 0x88, 0xF1, 0x07, 0xA0, 0x7E, 0x03, 0xF0, 0x17, 0x02, 0x7C, 0x47, 0x88, 0xF1, 0x1B, 0x26, 0x7F, 0xC3, 0xE0, 0x10, 0x02, 0x00,\n/* '%' 0x25 */ 0x00, 0x06, 0x03, 0xC0, 0x40, 0x7E, 0x0C, 0x0E, 0x70, 0x80, 0xC3, 0x18, 0x0C, 0x31, 0x00, 0xE7, 0x30, 0x07, 0xE6, 0x00, 0x3C, 0x40, 0x00, 0x0C, 0x7C, 0x00, 0x8F, 0xE0, 0x19, 0xC7, 0x01, 0x18, 0x30, 0x31, 0x83, 0x02, 0x1C, 0x70, 0x40, 0xFE, 0x04, 0x07, 0xC0,\n/* '&' 0x26 */ 0x0F, 0x00, 0x7E, 0x03, 0x9C, 0x0C, 0x30, 0x30, 0xC0, 0xE7, 0x01, 0xF8, 0x03, 0x80, 0x3E, 0x01, 0xCC, 0x6E, 0x39, 0xB0, 0x7C, 0xC0, 0xF3, 0x03, 0xCE, 0x1F, 0x9F, 0xE6, 0x3E, 0x1C,\n/* ''' 0x27 */ 0xFF, 0xA0,\n/* '(' 0x28 */ 0x08, 0x8C, 0x46, 0x31, 0x98, 0xC6, 0x31, 0x8C, 0x63, 0x08, 0x63, 0x08, 0x61, 0x0C, 0x20,\n/* ')' 0x29 */ 0x82, 0x18, 0xC3, 0x18, 0xC3, 0x18, 0xC6, 0x31, 0x8C, 0x62, 0x31, 0x88, 0xC4, 0x62, 0x00,\n/* '*' 0x2A */ 0x10, 0x23, 0x5B, 0xE3, 0x8D, 0x91, 0x00,\n/* '+' 0x2B */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0xFF, 0xFF, 0xF0, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0,\n/* ',' 0x2C */ 0xF5, 0x60,\n/* '-' 0x2D */ 0xFF, 0xF0,\n/* '.' 0x2E */ 0xF0,\n/* '/' 0x2F */ 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x00,\n/* '0' 0x30 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x6C, 0x0F, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3E, 0x0E, 0xC1, 0x9C, 0x71, 0xFC, 0x1F, 0x00,\n/* '1' 0x31 */ 0x08, 0xCF, 0xFF, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18,\n/* '2' 0x32 */ 0x1F, 0x0F, 0xF9, 0x87, 0x60, 0x7C, 0x06, 0x00, 0xC0, 0x18, 0x07, 0x01, 0xC0, 0xF0, 0x78, 0x1C, 0x06, 0x00, 0xC0, 0x30, 0x07, 0xFF, 0xFF, 0xE0,\n/* '3' 0x33 */ 0x3F, 0x0F, 0xF3, 0x87, 0x60, 0x6C, 0x0C, 0x01, 0x80, 0x60, 0x78, 0x0F, 0x80, 0x18, 0x01, 0x80, 0x3C, 0x07, 0x80, 0xD8, 0x73, 0xFC, 0x3F, 0x00,\n/* '4' 0x34 */ 0x01, 0x80, 0x70, 0x0E, 0x03, 0xC0, 0xD8, 0x1B, 0x06, 0x61, 0x8C, 0x21, 0x8C, 0x33, 0x06, 0x7F, 0xFF, 0xFE, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80,\n/* '5' 0x35 */ 0x3F, 0xCF, 0xF9, 0x80, 0x30, 0x06, 0x00, 0xDE, 0x1F, 0xE7, 0x0E, 0x00, 0xE0, 0x0C, 0x01, 0x80, 0x30, 0x07, 0x81, 0xB8, 0x73, 0xFC, 0x1F, 0x00,\n/* '6' 0x36 */ 0x0F, 0x07, 0xF9, 0xC3, 0x30, 0x74, 0x01, 0x80, 0x33, 0xC7, 0xFE, 0xF1, 0xDC, 0x1F, 0x01, 0xE0, 0x3C, 0x06, 0xC1, 0xDC, 0x71, 0xFC, 0x1F, 0x00,\n/* '7' 0x37 */ 0xFF, 0xFF, 0xFC, 0x01, 0x00, 0x60, 0x18, 0x02, 0x00, 0xC0, 0x30, 0x06, 0x01, 0x80, 0x30, 0x04, 0x01, 0x80, 0x30, 0x06, 0x01, 0x80, 0x30, 0x00,\n/* '8' 0x38 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x66, 0x0C, 0xC1, 0x8C, 0x61, 0xF8, 0x3F, 0x8E, 0x3B, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xD8, 0x31, 0xFC, 0x1F, 0x00,\n/* '9' 0x39 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x6C, 0x07, 0x80, 0xF0, 0x1E, 0x07, 0x61, 0xEF, 0xFC, 0x79, 0x80, 0x30, 0x05, 0xC1, 0x98, 0x73, 0xFC, 0x1E, 0x00,\n/* ':' 0x3A */ 0xF0, 0x00, 0x03, 0xC0,\n/* ';' 0x3B */ 0xF0, 0x00, 0x0F, 0x56,\n/* '<' 0x3C */ 0x00, 0x70, 0x1E, 0x0F, 0x83, 0xC0, 0xF0, 0x0E, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x10,\n/* '=' 0x3D */ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,\n/* '>' 0x3E */ 0xE0, 0x07, 0x80, 0x1F, 0x00, 0x7C, 0x00, 0xF0, 0x07, 0x01, 0xE0, 0xF0, 0x3C, 0x0F, 0x00, 0x80, 0x00,\n/* '?' 0x3F */ 0x3F, 0x1F, 0xEE, 0x1F, 0x03, 0xC0, 0xC0, 0x30, 0x0C, 0x06, 0x03, 0x81, 0xC0, 0xE0, 0x30, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x00,\n/* '@' 0x40 */ 0x00, 0xFE, 0x00, 0x0F, 0xFE, 0x00, 0xF0, 0x3E, 0x07, 0x00, 0x3C, 0x38, 0x00, 0x38, 0xC1, 0xE0, 0x66, 0x0F, 0xD9, 0xD8, 0x61, 0xC3, 0xC3, 0x07, 0x0F, 0x1C, 0x1C, 0x3C, 0x60, 0x60, 0xF1, 0x81, 0x83, 0xC6, 0x06, 0x1B, 0x18, 0x38, 0xEE, 0x71, 0xE7, 0x18, 0xFD, 0xF8, 0x71, 0xE7, 0xC0, 0xE0, 0x00, 0x01, 0xE0, 0x00, 0x01, 0xFF, 0xC0, 0x01, 0xFC, 0x00,\n/* 'A' 0x41 */ 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 'B' 0x42 */ 0xFF, 0xC7, 0xFF, 0x30, 0x1D, 0x80, 0x6C, 0x03, 0x60, 0x1B, 0x00, 0xD8, 0x0C, 0xFF, 0xC7, 0xFF, 0x30, 0x0D, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x06, 0xFF, 0xF7, 0xFE, 0x00,\n/* 'C' 0x43 */ 0x07, 0xE0, 0x3F, 0xF0, 0xE0, 0x73, 0x80, 0x76, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x00, 0xDC, 0x03, 0x1E, 0x0E, 0x1F, 0xF8, 0x0F, 0xC0,\n/* 'D' 0x44 */ 0xFF, 0xC3, 0xFF, 0x8C, 0x07, 0x30, 0x0E, 0xC0, 0x1B, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x3C, 0x00, 0xF0, 0x03, 0xC0, 0x1F, 0x00, 0x6C, 0x03, 0xB0, 0x1C, 0xFF, 0xE3, 0xFE, 0x00,\n/* 'E' 0x45 */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 'F' 0x46 */ 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xFF, 0xDF, 0xFB, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x00,\n/* 'G' 0x47 */ 0x07, 0xF0, 0x1F, 0xFC, 0x3C, 0x1E, 0x70, 0x07, 0x60, 0x03, 0xE0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x7F, 0xC0, 0x7F, 0xC0, 0x03, 0xC0, 0x03, 0x60, 0x03, 0x60, 0x07, 0x30, 0x0F, 0x3C, 0x1F, 0x1F, 0xFB, 0x07, 0xE1,\n/* 'H' 0x48 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xC0,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'J' 0x4A */ 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x3C, 0x1E, 0x0F, 0x07, 0xC7, 0x7F, 0x1F, 0x00,\n/* 'K' 0x4B */ 0xC0, 0x3E, 0x03, 0xB0, 0x39, 0x83, 0x8C, 0x38, 0x63, 0x83, 0x38, 0x19, 0xC0, 0xDE, 0x07, 0xB8, 0x38, 0xE1, 0x83, 0x0C, 0x1C, 0x60, 0x73, 0x01, 0x98, 0x0E, 0xC0, 0x3E, 0x00, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xFF, 0xFF, 0xF0,\n/* 'M' 0x4D */ 0xE0, 0x07, 0xE0, 0x07, 0xF0, 0x0F, 0xF0, 0x0F, 0xD0, 0x0F, 0xD8, 0x1B, 0xD8, 0x1B, 0xD8, 0x1B, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xC6, 0x63, 0xC6, 0x63, 0xC6, 0x63, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC1, 0x83,\n/* 'N' 0x4E */ 0xE0, 0x1F, 0x00, 0xFC, 0x07, 0xE0, 0x3D, 0x81, 0xEE, 0x0F, 0x30, 0x79, 0xC3, 0xC6, 0x1E, 0x18, 0xF0, 0xE7, 0x83, 0x3C, 0x1D, 0xE0, 0x6F, 0x01, 0xF8, 0x0F, 0xC0, 0x3E, 0x01, 0xC0,\n/* 'O' 0x4F */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x00, 0x18, 0xC0, 0x18, 0x78, 0x3C, 0x1F, 0xFC, 0x03, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x8F, 0xFE, 0xC0, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x06, 0xFF, 0xEF, 0xFC, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00,\n/* 'Q' 0x51 */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x01, 0x98, 0xC0, 0xFC, 0x78, 0x3C, 0x1F, 0xFF, 0x03, 0xF9, 0x80, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x0C, 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x70,\n/* 'S' 0x53 */ 0x0F, 0xE0, 0x7F, 0xC3, 0x83, 0x98, 0x07, 0x60, 0x0D, 0x80, 0x07, 0x00, 0x1E, 0x00, 0x3F, 0x80, 0x3F, 0xC0, 0x0F, 0x80, 0x07, 0xC0, 0x0F, 0x00, 0x3E, 0x00, 0xDE, 0x0E, 0x3F, 0xF0, 0x3F, 0x80,\n/* 'T' 0x54 */ 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 'U' 0x55 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x80, 0xEE, 0x0E, 0x3F, 0xE0, 0xFC, 0x00,\n/* 'V' 0x56 */ 0xC0, 0x0F, 0x00, 0x7E, 0x01, 0x98, 0x06, 0x60, 0x39, 0xC0, 0xC3, 0x03, 0x0C, 0x1C, 0x38, 0x60, 0x61, 0x81, 0x8E, 0x07, 0x30, 0x0C, 0xC0, 0x37, 0x00, 0xF8, 0x01, 0xE0, 0x07, 0x80, 0x1C, 0x00,\n/* 'W' 0x57 */ 0xE0, 0x30, 0x1D, 0x80, 0xE0, 0x76, 0x07, 0x81, 0xDC, 0x1E, 0x06, 0x70, 0x7C, 0x18, 0xC1, 0xB0, 0xE3, 0x0C, 0xC3, 0x8C, 0x33, 0x0C, 0x38, 0xC6, 0x30, 0x67, 0x18, 0xC1, 0x98, 0x67, 0x06, 0x61, 0xD8, 0x1D, 0x83, 0x60, 0x3C, 0x0D, 0x80, 0xF0, 0x3E, 0x03, 0xC0, 0x70, 0x0F, 0x01, 0xC0, 0x18, 0x07, 0x00,\n/* 'X' 0x58 */ 0xE0, 0x1D, 0x80, 0xE7, 0x03, 0x0E, 0x1C, 0x18, 0x60, 0x73, 0x00, 0xFC, 0x01, 0xE0, 0x07, 0x00, 0x1E, 0x00, 0xF8, 0x03, 0x30, 0x1C, 0xE0, 0xE1, 0x83, 0x07, 0x1C, 0x0E, 0xE0, 0x1B, 0x00, 0x70,\n/* 'Y' 0x59 */ 0xC0, 0x0F, 0x80, 0x76, 0x01, 0x9C, 0x0C, 0x38, 0x70, 0x61, 0x81, 0xCE, 0x03, 0x30, 0x0F, 0x80, 0x1E, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x03, 0x80, 0x18, 0x01, 0xC0, 0x1C, 0x00, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFF, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCF, 0xF0,\n/* '\\' 0x5C */ 0x81, 0x81, 0x02, 0x06, 0x04, 0x08, 0x18, 0x10, 0x20, 0x60, 0x40, 0x81, 0x81, 0x02, 0x06, 0x04,\n/* ']' 0x5D */ 0xFF, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xF0,\n/* '^' 0x5E */ 0x0C, 0x0E, 0x05, 0x86, 0xC3, 0x21, 0x19, 0x8C, 0x83, 0xC1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xFE,\n/* '`' 0x60 */ 0xE3, 0x8C, 0x30,\n/* 'a' 0x61 */ 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 'b' 0x62 */ 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0xF8, 0xDF, 0xCF, 0x0E, 0xE0, 0x7C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xE0, 0x6F, 0x0E, 0xDF, 0xCC, 0xF8,\n/* 'c' 0x63 */ 0x1F, 0x0F, 0xE6, 0x1F, 0x83, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x38, 0x37, 0x1C, 0xFE, 0x1F, 0x00,\n/* 'd' 0x64 */ 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x3C, 0xCF, 0xFB, 0x8F, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8F, 0x3F, 0x63, 0xCC,\n/* 'e' 0x65 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x3C, 0x07, 0xFF, 0xFF, 0xFE, 0x00, 0xC0, 0x1C, 0x0D, 0xC3, 0x1F, 0xC1, 0xF0,\n/* 'f' 0x66 */ 0x3B, 0xD8, 0xC6, 0x7F, 0xEC, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x00,\n/* 'g' 0x67 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xB1, 0xE6, 0x00, 0xC0, 0x3E, 0x0E, 0x7F, 0xC7, 0xE0,\n/* 'h' 0x68 */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x33, 0xCD, 0xFB, 0xC7, 0xE0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x30,\n/* 'i' 0x69 */ 0xF0, 0x3F, 0xFF, 0xFF, 0xF0,\n/* 'j' 0x6A */ 0x33, 0x00, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0xB8, 0xC6, 0x31, 0xCC, 0x3B, 0x06, 0xC1, 0xF0, 0x30,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'm' 0x6D */ 0xCF, 0x1F, 0x6F, 0xDF, 0xFC, 0x78, 0xFC, 0x18, 0x3C, 0x0C, 0x1E, 0x06, 0x0F, 0x03, 0x07, 0x81, 0x83, 0xC0, 0xC1, 0xE0, 0x60, 0xF0, 0x30, 0x78, 0x18, 0x3C, 0x0C, 0x18,\n/* 'n' 0x6E */ 0xCF, 0x37, 0xEF, 0x1F, 0x83, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0,\n/* 'o' 0x6F */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x1F, 0xC1, 0xF0,\n/* 'p' 0x70 */ 0xCF, 0x8D, 0xFC, 0xF0, 0xEE, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3E, 0x06, 0xF0, 0xEF, 0xFC, 0xCF, 0x8C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 'q' 0x71 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xF1, 0xE6, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60,\n/* 'r' 0x72 */ 0xCF, 0x7F, 0x38, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 's' 0x73 */ 0x3E, 0x1F, 0xEE, 0x1B, 0x00, 0xC0, 0x3C, 0x07, 0xF0, 0x3F, 0x01, 0xF0, 0x3E, 0x1D, 0xFE, 0x3F, 0x00,\n/* 't' 0x74 */ 0x63, 0x19, 0xFF, 0xB1, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0xE7,\n/* 'u' 0x75 */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x7E, 0x3D, 0xFB, 0x3C, 0xC0,\n/* 'v' 0x76 */ 0xE0, 0x6C, 0x0D, 0x81, 0xB8, 0x63, 0x0C, 0x61, 0x8E, 0x60, 0xCC, 0x19, 0x83, 0xE0, 0x3C, 0x07, 0x00, 0xE0,\n/* 'w' 0x77 */ 0xC1, 0xC1, 0xB0, 0xE1, 0xD8, 0x70, 0xCC, 0x2C, 0x66, 0x36, 0x31, 0x9B, 0x18, 0xCD, 0x98, 0x64, 0x6C, 0x16, 0x36, 0x0F, 0x1A, 0x07, 0x8F, 0x03, 0x83, 0x80, 0xC1, 0xC0,\n/* 'x' 0x78 */ 0xC1, 0xF8, 0x66, 0x30, 0xCC, 0x3E, 0x07, 0x00, 0xC0, 0x78, 0x36, 0x0C, 0xC6, 0x3B, 0x06, 0xC0, 0xC0,\n/* 'y' 0x79 */ 0xE0, 0x6C, 0x0D, 0x83, 0x38, 0x63, 0x0C, 0x63, 0x0C, 0x60, 0xCC, 0x1B, 0x03, 0x60, 0x3C, 0x07, 0x00, 0xE0, 0x18, 0x03, 0x00, 0xE0, 0x78, 0x0E, 0x00,\n/* 'z' 0x7A */ 0xFF, 0xFF, 0xF0, 0x18, 0x0C, 0x07, 0x03, 0x81, 0xC0, 0x60, 0x30, 0x18, 0x0E, 0x03, 0xFF, 0xFF, 0xC0,\n/* '{' 0x7B */ 0x19, 0xCC, 0x63, 0x18, 0xC6, 0x31, 0x99, 0x86, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x1C, 0x60,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,\n/* '}' 0x7D */ 0xC7, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x0C, 0x33, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x73, 0x00,\n/* '~' 0x7E */ 0x70, 0x3E, 0x09, 0xE4, 0x1F, 0x03, 0x80,\n/* 0x7F */\n/* 0x80 */ 0xFF, 0xE0, 0xFF, 0xE0, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x07, 0xFC, 0x07, 0xFE, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x1E, 0x00, 0x1C,\n/* 0x81 */ 0x07, 0x01, 0xC0, 0x20, 0x00, 0x0F, 0xFF, 0xFF, 0xF0, 0x06, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x00,\n/* 0x82 */ 0xF5, 0x80,\n/* 0x83 */ 0x0C, 0x38, 0x61, 0x80, 0x1F, 0xFF, 0xE0, 0xC1, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x80,\n/* 0x84 */ 0xCF, 0x34, 0x51, 0x88,\n/* 0x85 */ 0xC6, 0x3C, 0x63,\n/* 0x86 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x00,\n/* 0x87 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x0F, 0xFF, 0xFF, 0x0C, 0x03, 0x00, 0xC0, 0x30,\n/* 0x88 */ 0x01, 0xF0, 0x1F, 0xF0, 0xE0, 0xC7, 0x00, 0x18, 0x00, 0xC0, 0x07, 0xFF, 0x3F, 0xFC, 0x30, 0x01, 0xFF, 0x8F, 0xFC, 0x0C, 0x00, 0x18, 0x00, 0x70, 0x00, 0xE0, 0x81, 0xFE, 0x03, 0xF0,\n/* 0x89 */ 0x38, 0x18, 0x00, 0xF8, 0x30, 0x03, 0x18, 0xC0, 0x04, 0x11, 0x80, 0x0C, 0x66, 0x00, 0x0F, 0x8C, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x40, 0x00, 0x01, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x31, 0xC0, 0xE0, 0x67, 0xC3, 0xC1, 0x98, 0xCC, 0xC3, 0x20, 0x90, 0x8C, 0x63, 0x33, 0x10, 0x7C, 0x3C, 0x60, 0x70, 0x38,\n/* 0x8A */ 0x1F, 0xF8, 0x00, 0x3F, 0xF0, 0x00, 0x60, 0x60, 0x00, 0xC0, 0xC0, 0x01, 0x81, 0x80, 0x03, 0x03, 0x00, 0x06, 0x06, 0x00, 0x0C, 0x0C, 0x00, 0x18, 0x1F, 0xF0, 0x30, 0x3F, 0xF0, 0x60, 0x60, 0x30, 0xC0, 0xC0, 0x31, 0x81, 0x80, 0x66, 0x03, 0x00, 0xCC, 0x06, 0x01, 0xB8, 0x0C, 0x06, 0xE0, 0x1F, 0xFD, 0x80, 0x3F, 0xE0,\n/* 0x8B */ 0x2F, 0x49, 0x99,\n/* 0x8C */ 0xC0, 0x60, 0x06, 0x03, 0x00, 0x30, 0x18, 0x01, 0x80, 0xC0, 0x0C, 0x06, 0x00, 0x60, 0x30, 0x03, 0x01, 0x80, 0x18, 0x0C, 0x00, 0xFF, 0xFF, 0xC7, 0xFF, 0xFF, 0x30, 0x18, 0x1D, 0x80, 0xC0, 0x3C, 0x06, 0x01, 0xE0, 0x30, 0x0F, 0x01, 0x80, 0x78, 0x0C, 0x06, 0xC0, 0x7F, 0xF6, 0x03, 0xFE, 0x00,\n/* 0x8D */ 0x03, 0x00, 0x60, 0x0C, 0x00, 0x00, 0xC0, 0x7C, 0x0E, 0xC1, 0xCC, 0x38, 0xC7, 0x0C, 0xE0, 0xDC, 0x0F, 0x80, 0xF0, 0x0F, 0x80, 0xDC, 0x0C, 0xE0, 0xC7, 0x0C, 0x30, 0xC3, 0x8C, 0x1C, 0xC0, 0xEC, 0x07,\n/* 0x8E */ 0xFF, 0xE0, 0xFF, 0xE0, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x07, 0xFC, 0x07, 0xFE, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03, 0x06, 0x03,\n/* 0x8F */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xFF, 0xFF, 0xFF, 0xC0, 0xC0, 0x06, 0x00, 0x30, 0x00,\n/* 0x90 */ 0x30, 0x0F, 0xF0, 0xFF, 0x03, 0x00, 0x30, 0x03, 0x3C, 0x37, 0xE3, 0xC7, 0x38, 0x33, 0x03, 0x30, 0x33, 0x03, 0x30, 0x33, 0x03, 0x30, 0x33, 0x03, 0x30, 0x33, 0x03, 0x00, 0x60, 0x06, 0x01, 0x80, 0x30,\n/* 0x91 */ 0x6A, 0xF0,\n/* 0x92 */ 0xF5, 0x60,\n/* 0x93 */ 0x4E, 0x28, 0xA2, 0xCF, 0x30,\n/* 0x94 */ 0xCF, 0x34, 0x51, 0x4E, 0x20,\n/* 0x95 */ 0x7B, 0xFF, 0xFF, 0xFD, 0xE0,\n/* 0x96 */ 0xFF, 0xFF, 0xF0,\n/* 0x97 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 0x98 */\n/* 0x99 */ 0xFF, 0x70, 0x1F, 0xFD, 0xC0, 0x71, 0x87, 0x83, 0xC6, 0x1E, 0x0F, 0x18, 0x68, 0x3C, 0x61, 0xB1, 0xB1, 0x86, 0xC6, 0xC6, 0x19, 0x1B, 0x18, 0x66, 0xCC, 0x61, 0x9B, 0x31, 0x86, 0x3C, 0xC6, 0x18, 0xE3, 0x18, 0x63, 0x8C,\n/* 0x9A */ 0x7F, 0x80, 0x3F, 0xC0, 0x18, 0x60, 0x0C, 0x30, 0x06, 0x18, 0x03, 0x0F, 0xF1, 0x87, 0xFC, 0xC3, 0x07, 0x61, 0x81, 0xB0, 0xC0, 0xD0, 0x60, 0xF8, 0x3F, 0xEC, 0x1F, 0xE0,\n/* 0x9B */ 0x99, 0x92, 0xF4,\n/* 0x9C */ 0xC0, 0xC0, 0x30, 0x30, 0x0C, 0x0C, 0x03, 0x03, 0x00, 0xC0, 0xC0, 0x3F, 0xFF, 0xCF, 0xFF, 0xFB, 0x03, 0x07, 0xC0, 0xC0, 0xF0, 0x30, 0x3C, 0x0C, 0x1F, 0x03, 0xFE, 0xC0, 0xFF, 0x00,\n/* 0x9D */ 0x07, 0x07, 0x03, 0x03, 0x00, 0x06, 0x0F, 0x0D, 0x8C, 0xCC, 0x6C, 0x3C, 0x1E, 0x0F, 0x86, 0xE3, 0x39, 0x8E, 0xC3, 0xE0, 0xC0,\n/* 0x9E */ 0x30, 0x1F, 0xE3, 0xFC, 0x18, 0x03, 0x00, 0x67, 0x0D, 0xF9, 0xC7, 0x38, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x60, 0xCC, 0x19, 0x83, 0x30, 0x66, 0x0C,\n/* 0x9F */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0xFF, 0xFF, 0xC1, 0x80, 0x60,\n/* 0xA0 */\n/* 0xA1 */ 0x10, 0x40, 0xC4, 0x07, 0xE0, 0x1E, 0x0C, 0x01, 0xF0, 0x1D, 0x80, 0xCE, 0x0E, 0x30, 0x61, 0xC7, 0x06, 0x30, 0x3B, 0x81, 0xD8, 0x07, 0xC0, 0x3C, 0x00, 0xE0, 0x06, 0x00, 0x70, 0x03, 0x80, 0x38, 0x01, 0xC0, 0x1C, 0x00,\n/* 0xA2 */ 0x21, 0x86, 0x20, 0xFC, 0x07, 0x0E, 0x06, 0xC0, 0xD8, 0x33, 0x86, 0x30, 0xC6, 0x30, 0xC6, 0x0C, 0xC1, 0xB0, 0x36, 0x03, 0xC0, 0x70, 0x0E, 0x01, 0x80, 0x30, 0x0E, 0x07, 0x80, 0xE0, 0x00,\n/* 0xA3 */ 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x3C, 0x1E, 0x0F, 0x07, 0xC7, 0x7F, 0x1F, 0x00,\n/* 0xA4 */ 0xDD, 0xFF, 0xD8, 0xD8, 0x3C, 0x1E, 0x0F, 0x8D, 0xFF, 0xDD, 0x80,\n/* 0xA5 */ 0x00, 0x60, 0x0F, 0xFF, 0xFF, 0xFC, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60, 0x00,\n/* 0xA6 */ 0xFF, 0xFF, 0xF0, 0x3F, 0xFF, 0xFC,\n/* 0xA7 */ 0x0F, 0x03, 0xF0, 0xE7, 0x18, 0x63, 0x0C, 0x70, 0x07, 0x03, 0xF8, 0xC3, 0x98, 0x3B, 0x03, 0xF0, 0x37, 0x06, 0x78, 0xC7, 0xB0, 0x7C, 0x03, 0x80, 0x39, 0x83, 0x30, 0x67, 0x1C, 0x7F, 0x07, 0xC0,\n/* 0xA8 */ 0x19, 0x81, 0x98, 0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFE, 0xFF, 0xEC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xA9 */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xE3, 0x1C, 0x73, 0xF3, 0x99, 0x86, 0x6C, 0xC1, 0x8F, 0x30, 0x03, 0xCC, 0x00, 0xF3, 0x00, 0x3C, 0xC1, 0x8D, 0x98, 0x66, 0x77, 0xF3, 0x8E, 0x79, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAA */ 0x07, 0xE0, 0x3F, 0xF0, 0xF0, 0x71, 0x80, 0x76, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xFF, 0xE1, 0xFF, 0xC3, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x00, 0xDC, 0x03, 0x1C, 0x0E, 0x1F, 0xF8, 0x0F, 0xC0,\n/* 0xAB */ 0x21, 0x63, 0xE7, 0x84, 0x84, 0xE7, 0x63, 0x21,\n/* 0xAC */ 0xFF, 0xFF, 0xFF, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03,\n/* 0xAD */ 0xFF, 0xF0,\n/* 0xAE */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xFF, 0x1C, 0x7F, 0xF3, 0x9B, 0x04, 0x6C, 0xC1, 0x8F, 0x30, 0x43, 0xCF, 0xF0, 0xF3, 0xFC, 0x3C, 0xC1, 0x0D, 0xB0, 0x66, 0x7C, 0x1B, 0x8F, 0x07, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAF */ 0xC7, 0x8C, 0x01, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x00,\n/* 0xB0 */ 0x38, 0xFB, 0x1C, 0x18, 0x38, 0xDF, 0x1C,\n/* 0xB1 */ 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x7F, 0xE7, 0xFE, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xB2 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 0xB3 */ 0xF0, 0x3F, 0xFF, 0xFF, 0xF0,\n/* 0xB4 */ 0x03, 0x03, 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 0xB5 */ 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x1C, 0xE3, 0xCF, 0xEF, 0xFC, 0x7C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 0xB6 */ 0x1F, 0xE7, 0xFD, 0xF3, 0x7E, 0x6F, 0xCD, 0xF9, 0xBF, 0x37, 0xE6, 0x7C, 0xCF, 0x98, 0xF3, 0x06, 0x60, 0xCC, 0x19, 0x83, 0x30, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x60, 0xCC,\n/* 0xB7 */ 0xF0,\n/* 0xB8 */ 0x19, 0x83, 0x30, 0x00, 0x00, 0x01, 0xF0, 0x7F, 0x1C, 0x77, 0x03, 0xC0, 0x7F, 0xFF, 0xFF, 0xE0, 0x0C, 0x01, 0xC0, 0xDC, 0x31, 0xFC, 0x1F, 0x00,\n/* 0xB9 */ 0xC0, 0xC0, 0x18, 0x18, 0x03, 0x83, 0x00, 0x70, 0x60, 0x0B, 0x0C, 0x01, 0x61, 0x8F, 0xA6, 0x33, 0x1C, 0xC6, 0x41, 0x88, 0xC8, 0x31, 0x99, 0x06, 0x13, 0x20, 0xC3, 0x66, 0x38, 0x6C, 0xEF, 0x07, 0x8F, 0xA0, 0xF0, 0x04, 0x0E, 0x00, 0x81, 0xC7, 0xF0, 0x18, 0xFC,\n/* 0xBA */ 0x1F, 0x87, 0xF9, 0xC3, 0x30, 0x3E, 0x01, 0xFE, 0x3F, 0xC6, 0x00, 0xE0, 0x0C, 0x0D, 0xC3, 0x9F, 0xE1, 0xF8,\n/* 0xBB */ 0x88, 0xC6, 0xE7, 0x21, 0x21, 0xE7, 0xC6, 0x88,\n/* 0xBC */ 0x33, 0x00, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xE0,\n/* 0xBD */ 0x0F, 0xE0, 0x7F, 0xC3, 0x83, 0x98, 0x07, 0x60, 0x0D, 0x80, 0x07, 0x00, 0x1E, 0x00, 0x3F, 0x80, 0x3F, 0xC0, 0x0F, 0x80, 0x07, 0xC0, 0x0F, 0x00, 0x3E, 0x00, 0xDE, 0x0E, 0x3F, 0xF0, 0x3F, 0x80,\n/* 0xBE */ 0x3E, 0x1F, 0xEE, 0x1B, 0x00, 0xC0, 0x3C, 0x07, 0xF0, 0x3F, 0x00, 0xF0, 0x3E, 0x1D, 0xFE, 0x3E, 0x00,\n/* 0xBF */ 0xCF, 0x30, 0x00, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30,\n/* 0xC0 */ 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC1 */ 0xFF, 0xE7, 0xFF, 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x1F, 0xF8, 0xFF, 0xF6, 0x01, 0xB0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x06, 0xFF, 0xF7, 0xFE, 0x00,\n/* 0xC2 */ 0xFF, 0xC7, 0xFF, 0x30, 0x1D, 0x80, 0x6C, 0x03, 0x60, 0x1B, 0x00, 0xD8, 0x0C, 0xFF, 0xC7, 0xFF, 0x30, 0x0D, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x06, 0xFF, 0xF7, 0xFE, 0x00,\n/* 0xC3 */ 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x00,\n/* 0xC4 */ 0x07, 0xFE, 0x01, 0xFF, 0x80, 0x60, 0x60, 0x18, 0x18, 0x06, 0x06, 0x01, 0x81, 0x80, 0x60, 0x60, 0x18, 0x18, 0x06, 0x06, 0x01, 0x81, 0x80, 0x60, 0x60, 0x18, 0x18, 0x0E, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x70, 0x18, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x0F, 0x00, 0x03, 0xC0, 0x00, 0xC0,\n/* 0xC5 */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 0xC6 */ 0x70, 0x60, 0xE3, 0x06, 0x0C, 0x38, 0x61, 0xC1, 0xC6, 0x38, 0x0E, 0x67, 0x00, 0x66, 0x60, 0x03, 0x6C, 0x00, 0x3F, 0xC0, 0x01, 0xF8, 0x00, 0x1F, 0x80, 0x03, 0xFC, 0x00, 0x76, 0xE0, 0x0E, 0x67, 0x01, 0xC6, 0x38, 0x38, 0x61, 0xC3, 0x06, 0x0C, 0x60, 0x60, 0xEE, 0x06, 0x07,\n/* 0xC7 */ 0x0F, 0x81, 0xFF, 0x0C, 0x18, 0xC0, 0x66, 0x03, 0x00, 0x18, 0x01, 0xC0, 0x1C, 0x07, 0xC0, 0x3F, 0x00, 0x1C, 0x00, 0x7C, 0x01, 0xE0, 0x0F, 0x80, 0x6E, 0x0E, 0x3F, 0xE0, 0x7E, 0x00,\n/* 0xC8 */ 0xC0, 0x3E, 0x01, 0xF0, 0x1F, 0x80, 0xFC, 0x0D, 0xE0, 0xEF, 0x06, 0x78, 0x73, 0xC3, 0x1E, 0x30, 0xF1, 0x87, 0x98, 0x3D, 0xC1, 0xEC, 0x0F, 0xC0, 0x7E, 0x03, 0xE0, 0x1F, 0x00, 0xC0,\n/* 0xC9 */ 0x10, 0x40, 0xC4, 0x07, 0xE0, 0x1E, 0x0C, 0x03, 0xE0, 0x1F, 0x01, 0xF8, 0x0F, 0xC0, 0xDE, 0x0E, 0xF0, 0x67, 0x87, 0x3C, 0x31, 0xE3, 0x0F, 0x18, 0x79, 0x83, 0xDC, 0x1E, 0xC0, 0xFC, 0x07, 0xE0, 0x3E, 0x01, 0xF0, 0x0C,\n/* 0xCA */ 0xC0, 0x7C, 0x0E, 0xC1, 0xCC, 0x38, 0xC7, 0x0C, 0xE0, 0xDC, 0x0F, 0x80, 0xF0, 0x0F, 0x80, 0xDC, 0x0C, 0xE0, 0xC7, 0x0C, 0x30, 0xC3, 0x8C, 0x1C, 0xC0, 0xEC, 0x07,\n/* 0xCB */ 0x1F, 0xFC, 0x7F, 0xF1, 0x80, 0xC6, 0x03, 0x18, 0x0C, 0x60, 0x31, 0x80, 0xC6, 0x03, 0x18, 0x0C, 0x60, 0x31, 0x80, 0xC6, 0x03, 0x18, 0x0C, 0xC0, 0x33, 0x00, 0xDC, 0x03, 0xE0, 0x0F, 0x00, 0x30,\n/* 0xCC */ 0xE0, 0x07, 0xE0, 0x07, 0xF0, 0x0F, 0xF0, 0x0F, 0xD0, 0x0F, 0xD8, 0x1B, 0xD8, 0x1B, 0xD8, 0x1B, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xC6, 0x63, 0xC6, 0x63, 0xC6, 0x63, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC1, 0x83,\n/* 0xCD */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xC0,\n/* 0xCE */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x00, 0x18, 0xC0, 0x18, 0x78, 0x3C, 0x1F, 0xFC, 0x03, 0xF8, 0x00,\n/* 0xCF */ 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xC0,\n/* 0xD0 */ 0xFF, 0x8F, 0xFE, 0xC0, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x06, 0xFF, 0xEF, 0xFC, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00,\n/* 0xD1 */ 0x07, 0xE0, 0x3F, 0xF0, 0xE0, 0x73, 0x80, 0x76, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x00, 0xDC, 0x03, 0x1E, 0x0E, 0x1F, 0xF8, 0x0F, 0xC0,\n/* 0xD2 */ 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 0xD3 */ 0xC0, 0x1F, 0x01, 0xD8, 0x0C, 0xE0, 0xE3, 0x06, 0x1C, 0x70, 0x63, 0x03, 0xB8, 0x1D, 0x80, 0x7C, 0x03, 0xC0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x38, 0x03, 0x80, 0x1C, 0x01, 0xC0, 0x00,\n/* 0xD4 */ 0x00, 0xC0, 0x00, 0x30, 0x00, 0xFF, 0xC0, 0xFF, 0xFC, 0x78, 0xC7, 0x98, 0x30, 0x6E, 0x0C, 0x1F, 0x03, 0x03, 0xC0, 0xC0, 0xF0, 0x30, 0x3C, 0x0C, 0x0F, 0x83, 0x07, 0x60, 0xC1, 0x9E, 0x31, 0xE3, 0xFF, 0xF0, 0x3F, 0xF0, 0x00, 0xC0, 0x00, 0x30, 0x00,\n/* 0xD5 */ 0xE0, 0x1D, 0x80, 0xE7, 0x03, 0x0E, 0x1C, 0x18, 0x60, 0x73, 0x00, 0xFC, 0x01, 0xE0, 0x07, 0x00, 0x1E, 0x00, 0xF8, 0x03, 0x30, 0x1C, 0xE0, 0xE1, 0x83, 0x07, 0x1C, 0x0E, 0xE0, 0x1B, 0x00, 0x70,\n/* 0xD6 */ 0xC0, 0x19, 0x80, 0x33, 0x00, 0x66, 0x00, 0xCC, 0x01, 0x98, 0x03, 0x30, 0x06, 0x60, 0x0C, 0xC0, 0x19, 0x80, 0x33, 0x00, 0x66, 0x00, 0xCC, 0x01, 0x98, 0x03, 0x30, 0x06, 0x60, 0x0C, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, 0x18, 0x00, 0x30, 0x00, 0x60,\n/* 0xD7 */ 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x37, 0xFF, 0x3F, 0xF0, 0x03, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03,\n/* 0xD8 */ 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xFF, 0xFF, 0xFF, 0xFF,\n/* 0xD9 */ 0xC1, 0x83, 0x30, 0x60, 0xCC, 0x18, 0x33, 0x06, 0x0C, 0xC1, 0x83, 0x30, 0x60, 0xCC, 0x18, 0x33, 0x06, 0x0C, 0xC1, 0x83, 0x30, 0x60, 0xCC, 0x18, 0x33, 0x06, 0x0C, 0xC1, 0x83, 0x30, 0x60, 0xCC, 0x18, 0x33, 0x06, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x0C, 0x00, 0x03, 0x00, 0x00, 0xC0,\n/* 0xDA */ 0xFE, 0x00, 0x3F, 0x80, 0x00, 0x60, 0x00, 0x18, 0x00, 0x06, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x1F, 0xF8, 0x07, 0xFF, 0x01, 0x80, 0xE0, 0x60, 0x1C, 0x18, 0x03, 0x06, 0x00, 0xC1, 0x80, 0x30, 0x60, 0x1C, 0x18, 0x0E, 0x07, 0xFF, 0x01, 0xFF, 0x80,\n/* 0xDB */ 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0xFF, 0x83, 0xFF, 0xE1, 0xE0, 0x38, 0xF0, 0x0E, 0x78, 0x03, 0x3C, 0x01, 0x9E, 0x00, 0xCF, 0x00, 0xE7, 0x80, 0xE3, 0xFF, 0xE1, 0xFF, 0xE0, 0xC0,\n/* 0xDC */ 0xC0, 0x06, 0x00, 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x1F, 0xF8, 0xFF, 0xE6, 0x03, 0xB0, 0x0F, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0xF8, 0x0E, 0xFF, 0xE7, 0xFE, 0x00,\n/* 0xDD */ 0x0F, 0xC0, 0x7F, 0xE1, 0xC1, 0xE7, 0x01, 0xCC, 0x01, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x07, 0x1F, 0xFE, 0x3F, 0xFC, 0x00, 0x38, 0x00, 0x7C, 0x00, 0xD8, 0x03, 0x98, 0x0E, 0x38, 0x3C, 0x3F, 0xF0, 0x1F, 0x80,\n/* 0xDE */ 0xC0, 0x3F, 0x06, 0x07, 0xFE, 0x30, 0x70, 0x39, 0x87, 0x00, 0xEC, 0x30, 0x03, 0x61, 0x80, 0x1B, 0x18, 0x00, 0x78, 0xC0, 0x03, 0xFE, 0x00, 0x1F, 0xF0, 0x00, 0xF1, 0x80, 0x07, 0x8C, 0x00, 0x3C, 0x70, 0x03, 0xE1, 0x80, 0x1B, 0x0E, 0x01, 0xD8, 0x38, 0x1C, 0xC0, 0xFF, 0xC6, 0x01, 0xF8, 0x00,\n/* 0xDF */ 0x0F, 0xFC, 0xFF, 0xF3, 0x00, 0xD8, 0x03, 0x60, 0x0D, 0x80, 0x36, 0x00, 0xCC, 0x03, 0x3F, 0xFC, 0x3F, 0xF0, 0x38, 0xC1, 0xC3, 0x0E, 0x0C, 0x70, 0x31, 0x80, 0xCE, 0x03, 0x70, 0x0F, 0x80, 0x30,\n/* 0xE0 */ 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 0xE1 */ 0x00, 0xC0, 0x38, 0x3F, 0x1F, 0x87, 0x00, 0xC0, 0x17, 0xC7, 0xFC, 0xF1, 0xDC, 0x1F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1F, 0x07, 0x71, 0xC7, 0xF0, 0x7C, 0x00,\n/* 0xE2 */ 0xFE, 0x3F, 0xEC, 0x3B, 0x06, 0xC1, 0xB0, 0xEF, 0xF3, 0x0E, 0xC0, 0xF0, 0x3C, 0x1F, 0xFE, 0xFF, 0x00,\n/* 0xE3 */ 0xFF, 0xFF, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x06, 0x0C, 0x00,\n/* 0xE4 */ 0x0F, 0xF0, 0x3F, 0xC0, 0xC3, 0x03, 0x0C, 0x0C, 0x30, 0x30, 0xC0, 0xC3, 0x03, 0x0C, 0x1C, 0x30, 0x60, 0xC1, 0x83, 0x3F, 0xFF, 0xFF, 0xFF, 0x00, 0x3C, 0x00, 0xC0,\n/* 0xE5 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x3C, 0x07, 0xFF, 0xFF, 0xFE, 0x00, 0xC0, 0x1C, 0x0D, 0xC3, 0x1F, 0xC1, 0xF0,\n/* 0xE6 */ 0xE1, 0x87, 0x71, 0x8E, 0x39, 0x9C, 0x1D, 0xB8, 0x0F, 0xF0, 0x07, 0xE0, 0x07, 0xE0, 0x0F, 0xF0, 0x1D, 0xB8, 0x39, 0x9C, 0x71, 0x8E, 0xE1, 0x87, 0xC1, 0x83,\n/* 0xE7 */ 0x3E, 0x7F, 0xB0, 0xE0, 0x30, 0x18, 0x78, 0x3C, 0x07, 0x01, 0xE0, 0xF8, 0xEF, 0xE3, 0xE0,\n/* 0xE8 */ 0xC0, 0xF8, 0x3F, 0x07, 0xE1, 0xFC, 0x37, 0x8C, 0xF3, 0x9E, 0x63, 0xD8, 0x7F, 0x0F, 0xC1, 0xF8, 0x3E, 0x06,\n/* 0xE9 */ 0x21, 0x86, 0x20, 0xFC, 0x0F, 0x0C, 0x0F, 0x83, 0xF0, 0x7E, 0x1F, 0xC3, 0x78, 0xCF, 0x39, 0xE6, 0x3D, 0x87, 0xF0, 0xFC, 0x1F, 0x83, 0xE0, 0x60,\n/* 0xEA */ 0xC1, 0xE1, 0xB1, 0x99, 0x8D, 0x87, 0x83, 0xC1, 0xF0, 0xDC, 0x67, 0x31, 0xD8, 0x7C, 0x18,\n/* 0xEB */ 0x3F, 0xCF, 0xF3, 0x0C, 0xC3, 0x30, 0xCC, 0x33, 0x0C, 0xC3, 0x30, 0xDC, 0x36, 0x0F, 0x83, 0xC0, 0xC0,\n/* 0xEC */ 0xE0, 0x7E, 0x07, 0xF0, 0xFF, 0x0F, 0xF0, 0xFD, 0x9B, 0xD9, 0xBD, 0xFB, 0xCF, 0x3C, 0xF3, 0xC6, 0x3C, 0x63, 0xC0, 0x30,\n/* 0xED */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0,\n/* 0xEE */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x1F, 0xC1, 0xF0,\n/* 0xEF */ 0xFF, 0xFF, 0xFC, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0,\n/* 0xF0 */ 0xCF, 0x8D, 0xFC, 0xF0, 0xEE, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3E, 0x06, 0xF0, 0xEF, 0xFC, 0xCF, 0x8C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 0xF1 */ 0x1F, 0x0F, 0xE6, 0x1F, 0x83, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x38, 0x37, 0x1C, 0xFE, 0x1F, 0x00,\n/* 0xF2 */ 0xFF, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0xF3 */ 0xE0, 0x6C, 0x0D, 0x83, 0x38, 0x63, 0x0C, 0x63, 0x0C, 0x60, 0xCC, 0x1B, 0x03, 0x60, 0x3C, 0x07, 0x00, 0xE0, 0x18, 0x03, 0x00, 0xE0, 0x78, 0x0E, 0x00,\n/* 0xF4 */ 0x00, 0xC0, 0x00, 0x18, 0x00, 0x03, 0x00, 0x0F, 0x67, 0x87, 0xFD, 0xF8, 0xC3, 0xE3, 0xB8, 0x78, 0x3E, 0x06, 0x03, 0xC0, 0xC0, 0x78, 0x18, 0x0F, 0x03, 0x01, 0xE0, 0x60, 0x3E, 0x1E, 0x0E, 0xC3, 0xE3, 0x9F, 0xFF, 0xE1, 0xF6, 0x78, 0x00, 0xC0, 0x00, 0x18, 0x00, 0x03, 0x00, 0x00, 0x60, 0x00,\n/* 0xF5 */ 0xC1, 0xF8, 0x66, 0x30, 0xCC, 0x3E, 0x07, 0x00, 0xC0, 0x78, 0x36, 0x0C, 0xC6, 0x3B, 0x06, 0xC0, 0xC0,\n/* 0xF6 */ 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCF, 0xFF, 0xFF, 0xF0, 0x03, 0x00, 0x30,\n/* 0xF7 */ 0xC1, 0xE0, 0xF0, 0x78, 0x3C, 0x1E, 0x0F, 0xFE, 0xFF, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18,\n/* 0xF8 */ 0xC3, 0x0F, 0x0C, 0x3C, 0x30, 0xF0, 0xC3, 0xC3, 0x0F, 0x0C, 0x3C, 0x30, 0xF0, 0xC3, 0xC3, 0x0F, 0x0C, 0x3C, 0x30, 0xFF, 0xFF, 0xFF, 0xFC,\n/* 0xF9 */ 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xC3, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x03, 0x00, 0x03,\n/* 0xFA */ 0xFC, 0x03, 0xF0, 0x00, 0xC0, 0x03, 0x00, 0x0F, 0xF0, 0x3F, 0xE0, 0xC1, 0xC3, 0x03, 0x0C, 0x0C, 0x30, 0x30, 0xC1, 0xC3, 0xFE, 0x0F, 0xF0,\n/* 0xFB */ 0xC0, 0x0F, 0x00, 0x3C, 0x00, 0xF0, 0x03, 0xFF, 0x0F, 0xFE, 0x3C, 0x1C, 0xF0, 0x33, 0xC0, 0xCF, 0x03, 0x3C, 0x1C, 0xFF, 0xE3, 0xFF, 0x0C,\n/* 0xFC */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xFF, 0x3F, 0xEC, 0x1F, 0x03, 0xC0, 0xF0, 0x3C, 0x1F, 0xFE, 0xFF, 0x00,\n/* 0xFD */ 0x3F, 0x0F, 0xF1, 0x87, 0x60, 0x60, 0x0E, 0x3F, 0xC7, 0xF8, 0x03, 0x00, 0xD8, 0x1B, 0x87, 0x3F, 0xC3, 0xF0,\n/* 0xFE */ 0xC0, 0xF8, 0xC1, 0xFC, 0xC3, 0x8E, 0xC7, 0x07, 0xC6, 0x03, 0xFE, 0x03, 0xFE, 0x03, 0xC6, 0x03, 0xC6, 0x03, 0xC7, 0x06, 0xC3, 0x8E, 0xC1, 0xFC, 0xC0, 0xF8,\n/* 0xFF */ 0x1F, 0xCF, 0xF7, 0x0D, 0x83, 0x60, 0xD8, 0x33, 0xFC, 0x7F, 0x0C, 0xC6, 0x33, 0x0D, 0x83, 0xC0, 0xC0,\n};\n\nconst GFXglyph FreeSans12pt_Win1251Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   19,  20,  21,   1,  -17 },\n/* 0x02 */ {    48,   19,  20,  21,   1,  -17 },\n/* 0x03 */ {    96,   21,  20,  23,   1,  -17 },\n/* 0x04 */ {   149,   21,  20,  23,   1,  -17 },\n/* 0x05 */ {   202,   20,  20,  22,   1,  -17 },\n/* 0x06 */ {   252,   20,  20,  22,   1,  -17 },\n/* 0x07 */ {   302,    0,   0,   8,   0,    0 },\n/* 0x08 */ {   302,   23,  20,  25,   1,  -17 },\n/* 0x09 */ {   360,   23,  16,  25,   1,  -16 },\n/* 0x0A */ {   406,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   406,   21,  20,  23,   1,  -17 },\n/* 0x0C */ {   459,   19,  18,  21,   1,  -15 },\n/* 0x0D */ {   502,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   502,   20,  20,  22,   1,  -17 },\n/* 0x0F */ {   552,   21,  21,  23,   1,  -18 },\n/* 0x10 */ {   608,   19,  20,  21,   1,  -17 },\n/* 0x11 */ {   656,   21,  20,  23,   1,  -17 },\n/* 0x12 */ {   709,   20,  20,  22,   1,  -17 },\n/* 0x13 */ {   759,   21,  20,  23,   1,  -17 },\n/* 0x14 */ {   812,   21,  20,  23,   1,  -17 },\n/* 0x15 */ {   865,   22,  20,  24,   1,  -17 },\n/* 0x16 */ {   920,   16,  20,  18,   1,  -17 },\n/* 0x17 */ {   960,   21,  20,  23,   1,  -17 },\n/* 0x18 */ {  1013,   23,  20,  25,   1,  -17 },\n/* 0x19 */ {  1071,   21,  20,  23,   1,  -17 },\n/* 0x1A */ {  1124,   15,  19,  17,   1,  -16 },\n/* 0x1B */ {  1160,   24,  21,  26,   1,  -18 },\n/* 0x1C */ {  1223,   21,  20,  23,   1,  -17 },\n/* 0x1D */ {  1276,   21,  21,  23,   1,  -18 },\n/* 0x1E */ {  1332,   20,  20,  22,   1,  -17 },\n/* 0x1F */ {  1382,   15,  20,  17,   1,  -17 },\n/* ' ' 0x20 */ {  1420,    0,   0,   6,   0,    0 },\n/* '!' 0x21 */ {  1420,    2,  18,   8,   3,  -16 },\n/* '\"' 0x22 */ {  1425,    6,   6,   8,   1,  -15 },\n/* '#' 0x23 */ {  1430,   13,  16,  13,   0,  -14 },\n/* '$' 0x24 */ {  1456,   11,  20,  13,   1,  -16 },\n/* '%' 0x25 */ {  1484,   20,  17,  21,   1,  -15 },\n/* '&' 0x26 */ {  1527,   14,  17,  16,   1,  -15 },\n/* ''' 0x27 */ {  1557,    2,   6,   5,   1,  -15 },\n/* '(' 0x28 */ {  1559,    5,  23,   8,   2,  -16 },\n/* ')' 0x29 */ {  1574,    5,  23,   8,   1,  -16 },\n/* '*' 0x2A */ {  1589,    7,   7,   9,   1,  -16 },\n/* '+' 0x2B */ {  1596,   10,  11,  14,   2,   -9 },\n/* ',' 0x2C */ {  1610,    2,   6,   7,   2,    0 },\n/* '-' 0x2D */ {  1612,    6,   2,   8,   1,   -6 },\n/* '.' 0x2E */ {  1614,    2,   2,   6,   2,    0 },\n/* '/' 0x2F */ {  1615,    7,  18,   7,   0,  -16 },\n/* '0' 0x30 */ {  1631,   11,  17,  13,   1,  -15 },\n/* '1' 0x31 */ {  1655,    5,  17,  13,   3,  -15 },\n/* '2' 0x32 */ {  1666,   11,  17,  13,   1,  -15 },\n/* '3' 0x33 */ {  1690,   11,  17,  13,   1,  -15 },\n/* '4' 0x34 */ {  1714,   11,  17,  13,   1,  -15 },\n/* '5' 0x35 */ {  1738,   11,  17,  13,   1,  -15 },\n/* '6' 0x36 */ {  1762,   11,  17,  13,   1,  -15 },\n/* '7' 0x37 */ {  1786,   11,  17,  13,   1,  -15 },\n/* '8' 0x38 */ {  1810,   11,  17,  13,   1,  -15 },\n/* '9' 0x39 */ {  1834,   11,  17,  13,   1,  -15 },\n/* ':' 0x3A */ {  1858,    2,  13,   6,   2,  -11 },\n/* ';' 0x3B */ {  1862,    2,  16,   6,   2,  -10 },\n/* '<' 0x3C */ {  1866,   12,  11,  14,   1,   -9 },\n/* '=' 0x3D */ {  1883,   12,   6,  14,   1,   -7 },\n/* '>' 0x3E */ {  1892,   12,  11,  14,   1,   -9 },\n/* '?' 0x3F */ {  1909,   10,  18,  13,   2,  -16 },\n/* '@' 0x40 */ {  1932,   22,  21,  24,   1,  -16 },\n/* 'A' 0x41 */ {  1990,   14,  18,  16,   1,  -16 },\n/* 'B' 0x42 */ {  2022,   13,  18,  16,   2,  -16 },\n/* 'C' 0x43 */ {  2052,   15,  18,  17,   1,  -16 },\n/* 'D' 0x44 */ {  2086,   14,  18,  17,   2,  -16 },\n/* 'E' 0x45 */ {  2118,   12,  18,  15,   2,  -16 },\n/* 'F' 0x46 */ {  2145,   11,  18,  14,   2,  -16 },\n/* 'G' 0x47 */ {  2170,   16,  18,  18,   1,  -16 },\n/* 'H' 0x48 */ {  2206,   13,  18,  17,   2,  -16 },\n/* 'I' 0x49 */ {  2236,    2,  18,   7,   2,  -16 },\n/* 'J' 0x4A */ {  2241,    9,  18,  13,   1,  -16 },\n/* 'K' 0x4B */ {  2262,   13,  18,  16,   2,  -16 },\n/* 'L' 0x4C */ {  2292,   10,  18,  14,   2,  -16 },\n/* 'M' 0x4D */ {  2315,   16,  18,  20,   2,  -16 },\n/* 'N' 0x4E */ {  2351,   13,  18,  18,   2,  -16 },\n/* 'O' 0x4F */ {  2381,   17,  18,  19,   1,  -16 },\n/* 'P' 0x50 */ {  2420,   12,  18,  16,   2,  -16 },\n/* 'Q' 0x51 */ {  2447,   17,  19,  19,   1,  -16 },\n/* 'R' 0x52 */ {  2488,   14,  18,  17,   2,  -16 },\n/* 'S' 0x53 */ {  2520,   14,  18,  16,   1,  -16 },\n/* 'T' 0x54 */ {  2552,   12,  18,  15,   1,  -16 },\n/* 'U' 0x55 */ {  2579,   13,  18,  17,   2,  -16 },\n/* 'V' 0x56 */ {  2609,   14,  18,  15,   1,  -16 },\n/* 'W' 0x57 */ {  2641,   22,  18,  22,   0,  -16 },\n/* 'X' 0x58 */ {  2691,   14,  18,  16,   1,  -16 },\n/* 'Y' 0x59 */ {  2723,   14,  18,  16,   1,  -16 },\n/* 'Z' 0x5A */ {  2755,   13,  18,  15,   1,  -16 },\n/* '[' 0x5B */ {  2785,    4,  23,   7,   2,  -16 },\n/* '\\' 0x5C */ {  2797,    7,  18,   7,   0,  -16 },\n/* ']' 0x5D */ {  2813,    4,  23,   7,   1,  -16 },\n/* '^' 0x5E */ {  2825,    9,   9,  11,   1,  -15 },\n/* '_' 0x5F */ {  2836,   15,   1,  13,  -1,    5 },\n/* '`' 0x60 */ {  2838,    5,   4,   6,   1,  -16 },\n/* 'a' 0x61 */ {  2841,   12,  13,  13,   1,  -11 },\n/* 'b' 0x62 */ {  2861,   12,  18,  13,   1,  -16 },\n/* 'c' 0x63 */ {  2888,   10,  13,  12,   1,  -11 },\n/* 'd' 0x64 */ {  2905,   11,  18,  13,   1,  -16 },\n/* 'e' 0x65 */ {  2930,   11,  13,  13,   1,  -11 },\n/* 'f' 0x66 */ {  2948,    5,  18,   7,   1,  -16 },\n/* 'g' 0x67 */ {  2960,   11,  18,  13,   1,  -11 },\n/* 'h' 0x68 */ {  2985,   10,  18,  13,   1,  -16 },\n/* 'i' 0x69 */ {  3008,    2,  18,   5,   2,  -16 },\n/* 'j' 0x6A */ {  3013,    4,  23,   6,   0,  -16 },\n/* 'k' 0x6B */ {  3025,   10,  18,  12,   1,  -16 },\n/* 'l' 0x6C */ {  3048,    2,  18,   5,   1,  -16 },\n/* 'm' 0x6D */ {  3053,   17,  13,  19,   1,  -11 },\n/* 'n' 0x6E */ {  3081,   10,  13,  13,   1,  -11 },\n/* 'o' 0x6F */ {  3098,   11,  13,  13,   1,  -11 },\n/* 'p' 0x70 */ {  3116,   12,  17,  13,   1,  -11 },\n/* 'q' 0x71 */ {  3142,   11,  17,  13,   1,  -11 },\n/* 'r' 0x72 */ {  3166,    6,  13,   8,   1,  -11 },\n/* 's' 0x73 */ {  3176,   10,  13,  12,   1,  -11 },\n/* 't' 0x74 */ {  3193,    5,  16,   7,   1,  -14 },\n/* 'u' 0x75 */ {  3203,   10,  13,  13,   1,  -11 },\n/* 'v' 0x76 */ {  3220,   11,  13,  12,   0,  -11 },\n/* 'w' 0x77 */ {  3238,   17,  13,  17,   0,  -11 },\n/* 'x' 0x78 */ {  3266,   10,  13,  11,   1,  -11 },\n/* 'y' 0x79 */ {  3283,   11,  18,  11,   0,  -11 },\n/* 'z' 0x7A */ {  3308,   10,  13,  12,   1,  -11 },\n/* '{' 0x7B */ {  3325,    5,  23,   8,   1,  -16 },\n/* '|' 0x7C */ {  3340,    2,  23,   6,   2,  -16 },\n/* '}' 0x7D */ {  3346,    5,  23,   8,   2,  -16 },\n/* '~' 0x7E */ {  3361,   10,   5,  12,   1,   -9 },\n/* 0x7F */ {  3368,    0,   0,   0,   0,    0 },\n/* 0x80 */ {  3368,   16,  22,  18,   1,  -18 },\n/* 0x81 */ {  3412,   11,  22,  14,   2,  -22 },\n/* 0x82 */ {  3443,    2,   5,   6,   2,   -2 },\n/* 0x83 */ {  3445,    7,  18,   9,   1,  -18 },\n/* 0x84 */ {  3461,    6,   5,  10,   2,   -2 },\n/* 0x85 */ {  3465,   12,   2,  16,   2,   -2 },\n/* 0x86 */ {  3468,   10,  21,  13,   2,  -17 },\n/* 0x87 */ {  3495,   10,  20,  13,   2,  -17 },\n/* 0x88 */ {  3520,   14,  17,  16,   1,  -17 },\n/* 0x89 */ {  3550,   23,  18,  24,   0,  -18 },\n/* 0x8A */ {  3602,   23,  18,  24,   0,  -18 },\n/* 0x8B */ {  3654,    3,   8,   6,   1,  -11 },\n/* 0x8C */ {  3657,   21,  18,  24,   2,  -18 },\n/* 0x8D */ {  3705,   12,  22,  15,   2,  -22 },\n/* 0x8E */ {  3738,   16,  18,  18,   1,  -18 },\n/* 0x8F */ {  3774,   13,  21,  17,   2,  -18 },\n/* 0x90 */ {  3809,   12,  22,  14,   0,  -18 },\n/* 0x91 */ {  3842,    2,   6,   6,   2,  -18 },\n/* 0x92 */ {  3844,    2,   6,   6,   2,  -18 },\n/* 0x93 */ {  3846,    6,   6,  10,   2,  -18 },\n/* 0x94 */ {  3851,    6,   6,  10,   2,  -18 },\n/* 0x95 */ {  3856,    6,   6,  10,   2,  -11 },\n/* 0x96 */ {  3861,   10,   2,  12,   1,   -8 },\n/* 0x97 */ {  3864,   22,   2,  24,   1,   -8 },\n/* 0x98 */ {  3870,    0,   0,   8,   0,    0 },\n/* 0x99 */ {  3870,   22,  13,  24,   2,  -18 },\n/* 0x9A */ {  3906,   17,  13,  19,   1,  -13 },\n/* 0x9B */ {  3934,    3,   8,   6,   2,  -10 },\n/* 0x9C */ {  3937,   18,  13,  20,   1,  -13 },\n/* 0x9D */ {  3967,    9,  18,  12,   1,  -18 },\n/* 0x9E */ {  3988,   11,  18,  14,   1,  -18 },\n/* 0x9F */ {  4013,   10,  15,  13,   1,  -13 },\n/* 0xA0 */ {  4032,    0,   0,   7,   0,    0 },\n/* 0xA1 */ {  4032,   13,  22,  15,   1,  -22 },\n/* 0xA2 */ {  4068,   11,  22,  11,   0,  -17 },\n/* 0xA3 */ {  4099,    9,  18,  13,   1,  -18 },\n/* 0xA4 */ {  4120,    9,   9,  13,   2,  -13 },\n/* 0xA5 */ {  4131,   11,  20,  14,   2,  -20 },\n/* 0xA6 */ {  4159,    2,  23,   6,   2,  -18 },\n/* 0xA7 */ {  4165,   11,  23,  13,   1,  -18 },\n/* 0xA8 */ {  4197,   12,  21,  15,   2,  -21 },\n/* 0xA9 */ {  4229,   18,  17,  19,   1,  -17 },\n/* 0xAA */ {  4268,   15,  18,  17,   1,  -18 },\n/* 0xAB */ {  4302,    8,   8,  12,   2,  -11 },\n/* 0xAC */ {  4310,   12,   6,  14,   1,   -9 },\n/* 0xAD */ {  4319,    6,   2,   8,   1,   -8 },\n/* 0xAE */ {  4321,   18,  17,  19,   1,  -17 },\n/* 0xAF */ {  4360,    7,  21,   7,   0,  -21 },\n/* 0xB0 */ {  4379,    7,   8,  15,   4,  -17 },\n/* 0xB1 */ {  4386,   12,  15,  14,   1,  -15 },\n/* 0xB2 */ {  4409,    2,  18,   7,   2,  -18 },\n/* 0xB3 */ {  4414,    2,  18,   5,   2,  -18 },\n/* 0xB4 */ {  4419,    8,  15,   9,   1,  -15 },\n/* 0xB5 */ {  4434,   12,  17,  13,   2,  -13 },\n/* 0xB6 */ {  4460,   11,  21,  13,   2,  -18 },\n/* 0xB7 */ {  4489,    2,   2,   6,   2,   -8 },\n/* 0xB8 */ {  4490,   11,  17,  13,   1,  -17 },\n/* 0xB9 */ {  4514,   19,  18,  22,   2,  -18 },\n/* 0xBA */ {  4557,   11,  13,  12,   0,  -13 },\n/* 0xBB */ {  4575,    8,   8,  12,   2,  -10 },\n/* 0xBC */ {  4583,    4,  23,   6,   0,  -18 },\n/* 0xBD */ {  4595,   14,  18,  16,   1,  -18 },\n/* 0xBE */ {  4627,   10,  13,  12,   1,  -13 },\n/* 0xBF */ {  4644,    6,  17,   6,   0,  -17 },\n/* 0xC0 */ {  4657,   14,  18,  16,   1,  -18 },\n/* 0xC1 */ {  4689,   13,  18,  16,   2,  -18 },\n/* 0xC2 */ {  4719,   13,  18,  16,   2,  -18 },\n/* 0xC3 */ {  4749,   11,  18,  14,   2,  -18 },\n/* 0xC4 */ {  4774,   18,  21,  19,   1,  -18 },\n/* 0xC5 */ {  4822,   12,  18,  15,   2,  -18 },\n/* 0xC6 */ {  4849,   20,  18,  22,   1,  -18 },\n/* 0xC7 */ {  4894,   13,  18,  16,   1,  -18 },\n/* 0xC8 */ {  4924,   13,  18,  18,   2,  -18 },\n/* 0xC9 */ {  4954,   13,  22,  18,   2,  -22 },\n/* 0xCA */ {  4990,   12,  18,  15,   2,  -18 },\n/* 0xCB */ {  5017,   14,  18,  16,   0,  -18 },\n/* 0xCC */ {  5049,   16,  18,  20,   2,  -18 },\n/* 0xCD */ {  5085,   13,  18,  17,   2,  -18 },\n/* 0xCE */ {  5115,   17,  18,  19,   1,  -18 },\n/* 0xCF */ {  5154,   13,  18,  17,   2,  -18 },\n/* 0xD0 */ {  5184,   12,  18,  16,   2,  -18 },\n/* 0xD1 */ {  5211,   15,  18,  17,   1,  -18 },\n/* 0xD2 */ {  5245,   12,  18,  15,   1,  -18 },\n/* 0xD3 */ {  5272,   13,  18,  15,   1,  -18 },\n/* 0xD4 */ {  5302,   18,  18,  20,   1,  -18 },\n/* 0xD5 */ {  5343,   14,  18,  16,   1,  -18 },\n/* 0xD6 */ {  5375,   15,  21,  18,   2,  -18 },\n/* 0xD7 */ {  5415,   12,  18,  15,   1,  -18 },\n/* 0xD8 */ {  5442,   16,  18,  20,   2,  -18 },\n/* 0xD9 */ {  5478,   18,  21,  20,   2,  -18 },\n/* 0xDA */ {  5526,   18,  18,  20,   1,  -18 },\n/* 0xDB */ {  5567,   17,  18,  21,   2,  -18 },\n/* 0xDC */ {  5606,   13,  18,  16,   2,  -18 },\n/* 0xDD */ {  5636,   15,  18,  17,   1,  -18 },\n/* 0xDE */ {  5670,   21,  18,  24,   2,  -18 },\n/* 0xDF */ {  5718,   14,  18,  16,   0,  -18 },\n/* 0xE0 */ {  5750,   12,  13,  13,   1,  -13 },\n/* 0xE1 */ {  5770,   11,  19,  13,   1,  -19 },\n/* 0xE2 */ {  5797,   10,  13,  12,   1,  -13 },\n/* 0xE3 */ {  5814,    7,  13,   9,   1,  -13 },\n/* 0xE4 */ {  5826,   14,  15,  14,   0,  -13 },\n/* 0xE5 */ {  5853,   11,  13,  13,   1,  -13 },\n/* 0xE6 */ {  5871,   16,  13,  18,   1,  -13 },\n/* 0xE7 */ {  5897,    9,  13,  12,   1,  -13 },\n/* 0xE8 */ {  5912,   11,  13,  13,   1,  -13 },\n/* 0xE9 */ {  5930,   11,  17,  13,   1,  -17 },\n/* 0xEA */ {  5954,    9,  13,  12,   1,  -13 },\n/* 0xEB */ {  5969,   10,  13,  12,   0,  -13 },\n/* 0xEC */ {  5986,   12,  13,  14,   1,  -13 },\n/* 0xED */ {  6006,   10,  13,  13,   1,  -13 },\n/* 0xEE */ {  6023,   11,  13,  13,   1,  -13 },\n/* 0xEF */ {  6041,   10,  13,  13,   1,  -13 },\n/* 0xF0 */ {  6058,   12,  17,  13,   1,  -13 },\n/* 0xF1 */ {  6084,   10,  13,  12,   1,  -13 },\n/* 0xF2 */ {  6101,    8,  13,  10,   1,  -13 },\n/* 0xF3 */ {  6114,   11,  18,  11,   0,  -13 },\n/* 0xF4 */ {  6139,   19,  20,  20,   1,  -16 },\n/* 0xF5 */ {  6187,   10,  13,  11,   1,  -13 },\n/* 0xF6 */ {  6204,   12,  15,  13,   1,  -13 },\n/* 0xF7 */ {  6227,    9,  13,  12,   1,  -13 },\n/* 0xF8 */ {  6242,   14,  13,  16,   1,  -13 },\n/* 0xF9 */ {  6265,   16,  15,  17,   1,  -13 },\n/* 0xFA */ {  6295,   14,  13,  15,   1,  -13 },\n/* 0xFB */ {  6318,   14,  13,  16,   1,  -13 },\n/* 0xFC */ {  6341,   10,  13,  12,   1,  -13 },\n/* 0xFD */ {  6358,   11,  13,  12,   1,  -13 },\n/* 0xFE */ {  6376,   16,  13,  18,   1,  -13 },\n/* 0xFF */ {  6402,   10,  13,  13,   1,  -13 },\n};\n\nconst GFXfont FreeSans12pt_Win1251 PROGMEM = {\n(uint8_t*)FreeSans12pt_Win1251Bitmaps,\n(GFXglyph*)FreeSans12pt_Win1251Glyphs,\n0x01, 0xFF, 19\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans12pt_Win1252.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans12pt_Win1252\n*/\nconst uint8_t FreeSans12pt_Win1252Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x00, 0x30, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x24, 0x00, 0x04, 0x80, 0x01, 0x90, 0x00, 0x62, 0x00, 0x30, 0xFE, 0x04, 0x10, 0x5F, 0x02, 0x0B, 0x00, 0x7F, 0xE0, 0x0C, 0x1C, 0x02, 0x83, 0x81, 0x9F, 0xF0, 0x02, 0x1E, 0x00, 0x41, 0xC0, 0x0E, 0x7F, 0x81, 0x78, 0x18, 0x62, 0x00, 0xFF, 0xC0,\n/* 0x02 */ 0x00, 0xFF, 0x80, 0x61, 0x13, 0xF0, 0x62, 0x60, 0x07, 0xFC, 0x00, 0x83, 0x80, 0x10, 0xF0, 0x33, 0xF6, 0x01, 0x41, 0xC0, 0x18, 0x38, 0x03, 0xFF, 0xE0, 0x47, 0x02, 0x08, 0x20, 0x61, 0xC4, 0x06, 0x17, 0x00, 0x22, 0x00, 0x02, 0x40, 0x00, 0x48, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x3C, 0x00,\n/* 0x03 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x04, 0x08, 0x48, 0x70, 0xE1, 0xC3, 0x87, 0x0E, 0x08, 0x10, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA1, 0x81, 0x8D, 0x87, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x04 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x10, 0x02, 0x48, 0xE0, 0x61, 0xC1, 0xCC, 0x0E, 0x78, 0x1C, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xFC, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x05 */ 0x00, 0x18, 0x00, 0x00, 0x40, 0x01, 0x90, 0x01, 0xF4, 0x08, 0x12, 0x23, 0xC1, 0x91, 0x2C, 0x1C, 0x8A, 0xC3, 0x64, 0x64, 0x13, 0x22, 0x41, 0x98, 0x26, 0x2C, 0xC4, 0x22, 0x60, 0x42, 0x13, 0x04, 0x30, 0x80, 0x61, 0xA4, 0x02, 0x18, 0x20, 0x03, 0x41, 0x00, 0x20, 0x08, 0x02, 0x00, 0x60, 0x40, 0x03, 0xF8,\n/* 0x06 */ 0x00, 0x10, 0x00, 0x03, 0x00, 0x1C, 0x48, 0x00, 0xB4, 0x80, 0x09, 0xF9, 0xC0, 0xE0, 0xE4, 0x0C, 0x02, 0x8F, 0x80, 0x38, 0x88, 0x01, 0x0D, 0x00, 0x18, 0x30, 0x01, 0x60, 0x80, 0x13, 0x18, 0x03, 0xF2, 0xC0, 0x20, 0x26, 0x06, 0x07, 0xFF, 0xA0, 0x02, 0x39, 0x00, 0x14, 0x70, 0x01, 0xC3, 0x00, 0x18, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x10, 0x37, 0xE2, 0x61, 0x00, 0x0C, 0xC6, 0x10, 0x98, 0x0C, 0x63, 0x00, 0x00, 0xC6, 0x00,\n/* 0x09 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x00, 0x37, 0xE0,\n/* 0x0A */\n/* 0x0B */ 0x1F, 0x07, 0xC1, 0x86, 0x41, 0x10, 0x0C, 0x04, 0x80, 0x40, 0x18, 0x00, 0x00, 0xC0, 0x00, 0x06, 0x00, 0x00, 0x30, 0x00, 0x01, 0x40, 0x00, 0x0A, 0x00, 0x00, 0x88, 0x00, 0x04, 0x40, 0x00, 0x41, 0x00, 0x02, 0x04, 0x00, 0x20, 0x20, 0x02, 0x00, 0x80, 0x20, 0x02, 0x02, 0x00, 0x08, 0x20, 0x00, 0x22, 0x00, 0x00, 0xE0, 0x00,\n/* 0x0C */ 0x01, 0x00, 0x00, 0x38, 0x00, 0x04, 0xC0, 0x01, 0x08, 0x00, 0x18, 0x80, 0x1C, 0x10, 0x02, 0x07, 0x80, 0x81, 0x10, 0x1F, 0xC2, 0x02, 0x00, 0x60, 0x80, 0x1A, 0x20, 0x1C, 0x42, 0x1C, 0x08, 0xFE, 0x03, 0xA0, 0x01, 0x8C, 0x01, 0xC1, 0x43, 0xD0, 0x27, 0x81, 0xF8,\n/* 0x0D */\n/* 0x0E */ 0x00, 0xE0, 0x00, 0x11, 0x00, 0x01, 0x10, 0x00, 0x0B, 0x00, 0x03, 0xF8, 0x00, 0x60, 0x60, 0x09, 0x02, 0x00, 0xA0, 0x10, 0x16, 0x01, 0x01, 0x40, 0x10, 0x10, 0x01, 0x01, 0x00, 0x08, 0x10, 0x00, 0x82, 0x1F, 0x08, 0x3F, 0x90, 0x44, 0x00, 0x06, 0xBF, 0xFF, 0xAF, 0xF0, 0xFF, 0xFF, 0x0F, 0xE3, 0xFB, 0xFC,\n/* 0x0F */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x40, 0x12, 0x34, 0x00, 0x69, 0x40, 0x01, 0x49, 0xE0, 0xF1, 0xCD, 0x06, 0x8E, 0x28, 0x14, 0x71, 0x40, 0xA3, 0x8B, 0xFD, 0x14, 0x50, 0x68, 0xA2, 0x81, 0x4D, 0x97, 0xFA, 0x44, 0xBF, 0xD6, 0x31, 0x02, 0xE0, 0xC8, 0x16, 0x08, 0x61, 0x08, 0x21, 0xF0, 0x80, 0xF8, 0x78, 0x00,\n/* 0x10 */ 0x00, 0xF0, 0x00, 0x3A, 0x00, 0x07, 0xC0, 0x00, 0xA8, 0x00, 0x1F, 0x00, 0x02, 0xB0, 0x00, 0x52, 0x00, 0x0A, 0x40, 0x02, 0x48, 0x00, 0x49, 0x00, 0x09, 0x30, 0x01, 0x22, 0x01, 0xC4, 0x70, 0xF0, 0x85, 0xE1, 0x10, 0x88, 0x37, 0x20, 0x03, 0x9C, 0x00, 0x37, 0x00, 0x06, 0x40, 0x01, 0x86, 0x00,\n/* 0x11 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x60, 0x02, 0x36, 0x00, 0x09, 0x04, 0x0C, 0x48, 0x60, 0xC1, 0xC3, 0x0F, 0x0E, 0x00, 0x08, 0x70, 0x00, 0x23, 0x80, 0x63, 0x84, 0x01, 0x9F, 0x20, 0x0C, 0xFD, 0x80, 0x27, 0xE4, 0x03, 0x3F, 0x30, 0x33, 0xE0, 0xC0, 0x00, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x12 */ 0x00, 0xC2, 0x00, 0x1C, 0x24, 0x02, 0x18, 0x60, 0x64, 0x02, 0x02, 0x40, 0x20, 0x00, 0xF2, 0x03, 0x89, 0xE0, 0x7C, 0x80, 0x0E, 0x25, 0x80, 0xE1, 0x00, 0x1A, 0x08, 0x71, 0xB0, 0xC4, 0x39, 0x84, 0xC2, 0xCC, 0x40, 0x76, 0x7C, 0x05, 0xBB, 0x80, 0x4C, 0xE0, 0x0A, 0x78, 0x00, 0x9C, 0x00, 0x0F, 0x00, 0x00,\n/* 0x13 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x60, 0xC1, 0xC6, 0xC9, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xF8, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x14 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x20, 0x22, 0x33, 0x01, 0x89, 0x20, 0x02, 0x48, 0x60, 0xE1, 0xC8, 0x80, 0x8E, 0x46, 0x46, 0x72, 0x32, 0x33, 0x9F, 0x9F, 0x94, 0x78, 0x78, 0xA0, 0x00, 0x0D, 0x80, 0x00, 0x44, 0x0E, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x15 */ 0x03, 0xFC, 0x20, 0x38, 0x1C, 0x81, 0x80, 0x1D, 0x08, 0x00, 0x32, 0x60, 0x00, 0x89, 0x00, 0x02, 0x18, 0x00, 0x08, 0x61, 0xC3, 0x22, 0x8D, 0x93, 0x72, 0x00, 0x00, 0x48, 0x00, 0x01, 0x20, 0x00, 0x04, 0x9F, 0xFF, 0x92, 0x60, 0x0E, 0x44, 0xFF, 0xF2, 0x11, 0xC3, 0x88, 0x21, 0xF8, 0x40, 0x40, 0x02, 0x00, 0xC0, 0x30, 0x00, 0xFF, 0x00,\n/* 0x16 */ 0x03, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x01, 0xE0, 0x03, 0xF0, 0x03, 0xF0, 0x27, 0xF0, 0x6F, 0x70, 0x6E, 0x60, 0xFC, 0x60, 0xFC, 0x7E, 0xFC, 0x7E, 0xFC, 0x3F, 0xF4, 0x1F, 0xF4, 0x1F, 0xF0, 0x0E, 0x70, 0x0E, 0x30, 0x1C, 0x38, 0x38, 0x0F, 0xF0,\n/* 0x17 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x00, 0x21, 0xC0, 0x02, 0x8E, 0x20, 0xF4, 0x70, 0x84, 0x11, 0x82, 0x40, 0x84, 0x01, 0x03, 0x20, 0x0F, 0x85, 0x80, 0x03, 0x04, 0x00, 0x04, 0x30, 0x78, 0x10, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x18 */ 0x00, 0xFC, 0x00, 0x02, 0x06, 0x00, 0x08, 0x24, 0x00, 0x21, 0xA4, 0x00, 0x4C, 0x48, 0x00, 0xA0, 0x50, 0x01, 0x92, 0x60, 0x03, 0x24, 0xC0, 0x06, 0x01, 0x81, 0x28, 0x03, 0x49, 0x6C, 0xC4, 0xAD, 0xD8, 0x16, 0xA4, 0xCC, 0xC4, 0x44, 0x86, 0x13, 0x05, 0x00, 0x28, 0x0A, 0x00, 0x50, 0x14, 0x00, 0x90, 0x48, 0x01, 0x20, 0x90, 0x02, 0x41, 0x20, 0x00, 0x00,\n/* 0x19 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x49, 0xC3, 0x81, 0xC0, 0x00, 0x0E, 0x78, 0xF0, 0x77, 0xEF, 0xC3, 0xA7, 0x4E, 0x15, 0x0A, 0x10, 0xA7, 0x8F, 0x0D, 0x80, 0x00, 0x44, 0x00, 0x06, 0x33, 0xF0, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1A */ 0xFF, 0xFF, 0x00, 0x06, 0x00, 0x0C, 0x3E, 0x18, 0x82, 0x32, 0x02, 0x64, 0x04, 0xC8, 0x09, 0x80, 0x23, 0x00, 0x86, 0x02, 0x0C, 0x08, 0x18, 0x10, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x81, 0x80, 0x03, 0x00, 0x07, 0xFF, 0xF8,\n/* 0x1B */ 0x00, 0xFE, 0x00, 0x03, 0x81, 0x80, 0x04, 0x00, 0x60, 0x08, 0x00, 0x30, 0x10, 0x00, 0x10, 0x30, 0x07, 0x88, 0x23, 0xC8, 0x08, 0x22, 0x00, 0x04, 0x60, 0x00, 0x44, 0x60, 0x00, 0x84, 0x63, 0x03, 0x04, 0x61, 0xFC, 0x04, 0x6B, 0x00, 0x9E, 0xA5, 0x01, 0x6A, 0xD5, 0x01, 0x43, 0xA8, 0x81, 0x05, 0xD0, 0x82, 0x0A, 0xA0, 0x82, 0x05, 0xC0, 0x82, 0x02, 0x61, 0xFF, 0x0C, 0x1E, 0x00, 0xF0,\n/* 0x1C */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x30, 0x02, 0x32, 0x00, 0x09, 0x00, 0x00, 0x48, 0x20, 0x61, 0xC3, 0x84, 0x0E, 0x1C, 0x78, 0x70, 0x40, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA0, 0x03, 0x0D, 0x83, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1D */ 0x01, 0xFE, 0x00, 0x3A, 0x1C, 0x03, 0x00, 0x30, 0x23, 0x1E, 0xC3, 0x38, 0x03, 0x10, 0xC3, 0x09, 0x00, 0x18, 0x68, 0x00, 0xC1, 0x40, 0x00, 0x0A, 0x07, 0x80, 0x50, 0x46, 0x02, 0x80, 0x00, 0x1A, 0x1E, 0x00, 0xCB, 0x10, 0x0D, 0x03, 0x00, 0x48, 0x60, 0x06, 0x40, 0x00, 0x22, 0x0C, 0x02, 0x10, 0x60, 0x60, 0x43, 0xFC, 0x01, 0xE0, 0x00, 0x00,\n/* 0x1E */ 0x01, 0xF0, 0x00, 0xEA, 0xC0, 0x31, 0x5F, 0x04, 0x5F, 0x88, 0x80, 0xA0, 0x48, 0x0E, 0x02, 0x8F, 0x40, 0x3C, 0x10, 0x21, 0x66, 0x87, 0x15, 0x98, 0x71, 0x41, 0x02, 0x14, 0x00, 0x01, 0x40, 0x00, 0x14, 0x00, 0x01, 0x21, 0xFE, 0x12, 0x00, 0x02, 0x10, 0x00, 0x60, 0x80, 0x0C, 0x06, 0x01, 0x80, 0x3F, 0xE0,\n/* 0x1F */ 0x0E, 0x00, 0x13, 0x00, 0x23, 0x00, 0xF3, 0x01, 0x31, 0x01, 0x11, 0x03, 0xD3, 0x06, 0xF2, 0x30, 0x34, 0xC7, 0x25, 0x33, 0x2B, 0xC2, 0x57, 0x04, 0x3A, 0x08, 0x72, 0x30, 0xA3, 0xC3, 0x40, 0x04, 0x40, 0x18, 0x40, 0x60, 0x7F, 0x80,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xFF, 0xF0, 0xF0,\n/* '\"' 0x22 */ 0xCF, 0x3C, 0xF3, 0x8A, 0x20,\n/* '#' 0x23 */ 0x06, 0x30, 0x31, 0x03, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC0, 0xC6, 0x06, 0x30,\n/* '$' 0x24 */ 0x04, 0x03, 0xE1, 0xFF, 0x72, 0x7C, 0x47, 0x88, 0xF1, 0x07, 0xA0, 0x7E, 0x03, 0xF0, 0x17, 0x02, 0x7C, 0x47, 0x88, 0xF1, 0x1B, 0x26, 0x7F, 0xC3, 0xE0, 0x10, 0x02, 0x00,\n/* '%' 0x25 */ 0x00, 0x06, 0x03, 0xC0, 0x40, 0x7E, 0x0C, 0x0E, 0x70, 0x80, 0xC3, 0x18, 0x0C, 0x31, 0x00, 0xE7, 0x30, 0x07, 0xE6, 0x00, 0x3C, 0x40, 0x00, 0x0C, 0x7C, 0x00, 0x8F, 0xE0, 0x19, 0xC7, 0x01, 0x18, 0x30, 0x31, 0x83, 0x02, 0x1C, 0x70, 0x40, 0xFE, 0x04, 0x07, 0xC0,\n/* '&' 0x26 */ 0x0F, 0x00, 0x7E, 0x03, 0x9C, 0x0C, 0x30, 0x30, 0xC0, 0xE7, 0x01, 0xF8, 0x03, 0x80, 0x3E, 0x01, 0xCC, 0x6E, 0x39, 0xB0, 0x7C, 0xC0, 0xF3, 0x03, 0xCE, 0x1F, 0x9F, 0xE6, 0x3E, 0x1C,\n/* ''' 0x27 */ 0xFF, 0xA0,\n/* '(' 0x28 */ 0x08, 0x8C, 0x46, 0x31, 0x98, 0xC6, 0x31, 0x8C, 0x63, 0x08, 0x63, 0x08, 0x61, 0x0C, 0x20,\n/* ')' 0x29 */ 0x82, 0x18, 0xC3, 0x18, 0xC3, 0x18, 0xC6, 0x31, 0x8C, 0x62, 0x31, 0x88, 0xC4, 0x62, 0x00,\n/* '*' 0x2A */ 0x10, 0x23, 0x5B, 0xE3, 0x8D, 0x91, 0x00,\n/* '+' 0x2B */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0xFF, 0xFF, 0xF0, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0,\n/* ',' 0x2C */ 0xF5, 0x60,\n/* '-' 0x2D */ 0xFF, 0xF0,\n/* '.' 0x2E */ 0xF0,\n/* '/' 0x2F */ 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x00,\n/* '0' 0x30 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x6C, 0x0F, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3E, 0x0E, 0xC1, 0x9C, 0x71, 0xFC, 0x1F, 0x00,\n/* '1' 0x31 */ 0x08, 0xCF, 0xFF, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18,\n/* '2' 0x32 */ 0x1F, 0x0F, 0xF9, 0x87, 0x60, 0x7C, 0x06, 0x00, 0xC0, 0x18, 0x07, 0x01, 0xC0, 0xF0, 0x78, 0x1C, 0x06, 0x00, 0xC0, 0x30, 0x07, 0xFF, 0xFF, 0xE0,\n/* '3' 0x33 */ 0x3F, 0x0F, 0xF3, 0x87, 0x60, 0x6C, 0x0C, 0x01, 0x80, 0x60, 0x78, 0x0F, 0x80, 0x18, 0x01, 0x80, 0x3C, 0x07, 0x80, 0xD8, 0x73, 0xFC, 0x3F, 0x00,\n/* '4' 0x34 */ 0x01, 0x80, 0x70, 0x0E, 0x03, 0xC0, 0xD8, 0x1B, 0x06, 0x61, 0x8C, 0x21, 0x8C, 0x33, 0x06, 0x7F, 0xFF, 0xFE, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80,\n/* '5' 0x35 */ 0x3F, 0xCF, 0xF9, 0x80, 0x30, 0x06, 0x00, 0xDE, 0x1F, 0xE7, 0x0E, 0x00, 0xE0, 0x0C, 0x01, 0x80, 0x30, 0x07, 0x81, 0xB8, 0x73, 0xFC, 0x1F, 0x00,\n/* '6' 0x36 */ 0x0F, 0x07, 0xF9, 0xC3, 0x30, 0x74, 0x01, 0x80, 0x33, 0xC7, 0xFE, 0xF1, 0xDC, 0x1F, 0x01, 0xE0, 0x3C, 0x06, 0xC1, 0xDC, 0x71, 0xFC, 0x1F, 0x00,\n/* '7' 0x37 */ 0xFF, 0xFF, 0xFC, 0x01, 0x00, 0x60, 0x18, 0x02, 0x00, 0xC0, 0x30, 0x06, 0x01, 0x80, 0x30, 0x04, 0x01, 0x80, 0x30, 0x06, 0x01, 0x80, 0x30, 0x00,\n/* '8' 0x38 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x66, 0x0C, 0xC1, 0x8C, 0x61, 0xF8, 0x3F, 0x8E, 0x3B, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xD8, 0x31, 0xFC, 0x1F, 0x00,\n/* '9' 0x39 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x6C, 0x07, 0x80, 0xF0, 0x1E, 0x07, 0x61, 0xEF, 0xFC, 0x79, 0x80, 0x30, 0x05, 0xC1, 0x98, 0x73, 0xFC, 0x1E, 0x00,\n/* ':' 0x3A */ 0xF0, 0x00, 0x03, 0xC0,\n/* ';' 0x3B */ 0xF0, 0x00, 0x0F, 0x56,\n/* '<' 0x3C */ 0x00, 0x70, 0x1E, 0x0F, 0x83, 0xC0, 0xF0, 0x0E, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x10,\n/* '=' 0x3D */ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,\n/* '>' 0x3E */ 0xE0, 0x07, 0x80, 0x1F, 0x00, 0x7C, 0x00, 0xF0, 0x07, 0x01, 0xE0, 0xF0, 0x3C, 0x0F, 0x00, 0x80, 0x00,\n/* '?' 0x3F */ 0x3F, 0x1F, 0xEE, 0x1F, 0x03, 0xC0, 0xC0, 0x30, 0x0C, 0x06, 0x03, 0x81, 0xC0, 0xE0, 0x30, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x00,\n/* '@' 0x40 */ 0x00, 0xFE, 0x00, 0x0F, 0xFE, 0x00, 0xF0, 0x3E, 0x07, 0x00, 0x3C, 0x38, 0x00, 0x38, 0xC1, 0xE0, 0x66, 0x0F, 0xD9, 0xD8, 0x61, 0xC3, 0xC3, 0x07, 0x0F, 0x1C, 0x1C, 0x3C, 0x60, 0x60, 0xF1, 0x81, 0x83, 0xC6, 0x06, 0x1B, 0x18, 0x38, 0xEE, 0x71, 0xE7, 0x18, 0xFD, 0xF8, 0x71, 0xE7, 0xC0, 0xE0, 0x00, 0x01, 0xE0, 0x00, 0x01, 0xFF, 0xC0, 0x01, 0xFC, 0x00,\n/* 'A' 0x41 */ 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 'B' 0x42 */ 0xFF, 0xC7, 0xFF, 0x30, 0x1D, 0x80, 0x6C, 0x03, 0x60, 0x1B, 0x00, 0xD8, 0x0C, 0xFF, 0xC7, 0xFF, 0x30, 0x0D, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x06, 0xFF, 0xF7, 0xFE, 0x00,\n/* 'C' 0x43 */ 0x07, 0xE0, 0x3F, 0xF0, 0xE0, 0x73, 0x80, 0x76, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x00, 0xDC, 0x03, 0x1E, 0x0E, 0x1F, 0xF8, 0x0F, 0xC0,\n/* 'D' 0x44 */ 0xFF, 0xC3, 0xFF, 0x8C, 0x07, 0x30, 0x0E, 0xC0, 0x1B, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x3C, 0x00, 0xF0, 0x03, 0xC0, 0x1F, 0x00, 0x6C, 0x03, 0xB0, 0x1C, 0xFF, 0xE3, 0xFE, 0x00,\n/* 'E' 0x45 */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 'F' 0x46 */ 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xFF, 0xDF, 0xFB, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x00,\n/* 'G' 0x47 */ 0x07, 0xF0, 0x1F, 0xFC, 0x3C, 0x1E, 0x70, 0x07, 0x60, 0x03, 0xE0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x7F, 0xC0, 0x7F, 0xC0, 0x03, 0xC0, 0x03, 0x60, 0x03, 0x60, 0x07, 0x30, 0x0F, 0x3C, 0x1F, 0x1F, 0xFB, 0x07, 0xE1,\n/* 'H' 0x48 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xC0,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'J' 0x4A */ 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x3C, 0x1E, 0x0F, 0x07, 0xC7, 0x7F, 0x1F, 0x00,\n/* 'K' 0x4B */ 0xC0, 0x3E, 0x03, 0xB0, 0x39, 0x83, 0x8C, 0x38, 0x63, 0x83, 0x38, 0x19, 0xC0, 0xDE, 0x07, 0xB8, 0x38, 0xE1, 0x83, 0x0C, 0x1C, 0x60, 0x73, 0x01, 0x98, 0x0E, 0xC0, 0x3E, 0x00, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xFF, 0xFF, 0xF0,\n/* 'M' 0x4D */ 0xE0, 0x07, 0xE0, 0x07, 0xF0, 0x0F, 0xF0, 0x0F, 0xD0, 0x0F, 0xD8, 0x1B, 0xD8, 0x1B, 0xD8, 0x1B, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xC6, 0x63, 0xC6, 0x63, 0xC6, 0x63, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC1, 0x83,\n/* 'N' 0x4E */ 0xE0, 0x1F, 0x00, 0xFC, 0x07, 0xE0, 0x3D, 0x81, 0xEE, 0x0F, 0x30, 0x79, 0xC3, 0xC6, 0x1E, 0x18, 0xF0, 0xE7, 0x83, 0x3C, 0x1D, 0xE0, 0x6F, 0x01, 0xF8, 0x0F, 0xC0, 0x3E, 0x01, 0xC0,\n/* 'O' 0x4F */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x00, 0x18, 0xC0, 0x18, 0x78, 0x3C, 0x1F, 0xFC, 0x03, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x8F, 0xFE, 0xC0, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x06, 0xFF, 0xEF, 0xFC, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00,\n/* 'Q' 0x51 */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x01, 0x98, 0xC0, 0xFC, 0x78, 0x3C, 0x1F, 0xFF, 0x03, 0xF9, 0x80, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x0C, 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x70,\n/* 'S' 0x53 */ 0x0F, 0xE0, 0x7F, 0xC3, 0x83, 0x98, 0x07, 0x60, 0x0D, 0x80, 0x07, 0x00, 0x1E, 0x00, 0x3F, 0x80, 0x3F, 0xC0, 0x0F, 0x80, 0x07, 0xC0, 0x0F, 0x00, 0x3E, 0x00, 0xDE, 0x0E, 0x3F, 0xF0, 0x3F, 0x80,\n/* 'T' 0x54 */ 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 'U' 0x55 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x80, 0xEE, 0x0E, 0x3F, 0xE0, 0xFC, 0x00,\n/* 'V' 0x56 */ 0xC0, 0x0F, 0x00, 0x7E, 0x01, 0x98, 0x06, 0x60, 0x39, 0xC0, 0xC3, 0x03, 0x0C, 0x1C, 0x38, 0x60, 0x61, 0x81, 0x8E, 0x07, 0x30, 0x0C, 0xC0, 0x37, 0x00, 0xF8, 0x01, 0xE0, 0x07, 0x80, 0x1C, 0x00,\n/* 'W' 0x57 */ 0xE0, 0x30, 0x1D, 0x80, 0xE0, 0x76, 0x07, 0x81, 0xDC, 0x1E, 0x06, 0x70, 0x7C, 0x18, 0xC1, 0xB0, 0xE3, 0x0C, 0xC3, 0x8C, 0x33, 0x0C, 0x38, 0xC6, 0x30, 0x67, 0x18, 0xC1, 0x98, 0x67, 0x06, 0x61, 0xD8, 0x1D, 0x83, 0x60, 0x3C, 0x0D, 0x80, 0xF0, 0x3E, 0x03, 0xC0, 0x70, 0x0F, 0x01, 0xC0, 0x18, 0x07, 0x00,\n/* 'X' 0x58 */ 0xE0, 0x1D, 0x80, 0xE7, 0x03, 0x0E, 0x1C, 0x18, 0x60, 0x73, 0x00, 0xFC, 0x01, 0xE0, 0x07, 0x00, 0x1E, 0x00, 0xF8, 0x03, 0x30, 0x1C, 0xE0, 0xE1, 0x83, 0x07, 0x1C, 0x0E, 0xE0, 0x1B, 0x00, 0x70,\n/* 'Y' 0x59 */ 0xC0, 0x0F, 0x80, 0x76, 0x01, 0x9C, 0x0C, 0x38, 0x70, 0x61, 0x81, 0xCE, 0x03, 0x30, 0x0F, 0x80, 0x1E, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x03, 0x80, 0x18, 0x01, 0xC0, 0x1C, 0x00, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFF, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCF, 0xF0,\n/* '\\' 0x5C */ 0x81, 0x81, 0x02, 0x06, 0x04, 0x08, 0x18, 0x10, 0x20, 0x60, 0x40, 0x81, 0x81, 0x02, 0x06, 0x04,\n/* ']' 0x5D */ 0xFF, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xF0,\n/* '^' 0x5E */ 0x0C, 0x0E, 0x05, 0x86, 0xC3, 0x21, 0x19, 0x8C, 0x83, 0xC1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xFE,\n/* '`' 0x60 */ 0xE3, 0x8C, 0x30,\n/* 'a' 0x61 */ 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 'b' 0x62 */ 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0xF8, 0xDF, 0xCF, 0x0E, 0xE0, 0x7C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xE0, 0x6F, 0x0E, 0xDF, 0xCC, 0xF8,\n/* 'c' 0x63 */ 0x1F, 0x0F, 0xE6, 0x1F, 0x83, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x38, 0x37, 0x1C, 0xFE, 0x1F, 0x00,\n/* 'd' 0x64 */ 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x3C, 0xCF, 0xFB, 0x8F, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8F, 0x3F, 0x63, 0xCC,\n/* 'e' 0x65 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x3C, 0x07, 0xFF, 0xFF, 0xFE, 0x00, 0xC0, 0x1C, 0x0D, 0xC3, 0x1F, 0xC1, 0xF0,\n/* 'f' 0x66 */ 0x3B, 0xD8, 0xC6, 0x7F, 0xEC, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x00,\n/* 'g' 0x67 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xB1, 0xE6, 0x00, 0xC0, 0x3E, 0x0E, 0x7F, 0xC7, 0xE0,\n/* 'h' 0x68 */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x33, 0xCD, 0xFB, 0xC7, 0xE0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x30,\n/* 'i' 0x69 */ 0xF0, 0x3F, 0xFF, 0xFF, 0xF0,\n/* 'j' 0x6A */ 0x33, 0x00, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0xB8, 0xC6, 0x31, 0xCC, 0x3B, 0x06, 0xC1, 0xF0, 0x30,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'm' 0x6D */ 0xCF, 0x1F, 0x6F, 0xDF, 0xFC, 0x78, 0xFC, 0x18, 0x3C, 0x0C, 0x1E, 0x06, 0x0F, 0x03, 0x07, 0x81, 0x83, 0xC0, 0xC1, 0xE0, 0x60, 0xF0, 0x30, 0x78, 0x18, 0x3C, 0x0C, 0x18,\n/* 'n' 0x6E */ 0xCF, 0x37, 0xEF, 0x1F, 0x83, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0,\n/* 'o' 0x6F */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x1F, 0xC1, 0xF0,\n/* 'p' 0x70 */ 0xCF, 0x8D, 0xFC, 0xF0, 0xEE, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3E, 0x06, 0xF0, 0xEF, 0xFC, 0xCF, 0x8C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 'q' 0x71 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xF1, 0xE6, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60,\n/* 'r' 0x72 */ 0xCF, 0x7F, 0x38, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 's' 0x73 */ 0x3E, 0x1F, 0xEE, 0x1B, 0x00, 0xC0, 0x3C, 0x07, 0xF0, 0x3F, 0x01, 0xF0, 0x3E, 0x1D, 0xFE, 0x3F, 0x00,\n/* 't' 0x74 */ 0x63, 0x19, 0xFF, 0xB1, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0xE7,\n/* 'u' 0x75 */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x7E, 0x3D, 0xFB, 0x3C, 0xC0,\n/* 'v' 0x76 */ 0xE0, 0x6C, 0x0D, 0x81, 0xB8, 0x63, 0x0C, 0x61, 0x8E, 0x60, 0xCC, 0x19, 0x83, 0xE0, 0x3C, 0x07, 0x00, 0xE0,\n/* 'w' 0x77 */ 0xC1, 0xC1, 0xB0, 0xE1, 0xD8, 0x70, 0xCC, 0x2C, 0x66, 0x36, 0x31, 0x9B, 0x18, 0xCD, 0x98, 0x64, 0x6C, 0x16, 0x36, 0x0F, 0x1A, 0x07, 0x8F, 0x03, 0x83, 0x80, 0xC1, 0xC0,\n/* 'x' 0x78 */ 0xC1, 0xF8, 0x66, 0x30, 0xCC, 0x3E, 0x07, 0x00, 0xC0, 0x78, 0x36, 0x0C, 0xC6, 0x3B, 0x06, 0xC0, 0xC0,\n/* 'y' 0x79 */ 0xE0, 0x6C, 0x0D, 0x83, 0x38, 0x63, 0x0C, 0x63, 0x0C, 0x60, 0xCC, 0x1B, 0x03, 0x60, 0x3C, 0x07, 0x00, 0xE0, 0x18, 0x03, 0x00, 0xE0, 0x78, 0x0E, 0x00,\n/* 'z' 0x7A */ 0xFF, 0xFF, 0xF0, 0x18, 0x0C, 0x07, 0x03, 0x81, 0xC0, 0x60, 0x30, 0x18, 0x0E, 0x03, 0xFF, 0xFF, 0xC0,\n/* '{' 0x7B */ 0x19, 0xCC, 0x63, 0x18, 0xC6, 0x31, 0x99, 0x86, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x1C, 0x60,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,\n/* '}' 0x7D */ 0xC7, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x0C, 0x33, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x73, 0x00,\n/* '~' 0x7E */ 0x70, 0x3E, 0x09, 0xE4, 0x1F, 0x03, 0x80,\n/* 0x7F */\n/* 0x80 */ 0x01, 0xF0, 0x1F, 0xF0, 0xE0, 0xC7, 0x00, 0x18, 0x00, 0xC0, 0x07, 0xFF, 0x3F, 0xFC, 0x30, 0x01, 0xFF, 0x8F, 0xFC, 0x0C, 0x00, 0x18, 0x00, 0x70, 0x00, 0xE0, 0x81, 0xFE, 0x03, 0xF0,\n/* 0x81 */\n/* 0x82 */ 0xF5, 0x80,\n/* 0x83 */ 0x1C, 0xF3, 0x0C, 0x31, 0xF7, 0xCC, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x33, 0xCE, 0x00,\n/* 0x84 */ 0xCF, 0x34, 0x51, 0x88,\n/* 0x85 */ 0xC6, 0x3C, 0x63,\n/* 0x86 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x00,\n/* 0x87 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x0F, 0xFF, 0xFF, 0x0C, 0x03, 0x00, 0xC0, 0x30,\n/* 0x88 */ 0x38, 0xD9, 0xB6, 0x30,\n/* 0x89 */ 0x38, 0x18, 0x00, 0xF8, 0x30, 0x03, 0x18, 0xC0, 0x04, 0x11, 0x80, 0x0C, 0x66, 0x00, 0x0F, 0x8C, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x40, 0x00, 0x01, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x31, 0xC0, 0xE0, 0x67, 0xC3, 0xC1, 0x98, 0xCC, 0xC3, 0x20, 0x90, 0x8C, 0x63, 0x33, 0x10, 0x7C, 0x3C, 0x60, 0x70, 0x38,\n/* 0x8A */ 0x0C, 0x40, 0x1F, 0x00, 0x38, 0x03, 0xF8, 0x1F, 0xF0, 0xE0, 0xE6, 0x01, 0xD8, 0x03, 0x60, 0x01, 0xC0, 0x07, 0x80, 0x0F, 0xE0, 0x0F, 0xF0, 0x03, 0xE0, 0x01, 0xF0, 0x03, 0xC0, 0x0F, 0x80, 0x37, 0x83, 0x8F, 0xFC, 0x0F, 0xE0,\n/* 0x8B */ 0x2F, 0x49, 0x99,\n/* 0x8C */ 0x07, 0xCF, 0xFC, 0x7F, 0xFF, 0xF3, 0x83, 0xC0, 0x18, 0x07, 0x00, 0x60, 0x0C, 0x03, 0x00, 0x30, 0x0C, 0x00, 0xC0, 0x30, 0x03, 0x00, 0xC0, 0x0F, 0xFF, 0x00, 0x3F, 0xFC, 0x00, 0xC0, 0x30, 0x03, 0x00, 0xC0, 0x0C, 0x01, 0x80, 0x30, 0x07, 0x01, 0xC0, 0x0E, 0x0F, 0x00, 0x1F, 0xEF, 0xFC, 0x1F, 0x3F, 0xF0,\n/* 0x8D */\n/* 0x8E */ 0x0C, 0xC0, 0x3C, 0x00, 0xE1, 0xFF, 0xFF, 0xFF, 0x80, 0x1C, 0x01, 0xC0, 0x1C, 0x00, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x01, 0xFF, 0xFF, 0xFF, 0x80,\n/* 0x8F */\n/* 0x90 */\n/* 0x91 */ 0x6A, 0xF0,\n/* 0x92 */ 0xF5, 0x60,\n/* 0x93 */ 0x4E, 0x28, 0xA2, 0xCF, 0x30,\n/* 0x94 */ 0xCF, 0x34, 0x51, 0x4E, 0x20,\n/* 0x95 */ 0x7B, 0xFF, 0xFF, 0xFD, 0xE0,\n/* 0x96 */ 0xFF, 0xFF, 0xF0,\n/* 0x97 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 0x98 */ 0x63, 0xFE, 0x70,\n/* 0x99 */ 0xFF, 0x70, 0x1F, 0xFD, 0xC0, 0x71, 0x87, 0x83, 0xC6, 0x1E, 0x0F, 0x18, 0x68, 0x3C, 0x61, 0xB1, 0xB1, 0x86, 0xC6, 0xC6, 0x19, 0x1B, 0x18, 0x66, 0xCC, 0x61, 0x9B, 0x31, 0x86, 0x3C, 0xC6, 0x18, 0xE3, 0x18, 0x63, 0x8C,\n/* 0x9A */ 0x63, 0x0D, 0x83, 0x60, 0x70, 0x00, 0x0F, 0x87, 0xFB, 0x86, 0xC0, 0x30, 0x0F, 0x01, 0xFC, 0x0F, 0xC0, 0x7C, 0x0F, 0x87, 0x7F, 0x8F, 0xC0,\n/* 0x9B */ 0x99, 0x92, 0xF4,\n/* 0x9C */ 0x1F, 0x0F, 0x83, 0xF9, 0xFC, 0x71, 0xF8, 0x6E, 0x0F, 0x03, 0xC0, 0x60, 0x3C, 0x07, 0xFF, 0xC0, 0x7F, 0xFC, 0x06, 0x00, 0xC0, 0x60, 0x0E, 0x0F, 0x03, 0x71, 0xF8, 0x63, 0xF9, 0xFC, 0x1F, 0x0F, 0x80,\n/* 0x9D */\n/* 0x9E */ 0x63, 0x0C, 0x83, 0x60, 0x70, 0x00, 0x3F, 0xFF, 0xFC, 0x06, 0x03, 0x01, 0xC0, 0xE0, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x80, 0xFF, 0xFF, 0xF0,\n/* 0x9F */ 0x0C, 0xC0, 0x33, 0x00, 0x00, 0x30, 0x03, 0xE0, 0x1D, 0x80, 0x67, 0x03, 0x0E, 0x1C, 0x18, 0x60, 0x73, 0x80, 0xCC, 0x03, 0xE0, 0x07, 0x80, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00,\n/* 0xA0 */\n/* 0xA1 */ 0xF0, 0xBF, 0xFF, 0xFF, 0xF0,\n/* 0xA2 */ 0x04, 0x00, 0x80, 0x7C, 0x1F, 0xE7, 0x4C, 0xC8, 0xF1, 0x1E, 0x20, 0xC4, 0x18, 0x83, 0x10, 0x72, 0x37, 0x4E, 0x7F, 0x87, 0xC0, 0x20, 0x04, 0x00,\n/* 0xA3 */ 0x0F, 0xC1, 0xFE, 0x38, 0x76, 0x03, 0x60, 0x36, 0x00, 0x70, 0x03, 0x80, 0xFF, 0x0F, 0xF0, 0x1C, 0x00, 0xC0, 0x0C, 0x01, 0x80, 0x10, 0x02, 0xF1, 0x7F, 0xF6, 0x1F,\n/* 0xA4 */ 0xDD, 0xFF, 0xD8, 0xD8, 0x3C, 0x1E, 0x0F, 0x8D, 0xFF, 0xDD, 0x80,\n/* 0xA5 */ 0xC0, 0x3E, 0x06, 0x60, 0x63, 0x0C, 0x30, 0xC1, 0x98, 0x19, 0x80, 0xF0, 0x0F, 0x07, 0xFE, 0x06, 0x00, 0x60, 0x7F, 0xE0, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 0xA6 */ 0xFF, 0xFF, 0xF0, 0x3F, 0xFF, 0xFC,\n/* 0xA7 */ 0x0F, 0x03, 0xF0, 0xE7, 0x18, 0x63, 0x0C, 0x70, 0x07, 0x03, 0xF8, 0xC3, 0x98, 0x3B, 0x03, 0xF0, 0x37, 0x06, 0x78, 0xC7, 0xB0, 0x7C, 0x03, 0x80, 0x39, 0x83, 0x30, 0x67, 0x1C, 0x7F, 0x07, 0xC0,\n/* 0xA8 */ 0xCF, 0x30,\n/* 0xA9 */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xE3, 0x1C, 0x73, 0xF3, 0x99, 0x86, 0x6C, 0xC1, 0x8F, 0x30, 0x03, 0xCC, 0x00, 0xF3, 0x00, 0x3C, 0xC1, 0x8D, 0x98, 0x66, 0x77, 0xF3, 0x8E, 0x79, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAA */ 0x79, 0x08, 0x11, 0xEE, 0x50, 0xA3, 0x3B, 0x00, 0x03, 0xF8,\n/* 0xAB */ 0x21, 0x63, 0xE7, 0x84, 0x84, 0xE7, 0x63, 0x21,\n/* 0xAC */ 0xFF, 0xFF, 0xFF, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03,\n/* 0xAD */ 0xFF, 0xF0,\n/* 0xAE */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xFF, 0x1C, 0x7F, 0xF3, 0x9B, 0x04, 0x6C, 0xC1, 0x8F, 0x30, 0x43, 0xCF, 0xF0, 0xF3, 0xFC, 0x3C, 0xC1, 0x0D, 0xB0, 0x66, 0x7C, 0x1B, 0x8F, 0x07, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAF */ 0xFF, 0xF0,\n/* 0xB0 */ 0x38, 0xFB, 0x1C, 0x18, 0x38, 0xDF, 0x1C,\n/* 0xB1 */ 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x7F, 0xE7, 0xFE, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xB2 */ 0x7D, 0x8F, 0x18, 0x30, 0xC6, 0x18, 0x60, 0xFF, 0xFC,\n/* 0xB3 */ 0x7D, 0x8F, 0x18, 0x31, 0x80, 0xC1, 0xE3, 0xC6, 0xF8,\n/* 0xB4 */ 0x3B, 0x99, 0x80,\n/* 0xB5 */ 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x1C, 0xE3, 0xCF, 0xEF, 0xFC, 0x7C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 0xB6 */ 0x1F, 0xE7, 0xFD, 0xF3, 0x7E, 0x6F, 0xCD, 0xF9, 0xBF, 0x37, 0xE6, 0x7C, 0xCF, 0x98, 0xF3, 0x06, 0x60, 0xCC, 0x19, 0x83, 0x30, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x60, 0xCC,\n/* 0xB7 */ 0xF0,\n/* 0xB8 */ 0x10, 0xF0, 0xE3, 0x78,\n/* 0xB9 */ 0x2F, 0xB6, 0xDB, 0x6C,\n/* 0xBA */ 0x79, 0x38, 0x61, 0x86, 0x1C, 0xDE, 0x00, 0x0F, 0xC0,\n/* 0xBB */ 0x88, 0xC6, 0xE7, 0x21, 0x21, 0xE7, 0xC6, 0x88,\n/* 0xBC */ 0x20, 0x08, 0x30, 0x0C, 0x38, 0x04, 0x0C, 0x06, 0x06, 0x02, 0x03, 0x02, 0x01, 0x81, 0x00, 0xC1, 0x06, 0x61, 0x87, 0x30, 0x83, 0x80, 0xC2, 0xC0, 0x42, 0x60, 0x43, 0x30, 0x21, 0xFC, 0x20, 0x0C, 0x30, 0x06, 0x10, 0x03, 0x00,\n/* 0xBD */ 0x20, 0x00, 0x08, 0x02, 0x06, 0x01, 0x83, 0x80, 0x40, 0x60, 0x20, 0x18, 0x18, 0x06, 0x04, 0x01, 0x83, 0x00, 0x61, 0x9F, 0x98, 0x4E, 0x76, 0x33, 0x0C, 0x08, 0x03, 0x04, 0x03, 0x83, 0x01, 0x80, 0x81, 0x80, 0x60, 0xC0, 0x30, 0x3F, 0xC8, 0x0F, 0xF0,\n/* 0xBE */ 0x7C, 0x00, 0x18, 0xC0, 0x43, 0x18, 0x18, 0x03, 0x02, 0x00, 0x60, 0xC0, 0x30, 0x10, 0x01, 0x84, 0x00, 0x31, 0x80, 0xC6, 0x20, 0xD8, 0xC8, 0x39, 0xF1, 0x07, 0x00, 0x41, 0x60, 0x18, 0x4C, 0x02, 0x11, 0x80, 0x83, 0xF8, 0x10, 0x06, 0x04, 0x00, 0xC1, 0x00, 0x18,\n/* 0xBF */ 0x0C, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x60, 0x30, 0x30, 0x38, 0x38, 0x18, 0x0C, 0x06, 0x0F, 0x07, 0xC7, 0x7F, 0x1F, 0x00,\n/* 0xC0 */ 0x0C, 0x00, 0x18, 0x00, 0x30, 0x00, 0x00, 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC1 */ 0x01, 0xC0, 0x0C, 0x00, 0x20, 0x00, 0x00, 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC2 */ 0x07, 0x00, 0x3E, 0x01, 0x8C, 0x00, 0x00, 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC3 */ 0x0E, 0x40, 0x7F, 0x01, 0x98, 0x00, 0x00, 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 0xC4 */ 0x0C, 0xC0, 0x33, 0x00, 0x00, 0x01, 0xE0, 0x07, 0x80, 0x1E, 0x00, 0xFC, 0x03, 0x30, 0x0C, 0xC0, 0x73, 0x81, 0x86, 0x06, 0x18, 0x38, 0x70, 0xC0, 0xC3, 0xFF, 0x1F, 0xFE, 0x60, 0x19, 0x80, 0x6E, 0x01, 0xF0, 0x03, 0xC0, 0x0C,\n/* 0xC5 */ 0x03, 0x00, 0x1E, 0x00, 0xEC, 0x03, 0x30, 0x0F, 0xC0, 0x1E, 0x00, 0x78, 0x01, 0xE0, 0x07, 0x80, 0x3F, 0x00, 0xCC, 0x03, 0x30, 0x1C, 0xE0, 0x61, 0x81, 0x86, 0x0E, 0x1C, 0x30, 0x30, 0xFF, 0xC7, 0xFF, 0x98, 0x06, 0x60, 0x1B, 0x80, 0x7C, 0x00, 0xF0, 0x03,\n/* 0xC6 */ 0x01, 0xFF, 0xFC, 0x07, 0xFF, 0xF0, 0x31, 0x80, 0x00, 0xC6, 0x00, 0x07, 0x18, 0x00, 0x18, 0x60, 0x00, 0x61, 0x80, 0x03, 0x86, 0x00, 0x0C, 0x1F, 0xF8, 0x70, 0x7F, 0xE1, 0x81, 0x80, 0x07, 0xFE, 0x00, 0x3F, 0xF8, 0x00, 0xC0, 0x60, 0x07, 0x01, 0x80, 0x1C, 0x06, 0x00, 0x60, 0x1F, 0xFF, 0x80, 0x7F, 0xF0,\n/* 0xC7 */ 0x07, 0xE0, 0x3F, 0xF0, 0xE0, 0x73, 0x80, 0x66, 0x00, 0x7C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x01, 0xDC, 0x03, 0x1C, 0x1E, 0x1F, 0xF8, 0x0F, 0xC0, 0x08, 0x00, 0x1E, 0x00, 0x0C, 0x01, 0x18, 0x01, 0xE0, 0x00,\n/* 0xC8 */ 0x1C, 0x00, 0xC0, 0x02, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 0xC9 */ 0x07, 0x00, 0x60, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 0xCA */ 0x0E, 0x01, 0xF0, 0x31, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 0xCB */ 0x19, 0x81, 0x98, 0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFE, 0xFF, 0xEC, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xCC */ 0xE7, 0x10, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,\n/* 0xCD */ 0x36, 0xC0, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,\n/* 0xCE */ 0x39, 0xFC, 0x40, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 0xCF */ 0xC7, 0x8C, 0x01, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x00,\n/* 0xD0 */ 0x7F, 0xE0, 0xFF, 0xE1, 0x80, 0xE3, 0x00, 0xE6, 0x00, 0xCC, 0x01, 0xD8, 0x01, 0xB0, 0x03, 0xFE, 0x07, 0xFC, 0x0D, 0x80, 0x1B, 0x00, 0x36, 0x00, 0x6C, 0x01, 0x98, 0x07, 0x30, 0x1C, 0x7F, 0xF0, 0xFF, 0xC0,\n/* 0xD1 */ 0x08, 0xC0, 0xFE, 0x05, 0xE0, 0x00, 0x0E, 0x01, 0xF0, 0x0F, 0xC0, 0x7E, 0x03, 0xD8, 0x1E, 0xE0, 0xF3, 0x07, 0x9C, 0x3C, 0x61, 0xE1, 0x8F, 0x0E, 0x78, 0x33, 0xC1, 0xDE, 0x06, 0xF0, 0x1F, 0x80, 0xFC, 0x03, 0xE0, 0x1C,\n/* 0xD2 */ 0x07, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xFF, 0xE0, 0xF0, 0x78, 0x60, 0x0C, 0x60, 0x03, 0x30, 0x01, 0xB0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0x80, 0x03, 0x60, 0x03, 0x30, 0x01, 0x8C, 0x01, 0x87, 0x83, 0xC1, 0xFF, 0xC0, 0x3F, 0x80,\n/* 0xD3 */ 0x00, 0xE0, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xFF, 0xE0, 0xF0, 0x78, 0x60, 0x0C, 0x60, 0x03, 0x30, 0x01, 0xB0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0x80, 0x03, 0x60, 0x03, 0x30, 0x01, 0x8C, 0x01, 0x87, 0x83, 0xC1, 0xFF, 0xC0, 0x3F, 0x80,\n/* 0xD4 */ 0x03, 0xC0, 0x01, 0xE0, 0x01, 0x98, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xFF, 0xE0, 0xF0, 0x78, 0x60, 0x0C, 0x60, 0x03, 0x30, 0x01, 0xB0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0x80, 0x03, 0x60, 0x03, 0x30, 0x01, 0x8C, 0x01, 0x87, 0x83, 0xC1, 0xFF, 0xC0, 0x3F, 0x80,\n/* 0xD5 */ 0x07, 0x20, 0x03, 0xF0, 0x01, 0x38, 0x00, 0x00, 0x00, 0x7F, 0x00, 0xFF, 0xE0, 0xF0, 0x78, 0x60, 0x0C, 0x60, 0x03, 0x30, 0x01, 0xB0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x07, 0x80, 0x03, 0x60, 0x03, 0x30, 0x01, 0x8C, 0x01, 0x87, 0x83, 0xC1, 0xFF, 0xC0, 0x3F, 0x80,\n/* 0xD6 */ 0x06, 0x30, 0x03, 0x18, 0x00, 0x00, 0x00, 0xFE, 0x01, 0xFF, 0xC1, 0xE0, 0xF0, 0xC0, 0x18, 0xC0, 0x06, 0x60, 0x03, 0x60, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x3C, 0x00, 0x1E, 0x00, 0x0F, 0x00, 0x06, 0xC0, 0x06, 0x60, 0x03, 0x18, 0x03, 0x0F, 0x07, 0x83, 0xFF, 0x80, 0x7F, 0x00,\n/* 0xD7 */ 0x81, 0xC3, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0xC3, 0x81,\n/* 0xD8 */ 0x07, 0xF0, 0x8F, 0xFE, 0x8F, 0x07, 0xC6, 0x00, 0xE6, 0x00, 0xF3, 0x00, 0xDF, 0x00, 0xC7, 0x80, 0xC3, 0xC0, 0xC1, 0xE0, 0xC0, 0xF0, 0xC0, 0x78, 0xC0, 0x3E, 0xC0, 0x33, 0xC0, 0x19, 0xC0, 0x1C, 0xF8, 0x3C, 0xDF, 0xF8, 0x43, 0xF8, 0x00,\n/* 0xD9 */ 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x0C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF8, 0x0E, 0xE0, 0xE3, 0xFE, 0x0F, 0xC0,\n/* 0xDA */ 0x03, 0x80, 0x18, 0x01, 0x80, 0x00, 0x0C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF8, 0x0E, 0xE0, 0xE3, 0xFE, 0x0F, 0xC0,\n/* 0xDB */ 0x07, 0x00, 0x7C, 0x06, 0x20, 0x00, 0x0C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF8, 0x0E, 0xE0, 0xE3, 0xFE, 0x0F, 0xC0,\n/* 0xDC */ 0x0C, 0xC0, 0x66, 0x00, 0x01, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1F, 0x01, 0xDC, 0x1C, 0x7F, 0xC1, 0xF8, 0x00,\n/* 0xDD */ 0x01, 0x80, 0x0C, 0x00, 0x60, 0x00, 0x00, 0xC0, 0x0F, 0x80, 0x76, 0x01, 0x9C, 0x0C, 0x38, 0x70, 0x61, 0x81, 0xCE, 0x03, 0x30, 0x0F, 0x80, 0x1E, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 0xDE */ 0xC0, 0x0C, 0x00, 0xC0, 0x0F, 0xF8, 0xFF, 0xEC, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x6F, 0xFE, 0xFF, 0x8C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00,\n/* 0xDF */ 0x1F, 0x0F, 0xF3, 0x87, 0x60, 0x6C, 0x0D, 0x81, 0xB0, 0x66, 0x38, 0xC7, 0xD8, 0x1B, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x3E, 0x0E, 0xCF, 0x99, 0xE0,\n/* 0xE0 */ 0x1C, 0x00, 0xC0, 0x06, 0x00, 0x20, 0x00, 0x03, 0xF0, 0x7F, 0x8E, 0x1C, 0xC0, 0xC0, 0x0C, 0x01, 0xC3, 0xFC, 0xF8, 0xCC, 0x0C, 0xC0, 0xCE, 0x3C, 0x7E, 0xF3, 0xC7,\n/* 0xE1 */ 0x07, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x00, 0x03, 0xF0, 0x7F, 0x8E, 0x1C, 0xC0, 0xC0, 0x0C, 0x01, 0xC3, 0xFC, 0xF8, 0xCC, 0x0C, 0xC0, 0xCE, 0x3C, 0x7E, 0xF3, 0xC7,\n/* 0xE2 */ 0x0C, 0x01, 0xE0, 0x1B, 0x03, 0x30, 0x00, 0x03, 0xF0, 0x7F, 0x8E, 0x1C, 0xC0, 0xC0, 0x0C, 0x01, 0xC3, 0xFC, 0xF8, 0xCC, 0x0C, 0xC0, 0xCE, 0x3C, 0x7E, 0xF3, 0xC7,\n/* 0xE3 */ 0x19, 0x83, 0xF0, 0x27, 0x00, 0x00, 0x00, 0x03, 0xF0, 0x7F, 0x8E, 0x1C, 0xC0, 0xC0, 0x0C, 0x01, 0xC3, 0xFC, 0xF8, 0xCC, 0x0C, 0xC0, 0xCE, 0x3C, 0x7E, 0xF3, 0xC7,\n/* 0xE4 */ 0x19, 0x81, 0x98, 0x00, 0x00, 0x00, 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 0xE5 */ 0x0E, 0x01, 0xF0, 0x1B, 0x81, 0xB8, 0x1F, 0x00, 0xE0, 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 0xE6 */ 0x3F, 0x1F, 0x0F, 0xF7, 0xF3, 0x87, 0xC3, 0x60, 0x70, 0x30, 0x0C, 0x06, 0x3F, 0xFF, 0xDF, 0xFF, 0xFF, 0x06, 0x00, 0xC0, 0xC0, 0x18, 0x3C, 0x0F, 0x8F, 0xC7, 0x3F, 0x9F, 0xE3, 0xC1, 0xF0,\n/* 0xE7 */ 0x1F, 0x0F, 0xE7, 0x1D, 0x83, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x38, 0x37, 0x1C, 0xFE, 0x1F, 0x02, 0x00, 0xE0, 0x0C, 0x23, 0x07, 0x80,\n/* 0xE8 */ 0x1C, 0x01, 0x80, 0x18, 0x01, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0x78, 0x0F, 0xFF, 0xFF, 0xFC, 0x01, 0x80, 0x38, 0x1B, 0x86, 0x3F, 0x83, 0xE0,\n/* 0xE9 */ 0x03, 0x00, 0xC0, 0x30, 0x04, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0x78, 0x0F, 0xFF, 0xFF, 0xFC, 0x01, 0x80, 0x38, 0x1B, 0x86, 0x3F, 0x83, 0xE0,\n/* 0xEA */ 0x0C, 0x03, 0xC0, 0x6C, 0x18, 0x80, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0x78, 0x0F, 0xFF, 0xFF, 0xFC, 0x01, 0x80, 0x38, 0x1B, 0x86, 0x3F, 0x83, 0xE0,\n/* 0xEB */ 0x31, 0x86, 0x30, 0x00, 0x00, 0x01, 0xF0, 0x7F, 0x1C, 0x77, 0x03, 0xC0, 0x7F, 0xFF, 0xFF, 0xE0, 0x0C, 0x01, 0xC0, 0xDC, 0x31, 0xFC, 0x1F, 0x00,\n/* 0xEC */ 0xC6, 0x31, 0x06, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,\n/* 0xED */ 0x39, 0x99, 0x80, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x80,\n/* 0xEE */ 0x71, 0xED, 0xA3, 0x00, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 0xEF */ 0xCF, 0x30, 0x00, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30,\n/* 0xF0 */ 0x20, 0x07, 0xE0, 0x70, 0x3B, 0x00, 0x30, 0x3F, 0x0F, 0xF3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF1 */ 0x19, 0x8F, 0xE2, 0x70, 0x00, 0x00, 0x33, 0xCD, 0xFB, 0xC7, 0xE0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x30,\n/* 0xF2 */ 0x1C, 0x01, 0x80, 0x18, 0x01, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF3 */ 0x07, 0x00, 0xC0, 0x30, 0x04, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF4 */ 0x0C, 0x03, 0xC0, 0xD8, 0x19, 0x80, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF5 */ 0x19, 0x87, 0xE0, 0x9C, 0x00, 0x00, 0x00, 0x3E, 0x0F, 0xE3, 0x8E, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8E, 0x3F, 0x83, 0xE0,\n/* 0xF6 */ 0x31, 0x86, 0x30, 0x00, 0x00, 0x01, 0xF0, 0x7F, 0x1C, 0x77, 0x07, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0xC1, 0xDC, 0x71, 0xFC, 0x1F, 0x00,\n/* 0xF7 */ 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00,\n/* 0xF8 */ 0x1F, 0x27, 0xF5, 0xC7, 0x70, 0x7C, 0x17, 0x84, 0xF1, 0x1E, 0x43, 0xD0, 0x7C, 0x1D, 0xC7, 0x3F, 0xC9, 0xF0,\n/* 0xF9 */ 0x18, 0x03, 0x00, 0x60, 0x08, 0x00, 0x30, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x1F, 0x8F, 0x7E, 0xCF, 0x30,\n/* 0xFA */ 0x03, 0x01, 0x80, 0x60, 0x30, 0x00, 0x30, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x1F, 0x8F, 0x7E, 0xCF, 0x30,\n/* 0xFB */ 0x0C, 0x07, 0x81, 0x20, 0xCC, 0x00, 0x30, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x1F, 0x8F, 0x7E, 0xCF, 0x30,\n/* 0xFC */ 0x31, 0x8C, 0x60, 0x00, 0x00, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x7E, 0x3D, 0xFB, 0x3C, 0xC0,\n/* 0xFD */ 0x03, 0x80, 0x60, 0x18, 0x06, 0x00, 0x01, 0xC0, 0xD8, 0x1B, 0x06, 0x70, 0xC6, 0x18, 0xC6, 0x18, 0xC1, 0x98, 0x36, 0x06, 0xC0, 0x78, 0x0E, 0x01, 0xC0, 0x30, 0x06, 0x01, 0xC0, 0xF0, 0x1C, 0x00,\n/* 0xFE */ 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xCF, 0x8F, 0xFC, 0xF0, 0xEE, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3E, 0x06, 0xF0, 0xEF, 0xFC, 0xCF, 0x8C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 0xFF */ 0x19, 0x83, 0x30, 0x00, 0x00, 0x0E, 0x06, 0xC0, 0xD8, 0x33, 0x86, 0x30, 0xC6, 0x30, 0xC6, 0x0C, 0xC1, 0xB0, 0x36, 0x03, 0xC0, 0x70, 0x0E, 0x01, 0x80, 0x30, 0x0E, 0x07, 0x80, 0xE0, 0x00,\n};\n\nconst GFXglyph FreeSans12pt_Win1252Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   19,  20,  21,   1,  -17 },\n/* 0x02 */ {    48,   19,  20,  21,   1,  -17 },\n/* 0x03 */ {    96,   21,  20,  23,   1,  -17 },\n/* 0x04 */ {   149,   21,  20,  23,   1,  -17 },\n/* 0x05 */ {   202,   20,  20,  22,   1,  -17 },\n/* 0x06 */ {   252,   20,  20,  22,   1,  -17 },\n/* 0x07 */ {   302,    0,   0,   8,   0,    0 },\n/* 0x08 */ {   302,   23,  20,  25,   1,  -17 },\n/* 0x09 */ {   360,   23,  16,  25,   1,  -16 },\n/* 0x0A */ {   406,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   406,   21,  20,  23,   1,  -17 },\n/* 0x0C */ {   459,   19,  18,  21,   1,  -15 },\n/* 0x0D */ {   502,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   502,   20,  20,  22,   1,  -17 },\n/* 0x0F */ {   552,   21,  21,  23,   1,  -18 },\n/* 0x10 */ {   608,   19,  20,  21,   1,  -17 },\n/* 0x11 */ {   656,   21,  20,  23,   1,  -17 },\n/* 0x12 */ {   709,   20,  20,  22,   1,  -17 },\n/* 0x13 */ {   759,   21,  20,  23,   1,  -17 },\n/* 0x14 */ {   812,   21,  20,  23,   1,  -17 },\n/* 0x15 */ {   865,   22,  20,  24,   1,  -17 },\n/* 0x16 */ {   920,   16,  20,  18,   1,  -17 },\n/* 0x17 */ {   960,   21,  20,  23,   1,  -17 },\n/* 0x18 */ {  1013,   23,  20,  25,   1,  -17 },\n/* 0x19 */ {  1071,   21,  20,  23,   1,  -17 },\n/* 0x1A */ {  1124,   15,  19,  17,   1,  -16 },\n/* 0x1B */ {  1160,   24,  21,  26,   1,  -18 },\n/* 0x1C */ {  1223,   21,  20,  23,   1,  -17 },\n/* 0x1D */ {  1276,   21,  21,  23,   1,  -18 },\n/* 0x1E */ {  1332,   20,  20,  22,   1,  -17 },\n/* 0x1F */ {  1382,   15,  20,  17,   1,  -17 },\n/* ' ' 0x20 */ {  1420,    0,   0,   6,   0,    0 },\n/* '!' 0x21 */ {  1420,    2,  18,   8,   3,  -16 },\n/* '\"' 0x22 */ {  1425,    6,   6,   8,   1,  -15 },\n/* '#' 0x23 */ {  1430,   13,  16,  13,   0,  -14 },\n/* '$' 0x24 */ {  1456,   11,  20,  13,   1,  -16 },\n/* '%' 0x25 */ {  1484,   20,  17,  21,   1,  -15 },\n/* '&' 0x26 */ {  1527,   14,  17,  16,   1,  -15 },\n/* ''' 0x27 */ {  1557,    2,   6,   5,   1,  -15 },\n/* '(' 0x28 */ {  1559,    5,  23,   8,   2,  -16 },\n/* ')' 0x29 */ {  1574,    5,  23,   8,   1,  -16 },\n/* '*' 0x2A */ {  1589,    7,   7,   9,   1,  -16 },\n/* '+' 0x2B */ {  1596,   10,  11,  14,   2,   -9 },\n/* ',' 0x2C */ {  1610,    2,   6,   7,   2,    0 },\n/* '-' 0x2D */ {  1612,    6,   2,   8,   1,   -6 },\n/* '.' 0x2E */ {  1614,    2,   2,   6,   2,    0 },\n/* '/' 0x2F */ {  1615,    7,  18,   7,   0,  -16 },\n/* '0' 0x30 */ {  1631,   11,  17,  13,   1,  -15 },\n/* '1' 0x31 */ {  1655,    5,  17,  13,   3,  -15 },\n/* '2' 0x32 */ {  1666,   11,  17,  13,   1,  -15 },\n/* '3' 0x33 */ {  1690,   11,  17,  13,   1,  -15 },\n/* '4' 0x34 */ {  1714,   11,  17,  13,   1,  -15 },\n/* '5' 0x35 */ {  1738,   11,  17,  13,   1,  -15 },\n/* '6' 0x36 */ {  1762,   11,  17,  13,   1,  -15 },\n/* '7' 0x37 */ {  1786,   11,  17,  13,   1,  -15 },\n/* '8' 0x38 */ {  1810,   11,  17,  13,   1,  -15 },\n/* '9' 0x39 */ {  1834,   11,  17,  13,   1,  -15 },\n/* ':' 0x3A */ {  1858,    2,  13,   6,   2,  -11 },\n/* ';' 0x3B */ {  1862,    2,  16,   6,   2,  -10 },\n/* '<' 0x3C */ {  1866,   12,  11,  14,   1,   -9 },\n/* '=' 0x3D */ {  1883,   12,   6,  14,   1,   -7 },\n/* '>' 0x3E */ {  1892,   12,  11,  14,   1,   -9 },\n/* '?' 0x3F */ {  1909,   10,  18,  13,   2,  -16 },\n/* '@' 0x40 */ {  1932,   22,  21,  24,   1,  -16 },\n/* 'A' 0x41 */ {  1990,   14,  18,  16,   1,  -16 },\n/* 'B' 0x42 */ {  2022,   13,  18,  16,   2,  -16 },\n/* 'C' 0x43 */ {  2052,   15,  18,  17,   1,  -16 },\n/* 'D' 0x44 */ {  2086,   14,  18,  17,   2,  -16 },\n/* 'E' 0x45 */ {  2118,   12,  18,  15,   2,  -16 },\n/* 'F' 0x46 */ {  2145,   11,  18,  14,   2,  -16 },\n/* 'G' 0x47 */ {  2170,   16,  18,  18,   1,  -16 },\n/* 'H' 0x48 */ {  2206,   13,  18,  17,   2,  -16 },\n/* 'I' 0x49 */ {  2236,    2,  18,   7,   2,  -16 },\n/* 'J' 0x4A */ {  2241,    9,  18,  13,   1,  -16 },\n/* 'K' 0x4B */ {  2262,   13,  18,  16,   2,  -16 },\n/* 'L' 0x4C */ {  2292,   10,  18,  14,   2,  -16 },\n/* 'M' 0x4D */ {  2315,   16,  18,  20,   2,  -16 },\n/* 'N' 0x4E */ {  2351,   13,  18,  18,   2,  -16 },\n/* 'O' 0x4F */ {  2381,   17,  18,  19,   1,  -16 },\n/* 'P' 0x50 */ {  2420,   12,  18,  16,   2,  -16 },\n/* 'Q' 0x51 */ {  2447,   17,  19,  19,   1,  -16 },\n/* 'R' 0x52 */ {  2488,   14,  18,  17,   2,  -16 },\n/* 'S' 0x53 */ {  2520,   14,  18,  16,   1,  -16 },\n/* 'T' 0x54 */ {  2552,   12,  18,  15,   1,  -16 },\n/* 'U' 0x55 */ {  2579,   13,  18,  17,   2,  -16 },\n/* 'V' 0x56 */ {  2609,   14,  18,  15,   1,  -16 },\n/* 'W' 0x57 */ {  2641,   22,  18,  22,   0,  -16 },\n/* 'X' 0x58 */ {  2691,   14,  18,  16,   1,  -16 },\n/* 'Y' 0x59 */ {  2723,   14,  18,  16,   1,  -16 },\n/* 'Z' 0x5A */ {  2755,   13,  18,  15,   1,  -16 },\n/* '[' 0x5B */ {  2785,    4,  23,   7,   2,  -16 },\n/* '\\' 0x5C */ {  2797,    7,  18,   7,   0,  -16 },\n/* ']' 0x5D */ {  2813,    4,  23,   7,   1,  -16 },\n/* '^' 0x5E */ {  2825,    9,   9,  11,   1,  -15 },\n/* '_' 0x5F */ {  2836,   15,   1,  13,  -1,    5 },\n/* '`' 0x60 */ {  2838,    5,   4,   6,   1,  -16 },\n/* 'a' 0x61 */ {  2841,   12,  13,  13,   1,  -11 },\n/* 'b' 0x62 */ {  2861,   12,  18,  13,   1,  -16 },\n/* 'c' 0x63 */ {  2888,   10,  13,  12,   1,  -11 },\n/* 'd' 0x64 */ {  2905,   11,  18,  13,   1,  -16 },\n/* 'e' 0x65 */ {  2930,   11,  13,  13,   1,  -11 },\n/* 'f' 0x66 */ {  2948,    5,  18,   7,   1,  -16 },\n/* 'g' 0x67 */ {  2960,   11,  18,  13,   1,  -11 },\n/* 'h' 0x68 */ {  2985,   10,  18,  13,   1,  -16 },\n/* 'i' 0x69 */ {  3008,    2,  18,   5,   2,  -16 },\n/* 'j' 0x6A */ {  3013,    4,  23,   6,   0,  -16 },\n/* 'k' 0x6B */ {  3025,   10,  18,  12,   1,  -16 },\n/* 'l' 0x6C */ {  3048,    2,  18,   5,   1,  -16 },\n/* 'm' 0x6D */ {  3053,   17,  13,  19,   1,  -11 },\n/* 'n' 0x6E */ {  3081,   10,  13,  13,   1,  -11 },\n/* 'o' 0x6F */ {  3098,   11,  13,  13,   1,  -11 },\n/* 'p' 0x70 */ {  3116,   12,  17,  13,   1,  -11 },\n/* 'q' 0x71 */ {  3142,   11,  17,  13,   1,  -11 },\n/* 'r' 0x72 */ {  3166,    6,  13,   8,   1,  -11 },\n/* 's' 0x73 */ {  3176,   10,  13,  12,   1,  -11 },\n/* 't' 0x74 */ {  3193,    5,  16,   7,   1,  -14 },\n/* 'u' 0x75 */ {  3203,   10,  13,  13,   1,  -11 },\n/* 'v' 0x76 */ {  3220,   11,  13,  12,   0,  -11 },\n/* 'w' 0x77 */ {  3238,   17,  13,  17,   0,  -11 },\n/* 'x' 0x78 */ {  3266,   10,  13,  11,   1,  -11 },\n/* 'y' 0x79 */ {  3283,   11,  18,  11,   0,  -11 },\n/* 'z' 0x7A */ {  3308,   10,  13,  12,   1,  -11 },\n/* '{' 0x7B */ {  3325,    5,  23,   8,   1,  -16 },\n/* '|' 0x7C */ {  3340,    2,  23,   6,   2,  -16 },\n/* '}' 0x7D */ {  3346,    5,  23,   8,   2,  -16 },\n/* '~' 0x7E */ {  3361,   10,   5,  12,   1,   -9 },\n/* 0x7F */ {  3368,    0,   0,   0,   0,    0 },\n/* 0x80 */ {  3368,   14,  17,  16,   1,  -15 },\n/* 0x81 */ {  3398,    0,   0,   8,   0,    0 },\n/* 0x82 */ {  3398,    2,   5,   6,   2,    0 },\n/* 0x83 */ {  3400,    6,  23,   7,   0,  -16 },\n/* 0x84 */ {  3418,    6,   5,  10,   2,    0 },\n/* 0x85 */ {  3422,   12,   2,  16,   2,    0 },\n/* 0x86 */ {  3425,   10,  21,  13,   2,  -15 },\n/* 0x87 */ {  3452,   10,  20,  13,   2,  -15 },\n/* 0x88 */ {  3477,    7,   4,   8,   0,  -16 },\n/* 0x89 */ {  3481,   23,  18,  24,   0,  -16 },\n/* 0x8A */ {  3533,   14,  21,  16,   1,  -19 },\n/* 0x8B */ {  3570,    3,   8,   6,   1,   -9 },\n/* 0x8C */ {  3573,   22,  18,  24,   1,  -16 },\n/* 0x8D */ {  3623,    0,   0,   8,   0,    0 },\n/* 0x8E */ {  3623,   13,  21,  15,   1,  -19 },\n/* 0x8F */ {  3658,    0,   0,   8,   0,    0 },\n/* 0x90 */ {  3658,    0,   0,   8,   0,    0 },\n/* 0x91 */ {  3658,    2,   6,   6,   2,  -16 },\n/* 0x92 */ {  3660,    2,   6,   6,   2,  -16 },\n/* 0x93 */ {  3662,    6,   6,  10,   2,  -16 },\n/* 0x94 */ {  3667,    6,   6,  10,   2,  -16 },\n/* 0x95 */ {  3672,    6,   6,  10,   2,   -9 },\n/* 0x96 */ {  3677,   10,   2,  12,   1,   -6 },\n/* 0x97 */ {  3680,   22,   2,  24,   1,   -6 },\n/* 0x98 */ {  3686,    7,   3,   8,   0,  -16 },\n/* 0x99 */ {  3689,   22,  13,  24,   2,  -16 },\n/* 0x9A */ {  3725,   10,  18,  12,   1,  -16 },\n/* 0x9B */ {  3748,    3,   8,   6,   2,   -8 },\n/* 0x9C */ {  3751,   20,  13,  22,   1,  -11 },\n/* 0x9D */ {  3784,    0,   0,   8,   0,    0 },\n/* 0x9E */ {  3784,   10,  18,  12,   1,  -16 },\n/* 0x9F */ {  3807,   14,  21,  16,   1,  -19 },\n/* 0xA0 */ {  3844,    0,   0,   7,   0,    0 },\n/* 0xA1 */ {  3844,    2,  18,   8,   3,  -11 },\n/* 0xA2 */ {  3849,   11,  17,  13,   1,  -13 },\n/* 0xA3 */ {  3873,   12,  18,  13,   0,  -16 },\n/* 0xA4 */ {  3900,    9,   9,  13,   2,  -11 },\n/* 0xA5 */ {  3911,   12,  17,  13,   1,  -15 },\n/* 0xA6 */ {  3937,    2,  23,   6,   2,  -16 },\n/* 0xA7 */ {  3943,   11,  23,  13,   1,  -16 },\n/* 0xA8 */ {  3975,    6,   2,   8,   1,  -15 },\n/* 0xA9 */ {  3977,   18,  17,  19,   1,  -15 },\n/* 0xAA */ {  4016,    7,  11,   9,   1,  -16 },\n/* 0xAB */ {  4026,    8,   8,  12,   2,   -9 },\n/* 0xAC */ {  4034,   12,   6,  14,   1,   -7 },\n/* 0xAD */ {  4043,    6,   2,   8,   1,   -6 },\n/* 0xAE */ {  4045,   18,  17,  19,   1,  -15 },\n/* 0xAF */ {  4084,    6,   2,   8,   1,  -15 },\n/* 0xB0 */ {  4086,    7,   8,  15,   4,  -15 },\n/* 0xB1 */ {  4093,   12,  15,  14,   1,  -13 },\n/* 0xB2 */ {  4116,    7,  10,   8,   1,  -17 },\n/* 0xB3 */ {  4125,    7,  10,   8,   1,  -17 },\n/* 0xB4 */ {  4134,    5,   4,   8,   2,  -16 },\n/* 0xB5 */ {  4137,   12,  17,  13,   2,  -11 },\n/* 0xB6 */ {  4163,   11,  21,  13,   2,  -16 },\n/* 0xB7 */ {  4192,    2,   2,   6,   2,   -6 },\n/* 0xB8 */ {  4193,    6,   5,   8,   1,    2 },\n/* 0xB9 */ {  4197,    3,  10,   8,   3,  -18 },\n/* 0xBA */ {  4201,    6,  11,   9,   1,  -16 },\n/* 0xBB */ {  4210,    8,   8,  12,   2,   -8 },\n/* 0xBC */ {  4218,   17,  17,  21,   3,  -15 },\n/* 0xBD */ {  4255,   18,  18,  21,   3,  -16 },\n/* 0xBE */ {  4296,   19,  18,  21,   1,  -16 },\n/* 0xBF */ {  4339,    9,  18,  13,   3,  -11 },\n/* 0xC0 */ {  4360,   14,  22,  16,   1,  -20 },\n/* 0xC1 */ {  4399,   14,  22,  16,   1,  -20 },\n/* 0xC2 */ {  4438,   14,  22,  16,   1,  -20 },\n/* 0xC3 */ {  4477,   14,  22,  16,   1,  -20 },\n/* 0xC4 */ {  4516,   14,  21,  16,   1,  -19 },\n/* 0xC5 */ {  4553,   14,  24,  16,   1,  -22 },\n/* 0xC6 */ {  4595,   22,  18,  24,   0,  -16 },\n/* 0xC7 */ {  4645,   15,  23,  17,   1,  -16 },\n/* 0xC8 */ {  4689,   12,  22,  15,   2,  -20 },\n/* 0xC9 */ {  4722,   12,  22,  15,   2,  -20 },\n/* 0xCA */ {  4755,   12,  22,  15,   2,  -20 },\n/* 0xCB */ {  4788,   12,  21,  15,   2,  -19 },\n/* 0xCC */ {  4820,    4,  22,   7,   0,  -20 },\n/* 0xCD */ {  4831,    4,  22,   7,   1,  -20 },\n/* 0xCE */ {  4842,    6,  22,   7,   0,  -20 },\n/* 0xCF */ {  4859,    7,  21,   7,   0,  -19 },\n/* 0xD0 */ {  4878,   15,  18,  17,   1,  -16 },\n/* 0xD1 */ {  4912,   13,  22,  18,   2,  -20 },\n/* 0xD2 */ {  4948,   17,  22,  19,   1,  -20 },\n/* 0xD3 */ {  4995,   17,  22,  19,   1,  -20 },\n/* 0xD4 */ {  5042,   17,  22,  19,   1,  -20 },\n/* 0xD5 */ {  5089,   17,  22,  19,   1,  -20 },\n/* 0xD6 */ {  5136,   17,  21,  19,   1,  -19 },\n/* 0xD7 */ {  5181,    8,   9,  14,   3,   -8 },\n/* 0xD8 */ {  5190,   17,  18,  19,   1,  -16 },\n/* 0xD9 */ {  5229,   13,  22,  17,   2,  -20 },\n/* 0xDA */ {  5265,   13,  22,  17,   2,  -20 },\n/* 0xDB */ {  5301,   13,  22,  17,   2,  -20 },\n/* 0xDC */ {  5337,   13,  21,  17,   2,  -19 },\n/* 0xDD */ {  5372,   14,  22,  16,   1,  -20 },\n/* 0xDE */ {  5411,   12,  18,  15,   2,  -16 },\n/* 0xDF */ {  5438,   11,  18,  14,   2,  -16 },\n/* 0xE0 */ {  5463,   12,  18,  13,   1,  -16 },\n/* 0xE1 */ {  5490,   12,  18,  13,   1,  -16 },\n/* 0xE2 */ {  5517,   12,  18,  13,   1,  -16 },\n/* 0xE3 */ {  5544,   12,  18,  13,   1,  -16 },\n/* 0xE4 */ {  5571,   12,  17,  13,   1,  -15 },\n/* 0xE5 */ {  5597,   12,  19,  13,   1,  -17 },\n/* 0xE6 */ {  5626,   19,  13,  21,   1,  -11 },\n/* 0xE7 */ {  5657,   10,  18,  12,   1,  -11 },\n/* 0xE8 */ {  5680,   11,  18,  13,   1,  -16 },\n/* 0xE9 */ {  5705,   11,  18,  13,   1,  -16 },\n/* 0xEA */ {  5730,   11,  18,  13,   1,  -16 },\n/* 0xEB */ {  5755,   11,  17,  13,   1,  -15 },\n/* 0xEC */ {  5779,    4,  18,   5,   1,  -16 },\n/* 0xED */ {  5788,    5,  18,   5,   0,  -16 },\n/* 0xEE */ {  5800,    6,  18,   6,   0,  -16 },\n/* 0xEF */ {  5814,    6,  17,   6,   0,  -15 },\n/* 0xF0 */ {  5827,   11,  18,  13,   1,  -16 },\n/* 0xF1 */ {  5852,   10,  18,  13,   1,  -16 },\n/* 0xF2 */ {  5875,   11,  18,  13,   1,  -16 },\n/* 0xF3 */ {  5900,   11,  18,  13,   1,  -16 },\n/* 0xF4 */ {  5925,   11,  18,  13,   1,  -16 },\n/* 0xF5 */ {  5950,   11,  18,  13,   1,  -16 },\n/* 0xF6 */ {  5975,   11,  17,  13,   1,  -15 },\n/* 0xF7 */ {  5999,   12,  11,  14,   1,   -9 },\n/* 0xF8 */ {  6016,   11,  13,  13,   1,  -11 },\n/* 0xF9 */ {  6034,   10,  18,  13,   1,  -16 },\n/* 0xFA */ {  6057,   10,  18,  13,   1,  -16 },\n/* 0xFB */ {  6080,   10,  18,  13,   1,  -16 },\n/* 0xFC */ {  6103,   10,  17,  13,   1,  -15 },\n/* 0xFD */ {  6125,   11,  23,  11,   0,  -16 },\n/* 0xFE */ {  6157,   12,  21,  13,   1,  -15 },\n/* 0xFF */ {  6189,   11,  22,  11,   0,  -15 },\n};\n\nconst GFXfont FreeSans12pt_Win1252 PROGMEM = {\n(uint8_t*)FreeSans12pt_Win1252Bitmaps,\n(GFXglyph*)FreeSans12pt_Win1252Glyphs,\n0x01, 0xFF, 19\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans12pt_Win1253.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans12pt_Win1253\n*/\nconst uint8_t FreeSans12pt_Win1253Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x00, 0x30, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x24, 0x00, 0x04, 0x80, 0x01, 0x90, 0x00, 0x62, 0x00, 0x30, 0xFE, 0x04, 0x10, 0x5F, 0x02, 0x0B, 0x00, 0x7F, 0xE0, 0x0C, 0x1C, 0x02, 0x83, 0x81, 0x9F, 0xF0, 0x02, 0x1E, 0x00, 0x41, 0xC0, 0x0E, 0x7F, 0x81, 0x78, 0x18, 0x62, 0x00, 0xFF, 0xC0,\n/* 0x02 */ 0x00, 0xFF, 0x80, 0x61, 0x13, 0xF0, 0x62, 0x60, 0x07, 0xFC, 0x00, 0x83, 0x80, 0x10, 0xF0, 0x33, 0xF6, 0x01, 0x41, 0xC0, 0x18, 0x38, 0x03, 0xFF, 0xE0, 0x47, 0x02, 0x08, 0x20, 0x61, 0xC4, 0x06, 0x17, 0x00, 0x22, 0x00, 0x02, 0x40, 0x00, 0x48, 0x00, 0x09, 0x00, 0x01, 0x20, 0x00, 0x3C, 0x00,\n/* 0x03 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x04, 0x08, 0x48, 0x70, 0xE1, 0xC3, 0x87, 0x0E, 0x08, 0x10, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA1, 0x81, 0x8D, 0x87, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x04 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x10, 0x02, 0x48, 0xE0, 0x61, 0xC1, 0xCC, 0x0E, 0x78, 0x1C, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xFC, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x05 */ 0x00, 0x18, 0x00, 0x00, 0x40, 0x01, 0x90, 0x01, 0xF4, 0x08, 0x12, 0x23, 0xC1, 0x91, 0x2C, 0x1C, 0x8A, 0xC3, 0x64, 0x64, 0x13, 0x22, 0x41, 0x98, 0x26, 0x2C, 0xC4, 0x22, 0x60, 0x42, 0x13, 0x04, 0x30, 0x80, 0x61, 0xA4, 0x02, 0x18, 0x20, 0x03, 0x41, 0x00, 0x20, 0x08, 0x02, 0x00, 0x60, 0x40, 0x03, 0xF8,\n/* 0x06 */ 0x00, 0x10, 0x00, 0x03, 0x00, 0x1C, 0x48, 0x00, 0xB4, 0x80, 0x09, 0xF9, 0xC0, 0xE0, 0xE4, 0x0C, 0x02, 0x8F, 0x80, 0x38, 0x88, 0x01, 0x0D, 0x00, 0x18, 0x30, 0x01, 0x60, 0x80, 0x13, 0x18, 0x03, 0xF2, 0xC0, 0x20, 0x26, 0x06, 0x07, 0xFF, 0xA0, 0x02, 0x39, 0x00, 0x14, 0x70, 0x01, 0xC3, 0x00, 0x18, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x10, 0x37, 0xE2, 0x61, 0x00, 0x0C, 0xC6, 0x10, 0x98, 0x0C, 0x63, 0x00, 0x00, 0xC6, 0x00,\n/* 0x09 */ 0x00, 0x1F, 0x80, 0x00, 0x60, 0x80, 0x01, 0x00, 0x80, 0x06, 0x00, 0x80, 0x3C, 0x01, 0x01, 0x8C, 0x02, 0x02, 0x08, 0x04, 0x04, 0x08, 0x0C, 0x38, 0x00, 0x04, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x2E, 0xC0, 0x01, 0x83, 0x7E, 0x0C, 0x00, 0x37, 0xE0,\n/* 0x0A */\n/* 0x0B */ 0x1F, 0x07, 0xC1, 0x86, 0x41, 0x10, 0x0C, 0x04, 0x80, 0x40, 0x18, 0x00, 0x00, 0xC0, 0x00, 0x06, 0x00, 0x00, 0x30, 0x00, 0x01, 0x40, 0x00, 0x0A, 0x00, 0x00, 0x88, 0x00, 0x04, 0x40, 0x00, 0x41, 0x00, 0x02, 0x04, 0x00, 0x20, 0x20, 0x02, 0x00, 0x80, 0x20, 0x02, 0x02, 0x00, 0x08, 0x20, 0x00, 0x22, 0x00, 0x00, 0xE0, 0x00,\n/* 0x0C */ 0x01, 0x00, 0x00, 0x38, 0x00, 0x04, 0xC0, 0x01, 0x08, 0x00, 0x18, 0x80, 0x1C, 0x10, 0x02, 0x07, 0x80, 0x81, 0x10, 0x1F, 0xC2, 0x02, 0x00, 0x60, 0x80, 0x1A, 0x20, 0x1C, 0x42, 0x1C, 0x08, 0xFE, 0x03, 0xA0, 0x01, 0x8C, 0x01, 0xC1, 0x43, 0xD0, 0x27, 0x81, 0xF8,\n/* 0x0D */\n/* 0x0E */ 0x00, 0xE0, 0x00, 0x11, 0x00, 0x01, 0x10, 0x00, 0x0B, 0x00, 0x03, 0xF8, 0x00, 0x60, 0x60, 0x09, 0x02, 0x00, 0xA0, 0x10, 0x16, 0x01, 0x01, 0x40, 0x10, 0x10, 0x01, 0x01, 0x00, 0x08, 0x10, 0x00, 0x82, 0x1F, 0x08, 0x3F, 0x90, 0x44, 0x00, 0x06, 0xBF, 0xFF, 0xAF, 0xF0, 0xFF, 0xFF, 0x0F, 0xE3, 0xFB, 0xFC,\n/* 0x0F */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x40, 0x12, 0x34, 0x00, 0x69, 0x40, 0x01, 0x49, 0xE0, 0xF1, 0xCD, 0x06, 0x8E, 0x28, 0x14, 0x71, 0x40, 0xA3, 0x8B, 0xFD, 0x14, 0x50, 0x68, 0xA2, 0x81, 0x4D, 0x97, 0xFA, 0x44, 0xBF, 0xD6, 0x31, 0x02, 0xE0, 0xC8, 0x16, 0x08, 0x61, 0x08, 0x21, 0xF0, 0x80, 0xF8, 0x78, 0x00,\n/* 0x10 */ 0x00, 0xF0, 0x00, 0x3A, 0x00, 0x07, 0xC0, 0x00, 0xA8, 0x00, 0x1F, 0x00, 0x02, 0xB0, 0x00, 0x52, 0x00, 0x0A, 0x40, 0x02, 0x48, 0x00, 0x49, 0x00, 0x09, 0x30, 0x01, 0x22, 0x01, 0xC4, 0x70, 0xF0, 0x85, 0xE1, 0x10, 0x88, 0x37, 0x20, 0x03, 0x9C, 0x00, 0x37, 0x00, 0x06, 0x40, 0x01, 0x86, 0x00,\n/* 0x11 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x60, 0x02, 0x36, 0x00, 0x09, 0x04, 0x0C, 0x48, 0x60, 0xC1, 0xC3, 0x0F, 0x0E, 0x00, 0x08, 0x70, 0x00, 0x23, 0x80, 0x63, 0x84, 0x01, 0x9F, 0x20, 0x0C, 0xFD, 0x80, 0x27, 0xE4, 0x03, 0x3F, 0x30, 0x33, 0xE0, 0xC0, 0x00, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x12 */ 0x00, 0xC2, 0x00, 0x1C, 0x24, 0x02, 0x18, 0x60, 0x64, 0x02, 0x02, 0x40, 0x20, 0x00, 0xF2, 0x03, 0x89, 0xE0, 0x7C, 0x80, 0x0E, 0x25, 0x80, 0xE1, 0x00, 0x1A, 0x08, 0x71, 0xB0, 0xC4, 0x39, 0x84, 0xC2, 0xCC, 0x40, 0x76, 0x7C, 0x05, 0xBB, 0x80, 0x4C, 0xE0, 0x0A, 0x78, 0x00, 0x9C, 0x00, 0x0F, 0x00, 0x00,\n/* 0x13 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x60, 0xC1, 0xC6, 0xC9, 0x0E, 0x00, 0x00, 0x70, 0x00, 0x03, 0x80, 0x00, 0x14, 0xFF, 0xF8, 0xA6, 0x00, 0xCD, 0x9F, 0xFE, 0x44, 0x71, 0xE6, 0x30, 0xFC, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x14 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x20, 0x22, 0x33, 0x01, 0x89, 0x20, 0x02, 0x48, 0x60, 0xE1, 0xC8, 0x80, 0x8E, 0x46, 0x46, 0x72, 0x32, 0x33, 0x9F, 0x9F, 0x94, 0x78, 0x78, 0xA0, 0x00, 0x0D, 0x80, 0x00, 0x44, 0x0E, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x15 */ 0x03, 0xFC, 0x20, 0x38, 0x1C, 0x81, 0x80, 0x1D, 0x08, 0x00, 0x32, 0x60, 0x00, 0x89, 0x00, 0x02, 0x18, 0x00, 0x08, 0x61, 0xC3, 0x22, 0x8D, 0x93, 0x72, 0x00, 0x00, 0x48, 0x00, 0x01, 0x20, 0x00, 0x04, 0x9F, 0xFF, 0x92, 0x60, 0x0E, 0x44, 0xFF, 0xF2, 0x11, 0xC3, 0x88, 0x21, 0xF8, 0x40, 0x40, 0x02, 0x00, 0xC0, 0x30, 0x00, 0xFF, 0x00,\n/* 0x16 */ 0x03, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x01, 0xE0, 0x03, 0xF0, 0x03, 0xF0, 0x27, 0xF0, 0x6F, 0x70, 0x6E, 0x60, 0xFC, 0x60, 0xFC, 0x7E, 0xFC, 0x7E, 0xFC, 0x3F, 0xF4, 0x1F, 0xF4, 0x1F, 0xF0, 0x0E, 0x70, 0x0E, 0x30, 0x1C, 0x38, 0x38, 0x0F, 0xF0,\n/* 0x17 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x48, 0x00, 0x21, 0xC0, 0x02, 0x8E, 0x20, 0xF4, 0x70, 0x84, 0x11, 0x82, 0x40, 0x84, 0x01, 0x03, 0x20, 0x0F, 0x85, 0x80, 0x03, 0x04, 0x00, 0x04, 0x30, 0x78, 0x10, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x18 */ 0x00, 0xFC, 0x00, 0x02, 0x06, 0x00, 0x08, 0x24, 0x00, 0x21, 0xA4, 0x00, 0x4C, 0x48, 0x00, 0xA0, 0x50, 0x01, 0x92, 0x60, 0x03, 0x24, 0xC0, 0x06, 0x01, 0x81, 0x28, 0x03, 0x49, 0x6C, 0xC4, 0xAD, 0xD8, 0x16, 0xA4, 0xCC, 0xC4, 0x44, 0x86, 0x13, 0x05, 0x00, 0x28, 0x0A, 0x00, 0x50, 0x14, 0x00, 0x90, 0x48, 0x01, 0x20, 0x90, 0x02, 0x41, 0x20, 0x00, 0x00,\n/* 0x19 */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x00, 0x02, 0x30, 0x00, 0x09, 0x00, 0x00, 0x49, 0xC3, 0x81, 0xC0, 0x00, 0x0E, 0x78, 0xF0, 0x77, 0xEF, 0xC3, 0xA7, 0x4E, 0x15, 0x0A, 0x10, 0xA7, 0x8F, 0x0D, 0x80, 0x00, 0x44, 0x00, 0x06, 0x33, 0xF0, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1A */ 0xFF, 0xFF, 0x00, 0x06, 0x00, 0x0C, 0x3E, 0x18, 0x82, 0x32, 0x02, 0x64, 0x04, 0xC8, 0x09, 0x80, 0x23, 0x00, 0x86, 0x02, 0x0C, 0x08, 0x18, 0x10, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x81, 0x80, 0x03, 0x00, 0x07, 0xFF, 0xF8,\n/* 0x1B */ 0x00, 0xFE, 0x00, 0x03, 0x81, 0x80, 0x04, 0x00, 0x60, 0x08, 0x00, 0x30, 0x10, 0x00, 0x10, 0x30, 0x07, 0x88, 0x23, 0xC8, 0x08, 0x22, 0x00, 0x04, 0x60, 0x00, 0x44, 0x60, 0x00, 0x84, 0x63, 0x03, 0x04, 0x61, 0xFC, 0x04, 0x6B, 0x00, 0x9E, 0xA5, 0x01, 0x6A, 0xD5, 0x01, 0x43, 0xA8, 0x81, 0x05, 0xD0, 0x82, 0x0A, 0xA0, 0x82, 0x05, 0xC0, 0x82, 0x02, 0x61, 0xFF, 0x0C, 0x1E, 0x00, 0xF0,\n/* 0x1C */ 0x01, 0xFC, 0x00, 0x38, 0x18, 0x02, 0x00, 0x30, 0x20, 0x00, 0xC2, 0x30, 0x02, 0x32, 0x00, 0x09, 0x00, 0x00, 0x48, 0x20, 0x61, 0xC3, 0x84, 0x0E, 0x1C, 0x78, 0x70, 0x40, 0x03, 0x80, 0x00, 0x14, 0x00, 0x00, 0xA0, 0x03, 0x0D, 0x83, 0xF0, 0x44, 0x00, 0x06, 0x30, 0x00, 0x60, 0xC0, 0x06, 0x03, 0x80, 0x60, 0x07, 0xFC, 0x00,\n/* 0x1D */ 0x01, 0xFE, 0x00, 0x3A, 0x1C, 0x03, 0x00, 0x30, 0x23, 0x1E, 0xC3, 0x38, 0x03, 0x10, 0xC3, 0x09, 0x00, 0x18, 0x68, 0x00, 0xC1, 0x40, 0x00, 0x0A, 0x07, 0x80, 0x50, 0x46, 0x02, 0x80, 0x00, 0x1A, 0x1E, 0x00, 0xCB, 0x10, 0x0D, 0x03, 0x00, 0x48, 0x60, 0x06, 0x40, 0x00, 0x22, 0x0C, 0x02, 0x10, 0x60, 0x60, 0x43, 0xFC, 0x01, 0xE0, 0x00, 0x00,\n/* 0x1E */ 0x01, 0xF0, 0x00, 0xEA, 0xC0, 0x31, 0x5F, 0x04, 0x5F, 0x88, 0x80, 0xA0, 0x48, 0x0E, 0x02, 0x8F, 0x40, 0x3C, 0x10, 0x21, 0x66, 0x87, 0x15, 0x98, 0x71, 0x41, 0x02, 0x14, 0x00, 0x01, 0x40, 0x00, 0x14, 0x00, 0x01, 0x21, 0xFE, 0x12, 0x00, 0x02, 0x10, 0x00, 0x60, 0x80, 0x0C, 0x06, 0x01, 0x80, 0x3F, 0xE0,\n/* 0x1F */ 0x0E, 0x00, 0x13, 0x00, 0x23, 0x00, 0xF3, 0x01, 0x31, 0x01, 0x11, 0x03, 0xD3, 0x06, 0xF2, 0x30, 0x34, 0xC7, 0x25, 0x33, 0x2B, 0xC2, 0x57, 0x04, 0x3A, 0x08, 0x72, 0x30, 0xA3, 0xC3, 0x40, 0x04, 0x40, 0x18, 0x40, 0x60, 0x7F, 0x80,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xFF, 0xF0, 0xF0,\n/* '\"' 0x22 */ 0xCF, 0x3C, 0xF3, 0x8A, 0x20,\n/* '#' 0x23 */ 0x06, 0x30, 0x31, 0x03, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC7, 0xFF, 0xBF, 0xFC, 0x31, 0x01, 0x18, 0x18, 0xC0, 0xC6, 0x06, 0x30,\n/* '$' 0x24 */ 0x04, 0x03, 0xE1, 0xFF, 0x72, 0x7C, 0x47, 0x88, 0xF1, 0x07, 0xA0, 0x7E, 0x03, 0xF0, 0x17, 0x02, 0x7C, 0x47, 0x88, 0xF1, 0x1B, 0x26, 0x7F, 0xC3, 0xE0, 0x10, 0x02, 0x00,\n/* '%' 0x25 */ 0x00, 0x06, 0x03, 0xC0, 0x40, 0x7E, 0x0C, 0x0E, 0x70, 0x80, 0xC3, 0x18, 0x0C, 0x31, 0x00, 0xE7, 0x30, 0x07, 0xE6, 0x00, 0x3C, 0x40, 0x00, 0x0C, 0x7C, 0x00, 0x8F, 0xE0, 0x19, 0xC7, 0x01, 0x18, 0x30, 0x31, 0x83, 0x02, 0x1C, 0x70, 0x40, 0xFE, 0x04, 0x07, 0xC0,\n/* '&' 0x26 */ 0x0F, 0x00, 0x7E, 0x03, 0x9C, 0x0C, 0x30, 0x30, 0xC0, 0xE7, 0x01, 0xF8, 0x03, 0x80, 0x3E, 0x01, 0xCC, 0x6E, 0x39, 0xB0, 0x7C, 0xC0, 0xF3, 0x03, 0xCE, 0x1F, 0x9F, 0xE6, 0x3E, 0x1C,\n/* ''' 0x27 */ 0xFF, 0xA0,\n/* '(' 0x28 */ 0x08, 0x8C, 0x46, 0x31, 0x98, 0xC6, 0x31, 0x8C, 0x63, 0x08, 0x63, 0x08, 0x61, 0x0C, 0x20,\n/* ')' 0x29 */ 0x82, 0x18, 0xC3, 0x18, 0xC3, 0x18, 0xC6, 0x31, 0x8C, 0x62, 0x31, 0x88, 0xC4, 0x62, 0x00,\n/* '*' 0x2A */ 0x10, 0x23, 0x5B, 0xE3, 0x8D, 0x91, 0x00,\n/* '+' 0x2B */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0xFF, 0xFF, 0xF0, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0,\n/* ',' 0x2C */ 0xF5, 0x60,\n/* '-' 0x2D */ 0xFF, 0xF0,\n/* '.' 0x2E */ 0xF0,\n/* '/' 0x2F */ 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x02, 0x0C, 0x10, 0x20, 0xC1, 0x00,\n/* '0' 0x30 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x6C, 0x0F, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3E, 0x0E, 0xC1, 0x9C, 0x71, 0xFC, 0x1F, 0x00,\n/* '1' 0x31 */ 0x08, 0xCF, 0xFF, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18,\n/* '2' 0x32 */ 0x1F, 0x0F, 0xF9, 0x87, 0x60, 0x7C, 0x06, 0x00, 0xC0, 0x18, 0x07, 0x01, 0xC0, 0xF0, 0x78, 0x1C, 0x06, 0x00, 0xC0, 0x30, 0x07, 0xFF, 0xFF, 0xE0,\n/* '3' 0x33 */ 0x3F, 0x0F, 0xF3, 0x87, 0x60, 0x6C, 0x0C, 0x01, 0x80, 0x60, 0x78, 0x0F, 0x80, 0x18, 0x01, 0x80, 0x3C, 0x07, 0x80, 0xD8, 0x73, 0xFC, 0x3F, 0x00,\n/* '4' 0x34 */ 0x01, 0x80, 0x70, 0x0E, 0x03, 0xC0, 0xD8, 0x1B, 0x06, 0x61, 0x8C, 0x21, 0x8C, 0x33, 0x06, 0x7F, 0xFF, 0xFE, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80,\n/* '5' 0x35 */ 0x3F, 0xCF, 0xF9, 0x80, 0x30, 0x06, 0x00, 0xDE, 0x1F, 0xE7, 0x0E, 0x00, 0xE0, 0x0C, 0x01, 0x80, 0x30, 0x07, 0x81, 0xB8, 0x73, 0xFC, 0x1F, 0x00,\n/* '6' 0x36 */ 0x0F, 0x07, 0xF9, 0xC3, 0x30, 0x74, 0x01, 0x80, 0x33, 0xC7, 0xFE, 0xF1, 0xDC, 0x1F, 0x01, 0xE0, 0x3C, 0x06, 0xC1, 0xDC, 0x71, 0xFC, 0x1F, 0x00,\n/* '7' 0x37 */ 0xFF, 0xFF, 0xFC, 0x01, 0x00, 0x60, 0x18, 0x02, 0x00, 0xC0, 0x30, 0x06, 0x01, 0x80, 0x30, 0x04, 0x01, 0x80, 0x30, 0x06, 0x01, 0x80, 0x30, 0x00,\n/* '8' 0x38 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x66, 0x0C, 0xC1, 0x8C, 0x61, 0xF8, 0x3F, 0x8E, 0x3B, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xD8, 0x31, 0xFC, 0x1F, 0x00,\n/* '9' 0x39 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x6C, 0x07, 0x80, 0xF0, 0x1E, 0x07, 0x61, 0xEF, 0xFC, 0x79, 0x80, 0x30, 0x05, 0xC1, 0x98, 0x73, 0xFC, 0x1E, 0x00,\n/* ':' 0x3A */ 0xF0, 0x00, 0x03, 0xC0,\n/* ';' 0x3B */ 0xF0, 0x00, 0x0F, 0x56,\n/* '<' 0x3C */ 0x00, 0x70, 0x1E, 0x0F, 0x83, 0xC0, 0xF0, 0x0E, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x10,\n/* '=' 0x3D */ 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,\n/* '>' 0x3E */ 0xE0, 0x07, 0x80, 0x1F, 0x00, 0x7C, 0x00, 0xF0, 0x07, 0x01, 0xE0, 0xF0, 0x3C, 0x0F, 0x00, 0x80, 0x00,\n/* '?' 0x3F */ 0x3F, 0x1F, 0xEE, 0x1F, 0x03, 0xC0, 0xC0, 0x30, 0x0C, 0x06, 0x03, 0x81, 0xC0, 0xE0, 0x30, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x03, 0x00,\n/* '@' 0x40 */ 0x00, 0xFE, 0x00, 0x0F, 0xFE, 0x00, 0xF0, 0x3E, 0x07, 0x00, 0x3C, 0x38, 0x00, 0x38, 0xC1, 0xE0, 0x66, 0x0F, 0xD9, 0xD8, 0x61, 0xC3, 0xC3, 0x07, 0x0F, 0x1C, 0x1C, 0x3C, 0x60, 0x60, 0xF1, 0x81, 0x83, 0xC6, 0x06, 0x1B, 0x18, 0x38, 0xEE, 0x71, 0xE7, 0x18, 0xFD, 0xF8, 0x71, 0xE7, 0xC0, 0xE0, 0x00, 0x01, 0xE0, 0x00, 0x01, 0xFF, 0xC0, 0x01, 0xFC, 0x00,\n/* 'A' 0x41 */ 0x07, 0x80, 0x1E, 0x00, 0x78, 0x03, 0xF0, 0x0C, 0xC0, 0x33, 0x01, 0xCE, 0x06, 0x18, 0x18, 0x60, 0xE1, 0xC3, 0x03, 0x0F, 0xFC, 0x7F, 0xF9, 0x80, 0x66, 0x01, 0xB8, 0x07, 0xC0, 0x0F, 0x00, 0x30,\n/* 'B' 0x42 */ 0xFF, 0xC7, 0xFF, 0x30, 0x1D, 0x80, 0x6C, 0x03, 0x60, 0x1B, 0x00, 0xD8, 0x0C, 0xFF, 0xC7, 0xFF, 0x30, 0x0D, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x06, 0xFF, 0xF7, 0xFE, 0x00,\n/* 'C' 0x43 */ 0x07, 0xE0, 0x3F, 0xF0, 0xE0, 0x73, 0x80, 0x76, 0x00, 0x6C, 0x00, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x00, 0x0E, 0x00, 0x6C, 0x00, 0xDC, 0x03, 0x1E, 0x0E, 0x1F, 0xF8, 0x0F, 0xC0,\n/* 'D' 0x44 */ 0xFF, 0xC3, 0xFF, 0x8C, 0x07, 0x30, 0x0E, 0xC0, 0x1B, 0x00, 0x7C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0x00, 0x3C, 0x00, 0xF0, 0x03, 0xC0, 0x1F, 0x00, 0x6C, 0x03, 0xB0, 0x1C, 0xFF, 0xE3, 0xFE, 0x00,\n/* 'E' 0x45 */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xEF, 0xFE, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xFF, 0xFF, 0xFF,\n/* 'F' 0x46 */ 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xFF, 0xDF, 0xFB, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x00,\n/* 'G' 0x47 */ 0x07, 0xF0, 0x1F, 0xFC, 0x3C, 0x1E, 0x70, 0x07, 0x60, 0x03, 0xE0, 0x00, 0xC0, 0x00, 0xC0, 0x00, 0xC0, 0x7F, 0xC0, 0x7F, 0xC0, 0x03, 0xC0, 0x03, 0x60, 0x03, 0x60, 0x07, 0x30, 0x0F, 0x3C, 0x1F, 0x1F, 0xFB, 0x07, 0xE1,\n/* 'H' 0x48 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xC0,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'J' 0x4A */ 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x3C, 0x1E, 0x0F, 0x07, 0xC7, 0x7F, 0x1F, 0x00,\n/* 'K' 0x4B */ 0xC0, 0x3E, 0x03, 0xB0, 0x39, 0x83, 0x8C, 0x38, 0x63, 0x83, 0x38, 0x19, 0xC0, 0xDE, 0x07, 0xB8, 0x38, 0xE1, 0x83, 0x0C, 0x1C, 0x60, 0x73, 0x01, 0x98, 0x0E, 0xC0, 0x3E, 0x00, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xFF, 0xFF, 0xF0,\n/* 'M' 0x4D */ 0xE0, 0x07, 0xE0, 0x07, 0xF0, 0x0F, 0xF0, 0x0F, 0xD0, 0x0F, 0xD8, 0x1B, 0xD8, 0x1B, 0xD8, 0x1B, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xC6, 0x63, 0xC6, 0x63, 0xC6, 0x63, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC1, 0x83,\n/* 'N' 0x4E */ 0xE0, 0x1F, 0x00, 0xFC, 0x07, 0xE0, 0x3D, 0x81, 0xEE, 0x0F, 0x30, 0x79, 0xC3, 0xC6, 0x1E, 0x18, 0xF0, 0xE7, 0x83, 0x3C, 0x1D, 0xE0, 0x6F, 0x01, 0xF8, 0x0F, 0xC0, 0x3E, 0x01, 0xC0,\n/* 'O' 0x4F */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x00, 0x18, 0xC0, 0x18, 0x78, 0x3C, 0x1F, 0xFC, 0x03, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x8F, 0xFE, 0xC0, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x06, 0xFF, 0xEF, 0xFC, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00,\n/* 'Q' 0x51 */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x86, 0x00, 0xC6, 0x00, 0x33, 0x00, 0x1B, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x78, 0x00, 0x36, 0x00, 0x33, 0x01, 0x98, 0xC0, 0xFC, 0x78, 0x3C, 0x1F, 0xFF, 0x03, 0xF9, 0x80, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x0C, 0xFF, 0xE3, 0xFF, 0xCC, 0x03, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x6C, 0x01, 0xB0, 0x06, 0xC0, 0x1B, 0x00, 0x70,\n/* 'S' 0x53 */ 0x0F, 0xE0, 0x7F, 0xC3, 0x83, 0x98, 0x07, 0x60, 0x0D, 0x80, 0x07, 0x00, 0x1E, 0x00, 0x3F, 0x80, 0x3F, 0xC0, 0x0F, 0x80, 0x07, 0xC0, 0x0F, 0x00, 0x3E, 0x00, 0xDE, 0x0E, 0x3F, 0xF0, 0x3F, 0x80,\n/* 'T' 0x54 */ 0xFF, 0xFF, 0xFF, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 'U' 0x55 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x80, 0xEE, 0x0E, 0x3F, 0xE0, 0xFC, 0x00,\n/* 'V' 0x56 */ 0xC0, 0x0F, 0x00, 0x7E, 0x01, 0x98, 0x06, 0x60, 0x39, 0xC0, 0xC3, 0x03, 0x0C, 0x1C, 0x38, 0x60, 0x61, 0x81, 0x8E, 0x07, 0x30, 0x0C, 0xC0, 0x37, 0x00, 0xF8, 0x01, 0xE0, 0x07, 0x80, 0x1C, 0x00,\n/* 'W' 0x57 */ 0xE0, 0x30, 0x1D, 0x80, 0xE0, 0x76, 0x07, 0x81, 0xDC, 0x1E, 0x06, 0x70, 0x7C, 0x18, 0xC1, 0xB0, 0xE3, 0x0C, 0xC3, 0x8C, 0x33, 0x0C, 0x38, 0xC6, 0x30, 0x67, 0x18, 0xC1, 0x98, 0x67, 0x06, 0x61, 0xD8, 0x1D, 0x83, 0x60, 0x3C, 0x0D, 0x80, 0xF0, 0x3E, 0x03, 0xC0, 0x70, 0x0F, 0x01, 0xC0, 0x18, 0x07, 0x00,\n/* 'X' 0x58 */ 0xE0, 0x1D, 0x80, 0xE7, 0x03, 0x0E, 0x1C, 0x18, 0x60, 0x73, 0x00, 0xFC, 0x01, 0xE0, 0x07, 0x00, 0x1E, 0x00, 0xF8, 0x03, 0x30, 0x1C, 0xE0, 0xE1, 0x83, 0x07, 0x1C, 0x0E, 0xE0, 0x1B, 0x00, 0x70,\n/* 'Y' 0x59 */ 0xC0, 0x0F, 0x80, 0x76, 0x01, 0x9C, 0x0C, 0x38, 0x70, 0x61, 0x81, 0xCE, 0x03, 0x30, 0x0F, 0x80, 0x1E, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xFF, 0xFF, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x03, 0x80, 0x18, 0x01, 0xC0, 0x1C, 0x00, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFF, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCF, 0xF0,\n/* '\\' 0x5C */ 0x81, 0x81, 0x02, 0x06, 0x04, 0x08, 0x18, 0x10, 0x20, 0x60, 0x40, 0x81, 0x81, 0x02, 0x06, 0x04,\n/* ']' 0x5D */ 0xFF, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xF0,\n/* '^' 0x5E */ 0x0C, 0x0E, 0x05, 0x86, 0xC3, 0x21, 0x19, 0x8C, 0x83, 0xC1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xFE,\n/* '`' 0x60 */ 0xE3, 0x8C, 0x30,\n/* 'a' 0x61 */ 0x3F, 0x07, 0xF8, 0xE1, 0xCC, 0x0C, 0x00, 0xC0, 0x1C, 0x3F, 0xCF, 0x8C, 0xC0, 0xCC, 0x0C, 0xE3, 0xC7, 0xEF, 0x3C, 0x70,\n/* 'b' 0x62 */ 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x0C, 0xF8, 0xDF, 0xCF, 0x0E, 0xE0, 0x7C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xE0, 0x6F, 0x0E, 0xDF, 0xCC, 0xF8,\n/* 'c' 0x63 */ 0x1F, 0x0F, 0xE6, 0x1F, 0x83, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x38, 0x37, 0x1C, 0xFE, 0x1F, 0x00,\n/* 'd' 0x64 */ 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x3C, 0xCF, 0xFB, 0x8F, 0xE0, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF8, 0x3B, 0x8F, 0x3F, 0x63, 0xCC,\n/* 'e' 0x65 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x3C, 0x07, 0xFF, 0xFF, 0xFE, 0x00, 0xC0, 0x1C, 0x0D, 0xC3, 0x1F, 0xC1, 0xF0,\n/* 'f' 0x66 */ 0x3B, 0xD8, 0xC6, 0x7F, 0xEC, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x00,\n/* 'g' 0x67 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xB1, 0xE6, 0x00, 0xC0, 0x3E, 0x0E, 0x7F, 0xC7, 0xE0,\n/* 'h' 0x68 */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x33, 0xCD, 0xFB, 0xC7, 0xE0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x30,\n/* 'i' 0x69 */ 0xF0, 0x3F, 0xFF, 0xFF, 0xF0,\n/* 'j' 0x6A */ 0x33, 0x00, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0xB8, 0xC6, 0x31, 0xCC, 0x3B, 0x06, 0xC1, 0xF0, 0x30,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 'm' 0x6D */ 0xCF, 0x1F, 0x6F, 0xDF, 0xFC, 0x78, 0xFC, 0x18, 0x3C, 0x0C, 0x1E, 0x06, 0x0F, 0x03, 0x07, 0x81, 0x83, 0xC0, 0xC1, 0xE0, 0x60, 0xF0, 0x30, 0x78, 0x18, 0x3C, 0x0C, 0x18,\n/* 'n' 0x6E */ 0xCF, 0x37, 0xEF, 0x1F, 0x83, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0,\n/* 'o' 0x6F */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x1F, 0xC1, 0xF0,\n/* 'p' 0x70 */ 0xCF, 0x8D, 0xFC, 0xF0, 0xEE, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x3E, 0x06, 0xF0, 0xEF, 0xFC, 0xCF, 0x8C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 'q' 0x71 */ 0x1E, 0x67, 0xFD, 0xC7, 0xF0, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x9F, 0xF1, 0xE6, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60,\n/* 'r' 0x72 */ 0xCF, 0x7F, 0x38, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 's' 0x73 */ 0x3E, 0x1F, 0xEE, 0x1B, 0x00, 0xC0, 0x3C, 0x07, 0xF0, 0x3F, 0x01, 0xF0, 0x3E, 0x1D, 0xFE, 0x3F, 0x00,\n/* 't' 0x74 */ 0x63, 0x19, 0xFF, 0xB1, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0xE7,\n/* 'u' 0x75 */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x7E, 0x3D, 0xFB, 0x3C, 0xC0,\n/* 'v' 0x76 */ 0xE0, 0x6C, 0x0D, 0x81, 0xB8, 0x63, 0x0C, 0x61, 0x8E, 0x60, 0xCC, 0x19, 0x83, 0xE0, 0x3C, 0x07, 0x00, 0xE0,\n/* 'w' 0x77 */ 0xC1, 0xC1, 0xB0, 0xE1, 0xD8, 0x70, 0xCC, 0x2C, 0x66, 0x36, 0x31, 0x9B, 0x18, 0xCD, 0x98, 0x64, 0x6C, 0x16, 0x36, 0x0F, 0x1A, 0x07, 0x8F, 0x03, 0x83, 0x80, 0xC1, 0xC0,\n/* 'x' 0x78 */ 0xC1, 0xF8, 0x66, 0x30, 0xCC, 0x3E, 0x07, 0x00, 0xC0, 0x78, 0x36, 0x0C, 0xC6, 0x3B, 0x06, 0xC0, 0xC0,\n/* 'y' 0x79 */ 0xE0, 0x6C, 0x0D, 0x83, 0x38, 0x63, 0x0C, 0x63, 0x0C, 0x60, 0xCC, 0x1B, 0x03, 0x60, 0x3C, 0x07, 0x00, 0xE0, 0x18, 0x03, 0x00, 0xE0, 0x78, 0x0E, 0x00,\n/* 'z' 0x7A */ 0xFF, 0xFF, 0xF0, 0x18, 0x0C, 0x07, 0x03, 0x81, 0xC0, 0x60, 0x30, 0x18, 0x0E, 0x03, 0xFF, 0xFF, 0xC0,\n/* '{' 0x7B */ 0x19, 0xCC, 0x63, 0x18, 0xC6, 0x31, 0x99, 0x86, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x1C, 0x60,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,\n/* '}' 0x7D */ 0xC7, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x0C, 0x33, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x73, 0x00,\n/* '~' 0x7E */ 0x70, 0x3E, 0x09, 0xE4, 0x1F, 0x03, 0x80,\n/* 0x7F */\n/* 0x80 */ 0x01, 0xF0, 0x1F, 0xF0, 0xE0, 0xC7, 0x00, 0x18, 0x00, 0xC0, 0x07, 0xFF, 0x3F, 0xFC, 0x30, 0x01, 0xFF, 0x8F, 0xFC, 0x0C, 0x00, 0x18, 0x00, 0x70, 0x00, 0xE0, 0x81, 0xFE, 0x03, 0xF0,\n/* 0x81 */\n/* 0x82 */ 0xF5, 0x80,\n/* 0x83 */ 0x1C, 0xF3, 0x0C, 0x31, 0xF7, 0xCC, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x33, 0xCE, 0x00,\n/* 0x84 */ 0xCF, 0x34, 0x51, 0x88,\n/* 0x85 */ 0xC6, 0x3C, 0x63,\n/* 0x86 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x00,\n/* 0x87 */ 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x3F, 0xFF, 0xFC, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x0F, 0xFF, 0xFF, 0x0C, 0x03, 0x00, 0xC0, 0x30,\n/* 0x88 */ 0x38, 0xD9, 0xB6, 0x30,\n/* 0x89 */ 0x38, 0x18, 0x00, 0xF8, 0x30, 0x03, 0x18, 0xC0, 0x04, 0x11, 0x80, 0x0C, 0x66, 0x00, 0x0F, 0x8C, 0x00, 0x0E, 0x30, 0x00, 0x00, 0x40, 0x00, 0x01, 0x80, 0x00, 0x06, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x31, 0xC0, 0xE0, 0x67, 0xC3, 0xC1, 0x98, 0xCC, 0xC3, 0x20, 0x90, 0x8C, 0x63, 0x33, 0x10, 0x7C, 0x3C, 0x60, 0x70, 0x38,\n/* 0x8A */ 0x0C, 0x40, 0x1F, 0x00, 0x38, 0x03, 0xF8, 0x1F, 0xF0, 0xE0, 0xE6, 0x01, 0xD8, 0x03, 0x60, 0x01, 0xC0, 0x07, 0x80, 0x0F, 0xE0, 0x0F, 0xF0, 0x03, 0xE0, 0x01, 0xF0, 0x03, 0xC0, 0x0F, 0x80, 0x37, 0x83, 0x8F, 0xFC, 0x0F, 0xE0,\n/* 0x8B */ 0x2F, 0x49, 0x99,\n/* 0x8C */ 0x07, 0xCF, 0xFC, 0x7F, 0xFF, 0xF3, 0x83, 0xC0, 0x18, 0x07, 0x00, 0x60, 0x0C, 0x03, 0x00, 0x30, 0x0C, 0x00, 0xC0, 0x30, 0x03, 0x00, 0xC0, 0x0F, 0xFF, 0x00, 0x3F, 0xFC, 0x00, 0xC0, 0x30, 0x03, 0x00, 0xC0, 0x0C, 0x01, 0x80, 0x30, 0x07, 0x01, 0xC0, 0x0E, 0x0F, 0x00, 0x1F, 0xEF, 0xFC, 0x1F, 0x3F, 0xF0,\n/* 0x8D */\n/* 0x8E */ 0x0C, 0xC0, 0x3C, 0x00, 0xE1, 0xFF, 0xFF, 0xFF, 0x80, 0x1C, 0x01, 0xC0, 0x1C, 0x00, 0xC0, 0x0E, 0x00, 0xE0, 0x0E, 0x00, 0x60, 0x07, 0x00, 0x70, 0x07, 0x00, 0x30, 0x03, 0x80, 0x38, 0x01, 0xFF, 0xFF, 0xFF, 0x80,\n/* 0x8F */\n/* 0x90 */\n/* 0x91 */ 0x6A, 0xF0,\n/* 0x92 */ 0xF5, 0x60,\n/* 0x93 */ 0x4E, 0x28, 0xA2, 0xCF, 0x30,\n/* 0x94 */ 0xCF, 0x34, 0x51, 0x4E, 0x20,\n/* 0x95 */ 0x7B, 0xFF, 0xFF, 0xFD, 0xE0,\n/* 0x96 */ 0xFF, 0xFF, 0xF0,\n/* 0x97 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,\n/* 0x98 */ 0x63, 0xFE, 0x70,\n/* 0x99 */ 0xFF, 0x70, 0x1F, 0xFD, 0xC0, 0x71, 0x87, 0x83, 0xC6, 0x1E, 0x0F, 0x18, 0x68, 0x3C, 0x61, 0xB1, 0xB1, 0x86, 0xC6, 0xC6, 0x19, 0x1B, 0x18, 0x66, 0xCC, 0x61, 0x9B, 0x31, 0x86, 0x3C, 0xC6, 0x18, 0xE3, 0x18, 0x63, 0x8C,\n/* 0x9A */ 0x63, 0x0D, 0x83, 0x60, 0x70, 0x00, 0x0F, 0x87, 0xFB, 0x86, 0xC0, 0x30, 0x0F, 0x01, 0xFC, 0x0F, 0xC0, 0x7C, 0x0F, 0x87, 0x7F, 0x8F, 0xC0,\n/* 0x9B */ 0x99, 0x92, 0xF4,\n/* 0x9C */ 0x1F, 0x0F, 0x83, 0xF9, 0xFC, 0x71, 0xF8, 0x6E, 0x0F, 0x03, 0xC0, 0x60, 0x3C, 0x07, 0xFF, 0xC0, 0x7F, 0xFC, 0x06, 0x00, 0xC0, 0x60, 0x0E, 0x0F, 0x03, 0x71, 0xF8, 0x63, 0xF9, 0xFC, 0x1F, 0x0F, 0x80,\n/* 0x9D */\n/* 0x9E */ 0x63, 0x0C, 0x83, 0x60, 0x70, 0x00, 0x3F, 0xFF, 0xFC, 0x06, 0x03, 0x01, 0xC0, 0xE0, 0x70, 0x18, 0x0C, 0x06, 0x03, 0x80, 0xFF, 0xFF, 0xF0,\n/* 0x9F */ 0x0C, 0xC0, 0x33, 0x00, 0x00, 0x30, 0x03, 0xE0, 0x1D, 0x80, 0x67, 0x03, 0x0E, 0x1C, 0x18, 0x60, 0x73, 0x80, 0xCC, 0x03, 0xE0, 0x07, 0x80, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00,\n/* 0xA0 */\n/* 0xA1 */ 0xF0, 0xBF, 0xFF, 0xFF, 0xF0,\n/* 0xA2 */ 0x04, 0x00, 0x80, 0x7C, 0x1F, 0xE7, 0x4C, 0xC8, 0xF1, 0x1E, 0x20, 0xC4, 0x18, 0x83, 0x10, 0x72, 0x37, 0x4E, 0x7F, 0x87, 0xC0, 0x20, 0x04, 0x00,\n/* 0xA3 */ 0x0F, 0xC1, 0xFE, 0x38, 0x76, 0x03, 0x60, 0x36, 0x00, 0x70, 0x03, 0x80, 0xFF, 0x0F, 0xF0, 0x1C, 0x00, 0xC0, 0x0C, 0x01, 0x80, 0x10, 0x02, 0xF1, 0x7F, 0xF6, 0x1F,\n/* 0xA4 */ 0xDD, 0xFF, 0xD8, 0xD8, 0x3C, 0x1E, 0x0F, 0x8D, 0xFF, 0xDD, 0x80,\n/* 0xA5 */ 0xC0, 0x3E, 0x06, 0x60, 0x63, 0x0C, 0x30, 0xC1, 0x98, 0x19, 0x80, 0xF0, 0x0F, 0x07, 0xFE, 0x06, 0x00, 0x60, 0x7F, 0xE0, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 0xA6 */ 0xFF, 0xFF, 0xF0, 0x3F, 0xFF, 0xFC,\n/* 0xA7 */ 0x0F, 0x03, 0xF0, 0xE7, 0x18, 0x63, 0x0C, 0x70, 0x07, 0x03, 0xF8, 0xC3, 0x98, 0x3B, 0x03, 0xF0, 0x37, 0x06, 0x78, 0xC7, 0xB0, 0x7C, 0x03, 0x80, 0x39, 0x83, 0x30, 0x67, 0x1C, 0x7F, 0x07, 0xC0,\n/* 0xA8 */ 0xCF, 0x30,\n/* 0xA9 */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xE3, 0x1C, 0x73, 0xF3, 0x99, 0x86, 0x6C, 0xC1, 0x8F, 0x30, 0x03, 0xCC, 0x00, 0xF3, 0x00, 0x3C, 0xC1, 0x8D, 0x98, 0x66, 0x77, 0xF3, 0x8E, 0x79, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAA */ 0x79, 0x08, 0x11, 0xEE, 0x50, 0xA3, 0x3B, 0x00, 0x03, 0xF8,\n/* 0xAB */ 0x21, 0x63, 0xE7, 0x84, 0x84, 0xE7, 0x63, 0x21,\n/* 0xAC */ 0xFF, 0xFF, 0xFF, 0x00, 0x30, 0x03, 0x00, 0x30, 0x03,\n/* 0xAD */ 0xFF, 0xF0,\n/* 0xAE */ 0x03, 0xF0, 0x03, 0xFF, 0x01, 0xE0, 0xE0, 0xFF, 0x1C, 0x7F, 0xF3, 0x9B, 0x04, 0x6C, 0xC1, 0x8F, 0x30, 0x43, 0xCF, 0xF0, 0xF3, 0xFC, 0x3C, 0xC1, 0x0D, 0xB0, 0x66, 0x7C, 0x1B, 0x8F, 0x07, 0xC1, 0xC0, 0xE0, 0x3F, 0xF0, 0x03, 0xF0, 0x00,\n/* 0xAF */ 0xFF, 0xF0,\n/* 0xB0 */ 0x38, 0xFB, 0x1C, 0x18, 0x38, 0xDF, 0x1C,\n/* 0xB1 */ 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x7F, 0xE7, 0xFE, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xB2 */ 0x7D, 0x8F, 0x18, 0x30, 0xC6, 0x18, 0x60, 0xFF, 0xFC,\n/* 0xB3 */ 0x7D, 0x8F, 0x18, 0x31, 0x80, 0xC1, 0xE3, 0xC6, 0xF8,\n/* 0xB4 */ 0x3B, 0x99, 0x80,\n/* 0xB5 */ 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x0C, 0xC0, 0xCC, 0x1C, 0xE3, 0xCF, 0xEF, 0xFC, 0x7C, 0x00, 0xC0, 0x0C, 0x00, 0xC0, 0x00,\n/* 0xB6 */ 0x1F, 0xE7, 0xFD, 0xF3, 0x7E, 0x6F, 0xCD, 0xF9, 0xBF, 0x37, 0xE6, 0x7C, 0xCF, 0x98, 0xF3, 0x06, 0x60, 0xCC, 0x19, 0x83, 0x30, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x60, 0xCC,\n/* 0xB7 */ 0xF0,\n/* 0xB8 */ 0x10, 0xF0, 0xE3, 0x78,\n/* 0xB9 */ 0x2F, 0xB6, 0xDB, 0x6C,\n/* 0xBA */ 0x79, 0x38, 0x61, 0x86, 0x1C, 0xDE, 0x00, 0x0F, 0xC0,\n/* 0xBB */ 0x88, 0xC6, 0xE7, 0x21, 0x21, 0xE7, 0xC6, 0x88,\n/* 0xBC */ 0x20, 0x08, 0x30, 0x0C, 0x38, 0x04, 0x0C, 0x06, 0x06, 0x02, 0x03, 0x02, 0x01, 0x81, 0x00, 0xC1, 0x06, 0x61, 0x87, 0x30, 0x83, 0x80, 0xC2, 0xC0, 0x42, 0x60, 0x43, 0x30, 0x21, 0xFC, 0x20, 0x0C, 0x30, 0x06, 0x10, 0x03, 0x00,\n/* 0xBD */ 0x20, 0x00, 0x08, 0x02, 0x06, 0x01, 0x83, 0x80, 0x40, 0x60, 0x20, 0x18, 0x18, 0x06, 0x04, 0x01, 0x83, 0x00, 0x61, 0x9F, 0x98, 0x4E, 0x76, 0x33, 0x0C, 0x08, 0x03, 0x04, 0x03, 0x83, 0x01, 0x80, 0x81, 0x80, 0x60, 0xC0, 0x30, 0x3F, 0xC8, 0x0F, 0xF0,\n/* 0xBE */ 0x7C, 0x00, 0x18, 0xC0, 0x43, 0x18, 0x18, 0x03, 0x02, 0x00, 0x60, 0xC0, 0x30, 0x10, 0x01, 0x84, 0x00, 0x31, 0x80, 0xC6, 0x20, 0xD8, 0xC8, 0x39, 0xF1, 0x07, 0x00, 0x41, 0x60, 0x18, 0x4C, 0x02, 0x11, 0x80, 0x83, 0xF8, 0x10, 0x06, 0x04, 0x00, 0xC1, 0x00, 0x18,\n/* 0xBF */ 0x0C, 0x06, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x60, 0x30, 0x30, 0x38, 0x38, 0x18, 0x0C, 0x06, 0x0F, 0x07, 0xC7, 0x7F, 0x1F, 0x00,\n/* 0xC0 */ 0x0C, 0xDB, 0xD3, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0xC1 */ 0x03, 0x80, 0x07, 0x00, 0x1B, 0x00, 0x36, 0x00, 0xEE, 0x01, 0x8C, 0x03, 0x18, 0x0C, 0x18, 0x18, 0x30, 0x30, 0x60, 0xFF, 0xE1, 0xFF, 0xC7, 0x01, 0xCC, 0x01, 0x98, 0x03, 0x60, 0x03, 0xC0, 0x06,\n/* 0xC2 */ 0xFF, 0x87, 0xFF, 0x30, 0x1D, 0x80, 0x6C, 0x03, 0x60, 0x1B, 0x01, 0x9F, 0xFC, 0xFF, 0xE6, 0x03, 0xB0, 0x0F, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0xDF, 0xFE, 0xFF, 0xC0,\n/* 0xC3 */ 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x00,\n/* 0xC4 */ 0x01, 0xC0, 0x01, 0xC0, 0x03, 0x60, 0x03, 0x60, 0x07, 0x60, 0x06, 0x30, 0x06, 0x30, 0x0C, 0x18, 0x0C, 0x18, 0x1C, 0x18, 0x18, 0x0C, 0x18, 0x0C, 0x30, 0x06, 0x30, 0x06, 0x70, 0x06, 0x7F, 0xFF, 0x7F, 0xFF,\n/* 0xC5 */ 0xFF, 0xFF, 0xFF, 0xF0, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x1F, 0xFE, 0xFF, 0xF6, 0x00, 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x1F, 0xFF, 0xFF, 0xF8,\n/* 0xC6 */ 0x7F, 0xFD, 0xFF, 0xF0, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x80, 0x1C, 0x00, 0x60, 0x03, 0x00, 0x18, 0x00, 0xE0, 0x07, 0x00, 0x18, 0x00, 0xC0, 0x06, 0x00, 0x3F, 0xFF, 0xFF, 0xFC,\n/* 0xC7 */ 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x7F, 0xFF, 0xFF, 0xFE, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x18,\n/* 0xC8 */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x8E, 0x00, 0xE6, 0x00, 0x37, 0x00, 0x1F, 0x00, 0x07, 0x9F, 0xF3, 0xCF, 0xF9, 0xE0, 0x00, 0xF0, 0x00, 0x7C, 0x00, 0x76, 0x00, 0x33, 0x80, 0x38, 0xF0, 0x78, 0x3F, 0xF8, 0x07, 0xF0, 0x00,\n/* 0xC9 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,\n/* 0xCA */ 0xC0, 0x3B, 0x01, 0xCC, 0x0E, 0x30, 0x70, 0xC3, 0x83, 0x1C, 0x0C, 0xE0, 0x37, 0x80, 0xFF, 0x03, 0xDC, 0x0E, 0x38, 0x30, 0x70, 0xC0, 0xE3, 0x03, 0x8C, 0x07, 0x30, 0x0E, 0xC0, 0x1C,\n/* 0xCB */ 0x01, 0xC0, 0x00, 0xE0, 0x00, 0xD8, 0x00, 0x6C, 0x00, 0x37, 0x00, 0x31, 0x80, 0x18, 0xC0, 0x18, 0x30, 0x0C, 0x18, 0x0E, 0x0E, 0x06, 0x03, 0x03, 0x01, 0x83, 0x00, 0x61, 0x80, 0x31, 0xC0, 0x1C, 0xC0, 0x06, 0x60, 0x03, 0x00,\n/* 0xCC */ 0xE0, 0x0F, 0xE0, 0x3F, 0xC0, 0x7F, 0x80, 0xFD, 0x83, 0x7B, 0x06, 0xF6, 0x0D, 0xE4, 0x13, 0xCC, 0x67, 0x98, 0xCF, 0x31, 0x9E, 0x36, 0x3C, 0x6C, 0x78, 0xD8, 0xF0, 0xA1, 0xE1, 0xC3, 0xC3, 0x86,\n/* 0xCD */ 0xC0, 0x1F, 0x00, 0xFC, 0x07, 0xE0, 0x3D, 0x81, 0xEE, 0x0F, 0x30, 0x78, 0xC3, 0xC7, 0x1E, 0x18, 0xF0, 0x67, 0x83, 0xBC, 0x0D, 0xE0, 0x3F, 0x01, 0xF8, 0x07, 0xC0, 0x18,\n/* 0xCE */ 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFE, 0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFC,\n/* 0xCF */ 0x07, 0xF0, 0x0F, 0xFE, 0x0F, 0x07, 0x8E, 0x00, 0xE6, 0x00, 0x37, 0x00, 0x1F, 0x00, 0x07, 0x80, 0x03, 0xC0, 0x01, 0xE0, 0x00, 0xF0, 0x00, 0x7C, 0x00, 0x76, 0x00, 0x33, 0x80, 0x38, 0xF0, 0x78, 0x3F, 0xF8, 0x07, 0xF0, 0x00,\n/* 0xD0 */ 0xFF, 0xFF, 0xFF, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1E, 0x00, 0xF0, 0x07, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x18,\n/* 0xD1 */ 0xFF, 0xC7, 0xFF, 0xB0, 0x0D, 0x80, 0x3C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x06, 0xFF, 0xF7, 0xFE, 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x18, 0x00, 0xC0, 0x00,\n/* 0xD2 */\n/* 0xD3 */ 0xFF, 0xEF, 0xFE, 0xC0, 0x06, 0x00, 0x30, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x0F, 0xFF, 0xFF, 0xF0,\n/* 0xD4 */ 0xFF, 0xFF, 0xFF, 0xF0, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00,\n/* 0xD5 */ 0xE0, 0x07, 0x60, 0x0E, 0x30, 0x1C, 0x38, 0x1C, 0x1C, 0x38, 0x0E, 0x70, 0x06, 0x60, 0x07, 0xE0, 0x03, 0xC0, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,\n/* 0xD6 */ 0x01, 0x80, 0x01, 0x80, 0x0F, 0xF0, 0x3F, 0xFC, 0x71, 0x8E, 0x61, 0x86, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0x61, 0x86, 0x71, 0x8E, 0x3F, 0xFC, 0x0F, 0xF0, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,\n/* 0xD7 */ 0x70, 0x1C, 0x70, 0x70, 0x61, 0xC0, 0xE3, 0x80, 0xEE, 0x00, 0xD8, 0x01, 0xF0, 0x01, 0xC0, 0x03, 0x80, 0x0D, 0x80, 0x3B, 0x80, 0x77, 0x01, 0xC7, 0x07, 0x07, 0x0E, 0x06, 0x38, 0x0E, 0xE0, 0x0E,\n/* 0xD8 */ 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0x61, 0x86, 0x79, 0x9E, 0x3F, 0xFC, 0x0F, 0xF0, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,\n/* 0xD9 */ 0x07, 0xE0, 0x1F, 0xF8, 0x38, 0x3C, 0x70, 0x0E, 0x60, 0x06, 0xE0, 0x07, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x03, 0x60, 0x06, 0x60, 0x06, 0x30, 0x0C, 0x1C, 0x38, 0xFE, 0x7F, 0xFE, 0x7F,\n/* 0xDA */ 0xCF, 0x30, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C,\n/* 0xDB */ 0x06, 0x60, 0x06, 0x60, 0x00, 0x00, 0xE0, 0x07, 0x60, 0x0E, 0x30, 0x1C, 0x38, 0x1C, 0x1C, 0x38, 0x0E, 0x70, 0x06, 0x60, 0x07, 0xE0, 0x03, 0xC0, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80,\n/* 0xDC */ 0x03, 0x80, 0x30, 0x06, 0x00, 0x00, 0x1E, 0x33, 0xFB, 0x71, 0xFE, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x6E, 0x0E, 0x71, 0xF3, 0xFF, 0x1F, 0x30,\n/* 0xDD */ 0x0C, 0x0C, 0x04, 0x00, 0x03, 0xE3, 0xFF, 0x8D, 0x80, 0xE0, 0x3E, 0x1F, 0x1C, 0x0C, 0x06, 0x0B, 0x8E, 0xFE, 0x3E, 0x00,\n/* 0xDE */ 0x07, 0x01, 0x80, 0xC0, 0x00, 0xCF, 0x3F, 0xEE, 0x1F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30,\n/* 0xDF */ 0x76, 0xC0, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60,\n/* 0xE0 */ 0x0C, 0x1B, 0x66, 0x98, 0x00, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x36, 0x19, 0xFE, 0x1E, 0x00,\n/* 0xE1 */ 0x1E, 0x33, 0xFB, 0x71, 0xFE, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x6E, 0x0E, 0x71, 0xF3, 0xFF, 0x1F, 0x30,\n/* 0xE2 */ 0x1F, 0x0F, 0xF1, 0x87, 0x60, 0x6C, 0x0D, 0x83, 0x33, 0x86, 0x7C, 0xC1, 0xD8, 0x1F, 0x01, 0xE0, 0x3C, 0x07, 0xC0, 0xFC, 0x36, 0xFE, 0xCF, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x00,\n/* 0xE3 */ 0x60, 0x66, 0x06, 0x60, 0x63, 0x0C, 0x30, 0xC3, 0x8C, 0x19, 0x81, 0x98, 0x1F, 0x80, 0xF0, 0x0F, 0x00, 0xF0, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 0xE4 */ 0x7F, 0xCF, 0xF8, 0xE0, 0x07, 0x01, 0xF0, 0x7F, 0x1C, 0x77, 0x07, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0xC1, 0x9C, 0x71, 0xFC, 0x1F, 0x00,\n/* 0xE5 */ 0x3E, 0x3F, 0xF8, 0xD8, 0x0E, 0x03, 0xE1, 0xF1, 0xC0, 0xC0, 0x60, 0xB8, 0xEF, 0xE3, 0xE0,\n/* 0xE6 */ 0x3F, 0x9F, 0xC0, 0xC1, 0xC1, 0xC0, 0xC0, 0xC0, 0xC0, 0x60, 0x70, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x80, 0xFC, 0x3F, 0x80, 0xC0, 0x60, 0x70, 0xF0, 0x70,\n/* 0xE7 */ 0xCF, 0x3F, 0xEE, 0x1F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30,\n/* 0xE8 */ 0x1F, 0x07, 0xF1, 0xC7, 0x30, 0x6C, 0x07, 0x80, 0xF0, 0x1F, 0xFF, 0xFF, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x0E, 0xC1, 0x9C, 0x71, 0xFC, 0x1F, 0x00,\n/* 0xE9 */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 0xEA */ 0xC1, 0xB0, 0xCC, 0x63, 0x30, 0xD8, 0x3C, 0x0F, 0x83, 0x60, 0xCC, 0x31, 0x8C, 0x73, 0x0C, 0xC1, 0x80,\n/* 0xEB */ 0x0C, 0x00, 0x60, 0x01, 0x80, 0x0C, 0x00, 0x60, 0x01, 0x80, 0x1C, 0x00, 0xF0, 0x0D, 0x80, 0x6C, 0x06, 0x30, 0x31, 0x83, 0x8E, 0x18, 0x30, 0xC1, 0x8C, 0x06, 0x60, 0x30,\n/* 0xEC */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF8, 0x7E, 0x1F, 0xFF, 0xDE, 0xF0, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x00,\n/* 0xED */ 0xC0, 0x78, 0x0D, 0x83, 0x30, 0x66, 0x0C, 0x63, 0x0C, 0x60, 0xD8, 0x1B, 0x03, 0x60, 0x38, 0x07, 0x00, 0x40,\n/* 0xEE */ 0x1F, 0x1F, 0x9C, 0x0C, 0x07, 0x01, 0xF8, 0x3C, 0x70, 0x70, 0x30, 0x30, 0x18, 0x0C, 0x06, 0x01, 0xC0, 0xFC, 0x1F, 0x00, 0xC0, 0x60, 0x70, 0xF0, 0x70,\n/* 0xEF */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1D, 0xC7, 0x1F, 0xC1, 0xF0,\n/* 0xF0 */ 0xFF, 0xFF, 0xFF, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0xF1 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x6C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x7C, 0x1F, 0xC7, 0x7F, 0xCD, 0xF1, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x18, 0x00,\n/* 0xF2 */ 0x07, 0xE3, 0xFC, 0xE0, 0x30, 0x06, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x1C, 0x01, 0xC0, 0x1F, 0x80, 0xF8, 0x03, 0x80, 0x30, 0x0E, 0x0F, 0x81, 0xE0,\n/* 0xF3 */ 0x1F, 0xF9, 0xFF, 0xDC, 0x39, 0xC0, 0xCC, 0x03, 0x60, 0x1B, 0x00, 0xD8, 0x06, 0xC0, 0x37, 0x03, 0x9C, 0x38, 0x7F, 0x81, 0xF8, 0x00,\n/* 0xF4 */ 0xFF, 0xF3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30,\n/* 0xF5 */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x36, 0x19, 0xFE, 0x1E, 0x00,\n/* 0xF6 */ 0x19, 0xE0, 0xEF, 0xC6, 0x31, 0xB8, 0xC3, 0xC3, 0x0F, 0x0C, 0x3C, 0x30, 0xF0, 0xC3, 0xE3, 0x1D, 0x8C, 0x67, 0xB7, 0x0F, 0xF8, 0x0F, 0xC0, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 0xF7 */ 0x60, 0x33, 0x03, 0x8C, 0x18, 0x71, 0xC1, 0x8C, 0x0E, 0xC0, 0x36, 0x00, 0xE0, 0x07, 0x00, 0x38, 0x01, 0xC0, 0x1B, 0x00, 0xDC, 0x0C, 0x60, 0xE3, 0x86, 0x0C, 0x70, 0x33, 0x01, 0x80,\n/* 0xF8 */ 0xC3, 0x0F, 0x0C, 0x3C, 0x30, 0xF0, 0xC3, 0xC3, 0x0F, 0x0C, 0x3C, 0x30, 0xF0, 0xC3, 0xC3, 0x0F, 0x8C, 0x77, 0x33, 0x8F, 0xFC, 0x1F, 0xE0, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x0C, 0x00,\n/* 0xF9 */ 0x30, 0x0C, 0x60, 0x06, 0x60, 0x06, 0xE1, 0x87, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xE1, 0x87, 0x63, 0xC6, 0x7E, 0x7E, 0x3C, 0x38,\n/* 0xFA */ 0xCF, 0x30, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C,\n/* 0xFB */ 0x33, 0x0C, 0xC0, 0x03, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xD8, 0x67, 0xF8, 0x78,\n/* 0xFC */ 0x07, 0x00, 0xC0, 0x30, 0x00, 0x01, 0xF0, 0x7F, 0x1C, 0x77, 0x07, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0xC1, 0xDC, 0x71, 0xFC, 0x1F, 0x00,\n/* 0xFD */ 0x06, 0x03, 0x00, 0x80, 0x00, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC0, 0xF0, 0x36, 0x19, 0xFE, 0x1E, 0x00,\n/* 0xFE */ 0x00, 0xC0, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x30, 0x0C, 0x60, 0x06, 0x60, 0x06, 0xE1, 0x87, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xC1, 0x83, 0xE1, 0x87, 0x63, 0xC6, 0x7E, 0x7E, 0x3C, 0x38,\n/* 0xFF */\n};\n\nconst GFXglyph FreeSans12pt_Win1253Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   19,   20,   21,    1,  -17 },\n/* 0x02 */ {    48,   19,   20,   21,    1,  -17 },\n/* 0x03 */ {    96,   21,   20,   23,    1,  -17 },\n/* 0x04 */ {   149,   21,   20,   23,    1,  -17 },\n/* 0x05 */ {   202,   20,   20,   22,    1,  -17 },\n/* 0x06 */ {   252,   20,   20,   22,    1,  -17 },\n/* 0x07 */ {   302,    0,    0,    8,    0,    0 },\n/* 0x08 */ {   302,   23,   20,   25,    1,  -17 },\n/* 0x09 */ {   360,   23,   16,   25,    1,  -16 },\n/* 0x0A */ {   406,    0,    0,    8,    0,    0 },\n/* 0x0B */ {   406,   21,   20,   23,    1,  -17 },\n/* 0x0C */ {   459,   19,   18,   21,    1,  -15 },\n/* 0x0D */ {   502,    0,    0,    8,    0,    0 },\n/* 0x0E */ {   502,   20,   20,   22,    1,  -17 },\n/* 0x0F */ {   552,   21,   21,   23,    1,  -18 },\n/* 0x10 */ {   608,   19,   20,   21,    1,  -17 },\n/* 0x11 */ {   656,   21,   20,   23,    1,  -17 },\n/* 0x12 */ {   709,   20,   20,   22,    1,  -17 },\n/* 0x13 */ {   759,   21,   20,   23,    1,  -17 },\n/* 0x14 */ {   812,   21,   20,   23,    1,  -17 },\n/* 0x15 */ {   865,   22,   20,   24,    1,  -17 },\n/* 0x16 */ {   920,   16,   20,   18,    1,  -17 },\n/* 0x17 */ {   960,   21,   20,   23,    1,  -17 },\n/* 0x18 */ {  1013,   23,   20,   25,    1,  -17 },\n/* 0x19 */ {  1071,   21,   20,   23,    1,  -17 },\n/* 0x1A */ {  1124,   15,   19,   17,    1,  -16 },\n/* 0x1B */ {  1160,   24,   21,   26,    1,  -18 },\n/* 0x1C */ {  1223,   21,   20,   23,    1,  -17 },\n/* 0x1D */ {  1276,   21,   21,   23,    1,  -18 },\n/* 0x1E */ {  1332,   20,   20,   22,    1,  -17 },\n/* 0x1F */ {  1382,   15,   20,   17,    1,  -17 },\n/* ' ' 0x20 */ {  1420,    0,    0,    6,    0,    0 },\n/* '!' 0x21 */ {  1420,    2,   18,    8,    3,  -16 },\n/* '\"' 0x22 */ {  1425,    6,    6,    8,    1,  -15 },\n/* '#' 0x23 */ {  1430,   13,   16,   13,    0,  -14 },\n/* '$' 0x24 */ {  1456,   11,   20,   13,    1,  -16 },\n/* '%' 0x25 */ {  1484,   20,   17,   21,    1,  -15 },\n/* '&' 0x26 */ {  1527,   14,   17,   16,    1,  -15 },\n/* ''' 0x27 */ {  1557,    2,    6,    5,    1,  -15 },\n/* '(' 0x28 */ {  1559,    5,   23,    8,    2,  -16 },\n/* ')' 0x29 */ {  1574,    5,   23,    8,    1,  -16 },\n/* '*' 0x2A */ {  1589,    7,    7,    9,    1,  -16 },\n/* '+' 0x2B */ {  1596,   10,   11,   14,    2,   -9 },\n/* ',' 0x2C */ {  1610,    2,    6,    7,    2,    0 },\n/* '-' 0x2D */ {  1612,    6,    2,    8,    1,   -6 },\n/* '.' 0x2E */ {  1614,    2,    2,    6,    2,    0 },\n/* '/' 0x2F */ {  1615,    7,   18,    7,    0,  -16 },\n/* '0' 0x30 */ {  1631,   11,   17,   13,    1,  -15 },\n/* '1' 0x31 */ {  1655,    5,   17,   13,    3,  -15 },\n/* '2' 0x32 */ {  1666,   11,   17,   13,    1,  -15 },\n/* '3' 0x33 */ {  1690,   11,   17,   13,    1,  -15 },\n/* '4' 0x34 */ {  1714,   11,   17,   13,    1,  -15 },\n/* '5' 0x35 */ {  1738,   11,   17,   13,    1,  -15 },\n/* '6' 0x36 */ {  1762,   11,   17,   13,    1,  -15 },\n/* '7' 0x37 */ {  1786,   11,   17,   13,    1,  -15 },\n/* '8' 0x38 */ {  1810,   11,   17,   13,    1,  -15 },\n/* '9' 0x39 */ {  1834,   11,   17,   13,    1,  -15 },\n/* ':' 0x3A */ {  1858,    2,   13,    6,    2,  -11 },\n/* ';' 0x3B */ {  1862,    2,   16,    6,    2,  -10 },\n/* '<' 0x3C */ {  1866,   12,   11,   14,    1,   -9 },\n/* '=' 0x3D */ {  1883,   12,    6,   14,    1,   -7 },\n/* '>' 0x3E */ {  1892,   12,   11,   14,    1,   -9 },\n/* '?' 0x3F */ {  1909,   10,   18,   13,    2,  -16 },\n/* '@' 0x40 */ {  1932,   22,   21,   24,    1,  -16 },\n/* 'A' 0x41 */ {  1990,   14,   18,   16,    1,  -16 },\n/* 'B' 0x42 */ {  2022,   13,   18,   16,    2,  -16 },\n/* 'C' 0x43 */ {  2052,   15,   18,   17,    1,  -16 },\n/* 'D' 0x44 */ {  2086,   14,   18,   17,    2,  -16 },\n/* 'E' 0x45 */ {  2118,   12,   18,   15,    2,  -16 },\n/* 'F' 0x46 */ {  2145,   11,   18,   14,    2,  -16 },\n/* 'G' 0x47 */ {  2170,   16,   18,   18,    1,  -16 },\n/* 'H' 0x48 */ {  2206,   13,   18,   17,    2,  -16 },\n/* 'I' 0x49 */ {  2236,    2,   18,    7,    2,  -16 },\n/* 'J' 0x4A */ {  2241,    9,   18,   13,    1,  -16 },\n/* 'K' 0x4B */ {  2262,   13,   18,   16,    2,  -16 },\n/* 'L' 0x4C */ {  2292,   10,   18,   14,    2,  -16 },\n/* 'M' 0x4D */ {  2315,   16,   18,   20,    2,  -16 },\n/* 'N' 0x4E */ {  2351,   13,   18,   18,    2,  -16 },\n/* 'O' 0x4F */ {  2381,   17,   18,   19,    1,  -16 },\n/* 'P' 0x50 */ {  2420,   12,   18,   16,    2,  -16 },\n/* 'Q' 0x51 */ {  2447,   17,   19,   19,    1,  -16 },\n/* 'R' 0x52 */ {  2488,   14,   18,   17,    2,  -16 },\n/* 'S' 0x53 */ {  2520,   14,   18,   16,    1,  -16 },\n/* 'T' 0x54 */ {  2552,   12,   18,   15,    1,  -16 },\n/* 'U' 0x55 */ {  2579,   13,   18,   17,    2,  -16 },\n/* 'V' 0x56 */ {  2609,   14,   18,   15,    1,  -16 },\n/* 'W' 0x57 */ {  2641,   22,   18,   22,    0,  -16 },\n/* 'X' 0x58 */ {  2691,   14,   18,   16,    1,  -16 },\n/* 'Y' 0x59 */ {  2723,   14,   18,   16,    1,  -16 },\n/* 'Z' 0x5A */ {  2755,   13,   18,   15,    1,  -16 },\n/* '[' 0x5B */ {  2785,    4,   23,    7,    2,  -16 },\n/* '\\' 0x5C */ {  2797,    7,   18,    7,    0,  -16 },\n/* ']' 0x5D */ {  2813,    4,   23,    7,    1,  -16 },\n/* '^' 0x5E */ {  2825,    9,    9,   11,    1,  -15 },\n/* '_' 0x5F */ {  2836,   15,    1,   13,   -1,    5 },\n/* '`' 0x60 */ {  2838,    5,    4,    6,    1,  -16 },\n/* 'a' 0x61 */ {  2841,   12,   13,   13,    1,  -11 },\n/* 'b' 0x62 */ {  2861,   12,   18,   13,    1,  -16 },\n/* 'c' 0x63 */ {  2888,   10,   13,   12,    1,  -11 },\n/* 'd' 0x64 */ {  2905,   11,   18,   13,    1,  -16 },\n/* 'e' 0x65 */ {  2930,   11,   13,   13,    1,  -11 },\n/* 'f' 0x66 */ {  2948,    5,   18,    7,    1,  -16 },\n/* 'g' 0x67 */ {  2960,   11,   18,   13,    1,  -11 },\n/* 'h' 0x68 */ {  2985,   10,   18,   13,    1,  -16 },\n/* 'i' 0x69 */ {  3008,    2,   18,    5,    2,  -16 },\n/* 'j' 0x6A */ {  3013,    4,   23,    6,    0,  -16 },\n/* 'k' 0x6B */ {  3025,   10,   18,   12,    1,  -16 },\n/* 'l' 0x6C */ {  3048,    2,   18,    5,    1,  -16 },\n/* 'm' 0x6D */ {  3053,   17,   13,   19,    1,  -11 },\n/* 'n' 0x6E */ {  3081,   10,   13,   13,    1,  -11 },\n/* 'o' 0x6F */ {  3098,   11,   13,   13,    1,  -11 },\n/* 'p' 0x70 */ {  3116,   12,   17,   13,    1,  -11 },\n/* 'q' 0x71 */ {  3142,   11,   17,   13,    1,  -11 },\n/* 'r' 0x72 */ {  3166,    6,   13,    8,    1,  -11 },\n/* 's' 0x73 */ {  3176,   10,   13,   12,    1,  -11 },\n/* 't' 0x74 */ {  3193,    5,   16,    7,    1,  -14 },\n/* 'u' 0x75 */ {  3203,   10,   13,   13,    1,  -11 },\n/* 'v' 0x76 */ {  3220,   11,   13,   12,    0,  -11 },\n/* 'w' 0x77 */ {  3238,   17,   13,   17,    0,  -11 },\n/* 'x' 0x78 */ {  3266,   10,   13,   11,    1,  -11 },\n/* 'y' 0x79 */ {  3283,   11,   18,   11,    0,  -11 },\n/* 'z' 0x7A */ {  3308,   10,   13,   12,    1,  -11 },\n/* '{' 0x7B */ {  3325,    5,   23,    8,    1,  -16 },\n/* '|' 0x7C */ {  3340,    2,   23,    6,    2,  -16 },\n/* '}' 0x7D */ {  3346,    5,   23,    8,    2,  -16 },\n/* '~' 0x7E */ {  3361,   10,    5,   12,    1,   -9 },\n/* 0x7F */ {  3368,    0,    0,    0,    0,    0 },\n/* 0x80 */ {  3368,   14,   17,   16,    1,  -15 },\n/* 0x81 */ {  3398,    0,    0,    8,    0,    0 },\n/* 0x82 */ {  3398,    2,    5,    6,    2,    0 },\n/* 0x83 */ {  3400,    6,   23,    7,    0,  -16 },\n/* 0x84 */ {  3418,    6,    5,   10,    2,    0 },\n/* 0x85 */ {  3422,   12,    2,   16,    2,    0 },\n/* 0x86 */ {  3425,   10,   21,   13,    2,  -15 },\n/* 0x87 */ {  3452,   10,   20,   13,    2,  -15 },\n/* 0x88 */ {  3477,    7,    4,    8,    0,  -16 },\n/* 0x89 */ {  3481,   23,   18,   24,    0,  -16 },\n/* 0x8A */ {  3533,   14,   21,   16,    1,  -19 },\n/* 0x8B */ {  3570,    3,    8,    6,    1,   -9 },\n/* 0x8C */ {  3573,   22,   18,   24,    1,  -16 },\n/* 0x8D */ {  3623,    0,    0,    8,    0,    0 },\n/* 0x8E */ {  3623,   13,   21,   15,    1,  -19 },\n/* 0x8F */ {  3658,    0,    0,    8,    0,    0 },\n/* 0x90 */ {  3658,    0,    0,    8,    0,    0 },\n/* 0x91 */ {  3658,    2,    6,    6,    2,  -16 },\n/* 0x92 */ {  3660,    2,    6,    6,    2,  -16 },\n/* 0x93 */ {  3662,    6,    6,   10,    2,  -16 },\n/* 0x94 */ {  3667,    6,    6,   10,    2,  -16 },\n/* 0x95 */ {  3672,    6,    6,   10,    2,   -9 },\n/* 0x96 */ {  3677,   10,    2,   12,    1,   -6 },\n/* 0x97 */ {  3680,   22,    2,   24,    1,   -6 },\n/* 0x98 */ {  3686,    7,    3,    8,    0,  -16 },\n/* 0x99 */ {  3689,   22,   13,   24,    2,  -16 },\n/* 0x9A */ {  3725,   10,   18,   12,    1,  -16 },\n/* 0x9B */ {  3748,    3,    8,    6,    2,   -8 },\n/* 0x9C */ {  3751,   20,   13,   22,    1,  -11 },\n/* 0x9D */ {  3784,    0,    0,    8,    0,    0 },\n/* 0x9E */ {  3784,   10,   18,   12,    1,  -16 },\n/* 0x9F */ {  3807,   14,   21,   16,    1,  -19 },\n/* 0xA0 */ {  3844,    0,    0,    7,    0,    0 },\n/* 0xA1 */ {  3844,    2,   18,    8,    3,  -11 },\n/* 0xA2 */ {  3849,   11,   17,   13,    1,  -13 },\n/* 0xA3 */ {  3873,   12,   18,   13,    0,  -16 },\n/* 0xA4 */ {  3900,    9,    9,   13,    2,  -11 },\n/* 0xA5 */ {  3911,   12,   17,   13,    1,  -15 },\n/* 0xA6 */ {  3937,    2,   23,    6,    2,  -16 },\n/* 0xA7 */ {  3943,   11,   23,   13,    1,  -16 },\n/* 0xA8 */ {  3975,    6,    2,    8,    1,  -15 },\n/* 0xA9 */ {  3977,   18,   17,   19,    1,  -15 },\n/* 0xAA */ {  4016,    7,   11,    9,    1,  -16 },\n/* 0xAB */ {  4026,    8,    8,   12,    2,   -9 },\n/* 0xAC */ {  4034,   12,    6,   14,    1,   -7 },\n/* 0xAD */ {  4043,    6,    2,    8,    1,   -6 },\n/* 0xAE */ {  4045,   18,   17,   19,    1,  -15 },\n/* 0xAF */ {  4084,    6,    2,    8,    1,  -15 },\n/* 0xB0 */ {  4086,    7,    8,   15,    4,  -15 },\n/* 0xB1 */ {  4093,   12,   15,   14,    1,  -13 },\n/* 0xB2 */ {  4116,    7,   10,    8,    1,  -17 },\n/* 0xB3 */ {  4125,    7,   10,    8,    1,  -17 },\n/* 0xB4 */ {  4134,    5,    4,    8,    2,  -16 },\n/* 0xB5 */ {  4137,   12,   17,   13,    2,  -11 },\n/* 0xB6 */ {  4163,   11,   21,   13,    2,  -16 },\n/* 0xB7 */ {  4192,    2,    2,    6,    2,   -6 },\n/* 0xB8 */ {  4193,    6,    5,    8,    1,    2 },\n/* 0xB9 */ {  4197,    3,   10,    8,    3,  -18 },\n/* 0xBA */ {  4201,    6,   11,    9,    1,  -16 },\n/* 0xBB */ {  4210,    8,    8,   12,    2,   -8 },\n/* 0xBC */ {  4218,   17,   17,   21,    3,  -15 },\n/* 0xBD */ {  4255,   18,   18,   21,    3,  -16 },\n/* 0xBE */ {  4296,   19,   18,   21,    1,  -16 },\n/* 0xBF */ {  4339,    9,   18,   13,    3,  -11 },\n/* 0xC0 */ {  4360,    8,   18,    6,   -1,  -18 },\n/* 0xC1 */ {  4378,   15,   17,   15,    0,  -17 },\n/* 0xC2 */ {  4410,   13,   17,   16,    2,  -17 },\n/* 0xC3 */ {  4438,   11,   17,   13,    2,  -17 },\n/* 0xC4 */ {  4462,   16,   17,   16,   -1,  -17 },\n/* 0xC5 */ {  4496,   13,   17,   16,    2,  -17 },\n/* 0xC6 */ {  4524,   14,   17,   15,    0,  -17 },\n/* 0xC7 */ {  4554,   13,   17,   17,    2,  -17 },\n/* 0xC8 */ {  4582,   17,   17,   19,    1,  -17 },\n/* 0xC9 */ {  4619,    2,   17,    6,    2,  -17 },\n/* 0xCA */ {  4624,   14,   17,   16,    2,  -17 },\n/* 0xCB */ {  4654,   17,   17,   16,   -1,  -17 },\n/* 0xCC */ {  4691,   15,   17,   19,    2,  -17 },\n/* 0xCD */ {  4723,   13,   17,   17,    2,  -17 },\n/* 0xCE */ {  4751,   14,   17,   16,    1,  -17 },\n/* 0xCF */ {  4781,   17,   17,   19,    1,  -17 },\n/* 0xD0 */ {  4818,   13,   17,   17,    2,  -17 },\n/* 0xD1 */ {  4846,   13,   17,   16,    2,  -17 },\n/* 0xD2 */ {  4874,    0,    0,    5,    0,    0 },\n/* 0xD3 */ {  4874,   12,   17,   15,    2,  -17 },\n/* 0xD4 */ {  4900,   14,   17,   14,    0,  -17 },\n/* 0xD5 */ {  4930,   16,   17,   16,    0,  -17 },\n/* 0xD6 */ {  4964,   16,   17,   18,    1,  -17 },\n/* 0xD7 */ {  4998,   15,   17,   15,    0,  -17 },\n/* 0xD8 */ {  5030,   16,   17,   19,    2,  -17 },\n/* 0xD9 */ {  5064,   16,   17,   18,    1,  -17 },\n/* 0xDA */ {  5098,    6,   20,    6,    0,  -20 },\n/* 0xDB */ {  5113,   16,   20,   16,    0,  -20 },\n/* 0xDC */ {  5153,   12,   17,   14,    1,  -17 },\n/* 0xDD */ {  5179,    9,   17,   11,    1,  -17 },\n/* 0xDE */ {  5199,   10,   22,   14,    2,  -17 },\n/* 0xDF */ {  5227,    4,   17,    6,    1,  -17 },\n/* 0xE0 */ {  5236,   10,   17,   14,    2,  -17 },\n/* 0xE1 */ {  5258,   12,   13,   14,    1,  -13 },\n/* 0xE2 */ {  5278,   11,   22,   14,    2,  -17 },\n/* 0xE3 */ {  5309,   12,   18,   11,   -1,  -13 },\n/* 0xE4 */ {  5336,   11,   17,   13,    1,  -17 },\n/* 0xE5 */ {  5360,    9,   13,   11,    1,  -13 },\n/* 0xE6 */ {  5375,    9,   22,   11,    1,  -17 },\n/* 0xE7 */ {  5400,   10,   18,   14,    2,  -13 },\n/* 0xE8 */ {  5423,   11,   17,   13,    1,  -17 },\n/* 0xE9 */ {  5447,    2,   13,    6,    2,  -13 },\n/* 0xEA */ {  5451,   10,   13,   12,    2,  -13 },\n/* 0xEB */ {  5468,   13,   17,   12,   -1,  -17 },\n/* 0xEC */ {  5496,   10,   18,   14,    2,  -13 },\n/* 0xED */ {  5519,   11,   13,   11,    0,  -13 },\n/* 0xEE */ {  5537,    9,   22,   11,    1,  -17 },\n/* 0xEF */ {  5562,   11,   13,   13,    1,  -13 },\n/* 0xF0 */ {  5580,   16,   13,   17,    0,  -13 },\n/* 0xF1 */ {  5606,   11,   18,   14,    2,  -13 },\n/* 0xF2 */ {  5631,   11,   18,   12,    1,  -13 },\n/* 0xF3 */ {  5656,   13,   13,   15,    1,  -13 },\n/* 0xF4 */ {  5678,    6,   13,    9,    1,  -13 },\n/* 0xF5 */ {  5688,   10,   13,   14,    2,  -13 },\n/* 0xF6 */ {  5705,   14,   18,   16,    1,  -13 },\n/* 0xF7 */ {  5737,   13,   18,   13,    0,  -13 },\n/* 0xF8 */ {  5767,   14,   18,   18,    2,  -13 },\n/* 0xF9 */ {  5799,   16,   13,   18,    1,  -13 },\n/* 0xFA */ {  5825,    6,   16,    6,    0,  -16 },\n/* 0xFB */ {  5837,   10,   16,   14,    2,  -16 },\n/* 0xFC */ {  5857,   11,   17,   13,    1,  -17 },\n/* 0xFD */ {  5881,   10,   17,   14,    2,  -17 },\n/* 0xFE */ {  5903,   16,   17,   18,    1,  -17 },\n/* 0xFF */ {  5937,    0,    0,    5,    0,    0 },\n};\n\nconst GFXfont FreeSans12pt_Win1253 PROGMEM = {\n(uint8_t*)FreeSans12pt_Win1253Bitmaps,\n(GFXglyph*)FreeSans12pt_Win1253Glyphs,\n0x01, 0xFF, 19\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans6pt7b.h",
    "content": "#pragma once\nconst uint8_t FreeSans6pt7bBitmaps[] PROGMEM = {\n    /* ' ' 0x20 */\n    /* '!' 0x21 */ 0xFE, 0x80,\n    /* '\"' 0x22 */ 0xB6, 0x80,\n    /* '#' 0x23 */ 0x24, 0x49, 0xF9, 0x42, 0x9F, 0x92, 0x28,\n    /* '$' 0x24 */ 0x23, 0xAB, 0x5A, 0x38, 0xB5, 0xAB, 0x88,\n    /* '%' 0x25 */ 0x71, 0x22, 0x88, 0xA2, 0x30, 0x74, 0x02, 0x60, 0xA4, 0x49, 0x11, 0x80,\n    /* '&' 0x26 */ 0x31, 0x24, 0x8C, 0x72, 0x58, 0xA3, 0x74,\n    /* ''' 0x27 */ 0xE0,\n    /* '(' 0x28 */ 0x5A, 0xAA, 0x94,\n    /* ')' 0x29 */ 0x89, 0x12, 0x49, 0x49, 0x00,\n    /* '*' 0x2A */ 0x5E, 0x80,\n    /* '+' 0x2B */ 0x21, 0x3E, 0x42, 0x00,\n    /* ',' 0x2C */ 0xE0,\n    /* '-' 0x2D */ 0xE0,\n    /* '.' 0x2E */ 0x80,\n    /* '/' 0x2F */ 0x25, 0x24, 0xA4, 0x80,\n    /* '0' 0x30 */ 0x76, 0xE3, 0x18, 0xC6, 0x3B, 0x70,\n    /* '1' 0x31 */ 0x5D, 0x55, 0x40,\n    /* '2' 0x32 */ 0x74, 0x42, 0x11, 0x11, 0x10, 0xF8,\n    /* '3' 0x33 */ 0x74, 0x42, 0x13, 0x04, 0x31, 0x70,\n    /* '4' 0x34 */ 0x11, 0x8C, 0xA9, 0x4B, 0xE2, 0x10,\n    /* '5' 0x35 */ 0x7D, 0x04, 0x1E, 0x4C, 0x10, 0x63, 0x78,\n    /* '6' 0x36 */ 0x72, 0x61, 0xE8, 0xC6, 0x39, 0x70,\n    /* '7' 0x37 */ 0xF8, 0x44, 0x22, 0x11, 0x08, 0x40,\n    /* '8' 0x38 */ 0x7A, 0x18, 0x61, 0x7A, 0x18, 0x61, 0x78,\n    /* '9' 0x39 */ 0x7B, 0x28, 0x61, 0xCD, 0xD0, 0x62, 0x70,\n    /* ':' 0x3A */ 0x82,\n    /* ';' 0x3B */ 0x87,\n    /* '<' 0x3C */ 0x3E, 0x30, 0x60, 0x80,\n    /* '=' 0x3D */ 0xF8, 0x3E,\n    /* '>' 0x3E */ 0xE0, 0xC6, 0xC8, 0x00,\n    /* '?' 0x3F */ 0x74, 0x42, 0x11, 0x10, 0x80, 0x20,\n    /* '@' 0x40 */ 0x0F, 0x06, 0x19, 0x3B, 0xC4, 0x99, 0x13, 0x22, 0x64, 0x96, 0x6E, 0x40, 0x04, 0x00, 0x7C, 0x00,\n    /* 'A' 0x41 */ 0x18, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n    /* 'B' 0x42 */ 0xFA, 0x18, 0x61, 0xFA, 0x18, 0x61, 0xF8,\n    /* 'C' 0x43 */ 0x3E, 0x41, 0x80, 0x80, 0x80, 0x80, 0x81, 0x43, 0x3E,\n    /* 'D' 0x44 */ 0xF9, 0x0A, 0x0C, 0x18, 0x30, 0x60, 0xC2, 0xF8,\n    /* 'E' 0x45 */ 0xFE, 0x08, 0x20, 0xFA, 0x08, 0x20, 0xFC,\n    /* 'F' 0x46 */ 0xFC, 0x21, 0x0F, 0xC2, 0x10, 0x80,\n    /* 'G' 0x47 */ 0x3E, 0x41, 0x80, 0x80, 0x87, 0x81, 0xC1, 0x43, 0x3D,\n    /* 'H' 0x48 */ 0x83, 0x06, 0x0C, 0x1F, 0xF0, 0x60, 0xC1, 0x82,\n    /* 'I' 0x49 */ 0xFF, 0x80,\n    /* 'J' 0x4A */ 0x08, 0x42, 0x10, 0x86, 0x31, 0x70,\n    /* 'K' 0x4B */ 0x86, 0x29, 0x28, 0xD2, 0x48, 0xA1, 0x84,\n    /* 'L' 0x4C */ 0x84, 0x21, 0x08, 0x42, 0x10, 0xF8,\n    /* 'M' 0x4D */ 0xC3, 0xC3, 0xC3, 0xA5, 0xA5, 0xA5, 0x99, 0x99, 0x99,\n    /* 'N' 0x4E */ 0xC3, 0x86, 0x8D, 0x19, 0x33, 0x62, 0xC3, 0x86,\n    /* 'O' 0x4F */ 0x3E, 0x31, 0xB0, 0x70, 0x18, 0x0C, 0x07, 0x06, 0xC6, 0x3E, 0x00,\n    /* 'P' 0x50 */ 0xFA, 0x18, 0x61, 0xFA, 0x08, 0x20, 0x80,\n    /* 'Q' 0x51 */ 0x3E, 0x31, 0xB0, 0x70, 0x18, 0x0C, 0x07, 0x06, 0xC6, 0x3F, 0x00, 0x40,\n    /* 'R' 0x52 */ 0xF9, 0x0A, 0x14, 0x2F, 0x90, 0xA1, 0x42, 0x86,\n    /* 'S' 0x53 */ 0x7A, 0x18, 0x30, 0x78, 0x38, 0x71, 0x78,\n    /* 'T' 0x54 */ 0xFC, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10,\n    /* 'U' 0x55 */ 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xE3, 0x7C,\n    /* 'V' 0x56 */ 0xC2, 0x85, 0x0B, 0x22, 0x44, 0x8E, 0x0C, 0x18,\n    /* 'W' 0x57 */ 0x84, 0x38, 0xCD, 0x29, 0x25, 0x24, 0xA4, 0xD2, 0x8C, 0x61, 0x8C, 0x31, 0x80,\n    /* 'X' 0x58 */ 0x87, 0x34, 0x8C, 0x30, 0xC4, 0xA3, 0x84,\n    /* 'Y' 0x59 */ 0x82, 0x89, 0x11, 0x43, 0x82, 0x04, 0x08, 0x10,\n    /* 'Z' 0x5A */ 0x7E, 0x0C, 0x30, 0x41, 0x06, 0x18, 0x20, 0xFE,\n    /* '[' 0x5B */ 0xEA, 0xAA, 0xAB,\n    /* '\\' 0x5C */ 0x92, 0x24, 0x91, 0x20,\n    /* ']' 0x5D */ 0xD5, 0x55, 0x57,\n    /* '^' 0x5E */ 0x46, 0xA9, 0x10,\n    /* '_' 0x5F */ 0xFE,\n    /* '`' 0x60 */ 0x80,\n    /* 'a' 0x61 */ 0x79, 0x08, 0x11, 0xEC, 0x51, 0x9D, 0x80,\n    /* 'b' 0x62 */ 0x84, 0x3D, 0xB8, 0xC6, 0x3B, 0xF0,\n    /* 'c' 0x63 */ 0x7B, 0x18, 0x20, 0x83, 0x17, 0x80,\n    /* 'd' 0x64 */ 0x04, 0x17, 0xF3, 0x86, 0x18, 0x73, 0x74,\n    /* 'e' 0x65 */ 0x7B, 0x38, 0x7F, 0x83, 0x17, 0x80,\n    /* 'f' 0x66 */ 0x6B, 0xA4, 0x92, 0x40,\n    /* 'g' 0x67 */ 0x77, 0x38, 0x61, 0x87, 0x37, 0x41, 0x8D, 0xE0,\n    /* 'h' 0x68 */ 0x84, 0x2D, 0x98, 0xC6, 0x31, 0x88,\n    /* 'i' 0x69 */ 0xBF, 0x80,\n    /* 'j' 0x6A */ 0x45, 0x55, 0x57,\n    /* 'k' 0x6B */ 0x84, 0x25, 0x6E, 0x72, 0x52, 0x88,\n    /* 'l' 0x6C */ 0xFF, 0x80,\n    /* 'm' 0x6D */ 0xFF, 0x99, 0x91, 0x91, 0x91, 0x91, 0x91,\n    /* 'n' 0x6E */ 0xB6, 0x63, 0x18, 0xC6, 0x20,\n    /* 'o' 0x6F */ 0x7B, 0x38, 0x61, 0x87, 0x37, 0x80,\n    /* 'p' 0x70 */ 0xF6, 0xE3, 0x18, 0xEF, 0xD0, 0x80,\n    /* 'q' 0x71 */ 0x77, 0x38, 0x61, 0x87, 0x37, 0x41, 0x04,\n    /* 'r' 0x72 */ 0xBA, 0x49, 0x20,\n    /* 's' 0x73 */ 0x69, 0x8E, 0x19, 0x60,\n    /* 't' 0x74 */ 0x5D, 0x24, 0x93,\n    /* 'u' 0x75 */ 0x8C, 0x63, 0x18, 0xCD, 0xA0,\n    /* 'v' 0x76 */ 0x85, 0x24, 0x92, 0x30, 0xC3, 0x00,\n    /* 'w' 0x77 */ 0x89, 0x99, 0x59, 0x55, 0x56, 0x66, 0x26,\n    /* 'x' 0x78 */ 0x4A, 0x4C, 0x43, 0x27, 0x20,\n    /* 'y' 0x79 */ 0x85, 0x24, 0x92, 0x30, 0xC3, 0x08, 0x21, 0x80,\n    /* 'z' 0x7A */ 0x78, 0x44, 0x46, 0x23, 0xE0,\n    /* '{' 0x7B */ 0x69, 0x25, 0xB2, 0x49, 0x30,\n    /* '|' 0x7C */ 0xFF, 0xE0,\n    /* '}' 0x7D */ 0xC9, 0x24, 0xDA, 0x49, 0x60,\n    /* '~' 0x7E */ 0x66, 0x70,\n};\n\nconst GFXglyph FreeSans6pt7bGlyphs[] PROGMEM = {\n    /* ' ' 0x20 */ {0, 0, 0, 3, 0, 0},\n    /* '!' 0x21 */ {0, 1, 9, 4, 2, -8},\n    /* '\"' 0x22 */ {2, 3, 3, 4, 0, -8},\n    /* '#' 0x23 */ {4, 7, 8, 7, 0, -7},\n    /* '$' 0x24 */ {11, 5, 11, 7, 1, -9},\n    /* '%' 0x25 */ {18, 10, 9, 11, 0, -8},\n    /* '&' 0x26 */ {30, 6, 9, 8, 1, -8},\n    /* ''' 0x27 */ {37, 1, 3, 2, 1, -8},\n    /* '(' 0x28 */ {38, 2, 11, 4, 1, -8},\n    /* ')' 0x29 */ {41, 3, 11, 4, 0, -8},\n    /* '*' 0x2A */ {46, 3, 3, 5, 1, -8},\n    /* '+' 0x2B */ {48, 5, 5, 7, 1, -4},\n    /* ',' 0x2C */ {52, 1, 3, 3, 1, 0},\n    /* '-' 0x2D */ {53, 3, 1, 4, 1, -3},\n    /* '.' 0x2E */ {54, 1, 1, 3, 1, 0},\n    /* '/' 0x2F */ {55, 3, 9, 3, 0, -8},\n    /* '0' 0x30 */ {59, 5, 9, 7, 1, -8},\n    /* '1' 0x31 */ {65, 2, 9, 7, 2, -8},\n    /* '2' 0x32 */ {68, 5, 9, 7, 1, -8},\n    /* '3' 0x33 */ {74, 5, 9, 7, 1, -8},\n    /* '4' 0x34 */ {80, 5, 9, 7, 1, -8},\n    /* '5' 0x35 */ {86, 6, 9, 7, 0, -8},\n    /* '6' 0x36 */ {93, 5, 9, 7, 1, -8},\n    /* '7' 0x37 */ {99, 5, 9, 7, 1, -8},\n    /* '8' 0x38 */ {105, 6, 9, 7, 0, -8},\n    /* '9' 0x39 */ {112, 6, 9, 7, 0, -8},\n    /* ':' 0x3A */ {119, 1, 7, 3, 1, -6},\n    /* ';' 0x3B */ {120, 1, 8, 3, 1, -5},\n    /* '<' 0x3C */ {121, 5, 5, 7, 1, -4},\n    /* '=' 0x3D */ {125, 5, 3, 7, 1, -3},\n    /* '>' 0x3E */ {127, 5, 5, 7, 1, -4},\n    /* '?' 0x3F */ {131, 5, 9, 7, 1, -8},\n    /* '@' 0x40 */ {137, 11, 11, 12, 0, -8},\n    /* 'A' 0x41 */ {153, 8, 9, 8, 0, -8},\n    /* 'B' 0x42 */ {162, 6, 9, 8, 1, -8},\n    /* 'C' 0x43 */ {169, 8, 9, 9, 0, -8},\n    /* 'D' 0x44 */ {178, 7, 9, 8, 1, -8},\n    /* 'E' 0x45 */ {186, 6, 9, 8, 1, -8},\n    /* 'F' 0x46 */ {193, 5, 9, 7, 1, -8},\n    /* 'G' 0x47 */ {199, 8, 9, 9, 0, -8},\n    /* 'H' 0x48 */ {208, 7, 9, 9, 1, -8},\n    /* 'I' 0x49 */ {216, 1, 9, 3, 1, -8},\n    /* 'J' 0x4A */ {218, 5, 9, 6, 0, -8},\n    /* 'K' 0x4B */ {224, 6, 9, 8, 1, -8},\n    /* 'L' 0x4C */ {231, 5, 9, 7, 1, -8},\n    /* 'M' 0x4D */ {237, 8, 9, 10, 1, -8},\n    /* 'N' 0x4E */ {246, 7, 9, 9, 1, -8},\n    /* 'O' 0x4F */ {254, 9, 9, 9, 0, -8},\n    /* 'P' 0x50 */ {265, 6, 9, 8, 1, -8},\n    /* 'Q' 0x51 */ {272, 9, 10, 9, 0, -8},\n    /* 'R' 0x52 */ {284, 7, 9, 9, 1, -8},\n    /* 'S' 0x53 */ {292, 6, 9, 8, 1, -8},\n    /* 'T' 0x54 */ {299, 6, 9, 8, 0, -8},\n    /* 'U' 0x55 */ {306, 7, 9, 9, 1, -8},\n    /* 'V' 0x56 */ {314, 7, 9, 8, 0, -8},\n    /* 'W' 0x57 */ {322, 11, 9, 11, 0, -8},\n    /* 'X' 0x58 */ {335, 6, 9, 8, 1, -8},\n    /* 'Y' 0x59 */ {342, 7, 9, 8, 1, -8},\n    /* 'Z' 0x5A */ {350, 7, 9, 7, 0, -8},\n    /* '[' 0x5B */ {358, 2, 12, 3, 1, -8},\n    /* '\\' 0x5C */ {361, 3, 9, 3, 0, -8},\n    /* ']' 0x5D */ {365, 2, 12, 3, 0, -8},\n    /* '^' 0x5E */ {368, 4, 5, 6, 1, -8},\n    /* '_' 0x5F */ {371, 7, 1, 7, 0, 2},\n    /* '`' 0x60 */ {372, 1, 1, 3, 1, -8},\n    /* 'a' 0x61 */ {373, 7, 7, 7, 0, -6},\n    /* 'b' 0x62 */ {380, 5, 9, 7, 1, -8},\n    /* 'c' 0x63 */ {386, 6, 7, 6, 0, -6},\n    /* 'd' 0x64 */ {392, 6, 9, 7, 0, -8},\n    /* 'e' 0x65 */ {399, 6, 7, 6, 0, -6},\n    /* 'f' 0x66 */ {405, 3, 9, 3, 0, -8},\n    /* 'g' 0x67 */ {409, 6, 10, 7, 0, -6},\n    /* 'h' 0x68 */ {417, 5, 9, 6, 1, -8},\n    /* 'i' 0x69 */ {423, 1, 9, 3, 1, -8},\n    /* 'j' 0x6A */ {425, 2, 12, 3, 0, -8},\n    /* 'k' 0x6B */ {428, 5, 9, 6, 1, -8},\n    /* 'l' 0x6C */ {434, 1, 9, 3, 1, -8},\n    /* 'm' 0x6D */ {436, 8, 7, 10, 1, -6},\n    /* 'n' 0x6E */ {443, 5, 7, 6, 1, -6},\n    /* 'o' 0x6F */ {448, 6, 7, 6, 0, -6},\n    /* 'p' 0x70 */ {454, 5, 9, 7, 1, -6},\n    /* 'q' 0x71 */ {460, 6, 9, 7, 0, -6},\n    /* 'r' 0x72 */ {467, 3, 7, 4, 1, -6},\n    /* 's' 0x73 */ {470, 4, 7, 6, 1, -6},\n    /* 't' 0x74 */ {474, 3, 8, 3, 0, -7},\n    /* 'u' 0x75 */ {477, 5, 7, 6, 1, -6},\n    /* 'v' 0x76 */ {482, 6, 7, 6, 0, -6},\n    /* 'w' 0x77 */ {488, 8, 7, 9, 0, -6},\n    /* 'x' 0x78 */ {495, 5, 7, 6, 0, -6},\n    /* 'y' 0x79 */ {500, 6, 10, 6, 0, -6},\n    /* 'z' 0x7A */ {508, 5, 7, 6, 0, -6},\n    /* '{' 0x7B */ {513, 3, 12, 4, 0, -8},\n    /* '|' 0x7C */ {518, 1, 11, 3, 1, -8},\n    /* '}' 0x7D */ {520, 3, 12, 4, 1, -8},\n    /* '~' 0x7E */ {525, 6, 2, 6, 0, -4},\n};\n\nconst GFXfont FreeSans6pt7b PROGMEM = {(uint8_t *)FreeSans6pt7bBitmaps, (GFXglyph *)FreeSans6pt7bGlyphs, 0x20, 0x7E, 14};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans6pt_Win1250.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans6pt_Win1250\n*/\nconst uint8_t FreeSans6pt_Win1250Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x1C, 0x0A, 0x05, 0x04, 0xFE, 0x08, 0x1C, 0x02, 0x07, 0xE0, 0x9F, 0xC0,\n/* 0x02 */ 0x3F, 0xF0, 0x40, 0xE0, 0x10, 0x3F, 0x04, 0x9E, 0x28, 0x14, 0x0E, 0x00,\n/* 0x03 */ 0x3F, 0x10, 0x28, 0x06, 0x49, 0x80, 0x60, 0x19, 0x26, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x04 */ 0x3F, 0x10, 0x2A, 0x16, 0x49, 0xA1, 0x60, 0x19, 0xE6, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x05 */ 0x28, 0x15, 0x2A, 0xB5, 0x55, 0xA8, 0x54, 0x12, 0x04, 0x41, 0x08, 0x81, 0xC0,\n/* 0x06 */ 0x04, 0x08, 0x88, 0x82, 0x07, 0x01, 0x11, 0xA2, 0xC4, 0x40, 0x70, 0x20, 0x88, 0x88, 0x10, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x03, 0x83, 0x44, 0x48, 0x28, 0x01, 0x80, 0x17, 0xFE, 0x08, 0x45, 0x28, 0x84, 0x00,\n/* 0x09 */ 0x01, 0xC0, 0x68, 0x82, 0x41, 0x10, 0x02, 0x80, 0x06, 0x00, 0x14, 0x00, 0x8F, 0xFC,\n/* 0x0A */\n/* 0x0B */ 0x22, 0x2A, 0xA2, 0x30, 0x18, 0x0A, 0x09, 0x04, 0x44, 0x14, 0x04, 0x00,\n/* 0x0C */ 0x46, 0x00, 0x19, 0x03, 0x21, 0x20, 0x93, 0x04, 0x20, 0x11, 0x80, 0x50, 0x02, 0x7F, 0xE0,\n/* 0x0D */\n/* 0x0E */ 0x08, 0x0E, 0x08, 0x88, 0x24, 0x12, 0x09, 0x05, 0x01, 0xFF, 0x8A, 0x02, 0x00,\n/* 0x0F */ 0x3F, 0x14, 0xAA, 0x16, 0x01, 0x92, 0x60, 0x18, 0xC6, 0x49, 0x40, 0x8F, 0xC0,\n/* 0x10 */ 0x1B, 0x02, 0xA0, 0x54, 0x12, 0x42, 0x48, 0x49, 0x31, 0x1E, 0x23, 0xEA, 0xFE, 0x3C,\n/* 0x11 */ 0x3F, 0x02, 0x00, 0x20, 0x6D, 0x27, 0xF8, 0x3F, 0xC1, 0xFE, 0x37, 0xD0, 0xBE, 0x40, 0xE1, 0xE2, 0x00,\n/* 0x12 */ 0x12, 0x42, 0x20, 0x24, 0xC0, 0x29, 0x99, 0x05, 0x23, 0x30, 0xB0, 0x30, 0x00,\n/* 0x13 */ 0x3F, 0x88, 0x0A, 0x44, 0xD5, 0x58, 0x03, 0x00, 0x67, 0xCC, 0x71, 0x40, 0x47, 0xF0,\n/* 0x14 */ 0x3F, 0x18, 0x69, 0x26, 0x85, 0xA1, 0x6C, 0xD8, 0x06, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x15 */ 0x3F, 0x11, 0x00, 0xE8, 0x03, 0xA0, 0x1F, 0xB3, 0x7E, 0x00, 0xE9, 0xE0, 0x23, 0x00, 0x40, 0x40, 0xFE, 0x00,\n/* 0x16 */ 0x30, 0x38, 0x3A, 0x3E, 0x6E, 0xEB, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0x17 */ 0x3F, 0x04, 0x00, 0x82, 0x88, 0x5C, 0xA4, 0x49, 0x22, 0x81, 0x98, 0xC4, 0x40, 0xA3, 0xF0,\n/* 0x18 */ 0x07, 0x80, 0x42, 0x04, 0x08, 0x21, 0x41, 0x42, 0x60, 0x0E, 0x8C, 0xB2, 0x89, 0x50, 0x52, 0x82, 0x80,\n/* 0x19 */ 0x3F, 0xC4, 0x02, 0x80, 0x18, 0x01, 0xB3, 0x1B, 0xB9, 0x80, 0x19, 0xE1, 0x40, 0x23, 0xFC,\n/* 0x1A */ 0xFF, 0xC0, 0x67, 0x34, 0x58, 0x4C, 0x46, 0x03, 0x11, 0x80, 0xFF, 0xC0,\n/* 0x1B */ 0x0F, 0xC0, 0x40, 0x82, 0x49, 0x08, 0x04, 0x00, 0x00, 0x12, 0x02, 0x31, 0x34, 0x0B, 0x88, 0x45, 0x00, 0x20,\n/* 0x1C */ 0x3F, 0x88, 0x0A, 0x44, 0xC9, 0x19, 0x3B, 0x00, 0x60, 0x4C, 0x71, 0x40, 0x47, 0xF0,\n/* 0x1D */ 0x3F, 0x8B, 0x0A, 0x00, 0xC8, 0x18, 0x13, 0x00, 0x48, 0xCA, 0xC1, 0x44, 0x53, 0x30,\n/* 0x1E */ 0x19, 0xC2, 0x02, 0x50, 0x1E, 0x49, 0x80, 0x12, 0x01, 0x27, 0x92, 0x01, 0x10, 0x20, 0xFC,\n/* 0x1F */ 0x30, 0x1C, 0x0C, 0x3E, 0x7E, 0xCF, 0x07, 0xC7, 0x7F, 0x3F,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFC, 0x80,\n/* '\"' 0x22 */ 0xB6, 0x80,\n/* '#' 0x23 */ 0x24, 0x51, 0xF9, 0x42, 0x9F, 0x92, 0x28,\n/* '$' 0x24 */ 0x10, 0xE5, 0x55, 0x50, 0xE1, 0x65, 0x55, 0xE1, 0x00,\n/* '%' 0x25 */ 0x71, 0x24, 0x89, 0x22, 0x50, 0x74, 0x02, 0x70, 0xA4, 0x49, 0x11, 0xC0,\n/* '&' 0x26 */ 0x71, 0x24, 0x9C, 0x62, 0x58, 0xA7, 0xF4,\n/* ''' 0x27 */ 0xE0,\n/* '(' 0x28 */ 0x5A, 0xAA, 0x94,\n/* ')' 0x29 */ 0x89, 0x12, 0x49, 0x29, 0x00,\n/* '*' 0x2A */ 0x5E, 0x80,\n/* '+' 0x2B */ 0x21, 0x3E, 0x42, 0x00,\n/* ',' 0x2C */ 0xE0,\n/* '-' 0x2D */ 0xC0,\n/* '.' 0x2E */ 0x80,\n/* '/' 0x2F */ 0x24, 0xA4, 0xA4, 0x80,\n/* '0' 0x30 */ 0x76, 0xE3, 0x18, 0xC6, 0x3B, 0x70,\n/* '1' 0x31 */ 0x27, 0x92, 0x49, 0x20,\n/* '2' 0x32 */ 0x79, 0x10, 0x41, 0x08, 0xC6, 0x10, 0xFC,\n/* '3' 0x33 */ 0x79, 0x30, 0x43, 0x18, 0x10, 0x71, 0x78,\n/* '4' 0x34 */ 0x08, 0x61, 0x8A, 0x49, 0x2F, 0xC2, 0x08,\n/* '5' 0x35 */ 0xFC, 0x21, 0xE8, 0x84, 0x31, 0xF0,\n/* '6' 0x36 */ 0x74, 0x61, 0xE8, 0xC6, 0x31, 0x70,\n/* '7' 0x37 */ 0xF8, 0x44, 0x22, 0x11, 0x08, 0x40,\n/* '8' 0x38 */ 0x39, 0x34, 0x53, 0x39, 0x1C, 0x51, 0x38,\n/* '9' 0x39 */ 0x39, 0x3C, 0x71, 0x4C, 0xF0, 0x53, 0x78,\n/* ':' 0x3A */ 0x82,\n/* ';' 0x3B */ 0x87,\n/* '<' 0x3C */ 0x3E, 0x30, 0x60, 0x80,\n/* '=' 0x3D */ 0xF8, 0x3E,\n/* '>' 0x3E */ 0xE0, 0xC6, 0xC8, 0x00,\n/* '?' 0x3F */ 0x74, 0x42, 0x11, 0x10, 0x80, 0x20,\n/* '@' 0x40 */ 0x0F, 0x86, 0x19, 0x9A, 0xA4, 0xD9, 0x13, 0x22, 0x56, 0xDA, 0x6E, 0x60, 0x06, 0x00, 0x3C, 0x00,\n/* 'A' 0x41 */ 0x18, 0x18, 0x24, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n/* 'B' 0x42 */ 0xFA, 0x18, 0x61, 0xFA, 0x18, 0x61, 0xFC,\n/* 'C' 0x43 */ 0x3E, 0x63, 0x40, 0x40, 0xC0, 0x40, 0x41, 0x63, 0x3E,\n/* 'D' 0x44 */ 0xF9, 0x0A, 0x1C, 0x18, 0x30, 0x61, 0xC2, 0xF8,\n/* 'E' 0x45 */ 0xFE, 0x08, 0x20, 0xFE, 0x08, 0x20, 0xFC,\n/* 'F' 0x46 */ 0xFE, 0x08, 0x20, 0xFA, 0x08, 0x20, 0x80,\n/* 'G' 0x47 */ 0x1E, 0x61, 0x40, 0x40, 0xC7, 0x41, 0x41, 0x63, 0x1D,\n/* 'H' 0x48 */ 0x83, 0x06, 0x0C, 0x1F, 0xF0, 0x60, 0xC1, 0x82,\n/* 'I' 0x49 */ 0xFF, 0x80,\n/* 'J' 0x4A */ 0x08, 0x42, 0x10, 0x87, 0x29, 0x70,\n/* 'K' 0x4B */ 0x85, 0x12, 0x45, 0x0D, 0x13, 0x22, 0x42, 0x86,\n/* 'L' 0x4C */ 0x84, 0x21, 0x08, 0x42, 0x10, 0xF8,\n/* 'M' 0x4D */ 0xC3, 0xC3, 0xC3, 0xA5, 0xA5, 0xA5, 0x99, 0x99, 0x99,\n/* 'N' 0x4E */ 0x83, 0x86, 0x8D, 0x19, 0x33, 0x62, 0xC3, 0x86,\n/* 'O' 0x4F */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x06, 0xC6, 0x1E, 0x00,\n/* 'P' 0x50 */ 0xFA, 0x18, 0x61, 0xFA, 0x08, 0x20, 0x80,\n/* 'Q' 0x51 */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x16, 0xC6, 0x1F, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFD, 0x0E, 0x1C, 0x2F, 0x90, 0xA1, 0x42, 0x86,\n/* 'S' 0x53 */ 0x7A, 0x18, 0x30, 0x78, 0x38, 0x61, 0x78,\n/* 'T' 0x54 */ 0xFE, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10,\n/* 'U' 0x55 */ 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xE2, 0x78,\n/* 'V' 0x56 */ 0xC2, 0x85, 0x0B, 0x22, 0x44, 0x8E, 0x0C, 0x18,\n/* 'W' 0x57 */ 0xC4, 0x28, 0xCD, 0x29, 0x25, 0x24, 0xA4, 0x52, 0x8C, 0x61, 0x8C, 0x31, 0x80,\n/* 'X' 0x58 */ 0x87, 0x34, 0x8C, 0x30, 0xC4, 0xA3, 0x84,\n/* 'Y' 0x59 */ 0xC3, 0x42, 0x24, 0x34, 0x18, 0x08, 0x08, 0x08, 0x08,\n/* 'Z' 0x5A */ 0x7E, 0x0C, 0x30, 0x41, 0x06, 0x18, 0x20, 0xFE,\n/* '[' 0x5B */ 0xEA, 0xAA, 0xAB,\n/* '\\' 0x5C */ 0x92, 0x24, 0x89, 0x20,\n/* ']' 0x5D */ 0xD5, 0x55, 0x57,\n/* '^' 0x5E */ 0x46, 0xA9,\n/* '_' 0x5F */ 0xFE,\n/* '`' 0x60 */ 0x80,\n/* 'a' 0x61 */ 0x79, 0x20, 0x4F, 0xC6, 0x37, 0x40,\n/* 'b' 0x62 */ 0x84, 0x3D, 0x18, 0xC6, 0x31, 0xF0,\n/* 'c' 0x63 */ 0x39, 0x3C, 0x20, 0xC1, 0x33, 0x80,\n/* 'd' 0x64 */ 0x04, 0x13, 0xD3, 0xC6, 0x1C, 0x53, 0x3C,\n/* 'e' 0x65 */ 0x39, 0x38, 0x7F, 0x81, 0x13, 0x80,\n/* 'f' 0x66 */ 0x6B, 0xA4, 0x92, 0x40,\n/* 'g' 0x67 */ 0x35, 0x3C, 0x61, 0xC5, 0x33, 0x41, 0x4D, 0xE0,\n/* 'h' 0x68 */ 0x84, 0x3D, 0x38, 0xC6, 0x31, 0x88,\n/* 'i' 0x69 */ 0xBF, 0x80,\n/* 'j' 0x6A */ 0x45, 0x55, 0x57,\n/* 'k' 0x6B */ 0x84, 0x25, 0x4E, 0x52, 0xD2, 0x88,\n/* 'l' 0x6C */ 0xFF, 0x80,\n/* 'm' 0x6D */ 0xF7, 0x99, 0x91, 0x91, 0x91, 0x91, 0x91,\n/* 'n' 0x6E */ 0xF4, 0x63, 0x18, 0xC6, 0x20,\n/* 'o' 0x6F */ 0x39, 0x3C, 0x61, 0xC5, 0x33, 0x80,\n/* 'p' 0x70 */ 0xF4, 0x63, 0x18, 0xC7, 0xD0, 0x80,\n/* 'q' 0x71 */ 0x3D, 0x3C, 0x61, 0xC5, 0x37, 0x41, 0x04,\n/* 'r' 0x72 */ 0xF2, 0x49, 0x20,\n/* 's' 0x73 */ 0x7A, 0x50, 0xE0, 0xE5, 0xE0,\n/* 't' 0x74 */ 0x5D, 0x24, 0x93,\n/* 'u' 0x75 */ 0x8C, 0x63, 0x18, 0xCF, 0xA0,\n/* 'v' 0x76 */ 0x85, 0x24, 0x92, 0x30, 0xC3, 0x00,\n/* 'w' 0x77 */ 0x89, 0x59, 0x59, 0x55, 0x56, 0x26, 0x26,\n/* 'x' 0x78 */ 0x4A, 0x4C, 0x43, 0x27, 0x20,\n/* 'y' 0x79 */ 0x8A, 0x52, 0xA5, 0x18, 0x84, 0x22, 0x00,\n/* 'z' 0x7A */ 0x78, 0x44, 0x46, 0x23, 0xE0,\n/* '{' 0x7B */ 0x6A, 0xAA, 0xA9,\n/* '|' 0x7C */ 0xFF, 0xE0,\n/* '}' 0x7D */ 0x95, 0x55, 0x56,\n/* '~' 0x7E */ 0x66, 0x60,\n/* 0x7F */ 0xFF, 0xC0, 0x67, 0x34, 0x58, 0x4C, 0x46, 0x03, 0x11, 0x80, 0xFF, 0xC0,\n/* 0x80 */ 0x1C, 0x45, 0x07, 0xE4, 0x1F, 0x10, 0x10, 0x1E,\n/* 0x81 */\n/* 0x82 */ 0xE0,\n/* 0x83 */\n/* 0x84 */ 0xB6, 0x80,\n/* 0x85 */ 0xA8,\n/* 0x86 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0x21, 0x08,\n/* 0x87 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0xF9, 0x08,\n/* 0x88 */\n/* 0x89 */ 0x62, 0x09, 0x40, 0x98, 0x06, 0x80, 0x10, 0x01, 0x66, 0x29, 0x92, 0x99, 0x06, 0x60,\n/* 0x8A */ 0x28, 0x47, 0xA1, 0x83, 0x07, 0x83, 0x87, 0x17, 0x80,\n/* 0x8B */ 0x64,\n/* 0x8C */ 0x10, 0x87, 0xA1, 0x83, 0x07, 0x83, 0x87, 0x17, 0x80,\n/* 0x8D */ 0x28, 0x4F, 0xC4, 0x10, 0x41, 0x04, 0x10, 0x40,\n/* 0x8E */ 0x14, 0x11, 0xF8, 0x30, 0xC1, 0x04, 0x18, 0x61, 0xFC,\n/* 0x8F */ 0x08, 0x21, 0xF8, 0x30, 0xC1, 0x04, 0x18, 0x61, 0xFC,\n/* 0x90 */\n/* 0x91 */ 0xE0,\n/* 0x92 */ 0xE0,\n/* 0x93 */ 0xB6, 0x80,\n/* 0x94 */ 0xB6, 0x80,\n/* 0x95 */ 0xFF, 0x80,\n/* 0x96 */ 0xFC,\n/* 0x97 */ 0xFF, 0xF0,\n/* 0x98 */\n/* 0x99 */ 0xE6, 0x28, 0xCD, 0x19, 0xA3, 0x34, 0x6A, 0x8B, 0x51, 0x68,\n/* 0x9A */ 0x52, 0x69, 0x8E, 0x19, 0x60,\n/* 0x9B */ 0x98,\n/* 0x9C */ 0x24, 0x06, 0x98, 0xE1, 0x96,\n/* 0x9D */ 0x15, 0xE4, 0x44, 0x44, 0x60,\n/* 0x9E */ 0x51, 0x00, 0xF0, 0x88, 0x8C, 0x47, 0xC0,\n/* 0x9F */ 0x11, 0x00, 0xF0, 0x88, 0x8C, 0x47, 0xC0,\n/* 0xA0 */\n/* 0xA1 */ 0xA8,\n/* 0xA2 */ 0x96,\n/* 0xA3 */ 0x41, 0x05, 0x18, 0x43, 0x04, 0x10, 0x7C,\n/* 0xA4 */ 0xFC, 0x63, 0xF0,\n/* 0xA5 */ 0x30, 0x38, 0x28, 0x48, 0x4C, 0x7C, 0x84, 0x86, 0x82, 0x04, 0x07,\n/* 0xA6 */ 0xF9, 0xF0,\n/* 0xA7 */ 0x32, 0x91, 0xC9, 0x47, 0x26, 0x14, 0xA4, 0xC0,\n/* 0xA8 */ 0xA0,\n/* 0xA9 */ 0x3E, 0x3F, 0xB8, 0xF4, 0x1A, 0x0D, 0x17, 0x76, 0xC6, 0x3E, 0x00,\n/* 0xAA */ 0x7A, 0x18, 0x30, 0x78, 0x38, 0x61, 0x78, 0xC1, 0x0C,\n/* 0xAB */ 0x5A, 0xA5,\n/* 0xAC */ 0xFC, 0x10, 0x40,\n/* 0xAD */\n/* 0xAE */ 0x3E, 0x31, 0xB7, 0x72, 0x99, 0xCC, 0xC7, 0x56, 0xC6, 0x3E, 0x00,\n/* 0xAF */ 0x18, 0x31, 0xF8, 0x30, 0xC1, 0x04, 0x18, 0x61, 0xFC,\n/* 0xB0 */ 0x69, 0x96,\n/* 0xB1 */ 0x21, 0x3E, 0x42, 0x03, 0xE0,\n/* 0xB2 */ 0x9C,\n/* 0xB3 */ 0x49, 0x35, 0x92, 0x40,\n/* 0xB4 */ 0x80,\n/* 0xB5 */ 0x8A, 0x28, 0xA2, 0x8A, 0x6E, 0xE0, 0x80,\n/* 0xB6 */ 0x7F, 0xAE, 0xBA, 0x68, 0xA2, 0x8A, 0x28, 0xA0,\n/* 0xB7 */ 0x80,\n/* 0xB8 */ 0x67, 0x80,\n/* 0xB9 */ 0x78, 0x84, 0x04, 0x3C, 0xC4, 0x8C, 0x76, 0x04, 0x07,\n/* 0xBA */ 0x69, 0x8E, 0x19, 0x66, 0x26,\n/* 0xBB */ 0xA5, 0x5A,\n/* 0xBC */ 0xA5, 0x21, 0x08, 0x42, 0x10, 0xF8,\n/* 0xBD */ 0xA0,\n/* 0xBE */ 0xBA, 0x49, 0x24, 0x90,\n/* 0xBF */ 0x31, 0x9E, 0x11, 0x11, 0x88, 0xF8,\n/* 0xC0 */ 0x10, 0x43, 0xE4, 0x28, 0x50, 0xBE, 0x42, 0x85, 0x0C,\n/* 0xC1 */ 0x08, 0x10, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC2 */ 0x18, 0x24, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC3 */ 0x24, 0x18, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC4 */ 0x24, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n/* 0xC5 */ 0x11, 0x21, 0x08, 0x42, 0x10, 0x87, 0xC0,\n/* 0xC6 */ 0x08, 0x20, 0x01, 0xE4, 0x30, 0x20, 0x40, 0x82, 0x8C, 0xF0,\n/* 0xC7 */ 0x3E, 0x61, 0xC0, 0x80, 0x80, 0x80, 0xC1, 0x63, 0x3E, 0x0C, 0x04, 0x1C,\n/* 0xC8 */ 0x28, 0x20, 0x01, 0xE4, 0x30, 0x20, 0x40, 0x82, 0x8C, 0xF0,\n/* 0xC9 */ 0x08, 0x40, 0x3F, 0x82, 0x0F, 0xA0, 0x83, 0xF0,\n/* 0xCA */ 0xFD, 0x02, 0x04, 0x0F, 0xD0, 0x20, 0x40, 0xFC, 0x10, 0x38,\n/* 0xCB */ 0x28, 0x0F, 0xE0, 0x83, 0xE8, 0x20, 0x83, 0xF0,\n/* 0xCC */ 0x28, 0x40, 0x3F, 0x82, 0x0F, 0xA0, 0x82, 0x0F, 0xC0,\n/* 0xCD */ 0x62, 0xAA, 0xA0,\n/* 0xCE */ 0x54, 0x24, 0x92, 0x48,\n/* 0xCF */ 0x50, 0x43, 0xE4, 0x28, 0x30, 0x60, 0xC1, 0x85, 0xF0,\n/* 0xD0 */ 0x7C, 0x42, 0x41, 0x41, 0xF1, 0x41, 0x41, 0x42, 0x7C,\n/* 0xD1 */ 0x08, 0x23, 0x0F, 0x1B, 0x32, 0x66, 0xC7, 0x87, 0x04,\n/* 0xD2 */ 0x28, 0x23, 0x0F, 0x1B, 0x32, 0x66, 0xC7, 0x87, 0x04,\n/* 0xD3 */ 0x04, 0x04, 0x0F, 0x8C, 0x6C, 0x1C, 0x06, 0x03, 0x83, 0x63, 0x1F, 0x00,\n/* 0xD4 */ 0x08, 0x0A, 0x00, 0x07, 0xC6, 0x36, 0x0E, 0x03, 0x01, 0xC1, 0xB1, 0x8F, 0x80,\n/* 0xD5 */ 0x0A, 0x0A, 0x00, 0x07, 0xC6, 0x36, 0x0E, 0x03, 0x01, 0xC1, 0xB1, 0x8F, 0x80,\n/* 0xD6 */ 0x14, 0x00, 0x00, 0x07, 0xC6, 0x36, 0x0E, 0x03, 0x01, 0xC1, 0xB1, 0x8F, 0x80,\n/* 0xD7 */ 0x8A, 0x88, 0xA8, 0x80,\n/* 0xD8 */ 0x50, 0x43, 0xE4, 0x28, 0x50, 0xBE, 0x42, 0x85, 0x0C,\n/* 0xD9 */ 0x10, 0x52, 0x4C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDA */ 0x08, 0x22, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDB */ 0x14, 0x52, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDC */ 0x29, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDD */ 0x09, 0x25, 0x12, 0x22, 0x87, 0x04, 0x08, 0x10, 0x20,\n/* 0xDE */ 0xFC, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x60, 0x8E,\n/* 0xDF */ 0x7A, 0x18, 0x61, 0x8A, 0x18, 0x61, 0xB8,\n/* 0xE0 */ 0x42, 0xE9, 0x24, 0x80,\n/* 0xE1 */ 0x10, 0x40, 0x03, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE2 */ 0x10, 0x50, 0x03, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE3 */ 0x48, 0x60, 0x03, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE4 */ 0x28, 0x01, 0xE4, 0x20, 0x47, 0xB1, 0x46, 0x76,\n/* 0xE5 */ 0x62, 0xAA, 0xA0,\n/* 0xE6 */ 0x10, 0x80, 0x1E, 0xC6, 0x08, 0x20, 0xC5, 0xE0,\n/* 0xE7 */ 0x7B, 0x18, 0x20, 0x83, 0x17, 0x8C, 0x11, 0xC0,\n/* 0xE8 */ 0x28, 0x40, 0x1E, 0xC6, 0x08, 0x20, 0xC5, 0xE0,\n/* 0xE9 */ 0x10, 0x80, 0x1E, 0xCE, 0x1F, 0xE0, 0xC5, 0xE0,\n/* 0xEA */ 0x7B, 0x38, 0x7F, 0x83, 0x37, 0x84, 0x1C,\n/* 0xEB */ 0x28, 0x07, 0xB3, 0x87, 0xF8, 0x31, 0x78,\n/* 0xEC */ 0x28, 0x40, 0x1E, 0xCE, 0x1F, 0xE0, 0xC5, 0xE0,\n/* 0xED */ 0x62, 0xAA, 0xA0,\n/* 0xEE */ 0x54, 0x24, 0x92, 0x48,\n/* 0xEF */ 0x02, 0x0C, 0x13, 0xEC, 0xD0, 0xA1, 0x42, 0xCC, 0xE8,\n/* 0xF0 */ 0x04, 0x1D, 0xD6, 0x68, 0x50, 0xA1, 0x66, 0x74,\n/* 0xF1 */ 0x11, 0x01, 0x6C, 0xC6, 0x31, 0x8C, 0x40,\n/* 0xF2 */ 0x20, 0x81, 0x6C, 0xC6, 0x31, 0x8C, 0x40,\n/* 0xF3 */ 0x10, 0x80, 0x1E, 0xCE, 0x18, 0x61, 0xCD, 0xE0,\n/* 0xF4 */ 0x10, 0xA0, 0x1E, 0xCE, 0x18, 0x61, 0xCD, 0xE0,\n/* 0xF5 */ 0x29, 0x40, 0x1E, 0xCE, 0x18, 0x61, 0xCD, 0xE0,\n/* 0xF6 */ 0x28, 0x07, 0xB3, 0x86, 0x18, 0x73, 0x78,\n/* 0xF7 */ 0x20, 0x3E, 0x02, 0x00,\n/* 0xF8 */ 0xA8, 0x5D, 0x24, 0x90,\n/* 0xF9 */ 0x22, 0x89, 0x18, 0xC6, 0x31, 0x9B, 0x40,\n/* 0xFA */ 0x11, 0x23, 0x18, 0xC6, 0x33, 0x68,\n/* 0xFB */ 0x2A, 0x81, 0x18, 0xC6, 0x31, 0x9B, 0x40,\n/* 0xFC */ 0x50, 0x23, 0x18, 0xC6, 0x33, 0x68,\n/* 0xFD */ 0x10, 0x88, 0x52, 0x49, 0x23, 0x0C, 0x30, 0x82, 0x18,\n/* 0xFE */ 0x4E, 0x44, 0x44, 0x46, 0x31, 0x70,\n/* 0xFF */ 0x80,\n};\n\nconst GFXglyph FreeSans6pt_Win1250Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,    9,  10,  11,   1,   -9 },\n/* 0x02 */ {    12,    9,  10,  11,   1,   -8 },\n/* 0x03 */ {    24,   10,  10,  12,   1,   -8 },\n/* 0x04 */ {    37,   10,  10,  12,   1,   -8 },\n/* 0x05 */ {    50,   10,  10,  12,   1,   -9 },\n/* 0x06 */ {    63,   11,  11,  13,   1,   -9 },\n/* 0x07 */ {    79,    0,   0,   8,   0,    0 },\n/* 0x08 */ {    79,   12,   9,  14,   1,   -8 },\n/* 0x09 */ {    93,   14,   8,  16,   1,   -7 },\n/* 0x0A */ {   107,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   107,    9,  10,  11,   1,   -9 },\n/* 0x0C */ {   119,   13,   9,  15,   1,   -8 },\n/* 0x0D */ {   134,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   134,    9,  11,  11,   1,   -9 },\n/* 0x0F */ {   147,   10,  10,  12,   1,   -9 },\n/* 0x10 */ {   160,   11,  10,  13,   1,   -9 },\n/* 0x11 */ {   174,   13,  10,  15,   1,   -9 },\n/* 0x12 */ {   191,   10,  10,  12,   1,   -9 },\n/* 0x13 */ {   204,   11,  10,  13,   1,   -9 },\n/* 0x14 */ {   218,   10,  10,  12,   1,   -9 },\n/* 0x15 */ {   231,   14,  10,  16,   1,   -9 },\n/* 0x16 */ {   249,    8,  10,  10,   1,   -9 },\n/* 0x17 */ {   259,   12,  10,  14,   1,   -9 },\n/* 0x18 */ {   274,   13,  10,  15,   1,   -9 },\n/* 0x19 */ {   291,   12,  10,  14,   1,   -9 },\n/* 0x1A */ {   306,    9,  10,  11,   1,   -8 },\n/* 0x1B */ {   318,   14,  10,  16,   1,   -9 },\n/* 0x1C */ {   336,   11,  10,  13,   1,   -9 },\n/* 0x1D */ {   350,   11,  10,  13,   1,   -9 },\n/* 0x1E */ {   364,   12,  10,  14,   1,   -9 },\n/* 0x1F */ {   379,    8,  10,  11,   2,   -9 },\n/* ' ' 0x20 */ {   389,    0,   0,   3,   0,    0 },\n/* '!' 0x21 */ {   389,    1,   9,   4,   2,   -8 },\n/* '\"' 0x22 */ {   391,    3,   3,   4,   0,   -8 },\n/* '#' 0x23 */ {   393,    7,   8,   7,   0,   -7 },\n/* '$' 0x24 */ {   400,    6,  11,   7,   0,   -9 },\n/* '%' 0x25 */ {   409,   10,   9,  11,   0,   -8 },\n/* '&' 0x26 */ {   421,    6,   9,   8,   1,   -8 },\n/* ''' 0x27 */ {   428,    1,   3,   2,   1,   -8 },\n/* '(' 0x28 */ {   429,    2,  11,   4,   1,   -8 },\n/* ')' 0x29 */ {   432,    3,  11,   4,   0,   -8 },\n/* '*' 0x2A */ {   437,    3,   3,   5,   1,   -8 },\n/* '+' 0x2B */ {   439,    5,   5,   7,   1,   -4 },\n/* ',' 0x2C */ {   443,    1,   3,   3,   1,    0 },\n/* '-' 0x2D */ {   444,    2,   1,   4,   1,   -3 },\n/* '.' 0x2E */ {   445,    1,   1,   3,   1,    0 },\n/* '/' 0x2F */ {   446,    3,   9,   3,   0,   -8 },\n/* '0' 0x30 */ {   450,    5,   9,   7,   1,   -8 },\n/* '1' 0x31 */ {   456,    3,   9,   7,   1,   -8 },\n/* '2' 0x32 */ {   460,    6,   9,   7,   0,   -8 },\n/* '3' 0x33 */ {   467,    6,   9,   7,   0,   -8 },\n/* '4' 0x34 */ {   474,    6,   9,   7,   0,   -8 },\n/* '5' 0x35 */ {   481,    5,   9,   7,   1,   -8 },\n/* '6' 0x36 */ {   487,    5,   9,   7,   1,   -8 },\n/* '7' 0x37 */ {   493,    5,   9,   7,   1,   -8 },\n/* '8' 0x38 */ {   499,    6,   9,   7,   0,   -8 },\n/* '9' 0x39 */ {   506,    6,   9,   7,   0,   -8 },\n/* ':' 0x3A */ {   513,    1,   7,   3,   1,   -6 },\n/* ';' 0x3B */ {   514,    1,   8,   3,   1,   -5 },\n/* '<' 0x3C */ {   515,    5,   5,   7,   1,   -4 },\n/* '=' 0x3D */ {   519,    5,   3,   7,   1,   -3 },\n/* '>' 0x3E */ {   521,    5,   5,   7,   1,   -4 },\n/* '?' 0x3F */ {   525,    5,   9,   7,   1,   -8 },\n/* '@' 0x40 */ {   531,   11,  11,  12,   0,   -8 },\n/* 'A' 0x41 */ {   547,    8,   9,   8,   0,   -8 },\n/* 'B' 0x42 */ {   556,    6,   9,   8,   1,   -8 },\n/* 'C' 0x43 */ {   563,    8,   9,   9,   0,   -8 },\n/* 'D' 0x44 */ {   572,    7,   9,   8,   1,   -8 },\n/* 'E' 0x45 */ {   580,    6,   9,   8,   1,   -8 },\n/* 'F' 0x46 */ {   587,    6,   9,   7,   1,   -8 },\n/* 'G' 0x47 */ {   594,    8,   9,   9,   0,   -8 },\n/* 'H' 0x48 */ {   603,    7,   9,   9,   1,   -8 },\n/* 'I' 0x49 */ {   611,    1,   9,   3,   1,   -8 },\n/* 'J' 0x4A */ {   613,    5,   9,   6,   0,   -8 },\n/* 'K' 0x4B */ {   619,    7,   9,   8,   1,   -8 },\n/* 'L' 0x4C */ {   627,    5,   9,   7,   1,   -8 },\n/* 'M' 0x4D */ {   633,    8,   9,  10,   1,   -8 },\n/* 'N' 0x4E */ {   642,    7,   9,   9,   1,   -8 },\n/* 'O' 0x4F */ {   650,    9,   9,   9,   0,   -8 },\n/* 'P' 0x50 */ {   661,    6,   9,   8,   1,   -8 },\n/* 'Q' 0x51 */ {   668,    9,  10,   9,   0,   -8 },\n/* 'R' 0x52 */ {   680,    7,   9,   9,   1,   -8 },\n/* 'S' 0x53 */ {   688,    6,   9,   8,   1,   -8 },\n/* 'T' 0x54 */ {   695,    7,   9,   8,   0,   -8 },\n/* 'U' 0x55 */ {   703,    7,   9,   9,   1,   -8 },\n/* 'V' 0x56 */ {   711,    7,   9,   8,   0,   -8 },\n/* 'W' 0x57 */ {   719,   11,   9,  11,   0,   -8 },\n/* 'X' 0x58 */ {   732,    6,   9,   8,   1,   -8 },\n/* 'Y' 0x59 */ {   739,    8,   9,   8,   0,   -8 },\n/* 'Z' 0x5A */ {   748,    7,   9,   7,   0,   -8 },\n/* '[' 0x5B */ {   756,    2,  12,   3,   1,   -8 },\n/* '\\' 0x5C */ {   759,    3,   9,   3,   0,   -8 },\n/* ']' 0x5D */ {   763,    2,  12,   3,   0,   -8 },\n/* '^' 0x5E */ {   766,    4,   4,   6,   1,   -8 },\n/* '_' 0x5F */ {   768,    7,   1,   7,   0,    2 },\n/* '`' 0x60 */ {   769,    1,   1,   3,   1,   -8 },\n/* 'a' 0x61 */ {   770,    6,   7,   7,   0,   -6 },\n/* 'b' 0x62 */ {   776,    5,   9,   7,   1,   -8 },\n/* 'c' 0x63 */ {   782,    6,   7,   6,   0,   -6 },\n/* 'd' 0x64 */ {   788,    6,   9,   7,   0,   -8 },\n/* 'e' 0x65 */ {   795,    6,   7,   6,   0,   -6 },\n/* 'f' 0x66 */ {   801,    3,   9,   3,   0,   -8 },\n/* 'g' 0x67 */ {   805,    6,  10,   7,   0,   -6 },\n/* 'h' 0x68 */ {   813,    5,   9,   6,   1,   -8 },\n/* 'i' 0x69 */ {   819,    1,   9,   3,   1,   -8 },\n/* 'j' 0x6A */ {   821,    2,  12,   3,   0,   -8 },\n/* 'k' 0x6B */ {   824,    5,   9,   6,   1,   -8 },\n/* 'l' 0x6C */ {   830,    1,   9,   3,   1,   -8 },\n/* 'm' 0x6D */ {   832,    8,   7,  10,   1,   -6 },\n/* 'n' 0x6E */ {   839,    5,   7,   6,   1,   -6 },\n/* 'o' 0x6F */ {   844,    6,   7,   6,   0,   -6 },\n/* 'p' 0x70 */ {   850,    5,   9,   7,   1,   -6 },\n/* 'q' 0x71 */ {   856,    6,   9,   7,   0,   -6 },\n/* 'r' 0x72 */ {   863,    3,   7,   4,   1,   -6 },\n/* 's' 0x73 */ {   866,    5,   7,   6,   0,   -6 },\n/* 't' 0x74 */ {   871,    3,   8,   3,   0,   -7 },\n/* 'u' 0x75 */ {   874,    5,   7,   6,   1,   -6 },\n/* 'v' 0x76 */ {   879,    6,   7,   6,   0,   -6 },\n/* 'w' 0x77 */ {   885,    8,   7,   9,   0,   -6 },\n/* 'x' 0x78 */ {   892,    5,   7,   6,   0,   -6 },\n/* 'y' 0x79 */ {   897,    5,  10,   6,   0,   -6 },\n/* 'z' 0x7A */ {   904,    5,   7,   6,   0,   -6 },\n/* '{' 0x7B */ {   909,    2,  12,   4,   1,   -8 },\n/* '|' 0x7C */ {   912,    1,  11,   3,   1,   -8 },\n/* '}' 0x7D */ {   914,    2,  12,   4,   1,   -8 },\n/* '~' 0x7E */ {   917,    6,   2,   6,   0,   -4 },\n/* 0x7F */ {   919,    9,  10,   0,   1,   -8 },\n/* 0x80 */ {   931,    7,   9,   8,   0,   -8 },\n/* 0x81 */ {   939,    0,   0,   8,   0,    0 },\n/* 0x82 */ {   939,    1,   3,   3,   1,    0 },\n/* 0x83 */ {   940,    0,   0,   8,   0,    0 },\n/* 0x84 */ {   940,    3,   3,   5,   1,    0 },\n/* 0x85 */ {   942,    5,   1,   7,   1,    0 },\n/* 0x86 */ {   943,    5,  11,   7,   1,   -8 },\n/* 0x87 */ {   950,    5,  11,   7,   1,   -8 },\n/* 0x88 */ {   957,    0,   0,   8,   0,    0 },\n/* 0x89 */ {   957,   12,   9,  12,   0,   -8 },\n/* 0x8A */ {   971,    6,  11,   8,   1,   -9 },\n/* 0x8B */ {   980,    2,   3,   4,   1,   -4 },\n/* 0x8C */ {   981,    6,  11,   8,   1,  -10 },\n/* 0x8D */ {   990,    6,  10,   8,   0,   -9 },\n/* 0x8E */ {   998,    7,  10,   7,   0,   -9 },\n/* 0x8F */ {  1007,    7,  10,   7,   0,   -9 },\n/* 0x90 */ {  1016,    0,   0,   8,   0,    0 },\n/* 0x91 */ {  1016,    1,   3,   3,   1,   -8 },\n/* 0x92 */ {  1017,    1,   3,   2,   1,   -8 },\n/* 0x93 */ {  1018,    3,   3,   5,   1,   -8 },\n/* 0x94 */ {  1020,    3,   3,   5,   1,   -8 },\n/* 0x95 */ {  1022,    3,   3,   5,   1,   -5 },\n/* 0x96 */ {  1024,    6,   1,   6,   0,   -3 },\n/* 0x97 */ {  1025,   12,   1,  12,   0,   -3 },\n/* 0x98 */ {  1027,    0,   0,   8,   0,    0 },\n/* 0x99 */ {  1027,   11,   7,  12,   1,   -8 },\n/* 0x9A */ {  1037,    4,   9,   6,   1,   -8 },\n/* 0x9B */ {  1042,    2,   3,   3,   1,   -4 },\n/* 0x9C */ {  1043,    4,  10,   6,   1,   -9 },\n/* 0x9D */ {  1048,    4,   9,   5,   0,   -8 },\n/* 0x9E */ {  1053,    5,  10,   6,   0,   -9 },\n/* 0x9F */ {  1060,    5,  10,   6,   0,   -9 },\n/* 0xA0 */ {  1067,    0,   0,   3,   0,    0 },\n/* 0xA1 */ {  1067,    3,   2,   4,   0,   -8 },\n/* 0xA2 */ {  1068,    4,   2,   4,   0,   -8 },\n/* 0xA3 */ {  1069,    6,   9,   7,   0,   -8 },\n/* 0xA4 */ {  1076,    5,   4,   7,   1,   -5 },\n/* 0xA5 */ {  1079,    8,  11,   8,   1,   -8 },\n/* 0xA6 */ {  1090,    1,  12,   3,   1,   -8 },\n/* 0xA7 */ {  1092,    5,  12,   7,   1,   -8 },\n/* 0xA8 */ {  1100,    3,   1,   4,   0,   -7 },\n/* 0xA9 */ {  1101,    9,   9,  10,   0,   -8 },\n/* 0xAA */ {  1112,    6,  12,   8,   1,   -8 },\n/* 0xAB */ {  1121,    4,   4,   6,   1,   -4 },\n/* 0xAC */ {  1123,    6,   3,   7,   1,   -4 },\n/* 0xAD */ {  1126,    0,   0,   0,   0,    0 },\n/* 0xAE */ {  1126,    9,   9,  10,   0,   -8 },\n/* 0xAF */ {  1137,    7,  10,   7,   0,   -9 },\n/* 0xB0 */ {  1146,    4,   4,   7,   2,   -8 },\n/* 0xB1 */ {  1148,    5,   7,   7,   1,   -6 },\n/* 0xB2 */ {  1153,    3,   2,   4,   1,    1 },\n/* 0xB3 */ {  1154,    3,   9,   3,   0,   -8 },\n/* 0xB4 */ {  1158,    1,   1,   4,   1,   -8 },\n/* 0xB5 */ {  1159,    6,   9,   7,   1,   -6 },\n/* 0xB6 */ {  1166,    6,  10,   6,   1,   -8 },\n/* 0xB7 */ {  1174,    1,   1,   3,   1,   -2 },\n/* 0xB8 */ {  1175,    3,   3,   4,   1,    1 },\n/* 0xB9 */ {  1177,    8,   9,   7,   0,   -6 },\n/* 0xBA */ {  1186,    4,  10,   6,   1,   -6 },\n/* 0xBB */ {  1191,    4,   4,   6,   1,   -5 },\n/* 0xBC */ {  1193,    5,   9,   7,   1,   -8 },\n/* 0xBD */ {  1199,    3,   1,   4,   0,   -8 },\n/* 0xBE */ {  1200,    3,  10,   3,   1,   -9 },\n/* 0xBF */ {  1204,    5,   9,   6,   0,   -8 },\n/* 0xC0 */ {  1210,    7,  10,   9,   1,   -9 },\n/* 0xC1 */ {  1219,    8,  10,   8,   0,   -9 },\n/* 0xC2 */ {  1229,    8,  10,   8,   0,   -9 },\n/* 0xC3 */ {  1239,    8,  10,   8,   0,   -9 },\n/* 0xC4 */ {  1249,    8,  10,   8,   0,   -9 },\n/* 0xC5 */ {  1259,    5,  10,   7,   1,   -9 },\n/* 0xC6 */ {  1266,    7,  11,   9,   0,  -10 },\n/* 0xC7 */ {  1276,    8,  12,   9,   0,   -8 },\n/* 0xC8 */ {  1288,    7,  11,   9,   0,  -10 },\n/* 0xC9 */ {  1298,    6,  10,   8,   1,   -9 },\n/* 0xCA */ {  1306,    7,  11,   8,   1,   -8 },\n/* 0xCB */ {  1316,    6,  10,   8,   1,   -9 },\n/* 0xCC */ {  1324,    6,  11,   8,   1,  -10 },\n/* 0xCD */ {  1333,    2,  10,   3,   1,   -9 },\n/* 0xCE */ {  1336,    3,  10,   4,   0,   -9 },\n/* 0xCF */ {  1340,    7,  10,   8,   1,   -9 },\n/* 0xD0 */ {  1349,    8,   9,   8,   0,   -8 },\n/* 0xD1 */ {  1358,    7,  10,   9,   1,   -9 },\n/* 0xD2 */ {  1367,    7,  10,   9,   1,   -9 },\n/* 0xD3 */ {  1376,    9,  10,   9,   0,   -9 },\n/* 0xD4 */ {  1388,    9,  11,   9,   0,  -10 },\n/* 0xD5 */ {  1401,    9,  11,   9,   0,  -10 },\n/* 0xD6 */ {  1414,    9,  11,   9,   0,  -10 },\n/* 0xD7 */ {  1427,    5,   5,   7,   1,   -5 },\n/* 0xD8 */ {  1431,    7,  10,   9,   1,   -9 },\n/* 0xD9 */ {  1440,    7,  10,   9,   1,   -9 },\n/* 0xDA */ {  1449,    7,  10,   9,   1,   -9 },\n/* 0xDB */ {  1458,    7,  10,   9,   1,   -9 },\n/* 0xDC */ {  1467,    7,  10,   9,   1,   -9 },\n/* 0xDD */ {  1476,    7,  10,   8,   1,   -9 },\n/* 0xDE */ {  1485,    6,  12,   7,   0,   -8 },\n/* 0xDF */ {  1494,    6,   9,   7,   1,   -8 },\n/* 0xE0 */ {  1501,    3,   9,   4,   1,   -8 },\n/* 0xE1 */ {  1505,    7,  10,   7,   0,   -9 },\n/* 0xE2 */ {  1514,    7,  10,   7,   0,   -9 },\n/* 0xE3 */ {  1523,    7,  10,   7,   0,   -9 },\n/* 0xE4 */ {  1532,    7,   9,   7,   0,   -8 },\n/* 0xE5 */ {  1540,    2,  10,   3,   1,   -9 },\n/* 0xE6 */ {  1543,    6,  10,   6,   0,   -9 },\n/* 0xE7 */ {  1551,    6,  10,   6,   0,   -6 },\n/* 0xE8 */ {  1559,    6,  10,   6,   0,   -9 },\n/* 0xE9 */ {  1567,    6,  10,   6,   0,   -9 },\n/* 0xEA */ {  1575,    6,   9,   6,   0,   -6 },\n/* 0xEB */ {  1582,    6,   9,   6,   0,   -8 },\n/* 0xEC */ {  1589,    6,  10,   6,   0,   -9 },\n/* 0xED */ {  1597,    2,  10,   3,   1,   -9 },\n/* 0xEE */ {  1600,    3,  10,   3,   0,   -9 },\n/* 0xEF */ {  1604,    7,  10,   7,   0,   -9 },\n/* 0xF0 */ {  1613,    7,   9,   7,   0,   -8 },\n/* 0xF1 */ {  1621,    5,  10,   6,   1,   -9 },\n/* 0xF2 */ {  1628,    5,  10,   6,   1,   -9 },\n/* 0xF3 */ {  1635,    6,  10,   6,   0,   -9 },\n/* 0xF4 */ {  1643,    6,  10,   6,   0,   -9 },\n/* 0xF5 */ {  1651,    6,  10,   6,   0,   -9 },\n/* 0xF6 */ {  1659,    6,   9,   6,   0,   -8 },\n/* 0xF7 */ {  1666,    5,   5,   7,   1,   -5 },\n/* 0xF8 */ {  1670,    3,  10,   4,   1,   -9 },\n/* 0xF9 */ {  1674,    5,  10,   6,   1,   -9 },\n/* 0xFA */ {  1681,    5,   9,   6,   1,   -8 },\n/* 0xFB */ {  1687,    5,  10,   6,   1,   -9 },\n/* 0xFC */ {  1694,    5,   9,   6,   1,   -8 },\n/* 0xFD */ {  1700,    6,  12,   6,   0,   -8 },\n/* 0xFE */ {  1709,    4,  11,   3,   0,   -7 },\n/* 0xFF */ {  1715,    1,   1,   4,   1,   -7 },\n};\n\nconst GFXfont FreeSans6pt_Win1250 PROGMEM = {\n(uint8_t*)FreeSans6pt_Win1250Bitmaps,\n(GFXglyph*)FreeSans6pt_Win1250Glyphs,\n0x01, 0xFF, 14\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans6pt_Win1251.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans6pt_Win1251\n*/\nconst uint8_t FreeSans6pt_Win1251Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x1C, 0x0A, 0x05, 0x04, 0xFE, 0x08, 0x1C, 0x02, 0x07, 0xE0, 0x9F, 0xC0,\n/* 0x02 */ 0x3F, 0xF0, 0x40, 0xE0, 0x10, 0x3F, 0x04, 0x9E, 0x28, 0x14, 0x0E, 0x00,\n/* 0x03 */ 0x3F, 0x10, 0x28, 0x06, 0x49, 0x80, 0x60, 0x19, 0x26, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x04 */ 0x3F, 0x10, 0x2A, 0x16, 0x49, 0xA1, 0x60, 0x19, 0xE6, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x05 */ 0x28, 0x15, 0x2A, 0xB5, 0x55, 0xA8, 0x54, 0x12, 0x04, 0x41, 0x08, 0x81, 0xC0,\n/* 0x06 */ 0x04, 0x08, 0x88, 0x82, 0x07, 0x01, 0x11, 0xA2, 0xC4, 0x40, 0x70, 0x20, 0x88, 0x88, 0x10, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x03, 0x83, 0x44, 0x48, 0x28, 0x01, 0x80, 0x17, 0xFE, 0x08, 0x45, 0x28, 0x84, 0x00,\n/* 0x09 */ 0x01, 0xC0, 0x68, 0x82, 0x41, 0x10, 0x02, 0x80, 0x06, 0x00, 0x14, 0x00, 0x8F, 0xFC,\n/* 0x0A */\n/* 0x0B */ 0x22, 0x2A, 0xA2, 0x30, 0x18, 0x0A, 0x09, 0x04, 0x44, 0x14, 0x04, 0x00,\n/* 0x0C */ 0x46, 0x00, 0x19, 0x03, 0x21, 0x20, 0x93, 0x04, 0x20, 0x11, 0x80, 0x50, 0x02, 0x7F, 0xE0,\n/* 0x0D */\n/* 0x0E */ 0x08, 0x0E, 0x08, 0x88, 0x24, 0x12, 0x09, 0x05, 0x01, 0xFF, 0x8A, 0x02, 0x00,\n/* 0x0F */ 0x3F, 0x14, 0xAA, 0x16, 0x01, 0x92, 0x60, 0x18, 0xC6, 0x49, 0x40, 0x8F, 0xC0,\n/* 0x10 */ 0x1B, 0x02, 0xA0, 0x54, 0x12, 0x42, 0x48, 0x49, 0x31, 0x1E, 0x23, 0xEA, 0xFE, 0x3C,\n/* 0x11 */ 0x3F, 0x02, 0x00, 0x20, 0x6D, 0x27, 0xF8, 0x3F, 0xC1, 0xFE, 0x37, 0xD0, 0xBE, 0x40, 0xE1, 0xE2, 0x00,\n/* 0x12 */ 0x12, 0x42, 0x20, 0x24, 0xC0, 0x29, 0x99, 0x05, 0x23, 0x30, 0xB0, 0x30, 0x00,\n/* 0x13 */ 0x3F, 0x88, 0x0A, 0x44, 0xD5, 0x58, 0x03, 0x00, 0x67, 0xCC, 0x71, 0x40, 0x47, 0xF0,\n/* 0x14 */ 0x3F, 0x18, 0x69, 0x26, 0x85, 0xA1, 0x6C, 0xD8, 0x06, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x15 */ 0x3F, 0x11, 0x00, 0xE8, 0x03, 0xA0, 0x1F, 0xB3, 0x7E, 0x00, 0xE9, 0xE0, 0x23, 0x00, 0x40, 0x40, 0xFE, 0x00,\n/* 0x16 */ 0x30, 0x38, 0x3A, 0x3E, 0x6E, 0xEB, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0x17 */ 0x3F, 0x04, 0x00, 0x82, 0x88, 0x5C, 0xA4, 0x49, 0x22, 0x81, 0x98, 0xC4, 0x40, 0xA3, 0xF0,\n/* 0x18 */ 0x07, 0x80, 0x42, 0x04, 0x08, 0x21, 0x41, 0x42, 0x60, 0x0E, 0x8C, 0xB2, 0x89, 0x50, 0x52, 0x82, 0x80,\n/* 0x19 */ 0x3F, 0xC4, 0x02, 0x80, 0x18, 0x01, 0xB3, 0x1B, 0xB9, 0x80, 0x19, 0xE1, 0x40, 0x23, 0xFC,\n/* 0x1A */ 0xFF, 0xC0, 0x67, 0x34, 0x58, 0x4C, 0x46, 0x03, 0x11, 0x80, 0xFF, 0xC0,\n/* 0x1B */ 0x0F, 0xC0, 0x40, 0x82, 0x49, 0x08, 0x04, 0x00, 0x00, 0x12, 0x02, 0x31, 0x34, 0x0B, 0x88, 0x45, 0x00, 0x20,\n/* 0x1C */ 0x3F, 0x88, 0x0A, 0x44, 0xC9, 0x19, 0x3B, 0x00, 0x60, 0x4C, 0x71, 0x40, 0x47, 0xF0,\n/* 0x1D */ 0x3F, 0x8B, 0x0A, 0x00, 0xC8, 0x18, 0x13, 0x00, 0x48, 0xCA, 0xC1, 0x44, 0x53, 0x30,\n/* 0x1E */ 0x19, 0xC2, 0x02, 0x50, 0x1E, 0x49, 0x80, 0x12, 0x01, 0x27, 0x92, 0x01, 0x10, 0x20, 0xFC,\n/* 0x1F */ 0x30, 0x1C, 0x0C, 0x3E, 0x7E, 0xCF, 0x07, 0xC7, 0x7F, 0x3F,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFC, 0x80,\n/* '\"' 0x22 */ 0xB6, 0x80,\n/* '#' 0x23 */ 0x24, 0x51, 0xF9, 0x42, 0x9F, 0x92, 0x28,\n/* '$' 0x24 */ 0x10, 0xE5, 0x55, 0x50, 0xE1, 0x65, 0x55, 0xE1, 0x00,\n/* '%' 0x25 */ 0x71, 0x24, 0x89, 0x22, 0x50, 0x74, 0x02, 0x70, 0xA4, 0x49, 0x11, 0xC0,\n/* '&' 0x26 */ 0x71, 0x24, 0x9C, 0x62, 0x58, 0xA7, 0xF4,\n/* ''' 0x27 */ 0xE0,\n/* '(' 0x28 */ 0x5A, 0xAA, 0x94,\n/* ')' 0x29 */ 0x89, 0x12, 0x49, 0x29, 0x00,\n/* '*' 0x2A */ 0x5E, 0x80,\n/* '+' 0x2B */ 0x21, 0x3E, 0x42, 0x00,\n/* ',' 0x2C */ 0xE0,\n/* '-' 0x2D */ 0xC0,\n/* '.' 0x2E */ 0x80,\n/* '/' 0x2F */ 0x24, 0xA4, 0xA4, 0x80,\n/* '0' 0x30 */ 0x76, 0xE3, 0x18, 0xC6, 0x3B, 0x70,\n/* '1' 0x31 */ 0x27, 0x92, 0x49, 0x20,\n/* '2' 0x32 */ 0x79, 0x10, 0x41, 0x08, 0xC6, 0x10, 0xFC,\n/* '3' 0x33 */ 0x79, 0x30, 0x43, 0x18, 0x10, 0x71, 0x78,\n/* '4' 0x34 */ 0x08, 0x61, 0x8A, 0x49, 0x2F, 0xC2, 0x08,\n/* '5' 0x35 */ 0xFC, 0x21, 0xE8, 0x84, 0x31, 0xF0,\n/* '6' 0x36 */ 0x74, 0x61, 0xE8, 0xC6, 0x31, 0x70,\n/* '7' 0x37 */ 0xF8, 0x44, 0x22, 0x11, 0x08, 0x40,\n/* '8' 0x38 */ 0x39, 0x34, 0x53, 0x39, 0x1C, 0x51, 0x38,\n/* '9' 0x39 */ 0x39, 0x3C, 0x71, 0x4C, 0xF0, 0x53, 0x78,\n/* ':' 0x3A */ 0x82,\n/* ';' 0x3B */ 0x87,\n/* '<' 0x3C */ 0x3E, 0x30, 0x60, 0x80,\n/* '=' 0x3D */ 0xF8, 0x3E,\n/* '>' 0x3E */ 0xE0, 0xC6, 0xC8, 0x00,\n/* '?' 0x3F */ 0x74, 0x42, 0x11, 0x10, 0x80, 0x20,\n/* '@' 0x40 */ 0x0F, 0x86, 0x19, 0x9A, 0xA4, 0xD9, 0x13, 0x22, 0x56, 0xDA, 0x6E, 0x60, 0x06, 0x00, 0x3C, 0x00,\n/* 'A' 0x41 */ 0x18, 0x18, 0x24, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n/* 'B' 0x42 */ 0xFA, 0x18, 0x61, 0xFA, 0x18, 0x61, 0xFC,\n/* 'C' 0x43 */ 0x3E, 0x63, 0x40, 0x40, 0xC0, 0x40, 0x41, 0x63, 0x3E,\n/* 'D' 0x44 */ 0xF9, 0x0A, 0x1C, 0x18, 0x30, 0x61, 0xC2, 0xF8,\n/* 'E' 0x45 */ 0xFE, 0x08, 0x20, 0xFE, 0x08, 0x20, 0xFC,\n/* 'F' 0x46 */ 0xFE, 0x08, 0x20, 0xFA, 0x08, 0x20, 0x80,\n/* 'G' 0x47 */ 0x1E, 0x61, 0x40, 0x40, 0xC7, 0x41, 0x41, 0x63, 0x1D,\n/* 'H' 0x48 */ 0x83, 0x06, 0x0C, 0x1F, 0xF0, 0x60, 0xC1, 0x82,\n/* 'I' 0x49 */ 0xFF, 0x80,\n/* 'J' 0x4A */ 0x08, 0x42, 0x10, 0x87, 0x29, 0x70,\n/* 'K' 0x4B */ 0x85, 0x12, 0x45, 0x0D, 0x13, 0x22, 0x42, 0x86,\n/* 'L' 0x4C */ 0x84, 0x21, 0x08, 0x42, 0x10, 0xF8,\n/* 'M' 0x4D */ 0xC3, 0xC3, 0xC3, 0xA5, 0xA5, 0xA5, 0x99, 0x99, 0x99,\n/* 'N' 0x4E */ 0x83, 0x86, 0x8D, 0x19, 0x33, 0x62, 0xC3, 0x86,\n/* 'O' 0x4F */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x06, 0xC6, 0x1E, 0x00,\n/* 'P' 0x50 */ 0xFA, 0x18, 0x61, 0xFA, 0x08, 0x20, 0x80,\n/* 'Q' 0x51 */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x16, 0xC6, 0x1F, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFD, 0x0E, 0x1C, 0x2F, 0x90, 0xA1, 0x42, 0x86,\n/* 'S' 0x53 */ 0x7A, 0x18, 0x30, 0x78, 0x38, 0x61, 0x78,\n/* 'T' 0x54 */ 0xFE, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10,\n/* 'U' 0x55 */ 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xE2, 0x78,\n/* 'V' 0x56 */ 0xC2, 0x85, 0x0B, 0x22, 0x44, 0x8E, 0x0C, 0x18,\n/* 'W' 0x57 */ 0xC4, 0x28, 0xCD, 0x29, 0x25, 0x24, 0xA4, 0x52, 0x8C, 0x61, 0x8C, 0x31, 0x80,\n/* 'X' 0x58 */ 0x87, 0x34, 0x8C, 0x30, 0xC4, 0xA3, 0x84,\n/* 'Y' 0x59 */ 0xC3, 0x42, 0x24, 0x34, 0x18, 0x08, 0x08, 0x08, 0x08,\n/* 'Z' 0x5A */ 0x7E, 0x0C, 0x30, 0x41, 0x06, 0x18, 0x20, 0xFE,\n/* '[' 0x5B */ 0xEA, 0xAA, 0xAB,\n/* '\\' 0x5C */ 0x92, 0x24, 0x89, 0x20,\n/* ']' 0x5D */ 0xD5, 0x55, 0x57,\n/* '^' 0x5E */ 0x46, 0xA9,\n/* '_' 0x5F */ 0xFE,\n/* '`' 0x60 */ 0x80,\n/* 'a' 0x61 */ 0x79, 0x20, 0x4F, 0xC6, 0x37, 0x40,\n/* 'b' 0x62 */ 0x84, 0x3D, 0x18, 0xC6, 0x31, 0xF0,\n/* 'c' 0x63 */ 0x39, 0x3C, 0x20, 0xC1, 0x33, 0x80,\n/* 'd' 0x64 */ 0x04, 0x13, 0xD3, 0xC6, 0x1C, 0x53, 0x3C,\n/* 'e' 0x65 */ 0x39, 0x38, 0x7F, 0x81, 0x13, 0x80,\n/* 'f' 0x66 */ 0x6B, 0xA4, 0x92, 0x40,\n/* 'g' 0x67 */ 0x35, 0x3C, 0x61, 0xC5, 0x33, 0x41, 0x4D, 0xE0,\n/* 'h' 0x68 */ 0x84, 0x3D, 0x38, 0xC6, 0x31, 0x88,\n/* 'i' 0x69 */ 0xBF, 0x80,\n/* 'j' 0x6A */ 0x45, 0x55, 0x57,\n/* 'k' 0x6B */ 0x84, 0x25, 0x4E, 0x52, 0xD2, 0x88,\n/* 'l' 0x6C */ 0xFF, 0x80,\n/* 'm' 0x6D */ 0xF7, 0x99, 0x91, 0x91, 0x91, 0x91, 0x91,\n/* 'n' 0x6E */ 0xF4, 0x63, 0x18, 0xC6, 0x20,\n/* 'o' 0x6F */ 0x39, 0x3C, 0x61, 0xC5, 0x33, 0x80,\n/* 'p' 0x70 */ 0xF4, 0x63, 0x18, 0xC7, 0xD0, 0x80,\n/* 'q' 0x71 */ 0x3D, 0x3C, 0x61, 0xC5, 0x37, 0x41, 0x04,\n/* 'r' 0x72 */ 0xF2, 0x49, 0x20,\n/* 's' 0x73 */ 0x7A, 0x50, 0xE0, 0xE5, 0xE0,\n/* 't' 0x74 */ 0x5D, 0x24, 0x93,\n/* 'u' 0x75 */ 0x8C, 0x63, 0x18, 0xCF, 0xA0,\n/* 'v' 0x76 */ 0x85, 0x24, 0x92, 0x30, 0xC3, 0x00,\n/* 'w' 0x77 */ 0x89, 0x59, 0x59, 0x55, 0x56, 0x26, 0x26,\n/* 'x' 0x78 */ 0x4A, 0x4C, 0x43, 0x27, 0x20,\n/* 'y' 0x79 */ 0x8A, 0x52, 0xA5, 0x18, 0x84, 0x22, 0x00,\n/* 'z' 0x7A */ 0x78, 0x44, 0x46, 0x23, 0xE0,\n/* '{' 0x7B */ 0x6A, 0xAA, 0xA9,\n/* '|' 0x7C */ 0xFF, 0xE0,\n/* '}' 0x7D */ 0x95, 0x55, 0x56,\n/* '~' 0x7E */ 0x66, 0x60,\n/* 0x7F */\n/* 0x80 */ 0xFC, 0x08, 0x04, 0x02, 0x01, 0xF0, 0x8C, 0x46, 0x23, 0x11, 0x80, 0xC0, 0xC0,\n/* 0x81 */ 0x10, 0x8F, 0xE0, 0x82, 0x08, 0x20, 0x82, 0x00,\n/* 0x82 */ 0xE0,\n/* 0x83 */ 0x24, 0x0F, 0x88, 0x88, 0x80,\n/* 0x84 */ 0xB6, 0x80,\n/* 0x85 */ 0xA8,\n/* 0x86 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0x21, 0x08,\n/* 0x87 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0xF9, 0x08,\n/* 0x88 */ 0x1C, 0x45, 0x07, 0xE4, 0x1F, 0x10, 0x10, 0x1E,\n/* 0x89 */ 0x62, 0x09, 0x40, 0x98, 0x06, 0x80, 0x10, 0x01, 0x66, 0x29, 0x92, 0x99, 0x06, 0x60,\n/* 0x8A */ 0x7C, 0x08, 0x81, 0x10, 0x22, 0x04, 0x7C, 0x88, 0x51, 0x0A, 0x21, 0x87, 0xC0,\n/* 0x8B */ 0x64,\n/* 0x8C */ 0x84, 0x10, 0x82, 0x10, 0x42, 0x0F, 0xFD, 0x08, 0xA1, 0x0C, 0x23, 0x87, 0xC0,\n/* 0x8D */ 0x10, 0x88, 0xE6, 0xB3, 0x8C, 0x28, 0x92, 0x28, 0xC0,\n/* 0x8E */ 0xFC, 0x08, 0x04, 0x02, 0x01, 0xF0, 0x8C, 0x46, 0x23, 0x11, 0x80,\n/* 0x8F */ 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xFE, 0x20, 0x40,\n/* 0x90 */ 0x43, 0xC4, 0x1F, 0x45, 0x14, 0x51, 0x44, 0x11, 0x80,\n/* 0x91 */ 0xE0,\n/* 0x92 */ 0xE0,\n/* 0x93 */ 0xB6, 0x80,\n/* 0x94 */ 0xB6, 0x80,\n/* 0x95 */ 0xFF, 0x80,\n/* 0x96 */ 0xFC,\n/* 0x97 */ 0xFF, 0xF0,\n/* 0x98 */\n/* 0x99 */ 0xE6, 0x28, 0xCD, 0x19, 0xA3, 0x34, 0x6A, 0x8B, 0x51, 0x68,\n/* 0x9A */ 0x78, 0x24, 0x13, 0xC9, 0x14, 0x8E, 0x7C,\n/* 0x9B */ 0x98,\n/* 0x9C */ 0x88, 0x44, 0x3F, 0xD1, 0x38, 0x8C, 0x78,\n/* 0x9D */ 0x24, 0x09, 0xAC, 0xCA, 0x90,\n/* 0x9E */ 0x43, 0xC4, 0x1F, 0x45, 0x14, 0x51, 0x44,\n/* 0x9F */ 0x8C, 0x63, 0x18, 0xFC, 0x80,\n/* 0xA0 */\n/* 0xA1 */ 0x24, 0x33, 0x0A, 0x36, 0x45, 0x8E, 0x0C, 0x10, 0x60, 0x80,\n/* 0xA2 */ 0x51, 0x22, 0x95, 0xA8, 0xC4, 0x23, 0x10,\n/* 0xA3 */ 0x08, 0x42, 0x10, 0x86, 0x31, 0x78,\n/* 0xA4 */ 0xFC, 0x63, 0xF0,\n/* 0xA5 */ 0x07, 0xF8, 0x20, 0x82, 0x08, 0x20, 0x82, 0x00,\n/* 0xA6 */ 0xF9, 0xF0,\n/* 0xA7 */ 0x32, 0x91, 0xC9, 0x47, 0x26, 0x14, 0xA4, 0xC0,\n/* 0xA8 */ 0x28, 0x0F, 0xE0, 0x82, 0x0F, 0xE0, 0x82, 0x0F, 0xC0,\n/* 0xA9 */ 0x3E, 0x3F, 0xB8, 0xF4, 0x1A, 0x0D, 0x17, 0x76, 0xC6, 0x3E, 0x00,\n/* 0xAA */ 0x38, 0x8A, 0x0C, 0x0F, 0x90, 0x20, 0xE3, 0x7C,\n/* 0xAB */ 0x5A, 0xA5,\n/* 0xAC */ 0x51, 0x55, 0x56,\n/* 0xAD */\n/* 0xAE */ 0x3E, 0x31, 0xB7, 0x72, 0x99, 0xCC, 0xC7, 0x56, 0xC6, 0x3E, 0x00,\n/* 0xAF */ 0xA1, 0x24, 0x92, 0x49, 0x00,\n/* 0xB0 */ 0x69, 0x96,\n/* 0xB1 */ 0x21, 0x3E, 0x42, 0x03, 0xE0,\n/* 0xB2 */ 0xFF, 0x80,\n/* 0xB3 */ 0xDF, 0x80,\n/* 0xB4 */ 0x27, 0xC9, 0x24,\n/* 0xB5 */ 0x8A, 0x28, 0xA2, 0x8A, 0x6E, 0xE0, 0x80,\n/* 0xB6 */ 0x7F, 0xAE, 0xBA, 0x68, 0xA2, 0x8A, 0x28, 0xA0,\n/* 0xB7 */ 0x80,\n/* 0xB8 */ 0x28, 0xA0, 0x1E, 0x47, 0xFC, 0x11, 0x78,\n/* 0xB9 */ 0x88, 0x44, 0x32, 0x59, 0xDA, 0xCD, 0x66, 0x6B, 0x32, 0x8B, 0x80,\n/* 0xBA */ 0x79, 0x1F, 0x30, 0x45, 0xE0,\n/* 0xBB */ 0xA5, 0x5A,\n/* 0xBC */ 0x45, 0x55, 0x57,\n/* 0xBD */ 0x7A, 0x18, 0x70, 0x78, 0x38, 0x61, 0x7C,\n/* 0xBE */ 0x7A, 0x1C, 0x1C, 0xBC,\n/* 0xBF */ 0xB4, 0x24, 0x92, 0x40,\n/* 0xC0 */ 0x18, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n/* 0xC1 */ 0xFE, 0x08, 0x20, 0xFA, 0x18, 0x61, 0xF8,\n/* 0xC2 */ 0xFA, 0x18, 0x61, 0xFA, 0x18, 0x61, 0xFC,\n/* 0xC3 */ 0xFE, 0x08, 0x20, 0x82, 0x08, 0x20, 0x80,\n/* 0xC4 */ 0x1F, 0x08, 0x84, 0x42, 0x21, 0x10, 0x88, 0x44, 0x42, 0xFF, 0xC0, 0x60, 0x20,\n/* 0xC5 */ 0xFE, 0x08, 0x20, 0xFE, 0x08, 0x20, 0xFC,\n/* 0xC6 */ 0x88, 0xA4, 0x9A, 0x87, 0xC1, 0xC1, 0xF1, 0xAD, 0x92, 0x88, 0x80,\n/* 0xC7 */ 0x7A, 0x18, 0x41, 0x38, 0x18, 0x61, 0x7C,\n/* 0xC8 */ 0x87, 0x0E, 0x2C, 0x59, 0x34, 0x68, 0xE1, 0xC2,\n/* 0xC9 */ 0x28, 0x22, 0x1C, 0x38, 0xB1, 0x64, 0xD1, 0xA3, 0x87, 0x08,\n/* 0xCA */ 0x8E, 0x6B, 0x38, 0xC2, 0x89, 0x22, 0x8C,\n/* 0xCB */ 0x3E, 0x44, 0x89, 0x12, 0x24, 0x58, 0xA1, 0xC2,\n/* 0xCC */ 0xC3, 0xC3, 0xC3, 0xA5, 0xA5, 0xA5, 0x99, 0x99, 0x99,\n/* 0xCD */ 0x83, 0x06, 0x0C, 0x1F, 0xF0, 0x60, 0xC1, 0x82,\n/* 0xCE */ 0x3C, 0x42, 0x81, 0x81, 0x81, 0x81, 0x81, 0xC2, 0x7C,\n/* 0xCF */ 0xFF, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x82,\n/* 0xD0 */ 0xFA, 0x18, 0x61, 0xFE, 0x08, 0x20, 0x80,\n/* 0xD1 */ 0x38, 0x8A, 0x0C, 0x08, 0x10, 0x20, 0xE3, 0x7C,\n/* 0xD2 */ 0xFE, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10,\n/* 0xD3 */ 0xC2, 0x8D, 0x91, 0x63, 0x83, 0x04, 0x18, 0x20,\n/* 0xD4 */ 0x08, 0x1F, 0x32, 0x71, 0x18, 0x8C, 0x47, 0x26, 0xFE, 0x08, 0x00,\n/* 0xD5 */ 0x87, 0x34, 0x8C, 0x30, 0xC4, 0xB3, 0x84,\n/* 0xD6 */ 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xFF, 0x01, 0x01,\n/* 0xD7 */ 0x8E, 0x38, 0xE3, 0x8D, 0xF0, 0xC3, 0x0C,\n/* 0xD8 */ 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xFF,\n/* 0xD9 */ 0x99, 0x4C, 0xA6, 0x53, 0x29, 0x94, 0xCA, 0x65, 0x32, 0xFF, 0x80, 0x40, 0x20,\n/* 0xDA */ 0xF0, 0x04, 0x01, 0x00, 0x40, 0x1F, 0x84, 0x21, 0x0C, 0x42, 0x1F, 0x00,\n/* 0xDB */ 0x81, 0xC0, 0xE0, 0x70, 0x3F, 0xDC, 0x2E, 0x17, 0x0B, 0xF9, 0x80,\n/* 0xDC */ 0x82, 0x08, 0x20, 0xFE, 0x18, 0x61, 0xF8,\n/* 0xDD */ 0x79, 0x8A, 0x18, 0x13, 0xE0, 0x60, 0xC2, 0x7C,\n/* 0xDE */ 0x87, 0x26, 0x39, 0x06, 0x41, 0xF0, 0x64, 0x19, 0x06, 0x63, 0x8F, 0x80,\n/* 0xDF */ 0x7E, 0x18, 0x61, 0x7C, 0xD6, 0x71, 0x84,\n/* 0xE0 */ 0x79, 0x11, 0xD9, 0xCD, 0xD0,\n/* 0xE1 */ 0x0D, 0xC4, 0x1E, 0x47, 0x1C, 0x51, 0x78,\n/* 0xE2 */ 0xF4, 0xBD, 0x29, 0xF8,\n/* 0xE3 */ 0xF8, 0x88, 0x88,\n/* 0xE4 */ 0x3C, 0x48, 0x91, 0x22, 0x5F, 0xE0, 0x80,\n/* 0xE5 */ 0x79, 0x1F, 0xF0, 0x45, 0xE0,\n/* 0xE6 */ 0x92, 0x54, 0x38, 0x3C, 0x56, 0x93,\n/* 0xE7 */ 0x78, 0x23, 0x82, 0xCD, 0xE0,\n/* 0xE8 */ 0x9C, 0xEB, 0x5C, 0xC4,\n/* 0xE9 */ 0x70, 0x27, 0x3A, 0xD7, 0x31,\n/* 0xEA */ 0x9A, 0xCC, 0xA9,\n/* 0xEB */ 0x7A, 0x52, 0x94, 0xE4,\n/* 0xEC */ 0x8F, 0x3D, 0x6D, 0xA6, 0x90,\n/* 0xED */ 0x8C, 0x7F, 0x18, 0xC4,\n/* 0xEE */ 0x79, 0x1C, 0x71, 0x45, 0xE0,\n/* 0xEF */ 0xFC, 0x63, 0x18, 0xC4,\n/* 0xF0 */ 0xFC, 0x63, 0x18, 0xFA, 0x10, 0x80,\n/* 0xF1 */ 0x79, 0x1C, 0x30, 0x45, 0xE0,\n/* 0xF2 */ 0xF9, 0x08, 0x42, 0x10,\n/* 0xF3 */ 0x8A, 0x56, 0xA3, 0x10, 0x8C, 0x40,\n/* 0xF4 */ 0x04, 0x01, 0x07, 0xF9, 0x31, 0xC4, 0x71, 0x14, 0xC5, 0xFE, 0x04, 0x01, 0x00, 0x40,\n/* 0xF5 */ 0x4B, 0x8C, 0x65, 0xE4,\n/* 0xF6 */ 0x8A, 0x28, 0xA2, 0x8B, 0xF0, 0x40,\n/* 0xF7 */ 0x99, 0x97, 0x11,\n/* 0xF8 */ 0x96, 0x59, 0x65, 0x97, 0xF0,\n/* 0xF9 */ 0x95, 0x2A, 0x54, 0xA9, 0x5F, 0xC0, 0x80,\n/* 0xFA */ 0xF0, 0x20, 0x78, 0x91, 0x23, 0xC0,\n/* 0xFB */ 0x86, 0x1F, 0x63, 0x8F, 0xD0,\n/* 0xFC */ 0x84, 0x3D, 0x18, 0xF8,\n/* 0xFD */ 0xF4, 0xDE, 0x19, 0xF8,\n/* 0xFE */ 0x9E, 0xA2, 0xE1, 0xA1, 0xA2, 0x9E,\n/* 0xFF */ 0xFC, 0x7E, 0xD4, 0xC4,\n};\n\nconst GFXglyph FreeSans6pt_Win1251Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,    9,  10,  11,   1,   -9 },\n/* 0x02 */ {    12,    9,  10,  11,   1,   -8 },\n/* 0x03 */ {    24,   10,  10,  12,   1,   -8 },\n/* 0x04 */ {    37,   10,  10,  12,   1,   -8 },\n/* 0x05 */ {    50,   10,  10,  12,   1,   -9 },\n/* 0x06 */ {    63,   11,  11,  13,   1,   -9 },\n/* 0x07 */ {    79,    0,   0,   8,   0,    0 },\n/* 0x08 */ {    79,   12,   9,  14,   1,   -8 },\n/* 0x09 */ {    93,   14,   8,  16,   1,   -7 },\n/* 0x0A */ {   107,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   107,    9,  10,  11,   1,   -9 },\n/* 0x0C */ {   119,   13,   9,  15,   1,   -8 },\n/* 0x0D */ {   134,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   134,    9,  11,  11,   1,   -9 },\n/* 0x0F */ {   147,   10,  10,  12,   1,   -9 },\n/* 0x10 */ {   160,   11,  10,  13,   1,   -9 },\n/* 0x11 */ {   174,   13,  10,  15,   1,   -9 },\n/* 0x12 */ {   191,   10,  10,  12,   1,   -9 },\n/* 0x13 */ {   204,   11,  10,  13,   1,   -9 },\n/* 0x14 */ {   218,   10,  10,  12,   1,   -9 },\n/* 0x15 */ {   231,   14,  10,  16,   1,   -9 },\n/* 0x16 */ {   249,    8,  10,  10,   1,   -9 },\n/* 0x17 */ {   259,   12,  10,  14,   1,   -9 },\n/* 0x18 */ {   274,   13,  10,  15,   1,   -9 },\n/* 0x19 */ {   291,   12,  10,  14,   1,   -9 },\n/* 0x1A */ {   306,    9,  10,  11,   1,   -8 },\n/* 0x1B */ {   318,   14,  10,  16,   1,   -9 },\n/* 0x1C */ {   336,   11,  10,  13,   1,   -9 },\n/* 0x1D */ {   350,   11,  10,  13,   1,   -9 },\n/* 0x1E */ {   364,   12,  10,  14,   1,   -9 },\n/* 0x1F */ {   379,    8,  10,  11,   2,   -9 },\n/* ' ' 0x20 */ {   389,    0,   0,   3,   0,    0 },\n/* '!' 0x21 */ {   389,    1,   9,   4,   2,   -8 },\n/* '\"' 0x22 */ {   391,    3,   3,   4,   0,   -8 },\n/* '#' 0x23 */ {   393,    7,   8,   7,   0,   -7 },\n/* '$' 0x24 */ {   400,    6,  11,   7,   0,   -9 },\n/* '%' 0x25 */ {   409,   10,   9,  11,   0,   -8 },\n/* '&' 0x26 */ {   421,    6,   9,   8,   1,   -8 },\n/* ''' 0x27 */ {   428,    1,   3,   2,   1,   -8 },\n/* '(' 0x28 */ {   429,    2,  11,   4,   1,   -8 },\n/* ')' 0x29 */ {   432,    3,  11,   4,   0,   -8 },\n/* '*' 0x2A */ {   437,    3,   3,   5,   1,   -8 },\n/* '+' 0x2B */ {   439,    5,   5,   7,   1,   -4 },\n/* ',' 0x2C */ {   443,    1,   3,   3,   1,    0 },\n/* '-' 0x2D */ {   444,    2,   1,   4,   1,   -3 },\n/* '.' 0x2E */ {   445,    1,   1,   3,   1,    0 },\n/* '/' 0x2F */ {   446,    3,   9,   3,   0,   -8 },\n/* '0' 0x30 */ {   450,    5,   9,   7,   1,   -8 },\n/* '1' 0x31 */ {   456,    3,   9,   7,   1,   -8 },\n/* '2' 0x32 */ {   460,    6,   9,   7,   0,   -8 },\n/* '3' 0x33 */ {   467,    6,   9,   7,   0,   -8 },\n/* '4' 0x34 */ {   474,    6,   9,   7,   0,   -8 },\n/* '5' 0x35 */ {   481,    5,   9,   7,   1,   -8 },\n/* '6' 0x36 */ {   487,    5,   9,   7,   1,   -8 },\n/* '7' 0x37 */ {   493,    5,   9,   7,   1,   -8 },\n/* '8' 0x38 */ {   499,    6,   9,   7,   0,   -8 },\n/* '9' 0x39 */ {   506,    6,   9,   7,   0,   -8 },\n/* ':' 0x3A */ {   513,    1,   7,   3,   1,   -6 },\n/* ';' 0x3B */ {   514,    1,   8,   3,   1,   -5 },\n/* '<' 0x3C */ {   515,    5,   5,   7,   1,   -4 },\n/* '=' 0x3D */ {   519,    5,   3,   7,   1,   -3 },\n/* '>' 0x3E */ {   521,    5,   5,   7,   1,   -4 },\n/* '?' 0x3F */ {   525,    5,   9,   7,   1,   -8 },\n/* '@' 0x40 */ {   531,   11,  11,  12,   0,   -8 },\n/* 'A' 0x41 */ {   547,    8,   9,   8,   0,   -8 },\n/* 'B' 0x42 */ {   556,    6,   9,   8,   1,   -8 },\n/* 'C' 0x43 */ {   563,    8,   9,   9,   0,   -8 },\n/* 'D' 0x44 */ {   572,    7,   9,   8,   1,   -8 },\n/* 'E' 0x45 */ {   580,    6,   9,   8,   1,   -8 },\n/* 'F' 0x46 */ {   587,    6,   9,   7,   1,   -8 },\n/* 'G' 0x47 */ {   594,    8,   9,   9,   0,   -8 },\n/* 'H' 0x48 */ {   603,    7,   9,   9,   1,   -8 },\n/* 'I' 0x49 */ {   611,    1,   9,   3,   1,   -8 },\n/* 'J' 0x4A */ {   613,    5,   9,   6,   0,   -8 },\n/* 'K' 0x4B */ {   619,    7,   9,   8,   1,   -8 },\n/* 'L' 0x4C */ {   627,    5,   9,   7,   1,   -8 },\n/* 'M' 0x4D */ {   633,    8,   9,  10,   1,   -8 },\n/* 'N' 0x4E */ {   642,    7,   9,   9,   1,   -8 },\n/* 'O' 0x4F */ {   650,    9,   9,   9,   0,   -8 },\n/* 'P' 0x50 */ {   661,    6,   9,   8,   1,   -8 },\n/* 'Q' 0x51 */ {   668,    9,  10,   9,   0,   -8 },\n/* 'R' 0x52 */ {   680,    7,   9,   9,   1,   -8 },\n/* 'S' 0x53 */ {   688,    6,   9,   8,   1,   -8 },\n/* 'T' 0x54 */ {   695,    7,   9,   8,   0,   -8 },\n/* 'U' 0x55 */ {   703,    7,   9,   9,   1,   -8 },\n/* 'V' 0x56 */ {   711,    7,   9,   8,   0,   -8 },\n/* 'W' 0x57 */ {   719,   11,   9,  11,   0,   -8 },\n/* 'X' 0x58 */ {   732,    6,   9,   8,   1,   -8 },\n/* 'Y' 0x59 */ {   739,    8,   9,   8,   0,   -8 },\n/* 'Z' 0x5A */ {   748,    7,   9,   7,   0,   -8 },\n/* '[' 0x5B */ {   756,    2,  12,   3,   1,   -8 },\n/* '\\' 0x5C */ {   759,    3,   9,   3,   0,   -8 },\n/* ']' 0x5D */ {   763,    2,  12,   3,   0,   -8 },\n/* '^' 0x5E */ {   766,    4,   4,   6,   1,   -8 },\n/* '_' 0x5F */ {   768,    7,   1,   7,   0,    2 },\n/* '`' 0x60 */ {   769,    1,   1,   3,   1,   -8 },\n/* 'a' 0x61 */ {   770,    6,   7,   7,   0,   -6 },\n/* 'b' 0x62 */ {   776,    5,   9,   7,   1,   -8 },\n/* 'c' 0x63 */ {   782,    6,   7,   6,   0,   -6 },\n/* 'd' 0x64 */ {   788,    6,   9,   7,   0,   -8 },\n/* 'e' 0x65 */ {   795,    6,   7,   6,   0,   -6 },\n/* 'f' 0x66 */ {   801,    3,   9,   3,   0,   -8 },\n/* 'g' 0x67 */ {   805,    6,  10,   7,   0,   -6 },\n/* 'h' 0x68 */ {   813,    5,   9,   6,   1,   -8 },\n/* 'i' 0x69 */ {   819,    1,   9,   3,   1,   -8 },\n/* 'j' 0x6A */ {   821,    2,  12,   3,   0,   -8 },\n/* 'k' 0x6B */ {   824,    5,   9,   6,   1,   -8 },\n/* 'l' 0x6C */ {   830,    1,   9,   3,   1,   -8 },\n/* 'm' 0x6D */ {   832,    8,   7,  10,   1,   -6 },\n/* 'n' 0x6E */ {   839,    5,   7,   6,   1,   -6 },\n/* 'o' 0x6F */ {   844,    6,   7,   6,   0,   -6 },\n/* 'p' 0x70 */ {   850,    5,   9,   7,   1,   -6 },\n/* 'q' 0x71 */ {   856,    6,   9,   7,   0,   -6 },\n/* 'r' 0x72 */ {   863,    3,   7,   4,   1,   -6 },\n/* 's' 0x73 */ {   866,    5,   7,   6,   0,   -6 },\n/* 't' 0x74 */ {   871,    3,   8,   3,   0,   -7 },\n/* 'u' 0x75 */ {   874,    5,   7,   6,   1,   -6 },\n/* 'v' 0x76 */ {   879,    6,   7,   6,   0,   -6 },\n/* 'w' 0x77 */ {   885,    8,   7,   9,   0,   -6 },\n/* 'x' 0x78 */ {   892,    5,   7,   6,   0,   -6 },\n/* 'y' 0x79 */ {   897,    5,  10,   6,   0,   -6 },\n/* 'z' 0x7A */ {   904,    5,   7,   6,   0,   -6 },\n/* '{' 0x7B */ {   909,    2,  12,   4,   1,   -8 },\n/* '|' 0x7C */ {   912,    1,  11,   3,   1,   -8 },\n/* '}' 0x7D */ {   914,    2,  12,   4,   1,   -8 },\n/* '~' 0x7E */ {   917,    6,   2,   6,   0,   -4 },\n/* 0x7F */ {   919,    0,   0,   0,   0,    0 },\n/* 0x80 */ {   919,    9,  11,   9,   0,   -8 },\n/* 0x81 */ {   932,    6,  10,   7,   1,   -9 },\n/* 0x82 */ {   940,    1,   3,   3,   1,    0 },\n/* 0x83 */ {   941,    4,   9,   5,   1,   -8 },\n/* 0x84 */ {   946,    3,   3,   5,   1,    0 },\n/* 0x85 */ {   948,    5,   1,   7,   1,    0 },\n/* 0x86 */ {   949,    5,  11,   7,   1,   -8 },\n/* 0x87 */ {   956,    5,  11,   7,   1,   -8 },\n/* 0x88 */ {   963,    7,   9,   8,   0,   -8 },\n/* 0x89 */ {   971,   12,   9,  12,   0,   -8 },\n/* 0x8A */ {   985,   11,   9,  13,   1,   -8 },\n/* 0x8B */ {   998,    2,   3,   4,   1,   -4 },\n/* 0x8C */ {   999,   11,   9,  12,   1,   -8 },\n/* 0x8D */ {  1012,    6,  11,   8,   1,  -10 },\n/* 0x8E */ {  1021,    9,   9,   9,   0,   -8 },\n/* 0x8F */ {  1032,    7,  11,   9,   1,   -8 },\n/* 0x90 */ {  1042,    6,  11,   7,   0,   -8 },\n/* 0x91 */ {  1051,    1,   3,   3,   1,   -8 },\n/* 0x92 */ {  1052,    1,   3,   2,   1,   -8 },\n/* 0x93 */ {  1053,    3,   3,   5,   1,   -8 },\n/* 0x94 */ {  1055,    3,   3,   5,   1,   -8 },\n/* 0x95 */ {  1057,    3,   3,   5,   1,   -5 },\n/* 0x96 */ {  1059,    6,   1,   6,   0,   -3 },\n/* 0x97 */ {  1060,   12,   1,  12,   0,   -3 },\n/* 0x98 */ {  1062,    0,   0,   8,   0,    0 },\n/* 0x99 */ {  1062,   11,   7,  12,   1,   -8 },\n/* 0x9A */ {  1072,    9,   6,  10,   0,   -5 },\n/* 0x9B */ {  1079,    2,   3,   3,   1,   -4 },\n/* 0x9C */ {  1080,    9,   6,  10,   1,   -5 },\n/* 0x9D */ {  1087,    4,   9,   6,   1,   -8 },\n/* 0x9E */ {  1092,    6,   9,   7,   0,   -8 },\n/* 0x9F */ {  1099,    5,   7,   7,   1,   -5 },\n/* 0xA0 */ {  1104,    0,   0,   3,   0,    0 },\n/* 0xA1 */ {  1104,    7,  11,   7,   0,  -10 },\n/* 0xA2 */ {  1114,    5,  11,   6,   0,   -7 },\n/* 0xA3 */ {  1121,    5,   9,   6,   0,   -8 },\n/* 0xA4 */ {  1127,    5,   4,   7,   1,   -5 },\n/* 0xA5 */ {  1130,    6,  10,   7,   1,   -9 },\n/* 0xA6 */ {  1138,    1,  12,   3,   1,   -8 },\n/* 0xA7 */ {  1140,    5,  12,   7,   1,   -8 },\n/* 0xA8 */ {  1148,    6,  11,   8,   1,  -10 },\n/* 0xA9 */ {  1157,    9,   9,  10,   0,   -8 },\n/* 0xAA */ {  1168,    7,   9,   9,   1,   -8 },\n/* 0xAB */ {  1176,    4,   4,   6,   1,   -4 },\n/* 0xAC */ {  1178,    2,  12,   3,   0,   -8 },\n/* 0xAD */ {  1181,    0,   0,   0,   0,    0 },\n/* 0xAE */ {  1181,    9,   9,  10,   0,   -8 },\n/* 0xAF */ {  1192,    3,  11,   3,   0,  -10 },\n/* 0xB0 */ {  1197,    4,   4,   7,   2,   -8 },\n/* 0xB1 */ {  1199,    5,   7,   7,   1,   -6 },\n/* 0xB2 */ {  1204,    1,   9,   3,   1,   -8 },\n/* 0xB3 */ {  1206,    1,   9,   3,   1,   -8 },\n/* 0xB4 */ {  1208,    3,   8,   5,   1,   -7 },\n/* 0xB5 */ {  1211,    6,   9,   7,   1,   -6 },\n/* 0xB6 */ {  1218,    6,  10,   6,   1,   -8 },\n/* 0xB7 */ {  1226,    1,   1,   3,   1,   -2 },\n/* 0xB8 */ {  1227,    6,   9,   7,   0,   -8 },\n/* 0xB9 */ {  1234,    9,   9,  11,   1,   -8 },\n/* 0xBA */ {  1245,    6,   6,   6,   0,   -5 },\n/* 0xBB */ {  1250,    4,   4,   6,   1,   -5 },\n/* 0xBC */ {  1252,    2,  12,   3,   0,   -8 },\n/* 0xBD */ {  1255,    6,   9,   8,   1,   -8 },\n/* 0xBE */ {  1262,    5,   6,   6,   0,   -5 },\n/* 0xBF */ {  1266,    3,   9,   3,   0,   -8 },\n/* 0xC0 */ {  1270,    8,   9,   8,   0,   -8 },\n/* 0xC1 */ {  1279,    6,   9,   8,   1,   -8 },\n/* 0xC2 */ {  1286,    6,   9,   8,   1,   -8 },\n/* 0xC3 */ {  1293,    6,   9,   7,   1,   -8 },\n/* 0xC4 */ {  1300,    9,  11,  10,   0,   -8 },\n/* 0xC5 */ {  1313,    6,   9,   8,   1,   -8 },\n/* 0xC6 */ {  1320,    9,   9,  11,   1,   -8 },\n/* 0xC7 */ {  1331,    6,   9,   8,   1,   -8 },\n/* 0xC8 */ {  1338,    7,   9,   9,   1,   -8 },\n/* 0xC9 */ {  1346,    7,  11,   9,   1,  -10 },\n/* 0xCA */ {  1356,    6,   9,   8,   1,   -8 },\n/* 0xCB */ {  1363,    7,   9,   8,   0,   -8 },\n/* 0xCC */ {  1371,    8,   9,  10,   1,   -8 },\n/* 0xCD */ {  1380,    7,   9,   9,   1,   -8 },\n/* 0xCE */ {  1388,    8,   9,  10,   1,   -8 },\n/* 0xCF */ {  1397,    7,   9,   9,   1,   -8 },\n/* 0xD0 */ {  1405,    6,   9,   8,   1,   -8 },\n/* 0xD1 */ {  1412,    7,   9,   9,   1,   -8 },\n/* 0xD2 */ {  1420,    7,   9,   7,   0,   -8 },\n/* 0xD3 */ {  1428,    7,   9,   7,   0,   -8 },\n/* 0xD4 */ {  1436,    9,   9,  10,   1,   -8 },\n/* 0xD5 */ {  1447,    6,   9,   8,   1,   -8 },\n/* 0xD6 */ {  1454,    8,  11,   9,   1,   -8 },\n/* 0xD7 */ {  1465,    6,   9,   8,   1,   -8 },\n/* 0xD8 */ {  1472,    8,   9,  10,   1,   -8 },\n/* 0xD9 */ {  1481,    9,  11,  10,   1,   -8 },\n/* 0xDA */ {  1494,   10,   9,  10,   0,   -8 },\n/* 0xDB */ {  1506,    9,   9,  10,   1,   -8 },\n/* 0xDC */ {  1517,    6,   9,   8,   1,   -8 },\n/* 0xDD */ {  1524,    7,   9,   9,   1,   -8 },\n/* 0xDE */ {  1532,   10,   9,  12,   1,   -8 },\n/* 0xDF */ {  1544,    6,   9,   8,   1,   -8 },\n/* 0xE0 */ {  1551,    6,   6,   7,   0,   -5 },\n/* 0xE1 */ {  1556,    6,   9,   7,   0,   -8 },\n/* 0xE2 */ {  1563,    5,   6,   6,   1,   -5 },\n/* 0xE3 */ {  1567,    4,   6,   5,   1,   -5 },\n/* 0xE4 */ {  1570,    7,   7,   7,   0,   -5 },\n/* 0xE5 */ {  1577,    6,   6,   7,   0,   -5 },\n/* 0xE6 */ {  1582,    8,   6,   9,   1,   -5 },\n/* 0xE7 */ {  1588,    6,   6,   6,   0,   -5 },\n/* 0xE8 */ {  1593,    5,   6,   7,   1,   -5 },\n/* 0xE9 */ {  1597,    5,   8,   7,   1,   -7 },\n/* 0xEA */ {  1602,    4,   6,   6,   1,   -5 },\n/* 0xEB */ {  1605,    5,   6,   6,   0,   -5 },\n/* 0xEC */ {  1609,    6,   6,   7,   1,   -5 },\n/* 0xED */ {  1614,    5,   6,   7,   1,   -5 },\n/* 0xEE */ {  1618,    6,   6,   7,   0,   -5 },\n/* 0xEF */ {  1623,    5,   6,   7,   1,   -5 },\n/* 0xF0 */ {  1627,    5,   9,   7,   1,   -5 },\n/* 0xF1 */ {  1633,    6,   6,   6,   0,   -5 },\n/* 0xF2 */ {  1638,    5,   6,   5,   0,   -5 },\n/* 0xF3 */ {  1642,    5,   9,   6,   0,   -5 },\n/* 0xF4 */ {  1648,   10,  11,  10,   0,   -7 },\n/* 0xF5 */ {  1662,    5,   6,   6,   0,   -5 },\n/* 0xF6 */ {  1666,    6,   7,   7,   1,   -5 },\n/* 0xF7 */ {  1672,    4,   6,   6,   1,   -5 },\n/* 0xF8 */ {  1675,    6,   6,   8,   1,   -5 },\n/* 0xF9 */ {  1680,    7,   7,   9,   1,   -5 },\n/* 0xFA */ {  1687,    7,   6,   8,   0,   -5 },\n/* 0xFB */ {  1693,    6,   6,   8,   1,   -5 },\n/* 0xFC */ {  1698,    5,   6,   6,   1,   -5 },\n/* 0xFD */ {  1702,    5,   6,   6,   1,   -5 },\n/* 0xFE */ {  1706,    8,   6,   9,   1,   -5 },\n/* 0xFF */ {  1712,    5,   6,   7,   1,   -5 },\n};\n\nconst GFXfont FreeSans6pt_Win1251 PROGMEM = {\n(uint8_t*)FreeSans6pt_Win1251Bitmaps,\n(GFXglyph*)FreeSans6pt_Win1251Glyphs,\n0x01, 0xFF, 14\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans6pt_Win1252.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans6pt_Win1252\n*/\nconst uint8_t FreeSans6pt_Win1252Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x1C, 0x0A, 0x05, 0x04, 0xFE, 0x08, 0x1C, 0x02, 0x07, 0xE0, 0x9F, 0xC0,\n/* 0x02 */ 0x3F, 0xF0, 0x40, 0xE0, 0x10, 0x3F, 0x04, 0x9E, 0x28, 0x14, 0x0E, 0x00,\n/* 0x03 */ 0x3F, 0x10, 0x28, 0x06, 0x49, 0x80, 0x60, 0x19, 0x26, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x04 */ 0x3F, 0x10, 0x2A, 0x16, 0x49, 0xA1, 0x60, 0x19, 0xE6, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x05 */ 0x28, 0x15, 0x2A, 0xB5, 0x55, 0xA8, 0x54, 0x12, 0x04, 0x41, 0x08, 0x81, 0xC0,\n/* 0x06 */ 0x04, 0x08, 0x88, 0x82, 0x07, 0x01, 0x11, 0xA2, 0xC4, 0x40, 0x70, 0x20, 0x88, 0x88, 0x10, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x03, 0x83, 0x44, 0x48, 0x28, 0x01, 0x80, 0x17, 0xFE, 0x08, 0x45, 0x28, 0x84, 0x00,\n/* 0x09 */ 0x01, 0xC0, 0x68, 0x82, 0x41, 0x10, 0x02, 0x80, 0x06, 0x00, 0x14, 0x00, 0x8F, 0xFC,\n/* 0x0A */\n/* 0x0B */ 0x22, 0x2A, 0xA2, 0x30, 0x18, 0x0A, 0x09, 0x04, 0x44, 0x14, 0x04, 0x00,\n/* 0x0C */ 0x46, 0x00, 0x19, 0x03, 0x21, 0x20, 0x93, 0x04, 0x20, 0x11, 0x80, 0x50, 0x02, 0x7F, 0xE0,\n/* 0x0D */\n/* 0x0E */ 0x08, 0x0E, 0x08, 0x88, 0x24, 0x12, 0x09, 0x05, 0x01, 0xFF, 0x8A, 0x02, 0x00,\n/* 0x0F */ 0x3F, 0x14, 0xAA, 0x16, 0x01, 0x92, 0x60, 0x18, 0xC6, 0x49, 0x40, 0x8F, 0xC0,\n/* 0x10 */ 0x1B, 0x02, 0xA0, 0x54, 0x12, 0x42, 0x48, 0x49, 0x31, 0x1E, 0x23, 0xEA, 0xFE, 0x3C,\n/* 0x11 */ 0x3F, 0x02, 0x00, 0x20, 0x6D, 0x27, 0xF8, 0x3F, 0xC1, 0xFE, 0x37, 0xD0, 0xBE, 0x40, 0xE1, 0xE2, 0x00,\n/* 0x12 */ 0x12, 0x42, 0x20, 0x24, 0xC0, 0x29, 0x99, 0x05, 0x23, 0x30, 0xB0, 0x30, 0x00,\n/* 0x13 */ 0x3F, 0x88, 0x0A, 0x44, 0xD5, 0x58, 0x03, 0x00, 0x67, 0xCC, 0x71, 0x40, 0x47, 0xF0,\n/* 0x14 */ 0x3F, 0x18, 0x69, 0x26, 0x85, 0xA1, 0x6C, 0xD8, 0x06, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x15 */ 0x3F, 0x11, 0x00, 0xE8, 0x03, 0xA0, 0x1F, 0xB3, 0x7E, 0x00, 0xE9, 0xE0, 0x23, 0x00, 0x40, 0x40, 0xFE, 0x00,\n/* 0x16 */ 0x30, 0x38, 0x3A, 0x3E, 0x6E, 0xEB, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0x17 */ 0x3F, 0x04, 0x00, 0x82, 0x88, 0x5C, 0xA4, 0x49, 0x22, 0x81, 0x98, 0xC4, 0x40, 0xA3, 0xF0,\n/* 0x18 */ 0x07, 0x80, 0x42, 0x04, 0x08, 0x21, 0x41, 0x42, 0x60, 0x0E, 0x8C, 0xB2, 0x89, 0x50, 0x52, 0x82, 0x80,\n/* 0x19 */ 0x3F, 0xC4, 0x02, 0x80, 0x18, 0x01, 0xB3, 0x1B, 0xB9, 0x80, 0x19, 0xE1, 0x40, 0x23, 0xFC,\n/* 0x1A */ 0xFF, 0xC0, 0x67, 0x34, 0x58, 0x4C, 0x46, 0x03, 0x11, 0x80, 0xFF, 0xC0,\n/* 0x1B */ 0x0F, 0xC0, 0x40, 0x82, 0x49, 0x08, 0x04, 0x00, 0x00, 0x12, 0x02, 0x31, 0x34, 0x0B, 0x88, 0x45, 0x00, 0x20,\n/* 0x1C */ 0x3F, 0x88, 0x0A, 0x44, 0xC9, 0x19, 0x3B, 0x00, 0x60, 0x4C, 0x71, 0x40, 0x47, 0xF0,\n/* 0x1D */ 0x3F, 0x8B, 0x0A, 0x00, 0xC8, 0x18, 0x13, 0x00, 0x48, 0xCA, 0xC1, 0x44, 0x53, 0x30,\n/* 0x1E */ 0x19, 0xC2, 0x02, 0x50, 0x1E, 0x49, 0x80, 0x12, 0x01, 0x27, 0x92, 0x01, 0x10, 0x20, 0xFC,\n/* 0x1F */ 0x30, 0x1C, 0x0C, 0x3E, 0x7E, 0xCF, 0x07, 0xC7, 0x7F, 0x3F,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFC, 0x80,\n/* '\"' 0x22 */ 0xB6, 0x80,\n/* '#' 0x23 */ 0x24, 0x51, 0xF9, 0x42, 0x9F, 0x92, 0x28,\n/* '$' 0x24 */ 0x10, 0xE5, 0x55, 0x50, 0xE1, 0x65, 0x55, 0xE1, 0x00,\n/* '%' 0x25 */ 0x71, 0x24, 0x89, 0x22, 0x50, 0x74, 0x02, 0x70, 0xA4, 0x49, 0x11, 0xC0,\n/* '&' 0x26 */ 0x71, 0x24, 0x9C, 0x62, 0x58, 0xA7, 0xF4,\n/* ''' 0x27 */ 0xE0,\n/* '(' 0x28 */ 0x5A, 0xAA, 0x94,\n/* ')' 0x29 */ 0x89, 0x12, 0x49, 0x29, 0x00,\n/* '*' 0x2A */ 0x5E, 0x80,\n/* '+' 0x2B */ 0x21, 0x3E, 0x42, 0x00,\n/* ',' 0x2C */ 0xE0,\n/* '-' 0x2D */ 0xC0,\n/* '.' 0x2E */ 0x80,\n/* '/' 0x2F */ 0x24, 0xA4, 0xA4, 0x80,\n/* '0' 0x30 */ 0x76, 0xE3, 0x18, 0xC6, 0x3B, 0x70,\n/* '1' 0x31 */ 0x27, 0x92, 0x49, 0x20,\n/* '2' 0x32 */ 0x79, 0x10, 0x41, 0x08, 0xC6, 0x10, 0xFC,\n/* '3' 0x33 */ 0x79, 0x30, 0x43, 0x18, 0x10, 0x71, 0x78,\n/* '4' 0x34 */ 0x08, 0x61, 0x8A, 0x49, 0x2F, 0xC2, 0x08,\n/* '5' 0x35 */ 0xFC, 0x21, 0xE8, 0x84, 0x31, 0xF0,\n/* '6' 0x36 */ 0x74, 0x61, 0xE8, 0xC6, 0x31, 0x70,\n/* '7' 0x37 */ 0xF8, 0x44, 0x22, 0x11, 0x08, 0x40,\n/* '8' 0x38 */ 0x39, 0x34, 0x53, 0x39, 0x1C, 0x51, 0x38,\n/* '9' 0x39 */ 0x39, 0x3C, 0x71, 0x4C, 0xF0, 0x53, 0x78,\n/* ':' 0x3A */ 0x82,\n/* ';' 0x3B */ 0x87,\n/* '<' 0x3C */ 0x3E, 0x30, 0x60, 0x80,\n/* '=' 0x3D */ 0xF8, 0x3E,\n/* '>' 0x3E */ 0xE0, 0xC6, 0xC8, 0x00,\n/* '?' 0x3F */ 0x74, 0x42, 0x11, 0x10, 0x80, 0x20,\n/* '@' 0x40 */ 0x0F, 0x86, 0x19, 0x9A, 0xA4, 0xD9, 0x13, 0x22, 0x56, 0xDA, 0x6E, 0x60, 0x06, 0x00, 0x3C, 0x00,\n/* 'A' 0x41 */ 0x18, 0x18, 0x24, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n/* 'B' 0x42 */ 0xFA, 0x18, 0x61, 0xFA, 0x18, 0x61, 0xFC,\n/* 'C' 0x43 */ 0x3E, 0x63, 0x40, 0x40, 0xC0, 0x40, 0x41, 0x63, 0x3E,\n/* 'D' 0x44 */ 0xF9, 0x0A, 0x1C, 0x18, 0x30, 0x61, 0xC2, 0xF8,\n/* 'E' 0x45 */ 0xFE, 0x08, 0x20, 0xFE, 0x08, 0x20, 0xFC,\n/* 'F' 0x46 */ 0xFE, 0x08, 0x20, 0xFA, 0x08, 0x20, 0x80,\n/* 'G' 0x47 */ 0x1E, 0x61, 0x40, 0x40, 0xC7, 0x41, 0x41, 0x63, 0x1D,\n/* 'H' 0x48 */ 0x83, 0x06, 0x0C, 0x1F, 0xF0, 0x60, 0xC1, 0x82,\n/* 'I' 0x49 */ 0xFF, 0x80,\n/* 'J' 0x4A */ 0x08, 0x42, 0x10, 0x87, 0x29, 0x70,\n/* 'K' 0x4B */ 0x85, 0x12, 0x45, 0x0D, 0x13, 0x22, 0x42, 0x86,\n/* 'L' 0x4C */ 0x84, 0x21, 0x08, 0x42, 0x10, 0xF8,\n/* 'M' 0x4D */ 0xC3, 0xC3, 0xC3, 0xA5, 0xA5, 0xA5, 0x99, 0x99, 0x99,\n/* 'N' 0x4E */ 0x83, 0x86, 0x8D, 0x19, 0x33, 0x62, 0xC3, 0x86,\n/* 'O' 0x4F */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x06, 0xC6, 0x1E, 0x00,\n/* 'P' 0x50 */ 0xFA, 0x18, 0x61, 0xFA, 0x08, 0x20, 0x80,\n/* 'Q' 0x51 */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x16, 0xC6, 0x1F, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFD, 0x0E, 0x1C, 0x2F, 0x90, 0xA1, 0x42, 0x86,\n/* 'S' 0x53 */ 0x7A, 0x18, 0x30, 0x78, 0x38, 0x61, 0x78,\n/* 'T' 0x54 */ 0xFE, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10,\n/* 'U' 0x55 */ 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xE2, 0x78,\n/* 'V' 0x56 */ 0xC2, 0x85, 0x0B, 0x22, 0x44, 0x8E, 0x0C, 0x18,\n/* 'W' 0x57 */ 0xC4, 0x28, 0xCD, 0x29, 0x25, 0x24, 0xA4, 0x52, 0x8C, 0x61, 0x8C, 0x31, 0x80,\n/* 'X' 0x58 */ 0x87, 0x34, 0x8C, 0x30, 0xC4, 0xA3, 0x84,\n/* 'Y' 0x59 */ 0xC3, 0x42, 0x24, 0x34, 0x18, 0x08, 0x08, 0x08, 0x08,\n/* 'Z' 0x5A */ 0x7E, 0x0C, 0x30, 0x41, 0x06, 0x18, 0x20, 0xFE,\n/* '[' 0x5B */ 0xEA, 0xAA, 0xAB,\n/* '\\' 0x5C */ 0x92, 0x24, 0x89, 0x20,\n/* ']' 0x5D */ 0xD5, 0x55, 0x57,\n/* '^' 0x5E */ 0x46, 0xA9,\n/* '_' 0x5F */ 0xFE,\n/* '`' 0x60 */ 0x80,\n/* 'a' 0x61 */ 0x79, 0x20, 0x4F, 0xC6, 0x37, 0x40,\n/* 'b' 0x62 */ 0x84, 0x3D, 0x18, 0xC6, 0x31, 0xF0,\n/* 'c' 0x63 */ 0x39, 0x3C, 0x20, 0xC1, 0x33, 0x80,\n/* 'd' 0x64 */ 0x04, 0x13, 0xD3, 0xC6, 0x1C, 0x53, 0x3C,\n/* 'e' 0x65 */ 0x39, 0x38, 0x7F, 0x81, 0x13, 0x80,\n/* 'f' 0x66 */ 0x6B, 0xA4, 0x92, 0x40,\n/* 'g' 0x67 */ 0x35, 0x3C, 0x61, 0xC5, 0x33, 0x41, 0x4D, 0xE0,\n/* 'h' 0x68 */ 0x84, 0x3D, 0x38, 0xC6, 0x31, 0x88,\n/* 'i' 0x69 */ 0xBF, 0x80,\n/* 'j' 0x6A */ 0x45, 0x55, 0x57,\n/* 'k' 0x6B */ 0x84, 0x25, 0x4E, 0x52, 0xD2, 0x88,\n/* 'l' 0x6C */ 0xFF, 0x80,\n/* 'm' 0x6D */ 0xF7, 0x99, 0x91, 0x91, 0x91, 0x91, 0x91,\n/* 'n' 0x6E */ 0xF4, 0x63, 0x18, 0xC6, 0x20,\n/* 'o' 0x6F */ 0x39, 0x3C, 0x61, 0xC5, 0x33, 0x80,\n/* 'p' 0x70 */ 0xF4, 0x63, 0x18, 0xC7, 0xD0, 0x80,\n/* 'q' 0x71 */ 0x3D, 0x3C, 0x61, 0xC5, 0x37, 0x41, 0x04,\n/* 'r' 0x72 */ 0xF2, 0x49, 0x20,\n/* 's' 0x73 */ 0x7A, 0x50, 0xE0, 0xE5, 0xE0,\n/* 't' 0x74 */ 0x5D, 0x24, 0x93,\n/* 'u' 0x75 */ 0x8C, 0x63, 0x18, 0xCF, 0xA0,\n/* 'v' 0x76 */ 0x85, 0x24, 0x92, 0x30, 0xC3, 0x00,\n/* 'w' 0x77 */ 0x89, 0x59, 0x59, 0x55, 0x56, 0x26, 0x26,\n/* 'x' 0x78 */ 0x4A, 0x4C, 0x43, 0x27, 0x20,\n/* 'y' 0x79 */ 0x8A, 0x52, 0xA5, 0x18, 0x84, 0x22, 0x00,\n/* 'z' 0x7A */ 0x78, 0x44, 0x46, 0x23, 0xE0,\n/* '{' 0x7B */ 0x6A, 0xAA, 0xA9,\n/* '|' 0x7C */ 0xFF, 0xE0,\n/* '}' 0x7D */ 0x95, 0x55, 0x56,\n/* '~' 0x7E */ 0x66, 0x60,\n/* 0x7F */\n/* 0x80 */ 0x1C, 0x45, 0x07, 0xE4, 0x1F, 0x10, 0x10, 0x1E,\n/* 0x81 */\n/* 0x82 */ 0xE0,\n/* 0x83 */ 0x6B, 0xA4, 0x92, 0x49, 0x60,\n/* 0x84 */ 0xB6, 0x80,\n/* 0x85 */ 0xA8,\n/* 0x86 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0x21, 0x08,\n/* 0x87 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0xF9, 0x08,\n/* 0x88 */ 0x54,\n/* 0x89 */ 0x62, 0x09, 0x40, 0x98, 0x06, 0x80, 0x10, 0x01, 0x66, 0x29, 0x92, 0x99, 0x06, 0x60,\n/* 0x8A */ 0x28, 0x47, 0xA1, 0x83, 0x07, 0x83, 0x87, 0x17, 0x80,\n/* 0x8B */ 0x64,\n/* 0x8C */ 0x3B, 0xE8, 0xC2, 0x08, 0x41, 0x08, 0x3F, 0x04, 0x20, 0x82, 0x30, 0x3B, 0xE0,\n/* 0x8D */\n/* 0x8E */ 0x14, 0x11, 0xF8, 0x30, 0xC1, 0x04, 0x18, 0x61, 0xFC,\n/* 0x8F */\n/* 0x90 */\n/* 0x91 */ 0xE0,\n/* 0x92 */ 0xE0,\n/* 0x93 */ 0xB6, 0x80,\n/* 0x94 */ 0xB6, 0x80,\n/* 0x95 */ 0xFF, 0x80,\n/* 0x96 */ 0xFC,\n/* 0x97 */ 0xFF, 0xF0,\n/* 0x98 */ 0xDB,\n/* 0x99 */ 0xE6, 0x28, 0xCD, 0x19, 0xA3, 0x34, 0x6A, 0x8B, 0x51, 0x68,\n/* 0x9A */ 0x52, 0x69, 0x8E, 0x19, 0x60,\n/* 0x9B */ 0x98,\n/* 0x9C */ 0x7B, 0xD9, 0xCE, 0x10, 0xC3, 0xF8, 0x41, 0x9C, 0x5E, 0xF0,\n/* 0x9D */\n/* 0x9E */ 0x51, 0x1E, 0x11, 0x11, 0x88, 0xF8,\n/* 0x9F */ 0x29, 0x05, 0x12, 0x22, 0x87, 0x04, 0x08, 0x10, 0x20,\n/* 0xA0 */\n/* 0xA1 */ 0xBF, 0x80,\n/* 0xA2 */ 0x23, 0xAB, 0x4A, 0x52, 0xAE, 0x20,\n/* 0xA3 */ 0x39, 0x14, 0x10, 0xF0, 0x82, 0x1C, 0x4C,\n/* 0xA4 */ 0xFC, 0x63, 0xF0,\n/* 0xA5 */ 0x8C, 0x54, 0xAF, 0x93, 0xE4, 0x20,\n/* 0xA6 */ 0xF9, 0xF0,\n/* 0xA7 */ 0x32, 0x91, 0xC9, 0x47, 0x26, 0x14, 0xA4, 0xC0,\n/* 0xA8 */ 0xA0,\n/* 0xA9 */ 0x3E, 0x3F, 0xB8, 0xF4, 0x1A, 0x0D, 0x17, 0x76, 0xC6, 0x3E, 0x00,\n/* 0xAA */ 0x61, 0x79, 0x60,\n/* 0xAB */ 0x5A, 0xA5,\n/* 0xAC */ 0xFC, 0x10, 0x40,\n/* 0xAD */\n/* 0xAE */ 0x3E, 0x31, 0xB7, 0x72, 0x99, 0xCC, 0xC7, 0x56, 0xC6, 0x3E, 0x00,\n/* 0xAF */ 0xE0,\n/* 0xB0 */ 0x69, 0x96,\n/* 0xB1 */ 0x21, 0x3E, 0x42, 0x03, 0xE0,\n/* 0xB2 */ 0x69, 0x3C, 0xF0,\n/* 0xB3 */ 0x79, 0x29, 0x70,\n/* 0xB4 */ 0x80,\n/* 0xB5 */ 0x8A, 0x28, 0xA2, 0x8A, 0x6E, 0xE0, 0x80,\n/* 0xB6 */ 0x7F, 0xAE, 0xBA, 0x68, 0xA2, 0x8A, 0x28, 0xA0,\n/* 0xB7 */ 0x80,\n/* 0xB8 */ 0x67, 0x80,\n/* 0xB9 */ 0x75, 0x50,\n/* 0xBA */ 0x69, 0x96, 0xF0,\n/* 0xBB */ 0xA5, 0x5A,\n/* 0xBC */ 0x42, 0x30, 0x84, 0x41, 0x10, 0x48, 0x82, 0x61, 0x28, 0x8F, 0x20, 0x80,\n/* 0xBD */ 0x40, 0x63, 0x11, 0x09, 0x74, 0xA8, 0x84, 0x44, 0x44, 0x43, 0x80,\n/* 0xBE */ 0x71, 0x24, 0x82, 0x20, 0x50, 0x98, 0x9A, 0x61, 0x28, 0x4F, 0x20, 0x80,\n/* 0xBF */ 0x20, 0x08, 0x44, 0x42, 0x11, 0x70,\n/* 0xC0 */ 0x10, 0x08, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC1 */ 0x08, 0x10, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC2 */ 0x18, 0x24, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC3 */ 0x34, 0x2C, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC4 */ 0x24, 0x00, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n/* 0xC5 */ 0x18, 0x24, 0x18, 0x18, 0x3C, 0x24, 0x24, 0x7E, 0x42, 0xC3,\n/* 0xC6 */ 0x1F, 0xC5, 0x02, 0x40, 0x90, 0x47, 0xDF, 0x04, 0x42, 0x10, 0x87, 0xC0,\n/* 0xC7 */ 0x3E, 0x61, 0xC0, 0x80, 0x80, 0x80, 0xC1, 0x63, 0x3E, 0x0C, 0x04, 0x1C,\n/* 0xC8 */ 0x20, 0x40, 0x3F, 0x82, 0x0F, 0xA0, 0x83, 0xF0,\n/* 0xC9 */ 0x08, 0x40, 0x3F, 0x82, 0x0F, 0xA0, 0x83, 0xF0,\n/* 0xCA */ 0x10, 0xA0, 0x3F, 0x82, 0x0F, 0xA0, 0x83, 0xF0,\n/* 0xCB */ 0x28, 0x0F, 0xE0, 0x83, 0xE8, 0x20, 0x83, 0xF0,\n/* 0xCC */ 0x91, 0x55, 0x50,\n/* 0xCD */ 0x62, 0xAA, 0xA0,\n/* 0xCE */ 0x54, 0x24, 0x92, 0x48,\n/* 0xCF */ 0xA1, 0x24, 0x92, 0x48,\n/* 0xD0 */ 0x7C, 0x42, 0x41, 0x41, 0xF1, 0x41, 0x41, 0x42, 0x7C,\n/* 0xD1 */ 0x14, 0x53, 0x0F, 0x1B, 0x32, 0x66, 0xC7, 0x87, 0x04,\n/* 0xD2 */ 0x10, 0x04, 0x0F, 0x8C, 0x6C, 0x1C, 0x06, 0x03, 0x83, 0x63, 0x1F, 0x00,\n/* 0xD3 */ 0x04, 0x04, 0x0F, 0x8C, 0x6C, 0x1C, 0x06, 0x03, 0x83, 0x63, 0x1F, 0x00,\n/* 0xD4 */ 0x08, 0x0A, 0x00, 0x07, 0xC6, 0x36, 0x0E, 0x03, 0x01, 0xC1, 0xB1, 0x8F, 0x80,\n/* 0xD5 */ 0x1A, 0x0B, 0x00, 0x07, 0xC6, 0x36, 0x0E, 0x03, 0x01, 0xC1, 0xB1, 0x8F, 0x80,\n/* 0xD6 */ 0x14, 0x00, 0x00, 0x07, 0xC6, 0x36, 0x0E, 0x03, 0x01, 0xC1, 0xB1, 0x8F, 0x80,\n/* 0xD7 */ 0x8A, 0x88, 0xA8, 0x80,\n/* 0xD8 */ 0x3E, 0xB1, 0xB0, 0xF0, 0x98, 0x8C, 0x87, 0x86, 0xC6, 0xBE, 0x00,\n/* 0xD9 */ 0x20, 0x22, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDA */ 0x08, 0x22, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDB */ 0x10, 0x52, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDC */ 0x29, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0xC6, 0xF8,\n/* 0xDD */ 0x09, 0x25, 0x12, 0x22, 0x87, 0x04, 0x08, 0x10, 0x20,\n/* 0xDE */ 0x83, 0xE8, 0x61, 0x87, 0xE8, 0x20, 0x80,\n/* 0xDF */ 0x7A, 0x18, 0x61, 0x8A, 0x18, 0x61, 0xB8,\n/* 0xE0 */ 0x20, 0x20, 0x03, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE1 */ 0x10, 0x40, 0x03, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE2 */ 0x10, 0x50, 0x03, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE3 */ 0x68, 0xB0, 0x03, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE4 */ 0x28, 0x01, 0xE4, 0x20, 0x47, 0xB1, 0x46, 0x76,\n/* 0xE5 */ 0x10, 0x50, 0x43, 0xC8, 0x40, 0x8F, 0x62, 0x8C, 0xEC,\n/* 0xE6 */ 0x7B, 0xA1, 0x90, 0x45, 0xFF, 0x84, 0x23, 0x17, 0x38,\n/* 0xE7 */ 0x7B, 0x18, 0x20, 0x83, 0x17, 0x8C, 0x11, 0xC0,\n/* 0xE8 */ 0x20, 0x40, 0x1E, 0xCE, 0x1F, 0xE0, 0xC5, 0xE0,\n/* 0xE9 */ 0x10, 0x80, 0x1E, 0xCE, 0x1F, 0xE0, 0xC5, 0xE0,\n/* 0xEA */ 0x10, 0xA0, 0x1E, 0xCE, 0x1F, 0xE0, 0xC5, 0xE0,\n/* 0xEB */ 0x28, 0x07, 0xB3, 0x87, 0xF8, 0x31, 0x78,\n/* 0xEC */ 0x91, 0x55, 0x50,\n/* 0xED */ 0x62, 0xAA, 0xA0,\n/* 0xEE */ 0x54, 0x24, 0x92, 0x48,\n/* 0xEF */ 0xA1, 0x24, 0x92, 0x40,\n/* 0xF0 */ 0x28, 0x42, 0x8F, 0x46, 0x18, 0x52, 0x30,\n/* 0xF1 */ 0x6A, 0xC1, 0x6C, 0xC6, 0x31, 0x8C, 0x40,\n/* 0xF2 */ 0x20, 0x40, 0x1E, 0xCE, 0x18, 0x61, 0xCD, 0xE0,\n/* 0xF3 */ 0x10, 0x80, 0x1E, 0xCE, 0x18, 0x61, 0xCD, 0xE0,\n/* 0xF4 */ 0x10, 0xA0, 0x1E, 0xCE, 0x18, 0x61, 0xCD, 0xE0,\n/* 0xF5 */ 0x69, 0x60, 0x1E, 0xCE, 0x18, 0x61, 0xCD, 0xE0,\n/* 0xF6 */ 0x28, 0x07, 0xB3, 0x86, 0x18, 0x73, 0x78,\n/* 0xF7 */ 0x20, 0x3E, 0x02, 0x00,\n/* 0xF8 */ 0x7F, 0x39, 0x69, 0xC7, 0x3F, 0x80,\n/* 0xF9 */ 0x41, 0x23, 0x18, 0xC6, 0x33, 0x68,\n/* 0xFA */ 0x11, 0x23, 0x18, 0xC6, 0x33, 0x68,\n/* 0xFB */ 0x22, 0x81, 0x18, 0xC6, 0x31, 0x9B, 0x40,\n/* 0xFC */ 0x50, 0x23, 0x18, 0xC6, 0x33, 0x68,\n/* 0xFD */ 0x10, 0x88, 0x52, 0x49, 0x23, 0x0C, 0x30, 0x82, 0x18,\n/* 0xFE */ 0x84, 0x3D, 0xB8, 0xC6, 0x3B, 0xF4, 0x20,\n/* 0xFF */ 0x28, 0x08, 0x52, 0x49, 0x23, 0x0C, 0x30, 0x82, 0x18,\n};\n\nconst GFXglyph FreeSans6pt_Win1252Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,    9,  10,  11,   1,   -9 },\n/* 0x02 */ {    12,    9,  10,  11,   1,   -8 },\n/* 0x03 */ {    24,   10,  10,  12,   1,   -8 },\n/* 0x04 */ {    37,   10,  10,  12,   1,   -8 },\n/* 0x05 */ {    50,   10,  10,  12,   1,   -9 },\n/* 0x06 */ {    63,   11,  11,  13,   1,   -9 },\n/* 0x07 */ {    79,    0,   0,   8,   0,    0 },\n/* 0x08 */ {    79,   12,   9,  14,   1,   -8 },\n/* 0x09 */ {    93,   14,   8,  16,   1,   -7 },\n/* 0x0A */ {   107,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   107,    9,  10,  11,   1,   -9 },\n/* 0x0C */ {   119,   13,   9,  15,   1,   -8 },\n/* 0x0D */ {   134,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   134,    9,  11,  11,   1,   -9 },\n/* 0x0F */ {   147,   10,  10,  12,   1,   -9 },\n/* 0x10 */ {   160,   11,  10,  13,   1,   -9 },\n/* 0x11 */ {   174,   13,  10,  15,   1,   -9 },\n/* 0x12 */ {   191,   10,  10,  12,   1,   -9 },\n/* 0x13 */ {   204,   11,  10,  13,   1,   -9 },\n/* 0x14 */ {   218,   10,  10,  12,   1,   -9 },\n/* 0x15 */ {   231,   14,  10,  16,   1,   -9 },\n/* 0x16 */ {   249,    8,  10,  10,   1,   -9 },\n/* 0x17 */ {   259,   12,  10,  14,   1,   -9 },\n/* 0x18 */ {   274,   13,  10,  15,   1,   -9 },\n/* 0x19 */ {   291,   12,  10,  14,   1,   -9 },\n/* 0x1A */ {   306,    9,  10,  11,   1,   -8 },\n/* 0x1B */ {   318,   14,  10,  16,   1,   -9 },\n/* 0x1C */ {   336,   11,  10,  13,   1,   -9 },\n/* 0x1D */ {   350,   11,  10,  13,   1,   -9 },\n/* 0x1E */ {   364,   12,  10,  14,   1,   -9 },\n/* 0x1F */ {   379,    8,  10,  11,   2,   -9 },\n/* ' ' 0x20 */ {   389,    0,   0,   3,   0,    0 },\n/* '!' 0x21 */ {   389,    1,   9,   4,   2,   -8 },\n/* '\"' 0x22 */ {   391,    3,   3,   4,   0,   -8 },\n/* '#' 0x23 */ {   393,    7,   8,   7,   0,   -7 },\n/* '$' 0x24 */ {   400,    6,  11,   7,   0,   -9 },\n/* '%' 0x25 */ {   409,   10,   9,  11,   0,   -8 },\n/* '&' 0x26 */ {   421,    6,   9,   8,   1,   -8 },\n/* ''' 0x27 */ {   428,    1,   3,   2,   1,   -8 },\n/* '(' 0x28 */ {   429,    2,  11,   4,   1,   -8 },\n/* ')' 0x29 */ {   432,    3,  11,   4,   0,   -8 },\n/* '*' 0x2A */ {   437,    3,   3,   5,   1,   -8 },\n/* '+' 0x2B */ {   439,    5,   5,   7,   1,   -4 },\n/* ',' 0x2C */ {   443,    1,   3,   3,   1,    0 },\n/* '-' 0x2D */ {   444,    2,   1,   4,   1,   -3 },\n/* '.' 0x2E */ {   445,    1,   1,   3,   1,    0 },\n/* '/' 0x2F */ {   446,    3,   9,   3,   0,   -8 },\n/* '0' 0x30 */ {   450,    5,   9,   7,   1,   -8 },\n/* '1' 0x31 */ {   456,    3,   9,   7,   1,   -8 },\n/* '2' 0x32 */ {   460,    6,   9,   7,   0,   -8 },\n/* '3' 0x33 */ {   467,    6,   9,   7,   0,   -8 },\n/* '4' 0x34 */ {   474,    6,   9,   7,   0,   -8 },\n/* '5' 0x35 */ {   481,    5,   9,   7,   1,   -8 },\n/* '6' 0x36 */ {   487,    5,   9,   7,   1,   -8 },\n/* '7' 0x37 */ {   493,    5,   9,   7,   1,   -8 },\n/* '8' 0x38 */ {   499,    6,   9,   7,   0,   -8 },\n/* '9' 0x39 */ {   506,    6,   9,   7,   0,   -8 },\n/* ':' 0x3A */ {   513,    1,   7,   3,   1,   -6 },\n/* ';' 0x3B */ {   514,    1,   8,   3,   1,   -5 },\n/* '<' 0x3C */ {   515,    5,   5,   7,   1,   -4 },\n/* '=' 0x3D */ {   519,    5,   3,   7,   1,   -3 },\n/* '>' 0x3E */ {   521,    5,   5,   7,   1,   -4 },\n/* '?' 0x3F */ {   525,    5,   9,   7,   1,   -8 },\n/* '@' 0x40 */ {   531,   11,  11,  12,   0,   -8 },\n/* 'A' 0x41 */ {   547,    8,   9,   8,   0,   -8 },\n/* 'B' 0x42 */ {   556,    6,   9,   8,   1,   -8 },\n/* 'C' 0x43 */ {   563,    8,   9,   9,   0,   -8 },\n/* 'D' 0x44 */ {   572,    7,   9,   8,   1,   -8 },\n/* 'E' 0x45 */ {   580,    6,   9,   8,   1,   -8 },\n/* 'F' 0x46 */ {   587,    6,   9,   7,   1,   -8 },\n/* 'G' 0x47 */ {   594,    8,   9,   9,   0,   -8 },\n/* 'H' 0x48 */ {   603,    7,   9,   9,   1,   -8 },\n/* 'I' 0x49 */ {   611,    1,   9,   3,   1,   -8 },\n/* 'J' 0x4A */ {   613,    5,   9,   6,   0,   -8 },\n/* 'K' 0x4B */ {   619,    7,   9,   8,   1,   -8 },\n/* 'L' 0x4C */ {   627,    5,   9,   7,   1,   -8 },\n/* 'M' 0x4D */ {   633,    8,   9,  10,   1,   -8 },\n/* 'N' 0x4E */ {   642,    7,   9,   9,   1,   -8 },\n/* 'O' 0x4F */ {   650,    9,   9,   9,   0,   -8 },\n/* 'P' 0x50 */ {   661,    6,   9,   8,   1,   -8 },\n/* 'Q' 0x51 */ {   668,    9,  10,   9,   0,   -8 },\n/* 'R' 0x52 */ {   680,    7,   9,   9,   1,   -8 },\n/* 'S' 0x53 */ {   688,    6,   9,   8,   1,   -8 },\n/* 'T' 0x54 */ {   695,    7,   9,   8,   0,   -8 },\n/* 'U' 0x55 */ {   703,    7,   9,   9,   1,   -8 },\n/* 'V' 0x56 */ {   711,    7,   9,   8,   0,   -8 },\n/* 'W' 0x57 */ {   719,   11,   9,  11,   0,   -8 },\n/* 'X' 0x58 */ {   732,    6,   9,   8,   1,   -8 },\n/* 'Y' 0x59 */ {   739,    8,   9,   8,   0,   -8 },\n/* 'Z' 0x5A */ {   748,    7,   9,   7,   0,   -8 },\n/* '[' 0x5B */ {   756,    2,  12,   3,   1,   -8 },\n/* '\\' 0x5C */ {   759,    3,   9,   3,   0,   -8 },\n/* ']' 0x5D */ {   763,    2,  12,   3,   0,   -8 },\n/* '^' 0x5E */ {   766,    4,   4,   6,   1,   -8 },\n/* '_' 0x5F */ {   768,    7,   1,   7,   0,    2 },\n/* '`' 0x60 */ {   769,    1,   1,   3,   1,   -8 },\n/* 'a' 0x61 */ {   770,    6,   7,   7,   0,   -6 },\n/* 'b' 0x62 */ {   776,    5,   9,   7,   1,   -8 },\n/* 'c' 0x63 */ {   782,    6,   7,   6,   0,   -6 },\n/* 'd' 0x64 */ {   788,    6,   9,   7,   0,   -8 },\n/* 'e' 0x65 */ {   795,    6,   7,   6,   0,   -6 },\n/* 'f' 0x66 */ {   801,    3,   9,   3,   0,   -8 },\n/* 'g' 0x67 */ {   805,    6,  10,   7,   0,   -6 },\n/* 'h' 0x68 */ {   813,    5,   9,   6,   1,   -8 },\n/* 'i' 0x69 */ {   819,    1,   9,   3,   1,   -8 },\n/* 'j' 0x6A */ {   821,    2,  12,   3,   0,   -8 },\n/* 'k' 0x6B */ {   824,    5,   9,   6,   1,   -8 },\n/* 'l' 0x6C */ {   830,    1,   9,   3,   1,   -8 },\n/* 'm' 0x6D */ {   832,    8,   7,  10,   1,   -6 },\n/* 'n' 0x6E */ {   839,    5,   7,   6,   1,   -6 },\n/* 'o' 0x6F */ {   844,    6,   7,   6,   0,   -6 },\n/* 'p' 0x70 */ {   850,    5,   9,   7,   1,   -6 },\n/* 'q' 0x71 */ {   856,    6,   9,   7,   0,   -6 },\n/* 'r' 0x72 */ {   863,    3,   7,   4,   1,   -6 },\n/* 's' 0x73 */ {   866,    5,   7,   6,   0,   -6 },\n/* 't' 0x74 */ {   871,    3,   8,   3,   0,   -7 },\n/* 'u' 0x75 */ {   874,    5,   7,   6,   1,   -6 },\n/* 'v' 0x76 */ {   879,    6,   7,   6,   0,   -6 },\n/* 'w' 0x77 */ {   885,    8,   7,   9,   0,   -6 },\n/* 'x' 0x78 */ {   892,    5,   7,   6,   0,   -6 },\n/* 'y' 0x79 */ {   897,    5,  10,   6,   0,   -6 },\n/* 'z' 0x7A */ {   904,    5,   7,   6,   0,   -6 },\n/* '{' 0x7B */ {   909,    2,  12,   4,   1,   -8 },\n/* '|' 0x7C */ {   912,    1,  11,   3,   1,   -8 },\n/* '}' 0x7D */ {   914,    2,  12,   4,   1,   -8 },\n/* '~' 0x7E */ {   917,    6,   2,   6,   0,   -4 },\n/* 0x7F */ {   919,    0,   0,   0,   0,    0 },\n/* 0x80 */ {   919,    7,   9,   8,   0,   -8 },\n/* 0x81 */ {   927,    0,   0,   8,   0,    0 },\n/* 0x82 */ {   927,    1,   3,   3,   1,    0 },\n/* 0x83 */ {   928,    3,  12,   3,   0,   -8 },\n/* 0x84 */ {   933,    3,   3,   5,   1,    0 },\n/* 0x85 */ {   935,    5,   1,   7,   1,    0 },\n/* 0x86 */ {   936,    5,  11,   7,   1,   -8 },\n/* 0x87 */ {   943,    5,  11,   7,   1,   -8 },\n/* 0x88 */ {   950,    3,   2,   4,   0,   -9 },\n/* 0x89 */ {   951,   12,   9,  12,   0,   -8 },\n/* 0x8A */ {   965,    6,  11,   8,   1,   -9 },\n/* 0x8B */ {   974,    2,   3,   4,   1,   -4 },\n/* 0x8C */ {   975,   11,   9,  12,   0,   -8 },\n/* 0x8D */ {   988,    0,   0,   8,   0,    0 },\n/* 0x8E */ {   988,    7,  10,   7,   0,   -9 },\n/* 0x8F */ {   997,    0,   0,   8,   0,    0 },\n/* 0x90 */ {   997,    0,   0,   8,   0,    0 },\n/* 0x91 */ {   997,    1,   3,   3,   1,   -8 },\n/* 0x92 */ {   998,    1,   3,   2,   1,   -8 },\n/* 0x93 */ {   999,    3,   3,   5,   1,   -8 },\n/* 0x94 */ {  1001,    3,   3,   5,   1,   -8 },\n/* 0x95 */ {  1003,    3,   3,   5,   1,   -5 },\n/* 0x96 */ {  1005,    6,   1,   6,   0,   -3 },\n/* 0x97 */ {  1006,   12,   1,  12,   0,   -3 },\n/* 0x98 */ {  1008,    4,   2,   4,   0,   -8 },\n/* 0x99 */ {  1009,   11,   7,  12,   1,   -8 },\n/* 0x9A */ {  1019,    4,   9,   6,   1,   -8 },\n/* 0x9B */ {  1024,    2,   3,   3,   1,   -4 },\n/* 0x9C */ {  1025,   11,   7,  11,   0,   -6 },\n/* 0x9D */ {  1035,    0,   0,   8,   0,    0 },\n/* 0x9E */ {  1035,    5,   9,   6,   0,   -8 },\n/* 0x9F */ {  1041,    7,  10,   8,   1,   -9 },\n/* 0xA0 */ {  1050,    0,   0,   3,   0,    0 },\n/* 0xA1 */ {  1050,    1,   9,   4,   1,   -5 },\n/* 0xA2 */ {  1052,    5,   9,   7,   1,   -7 },\n/* 0xA3 */ {  1058,    6,   9,   7,   0,   -8 },\n/* 0xA4 */ {  1065,    5,   4,   7,   1,   -5 },\n/* 0xA5 */ {  1068,    5,   9,   7,   1,   -8 },\n/* 0xA6 */ {  1074,    1,  12,   3,   1,   -8 },\n/* 0xA7 */ {  1076,    5,  12,   7,   1,   -8 },\n/* 0xA8 */ {  1084,    3,   1,   4,   0,   -7 },\n/* 0xA9 */ {  1085,    9,   9,  10,   0,   -8 },\n/* 0xAA */ {  1096,    4,   5,   4,   0,   -8 },\n/* 0xAB */ {  1099,    4,   4,   6,   1,   -4 },\n/* 0xAC */ {  1101,    6,   3,   7,   1,   -4 },\n/* 0xAD */ {  1104,    0,   0,   0,   0,    0 },\n/* 0xAE */ {  1104,    9,   9,  10,   0,   -8 },\n/* 0xAF */ {  1115,    3,   1,   4,   0,   -8 },\n/* 0xB0 */ {  1116,    4,   4,   7,   2,   -8 },\n/* 0xB1 */ {  1118,    5,   7,   7,   1,   -6 },\n/* 0xB2 */ {  1123,    4,   5,   4,   0,   -9 },\n/* 0xB3 */ {  1126,    4,   5,   4,   0,   -9 },\n/* 0xB4 */ {  1129,    1,   1,   4,   1,   -8 },\n/* 0xB5 */ {  1130,    6,   9,   7,   1,   -6 },\n/* 0xB6 */ {  1137,    6,  10,   6,   1,   -8 },\n/* 0xB7 */ {  1145,    1,   1,   3,   1,   -2 },\n/* 0xB8 */ {  1146,    3,   3,   4,   1,    1 },\n/* 0xB9 */ {  1148,    2,   6,   4,   1,   -9 },\n/* 0xBA */ {  1150,    4,   5,   4,   0,   -8 },\n/* 0xBB */ {  1153,    4,   4,   6,   1,   -5 },\n/* 0xBC */ {  1155,   10,   9,  10,   1,   -8 },\n/* 0xBD */ {  1167,    9,   9,  10,   1,   -8 },\n/* 0xBE */ {  1178,   10,   9,  11,   0,   -8 },\n/* 0xBF */ {  1190,    5,   9,   7,   1,   -5 },\n/* 0xC0 */ {  1196,    8,  10,   8,   0,   -9 },\n/* 0xC1 */ {  1206,    8,  10,   8,   0,   -9 },\n/* 0xC2 */ {  1216,    8,  10,   8,   0,   -9 },\n/* 0xC3 */ {  1226,    8,  10,   8,   0,   -9 },\n/* 0xC4 */ {  1236,    8,  10,   8,   0,   -9 },\n/* 0xC5 */ {  1246,    8,  10,   8,   0,   -9 },\n/* 0xC6 */ {  1256,   10,   9,  12,   1,   -8 },\n/* 0xC7 */ {  1268,    8,  12,   9,   0,   -8 },\n/* 0xC8 */ {  1280,    6,  10,   8,   1,   -9 },\n/* 0xC9 */ {  1288,    6,  10,   8,   1,   -9 },\n/* 0xCA */ {  1296,    6,  10,   8,   1,   -9 },\n/* 0xCB */ {  1304,    6,  10,   8,   1,   -9 },\n/* 0xCC */ {  1312,    2,  10,   3,   0,   -9 },\n/* 0xCD */ {  1315,    2,  10,   3,   1,   -9 },\n/* 0xCE */ {  1318,    3,  10,   4,   0,   -9 },\n/* 0xCF */ {  1322,    3,  10,   4,   0,   -9 },\n/* 0xD0 */ {  1326,    8,   9,   8,   0,   -8 },\n/* 0xD1 */ {  1335,    7,  10,   9,   1,   -9 },\n/* 0xD2 */ {  1344,    9,  10,   9,   0,   -9 },\n/* 0xD3 */ {  1356,    9,  10,   9,   0,   -9 },\n/* 0xD4 */ {  1368,    9,  11,   9,   0,  -10 },\n/* 0xD5 */ {  1381,    9,  11,   9,   0,  -10 },\n/* 0xD6 */ {  1394,    9,  11,   9,   0,  -10 },\n/* 0xD7 */ {  1407,    5,   5,   7,   1,   -5 },\n/* 0xD8 */ {  1411,    9,   9,   9,   0,   -8 },\n/* 0xD9 */ {  1422,    7,  10,   9,   1,   -9 },\n/* 0xDA */ {  1431,    7,  10,   9,   1,   -9 },\n/* 0xDB */ {  1440,    7,  10,   9,   1,   -9 },\n/* 0xDC */ {  1449,    7,  10,   9,   1,   -9 },\n/* 0xDD */ {  1458,    7,  10,   8,   1,   -9 },\n/* 0xDE */ {  1467,    6,   9,   8,   1,   -8 },\n/* 0xDF */ {  1474,    6,   9,   7,   1,   -8 },\n/* 0xE0 */ {  1481,    7,  10,   7,   0,   -9 },\n/* 0xE1 */ {  1490,    7,  10,   7,   0,   -9 },\n/* 0xE2 */ {  1499,    7,  10,   7,   0,   -9 },\n/* 0xE3 */ {  1508,    7,  10,   7,   0,   -9 },\n/* 0xE4 */ {  1517,    7,   9,   7,   0,   -8 },\n/* 0xE5 */ {  1525,    7,  10,   7,   0,   -9 },\n/* 0xE6 */ {  1534,   10,   7,  10,   0,   -6 },\n/* 0xE7 */ {  1543,    6,  10,   6,   0,   -6 },\n/* 0xE8 */ {  1551,    6,  10,   6,   0,   -9 },\n/* 0xE9 */ {  1559,    6,  10,   6,   0,   -9 },\n/* 0xEA */ {  1567,    6,  10,   6,   0,   -9 },\n/* 0xEB */ {  1575,    6,   9,   6,   0,   -8 },\n/* 0xEC */ {  1582,    2,  10,   3,   0,   -9 },\n/* 0xED */ {  1585,    2,  10,   3,   1,   -9 },\n/* 0xEE */ {  1588,    3,  10,   3,   0,   -9 },\n/* 0xEF */ {  1592,    3,   9,   3,   0,   -8 },\n/* 0xF0 */ {  1596,    6,   9,   6,   0,   -8 },\n/* 0xF1 */ {  1603,    5,  10,   6,   1,   -9 },\n/* 0xF2 */ {  1610,    6,  10,   6,   0,   -9 },\n/* 0xF3 */ {  1618,    6,  10,   6,   0,   -9 },\n/* 0xF4 */ {  1626,    6,  10,   6,   0,   -9 },\n/* 0xF5 */ {  1634,    6,  10,   6,   0,   -9 },\n/* 0xF6 */ {  1642,    6,   9,   6,   0,   -8 },\n/* 0xF7 */ {  1649,    5,   5,   7,   1,   -5 },\n/* 0xF8 */ {  1653,    6,   7,   6,   0,   -6 },\n/* 0xF9 */ {  1659,    5,   9,   6,   1,   -8 },\n/* 0xFA */ {  1665,    5,   9,   6,   1,   -8 },\n/* 0xFB */ {  1671,    5,  10,   6,   1,   -9 },\n/* 0xFC */ {  1678,    5,   9,   6,   1,   -8 },\n/* 0xFD */ {  1684,    6,  12,   6,   0,   -8 },\n/* 0xFE */ {  1693,    5,  11,   7,   1,   -8 },\n/* 0xFF */ {  1700,    6,  12,   6,   0,   -8 },\n};\n\nconst GFXfont FreeSans6pt_Win1252 PROGMEM = {\n(uint8_t*)FreeSans6pt_Win1252Bitmaps,\n(GFXglyph*)FreeSans6pt_Win1252Glyphs,\n0x01, 0xFF, 10\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans6pt_Win1253.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans6pt_Win1253\n*/\nconst uint8_t FreeSans6pt_Win1253Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x1C, 0x0A, 0x05, 0x04, 0xFE, 0x08, 0x1C, 0x02, 0x07, 0xE0, 0x9F, 0xC0,\n/* 0x02 */ 0x3F, 0xF0, 0x40, 0xE0, 0x10, 0x3F, 0x04, 0x9E, 0x28, 0x14, 0x0E, 0x00,\n/* 0x03 */ 0x3F, 0x10, 0x28, 0x06, 0x49, 0x80, 0x60, 0x19, 0x26, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x04 */ 0x3F, 0x10, 0x2A, 0x16, 0x49, 0xA1, 0x60, 0x19, 0xE6, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x05 */ 0x28, 0x15, 0x2A, 0xB5, 0x55, 0xA8, 0x54, 0x12, 0x04, 0x41, 0x08, 0x81, 0xC0,\n/* 0x06 */ 0x04, 0x08, 0x88, 0x82, 0x07, 0x01, 0x11, 0xA2, 0xC4, 0x40, 0x70, 0x20, 0x88, 0x88, 0x10, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x03, 0x83, 0x44, 0x48, 0x28, 0x01, 0x80, 0x17, 0xFE, 0x08, 0x45, 0x28, 0x84, 0x00,\n/* 0x09 */ 0x01, 0xC0, 0x68, 0x82, 0x41, 0x10, 0x02, 0x80, 0x06, 0x00, 0x14, 0x00, 0x8F, 0xFC,\n/* 0x0A */\n/* 0x0B */ 0x22, 0x2A, 0xA2, 0x30, 0x18, 0x0A, 0x09, 0x04, 0x44, 0x14, 0x04, 0x00,\n/* 0x0C */ 0x46, 0x00, 0x19, 0x03, 0x21, 0x20, 0x93, 0x04, 0x20, 0x11, 0x80, 0x50, 0x02, 0x7F, 0xE0,\n/* 0x0D */\n/* 0x0E */ 0x08, 0x0E, 0x08, 0x88, 0x24, 0x12, 0x09, 0x05, 0x01, 0xFF, 0x8A, 0x02, 0x00,\n/* 0x0F */ 0x3F, 0x14, 0xAA, 0x16, 0x01, 0x92, 0x60, 0x18, 0xC6, 0x49, 0x40, 0x8F, 0xC0,\n/* 0x10 */ 0x1B, 0x02, 0xA0, 0x54, 0x12, 0x42, 0x48, 0x49, 0x31, 0x1E, 0x23, 0xEA, 0xFE, 0x3C,\n/* 0x11 */ 0x3F, 0x02, 0x00, 0x20, 0x6D, 0x27, 0xF8, 0x3F, 0xC1, 0xFE, 0x37, 0xD0, 0xBE, 0x40, 0xE1, 0xE2, 0x00,\n/* 0x12 */ 0x12, 0x42, 0x20, 0x24, 0xC0, 0x29, 0x99, 0x05, 0x23, 0x30, 0xB0, 0x30, 0x00,\n/* 0x13 */ 0x3F, 0x88, 0x0A, 0x44, 0xD5, 0x58, 0x03, 0x00, 0x67, 0xCC, 0x71, 0x40, 0x47, 0xF0,\n/* 0x14 */ 0x3F, 0x18, 0x69, 0x26, 0x85, 0xA1, 0x6C, 0xD8, 0x06, 0x31, 0x40, 0x8F, 0xC0,\n/* 0x15 */ 0x3F, 0x11, 0x00, 0xE8, 0x03, 0xA0, 0x1F, 0xB3, 0x7E, 0x00, 0xE9, 0xE0, 0x23, 0x00, 0x40, 0x40, 0xFE, 0x00,\n/* 0x16 */ 0x30, 0x38, 0x3A, 0x3E, 0x6E, 0xEB, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0x17 */ 0x3F, 0x04, 0x00, 0x82, 0x88, 0x5C, 0xA4, 0x49, 0x22, 0x81, 0x98, 0xC4, 0x40, 0xA3, 0xF0,\n/* 0x18 */ 0x07, 0x80, 0x42, 0x04, 0x08, 0x21, 0x41, 0x42, 0x60, 0x0E, 0x8C, 0xB2, 0x89, 0x50, 0x52, 0x82, 0x80,\n/* 0x19 */ 0x3F, 0xC4, 0x02, 0x80, 0x18, 0x01, 0xB3, 0x1B, 0xB9, 0x80, 0x19, 0xE1, 0x40, 0x23, 0xFC,\n/* 0x1A */ 0xFF, 0xC0, 0x67, 0x34, 0x58, 0x4C, 0x46, 0x03, 0x11, 0x80, 0xFF, 0xC0,\n/* 0x1B */ 0x0F, 0xC0, 0x40, 0x82, 0x49, 0x08, 0x04, 0x00, 0x00, 0x12, 0x02, 0x31, 0x34, 0x0B, 0x88, 0x45, 0x00, 0x20,\n/* 0x1C */ 0x3F, 0x88, 0x0A, 0x44, 0xC9, 0x19, 0x3B, 0x00, 0x60, 0x4C, 0x71, 0x40, 0x47, 0xF0,\n/* 0x1D */ 0x3F, 0x8B, 0x0A, 0x00, 0xC8, 0x18, 0x13, 0x00, 0x48, 0xCA, 0xC1, 0x44, 0x53, 0x30,\n/* 0x1E */ 0x19, 0xC2, 0x02, 0x50, 0x1E, 0x49, 0x80, 0x12, 0x01, 0x27, 0x92, 0x01, 0x10, 0x20, 0xFC,\n/* 0x1F */ 0x30, 0x1C, 0x0C, 0x3E, 0x7E, 0xCF, 0x07, 0xC7, 0x7F, 0x3F,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFC, 0x80,\n/* '\"' 0x22 */ 0xB6, 0x80,\n/* '#' 0x23 */ 0x24, 0x51, 0xF9, 0x42, 0x9F, 0x92, 0x28,\n/* '$' 0x24 */ 0x10, 0xE5, 0x55, 0x50, 0xE1, 0x65, 0x55, 0xE1, 0x00,\n/* '%' 0x25 */ 0x71, 0x24, 0x89, 0x22, 0x50, 0x74, 0x02, 0x70, 0xA4, 0x49, 0x11, 0xC0,\n/* '&' 0x26 */ 0x71, 0x24, 0x9C, 0x62, 0x58, 0xA7, 0xF4,\n/* ''' 0x27 */ 0xE0,\n/* '(' 0x28 */ 0x5A, 0xAA, 0x94,\n/* ')' 0x29 */ 0x89, 0x12, 0x49, 0x29, 0x00,\n/* '*' 0x2A */ 0x5E, 0x80,\n/* '+' 0x2B */ 0x21, 0x3E, 0x42, 0x00,\n/* ',' 0x2C */ 0xE0,\n/* '-' 0x2D */ 0xC0,\n/* '.' 0x2E */ 0x80,\n/* '/' 0x2F */ 0x24, 0xA4, 0xA4, 0x80,\n/* '0' 0x30 */ 0x76, 0xE3, 0x18, 0xC6, 0x3B, 0x70,\n/* '1' 0x31 */ 0x27, 0x92, 0x49, 0x20,\n/* '2' 0x32 */ 0x79, 0x10, 0x41, 0x08, 0xC6, 0x10, 0xFC,\n/* '3' 0x33 */ 0x79, 0x30, 0x43, 0x18, 0x10, 0x71, 0x78,\n/* '4' 0x34 */ 0x08, 0x61, 0x8A, 0x49, 0x2F, 0xC2, 0x08,\n/* '5' 0x35 */ 0xFC, 0x21, 0xE8, 0x84, 0x31, 0xF0,\n/* '6' 0x36 */ 0x74, 0x61, 0xE8, 0xC6, 0x31, 0x70,\n/* '7' 0x37 */ 0xF8, 0x44, 0x22, 0x11, 0x08, 0x40,\n/* '8' 0x38 */ 0x39, 0x34, 0x53, 0x39, 0x1C, 0x51, 0x38,\n/* '9' 0x39 */ 0x39, 0x3C, 0x71, 0x4C, 0xF0, 0x53, 0x78,\n/* ':' 0x3A */ 0x82,\n/* ';' 0x3B */ 0x87,\n/* '<' 0x3C */ 0x3E, 0x30, 0x60, 0x80,\n/* '=' 0x3D */ 0xF8, 0x3E,\n/* '>' 0x3E */ 0xE0, 0xC6, 0xC8, 0x00,\n/* '?' 0x3F */ 0x74, 0x42, 0x11, 0x10, 0x80, 0x20,\n/* '@' 0x40 */ 0x0F, 0x86, 0x19, 0x9A, 0xA4, 0xD9, 0x13, 0x22, 0x56, 0xDA, 0x6E, 0x60, 0x06, 0x00, 0x3C, 0x00,\n/* 'A' 0x41 */ 0x18, 0x18, 0x24, 0x24, 0x24, 0x7E, 0x42, 0x42, 0xC3,\n/* 'B' 0x42 */ 0xFA, 0x18, 0x61, 0xFA, 0x18, 0x61, 0xFC,\n/* 'C' 0x43 */ 0x3E, 0x63, 0x40, 0x40, 0xC0, 0x40, 0x41, 0x63, 0x3E,\n/* 'D' 0x44 */ 0xF9, 0x0A, 0x1C, 0x18, 0x30, 0x61, 0xC2, 0xF8,\n/* 'E' 0x45 */ 0xFE, 0x08, 0x20, 0xFE, 0x08, 0x20, 0xFC,\n/* 'F' 0x46 */ 0xFE, 0x08, 0x20, 0xFA, 0x08, 0x20, 0x80,\n/* 'G' 0x47 */ 0x1E, 0x61, 0x40, 0x40, 0xC7, 0x41, 0x41, 0x63, 0x1D,\n/* 'H' 0x48 */ 0x83, 0x06, 0x0C, 0x1F, 0xF0, 0x60, 0xC1, 0x82,\n/* 'I' 0x49 */ 0xFF, 0x80,\n/* 'J' 0x4A */ 0x08, 0x42, 0x10, 0x87, 0x29, 0x70,\n/* 'K' 0x4B */ 0x85, 0x12, 0x45, 0x0D, 0x13, 0x22, 0x42, 0x86,\n/* 'L' 0x4C */ 0x84, 0x21, 0x08, 0x42, 0x10, 0xF8,\n/* 'M' 0x4D */ 0xC3, 0xC3, 0xC3, 0xA5, 0xA5, 0xA5, 0x99, 0x99, 0x99,\n/* 'N' 0x4E */ 0x83, 0x86, 0x8D, 0x19, 0x33, 0x62, 0xC3, 0x86,\n/* 'O' 0x4F */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x06, 0xC6, 0x1E, 0x00,\n/* 'P' 0x50 */ 0xFA, 0x18, 0x61, 0xFA, 0x08, 0x20, 0x80,\n/* 'Q' 0x51 */ 0x1E, 0x31, 0x90, 0x68, 0x1C, 0x0A, 0x05, 0x16, 0xC6, 0x1F, 0x00, 0x40,\n/* 'R' 0x52 */ 0xFD, 0x0E, 0x1C, 0x2F, 0x90, 0xA1, 0x42, 0x86,\n/* 'S' 0x53 */ 0x7A, 0x18, 0x30, 0x78, 0x38, 0x61, 0x78,\n/* 'T' 0x54 */ 0xFE, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10,\n/* 'U' 0x55 */ 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xE2, 0x78,\n/* 'V' 0x56 */ 0xC2, 0x85, 0x0B, 0x22, 0x44, 0x8E, 0x0C, 0x18,\n/* 'W' 0x57 */ 0xC4, 0x28, 0xCD, 0x29, 0x25, 0x24, 0xA4, 0x52, 0x8C, 0x61, 0x8C, 0x31, 0x80,\n/* 'X' 0x58 */ 0x87, 0x34, 0x8C, 0x30, 0xC4, 0xA3, 0x84,\n/* 'Y' 0x59 */ 0xC3, 0x42, 0x24, 0x34, 0x18, 0x08, 0x08, 0x08, 0x08,\n/* 'Z' 0x5A */ 0x7E, 0x0C, 0x30, 0x41, 0x06, 0x18, 0x20, 0xFE,\n/* '[' 0x5B */ 0xEA, 0xAA, 0xAB,\n/* '\\' 0x5C */ 0x92, 0x24, 0x89, 0x20,\n/* ']' 0x5D */ 0xD5, 0x55, 0x57,\n/* '^' 0x5E */ 0x46, 0xA9,\n/* '_' 0x5F */ 0xFE,\n/* '`' 0x60 */ 0x80,\n/* 'a' 0x61 */ 0x79, 0x20, 0x4F, 0xC6, 0x37, 0x40,\n/* 'b' 0x62 */ 0x84, 0x3D, 0x18, 0xC6, 0x31, 0xF0,\n/* 'c' 0x63 */ 0x39, 0x3C, 0x20, 0xC1, 0x33, 0x80,\n/* 'd' 0x64 */ 0x04, 0x13, 0xD3, 0xC6, 0x1C, 0x53, 0x3C,\n/* 'e' 0x65 */ 0x39, 0x38, 0x7F, 0x81, 0x13, 0x80,\n/* 'f' 0x66 */ 0x6B, 0xA4, 0x92, 0x40,\n/* 'g' 0x67 */ 0x35, 0x3C, 0x61, 0xC5, 0x33, 0x41, 0x4D, 0xE0,\n/* 'h' 0x68 */ 0x84, 0x3D, 0x38, 0xC6, 0x31, 0x88,\n/* 'i' 0x69 */ 0xBF, 0x80,\n/* 'j' 0x6A */ 0x45, 0x55, 0x57,\n/* 'k' 0x6B */ 0x84, 0x25, 0x4E, 0x52, 0xD2, 0x88,\n/* 'l' 0x6C */ 0xFF, 0x80,\n/* 'm' 0x6D */ 0xF7, 0x99, 0x91, 0x91, 0x91, 0x91, 0x91,\n/* 'n' 0x6E */ 0xF4, 0x63, 0x18, 0xC6, 0x20,\n/* 'o' 0x6F */ 0x39, 0x3C, 0x61, 0xC5, 0x33, 0x80,\n/* 'p' 0x70 */ 0xF4, 0x63, 0x18, 0xC7, 0xD0, 0x80,\n/* 'q' 0x71 */ 0x3D, 0x3C, 0x61, 0xC5, 0x37, 0x41, 0x04,\n/* 'r' 0x72 */ 0xF2, 0x49, 0x20,\n/* 's' 0x73 */ 0x7A, 0x50, 0xE0, 0xE5, 0xE0,\n/* 't' 0x74 */ 0x5D, 0x24, 0x93,\n/* 'u' 0x75 */ 0x8C, 0x63, 0x18, 0xCF, 0xA0,\n/* 'v' 0x76 */ 0x85, 0x24, 0x92, 0x30, 0xC3, 0x00,\n/* 'w' 0x77 */ 0x89, 0x59, 0x59, 0x55, 0x56, 0x26, 0x26,\n/* 'x' 0x78 */ 0x4A, 0x4C, 0x43, 0x27, 0x20,\n/* 'y' 0x79 */ 0x8A, 0x52, 0xA5, 0x18, 0x84, 0x22, 0x00,\n/* 'z' 0x7A */ 0x78, 0x44, 0x46, 0x23, 0xE0,\n/* '{' 0x7B */ 0x6A, 0xAA, 0xA9,\n/* '|' 0x7C */ 0xFF, 0xE0,\n/* '}' 0x7D */ 0x95, 0x55, 0x56,\n/* '~' 0x7E */ 0x66, 0x60,\n/* 0x7F */\n/* 0x80 */ 0x1C, 0x45, 0x07, 0xE4, 0x1F, 0x10, 0x10, 0x1E,\n/* 0x81 */\n/* 0x82 */ 0xE0,\n/* 0x83 */ 0x6B, 0xA4, 0x92, 0x49, 0x60,\n/* 0x84 */ 0xB6, 0x80,\n/* 0x85 */ 0xA8,\n/* 0x86 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0x21, 0x08,\n/* 0x87 */ 0x21, 0x09, 0xF2, 0x10, 0x84, 0xF9, 0x08,\n/* 0x88 */ 0x54,\n/* 0x89 */ 0x62, 0x09, 0x40, 0x98, 0x06, 0x80, 0x10, 0x01, 0x66, 0x29, 0x92, 0x99, 0x06, 0x60,\n/* 0x8A */ 0x28, 0x47, 0xA1, 0x83, 0x07, 0x83, 0x87, 0x17, 0x80,\n/* 0x8B */ 0x64,\n/* 0x8C */ 0x3B, 0xE8, 0xC2, 0x08, 0x41, 0x08, 0x3F, 0x04, 0x20, 0x82, 0x30, 0x3B, 0xE0,\n/* 0x8D */\n/* 0x8E */ 0x14, 0x11, 0xF8, 0x30, 0xC1, 0x04, 0x18, 0x61, 0xFC,\n/* 0x8F */\n/* 0x90 */\n/* 0x91 */ 0xE0,\n/* 0x92 */ 0xE0,\n/* 0x93 */ 0xB6, 0x80,\n/* 0x94 */ 0xB6, 0x80,\n/* 0x95 */ 0xFF, 0x80,\n/* 0x96 */ 0xFC,\n/* 0x97 */ 0xFF, 0xF0,\n/* 0x98 */ 0xDB,\n/* 0x99 */ 0xE6, 0x28, 0xCD, 0x19, 0xA3, 0x34, 0x6A, 0x8B, 0x51, 0x68,\n/* 0x9A */ 0x52, 0x69, 0x8E, 0x19, 0x60,\n/* 0x9B */ 0x98,\n/* 0x9C */ 0x7B, 0xD9, 0xCE, 0x10, 0xC3, 0xF8, 0x41, 0x9C, 0x5E, 0xF0,\n/* 0x9D */\n/* 0x9E */ 0x51, 0x1E, 0x11, 0x11, 0x88, 0xF8,\n/* 0x9F */ 0x29, 0x05, 0x12, 0x22, 0x87, 0x04, 0x08, 0x10, 0x20,\n/* 0xA0 */\n/* 0xA1 */ 0xBF, 0x80,\n/* 0xA2 */ 0x23, 0xAB, 0x4A, 0x52, 0xAE, 0x20,\n/* 0xA3 */ 0x39, 0x14, 0x10, 0xF0, 0x82, 0x1C, 0x4C,\n/* 0xA4 */ 0xFC, 0x63, 0xF0,\n/* 0xA5 */ 0x8C, 0x54, 0xAF, 0x93, 0xE4, 0x20,\n/* 0xA6 */ 0xF9, 0xF0,\n/* 0xA7 */ 0x32, 0x91, 0xC9, 0x47, 0x26, 0x14, 0xA4, 0xC0,\n/* 0xA8 */ 0xA0,\n/* 0xA9 */ 0x3E, 0x3F, 0xB8, 0xF4, 0x1A, 0x0D, 0x17, 0x76, 0xC6, 0x3E, 0x00,\n/* 0xAA */ 0x61, 0x79, 0x60,\n/* 0xAB */ 0x5A, 0xA5,\n/* 0xAC */ 0xFC, 0x10, 0x40,\n/* 0xAD */\n/* 0xAE */ 0x3E, 0x31, 0xB7, 0x72, 0x99, 0xCC, 0xC7, 0x56, 0xC6, 0x3E, 0x00,\n/* 0xAF */ 0xE0,\n/* 0xB0 */ 0x69, 0x96,\n/* 0xB1 */ 0x21, 0x3E, 0x42, 0x03, 0xE0,\n/* 0xB2 */ 0x69, 0x3C, 0xF0,\n/* 0xB3 */ 0x79, 0x29, 0x70,\n/* 0xB4 */ 0x80,\n/* 0xB5 */ 0x8A, 0x28, 0xA2, 0x8A, 0x6E, 0xE0, 0x80,\n/* 0xB6 */ 0x7F, 0xAE, 0xBA, 0x68, 0xA2, 0x8A, 0x28, 0xA0,\n/* 0xB7 */ 0x80,\n/* 0xB8 */ 0x67, 0x80,\n/* 0xB9 */ 0x75, 0x50,\n/* 0xBA */ 0x69, 0x96, 0xF0,\n/* 0xBB */ 0xA5, 0x5A,\n/* 0xBC */ 0x42, 0x30, 0x84, 0x41, 0x10, 0x48, 0x82, 0x61, 0x28, 0x8F, 0x20, 0x80,\n/* 0xBD */ 0x40, 0x63, 0x11, 0x09, 0x74, 0xA8, 0x84, 0x44, 0x44, 0x43, 0x80,\n/* 0xBE */ 0x71, 0x24, 0x82, 0x20, 0x50, 0x98, 0x9A, 0x61, 0x28, 0x4F, 0x20, 0x80,\n/* 0xBF */ 0x20, 0x08, 0x44, 0x42, 0x11, 0x70,\n/* 0xC0 */ 0x2D, 0x02, 0x22, 0x22, 0x22,\n/* 0xC1 */ 0x10, 0x50, 0xA1, 0x44, 0x4F, 0x91, 0x41, 0x82,\n/* 0xC2 */ 0xFA, 0x18, 0x61, 0xFE, 0x18, 0x61, 0xF8,\n/* 0xC3 */ 0xFE, 0x08, 0x20, 0x82, 0x08, 0x20, 0x80,\n/* 0xC4 */ 0x08, 0x0A, 0x05, 0x02, 0x82, 0x21, 0x11, 0x04, 0x82, 0x7F, 0x00,\n/* 0xC5 */ 0xFE, 0x08, 0x20, 0xFE, 0x08, 0x20, 0xFC,\n/* 0xC6 */ 0x7E, 0x08, 0x20, 0x41, 0x04, 0x08, 0x20, 0xFE,\n/* 0xC7 */ 0x83, 0x06, 0x0C, 0x1F, 0xF0, 0x60, 0xC1, 0x82,\n/* 0xC8 */ 0x38, 0x8A, 0x0C, 0x1B, 0xB0, 0x60, 0xA2, 0x38,\n/* 0xC9 */ 0xFF, 0x80,\n/* 0xCA */ 0x83, 0x0A, 0x24, 0x8A, 0x1A, 0x22, 0x42, 0x82,\n/* 0xCB */ 0x08, 0x0A, 0x05, 0x02, 0x82, 0x21, 0x11, 0x04, 0x82, 0x41, 0x00,\n/* 0xCC */ 0x83, 0x8F, 0x1D, 0x5A, 0xB5, 0x6A, 0xC9, 0x92,\n/* 0xCD */ 0x83, 0x86, 0x8D, 0x19, 0x31, 0x62, 0xC3, 0x82,\n/* 0xCE */ 0xFC, 0x00, 0x00, 0x78, 0x00, 0x00, 0xFC,\n/* 0xCF */ 0x38, 0x8A, 0x0C, 0x18, 0x30, 0x60, 0xA2, 0x38,\n/* 0xD0 */ 0xFF, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x82,\n/* 0xD1 */ 0xFA, 0x18, 0x61, 0xFA, 0x08, 0x20, 0x80,\n/* 0xD2 */\n/* 0xD3 */ 0xFE, 0x04, 0x08, 0x10, 0x84, 0x20, 0xFC,\n/* 0xD4 */ 0xFE, 0x20, 0x40, 0x81, 0x02, 0x04, 0x08, 0x10,\n/* 0xD5 */ 0x82, 0x89, 0x11, 0x41, 0x02, 0x04, 0x08, 0x10,\n/* 0xD6 */ 0x10, 0xFA, 0x4C, 0x99, 0x32, 0x64, 0xBE, 0x10,\n/* 0xD7 */ 0x82, 0x89, 0x11, 0x41, 0x05, 0x11, 0x22, 0x82,\n/* 0xD8 */ 0x93, 0x26, 0x4C, 0x99, 0x2F, 0x84, 0x08, 0x10,\n/* 0xD9 */ 0x38, 0x8A, 0x0C, 0x18, 0x30, 0x60, 0xA2, 0xEE,\n/* 0xDA */ 0xA1, 0x24, 0x92, 0x49, 0x00,\n/* 0xDB */ 0x28, 0x02, 0x0A, 0x24, 0x45, 0x04, 0x08, 0x10, 0x20, 0x40,\n/* 0xDC */ 0x11, 0x00, 0xD9, 0x4A, 0x52, 0x93, 0x40,\n/* 0xDD */ 0x11, 0x00, 0xF8, 0x41, 0x90, 0x83, 0xC0,\n/* 0xDE */ 0x11, 0x01, 0x6C, 0xC6, 0x31, 0x8C, 0x42, 0x10,\n/* 0xDF */ 0x62, 0xAA, 0xA0,\n/* 0xE0 */ 0x25, 0x81, 0x18, 0xC6, 0x31, 0x8B, 0x80,\n/* 0xE1 */ 0x6C, 0xA5, 0x29, 0x49, 0xA0,\n/* 0xE2 */ 0x74, 0x63, 0x1B, 0x46, 0x39, 0xB4, 0x20,\n/* 0xE3 */ 0x44, 0x89, 0x11, 0x42, 0x85, 0x04, 0x08, 0x10,\n/* 0xE4 */ 0x71, 0x1D, 0x18, 0xC6, 0x31, 0x70,\n/* 0xE5 */ 0x7C, 0x20, 0xC8, 0x41, 0xE0,\n/* 0xE6 */ 0x72, 0x44, 0x88, 0x88, 0x71, 0x20,\n/* 0xE7 */ 0xB6, 0x63, 0x18, 0xC6, 0x21, 0x08,\n/* 0xE8 */ 0x74, 0x63, 0x1F, 0xC6, 0x31, 0x70,\n/* 0xE9 */ 0xFE,\n/* 0xEA */ 0x8A, 0x4A, 0x38, 0x92, 0x48, 0x80,\n/* 0xEB */ 0x20, 0x41, 0x04, 0x28, 0xA2, 0x91, 0x44,\n/* 0xEC */ 0x8C, 0x63, 0x18, 0xC7, 0xF0, 0x80,\n/* 0xED */ 0x8C, 0x54, 0xA5, 0x10, 0x80,\n/* 0xEE */ 0x68, 0x86, 0x48, 0x88, 0x71, 0x20,\n/* 0xEF */ 0x74, 0x63, 0x18, 0xC5, 0xC0,\n/* 0xF0 */ 0xFF, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24,\n/* 0xF1 */ 0x74, 0x63, 0x18, 0xC7, 0xD0, 0x80,\n/* 0xF2 */ 0x34, 0x88, 0x88, 0x71, 0x60,\n/* 0xF3 */ 0x7F, 0x12, 0x24, 0x48, 0x91, 0x1C, 0x00,\n/* 0xF4 */ 0xE9, 0x24, 0x90,\n/* 0xF5 */ 0x8C, 0x63, 0x18, 0xC5, 0xC0,\n/* 0xF6 */ 0x5A, 0x59, 0x65, 0x95, 0x53, 0x84, 0x10,\n/* 0xF7 */ 0x49, 0x24, 0x8C, 0x30, 0xC4, 0x92, 0x48,\n/* 0xF8 */ 0x93, 0x26, 0x4C, 0x99, 0x32, 0x5F, 0x08, 0x10,\n/* 0xF9 */ 0x45, 0x06, 0x4C, 0x99, 0x32, 0x5B, 0x00,\n/* 0xFA */ 0xA1, 0x24, 0x92, 0x40,\n/* 0xFB */ 0x50, 0x23, 0x18, 0xC6, 0x31, 0x70,\n/* 0xFC */ 0x11, 0x00, 0xE8, 0xC6, 0x31, 0x8B, 0x80,\n/* 0xFD */ 0x21, 0x01, 0x18, 0xC6, 0x31, 0x8B, 0x80,\n/* 0xFE */ 0x08, 0x20, 0x02, 0x28, 0x32, 0x64, 0xC9, 0x92, 0xD8,\n/* 0xFF */\n};\n\nconst GFXglyph FreeSans6pt_Win1253Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,    9,   10,   11,    1,   -9 },\n/* 0x02 */ {    12,    9,   10,   11,    1,   -8 },\n/* 0x03 */ {    24,   10,   10,   12,    1,   -8 },\n/* 0x04 */ {    37,   10,   10,   12,    1,   -8 },\n/* 0x05 */ {    50,   10,   10,   12,    1,   -9 },\n/* 0x06 */ {    63,   11,   11,   13,    1,   -9 },\n/* 0x07 */ {    79,    0,    0,    8,    0,    0 },\n/* 0x08 */ {    79,   12,    9,   14,    1,   -8 },\n/* 0x09 */ {    93,   14,    8,   16,    1,   -7 },\n/* 0x0A */ {   107,    0,    0,    8,    0,    0 },\n/* 0x0B */ {   107,    9,   10,   11,    1,   -9 },\n/* 0x0C */ {   119,   13,    9,   15,    1,   -8 },\n/* 0x0D */ {   134,    0,    0,    8,    0,    0 },\n/* 0x0E */ {   134,    9,   11,   11,    1,   -9 },\n/* 0x0F */ {   147,   10,   10,   12,    1,   -9 },\n/* 0x10 */ {   160,   11,   10,   13,    1,   -9 },\n/* 0x11 */ {   174,   13,   10,   15,    1,   -9 },\n/* 0x12 */ {   191,   10,   10,   12,    1,   -9 },\n/* 0x13 */ {   204,   11,   10,   13,    1,   -9 },\n/* 0x14 */ {   218,   10,   10,   12,    1,   -9 },\n/* 0x15 */ {   231,   14,   10,   16,    1,   -9 },\n/* 0x16 */ {   249,    8,   10,   10,    1,   -9 },\n/* 0x17 */ {   259,   12,   10,   14,    1,   -9 },\n/* 0x18 */ {   274,   13,   10,   15,    1,   -9 },\n/* 0x19 */ {   291,   12,   10,   14,    1,   -9 },\n/* 0x1A */ {   306,    9,   10,   11,    1,   -8 },\n/* 0x1B */ {   318,   14,   10,   16,    1,   -9 },\n/* 0x1C */ {   336,   11,   10,   13,    1,   -9 },\n/* 0x1D */ {   350,   11,   10,   13,    1,   -9 },\n/* 0x1E */ {   364,   12,   10,   14,    1,   -9 },\n/* 0x1F */ {   379,    8,   10,   11,    2,   -9 },\n/* ' ' 0x20 */ {   389,    0,    0,    3,    0,    0 },\n/* '!' 0x21 */ {   389,    1,    9,    4,    2,   -8 },\n/* '\"' 0x22 */ {   391,    3,    3,    4,    0,   -8 },\n/* '#' 0x23 */ {   393,    7,    8,    7,    0,   -7 },\n/* '$' 0x24 */ {   400,    6,   11,    7,    0,   -9 },\n/* '%' 0x25 */ {   409,   10,    9,   11,    0,   -8 },\n/* '&' 0x26 */ {   421,    6,    9,    8,    1,   -8 },\n/* ''' 0x27 */ {   428,    1,    3,    2,    1,   -8 },\n/* '(' 0x28 */ {   429,    2,   11,    4,    1,   -8 },\n/* ')' 0x29 */ {   432,    3,   11,    4,    0,   -8 },\n/* '*' 0x2A */ {   437,    3,    3,    5,    1,   -8 },\n/* '+' 0x2B */ {   439,    5,    5,    7,    1,   -4 },\n/* ',' 0x2C */ {   443,    1,    3,    3,    1,    0 },\n/* '-' 0x2D */ {   444,    2,    1,    4,    1,   -3 },\n/* '.' 0x2E */ {   445,    1,    1,    3,    1,    0 },\n/* '/' 0x2F */ {   446,    3,    9,    3,    0,   -8 },\n/* '0' 0x30 */ {   450,    5,    9,    7,    1,   -8 },\n/* '1' 0x31 */ {   456,    3,    9,    7,    1,   -8 },\n/* '2' 0x32 */ {   460,    6,    9,    7,    0,   -8 },\n/* '3' 0x33 */ {   467,    6,    9,    7,    0,   -8 },\n/* '4' 0x34 */ {   474,    6,    9,    7,    0,   -8 },\n/* '5' 0x35 */ {   481,    5,    9,    7,    1,   -8 },\n/* '6' 0x36 */ {   487,    5,    9,    7,    1,   -8 },\n/* '7' 0x37 */ {   493,    5,    9,    7,    1,   -8 },\n/* '8' 0x38 */ {   499,    6,    9,    7,    0,   -8 },\n/* '9' 0x39 */ {   506,    6,    9,    7,    0,   -8 },\n/* ':' 0x3A */ {   513,    1,    7,    3,    1,   -6 },\n/* ';' 0x3B */ {   514,    1,    8,    3,    1,   -5 },\n/* '<' 0x3C */ {   515,    5,    5,    7,    1,   -4 },\n/* '=' 0x3D */ {   519,    5,    3,    7,    1,   -3 },\n/* '>' 0x3E */ {   521,    5,    5,    7,    1,   -4 },\n/* '?' 0x3F */ {   525,    5,    9,    7,    1,   -8 },\n/* '@' 0x40 */ {   531,   11,   11,   12,    0,   -8 },\n/* 'A' 0x41 */ {   547,    8,    9,    8,    0,   -8 },\n/* 'B' 0x42 */ {   556,    6,    9,    8,    1,   -8 },\n/* 'C' 0x43 */ {   563,    8,    9,    9,    0,   -8 },\n/* 'D' 0x44 */ {   572,    7,    9,    8,    1,   -8 },\n/* 'E' 0x45 */ {   580,    6,    9,    8,    1,   -8 },\n/* 'F' 0x46 */ {   587,    6,    9,    7,    1,   -8 },\n/* 'G' 0x47 */ {   594,    8,    9,    9,    0,   -8 },\n/* 'H' 0x48 */ {   603,    7,    9,    9,    1,   -8 },\n/* 'I' 0x49 */ {   611,    1,    9,    3,    1,   -8 },\n/* 'J' 0x4A */ {   613,    5,    9,    6,    0,   -8 },\n/* 'K' 0x4B */ {   619,    7,    9,    8,    1,   -8 },\n/* 'L' 0x4C */ {   627,    5,    9,    7,    1,   -8 },\n/* 'M' 0x4D */ {   633,    8,    9,   10,    1,   -8 },\n/* 'N' 0x4E */ {   642,    7,    9,    9,    1,   -8 },\n/* 'O' 0x4F */ {   650,    9,    9,    9,    0,   -8 },\n/* 'P' 0x50 */ {   661,    6,    9,    8,    1,   -8 },\n/* 'Q' 0x51 */ {   668,    9,   10,    9,    0,   -8 },\n/* 'R' 0x52 */ {   680,    7,    9,    9,    1,   -8 },\n/* 'S' 0x53 */ {   688,    6,    9,    8,    1,   -8 },\n/* 'T' 0x54 */ {   695,    7,    9,    8,    0,   -8 },\n/* 'U' 0x55 */ {   703,    7,    9,    9,    1,   -8 },\n/* 'V' 0x56 */ {   711,    7,    9,    8,    0,   -8 },\n/* 'W' 0x57 */ {   719,   11,    9,   11,    0,   -8 },\n/* 'X' 0x58 */ {   732,    6,    9,    8,    1,   -8 },\n/* 'Y' 0x59 */ {   739,    8,    9,    8,    0,   -8 },\n/* 'Z' 0x5A */ {   748,    7,    9,    7,    0,   -8 },\n/* '[' 0x5B */ {   756,    2,   12,    3,    1,   -8 },\n/* '\\' 0x5C */ {   759,    3,    9,    3,    0,   -8 },\n/* ']' 0x5D */ {   763,    2,   12,    3,    0,   -8 },\n/* '^' 0x5E */ {   766,    4,    4,    6,    1,   -8 },\n/* '_' 0x5F */ {   768,    7,    1,    7,    0,    2 },\n/* '`' 0x60 */ {   769,    1,    1,    3,    1,   -8 },\n/* 'a' 0x61 */ {   770,    6,    7,    7,    0,   -6 },\n/* 'b' 0x62 */ {   776,    5,    9,    7,    1,   -8 },\n/* 'c' 0x63 */ {   782,    6,    7,    6,    0,   -6 },\n/* 'd' 0x64 */ {   788,    6,    9,    7,    0,   -8 },\n/* 'e' 0x65 */ {   795,    6,    7,    6,    0,   -6 },\n/* 'f' 0x66 */ {   801,    3,    9,    3,    0,   -8 },\n/* 'g' 0x67 */ {   805,    6,   10,    7,    0,   -6 },\n/* 'h' 0x68 */ {   813,    5,    9,    6,    1,   -8 },\n/* 'i' 0x69 */ {   819,    1,    9,    3,    1,   -8 },\n/* 'j' 0x6A */ {   821,    2,   12,    3,    0,   -8 },\n/* 'k' 0x6B */ {   824,    5,    9,    6,    1,   -8 },\n/* 'l' 0x6C */ {   830,    1,    9,    3,    1,   -8 },\n/* 'm' 0x6D */ {   832,    8,    7,   10,    1,   -6 },\n/* 'n' 0x6E */ {   839,    5,    7,    6,    1,   -6 },\n/* 'o' 0x6F */ {   844,    6,    7,    6,    0,   -6 },\n/* 'p' 0x70 */ {   850,    5,    9,    7,    1,   -6 },\n/* 'q' 0x71 */ {   856,    6,    9,    7,    0,   -6 },\n/* 'r' 0x72 */ {   863,    3,    7,    4,    1,   -6 },\n/* 's' 0x73 */ {   866,    5,    7,    6,    0,   -6 },\n/* 't' 0x74 */ {   871,    3,    8,    3,    0,   -7 },\n/* 'u' 0x75 */ {   874,    5,    7,    6,    1,   -6 },\n/* 'v' 0x76 */ {   879,    6,    7,    6,    0,   -6 },\n/* 'w' 0x77 */ {   885,    8,    7,    9,    0,   -6 },\n/* 'x' 0x78 */ {   892,    5,    7,    6,    0,   -6 },\n/* 'y' 0x79 */ {   897,    5,   10,    6,    0,   -6 },\n/* 'z' 0x7A */ {   904,    5,    7,    6,    0,   -6 },\n/* '{' 0x7B */ {   909,    2,   12,    4,    1,   -8 },\n/* '|' 0x7C */ {   912,    1,   11,    3,    1,   -8 },\n/* '}' 0x7D */ {   914,    2,   12,    4,    1,   -8 },\n/* '~' 0x7E */ {   917,    6,    2,    6,    0,   -4 },\n/* 0x7F */ {   919,    0,    0,    0,    0,    0 },\n/* 0x80 */ {   919,    7,    9,    8,    0,   -8 },\n/* 0x81 */ {   927,    0,    0,    8,    0,    0 },\n/* 0x82 */ {   927,    1,    3,    3,    1,    0 },\n/* 0x83 */ {   928,    3,   12,    3,    0,   -8 },\n/* 0x84 */ {   933,    3,    3,    5,    1,    0 },\n/* 0x85 */ {   935,    5,    1,    7,    1,    0 },\n/* 0x86 */ {   936,    5,   11,    7,    1,   -8 },\n/* 0x87 */ {   943,    5,   11,    7,    1,   -8 },\n/* 0x88 */ {   950,    3,    2,    4,    0,   -9 },\n/* 0x89 */ {   951,   12,    9,   12,    0,   -8 },\n/* 0x8A */ {   965,    6,   11,    8,    1,   -9 },\n/* 0x8B */ {   974,    2,    3,    4,    1,   -4 },\n/* 0x8C */ {   975,   11,    9,   12,    0,   -8 },\n/* 0x8D */ {   988,    0,    0,    8,    0,    0 },\n/* 0x8E */ {   988,    7,   10,    7,    0,   -9 },\n/* 0x8F */ {   997,    0,    0,    8,    0,    0 },\n/* 0x90 */ {   997,    0,    0,    8,    0,    0 },\n/* 0x91 */ {   997,    1,    3,    3,    1,   -8 },\n/* 0x92 */ {   998,    1,    3,    2,    1,   -8 },\n/* 0x93 */ {   999,    3,    3,    5,    1,   -8 },\n/* 0x94 */ {  1001,    3,    3,    5,    1,   -8 },\n/* 0x95 */ {  1003,    3,    3,    5,    1,   -5 },\n/* 0x96 */ {  1005,    6,    1,    6,    0,   -3 },\n/* 0x97 */ {  1006,   12,    1,   12,    0,   -3 },\n/* 0x98 */ {  1008,    4,    2,    4,    0,   -8 },\n/* 0x99 */ {  1009,   11,    7,   12,    1,   -8 },\n/* 0x9A */ {  1019,    4,    9,    6,    1,   -8 },\n/* 0x9B */ {  1024,    2,    3,    3,    1,   -4 },\n/* 0x9C */ {  1025,   11,    7,   11,    0,   -6 },\n/* 0x9D */ {  1035,    0,    0,    8,    0,    0 },\n/* 0x9E */ {  1035,    5,    9,    6,    0,   -8 },\n/* 0x9F */ {  1041,    7,   10,    8,    1,   -9 },\n/* 0xA0 */ {  1050,    0,    0,    3,    0,    0 },\n/* 0xA1 */ {  1050,    1,    9,    4,    1,   -5 },\n/* 0xA2 */ {  1052,    5,    9,    7,    1,   -7 },\n/* 0xA3 */ {  1058,    6,    9,    7,    0,   -8 },\n/* 0xA4 */ {  1065,    5,    4,    7,    1,   -5 },\n/* 0xA5 */ {  1068,    5,    9,    7,    1,   -8 },\n/* 0xA6 */ {  1074,    1,   12,    3,    1,   -8 },\n/* 0xA7 */ {  1076,    5,   12,    7,    1,   -8 },\n/* 0xA8 */ {  1084,    3,    1,    4,    0,   -7 },\n/* 0xA9 */ {  1085,    9,    9,   10,    0,   -8 },\n/* 0xAA */ {  1096,    4,    5,    4,    0,   -8 },\n/* 0xAB */ {  1099,    4,    4,    6,    1,   -4 },\n/* 0xAC */ {  1101,    6,    3,    7,    1,   -4 },\n/* 0xAD */ {  1104,    0,    0,    0,    0,    0 },\n/* 0xAE */ {  1104,    9,    9,   10,    0,   -8 },\n/* 0xAF */ {  1115,    3,    1,    4,    0,   -8 },\n/* 0xB0 */ {  1116,    4,    4,    7,    2,   -8 },\n/* 0xB1 */ {  1118,    5,    7,    7,    1,   -6 },\n/* 0xB2 */ {  1123,    4,    5,    4,    0,   -9 },\n/* 0xB3 */ {  1126,    4,    5,    4,    0,   -9 },\n/* 0xB4 */ {  1129,    1,    1,    4,    1,   -8 },\n/* 0xB5 */ {  1130,    6,    9,    7,    1,   -6 },\n/* 0xB6 */ {  1137,    6,   10,    6,    1,   -8 },\n/* 0xB7 */ {  1145,    1,    1,    3,    1,   -2 },\n/* 0xB8 */ {  1146,    3,    3,    4,    1,    1 },\n/* 0xB9 */ {  1148,    2,    6,    4,    1,   -9 },\n/* 0xBA */ {  1150,    4,    5,    4,    0,   -8 },\n/* 0xBB */ {  1153,    4,    4,    6,    1,   -5 },\n/* 0xBC */ {  1155,   10,    9,   10,    1,   -8 },\n/* 0xBD */ {  1167,    9,    9,   10,    1,   -8 },\n/* 0xBE */ {  1178,   10,    9,   11,    0,   -8 },\n/* 0xBF */ {  1190,    5,    9,    7,    1,   -5 },\n/* 0xC0 */ {  1196,    4,   10,    3,   -1,  -10 },\n/* 0xC1 */ {  1201,    7,    9,    7,    0,   -9 },\n/* 0xC2 */ {  1209,    6,    9,    8,    1,   -9 },\n/* 0xC3 */ {  1216,    6,    9,    7,    1,   -9 },\n/* 0xC4 */ {  1223,    9,    9,    7,   -1,   -9 },\n/* 0xC5 */ {  1234,    6,    9,    8,    1,   -9 },\n/* 0xC6 */ {  1241,    7,    9,    7,    0,   -9 },\n/* 0xC7 */ {  1249,    7,    9,    9,    1,   -9 },\n/* 0xC8 */ {  1257,    7,    9,    9,    1,   -9 },\n/* 0xC9 */ {  1265,    1,    9,    3,    1,   -9 },\n/* 0xCA */ {  1267,    7,    9,    8,    1,   -9 },\n/* 0xCB */ {  1275,    9,    9,    7,   -1,   -9 },\n/* 0xCC */ {  1286,    7,    9,    9,    1,   -9 },\n/* 0xCD */ {  1294,    7,    9,    9,    1,   -9 },\n/* 0xCE */ {  1302,    6,    9,    8,    1,   -9 },\n/* 0xCF */ {  1309,    7,    9,    9,    1,   -9 },\n/* 0xD0 */ {  1317,    7,    9,    9,    1,   -9 },\n/* 0xD1 */ {  1325,    6,    9,    8,    1,   -9 },\n/* 0xD2 */ {  1332,    0,    0,    5,    0,    0 },\n/* 0xD3 */ {  1332,    6,    9,    7,    1,   -9 },\n/* 0xD4 */ {  1339,    7,    9,    7,    0,   -9 },\n/* 0xD5 */ {  1347,    7,    9,    7,    0,   -9 },\n/* 0xD6 */ {  1355,    7,    9,    9,    1,   -9 },\n/* 0xD7 */ {  1363,    7,    9,    7,    0,   -9 },\n/* 0xD8 */ {  1371,    7,    9,    9,    1,   -9 },\n/* 0xD9 */ {  1379,    7,    9,    9,    1,   -9 },\n/* 0xDA */ {  1387,    3,   11,    3,    0,  -11 },\n/* 0xDB */ {  1392,    7,   11,    7,    0,  -11 },\n/* 0xDC */ {  1402,    5,   10,    7,    1,  -10 },\n/* 0xDD */ {  1409,    5,   10,    5,    0,  -10 },\n/* 0xDE */ {  1416,    5,   12,    7,    1,  -10 },\n/* 0xDF */ {  1424,    2,   10,    3,    1,  -10 },\n/* 0xE0 */ {  1427,    5,   10,    7,    1,  -10 },\n/* 0xE1 */ {  1434,    5,    7,    7,    1,   -7 },\n/* 0xE2 */ {  1439,    5,   11,    7,    1,   -9 },\n/* 0xE3 */ {  1446,    7,    9,    5,   -1,   -7 },\n/* 0xE4 */ {  1454,    5,    9,    7,    1,   -9 },\n/* 0xE5 */ {  1460,    5,    7,    5,    0,   -7 },\n/* 0xE6 */ {  1465,    4,   11,    5,    1,   -9 },\n/* 0xE7 */ {  1471,    5,    9,    7,    1,   -7 },\n/* 0xE8 */ {  1477,    5,    9,    7,    1,   -9 },\n/* 0xE9 */ {  1483,    1,    7,    3,    1,   -7 },\n/* 0xEA */ {  1484,    6,    7,    7,    1,   -7 },\n/* 0xEB */ {  1490,    6,    9,    5,   -1,   -9 },\n/* 0xEC */ {  1497,    5,    9,    7,    1,   -7 },\n/* 0xED */ {  1503,    5,    7,    5,    0,   -7 },\n/* 0xEE */ {  1508,    4,   11,    5,    1,   -9 },\n/* 0xEF */ {  1514,    5,    7,    7,    1,   -7 },\n/* 0xF0 */ {  1519,    8,    7,    8,    0,   -7 },\n/* 0xF1 */ {  1526,    5,    9,    7,    1,   -7 },\n/* 0xF2 */ {  1532,    4,    9,    6,    1,   -7 },\n/* 0xF3 */ {  1537,    7,    7,    7,    1,   -7 },\n/* 0xF4 */ {  1544,    3,    7,    5,    1,   -7 },\n/* 0xF5 */ {  1547,    5,    7,    7,    1,   -7 },\n/* 0xF6 */ {  1552,    6,    9,    8,    1,   -7 },\n/* 0xF7 */ {  1559,    6,    9,    6,    0,   -7 },\n/* 0xF8 */ {  1566,    7,    9,    9,    1,   -7 },\n/* 0xF9 */ {  1574,    7,    7,    9,    1,   -7 },\n/* 0xFA */ {  1581,    3,    9,    3,    0,   -9 },\n/* 0xFB */ {  1585,    5,    9,    7,    1,   -9 },\n/* 0xFC */ {  1591,    5,   10,    7,    1,  -10 },\n/* 0xFD */ {  1598,    5,   10,    7,    1,  -10 },\n/* 0xFE */ {  1605,    7,   10,    9,    1,  -10 },\n/* 0xFF */ {  1614,    0,    0,    5,    0,    0 },\n};\n\nconst GFXfont FreeSans6pt_Win1253 PROGMEM = {\n(uint8_t*)FreeSans6pt_Win1253Bitmaps,\n(GFXglyph*)FreeSans6pt_Win1253Glyphs,\n0x01, 0xFF, 10\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans9pt_Win1250.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans9pt_Win1250\n*/\nconst uint8_t FreeSans9pt_Win1250Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x07, 0x00, 0x0A, 0x00, 0x24, 0x00, 0x48, 0x01, 0x10, 0x04, 0x40, 0x10, 0xFF, 0x20, 0x02, 0x81, 0xFD, 0x00, 0x06, 0x07, 0xF4, 0x08, 0x24, 0x0F, 0x88, 0x11, 0x0F, 0xDC, 0x00,\n/* 0x02 */ 0x3F, 0x70, 0x81, 0x11, 0x03, 0xE4, 0x08, 0x28, 0x1F, 0xD0, 0x00, 0x60, 0x7F, 0x20, 0x02, 0x43, 0xFC, 0x44, 0x00, 0x44, 0x00, 0x48, 0x00, 0x90, 0x00, 0xA0, 0x01, 0xC0, 0x00,\n/* 0x03 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x8C, 0x63, 0x18, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x20, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x04 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x30, 0x88, 0x62, 0x08, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x05 */ 0x0B, 0x10, 0x14, 0xA8, 0x12, 0x50, 0x29, 0x42, 0x24, 0xA5, 0x32, 0x95, 0x5A, 0x09, 0x48, 0x09, 0x24, 0x01, 0x10, 0x01, 0x48, 0x02, 0xA4, 0x02, 0x42, 0x04, 0x01, 0x98, 0x00, 0x60,\n/* 0x06 */ 0x00, 0x80, 0x22, 0x80, 0x65, 0x00, 0xBE, 0xE1, 0x82, 0x4E, 0x03, 0x24, 0x04, 0x28, 0x06, 0x30, 0x12, 0x20, 0x3C, 0xA0, 0xC3, 0xFE, 0x80, 0x4D, 0x00, 0xA6, 0x01, 0x80, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x02, 0x00, 0x03, 0x01, 0x00, 0x09, 0x88, 0x0C, 0x0C,\n/* 0x09 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x00,\n/* 0x0A */\n/* 0x0B */ 0x1C, 0x1C, 0x31, 0xB1, 0x90, 0x50, 0x50, 0x10, 0x18, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x02, 0x80, 0x02, 0x40, 0x01, 0x10, 0x01, 0x04, 0x01, 0x01, 0x01, 0x00, 0x41, 0x00, 0x11, 0x00, 0x07, 0x00, 0x01, 0x00,\n/* 0x0C */ 0x06, 0x00, 0x0A, 0x00, 0x12, 0x00, 0x32, 0x01, 0x84, 0x04, 0x10, 0x08, 0x98, 0x1C, 0x18, 0x40, 0x48, 0x82, 0x11, 0xF0, 0x74, 0x02, 0x18, 0x70, 0x2F, 0x9F, 0x80,\n/* 0x0D */\n/* 0x0E */ 0x01, 0x00, 0x05, 0x00, 0x0A, 0x00, 0x3E, 0x00, 0x82, 0x02, 0x82, 0x06, 0x04, 0x10, 0x04, 0x20, 0x08, 0x40, 0x10, 0xFF, 0x22, 0x00, 0x29, 0xFF, 0x3F, 0x8F, 0xDF, 0x9F, 0x01, 0xC0,\n/* 0x0F */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x36, 0x03, 0x60, 0x00, 0xCC, 0x19, 0xA4, 0x4B, 0x00, 0x06, 0x8E, 0x2B, 0x22, 0x66, 0x7C, 0xCC, 0x71, 0x98, 0x03, 0x00,\n/* 0x10 */ 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x1E, 0x00, 0x54, 0x00, 0xA8, 0x01, 0x50, 0x02, 0xA0, 0x05, 0x20, 0x32, 0x61, 0xC4, 0x74, 0x49, 0x10, 0x6C, 0x00, 0xD8, 0x01, 0x10, 0x00,\n/* 0x11 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x40, 0x29, 0x00, 0x31, 0x84, 0x63, 0x18, 0xC0, 0x00, 0x80, 0x15, 0x03, 0x7E, 0x02, 0xFA, 0x04, 0xE4, 0x18, 0x84, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x12 */ 0x02, 0x08, 0x01, 0x08, 0x40, 0x10, 0xC0, 0x08, 0xC0, 0x60, 0x80, 0x28, 0x04, 0x12, 0x4C, 0x10, 0x80, 0x08, 0x23, 0x0E, 0x08, 0xC4, 0x82, 0x04, 0x20, 0x83, 0x09, 0x82, 0x47, 0x01, 0x1C, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x00,\n/* 0x13 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x08, 0x65, 0x28, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x14 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x22, 0x29, 0x83, 0x30, 0x00, 0x65, 0x14, 0xD3, 0x4D, 0xBA, 0xEB, 0x38, 0xE6, 0x00, 0x0A, 0x00, 0x24, 0x38, 0x44, 0x01, 0x07, 0x1C, 0x01, 0xC0,\n/* 0x15 */ 0x07, 0xC0, 0x30, 0x18, 0x80, 0x32, 0x00, 0xF8, 0x01, 0xF1, 0x09, 0xA5, 0x28, 0x40, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x16 */ 0x0C, 0x00, 0xC0, 0x1C, 0x03, 0x80, 0xF8, 0xBB, 0x36, 0xC7, 0x99, 0xF3, 0xFE, 0x3F, 0xC3, 0xF0, 0x7E, 0x0E, 0xC1, 0x8E, 0xE0, 0x20,\n/* 0x17 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x10, 0x01, 0x20, 0x1D, 0x44, 0x42, 0x84, 0x85, 0x00, 0x86, 0x00, 0xC4, 0x00, 0x44, 0x7C, 0x44, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x18 */ 0x01, 0xE0, 0x00, 0x84, 0x00, 0x40, 0x80, 0x20, 0x10, 0x08, 0x24, 0x02, 0x41, 0x00, 0x86, 0x03, 0x12, 0x03, 0xB4, 0x03, 0x52, 0x81, 0x23, 0x80, 0x70, 0xA0, 0x14, 0x28, 0x05, 0x0A, 0x01, 0x42, 0x80, 0x50,\n/* 0x19 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x33, 0x18, 0x60, 0x00, 0xDC, 0xE1, 0xB9, 0xC3, 0x7B, 0xC6, 0x63, 0x0A, 0x00, 0x24, 0xF0, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1A */ 0xFF, 0xFC, 0x00, 0x63, 0xE3, 0x31, 0x99, 0x04, 0xC8, 0x66, 0x06, 0x30, 0x61, 0x82, 0x0C, 0x10, 0x60, 0x03, 0x04, 0x18, 0x00, 0xFF, 0xFC,\n/* 0x1B */ 0x07, 0xF0, 0x06, 0x0C, 0x04, 0x01, 0x04, 0x00, 0x44, 0x22, 0x12, 0x2A, 0x89, 0x00, 0x04, 0x80, 0x02, 0x44, 0x11, 0x01, 0xF0, 0x04, 0x01, 0x0D, 0x01, 0x6A, 0x41, 0x2C, 0x00, 0x05, 0xC0, 0x0E, 0x18, 0x18,\n/* 0x1C */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0xC0, 0x2A, 0x00, 0x33, 0x00, 0x66, 0x00, 0xCC, 0x39, 0x80, 0x83, 0x00, 0x06, 0x00, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1D */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x70, 0x28, 0x00, 0x31, 0x80, 0x63, 0x18, 0xC0, 0x31, 0x80, 0x03, 0x00, 0x06, 0x60, 0x0D, 0x33, 0x12, 0x10, 0x48, 0x21, 0x23, 0x8C, 0x00,\n/* 0x1E */ 0x03, 0x00, 0x07, 0x9E, 0x07, 0x00, 0x86, 0x00, 0x27, 0xC0, 0x0F, 0xC0, 0x07, 0x8C, 0x62, 0x06, 0x31, 0x20, 0x00, 0x90, 0x00, 0x48, 0x00, 0x24, 0x3E, 0x11, 0x00, 0x10, 0x40, 0x10, 0x18, 0x30, 0x03, 0xE0,\n/* 0x1F */ 0x18, 0x02, 0x80, 0x4C, 0x16, 0x41, 0x24, 0x3C, 0x88, 0x6E, 0x65, 0xF2, 0x78, 0x46, 0x88, 0xCF, 0x18, 0x02, 0x80, 0x8C, 0x60, 0x70,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xF0, 0xC0,\n/* '\"' 0x22 */ 0xDE, 0xF7, 0x20,\n/* '#' 0x23 */ 0x09, 0x86, 0x41, 0x91, 0xFF, 0x13, 0x04, 0xC3, 0x20, 0xC8, 0xFF, 0x89, 0x82, 0x61, 0x90,\n/* '$' 0x24 */ 0x10, 0x1F, 0x14, 0xDA, 0x3D, 0x1E, 0x83, 0x40, 0x78, 0x17, 0x08, 0xF4, 0x7A, 0x35, 0x33, 0xF0, 0x40, 0x20,\n/* '%' 0x25 */ 0x38, 0x10, 0xEC, 0x20, 0xC6, 0x20, 0xC6, 0x40, 0xC6, 0x40, 0x6C, 0x80, 0x39, 0x00, 0x01, 0x3C, 0x02, 0x77, 0x02, 0x63, 0x04, 0x63, 0x04, 0x77, 0x08, 0x3C,\n/* '&' 0x26 */ 0x0E, 0x0C, 0xC3, 0x30, 0xCC, 0x1E, 0x03, 0x03, 0xC1, 0x9B, 0xC2, 0xF0, 0xEC, 0x19, 0x8F, 0x3C, 0x40,\n/* ''' 0x27 */ 0xFE,\n/* '(' 0x28 */ 0x13, 0x26, 0x6C, 0xCC, 0xCC, 0xC4, 0x66, 0x23, 0x10,\n/* ')' 0x29 */ 0x8C, 0x46, 0x63, 0x33, 0x33, 0x32, 0x66, 0x4C, 0x80,\n/* '*' 0x2A */ 0x25, 0x7E, 0xA5, 0x00,\n/* '+' 0x2B */ 0x30, 0xC3, 0x3F, 0x30, 0xC3, 0x0C,\n/* ',' 0x2C */ 0xD6,\n/* '-' 0x2D */ 0xF0,\n/* '.' 0x2E */ 0xC0,\n/* '/' 0x2F */ 0x08, 0x44, 0x21, 0x10, 0x84, 0x42, 0x11, 0x08, 0x00,\n/* '0' 0x30 */ 0x3C, 0x66, 0x42, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x42, 0x66, 0x3C,\n/* '1' 0x31 */ 0x11, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x30,\n/* '2' 0x32 */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x10, 0x08, 0x07, 0xF8,\n/* '3' 0x33 */ 0x3C, 0x66, 0xC3, 0xC3, 0x03, 0x06, 0x1C, 0x07, 0x03, 0xC3, 0xC3, 0x66, 0x3C,\n/* '4' 0x34 */ 0x0C, 0x18, 0x71, 0x62, 0xC9, 0xA3, 0x46, 0xFE, 0x18, 0x30, 0x60, 0xC0,\n/* '5' 0x35 */ 0x7F, 0x20, 0x10, 0x08, 0x08, 0x07, 0xF3, 0x8C, 0x03, 0x01, 0x80, 0xF0, 0x6C, 0x63, 0xE0,\n/* '6' 0x36 */ 0x1E, 0x31, 0x98, 0x78, 0x0C, 0x06, 0xF3, 0x8D, 0x83, 0xC1, 0xE0, 0xD0, 0x6C, 0x63, 0xE0,\n/* '7' 0x37 */ 0xFF, 0x03, 0x02, 0x06, 0x04, 0x0C, 0x08, 0x18, 0x18, 0x18, 0x10, 0x30, 0x30,\n/* '8' 0x38 */ 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1B, 0x18, 0xF8, 0xC6, 0xC1, 0xE0, 0xF0, 0x6C, 0x63, 0xE0,\n/* '9' 0x39 */ 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC2, 0x66, 0x3C,\n/* ':' 0x3A */ 0xC0, 0x00, 0x30,\n/* ';' 0x3B */ 0xC0, 0x00, 0x00, 0x64, 0xA0,\n/* '<' 0x3C */ 0x00, 0x81, 0xC7, 0x8E, 0x0C, 0x07, 0x80, 0x70, 0x0E, 0x01, 0x80,\n/* '=' 0x3D */ 0xFF, 0x80, 0x00, 0x1F, 0xF0,\n/* '>' 0x3E */ 0xE0, 0x1C, 0x03, 0x80, 0x30, 0x70, 0xE3, 0x81, 0x00,\n/* '?' 0x3F */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x18, 0x38, 0x18, 0x18, 0x0C, 0x00, 0x00, 0x01, 0x80,\n/* '@' 0x40 */ 0x03, 0xF0, 0x06, 0x0E, 0x06, 0x01, 0x86, 0x00, 0x66, 0x1D, 0xBB, 0x31, 0xCF, 0x18, 0xC7, 0x98, 0x63, 0xCC, 0x31, 0xE6, 0x11, 0xB3, 0x99, 0xCC, 0xF7, 0x86, 0x00, 0x01, 0x80, 0x00, 0x70, 0x40, 0x0F, 0xE0,\n/* 'A' 0x41 */ 0x06, 0x00, 0xF0, 0x0F, 0x00, 0x90, 0x19, 0x81, 0x98, 0x10, 0x83, 0x0C, 0x3F, 0xC2, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30,\n/* 'B' 0x42 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x3F, 0xC6, 0x06, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8,\n/* 'C' 0x43 */ 0x1F, 0x86, 0x19, 0x81, 0xA0, 0x3C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0,\n/* 'D' 0x44 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x03, 0x60, 0xCF, 0xF0,\n/* 'E' 0x45 */ 0xFF, 0xE0, 0x30, 0x18, 0x0C, 0x06, 0x03, 0xFD, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0F, 0xF8,\n/* 'F' 0x46 */ 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFE, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 'G' 0x47 */ 0x0F, 0x83, 0x0E, 0x60, 0x66, 0x03, 0xC0, 0x0C, 0x00, 0xC1, 0xFC, 0x03, 0xC0, 0x36, 0x03, 0x60, 0x73, 0x0F, 0x0F, 0x10,\n/* 'H' 0x48 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xFF, 0xFE, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'J' 0x4A */ 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x07, 0x8F, 0x1E, 0x27, 0x80,\n/* 'K' 0x4B */ 0xC0, 0xF0, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0x98, 0xC3, 0x30, 0xCC, 0x1B, 0x03, 0xC0, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF,\n/* 'M' 0x4D */ 0xE0, 0x3F, 0x01, 0xFC, 0x1F, 0xE0, 0xFD, 0x05, 0xEC, 0x6F, 0x63, 0x79, 0x13, 0xCD, 0x9E, 0x6C, 0xF1, 0x47, 0x8E, 0x3C, 0x71, 0x80,\n/* 'N' 0x4E */ 0xE0, 0x7C, 0x0F, 0xC1, 0xE8, 0x3D, 0x87, 0x98, 0xF1, 0x1E, 0x33, 0xC3, 0x78, 0x6F, 0x07, 0xE0, 0x7C, 0x0E,\n/* 'O' 0x4F */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x0C, 0x60, 0xC0, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x6F, 0xF3, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00,\n/* 'Q' 0x51 */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x6C, 0x60, 0xC0, 0xFB, 0x00, 0x08,\n/* 'R' 0x52 */ 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x70,\n/* 'S' 0x53 */ 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00,\n/* 'T' 0x54 */ 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0,\n/* 'U' 0x55 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xB0, 0x61, 0xF0,\n/* 'V' 0x56 */ 0xC0, 0x6C, 0x0D, 0x81, 0x10, 0x63, 0x0C, 0x61, 0x04, 0x60, 0xCC, 0x19, 0x01, 0x60, 0x3C, 0x07, 0x00, 0x60,\n/* 'W' 0x57 */ 0xC1, 0x81, 0x61, 0xC3, 0x61, 0xC3, 0x61, 0x43, 0x62, 0x62, 0x22, 0x66, 0x32, 0x26, 0x36, 0x26, 0x14, 0x34, 0x14, 0x34, 0x1C, 0x1C, 0x18, 0x1C, 0x08, 0x18,\n/* 'X' 0x58 */ 0xC0, 0xD8, 0x66, 0x18, 0xCC, 0x1E, 0x07, 0x00, 0xC0, 0x78, 0x32, 0x0C, 0xC6, 0x1B, 0x07, 0xC0, 0xC0,\n/* 'Y' 0x59 */ 0xC0, 0x36, 0x06, 0x30, 0xC3, 0x0C, 0x19, 0x81, 0xD8, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xC0, 0x60, 0x30, 0x0C, 0x06, 0x03, 0x01, 0xC0, 0x60, 0x30, 0x18, 0x06, 0x03, 0x00, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB6, 0xE0,\n/* '\\' 0x5C */ 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x80,\n/* ']' 0x5D */ 0xED, 0xB6, 0xDB, 0x6D, 0xB6, 0xDB, 0xE0,\n/* '^' 0x5E */ 0x30, 0x60, 0xA2, 0x44, 0xD8, 0xA1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xC0,\n/* '`' 0x60 */ 0xC6, 0x30,\n/* 'a' 0x61 */ 0x7E, 0x71, 0xB0, 0xC0, 0x60, 0xF3, 0xDB, 0x0D, 0x86, 0xC7, 0x3D, 0xC0,\n/* 'b' 0x62 */ 0xC0, 0x60, 0x30, 0x1B, 0xCE, 0x36, 0x0F, 0x07, 0x83, 0xC1, 0xE0, 0xF0, 0x7C, 0x6D, 0xE0,\n/* 'c' 0x63 */ 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'd' 0x64 */ 0x03, 0x03, 0x03, 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B,\n/* 'e' 0x65 */ 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'f' 0x66 */ 0x36, 0x6F, 0x66, 0x66, 0x66, 0x66, 0x60,\n/* 'g' 0x67 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC6, 0x7C,\n/* 'h' 0x68 */ 0xC0, 0xC0, 0xC0, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'i' 0x69 */ 0xC3, 0xFF, 0xFF, 0xC0,\n/* 'j' 0x6A */ 0x30, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0xC0, 0xC0, 0xC2, 0xC4, 0xCC, 0xD8, 0xF8, 0xEC, 0xC4, 0xC6, 0xC3, 0xC3,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'm' 0x6D */ 0xDE, 0xF7, 0x1C, 0xF0, 0xC7, 0x86, 0x3C, 0x31, 0xE1, 0x8F, 0x0C, 0x78, 0x63, 0xC3, 0x1E, 0x18, 0xC0,\n/* 'n' 0x6E */ 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'o' 0x6F */ 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 'p' 0x70 */ 0xDE, 0x71, 0xB0, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x83, 0xE3, 0x6F, 0x30, 0x18, 0x0C, 0x00,\n/* 'q' 0x71 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0x03,\n/* 'r' 0x72 */ 0xDF, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x00,\n/* 's' 0x73 */ 0x3E, 0xE3, 0xC0, 0xC0, 0xE0, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 't' 0x74 */ 0x66, 0xF6, 0x66, 0x66, 0x66, 0x67,\n/* 'u' 0x75 */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 'v' 0x76 */ 0xC1, 0xA0, 0x98, 0xCC, 0x42, 0x21, 0xB0, 0xD0, 0x28, 0x1C, 0x0C, 0x00,\n/* 'w' 0x77 */ 0xC6, 0x1E, 0x38, 0x91, 0xC4, 0xCA, 0x66, 0xD3, 0x16, 0xD0, 0xA6, 0x87, 0x1C, 0x38, 0xC0, 0xC6, 0x00,\n/* 'x' 0x78 */ 0x87, 0x89, 0xB1, 0xC3, 0x07, 0x1E, 0x26, 0xC5, 0x0C,\n/* 'y' 0x79 */ 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 'z' 0x7A */ 0xFE, 0x0C, 0x30, 0xC1, 0x86, 0x18, 0x20, 0xC1, 0xFC,\n/* '{' 0x7B */ 0x36, 0x66, 0x66, 0x6E, 0xCE, 0x66, 0x66, 0x66, 0x30,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '}' 0x7D */ 0xC6, 0x66, 0x66, 0x67, 0x37, 0x66, 0x66, 0x66, 0xC0,\n/* '~' 0x7E */ 0x61, 0x24, 0x38,\n/* 0x7F */ 0xFF, 0xFC, 0x00, 0x63, 0xE3, 0x31, 0x99, 0x04, 0xC8, 0x66, 0x06, 0x30, 0x61, 0x83, 0x0C, 0x18, 0x60, 0x03, 0x06, 0x18, 0x00, 0xFF, 0xFC,\n/* 0x80 */ 0x07, 0xC6, 0x13, 0x00, 0xC0, 0x60, 0x3F, 0xE6, 0x03, 0xFC, 0x60, 0x0C, 0x03, 0x00, 0x61, 0x07, 0xC0,\n/* 0x81 */\n/* 0x82 */ 0xDC,\n/* 0x83 */\n/* 0x84 */ 0xDA, 0x76,\n/* 0x85 */ 0xCC, 0xC0,\n/* 0x86 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0x87 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18,\n/* 0x88 */\n/* 0x89 */ 0x70, 0x80, 0x22, 0x20, 0x08, 0x90, 0x02, 0x24, 0x00, 0x72, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x09, 0xC7, 0x84, 0x8B, 0x31, 0x22, 0x84, 0x88, 0xB3, 0x21, 0xC7, 0x80,\n/* 0x8A */ 0x1B, 0x03, 0x83, 0xF1, 0x86, 0xC0, 0xF0, 0x3C, 0x01, 0xE0, 0x1F, 0x00, 0xE0, 0x0F, 0x03, 0xC0, 0xD8, 0x63, 0xF0,\n/* 0x8B */ 0x69,\n/* 0x8C */ 0x06, 0x03, 0x03, 0xF1, 0x86, 0xC0, 0xF0, 0x3C, 0x01, 0xE0, 0x1F, 0x00, 0xE0, 0x0F, 0x03, 0xC0, 0xD8, 0x63, 0xF0,\n/* 0x8D */ 0x33, 0x0F, 0x3F, 0xE1, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x30,\n/* 0x8E */ 0x1B, 0x03, 0x8F, 0xFC, 0x06, 0x03, 0x00, 0xC0, 0x60, 0x30, 0x1C, 0x06, 0x03, 0x01, 0x80, 0x60, 0x30, 0x0F, 0xFC,\n/* 0x8F */ 0x0C, 0x06, 0x0F, 0xFC, 0x06, 0x03, 0x00, 0xC0, 0x60, 0x30, 0x1C, 0x06, 0x03, 0x01, 0x80, 0x60, 0x30, 0x0F, 0xFC,\n/* 0x90 */\n/* 0x91 */ 0x6B,\n/* 0x92 */ 0xD6,\n/* 0x93 */ 0x4C, 0xA5, 0xB0,\n/* 0x94 */ 0xDA, 0x53, 0x20,\n/* 0x95 */ 0x6F, 0xFF, 0x60,\n/* 0x96 */ 0xFE,\n/* 0x97 */ 0xFF, 0xFF,\n/* 0x98 */\n/* 0x99 */ 0xFC, 0xE1, 0xCC, 0x38, 0x73, 0x0E, 0x1C, 0xC3, 0x8F, 0x30, 0xD2, 0xCC, 0x34, 0xB3, 0x0D, 0x6C, 0xC3, 0x53, 0x30, 0xCC, 0xCC, 0x33, 0x30,\n/* 0x9A */ 0x24, 0x3C, 0x18, 0x7E, 0xE3, 0xC0, 0xC0, 0x60, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 0x9B */ 0x96,\n/* 0x9C */ 0x0C, 0x18, 0x10, 0x3E, 0xE3, 0xC0, 0xC0, 0xE0, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 0x9D */ 0x0D, 0xA7, 0x3C, 0x61, 0x86, 0x18, 0x61, 0x86, 0x18, 0x70,\n/* 0x9E */ 0x48, 0xF0, 0xC7, 0xF0, 0x61, 0x86, 0x0C, 0x30, 0xC1, 0x06, 0x0F, 0xE0,\n/* 0x9F */ 0x0C, 0x10, 0x47, 0xF0, 0x61, 0x86, 0x0C, 0x30, 0xC1, 0x06, 0x0F, 0xE0,\n/* 0xA0 */\n/* 0xA1 */ 0x8A, 0x9C,\n/* 0xA2 */ 0x85, 0xE0,\n/* 0xA3 */ 0x60, 0x30, 0x18, 0x0C, 0x86, 0xC3, 0xC1, 0xC1, 0xC0, 0xE0, 0x30, 0x18, 0x0C, 0x07, 0xF8,\n/* 0xA4 */ 0xFF, 0xDF, 0x1E, 0x3E, 0xFF, 0xC0,\n/* 0xA5 */ 0x06, 0x00, 0xF0, 0x0F, 0x01, 0x30, 0x13, 0x81, 0x38, 0x21, 0x82, 0x1C, 0x3F, 0xC6, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30, 0x06, 0x00, 0xC0, 0x0C, 0x00, 0x70,\n/* 0xA6 */ 0xFF, 0xFC, 0x0F, 0xFF, 0xC0,\n/* 0xA7 */ 0x0C, 0x09, 0x0C, 0xC6, 0x63, 0x81, 0xE3, 0x19, 0x87, 0xE1, 0xB8, 0xC6, 0x41, 0xC0, 0x73, 0x19, 0x8C, 0x66, 0x1E, 0x00,\n/* 0xA8 */ 0xCC,\n/* 0xA9 */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9B, 0xC6, 0xD9, 0x8F, 0x60, 0x3D, 0x00, 0xF4, 0x03, 0xD8, 0x0D, 0xE6, 0x67, 0xF3, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAA */ 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x02, 0x00, 0xE0, 0x18, 0x1C, 0x00,\n/* 0xAB */ 0x22, 0xCF, 0x26, 0x46, 0x64, 0x40,\n/* 0xAC */ 0xFF, 0x80, 0xC0, 0x60, 0x30, 0x18,\n/* 0xAD */\n/* 0xAE */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9F, 0xE6, 0xD0, 0x8F, 0x42, 0x3D, 0xF0, 0xF4, 0x23, 0xD0, 0x8D, 0xC2, 0x67, 0x0B, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAF */ 0x0C, 0x00, 0x0F, 0xFC, 0x06, 0x03, 0x00, 0xC0, 0x60, 0x30, 0x1C, 0x06, 0x03, 0x01, 0x80, 0x60, 0x30, 0x0F, 0xFC,\n/* 0xB0 */ 0x74, 0x63, 0x17, 0x00,\n/* 0xB1 */ 0x0C, 0x06, 0x03, 0x07, 0xE0, 0xC0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x3F, 0xE0,\n/* 0xB2 */ 0x6C, 0xC7,\n/* 0xB3 */ 0x66, 0x66, 0x67, 0x6E, 0x66, 0x66, 0x60,\n/* 0xB4 */ 0x36, 0xC0,\n/* 0xB5 */ 0xC3, 0x61, 0xB0, 0xD8, 0x6C, 0x36, 0x1B, 0x0D, 0x86, 0xE7, 0x7D, 0xF0, 0x18, 0x0C, 0x00,\n/* 0xB6 */ 0x3F, 0x7E, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x72, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,\n/* 0xB7 */ 0xE0,\n/* 0xB8 */ 0x21, 0xC7, 0xE0,\n/* 0xB9 */ 0x7E, 0x38, 0xCC, 0x30, 0x0C, 0x0F, 0x1E, 0xCC, 0x33, 0x0C, 0xC7, 0x1E, 0xE0, 0x10, 0x0C, 0x03, 0x00, 0x70,\n/* 0xBA */ 0x3E, 0xE3, 0xC0, 0xC0, 0xE0, 0x3C, 0x07, 0xC3, 0xC3, 0x7E, 0x10, 0x1C, 0x0C, 0x38,\n/* 0xBB */ 0x89, 0x98, 0x99, 0x3C, 0xD1, 0x00,\n/* 0xBC */ 0xC6, 0xC4, 0xC8, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF,\n/* 0xBD */ 0x6F, 0x69, 0x00,\n/* 0xBE */ 0xDE, 0xB9, 0x8C, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x00,\n/* 0xBF */ 0x30, 0x03, 0xF8, 0x30, 0xC3, 0x06, 0x18, 0x60, 0x83, 0x07, 0xF0,\n/* 0xC0 */ 0x06, 0x00, 0xC0, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x70,\n/* 0xC1 */ 0x06, 0x03, 0x00, 0x00, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC2 */ 0x0C, 0x04, 0x80, 0x00, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC3 */ 0x21, 0x07, 0x80, 0x00, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC4 */ 0x33, 0x00, 0x00, 0xC0, 0x78, 0x1E, 0x04, 0x83, 0x30, 0xCC, 0x33, 0x1F, 0xE6, 0x19, 0x02, 0xC0, 0xF0, 0x30,\n/* 0xC5 */ 0x30, 0x60, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF,\n/* 0xC6 */ 0x06, 0x01, 0x80, 0x00, 0x0F, 0xC3, 0x0C, 0xC0, 0xD0, 0x1E, 0x00, 0xC0, 0x18, 0x03, 0x01, 0xA0, 0x36, 0x0C, 0x61, 0x87, 0xC0,\n/* 0xC7 */ 0x1F, 0x06, 0x19, 0x83, 0xA0, 0x3C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0xE1, 0xF0, 0x08, 0x01, 0xC0, 0x18, 0x0E, 0x00,\n/* 0xC8 */ 0x19, 0x81, 0xE0, 0x00, 0x0F, 0xC3, 0x0C, 0xC0, 0xF0, 0x1E, 0x00, 0xC0, 0x18, 0x03, 0x01, 0xA0, 0x36, 0x0C, 0x61, 0x87, 0xC0,\n/* 0xC9 */ 0x0C, 0x0C, 0x00, 0x1F, 0xFC, 0x06, 0x03, 0x01, 0x80, 0xFF, 0x60, 0x30, 0x18, 0x0C, 0x07, 0xFC,\n/* 0xCA */ 0xFF, 0xD8, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x3F, 0xF6, 0x00, 0xC0, 0x18, 0x03, 0x00, 0x60, 0x0F, 0xFC, 0x01, 0x80, 0x60, 0x0C, 0x00, 0xE0,\n/* 0xCB */ 0x33, 0x00, 0x3F, 0xF8, 0x0C, 0x06, 0x03, 0x01, 0xFE, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x07, 0xFC,\n/* 0xCC */ 0x33, 0x0F, 0x00, 0x1F, 0xFC, 0x06, 0x03, 0x01, 0x80, 0xFF, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0xFE,\n/* 0xCD */ 0x78, 0x36, 0xDB, 0x6D, 0xB6, 0xC0,\n/* 0xCE */ 0x76, 0xC0, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18,\n/* 0xCF */ 0x66, 0x0F, 0x00, 0x03, 0xF8, 0xC3, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xC1, 0xB0, 0xEF, 0xE0,\n/* 0xD0 */ 0x7F, 0x0C, 0x31, 0x83, 0x30, 0x36, 0x06, 0xC0, 0xFE, 0x1B, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x30, 0xE7, 0xF0,\n/* 0xD1 */ 0x03, 0x01, 0x83, 0x81, 0xF0, 0x3F, 0x07, 0xA0, 0xF6, 0x1E, 0x63, 0xC4, 0x78, 0xCF, 0x0D, 0xE1, 0xBC, 0x1F, 0x81, 0xC0,\n/* 0xD2 */ 0x19, 0x81, 0xE3, 0x81, 0xF0, 0x3F, 0x07, 0xA0, 0xF6, 0x1E, 0x63, 0xC4, 0x78, 0xCF, 0x0D, 0xE1, 0xBC, 0x1F, 0x81, 0xC0,\n/* 0xD3 */ 0x03, 0x00, 0x60, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD4 */ 0x0F, 0x01, 0x98, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD5 */ 0x0D, 0x81, 0xB0, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD6 */ 0x19, 0x81, 0x98, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD7 */ 0x83, 0x89, 0xA1, 0x83, 0x89, 0xA1, 0x80,\n/* 0xD8 */ 0x33, 0x01, 0xE0, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x70,\n/* 0xD9 */ 0x04, 0x01, 0x43, 0x11, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDA */ 0x06, 0x01, 0x83, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDB */ 0x0D, 0x83, 0x63, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDC */ 0x1B, 0x00, 0x03, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDD */ 0x03, 0x0C, 0x63, 0x60, 0x63, 0x0C, 0x30, 0xC1, 0x98, 0x1D, 0x80, 0xF0, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 0xDE */ 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x40, 0x3C, 0x06, 0x1E, 0x00,\n/* 0xDF */ 0x3C, 0x33, 0x30, 0xD8, 0x6C, 0x36, 0x33, 0x39, 0x86, 0xC1, 0xE0, 0xF0, 0x78, 0x6D, 0xE0,\n/* 0xE0 */ 0x19, 0x89, 0xBE, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x00,\n/* 0xE1 */ 0x0C, 0x04, 0x04, 0x0F, 0xCE, 0x36, 0x18, 0x0C, 0x1E, 0x7B, 0x61, 0xB0, 0xD8, 0xE7, 0xB8,\n/* 0xE2 */ 0x10, 0x14, 0x1B, 0x0F, 0xCE, 0x36, 0x18, 0x0C, 0x1E, 0x7B, 0x61, 0xB0, 0xD8, 0xE7, 0xB8,\n/* 0xE3 */ 0x66, 0x1E, 0x00, 0x0F, 0xCE, 0x36, 0x18, 0x0C, 0x1E, 0x7B, 0x61, 0xB0, 0xD8, 0xE7, 0xB8,\n/* 0xE4 */ 0x66, 0x00, 0x1F, 0x9C, 0x6C, 0x30, 0x18, 0x3C, 0xF6, 0xC3, 0x61, 0xB1, 0xCF, 0x70,\n/* 0xE5 */ 0x78, 0x36, 0xDB, 0x6D, 0xB6, 0xD8,\n/* 0xE6 */ 0x0C, 0x08, 0x10, 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xE7 */ 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C, 0x10, 0x1C, 0x0C, 0x38,\n/* 0xE8 */ 0x44, 0x28, 0x38, 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xE9 */ 0x0C, 0x08, 0x18, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xEA */ 0x3C, 0x62, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3E, 0x04, 0x0C, 0x0C, 0x06,\n/* 0xEB */ 0x66, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xEC */ 0x64, 0x2C, 0x18, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xED */ 0x7A, 0x6D, 0xB6, 0xDB, 0x6C,\n/* 0xEE */ 0x69, 0x06, 0x66, 0x66, 0x66, 0x66, 0x60,\n/* 0xEF */ 0x03, 0x30, 0x32, 0x03, 0x43, 0xB0, 0x67, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x06, 0x70, 0x3B, 0x00,\n/* 0xF0 */ 0x03, 0x07, 0xC0, 0xC7, 0x66, 0x76, 0x1B, 0x0D, 0x86, 0xC3, 0x61, 0xB0, 0xCC, 0xE3, 0xB0,\n/* 0xF1 */ 0x0C, 0x18, 0x00, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 0xF2 */ 0x66, 0x3C, 0x00, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 0xF3 */ 0x0C, 0x18, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF4 */ 0x18, 0x24, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF5 */ 0x36, 0x6C, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF6 */ 0x66, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF7 */ 0x18, 0x00, 0x00, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0x30,\n/* 0xF8 */ 0xDB, 0x81, 0xBE, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x00,\n/* 0xF9 */ 0x10, 0x28, 0x10, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFA */ 0x06, 0x0C, 0x18, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFB */ 0x36, 0x6C, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFC */ 0x66, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFD */ 0x06, 0x04, 0x08, 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 0xFE */ 0x63, 0x3C, 0xC6, 0x31, 0x8C, 0x63, 0x18, 0xE2, 0x1C, 0x6F,\n/* 0xFF */ 0xC0,\n};\n\nconst GFXglyph FreeSans9pt_Win1250Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   15,  15,  17,   1,  -13 },\n/* 0x02 */ {    29,   15,  15,  17,   1,  -13 },\n/* 0x03 */ {    58,   15,  16,  17,   1,  -14 },\n/* 0x04 */ {    88,   15,  16,  17,   1,  -14 },\n/* 0x05 */ {   118,   16,  15,  18,   1,  -13 },\n/* 0x06 */ {   148,   15,  15,  17,   1,  -13 },\n/* 0x07 */ {   177,    0,   0,   8,   0,    0 },\n/* 0x08 */ {   177,   17,  16,  19,   1,  -14 },\n/* 0x09 */ {   211,   17,  12,  19,   1,  -12 },\n/* 0x0A */ {   237,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   237,   17,  16,  19,   1,  -14 },\n/* 0x0C */ {   271,   15,  14,  17,   1,  -12 },\n/* 0x0D */ {   298,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   298,   15,  16,  17,   1,  -14 },\n/* 0x0F */ {   328,   15,  15,  17,   1,  -13 },\n/* 0x10 */ {   357,   15,  15,  17,   1,  -13 },\n/* 0x11 */ {   386,   15,  16,  17,   1,  -14 },\n/* 0x12 */ {   416,   17,  17,  19,   1,  -15 },\n/* 0x13 */ {   453,   15,  16,  17,   1,  -14 },\n/* 0x14 */ {   483,   15,  16,  17,   1,  -14 },\n/* 0x15 */ {   513,   15,  16,  17,   1,  -14 },\n/* 0x16 */ {   543,   11,  16,  13,   1,  -14 },\n/* 0x17 */ {   565,   15,  16,  17,   1,  -14 },\n/* 0x18 */ {   595,   18,  15,  20,   1,  -13 },\n/* 0x19 */ {   629,   15,  16,  17,   1,  -14 },\n/* 0x1A */ {   659,   13,  14,  15,   1,  -12 },\n/* 0x1B */ {   682,   17,  16,  19,   1,  -14 },\n/* 0x1C */ {   716,   15,  16,  17,   1,  -14 },\n/* 0x1D */ {   746,   15,  15,  17,   1,  -13 },\n/* 0x1E */ {   775,   17,  16,  19,   1,  -14 },\n/* 0x1F */ {   809,   11,  16,  13,   1,  -14 },\n/* ' ' 0x20 */ {   831,    0,   0,   5,   0,    0 },\n/* '!' 0x21 */ {   831,    2,  13,   6,   2,  -12 },\n/* '\"' 0x22 */ {   835,    5,   4,   6,   1,  -12 },\n/* '#' 0x23 */ {   838,   10,  12,  10,   0,  -11 },\n/* '$' 0x24 */ {   853,    9,  16,  10,   1,  -13 },\n/* '%' 0x25 */ {   871,   16,  13,  16,   1,  -12 },\n/* '&' 0x26 */ {   897,   10,  13,  12,   1,  -12 },\n/* ''' 0x27 */ {   914,    2,   4,   4,   1,  -12 },\n/* '(' 0x28 */ {   915,    4,  17,   6,   1,  -12 },\n/* ')' 0x29 */ {   924,    4,  17,   6,   1,  -12 },\n/* '*' 0x2A */ {   933,    5,   5,   7,   1,  -12 },\n/* '+' 0x2B */ {   937,    6,   8,  11,   3,   -7 },\n/* ',' 0x2C */ {   943,    2,   4,   5,   2,    0 },\n/* '-' 0x2D */ {   944,    4,   1,   6,   1,   -4 },\n/* '.' 0x2E */ {   945,    2,   1,   5,   1,    0 },\n/* '/' 0x2F */ {   946,    5,  13,   5,   0,  -12 },\n/* '0' 0x30 */ {   955,    8,  13,  10,   1,  -12 },\n/* '1' 0x31 */ {   968,    4,  13,  10,   3,  -12 },\n/* '2' 0x32 */ {   975,    9,  13,  10,   1,  -12 },\n/* '3' 0x33 */ {   990,    8,  13,  10,   1,  -12 },\n/* '4' 0x34 */ {  1003,    7,  13,  10,   2,  -12 },\n/* '5' 0x35 */ {  1015,    9,  13,  10,   1,  -12 },\n/* '6' 0x36 */ {  1030,    9,  13,  10,   1,  -12 },\n/* '7' 0x37 */ {  1045,    8,  13,  10,   0,  -12 },\n/* '8' 0x38 */ {  1058,    9,  13,  10,   1,  -12 },\n/* '9' 0x39 */ {  1073,    8,  13,  10,   1,  -12 },\n/* ':' 0x3A */ {  1086,    2,  10,   5,   1,   -9 },\n/* ';' 0x3B */ {  1089,    3,  12,   5,   1,   -8 },\n/* '<' 0x3C */ {  1094,    9,   9,  11,   1,   -8 },\n/* '=' 0x3D */ {  1105,    9,   4,  11,   1,   -5 },\n/* '>' 0x3E */ {  1110,    9,   8,  11,   1,   -7 },\n/* '?' 0x3F */ {  1119,    9,  13,  10,   1,  -12 },\n/* '@' 0x40 */ {  1134,   17,  16,  18,   1,  -12 },\n/* 'A' 0x41 */ {  1168,   12,  13,  12,   0,  -12 },\n/* 'B' 0x42 */ {  1188,   11,  13,  12,   1,  -12 },\n/* 'C' 0x43 */ {  1206,   11,  13,  13,   1,  -12 },\n/* 'D' 0x44 */ {  1224,   11,  13,  13,   1,  -12 },\n/* 'E' 0x45 */ {  1242,    9,  13,  11,   1,  -12 },\n/* 'F' 0x46 */ {  1257,    8,  13,  11,   1,  -12 },\n/* 'G' 0x47 */ {  1270,   12,  13,  14,   1,  -12 },\n/* 'H' 0x48 */ {  1290,   11,  13,  13,   1,  -12 },\n/* 'I' 0x49 */ {  1308,    2,  13,   5,   2,  -12 },\n/* 'J' 0x4A */ {  1312,    7,  13,  10,   1,  -12 },\n/* 'K' 0x4B */ {  1324,   10,  13,  12,   1,  -12 },\n/* 'L' 0x4C */ {  1341,    8,  13,  10,   1,  -12 },\n/* 'M' 0x4D */ {  1354,   13,  13,  15,   1,  -12 },\n/* 'N' 0x4E */ {  1376,   11,  13,  13,   1,  -12 },\n/* 'O' 0x4F */ {  1394,   13,  13,  14,   1,  -12 },\n/* 'P' 0x50 */ {  1416,   10,  13,  12,   1,  -12 },\n/* 'Q' 0x51 */ {  1433,   13,  14,  14,   1,  -12 },\n/* 'R' 0x52 */ {  1456,   12,  13,  13,   1,  -12 },\n/* 'S' 0x53 */ {  1476,   10,  13,  12,   1,  -12 },\n/* 'T' 0x54 */ {  1493,    9,  13,  11,   1,  -12 },\n/* 'U' 0x55 */ {  1508,   11,  13,  13,   1,  -12 },\n/* 'V' 0x56 */ {  1526,   11,  13,  11,   0,  -12 },\n/* 'W' 0x57 */ {  1544,   16,  13,  17,   0,  -12 },\n/* 'X' 0x58 */ {  1570,   10,  13,  12,   1,  -12 },\n/* 'Y' 0x59 */ {  1587,   12,  13,  12,   0,  -12 },\n/* 'Z' 0x5A */ {  1607,   10,  13,  11,   1,  -12 },\n/* '[' 0x5B */ {  1624,    3,  17,   5,   1,  -12 },\n/* '\\' 0x5C */ {  1631,    5,  13,   5,   0,  -12 },\n/* ']' 0x5D */ {  1640,    3,  17,   5,   0,  -12 },\n/* '^' 0x5E */ {  1647,    7,   7,   8,   1,  -12 },\n/* '_' 0x5F */ {  1654,   10,   1,  10,   0,    3 },\n/* '`' 0x60 */ {  1656,    4,   3,   5,   0,  -12 },\n/* 'a' 0x61 */ {  1658,    9,  10,  10,   1,   -9 },\n/* 'b' 0x62 */ {  1670,    9,  13,  10,   1,  -12 },\n/* 'c' 0x63 */ {  1685,    8,  10,   9,   1,   -9 },\n/* 'd' 0x64 */ {  1695,    8,  13,  10,   1,  -12 },\n/* 'e' 0x65 */ {  1708,    8,  10,  10,   1,   -9 },\n/* 'f' 0x66 */ {  1718,    4,  13,   5,   1,  -12 },\n/* 'g' 0x67 */ {  1725,    8,  14,  10,   1,   -9 },\n/* 'h' 0x68 */ {  1739,    8,  13,  10,   1,  -12 },\n/* 'i' 0x69 */ {  1752,    2,  13,   4,   1,  -12 },\n/* 'j' 0x6A */ {  1756,    4,  17,   4,   0,  -12 },\n/* 'k' 0x6B */ {  1765,    8,  13,   9,   1,  -12 },\n/* 'l' 0x6C */ {  1778,    2,  13,   4,   1,  -12 },\n/* 'm' 0x6D */ {  1782,   13,  10,  15,   1,   -9 },\n/* 'n' 0x6E */ {  1799,    8,  10,  10,   1,   -9 },\n/* 'o' 0x6F */ {  1809,    8,  10,  10,   1,   -9 },\n/* 'p' 0x70 */ {  1819,    9,  13,  10,   1,   -9 },\n/* 'q' 0x71 */ {  1834,    8,  13,  10,   1,   -9 },\n/* 'r' 0x72 */ {  1847,    5,  10,   6,   1,   -9 },\n/* 's' 0x73 */ {  1854,    8,  10,   9,   1,   -9 },\n/* 't' 0x74 */ {  1864,    4,  12,   5,   1,  -11 },\n/* 'u' 0x75 */ {  1870,    8,  10,  10,   1,   -9 },\n/* 'v' 0x76 */ {  1880,    9,  10,   9,   0,   -9 },\n/* 'w' 0x77 */ {  1892,   13,  10,  13,   0,   -9 },\n/* 'x' 0x78 */ {  1909,    7,  10,   9,   1,   -9 },\n/* 'y' 0x79 */ {  1918,    8,  14,   9,   0,   -9 },\n/* 'z' 0x7A */ {  1932,    7,  10,   9,   1,   -9 },\n/* '{' 0x7B */ {  1941,    4,  17,   6,   1,  -12 },\n/* '|' 0x7C */ {  1950,    2,  17,   4,   2,  -12 },\n/* '}' 0x7D */ {  1955,    4,  17,   6,   1,  -12 },\n/* '~' 0x7E */ {  1964,    7,   3,   9,   1,   -7 },\n/* 0x7F */ {  1967,   13,  14,  15,   1,  -12 },\n/* 0x80 */ {  1990,   10,  13,  12,   1,  -12 },\n/* 0x81 */ {  2007,    0,   0,   0,   0,    0 },\n/* 0x82 */ {  2007,    2,   3,   5,   1,    0 },\n/* 0x83 */ {  2008,    0,   0,   0,   0,    0 },\n/* 0x84 */ {  2008,    5,   3,   7,   1,    0 },\n/* 0x85 */ {  2010,   10,   1,  12,   1,    0 },\n/* 0x86 */ {  2012,    8,  16,  10,   1,  -12 },\n/* 0x87 */ {  2028,    8,  16,  10,   1,  -12 },\n/* 0x88 */ {  2044,    0,   0,   0,   0,    0 },\n/* 0x89 */ {  2044,   18,  13,  18,   0,  -12 },\n/* 0x8A */ {  2074,   10,  15,  12,   1,  -14 },\n/* 0x8B */ {  2093,    2,   4,   4,   1,   -6 },\n/* 0x8C */ {  2094,   10,  15,  12,   1,  -14 },\n/* 0x8D */ {  2113,    9,  15,  11,   1,  -14 },\n/* 0x8E */ {  2130,   10,  15,  11,   1,  -14 },\n/* 0x8F */ {  2149,   10,  15,  11,   1,  -14 },\n/* 0x90 */ {  2168,    0,   0,   0,   0,    0 },\n/* 0x91 */ {  2168,    2,   4,   4,   2,  -12 },\n/* 0x92 */ {  2169,    2,   4,   4,   1,  -12 },\n/* 0x93 */ {  2170,    5,   4,   7,   2,  -12 },\n/* 0x94 */ {  2173,    5,   4,   7,   1,  -12 },\n/* 0x95 */ {  2176,    4,   5,   7,   1,   -8 },\n/* 0x96 */ {  2179,    7,   1,   9,   1,   -4 },\n/* 0x97 */ {  2180,   16,   1,  18,   1,   -4 },\n/* 0x98 */ {  2182,    0,   0,   0,   0,    0 },\n/* 0x99 */ {  2182,   18,  10,  18,   1,  -13 },\n/* 0x9A */ {  2205,    8,  13,   9,   1,  -12 },\n/* 0x9B */ {  2218,    2,   4,   5,   2,   -6 },\n/* 0x9C */ {  2219,    8,  13,   9,   1,  -12 },\n/* 0x9D */ {  2232,    6,  13,   8,   1,  -12 },\n/* 0x9E */ {  2242,    7,  13,   9,   1,  -12 },\n/* 0x9F */ {  2254,    7,  13,   9,   1,  -12 },\n/* 0xA0 */ {  2266,    0,   0,   5,   0,    0 },\n/* 0xA1 */ {  2266,    5,   3,   6,   0,  -12 },\n/* 0xA2 */ {  2268,    6,   2,   6,   0,  -12 },\n/* 0xA3 */ {  2270,    9,  13,  11,   1,  -12 },\n/* 0xA4 */ {  2285,    7,   6,  10,   2,   -8 },\n/* 0xA5 */ {  2291,   12,  17,  12,   1,  -12 },\n/* 0xA6 */ {  2317,    2,  17,   5,   2,  -12 },\n/* 0xA7 */ {  2322,    9,  17,  10,   1,  -12 },\n/* 0xA8 */ {  2342,    6,   1,   6,   0,  -11 },\n/* 0xA9 */ {  2343,   14,  13,  14,   1,  -12 },\n/* 0xAA */ {  2366,   10,  17,  12,   1,  -12 },\n/* 0xAB */ {  2388,    7,   6,   9,   1,   -7 },\n/* 0xAC */ {  2394,    9,   5,  11,   2,   -5 },\n/* 0xAD */ {  2400,    0,   0,   0,   0,    0 },\n/* 0xAE */ {  2400,   14,  13,  14,   1,  -12 },\n/* 0xAF */ {  2423,   10,  15,  11,   1,  -14 },\n/* 0xB0 */ {  2442,    5,   5,  11,   3,  -11 },\n/* 0xB1 */ {  2446,    9,  11,  11,   1,  -10 },\n/* 0xB2 */ {  2459,    4,   4,   6,   1,    1 },\n/* 0xB3 */ {  2461,    4,  13,   5,   1,  -12 },\n/* 0xB4 */ {  2468,    4,   3,   6,   2,  -12 },\n/* 0xB5 */ {  2470,    9,  13,  10,   1,   -9 },\n/* 0xB6 */ {  2485,    8,  16,  10,   2,  -12 },\n/* 0xB7 */ {  2501,    3,   1,   5,   1,   -4 },\n/* 0xB8 */ {  2502,    5,   4,   6,   1,    1 },\n/* 0xB9 */ {  2505,   10,  14,  10,   1,   -9 },\n/* 0xBA */ {  2523,    8,  14,   9,   1,   -9 },\n/* 0xBB */ {  2537,    7,   6,   9,   1,   -7 },\n/* 0xBC */ {  2543,    8,  13,  10,   1,  -12 },\n/* 0xBD */ {  2556,    6,   3,   6,   0,  -12 },\n/* 0xBE */ {  2559,    5,  13,   7,   1,  -12 },\n/* 0xBF */ {  2568,    7,  12,   9,   1,  -11 },\n/* 0xC0 */ {  2579,   12,  15,  13,   1,  -14 },\n/* 0xC1 */ {  2602,   10,  14,  12,   1,  -13 },\n/* 0xC2 */ {  2620,   10,  14,  12,   1,  -13 },\n/* 0xC3 */ {  2638,   10,  14,  12,   1,  -13 },\n/* 0xC4 */ {  2656,   10,  14,  12,   1,  -13 },\n/* 0xC5 */ {  2674,    8,  14,  10,   1,  -13 },\n/* 0xC6 */ {  2688,   11,  15,  13,   1,  -14 },\n/* 0xC7 */ {  2709,   11,  17,  13,   1,  -12 },\n/* 0xC8 */ {  2733,   11,  15,  13,   1,  -14 },\n/* 0xC9 */ {  2754,    9,  14,  11,   1,  -13 },\n/* 0xCA */ {  2770,   11,  17,  12,   1,  -12 },\n/* 0xCB */ {  2794,    9,  14,  11,   1,  -13 },\n/* 0xCC */ {  2810,    9,  15,  11,   1,  -14 },\n/* 0xCD */ {  2827,    3,  14,   5,   1,  -13 },\n/* 0xCE */ {  2833,    5,  14,   5,   0,  -13 },\n/* 0xCF */ {  2842,   10,  15,  13,   2,  -14 },\n/* 0xD0 */ {  2861,   11,  13,  13,   1,  -12 },\n/* 0xD1 */ {  2879,   11,  14,  13,   1,  -13 },\n/* 0xD2 */ {  2899,   11,  14,  13,   1,  -13 },\n/* 0xD3 */ {  2919,   12,  15,  13,   1,  -14 },\n/* 0xD4 */ {  2942,   12,  15,  13,   1,  -14 },\n/* 0xD5 */ {  2965,   12,  15,  13,   1,  -14 },\n/* 0xD6 */ {  2988,   12,  15,  13,   1,  -14 },\n/* 0xD7 */ {  3011,    7,   7,  11,   2,   -7 },\n/* 0xD8 */ {  3018,   12,  15,  13,   1,  -14 },\n/* 0xD9 */ {  3041,   11,  14,  13,   1,  -13 },\n/* 0xDA */ {  3061,   11,  14,  13,   1,  -13 },\n/* 0xDB */ {  3081,   11,  14,  13,   1,  -13 },\n/* 0xDC */ {  3101,   11,  14,  13,   1,  -13 },\n/* 0xDD */ {  3121,   12,  14,  12,   0,  -13 },\n/* 0xDE */ {  3142,    9,  17,  11,   1,  -12 },\n/* 0xDF */ {  3162,    9,  13,  11,   1,  -12 },\n/* 0xE0 */ {  3177,    5,  13,   6,   1,  -12 },\n/* 0xE1 */ {  3186,    9,  13,  10,   1,  -12 },\n/* 0xE2 */ {  3201,    9,  13,  10,   1,  -12 },\n/* 0xE3 */ {  3216,    9,  13,  10,   1,  -12 },\n/* 0xE4 */ {  3231,    9,  12,  10,   1,  -11 },\n/* 0xE5 */ {  3245,    3,  15,   4,   0,  -14 },\n/* 0xE6 */ {  3251,    8,  13,   9,   1,  -12 },\n/* 0xE7 */ {  3264,    8,  14,   9,   1,   -9 },\n/* 0xE8 */ {  3278,    8,  13,   9,   1,  -12 },\n/* 0xE9 */ {  3291,    8,  13,  10,   1,  -12 },\n/* 0xEA */ {  3304,    8,  14,  10,   1,   -9 },\n/* 0xEB */ {  3318,    8,  12,  10,   1,  -11 },\n/* 0xEC */ {  3330,    8,  13,  10,   1,  -12 },\n/* 0xED */ {  3343,    3,  13,   4,   1,  -12 },\n/* 0xEE */ {  3348,    4,  13,   5,   0,  -12 },\n/* 0xEF */ {  3355,   12,  13,  12,   1,  -12 },\n/* 0xF0 */ {  3375,    9,  13,  10,   1,  -12 },\n/* 0xF1 */ {  3390,    8,  13,  10,   1,  -12 },\n/* 0xF2 */ {  3403,    8,  13,  10,   1,  -12 },\n/* 0xF3 */ {  3416,    8,  13,  10,   1,  -12 },\n/* 0xF4 */ {  3429,    8,  13,  10,   1,  -12 },\n/* 0xF5 */ {  3442,    8,  13,  10,   1,  -12 },\n/* 0xF6 */ {  3455,    8,  12,  10,   1,  -11 },\n/* 0xF7 */ {  3467,    9,   8,  11,   1,   -7 },\n/* 0xF8 */ {  3476,    5,  13,   6,   1,  -12 },\n/* 0xF9 */ {  3485,    8,  13,  10,   1,  -12 },\n/* 0xFA */ {  3498,    8,  13,  10,   1,  -12 },\n/* 0xFB */ {  3511,    8,  13,  10,   1,  -12 },\n/* 0xFC */ {  3524,    8,  12,  10,   1,  -11 },\n/* 0xFD */ {  3536,    8,  17,   9,   0,  -12 },\n/* 0xFE */ {  3553,    5,  16,   5,   1,  -11 },\n/* 0xFF */ {  3563,    2,   1,   6,   2,  -11 },\n};\n\nconst GFXfont FreeSans9pt_Win1250 PROGMEM = {\n(uint8_t*)FreeSans9pt_Win1250Bitmaps,\n(GFXglyph*)FreeSans9pt_Win1250Glyphs,\n0x01, 0xFF, 21\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans9pt_Win1251.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans9pt_Win1251\n*/\nconst uint8_t FreeSans9pt_Win1251Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x07, 0x00, 0x0A, 0x00, 0x24, 0x00, 0x48, 0x01, 0x10, 0x04, 0x40, 0x10, 0xFF, 0x20, 0x02, 0x81, 0xFD, 0x00, 0x06, 0x07, 0xF4, 0x08, 0x24, 0x0F, 0x88, 0x11, 0x0F, 0xDC, 0x00,\n/* 0x02 */ 0x3F, 0x70, 0x81, 0x11, 0x03, 0xE4, 0x08, 0x28, 0x1F, 0xD0, 0x00, 0x60, 0x7F, 0x20, 0x02, 0x43, 0xFC, 0x44, 0x00, 0x44, 0x00, 0x48, 0x00, 0x90, 0x00, 0xA0, 0x01, 0xC0, 0x00,\n/* 0x03 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x8C, 0x63, 0x18, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x20, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x04 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x30, 0x88, 0x62, 0x08, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x05 */ 0x0B, 0x10, 0x14, 0xA8, 0x12, 0x50, 0x29, 0x42, 0x24, 0xA5, 0x32, 0x95, 0x5A, 0x09, 0x48, 0x09, 0x24, 0x01, 0x10, 0x01, 0x48, 0x02, 0xA4, 0x02, 0x42, 0x04, 0x01, 0x98, 0x00, 0x60,\n/* 0x06 */ 0x00, 0x80, 0x22, 0x80, 0x65, 0x00, 0xBE, 0xE1, 0x82, 0x4E, 0x03, 0x24, 0x04, 0x28, 0x06, 0x30, 0x12, 0x20, 0x3C, 0xA0, 0xC3, 0xFE, 0x80, 0x4D, 0x00, 0xA6, 0x01, 0x80, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x02, 0x00, 0x03, 0x01, 0x00, 0x09, 0x88, 0x0C, 0x0C,\n/* 0x09 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x00,\n/* 0x0A */\n/* 0x0B */ 0x1C, 0x1C, 0x31, 0xB1, 0x90, 0x50, 0x50, 0x10, 0x18, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x02, 0x80, 0x02, 0x40, 0x01, 0x10, 0x01, 0x04, 0x01, 0x01, 0x01, 0x00, 0x41, 0x00, 0x11, 0x00, 0x07, 0x00, 0x01, 0x00,\n/* 0x0C */ 0x06, 0x00, 0x0A, 0x00, 0x12, 0x00, 0x32, 0x01, 0x84, 0x04, 0x10, 0x08, 0x98, 0x1C, 0x18, 0x40, 0x48, 0x82, 0x11, 0xF0, 0x74, 0x02, 0x18, 0x70, 0x2F, 0x9F, 0x80,\n/* 0x0D */\n/* 0x0E */ 0x01, 0x00, 0x05, 0x00, 0x0A, 0x00, 0x3E, 0x00, 0x82, 0x02, 0x82, 0x06, 0x04, 0x10, 0x04, 0x20, 0x08, 0x40, 0x10, 0xFF, 0x22, 0x00, 0x29, 0xFF, 0x3F, 0x8F, 0xDF, 0x9F, 0x01, 0xC0,\n/* 0x0F */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x36, 0x03, 0x60, 0x00, 0xCC, 0x19, 0xA4, 0x4B, 0x00, 0x06, 0x8E, 0x2B, 0x22, 0x66, 0x7C, 0xCC, 0x71, 0x98, 0x03, 0x00,\n/* 0x10 */ 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x1E, 0x00, 0x54, 0x00, 0xA8, 0x01, 0x50, 0x02, 0xA0, 0x05, 0x20, 0x32, 0x61, 0xC4, 0x74, 0x49, 0x10, 0x6C, 0x00, 0xD8, 0x01, 0x10, 0x00,\n/* 0x11 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x40, 0x29, 0x00, 0x31, 0x84, 0x63, 0x18, 0xC0, 0x00, 0x80, 0x15, 0x03, 0x7E, 0x02, 0xFA, 0x04, 0xE4, 0x18, 0x84, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x12 */ 0x02, 0x08, 0x01, 0x08, 0x40, 0x10, 0xC0, 0x08, 0xC0, 0x60, 0x80, 0x28, 0x04, 0x12, 0x4C, 0x10, 0x80, 0x08, 0x23, 0x0E, 0x08, 0xC4, 0x82, 0x04, 0x20, 0x83, 0x09, 0x82, 0x47, 0x01, 0x1C, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x00,\n/* 0x13 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x08, 0x65, 0x28, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x14 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x22, 0x29, 0x83, 0x30, 0x00, 0x65, 0x14, 0xD3, 0x4D, 0xBA, 0xEB, 0x38, 0xE6, 0x00, 0x0A, 0x00, 0x24, 0x38, 0x44, 0x01, 0x07, 0x1C, 0x01, 0xC0,\n/* 0x15 */ 0x07, 0xC0, 0x30, 0x18, 0x80, 0x32, 0x00, 0xF8, 0x01, 0xF1, 0x09, 0xA5, 0x28, 0x40, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x16 */ 0x0C, 0x00, 0xC0, 0x1C, 0x03, 0x80, 0xF8, 0xBB, 0x36, 0xC7, 0x99, 0xF3, 0xFE, 0x3F, 0xC3, 0xF0, 0x7E, 0x0E, 0xC1, 0x8E, 0xE0, 0x20,\n/* 0x17 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x10, 0x01, 0x20, 0x1D, 0x44, 0x42, 0x84, 0x85, 0x00, 0x86, 0x00, 0xC4, 0x00, 0x44, 0x7C, 0x44, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x18 */ 0x01, 0xE0, 0x00, 0x84, 0x00, 0x40, 0x80, 0x20, 0x10, 0x08, 0x24, 0x02, 0x41, 0x00, 0x86, 0x03, 0x12, 0x03, 0xB4, 0x03, 0x52, 0x81, 0x23, 0x80, 0x70, 0xA0, 0x14, 0x28, 0x05, 0x0A, 0x01, 0x42, 0x80, 0x50,\n/* 0x19 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x33, 0x18, 0x60, 0x00, 0xDC, 0xE1, 0xB9, 0xC3, 0x7B, 0xC6, 0x63, 0x0A, 0x00, 0x24, 0xF0, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1A */ 0xFF, 0xFC, 0x00, 0x63, 0xE3, 0x31, 0x99, 0x04, 0xC8, 0x66, 0x06, 0x30, 0x61, 0x82, 0x0C, 0x10, 0x60, 0x03, 0x04, 0x18, 0x00, 0xFF, 0xFC,\n/* 0x1B */ 0x07, 0xF0, 0x06, 0x0C, 0x04, 0x01, 0x04, 0x00, 0x44, 0x22, 0x12, 0x2A, 0x89, 0x00, 0x04, 0x80, 0x02, 0x44, 0x11, 0x01, 0xF0, 0x04, 0x01, 0x0D, 0x01, 0x6A, 0x41, 0x2C, 0x00, 0x05, 0xC0, 0x0E, 0x18, 0x18,\n/* 0x1C */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0xC0, 0x2A, 0x00, 0x33, 0x00, 0x66, 0x00, 0xCC, 0x39, 0x80, 0x83, 0x00, 0x06, 0x00, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1D */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x70, 0x28, 0x00, 0x31, 0x80, 0x63, 0x18, 0xC0, 0x31, 0x80, 0x03, 0x00, 0x06, 0x60, 0x0D, 0x33, 0x12, 0x10, 0x48, 0x21, 0x23, 0x8C, 0x00,\n/* 0x1E */ 0x03, 0x00, 0x07, 0x9E, 0x07, 0x00, 0x86, 0x00, 0x27, 0xC0, 0x0F, 0xC0, 0x07, 0x8C, 0x62, 0x06, 0x31, 0x20, 0x00, 0x90, 0x00, 0x48, 0x00, 0x24, 0x3E, 0x11, 0x00, 0x10, 0x40, 0x10, 0x18, 0x30, 0x03, 0xE0,\n/* 0x1F */ 0x18, 0x02, 0x80, 0x4C, 0x16, 0x41, 0x24, 0x3C, 0x88, 0x6E, 0x65, 0xF2, 0x78, 0x46, 0x88, 0xCF, 0x18, 0x02, 0x80, 0x8C, 0x60, 0x70,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xF0, 0xC0,\n/* '\"' 0x22 */ 0xDE, 0xF7, 0x20,\n/* '#' 0x23 */ 0x09, 0x86, 0x41, 0x91, 0xFF, 0x13, 0x04, 0xC3, 0x20, 0xC8, 0xFF, 0x89, 0x82, 0x61, 0x90,\n/* '$' 0x24 */ 0x10, 0x1F, 0x14, 0xDA, 0x3D, 0x1E, 0x83, 0x40, 0x78, 0x17, 0x08, 0xF4, 0x7A, 0x35, 0x33, 0xF0, 0x40, 0x20,\n/* '%' 0x25 */ 0x38, 0x10, 0xEC, 0x20, 0xC6, 0x20, 0xC6, 0x40, 0xC6, 0x40, 0x6C, 0x80, 0x39, 0x00, 0x01, 0x3C, 0x02, 0x77, 0x02, 0x63, 0x04, 0x63, 0x04, 0x77, 0x08, 0x3C,\n/* '&' 0x26 */ 0x0E, 0x0C, 0xC3, 0x30, 0xCC, 0x1E, 0x03, 0x03, 0xC1, 0x9B, 0xC2, 0xF0, 0xEC, 0x19, 0x8F, 0x3C, 0x40,\n/* ''' 0x27 */ 0xFE,\n/* '(' 0x28 */ 0x13, 0x26, 0x6C, 0xCC, 0xCC, 0xC4, 0x66, 0x23, 0x10,\n/* ')' 0x29 */ 0x8C, 0x46, 0x63, 0x33, 0x33, 0x32, 0x66, 0x4C, 0x80,\n/* '*' 0x2A */ 0x25, 0x7E, 0xA5, 0x00,\n/* '+' 0x2B */ 0x30, 0xC3, 0x3F, 0x30, 0xC3, 0x0C,\n/* ',' 0x2C */ 0xD6,\n/* '-' 0x2D */ 0xF0,\n/* '.' 0x2E */ 0xC0,\n/* '/' 0x2F */ 0x08, 0x44, 0x21, 0x10, 0x84, 0x42, 0x11, 0x08, 0x00,\n/* '0' 0x30 */ 0x3C, 0x66, 0x42, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x42, 0x66, 0x3C,\n/* '1' 0x31 */ 0x11, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x30,\n/* '2' 0x32 */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x10, 0x08, 0x07, 0xF8,\n/* '3' 0x33 */ 0x3C, 0x66, 0xC3, 0xC3, 0x03, 0x06, 0x1C, 0x07, 0x03, 0xC3, 0xC3, 0x66, 0x3C,\n/* '4' 0x34 */ 0x0C, 0x18, 0x71, 0x62, 0xC9, 0xA3, 0x46, 0xFE, 0x18, 0x30, 0x60, 0xC0,\n/* '5' 0x35 */ 0x7F, 0x20, 0x10, 0x08, 0x08, 0x07, 0xF3, 0x8C, 0x03, 0x01, 0x80, 0xF0, 0x6C, 0x63, 0xE0,\n/* '6' 0x36 */ 0x1E, 0x31, 0x98, 0x78, 0x0C, 0x06, 0xF3, 0x8D, 0x83, 0xC1, 0xE0, 0xD0, 0x6C, 0x63, 0xE0,\n/* '7' 0x37 */ 0xFF, 0x03, 0x02, 0x06, 0x04, 0x0C, 0x08, 0x18, 0x18, 0x18, 0x10, 0x30, 0x30,\n/* '8' 0x38 */ 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1B, 0x18, 0xF8, 0xC6, 0xC1, 0xE0, 0xF0, 0x6C, 0x63, 0xE0,\n/* '9' 0x39 */ 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC2, 0x66, 0x3C,\n/* ':' 0x3A */ 0xC0, 0x00, 0x30,\n/* ';' 0x3B */ 0xC0, 0x00, 0x00, 0x64, 0xA0,\n/* '<' 0x3C */ 0x00, 0x81, 0xC7, 0x8E, 0x0C, 0x07, 0x80, 0x70, 0x0E, 0x01, 0x80,\n/* '=' 0x3D */ 0xFF, 0x80, 0x00, 0x1F, 0xF0,\n/* '>' 0x3E */ 0xE0, 0x1C, 0x03, 0x80, 0x30, 0x70, 0xE3, 0x81, 0x00,\n/* '?' 0x3F */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x18, 0x38, 0x18, 0x18, 0x0C, 0x00, 0x00, 0x01, 0x80,\n/* '@' 0x40 */ 0x03, 0xF0, 0x06, 0x0E, 0x06, 0x01, 0x86, 0x00, 0x66, 0x1D, 0xBB, 0x31, 0xCF, 0x18, 0xC7, 0x98, 0x63, 0xCC, 0x31, 0xE6, 0x11, 0xB3, 0x99, 0xCC, 0xF7, 0x86, 0x00, 0x01, 0x80, 0x00, 0x70, 0x40, 0x0F, 0xE0,\n/* 'A' 0x41 */ 0x06, 0x00, 0xF0, 0x0F, 0x00, 0x90, 0x19, 0x81, 0x98, 0x10, 0x83, 0x0C, 0x3F, 0xC2, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30,\n/* 'B' 0x42 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x3F, 0xC6, 0x06, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8,\n/* 'C' 0x43 */ 0x1F, 0x86, 0x19, 0x81, 0xA0, 0x3C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0,\n/* 'D' 0x44 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x03, 0x60, 0xCF, 0xF0,\n/* 'E' 0x45 */ 0xFF, 0xE0, 0x30, 0x18, 0x0C, 0x06, 0x03, 0xFD, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0F, 0xF8,\n/* 'F' 0x46 */ 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFE, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 'G' 0x47 */ 0x0F, 0x83, 0x0E, 0x60, 0x66, 0x03, 0xC0, 0x0C, 0x00, 0xC1, 0xFC, 0x03, 0xC0, 0x36, 0x03, 0x60, 0x73, 0x0F, 0x0F, 0x10,\n/* 'H' 0x48 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xFF, 0xFE, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'J' 0x4A */ 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x07, 0x8F, 0x1E, 0x27, 0x80,\n/* 'K' 0x4B */ 0xC0, 0xF0, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0x98, 0xC3, 0x30, 0xCC, 0x1B, 0x03, 0xC0, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF,\n/* 'M' 0x4D */ 0xE0, 0x3F, 0x01, 0xFC, 0x1F, 0xE0, 0xFD, 0x05, 0xEC, 0x6F, 0x63, 0x79, 0x13, 0xCD, 0x9E, 0x6C, 0xF1, 0x47, 0x8E, 0x3C, 0x71, 0x80,\n/* 'N' 0x4E */ 0xE0, 0x7C, 0x0F, 0xC1, 0xE8, 0x3D, 0x87, 0x98, 0xF1, 0x1E, 0x33, 0xC3, 0x78, 0x6F, 0x07, 0xE0, 0x7C, 0x0E,\n/* 'O' 0x4F */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x0C, 0x60, 0xC0, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x6F, 0xF3, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00,\n/* 'Q' 0x51 */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x6C, 0x60, 0xC0, 0xFB, 0x00, 0x08,\n/* 'R' 0x52 */ 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x70,\n/* 'S' 0x53 */ 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00,\n/* 'T' 0x54 */ 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0,\n/* 'U' 0x55 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xB0, 0x61, 0xF0,\n/* 'V' 0x56 */ 0xC0, 0x6C, 0x0D, 0x81, 0x10, 0x63, 0x0C, 0x61, 0x04, 0x60, 0xCC, 0x19, 0x01, 0x60, 0x3C, 0x07, 0x00, 0x60,\n/* 'W' 0x57 */ 0xC1, 0x81, 0x61, 0xC3, 0x61, 0xC3, 0x61, 0x43, 0x62, 0x62, 0x22, 0x66, 0x32, 0x26, 0x36, 0x26, 0x14, 0x34, 0x14, 0x34, 0x1C, 0x1C, 0x18, 0x1C, 0x08, 0x18,\n/* 'X' 0x58 */ 0xC0, 0xD8, 0x66, 0x18, 0xCC, 0x1E, 0x07, 0x00, 0xC0, 0x78, 0x32, 0x0C, 0xC6, 0x1B, 0x07, 0xC0, 0xC0,\n/* 'Y' 0x59 */ 0xC0, 0x36, 0x06, 0x30, 0xC3, 0x0C, 0x19, 0x81, 0xD8, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xC0, 0x60, 0x30, 0x0C, 0x06, 0x03, 0x01, 0xC0, 0x60, 0x30, 0x18, 0x06, 0x03, 0x00, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB6, 0xE0,\n/* '\\' 0x5C */ 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x80,\n/* ']' 0x5D */ 0xED, 0xB6, 0xDB, 0x6D, 0xB6, 0xDB, 0xE0,\n/* '^' 0x5E */ 0x30, 0x60, 0xA2, 0x44, 0xD8, 0xA1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xC0,\n/* '`' 0x60 */ 0xC6, 0x30,\n/* 'a' 0x61 */ 0x7E, 0x71, 0xB0, 0xC0, 0x60, 0xF3, 0xDB, 0x0D, 0x86, 0xC7, 0x3D, 0xC0,\n/* 'b' 0x62 */ 0xC0, 0x60, 0x30, 0x1B, 0xCE, 0x36, 0x0F, 0x07, 0x83, 0xC1, 0xE0, 0xF0, 0x7C, 0x6D, 0xE0,\n/* 'c' 0x63 */ 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'd' 0x64 */ 0x03, 0x03, 0x03, 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B,\n/* 'e' 0x65 */ 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'f' 0x66 */ 0x36, 0x6F, 0x66, 0x66, 0x66, 0x66, 0x60,\n/* 'g' 0x67 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC6, 0x7C,\n/* 'h' 0x68 */ 0xC0, 0xC0, 0xC0, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'i' 0x69 */ 0xC3, 0xFF, 0xFF, 0xC0,\n/* 'j' 0x6A */ 0x30, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0xC0, 0xC0, 0xC2, 0xC4, 0xCC, 0xD8, 0xF8, 0xEC, 0xC4, 0xC6, 0xC3, 0xC3,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'm' 0x6D */ 0xDE, 0xF7, 0x1C, 0xF0, 0xC7, 0x86, 0x3C, 0x31, 0xE1, 0x8F, 0x0C, 0x78, 0x63, 0xC3, 0x1E, 0x18, 0xC0,\n/* 'n' 0x6E */ 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'o' 0x6F */ 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 'p' 0x70 */ 0xDE, 0x71, 0xB0, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x83, 0xE3, 0x6F, 0x30, 0x18, 0x0C, 0x00,\n/* 'q' 0x71 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0x03,\n/* 'r' 0x72 */ 0xDF, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x00,\n/* 's' 0x73 */ 0x3E, 0xE3, 0xC0, 0xC0, 0xE0, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 't' 0x74 */ 0x66, 0xF6, 0x66, 0x66, 0x66, 0x67,\n/* 'u' 0x75 */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 'v' 0x76 */ 0xC1, 0xA0, 0x98, 0xCC, 0x42, 0x21, 0xB0, 0xD0, 0x28, 0x1C, 0x0C, 0x00,\n/* 'w' 0x77 */ 0xC6, 0x1E, 0x38, 0x91, 0xC4, 0xCA, 0x66, 0xD3, 0x16, 0xD0, 0xA6, 0x87, 0x1C, 0x38, 0xC0, 0xC6, 0x00,\n/* 'x' 0x78 */ 0x87, 0x89, 0xB1, 0xC3, 0x07, 0x1E, 0x26, 0xC5, 0x0C,\n/* 'y' 0x79 */ 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 'z' 0x7A */ 0xFE, 0x0C, 0x30, 0xC1, 0x86, 0x18, 0x20, 0xC1, 0xFC,\n/* '{' 0x7B */ 0x36, 0x66, 0x66, 0x6E, 0xCE, 0x66, 0x66, 0x66, 0x30,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '}' 0x7D */ 0xC6, 0x66, 0x66, 0x67, 0x37, 0x66, 0x66, 0x66, 0xC0,\n/* '~' 0x7E */ 0x61, 0x24, 0x38,\n/* 0x7F */ 0xFF, 0xFC, 0x00, 0x63, 0xE3, 0x31, 0x99, 0x04, 0xC8, 0x66, 0x06, 0x30, 0x61, 0x83, 0x0C, 0x18, 0x60, 0x03, 0x06, 0x18, 0x00, 0xFF, 0xFC,\n/* 0x80 */ 0xFF, 0x01, 0x80, 0x18, 0x01, 0x80, 0x18, 0x01, 0xFE, 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, 0x18, 0x30, 0x03, 0x00, 0x30, 0x0E,\n/* 0x81 */ 0x0C, 0x18, 0x00, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 0x82 */ 0xDC,\n/* 0x83 */ 0x18, 0x89, 0xFC, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x00,\n/* 0x84 */ 0xDA, 0x76,\n/* 0x85 */ 0xCC, 0xC0,\n/* 0x86 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0x87 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18,\n/* 0x88 */ 0x07, 0xC6, 0x13, 0x00, 0xC0, 0x60, 0x3F, 0xE6, 0x03, 0xFC, 0x60, 0x0C, 0x03, 0x00, 0x61, 0x07, 0xC0,\n/* 0x89 */ 0x70, 0x80, 0x22, 0x20, 0x08, 0x90, 0x02, 0x24, 0x00, 0x72, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x09, 0xC7, 0x84, 0x8B, 0x31, 0x22, 0x84, 0x88, 0xB3, 0x21, 0xC7, 0x80,\n/* 0x8A */ 0x3F, 0x80, 0x18, 0xC0, 0x0C, 0x60, 0x06, 0x30, 0x03, 0x18, 0x01, 0x8C, 0x00, 0xC7, 0xF8, 0x63, 0x06, 0x31, 0x81, 0x90, 0xC0, 0xD8, 0x60, 0x6C, 0x30, 0x6C, 0x1F, 0xE0,\n/* 0x8B */ 0x69,\n/* 0x8C */ 0xC0, 0xC0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0C, 0x0C, 0x06, 0x06, 0x03, 0xFF, 0xF9, 0x81, 0x86, 0xC0, 0xC1, 0xE0, 0x60, 0xF0, 0x30, 0x78, 0x18, 0x6C, 0x0F, 0xE0,\n/* 0x8D */ 0x0C, 0x06, 0x0C, 0x1B, 0x0C, 0xC6, 0x33, 0x0D, 0x83, 0xC0, 0xF0, 0x3E, 0x0D, 0xC3, 0x38, 0xC7, 0x30, 0xEC, 0x1C,\n/* 0x8E */ 0xFF, 0x01, 0x80, 0x18, 0x01, 0x80, 0x18, 0x01, 0xFE, 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, 0x18, 0x31, 0x83, 0x18, 0x30,\n/* 0x8F */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3F, 0xFE, 0x0C, 0x01, 0x80,\n/* 0x90 */ 0x60, 0x7C, 0x18, 0x0D, 0xE7, 0x1B, 0x0D, 0x86, 0xC3, 0x61, 0xB0, 0xD8, 0x6C, 0x36, 0x18, 0x18, 0x08, 0x08,\n/* 0x91 */ 0x6B,\n/* 0x92 */ 0xD6,\n/* 0x93 */ 0x4C, 0xA5, 0xB0,\n/* 0x94 */ 0xDA, 0x53, 0x20,\n/* 0x95 */ 0x6F, 0xFF, 0x60,\n/* 0x96 */ 0xFE,\n/* 0x97 */ 0xFF, 0xFF,\n/* 0x98 */\n/* 0x99 */ 0xFC, 0xE1, 0xCC, 0x38, 0x73, 0x0E, 0x1C, 0xC3, 0x8F, 0x30, 0xD2, 0xCC, 0x34, 0xB3, 0x0D, 0x6C, 0xC3, 0x53, 0x30, 0xCC, 0xCC, 0x33, 0x30,\n/* 0x9A */ 0x7E, 0x03, 0x30, 0x19, 0x80, 0xCC, 0x06, 0x60, 0x33, 0xF9, 0x98, 0x6C, 0xC3, 0x46, 0x1E, 0x3F, 0x80,\n/* 0x9B */ 0x96,\n/* 0x9C */ 0xC3, 0x03, 0x0C, 0x0C, 0x30, 0x30, 0xC0, 0xC3, 0x03, 0xFF, 0xEC, 0x30, 0xF0, 0xC3, 0xC3, 0x0F, 0x0F, 0xE0,\n/* 0x9D */ 0x0C, 0x30, 0x46, 0x3C, 0xDB, 0x34, 0x70, 0xF1, 0xB3, 0x36, 0x3C, 0x20,\n/* 0x9E */ 0x60, 0x7C, 0x18, 0x0D, 0xE7, 0x3B, 0x0D, 0x86, 0xC3, 0x61, 0xB0, 0xD8, 0x6C, 0x36, 0x18,\n/* 0x9F */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xFF, 0x18, 0x18,\n/* 0xA0 */\n/* 0xA1 */ 0x21, 0x07, 0x8C, 0x0F, 0x06, 0x61, 0x98, 0xC3, 0x30, 0xD8, 0x1E, 0x07, 0x00, 0xC0, 0x60, 0x18, 0x0C, 0x03, 0x00,\n/* 0xA2 */ 0x66, 0x18, 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 0xA3 */ 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x07, 0x8F, 0x1E, 0x27, 0x80,\n/* 0xA4 */ 0xFF, 0xDF, 0x1E, 0x3E, 0xFF, 0xC0,\n/* 0xA5 */ 0x00, 0xC0, 0x3F, 0xFF, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x00,\n/* 0xA6 */ 0xFF, 0xFC, 0x0F, 0xFF, 0xC0,\n/* 0xA7 */ 0x0C, 0x09, 0x0C, 0xC6, 0x63, 0x81, 0xE3, 0x19, 0x87, 0xE1, 0xB8, 0xC6, 0x41, 0xC0, 0x73, 0x19, 0x8C, 0x66, 0x1E, 0x00,\n/* 0xA8 */ 0x33, 0x00, 0x3F, 0xF8, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xFF, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0xFE,\n/* 0xA9 */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9B, 0xC6, 0xD9, 0x8F, 0x60, 0x3D, 0x00, 0xF4, 0x03, 0xD8, 0x0D, 0xE6, 0x67, 0xF3, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAA */ 0x1F, 0x86, 0x19, 0x81, 0xB0, 0x3C, 0x01, 0x80, 0x3F, 0xC6, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0,\n/* 0xAB */ 0x22, 0xCF, 0x26, 0x46, 0x64, 0x40,\n/* 0xAC */ 0xFF, 0x80, 0xC0, 0x60, 0x30, 0x18,\n/* 0xAD */\n/* 0xAE */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9F, 0xE6, 0xD0, 0x8F, 0x42, 0x3D, 0xF0, 0xF4, 0x23, 0xD0, 0x8D, 0xC2, 0x67, 0x0B, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAF */ 0xCC, 0x03, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x00,\n/* 0xB0 */ 0x74, 0x63, 0x17, 0x00,\n/* 0xB1 */ 0x0C, 0x06, 0x03, 0x07, 0xE0, 0xC0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x3F, 0xE0,\n/* 0xB2 */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 0xB3 */ 0xC3, 0xFF, 0xFF, 0xC0,\n/* 0xB4 */ 0x0C, 0x3F, 0xF0, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30,\n/* 0xB5 */ 0xC3, 0x61, 0xB0, 0xD8, 0x6C, 0x36, 0x1B, 0x0D, 0x86, 0xE7, 0x7D, 0xF0, 0x18, 0x0C, 0x00,\n/* 0xB6 */ 0x3F, 0x7E, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x72, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,\n/* 0xB7 */ 0xE0,\n/* 0xB8 */ 0x66, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xB9 */ 0xC1, 0x81, 0x83, 0x03, 0x86, 0x05, 0x0C, 0xEB, 0x1A, 0x32, 0x34, 0x66, 0x68, 0xC4, 0xD1, 0x8D, 0xB3, 0x0B, 0x3A, 0x1E, 0x04, 0x1C, 0x08, 0x1B, 0xC0,\n/* 0xBA */ 0x3C, 0x46, 0xC3, 0x80, 0xF8, 0x80, 0x80, 0xC3, 0x46, 0x3C,\n/* 0xBB */ 0x89, 0x98, 0x99, 0x3C, 0xD1, 0x00,\n/* 0xBC */ 0x30, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xE0,\n/* 0xBD */ 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00,\n/* 0xBE */ 0x3E, 0xE3, 0xC0, 0xC0, 0x60, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 0xBF */ 0xCC, 0x03, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C,\n/* 0xC0 */ 0x06, 0x00, 0xF0, 0x0F, 0x00, 0x90, 0x19, 0x81, 0x98, 0x10, 0x83, 0x0C, 0x3F, 0xC2, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30,\n/* 0xC1 */ 0xFF, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0x80, 0x3F, 0xE6, 0x06, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8,\n/* 0xC2 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x3F, 0xC6, 0x06, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8,\n/* 0xC3 */ 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 0xC4 */ 0x1F, 0xF0, 0x60, 0xC1, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x03, 0x0C, 0x0C, 0xFF, 0xFF, 0x00, 0x3C, 0x00, 0xF0, 0x03,\n/* 0xC5 */ 0xFF, 0xE0, 0x30, 0x18, 0x0C, 0x06, 0x03, 0xFD, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0F, 0xF8,\n/* 0xC6 */ 0x61, 0x86, 0x31, 0x8C, 0x19, 0x98, 0x19, 0x98, 0x0D, 0xB0, 0x07, 0xE0, 0x03, 0xC0, 0x07, 0xE0, 0x0D, 0xB0, 0x19, 0x98, 0x31, 0x8C, 0x61, 0x86, 0xC1, 0x83,\n/* 0xC7 */ 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0x00, 0xC0, 0x60, 0xF0, 0x06, 0x00, 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00,\n/* 0xC8 */ 0xC0, 0xF8, 0x1F, 0x07, 0xE0, 0xBC, 0x37, 0x8C, 0xF1, 0x1E, 0x63, 0xD8, 0x7A, 0x0F, 0xC1, 0xF0, 0x3E, 0x06,\n/* 0xC9 */ 0x11, 0x03, 0xE0, 0x00, 0x60, 0x7C, 0x0F, 0x83, 0xF0, 0x5E, 0x1B, 0xC6, 0x78, 0x8F, 0x31, 0xEC, 0x3D, 0x07, 0xE0, 0xF8, 0x1F, 0x03,\n/* 0xCA */ 0xC1, 0xB0, 0xCC, 0x63, 0x30, 0xD8, 0x3C, 0x0F, 0x03, 0xE0, 0xDC, 0x33, 0x8C, 0x73, 0x0E, 0xC1, 0xC0,\n/* 0xCB */ 0x3F, 0xCC, 0x33, 0x0C, 0xC3, 0x30, 0xCC, 0x33, 0x0C, 0xC3, 0x30, 0xC8, 0x36, 0x0D, 0x83, 0xC0, 0xC0,\n/* 0xCC */ 0xE0, 0x3F, 0x01, 0xFC, 0x1F, 0xE0, 0xFD, 0x05, 0xEC, 0x6F, 0x63, 0x79, 0x13, 0xCD, 0x9E, 0x6C, 0xF1, 0x47, 0x8E, 0x3C, 0x71, 0x80,\n/* 0xCD */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xFF, 0xFE, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 0xCE */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x0C, 0x60, 0xC0, 0xF8, 0x00,\n/* 0xCF */ 0xFF, 0xF8, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 0xD0 */ 0xFF, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x6F, 0xF3, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00,\n/* 0xD1 */ 0x1F, 0x86, 0x19, 0x81, 0xA0, 0x3C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0,\n/* 0xD2 */ 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0,\n/* 0xD3 */ 0xC0, 0xF0, 0x66, 0x19, 0x8C, 0x33, 0x0D, 0x81, 0xE0, 0x70, 0x0C, 0x06, 0x01, 0x80, 0xC0, 0x30, 0x00,\n/* 0xD4 */ 0x03, 0x00, 0x0C, 0x01, 0xFE, 0x1C, 0xCE, 0xE3, 0x1F, 0x0C, 0x3C, 0x30, 0xF0, 0xC3, 0xE3, 0x1D, 0xCC, 0xE3, 0xFF, 0x00, 0xC0, 0x03, 0x00,\n/* 0xD5 */ 0xC0, 0xD8, 0x66, 0x18, 0xCC, 0x1E, 0x07, 0x00, 0xC0, 0x78, 0x32, 0x0C, 0xC6, 0x1B, 0x07, 0xC0, 0xC0,\n/* 0xD6 */ 0xC0, 0x66, 0x03, 0x30, 0x19, 0x80, 0xCC, 0x06, 0x60, 0x33, 0x01, 0x98, 0x0C, 0xC0, 0x66, 0x03, 0x30, 0x19, 0x80, 0xCF, 0xFF, 0x80, 0x0C, 0x00, 0x60,\n/* 0xD7 */ 0xC1, 0xE0, 0xF0, 0x78, 0x3C, 0x1E, 0x0F, 0x06, 0xFF, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18,\n/* 0xD8 */ 0xC3, 0x1E, 0x18, 0xF0, 0xC7, 0x86, 0x3C, 0x31, 0xE1, 0x8F, 0x0C, 0x78, 0x63, 0xC3, 0x1E, 0x18, 0xF0, 0xC7, 0x86, 0x3F, 0xFF, 0x80,\n/* 0xD9 */ 0xC3, 0x19, 0x86, 0x33, 0x0C, 0x66, 0x18, 0xCC, 0x31, 0x98, 0x63, 0x30, 0xC6, 0x61, 0x8C, 0xC3, 0x19, 0x86, 0x33, 0x0C, 0x66, 0x18, 0xCF, 0xFF, 0xE0, 0x00, 0xC0, 0x01, 0x80,\n/* 0xDA */ 0xF8, 0x00, 0xC0, 0x06, 0x00, 0x30, 0x01, 0x80, 0x0F, 0xF0, 0x60, 0xC3, 0x03, 0x18, 0x18, 0xC0, 0xC6, 0x06, 0x30, 0x61, 0xFE, 0x00,\n/* 0xDB */ 0xC0, 0x0F, 0x00, 0x3C, 0x00, 0xF0, 0x03, 0xC0, 0x0F, 0xFE, 0x3C, 0x0C, 0xF0, 0x1B, 0xC0, 0x6F, 0x01, 0xBC, 0x06, 0xF0, 0x33, 0xFF, 0x8C,\n/* 0xDC */ 0xC0, 0x18, 0x03, 0x00, 0x60, 0x0C, 0x01, 0xFF, 0x30, 0x36, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8,\n/* 0xDD */ 0x3F, 0x0C, 0x33, 0x83, 0x60, 0x20, 0x06, 0x00, 0x47, 0xF8, 0x01, 0xC0, 0x78, 0x0D, 0x81, 0x30, 0xC1, 0xF0,\n/* 0xDE */ 0xC0, 0xF8, 0x61, 0x83, 0x31, 0x80, 0xD8, 0xC0, 0x6C, 0xC0, 0x1E, 0x60, 0x0F, 0xF0, 0x07, 0x98, 0x03, 0xCC, 0x01, 0xE3, 0x01, 0xB1, 0x80, 0xD8, 0x60, 0xCC, 0x0F, 0x80,\n/* 0xDF */ 0x3F, 0xD8, 0x3C, 0x0F, 0x03, 0xC0, 0xD8, 0x33, 0xFC, 0x33, 0x18, 0xCC, 0x36, 0x0D, 0x83, 0xC0, 0xC0,\n/* 0xE0 */ 0x7E, 0x71, 0xB0, 0xC0, 0x60, 0xF3, 0xDB, 0x0D, 0x86, 0xC7, 0x3D, 0xC0,\n/* 0xE1 */ 0x03, 0x1F, 0x78, 0x40, 0xFC, 0xE6, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xE2 */ 0xFD, 0x8F, 0x0E, 0x3F, 0xDF, 0xB1, 0xE1, 0xC7, 0xF8,\n/* 0xE3 */ 0xFE, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x00,\n/* 0xE4 */ 0x1F, 0x83, 0x30, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x61, 0x8C, 0x31, 0x9F, 0xFF, 0x01, 0xE0, 0x30,\n/* 0xE5 */ 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xE6 */ 0xC6, 0x36, 0x66, 0x36, 0xC1, 0xF8, 0x0F, 0x01, 0xF8, 0x36, 0xC6, 0x66, 0xC6, 0x38, 0x61,\n/* 0xE7 */ 0x79, 0x8C, 0x18, 0x30, 0x43, 0x01, 0xE3, 0xC6, 0xF8,\n/* 0xE8 */ 0xC7, 0xC7, 0xCF, 0xCB, 0xCB, 0xD3, 0xD3, 0xF3, 0xE3, 0xE3,\n/* 0xE9 */ 0x66, 0x18, 0xC7, 0xC7, 0xCF, 0xCB, 0xCB, 0xD3, 0xD3, 0xF3, 0xE3, 0xE3,\n/* 0xEA */ 0xC7, 0x9B, 0x66, 0x8E, 0x1E, 0x36, 0x66, 0xC7, 0x84,\n/* 0xEB */ 0x7E, 0xCD, 0x9B, 0x36, 0x6C, 0xD9, 0xA3, 0xC7, 0x0C,\n/* 0xEC */ 0xE3, 0xF1, 0xF8, 0xFE, 0xFF, 0x7E, 0xAF, 0x77, 0x93, 0xC9, 0xE0, 0xC0,\n/* 0xED */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xFF, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 0xEE */ 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xEF */ 0xFF, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 0xF0 */ 0xDE, 0x71, 0xB0, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x83, 0xE3, 0x6F, 0x30, 0x18, 0x0C, 0x00,\n/* 0xF1 */ 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xF2 */ 0xFC, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 0xF3 */ 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 0xF4 */ 0x03, 0x00, 0x0C, 0x03, 0xB7, 0x19, 0xE6, 0xC3, 0x0F, 0x0C, 0x3C, 0x30, 0xF0, 0xC3, 0xC3, 0x0F, 0x0C, 0x36, 0x79, 0x8E, 0xDC, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00,\n/* 0xF5 */ 0x87, 0x89, 0xB1, 0xC3, 0x07, 0x1E, 0x26, 0xC5, 0x0C,\n/* 0xF6 */ 0xC3, 0x30, 0xCC, 0x33, 0x0C, 0xC3, 0x30, 0xCC, 0x33, 0x0C, 0xC3, 0x3F, 0xF0, 0x0C, 0x03,\n/* 0xF7 */ 0xC7, 0x8F, 0x1E, 0x3C, 0x6F, 0xC1, 0x83, 0x06, 0x0C,\n/* 0xF8 */ 0xCC, 0xF3, 0x3C, 0xCF, 0x33, 0xCC, 0xF3, 0x3C, 0xCF, 0x33, 0xCC, 0xFF, 0xF0,\n/* 0xF9 */ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCF, 0xFF, 0x00, 0x30, 0x03,\n/* 0xFA */ 0xF0, 0x18, 0x0C, 0x06, 0x03, 0xF1, 0x8C, 0xC6, 0x63, 0x31, 0x9F, 0x80,\n/* 0xFB */ 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0xFE, 0xF0, 0xFC, 0x3F, 0x0F, 0xC3, 0xFF, 0xB0,\n/* 0xFC */ 0xC0, 0xC0, 0xC0, 0xC0, 0xFE, 0xC3, 0xC3, 0xC3, 0xC3, 0xFE,\n/* 0xFD */ 0x3C, 0x62, 0xC3, 0x01, 0x1F, 0x01, 0x01, 0xC3, 0x62, 0x3C,\n/* 0xFE */ 0xC7, 0xCC, 0xC6, 0xD8, 0x3D, 0x83, 0xF8, 0x3D, 0x83, 0xD8, 0x3C, 0xC2, 0xCC, 0x6C, 0x7C,\n/* 0xFF */ 0x7F, 0xC3, 0xC3, 0xC3, 0x7F, 0x13, 0x33, 0x63, 0xC3, 0x83,\n};\n\nconst GFXglyph FreeSans9pt_Win1251Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   15,  15,  17,   1,  -13 },\n/* 0x02 */ {    29,   15,  15,  17,   1,  -13 },\n/* 0x03 */ {    58,   15,  16,  17,   1,  -14 },\n/* 0x04 */ {    88,   15,  16,  17,   1,  -14 },\n/* 0x05 */ {   118,   16,  15,  18,   1,  -13 },\n/* 0x06 */ {   148,   15,  15,  17,   1,  -13 },\n/* 0x07 */ {   177,    0,   0,   8,   0,    0 },\n/* 0x08 */ {   177,   17,  16,  19,   1,  -14 },\n/* 0x09 */ {   211,   17,  12,  19,   1,  -12 },\n/* 0x0A */ {   237,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   237,   17,  16,  19,   1,  -14 },\n/* 0x0C */ {   271,   15,  14,  17,   1,  -12 },\n/* 0x0D */ {   298,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   298,   15,  16,  17,   1,  -14 },\n/* 0x0F */ {   328,   15,  15,  17,   1,  -13 },\n/* 0x10 */ {   357,   15,  15,  17,   1,  -13 },\n/* 0x11 */ {   386,   15,  16,  17,   1,  -14 },\n/* 0x12 */ {   416,   17,  17,  19,   1,  -15 },\n/* 0x13 */ {   453,   15,  16,  17,   1,  -14 },\n/* 0x14 */ {   483,   15,  16,  17,   1,  -14 },\n/* 0x15 */ {   513,   15,  16,  17,   1,  -14 },\n/* 0x16 */ {   543,   11,  16,  13,   1,  -14 },\n/* 0x17 */ {   565,   15,  16,  17,   1,  -14 },\n/* 0x18 */ {   595,   18,  15,  20,   1,  -13 },\n/* 0x19 */ {   629,   15,  16,  17,   1,  -14 },\n/* 0x1A */ {   659,   13,  14,  15,   1,  -12 },\n/* 0x1B */ {   682,   17,  16,  19,   1,  -14 },\n/* 0x1C */ {   716,   15,  16,  17,   1,  -14 },\n/* 0x1D */ {   746,   15,  15,  17,   1,  -13 },\n/* 0x1E */ {   775,   17,  16,  19,   1,  -14 },\n/* 0x1F */ {   809,   11,  16,  13,   1,  -14 },\n/* ' ' 0x20 */ {   831,    0,   0,   5,   0,    0 },\n/* '!' 0x21 */ {   831,    2,  13,   6,   2,  -12 },\n/* '\"' 0x22 */ {   835,    5,   4,   6,   1,  -12 },\n/* '#' 0x23 */ {   838,   10,  12,  10,   0,  -11 },\n/* '$' 0x24 */ {   853,    9,  16,  10,   1,  -13 },\n/* '%' 0x25 */ {   871,   16,  13,  16,   1,  -12 },\n/* '&' 0x26 */ {   897,   10,  13,  12,   1,  -12 },\n/* ''' 0x27 */ {   914,    2,   4,   4,   1,  -12 },\n/* '(' 0x28 */ {   915,    4,  17,   6,   1,  -12 },\n/* ')' 0x29 */ {   924,    4,  17,   6,   1,  -12 },\n/* '*' 0x2A */ {   933,    5,   5,   7,   1,  -12 },\n/* '+' 0x2B */ {   937,    6,   8,  11,   3,   -7 },\n/* ',' 0x2C */ {   943,    2,   4,   5,   2,    0 },\n/* '-' 0x2D */ {   944,    4,   1,   6,   1,   -4 },\n/* '.' 0x2E */ {   945,    2,   1,   5,   1,    0 },\n/* '/' 0x2F */ {   946,    5,  13,   5,   0,  -12 },\n/* '0' 0x30 */ {   955,    8,  13,  10,   1,  -12 },\n/* '1' 0x31 */ {   968,    4,  13,  10,   3,  -12 },\n/* '2' 0x32 */ {   975,    9,  13,  10,   1,  -12 },\n/* '3' 0x33 */ {   990,    8,  13,  10,   1,  -12 },\n/* '4' 0x34 */ {  1003,    7,  13,  10,   2,  -12 },\n/* '5' 0x35 */ {  1015,    9,  13,  10,   1,  -12 },\n/* '6' 0x36 */ {  1030,    9,  13,  10,   1,  -12 },\n/* '7' 0x37 */ {  1045,    8,  13,  10,   0,  -12 },\n/* '8' 0x38 */ {  1058,    9,  13,  10,   1,  -12 },\n/* '9' 0x39 */ {  1073,    8,  13,  10,   1,  -12 },\n/* ':' 0x3A */ {  1086,    2,  10,   5,   1,   -9 },\n/* ';' 0x3B */ {  1089,    3,  12,   5,   1,   -8 },\n/* '<' 0x3C */ {  1094,    9,   9,  11,   1,   -8 },\n/* '=' 0x3D */ {  1105,    9,   4,  11,   1,   -5 },\n/* '>' 0x3E */ {  1110,    9,   8,  11,   1,   -7 },\n/* '?' 0x3F */ {  1119,    9,  13,  10,   1,  -12 },\n/* '@' 0x40 */ {  1134,   17,  16,  18,   1,  -12 },\n/* 'A' 0x41 */ {  1168,   12,  13,  12,   0,  -12 },\n/* 'B' 0x42 */ {  1188,   11,  13,  12,   1,  -12 },\n/* 'C' 0x43 */ {  1206,   11,  13,  13,   1,  -12 },\n/* 'D' 0x44 */ {  1224,   11,  13,  13,   1,  -12 },\n/* 'E' 0x45 */ {  1242,    9,  13,  11,   1,  -12 },\n/* 'F' 0x46 */ {  1257,    8,  13,  11,   1,  -12 },\n/* 'G' 0x47 */ {  1270,   12,  13,  14,   1,  -12 },\n/* 'H' 0x48 */ {  1290,   11,  13,  13,   1,  -12 },\n/* 'I' 0x49 */ {  1308,    2,  13,   5,   2,  -12 },\n/* 'J' 0x4A */ {  1312,    7,  13,  10,   1,  -12 },\n/* 'K' 0x4B */ {  1324,   10,  13,  12,   1,  -12 },\n/* 'L' 0x4C */ {  1341,    8,  13,  10,   1,  -12 },\n/* 'M' 0x4D */ {  1354,   13,  13,  15,   1,  -12 },\n/* 'N' 0x4E */ {  1376,   11,  13,  13,   1,  -12 },\n/* 'O' 0x4F */ {  1394,   13,  13,  14,   1,  -12 },\n/* 'P' 0x50 */ {  1416,   10,  13,  12,   1,  -12 },\n/* 'Q' 0x51 */ {  1433,   13,  14,  14,   1,  -12 },\n/* 'R' 0x52 */ {  1456,   12,  13,  13,   1,  -12 },\n/* 'S' 0x53 */ {  1476,   10,  13,  12,   1,  -12 },\n/* 'T' 0x54 */ {  1493,    9,  13,  11,   1,  -12 },\n/* 'U' 0x55 */ {  1508,   11,  13,  13,   1,  -12 },\n/* 'V' 0x56 */ {  1526,   11,  13,  11,   0,  -12 },\n/* 'W' 0x57 */ {  1544,   16,  13,  17,   0,  -12 },\n/* 'X' 0x58 */ {  1570,   10,  13,  12,   1,  -12 },\n/* 'Y' 0x59 */ {  1587,   12,  13,  12,   0,  -12 },\n/* 'Z' 0x5A */ {  1607,   10,  13,  11,   1,  -12 },\n/* '[' 0x5B */ {  1624,    3,  17,   5,   1,  -12 },\n/* '\\' 0x5C */ {  1631,    5,  13,   5,   0,  -12 },\n/* ']' 0x5D */ {  1640,    3,  17,   5,   0,  -12 },\n/* '^' 0x5E */ {  1647,    7,   7,   8,   1,  -12 },\n/* '_' 0x5F */ {  1654,   10,   1,  10,   0,    3 },\n/* '`' 0x60 */ {  1656,    4,   3,   5,   0,  -12 },\n/* 'a' 0x61 */ {  1658,    9,  10,  10,   1,   -9 },\n/* 'b' 0x62 */ {  1670,    9,  13,  10,   1,  -12 },\n/* 'c' 0x63 */ {  1685,    8,  10,   9,   1,   -9 },\n/* 'd' 0x64 */ {  1695,    8,  13,  10,   1,  -12 },\n/* 'e' 0x65 */ {  1708,    8,  10,  10,   1,   -9 },\n/* 'f' 0x66 */ {  1718,    4,  13,   5,   1,  -12 },\n/* 'g' 0x67 */ {  1725,    8,  14,  10,   1,   -9 },\n/* 'h' 0x68 */ {  1739,    8,  13,  10,   1,  -12 },\n/* 'i' 0x69 */ {  1752,    2,  13,   4,   1,  -12 },\n/* 'j' 0x6A */ {  1756,    4,  17,   4,   0,  -12 },\n/* 'k' 0x6B */ {  1765,    8,  13,   9,   1,  -12 },\n/* 'l' 0x6C */ {  1778,    2,  13,   4,   1,  -12 },\n/* 'm' 0x6D */ {  1782,   13,  10,  15,   1,   -9 },\n/* 'n' 0x6E */ {  1799,    8,  10,  10,   1,   -9 },\n/* 'o' 0x6F */ {  1809,    8,  10,  10,   1,   -9 },\n/* 'p' 0x70 */ {  1819,    9,  13,  10,   1,   -9 },\n/* 'q' 0x71 */ {  1834,    8,  13,  10,   1,   -9 },\n/* 'r' 0x72 */ {  1847,    5,  10,   6,   1,   -9 },\n/* 's' 0x73 */ {  1854,    8,  10,   9,   1,   -9 },\n/* 't' 0x74 */ {  1864,    4,  12,   5,   1,  -11 },\n/* 'u' 0x75 */ {  1870,    8,  10,  10,   1,   -9 },\n/* 'v' 0x76 */ {  1880,    9,  10,   9,   0,   -9 },\n/* 'w' 0x77 */ {  1892,   13,  10,  13,   0,   -9 },\n/* 'x' 0x78 */ {  1909,    7,  10,   9,   1,   -9 },\n/* 'y' 0x79 */ {  1918,    8,  14,   9,   0,   -9 },\n/* 'z' 0x7A */ {  1932,    7,  10,   9,   1,   -9 },\n/* '{' 0x7B */ {  1941,    4,  17,   6,   1,  -12 },\n/* '|' 0x7C */ {  1950,    2,  17,   4,   2,  -12 },\n/* '}' 0x7D */ {  1955,    4,  17,   6,   1,  -12 },\n/* '~' 0x7E */ {  1964,    7,   3,   9,   1,   -7 },\n/* 0x7F */ {  1967,   13,  14,  15,   1,  -12 },\n/* 0x80 */ {  1990,   12,  16,  14,   1,  -12 },\n/* 0x81 */ {  2014,    8,  15,  11,   1,  -14 },\n/* 0x82 */ {  2029,    2,   3,   5,   1,    0 },\n/* 0x83 */ {  2030,    5,  13,   7,   1,  -12 },\n/* 0x84 */ {  2039,    5,   3,   7,   1,    0 },\n/* 0x85 */ {  2041,   10,   1,  12,   1,    0 },\n/* 0x86 */ {  2043,    8,  16,  10,   1,  -12 },\n/* 0x87 */ {  2059,    8,  16,  10,   1,  -12 },\n/* 0x88 */ {  2075,   10,  13,  12,   1,  -12 },\n/* 0x89 */ {  2092,   18,  13,  18,   0,  -12 },\n/* 0x8A */ {  2122,   17,  13,  18,   1,  -12 },\n/* 0x8B */ {  2150,    2,   4,   4,   1,   -6 },\n/* 0x8C */ {  2151,   17,  13,  18,   1,  -12 },\n/* 0x8D */ {  2179,   10,  15,  11,   1,  -14 },\n/* 0x8E */ {  2198,   12,  13,  14,   1,  -12 },\n/* 0x8F */ {  2218,   11,  15,  13,   1,  -12 },\n/* 0x90 */ {  2239,    9,  16,  10,   1,  -12 },\n/* 0x91 */ {  2257,    2,   4,   4,   2,  -12 },\n/* 0x92 */ {  2258,    2,   4,   4,   1,  -12 },\n/* 0x93 */ {  2259,    5,   4,   7,   2,  -12 },\n/* 0x94 */ {  2262,    5,   4,   7,   1,  -12 },\n/* 0x95 */ {  2265,    4,   5,   7,   1,   -8 },\n/* 0x96 */ {  2268,    7,   1,   9,   1,   -4 },\n/* 0x97 */ {  2269,   16,   1,  18,   1,   -4 },\n/* 0x98 */ {  2271,    0,   0,   0,   0,    0 },\n/* 0x99 */ {  2271,   18,  10,  18,   1,  -13 },\n/* 0x9A */ {  2294,   13,  10,  14,   1,   -9 },\n/* 0x9B */ {  2311,    2,   4,   5,   2,   -6 },\n/* 0x9C */ {  2312,   14,  10,  15,   1,   -9 },\n/* 0x9D */ {  2330,    7,  13,   9,   1,  -12 },\n/* 0x9E */ {  2342,    9,  13,  10,   1,  -12 },\n/* 0x9F */ {  2357,    8,  12,  10,   1,   -9 },\n/* 0xA0 */ {  2369,    0,   0,   5,   0,    0 },\n/* 0xA1 */ {  2369,   10,  15,  11,   1,  -14 },\n/* 0xA2 */ {  2388,    8,  16,   9,   0,  -11 },\n/* 0xA3 */ {  2404,    7,  13,  10,   1,  -12 },\n/* 0xA4 */ {  2416,    7,   6,  10,   2,   -8 },\n/* 0xA5 */ {  2422,   10,  14,  11,   1,  -13 },\n/* 0xA6 */ {  2440,    2,  17,   5,   2,  -12 },\n/* 0xA7 */ {  2445,    9,  17,  10,   1,  -12 },\n/* 0xA8 */ {  2465,    9,  15,  12,   1,  -14 },\n/* 0xA9 */ {  2482,   14,  13,  14,   1,  -12 },\n/* 0xAA */ {  2505,   11,  13,  13,   1,  -12 },\n/* 0xAB */ {  2523,    7,   6,   9,   1,   -7 },\n/* 0xAC */ {  2529,    9,   5,  11,   2,   -5 },\n/* 0xAD */ {  2535,    0,   0,   0,   0,    0 },\n/* 0xAE */ {  2535,   14,  13,  14,   1,  -12 },\n/* 0xAF */ {  2558,    6,  15,   5,   0,  -14 },\n/* 0xB0 */ {  2570,    5,   5,  11,   3,  -11 },\n/* 0xB1 */ {  2574,    9,  11,  11,   1,  -10 },\n/* 0xB2 */ {  2587,    2,  13,   4,   1,  -12 },\n/* 0xB3 */ {  2591,    2,  13,   4,   1,  -12 },\n/* 0xB4 */ {  2595,    6,  12,   7,   1,  -11 },\n/* 0xB5 */ {  2604,    9,  13,  10,   1,   -9 },\n/* 0xB6 */ {  2619,    8,  16,  10,   2,  -12 },\n/* 0xB7 */ {  2635,    3,   1,   5,   1,   -4 },\n/* 0xB8 */ {  2636,    8,  12,  10,   1,  -11 },\n/* 0xB9 */ {  2648,   15,  13,  17,   1,  -12 },\n/* 0xBA */ {  2673,    8,  10,   9,   1,   -9 },\n/* 0xBB */ {  2683,    7,   6,   9,   1,   -7 },\n/* 0xBC */ {  2689,    4,  17,   4,   0,  -12 },\n/* 0xBD */ {  2698,   10,  13,  12,   1,  -12 },\n/* 0xBE */ {  2715,    8,  10,   9,   1,   -9 },\n/* 0xBF */ {  2725,    6,  12,   5,  -1,  -11 },\n/* 0xC0 */ {  2734,   12,  13,  12,   0,  -12 },\n/* 0xC1 */ {  2754,   11,  13,  12,   1,  -12 },\n/* 0xC2 */ {  2772,   11,  13,  12,   1,  -12 },\n/* 0xC3 */ {  2790,    8,  13,   8,   1,  -12 },\n/* 0xC4 */ {  2803,   14,  16,  15,   1,  -12 },\n/* 0xC5 */ {  2831,    9,  13,  12,   1,  -12 },\n/* 0xC6 */ {  2846,   16,  13,  16,   0,  -12 },\n/* 0xC7 */ {  2872,   10,  13,  12,   1,  -12 },\n/* 0xC8 */ {  2889,   11,  13,  13,   1,  -12 },\n/* 0xC9 */ {  2907,   11,  16,  13,   1,  -15 },\n/* 0xCA */ {  2929,   10,  13,  11,   1,  -12 },\n/* 0xCB */ {  2946,   10,  13,  12,   1,  -12 },\n/* 0xCC */ {  2963,   13,  13,  15,   1,  -12 },\n/* 0xCD */ {  2985,   11,  13,  13,   1,  -12 },\n/* 0xCE */ {  3003,   13,  13,  14,   1,  -12 },\n/* 0xCF */ {  3025,   11,  13,  13,   1,  -12 },\n/* 0xD0 */ {  3043,   10,  13,  12,   1,  -12 },\n/* 0xD1 */ {  3060,   11,  13,  13,   1,  -12 },\n/* 0xD2 */ {  3078,    9,  13,  11,   1,  -12 },\n/* 0xD3 */ {  3093,   10,  13,  11,   1,  -12 },\n/* 0xD4 */ {  3110,   14,  13,  15,   1,  -12 },\n/* 0xD5 */ {  3133,   10,  13,  12,   1,  -12 },\n/* 0xD6 */ {  3150,   13,  15,  13,   1,  -12 },\n/* 0xD7 */ {  3175,    9,  13,  11,   1,  -12 },\n/* 0xD8 */ {  3190,   13,  13,  15,   1,  -12 },\n/* 0xD9 */ {  3212,   15,  15,  15,   1,  -12 },\n/* 0xDA */ {  3241,   13,  13,  15,   2,  -12 },\n/* 0xDB */ {  3263,   14,  13,  16,   1,  -12 },\n/* 0xDC */ {  3286,   11,  13,  12,   1,  -12 },\n/* 0xDD */ {  3304,   11,  13,  13,   1,  -12 },\n/* 0xDE */ {  3322,   17,  13,  18,   1,  -12 },\n/* 0xDF */ {  3350,   10,  13,  12,   1,  -12 },\n/* 0xE0 */ {  3367,    9,  10,  10,   1,   -9 },\n/* 0xE1 */ {  3379,    8,  14,  10,   1,  -13 },\n/* 0xE2 */ {  3393,    7,  10,   9,   1,   -9 },\n/* 0xE3 */ {  3402,    5,  10,   7,   1,   -9 },\n/* 0xE4 */ {  3409,   11,  12,  10,   0,   -9 },\n/* 0xE5 */ {  3426,    8,  10,  10,   1,   -9 },\n/* 0xE6 */ {  3436,   12,  10,  14,   1,   -9 },\n/* 0xE7 */ {  3451,    7,  10,   9,   1,   -9 },\n/* 0xE8 */ {  3460,    8,  10,  10,   1,   -9 },\n/* 0xE9 */ {  3470,    8,  12,  10,   1,  -11 },\n/* 0xEA */ {  3482,    7,  10,   9,   1,   -9 },\n/* 0xEB */ {  3491,    7,  10,   8,   0,   -9 },\n/* 0xEC */ {  3500,    9,  10,  11,   1,   -9 },\n/* 0xED */ {  3512,    8,  10,  10,   1,   -9 },\n/* 0xEE */ {  3522,    8,  10,  10,   1,   -9 },\n/* 0xEF */ {  3532,    8,  10,  10,   1,   -9 },\n/* 0xF0 */ {  3542,    9,  13,  10,   1,   -9 },\n/* 0xF1 */ {  3557,    8,  10,   9,   1,   -9 },\n/* 0xF2 */ {  3567,    6,  10,   7,   1,   -9 },\n/* 0xF3 */ {  3575,    8,  14,   9,   0,   -9 },\n/* 0xF4 */ {  3589,   14,  15,  15,   1,  -11 },\n/* 0xF5 */ {  3616,    7,  10,   9,   1,   -9 },\n/* 0xF6 */ {  3625,   10,  12,  10,   1,   -9 },\n/* 0xF7 */ {  3640,    7,  10,   9,   1,   -9 },\n/* 0xF8 */ {  3649,   10,  10,  12,   1,   -9 },\n/* 0xF9 */ {  3662,   12,  12,  13,   1,   -9 },\n/* 0xFA */ {  3680,    9,  10,  12,   2,   -9 },\n/* 0xFB */ {  3692,   10,  10,  12,   1,   -9 },\n/* 0xFC */ {  3705,    8,  10,   9,   1,   -9 },\n/* 0xFD */ {  3715,    8,  10,   9,   1,   -9 },\n/* 0xFE */ {  3725,   12,  10,  13,   1,   -9 },\n/* 0xFF */ {  3740,    8,  10,  10,   1,   -9 },\n};\n\nconst GFXfont FreeSans9pt_Win1251 PROGMEM = {\n(uint8_t*)FreeSans9pt_Win1251Bitmaps,\n(GFXglyph*)FreeSans9pt_Win1251Glyphs,\n0x01, 0xFF, 21\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans9pt_Win1252.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans9pt_Win1252\n*/\nconst uint8_t FreeSans9pt_Win1252Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x07, 0x00, 0x0A, 0x00, 0x24, 0x00, 0x48, 0x01, 0x10, 0x04, 0x40, 0x10, 0xFF, 0x20, 0x02, 0x81, 0xFD, 0x00, 0x06, 0x07, 0xF4, 0x08, 0x24, 0x0F, 0x88, 0x11, 0x0F, 0xDC, 0x00,\n/* 0x02 */ 0x3F, 0x70, 0x81, 0x11, 0x03, 0xE4, 0x08, 0x28, 0x1F, 0xD0, 0x00, 0x60, 0x7F, 0x20, 0x02, 0x43, 0xFC, 0x44, 0x00, 0x44, 0x00, 0x48, 0x00, 0x90, 0x00, 0xA0, 0x01, 0xC0, 0x00,\n/* 0x03 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x8C, 0x63, 0x18, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x20, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x04 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x30, 0x88, 0x62, 0x08, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x05 */ 0x0B, 0x10, 0x14, 0xA8, 0x12, 0x50, 0x29, 0x42, 0x24, 0xA5, 0x32, 0x95, 0x5A, 0x09, 0x48, 0x09, 0x24, 0x01, 0x10, 0x01, 0x48, 0x02, 0xA4, 0x02, 0x42, 0x04, 0x01, 0x98, 0x00, 0x60,\n/* 0x06 */ 0x00, 0x80, 0x22, 0x80, 0x65, 0x00, 0xBE, 0xE1, 0x82, 0x4E, 0x03, 0x24, 0x04, 0x28, 0x06, 0x30, 0x12, 0x20, 0x3C, 0xA0, 0xC3, 0xFE, 0x80, 0x4D, 0x00, 0xA6, 0x01, 0x80, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x02, 0x00, 0x03, 0x01, 0x00, 0x09, 0x88, 0x0C, 0x0C,\n/* 0x09 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x00,\n/* 0x0A */\n/* 0x0B */ 0x1C, 0x1C, 0x31, 0xB1, 0x90, 0x50, 0x50, 0x10, 0x18, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x02, 0x80, 0x02, 0x40, 0x01, 0x10, 0x01, 0x04, 0x01, 0x01, 0x01, 0x00, 0x41, 0x00, 0x11, 0x00, 0x07, 0x00, 0x01, 0x00,\n/* 0x0C */ 0x06, 0x00, 0x0A, 0x00, 0x12, 0x00, 0x32, 0x01, 0x84, 0x04, 0x10, 0x08, 0x98, 0x1C, 0x18, 0x40, 0x48, 0x82, 0x11, 0xF0, 0x74, 0x02, 0x18, 0x70, 0x2F, 0x9F, 0x80,\n/* 0x0D */\n/* 0x0E */ 0x01, 0x00, 0x05, 0x00, 0x0A, 0x00, 0x3E, 0x00, 0x82, 0x02, 0x82, 0x06, 0x04, 0x10, 0x04, 0x20, 0x08, 0x40, 0x10, 0xFF, 0x22, 0x00, 0x29, 0xFF, 0x3F, 0x8F, 0xDF, 0x9F, 0x01, 0xC0,\n/* 0x0F */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x36, 0x03, 0x60, 0x00, 0xCC, 0x19, 0xA4, 0x4B, 0x00, 0x06, 0x8E, 0x2B, 0x22, 0x66, 0x7C, 0xCC, 0x71, 0x98, 0x03, 0x00,\n/* 0x10 */ 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x1E, 0x00, 0x54, 0x00, 0xA8, 0x01, 0x50, 0x02, 0xA0, 0x05, 0x20, 0x32, 0x61, 0xC4, 0x74, 0x49, 0x10, 0x6C, 0x00, 0xD8, 0x01, 0x10, 0x00,\n/* 0x11 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x40, 0x29, 0x00, 0x31, 0x84, 0x63, 0x18, 0xC0, 0x00, 0x80, 0x15, 0x03, 0x7E, 0x02, 0xFA, 0x04, 0xE4, 0x18, 0x84, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x12 */ 0x02, 0x08, 0x01, 0x08, 0x40, 0x10, 0xC0, 0x08, 0xC0, 0x60, 0x80, 0x28, 0x04, 0x12, 0x4C, 0x10, 0x80, 0x08, 0x23, 0x0E, 0x08, 0xC4, 0x82, 0x04, 0x20, 0x83, 0x09, 0x82, 0x47, 0x01, 0x1C, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x00,\n/* 0x13 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x08, 0x65, 0x28, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x14 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x22, 0x29, 0x83, 0x30, 0x00, 0x65, 0x14, 0xD3, 0x4D, 0xBA, 0xEB, 0x38, 0xE6, 0x00, 0x0A, 0x00, 0x24, 0x38, 0x44, 0x01, 0x07, 0x1C, 0x01, 0xC0,\n/* 0x15 */ 0x07, 0xC0, 0x30, 0x18, 0x80, 0x32, 0x00, 0xF8, 0x01, 0xF1, 0x09, 0xA5, 0x28, 0x40, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x16 */ 0x0C, 0x00, 0xC0, 0x1C, 0x03, 0x80, 0xF8, 0xBB, 0x36, 0xC7, 0x99, 0xF3, 0xFE, 0x3F, 0xC3, 0xF0, 0x7E, 0x0E, 0xC1, 0x8E, 0xE0, 0x20,\n/* 0x17 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x10, 0x01, 0x20, 0x1D, 0x44, 0x42, 0x84, 0x85, 0x00, 0x86, 0x00, 0xC4, 0x00, 0x44, 0x7C, 0x44, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x18 */ 0x01, 0xE0, 0x00, 0x84, 0x00, 0x40, 0x80, 0x20, 0x10, 0x08, 0x24, 0x02, 0x41, 0x00, 0x86, 0x03, 0x12, 0x03, 0xB4, 0x03, 0x52, 0x81, 0x23, 0x80, 0x70, 0xA0, 0x14, 0x28, 0x05, 0x0A, 0x01, 0x42, 0x80, 0x50,\n/* 0x19 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x33, 0x18, 0x60, 0x00, 0xDC, 0xE1, 0xB9, 0xC3, 0x7B, 0xC6, 0x63, 0x0A, 0x00, 0x24, 0xF0, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1A */ 0xFF, 0xFC, 0x00, 0x63, 0xE3, 0x31, 0x99, 0x04, 0xC8, 0x66, 0x06, 0x30, 0x61, 0x82, 0x0C, 0x10, 0x60, 0x03, 0x04, 0x18, 0x00, 0xFF, 0xFC,\n/* 0x1B */ 0x07, 0xF0, 0x06, 0x0C, 0x04, 0x01, 0x04, 0x00, 0x44, 0x22, 0x12, 0x2A, 0x89, 0x00, 0x04, 0x80, 0x02, 0x44, 0x11, 0x01, 0xF0, 0x04, 0x01, 0x0D, 0x01, 0x6A, 0x41, 0x2C, 0x00, 0x05, 0xC0, 0x0E, 0x18, 0x18,\n/* 0x1C */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0xC0, 0x2A, 0x00, 0x33, 0x00, 0x66, 0x00, 0xCC, 0x39, 0x80, 0x83, 0x00, 0x06, 0x00, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1D */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x70, 0x28, 0x00, 0x31, 0x80, 0x63, 0x18, 0xC0, 0x31, 0x80, 0x03, 0x00, 0x06, 0x60, 0x0D, 0x33, 0x12, 0x10, 0x48, 0x21, 0x23, 0x8C, 0x00,\n/* 0x1E */ 0x03, 0x00, 0x07, 0x9E, 0x07, 0x00, 0x86, 0x00, 0x27, 0xC0, 0x0F, 0xC0, 0x07, 0x8C, 0x62, 0x06, 0x31, 0x20, 0x00, 0x90, 0x00, 0x48, 0x00, 0x24, 0x3E, 0x11, 0x00, 0x10, 0x40, 0x10, 0x18, 0x30, 0x03, 0xE0,\n/* 0x1F */ 0x18, 0x02, 0x80, 0x4C, 0x16, 0x41, 0x24, 0x3C, 0x88, 0x6E, 0x65, 0xF2, 0x78, 0x46, 0x88, 0xCF, 0x18, 0x02, 0x80, 0x8C, 0x60, 0x70,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xF0, 0xC0,\n/* '\"' 0x22 */ 0xDE, 0xF7, 0x20,\n/* '#' 0x23 */ 0x09, 0x86, 0x41, 0x91, 0xFF, 0x13, 0x04, 0xC3, 0x20, 0xC8, 0xFF, 0x89, 0x82, 0x61, 0x90,\n/* '$' 0x24 */ 0x10, 0x1F, 0x14, 0xDA, 0x3D, 0x1E, 0x83, 0x40, 0x78, 0x17, 0x08, 0xF4, 0x7A, 0x35, 0x33, 0xF0, 0x40, 0x20,\n/* '%' 0x25 */ 0x38, 0x10, 0xEC, 0x20, 0xC6, 0x20, 0xC6, 0x40, 0xC6, 0x40, 0x6C, 0x80, 0x39, 0x00, 0x01, 0x3C, 0x02, 0x77, 0x02, 0x63, 0x04, 0x63, 0x04, 0x77, 0x08, 0x3C,\n/* '&' 0x26 */ 0x0E, 0x0C, 0xC3, 0x30, 0xCC, 0x1E, 0x03, 0x03, 0xC1, 0x9B, 0xC2, 0xF0, 0xEC, 0x19, 0x8F, 0x3C, 0x40,\n/* ''' 0x27 */ 0xFE,\n/* '(' 0x28 */ 0x13, 0x26, 0x6C, 0xCC, 0xCC, 0xC4, 0x66, 0x23, 0x10,\n/* ')' 0x29 */ 0x8C, 0x46, 0x63, 0x33, 0x33, 0x32, 0x66, 0x4C, 0x80,\n/* '*' 0x2A */ 0x25, 0x7E, 0xA5, 0x00,\n/* '+' 0x2B */ 0x30, 0xC3, 0x3F, 0x30, 0xC3, 0x0C,\n/* ',' 0x2C */ 0xD6,\n/* '-' 0x2D */ 0xF0,\n/* '.' 0x2E */ 0xC0,\n/* '/' 0x2F */ 0x08, 0x44, 0x21, 0x10, 0x84, 0x42, 0x11, 0x08, 0x00,\n/* '0' 0x30 */ 0x3C, 0x66, 0x42, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x42, 0x66, 0x3C,\n/* '1' 0x31 */ 0x11, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x30,\n/* '2' 0x32 */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x10, 0x08, 0x07, 0xF8,\n/* '3' 0x33 */ 0x3C, 0x66, 0xC3, 0xC3, 0x03, 0x06, 0x1C, 0x07, 0x03, 0xC3, 0xC3, 0x66, 0x3C,\n/* '4' 0x34 */ 0x0C, 0x18, 0x71, 0x62, 0xC9, 0xA3, 0x46, 0xFE, 0x18, 0x30, 0x60, 0xC0,\n/* '5' 0x35 */ 0x7F, 0x20, 0x10, 0x08, 0x08, 0x07, 0xF3, 0x8C, 0x03, 0x01, 0x80, 0xF0, 0x6C, 0x63, 0xE0,\n/* '6' 0x36 */ 0x1E, 0x31, 0x98, 0x78, 0x0C, 0x06, 0xF3, 0x8D, 0x83, 0xC1, 0xE0, 0xD0, 0x6C, 0x63, 0xE0,\n/* '7' 0x37 */ 0xFF, 0x03, 0x02, 0x06, 0x04, 0x0C, 0x08, 0x18, 0x18, 0x18, 0x10, 0x30, 0x30,\n/* '8' 0x38 */ 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1B, 0x18, 0xF8, 0xC6, 0xC1, 0xE0, 0xF0, 0x6C, 0x63, 0xE0,\n/* '9' 0x39 */ 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC2, 0x66, 0x3C,\n/* ':' 0x3A */ 0xC0, 0x00, 0x30,\n/* ';' 0x3B */ 0xC0, 0x00, 0x00, 0x64, 0xA0,\n/* '<' 0x3C */ 0x00, 0x81, 0xC7, 0x8E, 0x0C, 0x07, 0x80, 0x70, 0x0E, 0x01, 0x80,\n/* '=' 0x3D */ 0xFF, 0x80, 0x00, 0x1F, 0xF0,\n/* '>' 0x3E */ 0xE0, 0x1C, 0x03, 0x80, 0x30, 0x70, 0xE3, 0x81, 0x00,\n/* '?' 0x3F */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x18, 0x38, 0x18, 0x18, 0x0C, 0x00, 0x00, 0x01, 0x80,\n/* '@' 0x40 */ 0x03, 0xF0, 0x06, 0x0E, 0x06, 0x01, 0x86, 0x00, 0x66, 0x1D, 0xBB, 0x31, 0xCF, 0x18, 0xC7, 0x98, 0x63, 0xCC, 0x31, 0xE6, 0x11, 0xB3, 0x99, 0xCC, 0xF7, 0x86, 0x00, 0x01, 0x80, 0x00, 0x70, 0x40, 0x0F, 0xE0,\n/* 'A' 0x41 */ 0x06, 0x00, 0xF0, 0x0F, 0x00, 0x90, 0x19, 0x81, 0x98, 0x10, 0x83, 0x0C, 0x3F, 0xC2, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30,\n/* 'B' 0x42 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x3F, 0xC6, 0x06, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8,\n/* 'C' 0x43 */ 0x1F, 0x86, 0x19, 0x81, 0xA0, 0x3C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0,\n/* 'D' 0x44 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x03, 0x60, 0xCF, 0xF0,\n/* 'E' 0x45 */ 0xFF, 0xE0, 0x30, 0x18, 0x0C, 0x06, 0x03, 0xFD, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0F, 0xF8,\n/* 'F' 0x46 */ 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFE, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 'G' 0x47 */ 0x0F, 0x83, 0x0E, 0x60, 0x66, 0x03, 0xC0, 0x0C, 0x00, 0xC1, 0xFC, 0x03, 0xC0, 0x36, 0x03, 0x60, 0x73, 0x0F, 0x0F, 0x10,\n/* 'H' 0x48 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xFF, 0xFE, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'J' 0x4A */ 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x07, 0x8F, 0x1E, 0x27, 0x80,\n/* 'K' 0x4B */ 0xC0, 0xF0, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0x98, 0xC3, 0x30, 0xCC, 0x1B, 0x03, 0xC0, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF,\n/* 'M' 0x4D */ 0xE0, 0x3F, 0x01, 0xFC, 0x1F, 0xE0, 0xFD, 0x05, 0xEC, 0x6F, 0x63, 0x79, 0x13, 0xCD, 0x9E, 0x6C, 0xF1, 0x47, 0x8E, 0x3C, 0x71, 0x80,\n/* 'N' 0x4E */ 0xE0, 0x7C, 0x0F, 0xC1, 0xE8, 0x3D, 0x87, 0x98, 0xF1, 0x1E, 0x33, 0xC3, 0x78, 0x6F, 0x07, 0xE0, 0x7C, 0x0E,\n/* 'O' 0x4F */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x0C, 0x60, 0xC0, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x6F, 0xF3, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00,\n/* 'Q' 0x51 */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x6C, 0x60, 0xC0, 0xFB, 0x00, 0x08,\n/* 'R' 0x52 */ 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x70,\n/* 'S' 0x53 */ 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00,\n/* 'T' 0x54 */ 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0,\n/* 'U' 0x55 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xB0, 0x61, 0xF0,\n/* 'V' 0x56 */ 0xC0, 0x6C, 0x0D, 0x81, 0x10, 0x63, 0x0C, 0x61, 0x04, 0x60, 0xCC, 0x19, 0x01, 0x60, 0x3C, 0x07, 0x00, 0x60,\n/* 'W' 0x57 */ 0xC1, 0x81, 0x61, 0xC3, 0x61, 0xC3, 0x61, 0x43, 0x62, 0x62, 0x22, 0x66, 0x32, 0x26, 0x36, 0x26, 0x14, 0x34, 0x14, 0x34, 0x1C, 0x1C, 0x18, 0x1C, 0x08, 0x18,\n/* 'X' 0x58 */ 0xC0, 0xD8, 0x66, 0x18, 0xCC, 0x1E, 0x07, 0x00, 0xC0, 0x78, 0x32, 0x0C, 0xC6, 0x1B, 0x07, 0xC0, 0xC0,\n/* 'Y' 0x59 */ 0xC0, 0x36, 0x06, 0x30, 0xC3, 0x0C, 0x19, 0x81, 0xD8, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xC0, 0x60, 0x30, 0x0C, 0x06, 0x03, 0x01, 0xC0, 0x60, 0x30, 0x18, 0x06, 0x03, 0x00, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB6, 0xE0,\n/* '\\' 0x5C */ 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x80,\n/* ']' 0x5D */ 0xED, 0xB6, 0xDB, 0x6D, 0xB6, 0xDB, 0xE0,\n/* '^' 0x5E */ 0x30, 0x60, 0xA2, 0x44, 0xD8, 0xA1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xC0,\n/* '`' 0x60 */ 0xC6, 0x30,\n/* 'a' 0x61 */ 0x7E, 0x71, 0xB0, 0xC0, 0x60, 0xF3, 0xDB, 0x0D, 0x86, 0xC7, 0x3D, 0xC0,\n/* 'b' 0x62 */ 0xC0, 0x60, 0x30, 0x1B, 0xCE, 0x36, 0x0F, 0x07, 0x83, 0xC1, 0xE0, 0xF0, 0x7C, 0x6D, 0xE0,\n/* 'c' 0x63 */ 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'd' 0x64 */ 0x03, 0x03, 0x03, 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B,\n/* 'e' 0x65 */ 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'f' 0x66 */ 0x36, 0x6F, 0x66, 0x66, 0x66, 0x66, 0x60,\n/* 'g' 0x67 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC6, 0x7C,\n/* 'h' 0x68 */ 0xC0, 0xC0, 0xC0, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'i' 0x69 */ 0xC3, 0xFF, 0xFF, 0xC0,\n/* 'j' 0x6A */ 0x30, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0xC0, 0xC0, 0xC2, 0xC4, 0xCC, 0xD8, 0xF8, 0xEC, 0xC4, 0xC6, 0xC3, 0xC3,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'm' 0x6D */ 0xDE, 0xF7, 0x1C, 0xF0, 0xC7, 0x86, 0x3C, 0x31, 0xE1, 0x8F, 0x0C, 0x78, 0x63, 0xC3, 0x1E, 0x18, 0xC0,\n/* 'n' 0x6E */ 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'o' 0x6F */ 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 'p' 0x70 */ 0xDE, 0x71, 0xB0, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x83, 0xE3, 0x6F, 0x30, 0x18, 0x0C, 0x00,\n/* 'q' 0x71 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0x03,\n/* 'r' 0x72 */ 0xDF, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x00,\n/* 's' 0x73 */ 0x3E, 0xE3, 0xC0, 0xC0, 0xE0, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 't' 0x74 */ 0x66, 0xF6, 0x66, 0x66, 0x66, 0x67,\n/* 'u' 0x75 */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 'v' 0x76 */ 0xC1, 0xA0, 0x98, 0xCC, 0x42, 0x21, 0xB0, 0xD0, 0x28, 0x1C, 0x0C, 0x00,\n/* 'w' 0x77 */ 0xC6, 0x1E, 0x38, 0x91, 0xC4, 0xCA, 0x66, 0xD3, 0x16, 0xD0, 0xA6, 0x87, 0x1C, 0x38, 0xC0, 0xC6, 0x00,\n/* 'x' 0x78 */ 0x87, 0x89, 0xB1, 0xC3, 0x07, 0x1E, 0x26, 0xC5, 0x0C,\n/* 'y' 0x79 */ 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 'z' 0x7A */ 0xFE, 0x0C, 0x30, 0xC1, 0x86, 0x18, 0x20, 0xC1, 0xFC,\n/* '{' 0x7B */ 0x36, 0x66, 0x66, 0x6E, 0xCE, 0x66, 0x66, 0x66, 0x30,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '}' 0x7D */ 0xC6, 0x66, 0x66, 0x67, 0x37, 0x66, 0x66, 0x66, 0xC0,\n/* '~' 0x7E */ 0x61, 0x24, 0x38,\n/* 0x7F */\n/* 0x80 */ 0x07, 0xC6, 0x13, 0x00, 0xC0, 0x60, 0x3F, 0xE6, 0x03, 0xFC, 0x60, 0x0C, 0x03, 0x00, 0x61, 0x07, 0xC0,\n/* 0x81 */\n/* 0x82 */ 0xDC,\n/* 0x83 */ 0x19, 0x8C, 0xF3, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0xE0,\n/* 0x84 */ 0xDA, 0x76,\n/* 0x85 */ 0xCC, 0xC0,\n/* 0x86 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0x87 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18,\n/* 0x88 */ 0x72, 0xA2,\n/* 0x89 */ 0x70, 0x80, 0x22, 0x20, 0x08, 0x90, 0x02, 0x24, 0x00, 0x72, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x09, 0xC7, 0x84, 0x8B, 0x31, 0x22, 0x84, 0x88, 0xB3, 0x21, 0xC7, 0x80,\n/* 0x8A */ 0x1B, 0x03, 0x80, 0x00, 0xFC, 0x61, 0xB0, 0x3C, 0x0F, 0x00, 0x78, 0x07, 0xC0, 0x38, 0x03, 0xC0, 0xF0, 0x36, 0x18, 0xFC,\n/* 0x8B */ 0x69,\n/* 0x8C */ 0x1E, 0xFE, 0x43, 0x81, 0x83, 0x06, 0x06, 0x0C, 0x0C, 0x18, 0x18, 0x30, 0x3F, 0xE0, 0x60, 0xC0, 0xC1, 0x81, 0x81, 0x83, 0x01, 0x8E, 0x01, 0xEF, 0xE0,\n/* 0x8D */\n/* 0x8E */ 0x1B, 0x03, 0x80, 0x03, 0xFF, 0x01, 0x80, 0xC0, 0x30, 0x18, 0x0C, 0x07, 0x01, 0x80, 0xC0, 0x60, 0x18, 0x0C, 0x03, 0xFF,\n/* 0x8F */\n/* 0x90 */\n/* 0x91 */ 0x6B,\n/* 0x92 */ 0xD6,\n/* 0x93 */ 0x4C, 0xA5, 0xB0,\n/* 0x94 */ 0xDA, 0x53, 0x20,\n/* 0x95 */ 0x6F, 0xFF, 0x60,\n/* 0x96 */ 0xFE,\n/* 0x97 */ 0xFF, 0xFF,\n/* 0x98 */ 0x4D, 0xC0,\n/* 0x99 */ 0xFC, 0xE1, 0xCC, 0x38, 0x73, 0x0E, 0x1C, 0xC3, 0x8F, 0x30, 0xD2, 0xCC, 0x34, 0xB3, 0x0D, 0x6C, 0xC3, 0x53, 0x30, 0xCC, 0xCC, 0x33, 0x30,\n/* 0x9A */ 0x24, 0x3C, 0x18, 0x7E, 0xE3, 0xC0, 0xC0, 0x60, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 0x9B */ 0x96,\n/* 0x9C */ 0x3C, 0xF8, 0xCF, 0x1B, 0x0C, 0x1E, 0x18, 0x3C, 0x3F, 0xF8, 0x60, 0x30, 0xC0, 0x61, 0x83, 0x67, 0x8C, 0x79, 0xF0,\n/* 0x9D */\n/* 0x9E */ 0x48, 0xF0, 0xC7, 0xF0, 0x61, 0x86, 0x0C, 0x30, 0xC1, 0x06, 0x0F, 0xE0,\n/* 0x9F */ 0x19, 0x80, 0x00, 0xC0, 0x36, 0x06, 0x30, 0xC3, 0x0C, 0x19, 0x81, 0xD8, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 0xA0 */\n/* 0xA1 */ 0xCF, 0xFF, 0xFF, 0xC0,\n/* 0xA2 */ 0x08, 0x04, 0x0F, 0x8D, 0x6C, 0x9E, 0x43, 0x21, 0x90, 0xC8, 0x64, 0xDA, 0xC7, 0xC0, 0x80, 0x40,\n/* 0xA3 */ 0x1F, 0x0C, 0x66, 0x0D, 0x83, 0x60, 0x0C, 0x0F, 0xC0, 0x60, 0x18, 0x06, 0x03, 0x01, 0xF1, 0x43, 0xC0,\n/* 0xA4 */ 0xFF, 0xDF, 0x1E, 0x3E, 0xFF, 0xC0,\n/* 0xA5 */ 0xC3, 0x42, 0x42, 0x24, 0x24, 0x3C, 0x18, 0x7E, 0x18, 0x7E, 0x18, 0x18, 0x18,\n/* 0xA6 */ 0xFF, 0xFC, 0x0F, 0xFF, 0xC0,\n/* 0xA7 */ 0x0C, 0x09, 0x0C, 0xC6, 0x63, 0x81, 0xE3, 0x19, 0x87, 0xE1, 0xB8, 0xC6, 0x41, 0xC0, 0x73, 0x19, 0x8C, 0x66, 0x1E, 0x00,\n/* 0xA8 */ 0xCC,\n/* 0xA9 */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9B, 0xC6, 0xD9, 0x8F, 0x60, 0x3D, 0x00, 0xF4, 0x03, 0xD8, 0x0D, 0xE6, 0x67, 0xF3, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAA */ 0x74, 0x8D, 0xA9, 0x7C, 0x1F,\n/* 0xAB */ 0x22, 0xCF, 0x26, 0x46, 0x64, 0x40,\n/* 0xAC */ 0xFF, 0x80, 0xC0, 0x60, 0x30, 0x18,\n/* 0xAD */\n/* 0xAE */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9F, 0xE6, 0xD0, 0x8F, 0x42, 0x3D, 0xF0, 0xF4, 0x23, 0xD0, 0x8D, 0xC2, 0x67, 0x0B, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAF */ 0xF8,\n/* 0xB0 */ 0x74, 0x63, 0x17, 0x00,\n/* 0xB1 */ 0x0C, 0x06, 0x03, 0x07, 0xE0, 0xC0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x3F, 0xE0,\n/* 0xB2 */ 0x7B, 0x30, 0xC3, 0x11, 0x84, 0x3F,\n/* 0xB3 */ 0x7D, 0x8C, 0x18, 0xC0, 0x60, 0xF1, 0xBE,\n/* 0xB4 */ 0x36, 0xC0,\n/* 0xB5 */ 0xC3, 0x61, 0xB0, 0xD8, 0x6C, 0x36, 0x1B, 0x0D, 0x86, 0xE7, 0x7D, 0xF0, 0x18, 0x0C, 0x00,\n/* 0xB6 */ 0x3F, 0x7E, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x72, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,\n/* 0xB7 */ 0xE0,\n/* 0xB8 */ 0x21, 0xC7, 0xE0,\n/* 0xB9 */ 0x3D, 0xB6, 0xD8,\n/* 0xBA */ 0x74, 0x63, 0x18, 0xB8, 0x1F,\n/* 0xBB */ 0x89, 0x98, 0x99, 0x3C, 0xD1, 0x00,\n/* 0xBC */ 0x20, 0x43, 0x81, 0x06, 0x08, 0x18, 0x20, 0x61, 0x01, 0x84, 0x06, 0x21, 0x80, 0x86, 0x04, 0x78, 0x32, 0x60, 0x87, 0xC4, 0x06, 0x10, 0x18,\n/* 0xBD */ 0x20, 0x43, 0x81, 0x06, 0x08, 0x18, 0x20, 0x61, 0x01, 0x8D, 0xE6, 0x2C, 0xC1, 0x03, 0x0C, 0x0C, 0x20, 0x41, 0x86, 0x0C, 0x30, 0x20, 0xFC,\n/* 0xBE */ 0x78, 0x11, 0x98, 0x40, 0x31, 0x00, 0x82, 0x00, 0xC8, 0x01, 0x90, 0x33, 0x43, 0x3D, 0x06, 0x02, 0x3C, 0x08, 0x98, 0x10, 0xF8, 0x40, 0x61, 0x00, 0xC0,\n/* 0xBF */ 0x0C, 0x00, 0x00, 0x01, 0x80, 0xC0, 0xC0, 0xE0, 0xC0, 0xC0, 0x60, 0xF0, 0x6C, 0x63, 0xE0,\n/* 0xC0 */ 0x18, 0x03, 0x00, 0x00, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC1 */ 0x06, 0x03, 0x00, 0x00, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC2 */ 0x0C, 0x04, 0x80, 0x00, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC3 */ 0x19, 0x09, 0x80, 0x00, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC4 */ 0x33, 0x00, 0x00, 0xC0, 0x78, 0x1E, 0x04, 0x83, 0x30, 0xCC, 0x33, 0x1F, 0xE6, 0x19, 0x02, 0xC0, 0xF0, 0x30,\n/* 0xC5 */ 0x0C, 0x04, 0x81, 0x20, 0x30, 0x1E, 0x07, 0x81, 0x20, 0xCC, 0x33, 0x0F, 0xC6, 0x19, 0x86, 0x40, 0xB0, 0x30,\n/* 0xC6 */ 0x07, 0xFF, 0x04, 0xC0, 0x0C, 0xC0, 0x08, 0xC0, 0x18, 0xC0, 0x18, 0xC0, 0x30, 0xFF, 0x30, 0xC0, 0x3F, 0xC0, 0x60, 0xC0, 0x60, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF,\n/* 0xC7 */ 0x1F, 0x06, 0x19, 0x83, 0xA0, 0x3C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0xE1, 0xF0, 0x08, 0x01, 0xC0, 0x18, 0x0E, 0x00,\n/* 0xC8 */ 0x18, 0x06, 0x00, 0x1F, 0xFC, 0x06, 0x03, 0x01, 0x80, 0xFF, 0x60, 0x30, 0x18, 0x0C, 0x07, 0xFC,\n/* 0xC9 */ 0x0C, 0x0C, 0x00, 0x1F, 0xFC, 0x06, 0x03, 0x01, 0x80, 0xFF, 0x60, 0x30, 0x18, 0x0C, 0x07, 0xFC,\n/* 0xCA */ 0x1C, 0x1B, 0x00, 0x1F, 0xFC, 0x06, 0x03, 0x01, 0x80, 0xFF, 0x60, 0x30, 0x18, 0x0C, 0x07, 0xFC,\n/* 0xCB */ 0x33, 0x00, 0x3F, 0xF8, 0x0C, 0x06, 0x03, 0x01, 0xFE, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x07, 0xFC,\n/* 0xCC */ 0xCC, 0x36, 0xDB, 0x6D, 0xB6, 0xD8,\n/* 0xCD */ 0x78, 0x36, 0xDB, 0x6D, 0xB6, 0xC0,\n/* 0xCE */ 0x76, 0xC0, 0x63, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18,\n/* 0xCF */ 0xCC, 0x03, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 0xD0 */ 0x7F, 0x0C, 0x31, 0x83, 0x30, 0x36, 0x06, 0xC0, 0xFE, 0x1B, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x30, 0xE7, 0xF0,\n/* 0xD1 */ 0x19, 0x02, 0xC3, 0x81, 0xF0, 0x3F, 0x07, 0xA0, 0xF6, 0x1E, 0x63, 0xC4, 0x78, 0xCF, 0x0D, 0xE1, 0xBC, 0x1F, 0x81, 0xC0,\n/* 0xD2 */ 0x0C, 0x00, 0x60, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD3 */ 0x03, 0x00, 0x60, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD4 */ 0x0F, 0x01, 0x98, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD5 */ 0x1C, 0x81, 0x38, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD6 */ 0x19, 0x81, 0x98, 0x00, 0x00, 0xF0, 0x39, 0xC6, 0x06, 0x60, 0x6C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x60, 0x63, 0x9C, 0x0F, 0x00,\n/* 0xD7 */ 0x83, 0x89, 0xA1, 0x83, 0x89, 0xA1, 0x80,\n/* 0xD8 */ 0x0F, 0xD9, 0x83, 0x18, 0x1C, 0xC1, 0xEC, 0x19, 0xE0, 0x8F, 0x08, 0x78, 0x83, 0xC8, 0x1B, 0x81, 0x98, 0x0C, 0xE0, 0xC8, 0xF8, 0x00,\n/* 0xD9 */ 0x0C, 0x00, 0xC3, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDA */ 0x06, 0x01, 0x83, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDB */ 0x0E, 0x03, 0x63, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDC */ 0x1B, 0x00, 0x03, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x36, 0x0C, 0x3E, 0x00,\n/* 0xDD */ 0x03, 0x0C, 0x63, 0x60, 0x63, 0x0C, 0x30, 0xC1, 0x98, 0x1D, 0x80, 0xF0, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 0xDE */ 0xC0, 0x30, 0x0F, 0xF3, 0x06, 0xC0, 0xF0, 0x3C, 0x0F, 0x06, 0xFF, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00,\n/* 0xDF */ 0x3C, 0x33, 0x30, 0xD8, 0x6C, 0x36, 0x33, 0x39, 0x86, 0xC1, 0xE0, 0xF0, 0x78, 0x6D, 0xE0,\n/* 0xE0 */ 0x60, 0x18, 0x06, 0x0F, 0xCE, 0x36, 0x18, 0x0C, 0x1E, 0x7B, 0x61, 0xB0, 0xD8, 0xE7, 0xB8,\n/* 0xE1 */ 0x0C, 0x04, 0x04, 0x0F, 0xCE, 0x36, 0x18, 0x0C, 0x1E, 0x7B, 0x61, 0xB0, 0xD8, 0xE7, 0xB8,\n/* 0xE2 */ 0x10, 0x14, 0x1B, 0x0F, 0xCE, 0x36, 0x18, 0x0C, 0x1E, 0x7B, 0x61, 0xB0, 0xD8, 0xE7, 0xB8,\n/* 0xE3 */ 0x24, 0x2E, 0x00, 0x0F, 0xCE, 0x36, 0x18, 0x0C, 0x1E, 0x7B, 0x61, 0xB0, 0xD8, 0xE7, 0xB8,\n/* 0xE4 */ 0x66, 0x00, 0x1F, 0x9C, 0x6C, 0x30, 0x18, 0x3C, 0xF6, 0xC3, 0x61, 0xB1, 0xCF, 0x70,\n/* 0xE5 */ 0x1C, 0x1B, 0x0D, 0x83, 0x87, 0xE7, 0x1B, 0x0C, 0x06, 0x0F, 0x3D, 0xB0, 0xD8, 0x6C, 0x73, 0xDC,\n/* 0xE6 */ 0x7E, 0xF9, 0xC7, 0x1B, 0x0C, 0x18, 0x18, 0x33, 0xFF, 0xFC, 0x60, 0x30, 0xC0, 0x61, 0x83, 0xC7, 0x8C, 0xF1, 0xF0,\n/* 0xE7 */ 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C, 0x10, 0x1C, 0x0C, 0x38,\n/* 0xE8 */ 0x60, 0x30, 0x18, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xE9 */ 0x0C, 0x08, 0x18, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xEA */ 0x10, 0x28, 0x6C, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xEB */ 0x66, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 0xEC */ 0xCC, 0xB6, 0xDB, 0x6D, 0xB6,\n/* 0xED */ 0x7A, 0x6D, 0xB6, 0xDB, 0x6C,\n/* 0xEE */ 0x6E, 0x96, 0x66, 0x66, 0x66, 0x66, 0x60,\n/* 0xEF */ 0xCC, 0x03, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C,\n/* 0xF0 */ 0x34, 0x0C, 0x16, 0x03, 0x3F, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF1 */ 0x24, 0x5C, 0x00, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 0xF2 */ 0x30, 0x18, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF3 */ 0x0C, 0x18, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF4 */ 0x18, 0x24, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF5 */ 0x34, 0x2C, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF6 */ 0x66, 0x00, 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 0xF7 */ 0x18, 0x00, 0x00, 0x1F, 0xF0, 0x00, 0x00, 0x00, 0x30,\n/* 0xF8 */ 0x3D, 0x66, 0xC7, 0xCB, 0xCB, 0xD3, 0xD3, 0xE3, 0x66, 0xBC,\n/* 0xF9 */ 0x60, 0x30, 0x18, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFA */ 0x06, 0x0C, 0x18, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFB */ 0x3C, 0x66, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFC */ 0x66, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 0xFD */ 0x06, 0x04, 0x08, 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 0xFE */ 0xC0, 0x60, 0x30, 0x1B, 0xCE, 0x36, 0x0F, 0x07, 0x83, 0xC1, 0xE0, 0xF0, 0x7C, 0x6D, 0xE6, 0x03, 0x01, 0x80,\n/* 0xFF */ 0x33, 0x00, 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n};\n\nconst GFXglyph FreeSans9pt_Win1252Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   15,  15,  17,   1,  -13 },\n/* 0x02 */ {    29,   15,  15,  17,   1,  -13 },\n/* 0x03 */ {    58,   15,  16,  17,   1,  -14 },\n/* 0x04 */ {    88,   15,  16,  17,   1,  -14 },\n/* 0x05 */ {   118,   16,  15,  18,   1,  -13 },\n/* 0x06 */ {   148,   15,  15,  17,   1,  -13 },\n/* 0x07 */ {   177,    0,   0,   8,   0,    0 },\n/* 0x08 */ {   177,   17,  16,  19,   1,  -14 },\n/* 0x09 */ {   211,   17,  12,  19,   1,  -12 },\n/* 0x0A */ {   237,    0,   0,   8,   0,    0 },\n/* 0x0B */ {   237,   17,  16,  19,   1,  -14 },\n/* 0x0C */ {   271,   15,  14,  17,   1,  -12 },\n/* 0x0D */ {   298,    0,   0,   8,   0,    0 },\n/* 0x0E */ {   298,   15,  16,  17,   1,  -14 },\n/* 0x0F */ {   328,   15,  15,  17,   1,  -13 },\n/* 0x10 */ {   357,   15,  15,  17,   1,  -13 },\n/* 0x11 */ {   386,   15,  16,  17,   1,  -14 },\n/* 0x12 */ {   416,   17,  17,  19,   1,  -15 },\n/* 0x13 */ {   453,   15,  16,  17,   1,  -14 },\n/* 0x14 */ {   483,   15,  16,  17,   1,  -14 },\n/* 0x15 */ {   513,   15,  16,  17,   1,  -14 },\n/* 0x16 */ {   543,   11,  16,  13,   1,  -14 },\n/* 0x17 */ {   565,   15,  16,  17,   1,  -14 },\n/* 0x18 */ {   595,   18,  15,  20,   1,  -13 },\n/* 0x19 */ {   629,   15,  16,  17,   1,  -14 },\n/* 0x1A */ {   659,   13,  14,  15,   1,  -12 },\n/* 0x1B */ {   682,   17,  16,  19,   1,  -14 },\n/* 0x1C */ {   716,   15,  16,  17,   1,  -14 },\n/* 0x1D */ {   746,   15,  15,  17,   1,  -13 },\n/* 0x1E */ {   775,   17,  16,  19,   1,  -14 },\n/* 0x1F */ {   809,   11,  16,  13,   1,  -14 },\n/* ' ' 0x20 */ {   831,    0,   0,   5,   0,    0 },\n/* '!' 0x21 */ {   831,    2,  13,   6,   2,  -12 },\n/* '\"' 0x22 */ {   835,    5,   4,   6,   1,  -12 },\n/* '#' 0x23 */ {   838,   10,  12,  10,   0,  -11 },\n/* '$' 0x24 */ {   853,    9,  16,  10,   1,  -13 },\n/* '%' 0x25 */ {   871,   16,  13,  16,   1,  -12 },\n/* '&' 0x26 */ {   897,   10,  13,  12,   1,  -12 },\n/* ''' 0x27 */ {   914,    2,   4,   4,   1,  -12 },\n/* '(' 0x28 */ {   915,    4,  17,   6,   1,  -12 },\n/* ')' 0x29 */ {   924,    4,  17,   6,   1,  -12 },\n/* '*' 0x2A */ {   933,    5,   5,   7,   1,  -12 },\n/* '+' 0x2B */ {   937,    6,   8,  11,   3,   -7 },\n/* ',' 0x2C */ {   943,    2,   4,   5,   2,    0 },\n/* '-' 0x2D */ {   944,    4,   1,   6,   1,   -4 },\n/* '.' 0x2E */ {   945,    2,   1,   5,   1,    0 },\n/* '/' 0x2F */ {   946,    5,  13,   5,   0,  -12 },\n/* '0' 0x30 */ {   955,    8,  13,  10,   1,  -12 },\n/* '1' 0x31 */ {   968,    4,  13,  10,   3,  -12 },\n/* '2' 0x32 */ {   975,    9,  13,  10,   1,  -12 },\n/* '3' 0x33 */ {   990,    8,  13,  10,   1,  -12 },\n/* '4' 0x34 */ {  1003,    7,  13,  10,   2,  -12 },\n/* '5' 0x35 */ {  1015,    9,  13,  10,   1,  -12 },\n/* '6' 0x36 */ {  1030,    9,  13,  10,   1,  -12 },\n/* '7' 0x37 */ {  1045,    8,  13,  10,   0,  -12 },\n/* '8' 0x38 */ {  1058,    9,  13,  10,   1,  -12 },\n/* '9' 0x39 */ {  1073,    8,  13,  10,   1,  -12 },\n/* ':' 0x3A */ {  1086,    2,  10,   5,   1,   -9 },\n/* ';' 0x3B */ {  1089,    3,  12,   5,   1,   -8 },\n/* '<' 0x3C */ {  1094,    9,   9,  11,   1,   -8 },\n/* '=' 0x3D */ {  1105,    9,   4,  11,   1,   -5 },\n/* '>' 0x3E */ {  1110,    9,   8,  11,   1,   -7 },\n/* '?' 0x3F */ {  1119,    9,  13,  10,   1,  -12 },\n/* '@' 0x40 */ {  1134,   17,  16,  18,   1,  -12 },\n/* 'A' 0x41 */ {  1168,   12,  13,  12,   0,  -12 },\n/* 'B' 0x42 */ {  1188,   11,  13,  12,   1,  -12 },\n/* 'C' 0x43 */ {  1206,   11,  13,  13,   1,  -12 },\n/* 'D' 0x44 */ {  1224,   11,  13,  13,   1,  -12 },\n/* 'E' 0x45 */ {  1242,    9,  13,  11,   1,  -12 },\n/* 'F' 0x46 */ {  1257,    8,  13,  11,   1,  -12 },\n/* 'G' 0x47 */ {  1270,   12,  13,  14,   1,  -12 },\n/* 'H' 0x48 */ {  1290,   11,  13,  13,   1,  -12 },\n/* 'I' 0x49 */ {  1308,    2,  13,   5,   2,  -12 },\n/* 'J' 0x4A */ {  1312,    7,  13,  10,   1,  -12 },\n/* 'K' 0x4B */ {  1324,   10,  13,  12,   1,  -12 },\n/* 'L' 0x4C */ {  1341,    8,  13,  10,   1,  -12 },\n/* 'M' 0x4D */ {  1354,   13,  13,  15,   1,  -12 },\n/* 'N' 0x4E */ {  1376,   11,  13,  13,   1,  -12 },\n/* 'O' 0x4F */ {  1394,   13,  13,  14,   1,  -12 },\n/* 'P' 0x50 */ {  1416,   10,  13,  12,   1,  -12 },\n/* 'Q' 0x51 */ {  1433,   13,  14,  14,   1,  -12 },\n/* 'R' 0x52 */ {  1456,   12,  13,  13,   1,  -12 },\n/* 'S' 0x53 */ {  1476,   10,  13,  12,   1,  -12 },\n/* 'T' 0x54 */ {  1493,    9,  13,  11,   1,  -12 },\n/* 'U' 0x55 */ {  1508,   11,  13,  13,   1,  -12 },\n/* 'V' 0x56 */ {  1526,   11,  13,  11,   0,  -12 },\n/* 'W' 0x57 */ {  1544,   16,  13,  17,   0,  -12 },\n/* 'X' 0x58 */ {  1570,   10,  13,  12,   1,  -12 },\n/* 'Y' 0x59 */ {  1587,   12,  13,  12,   0,  -12 },\n/* 'Z' 0x5A */ {  1607,   10,  13,  11,   1,  -12 },\n/* '[' 0x5B */ {  1624,    3,  17,   5,   1,  -12 },\n/* '\\' 0x5C */ {  1631,    5,  13,   5,   0,  -12 },\n/* ']' 0x5D */ {  1640,    3,  17,   5,   0,  -12 },\n/* '^' 0x5E */ {  1647,    7,   7,   8,   1,  -12 },\n/* '_' 0x5F */ {  1654,   10,   1,  10,   0,    3 },\n/* '`' 0x60 */ {  1656,    4,   3,   5,   0,  -12 },\n/* 'a' 0x61 */ {  1658,    9,  10,  10,   1,   -9 },\n/* 'b' 0x62 */ {  1670,    9,  13,  10,   1,  -12 },\n/* 'c' 0x63 */ {  1685,    8,  10,   9,   1,   -9 },\n/* 'd' 0x64 */ {  1695,    8,  13,  10,   1,  -12 },\n/* 'e' 0x65 */ {  1708,    8,  10,  10,   1,   -9 },\n/* 'f' 0x66 */ {  1718,    4,  13,   5,   1,  -12 },\n/* 'g' 0x67 */ {  1725,    8,  14,  10,   1,   -9 },\n/* 'h' 0x68 */ {  1739,    8,  13,  10,   1,  -12 },\n/* 'i' 0x69 */ {  1752,    2,  13,   4,   1,  -12 },\n/* 'j' 0x6A */ {  1756,    4,  17,   4,   0,  -12 },\n/* 'k' 0x6B */ {  1765,    8,  13,   9,   1,  -12 },\n/* 'l' 0x6C */ {  1778,    2,  13,   4,   1,  -12 },\n/* 'm' 0x6D */ {  1782,   13,  10,  15,   1,   -9 },\n/* 'n' 0x6E */ {  1799,    8,  10,  10,   1,   -9 },\n/* 'o' 0x6F */ {  1809,    8,  10,  10,   1,   -9 },\n/* 'p' 0x70 */ {  1819,    9,  13,  10,   1,   -9 },\n/* 'q' 0x71 */ {  1834,    8,  13,  10,   1,   -9 },\n/* 'r' 0x72 */ {  1847,    5,  10,   6,   1,   -9 },\n/* 's' 0x73 */ {  1854,    8,  10,   9,   1,   -9 },\n/* 't' 0x74 */ {  1864,    4,  12,   5,   1,  -11 },\n/* 'u' 0x75 */ {  1870,    8,  10,  10,   1,   -9 },\n/* 'v' 0x76 */ {  1880,    9,  10,   9,   0,   -9 },\n/* 'w' 0x77 */ {  1892,   13,  10,  13,   0,   -9 },\n/* 'x' 0x78 */ {  1909,    7,  10,   9,   1,   -9 },\n/* 'y' 0x79 */ {  1918,    8,  14,   9,   0,   -9 },\n/* 'z' 0x7A */ {  1932,    7,  10,   9,   1,   -9 },\n/* '{' 0x7B */ {  1941,    4,  17,   6,   1,  -12 },\n/* '|' 0x7C */ {  1950,    2,  17,   4,   2,  -12 },\n/* '}' 0x7D */ {  1955,    4,  17,   6,   1,  -12 },\n/* '~' 0x7E */ {  1964,    7,   3,   9,   1,   -7 },\n/* 0x7F */ {  1967,    0,   0,   0,   0,    0 },\n/* 0x80 */ {  1967,   10,  13,  12,   1,  -12 },\n/* 0x81 */ {  1984,    0,   0,   8,   0,    0 },\n/* 0x82 */ {  1984,    2,   3,   5,   1,    0 },\n/* 0x83 */ {  1985,    5,  17,   5,   0,  -12 },\n/* 0x84 */ {  1996,    5,   3,   7,   1,    0 },\n/* 0x85 */ {  1998,   10,   1,  12,   1,    0 },\n/* 0x86 */ {  2000,    8,  16,  10,   1,  -12 },\n/* 0x87 */ {  2016,    8,  16,  10,   1,  -12 },\n/* 0x88 */ {  2032,    5,   3,   6,   0,  -12 },\n/* 0x89 */ {  2034,   18,  13,  18,   0,  -12 },\n/* 0x8A */ {  2064,   10,  16,  12,   1,  -15 },\n/* 0x8B */ {  2084,    2,   4,   4,   1,   -6 },\n/* 0x8C */ {  2085,   15,  13,  18,   1,  -12 },\n/* 0x8D */ {  2110,    0,   0,   8,   0,    0 },\n/* 0x8E */ {  2110,   10,  16,  11,   1,  -15 },\n/* 0x8F */ {  2130,    0,   0,   8,   0,    0 },\n/* 0x90 */ {  2130,    0,   0,   8,   0,    0 },\n/* 0x91 */ {  2130,    2,   4,   4,   2,  -12 },\n/* 0x92 */ {  2131,    2,   4,   4,   1,  -12 },\n/* 0x93 */ {  2132,    5,   4,   7,   2,  -12 },\n/* 0x94 */ {  2135,    5,   4,   7,   1,  -12 },\n/* 0x95 */ {  2138,    4,   5,   7,   1,   -8 },\n/* 0x96 */ {  2141,    7,   1,   9,   1,   -4 },\n/* 0x97 */ {  2142,   16,   1,  18,   1,   -4 },\n/* 0x98 */ {  2144,    5,   2,   6,   0,  -12 },\n/* 0x99 */ {  2146,   18,  10,  18,   1,  -13 },\n/* 0x9A */ {  2169,    8,  13,   9,   1,  -12 },\n/* 0x9B */ {  2182,    2,   4,   5,   2,   -6 },\n/* 0x9C */ {  2183,   15,  10,  17,   1,   -9 },\n/* 0x9D */ {  2202,    0,   0,   8,   0,    0 },\n/* 0x9E */ {  2202,    7,  13,   9,   1,  -12 },\n/* 0x9F */ {  2214,   12,  14,  12,   0,  -13 },\n/* 0xA0 */ {  2235,    0,   0,   5,   0,    0 },\n/* 0xA1 */ {  2235,    2,  13,   6,   2,   -8 },\n/* 0xA2 */ {  2239,    9,  14,  10,   1,  -11 },\n/* 0xA3 */ {  2255,   10,  13,  10,   0,  -12 },\n/* 0xA4 */ {  2272,    7,   6,  10,   2,   -8 },\n/* 0xA5 */ {  2278,    8,  13,  10,   1,  -12 },\n/* 0xA6 */ {  2291,    2,  17,   5,   2,  -12 },\n/* 0xA7 */ {  2296,    9,  17,  10,   1,  -12 },\n/* 0xA8 */ {  2316,    6,   1,   6,   0,  -11 },\n/* 0xA9 */ {  2317,   14,  13,  14,   1,  -12 },\n/* 0xAA */ {  2340,    5,   8,   7,   1,  -12 },\n/* 0xAB */ {  2345,    7,   6,   9,   1,   -7 },\n/* 0xAC */ {  2351,    9,   5,  11,   2,   -5 },\n/* 0xAD */ {  2357,    0,   0,   0,   0,    0 },\n/* 0xAE */ {  2357,   14,  13,  14,   1,  -12 },\n/* 0xAF */ {  2380,    5,   1,   6,   0,  -12 },\n/* 0xB0 */ {  2381,    5,   5,  11,   3,  -11 },\n/* 0xB1 */ {  2385,    9,  11,  11,   1,  -10 },\n/* 0xB2 */ {  2398,    6,   8,   6,   1,  -13 },\n/* 0xB3 */ {  2404,    7,   8,   6,   0,  -13 },\n/* 0xB4 */ {  2411,    4,   3,   6,   2,  -12 },\n/* 0xB5 */ {  2413,    9,  13,  10,   1,   -9 },\n/* 0xB6 */ {  2428,    8,  16,  10,   2,  -12 },\n/* 0xB7 */ {  2444,    3,   1,   5,   1,   -4 },\n/* 0xB8 */ {  2445,    5,   4,   6,   1,    1 },\n/* 0xB9 */ {  2448,    3,   7,   6,   2,  -13 },\n/* 0xBA */ {  2451,    5,   8,   7,   1,  -12 },\n/* 0xBB */ {  2456,    7,   6,   9,   1,   -7 },\n/* 0xBC */ {  2462,   14,  13,  16,   2,  -12 },\n/* 0xBD */ {  2485,   14,  13,  16,   2,  -12 },\n/* 0xBE */ {  2508,   15,  13,  16,   1,  -12 },\n/* 0xBF */ {  2533,    9,  13,  10,   1,   -8 },\n/* 0xC0 */ {  2548,   10,  14,  12,   1,  -13 },\n/* 0xC1 */ {  2566,   10,  14,  12,   1,  -13 },\n/* 0xC2 */ {  2584,   10,  14,  12,   1,  -13 },\n/* 0xC3 */ {  2602,   10,  14,  12,   1,  -13 },\n/* 0xC4 */ {  2620,   10,  14,  12,   1,  -13 },\n/* 0xC5 */ {  2638,   10,  14,  12,   1,  -13 },\n/* 0xC6 */ {  2656,   16,  13,  18,   1,  -12 },\n/* 0xC7 */ {  2682,   11,  17,  13,   1,  -12 },\n/* 0xC8 */ {  2706,    9,  14,  11,   1,  -13 },\n/* 0xC9 */ {  2722,    9,  14,  11,   1,  -13 },\n/* 0xCA */ {  2738,    9,  14,  11,   1,  -13 },\n/* 0xCB */ {  2754,    9,  14,  11,   1,  -13 },\n/* 0xCC */ {  2770,    3,  15,   5,   1,  -13 },\n/* 0xCD */ {  2776,    3,  14,   5,   1,  -13 },\n/* 0xCE */ {  2782,    5,  14,   5,   0,  -13 },\n/* 0xCF */ {  2791,    6,  14,   5,   0,  -13 },\n/* 0xD0 */ {  2802,   11,  13,  13,   1,  -12 },\n/* 0xD1 */ {  2820,   11,  14,  13,   1,  -13 },\n/* 0xD2 */ {  2840,   12,  15,  13,   1,  -14 },\n/* 0xD3 */ {  2863,   12,  15,  13,   1,  -14 },\n/* 0xD4 */ {  2886,   12,  15,  13,   1,  -14 },\n/* 0xD5 */ {  2909,   12,  15,  13,   1,  -14 },\n/* 0xD6 */ {  2932,   12,  15,  13,   1,  -14 },\n/* 0xD7 */ {  2955,    7,   7,  11,   2,   -7 },\n/* 0xD8 */ {  2962,   13,  13,  14,   1,  -12 },\n/* 0xD9 */ {  2984,   11,  14,  13,   1,  -13 },\n/* 0xDA */ {  3004,   11,  14,  13,   1,  -13 },\n/* 0xDB */ {  3024,   11,  14,  13,   1,  -13 },\n/* 0xDC */ {  3044,   11,  14,  13,   1,  -13 },\n/* 0xDD */ {  3064,   12,  14,  12,   0,  -13 },\n/* 0xDE */ {  3085,   10,  13,  12,   1,  -12 },\n/* 0xDF */ {  3102,    9,  13,  11,   1,  -12 },\n/* 0xE0 */ {  3117,    9,  13,  10,   1,  -12 },\n/* 0xE1 */ {  3132,    9,  13,  10,   1,  -12 },\n/* 0xE2 */ {  3147,    9,  13,  10,   1,  -12 },\n/* 0xE3 */ {  3162,    9,  13,  10,   1,  -12 },\n/* 0xE4 */ {  3177,    9,  12,  10,   1,  -11 },\n/* 0xE5 */ {  3191,    9,  14,  10,   1,  -13 },\n/* 0xE6 */ {  3207,   15,  10,  16,   1,   -9 },\n/* 0xE7 */ {  3226,    8,  14,   9,   1,   -9 },\n/* 0xE8 */ {  3240,    8,  13,  10,   1,  -12 },\n/* 0xE9 */ {  3253,    8,  13,  10,   1,  -12 },\n/* 0xEA */ {  3266,    8,  13,  10,   1,  -12 },\n/* 0xEB */ {  3279,    8,  12,  10,   1,  -11 },\n/* 0xEC */ {  3291,    3,  13,   4,   0,  -12 },\n/* 0xED */ {  3296,    3,  13,   4,   1,  -12 },\n/* 0xEE */ {  3301,    4,  13,   5,   0,  -12 },\n/* 0xEF */ {  3308,    6,  12,   5,  -1,  -11 },\n/* 0xF0 */ {  3317,    8,  13,  10,   1,  -12 },\n/* 0xF1 */ {  3330,    8,  13,  10,   1,  -12 },\n/* 0xF2 */ {  3343,    8,  13,  10,   1,  -12 },\n/* 0xF3 */ {  3356,    8,  13,  10,   1,  -12 },\n/* 0xF4 */ {  3369,    8,  13,  10,   1,  -12 },\n/* 0xF5 */ {  3382,    8,  13,  10,   1,  -12 },\n/* 0xF6 */ {  3395,    8,  12,  10,   1,  -11 },\n/* 0xF7 */ {  3407,    9,   8,  11,   1,   -7 },\n/* 0xF8 */ {  3416,    8,  10,  10,   1,   -9 },\n/* 0xF9 */ {  3426,    8,  13,  10,   1,  -12 },\n/* 0xFA */ {  3439,    8,  13,  10,   1,  -12 },\n/* 0xFB */ {  3452,    8,  13,  10,   1,  -12 },\n/* 0xFC */ {  3465,    8,  12,  10,   1,  -11 },\n/* 0xFD */ {  3477,    8,  17,   9,   0,  -12 },\n/* 0xFE */ {  3494,    9,  16,  10,   1,  -12 },\n/* 0xFF */ {  3512,    8,  16,   9,   0,  -11 },\n};\n\nconst GFXfont FreeSans9pt_Win1252 PROGMEM = {\n(uint8_t*)FreeSans9pt_Win1252Bitmaps,\n(GFXglyph*)FreeSans9pt_Win1252Glyphs,\n0x01, 0xFF, 16\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/FreeSans9pt_Win1253.h",
    "content": "// trunk-ignore-all(clang-format)\n#pragma once\n/* PROPERTIES\n\nFONT_NAME FreeSans9pt_Win1253\n*/\nconst uint8_t FreeSans9pt_Win1253Bitmaps[] PROGMEM = {\n/* 0x01 */ 0x07, 0x00, 0x0A, 0x00, 0x24, 0x00, 0x48, 0x01, 0x10, 0x04, 0x40, 0x10, 0xFF, 0x20, 0x02, 0x81, 0xFD, 0x00, 0x06, 0x07, 0xF4, 0x08, 0x24, 0x0F, 0x88, 0x11, 0x0F, 0xDC, 0x00,\n/* 0x02 */ 0x3F, 0x70, 0x81, 0x11, 0x03, 0xE4, 0x08, 0x28, 0x1F, 0xD0, 0x00, 0x60, 0x7F, 0x20, 0x02, 0x43, 0xFC, 0x44, 0x00, 0x44, 0x00, 0x48, 0x00, 0x90, 0x00, 0xA0, 0x01, 0xC0, 0x00,\n/* 0x03 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x8C, 0x63, 0x18, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x20, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x04 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x30, 0x88, 0x62, 0x08, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x05 */ 0x0B, 0x10, 0x14, 0xA8, 0x12, 0x50, 0x29, 0x42, 0x24, 0xA5, 0x32, 0x95, 0x5A, 0x09, 0x48, 0x09, 0x24, 0x01, 0x10, 0x01, 0x48, 0x02, 0xA4, 0x02, 0x42, 0x04, 0x01, 0x98, 0x00, 0x60,\n/* 0x06 */ 0x00, 0x80, 0x22, 0x80, 0x65, 0x00, 0xBE, 0xE1, 0x82, 0x4E, 0x03, 0x24, 0x04, 0x28, 0x06, 0x30, 0x12, 0x20, 0x3C, 0xA0, 0xC3, 0xFE, 0x80, 0x4D, 0x00, 0xA6, 0x01, 0x80, 0x00,\n/* 0x07 */\n/* 0x08 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x02, 0x00, 0x03, 0x01, 0x00, 0x09, 0x88, 0x0C, 0x0C,\n/* 0x09 */ 0x00, 0xF8, 0x00, 0x82, 0x00, 0x80, 0x83, 0xE0, 0x41, 0x10, 0x21, 0x04, 0x1B, 0x00, 0x03, 0x00, 0x01, 0x80, 0x00, 0xE0, 0x00, 0x4F, 0xE1, 0xC0, 0x0F, 0x00,\n/* 0x0A */\n/* 0x0B */ 0x1C, 0x1C, 0x31, 0xB1, 0x90, 0x50, 0x50, 0x10, 0x18, 0x00, 0x0C, 0x00, 0x06, 0x00, 0x02, 0x80, 0x02, 0x40, 0x01, 0x10, 0x01, 0x04, 0x01, 0x01, 0x01, 0x00, 0x41, 0x00, 0x11, 0x00, 0x07, 0x00, 0x01, 0x00,\n/* 0x0C */ 0x06, 0x00, 0x0A, 0x00, 0x12, 0x00, 0x32, 0x01, 0x84, 0x04, 0x10, 0x08, 0x98, 0x1C, 0x18, 0x40, 0x48, 0x82, 0x11, 0xF0, 0x74, 0x02, 0x18, 0x70, 0x2F, 0x9F, 0x80,\n/* 0x0D */\n/* 0x0E */ 0x01, 0x00, 0x05, 0x00, 0x0A, 0x00, 0x3E, 0x00, 0x82, 0x02, 0x82, 0x06, 0x04, 0x10, 0x04, 0x20, 0x08, 0x40, 0x10, 0xFF, 0x22, 0x00, 0x29, 0xFF, 0x3F, 0x8F, 0xDF, 0x9F, 0x01, 0xC0,\n/* 0x0F */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x82, 0x36, 0x03, 0x60, 0x00, 0xCC, 0x19, 0xA4, 0x4B, 0x00, 0x06, 0x8E, 0x2B, 0x22, 0x66, 0x7C, 0xCC, 0x71, 0x98, 0x03, 0x00,\n/* 0x10 */ 0x03, 0x80, 0x07, 0x00, 0x0E, 0x00, 0x1E, 0x00, 0x54, 0x00, 0xA8, 0x01, 0x50, 0x02, 0xA0, 0x05, 0x20, 0x32, 0x61, 0xC4, 0x74, 0x49, 0x10, 0x6C, 0x00, 0xD8, 0x01, 0x10, 0x00,\n/* 0x11 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x40, 0x29, 0x00, 0x31, 0x84, 0x63, 0x18, 0xC0, 0x00, 0x80, 0x15, 0x03, 0x7E, 0x02, 0xFA, 0x04, 0xE4, 0x18, 0x84, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x12 */ 0x02, 0x08, 0x01, 0x08, 0x40, 0x10, 0xC0, 0x08, 0xC0, 0x60, 0x80, 0x28, 0x04, 0x12, 0x4C, 0x10, 0x80, 0x08, 0x23, 0x0E, 0x08, 0xC4, 0x82, 0x04, 0x20, 0x83, 0x09, 0x82, 0x47, 0x01, 0x1C, 0x01, 0x30, 0x00, 0xE0, 0x00, 0x00,\n/* 0x13 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x31, 0x08, 0x65, 0x28, 0xC0, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x14 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x22, 0x29, 0x83, 0x30, 0x00, 0x65, 0x14, 0xD3, 0x4D, 0xBA, 0xEB, 0x38, 0xE6, 0x00, 0x0A, 0x00, 0x24, 0x38, 0x44, 0x01, 0x07, 0x1C, 0x01, 0xC0,\n/* 0x15 */ 0x07, 0xC0, 0x30, 0x18, 0x80, 0x32, 0x00, 0xF8, 0x01, 0xF1, 0x09, 0xA5, 0x28, 0x40, 0x01, 0x80, 0x03, 0x00, 0x06, 0x3F, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x16 */ 0x0C, 0x00, 0xC0, 0x1C, 0x03, 0x80, 0xF8, 0xBB, 0x36, 0xC7, 0x99, 0xF3, 0xFE, 0x3F, 0xC3, 0xF0, 0x7E, 0x0E, 0xC1, 0x8E, 0xE0, 0x20,\n/* 0x17 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x10, 0x01, 0x20, 0x1D, 0x44, 0x42, 0x84, 0x85, 0x00, 0x86, 0x00, 0xC4, 0x00, 0x44, 0x7C, 0x44, 0x00, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x18 */ 0x01, 0xE0, 0x00, 0x84, 0x00, 0x40, 0x80, 0x20, 0x10, 0x08, 0x24, 0x02, 0x41, 0x00, 0x86, 0x03, 0x12, 0x03, 0xB4, 0x03, 0x52, 0x81, 0x23, 0x80, 0x70, 0xA0, 0x14, 0x28, 0x05, 0x0A, 0x01, 0x42, 0x80, 0x50,\n/* 0x19 */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x00, 0x28, 0x00, 0x33, 0x18, 0x60, 0x00, 0xDC, 0xE1, 0xB9, 0xC3, 0x7B, 0xC6, 0x63, 0x0A, 0x00, 0x24, 0xF0, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1A */ 0xFF, 0xFC, 0x00, 0x63, 0xE3, 0x31, 0x99, 0x04, 0xC8, 0x66, 0x06, 0x30, 0x61, 0x82, 0x0C, 0x10, 0x60, 0x03, 0x04, 0x18, 0x00, 0xFF, 0xFC,\n/* 0x1B */ 0x07, 0xF0, 0x06, 0x0C, 0x04, 0x01, 0x04, 0x00, 0x44, 0x22, 0x12, 0x2A, 0x89, 0x00, 0x04, 0x80, 0x02, 0x44, 0x11, 0x01, 0xF0, 0x04, 0x01, 0x0D, 0x01, 0x6A, 0x41, 0x2C, 0x00, 0x05, 0xC0, 0x0E, 0x18, 0x18,\n/* 0x1C */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0xC0, 0x2A, 0x00, 0x33, 0x00, 0x66, 0x00, 0xCC, 0x39, 0x80, 0x83, 0x00, 0x06, 0x00, 0x8C, 0x3E, 0x14, 0x00, 0x44, 0x01, 0x06, 0x0C, 0x03, 0xE0,\n/* 0x1D */ 0x07, 0xC0, 0x30, 0x60, 0x80, 0x22, 0x70, 0x28, 0x00, 0x31, 0x80, 0x63, 0x18, 0xC0, 0x31, 0x80, 0x03, 0x00, 0x06, 0x60, 0x0D, 0x33, 0x12, 0x10, 0x48, 0x21, 0x23, 0x8C, 0x00,\n/* 0x1E */ 0x03, 0x00, 0x07, 0x9E, 0x07, 0x00, 0x86, 0x00, 0x27, 0xC0, 0x0F, 0xC0, 0x07, 0x8C, 0x62, 0x06, 0x31, 0x20, 0x00, 0x90, 0x00, 0x48, 0x00, 0x24, 0x3E, 0x11, 0x00, 0x10, 0x40, 0x10, 0x18, 0x30, 0x03, 0xE0,\n/* 0x1F */ 0x18, 0x02, 0x80, 0x4C, 0x16, 0x41, 0x24, 0x3C, 0x88, 0x6E, 0x65, 0xF2, 0x78, 0x46, 0x88, 0xCF, 0x18, 0x02, 0x80, 0x8C, 0x60, 0x70,\n/* ' ' 0x20 */\n/* '!' 0x21 */ 0xFF, 0xFF, 0xF0, 0xC0,\n/* '\"' 0x22 */ 0xDE, 0xF7, 0x20,\n/* '#' 0x23 */ 0x09, 0x86, 0x41, 0x91, 0xFF, 0x13, 0x04, 0xC3, 0x20, 0xC8, 0xFF, 0x89, 0x82, 0x61, 0x90,\n/* '$' 0x24 */ 0x10, 0x1F, 0x14, 0xDA, 0x3D, 0x1E, 0x83, 0x40, 0x78, 0x17, 0x08, 0xF4, 0x7A, 0x35, 0x33, 0xF0, 0x40, 0x20,\n/* '%' 0x25 */ 0x38, 0x10, 0xEC, 0x20, 0xC6, 0x20, 0xC6, 0x40, 0xC6, 0x40, 0x6C, 0x80, 0x39, 0x00, 0x01, 0x3C, 0x02, 0x77, 0x02, 0x63, 0x04, 0x63, 0x04, 0x77, 0x08, 0x3C,\n/* '&' 0x26 */ 0x0E, 0x0C, 0xC3, 0x30, 0xCC, 0x1E, 0x03, 0x03, 0xC1, 0x9B, 0xC2, 0xF0, 0xEC, 0x19, 0x8F, 0x3C, 0x40,\n/* ''' 0x27 */ 0xFE,\n/* '(' 0x28 */ 0x13, 0x26, 0x6C, 0xCC, 0xCC, 0xC4, 0x66, 0x23, 0x10,\n/* ')' 0x29 */ 0x8C, 0x46, 0x63, 0x33, 0x33, 0x32, 0x66, 0x4C, 0x80,\n/* '*' 0x2A */ 0x25, 0x7E, 0xA5, 0x00,\n/* '+' 0x2B */ 0x30, 0xC3, 0x3F, 0x30, 0xC3, 0x0C,\n/* ',' 0x2C */ 0xD6,\n/* '-' 0x2D */ 0xF0,\n/* '.' 0x2E */ 0xC0,\n/* '/' 0x2F */ 0x08, 0x44, 0x21, 0x10, 0x84, 0x42, 0x11, 0x08, 0x00,\n/* '0' 0x30 */ 0x3C, 0x66, 0x42, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x42, 0x66, 0x3C,\n/* '1' 0x31 */ 0x11, 0x3F, 0x33, 0x33, 0x33, 0x33, 0x30,\n/* '2' 0x32 */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x10, 0x08, 0x07, 0xF8,\n/* '3' 0x33 */ 0x3C, 0x66, 0xC3, 0xC3, 0x03, 0x06, 0x1C, 0x07, 0x03, 0xC3, 0xC3, 0x66, 0x3C,\n/* '4' 0x34 */ 0x0C, 0x18, 0x71, 0x62, 0xC9, 0xA3, 0x46, 0xFE, 0x18, 0x30, 0x60, 0xC0,\n/* '5' 0x35 */ 0x7F, 0x20, 0x10, 0x08, 0x08, 0x07, 0xF3, 0x8C, 0x03, 0x01, 0x80, 0xF0, 0x6C, 0x63, 0xE0,\n/* '6' 0x36 */ 0x1E, 0x31, 0x98, 0x78, 0x0C, 0x06, 0xF3, 0x8D, 0x83, 0xC1, 0xE0, 0xD0, 0x6C, 0x63, 0xE0,\n/* '7' 0x37 */ 0xFF, 0x03, 0x02, 0x06, 0x04, 0x0C, 0x08, 0x18, 0x18, 0x18, 0x10, 0x30, 0x30,\n/* '8' 0x38 */ 0x3E, 0x31, 0xB0, 0x78, 0x3C, 0x1B, 0x18, 0xF8, 0xC6, 0xC1, 0xE0, 0xF0, 0x6C, 0x63, 0xE0,\n/* '9' 0x39 */ 0x3C, 0x66, 0xC2, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC2, 0x66, 0x3C,\n/* ':' 0x3A */ 0xC0, 0x00, 0x30,\n/* ';' 0x3B */ 0xC0, 0x00, 0x00, 0x64, 0xA0,\n/* '<' 0x3C */ 0x00, 0x81, 0xC7, 0x8E, 0x0C, 0x07, 0x80, 0x70, 0x0E, 0x01, 0x80,\n/* '=' 0x3D */ 0xFF, 0x80, 0x00, 0x1F, 0xF0,\n/* '>' 0x3E */ 0xE0, 0x1C, 0x03, 0x80, 0x30, 0x70, 0xE3, 0x81, 0x00,\n/* '?' 0x3F */ 0x3E, 0x31, 0xB0, 0x78, 0x30, 0x18, 0x18, 0x38, 0x18, 0x18, 0x0C, 0x00, 0x00, 0x01, 0x80,\n/* '@' 0x40 */ 0x03, 0xF0, 0x06, 0x0E, 0x06, 0x01, 0x86, 0x00, 0x66, 0x1D, 0xBB, 0x31, 0xCF, 0x18, 0xC7, 0x98, 0x63, 0xCC, 0x31, 0xE6, 0x11, 0xB3, 0x99, 0xCC, 0xF7, 0x86, 0x00, 0x01, 0x80, 0x00, 0x70, 0x40, 0x0F, 0xE0,\n/* 'A' 0x41 */ 0x06, 0x00, 0xF0, 0x0F, 0x00, 0x90, 0x19, 0x81, 0x98, 0x10, 0x83, 0x0C, 0x3F, 0xC2, 0x04, 0x60, 0x66, 0x06, 0xC0, 0x30,\n/* 'B' 0x42 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x6C, 0x0D, 0x83, 0x3F, 0xC6, 0x06, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x6F, 0xF8,\n/* 'C' 0x43 */ 0x1F, 0x86, 0x19, 0x81, 0xA0, 0x3C, 0x01, 0x80, 0x30, 0x06, 0x00, 0xC0, 0x68, 0x0D, 0x83, 0x18, 0x61, 0xF0,\n/* 'D' 0x44 */ 0xFF, 0x18, 0x33, 0x03, 0x60, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x03, 0x60, 0xCF, 0xF0,\n/* 'E' 0x45 */ 0xFF, 0xE0, 0x30, 0x18, 0x0C, 0x06, 0x03, 0xFD, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0F, 0xF8,\n/* 'F' 0x46 */ 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFE, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 'G' 0x47 */ 0x0F, 0x83, 0x0E, 0x60, 0x66, 0x03, 0xC0, 0x0C, 0x00, 0xC1, 0xFC, 0x03, 0xC0, 0x36, 0x03, 0x60, 0x73, 0x0F, 0x0F, 0x10,\n/* 'H' 0x48 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xFF, 0xFE, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 'I' 0x49 */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'J' 0x4A */ 0x06, 0x0C, 0x18, 0x30, 0x60, 0xC1, 0x83, 0x07, 0x8F, 0x1E, 0x27, 0x80,\n/* 'K' 0x4B */ 0xC0, 0xF0, 0x6C, 0x33, 0x18, 0xCC, 0x37, 0x0F, 0xC3, 0x98, 0xC3, 0x30, 0xCC, 0x1B, 0x03, 0xC0, 0xC0,\n/* 'L' 0x4C */ 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF,\n/* 'M' 0x4D */ 0xE0, 0x3F, 0x01, 0xFC, 0x1F, 0xE0, 0xFD, 0x05, 0xEC, 0x6F, 0x63, 0x79, 0x13, 0xCD, 0x9E, 0x6C, 0xF1, 0x47, 0x8E, 0x3C, 0x71, 0x80,\n/* 'N' 0x4E */ 0xE0, 0x7C, 0x0F, 0xC1, 0xE8, 0x3D, 0x87, 0x98, 0xF1, 0x1E, 0x33, 0xC3, 0x78, 0x6F, 0x07, 0xE0, 0x7C, 0x0E,\n/* 'O' 0x4F */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x0C, 0x60, 0xC0, 0xF8, 0x00,\n/* 'P' 0x50 */ 0xFF, 0x30, 0x6C, 0x0F, 0x03, 0xC0, 0xF0, 0x6F, 0xF3, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00,\n/* 'Q' 0x51 */ 0x0F, 0x81, 0x83, 0x18, 0x0C, 0xC0, 0x6C, 0x01, 0xE0, 0x0F, 0x00, 0x78, 0x03, 0xC0, 0x1B, 0x01, 0x98, 0x6C, 0x60, 0xC0, 0xFB, 0x00, 0x08,\n/* 'R' 0x52 */ 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x0C, 0xFF, 0x8C, 0x0E, 0xC0, 0x6C, 0x06, 0xC0, 0x6C, 0x06, 0xC0, 0x70,\n/* 'S' 0x53 */ 0x3F, 0x18, 0x6C, 0x0F, 0x03, 0xC0, 0x1E, 0x01, 0xF0, 0x0E, 0x00, 0xF0, 0x3C, 0x0D, 0x86, 0x3F, 0x00,\n/* 'T' 0x54 */ 0xFF, 0x86, 0x03, 0x01, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0,\n/* 'U' 0x55 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xB0, 0x61, 0xF0,\n/* 'V' 0x56 */ 0xC0, 0x6C, 0x0D, 0x81, 0x10, 0x63, 0x0C, 0x61, 0x04, 0x60, 0xCC, 0x19, 0x01, 0x60, 0x3C, 0x07, 0x00, 0x60,\n/* 'W' 0x57 */ 0xC1, 0x81, 0x61, 0xC3, 0x61, 0xC3, 0x61, 0x43, 0x62, 0x62, 0x22, 0x66, 0x32, 0x26, 0x36, 0x26, 0x14, 0x34, 0x14, 0x34, 0x1C, 0x1C, 0x18, 0x1C, 0x08, 0x18,\n/* 'X' 0x58 */ 0xC0, 0xD8, 0x66, 0x18, 0xCC, 0x1E, 0x07, 0x00, 0xC0, 0x78, 0x32, 0x0C, 0xC6, 0x1B, 0x07, 0xC0, 0xC0,\n/* 'Y' 0x59 */ 0xC0, 0x36, 0x06, 0x30, 0xC3, 0x0C, 0x19, 0x81, 0xD8, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 'Z' 0x5A */ 0xFF, 0xC0, 0x60, 0x30, 0x0C, 0x06, 0x03, 0x01, 0xC0, 0x60, 0x30, 0x18, 0x06, 0x03, 0x00, 0xFF, 0xC0,\n/* '[' 0x5B */ 0xFB, 0x6D, 0xB6, 0xDB, 0x6D, 0xB6, 0xE0,\n/* '\\' 0x5C */ 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x80,\n/* ']' 0x5D */ 0xED, 0xB6, 0xDB, 0x6D, 0xB6, 0xDB, 0xE0,\n/* '^' 0x5E */ 0x30, 0x60, 0xA2, 0x44, 0xD8, 0xA1, 0x80,\n/* '_' 0x5F */ 0xFF, 0xC0,\n/* '`' 0x60 */ 0xC6, 0x30,\n/* 'a' 0x61 */ 0x7E, 0x71, 0xB0, 0xC0, 0x60, 0xF3, 0xDB, 0x0D, 0x86, 0xC7, 0x3D, 0xC0,\n/* 'b' 0x62 */ 0xC0, 0x60, 0x30, 0x1B, 0xCE, 0x36, 0x0F, 0x07, 0x83, 0xC1, 0xE0, 0xF0, 0x7C, 0x6D, 0xE0,\n/* 'c' 0x63 */ 0x3C, 0x66, 0xC3, 0xC0, 0xC0, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'd' 0x64 */ 0x03, 0x03, 0x03, 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B,\n/* 'e' 0x65 */ 0x3C, 0x66, 0xC3, 0xC3, 0xFF, 0xC0, 0xC0, 0xC3, 0x66, 0x3C,\n/* 'f' 0x66 */ 0x36, 0x6F, 0x66, 0x66, 0x66, 0x66, 0x60,\n/* 'g' 0x67 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0xC6, 0x7C,\n/* 'h' 0x68 */ 0xC0, 0xC0, 0xC0, 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'i' 0x69 */ 0xC3, 0xFF, 0xFF, 0xC0,\n/* 'j' 0x6A */ 0x30, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0xE0,\n/* 'k' 0x6B */ 0xC0, 0xC0, 0xC0, 0xC2, 0xC4, 0xCC, 0xD8, 0xF8, 0xEC, 0xC4, 0xC6, 0xC3, 0xC3,\n/* 'l' 0x6C */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 'm' 0x6D */ 0xDE, 0xF7, 0x1C, 0xF0, 0xC7, 0x86, 0x3C, 0x31, 0xE1, 0x8F, 0x0C, 0x78, 0x63, 0xC3, 0x1E, 0x18, 0xC0,\n/* 'n' 0x6E */ 0xDE, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,\n/* 'o' 0x6F */ 0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x66, 0x3C,\n/* 'p' 0x70 */ 0xDE, 0x71, 0xB0, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x83, 0xE3, 0x6F, 0x30, 0x18, 0x0C, 0x00,\n/* 'q' 0x71 */ 0x3B, 0x67, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x67, 0x3B, 0x03, 0x03, 0x03,\n/* 'r' 0x72 */ 0xDF, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0x00,\n/* 's' 0x73 */ 0x3E, 0xE3, 0xC0, 0xC0, 0xE0, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 't' 0x74 */ 0x66, 0xF6, 0x66, 0x66, 0x66, 0x67,\n/* 'u' 0x75 */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC7, 0x7B,\n/* 'v' 0x76 */ 0xC1, 0xA0, 0x98, 0xCC, 0x42, 0x21, 0xB0, 0xD0, 0x28, 0x1C, 0x0C, 0x00,\n/* 'w' 0x77 */ 0xC6, 0x1E, 0x38, 0x91, 0xC4, 0xCA, 0x66, 0xD3, 0x16, 0xD0, 0xA6, 0x87, 0x1C, 0x38, 0xC0, 0xC6, 0x00,\n/* 'x' 0x78 */ 0x87, 0x89, 0xB1, 0xC3, 0x07, 0x1E, 0x26, 0xC5, 0x0C,\n/* 'y' 0x79 */ 0xC1, 0x43, 0x63, 0x62, 0x26, 0x36, 0x34, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x60,\n/* 'z' 0x7A */ 0xFE, 0x0C, 0x30, 0xC1, 0x86, 0x18, 0x20, 0xC1, 0xFC,\n/* '{' 0x7B */ 0x36, 0x66, 0x66, 0x6E, 0xCE, 0x66, 0x66, 0x66, 0x30,\n/* '|' 0x7C */ 0xFF, 0xFF, 0xFF, 0xFF, 0xC0,\n/* '}' 0x7D */ 0xC6, 0x66, 0x66, 0x67, 0x37, 0x66, 0x66, 0x66, 0xC0,\n/* '~' 0x7E */ 0x61, 0x24, 0x38,\n/* 0x7F */\n/* 0x80 */ 0x07, 0xC6, 0x13, 0x00, 0xC0, 0x60, 0x3F, 0xE6, 0x03, 0xFC, 0x60, 0x0C, 0x03, 0x00, 0x61, 0x07, 0xC0,\n/* 0x81 */\n/* 0x82 */ 0xDC,\n/* 0x83 */ 0x19, 0x8C, 0xF3, 0x18, 0xC6, 0x31, 0x8C, 0x63, 0x18, 0xC6, 0xE0,\n/* 0x84 */ 0xDA, 0x76,\n/* 0x85 */ 0xCC, 0xC0,\n/* 0x86 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0x87 */ 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x18,\n/* 0x88 */ 0x72, 0xA2,\n/* 0x89 */ 0x70, 0x80, 0x22, 0x20, 0x08, 0x90, 0x02, 0x24, 0x00, 0x72, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x09, 0xC7, 0x84, 0x8B, 0x31, 0x22, 0x84, 0x88, 0xB3, 0x21, 0xC7, 0x80,\n/* 0x8A */ 0x1B, 0x03, 0x80, 0x00, 0xFC, 0x61, 0xB0, 0x3C, 0x0F, 0x00, 0x78, 0x07, 0xC0, 0x38, 0x03, 0xC0, 0xF0, 0x36, 0x18, 0xFC,\n/* 0x8B */ 0x69,\n/* 0x8C */ 0x1E, 0xFE, 0x43, 0x81, 0x83, 0x06, 0x06, 0x0C, 0x0C, 0x18, 0x18, 0x30, 0x3F, 0xE0, 0x60, 0xC0, 0xC1, 0x81, 0x81, 0x83, 0x01, 0x8E, 0x01, 0xEF, 0xE0,\n/* 0x8D */\n/* 0x8E */ 0x1B, 0x03, 0x80, 0x03, 0xFF, 0x01, 0x80, 0xC0, 0x30, 0x18, 0x0C, 0x07, 0x01, 0x80, 0xC0, 0x60, 0x18, 0x0C, 0x03, 0xFF,\n/* 0x8F */\n/* 0x90 */\n/* 0x91 */ 0x6B,\n/* 0x92 */ 0xD6,\n/* 0x93 */ 0x4C, 0xA5, 0xB0,\n/* 0x94 */ 0xDA, 0x53, 0x20,\n/* 0x95 */ 0x6F, 0xFF, 0x60,\n/* 0x96 */ 0xFE,\n/* 0x97 */ 0xFF, 0xFF,\n/* 0x98 */ 0x4D, 0xC0,\n/* 0x99 */ 0xFC, 0xE1, 0xCC, 0x38, 0x73, 0x0E, 0x1C, 0xC3, 0x8F, 0x30, 0xD2, 0xCC, 0x34, 0xB3, 0x0D, 0x6C, 0xC3, 0x53, 0x30, 0xCC, 0xCC, 0x33, 0x30,\n/* 0x9A */ 0x24, 0x3C, 0x18, 0x7E, 0xE3, 0xC0, 0xC0, 0x60, 0x3C, 0x07, 0xC3, 0xE3, 0x7E,\n/* 0x9B */ 0x96,\n/* 0x9C */ 0x3C, 0xF8, 0xCF, 0x1B, 0x0C, 0x1E, 0x18, 0x3C, 0x3F, 0xF8, 0x60, 0x30, 0xC0, 0x61, 0x83, 0x67, 0x8C, 0x79, 0xF0,\n/* 0x9D */\n/* 0x9E */ 0x48, 0xF0, 0xC7, 0xF0, 0x61, 0x86, 0x0C, 0x30, 0xC1, 0x06, 0x0F, 0xE0,\n/* 0x9F */ 0x19, 0x80, 0x00, 0xC0, 0x36, 0x06, 0x30, 0xC3, 0x0C, 0x19, 0x81, 0xD8, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 0xA0 */\n/* 0xA1 */ 0xCF, 0xFF, 0xFF, 0xC0,\n/* 0xA2 */ 0x08, 0x04, 0x0F, 0x8D, 0x6C, 0x9E, 0x43, 0x21, 0x90, 0xC8, 0x64, 0xDA, 0xC7, 0xC0, 0x80, 0x40,\n/* 0xA3 */ 0x1F, 0x0C, 0x66, 0x0D, 0x83, 0x60, 0x0C, 0x0F, 0xC0, 0x60, 0x18, 0x06, 0x03, 0x01, 0xF1, 0x43, 0xC0,\n/* 0xA4 */ 0xFF, 0xDF, 0x1E, 0x3E, 0xFF, 0xC0,\n/* 0xA5 */ 0xC3, 0x42, 0x42, 0x24, 0x24, 0x3C, 0x18, 0x7E, 0x18, 0x7E, 0x18, 0x18, 0x18,\n/* 0xA6 */ 0xFF, 0xFC, 0x0F, 0xFF, 0xC0,\n/* 0xA7 */ 0x0C, 0x09, 0x0C, 0xC6, 0x63, 0x81, 0xE3, 0x19, 0x87, 0xE1, 0xB8, 0xC6, 0x41, 0xC0, 0x73, 0x19, 0x8C, 0x66, 0x1E, 0x00,\n/* 0xA8 */ 0xCC,\n/* 0xA9 */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9B, 0xC6, 0xD9, 0x8F, 0x60, 0x3D, 0x00, 0xF4, 0x03, 0xD8, 0x0D, 0xE6, 0x67, 0xF3, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAA */ 0x74, 0x8D, 0xA9, 0x7C, 0x1F,\n/* 0xAB */ 0x22, 0xCF, 0x26, 0x46, 0x64, 0x40,\n/* 0xAC */ 0xFF, 0x80, 0xC0, 0x60, 0x30, 0x18,\n/* 0xAD */\n/* 0xAE */ 0x0F, 0xC0, 0x61, 0x87, 0x03, 0x9F, 0xE6, 0xD0, 0x8F, 0x42, 0x3D, 0xF0, 0xF4, 0x23, 0xD0, 0x8D, 0xC2, 0x67, 0x0B, 0x86, 0x18, 0x0F, 0xC0,\n/* 0xAF */ 0xF8,\n/* 0xB0 */ 0x74, 0x63, 0x17, 0x00,\n/* 0xB1 */ 0x0C, 0x06, 0x03, 0x07, 0xE0, 0xC0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x3F, 0xE0,\n/* 0xB2 */ 0x7B, 0x30, 0xC3, 0x11, 0x84, 0x3F,\n/* 0xB3 */ 0x7D, 0x8C, 0x18, 0xC0, 0x60, 0xF1, 0xBE,\n/* 0xB4 */ 0x36, 0xC0,\n/* 0xB5 */ 0xC3, 0x61, 0xB0, 0xD8, 0x6C, 0x36, 0x1B, 0x0D, 0x86, 0xE7, 0x7D, 0xF0, 0x18, 0x0C, 0x00,\n/* 0xB6 */ 0x3F, 0x7E, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0x72, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,\n/* 0xB7 */ 0xE0,\n/* 0xB8 */ 0x21, 0xC7, 0xE0,\n/* 0xB9 */ 0x3D, 0xB6, 0xD8,\n/* 0xBA */ 0x74, 0x63, 0x18, 0xB8, 0x1F,\n/* 0xBB */ 0x89, 0x98, 0x99, 0x3C, 0xD1, 0x00,\n/* 0xBC */ 0x20, 0x43, 0x81, 0x06, 0x08, 0x18, 0x20, 0x61, 0x01, 0x84, 0x06, 0x21, 0x80, 0x86, 0x04, 0x78, 0x32, 0x60, 0x87, 0xC4, 0x06, 0x10, 0x18,\n/* 0xBD */ 0x20, 0x43, 0x81, 0x06, 0x08, 0x18, 0x20, 0x61, 0x01, 0x8D, 0xE6, 0x2C, 0xC1, 0x03, 0x0C, 0x0C, 0x20, 0x41, 0x86, 0x0C, 0x30, 0x20, 0xFC,\n/* 0xBE */ 0x78, 0x11, 0x98, 0x40, 0x31, 0x00, 0x82, 0x00, 0xC8, 0x01, 0x90, 0x33, 0x43, 0x3D, 0x06, 0x02, 0x3C, 0x08, 0x98, 0x10, 0xF8, 0x40, 0x61, 0x00, 0xC0,\n/* 0xBF */ 0x0C, 0x00, 0x00, 0x01, 0x80, 0xC0, 0xC0, 0xE0, 0xC0, 0xC0, 0x60, 0xF0, 0x6C, 0x63, 0xE0,\n/* 0xC0 */ 0x0C, 0xDB, 0xD3, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,\n/* 0xC1 */ 0x0E, 0x01, 0xC0, 0x6C, 0x0D, 0x81, 0xB0, 0x63, 0x0C, 0x61, 0xFC, 0x7F, 0xCC, 0x19, 0x83, 0x60, 0x3C, 0x06,\n/* 0xC2 */ 0xFF, 0x3F, 0xEC, 0x0F, 0x03, 0xC0, 0xFF, 0xEF, 0xFB, 0x03, 0xC0, 0xF0, 0x3C, 0x1F, 0xFE, 0xFF, 0x00,\n/* 0xC3 */ 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 0xC4 */ 0x07, 0x00, 0x38, 0x01, 0xC0, 0x1B, 0x00, 0xD8, 0x0C, 0x60, 0x63, 0x03, 0x18, 0x30, 0x61, 0x83, 0x18, 0x0C, 0xFF, 0xE7, 0xFF, 0x00,\n/* 0xC5 */ 0xFF, 0xFF, 0xFC, 0x03, 0x00, 0xC0, 0x3F, 0xEF, 0xFB, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0xFF, 0xFF, 0xC0,\n/* 0xC6 */ 0x7F, 0xDF, 0xF0, 0x18, 0x0C, 0x07, 0x01, 0x80, 0xC0, 0x60, 0x38, 0x0C, 0x06, 0x03, 0xFF, 0xFF, 0xC0,\n/* 0xC7 */ 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x07, 0xFF, 0xFF, 0xFE, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 0xC8 */ 0x0F, 0x03, 0xFC, 0x70, 0xE6, 0x06, 0xC0, 0x3C, 0xF3, 0xCF, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x70, 0xE3, 0xFC, 0x1F, 0x80,\n/* 0xC9 */ 0xFF, 0xFF, 0xFF, 0xC0,\n/* 0xCA */ 0xC1, 0xD8, 0x73, 0x1C, 0x67, 0x0D, 0xC1, 0xF0, 0x3F, 0x07, 0x70, 0xC7, 0x18, 0x63, 0x0E, 0x60, 0xEC, 0x0E,\n/* 0xCB */ 0x07, 0x00, 0x38, 0x01, 0xC0, 0x1B, 0x00, 0xD8, 0x0C, 0x60, 0x63, 0x03, 0x18, 0x30, 0x61, 0x83, 0x1C, 0x1C, 0xC0, 0x66, 0x03, 0x00,\n/* 0xCC */ 0xE0, 0x3F, 0x83, 0xFC, 0x1F, 0xE0, 0xFD, 0x8D, 0xEC, 0x6F, 0x63, 0x79, 0x13, 0xCD, 0x9E, 0x6C, 0xF3, 0x67, 0x8E, 0x3C, 0x71, 0x80,\n/* 0xCD */ 0xC0, 0x7C, 0x0F, 0xC1, 0xF8, 0x3D, 0x87, 0x98, 0xF3, 0x9E, 0x33, 0xC3, 0x78, 0x3F, 0x07, 0xE0, 0x7C, 0x06,\n/* 0xCE */ 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x1F, 0xE7, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xC0,\n/* 0xCF */ 0x0F, 0x83, 0xFC, 0x70, 0xE6, 0x06, 0xC0, 0x3C, 0x03, 0xC0, 0x3C, 0x03, 0xC0, 0x36, 0x06, 0x70, 0xE3, 0xFC, 0x0F, 0x00,\n/* 0xD0 */ 0xFF, 0xFF, 0xFF, 0x01, 0xE0, 0x3C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0xC0, 0x78, 0x0F, 0x01, 0xE0, 0x3C, 0x06,\n/* 0xD1 */ 0xFF, 0x3F, 0xEC, 0x1F, 0x03, 0xC0, 0xF0, 0x7F, 0xFB, 0xFC, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x00,\n/* 0xD2 */\n/* 0xD3 */ 0xFF, 0xFF, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xFF, 0xFF,\n/* 0xD4 */ 0xFF, 0xFF, 0xF0, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x00,\n/* 0xD5 */ 0xE0, 0x76, 0x06, 0x30, 0xC3, 0x9C, 0x19, 0x80, 0xF0, 0x0F, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 0xD6 */ 0x06, 0x00, 0x60, 0x1F, 0x87, 0xFE, 0xE6, 0x7C, 0x63, 0xC6, 0x3C, 0x63, 0xE6, 0x77, 0xFE, 0x1F, 0x80, 0x60, 0x06, 0x00,\n/* 0xD7 */ 0x71, 0xC6, 0x30, 0x6C, 0x0D, 0x80, 0xE0, 0x1C, 0x03, 0x80, 0xD8, 0x1B, 0x07, 0x70, 0xC6, 0x30, 0x6E, 0x0E,\n/* 0xD8 */ 0xC6, 0x3C, 0x63, 0xC6, 0x3C, 0x63, 0xC6, 0x3C, 0x63, 0x46, 0x66, 0x66, 0x3F, 0xC0, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00,\n/* 0xD9 */ 0x1F, 0x07, 0xF1, 0xC7, 0x70, 0x7C, 0x07, 0x80, 0xF0, 0x1E, 0x03, 0x40, 0x4C, 0x18, 0xEE, 0x7D, 0xFF, 0xBE,\n/* 0xDA */ 0xCF, 0x30, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C,\n/* 0xDB */ 0x19, 0x81, 0x98, 0x00, 0x0E, 0x07, 0x60, 0x63, 0x0C, 0x39, 0xC1, 0x98, 0x0F, 0x00, 0xF0, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60, 0x06, 0x00, 0x60,\n/* 0xDC */ 0x06, 0x0C, 0x00, 0x3B, 0x7B, 0xEE, 0xC6, 0xC6, 0xC6, 0xC6, 0xEE, 0x7B, 0x3B,\n/* 0xDD */ 0x18, 0x20, 0x03, 0xCF, 0xF8, 0xB0, 0x38, 0x71, 0x83, 0x17, 0xF7, 0x80,\n/* 0xDE */ 0x0C, 0x18, 0x00, 0xDE, 0xFF, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x03, 0x03, 0x03, 0x03,\n/* 0xDF */ 0x78, 0x6D, 0xB6, 0xDB, 0x6C,\n/* 0xE0 */ 0x0C, 0xDB, 0xD3, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0x7E, 0x3C,\n/* 0xE1 */ 0x3B, 0x7B, 0xEE, 0xC6, 0xC6, 0xC6, 0xC6, 0xEE, 0x7B, 0x3B,\n/* 0xE2 */ 0x3C, 0x7E, 0xC6, 0xC6, 0xC4, 0xD8, 0xDE, 0xC7, 0xC3, 0xC3, 0xE7, 0xFE, 0xDC, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 0xE3 */ 0x61, 0x98, 0x66, 0x18, 0xCC, 0x33, 0x0C, 0xC1, 0xE0, 0x78, 0x1E, 0x03, 0x00, 0xC0, 0x30, 0x0C, 0x03, 0x00,\n/* 0xE4 */ 0x7E, 0x7E, 0x30, 0x3C, 0x7E, 0xE7, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0x7E, 0x3C,\n/* 0xE5 */ 0x79, 0xFF, 0x16, 0x07, 0x0E, 0x30, 0x62, 0xFE, 0xF0,\n/* 0xE6 */ 0x7E, 0xFC, 0x30, 0xC3, 0x0C, 0x18, 0x60, 0xC1, 0x83, 0x07, 0xE7, 0xE0, 0xC1, 0x83, 0x0C,\n/* 0xE7 */ 0xDE, 0xFF, 0xE3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0x03, 0x03, 0x03, 0x03,\n/* 0xE8 */ 0x3C, 0x7E, 0x66, 0xC3, 0xC3, 0xFF, 0xFF, 0xC3, 0xC3, 0xC3, 0x66, 0x7E, 0x3C,\n/* 0xE9 */ 0xFF, 0xFF, 0xF0,\n/* 0xEA */ 0xC3, 0x63, 0x33, 0x1B, 0x0F, 0x06, 0xC3, 0x31, 0x8C, 0xC6, 0x61, 0x80,\n/* 0xEB */ 0x30, 0x0C, 0x06, 0x03, 0x01, 0xC1, 0xE0, 0xD0, 0x6C, 0x36, 0x33, 0x18, 0xCC, 0x66, 0x30,\n/* 0xEC */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0xFF, 0xDB, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 0xED */ 0xC1, 0xE0, 0xD8, 0xCC, 0x66, 0x31, 0xB0, 0xD8, 0x38, 0x1C, 0x04, 0x00,\n/* 0xEE */ 0x7D, 0xFB, 0x06, 0x07, 0xC7, 0x9C, 0x70, 0xC1, 0x83, 0x83, 0xE3, 0xE0, 0xC1, 0x8E, 0x18,\n/* 0xEF */ 0x3C, 0x7E, 0xE7, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0x7E, 0x3C,\n/* 0xF0 */ 0xFF, 0xFF, 0xFF, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C,\n/* 0xF1 */ 0x3C, 0x7E, 0xE7, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0xFE, 0xDC, 0xC0, 0xC0, 0xC0, 0xC0,\n/* 0xF2 */ 0x1E, 0xFD, 0x86, 0x0C, 0x18, 0x30, 0x70, 0x7C, 0x7C, 0x18, 0x33, 0xE7, 0x00,\n/* 0xF3 */ 0x3F, 0xDF, 0xFE, 0x63, 0x0C, 0xC3, 0x30, 0xCC, 0x33, 0x9C, 0x7E, 0x0F, 0x00,\n/* 0xF4 */ 0xFF, 0xF3, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC0,\n/* 0xF5 */ 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0x7E, 0x3C,\n/* 0xF6 */ 0x2F, 0x1B, 0xEC, 0xDF, 0x33, 0xCC, 0xF3, 0x3C, 0xCD, 0xB6, 0x7F, 0x8F, 0x80, 0xC0, 0x30, 0x0C, 0x03, 0x00,\n/* 0xF7 */ 0x63, 0x31, 0x8D, 0x86, 0xC3, 0x60, 0xE0, 0x70, 0x38, 0x1C, 0x1B, 0x0D, 0x86, 0xC6, 0x33, 0x18,\n/* 0xF8 */ 0xCC, 0xF3, 0x3C, 0xCF, 0x33, 0xCC, 0xF3, 0x3C, 0xCF, 0x33, 0x6D, 0x8F, 0xC0, 0xC0, 0x30, 0x0C, 0x03, 0x00,\n/* 0xF9 */ 0x30, 0xC6, 0x06, 0x66, 0x6C, 0x63, 0xC6, 0x3C, 0x63, 0xC6, 0x3E, 0xF7, 0x79, 0xE3, 0x9C,\n/* 0xFA */ 0xCF, 0x30, 0x0C, 0x30, 0xC3, 0x0C, 0x30, 0xC3, 0x0C, 0x30,\n/* 0xFB */ 0x66, 0x66, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0x7E, 0x3C,\n/* 0xFC */ 0x0C, 0x18, 0x00, 0x3C, 0x7E, 0xE7, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0x7E, 0x3C,\n/* 0xFD */ 0x08, 0x10, 0x00, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xE7, 0x7E, 0x3C,\n/* 0xFE */ 0x03, 0x00, 0x60, 0x00, 0x03, 0x0C, 0x60, 0x66, 0x66, 0xC6, 0x3C, 0x63, 0xC6, 0x3C, 0x63, 0xEF, 0x77, 0x9E, 0x39, 0xC0,\n/* 0xFF */\n};\n\nconst GFXglyph FreeSans9pt_Win1253Glyphs[] PROGMEM = {\n/* 0x01 */ {     0,   15,   15,   17,    1,  -13 },\n/* 0x02 */ {    29,   15,   15,   17,    1,  -13 },\n/* 0x03 */ {    58,   15,   16,   17,    1,  -14 },\n/* 0x04 */ {    88,   15,   16,   17,    1,  -14 },\n/* 0x05 */ {   118,   16,   15,   18,    1,  -13 },\n/* 0x06 */ {   148,   15,   15,   17,    1,  -13 },\n/* 0x07 */ {   177,    0,    0,    8,    0,    0 },\n/* 0x08 */ {   177,   17,   16,   19,    1,  -14 },\n/* 0x09 */ {   211,   17,   12,   19,    1,  -12 },\n/* 0x0A */ {   237,    0,    0,    8,    0,    0 },\n/* 0x0B */ {   237,   17,   16,   19,    1,  -14 },\n/* 0x0C */ {   271,   15,   14,   17,    1,  -12 },\n/* 0x0D */ {   298,    0,    0,    8,    0,    0 },\n/* 0x0E */ {   298,   15,   16,   17,    1,  -14 },\n/* 0x0F */ {   328,   15,   15,   17,    1,  -13 },\n/* 0x10 */ {   357,   15,   15,   17,    1,  -13 },\n/* 0x11 */ {   386,   15,   16,   17,    1,  -14 },\n/* 0x12 */ {   416,   17,   17,   19,    1,  -15 },\n/* 0x13 */ {   453,   15,   16,   17,    1,  -14 },\n/* 0x14 */ {   483,   15,   16,   17,    1,  -14 },\n/* 0x15 */ {   513,   15,   16,   17,    1,  -14 },\n/* 0x16 */ {   543,   11,   16,   13,    1,  -14 },\n/* 0x17 */ {   565,   15,   16,   17,    1,  -14 },\n/* 0x18 */ {   595,   18,   15,   20,    1,  -13 },\n/* 0x19 */ {   629,   15,   16,   17,    1,  -14 },\n/* 0x1A */ {   659,   13,   14,   15,    1,  -12 },\n/* 0x1B */ {   682,   17,   16,   19,    1,  -14 },\n/* 0x1C */ {   716,   15,   16,   17,    1,  -14 },\n/* 0x1D */ {   746,   15,   15,   17,    1,  -13 },\n/* 0x1E */ {   775,   17,   16,   19,    1,  -14 },\n/* 0x1F */ {   809,   11,   16,   13,    1,  -14 },\n/* ' ' 0x20 */ {   831,    0,    0,    5,    0,    0 },\n/* '!' 0x21 */ {   831,    2,   13,    6,    2,  -12 },\n/* '\"' 0x22 */ {   835,    5,    4,    6,    1,  -12 },\n/* '#' 0x23 */ {   838,   10,   12,   10,    0,  -11 },\n/* '$' 0x24 */ {   853,    9,   16,   10,    1,  -13 },\n/* '%' 0x25 */ {   871,   16,   13,   16,    1,  -12 },\n/* '&' 0x26 */ {   897,   10,   13,   12,    1,  -12 },\n/* ''' 0x27 */ {   914,    2,    4,    4,    1,  -12 },\n/* '(' 0x28 */ {   915,    4,   17,    6,    1,  -12 },\n/* ')' 0x29 */ {   924,    4,   17,    6,    1,  -12 },\n/* '*' 0x2A */ {   933,    5,    5,    7,    1,  -12 },\n/* '+' 0x2B */ {   937,    6,    8,   11,    3,   -7 },\n/* ',' 0x2C */ {   943,    2,    4,    5,    2,    0 },\n/* '-' 0x2D */ {   944,    4,    1,    6,    1,   -4 },\n/* '.' 0x2E */ {   945,    2,    1,    5,    1,    0 },\n/* '/' 0x2F */ {   946,    5,   13,    5,    0,  -12 },\n/* '0' 0x30 */ {   955,    8,   13,   10,    1,  -12 },\n/* '1' 0x31 */ {   968,    4,   13,   10,    3,  -12 },\n/* '2' 0x32 */ {   975,    9,   13,   10,    1,  -12 },\n/* '3' 0x33 */ {   990,    8,   13,   10,    1,  -12 },\n/* '4' 0x34 */ {  1003,    7,   13,   10,    2,  -12 },\n/* '5' 0x35 */ {  1015,    9,   13,   10,    1,  -12 },\n/* '6' 0x36 */ {  1030,    9,   13,   10,    1,  -12 },\n/* '7' 0x37 */ {  1045,    8,   13,   10,    0,  -12 },\n/* '8' 0x38 */ {  1058,    9,   13,   10,    1,  -12 },\n/* '9' 0x39 */ {  1073,    8,   13,   10,    1,  -12 },\n/* ':' 0x3A */ {  1086,    2,   10,    5,    1,   -9 },\n/* ';' 0x3B */ {  1089,    3,   12,    5,    1,   -8 },\n/* '<' 0x3C */ {  1094,    9,    9,   11,    1,   -8 },\n/* '=' 0x3D */ {  1105,    9,    4,   11,    1,   -5 },\n/* '>' 0x3E */ {  1110,    9,    8,   11,    1,   -7 },\n/* '?' 0x3F */ {  1119,    9,   13,   10,    1,  -12 },\n/* '@' 0x40 */ {  1134,   17,   16,   18,    1,  -12 },\n/* 'A' 0x41 */ {  1168,   12,   13,   12,    0,  -12 },\n/* 'B' 0x42 */ {  1188,   11,   13,   12,    1,  -12 },\n/* 'C' 0x43 */ {  1206,   11,   13,   13,    1,  -12 },\n/* 'D' 0x44 */ {  1224,   11,   13,   13,    1,  -12 },\n/* 'E' 0x45 */ {  1242,    9,   13,   11,    1,  -12 },\n/* 'F' 0x46 */ {  1257,    8,   13,   11,    1,  -12 },\n/* 'G' 0x47 */ {  1270,   12,   13,   14,    1,  -12 },\n/* 'H' 0x48 */ {  1290,   11,   13,   13,    1,  -12 },\n/* 'I' 0x49 */ {  1308,    2,   13,    5,    2,  -12 },\n/* 'J' 0x4A */ {  1312,    7,   13,   10,    1,  -12 },\n/* 'K' 0x4B */ {  1324,   10,   13,   12,    1,  -12 },\n/* 'L' 0x4C */ {  1341,    8,   13,   10,    1,  -12 },\n/* 'M' 0x4D */ {  1354,   13,   13,   15,    1,  -12 },\n/* 'N' 0x4E */ {  1376,   11,   13,   13,    1,  -12 },\n/* 'O' 0x4F */ {  1394,   13,   13,   14,    1,  -12 },\n/* 'P' 0x50 */ {  1416,   10,   13,   12,    1,  -12 },\n/* 'Q' 0x51 */ {  1433,   13,   14,   14,    1,  -12 },\n/* 'R' 0x52 */ {  1456,   12,   13,   13,    1,  -12 },\n/* 'S' 0x53 */ {  1476,   10,   13,   12,    1,  -12 },\n/* 'T' 0x54 */ {  1493,    9,   13,   11,    1,  -12 },\n/* 'U' 0x55 */ {  1508,   11,   13,   13,    1,  -12 },\n/* 'V' 0x56 */ {  1526,   11,   13,   11,    0,  -12 },\n/* 'W' 0x57 */ {  1544,   16,   13,   17,    0,  -12 },\n/* 'X' 0x58 */ {  1570,   10,   13,   12,    1,  -12 },\n/* 'Y' 0x59 */ {  1587,   12,   13,   12,    0,  -12 },\n/* 'Z' 0x5A */ {  1607,   10,   13,   11,    1,  -12 },\n/* '[' 0x5B */ {  1624,    3,   17,    5,    1,  -12 },\n/* '\\' 0x5C */ {  1631,    5,   13,    5,    0,  -12 },\n/* ']' 0x5D */ {  1640,    3,   17,    5,    0,  -12 },\n/* '^' 0x5E */ {  1647,    7,    7,    8,    1,  -12 },\n/* '_' 0x5F */ {  1654,   10,    1,   10,    0,    3 },\n/* '`' 0x60 */ {  1656,    4,    3,    5,    0,  -12 },\n/* 'a' 0x61 */ {  1658,    9,   10,   10,    1,   -9 },\n/* 'b' 0x62 */ {  1670,    9,   13,   10,    1,  -12 },\n/* 'c' 0x63 */ {  1685,    8,   10,    9,    1,   -9 },\n/* 'd' 0x64 */ {  1695,    8,   13,   10,    1,  -12 },\n/* 'e' 0x65 */ {  1708,    8,   10,   10,    1,   -9 },\n/* 'f' 0x66 */ {  1718,    4,   13,    5,    1,  -12 },\n/* 'g' 0x67 */ {  1725,    8,   14,   10,    1,   -9 },\n/* 'h' 0x68 */ {  1739,    8,   13,   10,    1,  -12 },\n/* 'i' 0x69 */ {  1752,    2,   13,    4,    1,  -12 },\n/* 'j' 0x6A */ {  1756,    4,   17,    4,    0,  -12 },\n/* 'k' 0x6B */ {  1765,    8,   13,    9,    1,  -12 },\n/* 'l' 0x6C */ {  1778,    2,   13,    4,    1,  -12 },\n/* 'm' 0x6D */ {  1782,   13,   10,   15,    1,   -9 },\n/* 'n' 0x6E */ {  1799,    8,   10,   10,    1,   -9 },\n/* 'o' 0x6F */ {  1809,    8,   10,   10,    1,   -9 },\n/* 'p' 0x70 */ {  1819,    9,   13,   10,    1,   -9 },\n/* 'q' 0x71 */ {  1834,    8,   13,   10,    1,   -9 },\n/* 'r' 0x72 */ {  1847,    5,   10,    6,    1,   -9 },\n/* 's' 0x73 */ {  1854,    8,   10,    9,    1,   -9 },\n/* 't' 0x74 */ {  1864,    4,   12,    5,    1,  -11 },\n/* 'u' 0x75 */ {  1870,    8,   10,   10,    1,   -9 },\n/* 'v' 0x76 */ {  1880,    9,   10,    9,    0,   -9 },\n/* 'w' 0x77 */ {  1892,   13,   10,   13,    0,   -9 },\n/* 'x' 0x78 */ {  1909,    7,   10,    9,    1,   -9 },\n/* 'y' 0x79 */ {  1918,    8,   14,    9,    0,   -9 },\n/* 'z' 0x7A */ {  1932,    7,   10,    9,    1,   -9 },\n/* '{' 0x7B */ {  1941,    4,   17,    6,    1,  -12 },\n/* '|' 0x7C */ {  1950,    2,   17,    4,    2,  -12 },\n/* '}' 0x7D */ {  1955,    4,   17,    6,    1,  -12 },\n/* '~' 0x7E */ {  1964,    7,    3,    9,    1,   -7 },\n/* 0x7F */ {  1967,    0,    0,    0,    0,    0 },\n/* 0x80 */ {  1967,   10,   13,   12,    1,  -12 },\n/* 0x81 */ {  1984,    0,    0,    8,    0,    0 },\n/* 0x82 */ {  1984,    2,    3,    5,    1,    0 },\n/* 0x83 */ {  1985,    5,   17,    5,    0,  -12 },\n/* 0x84 */ {  1996,    5,    3,    7,    1,    0 },\n/* 0x85 */ {  1998,   10,    1,   12,    1,    0 },\n/* 0x86 */ {  2000,    8,   16,   10,    1,  -12 },\n/* 0x87 */ {  2016,    8,   16,   10,    1,  -12 },\n/* 0x88 */ {  2032,    5,    3,    6,    0,  -12 },\n/* 0x89 */ {  2034,   18,   13,   18,    0,  -12 },\n/* 0x8A */ {  2064,   10,   16,   12,    1,  -15 },\n/* 0x8B */ {  2084,    2,    4,    4,    1,   -6 },\n/* 0x8C */ {  2085,   15,   13,   18,    1,  -12 },\n/* 0x8D */ {  2110,    0,    0,    8,    0,    0 },\n/* 0x8E */ {  2110,   10,   16,   11,    1,  -15 },\n/* 0x8F */ {  2130,    0,    0,    8,    0,    0 },\n/* 0x90 */ {  2130,    0,    0,    8,    0,    0 },\n/* 0x91 */ {  2130,    2,    4,    4,    2,  -12 },\n/* 0x92 */ {  2131,    2,    4,    4,    1,  -12 },\n/* 0x93 */ {  2132,    5,    4,    7,    2,  -12 },\n/* 0x94 */ {  2135,    5,    4,    7,    1,  -12 },\n/* 0x95 */ {  2138,    4,    5,    7,    1,   -8 },\n/* 0x96 */ {  2141,    7,    1,    9,    1,   -4 },\n/* 0x97 */ {  2142,   16,    1,   18,    1,   -4 },\n/* 0x98 */ {  2144,    5,    2,    6,    0,  -12 },\n/* 0x99 */ {  2146,   18,   10,   18,    1,  -13 },\n/* 0x9A */ {  2169,    8,   13,    9,    1,  -12 },\n/* 0x9B */ {  2182,    2,    4,    5,    2,   -6 },\n/* 0x9C */ {  2183,   15,   10,   17,    1,   -9 },\n/* 0x9D */ {  2202,    0,    0,    8,    0,    0 },\n/* 0x9E */ {  2202,    7,   13,    9,    1,  -12 },\n/* 0x9F */ {  2214,   12,   14,   12,    0,  -13 },\n/* 0xA0 */ {  2235,    0,    0,    5,    0,    0 },\n/* 0xA1 */ {  2235,    2,   13,    6,    2,   -8 },\n/* 0xA2 */ {  2239,    9,   14,   10,    1,  -11 },\n/* 0xA3 */ {  2255,   10,   13,   10,    0,  -12 },\n/* 0xA4 */ {  2272,    7,    6,   10,    2,   -8 },\n/* 0xA5 */ {  2278,    8,   13,   10,    1,  -12 },\n/* 0xA6 */ {  2291,    2,   17,    5,    2,  -12 },\n/* 0xA7 */ {  2296,    9,   17,   10,    1,  -12 },\n/* 0xA8 */ {  2316,    6,    1,    6,    0,  -11 },\n/* 0xA9 */ {  2317,   14,   13,   14,    1,  -12 },\n/* 0xAA */ {  2340,    5,    8,    7,    1,  -12 },\n/* 0xAB */ {  2345,    7,    6,    9,    1,   -7 },\n/* 0xAC */ {  2351,    9,    5,   11,    2,   -5 },\n/* 0xAD */ {  2357,    0,    0,    0,    0,    0 },\n/* 0xAE */ {  2357,   14,   13,   14,    1,  -12 },\n/* 0xAF */ {  2380,    5,    1,    6,    0,  -12 },\n/* 0xB0 */ {  2381,    5,    5,   11,    3,  -11 },\n/* 0xB1 */ {  2385,    9,   11,   11,    1,  -10 },\n/* 0xB2 */ {  2398,    6,    8,    6,    1,  -13 },\n/* 0xB3 */ {  2404,    7,    8,    6,    0,  -13 },\n/* 0xB4 */ {  2411,    4,    3,    6,    2,  -12 },\n/* 0xB5 */ {  2413,    9,   13,   10,    1,   -9 },\n/* 0xB6 */ {  2428,    8,   16,   10,    2,  -12 },\n/* 0xB7 */ {  2444,    3,    1,    5,    1,   -4 },\n/* 0xB8 */ {  2445,    5,    4,    6,    1,    1 },\n/* 0xB9 */ {  2448,    3,    7,    6,    2,  -13 },\n/* 0xBA */ {  2451,    5,    8,    7,    1,  -12 },\n/* 0xBB */ {  2456,    7,    6,    9,    1,   -7 },\n/* 0xBC */ {  2462,   14,   13,   16,    2,  -12 },\n/* 0xBD */ {  2485,   14,   13,   16,    2,  -12 },\n/* 0xBE */ {  2508,   15,   13,   16,    1,  -12 },\n/* 0xBF */ {  2533,    9,   13,   10,    1,   -8 },\n/* 0xC0 */ {  2548,    8,   15,    4,   -2,  -15 },\n/* 0xC1 */ {  2563,   11,   13,   11,    0,  -13 },\n/* 0xC2 */ {  2581,   10,   13,   12,    1,  -13 },\n/* 0xC3 */ {  2598,    8,   13,   10,    2,  -13 },\n/* 0xC4 */ {  2611,   13,   13,   12,   -1,  -13 },\n/* 0xC5 */ {  2633,   10,   13,   12,    1,  -13 },\n/* 0xC6 */ {  2650,   10,   13,   11,    0,  -13 },\n/* 0xC7 */ {  2667,   11,   13,   13,    1,  -13 },\n/* 0xC8 */ {  2685,   12,   13,   14,    1,  -13 },\n/* 0xC9 */ {  2705,    2,   13,    4,    1,  -13 },\n/* 0xCA */ {  2709,   11,   13,   12,    1,  -13 },\n/* 0xCB */ {  2727,   13,   13,   12,   -1,  -13 },\n/* 0xCC */ {  2749,   13,   13,   15,    1,  -13 },\n/* 0xCD */ {  2771,   11,   13,   13,    1,  -13 },\n/* 0xCE */ {  2789,   10,   13,   12,    1,  -13 },\n/* 0xCF */ {  2806,   12,   13,   14,    1,  -13 },\n/* 0xD0 */ {  2826,   11,   13,   13,    1,  -13 },\n/* 0xD1 */ {  2844,   10,   13,   12,    1,  -13 },\n/* 0xD2 */ {  2861,    0,    0,    5,    0,    0 },\n/* 0xD3 */ {  2861,    8,   13,   11,    2,  -13 },\n/* 0xD4 */ {  2874,   10,   13,   12,    1,  -13 },\n/* 0xD5 */ {  2891,   12,   13,   12,    0,  -13 },\n/* 0xD6 */ {  2911,   12,   13,   14,    1,  -13 },\n/* 0xD7 */ {  2931,   11,   13,   11,    0,  -13 },\n/* 0xD8 */ {  2949,   12,   13,   14,    1,  -13 },\n/* 0xD9 */ {  2969,   11,   13,   13,    1,  -13 },\n/* 0xDA */ {  2987,    6,   16,    4,   -1,  -16 },\n/* 0xDB */ {  2999,   12,   16,   12,    0,  -16 },\n/* 0xDC */ {  3023,    8,   13,   10,    1,  -13 },\n/* 0xDD */ {  3036,    7,   13,    8,    1,  -13 },\n/* 0xDE */ {  3048,    8,   17,   10,    1,  -13 },\n/* 0xDF */ {  3065,    3,   13,    4,    1,  -13 },\n/* 0xE0 */ {  3070,    8,   14,   10,    1,  -14 },\n/* 0xE1 */ {  3084,    8,   10,   10,    1,  -10 },\n/* 0xE2 */ {  3094,    8,   17,   10,    1,  -13 },\n/* 0xE3 */ {  3111,   10,   14,    8,   -1,  -10 },\n/* 0xE4 */ {  3129,    8,   13,   10,    1,  -13 },\n/* 0xE5 */ {  3142,    7,   10,    8,    1,  -10 },\n/* 0xE6 */ {  3151,    7,   17,    8,    1,  -13 },\n/* 0xE7 */ {  3166,    8,   14,   10,    1,  -10 },\n/* 0xE8 */ {  3180,    8,   13,   10,    1,  -13 },\n/* 0xE9 */ {  3193,    2,   10,    4,    1,  -10 },\n/* 0xEA */ {  3196,    9,   10,    9,    1,  -10 },\n/* 0xEB */ {  3208,    9,   13,    9,    0,  -13 },\n/* 0xEC */ {  3223,    8,   14,   10,    1,  -10 },\n/* 0xED */ {  3237,    9,   10,    9,    0,  -10 },\n/* 0xEE */ {  3249,    7,   17,    8,    1,  -13 },\n/* 0xEF */ {  3264,    8,   10,   10,    1,  -10 },\n/* 0xF0 */ {  3274,   12,   10,   12,    0,  -10 },\n/* 0xF1 */ {  3289,    8,   14,   10,    1,  -10 },\n/* 0xF2 */ {  3303,    7,   14,    9,    1,  -10 },\n/* 0xF3 */ {  3316,   10,   10,   11,    1,  -10 },\n/* 0xF4 */ {  3329,    6,   10,    8,    1,  -10 },\n/* 0xF5 */ {  3337,    8,   10,   10,    1,  -10 },\n/* 0xF6 */ {  3347,   10,   14,   12,    1,  -10 },\n/* 0xF7 */ {  3365,    9,   14,    9,    0,  -10 },\n/* 0xF8 */ {  3381,   10,   14,   12,    1,  -10 },\n/* 0xF9 */ {  3399,   12,   10,   14,    1,  -10 },\n/* 0xFA */ {  3414,    6,   13,    4,   -1,  -13 },\n/* 0xFB */ {  3424,    8,   13,   10,    1,  -13 },\n/* 0xFC */ {  3437,    8,   13,   10,    1,  -13 },\n/* 0xFD */ {  3450,    8,   13,   10,    1,  -13 },\n/* 0xFE */ {  3463,   12,   13,   14,    1,  -13 },\n/* 0xFF */ {  3483,    0,    0,    5,    0,    0 },\n};\n\nconst GFXfont FreeSans9pt_Win1253 PROGMEM = {\n(uint8_t*)FreeSans9pt_Win1253Bitmaps,\n(GFXglyph*)FreeSans9pt_Win1253Glyphs,\n0x01, 0xFF, 16\n};\n"
  },
  {
    "path": "src/graphics/niche/Fonts/README.md",
    "content": "# NicheGraphics - Fonts\n\nA common area to store fonts which might be reused by different Niche Graphics UIs\nIn future, we may want to separate these by library (AdafruitGFX, u8g2, etc)\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applet.cpp",
    "content": "#include \"graphics/niche/InkHUD/Tile.h\"\n#include <cstdint>\n#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./Applet.h\"\n\n#include \"main.h\"\n\n#include \"RTC.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::AppletFont InkHUD::Applet::fontLarge; // General purpose fonts. Set in nicheGraphics.h\nInkHUD::AppletFont InkHUD::Applet::fontMedium;\nInkHUD::AppletFont InkHUD::Applet::fontSmall;\nconstexpr float InkHUD::Applet::LOGO_ASPECT_RATIO; // Ratio of the Meshtastic logo\n\nInkHUD::Applet::Applet() : GFX(0, 0)\n{\n    // GFX is given initial dimensions of 0\n    // The width and height will change dynamically, depending on Applet tiling\n    // If you're getting a \"divide by zero error\", consider it an assert:\n    // WindowManager should be the only one controlling the rendering\n\n    inkhud = InkHUD::getInstance();\n    settings = &inkhud->persistence->settings;\n    latestMessage = &inkhud->persistence->latestMessage;\n}\n\n// Draw a single pixel\n// The raw pixel output generated by AdafruitGFX drawing all passes through here\n// Hand off to the applet's tile, which will in-turn pass to the renderer\nvoid InkHUD::Applet::drawPixel(int16_t x, int16_t y, uint16_t color)\n{\n    // Only render pixels if they fall within user's cropped region\n    if (x >= cropLeft && x < (cropLeft + cropWidth) && y >= cropTop && y < (cropTop + cropHeight))\n        assignedTile->handleAppletPixel(x, y, static_cast<Color>(color));\n}\n\n// Link our applet to a tile\n// This can only be called by Tile::assignApplet\n// The tile determines the applets dimensions\n// Pixel output is passed to tile during render()\nvoid InkHUD::Applet::setTile(Tile *t)\n{\n    // If we're setting (not clearing), make sure the link is \"reciprocal\"\n    if (t)\n        assert(t->getAssignedApplet() == this);\n\n    assignedTile = t;\n}\n\n// The tile to which our applet is assigned\nInkHUD::Tile *InkHUD::Applet::getTile()\n{\n    return assignedTile;\n}\n\n// Draw the applet\nvoid InkHUD::Applet::render(bool full)\n{\n    assert(assignedTile);                              // Ensure that we have a tile\n    assert(assignedTile->getAssignedApplet() == this); // Ensure that we have a reciprocal link with the tile\n\n    // WindowManager::update has now consumed the info about our update request\n    // Clear everything for future requests\n    wantRender = false;                                       // Flag set by requestUpdate\n    wantAutoshow = false;                                     // Flag set by requestAutoShow. May or may not have been honored.\n    wantUpdateType = Drivers::EInk::UpdateTypes::UNSPECIFIED; // Update type we wanted. May on may not have been granted.\n    wantFullRender = true;                                    // Default to a full render\n\n    updateDimensions();\n    resetDrawingSpace();\n    onRender(full); // Draw the applet\n\n    // Handle \"Tile Highlighting\"\n    // Some devices may use an auxiliary button to switch between tiles\n    // When this happens, we temporarily highlight the newly focused tile with a border\n\n    // If our tile is (or was) highlighted, to indicate a change in focus\n    if (Tile::highlightTarget == assignedTile) {\n        // Draw the highlight\n        if (!Tile::highlightShown) {\n            drawRect(0, 0, width(), height(), BLACK);\n            Tile::startHighlightTimeout();\n            Tile::highlightShown = true;\n        }\n\n        // Clear the highlight\n        else {\n            Tile::cancelHighlightTimeout();\n            Tile::highlightShown = false;\n            Tile::highlightTarget = nullptr;\n        }\n    }\n}\n\n// Does the applet want to render now?\n// Checks whether the applet called requestUpdate recently, in response to an event\n// Used by WindowManager::update\nbool InkHUD::Applet::wantsToRender()\n{\n    return wantRender;\n}\n\n// Does the applet want to be moved to foreground before next render, to show new data?\n// User specifies whether an applet has permission for this, using the on-screen menu\n// Used by WindowManager::update\nbool InkHUD::Applet::wantsToAutoshow()\n{\n    return wantAutoshow;\n}\n\n// Which technique would this applet prefer that the display use to change the image?\n// Used by WindowManager::update\nDrivers::EInk::UpdateTypes InkHUD::Applet::wantsUpdateType()\n{\n    return wantUpdateType;\n}\n\nbool InkHUD::Applet::wantsFullRender()\n{\n    return wantFullRender;\n}\n\n// Get size of the applet's drawing space from its tile\n// Performed immediately before derived applet's drawing code runs\nvoid InkHUD::Applet::updateDimensions()\n{\n    assert(assignedTile);\n    WIDTH = assignedTile->getWidth();\n    HEIGHT = assignedTile->getHeight();\n    _width = WIDTH;\n    _height = HEIGHT;\n}\n\n// Ensure that render() always starts with the same initial drawing config\nvoid InkHUD::Applet::resetDrawingSpace()\n{\n    resetCrop();         // Allow pixel from any region of the applet to draw\n    setTextColor(BLACK); // Reset text params\n    setCursor(0, 0);\n    setTextWrap(false);\n    setFont(fontSmall);\n}\n\n// Sets one or more inputs to enabled/disabled for this applet and if they should be sent to it\nvoid InkHUD::Applet::setInputsSubscribed(uint8_t input, bool captured)\n{\n    if (captured)\n        subscribedInputs |= input;\n    else\n        subscribedInputs &= ~input;\n}\n\n// Checks if a specific input is enabled for this applet and should be sent to it\nbool InkHUD::Applet::isInputSubscribed(InputMask input)\n{\n    return (subscribedInputs & input) == input;\n}\n\n// Tell InkHUD::Renderer that we want to render now\n// Applets should internally listen for events they are interested in, via MeshModule, CallbackObserver etc\n// When an applet decides it has heard something important, and wants to redraw, it calls this method\n// Once the renderer has given other applets a chance to process whatever event we just detected,\n// it will run Applet::render(), which may draw our applet to screen, if it is shown (foreground)\n// We should requestUpdate even if our applet is currently background, because this might be changed by autoshow\nvoid InkHUD::Applet::requestUpdate(Drivers::EInk::UpdateTypes type, bool full)\n{\n    wantRender = true;\n    wantUpdateType = type;\n    wantFullRender = full;\n    inkhud->requestUpdate();\n}\n\n// Ask window manager to move this applet to foreground at start of next render\n// Users select which applets have permission for this using the on-screen menu\nvoid InkHUD::Applet::requestAutoshow()\n{\n    wantAutoshow = true;\n}\n\n// Called when an Applet begins running\n// Active applets are considered \"enabled\"\n// They should now listen for events, and request their own updates\n// They may also be unexpectedly renderer at any time by other InkHUD components\n// Applets can be activated at run-time through the on-screen menu\nvoid InkHUD::Applet::activate()\n{\n    onActivate(); // Call derived class' handler\n    active = true;\n}\n\n// Called when an Applet stops running\n// Inactive applets are considered \"disabled\"\n// They should not listen for events, process data\n// They will not be rendered\n// Applets can be deactivated at run-time through the on-screen menu\nvoid InkHUD::Applet::deactivate()\n{\n    // If applet is still in foreground, run its onBackground code first\n    if (isForeground())\n        sendToBackground();\n\n    // If applet is active, run its onDeactivate code first\n    if (isActive())\n        onDeactivate(); // Derived class' handler\n    active = false;\n}\n\n// Is the Applet running?\n// Note: active / inactive is not related to background / foreground\n// An inactive applet is *fully* disabled\nbool InkHUD::Applet::isActive()\n{\n    return active;\n}\n\n// Begin showing the Applet\n// It will be rendered immediately to whichever tile it is assigned\n// The Renderer will also now honor requestUpdate() calls from this applet\nvoid InkHUD::Applet::bringToForeground()\n{\n    if (!foreground) {\n        foreground = true;\n        onForeground(); // Run derived applet class' handler\n    }\n\n    requestUpdate();\n}\n\n// Stop showing the Applet\n// Calls to requestUpdate() will no longer be honored\n// When one applet moves to background, another should move to foreground (exception: some system applets)\nvoid InkHUD::Applet::sendToBackground()\n{\n    if (foreground) {\n        foreground = false;\n        onBackground(); // Run derived applet class' handler\n    }\n}\n\n// Is the applet currently displayed on a tile\n// Note: in some uncommon situations, an applet may be \"foreground\", and still not visible.\n// This can occur when a system applet is covering the screen (e.g. during BLE pairing)\n// This is not our applets responsibility to handle,\n// as in those situations, the system applet will have \"locked\" rendering\nbool InkHUD::Applet::isForeground()\n{\n    return foreground;\n}\n\n// Limit drawing to a certain region of the applet\n// Pixels outside this region will be discarded\nvoid InkHUD::Applet::setCrop(int16_t left, int16_t top, uint16_t width, uint16_t height)\n{\n    cropLeft = left;\n    cropTop = top;\n    cropWidth = width;\n    cropHeight = height;\n}\n\n// Allow drawing to any region of the Applet\n// Reverses Applet::setCrop\nvoid InkHUD::Applet::resetCrop()\n{\n    setCrop(0, 0, width(), height());\n}\n\n// Convert relative width to absolute width, in px\n// X(0) is 0\n// X(0.5) is width() / 2\n// X(1) is width()\nuint16_t InkHUD::Applet::X(float f)\n{\n    return width() * f;\n}\n\n// Convert relative hight to absolute height, in px\n// Y(0) is 0\n// Y(0.5) is height() / 2\n// Y(1) is height()\nuint16_t InkHUD::Applet::Y(float f)\n{\n    return height() * f;\n}\n\n// Print text, specifying the position of any edge / corner of the textbox\nvoid InkHUD::Applet::printAt(int16_t x, int16_t y, const char *text, HorizontalAlignment ha, VerticalAlignment va)\n{\n    // We do still have to run getTextBounds to find the width\n    int16_t textOffsetX, textOffsetY;\n    uint16_t textWidth, textHeight;\n    getTextBounds(text, 0, 0, &textOffsetX, &textOffsetY, &textWidth, &textHeight);\n\n    int16_t cursorX = 0;\n    int16_t cursorY = 0;\n\n    switch (ha) {\n    case LEFT:\n        cursorX = x - textOffsetX;\n        break;\n    case CENTER:\n        cursorX = (x - textOffsetX) - (textWidth / 2);\n        break;\n    case RIGHT:\n        cursorX = (x - textOffsetX) - textWidth;\n        break;\n    }\n\n    // We're using a fixed line height, rather than sizing to text (getTextBounds)\n\n    switch (va) {\n    case TOP:\n        cursorY = y + currentFont.heightAboveCursor();\n        break;\n    case MIDDLE:\n        cursorY = (y + currentFont.heightAboveCursor()) - (currentFont.lineHeight() / 2);\n        break;\n    case BOTTOM:\n        cursorY = (y + currentFont.heightAboveCursor()) - currentFont.lineHeight();\n        break;\n    }\n\n    setCursor(cursorX, cursorY);\n    print(text);\n}\n\n// Print text, specifying the position of any edge / corner of the textbox\nvoid InkHUD::Applet::printAt(int16_t x, int16_t y, const std::string &text, HorizontalAlignment ha, VerticalAlignment va)\n{\n    printAt(x, y, text.c_str(), ha, va);\n}\n\n// Set which font should be used for subsequent drawing\n// This is AppletFont type, which is a wrapper for AdafruitGFX font, with some precalculated dimension data\nvoid InkHUD::Applet::setFont(AppletFont f)\n{\n    GFX::setFont(f.gfxFont);\n    currentFont = f;\n}\n\n// Get which font is currently being used for drawing\n// This is AppletFont type, which is a wrapper for AdafruitGFX font, with some precalculated dimension data\nInkHUD::AppletFont InkHUD::Applet::getFont()\n{\n    return currentFont;\n}\n\n// Parse any text which might have \"special characters\"\n// Re-encodes UTF-8 characters to match our 8-bit encoded fonts\nstd::string InkHUD::Applet::parse(const std::string &text)\n{\n    return getFont().decodeUTF8(text);\n}\n\n// Get the best version of a node's short name available to us\n// Parses any non-ascii chars\n// Swaps for last-four of node-id if the real short name is unknown or can't be rendered (emoji)\nstd::string InkHUD::Applet::parseShortName(meshtastic_NodeInfoLite *node)\n{\n    assert(node);\n\n    // Use the true shortname if known, and doesn't contain any unprintable characters (emoji, etc.)\n    if (node->has_user) {\n        std::string parsed = parse(node->user.short_name);\n        if (isPrintable(parsed))\n            return parsed;\n    }\n\n    // Otherwise, use the \"last 4\" of node id\n    // - if short name unknown, or\n    // - if short name is emoji (we can't render this)\n    std::string nodeID = hexifyNodeNum(node->num);\n    return nodeID.substr(nodeID.length() - 4);\n}\n\n// Determine if all characters of a string are printable using the current font\nbool InkHUD::Applet::isPrintable(const std::string &text)\n{\n    // Scan for SUB (0x1A), which is the value assigned by AppletFont::applyEncoding if a unicode character is not handled\n    for (const char &c : text) {\n        if (c == '\\x1A')\n            return false;\n    }\n\n    // No unprintable characters found\n    return true;\n}\n\n// Gets rendered width of a string\n// Wrapper for getTextBounds\nuint16_t InkHUD::Applet::getTextWidth(const char *text)\n{\n    // We do still have to run getTextBounds to find the width\n    int16_t textOffsetX, textOffsetY;\n    uint16_t textWidth, textHeight;\n    getTextBounds(text, 0, 0, &textOffsetX, &textOffsetY, &textWidth, &textHeight);\n\n    return textWidth;\n}\n\n// Gets rendered width of a string\n// Wrapper for getTextBounds\nuint16_t InkHUD::Applet::getTextWidth(const std::string &text)\n{\n    return getTextWidth(text.c_str());\n}\n\n// Evaluate SNR and RSSI to qualify signal strength at one of four discrete levels\n// Roughly comparable to values used by the iOS app;\n// I didn't actually go look up the code, just fit to a sample graphic I have of the iOS signal indicator\nInkHUD::Applet::SignalStrength InkHUD::Applet::getSignalStrength(float snr, float rssi)\n{\n    uint8_t score = 0;\n\n    // Give a score for the SNR\n    if (snr > -17.5)\n        score += 2;\n    else if (snr > -26.0)\n        score += 1;\n\n    // Give a score for the RSSI\n    if (rssi > -115.0)\n        score += 3;\n    else if (rssi > -120.0)\n        score += 2;\n    else if (rssi > -126.0)\n        score += 1;\n\n    // Combine scores, then give a result\n    if (score >= 5)\n        return SIGNAL_GOOD;\n    else if (score >= 4)\n        return SIGNAL_FAIR;\n    else if (score > 0)\n        return SIGNAL_BAD;\n    else\n        return SIGNAL_NONE;\n}\n\n// Apply the standard \"node id\" formatting to a nodenum int: !0123abdc\nstd::string InkHUD::Applet::hexifyNodeNum(NodeNum num)\n{\n    // Not found in nodeDB, show a hex nodeid instead\n    char nodeIdHex[10];\n    sprintf(nodeIdHex, \"!%0x\", num); // Convert to the typical \"fixed width hex with !\" format\n    return std::string(nodeIdHex);\n}\n\n// Print text, with word wrapping\n// Avoids splitting words in half, instead moving the entire word to a new line wherever possible\nvoid InkHUD::Applet::printWrapped(int16_t left, int16_t top, uint16_t width, const std::string &text)\n{\n    // Place the AdafruitGFX cursor to suit our \"top\" coord\n    setCursor(left, top + getFont().heightAboveCursor());\n\n    // How wide a space character is\n    // Used when simulating print, for dimensioning\n    // Works around issues where getTextDimensions() doesn't account for whitespace\n    const uint8_t wSp = getFont().widthBetweenWords();\n\n    // Move through our text, character by character\n    uint16_t wordStart = 0;\n    for (uint16_t i = 0; i < text.length(); i++) {\n\n        // Found: end of word (split by spaces or newline)\n        // Also handles end of string\n        if (text[i] == ' ' || text[i] == '\\n' || i == text.length() - 1) {\n            // Isolate this word\n            uint16_t wordLength = (i - wordStart) + 1; // Plus one. Imagine: \"a\". End - Start is 0, but length is 1\n            std::string word = text.substr(wordStart, wordLength);\n            wordStart = i + 1; // Next word starts *after* the space\n\n            // If word is terminated by a newline char, don't actually print it.\n            // We'll manually add a new line later\n            if (word.back() == '\\n')\n                word.pop_back();\n\n            // Measure the word, in px\n            int16_t l, t;\n            uint16_t w, h;\n            getTextBounds(word.c_str(), getCursorX(), getCursorY(), &l, &t, &w, &h);\n\n            // Word is short\n            if (w < width) {\n                // Word fits on current line\n                if ((l + w + wSp) < left + width)\n                    print(word.c_str());\n\n                // Word doesn't fit on current line\n                else {\n                    setCursor(left, getCursorY() + getFont().lineHeight()); // Newline\n                    print(word.c_str());\n                }\n            }\n\n            // Word is really long\n            // (wider than applet)\n            else {\n                // Horribly inefficient:\n                // Rather than working directly with the glyph sizes,\n                // we're going to run everything through getTextBounds as a c-string of length 1\n                // This is because AdafruitGFX has special internal handling for their legacy 6x8 font,\n                // which would be a pain to add manually here.\n                // These super-long strings probably don't come up often so we can maybe tolerate this.\n\n                // Todo: rewrite making use of AdafruitGFX native text wrapping\n                char cstr[] = {0, 0};\n                int16_t bx, by;\n                uint16_t bw, bh;\n                for (uint16_t c = 0; c < word.length(); c++) {\n                    // Shove next char into a c string\n                    cstr[0] = word[c];\n                    getTextBounds(cstr, getCursorX(), getCursorY(), &bx, &by, &bw, &bh);\n\n                    // Manual newline, if next character will spill beyond screen edge\n                    if ((bx + bw) > left + width)\n                        setCursor(left, getCursorY() + getFont().lineHeight());\n\n                    // Print next character\n                    print(word[c]);\n                }\n            }\n        }\n\n        // If word was terminated by a newline char, manually add the new line now\n        if (text[i] == '\\n') {\n            setCursor(left, getCursorY() + getFont().lineHeight()); // Manual newline\n            wordStart = i + 1; // New word begins after the newline. Otherwise print will add an *extra* line\n        }\n    }\n}\n\n// Simulate running printWrapped, to determine how tall the block of text will be.\n// This is a wasteful way of handling things. Maybe some way to optimize in future?\nuint32_t InkHUD::Applet::getWrappedTextHeight(int16_t left, uint16_t width, const std::string &text)\n{\n    // Cache the current crop region\n    int16_t cL = cropLeft;\n    int16_t cT = cropTop;\n    uint16_t cW = cropWidth;\n    uint16_t cH = cropHeight;\n\n    setCrop(-1, -1, 0, 0);              // Set crop to temporarily discard all pixels\n    printWrapped(left, 0, width, text); // Simulate only - no pixels drawn\n\n    // Restore previous crop region\n    cropLeft = cL;\n    cropTop = cT;\n    cropWidth = cW;\n    cropHeight = cH;\n\n    // Note: printWrapped() offsets the initial cursor position by heightAboveCursor() val,\n    // so we need to account for that when determining the height\n    return (getCursorY() + getFont().heightBelowCursor());\n}\n\n// Fill a region with sparse diagonal lines, to create a pseudo-translucent fill\nvoid InkHUD::Applet::hatchRegion(int16_t x, int16_t y, uint16_t w, uint16_t h, uint8_t spacing, Color color)\n{\n    // Cache the currently cropped region\n    int16_t oldCropL = cropLeft;\n    int16_t oldCropT = cropTop;\n    uint16_t oldCropW = cropWidth;\n    uint16_t oldCropH = cropHeight;\n\n    setCrop(x, y, w, h);\n\n    // Draw lines starting along the top edge, every few px\n    for (int16_t ix = x; ix < x + w; ix += spacing) {\n        for (int16_t i = 0; i < w || i < h; i++) {\n            drawPixel(ix + i, y + i, color);\n        }\n    }\n\n    // Draw lines starting along the left edge, every few px\n    for (int16_t iy = y; iy < y + h; iy += spacing) {\n        for (int16_t i = 0; i < w || i < h; i++) {\n            drawPixel(x + i, iy + i, color);\n        }\n    }\n\n    // Restore any previous crop\n    // If none was set, this will clear\n    cropLeft = oldCropL;\n    cropTop = oldCropT;\n    cropWidth = oldCropW;\n    cropHeight = oldCropH;\n}\n\n// Get a human readable time representation of an epoch time (seconds since 1970)\n// If time is invalid, this will be an empty string\nstd::string InkHUD::Applet::getTimeString(uint32_t epochSeconds)\n{\n#ifdef BUILD_EPOCH\n    constexpr uint32_t validAfterEpoch = BUILD_EPOCH - (SEC_PER_DAY * 30 * 6); // 6 Months prior to build\n#else\n    constexpr uint32_t validAfterEpoch = 1738368000 - (SEC_PER_DAY * 30 * 6); // 6 Months prior to Feb 1, 2025 12:00:00 AM GMT\n#endif\n\n    uint32_t epochNow = getValidTime(RTCQuality::RTCQualityDevice, true);\n\n    int32_t daysAgo = (epochNow - epochSeconds) / SEC_PER_DAY;\n    int32_t hoursAgo = (epochNow - epochSeconds) / SEC_PER_HOUR;\n\n    // Times are invalid: rtc is much older than when code was built\n    // Don't give any human readable string\n    if (epochNow <= validAfterEpoch)\n        return \"\";\n\n    // Times are invalid: argument time is significantly ahead of RTC\n    // Don't give any human readable string\n    if (daysAgo < -2)\n        return \"\";\n\n    // Times are probably invalid: more than 6 months ago\n    if (daysAgo > 6 * 30)\n        return \"\";\n\n    if (daysAgo > 1)\n        return to_string(daysAgo) + \" days ago\";\n\n    else if (hoursAgo > 18)\n        return \"Yesterday\";\n\n    else {\n\n        uint32_t hms = epochSeconds % SEC_PER_DAY;\n        hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;\n\n        // Tear apart hms into h:m\n        uint32_t hour = hms / SEC_PER_HOUR;\n        uint32_t min = (hms % SEC_PER_HOUR) / SEC_PER_MIN;\n\n        // Format the clock string, either 12 hour or 24 hour\n        char clockStr[11];\n        if (config.display.use_12h_clock)\n            sprintf(clockStr, \"%u:%02u %s\", (hour % 12 == 0 ? 12 : hour % 12), min, hour > 11 ? \"PM\" : \"AM\");\n        else\n            sprintf(clockStr, \"%02u:%02u\", hour, min);\n\n        return clockStr;\n    }\n}\n\n// If no argument specified, get time string for the current RTC time\nstd::string InkHUD::Applet::getTimeString()\n{\n    return getTimeString(getValidTime(RTCQuality::RTCQualityDevice, true));\n}\n\n// Calculate how many nodes have been seen within our preferred window of activity\n// This period is set by user, via the menu\n// Todo: optimize to calculate once only per WindowManager::render\nuint16_t InkHUD::Applet::getActiveNodeCount()\n{\n    // Don't even try to count nodes if RTC isn't set\n    // The last heard values in nodedb will be incomprehensible\n    if (getRTCQuality() == RTCQualityNone)\n        return 0;\n\n    uint16_t count = 0;\n\n    // For each node in db\n    for (uint16_t i = 0; i < nodeDB->getNumMeshNodes(); i++) {\n        const meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n\n        // Check if heard recently, and not our own node\n        if (sinceLastSeen(node) < settings->recentlyActiveSeconds && node->num != nodeDB->getNodeNum())\n            count++;\n    }\n\n    return count;\n}\n\n// Get an abbreviated, human readable, distance string\n// Honors config.display.units, to offer both metric and imperial\nstd::string InkHUD::Applet::localizeDistance(uint32_t meters)\n{\n    constexpr float FEET_PER_METER = 3.28084;\n    constexpr uint16_t FEET_PER_MILE = 5280;\n\n    // Resulting string\n    std::string localized;\n\n    // Imperial\n    if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) {\n        uint32_t feet = meters * FEET_PER_METER;\n        // Distant (miles, rounded)\n        if (feet > FEET_PER_MILE / 2) {\n            localized += to_string((uint32_t)roundf(feet / FEET_PER_MILE));\n            localized += \"mi\";\n        }\n        // Nearby (feet)\n        else {\n            localized += to_string(feet);\n            localized += \"ft\";\n        }\n    }\n\n    // Metric\n    else {\n        // Distant (kilometers, rounded)\n        if (meters >= 500) {\n            localized += to_string((uint32_t)roundf(meters / 1000.0));\n            localized += \"km\";\n        }\n        // Nearby (meters)\n        else {\n            localized += to_string(meters);\n            localized += \"m\";\n        }\n    }\n\n    return localized;\n}\n\n// Print text with a \"faux bold\" effect, by drawing it multiple times, offsetting slightly\nvoid InkHUD::Applet::printThick(int16_t xCenter, int16_t yCenter, const std::string &text, uint8_t thicknessX, uint8_t thicknessY)\n{\n    // How many times to draw along x axis\n    int16_t xStart;\n    int16_t xEnd;\n    switch (thicknessX) {\n    case 0:\n        assert(false);\n    case 1:\n        xStart = xCenter;\n        xEnd = xCenter;\n        break;\n    case 2:\n        xStart = xCenter;\n        xEnd = xCenter + 1;\n        break;\n    default:\n        xStart = xCenter - (thicknessX / 2);\n        xEnd = xCenter + (thicknessX / 2);\n    }\n\n    // How many times to draw along Y axis\n    int16_t yStart;\n    int16_t yEnd;\n    switch (thicknessY) {\n    case 0:\n        assert(false);\n    case 1:\n        yStart = yCenter;\n        yEnd = yCenter;\n        break;\n    case 2:\n        yStart = yCenter;\n        yEnd = yCenter + 1;\n        break;\n    default:\n        yStart = yCenter - (thicknessY / 2);\n        yEnd = yCenter + (thicknessY / 2);\n    }\n\n    // Print multiple times, overlapping\n    for (int16_t x = xStart; x <= xEnd; x++) {\n        for (int16_t y = yStart; y <= yEnd; y++) {\n            printAt(x, y, text, CENTER, MIDDLE);\n        }\n    }\n}\n\n// Allow this applet to suppress notifications\n// Asked before a notification is shown via the NotificationApplet\n// An applet might want to suppress a notification if the applet itself already displays this info\n// Example: AllMessageApplet should not approve notifications for messages, if it is in foreground\nbool InkHUD::Applet::approveNotification(NicheGraphics::InkHUD::Notification &n)\n{\n    // By default, no objection\n    return true;\n}\n\n// Draw the standard header, used by most Applets\n/*\n┌───────────────────────────────┐\n│ Applet::name here             │\n│ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │\n│                               │\n│                               │\n│                               │\n└───────────────────────────────┘\n*/\nvoid InkHUD::Applet::drawHeader(const std::string &text)\n{\n    // Y position for divider\n    // - between header text and messages\n    constexpr int16_t padDivH = 2;\n    const int16_t headerDivY = padDivH + fontSmall.lineHeight() + padDivH - 1;\n\n    // Print header\n    printAt(0, padDivH, text);\n\n    // Divider\n    // - below header text: separates message\n    // - above header text: separates other applets\n    for (int16_t x = 0; x < width(); x += 2) {\n        drawPixel(x, 0, BLACK);\n        drawPixel(x, headerDivY, BLACK); // Dotted 50%\n    }\n\n    // Dither near battery\n    if (settings->optionalFeatures.batteryIcon) {\n        constexpr uint16_t ditherSizePx = 4;\n        Tile *batteryTile = ((Applet *)inkhud->getSystemApplet(\"BatteryIcon\"))->getTile();\n        const uint16_t batteryTileLeft = batteryTile->getLeft();\n        const uint16_t batteryTileTop = batteryTile->getTop();\n        const uint16_t batteryTileHeight = batteryTile->getHeight();\n        hatchRegion(batteryTileLeft - ditherSizePx, batteryTileTop, ditherSizePx, batteryTileHeight, 2, WHITE);\n    }\n}\n\n// Get the height of the standard applet header\n// This will vary, depending on font\n// Applets use this value to avoid drawing overtop the header\nuint16_t InkHUD::Applet::getHeaderHeight()\n{\n    // Y position for divider\n    // - between header text and messages\n    constexpr int16_t padDivH = 2;\n    const int16_t headerDivY = padDivH + fontSmall.lineHeight() + padDivH - 1;\n\n    return headerDivY + 1; // \"Plus one\": height is always one more than Y position\n}\n\n// \"Scale to fit\": width of Meshtastic logo to fit given region, maintaining aspect ratio\nuint16_t InkHUD::Applet::getLogoWidth(uint16_t limitWidth, uint16_t limitHeight)\n{\n    // Determine whether we're limited by width or height\n    // Makes sure we draw the logo as large as possible, within the specified region,\n    // while still maintaining correct aspect ratio\n    if (limitWidth > limitHeight * LOGO_ASPECT_RATIO)\n        return limitHeight * LOGO_ASPECT_RATIO;\n    else\n        return limitWidth;\n}\n\n// \"Scale to fit\": height of Meshtastic logo to fit given region, maintaining aspect ratio\nuint16_t InkHUD::Applet::getLogoHeight(uint16_t limitWidth, uint16_t limitHeight)\n{\n    // Determine whether we're limited by width or height\n    // Makes sure we draw the logo as large as possible, within the specified region,\n    // while still maintaining correct aspect ratio\n    if (limitHeight > limitWidth / LOGO_ASPECT_RATIO)\n        return limitWidth / LOGO_ASPECT_RATIO;\n    else\n        return limitHeight;\n}\n\n// Draw a scalable Meshtastic logo\n// Make sure to provide dimensions which have the correct aspect ratio (~2)\n// Three paths, drawn thick using quads, with one corner \"radiused\"\n/*\n        -        ^\n       /-       /-\\\n      //       // \\\\\n     //       //   \\\\\n    //       //     \\\\\n   //       //       \\\\\n\n*/\nvoid InkHUD::Applet::drawLogo(int16_t centerX, int16_t centerY, uint16_t width, uint16_t height, Color color)\n{\n    struct Point {\n        int x;\n        int y;\n    };\n    typedef Point Distance;\n\n    int16_t logoTh = width * 0.068; // Thickness scales with width. Measured from logo at meshtastic.org.\n    int16_t logoL = centerX - (width / 2) + (logoTh / 2);\n    int16_t logoT = centerY - (height / 2) + (logoTh / 2);\n    int16_t logoW = width - logoTh;\n    int16_t logoH = height - logoTh;\n    int16_t logoR = logoL + logoW - 1;\n    int16_t logoB = logoT + logoH - 1;\n\n    // Points for paths (a, b, and c)\n    /*\n      +-----------------------------+\n    --|          a2       b2/c1     |\n      |                             |\n      |                             |\n      |                             |\n    --|  a1      b1              c2 |\n      +-----------------------------+\n         |       |       |       |\n    */\n\n    Point a1 = {map(0, 0, 3, logoL, logoR), logoB};\n    Point a2 = {map(1, 0, 3, logoL, logoR), logoT};\n    Point b1 = {map(1, 0, 3, logoL, logoR), logoB};\n    Point b2 = {map(2, 0, 3, logoL, logoR), logoT};\n    Point c1 = {map(2, 0, 3, logoL, logoR), logoT};\n    Point c2 = {map(3, 0, 3, logoL, logoR), logoB};\n\n    // Find angle of the path(s)\n    // Used to thicken the single pixel paths\n    /*\n    +-------------------------------+\n    |             a2                |\n    |            -|                 |\n    |          -/ |                 |\n    |        -/   |                 |\n    |      -/#    |                 |\n    |    -/   #   |                 |\n    |   /     #   |                 |\n    |  a1----------                 |\n    +-------------------------------+\n    */\n\n    Distance deltaA = {abs(a2.x - a1.x), abs(a2.y - a1.y)};\n    float angle = tanh((float)deltaA.y / deltaA.x);\n\n    // Distance (at right angle to the paths), which will give corners for our \"quads\"\n    // The distance is unsigned. We will vary the signedness of the x and y components to suit the path and corner\n    /*\n    |                             a2\n    |                            .\n    |                          ..\n    |          aq1           ..\n    |            #         ..\n    |            | #     ..\n    |fromPath.y  |   # ..\n    |            +----a1\n    |\n    |          fromPath.x\n    +--------------------------------\n    */\n\n    Distance fromPath;\n    fromPath.x = cos(radians(90) - angle) * logoTh * 0.5;\n    fromPath.y = sin(radians(90) - angle) * logoTh * 0.5;\n\n    // Make the paths thick\n    // Corner points for the rectangles (quads):\n    /*\n\n          aq2\n               a2\n               /    aq3\n              /\n             /\n     aq1    /\n          a1\n                aq3\n    */\n\n    // Filled as two triangles per quad:\n    /*\n                  aq2 #\n                 #     ###\n               ##         # aq3\n             ##       ###   -\n           ##     ####    -/\n         ##    ###      -/\n       ##  ####       -/\n     aq1 ##         -/\n        ---       -/\n           \\---aq4\n    */\n\n    // Make the path thick: path a becomes quad a\n    Point aq1{a1.x - fromPath.x, a1.y - fromPath.y};\n    Point aq2{a2.x - fromPath.x, a2.y - fromPath.y};\n    Point aq3{a2.x + fromPath.x, a2.y + fromPath.y};\n    Point aq4{a1.x + fromPath.x, a1.y + fromPath.y};\n    fillTriangle(aq1.x, aq1.y, aq2.x, aq2.y, aq3.x, aq3.y, color);\n    fillTriangle(aq1.x, aq1.y, aq3.x, aq3.y, aq4.x, aq4.y, color);\n\n    // Make the path thick: path b becomes quad b\n    Point bq1{b1.x - fromPath.x, b1.y - fromPath.y};\n    Point bq2{b2.x - fromPath.x, b2.y - fromPath.y};\n    Point bq3{b2.x + fromPath.x, b2.y + fromPath.y};\n    Point bq4{b1.x + fromPath.x, b1.y + fromPath.y};\n    fillTriangle(bq1.x, bq1.y, bq2.x, bq2.y, bq3.x, bq3.y, color);\n    fillTriangle(bq1.x, bq1.y, bq3.x, bq3.y, bq4.x, bq4.y, color);\n\n    // Make the path thick: path c becomes quad c\n    Point cq1{c1.x - fromPath.x, c1.y + fromPath.y};\n    Point cq2{c2.x - fromPath.x, c2.y + fromPath.y};\n    Point cq3{c2.x + fromPath.x, c2.y - fromPath.y};\n    Point cq4{c1.x + fromPath.x, c1.y - fromPath.y};\n    fillTriangle(cq1.x, cq1.y, cq2.x, cq2.y, cq3.x, cq3.y, color);\n    fillTriangle(cq1.x, cq1.y, cq3.x, cq3.y, cq4.x, cq4.y, color);\n\n    // Radius the intersection of quad b and quad c\n    /*\n       b2 / c1\n              ####\n           ##      ##\n          /          \\\n         /     \\/     \\\n        /      /\\      \\\n       /      /  \\      \\\n\n    */\n\n    // Don't attempt if logo is tiny\n    if (logoTh > 3) {\n        // The radius for the cap *should* be the same as logoTh, but it's not, due to accumulated rounding\n        // We get better results just re-deriving it\n        int16_t capRad = sqrt(pow(fromPath.x, 2) + pow(fromPath.y, 2));\n        fillCircle(b2.x, b2.y, capRad, color);\n    }\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\n    Base class for InkHUD applets\n    Must be overridden\n\n    An applet is one \"program\" which may show info on the display.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include <GFX.h> // GFXRoot drawing lib\n\n#include \"mesh/MeshTypes.h\"\n\n#include \"./AppletFont.h\"\n#include \"./Applets/System/Notification/Notification.h\" // The notification object, not the applet\n#include \"./InkHUD.h\"\n#include \"./Persistence.h\"\n#include \"./Tile.h\"\n#include \"graphics/niche/Drivers/EInk/EInk.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nusing NicheGraphics::Drivers::EInk;\nusing std::to_string;\n\nclass Applet : public GFX\n{\n  public:\n    // Which edge Applet::printAt will place on the Y parameter\n    enum VerticalAlignment : uint8_t {\n        TOP,\n        MIDDLE,\n        BOTTOM,\n    };\n\n    // Which edge Applet::printAt will place on the X parameter\n    enum HorizontalAlignment : uint8_t {\n        LEFT,\n        RIGHT,\n        CENTER,\n    };\n\n    // An easy-to-understand interpretation of SNR and RSSI\n    // Calculate with Applet::getSignalStrength\n    enum SignalStrength : int8_t {\n        SIGNAL_UNKNOWN = -1,\n        SIGNAL_NONE,\n        SIGNAL_BAD,\n        SIGNAL_FAIR,\n        SIGNAL_GOOD,\n    };\n\n    Applet();\n\n    void setTile(Tile *t); // Should only be called via Tile::setApplet\n    Tile *getTile();       // Tile with which this applet is linked\n\n    // Rendering\n\n    void render(bool full);                       // Draw the applet\n    bool wantsToRender();                         // Check whether applet wants to render\n    bool wantsToAutoshow();                       // Check whether applet wants to become foreground\n    Drivers::EInk::UpdateTypes wantsUpdateType(); // Check which display update type the applet would prefer\n    bool wantsFullRender();                       // Check whether applet wants to render over its previous render\n    void updateDimensions();                      // Get current size from tile\n    void resetDrawingSpace();                     // Makes sure every render starts with same parameters\n\n    // State of the applet\n\n    void activate();          // Begin running\n    void deactivate();        // Stop running\n    void bringToForeground(); // Show\n    void sendToBackground();  // Hide\n    bool isActive();\n    bool isForeground();\n\n    // Event handlers\n\n    virtual void onRender(bool full) = 0; // For drawing the applet\n    virtual void onActivate() {}\n    virtual void onDeactivate() {}\n    virtual void onForeground() {}\n    virtual void onBackground() {}\n    virtual void onShutdown() {}\n\n    // Input Events\n\n    virtual void onButtonShortPress() {}\n    virtual void onButtonLongPress() {}\n    virtual void onExitShort() {}\n    virtual void onExitLong() {}\n    virtual void onNavUp() {}\n    virtual void onNavDown() {}\n    virtual void onNavLeft() {}\n    virtual void onNavRight() {}\n    virtual void onFreeText(char c) {}\n    virtual void onFreeTextDone() {}\n    virtual void onFreeTextCancel() {}\n    // List of inputs which can be subscribed to\n    enum InputMask {      // | No Joystick  |     With Joystick     |\n        BUTTON_SHORT = 1, // | Button Click | Joystick Center Click |\n        BUTTON_LONG = 2,  // | Button Hold  | Joystick Center Hold  |\n        EXIT_SHORT = 4,   // | no-op        | Back Button Click     |\n        EXIT_LONG = 8,    // | no-op        | Back Button Hold      |\n        NAV_UP = 16,      // | no-op        | Joystick Up           |\n        NAV_DOWN = 32,    // | no-op        | Joystick Down         |\n        NAV_LEFT = 64,    // | no-op        | Joystick Left         |\n        NAV_RIGHT = 128   // | no-op        | Joystick Right        |\n    };\n    bool isInputSubscribed(InputMask input); // Check if input should be handled by applet, this should not be overloaded.\n\n    virtual bool approveNotification(Notification &n); // Allow an applet to veto a notification\n\n    static uint16_t getHeaderHeight(); // How tall the \"standard\" applet header is\n\n    static AppletFont fontSmall, fontMedium, fontLarge; // The general purpose fonts, used by all applets\n\n    const char *name = nullptr; // Shown in applet selection menu. Also used as an identifier by InkHUD::getSystemApplet\n\n  protected:\n    void drawPixel(int16_t x, int16_t y, uint16_t color) override; // Place a single pixel. All drawing output passes through here\n\n    void requestUpdate(EInk::UpdateTypes type = EInk::UpdateTypes::UNSPECIFIED,\n                       bool full = true); // Ask WindowManager to schedule a display update\n    void requestAutoshow();               // Ask for applet to be moved to foreground\n\n    uint16_t X(float f);                                                      // Map applet width, mapped from 0 to 1.0\n    uint16_t Y(float f);                                                      // Map applet height, mapped from 0 to 1.0\n    void setCrop(int16_t left, int16_t top, uint16_t width, uint16_t height); // Ignore pixels drawn outside a certain region\n    void resetCrop();                                                         // Removes setCrop()\n\n    // User Input Handling\n\n    uint8_t subscribedInputs = 0b00000000; // Maybe uint16_t for futureproofing? other devices may need more inputs\n    void setInputsSubscribed(uint8_t input,\n                             bool captured); // Set if an input should be handled by applet or not, this should not be\n                                             // overloaded. Can take multiple inputs at once if you OR/`|` them together\n\n    // Text\n\n    void setFont(AppletFont f);\n    AppletFont getFont();\n    uint16_t getTextWidth(const std::string &text);\n    uint16_t getTextWidth(const char *text);\n    uint32_t getWrappedTextHeight(int16_t left, uint16_t width, const std::string &text); // Result of printWrapped\n    void printAt(int16_t x, int16_t y, const char *text, HorizontalAlignment ha = LEFT, VerticalAlignment va = TOP);\n    void printAt(int16_t x, int16_t y, const std::string &text, HorizontalAlignment ha = LEFT, VerticalAlignment va = TOP);\n    void printThick(int16_t xCenter, int16_t yCenter, const std::string &text, uint8_t thicknessX,\n                    uint8_t thicknessY);                                                   // Faux bold\n    void printWrapped(int16_t left, int16_t top, uint16_t width, const std::string &text); // Per-word line wrapping\n\n    void hatchRegion(int16_t x, int16_t y, uint16_t w, uint16_t h, uint8_t spacing, Color color); // Fill with sparse lines\n    void drawHeader(const std::string &text); // Draw the standard applet header\n\n    // Meshtastic Logo\n\n    static constexpr float LOGO_ASPECT_RATIO = 1.9;                    // Width:Height for drawing the Meshtastic logo\n    uint16_t getLogoWidth(uint16_t limitWidth, uint16_t limitHeight);  // Size Meshtastic logo to fit within region\n    uint16_t getLogoHeight(uint16_t limitWidth, uint16_t limitHeight); // Size Meshtastic logo to fit within region\n    void drawLogo(int16_t centerX, int16_t centerY, uint16_t width, uint16_t height,\n                  Color color = BLACK); // Draw the Meshtastic logo\n\n    std::string hexifyNodeNum(NodeNum num);                    // Style as !0123abdc\n    SignalStrength getSignalStrength(float snr, float rssi);   // Interpret SNR and RSSI, as an easy to understand value\n    std::string getTimeString(uint32_t epochSeconds);          // Human readable\n    std::string getTimeString();                               // Current time, human readable\n    uint16_t getActiveNodeCount();                             // Duration determined by user, in onscreen menu\n    std::string localizeDistance(uint32_t meters);             // Human readable distance, imperial or metric\n    std::string parse(const std::string &text);                // Handle text which might contain special chars\n    std::string parseShortName(meshtastic_NodeInfoLite *node); // Get the shortname, or a substitute if has unprintable chars\n    bool isPrintable(const std::string &text);                 // Check for characters which the font can't print\n\n    // Convenient references\n\n    InkHUD *inkhud = nullptr;\n    Persistence::Settings *settings = nullptr;\n    Persistence::LatestMessage *latestMessage = nullptr;\n\n  private:\n    Tile *assignedTile = nullptr; // Rendered pixels are fed into a Tile object, which translates them, then passes to WM\n    bool active = false;          // Has the user enabled this applet (at run-time)?\n    bool foreground = false;      // Is the applet currently drawn on a tile?\n\n    bool wantRender = false;   // In some situations, checked by WindowManager when updating, to skip unneeded redrawing.\n    bool wantAutoshow = false; // Does the applet have new data it would like to display in foreground?\n    NicheGraphics::Drivers::EInk::UpdateTypes wantUpdateType =\n        NicheGraphics::Drivers::EInk::UpdateTypes::UNSPECIFIED; // Which update method we'd prefer when redrawing the display\n    bool wantFullRender = true;                                 // Render with a fresh canvas\n\n    using GFX::setFont;     // Make sure derived classes use AppletFont instead of AdafruitGFX fonts directly\n    using GFX::setRotation; // Block setRotation calls. Rotation is handled globally by WindowManager.\n\n    AppletFont currentFont; // As passed to setFont\n\n    // As set by setCrop\n    int16_t cropLeft = 0;\n    int16_t cropTop = 0;\n    uint16_t cropWidth = 0;\n    uint16_t cropHeight = 0;\n};\n\n}; // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/AppletFont.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./AppletFont.h\"\n\n#include <assert.h>\n\nusing namespace NicheGraphics;\n\nInkHUD::AppletFont::AppletFont()\n{\n    // Default constructor uses the in-built AdafruitGFX font (not recommended)\n}\n\nInkHUD::AppletFont::AppletFont(const GFXfont &adafruitGFXFont, Encoding encoding, int8_t paddingTop, int8_t paddingBottom)\n    : gfxFont(&adafruitGFXFont), encoding(encoding)\n{\n    // AdafruitGFX fonts are drawn relative to a \"cursor line\";\n    // they print as if the glyphs are resting on the line of piece of ruled paper.\n    // The glyphs also each have a different height.\n\n    // To simplify drawing, we will scan the entire font now, and determine an appropriate height for a line of text\n    // We also need to know where that \"cursor line\" sits inside this \"line height\";\n    // we need this additional info in order to align text by top-left, bottom-right, etc\n\n    // AdafruitGFX fonts do declare a line-height, but this seems to include a certain amount of padding,\n    // which we'd rather not deal with. If we want padding, we'll add it manually.\n\n    this->ascenderHeight = 0;\n    this->descenderHeight = 0;\n    this->height = 0;\n\n    // Scan each glyph in the AdafruitGFX font\n    for (uint16_t i = 0; i <= (gfxFont->last - gfxFont->first); i++) {\n        uint8_t glyphHeight = gfxFont->glyph[i].height; // Height of glyph\n        this->height = max(this->height, glyphHeight);  // Store if it's a new max\n\n        // Calculate how far the glyph rises the cursor line\n        // Store if new max value\n        // Caution: signed and unsigned types\n        int8_t glyphAscender = 0 - gfxFont->glyph[i].yOffset;\n        if (glyphAscender > 0)\n            this->ascenderHeight = max(this->ascenderHeight, static_cast<uint8_t>(glyphAscender));\n\n        int8_t glyphDescender = gfxFont->glyph[i].height + gfxFont->glyph[i].yOffset;\n        if (glyphDescender > 0)\n            this->descenderHeight = max(this->descenderHeight, static_cast<uint8_t>(glyphDescender));\n    }\n\n    // Apply any manual padding to grow or shrink the line size\n    // Helpful if a font has one or two exceptionally large characters, which would make the lines ridiculously tall\n    ascenderHeight += paddingTop;\n    descenderHeight += paddingBottom;\n\n    // Find how far the cursor advances when we \"print\" a space character\n    spaceCharWidth = gfxFont->glyph[static_cast<uint8_t>(' ') - gfxFont->first].xAdvance;\n}\n\n/*\n\n             ▲    #####  #         ▲\n             │    #      #         │\n  lineHeight │    ###    #         │\n             │    #      #  #   #  │ heightAboveCursor\n             │    #      #  #   #  │\n             │    #      #   ####  │\n             │ -----------------#----\n             │                 #   │ heightBelowCursor\n             ▼               ###   ▼\n*/\n\nuint8_t InkHUD::AppletFont::lineHeight()\n{\n    return this->height;\n}\n\n// AdafruitGFX fonts print characters so that they nicely on an imaginary line (think: ruled paper).\n// This value is the height of the font, above that imaginary line.\n// Used to calculate the true height of the font\nuint8_t InkHUD::AppletFont::heightAboveCursor()\n{\n    return this->ascenderHeight;\n}\n\n// AdafruitGFX fonts print characters so that they nicely on an imaginary line (think: ruled paper).\n// This value is the height of the font, below that imaginary line.\n// Used to calculate the true height of the font\nuint8_t InkHUD::AppletFont::heightBelowCursor()\n{\n    return this->descenderHeight;\n}\n\n// Width of the space character\n// Used with Applet::printWrapped\nuint8_t InkHUD::AppletFont::widthBetweenWords()\n{\n    return this->spaceCharWidth;\n}\n\n// Convert a unicode char from set of UTF-8 bytes to UTF-32\n// Used by AppletFont::applyEncoding, which remaps unicode chars for extended ASCII fonts, based on their UTF-32 value\nuint32_t InkHUD::AppletFont::toUtf32(const std::string &utf8)\n{\n    uint32_t utf32 = 0;\n\n    switch (utf8.length()) {\n    case 2:\n        // 5 bits + 6 bits\n        utf32 |= (utf8.at(0) & 0b00011111) << 6;\n        utf32 |= (utf8.at(1) & 0b00111111);\n        break;\n\n    case 3:\n        // 4 bits + 6 bits + 6 bits\n        utf32 |= (utf8.at(0) & 0b00001111) << (6 + 6);\n        utf32 |= (utf8.at(1) & 0b00111111) << 6;\n        utf32 |= (utf8.at(2) & 0b00111111);\n        break;\n\n    case 4:\n        // 3 bits + 6 bits + 6 bits + 6 bits\n        utf32 |= (utf8.at(0) & 0b00000111) << (6 + 6 + 6);\n        utf32 |= (utf8.at(1) & 0b00111111) << (6 + 6);\n        utf32 |= (utf8.at(2) & 0b00111111) << 6;\n        utf32 |= (utf8.at(3) & 0b00111111);\n        break;\n    default:\n        return 0;\n    }\n\n    return utf32;\n}\n\n// Process a string, collating UTF-8 bytes, and sending them off for re-encoding to extended ASCII\n// Not all InkHUD text is passed through here, only text which could potentially contain non-ASCII chars\nstd::string InkHUD::AppletFont::decodeUTF8(const std::string &encoded)\n{\n    // Final processed output\n    std::string decoded;\n\n    // Holds bytes for one UTF-8 char during parsing\n    std::string utf8Char;\n    uint8_t utf8CharSize = 0;\n\n    for (const char &c : encoded) {\n\n        // If first byte\n        if (utf8Char.empty()) {\n            // If MSB is unset, byte is an ASCII char\n            // If MSB is set, byte is part of a UTF-8 char. Counting number of higher-order bits tells how many bytes in char\n            if ((c & 0x80)) {\n                char c1 = c;\n                while (c1 & 0x80) {\n                    c1 <<= 1;\n                    utf8CharSize++;\n                }\n            }\n        }\n\n        // Append the byte to the UTF-8 char we're building\n        utf8Char += c;\n\n        // More bytes left to collect. Iterate.\n        if (utf8Char.length() < utf8CharSize)\n            continue;\n\n        // Now collected all bytes for this char\n        // Remap the value to match the encoding of our 8-bit AppletFont\n        decoded += applyEncoding(utf8Char);\n\n        // Reset, ready to build next UTF-8 char from the encoded bytes\n        utf8Char.clear();\n        utf8CharSize = 0;\n    } // For each char\n\n    // All chars processed, return result\n    return decoded;\n}\n\n// Re-encode a single UTF-8 character to extended ASCII\n// Target encoding depends on the font\nchar InkHUD::AppletFont::applyEncoding(const std::string &utf8)\n{\n    // ##################################################### Syntactic Sugar #####################################################\n#define REMAP(in, out)                                                                                                           \\\n    case in:                                                                                                                     \\\n        return out;\n    // ###########################################################################################################################\n\n    // Latin - Central Europe\n    // https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT\n    if (encoding == WINDOWS_1250) {\n        // 1-Byte chars: no remapping\n        if (utf8.length() == 1)\n            return utf8.at(0);\n\n        // Multi-byte chars:\n        switch (toUtf32(utf8)) {\n            REMAP(0x20AC, 0x80); // EURO SIGN\n            REMAP(0x201A, 0x82); // SINGLE LOW-9 QUOTATION MARK\n            REMAP(0x201E, 0x84); // DOUBLE LOW-9 QUOTATION MARK\n            REMAP(0x2026, 0x85); // HORIZONTAL ELLIPSIS\n            REMAP(0x2020, 0x86); // DAGGER\n            REMAP(0x2021, 0x87); // DOUBLE DAGGER\n            REMAP(0x2030, 0x89); // PER MILLE SIGN\n            REMAP(0x0160, 0x8A); // LATIN CAPITAL LETTER S WITH CARON\n            REMAP(0x2039, 0x8B); // SINGLE LEFT-POINTING ANGLE QUOTATION MARK\n            REMAP(0x015A, 0x8C); // LATIN CAPITAL LETTER S WITH ACUTE\n            REMAP(0x0164, 0x8D); // LATIN CAPITAL LETTER T WITH CARON\n            REMAP(0x017D, 0x8E); // LATIN CAPITAL LETTER Z WITH CARON\n            REMAP(0x0179, 0x8F); // LATIN CAPITAL LETTER Z WITH ACUTE\n\n            REMAP(0x2018, 0x91); // LEFT SINGLE QUOTATION MARK\n            REMAP(0x2019, 0x92); // RIGHT SINGLE QUOTATION MARK\n            REMAP(0x201C, 0x93); // LEFT DOUBLE QUOTATION MARK\n            REMAP(0x201D, 0x94); // RIGHT DOUBLE QUOTATION MARK\n            REMAP(0x2022, 0x95); // BULLET\n            REMAP(0x2013, 0x96); // EN DASH\n            REMAP(0x2014, 0x97); // EM DASH\n            REMAP(0x2122, 0x99); // TRADE MARK SIGN\n            REMAP(0x0161, 0x9A); // LATIN SMALL LETTER S WITH CARON\n            REMAP(0x203A, 0x9B); // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK\n            REMAP(0x015B, 0x9C); // LATIN SMALL LETTER S WITH ACUTE\n            REMAP(0x0165, 0x9D); // LATIN SMALL LETTER T WITH CARON\n            REMAP(0x017E, 0x9E); // LATIN SMALL LETTER Z WITH CARON\n            REMAP(0x017A, 0x9F); // LATIN SMALL LETTER Z WITH ACUTE\n\n            REMAP(0x00A0, 0xA0); // NO-BREAK SPACE\n            REMAP(0x02C7, 0xA1); // CARON\n            REMAP(0x02D8, 0xA2); // BREVE\n            REMAP(0x0141, 0xA3); // LATIN CAPITAL LETTER L WITH STROKE\n            REMAP(0x00A4, 0xA4); // CURRENCY SIGN\n            REMAP(0x0104, 0xA5); // LATIN CAPITAL LETTER A WITH OGONEK\n            REMAP(0x00A6, 0xA6); // BROKEN BAR\n            REMAP(0x00A7, 0xA7); // SECTION SIGN\n            REMAP(0x00A8, 0xA8); // DIAERESIS\n            REMAP(0x00A9, 0xA9); // COPYRIGHT SIGN\n            REMAP(0x015E, 0xAA); // LATIN CAPITAL LETTER S WITH CEDILLA\n            REMAP(0x00AB, 0xAB); // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK\n            REMAP(0x00AC, 0xAC); // NOT SIGN\n            REMAP(0x00AD, 0xAD); // SOFT HYPHEN\n            REMAP(0x00AE, 0xAE); // REGISTERED SIGN\n            REMAP(0x017B, 0xAF); // LATIN CAPITAL LETTER Z WITH DOT ABOVE\n\n            REMAP(0x00B0, 0xB0); // DEGREE SIGN\n            REMAP(0x00B1, 0xB1); // PLUS-MINUS SIGN\n            REMAP(0x02DB, 0xB2); // OGONEK\n            REMAP(0x0142, 0xB3); // LATIN SMALL LETTER L WITH STROKE\n            REMAP(0x00B4, 0xB4); // ACUTE ACCENT\n            REMAP(0x00B5, 0xB5); // MICRO SIGN\n            REMAP(0x00B6, 0xB6); // PILCROW SIGN\n            REMAP(0x00B7, 0xB7); // MIDDLE DOT\n            REMAP(0x00B8, 0xB8); // CEDILLA\n            REMAP(0x0105, 0xB9); // LATIN SMALL LETTER A WITH OGONEK\n            REMAP(0x015F, 0xBA); // LATIN SMALL LETTER S WITH CEDILLA\n            REMAP(0x00BB, 0xBB); // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK\n            REMAP(0x013D, 0xBC); // LATIN CAPITAL LETTER L WITH CARON\n            REMAP(0x02DD, 0xBD); // DOUBLE ACUTE ACCENT\n            REMAP(0x013E, 0xBE); // LATIN SMALL LETTER L WITH CARON\n            REMAP(0x017C, 0xBF); // LATIN SMALL LETTER Z WITH DOT ABOVE\n\n            REMAP(0x0154, 0xC0); // LATIN CAPITAL LETTER R WITH ACUTE\n            REMAP(0x00C1, 0xC1); // LATIN CAPITAL LETTER A WITH ACUTE\n            REMAP(0x00C2, 0xC2); // LATIN CAPITAL LETTER A WITH CIRCUMFLEX\n            REMAP(0x0102, 0xC3); // LATIN CAPITAL LETTER A WITH BREVE\n            REMAP(0x00C4, 0xC4); // LATIN CAPITAL LETTER A WITH DIAERESIS\n            REMAP(0x0139, 0xC5); // LATIN CAPITAL LETTER L WITH ACUTE\n            REMAP(0x0106, 0xC6); // LATIN CAPITAL LETTER C WITH ACUTE\n            REMAP(0x00C7, 0xC7); // LATIN CAPITAL LETTER C WITH CEDILLA\n            REMAP(0x010C, 0xC8); // LATIN CAPITAL LETTER C WITH CARON\n            REMAP(0x00C9, 0xC9); // LATIN CAPITAL LETTER E WITH ACUTE\n            REMAP(0x0118, 0xCA); // LATIN CAPITAL LETTER E WITH OGONEK\n            REMAP(0x00CB, 0xCB); // LATIN CAPITAL LETTER E WITH DIAERESIS\n            REMAP(0x011A, 0xCC); // LATIN CAPITAL LETTER E WITH CARON\n            REMAP(0x00CD, 0xCD); // LATIN CAPITAL LETTER I WITH ACUTE\n            REMAP(0x00CE, 0xCE); // LATIN CAPITAL LETTER I WITH CIRCUMFLEX\n            REMAP(0x010E, 0xCF); // LATIN CAPITAL LETTER D WITH CARON\n\n            REMAP(0x0110, 0xD0); // LATIN CAPITAL LETTER D WITH STROKE\n            REMAP(0x0143, 0xD1); // LATIN CAPITAL LETTER N WITH ACUTE\n            REMAP(0x0147, 0xD2); // LATIN CAPITAL LETTER N WITH CARON\n            REMAP(0x00D3, 0xD3); // LATIN CAPITAL LETTER O WITH ACUTE\n            REMAP(0x00D4, 0xD4); // LATIN CAPITAL LETTER O WITH CIRCUMFLEX\n            REMAP(0x0150, 0xD5); // LATIN CAPITAL LETTER O WITH DOUBLE ACUTE\n            REMAP(0x00D6, 0xD6); // LATIN CAPITAL LETTER O WITH DIAERESIS\n            REMAP(0x00D7, 0xD7); // MULTIPLICATION SIGN\n            REMAP(0x0158, 0xD8); // LATIN CAPITAL LETTER R WITH CARON\n            REMAP(0x016E, 0xD9); // LATIN CAPITAL LETTER U WITH RING ABOVE\n            REMAP(0x00DA, 0xDA); // LATIN CAPITAL LETTER U WITH ACUTE\n            REMAP(0x0170, 0xDB); // LATIN CAPITAL LETTER U WITH DOUBLE ACUTE\n            REMAP(0x00DC, 0xDC); // LATIN CAPITAL LETTER U WITH DIAERESIS\n            REMAP(0x00DD, 0xDD); // LATIN CAPITAL LETTER Y WITH ACUTE\n            REMAP(0x0162, 0xDE); // LATIN CAPITAL LETTER T WITH CEDILLA\n            REMAP(0x00DF, 0xDF); // LATIN SMALL LETTER SHARP S\n\n            REMAP(0x0155, 0xE0); // LATIN SMALL LETTER R WITH ACUTE\n            REMAP(0x00E1, 0xE1); // LATIN SMALL LETTER A WITH ACUTE\n            REMAP(0x00E2, 0xE2); // LATIN SMALL LETTER A WITH CIRCUMFLEX\n            REMAP(0x0103, 0xE3); // LATIN SMALL LETTER A WITH BREVE\n            REMAP(0x00E4, 0xE4); // LATIN SMALL LETTER A WITH DIAERESIS\n            REMAP(0x013A, 0xE5); // LATIN SMALL LETTER L WITH ACUTE\n            REMAP(0x0107, 0xE6); // LATIN SMALL LETTER C WITH ACUTE\n            REMAP(0x00E7, 0xE7); // LATIN SMALL LETTER C WITH CEDILLA\n            REMAP(0x010D, 0xE8); // LATIN SMALL LETTER C WITH CARON\n            REMAP(0x00E9, 0xE9); // LATIN SMALL LETTER E WITH ACUTE\n            REMAP(0x0119, 0xEA); // LATIN SMALL LETTER E WITH OGONEK\n            REMAP(0x00EB, 0xEB); // LATIN SMALL LETTER E WITH DIAERESIS\n            REMAP(0x011B, 0xEC); // LATIN SMALL LETTER E WITH CARON\n            REMAP(0x00ED, 0xED); // LATIN SMALL LETTER I WITH ACUTE\n            REMAP(0x00EE, 0xEE); // LATIN SMALL LETTER I WITH CIRCUMFLEX\n            REMAP(0x010F, 0xEF); // LATIN SMALL LETTER D WITH CARON\n\n            REMAP(0x0111, 0xF0); // LATIN SMALL LETTER D WITH STROKE\n            REMAP(0x0144, 0xF1); // LATIN SMALL LETTER N WITH ACUTE\n            REMAP(0x0148, 0xF2); // LATIN SMALL LETTER N WITH CARON\n            REMAP(0x00F3, 0xF3); // LATIN SMALL LETTER O WITH ACUTE\n            REMAP(0x00F4, 0xF4); // LATIN SMALL LETTER O WITH CIRCUMFLEX\n            REMAP(0x0151, 0xF5); // LATIN SMALL LETTER O WITH DOUBLE ACUTE\n            REMAP(0x00F6, 0xF6); // LATIN SMALL LETTER O WITH DIAERESIS\n            REMAP(0x00F7, 0xF7); // DIVISION SIGN\n            REMAP(0x0159, 0xF8); // LATIN SMALL LETTER R WITH CARON\n            REMAP(0x016F, 0xF9); // LATIN SMALL LETTER U WITH RING ABOVE\n            REMAP(0x00FA, 0xFA); // LATIN SMALL LETTER U WITH ACUTE\n            REMAP(0x0171, 0xFB); // LATIN SMALL LETTER U WITH DOUBLE ACUTE\n            REMAP(0x00FC, 0xFC); // LATIN SMALL LETTER U WITH DIAERESIS\n            REMAP(0x00FD, 0xFD); // LATIN SMALL LETTER Y WITH ACUTE\n            REMAP(0x0163, 0xFE); // LATIN SMALL LETTER T WITH CEDILLA\n            REMAP(0x02D9, 0xFF); // DOT ABOVE\n        }\n    }\n\n    // Latin - Cyrillic\n    // https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT\n    else if (encoding == WINDOWS_1251) {\n        // 1-Byte chars: no remapping\n        if (utf8.length() == 1)\n            return utf8.at(0);\n\n        // Multi-byte chars:\n        switch (toUtf32(utf8)) {\n            REMAP(0x0402, 0x80); // CYRILLIC CAPITAL LETTER DJE\n            REMAP(0x0403, 0x81); // CYRILLIC CAPITAL LETTER GJE\n            REMAP(0x201A, 0x82); // SINGLE LOW-9 QUOTATION MARK\n            REMAP(0x0453, 0x83); // CYRILLIC SMALL LETTER GJE\n            REMAP(0x201E, 0x84); // DOUBLE LOW-9 QUOTATION MARK\n            REMAP(0x2026, 0x85); // HORIZONTAL ELLIPSIS\n            REMAP(0x2020, 0x86); // DAGGER\n            REMAP(0x2021, 0x87); // DOUBLE DAGGER\n            REMAP(0x20AC, 0x88); // EURO SIGN\n            REMAP(0x2030, 0x89); // PER MILLE SIGN\n            REMAP(0x0409, 0x8A); // CYRILLIC CAPITAL LETTER LJE\n            REMAP(0x2039, 0x8B); // SINGLE LEFT-POINTING ANGLE QUOTATION MARK\n            REMAP(0x040A, 0x8C); // CYRILLIC CAPITAL LETTER NJE\n            REMAP(0x040C, 0x8D); // CYRILLIC CAPITAL LETTER KJE\n            REMAP(0x040B, 0x8E); // CYRILLIC CAPITAL LETTER TSHE\n            REMAP(0x040F, 0x8F); // CYRILLIC CAPITAL LETTER DZHE\n\n            REMAP(0x0452, 0x90); // CYRILLIC SMALL LETTER DJE\n            REMAP(0x2018, 0x91); // LEFT SINGLE QUOTATION MARK\n            REMAP(0x2019, 0x92); // RIGHT SINGLE QUOTATION MARK\n            REMAP(0x201C, 0x93); // LEFT DOUBLE QUOTATION MARK\n            REMAP(0x201D, 0x94); // RIGHT DOUBLE QUOTATION MARK\n            REMAP(0x2022, 0x95); // BULLET\n            REMAP(0x2013, 0x96); // EN DASH\n            REMAP(0x2014, 0x97); // EM DASH\n            REMAP(0x2122, 0x99); // TRADE MARK SIGN\n            REMAP(0x0459, 0x9A); // CYRILLIC SMALL LETTER LJE\n            REMAP(0x203A, 0x9B); // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK\n            REMAP(0x045A, 0x9C); // CYRILLIC SMALL LETTER NJE\n            REMAP(0x045C, 0x9D); // CYRILLIC SMALL LETTER KJE\n            REMAP(0x045B, 0x9E); // CYRILLIC SMALL LETTER TSHE\n            REMAP(0x045F, 0x9F); // CYRILLIC SMALL LETTER DZHE\n\n            REMAP(0x00A0, 0xA0); // NO-BREAK SPACE\n            REMAP(0x040E, 0xA1); // CYRILLIC CAPITAL LETTER SHORT U\n            REMAP(0x045E, 0xA2); // CYRILLIC SMALL LETTER SHORT U\n            REMAP(0x0408, 0xA3); // CYRILLIC CAPITAL LETTER JE\n            REMAP(0x00A4, 0xA4); // CURRENCY SIGN\n            REMAP(0x0490, 0xA5); // CYRILLIC CAPITAL LETTER GHE WITH UPTURN\n            REMAP(0x00A6, 0xA6); // BROKEN BAR\n            REMAP(0x00A7, 0xA7); // SECTION SIGN\n            REMAP(0x0401, 0xA8); // CYRILLIC CAPITAL LETTER IO\n            REMAP(0x00A9, 0xA9); // COPYRIGHT SIGN\n            REMAP(0x0404, 0xAA); // CYRILLIC CAPITAL LETTER UKRAINIAN IE\n            REMAP(0x00AB, 0xAB); // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK\n            REMAP(0x00AC, 0xAC); // NOT SIGN\n            REMAP(0x00AD, 0xAD); // SOFT HYPHEN\n            REMAP(0x00AE, 0xAE); // REGISTERED SIGN\n            REMAP(0x0407, 0xAF); // CYRILLIC CAPITAL LETTER YI\n\n            REMAP(0x00B0, 0xB0); // DEGREE SIGN\n            REMAP(0x00B1, 0xB1); // PLUS-MINUS SIGN\n            REMAP(0x0406, 0xB2); // CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I\n            REMAP(0x0456, 0xB3); // CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I\n            REMAP(0x0491, 0xB4); // CYRILLIC SMALL LETTER GHE WITH UPTURN\n            REMAP(0x00B5, 0xB5); // MICRO SIGN\n            REMAP(0x00B6, 0xB6); // PILCROW SIGN\n            REMAP(0x00B7, 0xB7); // MIDDLE DOT\n            REMAP(0x0451, 0xB8); // CYRILLIC SMALL LETTER IO\n            REMAP(0x2116, 0xB9); // NUMERO SIGN\n            REMAP(0x0454, 0xBA); // CYRILLIC SMALL LETTER UKRAINIAN IE\n            REMAP(0x00BB, 0xBB); // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK\n            REMAP(0x0458, 0xBC); // CYRILLIC SMALL LETTER JE\n            REMAP(0x0405, 0xBD); // CYRILLIC CAPITAL LETTER DZE\n            REMAP(0x0455, 0xBE); // CYRILLIC SMALL LETTER DZE\n            REMAP(0x0457, 0xBF); // CYRILLIC SMALL LETTER YI\n\n            REMAP(0x0410, 0xC0); // CYRILLIC CAPITAL LETTER A\n            REMAP(0x0411, 0xC1); // CYRILLIC CAPITAL LETTER BE\n            REMAP(0x0412, 0xC2); // CYRILLIC CAPITAL LETTER VE\n            REMAP(0x0413, 0xC3); // CYRILLIC CAPITAL LETTER GHE\n            REMAP(0x0414, 0xC4); // CYRILLIC CAPITAL LETTER DE\n            REMAP(0x0415, 0xC5); // CYRILLIC CAPITAL LETTER IE\n            REMAP(0x0416, 0xC6); // CYRILLIC CAPITAL LETTER ZHE\n            REMAP(0x0417, 0xC7); // CYRILLIC CAPITAL LETTER ZE\n            REMAP(0x0418, 0xC8); // CYRILLIC CAPITAL LETTER I\n            REMAP(0x0419, 0xC9); // CYRILLIC CAPITAL LETTER SHORT I\n            REMAP(0x041A, 0xCA); // CYRILLIC CAPITAL LETTER KA\n            REMAP(0x041B, 0xCB); // CYRILLIC CAPITAL LETTER EL\n            REMAP(0x041C, 0xCC); // CYRILLIC CAPITAL LETTER EM\n            REMAP(0x041D, 0xCD); // CYRILLIC CAPITAL LETTER EN\n            REMAP(0x041E, 0xCE); // CYRILLIC CAPITAL LETTER O\n            REMAP(0x041F, 0xCF); // CYRILLIC CAPITAL LETTER PE\n\n            REMAP(0x0420, 0xD0); // CYRILLIC CAPITAL LETTER ER\n            REMAP(0x0421, 0xD1); // CYRILLIC CAPITAL LETTER ES\n            REMAP(0x0422, 0xD2); // CYRILLIC CAPITAL LETTER TE\n            REMAP(0x0423, 0xD3); // CYRILLIC CAPITAL LETTER U\n            REMAP(0x0424, 0xD4); // CYRILLIC CAPITAL LETTER EF\n            REMAP(0x0425, 0xD5); // CYRILLIC CAPITAL LETTER HA\n            REMAP(0x0426, 0xD6); // CYRILLIC CAPITAL LETTER TSE\n            REMAP(0x0427, 0xD7); // CYRILLIC CAPITAL LETTER CHE\n            REMAP(0x0428, 0xD8); // CYRILLIC CAPITAL LETTER SHA\n            REMAP(0x0429, 0xD9); // CYRILLIC CAPITAL LETTER SHCHA\n            REMAP(0x042A, 0xDA); // CYRILLIC CAPITAL LETTER HARD SIGN\n            REMAP(0x042B, 0xDB); // CYRILLIC CAPITAL LETTER YERU\n            REMAP(0x042C, 0xDC); // CYRILLIC CAPITAL LETTER SOFT SIGN\n            REMAP(0x042D, 0xDD); // CYRILLIC CAPITAL LETTER E\n            REMAP(0x042E, 0xDE); // CYRILLIC CAPITAL LETTER YU\n            REMAP(0x042F, 0xDF); // CYRILLIC CAPITAL LETTER YA\n\n            REMAP(0x0430, 0xE0); // CYRILLIC SMALL LETTER A\n            REMAP(0x0431, 0xE1); // CYRILLIC SMALL LETTER BE\n            REMAP(0x0432, 0xE2); // CYRILLIC SMALL LETTER VE\n            REMAP(0x0433, 0xE3); // CYRILLIC SMALL LETTER GHE\n            REMAP(0x0434, 0xE4); // CYRILLIC SMALL LETTER DE\n            REMAP(0x0435, 0xE5); // CYRILLIC SMALL LETTER IE\n            REMAP(0x0436, 0xE6); // CYRILLIC SMALL LETTER ZHE\n            REMAP(0x0437, 0xE7); // CYRILLIC SMALL LETTER ZE\n            REMAP(0x0438, 0xE8); // CYRILLIC SMALL LETTER I\n            REMAP(0x0439, 0xE9); // CYRILLIC SMALL LETTER SHORT I\n            REMAP(0x043A, 0xEA); // CYRILLIC SMALL LETTER KA\n            REMAP(0x043B, 0xEB); // CYRILLIC SMALL LETTER EL\n            REMAP(0x043C, 0xEC); // CYRILLIC SMALL LETTER EM\n            REMAP(0x043D, 0xED); // CYRILLIC SMALL LETTER EN\n            REMAP(0x043E, 0xEE); // CYRILLIC SMALL LETTER O\n            REMAP(0x043F, 0xEF); // CYRILLIC SMALL LETTER PE\n\n            REMAP(0x0440, 0xF0); // CYRILLIC SMALL LETTER ER\n            REMAP(0x0441, 0xF1); // CYRILLIC SMALL LETTER ES\n            REMAP(0x0442, 0xF2); // CYRILLIC SMALL LETTER TE\n            REMAP(0x0443, 0xF3); // CYRILLIC SMALL LETTER U\n            REMAP(0x0444, 0xF4); // CYRILLIC SMALL LETTER EF\n            REMAP(0x0445, 0xF5); // CYRILLIC SMALL LETTER HA\n            REMAP(0x0446, 0xF6); // CYRILLIC SMALL LETTER TSE\n            REMAP(0x0447, 0xF7); // CYRILLIC SMALL LETTER CHE\n            REMAP(0x0448, 0xF8); // CYRILLIC SMALL LETTER SHA\n            REMAP(0x0449, 0xF9); // CYRILLIC SMALL LETTER SHCHA\n            REMAP(0x044A, 0xFA); // CYRILLIC SMALL LETTER HARD SIGN\n            REMAP(0x044B, 0xFB); // CYRILLIC SMALL LETTER YERU\n            REMAP(0x044C, 0xFC); // CYRILLIC SMALL LETTER SOFT SIGN\n            REMAP(0x044D, 0xFD); // CYRILLIC SMALL LETTER E\n            REMAP(0x044E, 0xFE); // CYRILLIC SMALL LETTER YU\n            REMAP(0x044F, 0xFF); // CYRILLIC SMALL LETTER YA\n        }\n    }\n\n    // Latin - Western Europe\n    // https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT\n    else if (encoding == WINDOWS_1252) {\n        // 1-Byte chars: no remapping\n        if (utf8.length() == 1)\n            return utf8.at(0);\n\n        // Multi-byte chars:\n        switch (toUtf32(utf8)) {\n            REMAP(0x20AC, 0x80) // EURO SIGN\n            REMAP(0x201A, 0x82) // SINGLE LOW-9 QUOTATION MARK\n            REMAP(0x0192, 0x83) // LATIN SMALL LETTER F WITH HOOK\n            REMAP(0x201E, 0x84) // DOUBLE LOW-9 QUOTATION MARK\n            REMAP(0x2026, 0x85) // HORIZONTAL ELLIPSIS\n            REMAP(0x2020, 0x86) // DAGGER\n            REMAP(0x2021, 0x87) // DOUBLE DAGGER\n            REMAP(0x02C6, 0x88) // MODIFIER LETTER CIRCUMFLEX ACCENT\n            REMAP(0x2030, 0x89) // PER MILLE SIGN\n            REMAP(0x0160, 0x8A) // LATIN CAPITAL LETTER S WITH CARON\n            REMAP(0x2039, 0x8B) // SINGLE LEFT-POINTING ANGLE QUOTATION MARK\n            REMAP(0x0152, 0x8C) // LATIN CAPITAL LIGATURE OE\n            REMAP(0x017D, 0x8E) // LATIN CAPITAL LETTER Z WITH CARON\n\n            REMAP(0x2018, 0x91) // LEFT SINGLE QUOTATION MARK\n            REMAP(0x2019, 0x92) // RIGHT SINGLE QUOTATION MARK\n            REMAP(0x201C, 0x93) // LEFT DOUBLE QUOTATION MARK\n            REMAP(0x201D, 0x94) // RIGHT DOUBLE QUOTATION MARK\n            REMAP(0x2022, 0x95) // BULLET\n            REMAP(0x2013, 0x96) // EN DASH\n            REMAP(0x2014, 0x97) // EM DASH\n            REMAP(0x02DC, 0x98) // SMALL TILDE\n            REMAP(0x2122, 0x99) // TRADE MARK SIGN\n            REMAP(0x0161, 0x9A) // LATIN SMALL LETTER S WITH CARON\n            REMAP(0x203A, 0x9B) // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK\n            REMAP(0x0153, 0x9C) // LATIN SMALL LIGATURE OE\n            REMAP(0x017E, 0x9E) // LATIN SMALL LETTER Z WITH CARON\n            REMAP(0x0178, 0x9F) // LATIN CAPITAL LETTER Y WITH DIAERESIS\n\n            REMAP(0x00A0, 0xA0) // NO-BREAK SPACE\n            REMAP(0x00A1, 0xA1) // INVERTED EXCLAMATION MARK\n            REMAP(0x00A2, 0xA2) // CENT SIGN\n            REMAP(0x00A3, 0xA3) // POUND SIGN\n            REMAP(0x00A4, 0xA4) // CURRENCY SIGN\n            REMAP(0x00A5, 0xA5) // YEN SIGN\n            REMAP(0x00A6, 0xA6) // BROKEN BAR\n            REMAP(0x00A7, 0xA7) // SECTION SIGN\n            REMAP(0x00A8, 0xA8) // DIAERESIS\n            REMAP(0x00A9, 0xA9) // COPYRIGHT SIGN\n            REMAP(0x00AA, 0xAA) // FEMININE ORDINAL INDICATOR\n            REMAP(0x00AB, 0xAB) // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK\n            REMAP(0x00AC, 0xAC) // NOT SIGN\n            REMAP(0x00AD, 0xAD) // SOFT HYPHEN\n            REMAP(0x00AE, 0xAE) // REGISTERED SIGN\n            REMAP(0x00AF, 0xAF) // MACRON\n\n            REMAP(0x00B0, 0xB0) // DEGREE SIGN\n            REMAP(0x00B1, 0xB1) // PLUS-MINUS SIGN\n            REMAP(0x00B2, 0xB2) // SUPERSCRIPT TWO\n            REMAP(0x00B3, 0xB3) // SUPERSCRIPT THREE\n            REMAP(0x00B4, 0xB4) // ACUTE ACCENT\n            REMAP(0x00B5, 0xB5) // MICRO SIGN\n            REMAP(0x00B6, 0xB6) // PILCROW SIGN\n            REMAP(0x00B7, 0xB7) // MIDDLE DOT\n            REMAP(0x00B8, 0xB8) // CEDILLA\n            REMAP(0x00B9, 0xB9) // SUPERSCRIPT ONE\n            REMAP(0x00BA, 0xBA) // MASCULINE ORDINAL INDICATOR\n            REMAP(0x00BB, 0xBB) // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK\n            REMAP(0x00BC, 0xBC) // VULGAR FRACTION ONE QUARTER\n            REMAP(0x00BD, 0xBD) // VULGAR FRACTION ONE HALF\n            REMAP(0x00BE, 0xBE) // VULGAR FRACTION THREE QUARTERS\n            REMAP(0x00BF, 0xBF) // INVERTED QUESTION MARK\n\n            REMAP(0x00C0, 0xC0) // LATIN CAPITAL LETTER A WITH GRAVE\n            REMAP(0x00C1, 0xC1) // LATIN CAPITAL LETTER A WITH ACUTE\n            REMAP(0x00C2, 0xC2) // LATIN CAPITAL LETTER A WITH CIRCUMFLEX\n            REMAP(0x00C3, 0xC3) // LATIN CAPITAL LETTER A WITH TILDE\n            REMAP(0x00C4, 0xC4) // LATIN CAPITAL LETTER A WITH DIAERESIS\n            REMAP(0x00C5, 0xC5) // LATIN CAPITAL LETTER A WITH RING ABOVE\n            REMAP(0x00C6, 0xC6) // LATIN CAPITAL LETTER AE\n            REMAP(0x00C7, 0xC7) // LATIN CAPITAL LETTER C WITH CEDILLA\n            REMAP(0x00C8, 0xC8) // LATIN CAPITAL LETTER E WITH GRAVE\n            REMAP(0x00C9, 0xC9) // LATIN CAPITAL LETTER E WITH ACUTE\n            REMAP(0x00CA, 0xCA) // LATIN CAPITAL LETTER E WITH CIRCUMFLEX\n            REMAP(0x00CB, 0xCB) // LATIN CAPITAL LETTER E WITH DIAERESIS\n            REMAP(0x00CC, 0xCC) // LATIN CAPITAL LETTER I WITH GRAVE\n            REMAP(0x00CD, 0xCD) // LATIN CAPITAL LETTER I WITH ACUTE\n            REMAP(0x00CE, 0xCE) // LATIN CAPITAL LETTER I WITH CIRCUMFLEX\n            REMAP(0x00CF, 0xCF) // LATIN CAPITAL LETTER I WITH DIAERESIS\n\n            REMAP(0x00D0, 0xD0) // LATIN CAPITAL LETTER ETH\n            REMAP(0x00D1, 0xD1) // LATIN CAPITAL LETTER N WITH TILDE\n            REMAP(0x00D2, 0xD2) // LATIN CAPITAL LETTER O WITH GRAVE\n            REMAP(0x00D3, 0xD3) // LATIN CAPITAL LETTER O WITH ACUTE\n            REMAP(0x00D4, 0xD4) // LATIN CAPITAL LETTER O WITH CIRCUMFLEX\n            REMAP(0x00D5, 0xD5) // LATIN CAPITAL LETTER O WITH TILDE\n            REMAP(0x00D6, 0xD6) // LATIN CAPITAL LETTER O WITH DIAERESIS\n            REMAP(0x00D7, 0xD7) // MULTIPLICATION SIGN\n            REMAP(0x00D8, 0xD8) // LATIN CAPITAL LETTER O WITH STROKE\n            REMAP(0x00D9, 0xD9) // LATIN CAPITAL LETTER U WITH GRAVE\n            REMAP(0x00DA, 0xDA) // LATIN CAPITAL LETTER U WITH ACUTE\n            REMAP(0x00DB, 0xDB) // LATIN CAPITAL LETTER U WITH CIRCUMFLEX\n            REMAP(0x00DC, 0xDC) // LATIN CAPITAL LETTER U WITH DIAERESIS\n            REMAP(0x00DD, 0xDD) // LATIN CAPITAL LETTER Y WITH ACUTE\n            REMAP(0x00DE, 0xDE) // LATIN CAPITAL LETTER THORN\n            REMAP(0x00DF, 0xDF) // LATIN SMALL LETTER SHARP S\n\n            REMAP(0x00E0, 0xE0) // LATIN SMALL LETTER A WITH GRAVE\n            REMAP(0x00E1, 0xE1) // LATIN SMALL LETTER A WITH ACUTE\n            REMAP(0x00E2, 0xE2) // LATIN SMALL LETTER A WITH CIRCUMFLEX\n            REMAP(0x00E3, 0xE3) // LATIN SMALL LETTER A WITH TILDE\n            REMAP(0x00E4, 0xE4) // LATIN SMALL LETTER A WITH DIAERESIS\n            REMAP(0x00E5, 0xE5) // LATIN SMALL LETTER A WITH RING ABOVE\n            REMAP(0x00E6, 0xE6) // LATIN SMALL LETTER AE\n            REMAP(0x00E7, 0xE7) // LATIN SMALL LETTER C WITH CEDILLA\n            REMAP(0x00E8, 0xE8) // LATIN SMALL LETTER E WITH GRAVE\n            REMAP(0x00E9, 0xE9) // LATIN SMALL LETTER E WITH ACUTE\n            REMAP(0x00EA, 0xEA) // LATIN SMALL LETTER E WITH CIRCUMFLEX\n            REMAP(0x00EB, 0xEB) // LATIN SMALL LETTER E WITH DIAERESIS\n            REMAP(0x00EC, 0xEC) // LATIN SMALL LETTER I WITH GRAVE\n            REMAP(0x00ED, 0xED) // LATIN SMALL LETTER I WITH ACUTE\n            REMAP(0x00EE, 0xEE) // LATIN SMALL LETTER I WITH CIRCUMFLEX\n            REMAP(0x00EF, 0xEF) // LATIN SMALL LETTER I WITH DIAERESIS\n\n            REMAP(0x00F0, 0xF0) // LATIN SMALL LETTER ETH\n            REMAP(0x00F1, 0xF1) // LATIN SMALL LETTER N WITH TILDE\n            REMAP(0x00F2, 0xF2) // LATIN SMALL LETTER O WITH GRAVE\n            REMAP(0x00F3, 0xF3) // LATIN SMALL LETTER O WITH ACUTE\n            REMAP(0x00F4, 0xF4) // LATIN SMALL LETTER O WITH CIRCUMFLEX\n            REMAP(0x00F5, 0xF5) // LATIN SMALL LETTER O WITH TILDE\n            REMAP(0x00F6, 0xF6) // LATIN SMALL LETTER O WITH DIAERESIS\n            REMAP(0x00F7, 0xF7) // DIVISION SIGN\n            REMAP(0x00F8, 0xF8) // LATIN SMALL LETTER O WITH STROKE\n            REMAP(0x00F9, 0xF9) // LATIN SMALL LETTER U WITH GRAVE\n            REMAP(0x00FA, 0xFA) // LATIN SMALL LETTER U WITH ACUTE\n            REMAP(0x00FB, 0xFB) // LATIN SMALL LETTER U WITH CIRCUMFLEX\n            REMAP(0x00FC, 0xFC) // LATIN SMALL LETTER U WITH DIAERESIS\n            REMAP(0x00FD, 0xFD) // LATIN SMALL LETTER Y WITH ACUTE\n            REMAP(0x00FE, 0xFE) // LATIN SMALL LETTER THORN\n            REMAP(0x00FF, 0xFF) // LATIN SMALL LETTER Y WITH DIAERESIS\n        }\n    }\n\n    else if (encoding == WINDOWS_1253) {\n        // Greek\n        // 1-Byte chars: no remapping\n        if (utf8.length() == 1)\n            return utf8.at(0);\n\n        // Multi-byte chars:\n        switch (toUtf32(utf8)) {\n            // Windows-1253 special characters (0x80-0xBF range)\n            REMAP(0x20AC, 0x80) // EURO SIGN\n            REMAP(0x2018, 0x91) // LEFT SINGLE QUOTATION MARK\n            REMAP(0x2019, 0x92) // RIGHT SINGLE QUOTATION MARK\n            REMAP(0x201C, 0x93) // LEFT DOUBLE QUOTATION MARK\n            REMAP(0x201D, 0x94) // RIGHT DOUBLE QUOTATION MARK\n            REMAP(0x2022, 0x95) // BULLET\n            REMAP(0x2013, 0x96) // EN DASH\n            REMAP(0x2014, 0x97) // EM DASH\n\n            // Greek accented capitals\n            REMAP(0x0386, 0xA2) // GREEK CAPITAL LETTER ALPHA WITH TONOS\n            REMAP(0x0388, 0xB8) // GREEK CAPITAL LETTER EPSILON WITH TONOS\n            REMAP(0x0389, 0xB9) // GREEK CAPITAL LETTER ETA WITH TONOS\n            REMAP(0x038A, 0xBA) // GREEK CAPITAL LETTER IOTA WITH TONOS\n            REMAP(0x038C, 0xBC) // GREEK CAPITAL LETTER OMICRON WITH TONOS\n            REMAP(0x038E, 0xBE) // GREEK CAPITAL LETTER UPSILON WITH TONOS\n            REMAP(0x038F, 0xBF) // GREEK CAPITAL LETTER OMEGA WITH TONOS\n\n            // Greek capital letters (U+0391-U+03A9 -> 0xC1-0xD1, with gaps)\n            REMAP(0x0391, 0xC1) // GREEK CAPITAL LETTER ALPHA\n            REMAP(0x0392, 0xC2) // GREEK CAPITAL LETTER BETA\n            REMAP(0x0393, 0xC3) // GREEK CAPITAL LETTER GAMMA\n            REMAP(0x0394, 0xC4) // GREEK CAPITAL LETTER DELTA\n            REMAP(0x0395, 0xC5) // GREEK CAPITAL LETTER EPSILON\n            REMAP(0x0396, 0xC6) // GREEK CAPITAL LETTER ZETA\n            REMAP(0x0397, 0xC7) // GREEK CAPITAL LETTER ETA\n            REMAP(0x0398, 0xC8) // GREEK CAPITAL LETTER THETA\n            REMAP(0x0399, 0xC9) // GREEK CAPITAL LETTER IOTA\n            REMAP(0x039A, 0xCA) // GREEK CAPITAL LETTER KAPPA\n            REMAP(0x039B, 0xCB) // GREEK CAPITAL LETTER LAMDA\n            REMAP(0x039C, 0xCC) // GREEK CAPITAL LETTER MU\n            REMAP(0x039D, 0xCD) // GREEK CAPITAL LETTER NU\n            REMAP(0x039E, 0xCE) // GREEK CAPITAL LETTER XI\n            REMAP(0x039F, 0xCF) // GREEK CAPITAL LETTER OMICRON\n            REMAP(0x03A0, 0xD0) // GREEK CAPITAL LETTER PI\n            REMAP(0x03A1, 0xD1) // GREEK CAPITAL LETTER RHO\n            REMAP(0x03A3, 0xD3) // GREEK CAPITAL LETTER SIGMA\n            REMAP(0x03A4, 0xD4) // GREEK CAPITAL LETTER TAU\n            REMAP(0x03A5, 0xD5) // GREEK CAPITAL LETTER UPSILON\n            REMAP(0x03A6, 0xD6) // GREEK CAPITAL LETTER PHI\n            REMAP(0x03A7, 0xD7) // GREEK CAPITAL LETTER CHI\n            REMAP(0x03A8, 0xD8) // GREEK CAPITAL LETTER PSI\n            REMAP(0x03A9, 0xD9) // GREEK CAPITAL LETTER OMEGA\n\n            // Greek small letters with tonos (accented)\n            REMAP(0x03AC, 0xDC) // GREEK SMALL LETTER ALPHA WITH TONOS\n            REMAP(0x03AD, 0xDD) // GREEK SMALL LETTER EPSILON WITH TONOS\n            REMAP(0x03AE, 0xDE) // GREEK SMALL LETTER ETA WITH TONOS\n            REMAP(0x03AF, 0xDF) // GREEK SMALL LETTER IOTA WITH TONOS\n\n            // Greek small letters (U+03B1-U+03C9 -> 0xE1-0xF9)\n            REMAP(0x03B1, 0xE1) // GREEK SMALL LETTER ALPHA\n            REMAP(0x03B2, 0xE2) // GREEK SMALL LETTER BETA\n            REMAP(0x03B3, 0xE3) // GREEK SMALL LETTER GAMMA\n            REMAP(0x03B4, 0xE4) // GREEK SMALL LETTER DELTA\n            REMAP(0x03B5, 0xE5) // GREEK SMALL LETTER EPSILON\n            REMAP(0x03B6, 0xE6) // GREEK SMALL LETTER ZETA\n            REMAP(0x03B7, 0xE7) // GREEK SMALL LETTER ETA\n            REMAP(0x03B8, 0xE8) // GREEK SMALL LETTER THETA\n            REMAP(0x03B9, 0xE9) // GREEK SMALL LETTER IOTA\n            REMAP(0x03BA, 0xEA) // GREEK SMALL LETTER KAPPA\n            REMAP(0x03BB, 0xEB) // GREEK SMALL LETTER LAMDA\n            REMAP(0x03BC, 0xEC) // GREEK SMALL LETTER MU\n            REMAP(0x03BD, 0xED) // GREEK SMALL LETTER NU\n            REMAP(0x03BE, 0xEE) // GREEK SMALL LETTER XI\n            REMAP(0x03BF, 0xEF) // GREEK SMALL LETTER OMICRON\n            REMAP(0x03C0, 0xF0) // GREEK SMALL LETTER PI\n            REMAP(0x03C1, 0xF1) // GREEK SMALL LETTER RHO\n            REMAP(0x03C2, 0xF2) // GREEK SMALL LETTER FINAL SIGMA\n            REMAP(0x03C3, 0xF3) // GREEK SMALL LETTER SIGMA\n            REMAP(0x03C4, 0xF4) // GREEK SMALL LETTER TAU\n            REMAP(0x03C5, 0xF5) // GREEK SMALL LETTER UPSILON\n            REMAP(0x03C6, 0xF6) // GREEK SMALL LETTER PHI\n            REMAP(0x03C7, 0xF7) // GREEK SMALL LETTER CHI\n            REMAP(0x03C8, 0xF8) // GREEK SMALL LETTER PSI\n            REMAP(0x03C9, 0xF9) // GREEK SMALL LETTER OMEGA\n\n            // More accented small letters\n            REMAP(0x03CA, 0xFA) // GREEK SMALL LETTER IOTA WITH DIALYTIKA\n            REMAP(0x03CB, 0xFB) // GREEK SMALL LETTER UPSILON WITH DIALYTIKA\n            REMAP(0x03CC, 0xFC) // GREEK SMALL LETTER OMICRON WITH TONOS\n            REMAP(0x03CD, 0xFD) // GREEK SMALL LETTER UPSILON WITH TONOS\n            REMAP(0x03CE, 0xFE) // GREEK SMALL LETTER OMEGA WITH TONOS\n        }\n    }\n\n    else /*ASCII or Unhandled*/ {\n        if (utf8.length() == 1)\n            return utf8.at(0);\n    }\n\n    // All single-byte (ASCII) characters should have been handled by now\n    // Only unhandled multi-byte UTF8 characters should remain\n    assert(utf8.length() > 1);\n\n    // Parse emoji\n    // Strip emoji modifiers\n    switch (toUtf32(utf8)) {\n        REMAP(0x1F44D, 0x01) // 👍 Thumbs Up\n        REMAP(0x1F44E, 0x02) // 👎 Thumbs Down\n\n        REMAP(0x1F60A, 0x03) // 😊 Smiling Face with Smiling Eyes\n        REMAP(0x1F642, 0x03) // 🙂 Slightly Smiling Face\n        REMAP(0x1F601, 0x03) // 😁 Grinning Face with Smiling Eye\n\n        REMAP(0x1F602, 0x04) // 😂 Face with Tears of Joy\n        REMAP(0x1F923, 0x04) // 🤣 Rolling on the Floor Laughing\n        REMAP(0x1F606, 0x04) // 😆 Smiling with Open Mouth and Closed Eyes\n\n        REMAP(0x1F44B, 0x05) // 👋 Waving Hand\n\n        REMAP(0x02600, 0x06) // ☀ Sun\n        REMAP(0x1F31E, 0x06) // 🌞 Sun with Face\n\n        // 0x07 - Bell character (unused)\n        REMAP(0x1F327, 0x08) // 🌧️ Cloud with Rain\n\n        REMAP(0x02601, 0x09) // ☁️ Cloud\n        REMAP(0x1F32B, 0x09) // Fog\n\n        REMAP(0x1F9E1, 0x0B) // 🧡 Orange Heart\n        REMAP(0x02763, 0x0B) // ❣ Heart Exclamation\n        REMAP(0x02764, 0x0B) // ❤ Heart\n        REMAP(0x1F495, 0x0B) // 💕 Two Hearts\n        REMAP(0x1F496, 0x0B) // 💖 Sparkling Heart\n        REMAP(0x1F497, 0x0B) // 💗 Growing Heart\n        REMAP(0x1F498, 0x0B) // 💘 Heart with Arrow\n\n        REMAP(0x1F4A9, 0x0C) // 💩 Pile of Poo\n        // 0x0D - Carriage return (unused)\n        REMAP(0x1F514, 0x0E) // 🔔 Bell\n\n        REMAP(0x1F62D, 0x0F) // 😭 Loudly Crying Face\n        REMAP(0x1F622, 0x0F) // 😢 Crying Face\n\n        REMAP(0x1F64F, 0x10) // 🙏 Person with Folded Hands\n        REMAP(0x1F618, 0x11) // 😘 Face Throwing a Kiss\n        REMAP(0x1F389, 0x12) // 🎉 Party Popper\n\n        REMAP(0x1F600, 0x13) // 😀 Grinning Face\n        REMAP(0x1F603, 0x13) // 😃 Smiling Face with Open Mouth\n        REMAP(0x1F604, 0x13) // 😄 Smiling Face with Open Mouth and Smiling Eyes\n\n        REMAP(0x1F97A, 0x14) // 🥺 Face with Pleading Eyes\n        REMAP(0x1F605, 0x15) // 😅 Smiling with Sweat\n        REMAP(0x1F525, 0x16) // 🔥 Fire\n        REMAP(0x1F926, 0x17) // 🤦 Face Palm\n        REMAP(0x1F937, 0x18) // 🤷 Shrug\n        REMAP(0x1F644, 0x19) // 🙄 Face with Rolling Eyes\n        // 0x1A Substitution (unused)\n        REMAP(0x1F917, 0x1B) // 🤗 Hugging Face\n\n        REMAP(0x1F609, 0x1C) // 😉 Winking Face\n        REMAP(0x1F61C, 0x1C) // 😜 Face with Stuck-Out Tongue and Winking Eye\n        REMAP(0x1F60F, 0x1C) // 😏 Smirking Face\n\n        REMAP(0x1F914, 0x1D) // 🤔 Thinking Face\n        REMAP(0x1FAE1, 0x1E) // 🫡 Saluting Face\n        REMAP(0x1F44C, 0x1F) // 👌 OK Hand Sign\n\n        REMAP(0x02755, '!') // ❕\n        REMAP(0x02757, '!') // ❗\n        REMAP(0x0203C, '!') // ‼\n        REMAP(0x02753, '?') // ❓\n        REMAP(0x02754, '?') // ❔\n        REMAP(0x02049, '?') // ⁉\n\n        // Modifiers (deleted)\n        REMAP(0x02640, 0x7F) // Gender\n        REMAP(0x02642, 0x7F)\n        REMAP(0x1F3FB, 0x7F) // Skin Tones\n        REMAP(0x1F3FC, 0x7F)\n        REMAP(0x1F3FD, 0x7F)\n        REMAP(0x1F3FE, 0x7F)\n        REMAP(0x1F3FF, 0x7F)\n        REMAP(0x0FE00, 0x7F) // Variation Selectors\n        REMAP(0x0FE01, 0x7F)\n        REMAP(0x0FE02, 0x7F)\n        REMAP(0x0FE03, 0x7F)\n        REMAP(0x0FE04, 0x7F)\n        REMAP(0x0FE05, 0x7F)\n        REMAP(0x0FE06, 0x7F)\n        REMAP(0x0FE07, 0x7F)\n        REMAP(0x0FE08, 0x7F)\n        REMAP(0x0FE09, 0x7F)\n        REMAP(0x0FE0A, 0x7F)\n        REMAP(0x0FE0B, 0x7F)\n        REMAP(0x0FE0C, 0x7F)\n        REMAP(0x0FE0D, 0x7F)\n        REMAP(0x0FE0E, 0x7F)\n        REMAP(0x0FE0F, 0x7F)\n        REMAP(0x0200D, 0x7F) // Zero Width Joiner\n    }\n\n    // If not handled, return SUB\n    return '\\x1A';\n\n// Sweep up the syntactic sugar\n// Don't want ants in the house\n#undef REMAP\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/AppletFont.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\n    Wrapper class for an AdafruitGFX font\n    Pre-calculates some font dimension info which InkHUD uses repeatedly\n    Re-encodes UTF-8 characters to suit extended ASCII AdafruitGFX fonts\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include <GFX.h> // GFXRoot drawing lib\n\nnamespace NicheGraphics::InkHUD\n{\n\n// An AdafruitGFX font, bundled with precalculated dimensions which are used frequently by InkHUD\nclass AppletFont\n{\n  public:\n    enum Encoding {\n        ASCII,\n        WINDOWS_1250,\n        WINDOWS_1251,\n        WINDOWS_1252,\n        WINDOWS_1253,\n    };\n\n    AppletFont();\n    explicit AppletFont(const GFXfont &adafruitGFXFont, Encoding encoding = ASCII, int8_t paddingTop = 0,\n                        int8_t paddingBottom = 0);\n\n    uint8_t lineHeight();\n    uint8_t heightAboveCursor();\n    uint8_t heightBelowCursor();\n    uint8_t widthBetweenWords(); // Width of the space character\n\n    std::string decodeUTF8(const std::string &encoded);\n\n    const GFXfont *gfxFont = nullptr; // Default value: in-built AdafruitGFX font\n\n  private:\n    uint32_t toUtf32(const std::string &utf8);\n    char applyEncoding(const std::string &utf8);\n\n    uint8_t height = 8;          // Default value: in-built AdafruitGFX font\n    uint8_t ascenderHeight = 0;  // Default value: in-built AdafruitGFX font\n    uint8_t descenderHeight = 8; // Default value: in-built AdafruitGFX font\n    uint8_t spaceCharWidth = 8;  // Default value: in-built AdafruitGFX font\n\n    Encoding encoding = ASCII;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n// Macros for InkHUD's standard fonts\n// --------------------------------------\n\n// Use these once only, passing them to InkHUD::Applet::fontLarge and InkHUD::Applet:fontSmall\n// Line padding has been adjusted manually, to compensate for a few *extra tall* diacritics\n\n// Central European\n#include \"graphics/niche/Fonts/FreeSans12pt_Win1250.h\"\n#include \"graphics/niche/Fonts/FreeSans6pt_Win1250.h\"\n#include \"graphics/niche/Fonts/FreeSans9pt_Win1250.h\"\n#define FREESANS_12PT_WIN1250 InkHUD::AppletFont(FreeSans12pt_Win1250, InkHUD::AppletFont::WINDOWS_1250, -3, 1)\n#define FREESANS_9PT_WIN1250 InkHUD::AppletFont(FreeSans9pt_Win1250, InkHUD::AppletFont::WINDOWS_1250, -1, -1)\n#define FREESANS_6PT_WIN1250 InkHUD::AppletFont(FreeSans6pt_Win1250, InkHUD::AppletFont::WINDOWS_1250, -1, -2)\n\n// Cyrillic\n#include \"graphics/niche/Fonts/FreeSans12pt_Win1251.h\"\n#include \"graphics/niche/Fonts/FreeSans6pt_Win1251.h\"\n#include \"graphics/niche/Fonts/FreeSans9pt_Win1251.h\"\n#define FREESANS_12PT_WIN1251 InkHUD::AppletFont(FreeSans12pt_Win1251, InkHUD::AppletFont::WINDOWS_1251, -3, 1)\n#define FREESANS_9PT_WIN1251 InkHUD::AppletFont(FreeSans9pt_Win1251, InkHUD::AppletFont::WINDOWS_1251, -2, -1)\n#define FREESANS_6PT_WIN1251 InkHUD::AppletFont(FreeSans6pt_Win1251, InkHUD::AppletFont::WINDOWS_1251, -1, -2)\n\n// Western European\n#include \"graphics/niche/Fonts/FreeSans12pt_Win1252.h\"\n#include \"graphics/niche/Fonts/FreeSans6pt_Win1252.h\"\n#include \"graphics/niche/Fonts/FreeSans9pt_Win1252.h\"\n#define FREESANS_12PT_WIN1252 InkHUD::AppletFont(FreeSans12pt_Win1252, InkHUD::AppletFont::WINDOWS_1252, -3, 1)\n#define FREESANS_9PT_WIN1252 InkHUD::AppletFont(FreeSans9pt_Win1252, InkHUD::AppletFont::WINDOWS_1252, -2, -1)\n#define FREESANS_6PT_WIN1252 InkHUD::AppletFont(FreeSans6pt_Win1252, InkHUD::AppletFont::WINDOWS_1252, -1, -2)\n\n// Greek\n#include \"graphics/niche/Fonts/FreeSans12pt_Win1253.h\"\n#include \"graphics/niche/Fonts/FreeSans6pt_Win1253.h\"\n#include \"graphics/niche/Fonts/FreeSans9pt_Win1253.h\"\n#define FREESANS_12PT_WIN1253 InkHUD::AppletFont(FreeSans12pt_Win1253, InkHUD::AppletFont::WINDOWS_1253, -3, 1)\n#define FREESANS_9PT_WIN1253 InkHUD::AppletFont(FreeSans9pt_Win1253, InkHUD::AppletFont::WINDOWS_1253, -2, -1)\n#define FREESANS_6PT_WIN1253 InkHUD::AppletFont(FreeSans6pt_Win1253, InkHUD::AppletFont::WINDOWS_1253, -1, -2)\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./MapApplet.h\"\n\nusing namespace NicheGraphics;\n\nvoid InkHUD::MapApplet::onRender(bool full)\n{\n    // Abort if no markers to render\n    if (!enoughMarkers()) {\n        printAt(X(0.5), Y(0.5) - (getFont().lineHeight() / 2), \"Node positions\", CENTER, MIDDLE);\n        printAt(X(0.5), Y(0.5) + (getFont().lineHeight() / 2), \"will appear here\", CENTER, MIDDLE);\n        return;\n    }\n\n    // Helper: draw rounded rectangle centered at x,y\n    auto fillRoundedRect = [&](int16_t cx, int16_t cy, int16_t w, int16_t h, int16_t r, uint16_t color) {\n        int16_t x = cx - (w / 2);\n        int16_t y = cy - (h / 2);\n\n        // center rects\n        fillRect(x + r, y, w - 2 * r, h, color);\n        fillRect(x, y + r, r, h - 2 * r, color);\n        fillRect(x + w - r, y + r, r, h - 2 * r, color);\n\n        // corners\n        fillCircle(x + r, y + r, r, color);\n        fillCircle(x + w - r - 1, y + r, r, color);\n        fillCircle(x + r, y + h - r - 1, r, color);\n        fillCircle(x + w - r - 1, y + h - r - 1, r, color);\n    };\n\n    // Find center of map\n    getMapCenter(&latCenter, &lngCenter);\n    calculateAllMarkers();\n    getMapSize(&widthMeters, &heightMeters);\n    calculateMapScale();\n\n    // Draw all markers first\n    for (Marker m : markers) {\n        int16_t x = X(0.5) + (m.eastMeters * metersToPx);\n        int16_t y = Y(0.5) - (m.northMeters * metersToPx);\n\n        // Add white halo outline first\n        constexpr int outlinePad = 1;\n        int boxSize = 11;\n        int radius = 2; // rounded corner radius\n\n        // White halo background\n        fillRoundedRect(x, y, boxSize + (outlinePad * 2), boxSize + (outlinePad * 2), radius + 1, WHITE);\n\n        // Draw inner box\n        fillRoundedRect(x, y, boxSize, boxSize, radius, BLACK);\n\n        // Text inside\n        setFont(fontSmall);\n        setTextColor(WHITE);\n\n        // Draw actual marker on top\n        if (m.hasHopsAway && m.hopsAway > config.lora.hop_limit) {\n            printAt(x + 1, y + 1, \"X\", CENTER, MIDDLE);\n        } else if (!m.hasHopsAway) {\n            printAt(x + 1, y + 1, \"?\", CENTER, MIDDLE);\n        } else {\n            char hopStr[4];\n            snprintf(hopStr, sizeof(hopStr), \"%d\", m.hopsAway);\n            printAt(x, y + 1, hopStr, CENTER, MIDDLE);\n        }\n\n        // Restore default font and color\n        setFont(fontSmall);\n        setTextColor(BLACK);\n    }\n\n    // Dual map scale bars\n    int16_t horizPx = width() * 0.25f;\n    int16_t vertPx = height() * 0.25f;\n    float horizMeters = horizPx / metersToPx;\n    float vertMeters = vertPx / metersToPx;\n\n    auto formatDistance = [&](float meters, char *out, size_t len) {\n        if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) {\n            float feet = meters * 3.28084f;\n            if (feet < 528)\n                snprintf(out, len, \"%.0f ft\", feet);\n            else {\n                float miles = feet / 5280.0f;\n                snprintf(out, len, miles < 10 ? \"%.1f mi\" : \"%.0f mi\", miles);\n            }\n        } else {\n            if (meters >= 1000)\n                snprintf(out, len, \"%.1f km\", meters / 1000.0f);\n            else\n                snprintf(out, len, \"%.0f m\", meters);\n        }\n    };\n\n    // Horizontal scale bar\n    int16_t horizBarY = height() - 2;\n    int16_t horizBarX = 1;\n    drawLine(horizBarX, horizBarY, horizBarX + horizPx, horizBarY, BLACK);\n    drawLine(horizBarX, horizBarY - 3, horizBarX, horizBarY + 3, BLACK);\n    drawLine(horizBarX + horizPx, horizBarY - 3, horizBarX + horizPx, horizBarY + 3, BLACK);\n\n    char horizLabel[32];\n    formatDistance(horizMeters, horizLabel, sizeof(horizLabel));\n    int16_t horizLabelW = getTextWidth(horizLabel);\n    int16_t horizLabelH = getFont().lineHeight();\n    int16_t horizLabelX = horizBarX + horizPx + 4;\n    int16_t horizLabelY = horizBarY - horizLabelH + 1;\n    fillRect(horizLabelX - 2, horizLabelY - 1, horizLabelW + 4, horizLabelH + 2, WHITE);\n    printAt(horizLabelX, horizBarY, horizLabel, LEFT, BOTTOM);\n\n    // Vertical scale bar\n    int16_t vertBarX = 1;\n    int16_t vertBarBottom = horizBarY;\n    int16_t vertBarTop = vertBarBottom - vertPx;\n    drawLine(vertBarX, vertBarBottom, vertBarX, vertBarTop, BLACK);\n    drawLine(vertBarX - 3, vertBarBottom, vertBarX + 3, vertBarBottom, BLACK);\n    drawLine(vertBarX - 3, vertBarTop, vertBarX + 3, vertBarTop, BLACK);\n\n    char vertTopLabel[32];\n    formatDistance(vertMeters, vertTopLabel, sizeof(vertTopLabel));\n    int16_t topLabelY = vertBarTop - getFont().lineHeight() - 2;\n    int16_t topLabelW = getTextWidth(vertTopLabel);\n    int16_t topLabelH = getFont().lineHeight();\n    fillRect(vertBarX - 2, topLabelY - 1, topLabelW + 6, topLabelH + 2, WHITE);\n    printAt(vertBarX + (topLabelW / 2) + 1, topLabelY + (topLabelH / 2), vertTopLabel, CENTER, MIDDLE);\n\n    char vertBottomLabel[32];\n    formatDistance(vertMeters, vertBottomLabel, sizeof(vertBottomLabel));\n    int16_t bottomLabelY = vertBarBottom + 4;\n    int16_t bottomLabelW = getTextWidth(vertBottomLabel);\n    int16_t bottomLabelH = getFont().lineHeight();\n    fillRect(vertBarX - 2, bottomLabelY - 1, bottomLabelW + 6, bottomLabelH + 2, WHITE);\n    printAt(vertBarX + (bottomLabelW / 2) + 1, bottomLabelY + (bottomLabelH / 2), vertBottomLabel, CENTER, MIDDLE);\n\n    // Draw our node LAST with full white fill + outline\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    if (ourNode && nodeDB->hasValidPosition(ourNode)) {\n        Marker self = calculateMarker(ourNode->position.latitude_i * 1e-7, ourNode->position.longitude_i * 1e-7, false, 0);\n\n        int16_t centerX = X(0.5) + (self.eastMeters * metersToPx);\n        int16_t centerY = Y(0.5) - (self.northMeters * metersToPx);\n\n        // White fill background + halo\n        fillCircle(centerX, centerY, 8, WHITE); // big white base\n        drawCircle(centerX, centerY, 8, WHITE); // crisp edge\n\n        // Black bullseye on top\n        drawCircle(centerX, centerY, 6, BLACK);\n        fillCircle(centerX, centerY, 2, BLACK);\n\n        // Crosshairs\n        drawLine(centerX - 8, centerY, centerX + 8, centerY, BLACK);\n        drawLine(centerX, centerY - 8, centerX, centerY + 8, BLACK);\n    }\n}\n\n// Find the center point, in the middle of all node positions\n// Calculated values are written to the *lat and *long pointer args\n// - Finds the \"mean lat long\"\n// - Calculates furthest nodes from \"mean lat long\"\n// - Place map center directly between these furthest nodes\n\nvoid InkHUD::MapApplet::getMapCenter(float *lat, float *lng)\n{\n    // If we have a valid position for our own node, use that as the anchor\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    if (ourNode && nodeDB->hasValidPosition(ourNode)) {\n        *lat = ourNode->position.latitude_i * 1e-7;\n        *lng = ourNode->position.longitude_i * 1e-7;\n    } else {\n        // Find mean lat long coords\n        // ============================\n        // - assigning X, Y and Z values to position on Earth's surface in 3D space, relative to center of planet\n        // - averages the x, y and z coords\n        // - uses tan to find angles for lat / long degrees\n        //   - longitude: triangle formed by x and y (on plane of the equator)\n        //   - latitude: triangle formed by z (north south),\n        //     and the line along plane of equator which stretches from earth's axis to where point xyz intersects planet's\n        //     surface\n\n        // Working totals, averaged after nodeDB processed\n        uint32_t positionCount = 0;\n        float xAvg = 0;\n        float yAvg = 0;\n        float zAvg = 0;\n\n        // For each node in db\n        for (uint32_t i = 0; i < nodeDB->getNumMeshNodes(); i++) {\n            meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n\n            // Skip if no position\n            if (!nodeDB->hasValidPosition(node))\n                continue;\n\n            // Skip if derived applet doesn't want to show this node on the map\n            if (!shouldDrawNode(node))\n                continue;\n\n            // Latitude and Longitude of node, in radians\n            float latRad = node->position.latitude_i * (1e-7) * DEG_TO_RAD;\n            float lngRad = node->position.longitude_i * (1e-7) * DEG_TO_RAD;\n\n            // Convert to cartesian points, with center of earth at 0, 0, 0\n            // Exact distance from center is irrelevant, as we're only interested in the vector\n            float x = cos(latRad) * cos(lngRad);\n            float y = cos(latRad) * sin(lngRad);\n            float z = sin(latRad);\n\n            // To find mean values shortly\n            xAvg += x;\n            yAvg += y;\n            zAvg += z;\n            positionCount++;\n        }\n\n        // All NodeDB processed, find mean values\n        xAvg /= positionCount;\n        yAvg /= positionCount;\n        zAvg /= positionCount;\n\n        // Longitude from cartesian coords\n        // (Angle from 3D coords describing a point of globe's surface)\n        /*\n                          UK\n                       /-------\\\n        (Top View)   /-         -\\\n                   /-      (You)  -\\\n                 /-           .     -\\\n               /-             . X     -\\\n         Asia -             ...         - USA\n               \\-           Y         -/\n                 \\-                 -/\n                   \\-             -/\n                     \\-         -/\n                       \\- -----/\n                       Pacific\n\n        */\n\n        *lng = atan2(yAvg, xAvg) * RAD_TO_DEG;\n\n        // Latitude from cartesian coords\n        // (Angle from 3D coords describing a point on the globe's surface)\n        // As latitude increases, distance from the Earth's north-south axis out to our surface point decreases.\n        // Means we need to first find the hypotenuse which becomes base of our triangle in the second step\n        /*\n                           UK                                         North\n                        /-------\\                 (Front View)      /-------\\\n         (Top View)   /-         -\\                               /-         -\\\n                    /-       (You) -\\                           /-(You)        -\\\n                  /-         /.      -\\                       /-   .             -\\\n                /-    √X²+Y²/ . X      -\\                   /-   Z .               -\\\n        Asia   -           /...          - USA             -       .....             -\n                \\-           Y         -/                   \\-     √X²+Y²          -/\n                  \\-                 -/                       \\-                 -/\n                    \\-             -/                           \\-             -/\n                      \\-         -/                               \\-         -/\n                        \\- -----/                                   \\- -----/\n                         Pacific                                      South\n        */\n\n        float hypotenuse = sqrt((xAvg * xAvg) + (yAvg * yAvg)); // Distance from globe's north-south axis to surface intersect\n        *lat = atan2(zAvg, hypotenuse) * RAD_TO_DEG;\n    }\n\n    // Use either our node position, or the mean fallback as the center\n    latCenter = *lat;\n    lngCenter = *lng;\n\n    // ----------------------------------------------\n    // This has given us either:\n    // - our actual position (preferred), or\n    // - a mean position (fallback if we had no fix)\n    //\n    // What we actually want is to place our center so that our outermost nodes\n    // end up on the border of our map. The only real use of our \"center\" is to give\n    // us a reference frame: which direction is east, and which is west.\n    //------------------------------------------------\n\n    // Find furthest nodes from our center\n    // ========================================\n    float northernmost = latCenter;\n    float southernmost = latCenter;\n    float easternmost = lngCenter;\n    float westernmost = lngCenter;\n\n    for (size_t i = 0; i < nodeDB->getNumMeshNodes(); i++) {\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n\n        // Skip if no position\n        if (!nodeDB->hasValidPosition(node))\n            continue;\n\n        // Skip if derived applet doesn't want to show this node on the map\n        if (!shouldDrawNode(node))\n            continue;\n\n        // Check for a new top or bottom latitude\n        float latNode = node->position.latitude_i * 1e-7;\n        northernmost = max(northernmost, latNode);\n        southernmost = min(southernmost, latNode);\n\n        // Longitude is trickier\n        float lngNode = node->position.longitude_i * 1e-7;\n        float degEastward = fmod(((lngNode - lngCenter) + 360), 360);      // Degrees traveled east from lngCenter to reach node\n        float degWestward = abs(fmod(((lngNode - lngCenter) - 360), 360)); // Degrees traveled west from lngCenter to reach node\n        if (degEastward < degWestward)\n            easternmost = max(easternmost, lngCenter + degEastward);\n        else\n            westernmost = min(westernmost, lngCenter - degWestward);\n    }\n\n    // Todo: check for issues with map spans >180 deg. MQTT only..\n    latCenter = (northernmost + southernmost) / 2;\n    lngCenter = (westernmost + easternmost) / 2;\n\n    // In case our new center is west of -180, or east of +180, for some reason\n    lngCenter = fmod(lngCenter, 180);\n}\n\n// Size of map in meters\n// Grown to fit the nodes furthest from map center\n// Overridable if derived applet wants a custom map size (fixed size?)\nvoid InkHUD::MapApplet::getMapSize(uint32_t *widthMeters, uint32_t *heightMeters)\n{\n    // Reset the value\n    *widthMeters = 0;\n    *heightMeters = 0;\n\n    // Find the greatest distance horizontally and vertically from map center\n    for (Marker m : markers) {\n        *widthMeters = max(*widthMeters, (uint32_t)abs(m.eastMeters) * 2);\n        *heightMeters = max(*heightMeters, (uint32_t)abs(m.northMeters) * 2);\n    }\n\n    // Add padding\n    *widthMeters *= 1.1;\n    *heightMeters *= 1.1;\n}\n\n// Convert and store info we need for drawing a marker\n// Lat / long to \"meters relative to map center\", for position on screen\n// Info about hopsAway, for marker size\nInkHUD::MapApplet::Marker InkHUD::MapApplet::calculateMarker(float lat, float lng, bool hasHopsAway, uint8_t hopsAway)\n{\n    assert(lat != 0 || lng != 0); // Not null island. Applets should check this before calling.\n\n    // Bearing and distance from map center to node\n    float distanceFromCenter = GeoCoord::latLongToMeter(latCenter, lngCenter, lat, lng);\n    float bearingFromCenter = GeoCoord::bearing(latCenter, lngCenter, lat, lng); // in radians\n\n    // Split into meters north and meters east components (signed)\n    // - signedness of cos / sin automatically sets negative if south or west\n    float northMeters = cos(bearingFromCenter) * distanceFromCenter;\n    float eastMeters = sin(bearingFromCenter) * distanceFromCenter;\n\n    // Store this as a new marker\n    Marker m;\n    m.eastMeters = eastMeters;\n    m.northMeters = northMeters;\n    m.hasHopsAway = hasHopsAway;\n    m.hopsAway = hopsAway;\n    return m;\n}\n// Draw a marker on the map for a node, with a shortname label, and backing box\nvoid InkHUD::MapApplet::drawLabeledMarker(meshtastic_NodeInfoLite *node)\n{\n    // Find x and y position based on node's position in nodeDB\n    assert(nodeDB->hasValidPosition(node));\n    Marker m = calculateMarker(node->position.latitude_i * 1e-7,  // Lat, converted from Meshtastic's internal int32 style\n                               node->position.longitude_i * 1e-7, // Long, converted from Meshtastic's internal int32 style\n                               node->has_hops_away,               // Is the hopsAway number valid\n                               node->hops_away                    // Hops away\n    );\n\n    // Convert to pixel coords\n    int16_t markerX = X(0.5) + (m.eastMeters * metersToPx);\n    int16_t markerY = Y(0.5) - (m.northMeters * metersToPx);\n\n    constexpr uint16_t paddingH = 2;\n    constexpr uint16_t paddingW = 4;\n    uint16_t paddingInnerW = 2;            // Zero'd out if no text\n    constexpr uint16_t markerSizeMax = 12; // Size of cross (if marker uses a cross)\n    constexpr uint16_t markerSizeMin = 5;\n\n    int16_t textX;\n    int16_t textY;\n    uint16_t textW;\n    uint16_t textH;\n    int16_t labelX;\n    int16_t labelY;\n    uint16_t labelW;\n    uint16_t labelH;\n    uint8_t markerSize;\n\n    bool tooManyHops = node->hops_away > config.lora.hop_limit;\n    bool isOurNode = node->num == nodeDB->getNodeNum();\n    bool unknownHops = !node->has_hops_away && !isOurNode;\n\n    // Parse any non-ascii chars in the short name,\n    // and use last 4 instead if unknown / can't render\n    std::string shortName = parseShortName(node);\n\n    // We will draw a left or right hand variant, to place text towards screen center\n    // Hopefully avoid text spilling off screen\n    // Most values are the same, regardless of left-right handedness\n\n    // Pick emblem style\n    if (tooManyHops)\n        markerSize = getTextWidth(\"!\");\n    else if (unknownHops)\n        markerSize = markerSizeMin;\n    else\n        markerSize = map(node->hops_away, 0, config.lora.hop_limit, markerSizeMax, markerSizeMin);\n\n    // Common dimensions (left or right variant)\n    textW = getTextWidth(shortName);\n    if (textW == 0)\n        paddingInnerW = 0; // If no text, no padding for text\n    textH = fontSmall.lineHeight();\n    labelH = paddingH + max((int16_t)(textH), (int16_t)markerSize) + paddingH;\n    labelY = markerY - (labelH / 2);\n    textY = markerY;\n    labelW = paddingW + markerSize + paddingInnerW + textW + paddingW; // Width is same whether right or left hand variant\n\n    // Left-side variant\n    if (markerX < width() / 2) {\n        labelX = markerX - (markerSize / 2) - paddingW;\n        textX = labelX + paddingW + markerSize + paddingInnerW;\n    }\n\n    // Right-side variant\n    else {\n        labelX = markerX - (markerSize / 2) - paddingInnerW - textW - paddingW;\n        textX = labelX + paddingW;\n    }\n\n    // Prevent overlap with scale bars and their labels\n    // Define a \"safe zone\" in the bottom-left where the scale bars and text are drawn\n    constexpr int16_t safeZoneHeight = 28; // adjust based on your label font height\n    constexpr int16_t safeZoneWidth = 60;  // adjust based on horizontal label width zone\n    bool overlapsScale = (labelY + labelH > height() - safeZoneHeight) && (labelX < safeZoneWidth);\n\n    // If it overlaps, shift label upward slightly above the safe zone\n    if (overlapsScale) {\n        labelY = height() - safeZoneHeight - labelH - 2;\n        textY = labelY + (labelH / 2);\n    }\n\n    // Backing box\n    fillRect(labelX, labelY, labelW, labelH, WHITE);\n    drawRect(labelX, labelY, labelW, labelH, BLACK);\n\n    // Short name\n    printAt(textX, textY, shortName, LEFT, MIDDLE);\n\n    // If the label is for our own node,\n    // fade it by overdrawing partially with white\n    if (node == nodeDB->getMeshNode(nodeDB->getNodeNum()))\n        hatchRegion(labelX, labelY, labelW, labelH, 2, WHITE);\n\n    // Draw the marker emblem\n    // - after the fading, because hatching (own node) can align with cross and make it look weird\n    if (tooManyHops)\n        printAt(markerX, markerY, \"!\", CENTER, MIDDLE);\n    else\n        drawCross(markerX, markerY, markerSize); // The fewer the hops, the larger the marker. Also handles unknownHops\n}\n\n// Check if we actually have enough nodes which would be shown on the map\n// Need at least two, to draw a sensible map\nbool InkHUD::MapApplet::enoughMarkers()\n{\n    size_t count = 0;\n    for (size_t i = 0; i < nodeDB->getNumMeshNodes(); i++) {\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n\n        // Count nodes\n        if (nodeDB->hasValidPosition(node) && shouldDrawNode(node))\n            count++;\n\n        // We need to find two\n        if (count == 2)\n            return true; // Two nodes is enough for a sensible map\n    }\n\n    return false; // No nodes would be drawn (or just the one, uselessly at 0,0)\n}\n\n// Calculate how far north and east of map center each node is\n// Derived applets can control which nodes to calculate (and later, draw) by overriding MapApplet::shouldDrawNode\nvoid InkHUD::MapApplet::calculateAllMarkers()\n{\n    // Clear old markers\n    markers.clear();\n\n    // For each node in db\n    for (uint32_t i = 0; i < nodeDB->getNumMeshNodes(); i++) {\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n\n        // Skip if no position\n        if (!nodeDB->hasValidPosition(node))\n            continue;\n\n        // Skip if derived applet doesn't want to show this node on the map\n        if (!shouldDrawNode(node))\n            continue;\n\n        // Skip if our own node\n        // - special handling in render()\n        if (node->num == nodeDB->getNodeNum())\n            continue;\n\n        // Calculate marker and store it\n        markers.push_back(\n            calculateMarker(node->position.latitude_i * 1e-7,  // Lat, converted from Meshtastic's internal int32 style\n                            node->position.longitude_i * 1e-7, // Long, converted from Meshtastic's internal int32 style\n                            node->has_hops_away,               // Is the hopsAway number valid\n                            node->hops_away                    // Hops away\n                            ));\n    }\n}\n\n// Determine the conversion factor between metres, and pixels on screen\n// May be overridden by derived applet, if custom scale required (fixed map size?)\nvoid InkHUD::MapApplet::calculateMapScale()\n{\n    // Aspect ratio of map and screen\n    // - larger = wide, smaller = tall\n    // - used to set scale, so that widest map dimension fits in applet\n    float mapAspectRatio = (float)widthMeters / heightMeters;\n    float appletAspectRatio = (float)width() / height();\n\n    // \"Shrink to fit\"\n    // Scale the map so that the largest dimension is fully displayed\n    // Because aspect ratio will be maintained, the other dimension will appear \"padded\"\n    if (mapAspectRatio > appletAspectRatio)\n        metersToPx = (float)width() / widthMeters; // Too wide for applet. Constrain to fit width.\n    else\n        metersToPx = (float)height() / heightMeters; // Too tall for applet. Constrain to fit height.\n}\n\n// Draw an x, centered on a specific point\n// Most markers will draw with this method\nvoid InkHUD::MapApplet::drawCross(int16_t x, int16_t y, uint8_t size)\n{\n    int16_t x0 = x - (size / 2);\n    int16_t y0 = y - (size / 2);\n    int16_t x1 = x0 + size - 1;\n    int16_t y1 = y0 + size - 1;\n    drawLine(x0, y0, x1, y1, BLACK);\n    drawLine(x0, y1, x1, y0, BLACK);\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nBase class for Applets which show nodes on a map\n\nPlots position of for a selection of nodes, with north facing up.\nSize of cross represents hops away.\nOur own node is identified with a faded label.\n\nThe base applet doesn't handle any events; this is left to the derived applets.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n\n#include \"MeshModule.h\"\n#include \"gps/GeoCoord.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass MapApplet : public Applet\n{\n  public:\n    void onRender(bool full) override;\n\n  protected:\n    virtual bool shouldDrawNode(meshtastic_NodeInfoLite *node) { return true; } // Allow derived applets to filter the nodes\n    virtual void getMapCenter(float *lat, float *lng);\n    virtual void getMapSize(uint32_t *widthMeters, uint32_t *heightMeters);\n\n    bool enoughMarkers();                                  // Anything to draw?\n    void drawLabeledMarker(meshtastic_NodeInfoLite *node); // Highlight a specific marker\n\n  private:\n    // Position and size of a marker to be drawn\n    struct Marker {\n        float eastMeters = 0;  // Meters east of map center. Negative if west.\n        float northMeters = 0; // Meters north of map center. Negative if south.\n        bool hasHopsAway = false;\n        uint8_t hopsAway = 0; // Determines marker size\n    };\n\n    Marker calculateMarker(float lat, float lng, bool hasHopsAway, uint8_t hopsAway);\n    void calculateAllMarkers();\n    void calculateMapScale();                           // Conversion factor for meters to pixels\n    void drawCross(int16_t x, int16_t y, uint8_t size); // Draw the X used for most markers\n\n    float metersToPx = 0; // Conversion factor for meters to pixels\n    float latCenter = 0;  // Map center: latitude\n    float lngCenter = 0;  // Map center: longitude\n\n    std::list<Marker> markers;\n    uint32_t widthMeters = 0;  // Map width: meters\n    uint32_t heightMeters = 0; // Map height: meters\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Bases/NodeList/NodeListApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"RTC.h\"\n\n#include \"GeoCoord.h\"\n#include \"NodeDB.h\"\n\n#include \"./NodeListApplet.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::NodeListApplet::NodeListApplet(const char *name) : MeshModule(name)\n{\n    // We only need to be promiscuous in order to hear NodeInfo, apparently. See NodeInfoModule\n    // For all other packets, we manually act as if isPromiscuous=false, in wantPacket\n    MeshModule::isPromiscuous = true;\n}\n\n// Do we want to process this packet with handleReceived()?\nbool InkHUD::NodeListApplet::wantPacket(const meshtastic_MeshPacket *p)\n{\n    // Only interested if:\n    return isActive()                                                  // Applet is active\n           && !isFromUs(p)                                             // Packet is incoming (not outgoing)\n           && (isToUs(p) || isBroadcast(p->to) ||                      // Either: intended for us,\n               p->decoded.portnum == meshtastic_PortNum_NODEINFO_APP); // or nodeinfo\n\n    // To match the behavior seen in the client apps:\n    // - NodeInfoModule's ProtoBufModule base is \"promiscuous\"\n    // - All other activity is *not* promiscuous\n\n    // To achieve this, our MeshModule *is* promiscuous, and we're manually reimplementing non-promiscuous behavior here,\n    // to match the code in MeshModule::callModules\n}\n\n// MeshModule packets arrive here\n// Extract the info and pass it to the derived applet\n// Derived applet will store the CardInfo, and perform any required sorting of the CardInfo collection\n// Derived applet might also need to keep other tallies (active nodes count?)\nProcessMessage InkHUD::NodeListApplet::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    // Abort if applet fully deactivated\n    // Already handled by wantPacket in this case, but good practice for all applets, as some *do* require this early return\n    if (!isActive())\n        return ProcessMessage::CONTINUE;\n\n    // Assemble info: from this event\n    CardInfo c;\n    c.nodeNum = mp.from;\n    c.signal = getSignalStrength(mp.rx_snr, mp.rx_rssi);\n\n    // Assemble info: from nodeDB (needed to detect changes)\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(c.nodeNum);\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    if (node) {\n        if (node->has_hops_away)\n            c.hopsAway = node->hops_away;\n\n        if (nodeDB->hasValidPosition(node) && nodeDB->hasValidPosition(ourNode)) {\n            // Get lat and long as float\n            // Meshtastic stores these as integers internally\n            float ourLat = ourNode->position.latitude_i * 1e-7;\n            float ourLong = ourNode->position.longitude_i * 1e-7;\n            float theirLat = node->position.latitude_i * 1e-7;\n            float theirLong = node->position.longitude_i * 1e-7;\n\n            c.distanceMeters = (int32_t)GeoCoord::latLongToMeter(theirLat, theirLong, ourLat, ourLong);\n        }\n    }\n\n    // Pass to the derived applet\n    // Derived applet is responsible for requesting update, if justified\n    // That request will eventually trigger our class' onRender method\n    handleParsed(c);\n\n    return ProcessMessage::CONTINUE; // Let others look at this message also if they want\n}\n\n// Calculate maximum number of cards we may ever need to render, in our tallest layout config\n// Number might be slightly in excess of the true value: applet header text not accounted for\nuint8_t InkHUD::NodeListApplet::maxCards()\n{\n    // Cache result. Shouldn't change during execution\n    static uint8_t maxCardCount = 0;\n\n    if (!maxCardCount) {\n        const uint16_t height = Tile::maxDisplayDimension();\n\n        // Use a loop instead of arithmetic, because it's easier for my brain to follow\n        // Add cards one by one, until the latest card extends below screen\n\n        uint16_t y = cardH; // First card: no margin above\n        maxCardCount = 1;\n\n        while (y < height) {\n            y += cardMarginH;\n            y += cardH;\n            maxCardCount++;\n        }\n    }\n\n    return maxCardCount;\n}\n\n// Draw, using info which derived applet placed into NodeListApplet::cards for us\nvoid InkHUD::NodeListApplet::onRender(bool full)\n{\n\n    // ================================\n    // Draw the standard applet header\n    // ================================\n\n    drawHeader(getHeaderText()); // Ask derived applet for the title\n\n    // Dimensions of the header\n    int16_t headerDivY = getHeaderHeight() - 1;\n    constexpr uint16_t padDivH = 2;\n\n    // ========================\n    // Draw the main node list\n    // ========================\n\n    // Leave a small gutter between long-name text and right-side card content\n    constexpr uint8_t rightContentGap = 2;\n\n    // Truncate with trailing \"...\", sized using the current font.\n    auto ellipsizeToWidth = [this](std::string text, uint16_t maxWidth) {\n        constexpr const char *ellipsis = \"...\";\n        const uint16_t ellipsisW = getTextWidth(ellipsis);\n        uint16_t textW = getTextWidth(text);\n        if (maxWidth == 0)\n            return std::string();\n        if (textW <= maxWidth)\n            return text;\n        if (ellipsisW > maxWidth)\n            return std::string();\n        while (!text.empty() && (textW + ellipsisW > maxWidth)) {\n            text.pop_back();\n            textW = getTextWidth(text);\n        }\n        return text + ellipsis;\n    };\n\n    // Y value (top) of the current card. Increases as we draw.\n    uint16_t cardTopY = headerDivY + padDivH;\n\n    // Clean up deleted nodes before drawing\n    cards.erase(\n        std::remove_if(cards.begin(), cards.end(), [](const CardInfo &c) { return nodeDB->getMeshNode(c.nodeNum) == nullptr; }),\n        cards.end());\n\n    // -- Each node in list --\n    for (auto card = cards.begin(); card != cards.end(); ++card) {\n\n        // Gather info\n        // ========================================\n        const NodeNum &nodeNum = card->nodeNum;\n        SignalStrength &signal = card->signal;\n        std::string longName;  // handled below\n        std::string shortName; // handled below\n        std::string distance;  // handled below\n        const uint8_t &hopsAway = card->hopsAway;\n\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeNum);\n\n        // Skip deleted nodes\n        if (!node) {\n            continue;\n        }\n\n        // -- Shortname --\n        // Parse special chars in the short name\n        // Use \"?\" if unknown\n        if (node)\n            shortName = parseShortName(node);\n        else\n            shortName = \"?\";\n\n        // -- Longname --\n        // Parse special chars in long name\n        // Use node id if unknown\n        if (node && node->has_user)\n            longName = parse(node->user.long_name); // Found in nodeDB\n        else {\n            // Not found in nodeDB, show a hex nodeid instead\n            longName = hexifyNodeNum(nodeNum);\n        }\n\n        // -- Distance --\n        if (card->distanceMeters != CardInfo::DISTANCE_UNKNOWN)\n            distance = localizeDistance(card->distanceMeters);\n\n        // Draw the info\n        // ====================================\n\n        // Define two lines of text for the card\n        // We will center our text on these lines\n        uint16_t lineAY = cardTopY + (fontMedium.lineHeight() / 2);\n        uint16_t lineBY = cardTopY + fontMedium.lineHeight() + (fontSmall.lineHeight() / 2);\n\n        // Print the short name\n        setFont(fontMedium);\n        printAt(0, lineAY, shortName, LEFT, MIDDLE);\n\n        // Right-side labels and long name are rendered in small font.\n        setFont(fontSmall);\n        uint16_t rightContentW = 0;\n\n        // Bottom row right: distance.\n        if (!distance.empty()) {\n            rightContentW = std::max(rightContentW, getTextWidth(distance));\n            printAt(width() - 1, lineBY, distance, RIGHT, MIDDLE);\n        }\n\n        // Top row right: direct-link signal only.\n        if (hopsAway == 0 && signal != SIGNAL_UNKNOWN) {\n            uint16_t signalW = getTextWidth(\"Xkm\"); // Indicator width tuned to a short right-side label\n            uint16_t signalH = fontMedium.lineHeight() * 0.75;\n            int16_t signalY = lineAY + (fontMedium.lineHeight() / 2) - (fontMedium.lineHeight() * 0.75);\n            int16_t signalX = width() - signalW;\n            rightContentW = std::max(rightContentW, signalW);\n            drawSignalIndicator(signalX, signalY, signalW, signalH, signal);\n        } else if (hopsAway != CardInfo::HOPS_UNKNOWN) {\n            std::string hopString = to_string(hopsAway) + (hopsAway == 1 ? \" Hop\" : \" Hops\");\n            rightContentW = std::max(rightContentW, getTextWidth(hopString));\n            printAt(width() - 1, lineAY, hopString, RIGHT, MIDDLE);\n        }\n\n        // Give long names as much room as possible while still avoiding right side signal and hop space\n        const uint16_t longNameMaxW =\n            (rightContentW + rightContentGap < width()) ? (width() - rightContentW - rightContentGap) : 0;\n        const std::string longNameShown = ellipsizeToWidth(longName, longNameMaxW);\n\n        // Safety crop\n        setCrop(0, cardTopY, longNameMaxW, cardH);\n        printAt(0, lineBY, longNameShown, LEFT, MIDDLE);\n\n        resetCrop();\n\n        // Draw separator between cards\n        const int16_t separatorY = cardTopY + cardH - 1;\n        if (separatorY < height() - 1 && (card + 1) != cards.end()) {\n            for (int16_t xSep = 0; xSep < width(); xSep += 2)\n                drawPixel(xSep, separatorY, BLACK);\n        }\n\n        // Prepare to draw the next card\n        cardTopY += cardH;\n\n        // Once we've run out of screen, stop drawing cards\n        // Depending on tiles / rotation, this may be before we hit maxCards\n        if (cardTopY > height())\n            break;\n    }\n}\n\n// Draw element: a \"mobile phone\" style signal indicator\n// We will calculate values as floats, then \"rasterize\" at the last moment, relative to x and w, etc\n// This prevents issues with premature rounding when rendering tiny elements\nvoid InkHUD::NodeListApplet::drawSignalIndicator(int16_t x, int16_t y, uint16_t w, uint16_t h, SignalStrength strength)\n{\n\n    /*\n    +-------------------------------------------+\n    |                                           |\n    |                                           |\n    |                                  barHeightRelative=1.0\n    |                                  +--+ ^   |\n    |        gutterW          +--+     |  | |   |\n    |          <-->  +--+     |  |     |  | |   |\n    |     +--+       |  |     |  |     |  | |   |\n    |     |  |       |  |     |  |     |  | |   |\n    | <-> +--+       +--+     +--+     +--+ v   |\n    | paddingW             ^                    |\n    |             paddingH |                    |\n    |                      v                    |\n    +-------------------------------------------+\n    */\n\n    constexpr float paddingW = 0.1; // Either side\n    constexpr float paddingH = 0.1; // Above and below\n    constexpr float gutterW = 0.1;  // Between bars\n\n    constexpr float barHRel[] = {0.3, 0.5, 0.7, 1.0}; // Heights of the signal bars, relative to the tallest\n    constexpr uint8_t barCount = 4; // How many bars we draw. Reference only: changing value won't change the count.\n\n    // Dynamically calculate the width of the bars, and height of the rightmost, relative to other dimensions\n    float barW = (1.0 - (paddingW + ((barCount - 1) * gutterW) + paddingW)) / barCount;\n    float barHMax = 1.0 - (paddingH + paddingH);\n\n    // Draw signal bar rectangles, then placeholder lines once strength reached\n    for (uint8_t i = 0; i < barCount; i++) {\n        // Coords for this specific bar\n        float barH = barHMax * barHRel[i];\n        float barX = paddingW + (i * (gutterW + barW));\n        float barY = paddingH + (barHMax - barH);\n\n        // Rasterize to px coords at the last moment\n        int16_t rX = (x + (w * barX)) + 0.5;\n        int16_t rY = (y + (h * barY)) + 0.5;\n        uint16_t rW = (w * barW) + 0.5;\n        uint16_t rH = (h * barH) + 0.5;\n\n        // Draw signal bars, until we are displaying the correct \"signal strength\", then just draw placeholder lines\n        if (i <= strength)\n            drawRect(rX, rY, rW, rH, BLACK);\n        else {\n            // Just draw a placeholder line\n            float lineY = barY + barH;\n            uint16_t rLineY = (y + (h * lineY)) + 0.5; // Rasterize\n            drawLine(rX, rLineY, rX + rW - 1, rLineY, BLACK);\n        }\n    }\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Bases/NodeList/NodeListApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nBase class for Applets which display a list of nodes\nUsed by the \"Recents\" and \"Heard\" applets. Possibly more in future?\n\n    +-------------------------------+\n    |                            |  |\n    |  SHRT                  . | |  |\n    |  Long name              50km  |\n    |                               |\n    |  ABCD                 2 Hops  |\n    |  abcdedfghijk           30km  |\n    |                               |\n    +-------------------------------+\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n\n#include \"main.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass NodeListApplet : public Applet, public MeshModule\n{\n  protected:\n    // Info needed to draw a node card to the list\n    // - generated each time we hear a node\n    struct CardInfo {\n        static constexpr uint8_t HOPS_UNKNOWN = -1;\n        static constexpr uint32_t DISTANCE_UNKNOWN = -1;\n\n        NodeNum nodeNum = 0;\n        SignalStrength signal = SignalStrength::SIGNAL_UNKNOWN;\n        uint32_t distanceMeters = DISTANCE_UNKNOWN;\n        uint8_t hopsAway = HOPS_UNKNOWN;\n    };\n\n  public:\n    NodeListApplet(const char *name);\n\n    void onRender(bool full) override;\n\n    bool wantPacket(const meshtastic_MeshPacket *p) override;\n    ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n  protected:\n    virtual void handleParsed(CardInfo c) = 0; // Tell derived applet that we heard a node\n    virtual std::string getHeaderText() = 0;   // Ask derived class what the applet's title should be\n\n    uint8_t maxCards(); // Max number of cards which could ever fit on screen\n\n    std::deque<CardInfo> cards; // Cards to be rendered. Derived applet fills this.\n\n  private:\n    void drawSignalIndicator(int16_t x, int16_t y, uint16_t w, uint16_t h,\n                             SignalStrength signal); // Draw a \"mobile phone\" style signal indicator\n\n    // Card Dimensions\n    // - for rendering and for maxCards calc\n    uint8_t cardMarginH = 1; // Gap between cards (minimal to fit more rows)\n    uint16_t cardH = fontMedium.lineHeight() + fontSmall.lineHeight() + cardMarginH; // Height of card\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./BasicExampleApplet.h\"\n\nusing namespace NicheGraphics;\n\n// All drawing happens here\n// Our basic example doesn't do anything useful. It just passively prints some text.\nvoid InkHUD::BasicExampleApplet::onRender(bool full)\n{\n    printAt(0, 0, \"Hello, World!\");\n\n    // If text might contain \"special characters\", is needs parsing first\n    // This applies to data such as text-messages and and node names\n\n    // std::string greeting = parse(\"Grüezi mitenand!\");\n    // printAt(0, 0, greeting);\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Examples/BasicExample/BasicExampleApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nA bare-minimum example of an InkHUD applet.\nOnly prints Hello World.\n\nIn variants/<your device>/nicheGraphics.h:\n\n    - include this .h file\n    - add the following line of code:\n        windowManager->addApplet(\"Basic\", new InkHUD::BasicExampleApplet);\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass BasicExampleApplet : public Applet\n{\n  public:\n    // You must have an onRender() method\n    // All drawing happens here\n\n    void onRender(bool full) override;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./NewMsgExampleApplet.h\"\n\nusing namespace NicheGraphics;\n\n// We configured the Module API to call this method when we receive a new text message\nProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_MeshPacket &mp)\n{\n\n    // Abort if applet fully deactivated\n    // Don't waste time: we wouldn't be rendered anyway\n    if (!isActive())\n        return ProcessMessage::CONTINUE;\n\n    // Check that this is an incoming message\n    // Outgoing messages (sent by us) will also call handleReceived\n\n    if (!isFromUs(&mp)) {\n        // Store the sender's nodenum\n        // We need to keep this information, so we can re-use it anytime render() is called\n        haveMessage = true;\n        fromWho = mp.from;\n\n        // Tell InkHUD that we have something new to show on the screen\n        requestUpdate();\n    }\n\n    // Tell Module API to continue informing other firmware components about this message\n    // We're not the only component which is interested in new text messages\n    return ProcessMessage::CONTINUE;\n}\n\n// All drawing happens here\n// We can trigger a render by calling requestUpdate()\n// Render might be called by some external source\n// We should always be ready to draw\nvoid InkHUD::NewMsgExampleApplet::onRender(bool full)\n{\n    printAt(0, 0, \"Example: NewMsg\", LEFT, TOP); // Print top-left corner of text at (0,0)\n\n    int16_t centerX = X(0.5); // Same as width() / 2\n    int16_t centerY = Y(0.5); // Same as height() / 2\n\n    if (haveMessage) {\n        printAt(centerX, centerY, \"New Message\", CENTER, BOTTOM);\n        printAt(centerX, centerY, \"From: \" + hexifyNodeNum(fromWho), CENTER, TOP);\n    } else {\n        printAt(centerX, centerY, \"No Message\", CENTER, MIDDLE); // Place center of string at (centerX, centerY)\n    }\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Examples/NewMsgExample/NewMsgExampleApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nAn example of an InkHUD applet.\nTells us when a new text message arrives.\n\nThis applet makes use of the Module API to detect new messages,\nwhich is a general part of the Meshtastic firmware, and not part of InkHUD.\n\nIn variants/<your device>/nicheGraphics.h:\n\n    - include this .h file\n    - add the following line of code:\n        windowManager->addApplet(\"New Msg\", new InkHUD::NewMsgExampleApplet);\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n\n#include \"mesh/SinglePortModule.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass NewMsgExampleApplet : public Applet, public SinglePortModule\n{\n  public:\n    // The MeshModule API requires us to have a constructor, to specify that we're interested in Text Messages.\n    NewMsgExampleApplet() : SinglePortModule(\"NewMsgExampleApplet\", meshtastic_PortNum_TEXT_MESSAGE_APP) {}\n\n    // All drawing happens here\n    void onRender(bool full) override;\n\n    // Your applet might also want to use some of these\n    // Useful for setting up or tidying up\n\n    /*\n    void onActivate();   // When started\n    void onDeactivate(); // When stopped\n    void onForeground(); // When shown by short-press\n    void onBackground(); // When hidden by short-press\n    */\n\n  private:\n    // Called when we receive new text messages\n    // Part of the MeshModule API\n    ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n    // Store info from handleReceived\n    bool haveMessage = false;\n    NodeNum fromWho = 0;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Examples/UserAppletInputExample/UserAppletInputExample.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n#include \"./UserAppletInputExample.h\"\n\nusing namespace NicheGraphics;\n\nvoid InkHUD::UserAppletInputExampleApplet::onActivate()\n{\n    setGrabbed(false);\n}\n\nvoid InkHUD::UserAppletInputExampleApplet::onRender(bool full)\n{\n    drawHeader(\"Input Example\");\n    uint16_t headerHeight = getHeaderHeight();\n\n    std::string buttonName;\n    if (settings->joystick.enabled)\n        buttonName = \"joystick center button\";\n    else\n        buttonName = \"user button\";\n\n    std::string additional = \" | Control is grabbed, long press \" + buttonName + \" to release controls\";\n    if (!isGrabbed)\n        additional = \" | Control is released, long press \" + buttonName + \" to grab controls\";\n\n    printWrapped(0, headerHeight, width(), \"Last button: \" + lastInput + additional);\n}\n\nvoid InkHUD::UserAppletInputExampleApplet::setGrabbed(bool grabbed)\n{\n    isGrabbed = grabbed;\n    setInputsSubscribed(BUTTON_SHORT | EXIT_SHORT | EXIT_LONG | NAV_UP | NAV_DOWN | NAV_LEFT | NAV_RIGHT,\n                        grabbed);           // Enables/disables grabbing all inputs\n    setInputsSubscribed(BUTTON_LONG, true); // Always grab this input\n}\n\nvoid InkHUD::UserAppletInputExampleApplet::onButtonShortPress()\n{\n    lastInput = \"BUTTON_SHORT\";\n    requestUpdate();\n}\nvoid InkHUD::UserAppletInputExampleApplet::onButtonLongPress()\n{\n    lastInput = \"BUTTON_LONG\";\n    setGrabbed(!isGrabbed);\n    requestUpdate();\n}\nvoid InkHUD::UserAppletInputExampleApplet::onExitShort()\n{\n    lastInput = \"EXIT_SHORT\";\n    requestUpdate();\n}\nvoid InkHUD::UserAppletInputExampleApplet::onExitLong()\n{\n    lastInput = \"EXIT_LONG\";\n    requestUpdate();\n}\nvoid InkHUD::UserAppletInputExampleApplet::onNavUp()\n{\n    lastInput = \"NAV_UP\";\n    requestUpdate();\n}\nvoid InkHUD::UserAppletInputExampleApplet::onNavDown()\n{\n    lastInput = \"NAV_DOWN\";\n    requestUpdate();\n}\nvoid InkHUD::UserAppletInputExampleApplet::onNavLeft()\n{\n    lastInput = \"NAV_LEFT\";\n    requestUpdate();\n}\nvoid InkHUD::UserAppletInputExampleApplet::onNavRight()\n{\n    lastInput = \"NAV_RIGHT\";\n    requestUpdate();\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/Examples/UserAppletInputExample/UserAppletInputExample.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass UserAppletInputExampleApplet : public Applet\n{\n  public:\n    void onActivate() override;\n\n    void onRender(bool full) override;\n    void onButtonShortPress() override;\n    void onButtonLongPress() override;\n    void onExitShort() override;\n    void onExitLong() override;\n    void onNavUp() override;\n    void onNavDown() override;\n    void onNavLeft() override;\n    void onNavRight() override;\n\n  private:\n    std::string lastInput = \"None\";\n    bool isGrabbed = false;\n\n    void setGrabbed(bool grabbed);\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/AlignStick/AlignStickApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./AlignStickApplet.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::AlignStickApplet::AlignStickApplet()\n{\n    if (!settings->joystick.aligned)\n        bringToForeground();\n}\n\nvoid InkHUD::AlignStickApplet::onRender(bool full)\n{\n    setFont(fontMedium);\n    printAt(0, 0, \"Align Joystick:\");\n    setFont(fontSmall);\n    std::string instructions = \"Move joystick in the direction indicated\";\n    printWrapped(0, fontMedium.lineHeight() * 1.5, width(), instructions);\n\n    // Size of the region in which the joystick graphic should fit\n    uint16_t joyXLimit = X(0.8);\n    uint16_t contentH = fontMedium.lineHeight() * 1.5 + fontSmall.lineHeight() * 1;\n    if (getTextWidth(instructions) > width())\n        contentH += fontSmall.lineHeight();\n    uint16_t freeY = height() - contentH - fontSmall.lineHeight() * 1.2;\n    uint16_t joyYLimit = freeY * 0.8;\n\n    // Use the shorter of the two\n    uint16_t joyWidth = joyXLimit < joyYLimit ? joyXLimit : joyYLimit;\n\n    // Center the joystick graphic\n    uint16_t centerX = X(0.5);\n    uint16_t centerY = contentH + freeY * 0.5;\n\n    // Draw joystick graphic\n    drawStick(centerX, centerY, joyWidth);\n\n    setFont(fontSmall);\n    printAt(X(0.5), Y(1.0) - fontSmall.lineHeight() * 0.2, \"Long press to skip\", CENTER, BOTTOM);\n}\n\n// Draw a scalable joystick graphic\nvoid InkHUD::AlignStickApplet::drawStick(uint16_t centerX, uint16_t centerY, uint16_t width)\n{\n    if (width < 9) // too small to draw\n        return;\n\n    else if (width < 40) { // only draw up arrow\n        uint16_t chamfer = width < 20 ? 1 : 2;\n\n        // Draw filled up arrow\n        drawDirection(centerX, centerY - width / 4, Direction::UP, width, chamfer, BLACK);\n\n    } else { // large enough to draw the full thing\n        uint16_t chamfer = width < 80 ? 1 : 2;\n        uint16_t stroke = 3; // pixels\n        uint16_t arrowW = width * 0.22;\n        uint16_t hollowW = arrowW - stroke * 2;\n\n        // Draw center circle\n        fillCircle((int16_t)centerX, (int16_t)centerY, (int16_t)(width * 0.2), BLACK);\n        fillCircle((int16_t)centerX, (int16_t)centerY, (int16_t)(width * 0.2) - stroke, WHITE);\n\n        // Draw filled up arrow\n        drawDirection(centerX, centerY - width / 2, Direction::UP, arrowW, chamfer, BLACK);\n\n        // Draw down arrow\n        drawDirection(centerX, centerY + width / 2, Direction::DOWN, arrowW, chamfer, BLACK);\n        drawDirection(centerX, centerY + width / 2 - stroke, Direction::DOWN, hollowW, 0, WHITE);\n\n        // Draw left arrow\n        drawDirection(centerX - width / 2, centerY, Direction::LEFT, arrowW, chamfer, BLACK);\n        drawDirection(centerX - width / 2 + stroke, centerY, Direction::LEFT, hollowW, 0, WHITE);\n\n        // Draw right arrow\n        drawDirection(centerX + width / 2, centerY, Direction::RIGHT, arrowW, chamfer, BLACK);\n        drawDirection(centerX + width / 2 - stroke, centerY, Direction::RIGHT, hollowW, 0, WHITE);\n    }\n}\n\n// Draw a scalable joystick direction arrow\n// a right-triangle with blunted tips\n/*\n            _ <--point\n    ^      / \\\n    |     /   \\\n   size  /     \\\n    |   /       \\\n    v  |_________|\n\n*/\nvoid InkHUD::AlignStickApplet::drawDirection(uint16_t pointX, uint16_t pointY, Direction direction, uint16_t size,\n                                             uint16_t chamfer, Color color)\n{\n    uint16_t chamferW = chamfer * 2 + 1;\n    uint16_t triangleW = size - chamferW;\n\n    // Draw arrow\n    switch (direction) {\n    case Direction::UP:\n        fillRect(pointX - chamfer, pointY, chamferW, triangleW, color);\n        fillRect(pointX - chamfer - triangleW, pointY + triangleW, chamferW + triangleW * 2, chamferW, color);\n        fillTriangle(pointX - chamfer, pointY, pointX - chamfer - triangleW, pointY + triangleW, pointX - chamfer,\n                     pointY + triangleW, color);\n        fillTriangle(pointX + chamfer, pointY, pointX + chamfer + triangleW, pointY + triangleW, pointX + chamfer,\n                     pointY + triangleW, color);\n        break;\n    case Direction::DOWN:\n        fillRect(pointX - chamfer, pointY - triangleW + 1, chamferW, triangleW, color);\n        fillRect(pointX - chamfer - triangleW, pointY - size + 1, chamferW + triangleW * 2, chamferW, color);\n        fillTriangle(pointX - chamfer, pointY, pointX - chamfer - triangleW, pointY - triangleW, pointX - chamfer,\n                     pointY - triangleW, color);\n        fillTriangle(pointX + chamfer, pointY, pointX + chamfer + triangleW, pointY - triangleW, pointX + chamfer,\n                     pointY - triangleW, color);\n        break;\n    case Direction::LEFT:\n        fillRect(pointX, pointY - chamfer, triangleW, chamferW, color);\n        fillRect(pointX + triangleW, pointY - chamfer - triangleW, chamferW, chamferW + triangleW * 2, color);\n        fillTriangle(pointX, pointY - chamfer, pointX + triangleW, pointY - chamfer - triangleW, pointX + triangleW,\n                     pointY - chamfer, color);\n        fillTriangle(pointX, pointY + chamfer, pointX + triangleW, pointY + chamfer + triangleW, pointX + triangleW,\n                     pointY + chamfer, color);\n        break;\n    case Direction::RIGHT:\n        fillRect(pointX - triangleW + 1, pointY - chamfer, triangleW, chamferW, color);\n        fillRect(pointX - size + 1, pointY - chamfer - triangleW, chamferW, chamferW + triangleW * 2, color);\n        fillTriangle(pointX, pointY - chamfer, pointX - triangleW, pointY - chamfer - triangleW, pointX - triangleW,\n                     pointY - chamfer, color);\n        fillTriangle(pointX, pointY + chamfer, pointX - triangleW, pointY + chamfer + triangleW, pointX - triangleW,\n                     pointY + chamfer, color);\n        break;\n    }\n}\n\nvoid InkHUD::AlignStickApplet::onForeground()\n{\n    // Prevent most other applets from requesting update, and skip their rendering entirely\n    // Another system applet with a higher precedence can potentially ignore this\n    SystemApplet::lockRendering = true;\n    SystemApplet::lockRequests = true;\n\n    handleInput = true; // Intercept the button input for our applet\n}\n\nvoid InkHUD::AlignStickApplet::onBackground()\n{\n    // Allow normal update behavior to resume\n    SystemApplet::lockRendering = false;\n    SystemApplet::lockRequests = false;\n    SystemApplet::handleInput = false;\n\n    // Need to force an update, as a polite request wouldn't be honored, seeing how we are now in the background\n    // Usually, onBackground is followed by another applet's onForeground (which requests update), but not in this case\n    inkhud->forceUpdate(EInk::UpdateTypes::FULL, true);\n}\n\nvoid InkHUD::AlignStickApplet::onButtonLongPress()\n{\n    sendToBackground();\n}\n\nvoid InkHUD::AlignStickApplet::onExitLong()\n{\n    sendToBackground();\n}\n\nvoid InkHUD::AlignStickApplet::onNavUp()\n{\n    settings->joystick.aligned = true;\n\n    sendToBackground();\n}\n\nvoid InkHUD::AlignStickApplet::onNavDown()\n{\n    inkhud->rotateJoystick(2); // 180 deg\n    settings->joystick.aligned = true;\n\n    sendToBackground();\n}\n\nvoid InkHUD::AlignStickApplet::onNavLeft()\n{\n    inkhud->rotateJoystick(3); // 270 deg\n    settings->joystick.aligned = true;\n\n    sendToBackground();\n}\n\nvoid InkHUD::AlignStickApplet::onNavRight()\n{\n    inkhud->rotateJoystick(1); // 90 deg\n    settings->joystick.aligned = true;\n\n    sendToBackground();\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/AlignStick/AlignStickApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nSystem Applet for manually aligning the joystick with the screen\n\nshould be run at startup if the joystick is enabled\nand not aligned to the screen\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass AlignStickApplet : public SystemApplet\n{\n  public:\n    AlignStickApplet();\n\n    void onRender(bool full) override;\n    void onForeground() override;\n    void onBackground() override;\n    void onButtonLongPress() override;\n    void onExitLong() override;\n    void onNavUp() override;\n    void onNavDown() override;\n    void onNavLeft() override;\n    void onNavRight() override;\n\n  protected:\n    enum Direction {\n        UP,\n        DOWN,\n        LEFT,\n        RIGHT,\n    };\n\n    void drawStick(uint16_t centerX, uint16_t centerY, uint16_t width);\n    void drawDirection(uint16_t pointX, uint16_t pointY, Direction direction, uint16_t size, uint16_t chamfer, Color color);\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/BatteryIcon/BatteryIconApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./BatteryIconApplet.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::BatteryIconApplet::BatteryIconApplet()\n{\n    alwaysRender = true; // render every time the screen is updated\n\n    // Show at boot, if user has previously enabled the feature\n    if (settings->optionalFeatures.batteryIcon)\n        bringToForeground();\n\n    // Register to our have BatteryIconApplet::onPowerStatusUpdate method called when new power info is available\n    // This happens whether or not the battery icon feature is enabled\n    powerStatusObserver.observe(&powerStatus->onNewStatus);\n}\n\n// We handle power status' even when the feature is disabled,\n// so that we have up to date data ready if the feature is enabled later.\n// Otherwise could be 30s before new status update, with weird battery value displayed\nint InkHUD::BatteryIconApplet::onPowerStatusUpdate(const meshtastic::Status *status)\n{\n    // System applets are always active\n    assert(isActive());\n\n    // This method should only receive power statuses\n    // If we get a different type of status, something has gone weird elsewhere\n    assert(status->getStatusType() == STATUS_TYPE_POWER);\n\n    const meshtastic::PowerStatus *pwrStatus = (const meshtastic::PowerStatus *)status;\n\n    // Get the new state of charge %, and round to the nearest 10%\n    uint8_t newSocRounded = ((pwrStatus->getBatteryChargePercent() + 5) / 10) * 10;\n\n    // If rounded value has changed, trigger a display update\n    // It's okay to requestUpdate before we store the new value, as the update won't run until next loop()\n    // Don't trigger an update if the feature is disabled\n    if (this->socRounded != newSocRounded && settings->optionalFeatures.batteryIcon)\n        requestUpdate();\n\n    // Store the new value\n    this->socRounded = newSocRounded;\n\n    return 0; // Tell Observable to continue informing other observers\n}\n\nvoid InkHUD::BatteryIconApplet::onRender(bool full)\n{\n    // Clear the region beneath the tile, including the border\n    // Most applets are drawing onto an empty frame buffer and don't need to do this\n    // We do need to do this with the battery though, as it is an \"overlay\"\n    fillRect(0, 0, width(), height(), WHITE);\n\n    // =====================\n    // Draw battery outline\n    // =====================\n\n    // Positive terminal \"bump\"\n    constexpr uint16_t bumpW = 2;\n    const int16_t &bumpL = 1;\n    const uint16_t bumpH = (height() - 2) / 2;\n    const int16_t bumpT = (1 + ((height() - 2) / 2)) - (bumpH / 2);\n    fillRect(bumpL, bumpT, bumpW, bumpH, BLACK);\n\n    // Main body of battery\n    const int16_t bodyL = 1 + bumpW;\n    const int16_t &bodyT = 1;\n    const int16_t &bodyH = height() - 2;         // Handle top/bottom padding\n    const int16_t bodyW = (width() - 1) - bumpW; // Handle 1px left pad\n    drawRect(bodyL, bodyT, bodyW, bodyH, BLACK);\n\n    // Erase join between bump and body\n    drawLine(bodyL, bumpT, bodyL, bumpT + bumpH - 1, WHITE);\n\n    // ===================\n    // Draw battery level\n    // ===================\n\n    constexpr int16_t slicePad = 2;\n    int16_t sliceL = bodyL + slicePad;\n    const int16_t sliceT = bodyT + slicePad;\n    const uint16_t sliceH = bodyH - (slicePad * 2);\n    uint16_t sliceW = bodyW - (slicePad * 2);\n\n    sliceW = (sliceW * socRounded) / 100;          // Apply percentage\n    sliceL += ((bodyW - (slicePad * 2)) - sliceW); // Shift slice to the battery's negative terminal, correcting drain direction\n\n    hatchRegion(sliceL, sliceT, sliceW, sliceH, 2, BLACK);\n    drawRect(sliceL, sliceT, sliceW, sliceH, BLACK);\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/BatteryIcon/BatteryIconApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nThis applet floats top-left, giving a graphical representation of battery remaining\nIt should be optional, enabled by the on-screen menu\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\n#include \"PowerStatus.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass BatteryIconApplet : public SystemApplet\n{\n  public:\n    BatteryIconApplet();\n\n    void onRender(bool full) override;\n    int onPowerStatusUpdate(const meshtastic::Status *status); // Called when new info about battery is available\n\n  private:\n    // Get informed when new information about the battery is available (via onPowerStatusUpdate method)\n    CallbackObserver<BatteryIconApplet, const meshtastic::Status *> powerStatusObserver =\n        CallbackObserver<BatteryIconApplet, const meshtastic::Status *>(this, &BatteryIconApplet::onPowerStatusUpdate);\n\n    uint8_t socRounded = 0; // Battery state of charge, rounded to nearest 10%\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Keyboard/KeyboardApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n#include \"./KeyboardApplet.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::KeyboardApplet::KeyboardApplet()\n{\n    // Calculate row widths\n    for (uint8_t row = 0; row < KBD_ROWS; row++) {\n        rowWidths[row] = 0;\n        for (uint8_t col = 0; col < KBD_COLS; col++)\n            rowWidths[row] += keyWidths[row * KBD_COLS + col];\n    }\n}\n\nvoid InkHUD::KeyboardApplet::onRender(bool full)\n{\n    uint16_t em = fontSmall.lineHeight(); // 16 pt\n    uint16_t keyH = Y(1.0) / KBD_ROWS;\n    int16_t keyTopPadding = (keyH - fontSmall.lineHeight()) / 2;\n\n    if (full) { // Draw full keyboard\n        for (uint8_t row = 0; row < KBD_ROWS; row++) {\n\n            // Calculate the remaining space to be used as padding\n            int16_t keyXPadding = X(1.0) - ((rowWidths[row] * em) >> 4);\n\n            // Draw keys\n            uint16_t xPos = 0;\n            for (uint8_t col = 0; col < KBD_COLS; col++) {\n                Color fgcolor = BLACK;\n                uint8_t index = row * KBD_COLS + col;\n                uint16_t keyX = ((xPos * em) >> 4) + ((col * keyXPadding) / (KBD_COLS - 1));\n                uint16_t keyY = row * keyH;\n                uint16_t keyW = (keyWidths[index] * em) >> 4;\n                if (index == selectedKey) {\n                    fgcolor = WHITE;\n                    fillRect(keyX, keyY, keyW, keyH, BLACK);\n                }\n                drawKeyLabel(keyX, keyY + keyTopPadding, keyW, keys[index], fgcolor);\n                xPos += keyWidths[index];\n            }\n        }\n    } else { // Only draw the difference\n        if (selectedKey != prevSelectedKey) {\n            // Draw previously selected key\n            uint8_t row = prevSelectedKey / KBD_COLS;\n            int16_t keyXPadding = X(1.0) - ((rowWidths[row] * em) >> 4);\n            uint16_t xPos = 0;\n            for (uint8_t i = prevSelectedKey - (prevSelectedKey % KBD_COLS); i < prevSelectedKey; i++)\n                xPos += keyWidths[i];\n            uint16_t keyX = ((xPos * em) >> 4) + (((prevSelectedKey % KBD_COLS) * keyXPadding) / (KBD_COLS - 1));\n            uint16_t keyY = row * keyH;\n            uint16_t keyW = (keyWidths[prevSelectedKey] * em) >> 4;\n            fillRect(keyX, keyY, keyW, keyH, WHITE);\n            drawKeyLabel(keyX, keyY + keyTopPadding, keyW, keys[prevSelectedKey], BLACK);\n\n            // Draw newly selected key\n            row = selectedKey / KBD_COLS;\n            keyXPadding = X(1.0) - ((rowWidths[row] * em) >> 4);\n            xPos = 0;\n            for (uint8_t i = selectedKey - (selectedKey % KBD_COLS); i < selectedKey; i++)\n                xPos += keyWidths[i];\n            keyX = ((xPos * em) >> 4) + (((selectedKey % KBD_COLS) * keyXPadding) / (KBD_COLS - 1));\n            keyY = row * keyH;\n            keyW = (keyWidths[selectedKey] * em) >> 4;\n            fillRect(keyX, keyY, keyW, keyH, BLACK);\n            drawKeyLabel(keyX, keyY + keyTopPadding, keyW, keys[selectedKey], WHITE);\n        }\n    }\n\n    prevSelectedKey = selectedKey;\n}\n\n// Draw the key label corresponding to the char\n// for most keys it draws the character itself\n// for ['\\b', '\\n', ' ', '\\x1b'] it draws special glyphs\nvoid InkHUD::KeyboardApplet::drawKeyLabel(uint16_t left, uint16_t top, uint16_t width, char key, Color color)\n{\n    if (key == '\\b') {\n        // Draw backspace glyph: 13 x 9 px\n        /**\n         *         [][][][][][][][][]\n         *       [][]              []\n         *     [][]    []      []  []\n         *   [][]        []  []    []\n         * [][]            []      []\n         *   [][]        []  []    []\n         *     [][]    []      []  []\n         *       [][]              []\n         *         [][][][][][][][][]\n         */\n        const uint8_t bsBitmap[] = {0x0f, 0xf8, 0x18, 0x08, 0x32, 0x28, 0x61, 0x48, 0xc0,\n                                    0x88, 0x61, 0x48, 0x32, 0x28, 0x18, 0x08, 0x0f, 0xf8};\n        uint16_t leftPadding = (width - 13) >> 1;\n        drawBitmap(left + leftPadding, top + 1, bsBitmap, 13, 9, color);\n    } else if (key == '\\n') {\n        // Draw done glyph: 12 x 9 px\n        /**\n         *                     [][]\n         *                   [][]\n         *                 [][]\n         *               [][]\n         *             [][]\n         * [][]      [][]\n         *   [][]  [][]\n         *     [][][]\n         *       []\n         */\n        const uint8_t doneBitmap[] = {0x00, 0x30, 0x00, 0x60, 0x00, 0xc0, 0x01, 0x80, 0x03,\n                                      0x00, 0xc6, 0x00, 0x6c, 0x00, 0x38, 0x00, 0x10, 0x00};\n        uint16_t leftPadding = (width - 12) >> 1;\n        drawBitmap(left + leftPadding, top + 1, doneBitmap, 12, 9, color);\n    } else if (key == ' ') {\n        // Draw space glyph: 13 x 9 px\n        /**\n         *\n         *\n         *\n         *\n         * []                      []\n         * []                      []\n         * [][][][][][][][][][][][][]\n         *\n         *\n         */\n        const uint8_t spaceBitmap[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,\n                                       0x08, 0x80, 0x08, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00};\n        uint16_t leftPadding = (width - 13) >> 1;\n        drawBitmap(left + leftPadding, top + 1, spaceBitmap, 13, 9, color);\n    } else if (key == '\\x1b') {\n        setTextColor(color);\n        std::string keyText = \"ESC\";\n        uint16_t leftPadding = (width - getTextWidth(keyText)) >> 1;\n        printAt(left + leftPadding, top, keyText);\n    } else {\n        setTextColor(color);\n        if (key >= 0x61)\n            key -= 32; // capitalize\n        std::string keyText = std::string(1, key);\n        uint16_t leftPadding = (width - getTextWidth(keyText)) >> 1;\n        printAt(left + leftPadding, top, keyText);\n    }\n}\n\nvoid InkHUD::KeyboardApplet::onForeground()\n{\n    handleInput = true; // Intercept the button input for our applet\n\n    // Select the first key\n    selectedKey = 0;\n    prevSelectedKey = 0;\n}\n\nvoid InkHUD::KeyboardApplet::onBackground()\n{\n    handleInput = false;\n}\n\nvoid InkHUD::KeyboardApplet::onButtonShortPress()\n{\n    char key = keys[selectedKey];\n    if (key == '\\n') {\n        inkhud->freeTextDone();\n        inkhud->closeKeyboard();\n    } else if (key == '\\x1b') {\n        inkhud->freeTextCancel();\n        inkhud->closeKeyboard();\n    } else {\n        inkhud->freeText(key);\n    }\n}\n\nvoid InkHUD::KeyboardApplet::onButtonLongPress()\n{\n    char key = keys[selectedKey];\n    if (key == '\\n') {\n        inkhud->freeTextDone();\n        inkhud->closeKeyboard();\n    } else if (key == '\\x1b') {\n        inkhud->freeTextCancel();\n        inkhud->closeKeyboard();\n    } else {\n        if (key >= 0x61)\n            key -= 32; // capitalize\n        inkhud->freeText(key);\n    }\n}\n\nvoid InkHUD::KeyboardApplet::onExitShort()\n{\n    inkhud->freeTextCancel();\n    inkhud->closeKeyboard();\n}\n\nvoid InkHUD::KeyboardApplet::onExitLong()\n{\n    inkhud->freeTextCancel();\n    inkhud->closeKeyboard();\n}\n\nvoid InkHUD::KeyboardApplet::onNavUp()\n{\n    if (selectedKey < KBD_COLS) // wrap\n        selectedKey += KBD_COLS * (KBD_ROWS - 1);\n    else // move 1 row back\n        selectedKey -= KBD_COLS;\n\n    // Request rendering over the previously drawn render\n    requestUpdate(EInk::UpdateTypes::FAST, false);\n    // Force an update to bypass lockRequests\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST);\n}\n\nvoid InkHUD::KeyboardApplet::onNavDown()\n{\n    selectedKey += KBD_COLS;\n    selectedKey %= (KBD_COLS * KBD_ROWS);\n\n    // Request rendering over the previously drawn render\n    requestUpdate(EInk::UpdateTypes::FAST, false);\n    // Force an update to bypass lockRequests\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST);\n}\n\nvoid InkHUD::KeyboardApplet::onNavLeft()\n{\n    if (selectedKey % KBD_COLS == 0) // wrap\n        selectedKey += KBD_COLS - 1;\n    else // move 1 column back\n        selectedKey--;\n\n    // Request rendering over the previously drawn render\n    requestUpdate(EInk::UpdateTypes::FAST, false);\n    // Force an update to bypass lockRequests\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST);\n}\n\nvoid InkHUD::KeyboardApplet::onNavRight()\n{\n    if (selectedKey % KBD_COLS == KBD_COLS - 1) // wrap\n        selectedKey -= KBD_COLS - 1;\n    else // move 1 column forward\n        selectedKey++;\n\n    // Request rendering over the previously drawn render\n    requestUpdate(EInk::UpdateTypes::FAST, false);\n    // Force an update to bypass lockRequests\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST);\n}\n\nuint16_t InkHUD::KeyboardApplet::getKeyboardHeight()\n{\n    const uint16_t keyH = fontSmall.lineHeight() * 1.2;\n    return keyH * KBD_ROWS;\n}\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Keyboard/KeyboardApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nSystem Applet to render an on-screen keyboard\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n#include <string>\nnamespace NicheGraphics::InkHUD\n{\n\nclass KeyboardApplet : public SystemApplet\n{\n  public:\n    KeyboardApplet();\n\n    void onRender(bool full) override;\n    void onForeground() override;\n    void onBackground() override;\n    void onButtonShortPress() override;\n    void onButtonLongPress() override;\n    void onExitShort() override;\n    void onExitLong() override;\n    void onNavUp() override;\n    void onNavDown() override;\n    void onNavLeft() override;\n    void onNavRight() override;\n\n    static uint16_t getKeyboardHeight(); // used to set the keyboard tile height\n\n  private:\n    void drawKeyLabel(uint16_t left, uint16_t top, uint16_t width, char key, Color color);\n\n    static const uint8_t KBD_COLS = 11;\n    static const uint8_t KBD_ROWS = 4;\n\n    const char keys[KBD_COLS * KBD_ROWS] = {\n        '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\\b',  // row 0\n        'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '\\n',  // row 1\n        'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', '!', ' ',   // row 2\n        'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '?', '\\x1b' // row 3\n    };\n\n    // This array represents the widths of each key in points\n    // 16 pt = line height of the text\n    const uint16_t keyWidths[KBD_COLS * KBD_ROWS] = {\n        16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 24, // row 0\n        16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 24, // row 1\n        16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 24, // row 2\n        16, 16, 16, 16, 16, 16, 16, 10, 10, 12, 40  // row 3\n    };\n\n    uint16_t rowWidths[KBD_ROWS];\n    uint8_t selectedKey = 0; // selected key index\n    uint8_t prevSelectedKey = 0;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./LogoApplet.h\"\n\n#include \"mesh/NodeDB.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::LogoApplet::LogoApplet() : concurrency::OSThread(\"LogoApplet\")\n{\n    OSThread::setIntervalFromNow(8 * 1000UL);\n    OSThread::enabled = true;\n\n    // During onboarding, show the default short name as well as the version string\n    // This behavior assists manufacturers during mass production, and should not be modified without good reason\n    if (!settings->tips.safeShutdownSeen) {\n        meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n        fontTitle = fontMedium;\n        textLeft = xstr(APP_VERSION_SHORT);\n        textRight = parseShortName(ourNode);\n        textTitle = \"Meshtastic\";\n    } else {\n        fontTitle = fontSmall;\n        textLeft = \"\";\n        textRight = \"\";\n        textTitle = xstr(APP_VERSION_SHORT);\n    }\n\n    bringToForeground();\n    // This is then drawn with a FULL refresh by Renderer::begin\n}\n\nvoid InkHUD::LogoApplet::onRender(bool full)\n{\n    // Size  of the region which the logo should \"scale to fit\"\n    uint16_t logoWLimit = X(0.8);\n    uint16_t logoHLimit = Y(0.5);\n\n    // Get the max width and height we can manage within the region, while still maintaining aspect ratio\n    uint16_t logoW = getLogoWidth(logoWLimit, logoHLimit);\n    uint16_t logoH = getLogoHeight(logoWLimit, logoHLimit);\n\n    // Where to place the center of the logo\n    int16_t logoCX = X(0.5);\n    int16_t logoCY = Y(0.5 - 0.05);\n\n    // Invert colors if black-on-white\n    // Used during shutdown, to report display health\n    // Todo: handle this in InkHUD::Renderer instead\n    if (inverted) {\n        fillScreen(BLACK);\n        setTextColor(WHITE);\n    }\n\n#ifdef USERPREFS_OEM_IMAGE_DATA // Custom boot screen, if defined in userPrefs.jsonc\n\n    // Only show the custom screen at startup\n    // This allows us to draw the usual Meshtastic logo at shutdown\n    // The effect is similar to the two-stage userPrefs boot screen used by BaseUI\n    if (millis() < 10 * 1000UL) {\n\n        // Draw the custom logo\n        const uint8_t logo[] = USERPREFS_OEM_IMAGE_DATA;\n        drawXBitmap(logoCX - (USERPREFS_OEM_IMAGE_WIDTH / 2),  //  Left\n                    logoCY - (USERPREFS_OEM_IMAGE_HEIGHT / 2), // Top\n                    logo,                                      // XBM data\n                    USERPREFS_OEM_IMAGE_WIDTH,                 // Width\n                    USERPREFS_OEM_IMAGE_HEIGHT,                // Height\n                    inverted ? WHITE : BLACK                   // Color\n        );\n\n        // Select the largest font which will still comfortably fit the custom text\n        setFont(fontLarge);\n        if (getTextWidth(USERPREFS_OEM_TEXT) > 0.8 * width())\n            setFont(fontMedium);\n        if (getTextWidth(USERPREFS_OEM_TEXT) > 0.8 * width())\n            setFont(fontSmall);\n\n        // Draw custom text below logo\n        int16_t logoB = logoCY + (USERPREFS_OEM_IMAGE_HEIGHT / 2); // Bottom of the logo\n        printAt(X(0.5), logoB + Y(0.1), USERPREFS_OEM_TEXT, CENTER, TOP);\n\n        // Don't draw the normal boot screen, we've already drawn our custom version\n        return;\n    }\n\n#endif\n\n    drawLogo(logoCX, logoCY, logoW, logoH, inverted ? WHITE : BLACK);\n\n    if (!textLeft.empty()) {\n        setFont(fontSmall);\n        printAt(0, 0, textLeft, LEFT, TOP);\n    }\n\n    if (!textRight.empty()) {\n        setFont(fontSmall);\n        printAt(X(1), 0, textRight, RIGHT, TOP);\n    }\n\n    if (!textTitle.empty()) {\n        int16_t logoB = logoCY + (logoH / 2); // Bottom of the logo\n        setFont(fontTitle);\n        printAt(X(0.5), logoB + Y(0.1), textTitle, CENTER, TOP);\n    }\n}\n\nvoid InkHUD::LogoApplet::onForeground()\n{\n    SystemApplet::lockRendering = true;\n    SystemApplet::lockRequests = true;\n    SystemApplet::handleInput = true; // We don't actually use this input. Just blocking other applets from using it.\n}\n\nvoid InkHUD::LogoApplet::onBackground()\n{\n    SystemApplet::lockRendering = false;\n    SystemApplet::lockRequests = false;\n    SystemApplet::handleInput = false;\n\n    // Need to force an update, as a polite request wouldn't be honored, seeing how we are now in the background\n    // Usually, onBackground is followed by another applet's onForeground (which requests update), but not in this case\n    inkhud->forceUpdate(EInk::UpdateTypes::FULL, true);\n}\n\n// Begin displaying the screen which is shown at shutdown\nvoid InkHUD::LogoApplet::onShutdown()\n{\n    bringToForeground();\n\n    textLeft = \"\";\n    textRight = \"\";\n    textTitle = \"Shutting Down...\";\n    fontTitle = fontSmall;\n\n    // Draw a shutting down screen, twice.\n    // Once white on black, once black on white.\n    // Intention is to restore display health.\n\n    inverted = true;\n    inkhud->forceUpdate(Drivers::EInk::FULL, true, false);\n    delay(1000); // Cooldown. Back to back updates aren't great for health.\n    inverted = false;\n    inkhud->forceUpdate(Drivers::EInk::FULL, true, false);\n    delay(1000); // Cooldown\n\n    // Prepare for the powered-off screen now\n    // We can change these values because the initial \"shutting down\" screen has already rendered at this point\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    textLeft = \"\";\n    textRight = \"\";\n    textTitle = parseShortName(ourNode);\n    fontTitle = fontMedium;\n\n    // This is then drawn by InkHUD::Events::onShutdown, with a blocking FULL update, after InkHUD's flash write is complete\n}\n\nvoid InkHUD::LogoApplet::onApplyingChanges()\n{\n    bringToForeground();\n\n    textLeft = \"\";\n    textRight = \"\";\n    textTitle = \"Applying changes\";\n    fontTitle = fontSmall;\n\n    inkhud->forceUpdate(Drivers::EInk::FAST, false);\n}\n\nvoid InkHUD::LogoApplet::onReboot()\n{\n    bringToForeground();\n\n    textLeft = \"\";\n    textRight = \"\";\n    textTitle = \"Rebooting...\";\n    fontTitle = fontSmall;\n\n    inkhud->forceUpdate(Drivers::EInk::FULL, true, false);\n    // Perform the update right now, waiting here until complete\n}\n\nint32_t InkHUD::LogoApplet::runOnce()\n{\n    sendToBackground();\n    return OSThread::disable();\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Logo/LogoApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\n    Shows the Meshtastic logo fullscreen, with accompanying text\n    Used for boot and shutdown\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"concurrency/OSThread.h\"\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass LogoApplet : public SystemApplet, public concurrency::OSThread\n{\n  public:\n    LogoApplet();\n    void onRender(bool full) override;\n    void onForeground() override;\n    void onBackground() override;\n    void onShutdown() override;\n    void onReboot() override;\n    void onApplyingChanges();\n\n  protected:\n    int32_t runOnce() override;\n\n    std::string textLeft;\n    std::string textRight;\n    std::string textTitle;\n    AppletFont fontTitle;\n    bool inverted = false; // Invert colors. Used during shutdown, to restore display health.\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nSet of end-point actions for the Menu Applet\n\nAdded as menu entries in MenuApplet::showPage\nBehaviors assigned in MenuApplet::execute\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nenum MenuAction {\n    NO_ACTION,\n    SEND_PING,\n    FREE_TEXT,\n    STORE_CANNEDMESSAGE_SELECTION,\n    SEND_CANNEDMESSAGE,\n    SHUTDOWN,\n    NEXT_TILE,\n    TOGGLE_BACKLIGHT,\n    TOGGLE_GPS,\n    ENABLE_BLUETOOTH,\n    TOGGLE_APPLET,\n    TOGGLE_AUTOSHOW_APPLET,\n    SET_RECENTS,\n    ROTATE,\n    ALIGN_JOYSTICK,\n    LAYOUT,\n    TOGGLE_BATTERY_ICON,\n    TOGGLE_NOTIFICATIONS,\n    TOGGLE_INVERT_COLOR,\n    TOGGLE_12H_CLOCK,\n    // Regions\n    SET_REGION_US,\n    SET_REGION_EU_868,\n    SET_REGION_EU_433,\n    SET_REGION_CN,\n    SET_REGION_JP,\n    SET_REGION_ANZ,\n    SET_REGION_KR,\n    SET_REGION_TW,\n    SET_REGION_RU,\n    SET_REGION_IN,\n    SET_REGION_NZ_865,\n    SET_REGION_TH,\n    SET_REGION_LORA_24,\n    SET_REGION_UA_433,\n    SET_REGION_UA_868,\n    SET_REGION_MY_433,\n    SET_REGION_MY_919,\n    SET_REGION_SG_923,\n    SET_REGION_PH_433,\n    SET_REGION_PH_868,\n    SET_REGION_PH_915,\n    SET_REGION_ANZ_433,\n    SET_REGION_KZ_433,\n    SET_REGION_KZ_863,\n    SET_REGION_NP_865,\n    SET_REGION_BR_902,\n    // Device Roles\n    SET_ROLE_CLIENT,\n    SET_ROLE_CLIENT_MUTE,\n    SET_ROLE_ROUTER,\n    SET_ROLE_REPEATER,\n    // Presets\n    SET_PRESET_LONG_SLOW,\n    SET_PRESET_LONG_MODERATE,\n    SET_PRESET_LONG_FAST,\n    SET_PRESET_MEDIUM_SLOW,\n    SET_PRESET_MEDIUM_FAST,\n    SET_PRESET_SHORT_SLOW,\n    SET_PRESET_SHORT_FAST,\n    SET_PRESET_SHORT_TURBO,\n    // Timezones\n    SET_TZ_US_HAWAII,\n    SET_TZ_US_ALASKA,\n    SET_TZ_US_PACIFIC,\n    SET_TZ_US_ARIZONA,\n    SET_TZ_US_MOUNTAIN,\n    SET_TZ_US_CENTRAL,\n    SET_TZ_US_EASTERN,\n    SET_TZ_BR_BRAZILIA,\n    SET_TZ_UTC,\n    SET_TZ_EU_WESTERN,\n    SET_TZ_EU_CENTRAL,\n    SET_TZ_EU_EASTERN,\n    SET_TZ_ASIA_KOLKATA,\n    SET_TZ_ASIA_HONG_KONG,\n    SET_TZ_AU_AWST,\n    SET_TZ_AU_ACST,\n    SET_TZ_AU_AEST,\n    SET_TZ_PACIFIC_NZ,\n    // Power\n    TOGGLE_POWER_SAVE,\n    CALIBRATE_ADC,\n    // Bluetooth\n    TOGGLE_BLUETOOTH,\n    TOGGLE_BLUETOOTH_PAIR_MODE,\n    // Channel\n    TOGGLE_CHANNEL_UPLINK,\n    TOGGLE_CHANNEL_DOWNLINK,\n    TOGGLE_CHANNEL_POSITION,\n    SET_CHANNEL_PRECISION,\n    // Display\n    TOGGLE_DISPLAY_UNITS,\n    // Network\n    TOGGLE_WIFI,\n    // Administration\n    RESET_NODEDB_ALL,\n    RESET_NODEDB_KEEP_FAVORITES,\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./MenuApplet.h\"\n\n#include \"DisplayFormatters.h\"\n#include \"GPS.h\"\n#include \"MeshService.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"airtime.h\"\n#include \"main.h\"\n#include \"mesh/generated/meshtastic/deviceonly.pb.h\"\n#include \"power.h\"\n#include <RadioLibInterface.h>\n#include <target_specific.h>\n#if defined(ARCH_ESP32) && HAS_WIFI\n#include \"mesh/wifi/WiFiAPClient.h\"\n#include <WiFi.h>\n#include <esp_wifi.h>\n#endif\n\nusing namespace NicheGraphics;\n\nstatic constexpr uint8_t MENU_TIMEOUT_SEC = 60; // How many seconds before menu auto-closes\n\n// Options for the \"Recents\" menu\n// These are offered to users as possible values for settings.recentlyActiveSeconds\nstatic constexpr uint8_t RECENTS_OPTIONS_MINUTES[] = {2, 5, 10, 30, 60, 120};\n\nstruct PositionPrecisionOption {\n    uint8_t value; // proto value\n    const char *metric;\n    const char *imperial;\n};\n\nstatic constexpr PositionPrecisionOption POSITION_PRECISION_OPTIONS[] = {\n    {32, \"Precise\", \"Precise\"}, {19, \"50 m\", \"150 ft\"},  {18, \"90 m\", \"300 ft\"},   {17, \"200 m\", \"600 ft\"},\n    {16, \"350 m\", \"0.2 mi\"},    {15, \"700 m\", \"0.5 mi\"}, {14, \"1.5 km\", \"0.9 mi\"}, {13, \"2.9 km\", \"1.8 mi\"},\n    {12, \"5.8 km\", \"3.6 mi\"},   {11, \"12 km\", \"7.3 mi\"}, {10, \"23 km\", \"15 mi\"},\n};\n\nInkHUD::MenuApplet::MenuApplet() : concurrency::OSThread(\"MenuApplet\")\n{\n    // No timer tasks at boot\n    OSThread::disable();\n\n    // Note: don't get instance if we're not actually using the backlight,\n    // or else you will unintentionally instantiate it\n    if (settings->optionalMenuItems.backlight) {\n        backlight = Drivers::LatchingBacklight::getInstance();\n    }\n\n    // Initialize the Canned Message store\n    // This is a shared nicheGraphics component\n    // - handles loading & parsing the canned messages\n    // - handles setting / getting of canned messages via apps (Client API Admin Messages)\n    cm.store = CannedMessageStore::getInstance();\n}\n\nvoid InkHUD::MenuApplet::onForeground()\n{\n    // We do need this before we render, but we can optimize by just calculating it once now\n    systemInfoPanelHeight = getSystemInfoPanelHeight();\n\n    // Force Region page ONLY when explicitly requested (one-shot)\n    if (inkhud->forceRegionMenu) {\n\n        inkhud->forceRegionMenu = false; // consume one-shot flag\n        showPage(MenuPage::REGION);\n\n    } else {\n        showPage(MenuPage::ROOT);\n    }\n\n    // If device has a backlight which isn't controlled by aux button:\n    // backlight on always when menu opens.\n    // Courtesy to T-Echo users who removed the capacitive touch button\n    if (settings->optionalMenuItems.backlight) {\n        assert(backlight);\n        if (!backlight->isOn())\n            backlight->peek();\n    }\n\n    // Prevent user applets requesting update while menu is open\n    // Handle button input with this applet\n    SystemApplet::lockRequests = true;\n    SystemApplet::handleInput = true;\n\n    // Begin the auto-close timeout\n    OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n    OSThread::enabled = true;\n\n    freeTextMode = false;\n\n    // Upgrade the refresh to FAST, for guaranteed responsiveness\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST);\n}\n\nvoid InkHUD::MenuApplet::onBackground()\n{\n    // Discard any data we generated while selecting a canned message\n    // Frees heap mem\n    freeCannedMessageResources();\n\n    // If device has a backlight which isn't controlled by aux button:\n    // Item in options submenu allows keeping backlight on after menu is closed\n    // If this item is deselected we will turn backlight off again, now that menu is closing\n    if (settings->optionalMenuItems.backlight) {\n        assert(backlight);\n        if (!backlight->isLatched())\n            backlight->off();\n    }\n\n    // Stop the auto-timeout\n    OSThread::disable();\n\n    // Resume normal rendering and button behavior of user applets\n    SystemApplet::lockRequests = false;\n    SystemApplet::handleInput = false;\n\n    handleFreeText = false;\n\n    // Restore the user applet whose tile we borrowed\n    if (borrowedTileOwner)\n        borrowedTileOwner->bringToForeground();\n    Tile *t = getTile();\n    t->assignApplet(borrowedTileOwner); // Break our link with the tile, (and relink it with real owner, if it had one)\n    borrowedTileOwner = nullptr;\n\n    // Need to force an update, as a polite request wouldn't be honored, seeing how we are now in the background\n    // We're only updating here to upgrade from UNSPECIFIED to FAST, to ensure responsiveness when exiting menu\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST);\n}\n\n// Open the menu\n// Parameter specifies which user-tile the menu will use\n// The user applet originally on this tile will be restored when the menu closes\nvoid InkHUD::MenuApplet::show(Tile *t)\n{\n    // Remember who *really* owns this tile\n    borrowedTileOwner = t->getAssignedApplet();\n\n    // Hide the owner, if it is a valid applet\n    if (borrowedTileOwner)\n        borrowedTileOwner->sendToBackground();\n\n    // Break the owner's link with tile\n    // Relink it to menu applet\n    t->assignApplet(this);\n\n    // Show menu\n    bringToForeground();\n}\n\n// Auto-exit the menu applet after a period of inactivity\n// The values shown on the root menu are only a snapshot: they are not re-rendered while the menu remains open.\n// By exiting the menu, we prevent users mistakenly believing that the data will update.\nint32_t InkHUD::MenuApplet::runOnce()\n{\n    // runOnce's interval is pushed back when a button is pressed\n    // If we do actually run, it means no button input occurred within MENU_TIMEOUT_SEC,\n    // so we close the menu.\n    showPage(EXIT);\n\n    // Timer should disable after firing\n    // This is redundant, as onBackground() will also disable\n    return OSThread::disable();\n}\n\nstatic void applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode region)\n{\n    if (config.lora.region == region)\n        return;\n\n    config.lora.region = region;\n\n    auto changes = SEGMENT_CONFIG;\n\n#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI)\n    if (crypto) {\n        crypto->ensurePkiKeys(config.security, owner);\n    }\n#endif\n\n    config.lora.tx_enabled = true;\n\n    initRegion();\n\n    if (myRegion && myRegion->dutyCycle < 100) {\n        config.lora.ignore_mqtt = true;\n    }\n\n    if (strncmp(moduleConfig.mqtt.root, default_mqtt_root, strlen(default_mqtt_root)) == 0) {\n        sprintf(moduleConfig.mqtt.root, \"%s/%s\", default_mqtt_root, myRegion->name);\n        changes |= SEGMENT_MODULECONFIG;\n    }\n    // Notify UI that changes are being applied\n    InkHUD::InkHUD::getInstance()->notifyApplyingChanges();\n    service->reloadConfig(changes);\n\n    rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n}\n\nstatic void applyDeviceRole(meshtastic_Config_DeviceConfig_Role role)\n{\n    if (config.device.role == role)\n        return;\n\n    config.device.role = role;\n\n    nodeDB->saveToDisk(SEGMENT_CONFIG);\n\n    service->reloadConfig(SEGMENT_CONFIG);\n\n    // Notify UI that changes are being applied\n    InkHUD::InkHUD::getInstance()->notifyApplyingChanges();\n\n    rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n}\n\nstatic void applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset preset)\n{\n    if (config.lora.modem_preset == preset)\n        return;\n\n    config.lora.use_preset = true;\n    config.lora.modem_preset = preset;\n\n    nodeDB->saveToDisk(SEGMENT_CONFIG);\n    service->reloadConfig(SEGMENT_CONFIG);\n\n    // Notify UI that changes are being applied\n    InkHUD::InkHUD::getInstance()->notifyApplyingChanges();\n\n    rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n}\n\nstatic const char *getTimezoneLabelFromValue(const char *tzdef)\n{\n    if (!tzdef || !*tzdef)\n        return \"Unset\";\n\n    // Must match TIMEZONE menu entries\n    if (strcmp(tzdef, \"HST10\") == 0)\n        return \"US/Hawaii\";\n    if (strcmp(tzdef, \"AKST9AKDT,M3.2.0,M11.1.0\") == 0)\n        return \"US/Alaska\";\n    if (strcmp(tzdef, \"PST8PDT,M3.2.0,M11.1.0\") == 0)\n        return \"US/Pacific\";\n    if (strcmp(tzdef, \"MST7\") == 0)\n        return \"US/Arizona\";\n    if (strcmp(tzdef, \"MST7MDT,M3.2.0,M11.1.0\") == 0)\n        return \"US/Mountain\";\n    if (strcmp(tzdef, \"CST6CDT,M3.2.0,M11.1.0\") == 0)\n        return \"US/Central\";\n    if (strcmp(tzdef, \"EST5EDT,M3.2.0,M11.1.0\") == 0)\n        return \"US/Eastern\";\n    if (strcmp(tzdef, \"BRT3\") == 0)\n        return \"BR/Brasilia\";\n    if (strcmp(tzdef, \"UTC0\") == 0)\n        return \"UTC\";\n    if (strcmp(tzdef, \"GMT0BST,M3.5.0/1,M10.5.0\") == 0)\n        return \"EU/Western\";\n    if (strcmp(tzdef, \"CET-1CEST,M3.5.0,M10.5.0/3\") == 0)\n        return \"EU/Central\";\n    if (strcmp(tzdef, \"EET-2EEST,M3.5.0/3,M10.5.0/4\") == 0)\n        return \"EU/Eastern\";\n    if (strcmp(tzdef, \"IST-5:30\") == 0)\n        return \"Asia/Kolkata\";\n    if (strcmp(tzdef, \"HKT-8\") == 0)\n        return \"Asia/Hong Kong\";\n    if (strcmp(tzdef, \"AWST-8\") == 0)\n        return \"AU/AWST\";\n    if (strcmp(tzdef, \"ACST-9:30ACDT,M10.1.0,M4.1.0/3\") == 0)\n        return \"AU/ACST\";\n    if (strcmp(tzdef, \"AEST-10AEDT,M10.1.0,M4.1.0/3\") == 0)\n        return \"AU/AEST\";\n    if (strcmp(tzdef, \"NZST-12NZDT,M9.5.0,M4.1.0/3\") == 0)\n        return \"Pacific/NZ\";\n\n    return tzdef; // fallback for unknown/custom values\n}\n\nstatic void applyTimezone(const char *tz)\n{\n    if (!tz || strcmp(config.device.tzdef, tz) == 0)\n        return;\n\n    strncpy(config.device.tzdef, tz, sizeof(config.device.tzdef));\n    config.device.tzdef[sizeof(config.device.tzdef) - 1] = '\\0';\n\n    setenv(\"TZ\", config.device.tzdef, 1);\n\n    nodeDB->saveToDisk(SEGMENT_CONFIG);\n    service->reloadConfig(SEGMENT_CONFIG);\n}\n\n// Perform action for a menu item, then change page\n// Behaviors for MenuActions are defined here\nvoid InkHUD::MenuApplet::execute(MenuItem item)\n{\n    // Perform an action\n    // ------------------\n    switch (item.action) {\n\n    // Open a submenu without performing any action\n    // Also handles exit\n    case NO_ACTION:\n        if (currentPage == MenuPage::NODE_CONFIG_CHANNELS && item.nextPage == MenuPage::NODE_CONFIG_CHANNEL_DETAIL) {\n\n            // cursor - 1 because index 0 is \"Back\"\n            selectedChannelIndex = cursor - 1;\n        }\n        break;\n\n    case NEXT_TILE:\n        inkhud->nextTile();\n        // Unselect menu item after tile change\n        cursorShown = false;\n        cursor = 0;\n        break;\n\n    case SEND_PING:\n        service->refreshLocalMeshNode();\n        service->trySendPosition(NODENUM_BROADCAST, true);\n\n        // Force the next refresh to use FULL, to protect the display, as some users will probably spam this button\n        inkhud->forceUpdate(Drivers::EInk::UpdateTypes::FULL);\n        break;\n\n    case FREE_TEXT:\n        OSThread::enabled = false;\n        handleFreeText = true;\n        cm.freeTextItem.rawText.erase(); // clear the previous freetext message\n        freeTextMode = true;             // render input field instead of normal menu\n        // Open the on-screen keyboard only for full joystick devices\n        if (settings->joystick.enabled && !inkhud->twoWayRocker)\n            inkhud->openKeyboard();\n        break;\n\n    case STORE_CANNEDMESSAGE_SELECTION:\n        if (!settings->joystick.enabled || inkhud->twoWayRocker)\n            cm.selectedMessageItem = &cm.messageItems.at(cursor - 1); // Minus one: offset for the initial \"Send Ping\" entry\n        else\n            cm.selectedMessageItem = &cm.messageItems.at(cursor - 2); // Minus two: offset for the \"Send Ping\" and free text entry\n        break;\n\n    case SEND_CANNEDMESSAGE:\n        cm.selectedRecipientItem = &cm.recipientItems.at(cursor);\n        // send selected message\n        sendText(cm.selectedRecipientItem->dest, cm.selectedRecipientItem->channelIndex, cm.selectedMessageItem->rawText.c_str());\n        inkhud->forceUpdate(Drivers::EInk::UpdateTypes::FULL); // Next refresh should be FULL. Lots of button pressing to get here\n        break;\n\n    case ROTATE:\n        inkhud->rotate();\n        break;\n\n    case ALIGN_JOYSTICK:\n        inkhud->openAlignStick();\n        break;\n\n    case LAYOUT:\n        // Todo: smarter incrementing of tile count\n        settings->userTiles.count++;\n\n        if (settings->userTiles.count == 3) // Skip 3 tiles: not done yet\n            settings->userTiles.count++;\n\n        if (settings->userTiles.count > settings->userTiles.maxCount) // Loop around if tile count now too high\n            settings->userTiles.count = 1;\n\n        inkhud->updateLayout();\n        break;\n\n    case TOGGLE_APPLET:\n        if (item.checkState) {\n            *item.checkState = !(*item.checkState);\n            inkhud->updateAppletSelection();\n        }\n        break;\n\n    case TOGGLE_AUTOSHOW_APPLET:\n        // Toggle settings.userApplets.autoshow[] value, via MenuItem::checkState pointer set in populateAutoshowPage()\n        if (item.checkState) {\n            *item.checkState = !(*item.checkState);\n        }\n        break;\n\n    case TOGGLE_NOTIFICATIONS:\n        if (item.checkState) {\n            *item.checkState = !(*item.checkState);\n        }\n        break;\n\n    case TOGGLE_INVERT_COLOR:\n        if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED)\n            config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT;\n        else\n            config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_INVERTED;\n\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        break;\n\n    case SET_RECENTS: {\n        // cursor - 1 because index 0 is \"Back\"\n        const uint8_t index = cursor - 1;\n        constexpr uint8_t optionCount = sizeof(RECENTS_OPTIONS_MINUTES) / sizeof(RECENTS_OPTIONS_MINUTES[0]);\n        assert(index < optionCount);\n        settings->recentlyActiveSeconds = RECENTS_OPTIONS_MINUTES[index] * 60;\n        break;\n    }\n\n    case SHUTDOWN:\n        LOG_INFO(\"Shutting down from menu\");\n        shutdownAtMsec = millis();\n        // Menu is then sent to background via onShutdown\n        break;\n\n    case TOGGLE_BATTERY_ICON:\n        inkhud->toggleBatteryIcon();\n        break;\n\n    case TOGGLE_BACKLIGHT:\n        // Note: backlight is already on in this situation\n        // We're marking that it should *remain* on once menu closes\n        assert(backlight);\n        if (backlight->isLatched())\n            backlight->off();\n        else\n            backlight->latch();\n        break;\n\n    case TOGGLE_12H_CLOCK:\n        config.display.use_12h_clock = !config.display.use_12h_clock;\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        break;\n\n    case TOGGLE_GPS:\n#if !MESHTASTIC_EXCLUDE_GPS && HAS_GPS\n        if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_DISABLED) {\n            config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED;\n        } else if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) {\n            config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED;\n        } else {\n            // NOT_PRESENT do nothing\n            break;\n        }\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        service->reloadConfig(SEGMENT_CONFIG);\n#endif\n        break;\n\n    case ENABLE_BLUETOOTH:\n        // This helps users recover from a bad wifi config\n        LOG_INFO(\"Enabling Bluetooth\");\n        config.network.wifi_enabled = false;\n        config.bluetooth.enabled = true;\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        InkHUD::InkHUD::getInstance()->notifyApplyingChanges();\n        rebootAtMsec = millis() + 2000;\n        break;\n\n        // Power / Network (ESP32-only)\n#if defined(ARCH_ESP32)\n    case TOGGLE_POWER_SAVE:\n        config.power.is_power_saving = !config.power.is_power_saving;\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        InkHUD::InkHUD::getInstance()->notifyApplyingChanges();\n        rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        break;\n\n    case TOGGLE_WIFI:\n        config.network.wifi_enabled = !config.network.wifi_enabled;\n\n        if (config.network.wifi_enabled) {\n            // Switch behavior: WiFi ON forces Bluetooth OFF\n            config.bluetooth.enabled = false;\n        }\n\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        InkHUD::InkHUD::getInstance()->notifyApplyingChanges();\n        rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        break;\n#endif\n    // ADC Calibration\n    case CALIBRATE_ADC: {\n        // Read current measured voltage\n        float measuredV = powerStatus->getBatteryVoltageMv() / 1000.0f;\n\n        // Sanity check\n        if (measuredV < 3.0f || measuredV > 4.5f) {\n            LOG_WARN(\"ADC calibration aborted, unreasonable voltage: %.2fV\", measuredV);\n            break;\n        }\n\n        // Determine the base multiplier currently in effect\n        float baseMult = 0.0f;\n\n        if (config.power.adc_multiplier_override > 0.0f) {\n            baseMult = config.power.adc_multiplier_override;\n        }\n#ifdef ADC_MULTIPLIER\n        else {\n            baseMult = ADC_MULTIPLIER;\n        }\n#endif\n\n        if (baseMult <= 0.0f) {\n            LOG_WARN(\"ADC calibration failed: no base multiplier\");\n            break;\n        }\n\n        // Target voltage considered 100% by UI\n        constexpr float TARGET_VOLTAGE = 4.19f;\n\n        // Calculate new multiplier\n        float newMult = baseMult * (TARGET_VOLTAGE / measuredV);\n\n        config.power.adc_multiplier_override = newMult;\n\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n\n        LOG_INFO(\"ADC calibrated: measured=%.3fV base=%.4f new=%.4f\", measuredV, baseMult, newMult);\n\n        break;\n    }\n\n    // Display\n    case TOGGLE_DISPLAY_UNITS:\n        if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL)\n            config.display.units = meshtastic_Config_DisplayConfig_DisplayUnits_METRIC;\n        else\n            config.display.units = meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL;\n\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        break;\n\n    // Bluetooth\n    case TOGGLE_BLUETOOTH:\n        config.bluetooth.enabled = !config.bluetooth.enabled;\n\n        if (config.bluetooth.enabled) {\n            // Switch behavior: Bluetooth ON forces WiFi OFF\n            config.network.wifi_enabled = false;\n        }\n\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        InkHUD::InkHUD::getInstance()->notifyApplyingChanges();\n        rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        break;\n\n    case TOGGLE_BLUETOOTH_PAIR_MODE:\n        config.bluetooth.fixed_pin = !config.bluetooth.fixed_pin;\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        break;\n\n    // Regions\n    case SET_REGION_US:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n        break;\n\n    case SET_REGION_EU_868:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n        break;\n\n    case SET_REGION_EU_433:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_433);\n        break;\n\n    case SET_REGION_CN:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_CN);\n        break;\n\n    case SET_REGION_JP:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_JP);\n        break;\n\n    case SET_REGION_ANZ:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_ANZ);\n        break;\n    case SET_REGION_KR:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_KR);\n        break;\n\n    case SET_REGION_TW:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_TW);\n        break;\n\n    case SET_REGION_RU:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_RU);\n        break;\n\n    case SET_REGION_IN:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_IN);\n        break;\n\n    case SET_REGION_NZ_865:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_NZ_865);\n        break;\n\n    case SET_REGION_TH:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_TH);\n        break;\n\n    case SET_REGION_LORA_24:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_LORA_24);\n        break;\n\n    case SET_REGION_UA_433:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_UA_433);\n        break;\n\n    case SET_REGION_UA_868:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_UA_868);\n        break;\n\n    case SET_REGION_MY_433:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_MY_433);\n        break;\n\n    case SET_REGION_MY_919:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_MY_919);\n        break;\n\n    case SET_REGION_SG_923:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_SG_923);\n        break;\n\n    case SET_REGION_PH_433:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_PH_433);\n        break;\n\n    case SET_REGION_PH_868:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_PH_868);\n        break;\n\n    case SET_REGION_PH_915:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_PH_915);\n        break;\n\n    case SET_REGION_ANZ_433:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_ANZ_433);\n        break;\n\n    case SET_REGION_KZ_433:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_KZ_433);\n        break;\n\n    case SET_REGION_KZ_863:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_KZ_863);\n        break;\n\n    case SET_REGION_NP_865:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_NP_865);\n        break;\n\n    case SET_REGION_BR_902:\n        applyLoRaRegion(meshtastic_Config_LoRaConfig_RegionCode_BR_902);\n        break;\n\n    // Roles\n    case SET_ROLE_CLIENT:\n        applyDeviceRole(meshtastic_Config_DeviceConfig_Role_CLIENT);\n        break;\n\n    case SET_ROLE_CLIENT_MUTE:\n        applyDeviceRole(meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE);\n        break;\n\n    case SET_ROLE_ROUTER:\n        applyDeviceRole(meshtastic_Config_DeviceConfig_Role_ROUTER);\n        break;\n\n    case SET_ROLE_REPEATER:\n        applyDeviceRole(meshtastic_Config_DeviceConfig_Role_REPEATER);\n        break;\n\n    // Presets\n    case SET_PRESET_LONG_SLOW:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW);\n        break;\n\n    case SET_PRESET_LONG_MODERATE:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE);\n        break;\n\n    case SET_PRESET_LONG_FAST:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST);\n        break;\n\n    case SET_PRESET_MEDIUM_SLOW:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW);\n        break;\n\n    case SET_PRESET_MEDIUM_FAST:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST);\n        break;\n\n    case SET_PRESET_SHORT_SLOW:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW);\n        break;\n\n    case SET_PRESET_SHORT_FAST:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST);\n        break;\n\n    case SET_PRESET_SHORT_TURBO:\n        applyLoRaPreset(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO);\n        break;\n\n    // Timezones\n    case SET_TZ_US_HAWAII:\n        applyTimezone(\"HST10\");\n        break;\n\n    case SET_TZ_US_ALASKA:\n        applyTimezone(\"AKST9AKDT,M3.2.0,M11.1.0\");\n        break;\n\n    case SET_TZ_US_PACIFIC:\n        applyTimezone(\"PST8PDT,M3.2.0,M11.1.0\");\n        break;\n\n    case SET_TZ_US_ARIZONA:\n        applyTimezone(\"MST7\");\n        break;\n\n    case SET_TZ_US_MOUNTAIN:\n        applyTimezone(\"MST7MDT,M3.2.0,M11.1.0\");\n        break;\n\n    case SET_TZ_US_CENTRAL:\n        applyTimezone(\"CST6CDT,M3.2.0,M11.1.0\");\n        break;\n\n    case SET_TZ_US_EASTERN:\n        applyTimezone(\"EST5EDT,M3.2.0,M11.1.0\");\n        break;\n\n    case SET_TZ_BR_BRAZILIA:\n        applyTimezone(\"BRT3\");\n        break;\n\n    case SET_TZ_UTC:\n        applyTimezone(\"UTC0\");\n        break;\n\n    case SET_TZ_EU_WESTERN:\n        applyTimezone(\"GMT0BST,M3.5.0/1,M10.5.0\");\n        break;\n\n    case SET_TZ_EU_CENTRAL:\n        applyTimezone(\"CET-1CEST,M3.5.0,M10.5.0/3\");\n        break;\n\n    case SET_TZ_EU_EASTERN:\n        applyTimezone(\"EET-2EEST,M3.5.0/3,M10.5.0/4\");\n        break;\n\n    case SET_TZ_ASIA_KOLKATA:\n        applyTimezone(\"IST-5:30\");\n        break;\n\n    case SET_TZ_ASIA_HONG_KONG:\n        applyTimezone(\"HKT-8\");\n        break;\n\n    case SET_TZ_AU_AWST:\n        applyTimezone(\"AWST-8\");\n        break;\n\n    case SET_TZ_AU_ACST:\n        applyTimezone(\"ACST-9:30ACDT,M10.1.0,M4.1.0/3\");\n        break;\n\n    case SET_TZ_AU_AEST:\n        applyTimezone(\"AEST-10AEDT,M10.1.0,M4.1.0/3\");\n        break;\n\n    case SET_TZ_PACIFIC_NZ:\n        applyTimezone(\"NZST-12NZDT,M9.5.0,M4.1.0/3\");\n        break;\n\n    // Channels\n    case TOGGLE_CHANNEL_UPLINK: {\n        auto &ch = channels.getByIndex(selectedChannelIndex);\n        ch.settings.uplink_enabled = !ch.settings.uplink_enabled;\n        nodeDB->saveToDisk(SEGMENT_CHANNELS);\n        service->reloadConfig(SEGMENT_CHANNELS);\n        break;\n    }\n\n    case TOGGLE_CHANNEL_DOWNLINK: {\n        auto &ch = channels.getByIndex(selectedChannelIndex);\n        ch.settings.downlink_enabled = !ch.settings.downlink_enabled;\n        nodeDB->saveToDisk(SEGMENT_CHANNELS);\n        service->reloadConfig(SEGMENT_CHANNELS);\n        break;\n    }\n\n    case TOGGLE_CHANNEL_POSITION: {\n        auto &ch = channels.getByIndex(selectedChannelIndex);\n\n        if (!ch.settings.has_module_settings)\n            ch.settings.has_module_settings = true;\n\n        if (ch.settings.module_settings.position_precision > 0)\n            ch.settings.module_settings.position_precision = 0;\n        else\n            ch.settings.module_settings.position_precision = 13; // default\n\n        nodeDB->saveToDisk(SEGMENT_CHANNELS);\n        service->reloadConfig(SEGMENT_CHANNELS);\n        break;\n    }\n\n    case SET_CHANNEL_PRECISION: {\n        auto &ch = channels.getByIndex(selectedChannelIndex);\n\n        if (!ch.settings.has_module_settings)\n            ch.settings.has_module_settings = true;\n\n        // Cursor - 1 because of \"Back\"\n        uint8_t index = cursor - 1;\n\n        constexpr uint8_t optionCount = sizeof(POSITION_PRECISION_OPTIONS) / sizeof(POSITION_PRECISION_OPTIONS[0]);\n\n        if (index < optionCount) {\n            ch.settings.module_settings.position_precision = POSITION_PRECISION_OPTIONS[index].value;\n        }\n\n        nodeDB->saveToDisk(SEGMENT_CHANNELS);\n        service->reloadConfig(SEGMENT_CHANNELS);\n        break;\n    }\n\n    case RESET_NODEDB_ALL:\n        InkHUD::getInstance()->notifyApplyingChanges();\n        nodeDB->resetNodes();\n        rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        break;\n\n    case RESET_NODEDB_KEEP_FAVORITES:\n        InkHUD::getInstance()->notifyApplyingChanges();\n        nodeDB->resetNodes(1);\n        rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        break;\n\n    default:\n        LOG_WARN(\"Action not implemented\");\n    }\n\n    // Move to next page, as defined for the MenuItem\n    showPage(item.nextPage);\n}\n\n// Display a new page of MenuItems\n// May reload same page, or exit menu applet entirely\n// Fills the MenuApplet::items vector\nvoid InkHUD::MenuApplet::showPage(MenuPage page)\n{\n    items.clear();\n    items.shrink_to_fit();\n    nodeConfigLabels.clear();\n\n    switch (page) {\n    case ROOT:\n        previousPage = MenuPage::EXIT;\n        // Optional: next applet\n        if (settings->optionalMenuItems.nextTile && settings->userTiles.count > 1)\n            items.push_back(MenuItem(\"Next Tile\", MenuAction::NEXT_TILE, MenuPage::ROOT)); // Only if multiple applets shown\n\n        items.push_back(MenuItem(\"Send\", MenuPage::SEND));\n        items.push_back(MenuItem(\"Options\", MenuPage::OPTIONS));\n        // items.push_back(MenuItem(\"Display Off\", MenuPage::EXIT)); // TODO\n        items.push_back(MenuItem(\"Node Config\", MenuPage::NODE_CONFIG));\n        items.push_back(MenuItem(\"Save & Shut Down\", MenuAction::SHUTDOWN));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case SEND:\n        populateSendPage();\n        previousPage = MenuPage::ROOT;\n        break;\n\n    case CANNEDMESSAGE_RECIPIENT:\n        populateRecipientPage();\n        previousPage = MenuPage::SEND;\n        break;\n\n    case OPTIONS:\n        previousPage = MenuPage::ROOT;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        // Optional: backlight\n        if (settings->optionalMenuItems.backlight)\n            items.push_back(MenuItem(backlight->isLatched() ? \"Backlight Off\" : \"Keep Backlight On\", // Label\n                                     MenuAction::TOGGLE_BACKLIGHT,                                   // Action\n                                     MenuPage::EXIT                                                  // Exit once complete\n                                     ));\n\n        // Options Toggles\n        items.push_back(MenuItem(\"Applets\", MenuPage::APPLETS));\n        items.push_back(MenuItem(\"Auto-show\", MenuPage::AUTOSHOW));\n        items.push_back(MenuItem(\"Recents Duration\", MenuPage::RECENTS));\n        if (settings->userTiles.maxCount > 1)\n            items.push_back(MenuItem(\"Layout\", MenuAction::LAYOUT, MenuPage::OPTIONS));\n        items.push_back(MenuItem(\"Rotate\", MenuAction::ROTATE, MenuPage::OPTIONS));\n        if (settings->joystick.enabled && !inkhud->twoWayRocker)\n            items.push_back(MenuItem(\"Align Joystick\", MenuAction::ALIGN_JOYSTICK, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Notifications\", MenuAction::TOGGLE_NOTIFICATIONS, MenuPage::OPTIONS,\n                                 &settings->optionalFeatures.notifications));\n        items.push_back(MenuItem(\"Battery Icon\", MenuAction::TOGGLE_BATTERY_ICON, MenuPage::OPTIONS,\n                                 &settings->optionalFeatures.batteryIcon));\n        invertedColors = (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED);\n        items.push_back(MenuItem(\"Invert Color\", MenuAction::TOGGLE_INVERT_COLOR, MenuPage::OPTIONS, &invertedColors));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case APPLETS:\n        previousPage = MenuPage::OPTIONS;\n        populateAppletPage(); // must be first\n        items.insert(items.begin(), MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case AUTOSHOW:\n        previousPage = MenuPage::OPTIONS;\n        populateAutoshowPage(); // must be first\n        items.insert(items.begin(), MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case RECENTS:\n        previousPage = MenuPage::OPTIONS;\n        populateRecentsPage(); // builds only the options\n        items.insert(items.begin(), MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case NODE_CONFIG:\n        previousPage = MenuPage::ROOT;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        // Radio Config Section\n        items.push_back(MenuItem::Header(\"Radio Config\"));\n        items.push_back(MenuItem(\"LoRa\", MenuPage::NODE_CONFIG_LORA));\n        items.push_back(MenuItem(\"Channel\", MenuPage::NODE_CONFIG_CHANNELS));\n        // Device Config Section\n        items.push_back(MenuItem::Header(\"Device Config\"));\n        items.push_back(MenuItem(\"Device\", MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"Position\", MenuPage::NODE_CONFIG_POSITION));\n        items.push_back(MenuItem(\"Power\", MenuPage::NODE_CONFIG_POWER));\n#if defined(ARCH_ESP32)\n        items.push_back(MenuItem(\"Network\", MenuPage::NODE_CONFIG_NETWORK));\n#endif\n        items.push_back(MenuItem(\"Display\", MenuPage::NODE_CONFIG_DISPLAY));\n        items.push_back(MenuItem(\"Bluetooth\", MenuPage::NODE_CONFIG_BLUETOOTH));\n\n        // Administration Section\n        items.push_back(MenuItem::Header(\"Administration\"));\n        items.push_back(MenuItem(\"Reset NodeDB\", MenuPage::NODE_CONFIG_ADMIN_RESET));\n\n        // Exit\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case NODE_CONFIG_DEVICE: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        const char *role = DisplayFormatters::getDeviceRole(config.device.role);\n        nodeConfigLabels.emplace_back(\"Role: \" + std::string(role));\n        items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_DEVICE_ROLE));\n\n        const char *tzLabel = getTimezoneLabelFromValue(config.device.tzdef);\n        nodeConfigLabels.emplace_back(\"Timezone: \" + std::string(tzLabel));\n        items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::TIMEZONE));\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_POSITION: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n#if !MESHTASTIC_EXCLUDE_GPS && HAS_GPS\n        const auto mode = config.position.gps_mode;\n        if (mode == meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT) {\n            items.push_back(MenuItem(\"GPS None\", MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_POSITION));\n        } else {\n            gpsEnabled = (mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED);\n            items.push_back(MenuItem(\"GPS\", MenuAction::TOGGLE_GPS, MenuPage::NODE_CONFIG_POSITION, &gpsEnabled));\n        }\n#endif\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_POWER: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n#if defined(ARCH_ESP32)\n        items.push_back(MenuItem(\"Powersave\", MenuAction::TOGGLE_POWER_SAVE, MenuPage::EXIT, &config.power.is_power_saving));\n#endif\n        // ADC Multiplier\n        float effectiveMult = 0.0f;\n\n        // User override always shows if it exists\n        if (config.power.adc_multiplier_override > 0.0f) {\n            effectiveMult = config.power.adc_multiplier_override;\n        }\n#ifdef ADC_MULTIPLIER\n        else {\n            // Fallback to variant defined\n            effectiveMult = ADC_MULTIPLIER;\n        }\n#endif\n\n        // Only show if we actually have a value\n        if (effectiveMult > 0.0f) {\n            char buf[32];\n            snprintf(buf, sizeof(buf), \"ADC Mult: %.3f\", effectiveMult);\n            nodeConfigLabels.emplace_back(buf);\n\n            items.push_back(\n                MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_POWER_ADC_CAL));\n        }\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_POWER_ADC_CAL: {\n        previousPage = MenuPage::NODE_CONFIG_POWER;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        // Instruction text (header-style, non-selectable)\n        items.push_back(MenuItem::Header(\"Run on full charge Only\"));\n\n        // Action\n        items.push_back(MenuItem(\"Calibrate ADC\", MenuAction::CALIBRATE_ADC, MenuPage::NODE_CONFIG_POWER));\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_NETWORK: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        const char *wifiLabel = config.network.wifi_enabled ? \"WiFi: On\" : \"WiFi: Off\";\n\n        items.push_back(MenuItem(wifiLabel, MenuAction::TOGGLE_WIFI, MenuPage::EXIT));\n\n#if HAS_WIFI && defined(ARCH_ESP32)\n        if (config.network.wifi_enabled) {\n\n            // Status\n            if (WiFi.status() == WL_CONNECTED) {\n                nodeConfigLabels.emplace_back(\"Status: Connected\");\n            } else {\n                nodeConfigLabels.emplace_back(\"Status: Not Connected\");\n            }\n            items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_NETWORK));\n\n            // Signal\n            if (WiFi.status() == WL_CONNECTED) {\n                int rssi = WiFi.RSSI();\n                int quality = constrain(2 * (rssi + 100), 0, 100);\n\n                char sigBuf[32];\n                snprintf(sigBuf, sizeof(sigBuf), \"Signal: %d%%\", quality);\n                nodeConfigLabels.emplace_back(sigBuf);\n                items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_NETWORK));\n\n                char ipBuf[64];\n                snprintf(ipBuf, sizeof(ipBuf), \"IP: %s\", WiFi.localIP().toString().c_str());\n                nodeConfigLabels.emplace_back(ipBuf);\n                items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_NETWORK));\n            }\n\n            // SSID\n            if (config.network.wifi_ssid && strlen(config.network.wifi_ssid) > 0) {\n                std::string ssidLabel = \"SSID: \";\n                ssidLabel += config.network.wifi_ssid;\n                nodeConfigLabels.emplace_back(ssidLabel);\n                items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_NETWORK));\n            }\n\n            // Hostname\n            const char *host = WiFi.getHostname();\n            if (host && strlen(host) > 0) {\n                std::string hostLabel = \"Host: \";\n                hostLabel += host;\n                nodeConfigLabels.emplace_back(hostLabel);\n                items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_NETWORK));\n            }\n        }\n#endif\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_DISPLAY: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        items.push_back(MenuItem(\"12-Hour Clock\", MenuAction::TOGGLE_12H_CLOCK, MenuPage::NODE_CONFIG_DISPLAY,\n                                 &config.display.use_12h_clock));\n\n        const char *unitsLabel =\n            (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) ? \"Units: Imperial\" : \"Units: Metric\";\n\n        items.push_back(MenuItem(unitsLabel, MenuAction::TOGGLE_DISPLAY_UNITS, MenuPage::NODE_CONFIG_DISPLAY));\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_BLUETOOTH: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        const char *btLabel = config.bluetooth.enabled ? \"Bluetooth: On\" : \"Bluetooth: Off\";\n        items.push_back(MenuItem(btLabel, MenuAction::TOGGLE_BLUETOOTH, MenuPage::EXIT));\n\n        const char *pairLabel = config.bluetooth.fixed_pin ? \"Pair Mode: Fixed\" : \"Pair Mode: Random\";\n        items.push_back(MenuItem(pairLabel, MenuAction::TOGGLE_BLUETOOTH_PAIR_MODE, MenuPage::NODE_CONFIG_BLUETOOTH));\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_LORA: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        const char *region = myRegion ? myRegion->name : \"Unset\";\n        nodeConfigLabels.emplace_back(\"Region: \" + std::string(region));\n        items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::REGION));\n\n        const char *preset =\n            DisplayFormatters::getModemPresetDisplayName(config.lora.modem_preset, false, config.lora.use_preset);\n        nodeConfigLabels.emplace_back(\"Preset: \" + std::string(preset));\n        items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_PRESET));\n\n        char freqBuf[32];\n        float freq = RadioLibInterface::instance->getFreq();\n        snprintf(freqBuf, sizeof(freqBuf), \"Freq: %.3f MHz\", freq);\n        nodeConfigLabels.emplace_back(freqBuf);\n        items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_LORA));\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_CHANNELS: {\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        for (uint8_t i = 0; i < MAX_NUM_CHANNELS; i++) {\n            const meshtastic_Channel &ch = channels.getByIndex(i);\n\n            if (!ch.has_settings)\n                continue;\n\n            if (ch.role == meshtastic_Channel_Role_DISABLED)\n                continue;\n\n            std::string label = \"#\";\n\n            if (ch.role == meshtastic_Channel_Role_PRIMARY) {\n                label += \"Primary\";\n            } else if (strlen(ch.settings.name) > 0) {\n                label += parse(ch.settings.name);\n            } else {\n                label += \"Channel\" + to_string(i + 1);\n            }\n\n            nodeConfigLabels.push_back(label);\n            items.push_back(\n                MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_CHANNEL_DETAIL));\n        }\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_CHANNEL_DETAIL: {\n        previousPage = MenuPage::NODE_CONFIG_CHANNELS;\n        items.push_back(MenuItem(\"Back\", previousPage));\n\n        meshtastic_Channel &ch = channels.getByIndex(selectedChannelIndex);\n\n        // Name (read-only)\n        const char *name = strlen(ch.settings.name) > 0 ? ch.settings.name : \"Unnamed\";\n        nodeConfigLabels.emplace_back(\"Ch: \" + parse(name));\n        items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_CHANNEL_DETAIL));\n\n        // Uplink\n        items.push_back(MenuItem(\"Uplink\", MenuAction::TOGGLE_CHANNEL_UPLINK, MenuPage::NODE_CONFIG_CHANNEL_DETAIL,\n                                 &ch.settings.uplink_enabled));\n\n        items.push_back(MenuItem(\"Downlink\", MenuAction::TOGGLE_CHANNEL_DOWNLINK, MenuPage::NODE_CONFIG_CHANNEL_DETAIL,\n                                 &ch.settings.downlink_enabled));\n\n        // Position\n        channelPositionEnabled = ch.settings.has_module_settings && ch.settings.module_settings.position_precision > 0;\n\n        items.push_back(MenuItem(\"Position\", MenuAction::TOGGLE_CHANNEL_POSITION, MenuPage::NODE_CONFIG_CHANNEL_DETAIL,\n                                 &channelPositionEnabled));\n\n        // Precision\n        if (channelPositionEnabled) {\n\n            std::string precisionLabel = \"Unknown\";\n\n            for (const auto &opt : POSITION_PRECISION_OPTIONS) {\n                if (opt.value == ch.settings.module_settings.position_precision) {\n                    precisionLabel = (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL)\n                                         ? opt.imperial\n                                         : opt.metric;\n                    break;\n                }\n            }\n            nodeConfigLabels.emplace_back(\"Precision: \" + precisionLabel);\n            items.push_back(\n                MenuItem(nodeConfigLabels.back().c_str(), MenuAction::NO_ACTION, MenuPage::NODE_CONFIG_CHANNEL_PRECISION));\n        }\n\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_CHANNEL_PRECISION: {\n        previousPage = MenuPage::NODE_CONFIG_CHANNEL_DETAIL;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        const meshtastic_Channel &ch = channels.getByIndex(selectedChannelIndex);\n        if (!ch.settings.has_module_settings || ch.settings.module_settings.position_precision == 0) {\n            items.push_back(MenuItem(\"Position is Off\", MenuPage::NODE_CONFIG_CHANNEL_DETAIL));\n            break;\n        }\n        constexpr uint8_t optionCount = sizeof(POSITION_PRECISION_OPTIONS) / sizeof(POSITION_PRECISION_OPTIONS[0]);\n        for (uint8_t i = 0; i < optionCount; i++) {\n            const auto &opt = POSITION_PRECISION_OPTIONS[i];\n            const char *label =\n                (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) ? opt.imperial : opt.metric;\n            nodeConfigLabels.emplace_back(label);\n\n            items.push_back(MenuItem(nodeConfigLabels.back().c_str(), MenuAction::SET_CHANNEL_PRECISION,\n                                     MenuPage::NODE_CONFIG_CHANNEL_DETAIL));\n        }\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case NODE_CONFIG_DEVICE_ROLE: {\n        previousPage = MenuPage::NODE_CONFIG_DEVICE;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"Client\", MenuAction::SET_ROLE_CLIENT, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Client Mute\", MenuAction::SET_ROLE_CLIENT_MUTE, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Router\", MenuAction::SET_ROLE_ROUTER, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Repeater\", MenuAction::SET_ROLE_REPEATER, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n\n    case TIMEZONE:\n        previousPage = MenuPage::NODE_CONFIG_DEVICE;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"US/Hawaii\", SET_TZ_US_HAWAII, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"US/Alaska\", SET_TZ_US_ALASKA, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"US/Pacific\", SET_TZ_US_PACIFIC, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"US/Arizona\", SET_TZ_US_ARIZONA, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"US/Mountain\", SET_TZ_US_MOUNTAIN, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"US/Central\", SET_TZ_US_CENTRAL, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"US/Eastern\", SET_TZ_US_EASTERN, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"BR/Brasilia\", SET_TZ_BR_BRAZILIA, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"UTC\", SET_TZ_UTC, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"EU/Western\", SET_TZ_EU_WESTERN, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"EU/Central\", SET_TZ_EU_CENTRAL, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"EU/Eastern\", SET_TZ_EU_EASTERN, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"Asia/Kolkata\", SET_TZ_ASIA_KOLKATA, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"Asia/Hong Kong\", SET_TZ_ASIA_HONG_KONG, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"AU/AWST\", SET_TZ_AU_AWST, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"AU/ACST\", SET_TZ_AU_ACST, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"AU/AEST\", SET_TZ_AU_AEST, MenuPage::NODE_CONFIG_DEVICE));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case REGION:\n        previousPage = MenuPage::NODE_CONFIG_LORA;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"US\", MenuAction::SET_REGION_US, MenuPage::EXIT));\n        items.push_back(MenuItem(\"EU 868\", MenuAction::SET_REGION_EU_868, MenuPage::EXIT));\n        items.push_back(MenuItem(\"EU 433\", MenuAction::SET_REGION_EU_433, MenuPage::EXIT));\n        items.push_back(MenuItem(\"CN\", MenuAction::SET_REGION_CN, MenuPage::EXIT));\n        items.push_back(MenuItem(\"JP\", MenuAction::SET_REGION_JP, MenuPage::EXIT));\n        items.push_back(MenuItem(\"ANZ\", MenuAction::SET_REGION_ANZ, MenuPage::EXIT));\n        items.push_back(MenuItem(\"KR\", MenuAction::SET_REGION_KR, MenuPage::EXIT));\n        items.push_back(MenuItem(\"TW\", MenuAction::SET_REGION_TW, MenuPage::EXIT));\n        items.push_back(MenuItem(\"RU\", MenuAction::SET_REGION_RU, MenuPage::EXIT));\n        items.push_back(MenuItem(\"IN\", MenuAction::SET_REGION_IN, MenuPage::EXIT));\n        items.push_back(MenuItem(\"NZ 865\", MenuAction::SET_REGION_NZ_865, MenuPage::EXIT));\n        items.push_back(MenuItem(\"TH\", MenuAction::SET_REGION_TH, MenuPage::EXIT));\n        items.push_back(MenuItem(\"LoRa 2.4\", MenuAction::SET_REGION_LORA_24, MenuPage::EXIT));\n        items.push_back(MenuItem(\"UA 433\", MenuAction::SET_REGION_UA_433, MenuPage::EXIT));\n        items.push_back(MenuItem(\"UA 868\", MenuAction::SET_REGION_UA_868, MenuPage::EXIT));\n        items.push_back(MenuItem(\"MY 433\", MenuAction::SET_REGION_MY_433, MenuPage::EXIT));\n        items.push_back(MenuItem(\"MY 919\", MenuAction::SET_REGION_MY_919, MenuPage::EXIT));\n        items.push_back(MenuItem(\"SG 923\", MenuAction::SET_REGION_SG_923, MenuPage::EXIT));\n        items.push_back(MenuItem(\"PH 433\", MenuAction::SET_REGION_PH_433, MenuPage::EXIT));\n        items.push_back(MenuItem(\"PH 868\", MenuAction::SET_REGION_PH_868, MenuPage::EXIT));\n        items.push_back(MenuItem(\"PH 915\", MenuAction::SET_REGION_PH_915, MenuPage::EXIT));\n        items.push_back(MenuItem(\"ANZ 433\", MenuAction::SET_REGION_ANZ_433, MenuPage::EXIT));\n        items.push_back(MenuItem(\"KZ 433\", MenuAction::SET_REGION_KZ_433, MenuPage::EXIT));\n        items.push_back(MenuItem(\"KZ 863\", MenuAction::SET_REGION_KZ_863, MenuPage::EXIT));\n        items.push_back(MenuItem(\"NP 865\", MenuAction::SET_REGION_NP_865, MenuPage::EXIT));\n        items.push_back(MenuItem(\"BR 902\", MenuAction::SET_REGION_BR_902, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    case NODE_CONFIG_PRESET: {\n        previousPage = MenuPage::NODE_CONFIG_LORA;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"Long Moderate\", MenuAction::SET_PRESET_LONG_MODERATE, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Long Fast\", MenuAction::SET_PRESET_LONG_FAST, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Medium Slow\", MenuAction::SET_PRESET_MEDIUM_SLOW, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Medium Fast\", MenuAction::SET_PRESET_MEDIUM_FAST, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Short Slow\", MenuAction::SET_PRESET_SHORT_SLOW, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Short Fast\", MenuAction::SET_PRESET_SHORT_FAST, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Short Turbo\", MenuAction::SET_PRESET_SHORT_TURBO, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n    }\n    // Administration Section\n    case NODE_CONFIG_ADMIN_RESET:\n        previousPage = MenuPage::NODE_CONFIG;\n        items.push_back(MenuItem(\"Back\", previousPage));\n        items.push_back(MenuItem(\"Reset All\", MenuAction::RESET_NODEDB_ALL, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Keep Favorites Only\", MenuAction::RESET_NODEDB_KEEP_FAVORITES, MenuPage::EXIT));\n        items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n        break;\n\n    // Exit\n    case EXIT:\n        sendToBackground(); // Menu applet dismissed, allow normal behavior to resume\n        break;\n\n    default:\n        LOG_WARN(\"Page not implemented\");\n    }\n\n    // Reset the cursor, unless reloading same page\n    // (or now out-of-bounds)\n    if (page != currentPage || cursor >= items.size()) {\n        cursor = 0;\n\n        // ROOT menu has special handling: unselected at first, to emphasise the system info panel\n        if (page == ROOT)\n            cursorShown = false;\n    }\n\n    // Ensure cursor never rests on a header\n    if (cursorShown) {\n        while (cursor < items.size() && items.at(cursor).isHeader) {\n            cursor++;\n        }\n        if (cursor >= items.size())\n            cursor = 0;\n    }\n\n    // Remember which page we are on now\n    currentPage = page;\n}\n\nvoid InkHUD::MenuApplet::onRender(bool full)\n{\n    // Free text mode draws a text input field and skips the normal rendering\n    if (freeTextMode) {\n        drawInputField(0, fontSmall.lineHeight(), X(1.0), Y(1.0) - fontSmall.lineHeight() - 1, cm.freeTextItem.rawText);\n        return;\n    }\n\n    if (items.size() == 0)\n        LOG_ERROR(\"Empty Menu\");\n\n    // Dimensions for the slots where we will draw menuItems\n    const float padding = 0.05;\n    const uint16_t itemH = fontSmall.lineHeight() * 1.6;\n    const int16_t selectInsetY = 2;\n    const int16_t itemW = width() - X(padding) - X(padding);\n    const int16_t itemL = X(padding);\n    const int16_t itemR = X(1 - padding);\n    int16_t itemT = 0; // Top (y px of current slot). Incremented as we draw. Adjusted to fit system info panel on ROOT menu.\n\n    // How many full menuItems will fit on screen\n    uint8_t slotCount = (height() - itemT) / itemH;\n\n    // System info panel at the top of the menu\n    // =========================================\n\n    uint16_t &siH = systemInfoPanelHeight;                   // System info - height. Calculated at onForeground\n    const uint8_t slotsObscured = ceilf(siH / (float)itemH); // How many slots are obscured by system info panel\n\n    // System info - top\n    // Remain at 0px, until cursor reaches bottom of screen, then begin to scroll off screen.\n    // This is the same behavior we expect from the non-root menus.\n    // Implementing this with the systemp panel is slightly annoying though,\n    // and required adding the MenuApplet::getSystemInfoPanelHeight method\n    int16_t siT;\n    if (cursor < slotCount - slotsObscured - 1) // (Minus 1: comparing zero based index with a count)\n        siT = 0;\n    else\n        siT = 0 - ((cursor - (slotCount - slotsObscured - 1)) * itemH);\n\n    // If showing ROOT menu,\n    // and the panel isn't yet scrolled off screen top\n    if (currentPage == ROOT) {\n        drawSystemInfoPanel(0, siT, width()); // Draw the panel.\n        itemT = max(siT + siH, 0);            // Offset the first menu entry, so menu starts below the system info panel\n    }\n\n    // Draw menu items\n    // ===================\n\n    // Which item will be drawn to the top-most slot?\n    // Initially, this is the item 0, but may increase once we begin scrolling\n    uint8_t firstItem;\n    if (cursor < slotCount)\n        firstItem = 0;\n    else\n        firstItem = cursor - (slotCount - 1);\n\n    // Which item will be drawn to the bottom-most slot?\n    // This may be beyond the slot-count, to draw a partially off-screen item below the bottom-most slow\n    // This may be less than the slot-count, if we are reaching the end of the menuItems\n    uint8_t lastItem = min((uint8_t)firstItem + slotCount, (uint8_t)items.size() - 1);\n\n    // -- Loop: draw each (visible) menu item --\n    for (uint8_t i = firstItem; i <= lastItem; i++) {\n\n        // Grab the menu item\n        MenuItem &item = items.at(i);\n\n        // Vertical center of this slot\n        int16_t center = itemT + (itemH / 2);\n\n        // Header (non-selectable section label)\n        if (item.isHeader) {\n            setFont(fontSmall);\n\n            // Header text (flush left)\n            printAt(itemL + X(padding), center, item.label, LEFT, MIDDLE);\n\n            // Subtle underline\n            int16_t underlineY = itemT + itemH - 2;\n            drawLine(itemL + X(padding), underlineY, itemR - X(padding), underlineY, BLACK);\n        } else {\n            // Box, if currently selected\n            if (cursorShown && i == cursor)\n                drawRect(itemL, itemT + selectInsetY, itemW, itemH - (selectInsetY * 2), BLACK);\n\n            // Indented normal item text\n            printAt(itemL + X(padding * 2), center, item.label, LEFT, MIDDLE);\n        }\n\n        // Checkbox, if relevant\n        if (item.checkState) {\n            const uint16_t cbWH = fontSmall.lineHeight();  // Checkbox: width / height\n            const int16_t cbL = itemR - X(padding) - cbWH; // Checkbox: left\n            const int16_t cbT = center - (cbWH / 2);       // Checkbox : top\n            // Checkbox ticked\n            if (*(item.checkState)) {\n                drawRect(cbL, cbT, cbWH, cbWH, BLACK);\n                // First point of tick: pen down\n                const int16_t t1Y = center;\n                const int16_t t1X = cbL + 3;\n                // Second point of tick: base\n                const int16_t t2Y = center + (cbWH / 2) - 2;\n                const int16_t t2X = cbL + (cbWH / 2);\n                // Third point of tick: end of tail\n                const int16_t t3Y = center - (cbWH / 2) - 2;\n                const int16_t t3X = cbL + cbWH + 2;\n                // Draw twice: faux bold\n                drawLine(t1X, t1Y, t2X, t2Y, BLACK);\n                drawLine(t2X, t2Y, t3X, t3Y, BLACK);\n                drawLine(t1X + 1, t1Y, t2X + 1, t2Y, BLACK);\n                drawLine(t2X + 1, t2Y, t3X + 1, t3Y, BLACK);\n            }\n            // Checkbox ticked\n            else\n                drawRect(cbL, cbT, cbWH, cbWH, BLACK);\n        }\n\n        // Increment the y value (top) as we go\n        itemT += itemH;\n    }\n}\n\nvoid InkHUD::MenuApplet::onButtonShortPress()\n{\n    if (!freeTextMode) {\n        // Push the auto-close timer back\n        OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n\n        if (!settings->joystick.enabled) {\n            if (!cursorShown) {\n                cursorShown = true;\n                // Select the first item that isn't a header\n                cursor = 0;\n                while (cursor < items.size() && items.at(cursor).isHeader) {\n                    cursor++;\n                }\n                if (cursor >= items.size()) {\n                    cursorShown = false;\n                    cursor = 0;\n                }\n            } else {\n                do {\n                    cursor = (cursor + 1) % items.size();\n                } while (items.at(cursor).isHeader);\n            }\n            requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n        } else {\n            if (cursorShown)\n                execute(items.at(cursor));\n            else\n                showPage(MenuPage::EXIT);\n            if (!wantsToRender())\n                requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n        }\n    }\n}\n\nvoid InkHUD::MenuApplet::onButtonLongPress()\n{\n    if (!freeTextMode) {\n        // Push the auto-close timer back\n        OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n\n        if (cursorShown)\n            execute(items.at(cursor));\n        else\n            showPage(MenuPage::EXIT); // Special case: Peek at root-menu; longpress again to close\n\n        // If we didn't already request a specialized update, when handling a menu action,\n        // then perform the usual fast update.\n        // FAST keeps things responsive: important because we're dealing with user input\n        if (!wantsToRender())\n            requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n    }\n}\n\nvoid InkHUD::MenuApplet::onExitShort()\n{\n    // Exit the menu\n    showPage(MenuPage::EXIT);\n\n    requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n}\n\nvoid InkHUD::MenuApplet::onNavUp()\n{\n    if (!freeTextMode) {\n        OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n\n        if (!cursorShown) {\n            cursorShown = true;\n            // Select the last item that isn't a header\n            cursor = items.size() - 1;\n            while (items.at(cursor).isHeader) {\n                if (cursor == 0) {\n                    cursorShown = false;\n                    break;\n                }\n                cursor--;\n            }\n        } else {\n            do {\n                if (cursor == 0)\n                    cursor = items.size() - 1;\n                else\n                    cursor--;\n            } while (items.at(cursor).isHeader);\n        }\n\n        requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n    }\n}\n\nvoid InkHUD::MenuApplet::onNavDown()\n{\n    if (!freeTextMode) {\n        OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n\n        if (!cursorShown) {\n            cursorShown = true;\n            // Select the first item that isn't a header\n            cursor = 0;\n            while (cursor < items.size() && items.at(cursor).isHeader) {\n                cursor++;\n            }\n            if (cursor >= items.size()) {\n                cursorShown = false;\n                cursor = 0;\n            }\n        } else {\n            do {\n                cursor = (cursor + 1) % items.size();\n            } while (items.at(cursor).isHeader);\n        }\n\n        requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n    }\n}\n\nvoid InkHUD::MenuApplet::onNavLeft()\n{\n    if (!freeTextMode) {\n        OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n\n        // Go to the previous menu page\n        showPage(previousPage);\n        requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n    }\n}\n\nvoid InkHUD::MenuApplet::onNavRight()\n{\n    if (!freeTextMode) {\n        OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n        if (cursorShown)\n            execute(items.at(cursor));\n        if (!wantsToRender())\n            requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n    }\n}\n\nvoid InkHUD::MenuApplet::onFreeText(char c)\n{\n    if (cm.freeTextItem.rawText.length() >= menuTextLimit && c != '\\b')\n        return;\n    if (c == '\\b') {\n        if (!cm.freeTextItem.rawText.empty())\n            cm.freeTextItem.rawText.pop_back();\n    } else {\n        cm.freeTextItem.rawText += c;\n    }\n    requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n}\n\nvoid InkHUD::MenuApplet::onFreeTextDone()\n{\n    // Restart the auto-close timeout\n    OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n    OSThread::enabled = true;\n\n    handleFreeText = false;\n    freeTextMode = false;\n\n    if (!cm.freeTextItem.rawText.empty()) {\n        cm.selectedMessageItem = &cm.freeTextItem;\n        showPage(MenuPage::CANNEDMESSAGE_RECIPIENT);\n    }\n    requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n}\n\nvoid InkHUD::MenuApplet::onFreeTextCancel()\n{\n    // Restart the auto-close timeout\n    OSThread::setIntervalFromNow(MENU_TIMEOUT_SEC * 1000UL);\n    OSThread::enabled = true;\n\n    handleFreeText = false;\n    freeTextMode = false;\n\n    // Clear the free text message\n    cm.freeTextItem.rawText.erase();\n\n    requestUpdate(Drivers::EInk::UpdateTypes::FAST);\n}\n\n// Dynamically create MenuItem entries for activating / deactivating Applets, for the \"Applet Selection\" submenu\nvoid InkHUD::MenuApplet::populateAppletPage()\n{\n    assert(items.size() == 0);\n\n    for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n        const char *name = inkhud->userApplets.at(i)->name;\n        bool *isActive = &(settings->userApplets.active[i]);\n        items.push_back(MenuItem(name, MenuAction::TOGGLE_APPLET, MenuPage::APPLETS, isActive));\n    }\n}\n\n// Dynamically create MenuItem entries for selecting which applets will automatically come to foreground when they have new data\n// We only populate this menu page with applets which are actually active\n// We use the MenuItem::checkState pointer to toggle the setting in MenuApplet::execute. Bit of a hack, but convenient.\nvoid InkHUD::MenuApplet::populateAutoshowPage()\n{\n    assert(items.size() == 0);\n\n    for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n        // Only add a menu item if applet is active\n        if (settings->userApplets.active[i]) {\n            const char *name = inkhud->userApplets.at(i)->name;\n            bool *isActive = &(settings->userApplets.autoshow[i]);\n            items.push_back(MenuItem(name, MenuAction::TOGGLE_AUTOSHOW_APPLET, MenuPage::AUTOSHOW, isActive));\n        }\n    }\n}\n\n// Create MenuItem entries to select our definition of \"Recent\"\n// Controls how long data will remain in any \"Recents\" flavored applets\nvoid InkHUD::MenuApplet::populateRecentsPage()\n{\n    // How many values are shown for use to choose from\n    constexpr uint8_t optionCount = sizeof(RECENTS_OPTIONS_MINUTES) / sizeof(RECENTS_OPTIONS_MINUTES[0]);\n\n    // Create an entry for each item in RECENTS_OPTIONS_MINUTES array\n    // (Defined at top of this file)\n    for (uint8_t i = 0; i < optionCount; i++) {\n        std::string label = to_string(RECENTS_OPTIONS_MINUTES[i]) + \" mins\";\n        recentsSelected[i] = (settings->recentlyActiveSeconds == RECENTS_OPTIONS_MINUTES[i] * 60);\n        items.push_back(MenuItem(label.c_str(), MenuAction::SET_RECENTS, MenuPage::OPTIONS, &recentsSelected[i]));\n    }\n}\n\n// MenuItem entries for the \"send\" page\n// Dynamically creates menu items based on available canned messages\nvoid InkHUD::MenuApplet::populateSendPage()\n{\n    // Position / NodeInfo packet\n    items.push_back(MenuItem(\"Ping\", MenuAction::SEND_PING, MenuPage::EXIT));\n\n    // If joystick is available, include the Free Text option\n    if (settings->joystick.enabled && !inkhud->twoWayRocker)\n        items.push_back(MenuItem(\"Free Text\", MenuAction::FREE_TEXT, MenuPage::SEND));\n\n    // One menu item for each canned message\n    uint8_t count = cm.store->size();\n    for (uint8_t i = 0; i < count; i++) {\n        // Gather the information for this item\n        CannedMessages::MessageItem messageItem;\n        messageItem.rawText = cm.store->at(i);\n        messageItem.label = parse(messageItem.rawText);\n\n        // Store the item (until the menu closes)\n        cm.messageItems.push_back(messageItem);\n\n        // Create a menu item\n        const char *itemText = cm.messageItems.back().label.c_str();\n        items.push_back(MenuItem(itemText, MenuAction::STORE_CANNEDMESSAGE_SELECTION, MenuPage::CANNEDMESSAGE_RECIPIENT));\n    }\n\n    items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n}\n\n// Dynamically create MenuItem entries for possible canned message destinations\n// All available channels are shown\n// Favorite nodes are shown, provided we don't have an *excessive* amount\nvoid InkHUD::MenuApplet::populateRecipientPage()\n{\n    // Create recipient data (and menu items) for any channels\n    // --------------------------------------------------------\n\n    for (uint8_t i = 0; i < MAX_NUM_CHANNELS; i++) {\n        // Get the channel, and check if it's enabled\n        const meshtastic_Channel &channel = channels.getByIndex(i);\n        if (!channel.has_settings || channel.role == meshtastic_Channel_Role_DISABLED)\n            continue;\n\n        CannedMessages::RecipientItem r;\n\n        // Set index\n        r.channelIndex = channel.index;\n\n        // Set a label for the menu item\n        r.label = \"Ch \" + to_string(i) + \": \";\n        if (channel.role == meshtastic_Channel_Role_PRIMARY)\n            r.label += \"Primary\";\n        else\n            r.label += parse(channel.settings.name);\n\n        // Add to the list of recipients\n        cm.recipientItems.push_back(r);\n\n        // Add a menu item for this recipient\n        const char *itemText = cm.recipientItems.back().label.c_str();\n        items.push_back(MenuItem(itemText, SEND_CANNEDMESSAGE, MenuPage::EXIT));\n    }\n\n    // Create recipient data (and menu items) for favorite nodes\n    // ---------------------------------------------------------\n\n    uint32_t nodeCount = nodeDB->getNumMeshNodes();\n    uint32_t favoriteCount = 0;\n\n    // Count favorites\n    for (uint32_t i = 0; i < nodeCount; i++) {\n        if (nodeDB->getMeshNodeByIndex(i)->is_favorite)\n            favoriteCount++;\n    }\n\n    // Only add favorites if the number is reasonable\n    // Don't want some monstrous list that takes 100 clicks to reach exit\n    if (favoriteCount < 20) {\n        for (uint32_t i = 0; i < nodeCount; i++) {\n            meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n\n            // Skip node if not a favorite\n            if (!node->is_favorite)\n                continue;\n\n            CannedMessages::RecipientItem r;\n\n            r.dest = node->num;\n            r.channelIndex = nodeDB->getMeshNodeChannel(node->num); // Channel index only relevant if encrypted DM not possible(?)\n\n            // Set a label for the menu item\n            r.label = \"DM: \";\n            if (node->has_user)\n                r.label += parse(node->user.long_name);\n            else\n                r.label += hexifyNodeNum(node->num); // Unsure if it's possible to favorite a node without NodeInfo?\n\n            // Add to the list of recipients\n            cm.recipientItems.push_back(r);\n\n            // Add a menu item for this recipient\n            const char *itemText = cm.recipientItems.back().label.c_str();\n            items.push_back(MenuItem(itemText, SEND_CANNEDMESSAGE, MenuPage::EXIT));\n        }\n    }\n\n    items.push_back(MenuItem(\"Exit\", MenuPage::EXIT));\n}\n\nvoid InkHUD::MenuApplet::drawInputField(uint16_t left, uint16_t top, uint16_t width, uint16_t height, const std::string &text)\n{\n    setFont(fontSmall);\n    uint16_t wrapMaxH = 0;\n\n    // Draw the text, input box, and cursor\n    // Adjusting the box for screen height\n    while (wrapMaxH < height - fontSmall.lineHeight()) {\n        wrapMaxH += fontSmall.lineHeight();\n    }\n\n    // If the text is so long that it goes outside of the input box, the text is actually rendered off screen.\n    uint32_t textHeight = getWrappedTextHeight(0, width - 5, text);\n    if (!text.empty()) {\n        uint16_t textPadding = X(1.0) > Y(1.0) ? wrapMaxH - textHeight : wrapMaxH - textHeight + 1;\n        if (textHeight > wrapMaxH)\n            printWrapped(2, textPadding, width - 5, text);\n        else\n            printWrapped(2, top + 2, width - 5, text);\n    }\n\n    uint16_t textCursorX = text.empty() ? 1 : getCursorX();\n    uint16_t textCursorY = text.empty() ? fontSmall.lineHeight() + 2 : getCursorY() - fontSmall.lineHeight() + 3;\n\n    if (textCursorX + 1 > width - 5) {\n        textCursorX = getCursorX() - width + 5;\n        textCursorY += fontSmall.lineHeight();\n    }\n\n    fillRect(textCursorX + 1, textCursorY, 1, fontSmall.lineHeight(), BLACK);\n\n    // A white rectangle clears the top part of the screen for any text that's printed beyond the input box\n    fillRect(0, 0, X(1.0), top, WHITE);\n\n    // Draw character limit\n    std::string ftlen = std::to_string(text.length()) + \"/\" + to_string(menuTextLimit);\n    uint16_t textLen = getTextWidth(ftlen);\n    printAt(X(1.0) - textLen - 2, 0, ftlen);\n\n    // Draw the border\n    drawRect(0, top, width, wrapMaxH + 5, BLACK);\n}\n// Renders the panel shown at the top of the root menu.\n// Displays the clock, and several other pieces of instantaneous system info,\n// which we'd prefer not to have displayed in a normal applet, as they update too frequently.\nvoid InkHUD::MenuApplet::drawSystemInfoPanel(int16_t left, int16_t top, uint16_t width, uint16_t *renderedHeight)\n{\n    // Reset the height\n    // We'll add to this as we add elements\n    uint16_t height = 0;\n\n    // Clock (potentially)\n    // ====================\n    std::string clockString = getTimeString();\n    if (clockString.length() > 0) {\n        setFont(fontMedium);\n        printAt(width / 2, top, clockString, CENTER, TOP);\n\n        height += fontMedium.lineHeight();\n        height += fontMedium.lineHeight() * 0.1; // Padding below clock\n    }\n\n    // Stats\n    // ===================\n\n    setFont(fontSmall);\n\n    // Position of the label row for the system info\n    const int16_t labelT = top + height;\n    height += fontSmall.lineHeight() * 1.1; // Slightly increased spacing\n\n    // Position of the data row for the system info\n    const int16_t valT = top + height;\n    height += fontSmall.lineHeight() * 1.1; // Slightly increased spacing (between bottom line and divider)\n\n    // Position of divider between the info panel and the menu entries\n    const int16_t divY = top + height;\n    height += fontSmall.lineHeight() * 0.2; // Padding *below* the divider. (Above first menu item)\n\n    // Create a variable number of columns\n    // Either 3 or 4, depending on whether we have GPS\n    // Todo\n    constexpr uint8_t N_COL = 3;\n    int16_t colL[N_COL];\n    int16_t colC[N_COL];\n    int16_t colR[N_COL];\n    for (uint8_t i = 0; i < N_COL; i++) {\n        colL[i] = left + ((width / N_COL) * i);\n        colC[i] = colL[i] + ((width / N_COL) / 2);\n        colR[i] = colL[i] + (width / N_COL);\n    }\n\n    // Info blocks, left to right\n\n    // Voltage\n    float voltage = powerStatus->getBatteryVoltageMv() / 1000.0;\n    char voltageStr[6]; // \"XX.XV\"\n    sprintf(voltageStr, \"%.2fV\", voltage);\n    printAt(colC[0], labelT, \"Bat\", CENTER, TOP);\n    printAt(colC[0], valT, voltageStr, CENTER, TOP);\n\n    // Divider\n    for (int16_t y = valT; y <= divY; y += 3)\n        drawPixel(colR[0], y, BLACK);\n\n    // Channel Util\n    char chUtilStr[4]; // \"XX%\"\n    sprintf(chUtilStr, \"%2.f%%\", airTime->channelUtilizationPercent());\n    printAt(colC[1], labelT, \"Ch\", CENTER, TOP);\n    printAt(colC[1], valT, chUtilStr, CENTER, TOP);\n\n    // Divider\n    for (int16_t y = valT; y <= divY; y += 3)\n        drawPixel(colR[1], y, BLACK);\n\n    // Duty Cycle (AirTimeTx)\n    char dutyUtilStr[4]; // \"XX%\"\n    sprintf(dutyUtilStr, \"%2.f%%\", airTime->utilizationTXPercent());\n    printAt(colC[2], labelT, \"Duty\", CENTER, TOP);\n    printAt(colC[2], valT, dutyUtilStr, CENTER, TOP);\n\n    /*\n    // Divider\n    for (int16_t y = valT; y <= divY; y += 3)\n        drawPixel(colR[2], y, BLACK);\n\n    // GPS satellites - todo\n    printAt(colC[3], labelT, \"Sats\", CENTER, TOP);\n    printAt(colC[3], valT, \"ToDo\", CENTER, TOP);\n    */\n\n    // Horizontal divider, at bottom of system info panel\n    for (int16_t x = 0; x < width; x += 2) // Divider, centered in the padding between first system panel and first item\n        drawPixel(x, divY, BLACK);\n\n    if (renderedHeight != nullptr)\n        *renderedHeight = height;\n}\n\n// Get the height of the the panel drawn at the top of the menu\n// This is inefficient, as we do actually have to render the panel to determine the height\n// It solves a catch-22 situation, where slotCount needs to know panel height, and panel height needs to know slotCount\nuint16_t InkHUD::MenuApplet::getSystemInfoPanelHeight()\n{\n    // Render *far* off screen\n    uint16_t height = 0;\n    drawSystemInfoPanel(INT16_MIN, INT16_MIN, 1, &height);\n\n    return height;\n}\n\n// Send a text message to the mesh\n// Used to send our canned messages\nvoid InkHUD::MenuApplet::sendText(NodeNum dest, ChannelIndex channel, const char *message)\n{\n    meshtastic_MeshPacket *p = router->allocForSending();\n    p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP;\n    p->to = dest;\n    p->channel = channel;\n    p->want_ack = true;\n    p->decoded.payload.size = strlen(message);\n    memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size);\n\n    // Tack on a bell character if requested\n    if (moduleConfig.canned_message.send_bell && p->decoded.payload.size < meshtastic_Constants_DATA_PAYLOAD_LEN) {\n        p->decoded.payload.bytes[p->decoded.payload.size] = 7;        // Bell character\n        p->decoded.payload.bytes[p->decoded.payload.size + 1] = '\\0'; // Append Null Terminator\n        p->decoded.payload.size++;\n    }\n\n    LOG_INFO(\"Send message id=%d, dest=%x, msg=%.*s\", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);\n\n    service->sendToMesh(p, RX_SRC_LOCAL, true); // Send to mesh, cc to phone\n}\n\n// Free up any heap memory we'd used while selecting / sending canned messages\nvoid InkHUD::MenuApplet::freeCannedMessageResources()\n{\n    cm.selectedMessageItem = nullptr;\n    cm.selectedRecipientItem = nullptr;\n    cm.messageItems.clear();\n    cm.recipientItems.clear();\n}\n#endif // MESHTASTIC_INCLUDE_INKHUD\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/Drivers/Backlight/LatchingBacklight.h\"\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n#include \"graphics/niche/InkHUD/Persistence.h\"\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n#include \"graphics/niche/Utils/CannedMessageStore.h\"\n\n#include \"./MenuItem.h\"\n#include \"./MenuPage.h\"\n\n#include \"Channels.h\"\n#include \"concurrency/OSThread.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Applet;\n\nclass MenuApplet : public SystemApplet, public concurrency::OSThread\n{\n  public:\n    MenuApplet();\n    void onForeground() override;\n    void onBackground() override;\n    void onButtonShortPress() override;\n    void onButtonLongPress() override;\n    void onExitShort() override;\n    void onNavUp() override;\n    void onNavDown() override;\n    void onNavLeft() override;\n    void onNavRight() override;\n    void onFreeText(char c) override;\n    void onFreeTextDone() override;\n    void onFreeTextCancel() override;\n    void onRender(bool full) override;\n\n    void show(Tile *t); // Open the menu, onto a user tile\n    void setStartPage(MenuPage page);\n\n  protected:\n    Drivers::LatchingBacklight *backlight = nullptr; // Convenient access to the backlight singleton\n\n    int32_t runOnce() override;\n\n    void execute(MenuItem item);  // Perform the MenuAction associated with a MenuItem, if any\n    void showPage(MenuPage page); // Load and display a MenuPage\n\n    void populateSendPage();      // Dynamically create MenuItems including canned messages\n    void populateRecipientPage(); // Dynamically create a page of possible destinations for a canned message\n    void populateAppletPage();    // Dynamically create MenuItems for toggling loaded applets\n    void populateAutoshowPage();  // Dynamically create MenuItems for selecting which applets can autoshow\n    void populateRecentsPage();   // Create menu items: a choice of values for settings.recentlyActiveSeconds\n\n    void drawInputField(uint16_t left, uint16_t top, uint16_t width, uint16_t height,\n                        const std::string &text); // Draw input field for free text\n    uint16_t getSystemInfoPanelHeight();\n    void drawSystemInfoPanel(int16_t left, int16_t top, uint16_t width,\n                             uint16_t *height = nullptr);                   // Info panel at top of root menu\n    void sendText(NodeNum dest, ChannelIndex channel, const char *message); // Send a text message to mesh\n    void freeCannedMessageResources();                                      // Clear MenuApplet's canned message processing data\n\n    MenuPage startPageOverride = MenuPage::ROOT;\n    MenuPage currentPage = MenuPage::ROOT;\n    MenuPage previousPage = MenuPage::EXIT;\n    uint8_t cursor = 0;       // Which menu item is currently highlighted\n    bool cursorShown = false; // Is *any* item highlighted? (Root menu: no initial selection)\n    bool freeTextMode = false;\n    uint16_t systemInfoPanelHeight = 0; // Need to know before we render\n    uint16_t menuTextLimit = 200;\n\n    std::vector<MenuItem> items;               // MenuItems for the current page. Filled by ShowPage\n    std::vector<std::string> nodeConfigLabels; // Persistent labels for Node Config pages\n    uint8_t selectedChannelIndex = 0;          // Currently selected LoRa channel (Node Config → Radio → Channel)\n    bool channelPositionEnabled = false;\n    bool gpsEnabled = false;\n\n    // Recents menu checkbox state (derived from settings.recentlyActiveSeconds)\n    static constexpr uint8_t RECENTS_COUNT = 6;\n    bool recentsSelected[RECENTS_COUNT] = {};\n\n    // Data for selecting and sending canned messages via the menu\n    // Placed into a sub-class for organization only\n    class CannedMessages\n    {\n      public:\n        // Share NicheGraphics component\n        // Handles loading, getting, setting\n        CannedMessageStore *store;\n\n        // One canned message\n        // Links the menu item to the true message text\n        struct MessageItem {\n            std::string label;   // Shown in menu. Prefixed, and UTF-8 chars parsed\n            std::string rawText; // The message which will be sent, if this item is selected\n        } *selectedMessageItem;\n\n        // One possible destination for a canned message\n        // Links the menu item to the intended recipient\n        // May represent either broadcast or DM\n        struct RecipientItem {\n            std::string label; // Shown in menu\n            NodeNum dest = NODENUM_BROADCAST;\n            uint8_t channelIndex = 0;\n        } *selectedRecipientItem;\n\n        // These lists are generated when the menu page is populated\n        // Cleared onBackground (when MenuApplet closes)\n        std::vector<MessageItem> messageItems;\n        std::vector<RecipientItem> recipientItems;\n\n        MessageItem freeTextItem;\n    } cm;\n\n    Applet *borrowedTileOwner = nullptr; // Which applet we have temporarily replaced while displaying menu\n\n    bool invertedColors = false; // Helper to display current state of config.display.displaymode in InkHUD options\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Menu/MenuItem.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nOne item of a MenuPage, in InkHUD::MenuApplet\n\nAdded to MenuPages in InkHUD::showPage\n\n- May open a submenu or exit\n- May perform an action\n- May toggle a bool value, shown by a checkbox\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"./MenuAction.h\"\n#include \"./MenuPage.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\n// One item of a MenuPage\nclass MenuItem\n{\n  public:\n    std::string label;\n    MenuAction action = NO_ACTION;\n    MenuPage nextPage = EXIT;\n    bool *checkState = nullptr;\n    bool isHeader = false; // Non-selectable section label\n\n    // Various constructors, depending on the intended function of the item\n\n    MenuItem(const char *label, MenuPage nextPage) : label(label), nextPage(nextPage) {}\n    MenuItem(const char *label, MenuAction action) : label(label), action(action) {}\n    MenuItem(const char *label, MenuAction action, MenuPage nextPage) : label(label), action(action), nextPage(nextPage) {}\n    MenuItem(const char *label, MenuAction action, MenuPage nextPage, bool *checkState)\n        : label(label), action(action), nextPage(nextPage), checkState(checkState)\n    {\n    }\n    static MenuItem Header(const char *label)\n    {\n        MenuItem item(label, NO_ACTION, EXIT);\n        item.isHeader = true;\n        return item;\n    }\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Menu/MenuPage.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nSub-menu for InkHUD::MenuApplet\nStructure of the menu is defined in InkHUD::showPage\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\n// Sub-menu for MenuApplet\nenum MenuPage : uint8_t {\n    ROOT, // Initial menu page\n    SEND,\n    CANNEDMESSAGE_RECIPIENT, // Select destination for a canned message\n    OPTIONS,\n    NODE_CONFIG,\n    NODE_CONFIG_LORA,\n    NODE_CONFIG_CHANNELS,       // List of channels\n    NODE_CONFIG_CHANNEL_DETAIL, // Per-channel options\n    NODE_CONFIG_CHANNEL_PRECISION,\n    NODE_CONFIG_PRESET,\n    NODE_CONFIG_DEVICE,\n    NODE_CONFIG_DEVICE_ROLE,\n    NODE_CONFIG_POWER,\n    NODE_CONFIG_POWER_ADC_CAL,\n    NODE_CONFIG_NETWORK,\n    NODE_CONFIG_DISPLAY,\n    NODE_CONFIG_BLUETOOTH,\n    NODE_CONFIG_POSITION,\n    NODE_CONFIG_ADMIN_RESET,\n    TIMEZONE,\n    APPLETS,\n    AUTOSHOW,\n    RECENTS, // Select length of \"recentlyActiveSeconds\"\n    REGION,\n    EXIT, // Dismiss the menu applet\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Notification/Notification.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nA notification which might be displayed by the NotificationApplet\n\nAn instance of this class is offered to Applets via Applet::approveNotification, in case they want to veto the notification.\nAn Applet should veto a notification if it is already displaying the same info which the notification would convey.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Notification\n{\n  public:\n    enum Type : uint8_t { NOTIFICATION_MESSAGE_BROADCAST, NOTIFICATION_MESSAGE_DIRECT, NOTIFICATION_BATTERY } type;\n\n    uint32_t timestamp;\n\n    uint8_t getChannel() { return channel; }\n    uint32_t getSender() { return sender; }\n    uint8_t getBatteryPercentage() { return batteryPercentage; }\n\n    friend class NotificationApplet;\n\n  protected:\n    uint8_t channel;\n    uint32_t sender;\n    uint8_t batteryPercentage;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Notification/NotificationApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./NotificationApplet.h\"\n\n#include \"./Notification.h\"\n#include \"graphics/niche/InkHUD/Persistence.h\"\n\n#include \"meshUtils.h\"\n#include \"modules/TextMessageModule.h\"\n\n#include \"RTC.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::NotificationApplet::NotificationApplet()\n{\n    textMessageObserver.observe(textMessageModule);\n}\n\n// Collect meta-info about the text message, and ask for approval for the notification\n// No need to save the message itself; we can use the cached InkHUD::latestMessage data during render()\nint InkHUD::NotificationApplet::onReceiveTextMessage(const meshtastic_MeshPacket *p)\n{\n    // System applets are always active\n    assert(isActive());\n\n    // Abort if feature disabled\n    // This is a bit clumsy, but avoids complicated handling when the feature is enabled / disabled\n    if (!settings->optionalFeatures.notifications)\n        return 0;\n\n    // Abort if this is an outgoing message\n    if (getFrom(p) == nodeDB->getNodeNum())\n        return 0;\n\n    Notification n;\n    n.timestamp = getValidTime(RTCQuality::RTCQualityDevice, true); // Current RTC time\n\n    // Gather info: in-channel message\n    if (isBroadcast(p->to)) {\n        n.type = Notification::Type::NOTIFICATION_MESSAGE_BROADCAST;\n        n.channel = p->channel;\n    }\n\n    // Gather info: DM\n    else {\n        n.type = Notification::Type::NOTIFICATION_MESSAGE_DIRECT;\n        n.sender = p->from;\n    }\n\n    // Close an old notification, if shown\n    dismiss();\n\n    // Check if we should display the notification\n    // A foreground applet might already be displaying this info\n    hasNotification = true;\n    currentNotification = n;\n    if (isApproved()) {\n        bringToForeground();\n        inkhud->forceUpdate();\n    } else\n        hasNotification = false; // Clear the pending notification: it was rejected\n\n    // Return zero: no issues here, carry on notifying other observers!\n    return 0;\n}\n\nvoid InkHUD::NotificationApplet::onRender(bool full)\n{\n    // Clear the region beneath the tile\n    // Most applets are drawing onto an empty frame buffer and don't need to do this\n    // We do need to do this with the battery though, as it is an \"overlay\"\n    fillRect(0, 0, width(), height(), WHITE);\n\n    // Padding (horizontal)\n    const uint16_t padW = 4;\n\n    // Main border\n    drawRect(0, 0, width(), height(), BLACK);\n    // drawRect(1, 1, width() - 2, height() - 2, BLACK);\n\n    // Timestamp (potentially)\n    // ====================\n    std::string ts = getTimeString(currentNotification.timestamp);\n    uint16_t tsW = 0;\n    int16_t divX = 0;\n\n    // Timestamp available\n    if (ts.length() > 0) {\n        tsW = getTextWidth(ts);\n        divX = padW + tsW + padW;\n\n        hatchRegion(0, 0, divX, height(), 2, BLACK);  // Fill with a dark background\n        drawLine(divX, 0, divX, height() - 1, BLACK); // Draw divider between timestamp and main text\n\n        setCrop(1, 1, divX - 1, height() - 2);\n\n        // Drop shadow\n        setTextColor(WHITE);\n        printThick(padW + (tsW / 2), height() / 2, ts, 4, 4);\n\n        // Bold text\n        setTextColor(BLACK);\n        printThick(padW + (tsW / 2), height() / 2, ts, 2, 1);\n    }\n\n    // Main text\n    // =====================\n\n    // Background fill\n    // - medium dark (1/3)\n    hatchRegion(divX, 0, width() - divX - 1, height(), 3, BLACK);\n\n    uint16_t availableWidth = width() - divX - padW;\n    std::string text = getNotificationText(availableWidth);\n\n    int16_t textM = divX + padW + (getTextWidth(text) / 2);\n\n    // Restrict area for printing\n    // - don't overlap border, or divider\n    setCrop(divX + 1, 1, (width() - (divX + 1) - 1), height() - 2);\n\n    // Drop shadow\n    // - thick white text\n    setTextColor(WHITE);\n    printThick(textM, height() / 2, text, 4, 4);\n\n    // Main text\n    // - faux bold: double width\n    setTextColor(BLACK);\n    printThick(textM, height() / 2, text, 2, 1);\n}\n\nvoid InkHUD::NotificationApplet::onForeground()\n{\n    handleInput = true; // Intercept the button input for our applet, so we can dismiss the notification\n}\n\nvoid InkHUD::NotificationApplet::onBackground()\n{\n    handleInput = false;\n    inkhud->forceUpdate(EInk::UpdateTypes::FULL, true);\n}\n\nvoid InkHUD::NotificationApplet::onButtonShortPress()\n{\n    dismiss();\n}\n\nvoid InkHUD::NotificationApplet::onButtonLongPress()\n{\n    dismiss();\n}\n\nvoid InkHUD::NotificationApplet::onExitShort()\n{\n    dismiss();\n}\n\nvoid InkHUD::NotificationApplet::onExitLong()\n{\n    dismiss();\n}\n\nvoid InkHUD::NotificationApplet::onNavUp()\n{\n    dismiss();\n}\n\nvoid InkHUD::NotificationApplet::onNavDown()\n{\n    dismiss();\n}\n\nvoid InkHUD::NotificationApplet::onNavLeft()\n{\n    dismiss();\n}\n\nvoid InkHUD::NotificationApplet::onNavRight()\n{\n    dismiss();\n}\n\n// Ask the WindowManager to check whether any displayed applets are already displaying the info from this notification\n// Called internally when we first get a \"notifiable event\", and then again before render,\n// in case autoshow swapped which applet was displayed\nbool InkHUD::NotificationApplet::isApproved()\n{\n    // Instead of an assert\n    if (!hasNotification) {\n        LOG_WARN(\"No notif to approve\");\n        return false;\n    }\n\n    // Ask all visible user applets for approval\n    for (Applet *ua : inkhud->userApplets) {\n        if (ua->isForeground() && !ua->approveNotification(currentNotification))\n            return false;\n    }\n\n    return true;\n}\n\n// Mark that the notification should no-longer be rendered\n// In addition to calling thing method, code needs to request a re-render of all applets\nvoid InkHUD::NotificationApplet::dismiss()\n{\n    sendToBackground();\n    hasNotification = false;\n    // Not requesting update directly from this method,\n    // as it is used to dismiss notifications which have been made redundant by autoshow settings, before they are ever drawn\n}\n\n// Get a string for the main body text of a notification\n// Formatted to suit screen width\n// Takes info from InkHUD::currentNotification\nstd::string InkHUD::NotificationApplet::getNotificationText(uint16_t widthAvailable)\n{\n    assert(hasNotification);\n\n    std::string text;\n\n    // Text message\n    // ==============\n\n    if (IS_ONE_OF(currentNotification.type, Notification::Type::NOTIFICATION_MESSAGE_DIRECT,\n                  Notification::Type::NOTIFICATION_MESSAGE_BROADCAST)) {\n\n        // Although we are handling DM and broadcast notifications together, we do need to treat them slightly differently\n        bool msgIsBroadcast = currentNotification.type == Notification::Type::NOTIFICATION_MESSAGE_BROADCAST;\n\n        // Pick source of message\n        const MessageStore::Message *message =\n            msgIsBroadcast ? &inkhud->persistence->latestMessage.broadcast : &inkhud->persistence->latestMessage.dm;\n\n        // Find info about the sender\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(message->sender);\n\n        // Leading tag (channel vs. DM)\n        text += msgIsBroadcast ? \"From:\" : \"DM: \";\n\n        // Sender id\n        if (node && node->has_user)\n            text += parseShortName(node);\n        else\n            text += hexifyNodeNum(message->sender);\n\n        // Check if text fits\n        // - use a longer string, if we have the space\n        if (getTextWidth(text) < widthAvailable * 0.5) {\n            text.clear();\n\n            // Leading tag (channel vs. DM)\n            text += msgIsBroadcast ? \"Msg from \" : \"DM from \";\n\n            // Sender id\n            if (node && node->has_user)\n                text += parseShortName(node);\n            else\n                text += hexifyNodeNum(message->sender);\n\n            text += \": \";\n            text += message->text;\n        }\n    }\n\n    // Parse any non-ascii characters and return\n    return parse(text);\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Notification/NotificationApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nPop-up notification bar, on screen top edge\nDisplays information we feel is important, but which is not shown on currently focused applet(s)\nE.g.: messages, while viewing map, etc\n\nFeature should be optional; enable disable via on-screen menu\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"concurrency/OSThread.h\"\n\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass NotificationApplet : public SystemApplet\n{\n  public:\n    NotificationApplet();\n\n    void onRender(bool full) override;\n    void onForeground() override;\n    void onBackground() override;\n    void onButtonShortPress() override;\n    void onButtonLongPress() override;\n    void onExitShort() override;\n    void onExitLong() override;\n    void onNavUp() override;\n    void onNavDown() override;\n    void onNavLeft() override;\n    void onNavRight() override;\n\n    int onReceiveTextMessage(const meshtastic_MeshPacket *p);\n\n    bool isApproved(); // Does a foreground applet make notification redundant?\n    void dismiss();    // Close the Notification Popup\n\n  protected:\n    // Get notified when a new text message arrives\n    CallbackObserver<NotificationApplet, const meshtastic_MeshPacket *> textMessageObserver =\n        CallbackObserver<NotificationApplet, const meshtastic_MeshPacket *>(this, &NotificationApplet::onReceiveTextMessage);\n\n    std::string getNotificationText(uint16_t widthAvailable); // Get text for notification, to suit screen width\n\n    bool hasNotification = false;                      // Only used for assert. Todo: remove?\n    Notification currentNotification = Notification(); // Set when something notification-worthy happens. Used by render()\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Pairing/PairingApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./PairingApplet.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::PairingApplet::PairingApplet()\n{\n    bluetoothStatusObserver.observe(&bluetoothStatus->onNewStatus);\n}\n\nvoid InkHUD::PairingApplet::onRender(bool full)\n{\n    // Header\n    setFont(fontMedium);\n    printAt(X(0.5), Y(0.25), \"Bluetooth\", CENTER, BOTTOM);\n    setFont(fontSmall);\n    printAt(X(0.5), Y(0.25), \"Enter this code\", CENTER, TOP);\n\n    // Passkey\n    setFont(fontMedium);\n    printThick(X(0.5), Y(0.5), passkey.substr(0, 3) + \" \" + passkey.substr(3), 3, 2);\n\n    // Device's bluetooth name, if it will fit\n    setFont(fontSmall);\n    std::string name = \"Name: \" + parse(getDeviceName());\n    if (getTextWidth(name) > width()) // Too wide, try without the leading \"Name: \"\n        name = parse(getDeviceName());\n    if (getTextWidth(name) < width()) // Does it fit?\n        printAt(X(0.5), Y(0.75), name, CENTER, MIDDLE);\n}\n\nvoid InkHUD::PairingApplet::onForeground()\n{\n    // Prevent most other applets from requesting update, and skip their rendering entirely\n    // Another system applet with a higher precedence can potentially ignore this\n    SystemApplet::lockRendering = true;\n    SystemApplet::lockRequests = true;\n}\nvoid InkHUD::PairingApplet::onBackground()\n{\n    // Allow normal update behavior to resume\n    SystemApplet::lockRendering = false;\n    SystemApplet::lockRequests = false;\n\n    // Need to force an update, as a polite request wouldn't be honored, seeing how we are now in the background\n    // Usually, onBackground is followed by another applet's onForeground (which requests update), but not in this case\n    inkhud->forceUpdate(EInk::UpdateTypes::FULL, true);\n}\n\nint InkHUD::PairingApplet::onBluetoothStatusUpdate(const meshtastic::Status *status)\n{\n    // The standard Meshtastic convention is to pass these \"generic\" Status objects,\n    // check their type, and then cast them.\n    // We'll mimic that behavior, just to keep in line with the other Statuses,\n    // even though I'm not sure what the original reason for jumping through these extra hoops was.\n    assert(status->getStatusType() == STATUS_TYPE_BLUETOOTH);\n    const auto *btStatus = static_cast<const meshtastic::BluetoothStatus *>(status);\n\n    // When pairing begins\n    if (btStatus->getConnectionState() == meshtastic::BluetoothStatus::ConnectionState::PAIRING) {\n        // Store the passkey for rendering\n        passkey = btStatus->getPasskey();\n\n        // Show pairing screen\n        bringToForeground();\n    }\n\n    // When pairing ends\n    // or rather, when something changes, and we shouldn't be showing the pairing screen\n    else if (isForeground())\n        sendToBackground();\n\n    return 0; // No special result to report back to Observable\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Pairing/PairingApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\n    Shows the Bluetooth passkey during pairing\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\n#include \"main.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass PairingApplet : public SystemApplet\n{\n  public:\n    PairingApplet();\n\n    void onRender(bool full) override;\n    void onForeground() override;\n    void onBackground() override;\n\n    int onBluetoothStatusUpdate(const meshtastic::Status *status);\n\n  protected:\n    // Get notified when status of the Bluetooth connection changes\n    CallbackObserver<PairingApplet, const meshtastic::Status *> bluetoothStatusObserver =\n        CallbackObserver<PairingApplet, const meshtastic::Status *>(this, &PairingApplet::onBluetoothStatusUpdate);\n\n    std::string passkey = \"\"; // Passkey. Six digits, possibly with leading zeros\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Placeholder/PlaceholderApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./PlaceholderApplet.h\"\n\nusing namespace NicheGraphics;\n\nvoid InkHUD::PlaceholderApplet::onRender(bool full)\n{\n    // This placeholder applet fills its area with sparse diagonal lines\n    hatchRegion(0, 0, width(), height(), 8, BLACK);\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Placeholder/PlaceholderApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nShown when a tile doesn't have any other valid Applets\nFills the area with diagonal lines\n\n*/\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass PlaceholderApplet : public SystemApplet\n{\n  public:\n    void onRender(bool full) override;\n\n    // Note: onForeground, onBackground, and wantsToRender are not meaningful for this applet.\n    // The window manager decides when and where it should be rendered\n    // It may be drawn to several different tiles during an Renderer::render call\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./TipsApplet.h\"\n\n#include \"graphics/niche/InkHUD/Persistence.h\"\n\n#include \"main.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::TipsApplet::TipsApplet()\n{\n    bool needsRegion = (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET);\n\n    bool showTutorialTips = (settings->tips.firstBoot || needsRegion);\n\n    // Welcome screen\n    if (showTutorialTips)\n        tipQueue.push_back(Tip::WELCOME);\n\n    // Finish setup\n    if (needsRegion)\n        tipQueue.push_back(Tip::FINISH_SETUP);\n\n    // Using the UI\n    if (showTutorialTips) {\n        tipQueue.push_back(Tip::CUSTOMIZATION);\n        tipQueue.push_back(Tip::BUTTONS);\n    }\n\n    // Shutdown info\n    // Shown until user performs one valid shutdown\n    if (!settings->tips.safeShutdownSeen)\n        tipQueue.push_back(Tip::SAFE_SHUTDOWN);\n\n    // Catch an incorrect attempt at rotating display\n    if (config.display.flip_screen)\n        tipQueue.push_back(Tip::ROTATION);\n\n    // Region picker\n    if (needsRegion)\n        tipQueue.push_back(Tip::PICK_REGION);\n\n    if (!tipQueue.empty())\n        bringToForeground();\n}\n\nvoid InkHUD::TipsApplet::onRender(bool full)\n{\n    switch (tipQueue.front()) {\n    case Tip::WELCOME:\n        renderWelcome();\n        break;\n\n    case Tip::FINISH_SETUP: {\n        setFont(fontMedium);\n        const char *title = \"Tip: Finish Setup\";\n        uint16_t h = getWrappedTextHeight(0, width(), title);\n        printWrapped(0, 0, width(), title);\n\n        setFont(fontSmall);\n        int16_t cursorY = h + fontSmall.lineHeight();\n\n        auto drawBullet = [&](const char *text) {\n            uint16_t bh = getWrappedTextHeight(0, width(), text);\n            printWrapped(0, cursorY, width(), text);\n            cursorY += bh + (fontSmall.lineHeight() / 3);\n        };\n\n        drawBullet(\"- connect antenna\");\n        drawBullet(\"- connect a client app\");\n\n        if (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET)\n            drawBullet(\"- set region\");\n\n        if (!(*config.device.tzdef && config.device.tzdef[0] != 0))\n            drawBullet(\"- set timezone\");\n\n        cursorY += fontSmall.lineHeight() / 2;\n        drawBullet(\"More info at meshtastic.org\");\n\n        printAt(0, Y(1.0), \"Press button to continue\", LEFT, BOTTOM);\n    } break;\n\n    case Tip::PICK_REGION: {\n        setFont(fontMedium);\n        printAt(0, 0, \"Set Region\");\n\n        setFont(fontSmall);\n        printWrapped(0, fontMedium.lineHeight() * 1.5, width(), \"Please select your LoRa region to complete setup.\");\n\n        printAt(0, Y(1.0), \"Press button to choose\", LEFT, BOTTOM);\n    } break;\n\n    case Tip::SAFE_SHUTDOWN: {\n        setFont(fontMedium);\n\n        const char *title = \"Tip: Shutdown\";\n        uint16_t h = getWrappedTextHeight(0, width(), title);\n        printWrapped(0, 0, width(), title);\n\n        setFont(fontSmall);\n        int16_t cursorY = h + fontSmall.lineHeight();\n\n        const char *body = \"Before removing power, please shut down from InkHUD menu, or a client app.\\n\\n\"\n                           \"This ensures data is saved.\";\n\n        uint16_t bodyH = getWrappedTextHeight(0, width(), body);\n        printWrapped(0, cursorY, width(), body);\n        cursorY += bodyH + (fontSmall.lineHeight() / 2);\n\n        printAt(0, Y(1.0), \"Press button to continue\", LEFT, BOTTOM);\n    } break;\n\n    case Tip::CUSTOMIZATION: {\n        setFont(fontMedium);\n\n        const char *title = \"Tip: Customization\";\n        uint16_t h = getWrappedTextHeight(0, width(), title);\n        printWrapped(0, 0, width(), title);\n\n        setFont(fontSmall);\n        int16_t cursorY = h + fontSmall.lineHeight();\n\n        const char *body = \"Configure & control display with the InkHUD menu. \"\n                           \"Optional features, layout, rotation, and more.\";\n\n        uint16_t bodyH = getWrappedTextHeight(0, width(), body);\n        printWrapped(0, cursorY, width(), body);\n        cursorY += bodyH + (fontSmall.lineHeight() / 2);\n\n        printAt(0, Y(1.0), \"Press button to continue\", LEFT, BOTTOM);\n    } break;\n\n    case Tip::BUTTONS: {\n        setFont(fontMedium);\n\n        const char *title = \"Tip: Buttons\";\n        uint16_t h = getWrappedTextHeight(0, width(), title);\n        printWrapped(0, 0, width(), title);\n\n        setFont(fontSmall);\n        int16_t cursorY = h + fontSmall.lineHeight();\n\n        auto drawBullet = [&](const char *text) {\n            uint16_t bh = getWrappedTextHeight(0, width(), text);\n            printWrapped(0, cursorY, width(), text);\n            cursorY += bh + (fontSmall.lineHeight() / 3);\n        };\n\n        if (!settings->joystick.enabled) {\n            drawBullet(\"User Button\");\n            drawBullet(\"- short press: next\");\n            drawBullet(\"- long press: select or open menu\");\n        } else if (inkhud->twoWayRocker) {\n            drawBullet(\"Rocker + Button\");\n            drawBullet(\"- center press: open menu or select\");\n            drawBullet(\"- left/right: applet nav\");\n            drawBullet(\"- in menu: up/down\");\n        } else {\n            drawBullet(\"Joystick\");\n            drawBullet(\"- press: open menu or select\");\n            drawBullet(\"Exit Button\");\n            drawBullet(\"- press: switch tile or close menu\");\n        }\n\n        printAt(0, Y(1.0), \"Press button to continue\", LEFT, BOTTOM);\n    } break;\n\n    case Tip::ROTATION: {\n        setFont(fontMedium);\n\n        const char *title = \"Tip: Rotation\";\n        uint16_t h = getWrappedTextHeight(0, width(), title);\n        printWrapped(0, 0, width(), title);\n\n        setFont(fontSmall);\n        if (!settings->joystick.enabled) {\n            int16_t cursorY = h + fontSmall.lineHeight();\n\n            const char *body = \"To rotate the display, use the InkHUD menu. \"\n                               \"Long-press the user button > Options > Rotate.\";\n\n            uint16_t bh = getWrappedTextHeight(0, width(), body);\n            printWrapped(0, cursorY, width(), body);\n            cursorY += bh + (fontSmall.lineHeight() / 2);\n        } else {\n            printWrapped(0, fontMedium.lineHeight() * 1.5, width(),\n                         \"To rotate the display, use the InkHUD menu. Press the user button > Options > Rotate.\");\n        }\n\n        printAt(0, Y(1.0), \"Press button to continue\", LEFT, BOTTOM);\n\n        // Revert the \"flip screen\" setting, preventing this message showing again\n        config.display.flip_screen = false;\n        nodeDB->saveToDisk(SEGMENT_DEVICESTATE);\n    } break;\n    }\n}\n\n// This tip has its own render method, only because it's a big block of code\n// Didn't want to clutter up the switch in onRender too much\nvoid InkHUD::TipsApplet::renderWelcome()\n{\n    uint16_t padW = X(0.05);\n\n    // Detect portrait orientation\n    bool portrait = height() > width();\n\n    // Block 1 - logo & title\n    // ========================\n\n    // Logo size\n    uint16_t logoWLimit = portrait ? X(0.5) : X(0.3);\n    uint16_t logoHLimit = portrait ? Y(0.25) : Y(0.3);\n    uint16_t logoW = getLogoWidth(logoWLimit, logoHLimit);\n    uint16_t logoH = getLogoHeight(logoWLimit, logoHLimit);\n\n    // Title size\n    setFont(fontMedium);\n    std::string title;\n    if (width() >= 200) // Future proofing: hide if *tiny* display\n        title = \"meshtastic.org\";\n    uint16_t titleW = getTextWidth(title);\n\n    // Center the block\n    // Desired effect: equal margin from display edge for logo left and title right\n    int16_t block1Y = portrait ? Y(0.2) : Y(0.3);\n    int16_t block1CX = X(0.5) + (logoW / 2) - (titleW / 2);\n    int16_t logoCX = block1CX - (logoW / 2) - (padW / 2);\n    int16_t titleCX = block1CX + (titleW / 2) + (padW / 2);\n\n    // Draw block\n    drawLogo(logoCX, block1Y, logoW, logoH);\n    printAt(titleCX, block1Y, title, CENTER, MIDDLE);\n\n    // Block 2 - subtitle\n    // =======================\n    setFont(fontSmall);\n    std::string subtitle = \"InkHUD\";\n    if (width() >= 200)\n        subtitle += \"  -  A Heads-Up Display\"; // Future proofing: narrower for tiny display\n    printAt(X(0.5), portrait ? Y(0.45) : Y(0.6), subtitle, CENTER, MIDDLE);\n\n    // Block 3 - press to continue\n    // ============================\n    printAt(X(0.5), Y(1), \"Press button to continue\", CENTER, BOTTOM);\n}\n\nvoid InkHUD::TipsApplet::onForeground()\n{\n    // Prevent most other applets from requesting update, and skip their rendering entirely\n    // Another system applet with a higher precedence can potentially ignore this\n    SystemApplet::lockRendering = true;\n    SystemApplet::lockRequests = true;\n\n    SystemApplet::handleInput = true; // Our applet should handle button input (unless another system applet grabs it first)\n}\n\nvoid InkHUD::TipsApplet::onBackground()\n{\n    // Allow normal update behavior to resume\n    SystemApplet::lockRendering = false;\n    SystemApplet::lockRequests = false;\n    SystemApplet::handleInput = false;\n\n    // Need to force an update, as a polite request wouldn't be honored, seeing how we are now in the background\n    // Usually, onBackground is followed by another applet's onForeground (which requests update), but not in this case\n    inkhud->forceUpdate(EInk::UpdateTypes::FULL, true);\n}\n\n// While our SystemApplet::handleInput flag is true\nvoid InkHUD::TipsApplet::onButtonShortPress()\n{\n    bool needsRegion = (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET);\n    // If we're prompting the user to pick a region, hand off to the menu\n    if (!tipQueue.empty() && tipQueue.front() == Tip::PICK_REGION) {\n        tipQueue.pop_front();\n\n        // Signal InkHUD to open the menu on Region page\n        inkhud->forceRegionMenu = true;\n\n        // Close tips and open menu\n        sendToBackground();\n        inkhud->openMenu();\n        return;\n    }\n    // Consume current tip\n    tipQueue.pop_front();\n\n    // All tips done\n    if (tipQueue.empty()) {\n        // Record that user has now seen the \"tutorial\" set of tips\n        // Don't show them on subsequent boots\n        if (settings->tips.firstBoot && !needsRegion) {\n            settings->tips.firstBoot = false;\n            inkhud->persistence->saveSettings();\n        }\n\n        // Close applet\n        sendToBackground();\n    } else {\n        requestUpdate();\n    }\n}\n\n// Functions the same as the user button in this instance\nvoid InkHUD::TipsApplet::onExitShort()\n{\n    onButtonShortPress();\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/System/Tips/TipsApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\n    Shows info on how to use InkHUD\n    - tutorial at first boot\n    - additional tips in certain situation (e.g. bad shutdown, region unset)\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass TipsApplet : public SystemApplet\n{\n  protected:\n    enum class Tip {\n        WELCOME,\n        FINISH_SETUP,\n        PICK_REGION,\n        SAFE_SHUTDOWN,\n        CUSTOMIZATION,\n        BUTTONS,\n        ROTATION,\n    };\n\n  public:\n    TipsApplet();\n\n    void onRender(bool full) override;\n    void onForeground() override;\n    void onBackground() override;\n    void onButtonShortPress() override;\n    void onExitShort() override;\n\n  protected:\n    void renderWelcome(); // Very first screen of tutorial\n\n    std::deque<Tip> tipQueue; // List of tips to show, one after another\n\n    WindowManager *windowManager = nullptr; // For convenience. Set in constructor.\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./AllMessageApplet.h\"\n\nusing namespace NicheGraphics;\n\nvoid InkHUD::AllMessageApplet::onActivate()\n{\n    textMessageObserver.observe(textMessageModule);\n}\n\nvoid InkHUD::AllMessageApplet::onDeactivate()\n{\n    textMessageObserver.unobserve(textMessageModule);\n}\n\n// We're not consuming the data passed to this method;\n// we're just just using it to trigger a render\nint InkHUD::AllMessageApplet::onReceiveTextMessage(const meshtastic_MeshPacket *p)\n{\n    // Abort if applet fully deactivated\n    // Already handled by onActivate and onDeactivate, but good practice for all applets\n    if (!isActive())\n        return 0;\n\n    // Abort if this is an outgoing message\n    if (getFrom(p) == nodeDB->getNodeNum())\n        return 0;\n\n    requestAutoshow(); // Want to become foreground, if permitted\n    requestUpdate();   // Want to update display, if applet is foreground\n\n    // Return zero: no issues here, carry on notifying other observers!\n    return 0;\n}\n\nvoid InkHUD::AllMessageApplet::onRender(bool full)\n{\n    // Find newest message, regardless of whether DM or broadcast\n    MessageStore::Message *message;\n    if (latestMessage->wasBroadcast)\n        message = &latestMessage->broadcast;\n    else\n        message = &latestMessage->dm;\n\n    // Short circuit: no text message\n    if (!message->sender) {\n        printAt(X(0.5), Y(0.5), \"No Message\", CENTER, MIDDLE);\n        return;\n    }\n\n    // ===========================\n    // Header (sender, timestamp)\n    // ===========================\n\n    // Y position for divider\n    // - between header text and messages\n\n    std::string header;\n\n    // RX Time\n    // - if valid\n    std::string timeString = getTimeString(message->timestamp);\n    if (timeString.length() > 0) {\n        header += timeString;\n        header += \": \";\n    }\n\n    // Sender's id\n    // - short name and long name, if available, or\n    // - node id\n    meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(message->sender);\n    if (sender && sender->has_user) {\n        header += parseShortName(sender); // May be last-four of node if unprintable (emoji, etc)\n        header += \" (\";\n        header += parse(sender->user.long_name);\n        header += \")\";\n    } else\n        header += hexifyNodeNum(message->sender);\n\n    // Draw a \"standard\" applet header\n    drawHeader(header);\n\n    // Fade the right edge of the header, if text spills over edge\n    uint8_t wF = getFont().lineHeight() / 2; // Width of fade effect\n    uint8_t hF = getHeaderHeight();          // Height of fade effect\n    if (getCursorX() > width())\n        hatchRegion(width() - wF - 1, 1, wF, hF, 2, WHITE);\n\n    // Dimensions of the header\n    constexpr int16_t padDivH = 2;\n    const int16_t headerDivY = Applet::getHeaderHeight() - 1;\n\n    // ===================\n    // Print message text\n    // ===================\n\n    // Parse any non-ascii chars in the message\n    std::string text = parse(message->text);\n\n    // Extra gap below the header\n    int16_t textTop = headerDivY + padDivH;\n\n    // Attempt to print with fontLarge\n    uint32_t textHeight;\n    setFont(fontLarge);\n    textHeight = getWrappedTextHeight(0, width(), text);\n    if (textHeight <= (uint32_t)height()) {\n        printWrapped(0, textTop, width(), text);\n        return;\n    }\n\n    // Fallback (too large): attempt to print with fontMedium\n    setFont(fontMedium);\n    textHeight = getWrappedTextHeight(0, width(), text);\n    if (textHeight <= (uint32_t)height()) {\n        printWrapped(0, textTop, width(), text);\n        return;\n    }\n\n    // Fallback (too large): print with fontSmall\n    setFont(fontSmall);\n    printWrapped(0, textTop, width(), text);\n}\n\n// Don't show notifications for text messages when our applet is displayed\nbool InkHUD::AllMessageApplet::approveNotification(Notification &n)\n{\n    if (n.type == Notification::Type::NOTIFICATION_MESSAGE_BROADCAST)\n        return false;\n\n    else if (n.type == Notification::Type::NOTIFICATION_MESSAGE_DIRECT)\n        return false;\n\n    else\n        return true;\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nShows the latest incoming text message, as well as sender.\nBoth broadcast and direct messages will be shown here, from all channels.\n\nThis module doesn't doesn't use the devicestate.rx_text_message,' as this is overwritten to contain outgoing messages\nThis module doesn't collect its own text message. Instead, the WindowManager stores the most recent incoming text message.\nThis is available to any interested modules (SingeMessageApplet, NotificationApplet etc.) via InkHUD::latestMessage\n\nWe do still receive notifications from the text message module though,\nto know when a new message has arrived, and trigger the update.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n\n#include \"modules/TextMessageModule.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Applet;\n\nclass AllMessageApplet : public Applet\n{\n  public:\n    void onRender(bool full) override;\n\n    void onActivate() override;\n    void onDeactivate() override;\n    int onReceiveTextMessage(const meshtastic_MeshPacket *p);\n\n    bool approveNotification(Notification &n) override; // Which notifications to suppress\n\n  protected:\n    // Used to register our text message callback\n    CallbackObserver<AllMessageApplet, const meshtastic_MeshPacket *> textMessageObserver =\n        CallbackObserver<AllMessageApplet, const meshtastic_MeshPacket *>(this, &AllMessageApplet::onReceiveTextMessage);\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/DM/DMApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./DMApplet.h\"\n\nusing namespace NicheGraphics;\n\nvoid InkHUD::DMApplet::onActivate()\n{\n    textMessageObserver.observe(textMessageModule);\n}\n\nvoid InkHUD::DMApplet::onDeactivate()\n{\n    textMessageObserver.unobserve(textMessageModule);\n}\n\n// We're not consuming the data passed to this method;\n// we're just just using it to trigger a render\nint InkHUD::DMApplet::onReceiveTextMessage(const meshtastic_MeshPacket *p)\n{\n    // Abort if applet fully deactivated\n    // Already handled by onActivate and onDeactivate, but good practice for all applets\n    if (!isActive())\n        return 0;\n\n    // If DM (not broadcast)\n    if (!isBroadcast(p->to)) {\n        // Want to update display, if applet is foreground\n        requestUpdate();\n\n        // If this was an incoming message, suggest that our applet becomes foreground, if permitted\n        if (getFrom(p) != nodeDB->getNodeNum())\n            requestAutoshow();\n    }\n\n    // Return zero: no issues here, carry on notifying other observers!\n    return 0;\n}\n\nvoid InkHUD::DMApplet::onRender(bool full)\n{\n    // Abort if no text message\n    if (!latestMessage->dm.sender) {\n        printAt(X(0.5), Y(0.5), \"No DMs\", CENTER, MIDDLE);\n        return;\n    }\n\n    // ===========================\n    // Header (sender, timestamp)\n    // ===========================\n\n    // Y position for divider\n    // - between header text and messages\n\n    std::string header;\n\n    // RX Time\n    // - if valid\n    std::string timeString = getTimeString(latestMessage->dm.timestamp);\n    if (timeString.length() > 0) {\n        header += timeString;\n        header += \": \";\n    }\n\n    // Sender's id\n    // - shortname and long name, if available, or\n    // - node id\n    meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(latestMessage->dm.sender);\n    if (sender && sender->has_user) {\n        header += parseShortName(sender); // May be last-four of node if unprintable (emoji, etc)\n        header += \" (\";\n        header += parse(sender->user.long_name);\n        header += \")\";\n    } else\n        header += hexifyNodeNum(latestMessage->dm.sender);\n\n    // Draw a \"standard\" applet header\n    drawHeader(header);\n\n    // Fade the right edge of the header, if text spills over edge\n    uint8_t wF = getFont().lineHeight() / 2; // Width of fade effect\n    uint8_t hF = getHeaderHeight();          // Height of fade effect\n    if (getCursorX() > width())\n        hatchRegion(width() - wF - 1, 1, wF, hF, 2, WHITE);\n\n    // Dimensions of the header\n    constexpr int16_t padDivH = 2;\n    const int16_t headerDivY = Applet::getHeaderHeight() - 1;\n\n    // ===================\n    // Print message text\n    // ===================\n\n    // Parse any non-ascii chars in the message\n    std::string text = parse(latestMessage->dm.text);\n\n    // Extra gap below the header\n    int16_t textTop = headerDivY + padDivH;\n\n    // Attempt to print with fontLarge\n    uint32_t textHeight;\n    setFont(fontLarge);\n    textHeight = getWrappedTextHeight(0, width(), text);\n    if (textHeight <= (uint32_t)height()) {\n        printWrapped(0, textTop, width(), text);\n        return;\n    }\n\n    // Fallback (too large): attempt to print with fontMedium\n    setFont(fontMedium);\n    textHeight = getWrappedTextHeight(0, width(), text);\n    if (textHeight <= (uint32_t)height()) {\n        printWrapped(0, textTop, width(), text);\n        return;\n    }\n\n    // Fallback (too large): print with fontSmall\n    setFont(fontSmall);\n    printWrapped(0, textTop, width(), text);\n}\n\n// Don't show notifications for direct messages when our applet is displayed\nbool InkHUD::DMApplet::approveNotification(Notification &n)\n{\n    if (n.type == Notification::Type::NOTIFICATION_MESSAGE_DIRECT)\n        return false;\n\n    else\n        return true;\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/DM/DMApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nShows the latest incoming *Direct Message* (DM), as well as sender.\nThis compliments the threaded message applets\n\nThis module doesn't doesn't use the devicestate.rx_text_message,' as this is overwritten to contain outgoing messages\nThis module doesn't collect its own text message. Instead, the WindowManager stores the most recent incoming text message.\nThis is available to any interested modules (SingeMessageApplet, NotificationApplet etc.) via InkHUD::latestMessage\n\nWe do still receive notifications from the text message module though,\nto know when a new message has arrived, and trigger the update.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n\n#include \"modules/TextMessageModule.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Applet;\n\nclass DMApplet : public Applet\n{\n  public:\n    void onRender(bool full) override;\n\n    void onActivate() override;\n    void onDeactivate() override;\n    int onReceiveTextMessage(const meshtastic_MeshPacket *p);\n\n    bool approveNotification(Notification &n) override; // Which notifications to suppress\n\n  protected:\n    // Used to register our text message callback\n    CallbackObserver<DMApplet, const meshtastic_MeshPacket *> textMessageObserver =\n        CallbackObserver<DMApplet, const meshtastic_MeshPacket *>(this, &DMApplet::onReceiveTextMessage);\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./FavoritesMapApplet.h\"\n#include \"NodeDB.h\"\n\nusing namespace NicheGraphics;\n\nbool InkHUD::FavoritesMapApplet::shouldDrawNode(meshtastic_NodeInfoLite *node)\n{\n    // Keep our own node available as map anchor/center; all others must be favorited.\n    return node && (node->num == nodeDB->getNodeNum() || node->is_favorite);\n}\n\nvoid InkHUD::FavoritesMapApplet::onRender(bool full)\n{\n    // Custom empty state text for favorites-only map.\n    if (!enoughMarkers()) {\n        printAt(X(0.5), Y(0.5) - (getFont().lineHeight() / 2), \"Favorite node position\", CENTER, MIDDLE);\n        printAt(X(0.5), Y(0.5) + (getFont().lineHeight() / 2), \"will appear here\", CENTER, MIDDLE);\n        return;\n    }\n\n    // Draw the usual map applet first.\n    MapApplet::onRender(full);\n\n    // Draw our latest \"node of interest\" as a special marker.\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(lastFrom);\n    if (node && node->is_favorite && nodeDB->hasValidPosition(node) && enoughMarkers())\n        drawLabeledMarker(node);\n}\n\n// Determine if we need to redraw the map, when we receive a new position packet.\nProcessMessage InkHUD::FavoritesMapApplet::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    // If applet is not active, we shouldn't be handling any data.\n    if (!isActive())\n        return ProcessMessage::CONTINUE;\n\n    // Try decode a position from the packet.\n    bool hasPosition = false;\n    float lat;\n    float lng;\n    if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == meshtastic_PortNum_POSITION_APP) {\n        meshtastic_Position position = meshtastic_Position_init_default;\n        if (pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_Position_msg, &position)) {\n            if (position.has_latitude_i && position.has_longitude_i         // Actually has position\n                && (position.latitude_i != 0 || position.longitude_i != 0)) // Position isn't \"null island\"\n            {\n                hasPosition = true;\n                lat = position.latitude_i * 1e-7; // Convert from Meshtastic's internal int32_t format\n                lng = position.longitude_i * 1e-7;\n            }\n        }\n    }\n\n    // Skip if we didn't get a valid position.\n    if (!hasPosition)\n        return ProcessMessage::CONTINUE;\n\n    const int8_t hopsAway = getHopsAway(mp);\n    const bool hasHopsAway = hopsAway >= 0;\n\n    // Determine if the position packet would change anything on-screen.\n    bool somethingChanged = false;\n\n    // If our own position.\n    if (isFromUs(&mp)) {\n        // Ignore tiny local movement to reduce update spam.\n        if (GeoCoord::latLongToMeter(ourLastLat, ourLastLng, lat, lng) > 50) {\n            somethingChanged = true;\n            ourLastLat = lat;\n            ourLastLng = lng;\n        }\n    } else {\n        // For non-local packets, this applet only reacts to favorited nodes.\n        const meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(mp.from);\n        if (!sender || !sender->is_favorite)\n            return ProcessMessage::CONTINUE;\n\n        // Check if this position is from someone different than our previous position packet.\n        if (mp.from != lastFrom) {\n            somethingChanged = true;\n            lastFrom = mp.from;\n            lastLat = lat;\n            lastLng = lng;\n            lastHopsAway = hopsAway;\n        }\n\n        // Same sender: check if position changed.\n        else if (GeoCoord::latLongToMeter(lastLat, lastLng, lat, lng) > 10) {\n            somethingChanged = true;\n            lastLat = lat;\n            lastLng = lng;\n        }\n\n        // Same sender, same position: check if hops changed.\n        else if (hasHopsAway && (hopsAway != lastHopsAway)) {\n            somethingChanged = true;\n            lastHopsAway = hopsAway;\n        }\n    }\n\n    if (somethingChanged) {\n        requestAutoshow();\n        requestUpdate();\n    }\n\n    return ProcessMessage::CONTINUE;\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nPlots position of favorited nodes from DB, with North facing up.\nScaled to fit the most distant node.\nSize of marker represents hops away.\nThe favorite node which most recently sent a position will be labeled.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.h\"\n\n#include \"SinglePortModule.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass FavoritesMapApplet : public MapApplet, public SinglePortModule\n{\n  public:\n    FavoritesMapApplet() : SinglePortModule(\"FavoritesMapApplet\", meshtastic_PortNum_POSITION_APP) {}\n    void onRender(bool full) override;\n\n  protected:\n    bool shouldDrawNode(meshtastic_NodeInfoLite *node) override;\n    ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n    NodeNum lastFrom = 0; // Sender of most recent favorited (non-local) position packet\n    float lastLat = 0.0;\n    float lastLng = 0.0;\n    float lastHopsAway = 0;\n\n    float ourLastLat = 0.0; // Info about most recent local position\n    float ourLastLng = 0.0;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"RTC.h\"\n\n#include \"gps/GeoCoord.h\"\n\n#include \"./HeardApplet.h\"\n\nusing namespace NicheGraphics;\n\nvoid InkHUD::HeardApplet::onActivate()\n{\n    // When applet begins, pre-fill with stale info from NodeDB\n    populateFromNodeDB();\n}\n\nvoid InkHUD::HeardApplet::onDeactivate()\n{\n    // Avoid an unlikely situation where frequent activation / deactivation populates duplicate info from node DB\n    cards.clear();\n}\n\n// When base applet hears a new packet, it extracts the info and passes it to us as CardInfo\n// We need to store it (at front to sort recent), and request display update if our list has visibly changed as a result\nvoid InkHUD::HeardApplet::handleParsed(CardInfo c)\n{\n    // Grab the previous entry.\n    // To check if the new data is different enough to justify re-render\n    // Need to cache now, before we manipulate the deque\n    CardInfo previous;\n    if (!cards.empty())\n        previous = cards.at(0);\n\n    // If we're updating an existing entry, remove the old one. Will reinsert at front\n    for (auto it = cards.begin(); it != cards.end(); ++it) {\n        if (it->nodeNum == c.nodeNum) {\n            cards.erase(it);\n            break;\n        }\n    }\n\n    cards.push_front(c);                                  // Insert into base class' card collection\n    cards.resize(min(maxCards(), (uint8_t)cards.size())); // Don't keep more cards than we could *ever* fit on screen\n    cards.shrink_to_fit();\n\n    // Our rendered image needs to change if:\n    if (previous.nodeNum != c.nodeNum                  // Different node\n        || previous.signal != c.signal                 // or different signal strength\n        || previous.distanceMeters != c.distanceMeters // or different position\n        || previous.hopsAway != c.hopsAway)            // or different hops away\n    {\n        requestAutoshow();\n        requestUpdate();\n    }\n}\n\n// When applet is activated, pre-fill with stale data from NodeDB\n// We're sorting using the last_heard value. Susceptible to weirdness if node's RTC changes.\n// No SNR is available in node db, so we can't calculate signal either\n// These initial cards from node db will be gradually pushed out by new packets which originate from out base applet instead\nvoid InkHUD::HeardApplet::populateFromNodeDB()\n{\n    // Fill a collection with pointers to each node in db\n    std::vector<meshtastic_NodeInfoLite *> ordered;\n    for (auto mn = nodeDB->meshNodes->begin(); mn != nodeDB->meshNodes->end(); ++mn) {\n        // Only copy if valid, and not our own node\n        if (mn->num != 0 && mn->num != nodeDB->getNodeNum())\n            ordered.push_back(&*mn);\n    }\n\n    // Sort the collection by age\n    std::sort(ordered.begin(), ordered.end(),\n              [](const meshtastic_NodeInfoLite *top, const meshtastic_NodeInfoLite *bottom) -> bool {\n                  return (top->last_heard > bottom->last_heard);\n              });\n\n    // Keep the most recent entries only\n    // Just enough to fill the screen\n    if (ordered.size() > maxCards())\n        ordered.resize(maxCards());\n\n    // Create card info for these (stale) node observations\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    for (meshtastic_NodeInfoLite *node : ordered) {\n        CardInfo c;\n        c.nodeNum = node->num;\n\n        if (node->has_hops_away)\n            c.hopsAway = node->hops_away;\n\n        if (nodeDB->hasValidPosition(node) && nodeDB->hasValidPosition(ourNode)) {\n            // Get lat and long as float\n            // Meshtastic stores these as integers internally\n            float ourLat = ourNode->position.latitude_i * 1e-7;\n            float ourLong = ourNode->position.longitude_i * 1e-7;\n            float theirLat = node->position.latitude_i * 1e-7;\n            float theirLong = node->position.longitude_i * 1e-7;\n\n            c.distanceMeters = (int32_t)GeoCoord::latLongToMeter(theirLat, theirLong, ourLat, ourLong);\n        }\n\n        // Insert into the card collection (member of base class)\n        cards.push_back(c);\n    }\n}\n\n// Text drawn in the usual applet header\n// Handled by base class: ChronoListApplet\nstd::string InkHUD::HeardApplet::getHeaderText()\n{\n    uint16_t nodeCount = nodeDB->getNumMeshNodes() - 1; // Don't count our own node\n\n    std::string text = \"Heard: \";\n\n    // Print node count, if nodeDB not yet nearing full\n    if (nodeCount < MAX_NUM_NODES) {\n        text += to_string(nodeCount); // Max nodes\n        text += \" \";\n        text += (nodeCount == 1) ? \"node\" : \"nodes\";\n    }\n\n    return text;\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nShows a list of all nodes (recently heard or not), sorted by time last heard.\nMost of the work is done by the InkHUD::NodeListApplet base class\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applets/Bases/NodeList/NodeListApplet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass HeardApplet : public NodeListApplet\n{\n  public:\n    HeardApplet() : NodeListApplet(\"HeardApplet\") {}\n    void onActivate() override;\n    void onDeactivate() override;\n\n  protected:\n    void handleParsed(CardInfo c) override; // Store new info, and update display if needed\n    std::string getHeaderText() override;   // Set title for this applet\n\n    void populateFromNodeDB(); // Pre-fill the CardInfo collection from NodeDB\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./PositionsApplet.h\"\n#include \"NodeDB.h\"\n\nusing namespace NicheGraphics;\n\nvoid InkHUD::PositionsApplet::onRender(bool full)\n{\n    // Draw the usual map applet first\n    MapApplet::onRender(full);\n\n    // Draw our latest \"node of interest\" as a special marker\n    // -------------------------------------------------------\n    // We might be rendering because we got a position packet from them\n    // We might be rendering because our own position updated\n    // Either way, we still highlight which node most recently sent us a position packet\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(lastFrom);\n    if (node && nodeDB->hasValidPosition(node) && enoughMarkers())\n        drawLabeledMarker(node);\n}\n\n// Determine if we need to redraw the map, when we receive a new position packet\nProcessMessage InkHUD::PositionsApplet::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    // If applet is not active, we shouldn't be handling any data\n    // It's good practice for all applets to implement an early return like this\n    // for PositionsApplet, this is **required** - it's where we're handling active vs deactive\n    if (!isActive())\n        return ProcessMessage::CONTINUE;\n\n    // Try decode a position from the packet\n    bool hasPosition = false;\n    float lat;\n    float lng;\n    if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == meshtastic_PortNum_POSITION_APP) {\n        meshtastic_Position position = meshtastic_Position_init_default;\n        if (pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_Position_msg, &position)) {\n            if (position.has_latitude_i && position.has_longitude_i         // Actually has position\n                && (position.latitude_i != 0 || position.longitude_i != 0)) // Position isn't \"null island\"\n            {\n                hasPosition = true;\n                lat = position.latitude_i * 1e-7; // Convert from Meshtastic's internal  int32_t format\n                lng = position.longitude_i * 1e-7;\n            }\n        }\n    }\n\n    // Skip if we didn't get a valid position\n    if (!hasPosition)\n        return ProcessMessage::CONTINUE;\n\n    const int8_t hopsAway = getHopsAway(mp);\n    const bool hasHopsAway = hopsAway >= 0;\n\n    // Determine if the position packet would change anything on-screen\n    // -----------------------------------------------------------------\n\n    bool somethingChanged = false;\n\n    // If our own position\n    if (isFromUs(&mp)) {\n        // We get frequent position updates from connected phone\n        // Only update if we're travelled some distance, for rate limiting\n        // Todo: smarter detection of position changes\n        if (GeoCoord::latLongToMeter(ourLastLat, ourLastLng, lat, lng) > 50) {\n            somethingChanged = true;\n            ourLastLat = lat;\n            ourLastLng = lng;\n        }\n    }\n\n    // If someone else's position\n    else {\n        // Check if this position is from someone different than our previous position packet\n        if (mp.from != lastFrom) {\n            somethingChanged = true;\n            lastFrom = mp.from;\n            lastLat = lat;\n            lastLng = lng;\n            lastHopsAway = hopsAway;\n        }\n\n        // Same sender: check if position changed\n        // Todo: smarter detection of position changes\n        else if (GeoCoord::latLongToMeter(lastLat, lastLng, lat, lng) > 10) {\n            somethingChanged = true;\n            lastLat = lat;\n            lastLng = lng;\n        }\n\n        // Same sender, same position: check if hops changed\n        // Only pay attention if the hopsAway value is valid\n        else if (hasHopsAway && (hopsAway != lastHopsAway)) {\n            somethingChanged = true;\n            lastHopsAway = hopsAway;\n        }\n    }\n\n    // Decision reached\n    // -----------------\n\n    if (somethingChanged) {\n        requestAutoshow(); // Todo: only request this in some situations?\n        requestUpdate();\n    }\n\n    return ProcessMessage::CONTINUE;\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nPlots position of all nodes from DB, with North facing up.\nScaled to fit the most distant node.\nSize of cross represents hops away.\nThe node which has most recently sent a position will be labeled.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.h\"\n\n#include \"SinglePortModule.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass PositionsApplet : public MapApplet, public SinglePortModule\n{\n  public:\n    PositionsApplet() : SinglePortModule(\"PositionsApplet\", meshtastic_PortNum_POSITION_APP) {}\n    void onRender(bool full) override;\n\n  protected:\n    ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n    NodeNum lastFrom = 0; // Sender of most recent (non-local) position packet\n    float lastLat = 0.0;\n    float lastLng = 0.0;\n    float lastHopsAway = 0;\n\n    float ourLastLat = 0.0; // Info about the most recent (non-local) position packet\n    float ourLastLng = 0.0; // Info about most recent *local* position\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./RecentsListApplet.h\"\n\n#include \"RTC.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::RecentsListApplet::RecentsListApplet() : NodeListApplet(\"RecentsListApplet\"), concurrency::OSThread(\"RecentsListApplet\")\n{\n    // No scheduled tasks initially\n    OSThread::disable();\n}\n\nvoid InkHUD::RecentsListApplet::onActivate()\n{\n    // When the applet is activated, begin scheduled purging of any nodes which are no longer \"active\"\n    OSThread::enabled = true;\n    OSThread::setIntervalFromNow(60 * 1000UL); // Every minute\n}\n\nvoid InkHUD::RecentsListApplet::onDeactivate()\n{\n    // Halt scheduled purging\n    OSThread::disable();\n}\n\nint32_t InkHUD::RecentsListApplet::runOnce()\n{\n    prune(); // Remove CardInfo and Age record for nodes which we haven't heard recently\n    return OSThread::interval;\n}\n\n// When base applet hears a new packet, it extracts the info and passes it to us as CardInfo\n// We need to store it (at front to sort recent), and request display update if our list has visibly changed as a result\n// We also need to record the current time against the nodenum, so we know when it becomes inactive\nvoid InkHUD::RecentsListApplet::handleParsed(CardInfo c)\n{\n    // Grab the previous entry.\n    // To check if the new data is different enough to justify re-render\n    // Need to cache now, before we manipulate the deque\n    CardInfo previous;\n    if (!cards.empty())\n        previous = cards.at(0);\n\n    // If we're updating an existing entry, remove the old one. Will reinsert at front\n    for (auto it = cards.begin(); it != cards.end(); ++it) {\n        if (it->nodeNum == c.nodeNum) {\n            cards.erase(it);\n            break;\n        }\n    }\n\n    cards.push_front(c);                                  // Store this CardInfo\n    cards.resize(min(maxCards(), (uint8_t)cards.size())); // Don't keep more cards than we could *ever* fit on screen\n    cards.shrink_to_fit();\n\n    // Record the time of this observation\n    // Used to count active nodes, and to know when to prune inactive nodes\n    seenNow(c.nodeNum);\n\n    // Our rendered image needs to change if:\n    if (previous.nodeNum != c.nodeNum                  // Different node\n        || previous.signal != c.signal                 // or different signal strength\n        || previous.distanceMeters != c.distanceMeters // or different position\n        || previous.hopsAway != c.hopsAway)            // or different hops away\n    {\n        prune(); // Take the opportunity now to remove inactive nodes\n        requestAutoshow();\n        requestUpdate();\n    }\n}\n\n// Record the time (millis, right now) that we hear a node\n// If we do not hear from a node for a while, its card and age info will be removed by the purge method, which runs regularly\nvoid InkHUD::RecentsListApplet::seenNow(NodeNum nodeNum)\n{\n    // If we're updating an existing entry, remove the old one. Will reinsert at front\n    for (auto it = ages.begin(); it != ages.end(); ++it) {\n        if (it->nodeNum == nodeNum) {\n            ages.erase(it);\n            break;\n        }\n    }\n\n    Age a;\n    a.nodeNum = nodeNum;\n    a.seenAtMs = millis();\n\n    ages.push_front(a);\n}\n\n// Remove Card and Age info for any nodes which are now inactive\n// Determined by when a node was last heard, in our internal record (not from nodeDB)\nvoid InkHUD::RecentsListApplet::prune()\n{\n    // Iterate age records from newest to oldest\n    for (uint16_t i = 0; i < ages.size(); i++) {\n        // Found the first record which is too old\n        if (!isActive(ages.at(i).seenAtMs)) {\n            // Drop this item, and all others behind it\n            ages.resize(i);\n            ages.shrink_to_fit();\n            cards.resize(i);\n            cards.shrink_to_fit();\n\n            // Request an update, if pruning did modify our data\n            // Required if pruning was scheduled. Redundant if pruning was prior to rendering.\n            requestAutoshow();\n            requestUpdate();\n\n            break;\n        }\n    }\n\n    // Push next scheduled pruning back\n    // Pruning may be called from by handleParsed, immediately prior to rendering\n    // In that case, we can slightly delay our scheduled pruning\n    OSThread::setIntervalFromNow(60 * 1000UL);\n}\n\n// Is a timestamp old enough that it would make a node inactive, and in need of purging?\nbool InkHUD::RecentsListApplet::isActive(uint32_t seenAtMs)\n{\n    uint32_t now = millis();\n    uint32_t secsAgo = (now - seenAtMs) / 1000UL; // millis() overflow safe\n\n    return (secsAgo < settings->recentlyActiveSeconds);\n}\n\n// Text to be shown at top of applet\n// ChronoListApplet base class allows us to set this dynamically\n// Might want to adjust depending on node count, RTC status, etc\nstd::string InkHUD::RecentsListApplet::getHeaderText()\n{\n    std::string text;\n\n    // Print the length of our \"Recents\" time-window\n    text += \"Last \";\n    text += to_string(settings->recentlyActiveSeconds / 60);\n    text += \" mins\";\n\n    // Print the node count\n    const uint16_t nodeCount = ages.size();\n    text += \": \";\n    text += to_string(nodeCount);\n    text += \" \";\n    text += (nodeCount == 1) ? \"node\" : \"nodes\";\n\n    return text;\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nShows a list of nodes which have been recently active\nThe length of this \"recently active\" window is configurable using the onscreen menu\n\nMost of the work is done by the shared InkHUD::NodeListApplet base class\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applets/Bases/NodeList/NodeListApplet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass RecentsListApplet : public NodeListApplet, public concurrency::OSThread\n{\n  protected:\n    // Used internally to count the number of active nodes\n    // We count for ourselves, instead of using the value provided by NodeDB,\n    // as the values occasionally differ, due to the timing of our Applet's purge method\n    struct Age {\n        uint32_t nodeNum;\n        uint32_t seenAtMs;\n    };\n\n  public:\n    RecentsListApplet();\n    void onActivate() override;\n    void onDeactivate() override;\n\n  protected:\n    int32_t runOnce() override;\n\n    void handleParsed(CardInfo c) override; // Store new info, update active count, update display if needed\n    std::string getHeaderText() override;   // Set title for this applet\n\n    void seenNow(NodeNum nodeNum);        // Record that we have just seen this node, for active node count\n    void prune();                         // Remove cards for nodes which we haven't seen recently\n    bool isActive(uint32_t seenAtMillis); // Is a node still active, based on when we last heard it?\n\n    std::deque<Age> ages; // Information about when we last heard nodes. Independent of NodeDB\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./ThreadedMessageApplet.h\"\n\n#include \"RTC.h\"\n#include \"mesh/NodeDB.h\"\n\nusing namespace NicheGraphics;\n\n// Hard limits on how much message data to write to flash\n// Avoid filling the storage if something goes wrong\n// Normal usage should be well below this size\nconstexpr uint8_t MAX_MESSAGES_SAVED = 10;\nconstexpr uint32_t MAX_MESSAGE_SIZE = 250;\n\nInkHUD::ThreadedMessageApplet::ThreadedMessageApplet(uint8_t channelIndex)\n    : SinglePortModule(\"ThreadedMessageApplet\", meshtastic_PortNum_TEXT_MESSAGE_APP), channelIndex(channelIndex)\n{\n    // Create the message store\n    // Will shortly attempt to load messages from RAM, if applet is active\n    // Label (filename in flash) is set from channel index\n    store = new MessageStore(\"ch\" + to_string(channelIndex));\n}\n\nvoid InkHUD::ThreadedMessageApplet::onRender(bool full)\n{\n    // =============\n    // Draw a header\n    // =============\n\n    // Header text\n    std::string headerText;\n    headerText += \"Channel \";\n    headerText += to_string(channelIndex);\n    headerText += \": \";\n    if (channels.isDefaultChannel(channelIndex))\n        headerText += \"Public\";\n    else\n        headerText += channels.getByIndex(channelIndex).settings.name;\n\n    // Draw a \"standard\" applet header\n    drawHeader(headerText);\n\n    // Y position for divider\n    const int16_t dividerY = Applet::getHeaderHeight() - 1;\n\n    // ==================\n    // Draw each message\n    // ==================\n\n    // Restrict drawing area\n    // - don't overdraw the header\n    // - small gap below divider\n    setCrop(0, dividerY + 2, width(), height() - (dividerY + 2));\n\n    // Set padding\n    // - separates text from the vertical line which marks its edge\n    constexpr uint16_t padW = 2;\n    constexpr int16_t msgL = padW;\n    const int16_t msgR = (width() - 1) - padW;\n    const uint16_t msgW = (msgR - msgL) + 1;\n\n    int16_t msgB = height() - 1; // Vertical cursor for drawing. Messages are bottom-aligned to this value.\n    uint8_t i = 0;               // Index of stored message\n\n    // Loop over messages\n    // - until no messages left, or\n    // - until no part of message fits on screen\n    while (msgB >= (0 - fontSmall.lineHeight()) && i < store->messages.size()) {\n\n        // Grab data for message\n        const MessageStore::Message &m = store->messages.at(i);\n        bool outgoing = (m.sender == 0) || (m.sender == myNodeInfo.my_node_num); // Own NodeNum if canned message\n        std::string bodyText = parse(m.text);                                    // Parse any non-ascii chars in the message\n\n        // Cache bottom Y of message text\n        // - Used when drawing vertical line alongside\n        const int16_t dotsB = msgB;\n\n        // Get dimensions for message text\n        uint16_t bodyH = getWrappedTextHeight(msgL, msgW, bodyText);\n        int16_t bodyT = msgB - bodyH;\n\n        // Print message\n        // - if incoming\n        if (!outgoing)\n            printWrapped(msgL, bodyT, msgW, bodyText);\n\n        // Print message\n        // - if outgoing\n        else {\n            if (getTextWidth(bodyText) < width())          // If short,\n                printAt(msgR, bodyT, bodyText, RIGHT);     // print right align\n            else                                           // If long,\n                printWrapped(msgL, bodyT, msgW, bodyText); // need printWrapped(), which doesn't support right align\n        }\n\n        // Move cursor up\n        // - above message text\n        msgB -= bodyH;\n        msgB -= getFont().lineHeight() * 0.2; // Padding between message and header\n\n        // Compose info string\n        // - shortname, if possible, or \"me\"\n        // - time received, if possible\n        std::string info;\n        if (outgoing)\n            info += \"Me\";\n        else {\n            // Check if sender is node db\n            meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(m.sender);\n            if (sender)\n                info += parseShortName(sender); // Handle any unprintable chars in short name\n            else\n                info += hexifyNodeNum(m.sender); // No node info at all. Print the node num\n        }\n\n        std::string timeString = getTimeString(m.timestamp);\n        if (timeString.length() > 0) {\n            info += \" - \";\n            info += timeString;\n        }\n\n        // Print the info string\n        // - Faux bold: printed twice, shifted horizontally by one px\n        printAt(outgoing ? msgR : msgL, msgB, info, outgoing ? RIGHT : LEFT, BOTTOM);\n        printAt(outgoing ? msgR - 1 : msgL + 1, msgB, info, outgoing ? RIGHT : LEFT, BOTTOM);\n\n        // Underline the info string\n        const int16_t divY = msgB;\n        int16_t divL;\n        int16_t divR;\n        if (!outgoing) {\n            // Left side - incoming\n            divL = msgL;\n            divR = getTextWidth(info) + getFont().lineHeight() / 2;\n        } else {\n            // Right side - outgoing\n            divR = msgR;\n            divL = divR - getTextWidth(info) - getFont().lineHeight() / 2;\n        }\n        for (int16_t x = divL; x <= divR; x += 2)\n            drawPixel(x, divY, BLACK);\n\n        // Move cursor up: above info string\n        msgB -= fontSmall.lineHeight();\n\n        // Vertical line alongside message\n        for (int16_t y = msgB; y < dotsB; y += 1)\n            drawPixel(outgoing ? width() - 1 : 0, y, BLACK);\n\n        // Move cursor up: padding before next message\n        msgB -= fontSmall.lineHeight() * 0.5;\n\n        i++;\n    } // End of loop: drawing each message\n\n    // Fade effect:\n    // Area immediately below the divider. Overdraw with sparse white lines.\n    // Make text appear to pass behind the header\n    hatchRegion(0, dividerY + 1, width(), fontSmall.lineHeight() / 3, 2, WHITE);\n\n    // If we've run out of screen to draw messages, we can drop any leftover data from the queue\n    // Those messages have been pushed off the screen-top by newer ones\n    while (i < store->messages.size())\n        store->messages.pop_back();\n}\n\n// Code which runs when the applet begins running\n// This might happen at boot, or if user enables the applet at run-time, via the menu\nvoid InkHUD::ThreadedMessageApplet::onActivate()\n{\n    loadMessagesFromFlash();\n    loopbackOk = true; // Allow us to handle messages generated on the node (canned messages)\n}\n\n// Code which runs when the applet stop running\n// This might be at shutdown, or if the user disables the applet at run-time, via the menu\nvoid InkHUD::ThreadedMessageApplet::onDeactivate()\n{\n    loopbackOk = false; // Slightly reduce our impact if the applet is disabled\n}\n\n// Handle new text messages\n// These might be incoming, from the mesh, or outgoing from phone\n// Each instance of the ThreadMessageApplet will only listen on one specific channel\nProcessMessage InkHUD::ThreadedMessageApplet::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    // Abort if applet fully deactivated\n    if (!isActive())\n        return ProcessMessage::CONTINUE;\n\n    // Abort if wrong channel\n    if (mp.channel != this->channelIndex)\n        return ProcessMessage::CONTINUE;\n\n    // Abort if message was a DM\n    if (mp.to != NODENUM_BROADCAST)\n        return ProcessMessage::CONTINUE;\n\n    // Extract info into our slimmed-down \"StoredMessage\" type\n    MessageStore::Message newMessage;\n    newMessage.timestamp = getValidTime(RTCQuality::RTCQualityDevice, true); // Current RTC time\n    newMessage.sender = mp.from;\n    newMessage.channelIndex = mp.channel;\n    newMessage.text = std::string((const char *)mp.decoded.payload.bytes, mp.decoded.payload.size);\n\n    // Store newest message at front\n    // These records are used when rendering, and also stored in flash at shutdown\n    store->messages.push_front(newMessage);\n\n    // If this was an incoming message, suggest that our applet becomes foreground, if permitted\n    if (getFrom(&mp) != nodeDB->getNodeNum())\n        requestAutoshow();\n\n    // Redraw the applet, perhaps.\n    requestUpdate(); // Want to update display, if applet is foreground\n\n    // Tell Module API to continue informing other firmware components about this message\n    // We're not the only component which is interested in new text messages\n    return ProcessMessage::CONTINUE;\n}\n\n// Don't show notifications for text messages broadcast to our channel, when the applet is displayed\nbool InkHUD::ThreadedMessageApplet::approveNotification(Notification &n)\n{\n    if (n.type == Notification::Type::NOTIFICATION_MESSAGE_BROADCAST && n.getChannel() == channelIndex)\n        return false;\n\n    // None of our business. Allow the notification.\n    else\n        return true;\n}\n\n// Save several recent messages to flash\n// Stores the contents of ThreadedMessageApplet::messages\n// Just enough messages to fill the display\n// Messages are packed \"back-to-back\", to minimize blocks of flash used\nvoid InkHUD::ThreadedMessageApplet::saveMessagesToFlash()\n{\n    // Create a label (will become the filename in flash)\n    std::string label = \"ch\" + to_string(channelIndex);\n\n    store->saveToFlash();\n}\n\n// Load recent messages to flash\n// Fills ThreadedMessageApplet::messages with previous messages\n// Just enough messages have been stored to cover the display\nvoid InkHUD::ThreadedMessageApplet::loadMessagesFromFlash()\n{\n    // Create a label (will become the filename in flash)\n    std::string label = \"ch\" + to_string(channelIndex);\n\n    store->loadFromFlash();\n}\n\n// Code to run when device is shutting down\n// This is in addition to any onDeactivate() code, which will also run\n// Todo: implement before a reboot also\nvoid InkHUD::ThreadedMessageApplet::onShutdown()\n{\n    // Save our current set of messages to flash, provided the applet isn't disabled\n    if (isActive())\n        saveMessagesToFlash();\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nDisplays a thread-view of incoming and outgoing message for a specific channel\n\nThe channel for this applet is set in the constructor,\nwhen the applet is added to WindowManager in the setupNicheGraphics method.\n\nSeveral messages are saved to flash at shutdown, to preserve applet between reboots.\nThis class has its own internal method for saving and loading to fs, which interacts directly with the FSCommon layer.\nIf the amount of flash usage is unacceptable, we could keep these in RAM only.\n\nMultiple instances of this channel may be used. This must be done at buildtime.\nSuggest a max of two channel, to minimize fs usage?\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/InkHUD/Applet.h\"\n#include \"graphics/niche/InkHUD/MessageStore.h\"\n\n#include \"modules/TextMessageModule.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Applet;\n\nclass ThreadedMessageApplet : public Applet, public SinglePortModule\n{\n  public:\n    explicit ThreadedMessageApplet(uint8_t channelIndex);\n    ThreadedMessageApplet() = delete;\n\n    void onRender(bool full) override;\n\n    void onActivate() override;\n    void onDeactivate() override;\n    void onShutdown() override;\n    ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n    bool approveNotification(Notification &n) override; // Which notifications to suppress\n\n  protected:\n    void saveMessagesToFlash();\n    void loadMessagesFromFlash();\n\n    MessageStore *store; // Messages, held in RAM for use, ready to save to flash on shutdown\n    uint8_t channelIndex = 0;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/DisplayHealth.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./DisplayHealth.h\"\n#include \"DisplayHealth.h\"\n\nusing namespace NicheGraphics;\n\n// Timing for \"maintenance\"\n// Paying off full-refresh debt with unprovoked updates, if the display is not very active\nstatic constexpr uint32_t MAINTENANCE_MS_INITIAL = 60 * 1000UL;\nstatic constexpr uint32_t MAINTENANCE_MS = 60 * 60 * 1000UL;\n\nInkHUD::DisplayHealth::DisplayHealth() : concurrency::OSThread(\"Mediator\")\n{\n    // Timer disabled by default\n    OSThread::disable();\n}\n\n// Request which update type we would prefer, when the display image next changes\n// DisplayHealth class will consider our suggestion, and weigh it against other requests\nvoid InkHUD::DisplayHealth::requestUpdateType(Drivers::EInk::UpdateTypes type)\n{\n    // Update our \"working decision\", to decide if this request is important enough to change our plan\n    if (!forced)\n        workingDecision = prioritize(workingDecision, type);\n}\n\n// Demand that a specific update type be used, when the display image next changes\n// Note: multiple DisplayHealth::force calls should not be made,\n// but if they are, the importance of the type will be weighed the same as if both calls were to DisplayHealth::request\nvoid InkHUD::DisplayHealth::forceUpdateType(Drivers::EInk::UpdateTypes type)\n{\n    if (!forced)\n        workingDecision = type;\n    else\n        workingDecision = prioritize(workingDecision, type);\n\n    forced = true;\n}\n\n// Find out which update type the DisplayHealth has chosen for us\n// Calling this method consumes the result, and resets for the next update\nDrivers::EInk::UpdateTypes InkHUD::DisplayHealth::decideUpdateType()\n{\n    LOG_DEBUG(\"FULL-update debt:%f\", debt);\n\n    // For convenience\n    typedef Drivers::EInk::UpdateTypes UpdateTypes;\n\n    // Grab our final decision for the update type, so we can reset now, for the next update\n    // We do this at top of the method, so we can return early\n    UpdateTypes finalDecision = workingDecision;\n    workingDecision = UpdateTypes::UNSPECIFIED;\n    forced = false;\n\n    // Check whether we've paid off enough debt to stop unprovoked refreshing (if in progress)\n    // This maintenance behavior will also have opportunity to halt itself when the timer next fires,\n    // but that could be an hour away, so we can stop it early here and free up resources\n    if (OSThread::enabled && debt == 0.0)\n        endMaintenance();\n\n    // Explicitly requested FULL\n    if (finalDecision == UpdateTypes::FULL) {\n        LOG_DEBUG(\"Explicit FULL\");\n        debt = max(debt - 1.0, 0.0); // Record that we have paid back (some of) the FULL refresh debt\n        return UpdateTypes::FULL;\n    }\n\n    // Explicitly requested FAST\n    if (finalDecision == UpdateTypes::FAST) {\n        LOG_DEBUG(\"Explicit FAST\");\n        // Add to the FULL refresh debt\n        if (debt < 1.0)\n            debt += 1.0 / fastPerFull;\n        else\n            debt += stressMultiplier * (1.0 / fastPerFull); // More debt if too many consecutive FAST refreshes\n\n        // If *significant debt*, begin occasionally refreshing *unprovoked*\n        // This maintenance behavior is only triggered here, by periods of user interaction\n        // Debt would otherwise not be able to climb above 1.0\n        if (debt >= 2.0)\n            beginMaintenance();\n\n        return UpdateTypes::FAST; // Give them what the asked for\n    }\n\n    // Handling UpdateTypes::UNSPECIFIED\n    // -----------------------------------\n    // In this case, the UI doesn't care which refresh we use\n\n    // Not much debt: suggest FAST\n    if (debt < 1.0) {\n        LOG_DEBUG(\"UNSPECIFIED: using FAST\");\n        debt += 1.0 / fastPerFull;\n        return UpdateTypes::FAST;\n    }\n\n    // In debt: suggest FULL\n    else {\n        LOG_DEBUG(\"UNSPECIFIED: using FULL\");\n        debt = max(debt - 1.0, 0.0); // Record that we have paid back (some of) the FULL refresh debt\n\n        // When maintenance begins, the first refresh happens shortly after user interaction ceases (a minute or so)\n        // If we *are* given an opportunity to refresh before that, we'll skip that initial maintenance refresh\n        // We were intending to use that initial refresh to redraw the screen as FULL, but we're doing that now, organically\n        if (OSThread::enabled && OSThread::interval == MAINTENANCE_MS_INITIAL)\n            OSThread::setInterval(MAINTENANCE_MS); // Note: not intervalFromNow\n\n        return UpdateTypes::FULL;\n    }\n}\n\n// Determine which of two update types is more important to honor\n// Explicit FAST is more important than UNSPECIFIED - prioritize responsiveness\n// Explicit FULL is more important than explicit FAST - prioritize image quality: explicit FULL is rare\n// Used when multiple applets have all requested update simultaneously, each with their own preferred UpdateType\nDrivers::EInk::UpdateTypes InkHUD::DisplayHealth::prioritize(Drivers::EInk::UpdateTypes type1, Drivers::EInk::UpdateTypes type2)\n{\n    switch (type1) {\n    case Drivers::EInk::UpdateTypes::UNSPECIFIED:\n        return type2;\n\n    case Drivers::EInk::UpdateTypes::FAST:\n        return (type2 == Drivers::EInk::UpdateTypes::FULL) ? Drivers::EInk::UpdateTypes::FULL : Drivers::EInk::UpdateTypes::FAST;\n\n    case Drivers::EInk::UpdateTypes::FULL:\n        return type1;\n    }\n\n    return Drivers::EInk::UpdateTypes::UNSPECIFIED; // Suppress compiler warning only\n}\n\n// We're using the timer to perform \"maintenance\"\n// If significant FULL-refresh debt has accumulated, we will occasionally run FULL refreshes unprovoked.\n// This prevents gradual build-up of debt,\n// in case we aren't doing enough UNSPECIFIED refreshes to pay the debt back organically.\n// The first refresh takes place shortly after user finishes interacting with the device; this does the bulk of the restoration\n// Subsequent refreshes take place *much* less frequently.\n// Hopefully an applet will want to render before this, meaning we can cancel the maintenance.\nint32_t InkHUD::DisplayHealth::runOnce()\n{\n    if (debt > 0.0) {\n        LOG_DEBUG(\"debt=%f: performing maintenance\", debt);\n\n        // Ask WindowManager to redraw everything, purely for the refresh\n        // Todo: optimize? Could update without re-rendering\n        InkHUD::getInstance()->forceUpdate(Drivers::EInk::UpdateTypes::FULL);\n\n        // Record that we have paid back (some of) the FULL refresh debt\n        debt = max(debt - 1.0, 0.0);\n\n        // Next maintenance refresh scheduled - long wait (an hour?)\n        return MAINTENANCE_MS;\n    }\n\n    else\n        return endMaintenance();\n}\n\n// Begin periodically refreshing the display, to repay FULL-refresh debt\n// We do this in case user doesn't have enough activity to repay it organically, with UpdateTypes::UNSPECIFIED\n// After an initial refresh, to redraw as FULL, we only perform these maintenance refreshes very infrequently\n// This gives the display a chance to heal by evaluating UNSPECIFIED as FULL, which is preferable\nvoid InkHUD::DisplayHealth::beginMaintenance()\n{\n    OSThread::setIntervalFromNow(MAINTENANCE_MS_INITIAL);\n    OSThread::enabled = true;\n}\n\n// FULL-refresh debt is low enough that we no longer need to pay it back with periodic updates\nint32_t InkHUD::DisplayHealth::endMaintenance()\n{\n    return OSThread::disable();\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/DisplayHealth.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nResponsible for maintaining display health, by optimizing the ratio of FAST vs FULL refreshes\n\n- counts number of FULL vs FAST refresh\n- suggests whether to use FAST or FULL, when not explicitly specified\n- periodically requests update unprovoked, if required for display health\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"InkHUD.h\"\n\n#include \"graphics/niche/Drivers/EInk/EInk.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass DisplayHealth : protected concurrency::OSThread\n{\n  public:\n    DisplayHealth();\n\n    void requestUpdateType(Drivers::EInk::UpdateTypes type);\n    void forceUpdateType(Drivers::EInk::UpdateTypes type);\n    Drivers::EInk::UpdateTypes decideUpdateType();\n\n    uint8_t fastPerFull = 5;      // Ideal number of fast refreshes between full refreshes\n    float stressMultiplier = 2.0; // How bad for the display are extra fast refreshes beyond fastPerFull?\n\n  private:\n    int32_t runOnce() override;\n    void beginMaintenance();  // Excessive debt: begin unprovoked refreshing of display, for health\n    int32_t endMaintenance(); // End unprovoked refreshing: debt paid\n\n    Drivers::EInk::UpdateTypes\n    prioritize(Drivers::EInk::UpdateTypes type1,\n               Drivers::EInk::UpdateTypes type2); // Determine which of two update types is more important to honor\n\n    bool forced = false;\n    Drivers::EInk::UpdateTypes workingDecision = Drivers::EInk::UpdateTypes::UNSPECIFIED;\n\n    float debt = 0.0; // How many full refreshes are due\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Events.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./Events.h\"\n\n#include \"RTC.h\"\n#include \"buzz.h\"\n#include \"modules/ExternalNotificationModule.h\"\n#include \"modules/TextMessageModule.h\"\n#include \"sleep.h\"\n\n#include \"./Applet.h\"\n#include \"./SystemApplet.h\"\n#include \"graphics/niche/Utils/FlashData.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::Events::Events()\n{\n    // Get convenient references\n    inkhud = InkHUD::getInstance();\n    settings = &inkhud->persistence->settings;\n}\n\nvoid InkHUD::Events::begin()\n{\n    // Register our callbacks for the various events\n\n    deepSleepObserver.observe(&notifyDeepSleep);\n    rebootObserver.observe(&notifyReboot);\n    textMessageObserver.observe(textMessageModule);\n#if !MESHTASTIC_EXCLUDE_ADMIN\n    adminMessageObserver.observe((Observable<AdminModule_ObserverData *> *)adminModule);\n#endif\n#ifdef ARCH_ESP32\n    lightSleepObserver.observe(&notifyLightSleep);\n#endif\n}\n\nvoid InkHUD::Events::onButtonShort()\n{\n    // Audio feedback (via buzzer)\n    // Short tone\n    playChirp();\n    // Cancel any beeping, buzzing, blinking\n    // Some button handling suppressed if we are dismissing an external notification (see below)\n    bool dismissedExt = dismissExternalNotification();\n\n    // Check which system applet wants to handle the button press (if any)\n    SystemApplet *consumer = nullptr;\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        if (sa->handleInput) {\n            consumer = sa;\n            break;\n        }\n    }\n\n    // If no system applet is handling input, default behavior instead is to cycle applets\n    // or open menu if joystick is enabled\n    if (consumer) {\n        consumer->onButtonShortPress();\n    } else if (!dismissedExt) { // Don't change applet if this button press silenced the external notification module\n        Applet *userConsumer = inkhud->getActiveApplet();\n\n        if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::BUTTON_SHORT))\n            userConsumer->onButtonShortPress();\n        else {\n            if (!settings->joystick.enabled)\n                inkhud->nextApplet();\n            else\n                inkhud->openMenu();\n        }\n    }\n}\n\nvoid InkHUD::Events::onButtonLong()\n{\n    // Audio feedback (via buzzer)\n    // Slightly longer than playChirp\n    playBoop();\n\n    // Check which system applet wants to handle the button press (if any)\n    SystemApplet *consumer = nullptr;\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        if (sa->handleInput) {\n            consumer = sa;\n            break;\n        }\n    }\n\n    // If no system applet is handling input, default behavior instead is to open the menu\n    if (consumer)\n        consumer->onButtonLongPress();\n    else {\n        Applet *userConsumer = inkhud->getActiveApplet();\n\n        if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::BUTTON_LONG))\n            userConsumer->onButtonLongPress();\n        else\n            inkhud->openMenu();\n    }\n}\n\nvoid InkHUD::Events::onExitShort()\n{\n    if (settings->joystick.enabled) {\n        // Audio feedback (via buzzer)\n        // Short tone\n        playChirp();\n        // Cancel any beeping, buzzing, blinking\n        // Some button handling suppressed if we are dismissing an external notification (see below)\n        bool dismissedExt = dismissExternalNotification();\n\n        // Check which system applet wants to handle the button press (if any)\n        SystemApplet *consumer = nullptr;\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa->handleInput) {\n                consumer = sa;\n                break;\n            }\n        }\n\n        // If no system applet is handling input, default behavior instead is change tiles\n        if (consumer)\n            consumer->onExitShort();\n        else if (!dismissedExt) { // Don't change tile if this button press silenced the external notification module\n            Applet *userConsumer = inkhud->getActiveApplet();\n\n            if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::EXIT_SHORT))\n                userConsumer->onExitShort();\n            else\n                inkhud->nextTile();\n        }\n    }\n}\n\nvoid InkHUD::Events::onExitLong()\n{\n    if (settings->joystick.enabled) {\n        // Audio feedback (via buzzer)\n        // Slightly longer than playChirp\n        playBoop();\n\n        // Check which system applet wants to handle the button press (if any)\n        SystemApplet *consumer = nullptr;\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa->handleInput) {\n                consumer = sa;\n                break;\n            }\n        }\n\n        if (consumer)\n            consumer->onExitLong();\n        else {\n            Applet *userConsumer = inkhud->getActiveApplet();\n\n            if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::EXIT_LONG))\n                userConsumer->onExitLong();\n            // Nothing uses exit long yet\n        }\n    }\n}\n\nvoid InkHUD::Events::onNavUp()\n{\n    if (settings->joystick.enabled) {\n        // Audio feedback (via buzzer)\n        // Short tone\n        playChirp();\n        // Cancel any beeping, buzzing, blinking\n        // Some button handling suppressed if we are dismissing an external notification (see below)\n        bool dismissedExt = dismissExternalNotification();\n\n        // Check which system applet wants to handle the button press (if any)\n        SystemApplet *consumer = nullptr;\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa->handleInput) {\n                consumer = sa;\n                break;\n            }\n        }\n\n        if (consumer)\n            consumer->onNavUp();\n        else if (!dismissedExt) {\n            Applet *userConsumer = inkhud->getActiveApplet();\n\n            if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::NAV_UP))\n                userConsumer->onNavUp();\n        }\n    }\n}\n\nvoid InkHUD::Events::onNavDown()\n{\n    if (settings->joystick.enabled) {\n        // Audio feedback (via buzzer)\n        // Short tone\n        playChirp();\n        // Cancel any beeping, buzzing, blinking\n        // Some button handling suppressed if we are dismissing an external notification (see below)\n        bool dismissedExt = dismissExternalNotification();\n\n        // Check which system applet wants to handle the button press (if any)\n        SystemApplet *consumer = nullptr;\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa->handleInput) {\n                consumer = sa;\n                break;\n            }\n        }\n\n        if (consumer)\n            consumer->onNavDown();\n        else if (!dismissedExt) {\n            Applet *userConsumer = inkhud->getActiveApplet();\n\n            if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::NAV_DOWN))\n                userConsumer->onNavDown();\n        }\n    }\n}\n\nvoid InkHUD::Events::onNavLeft()\n{\n    if (settings->joystick.enabled) {\n        // Audio feedback (via buzzer)\n        // Short tone\n        playChirp();\n        // Cancel any beeping, buzzing, blinking\n        // Some button handling suppressed if we are dismissing an external notification (see below)\n        bool dismissedExt = dismissExternalNotification();\n\n        // Check which system applet wants to handle the button press (if any)\n        SystemApplet *consumer = nullptr;\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa->handleInput) {\n                consumer = sa;\n                break;\n            }\n        }\n\n        // If no system applet is handling input, default behavior instead is to cycle applets\n        if (consumer)\n            consumer->onNavLeft();\n        else if (!dismissedExt) { // Don't change applet if this button press silenced the external notification module\n            Applet *userConsumer = inkhud->getActiveApplet();\n\n            if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::NAV_LEFT))\n                userConsumer->onNavLeft();\n            else\n                inkhud->prevApplet();\n        }\n    }\n}\n\nvoid InkHUD::Events::onNavRight()\n{\n    if (settings->joystick.enabled) {\n        // Audio feedback (via buzzer)\n        // Short tone\n        playChirp();\n        // Cancel any beeping, buzzing, blinking\n        // Some button handling suppressed if we are dismissing an external notification (see below)\n        bool dismissedExt = dismissExternalNotification();\n\n        // Check which system applet wants to handle the button press (if any)\n        SystemApplet *consumer = nullptr;\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa->handleInput) {\n                consumer = sa;\n                break;\n            }\n        }\n\n        // If no system applet is handling input, default behavior instead is to cycle applets\n        if (consumer)\n            consumer->onNavRight();\n        else if (!dismissedExt) { // Don't change applet if this button press silenced the external notification module\n            Applet *userConsumer = inkhud->getActiveApplet();\n\n            if (userConsumer != nullptr && userConsumer->isInputSubscribed(Applet::NAV_RIGHT))\n                userConsumer->onNavRight();\n            else\n                inkhud->nextApplet();\n        }\n    }\n}\n\nvoid InkHUD::Events::onFreeText(char c)\n{\n    // Trigger the first system applet that wants to handle the new character\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        if (sa->handleFreeText) {\n            sa->onFreeText(c);\n            break;\n        }\n    }\n}\n\nvoid InkHUD::Events::onFreeTextDone()\n{\n    // Trigger the first system applet that wants to handle it\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        if (sa->handleFreeText) {\n            sa->onFreeTextDone();\n            break;\n        }\n    }\n}\n\nvoid InkHUD::Events::onFreeTextCancel()\n{\n    // Trigger the first system applet that wants to handle it\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        if (sa->handleFreeText) {\n            sa->onFreeTextCancel();\n            break;\n        }\n    }\n}\n\n// Callback for deepSleepObserver\n// Returns 0 to signal that we agree to sleep now\nint InkHUD::Events::beforeDeepSleep(void *unused)\n{\n    // If a previous display update is in progress, wait for it to complete.\n    inkhud->awaitUpdate();\n\n    // Notify all applets that we're shutting down\n    for (Applet *ua : inkhud->userApplets) {\n        ua->onDeactivate();\n        ua->onShutdown();\n    }\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        // Note: no onDeactivate. System applets are always active.\n        sa->onShutdown();\n    }\n\n    // User has successful executed a safe shutdown\n    // We don't need to nag at boot anymore\n    settings->tips.safeShutdownSeen = true;\n\n    inkhud->persistence->saveSettings();\n    inkhud->persistence->saveLatestMessage();\n\n    // LogoApplet::onShutdown attempted to heal the display by drawing a \"shutting down\" screen twice,\n    // then prepared a final powered-off screen for us, which shows device shortname.\n    // We're updating to show that one now.\n\n    inkhud->forceUpdate(Drivers::EInk::UpdateTypes::FULL, true, false);\n    delay(1000); // Cooldown, before potentially yanking display power\n\n    // InkHUD shutdown complete\n    // Firmware shutdown continues for several seconds more; flash write still pending\n    playShutdownMelody();\n\n    return 0; // We agree: deep sleep now\n}\n\n// Display an intermediate screen while configuration changes are applied\nvoid InkHUD::Events::applyingChanges()\n{\n    // Bring the logo applet forward with a temporary message\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        sa->onApplyingChanges();\n    }\n}\n\n// Callback for rebootObserver\n// Same as shutdown, without drawing the logoApplet\n// Makes sure we don't lose message history / InkHUD config\nint InkHUD::Events::beforeReboot(void *unused)\n{\n\n    // Notify all applets that we're \"shutting down\"\n    // They don't need to know that it's really a reboot\n    for (Applet *a : inkhud->userApplets) {\n        a->onDeactivate();\n        a->onShutdown();\n    }\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        // Note: no onDeactivate. System applets are always active.\n        sa->onReboot();\n    }\n\n    // Save settings to flash, or erase if factory reset in progress\n    if (!eraseOnReboot) {\n        inkhud->persistence->saveSettings();\n        inkhud->persistence->saveLatestMessage();\n    } else {\n        NicheGraphics::clearFlashData();\n    }\n\n    // Note: no forceUpdate call here\n    // We don't have any final screen to draw, although LogoApplet::onReboot did already display a \"rebooting\" screen\n\n    return 0; // No special status to report. Ignored anyway by this Observable\n}\n\n// Callback when a new text message is received\n// Caches the most recently received message, for use by applets\n// Rx does not trigger a save to flash, however the data *will* be saved alongside other during shutdown, etc.\n// Note: this is different from devicestate.rx_text_message, which may contain an *outgoing* message\nint InkHUD::Events::onReceiveTextMessage(const meshtastic_MeshPacket *packet)\n{\n    // Short circuit: don't store outgoing messages\n    if (getFrom(packet) == nodeDB->getNodeNum())\n        return 0;\n\n    // Determine whether the message is broadcast or a DM\n    // Store this info to prevent confusion after a reboot\n    // Avoids need to compare timestamps, because of situation where \"future\" messages block newly received, if time not set\n    inkhud->persistence->latestMessage.wasBroadcast = isBroadcast(packet->to);\n\n    // Pick the appropriate variable to store the message in\n    MessageStore::Message *storedMessage = inkhud->persistence->latestMessage.wasBroadcast\n                                               ? &inkhud->persistence->latestMessage.broadcast\n                                               : &inkhud->persistence->latestMessage.dm;\n\n    // Store nodenum of the sender\n    // Applets can use this to fetch user data from nodedb, if they want\n    storedMessage->sender = packet->from;\n\n    // Store the time (epoch seconds) when message received\n    storedMessage->timestamp = getValidTime(RTCQuality::RTCQualityDevice, true); // Current RTC time\n\n    // Store the channel\n    // - (potentially) used to determine whether notification shows\n    // - (potentially) used to determine which applet to focus\n    storedMessage->channelIndex = packet->channel;\n\n    // Store the text\n    // Need to specify manually how many bytes, because source not null-terminated\n    storedMessage->text =\n        std::string(&packet->decoded.payload.bytes[0], &packet->decoded.payload.bytes[packet->decoded.payload.size]);\n\n    return 0; // Tell caller to continue notifying other observers. (No reason to abort this event)\n}\n\nint InkHUD::Events::onAdminMessage(AdminModule_ObserverData *data)\n{\n    switch (data->request->which_payload_variant) {\n    // Factory reset\n    // Two possible messages. One preserves BLE bonds, other wipes. Both should clear InkHUD data.\n    case meshtastic_AdminMessage_factory_reset_device_tag:\n    case meshtastic_AdminMessage_factory_reset_config_tag:\n        eraseOnReboot = true;\n        *data->result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    default:\n        break;\n    }\n\n    return 0; // Tell caller to continue notifying other observers. (No reason to abort this event)\n}\n\n#ifdef ARCH_ESP32\n// Callback for lightSleepObserver\n// Make sure the display is not partway through an update when we begin light sleep\n// This is because some displays require active input from us to terminate the update process, and protect the panel hardware\nint InkHUD::Events::beforeLightSleep(void *unused)\n{\n    inkhud->awaitUpdate();\n    return 0; // No special status to report. Ignored anyway by this Observable\n}\n#endif\n\n// Silence all ongoing beeping, blinking, buzzing, coming from the external notification module\n// Returns true if an external notification was active, and we dismissed it\n// Button handling changes depending on our result\nbool InkHUD::Events::dismissExternalNotification()\n{\n    // Abort if not using external notifications\n    if (!moduleConfig.external_notification.enabled)\n        return false;\n\n    // Abort if nothing to dismiss\n    if (!externalNotificationModule->nagging())\n        return false;\n\n    // Stop the beep buzz blink\n    externalNotificationModule->stopNow();\n\n    // Inform that we did indeed dismiss an external notification\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Events.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#pragma once\n\n/*\n\nHandles non-specific events for InkHUD\n\nIndividual applets are responsible for listening for their own events via the module api etc,\nhowever this class handles general events which concern InkHUD as a whole, e.g. shutdown\n\n*/\n\n#include \"configuration.h\"\n\n#include \"modules/AdminModule.h\"\n\n#include \"./InkHUD.h\"\n#include \"./Persistence.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Events\n{\n  public:\n    Events();\n    void begin();\n\n    void onButtonShort(); // User button: short press\n    void onButtonLong();  // User button: long press\n    void applyingChanges();\n    void onExitShort(); // Exit button: short press\n    void onExitLong();  // Exit button: long press\n    void onNavUp();     // Navigate up\n    void onNavDown();   // Navigate down\n    void onNavLeft();   // Navigate left\n    void onNavRight();  // Navigate right\n\n    // Free text typing events\n    void onFreeText(char c); // New freetext character input\n    void onFreeTextDone();\n    void onFreeTextCancel();\n\n    int beforeDeepSleep(void *unused);                             // Prepare for shutdown\n    int beforeReboot(void *unused);                                // Prepare for reboot\n    int onReceiveTextMessage(const meshtastic_MeshPacket *packet); // Store most recent text message\n    int onAdminMessage(AdminModule_ObserverData *data);            // Handle incoming admin messages\n#ifdef ARCH_ESP32\n    int beforeLightSleep(void *unused); // Prepare for light sleep\n#endif\n\n  private:\n    // For convenience\n    InkHUD *inkhud = nullptr;\n    Persistence::Settings *settings = nullptr;\n\n    // Get notified when the system is shutting down\n    CallbackObserver<Events, void *> deepSleepObserver = CallbackObserver<Events, void *>(this, &Events::beforeDeepSleep);\n\n    // Get notified when the system is rebooting\n    CallbackObserver<Events, void *> rebootObserver = CallbackObserver<Events, void *>(this, &Events::beforeReboot);\n\n    // Cache *incoming* text messages, for use by applets\n    CallbackObserver<Events, const meshtastic_MeshPacket *> textMessageObserver =\n        CallbackObserver<Events, const meshtastic_MeshPacket *>(this, &Events::onReceiveTextMessage);\n\n    // Get notified of incoming admin messages, and handle any which are relevant to InkHUD\n    CallbackObserver<Events, AdminModule_ObserverData *> adminMessageObserver =\n        CallbackObserver<Events, AdminModule_ObserverData *>(this, &Events::onAdminMessage);\n\n#ifdef ARCH_ESP32\n    // Get notified when the system is entering light sleep\n    CallbackObserver<Events, void *> lightSleepObserver = CallbackObserver<Events, void *>(this, &Events::beforeLightSleep);\n#endif\n\n    // End any externalNotification beeping, buzzing, blinking etc\n    bool dismissExternalNotification();\n\n    // If set, InkHUD's data will be erased during onReboot\n    bool eraseOnReboot = false;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/InkHUD.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./InkHUD.h\"\n\n#include \"./Applet.h\"\n#include \"./Events.h\"\n#include \"./Persistence.h\"\n#include \"./Renderer.h\"\n#include \"./SystemApplet.h\"\n#include \"./Tile.h\"\n#include \"./WindowManager.h\"\n\nusing namespace NicheGraphics;\n\n// Get or create the singleton\nInkHUD::InkHUD *InkHUD::InkHUD::getInstance()\n{\n    // Create the singleton instance of our class, if not yet done\n    static InkHUD *instance = nullptr;\n    if (!instance) {\n        instance = new InkHUD;\n\n        instance->persistence = new Persistence;\n        instance->windowManager = new WindowManager;\n        instance->renderer = new Renderer;\n        instance->events = new Events;\n    }\n\n    return instance;\n}\n\n// Connect the (fully set-up) E-Ink driver to InkHUD\n// Should happen in your variant's nicheGraphics.h file, before InkHUD::begin is called\nvoid InkHUD::InkHUD::setDriver(Drivers::EInk *driver)\n{\n    renderer->setDriver(driver);\n}\n\n// Set the target number of FAST display updates in a row, before a FULL update is used for display health\n// This value applies only to updates with an UNSPECIFIED update type\n// If explicitly requested FAST updates exceed this target, the stressMultiplier parameter determines how many\n// subsequent FULL updates will be performed, in an attempt to restore the display's health\nvoid InkHUD::InkHUD::setDisplayResilience(uint8_t fastPerFull, float stressMultiplier)\n{\n    renderer->setDisplayResilience(fastPerFull, stressMultiplier);\n}\n\n// Register a user applet with InkHUD\n// A variant's nicheGraphics.h file should instantiate your chosen applets, then pass them to this method\n// Passing an applet to this method is all that is required to make it available to the user in your InkHUD build\nvoid InkHUD::InkHUD::addApplet(const char *name, Applet *a, bool defaultActive, bool defaultAutoshow, uint8_t onTile)\n{\n    windowManager->addApplet(name, a, defaultActive, defaultAutoshow, onTile);\n}\n\nvoid InkHUD::InkHUD::notifyApplyingChanges()\n{\n    if (events) {\n        events->applyingChanges();\n    }\n}\n\n// Start InkHUD!\n// Call this only after you have configured InkHUD\nvoid InkHUD::InkHUD::begin()\n{\n    persistence->loadSettings();\n    persistence->loadLatestMessage();\n\n    windowManager->begin();\n    events->begin();\n    renderer->begin();\n    // LogoApplet shows boot screen here\n}\n\n// Call this when your user button gets a short press\n// Should be connected to an input source in nicheGraphics.h (NicheGraphics::Inputs::TwoButton?)\nvoid InkHUD::InkHUD::shortpress()\n{\n    events->onButtonShort();\n}\n\n// Call this when your user button gets a long press\n// Should be connected to an input source in nicheGraphics.h (NicheGraphics::Inputs::TwoButton?)\nvoid InkHUD::InkHUD::longpress()\n{\n    events->onButtonLong();\n}\n\n// Call this when your exit button gets a short press\nvoid InkHUD::InkHUD::exitShort()\n{\n    events->onExitShort();\n}\n\n// Call this when your exit button gets a long press\nvoid InkHUD::InkHUD::exitLong()\n{\n    events->onExitLong();\n}\n\n// Call this when your joystick gets an up input\nvoid InkHUD::InkHUD::navUp()\n{\n    switch ((persistence->settings.rotation + persistence->settings.joystick.alignment) % 4) {\n    case 1: // 90 deg\n        events->onNavLeft();\n        break;\n    case 2: // 180 deg\n        events->onNavDown();\n        break;\n    case 3: // 270 deg\n        events->onNavRight();\n        break;\n    default: // 0 deg\n        events->onNavUp();\n        break;\n    }\n}\n\n// Call this when your joystick gets a down input\nvoid InkHUD::InkHUD::navDown()\n{\n    switch ((persistence->settings.rotation + persistence->settings.joystick.alignment) % 4) {\n    case 1: // 90 deg\n        events->onNavRight();\n        break;\n    case 2: // 180 deg\n        events->onNavUp();\n        break;\n    case 3: // 270 deg\n        events->onNavLeft();\n        break;\n    default: // 0 deg\n        events->onNavDown();\n        break;\n    }\n}\n\n// Call this when your joystick gets a left input\nvoid InkHUD::InkHUD::navLeft()\n{\n    switch ((persistence->settings.rotation + persistence->settings.joystick.alignment) % 4) {\n    case 1: // 90 deg\n        events->onNavDown();\n        break;\n    case 2: // 180 deg\n        events->onNavRight();\n        break;\n    case 3: // 270 deg\n        events->onNavUp();\n        break;\n    default: // 0 deg\n        events->onNavLeft();\n        break;\n    }\n}\n\n// Call this when your joystick gets a right input\nvoid InkHUD::InkHUD::navRight()\n{\n    switch ((persistence->settings.rotation + persistence->settings.joystick.alignment) % 4) {\n    case 1: // 90 deg\n        events->onNavUp();\n        break;\n    case 2: // 180 deg\n        events->onNavLeft();\n        break;\n    case 3: // 270 deg\n        events->onNavDown();\n        break;\n    default: // 0 deg\n        events->onNavRight();\n        break;\n    }\n}\n\n// Call this for keyboard input\n// The Keyboard Applet also calls this\nvoid InkHUD::InkHUD::freeText(char c)\n{\n    events->onFreeText(c);\n}\n\n// Call this to complete a freetext input\nvoid InkHUD::InkHUD::freeTextDone()\n{\n    events->onFreeTextDone();\n}\n\n// Call this to cancel a freetext input\nvoid InkHUD::InkHUD::freeTextCancel()\n{\n    events->onFreeTextCancel();\n}\n\n// Cycle the next user applet to the foreground\n// Only activated applets are cycled\n// If user has a multi-applet layout, the applets will cycle on the \"focused tile\"\nvoid InkHUD::InkHUD::nextApplet()\n{\n    windowManager->nextApplet();\n}\n\n// Cycle the previous user applet to the foreground\n// Only activated applets are cycled\n// If user has a multi-applet layout, the applets will cycle on the \"focused tile\"\nvoid InkHUD::InkHUD::prevApplet()\n{\n    windowManager->prevApplet();\n}\n\n// Returns the currently active applet\nInkHUD::Applet *InkHUD::InkHUD::getActiveApplet()\n{\n    return windowManager->getActiveApplet();\n}\n\n// Show the menu (on the the focused tile)\n// The applet previously displayed there will be restored once the menu closes\nvoid InkHUD::InkHUD::openMenu()\n{\n    windowManager->openMenu();\n}\n\n// Bring AlignStick applet to the foreground\nvoid InkHUD::InkHUD::openAlignStick()\n{\n    windowManager->openAlignStick();\n}\n\n// Open the on-screen keyboard\nvoid InkHUD::InkHUD::openKeyboard()\n{\n    windowManager->openKeyboard();\n}\n\n// Close the on-screen keyboard\nvoid InkHUD::InkHUD::closeKeyboard()\n{\n    windowManager->closeKeyboard();\n}\n\n// In layouts where multiple applets are shown at once, change which tile is focused\n// The focused tile in the one which cycles applets on button short press, and displays menu on long press\nvoid InkHUD::InkHUD::nextTile()\n{\n    windowManager->nextTile();\n}\n\n// In layouts where multiple applets are shown at once, change which tile is focused\n// The focused tile in the one which cycles applets on button short press, and displays menu on long press\nvoid InkHUD::InkHUD::prevTile()\n{\n    windowManager->prevTile();\n}\n\n// Rotate the display image by 90 degrees\nvoid InkHUD::InkHUD::rotate()\n{\n    windowManager->rotate();\n}\n\n// rotate the joystick in 90 degree increments\nvoid InkHUD::InkHUD::rotateJoystick(uint8_t angle)\n{\n    persistence->settings.joystick.alignment += angle;\n    persistence->settings.joystick.alignment %= 4;\n}\n\n// Show / hide the battery indicator in top-right\nvoid InkHUD::InkHUD::toggleBatteryIcon()\n{\n    windowManager->toggleBatteryIcon();\n}\n\n// An applet asking for the display to be updated\n// This does not occur immediately\n// Instead, rendering is scheduled ASAP, for the next Renderer::runOnce call\n// This allows multiple applets to observe the same event, and then share the same opportunity to update\n// Applets should requestUpdate, whether or not they are currently displayed (\"foreground\")\n// This is because they *might* be automatically brought to foreground by WindowManager::autoshow\nvoid InkHUD::InkHUD::requestUpdate()\n{\n    renderer->requestUpdate();\n}\n\n// Demand that the display be updated\n// Ignores all diplomacy:\n//  - the display *will* update\n//  - the specified update type *will* be used\n// If the all parameter is true, the whole screen buffer is cleared and re-rendered\n// If the async parameter is false, code flow is blocked while the update takes place\nvoid InkHUD::InkHUD::forceUpdate(EInk::UpdateTypes type, bool all, bool async)\n{\n    renderer->forceUpdate(type, all, async);\n}\n\n// Wait for any in-progress display update to complete before continuing\nvoid InkHUD::InkHUD::awaitUpdate()\n{\n    renderer->awaitUpdate();\n}\n\n// Ask the window manager to potentially bring a different user applet to foreground\n// An applet will be brought to foreground if it has just received new and relevant info\n// For Example: AllMessagesApplet has just received a new text message\n// Permission for this autoshow behavior is granted by the user, on an applet-by-applet basis\n// If autoshow brings an applet to foreground, an InkHUD notification will not be generated for the same event\nvoid InkHUD::InkHUD::autoshow()\n{\n    windowManager->autoshow();\n}\n\n// Tell the window manager that the Persistence::Settings value for applet activation has changed,\n// and that it should reconfigure accordingly.\n// This is triggered at boot, or when the user enables / disabled applets via the on-screen menu\nvoid InkHUD::InkHUD::updateAppletSelection()\n{\n    windowManager->changeActivatedApplets();\n}\n\n// Tell the window manager that the Persistence::Settings value for layout or rotation has changed,\n// and that it should reconfigure accordingly.\n// This is triggered at boot, or by rotate / layout options in the on-screen menu\nvoid InkHUD::InkHUD::updateLayout()\n{\n    windowManager->changeLayout();\n}\n\n// Width of the display, in the context of the current rotation\nuint16_t InkHUD::InkHUD::width()\n{\n    return renderer->width();\n}\n\n// Height of the display, in the context of the current rotation\nuint16_t InkHUD::InkHUD::height()\n{\n    return renderer->height();\n}\n\n// A collection of any user tiles which do not have a valid user applet\n// This can occur in various situations, such as when a user enables fewer applets than their layout has tiles\n// The tiles (and which regions the occupy) are private information of the window manager\n// The renderer needs to know which regions (if any) are empty,\n// in order to fill them with a \"placeholder\" pattern.\n// -- There may be a tidier way to accomplish this --\nstd::vector<InkHUD::Tile *> InkHUD::InkHUD::getEmptyTiles()\n{\n    return windowManager->getEmptyTiles();\n}\n\n// Get a system applet by its name\n// This isn't particularly elegant, but it does avoid:\n// - passing around a big set of references\n// - having two sets of references (systemApplet vector for iteration)\nInkHUD::SystemApplet *InkHUD::InkHUD::getSystemApplet(const char *name)\n{\n    for (SystemApplet *sa : systemApplets) {\n        if (strcmp(name, sa->name) == 0)\n            return sa;\n    }\n\n    assert(false); // Invalid name\n}\n\n// Place a pixel into the image buffer\n// The x and y coordinates are in the context of the current display rotation\n// - Applets pass \"relative\" pixels to tiles\n// - Tiles pass translated pixels to this method\n// - this methods (Renderer) places rotated pixels into the image buffer\n// This method provides the final formatting step required. The image buffer is suitable for writing to display\nvoid InkHUD::InkHUD::drawPixel(int16_t x, int16_t y, Color c)\n{\n    renderer->handlePixel(x, y, c);\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/InkHUD.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\n    InkHUD's main class\n    - singleton\n    - mediator between the various components\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"graphics/niche/Drivers/EInk/EInk.h\"\n\n#include \"./AppletFont.h\"\n\n#include <vector>\n\nnamespace NicheGraphics::InkHUD\n{\n\n// Color, understood by display controller IC (as bit values)\n// Also suitable for use as AdafruitGFX colors\nenum Color : uint8_t {\n    BLACK = 0,\n    WHITE = 1,\n};\n\nclass Applet;\nclass Events;\nclass Persistence;\nclass Renderer;\nclass SystemApplet;\nclass Tile;\nclass WindowManager;\n\nclass InkHUD\n{\n  public:\n    static InkHUD *getInstance(); // Access to this singleton class\n\n    // Configuration\n    // - before InkHUD::begin, in variant nicheGraphics.h,\n\n    void setDriver(Drivers::EInk *driver);\n    void setDisplayResilience(uint8_t fastPerFull = 5, float stressMultiplier = 2.0);\n    void addApplet(const char *name, Applet *a, bool defaultActive = false, bool defaultAutoshow = false, uint8_t onTile = -1);\n    void notifyApplyingChanges();\n\n    void begin();\n\n    // Handle user-button press\n    // - connected to an input source, in variant nicheGraphics.h\n\n    void shortpress();\n    void longpress();\n    void exitShort();\n    void exitLong();\n    void navUp();\n    void navDown();\n    void navLeft();\n    void navRight();\n\n    // Freetext handlers\n    void freeText(char c);\n    void freeTextDone();\n    void freeTextCancel();\n\n    // Trigger UI changes\n    // - called by various InkHUD components\n    // - suitable(?) for use by aux button, connected in variant nicheGraphics.h\n\n    void nextApplet();\n    void prevApplet();\n    NicheGraphics::InkHUD::Applet *getActiveApplet();\n    void openMenu();\n    void openAlignStick();\n    void openKeyboard();\n    void closeKeyboard();\n    void nextTile();\n    void prevTile();\n    void rotate();\n    void rotateJoystick(uint8_t angle = 1); // rotate 90 deg by default\n    void toggleBatteryIcon();\n\n    // Used by TipsApplet to force menu to start on Region selection\n    bool forceRegionMenu = false;\n\n    // Input mode hint for devices that use a left/right rocker plus center button\n    bool twoWayRocker = false;\n\n    // Updating the display\n    // - called by various InkHUD components\n\n    void requestUpdate();\n    void forceUpdate(Drivers::EInk::UpdateTypes type = Drivers::EInk::UpdateTypes::UNSPECIFIED, bool all = false,\n                     bool async = true);\n    void awaitUpdate();\n\n    // (Re)configuring WindowManager\n\n    void autoshow();              // Bring an applet to foreground\n    void updateAppletSelection(); // Change which applets are active\n    void updateLayout();          // Change multiplexing (count, rotation)\n\n    // Information passed between components\n\n    uint16_t width();                    // From E-Ink driver\n    uint16_t height();                   // From E-Ink driver\n    std::vector<Tile *> getEmptyTiles(); // From WindowManager\n\n    // Applets\n\n    SystemApplet *getSystemApplet(const char *name);\n    std::vector<Applet *> userApplets;\n    std::vector<SystemApplet *> systemApplets;\n\n    // Pass drawing output to Renderer\n    void drawPixel(int16_t x, int16_t y, Color c);\n\n    // Shared data which persists between boots\n    Persistence *persistence = nullptr;\n\n  private:\n    InkHUD() {} // Constructor made private to force use of InkHUD::getInstance\n\n    Events *events = nullptr;               // Handle non-specific firmware events\n    Renderer *renderer = nullptr;           // Co-ordinate display updates\n    WindowManager *windowManager = nullptr; // Multiplexing of applets\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/MessageStore.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./MessageStore.h\"\n\n#include \"SafeFile.h\"\n\nusing namespace NicheGraphics;\n\n// Hard limits on how much message data to write to flash\n// Avoid filling the storage if something goes wrong\n// Normal usage should be well below this size\nconstexpr uint8_t MAX_MESSAGES_SAVED = 10;\nconstexpr uint32_t MAX_MESSAGE_SIZE = 250;\n\nInkHUD::MessageStore::MessageStore(const std::string &label)\n{\n    filename = \"\";\n    filename += \"/NicheGraphics\";\n    filename += \"/\";\n    filename += label;\n    filename += \".msgs\";\n}\n\n// Write the contents of the MessageStore::messages object to flash\n// Takes the firmware's SPI lock during FS operations. Implemented for consistency, but only relevant when using SD card.\n// Need to lock and unlock around specific FS methods, as the SafeFile class takes the lock for itself internally\nvoid InkHUD::MessageStore::saveToFlash()\n{\n    assert(!filename.empty());\n\n#ifdef FSCom\n    // Make the directory, if doesn't already exist\n    // This is the same directory accessed by NicheGraphics::FlashData\n    spiLock->lock();\n    FSCom.mkdir(\"/NicheGraphics\");\n    spiLock->unlock();\n\n    // Open or create the file\n    // No \"full atomic\": don't save then rename\n    auto f = SafeFile(filename.c_str(), false);\n\n    LOG_INFO(\"Saving messages in %s\", filename.c_str());\n\n    // Take firmware's SPI Lock while writing\n    spiLock->lock();\n\n    // 1st byte: how many messages will be written to store\n    f.write(messages.size());\n\n    // For each message\n    for (uint8_t i = 0; i < messages.size() && i < MAX_MESSAGES_SAVED; i++) {\n        Message &m = messages.at(i);\n        f.write(reinterpret_cast<const uint8_t *>(&m.timestamp), sizeof(m.timestamp));       // Write timestamp. 4 bytes\n        f.write(reinterpret_cast<const uint8_t *>(&m.sender), sizeof(m.sender));             // Write sender NodeId. 4 Bytes\n        f.write(reinterpret_cast<const uint8_t *>(&m.channelIndex), sizeof(m.channelIndex)); // Write channel index. 1 Byte\n        f.write(reinterpret_cast<const uint8_t *>(m.text.c_str()), min(MAX_MESSAGE_SIZE, m.text.size())); // Write message text\n        f.write('\\0');                                                                                    // Append null term\n        LOG_DEBUG(\"Wrote message %u, length %u, text \\\"%s\\\"\", static_cast<uint32_t>(i), min(MAX_MESSAGE_SIZE, m.text.size()),\n                  m.text.c_str());\n    }\n\n    // Release firmware's SPI lock, because SafeFile::close needs it\n    spiLock->unlock();\n\n    bool writeSucceeded = f.close();\n\n    if (!writeSucceeded) {\n        LOG_ERROR(\"Can't write data!\");\n    }\n#else\n    LOG_ERROR(\"ERROR: Filesystem not implemented\\n\");\n#endif\n}\n\n// Attempt to load the previous contents of the MessageStore:message deque from flash.\n// Filename is controlled by the \"label\" parameter\n// Takes the firmware's SPI lock during FS operations. Implemented for consistency, but only relevant when using SD card.\nvoid InkHUD::MessageStore::loadFromFlash()\n{\n    // Hopefully redundant. Initial intention is to only load / save once per boot.\n    messages.clear();\n\n#ifdef FSCom\n\n    // Take the firmware's SPI Lock, in case filesystem is on SD card\n    concurrency::LockGuard guard(spiLock);\n\n    // Check that the file *does* actually exist\n    if (!FSCom.exists(filename.c_str())) {\n        LOG_WARN(\"'%s' not found. Using default values\", filename.c_str());\n        return;\n    }\n\n    // Check that the file *does* actually exist\n    if (!FSCom.exists(filename.c_str())) {\n        LOG_INFO(\"'%s' not found.\", filename.c_str());\n        return;\n    }\n\n    // Open the file\n    auto f = FSCom.open(filename.c_str(), FILE_O_READ);\n\n    if (f.size() == 0) {\n        LOG_INFO(\"%s is empty\", filename.c_str());\n        f.close();\n        return;\n    }\n\n    // If opened, start reading\n    if (f) {\n        LOG_INFO(\"Loading threaded messages '%s'\", filename.c_str());\n\n        // First byte: how many messages are in the flash store\n        uint8_t flashMessageCount = 0;\n        f.readBytes(reinterpret_cast<char *>(&flashMessageCount), 1);\n        LOG_DEBUG(\"Messages available: %u\", static_cast<uint32_t>(flashMessageCount));\n\n        // For each message\n        for (uint8_t i = 0; i < flashMessageCount && i < MAX_MESSAGES_SAVED; i++) {\n            Message m;\n\n            // Read meta data (fixed width)\n            f.readBytes(reinterpret_cast<char *>(&m.timestamp), sizeof(m.timestamp));\n            f.readBytes(reinterpret_cast<char *>(&m.sender), sizeof(m.sender));\n            f.readBytes(reinterpret_cast<char *>(&m.channelIndex), sizeof(m.channelIndex));\n\n            // Read characters until we find a null term\n            char c;\n            while (m.text.size() < MAX_MESSAGE_SIZE) {\n                f.readBytes(&c, 1);\n                if (c != '\\0')\n                    m.text += c;\n                else\n                    break;\n            }\n\n            // Store in RAM\n            messages.push_back(m);\n\n            LOG_DEBUG(\"#%u, timestamp=%u, sender(num)=%u, text=\\\"%s\\\"\", static_cast<uint32_t>(i), m.timestamp, m.sender,\n                      m.text.c_str());\n        }\n\n        f.close();\n    } else {\n        LOG_ERROR(\"Could not open / read %s\", filename.c_str());\n    }\n#else\n    LOG_ERROR(\"Filesystem not implemented\");\n    state = LoadFileState::NO_FILESYSTEM;\n#endif\n    return;\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/MessageStore.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nWe hold a few recent messages, for features like the threaded message applet.\nThis class contains a struct for storing those messages,\nand methods for serializing them to flash.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include <deque>\n\n#include \"mesh/MeshTypes.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass MessageStore\n{\n  public:\n    // A stored message\n    struct Message {\n        uint32_t timestamp; // Epoch seconds\n        NodeNum sender = 0;\n        uint8_t channelIndex;\n        std::string text;\n    };\n\n    MessageStore() = delete;\n    explicit MessageStore(const std::string &label); // Label determines filename in flash\n\n    void saveToFlash();\n    void loadFromFlash();\n\n    std::deque<Message> messages; // Interact with this object!\n\n  private:\n    std::string filename;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Persistence.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./Persistence.h\"\n\nusing namespace NicheGraphics;\n\n// Load settings and latestMessage data\nvoid InkHUD::Persistence::loadSettings()\n{\n    // Load the InkHUD settings from flash, and check version number\n    // We should only consider the version number if the InkHUD flashdata component reports that we *did* actually load flash data\n    Settings loadedSettings;\n    bool loadSucceeded = FlashData<Settings>::load(&loadedSettings, \"settings\");\n    if (loadSucceeded && loadedSettings.meta.version == SETTINGS_VERSION && loadedSettings.meta.version != 0)\n        settings = loadedSettings; // Version matched, replace the defaults with the loaded values\n    else\n        LOG_WARN(\"Settings version changed. Using defaults\");\n}\n\n// Load settings and latestMessage data\nvoid InkHUD::Persistence::loadLatestMessage()\n{\n    // Load previous \"latestMessages\" data from flash\n    MessageStore store(\"latest\");\n    store.loadFromFlash();\n\n    // Place into latestMessage struct, for convenient access\n    // Number of strings loaded determines whether last message was broadcast or dm\n    if (store.messages.size() == 1) {\n        latestMessage.dm = store.messages.at(0);\n        latestMessage.wasBroadcast = false;\n    } else if (store.messages.size() == 2) {\n        latestMessage.dm = store.messages.at(0);\n        latestMessage.broadcast = store.messages.at(1);\n        latestMessage.wasBroadcast = true;\n    }\n}\n\n// Save the InkHUD settings to flash\nvoid InkHUD::Persistence::saveSettings()\n{\n    FlashData<Settings>::save(&settings, \"settings\");\n}\n\n// Save latestMessage data to flash\nvoid InkHUD::Persistence::saveLatestMessage()\n{\n    // Number of strings saved determines whether last message was broadcast or dm\n    MessageStore store(\"latest\");\n    store.messages.push_back(latestMessage.dm);\n    if (latestMessage.wasBroadcast)\n        store.messages.push_back(latestMessage.broadcast);\n    store.saveToFlash();\n}\n\n/*\nvoid InkHUD::Persistence::printSettings(Settings *settings)\n{\n    if (SETTINGS_VERSION != 2)\n        LOG_WARN(\"Persistence::printSettings was written for SETTINGS_VERSION=2, current is %d\", SETTINGS_VERSION);\n\n    LOG_DEBUG(\"meta.version=%d\", settings->meta.version);\n    LOG_DEBUG(\"userTiles.count=%d\", settings->userTiles.count);\n    LOG_DEBUG(\"userTiles.maxCount=%d\", settings->userTiles.maxCount);\n    LOG_DEBUG(\"userTiles.focused=%d\", settings->userTiles.focused);\n    for (uint8_t i = 0; i < MAX_TILES_GLOBAL; i++)\n        LOG_DEBUG(\"userTiles.displayedUserApplet[%d]=%d\", i, settings->userTiles.displayedUserApplet[i]);\n    for (uint8_t i = 0; i < MAX_USERAPPLETS_GLOBAL; i++)\n        LOG_DEBUG(\"userApplets.active[%d]=%d\", i, settings->userApplets.active[i]);\n    for (uint8_t i = 0; i < MAX_USERAPPLETS_GLOBAL; i++)\n        LOG_DEBUG(\"userApplets.autoshow[%d]=%d\", i, settings->userApplets.autoshow[i]);\n    LOG_DEBUG(\"optionalFeatures.notifications=%d\", settings->optionalFeatures.notifications);\n    LOG_DEBUG(\"optionalFeatures.batteryIcon=%d\", settings->optionalFeatures.batteryIcon);\n    LOG_DEBUG(\"optionalMenuItems.nextTile=%d\", settings->optionalMenuItems.nextTile);\n    LOG_DEBUG(\"optionalMenuItems.backlight=%d\", settings->optionalMenuItems.backlight);\n    LOG_DEBUG(\"tips.firstBoot=%d\", settings->tips.firstBoot);\n    LOG_DEBUG(\"tips.safeShutdownSeen=%d\", settings->tips.safeShutdownSeen);\n    LOG_DEBUG(\"rotation=%d\", settings->rotation);\n    LOG_DEBUG(\"recentlyActiveSeconds=%d\", settings->recentlyActiveSeconds);\n}\n*/\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Persistence.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nA quick and dirty alternative to storing \"device only\" settings using the protobufs\nConvenient during development.\nPotentially a polite option, to avoid polluting the generated code with values for obscure use cases like this.\n\nThe save / load mechanism is a shared NicheGraphics feature.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"./InkHUD.h\"\n#include \"graphics/niche/InkHUD/MessageStore.h\"\n#include \"graphics/niche/Utils/FlashData.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Persistence\n{\n  public:\n    static constexpr uint8_t MAX_TILES_GLOBAL = 4;\n    static constexpr uint8_t MAX_USERAPPLETS_GLOBAL = 16;\n\n    // Used to invalidate old settings, if needed\n    // Version 0 is reserved for testing, and will always load defaults\n    static constexpr uint32_t SETTINGS_VERSION = 3;\n\n    struct Settings {\n        struct Meta {\n            // Used to invalidate old savefiles, if we make breaking changes\n            uint32_t version = SETTINGS_VERSION;\n        } meta;\n\n        struct UserTiles {\n            // How many tiles are shown\n            uint8_t count = 1;\n\n            // Maximum amount of tiles for this display\n            uint8_t maxCount = 4;\n\n            // Which tile is focused (responding to user button input)\n            uint8_t focused = 0;\n\n            // Which applet is displayed on which tile\n            // Index of array: which tile, as indexed in WindowManager::userTiles\n            // Value of array: which applet, as indexed in InkHUD::userApplets\n            uint8_t displayedUserApplet[MAX_TILES_GLOBAL] = {0, 1, 2, 3};\n        } userTiles;\n\n        struct UserApplets {\n            // Which applets are running (either displayed, or in the background)\n            // Index of array: which applet, as indexed in InkHUD::userApplets\n            // Initial value is set by the \"activeByDefault\" parameter of InkHUD::addApplet, in setupNicheGraphics method\n            bool active[MAX_USERAPPLETS_GLOBAL]{false};\n\n            // Which user applets should be automatically shown when they have important data to show\n            // If none set, foreground applets should remain foreground without manual user input\n            // If multiple applets request this at once,\n            // priority is the order which they were passed to InkHUD::addApplets, in setupNicheGraphics method\n            bool autoshow[MAX_USERAPPLETS_GLOBAL]{false};\n        } userApplets;\n\n        // Features which the user can enable / disable via the on-screen menu\n        struct OptionalFeatures {\n            bool notifications = true;\n            bool batteryIcon = false;\n        } optionalFeatures;\n\n        // Some menu items may not be required, based on device / configuration\n        // We can enable them only when needed, to de-clutter the menu\n        struct OptionalMenuItems {\n            // If aux button is used to swap between tiles, we have no need for this menu item\n            bool nextTile = true;\n\n            // Used if backlight present, and not controlled by AUX button\n            // If this item is added to menu: backlight is always active when menu is open\n            // The added menu items then allows the user to \"Keep Backlight On\", globally.\n            bool backlight = false;\n        } optionalMenuItems;\n\n        // Allows tips to be run once only\n        struct Tips {\n            // Enables the longer \"tutorial\" shown only on first boot\n            // Once tutorial has been completed, it is no longer shown\n            bool firstBoot = true;\n\n            // User is advised to shut down before removing device power\n            // Once user executes a shutdown (either via menu or client app),\n            // this tip is no longer shown\n            bool safeShutdownSeen = false;\n        } tips;\n\n        // Joystick settings for enabling and aligning to the screen\n        struct Joystick {\n            // Modifies the UI for joystick use\n            bool enabled = false;\n\n            // gets set to true when AlignStick applet is completed\n            bool aligned = false;\n\n            // Rotation of the joystick\n            // Multiples of 90 degrees clockwise\n            uint8_t alignment = 0;\n        } joystick;\n\n        // Rotation of the display\n        // Multiples of 90 degrees clockwise\n        // Most commonly: rotation is 0 when flex connector is oriented below display\n        uint8_t rotation = 0;\n\n        // How long do we consider another node to be \"active\"?\n        // Used when applets want to filter for \"active nodes\" only\n        uint32_t recentlyActiveSeconds = 2 * 60;\n    };\n\n    // Most recently received text message\n    // Value is updated by InkHUD::WindowManager, as a courtesy to applets\n    // Note: different from devicestate.rx_text_message,\n    // which may contain an *outgoing message* to broadcast\n    struct LatestMessage {\n        MessageStore::Message broadcast; // Most recent message received broadcast\n        MessageStore::Message dm;        // Most recent received DM\n        bool wasBroadcast;               // True if most recent broadcast is newer than most recent dm\n    };\n\n    void loadSettings();\n    void saveSettings();\n    void loadLatestMessage();\n    void saveLatestMessage();\n\n    // void printSettings(Settings *settings); // Debugging use only\n\n    Settings settings;\n    LatestMessage latestMessage;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/PlatformioConfig.ini",
    "content": "[inkhud]\nbuild_src_filter = \n  +<graphics/niche/>; Include the nicheGraphics directory\nbuild_flags = \n  -D MESHTASTIC_INCLUDE_NICHE_GRAPHICS ; Use NicheGraphics\n  -D MESHTASTIC_INCLUDE_INKHUD ; Use InkHUD (a NicheGraphics UI)\n  -D MESHTASTIC_EXCLUDE_SCREEN ; Suppress default Screen class\n  -D MESHTASTIC_EXCLUDE_INPUTBROKER ; Suppress default input handling\n  -D HAS_BUTTON=0 ; Suppress default ButtonThread\nlib_deps =\n  # renovate: datasource=github-tags depName=GFX_Root packageName=ZinggJM/GFX_Root\n  https://github.com/ZinggJM/GFX_Root/archive/3195764e352a0d2567c8d277ac408ca7293a99b0.zip ; Used by InkHUD as a \"slimmer\" version of AdafruitGFX\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Renderer.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./Renderer.h\"\n\n#include \"main.h\"\n\n#include \"./Applet.h\"\n#include \"./SystemApplet.h\"\n#include \"./Tile.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::Renderer::Renderer() : concurrency::OSThread(\"Renderer\")\n{\n    // Nothing for the timer to do just yet\n    OSThread::disable();\n\n    // Convenient references\n    inkhud = InkHUD::getInstance();\n    settings = &inkhud->persistence->settings;\n}\n\n// Connect the (fully set-up) E-Ink driver to InkHUD\n// Should happen in your variant's nicheGraphics.h file, before InkHUD::begin is called\nvoid InkHUD::Renderer::setDriver(Drivers::EInk *driver)\n{\n    // Make sure not already set\n    if (this->driver) {\n        LOG_ERROR(\"Driver already set\");\n        delay(2000); // Wait for native serial..\n        assert(false);\n    }\n\n    // Store the driver which was created in setupNicheGraphics()\n    this->driver = driver;\n\n    // Determine the dimensions of the image buffer, in bytes.\n    // Along rows, pixels are stored 8 per byte.\n    // Not all display widths are divisible by 8. Need to make sure bytecount accommodates padding for these.\n    imageBufferWidth = ((driver->width - 1) / 8) + 1;\n    imageBufferHeight = driver->height;\n\n    // Allocate the image buffer\n    imageBuffer = new uint8_t[imageBufferWidth * imageBufferHeight];\n}\n\n// Set the target number of FAST display updates in a row, before a FULL update is used for display health\n// This value applies only to updates with an UNSPECIFIED update type\n// If explicitly requested FAST updates exceed this target, the stressMultiplier parameter determines how many\n// subsequent FULL updates will be performed, in an attempt to restore the display's health\nvoid InkHUD::Renderer::setDisplayResilience(uint8_t fastPerFull, float stressMultiplier)\n{\n    displayHealth.fastPerFull = fastPerFull;\n    displayHealth.stressMultiplier = stressMultiplier;\n}\n\nvoid InkHUD::Renderer::begin()\n{\n    forceUpdate(Drivers::EInk::UpdateTypes::FULL, true, false);\n}\n\n// Set a flag, which will be picked up by runOnce, ASAP.\n// Quite likely, multiple applets will all want to respond to one event (Observable, etc)\n// Each affected applet can independently call requestUpdate(), and all share the one opportunity to render, at next runOnce\nvoid InkHUD::Renderer::requestUpdate(bool all)\n{\n    requested = true;\n    renderAll |= all;\n\n    // We will run the thread as soon as we loop(),\n    // after all Applets have had a chance to observe whatever event set this off\n    OSThread::setIntervalFromNow(0);\n    OSThread::enabled = true;\n    runASAP = true;\n}\n\n// requestUpdate will not actually update if no requests were made by applets which are actually visible\n// This can occur, because applets requestUpdate even from the background,\n// in case the user's autoshow settings permit them to be moved to foreground.\n// Sometimes, however, we will want to trigger a display update manually, in the absence of any sort of applet event\n// Display health, for example.\n// In these situations, we use forceUpdate\nvoid InkHUD::Renderer::forceUpdate(Drivers::EInk::UpdateTypes type, bool all, bool async)\n{\n    requested = true;\n    forced = true;\n    renderAll |= all;\n    displayHealth.forceUpdateType(type);\n\n    // Normally, we need to start the timer, in case the display is busy and we briefly defer the update\n    if (async) {\n        // We will run the thread as soon as we loop(),\n        // after all Applets have had a chance to observe whatever event set this off\n        OSThread::setIntervalFromNow(0);\n        OSThread::enabled = true;\n        runASAP = true;\n    }\n\n    // If the update is *not* asynchronous, we begin the render process directly here\n    // so that it can block code flow while running\n    else\n        render(false);\n}\n\n// Wait for any in-progress display update to complete before continuing\nvoid InkHUD::Renderer::awaitUpdate()\n{\n    if (driver->busy()) {\n        LOG_INFO(\"Waiting for display\");\n        driver->await(); // Wait here for update to complete\n    }\n}\n\n// Set a ready-to-draw pixel into the image buffer\n// All rotations / translations have already taken place: this buffer data is formatted ready for the driver\nvoid InkHUD::Renderer::handlePixel(int16_t x, int16_t y, Color c)\n{\n    rotatePixelCoords(&x, &y);\n\n    uint32_t byteNum = (y * imageBufferWidth) + (x / 8); // X data is 8 pixels per byte\n    uint8_t bitNum = 7 - (x % 8); // Invert order: leftmost bit (most significant) is leftmost pixel of byte.\n\n    bitWrite(imageBuffer[byteNum], bitNum, c);\n}\n\n// Width of the display, relative to rotation\nuint16_t InkHUD::Renderer::width()\n{\n    if (settings->rotation % 2)\n        return driver->height;\n    else\n        return driver->width;\n}\n\n// Height of the display, relative to rotation\nuint16_t InkHUD::Renderer::height()\n{\n    if (settings->rotation % 2)\n        return driver->width;\n    else\n        return driver->height;\n}\n\n// Runs at regular intervals\n// - postponing render: until next loop(), allowing all applets to be notified of some Mesh event before render\n// - queuing another render: while one is already is progress\nint32_t InkHUD::Renderer::runOnce()\n{\n    // If an applet asked to render, and hardware is able, lets try now\n    if (requested && !driver->busy()) {\n        render();\n    }\n\n    // If our render() call failed, try again shortly\n    // otherwise, stop our thread until next update due\n    if (requested)\n        return 250UL;\n    else\n        return OSThread::disable();\n}\n\n// Applies the system-wide rotation to pixel positions\n// This step is applied to image data which has already been translated by a Tile object\n// This is the final step before the pixel is placed into the image buffer\n// No return: values of the *x and *y parameters are modified by the method\nvoid InkHUD::Renderer::rotatePixelCoords(int16_t *x, int16_t *y)\n{\n    // Apply a global rotation to pixel locations\n    int16_t x1 = 0;\n    int16_t y1 = 0;\n    switch (settings->rotation) {\n    case 0:\n        x1 = *x;\n        y1 = *y;\n        break;\n    case 1:\n        x1 = (driver->width - 1) - *y;\n        y1 = *x;\n        break;\n    case 2:\n        x1 = (driver->width - 1) - *x;\n        y1 = (driver->height - 1) - *y;\n        break;\n    case 3:\n        x1 = *y;\n        y1 = (driver->height - 1) - *x;\n        break;\n    }\n    *x = x1;\n    *y = y1;\n}\n\n// Make an attempt to gather image data from some / all applets, and update the display\n// Might not be possible right now, if update already is progress.\nvoid InkHUD::Renderer::render(bool async)\n{\n    // Make sure the display is ready for a new update\n    if (async) {\n        // Previous update still running, Will try again shortly, via runOnce()\n        if (driver->busy())\n            return;\n    } else {\n        // Wait here for previous update to complete\n        driver->await();\n    }\n\n    // Determine if a system applet has requested exclusive rights to request an update,\n    // or exclusive rights to render\n    checkLocks();\n\n    // (Potentially) change applet to display new info,\n    // then check if this newly displayed applet makes a pending notification redundant\n    inkhud->autoshow();\n\n    // If an update is justified.\n    // We don't know this until after autoshow has run, as new applets may now be in foreground\n    if (shouldUpdate()) {\n\n        // Decide which technique the display will use to change image\n        // Done early, as rendering resets the Applets' requested types\n        Drivers::EInk::UpdateTypes updateType = decideUpdateType();\n\n        // Render the new image\n        if (renderAll)\n            clearBuffer();\n        renderUserApplets();\n        renderPlaceholders();\n        renderSystemApplets();\n\n        // Invert Buffer if set by user\n        if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) {\n            for (size_t i = 0; i < imageBufferWidth * imageBufferHeight; ++i) {\n                imageBuffer[i] = ~imageBuffer[i];\n            }\n        }\n\n        // Tell display to begin process of drawing new image\n        LOG_INFO(\"Updating display\");\n        driver->update(imageBuffer, updateType);\n\n        // If not async, wait here until the update is complete\n        if (!async)\n            driver->await();\n    }\n\n    // Our part is done now.\n    // If update is async, the display hardware is still performing the update process,\n    // but that's all handled by NicheGraphics::Drivers::EInk\n\n    // Tidy up, ready for a new request\n    requested = false;\n    forced = false;\n    renderAll = false;\n}\n\n// Manually fill the image buffer with WHITE\n// Clears any old drawing\n// Note: benchmarking revealed that this is *much* faster than setting pixels individually\n// So much so that it's more efficient to re-render all applets,\n// rather than rendering selectively, and manually blanking a portion of the display\nvoid InkHUD::Renderer::clearBuffer()\n{\n    memset(imageBuffer, 0xFF, imageBufferHeight * imageBufferWidth);\n}\n\n// Manually clear the pixels below a tile\nvoid InkHUD::Renderer::clearTile(Tile *t)\n{\n    // Rotate the tile dimensions\n    int16_t left = 0;\n    int16_t top = 0;\n    uint16_t tileW = 0;\n    uint16_t tileH = 0;\n    switch (settings->rotation) {\n    case 0:\n        left = t->getLeft();\n        top = t->getTop();\n        tileW = t->getWidth();\n        tileH = t->getHeight();\n        break;\n    case 1:\n        left = driver->width - (t->getTop() + t->getHeight());\n        top = t->getLeft();\n        tileW = t->getHeight();\n        tileH = t->getWidth();\n        break;\n    case 2:\n        left = driver->width - (t->getLeft() + t->getWidth());\n        top = driver->height - (t->getTop() + t->getHeight());\n        tileW = t->getWidth();\n        tileH = t->getHeight();\n        break;\n    case 3:\n        left = t->getTop();\n        top = driver->height - (t->getLeft() + t->getWidth());\n        tileW = t->getHeight();\n        tileH = t->getWidth();\n        break;\n    }\n\n    // Calculate the bounds to clear\n    uint16_t xStart = (left < 0) ? 0 : left;\n    uint16_t yStart = (top < 0) ? 0 : top;\n    if (xStart >= driver->width || yStart >= driver->height || left + tileW < 0 || top + tileH < 0)\n        return; // the box is completely off the screen\n    uint16_t xEnd = left + tileW;\n    uint16_t yEnd = top + tileH;\n    if (xEnd > driver->width)\n        xEnd = driver->width;\n    if (yEnd > driver->height)\n        yEnd = driver->height;\n\n    // Clear the pixels\n    if (xStart == 0 && xEnd == driver->width) { // full width box is easier to clear\n        memset(imageBuffer + (yStart * imageBufferWidth), 0xFF, (yEnd - yStart) * imageBufferWidth);\n    } else {\n        const uint16_t byteStart = (xStart / 8) + 1;\n        const uint16_t byteEnd = xEnd / 8;\n        const uint8_t leadingByte = 0xFF >> (xStart - ((byteStart - 1) * 8));\n        const uint8_t trailingByte = (0xFF00 >> (xEnd - (byteEnd * 8))) & 0xFF;\n        for (uint16_t i = yStart * imageBufferWidth; i < yEnd * imageBufferWidth; i += imageBufferWidth) {\n            // Set the leading byte\n            imageBuffer[i + byteStart - 1] |= leadingByte;\n\n            // Set the continuous bytes\n            if (byteStart < byteEnd)\n                memset(imageBuffer + i + byteStart, 0xFF, byteEnd - byteStart);\n\n            // Set the trailing byte\n            if (byteEnd != imageBufferWidth)\n                imageBuffer[i + byteEnd] |= trailingByte;\n        }\n    }\n}\n\nvoid InkHUD::Renderer::checkLocks()\n{\n    lockRendering = nullptr;\n    lockRequests = nullptr;\n\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        if (!lockRendering && sa->lockRendering && sa->isForeground()) {\n            lockRendering = sa;\n        }\n        if (!lockRequests && sa->lockRequests && sa->isForeground()) {\n            lockRequests = sa;\n        }\n    }\n}\n\nbool InkHUD::Renderer::shouldUpdate()\n{\n    bool should = false;\n\n    // via forceUpdate\n    should |= forced;\n\n    // via a system applet (which has locked update requests)\n    if (lockRequests) {\n        should |= lockRequests->wantsToRender();\n        return should; // Early exit - no other requests considered\n    }\n\n    // via system applet (not locked)\n    for (SystemApplet *sa : inkhud->systemApplets) {\n        if (sa->wantsToRender()    // This applet requested\n            && sa->isForeground()) // This applet is currently shown\n        {\n            should = true;\n            break;\n        }\n    }\n\n    // via user applet\n    for (Applet *ua : inkhud->userApplets) {\n        if (ua                     // Tile has valid applet\n            && ua->wantsToRender() // This applet requested display update\n            && ua->isForeground()) // This applet is currently shown\n        {\n            should = true;\n            break;\n        }\n    }\n\n    return should;\n}\n\n// Determine which type of E-Ink update the display will perform, to change the image.\n// Considers the needs of the various applets, then weighs against display health.\n// An update type specified by forceUpdate will be granted with no further questioning.\nDrivers::EInk::UpdateTypes InkHUD::Renderer::decideUpdateType()\n{\n    // Ask applets which update type they would prefer\n    // Some update types take priority over others\n\n    // No need to consider the \"requests\" if somebody already forced an update\n    if (!forced) {\n        // User applets\n        for (Applet *ua : inkhud->userApplets) {\n            if (ua && ua->isForeground() && (ua->wantsToRender() || renderAll))\n                displayHealth.requestUpdateType(ua->wantsUpdateType());\n        }\n        // System Applets\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa && sa->isForeground() && (sa->wantsToRender() || sa->alwaysRender || renderAll))\n                displayHealth.requestUpdateType(sa->wantsUpdateType());\n        }\n    }\n\n    return displayHealth.decideUpdateType();\n}\n\n// Run the drawing operations of any user applets which are currently displayed\n// Pixel output is placed into the framebuffer, ready for handoff to the EInk driver\nvoid InkHUD::Renderer::renderUserApplets()\n{\n    // Don't render user applets if a system applet has demanded the whole display to itself\n    if (lockRendering)\n        return;\n\n    // Render any user applets which are currently visible\n    for (Applet *ua : inkhud->userApplets) {\n        if (ua && ua->isActive() && ua->isForeground() && (ua->wantsToRender() || renderAll)) {\n\n            // Clear the tile unless the applet wants to draw over its previous render\n            // or everything is getting re-rendered anyways\n            if (ua->wantsFullRender() && !renderAll)\n                clearTile(ua->getTile());\n\n            uint32_t start = millis();\n            bool full = ua->wantsFullRender() || renderAll;\n            ua->render(full); // Draw!\n            uint32_t stop = millis();\n            LOG_DEBUG(\"%s took %dms to render\", ua->name, stop - start);\n        }\n    }\n}\n\n// Run the drawing operations of any system applets which are currently displayed\n// Pixel output is placed into the framebuffer, ready for handoff to the EInk driver\nvoid InkHUD::Renderer::renderSystemApplets()\n{\n    SystemApplet *battery = inkhud->getSystemApplet(\"BatteryIcon\");\n    SystemApplet *menu = inkhud->getSystemApplet(\"Menu\");\n    SystemApplet *notifications = inkhud->getSystemApplet(\"Notification\");\n\n    // Each system applet\n    for (SystemApplet *sa : inkhud->systemApplets) {\n\n        // Skip if not shown\n        if (!sa->isForeground())\n            continue;\n\n        if (!sa->wantsToRender() && !sa->alwaysRender && !renderAll)\n            continue;\n\n        // Skip if locked by another applet\n        if (lockRendering && lockRendering != sa)\n            continue;\n\n        // Don't draw the battery or notifications overtop the menu\n        // Todo: smarter way to handle this\n        if (menu->isForeground() && (sa == battery || sa == notifications))\n            continue;\n\n        assert(sa->getTile());\n\n        // Clear the tile unless the applet wants to draw over its previous render\n        // or everything is getting re-rendered anyways\n        if (sa->wantsFullRender() && !renderAll)\n            clearTile(sa->getTile());\n\n        // uint32_t start = millis();\n        bool full = sa->wantsFullRender() || renderAll;\n        sa->render(full); // Draw!\n        // uint32_t stop = millis();\n        // LOG_DEBUG(\"%s took %dms to render\", sa->name, stop - start);\n    }\n}\n\n// In some situations (e.g. layout or applet selection changes),\n// a user tile can end up without an assigned applet.\n// In this case, we will fill the empty space with diagonal lines.\nvoid InkHUD::Renderer::renderPlaceholders()\n{\n    // Don't fill empty space with placeholders if a system applet wants exclusive use of the display\n    if (lockRendering)\n        return;\n\n    // Ask the window manager which tiles are empty\n    std::vector<Tile *> emptyTiles = inkhud->getEmptyTiles();\n\n    // No empty tiles\n    if (emptyTiles.size() == 0)\n        return;\n\n    SystemApplet *placeholder = inkhud->getSystemApplet(\"Placeholder\");\n\n    // uint32_t start = millis();\n    for (Tile *t : emptyTiles) {\n        t->assignApplet(placeholder);\n        // Clear the tile unless everything is getting re-rendered\n        if (!renderAll)\n            clearTile(t);\n        placeholder->render(true); // full render\n        t->assignApplet(nullptr);\n    }\n    // uint32_t stop = millis();\n    // LOG_DEBUG(\"Placeholders took %dms to render\", stop - start);\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Renderer.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nOrchestrates updating of the display image\n\n- takes requests (or demands) for display update\n- performs the various steps of the rendering operation\n- interfaces with the E-Ink driver\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"./DisplayHealth.h\"\n#include \"./InkHUD.h\"\n#include \"./Persistence.h\"\n#include \"graphics/niche/Drivers/EInk/EInk.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Renderer : protected concurrency::OSThread\n{\n\n  public:\n    Renderer();\n\n    // Configuration, before begin\n\n    void setDriver(Drivers::EInk *driver);\n    void setDisplayResilience(uint8_t fastPerFull, float stressMultiplier);\n\n    void begin();\n\n    // Call these to make the image change\n\n    void requestUpdate(bool all = false); // Update display, if a foreground applet has info it wants to show\n    void forceUpdate(Drivers::EInk::UpdateTypes type = Drivers::EInk::UpdateTypes::UNSPECIFIED, bool all = false,\n                     bool async = true); // Update display, regardless of whether any applets requested this\n\n    // Wait for an update to complete\n    void awaitUpdate();\n\n    // Receives pixel output from an applet (via a tile, which translates the coordinates)\n    void handlePixel(int16_t x, int16_t y, Color c);\n\n    // Size of display, in context of current rotation\n\n    uint16_t width();\n    uint16_t height();\n\n  private:\n    // Make attempts to render / update, once triggered by requestUpdate or forceUpdate\n    int32_t runOnce() override;\n\n    // Apply the display rotation to handled pixels\n    void rotatePixelCoords(int16_t *x, int16_t *y);\n\n    // Execute the render process now, then hand off to driver for display update\n    void render(bool async = true);\n\n    // Steps of the rendering process\n\n    void clearBuffer();\n    void clearTile(Tile *t);\n    void checkLocks();\n    bool shouldUpdate();\n    Drivers::EInk::UpdateTypes decideUpdateType();\n    void renderUserApplets();\n    void renderSystemApplets();\n    void renderPlaceholders();\n\n    Drivers::EInk *driver = nullptr; // Interacts with your variants display hardware\n    DisplayHealth displayHealth;     // Manages display health by controlling type of update\n\n    uint8_t *imageBuffer = nullptr; // Fed into driver\n    uint16_t imageBufferHeight = 0;\n    uint16_t imageBufferWidth = 0;\n    uint32_t imageBufferSize = 0; // Bytes\n\n    SystemApplet *lockRendering = nullptr; // Render this applet *only*\n    SystemApplet *lockRequests = nullptr;  // Honor update requests from this applet *only*\n\n    bool requested = false;\n    bool forced = false;\n    bool renderAll = false;\n\n    // For convenience\n    InkHUD *inkhud = nullptr;\n    Persistence::Settings *settings = nullptr;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/SystemApplet.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nAn applet with nonstandard behavior, which will require special handling\n\nFor features like the menu, and the battery icon.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"./Applet.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass SystemApplet : public Applet\n{\n  public:\n    // System applets have the right to:\n\n    bool handleInput = false;    // - respond to input from the user button\n    bool handleFreeText = false; // - respond to free text input\n    bool lockRendering = false;  // - prevent other applets from being rendered during an update\n    bool lockRequests = false;   // - prevent other applets from triggering display updates\n    bool alwaysRender = false;   // - render every time the screen is updated\n\n    virtual void onReboot() { onShutdown(); } // - handle reboot specially\n    virtual void onApplyingChanges() {}\n\n    // Other system applets may take precedence over our own system applet though\n    // The order an applet is passed to WindowManager::addSystemApplet determines this hierarchy (added earlier = higher rank)\n\n  private:\n    // System applets are always running (active), but may not be visible (foreground)\n\n    void onActivate() override {}\n    void onDeactivate() override {}\n};\n\n}; // namespace NicheGraphics::InkHUD\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/Tile.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./Tile.h\"\n\n#include \"concurrency/Periodic.h\"\n\nusing namespace NicheGraphics;\n\n// Static members of Tile class (for linking)\nInkHUD::Tile *InkHUD::Tile::highlightTarget;\nbool InkHUD::Tile::highlightShown;\n\n// For dismissing the highlight indicator, after a few seconds\n// Highlighting is used to inform user of which tile is now focused\nstatic concurrency::Periodic *taskHighlight;\nstatic int32_t runtaskHighlight()\n{\n    LOG_DEBUG(\"Dismissing Highlight\");\n    InkHUD::Tile::highlightShown = false;\n    InkHUD::Tile::highlightTarget = nullptr;\n    InkHUD::InkHUD::getInstance()->forceUpdate(Drivers::EInk::UpdateTypes::FAST, true); // Re-render, clearing the highlighting\n    return taskHighlight->disable();\n}\nstatic void inittaskHighlight()\n{\n    static bool doneOnce = false;\n    if (!doneOnce) {\n        taskHighlight = new concurrency::Periodic(\"Highlight\", runtaskHighlight);\n        taskHighlight->disable();\n        doneOnce = true;\n    }\n}\n\nInkHUD::Tile::Tile()\n{\n    inkhud = InkHUD::getInstance();\n\n    inittaskHighlight();\n    Tile::highlightTarget = nullptr;\n    Tile::highlightShown = false;\n}\n\nInkHUD::Tile::Tile(int16_t left, int16_t top, uint16_t width, uint16_t height)\n{\n    assert(width > 0 && height > 0);\n\n    this->left = left;\n    this->top = top;\n    this->width = width;\n    this->height = height;\n}\n\n// Set the region of the tile automatically, based on the user's chosen layout\n// This method places tiles which will host user applets\n// The WindowManager multiplexes the applets to these tiles automatically\nvoid InkHUD::Tile::setRegion(uint8_t userTileCount, uint8_t tileIndex)\n{\n    uint16_t displayWidth = inkhud->width();\n    uint16_t displayHeight = inkhud->height();\n\n    bool landscape = displayWidth > displayHeight;\n\n    // Check for any stray tiles\n    if (tileIndex > (userTileCount - 1)) {\n        // Dummy values to prevent rendering\n        LOG_WARN(\"Tile index out of bounds\");\n        left = -2;\n        top = -2;\n        width = 1;\n        height = 1;\n        return;\n    }\n\n    // Todo: special handling for 3 tile layout\n\n    // Gutters between tiles\n    const uint16_t spacing = 4;\n\n    switch (userTileCount) {\n    // One tile only\n    case 1:\n        left = 0;\n        top = 0;\n        width = displayWidth;\n        height = displayHeight;\n        break;\n\n    // Two tiles\n    case 2:\n        if (landscape) {\n            // Side by side\n            left = ((displayWidth / 2) + (spacing / 2)) * tileIndex;\n            top = 0;\n            width = (displayWidth / 2) - (spacing / 2);\n            height = displayHeight;\n        } else {\n            // Above and below\n            left = 0;\n            top = 0 + (((displayHeight / 2) + (spacing / 2)) * tileIndex);\n            width = displayWidth;\n            height = (displayHeight / 2) - (spacing / 2);\n        }\n        break;\n\n    // Four tiles\n    case 4:\n        width = (displayWidth / 2) - (spacing / 2);\n        height = (displayHeight / 2) - (spacing / 2);\n        switch (tileIndex) {\n        case 0:\n            left = 0;\n            top = 0;\n            break;\n        case 1:\n            left = 0 + (width - 1) + spacing;\n            top = 0;\n            break;\n        case 2:\n            left = 0;\n            top = 0 + (height - 1) + spacing;\n            break;\n        case 3:\n            left = 0 + (width - 1) + spacing;\n            top = 0 + (height - 1) + spacing;\n            break;\n        }\n        break;\n\n    default:\n        LOG_ERROR(\"Unsupported tile layout\");\n        assert(0);\n    }\n\n    assert(width > 0 && height > 0);\n}\n\n// Manually set the region for a tile\n// This is only done for tiles which will host certain \"System Applets\", which have unique position / sizes:\n// Things like the NotificationApplet, BatteryIconApplet, etc\nvoid InkHUD::Tile::setRegion(int16_t left, int16_t top, uint16_t width, uint16_t height)\n{\n    assert(width > 0 && height > 0);\n\n    this->left = left;\n    this->top = top;\n    this->width = width;\n    this->height = height;\n}\n\n// Place an applet onto a tile\n// Creates a reciprocal link between applet and tile\n// The tile should always know which applet is displayed\n// The applet should always know which tile it is display on\n// This is enforced with asserts\n// Assigning a new applet will break a previous link\n// Link may also be broken by assigning a nullptr\nvoid InkHUD::Tile::assignApplet(Applet *a)\n{\n    // Break the link between old applet and this tile\n    if (assignedApplet)\n        assignedApplet->setTile(nullptr);\n\n    // Store the new applet\n    assignedApplet = a;\n\n    // Create the reciprocal link between the new applet and this tile\n    if (a)\n        a->setTile(this);\n}\n\n// Get pointer to whichever applet is displayed on this tile\nInkHUD::Applet *InkHUD::Tile::getAssignedApplet()\n{\n    return assignedApplet;\n}\n\n// Receive drawing output from the assigned applet,\n// and translate it from \"applet-space\" coordinates, to it's true location.\n// The final \"rotation\" step is performed by the windowManager\nvoid InkHUD::Tile::handleAppletPixel(int16_t x, int16_t y, Color c)\n{\n    // Move pixels from applet-space to tile-space\n    x += left;\n    y += top;\n\n    // Crop to tile borders\n    if (x >= left && x < (left + width) && y >= top && y < (top + height)) {\n        // Pass to the renderer\n        inkhud->drawPixel(x, y, c);\n    }\n}\n\n// Used in Renderer for clearing the tile\nint16_t InkHUD::Tile::getLeft()\n{\n    return left;\n}\n\n// Used in Renderer for clearing the tile\nint16_t InkHUD::Tile::getTop()\n{\n    return top;\n}\n\n// Called by Applet base class, when setting applet dimensions, immediately before render\nuint16_t InkHUD::Tile::getWidth()\n{\n    return width;\n}\n\n// Called by Applet base class, when setting applet dimensions, immediately before render\nuint16_t InkHUD::Tile::getHeight()\n{\n    return height;\n}\n\n// Longest edge of the display, in pixels\n// A 296px x 250px display will return 296, for example\n// Maximum possible size of any tile's width / height\n// Used by some components to allocate resources for the \"worst possible situation\"\n// \"Sizing the cathedral for christmas eve\"\nuint16_t InkHUD::Tile::maxDisplayDimension()\n{\n    InkHUD *inkhud = InkHUD::getInstance();\n    return max(inkhud->height(), inkhud->width());\n}\n\n// Ask for this tile to be highlighted\n// Used to indicate which tile is now indicated after focus changes\n// Only used for aux button focus changes, not changes via menu\nvoid InkHUD::Tile::requestHighlight()\n{\n    Tile::highlightTarget = this;\n    Tile::highlightShown = false;\n    inkhud->forceUpdate(Drivers::EInk::UpdateTypes::FAST, true);\n}\n\n// Starts the timer which will automatically dismiss the highlighting, if the tile doesn't organically redraw first\nvoid InkHUD::Tile::startHighlightTimeout()\n{\n    taskHighlight->setIntervalFromNow(5 * 1000UL);\n    taskHighlight->enabled = true;\n}\n\n// Stop the timer which would automatically dismiss the highlighting\n// Called if the tile organically renders before the timer is up\nvoid InkHUD::Tile::cancelHighlightTimeout()\n{\n    if (taskHighlight->enabled)\n        taskHighlight->disable();\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/Tile.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\n    Class which represents a region of the display area\n    Applets are assigned to a tile\n    Tile controls the Applet's dimensions\n    Tile receives pixel output from the applet, and translates it to the correct display region\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"./Applet.h\"\n\n#include \"./InkHUD.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass Tile\n{\n  public:\n    Tile();\n    Tile(int16_t left, int16_t top, uint16_t width, uint16_t height);\n\n    void setRegion(uint8_t layoutSize, uint8_t tileIndex);                      // Assign region automatically, based on layout\n    void setRegion(int16_t left, int16_t top, uint16_t width, uint16_t height); // Assign region manually\n    void handleAppletPixel(int16_t x, int16_t y, Color c);                      // Receive px output from assigned applet\n    int16_t getLeft();\n    int16_t getTop();\n    uint16_t getWidth();\n    uint16_t getHeight();\n    static uint16_t maxDisplayDimension(); // Largest possible width / height any tile may ever encounter\n\n    void assignApplet(Applet *a); // Link an applet with this tile\n    Applet *getAssignedApplet();  // Applet which is currently linked with this tile\n\n    void requestHighlight();              // Ask for this tile to be highlighted\n    static void startHighlightTimeout();  // Start the auto-dismissal timer\n    static void cancelHighlightTimeout(); // Cancel the auto-dismissal timer early; already dismissed\n\n    static Tile *highlightTarget; // Which tile are we highlighting? (Intending to highlight?)\n    static bool highlightShown;   // Is the tile highlighted yet? Controls highlight vs dismiss\n\n  private:\n    InkHUD *inkhud = nullptr;\n\n    int16_t left = 0;\n    int16_t top = 0;\n    uint16_t width = 0;\n    uint16_t height = 0;\n\n    Applet *assignedApplet = nullptr; // Pointer to the applet which is currently linked with the tile\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/WindowManager.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n#include \"./WindowManager.h\"\n\n#include \"./Applets/System/AlignStick/AlignStickApplet.h\"\n#include \"./Applets/System/BatteryIcon/BatteryIconApplet.h\"\n#include \"./Applets/System/Keyboard/KeyboardApplet.h\"\n#include \"./Applets/System/Logo/LogoApplet.h\"\n#include \"./Applets/System/Menu/MenuApplet.h\"\n#include \"./Applets/System/Notification/NotificationApplet.h\"\n#include \"./Applets/System/Pairing/PairingApplet.h\"\n#include \"./Applets/System/Placeholder/PlaceholderApplet.h\"\n#include \"./Applets/System/Tips/TipsApplet.h\"\n#include \"./SystemApplet.h\"\n\nusing namespace NicheGraphics;\n\nInkHUD::WindowManager::WindowManager()\n{\n    // Convenient references\n    inkhud = InkHUD::getInstance();\n    settings = &inkhud->persistence->settings;\n}\n\n// Register a user applet with InkHUD\n// This is called in setupNicheGraphics()\n// This should be the only time that specific user applets are mentioned in the code\n// If a user applet is not added with this method, its code should not be built\n// Call before begin\nvoid InkHUD::WindowManager::addApplet(const char *name, Applet *a, bool defaultActive, bool defaultAutoshow, uint8_t onTile)\n{\n    inkhud->userApplets.push_back(a);\n\n    // If requested, mark in settings that this applet should be active by default\n    // This means that it will be available for the user to cycle to with short-press of the button\n    // This is the default state only: user can activate or deactivate applets through the menu.\n    // User's choice of active applets is stored in settings, and will be honored instead of these defaults, if present\n    if (defaultActive)\n        settings->userApplets.active[inkhud->userApplets.size() - 1] = true;\n\n    // If requested, mark in settings that this applet should \"autoshow\" by default\n    // This means that the applet will be automatically brought to foreground when it has new data to show\n    // This is the default state only: user can select which applets have this behavior through the menu\n    // User's selection is stored in settings, and will be honored instead of these defaults, if present\n    if (defaultAutoshow)\n        settings->userApplets.autoshow[inkhud->userApplets.size() - 1] = true;\n\n    // If specified, mark this as the default applet for a given tile index\n    // Used only to avoid placeholder applet \"out of the box\", when default settings have more than one tile\n    if (onTile != (uint8_t)-1)\n        settings->userTiles.displayedUserApplet[onTile] = inkhud->userApplets.size() - 1;\n\n    // The label that will be show in the applet selection menu, on the device\n    a->name = name;\n}\n\n// Initial configuration at startup\nvoid InkHUD::WindowManager::begin()\n{\n    assert(inkhud);\n\n    createSystemApplets();\n    placeSystemTiles();\n\n    createUserApplets();\n    createUserTiles();\n    placeUserTiles();\n    assignUserAppletsToTiles();\n    refocusTile();\n}\n\n// Focus on a different tile\n// The \"focused tile\" is the one which cycles applets on user button press,\n// and the one where the menu will be displayed\nvoid InkHUD::WindowManager::nextTile()\n{\n    // Close the menu applet if open\n    // We don't *really* want to do this, but it simplifies handling *a lot*\n    MenuApplet *menu = (MenuApplet *)inkhud->getSystemApplet(\"Menu\");\n    bool menuWasOpen = false;\n    if (menu->isForeground()) {\n        menu->sendToBackground();\n        menuWasOpen = true;\n    }\n\n    // Swap to next tile\n    settings->userTiles.focused = (settings->userTiles.focused + 1) % settings->userTiles.count;\n\n    // Make sure that we don't get stuck on the placeholder tile\n    refocusTile();\n\n    if (menuWasOpen)\n        menu->show(userTiles.at(settings->userTiles.focused));\n\n    // Ask the tile to draw an indicator showing which tile is now focused\n    // Requests a render\n    // We only draw this indicator if the device uses an aux button to switch tiles.\n    // Assume aux button is used to switch tiles if the \"next tile\" menu item is hidden\n    if (!settings->optionalMenuItems.nextTile)\n        userTiles.at(settings->userTiles.focused)->requestHighlight();\n}\n\n// Focus on a different tile but decrement index\nvoid InkHUD::WindowManager::prevTile()\n{\n    // Close the menu applet if open\n    // We don't *really* want to do this, but it simplifies handling *a lot*\n    MenuApplet *menu = (MenuApplet *)inkhud->getSystemApplet(\"Menu\");\n    bool menuWasOpen = false;\n    if (menu->isForeground()) {\n        menu->sendToBackground();\n        menuWasOpen = true;\n    }\n\n    // Swap to next tile\n    if (settings->userTiles.focused == 0)\n        settings->userTiles.focused = settings->userTiles.count - 1;\n    else\n        settings->userTiles.focused--;\n\n    // Make sure that we don't get stuck on the placeholder tile\n    refocusTile();\n\n    if (menuWasOpen)\n        menu->show(userTiles.at(settings->userTiles.focused));\n\n    // Ask the tile to draw an indicator showing which tile is now focused\n    // Requests a render\n    // We only draw this indicator if the device uses an aux button to switch tiles.\n    // Assume aux button is used to switch tiles if the \"next tile\" menu item is hidden\n    if (!settings->optionalMenuItems.nextTile)\n        userTiles.at(settings->userTiles.focused)->requestHighlight();\n}\n\n// Show the menu (on the the focused tile)\n// The applet previously displayed there will be restored once the menu closes\nvoid InkHUD::WindowManager::openMenu()\n{\n    MenuApplet *menu = (MenuApplet *)inkhud->getSystemApplet(\"Menu\");\n    menu->show(userTiles.at(settings->userTiles.focused));\n}\n\n// Bring the AlignStick applet to the foreground\nvoid InkHUD::WindowManager::openAlignStick()\n{\n    if (settings->joystick.enabled && !inkhud->twoWayRocker) {\n        AlignStickApplet *alignStick = (AlignStickApplet *)inkhud->getSystemApplet(\"AlignStick\");\n        alignStick->bringToForeground();\n    }\n}\n\nvoid InkHUD::WindowManager::openKeyboard()\n{\n    if (!settings->joystick.enabled || inkhud->twoWayRocker)\n        return;\n\n    KeyboardApplet *keyboard = (KeyboardApplet *)inkhud->getSystemApplet(\"Keyboard\");\n\n    if (keyboard) {\n        keyboard->bringToForeground();\n        keyboardOpen = true;\n        changeLayout();\n    }\n}\n\nvoid InkHUD::WindowManager::closeKeyboard()\n{\n    if (!settings->joystick.enabled || inkhud->twoWayRocker)\n        return;\n\n    KeyboardApplet *keyboard = (KeyboardApplet *)inkhud->getSystemApplet(\"Keyboard\");\n\n    if (keyboard) {\n        keyboard->sendToBackground();\n        keyboardOpen = false;\n        changeLayout();\n    }\n}\n\n// On the currently focussed tile: cycle to the next available user applet\n// Applets available for this must be activated, and not already displayed on another tile\nvoid InkHUD::WindowManager::nextApplet()\n{\n    Tile *t = userTiles.at(settings->userTiles.focused);\n\n    // Abort if zero applets available\n    // nullptr means WindowManager::refocusTile determined that there were no available applets\n    if (!t->getAssignedApplet())\n        return;\n\n    // Find the index of the applet currently shown on the tile\n    uint8_t appletIndex = -1;\n    for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n        if (inkhud->userApplets.at(i) == t->getAssignedApplet()) {\n            appletIndex = i;\n            break;\n        }\n    }\n\n    // Confirm that we did find the applet\n    assert(appletIndex != (uint8_t)-1);\n\n    // Iterate forward through the WindowManager::applets, looking for the next valid applet\n    Applet *nextValidApplet = nullptr;\n    for (uint8_t i = 1; i < inkhud->userApplets.size(); i++) {\n        uint8_t newAppletIndex = (appletIndex + i) % inkhud->userApplets.size();\n        Applet *a = inkhud->userApplets.at(newAppletIndex);\n\n        // Looking for an applet which is active (enabled by user), but currently in background\n        if (a->isActive() && !a->isForeground()) {\n            nextValidApplet = a;\n            settings->userTiles.displayedUserApplet[settings->userTiles.focused] =\n                newAppletIndex; // Remember this setting between boots!\n            break;\n        }\n    }\n\n    // Confirm that we found another applet\n    if (!nextValidApplet)\n        return;\n\n    // Hide old applet, show new applet\n    t->getAssignedApplet()->sendToBackground();\n    t->assignApplet(nextValidApplet);\n    nextValidApplet->bringToForeground();\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST); // bringToForeground already requested, but we're manually forcing FAST\n}\n\n// On the currently focussed tile: cycle to the previous available user applet\n// Applets available for this must be activated, and not already displayed on another tile\nvoid InkHUD::WindowManager::prevApplet()\n{\n    Tile *t = userTiles.at(settings->userTiles.focused);\n\n    // Abort if zero applets available\n    // nullptr means WindowManager::refocusTile determined that there were no available applets\n    if (!t->getAssignedApplet())\n        return;\n\n    // Find the index of the applet currently shown on the tile\n    uint8_t appletIndex = -1;\n    for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n        if (inkhud->userApplets.at(i) == t->getAssignedApplet()) {\n            appletIndex = i;\n            break;\n        }\n    }\n\n    // Confirm that we did find the applet\n    assert(appletIndex != (uint8_t)-1);\n\n    // Iterate forward through the WindowManager::applets, looking for the previous valid applet\n    Applet *prevValidApplet = nullptr;\n    for (uint8_t i = 1; i < inkhud->userApplets.size(); i++) {\n        uint8_t newAppletIndex = 0;\n        if (i > appletIndex)\n            newAppletIndex = inkhud->userApplets.size() + appletIndex - i;\n        else\n            newAppletIndex = (appletIndex - i);\n        Applet *a = inkhud->userApplets.at(newAppletIndex);\n\n        // Looking for an applet which is active (enabled by user), but currently in background\n        if (a->isActive() && !a->isForeground()) {\n            prevValidApplet = a;\n            settings->userTiles.displayedUserApplet[settings->userTiles.focused] =\n                newAppletIndex; // Remember this setting between boots!\n            break;\n        }\n    }\n\n    // Confirm that we found another applet\n    if (!prevValidApplet)\n        return;\n\n    // Hide old applet, show new applet\n    t->getAssignedApplet()->sendToBackground();\n    t->assignApplet(prevValidApplet);\n    prevValidApplet->bringToForeground();\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST); // bringToForeground already requested, but we're manually forcing FAST\n}\n\n// Returns active applet\nNicheGraphics::InkHUD::Applet *InkHUD::WindowManager::getActiveApplet()\n{\n    return userTiles.at(settings->userTiles.focused)->getAssignedApplet();\n}\n\n// Rotate the display image by 90 degrees\nvoid InkHUD::WindowManager::rotate()\n{\n    settings->rotation = (settings->rotation + 1) % 4;\n    changeLayout();\n}\n\n// Change whether the battery icon is displayed (top right corner)\n// Don't toggle the OptionalFeatures value before calling this, our method handles it internally\nvoid InkHUD::WindowManager::toggleBatteryIcon()\n{\n    BatteryIconApplet *batteryIcon = (BatteryIconApplet *)inkhud->getSystemApplet(\"BatteryIcon\");\n\n    settings->optionalFeatures.batteryIcon = !settings->optionalFeatures.batteryIcon; // Preserve the change between boots\n\n    // Show or hide the applet\n    if (settings->optionalFeatures.batteryIcon)\n        batteryIcon->bringToForeground();\n    else\n        batteryIcon->sendToBackground();\n\n    // Force-render\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST);\n}\n\n// Perform necessary reconfiguration when user changes number of tiles (or rotation) at run-time\n// Call after changing settings.tiles.count\nvoid InkHUD::WindowManager::changeLayout()\n{\n    // Recreate tiles\n    // - correct number created, from settings.userTiles.count\n    // - set dimension and position of tiles, according to layout\n    createUserTiles();\n    placeUserTiles();\n    placeSystemTiles();\n\n    // Handle fewer tiles\n    // - background any applets which have lost their tile\n    findOrphanApplets();\n\n    // Handle more tiles\n    // - create extra applets\n    // - assign them to the new extra tiles\n    createUserApplets();\n    assignUserAppletsToTiles();\n\n    // Focus a valid tile\n    // - info: focused tile is the one which cycles applets when user button pressed\n    // - may now be out of bounds if tile count has decreased\n    refocusTile();\n\n    // Restore menu\n    // - its tile was just destroyed and recreated (createUserTiles)\n    // - its assignment was cleared (assignUserAppletsToTiles)\n    MenuApplet *menu = (MenuApplet *)inkhud->getSystemApplet(\"Menu\");\n    if (menu->isForeground()) {\n        Tile *ft = userTiles.at(settings->userTiles.focused);\n        menu->show(ft);\n    }\n\n    // Resize for the on-screen keyboard\n    if (keyboardOpen) {\n        // Send all user applets to the background\n        // User applets currently don't handle free text input\n        for (uint8_t i = 0; i < inkhud->userApplets.size(); i++)\n            inkhud->userApplets.at(i)->sendToBackground();\n        // Find the first system applet that can handle freetext and resize it\n        for (SystemApplet *sa : inkhud->systemApplets) {\n            if (sa->handleFreeText) {\n                const uint16_t keyboardHeight = KeyboardApplet::getKeyboardHeight();\n                sa->getTile()->setRegion(0, 0, inkhud->width(), inkhud->height() - keyboardHeight - 1);\n                break;\n            }\n        }\n    }\n\n    // Force-render\n    // - redraw all applets\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST, true);\n}\n\n// Perform necessary reconfiguration when user activates or deactivates applets at run-time\n// Call after changing settings.userApplets.active\nvoid InkHUD::WindowManager::changeActivatedApplets()\n{\n    MenuApplet *menu = (MenuApplet *)inkhud->getSystemApplet(\"Menu\");\n\n    assert(menu->isForeground());\n\n    // Activate or deactivate applets\n    // - to match value of settings.userApplets.active\n    createUserApplets();\n\n    // Assign the placeholder applet\n    // - if applet was foreground on a tile when deactivated, swap it with a placeholder\n    // - placeholder applet may be assigned to multiple tiles, if needed\n    assignUserAppletsToTiles();\n\n    // Ensure focused tile has a valid applet\n    // - if focused tile's old applet was deactivated, give it a real applet, instead of placeholder\n    // - reason: nextApplet() won't cycle applets if placeholder is shown\n    refocusTile();\n\n    // Restore menu\n    // - its assignment was cleared (assignUserAppletsToTiles)\n    if (menu->isForeground()) {\n        Tile *ft = userTiles.at(settings->userTiles.focused);\n        menu->show(ft);\n    }\n\n    // Force-render\n    // - redraw all applets\n    inkhud->forceUpdate(EInk::UpdateTypes::FAST, true);\n}\n\n// Some applets may be permitted to bring themselves to foreground, to show new data\n// User selects which applets have this permission via on-screen menu\n// Priority is determined by the order which applets were added to WindowManager in setupNicheGraphics\n// We will only autoshow one applet\nvoid InkHUD::WindowManager::autoshow()\n{\n    // Don't perform autoshow if a system applet has exclusive use of the display right now\n    // Note: lockRequests prevents autoshow attempting to hide menuApplet\n    for (const SystemApplet *sa : inkhud->systemApplets) {\n        if (sa->lockRendering || sa->lockRequests)\n            return;\n    }\n\n    NotificationApplet *notificationApplet = (NotificationApplet *)inkhud->getSystemApplet(\"Notification\");\n\n    for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n        Applet *a = inkhud->userApplets.at(i);\n        if (a->wantsToAutoshow()                  // Applet wants to become foreground\n            && !a->isForeground()                 // Not yet foreground\n            && settings->userApplets.autoshow[i]) // User permits this applet to autoshow\n        {\n            Tile *t = userTiles.at(settings->userTiles.focused); // Get focused tile\n            t->getAssignedApplet()->sendToBackground();          // Background whichever applet is already on the tile\n            t->assignApplet(a);                                  // Assign our new applet to tile\n            a->bringToForeground();                              // Foreground our new applet\n\n            // Check if autoshown applet shows the same information as notification intended to\n            // In this case, we can dismiss the notification before it is shown\n            // Note: we are re-running the approval process. This normally occurs when the notification is initially triggered.\n            if (notificationApplet->isForeground() && !notificationApplet->isApproved())\n                notificationApplet->dismiss();\n\n            break; // One autoshow only! Avoid conflicts\n        }\n    }\n}\n\n// A collection of any user tiles which do not have a valid user applet\n// This can occur in various situations, such as when a user enables fewer applets than their layout has tiles\n// The tiles (and which regions the occupy) are private information of the window manager\n// The renderer needs to know which regions (if any) are empty,\n// in order to fill them with a \"placeholder\" pattern.\n// -- There may be a tidier way to accomplish this --\nstd::vector<InkHUD::Tile *> InkHUD::WindowManager::getEmptyTiles()\n{\n    std::vector<Tile *> empty;\n\n    for (Tile *t : userTiles) {\n        Applet *a = t->getAssignedApplet();\n        if (!a || !a->isActive())\n            empty.push_back(t);\n    }\n\n    return empty;\n}\n\n// Complete the configuration of one newly instantiated system applet\n// - link it with its tile\n//      Unlike user applets, most system applets have their own unique tile;\n//      the only reference to this tile is held by the system applet itself.\n// - give it a name\n//      A system applet's name is its unique identifier.\n//      The name is our only reference to specific system applets, via InkHUD->getSystemApplet\n// - add it to the list of system applets\n\nvoid InkHUD::WindowManager::addSystemApplet(const char *name, SystemApplet *applet, Tile *tile)\n{\n    // Some system applets might not have their own tile (e.g. menu, placeholder)\n    if (tile)\n        tile->assignApplet(applet);\n\n    applet->name = name;\n    inkhud->systemApplets.push_back(applet);\n}\n\n// Create the \"system applets\"\n// These handle things like bootscreen, pop-up notifications etc\n// They are processed separately from the user applets, because they might need to do \"weird things\"\nvoid InkHUD::WindowManager::createSystemApplets()\n{\n    addSystemApplet(\"Logo\", new LogoApplet, new Tile);\n    addSystemApplet(\"Pairing\", new PairingApplet, new Tile);\n    addSystemApplet(\"Tips\", new TipsApplet, new Tile);\n    if (settings->joystick.enabled && !inkhud->twoWayRocker) {\n        addSystemApplet(\"AlignStick\", new AlignStickApplet, new Tile);\n        addSystemApplet(\"Keyboard\", new KeyboardApplet, new Tile);\n    }\n\n    addSystemApplet(\"Menu\", new MenuApplet, nullptr);\n\n    // Battery and notifications *behind* the menu\n    addSystemApplet(\"Notification\", new NotificationApplet, new Tile);\n    addSystemApplet(\"BatteryIcon\", new BatteryIconApplet, new Tile);\n\n    // Special handling only, via Rendering::renderPlaceholders\n    addSystemApplet(\"Placeholder\", new PlaceholderApplet, nullptr);\n\n    // System applets are always active\n    for (SystemApplet *sa : inkhud->systemApplets)\n        sa->activate();\n}\n\n// Set the position and size of most system applets\n// Most system applets have their own tile. We manually set the region this tile occupies\nvoid InkHUD::WindowManager::placeSystemTiles()\n{\n    inkhud->getSystemApplet(\"Logo\")->getTile()->setRegion(0, 0, inkhud->width(), inkhud->height());\n    inkhud->getSystemApplet(\"Pairing\")->getTile()->setRegion(0, 0, inkhud->width(), inkhud->height());\n    inkhud->getSystemApplet(\"Tips\")->getTile()->setRegion(0, 0, inkhud->width(), inkhud->height());\n    if (settings->joystick.enabled && !inkhud->twoWayRocker) {\n        inkhud->getSystemApplet(\"AlignStick\")->getTile()->setRegion(0, 0, inkhud->width(), inkhud->height());\n        const uint16_t keyboardHeight = KeyboardApplet::getKeyboardHeight();\n        inkhud->getSystemApplet(\"Keyboard\")\n            ->getTile()\n            ->setRegion(0, inkhud->height() - keyboardHeight, inkhud->width(), keyboardHeight);\n    }\n    inkhud->getSystemApplet(\"Notification\")->getTile()->setRegion(0, 0, inkhud->width(), 20);\n\n    const uint16_t batteryIconHeight = Applet::getHeaderHeight() - 2 - 2;\n    const uint16_t batteryIconWidth = batteryIconHeight * 1.8;\n    inkhud->getSystemApplet(\"BatteryIcon\")\n        ->getTile()\n        ->setRegion(inkhud->width() - batteryIconWidth - 1, // x\n                    1,                                      // y\n                    batteryIconWidth + 1,                   // width\n                    batteryIconHeight + 2);                 // height\n\n    // Note: the tiles of placeholder and menu applets are manipulated specially\n    // - menuApplet borrows user tiles\n    // - placeholder applet is temporarily assigned to each user tile of WindowManager::getEmptyTiles\n}\n\n// Activate or deactivate user applets, to match settings\n// Called at boot, or after run-time config changes via menu\n// Note: this method does not instantiate the applets;\n// this is done in setupNicheGraphics, when passing to InkHUD::addApplet\nvoid InkHUD::WindowManager::createUserApplets()\n{\n    // Deactivate and remove any no-longer-needed applets\n    for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n        Applet *a = inkhud->userApplets.at(i);\n\n        // If the applet is active, but settings say it shouldn't be:\n        // - run applet's custom deactivation code\n        // - mark applet as inactive (internally)\n        if (a->isActive() && !settings->userApplets.active[i])\n            a->deactivate();\n    }\n\n    // Activate and add any new applets\n    for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n\n        // If not activated, but it now should be:\n        // - run applet's custom activation code\n        // - mark applet as active (internally)\n        if (!inkhud->userApplets.at(i)->isActive() && settings->userApplets.active[i])\n            inkhud->userApplets.at(i)->activate();\n    }\n}\n\n// Creates the tiles which will host user applets\n// The amount of these is controlled by the user, via \"layout\" option in the InkHUD menu\nvoid InkHUD::WindowManager::createUserTiles()\n{\n    // Delete any tiles which currently exist\n    for (Tile *t : userTiles)\n        delete t;\n    userTiles.clear();\n\n    // Create new tiles\n    for (uint8_t i = 0; i < settings->userTiles.count; i++) {\n        Tile *t = new Tile;\n        userTiles.push_back(t);\n    }\n}\n\n// Calculate the display region occupied by each tile\n// This determines how pixels are translated from \"relative\" applet-space to \"absolute\" windowmanager-space\n// The size and position depend on the amount of tiles the user prefers, set by the \"layout\" option\nvoid InkHUD::WindowManager::placeUserTiles()\n{\n    for (uint8_t i = 0; i < userTiles.size(); i++)\n        userTiles.at(i)->setRegion(settings->userTiles.count, i);\n}\n\n// Link \"foreground\" user applets with tiles\n// Which applet should be *initially* shown on a tile?\n// This initial state changes once WindowManager::nextApplet is called.\n// Performed at startup, or during certain run-time reconfigurations (e.g number of tiles)\n// This state of \"which applets are foreground\" is preserved between reboots, but the value needs validating at startup.\nvoid InkHUD::WindowManager::assignUserAppletsToTiles()\n{\n    // Each user tile\n    for (uint8_t i = 0; i < userTiles.size(); i++) {\n        Tile *t = userTiles.at(i);\n\n        // Check whether tile can display the previously shown applet again\n        uint8_t oldIndex = settings->userTiles.displayedUserApplet[i]; // Previous index in WindowManager::userApplets\n        bool canRestore = true;\n        if (oldIndex > inkhud->userApplets.size() - 1) // Check if old index is now out of bounds\n            canRestore = false;\n        else if (!settings->userApplets.active[oldIndex]) // Check that old applet is still activated\n            canRestore = false;\n        else { // Check that the old applet isn't now shown already on a different tile\n            for (uint8_t i2 = 0; i2 < i; i2++) {\n                if (settings->userTiles.displayedUserApplet[i2] == oldIndex) {\n                    canRestore = false;\n                    break;\n                }\n            }\n        }\n\n        // Restore previously shown applet if possible,\n        // otherwise assign nullptr, which will render specially using placeholderApplet\n        if (canRestore) {\n            Applet *a = inkhud->userApplets.at(oldIndex);\n            t->assignApplet(a);\n            a->bringToForeground();\n        } else {\n            t->assignApplet(nullptr);\n            settings->userTiles.displayedUserApplet[i] = -1; // Update settings: current tile has no valid applet\n        }\n    }\n}\n\n// During layout changes, our focused tile setting can become invalid\n// This method identifies that situation and corrects for it\nvoid InkHUD::WindowManager::refocusTile()\n{\n    // Validate \"focused tile\" setting\n    // - info: focused tile responds to button presses: applet cycling, menu, etc\n    // - if number of tiles changed, might now be out of index\n    if (settings->userTiles.focused >= userTiles.size())\n        settings->userTiles.focused = 0;\n\n    // Give \"focused tile\" a valid applet\n    // - scan for another valid applet, which we can addSubstitution\n    // - reason: nextApplet() won't cycle if no applet is assigned\n    Tile *focusedTile = userTiles.at(settings->userTiles.focused);\n    if (!focusedTile->getAssignedApplet()) {\n        // Search for available applets\n        for (uint8_t i = 0; i < inkhud->userApplets.size(); i++) {\n            Applet *a = inkhud->userApplets.at(i);\n            if (a->isActive() && !a->isForeground()) {\n                // Found a suitable applet\n                // Assign it to the focused tile\n                focusedTile->assignApplet(a);\n                a->bringToForeground();\n                settings->userTiles.displayedUserApplet[settings->userTiles.focused] = i; // Record change: persist after reboot\n                break;\n            }\n        }\n    }\n}\n\n// Search for any applets which believe they are foreground, but no longer have a valid tile\n// Tidies up after layout changes at runtime\nvoid InkHUD::WindowManager::findOrphanApplets()\n{\n    for (uint8_t ia = 0; ia < inkhud->userApplets.size(); ia++) {\n        Applet *a = inkhud->userApplets.at(ia);\n\n        // Applet doesn't believe it is displayed: not orphaned\n        if (!a->isForeground())\n            continue;\n\n        // Check each tile, to see if anyone claims this applet\n        bool foundOwner = false;\n        for (uint8_t it = 0; it < userTiles.size(); it++) {\n            Tile *t = userTiles.at(it);\n            // A tile claims this applet: not orphaned\n            if (t->getAssignedApplet() == a) {\n                foundOwner = true;\n                break;\n            }\n        }\n\n        // Orphan found\n        // Tell the applet that no tile is currently displaying it\n        // This allows the focussed tile to cycle to this applet again by pressing user button\n        if (!foundOwner)\n            a->sendToBackground();\n    }\n}\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/InkHUD/WindowManager.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_INKHUD\n\n/*\n\nResponsible for managing which applets are shown, and their sizes / positions\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"./Applets/System/Notification/Notification.h\" // The notification object, not the applet\n#include \"./InkHUD.h\"\n#include \"./Persistence.h\"\n#include \"./Tile.h\"\n\nnamespace NicheGraphics::InkHUD\n{\n\nclass WindowManager\n{\n  public:\n    WindowManager();\n    void addApplet(const char *name, Applet *a, bool defaultActive, bool defaultAutoshow, uint8_t onTile);\n    void begin();\n\n    // - call these to make stuff change\n\n    void nextTile();\n    void prevTile();\n    Applet *getActiveApplet();\n    void openMenu();\n    void openAlignStick();\n    void openKeyboard();\n    void closeKeyboard();\n    void nextApplet();\n    void prevApplet();\n    void rotate();\n    void toggleBatteryIcon();\n\n    // - call these to manifest changes already made to the relevant Persistence::Settings values\n\n    void changeLayout();           // Change tile layout or count\n    void changeActivatedApplets(); // Change which applets are activated\n\n    // - called during the rendering operation\n\n    void autoshow();                     // Show a different applet, to display new info\n    std::vector<Tile *> getEmptyTiles(); // Any user tiles without a valid applet\n\n  private:\n    // Steps for configuring (or reconfiguring) the window manager\n    // - all steps required at startup\n    // - various combinations of steps required for on-the-fly reconfiguration (by user, via menu)\n\n    void addSystemApplet(const char *name, SystemApplet *applet, Tile *tile);\n    void createSystemApplets(); // Instantiate the system applets\n    void placeSystemTiles();    // Assign manual positions to (most) system applets\n\n    void createUserApplets(); // Activate user's selected applets\n    void createUserTiles();   // Instantiate enough tiles for user's selected layout\n    void assignUserAppletsToTiles();\n    void placeUserTiles(); // Automatically place tiles, according to user's layout\n    void refocusTile();    // Ensure focused tile has a valid applet\n\n    void findOrphanApplets(); // Find any applets left-behind when layout changes\n\n    std::vector<Tile *> userTiles; // Tiles which can host user applets\n    bool keyboardOpen = false;\n\n    // For convenience\n    InkHUD *inkhud = nullptr;\n    Persistence::Settings *settings = nullptr;\n};\n\n} // namespace NicheGraphics::InkHUD\n\n#endif"
  },
  {
    "path": "src/graphics/niche/InkHUD/docs/README.md",
    "content": "# InkHUD\n\nA haphazard collection of notes which _might_ be helpful for developers.\n\n<img src=\"disclaimer.jpg\" width=\"250\" alt=\"self deprecating meme\" />\n\n---\n\n- [Purpose](#purpose)\n- [Design Principles](#design-principles)\n  - [Self-Contained](#self-contained)\n  - [Static](#static)\n  - [Non-interactive](#non-interactive)\n  - [Customizable](#customizable)\n  - [Event-Driven Rendering](#event-driven-rendering)\n  - [Avoid the Preprocessor](#avoid-the-preprocessor)\n- [The Implementation](#the-implementation)\n- [The Rendering Process](#the-rendering-process)\n- [Concepts](#concepts)\n  - [NicheGraphics Framework](#nichegraphics-framework)\n  - [NicheGraphics E-Ink Drivers](#nichegraphics-e-ink-drivers)\n  - [InkHUD Applets](#inkhud-applets)\n- [Adding a Variant](#adding-a-variant)\n  - [platformio.ini](#platformioini)\n  - [nicheGraphics.h](#nichegraphicsh)\n- [Fonts](#fonts)\n  - [Parsing Unicode Text](#parsing-unicode-text)\n  - [Localization](#localization)\n  - [Creating / Modifying](#creating--modifying)\n- [Class Notes](#class-notes)\n  - [`InkHUD::InkHUD`](#inkhudinkhud)\n  - [`InkHUD::Persistence`](#inkhudpersistence)\n  - [`InkHUD::Persistence::Settings`](#inkhudpersistencesettings)\n  - [`InkHUD::Persistence::LatestMessage`](#inkhudpersistencelatestmessage)\n  - [`InkHUD::WindowManager`](#inkhudwindowmanager)\n  - [`InkHUD::Renderer`](#inkhudrenderer)\n  - [`InkHUD::Renderer::DisplayHealth`](#inkhudrendererdisplayhealth)\n  - [`InkHUD::Events`](#inkhudevents)\n  - [`InkHUD::Applet`](#inkhudapplet)\n  - [`InkHUD::SystemApplet`](#inkhudsystemapplet)\n  - [`InkHUD::Tile`](#inkhudtile)\n  - [`InkHUD::AppletFont`](#inkhudappletfont)\n\n## Purpose\n\nInkHUD is a minimal UI for E-Ink devices. It displays the user's choice of info, as statically as possible, to minimize the amount of display refreshing.\n\nIt is intended to supplement a connected client app.\n\n## Design Principles\n\n### Self-Contained\n\n- Keep InkHUD code within `/src/graphics/niche/InkHUD`.\n- Place reusable components within `/src/graphics/niche`, for other UIs to take advantage of.\n- Interact with the firmware code using the **Module API**, **Observables**, and other similarly non-intrusive hooks.\n\n### Static\n\nInformation should be displayed as statically as possible. Unnecessary updates should be avoided.\n\nAs as example, fixed timestamps are used instead of `X seconds ago` labels, as these need to be constantly updated to remain current.\n\n### Non-interactive\n\nInkHUD aims to be a \"heads up display\". The intention is for the user to glance at the display. The intention is _not_ for the user to frequently interact with the display.\n\nSome interactivity is tolerated as a means to an end: the display _should_ be customizable, but this should be minimized as much as possible.\n\n_Edit: there's significant demand for keyboard support, so some sort of free-text feature will need to be added eventually, although it does go against the original design principles._\n\n### Customizable\n\nThe user should be given the choice to decide which information they would like to receive, and how they would like to receive it.\n\n### Event-Driven Rendering\n\nThe display image does not update \"automatically\". Individual applets are responsible for deciding when they have new information to show, and then requesting a display update.\n\n### Avoid the Preprocessor\n\n**Don't** use preprocessor macros to write code which targets individual devices.\n\n**Do** configure InkHUD to suit each device in [`nicheGraphics.h`](#nichegraphicsh).\n\n**Do** use preprocessor macros to guard all files\n\n- `#ifdef MESHTASTIC_INCLUDE_INKHUD` for InkHUD files\n- `#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS` for reusable components (drivers, etc)\n\n## The Implementation\n\n- Variant's platformio.ini file extends `inkhud` (defined in InkHUD/PlatformioConfig.ini)\n  - original screen class suppressed: `MESHTASTIC_EXCLUDE_SCREEN`\n  - ButtonThread suppressed: `HAS_BUTTON=0`\n  - NicheGraphics components included: `MESHTASTIC_INCLUDE_NICHE_GRAPHICS`\n  - InkHUD components included: `MESHTASTIC_INCLUDE_INKHUD`\n- `main.cpp`\n  - includes `nicheGraphics.h` (from variant folder)\n  - calls `setupNicheGraphics`, (from nicheGraphics.h)\n- `nicheGraphics.h`\n  - includes InkHUD components\n  - includes shared NicheGraphics components\n  - `setupNicheGraphics`\n    - configures and connects components\n    - `inkhud->begin`\n\n## The Rendering Process\n\n(animated diagram)\n\n<img src=\"rendering.gif\" alt=\"animated process diagram of InkHUD rendering\" height=\"480\" width=\"480\" />\n\nAn overview:\n\n- A component calls `requestUpdate` (applets only) or `InkHUD::forceUpdate`\n- `Renderer` schedules a render cycle for the next loop(), using `Renderer::runOnce`\n- `Renderer` determines whether the update request is valid\n- `Renderer` asks relevant applets to render\n- Applet dimensions are updated (by Applet's `Tile`)\n- Applets generate pixel output, and pass this to their `Tile`\n- Tiles shift these \"relative\" pixels to their true region, for multiplexing\n- Tiles pass the pixels to `Renderer`\n- `Renderer` applies any global display rotation to the pixels\n- `Renderer` combines the pixels into the finished image\n- The finished image is passed to the display driver, starting the physical update process\n\n## Concepts\n\n### NicheGraphics Framework\n\nInkHUD is implemented as a _NicheGraphics_ UI.\n\nIntended as a pattern / philosophy for implementing self-contained UIs, to suit various niche devices, which are best served by their own custom user interface.\n\nHypothetical examples: E-Ink, 1602 LCDs, tiny OLEDs, smart watches, etc\n\nA NicheGraphics UI:\n\n- Is self-contained\n- Makes use of the loose collection of resources (drivers, input methods, etc) gathered in the `/src/graphics/niche` folder.\n- Implements a `setupNicheGraphics()` method.\n\n### NicheGraphics E-Ink Drivers\n\nInkHUD uses a set of custom E-Ink drivers. These are not based on GxEPD2, or any other code base. They are written directly on-top of the Meshtastic firmware, to make use of the OSThread class for asynchronous display updates.\n\nInteracting with the drivers is straightforward. InkHUD generates a frame of 1-bit image data. This image data is passed to the driver, along with the type of refresh to use (FULL or FAST).\n\n`driver->update(uint8_t* buffer, EInk::UpdateTypes::FULL)`\n\nFor more information, see the documentation in `src/graphics/niche/Drivers/EInk`\n\n### InkHUD Applets\n\nAn InkHUD applet is a class which generates a screen of info for the display.\n\nConsider: `DMApplet.h` (displays most recent direct message) and `RecentsList.h` (displays a list of recently heard nodes)\n\n- Applets are modular: they are easy to write, and easy to implement. Users select which applets they want, using the menu.\n- Applets use responsive design. They should scale for different screens / layouts / fonts.\n- Applets decide when to update. They use the Module API, Observers, etc, to retrieve information, and request a display update when they have something interesting to show.\n\nSee `src/graphics/niche/InkHUD/Applets/Examples` for example code.\n\n#### Writing an Applet\n\nYour new applet class will inherit `InkHUD::Applet`.\n\n```cpp\nclass BasicExampleApplet : public Applet\n{\n  public:\n    // You must have an onRender() method\n    // All drawing happens here\n\n    void onRender(bool full) override;\n};\n```\n\nThe `onRender` method is called when the display image is redrawn. This can happen at any time, so be ready!\n\n```cpp\n// All drawing happens here\n// Our basic example doesn't do anything useful. It just passively prints some text.\nvoid InkHUD::BasicExampleApplet::onRender(bool full)\n{\n    printAt(0, 0, \"Hello, world!\");\n}\n```\n\nYour applet will need to scale automatically, to suit a variety of screens / layouts / fonts. Make sure you draw relative to applet's size.\n\n| edge   | coordinate | shorthand |\n| ------ | ---------- | --------- |\n| left   | 0          | `X(0.0)`  |\n| top    | 0          | `Y(0.0)`  |\n| right  | `width()`  | `X(1.0)`  |\n| bottom | `height()` | `Y(1.0)`  |\n\nThe same principles apply for drawing text. Methods like `AppletFont::lineHeight` and `getTextWidth` are useful here.\n\n```cpp\nstd::string line1 = \"Line 1\";\nprintAt(0, Y(0.5), line1);\ndrawRect(0, Y(0.5), getTextWidth(line1), fontSmall.lineHeight(), BLACK);\n```\n\nYour applet will only be redrawn when _something_ requests a display update. Your applet is welcome to request a display update, when it determines that it has new info to display, by calling `requestUpdate`.\n\nExactly how you determine this, depends on what your applet actually does. Here's a code snippet from one of the example applets. The applet is requesting an update when a new message is received.\n\n```cpp\n// We configured the Module API to call this method when we receive a new text message\nProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_MeshPacket &mp)\n{\n\n    // Abort if applet fully deactivated\n    // Don't waste time: we wouldn't be rendered anyway\n    if (!isActive())\n        return ProcessMessage::CONTINUE;\n\n    // Check that this is an incoming message\n    // Outgoing messages (sent by us) will also call handleReceived\n\n    if (!isFromUs(&mp)) {\n        // Store the sender's nodenum\n        // We need to keep this information, so we can re-use it anytime render() is called\n        haveMessage = true;\n        fromWho = mp.from;\n\n        // Tell InkHUD that we have something new to show on the screen\n        requestUpdate();\n    }\n\n    // Tell Module API to continue informing other firmware components about this message\n    // We're not the only component which is interested in new text messages\n    return ProcessMessage::CONTINUE;\n}\n```\n\n#### Implementing an Applet\n\nIncorporating your new applet into InkHUD is easy.\n\nIn a variant's `nicheGraphics.h`:\n\n- `#include` your applet\n- `inkhud->addApplet(\"My Applet\", new InkHUD::MyApplet);`\n\nYou will need to add these lines to any variants which will use your applet.\n\n#### Applet Bases\n\nIf you need to create several similar applets, it might make sense to create a reusable base class. Several of these already exist in `src/graphics/niche/InkHUD/Applets/Bases`, but use these with caution, as they may be modified in future.\n\n#### System Applets\n\nSo far, we have been talking about \"user applets\". We also recognize a separate category of \"system applets\". These handle things like the menu, and the boot screen. These often need special handling, and need to be implemented manually.\n\n## Adding a Variant\n\nIn `/variants/<YOUR_VARIANT>/`:\n\n### platformio.ini\n\nExtend `inkhud`, then combine with any other platformio config your hardware variant requires.\n\n_(Example shows only config required by InkHUD. This is not a complete `env` definition.)_\n\n```ini\n[env:YOUR_VARIANT-inkhud]\nextends = esp32s3_base, inkhud ; or nrf52840_base, etc\n\nbuild_src_filter =\n${esp32s3_base.build_src_filter}\n${inkhud.build_src_filter}\n\nbuild_flags =\n${esp32s3_base.build_flags}\n${inkhud.build_flags}\n\nlib_deps =\n${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n${esp32s3_base.lib_deps}\n```\n\n### nicheGraphics.h\n\nShould contain a `setupNicheGraphics` method, which creates and configures the various components for InkHUD.\n\nFor well commented examples, see:\n\n- `/variants/heltec_vision_master_e290/nicheGraphics.h` (ESP32)\n- `/variants/ELECROW-ThinkNode-M1/nicheGraphics.h` (NRF52)\n\nAs a general overview:\n\n- Display\n  - Start SPI\n  - Create display driver\n- InkHUD\n  - Create InkHUD instance\n  - Set E-Ink fast refresh limit (`setDisplayResilience`)\n  - Set fonts\n  - Set default user-settings\n  - Select applets to build (`addApplet`)\n  - Start InkHUD\n- Buttons\n  - Setup `TwoButton` driver (user button, optional \"auxiliary\" button)\n  - Connect to InkHUD handlers (use lambdas)\n\n## Fonts\n\nInkHUD uses AdafruitGFX fonts. Three shared fonts (small, medium, large) are available for use by all applets. These are set per-variant in nicheGraphics.h.\n\n```cpp\n// Prepare fonts\nInkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\nInkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\nInkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n// Using a generic AdafruitGFX font instead:\n// InkHUD::Applet::fontLarge = FreeSerif18pt7b;\n```\n\nAny generic AdafruitGFX font may be used, but the fonts which are bundled with InkHUD have been customized with extended-ASCII character sets and emoji.\n\n### Parsing Unicode Text\n\nText received by the firmware is encoded as UTF-8.\n\nApplets must manually parse any text which may contain non-ASCII characters. Strings like text-messages and node names should be parsed.\n\n```cpp\nstd::string greeting = \"Góðan daginn!\";\nstd::string parsed = parse(greeting);\n```\n\nThis will re-encode the characters to match whichever extended-ASCII font InkHUD has been built with.\n\nA limited set of emoji have been [wedged into unused code points within the font](#emoji).\n\n### Localization\n\nInkHUD is bundled with extended-ASCII fonts for:\n\n- Windows-1250 (Central European)\n- Windows-1251 (Cyrillic)\n- Windows-1252 (Western European)\n\nThe default builds use Windows-1252 encoding. This can be changed in nicheGraphics.h.\n\n```cpp\nInkHUD::Applet::fontLarge = FREESANS_12PT_WIN1250;\nInkHUD::Applet::fontMedium = FREESANS_9PT_WIN1250;\nInkHUD::Applet::fontSmall = FREESANS_6PT_WIN1250;\n\nInkHUD::Applet::fontLarge = FREESANS_12PT_WIN1251;\nInkHUD::Applet::fontMedium = FREESANS_9PT_WIN1251;\nInkHUD::Applet::fontSmall = FREESANS_6PT_WIN1251;\n```\n\n### Creating / Modifying\n\nFor basic conversion and editing, online tools might be sufficient:\n\n- [https://rop.nl/truetype2gfx/](https://rop.nl/truetype2gfx/) - converting from ttf\n- [https://tchapi.github.io/Adafruit-GFX-Font-Customiser/](https://tchapi.github.io/Adafruit-GFX-Font-Customiser/) - editing glyphs\n\nFor heavy editing, this offline workflow is suggested:\n\n- [FontForge](https://fontforge.org/en-US/)\n  - re-ordering glyphs\n    - Encoding > Load Encoding\n    - Encoding > Reencode\n  - .ttf to .bdf conversion\n    - Element > Bitmap Strikes Available..\n    - File > Generate Fonts\n- [GFXFontEditor](https://github.com/ScottFerg56/GFXFontEditor)\n  - manual glyph correction\n  - .bdf to AdafruitGFX .h conversion\n    - File > Edit Font Properties\n    - right-click glyph list, flatten font\n    - File > Save As\n    - manually edit exported .h\n      - remove `#include <AdafruitGFX.h>`\n\nIf possible, custom Extended-ASCII fonts should use one of the encodings which InkHUD already supports. If this is not possible, a mapping for the new encoding will need to be added.\n\nSee [Encoding](#encoding) for details on using an extended-ASCII font.\n\n## Class Notes\n\n### `InkHUD::InkHUD`\n\n_`src/graphics/niche/InkHUD/InkHUD.h`_\n\n- singleton\n- mediator between other InkHUD components\n\n#### `getInstance()`\n\nGets access to the class.\nFirst `getInstance` call instantiates the class, and the subclasses:\n\n- `InkHUD::Persistence`\n- `InkHUD::WindowManager`\n- `InkHUD::Renderer`\n- `InkHUD::Events`\n\nFor convenience, many InkHUD components call this on `begin`, and store it as `InkHUD* inkhud`.\n\n---\n\n### `InkHUD::Persistence`\n\n_`src/graphics/niche/InkHUD/Persistence.h`_\n\nStores InkHUD data in flash\n\n- settings\n- most recent text message received (both for broadcast and DM)\n\nIn rare cases, applets may store their own specific data separately (e.g. `ThreadedMessageApplet`)\n\nData saved only on shutdown / reboot. Not saved if power is removed unexpectedly.\n\n---\n\n### `InkHUD::Persistence::Settings`\n\n_`src/graphics/niche/InkHUD/Persistence.h`_\n\nSettings which relate to InkHUD. Mostly user's customization, but some values record the UI's state (e.g. `tips.safeShutdownSeen`)\n\n- stored using `FlashData.h` (a shared Niche Graphics tool)\n- not encoded as protobufs\n- serialized directly as bytes of struct\n\n#### Defaults\n\nGlobal default values are set when the struct is defined (Persistence.h).\nPer-variant defaults are set by modifying the values of the settings instance during `setupNicheGraphics()`, before `inkhud->begin` is called.\n\n```cpp\ninkhud->persistence->settings.userTiles.count = 2;\ninkhud->persistence->settings.userTiles.maxCount = 4;\ninkhud->persistence->settings.rotation = 3;\n```\n\nBy modifying the values at this point, they will be used if we fail to load previous settings from flash (not yet saved, old version, etc)\n\n---\n\n### `InkHUD::Persistence::LatestMessage`\n\n_`src/graphics/niche/InkHUD/Persistence.h`_\n\nMost recently received text message\n\n- most recent DM\n- most recent broadcast\n\nCollected here, so various user applets don't all have to store their own copy of this info.\n\nWe are unable to use `devicestate.rx_text_message` for this purpose, because:\n\n- it is cleared by an outgoing text message\n- we want to store both a recent broadcast and a recent DM\n\n#### Saving / Loading\n\n_A bit of a hack.._\nStored to flash using `InkHUD::MessageStore`, which is really intended for storing a thread of messages (see `ThreadedMessageApplet`). Used because it stores strings more efficiently than `FlashData.h`.\n\nThe hack is:\n\n- If most recent message was a DM, we only store the DM.\n- If most recent message was a broadcast, we store both a DM and a broadcast. The DM may be 0-length string.\n\n---\n\n### `InkHUD::WindowManager`\n\n_`src/graphics/niche/InkHUD/WindowManager.h`_\n\nManages which applets are shown, and their size / position (by manipulating the \"tiles\")\n\n- owns the `Tile` instances\n- creates and destroys tiles; sets size and position:\n  - at startup\n  - at runtime, when config changes (layout, rotation, etc)\n- activates (or deactivates) applets\n- cycling through applets (e.g. on button press)\n\nThe window manager doesn't process pixels; that is handled by the `InkHUD::Tile` objects.\n\nNote: Some of the methods (incl. `changeLayout`, `changeActivatedApplets`) don't trigger changes themselves. They should be called _after_ the relevant values in `inkhud->persistence->settings` have been modified.\n\n---\n\n### `InkHUD::Renderer`\n\n_`src/graphics/niche/InkHUD/Renderer.h`_\n\nGet pixel output from applets (via a tile), combine, and pass to the driver.\n\n- triggered by `requestUpdate` or `forceUpdate`\n- not run immediately: allows multiple applets to share one render cycle\n- calls `Applet::onRender` for relevant applets\n- applies global rotation\n- passes finalized image to driver\n\n`requestUpdate` is for applets (user or system). Renderer will honor the request if the applet is visible. `forceUpdate` can be used anywhere, but not from user applets, please.\n\n#### Asynchronous updates\n\n`requestUpdate` and `forceUpdate` do not block code execution. They schedule rendering for \"ASAP\", using `Renderer::runOnce`. Renderer then gets pixel output from relevant applets, and hands the assembled image to the driver. Driver's update process is also asynchronous. If the driver is busy when `requestUpdate` or `forceUpdate` is called, another rendering will run as soon as possible. This is handled by `Renderer::runOnce`\n\n#### Blocking updates\n\nIf needed, call `forceUpdate` with the optional argument `async=false` to wait while an update runs (> 1 second). Additionally, the `awaitUpdate` method can be used to block until any previous update has completed. An example usage of this is waiting to draw the shutdown screen.\n\n#### Global rotation\n\nThe exact size / position / rotation of InkHUD applets is configurable by the user. To achieve this, applets draw pixels between 0,0 and `Applet::width()`, `Applet::height()`\n\n- **Scaling**: Applet's `width()` and `height()` are set by `Tile` before rendering starts\n- **Translation**: `Tile` shifts applet pixels up/down/left/right\n- **Rotation**: `Renderer` rotates all pixels it receives, before placing them into the final image buffer\n\n---\n\n### `InkHUD::Renderer::DisplayHealth`\n\n_`src/graphics/niche/InkHUD/DisplayHealth.h`_\n\nResponsible for maintaining display health, by optimizing the ratio of FAST vs FULL refreshes\n\n- count number of FAST vs FULL refreshes (debt)\n- suggest either FAST or FULL type\n- periodically FULL refresh the display unprovoked, if needed\n\n#### Background Info\n\nWhen the image on an E-Ink display is updated, different procedures can be used to move the pixels to their new states. We have defined two procedures: `FAST` and `FULL`.\n\nA `FAST` update moves pixels directly from their old position, to their new position. This is aesthetically pleasing, and quick, _but_ it is challenging for the display hardware. If used excessively, pixels can build up residual charge, which negatively impacts the display's lifespan and image quality.\n\nA `FULL` update first moves all pixels between black and white, before letting them eventually settle at their final position. This causes an unpleasant flashing of the display image, but is best for the display health and image quality.\n\nMost displays readily tolerate `FAST` updates, so long as a `FULL` update is occasionally performed. How often this `FULL` update is required depends on the display model.\n\n#### Debt\n\n`InkHUD::DisplayHealth` records how many `FAST` refreshes have occurred since the previous `FULL` refresh.\n\nThis is referred to as the \"full refresh debt\".\n\nIf an update of a specific type (`FULL` / `FAST`) is requested / forced, this will be granted.\n\nIf an update is requested / forced _without_ a specified type (`UpdateTypes::UNSPECIFIED`), `DisplayHealth` will select either `FAST` or `FULL`, in an attempt to maintain a target ratio of fast to full updates.\n\nThis target is set by `InkHUD::setDisplayResilience`, when setting up in `nichegraphics.h`\n\nIf an _excessive_ amount of `FAST` refreshes are performed back-to-back, `DisplayHealth` will begin artificially inflating the full refresh debt. This will cause the next few `UNSPECIFIED` updates to _all_ be performed as `FULL`, while the debt is paid down.\n\nThis system of \"full refresh debt\" allows us to increase perceived responsiveness by tolerating additional strain on the display during periods of user interaction, and attempting to \"repair the damage\" later, once user interaction ceases.\n\n#### Maintenance\n\nThe system of \"full refresh debt\" assumes that the display will perform many updates of `UNSPECIFIED` type between periods of user interaction. Depending on the amount of mesh traffic / applet selection, this may not be the case.\n\nIf debt is particularly high, and no updates are taking place organically, `DisplayHealth` will begin infrequently performing `FULL` updates, purely to pay down the full refresh debt.\n\n---\n\n### `InkHUD::Events`\n\nHandles events which impact the InkHUD system generally (e.g. shutdown, button press).\n\nApplets themselves do also listen separately for various events, but for the purpose of gathering information which they would like to display.\n\n#### Buttons\n\nButton input is sometimes handled by a system applet. `InkHUD::Events` determines whether the button should be handled by a specific system applet, or should instead trigger a default behavior\n\n#### Factory Reset\n\nThe Events class handles the admin messages(s) which trigger factory reset. We set `Events::eraseOnReboot = true`, which causes `Events::onReboot` to erase the contents of InkHUD's data directory. We do this because some applets (e.g. ThreadedMessageApplet) save their own data to flash, so if we erased earlier, that data would get re-written during reboot.\n\n---\n\n### `InkHUD::Applet`\n\nA base class for applets. An applet is one \"program\", which may show info on the display.\n\nTo oversimplify, all of the InkHUD code \"under the hood\" only exists to support applets. Applets are what actually shows useful information to the user. This base class exposes the functionality needed to write an applet.\n\n#### Drawing Methods\n\n`Applet` implements most AdafruitGFX drawing methods. Exception is the text handling. `printAt`, `printWrapped`, and `printThick` should be used instead. These are intended to be more convenient, but they also implement the character substitution system which powers the foreign alphabet support.\n\n`Applet` also adds methods for drawing several design elements which are re-used commonly though-out InkHUD.\n\n#### InkHUD Events\n\nApplets undergo a number of state changes: activated / deactivated by user, brought to foreground / hidden to background by user button press, etc. The `Applet` class provides a set of virtual methods, which an applet can override to appropriately handle these events.\n\nThe `onRender` virtual method is one example. This is called when an applet is rendered, and should execute all drawing code. An applet _must_ implement this method.\n\n#### Responsive Design\n\nAn applet's size will vary depending on the screen size, and the user's layout (multiplexing). Immediately before `onRender` is called, an applet's dimensions are updated, so that `width()` and `height()` will give the required size. The applet should draw its graphical elements relative to these values. The methods `X(float)` and `Y(float)` are also provided for convenience.\n\n| edge   | coordinate | shorthand |\n| ------ | ---------- | --------- |\n| left   | 0          | `X(0.0)`  |\n| top    | 0          | `Y(0.0)`  |\n| right  | `width()`  | `X(1.0)`  |\n| bottom | `height()` | `Y(1.0)`  |\n\nThe same principles apply for drawing text. Methods like `AppletFont::lineHeight` and `getTextWidth` are useful here.\n\nApplets should always draw relative to their top left corner, at _x=0, y=0._ The applet's pixels are automatically moved to the correct position on-screen by an InkHUD::Tile.\n\n#### User Applets\n\nUser applets are the \"normal\" applets, each one displaying a specific set of information to the user. They can be activated / deactivated at run-time using the on-screen menu. Examples include `DMApplet.h` and `PositionsApplet.h`. User applets are not expected to interact with lower layers of the InkHUD code.\n\nUsers applets are instantiated in a variant's `setupNicheGraphics` method, and passed to `InkHUD::addApplet`. Their class should not be mentioned elsewhere, so that its code can be stripped away during compilation if a variant does not implement the specific applet. Internal processing of user applets treats them all as the generic `Applet` type only.\n\n#### Activated / Deactivated\n\nUser applets can be activated or deactivated. This changes at run-time: the user selects which applets should be active using the on-screen menu. An applet should not process data while it is deactivated. It can unobserve any observables, ignore `handleReceived` calls, etc.\n\nAn applet can implement the virtual `onActivate` and `onDeactivate` methods to handle this change in state. It can check this state internally by calling `isActive`.\n\nSystem applets cannot be deactivated.\n\n#### Foreground / Background\n\nAn activated applet can either be _foreground_ or _background_. A foreground applet is one which will be rendered to a tile when the screen updates. A background applet will not be drawn. The applet cycling which takes place when the user button is pressed is implemented using foreground / background.\n\nRegardless of whether it is foreground or background, an activated applet should continue to collect / process data, and request update when it has new info to display. This is because of the _autoshow_ mechanic, which might bring a background applet to foreground in order to display its data. If an applet remains background, its update requests will be safely ignored.\n\n#### Autoshow\n\nAutoshow is a feature which allows the user to select which applets (if any) they would like to be shown automatically. If autoshow is enabled for an applet, it will be brought to foreground when it has new information to display. The user grants this privilege on a per-applet basis, using the on-screen menu. If an event causes an applet to be autoshown, NotificationApplet should not be shown for the same event.\n\nAn applet needs to decide when it has information worthy of autoshowing. It signals this by calling `requestAutoshow`, in addition to the usual `requestUpdate` call.\n\n---\n\n### `InkHUD::SystemApplet`\n\n_System applets_ are applets with special roles, which require special handling. Examples include `BatteryIconApplet.h` and `LogoApplet.h`. These are manually implemented, one-by-one, in `WindowManager.h`.\n\nThis class is a slight extension of `Applet`. It adds extra flags for some special features which are restricted to system applets: exclusive use of the display, and the handling of user input. Having a separate system applet class also allows us to make it clear within the code when system applets are being handled, rather than user applets\n\nWe store reference to these as a `vector<SystemApplets*>`. This parallels how we treat user applets, and makes rendering convenient.\nBecause system applets do have unique roles, there are times when we will need to interact with a specific applet. Rather than keeping an extra set of references, we access them from the `vector<SystemApplet*>`. Use `InkHUD::getSystemApplet` to access the applet by its `Applet::name` value, and then typecast.\n\n---\n\n### `InkHUD::Tile`\n\nA tile represents a region of the display. A tile controls the size and position of an applet.\n\nFor an applet to render, it must be assigned to a tile. When an applet is assigned to a tile, the two become linked. The applet is aware of the tile; the tile is aware of the applet. Applets cannot share a tile; assigning a different applet will remove any existing link.\n\nBefore an applet renders, its width and height are set to the dimensions of the tile. During `onRender`, an applet's drawing methods generate pixels between _x=0, y=0_ and _x=Applet::width(), y=Applet::height()_. These pixels are passed to its tile's `Tile::handleAppletPixel` method. The tile then applies x and y offset, \"translating\" these pixels to the tile's region of the display. These translated pixels are then passed on to the `InkHUD::Renderer`.\n\n![depiction of a tile translating applet pixels](./tile_translation.png)\n\n#### User Tiles\n\n_User applets_ are the \"normal\" applets. They can be activated / deactivated at run-time using the on-screen menu. User applets are rendered to one of the **user tiles**.\n\nThe user can customize the \"layout\", using the on-screen menu. Depending on their selected layout, a certain number of _user tiles_ are created. These tiles are automatically positioned and sized so that they fill the entire screen.\n\nOften, a user will have enabled more applets than they have tiles. Pressing the user-button will cycle through these applets. The old applet is sent to _background_, the new applet is brought to _foreground_. When a user applet is brought to foreground, it becomes assigned to a user tile (the focused tile). When it renders, its size will be set by this tile, and its pixels will be translated to this tile's region. The user applet which was sent to background loses its assignment; it no longer has an assigned tile.\n\n#### Focused Tile\n\nThe focused tile is one of the user tiles. This is tile whose applet will change when the user button is pressed. This also the tile where the menu will appear on longpress. The focused tile is identified by its index in `vector<Tile*> userTiles`.\n\n#### Highlighting\n\nIn addition to the user button, some devices have a second \"auxiliary button\". The function of this button can vary from device to device, but it is sometimes used to focus a different tile. When this happens, the newly focused tile is temporarily \"highlighted\", by drawing it with a border. This border is automatically removed after several seconds. As drawing code may only be executed by applets, this highlighting is a collaborative effort between a `Tile` and an `Applet`: performed in `Applet::render`, after the virtual `onRender` method has already run.\n\nHighlighting is only used when `nextTile` is fired by an aux button. It does not occur if performed via the on-screen menu.\n\n#### System Tiles\n\n_System applets_ are applets with special roles, which require special handling. Examples include `BatteryIconApplet.h` and `LogoApplet.h`. _Mostly_, these applets do not render to user tiles. Instead, they are given their own unique tile, which is positioned / dimensioned manually. The only reference we keep to these special tiles is stored within the linked system applet. They can be accessed with `Applet::getTile`.\n\n---\n\n### `InkHUD::AppletFont`\n\nWrapper which extends the functionality of an AdafruitGFX font.\n\n#### Dimension Info\n\nThe AppletFont class pre-calculates some info about a font's dimensions, which is useful for design (`AppletFont::lineHeight`), and is used to power InkHUD's custom text handling.\n\nThe default AdafruitGFX text handling places characters \"upon a line\", as if hand-written on a sheet of ruled paper. `InkHUD::AppletFont` measures the character set of the font, so that we instead draw fixed-height lines of text, positioned by the bounding box, with optional horizontal and vertical alignment.\n\n![text origins in InkHUD vs AdafruitGFX](./appletfont.png)\n\nThe height of this box is `AppletFont::lineHeight`, which is the height of the tallest character in the font. This gives us a fixed-height for text, which is much tighter than with AdafruitGFX's default line spacing.\n\n#### Encoding\n\nAn AppletFont may be constructed from a standard 7bit ASCII AdafruitGFX font, however InkHUD also supports 8bit extended-ASCII fonts.\n\nFor this, the encoding must be specified when instantiating the AppletFont.\n\n```cpp\nInkHUD::AppletFont(FreeSans9pt_Win1250, InkHUD::AppletFont::WINDOWS_1250);\n```\n\nCurrently supported encodings are:\n\n- ASCII\n- Windows-1250 (Central European)\n- Windows-1251 (Cyrillic)\n- Windows-1252 (Western European)\n\nTo add support for additional encodings, add to the `AppletFont::Encodings` enum, and then define the mapping from unicode in `AppletFont::applyEncoding`.\n\n#### Custom Line Height\n\nSome fonts may have a handful of especially tall characters, especially extended-ASCII fonts with diacritics. Ideally, the font should be modified to help resolve this, but if the problem remains, manual offsets to the automatically determined line height can be specified in the constructor.\n\n```cpp\n// -2 px of padding above, +1 px of padding below\nInkHUD::AppletFont(FreeSans9pt7b, ASCII, -2, 1);\n```\n\n#### Emoji\n\nAdafruitGFX fonts are limited to 255 characters. InkHUD supports a restricted set of emoji, which are stored in the unused code points of the ASCII control characters (`'\\x01'`, `'\\x02'`, etc).\n\nStandard AdafruitGFX fonts contain no glyphs below `'\\x20'`, so will ignore these attempts to parse emoji.\n\nThis mapping of emoji to control characters is fairly arbitrary. Selection was influenced by [PR #3940 Oled screen emojis](https://github.com/meshtastic/firmware/pull/3940) and [Emoji Frequency Spreadsheet](https://docs.google.com/spreadsheets/d/1Zs13WJYdZL1pNZP0dCIXkWau_tZOjK3mmJz0KNq4I30/).\n\n| Code Point | Emoji                                          |\n| ---------- | ---------------------------------------------- |\n| ~~`0x00`~~ | (null term, unused)                            |\n| `0x01`     | 👍                                             |\n| `0x02`     | 👎                                             |\n| `0x03`     | 🙂                                             |\n| `0x04`     | 😆                                             |\n| `0x05`     | 👋                                             |\n| `0x06`     | ☀                                              |\n| ~~`0x07`~~ | (bell char, unused)                            |\n| `0x08`     | 🌧                                             |\n| `0x09`     | ☁                                              |\n| ~~`0x0A`~~ | (line feed, unused)                            |\n| `0x0B`     | ♥                                              |\n| `0x0C`     | 💩                                             |\n| ~~`0x0D`~~ | (carriage return, unused)                      |\n| `0x0E`     | 🔔                                             |\n| `0x0F`     | 😭                                             |\n| `0x1A`     | (substitution \"⍰\", used for unprintable chars) |\n| `0x1B`     | 🤗                                             |\n| `0x1C`     | 😉                                             |\n| `0x1D`     | 😏                                             |\n| `0x1E`     | 🫡 (saluting face)                             |\n| `0x1F`     | 👌                                             |\n"
  },
  {
    "path": "src/graphics/niche/Inputs/README.md",
    "content": "# NiceGraphics - Inputs\n\nGeneral purpose input sources, for use with NicheGraphics UIs.\n\nBy remaining independent, we can have tailored input sources with further complicating the code in ButtonThread and the canned messages module.\n\nDepending on its role, a NicheGraphics UI may or may not want to make use of the existing input broker.\n"
  },
  {
    "path": "src/graphics/niche/Inputs/TwoButton.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./TwoButton.h\"\n\n#include \"NodeDB.h\" // For the helper function TwoButton::getUserButtonPin\n#include \"PowerFSM.h\"\n#include \"sleep.h\"\n\nusing namespace NicheGraphics::Inputs;\n\nTwoButton::TwoButton() : concurrency::OSThread(\"TwoButton\")\n{\n    // Don't start polling buttons for release immediately\n    // Assume they are in a \"released\" state at boot\n    OSThread::disable();\n\n#ifdef ARCH_ESP32\n    // Register callbacks for before and after lightsleep\n    lsObserver.observe(&notifyLightSleep);\n    lsEndObserver.observe(&notifyLightSleepEnd);\n#endif\n\n    // Explicitly initialize these, just to keep cppcheck quiet..\n    buttons[0] = Button();\n    buttons[1] = Button();\n}\n\n// Get access to (or create) the singleton instance of this class\n// Accessible inside the ISRs, even though we maybe shouldn't\nTwoButton *TwoButton::getInstance()\n{\n    // Instantiate the class the first time this method is called\n    static TwoButton *const singletonInstance = new TwoButton;\n\n    return singletonInstance;\n}\n\n// Begin receiving button input\n// We probably need to do this after sleep, as well as at boot\nvoid TwoButton::start()\n{\n    if (buttons[0].pin != 0xFF)\n        attachInterrupt(buttons[0].pin, TwoButton::isrPrimary, buttons[0].activeLogic == LOW ? FALLING : RISING);\n\n    if (buttons[1].pin != 0xFF)\n        attachInterrupt(buttons[1].pin, TwoButton::isrSecondary, buttons[1].activeLogic == LOW ? FALLING : RISING);\n}\n\n// Stop receiving button input, and run custom sleep code\n// Called before device sleeps. This might be power-off, or just ESP32 light sleep\n// Some devices will want to attach interrupts here, for the user button to wake from sleep\nvoid TwoButton::stop()\n{\n    if (buttons[0].pin != 0xFF)\n        detachInterrupt(buttons[0].pin);\n\n    if (buttons[1].pin != 0xFF)\n        detachInterrupt(buttons[1].pin);\n}\n\n// Attempt to resolve a GPIO pin for the user button, honoring userPrefs.jsonc and device settings\n// This helper method isn't used by the TwoButton class itself, it could be moved elsewhere.\n// Intention is to pass this value to TwoButton::setWiring in the setupNicheGraphics method.\nuint8_t TwoButton::getUserButtonPin()\n{\n    uint8_t pin = 0xFF; // Unset\n\n    // Use default pin for variant, if no better source\n#ifdef BUTTON_PIN\n    pin = BUTTON_PIN;\n#endif\n\n    // From userPrefs.jsonc, if set\n#ifdef USERPREFS_BUTTON_PIN\n    pin = USERPREFS_BUTTON_PIN;\n#endif\n\n    // From user's override in device settings, if set\n    if (config.device.button_gpio)\n        pin = config.device.button_gpio;\n\n    return pin;\n}\n\n// Configures the wiring and logic of either button\n// Called when outlining your NicheGraphics implementation, in variant/nicheGraphics.cpp\nvoid TwoButton::setWiring(uint8_t whichButton, uint8_t pin, bool internalPullup)\n{\n    // Prevent the same GPIO being assigned to multiple buttons\n    // Allows an edge case when the user remaps hardware buttons using device settings, due to a broken user button\n    for (uint8_t i = 0; i < whichButton; i++) {\n        if (buttons[i].pin == pin) {\n            LOG_WARN(\"Attempted reuse of GPIO %d. Ignoring assignment whichButton=%d\", pin, whichButton);\n            return;\n        }\n    }\n\n    assert(whichButton < 2);\n    buttons[whichButton].pin = pin;\n    buttons[whichButton].activeLogic = LOW; // Unimplemented\n\n    pinMode(buttons[whichButton].pin, internalPullup ? INPUT_PULLUP : INPUT);\n}\n\nvoid TwoButton::setTiming(uint8_t whichButton, uint32_t debounceMs, uint32_t longpressMs)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].debounceLength = debounceMs;\n    buttons[whichButton].longpressLength = longpressMs;\n}\n\n// Set what should happen when a button becomes pressed\n// Use this to implement a \"while held\" behavior\nvoid TwoButton::setHandlerDown(uint8_t whichButton, Callback onDown)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onDown = onDown;\n}\n\n// Set what should happen when a button becomes unpressed\n// Use this to implement a \"While held\" behavior\nvoid TwoButton::setHandlerUp(uint8_t whichButton, Callback onUp)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onUp = onUp;\n}\n\n// Set what should happen when a \"short press\" event has occurred\nvoid TwoButton::setHandlerShortPress(uint8_t whichButton, Callback onShortPress)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onShortPress = onShortPress;\n}\n\n// Set what should happen when a \"long press\" event has fired\n// Note: this will occur while the button is still held\nvoid TwoButton::setHandlerLongPress(uint8_t whichButton, Callback onLongPress)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onLongPress = onLongPress;\n}\n\n// Handle the start of a press to the primary button\n// Wakes our button thread\nvoid TwoButton::isrPrimary()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButton *b = TwoButton::getInstance();\n        if (b->buttons[0].state == State::REST) {\n            b->buttons[0].state = State::IRQ;\n            b->buttons[0].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\n// Handle the start of a press to the secondary button\n// Wakes our button thread\nvoid TwoButton::isrSecondary()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButton *b = TwoButton::getInstance();\n        if (b->buttons[1].state == State::REST) {\n            b->buttons[1].state = State::IRQ;\n            b->buttons[1].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\n// Concise method to start our button thread\n// Follows an ISR, listening for button release\nvoid TwoButton::startThread()\n{\n    if (!OSThread::enabled) {\n        OSThread::setInterval(10);\n        OSThread::enabled = true;\n    }\n}\n\n// Concise method to stop our button thread\n// Called when we no longer need to poll for button release\nvoid TwoButton::stopThread()\n{\n    if (OSThread::enabled) {\n        OSThread::disable();\n    }\n\n    // Reset both buttons manually\n    // Just in case an IRQ fires during the process of resetting the system\n    // Can occur with super rapid presses?\n    buttons[0].state = REST;\n    buttons[1].state = REST;\n}\n\n// Our button thread\n// Started by an IRQ, on either button\n// Polls for button releases\n// Stops when both buttons released\nint32_t TwoButton::runOnce()\n{\n    constexpr uint8_t BUTTON_COUNT = sizeof(buttons) / sizeof(Button);\n\n    // Allow either button to request that our thread should continue polling\n    bool awaitingRelease = false;\n\n    // Check both primary and secondary buttons\n    for (uint8_t i = 0; i < BUTTON_COUNT; i++) {\n        switch (buttons[i].state) {\n        // No action: button has not been pressed\n        case REST:\n            break;\n\n        // New press detected by interrupt\n        case IRQ:\n            powerFSM.trigger(EVENT_PRESS);             // Tell PowerFSM that press occurred (resets sleep timer)\n            buttons[i].onDown();                       // Run callback: press has begun (possible hold behavior)\n            buttons[i].state = State::POLLING_UNFIRED; // Mark that button-down has been handled\n            awaitingRelease = true;                    // Mark that polling-for-release should continue\n            break;\n\n        // An existing press continues\n        // Not held long enough to register as longpress\n        case POLLING_UNFIRED: {\n            uint32_t length = millis() - buttons[i].irqAtMillis;\n\n            // If button released since last thread tick,\n            if (digitalRead(buttons[i].pin) != buttons[i].activeLogic) {\n                buttons[i].onUp();              // Run callback: press has ended (possible release of a hold)\n                buttons[i].state = State::REST; // Mark that the button has reset\n                if (length > buttons[i].debounceLength && length < buttons[i].longpressLength) // If too short for longpress,\n                    buttons[i].onShortPress();                                                 // Run callback: short press\n            }\n\n            // If button not yet released\n            else {\n                awaitingRelease = true; // Mark that polling-for-release should continue\n                if (length >= buttons[i].longpressLength) {\n                    // Run callback: long press (once)\n                    // Then continue waiting for release, to rearm\n                    buttons[i].state = State::POLLING_FIRED;\n                    buttons[i].onLongPress();\n                }\n            }\n            break;\n        }\n\n        // Button still held, but duration long enough that longpress event already fired\n        // Just waiting for release\n        case POLLING_FIRED:\n            // Release detected\n            if (digitalRead(buttons[i].pin) != buttons[i].activeLogic) {\n                buttons[i].state = State::REST;\n                buttons[i].onUp(); // Callback: release of hold (in this case: *after* longpress has fired)\n            }\n            // Not yet released, keep polling\n            else\n                awaitingRelease = true;\n            break;\n        }\n    }\n\n    // If both buttons are now released\n    // we don't need to waste cpu resources polling\n    // IRQ will restart this thread when we next need it\n    if (!awaitingRelease)\n        stopThread();\n\n    // Run this method again, or don't..\n    // Use whatever behavior was previously set by stopThread() or startThread()\n    return OSThread::interval;\n}\n\n#ifdef ARCH_ESP32\n\n// Detach our class' interrupts before lightsleep\n// Allows sleep.cpp to configure its own interrupts, which wake the device on user-button press\nint TwoButton::beforeLightSleep(void *unused)\n{\n    stop();\n    return 0; // Indicates success\n}\n\n// Reconfigure our interrupts\n// Our class' interrupts were disconnected during sleep, to allow the user button to wake the device from sleep\nint TwoButton::afterLightSleep(esp_sleep_wakeup_cause_t cause)\n{\n    start();\n\n    // Manually trigger the button-down ISR\n    // - during light sleep, our ISR is disabled\n    // - if light sleep ends by button press, pretend our own ISR caught it\n    // - need to manually confirm by reading pin ourselves, to avoid occasional false positives\n    //   (false positive only when using internal pullup resistors?)\n    if (cause == ESP_SLEEP_WAKEUP_GPIO && digitalRead(buttons[0].pin) == buttons[0].activeLogic)\n        isrPrimary();\n\n    return 0; // Indicates success\n}\n\n#endif\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/Inputs/TwoButton.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n/*\n\nRe-usable NicheGraphics input source\n\nShort and Long press for up to two buttons\nInterrupt driven\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"assert.h\"\n#include \"functional\"\n\n#ifdef ARCH_ESP32\n#include \"esp_sleep.h\" // For light-sleep handling\n#endif\n\n#include \"Observer.h\"\n\nnamespace NicheGraphics::Inputs\n{\n\nclass TwoButton : protected concurrency::OSThread\n{\n  public:\n    typedef std::function<void()> Callback;\n\n    static uint8_t getUserButtonPin(); // Resolve the GPIO, considering the various possible source of definition\n\n    static TwoButton *getInstance(); // Create or get the singleton instance\n    void start();                    // Start handling button input\n    void stop();                     // Stop handling button input (disconnect ISRs for sleep)\n    void setWiring(uint8_t whichButton, uint8_t pin, bool internalPullup = false);\n    void setTiming(uint8_t whichButton, uint32_t debounceMs, uint32_t longpressMs);\n    void setHandlerDown(uint8_t whichButton, Callback onDown);\n    void setHandlerUp(uint8_t whichButton, Callback onUp);\n    void setHandlerShortPress(uint8_t whichButton, Callback onShortPress);\n    void setHandlerLongPress(uint8_t whichButton, Callback onLongPress);\n\n    // Disconnect and reconnect interrupts for light sleep\n#ifdef ARCH_ESP32\n    int beforeLightSleep(void *unused);\n    int afterLightSleep(esp_sleep_wakeup_cause_t cause);\n#endif\n\n  private:\n    // Internal state of a specific button\n    enum State {\n        REST,            // Up, no activity\n        IRQ,             // Down detected, not yet handled\n        POLLING_UNFIRED, // Down handled, polling for release\n        POLLING_FIRED,   // Longpress fired, button still held\n    };\n\n    // Contains info about a specific button\n    // (Array of this struct below)\n    class Button\n    {\n      public:\n        // Per-button config\n        uint8_t pin = 0xFF;                 // 0xFF: unset\n        bool activeLogic = LOW;             // Active LOW by default. Currently unimplemented.\n        uint32_t debounceLength = 50;       // Minimum length for shortpress, in ms\n        uint32_t longpressLength = 500;     // How long after button down to fire longpress, in ms\n        volatile State state = State::REST; // Internal state\n        volatile uint32_t irqAtMillis;      // millis() when button went down\n\n        // Per-button event callbacks\n        static void noop(){};\n        std::function<void()> onDown = noop;\n        std::function<void()> onUp = noop;\n        std::function<void()> onShortPress = noop;\n        std::function<void()> onLongPress = noop;\n    };\n\n#ifdef ARCH_ESP32\n    // Get notified when lightsleep begins and ends\n    CallbackObserver<TwoButton, void *> lsObserver = CallbackObserver<TwoButton, void *>(this, &TwoButton::beforeLightSleep);\n    CallbackObserver<TwoButton, esp_sleep_wakeup_cause_t> lsEndObserver =\n        CallbackObserver<TwoButton, esp_sleep_wakeup_cause_t>(this, &TwoButton::afterLightSleep);\n#endif\n\n    int32_t runOnce() override; // Timer method. Polls for button release\n\n    void startThread(); // Start polling for release\n    void stopThread();  // Stop polling for release\n\n    static void isrPrimary();   // Detect start of press\n    static void isrSecondary(); // Detect start of press (optional aux button)\n\n    TwoButton(); // Constructor made private: force use of Button::instance()\n\n    // Info about both buttons\n    Button buttons[2];\n};\n\n}; // namespace NicheGraphics::Inputs\n\n#endif"
  },
  {
    "path": "src/graphics/niche/Inputs/TwoButtonExtended.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./TwoButtonExtended.h\"\n\n#include \"NodeDB.h\" // For the helper function TwoButtonExtended::getUserButtonPin\n#include \"PowerFSM.h\"\n#include \"sleep.h\"\n\nusing namespace NicheGraphics::Inputs;\n\nTwoButtonExtended::TwoButtonExtended() : concurrency::OSThread(\"TwoButtonExtended\")\n{\n    // Don't start polling buttons for release immediately\n    // Assume they are in a \"released\" state at boot\n    OSThread::disable();\n\n#ifdef ARCH_ESP32\n    // Register callbacks for before and after lightsleep\n    lsObserver.observe(&notifyLightSleep);\n    lsEndObserver.observe(&notifyLightSleepEnd);\n#endif\n\n    // Explicitly initialize these, just to keep cppcheck quiet..\n    buttons[0] = Button();\n    buttons[1] = Button();\n    joystick[Direction::UP] = SimpleButton();\n    joystick[Direction::DOWN] = SimpleButton();\n    joystick[Direction::LEFT] = SimpleButton();\n    joystick[Direction::RIGHT] = SimpleButton();\n}\n\n// Get access to (or create) the singleton instance of this class\n// Accessible inside the ISRs, even though we maybe shouldn't\nTwoButtonExtended *TwoButtonExtended::getInstance()\n{\n    // Instantiate the class the first time this method is called\n    static TwoButtonExtended *const singletonInstance = new TwoButtonExtended;\n\n    return singletonInstance;\n}\n\n// Begin receiving button input\n// We probably need to do this after sleep, as well as at boot\nvoid TwoButtonExtended::start()\n{\n    if (buttons[0].pin != 0xFF)\n        attachInterrupt(buttons[0].pin, TwoButtonExtended::isrPrimary, buttons[0].activeLogic == LOW ? FALLING : RISING);\n\n    if (buttons[1].pin != 0xFF)\n        attachInterrupt(buttons[1].pin, TwoButtonExtended::isrSecondary, buttons[1].activeLogic == LOW ? FALLING : RISING);\n\n    if (joystick[Direction::UP].pin != 0xFF)\n        attachInterrupt(joystick[Direction::UP].pin, TwoButtonExtended::isrJoystickUp,\n                        joystickActiveLogic == LOW ? FALLING : RISING);\n\n    if (joystick[Direction::DOWN].pin != 0xFF)\n        attachInterrupt(joystick[Direction::DOWN].pin, TwoButtonExtended::isrJoystickDown,\n                        joystickActiveLogic == LOW ? FALLING : RISING);\n\n    if (joystick[Direction::LEFT].pin != 0xFF)\n        attachInterrupt(joystick[Direction::LEFT].pin, TwoButtonExtended::isrJoystickLeft,\n                        joystickActiveLogic == LOW ? FALLING : RISING);\n\n    if (joystick[Direction::RIGHT].pin != 0xFF)\n        attachInterrupt(joystick[Direction::RIGHT].pin, TwoButtonExtended::isrJoystickRight,\n                        joystickActiveLogic == LOW ? FALLING : RISING);\n}\n\n// Stop receiving button input, and run custom sleep code\n// Called before device sleeps. This might be power-off, or just ESP32 light sleep\n// Some devices will want to attach interrupts here, for the user button to wake from sleep\nvoid TwoButtonExtended::stop()\n{\n    if (buttons[0].pin != 0xFF)\n        detachInterrupt(buttons[0].pin);\n\n    if (buttons[1].pin != 0xFF)\n        detachInterrupt(buttons[1].pin);\n\n    if (joystick[Direction::UP].pin != 0xFF)\n        detachInterrupt(joystick[Direction::UP].pin);\n\n    if (joystick[Direction::DOWN].pin != 0xFF)\n        detachInterrupt(joystick[Direction::DOWN].pin);\n\n    if (joystick[Direction::LEFT].pin != 0xFF)\n        detachInterrupt(joystick[Direction::LEFT].pin);\n\n    if (joystick[Direction::RIGHT].pin != 0xFF)\n        detachInterrupt(joystick[Direction::RIGHT].pin);\n}\n\n// Attempt to resolve a GPIO pin for the user button, honoring userPrefs.jsonc and device settings\n// This helper method isn't used by the TwoButtonExtended class itself, it could be moved elsewhere.\n// Intention is to pass this value to TwoButtonExtended::setWiring in the setupNicheGraphics method.\nuint8_t TwoButtonExtended::getUserButtonPin()\n{\n    uint8_t pin = 0xFF; // Unset\n\n    // Use default pin for variant, if no better source\n#ifdef BUTTON_PIN\n    pin = BUTTON_PIN;\n#endif\n\n    // From userPrefs.jsonc, if set\n#ifdef USERPREFS_BUTTON_PIN\n    pin = USERPREFS_BUTTON_PIN;\n#endif\n\n    // From user's override in device settings, if set\n    if (config.device.button_gpio)\n        pin = config.device.button_gpio;\n\n    return pin;\n}\n\n// Configures the wiring and logic of either button\n// Called when outlining your NicheGraphics implementation, in variant/nicheGraphics.cpp\nvoid TwoButtonExtended::setWiring(uint8_t whichButton, uint8_t pin, bool internalPullup)\n{\n    // Prevent the same GPIO being assigned to multiple buttons\n    // Allows an edge case when the user remaps hardware buttons using device settings, due to a broken user button\n    for (uint8_t i = 0; i < whichButton; i++) {\n        if (buttons[i].pin == pin) {\n            LOG_WARN(\"Attempted reuse of GPIO %d. Ignoring assignment whichButton=%d\", pin, whichButton);\n            return;\n        }\n    }\n\n    assert(whichButton < 2);\n    buttons[whichButton].pin = pin;\n    buttons[whichButton].activeLogic = LOW;\n\n    pinMode(buttons[whichButton].pin, internalPullup ? INPUT_PULLUP : INPUT);\n}\n\n// Configures the wiring and logic of the joystick buttons\n// Called when outlining your NicheGraphics implementation, in variant/nicheGraphics.cpp\nvoid TwoButtonExtended::setJoystickWiring(uint8_t uPin, uint8_t dPin, uint8_t lPin, uint8_t rPin, bool internalPullup)\n{\n    if (joystick[Direction::UP].pin == uPin || joystick[Direction::DOWN].pin == dPin || joystick[Direction::LEFT].pin == lPin ||\n        joystick[Direction::RIGHT].pin == rPin) {\n        LOG_WARN(\"Attempted reuse of Joystick GPIO. Ignoring assignment\");\n        return;\n    }\n\n    joystick[Direction::UP].pin = uPin;\n    joystick[Direction::DOWN].pin = dPin;\n    joystick[Direction::LEFT].pin = lPin;\n    joystick[Direction::RIGHT].pin = rPin;\n    joystickActiveLogic = LOW;\n\n    pinMode(joystick[Direction::UP].pin, internalPullup ? INPUT_PULLUP : INPUT);\n    pinMode(joystick[Direction::DOWN].pin, internalPullup ? INPUT_PULLUP : INPUT);\n    pinMode(joystick[Direction::LEFT].pin, internalPullup ? INPUT_PULLUP : INPUT);\n    pinMode(joystick[Direction::RIGHT].pin, internalPullup ? INPUT_PULLUP : INPUT);\n}\n\n// Configures only left/right joystick directions for a two-way rocker\nvoid TwoButtonExtended::setTwoWayRockerWiring(uint8_t leftPin, uint8_t rightPin, bool internalPullup)\n{\n    if (leftPin == rightPin) {\n        LOG_WARN(\"Attempted reuse of TwoWayRocker GPIO. Ignoring assignment\");\n        return;\n    }\n\n    joystick[Direction::UP].pin = 0xFF;\n    joystick[Direction::DOWN].pin = 0xFF;\n    joystick[Direction::LEFT].pin = leftPin;\n    joystick[Direction::RIGHT].pin = rightPin;\n    joystickActiveLogic = LOW;\n\n    pinMode(joystick[Direction::LEFT].pin, internalPullup ? INPUT_PULLUP : INPUT);\n    pinMode(joystick[Direction::RIGHT].pin, internalPullup ? INPUT_PULLUP : INPUT);\n}\n\nvoid TwoButtonExtended::setTiming(uint8_t whichButton, uint32_t debounceMs, uint32_t longpressMs)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].debounceLength = debounceMs;\n    buttons[whichButton].longpressLength = longpressMs;\n}\n\nvoid TwoButtonExtended::setJoystickDebounce(uint32_t debounceMs)\n{\n    joystickDebounceLength = debounceMs;\n}\n\n// Set what should happen when a button becomes pressed\n// Use this to implement a \"while held\" behavior\nvoid TwoButtonExtended::setHandlerDown(uint8_t whichButton, Callback onDown)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onDown = onDown;\n}\n\n// Set what should happen when a button becomes unpressed\n// Use this to implement a \"While held\" behavior\nvoid TwoButtonExtended::setHandlerUp(uint8_t whichButton, Callback onUp)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onUp = onUp;\n}\n\n// Set what should happen when a \"short press\" event has occurred\nvoid TwoButtonExtended::setHandlerShortPress(uint8_t whichButton, Callback onPress)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onPress = onPress;\n}\n\n// Set what should happen when a \"long press\" event has fired\n// Note: this will occur while the button is still held\nvoid TwoButtonExtended::setHandlerLongPress(uint8_t whichButton, Callback onLongPress)\n{\n    assert(whichButton < 2);\n    buttons[whichButton].onLongPress = onLongPress;\n}\n\n// Set what should happen when a joystick button becomes pressed\n// Use this to implement a \"while held\" behavior\nvoid TwoButtonExtended::setJoystickDownHandlers(Callback uDown, Callback dDown, Callback lDown, Callback rDown)\n{\n    joystick[Direction::UP].onDown = uDown;\n    joystick[Direction::DOWN].onDown = dDown;\n    joystick[Direction::LEFT].onDown = lDown;\n    joystick[Direction::RIGHT].onDown = rDown;\n}\n\n// Set what should happen when a joystick button becomes unpressed\n// Use this to implement a \"while held\" behavior\nvoid TwoButtonExtended::setJoystickUpHandlers(Callback uUp, Callback dUp, Callback lUp, Callback rUp)\n{\n    joystick[Direction::UP].onUp = uUp;\n    joystick[Direction::DOWN].onUp = dUp;\n    joystick[Direction::LEFT].onUp = lUp;\n    joystick[Direction::RIGHT].onUp = rUp;\n}\n\n// Set what should happen when a \"press\" event has fired\n// Note: this will occur while the joystick button is still held\nvoid TwoButtonExtended::setJoystickPressHandlers(Callback uPress, Callback dPress, Callback lPress, Callback rPress)\n{\n    joystick[Direction::UP].onPress = uPress;\n    joystick[Direction::DOWN].onPress = dPress;\n    joystick[Direction::LEFT].onPress = lPress;\n    joystick[Direction::RIGHT].onPress = rPress;\n}\n\n// Set press handlers for a two-way rocker mapped to left/right directions\nvoid TwoButtonExtended::setTwoWayRockerPressHandlers(Callback lPress, Callback rPress)\n{\n    joystick[Direction::LEFT].onPress = lPress;\n    joystick[Direction::RIGHT].onPress = rPress;\n}\n\n// Handle the start of a press to the primary button\n// Wakes our button thread\nvoid TwoButtonExtended::isrPrimary()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButtonExtended *b = TwoButtonExtended::getInstance();\n        if (b->buttons[0].state == State::REST) {\n            b->buttons[0].state = State::IRQ;\n            b->buttons[0].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\n// Handle the start of a press to the secondary button\n// Wakes our button thread\nvoid TwoButtonExtended::isrSecondary()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButtonExtended *b = TwoButtonExtended::getInstance();\n        if (b->buttons[1].state == State::REST) {\n            b->buttons[1].state = State::IRQ;\n            b->buttons[1].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\n// Handle the start of a press to the joystick buttons\n// Also wakes our button thread\nvoid TwoButtonExtended::isrJoystickUp()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButtonExtended *b = TwoButtonExtended::getInstance();\n        if (b->joystick[Direction::UP].state == State::REST) {\n            b->joystick[Direction::UP].state = State::IRQ;\n            b->joystick[Direction::UP].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\nvoid TwoButtonExtended::isrJoystickDown()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButtonExtended *b = TwoButtonExtended::getInstance();\n        if (b->joystick[Direction::DOWN].state == State::REST) {\n            b->joystick[Direction::DOWN].state = State::IRQ;\n            b->joystick[Direction::DOWN].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\nvoid TwoButtonExtended::isrJoystickLeft()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButtonExtended *b = TwoButtonExtended::getInstance();\n        if (b->joystick[Direction::LEFT].state == State::REST) {\n            b->joystick[Direction::LEFT].state = State::IRQ;\n            b->joystick[Direction::LEFT].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\nvoid TwoButtonExtended::isrJoystickRight()\n{\n    static volatile bool isrRunning = false;\n\n    if (!isrRunning) {\n        isrRunning = true;\n        TwoButtonExtended *b = TwoButtonExtended::getInstance();\n        if (b->joystick[Direction::RIGHT].state == State::REST) {\n            b->joystick[Direction::RIGHT].state = State::IRQ;\n            b->joystick[Direction::RIGHT].irqAtMillis = millis();\n            b->startThread();\n        }\n        isrRunning = false;\n    }\n}\n\n// Concise method to start our button thread\n// Follows an ISR, listening for button release\nvoid TwoButtonExtended::startThread()\n{\n    if (!OSThread::enabled) {\n        OSThread::setInterval(10);\n        OSThread::enabled = true;\n    }\n}\n\n// Concise method to stop our button thread\n// Called when we no longer need to poll for button release\nvoid TwoButtonExtended::stopThread()\n{\n    if (OSThread::enabled) {\n        OSThread::disable();\n    }\n\n    // Reset both buttons manually\n    // Just in case an IRQ fires during the process of resetting the system\n    // Can occur with super rapid presses?\n    buttons[0].state = REST;\n    buttons[1].state = REST;\n    joystick[Direction::UP].state = REST;\n    joystick[Direction::DOWN].state = REST;\n    joystick[Direction::LEFT].state = REST;\n    joystick[Direction::RIGHT].state = REST;\n}\n\n// Our button thread\n// Started by an IRQ, on either button\n// Polls for button releases\n// Stops when both buttons released\nint32_t TwoButtonExtended::runOnce()\n{\n    constexpr uint8_t BUTTON_COUNT = sizeof(buttons) / sizeof(Button);\n    constexpr uint8_t JOYSTICK_COUNT = sizeof(joystick) / sizeof(SimpleButton);\n\n    // Allow either button to request that our thread should continue polling\n    bool awaitingRelease = false;\n\n    // Check both primary and secondary buttons\n    for (uint8_t i = 0; i < BUTTON_COUNT; i++) {\n        switch (buttons[i].state) {\n        // No action: button has not been pressed\n        case REST:\n            break;\n\n        // New press detected by interrupt\n        case IRQ:\n            powerFSM.trigger(EVENT_PRESS);             // Tell PowerFSM that press occurred (resets sleep timer)\n            buttons[i].onDown();                       // Run callback: press has begun (possible hold behavior)\n            buttons[i].state = State::POLLING_UNFIRED; // Mark that button-down has been handled\n            awaitingRelease = true;                    // Mark that polling-for-release should continue\n            break;\n\n        // An existing press continues\n        // Not held long enough to register as longpress\n        case POLLING_UNFIRED: {\n            uint32_t length = millis() - buttons[i].irqAtMillis;\n\n            // If button released since last thread tick,\n            if (digitalRead(buttons[i].pin) != buttons[i].activeLogic) {\n                buttons[i].onUp();              // Run callback: press has ended (possible release of a hold)\n                buttons[i].state = State::REST; // Mark that the button has reset\n                if (length > buttons[i].debounceLength && length < buttons[i].longpressLength) // If too short for longpress,\n                    buttons[i].onPress();                                                      // Run callback: press\n            }\n            // If button not yet released\n            else {\n                awaitingRelease = true; // Mark that polling-for-release should continue\n                if (length >= buttons[i].longpressLength) {\n                    // Run callback: long press (once)\n                    // Then continue waiting for release, to rearm\n                    buttons[i].state = State::POLLING_FIRED;\n                    buttons[i].onLongPress();\n                }\n            }\n            break;\n        }\n\n        // Button still held, but duration long enough that longpress event already fired\n        // Just waiting for release\n        case POLLING_FIRED:\n            // Release detected\n            if (digitalRead(buttons[i].pin) != buttons[i].activeLogic) {\n                buttons[i].state = State::REST;\n                buttons[i].onUp(); // Callback: release of hold (in this case: *after* longpress has fired)\n            }\n            // Not yet released, keep polling\n            else\n                awaitingRelease = true;\n            break;\n        }\n    }\n\n    // Check all the joystick directions\n    for (uint8_t i = 0; i < JOYSTICK_COUNT; i++) {\n        switch (joystick[i].state) {\n        // No action: button has not been pressed\n        case REST:\n            break;\n\n        // New press detected by interrupt\n        case IRQ:\n            powerFSM.trigger(EVENT_PRESS);              // Tell PowerFSM that press occurred (resets sleep timer)\n            joystick[i].onDown();                       // Run callback: press has begun (possible hold behavior)\n            joystick[i].state = State::POLLING_UNFIRED; // Mark that button-down has been handled\n            awaitingRelease = true;                     // Mark that polling-for-release should continue\n            break;\n\n        // An existing press continues\n        // Not held long enough to register as press\n        case POLLING_UNFIRED: {\n            uint32_t length = millis() - joystick[i].irqAtMillis;\n\n            // If button released since last thread tick,\n            if (digitalRead(joystick[i].pin) != joystickActiveLogic) {\n                joystick[i].onUp();              // Run callback: press has ended (possible release of a hold)\n                joystick[i].state = State::REST; // Mark that the button has reset\n            }\n            // If button not yet released\n            else {\n                awaitingRelease = true; // Mark that polling-for-release should continue\n                if (length >= joystickDebounceLength) {\n                    // Run callback: long press (once)\n                    // Then continue waiting for release, to rearm\n                    joystick[i].state = State::POLLING_FIRED;\n                    joystick[i].onPress();\n                }\n            }\n            break;\n        }\n\n        // Button still held after press\n        // Just waiting for release\n        case POLLING_FIRED:\n            // Release detected\n            if (digitalRead(joystick[i].pin) != joystickActiveLogic) {\n                joystick[i].state = State::REST;\n                joystick[i].onUp(); // Callback: release of hold\n            }\n            // Not yet released, keep polling\n            else\n                awaitingRelease = true;\n            break;\n        }\n    }\n\n    // If all buttons are now released\n    // we don't need to waste cpu resources polling\n    // IRQ will restart this thread when we next need it\n    if (!awaitingRelease)\n        stopThread();\n\n    // Run this method again, or don't..\n    // Use whatever behavior was previously set by stopThread() or startThread()\n    return OSThread::interval;\n}\n\n#ifdef ARCH_ESP32\n\n// Detach our class' interrupts before lightsleep\n// Allows sleep.cpp to configure its own interrupts, which wake the device on user-button press\nint TwoButtonExtended::beforeLightSleep(void *unused)\n{\n    stop();\n    return 0; // Indicates success\n}\n\n// Reconfigure our interrupts\n// Our class' interrupts were disconnected during sleep, to allow the user button to wake the device from sleep\nint TwoButtonExtended::afterLightSleep(esp_sleep_wakeup_cause_t cause)\n{\n    start();\n\n    // Manually trigger the button-down ISR\n    // - during light sleep, our ISR is disabled\n    // - if light sleep ends by button press, pretend our own ISR caught it\n    // - need to manually confirm by reading pin ourselves, to avoid occasional false positives\n    //   (false positive only when using internal pullup resistors?)\n    if (cause == ESP_SLEEP_WAKEUP_GPIO && digitalRead(buttons[0].pin) == buttons[0].activeLogic)\n        isrPrimary();\n\n    return 0; // Indicates success\n}\n\n#endif\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/Inputs/TwoButtonExtended.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n/*\n\nRe-usable NicheGraphics input source\n\nShort and Long press for up to two buttons\nInterrupt driven\n\n*/\n\n/*\n\nThis expansion adds support for four more buttons\nThese buttons are single-action only, no long press\nInterrupt driven\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"assert.h\"\n#include \"functional\"\n\n#ifdef ARCH_ESP32\n#include \"esp_sleep.h\" // For light-sleep handling\n#endif\n\n#include \"Observer.h\"\n\nnamespace NicheGraphics::Inputs\n{\n\nclass TwoButtonExtended : protected concurrency::OSThread\n{\n  public:\n    typedef std::function<void()> Callback;\n\n    static uint8_t getUserButtonPin(); // Resolve the GPIO, considering the various possible source of definition\n\n    static TwoButtonExtended *getInstance(); // Create or get the singleton instance\n    void start();                            // Start handling button input\n    void stop();                             // Stop handling button input (disconnect ISRs for sleep)\n    void setWiring(uint8_t whichButton, uint8_t pin, bool internalPullup = false);\n    void setJoystickWiring(uint8_t uPin, uint8_t dPin, uint8_t lPin, uint8_t rPin, bool internalPullup = false);\n    void setTwoWayRockerWiring(uint8_t leftPin, uint8_t rightPin, bool internalPullup = false);\n    void setTiming(uint8_t whichButton, uint32_t debounceMs, uint32_t longpressMs);\n    void setJoystickDebounce(uint32_t debounceMs);\n    void setHandlerDown(uint8_t whichButton, Callback onDown);\n    void setHandlerUp(uint8_t whichButton, Callback onUp);\n    void setHandlerShortPress(uint8_t whichButton, Callback onShortPress);\n    void setHandlerLongPress(uint8_t whichButton, Callback onLongPress);\n    void setJoystickDownHandlers(Callback uDown, Callback dDown, Callback ldown, Callback rDown);\n    void setJoystickUpHandlers(Callback uUp, Callback dUp, Callback lUp, Callback rUp);\n    void setJoystickPressHandlers(Callback uPress, Callback dPress, Callback lPress, Callback rPress);\n    void setTwoWayRockerPressHandlers(Callback lPress, Callback rPress);\n\n    // Disconnect and reconnect interrupts for light sleep\n#ifdef ARCH_ESP32\n    int beforeLightSleep(void *unused);\n    int afterLightSleep(esp_sleep_wakeup_cause_t cause);\n#endif\n\n  private:\n    // Internal state of a specific button\n    enum State {\n        REST,            // Up, no activity\n        IRQ,             // Down detected, not yet handled\n        POLLING_UNFIRED, // Down handled, polling for release\n        POLLING_FIRED,   // Longpress fired, button still held\n    };\n\n    // Joystick Directions\n    enum Direction { UP = 0, DOWN, LEFT, RIGHT };\n\n    // Data used for direction (single-action) buttons\n    class SimpleButton\n    {\n      public:\n        // Per-button config\n        uint8_t pin = 0xFF;                 // 0xFF: unset\n        volatile State state = State::REST; // Internal state\n        volatile uint32_t irqAtMillis;      // millis() when button went down\n\n        // Per-button event callbacks\n        static void noop(){};\n        std::function<void()> onDown = noop;\n        std::function<void()> onUp = noop;\n        std::function<void()> onPress = noop;\n    };\n\n    // Data used for double-action buttons\n    class Button : public SimpleButton\n    {\n      public:\n        // Per-button extended config\n        bool activeLogic = LOW;         // Active LOW by default.\n        uint32_t debounceLength = 50;   // Minimum length for shortpress in ms\n        uint32_t longpressLength = 500; // Time until longpress in ms\n\n        // Per-button event callbacks\n        std::function<void()> onLongPress = noop;\n    };\n\n#ifdef ARCH_ESP32\n    // Get notified when lightsleep begins and ends\n    CallbackObserver<TwoButtonExtended, void *> lsObserver =\n        CallbackObserver<TwoButtonExtended, void *>(this, &TwoButtonExtended::beforeLightSleep);\n    CallbackObserver<TwoButtonExtended, esp_sleep_wakeup_cause_t> lsEndObserver =\n        CallbackObserver<TwoButtonExtended, esp_sleep_wakeup_cause_t>(this, &TwoButtonExtended::afterLightSleep);\n#endif\n\n    int32_t runOnce() override; // Timer method. Polls for button release\n\n    void startThread(); // Start polling for release\n    void stopThread();  // Stop polling for release\n\n    static void isrPrimary();   // User Button ISR\n    static void isrSecondary(); // optional aux button or joystick center\n    static void isrJoystickUp();\n    static void isrJoystickDown();\n    static void isrJoystickLeft();\n    static void isrJoystickRight();\n\n    TwoButtonExtended(); // Constructor made private: force use of Button::instance()\n\n    // Info about both buttons\n    Button buttons[2];\n    bool joystickActiveLogic = LOW;       // Active LOW by default\n    uint32_t joystickDebounceLength = 50; // time until press in ms\n    SimpleButton joystick[4];\n};\n\n}; // namespace NicheGraphics::Inputs\n\n#endif\n"
  },
  {
    "path": "src/graphics/niche/README.md",
    "content": "# NicheGraphics\n\nA pattern / collection of resources for creating custom UIs, to target small groups of devices which have specific design requirements.\n\nFor an example, see the `heltec-vision-master-e290-inkhud` platformio env.\n\n- platformio.ini\n  - suppress default Meshtastic components (Screen, ButtonThread, etc)\n  - define `MESHTASTIC_INCLUDE_NICHE_GRAPHICS`\n  - (possibly) Edit `build_src_filter` to include our new nicheGraphics.h file\n\n- nicheGraphics.h\n  - `#include` all necessary components\n  - perform all setup and config inside a `setupNicheGraphics()` method\n"
  },
  {
    "path": "src/graphics/niche/Utils/CannedMessageStore.cpp",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"./CannedMessageStore.h\"\n\n#include \"FSCommon.h\"\n#include \"NodeDB.h\"\n#include \"SPILock.h\"\n#include \"generated/meshtastic/cannedmessages.pb.h\"\n\nusing namespace NicheGraphics;\n\n// Location of the file which stores the canned messages on flash\nstatic const char *cannedMessagesConfigFile = \"/prefs/cannedConf.proto\";\n\nCannedMessageStore::CannedMessageStore()\n{\n#if !MESHTASTIC_EXCLUDE_ADMIN\n    adminMessageObserver.observe(adminModule);\n#endif\n\n    // Load & parse messages from flash\n    load();\n}\n\n// Get access to (or create) the singleton instance of this class\nCannedMessageStore *CannedMessageStore::getInstance()\n{\n    // Instantiate the class the first time this method is called\n    static CannedMessageStore *const singletonInstance = new CannedMessageStore;\n\n    return singletonInstance;\n}\n\n// Access canned messages by index\n// Consumer should check CannedMessageStore::size to avoid accessing out of bounds\nconst std::string &CannedMessageStore::at(uint8_t i)\n{\n    assert(i < messages.size());\n    return messages.at(i);\n}\n\n// Number of canned message strings available\nuint8_t CannedMessageStore::size()\n{\n    return messages.size();\n}\n\n// Load canned message data from flash, and parse into the individual strings\nvoid CannedMessageStore::load()\n{\n    // In case we're reloading\n    messages.clear();\n\n    // Attempt to load the bulk canned message data from flash\n    meshtastic_CannedMessageModuleConfig cannedMessageModuleConfig;\n    LoadFileResult result = nodeDB->loadProto(\"/prefs/cannedConf.proto\", meshtastic_CannedMessageModuleConfig_size,\n                                              sizeof(meshtastic_CannedMessageModuleConfig),\n                                              &meshtastic_CannedMessageModuleConfig_msg, &cannedMessageModuleConfig);\n\n    // Abort if nothing to load\n    if (result != LoadFileResult::LOAD_SUCCESS || strlen(cannedMessageModuleConfig.messages) == 0)\n        return;\n\n    // Split into individual canned messages\n    // These are concatenated when stored in flash, using '|' as a delimiter\n    std::string s;\n    for (char c : cannedMessageModuleConfig.messages) { // Character by character\n\n        // If found end of a string\n        if (c == '|' || c == '\\0') {\n            // Copy into the vector (if non-empty)\n            if (!s.empty())\n                messages.push_back(s);\n\n            // Reset the string builder\n            s.clear();\n\n            // End of data, all strings processed\n            if (c == 0)\n                break;\n        }\n\n        // Otherwise, append char (continue building string)\n        else\n            s.push_back(c);\n    }\n}\n\n// Handle incoming admin messages\n// We get these as an observer of AdminModule\n// It's our responsibility to handle setting and getting of canned messages via the client API\n// Ordinarily, this would be handled by the CannedMessageModule, but it is bound to Screen.cpp, so not suitable for NicheGraphics\nint CannedMessageStore::onAdminMessage(AdminModule_ObserverData *data)\n{\n    switch (data->request->which_payload_variant) {\n\n    // Client API changing the canned messages\n    case meshtastic_AdminMessage_set_canned_message_module_messages_tag:\n        handleSet(data->request);\n        *data->result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    // Client API wants to know the current canned messages\n    case meshtastic_AdminMessage_get_canned_message_module_messages_request_tag:\n        handleGet(data->response);\n        *data->result = AdminMessageHandleResult::HANDLED_WITH_RESPONSE;\n        break;\n\n    default:\n        break;\n    }\n\n    return 0; // Tell caller to continue notifying other observers. (No reason to abort this event)\n}\n\n// Client API changing the canned messages\nvoid CannedMessageStore::handleSet(const meshtastic_AdminMessage *request)\n{\n    // Copy into the correct struct (for writing to flash as protobuf)\n    meshtastic_CannedMessageModuleConfig cannedMessageModuleConfig;\n    strncpy(cannedMessageModuleConfig.messages, request->set_canned_message_module_messages,\n            sizeof(cannedMessageModuleConfig.messages));\n\n    // Ensure the directory exists\n#ifdef FSCom\n    spiLock->lock();\n    FSCom.mkdir(\"/prefs\");\n    spiLock->unlock();\n#endif\n\n    // Write to flash\n    nodeDB->saveProto(cannedMessagesConfigFile, meshtastic_CannedMessageModuleConfig_size,\n                      &meshtastic_CannedMessageModuleConfig_msg, &cannedMessageModuleConfig);\n\n    // Reload from flash, to update the canned messages in RAM\n    // (This is a lazy way to handle it)\n    load();\n}\n\n// Client API wants to know the current canned messages\n// We're reconstructing the monolithic canned message string from our copy of the messages in RAM\n// Lazy, but more convenient that reloading the monolithic string from flash just for this\nvoid CannedMessageStore::handleGet(meshtastic_AdminMessage *response)\n{\n    // Merge the canned messages back into the delimited format expected\n    std::string merged;\n    if (!messages.empty()) { // Don't run if no messages: error on pop_back with size=0\n        merged.reserve(201);\n        for (const std::string &s : messages) {\n            merged += s;\n            merged += '|';\n        }\n        merged.pop_back(); // Drop the final delimiter (loop added one too many)\n    }\n\n    // Place the data into the response\n    // This response is scoped to AdminModule::handleReceivedProtobuf\n    // We were passed reference to it via the observable\n    response->which_payload_variant = meshtastic_AdminMessage_get_canned_message_module_messages_response_tag;\n    strncpy(response->get_canned_message_module_messages_response, merged.c_str(), strlen(merged.c_str()) + 1);\n}\n\n#endif"
  },
  {
    "path": "src/graphics/niche/Utils/CannedMessageStore.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n/*\n\nRe-usable NicheGraphics tool\n\nMakes canned message data accessible to any NicheGraphics UI.\n - handles loading & parsing from flash\n - handles the admin messages for setting & getting canned messages via client API (phone apps, etc)\n\nThe original CannedMessageModule class is bound to Screen.cpp,\nmaking it incompatible with the NicheGraphics framework, which suppresses Screen.cpp\n\nThis implementation aims to be self-contained.\nThe necessary interaction with the AdminModule is done as an observer.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"modules/AdminModule.h\"\n\nnamespace NicheGraphics\n{\n\nclass CannedMessageStore\n{\n  public:\n    static CannedMessageStore *getInstance(); // Create or get the singleton instance\n    const std::string &at(uint8_t i);         // Get canned message at index\n    uint8_t size();                           // Get total number of canned messages\n\n    int onAdminMessage(AdminModule_ObserverData *data); // Handle incoming admin messages\n\n  private:\n    CannedMessageStore(); // Constructor made private: force use of CannedMessageStore::instance()\n\n    void load(); // Load from flash, and parse\n\n    void handleSet(const meshtastic_AdminMessage *request); // Client API changing the canned messages\n    void handleGet(meshtastic_AdminMessage *response);      // Client API wants to know current canned messages\n\n    std::vector<std::string> messages;\n\n    // Get notified of incoming admin messages, to get / set canned messages\n    CallbackObserver<CannedMessageStore, AdminModule_ObserverData *> adminMessageObserver =\n        CallbackObserver<CannedMessageStore, AdminModule_ObserverData *>(this, &CannedMessageStore::onAdminMessage);\n};\n\n}; // namespace NicheGraphics\n\n#endif"
  },
  {
    "path": "src/graphics/niche/Utils/FlashData.h",
    "content": "#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n/*\n\nRe-usable NicheGraphics tool\n\nSave settings / data to flash, without use of the Meshtastic Protobufs\nAvoid bloating everyone's protobuf code for our one-off UI implementations\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#include \"SPILock.h\"\n#include \"SafeFile.h\"\n\nnamespace NicheGraphics\n{\n\ntemplate <typename T> class FlashData\n{\n  private:\n    static std::string getFilename(const char *label)\n    {\n        std::string filename;\n        filename += \"/NicheGraphics\";\n        filename += \"/\";\n        filename += label;\n        filename += \".data\";\n\n        return filename;\n    }\n\n    static uint32_t getHash(T *data)\n    {\n        uint32_t hash = 0;\n\n        // Sum all bytes of the image buffer together\n        for (uint32_t i = 0; i < sizeof(T); i++)\n            hash ^= ((uint8_t *)data)[i] + 1;\n\n        return hash;\n    }\n\n  public:\n    static bool load(T *data, const char *label)\n    {\n        // Take firmware's SPI lock\n        concurrency::LockGuard guard(spiLock);\n\n        // Set false if we run into issues\n        bool okay = true;\n\n        // Get a filename based on the label\n        std::string filename = getFilename(label);\n\n#ifdef FSCom\n\n        // Check that the file *does* actually exist\n        if (!FSCom.exists(filename.c_str())) {\n            LOG_WARN(\"'%s' not found. Using default values\", filename.c_str());\n            okay = false;\n            return okay;\n        }\n\n        // Open the file\n        auto f = FSCom.open(filename.c_str(), FILE_O_READ);\n\n        // If opened, start reading\n        if (f) {\n            LOG_INFO(\"Loading NicheGraphics data '%s'\", filename.c_str());\n\n            // Create an object which will received data from flash\n            // We read here first, so we can verify the checksum, without committing to overwriting the *data object\n            // Allows us to retain any defaults that might be set after we declared *data, but before loading settings,\n            // in case the flash values are corrupt\n            T flashData;\n\n            // Read the actual data\n            f.readBytes((char *)&flashData, sizeof(T));\n\n            // Read the hash\n            uint32_t savedHash = 0;\n            f.readBytes((char *)&savedHash, sizeof(savedHash));\n\n            // Calculate hash of the loaded data, then compare with the saved hash\n            // If hash looks good, copy the values to the main data object\n            uint32_t calculatedHash = getHash(&flashData);\n            if (savedHash != calculatedHash) {\n                LOG_WARN(\"'%s' is corrupt (hash mismatch). Using default values\", filename.c_str());\n                okay = false;\n            } else\n                *data = flashData;\n\n            f.close();\n        } else {\n            LOG_ERROR(\"Could not open / read %s\", filename.c_str());\n            okay = false;\n        }\n#else\n        LOG_ERROR(\"Filesystem not implemented\");\n        state = LoadFileState::NO_FILESYSTEM;\n        okay = false;\n#endif\n        return okay;\n    }\n\n    // Save module's custom data (settings?) to flash. Doesn't use protobufs\n    // Takes the firmware's SPI lock, in case the files are stored on SD card\n    // Need to lock and unlock around specific FS methods, as the SafeFile class takes the lock for itself internally.\n    static void save(T *data, const char *label)\n    {\n        // Get a filename based on the label\n        std::string filename = getFilename(label);\n\n#ifdef FSCom\n        spiLock->lock();\n        FSCom.mkdir(\"/NicheGraphics\");\n        spiLock->unlock();\n\n        auto f = SafeFile(filename.c_str(), true); // \"true\": full atomic. Write new data to temp file, then rename.\n\n        LOG_INFO(\"Saving %s\", filename.c_str());\n\n        // Calculate a hash of the data\n        uint32_t hash = getHash(data);\n\n        spiLock->lock();\n        f.write((uint8_t *)data, sizeof(T));     // Write the actual data\n        f.write((uint8_t *)&hash, sizeof(hash)); // Append the hash\n        spiLock->unlock();\n\n        bool writeSucceeded = f.close();\n\n        if (!writeSucceeded) {\n            LOG_ERROR(\"Can't write data!\");\n        }\n#else\n        LOG_ERROR(\"ERROR: Filesystem not implemented\\n\");\n#endif\n    }\n};\n\n// Erase contents of the NicheGraphics data directory\ninline void clearFlashData()\n{\n\n    // Take firmware's SPI lock, in case the files are stored on SD card\n    concurrency::LockGuard guard(spiLock);\n\n#ifdef FSCom\n    File dir = FSCom.open(\"/NicheGraphics\"); // Open the directory\n    File file = dir.openNextFile();          // Attempt to open the first file in the directory\n\n    // While the directory still contains files\n    while (file) {\n        std::string path = \"/NicheGraphics/\";\n        path += file.name();\n        LOG_DEBUG(\"Erasing %s\", path.c_str());\n        file.close();\n        FSCom.remove(path.c_str());\n\n        file = dir.openNextFile();\n    }\n#else\n    LOG_ERROR(\"ERROR: Filesystem not implemented\\n\");\n#endif\n}\n\n} // namespace NicheGraphics\n\n#endif"
  },
  {
    "path": "src/graphics/tftSetup.cpp",
    "content": "#if HAS_TFT\n\n#include \"SPILock.h\"\n#include \"sleep.h\"\n\n#include \"api/PacketAPI.h\"\n#include \"comms/PacketClient.h\"\n#include \"comms/PacketServer.h\"\n#include \"graphics/DeviceScreen.h\"\n#include \"graphics/driver/DisplayDriverConfig.h\"\n\n#ifdef ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#include <thread>\n#endif\n\nDeviceScreen *deviceScreen = nullptr;\n\n#ifdef ARCH_ESP32\n// Get notified when the system is entering light sleep\nCallbackObserver<DeviceScreen, void *> tftSleepObserver =\n    CallbackObserver<DeviceScreen, void *>(deviceScreen, &DeviceScreen::prepareSleep);\nCallbackObserver<DeviceScreen, esp_sleep_wakeup_cause_t> endSleepObserver =\n    CallbackObserver<DeviceScreen, esp_sleep_wakeup_cause_t>(deviceScreen, &DeviceScreen::wakeUp);\n#endif\n\nvoid tft_task_handler(void *param = nullptr)\n{\n    while (true) {\n        spiLock->lock();\n        deviceScreen->task_handler();\n        spiLock->unlock();\n        deviceScreen->sleep();\n    }\n}\n\nvoid tftSetup(void)\n{\n#ifndef ARCH_PORTDUINO\n    deviceScreen = &DeviceScreen::create();\n    PacketAPI::create(PacketServer::init());\n    deviceScreen->init(new PacketClient);\n#else\n    if (portduino_config.displayPanel != no_screen) {\n        DisplayDriverConfig displayConfig;\n        static char *panels[] = {\"NOSCREEN\", \"X11\",     \"FB\",      \"ST7789\",  \"ST7735\",  \"ST7735S\",\n                                 \"ST7796\",   \"ILI9341\", \"ILI9342\", \"ILI9486\", \"ILI9488\", \"HX8357D\"};\n        static char *touch[] = {\"NOTOUCH\", \"XPT2046\", \"STMPE610\", \"GT911\", \"FT5x06\"};\n#if defined(USE_X11)\n        if (portduino_config.displayPanel == x11) {\n            if (portduino_config.displayWidth && portduino_config.displayHeight)\n                displayConfig = DisplayDriverConfig(DisplayDriverConfig::device_t::X11, (uint16_t)portduino_config.displayWidth,\n                                                    (uint16_t)portduino_config.displayHeight);\n            else\n                displayConfig.device(DisplayDriverConfig::device_t::X11);\n        } else\n#elif defined(USE_FRAMEBUFFER)\n        if (portduino_config.displayPanel == fb) {\n            if (portduino_config.displayWidth && portduino_config.displayHeight)\n                displayConfig = DisplayDriverConfig(DisplayDriverConfig::device_t::FB, (uint16_t)portduino_config.displayWidth,\n                                                    (uint16_t)portduino_config.displayHeight);\n            else\n                displayConfig.device(DisplayDriverConfig::device_t::FB);\n        } else\n#endif\n        {\n            displayConfig.device(DisplayDriverConfig::device_t::CUSTOM_TFT)\n                .panel(DisplayDriverConfig::panel_config_t{.type = panels[portduino_config.displayPanel],\n                                                           .panel_width = (uint16_t)portduino_config.displayWidth,\n                                                           .panel_height = (uint16_t)portduino_config.displayHeight,\n                                                           .rotation = (bool)portduino_config.displayRotate,\n                                                           .pin_cs = (int16_t)portduino_config.displayCS.pin,\n                                                           .pin_rst = (int16_t)portduino_config.displayReset.pin,\n                                                           .offset_x = (uint16_t)portduino_config.displayOffsetX,\n                                                           .offset_y = (uint16_t)portduino_config.displayOffsetY,\n                                                           .offset_rotation = (uint8_t)portduino_config.displayOffsetRotate,\n                                                           .invert = portduino_config.displayInvert ? true : false,\n                                                           .rgb_order = (bool)portduino_config.displayRGBOrder,\n                                                           .dlen_16bit = portduino_config.displayPanel == ili9486 ||\n                                                                         portduino_config.displayPanel == ili9488})\n                .bus(DisplayDriverConfig::bus_config_t{.freq_write = (uint32_t)portduino_config.displayBusFrequency,\n                                                       .freq_read = 16000000,\n                                                       .spi{.pin_dc = (int8_t)portduino_config.displayDC.pin,\n                                                            .use_lock = true,\n                                                            .spi_host = (uint16_t)portduino_config.display_spi_dev_int}})\n                .input(DisplayDriverConfig::input_config_t{.keyboardDevice = portduino_config.keyboardDevice,\n                                                           .pointerDevice = portduino_config.pointerDevice})\n                .light(DisplayDriverConfig::light_config_t{.pin_bl = (int16_t)portduino_config.displayBacklight.pin,\n                                                           .pwm_channel = (int8_t)portduino_config.displayBacklightPWMChannel.pin,\n                                                           .invert = (bool)portduino_config.displayBacklightInvert});\n            if (portduino_config.touchscreenI2CAddr == -1) {\n                displayConfig.touch(\n                    DisplayDriverConfig::touch_config_t{.type = touch[portduino_config.touchscreenModule],\n                                                        .freq = (uint32_t)portduino_config.touchscreenBusFrequency,\n                                                        .pin_int = (int16_t)portduino_config.touchscreenIRQ.pin,\n                                                        .offset_rotation = (uint8_t)portduino_config.touchscreenRotate,\n                                                        .spi{\n                                                            .spi_host = (int8_t)portduino_config.touchscreen_spi_dev_int,\n                                                        },\n                                                        .pin_cs = (int16_t)portduino_config.touchscreenCS.pin});\n            } else {\n                displayConfig.touch(DisplayDriverConfig::touch_config_t{\n                    .type = touch[portduino_config.touchscreenModule],\n                    .freq = (uint32_t)portduino_config.touchscreenBusFrequency,\n                    .x_min = 0,\n                    .x_max = (int16_t)((portduino_config.touchscreenRotate & 1 ? portduino_config.displayWidth\n                                                                               : portduino_config.displayHeight) -\n                                       1),\n                    .y_min = 0,\n                    .y_max = (int16_t)((portduino_config.touchscreenRotate & 1 ? portduino_config.displayHeight\n                                                                               : portduino_config.displayWidth) -\n                                       1),\n                    .pin_int = (int16_t)portduino_config.touchscreenIRQ.pin,\n                    .offset_rotation = (uint8_t)portduino_config.touchscreenRotate,\n                    .i2c{.i2c_addr = (uint8_t)portduino_config.touchscreenI2CAddr}});\n            }\n        }\n        deviceScreen = &DeviceScreen::create(&displayConfig);\n        PacketAPI::create(PacketServer::init());\n        deviceScreen->init(new PacketClient);\n    } else {\n        LOG_INFO(\"Running without TFT display!\");\n    }\n#endif\n\n    if (deviceScreen) {\n#ifdef ARCH_ESP32\n        tftSleepObserver.observe(&notifyLightSleep);\n        endSleepObserver.observe(&notifyLightSleepEnd);\n        xTaskCreatePinnedToCore(tft_task_handler, \"tft\", 10240, NULL, 1, NULL, 0);\n#elif defined(ARCH_PORTDUINO)\n        std::thread *tft_task = new std::thread([] { tft_task_handler(); });\n#endif\n    }\n}\n\n#endif"
  },
  {
    "path": "src/input/BBQ10Keyboard.cpp",
    "content": "// Based on arturo182 arduino_bbq10kbd library https://github.com/arturo182/arduino_bbq10kbd\n\n#include <Arduino.h>\n\n#include \"BBQ10Keyboard.h\"\n\n#define _REG_VER 1\n#define _REG_CFG 2\n#define _REG_INT 3\n#define _REG_KEY 4\n#define _REG_BKL 5\n#define _REG_DEB 6\n#define _REG_FRQ 7\n#define _REG_RST 8\n#define _REG_FIF 9\n\n#define _WRITE_MASK (1 << 7)\n\n#define CFG_OVERFLOW_ON (1 << 0)\n#define CFG_OVERFLOW_INT (1 << 1)\n#define CFG_CAPSLOCK_INT (1 << 2)\n#define CFG_NUMLOCK_INT (1 << 3)\n#define CFG_KEY_INT (1 << 4)\n#define CFG_PANIC_INT (1 << 5)\n#define CFG_REPORT_MODS (1 << 6)\n#define CFG_USE_MODS (1 << 7)\n\n#define INT_OVERFLOW (1 << 0)\n#define INT_CAPSLOCK (1 << 1)\n#define INT_NUMLOCK (1 << 2)\n#define INT_KEY (1 << 3)\n#define INT_PANIC (1 << 4)\n\n#define KEY_CAPSLOCK (1 << 5)\n#define KEY_NUMLOCK (1 << 6)\n#define KEY_COUNT_MASK (0x1F)\n\nBBQ10Keyboard::BBQ10Keyboard() : m_wire(nullptr), m_addr(0), readCallback(nullptr), writeCallback(nullptr) {}\n\nvoid BBQ10Keyboard::begin(uint8_t addr, TwoWire *wire)\n{\n    m_addr = addr;\n    m_wire = wire;\n\n    m_wire->begin();\n\n    reset();\n}\n\nvoid BBQ10Keyboard::begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr)\n{\n    m_addr = addr;\n    m_wire = nullptr;\n    writeCallback = w;\n    readCallback = r;\n    reset();\n}\n\nvoid BBQ10Keyboard::reset()\n{\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(_REG_RST);\n        m_wire->endTransmission();\n    }\n    if (writeCallback) {\n        uint8_t data = 0;\n        writeCallback(m_addr, _REG_RST, &data, 0);\n    }\n    delay(100);\n    writeRegister(_REG_CFG, readRegister8(_REG_CFG) | CFG_REPORT_MODS);\n    delay(100);\n}\n\nvoid BBQ10Keyboard::attachInterrupt(uint8_t pin, void (*func)(void)) const\n{\n    pinMode(pin, INPUT_PULLUP);\n    ::attachInterrupt(digitalPinToInterrupt(pin), func, RISING);\n}\n\nvoid BBQ10Keyboard::detachInterrupt(uint8_t pin) const\n{\n    ::detachInterrupt(pin);\n}\n\nvoid BBQ10Keyboard::clearInterruptStatus()\n{\n    writeRegister(_REG_INT, 0x00);\n}\n\nuint8_t BBQ10Keyboard::status() const\n{\n    return readRegister8(_REG_KEY);\n}\n\nuint8_t BBQ10Keyboard::keyCount() const\n{\n    return status() & KEY_COUNT_MASK;\n}\n\nBBQ10Keyboard::KeyEvent BBQ10Keyboard::keyEvent() const\n{\n    KeyEvent event = {.key = '\\0', .state = StateIdle};\n\n    if (keyCount() == 0)\n        return event;\n\n    const uint16_t buf = readRegister16(_REG_FIF);\n    event.key = buf >> 8;\n    event.state = KeyState(buf & 0xFF);\n\n    return event;\n}\n\nfloat BBQ10Keyboard::backlight() const\n{\n    return readRegister8(_REG_BKL) / 255.0f;\n}\n\nvoid BBQ10Keyboard::setBacklight(float value)\n{\n    writeRegister(_REG_BKL, value * 255);\n}\n\nuint8_t BBQ10Keyboard::readRegister8(uint8_t reg) const\n{\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(reg);\n        m_wire->endTransmission();\n\n        m_wire->requestFrom(m_addr, (uint8_t)1);\n        if (m_wire->available() < 1)\n            return 0;\n\n        return m_wire->read();\n    }\n    if (readCallback) {\n        uint8_t data;\n        readCallback(m_addr, reg, &data, 1);\n        return data;\n    }\n    return 0;\n}\n\nuint16_t BBQ10Keyboard::readRegister16(uint8_t reg) const\n{\n    uint8_t data[2] = {0};\n    // uint8_t low = 0, high = 0;\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(reg);\n        m_wire->endTransmission();\n\n        m_wire->requestFrom(m_addr, (uint8_t)2);\n        if (m_wire->available() < 2)\n            return 0;\n        data[0] = m_wire->read();\n        data[1] = m_wire->read();\n    }\n    if (readCallback) {\n        readCallback(m_addr, reg, data, 2);\n    }\n    return (data[1] << 8) | data[0];\n}\n\nvoid BBQ10Keyboard::writeRegister(uint8_t reg, uint8_t value)\n{\n    uint8_t data[2];\n    data[0] = reg | _WRITE_MASK;\n    data[1] = value;\n\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(data, sizeof(uint8_t) * 2);\n        m_wire->endTransmission();\n    }\n    if (writeCallback) {\n        writeCallback(m_addr, data[0], &(data[1]), 1);\n    }\n}\n"
  },
  {
    "path": "src/input/BBQ10Keyboard.h",
    "content": "// Based on arturo182 arduino_bbq10kbd library https://github.com/arturo182/arduino_bbq10kbd\n\n#include \"configuration.h\"\n#include <Wire.h>\n\n#define KEY_MOD_ALT (0x1A)\n#define KEY_MOD_SHL (0x1B)\n#define KEY_MOD_SHR (0x1C)\n#define KEY_MOD_SYM (0x1D)\n\nclass BBQ10Keyboard\n{\n  public:\n    typedef uint8_t (*i2c_com_fptr_t)(uint8_t dev_addr, uint8_t reg_addr, uint8_t *data, uint8_t len);\n\n    enum KeyState { StateIdle = 0, StatePress, StateLongPress, StateRelease };\n\n    struct KeyEvent {\n        char key;\n        KeyState state;\n    };\n\n    BBQ10Keyboard();\n\n    void begin(uint8_t addr = BBQ10_KB_ADDR, TwoWire *wire = &Wire);\n\n    void begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr = BBQ10_KB_ADDR);\n\n    void reset(void);\n\n    void attachInterrupt(uint8_t pin, void (*func)(void)) const;\n    void detachInterrupt(uint8_t pin) const;\n    void clearInterruptStatus(void);\n\n    uint8_t status(void) const;\n    uint8_t keyCount(void) const;\n    KeyEvent keyEvent(void) const;\n\n    float backlight() const;\n    void setBacklight(float value);\n\n    uint8_t readRegister8(uint8_t reg) const;\n    uint16_t readRegister16(uint8_t reg) const;\n    void writeRegister(uint8_t reg, uint8_t value);\n\n  private:\n    TwoWire *m_wire;\n    uint8_t m_addr;\n    i2c_com_fptr_t readCallback;\n    i2c_com_fptr_t writeCallback;\n};\n"
  },
  {
    "path": "src/input/ButtonThread.cpp",
    "content": "#include \"ButtonThread.h\"\n#include \"meshUtils.h\"\n\n#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n#include \"MeshService.h\"\n#include \"RadioLibInterface.h\"\n#include \"buzz.h\"\n#include \"input/InputBroker.h\"\n#include \"main.h\"\n#include \"modules/CannedMessageModule.h\"\n#include \"modules/ExternalNotificationModule.h\"\n#include \"power.h\"\n#include \"sleep.h\"\n#ifdef ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\nusing namespace concurrency;\n\n#if HAS_BUTTON\n#endif\nButtonThread::ButtonThread(const char *name) : OSThread(name)\n{\n    _originName = name;\n}\n\nbool ButtonThread::initButton(const ButtonConfig &config)\n{\n    if (inputBroker)\n        inputBroker->registerSource(this);\n    _longPressTime = config.longPressTime;\n    _longLongPressTime = config.longLongPressTime;\n    _pinNum = config.pinNumber;\n    _activeLow = config.activeLow;\n    _touchQuirk = config.touchQuirk;\n    _intRoutine = config.intRoutine;\n    _pressHandler = config.onPress;\n    _releaseHandler = config.onRelease;\n    _suppressLeadUp = config.suppressLeadUpSound;\n    _longLongPress = config.longLongPress;\n\n    userButton = OneButton(config.pinNumber, config.activeLow, config.activePullup);\n\n    if (config.pullupSense != 0) {\n        pinMode(config.pinNumber, config.pullupSense);\n    }\n\n    _singlePress = config.singlePress;\n    userButton.attachClick(\n        [](void *callerThread) -> void {\n            ButtonThread *thread = (ButtonThread *)callerThread;\n            thread->btnEvent = BUTTON_EVENT_PRESSED;\n        },\n        this);\n\n    _longPress = config.longPress;\n    userButton.attachLongPressStart(\n        [](void *callerThread) -> void {\n            ButtonThread *thread = (ButtonThread *)callerThread;\n            // if (millis() > 30000) // hold off 30s after boot\n            thread->btnEvent = BUTTON_EVENT_LONG_PRESSED;\n        },\n        this);\n    userButton.attachLongPressStop(\n        [](void *callerThread) -> void {\n            ButtonThread *thread = (ButtonThread *)callerThread;\n            // if (millis() > 30000) // hold off 30s after boot\n            thread->btnEvent = BUTTON_EVENT_LONG_RELEASED;\n        },\n        this);\n\n    if (config.doublePress != INPUT_BROKER_NONE) {\n        _doublePress = config.doublePress;\n        userButton.attachDoubleClick(\n            [](void *callerThread) -> void {\n                ButtonThread *thread = (ButtonThread *)callerThread;\n                thread->btnEvent = BUTTON_EVENT_DOUBLE_PRESSED;\n            },\n            this);\n    }\n\n    if (config.triplePress != INPUT_BROKER_NONE) {\n        _triplePress = config.triplePress;\n        userButton.attachMultiClick(\n            [](void *callerThread) -> void {\n                ButtonThread *thread = (ButtonThread *)callerThread;\n                thread->storeClickCount();\n                thread->btnEvent = BUTTON_EVENT_MULTI_PRESSED;\n            },\n            this);\n    }\n    if (config.shortLong != INPUT_BROKER_NONE) {\n        _shortLong = config.shortLong;\n    }\n#ifdef USE_EINK\n    userButton.setDebounceMs(0);\n#else\n    userButton.setDebounceMs(1);\n#endif\n    userButton.setPressMs(_longPressTime);\n\n    if (screen) {\n        userButton.setClickMs(20);\n    } else {\n        userButton.setClickMs(BUTTON_CLICK_MS);\n    }\n    attachButtonInterrupts();\n#ifdef ARCH_ESP32\n    // Register callbacks for before and after lightsleep\n    // Used to detach and reattach interrupts\n    lsObserver.observe(&notifyLightSleep);\n    lsEndObserver.observe(&notifyLightSleepEnd);\n#endif\n    return true;\n}\n\nint32_t ButtonThread::runOnce()\n{\n    // If the button is pressed we suppress CPU sleep until release\n    canSleep = true; // Assume we should not keep the board awake\n\n    // Check for combination timeout\n    if (waitingForLongPress && (millis() - shortPressTime) > BUTTON_COMBO_TIMEOUT_MS) {\n        waitingForLongPress = false;\n    }\n\n    userButton.tick();\n    canSleep &= userButton.isIdle();\n\n    // Check if we should play lead-up sound during long press\n    // Play lead-up when button has been held for BUTTON_LEADUP_MS but before long press triggers\n    bool buttonCurrentlyPressed = isButtonPressed(_pinNum);\n\n    // Detect start of button press\n    if (buttonCurrentlyPressed && !buttonWasPressed) {\n        if (_pressHandler)\n            _pressHandler();\n        buttonPressStartTime = millis();\n        leadUpPlayed = false;\n        leadUpSequenceActive = false;\n        resetLeadUpSequence();\n    }\n\n    // Progressive lead-up sound system\n    if (!_suppressLeadUp && buttonCurrentlyPressed && (millis() - buttonPressStartTime) >= BUTTON_LEADUP_MS) {\n\n        // Start the progressive sequence if not already active\n        if (!leadUpSequenceActive) {\n            leadUpSequenceActive = true;\n            lastLeadUpNoteTime = millis();\n            playNextLeadUpNote(); // Play the first note immediately\n        }\n        // Continue playing notes at intervals\n        else if ((millis() - lastLeadUpNoteTime) >= 400) { // 400ms interval between notes\n            if (playNextLeadUpNote()) {\n                lastLeadUpNoteTime = millis();\n            } else {\n                leadUpPlayed = true;\n            }\n        }\n    }\n\n    // Reset when button is released\n    if (!buttonCurrentlyPressed && buttonWasPressed) {\n        if (_releaseHandler)\n            _releaseHandler();\n        leadUpSequenceActive = false;\n        resetLeadUpSequence();\n    }\n\n    buttonWasPressed = buttonCurrentlyPressed;\n\n    // new behavior\n    if (btnEvent != BUTTON_EVENT_NONE) {\n        InputEvent evt;\n        evt.source = _originName;\n        evt.kbchar = 0;\n        evt.touchX = 0;\n        evt.touchY = 0;\n        switch (btnEvent) {\n        case BUTTON_EVENT_PRESSED: {\n            // Forward single press to InputBroker (but NOT as DOWN/SELECT, just forward a \"button press\" event)\n            evt.inputEvent = _singlePress;\n            // evt.kbchar = _singlePress; // todo: fix this. Some events are kb characters rather than event types\n            this->notifyObservers(&evt);\n\n            // Start tracking for potential combination\n            waitingForLongPress = true;\n            shortPressTime = millis();\n\n            break;\n        }\n        case BUTTON_EVENT_LONG_PRESSED: {\n            // Ignore if: TX in progress\n            // Uncommon T-Echo hardware bug, LoRa TX triggers touch button\n            if (_touchQuirk && RadioLibInterface::instance && RadioLibInterface::instance->isSending())\n                break;\n\n            // Check if this is part of a short-press + long-press combination\n            if (_shortLong != INPUT_BROKER_NONE && waitingForLongPress &&\n                (millis() - shortPressTime) <= BUTTON_COMBO_TIMEOUT_MS) {\n                evt.inputEvent = _shortLong;\n                // evt.kbchar = _shortLong;\n                this->notifyObservers(&evt);\n                // Play the combination tune\n                playComboTune();\n\n                break;\n            }\n            if (_longPress != INPUT_BROKER_NONE) {\n                // Forward long press to InputBroker (but NOT as DOWN/SELECT, just forward a \"button long press\" event)\n                evt.inputEvent = _longPress;\n                this->notifyObservers(&evt);\n            }\n            // Reset combination tracking\n            waitingForLongPress = false;\n\n            break;\n        }\n\n        case BUTTON_EVENT_DOUBLE_PRESSED: { // not wired in if screen detected\n            LOG_INFO(\"Double press!\");\n\n            // Reset combination tracking\n            waitingForLongPress = false;\n\n            evt.inputEvent = _doublePress;\n            // evt.kbchar = _doublePress;\n            this->notifyObservers(&evt);\n            playComboTune();\n\n            break;\n        }\n\n        case BUTTON_EVENT_MULTI_PRESSED: { // not wired in when screen is present\n            LOG_INFO(\"Mulitipress! %hux\", multipressClickCount);\n\n            // Reset combination tracking\n            waitingForLongPress = false;\n\n            switch (multipressClickCount) {\n            case 3:\n                evt.inputEvent = _triplePress;\n                // evt.kbchar = _triplePress;\n                this->notifyObservers(&evt);\n                playComboTune();\n                break;\n#if !HAS_SCREEN\n            case 4:\n                if (moduleConfig.external_notification.enabled && externalNotificationModule) {\n                    externalNotificationModule->setMute(!externalNotificationModule->getMute());\n                    IF_SCREEN(if (!externalNotificationModule->getMute()) externalNotificationModule->stopNow();)\n                    if (externalNotificationModule->getMute()) {\n                        LOG_INFO(\"Temporarily Muted\");\n                        play4ClickDown(); // Disable tone\n                    } else {\n                        LOG_INFO(\"Unmuted\");\n                        play4ClickUp(); // Enable tone\n                    }\n                }\n                break;\n#endif\n            // No valid multipress action\n            default:\n                break;\n            } // end switch: click count\n\n            break;\n        } // end multipress event\n\n        // Do actual shutdown when button released, otherwise the button release\n        // may wake the board immediately.\n        case BUTTON_EVENT_LONG_RELEASED: {\n\n            LOG_INFO(\"LONG PRESS RELEASE AFTER %u MILLIS\", millis() - buttonPressStartTime);\n            // Require press started after boot holdoff to avoid phantom shutdown from floating pins\n            if (millis() > 30000 && buttonPressStartTime > 30000 && _longLongPress != INPUT_BROKER_NONE &&\n                (millis() - buttonPressStartTime) >= _longLongPressTime && leadUpPlayed) {\n                evt.inputEvent = _longLongPress;\n                this->notifyObservers(&evt);\n            }\n            // Reset combination tracking\n            waitingForLongPress = false;\n            leadUpPlayed = false;\n\n            break;\n        }\n\n        // doesn't handle BUTTON_EVENT_PRESSED_SCREEN BUTTON_EVENT_TOUCH_LONG_PRESSED BUTTON_EVENT_COMBO_SHORT_LONG\n        default: {\n            break;\n        }\n        }\n    }\n    btnEvent = BUTTON_EVENT_NONE;\n\n    // only pull when the button is pressed, we get notified via IRQ on a new press\n    if (!userButton.isIdle() || waitingForLongPress) {\n        return 50;\n    }\n    return 100; // FIXME: Why can't we rely on interrupts and use INT32_MAX here?\n}\n\n/*\n * Attach (or re-attach) hardware interrupts for buttons\n * Public method. Used outside class when waking from MCU sleep\n */\nvoid ButtonThread::attachButtonInterrupts()\n{\n    // Interrupt for user button, during normal use. Improves responsiveness.\n    attachInterrupt(_pinNum, _intRoutine, CHANGE);\n}\n\n/*\n * Detach the \"normal\" button interrupts.\n * Public method. Used before attaching a \"wake-on-button\" interrupt for MCU sleep\n */\nvoid ButtonThread::detachButtonInterrupts()\n{\n    detachInterrupt(_pinNum);\n}\n\n#ifdef ARCH_ESP32\n\n// Detach our class' interrupts before lightsleep\n// Allows sleep.cpp to configure its own interrupts, which wake the device on user-button press\nint ButtonThread::beforeLightSleep(void *unused)\n{\n    detachButtonInterrupts();\n    return 0; // Indicates success\n}\n\n// Reconfigure our interrupts\n// Our class' interrupts were disconnected during sleep, to allow the user button to wake the device from sleep\nint ButtonThread::afterLightSleep(esp_sleep_wakeup_cause_t cause)\n{\n    attachButtonInterrupts();\n    return 0; // Indicates success\n}\n\n#endif\n\n// Non-static method, runs during callback. Grabs info while still valid\nvoid ButtonThread::storeClickCount()\n{\n    multipressClickCount = userButton.getNumberClicks();\n}\n"
  },
  {
    "path": "src/input/ButtonThread.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"OneButton.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n\ntypedef void (*voidFuncPtr)(void);\n\nstruct ButtonConfig {\n    uint8_t pinNumber;\n    bool activeLow = true;\n    bool activePullup = true;\n    uint32_t pullupSense = 0;\n    voidFuncPtr intRoutine = nullptr;\n    voidFuncPtr onPress = nullptr;   // Optional edge callbacks\n    voidFuncPtr onRelease = nullptr; // Optional edge callbacks\n    bool suppressLeadUpSound = false;\n    input_broker_event singlePress = INPUT_BROKER_NONE;\n    input_broker_event longPress = INPUT_BROKER_NONE;\n    uint16_t longPressTime = 500;\n    input_broker_event doublePress = INPUT_BROKER_NONE;\n    input_broker_event longLongPress = INPUT_BROKER_NONE;\n    uint16_t longLongPressTime = 3900;\n    input_broker_event triplePress = INPUT_BROKER_NONE;\n    input_broker_event shortLong = INPUT_BROKER_NONE;\n    bool touchQuirk = false;\n\n    // Constructor to set required parameter\n    explicit ButtonConfig(uint8_t pin = 0) : pinNumber(pin) {}\n};\n\n#ifndef BUTTON_CLICK_MS\n#define BUTTON_CLICK_MS 250\n#endif\n\n#ifndef BUTTON_TOUCH_MS\n#define BUTTON_TOUCH_MS 400\n#endif\n\n#ifndef BUTTON_COMBO_TIMEOUT_MS\n#define BUTTON_COMBO_TIMEOUT_MS 1000 // 1 second to complete the combination -- tap faster\n#endif\n\n#ifndef BUTTON_LEADUP_MS\n#define BUTTON_LEADUP_MS 2200 // Play lead-up sound after 2.5 seconds of holding\n#endif\n\nclass ButtonThread : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    const char *_originName;\n    static const uint32_t c_holdOffTime = 30000; // hold off 30s after boot\n    bool initButton(const ButtonConfig &config);\n\n    enum ButtonEventType {\n        BUTTON_EVENT_NONE,\n        BUTTON_EVENT_PRESSED,\n        BUTTON_EVENT_PRESSED_SCREEN,\n        BUTTON_EVENT_DOUBLE_PRESSED,\n        BUTTON_EVENT_MULTI_PRESSED,\n        BUTTON_EVENT_LONG_PRESSED,\n        BUTTON_EVENT_LONG_RELEASED,\n        BUTTON_EVENT_TOUCH_LONG_PRESSED,\n        BUTTON_EVENT_COMBO_SHORT_LONG,\n    };\n\n    explicit ButtonThread(const char *name);\n    int32_t runOnce() override;\n    OneButton userButton;\n    void attachButtonInterrupts();\n    void detachButtonInterrupts();\n    void storeClickCount();\n    bool isButtonPressed(int buttonPin)\n    {\n        if (_activeLow)\n            return !digitalRead(buttonPin); // Active low: pressed = LOW\n        else\n            return digitalRead(buttonPin); // Most buttons are active low by default\n    }\n\n    // Returns true while this thread's button is physically held down\n    bool isHeld() { return isButtonPressed(_pinNum); }\n\n    // Disconnect and reconnect interrupts for light sleep\n#ifdef ARCH_ESP32\n    int beforeLightSleep(void *unused);\n    int afterLightSleep(esp_sleep_wakeup_cause_t cause);\n#endif\n  private:\n    input_broker_event _singlePress = INPUT_BROKER_NONE;\n    input_broker_event _longPress = INPUT_BROKER_NONE;\n    input_broker_event _longLongPress = INPUT_BROKER_NONE;\n\n    input_broker_event _doublePress = INPUT_BROKER_NONE;\n    input_broker_event _triplePress = INPUT_BROKER_NONE;\n    input_broker_event _shortLong = INPUT_BROKER_NONE;\n\n    voidFuncPtr _intRoutine = nullptr;\n    voidFuncPtr _pressHandler = nullptr;\n    voidFuncPtr _releaseHandler = nullptr;\n    bool _suppressLeadUp = false;\n    uint16_t _longPressTime = 500;\n    uint16_t _longLongPressTime = 3900;\n    int _pinNum = 0;\n    bool _activeLow = true;\n    bool _touchQuirk = false;\n\n    uint32_t buttonPressStartTime = 0;\n    bool buttonWasPressed = false;\n\n#ifdef ARCH_ESP32\n    // Get notified when lightsleep begins and ends\n    CallbackObserver<ButtonThread, void *> lsObserver =\n        CallbackObserver<ButtonThread, void *>(this, &ButtonThread::beforeLightSleep);\n    CallbackObserver<ButtonThread, esp_sleep_wakeup_cause_t> lsEndObserver =\n        CallbackObserver<ButtonThread, esp_sleep_wakeup_cause_t>(this, &ButtonThread::afterLightSleep);\n#endif\n\n    volatile ButtonEventType btnEvent = BUTTON_EVENT_NONE;\n\n    // Store click count during callback, for later use\n    volatile int multipressClickCount = 0;\n\n    // Combination tracking state\n    bool waitingForLongPress = false;\n    uint32_t shortPressTime = 0;\n\n    // Long press lead-up tracking\n    bool leadUpPlayed = false;\n    uint32_t lastLeadUpNoteTime = 0;\n    bool leadUpSequenceActive = false;\n\n    static void wakeOnIrq(int irq, int mode);\n};\n\nextern ButtonThread *buttonThread;\n"
  },
  {
    "path": "src/input/CardputerKeyboard.cpp",
    "content": "#if defined(M5STACK_CARDPUTER_ADV)\n\n#include \"CardputerKeyboard.h\"\n#include \"main.h\"\n\n#define _TCA8418_COLS 8\n#define _TCA8418_ROWS 7\n#define _TCA8418_NUM_KEYS 56\n\n#define _TCA8418_MULTI_TAP_THRESHOLD 1500\n\nusing Key = TCA8418KeyboardBase::TCA8418Key;\n\nconstexpr uint8_t modifierFnKey = 2;\nconstexpr uint8_t modifierFn = 0b0010;\nconstexpr uint8_t modifierCtrlKey = 3;\nconstexpr uint8_t modifierShiftKey = 6;\nconstexpr uint8_t modifierShift = 0b0001;\nconstexpr uint8_t modifierOptKey = 7;\nconstexpr uint8_t modifierAltKey = 11;\n\n// Num chars per key, Modulus for rotating through characters\nstatic uint8_t CardputerTapMod[_TCA8418_NUM_KEYS] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n                                                     3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n                                                     3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3};\n\nstatic unsigned char CardputerTapMap[_TCA8418_NUM_KEYS][3] = {{'`', '~', Key::ESC},\n                                                              {Key::TAB, 0x00, 0x00},\n                                                              {0x00, 0x00, 0x00},\n                                                              {0x00, 0x00, 0x00},\n                                                              {'1', '!', 0x00},\n                                                              {'q', 'Q', Key::REBOOT},\n                                                              {0x00, 0x00, 0x00},\n                                                              {0x00, 0x00, 0x00},\n                                                              {'2', '@', 0x00},\n                                                              {'w', 'W', 0x00},\n                                                              {'a', 'A', 0x00},\n                                                              {0x00, 0x00, 0x00},\n                                                              {'3', '#', 0x00},\n                                                              {'e', 'E', 0x00},\n                                                              {'s', 'S', 0x00},\n                                                              {'z', 'Z', 0x00},\n                                                              {'4', '$', 0x00},\n                                                              {'r', 'R', 0x00},\n                                                              {'d', 'D', 0x00},\n                                                              {'x', 'X', 0x00},\n                                                              {'5', '%', 0x00},\n                                                              {'t', 'T', 0x00},\n                                                              {'f', 'F', 0x00},\n                                                              {'c', 'C', 0x00},\n                                                              {'6', '^', 0x00},\n                                                              {'y', 'Y', 0x00},\n                                                              {'g', 'G', Key::GPS_TOGGLE},\n                                                              {'v', 'V', 0x00},\n                                                              {'7', '&', 0x00},\n                                                              {'u', 'U', 0x00},\n                                                              {'h', 'H', 0x00},\n                                                              {'b', 'B', Key::BT_TOGGLE},\n                                                              {'8', '*', 0x00},\n                                                              {'i', 'I', 0x00},\n                                                              {'j', 'J', 0x00},\n                                                              {'n', 'N', 0x00},\n                                                              {'9', '(', 0x00},\n                                                              {'o', 'O', 0x00},\n                                                              {'k', 'K', 0x00},\n                                                              {'m', 'M', Key::MUTE_TOGGLE},\n                                                              {'0', ')', 0x00},\n                                                              {'p', 'P', Key::SEND_PING},\n                                                              {'l', 'L', 0x00},\n                                                              {',', '<', Key::LEFT},\n                                                              {'_', '-', 0x00},\n                                                              {'[', '{', 0x00},\n                                                              {';', ':', Key::UP},\n                                                              {'.', '>', Key::DOWN},\n                                                              {'=', '+', 0x00},\n                                                              {']', '}', 0x00},\n                                                              {'\\'', '\"', 0x00},\n                                                              {'/', '?', Key::RIGHT},\n                                                              {Key::BSP, 0x00, 0x00},\n                                                              {'\\\\', '|', 0x00},\n                                                              {Key::SELECT, 0x00, 0x00},\n                                                              {' ', ' ', ' '}};\n\nCardputerKeyboard::CardputerKeyboard()\n    : TCA8418KeyboardBase(_TCA8418_ROWS, _TCA8418_COLS), modifierFlag(0), last_modifier_time(0), last_key(-1), next_key(-1),\n      last_tap(0L), char_idx(0), tap_interval(0)\n{\n    reset();\n}\n\nvoid CardputerKeyboard::reset(void)\n{\n    TCA8418KeyboardBase::reset();\n}\n\n// handle multi-key presses (shift and alt)\nvoid CardputerKeyboard::trigger()\n{\n    uint8_t count = keyCount();\n    if (count == 0)\n        return;\n    for (uint8_t i = 0; i < count; ++i) {\n        uint8_t k = readRegister(TCA8418_REG_KEY_EVENT_A + i);\n        uint8_t key = k & 0x7F;\n        if (k & 0x80) {\n            pressed(key);\n        } else {\n            released();\n            state = Idle;\n        }\n    }\n}\n\nvoid CardputerKeyboard::pressed(uint8_t key)\n{\n    if (state == Init || state == Busy) {\n        return;\n    }\n\n    if (modifierFlag && (millis() - last_modifier_time > _TCA8418_MULTI_TAP_THRESHOLD)) {\n        modifierFlag = 0;\n    }\n\n    uint8_t next_key = 0;\n    int row = (key - 1) / 10;\n    int col = (key - 1) % 10;\n\n    if (row >= _TCA8418_ROWS || col >= _TCA8418_COLS) {\n        return; // Invalid key\n    }\n\n    next_key = row * _TCA8418_COLS + col;\n    state = Held;\n\n    uint32_t now = millis();\n    tap_interval = now - last_tap;\n\n    updateModifierFlag(next_key);\n    if (isModifierKey(next_key)) {\n        last_modifier_time = now;\n    }\n\n    if (tap_interval < 0) {\n        last_tap = 0;\n        state = Busy;\n        return;\n    }\n\n    if (next_key != last_key || tap_interval > _TCA8418_MULTI_TAP_THRESHOLD) {\n        char_idx = 0;\n    } else {\n        char_idx += 1;\n    }\n\n    last_key = next_key;\n    last_tap = now;\n}\n\nvoid CardputerKeyboard::released()\n{\n    if (state != Held) {\n        return;\n    }\n\n    if (last_key < 0 || last_key >= _TCA8418_NUM_KEYS) {\n        last_key = -1;\n        state = Idle;\n        return;\n    }\n\n    uint32_t now = millis();\n    last_tap = now;\n\n    if (inputBroker->menuMode && modifierFlag == 0) {\n        if (last_key == 0 || last_key == 43 || last_key == 46 || last_key == 47 ||\n            last_key == 51) { // esc, left, up, down, right key\n            modifierFlag = modifierFn;\n        }\n    }\n\n    queueEvent(CardputerTapMap[last_key][modifierFlag % CardputerTapMod[last_key]]);\n    if (isModifierKey(last_key) == false)\n        modifierFlag = 0;\n}\n\nvoid CardputerKeyboard::updateModifierFlag(uint8_t key)\n{\n    if (key == modifierShiftKey) {\n        modifierFlag ^= modifierShift;\n    } else if (key == modifierFnKey) {\n        modifierFlag ^= modifierFn;\n    }\n}\n\nbool CardputerKeyboard::isModifierKey(uint8_t key)\n{\n    return (key == modifierShiftKey || key == modifierFnKey);\n}\n\n#endif"
  },
  {
    "path": "src/input/CardputerKeyboard.h",
    "content": "#include \"TCA8418KeyboardBase.h\"\n\nclass CardputerKeyboard : public TCA8418KeyboardBase\n{\n  public:\n    CardputerKeyboard();\n    void reset(void);\n    void trigger(void) override;\n    virtual ~CardputerKeyboard() {}\n\n  protected:\n    void pressed(uint8_t key) override;\n    void released(void) override;\n\n    void updateModifierFlag(uint8_t key);\n    bool isModifierKey(uint8_t key);\n\n  private:\n    uint8_t modifierFlag;\n    uint32_t last_modifier_time;\n    int8_t last_key;\n    int8_t next_key;\n    uint32_t last_tap;\n    uint8_t char_idx;\n    int32_t tap_interval;\n};\n"
  },
  {
    "path": "src/input/ExpressLRSFiveWay.cpp",
    "content": "#include \"ExpressLRSFiveWay.h\"\n#include \"Throttle.h\"\n\n#ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE\n\nstatic const char inputSourceName[] = \"ExpressLRS5Way\"; // should match \"allow input source\" string\n\n/**\n * @brief Calculate fuzz: half the distance to the next nearest neighbor for each joystick position.\n *\n * The goal is to avoid collisions between joystick positions while still maintaining\n * the widest tolerance for the analog value.\n *\n * Example: {10,50,800,1000,300,1600}\n * If we just choose the minimum difference for this array the value would\n * be 40/2 = 20.\n *\n * 20 does not leave enough room for the joystick position using 1600 which\n * could have a +-100 offset.\n *\n * Example Fuzz values: {20, 20, 100, 100, 125, 300} now the fuzz for the 1600\n * position is 300 instead of 20\n */\nvoid ExpressLRSFiveWay::calcFuzzValues()\n{\n    for (unsigned int i = 0; i < N_JOY_ADC_VALUES; i++) {\n        uint16_t closestDist = 0xffff;\n        uint16_t ival = joyAdcValues[i];\n        // Find the closest value to ival\n        for (unsigned int j = 0; j < N_JOY_ADC_VALUES; j++) {\n            // Don't compare value with itself\n            if (j == i)\n                continue;\n            uint16_t jval = joyAdcValues[j];\n            if (jval < ival && (ival - jval < closestDist))\n                closestDist = ival - jval;\n            if (jval > ival && (jval - ival < closestDist))\n                closestDist = jval - ival;\n        } // for j\n\n        // And the fuzz is half the distance to the closest value\n        fuzzValues[i] = closestDist / 2;\n        // DBG(\"joy%u=%u f=%u, \", i, ival, fuzzValues[i]);\n    } // for i\n}\n\nint ExpressLRSFiveWay::readKey()\n{\n    uint16_t value = analogRead(PIN_JOYSTICK);\n\n    constexpr uint8_t IDX_TO_INPUT[N_JOY_ADC_VALUES - 1] = {UP, DOWN, LEFT, RIGHT, OK};\n    for (unsigned int i = 0; i < N_JOY_ADC_VALUES - 1; ++i) {\n        if (value < (joyAdcValues[i] + fuzzValues[i]) && value > (joyAdcValues[i] - fuzzValues[i]))\n            return IDX_TO_INPUT[i];\n    }\n    return NO_PRESS;\n}\n\nExpressLRSFiveWay::ExpressLRSFiveWay() : concurrency::OSThread(inputSourceName)\n{\n    // ExpressLRS: init values\n    isLongPressed = false;\n    keyInProcess = NO_PRESS;\n    keyDownStart = 0;\n\n    // Express LRS: calculate the threshold for interpreting ADC values as various buttons\n    calcFuzzValues();\n\n    // Meshtastic: register with canned messages\n    inputBroker->registerSource(this);\n}\n\n// ExpressLRS: interpret reading as key events\nvoid ExpressLRSFiveWay::update(int *keyValue, bool *keyLongPressed)\n{\n    *keyValue = NO_PRESS;\n\n    int newKey = readKey();\n    if (keyInProcess == NO_PRESS) {\n        // New key down\n        if (newKey != NO_PRESS) {\n            keyDownStart = millis();\n            // DBGLN(\"down=%u\", newKey);\n        }\n    } else {\n        // if key released\n        if (newKey == NO_PRESS) {\n            // DBGLN(\"up=%u\", keyInProcess);\n            if (!isLongPressed) {\n                if (!Throttle::isWithinTimespanMs(keyDownStart, KEY_DEBOUNCE_MS)) {\n                    *keyValue = keyInProcess;\n                    *keyLongPressed = false;\n                }\n            }\n            isLongPressed = false;\n        }\n        // else if the key has changed while down, reset state for next go-around\n        else if (newKey != keyInProcess) {\n            newKey = NO_PRESS;\n        }\n        // else still pressing, waiting for long if not already signaled\n        else if (!isLongPressed) {\n            if (!Throttle::isWithinTimespanMs(keyDownStart, KEY_LONG_PRESS_MS)) {\n                *keyValue = keyInProcess;\n                *keyLongPressed = true;\n                isLongPressed = true;\n            }\n        }\n    } // if keyInProcess != NO_PRESS\n\n    keyInProcess = newKey;\n}\n\n// Meshtastic: runs at regular intervals\nint32_t ExpressLRSFiveWay::runOnce()\n{\n    uint32_t now = millis();\n\n    // Dismiss any alert frames after 2 seconds\n    // Feedback for GPS toggle / adhoc ping\n    if (alerting && now > alertingSinceMs + 2000) {\n        alerting = false;\n        screen->endAlert();\n    }\n\n    // Get key events from ExpressLRS code\n    int keyValue;\n    bool longPressed;\n    update(&keyValue, &longPressed);\n\n    // Do something about this key press\n    determineAction((KeyType)keyValue, longPressed ? LONG : SHORT);\n\n    // If there has been recent key activity, poll the joystick slightly more frequently\n    if (now < keyDownStart + (20 * 1000UL)) // Within last 20 seconds\n        return 100;\n\n    // Otherwise, poll slightly less often\n    // Too many missed pressed if much slower than 250ms\n    return 250;\n}\n\n// Determine what action to take when a button press is detected\n// Written verbose for easier remapping by user\nvoid ExpressLRSFiveWay::determineAction(KeyType key, PressLength length)\n{\n    switch (key) {\n    case LEFT:\n        if (inCannedMessageMenu())        // If in canned message menu\n            sendKey(INPUT_BROKER_CANCEL); // exit the menu (press imaginary cancel key)\n        else\n            sendKey(INPUT_BROKER_LEFT);\n        break;\n\n    case RIGHT:\n        if (inCannedMessageMenu())        // If in canned message menu:\n            sendKey(INPUT_BROKER_CANCEL); // exit the menu (press imaginary cancel key)\n        else\n            sendKey(INPUT_BROKER_RIGHT);\n        break;\n\n    case UP:\n        if (length == LONG)\n            toggleGPS();\n        else\n            sendKey(INPUT_BROKER_UP);\n        break;\n\n    case DOWN:\n        if (length == LONG)\n            sendAdhocPing();\n        else\n            sendKey(INPUT_BROKER_DOWN);\n        break;\n\n    case OK:\n        if (length == LONG)\n            shutdown();\n        else\n            click(); // Use instead of sendKey(OK). Works better when canned message module disabled\n        break;\n\n    default:\n        break;\n    }\n}\n\n// Feed input to the canned messages module\nvoid ExpressLRSFiveWay::sendKey(input_broker_event key)\n{\n    InputEvent e = {};\n    e.source = inputSourceName;\n    e.inputEvent = key;\n    notifyObservers(&e);\n}\n\n// Enable or Disable a connected GPS\n// Contained as one method for easier remapping of buttons by user\nvoid ExpressLRSFiveWay::toggleGPS()\n{\n#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS\n    if (gps != nullptr) {\n        gps->toggleGpsMode();\n        screen->startAlert(\"GPS Toggled\");\n        alerting = true;\n        alertingSinceMs = millis();\n    }\n#endif\n}\n\n// Send either node-info or position, on demand\n// Contained as one method for easier remapping of buttons by user\nvoid ExpressLRSFiveWay::sendAdhocPing()\n{\n    service->refreshLocalMeshNode();\n    bool sentPosition = service->trySendPosition(NODENUM_BROADCAST, true);\n\n    // Show custom alert frame, with multi-line centering\n    screen->startAlert([sentPosition](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void {\n        uint16_t x_offset = display->width() / 2;\n        uint16_t y_offset = 26; // Same constant as the default startAlert frame\n        display->setTextAlignment(TEXT_ALIGN_CENTER);\n        display->setFont(FONT_MEDIUM);\n        display->drawString(x_offset + x, y_offset + y, \"Sent ad-hoc\");\n        display->drawString(x_offset + x, y_offset + FONT_HEIGHT_MEDIUM + y, sentPosition ? \"position\" : \"nodeinfo\");\n    });\n\n    alerting = true;\n    alertingSinceMs = millis();\n}\n\n// Shutdown the node (enter deep-sleep)\n// Contained as one method for easier remapping of buttons by user\nvoid ExpressLRSFiveWay::shutdown()\n{\n    sendKey(INPUT_BROKER_SHUTDOWN);\n}\n\nvoid ExpressLRSFiveWay::click()\n{\n    sendKey(INPUT_BROKER_SELECT);\n}\n\nExpressLRSFiveWay *expressLRSFiveWayInput = nullptr;\n\n#endif\n"
  },
  {
    "path": "src/input/ExpressLRSFiveWay.h",
    "content": "/*\n    Input source for Radio Master Bandit Nano, and similar hardware.\n    Devices have a 5-button \"resistor ladder\" style joystick, read by ADC.\n    These devices do not use the ADC to monitor input voltage.\n\n    Much of this code taken directly from ExpressLRS FiveWayButton class:\n    https://github.com/ExpressLRS/ExpressLRS/tree/d9f56f8bd6f9f7144d5f01caaca766383e1e0950/src/lib/SCREEN/FiveWayButton\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE\n\n#include <esp_adc_cal.h>\n#include <soc/adc_channel.h>\n\n#include \"InputBroker.h\"\n#include \"MeshService.h\" // For adhoc ping action\n#include \"buzz.h\"\n#include \"concurrency/OSThread.h\"\n#include \"graphics/Screen.h\" // Feedback for adhoc ping / toggle GPS\n#include \"main.h\"\n#include \"modules/CannedMessageModule.h\"\n\n#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\" // For toggle GPS action\n#endif\n\nclass ExpressLRSFiveWay : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  private:\n    // Number of values in JOY_ADC_VALUES, if defined\n    // These must be ADC readings for {UP, DOWN, LEFT, RIGHT, ENTER, IDLE}\n    static constexpr size_t N_JOY_ADC_VALUES = 6;\n    static constexpr uint32_t KEY_DEBOUNCE_MS = 25;\n    static constexpr uint32_t KEY_LONG_PRESS_MS = 3000; // How many milliseconds to hold key for a long press\n\n    // This merged an enum used by the ExpressLRS code, with meshtastic canned message values\n    // Key names are kept simple, to allow user customizaton\n    typedef enum {\n        UP = INPUT_BROKER_UP,\n        DOWN = INPUT_BROKER_DOWN,\n        LEFT = INPUT_BROKER_LEFT,\n        RIGHT = INPUT_BROKER_RIGHT,\n        OK = INPUT_BROKER_SELECT,\n        CANCEL = INPUT_BROKER_CANCEL,\n        NO_PRESS = INPUT_BROKER_NONE\n    } KeyType;\n\n    typedef enum { SHORT, LONG } PressLength;\n\n    // From ExpressLRS\n    int keyInProcess;\n    uint32_t keyDownStart;\n    bool isLongPressed;\n    const uint16_t joyAdcValues[N_JOY_ADC_VALUES] = {JOYSTICK_ADC_VALS};\n    uint16_t fuzzValues[N_JOY_ADC_VALUES];\n    void calcFuzzValues();\n    int readKey();\n    void update(int *keyValue, bool *keyLongPressed);\n\n    // Meshtastic code\n    void determineAction(KeyType key, PressLength length);\n    void sendKey(input_broker_event key);\n    inline bool inCannedMessageMenu() { return cannedMessageModule->shouldDraw(); }\n    int32_t runOnce() override;\n\n    // Simplified Meshtastic actions, for easier remapping by user\n    void toggleGPS();\n    void sendAdhocPing();\n    void shutdown();\n    void click();\n\n    bool alerting = false;        // Is the screen showing an alert frame? Feedback for GPS toggle / adhoc ping actions\n    uint32_t alertingSinceMs = 0; // When did screen begin showing an alert frame? Used to auto-dismiss\n\n  public:\n    ExpressLRSFiveWay();\n};\n\nextern ExpressLRSFiveWay *expressLRSFiveWayInput;\n\n#endif"
  },
  {
    "path": "src/input/HackadayCommunicatorKeyboard.cpp",
    "content": "#if defined(HACKADAY_COMMUNICATOR)\n\n#include \"HackadayCommunicatorKeyboard.h\"\n#include \"main.h\"\n\n#define _TCA8418_COLS 10\n#define _TCA8418_ROWS 8\n#define _TCA8418_NUM_KEYS 80\n\n#define _TCA8418_MULTI_TAP_THRESHOLD 1500\n\nusing Key = TCA8418KeyboardBase::TCA8418Key;\n\nconstexpr uint8_t modifierRightShiftKey = 30;\nconstexpr uint8_t modifierRightShift = 0b0001;\nconstexpr uint8_t modifierLeftShiftKey = 76; // keynum -1\nconstexpr uint8_t modifierLeftShift = 0b0001;\n// constexpr uint8_t modifierSymKey = 42;\n// constexpr uint8_t modifierSym = 0b0010;\n\n// Num chars per key, Modulus for rotating through characters\nstatic uint8_t HackadayCommunicatorTapMod[_TCA8418_NUM_KEYS] = {\n    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,\n    0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 0, 0, 0, 1, 2, 2, 2, 1, 2, 2, 0, 0, 0, 2, 1, 2, 2, 0, 1, 1, 0,\n};\n\nstatic unsigned char HackadayCommunicatorTapMap[_TCA8418_NUM_KEYS][2] = {{},\n                                                                         {Key::FUNCTION_F1},\n                                                                         {'+'},\n                                                                         {'9'},\n                                                                         {'8'},\n                                                                         {'7'},\n                                                                         {Key::FUNCTION_F2},\n                                                                         {Key::FUNCTION_F3},\n                                                                         {Key::FUNCTION_F4},\n                                                                         {Key::FUNCTION_F5},\n                                                                         {Key::ESC},\n                                                                         {'q', 'Q'},\n                                                                         {'w', 'W'},\n                                                                         {'e', 'E'},\n                                                                         {'r', 'R'},\n                                                                         {'t', 'T'},\n                                                                         {'y', 'Y'},\n                                                                         {'u', 'U'},\n                                                                         {'i', 'I'},\n                                                                         {'o', 'O'},\n                                                                         {Key::TAB},\n                                                                         {'a', 'A'},\n                                                                         {'s', 'S'},\n                                                                         {'d', 'D'},\n                                                                         {'f', 'F'},\n                                                                         {'g', 'G'},\n                                                                         {'h', 'H'},\n                                                                         {'j', 'J'},\n                                                                         {'k', 'K'},\n                                                                         {'l', 'L'},\n                                                                         {},\n                                                                         {'z', 'Z'},\n                                                                         {'x', 'X'},\n                                                                         {'c', 'C'},\n                                                                         {'v', 'V'},\n                                                                         {'b', 'B'},\n                                                                         {'n', 'N'},\n                                                                         {'m', 'M'},\n                                                                         {',', '<'},\n                                                                         {'.', '>'},\n                                                                         {},\n                                                                         {},\n                                                                         {},\n                                                                         {'\\\\'},\n                                                                         {' '},\n                                                                         {},\n                                                                         {Key::RIGHT},\n                                                                         {Key::DOWN},\n                                                                         {Key::LEFT},\n                                                                         {},\n                                                                         {},\n                                                                         {},\n                                                                         {'-'},\n                                                                         {'6', '^'},\n                                                                         {'5', '%'},\n                                                                         {'4', '$'},\n                                                                         {'[', '{'},\n                                                                         {']', '}'},\n                                                                         {'p', 'P'},\n                                                                         {},\n                                                                         {},\n                                                                         {},\n                                                                         {'*'},\n                                                                         {'3', '#'},\n                                                                         {'2', '@'},\n                                                                         {'1', '!'},\n                                                                         {Key::SELECT},\n                                                                         {'\\'', '\"'},\n                                                                         {';', ':'},\n                                                                         {},\n                                                                         {},\n                                                                         {},\n                                                                         {'/', '?'},\n                                                                         {'='},\n                                                                         {'.', '>'},\n                                                                         {'0', ')'},\n                                                                         {},\n                                                                         {Key::UP},\n                                                                         {Key::BSP},\n                                                                         {}};\n\nHackadayCommunicatorKeyboard::HackadayCommunicatorKeyboard()\n    : TCA8418KeyboardBase(_TCA8418_ROWS, _TCA8418_COLS), modifierFlag(0), last_modifier_time(0), last_key(UINT8_MAX),\n      next_key(UINT8_MAX), last_tap(0L), char_idx(0), tap_interval(0)\n{\n    reset();\n}\n\nvoid HackadayCommunicatorKeyboard::reset(void)\n{\n    TCA8418KeyboardBase::reset();\n    enableInterrupts();\n}\n\n// handle multi-key presses (shift and alt)\nvoid HackadayCommunicatorKeyboard::trigger()\n{\n    uint8_t count = keyCount();\n    if (count == 0)\n        return;\n    for (uint8_t i = 0; i < count; ++i) {\n        uint8_t k = readRegister(TCA8418_REG_KEY_EVENT_A + i);\n        uint8_t key = k & 0x7F;\n        if (k & 0x80) {\n            pressed(key);\n        } else {\n            released();\n            state = Idle;\n        }\n    }\n}\n\nvoid HackadayCommunicatorKeyboard::pressed(uint8_t key)\n{\n    if (state == Init || state == Busy) {\n        return;\n    }\n    LOG_DEBUG(\"Key pressed: %u\", key);\n\n    if (modifierFlag && (millis() - last_modifier_time > _TCA8418_MULTI_TAP_THRESHOLD)) {\n        modifierFlag = 0;\n    }\n\n    int row = (key - 1) / 10;\n    int col = (key - 1) % 10;\n    if (row >= _TCA8418_ROWS || col >= _TCA8418_COLS) {\n        return; // Invalid key\n    }\n\n    next_key = row * _TCA8418_COLS + col;\n    state = Held;\n\n    uint32_t now = millis();\n    tap_interval = now - last_tap;\n\n    updateModifierFlag(next_key);\n    if (isModifierKey(next_key)) {\n        last_modifier_time = now;\n    }\n\n    if (tap_interval < 0) {\n        last_tap = 0;\n        state = Busy;\n        return;\n    }\n\n    if (next_key != last_key || tap_interval > _TCA8418_MULTI_TAP_THRESHOLD) {\n        char_idx = 0;\n    } else {\n        char_idx += 1;\n    }\n\n    last_key = next_key;\n    last_tap = now;\n}\n\nvoid HackadayCommunicatorKeyboard::released()\n{\n    if (state != Held) {\n        return;\n    }\n\n    if (last_key >= _TCA8418_NUM_KEYS) {\n        last_key = UINT8_MAX;\n        state = Idle;\n        return;\n    }\n\n    uint32_t now = millis();\n    last_tap = now;\n    if (HackadayCommunicatorTapMod[last_key])\n        queueEvent(HackadayCommunicatorTapMap[last_key][modifierFlag % HackadayCommunicatorTapMod[last_key]]);\n    if (isModifierKey(last_key) == false)\n        modifierFlag = 0;\n}\n\nvoid HackadayCommunicatorKeyboard::updateModifierFlag(uint8_t key)\n{\n    if (key == modifierRightShiftKey) {\n        modifierFlag ^= modifierRightShift;\n    } else if (key == modifierLeftShiftKey) {\n        modifierFlag ^= modifierLeftShift;\n    }\n}\n\nbool HackadayCommunicatorKeyboard::isModifierKey(uint8_t key)\n{\n    return (key == modifierRightShiftKey || key == modifierLeftShiftKey);\n}\n\n#endif"
  },
  {
    "path": "src/input/HackadayCommunicatorKeyboard.h",
    "content": "#include \"TCA8418KeyboardBase.h\"\n\nclass HackadayCommunicatorKeyboard : public TCA8418KeyboardBase\n{\n  public:\n    HackadayCommunicatorKeyboard();\n    void reset(void);\n    void trigger(void) override;\n    virtual ~HackadayCommunicatorKeyboard() {}\n\n  protected:\n    void pressed(uint8_t key) override;\n    void released(void) override;\n\n    void updateModifierFlag(uint8_t key);\n    bool isModifierKey(uint8_t key);\n\n  private:\n    uint8_t modifierFlag;        // Flag to indicate if a modifier key is pressed\n    uint32_t last_modifier_time; // Timestamp of the last modifier key press\n    uint8_t last_key;\n    uint8_t next_key;\n    uint32_t last_tap;\n    uint8_t char_idx;\n    int32_t tap_interval;\n};\n"
  },
  {
    "path": "src/input/InputBroker.cpp",
    "content": "#include \"InputBroker.h\"\n#include \"PowerFSM.h\" // needed for event trigger\n#include \"configuration.h\"\n#include \"graphics/Screen.h\"\n#include \"modules/ExternalNotificationModule.h\"\n\n#if ARCH_PORTDUINO\n#include \"input/LinuxInputImpl.h\"\n#include \"input/SeesawRotary.h\"\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\n#include \"input/ExpressLRSFiveWay.h\"\n#include \"input/RotaryEncoderImpl.h\"\n#include \"input/RotaryEncoderInterruptImpl1.h\"\n#include \"input/SerialKeyboardImpl.h\"\n#include \"input/UpDownInterruptImpl1.h\"\n#include \"input/i2cButton.h\"\n#if HAS_TRACKBALL\n#include \"input/TrackballInterruptImpl1.h\"\n#endif\n\n#include \"modules/StatusLEDModule.h\"\n\n#if !MESHTASTIC_EXCLUDE_I2C\n#include \"input/cardKbI2cImpl.h\"\n#endif\n#include \"input/kbMatrixImpl.h\"\n#endif\n\n#if HAS_BUTTON || defined(ARCH_PORTDUINO)\n#include \"input/ButtonThread.h\"\n\n#if defined(BUTTON_PIN_TOUCH)\nButtonThread *TouchButtonThread = nullptr;\n#if defined(TTGO_T_ECHO_PLUS) && defined(PIN_EINK_EN)\nstatic bool touchBacklightWasOn = false;\nstatic bool touchBacklightActive = false;\n#endif\n#endif\n\n#if defined(BUTTON_PIN) || defined(ARCH_PORTDUINO)\nButtonThread *UserButtonThread = nullptr;\n#endif\n\n#if defined(ALT_BUTTON_PIN)\nButtonThread *BackButtonThread = nullptr;\n#endif\n\n#if defined(CANCEL_BUTTON_PIN)\nButtonThread *CancelButtonThread = nullptr;\n#endif\n\n#endif\n\nInputBroker *inputBroker = nullptr;\n\nInputBroker::InputBroker()\n{\n#if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)\n    inputEventQueue = xQueueCreate(5, sizeof(InputEvent));\n    pollSoonQueue = xQueueCreate(5, sizeof(InputPollable *));\n    xTaskCreate(pollSoonWorker, \"input-pollSoon\", 2 * 1024, this, 10, &pollSoonTask);\n#endif\n}\n\nvoid InputBroker::registerSource(Observable<const InputEvent *> *source)\n{\n    this->inputEventObserver.observe(source);\n}\n\n#if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)\nvoid InputBroker::requestPollSoon(InputPollable *pollable)\n{\n    if (xPortInIsrContext() == pdTRUE) {\n        xQueueSendFromISR(pollSoonQueue, &pollable, NULL);\n    } else {\n        xQueueSend(pollSoonQueue, &pollable, 0);\n    }\n}\n\nvoid InputBroker::queueInputEvent(const InputEvent *event)\n{\n    if (xPortInIsrContext() == pdTRUE) {\n        xQueueSendFromISR(inputEventQueue, event, NULL);\n    } else {\n        xQueueSend(inputEventQueue, event, portMAX_DELAY);\n    }\n}\n\nvoid InputBroker::processInputEventQueue()\n{\n    InputEvent event;\n    while (xQueueReceive(inputEventQueue, &event, 0)) {\n        handleInputEvent(&event);\n    }\n}\n#endif\n\nint InputBroker::handleInputEvent(const InputEvent *event)\n{\n#if HAS_SCREEN\n    bool screenWasOff = false;\n    if (screen) {\n        screenWasOff = !screen->isScreenOn();\n    }\n#endif\n    powerFSM.trigger(EVENT_INPUT);\n\n    if (event && event->inputEvent != INPUT_BROKER_NONE && externalNotificationModule &&\n        moduleConfig.external_notification.enabled && externalNotificationModule->nagging()) {\n        externalNotificationModule->stopNow();\n        // If this turns off a notification, don't further process the event\n        return 0;\n    }\n\n#if HAS_SCREEN\n    if (screen && screenWasOff) {\n        // If the screen was off, it is in the process of turning on, and we just drop the event\n        return 0;\n    }\n#endif\n\n    this->notifyObservers(event);\n    return 0;\n}\n\n#if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)\nvoid InputBroker::pollSoonWorker(void *p)\n{\n    InputBroker *instance = (InputBroker *)p;\n    while (true) {\n        InputPollable *pollable = NULL;\n        xQueueReceive(instance->pollSoonQueue, &pollable, portMAX_DELAY);\n        if (pollable) {\n            pollable->pollOnce();\n        }\n    }\n    vTaskDelete(NULL);\n}\n#endif\n\nvoid InputBroker::Init()\n{\n\n#ifdef BUTTON_PIN\n#ifdef ARCH_ESP32\n\n#if ESP_ARDUINO_VERSION_MAJOR >= 3\n#ifdef BUTTON_NEED_PULLUP\n    pinMode(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, INPUT_PULLUP);\n#else\n    pinMode(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, INPUT); // default to BUTTON_PIN\n#endif\n#else\n    pinMode(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN, INPUT); // default to BUTTON_PIN\n#ifdef BUTTON_NEED_PULLUP\n    gpio_pullup_en((gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN));\n    delay(10);\n#endif\n#ifdef BUTTON_NEED_PULLUP2\n    gpio_pullup_en((gpio_num_t)BUTTON_NEED_PULLUP2);\n    delay(10);\n#endif\n#endif\n#endif\n#endif\n\n// buttons are now inputBroker, so have to come after setupModules\n#if HAS_BUTTON\n    int pullup_sense = 0;\n#ifdef INPUT_PULLUP_SENSE\n    // Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did\n#ifdef BUTTON_SENSE_TYPE\n    pullup_sense = BUTTON_SENSE_TYPE;\n#else\n    pullup_sense = INPUT_PULLUP_SENSE;\n#endif\n#endif\n#if defined(ARCH_PORTDUINO)\n\n    if (portduino_config.userButtonPin.enabled) {\n\n        LOG_DEBUG(\"Use GPIO%02d for button\", portduino_config.userButtonPin.pin);\n        UserButtonThread = new ButtonThread(\"UserButton\");\n        if (screen) {\n            ButtonConfig config;\n            config.pinNumber = (uint8_t)portduino_config.userButtonPin.pin;\n            config.activeLow = true;\n            config.activePullup = true;\n            config.pullupSense = INPUT_PULLUP;\n            config.intRoutine = []() {\n                UserButtonThread->userButton.tick();\n                UserButtonThread->setIntervalFromNow(0);\n                runASAP = true;\n                BaseType_t higherWake = 0;\n                concurrency::mainDelay.interruptFromISR(&higherWake);\n            };\n            config.singlePress = INPUT_BROKER_USER_PRESS;\n            config.longPress = INPUT_BROKER_SELECT;\n            UserButtonThread->initButton(config);\n        }\n    }\n#endif\n\n#ifdef BUTTON_PIN_TOUCH\n    TouchButtonThread = new ButtonThread(\"BackButton\");\n    ButtonConfig touchConfig;\n    touchConfig.pinNumber = BUTTON_PIN_TOUCH;\n    touchConfig.activeLow = true;\n    touchConfig.activePullup = true;\n    touchConfig.pullupSense = pullup_sense;\n    touchConfig.intRoutine = []() {\n        TouchButtonThread->userButton.tick();\n        TouchButtonThread->setIntervalFromNow(0);\n        runASAP = true;\n        BaseType_t higherWake = 0;\n        concurrency::mainDelay.interruptFromISR(&higherWake);\n    };\n    touchConfig.singlePress = INPUT_BROKER_NONE;\n    touchConfig.longPress = INPUT_BROKER_BACK;\n#if defined(TTGO_T_ECHO_PLUS) && defined(PIN_EINK_EN)\n    // On T-Echo Plus the touch pad should only drive the backlight, not UI navigation/sounds\n    touchConfig.longPress = INPUT_BROKER_NONE;\n    touchConfig.suppressLeadUpSound = true;\n    touchConfig.onPress = []() {\n        touchBacklightWasOn = uiconfig.screen_brightness == 1;\n        if (!touchBacklightWasOn) {\n            digitalWrite(PIN_EINK_EN, HIGH);\n        }\n        touchBacklightActive = true;\n    };\n    touchConfig.onRelease = []() {\n        if (touchBacklightActive && !touchBacklightWasOn) {\n            digitalWrite(PIN_EINK_EN, LOW);\n        }\n        touchBacklightActive = false;\n    };\n#endif\n    TouchButtonThread->initButton(touchConfig);\n#endif\n\n#if defined(CANCEL_BUTTON_PIN)\n    // Buttons. Moved here cause we need NodeDB to be initialized\n    CancelButtonThread = new ButtonThread(\"CancelButton\");\n    ButtonConfig cancelConfig;\n    cancelConfig.pinNumber = CANCEL_BUTTON_PIN;\n    cancelConfig.activeLow = CANCEL_BUTTON_ACTIVE_LOW;\n    cancelConfig.activePullup = CANCEL_BUTTON_ACTIVE_PULLUP;\n    cancelConfig.pullupSense = pullup_sense;\n    cancelConfig.intRoutine = []() {\n        CancelButtonThread->userButton.tick();\n        CancelButtonThread->setIntervalFromNow(0);\n        runASAP = true;\n        BaseType_t higherWake = 0;\n        concurrency::mainDelay.interruptFromISR(&higherWake);\n    };\n    cancelConfig.singlePress = INPUT_BROKER_CANCEL;\n    cancelConfig.longPress = INPUT_BROKER_SHUTDOWN;\n    cancelConfig.longPressTime = 4000;\n    CancelButtonThread->initButton(cancelConfig);\n#endif\n\n#if defined(ALT_BUTTON_PIN)\n    // Buttons. Moved here cause we need NodeDB to be initialized\n    BackButtonThread = new ButtonThread(\"BackButton\");\n    ButtonConfig backConfig;\n    backConfig.pinNumber = ALT_BUTTON_PIN;\n    backConfig.activeLow = ALT_BUTTON_ACTIVE_LOW;\n    backConfig.activePullup = ALT_BUTTON_ACTIVE_PULLUP;\n    backConfig.pullupSense = pullup_sense;\n    backConfig.intRoutine = []() {\n        BackButtonThread->userButton.tick();\n        BackButtonThread->setIntervalFromNow(0);\n        runASAP = true;\n        BaseType_t higherWake = 0;\n        concurrency::mainDelay.interruptFromISR(&higherWake);\n    };\n    backConfig.singlePress = INPUT_BROKER_ALT_PRESS;\n    backConfig.longPress = INPUT_BROKER_ALT_LONG;\n    backConfig.longPressTime = 500;\n    BackButtonThread->initButton(backConfig);\n#endif\n\n#if defined(BUTTON_PIN)\n#if defined(USERPREFS_BUTTON_PIN)\n    int _pinNum = config.device.button_gpio ? config.device.button_gpio : USERPREFS_BUTTON_PIN;\n#else\n    int _pinNum = config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN;\n#endif\n#ifndef BUTTON_ACTIVE_LOW\n#define BUTTON_ACTIVE_LOW true\n#endif\n#ifndef BUTTON_ACTIVE_PULLUP\n#define BUTTON_ACTIVE_PULLUP true\n#endif\n\n    // Buttons. Moved here cause we need NodeDB to be initialized\n    // If your variant.h has a BUTTON_PIN defined, go ahead and define BUTTON_ACTIVE_LOW and BUTTON_ACTIVE_PULLUP\n    UserButtonThread = new ButtonThread(\"UserButton\");\n    if (screen) {\n        ButtonConfig userConfig;\n        userConfig.pinNumber = (uint8_t)_pinNum;\n        userConfig.activeLow = BUTTON_ACTIVE_LOW;\n        userConfig.activePullup = BUTTON_ACTIVE_PULLUP;\n        userConfig.pullupSense = pullup_sense;\n        userConfig.intRoutine = []() {\n            UserButtonThread->userButton.tick();\n            UserButtonThread->setIntervalFromNow(0);\n            runASAP = true;\n            BaseType_t higherWake = 0;\n            concurrency::mainDelay.interruptFromISR(&higherWake);\n        };\n        userConfig.singlePress = INPUT_BROKER_USER_PRESS;\n        userConfig.longPress = INPUT_BROKER_SELECT;\n        userConfig.longPressTime = 500;\n        userConfig.longLongPress = INPUT_BROKER_SHUTDOWN;\n        UserButtonThread->initButton(userConfig);\n    } else {\n        ButtonConfig userConfigNoScreen;\n        userConfigNoScreen.pinNumber = (uint8_t)_pinNum;\n        userConfigNoScreen.activeLow = BUTTON_ACTIVE_LOW;\n        userConfigNoScreen.activePullup = BUTTON_ACTIVE_PULLUP;\n        userConfigNoScreen.pullupSense = pullup_sense;\n        userConfigNoScreen.intRoutine = []() {\n            UserButtonThread->userButton.tick();\n            UserButtonThread->setIntervalFromNow(0);\n            runASAP = true;\n            BaseType_t higherWake = 0;\n            concurrency::mainDelay.interruptFromISR(&higherWake);\n        };\n        userConfigNoScreen.singlePress = INPUT_BROKER_USER_PRESS;\n        userConfigNoScreen.longPress = INPUT_BROKER_NONE;\n        userConfigNoScreen.longPressTime = 500;\n        userConfigNoScreen.longLongPress = INPUT_BROKER_SHUTDOWN;\n        userConfigNoScreen.doublePress = INPUT_BROKER_SEND_PING;\n        userConfigNoScreen.triplePress = INPUT_BROKER_GPS_TOGGLE;\n        UserButtonThread->initButton(userConfigNoScreen);\n    }\n#endif\n#endif\n\n#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n#if defined(T_LORA_PAGER)\n        // use a special FSM based rotary encoder version for T-LoRa Pager\n        rotaryEncoderImpl = new RotaryEncoderImpl();\n        if (!rotaryEncoderImpl->init()) {\n            delete rotaryEncoderImpl;\n            rotaryEncoderImpl = nullptr;\n        }\n#elif defined(INPUTDRIVER_ENCODER_TYPE) && (INPUTDRIVER_ENCODER_TYPE == 2)\n        upDownInterruptImpl1 = new UpDownInterruptImpl1();\n        if (!upDownInterruptImpl1->init()) {\n            delete upDownInterruptImpl1;\n            upDownInterruptImpl1 = nullptr;\n        }\n#else\n        rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1();\n        if (!rotaryEncoderInterruptImpl1->init()) {\n            delete rotaryEncoderInterruptImpl1;\n            rotaryEncoderInterruptImpl1 = nullptr;\n        }\n#endif\n        cardKbI2cImpl = new CardKbI2cImpl();\n        cardKbI2cImpl->init();\n#if defined(M5STACK_UNITC6L)\n        i2cButton = new i2cButtonThread(\"i2cButtonThread\");\n#endif\n#ifdef INPUTBROKER_MATRIX_TYPE\n        kbMatrixImpl = new KbMatrixImpl();\n        kbMatrixImpl->init();\n#endif // INPUTBROKER_MATRIX_TYPE\n#ifdef INPUTBROKER_SERIAL_TYPE\n        aSerialKeyboardImpl = new SerialKeyboardImpl();\n        aSerialKeyboardImpl->init();\n#endif // INPUTBROKER_MATRIX_TYPE\n    }\n#endif // HAS_BUTTON\n#if ARCH_PORTDUINO\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR && portduino_config.i2cdev != \"\") {\n        seesawRotary = new SeesawRotary(\"SeesawRotary\");\n        if (!seesawRotary->init()) {\n            delete seesawRotary;\n            seesawRotary = nullptr;\n        }\n        aLinuxInputImpl = new LinuxInputImpl();\n        aLinuxInputImpl->init();\n    }\n#endif\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER && HAS_TRACKBALL\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        trackballInterruptImpl1 = new TrackballInterruptImpl1();\n        trackballInterruptImpl1->init(TB_DOWN, TB_UP, TB_LEFT, TB_RIGHT, TB_PRESS);\n    }\n#endif\n#ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE\n    expressLRSFiveWayInput = new ExpressLRSFiveWay();\n#endif\n}\n"
  },
  {
    "path": "src/input/InputBroker.h",
    "content": "#pragma once\n\n#include \"Observer.h\"\n#include \"concurrency/OSThread.h\"\n#include \"freertosinc.h\"\n\n#ifdef InputBrokerDebug\n#define LOG_INPUT(...) LOG_DEBUG(__VA_ARGS__)\n#else\n#define LOG_INPUT(...)\n#endif\n\nenum input_broker_event {\n    INPUT_BROKER_NONE = 0,\n    INPUT_BROKER_SELECT = 10,\n    INPUT_BROKER_SELECT_LONG = 11,\n    INPUT_BROKER_UP_LONG = 12,\n    INPUT_BROKER_DOWN_LONG = 13,\n    INPUT_BROKER_UP = 17,\n    INPUT_BROKER_DOWN = 18,\n    INPUT_BROKER_LEFT = 19,\n    INPUT_BROKER_RIGHT = 20,\n    INPUT_BROKER_CANCEL = 24,\n    INPUT_BROKER_BACK = 27,\n    INPUT_BROKER_USER_PRESS,\n    INPUT_BROKER_ALT_PRESS,\n    INPUT_BROKER_ALT_LONG,\n    INPUT_BROKER_SHUTDOWN = 0x9b,\n    INPUT_BROKER_GPS_TOGGLE = 0x9e,\n    INPUT_BROKER_SEND_PING = 0xaf,\n    INPUT_BROKER_FN_F1 = 0xf1,\n    INPUT_BROKER_FN_F2 = 0xf2,\n    INPUT_BROKER_FN_F3 = 0xf3,\n    INPUT_BROKER_FN_F4 = 0xf4,\n    INPUT_BROKER_FN_F5 = 0xf5,\n    INPUT_BROKER_MATRIXKEY = 0xFE,\n    INPUT_BROKER_ANYKEY = 0xff\n\n};\n\n#define INPUT_BROKER_MSG_BRIGHTNESS_UP 0x11\n#define INPUT_BROKER_MSG_BRIGHTNESS_DOWN 0x12\n#define INPUT_BROKER_MSG_REBOOT 0x90\n#define INPUT_BROKER_MSG_MUTE_TOGGLE 0xac\n#define INPUT_BROKER_MSG_FN_SYMBOL_ON 0xf1\n#define INPUT_BROKER_MSG_FN_SYMBOL_OFF 0xf2\n#define INPUT_BROKER_MSG_BLUETOOTH_TOGGLE 0xAA\n#define INPUT_BROKER_MSG_TAB 0x09\n#define INPUT_BROKER_MSG_EMOTE_LIST 0x8F\n\ntypedef struct _InputEvent {\n    const char *source;\n    input_broker_event inputEvent;\n    unsigned char kbchar;\n    uint16_t touchX;\n    uint16_t touchY;\n} InputEvent;\n\nclass InputPollable\n{\n  public:\n    virtual ~InputPollable() = default;\n    virtual void pollOnce() = 0;\n};\n\nclass InputBroker : public Observable<const InputEvent *>\n{\n    CallbackObserver<InputBroker, const InputEvent *> inputEventObserver =\n        CallbackObserver<InputBroker, const InputEvent *>(this, &InputBroker::handleInputEvent);\n\n  public:\n    InputBroker();\n    bool menuMode = true;\n    void registerSource(Observable<const InputEvent *> *source);\n    void injectInputEvent(const InputEvent *event) { handleInputEvent(event); }\n#if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)\n    void requestPollSoon(InputPollable *pollable);\n    void queueInputEvent(const InputEvent *event);\n    void processInputEventQueue();\n#endif\n    void Init();\n\n  protected:\n    int handleInputEvent(const InputEvent *event);\n\n  private:\n#if defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)\n    QueueHandle_t inputEventQueue;\n    QueueHandle_t pollSoonQueue;\n    TaskHandle_t pollSoonTask;\n    static void pollSoonWorker(void *p);\n#endif\n};\n\nextern InputBroker *inputBroker;\nextern bool runASAP;"
  },
  {
    "path": "src/input/LinuxInput.cpp",
    "content": "#include \"configuration.h\"\n#if ARCH_PORTDUINO\n#include \"LinuxInput.h\"\n#include \"platform/portduino/PortduinoGlue.h\"\n#include <assert.h>\n#include <ctype.h>\n#include <errno.h>\n#include <fcntl.h>\n#include <linux/input.h>\n#include <main.h>\n#include <stdint.h>\n#include <stdio.h>\n#include <string>\n#include <sys/epoll.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n// Inspired by https://github.com/librerpi/rpi-tools/blob/master/keyboard-proxy/main.c which is GPL-v2\n\nLinuxInput::LinuxInput(const char *name) : concurrency::OSThread(name)\n{\n    this->_originName = name;\n}\n\nvoid LinuxInput::deInit()\n{\n    if (fd >= 0)\n        close(fd);\n}\n\nint32_t LinuxInput::runOnce()\n{\n\n    if (firstTime) {\n        if (portduino_config.keyboardDevice == \"\")\n            return disable();\n        fd = open(portduino_config.keyboardDevice.c_str(), O_RDWR);\n        if (fd < 0)\n            return disable();\n        ret = ioctl(fd, EVIOCGRAB, (void *)1);\n        if (ret != 0)\n            return disable();\n\n        epollfd = epoll_create1(0);\n        assert(epollfd >= 0);\n\n        ev.events = EPOLLIN;\n        ev.data.fd = fd;\n        if (epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev)) {\n            perror(\"unable to epoll add\");\n            return disable();\n        }\n        kb_found = true;\n        // This is the first time the OSThread library has called this function, so do port setup\n        firstTime = 0;\n    }\n\n    int nfds = epoll_wait(epollfd, events, MAX_EVENTS, 1);\n    if (nfds < 0) {\n        printf(\"%d \", nfds);\n        perror(\"epoll_wait failed\");\n        return disable();\n    } else if (nfds == 0) {\n        return 50;\n    }\n\n    int keys = 0;\n    memset(report, 0, 8);\n    for (int i = 0; i < nfds; i++) {\n\n        struct input_event ev[64];\n        int rd = read(events[i].data.fd, ev, sizeof(ev));\n        assert(rd > ((signed int)sizeof(struct input_event)));\n        for (int j = 0; j < rd / ((signed int)sizeof(struct input_event)); j++) {\n            InputEvent e = {};\n            e.inputEvent = INPUT_BROKER_NONE;\n            e.source = this->_originName;\n            e.kbchar = 0;\n            unsigned int type, code;\n            type = ev[j].type;\n            code = ev[j].code;\n            int value = ev[j].value;\n            // printf(\"Event: time %ld.%06ld, \", ev[j].time.tv_sec, ev[j].time.tv_usec);\n\n            if (type == EV_KEY) {\n                uint8_t mod = 0;\n\n                switch (code) {\n                case KEY_LEFTCTRL:\n                    mod = 0x01;\n                    break;\n                case KEY_RIGHTCTRL:\n                    mod = 0x10;\n                    break;\n                case KEY_LEFTSHIFT:\n                    mod = 0x02;\n                    break;\n                case KEY_RIGHTSHIFT:\n                    mod = 0x20;\n                    break;\n                case KEY_LEFTALT:\n                    mod = 0x04;\n                    break;\n                case KEY_RIGHTALT:\n                    mod = 0x40;\n                    break;\n                case KEY_LEFTMETA:\n                    mod = 0x08;\n                    break;\n                }\n                if (value == 1) {\n                    switch (code) {\n                    case KEY_LEFTCTRL:\n                        mod = 0x01;\n                        break;\n                    case KEY_RIGHTCTRL:\n                        mod = 0x10;\n                        break;\n                    case KEY_LEFTSHIFT:\n                        mod = 0x02;\n                        break;\n                    case KEY_RIGHTSHIFT:\n                        mod = 0x20;\n                        break;\n                    case KEY_LEFTALT:\n                        mod = 0x04;\n                        break;\n                    case KEY_RIGHTALT:\n                        mod = 0x40;\n                        break;\n                    case KEY_LEFTMETA:\n                        mod = 0x08;\n                        break;\n                    case KEY_ESC: // ESC\n                        e.inputEvent = INPUT_BROKER_CANCEL;\n                        break;\n                    case KEY_BACK: // Back\n                        e.inputEvent = INPUT_BROKER_BACK;\n                        // e.kbchar = key;\n                        break;\n\n                    case KEY_UP: // Up\n                        e.inputEvent = INPUT_BROKER_UP;\n                        break;\n                    case KEY_DOWN: // Down\n                        e.inputEvent = INPUT_BROKER_DOWN;\n                        break;\n                    case KEY_LEFT: // Left\n                        e.inputEvent = INPUT_BROKER_LEFT;\n                        break;\n                        e.kbchar = INPUT_BROKER_LEFT;\n                    case KEY_RIGHT: // Right\n                        e.inputEvent = INPUT_BROKER_RIGHT;\n                        break;\n                        e.kbchar = 0;\n                    case KEY_ENTER: // Enter\n                        e.inputEvent = INPUT_BROKER_SELECT;\n                        break;\n                    case KEY_POWER:\n                        system(\"poweroff\");\n                        break;\n                    default: // all other keys\n                        if (keymap[code]) {\n                            e.inputEvent = INPUT_BROKER_ANYKEY;\n                            e.kbchar = keymap[code];\n                        }\n                        break;\n                    }\n                }\n                if (ev[j].value) {\n                    modifiers |= mod;\n                } else {\n                    modifiers &= ~mod;\n                }\n                report[0] = modifiers;\n            }\n            if (e.inputEvent != INPUT_BROKER_NONE) {\n                if (e.inputEvent == INPUT_BROKER_ANYKEY && (modifiers && 0x22))\n                    e.kbchar = uppers[e.kbchar]; // doesn't get punctuation. Meh.\n                this->notifyObservers(&e);\n            }\n        }\n    }\n\n    return 50; // Keyscan every 50msec to avoid key bounce\n}\n\n#endif"
  },
  {
    "path": "src/input/LinuxInput.h",
    "content": "#pragma once\n#if ARCH_PORTDUINO\n#include \"InputBroker.h\"\n#include \"concurrency/OSThread.h\"\n#include <assert.h>\n#include <errno.h>\n#include <fcntl.h>\n#include <linux/input.h>\n#include <map>\n#include <stdint.h>\n#include <stdio.h>\n#include <string.h>\n#include <sys/epoll.h>\n#include <sys/stat.h>\n#include <sys/types.h>\n#include <unistd.h>\n\n#define MAX_EVENTS 10\n\nclass LinuxInput : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit LinuxInput(const char *name);\n    void deInit(); // Strictly for cleanly \"rebooting\" the binary on native\n\n  protected:\n    virtual int32_t runOnce() override;\n\n  private:\n    const char *_originName;\n    bool firstTime = 1;\n    int shift = 0;\n    char key = 0;\n    char prevkey = 0;\n\n    InputEvent eventqueue[50]; // The Linux API will return multiple keypresses at a time. Queue them to not miss any.\n    int queue_length = 0;\n    int queue_progress = 0;\n\n    struct epoll_event events[MAX_EVENTS];\n    int fd = -1;\n    int ret;\n    uint8_t report[8];\n    int epollfd;\n    struct epoll_event ev;\n    uint8_t modifiers = 0;\n    std::map<int, char> keymap{\n        {KEY_A, 'a'},         {KEY_B, 'b'},           {KEY_C, 'c'},         {KEY_D, 'd'},          {KEY_E, 'e'},\n        {KEY_F, 'f'},         {KEY_G, 'g'},           {KEY_H, 'h'},         {KEY_I, 'i'},          {KEY_J, 'j'},\n        {KEY_K, 'k'},         {KEY_L, 'l'},           {KEY_M, 'm'},         {KEY_N, 'n'},          {KEY_O, 'o'},\n        {KEY_P, 'p'},         {KEY_Q, 'q'},           {KEY_R, 'r'},         {KEY_S, 's'},          {KEY_T, 't'},\n        {KEY_U, 'u'},         {KEY_V, 'v'},           {KEY_W, 'w'},         {KEY_X, 'x'},          {KEY_Y, 'y'},\n        {KEY_Z, 'z'},         {KEY_BACKSPACE, 0x08},  {KEY_SPACE, ' '},     {KEY_1, '1'},          {KEY_2, '2'},\n        {KEY_3, '3'},         {KEY_4, '4'},           {KEY_5, '5'},         {KEY_6, '6'},          {KEY_7, '7'},\n        {KEY_8, '8'},         {KEY_9, '9'},           {KEY_0, '0'},         {KEY_DOT, '.'},        {KEY_COMMA, ','},\n        {KEY_MINUS, '-'},     {KEY_EQUAL, '='},       {KEY_LEFTBRACE, '['}, {KEY_RIGHTBRACE, ']'}, {KEY_BACKSLASH, '\\\\'},\n        {KEY_SEMICOLON, ';'}, {KEY_APOSTROPHE, '\\''}, {KEY_SLASH, '/'},     {KEY_TAB, 0x09}};\n    std::map<char, char> uppers{{'a', 'A'}, {'b', 'B'}, {'c', 'C'},  {'d', 'D'}, {'e', 'E'},  {'f', 'F'}, {'g', 'G'}, {'h', 'H'},\n                                {'i', 'I'}, {'j', 'J'}, {'k', 'K'},  {'l', 'L'}, {'m', 'M'},  {'n', 'N'}, {'o', 'O'}, {'p', 'P'},\n                                {'q', 'Q'}, {'r', 'R'}, {'s', 'S'},  {'t', 'T'}, {'u', 'U'},  {'v', 'V'}, {'w', 'W'}, {'x', 'X'},\n                                {'y', 'Y'}, {'z', 'Z'}, {'1', '!'},  {'2', '@'}, {'3', '#'},  {'4', '$'}, {'5', '%'}, {'6', '^'},\n                                {'7', '&'}, {'8', '*'}, {'9', '('},  {'0', ')'}, {'.', '>'},  {',', '<'}, {'-', '_'}, {'=', '+'},\n                                {'[', '{'}, {']', '}'}, {'\\\\', '|'}, {';', ':'}, {'\\'', '\"'}, {'/', '?'}};\n};\n#endif"
  },
  {
    "path": "src/input/LinuxInputImpl.cpp",
    "content": "#include \"configuration.h\"\n#if ARCH_PORTDUINO\n#include \"InputBroker.h\"\n#include \"LinuxInputImpl.h\"\n\nLinuxInputImpl *aLinuxInputImpl;\n\nLinuxInputImpl::LinuxInputImpl() : LinuxInput(\"LinuxInput\") {}\n\nvoid LinuxInputImpl::init()\n{\n    inputBroker->registerSource(this);\n}\n\n#endif"
  },
  {
    "path": "src/input/LinuxInputImpl.h",
    "content": "#ifdef ARCH_PORTDUINO\n#pragma once\n#include \"LinuxInput.h\"\n#include \"main.h\"\n\n/**\n * @brief The idea behind this class to have static methods for the event handlers.\n *      Check attachInterrupt() at RotaryEncoderInteruptBase.cpp\n *      Technically you can have as many rotary encoders hardver attached\n *      to your device as you wish, but you always need to have separate event\n *      handlers, thus you need to have a RotaryEncoderInterrupt implementation.\n */\n\nclass LinuxInputImpl : public LinuxInput\n{\n  public:\n    LinuxInputImpl();\n    void init();\n};\nextern LinuxInputImpl *aLinuxInputImpl;\n#endif"
  },
  {
    "path": "src/input/MPR121Keyboard.cpp",
    "content": "// Based on the BBQ10 Keyboard\n\n#include \"MPR121Keyboard.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n\n#define _MPR121_REG_KEY 0x5a\n\n#define _MPR121_REG_TOUCH_STATUS 0x00\n#define _MPR121_REG_ELECTRODE_FILTERED_DATA\n#define _MPR121_REG_BASELINE_VALUE 0x1E\n\n// Baseline filters\n#define _MPR121_REG_MAX_HALF_DELTA_RISING 0x2B\n#define _MPR121_REG_NOISE_HALF_DELTA_RISING 0x2C\n#define _MPR121_REG_NOISE_COUNT_LIMIT_RISING 0x2D\n#define _MPR121_REG_FILTER_DELAY_COUNT_RISING 0x2E\n#define _MPR121_REG_MAX_HALF_DELTA_FALLING 0x2F\n#define _MPR121_REG_NOISE_HALF_DELTA_FALLING 0x30\n#define _MPR121_REG_NOISE_COUNT_LIMIT_FALLING 0x31\n#define _MPR121_REG_FILTER_DELAY_COUNT_FALLING 0x32\n#define _MPR121_REG_NOISE_HALF_DELTA_TOUCHED 0x33\n#define _MPR121_REG_NOISE_COUNT_LIMIT_TOUCHED 0x34\n#define _MPR121_REG_FILTER_DELAY_COUNT_TOUCHED 0x35\n\n#define _MPR121_REG_TOUCH_THRESHOLD 0x41   // First input, +2 for subsequent\n#define _MPR121_REG_RELEASE_THRESHOLD 0x42 // First input, +2 for subsequent\n#define _MPR121_REG_DEBOUNCE 0x5B\n#define _MPR121_REG_CONFIG1 0x5C\n#define _MPR121_REG_CONFIG2 0x5D\n#define _MPR121_REG_ELECTRODE_CONFIG 0x5E\n#define _MPR121_REG_AUTOCONF_CTRL0 0x7B\n#define _MPR121_REG_AUTOCONF_CTRL1 0x7C\n#define _MPR121_REG_SOFT_RESET 0x80\n\n#define _KEY_MASK 0x0FFF // Key mask for the first 12 bits\n#define _NUM_KEYS 12\n\n#define ECR_CALIBRATION_TRACK_FROM_ZERO (0 << 6)\n#define ECR_CALIBRATION_LOCK (1 << 6)\n#define ECR_CALIBRATION_TRACK_FROM_PARTIAL_FILTER (2 << 6) // Recommended Typical Mode\n#define ECR_CALIBRATION_TRACK_FROM_FULL_FILTER (3 << 6)\n#define ECR_PROXIMITY_DETECTION_OFF (0 << 0) // Not using proximity detection\n#define ECR_TOUCH_DETECTION_12CH (12 << 0)   // Using all 12 channels\n\n#define MPR121_NONE 0x00\n#define MPR121_REBOOT 0x90\n#define MPR121_LEFT 0xb4\n#define MPR121_UP 0xb5\n#define MPR121_DOWN 0xb6\n#define MPR121_RIGHT 0xb7\n#define MPR121_ESC 0x1b\n#define MPR121_BSP 0x08\n#define MPR121_SELECT 0x0d\n\n#define MPR121_FN_ON 0xf1\n#define MPR121_FN_OFF 0xf2\n\n#define LONG_PRESS_THRESHOLD 2000\n#define MULTI_TAP_THRESHOLD 2000\n\nuint8_t TapMod[12] = {1, 2, 1, 13, 7, 7, 7, 7, 7, 9, 7, 9}; // Num chars per key, Modulus for rotating through characters\n\nunsigned char MPR121_TapMap[12][13] = {{MPR121_BSP},\n                                       {'0', ' '},\n                                       {MPR121_SELECT},\n                                       {'1', '.', ',', '?', '!', ':', ';', '-', '_', '\\\\', '/', '(', ')'},\n                                       {'2', 'a', 'b', 'c', 'A', 'B', 'C'},\n                                       {'3', 'd', 'e', 'f', 'D', 'E', 'F'},\n                                       {'4', 'g', 'h', 'i', 'G', 'H', 'I'},\n                                       {'5', 'j', 'k', 'l', 'J', 'K', 'L'},\n                                       {'6', 'm', 'n', 'o', 'M', 'N', 'O'},\n                                       {'7', 'p', 'q', 'r', 's', 'P', 'Q', 'R', 'S'},\n                                       {'8', 't', 'u', 'v', 'T', 'U', 'V'},\n                                       {'9', 'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z'}};\n\nunsigned char MPR121_LongPressMap[12] = {MPR121_ESC,  ' ',         MPR121_NONE,  MPR121_NONE, MPR121_UP,   MPR121_NONE,\n                                         MPR121_LEFT, MPR121_NONE, MPR121_RIGHT, MPR121_NONE, MPR121_DOWN, MPR121_NONE};\n\n// Translation map from left to right, top to bottom layout to a more convenient layout to manufacture, matching the\n// https://www.amazon.com.au/Capacitive-Sensitive-Sensitivity-Replacement-Traditional/dp/B0CTJD5KW9/ref=pd_ci_mcx_mh_mcx_views_0_title?th=1\n/*uint8_t MPR121_KeyMap[12] = {\n    9, 6, 3, 0,\n    10, 7, 4, 1,\n    11, 8, 5, 2\n};*/\n// Rotated Layout\nuint8_t MPR121_KeyMap[12] = {2, 5, 8, 11, 1, 4, 7, 10, 0, 3, 6, 9};\n\nMPR121Keyboard::MPR121Keyboard() : m_wire(nullptr), m_addr(0), readCallback(nullptr), writeCallback(nullptr)\n{\n    // LOG_DEBUG(\"MPR121 @ %02x\", m_addr);\n    state = Init;\n    last_key = UINT8_MAX;\n    last_tap = 0L;\n    char_idx = 0;\n    queue = \"\";\n}\n\nvoid MPR121Keyboard::begin(uint8_t addr, TwoWire *wire)\n{\n    m_addr = addr;\n    m_wire = wire;\n\n    m_wire->begin();\n\n    reset();\n}\n\nvoid MPR121Keyboard::begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr)\n{\n    m_addr = addr;\n    m_wire = nullptr;\n    writeCallback = w;\n    readCallback = r;\n    reset();\n}\n\nvoid MPR121Keyboard::reset()\n{\n    LOG_DEBUG(\"MPR121 Reset\");\n    // Trigger a MPR121 Soft Reset\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(_MPR121_REG_SOFT_RESET);\n        m_wire->endTransmission();\n    }\n    if (writeCallback) {\n        uint8_t data = 0;\n        writeCallback(m_addr, _MPR121_REG_SOFT_RESET, &data, 0);\n    }\n    delay(100);\n    // Reset Electrode Configuration to 0x00, Stop Mode\n    writeRegister(_MPR121_REG_ELECTRODE_CONFIG, 0x00);\n    delay(100);\n\n    LOG_DEBUG(\"MPR121 Configuring\");\n    // Set touch release thresholds\n    for (uint8_t i = 0; i < 12; i++) {\n        // Set touch threshold\n        writeRegister(_MPR121_REG_TOUCH_THRESHOLD + (i * 2), 10);\n        delay(20);\n        // Set release threshold\n        writeRegister(_MPR121_REG_RELEASE_THRESHOLD + (i * 2), 5);\n        delay(20);\n    }\n    // Configure filtering and baseline registers\n    writeRegister(_MPR121_REG_MAX_HALF_DELTA_RISING, 0x05);\n    delay(20);\n    writeRegister(_MPR121_REG_MAX_HALF_DELTA_FALLING, 0x01);\n    delay(20);\n    writeRegister(_MPR121_REG_NOISE_HALF_DELTA_RISING, 0x01);\n    delay(20);\n    writeRegister(_MPR121_REG_NOISE_HALF_DELTA_FALLING, 0x05);\n    delay(20);\n    writeRegister(_MPR121_REG_NOISE_HALF_DELTA_TOUCHED, 0x00);\n    delay(20);\n    writeRegister(_MPR121_REG_NOISE_COUNT_LIMIT_RISING, 0x05);\n    delay(20);\n    writeRegister(_MPR121_REG_NOISE_COUNT_LIMIT_FALLING, 0x01);\n    delay(20);\n    writeRegister(_MPR121_REG_NOISE_COUNT_LIMIT_TOUCHED, 0x00);\n    delay(20);\n    writeRegister(_MPR121_REG_FILTER_DELAY_COUNT_RISING, 0x00);\n    delay(20);\n    writeRegister(_MPR121_REG_FILTER_DELAY_COUNT_FALLING, 0x00);\n    delay(20);\n    writeRegister(_MPR121_REG_FILTER_DELAY_COUNT_TOUCHED, 0x00);\n    delay(20);\n    writeRegister(_MPR121_REG_AUTOCONF_CTRL0, 0x04); // Auto-config enable\n    delay(20);\n    writeRegister(_MPR121_REG_AUTOCONF_CTRL1, 0x00); // Ensure no auto-config interrupt\n    delay(20);\n    writeRegister(_MPR121_REG_DEBOUNCE, 0x02);\n    delay(20);\n    writeRegister(_MPR121_REG_CONFIG1, 0x20);\n    delay(20);\n    writeRegister(_MPR121_REG_CONFIG2, 0x21);\n    delay(20);\n    // Enter run mode by setting partial filter calibration tracking, disable proximity detection, enable 12 channels\n    writeRegister(_MPR121_REG_ELECTRODE_CONFIG,\n                  ECR_CALIBRATION_TRACK_FROM_FULL_FILTER | ECR_PROXIMITY_DETECTION_OFF | ECR_TOUCH_DETECTION_12CH);\n    delay(100);\n    LOG_DEBUG(\"MPR121 Run\");\n    state = Idle;\n}\n\nvoid MPR121Keyboard::attachInterrupt(uint8_t pin, void (*func)(void)) const\n{\n    pinMode(pin, INPUT_PULLUP);\n    ::attachInterrupt(digitalPinToInterrupt(pin), func, RISING);\n}\n\nvoid MPR121Keyboard::detachInterrupt(uint8_t pin) const\n{\n    ::detachInterrupt(pin);\n}\n\nuint8_t MPR121Keyboard::status() const\n{\n    return readRegister16(_MPR121_REG_KEY);\n}\n\nuint8_t MPR121Keyboard::keyCount() const\n{\n    // Read the key register\n    uint16_t keyRegister = readRegister16(_MPR121_REG_KEY);\n    return keyCount(keyRegister);\n}\n\nuint8_t MPR121Keyboard::keyCount(uint16_t value) const\n{\n    // Mask the first 12 bits\n    uint16_t buttonState = value & _KEY_MASK;\n\n    // Count how many bits are set to 1 (i.e., how many buttons are pressed)\n    uint8_t numButtonsPressed = 0;\n    for (uint8_t i = 0; i < 12; ++i) {\n        if (buttonState & (1 << i)) {\n            numButtonsPressed++;\n        }\n    }\n\n    return numButtonsPressed;\n}\n\nbool MPR121Keyboard::hasEvent()\n{\n    return queue.length() > 0;\n}\n\nvoid MPR121Keyboard::queueEvent(char next)\n{\n    if (next == MPR121_NONE) {\n        return;\n    }\n    queue.concat(next);\n}\n\nchar MPR121Keyboard::dequeueEvent()\n{\n    if (queue.length() < 1) {\n        return MPR121_NONE;\n    }\n    char next = queue.charAt(0);\n    queue.remove(0, 1);\n    return next;\n}\n\nvoid MPR121Keyboard::trigger()\n{\n    // Intended to fire in response to an interrupt from the MPR121 or a longpress callback\n    // Only functional if not in Init state\n    if (state != Init) {\n        // Read the key register\n        uint16_t keyRegister = readRegister16(_MPR121_REG_KEY);\n        uint8_t keysPressed = keyCount(keyRegister);\n        if (keysPressed == 0) {\n            // No buttons pressed\n            if (state == Held)\n                released();\n            state = Idle;\n            return;\n        }\n        if (keysPressed == 1) {\n            // No buttons pressed\n            if (state == Held || state == HeldLong)\n                held(keyRegister);\n            if (state == Idle)\n                pressed(keyRegister);\n            return;\n        }\n        if (keysPressed > 1) {\n            // Multipress\n            state = Busy;\n            return;\n        }\n    } else {\n        reset();\n    }\n}\n\nvoid MPR121Keyboard::pressed(uint16_t keyRegister)\n{\n    if (state == Init || state == Busy) {\n        return;\n    }\n    if (keyCount(keyRegister) != 1) {\n        LOG_DEBUG(\"Multipress\");\n        return;\n    } else {\n        LOG_DEBUG(\"Pressed\");\n    }\n    uint16_t buttonState = keyRegister & _KEY_MASK;\n    uint8_t next_pin = 0;\n    for (uint8_t i = 0; i < 12; ++i) {\n        if (buttonState & (1 << i)) {\n            next_pin = i;\n        }\n    }\n    uint8_t next_key = MPR121_KeyMap[next_pin];\n    LOG_DEBUG(\"MPR121 Pin: %i Key: %i\", next_pin, next_key);\n    uint32_t now = millis();\n    int32_t tap_interval = now - last_tap;\n    if (tap_interval < 0) {\n        // long running, millis has overflowed.\n        last_tap = 0;\n        state = Busy;\n        return;\n    }\n    if (next_key != last_key || tap_interval > MULTI_TAP_THRESHOLD) {\n        char_idx = 0;\n    } else {\n        char_idx += 1;\n    }\n    last_key = next_key;\n    last_tap = now;\n    state = Held;\n    return;\n}\n\nvoid MPR121Keyboard::held(uint16_t keyRegister)\n{\n    if (state == Init || state == Busy) {\n        return;\n    }\n    if (keyCount(keyRegister) != 1) {\n        return;\n    }\n    LOG_DEBUG(\"Held\");\n    uint16_t buttonState = keyRegister & _KEY_MASK;\n    uint8_t next_key = 0;\n    for (uint8_t i = 0; i < 12; ++i) {\n        if (buttonState & (1 << i)) {\n            next_key = MPR121_KeyMap[i];\n        }\n    }\n    uint32_t now = millis();\n    int32_t held_interval = now - last_tap;\n    if (held_interval < 0 || next_key != last_key) {\n        // long running, millis has overflowed, or a key has been switched quickly...\n        last_tap = 0;\n        state = Busy;\n        return;\n    }\n    if (held_interval > LONG_PRESS_THRESHOLD) {\n        // Set state to heldlong, send a longpress, and reset the timer...\n        state = HeldLong; // heldlong will allow this function to still fire, but prevent a \"release\"\n        queueEvent(MPR121_LongPressMap[last_key]);\n        last_tap = now;\n        LOG_DEBUG(\"Long Press Key: %i Map: %i\", last_key, MPR121_LongPressMap[last_key]);\n    }\n    return;\n}\n\nvoid MPR121Keyboard::released()\n{\n    if (state != Held) {\n        return;\n    }\n    // would clear longpress callback... later.\n    if (last_key >= _NUM_KEYS) { // reset to idle if last_key out of bounds\n        last_key = UINT8_MAX;\n        state = Idle;\n        return;\n    }\n    LOG_DEBUG(\"Released\");\n    if (char_idx > 0 && TapMod[last_key] > 1) {\n        queueEvent(MPR121_BSP);\n        LOG_DEBUG(\"Multi Press, Backspace\");\n    }\n    queueEvent(MPR121_TapMap[last_key][(char_idx % TapMod[last_key])]);\n    LOG_DEBUG(\"Key Press: %i Index:%i if %i Map: %i\", last_key, char_idx, TapMod[last_key],\n              MPR121_TapMap[last_key][(char_idx % TapMod[last_key])]);\n}\n\nuint8_t MPR121Keyboard::readRegister8(uint8_t reg) const\n{\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(reg);\n        m_wire->endTransmission();\n\n        m_wire->requestFrom(m_addr, (uint8_t)1);\n        if (m_wire->available() < 1)\n            return 0;\n\n        return m_wire->read();\n    }\n    if (readCallback) {\n        uint8_t data;\n        readCallback(m_addr, reg, &data, 1);\n        return data;\n    }\n    return 0;\n}\n\nuint16_t MPR121Keyboard::readRegister16(uint8_t reg) const\n{\n    uint8_t data[2] = {0};\n    // uint8_t low = 0, high = 0;\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(reg);\n        m_wire->endTransmission();\n\n        m_wire->requestFrom(m_addr, (uint8_t)2);\n        if (m_wire->available() < 2)\n            return 0;\n        data[0] = m_wire->read();\n        data[1] = m_wire->read();\n    }\n    if (readCallback) {\n        readCallback(m_addr, reg, data, 2);\n    }\n    return (data[1] << 8) | data[0];\n}\n\nvoid MPR121Keyboard::writeRegister(uint8_t reg, uint8_t value)\n{\n    uint8_t data[2];\n    data[0] = reg;\n    data[1] = value;\n\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(data, sizeof(uint8_t) * 2);\n        m_wire->endTransmission();\n    }\n    if (writeCallback) {\n        writeCallback(m_addr, data[0], &(data[1]), 1);\n    }\n}\n"
  },
  {
    "path": "src/input/MPR121Keyboard.h",
    "content": "// Based on the BBQ10 Keyboard\n\n#include \"concurrency/NotifiedWorkerThread.h\"\n#include \"configuration.h\"\n#include <Wire.h>\n#include <main.h>\n\nclass MPR121Keyboard\n{\n  public:\n    typedef uint8_t (*i2c_com_fptr_t)(uint8_t dev_addr, uint8_t reg_addr, uint8_t *data, uint8_t len);\n\n    enum MPR121States { Init = 0, Idle, Held, HeldLong, Busy };\n\n    MPR121States state;\n\n    uint8_t last_key;\n    uint32_t last_tap;\n    uint8_t char_idx;\n\n    String queue;\n\n    MPR121Keyboard();\n\n    void begin(uint8_t addr = MPR121_KB_ADDR, TwoWire *wire = &Wire);\n\n    void begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr = MPR121_KB_ADDR);\n\n    void reset(void);\n\n    void attachInterrupt(uint8_t pin, void (*func)(void)) const;\n    void detachInterrupt(uint8_t pin) const;\n\n    void trigger(void);\n    void pressed(uint16_t value);\n    void held(uint16_t value);\n    void released(void);\n\n    uint8_t status(void) const;\n    uint8_t keyCount(void) const;\n    uint8_t keyCount(uint16_t value) const;\n\n    bool hasEvent(void);\n    char dequeueEvent(void);\n    void queueEvent(char);\n\n    uint8_t readRegister8(uint8_t reg) const;\n    uint16_t readRegister16(uint8_t reg) const;\n    void writeRegister(uint8_t reg, uint8_t value);\n\n  private:\n    TwoWire *m_wire;\n    uint8_t m_addr;\n    i2c_com_fptr_t readCallback;\n    i2c_com_fptr_t writeCallback;\n};"
  },
  {
    "path": "src/input/RotaryEncoderImpl.cpp",
    "content": "#ifdef T_LORA_PAGER\n\n#include \"RotaryEncoderImpl.h\"\n#include \"InputBroker.h\"\n#include \"RotaryEncoder.h\"\n#ifdef ARCH_ESP32\n#include \"sleep.h\"\n#endif\n\n#define ORIGIN_NAME \"RotaryEncoder\"\n\nRotaryEncoderImpl *rotaryEncoderImpl;\n\nRotaryEncoderImpl::RotaryEncoderImpl()\n{\n    rotary = nullptr;\n#ifdef ARCH_ESP32\n    isFirstInit = true;\n#endif\n}\n\nRotaryEncoderImpl::~RotaryEncoderImpl()\n{\n    LOG_DEBUG(\"RotaryEncoderImpl destructor\");\n    detachRotaryEncoderInterrupts();\n\n    if (rotary != nullptr) {\n        delete rotary;\n        rotary = nullptr;\n    }\n}\n\nbool RotaryEncoderImpl::init()\n{\n    if (!moduleConfig.canned_message.updown1_enabled || moduleConfig.canned_message.inputbroker_pin_a == 0 ||\n        moduleConfig.canned_message.inputbroker_pin_b == 0) {\n        // Input device is disabled.\n        return false;\n    }\n\n    eventCw = static_cast<input_broker_event>(moduleConfig.canned_message.inputbroker_event_cw);\n    eventCcw = static_cast<input_broker_event>(moduleConfig.canned_message.inputbroker_event_ccw);\n    eventPressed = static_cast<input_broker_event>(moduleConfig.canned_message.inputbroker_event_press);\n\n    if (rotary == nullptr) {\n        rotary = new RotaryEncoder(moduleConfig.canned_message.inputbroker_pin_a, moduleConfig.canned_message.inputbroker_pin_b,\n                                   moduleConfig.canned_message.inputbroker_pin_press);\n    }\n\n    attachRotaryEncoderInterrupts();\n\n#ifdef ARCH_ESP32\n    // Register callbacks for before and after lightsleep\n    // Used to detach and reattach interrupts\n    if (isFirstInit) {\n        lsObserver.observe(&notifyLightSleep);\n        lsEndObserver.observe(&notifyLightSleepEnd);\n        isFirstInit = false;\n    }\n#endif\n\n    LOG_INFO(\"RotaryEncoder initialized pins(%d, %d, %d), events(%d, %d, %d)\", moduleConfig.canned_message.inputbroker_pin_a,\n             moduleConfig.canned_message.inputbroker_pin_b, moduleConfig.canned_message.inputbroker_pin_press, eventCw, eventCcw,\n             eventPressed);\n    return true;\n}\n\nvoid RotaryEncoderImpl::pollOnce()\n{\n    InputEvent e{ORIGIN_NAME, INPUT_BROKER_NONE, 0, 0, 0};\n\n    static uint32_t lastPressed = millis();\n    if (rotary->readButton() == RotaryEncoder::ButtonState::BUTTON_PRESSED) {\n        if (lastPressed + 200 < millis()) {\n            LOG_DEBUG(\"Rotary event Press\");\n            lastPressed = millis();\n            e.inputEvent = this->eventPressed;\n            inputBroker->queueInputEvent(&e);\n        }\n    }\n\n    switch (rotary->process()) {\n    case RotaryEncoder::DIRECTION_CW:\n        LOG_DEBUG(\"Rotary event CW\");\n        e.inputEvent = this->eventCw;\n        inputBroker->queueInputEvent(&e);\n        break;\n    case RotaryEncoder::DIRECTION_CCW:\n        LOG_DEBUG(\"Rotary event CCW\");\n        e.inputEvent = this->eventCcw;\n        inputBroker->queueInputEvent(&e);\n        break;\n    default:\n        break;\n    }\n}\n\nvoid RotaryEncoderImpl::detachRotaryEncoderInterrupts()\n{\n    LOG_DEBUG(\"RotaryEncoderImpl detach button interrupts\");\n    if (interruptInstance == this) {\n        detachInterrupt(moduleConfig.canned_message.inputbroker_pin_a);\n        detachInterrupt(moduleConfig.canned_message.inputbroker_pin_b);\n        detachInterrupt(moduleConfig.canned_message.inputbroker_pin_press);\n        interruptInstance = nullptr;\n    } else {\n        LOG_WARN(\"RotaryEncoderImpl: interrupts already detached\");\n    }\n}\n\nvoid RotaryEncoderImpl::attachRotaryEncoderInterrupts()\n{\n    LOG_DEBUG(\"RotaryEncoderImpl attach button interrupts\");\n    if (rotary != nullptr && interruptInstance == nullptr) {\n        rotary->resetButton();\n\n        interruptInstance = this;\n        auto interruptHandler = []() { inputBroker->requestPollSoon(interruptInstance); };\n        attachInterrupt(moduleConfig.canned_message.inputbroker_pin_a, interruptHandler, CHANGE);\n        attachInterrupt(moduleConfig.canned_message.inputbroker_pin_b, interruptHandler, CHANGE);\n        attachInterrupt(moduleConfig.canned_message.inputbroker_pin_press, interruptHandler, CHANGE);\n    } else {\n        LOG_WARN(\"RotaryEncoderImpl: interrupts already attached\");\n    }\n}\n\n#ifdef ARCH_ESP32\n\nint RotaryEncoderImpl::beforeLightSleep(void *unused)\n{\n    detachRotaryEncoderInterrupts();\n    return 0; // Indicates success;\n}\n\nint RotaryEncoderImpl::afterLightSleep(esp_sleep_wakeup_cause_t cause)\n{\n    attachRotaryEncoderInterrupts();\n    return 0; // Indicates success;\n}\n#endif\n\nRotaryEncoderImpl *RotaryEncoderImpl::interruptInstance;\n\n#endif"
  },
  {
    "path": "src/input/RotaryEncoderImpl.h",
    "content": "#pragma once\n\n// This is a version of RotaryEncoder which is based on a debounce inherent FSM table (see RotaryEncoder library)\n\n#include \"InputBroker.h\"\n#include \"concurrency/OSThread.h\"\n#include \"mesh/NodeDB.h\"\n\nclass RotaryEncoder;\n\nclass RotaryEncoderImpl final : public InputPollable\n{\n  public:\n    RotaryEncoderImpl();\n    ~RotaryEncoderImpl() override;\n    bool init();\n    virtual void pollOnce() override;\n    // Disconnect and reconnect interrupts for light sleep\n#ifdef ARCH_ESP32\n    int beforeLightSleep(void *unused);\n    int afterLightSleep(esp_sleep_wakeup_cause_t cause);\n#endif\n\n  protected:\n    static RotaryEncoderImpl *interruptInstance;\n\n    input_broker_event eventCw = INPUT_BROKER_NONE;\n    input_broker_event eventCcw = INPUT_BROKER_NONE;\n    input_broker_event eventPressed = INPUT_BROKER_NONE;\n\n    RotaryEncoder *rotary;\n\n  private:\n#ifdef ARCH_ESP32\n    bool isFirstInit;\n#endif\n    void detachRotaryEncoderInterrupts();\n    void attachRotaryEncoderInterrupts();\n\n#ifdef ARCH_ESP32\n    // Get notified when lightsleep begins and ends\n    CallbackObserver<RotaryEncoderImpl, void *> lsObserver =\n        CallbackObserver<RotaryEncoderImpl, void *>(this, &RotaryEncoderImpl::beforeLightSleep);\n    CallbackObserver<RotaryEncoderImpl, esp_sleep_wakeup_cause_t> lsEndObserver =\n        CallbackObserver<RotaryEncoderImpl, esp_sleep_wakeup_cause_t>(this, &RotaryEncoderImpl::afterLightSleep);\n#endif\n};\n\nextern RotaryEncoderImpl *rotaryEncoderImpl;\n"
  },
  {
    "path": "src/input/RotaryEncoderInterruptBase.cpp",
    "content": "#include \"RotaryEncoderInterruptBase.h\"\n#include \"configuration.h\"\n\nRotaryEncoderInterruptBase::RotaryEncoderInterruptBase(const char *name) : concurrency::OSThread(name)\n{\n    this->_originName = name;\n}\n\nvoid RotaryEncoderInterruptBase::init(\n    uint8_t pinA, uint8_t pinB, uint8_t pinPress, input_broker_event eventCw, input_broker_event eventCcw,\n    input_broker_event eventPressed, input_broker_event eventPressedLong,\n    //    std::function<void(void)> onIntA, std::function<void(void)> onIntB, std::function<void(void)> onIntPress) :\n    void (*onIntA)(), void (*onIntB)(), void (*onIntPress)())\n{\n    this->_pinA = pinA;\n    this->_pinB = pinB;\n    this->_pinPress = pinPress;\n    this->_eventCw = eventCw;\n    this->_eventCcw = eventCcw;\n    this->_eventPressed = eventPressed;\n    this->_eventPressedLong = eventPressedLong;\n\n    bool isRAK = false;\n#ifdef RAK_4631\n    isRAK = true;\n#endif\n\n    if (!isRAK || pinPress != 0) {\n        pinMode(pinPress, INPUT_PULLUP);\n        attachInterrupt(pinPress, onIntPress, CHANGE);\n    }\n    if (!isRAK || this->_pinA != 0) {\n        pinMode(this->_pinA, INPUT_PULLUP);\n        attachInterrupt(this->_pinA, onIntA, CHANGE);\n    }\n    if (!isRAK || this->_pinA != 0) {\n        pinMode(this->_pinB, INPUT_PULLUP);\n        attachInterrupt(this->_pinB, onIntB, CHANGE);\n    }\n\n    this->rotaryLevelA = digitalRead(this->_pinA);\n    this->rotaryLevelB = digitalRead(this->_pinB);\n    LOG_INFO(\"Rotary initialized (%d, %d, %d)\", this->_pinA, this->_pinB, pinPress);\n}\n\nint32_t RotaryEncoderInterruptBase::runOnce()\n{\n    InputEvent e = {};\n    e.inputEvent = INPUT_BROKER_NONE;\n    e.source = this->_originName;\n    unsigned long now = millis();\n\n    // Handle press long/short detection\n    if (this->action == ROTARY_ACTION_PRESSED) {\n        bool buttonPressed = !digitalRead(_pinPress);\n        if (!pressDetected && buttonPressed) {\n            pressDetected = true;\n            pressStartTime = now;\n        }\n\n        if (pressDetected) {\n            uint32_t duration = now - pressStartTime;\n            if (!buttonPressed) {\n                // released -> if short press, send short, else already sent long\n                if (duration < LONG_PRESS_DURATION && now - lastPressKeyTime >= pressDebounceMs) {\n                    lastPressKeyTime = now;\n                    LOG_DEBUG(\"Rotary event Press short\");\n                    e.inputEvent = this->_eventPressed;\n                }\n                pressDetected = false;\n                pressStartTime = 0;\n                lastPressLongEventTime = 0;\n                this->action = ROTARY_ACTION_NONE;\n            } else if (duration >= LONG_PRESS_DURATION && this->_eventPressedLong != INPUT_BROKER_NONE &&\n                       lastPressLongEventTime == 0) {\n                // fire single-shot long press\n                lastPressLongEventTime = now;\n                LOG_DEBUG(\"Rotary event Press long\");\n                e.inputEvent = this->_eventPressedLong;\n            }\n        }\n    } else if (this->action == ROTARY_ACTION_CW) {\n        LOG_DEBUG(\"Rotary event CW\");\n        e.inputEvent = this->_eventCw;\n    } else if (this->action == ROTARY_ACTION_CCW) {\n        LOG_DEBUG(\"Rotary event CCW\");\n        e.inputEvent = this->_eventCcw;\n    }\n\n    if (e.inputEvent != INPUT_BROKER_NONE) {\n        this->notifyObservers(&e);\n    }\n\n    if (!pressDetected) {\n        this->action = ROTARY_ACTION_NONE;\n    } else if (now - pressStartTime < LONG_PRESS_DURATION) {\n        return (20); // keep checking for long/short until time expires\n    }\n\n    return INT32_MAX;\n}\n\nvoid RotaryEncoderInterruptBase::intPressHandler()\n{\n    this->action = ROTARY_ACTION_PRESSED;\n    setIntervalFromNow(20); // start checking for long/short\n}\n\nvoid RotaryEncoderInterruptBase::intAHandler()\n{\n    // CW rotation (at least on most common rotary encoders)\n    int currentLevelA = digitalRead(this->_pinA);\n    if (this->rotaryLevelA == currentLevelA) {\n        return;\n    }\n    this->rotaryLevelA = currentLevelA;\n    this->rotaryStateCCW = intHandler(currentLevelA == HIGH, this->rotaryLevelB, ROTARY_ACTION_CCW, this->rotaryStateCCW);\n}\n\nvoid RotaryEncoderInterruptBase::intBHandler()\n{\n    // CW rotation (at least on most common rotary encoders)\n    int currentLevelB = digitalRead(this->_pinB);\n    if (this->rotaryLevelB == currentLevelB) {\n        return;\n    }\n    this->rotaryLevelB = currentLevelB;\n    this->rotaryStateCW = intHandler(currentLevelB == HIGH, this->rotaryLevelA, ROTARY_ACTION_CW, this->rotaryStateCW);\n}\n\n/**\n * @brief Rotary action implementation.\n *   We assume, the following pin setup:\n *    A   --||\n *    GND --||]========\n *    B   --||\n *\n * @return The new state for rotary pin.\n */\nRotaryEncoderInterruptBaseStateType RotaryEncoderInterruptBase::intHandler(bool actualPinRaising, int otherPinLevel,\n                                                                           RotaryEncoderInterruptBaseActionType action,\n                                                                           RotaryEncoderInterruptBaseStateType state)\n{\n    RotaryEncoderInterruptBaseStateType newState = state;\n    if (actualPinRaising && (otherPinLevel == LOW)) {\n        if (state == ROTARY_EVENT_CLEARED) {\n            newState = ROTARY_EVENT_OCCURRED;\n            if ((this->action != ROTARY_ACTION_PRESSED) && (this->action != action)) {\n                this->action = action;\n            }\n        }\n    } else if (!actualPinRaising && (otherPinLevel == HIGH)) {\n        // Logic to prevent bouncing.\n        newState = ROTARY_EVENT_CLEARED;\n    }\n    setIntervalFromNow(ROTARY_DELAY); // TODO: this modifies a non-volatile variable!\n\n    return newState;\n}\n"
  },
  {
    "path": "src/input/RotaryEncoderInterruptBase.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"concurrency/OSThread.h\"\n#include \"mesh/NodeDB.h\"\n\nenum RotaryEncoderInterruptBaseStateType { ROTARY_EVENT_OCCURRED, ROTARY_EVENT_CLEARED };\n\nenum RotaryEncoderInterruptBaseActionType { ROTARY_ACTION_NONE, ROTARY_ACTION_PRESSED, ROTARY_ACTION_CW, ROTARY_ACTION_CCW };\n\nclass RotaryEncoderInterruptBase : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit RotaryEncoderInterruptBase(const char *name);\n    void init(uint8_t pinA, uint8_t pinB, uint8_t pinPress, input_broker_event eventCw, input_broker_event eventCcw,\n              input_broker_event eventPressed, input_broker_event eventPressedLong,\n              //        std::function<void(void)> onIntA, std::function<void(void)> onIntB, std::function<void(void)> onIntPress);\n              void (*onIntA)(), void (*onIntB)(), void (*onIntPress)());\n    void intPressHandler();\n    void intAHandler();\n    void intBHandler();\n\n  protected:\n    virtual int32_t runOnce() override;\n    RotaryEncoderInterruptBaseStateType intHandler(bool actualPinRaising, int otherPinLevel,\n                                                   RotaryEncoderInterruptBaseActionType action,\n                                                   RotaryEncoderInterruptBaseStateType state);\n\n    volatile RotaryEncoderInterruptBaseStateType rotaryStateCW = ROTARY_EVENT_CLEARED;\n    volatile RotaryEncoderInterruptBaseStateType rotaryStateCCW = ROTARY_EVENT_CLEARED;\n    volatile int rotaryLevelA = LOW;\n    volatile int rotaryLevelB = LOW;\n    volatile RotaryEncoderInterruptBaseActionType action = ROTARY_ACTION_NONE;\n\n  private:\n    // pins and events\n    uint8_t _pinA = 0;\n    uint8_t _pinB = 0;\n    uint8_t _pinPress = 0;\n    input_broker_event _eventCw = INPUT_BROKER_NONE;\n    input_broker_event _eventCcw = INPUT_BROKER_NONE;\n    input_broker_event _eventPressed = INPUT_BROKER_NONE;\n    input_broker_event _eventPressedLong = INPUT_BROKER_NONE;\n    const char *_originName;\n\n    // Long press detection variables\n    uint32_t pressStartTime = 0;\n    bool pressDetected = false;\n    uint32_t lastPressLongEventTime = 0;\n    unsigned long lastPressKeyTime = 0;\n    static const uint32_t LONG_PRESS_DURATION = 300;      // ms\n    static const uint32_t LONG_PRESS_REPEAT_INTERVAL = 0; // 0 = single-shot for rotary select\n    const unsigned long pressDebounceMs = 200;            // ms\n};\n"
  },
  {
    "path": "src/input/RotaryEncoderInterruptImpl1.cpp",
    "content": "#include \"RotaryEncoderInterruptImpl1.h\"\n#include \"InputBroker.h\"\nextern bool osk_found;\n\nRotaryEncoderInterruptImpl1 *rotaryEncoderInterruptImpl1;\n\nRotaryEncoderInterruptImpl1::RotaryEncoderInterruptImpl1() : RotaryEncoderInterruptBase(\"rotEnc1\") {}\n\nbool RotaryEncoderInterruptImpl1::init()\n{\n    if (!moduleConfig.canned_message.rotary1_enabled) {\n        // Input device is disabled.\n        disable();\n        return false;\n    }\n\n    uint8_t pinA = moduleConfig.canned_message.inputbroker_pin_a;\n    uint8_t pinB = moduleConfig.canned_message.inputbroker_pin_b;\n    uint8_t pinPress = moduleConfig.canned_message.inputbroker_pin_press;\n    input_broker_event eventCw = static_cast<input_broker_event>(moduleConfig.canned_message.inputbroker_event_cw);\n    input_broker_event eventCcw = static_cast<input_broker_event>(moduleConfig.canned_message.inputbroker_event_ccw);\n    input_broker_event eventPressed = static_cast<input_broker_event>(moduleConfig.canned_message.inputbroker_event_press);\n    input_broker_event eventPressedLong = INPUT_BROKER_SELECT_LONG;\n\n    // moduleConfig.canned_message.ext_notification_module_output\n    RotaryEncoderInterruptBase::init(pinA, pinB, pinPress, eventCw, eventCcw, eventPressed, eventPressedLong,\n                                     RotaryEncoderInterruptImpl1::handleIntA, RotaryEncoderInterruptImpl1::handleIntB,\n                                     RotaryEncoderInterruptImpl1::handleIntPressed);\n    inputBroker->registerSource(this);\n#ifndef HAS_PHYSICAL_KEYBOARD\n    osk_found = true;\n#endif\n    return true;\n}\n\nvoid RotaryEncoderInterruptImpl1::handleIntA()\n{\n    rotaryEncoderInterruptImpl1->intAHandler();\n}\nvoid RotaryEncoderInterruptImpl1::handleIntB()\n{\n    rotaryEncoderInterruptImpl1->intBHandler();\n}\nvoid RotaryEncoderInterruptImpl1::handleIntPressed()\n{\n    rotaryEncoderInterruptImpl1->intPressHandler();\n}"
  },
  {
    "path": "src/input/RotaryEncoderInterruptImpl1.h",
    "content": "#pragma once\n#include \"RotaryEncoderInterruptBase.h\"\n\n/**\n * @brief The idea behind this class to have static methods for the event handlers.\n *      Check attachInterrupt() at RotaryEncoderInteruptBase.cpp\n *      Technically you can have as many rotary encoders hardver attached\n *      to your device as you wish, but you always need to have separate event\n *      handlers, thus you need to have a RotaryEncoderInterrupt implementation.\n */\nclass RotaryEncoderInterruptImpl1 : public RotaryEncoderInterruptBase\n{\n  public:\n    RotaryEncoderInterruptImpl1();\n    bool init();\n    static void handleIntA();\n    static void handleIntB();\n    static void handleIntPressed();\n};\n\nextern RotaryEncoderInterruptImpl1 *rotaryEncoderInterruptImpl1;"
  },
  {
    "path": "src/input/SeesawRotary.cpp",
    "content": "#ifdef ARCH_PORTDUINO\n#include \"SeesawRotary.h\"\n#include \"input/InputBroker.h\"\n\nusing namespace concurrency;\n\nSeesawRotary *seesawRotary;\n\nSeesawRotary::SeesawRotary(const char *name) : OSThread(name)\n{\n    _originName = name;\n}\n\nbool SeesawRotary::init()\n{\n    if (inputBroker)\n        inputBroker->registerSource(this);\n\n    if (!ss.begin(SEESAW_ADDR)) {\n        return false;\n    }\n    // attachButtonInterrupts();\n\n    uint32_t version = ((ss.getVersion() >> 16) & 0xFFFF);\n    if (version != 4991) {\n        LOG_WARN(\"Wrong firmware loaded? %u\", version);\n    } else {\n        LOG_INFO(\"Found Product 4991\");\n    }\n    /*\n    #ifdef ARCH_ESP32\n        // Register callbacks for before and after lightsleep\n        // Used to detach and reattach interrupts\n        lsObserver.observe(&notifyLightSleep);\n        lsEndObserver.observe(&notifyLightSleepEnd);\n    #endif\n    */\n    ss.pinMode(SS_SWITCH, INPUT_PULLUP);\n\n    // get starting position\n    encoder_position = ss.getEncoderPosition();\n\n    ss.setGPIOInterrupts((uint32_t)1 << SS_SWITCH, 1);\n    ss.enableEncoderInterrupt();\n    canSleep = true; // Assume we should not keep the board awake\n\n    return true;\n}\n\nint32_t SeesawRotary::runOnce()\n{\n    InputEvent e = {};\n    e.inputEvent = INPUT_BROKER_NONE;\n    bool currentlyPressed = !ss.digitalRead(SS_SWITCH);\n\n    if (currentlyPressed && !wasPressed) {\n        e.inputEvent = INPUT_BROKER_SELECT;\n    }\n    wasPressed = currentlyPressed;\n\n    int32_t new_position = ss.getEncoderPosition();\n    // did we move around?\n    if (encoder_position != new_position) {\n        if (encoder_position == 0 && new_position != 1) {\n            e.inputEvent = INPUT_BROKER_ALT_PRESS;\n        } else if (new_position == 0 && encoder_position != 1) {\n            e.inputEvent = INPUT_BROKER_USER_PRESS;\n        } else if (new_position > encoder_position) {\n            e.inputEvent = INPUT_BROKER_USER_PRESS;\n        } else {\n            e.inputEvent = INPUT_BROKER_ALT_PRESS;\n        }\n        encoder_position = new_position;\n    }\n    if (e.inputEvent != INPUT_BROKER_NONE) {\n        e.source = this->_originName;\n        e.kbchar = 0x00;\n        this->notifyObservers(&e);\n    }\n\n    return 50;\n}\n#endif\n"
  },
  {
    "path": "src/input/SeesawRotary.h",
    "content": "#pragma once\n#ifdef ARCH_PORTDUINO\n\n#include \"Adafruit_seesaw.h\"\n#include \"InputBroker.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n\n#define SS_SWITCH 24\n#define SS_NEOPIX 6\n\n#define SEESAW_ADDR 0x36\n\nclass SeesawRotary : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    const char *_originName;\n    bool init();\n    SeesawRotary(const char *name);\n    int32_t runOnce() override;\n\n  private:\n    Adafruit_seesaw ss;\n    int32_t encoder_position;\n    bool wasPressed = false;\n};\n\nextern SeesawRotary *seesawRotary;\n#endif"
  },
  {
    "path": "src/input/SerialKeyboard.cpp",
    "content": "#include \"SerialKeyboard.h\"\n#include \"configuration.h\"\n#include <Throttle.h>\n\nSerialKeyboard *globalSerialKeyboard = nullptr;\n\n#ifdef INPUTBROKER_SERIAL_TYPE\n\n#if INPUTBROKER_SERIAL_TYPE == 1 // It's a Chatter\n// 3 SHIFT level (lower case, upper case, numbers), up to 4 repeated presses, button number\nunsigned char KeyMap[3][4][10] = {{{'.', 'a', 'd', 'g', 'j', 'm', 'p', 't', 'w', ' '},\n                                   {',', 'b', 'e', 'h', 'k', 'n', 'q', 'u', 'x', ' '},\n                                   {'?', 'c', 'f', 'i', 'l', 'o', 'r', 'v', 'y', ' '},\n                                   {'1', '2', '3', '4', '5', '6', 's', '8', 'z', ' '}}, // low case\n                                  {{'!', 'A', 'D', 'G', 'J', 'M', 'P', 'T', 'W', ' '},\n                                   {'+', 'B', 'E', 'H', 'K', 'N', 'Q', 'U', 'X', ' '},\n                                   {'-', 'C', 'F', 'I', 'L', 'O', 'R', 'V', 'Y', ' '},\n                                   {'1', '2', '3', '4', '5', '6', 'S', '8', 'Z', ' '}}, // upper case\n                                  {{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'},\n                                   {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'},\n                                   {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'},\n                                   {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'}}}; // numbers\n\n#endif\n\nSerialKeyboard::SerialKeyboard(const char *name) : concurrency::OSThread(name)\n{\n    this->_originName = name;\n\n    globalSerialKeyboard = this;\n}\n\nvoid SerialKeyboard::erase()\n{\n    InputEvent e = {};\n    e.inputEvent = INPUT_BROKER_BACK;\n    e.kbchar = 0x08;\n    e.source = this->_originName;\n    this->notifyObservers(&e);\n}\n\nint32_t SerialKeyboard::runOnce()\n{\n    if (!INPUTBROKER_SERIAL_TYPE) {\n        // Input device is not requested.\n        return disable();\n    }\n\n    if (firstTime) {\n        // This is the first time the OSThread library has called this function, so do port setup\n        firstTime = 0;\n        pinMode(KB_LOAD, OUTPUT);\n        pinMode(KB_CLK, OUTPUT);\n        pinMode(KB_DATA, INPUT);\n        digitalWrite(KB_LOAD, HIGH);\n        digitalWrite(KB_CLK, LOW);\n        prevKeys = 0b1111111111111111;\n        LOG_DEBUG(\"Serial Keyboard setup\");\n    }\n\n    if (INPUTBROKER_SERIAL_TYPE == 1) { // Chatter V1.0 & V2.0 keypads\n        // scan for keypresses\n        // Write pulse to load pin\n        digitalWrite(KB_LOAD, LOW);\n        delayMicroseconds(5);\n        digitalWrite(KB_LOAD, HIGH);\n        delayMicroseconds(5);\n\n        // Get data from 74HC165\n        byte shiftRegister1 = shiftIn(KB_DATA, KB_CLK, LSBFIRST);\n        byte shiftRegister2 = shiftIn(KB_DATA, KB_CLK, LSBFIRST);\n\n        keys = (shiftRegister1 << 8) + shiftRegister2;\n\n        // Print to serial monitor\n        // Serial.print (shiftRegister1, BIN);\n        // Serial.print (\"X\");\n        // Serial.println (shiftRegister2, BIN);\n\n        if (!Throttle::isWithinTimespanMs(lastPressTime, 500)) {\n            quickPress = 0;\n        }\n\n        if (keys < prevKeys) { // a new key has been pressed (and not released), doesn't works for multiple presses at once but\n                               // shouldn't be a limitation\n            InputEvent e = {};\n            e.inputEvent = INPUT_BROKER_NONE;\n            e.source = this->_originName;\n            // SELECT OR SEND OR CANCEL EVENT\n            if (!(shiftRegister2 & (1 << 3))) {\n                if (shift > 0) {\n                    e.inputEvent = INPUT_BROKER_ANYKEY; // REQUIRED\n                    e.kbchar = 0x09;                    // TAB\n                    shift = 0;                          // reset shift after TAB\n                } else {\n                    e.inputEvent = INPUT_BROKER_LEFT;\n                }\n            } else if (!(shiftRegister2 & (1 << 2))) {\n                if (shift > 0) {\n                    e.inputEvent = INPUT_BROKER_ANYKEY; // REQUIRED\n                    e.kbchar = 0x09;                    // TAB\n                    shift = 0;                          // reset shift after TAB\n                } else {\n                    e.inputEvent = INPUT_BROKER_RIGHT;\n                }\n                e.kbchar = 0;\n            } else if (!(shiftRegister2 & (1 << 1))) {\n                e.inputEvent = INPUT_BROKER_SELECT;\n            } else if (!(shiftRegister2 & (1 << 0))) {\n                e.inputEvent = INPUT_BROKER_CANCEL;\n            }\n\n            // TEXT INPUT EVENT\n            else if (!(shiftRegister1 & (1 << 4))) {\n                keyPressed = 0;\n            } else if (!(shiftRegister1 & (1 << 3))) {\n                keyPressed = 1;\n            } else if (!(shiftRegister2 & (1 << 4))) {\n                keyPressed = 2;\n            } else if (!(shiftRegister1 & (1 << 5))) {\n                keyPressed = 3;\n            } else if (!(shiftRegister1 & (1 << 2))) {\n                keyPressed = 4;\n            } else if (!(shiftRegister2 & (1 << 5))) {\n                keyPressed = 5;\n            } else if (!(shiftRegister1 & (1 << 6))) {\n                keyPressed = 6;\n            } else if (!(shiftRegister1 & (1 << 1))) {\n                keyPressed = 7;\n            } else if (!(shiftRegister2 & (1 << 6))) {\n                keyPressed = 8;\n            } else if (!(shiftRegister1 & (1 << 0))) {\n                keyPressed = 9;\n            }\n            // BACKSPACE or TAB\n            else if (!(shiftRegister1 & (1 << 7))) {\n                if (shift == 0 || shift == 2) { // BACKSPACE\n                    e.inputEvent = INPUT_BROKER_BACK;\n                    e.kbchar = 0x08;\n                } else { // shift = 1 => TAB\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = 0x09;\n                }\n            }\n            // SHIFT\n            else if (!(shiftRegister2 & (1 << 7))) {\n                keyPressed = 10;\n            }\n\n            if (keyPressed < 11) {\n                if (keyPressed == lastKeyPressed && millis() - lastPressTime < 500) {\n                    quickPress += 1;\n                    if (quickPress > 3) {\n                        quickPress = 0;\n                    }\n                }\n                if (keyPressed != lastKeyPressed) {\n                    quickPress = 0;\n                }\n                if (keyPressed < 10) { // if it's a letter\n                    if (keyPressed == lastKeyPressed && millis() - lastPressTime < 500) {\n                        erase();\n                    }\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = char(KeyMap[shift][quickPress][keyPressed]);\n                } else { // then it's shift\n                    shift += 1;\n                    if (shift > 2) {\n                        shift = 0;\n                    }\n                }\n                lastPressTime = millis();\n                lastKeyPressed = keyPressed;\n                keyPressed = 13;\n            }\n\n            if (e.inputEvent != INPUT_BROKER_NONE) {\n                this->notifyObservers(&e);\n            }\n        }\n        prevKeys = keys;\n    }\n    return 50;\n}\n\n#endif // INPUTBROKER_SERIAL_TYPE"
  },
  {
    "path": "src/input/SerialKeyboard.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"concurrency/OSThread.h\"\n\nclass SerialKeyboard : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit SerialKeyboard(const char *name);\n\n    uint8_t getShift() const { return shift; }\n\n  protected:\n    virtual int32_t runOnce() override;\n    void erase();\n\n  private:\n    const char *_originName;\n    bool firstTime = 1;\n    int prevKeys = 0;\n    int keys = 0;\n    int shift = 0;\n    int keyPressed = 13;\n    int lastKeyPressed = 13;\n    int quickPress = 0;\n    unsigned long lastPressTime = 0;\n};\n\nextern SerialKeyboard *globalSerialKeyboard;"
  },
  {
    "path": "src/input/SerialKeyboardImpl.cpp",
    "content": "#include \"SerialKeyboardImpl.h\"\n#include \"InputBroker.h\"\n#include \"configuration.h\"\n\n#ifdef INPUTBROKER_SERIAL_TYPE\n\nSerialKeyboardImpl *aSerialKeyboardImpl;\n\nSerialKeyboardImpl::SerialKeyboardImpl() : SerialKeyboard(\"serialKB\") {}\n\nvoid SerialKeyboardImpl::init()\n{\n    if (!INPUTBROKER_SERIAL_TYPE) {\n        disable();\n        return;\n    }\n\n    inputBroker->registerSource(this);\n}\n\n#endif // INPUTBROKER_SERIAL_TYPE"
  },
  {
    "path": "src/input/SerialKeyboardImpl.h",
    "content": "#pragma once\n#include \"SerialKeyboard.h\"\n#include \"main.h\"\n\n/**\n * @brief The idea behind this class to have static methods for the event handlers.\n *      Check attachInterrupt() at RotaryEncoderInteruptBase.cpp\n *      Technically you can have as many rotary encoders hardver attached\n *      to your device as you wish, but you always need to have separate event\n *      handlers, thus you need to have a RotaryEncoderInterrupt implementation.\n */\nclass SerialKeyboardImpl : public SerialKeyboard\n{\n  public:\n    SerialKeyboardImpl();\n    void init();\n};\n\nextern SerialKeyboardImpl *aSerialKeyboardImpl;"
  },
  {
    "path": "src/input/TCA8418Keyboard.cpp",
    "content": "#include \"TCA8418Keyboard.h\"\n\n#define _TCA8418_COLS 3\n#define _TCA8418_ROWS 4\n#define _TCA8418_NUM_KEYS 12\n\n#define _TCA8418_LONG_PRESS_THRESHOLD 2000\n#define _TCA8418_MULTI_TAP_THRESHOLD 750\n\nusing Key = TCA8418KeyboardBase::TCA8418Key;\n\n// Num chars per key, Modulus for rotating through characters\nstatic uint8_t TCA8418TapMod[_TCA8418_NUM_KEYS] = {13, 7, 7, 7, 7, 7, 9, 7, 9, 2, 2, 2};\n\nstatic unsigned char TCA8418TapMap[_TCA8418_NUM_KEYS][13] = {\n    {'1', '.', ',', '?', '!', ':', ';', '-', '_', '\\\\', '/', '(', ')'}, // 1\n    {'2', 'a', 'b', 'c', 'A', 'B', 'C'},                                // 2\n    {'3', 'd', 'e', 'f', 'D', 'E', 'F'},                                // 3\n    {'4', 'g', 'h', 'i', 'G', 'H', 'I'},                                // 4\n    {'5', 'j', 'k', 'l', 'J', 'K', 'L'},                                // 5\n    {'6', 'm', 'n', 'o', 'M', 'N', 'O'},                                // 6\n    {'7', 'p', 'q', 'r', 's', 'P', 'Q', 'R', 'S'},                      // 7\n    {'8', 't', 'u', 'v', 'T', 'U', 'V'},                                // 8\n    {'9', 'w', 'x', 'y', 'z', 'W', 'X', 'Y', 'Z'},                      // 9\n    {'*', '+'},                                                         // *\n    {'0', ' '},                                                         // 0\n    {'#', '@'},                                                         // #\n};\n\nstatic unsigned char TCA8418LongPressMap[_TCA8418_NUM_KEYS] = {\n    Key::ESC,   // 1\n    Key::UP,    // 2\n    Key::NONE,  // 3\n    Key::LEFT,  // 4\n    Key::NONE,  // 5\n    Key::RIGHT, // 6\n    Key::NONE,  // 7\n    Key::DOWN,  // 8\n    Key::NONE,  // 9\n    Key::BSP,   // *\n    Key::NONE,  // 0\n    Key::NONE,  // #\n};\n\nTCA8418Keyboard::TCA8418Keyboard()\n    : TCA8418KeyboardBase(_TCA8418_ROWS, _TCA8418_COLS), last_key(UINT8_MAX), next_key(UINT8_MAX), last_tap(0L), char_idx(0),\n      tap_interval(0), should_backspace(false)\n{\n}\n\nvoid TCA8418Keyboard::reset()\n{\n    TCA8418KeyboardBase::reset();\n\n    // Set COL9 as GPIO output\n    writeRegister(TCA8418_REG_GPIO_DIR_3, 0x02);\n    // Switch off keyboard backlight (COL9 = LOW)\n    writeRegister(TCA8418_REG_GPIO_DAT_OUT_3, 0x00);\n}\n\nvoid TCA8418Keyboard::pressed(uint8_t key)\n{\n    if (state == Init || state == Busy) {\n        return;\n    }\n    int row = (key - 1) / 10;\n    int col = (key - 1) % 10;\n\n    if (row >= _TCA8418_ROWS || col >= _TCA8418_COLS) {\n        return; // Invalid key\n    }\n\n    // Compute key index based on dynamic row/column\n    next_key = (uint8_t)(row * _TCA8418_COLS + col);\n\n    // LOG_DEBUG(\"TCA8418: Key %u -> Next Key %u\", key, next_key);\n\n    state = Held;\n    uint32_t now = millis();\n    tap_interval = now - last_tap;\n    if (tap_interval < 0) {\n        // Long running, millis has overflowed.\n        last_tap = 0;\n        state = Busy;\n        return;\n    }\n\n    // Check if the key is the same as the last one or if the time interval has passed\n    if (next_key != last_key || tap_interval > _TCA8418_MULTI_TAP_THRESHOLD) {\n        char_idx = 0;             // Reset char index if new key or long press\n        should_backspace = false; // don't backspace on new key\n    } else {\n        char_idx += 1;           // Cycle through characters if same key pressed\n        should_backspace = true; // allow backspace on same key\n    }\n\n    // Store the current key as the last key\n    last_key = next_key;\n    last_tap = now;\n}\n\nvoid TCA8418Keyboard::released()\n{\n    if (state != Held) {\n        return;\n    }\n\n    if (last_key >= _TCA8418_NUM_KEYS) { // reset to idle if last_key out of bounds\n        last_key = UINT8_MAX;\n        state = Idle;\n        return;\n    }\n    uint32_t now = millis();\n    int32_t held_interval = now - last_tap;\n    last_tap = now;\n    if (tap_interval < _TCA8418_MULTI_TAP_THRESHOLD && should_backspace) {\n        queueEvent(BSP);\n    }\n    if (held_interval > _TCA8418_LONG_PRESS_THRESHOLD) {\n        queueEvent(TCA8418LongPressMap[last_key]);\n        // LOG_DEBUG(\"Long Press Key: %i Map: %i\", last_key, TCA8418LongPressMap[last_key]);\n    } else {\n        queueEvent(TCA8418TapMap[last_key][(char_idx % TCA8418TapMod[last_key])]);\n        // LOG_DEBUG(\"Key Press: %i Index:%i if %i Map: %c\", last_key, char_idx, TCA8418TapMod[last_key],\n        //           TCA8418TapMap[last_key][(char_idx % TCA8418TapMod[last_key])]);\n    }\n}\n\nvoid TCA8418Keyboard::setBacklight(bool on)\n{\n    if (on) {\n        digitalWrite(TCA8418_COL9, HIGH);\n    } else {\n        digitalWrite(TCA8418_COL9, LOW);\n    }\n}\n"
  },
  {
    "path": "src/input/TCA8418Keyboard.h",
    "content": "#include \"TCA8418KeyboardBase.h\"\n\n/**\n * @brief 3x4 keypad with 3 columns and 4 rows\n */\nclass TCA8418Keyboard : public TCA8418KeyboardBase\n{\n  public:\n    TCA8418Keyboard();\n    void reset(void) override;\n    void setBacklight(bool on) override;\n\n  protected:\n    void pressed(uint8_t key) override;\n    void released(void) override;\n\n    uint8_t last_key;\n    uint8_t next_key;\n    uint32_t last_tap;\n    uint8_t char_idx;\n    int32_t tap_interval;\n    bool should_backspace;\n};\n"
  },
  {
    "path": "src/input/TCA8418KeyboardBase.cpp",
    "content": "// Based on the MPR121 Keyboard and Adafruit TCA8418 library\n\n#include \"TCA8418KeyboardBase.h\"\n#include \"configuration.h\"\n\n#include <Arduino.h>\n\n// FIELDS CONFIG REGISTER  1\n#define _TCA8418_REG_CFG_AI 0x80           // Auto-increment for read/write\n#define _TCA8418_REG_CFG_GPI_E_CGF 0x40    // Event mode config\n#define _TCA8418_REG_CFG_OVR_FLOW_M 0x20   // Overflow mode enable\n#define _TCA8418_REG_CFG_INT_CFG 0x10      // Interrupt config\n#define _TCA8418_REG_CFG_OVR_FLOW_IEN 0x08 // Overflow interrupt enable\n#define _TCA8418_REG_CFG_K_LCK_IEN 0x04    // Keypad lock interrupt enable\n#define _TCA8418_REG_CFG_GPI_IEN 0x02      // GPI interrupt enable\n#define _TCA8418_REG_CFG_KE_IEN 0x01       // Key events interrupt enable\n\n// FIELDS INT_STAT REGISTER  2\n#define _TCA8418_REG_STAT_CAD_INT 0x10      // Ctrl-alt-del seq status\n#define _TCA8418_REG_STAT_OVR_FLOW_INT 0x08 // Overflow interrupt status\n#define _TCA8418_REG_STAT_K_LCK_INT 0x04    // Key lock interrupt status\n#define _TCA8418_REG_STAT_GPI_INT 0x02      // GPI interrupt status\n#define _TCA8418_REG_STAT_K_INT 0x01        // Key events interrupt status\n\n// FIELDS  KEY_LCK_EC REGISTER 3\n#define _TCA8418_REG_LCK_EC_K_LCK_EN 0x40 // Key lock enable\n#define _TCA8418_REG_LCK_EC_LCK_2 0x20    // Keypad lock status 2\n#define _TCA8418_REG_LCK_EC_LCK_1 0x10    // Keypad lock status 1\n#define _TCA8418_REG_LCK_EC_KLEC_3 0x08   // Key event count bit 3\n#define _TCA8418_REG_LCK_EC_KLEC_2 0x04   // Key event count bit 2\n#define _TCA8418_REG_LCK_EC_KLEC_1 0x02   // Key event count bit 1\n#define _TCA8418_REG_LCK_EC_KLEC_0 0x01   // Key event count bit 0\n\nTCA8418KeyboardBase::TCA8418KeyboardBase(uint8_t rows, uint8_t columns)\n    : rows(rows), columns(columns), state(Init), queue(\"\"), m_wire(nullptr), m_addr(0), readCallback(nullptr),\n      writeCallback(nullptr)\n{\n}\n\nvoid TCA8418KeyboardBase::begin(uint8_t addr, TwoWire *wire)\n{\n    m_addr = addr;\n    m_wire = wire;\n    m_wire->begin();\n    reset();\n}\n\nvoid TCA8418KeyboardBase::begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr)\n{\n    m_addr = addr;\n    m_wire = nullptr;\n    writeCallback = w;\n    readCallback = r;\n    reset();\n}\n\nvoid TCA8418KeyboardBase::reset()\n{\n    LOG_DEBUG(\"TCA8418 Reset\");\n    //  GPIO\n    //  set default all GIO pins to INPUT\n    writeRegister(TCA8418_REG_GPIO_DIR_1, 0x00);\n    writeRegister(TCA8418_REG_GPIO_DIR_2, 0x00);\n    writeRegister(TCA8418_REG_GPIO_DIR_3, 0x00);\n\n    //  add all pins to key events\n    writeRegister(TCA8418_REG_GPI_EM_1, 0xFF);\n    writeRegister(TCA8418_REG_GPI_EM_2, 0xFF);\n    writeRegister(TCA8418_REG_GPI_EM_3, 0xFF);\n\n    //  set all pins to FALLING interrupts\n    writeRegister(TCA8418_REG_GPIO_INT_LVL_1, 0x00);\n    writeRegister(TCA8418_REG_GPIO_INT_LVL_2, 0x00);\n    writeRegister(TCA8418_REG_GPIO_INT_LVL_3, 0x00);\n\n    //  add all pins to interrupts\n    writeRegister(TCA8418_REG_GPIO_INT_EN_1, 0xFF);\n    writeRegister(TCA8418_REG_GPIO_INT_EN_2, 0xFF);\n    writeRegister(TCA8418_REG_GPIO_INT_EN_3, 0xFF);\n\n    // Set keyboard matrix size\n    matrix(rows, columns);\n    enableDebounce();\n    flush();\n    state = Idle;\n}\n\nbool TCA8418KeyboardBase::matrix(uint8_t rows, uint8_t columns)\n{\n    if (rows < 1 || rows > 8 || columns < 1 || columns > 10)\n        return false;\n\n    // Setup the keypad matrix.\n    uint8_t mask = 0x00;\n    for (int r = 0; r < rows; r++) {\n        mask <<= 1;\n        mask |= 1;\n    }\n    writeRegister(TCA8418_REG_KP_GPIO_1, mask);\n\n    mask = 0x00;\n    for (int c = 0; c < columns && c < 8; c++) {\n        mask <<= 1;\n        mask |= 1;\n    }\n    writeRegister(TCA8418_REG_KP_GPIO_2, mask);\n\n    if (columns > 8) {\n        if (columns == 9)\n            mask = 0x01;\n        else\n            mask = 0x03;\n        writeRegister(TCA8418_REG_KP_GPIO_3, mask);\n    }\n\n    return true;\n}\n\nuint8_t TCA8418KeyboardBase::keyCount() const\n{\n    uint8_t eventCount = readRegister(TCA8418_REG_KEY_LCK_EC);\n    eventCount &= 0x0F; //  lower 4 bits only\n    return eventCount;\n}\n\nbool TCA8418KeyboardBase::hasEvent() const\n{\n    return queue.length() > 0;\n}\n\nvoid TCA8418KeyboardBase::queueEvent(char next)\n{\n    if (next == NONE) {\n        return;\n    }\n    queue.concat(next);\n}\n\nchar TCA8418KeyboardBase::dequeueEvent()\n{\n    if (queue.length() < 1) {\n        return NONE;\n    }\n    char next = queue.charAt(0);\n    queue.remove(0, 1);\n    return next;\n}\n\nvoid TCA8418KeyboardBase::trigger()\n{\n    if (keyCount() == 0) {\n        return;\n    }\n    if (state != Init) {\n        // Read the key register\n        uint8_t k = readRegister(TCA8418_REG_KEY_EVENT_A);\n        uint8_t key = k & 0x7F;\n        if (k & 0x80) {\n            if (state == Idle)\n                pressed(key);\n            return;\n        } else {\n            if (state == Held) {\n                released();\n            }\n            state = Idle;\n            return;\n        }\n    } else {\n        reset();\n    }\n}\n\nvoid TCA8418KeyboardBase::pressed(uint8_t key)\n{\n    // must be defined in derived class\n    LOG_ERROR(\"pressed() not implemented in derived class\");\n}\n\nvoid TCA8418KeyboardBase::released()\n{\n    // must be defined in derived class\n    LOG_ERROR(\"released() not implemented in derived class\");\n}\n\nuint8_t TCA8418KeyboardBase::flush()\n{\n    // Flush key events\n    uint8_t count = 0;\n    while (readRegister(TCA8418_REG_KEY_EVENT_A) != 0)\n        count++;\n\n    // Flush gpio events\n    readRegister(TCA8418_REG_GPIO_INT_STAT_1);\n    readRegister(TCA8418_REG_GPIO_INT_STAT_2);\n    readRegister(TCA8418_REG_GPIO_INT_STAT_3);\n\n    // Clear INT_STAT register\n    writeRegister(TCA8418_REG_INT_STAT, 3);\n    return count;\n}\n\nvoid TCA8418KeyboardBase::clearInt()\n{\n    writeRegister(TCA8418_REG_INT_STAT, 3);\n}\n\nuint8_t TCA8418KeyboardBase::digitalRead(uint8_t pinnum) const\n{\n    if (pinnum > TCA8418_COL9)\n        return 0xFF;\n\n    uint8_t reg = TCA8418_REG_GPIO_DAT_STAT_1 + pinnum / 8;\n    uint8_t mask = (1 << (pinnum % 8));\n\n    // Level  0 = low  other = high\n    uint8_t value = readRegister(reg);\n    if (value & mask)\n        return HIGH;\n    return LOW;\n}\n\nbool TCA8418KeyboardBase::digitalWrite(uint8_t pinnum, uint8_t level)\n{\n    if (pinnum > TCA8418_COL9)\n        return false;\n\n    uint8_t reg = TCA8418_REG_GPIO_DAT_OUT_1 + pinnum / 8;\n    uint8_t mask = (1 << (pinnum % 8));\n\n    // Level  0 = low  other = high\n    uint8_t value = readRegister(reg);\n    if (level == LOW)\n        value &= ~mask;\n    else\n        value |= mask;\n    writeRegister(reg, value);\n    return true;\n}\n\nbool TCA8418KeyboardBase::pinMode(uint8_t pinnum, uint8_t mode)\n{\n    if (pinnum > TCA8418_COL9)\n        return false;\n\n    uint8_t idx = pinnum / 8;\n    uint8_t reg = TCA8418_REG_GPIO_DIR_1 + idx;\n    uint8_t mask = (1 << (pinnum % 8));\n\n    // Mode  0 = input   1 = output\n    uint8_t value = readRegister(reg);\n    if (mode == OUTPUT)\n        value |= mask;\n    else\n        value &= ~mask;\n    writeRegister(reg, value);\n\n    // Pullup  0 = enabled   1 = disabled\n    reg = TCA8418_REG_GPIO_PULL_1 + idx;\n    value = readRegister(reg);\n    if (mode == INPUT_PULLUP)\n        value &= ~mask;\n    else\n        value |= mask;\n    writeRegister(reg, value);\n\n    return true;\n}\n\nbool TCA8418KeyboardBase::pinIRQMode(uint8_t pinnum, uint8_t mode)\n{\n    if (pinnum > TCA8418_COL9)\n        return false;\n    if ((mode != RISING) && (mode != FALLING))\n        return false;\n\n    //  Mode  0 = falling   1 = rising\n    uint8_t idx = pinnum / 8;\n    uint8_t reg = TCA8418_REG_GPIO_INT_LVL_1 + idx;\n    uint8_t mask = (1 << (pinnum % 8));\n\n    uint8_t value = readRegister(reg);\n    if (mode == RISING)\n        value |= mask;\n    else\n        value &= ~mask;\n    writeRegister(reg, value);\n\n    // Enable interrupt\n    reg = TCA8418_REG_GPIO_INT_EN_1 + idx;\n    value = readRegister(reg);\n    value |= mask;\n    writeRegister(reg, value);\n\n    return true;\n}\n\nvoid TCA8418KeyboardBase::enableInterrupts()\n{\n    uint8_t value = readRegister(TCA8418_REG_CFG);\n    value |= (_TCA8418_REG_CFG_GPI_IEN | _TCA8418_REG_CFG_KE_IEN);\n    writeRegister(TCA8418_REG_CFG, value);\n};\n\nvoid TCA8418KeyboardBase::disableInterrupts()\n{\n    uint8_t value = readRegister(TCA8418_REG_CFG);\n    value &= ~(_TCA8418_REG_CFG_GPI_IEN | _TCA8418_REG_CFG_KE_IEN);\n    writeRegister(TCA8418_REG_CFG, value);\n};\n\nvoid TCA8418KeyboardBase::enableMatrixOverflow()\n{\n    uint8_t value = readRegister(TCA8418_REG_CFG);\n    value |= _TCA8418_REG_CFG_OVR_FLOW_M;\n    writeRegister(TCA8418_REG_CFG, value);\n};\n\nvoid TCA8418KeyboardBase::disableMatrixOverflow()\n{\n    uint8_t value = readRegister(TCA8418_REG_CFG);\n    value &= ~_TCA8418_REG_CFG_OVR_FLOW_M;\n    writeRegister(TCA8418_REG_CFG, value);\n};\n\nvoid TCA8418KeyboardBase::enableDebounce()\n{\n    writeRegister(TCA8418_REG_DEBOUNCE_DIS_1, 0x00);\n    writeRegister(TCA8418_REG_DEBOUNCE_DIS_2, 0x00);\n    writeRegister(TCA8418_REG_DEBOUNCE_DIS_3, 0x00);\n}\n\nvoid TCA8418KeyboardBase::disableDebounce()\n{\n    writeRegister(TCA8418_REG_DEBOUNCE_DIS_1, 0xFF);\n    writeRegister(TCA8418_REG_DEBOUNCE_DIS_2, 0xFF);\n    writeRegister(TCA8418_REG_DEBOUNCE_DIS_3, 0xFF);\n}\n\nvoid TCA8418KeyboardBase::setBacklight(bool on) {}\n\nuint8_t TCA8418KeyboardBase::readRegister(uint8_t reg) const\n{\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(reg);\n        m_wire->endTransmission();\n\n        m_wire->requestFrom(m_addr, (uint8_t)1);\n        if (m_wire->available() < 1)\n            return 0;\n\n        return m_wire->read();\n    }\n    if (readCallback) {\n        uint8_t data;\n        readCallback(m_addr, reg, &data, 1);\n        return data;\n    }\n    return 0;\n}\n\nvoid TCA8418KeyboardBase::writeRegister(uint8_t reg, uint8_t value)\n{\n    uint8_t data[2];\n    data[0] = reg;\n    data[1] = value;\n\n    if (m_wire) {\n        m_wire->beginTransmission(m_addr);\n        m_wire->write(data, sizeof(uint8_t) * 2);\n        m_wire->endTransmission();\n    }\n    if (writeCallback) {\n        writeCallback(m_addr, data[0], &(data[1]), 1);\n    }\n}"
  },
  {
    "path": "src/input/TCA8418KeyboardBase.h",
    "content": "// Based on the MPR121 Keyboard and Adafruit TCA8418 library\n#include \"configuration.h\"\n#include <Wire.h>\n\n/**\n * @brief TCA8418KeyboardBase is the base class for TCA8418 keyboard handling.\n * It provides basic functionality for reading key events, managing the keyboard matrix,\n * and handling key states. It is designed to be extended for specific keyboard implementations.\n * It supports both I2C communication and function pointers for custom I2C operations.\n */\nclass TCA8418KeyboardBase\n{\n  public:\n    enum TCA8418Key : uint8_t {\n        NONE = 0x00,\n        BSP = 0x08,\n        TAB = 0x09,\n        SELECT = 0x0d,\n        ESC = 0x1b,\n        REBOOT = 0x90,\n        LEFT = 0xb4,\n        UP = 0xb5,\n        DOWN = 0xb6,\n        RIGHT = 0xb7,\n        BT_TOGGLE = 0xAA,\n        GPS_TOGGLE = 0x9E,\n        MUTE_TOGGLE = 0xAC,\n        SEND_PING = 0xAF,\n        BL_TOGGLE = 0xAB,\n        FUNCTION_F1 = 0xF1,\n        FUNCTION_F2 = 0xF2,\n        FUNCTION_F3 = 0xF3,\n        FUNCTION_F4 = 0xF4,\n        FUNCTION_F5 = 0xF5\n    };\n\n    typedef uint8_t (*i2c_com_fptr_t)(uint8_t dev_addr, uint8_t reg_addr, uint8_t *data, uint8_t len);\n\n    TCA8418KeyboardBase(uint8_t rows, uint8_t columns);\n\n    virtual void begin(uint8_t addr = TCA8418_KB_ADDR, TwoWire *wire = &Wire);\n    virtual void begin(i2c_com_fptr_t r, i2c_com_fptr_t w, uint8_t addr = TCA8418_KB_ADDR);\n\n    virtual void reset(void);\n    void clearInt(void);\n\n    virtual void trigger(void);\n\n    virtual void setBacklight(bool on);\n\n    // Key events available\n    virtual bool hasEvent(void) const;\n    virtual char dequeueEvent(void);\n\n  protected:\n    enum KeyState { Init, Idle, Held, Busy };\n\n    enum TCA8418Register : uint8_t {\n        TCA8418_REG_RESERVED = 0x00,\n        TCA8418_REG_CFG = 0x01,\n        TCA8418_REG_INT_STAT = 0x02,\n        TCA8418_REG_KEY_LCK_EC = 0x03,\n        TCA8418_REG_KEY_EVENT_A = 0x04,\n        TCA8418_REG_KEY_EVENT_B = 0x05,\n        TCA8418_REG_KEY_EVENT_C = 0x06,\n        TCA8418_REG_KEY_EVENT_D = 0x07,\n        TCA8418_REG_KEY_EVENT_E = 0x08,\n        TCA8418_REG_KEY_EVENT_F = 0x09,\n        TCA8418_REG_KEY_EVENT_G = 0x0A,\n        TCA8418_REG_KEY_EVENT_H = 0x0B,\n        TCA8418_REG_KEY_EVENT_I = 0x0C,\n        TCA8418_REG_KEY_EVENT_J = 0x0D,\n        TCA8418_REG_KP_LCK_TIMER = 0x0E,\n        TCA8418_REG_UNLOCK_1 = 0x0F,\n        TCA8418_REG_UNLOCK_2 = 0x10,\n        TCA8418_REG_GPIO_INT_STAT_1 = 0x11,\n        TCA8418_REG_GPIO_INT_STAT_2 = 0x12,\n        TCA8418_REG_GPIO_INT_STAT_3 = 0x13,\n        TCA8418_REG_GPIO_DAT_STAT_1 = 0x14,\n        TCA8418_REG_GPIO_DAT_STAT_2 = 0x15,\n        TCA8418_REG_GPIO_DAT_STAT_3 = 0x16,\n        TCA8418_REG_GPIO_DAT_OUT_1 = 0x17,\n        TCA8418_REG_GPIO_DAT_OUT_2 = 0x18,\n        TCA8418_REG_GPIO_DAT_OUT_3 = 0x19,\n        TCA8418_REG_GPIO_INT_EN_1 = 0x1A,\n        TCA8418_REG_GPIO_INT_EN_2 = 0x1B,\n        TCA8418_REG_GPIO_INT_EN_3 = 0x1C,\n        TCA8418_REG_KP_GPIO_1 = 0x1D,\n        TCA8418_REG_KP_GPIO_2 = 0x1E,\n        TCA8418_REG_KP_GPIO_3 = 0x1F,\n        TCA8418_REG_GPI_EM_1 = 0x20,\n        TCA8418_REG_GPI_EM_2 = 0x21,\n        TCA8418_REG_GPI_EM_3 = 0x22,\n        TCA8418_REG_GPIO_DIR_1 = 0x23,\n        TCA8418_REG_GPIO_DIR_2 = 0x24,\n        TCA8418_REG_GPIO_DIR_3 = 0x25,\n        TCA8418_REG_GPIO_INT_LVL_1 = 0x26,\n        TCA8418_REG_GPIO_INT_LVL_2 = 0x27,\n        TCA8418_REG_GPIO_INT_LVL_3 = 0x28,\n        TCA8418_REG_DEBOUNCE_DIS_1 = 0x29,\n        TCA8418_REG_DEBOUNCE_DIS_2 = 0x2A,\n        TCA8418_REG_DEBOUNCE_DIS_3 = 0x2B,\n        TCA8418_REG_GPIO_PULL_1 = 0x2C,\n        TCA8418_REG_GPIO_PULL_2 = 0x2D,\n        TCA8418_REG_GPIO_PULL_3 = 0x2E\n    };\n\n    // Pin IDs for matrix rows/columns\n    enum TCA8418PinId : uint8_t {\n        TCA8418_ROW0, // Pin ID for row 0\n        TCA8418_ROW1, // Pin ID for row 1\n        TCA8418_ROW2, // Pin ID for row 2\n        TCA8418_ROW3, // Pin ID for row 3\n        TCA8418_ROW4, // Pin ID for row 4\n        TCA8418_ROW5, // Pin ID for row 5\n        TCA8418_ROW6, // Pin ID for row 6\n        TCA8418_ROW7, // Pin ID for row 7\n        TCA8418_COL0, // Pin ID for column 0\n        TCA8418_COL1, // Pin ID for column 1\n        TCA8418_COL2, // Pin ID for column 2\n        TCA8418_COL3, // Pin ID for column 3\n        TCA8418_COL4, // Pin ID for column 4\n        TCA8418_COL5, // Pin ID for column 5\n        TCA8418_COL6, // Pin ID for column 6\n        TCA8418_COL7, // Pin ID for column 7\n        TCA8418_COL8, // Pin ID for column 8\n        TCA8418_COL9  // Pin ID for column 9\n    };\n\n    virtual void pressed(uint8_t key);\n    virtual void released(void);\n\n    virtual void queueEvent(char);\n\n    virtual ~TCA8418KeyboardBase() {}\n\n  protected:\n    // Set the size of the keypad matrix\n    // All other rows and columns are set as inputs.\n    bool matrix(uint8_t rows, uint8_t columns);\n\n    uint8_t keyCount(void) const;\n\n    // Flush all events in the FIFO buffer + GPIO events.\n    uint8_t flush(void);\n\n    // debounce keys.\n    void enableDebounce();\n    void disableDebounce();\n\n    // enable / disable interrupts for matrix and GPI pins\n    void enableInterrupts();\n    void disableInterrupts();\n\n    // ignore key events when FIFO buffer is full or not.\n    void enableMatrixOverflow();\n    void disableMatrixOverflow();\n\n    uint8_t digitalRead(uint8_t pinnum) const;\n    bool digitalWrite(uint8_t pinnum, uint8_t level);\n    bool pinMode(uint8_t pinnum, uint8_t mode);\n    bool pinIRQMode(uint8_t pinnum, uint8_t mode); // MODE  FALLING or RISING\n    uint8_t readRegister(uint8_t reg) const;\n    void writeRegister(uint8_t reg, uint8_t value);\n\n  protected:\n    uint8_t rows;\n    uint8_t columns;\n    KeyState state;\n    String queue;\n\n  private:\n    TwoWire *m_wire;\n    uint8_t m_addr;\n    i2c_com_fptr_t readCallback;\n    i2c_com_fptr_t writeCallback;\n};\n"
  },
  {
    "path": "src/input/TDeckProKeyboard.cpp",
    "content": "#if defined(T_DECK_PRO)\n\n#include \"TDeckProKeyboard.h\"\n\n#define _TCA8418_COLS 10\n#define _TCA8418_ROWS 4\n#define _TCA8418_NUM_KEYS 35\n\n#define _TCA8418_MULTI_TAP_THRESHOLD 1500\n\nusing Key = TCA8418KeyboardBase::TCA8418Key;\n\nconstexpr uint8_t modifierRightShiftKey = 31 - 1; // keynum -1\nconstexpr uint8_t modifierRightShift = 0b0001;\nconstexpr uint8_t modifierLeftShiftKey = 35 - 1;\nconstexpr uint8_t modifierLeftShift = 0b0001;\nconstexpr uint8_t modifierSymKey = 32 - 1;\nconstexpr uint8_t modifierSym = 0b0010;\nconstexpr uint8_t modifierAltKey = 30 - 1;\nconstexpr uint8_t modifierAlt = 0b0100;\n\n// Num chars per key, Modulus for rotating through characters\nstatic uint8_t TDeckProTapMod[_TCA8418_NUM_KEYS] = {5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,\n                                                    5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5};\n\nstatic unsigned char TDeckProTapMap[_TCA8418_NUM_KEYS][5] = {\n    {'p', 'P', '@', 0x00, Key::SEND_PING},\n    {'o', 'O', '+'},\n    {'i', 'I', '-'},\n    {'u', 'U', '_'},\n    {'y', 'Y', ')'},\n    {'t', 'T', '(', 0x00, Key::TAB},\n    {'r', 'R', '3'},\n    {'e', 'E', '2', 0x00, Key::UP},\n    {'w', 'W', '1'},\n    {'q', 'Q', '#', 0x00, Key::ESC}, // p, o, i, u, y, t, r, e, w, q\n    {Key::BSP, 0x00, 0x00},\n    {'l', 'L', '\"'},\n    {'k', 'K', '\\''},\n    {'j', 'J', ';'},\n    {'h', 'H', ':'},\n    {'g', 'G', '/', 0x00, Key::GPS_TOGGLE},\n    {'f', 'F', '6', 0x00, Key::RIGHT},\n    {'d', 'D', '5'},\n    {'s', 'S', '4', 0x00, Key::LEFT},\n    {'a', 'A', '*'}, // bsp, l, k, j, h, g, f, d, s, a\n    {0x0d, 0x00, 0x00},\n    {'$', 0x00, 0x00},\n    {'m', 'M', '.', 0x00, Key::MUTE_TOGGLE},\n    {'n', 'N', ','},\n    {'b', 'B', '!', 0x00, Key::BL_TOGGLE},\n    {'v', 'V', '?'},\n    {'c', 'C', '9'},\n    {'x', 'X', '8', 0x00, Key::DOWN},\n    {'z', 'Z', '7'},\n    {0x00, 0x00, 0x00}, // Ent, $, m, n, b, v, c, x, z, alt\n    {0x00, 0x00, 0x00},\n    {0x00, 0x00, 0x00},\n    {0x20, 0x00, 0x00},\n    {0x00, 0x00, '0'},\n    {0x00, 0x00, 0x00} // R_Shift, sym, space, mic, L_Shift\n};\n\nTDeckProKeyboard::TDeckProKeyboard()\n    : TCA8418KeyboardBase(_TCA8418_ROWS, _TCA8418_COLS), modifierFlag(0), last_modifier_time(0), last_key(UINT8_MAX),\n      next_key(UINT8_MAX), last_tap(0L), char_idx(0), tap_interval(0)\n{\n}\n\nvoid TDeckProKeyboard::reset()\n{\n    TCA8418KeyboardBase::reset();\n    pinMode(KB_BL_PIN, OUTPUT);\n    setBacklight(false);\n}\n\n// handle multi-key presses (shift and alt)\nvoid TDeckProKeyboard::trigger()\n{\n    uint8_t count = keyCount();\n    if (count == 0)\n        return;\n    for (uint8_t i = 0; i < count; ++i) {\n        uint8_t k = readRegister(TCA8418_REG_KEY_EVENT_A + i);\n        uint8_t key = k & 0x7F;\n        if (k & 0x80) {\n            pressed(key);\n        } else {\n            released();\n            state = Idle;\n        }\n    }\n}\n\nvoid TDeckProKeyboard::pressed(uint8_t key)\n{\n    if (state == Init || state == Busy) {\n        return;\n    }\n    if (modifierFlag && (millis() - last_modifier_time > _TCA8418_MULTI_TAP_THRESHOLD)) {\n        modifierFlag = 0;\n    }\n\n    int row = (key - 1) / 10;\n    int col = (key - 1) % 10;\n\n    if (row >= _TCA8418_ROWS || col >= _TCA8418_COLS) {\n        return; // Invalid key\n    }\n\n    next_key = row * _TCA8418_COLS + col;\n    state = Held;\n\n    uint32_t now = millis();\n    tap_interval = now - last_tap;\n\n    updateModifierFlag(next_key);\n    if (isModifierKey(next_key)) {\n        last_modifier_time = now;\n    }\n\n    if (tap_interval < 0) {\n        last_tap = 0;\n        state = Busy;\n        return;\n    }\n\n    if (next_key != last_key || tap_interval > _TCA8418_MULTI_TAP_THRESHOLD) {\n        char_idx = 0;\n    } else {\n        char_idx += 1;\n    }\n\n    last_key = next_key;\n    last_tap = now;\n}\n\nvoid TDeckProKeyboard::released()\n{\n    if (state != Held) {\n        return;\n    }\n\n    if (last_key >= _TCA8418_NUM_KEYS) {\n        last_key = UINT8_MAX;\n        state = Idle;\n        return;\n    }\n\n    uint32_t now = millis();\n    last_tap = now;\n\n    if (TDeckProTapMap[last_key][modifierFlag % TDeckProTapMod[last_key]] == Key::BL_TOGGLE) {\n        toggleBacklight();\n        return;\n    }\n\n    queueEvent(TDeckProTapMap[last_key][modifierFlag % TDeckProTapMod[last_key]]);\n    if (isModifierKey(last_key) == false)\n        modifierFlag = 0;\n}\n\nvoid TDeckProKeyboard::setBacklight(bool on)\n{\n    if (on) {\n        digitalWrite(KB_BL_PIN, HIGH);\n    } else {\n        digitalWrite(KB_BL_PIN, LOW);\n    }\n}\n\nvoid TDeckProKeyboard::toggleBacklight(void)\n{\n    digitalWrite(KB_BL_PIN, !digitalRead(KB_BL_PIN));\n}\n\nvoid TDeckProKeyboard::updateModifierFlag(uint8_t key)\n{\n    if (key == modifierRightShiftKey) {\n        modifierFlag ^= modifierRightShift;\n    } else if (key == modifierLeftShiftKey) {\n        modifierFlag ^= modifierLeftShift;\n    } else if (key == modifierSymKey) {\n        modifierFlag ^= modifierSym;\n    } else if (key == modifierAltKey) {\n        modifierFlag ^= modifierAlt;\n    }\n}\n\nbool TDeckProKeyboard::isModifierKey(uint8_t key)\n{\n    return (key == modifierRightShiftKey || key == modifierLeftShiftKey || key == modifierAltKey || key == modifierSymKey);\n}\n\n#endif // T_DECK_PRO"
  },
  {
    "path": "src/input/TDeckProKeyboard.h",
    "content": "#include \"TCA8418KeyboardBase.h\"\n\nclass TDeckProKeyboard : public TCA8418KeyboardBase\n{\n  public:\n    TDeckProKeyboard();\n    void reset(void) override;\n    void trigger(void) override;\n    void setBacklight(bool on) override;\n\n  protected:\n    void pressed(uint8_t key) override;\n    void released(void) override;\n\n    void updateModifierFlag(uint8_t key);\n    bool isModifierKey(uint8_t key);\n    void toggleBacklight(void);\n\n  private:\n    uint8_t modifierFlag;        // Flag to indicate if a modifier key is pressed\n    uint32_t last_modifier_time; // Timestamp of the last modifier key press\n    uint8_t last_key;\n    uint8_t next_key;\n    uint32_t last_tap;\n    uint8_t char_idx;\n    int32_t tap_interval;\n};\n"
  },
  {
    "path": "src/input/TLoraPagerKeyboard.cpp",
    "content": "#if defined(T_LORA_PAGER)\n\n#include \"TLoraPagerKeyboard.h\"\n#include \"main.h\"\n\n#ifndef LEDC_BACKLIGHT_CHANNEL\n#define LEDC_BACKLIGHT_CHANNEL 4\n#endif\n\n#ifndef LEDC_BACKLIGHT_BIT_WIDTH\n#define LEDC_BACKLIGHT_BIT_WIDTH 8\n#endif\n\n#ifndef LEDC_BACKLIGHT_FREQ\n#define LEDC_BACKLIGHT_FREQ 1000 // Hz\n#endif\n\n#define _TCA8418_COLS 10\n#define _TCA8418_ROWS 4\n#define _TCA8418_NUM_KEYS 31\n\n#define _TCA8418_MULTI_TAP_THRESHOLD 1500\n\nusing Key = TCA8418KeyboardBase::TCA8418Key;\n\nconstexpr uint8_t modifierRightShiftKey = 29 - 1; // keynum -1\nconstexpr uint8_t modifierRightShift = 0b0001;\nconstexpr uint8_t modifierSymKey = 21 - 1;\nconstexpr uint8_t modifierSym = 0b0010;\n\n// Num chars per key, Modulus for rotating through characters\nstatic uint8_t TLoraPagerTapMod[_TCA8418_NUM_KEYS] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n                                                      3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3};\n\nstatic unsigned char TLoraPagerTapMap[_TCA8418_NUM_KEYS][3] = {{'q', 'Q', '1'},\n                                                               {'w', 'W', '2'},\n                                                               {'e', 'E', '3'},\n                                                               {'r', 'R', '4'},\n                                                               {'t', 'T', '5'},\n                                                               {'y', 'Y', '6'},\n                                                               {'u', 'U', '7'},\n                                                               {'i', 'I', '8'},\n                                                               {'o', 'O', '9'},\n                                                               {'p', 'P', '0'},\n                                                               {'a', 'A', '*'},\n                                                               {'s', 'S', '/'},\n                                                               {'d', 'D', '+'},\n                                                               {'f', 'F', '-'},\n                                                               {'g', 'G', '='},\n                                                               {'h', 'H', ':'},\n                                                               {'j', 'J', '\\''},\n                                                               {'k', 'K', '\"'},\n                                                               {'l', 'L', '@'},\n                                                               {Key::SELECT, 0x00, Key::TAB},\n                                                               {0x00, 0x00, 0x00},\n                                                               {'z', 'Z', '_'},\n                                                               {'x', 'X', '$'},\n                                                               {'c', 'C', ';'},\n                                                               {'v', 'V', '?'},\n                                                               {'b', 'B', '!'},\n                                                               {'n', 'N', ','},\n                                                               {'m', 'M', '.'},\n                                                               {0x00, 0x00, 0x00},\n                                                               {Key::BSP, 0x00, Key::ESC},\n                                                               {' ', 0x00, Key::BL_TOGGLE}};\n\nTLoraPagerKeyboard::TLoraPagerKeyboard()\n    : TCA8418KeyboardBase(_TCA8418_ROWS, _TCA8418_COLS), modifierFlag(0), last_modifier_time(0), last_key(UINT8_MAX),\n      next_key(UINT8_MAX), last_tap(0L), char_idx(0), tap_interval(0)\n{\n#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)\n    ledcAttach(KB_BL_PIN, LEDC_BACKLIGHT_FREQ, LEDC_BACKLIGHT_BIT_WIDTH);\n#else\n    ledcSetup(LEDC_BACKLIGHT_CHANNEL, LEDC_BACKLIGHT_FREQ, LEDC_BACKLIGHT_BIT_WIDTH);\n    ledcAttachPin(KB_BL_PIN, LEDC_BACKLIGHT_CHANNEL);\n#endif\n    reset();\n}\n\nvoid TLoraPagerKeyboard::reset(void)\n{\n    TCA8418KeyboardBase::reset();\n    pinMode(KB_BL_PIN, OUTPUT);\n    digitalWrite(KB_BL_PIN, LOW);\n    setBacklight(false);\n}\n\n// handle multi-key presses (shift and alt)\nvoid TLoraPagerKeyboard::trigger()\n{\n    uint8_t count = keyCount();\n    if (count == 0)\n        return;\n    for (uint8_t i = 0; i < count; ++i) {\n        uint8_t k = readRegister(TCA8418_REG_KEY_EVENT_A + i);\n        uint8_t key = k & 0x7F;\n        if (k & 0x80) {\n            pressed(key);\n        } else {\n            released();\n            state = Idle;\n        }\n    }\n}\n\nvoid TLoraPagerKeyboard::setBacklight(bool on)\n{\n    uint32_t _brightness = 0;\n    if (on)\n        _brightness = brightness;\n#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)\n    ledcWrite(KB_BL_PIN, _brightness);\n#else\n    ledcWrite(LEDC_BACKLIGHT_CHANNEL, _brightness);\n#endif\n}\n\nvoid TLoraPagerKeyboard::pressed(uint8_t key)\n{\n    if (state == Init || state == Busy) {\n        return;\n    }\n    if (config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_ALL_ENABLED ||\n        config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_SYSTEM_ONLY) {\n        hapticFeedback();\n    }\n\n    if (modifierFlag && (millis() - last_modifier_time > _TCA8418_MULTI_TAP_THRESHOLD)) {\n        modifierFlag = 0;\n    }\n\n    int row = (key - 1) / 10;\n    int col = (key - 1) % 10;\n\n    if (row >= _TCA8418_ROWS || col >= _TCA8418_COLS) {\n        return; // Invalid key\n    }\n\n    next_key = row * _TCA8418_COLS + col;\n    state = Held;\n\n    uint32_t now = millis();\n    tap_interval = now - last_tap;\n\n    updateModifierFlag(next_key);\n    if (isModifierKey(next_key)) {\n        last_modifier_time = now;\n    }\n\n    if (tap_interval < 0) {\n        last_tap = 0;\n        state = Busy;\n        return;\n    }\n\n    if (next_key != last_key || tap_interval > _TCA8418_MULTI_TAP_THRESHOLD) {\n        char_idx = 0;\n    } else {\n        char_idx += 1;\n    }\n\n    last_key = next_key;\n    last_tap = now;\n}\n\nvoid TLoraPagerKeyboard::released()\n{\n    if (state != Held) {\n        return;\n    }\n\n    if (last_key >= _TCA8418_NUM_KEYS) {\n        last_key = UINT8_MAX;\n        state = Idle;\n        return;\n    }\n\n    uint32_t now = millis();\n    last_tap = now;\n\n    if (TLoraPagerTapMap[last_key][modifierFlag % TLoraPagerTapMod[last_key]] == Key::BL_TOGGLE) {\n        toggleBacklight();\n        return;\n    }\n\n    queueEvent(TLoraPagerTapMap[last_key][modifierFlag % TLoraPagerTapMod[last_key]]);\n    if (isModifierKey(last_key) == false)\n        modifierFlag = 0;\n}\n\nvoid TLoraPagerKeyboard::hapticFeedback()\n{\n    drv.setWaveform(0, 14); // strong buzz 100%\n    drv.setWaveform(1, 0);  // end waveform\n    drv.go();\n}\n\n// toggle brightness of the backlight in three steps\nvoid TLoraPagerKeyboard::toggleBacklight(bool off)\n{\n    if (off) {\n        brightness = 0;\n    } else {\n        if (brightness == 0) {\n            brightness = 40;\n        } else if (brightness == 40) {\n            brightness = 127;\n        } else if (brightness >= 127) {\n            brightness = 0;\n        }\n    }\n    LOG_DEBUG(\"Toggle backlight: %d\", brightness);\n\n    setBacklight(true);\n}\n\nvoid TLoraPagerKeyboard::updateModifierFlag(uint8_t key)\n{\n    if (key == modifierRightShiftKey) {\n        modifierFlag ^= modifierRightShift;\n    } else if (key == modifierSymKey) {\n        modifierFlag ^= modifierSym;\n    }\n}\n\nbool TLoraPagerKeyboard::isModifierKey(uint8_t key)\n{\n    return (key == modifierRightShiftKey || key == modifierSymKey);\n}\n\n#endif"
  },
  {
    "path": "src/input/TLoraPagerKeyboard.h",
    "content": "#include \"TCA8418KeyboardBase.h\"\n\nclass TLoraPagerKeyboard : public TCA8418KeyboardBase\n{\n  public:\n    TLoraPagerKeyboard();\n    void reset(void);\n    void trigger(void) override;\n    void setBacklight(bool on) override;\n    virtual ~TLoraPagerKeyboard() {}\n\n  protected:\n    void pressed(uint8_t key) override;\n    void released(void) override;\n    void hapticFeedback(void);\n\n    void updateModifierFlag(uint8_t key);\n    bool isModifierKey(uint8_t key);\n    void toggleBacklight(bool off = false);\n\n  private:\n    uint8_t modifierFlag;        // Flag to indicate if a modifier key is pressed\n    uint32_t last_modifier_time; // Timestamp of the last modifier key press\n    uint8_t last_key;\n    uint8_t next_key;\n    uint32_t last_tap;\n    uint8_t char_idx;\n    int32_t tap_interval;\n    uint32_t brightness = 0;\n};\n"
  },
  {
    "path": "src/input/TouchScreenBase.cpp",
    "content": "#include \"TouchScreenBase.h\"\n#include \"main.h\"\n\n#if defined(RAK14014) && !defined(MESHTASTIC_EXCLUDE_CANNEDMESSAGES)\n#include \"modules/CannedMessageModule.h\"\n#endif\n\n#ifndef TIME_LONG_PRESS\n#define TIME_LONG_PRESS 400\n#endif\n\n// move a minimum distance over the screen to detect a \"swipe\"\n#ifndef TOUCH_THRESHOLD_X\n#define TOUCH_THRESHOLD_X 30\n#endif\n\n#ifndef TOUCH_THRESHOLD_Y\n#define TOUCH_THRESHOLD_Y 20\n#endif\n\nTouchScreenBase::TouchScreenBase(const char *name, uint16_t width, uint16_t height)\n    : concurrency::OSThread(name), _display_width(width), _display_height(height), _first_x(0), _last_x(0), _first_y(0),\n      _last_y(0), _start(0), _tapped(false), _originName(name)\n{\n}\n\nvoid TouchScreenBase::init(bool hasTouch)\n{\n    if (hasTouch) {\n        LOG_INFO(\"TouchScreen initialized %d %d\", TOUCH_THRESHOLD_X, TOUCH_THRESHOLD_Y);\n        this->setInterval(100);\n    } else {\n        disable();\n        this->setInterval(UINT_MAX);\n    }\n}\n\nint32_t TouchScreenBase::runOnce()\n{\n    TouchEvent e;\n    e.touchEvent = static_cast<char>(TOUCH_ACTION_NONE);\n\n    // process touch events\n    int16_t x, y;\n    bool touched = getTouch(x, y);\n    if (x < 0 || y < 0) // T-deck can emit phantom touch events with a negative value when turning off the screen\n        touched = false;\n    if (touched) {\n        this->setInterval(20);\n        _last_x = x;\n        _last_y = y;\n    }\n    if (touched != _touchedOld) {\n        if (touched) {\n            hapticFeedback();\n            _state = TOUCH_EVENT_OCCURRED;\n            _start = millis();\n            _first_x = x;\n            _first_y = y;\n        } else {\n            _state = TOUCH_EVENT_CLEARED;\n            time_t duration = millis() - _start;\n            x = _last_x;\n            y = _last_y;\n            this->setInterval(50);\n\n            // compute distance\n            int16_t dx = x - _first_x;\n            int16_t dy = y - _first_y;\n            uint16_t adx = abs(dx);\n            uint16_t ady = abs(dy);\n\n            // swipe horizontal\n            if (adx > ady && adx > TOUCH_THRESHOLD_X) {\n                if (0 > dx) { // swipe right to left\n                    e.touchEvent = static_cast<char>(TOUCH_ACTION_LEFT);\n                    LOG_DEBUG(\"action SWIPE: right to left\");\n                } else { // swipe left to right\n                    e.touchEvent = static_cast<char>(TOUCH_ACTION_RIGHT);\n                    LOG_DEBUG(\"action SWIPE: left to right\");\n                }\n            }\n            // swipe vertical\n            else if (ady > adx && ady > TOUCH_THRESHOLD_Y) {\n                if (0 > dy) { // swipe bottom to top\n                    e.touchEvent = static_cast<char>(TOUCH_ACTION_UP);\n                    LOG_DEBUG(\"action SWIPE: bottom to top\");\n                } else { // swipe top to bottom\n                    e.touchEvent = static_cast<char>(TOUCH_ACTION_DOWN);\n                    LOG_DEBUG(\"action SWIPE: top to bottom\");\n                }\n            }\n            // tap\n            else {\n                if (duration > 0 && duration < TIME_LONG_PRESS) {\n                    if (_tapped) {\n                        _tapped = false;\n                    } else {\n                        _tapped = true;\n                    }\n                } else {\n                    _tapped = false;\n                }\n            }\n        }\n    }\n    _touchedOld = touched;\n\n#if defined RAK14014\n    // Speed up the processing speed of the keyboard in virtual keyboard mode\n    auto state = cannedMessageModule->getRunState();\n    if (state == CANNED_MESSAGE_RUN_STATE_FREETEXT) {\n        if (_tapped) {\n            _tapped = false;\n            e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);\n            LOG_DEBUG(\"action TAP(%d/%d)\", _last_x, _last_y);\n        }\n    } else {\n        if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {\n            _tapped = false;\n            e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);\n            LOG_DEBUG(\"action TAP(%d/%d)\", _last_x, _last_y);\n        }\n    }\n#else\n    // fire TAP event when no 2nd tap occurred within time\n    if (_tapped) {\n        _tapped = false;\n        e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);\n        LOG_DEBUG(\"action TAP(%d/%d)\", _last_x, _last_y);\n    }\n#endif\n\n    // fire LONG_PRESS event without the need for release\n    if (touched && (time_t(millis()) - _start) > TIME_LONG_PRESS) {\n        // tricky: prevent reoccurring events and another touch event when releasing\n        _start = millis() + 30000;\n        e.touchEvent = static_cast<char>(TOUCH_ACTION_LONG_PRESS);\n        LOG_DEBUG(\"action LONG PRESS(%d/%d)\", _last_x, _last_y);\n    }\n\n    if (e.touchEvent != TOUCH_ACTION_NONE) {\n        e.source = this->_originName;\n        e.x = _last_x;\n        e.y = _last_y;\n        onEvent(e);\n    }\n\n    return interval;\n}\n\nvoid TouchScreenBase::hapticFeedback()\n{\n#ifdef T_WATCH_S3\n    drv.setWaveform(0, 75);\n    drv.setWaveform(1, 0); // end waveform\n    drv.go();\n#endif\n}\n"
  },
  {
    "path": "src/input/TouchScreenBase.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"concurrency/OSThread.h\"\n#include \"mesh/NodeDB.h\"\n#include \"time.h\"\n\ntypedef struct _TouchEvent {\n    const char *source;\n    char touchEvent;\n    uint16_t x;\n    uint16_t y;\n} TouchEvent;\n\nclass TouchScreenBase : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit TouchScreenBase(const char *name, uint16_t width, uint16_t height);\n    void init(bool hasTouch);\n\n  protected:\n    enum TouchScreenBaseStateType { TOUCH_EVENT_OCCURRED, TOUCH_EVENT_CLEARED };\n\n    enum TouchScreenBaseEventType {\n        TOUCH_ACTION_NONE,\n        TOUCH_ACTION_UP,\n        TOUCH_ACTION_DOWN,\n        TOUCH_ACTION_LEFT,\n        TOUCH_ACTION_RIGHT,\n        TOUCH_ACTION_TAP,\n        TOUCH_ACTION_LONG_PRESS\n    };\n\n    virtual int32_t runOnce() override;\n\n    virtual bool getTouch(int16_t &x, int16_t &y) = 0;\n    virtual void onEvent(const TouchEvent &event) = 0;\n\n    volatile TouchScreenBaseStateType _state = TOUCH_EVENT_CLEARED;\n    volatile TouchScreenBaseEventType _action = TOUCH_ACTION_NONE;\n    void hapticFeedback();\n\n  protected:\n    uint16_t _display_width;\n    uint16_t _display_height;\n\n  private:\n    bool _touchedOld = false;  // previous touch state\n    int16_t _first_x, _last_x; // horizontal swipe direction\n    int16_t _first_y, _last_y; // vertical swipe direction\n    time_t _start;             // for LONG_PRESS\n    bool _tapped;              // for DOUBLE_TAP\n\n    const char *_originName;\n};\n"
  },
  {
    "path": "src/input/TouchScreenImpl1.cpp",
    "content": "#include \"TouchScreenImpl1.h\"\n#include \"InputBroker.h\"\n#include \"PowerFSM.h\"\n#include \"configuration.h\"\n#include \"modules/ExternalNotificationModule.h\"\n\n#if ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\nTouchScreenImpl1 *touchScreenImpl1;\n\nTouchScreenImpl1::TouchScreenImpl1(uint16_t width, uint16_t height, bool (*getTouch)(int16_t *, int16_t *))\n    : TouchScreenBase(\"touchscreen1\", width, height), _getTouch(getTouch)\n{\n}\n\nvoid TouchScreenImpl1::init()\n{\n#if ARCH_PORTDUINO\n    if (portduino_config.touchscreenModule) {\n        TouchScreenBase::init(true);\n        inputBroker->registerSource(this);\n    } else {\n        TouchScreenBase::init(false);\n    }\n#elif !HAS_TOUCHSCREEN\n    TouchScreenBase::init(false);\n    return;\n#else\n    TouchScreenBase::init(true);\n    inputBroker->registerSource(this);\n#endif\n}\n\nbool TouchScreenImpl1::getTouch(int16_t &x, int16_t &y)\n{\n    return _getTouch(&x, &y);\n}\n\n/**\n * @brief forward touchscreen event\n *\n * @param event\n *\n * The touchscreen events are translated to input events and reversed\n */\nvoid TouchScreenImpl1::onEvent(const TouchEvent &event)\n{\n    InputEvent e = {};\n    e.source = event.source;\n    e.kbchar = 0;\n    e.touchX = event.x;\n    e.touchY = event.y;\n\n    switch (event.touchEvent) {\n    case TOUCH_ACTION_LEFT: {\n        e.inputEvent = INPUT_BROKER_LEFT;\n        break;\n    }\n    case TOUCH_ACTION_RIGHT: {\n        e.inputEvent = INPUT_BROKER_RIGHT;\n        break;\n    }\n    case TOUCH_ACTION_UP: {\n        e.inputEvent = INPUT_BROKER_UP;\n        break;\n    }\n    case TOUCH_ACTION_DOWN: {\n        e.inputEvent = INPUT_BROKER_DOWN;\n        break;\n    }\n    case TOUCH_ACTION_LONG_PRESS: {\n        e.inputEvent = INPUT_BROKER_SELECT;\n        break;\n    }\n    case TOUCH_ACTION_TAP: {\n        e.inputEvent = INPUT_BROKER_USER_PRESS;\n        break;\n    }\n    default:\n        return;\n    }\n    this->notifyObservers(&e);\n}"
  },
  {
    "path": "src/input/TouchScreenImpl1.h",
    "content": "#pragma once\n#include \"TouchScreenBase.h\"\n\nclass TouchScreenImpl1 : public TouchScreenBase\n{\n  public:\n    TouchScreenImpl1(uint16_t width, uint16_t height, bool (*getTouch)(int16_t *, int16_t *));\n    void init(void);\n\n  protected:\n    virtual bool getTouch(int16_t &x, int16_t &y);\n    virtual void onEvent(const TouchEvent &event);\n\n    bool (*_getTouch)(int16_t *, int16_t *);\n};\n\nextern TouchScreenImpl1 *touchScreenImpl1;\n"
  },
  {
    "path": "src/input/TrackballInterruptBase.cpp",
    "content": "#include \"TrackballInterruptBase.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n\nextern bool osk_found;\n\nTrackballInterruptBase::TrackballInterruptBase(const char *name) : concurrency::OSThread(name), _originName(name) {}\n\nvoid TrackballInterruptBase::init(uint8_t pinDown, uint8_t pinUp, uint8_t pinLeft, uint8_t pinRight, uint8_t pinPress,\n                                  input_broker_event eventDown, input_broker_event eventUp, input_broker_event eventLeft,\n                                  input_broker_event eventRight, input_broker_event eventPressed,\n                                  input_broker_event eventPressedLong, void (*onIntDown)(), void (*onIntUp)(),\n                                  void (*onIntLeft)(), void (*onIntRight)(), void (*onIntPress)())\n{\n    this->_pinDown = pinDown;\n    this->_pinUp = pinUp;\n    this->_pinLeft = pinLeft;\n    this->_pinRight = pinRight;\n    this->_pinPress = pinPress;\n    this->_eventDown = eventDown;\n    this->_eventUp = eventUp;\n    this->_eventLeft = eventLeft;\n    this->_eventRight = eventRight;\n    this->_eventPressed = eventPressed;\n    this->_eventPressedLong = eventPressedLong;\n\n    if (pinPress != 255) {\n        pinMode(pinPress, INPUT_PULLUP);\n        attachInterrupt(pinPress, onIntPress, TB_DIRECTION);\n    }\n    if (this->_pinDown != 255) {\n        pinMode(this->_pinDown, INPUT_PULLUP);\n        attachInterrupt(this->_pinDown, onIntDown, TB_DIRECTION);\n    }\n    if (this->_pinUp != 255) {\n        pinMode(this->_pinUp, INPUT_PULLUP);\n        attachInterrupt(this->_pinUp, onIntUp, TB_DIRECTION);\n    }\n    if (this->_pinLeft != 255) {\n        pinMode(this->_pinLeft, INPUT_PULLUP);\n        attachInterrupt(this->_pinLeft, onIntLeft, TB_DIRECTION);\n    }\n    if (this->_pinRight != 255) {\n        pinMode(this->_pinRight, INPUT_PULLUP);\n        attachInterrupt(this->_pinRight, onIntRight, TB_DIRECTION);\n    }\n\n    LOG_DEBUG(\"Trackball GPIO initialized - UP:%d DOWN:%d LEFT:%d RIGHT:%d PRESS:%d\", this->_pinUp, this->_pinDown,\n              this->_pinLeft, this->_pinRight, pinPress);\n#ifndef HAS_PHYSICAL_KEYBOARD\n    osk_found = true;\n#endif\n    this->setInterval(100);\n}\n\nint32_t TrackballInterruptBase::runOnce()\n{\n    InputEvent e = {};\n    e.inputEvent = INPUT_BROKER_NONE;\n#if TB_THRESHOLD\n    if (lastInterruptTime && !Throttle::isWithinTimespanMs(lastInterruptTime, 1000)) {\n        left_counter = 0;\n        right_counter = 0;\n        up_counter = 0;\n        down_counter = 0;\n        lastInterruptTime = 0;\n    }\n#ifdef INPUT_DEBUG\n    if (left_counter > 0 || right_counter > 0 || up_counter > 0 || down_counter > 0) {\n        LOG_DEBUG(\"L %u R %u U %u D %u, time %u\", left_counter, right_counter, up_counter, down_counter, millis());\n    }\n#endif\n#endif\n\n    // Handle long press detection for press button\n    if (pressDetected && pressStartTime > 0) {\n        uint32_t pressDuration = millis() - pressStartTime;\n        bool buttonStillPressed = false;\n\n        buttonStillPressed = !digitalRead(_pinPress);\n\n        if (!buttonStillPressed) {\n            // Button released\n            if (pressDuration < LONG_PRESS_DURATION) {\n                // Short press\n                e.inputEvent = this->_eventPressed;\n            }\n            // Reset state\n            pressDetected = false;\n            pressStartTime = 0;\n            lastLongPressEventTime = 0;\n            this->action = TB_ACTION_NONE;\n        } else if (pressDuration >= LONG_PRESS_DURATION) {\n            // Long press detected\n            uint32_t currentTime = millis();\n            // Only trigger long press event if enough time has passed since the last one\n            if (lastLongPressEventTime == 0 || (currentTime - lastLongPressEventTime) >= LONG_PRESS_REPEAT_INTERVAL) {\n                e.inputEvent = this->_eventPressedLong;\n                lastLongPressEventTime = currentTime;\n            }\n            this->action = TB_ACTION_PRESSED_LONG;\n        }\n    }\n\n    if (directionDetected && directionStartTime > 0) {\n        uint32_t directionDuration = millis() - directionStartTime;\n        uint8_t directionPressedNow = 0;\n        directionInterval++;\n\n        if (!digitalRead(_pinUp)) {\n            directionPressedNow = TB_ACTION_UP;\n        } else if (!digitalRead(_pinDown)) {\n            directionPressedNow = TB_ACTION_DOWN;\n        } else if (!digitalRead(_pinLeft)) {\n            directionPressedNow = TB_ACTION_LEFT;\n        } else if (!digitalRead(_pinRight)) {\n            directionPressedNow = TB_ACTION_RIGHT;\n        }\n\n        const uint8_t DIRECTION_REPEAT_THRESHOLD = 3;\n\n        if (directionPressedNow == TB_ACTION_NONE) {\n            // Reset state\n            directionDetected = false;\n            directionStartTime = 0;\n            directionInterval = 0;\n            this->action = TB_ACTION_NONE;\n        } else if (directionDuration >= LONG_PRESS_DURATION && directionInterval >= DIRECTION_REPEAT_THRESHOLD) {\n            // repeat event when long press these direction.\n            switch (directionPressedNow) {\n            case TB_ACTION_UP:\n                e.inputEvent = this->_eventUp;\n                break;\n            case TB_ACTION_DOWN:\n                e.inputEvent = this->_eventDown;\n                break;\n            case TB_ACTION_LEFT:\n                e.inputEvent = this->_eventLeft;\n                break;\n            case TB_ACTION_RIGHT:\n                e.inputEvent = this->_eventRight;\n                break;\n            }\n\n            directionInterval = 0;\n        }\n    }\n\n#if TB_THRESHOLD\n    if (this->action == TB_ACTION_PRESSED && (!pressDetected || pressStartTime == 0)) {\n        // Start long press detection\n        pressDetected = true;\n        pressStartTime = millis();\n        // Don't send event yet, wait to see if it's a long press\n    } else if (up_counter >= TB_THRESHOLD) {\n#ifdef INPUT_DEBUG\n        LOG_DEBUG(\"Trackball event UP %u\", millis());\n#endif\n        e.inputEvent = this->_eventUp;\n    } else if (down_counter >= TB_THRESHOLD) {\n#ifdef INPUT_DEBUG\n        LOG_DEBUG(\"Trackball event DOWN %u\", millis());\n#endif\n        e.inputEvent = this->_eventDown;\n    } else if (left_counter >= TB_THRESHOLD) {\n#ifdef INPUT_DEBUG\n        LOG_DEBUG(\"Trackball event LEFT %u\", millis());\n#endif\n        e.inputEvent = this->_eventLeft;\n    } else if (right_counter >= TB_THRESHOLD) {\n#ifdef INPUT_DEBUG\n        LOG_DEBUG(\"Trackball event RIGHT %u\", millis());\n#endif\n        e.inputEvent = this->_eventRight;\n    }\n#else\n    if (this->action == TB_ACTION_PRESSED && !digitalRead(_pinPress) && !pressDetected) {\n        // Start long press detection\n        pressDetected = true;\n        pressStartTime = millis();\n        // Don't send event yet, wait to see if it's a long press\n    } else if (this->action == TB_ACTION_UP && !digitalRead(_pinUp) && !directionDetected) {\n        directionDetected = true;\n        directionStartTime = millis();\n        e.inputEvent = this->_eventUp;\n        // send event first,will automatically trigger every 50ms * 3 after 500ms\n    } else if (this->action == TB_ACTION_DOWN && !digitalRead(_pinDown) && !directionDetected) {\n        directionDetected = true;\n        directionStartTime = millis();\n        e.inputEvent = this->_eventDown;\n    } else if (this->action == TB_ACTION_LEFT && !digitalRead(_pinLeft) && !directionDetected) {\n        directionDetected = true;\n        directionStartTime = millis();\n        e.inputEvent = this->_eventLeft;\n    } else if (this->action == TB_ACTION_RIGHT && !digitalRead(_pinRight) && !directionDetected) {\n        directionDetected = true;\n        directionStartTime = millis();\n        e.inputEvent = this->_eventRight;\n    }\n#endif\n\n    if (e.inputEvent != INPUT_BROKER_NONE) {\n        e.source = this->_originName;\n        e.kbchar = 0x00;\n        this->notifyObservers(&e);\n#if TB_THRESHOLD\n        left_counter = 0;\n        right_counter = 0;\n        up_counter = 0;\n        down_counter = 0;\n#endif\n    }\n\n    // Only update lastEvent for non-press actions or completed press actions\n    if (this->action != TB_ACTION_PRESSED || !pressDetected) {\n        lastEvent = action;\n        if (!pressDetected) {\n            this->action = TB_ACTION_NONE;\n        }\n    }\n\n    return 50; // Check more frequently for better long press detection\n}\n\nvoid TrackballInterruptBase::intPressHandler()\n{\n    if (!Throttle::isWithinTimespanMs(lastInterruptTime, 10))\n        this->action = TB_ACTION_PRESSED;\n    lastInterruptTime = millis();\n}\n\nvoid TrackballInterruptBase::intDownHandler()\n{\n    if (TB_THRESHOLD || !Throttle::isWithinTimespanMs(lastInterruptTime, 10))\n        this->action = TB_ACTION_DOWN;\n    lastInterruptTime = millis();\n\n#if TB_THRESHOLD\n    down_counter++;\n#endif\n}\n\nvoid TrackballInterruptBase::intUpHandler()\n{\n    if (TB_THRESHOLD || !Throttle::isWithinTimespanMs(lastInterruptTime, 10))\n        this->action = TB_ACTION_UP;\n    lastInterruptTime = millis();\n\n#if TB_THRESHOLD\n    up_counter++;\n#endif\n}\n\nvoid TrackballInterruptBase::intLeftHandler()\n{\n    if (TB_THRESHOLD || !Throttle::isWithinTimespanMs(lastInterruptTime, 10))\n        this->action = TB_ACTION_LEFT;\n    lastInterruptTime = millis();\n#if TB_THRESHOLD\n    left_counter++;\n#endif\n}\n\nvoid TrackballInterruptBase::intRightHandler()\n{\n    if (TB_THRESHOLD || !Throttle::isWithinTimespanMs(lastInterruptTime, 10))\n        this->action = TB_ACTION_RIGHT;\n    lastInterruptTime = millis();\n#if TB_THRESHOLD\n    right_counter++;\n#endif\n}\n"
  },
  {
    "path": "src/input/TrackballInterruptBase.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"mesh/NodeDB.h\"\n\n#ifndef TB_DIRECTION\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#define TB_DIRECTION (PinStatus) portduino_config.lora_usb_vid\n#else\n#define TB_DIRECTION RISING\n#endif\n#endif\n\n#ifndef TB_THRESHOLD\n#define TB_THRESHOLD 0\n#endif\n\nclass TrackballInterruptBase : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit TrackballInterruptBase(const char *name);\n    void init(uint8_t pinDown, uint8_t pinUp, uint8_t pinLeft, uint8_t pinRight, uint8_t pinPress, input_broker_event eventDown,\n              input_broker_event eventUp, input_broker_event eventLeft, input_broker_event eventRight,\n              input_broker_event eventPressed, input_broker_event eventPressedLong, void (*onIntDown)(), void (*onIntUp)(),\n              void (*onIntLeft)(), void (*onIntRight)(), void (*onIntPress)());\n    void intPressHandler();\n    void intDownHandler();\n    void intUpHandler();\n    void intLeftHandler();\n    void intRightHandler();\n    virtual int32_t runOnce() override;\n\n  protected:\n    enum TrackballInterruptBaseActionType {\n        TB_ACTION_NONE,\n        TB_ACTION_PRESSED,\n        TB_ACTION_PRESSED_LONG,\n        TB_ACTION_UP,\n        TB_ACTION_DOWN,\n        TB_ACTION_LEFT,\n        TB_ACTION_RIGHT\n    };\n    uint8_t _pinDown = 0;\n    uint8_t _pinUp = 0;\n    uint8_t _pinLeft = 0;\n    uint8_t _pinRight = 0;\n    uint8_t _pinPress = 0;\n\n    volatile TrackballInterruptBaseActionType action = TB_ACTION_NONE;\n\n    // Long press detection for press button\n    uint32_t pressStartTime = 0;\n    uint32_t directionStartTime = 0;\n    uint8_t directionInterval = 0;\n    bool pressDetected = false;\n    bool directionDetected = false;\n    uint32_t lastLongPressEventTime = 0;\n    uint32_t lastDirectionPressEventTime = 0;\n    static const uint32_t LONG_PRESS_DURATION = 500;        // ms\n    static const uint32_t LONG_PRESS_REPEAT_INTERVAL = 300; // ms - interval between repeated long press events\n\n  private:\n    input_broker_event _eventDown = INPUT_BROKER_NONE;\n    input_broker_event _eventUp = INPUT_BROKER_NONE;\n    input_broker_event _eventLeft = INPUT_BROKER_NONE;\n    input_broker_event _eventRight = INPUT_BROKER_NONE;\n    input_broker_event _eventPressed = INPUT_BROKER_NONE;\n    input_broker_event _eventPressedLong = INPUT_BROKER_NONE;\n    const char *_originName;\n    TrackballInterruptBaseActionType lastEvent = TB_ACTION_NONE;\n    volatile uint32_t lastInterruptTime = 0;\n\n#if TB_THRESHOLD\n    volatile uint8_t left_counter = 0;\n    volatile uint8_t right_counter = 0;\n    volatile uint8_t up_counter = 0;\n    volatile uint8_t down_counter = 0;\n#endif\n};\n"
  },
  {
    "path": "src/input/TrackballInterruptImpl1.cpp",
    "content": "#include \"TrackballInterruptImpl1.h\"\n#include \"InputBroker.h\"\n#include \"configuration.h\"\n\nTrackballInterruptImpl1 *trackballInterruptImpl1;\n\nTrackballInterruptImpl1::TrackballInterruptImpl1() : TrackballInterruptBase(\"trackball1\") {}\n\nvoid TrackballInterruptImpl1::init(uint8_t pinDown, uint8_t pinUp, uint8_t pinLeft, uint8_t pinRight, uint8_t pinPress)\n{\n    input_broker_event eventDown = INPUT_BROKER_DOWN;\n    input_broker_event eventUp = INPUT_BROKER_UP;\n    input_broker_event eventLeft = INPUT_BROKER_LEFT;\n    input_broker_event eventRight = INPUT_BROKER_RIGHT;\n    input_broker_event eventPressed = INPUT_BROKER_SELECT;\n    input_broker_event eventPressedLong = INPUT_BROKER_SELECT_LONG;\n\n    TrackballInterruptBase::init(pinDown, pinUp, pinLeft, pinRight, pinPress, eventDown, eventUp, eventLeft, eventRight,\n                                 eventPressed, eventPressedLong, TrackballInterruptImpl1::handleIntDown,\n                                 TrackballInterruptImpl1::handleIntUp, TrackballInterruptImpl1::handleIntLeft,\n                                 TrackballInterruptImpl1::handleIntRight, TrackballInterruptImpl1::handleIntPressed);\n    inputBroker->registerSource(this);\n}\n\nvoid TrackballInterruptImpl1::handleIntDown()\n{\n    trackballInterruptImpl1->intDownHandler();\n    trackballInterruptImpl1->setIntervalFromNow(20);\n}\nvoid TrackballInterruptImpl1::handleIntUp()\n{\n    trackballInterruptImpl1->intUpHandler();\n    trackballInterruptImpl1->setIntervalFromNow(20);\n}\nvoid TrackballInterruptImpl1::handleIntLeft()\n{\n    trackballInterruptImpl1->intLeftHandler();\n    trackballInterruptImpl1->setIntervalFromNow(20);\n}\nvoid TrackballInterruptImpl1::handleIntRight()\n{\n    trackballInterruptImpl1->intRightHandler();\n    trackballInterruptImpl1->setIntervalFromNow(20);\n}\nvoid TrackballInterruptImpl1::handleIntPressed()\n{\n    trackballInterruptImpl1->intPressHandler();\n    trackballInterruptImpl1->setIntervalFromNow(20);\n}\n"
  },
  {
    "path": "src/input/TrackballInterruptImpl1.h",
    "content": "#pragma once\n#include \"TrackballInterruptBase.h\"\n\nclass TrackballInterruptImpl1 : public TrackballInterruptBase\n{\n  public:\n    TrackballInterruptImpl1();\n    void init(uint8_t pinDown, uint8_t pinUp, uint8_t pinLeft, uint8_t pinRight, uint8_t pinPress);\n    static void handleIntDown();\n    static void handleIntUp();\n    static void handleIntLeft();\n    static void handleIntRight();\n    static void handleIntPressed();\n};\n\nextern TrackballInterruptImpl1 *trackballInterruptImpl1;\n"
  },
  {
    "path": "src/input/UpDownInterruptBase.cpp",
    "content": "#include \"UpDownInterruptBase.h\"\n#include \"configuration.h\"\n\nUpDownInterruptBase::UpDownInterruptBase(const char *name) : concurrency::OSThread(name)\n{\n    this->_originName = name;\n}\n\nvoid UpDownInterruptBase::init(uint8_t pinDown, uint8_t pinUp, uint8_t pinPress, input_broker_event eventDown,\n                               input_broker_event eventUp, input_broker_event eventPressed, input_broker_event eventPressedLong,\n                               input_broker_event eventUpLong, input_broker_event eventDownLong, void (*onIntDown)(),\n                               void (*onIntUp)(), void (*onIntPress)(), unsigned long updownDebounceMs)\n{\n    this->_pinDown = pinDown;\n    this->_pinUp = pinUp;\n    this->_pinPress = pinPress;\n    this->_eventDown = eventDown;\n    this->_eventUp = eventUp;\n    this->_eventPressed = eventPressed;\n    this->_eventPressedLong = eventPressedLong;\n    this->_eventUpLong = eventUpLong;\n    this->_eventDownLong = eventDownLong;\n\n    // Store debounce configuration passed by caller\n    this->updownDebounceMs = updownDebounceMs;\n    bool isRAK = false;\n#ifdef RAK_4631\n    isRAK = true;\n#endif\n\n    if (!isRAK || pinPress != 0) {\n        pinMode(pinPress, INPUT_PULLUP);\n        attachInterrupt(pinPress, onIntPress, FALLING);\n    }\n    if (!isRAK || this->_pinDown != 0) {\n        pinMode(this->_pinDown, INPUT_PULLUP);\n        attachInterrupt(this->_pinDown, onIntDown, FALLING);\n    }\n    if (!isRAK || this->_pinUp != 0) {\n        pinMode(this->_pinUp, INPUT_PULLUP);\n        attachInterrupt(this->_pinUp, onIntUp, FALLING);\n    }\n\n    LOG_DEBUG(\"Up/down/press GPIO initialized (%d, %d, %d)\", this->_pinUp, this->_pinDown, pinPress);\n\n    this->setInterval(20);\n}\n\nint32_t UpDownInterruptBase::runOnce()\n{\n    InputEvent e = {};\n    e.inputEvent = INPUT_BROKER_NONE;\n    unsigned long now = millis();\n\n    // Read all button states once at the beginning\n    bool pressButtonPressed = !digitalRead(_pinPress);\n    bool upButtonPressed = !digitalRead(_pinUp);\n    bool downButtonPressed = !digitalRead(_pinDown);\n\n    // Handle initial button press detection - only if not already detected\n    if (this->action == UPDOWN_ACTION_PRESSED && pressButtonPressed && !pressDetected) {\n        pressDetected = true;\n        pressStartTime = now;\n    } else if (this->action == UPDOWN_ACTION_UP && upButtonPressed && !upDetected) {\n        upDetected = true;\n        upStartTime = now;\n    } else if (this->action == UPDOWN_ACTION_DOWN && downButtonPressed && !downDetected) {\n        downDetected = true;\n        downStartTime = now;\n    }\n\n    // Handle long press detection for press button\n    if (pressDetected && pressStartTime > 0) {\n        uint32_t pressDuration = now - pressStartTime;\n\n        if (!pressButtonPressed) {\n            // Button released\n            if (pressDuration < LONG_PRESS_DURATION && now - lastPressKeyTime >= pressDebounceMs) {\n                lastPressKeyTime = now;\n                e.inputEvent = this->_eventPressed;\n            }\n            // Reset state\n            pressDetected = false;\n            pressStartTime = 0;\n            lastPressLongEventTime = 0;\n        } else if (pressDuration >= LONG_PRESS_DURATION && lastPressLongEventTime == 0) {\n            // First long press event only - avoid repeated events causing lag\n            e.inputEvent = this->_eventPressedLong;\n            lastPressLongEventTime = now;\n        }\n    }\n\n    // Handle long press detection for up button\n    if (upDetected && upStartTime > 0) {\n        uint32_t upDuration = now - upStartTime;\n\n        if (!upButtonPressed) {\n            // Button released\n            if (upDuration < LONG_PRESS_DURATION && now - lastUpKeyTime >= updownDebounceMs) {\n                lastUpKeyTime = now;\n                e.inputEvent = this->_eventUp;\n            }\n            // Reset state\n            upDetected = false;\n            upStartTime = 0;\n            lastUpLongEventTime = 0;\n        } else if (upDuration >= LONG_PRESS_DURATION) {\n            // Auto-repeat long press events\n            if (lastUpLongEventTime == 0 || (now - lastUpLongEventTime) >= LONG_PRESS_REPEAT_INTERVAL) {\n                e.inputEvent = this->_eventUpLong;\n                lastUpLongEventTime = now;\n            }\n        }\n    }\n\n    // Handle long press detection for down button\n    if (downDetected && downStartTime > 0) {\n        uint32_t downDuration = now - downStartTime;\n\n        if (!downButtonPressed) {\n            // Button released\n            if (downDuration < LONG_PRESS_DURATION && now - lastDownKeyTime >= updownDebounceMs) {\n                lastDownKeyTime = now;\n                e.inputEvent = this->_eventDown;\n            }\n            // Reset state\n            downDetected = false;\n            downStartTime = 0;\n            lastDownLongEventTime = 0;\n        } else if (downDuration >= LONG_PRESS_DURATION) {\n            // Auto-repeat long press events\n            if (lastDownLongEventTime == 0 || (now - lastDownLongEventTime) >= LONG_PRESS_REPEAT_INTERVAL) {\n                e.inputEvent = this->_eventDownLong;\n                lastDownLongEventTime = now;\n            }\n        }\n    }\n\n    if (e.inputEvent != INPUT_BROKER_NONE) {\n        e.source = this->_originName;\n        e.kbchar = INPUT_BROKER_NONE;\n        this->notifyObservers(&e);\n    }\n\n    if (!pressDetected && !upDetected && !downDetected) {\n        this->action = UPDOWN_ACTION_NONE;\n    }\n\n    return 20; // This will control how the input frequency\n}\n\nvoid UpDownInterruptBase::intPressHandler()\n{\n    this->action = UPDOWN_ACTION_PRESSED;\n}\n\nvoid UpDownInterruptBase::intDownHandler()\n{\n    this->action = UPDOWN_ACTION_DOWN;\n}\n\nvoid UpDownInterruptBase::intUpHandler()\n{\n    this->action = UPDOWN_ACTION_UP;\n}\n"
  },
  {
    "path": "src/input/UpDownInterruptBase.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"mesh/NodeDB.h\"\n\n#ifndef UPDOWN_LONG_PRESS_DURATION\n#define UPDOWN_LONG_PRESS_DURATION 300\n#endif\n\n#ifndef UPDOWN_LONG_PRESS_REPEAT_INTERVAL\n#define UPDOWN_LONG_PRESS_REPEAT_INTERVAL 300\n#endif\n\nclass UpDownInterruptBase : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit UpDownInterruptBase(const char *name);\n    void init(uint8_t pinDown, uint8_t pinUp, uint8_t pinPress, input_broker_event eventDown, input_broker_event eventUp,\n              input_broker_event eventPressed, input_broker_event eventPressedLong, input_broker_event eventUpLong,\n              input_broker_event eventDownLong, void (*onIntDown)(), void (*onIntUp)(), void (*onIntPress)(),\n              unsigned long updownDebounceMs = 50);\n    void intPressHandler();\n    void intDownHandler();\n    void intUpHandler();\n\n    int32_t runOnce() override;\n\n  protected:\n    enum UpDownInterruptBaseActionType {\n        UPDOWN_ACTION_NONE,\n        UPDOWN_ACTION_PRESSED,\n        UPDOWN_ACTION_PRESSED_LONG,\n        UPDOWN_ACTION_UP,\n        UPDOWN_ACTION_UP_LONG,\n        UPDOWN_ACTION_DOWN,\n        UPDOWN_ACTION_DOWN_LONG\n    };\n\n    volatile UpDownInterruptBaseActionType action = UPDOWN_ACTION_NONE;\n\n    // Long press detection variables\n    uint32_t pressStartTime = 0;\n    uint32_t upStartTime = 0;\n    uint32_t downStartTime = 0;\n    bool pressDetected = false;\n    bool upDetected = false;\n    bool downDetected = false;\n    uint32_t lastPressLongEventTime = 0;\n    uint32_t lastUpLongEventTime = 0;\n    uint32_t lastDownLongEventTime = 0;\n    static const uint32_t LONG_PRESS_DURATION = UPDOWN_LONG_PRESS_DURATION;\n    static const uint32_t LONG_PRESS_REPEAT_INTERVAL = UPDOWN_LONG_PRESS_REPEAT_INTERVAL;\n\n  private:\n    uint8_t _pinDown = 0;\n    uint8_t _pinUp = 0;\n    uint8_t _pinPress = 0;\n    input_broker_event _eventDown = INPUT_BROKER_NONE;\n    input_broker_event _eventUp = INPUT_BROKER_NONE;\n    input_broker_event _eventPressed = INPUT_BROKER_NONE;\n    input_broker_event _eventPressedLong = INPUT_BROKER_NONE;\n    input_broker_event _eventUpLong = INPUT_BROKER_NONE;\n    input_broker_event _eventDownLong = INPUT_BROKER_NONE;\n    const char *_originName;\n\n    unsigned long lastUpKeyTime = 0;\n    unsigned long lastDownKeyTime = 0;\n    unsigned long lastPressKeyTime = 0;\n    unsigned long updownDebounceMs = 50;\n    const unsigned long pressDebounceMs = 200;\n};\n"
  },
  {
    "path": "src/input/UpDownInterruptImpl1.cpp",
    "content": "#include \"UpDownInterruptImpl1.h\"\n#include \"InputBroker.h\"\nextern bool osk_found;\n\nUpDownInterruptImpl1 *upDownInterruptImpl1;\n\nUpDownInterruptImpl1::UpDownInterruptImpl1() : UpDownInterruptBase(\"upDown1\") {}\n\nbool UpDownInterruptImpl1::init()\n{\n#if defined(INPUTDRIVER_TWO_WAY_ROCKER) && defined(INPUTDRIVER_TWO_WAY_ROCKER_LEFT) && defined(INPUTDRIVER_TWO_WAY_ROCKER_RIGHT)\n    moduleConfig.canned_message.updown1_enabled = true;\n    moduleConfig.canned_message.inputbroker_pin_a = INPUTDRIVER_TWO_WAY_ROCKER_LEFT;\n    moduleConfig.canned_message.inputbroker_pin_b = INPUTDRIVER_TWO_WAY_ROCKER_RIGHT;\n#if defined(INPUTDRIVER_TWO_WAY_ROCKER_BTN)\n    moduleConfig.canned_message.inputbroker_pin_press = INPUTDRIVER_TWO_WAY_ROCKER_BTN;\n#endif\n#endif\n\n    if (!moduleConfig.canned_message.updown1_enabled) {\n        // Input device is disabled.\n        return false;\n    }\n\n    uint8_t pinUp = moduleConfig.canned_message.inputbroker_pin_a;\n    uint8_t pinDown = moduleConfig.canned_message.inputbroker_pin_b;\n    uint8_t pinPress = moduleConfig.canned_message.inputbroker_pin_press;\n\n    input_broker_event eventDown = INPUT_BROKER_USER_PRESS; // acts like RIGHT/DOWN\n    input_broker_event eventUp = INPUT_BROKER_ALT_PRESS;    // acts like LEFT/UP\n    input_broker_event eventPressed = INPUT_BROKER_SELECT;\n    input_broker_event eventPressedLong = INPUT_BROKER_SELECT_LONG;\n    input_broker_event eventUpLong = INPUT_BROKER_UP_LONG;\n    input_broker_event eventDownLong = INPUT_BROKER_DOWN_LONG;\n\n    UpDownInterruptBase::init(pinDown, pinUp, pinPress, eventDown, eventUp, eventPressed, eventPressedLong, eventUpLong,\n                              eventDownLong, UpDownInterruptImpl1::handleIntDown, UpDownInterruptImpl1::handleIntUp,\n                              UpDownInterruptImpl1::handleIntPressed);\n    inputBroker->registerSource(this);\n#ifndef HAS_PHYSICAL_KEYBOARD\n    osk_found = true;\n#endif\n    return true;\n}\n\nvoid UpDownInterruptImpl1::handleIntDown()\n{\n    upDownInterruptImpl1->intDownHandler();\n}\nvoid UpDownInterruptImpl1::handleIntUp()\n{\n    upDownInterruptImpl1->intUpHandler();\n}\nvoid UpDownInterruptImpl1::handleIntPressed()\n{\n    upDownInterruptImpl1->intPressHandler();\n}\n"
  },
  {
    "path": "src/input/UpDownInterruptImpl1.h",
    "content": "#pragma once\n#include \"UpDownInterruptBase.h\"\n\nclass UpDownInterruptImpl1 : public UpDownInterruptBase\n{\n  public:\n    UpDownInterruptImpl1();\n    bool init();\n    static void handleIntDown();\n    static void handleIntUp();\n    static void handleIntPressed();\n};\n\nextern UpDownInterruptImpl1 *upDownInterruptImpl1;"
  },
  {
    "path": "src/input/cardKbI2cImpl.cpp",
    "content": "#include \"cardKbI2cImpl.h\"\n#include \"InputBroker.h\"\n#include \"detect/ScanI2CTwoWire.h\"\n#include \"main.h\"\n\nCardKbI2cImpl *cardKbI2cImpl;\n\nCardKbI2cImpl::CardKbI2cImpl() : KbI2cBase(\"cardKB\") {}\n\nvoid CardKbI2cImpl::init()\n{\n#if !MESHTASTIC_EXCLUDE_I2C && !defined(ARCH_PORTDUINO) && !defined(I2C_NO_RESCAN)\n    if (cardkb_found.address == 0x00) {\n        LOG_DEBUG(\"Rescan for I2C keyboard\");\n        uint8_t i2caddr_scan[] = {CARDKB_ADDR, TDECK_KB_ADDR, BBQ10_KB_ADDR, MPR121_KB_ADDR, TCA8418_KB_ADDR};\n#if defined(T_LORA_PAGER)\n        uint8_t i2caddr_asize = sizeof(i2caddr_scan) / sizeof(i2caddr_scan[0]);\n#else\n        uint8_t i2caddr_asize = 5;\n#endif\n        auto i2cScanner = std::unique_ptr<ScanI2CTwoWire>(new ScanI2CTwoWire());\n\n#if WIRE_INTERFACES_COUNT == 2\n        i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1, i2caddr_scan, i2caddr_asize);\n#endif\n        i2cScanner->scanPort(ScanI2C::I2CPort::WIRE, i2caddr_scan, i2caddr_asize);\n        auto kb_info = i2cScanner->firstKeyboard();\n\n        if (kb_info.type != ScanI2C::DeviceType::NONE) {\n            cardkb_found = kb_info.address;\n            switch (kb_info.type) {\n            case ScanI2C::DeviceType::RAK14004:\n                kb_model = 0x02;\n                break;\n            case ScanI2C::DeviceType::CARDKB:\n                kb_model = 0x00;\n                break;\n            case ScanI2C::DeviceType::TDECKKB:\n                // assign an arbitrary value to distinguish from other models\n                kb_model = 0x10;\n                break;\n            case ScanI2C::DeviceType::BBQ10KB:\n                // assign an arbitrary value to distinguish from other models\n                kb_model = 0x11;\n                break;\n            case ScanI2C::DeviceType::MPR121KB:\n                // assign an arbitrary value to distinguish from other models\n                kb_model = 0x37;\n                break;\n            case ScanI2C::DeviceType::TCA8418KB:\n                // assign an arbitrary value to distinguish from other models\n                kb_model = 0x84;\n                break;\n            default:\n                // use this as default since it's also just zero\n                LOG_WARN(\"kb_info.type is unknown(0x%02x), setting kb_model=0x00\", kb_info.type);\n                kb_model = 0x00;\n            }\n        }\n        if (cardkb_found.address == 0x00) {\n            disable();\n            return;\n        } else {\n            LOG_DEBUG(\"Keyboard Type: 0x%02x Model: 0x%02x Address: 0x%02x\", kb_info.type, kb_model, cardkb_found.address);\n        }\n    }\n#else\n    if (cardkb_found.address == 0x00) {\n        disable();\n        return;\n    }\n#endif\n    inputBroker->registerSource(this);\n    kb_found = true;\n}"
  },
  {
    "path": "src/input/cardKbI2cImpl.h",
    "content": "#pragma once\n#include \"kbI2cBase.h\"\n\n/**\n * @brief The idea behind this class to have static methods for the event handlers.\n *      Check attachInterrupt() at RotaryEncoderInteruptBase.cpp\n *      Technically you can have as many rotary encoders hardver attached\n *      to your device as you wish, but you always need to have separate event\n *      handlers, thus you need to have a RotaryEncoderInterrupt implementation.\n */\nclass CardKbI2cImpl : public KbI2cBase\n{\n  public:\n    CardKbI2cImpl();\n    void init();\n};\n\nextern CardKbI2cImpl *cardKbI2cImpl;"
  },
  {
    "path": "src/input/i2cButton.cpp",
    "content": "#include \"i2cButton.h\"\n#include \"meshUtils.h\"\n\n#include \"configuration.h\"\n#if defined(M5STACK_UNITC6L)\n\n#include \"MeshService.h\"\n#include \"RadioLibInterface.h\"\n#include \"buzz.h\"\n#include \"input/InputBroker.h\"\n#include \"main.h\"\n#include \"modules/CannedMessageModule.h\"\n#include \"modules/ExternalNotificationModule.h\"\n#include \"power.h\"\n#include \"sleep.h\"\n#ifdef ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\ni2cButtonThread *i2cButton;\n\nusing namespace concurrency;\n\nextern void i2c_read_byte(uint8_t addr, uint8_t reg, uint8_t *value);\n\nextern void i2c_write_byte(uint8_t addr, uint8_t reg, uint8_t value);\n\n#define PI4IO_M_ADDR 0x43\n#define getbit(x, y) ((x) >> (y)&0x01)\n#define PI4IO_REG_IRQ_STA 0x13\n#define PI4IO_REG_IN_STA 0x0F\n#define PI4IO_REG_CHIP_RESET 0x01\n\ni2cButtonThread::i2cButtonThread(const char *name) : OSThread(name)\n{\n    _originName = name;\n    if (inputBroker)\n        inputBroker->registerSource(this);\n}\n\nint32_t i2cButtonThread::runOnce()\n{\n    static bool btn1_pressed = false;\n    static uint32_t press_start_time = 0;\n    const uint32_t LONG_PRESS_TIME = 1000;\n    static bool long_press_triggered = false;\n\n    uint8_t in_data;\n    i2c_read_byte(PI4IO_M_ADDR, PI4IO_REG_IRQ_STA, &in_data);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_IRQ_STA, in_data);\n    if (getbit(in_data, 0)) {\n        uint8_t input_state;\n        i2c_read_byte(PI4IO_M_ADDR, PI4IO_REG_IN_STA, &input_state);\n\n        if (!getbit(input_state, 0)) {\n            if (!btn1_pressed) {\n                btn1_pressed = true;\n                press_start_time = millis();\n                long_press_triggered = false;\n            }\n        } else {\n            if (btn1_pressed) {\n                btn1_pressed = false;\n                uint32_t press_duration = millis() - press_start_time;\n                if (long_press_triggered) {\n                    long_press_triggered = false;\n                    return 50;\n                }\n\n                if (press_duration < LONG_PRESS_TIME) {\n                    InputEvent evt;\n                    evt.source = \"UserButton\";\n                    evt.inputEvent = INPUT_BROKER_USER_PRESS;\n                    evt.kbchar = 0;\n                    evt.touchX = 0;\n                    evt.touchY = 0;\n                    this->notifyObservers(&evt);\n                }\n            }\n        }\n    }\n\n    if (btn1_pressed && !long_press_triggered && (millis() - press_start_time >= LONG_PRESS_TIME)) {\n        long_press_triggered = true;\n        InputEvent evt;\n        evt.source = \"UserButton\";\n        evt.inputEvent = INPUT_BROKER_SELECT;\n        evt.kbchar = 0;\n        evt.touchX = 0;\n        evt.touchY = 0;\n        this->notifyObservers(&evt);\n    }\n    return 50;\n}\n#endif"
  },
  {
    "path": "src/input/i2cButton.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"OneButton.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#if defined(M5STACK_UNITC6L)\n\nclass i2cButtonThread : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    const char *_originName;\n    explicit i2cButtonThread(const char *name);\n    int32_t runOnce() override;\n};\n\nextern i2cButtonThread *i2cButton;\n#endif\n"
  },
  {
    "path": "src/input/kbI2cBase.cpp",
    "content": "#include \"kbI2cBase.h\"\n#include \"configuration.h\"\n#include \"detect/ScanI2C.h\"\n#include \"detect/ScanI2CTwoWire.h\"\n\n#if defined(T_DECK_PRO)\n#include \"TDeckProKeyboard.h\"\n#elif defined(T_LORA_PAGER)\n#include \"TLoraPagerKeyboard.h\"\n#elif defined(M5STACK_CARDPUTER_ADV)\n#include \"CardputerKeyboard.h\"\n#elif defined(HACKADAY_COMMUNICATOR)\n#include \"HackadayCommunicatorKeyboard.h\"\n#else\n#include \"TCA8418Keyboard.h\"\n#endif\n\nextern ScanI2C::DeviceAddress cardkb_found;\nextern uint8_t kb_model;\n\nKbI2cBase::KbI2cBase(const char *name)\n    : concurrency::OSThread(name),\n#if defined(T_DECK_PRO)\n      TCAKeyboard(*(new TDeckProKeyboard()))\n#elif defined(T_LORA_PAGER)\n      TCAKeyboard(*(new TLoraPagerKeyboard()))\n#elif defined(M5STACK_CARDPUTER_ADV)\n      TCAKeyboard(*(new CardputerKeyboard()))\n#elif defined(HACKADAY_COMMUNICATOR)\n      TCAKeyboard(*(new HackadayCommunicatorKeyboard()))\n#else\n      TCAKeyboard(*(new TCA8418Keyboard()))\n#endif\n{\n    this->_originName = name;\n}\n\nuint8_t read_from_14004(TwoWire *i2cBus, uint8_t reg, uint8_t *data, uint8_t length)\n{\n    uint8_t readflag = 0;\n    i2cBus->beginTransmission(CARDKB_ADDR);\n    i2cBus->write(reg);\n    i2cBus->endTransmission(); // stop transmitting\n    delay(20);\n    i2cBus->requestFrom(CARDKB_ADDR, (int)length);\n    int i = 0;\n    while (i2cBus->available()) // slave may send less than requested\n    {\n        data[i++] = i2cBus->read(); // receive a byte as a proper uint8_t\n        readflag = 1;\n    }\n    return readflag;\n}\n\nint32_t KbI2cBase::runOnce()\n{\n    if (!i2cBus) {\n        switch (cardkb_found.port) {\n        case ScanI2C::WIRE1:\n#if WIRE_INTERFACES_COUNT == 2\n            LOG_DEBUG(\"Use I2C Bus 1 (the second one)\");\n            i2cBus = &Wire1;\n            if (cardkb_found.address == BBQ10_KB_ADDR) {\n                Q10keyboard.begin(BBQ10_KB_ADDR, &Wire1);\n                Q10keyboard.setBacklight(0);\n            }\n            if (cardkb_found.address == MPR121_KB_ADDR) {\n                MPRkeyboard.begin(MPR121_KB_ADDR, &Wire1);\n            }\n            if (cardkb_found.address == TCA8418_KB_ADDR) {\n                TCAKeyboard.begin(TCA8418_KB_ADDR, &Wire1);\n            }\n            break;\n#endif\n        case ScanI2C::WIRE:\n            LOG_DEBUG(\"Use I2C Bus 0 (the first one)\");\n            i2cBus = &Wire;\n            if (cardkb_found.address == BBQ10_KB_ADDR) {\n                Q10keyboard.begin(BBQ10_KB_ADDR, &Wire);\n                Q10keyboard.setBacklight(0);\n            }\n            if (cardkb_found.address == MPR121_KB_ADDR) {\n                MPRkeyboard.begin(MPR121_KB_ADDR, &Wire);\n            }\n            if (cardkb_found.address == TCA8418_KB_ADDR) {\n                TCAKeyboard.begin(TCA8418_KB_ADDR, &Wire);\n            }\n            break;\n        case ScanI2C::NO_I2C:\n        default:\n            i2cBus = 0;\n        }\n    }\n\n    switch (kb_model) {\n    case 0x11: { // BB Q10\n        int keyCount = Q10keyboard.keyCount();\n        while (keyCount--) {\n            const BBQ10Keyboard::KeyEvent key = Q10keyboard.keyEvent();\n            if ((key.key != 0x00) && (key.state == BBQ10Keyboard::StateRelease)) {\n                InputEvent e = {};\n                e.inputEvent = INPUT_BROKER_NONE;\n                e.source = this->_originName;\n                switch (key.key) {\n                case 'p': // TAB\n                case 't': // TAB as well\n                    if (is_sym) {\n                        e.inputEvent = INPUT_BROKER_ANYKEY;\n                        e.kbchar = 0x09; // TAB Scancode\n                        is_sym = false;  // reset sym state after second keypress\n                    } else {\n                        e.inputEvent = INPUT_BROKER_ANYKEY;\n                        e.kbchar = key.key;\n                    }\n                    break;\n                case 'q': // ESC\n                    if (is_sym) {\n                        e.inputEvent = INPUT_BROKER_CANCEL;\n                        e.kbchar = 0;\n                        is_sym = false; // reset sym state after second keypress\n                    } else {\n                        e.inputEvent = INPUT_BROKER_ANYKEY;\n                        e.kbchar = key.key;\n                    }\n                    break;\n                case 0x08: // Back\n                    e.inputEvent = INPUT_BROKER_BACK;\n                    e.kbchar = key.key;\n                    break;\n                case 'e': // sym e\n                    if (is_sym) {\n                        e.inputEvent = INPUT_BROKER_UP;\n                        e.kbchar = INPUT_BROKER_UP;\n                        is_sym = false; // reset sym state after second keypress\n                    } else {\n                        e.inputEvent = INPUT_BROKER_ANYKEY;\n                        e.kbchar = key.key;\n                    }\n                    break;\n                case 'x': // sym x\n                    if (is_sym) {\n                        e.inputEvent = INPUT_BROKER_DOWN;\n                        e.kbchar = 0;\n                        is_sym = false; // reset sym state after second keypress\n                    } else {\n                        e.inputEvent = INPUT_BROKER_ANYKEY;\n                        e.kbchar = key.key;\n                    }\n                    break;\n                case 's': // sym s\n                    if (is_sym) {\n                        e.inputEvent = INPUT_BROKER_LEFT;\n                        e.kbchar = 0x00; // tweak for destSelect\n                        is_sym = false;  // reset sym state after second keypress\n                    } else {\n                        e.inputEvent = INPUT_BROKER_ANYKEY;\n                        e.kbchar = key.key;\n                    }\n                    break;\n                case 'f': // sym f\n                    if (is_sym) {\n                        e.inputEvent = INPUT_BROKER_RIGHT;\n                        e.kbchar = 0x00; // tweak for destSelect\n                        is_sym = false;  // reset sym state after second keypress\n                    } else {\n                        e.inputEvent = INPUT_BROKER_ANYKEY;\n                        e.kbchar = key.key;\n                    }\n                    break;\n                case 0x13: // Code scanner says the SYM key is 0x13\n                    is_sym = !is_sym;\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = is_sym ? INPUT_BROKER_MSG_FN_SYMBOL_ON   // send 0xf1 to tell CannedMessages to display that\n                                      : INPUT_BROKER_MSG_FN_SYMBOL_OFF; // the modifier key is active\n                    break;\n                case 0x0a: // apparently Enter on Q10 is a line feed instead of carriage return\n                    e.inputEvent = INPUT_BROKER_SELECT;\n                    break;\n                case 0x00: // nopress\n                    e.inputEvent = INPUT_BROKER_NONE;\n                    break;\n                default: // all other keys\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = key.key;\n                    is_sym = false; // reset sym state after second keypress\n                    break;\n                }\n\n                if (e.inputEvent != INPUT_BROKER_NONE) {\n                    this->notifyObservers(&e);\n                }\n            }\n        }\n        break;\n    }\n    case 0x37: { // MPR121\n        MPRkeyboard.trigger();\n        InputEvent e = {};\n\n        while (MPRkeyboard.hasEvent()) {\n            char nextEvent = MPRkeyboard.dequeueEvent();\n            e.inputEvent = INPUT_BROKER_ANYKEY;\n            e.kbchar = 0x00;\n            e.source = this->_originName;\n            switch (nextEvent) {\n            case 0x00: // MPR121_NONE\n                e.inputEvent = INPUT_BROKER_NONE;\n                e.kbchar = 0x00;\n                break;\n            case 0x90: // MPR121_REBOOT\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_MSG_REBOOT;\n                break;\n            case 0xb4: // MPR121_LEFT\n                e.inputEvent = INPUT_BROKER_LEFT;\n                e.kbchar = 0x00;\n                break;\n            case 0xb5: // MPR121_UP\n                e.inputEvent = INPUT_BROKER_UP;\n                e.kbchar = 0x00;\n                break;\n            case 0xb6: // MPR121_DOWN\n                e.inputEvent = INPUT_BROKER_DOWN;\n                e.kbchar = 0x00;\n                break;\n            case 0xb7: // MPR121_RIGHT\n                e.inputEvent = INPUT_BROKER_RIGHT;\n                e.kbchar = 0x00;\n                break;\n            case 0x1b: // MPR121_ESC\n                e.inputEvent = INPUT_BROKER_CANCEL;\n                e.kbchar = 0;\n                break;\n            case 0x08: // MPR121_BSP\n                e.inputEvent = INPUT_BROKER_BACK;\n                e.kbchar = 0x08;\n                break;\n            case 0x0d: // MPR121_SELECT\n                e.inputEvent = INPUT_BROKER_SELECT;\n                e.kbchar = 0x00;\n                break;\n            default:\n                if (nextEvent > 127) {\n                    e.inputEvent = INPUT_BROKER_NONE;\n                    e.kbchar = 0x00;\n                    break;\n                }\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = nextEvent;\n                break;\n            }\n            if (e.inputEvent != INPUT_BROKER_NONE) {\n                LOG_DEBUG(\"MP121 Notifying: %i Char: %i\", e.inputEvent, e.kbchar);\n                this->notifyObservers(&e);\n            }\n        }\n        break;\n    }\n    case 0x84: { // Adafruit TCA8418\n        TCAKeyboard.trigger();\n        InputEvent e = {};\n        while (TCAKeyboard.hasEvent()) {\n            char nextEvent = TCAKeyboard.dequeueEvent();\n            e.inputEvent = INPUT_BROKER_ANYKEY;\n            e.kbchar = 0x00;\n            e.source = this->_originName;\n            switch (nextEvent) {\n            case TCA8418KeyboardBase::NONE:\n                e.inputEvent = INPUT_BROKER_NONE;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::REBOOT:\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_MSG_REBOOT;\n                break;\n            case TCA8418KeyboardBase::LEFT:\n                e.inputEvent = INPUT_BROKER_LEFT;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::UP:\n                e.inputEvent = INPUT_BROKER_UP;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::DOWN:\n                e.inputEvent = INPUT_BROKER_DOWN;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::RIGHT:\n                e.inputEvent = INPUT_BROKER_RIGHT;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::BSP:\n                e.inputEvent = INPUT_BROKER_BACK;\n                e.kbchar = 0x08;\n                break;\n            case TCA8418KeyboardBase::SELECT:\n                e.inputEvent = INPUT_BROKER_SELECT;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::ESC:\n                e.inputEvent = INPUT_BROKER_CANCEL;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::GPS_TOGGLE:\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_GPS_TOGGLE;\n                break;\n            case TCA8418KeyboardBase::SEND_PING:\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_SEND_PING;\n                break;\n            case TCA8418KeyboardBase::MUTE_TOGGLE:\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_MSG_MUTE_TOGGLE;\n                break;\n            case TCA8418KeyboardBase::BT_TOGGLE:\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_MSG_BLUETOOTH_TOGGLE;\n                break;\n            case TCA8418KeyboardBase::BL_TOGGLE:\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_MSG_BLUETOOTH_TOGGLE;\n                break;\n            case TCA8418KeyboardBase::TAB:\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = INPUT_BROKER_MSG_TAB;\n                break;\n            case TCA8418KeyboardBase::FUNCTION_F1:\n                e.inputEvent = INPUT_BROKER_FN_F1;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::FUNCTION_F2:\n                e.inputEvent = INPUT_BROKER_FN_F2;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::FUNCTION_F3:\n                e.inputEvent = INPUT_BROKER_FN_F3;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::FUNCTION_F4:\n                e.inputEvent = INPUT_BROKER_FN_F4;\n                e.kbchar = 0x00;\n                break;\n            case TCA8418KeyboardBase::FUNCTION_F5:\n                e.inputEvent = INPUT_BROKER_FN_F5;\n                e.kbchar = 0x00;\n                break;\n            default:\n                if (nextEvent > 127) {\n                    e.inputEvent = INPUT_BROKER_NONE;\n                    e.kbchar = 0x00;\n                    break;\n                }\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = nextEvent;\n                break;\n            }\n            if (e.inputEvent != INPUT_BROKER_NONE) {\n                // LOG_DEBUG(\"TCA8418 Notifying: %i Char: %c\", e.inputEvent, e.kbchar);\n                this->notifyObservers(&e);\n            }\n            TCAKeyboard.trigger();\n        }\n        TCAKeyboard.clearInt();\n        break;\n    }\n    case 0x02: {\n        // RAK14004\n        uint8_t rDataBuf[8] = {0};\n        uint8_t PrintDataBuf = 0;\n        if (read_from_14004(i2cBus, 0x01, rDataBuf, 0x04) == 1) {\n            for (uint8_t aCount = 0; aCount < 0x04; aCount++) {\n                for (uint8_t bCount = 0; bCount < 0x04; bCount++) {\n                    if (((rDataBuf[aCount] >> bCount) & 0x01) == 0x01) {\n                        PrintDataBuf = aCount * 0x04 + bCount + 1;\n                    }\n                }\n            }\n        }\n        if (PrintDataBuf != 0) {\n            LOG_DEBUG(\"RAK14004 key 0x%x pressed\", PrintDataBuf);\n            InputEvent e = {};\n            e.inputEvent = INPUT_BROKER_MATRIXKEY;\n            e.source = this->_originName;\n            e.kbchar = PrintDataBuf;\n            this->notifyObservers(&e);\n        }\n        break;\n    }\n    case 0x00:   // CARDKB\n    case 0x10: { // T-DECK\n\n        i2cBus->requestFrom((int)cardkb_found.address, 1);\n\n        if (i2cBus->available()) {\n            char c = i2cBus->read();\n            InputEvent e = {};\n            e.inputEvent = INPUT_BROKER_NONE;\n            e.source = this->_originName;\n            switch (c) {\n            case 0x71: // This is the button q. If modifier and q pressed, it cancels the input\n                if (is_sym) {\n                    is_sym = false;\n                    e.inputEvent = INPUT_BROKER_CANCEL;\n                } else {\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = c;\n                }\n                break;\n            case 0x74: // letter t. if modifier and t pressed call 'tab'\n                if (is_sym) {\n                    is_sym = false;\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = 0x09; // TAB Scancode\n                } else {\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = c;\n                }\n                break;\n            case 0x6d: // letter m. Modifier makes it mute notifications\n                if (is_sym) {\n                    is_sym = false;\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = INPUT_BROKER_MSG_MUTE_TOGGLE; // mute notifications\n                } else {\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = c;\n                }\n                break;\n            case 0x6f: // letter o(+). Modifier makes screen increase in brightness\n                if (is_sym) {\n                    is_sym = false;\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = INPUT_BROKER_MSG_BRIGHTNESS_UP; // Increase Brightness code\n                } else {\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = c;\n                }\n                break;\n            case 0x69: // letter i(-).  Modifier makes screen decrease in brightness\n                if (is_sym) {\n                    is_sym = false;\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = INPUT_BROKER_MSG_BRIGHTNESS_DOWN; // Decrease Brightness code\n                } else {\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = c;\n                }\n                break;\n            case 0x20: // Space. Send network ping like double press does\n                if (is_sym) {\n                    is_sym = false;\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = INPUT_BROKER_SEND_PING; // (fn + space)\n                } else {\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = c;\n                }\n                break;\n            case 0x67: // letter g. toggle gps\n                if (is_sym) {\n                    is_sym = false;\n                    e.inputEvent = INPUT_BROKER_GPS_TOGGLE;\n                    e.kbchar = INPUT_BROKER_GPS_TOGGLE;\n                } else {\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = c;\n                }\n                break;\n            case 0x1b: // ESC\n                e.inputEvent = INPUT_BROKER_CANCEL;\n                break;\n            case 0x08: // Back\n                e.inputEvent = INPUT_BROKER_BACK;\n                e.kbchar = 0;\n                break;\n            case 0xb5: // Up\n                e.inputEvent = INPUT_BROKER_UP;\n                e.kbchar = 0;\n                break;\n            case 0xb6: // Down\n                e.inputEvent = INPUT_BROKER_DOWN;\n                e.kbchar = 0;\n                break;\n            case 0xb4: // Left\n                e.inputEvent = INPUT_BROKER_LEFT;\n                e.kbchar = 0;\n                break;\n            case 0xb7: // Right\n                e.inputEvent = INPUT_BROKER_RIGHT;\n                e.kbchar = 0;\n                break;\n            case 0xc: // Modifier key: 0xc is alt+c (Other options could be: 0xea = shift+mic button or 0x4 shift+$(speaker))\n                // toggle modifiers button.\n                is_sym = !is_sym;\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = is_sym ? INPUT_BROKER_MSG_FN_SYMBOL_ON   // send 0xf1 to tell CannedMessages to display that the\n                                  : INPUT_BROKER_MSG_FN_SYMBOL_OFF; // modifier key is active\n                break;\n            case 0x9e: // fn+g      INPUT_BROKER_GPS_TOGGLE\n                e.inputEvent = INPUT_BROKER_GPS_TOGGLE;\n                e.kbchar = c;\n                break;\n            case 0xaf: // fn+space  INPUT_BROKER_SEND_PING\n                e.inputEvent = INPUT_BROKER_SEND_PING;\n                e.kbchar = c;\n                break;\n            case 0x9b: // fn+s      INPUT_BROKER_MSG_SHUTDOWN\n                e.inputEvent = INPUT_BROKER_SHUTDOWN;\n                e.kbchar = c;\n                break;\n\n            case 0x90: // fn+r      INPUT_BROKER_MSG_REBOOT\n            case 0x91: // fn+t\n            case 0xac: // fn+m      INPUT_BROKER_MSG_MUTE_TOGGLE\n            case 0xAA: // fn+b      INPUT_BROKER_MSG_BLUETOOTH_TOGGLE\n            case 0x8F: // fn+e      INPUT_BROKER_MSG_EMOTE_LIST\n                // just pass those unmodified\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = c;\n                break;\n            case 0x0d: // Enter\n                e.inputEvent = INPUT_BROKER_SELECT;\n                break;\n            case 0x00: // nopress\n                e.inputEvent = INPUT_BROKER_NONE;\n                break;\n            default:           // all other keys\n                if (c > 127) { // bogus key value\n                    e.inputEvent = INPUT_BROKER_NONE;\n                    break;\n                }\n                e.inputEvent = INPUT_BROKER_ANYKEY;\n                e.kbchar = c;\n                is_sym = false;\n                break;\n            }\n\n            if (e.inputEvent != INPUT_BROKER_NONE) {\n                this->notifyObservers(&e);\n            }\n        }\n        break;\n    }\n    default:\n        LOG_WARN(\"Unknown kb_model 0x%02x\", kb_model);\n    }\n    return 300;\n}\n\nvoid KbI2cBase::toggleBacklight(bool on)\n{\n#if defined(T_LORA_PAGER)\n    TCAKeyboard.setBacklight(on);\n#endif\n}\n"
  },
  {
    "path": "src/input/kbI2cBase.h",
    "content": "#pragma once\n\n#include \"BBQ10Keyboard.h\"\n#include \"InputBroker.h\"\n#include \"MPR121Keyboard.h\"\n#include \"Wire.h\"\n#include \"concurrency/OSThread.h\"\n\nclass TCA8418KeyboardBase;\n\nclass KbI2cBase : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit KbI2cBase(const char *name);\n    void toggleBacklight(bool on);\n\n  protected:\n    virtual int32_t runOnce() override;\n\n  private:\n    const char *_originName;\n\n    TwoWire *i2cBus = 0;\n\n    BBQ10Keyboard Q10keyboard;\n    MPR121Keyboard MPRkeyboard;\n    TCA8418KeyboardBase &TCAKeyboard;\n    bool is_sym = false;\n};"
  },
  {
    "path": "src/input/kbMatrixBase.cpp",
    "content": "#include \"kbMatrixBase.h\"\n#include \"configuration.h\"\n\n#ifdef INPUTBROKER_MATRIX_TYPE\n\nconst byte keys_cols[] = KEYS_COLS;\nconst byte keys_rows[] = KEYS_ROWS;\n\n#if INPUTBROKER_MATRIX_TYPE == 1\n\nunsigned char KeyMap[3][sizeof(keys_rows)][sizeof(keys_cols)] = {{{' ', '.', 'm', 'n', 'b', 0xb6},\n                                                                  {0x0d, 'l', 'k', 'j', 'h', 0xb4},\n                                                                  {'p', 'o', 'i', 'u', 'y', 0xb5},\n                                                                  {0x08, 'z', 'x', 'c', 'v', 0xb7},\n                                                                  {'a', 's', 'd', 'f', 'g', 0x09},\n                                                                  {'q', 'w', 'e', 'r', 't', 0x1a}},\n                                                                 {// SHIFT\n                                                                  {':', ';', 'M', 'N', 'B', 0xb6},\n                                                                  {0x0d, 'L', 'K', 'J', 'H', 0xb4},\n                                                                  {'P', 'O', 'I', 'U', 'Y', 0xb5},\n                                                                  {0x08, 'Z', 'X', 'C', 'V', 0xb7},\n                                                                  {'A', 'S', 'D', 'F', 'G', 0x09},\n                                                                  {'Q', 'W', 'E', 'R', 'T', 0x1a}},\n                                                                 {// SHIFT-SHIFT\n                                                                  {'_', ',', '>', '<', '\"', '{'},\n                                                                  {'~', '-', '*', '&', '+', '['},\n                                                                  {'0', '9', '8', '7', '6', '}'},\n                                                                  {'=', '(', ')', '?', '/', ']'},\n                                                                  {'!', '@', '#', '$', '%', '\\\\'},\n                                                                  {'1', '2', '3', '4', '5', 0x1a}}};\n#endif\n\nKbMatrixBase::KbMatrixBase(const char *name) : concurrency::OSThread(name)\n{\n    this->_originName = name;\n}\n\nint32_t KbMatrixBase::runOnce()\n{\n    if (!INPUTBROKER_MATRIX_TYPE) {\n        // Input device is not requested.\n        return disable();\n    }\n\n    if (firstTime) {\n        // This is the first time the OSThread library has called this function, so do port setup\n        firstTime = 0;\n        for (byte i = 0; i < sizeof(keys_rows); i++) {\n            pinMode(keys_rows[i], OUTPUT);\n            digitalWrite(keys_rows[i], HIGH);\n        }\n        for (byte i = 0; i < sizeof(keys_cols); i++) {\n            pinMode(keys_cols[i], INPUT_PULLUP);\n        }\n    }\n\n    key = 0;\n\n    if (INPUTBROKER_MATRIX_TYPE == 1) {\n        // scan for keypresses\n        for (byte i = 0; i < sizeof(keys_rows); i++) {\n            digitalWrite(keys_rows[i], LOW);\n            for (byte j = 0; j < sizeof(keys_cols); j++) {\n                if (digitalRead(keys_cols[j]) == LOW) {\n                    key = KeyMap[shift][i][j];\n                }\n            }\n            digitalWrite(keys_rows[i], HIGH);\n        }\n        // debounce\n        if (key != prevkey) {\n            if (key != 0) {\n                LOG_DEBUG(\"Key 0x%x pressed\", key);\n                // reset shift now that we have a keypress\n                InputEvent e = {};\n                e.inputEvent = INPUT_BROKER_NONE;\n                e.source = this->_originName;\n                switch (key) {\n                case 0x1b: // ESC\n                    e.inputEvent = INPUT_BROKER_CANCEL;\n                    break;\n                case 0x08: // Back\n                    e.inputEvent = INPUT_BROKER_BACK;\n                    e.kbchar = 0;\n                    break;\n                case 0xb5: // Up\n                    e.inputEvent = INPUT_BROKER_UP;\n                    break;\n                case 0xb6: // Down\n                    e.inputEvent = INPUT_BROKER_DOWN;\n                    break;\n                case 0xb4: // Left\n                    e.inputEvent = INPUT_BROKER_LEFT;\n                    e.kbchar = 0;\n                    break;\n                case 0xb7: // Right\n                    e.inputEvent = INPUT_BROKER_RIGHT;\n                    e.kbchar = 0;\n                    break;\n                case 0x0d: // Enter\n                    e.inputEvent = INPUT_BROKER_SELECT;\n                    break;\n                case 0x00: // nopress\n                    e.inputEvent = INPUT_BROKER_NONE;\n                    break;\n                case 0x1a: // Shift\n                    shift++;\n                    if (shift > 2) {\n                        shift = 0;\n                    }\n                    break;\n                default: // all other keys\n                    e.inputEvent = INPUT_BROKER_ANYKEY;\n                    e.kbchar = key;\n                    break;\n                }\n                if (e.inputEvent != INPUT_BROKER_NONE) {\n                    this->notifyObservers(&e);\n                }\n            }\n            prevkey = key;\n        }\n\n    } else {\n        LOG_WARN(\"Unknown kb_model 0x%02x\", INPUTBROKER_MATRIX_TYPE);\n        return disable();\n    }\n    return 50; // Keyscan every 50msec to avoid key bounce\n}\n\n#endif // INPUTBROKER_MATRIX_TYPE"
  },
  {
    "path": "src/input/kbMatrixBase.h",
    "content": "#pragma once\n\n#include \"InputBroker.h\"\n#include \"concurrency/OSThread.h\"\n\nclass KbMatrixBase : public Observable<const InputEvent *>, public concurrency::OSThread\n{\n  public:\n    explicit KbMatrixBase(const char *name);\n\n  protected:\n    virtual int32_t runOnce() override;\n\n  private:\n    const char *_originName;\n    bool firstTime = 1;\n    int shift = 0;\n    char key = 0;\n    char prevkey = 0;\n};"
  },
  {
    "path": "src/input/kbMatrixImpl.cpp",
    "content": "#include \"kbMatrixImpl.h\"\n#include \"InputBroker.h\"\n\n#ifdef INPUTBROKER_MATRIX_TYPE\n\nKbMatrixImpl *kbMatrixImpl;\n\nKbMatrixImpl::KbMatrixImpl() : KbMatrixBase(\"matrixKB\") {}\n\nvoid KbMatrixImpl::init()\n{\n    if (!INPUTBROKER_MATRIX_TYPE) {\n        disable();\n        return;\n    }\n\n    inputBroker->registerSource(this);\n}\n\n#endif // INPUTBROKER_MATRIX_TYPE"
  },
  {
    "path": "src/input/kbMatrixImpl.h",
    "content": "#pragma once\n#include \"kbMatrixBase.h\"\n#include \"main.h\"\n\n/**\n * @brief The idea behind this class to have static methods for the event handlers.\n *      Check attachInterrupt() at RotaryEncoderInteruptBase.cpp\n *      Technically you can have as many rotary encoders hardver attached\n *      to your device as you wish, but you always need to have separate event\n *      handlers, thus you need to have a RotaryEncoderInterrupt implementation.\n */\nclass KbMatrixImpl : public KbMatrixBase\n{\n  public:\n    KbMatrixImpl();\n    void init();\n};\n\nextern KbMatrixImpl *kbMatrixImpl;"
  },
  {
    "path": "src/main.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"PowerMon.h\"\n#include \"RadioLibInterface.h\"\n#include \"ReliableRouter.h\"\n#include \"TransmitHistory.h\"\n#include \"airtime.h\"\n#include \"buzz.h\"\n#include \"power/PowerHAL.h\"\n\n#include \"FSCommon.h\"\n#include \"RTC.h\"\n#include \"SPILock.h\"\n#include \"Throttle.h\"\n#include \"concurrency/OSThread.h\"\n#include \"concurrency/Periodic.h\"\n#include \"detect/ScanI2C.h\"\n#include \"error.h\"\n#include \"power.h\"\n\n#if !MESHTASTIC_EXCLUDE_I2C\n#include \"detect/ScanI2CConsumer.h\"\n#include \"detect/ScanI2CTwoWire.h\"\n#include <Wire.h>\n#endif\n#include \"detect/einkScan.h\"\n#include \"graphics/Screen.h\"\n#include \"main.h\"\n#include \"mesh/generated/meshtastic/config.pb.h\"\n#include \"meshUtils.h\"\n#include \"modules/Modules.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n#include <memory>\n#include <utility>\n#if HAS_SCREEN\n#include \"MessageStore.h\"\n#endif\n\n#ifdef ARCH_ESP32\n#include \"freertosinc.h\"\n#if !MESHTASTIC_EXCLUDE_WEBSERVER\n#include \"mesh/http/WebServer.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_BLUETOOTH\n#include \"nimble/NimbleBluetooth.h\"\nNimbleBluetooth *nimbleBluetooth = nullptr;\n#endif\n#endif\n\n#ifdef ARCH_NRF52\n#include \"NRF52Bluetooth.h\"\nNRF52Bluetooth *nrf52Bluetooth = nullptr;\n#endif\n\n#if HAS_WIFI || defined(USE_WS5500)\n#include \"mesh/api/WiFiServerAPI.h\"\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n\n#if HAS_ETHERNET && !defined(USE_WS5500)\n#include \"mesh/api/ethServerAPI.h\"\n#include \"mesh/eth/ethClient.h\"\n#endif\n\n#if !MESHTASTIC_EXCLUDE_MQTT\n#include \"mqtt/MQTT.h\"\n#endif\n\n#ifdef ARCH_PORTDUINO\n#include \"linux/LinuxHardwareI2C.h\"\n#include \"mesh/raspihttp/PiWebServer.h\"\n#include \"platform/portduino/PortduinoGlue.h\"\n#include <cstdlib>\n#include <fstream>\n#include <iostream>\n#include <string>\n#endif\n\n#ifdef ARCH_ESP32\n#ifdef DEBUG_PARTITION_TABLE\n#include \"esp_partition.h\"\n\nvoid printPartitionTable()\n{\n    printf(\"\\n--- Partition Table ---\\n\");\n    // Print Column Headers\n    printf(\"| %-16s | %-4s | %-7s | %-10s | %-10s |\\n\", \"Label\", \"Type\", \"Subtype\", \"Offset\", \"Size\");\n    printf(\"|------------------|------|---------|------------|------------|\\n\");\n\n    // Create an iterator to find ALL partitions (Type ANY, Subtype ANY)\n    esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL);\n\n    // Loop through the iterator\n    if (it != NULL) {\n        do {\n            const esp_partition_t *part = esp_partition_get(it);\n\n            // Print details: Label, Type (Hex), Subtype (Hex), Offset (Hex), Size (Hex)\n            printf(\"| %-16s | 0x%02x | 0x%02x    | 0x%08x | 0x%08x |\\n\", part->label, part->type, part->subtype, part->address,\n                   part->size);\n\n            // Move to next partition\n            it = esp_partition_next(it);\n        } while (it != NULL);\n\n        // Release the iterator memory\n        esp_partition_iterator_release(it);\n    } else {\n        printf(\"No partitions found.\\n\");\n    }\n    printf(\"-----------------------\\n\");\n}\n#endif // DEBUG_PARTITION_TABLE\n#endif // ARCH_ESP32\n\n#include \"AmbientLightingThread.h\"\n#include \"PowerFSMThread.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n#include \"motion/AccelerometerThread.h\"\nAccelerometerThread *accelerometerThread = nullptr;\n#endif\n\n#ifdef HAS_I2S\n#include \"AudioThread.h\"\nAudioThread *audioThread = nullptr;\n#endif\n\n#ifdef USE_XL9555\n#include \"ExtensionIOXL9555.hpp\"\nExtensionIOXL9555 io;\n#endif\n\n#if HAS_TFT\nextern void tftSetup(void);\n#endif\n\n#ifdef HAS_UDP_MULTICAST\n#include \"mesh/udp/UdpMulticastHandler.h\"\nUdpMulticastHandler *udpHandler = nullptr;\n#endif\n\n#if defined(TCXO_OPTIONAL)\nfloat tcxoVoltage = SX126X_DIO3_TCXO_VOLTAGE; // if TCXO is optional, put this here so it can be changed further down.\n#endif\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\nvoid setupNicheGraphics();\n#include \"nicheGraphics.h\"\n#endif\n\n#if defined(HW_SPI1_DEVICE) && defined(ARCH_ESP32)\nSPIClass SPI1(HSPI);\n#endif\n\nusing namespace concurrency;\n\nvolatile static const char slipstreamTZString[] = {USERPREFS_TZ_STRING};\n\n// We always create a screen object, but we only init it if we find the hardware\ngraphics::Screen *screen = nullptr;\n\n// Global power status\nmeshtastic::PowerStatus *powerStatus = new meshtastic::PowerStatus();\n\n// Global GPS status\nmeshtastic::GPSStatus *gpsStatus = new meshtastic::GPSStatus();\n\n// Global Node status\nmeshtastic::NodeStatus *nodeStatus = new meshtastic::NodeStatus();\n\n// Global Bluetooth status\nmeshtastic::BluetoothStatus *bluetoothStatus = new meshtastic::BluetoothStatus();\n\n// Scan for I2C Devices\n\n/// The I2C address of our display (if found)\nScanI2C::DeviceAddress screen_found = ScanI2C::ADDRESS_NONE;\n\n// The I2C address of the cardkb or RAK14004 (if found)\nScanI2C::DeviceAddress cardkb_found = ScanI2C::ADDRESS_NONE;\n// 0x02 for RAK14004, 0x00 for cardkb, 0x10 for T-Deck\nuint8_t kb_model;\n// global bool to record that a kb is present\nbool kb_found = false;\n// global bool to record that on-screen keyboard (OSK) is present\nbool osk_found = false;\n\n// The I2C address of the RTC Module (if found)\nScanI2C::DeviceAddress rtc_found = ScanI2C::ADDRESS_NONE;\n// The I2C address of the Accelerometer (if found)\nScanI2C::DeviceAddress accelerometer_found = ScanI2C::ADDRESS_NONE;\n// The I2C address of the RGB LED (if found)\nScanI2C::FoundDevice rgb_found = ScanI2C::FoundDevice(ScanI2C::DeviceType::NONE, ScanI2C::ADDRESS_NONE);\n/// The I2C address of our Air Quality Indicator (if found)\nScanI2C::DeviceAddress aqi_found = ScanI2C::ADDRESS_NONE;\n\n#ifdef HAS_DRV2605\nAdafruit_DRV2605 drv;\n#endif\n\nbool isVibrating = false;\n\nbool eink_found = true;\n\nuint32_t serialSinceMsec;\nbool pauseBluetoothLogging = false;\n\nbool pmu_found;\n\n#if !MESHTASTIC_EXCLUDE_I2C\n// Array map of sensor types with i2c address and wire as we'll find in the i2c scan\nstd::pair<uint8_t, TwoWire *> nodeTelemetrySensorsMap[_meshtastic_TelemetrySensorType_MAX + 1] = {};\n#endif\n\nRouter *router = NULL; // Users of router don't care what sort of subclass implements that API\n\nconst char *firmware_version = optstr(APP_VERSION_SHORT);\n\nconst char *getDeviceName()\n{\n    uint8_t dmac[6];\n\n    getMacAddr(dmac);\n\n    // Meshtastic_ab3c or Shortname_abcd\n    static char name[20];\n    snprintf(name, sizeof(name), \"%02x%02x\", dmac[4], dmac[5]);\n    // if the shortname exists and is NOT the new default of ab3c, use it for BLE name.\n    if (strcmp(owner.short_name, name) != 0) {\n        snprintf(name, sizeof(name), \"%s_%02x%02x\", owner.short_name, dmac[4], dmac[5]);\n    } else {\n        snprintf(name, sizeof(name), \"Meshtastic_%02x%02x\", dmac[4], dmac[5]);\n    }\n    return name;\n}\n\nuint32_t timeLastPowered = 0;\n\nstatic OSThread *powerFSMthread;\nOSThread *ambientLightingThread;\n\nRadioLibHal *RadioLibHAL = NULL;\n\n/**\n * Some platforms (nrf52) might provide an alterate version that suppresses calling delay from sleep.\n */\n__attribute__((weak, noinline)) bool loopCanSleep()\n{\n    return true;\n}\n\n// Weak empty variant initialization function.\n// May be redefined by variant files.\nvoid lateInitVariant() __attribute__((weak));\nvoid lateInitVariant() {}\n\nvoid earlyInitVariant() __attribute__((weak));\nvoid earlyInitVariant() {}\n\n// NRF52 (and probably other platforms) can report when system is in power failure mode\n// (eg. too low battery voltage) and operating it is unsafe (data corruption, bootloops, etc).\n// For example NRF52 will prevent any flash writes in that case automatically\n// (but it causes issues we need to handle).\n// This detection is independent from whatever ADC or dividers used in Meshtastic\n// boards and is internal to chip.\n\n// we use powerHAL layer to get this info and delay booting until power level is safe\n\n// wait until power level is safe to continue booting (to avoid bootloops)\n// blink user led in 3 flashes sequence to indicate what is happening\nvoid waitUntilPowerLevelSafe()\n{\n    while (powerHAL_isPowerLevelSafe() == false) {\n\n#ifdef LED_POWER\n\n        // 3x: blink for 300 ms, pause for 300 ms\n\n        for (int i = 0; i < 3; i++) {\n            digitalWrite(LED_POWER, LED_STATE_ON);\n            delay(300);\n            digitalWrite(LED_POWER, LED_STATE_OFF);\n            delay(300);\n        }\n#endif\n\n        // sleep for 2s\n        delay(2000);\n    }\n}\n\n/**\n * Print info as a structured log message (for automated log processing)\n */\nvoid printInfo()\n{\n    LOG_INFO(\"S:B:%d,%s,%s,%s\", HW_VENDOR, optstr(APP_VERSION), optstr(APP_ENV), optstr(APP_REPO));\n}\n#ifndef PIO_UNIT_TESTING\nvoid setup()\n{\n\n    // initialize power HAL layer as early as possible\n    powerHAL_init();\n\n#ifdef LED_POWER\n    pinMode(LED_POWER, OUTPUT);\n    digitalWrite(LED_POWER, LED_STATE_ON);\n#endif\n\n    // prevent booting if device is in power failure mode\n    // boot sequence will follow when battery level raises to safe mode\n    waitUntilPowerLevelSafe();\n\n    // Defined in variant.cpp for early init code\n    earlyInitVariant();\n\n#if defined(PIN_POWER_EN)\n    pinMode(PIN_POWER_EN, OUTPUT);\n    digitalWrite(PIN_POWER_EN, HIGH);\n#endif\n\n#ifdef LED_NOTIFICATION\n    pinMode(LED_NOTIFICATION, OUTPUT);\n    digitalWrite(LED_NOTIFICATION, HIGH ^ LED_STATE_ON);\n#endif\n\n#ifdef WIFI_LED\n    pinMode(WIFI_LED, OUTPUT);\n    digitalWrite(WIFI_LED, LOW);\n#endif\n\n#ifdef BLE_LED\n    pinMode(BLE_LED, OUTPUT);\n    digitalWrite(BLE_LED, LED_STATE_OFF);\n#endif\n\n    concurrency::hasBeenSetup = true;\n#if HAS_SCREEN\n    meshtastic_Config_DisplayConfig_OledType screen_model =\n        meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO;\n#endif\n    OLEDDISPLAY_GEOMETRY screen_geometry = GEOMETRY_128_64;\n\n#ifdef USE_SEGGER\n    auto mode = false ? SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL : SEGGER_RTT_MODE_NO_BLOCK_TRIM;\n#ifdef NRF52840_XXAA\n    auto buflen = 4096; // this board has a fair amount of ram\n#else\n    auto buflen = 256; // this board has a fair amount of ram\n#endif\n    SEGGER_RTT_ConfigUpBuffer(SEGGER_STDOUT_CH, NULL, NULL, buflen, mode);\n#endif\n\n#ifdef DEBUG_PORT\n    consoleInit(); // Set serial baud rate and init our mesh console\n#endif\n\n#ifdef UNPHONE\n    unphone.printStore();\n#endif\n\n#if ARCH_PORTDUINO\n    RTCQuality ourQuality = RTCQualityDevice;\n\n    std::string timeCommandResult = exec(\"timedatectl status | grep synchronized | grep yes -c\");\n    if (timeCommandResult[0] == '1') {\n        ourQuality = RTCQualityNTP;\n    }\n\n    struct timeval tv;\n    tv.tv_sec = time(NULL);\n    tv.tv_usec = 0;\n    perhapsSetRTC(ourQuality, &tv);\n#endif\n\n    powerMonInit();\n    serialSinceMsec = millis();\n\n    LOG_INFO(\"\\n\\n//\\\\ E S H T /\\\\ S T / C\\n\");\n\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n#ifndef SENSECAP_INDICATOR\n    // use PSRAM for malloc calls > 2048 bytes\n    heap_caps_malloc_extmem_enable(2048);\n#endif\n#endif\n\n#if defined(DEBUG_MUTE) && defined(DEBUG_PORT)\n    DEBUG_PORT.printf(\"\\r\\n\\r\\n//\\\\ E S H T /\\\\ S T / C\\r\\n\");\n    DEBUG_PORT.printf(\"Version %s for %s from %s\\r\\n\", optstr(APP_VERSION), optstr(APP_ENV), optstr(APP_REPO));\n    DEBUG_PORT.printf(\"Debug mute is enabled, there will be no serial output.\\r\\n\");\n#endif\n\n    initDeepSleep();\n\n#if defined(MODEM_POWER_EN)\n    pinMode(MODEM_POWER_EN, OUTPUT);\n    digitalWrite(MODEM_POWER_EN, LOW);\n#endif\n\n#if defined(MODEM_PWRKEY)\n    pinMode(MODEM_PWRKEY, OUTPUT);\n    digitalWrite(MODEM_PWRKEY, LOW);\n#endif\n\n#if defined(LORA_TCXO_GPIO)\n    pinMode(LORA_TCXO_GPIO, OUTPUT);\n    digitalWrite(LORA_TCXO_GPIO, HIGH);\n#endif\n\n#if defined(VEXT_ENABLE)\n    pinMode(VEXT_ENABLE, OUTPUT);\n    digitalWrite(VEXT_ENABLE, VEXT_ON_VALUE); // turn on the display power\n#endif\n\n#if defined(BIAS_T_ENABLE)\n    pinMode(BIAS_T_ENABLE, OUTPUT);\n    digitalWrite(BIAS_T_ENABLE, BIAS_T_VALUE); // turn on 5V for GPS Antenna\n#endif\n\n#if defined(VTFT_CTRL)\n    pinMode(VTFT_CTRL, OUTPUT);\n    digitalWrite(VTFT_CTRL, LOW);\n#endif\n\n#ifdef RESET_OLED\n    pinMode(RESET_OLED, OUTPUT);\n    digitalWrite(RESET_OLED, 1);\n    delay(2);\n    digitalWrite(RESET_OLED, 0);\n    delay(10);\n    digitalWrite(RESET_OLED, 1);\n#endif\n\n#ifdef SENSOR_POWER_CTRL_PIN\n    pinMode(SENSOR_POWER_CTRL_PIN, OUTPUT);\n    digitalWrite(SENSOR_POWER_CTRL_PIN, SENSOR_POWER_ON);\n#endif\n\n#ifdef SENSOR_GPS_CONFLICT\n    bool sensor_detected = false;\n#endif\n#ifdef PERIPHERAL_WARMUP_MS\n    // Some peripherals may require additional time to stabilize after power is connected\n    // e.g. I2C on Heltec Vision Master\n    LOG_INFO(\"Wait for peripherals to stabilize\");\n    delay(PERIPHERAL_WARMUP_MS);\n#endif\n    initSPI();\n\n    OSThread::setup();\n\n    fsInit();\n\n#if !MESHTASTIC_EXCLUDE_I2C\n#if defined(I2C_SDA1) && defined(ARCH_RP2040)\n    Wire1.setSDA(I2C_SDA1);\n    Wire1.setSCL(I2C_SCL1);\n    Wire1.begin();\n#elif defined(I2C_SDA1) && !defined(ARCH_RP2040)\n    Wire1.begin(I2C_SDA1, I2C_SCL1);\n#elif WIRE_INTERFACES_COUNT == 2\n    Wire1.begin();\n#endif\n\n#if defined(I2C_SDA) && defined(ARCH_RP2040)\n    Wire.setSDA(I2C_SDA);\n    Wire.setSCL(I2C_SCL);\n    Wire.begin();\n#elif defined(I2C_SDA) && !defined(ARCH_RP2040)\n    LOG_INFO(\"Starting Bus with (SDA) %d and (SCL) %d: \", I2C_SDA, I2C_SCL);\n    Wire.begin(I2C_SDA, I2C_SCL);\n#elif defined(ARCH_PORTDUINO)\n    if (portduino_config.i2cdev != \"\") {\n        LOG_INFO(\"Use %s as I2C device\", portduino_config.i2cdev.c_str());\n        Wire.begin(portduino_config.i2cdev.c_str());\n    } else {\n        LOG_INFO(\"No I2C device configured, Skip\");\n    }\n#elif HAS_WIRE\n    Wire.begin();\n#endif\n#endif\n\n#if defined(M5STACK_UNITC6L)\n    pinMode(LORA_CS, OUTPUT);\n    digitalWrite(LORA_CS, 1);\n    c6l_init();\n#endif\n\n#ifdef PIN_LCD_RESET\n    // FIXME - move this someplace better, LCD is at address 0x3F\n    pinMode(PIN_LCD_RESET, OUTPUT);\n    digitalWrite(PIN_LCD_RESET, 0);\n    delay(1);\n    digitalWrite(PIN_LCD_RESET, 1);\n    delay(1);\n#endif\n\n#ifdef AQ_SET_PIN\n    // RAK-12039 set pin for Air quality sensor. Detectable on I2C after ~3 seconds, so we need to rescan later\n    pinMode(AQ_SET_PIN, OUTPUT);\n    digitalWrite(AQ_SET_PIN, HIGH);\n#endif\n\n    // Currently only the tbeam has a PMU\n    // PMU initialization needs to be placed before i2c scanning\n    power = new Power();\n    power->setStatusHandler(powerStatus);\n    powerStatus->observe(&power->newStatus);\n    power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration\n\n#if !MESHTASTIC_EXCLUDE_I2C\n    // We need to scan here to decide if we have a screen for nodeDB.init() and because power has been applied to\n    // accessories\n    auto i2cScanner = std::unique_ptr<ScanI2CTwoWire>(new ScanI2CTwoWire());\n#if HAS_WIRE\n    LOG_INFO(\"Scan for i2c devices\");\n#endif\n\n#if defined(I2C_SDA1) || (defined(NRF52840_XXAA) && (WIRE_INTERFACES_COUNT == 2))\n    i2cScanner->scanPort(ScanI2C::I2CPort::WIRE1);\n#endif\n\n#if defined(I2C_SDA)\n    i2cScanner->scanPort(ScanI2C::I2CPort::WIRE);\n#elif defined(ARCH_PORTDUINO)\n    if (portduino_config.i2cdev != \"\") {\n        LOG_INFO(\"Scan for i2c devices\");\n        i2cScanner->scanPort(ScanI2C::I2CPort::WIRE);\n    }\n#elif HAS_WIRE\n    i2cScanner->scanPort(ScanI2C::I2CPort::WIRE);\n#endif\n\n    auto i2cCount = i2cScanner->countDevices();\n    if (i2cCount == 0) {\n        LOG_INFO(\"No I2C devices found\");\n    } else {\n        LOG_INFO(\"%i I2C devices found\", i2cCount);\n#ifdef SENSOR_GPS_CONFLICT\n        sensor_detected = true;\n#endif\n    }\n#ifdef ARCH_ESP32\n#ifdef DEBUG_PARTITION_TABLE\n    printPartitionTable();\n#endif\n#endif // ARCH_ESP32\n#ifdef ARCH_ESP32\n    // Don't init display if we don't have one or we are waking headless due to a timer event\n    if (wakeCause == ESP_SLEEP_WAKEUP_TIMER) {\n        LOG_DEBUG(\"suppress screen wake because this is a headless timer wakeup\");\n        i2cScanner->setSuppressScreen();\n    }\n#endif\n\n#if HAS_SCREEN\n    auto screenInfo = i2cScanner->firstScreen();\n    screen_found = screenInfo.type != ScanI2C::DeviceType::NONE ? screenInfo.address : ScanI2C::ADDRESS_NONE;\n\n    if (screen_found.port != ScanI2C::I2CPort::NO_I2C) {\n        switch (screenInfo.type) {\n        case ScanI2C::DeviceType::SCREEN_SH1106:\n            screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_SH1106;\n            break;\n        case ScanI2C::DeviceType::SCREEN_SSD1306:\n            screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_SSD1306;\n            break;\n        case ScanI2C::DeviceType::SCREEN_ST7567:\n        case ScanI2C::DeviceType::SCREEN_UNKNOWN:\n        default:\n            screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO;\n        }\n    }\n#endif\n\n#define UPDATE_FROM_SCANNER(FIND_FN)\n#if defined(USE_VIRTUAL_KEYBOARD)\n    kb_found = true;\n#endif\n    auto rtc_info = i2cScanner->firstRTC();\n    rtc_found = rtc_info.type != ScanI2C::DeviceType::NONE ? rtc_info.address : rtc_found;\n\n    auto kb_info = i2cScanner->firstKeyboard();\n\n    if (kb_info.type != ScanI2C::DeviceType::NONE) {\n        kb_found = true;\n        cardkb_found = kb_info.address;\n        switch (kb_info.type) {\n        case ScanI2C::DeviceType::RAK14004:\n            kb_model = 0x02;\n            break;\n        case ScanI2C::DeviceType::CARDKB:\n            kb_model = 0x00;\n            break;\n        case ScanI2C::DeviceType::TDECKKB:\n            // assign an arbitrary value to distinguish from other models\n            kb_model = 0x10;\n            break;\n        case ScanI2C::DeviceType::BBQ10KB:\n            // assign an arbitrary value to distinguish from other models\n            kb_model = 0x11;\n            break;\n        case ScanI2C::DeviceType::MPR121KB:\n            // assign an arbitrary value to distinguish from other models\n            kb_model = 0x37;\n            break;\n        case ScanI2C::DeviceType::TCA8418KB:\n            // assign an arbitrary value to distinguish from other models\n            kb_model = 0x84;\n            break;\n        default:\n            // use this as default since it's also just zero\n            LOG_WARN(\"kb_info.type is unknown(0x%02x), setting kb_model=0x00\", kb_info.type);\n            kb_model = 0x00;\n        }\n    }\n\n    pmu_found = i2cScanner->exists(ScanI2C::DeviceType::PMU_AXP192_AXP2101);\n\n    auto aqiInfo = i2cScanner->firstAQI();\n    aqi_found = aqiInfo.type != ScanI2C::DeviceType::NONE ? aqiInfo.address : ScanI2C::ADDRESS_NONE;\n\n/*\n * There are a bunch of sensors that have no further logic than to be found and stuffed into the\n * nodeTelemetrySensorsMap singleton. This wraps that logic in a temporary scope to declare the temporary field\n * \"found\".\n */\n\n// Two supported RGB LED currently\n#ifdef HAS_RGB_LED\n    rgb_found = i2cScanner->firstRGBLED();\n#endif\n\n#ifdef HAS_TPS65233\n    // TPS65233 is a power management IC for satellite modems, used in the Dreamcatcher\n    // We are switching it off here since we don't use an LNB.\n    if (i2cScanner->exists(ScanI2C::DeviceType::TPS65233)) {\n        Wire.beginTransmission(TPS65233_ADDR);\n        Wire.write(0);   // Register 0\n        Wire.write(128); // Turn off the LNB power, keep I2C Control enabled\n        Wire.endTransmission();\n        Wire.beginTransmission(TPS65233_ADDR);\n        Wire.write(1); // Register 1\n        Wire.write(0); // Turn off Tone Generator 22kHz\n        Wire.endTransmission();\n    }\n#endif\n\n#if !defined(ARCH_STM32WL)\n    auto acc_info = i2cScanner->firstAccelerometer();\n    accelerometer_found = acc_info.type != ScanI2C::DeviceType::NONE ? acc_info.address : accelerometer_found;\n    LOG_DEBUG(\"acc_info = %i\", acc_info.type);\n#endif\n\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::INA260, meshtastic_TelemetrySensorType_INA260);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::INA226, meshtastic_TelemetrySensorType_INA226);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::INA219, meshtastic_TelemetrySensorType_INA219);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::INA3221, meshtastic_TelemetrySensorType_INA3221);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MAX17048, meshtastic_TelemetrySensorType_MAX17048);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::QMC6310U, meshtastic_TelemetrySensorType_QMC6310);\n    // TODO: Types need to be added meshtastic_TelemetrySensorType_QMC6310N\n    //  scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::QMC6310N, meshtastic_TelemetrySensorType_QMC6310N);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::QMI8658, meshtastic_TelemetrySensorType_QMI8658);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::QMC5883L, meshtastic_TelemetrySensorType_QMC5883L);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::HMC5883L, meshtastic_TelemetrySensorType_QMC5883L);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MLX90614, meshtastic_TelemetrySensorType_MLX90614);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::ICM20948, meshtastic_TelemetrySensorType_ICM20948);\n    scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MAX30102, meshtastic_TelemetrySensorType_MAX30102);\n#endif\n\n#ifdef HAS_SDCARD\n    setupSDCard();\n#endif\n\n    // Hello\n    printInfo();\n#ifdef BUILD_EPOCH\n    LOG_INFO(\"Build timestamp: %ld\", BUILD_EPOCH);\n#endif\n\n#ifdef ARCH_ESP32\n    esp32Setup();\n#endif\n\n#ifdef ARCH_NRF52\n    nrf52Setup();\n#endif\n\n#ifdef ARCH_RP2040\n    rp2040Setup();\n#endif\n\n    // We do this as early as possible because this loads preferences from flash\n    // but we need to do this after main cpu init (esp32setup), because we need the random seed set\n    nodeDB = new NodeDB;\n\n    // Initialize transmit history to persist broadcast throttle timers across reboots\n    TransmitHistory::getInstance()->loadFromDisk();\n#if HAS_TFT\n    if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        tftSetup();\n    }\n#endif\n\n    router = new ReliableRouter();\n\n    // only play start melody when role is not tracker or sensor\n    if (config.power.is_power_saving == true &&\n        IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER,\n                  meshtastic_Config_DeviceConfig_Role_TAK_TRACKER, meshtastic_Config_DeviceConfig_Role_SENSOR))\n        LOG_DEBUG(\"Tracker/Sensor: Skip start melody\");\n    else\n        playStartMelody();\n\n#if HAS_SCREEN\n        // fixed screen override?\n#if defined(USE_SH1107)\n    screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // set dimension of 128x128\n    screen_geometry = GEOMETRY_128_128;\n#elif defined(USE_SH1107_128_64)\n    screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64\n#else\n    if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO)\n        screen_model = config.display.oled;\n#endif\n#endif\n\n#if !MESHTASTIC_EXCLUDE_I2C\n#if !defined(ARCH_STM32WL)\n    if (acc_info.type != ScanI2C::DeviceType::NONE) {\n        accelerometerThread = new AccelerometerThread(acc_info.type);\n    }\n#endif\n\n#if defined(HAS_NEOPIXEL) || defined(UNPHONE) || defined(RGBLED_RED)\n    ambientLightingThread = new AmbientLightingThread(ScanI2C::DeviceType::NONE);\n#elif !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)\n    if (rgb_found.type != ScanI2C::DeviceType::NONE) {\n        ambientLightingThread = new AmbientLightingThread(rgb_found.type);\n    }\n#endif\n#endif\n\n#ifdef HAS_DRV2605\n#if defined(PIN_DRV_EN)\n    pinMode(PIN_DRV_EN, OUTPUT);\n    digitalWrite(PIN_DRV_EN, HIGH);\n    delay(10);\n#endif\n    drv.begin();\n    drv.selectLibrary(1);\n    // I2C trigger by sending 'go' command\n    drv.setMode(DRV2605_MODE_INTTRIG);\n#endif\n\n    // Init our SPI controller (must be before screen and lora)\n#ifdef ARCH_RP2040\n#ifdef HW_SPI1_DEVICE\n    SPI1.setSCK(LORA_SCK);\n    SPI1.setTX(LORA_MOSI);\n    SPI1.setRX(LORA_MISO);\n    pinMode(LORA_CS, OUTPUT);\n    digitalWrite(LORA_CS, HIGH);\n    SPI1.begin(false);\n#else  // HW_SPI1_DEVICE\n    SPI.setSCK(LORA_SCK);\n    SPI.setTX(LORA_MOSI);\n    SPI.setRX(LORA_MISO);\n    SPI.begin(false);\n#endif // HW_SPI1_DEVICE\n#elif ARCH_PORTDUINO\n    if (portduino_config.lora_spi_dev != \"ch341\") {\n        SPI.begin();\n    }\n#elif !defined(ARCH_ESP32) // ARCH_RP2040\n#if defined(RAK3401) || defined(RAK13302)\n    pinMode(WB_IO2, OUTPUT);\n    digitalWrite(WB_IO2, HIGH);\n    SPI1.setPins(LORA_MISO, LORA_SCK, LORA_MOSI);\n    SPI1.begin();\n#else\n    SPI.begin();\n#endif\n#else\n        // ESP32\n#if defined(HW_SPI1_DEVICE)\n    SPI1.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);\n    LOG_DEBUG(\"SPI1.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)\", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);\n    SPI1.setFrequency(4000000);\n#else\n    SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);\n    LOG_DEBUG(\"SPI.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)\", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);\n    SPI.setFrequency(4000000);\n#endif\n#endif\n\n    // Initialize the screen first so we can show the logo while we start up everything else.\n#if HAS_SCREEN\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n\n#if defined(ST7701_CS) || defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) ||       \\\n    defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) ||              \\\n    defined(USE_SPISSD1306) || defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR)\n        screen = new graphics::Screen(screen_found, screen_model, screen_geometry);\n#elif defined(ARCH_PORTDUINO)\n        if ((screen_found.port != ScanI2C::I2CPort::NO_I2C || portduino_config.displayPanel) &&\n            config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n            screen = new graphics::Screen(screen_found, screen_model, screen_geometry);\n        }\n#else\n        if (screen_found.port != ScanI2C::I2CPort::NO_I2C)\n            screen = new graphics::Screen(screen_found, screen_model, screen_geometry);\n#endif\n    }\n#endif // HAS_SCREEN\n\n    // TODO Remove magic string\n    // setup TZ prior to time actions.\n#if !MESHTASTIC_EXCLUDE_TZ\n    LOG_DEBUG(\"Use compiled/slipstreamed %s\", slipstreamTZString); // important, removing this clobbers our magic string\n    if (*config.device.tzdef && config.device.tzdef[0] != 0) {\n        LOG_DEBUG(\"Saved TZ: %s \", config.device.tzdef);\n        setenv(\"TZ\", config.device.tzdef, 1);\n    } else {\n        if (strncmp((const char *)slipstreamTZString, \"tzpl\", 4) == 0) {\n            setenv(\"TZ\", \"GMT0\", 1);\n        } else {\n            setenv(\"TZ\", (const char *)slipstreamTZString, 1);\n            strcpy(config.device.tzdef, (const char *)slipstreamTZString);\n        }\n    }\n    tzset();\n    LOG_DEBUG(\"Set Timezone to %s\", getenv(\"TZ\"));\n#endif\n\n    readFromRTC(); // read the main CPU RTC at first (in case we can't get GPS time)\n\n#if !MESHTASTIC_EXCLUDE_GPS\n    // If we're taking on the repeater role, ignore GPS\n#ifdef SENSOR_GPS_CONFLICT\n    if (sensor_detected == false) {\n#endif\n        if (HAS_GPS) {\n            if (config.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT) {\n                gps = GPS::createGps();\n                if (gps) {\n                    gpsStatus->observe(&gps->newStatus);\n                } else {\n                    LOG_DEBUG(\"Run without GPS\");\n                }\n            }\n        }\n#ifdef SENSOR_GPS_CONFLICT\n    }\n#endif\n\n#endif\n\n    nodeStatus->observe(&nodeDB->newStatus);\n\n#ifdef HAS_I2S\n    LOG_DEBUG(\"Start audio thread\");\n    audioThread = new AudioThread();\n#endif\n\n#ifdef HAS_UDP_MULTICAST\n    LOG_DEBUG(\"Start multicast thread\");\n    udpHandler = new UdpMulticastHandler();\n#ifdef ARCH_PORTDUINO\n    // FIXME: portduino does not ever call onNetworkConnected so call it here because I don't know what happen if I call\n    // onNetworkConnected there\n    if (config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {\n        udpHandler->start();\n    }\n#endif\n#endif\n    service = new MeshService();\n    service->init();\n\n    // Set osk_found for trackball/encoder devices BEFORE setupModules so CannedMessageModule can detect it\n#if defined(HAS_TRACKBALL) || (defined(INPUTDRIVER_ENCODER_TYPE) && INPUTDRIVER_ENCODER_TYPE == 2)\n#ifndef HAS_PHYSICAL_KEYBOARD\n    osk_found = true;\n#endif\n#endif\n\n    // Now that the mesh service is created, create any modules\n    setupModules();\n\n#if !MESHTASTIC_EXCLUDE_I2C\n    // Inform modules about I2C devices\n    ScanI2CCompleted(i2cScanner.get());\n    i2cScanner.reset();\n#endif\n\n#if !defined(MESHTASTIC_EXCLUDE_PKI)\n    // warn the user about a low entropy key\n    if (nodeDB->keyIsLowEntropy && !nodeDB->hasWarned) {\n        LOG_WARN(LOW_ENTROPY_WARNING);\n        meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n        cn->level = meshtastic_LogRecord_Level_WARNING;\n        cn->time = getValidTime(RTCQualityFromNet);\n        sprintf(cn->message, LOW_ENTROPY_WARNING);\n        service->sendClientNotification(cn);\n        nodeDB->hasWarned = true;\n    }\n#endif\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\n    if (inputBroker)\n        inputBroker->Init();\n#endif\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n    // After modules are setup, so we can observe modules\n    setupNicheGraphics();\n#endif\n\n// Do this after service.init (because that clears error_code)\n#ifdef HAS_PMU\n    if (!pmu_found)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_NO_AXP192); // Record a hardware fault for missing hardware\n#endif\n\n#if !MESHTASTIC_EXCLUDE_I2C\n// Don't call screen setup until after nodedb is setup (because we need\n// the current region name)\n#if defined(ST7701_CS) || defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) ||       \\\n    defined(ST7789_CS) || defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) ||              \\\n    defined(USE_ST7796) || defined(USE_SPISSD1306) || defined(HACKADAY_COMMUNICATOR)\n    if (screen)\n        screen->setup();\n#elif defined(ARCH_PORTDUINO)\n    if ((screen_found.port != ScanI2C::I2CPort::NO_I2C || portduino_config.displayPanel) &&\n        config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        screen->setup();\n    }\n#else\n    if (screen_found.port != ScanI2C::I2CPort::NO_I2C && screen)\n        screen->setup();\n#endif\n#endif\n\n    auto rIf = initLoRa();\n\n    lateInitVariant(); // Do board specific init (see extra_variants/README.md for documentation)\n\n#if !MESHTASTIC_EXCLUDE_MQTT\n    mqttInit();\n#endif\n\n#ifdef RF95_FAN_EN\n    // Ability to disable FAN if PIN has been set with RF95_FAN_EN.\n    // Make sure LoRa has been started before disabling FAN.\n    if (config.lora.pa_fan_disabled)\n        digitalWrite(RF95_FAN_EN, LOW ^ 0);\n#endif\n\n#ifndef ARCH_PORTDUINO\n\n        // Initialize Wifi\n#if HAS_WIFI\n    initWifi();\n#endif\n\n#if HAS_ETHERNET\n    // Initialize Ethernet\n    initEthernet();\n#endif\n#endif\n\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER\n    // Start web server thread.\n    webServerThread = new WebServerThread();\n#endif\n\n#ifdef ARCH_PORTDUINO\n#if __has_include(<ulfius.h>)\n    if (portduino_config.webserverport != -1) {\n        piwebServerThread = new PiWebServerThread();\n        std::atexit([] { delete piwebServerThread; });\n    }\n#endif\n    initApiServer(TCPPort);\n#endif\n\n    // Start airtime logger thread.\n    airTime = new AirTime();\n\n    if (!rIf)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_NO_RADIO);\n    else {\n        // Log bit rate to debug output\n        LOG_DEBUG(\"LoRA bitrate = %f bytes / sec\", (float(meshtastic_Constants_DATA_PAYLOAD_LEN) /\n                                                    (float(rIf->getPacketTime(meshtastic_Constants_DATA_PAYLOAD_LEN)))) *\n                                                       1000);\n\n        router->addInterface(std::move(rIf));\n    }\n\n    // This must be _after_ service.init because we need our preferences loaded from flash to have proper timeout values\n    PowerFSM_setup(); // we will transition to ON in a couple of seconds, FIXME, only do this for cold boots, not waking from SDS\n    powerFSMthread = new PowerFSMThread();\n\n#if !HAS_TFT\n    setCPUFast(false); // 80MHz is fine for our slow peripherals\n#endif\n\n#ifdef ARDUINO_ARCH_ESP32\n    LOG_DEBUG(\"Free heap  : %7d bytes\", ESP.getFreeHeap());\n    LOG_DEBUG(\"Free PSRAM : %7d bytes\", ESP.getFreePsram());\n#endif\n\n    // We manually run this to update the NodeStatus\n    nodeDB->notifyObservers(true);\n}\n\n#endif\nuint32_t rebootAtMsec;     // If not zero we will reboot at this time (used to reboot shortly after the update completes)\nuint32_t shutdownAtMsec;   // If not zero we will shutdown at this time (used to shutdown from python or mobile client)\nbool suppressRebootBanner; // If true, suppress \"Rebooting...\" overlay (used for OTA handoff)\n\n// If a thread does something that might need for it to be rescheduled ASAP it can set this flag\n// This will suppress the current delay and instead try to run ASAP.\nbool runASAP;\n\n// TODO find better home than main.cpp\nextern meshtastic_DeviceMetadata getDeviceMetadata()\n{\n    meshtastic_DeviceMetadata deviceMetadata;\n    strncpy(deviceMetadata.firmware_version, optstr(APP_VERSION), sizeof(deviceMetadata.firmware_version));\n    deviceMetadata.device_state_version = DEVICESTATE_CUR_VER;\n    deviceMetadata.canShutdown = pmu_found || HAS_CPU_SHUTDOWN;\n    deviceMetadata.hasBluetooth = HAS_BLUETOOTH;\n    deviceMetadata.hasWifi = HAS_WIFI;\n    deviceMetadata.hasEthernet = HAS_ETHERNET;\n    deviceMetadata.role = config.device.role;\n    deviceMetadata.position_flags = config.position.position_flags;\n    deviceMetadata.hw_model = HW_VENDOR;\n    deviceMetadata.hasRemoteHardware = moduleConfig.remote_hardware.enabled;\n    deviceMetadata.excluded_modules = meshtastic_ExcludedModules_EXCLUDED_NONE;\n#if MESHTASTIC_EXCLUDE_REMOTEHARDWARE\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_REMOTEHARDWARE_CONFIG;\n#endif\n#if MESHTASTIC_EXCLUDE_AUDIO\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AUDIO_CONFIG;\n#endif\n// Option to explicitly include canned messages for edge cases, e.g. niche graphics\n#if ((!HAS_SCREEN || NO_EXT_GPIO) || MESHTASTIC_EXCLUDE_CANNEDMESSAGES) && !defined(MESHTASTIC_INCLUDE_NICHE_GRAPHICS)\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_CANNEDMSG_CONFIG;\n#endif\n#if NO_EXT_GPIO || MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_EXTNOTIF_CONFIG;\n#endif\n// Only edge case here is if we apply this a device with built in Accelerometer and want to detect interrupts\n// We'll have to macro guard against those targets potentially\n#if NO_EXT_GPIO || MESHTASTIC_EXCLUDE_DETECTIONSENSOR\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG;\n#endif\n// If we don't have any GPIO and we don't have GPS OR we don't want too - no purpose in having serial config\n#if NO_EXT_GPIO && NO_GPS || MESHTASTIC_EXCLUDE_SERIAL\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_SERIAL_CONFIG;\n#endif\n#ifndef ARCH_ESP32\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_PAXCOUNTER_CONFIG;\n#endif\n#if !defined(HAS_RGB_LED) && !RAK_4631\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AMBIENTLIGHTING_CONFIG;\n#endif\n\n// No bluetooth on these targets (yet):\n// Pico W / 2W may get it at some point\n// Portduino and ESP32-C6 are excluded because we don't have a working bluetooth stacks integrated yet.\n#if defined(ARCH_RP2040) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL) || defined(CONFIG_IDF_TARGET_ESP32C6)\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_BLUETOOTH_CONFIG;\n#endif\n\n#if defined(ARCH_NRF52) && !HAS_ETHERNET // nrf52 doesn't have network unless it's a RAK ethernet gateway currently\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_NETWORK_CONFIG; // No network on nRF52\n#elif defined(ARCH_RP2040) && !HAS_WIFI && !HAS_ETHERNET\n    deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_NETWORK_CONFIG; // No network on RP2040\n#endif\n\n#if !(MESHTASTIC_EXCLUDE_PKI)\n    deviceMetadata.hasPKC = true;\n#endif\n    return deviceMetadata;\n}\n\n#if !MESHTASTIC_EXCLUDE_I2C\nvoid scannerToSensorsMap(const std::unique_ptr<ScanI2CTwoWire> &i2cScanner, ScanI2C::DeviceType deviceType,\n                         meshtastic_TelemetrySensorType sensorType)\n{\n    auto found = i2cScanner->find(deviceType);\n    if (found.type != ScanI2C::DeviceType::NONE) {\n        nodeTelemetrySensorsMap[sensorType].first = found.address.address;\n        nodeTelemetrySensorsMap[sensorType].second = i2cScanner->fetchI2CBus(found.address);\n    }\n}\n#endif\n\n#ifndef PIO_UNIT_TESTING\nvoid loop()\n{\n    runASAP = false;\n\n#ifdef ARCH_ESP32\n    esp32Loop();\n#endif\n#ifdef ARCH_NRF52\n    nrf52Loop();\n#endif\n    power->powerCommandsCheck();\n\n    if (RadioLibInterface::instance != nullptr) {\n        static uint32_t lastRadioMissedIrqPoll;\n        if (!Throttle::isWithinTimespanMs(lastRadioMissedIrqPoll, 1000)) {\n            lastRadioMissedIrqPoll = millis();\n            RadioLibInterface::instance->pollMissedIrqs();\n        }\n\n        // Periodic AGC reset — warm sleep + recalibrate to prevent stuck AGC gain\n        static uint32_t lastAgcReset;\n        if (!Throttle::isWithinTimespanMs(lastAgcReset, AGC_RESET_INTERVAL_MS)) {\n            lastAgcReset = millis();\n            RadioLibInterface::instance->resetAGC();\n        }\n    }\n\n#ifdef DEBUG_STACK\n    static uint32_t lastPrint = 0;\n    if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) {\n        lastPrint = millis();\n        meshtastic::printThreadInfo(\"main\");\n    }\n#endif\n\n    service->loop();\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER && defined(HAS_FREE_RTOS) && !defined(ARCH_RP2040)\n    if (inputBroker)\n        inputBroker->processInputEventQueue();\n#endif\n#if ARCH_PORTDUINO\n    if (portduino_config.lora_spi_dev == \"ch341\" && ch341Hal != nullptr) {\n        ch341Hal->checkError();\n    }\n    if (portduino_status.LoRa_in_error && rebootAtMsec == 0) {\n        LOG_ERROR(\"LoRa in error detected, attempting to recover\");\n        router->addInterface(nullptr);\n        if (portduino_config.lora_spi_dev == \"ch341\") {\n            if (ch341Hal != nullptr) {\n                delete ch341Hal;\n                ch341Hal = nullptr;\n                sleep(3);\n            }\n            try {\n                ch341Hal = new Ch341Hal(0, portduino_config.lora_usb_serial_num, portduino_config.lora_usb_vid,\n                                        portduino_config.lora_usb_pid);\n            } catch (std::exception &e) {\n                std::cerr << e.what() << std::endl;\n                std::cerr << \"Could not initialize CH341 device!\" << std::endl;\n                exit(EXIT_FAILURE);\n            }\n        }\n        auto rIf = initLoRa();\n        if (rIf) {\n            router->addInterface(std::move(rIf));\n            portduino_status.LoRa_in_error = false;\n        } else {\n            LOG_WARN(\"Reconfigure failed, rebooting\");\n            if (screen) {\n                screen->showSimpleBanner(\"Rebooting...\");\n            }\n            rebootAtMsec = millis() + 25;\n        }\n    }\n#if HAS_TFT\n    if (screen && portduino_config.displayPanel == x11 &&\n        config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        auto dispdev = screen->getDisplayDevice();\n        if (dispdev)\n            static_cast<TFTDisplay *>(dispdev)->sdlLoop();\n    }\n#endif\n#endif\n#if HAS_SCREEN && ENABLE_MESSAGE_PERSISTENCE\n    messageStoreAutosaveTick();\n#endif\n    long delayMsec = mainController.runOrDelay();\n\n    // We want to sleep as long as possible here - because it saves power\n    if (!runASAP && loopCanSleep()) {\n#ifdef DEBUG_LOOP_TIMING\n        LOG_DEBUG(\"main loop delay: %d\", delayMsec);\n#endif\n        mainDelay.delay(delayMsec);\n    }\n}\n#endif\n"
  },
  {
    "path": "src/main.h",
    "content": "#pragma once\n\n#include \"BluetoothStatus.h\"\n#include \"GPSStatus.h\"\n#include \"NodeStatus.h\"\n#include \"PowerStatus.h\"\n#include \"detect/ScanI2C.h\"\n#include \"graphics/Screen.h\"\n#include \"memGet.h\"\n#include \"mesh/generated/meshtastic/config.pb.h\"\n#include \"mesh/generated/meshtastic/telemetry.pb.h\"\n#include <SPI.h>\n#include <map>\n#if defined(ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2)\n#include \"nimble/NimbleBluetooth.h\"\nextern NimbleBluetooth *nimbleBluetooth;\n#endif\n#ifdef ARCH_NRF52\n#include \"NRF52Bluetooth.h\"\nextern NRF52Bluetooth *nrf52Bluetooth;\n#endif\n#if !MESHTASTIC_EXCLUDE_I2C\n#include \"detect/ScanI2CTwoWire.h\"\n#endif\n\n#if ARCH_PORTDUINO\nextern HardwareSPI *DisplaySPI;\nextern HardwareSPI *LoraSPI;\n#endif\n\nextern ScanI2C::DeviceAddress screen_found;\nextern ScanI2C::DeviceAddress cardkb_found;\nextern uint8_t kb_model;\nextern bool kb_found;\nextern bool osk_found;\nextern ScanI2C::DeviceAddress rtc_found;\nextern ScanI2C::DeviceAddress accelerometer_found;\nextern ScanI2C::FoundDevice rgb_found;\nextern ScanI2C::DeviceAddress aqi_found;\n\nextern bool eink_found;\nextern bool pmu_found;\nextern bool isUSBPowered;\n\n#ifdef HAS_DRV2605\n#include <Adafruit_DRV2605.h>\nextern Adafruit_DRV2605 drv;\n#endif\n\n#ifdef HAS_PCA9557\n#include <PCA9557.h>\nextern PCA9557 io;\n#endif\n\n#ifdef HAS_I2S\n#include \"AudioThread.h\"\nextern AudioThread *audioThread;\n#endif\n\n#ifdef HAS_UDP_MULTICAST\n#include \"mesh/udp/UdpMulticastHandler.h\"\nextern UdpMulticastHandler *udpHandler;\n#endif\n\n// Global Screen singleton.\nextern graphics::Screen *screen;\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n#include \"motion/AccelerometerThread.h\"\nextern AccelerometerThread *accelerometerThread;\n#endif\n\nextern bool isVibrating;\n\nextern int TCPPort; // set by Portduino\n\n// Return a human readable string of the form \"Meshtastic_ab13\"\nconst char *getDeviceName();\n\nextern uint32_t timeLastPowered;\n\nextern uint32_t rebootAtMsec;\nextern uint32_t shutdownAtMsec;\nextern bool suppressRebootBanner;\n\nextern uint32_t serialSinceMsec;\n\n// If a thread does something that might need for it to be rescheduled ASAP it can set this flag\n// This will suppress the current delay and instead try to run ASAP.\nextern bool runASAP;\n\nextern bool pauseBluetoothLogging;\n\nvoid nrf52Setup(), esp32Setup(), nrf52Loop(), esp32Loop(), rp2040Setup(), clearBonds(), enterDfuMode();\n\nmeshtastic_DeviceMetadata getDeviceMetadata();\n#if !MESHTASTIC_EXCLUDE_I2C\nvoid scannerToSensorsMap(const std::unique_ptr<ScanI2CTwoWire> &i2cScanner, ScanI2C::DeviceType deviceType,\n                         meshtastic_TelemetrySensorType sensorType);\n#endif\n\n// We default to 4MHz SPI, SPI mode 0\nextern SPISettings spiSettings;\n"
  },
  {
    "path": "src/memGet.cpp",
    "content": "/**\n * @file memGet.cpp\n * @brief Implementation of MemGet class that provides functions to get memory information.\n *\n * This file contains the implementation of MemGet class that provides functions to get\n * information about free heap, heap size, free psram and psram size. The functions are\n * implemented for ESP32 and NRF52 architectures. If the platform does not have heap\n * management function implemented, the functions return UINT32_MAX or 0.\n */\n#include \"memGet.h\"\n#include \"configuration.h\"\n\n#ifdef ARCH_STM32WL\n#include <malloc.h>\n#endif\n\nMemGet memGet;\n\n/**\n * Returns the amount of free heap memory in bytes.\n * @return uint32_t The amount of free heap memory in bytes.\n */\nuint32_t MemGet::getFreeHeap()\n{\n#ifdef ARCH_ESP32\n    return ESP.getFreeHeap();\n#elif defined(ARCH_NRF52)\n    return dbgHeapFree();\n#elif defined(ARCH_RP2040)\n    return rp2040.getFreeHeap();\n#elif defined(ARCH_STM32WL)\n    struct mallinfo m = mallinfo();\n    return m.fordblks; // Total free space (bytes)\n#else\n    // this platform does not have heap management function implemented\n    return UINT32_MAX;\n#endif\n}\n\n/**\n * Returns the size of the heap memory in bytes.\n * @return uint32_t The size of the heap memory in bytes.\n */\nuint32_t MemGet::getHeapSize()\n{\n#ifdef ARCH_ESP32\n    return ESP.getHeapSize();\n#elif defined(ARCH_NRF52)\n    return dbgHeapTotal();\n#elif defined(ARCH_RP2040)\n    return rp2040.getTotalHeap();\n#elif defined(ARCH_STM32WL)\n    struct mallinfo m = mallinfo();\n    return m.arena; // Non-mmapped space allocated (bytes)\n#else\n    // this platform does not have heap management function implemented\n    return UINT32_MAX;\n#endif\n}\n\n/**\n * Returns the amount of free psram memory in bytes.\n *\n * @return The amount of free psram memory in bytes.\n */\nuint32_t MemGet::getFreePsram()\n{\n#ifdef ARCH_ESP32\n    return ESP.getFreePsram();\n#elif defined(ARCH_PORTDUINO)\n    return 4194252;\n#else\n    return 0;\n#endif\n}\n\n/**\n * @brief Returns the size of the PSRAM memory.\n *\n * @return uint32_t The size of the PSRAM memory.\n */\nuint32_t MemGet::getPsramSize()\n{\n#ifdef ARCH_ESP32\n    return ESP.getPsramSize();\n#elif defined(ARCH_PORTDUINO)\n    return 4194252;\n#else\n    return 0;\n#endif\n}\n\nvoid displayPercentHeapFree()\n{\n    uint32_t freeHeap = memGet.getFreeHeap();\n    uint32_t totalHeap = memGet.getHeapSize();\n    if (totalHeap == 0 || totalHeap == UINT32_MAX) {\n        LOG_INFO(\"Heap size unavailable\");\n        return;\n    }\n    int percent = (int)((freeHeap * 100) / totalHeap);\n    LOG_INFO(\"Heap free: %d%% (%u/%u bytes)\", percent, freeHeap, totalHeap);\n}"
  },
  {
    "path": "src/memGet.h",
    "content": "#pragma once\n#ifndef _MT_MEMGET_H\n#define _MT_MEMGET_H\n\n#include <Arduino.h>\n\nclass MemGet\n{\n  public:\n    uint32_t getFreeHeap();\n    uint32_t getHeapSize();\n    uint32_t getFreePsram();\n    uint32_t getPsramSize();\n};\n\nextern MemGet memGet;\n\n#endif\n"
  },
  {
    "path": "src/mesh/Channels.cpp",
    "content": "#include \"Channels.h\"\n\n#include \"CryptoEngine.h\"\n#include \"Default.h\"\n#include \"DisplayFormatters.h\"\n#include \"NodeDB.h\"\n#include \"RadioInterface.h\"\n#include \"configuration.h\"\n\n#include <assert.h>\n\n#if !MESHTASTIC_EXCLUDE_MQTT\n#include \"mqtt/MQTT.h\"\n#endif\n\nChannels channels;\n\nconst char *Channels::adminChannel = \"admin\";\nconst char *Channels::gpioChannel = \"gpio\";\nconst char *Channels::serialChannel = \"serial\";\n#if !MESHTASTIC_EXCLUDE_MQTT\nconst char *Channels::mqttChannel = \"mqtt\";\n#endif\n\nmeshtastic_Channel dummyChannel = {.index = -1};\n\nuint8_t xorHash(const uint8_t *p, size_t len)\n{\n    uint8_t code = 0;\n    for (size_t i = 0; i < len; i++)\n        code ^= p[i];\n    return code;\n}\n\n/** Given a channel number, return the (0 to 255) hash for that channel.\n * The hash is just an xor of the channel name followed by the channel PSK being used for encryption\n * If no suitable channel could be found, return -1\n */\nint16_t Channels::generateHash(ChannelIndex channelNum)\n{\n    auto k = getKey(channelNum);\n    if (k.length < 0)\n        return -1; // invalid\n    else {\n        const char *name = getName(channelNum);\n        uint8_t h = xorHash((const uint8_t *)name, strlen(name));\n\n        h ^= xorHash(k.bytes, k.length);\n\n        return h;\n    }\n}\n\n/**\n * Validate a channel, fixing any errors as needed\n */\nmeshtastic_Channel &Channels::fixupChannel(ChannelIndex chIndex)\n{\n    meshtastic_Channel &ch = getByIndex(chIndex);\n\n    ch.index = chIndex; // Preinit the index so it be ready to share with the phone (we'll never change it later)\n\n    if (!ch.has_settings) {\n        // No settings! Must disable and skip\n        ch.role = meshtastic_Channel_Role_DISABLED;\n        memset(&ch.settings, 0, sizeof(ch.settings));\n        ch.has_settings = true;\n    } else {\n        meshtastic_ChannelSettings &meshtastic_channelSettings = ch.settings;\n\n        // Convert the old string \"Default\" to our new short representation\n        if (strcmp(meshtastic_channelSettings.name, \"Default\") == 0)\n            *meshtastic_channelSettings.name = '\\0';\n    }\n\n    hashes[chIndex] = generateHash(chIndex);\n\n    return ch;\n}\n\nvoid Channels::initDefaultLoraConfig()\n{\n    meshtastic_Config_LoRaConfig &loraConfig = config.lora;\n\n    loraConfig.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST; // Default to Long Range & Fast\n    loraConfig.use_preset = true;\n    loraConfig.tx_power = 0; // default\n    loraConfig.channel_num = 0;\n\n#ifdef USERPREFS_LORACONFIG_MODEM_PRESET\n    loraConfig.modem_preset = USERPREFS_LORACONFIG_MODEM_PRESET;\n#endif\n#ifdef USERPREFS_LORACONFIG_CHANNEL_NUM\n    loraConfig.channel_num = USERPREFS_LORACONFIG_CHANNEL_NUM;\n#endif\n}\n\nbool Channels::ensureLicensedOperation()\n{\n    if (!owner.is_licensed) {\n        return false;\n    }\n    bool hasEncryptionOrAdmin = false;\n    for (uint8_t i = 0; i < MAX_NUM_CHANNELS; i++) {\n        auto channel = channels.getByIndex(i);\n        if (!channel.has_settings) {\n            continue;\n        }\n        auto &channelSettings = channel.settings;\n        if (strcasecmp(channelSettings.name, Channels::adminChannel) == 0) {\n            channel.role = meshtastic_Channel_Role_DISABLED;\n            channelSettings.psk.bytes[0] = 0;\n            channelSettings.psk.size = 0;\n            hasEncryptionOrAdmin = true;\n            channels.setChannel(channel);\n\n        } else if (channelSettings.psk.size > 0) {\n            channelSettings.psk.bytes[0] = 0;\n            channelSettings.psk.size = 0;\n            hasEncryptionOrAdmin = true;\n            channels.setChannel(channel);\n        }\n    }\n    return hasEncryptionOrAdmin;\n}\n\n/**\n * Write a default channel to the specified channel index\n */\nvoid Channels::initDefaultChannel(ChannelIndex chIndex)\n{\n    meshtastic_Channel &ch = getByIndex(chIndex);\n    meshtastic_ChannelSettings &channelSettings = ch.settings;\n\n    uint8_t defaultpskIndex = 1;\n    channelSettings.psk.bytes[0] = defaultpskIndex;\n    channelSettings.psk.size = 1;\n    strncpy(channelSettings.name, \"\", sizeof(channelSettings.name));\n    channelSettings.module_settings.position_precision = 13; // default to sending location on the primary channel\n    channelSettings.has_module_settings = true;\n\n    ch.has_settings = true;\n    ch.role = chIndex == 0 ? meshtastic_Channel_Role_PRIMARY : meshtastic_Channel_Role_SECONDARY;\n\n    switch (chIndex) {\n    case 0:\n#ifdef USERPREFS_CHANNEL_0_PSK\n        static const uint8_t defaultpsk0[] = USERPREFS_CHANNEL_0_PSK;\n        memcpy(channelSettings.psk.bytes, defaultpsk0, sizeof(defaultpsk0));\n        channelSettings.psk.size = sizeof(defaultpsk0);\n#endif\n#ifdef USERPREFS_CHANNEL_0_NAME\n        strcpy(channelSettings.name, (const char *)USERPREFS_CHANNEL_0_NAME);\n#endif\n#ifdef USERPREFS_CHANNEL_0_PRECISION\n        channelSettings.module_settings.position_precision = USERPREFS_CHANNEL_0_PRECISION;\n#endif\n#ifdef USERPREFS_CHANNEL_0_UPLINK_ENABLED\n        channelSettings.uplink_enabled = USERPREFS_CHANNEL_0_UPLINK_ENABLED;\n#endif\n#ifdef USERPREFS_CHANNEL_0_DOWNLINK_ENABLED\n        channelSettings.downlink_enabled = USERPREFS_CHANNEL_0_DOWNLINK_ENABLED;\n#endif\n        break;\n    case 1:\n#ifdef USERPREFS_CHANNEL_1_PSK\n        static const uint8_t defaultpsk1[] = USERPREFS_CHANNEL_1_PSK;\n        memcpy(channelSettings.psk.bytes, defaultpsk1, sizeof(defaultpsk1));\n        channelSettings.psk.size = sizeof(defaultpsk1);\n#endif\n#ifdef USERPREFS_CHANNEL_1_NAME\n        strcpy(channelSettings.name, (const char *)USERPREFS_CHANNEL_1_NAME);\n#endif\n#ifdef USERPREFS_CHANNEL_1_PRECISION\n        channelSettings.module_settings.position_precision = USERPREFS_CHANNEL_1_PRECISION;\n#endif\n#ifdef USERPREFS_CHANNEL_1_UPLINK_ENABLED\n        channelSettings.uplink_enabled = USERPREFS_CHANNEL_1_UPLINK_ENABLED;\n#endif\n#ifdef USERPREFS_CHANNEL_1_DOWNLINK_ENABLED\n        channelSettings.downlink_enabled = USERPREFS_CHANNEL_1_DOWNLINK_ENABLED;\n#endif\n        break;\n    case 2:\n#ifdef USERPREFS_CHANNEL_2_PSK\n        static const uint8_t defaultpsk2[] = USERPREFS_CHANNEL_2_PSK;\n        memcpy(channelSettings.psk.bytes, defaultpsk2, sizeof(defaultpsk2));\n        channelSettings.psk.size = sizeof(defaultpsk2);\n#endif\n#ifdef USERPREFS_CHANNEL_2_NAME\n        strcpy(channelSettings.name, (const char *)USERPREFS_CHANNEL_2_NAME);\n#endif\n#ifdef USERPREFS_CHANNEL_2_PRECISION\n        channelSettings.module_settings.position_precision = USERPREFS_CHANNEL_2_PRECISION;\n#endif\n#ifdef USERPREFS_CHANNEL_2_UPLINK_ENABLED\n        channelSettings.uplink_enabled = USERPREFS_CHANNEL_2_UPLINK_ENABLED;\n#endif\n#ifdef USERPREFS_CHANNEL_2_DOWNLINK_ENABLED\n        channelSettings.downlink_enabled = USERPREFS_CHANNEL_2_DOWNLINK_ENABLED;\n#endif\n        break;\n    default:\n        break;\n    }\n}\n\nCryptoKey Channels::getKey(ChannelIndex chIndex)\n{\n    meshtastic_Channel &ch = getByIndex(chIndex);\n    const meshtastic_ChannelSettings &channelSettings = ch.settings;\n\n    CryptoKey k;\n    memset(k.bytes, 0, sizeof(k.bytes)); // In case the user provided a short key, we want to pad the rest with zeros\n\n    if (!ch.has_settings || ch.role == meshtastic_Channel_Role_DISABLED) {\n        k.length = -1; // invalid\n    } else {\n        memcpy(k.bytes, channelSettings.psk.bytes, channelSettings.psk.size);\n        k.length = channelSettings.psk.size;\n        if (k.length == 0) {\n            if (ch.role == meshtastic_Channel_Role_SECONDARY) {\n                LOG_DEBUG(\"Unset PSK for secondary channel %s. use primary key\", ch.settings.name);\n                k = getKey(primaryIndex);\n            } else {\n                LOG_WARN(\"User disabled encryption\");\n            }\n        } else if (k.length == 1) {\n            // Convert the short single byte variants of psk into variant that can be used more generally\n\n            uint8_t pskIndex = k.bytes[0];\n            LOG_DEBUG(\"Expand short PSK #%d\", pskIndex);\n            if (pskIndex == 0)\n                k.length = 0; // Turn off encryption\n            else {\n                memcpy(k.bytes, defaultpsk, sizeof(defaultpsk));\n                k.length = sizeof(defaultpsk);\n                // Bump up the last byte of PSK as needed\n                uint8_t *last = k.bytes + sizeof(defaultpsk) - 1;\n                *last = *last + pskIndex - 1; // index of 1 means no change vs defaultPSK\n            }\n        } else if (k.length < 16) {\n            // Error! The user specified only the first few bits of an AES128 key.  So by convention we just pad the rest of the\n            // key with zeros\n            LOG_WARN(\"User provided a too short AES128 key - padding\");\n            k.length = 16;\n        } else if (k.length < 32 && k.length != 16) {\n            // Error! The user specified only the first few bits of an AES256 key.  So by convention we just pad the rest of the\n            // key with zeros\n            LOG_WARN(\"User provided a too short AES256 key - padding\");\n            k.length = 32;\n        }\n    }\n\n    return k;\n}\n\n/** Given a channel index, change to use the crypto key specified by that index\n */\nint16_t Channels::setCrypto(ChannelIndex chIndex)\n{\n    CryptoKey k = getKey(chIndex);\n\n    if (k.length < 0)\n        return -1;\n    else {\n        // Tell our crypto engine about the psk\n        crypto->setKey(k);\n        return getHash(chIndex);\n    }\n}\n\nvoid Channels::initDefaults()\n{\n    channelFile.channels_count = MAX_NUM_CHANNELS;\n    for (int i = 0; i < channelFile.channels_count; i++)\n        fixupChannel(i);\n    initDefaultLoraConfig();\n\n#ifdef USERPREFS_CHANNELS_TO_WRITE\n    for (int i = 0; i < USERPREFS_CHANNELS_TO_WRITE; i++) {\n        initDefaultChannel(i);\n    }\n#else\n    initDefaultChannel(0);\n#endif\n}\n\nvoid Channels::onConfigChanged()\n{\n    // Make sure the phone hasn't mucked anything up\n    for (int i = 0; i < channelFile.channels_count; i++) {\n        const meshtastic_Channel &ch = fixupChannel(i);\n\n        if (ch.role == meshtastic_Channel_Role_PRIMARY)\n            primaryIndex = i;\n    }\n#if !MESHTASTIC_EXCLUDE_MQTT\n    if (channels.anyMqttEnabled() && mqtt && !mqtt->isEnabled()) {\n        LOG_DEBUG(\"MQTT is enabled on at least one channel, so set MQTT thread to run immediately\");\n        mqtt->start();\n    }\n#endif\n}\n\nmeshtastic_Channel &Channels::getByIndex(ChannelIndex chIndex)\n{\n    // remove this assert cause malformed packets can make our firmware reboot here.\n    if (chIndex < channelFile.channels_count) { // This should be equal to MAX_NUM_CHANNELS\n        meshtastic_Channel *ch = channelFile.channels + chIndex;\n        return *ch;\n    } else {\n        LOG_ERROR(\"Invalid channel index %d > %d, malformed packet received?\", chIndex, channelFile.channels_count);\n        return dummyChannel;\n    }\n}\n\nmeshtastic_Channel &Channels::getByName(const char *chName)\n{\n    for (ChannelIndex i = 0; i < getNumChannels(); i++) {\n        if (strcasecmp(getGlobalId(i), chName) == 0) {\n            return channelFile.channels[i];\n        }\n    }\n\n    return getByIndex(getPrimaryIndex());\n}\n\nvoid Channels::setChannel(const meshtastic_Channel &c)\n{\n    meshtastic_Channel &old = getByIndex(c.index);\n\n    // if this is the new primary, demote any existing roles\n    if (c.role == meshtastic_Channel_Role_PRIMARY)\n        for (int i = 0; i < getNumChannels(); i++)\n            if (channelFile.channels[i].role == meshtastic_Channel_Role_PRIMARY)\n                channelFile.channels[i].role = meshtastic_Channel_Role_SECONDARY;\n\n    old = c; // slam in the new settings/role\n}\n\nbool Channels::anyMqttEnabled()\n{\n#if USERPREFS_EVENT_MODE && !MESHTASTIC_EXCLUDE_MQTT\n    // Don't publish messages on the public MQTT broker if we are in event mode\n    if (mqtt && mqtt->isUsingDefaultServer() && mqtt->isUsingDefaultRootTopic()) {\n        return false;\n    }\n#endif\n    for (int i = 0; i < getNumChannels(); i++)\n        if (channelFile.channels[i].role != meshtastic_Channel_Role_DISABLED && channelFile.channels[i].has_settings &&\n            (channelFile.channels[i].settings.downlink_enabled || channelFile.channels[i].settings.uplink_enabled))\n            return true;\n\n    return false;\n}\n\nconst char *Channels::getName(size_t chIndex)\n{\n    // Convert the short \"\" representation for Default into a usable string\n    const meshtastic_ChannelSettings &channelSettings = getByIndex(chIndex).settings;\n    const char *channelName = channelSettings.name;\n    if (!*channelName) { // emptystring\n        // Per mesh.proto spec, if bandwidth is specified we must ignore modemPreset enum, we assume that in that case\n        // the app effed up and forgot to set channelSettings.name\n        if (config.lora.use_preset) {\n            channelName = DisplayFormatters::getModemPresetDisplayName(config.lora.modem_preset, false, config.lora.use_preset);\n        } else {\n            channelName = \"Custom\";\n        }\n    }\n\n    return channelName;\n}\n\nbool Channels::isDefaultChannel(ChannelIndex chIndex)\n{\n    const auto &ch = getByIndex(chIndex);\n    if (ch.settings.psk.size == 1 && ch.settings.psk.bytes[0] == 1) {\n        const char *name = getName(chIndex);\n        const char *presetName =\n            DisplayFormatters::getModemPresetDisplayName(config.lora.modem_preset, false, config.lora.use_preset);\n        // Check if the name is the default derived from the modem preset\n        if (strcmp(name, presetName) == 0)\n            return true;\n    }\n    return false;\n}\n\nbool Channels::hasDefaultChannel()\n{\n    // If we don't use a preset or the default frequency slot, or we override the frequency, we don't have a default channel\n    if (!config.lora.use_preset || !RadioInterface::uses_default_frequency_slot || config.lora.override_frequency)\n        return false;\n    // Check if any of the channels are using the default name and PSK\n    for (size_t i = 0; i < getNumChannels(); i++) {\n        if (isDefaultChannel(i))\n            return true;\n    }\n    return false;\n}\n\n/** Given a channel hash setup crypto for decoding that channel (or the primary channel if that channel is unsecured)\n *\n * This method is called before decoding inbound packets\n *\n * @return false if the channel hash or channel is invalid\n */\nbool Channels::decryptForHash(ChannelIndex chIndex, ChannelHash channelHash)\n{\n    if (chIndex > getNumChannels() || getHash(chIndex) != channelHash) {\n        // LOG_DEBUG(\"Skip channel %d (hash %x) due to invalid hash/index, want=%x\", chIndex, getHash(chIndex),\n        // channelHash);\n        return false;\n    } else {\n        LOG_DEBUG(\"Use channel %d (hash 0x%x)\", chIndex, channelHash);\n        setCrypto(chIndex);\n        return true;\n    }\n}\n\nbool Channels::setDefaultPresetCryptoForHash(ChannelHash channelHash)\n{\n    // Iterate all known presets\n    for (int preset = _meshtastic_Config_LoRaConfig_ModemPreset_MIN; preset <= _meshtastic_Config_LoRaConfig_ModemPreset_MAX;\n         ++preset) {\n        const char *name = DisplayFormatters::getModemPresetDisplayName((meshtastic_Config_LoRaConfig_ModemPreset)preset, false,\n                                                                        config.lora.use_preset);\n        if (!name)\n            continue;\n        if (strcmp(name, \"Invalid\") == 0)\n            continue; // skip invalid placeholder\n        uint8_t h = xorHash((const uint8_t *)name, strlen(name));\n        // Expand default PSK alias 1 to actual bytes and xor into hash\n        uint8_t tmp = h ^ xorHash(defaultpsk, sizeof(defaultpsk));\n        if (tmp == channelHash) {\n            // Set crypto to defaultpsk and report success\n            CryptoKey k;\n            memcpy(k.bytes, defaultpsk, sizeof(defaultpsk));\n            k.length = sizeof(defaultpsk);\n            crypto->setKey(k);\n            LOG_INFO(\"Matched default preset '%s' for hash 0x%x; set default PSK\", name, channelHash);\n            return true;\n        }\n    }\n    return false;\n}\n\n/** Given a channel index setup crypto for encoding that channel (or the primary channel if that channel is unsecured)\n *\n * This method is called before encoding outbound packets\n *\n * @return the (0 to 255) hash for that channel - if no suitable channel could be found, return -1\n */\nint16_t Channels::setActiveByIndex(ChannelIndex channelIndex)\n{\n    return setCrypto(channelIndex);\n}"
  },
  {
    "path": "src/mesh/Channels.h",
    "content": "#pragma once\n\n#include \"CryptoEngine.h\"\n#include \"NodeDB.h\"\n#include \"mesh-pb-constants.h\"\n#include <Arduino.h>\n\n/** A channel number (index into the channel table)\n */\ntypedef uint8_t ChannelIndex;\n\n/** A low quality hash of the channel PSK and the channel name.  created by generateHash(chIndex)\n * Used as a hint to limit which PSKs are considered for packet decoding.\n */\ntypedef uint8_t ChannelHash;\n\n/** The container/on device API for working with channels */\nclass Channels\n{\n    /// The index of the primary channel\n    ChannelIndex primaryIndex = 0;\n\n    /** The channel index that was requested for sending/receiving.  Note: if this channel is a secondary\n    channel and does not have a PSK, we will use the PSK from the primary channel.  If this channel is disabled\n    no sending or receiving will be allowed */\n    ChannelIndex activeChannelIndex = 0;\n\n    /// the precomputed hashes for each of our channels, or -1 for invalid\n    int16_t hashes[MAX_NUM_CHANNELS] = {};\n\n  public:\n    Channels() {}\n\n    /// Well known channel names\n    static const char *adminChannel, *gpioChannel, *serialChannel, *mqttChannel;\n\n    const meshtastic_ChannelSettings &getPrimary() { return getByIndex(getPrimaryIndex()).settings; }\n\n    /** Return the Channel for a specified index */\n    meshtastic_Channel &getByIndex(ChannelIndex chIndex);\n\n    /** Return the Channel for a specified name, return primary if not found. */\n    meshtastic_Channel &getByName(const char *chName);\n\n    /** Using the index inside the channel, update the specified channel's settings and role.  If this channel is being promoted\n     * to be primary, force all other channels to be secondary.\n     */\n    void setChannel(const meshtastic_Channel &c);\n\n    /** Return a human friendly name for this channel (and expand any short strings as needed)\n     */\n    const char *getName(size_t chIndex);\n\n    /**\n     * Return a globally unique channel ID usable with MQTT.\n     */\n    const char *getGlobalId(size_t chIndex) { return getName(chIndex); } // FIXME, not correct\n\n    /** The index of the primary channel */\n    ChannelIndex getPrimaryIndex() const { return primaryIndex; }\n\n    ChannelIndex getNumChannels() { return channelFile.channels_count; }\n\n    /// Called by NodeDB on initial boot when the radio config settings are unset.  Set a default single channel config.\n    void initDefaults();\n\n    /// called when the user has just changed our radio config and we might need to change channel keys\n    void onConfigChanged();\n\n    /** Given a channel hash setup crypto for decoding that channel (or the primary channel if that channel is unsecured)\n     *\n     * This method is called before decoding inbound packets\n     *\n     * @return false if the channel hash or channel is invalid\n     */\n    bool decryptForHash(ChannelIndex chIndex, ChannelHash channelHash);\n\n    /** Given a channel index setup crypto for encoding that channel (or the primary channel if that channel is unsecured)\n     *\n     * This method is called before encoding outbound packets\n     *\n     * @eturn the (0 to 255) hash for that channel - if no suitable channel could be found, return -1\n     */\n    int16_t setActiveByIndex(ChannelIndex channelIndex);\n\n    // Returns true if the channel has the default name and PSK\n    bool isDefaultChannel(ChannelIndex chIndex);\n\n    // Returns true if we can be reached via a channel with the default settings given a region and modem preset\n    bool hasDefaultChannel();\n\n    // Returns true if any of our channels have enabled MQTT uplink or downlink\n    bool anyMqttEnabled();\n\n    bool ensureLicensedOperation();\n\n    bool setDefaultPresetCryptoForHash(ChannelHash channelHash);\n\n    int16_t getHash(ChannelIndex i) { return hashes[i]; }\n\n  private:\n    /** Given a channel index, change to use the crypto key specified by that index\n     *\n     * @eturn the (0 to 255) hash for that channel - if no suitable channel could be found, return -1\n     */\n    int16_t setCrypto(ChannelIndex chIndex);\n\n    /** Return the channel index for the specified channel hash, or -1 for not found */\n    int8_t getIndexByHash(ChannelHash channelHash);\n\n    /** Given a channel number, return the (0 to 255) hash for that channel\n     * If no suitable channel could be found, return -1\n     *\n     * called by fixupChannel when a new channel is set\n     */\n    int16_t generateHash(ChannelIndex channelNum);\n\n    /**\n     * Validate a channel, fixing any errors as needed\n     */\n    meshtastic_Channel &fixupChannel(ChannelIndex chIndex);\n\n    /**\n     * Writes the default lora config\n     */\n    void initDefaultLoraConfig();\n\n    /**\n     * Write default channels defined in UserPrefs\n     */\n    void initDefaultChannel(ChannelIndex chIndex);\n\n    /**\n     * Return the key used for encrypting this channel (if channel is secondary and no key provided, use the primary channel's\n     * PSK)\n     */\n    CryptoKey getKey(ChannelIndex chIndex);\n};\n\n/// Singleton channel table\nextern Channels channels;\n\n/// 16 bytes of random PSK for our _public_ default channel that all devices power up on (AES128)\nstatic const uint8_t defaultpsk[] = {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59,\n                                     0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01};\n\nstatic const uint8_t eventpsk[] = {0x38, 0x4b, 0xbc, 0xc0, 0x1d, 0xc0, 0x22, 0xd1, 0x81, 0xbf, 0x36,\n                                   0xb8, 0x61, 0x21, 0xe1, 0xfb, 0x96, 0xb7, 0x2e, 0x55, 0xbf, 0x74,\n                                   0x22, 0x7e, 0x9d, 0x6a, 0xfb, 0x48, 0xd6, 0x4c, 0xb1, 0xa1};"
  },
  {
    "path": "src/mesh/CryptoEngine.cpp",
    "content": "#include \"CryptoEngine.h\"\n// #include \"NodeDB.h\"\n#include \"architecture.h\"\n#include <memory>\n\n#if !(MESHTASTIC_EXCLUDE_PKI)\n#include \"NodeDB.h\"\n#include \"aes-ccm.h\"\n#include \"meshUtils.h\"\n#include <Crypto.h>\n#include <Curve25519.h>\n#include <RNG.h>\n#include <SHA256.h>\n#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN)\n#if !defined(ARCH_STM32WL)\n#define CryptRNG RNG\n#endif\n\n/**\n * Create a public/private key pair with Curve25519.\n *\n * @param pubKey The destination for the public key.\n * @param privKey The destination for the private key.\n */\nvoid CryptoEngine::generateKeyPair(uint8_t *pubKey, uint8_t *privKey)\n{\n    // Mix in any randomness we can, to make key generation stronger.\n    CryptRNG.begin(optstr(APP_VERSION));\n    if (myNodeInfo.device_id.size == 16) {\n        CryptRNG.stir(myNodeInfo.device_id.bytes, myNodeInfo.device_id.size);\n    }\n    auto noise = random();\n    CryptRNG.stir((uint8_t *)&noise, sizeof(noise));\n\n    LOG_DEBUG(\"Generate Curve25519 keypair\");\n    Curve25519::dh1(public_key, private_key);\n    memcpy(pubKey, public_key, sizeof(public_key));\n    memcpy(privKey, private_key, sizeof(private_key));\n}\n\n/**\n * regenerate a public key with Curve25519.\n *\n * @param pubKey The destination for the public key.\n * @param privKey The source for the private key.\n */\nbool CryptoEngine::regeneratePublicKey(uint8_t *pubKey, uint8_t *privKey)\n{\n    if (!memfll(privKey, 0, sizeof(private_key))) {\n        Curve25519::eval(pubKey, privKey, 0);\n        if (Curve25519::isWeakPoint(pubKey)) {\n            LOG_ERROR(\"PKI key generation failed. Specified private key results in a weak\");\n            memset(pubKey, 0, 32);\n            return false;\n        }\n        memcpy(private_key, privKey, sizeof(private_key));\n        memcpy(public_key, pubKey, sizeof(public_key));\n    } else {\n        LOG_WARN(\"X25519 key generation failed due to blank private key\");\n        return false;\n    }\n    return true;\n}\n\nbool CryptoEngine::ensurePkiKeys(meshtastic_Config_SecurityConfig &security, meshtastic_User &user)\n{\n    if (user.is_licensed) {\n        return false;\n    }\n\n    bool keygenSuccess = false;\n    if (security.private_key.size == 32) {\n        if (regeneratePublicKey(security.public_key.bytes, security.private_key.bytes)) {\n            keygenSuccess = true;\n        }\n    } else {\n        LOG_INFO(\"Generate new PKI keys\");\n        generateKeyPair(security.public_key.bytes, security.private_key.bytes);\n        keygenSuccess = true;\n    }\n\n    if (keygenSuccess) {\n        security.public_key.size = 32;\n        security.private_key.size = 32;\n        user.public_key.size = 32;\n        memcpy(user.public_key.bytes, security.public_key.bytes, 32);\n    }\n\n    return keygenSuccess;\n}\n#endif\n\n/**\n * Encrypt a packet's payload using a key generated with Curve25519 and SHA256\n * for a specific node.\n *\n * @param toNode The MeshPacket `to` field.\n * @param fromNode The MeshPacket `from` field.\n * @param remotePublic The remote node's Curve25519 public key.\n * @param packetId The MeshPacket `id` field.\n * @param numBytes Number of bytes of plaintext in the bytes buffer.\n * @param bytes Buffer containing plaintext input.\n * @param bytesOut Output buffer to be populated with encrypted ciphertext.\n */\nbool CryptoEngine::encryptCurve25519(uint32_t toNode, uint32_t fromNode, meshtastic_UserLite_public_key_t remotePublic,\n                                     uint64_t packetNum, size_t numBytes, const uint8_t *bytes, uint8_t *bytesOut)\n{\n    uint8_t *auth;\n    long extraNonceTmp = random();\n    auth = bytesOut + numBytes;\n    memcpy((uint8_t *)(auth + 8), &extraNonceTmp,\n           sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : *extraNonce = extraNonceTmp;\n    LOG_DEBUG(\"Random nonce value: %d\", extraNonceTmp);\n    if (remotePublic.size == 0) {\n        LOG_DEBUG(\"Node %d or their public_key not found\", toNode);\n        return false;\n    }\n    if (!setDHPublicKey(remotePublic.bytes)) {\n        return false;\n    }\n    hash(shared_key, 32);\n    initNonce(fromNode, packetNum, extraNonceTmp);\n\n    // Calculate the shared secret with the destination node and encrypt\n    printBytes(\"Attempt encrypt with nonce: \", nonce, 13);\n    printBytes(\"Attempt encrypt with shared_key starting with: \", shared_key, 8);\n    aes_ccm_ae(shared_key, 32, nonce, 8, bytes, numBytes, nullptr, 0, bytesOut,\n               auth); // this can write up to 15 bytes longer than numbytes past bytesOut\n    memcpy((uint8_t *)(auth + 8), &extraNonceTmp,\n           sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : *extraNonce = extraNonceTmp;\n    return true;\n}\n\n/**\n * Decrypt a packet's payload using a key generated with Curve25519 and SHA256\n * for a specific node.\n *\n * @param fromNode The MeshPacket `from` field.\n * @param remotePublic The remote node's Curve25519 public key.\n * @param packetId The MeshPacket `id` field.\n * @param numBytes Number of bytes of ciphertext in the bytes buffer.\n * @param bytes Buffer containing ciphertext input.\n * @param bytesOut Output buffer to be populated with decrypted plaintext.\n */\nbool CryptoEngine::decryptCurve25519(uint32_t fromNode, meshtastic_UserLite_public_key_t remotePublic, uint64_t packetNum,\n                                     size_t numBytes, const uint8_t *bytes, uint8_t *bytesOut)\n{\n    const uint8_t *auth = bytes + numBytes - 12; // set to last 8 bytes of text?\n    uint32_t extraNonce;                         // pointer was not really used\n    memcpy(&extraNonce, auth + 8,\n           sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : (uint32_t *)(auth + 8);\n    LOG_INFO(\"Random nonce value: %d\", extraNonce);\n\n    if (remotePublic.size == 0) {\n        LOG_DEBUG(\"Node or its public key not found in database\");\n        return false;\n    }\n\n    // Calculate the shared secret with the sending node and decrypt\n    if (!setDHPublicKey(remotePublic.bytes)) {\n        return false;\n    }\n    hash(shared_key, 32);\n\n    initNonce(fromNode, packetNum, extraNonce);\n    printBytes(\"Attempt decrypt with nonce: \", nonce, 13);\n    printBytes(\"Attempt decrypt with shared_key starting with: \", shared_key, 8);\n    return aes_ccm_ad(shared_key, 32, nonce, 8, bytes, numBytes - 12, nullptr, 0, auth, bytesOut);\n}\n\nvoid CryptoEngine::setDHPrivateKey(uint8_t *_private_key)\n{\n    memcpy(private_key, _private_key, 32);\n}\n\n/**\n * Hash arbitrary data using SHA256.\n *\n * @param bytes\n * @param numBytes\n */\nvoid CryptoEngine::hash(uint8_t *bytes, size_t numBytes)\n{\n    SHA256 hash;\n    size_t posn;\n    uint8_t size = numBytes;\n    uint8_t inc = 16;\n    hash.reset();\n    for (posn = 0; posn < size; posn += inc) {\n        size_t len = size - posn;\n        if (len > inc)\n            len = inc;\n        hash.update(bytes + posn, len);\n    }\n    hash.finalize(bytes, 32);\n}\n\nvoid CryptoEngine::aesSetKey(const uint8_t *key_bytes, size_t key_len)\n{\n    aes = nullptr;\n    if (key_len != 0) {\n        aes = std::unique_ptr<AESSmall256>(new AESSmall256());\n        aes->setKey(key_bytes, key_len);\n    }\n}\n\nvoid CryptoEngine::aesEncrypt(uint8_t *in, uint8_t *out)\n{\n    aes->encryptBlock(out, in);\n}\n\nbool CryptoEngine::setDHPublicKey(uint8_t *pubKey)\n{\n    uint8_t local_priv[32];\n    memcpy(shared_key, pubKey, 32);\n    memcpy(local_priv, private_key, 32);\n    // Calculate the shared secret with the specified node's public key and our private key\n    // This includes an internal weak key check, which among other things looks for an all 0 public key and shared key.\n    if (!Curve25519::dh2(shared_key, local_priv)) {\n        LOG_WARN(\"Curve25519DH step 2 failed!\");\n        return false;\n    }\n    return true;\n}\n\n#endif\nconcurrency::Lock *cryptLock;\n\nvoid CryptoEngine::setKey(const CryptoKey &k)\n{\n    LOG_DEBUG(\"Use AES%d key!\", k.length * 8);\n    key = k;\n}\n\n/**\n * Encrypt a packet\n *\n * @param bytes is updated in place\n */\nvoid CryptoEngine::encryptPacket(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes)\n{\n    if (key.length > 0) {\n        initNonce(fromNode, packetId);\n        if (numBytes <= MAX_BLOCKSIZE) {\n            encryptAESCtr(key, nonce, numBytes, bytes);\n        } else {\n            LOG_ERROR(\"Packet too large for crypto engine: %d. noop encryption!\", numBytes);\n        }\n    }\n}\n\nvoid CryptoEngine::decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes)\n{\n    // For CTR, the implementation is the same\n    encryptPacket(fromNode, packetId, numBytes, bytes);\n}\n\n// Generic implementation of AES-CTR encryption.\nvoid CryptoEngine::encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes)\n{\n    std::unique_ptr<CTRCommon> ctr;\n    if (_key.length == 16)\n        ctr = std::unique_ptr<CTRCommon>(new CTR<AES128>());\n    else\n        ctr = std::unique_ptr<CTRCommon>(new CTR<AES256>());\n    ctr->setKey(_key.bytes, _key.length);\n    static uint8_t scratch[MAX_BLOCKSIZE];\n    memcpy(scratch, bytes, numBytes);\n    memset(scratch + numBytes, 0,\n           sizeof(scratch) - numBytes); // Fill rest of buffer with zero (in case cypher looks at it)\n\n    ctr->setIV(_nonce, 16);\n    ctr->setCounterSize(4);\n    ctr->encrypt(bytes, scratch, numBytes);\n}\n\n/**\n * Init our 128 bit nonce for a new packet\n */\nvoid CryptoEngine::initNonce(uint32_t fromNode, uint64_t packetId, uint32_t extraNonce)\n{\n    memset(nonce, 0, sizeof(nonce));\n\n    // use memcpy to avoid breaking strict-aliasing\n    memcpy(nonce, &packetId, sizeof(uint64_t));\n    memcpy(nonce + sizeof(uint64_t), &fromNode, sizeof(uint32_t));\n    if (extraNonce)\n        memcpy(nonce + sizeof(uint32_t), &extraNonce, sizeof(uint32_t));\n}\n#ifndef HAS_CUSTOM_CRYPTO_ENGINE\nCryptoEngine *crypto = new CryptoEngine;\n#endif\n"
  },
  {
    "path": "src/mesh/CryptoEngine.h",
    "content": "#pragma once\n#include \"AES.h\"\n#include \"CTR.h\"\n#include \"concurrency/LockGuard.h\"\n#include \"configuration.h\"\n#include \"mesh-pb-constants.h\"\n#include <Arduino.h>\n#include <memory>\n\nextern concurrency::Lock *cryptLock;\n\nstruct CryptoKey {\n    uint8_t bytes[32];\n\n    /// # of bytes, or -1 to mean \"invalid key - do not use\"\n    int8_t length;\n};\n\n/**\n * see docs/software/crypto.md for details.\n *\n */\n\n#define MAX_BLOCKSIZE 256\n#define TEST_CURVE25519_FIELD_OPS // Exposes Curve25519::isWeakPoint() for testing keys\n\nclass CryptoEngine\n{\n  public:\n#if !(MESHTASTIC_EXCLUDE_PKI)\n    uint8_t public_key[32] = {0};\n#endif\n\n    virtual ~CryptoEngine() {}\n#if !(MESHTASTIC_EXCLUDE_PKI)\n#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN)\n    virtual void generateKeyPair(uint8_t *pubKey, uint8_t *privKey);\n    virtual bool regeneratePublicKey(uint8_t *pubKey, uint8_t *privKey);\n    virtual bool ensurePkiKeys(meshtastic_Config_SecurityConfig &security, meshtastic_User &user);\n\n#endif\n    void setDHPrivateKey(uint8_t *_private_key);\n    virtual bool encryptCurve25519(uint32_t toNode, uint32_t fromNode, meshtastic_UserLite_public_key_t remotePublic,\n                                   uint64_t packetNum, size_t numBytes, const uint8_t *bytes, uint8_t *bytesOut);\n    virtual bool decryptCurve25519(uint32_t fromNode, meshtastic_UserLite_public_key_t remotePublic, uint64_t packetNum,\n                                   size_t numBytes, const uint8_t *bytes, uint8_t *bytesOut);\n    virtual bool setDHPublicKey(uint8_t *publicKey);\n    virtual void hash(uint8_t *bytes, size_t numBytes);\n\n    virtual void aesSetKey(const uint8_t *key, size_t key_len);\n\n    virtual void aesEncrypt(uint8_t *in, uint8_t *out);\n    std::unique_ptr<AESSmall256> aes = nullptr;\n\n#endif\n\n    /**\n     * Set the key used for encrypt, decrypt.\n     *\n     * As a special case: If all bytes are zero, we assume _no encryption_ and send all data in cleartext.\n     *\n     * @param numBytes must be 16 (AES128), 32 (AES256) or 0 (no crypt)\n     * @param bytes a _static_ buffer that will remain valid for the life of this crypto instance (i.e. this class will cache the\n     * provided pointer)\n     */\n    virtual void setKey(const CryptoKey &k);\n\n    /**\n     * Encrypt a packet\n     *\n     * @param bytes is updated in place\n     */\n    virtual void encryptPacket(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes);\n    virtual void decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes, uint8_t *bytes);\n    virtual void encryptAESCtr(CryptoKey key, uint8_t *nonce, size_t numBytes, uint8_t *bytes);\n#ifndef PIO_UNIT_TESTING\n  protected:\n#endif\n    /** Our per packet nonce */\n    uint8_t nonce[16] = {0};\n    CryptoKey key = {};\n#if !(MESHTASTIC_EXCLUDE_PKI)\n    uint8_t shared_key[32] = {0};\n    uint8_t private_key[32] = {0};\n#endif\n    /**\n     * Init our 128 bit nonce for a new packet\n     *\n     * The NONCE is constructed by concatenating (from MSB to LSB):\n     * a 64 bit packet number (stored in little endian order)\n     * a 32 bit sending node number (stored in little endian order)\n     * a 32 bit block counter (starts at zero)\n     */\n    void initNonce(uint32_t fromNode, uint64_t packetId, uint32_t extraNonce = 0);\n};\n\nextern CryptoEngine *crypto;"
  },
  {
    "path": "src/mesh/Default.cpp",
    "content": "#include \"Default.h\"\n\n#include \"meshUtils.h\"\n\nuint32_t Default::getConfiguredOrDefaultMs(uint32_t configuredInterval, uint32_t defaultInterval)\n{\n    if (configuredInterval > 0)\n        return configuredInterval * 1000;\n    return defaultInterval * 1000;\n}\n\nuint32_t Default::getConfiguredOrDefaultMs(uint32_t configuredInterval)\n{\n    if (configuredInterval > 0)\n        return configuredInterval * 1000;\n    return default_broadcast_interval_secs * 1000;\n}\n\nuint32_t Default::getConfiguredOrDefault(uint32_t configured, uint32_t defaultValue)\n{\n    if (configured > 0)\n        return configured;\n    return defaultValue;\n}\n/**\n * Calculates the scaled value of the configured or default value in ms based on the number of online nodes.\n *\n * For example a default of 30 minutes (1800 seconds * 1000) would yield:\n *   45 nodes = 2475 * 1000\n *   60 nodes = 4500 * 1000\n *   75 nodes = 6525 * 1000\n *   90 nodes = 8550 * 1000\n * @param configured The configured value.\n * @param defaultValue The default value.\n * @param numOnlineNodes The number of online nodes.\n * @return The scaled value of the configured or default value.\n */\nuint32_t Default::getConfiguredOrDefaultMsScaled(uint32_t configured, uint32_t defaultValue, uint32_t numOnlineNodes)\n{\n    // If we are a router, we don't scale the value. It's already significantly higher.\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n        config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)\n        return getConfiguredOrDefaultMs(configured, defaultValue);\n\n    // Additionally if we're a tracker or sensor, we want priority to send position and telemetry\n    if (IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_SENSOR, meshtastic_Config_DeviceConfig_Role_TRACKER,\n                  meshtastic_Config_DeviceConfig_Role_TAK_TRACKER))\n        return getConfiguredOrDefaultMs(configured, defaultValue);\n\n    return getConfiguredOrDefaultMs(configured, defaultValue) * congestionScalingCoefficient(numOnlineNodes);\n}\n\nuint32_t Default::getConfiguredOrMinimumValue(uint32_t configured, uint32_t minValue)\n{\n    // If zero, intervals should be coalesced later by getConfiguredOrDefault... methods\n    if (configured == 0)\n        return configured;\n\n    return configured < minValue ? minValue : configured;\n}\n\nuint8_t Default::getConfiguredOrDefaultHopLimit(uint8_t configured)\n{\n#if USERPREFS_EVENT_MODE\n    return (configured > HOP_RELIABLE) ? HOP_RELIABLE : config.lora.hop_limit;\n#else\n    return (configured >= HOP_MAX) ? HOP_MAX : config.lora.hop_limit;\n#endif\n}"
  },
  {
    "path": "src/mesh/Default.h",
    "content": "#pragma once\n#include <MeshRadio.h>\n#include <NodeDB.h>\n#include <RadioInterface.h>\n#include <cmath>\n#include <cstdint>\n#include <meshUtils.h>\n#define ONE_DAY 24 * 60 * 60\n#define ONE_MINUTE_MS 60 * 1000\n#define THIRTY_SECONDS_MS 30 * 1000\n#define TWO_SECONDS_MS 2 * 1000\n#define FIVE_SECONDS_MS 5 * 1000\n#define TEN_SECONDS_MS 10 * 1000\n#define MAX_INTERVAL INT32_MAX // FIXME: INT32_MAX to avoid overflow issues with Apple clients but should be UINT32_MAX\n\n#define min_default_telemetry_interval_secs IF_ROUTER(ONE_DAY / 2, 30 * 60)\n#define default_gps_update_interval IF_ROUTER(ONE_DAY, 2 * 60)\n#define default_telemetry_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 60 * 60)\n#define default_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 60 * 60)\n#define default_broadcast_smart_minimum_interval_secs 5 * 60\n#define min_default_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 60 * 60)\n#define min_default_broadcast_smart_minimum_interval_secs 5 * 60\n#define default_wait_bluetooth_secs IF_ROUTER(1, 60)\n#define default_sds_secs IF_ROUTER(ONE_DAY, UINT32_MAX) // Default to forever super deep sleep\n#define default_ls_secs IF_ROUTER(ONE_DAY, 5 * 60)\n#define default_min_wake_secs 10\n#define default_screen_on_secs IF_ROUTER(1, 60 * 10)\n#define default_node_info_broadcast_secs 3 * 60 * 60\n#define default_neighbor_info_broadcast_secs 6 * 60 * 60\n#define min_node_info_broadcast_secs 60 * 60 // No regular broadcasts of more than once an hour\n#define min_neighbor_info_broadcast_secs 4 * 60 * 60\n#define default_map_publish_interval_secs 60 * 60\n\n// Traffic management defaults\n#define default_traffic_mgmt_position_precision_bits 24         // ~10m grid cells\n#define default_traffic_mgmt_position_min_interval_secs ONE_DAY // 1 day between identical positions\n\n#ifdef USERPREFS_RINGTONE_NAG_SECS\n#define default_ringtone_nag_secs USERPREFS_RINGTONE_NAG_SECS\n#else\n#define default_ringtone_nag_secs 15\n#endif\n#define default_network_ipv6_enabled false\n\n#define default_mqtt_address \"mqtt.meshtastic.org\"\n#define default_mqtt_username \"meshdev\"\n#define default_mqtt_password \"large4cats\"\n#define default_mqtt_root \"msh\"\n#define default_mqtt_encryption_enabled true\n#define default_mqtt_tls_enabled false\n\n#define IF_ROUTER(routerVal, normalVal)                                                                                          \\\n    ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||                                                        \\\n      config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)                                                     \\\n         ? (routerVal)                                                                                                           \\\n         : (normalVal))\n\nclass Default\n{\n  public:\n    static uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval);\n    static uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval, uint32_t defaultInterval);\n    static uint32_t getConfiguredOrDefault(uint32_t configured, uint32_t defaultValue);\n    // Note: numOnlineNodes uses uint32_t to match the public API and allow flexibility,\n    // even though internal node counts use uint16_t (max 65535 nodes)\n    static uint32_t getConfiguredOrDefaultMsScaled(uint32_t configured, uint32_t defaultValue, uint32_t numOnlineNodes);\n    static uint8_t getConfiguredOrDefaultHopLimit(uint8_t configured);\n    static uint32_t getConfiguredOrMinimumValue(uint32_t configured, uint32_t minValue);\n\n  private:\n    // Note: Kept as uint32_t to match the public API parameter type\n    static float congestionScalingCoefficient(uint32_t numOnlineNodes)\n    {\n        if (numOnlineNodes <= 40) {\n            return 1.0;\n        } else {\n            // Resolve SF and BW from preset or manual config\n            // When use_preset is true, config.lora.spread_factor and bandwidth may be 0\n            // because applyModemConfig() sets them on RadioInterface, not on config.lora\n            float bwKHz;\n            uint8_t sf;\n            uint8_t cr;\n            if (config.lora.use_preset) {\n                modemPresetToParams(config.lora.modem_preset, false, bwKHz, sf, cr);\n            } else {\n                sf = config.lora.spread_factor;\n                bwKHz = bwCodeToKHz(config.lora.bandwidth);\n            }\n\n            // Guard against invalid values\n            sf = clampSpreadFactor(sf);\n            bwKHz = clampBandwidthKHz(bwKHz);\n\n            // throttlingFactor = 2^SF / (BW_in_kHz * scaling_divisor)\n            // With scaling_divisor=100:\n            // In SF11 and BW=250khz (longfast), this gives 0.08192 rather than the original 0.075\n            // In SF10 and BW=250khz (mediumslow), this gives 0.04096 rather than the original 0.04\n            // In SF9 and BW=250khz (mediumfast), this gives 0.02048 rather than the original 0.02\n            // In SF7 and BW=250khz (shortfast), this gives 0.00512 rather than the original 0.01\n            float throttlingFactor = static_cast<float>(pow_of_2(sf)) / (bwKHz * 100.0f);\n\n#if USERPREFS_EVENT_MODE\n            // If we are in event mode, scale down the throttling factor by 4\n            throttlingFactor = static_cast<float>(pow_of_2(sf)) / (bwKHz * 25.0f);\n#endif\n\n            // Scaling up traffic based on number of nodes over 40\n            int nodesOverForty = (numOnlineNodes - 40);\n            return 1.0 + (nodesOverForty * throttlingFactor); // Each number of online node scales by throttle factor\n        }\n    }\n};"
  },
  {
    "path": "src/mesh/FloodingRouter.cpp",
    "content": "#include \"FloodingRouter.h\"\n#include \"MeshTypes.h\"\n#include \"NodeDB.h\"\n#include \"configuration.h\"\n#include \"mesh-pb-constants.h\"\n#include \"meshUtils.h\"\n#include \"modules/TextMessageModule.h\"\n#if !MESHTASTIC_EXCLUDE_TRACEROUTE\n#include \"modules/TraceRouteModule.h\"\n#endif\n\nFloodingRouter::FloodingRouter() {}\n\n/**\n * Send a packet on a suitable interface.  This routine will\n * later free() the packet to pool.  This routine is not allowed to stall.\n * If the txmit queue is full it might return an error\n */\nErrorCode FloodingRouter::send(meshtastic_MeshPacket *p)\n{\n    // Add any messages _we_ send to the seen message list (so we will ignore all retransmissions we see)\n    p->relay_node = nodeDB->getLastByteOfNodeNum(getNodeNum()); // First set the relayer to us\n    wasSeenRecently(p);                                         // FIXME, move this to a sniffSent method\n\n    return Router::send(p);\n}\n\nbool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)\n{\n    bool wasUpgraded = false;\n    bool seenRecently =\n        wasSeenRecently(p, true, nullptr, nullptr, &wasUpgraded); // Updates history; returns false when an upgrade is detected\n\n    // Handle hop_limit upgrade scenario for rebroadcasters\n    if (wasUpgraded && perhapsHandleUpgradedPacket(p)) {\n        return true; // we handled it, so stop processing\n    }\n\n    if (!seenRecently && !wasUpgraded && textMessageModule) {\n        seenRecently = textMessageModule->recentlySeen(p->id);\n    }\n\n    if (seenRecently) {\n        printPacket(\"Ignore dupe incoming msg\", p);\n        rxDupe++;\n\n        /* If the original transmitter is doing retransmissions (hopStart equals hopLimit) for a reliable transmission, e.g., when\n        the ACK got lost, we will handle the packet again to make sure it gets an implicit ACK. */\n        bool isRepeated = p->hop_start > 0 && p->hop_start == p->hop_limit;\n        if (isRepeated) {\n            LOG_DEBUG(\"Repeated reliable tx\");\n            // Check if it's still in the Tx queue, if not, we have to relay it again\n            if (!findInTxQueue(p->from, p->id)) {\n                reprocessPacket(p);\n                perhapsRebroadcast(p);\n            }\n        } else {\n            perhapsCancelDupe(p);\n        }\n\n        return true;\n    }\n\n    return Router::shouldFilterReceived(p);\n}\n\nbool FloodingRouter::perhapsHandleUpgradedPacket(const meshtastic_MeshPacket *p)\n{\n    // isRebroadcaster() is duplicated in perhapsRebroadcast(), but this avoids confusing log messages\n    if (isRebroadcaster() && iface && p->hop_limit > 0) {\n        // If we overhear a duplicate copy of the packet with more hops left than the one we are waiting to\n        // rebroadcast, then remove the packet currently sitting in the TX queue and use this one instead.\n        uint8_t dropThreshold = p->hop_limit; // remove queued packets that have fewer hops remaining\n        if (iface->removePendingTXPacket(getFrom(p), p->id, dropThreshold)) {\n            LOG_DEBUG(\"Processing upgraded packet 0x%08x for rebroadcast with hop limit %d (dropping queued < %d)\", p->id,\n                      p->hop_limit, dropThreshold);\n\n            reprocessPacket(p);\n            perhapsRebroadcast(p);\n\n            rxDupe++;\n            // We already enqueued the improved copy, so make sure the incoming packet stops here.\n            return true;\n        }\n    }\n\n    return false;\n}\n\nvoid FloodingRouter::reprocessPacket(const meshtastic_MeshPacket *p)\n{\n    if (nodeDB)\n        nodeDB->updateFrom(*p);\n\n#if !MESHTASTIC_EXCLUDE_TRACEROUTE\n    if (traceRouteModule && p->which_payload_variant != meshtastic_MeshPacket_decoded_tag) {\n        // If we got a packet that is not decoded, try to decode it so we can check for traceroute.\n        auto decodedState = perhapsDecode(const_cast<meshtastic_MeshPacket *>(p));\n        if (decodedState == DecodeState::DECODE_SUCCESS) {\n            // parsing was successful, print for debugging\n            printPacket(\"reprocessPacket(DUP)\", p);\n        } else {\n            // Fatal decoding error, we can't do anything with this packet\n            LOG_WARN(\n                \"FloodingRouter::reprocessPacket: Fatal decode error (state=%d, id=0x%08x, from=%u), can't check for traceroute\",\n                static_cast<int>(decodedState), p->id, getFrom(p));\n            return;\n        }\n    }\n\n    if (traceRouteModule && p->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&\n        p->decoded.portnum == meshtastic_PortNum_TRACEROUTE_APP) {\n        traceRouteModule->processUpgradedPacket(*p);\n    }\n#endif\n}\n\nbool FloodingRouter::roleAllowsCancelingDupe(const meshtastic_MeshPacket *p)\n{\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n        config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE) {\n        // ROUTER, ROUTER_LATE should never cancel relaying a packet (i.e. we should always rebroadcast),\n        // even if we've heard another station rebroadcast it already.\n        return false;\n    }\n\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT_BASE) {\n        // CLIENT_BASE: if the packet is from or to a favorited node,\n        // we should act like a ROUTER and should never cancel a rebroadcast (i.e. we should always rebroadcast),\n        // even if we've heard another station rebroadcast it already.\n        return !nodeDB->isFromOrToFavoritedNode(*p);\n    }\n\n    // All other roles (such as CLIENT) should cancel a rebroadcast if they hear another station's rebroadcast.\n    return true;\n}\n\nvoid FloodingRouter::perhapsCancelDupe(const meshtastic_MeshPacket *p)\n{\n    if (p->transport_mechanism == meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA && roleAllowsCancelingDupe(p)) {\n        // cancel rebroadcast of this message *if* there was already one, unless we're a router!\n        // But only LoRa packets should be able to trigger this.\n        if (Router::cancelSending(p->from, p->id))\n            txRelayCanceled++;\n    }\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE && iface) {\n        iface->clampToLateRebroadcastWindow(getFrom(p), p->id);\n    }\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT_BASE && iface && nodeDB &&\n        nodeDB->isFromOrToFavoritedNode(*p)) {\n        iface->clampToLateRebroadcastWindow(getFrom(p), p->id);\n    }\n}\n\nbool FloodingRouter::isRebroadcaster()\n{\n    return config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE &&\n           config.device.rebroadcast_mode != meshtastic_Config_DeviceConfig_RebroadcastMode_NONE;\n}\n\nvoid FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)\n{\n    bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) &&\n                        (p->decoded.request_id != 0 || p->decoded.reply_id != 0);\n    if (isAckorReply && !isToUs(p) && !isBroadcast(p->to)) {\n        // do not flood direct message that is ACKed or replied to\n        LOG_DEBUG(\"Rxd an ACK/reply not for me, cancel rebroadcast\");\n        Router::cancelSending(p->to, p->decoded.request_id); // cancel rebroadcast for this DM\n    }\n\n    perhapsRebroadcast(p);\n\n    // handle the packet as normal\n    Router::sniffReceived(p, c);\n}\n"
  },
  {
    "path": "src/mesh/FloodingRouter.h",
    "content": "#pragma once\n\n#include \"Router.h\"\n\n/**\n * This is a mixin that extends Router with the ability to do Naive Flooding (in the standard mesh protocol sense)\n *\n *   Rules for broadcasting (listing here for now, will move elsewhere eventually):\n\n  If to==BROADCAST and id==0, this is a simple broadcast (0 hops).  It will be\n  sent only by the current node and other nodes will not attempt to rebroadcast\n  it.\n\n  If to==BROADCAST and id!=0, this is a \"naive flooding\" broadcast.  The initial\n  node will send it on all local interfaces.\n\n  When other nodes receive this message, they will\n  first check if their recentBroadcasts table contains the (from, id) pair that\n  indicates this message.  If so, we've already seen it - so we discard it.  If\n  not, we add it to the table and then resend this message on all interfaces.\n  When resending we are careful to use the \"from\" ID of the original sender. Not\n  our own ID.  When resending we pick a random delay between 0 and 10 seconds to\n  decrease the chance of collisions with transmitters we can not even hear.\n\n  Any entries in recentBroadcasts that are older than X seconds (longer than the\n  max time a flood can take) will be discarded.\n */\nclass FloodingRouter : public Router\n{\n  public:\n    /**\n     * Constructor\n     *\n     */\n    FloodingRouter();\n\n    /**\n     * Send a packet on a suitable interface.  This routine will\n     * later free() the packet to pool.  This routine is not allowed to stall.\n     * If the txmit queue is full it might return an error\n     */\n    virtual ErrorCode send(meshtastic_MeshPacket *p) override;\n\n  protected:\n    /**\n     * Should this incoming filter be dropped?\n     *\n     * Called immediately on reception, before any further processing.\n     * @return true to abandon the packet\n     */\n    virtual bool shouldFilterReceived(const meshtastic_MeshPacket *p) override;\n\n    /**\n     * Look for broadcasts we need to rebroadcast\n     */\n    virtual void sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) override;\n\n    /* Check if we should rebroadcast this packet, and do so if needed */\n    virtual bool perhapsRebroadcast(const meshtastic_MeshPacket *p) = 0;\n\n    /* Check if we should handle an upgraded packet (with higher hop_limit)\n     * @return true if we handled it (so stop processing)\n     */\n    bool perhapsHandleUpgradedPacket(const meshtastic_MeshPacket *p);\n\n    /* Call when we receive a packet that needs some reprocessing, but afterwards should be filtered */\n    void reprocessPacket(const meshtastic_MeshPacket *p);\n\n    // Return false for roles like ROUTER which should always rebroadcast even when we've heard another rebroadcast of\n    // the same packet\n    bool roleAllowsCancelingDupe(const meshtastic_MeshPacket *p);\n\n    /* Call when receiving a duplicate packet to check whether we should cancel a packet in the Tx queue */\n    void perhapsCancelDupe(const meshtastic_MeshPacket *p);\n\n    // Return true if we are a rebroadcaster\n    bool isRebroadcaster();\n};"
  },
  {
    "path": "src/mesh/InterfacesTemplates.cpp",
    "content": "#include \"LR11x0Interface.cpp\"\n#include \"LR11x0Interface.h\"\n#include \"SX126xInterface.cpp\"\n#include \"SX126xInterface.h\"\n#include \"SX128xInterface.cpp\"\n#include \"SX128xInterface.h\"\n#include \"api/ServerAPI.cpp\"\n#include \"api/ServerAPI.h\"\n\n// We need this declaration for proper linking in derived classes\n#if RADIOLIB_EXCLUDE_SX126X != 1\ntemplate class SX126xInterface<SX1262>;\ntemplate class SX126xInterface<SX1268>;\ntemplate class SX126xInterface<LLCC68>;\n#endif\n#if RADIOLIB_EXCLUDE_SX128X != 1\ntemplate class SX128xInterface<SX1280>;\n#endif\n#if RADIOLIB_EXCLUDE_LR11X0 != 1\ntemplate class LR11x0Interface<LR1110>;\ntemplate class LR11x0Interface<LR1120>;\ntemplate class LR11x0Interface<LR1121>;\n#endif\n#ifdef ARCH_STM32WL\ntemplate class SX126xInterface<STM32WLx>;\n#endif\n\n#if HAS_ETHERNET && !defined(USE_WS5500)\n#include \"api/ethServerAPI.h\"\ntemplate class ServerAPI<EthernetClient>;\ntemplate class APIServerPort<ethServerAPI, EthernetServer>;\n#endif\n\n#if HAS_WIFI\n#include \"api/WiFiServerAPI.h\"\ntemplate class ServerAPI<WiFiClient>;\ntemplate class APIServerPort<WiFiServerAPI, WiFiServer>;\n#endif"
  },
  {
    "path": "src/mesh/LLCC68Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX126X != 1\n#include \"LLCC68Interface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\nLLCC68Interface::LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                 RADIOLIB_PIN_TYPE busy)\n    : SX126xInterface(hal, cs, irq, rst, busy)\n{\n}\n#endif"
  },
  {
    "path": "src/mesh/LLCC68Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_SX126X != 1\n#include \"SX126xInterface.h\"\n\n/**\n * Our adapter for LLCC68 radios\n * https://www.semtech.com/products/wireless-rf/lora-core/llcc68\n * ⚠️⚠️⚠️\n * Be aware that LLCC68 does not support Spreading Factor 12 (SF12) and will not work on the \"LongSlow\" and \"VLongSlow\" channels.\n * You must change the channel if you get `Critical Error #3` with this module.\n * ⚠️⚠️⚠️\n */\nclass LLCC68Interface : public SX126xInterface<LLCC68>\n{\n  public:\n    LLCC68Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n};\n#endif"
  },
  {
    "path": "src/mesh/LR1110Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_LR11X0 != 1\n\n#include \"LR1110Interface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\nLR1110Interface::LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                 RADIOLIB_PIN_TYPE busy)\n    : LR11x0Interface(hal, cs, irq, rst, busy)\n{\n}\n#endif"
  },
  {
    "path": "src/mesh/LR1110Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_LR11X0 != 1\n#include \"LR11x0Interface.h\"\n\n/**\n * Our adapter for LR1110 radios\n */\nclass LR1110Interface : public LR11x0Interface<LR1110>\n{\n  public:\n    LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n};\n#endif"
  },
  {
    "path": "src/mesh/LR1120Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_LR11X0 != 1\n\n#include \"LR1120Interface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\nLR1120Interface::LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                 RADIOLIB_PIN_TYPE busy)\n    : LR11x0Interface(hal, cs, irq, rst, busy)\n{\n}\n\nbool LR1120Interface::wideLora()\n{\n    return true;\n}\n#endif"
  },
  {
    "path": "src/mesh/LR1120Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_LR11X0 != 1\n\n#include \"LR11x0Interface.h\"\n/**\n * Our adapter for LR1120 wideband radios\n */\nclass LR1120Interface : public LR11x0Interface<LR1120>\n{\n  public:\n    LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n    bool wideLora() override;\n};\n#endif"
  },
  {
    "path": "src/mesh/LR1121Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_LR11X0 != 1\n#include \"LR1121Interface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\nLR1121Interface::LR1121Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                 RADIOLIB_PIN_TYPE busy)\n    : LR11x0Interface(hal, cs, irq, rst, busy)\n{\n}\n\nbool LR1121Interface::wideLora()\n{\n    return true;\n}\n#endif"
  },
  {
    "path": "src/mesh/LR1121Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_LR11X0 != 1\n\n#include \"LR11x0Interface.h\"\n\n/**\n * Our adapter for LR1121 wideband radios\n */\nclass LR1121Interface : public LR11x0Interface<LR1121>\n{\n  public:\n    LR1121Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n    bool wideLora() override;\n};\n#endif"
  },
  {
    "path": "src/mesh/LR11x0Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_LR11X0 != 1\n#include \"LR11x0Interface.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n#include \"mesh/NodeDB.h\"\n#ifdef LR11X0_DIO_AS_RF_SWITCH\n#include \"rfswitch.h\"\n#elif ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#define rfswitch_dio_pins portduino_config.rfswitch_dio_pins\n#define rfswitch_table portduino_config.rfswitch_table\n#else\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    {LR11x0::MODE_STBY, {}},  {LR11x0::MODE_RX, {}},   {LR11x0::MODE_TX, {}},   {LR11x0::MODE_TX_HP, {}},\n    {LR11x0::MODE_TX_HF, {}}, {LR11x0::MODE_GNSS, {}}, {LR11x0::MODE_WIFI, {}}, END_OF_MODE_TABLE,\n};\n#endif\n\n// Particular boards might define a different max power based on what their hardware can do, default to max power output if not\n// specified (may be dangerous if using external PA and LR11x0 power config forgotten)\n#if ARCH_PORTDUINO\n#define LR1110_MAX_POWER portduino_config.lr1110_max_power\n#endif\n#ifndef LR1110_MAX_POWER\n#define LR1110_MAX_POWER 22\n#endif\n\n// the 2.4G part maxes at 13dBm\n\n#if ARCH_PORTDUINO\n#define LR1120_MAX_POWER portduino_config.lr1120_max_power\n#endif\n#ifndef LR1120_MAX_POWER\n#define LR1120_MAX_POWER 13\n#endif\n\ntemplate <typename T>\nLR11x0Interface<T>::LR11x0Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                    RADIOLIB_PIN_TYPE busy)\n    : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module)\n{\n    LOG_WARN(\"LR11x0Interface(cs=%d, irq=%d, rst=%d, busy=%d)\", cs, irq, rst, busy);\n}\n\n/// Initialise the Driver transport hardware and software.\n/// Make sure the Driver is properly configured before calling init().\n/// \\return true if initialisation succeeded.\ntemplate <typename T> bool LR11x0Interface<T>::init()\n{\n#ifdef LR11X0_POWER_EN\n    pinMode(LR11X0_POWER_EN, OUTPUT);\n    digitalWrite(LR11X0_POWER_EN, HIGH);\n#endif\n\n#if ARCH_PORTDUINO\n    float tcxoVoltage = (float)portduino_config.dio3_tcxo_voltage / 1000;\n// FIXME: correct logic to default to not using TCXO if no voltage is specified for LR11x0_DIO3_TCXO_VOLTAGE\n#elif !defined(LR11X0_DIO3_TCXO_VOLTAGE)\n    float tcxoVoltage =\n        0; // \"TCXO reference voltage to be set on DIO3. Defaults to 1.6 V, set to 0 to skip.\" per\n           // https://github.com/jgromes/RadioLib/blob/690a050ebb46e6097c5d00c371e961c1caa3b52e/src/modules/LR11x0/LR11x0.h#L471C26-L471C104\n    // (DIO3 is free to be used as an IRQ)\n    LOG_DEBUG(\"LR11X0_DIO3_TCXO_VOLTAGE not defined, not using DIO3 as TCXO reference voltage\");\n#else\n    float tcxoVoltage = LR11X0_DIO3_TCXO_VOLTAGE;\n    LOG_DEBUG(\"LR11X0_DIO3_TCXO_VOLTAGE defined, using DIO3 as TCXO reference voltage at %f V\", LR11X0_DIO3_TCXO_VOLTAGE);\n    // (DIO3 is not free to be used as an IRQ)\n#endif\n\n    RadioLibInterface::init();\n\n    limitPower(LR1110_MAX_POWER);\n\n    if ((power > LR1120_MAX_POWER) &&\n        (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) { // clamp again if wide freq range\n        power = LR1120_MAX_POWER;\n        preambleLength = 12; // 12 is the default for operation above 2GHz\n    }\n\n#ifdef LR11X0_RF_SWITCH_SUBGHZ\n    pinMode(LR11X0_RF_SWITCH_SUBGHZ, OUTPUT);\n    digitalWrite(LR11X0_RF_SWITCH_SUBGHZ, getFreq() < 1e9 ? HIGH : LOW);\n    LOG_DEBUG(\"Set RF0 switch to %s\", getFreq() < 1e9 ? \"SubGHz\" : \"2.4GHz\");\n#endif\n\n#ifdef LR11X0_RF_SWITCH_2_4GHZ\n    pinMode(LR11X0_RF_SWITCH_2_4GHZ, OUTPUT);\n    digitalWrite(LR11X0_RF_SWITCH_2_4GHZ, getFreq() < 1e9 ? LOW : HIGH);\n    LOG_DEBUG(\"Set RF1 switch to %s\", getFreq() < 1e9 ? \"SubGHz\" : \"2.4GHz\");\n#endif\n\n    // Allow extra time for TCXO to stabilize after power-on\n    delay(10);\n\n    int res = lora.begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength, tcxoVoltage);\n\n    // Retry if we get SPI command failed - some units need extra TCXO stabilization time\n    if (res == RADIOLIB_ERR_SPI_CMD_FAILED) {\n        LOG_WARN(\"LR11x0 init failed with %d (SPI_CMD_FAILED), retrying after delay...\", res);\n        delay(100);\n        res = lora.begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength, tcxoVoltage);\n    }\n\n    // \\todo Display actual typename of the adapter, not just `LR11x0`\n    LOG_INFO(\"LR11x0 init result %d\", res);\n    if (res == RADIOLIB_ERR_CHIP_NOT_FOUND || res == RADIOLIB_ERR_SPI_CMD_FAILED)\n        return false;\n\n    LR11x0VersionInfo_t version;\n    res = lora.getVersionInfo(&version);\n    if (res == RADIOLIB_ERR_NONE)\n        LOG_DEBUG(\"LR11x0 Device %d, HW %d, FW %d.%d, WiFi %d.%d, GNSS %d.%d\", version.device, version.hardware, version.fwMajor,\n                  version.fwMinor, version.fwMajorWiFi, version.fwMinorWiFi, version.fwGNSS, version.almanacGNSS);\n\n    LOG_INFO(\"Frequency set to %f\", getFreq());\n    LOG_INFO(\"Bandwidth set to %f\", bw);\n    LOG_INFO(\"Power output set to %d\", power);\n\n    if (res == RADIOLIB_ERR_NONE)\n        res = lora.setCRC(2);\n\n    // FIXME: May want to set depending on a definition, currently all LR1110 variant files use the DC-DC regulator option\n    if (res == RADIOLIB_ERR_NONE)\n        res = lora.setRegulatorDCDC();\n\n#ifdef LR11X0_DIO_AS_RF_SWITCH\n    bool dioAsRfSwitch = true;\n#elif defined(ARCH_PORTDUINO)\n    bool dioAsRfSwitch = portduino_config.has_rfswitch_table;\n#else\n    bool dioAsRfSwitch = false;\n#endif\n\n    if (dioAsRfSwitch) {\n        lora.setRfSwitchTable(rfswitch_dio_pins, rfswitch_table);\n        LOG_DEBUG(\"Set DIO RF switch\");\n    }\n\n    if (res == RADIOLIB_ERR_NONE) {\n        if (config.lora.sx126x_rx_boosted_gain) { // the name is unfortunate but historically accurate\n            res = lora.setRxBoostedGainMode(true);\n            LOG_INFO(\"Set RX gain to boosted mode; result: %d\", res);\n        } else {\n            res = lora.setRxBoostedGainMode(false);\n            LOG_INFO(\"Set RX gain to power saving mode (boosted mode off); result: %d\", res);\n        }\n    }\n\n    if (res == RADIOLIB_ERR_NONE)\n        startReceive(); // start receiving\n\n    return res == RADIOLIB_ERR_NONE;\n}\n\ntemplate <typename T> bool LR11x0Interface<T>::reconfigure()\n{\n    RadioLibInterface::reconfigure();\n\n    // set mode to standby\n    setStandby();\n\n    // configure publicly accessible settings\n    int err = lora.setSpreadingFactor(sf);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setBandwidth(bw, wideLora() && (getFreq() > 1000.0f));\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setCodingRate(cr, cr != 7); // use long interleaving except if CR is 4/7 which doesn't support it\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setSyncWord(syncWord);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora.setPreambleLength(preambleLength);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora.setFrequency(getFreq());\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    if (power > LR1110_MAX_POWER) // This chip has lower power limits than some\n        power = LR1110_MAX_POWER;\n    if ((power > LR1120_MAX_POWER) && (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) // 2.4G power limit\n        power = LR1120_MAX_POWER;\n\n    err = lora.setOutputPower(power);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    startReceive(); // restart receiving\n\n    return RADIOLIB_ERR_NONE;\n}\n\ntemplate <typename T> void LR11x0Interface<T>::disableInterrupt()\n{\n    lora.clearIrqAction();\n}\n\ntemplate <typename T> void LR11x0Interface<T>::setStandby()\n{\n    checkNotification(); // handle any pending interrupts before we force standby\n\n    int err = lora.standby();\n\n    if (err != RADIOLIB_ERR_NONE) {\n        LOG_DEBUG(\"LR11x0 standby failed with error %d\", err);\n    }\n\n    assert(err == RADIOLIB_ERR_NONE);\n\n    isReceiving = false; // If we were receiving, not any more\n    activeReceiveStart = 0;\n    disableInterrupt();\n    completeSending(); // If we were sending, not anymore\n    RadioLibInterface::setStandby();\n}\n\n/**\n * Add SNR data to received messages\n */\ntemplate <typename T> void LR11x0Interface<T>::addReceiveMetadata(meshtastic_MeshPacket *mp)\n{\n    // LOG_DEBUG(\"PacketStatus %x\", lora.getPacketStatus());\n    mp->rx_snr = lora.getSNR();\n    mp->rx_rssi = lround(lora.getRSSI());\n    LOG_DEBUG(\"Corrected frequency offset: %f\", lora.getFrequencyError());\n}\n\n/** We override to turn on transmitter power as needed.\n */\ntemplate <typename T> void LR11x0Interface<T>::configHardwareForSend()\n{\n    RadioLibInterface::configHardwareForSend();\n}\n\n// For power draw measurements, helpful to force radio to stay sleeping\n// #define SLEEP_ONLY\n\ntemplate <typename T> void LR11x0Interface<T>::startReceive()\n{\n#ifdef SLEEP_ONLY\n    sleep();\n#else\n\n    setStandby();\n\n    lora.setPreambleLength(preambleLength); // Solve RX ack fail after direct message sent.  Not sure why this is needed.\n\n    // We use a 16 bit preamble so this should save some power by letting radio sit in standby mostly.\n    int err =\n        lora.startReceive(RADIOLIB_LR11X0_RX_TIMEOUT_INF, MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS, RADIOLIB_IRQ_RX_DEFAULT_MASK, 0);\n    if (err)\n        LOG_ERROR(\"StartReceive error: %d\", err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    RadioLibInterface::startReceive();\n\n    // Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits\n    enableInterrupt(isrRxLevel0);\n    checkRxDoneIrqFlag();\n#endif\n}\n\n/** Is the channel currently active? */\ntemplate <typename T> bool LR11x0Interface<T>::isChannelActive()\n{\n    // check if we can detect a LoRa preamble on the current channel\n    ChannelScanConfig_t cfg = {.cad = {.symNum = NUM_SYM_CAD,\n                                       .detPeak = RADIOLIB_LR11X0_CAD_PARAM_DEFAULT,\n                                       .detMin = RADIOLIB_LR11X0_CAD_PARAM_DEFAULT,\n                                       .exitMode = RADIOLIB_LR11X0_CAD_PARAM_DEFAULT,\n                                       .timeout = 0,\n                                       .irqFlags = RADIOLIB_IRQ_CAD_DEFAULT_FLAGS,\n                                       .irqMask = RADIOLIB_IRQ_CAD_DEFAULT_MASK}};\n    int16_t result;\n\n    setStandby();\n    result = lora.scanChannel(cfg);\n    if (result == RADIOLIB_LORA_DETECTED)\n        return true;\n\n    assert(result != RADIOLIB_ERR_WRONG_MODEM);\n\n    return false;\n}\n\n/** Could we send right now (i.e. either not actively receiving or transmitting)? */\ntemplate <typename T> bool LR11x0Interface<T>::isActivelyReceiving()\n{\n    // The IRQ status will be cleared when we start our read operation. Check if we've started a header, but haven't yet\n    // received and handled the interrupt for reading the packet/handling errors.\n    return receiveDetected(lora.getIrqStatus(), RADIOLIB_LR11X0_IRQ_SYNC_WORD_HEADER_VALID,\n                           RADIOLIB_LR11X0_IRQ_PREAMBLE_DETECTED);\n}\n\n#ifdef LR11X0_AGC_RESET\ntemplate <typename T> void LR11x0Interface<T>::resetAGC()\n{\n    // Safety: don't reset mid-packet\n    if (sendingPacket != NULL || (isReceiving && isActivelyReceiving()))\n        return;\n\n    LOG_DEBUG(\"LR11x0 AGC reset: warm sleep + Calibrate(0x3F)\");\n\n    // 1. Warm sleep — powers down the analog frontend, resetting AGC state\n    lora.sleep(true, 0);\n\n    // 2. Wake to RC standby for stable calibration\n    lora.standby(RADIOLIB_LR11X0_STANDBY_RC, true);\n\n    // 3. Calibrate all blocks (PLL, ADC, image, RC oscillators)\n    //    calibrate() is protected on LR11x0, so use raw SPI (same as internal implementation)\n    uint8_t calData = RADIOLIB_LR11X0_CALIBRATE_ALL;\n    module.SPIwriteStream(RADIOLIB_LR11X0_CMD_CALIBRATE, &calData, 1, true, true);\n\n    // 4. Re-calibrate image rejection for actual operating frequency\n    //    Calibrate(0x3F) defaults to 902-928 MHz which is wrong for other regions.\n    lora.calibrateImageRejection(getFreq() - 4.0f, getFreq() + 4.0f);\n\n    // 5. Re-apply RX boosted gain mode\n    lora.setRxBoostedGainMode(config.lora.sx126x_rx_boosted_gain);\n\n    // 6. Resume receiving\n    startReceive();\n}\n#endif\n\ntemplate <typename T> bool LR11x0Interface<T>::sleep()\n{\n    // \\todo Display actual typename of the adapter, not just `LR11x0`\n    LOG_DEBUG(\"LR11x0 entering sleep mode\");\n    setStandby(); // Stop any pending operations\n\n    // turn off TCXO if it was powered\n    lora.setTCXO(0);\n\n    // put chipset into sleep mode (we've already disabled interrupts by now)\n    bool keepConfig = false;\n    lora.sleep(keepConfig, 0); // Note: we do not keep the config, full reinit will be needed\n\n#ifdef LR11X0_POWER_EN\n    digitalWrite(LR11X0_POWER_EN, LOW);\n#endif\n\n    return true;\n}\n#endif\n"
  },
  {
    "path": "src/mesh/LR11x0Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_LR11X0 != 1\n#include \"RadioLibInterface.h\"\n\n/**\n * \\brief Adapter for LR11x0 radio family. Implements common logic for child classes.\n * \\tparam T RadioLib module type for LR11x0: SX1262, SX1268.\n */\ntemplate <class T> class LR11x0Interface : public RadioLibInterface\n{\n  public:\n    LR11x0Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n\n    /// Initialise the Driver transport hardware and software.\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool init() override;\n\n    /// Apply any radio provisioning changes\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool reconfigure() override;\n\n    /// Prepare hardware for sleep.  Call this _only_ for deep sleep, not needed for light sleep.\n    virtual bool sleep() override;\n\n    bool isIRQPending() override { return lora.getIrqFlags() != 0; }\n\n#ifdef LR11X0_AGC_RESET\n    void resetAGC() override;\n#endif\n\n  protected:\n    /**\n     * Specific module instance\n     */\n    T lora;\n\n    /**\n     * Glue functions called from ISR land\n     */\n    virtual void disableInterrupt() override;\n\n    /**\n     * Enable a particular ISR callback glue function\n     */\n    virtual void enableInterrupt(void (*callback)()) { lora.setIrqAction(callback); }\n\n    /** can we detect a LoRa preamble on the current channel? */\n    virtual bool isChannelActive() override;\n\n    /** are we actively receiving a packet (only called during receiving state) */\n    virtual bool isActivelyReceiving() override;\n\n    /**\n     * Start waiting to receive a message\n     */\n    virtual void startReceive() override;\n\n    /**\n     *  We override to turn on transmitter power as needed.\n     */\n    virtual void configHardwareForSend() override;\n\n    /**\n     * Add SNR data to received messages\n     */\n    virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) override;\n\n    virtual void setStandby() override;\n\n    uint32_t getPacketTime(uint32_t pl, bool received) override { return computePacketTime(lora, pl, received); }\n};\n#endif"
  },
  {
    "path": "src/mesh/LoRaFEMInterface.cpp",
    "content": "#if HAS_LORA_FEM\n#include \"LoRaFEMInterface.h\"\n\n#if defined(ARCH_ESP32)\n#include <driver/rtc_io.h>\n#include <esp_sleep.h>\n#endif\n\nLoRaFEMInterface loraFEMInterface;\nvoid LoRaFEMInterface::init(void)\n{\n    setLnaCanControl(false); // Default is uncontrollable\n#ifdef HELTEC_V4\n    pinMode(LORA_PA_POWER, OUTPUT);\n    digitalWrite(LORA_PA_POWER, HIGH);\n    rtc_gpio_hold_dis((gpio_num_t)LORA_PA_POWER);\n    delay(1);\n    rtc_gpio_hold_dis((gpio_num_t)LORA_KCT8103L_PA_CSD);\n    pinMode(LORA_KCT8103L_PA_CSD, INPUT); // detect which FEM is used\n    delay(1);\n    if (digitalRead(LORA_KCT8103L_PA_CSD) == HIGH) {\n        // FEM is KCT8103L\n        fem_type = KCT8103L_PA;\n        rtc_gpio_hold_dis((gpio_num_t)LORA_KCT8103L_PA_CTX);\n        pinMode(LORA_KCT8103L_PA_CSD, OUTPUT);\n        digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n        pinMode(LORA_KCT8103L_PA_CTX, OUTPUT);\n        digitalWrite(LORA_KCT8103L_PA_CTX, LOW); // LNA enabled by default\n        setLnaCanControl(true);\n    } else if (digitalRead(LORA_KCT8103L_PA_CSD) == LOW) {\n        // FEM is GC1109\n        fem_type = GC1109_PA;\n        // LORA_GC1109_PA_EN and LORA_KCT8103L_PA_CSD are the same pin and do not need to be repeatedly turned off and held.\n        //  rtc_gpio_hold_dis((gpio_num_t)LORA_GC1109_PA_EN);\n        pinMode(LORA_GC1109_PA_EN, OUTPUT);\n        digitalWrite(LORA_GC1109_PA_EN, HIGH);\n        pinMode(LORA_GC1109_PA_TX_EN, OUTPUT);\n        digitalWrite(LORA_GC1109_PA_TX_EN, LOW);\n    } else {\n        fem_type = OTHER_FEM_TYPES;\n    }\n#elif defined(USE_GC1109_PA)\n    fem_type = GC1109_PA;\n    pinMode(LORA_PA_POWER, OUTPUT);\n    digitalWrite(LORA_PA_POWER, HIGH);\n#if defined(ARCH_ESP32)\n    rtc_gpio_hold_dis((gpio_num_t)LORA_PA_POWER);\n    rtc_gpio_hold_dis((gpio_num_t)LORA_GC1109_PA_EN);\n    rtc_gpio_hold_dis((gpio_num_t)LORA_GC1109_PA_TX_EN);\n#endif\n    delay(1);\n    pinMode(LORA_GC1109_PA_EN, OUTPUT);\n    digitalWrite(LORA_GC1109_PA_EN, HIGH);\n    pinMode(LORA_GC1109_PA_TX_EN, OUTPUT);\n    digitalWrite(LORA_GC1109_PA_TX_EN, LOW);\n#elif defined(USE_KCT8103L_PA)\n    fem_type = KCT8103L_PA;\n    pinMode(LORA_PA_POWER, OUTPUT);\n    digitalWrite(LORA_PA_POWER, HIGH);\n#if defined(ARCH_ESP32)\n    rtc_gpio_hold_dis((gpio_num_t)LORA_PA_POWER);\n    rtc_gpio_hold_dis((gpio_num_t)LORA_KCT8103L_PA_CSD);\n    rtc_gpio_hold_dis((gpio_num_t)LORA_KCT8103L_PA_CTX);\n#endif\n    delay(1);\n    pinMode(LORA_KCT8103L_PA_CSD, OUTPUT);\n    digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n    pinMode(LORA_KCT8103L_PA_CTX, OUTPUT);\n    digitalWrite(LORA_KCT8103L_PA_CTX, LOW); // LNA enabled by default\n    setLnaCanControl(true);\n#endif\n}\n\nvoid LoRaFEMInterface::setSleepModeEnable(void)\n{\n#ifdef HELTEC_V4\n    if (fem_type == GC1109_PA) {\n        /*\n         * Do not switch the power on and off frequently.\n         * After turning off LORA_GC1109_PA_EN, the power consumption has dropped to the uA level.\n         */\n        digitalWrite(LORA_GC1109_PA_EN, LOW);\n        digitalWrite(LORA_GC1109_PA_TX_EN, LOW);\n    } else if (fem_type == KCT8103L_PA) {\n        // shutdown the PA\n        digitalWrite(LORA_KCT8103L_PA_CSD, LOW);\n    }\n#elif defined(USE_GC1109_PA)\n    digitalWrite(LORA_GC1109_PA_EN, LOW);\n    digitalWrite(LORA_GC1109_PA_TX_EN, LOW);\n#elif defined(USE_KCT8103L_PA)\n    // shutdown the PA\n    digitalWrite(LORA_KCT8103L_PA_CSD, LOW);\n#endif\n}\n\nvoid LoRaFEMInterface::setTxModeEnable(void)\n{\n#ifdef HELTEC_V4\n    if (fem_type == GC1109_PA) {\n        digitalWrite(LORA_GC1109_PA_EN, HIGH);    // CSD=1: Chip enabled\n        digitalWrite(LORA_GC1109_PA_TX_EN, HIGH); // CPS: 1=full PA, 0=bypass (for RX, CPS is don't care)\n    } else if (fem_type == KCT8103L_PA) {\n        digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n        digitalWrite(LORA_KCT8103L_PA_CTX, HIGH);\n    }\n#elif defined(USE_GC1109_PA)\n    digitalWrite(LORA_GC1109_PA_EN, HIGH);    // CSD=1: Chip enabled\n    digitalWrite(LORA_GC1109_PA_TX_EN, HIGH); // CPS: 1=full PA, 0=bypass (for RX, CPS is don't care)\n#elif defined(USE_KCT8103L_PA)\n    digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n    digitalWrite(LORA_KCT8103L_PA_CTX, HIGH);\n#endif\n}\n\nvoid LoRaFEMInterface::setRxModeEnable(void)\n{\n#ifdef HELTEC_V4\n    if (fem_type == GC1109_PA) {\n        digitalWrite(LORA_GC1109_PA_EN, HIGH); // CSD=1: Chip enabled\n        digitalWrite(LORA_GC1109_PA_TX_EN, LOW);\n    } else if (fem_type == KCT8103L_PA) {\n        digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n        if (lna_enabled) {\n            digitalWrite(LORA_KCT8103L_PA_CTX, LOW);\n        } else {\n            digitalWrite(LORA_KCT8103L_PA_CTX, HIGH);\n        }\n    }\n#elif defined(USE_GC1109_PA)\n    digitalWrite(LORA_GC1109_PA_EN, HIGH);    // CSD=1: Chip enabled\n    digitalWrite(LORA_GC1109_PA_TX_EN, LOW);\n#elif defined(USE_KCT8103L_PA)\n    digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n    if (lna_enabled) {\n        digitalWrite(LORA_KCT8103L_PA_CTX, LOW);\n    } else {\n        digitalWrite(LORA_KCT8103L_PA_CTX, HIGH);\n    }\n#endif\n}\n\nvoid LoRaFEMInterface::setRxModeEnableWhenMCUSleep(void)\n{\n\n#ifdef HELTEC_V4\n    // Keep GC1109 FEM powered during deep sleep so LNA remains active for RX wake.\n    // Set PA_POWER and PA_EN HIGH (overrides SX126xInterface::sleep() shutdown),\n    // then latch with RTC hold so the state survives deep sleep.\n    digitalWrite(LORA_PA_POWER, HIGH);\n    rtc_gpio_hold_en((gpio_num_t)LORA_PA_POWER);\n    if (fem_type == GC1109_PA) {\n        digitalWrite(LORA_GC1109_PA_EN, HIGH);\n        rtc_gpio_hold_en((gpio_num_t)LORA_GC1109_PA_EN);\n        gpio_pulldown_en((gpio_num_t)LORA_GC1109_PA_TX_EN);\n    } else if (fem_type == KCT8103L_PA) {\n        digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n        rtc_gpio_hold_en((gpio_num_t)LORA_KCT8103L_PA_CSD);\n        if (lna_enabled) {\n            digitalWrite(LORA_KCT8103L_PA_CTX, LOW);\n        } else {\n            digitalWrite(LORA_KCT8103L_PA_CTX, HIGH);\n        }\n        rtc_gpio_hold_en((gpio_num_t)LORA_KCT8103L_PA_CTX);\n    }\n#elif defined(USE_GC1109_PA)\n    digitalWrite(LORA_PA_POWER, HIGH);\n    digitalWrite(LORA_GC1109_PA_EN, HIGH);\n#if defined(ARCH_ESP32)\n    rtc_gpio_hold_en((gpio_num_t)LORA_PA_POWER);\n    rtc_gpio_hold_en((gpio_num_t)LORA_GC1109_PA_EN);\n    gpio_pulldown_en((gpio_num_t)LORA_GC1109_PA_TX_EN);\n#endif\n#elif defined(USE_KCT8103L_PA)\n    digitalWrite(LORA_KCT8103L_PA_CSD, HIGH);\n    rtc_gpio_hold_en((gpio_num_t)LORA_KCT8103L_PA_CSD);\n    if (lna_enabled) {\n        digitalWrite(LORA_KCT8103L_PA_CTX, LOW);\n    } else {\n        digitalWrite(LORA_KCT8103L_PA_CTX, HIGH);\n    }\n    rtc_gpio_hold_en((gpio_num_t)LORA_KCT8103L_PA_CTX);\n#endif\n}\n\nvoid LoRaFEMInterface::setLNAEnable(bool enabled)\n{\n    lna_enabled = enabled;\n}\n\nint8_t LoRaFEMInterface::powerConversion(int8_t loraOutputPower)\n{\n#ifdef HELTEC_V4\n    const uint16_t gc1109_tx_gain[] = {11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 9, 9, 8, 7};\n    const uint16_t kct8103l_tx_gain[] = {13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 11, 11, 10, 9, 8, 7};\n    const uint16_t *tx_gain;\n    uint16_t tx_gain_num;\n    if (fem_type == GC1109_PA) {\n        tx_gain = gc1109_tx_gain;\n        tx_gain_num = sizeof(gc1109_tx_gain) / sizeof(gc1109_tx_gain[0]);\n    } else if (fem_type == KCT8103L_PA) {\n        tx_gain = kct8103l_tx_gain;\n        tx_gain_num = sizeof(kct8103l_tx_gain) / sizeof(kct8103l_tx_gain[0]);\n    } else {\n        return loraOutputPower;\n    }\n#else\n#ifdef ARCH_PORTDUINO\n    const uint16_t *tx_gain = portduino_config.tx_gain_lora;\n    uint16_t tx_gain_num = portduino_config.num_pa_points;\n#else\n    const uint16_t tx_gain[NUM_PA_POINTS] = {TX_GAIN_LORA};\n    uint16_t tx_gain_num = NUM_PA_POINTS;\n#endif\n#endif\n    for (int radio_dbm = 0; radio_dbm < tx_gain_num; radio_dbm++) {\n        if (((radio_dbm + tx_gain[radio_dbm]) > loraOutputPower) ||\n            ((radio_dbm == (tx_gain_num - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= loraOutputPower))) {\n            // we've exceeded the power limit, or hit the max we can do\n            LOG_INFO(\"Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB\", loraOutputPower, tx_gain[radio_dbm]);\n            loraOutputPower -= tx_gain[radio_dbm];\n            break;\n        }\n    }\n    return loraOutputPower;\n}\n\n#endif"
  },
  {
    "path": "src/mesh/LoRaFEMInterface.h",
    "content": "#pragma once\n#if HAS_LORA_FEM\n#include \"configuration.h\"\n#include <stdint.h>\n\ntypedef enum { GC1109_PA, KCT8103L_PA, OTHER_FEM_TYPES } LoRaFEMType;\n\nclass LoRaFEMInterface\n{\n  public:\n    LoRaFEMInterface() : fem_type(OTHER_FEM_TYPES) {}\n    virtual ~LoRaFEMInterface() {}\n    void init(void);\n    void setSleepModeEnable(void);\n    void setTxModeEnable(void);\n    void setRxModeEnable(void);\n    void setRxModeEnableWhenMCUSleep(void);\n    void setLNAEnable(bool enabled);\n    int8_t powerConversion(int8_t loraOutputPower);\n    bool isLnaCanControl(void) { return lna_can_control; }\n    void setLnaCanControl(bool can_control) { lna_can_control = can_control; }\n\n  private:\n    LoRaFEMType fem_type;\n    bool lna_enabled = true;\n    bool lna_can_control = false;\n};\nextern LoRaFEMInterface loraFEMInterface;\n\n#endif"
  },
  {
    "path": "src/mesh/MemoryPool.h",
    "content": "#pragma once\n\n#include <Arduino.h>\n#include <assert.h>\n#include <functional>\n#include <memory>\n\n#include \"PointerQueue.h\"\n#include \"configuration.h\" // For LOG_WARN, LOG_DEBUG, LOG_HEAP\n\ntemplate <class T> class Allocator\n{\n\n  public:\n    Allocator() : deleter([this](T *p) { this->release(p); }) {}\n    virtual ~Allocator() {}\n\n    /// Return a queable object which has been prefilled with zeros.  Return nullptr if no buffer is available\n    /// Note: this method is safe to call from regular OR ISR code\n    T *allocZeroed()\n    {\n        T *p = allocZeroed(0);\n        if (!p) {\n            LOG_WARN(\"Failed to allocate zeroed memory\");\n        }\n        return p;\n    }\n\n    /// Return a queable object which has been prefilled with zeros - allow timeout to wait for available buffers (you probably\n    /// don't want this version).\n    T *allocZeroed(TickType_t maxWait)\n    {\n        T *p = alloc(maxWait);\n\n        if (p)\n            memset(p, 0, sizeof(T));\n        return p;\n    }\n\n    /// Return a queable object which is a copy of some other object\n    T *allocCopy(const T &src, TickType_t maxWait = portMAX_DELAY)\n    {\n        T *p = alloc(maxWait);\n        if (!p) {\n            LOG_WARN(\"Failed to allocate memory for copy\");\n            return nullptr;\n        }\n\n        *p = src;\n        return p;\n    }\n\n    /// Variations of the above methods that return std::unique_ptr instead of raw pointers.\n    using UniqueAllocation = std::unique_ptr<T, const std::function<void(T *)> &>;\n    /// Return a queable object which has been prefilled with zeros.\n    /// std::unique_ptr wrapped variant of allocZeroed().\n    UniqueAllocation allocUniqueZeroed() { return UniqueAllocation(allocZeroed(), deleter); }\n    /// Return a queable object which has been prefilled with zeros - allow timeout to wait for available buffers (you probably\n    /// don't want this version).\n    /// std::unique_ptr wrapped variant of allocZeroed(TickType_t maxWait).\n    UniqueAllocation allocUniqueZeroed(TickType_t maxWait) { return UniqueAllocation(allocZeroed(maxWait), deleter); }\n    /// Return a queable object which is a copy of some other object\n    /// std::unique_ptr wrapped variant of allocCopy(const T &src, TickType_t maxWait).\n    UniqueAllocation allocUniqueCopy(const T &src, TickType_t maxWait = portMAX_DELAY)\n    {\n        return UniqueAllocation(allocCopy(src, maxWait), deleter);\n    }\n\n    /// Return a buffer for use by others\n    virtual void release(T *p) = 0;\n\n  protected:\n    // Alloc some storage\n    virtual T *alloc(TickType_t maxWait) = 0;\n\n  private:\n    // std::unique_ptr Deleter function; calls release().\n    const std::function<void(T *)> deleter;\n};\n\n/**\n * An allocator that just uses regular free/malloc\n */\ntemplate <class T> class MemoryDynamic : public Allocator<T>\n{\n  public:\n    /// Return a buffer for use by others\n    virtual void release(T *p) override\n    {\n        if (p == nullptr)\n            return;\n\n        LOG_HEAP(\"Freeing 0x%x\", p);\n\n        free(p);\n    }\n\n  protected:\n    // Alloc some storage\n    virtual T *alloc(TickType_t maxWait) override\n    {\n        T *p = (T *)malloc(sizeof(T));\n        assert(p);\n        return p;\n    }\n};\n\n/**\n * A static memory pool that uses a fixed buffer instead of heap allocation\n */\ntemplate <class T, int MaxSize> class MemoryPool : public Allocator<T>\n{\n  private:\n    T pool[MaxSize];\n    bool used[MaxSize];\n\n  public:\n    MemoryPool() : pool{}, used{}\n    {\n        // Arrays are now zero-initialized by member initializer list\n        // pool array: all elements are default-constructed (zero for POD types)\n        // used array: all elements are false (zero-initialized)\n    }\n\n    /// Return a buffer for use by others\n    virtual void release(T *p) override\n    {\n        if (!p) {\n            LOG_DEBUG(\"Failed to release memory, pointer is null\");\n            return;\n        }\n\n        // Find the index of this pointer in our pool\n        int index = p - pool;\n        if (index >= 0 && index < MaxSize) {\n            assert(used[index]); // Should be marked as used\n            used[index] = false;\n            LOG_HEAP(\"Released static pool item %d at 0x%x\", index, p);\n        } else {\n            LOG_WARN(\"Pointer 0x%x not from our pool!\", p);\n        }\n    }\n\n  protected:\n    // Alloc some storage from our static pool\n    virtual T *alloc(TickType_t maxWait) override\n    {\n        // Find first free slot\n        for (int i = 0; i < MaxSize; i++) {\n            if (!used[i]) {\n                used[i] = true;\n                LOG_HEAP(\"Allocated static pool item %d at 0x%x\", i, &pool[i]);\n                return &pool[i];\n            }\n        }\n\n        // No free slots available - return nullptr instead of asserting\n        LOG_WARN(\"No free slots available in static memory pool!\");\n        return nullptr;\n    }\n};\n"
  },
  {
    "path": "src/mesh/MeshModule.cpp",
    "content": "#include \"MeshModule.h\"\n#include \"Channels.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"configuration.h\"\n#include \"modules/RoutingModule.h\"\n#include <algorithm>\n#include <assert.h>\n\nstd::vector<MeshModule *> *MeshModule::modules;\n\nconst meshtastic_MeshPacket *MeshModule::currentRequest;\nuint8_t MeshModule::numPeriodicModules = 0;\n\n/**\n * If any of the current chain of modules has already sent a reply, it will be here.  This is useful to allow\n * the RoutingModule to avoid sending redundant acks\n */\nmeshtastic_MeshPacket *MeshModule::currentReply;\n\nMeshModule::MeshModule(const char *_name) : name(_name)\n{\n    // Can't trust static initializer order, so we check each time\n    if (!modules)\n        modules = new std::vector<MeshModule *>();\n\n    modules->push_back(this);\n}\n\nvoid MeshModule::setup() {}\n\nMeshModule::~MeshModule()\n{\n    auto it = std::find(modules->begin(), modules->end(), this);\n    assert(it != modules->end());\n    modules->erase(it);\n}\n\n// ⚠️ **Only call once** to set the initial delay before a module starts broadcasting periodically\nint32_t MeshModule::setStartDelay()\n{\n    int32_t startDelay = MESHMODULE_MIN_BROADCAST_DELAY_MS + numPeriodicModules * MESHMODULE_BROADCAST_SPACING_MS;\n    numPeriodicModules++;\n\n    return startDelay;\n}\n\nmeshtastic_MeshPacket *MeshModule::allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex,\n                                               uint8_t hopLimit)\n{\n    meshtastic_Routing c = meshtastic_Routing_init_default;\n\n    c.error_reason = err;\n    c.which_variant = meshtastic_Routing_error_reason_tag;\n\n    // Now that we have moded sendAckNak up one level into the class hierarchy we can no longer assume we are a RoutingModule\n    // So we manually call pb_encode_to_bytes and specify routing port number\n    // auto p = allocDataProtobuf(c);\n    meshtastic_MeshPacket *p = router->allocForSending();\n    p->decoded.portnum = meshtastic_PortNum_ROUTING_APP;\n    p->decoded.payload.size =\n        pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Routing_msg, &c);\n\n    p->priority = meshtastic_MeshPacket_Priority_ACK;\n\n    p->hop_limit = hopLimit; // Flood ACK back to original sender\n    p->to = to;\n    p->decoded.request_id = idFrom;\n    p->channel = chIndex;\n    if (err != meshtastic_Routing_Error_NONE)\n        LOG_WARN(\"Alloc an err=%d,to=0x%x,idFrom=0x%x,id=0x%x\", err, to, idFrom, p->id);\n\n    return p;\n}\n\nmeshtastic_MeshPacket *MeshModule::allocErrorResponse(meshtastic_Routing_Error err, const meshtastic_MeshPacket *p)\n{\n    // If the original packet couldn't be decoded, use the primary channel\n    uint8_t channelIndex =\n        p->which_payload_variant == meshtastic_MeshPacket_decoded_tag ? p->channel : channels.getPrimaryIndex();\n    auto r = allocAckNak(err, getFrom(p), p->id, channelIndex);\n\n    setReplyTo(r, *p);\n\n    return r;\n}\n\nvoid MeshModule::callModules(meshtastic_MeshPacket &mp, RxSource src)\n{\n    // LOG_DEBUG(\"In call modules\");\n    bool moduleFound = false;\n\n    // We now allow **encrypted** packets to pass through the modules\n    bool isDecoded = mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag;\n\n    currentReply = NULL; // No reply yet\n\n    bool ignoreRequest = false; // No module asked to ignore the request yet\n\n    // Was this message directed to us specifically?  Will be false if we are sniffing someone elses packets\n    auto ourNodeNum = nodeDB->getNodeNum();\n    bool toUs = isBroadcast(mp.to) || isToUs(&mp);\n\n    for (auto i = modules->begin(); i != modules->end(); ++i) {\n        auto &pi = **i;\n\n        pi.currentRequest = &mp;\n\n        /// We only call modules that are interested in the packet (and the message is destined to us or we are promiscious)\n        bool wantsPacket = (isDecoded || pi.encryptedOk) && (pi.isPromiscuous || toUs) && pi.wantPacket(&mp);\n\n        if ((src == RX_SRC_LOCAL) && !(pi.loopbackOk)) {\n            // new case, monitor separately for now, then FIXME merge above\n            wantsPacket = false;\n        }\n\n        assert(!pi.myReply); // If it is !null it means we have a bug, because it should have been sent the previous time\n\n        if (wantsPacket) {\n            LOG_DEBUG(\"Module '%s' wantsPacket=%d\", pi.name, wantsPacket);\n\n            moduleFound = true;\n\n            /// received channel (or NULL if not decoded)\n            meshtastic_Channel *ch = isDecoded ? &channels.getByIndex(mp.channel) : NULL;\n\n            /// Is the channel this packet arrived on acceptable? (security check)\n            /// Note: we can't know channel names for encrypted packets, so those are NEVER sent to boundChannel modules\n\n            /// Also: if a packet comes in on the local PC interface, we don't check for bound channels, because it is TRUSTED and\n            /// it needs to to be able to fetch the initial admin packets without yet knowing any channels.\n\n            bool rxChannelOk = !pi.boundChannel || (mp.from == 0) || (ch && strcasecmp(ch->settings.name, pi.boundChannel) == 0);\n\n            if (!rxChannelOk) {\n                // no one should have already replied!\n                assert(!currentReply);\n\n                if (isDecoded && mp.decoded.want_response) {\n                    printPacket(\"packet on wrong channel, returning error\", &mp);\n                    currentReply = pi.allocErrorResponse(meshtastic_Routing_Error_NOT_AUTHORIZED, &mp);\n                } else\n                    printPacket(\"packet on wrong channel, but can't respond\", &mp);\n            } else {\n                ProcessMessage handled = pi.handleReceived(mp);\n\n                pi.alterReceived(mp);\n\n                // Possibly send replies (but only if the message was directed to us specifically, i.e. not for promiscious\n                // sniffing) also: we only let the one module send a reply, once that happens, remaining modules are not\n                // considered\n\n                // NOTE: we send a reply *even if the (non broadcast) request was from us* which is unfortunate but necessary\n                // because currently when the phone sends things, it sends things using the local node ID as the from address.  A\n                // better solution (FIXME) would be to let phones have their own distinct addresses and we 'route' to them like\n                // any other node.\n                if (isDecoded && mp.decoded.want_response && toUs && (!isFromUs(&mp) || isToUs(&mp)) && !currentReply) {\n                    pi.sendResponse(mp);\n                    ignoreRequest = ignoreRequest || pi.ignoreRequest; // If at least one module asks it, we may ignore a request\n                    LOG_INFO(\"Asked module '%s' to send a response\", pi.name);\n                } else {\n                    LOG_DEBUG(\"Module '%s' considered\", pi.name);\n                }\n\n                // If the requester didn't ask for a response we might need to discard unused replies to prevent memory leaks\n                if (pi.myReply) {\n                    LOG_DEBUG(\"Discard an unneeded response\");\n                    packetPool.release(pi.myReply);\n                    pi.myReply = NULL;\n                }\n\n                if (handled == ProcessMessage::STOP) {\n                    LOG_DEBUG(\"Module '%s' handled and skipped other processing\", pi.name);\n                    break;\n                }\n            }\n        }\n\n        pi.currentRequest = NULL;\n    }\n\n    if (isDecoded && mp.decoded.want_response && toUs) {\n        if (currentReply) {\n            printPacket(\"Send response\", currentReply);\n            service->sendToMesh(currentReply);\n            currentReply = NULL;\n        } else if (mp.from != ourNodeNum && !ignoreRequest) {\n            // Note: if the message started with the local node or a module asked to ignore the request, we don't want to send a\n            // no response reply\n\n            // No one wanted to reply to this request, tell the requster that happened\n            LOG_DEBUG(\"No one responded, send a nak\");\n\n            // SECURITY NOTE! I considered sending back a different error code if we didn't find the psk (i.e. !isDecoded)\n            // but opted NOT TO.  Because it is not a good idea to let remote nodes 'probe' to find out which PSKs were \"good\" vs\n            // bad.\n            routingModule->sendAckNak(meshtastic_Routing_Error_NO_RESPONSE, getFrom(&mp), mp.id, mp.channel,\n                                      routingModule->getHopLimitForResponse(mp));\n        }\n    }\n\n    if (!moduleFound && isDecoded) {\n        LOG_DEBUG(\"No modules interested in portnum=%d, src=%s\", mp.decoded.portnum, (src == RX_SRC_LOCAL) ? \"LOCAL\" : \"REMOTE\");\n    }\n}\n\nmeshtastic_MeshPacket *MeshModule::allocReply()\n{\n    auto r = myReply;\n    myReply = NULL; // Only use each reply once\n    return r;\n}\n\n/** Messages can be received that have the want_response bit set.  If set, this callback will be invoked\n * so that subclasses can (optionally) send a response back to the original sender.  Implementing this method\n * is optional\n */\nvoid MeshModule::sendResponse(const meshtastic_MeshPacket &req)\n{\n    auto r = allocReply();\n    if (r) {\n        setReplyTo(r, req);\n        currentReply = r;\n    } else {\n        // Ignore - this is now expected behavior for routing module (because it ignores some replies)\n        // LOG_WARN(\"Client requested response but this module did not provide\");\n    }\n}\n\n/** set the destination and packet parameters of packet p intended as a reply to a particular \"to\" packet\n * This ensures that if the request packet was sent reliably, the reply is sent that way as well.\n */\nvoid setReplyTo(meshtastic_MeshPacket *p, const meshtastic_MeshPacket &to)\n{\n    assert(p->which_payload_variant == meshtastic_MeshPacket_decoded_tag); // Should already be set by now\n    p->to = getFrom(&to);    // Make sure that if we are sending to the local node, we use our local node addr, not 0\n    p->channel = to.channel; // Use the same channel that the request came in on\n    p->hop_limit = routingModule->getHopLimitForResponse(to);\n\n    // No need for an ack if we are just delivering locally (it just generates an ignored ack)\n    p->want_ack = (to.from != 0) ? to.want_ack : false;\n    if (p->priority == meshtastic_MeshPacket_Priority_UNSET)\n        p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n    p->decoded.request_id = to.id;\n}\n\nstd::vector<MeshModule *> MeshModule::GetMeshModulesWithUIFrames(int startIndex)\n{\n    std::vector<MeshModule *> modulesWithUIFrames;\n\n    // Fill with nullptr up to startIndex\n    modulesWithUIFrames.resize(startIndex, nullptr);\n\n    if (modules) {\n        for (auto i = modules->begin(); i != modules->end(); ++i) {\n            auto &pi = **i;\n            if (pi.wantUIFrame()) {\n                LOG_DEBUG(\"%s wants a UI Frame\", pi.name);\n                modulesWithUIFrames.push_back(&pi);\n            }\n        }\n    }\n    return modulesWithUIFrames;\n}\n\nvoid MeshModule::observeUIEvents(Observer<const UIFrameEvent *> *observer)\n{\n    if (modules) {\n        for (auto i = modules->begin(); i != modules->end(); ++i) {\n            auto &pi = **i;\n            Observable<const UIFrameEvent *> *observable = pi.getUIFrameObservable();\n            if (observable != NULL) {\n                LOG_DEBUG(\"%s wants a UI Frame\", pi.name);\n                observer->observe(observable);\n            }\n        }\n    }\n}\n\nAdminMessageHandleResult MeshModule::handleAdminMessageForAllModules(const meshtastic_MeshPacket &mp,\n                                                                     meshtastic_AdminMessage *request,\n                                                                     meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult handled = AdminMessageHandleResult::NOT_HANDLED;\n    if (modules) {\n        for (auto i = modules->begin(); i != modules->end(); ++i) {\n            auto &pi = **i;\n            AdminMessageHandleResult h = pi.handleAdminMessageForModule(mp, request, response);\n            if (h == AdminMessageHandleResult::HANDLED_WITH_RESPONSE) {\n                // In case we have a response it always has priority.\n                LOG_DEBUG(\"Reply prepared by module '%s' of variant: %d\", pi.name, response->which_payload_variant);\n                handled = h;\n            } else if ((handled != AdminMessageHandleResult::HANDLED_WITH_RESPONSE) && (h == AdminMessageHandleResult::HANDLED)) {\n                // In case the message is handled it should be populated, but will not overwrite\n                //   a result with response.\n                handled = h;\n            }\n        }\n    }\n    return handled;\n}\n\n#if HAS_SCREEN\n// Would our module like its frame to be focused after Screen::setFrames has regenerated the list of frames?\n// Only considered if setFrames is triggered by a UIFrameEvent\nbool MeshModule::isRequestingFocus()\n{\n    if (_requestingFocus) {\n        _requestingFocus = false; // Consume the request\n        return true;\n    } else\n        return false;\n}\n#endif"
  },
  {
    "path": "src/mesh/MeshModule.h",
    "content": "#pragma once\n\n#include \"mesh/Channels.h\"\n#include \"mesh/MeshTypes.h\"\n#include <vector>\n\n#if HAS_SCREEN\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n#endif\n\n#define MESHMODULE_MIN_BROADCAST_DELAY_MS 30 * 1000 // Min. delay after boot before sending first broadcast by any module\n#define MESHMODULE_BROADCAST_SPACING_MS 15 * 1000   // Initial spacing between broadcasts of different modules\n\n/** handleReceived return enumeration\n *\n * Use ProcessMessage::CONTINUE to allows other modules to process a message.\n *\n * Use ProcessMessage::STOP to stop further message processing.\n */\nenum class ProcessMessage {\n    CONTINUE = 0,\n    STOP = 1,\n};\n\n/**\n * Used by modules to return the result of the AdminMessage handling.\n * If request is handled, then module should return HANDLED,\n * If response is also prepared for the request, then HANDLED_WITH_RESPONSE\n * should be returned.\n */\nenum class AdminMessageHandleResult {\n    NOT_HANDLED = 0,\n    HANDLED = 1,\n    HANDLED_WITH_RESPONSE = 2,\n};\n\n/*\n * This struct is used by Screen to figure out whether screen frame should be updated.\n */\nstruct UIFrameEvent {\n    // What do we actually want to happen?\n    enum Action {\n        REDRAW_ONLY,                    // Don't change which frames are show, just redraw, asap\n        REGENERATE_FRAMESET,            // Regenerate (change? add? remove?) screen frames, honoring requestFocus()\n        REGENERATE_FRAMESET_BACKGROUND, // Regenerate screen frames, Attempt to remain on the same frame throughout\n        SWITCH_TO_TEXTMESSAGE           // Jump directly to the Text Message screen\n    } action = REDRAW_ONLY;\n\n    // We might want to pass additional data inside this struct at some point\n};\n\n/** A baseclass for any mesh \"module\".\n *\n * A module allows you to add new features to meshtastic device code, without needing to know messaging details.\n *\n * A key concept for this is that your module should use a particular \"portnum\" for each message type you want to receive\n * and handle.\n *\n * Internally we use modules to implement the core meshtastic text messaging and gps position sharing features.  You\n * can use these classes as examples for how to write your own custom module.  See here: (FIXME)\n */\nclass MeshModule\n{\n    static std::vector<MeshModule *> *modules;\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    MeshModule(const char *_name);\n\n    virtual ~MeshModule();\n\n    /** For use only by MeshService\n     */\n    static void callModules(meshtastic_MeshPacket &mp, RxSource src = RX_SRC_RADIO);\n\n    static std::vector<MeshModule *> GetMeshModulesWithUIFrames(int startIndex);\n    static void observeUIEvents(Observer<const UIFrameEvent *> *observer);\n    static AdminMessageHandleResult handleAdminMessageForAllModules(const meshtastic_MeshPacket &mp,\n                                                                    meshtastic_AdminMessage *request,\n                                                                    meshtastic_AdminMessage *response);\n#if HAS_SCREEN\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { return; }\n    virtual bool isRequestingFocus();                          // Checked by screen, when regenerating frameset\n    virtual bool interceptingKeyboardInput() { return false; } // Can screen use keyboard for nav, or is module handling input?\n#endif\n  protected:\n    const char *name;\n\n    /** Most modules only care about packets that are destined for their node (i.e. broadcasts or has their node as the specific\n    recipient) But some plugs might want to 'sniff' packets that are merely being routed (passing through the current node). Those\n    modules can set this to true and their handleReceived() will be called for every packet.\n    */\n    bool isPromiscuous = false;\n\n    /** Also receive a copy of LOCALLY GENERATED messages - most modules should leave\n     *  this setting disabled - see issue #877 */\n    bool loopbackOk = false;\n\n    /** Most modules only understand decrypted packets.  For modules that also want to see encrypted packets, they should set this\n     * flag */\n    bool encryptedOk = false;\n\n    /* We allow modules to ignore a request without sending an error if they have a specific reason for it. */\n    bool ignoreRequest = false;\n\n    /**\n     * Check if the current request is a multi-hop broadcast. Modules should call this in allocReply()\n     * and return NULL to prevent reply storms from broadcast requests that have already been relayed.\n     */\n    bool isMultiHopBroadcastRequest()\n    {\n        if (currentRequest && isBroadcast(currentRequest->to) && currentRequest->hop_limit < currentRequest->hop_start) {\n            return true;\n        }\n        return false;\n    }\n\n    /** If a bound channel name is set, we will only accept received packets that come in on that channel.\n     * A special exception (FIXME, not sure if this is a good idea) - packets that arrive on the local interface\n     * are allowed on any channel (this lets the local user do anything).\n     *\n     * We will send responses on the same channel that the request arrived on.\n     */\n    const char *boundChannel = NULL;\n\n    /**\n     * If this module is currently handling a request currentRequest will be preset\n     * to the packet with the request.  This is mostly useful for reply handlers.\n     *\n     * Note: this can be static because we are guaranteed to be processing only one\n     * plumodulegin at a time.\n     */\n    static const meshtastic_MeshPacket *currentRequest;\n\n    // We keep track of the number of modules that send a periodic broadcast to schedule them spaced out over time\n    static uint8_t numPeriodicModules;\n\n    // Set the start delay for module that broadcasts periodically\n    int32_t setStartDelay();\n\n    /**\n     * If your handler wants to send a response, simply set currentReply and it will be sent at the end of response handling.\n     */\n    meshtastic_MeshPacket *myReply = NULL;\n\n    /**\n     * Initialize your module.  This setup function is called once after all hardware and mesh protocol layers have\n     * been initialized\n     */\n    virtual void setup();\n\n    /**\n     * @return true if you want to receive the specified portnum\n     */\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) = 0;\n\n    /** Called to handle a particular incoming message\n\n    @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for\n    it\n    */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) { return ProcessMessage::CONTINUE; }\n\n    /** Called to change a particular incoming message\n        This allows the module to change the message before it is passed through the rest of the call-chain.\n    */\n    virtual void alterReceived(meshtastic_MeshPacket &mp) {}\n\n    /** Messages can be received that have the want_response bit set.  If set, this callback will be invoked\n     * so that subclasses can (optionally) send a response back to the original sender.\n     *\n     * Note: most implementers don't need to override this, instead: If while handling a request you have a reply, just set\n     * the protected reply field in this instance.\n     * */\n    virtual meshtastic_MeshPacket *allocReply();\n\n    /***\n     * @return true if you want to be alloced a UI screen frame\n     */\n    virtual bool wantUIFrame() { return false; }\n    virtual Observable<const UIFrameEvent *> *getUIFrameObservable() { return NULL; }\n\n    meshtastic_MeshPacket *allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex,\n                                       uint8_t hopLimit = 0);\n\n    /// Send an error response for the specified packet.\n    meshtastic_MeshPacket *allocErrorResponse(meshtastic_Routing_Error err, const meshtastic_MeshPacket *p);\n\n    /**\n     * @brief An admin message arrived to AdminModule. Module was asked whether it want to handle the request.\n     *\n     * @param mp The mesh packet arrived.\n     * @param request The AdminMessage request extracted from the packet.\n     * @param response The prepared response\n     * @return AdminMessageHandleResult\n     *   HANDLED if message was handled\n     *   HANDLED_WITH_RESPONSE if a response is also prepared and to be sent.\n     */\n    virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                 meshtastic_AdminMessage *request,\n                                                                 meshtastic_AdminMessage *response)\n    {\n        return AdminMessageHandleResult::NOT_HANDLED;\n    };\n\n#if HAS_SCREEN\n    /** Request that our module's screen frame be focused when Screen::setFrames runs\n     * Only considered if Screen::setFrames is triggered via a UIFrameEvent\n     *\n     * Having this as a separate call, instead of part of the UIFrameEvent, allows the module to delay decision\n     * until drawFrame() is called. This required less restructuring.\n     */\n    bool _requestingFocus = false;\n    void requestFocus() { _requestingFocus = true; }\n#else\n    void requestFocus(){}; // No-op\n#endif\n\n  private:\n    /**\n     * If any of the current chain of modules has already sent a reply, it will be here.  This is useful to allow\n     * the RoutingModule to avoid sending redundant acks\n     */\n    static meshtastic_MeshPacket *currentReply;\n\n    friend class ReliableRouter;\n\n    /** Messages can be received that have the want_response bit set.  If set, this callback will be invoked\n     * so that subclasses can (optionally) send a response back to the original sender.  This method calls allocReply()\n     * to generate the reply message, and if !NULL that message will be delivered to whoever sent req\n     */\n    void sendResponse(const meshtastic_MeshPacket &req);\n};\n\n/** set the destination and packet parameters of packet p intended as a reply to a particular \"to\" packet\n * This ensures that if the request packet was sent reliably, the reply is sent that way as well.\n */\nvoid setReplyTo(meshtastic_MeshPacket *p, const meshtastic_MeshPacket &to);\n"
  },
  {
    "path": "src/mesh/MeshPacketQueue.cpp",
    "content": "#include \"MeshPacketQueue.h\"\n#include \"NodeDB.h\"\n#include \"configuration.h\"\n#include <assert.h>\n\n#include <algorithm>\n\n/// @return the priority of the specified packet\ninline uint32_t getPriority(const meshtastic_MeshPacket *p)\n{\n    auto pri = p->priority;\n    return pri;\n}\n\n/// @return \"true\" if \"p1\" is ordered before \"p2\"\nbool CompareMeshPacketFunc(const meshtastic_MeshPacket *p1, const meshtastic_MeshPacket *p2)\n{\n    assert(p1 && p2);\n\n    // If one packet is in the late transmit window, prefer the other one\n    if ((bool)p1->tx_after != (bool)p2->tx_after) {\n        return !p1->tx_after;\n    }\n\n    auto p1p = getPriority(p1), p2p = getPriority(p2);\n    // If priorities differ, use that\n    // for equal priorities, prefer packets already on mesh.\n    return (p1p != p2p) ? (p1p > p2p) : (!isFromUs(p1) && isFromUs(p2));\n}\n\nMeshPacketQueue::MeshPacketQueue(size_t _maxLen) : maxLen(_maxLen) {}\n\nbool MeshPacketQueue::empty()\n{\n    return queue.empty();\n}\n\n/**\n * Some clients might not properly set priority, therefore we fix it here.\n */\nvoid fixPriority(meshtastic_MeshPacket *p)\n{\n    // We might receive acks from other nodes (and since generated remotely, they won't have priority assigned.  Check for that\n    // and fix it\n    if (p->priority == meshtastic_MeshPacket_Priority_UNSET) {\n        // if a reliable message give a bit higher default priority\n        p->priority = (p->want_ack ? meshtastic_MeshPacket_Priority_RELIABLE : meshtastic_MeshPacket_Priority_DEFAULT);\n        if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n            // if acks/naks give very high priority\n            if (p->decoded.portnum == meshtastic_PortNum_ROUTING_APP) {\n                p->priority = meshtastic_MeshPacket_Priority_ACK;\n                // if text or admin, give high priority\n            } else if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP ||\n                       p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) {\n                p->priority = meshtastic_MeshPacket_Priority_HIGH;\n                // if it is a response, give higher priority to let it arrive early and stop the request being relayed\n            } else if (p->decoded.request_id != 0) {\n                p->priority = meshtastic_MeshPacket_Priority_RESPONSE;\n                // Also if we want a response, give a bit higher priority\n            } else if (p->decoded.want_response) {\n                p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n            }\n        }\n    }\n}\n\n/** enqueue a packet, return false if full */\nbool MeshPacketQueue::enqueue(meshtastic_MeshPacket *p, bool *dropped)\n{\n    // no space - try to replace a lower priority packet in the queue\n    if (queue.size() >= maxLen) {\n        bool replaced = replaceLowerPriorityPacket(p);\n        if (!replaced) {\n            LOG_WARN(\"TX queue is full, and there is no lower-priority packet available to evict in favour of 0x%08x\", p->id);\n        }\n        if (dropped) {\n            *dropped = true;\n        }\n        return replaced;\n    }\n\n    if (dropped) {\n        *dropped = false;\n    }\n\n    // Find the correct position using upper_bound to maintain a stable order\n    auto it = std::upper_bound(queue.begin(), queue.end(), p, CompareMeshPacketFunc);\n    queue.insert(it, p); // Insert packet at the found position\n    return true;\n}\n\nmeshtastic_MeshPacket *MeshPacketQueue::dequeue()\n{\n    if (empty()) {\n        return NULL;\n    }\n\n    auto *p = queue.front();\n    queue.erase(queue.begin()); // Remove the highest-priority packet\n    return p;\n}\n\nmeshtastic_MeshPacket *MeshPacketQueue::getFront()\n{\n    if (empty()) {\n        return NULL;\n    }\n\n    auto *p = queue.front();\n    return p;\n}\n\n/** Get a packet from this queue. Returns a pointer to the packet, or NULL if not found. */\nmeshtastic_MeshPacket *MeshPacketQueue::getPacketFromQueue(NodeNum from, PacketId id)\n{\n    for (auto it = queue.begin(); it != queue.end(); it++) {\n        auto p = (*it);\n        if (getFrom(p) == from && p->id == id) {\n            return p;\n        }\n    }\n\n    return NULL;\n}\n\n/** Attempt to find and remove a packet from this queue.  Returns a pointer to the removed packet, or NULL if not found */\nmeshtastic_MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id, bool tx_normal, bool tx_late, uint8_t hop_limit_lt)\n{\n    for (auto it = queue.begin(); it != queue.end(); it++) {\n        auto p = (*it);\n        if (getFrom(p) == from && p->id == id && ((tx_normal && !p->tx_after) || (tx_late && p->tx_after)) &&\n            (!hop_limit_lt || p->hop_limit < hop_limit_lt)) {\n            queue.erase(it);\n            return p;\n        }\n    }\n\n    return NULL;\n}\n\n/* Attempt to find a packet from this queue. Return true if it was found. */\nbool MeshPacketQueue::find(const NodeNum from, const PacketId id)\n{\n    return getPacketFromQueue(from, id) != NULL;\n}\n\n/**\n * Attempt to find a lower-priority packet in the queue and replace it with the provided one.\n * @return True if the replacement succeeded, false otherwise\n */\nbool MeshPacketQueue::replaceLowerPriorityPacket(meshtastic_MeshPacket *p)\n{\n\n    if (queue.empty()) {\n        return false; // No packets to replace\n    }\n\n    // Check if the packet at the back has a lower priority than the new packet\n    auto *backPacket = queue.back();\n    if (!backPacket->tx_after && backPacket->priority < p->priority) {\n        LOG_WARN(\"Dropping packet 0x%08x to make room in the TX queue for higher-priority packet 0x%08x\", backPacket->id, p->id);\n        // Remove the back packet\n        queue.pop_back();\n        packetPool.release(backPacket);\n        // Insert the new packet in the correct order\n        enqueue(p);\n        return true;\n    }\n\n    if (backPacket->tx_after) {\n        // Check if there's a non-late packet with lower priority\n        auto it = queue.end();\n        auto refPacket = *--it;\n        for (; refPacket->tx_after && it != queue.begin(); refPacket = *--it)\n            ;\n        if (!refPacket->tx_after && refPacket->priority < p->priority) {\n            LOG_WARN(\"Dropping non-late packet 0x%08x to make room in the TX queue for higher-priority packet 0x%08x\",\n                     refPacket->id, p->id);\n            queue.erase(it);\n            packetPool.release(refPacket);\n            // Insert the new packet in the correct order\n            enqueue(p);\n            return true;\n        }\n    }\n\n    if (backPacket->tx_after) {\n        // Check if there's a late packet at the queue end\n        auto now = millis();\n        if (backPacket->tx_after < now && (!p->tx_after || backPacket->tx_after > p->tx_after)) {\n            int32_t dt = (int32_t)(backPacket->tx_after - now);\n            if (p->tx_after) {\n                LOG_WARN(\"Dropping late packet 0x%08x with TX delay %dms to make room in the TX queue for packet 0x%08x with \"\n                         \"TX delay %ums\",\n                         backPacket->id, dt, p->id, p->tx_after - now);\n\n            } else {\n                LOG_WARN(\"Dropping late packet 0x%08x with TX delay %dms to make room in the TX queue for packet 0x%08x \"\n                         \"with no TX delay\",\n                         backPacket->id, dt, p->id);\n            }\n            queue.pop_back();\n            packetPool.release(backPacket);\n            // Insert the new packet in the correct order\n            enqueue(p);\n            return true;\n        }\n    }\n\n    // If the back packet's priority is not lower, no replacement occurs\n    return false;\n}"
  },
  {
    "path": "src/mesh/MeshPacketQueue.h",
    "content": "#pragma once\n\n#include \"MeshTypes.h\"\n\n#include <queue>\n\n/**\n * A priority queue of packets\n */\nclass MeshPacketQueue\n{\n    size_t maxLen;\n    std::vector<meshtastic_MeshPacket *> queue;\n\n    /** Replace a lower priority package in the queue with 'mp' (provided there are lower pri packages). Return true if replaced.\n     */\n    bool replaceLowerPriorityPacket(meshtastic_MeshPacket *mp);\n\n  public:\n    explicit MeshPacketQueue(size_t _maxLen);\n\n    /** enqueue a packet, return false if full\n     * @param dropped Optional pointer to a bool that will be set to true if a packet was dropped\n     */\n    bool enqueue(meshtastic_MeshPacket *p, bool *dropped = nullptr);\n\n    /** return true if the queue is empty */\n    bool empty();\n\n    /** return amount of free packets in Queue */\n    size_t getFree() { return maxLen - queue.size(); }\n\n    /** return total size of the Queue */\n    size_t getMaxLen() { return maxLen; }\n\n    meshtastic_MeshPacket *dequeue();\n\n    meshtastic_MeshPacket *getFront();\n\n    /** Get a packet from this queue. Returns a pointer to the packet, or NULL if not found. */\n    meshtastic_MeshPacket *getPacketFromQueue(NodeNum from, PacketId id);\n\n    /** Attempt to find and remove a packet from this queue.  Returns the packet which was removed from the queue */\n    meshtastic_MeshPacket *remove(NodeNum from, PacketId id, bool tx_normal = true, bool tx_late = true,\n                                  uint8_t hop_limit_lt = 0);\n\n    /* Attempt to find a packet from this queue. Return true if it was found. */\n    bool find(const NodeNum from, const PacketId id);\n};"
  },
  {
    "path": "src/mesh/MeshRadio.h",
    "content": "#pragma once\n\n#include \"MemoryPool.h\"\n#include \"MeshTypes.h\"\n#include \"PointerQueue.h\"\n#include \"configuration.h\"\n\n// Sentinel marking the end of a modem preset array\nstatic constexpr meshtastic_Config_LoRaConfig_ModemPreset MODEM_PRESET_END =\n    static_cast<meshtastic_Config_LoRaConfig_ModemPreset>(0xFF);\n\n// Region profile: bundles the preset list with regulatory parameters shared across regions\nstruct RegionProfile {\n    const meshtastic_Config_LoRaConfig_ModemPreset *presets; // sentinel-terminated; first entry is the default\n    float spacing;                                           // gaps between radio channels\n    float padding;                                           // padding at each side of the \"operating channel\"\n    bool audioPermitted;\n    bool licensedOnly;        // a region profile for licensed operators only\n    int8_t textThrottle;      // throttle for text - future expansion\n    int8_t positionThrottle;  // throttle for location data - future expansion\n    int8_t telemetryThrottle; // throttle for telemetry - future expansion\n    uint8_t overrideSlot;     // a per-region override slot for if we need to fix it in place\n};\n\nextern const RegionProfile PROFILE_STD;\nextern const RegionProfile PROFILE_EU868;\nextern const RegionProfile PROFILE_UNDEF;\n// extern const RegionProfile  PROFILE_LITE;\n// extern const RegionProfile  PROFILE_NARROW;\n// extern const RegionProfile  PROFILE_HAM;\n\n// Map from old region names to new region enums\nstruct RegionInfo {\n    meshtastic_Config_LoRaConfig_RegionCode code;\n    float freqStart;\n    float freqEnd;\n    float dutyCycle;    // modified by getEffectiveDutyCycle\n    uint8_t powerLimit; // Or zero for not set\n    bool freqSwitching;\n    bool wideLora;\n    const RegionProfile *profile;\n    const char *name; // EU433 etc\n\n    // Preset accessors (delegate through profile)\n    meshtastic_Config_LoRaConfig_ModemPreset getDefaultPreset() const { return profile->presets[0]; }\n    const meshtastic_Config_LoRaConfig_ModemPreset *getAvailablePresets() const { return profile->presets; }\n    size_t getNumPresets() const\n    {\n        size_t n = 0;\n        while (profile->presets[n] != MODEM_PRESET_END)\n            n++;\n        return n;\n    }\n};\n\nextern const RegionInfo regions[];\nextern const RegionInfo *myRegion;\n\nextern void initRegion();\n\n// Valid LoRa spread factor range and defaults\nconstexpr uint8_t LORA_SF_MIN = 7;\nconstexpr uint8_t LORA_SF_MAX = 12;\nconstexpr uint8_t LORA_SF_DEFAULT = 11; // LONG_FAST default\n\n// Valid LoRa coding rate range and default\nconstexpr uint8_t LORA_CR_MIN = 4;\nconstexpr uint8_t LORA_CR_MAX = 8;\nconstexpr uint8_t LORA_CR_DEFAULT = 5; // LONG_FAST default\n\n// Default bandwidth in kHz (LONG_FAST)\nconstexpr float LORA_BW_DEFAULT_KHZ = 250.0f;\n\n/// Clamp spread factor to the valid LoRa range [7, 12].\n/// Out-of-range values (including 0 from unset preset mode) return LORA_SF_DEFAULT.\nstatic inline uint8_t clampSpreadFactor(uint8_t sf)\n{\n    if (sf < LORA_SF_MIN || sf > LORA_SF_MAX)\n        return LORA_SF_DEFAULT;\n    return sf;\n}\n\n/// Clamp coding rate to the valid LoRa range [4, 8].\n/// Out-of-range values return LORA_CR_DEFAULT.\nstatic inline uint8_t clampCodingRate(uint8_t cr)\n{\n    if (cr < LORA_CR_MIN || cr > LORA_CR_MAX)\n        return LORA_CR_DEFAULT;\n    return cr;\n}\n\n/// Ensure bandwidth is positive. Non-positive values return LORA_BW_DEFAULT_KHZ.\nstatic inline float clampBandwidthKHz(float bwKHz)\n{\n    if (bwKHz <= 0.0f)\n        return LORA_BW_DEFAULT_KHZ;\n    return bwKHz;\n}\n\nstatic inline float bwCodeToKHz(uint16_t bwCode)\n{\n    if (bwCode == 31)\n        return 31.25f;\n    if (bwCode == 62)\n        return 62.5f;\n    if (bwCode == 200)\n        return 203.125f;\n    if (bwCode == 400)\n        return 406.25f;\n    if (bwCode == 800)\n        return 812.5f;\n    if (bwCode == 1600)\n        return 1625.0f;\n    return (float)bwCode;\n}\n\nstatic inline uint16_t bwKHzToCode(float bwKHz)\n{\n    if (bwKHz > 31.24f && bwKHz < 31.26f)\n        return 31;\n    if (bwKHz > 62.49f && bwKHz < 62.51f)\n        return 62;\n    if (bwKHz > 203.12f && bwKHz < 203.13f)\n        return 200;\n    if (bwKHz > 406.24f && bwKHz < 406.26f)\n        return 400;\n    if (bwKHz > 812.49f && bwKHz < 812.51f)\n        return 800;\n    if (bwKHz > 1624.99f && bwKHz < 1625.01f)\n        return 1600;\n    return (uint16_t)(bwKHz + 0.5f);\n}\n\nstatic inline void modemPresetToParams(meshtastic_Config_LoRaConfig_ModemPreset preset, bool wideLora, float &bwKHz, uint8_t &sf,\n                                       uint8_t &cr)\n{\n    switch (preset) {\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:\n        bwKHz = wideLora ? 1625.0f : 500.0f;\n        cr = 5;\n        sf = 7;\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:\n        bwKHz = wideLora ? 812.5f : 250.0f;\n        cr = 5;\n        sf = 7;\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:\n        bwKHz = wideLora ? 812.5f : 250.0f;\n        cr = 5;\n        sf = 8;\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:\n        bwKHz = wideLora ? 812.5f : 250.0f;\n        cr = 5;\n        sf = 9;\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:\n        bwKHz = wideLora ? 812.5f : 250.0f;\n        cr = 5;\n        sf = 10;\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO:\n        bwKHz = wideLora ? 1625.0f : 500.0f;\n        cr = 8;\n        sf = 11;\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:\n        bwKHz = wideLora ? 406.25f : 125.0f;\n        cr = 8;\n        sf = 11;\n        break;\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:\n        bwKHz = wideLora ? 406.25f : 125.0f;\n        cr = 8;\n        sf = 12;\n        break;\n    default: // LONG_FAST (or illegal)\n        bwKHz = wideLora ? 812.5f : 250.0f;\n        cr = 5;\n        sf = 11;\n        break;\n    }\n}\n\nstatic inline float modemPresetToBwKHz(meshtastic_Config_LoRaConfig_ModemPreset preset, bool wideLora)\n{\n    float bwKHz = 0;\n    uint8_t sf = 0;\n    uint8_t cr = 0;\n    modemPresetToParams(preset, wideLora, bwKHz, sf, cr);\n    return bwKHz;\n}"
  },
  {
    "path": "src/mesh/MeshService.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n\n#include \"../concurrency/Periodic.h\"\n#include \"BluetoothCommon.h\" // needed for updateBatteryLevel, FIXME, eventually when we pull mesh out into a lib we shouldn't be whacking bluetooth from here\n#include \"MeshService.h\"\n#include \"MessageStore.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"TypeConversions.h\"\n#include \"graphics/draw/MessageRenderer.h\"\n#include \"main.h\"\n#include \"mesh-pb-constants.h\"\n#include \"meshUtils.h\"\n#include \"modules/NodeInfoModule.h\"\n#include \"modules/PositionModule.h\"\n#include \"modules/RoutingModule.h\"\n#include \"power.h\"\n#include <assert.h>\n#include <string>\n\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#endif\n\n/*\nreceivedPacketQueue - this is a queue of messages we've received from the mesh, which we are keeping to deliver to the phone.\nIt is implemented with a FreeRTos queue (wrapped with a little RTQueue class) of pointers to MeshPacket protobufs (which were\nalloced with new). After a packet ptr is removed from the queue and processed it should be deleted.  (eventually we should move\nsent packets into a 'sentToPhone' queue of packets we can delete just as soon as we are sure the phone has acked those packets -\nwhen the phone writes to FromNum)\n\nmesh - an instance of Mesh class.  Which manages the interface to the mesh radio library, reception of packets from other nodes,\narbitrating to select a node number and keeping the current nodedb.\n\n*/\n\n/* Broadcast when a newly powered mesh node wants to find a node num it can use\n\nThe algorithm is as follows:\n* when a node starts up, it broadcasts their user and the normal flow is for all other nodes to reply with their User as well (so\nthe new node can build its node db)\n*/\n\nMeshService *service;\n\n#define MAX_MQTT_PROXY_MESSAGES 16\nstatic MemoryPool<meshtastic_MqttClientProxyMessage, MAX_MQTT_PROXY_MESSAGES> staticMqttClientProxyMessagePool;\n\n#define MAX_QUEUE_STATUS 4\nstatic MemoryPool<meshtastic_QueueStatus, MAX_QUEUE_STATUS> staticQueueStatusPool;\n\n#define MAX_CLIENT_NOTIFICATIONS 4\nstatic MemoryPool<meshtastic_ClientNotification, MAX_CLIENT_NOTIFICATIONS> staticClientNotificationPool;\n\nAllocator<meshtastic_MqttClientProxyMessage> &mqttClientProxyMessagePool = staticMqttClientProxyMessagePool;\n\nAllocator<meshtastic_ClientNotification> &clientNotificationPool = staticClientNotificationPool;\n\nAllocator<meshtastic_QueueStatus> &queueStatusPool = staticQueueStatusPool;\n\n#include \"Router.h\"\n\nMeshService::MeshService()\n#ifdef ARCH_PORTDUINO\n    : toPhoneQueue(MAX_RX_TOPHONE), toPhoneQueueStatusQueue(MAX_RX_QUEUESTATUS_TOPHONE),\n      toPhoneMqttProxyQueue(MAX_RX_MQTTPROXY_TOPHONE), toPhoneClientNotificationQueue(MAX_RX_NOTIFICATION_TOPHONE)\n#endif\n{\n    lastQueueStatus = {0, 0, 16, 0};\n}\n\nvoid MeshService::init()\n{\n#if HAS_GPS\n    if (gps)\n        gpsObserver.observe(&gps->newStatus);\n#endif\n}\n\nint MeshService::handleFromRadio(const meshtastic_MeshPacket *mp)\n{\n    powerFSM.trigger(EVENT_PACKET_FOR_PHONE); // Possibly keep the node from sleeping\n\n    nodeDB->updateFrom(*mp); // update our DB state based off sniffing every RX packet from the radio\n    bool isPreferredRebroadcaster =\n        IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_ROUTER, meshtastic_Config_DeviceConfig_Role_ROUTER_LATE,\n                  meshtastic_Config_DeviceConfig_Role_CLIENT_BASE);\n    if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&\n        mp->decoded.portnum == meshtastic_PortNum_TELEMETRY_APP && mp->decoded.request_id > 0) {\n        LOG_DEBUG(\"Received telemetry response. Skip sending our NodeInfo\");\n        //  ignore our request for its NodeInfo\n    } else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user &&\n               nodeInfoModule && !isPreferredRebroadcaster && !nodeDB->isFull()) {\n        if (airTime->isTxAllowedChannelUtil(true)) {\n            const int8_t hopsUsed = getHopsAway(*mp, config.lora.hop_limit);\n            if (hopsUsed > (int32_t)(config.lora.hop_limit + 2)) {\n                LOG_DEBUG(\"Skip send NodeInfo: %d hops away is too far away\", hopsUsed);\n            } else {\n                LOG_INFO(\"Heard new node on ch. %d, send NodeInfo and ask for response\", mp->channel);\n                nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel);\n            }\n        } else {\n            LOG_DEBUG(\"Skip sending NodeInfo > 25%% ch. util\");\n        }\n    }\n\n    printPacket(\"Forwarding to phone\", mp);\n    sendToPhone(packetPool.allocCopy(*mp));\n\n    return 0;\n}\n\n/// Do idle processing (mostly processing messages which have been queued from the radio)\nvoid MeshService::loop()\n{\n    if (lastQueueStatus.free == 0) { // check if there is now free space in TX queue\n        meshtastic_QueueStatus qs = router->getQueueStatus();\n        if (qs.free != lastQueueStatus.free)\n            (void)sendQueueStatusToPhone(qs, 0, 0);\n    }\n    if (oldFromNum != fromNum) { // We don't want to generate extra notifies for multiple new packets\n        int result = fromNumChanged.notifyObservers(fromNum);\n        if (result == 0) // If any observer returns non-zero, we will try again\n            oldFromNum = fromNum;\n    }\n}\n\n/// The radioConfig object just changed, call this to force the hw to change to the new settings\nvoid MeshService::reloadConfig(int saveWhat)\n{\n    // If we can successfully set this radio to these settings, save them to disk\n\n    // This will also update the region as needed\n    nodeDB->resetRadioConfig(); // Don't let the phone send us fatally bad settings\n\n    configChanged.notifyObservers(NULL); // This will cause radio hardware to change freqs etc\n    nodeDB->saveToDisk(saveWhat);\n}\n\n/// The owner User record just got updated, update our node DB and broadcast the info into the mesh\nvoid MeshService::reloadOwner(bool shouldSave)\n{\n    // LOG_DEBUG(\"reloadOwner()\");\n    // update our local data directly\n    nodeDB->updateUser(nodeDB->getNodeNum(), owner);\n    assert(nodeInfoModule);\n    // update everyone else and save to disk\n    if (nodeInfoModule && shouldSave) {\n        nodeInfoModule->sendOurNodeInfo();\n    }\n}\n\n// search the queue for a request id and return the matching nodenum\nNodeNum MeshService::getNodenumFromRequestId(uint32_t request_id)\n{\n    NodeNum nodenum = 0;\n    for (int i = 0; i < toPhoneQueue.numUsed(); i++) {\n        meshtastic_MeshPacket *p = toPhoneQueue.dequeuePtr(0);\n        if (p->id == request_id) {\n            nodenum = p->to;\n            // make sure to continue this to make one full loop\n        }\n        // put it right back on the queue\n        toPhoneQueue.enqueue(p, 0);\n    }\n    return nodenum;\n}\n\n/**\n *  Given a ToRadio buffer parse it and properly handle it (setup radio, owner or send packet into the mesh)\n * Called by PhoneAPI.handleToRadio.  Note: p is a scratch buffer, this function is allowed to write to it but it can not keep a\n * reference\n */\nvoid MeshService::handleToRadio(meshtastic_MeshPacket &p)\n{\n#if defined(ARCH_PORTDUINO)\n    if (SimRadio::instance && p.decoded.portnum == meshtastic_PortNum_SIMULATOR_APP) {\n        // Simulates device received a packet via the LoRa chip\n        SimRadio::instance->unpackAndReceive(p);\n        return;\n    }\n#endif\n    p.from = 0;                          // We don't let clients assign nodenums to their sent messages\n    p.next_hop = NO_NEXT_HOP_PREFERENCE; // We don't let clients assign next_hop to their sent messages\n    p.relay_node = NO_RELAY_NODE;        // We don't let clients assign relay_node to their sent messages\n\n    if (p.id == 0)\n        p.id = generatePacketId(); // If the phone didn't supply one, then pick one\n\n    p.rx_time = getValidTime(RTCQualityFromNet); // Record the time the packet arrived from the phone\n\n    IF_SCREEN(if (p.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP && p.decoded.payload.size > 0 &&\n                  p.to != NODENUM_BROADCAST && p.to != 0) // DM only\n              {\n                  perhapsDecode(&p);\n                  const StoredMessage &sm = messageStore.addFromPacket(p);\n                  graphics::MessageRenderer::handleNewMessage(nullptr, sm, p); // notify UI\n              })\n    // Send the packet into the mesh\n    DEBUG_HEAP_BEFORE;\n    auto a = packetPool.allocCopy(p);\n    DEBUG_HEAP_AFTER(\"MeshService::handleToRadio\", a);\n    sendToMesh(a, RX_SRC_USER);\n\n    bool loopback = false; // if true send any packet the phone sends back itself (for testing)\n    if (loopback) {\n        // no need to copy anymore because handle from radio assumes it should _not_ delete\n        // packetPool.allocCopy(r.variant.packet);\n        handleFromRadio(&p);\n        // handleFromRadio will tell the phone a new packet arrived\n    }\n}\n\n/** Attempt to cancel a previously sent packet from this _local_ node.  Returns true if a packet was found we could cancel */\nbool MeshService::cancelSending(PacketId id)\n{\n    return router->cancelSending(nodeDB->getNodeNum(), id);\n}\n\nErrorCode MeshService::sendQueueStatusToPhone(const meshtastic_QueueStatus &qs, ErrorCode res, uint32_t mesh_packet_id)\n{\n    meshtastic_QueueStatus *copied = queueStatusPool.allocCopy(qs);\n\n    copied->res = res;\n    copied->mesh_packet_id = mesh_packet_id;\n\n    if (toPhoneQueueStatusQueue.numFree() == 0) {\n        LOG_INFO(\"tophone queue status queue is full, discard oldest\");\n        meshtastic_QueueStatus *d = toPhoneQueueStatusQueue.dequeuePtr(0);\n        if (d)\n            releaseQueueStatusToPool(d);\n    }\n\n    lastQueueStatus = *copied;\n\n    res = toPhoneQueueStatusQueue.enqueue(copied, 0);\n    fromNum++;\n\n    return res ? ERRNO_OK : ERRNO_UNKNOWN;\n}\n\nvoid MeshService::sendToMesh(meshtastic_MeshPacket *p, RxSource src, bool ccToPhone)\n{\n    uint32_t mesh_packet_id = p->id;\n    nodeDB->updateFrom(*p); // update our local DB for this packet (because phone might have sent position packets etc...)\n\n    // Note: We might return !OK if our fifo was full, at that point the only option we have is to drop it\n    ErrorCode res = router->sendLocal(p, src);\n\n    /* NOTE(pboldin): Prepare and send QueueStatus message to the phone as a\n     * high-priority message. */\n    meshtastic_QueueStatus qs = router->getQueueStatus();\n    ErrorCode r = sendQueueStatusToPhone(qs, res, mesh_packet_id);\n    if (r != ERRNO_OK) {\n        LOG_DEBUG(\"Can't send status to phone\");\n    }\n\n    if ((res == ERRNO_OK || res == ERRNO_SHOULD_RELEASE) && ccToPhone) { // Check if p is not released in case it couldn't be sent\n        DEBUG_HEAP_BEFORE;\n        auto a = packetPool.allocCopy(*p);\n        DEBUG_HEAP_AFTER(\"MeshService::sendToMesh\", a);\n\n        sendToPhone(a);\n    }\n\n    // Router may ask us to release the packet if it wasn't sent\n    if (res == ERRNO_SHOULD_RELEASE) {\n        releaseToPool(p);\n    }\n}\n\nbool MeshService::trySendPosition(NodeNum dest, bool wantReplies)\n{\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n\n    assert(node);\n\n    if (nodeDB->hasValidPosition(node)) {\n#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS\n        if (positionModule) {\n            if (!config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot()) {\n                LOG_DEBUG(\"Skip position ping; no fresh position since boot\");\n                return false;\n            }\n            LOG_INFO(\"Send position ping to 0x%x, wantReplies=%d, channel=%d\", dest, wantReplies, node->channel);\n            positionModule->sendOurPosition(dest, wantReplies, node->channel);\n            return true;\n        }\n    } else {\n#endif\n        if (nodeInfoModule) {\n            LOG_INFO(\"Send nodeinfo ping to 0x%x, wantReplies=%d, channel=%d\", dest, wantReplies, node->channel);\n            nodeInfoModule->sendOurNodeInfo(dest, wantReplies, node->channel);\n        }\n    }\n    return false;\n}\n\nvoid MeshService::sendToPhone(meshtastic_MeshPacket *p)\n{\n    perhapsDecode(p);\n\n#ifdef ARCH_ESP32\n#if !MESHTASTIC_EXCLUDE_STOREFORWARD\n    if (moduleConfig.store_forward.enabled && storeForwardModule->isServer() &&\n        p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) {\n        releaseToPool(p); // Copy is already stored in StoreForward history\n        fromNum++;        // Notify observers for packet from radio\n        return;\n    }\n#endif\n#endif\n\n    if (toPhoneQueue.numFree() == 0) {\n        if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP ||\n            p->decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP) {\n            LOG_WARN(\"ToPhone queue is full, discard oldest\");\n            meshtastic_MeshPacket *d = toPhoneQueue.dequeuePtr(0);\n            if (d)\n                releaseToPool(d);\n        } else {\n            LOG_WARN(\"ToPhone queue is full, drop packet\");\n            releaseToPool(p);\n            fromNum++; // Make sure to notify observers in case they are reconnected so they can get the packets\n            return;\n        }\n    }\n\n    if (toPhoneQueue.enqueue(p, 0) == false) {\n        LOG_CRIT(\"Failed to queue a packet into toPhoneQueue!\");\n        abort();\n    }\n    fromNum++;\n}\n\nvoid MeshService::sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage *m)\n{\n    LOG_DEBUG(\"Send mqtt message on topic '%s' to client for proxy\", m->topic);\n    if (toPhoneMqttProxyQueue.numFree() == 0) {\n        LOG_WARN(\"MqttClientProxyMessagePool queue is full, discard oldest\");\n        meshtastic_MqttClientProxyMessage *d = toPhoneMqttProxyQueue.dequeuePtr(0);\n        if (d)\n            releaseMqttClientProxyMessageToPool(d);\n    }\n\n    if (toPhoneMqttProxyQueue.enqueue(m, 0) == false) {\n        LOG_CRIT(\"Failed to queue a packet into toPhoneMqttProxyQueue!\");\n        abort();\n    }\n    fromNum++;\n}\n\nvoid MeshService::sendRoutingErrorResponse(meshtastic_Routing_Error error, const meshtastic_MeshPacket *mp)\n{\n    if (!mp) {\n        LOG_WARN(\"Cannot send routing error response: null packet\");\n        return;\n    }\n\n    // Use the routing module to send the error response\n    if (routingModule) {\n        routingModule->sendAckNak(error, mp->from, mp->id, mp->channel);\n    } else {\n        LOG_ERROR(\"Cannot send routing error response: no routing module\");\n    }\n}\n\nvoid MeshService::sendClientNotification(meshtastic_ClientNotification *n)\n{\n    LOG_DEBUG(\"Send client notification to phone\");\n    if (toPhoneClientNotificationQueue.numFree() == 0) {\n        LOG_WARN(\"ClientNotification queue is full, discard oldest\");\n        meshtastic_ClientNotification *d = toPhoneClientNotificationQueue.dequeuePtr(0);\n        if (d)\n            releaseClientNotificationToPool(d);\n    }\n\n    if (toPhoneClientNotificationQueue.enqueue(n, 0) == false) {\n        LOG_CRIT(\"Failed to queue a notification into toPhoneClientNotificationQueue!\");\n        abort();\n    }\n    fromNum++;\n}\n\nmeshtastic_NodeInfoLite *MeshService::refreshLocalMeshNode()\n{\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    assert(node);\n\n    // We might not have a position yet for our local node, in that case, at least try to send the time\n    if (!node->has_position) {\n        memset(&node->position, 0, sizeof(node->position));\n        node->has_position = true;\n    }\n\n    meshtastic_PositionLite &position = node->position;\n\n    // Update our local node info with our time (even if we don't decide to update anyone else)\n    node->last_heard =\n        getValidTime(RTCQualityFromNet); // This nodedb timestamp might be stale, so update it if our clock is kinda valid\n\n    position.time = getValidTime(RTCQualityFromNet);\n\n    if (powerStatus->getHasBattery() == 1) {\n        updateBatteryLevel(powerStatus->getBatteryChargePercent());\n    }\n\n    return node;\n}\n\n#if HAS_GPS\nint MeshService::onGPSChanged(const meshtastic::GPSStatus *newStatus)\n{\n    // Update our local node info with our position (even if we don't decide to update anyone else)\n    const meshtastic_NodeInfoLite *node = refreshLocalMeshNode();\n    meshtastic_Position pos = meshtastic_Position_init_default;\n\n    if (newStatus->getHasLock()) {\n        // load data from GPS object, will add timestamp + battery further down\n        pos = gps->p;\n    } else {\n        // The GPS has lost lock\n#ifdef GPS_DEBUG\n        LOG_DEBUG(\"onGPSchanged() - lost validLocation\");\n#endif\n    }\n    // Used fixed position if configured regardless of GPS lock\n    if (config.position.fixed_position) {\n        LOG_WARN(\"Use fixed position\");\n        pos = TypeConversions::ConvertToPosition(node->position);\n    }\n\n    // Add a fresh timestamp\n    pos.time = getValidTime(RTCQualityFromNet);\n\n    // In debug logs, identify position by @timestamp:stage (stage 4 = nodeDB)\n    LOG_DEBUG(\"onGPSChanged() pos@%x time=%u lat=%d lon=%d alt=%d\", pos.timestamp, pos.time, pos.latitude_i, pos.longitude_i,\n              pos.altitude);\n\n    // Update our current position in the local DB\n    nodeDB->updatePosition(nodeDB->getNodeNum(), pos, RX_SRC_LOCAL);\n\n    return 0;\n}\n#endif\nbool MeshService::isToPhoneQueueEmpty()\n{\n    return toPhoneQueue.isEmpty();\n}\n\nuint32_t MeshService::GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp)\n{\n    uint32_t now = getTime();\n\n    uint32_t last_seen = mp->rx_time;\n    int delta = (int)(now - last_seen);\n    if (delta < 0) // our clock must be slightly off still - not set from GPS yet\n        delta = 0;\n\n    return delta;\n}\n"
  },
  {
    "path": "src/mesh/MeshService.h",
    "content": "#pragma once\n\n#include <Arduino.h>\n#include <assert.h>\n#include <string>\n\n#include \"GPSStatus.h\"\n#include \"MemoryPool.h\"\n#include \"MeshRadio.h\"\n#include \"MeshTypes.h\"\n#include \"Observer.h\"\n#ifdef ARCH_PORTDUINO\n#include \"PointerQueue.h\"\n#else\n#include \"StaticPointerQueue.h\"\n#endif\n#include \"mesh-pb-constants.h\"\n#if defined(ARCH_PORTDUINO)\n#include \"../platform/portduino/SimRadio.h\"\n#endif\n#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)\n#if !MESHTASTIC_EXCLUDE_STOREFORWARD\n#include \"modules/StoreForwardModule.h\"\n#endif\n#endif\n\nextern Allocator<meshtastic_QueueStatus> &queueStatusPool;\nextern Allocator<meshtastic_MqttClientProxyMessage> &mqttClientProxyMessagePool;\nextern Allocator<meshtastic_ClientNotification> &clientNotificationPool;\n\n/**\n * Top level app for this service.  keeps the mesh, the radio config and the queue of received packets.\n *\n */\nclass MeshService\n{\n#if HAS_GPS\n    CallbackObserver<MeshService, const meshtastic::GPSStatus *> gpsObserver =\n        CallbackObserver<MeshService, const meshtastic::GPSStatus *>(this, &MeshService::onGPSChanged);\n#endif\n    /// received packets waiting for the phone to process them\n    /// FIXME, change to a DropOldestQueue and keep a count of the number of dropped packets to ensure\n    /// we never hang because android hasn't been there in a while\n    /// FIXME - save this to flash on deep sleep\n#ifdef ARCH_PORTDUINO\n    PointerQueue<meshtastic_MeshPacket> toPhoneQueue;\n#else\n    StaticPointerQueue<meshtastic_MeshPacket, MAX_RX_TOPHONE> toPhoneQueue;\n#endif\n\n    // keep list of QueueStatus packets to be send to the phone\n#ifdef ARCH_PORTDUINO\n    PointerQueue<meshtastic_QueueStatus> toPhoneQueueStatusQueue;\n#else\n    StaticPointerQueue<meshtastic_QueueStatus, MAX_RX_QUEUESTATUS_TOPHONE> toPhoneQueueStatusQueue;\n#endif\n\n    // keep list of MqttClientProxyMessages to be send to the client for delivery\n#ifdef ARCH_PORTDUINO\n    PointerQueue<meshtastic_MqttClientProxyMessage> toPhoneMqttProxyQueue;\n#else\n    StaticPointerQueue<meshtastic_MqttClientProxyMessage, MAX_RX_MQTTPROXY_TOPHONE> toPhoneMqttProxyQueue;\n#endif\n\n    // keep list of ClientNotifications to be send to the client (phone)\n#ifdef ARCH_PORTDUINO\n    PointerQueue<meshtastic_ClientNotification> toPhoneClientNotificationQueue;\n#else\n    StaticPointerQueue<meshtastic_ClientNotification, MAX_RX_NOTIFICATION_TOPHONE> toPhoneClientNotificationQueue;\n#endif\n\n    // This holds the last QueueStatus send\n    meshtastic_QueueStatus lastQueueStatus;\n\n    /// The current nonce for the newest packet which has been queued for the phone\n    uint32_t fromNum = 0;\n\n    /// Updated in loop() to detect when fromNum changes\n    uint32_t oldFromNum = 0;\n\n  public:\n    enum APIState {\n        STATE_DISCONNECTED, // Initial state, no API is connected\n        STATE_BLE,\n        STATE_WIFI,\n        STATE_SERIAL,\n        STATE_PACKET,\n        STATE_HTTP,\n        STATE_ETH\n    };\n\n    APIState api_state = STATE_DISCONNECTED;\n\n    static bool isTextPayload(const meshtastic_MeshPacket *p)\n    {\n        if (moduleConfig.range_test.enabled && p->decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP) {\n            return true;\n        }\n        return p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP ||\n               p->decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP ||\n               p->decoded.portnum == meshtastic_PortNum_ALERT_APP;\n    }\n    /// Called when some new packets have arrived from one of the radios\n    Observable<uint32_t> fromNumChanged;\n\n    /// Called when radio config has changed (radios should observe this and set their hardware as required)\n    Observable<void *> configChanged;\n\n    MeshService();\n\n    void init();\n\n    /// Do idle processing (mostly processing messages which have been queued from the radio)\n    void loop();\n\n    /// Return the next packet destined to the phone.  FIXME, somehow use fromNum to allow the phone to retry the\n    /// last few packets if needs to.\n    meshtastic_MeshPacket *getForPhone() { return toPhoneQueue.dequeuePtr(0); }\n\n    /// Allows the bluetooth handler to free packets after they have been sent\n    void releaseToPool(meshtastic_MeshPacket *p) { packetPool.release(p); }\n\n    /// Return the next QueueStatus packet destined to the phone.\n    meshtastic_QueueStatus *getQueueStatusForPhone() { return toPhoneQueueStatusQueue.dequeuePtr(0); }\n\n    /// Return the next MqttClientProxyMessage packet destined to the phone.\n    meshtastic_MqttClientProxyMessage *getMqttClientProxyMessageForPhone() { return toPhoneMqttProxyQueue.dequeuePtr(0); }\n\n    /// Return the next ClientNotification packet destined to the phone.\n    meshtastic_ClientNotification *getClientNotificationForPhone() { return toPhoneClientNotificationQueue.dequeuePtr(0); }\n\n    // search the queue for a request id and return the matching nodenum\n    NodeNum getNodenumFromRequestId(uint32_t request_id);\n\n    // Release QueueStatus packet to pool\n    void releaseQueueStatusToPool(meshtastic_QueueStatus *p) { queueStatusPool.release(p); }\n\n    // Release MqttClientProxyMessage packet to pool\n    void releaseMqttClientProxyMessageToPool(meshtastic_MqttClientProxyMessage *p) { mqttClientProxyMessagePool.release(p); }\n\n    /// Release the next ClientNotification packet to pool.\n    void releaseClientNotificationToPool(meshtastic_ClientNotification *p) { clientNotificationPool.release(p); }\n\n    /**\n     *  Given a ToRadio buffer parse it and properly handle it (setup radio, owner or send packet into the mesh)\n     * Called by PhoneAPI.handleToRadio.  Note: p is a scratch buffer, this function is allowed to write to it but it can not keep\n     * a reference\n     */\n    void handleToRadio(meshtastic_MeshPacket &p);\n\n    /** The radioConfig object just changed, call this to force the hw to change to the new settings\n     * @return true if client devices should be sent a new set of radio configs\n     */\n    void reloadConfig(int saveWhat = SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS);\n\n    /// The owner User record just got updated, update our node DB and broadcast the info into the mesh\n    void reloadOwner(bool shouldSave = true);\n\n    /// Called when the user wakes up our GUI, normally sends our latest location to the mesh (if we have it), otherwise at least\n    /// sends our nodeinfo\n    /// returns true if we sent a position\n    bool trySendPosition(NodeNum dest, bool wantReplies = false);\n\n    /// Send a packet into the mesh - note p must have been allocated from packetPool.  We will return it to that pool after\n    /// sending. This is the ONLY function you should use for sending messages into the mesh, because it also updates the nodedb\n    /// cache\n    void sendToMesh(meshtastic_MeshPacket *p, RxSource src = RX_SRC_LOCAL, bool ccToPhone = false);\n\n    /** Attempt to cancel a previously sent packet from this _local_ node.  Returns true if a packet was found we could cancel */\n    bool cancelSending(PacketId id);\n\n    /// Pull the latest power and time info into my nodeinfo\n    meshtastic_NodeInfoLite *refreshLocalMeshNode();\n\n    /// Send a packet to the phone\n    void sendToPhone(meshtastic_MeshPacket *p);\n\n    /// Send an MQTT message to the phone for client proxying\n    virtual void sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage *m);\n\n    /// Send a ClientNotification to the phone\n    virtual void sendClientNotification(meshtastic_ClientNotification *cn);\n\n    /// Send an error response to the phone\n    void sendRoutingErrorResponse(meshtastic_Routing_Error error, const meshtastic_MeshPacket *mp);\n\n    bool isToPhoneQueueEmpty();\n\n    ErrorCode sendQueueStatusToPhone(const meshtastic_QueueStatus &qs, ErrorCode res, uint32_t mesh_packet_id);\n\n    uint32_t GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp);\n\n  private:\n#if HAS_GPS\n    /// Called when our gps position has changed - updates nodedb and sends Location message out into the mesh\n    /// returns 0 to allow further processing\n    int onGPSChanged(const meshtastic::GPSStatus *arg);\n#endif\n    /// Handle a packet that just arrived from the radio.  This method does _not_ free the provided packet.  If it\n    /// needs to keep the packet around it makes a copy\n    int handleFromRadio(const meshtastic_MeshPacket *p);\n    friend class RoutingModule;\n};\n\nextern MeshService *service;\n"
  },
  {
    "path": "src/mesh/MeshTypes.h",
    "content": "#pragma once\n\n// low level types\n\n#include \"MemoryPool.h\"\n#include \"mesh/mesh-pb-constants.h\"\n#include <Arduino.h>\n\ntypedef uint32_t NodeNum;\ntypedef uint32_t PacketId; // A packet sequence number\n\n#define NODENUM_BROADCAST UINT32_MAX\n#define NODENUM_BROADCAST_NO_LORA                                                                                                \\\n    1 // Reserved to only deliver packets over high speed (non-lora) transports, such as MQTT or BLE mesh (not yet implemented)\n#define ERRNO_OK 0\n#define ERRNO_NO_INTERFACES 33\n#define ERRNO_UNKNOWN 32                   // pick something that doesn't conflict with RH_ROUTER_ERROR_UNABLE_TO_DELIVER\n#define ERRNO_DISABLED 34                  // the interface is disabled\n#define ERRNO_SHOULD_RELEASE 35            // no error, but the packet should still be released\n#define ID_COUNTER_MASK (UINT32_MAX >> 22) // mask to select the counter portion of the ID\n\n/*\n * Source of a received message\n */\nenum RxSource {\n    RX_SRC_LOCAL, // message was generated locally\n    RX_SRC_RADIO, // message was received from radio mesh\n    RX_SRC_USER   // message was received from end-user device\n};\n\n/**\n * the max number of hops a message can pass through, used as the default max for hop_limit in MeshPacket.\n *\n * We reserve 3 bits in the header so this could be up to 7, but given the high range of lora and typical usecases, keeping\n * maxhops to 3 should be fine for a while.  This also serves to prevent routing/flooding attempts to be attempted for\n * too long.\n **/\n#define HOP_MAX 7\n\n/// We normally just use max 3 hops for sending reliable messages\n#define HOP_RELIABLE 3\n\n// For old firmware or when falling back to flooding, there is no next-hop preference\n#define NO_NEXT_HOP_PREFERENCE 0\n// For old firmware there is no relay node set\n#define NO_RELAY_NODE 0\n\ntypedef int ErrorCode;\n\n/// Alloc and free packets to our global, ISR safe pool\nextern Allocator<meshtastic_MeshPacket> &packetPool;\nusing UniquePacketPoolPacket = Allocator<meshtastic_MeshPacket>::UniqueAllocation;\n\n/**\n * Most (but not always) of the time we want to treat packets 'from' the local phone (where from == 0), as if they originated on\n * the local node. If from is zero this function returns our node number instead\n */\nNodeNum getFrom(const meshtastic_MeshPacket *p);\n\n// Returns true if the packet originated from the local node\nbool isFromUs(const meshtastic_MeshPacket *p);\n\n// Returns true if the packet is destined to us\nbool isToUs(const meshtastic_MeshPacket *p);\n\n/* Some clients might not properly set priority, therefore we fix it here. */\nvoid fixPriority(meshtastic_MeshPacket *p);\n\nbool isBroadcast(uint32_t dest);"
  },
  {
    "path": "src/mesh/NextHopRouter.cpp",
    "content": "#include \"NextHopRouter.h\"\n#include \"MeshTypes.h\"\n#include \"meshUtils.h\"\n#if !MESHTASTIC_EXCLUDE_TRACEROUTE\n#include \"modules/TraceRouteModule.h\"\n#endif\n#if HAS_TRAFFIC_MANAGEMENT\n#include \"modules/TrafficManagementModule.h\"\n#endif\n#include \"NodeDB.h\"\n\nNextHopRouter::NextHopRouter() {}\n\nPendingPacket::PendingPacket(meshtastic_MeshPacket *p, uint8_t numRetransmissions)\n{\n    packet = p;\n    this->numRetransmissions = numRetransmissions - 1; // We subtract one, because we assume the user just did the first send\n}\n\n/**\n * Send a packet\n */\nErrorCode NextHopRouter::send(meshtastic_MeshPacket *p)\n{\n    // Add any messages _we_ send to the seen message list (so we will ignore all retransmissions we see)\n    p->relay_node = nodeDB->getLastByteOfNodeNum(getNodeNum()); // First set the relayer to us\n    wasSeenRecently(p);                                         // FIXME, move this to a sniffSent method\n\n    p->next_hop = getNextHop(p->to, p->relay_node).value_or(NO_NEXT_HOP_PREFERENCE); // set the next hop\n    LOG_DEBUG(\"Setting next hop for packet with dest %x to %x\", p->to, p->next_hop);\n\n    // If it's from us, ReliableRouter already handles retransmissions if want_ack is set. If a next hop is set and hop limit is\n    // not 0 or want_ack is set, start retransmissions\n    if ((!isFromUs(p) || !p->want_ack) && p->next_hop != NO_NEXT_HOP_PREFERENCE && (p->hop_limit > 0 || p->want_ack))\n        startRetransmission(packetPool.allocCopy(*p)); // start retransmission for relayed packet\n\n    return Router::send(p);\n}\n\nbool NextHopRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)\n{\n    bool wasFallback = false;\n    bool weWereNextHop = false;\n    bool wasUpgraded = false;\n    bool seenRecently = wasSeenRecently(p, true, &wasFallback, &weWereNextHop,\n                                        &wasUpgraded); // Updates history; returns false when an upgrade is detected\n\n    // Handle hop_limit upgrade scenario for rebroadcasters\n    if (wasUpgraded && perhapsHandleUpgradedPacket(p)) {\n        return true; // we handled it, so stop processing\n    }\n\n    if (seenRecently) {\n        printPacket(\"Ignore dupe incoming msg\", p);\n\n        if (p->transport_mechanism == meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA) {\n            rxDupe++;\n            stopRetransmission(p->from, p->id);\n        }\n\n        // If it was a fallback to flooding, try to relay again\n        if (wasFallback) {\n            LOG_INFO(\"Fallback to flooding from relay_node=0x%x\", p->relay_node);\n            // Check if it's still in the Tx queue, if not, we have to relay it again\n            if (!findInTxQueue(p->from, p->id)) {\n                reprocessPacket(p);\n                perhapsRebroadcast(p);\n            }\n        } else {\n            bool isRepeated = getHopsAway(*p) == 0;\n            // If repeated and not in Tx queue anymore, try relaying again, or if we are the destination, send the ACK again\n            if (isRepeated) {\n                if (!findInTxQueue(p->from, p->id)) {\n                    reprocessPacket(p);\n                    if (!perhapsRebroadcast(p) && isToUs(p) && p->want_ack) {\n                        sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel, 0);\n                    }\n                }\n            } else if (!weWereNextHop) {\n                perhapsCancelDupe(p); // If it's a dupe, cancel relay if we were not explicitly asked to relay\n            }\n        }\n        return true;\n    }\n\n    return Router::shouldFilterReceived(p);\n}\n\nvoid NextHopRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)\n{\n    NodeNum ourNodeNum = getNodeNum();\n    uint8_t ourRelayID = nodeDB->getLastByteOfNodeNum(ourNodeNum);\n    bool isAckorReply = (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) &&\n                        (p->decoded.request_id != 0 || p->decoded.reply_id != 0);\n    if (isAckorReply) {\n        // Update next-hop for the original transmitter of this successful transmission to the relay node, but ONLY if \"from\"\n        // is not 0 (means implicit ACK) and original packet was also relayed by this node, or we sent it directly to the\n        // destination\n        if (p->from != 0) {\n            meshtastic_NodeInfoLite *origTx = nodeDB->getMeshNode(p->from);\n            if (origTx) {\n                // Either relayer of ACK was also a relayer of the packet, or we were the *only* relayer and the ACK came\n                // directly from the destination\n                bool wasAlreadyRelayer = wasRelayer(p->relay_node, p->decoded.request_id, p->to);\n                bool weWereSoleRelayer = false;\n                bool weWereRelayer = wasRelayer(ourRelayID, p->decoded.request_id, p->to, &weWereSoleRelayer);\n                if ((weWereRelayer && wasAlreadyRelayer) || (getHopsAway(*p) == 0 && weWereSoleRelayer)) {\n                    if (origTx->next_hop != p->relay_node) { // Not already set\n                        LOG_INFO(\"Update next hop of 0x%x to 0x%x based on ACK/reply (was relayer %d we were sole %d)\", p->from,\n                                 p->relay_node, wasAlreadyRelayer, weWereSoleRelayer);\n                        origTx->next_hop = p->relay_node;\n                    }\n                }\n            }\n        }\n        if (!isToUs(p)) {\n            Router::cancelSending(p->to, p->decoded.request_id); // cancel rebroadcast for this DM\n            // stop retransmission for the original packet\n            stopRetransmission(p->to, p->decoded.request_id); // for original packet, from = to and id = request_id\n        }\n    }\n\n    perhapsRebroadcast(p);\n\n    // handle the packet as normal\n    Router::sniffReceived(p, c);\n}\n\n/* Check if we should be rebroadcasting this packet if so, do so. */\nbool NextHopRouter::perhapsRebroadcast(const meshtastic_MeshPacket *p)\n{\n    // Check if traffic management wants to exhaust this packet's hops\n    bool exhaustHops = false;\n#if HAS_TRAFFIC_MANAGEMENT\n    if (trafficManagementModule && trafficManagementModule->shouldExhaustHops(*p)) {\n        exhaustHops = true;\n    }\n#endif\n\n    // Allow rebroadcast if hop_limit > 0 OR if we're exhausting hops (which sets hop_limit = 0 but still needs one relay)\n    if (!isToUs(p) && !isFromUs(p) && (p->hop_limit > 0 || exhaustHops)) {\n        if (p->id != 0) {\n            if (isRebroadcaster()) {\n                if (p->next_hop == NO_NEXT_HOP_PREFERENCE || p->next_hop == nodeDB->getLastByteOfNodeNum(getNodeNum())) {\n                    meshtastic_MeshPacket *tosend = packetPool.allocCopy(*p); // keep a copy because we will be sending it\n                    LOG_INFO(\"Rebroadcast received message coming from %x\", p->relay_node);\n\n                    // If exhausting hops, force hop_limit = 0 regardless of other logic\n                    if (exhaustHops) {\n                        tosend->hop_limit = 0;\n                        LOG_INFO(\"Traffic management: exhausting hops for 0x%08x, setting hop_limit=0\", getFrom(p));\n                    } else if (shouldDecrementHopLimit(p)) {\n                        // Use shared logic to determine if hop_limit should be decremented\n                        tosend->hop_limit--; // bump down the hop count\n                    } else {\n                        LOG_INFO(\"favorite-ROUTER/CLIENT_BASE-to-ROUTER/CLIENT_BASE rebroadcast: preserving hop_limit\");\n                    }\n#if USERPREFS_EVENT_MODE\n                    if (tosend->hop_limit > 2) {\n                        // if we are \"correcting\" the hop_limit, \"correct\" the hop_start by the same amount to preserve hops away.\n                        tosend->hop_start -= (tosend->hop_limit - 2);\n                        tosend->hop_limit = 2;\n                    }\n#endif\n\n                    if (p->next_hop == NO_NEXT_HOP_PREFERENCE) {\n                        FloodingRouter::send(tosend);\n                    } else {\n                        NextHopRouter::send(tosend);\n                    }\n\n                    return true;\n                }\n            } else {\n                LOG_DEBUG(\"No rebroadcast: Role = CLIENT_MUTE or Rebroadcast Mode = NONE\");\n            }\n        } else {\n            LOG_DEBUG(\"Ignore 0 id broadcast\");\n        }\n    }\n\n    return false;\n}\n\n/**\n * Get the next hop for a destination, given the relay node\n * @return the node number of the next hop, 0 if no preference (fallback to FloodingRouter)\n */\nstd::optional<uint8_t> NextHopRouter::getNextHop(NodeNum to, uint8_t relay_node)\n{\n    if (isBroadcast(to))\n        return std::nullopt;\n\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(to);\n    if (node && node->next_hop) {\n        // We are careful not to return the relay node as the next hop\n        if (node->next_hop != relay_node) {\n            // LOG_DEBUG(\"Next hop for 0x%x is 0x%x\", to, node->next_hop);\n            return node->next_hop;\n        } else\n            LOG_WARN(\"Next hop for 0x%x is 0x%x, same as relayer; set no pref\", to, node->next_hop);\n    }\n    return std::nullopt;\n}\n\nPendingPacket *NextHopRouter::findPendingPacket(GlobalPacketId key)\n{\n    auto old = pending.find(key); // If we have an old record, someone messed up because id got reused\n    if (old != pending.end()) {\n        return &old->second;\n    } else\n        return NULL;\n}\n\n/**\n * Stop any retransmissions we are doing of the specified node/packet ID pair\n */\nbool NextHopRouter::stopRetransmission(NodeNum from, PacketId id)\n{\n    auto key = GlobalPacketId(from, id);\n    return stopRetransmission(key);\n}\n\nbool NextHopRouter::roleAllowsCancelingFromTxQueue(const meshtastic_MeshPacket *p)\n{\n    // Return true if we're allowed to cancel a packet in the txQueue (so we may never transmit it even once)\n\n    // Return false for roles like ROUTER, ROUTER_LATE which should always transmit the packet at least once.\n\n    return roleAllowsCancelingDupe(p); // same logic as FloodingRouter::roleAllowsCancelingDupe\n}\n\nbool NextHopRouter::stopRetransmission(GlobalPacketId key)\n{\n    auto old = findPendingPacket(key);\n    if (old) {\n        auto p = old->packet;\n        /* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue\n          to avoid canceling a transmission if it was ACKed super fast via MQTT */\n        if (old->numRetransmissions < NUM_RELIABLE_RETX - 1) {\n            // We only cancel it if we are the original sender or if we're not a router(_late)\n            if (isFromUs(p) || roleAllowsCancelingFromTxQueue(p)) {\n                // remove the 'original' (identified by originator and packet->id) from the txqueue and free it\n                cancelSending(getFrom(p), p->id);\n            }\n        }\n\n        // Regardless of whether or not we canceled this packet from the txQueue, remove it from our pending list so it\n        // doesn't get scheduled again. (This is the core of stopRetransmission.)\n        auto numErased = pending.erase(key);\n        assert(numErased == 1);\n\n        // When we remove an entry from pending, always be sure to release the copy of the packet that was allocated in the\n        // call to startRetransmission.\n        packetPool.release(p);\n\n        return true;\n    } else\n        return false;\n}\n\n/**\n * Add p to the list of packets to retransmit occasionally.  We will free it once we stop retransmitting.\n */\nPendingPacket *NextHopRouter::startRetransmission(meshtastic_MeshPacket *p, uint8_t numReTx)\n{\n    auto id = GlobalPacketId(p);\n    auto rec = PendingPacket(p, numReTx);\n\n    stopRetransmission(getFrom(p), p->id);\n\n    setNextTx(&rec);\n    pending[id] = rec;\n\n    return &pending[id];\n}\n\n/**\n * Do any retransmissions that are scheduled (FIXME - for the time being called from loop)\n */\nint32_t NextHopRouter::doRetransmissions()\n{\n    uint32_t now = millis();\n    int32_t d = INT32_MAX;\n\n    // FIXME, we should use a better datastructure rather than walking through this map.\n    // for(auto el: pending) {\n    for (auto it = pending.begin(), nextIt = it; it != pending.end(); it = nextIt) {\n        ++nextIt; // we use this odd pattern because we might be deleting it...\n        auto &p = it->second;\n\n        bool stillValid = true; // assume we'll keep this record around\n\n        // FIXME, handle 51 day rolloever here!!!\n        if (p.nextTxMsec <= now) {\n            if (p.numRetransmissions == 0) {\n                if (isFromUs(p.packet)) {\n                    LOG_DEBUG(\"Reliable send failed, returning a nak for fr=0x%x,to=0x%x,id=0x%x\", p.packet->from, p.packet->to,\n                              p.packet->id);\n                    sendAckNak(meshtastic_Routing_Error_MAX_RETRANSMIT, getFrom(p.packet), p.packet->id, p.packet->channel);\n                }\n                // Note: we don't stop retransmission here, instead the Nak packet gets processed in sniffReceived\n                stopRetransmission(it->first);\n                stillValid = false; // just deleted it\n            } else {\n                LOG_DEBUG(\"Sending retransmission fr=0x%x,to=0x%x,id=0x%x, tries left=%d\", p.packet->from, p.packet->to,\n                          p.packet->id, p.numRetransmissions);\n\n                if (!isBroadcast(p.packet->to)) {\n                    if (p.numRetransmissions == 1) {\n                        // Last retransmission, reset next_hop (fallback to FloodingRouter)\n                        p.packet->next_hop = NO_NEXT_HOP_PREFERENCE;\n                        // Also reset it in the nodeDB\n                        meshtastic_NodeInfoLite *sentTo = nodeDB->getMeshNode(p.packet->to);\n                        if (sentTo) {\n                            LOG_INFO(\"Resetting next hop for packet with dest 0x%x\\n\", p.packet->to);\n                            sentTo->next_hop = NO_NEXT_HOP_PREFERENCE;\n                        }\n                        FloodingRouter::send(packetPool.allocCopy(*p.packet));\n                    } else {\n                        NextHopRouter::send(packetPool.allocCopy(*p.packet));\n                    }\n                } else {\n                    // Note: we call the superclass version because we don't want to have our version of send() add a new\n                    // retransmission record\n                    FloodingRouter::send(packetPool.allocCopy(*p.packet));\n                }\n\n                // Queue again\n                --p.numRetransmissions;\n                setNextTx(&p);\n            }\n        }\n\n        if (stillValid) {\n            // Update our desired sleep delay\n            int32_t t = p.nextTxMsec - now;\n\n            d = min(t, d);\n        }\n    }\n\n    return d;\n}\n\nvoid NextHopRouter::setNextTx(PendingPacket *pending)\n{\n    assert(iface);\n    auto d = iface->getRetransmissionMsec(pending->packet);\n    pending->nextTxMsec = millis() + d;\n    LOG_DEBUG(\"Setting next retransmission in %u msecs: \", d);\n    printPacket(\"\", pending->packet);\n    setReceivedMessage(); // Run ASAP, so we can figure out our correct sleep time\n}\n"
  },
  {
    "path": "src/mesh/NextHopRouter.h",
    "content": "#pragma once\n\n#include \"FloodingRouter.h\"\n#include <optional>\n#include <unordered_map>\n\n/**\n * An identifier for a globally unique message - a pair of the sending nodenum and the packet id assigned\n * to that message\n */\nstruct GlobalPacketId {\n    NodeNum node;\n    PacketId id;\n\n    bool operator==(const GlobalPacketId &p) const { return node == p.node && id == p.id; }\n\n    explicit GlobalPacketId(const meshtastic_MeshPacket *p)\n    {\n        node = getFrom(p);\n        id = p->id;\n    }\n\n    GlobalPacketId(NodeNum _from, PacketId _id)\n    {\n        node = _from;\n        id = _id;\n    }\n};\n\n/**\n * A packet queued for retransmission\n */\nstruct PendingPacket {\n    meshtastic_MeshPacket *packet;\n\n    /** The next time we should try to retransmit this packet */\n    uint32_t nextTxMsec = 0;\n\n    /** Starts at NUM_RETRANSMISSIONS -1 and counts down.  Once zero it will be removed from the list */\n    uint8_t numRetransmissions = 0;\n\n    PendingPacket() {}\n    explicit PendingPacket(meshtastic_MeshPacket *p, uint8_t numRetransmissions);\n};\n\nclass GlobalPacketIdHashFunction\n{\n  public:\n    size_t operator()(const GlobalPacketId &p) const { return (std::hash<NodeNum>()(p.node)) ^ (std::hash<PacketId>()(p.id)); }\n};\n\n/*\n  Router for direct messages, which only relays if it is the next hop for a packet. The next hop is set by the current\n  relayer of a packet, which bases this on information from a previous successful delivery to the destination via flooding.\n  Namely, in the PacketHistory, we keep track of (up to 3) relayers of a packet. When the ACK is delivered back to us via a node\n  that also relayed the original packet, we use that node as next hop for the destination from then on. This makes sure that only\n  when there’s a two-way connection, we assign a next hop. Both the ReliableRouter and NextHopRouter will do retransmissions (the\n  NextHopRouter only 1 time). For the final retry, if no one actually relayed the packet, it will reset the next hop in order to\n  fall back to the FloodingRouter again. Note that thus also intermediate hops will do a single retransmission if the intended\n  next-hop didn’t relay, in order to fix changes in the middle of the route.\n*/\nclass NextHopRouter : public FloodingRouter\n{\n  public:\n    /**\n     * Constructor\n     *\n     */\n    NextHopRouter();\n\n    /**\n     * Send a packet\n     * @return an error code\n     */\n    virtual ErrorCode send(meshtastic_MeshPacket *p) override;\n\n    /** Do our retransmission handling */\n    virtual int32_t runOnce() override\n    {\n        // Note: We must doRetransmissions FIRST, because it might queue up work for the base class runOnce implementation\n        doRetransmissions();\n\n        int32_t r = FloodingRouter::runOnce();\n\n        // Also after calling runOnce there might be new packets to retransmit\n        auto d = doRetransmissions();\n        return min(d, r);\n    }\n\n    // The number of retransmissions intermediate nodes will do (actually 1 less than this)\n    constexpr static uint8_t NUM_INTERMEDIATE_RETX = 2;\n    // The number of retransmissions the original sender will do\n    constexpr static uint8_t NUM_RELIABLE_RETX = 3;\n\n  protected:\n    /**\n     * Pending retransmissions\n     */\n    std::unordered_map<GlobalPacketId, PendingPacket, GlobalPacketIdHashFunction> pending;\n\n    /**\n     * Should this incoming filter be dropped?\n     *\n     * Called immediately on reception, before any further processing.\n     * @return true to abandon the packet\n     */\n    virtual bool shouldFilterReceived(const meshtastic_MeshPacket *p) override;\n\n    /**\n     * Look for packets we need to relay\n     */\n    virtual void sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) override;\n\n    /**\n     * Try to find the pending packet record for this ID (or NULL if not found)\n     */\n    PendingPacket *findPendingPacket(NodeNum from, PacketId id) { return findPendingPacket(GlobalPacketId(from, id)); }\n    PendingPacket *findPendingPacket(GlobalPacketId p);\n\n    /**\n     * Add p to the list of packets to retransmit occasionally.  We will free it once we stop retransmitting.\n     */\n    PendingPacket *startRetransmission(meshtastic_MeshPacket *p, uint8_t numReTx = NUM_INTERMEDIATE_RETX);\n\n    // Return true if we're allowed to cancel a packet in the txQueue (so we may never transmit it even once)\n    bool roleAllowsCancelingFromTxQueue(const meshtastic_MeshPacket *p);\n\n    /**\n     * Stop any retransmissions we are doing of the specified node/packet ID pair\n     *\n     * @return true if we found and removed a transmission with this ID\n     */\n    bool stopRetransmission(NodeNum from, PacketId id);\n    bool stopRetransmission(GlobalPacketId p);\n\n    /**\n     * Do any retransmissions that are scheduled (FIXME - for the time being called from loop)\n     *\n     * @return the number of msecs until our next retransmission or MAXINT if none scheduled\n     */\n    int32_t doRetransmissions();\n\n    void setNextTx(PendingPacket *pending);\n\n  private:\n    /**\n     * Get the next hop for a destination, given the relay node\n     * @return the node number of the next hop, 0 if no preference (fallback to FloodingRouter)\n     */\n    std::optional<uint8_t> getNextHop(NodeNum to, uint8_t relay_node);\n\n    /** Check if we should be rebroadcasting this packet if so, do so.\n     *  @return true if we did rebroadcast */\n    bool perhapsRebroadcast(const meshtastic_MeshPacket *p) override;\n};"
  },
  {
    "path": "src/mesh/NodeDB.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n#include \"../detect/ScanI2C.h\"\n#include \"Channels.h\"\n#include \"CryptoEngine.h\"\n#include \"Default.h\"\n#include \"FSCommon.h\"\n#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PacketHistory.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"RadioInterface.h\"\n#include \"Router.h\"\n#include \"SPILock.h\"\n#include \"SafeFile.h\"\n#include \"TypeConversions.h\"\n#include \"error.h\"\n#include \"main.h\"\n#include \"mesh-pb-constants.h\"\n#include \"meshUtils.h\"\n#include \"modules/NeighborInfoModule.h\"\n#include <ErriezCRC32.h>\n#include <algorithm>\n#include <pb_decode.h>\n#include <pb_encode.h>\n#include <power/PowerHAL.h>\n#include <vector>\n\n#ifdef ARCH_ESP32\n#if HAS_WIFI\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n#include \"SPILock.h\"\n#include \"modules/StoreForwardModule.h\"\n#include <Preferences.h>\n#include <esp_efuse.h>\n#include <esp_efuse_table.h>\n#include <nvs_flash.h>\n#include <soc/efuse_reg.h>\n#include <soc/soc.h>\n#endif\n\n#ifdef ARCH_PORTDUINO\n#include \"modules/StoreForwardModule.h\"\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n\n#ifdef ARCH_NRF52\n#include <bluefruit.h>\n#include <utility/bonding.h>\n#endif\n\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WIFI\n#include <MeshtasticOTA.h>\n#endif\n\nNodeDB *nodeDB = nullptr;\n\n// we have plenty of ram so statically alloc this tempbuf (for now)\nEXT_RAM_BSS_ATTR meshtastic_DeviceState devicestate;\nmeshtastic_MyNodeInfo &myNodeInfo = devicestate.my_node;\nmeshtastic_NodeDatabase nodeDatabase;\nmeshtastic_LocalConfig config;\nmeshtastic_DeviceUIConfig uiconfig{.screen_brightness = 153, .screen_timeout = 30};\nmeshtastic_LocalModuleConfig moduleConfig;\nmeshtastic_ChannelFile channelFile;\n\n#ifdef USERPREFS_USE_ADMIN_KEY_0\nstatic unsigned char userprefs_admin_key_0[] = USERPREFS_USE_ADMIN_KEY_0;\n#endif\n#ifdef USERPREFS_USE_ADMIN_KEY_1\nstatic unsigned char userprefs_admin_key_1[] = USERPREFS_USE_ADMIN_KEY_1;\n#endif\n#ifdef USERPREFS_USE_ADMIN_KEY_2\nstatic unsigned char userprefs_admin_key_2[] = USERPREFS_USE_ADMIN_KEY_2;\n#endif\n\n#ifdef HELTEC_MESH_NODE_T114\n\nuint32_t read8(uint8_t bits, uint8_t dummy, uint8_t cs, uint8_t sck, uint8_t mosi, uint8_t dc, uint8_t rst)\n{\n    uint32_t ret = 0;\n    uint8_t SDAPIN = mosi;\n    pinMode(SDAPIN, INPUT_PULLUP);\n    digitalWrite(dc, HIGH);\n    for (int i = 0; i < dummy; i++) { // any dummy clocks\n        digitalWrite(sck, HIGH);\n        delay(1);\n        digitalWrite(sck, LOW);\n        delay(1);\n    }\n    for (int i = 0; i < bits; i++) { // read results\n        ret <<= 1;\n        delay(1);\n        if (digitalRead(SDAPIN))\n            ret |= 1;\n        ;\n        digitalWrite(sck, HIGH);\n        delay(1);\n        digitalWrite(sck, LOW);\n    }\n    return ret;\n}\n\nvoid write9(uint8_t val, uint8_t dc_val, uint8_t cs, uint8_t sck, uint8_t mosi, uint8_t dc, uint8_t rst)\n{\n    pinMode(mosi, OUTPUT);\n    digitalWrite(dc, dc_val);\n    for (int i = 0; i < 8; i++) { // send command\n        digitalWrite(mosi, (val & 0x80) != 0);\n        delay(1);\n        digitalWrite(sck, HIGH);\n        delay(1);\n        digitalWrite(sck, LOW);\n        val <<= 1;\n    }\n}\n\nuint32_t readwrite8(uint8_t cmd, uint8_t bits, uint8_t dummy, uint8_t cs, uint8_t sck, uint8_t mosi, uint8_t dc, uint8_t rst)\n{\n    digitalWrite(cs, LOW);\n    write9(cmd, 0, cs, sck, mosi, dc, rst);\n    uint32_t ret = read8(bits, dummy, cs, sck, mosi, dc, rst);\n    digitalWrite(cs, HIGH);\n    return ret;\n}\n\nuint32_t get_st7789_id(uint8_t cs, uint8_t sck, uint8_t mosi, uint8_t dc, uint8_t rst)\n{\n    pinMode(cs, OUTPUT);\n    digitalWrite(cs, HIGH);\n    pinMode(cs, OUTPUT);\n    pinMode(sck, OUTPUT);\n    pinMode(mosi, OUTPUT);\n    pinMode(dc, OUTPUT);\n    pinMode(rst, OUTPUT);\n    digitalWrite(rst, LOW); // Hardware Reset\n    delay(10);\n    digitalWrite(rst, HIGH);\n    delay(10);\n\n    readwrite8(0x04, 24, 1, cs, sck, mosi, dc, rst);\n    uint32_t ID = readwrite8(0x04, 24, 1, cs, sck, mosi, dc, rst); // ST7789 needs twice\n    return ID;\n}\n\n#endif\n\nbool meshtastic_NodeDatabase_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field)\n{\n    if (ostream) {\n        std::vector<meshtastic_NodeInfoLite> const *vec = (std::vector<meshtastic_NodeInfoLite> *)field->pData;\n        for (auto item : *vec) {\n            if (!pb_encode_tag_for_field(ostream, field))\n                return false;\n            pb_encode_submessage(ostream, meshtastic_NodeInfoLite_fields, &item);\n        }\n    }\n    if (istream) {\n        meshtastic_NodeInfoLite node; // this gets good data\n        std::vector<meshtastic_NodeInfoLite> *vec = (std::vector<meshtastic_NodeInfoLite> *)field->pData;\n\n        if (istream->bytes_left && pb_decode(istream, meshtastic_NodeInfoLite_fields, &node))\n            vec->push_back(node);\n    }\n    return true;\n}\n\n/** The current change # for radio settings.  Starts at 0 on boot and any time the radio settings\n * might have changed is incremented.  Allows others to detect they might now be on a new channel.\n */\nuint32_t radioGeneration;\n\n// FIXME - move this somewhere else\nextern void getMacAddr(uint8_t *dmac);\n\n/**\n *\n * Normally userids are unique and start with +country code to look like Signal phone numbers.\n * But there are some special ids used when we haven't yet been configured by a user.  In that case\n * we use !macaddr (no colons).\n */\nmeshtastic_User &owner = devicestate.owner;\nmeshtastic_Position localPosition = meshtastic_Position_init_default;\nmeshtastic_CriticalErrorCode error_code =\n    meshtastic_CriticalErrorCode_NONE; // For the error code, only show values from this boot (discard value from flash)\nuint32_t error_address = 0;\n\nstatic uint8_t ourMacAddr[6];\n\nNodeDB::NodeDB()\n{\n    LOG_INFO(\"Init NodeDB\");\n    loadFromDisk();\n    cleanupMeshDB();\n\n    uint32_t devicestateCRC = crc32Buffer(&devicestate, sizeof(devicestate));\n    uint32_t nodeDatabaseCRC = crc32Buffer(&nodeDatabase, sizeof(nodeDatabase));\n    uint32_t configCRC = crc32Buffer(&config, sizeof(config));\n    uint32_t channelFileCRC = crc32Buffer(&channelFile, sizeof(channelFile));\n\n    int saveWhat = 0;\n    // Get device unique id\n#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C6)\n    uint32_t unique_id[4];\n    // ESP32 factory burns a unique id in efuse for S2+ series and evidently C3+ series\n    // This is used for HMACs in the esp-rainmaker AIOT platform and seems to be a good choice for us\n    esp_err_t err = esp_efuse_read_field_blob(ESP_EFUSE_OPTIONAL_UNIQUE_ID, unique_id, sizeof(unique_id) * 8);\n    if (err == ESP_OK) {\n        memcpy(myNodeInfo.device_id.bytes, unique_id, sizeof(unique_id));\n        myNodeInfo.device_id.size = 16;\n    } else {\n        LOG_WARN(\"Failed to read unique id from efuse\");\n    }\n#elif defined(ARCH_NRF52)\n    // Nordic applies a FIPS compliant Random ID to each chip at the factory\n    // We concatenate the device address to the Random ID to create a unique ID for now\n    // This will likely utilize a crypto module in the future\n    uint64_t device_id_start = ((uint64_t)NRF_FICR->DEVICEID[1] << 32) | NRF_FICR->DEVICEID[0];\n    uint64_t device_id_end = ((uint64_t)NRF_FICR->DEVICEADDR[1] << 32) | NRF_FICR->DEVICEADDR[0];\n    memcpy(myNodeInfo.device_id.bytes, &device_id_start, sizeof(device_id_start));\n    memcpy(myNodeInfo.device_id.bytes + sizeof(device_id_start), &device_id_end, sizeof(device_id_end));\n    myNodeInfo.device_id.size = 16;\n    // Uncomment below to print the device id\n#elif ARCH_PORTDUINO\n    if (portduino_config.has_device_id) {\n        memcpy(myNodeInfo.device_id.bytes, portduino_config.device_id, 16);\n        myNodeInfo.device_id.size = 16;\n    }\n#else\n    // FIXME - implement for other platforms\n#endif\n\n    // if (myNodeInfo.device_id.size == 16) {\n    //     std::string deviceIdHex;\n    //     for (size_t i = 0; i < myNodeInfo.device_id.size; ++i) {\n    //         char buf[3];\n    //         snprintf(buf, sizeof(buf), \"%02X\", myNodeInfo.device_id.bytes[i]);\n    //         deviceIdHex += buf;\n    //     }\n    //     LOG_DEBUG(\"Device ID (HEX): %s\", deviceIdHex.c_str());\n    // }\n\n    // likewise - we always want the app requirements to come from the running appload\n    myNodeInfo.min_app_version = 30200; // format is Mmmss (where M is 1+the numeric major number. i.e. 30200 means 2.2.00\n    // Note! We do this after loading saved settings, so that if somehow an invalid nodenum was stored in preferences we won't\n    // keep using that nodenum forever. Crummy guess at our nodenum (but we will check against the nodedb to avoid conflicts)\n    pickNewNodeNum();\n\n    // Set our board type so we can share it with others\n    owner.hw_model = HW_VENDOR;\n    // Ensure user (nodeinfo) role is set to whatever we're configured to\n    owner.role = config.device.role;\n    // Ensure macaddr is set to our macaddr as it will be copied in our info below\n    memcpy(owner.macaddr, ourMacAddr, sizeof(owner.macaddr));\n    // Ensure owner.id is always derived from the node number\n    snprintf(owner.id, sizeof(owner.id), \"!%08x\", getNodeNum());\n\n    if (!config.has_security) {\n        config.has_security = true;\n        config.security = meshtastic_Config_SecurityConfig_init_default;\n        config.security.serial_enabled = config.device.serial_enabled;\n        config.security.is_managed = config.device.is_managed;\n    }\n\n#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI)\n\n    if (!owner.is_licensed && config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n        bool keygenSuccess = false;\n        keyIsLowEntropy = checkLowEntropyPublicKey(config.security.public_key);\n        if (config.security.private_key.size == 32 && !keyIsLowEntropy) {\n            if (crypto->regeneratePublicKey(config.security.public_key.bytes, config.security.private_key.bytes)) {\n                keygenSuccess = true;\n            }\n        } else {\n            crypto->generateKeyPair(config.security.public_key.bytes, config.security.private_key.bytes);\n            keygenSuccess = true;\n        }\n        if (keygenSuccess) {\n            config.security.public_key.size = 32;\n            config.security.private_key.size = 32;\n            owner.public_key.size = 32;\n            memcpy(owner.public_key.bytes, config.security.public_key.bytes, 32);\n        }\n    }\n#elif !(MESHTASTIC_EXCLUDE_PKI)\n    // Calculate Curve25519 public and private keys\n    if (config.security.private_key.size == 32 && config.security.public_key.size == 32) {\n        owner.public_key.size = config.security.public_key.size;\n        memcpy(owner.public_key.bytes, config.security.public_key.bytes, config.security.public_key.size);\n        crypto->setDHPrivateKey(config.security.private_key.bytes);\n    }\n#endif\n    // Include our owner in the node db under our nodenum\n    meshtastic_NodeInfoLite *info = getOrCreateMeshNode(getNodeNum());\n    info->user = TypeConversions::ConvertToUserLite(owner);\n    info->has_user = true;\n\n    // If node database has not been saved for the first time, save it now\n#ifdef FSCom\n    if (!FSCom.exists(nodeDatabaseFileName)) {\n        saveNodeDatabaseToDisk();\n    }\n#endif\n\n#ifdef ARCH_ESP32\n    Preferences preferences;\n    preferences.begin(\"meshtastic\", false);\n    myNodeInfo.reboot_count = preferences.getUInt(\"rebootCounter\", 0);\n    preferences.end();\n    LOG_DEBUG(\"Number of Device Reboots: %d\", myNodeInfo.reboot_count);\n#endif\n\n    resetRadioConfig(); // If bogus settings got saved, then fix them\n    // nodeDB->LOG_DEBUG(\"region=%d, NODENUM=0x%x, dbsize=%d\", config.lora.region, myNodeInfo.my_node_num, numMeshNodes);\n\n    // Uncomment below to always enable UDP broadcasts\n    // config.network.enabled_protocols = meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST;\n\n    // If we are setup to broadcast on any default channel slot (with default frequency slot semantics),\n    // ensure that the telemetry intervals are coerced to the role-aware minimum value.\n    if (channels.hasDefaultChannel()) {\n        LOG_DEBUG(\"Coerce telemetry to role-aware minimum on defaults\");\n        moduleConfig.telemetry.device_update_interval = Default::getConfiguredOrMinimumValue(\n            moduleConfig.telemetry.device_update_interval, min_default_telemetry_interval_secs);\n        moduleConfig.telemetry.environment_update_interval = Default::getConfiguredOrMinimumValue(\n            moduleConfig.telemetry.environment_update_interval, min_default_telemetry_interval_secs);\n        moduleConfig.telemetry.air_quality_interval = Default::getConfiguredOrMinimumValue(\n            moduleConfig.telemetry.air_quality_interval, min_default_telemetry_interval_secs);\n        moduleConfig.telemetry.power_update_interval = Default::getConfiguredOrMinimumValue(\n            moduleConfig.telemetry.power_update_interval, min_default_telemetry_interval_secs);\n        moduleConfig.telemetry.health_update_interval = Default::getConfiguredOrMinimumValue(\n            moduleConfig.telemetry.health_update_interval, min_default_telemetry_interval_secs);\n    }\n    // Enforce position broadcast minimums if we would send positions over a default channel\n    // Check channels the same way PositionModule::sendOurPosition() does - first channel with position_precision set\n    bool positionUsesDefaultChannel = false;\n    for (uint8_t i = 0; i < channels.getNumChannels(); i++) {\n        if (channels.getByIndex(i).settings.has_module_settings &&\n            channels.getByIndex(i).settings.module_settings.position_precision != 0) {\n            positionUsesDefaultChannel = channels.isDefaultChannel(i);\n            break;\n        }\n    }\n    if (positionUsesDefaultChannel) {\n        LOG_DEBUG(\"Coerce position broadcasts to role-aware minimum and smart broadcast min of 5 minutes on defaults\");\n        config.position.position_broadcast_secs =\n            Default::getConfiguredOrMinimumValue(config.position.position_broadcast_secs, min_default_broadcast_interval_secs);\n        config.position.broadcast_smart_minimum_interval_secs = Default::getConfiguredOrMinimumValue(\n            config.position.broadcast_smart_minimum_interval_secs, min_default_broadcast_smart_minimum_interval_secs);\n    }\n    // FIXME: UINT32_MAX intervals overflows Apple clients until they are fully patched\n    if (config.device.node_info_broadcast_secs > MAX_INTERVAL)\n        config.device.node_info_broadcast_secs = MAX_INTERVAL;\n    if (config.position.position_broadcast_secs > MAX_INTERVAL)\n        config.position.position_broadcast_secs = MAX_INTERVAL;\n    if (config.position.gps_update_interval > MAX_INTERVAL)\n        config.position.gps_update_interval = MAX_INTERVAL;\n    if (config.position.gps_attempt_time > MAX_INTERVAL)\n        config.position.gps_attempt_time = MAX_INTERVAL;\n    if (config.position.position_flags > MAX_INTERVAL)\n        config.position.position_flags = MAX_INTERVAL;\n    if (config.position.rx_gpio > MAX_INTERVAL)\n        config.position.rx_gpio = MAX_INTERVAL;\n    if (config.position.tx_gpio > MAX_INTERVAL)\n        config.position.tx_gpio = MAX_INTERVAL;\n    if (config.position.broadcast_smart_minimum_distance > MAX_INTERVAL)\n        config.position.broadcast_smart_minimum_distance = MAX_INTERVAL;\n    if (config.position.broadcast_smart_minimum_interval_secs > MAX_INTERVAL)\n        config.position.broadcast_smart_minimum_interval_secs = MAX_INTERVAL;\n    if (config.position.gps_en_gpio > MAX_INTERVAL)\n        config.position.gps_en_gpio = MAX_INTERVAL;\n    if (moduleConfig.neighbor_info.update_interval > MAX_INTERVAL)\n        moduleConfig.neighbor_info.update_interval = MAX_INTERVAL;\n    if (moduleConfig.telemetry.device_update_interval > MAX_INTERVAL)\n        moduleConfig.telemetry.device_update_interval = MAX_INTERVAL;\n    if (moduleConfig.telemetry.environment_update_interval > MAX_INTERVAL)\n        moduleConfig.telemetry.environment_update_interval = MAX_INTERVAL;\n    if (moduleConfig.telemetry.air_quality_interval > MAX_INTERVAL)\n        moduleConfig.telemetry.air_quality_interval = MAX_INTERVAL;\n    if (moduleConfig.telemetry.health_update_interval > MAX_INTERVAL)\n        moduleConfig.telemetry.health_update_interval = MAX_INTERVAL;\n\n    if (moduleConfig.mqtt.has_map_report_settings &&\n        moduleConfig.mqtt.map_report_settings.publish_interval_secs < default_map_publish_interval_secs) {\n        moduleConfig.mqtt.map_report_settings.publish_interval_secs = default_map_publish_interval_secs;\n    }\n\n    // Ensure that the neighbor info update interval is coerced to the minimum\n    moduleConfig.neighbor_info.update_interval =\n        Default::getConfiguredOrMinimumValue(moduleConfig.neighbor_info.update_interval, min_neighbor_info_broadcast_secs);\n\n    // Don't let licensed users to rebroadcast encrypted packets\n    if (owner.is_licensed) {\n        config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY;\n    }\n\n#if !HAS_TFT\n    if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        // On a device without MUI, this display mode makes no sense, and will break logic.\n        config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT;\n        config.bluetooth.enabled = true;\n    }\n#endif\n\n    if (devicestateCRC != crc32Buffer(&devicestate, sizeof(devicestate)))\n        saveWhat |= SEGMENT_DEVICESTATE;\n    if (nodeDatabaseCRC != crc32Buffer(&nodeDatabase, sizeof(nodeDatabase)))\n        saveWhat |= SEGMENT_NODEDATABASE;\n    if (configCRC != crc32Buffer(&config, sizeof(config)))\n        saveWhat |= SEGMENT_CONFIG;\n    if (channelFileCRC != crc32Buffer(&channelFile, sizeof(channelFile)))\n        saveWhat |= SEGMENT_CHANNELS;\n\n    if (config.position.gps_enabled) {\n        config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED;\n        config.position.gps_enabled = 0;\n    }\n#ifdef USERPREFS_FIRMWARE_EDITION\n    myNodeInfo.firmware_edition = USERPREFS_FIRMWARE_EDITION;\n#endif\n#ifdef USERPREFS_FIXED_GPS\n    if (myNodeInfo.reboot_count == 1) { // Check if First boot ever or after Factory Reset.\n        meshtastic_Position fixedGPS = meshtastic_Position_init_default;\n#ifdef USERPREFS_FIXED_GPS_LAT\n        fixedGPS.latitude_i = (int32_t)(USERPREFS_FIXED_GPS_LAT * 1e7);\n        fixedGPS.has_latitude_i = true;\n#endif\n#ifdef USERPREFS_FIXED_GPS_LON\n        fixedGPS.longitude_i = (int32_t)(USERPREFS_FIXED_GPS_LON * 1e7);\n        fixedGPS.has_longitude_i = true;\n#endif\n#ifdef USERPREFS_FIXED_GPS_ALT\n        fixedGPS.altitude = USERPREFS_FIXED_GPS_ALT;\n        fixedGPS.has_altitude = true;\n#endif\n#if defined(USERPREFS_FIXED_GPS_LAT) && defined(USERPREFS_FIXED_GPS_LON)\n        fixedGPS.location_source = meshtastic_Position_LocSource_LOC_MANUAL;\n        config.has_position = true;\n        info->has_position = true;\n        info->position = TypeConversions::ConvertToPositionLite(fixedGPS);\n        nodeDB->setLocalPosition(fixedGPS);\n        config.position.fixed_position = true;\n#endif\n    }\n#endif\n    sortMeshDB();\n    saveToDisk(saveWhat);\n}\n\n/**\n * Most (but not always) of the time we want to treat packets 'from' the local phone (where from == 0), as if they originated on\n * the local node. If from is zero this function returns our node number instead\n */\nNodeNum getFrom(const meshtastic_MeshPacket *p)\n{\n    return (p->from == 0) ? nodeDB->getNodeNum() : p->from;\n}\n\n// Returns true if the packet originated from the local node\nbool isFromUs(const meshtastic_MeshPacket *p)\n{\n    return p->from == 0 || p->from == nodeDB->getNodeNum();\n}\n\n// Returns true if the packet is destined to us\nbool isToUs(const meshtastic_MeshPacket *p)\n{\n    return p->to == nodeDB->getNodeNum();\n}\n\nbool isBroadcast(uint32_t dest)\n{\n    return dest == NODENUM_BROADCAST || dest == NODENUM_BROADCAST_NO_LORA;\n}\n\nvoid NodeDB::resetRadioConfig(bool is_fresh_install)\n{\n    if (is_fresh_install) {\n        radioGeneration++;\n    }\n\n    if (channelFile.channels_count != MAX_NUM_CHANNELS) {\n        LOG_INFO(\"Set default channel and radio preferences!\");\n\n        channels.initDefaults();\n    }\n\n    channels.onConfigChanged();\n\n    // Update the global myRegion\n    initRegion();\n}\n\nbool NodeDB::factoryReset(bool eraseBleBonds)\n{\n    LOG_INFO(\"Perform factory reset!\");\n    // first, remove the \"/prefs\" (this removes most prefs)\n    spiLock->lock();\n    rmDir(\"/prefs\"); // this uses spilock internally...\n\n#ifdef FSCom\n    if (FSCom.exists(\"/static/rangetest.csv\") && !FSCom.remove(\"/static/rangetest.csv\")) {\n        LOG_ERROR(\"Could not remove rangetest.csv file\");\n    }\n#endif\n    spiLock->unlock();\n    // second, install default state (this will deal with the duplicate mac address issue)\n    installDefaultNodeDatabase();\n    installDefaultDeviceState();\n    installDefaultConfig(!eraseBleBonds); // Also preserve the private key if we're not erasing BLE bonds\n    installDefaultModuleConfig();\n    installDefaultChannels();\n    // third, write everything to disk\n    saveToDisk();\n    if (eraseBleBonds) {\n        LOG_INFO(\"Erase BLE bonds\");\n#ifdef ARCH_ESP32\n        // This will erase what's in NVS including ssl keys, persistent variables and ble pairing\n        nvs_flash_erase();\n#endif\n#ifdef ARCH_NRF52\n        LOG_INFO(\"Clear bluetooth bonds!\");\n        bond_print_list(BLE_GAP_ROLE_PERIPH);\n        bond_print_list(BLE_GAP_ROLE_CENTRAL);\n        Bluefruit.Periph.clearBonds();\n        Bluefruit.Central.clearBonds();\n#endif\n    }\n    return true;\n}\n\nvoid NodeDB::installDefaultNodeDatabase()\n{\n    LOG_DEBUG(\"Install default NodeDatabase\");\n    nodeDatabase.version = DEVICESTATE_CUR_VER;\n    nodeDatabase.nodes = std::vector<meshtastic_NodeInfoLite>(MAX_NUM_NODES);\n    numMeshNodes = 0;\n    meshNodes = &nodeDatabase.nodes;\n}\n\nvoid NodeDB::installDefaultConfig(bool preserveKey = false)\n{\n    uint8_t private_key_temp[32];\n    bool shouldPreserveKey = preserveKey && config.has_security && config.security.private_key.size > 0;\n    if (shouldPreserveKey) {\n        memcpy(private_key_temp, config.security.private_key.bytes, config.security.private_key.size);\n    }\n    LOG_INFO(\"Install default LocalConfig\");\n    memset(&config, 0, sizeof(meshtastic_LocalConfig));\n    config.version = DEVICESTATE_CUR_VER;\n    config.has_device = true;\n    config.has_display = true;\n    config.has_lora = true;\n    config.has_position = true;\n    config.has_power = true;\n    config.has_network = true;\n    config.has_bluetooth = (HAS_BLUETOOTH ? true : false);\n    config.has_security = true;\n    config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_ALL;\n\n    config.lora.sx126x_rx_boosted_gain = true;\n    config.lora.tx_enabled =\n        true; // FIXME: maybe false in the future, and setting region to enable it. (unset region forces it off)\n    config.lora.override_duty_cycle = false;\n    config.lora.config_ok_to_mqtt = false;\n#if HAS_LORA_FEM\n    config.lora.fem_lna_mode = meshtastic_Config_LoRaConfig_FEM_LNA_Mode_ENABLED;\n#else\n    config.lora.fem_lna_mode = meshtastic_Config_LoRaConfig_FEM_LNA_Mode_NOT_PRESENT;\n#endif\n\n#if HAS_TFT // For the devices that support MUI, default to that\n    config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_COLOR;\n#endif\n\n#if defined(TFT_WIDTH) && defined(TFT_HEIGHT) && (TFT_WIDTH >= 200 || TFT_HEIGHT >= 200)\n    config.display.enable_message_bubbles = true;\n#endif\n\n#ifdef USERPREFS_CONFIG_DEVICE_ROLE\n    // Restrict ROUTER*, LOST AND FOUND roles for security reasons\n    if (IS_ONE_OF(USERPREFS_CONFIG_DEVICE_ROLE, meshtastic_Config_DeviceConfig_Role_ROUTER,\n                  meshtastic_Config_DeviceConfig_Role_ROUTER_LATE, meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND)) {\n        LOG_WARN(\"ROUTER roles are restricted, falling back to CLIENT role\");\n        config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    } else {\n        config.device.role = USERPREFS_CONFIG_DEVICE_ROLE;\n    }\n#else\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT; // Default to client.\n#endif\n\n#ifdef USERPREFS_CONFIG_LORA_REGION\n    config.lora.region = USERPREFS_CONFIG_LORA_REGION;\n#else\n    config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;\n#endif\n#ifdef USERPREFS_LORACONFIG_MODEM_PRESET\n    config.lora.modem_preset = USERPREFS_LORACONFIG_MODEM_PRESET;\n#else\n    config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;\n#endif\n    config.lora.hop_limit = HOP_RELIABLE;\n#ifdef USERPREFS_CONFIG_LORA_IGNORE_MQTT\n    config.lora.ignore_mqtt = USERPREFS_CONFIG_LORA_IGNORE_MQTT;\n#else\n    config.lora.ignore_mqtt = false;\n#endif\n    // Initialize admin_key_count to zero\n    byte numAdminKeys = 0;\n\n#ifdef USERPREFS_USE_ADMIN_KEY_0\n    // Check if USERPREFS_ADMIN_KEY_0 is non-empty\n    if (sizeof(userprefs_admin_key_0) > 0) {\n        memcpy(config.security.admin_key[0].bytes, userprefs_admin_key_0, 32);\n        config.security.admin_key[0].size = 32;\n        numAdminKeys++;\n    }\n#endif\n\n#ifdef USERPREFS_USE_ADMIN_KEY_1\n    // Check if USERPREFS_ADMIN_KEY_1 is non-empty\n    if (sizeof(userprefs_admin_key_1) > 0) {\n        memcpy(config.security.admin_key[1].bytes, userprefs_admin_key_1, 32);\n        config.security.admin_key[1].size = 32;\n        numAdminKeys++;\n    }\n#endif\n\n#ifdef USERPREFS_USE_ADMIN_KEY_2\n    // Check if USERPREFS_ADMIN_KEY_2 is non-empty\n    if (sizeof(userprefs_admin_key_2) > 0) {\n        memcpy(config.security.admin_key[2].bytes, userprefs_admin_key_2, 32);\n        config.security.admin_key[2].size = 32;\n        numAdminKeys++;\n    }\n#endif\n    config.security.admin_key_count = numAdminKeys;\n\n    if (shouldPreserveKey) {\n        config.security.private_key.size = 32;\n        memcpy(config.security.private_key.bytes, private_key_temp, config.security.private_key.size);\n        printBytes(\"Restored key\", config.security.private_key.bytes, config.security.private_key.size);\n    } else {\n        config.security.private_key.size = 0;\n    }\n    config.security.public_key.size = 0;\n#ifdef PIN_GPS_EN\n    config.position.gps_en_gpio = PIN_GPS_EN;\n#endif\n#if defined(USERPREFS_CONFIG_GPS_MODE)\n    config.position.gps_mode = USERPREFS_CONFIG_GPS_MODE;\n#elif !HAS_GPS || GPS_DEFAULT_NOT_PRESENT\n    config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT;\n#elif !defined(GPS_RX_PIN)\n    if (config.position.rx_gpio == 0)\n        config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT;\n    else\n        config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_DISABLED;\n#else\n    config.position.gps_mode = meshtastic_Config_PositionConfig_GpsMode_ENABLED;\n#endif\n#ifdef USERPREFS_CONFIG_SMART_POSITION_ENABLED\n    config.position.position_broadcast_smart_enabled = USERPREFS_CONFIG_SMART_POSITION_ENABLED;\n#else\n    config.position.position_broadcast_smart_enabled = true;\n#endif\n    config.position.broadcast_smart_minimum_distance = 100;\n    config.position.broadcast_smart_minimum_interval_secs = default_broadcast_smart_minimum_interval_secs;\n    if (config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER &&\n        config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)\n        config.device.node_info_broadcast_secs = default_node_info_broadcast_secs;\n    config.security.serial_enabled = true;\n    config.security.admin_channel_enabled = false;\n    resetRadioConfig(true); // This also triggers NodeInfo/Position requests since we're fresh\n    strncpy(config.network.ntp_server, \"meshtastic.pool.ntp.org\", 32);\n\n#if (defined(T_DECK) || defined(T_WATCH_S3) || defined(UNPHONE) || defined(PICOMPUTER_S3) || defined(SENSECAP_INDICATOR) ||      \\\n     defined(ELECROW_PANEL) || defined(HELTEC_V4_TFT)) &&                                                                        \\\n    HAS_TFT\n    // switch BT off by default; use TFT programming mode or hotkey to enable\n    config.bluetooth.enabled = false;\n#else\n    // default to bluetooth capability of platform as default\n    config.bluetooth.enabled = true;\n#endif\n    config.bluetooth.fixed_pin = defaultBLEPin;\n\n#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ILI9342_DRIVER) || defined(ST7789_CS) ||       \\\n    defined(HX8357_CS) || defined(USE_ST7789) || defined(ILI9488_CS) || defined(ST7796_CS) || defined(USE_SPISSD1306) ||         \\\n    defined(USE_ST7796) || defined(HACKADAY_COMMUNICATOR)\n    bool hasScreen = true;\n#ifdef HELTEC_MESH_NODE_T114\n    uint32_t st7789_id = get_st7789_id(ST7789_NSS, ST7789_SCK, ST7789_SDA, ST7789_RS, ST7789_RESET);\n    if (st7789_id == 0xFFFFFF) {\n        hasScreen = false;\n    }\n#endif\n#elif ARCH_PORTDUINO\n    bool hasScreen = false;\n    if (portduino_config.displayPanel)\n        hasScreen = true;\n    else\n        hasScreen = screen_found.port != ScanI2C::I2CPort::NO_I2C;\n#elif MESHTASTIC_INCLUDE_NICHE_GRAPHICS // See \"src/graphics/niche\"\n    bool hasScreen = true; // Use random pin for Bluetooth pairing\n#else\n    bool hasScreen = screen_found.port != ScanI2C::I2CPort::NO_I2C;\n#endif\n\n#ifdef USERPREFS_FIXED_BLUETOOTH\n    config.bluetooth.fixed_pin = USERPREFS_FIXED_BLUETOOTH;\n    config.bluetooth.mode = meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN;\n#else\n    config.bluetooth.mode = hasScreen ? meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN\n                                      : meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN;\n#endif\n    // for backward compat, default position flags are ALT+MSL\n    config.position.position_flags =\n        (meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE | meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE_MSL |\n         meshtastic_Config_PositionConfig_PositionFlags_SPEED | meshtastic_Config_PositionConfig_PositionFlags_HEADING |\n         meshtastic_Config_PositionConfig_PositionFlags_DOP | meshtastic_Config_PositionConfig_PositionFlags_SATINVIEW);\n\n// Set default value for 'Mesh via UDP'\n#if HAS_UDP_MULTICAST\n#ifdef USERPREFS_NETWORK_ENABLED_PROTOCOLS\n    config.network.enabled_protocols = USERPREFS_NETWORK_ENABLED_PROTOCOLS;\n#else\n    config.network.enabled_protocols = 0;\n#endif\n#endif\n\n#ifdef USERPREFS_NETWORK_WIFI_ENABLED\n    config.network.wifi_enabled = USERPREFS_NETWORK_WIFI_ENABLED;\n#endif\n\n#ifdef USERPREFS_NETWORK_WIFI_SSID\n    strncpy(config.network.wifi_ssid, USERPREFS_NETWORK_WIFI_SSID, sizeof(config.network.wifi_ssid));\n#endif\n\n#ifdef USERPREFS_NETWORK_WIFI_PSK\n    strncpy(config.network.wifi_psk, USERPREFS_NETWORK_WIFI_PSK, sizeof(config.network.wifi_psk));\n#endif\n\n#if defined(USERPREFS_NETWORK_IPV6_ENABLED)\n    config.network.ipv6_enabled = USERPREFS_NETWORK_IPV6_ENABLED;\n#else\n    config.network.ipv6_enabled = default_network_ipv6_enabled;\n#endif\n\n#ifdef DISPLAY_FLIP_SCREEN\n    config.display.flip_screen = true;\n#endif\n#ifdef RAK4630\n    config.display.wake_on_tap_or_motion = true;\n#endif\n#if defined(T_WATCH_S3) || defined(SENSECAP_INDICATOR)\n    config.display.screen_on_secs = 30;\n    config.display.wake_on_tap_or_motion = true;\n#endif\n#ifdef COMPASS_ORIENTATION\n    config.display.compass_orientation = COMPASS_ORIENTATION;\n#endif\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WIFI\n    if (MeshtasticOTA::isUpdated()) {\n        MeshtasticOTA::recoverConfig(&config.network);\n    }\n#endif\n\n#ifdef USERPREFS_CONFIG_DEVICE_ROLE\n    // Apply role-specific defaults when role is set via user preferences\n    installRoleDefaults(config.device.role);\n#endif\n\n    initConfigIntervals();\n}\n\nvoid NodeDB::initConfigIntervals()\n{\n#ifdef USERPREFS_CONFIG_GPS_UPDATE_INTERVAL\n    config.position.gps_update_interval = USERPREFS_CONFIG_GPS_UPDATE_INTERVAL;\n#else\n    config.position.gps_update_interval = default_gps_update_interval;\n#endif\n#ifdef USERPREFS_CONFIG_POSITION_BROADCAST_INTERVAL\n    config.position.position_broadcast_secs = USERPREFS_CONFIG_POSITION_BROADCAST_INTERVAL;\n#else\n    config.position.position_broadcast_secs = default_broadcast_interval_secs;\n#endif\n\n    config.power.ls_secs = default_ls_secs;\n    config.power.min_wake_secs = default_min_wake_secs;\n    config.power.sds_secs = default_sds_secs;\n    config.power.wait_bluetooth_secs = default_wait_bluetooth_secs;\n\n    config.display.screen_on_secs = default_screen_on_secs;\n\n#if defined(USE_POWERSAVE)\n    config.power.is_power_saving = true;\n    config.display.screen_on_secs = 30;\n    config.power.wait_bluetooth_secs = 30;\n#endif\n}\n\nvoid NodeDB::installDefaultModuleConfig()\n{\n    LOG_INFO(\"Install default ModuleConfig\");\n    memset(&moduleConfig, 0, sizeof(meshtastic_ModuleConfig));\n\n    moduleConfig.version = DEVICESTATE_CUR_VER;\n    moduleConfig.has_mqtt = true;\n    moduleConfig.has_range_test = true;\n    moduleConfig.has_serial = true;\n    moduleConfig.has_store_forward = true;\n    moduleConfig.has_telemetry = true;\n    moduleConfig.has_external_notification = true;\n#if defined(PIN_BUZZER) || defined(PIN_VIBRATION) || defined(LED_NOTIFICATION)\n    moduleConfig.external_notification.enabled = true;\n#endif\n#if defined(PIN_BUZZER)\n    moduleConfig.external_notification.output_buzzer = PIN_BUZZER;\n    moduleConfig.external_notification.use_pwm = true;\n    moduleConfig.external_notification.alert_message_buzzer = true;\n#endif\n#if defined(PIN_VIBRATION)\n    moduleConfig.external_notification.output_vibra = PIN_VIBRATION;\n    moduleConfig.external_notification.alert_message_vibra = true;\n    moduleConfig.external_notification.output_ms = 500;\n#endif\n#if defined(LED_NOTIFICATION)\n    moduleConfig.external_notification.output = LED_NOTIFICATION;\n    moduleConfig.external_notification.active = LED_STATE_ON;\n    moduleConfig.external_notification.alert_message = true;\n    moduleConfig.external_notification.output_ms = 1000;\n#endif\n#if defined(PIN_VIBRATION)\n    moduleConfig.external_notification.nag_timeout = 2;\n#elif defined(PIN_BUZZER) || defined(LED_NOTIFICATION)\n    moduleConfig.external_notification.nag_timeout = default_ringtone_nag_secs;\n#endif\n\n#ifdef HAS_I2S\n    // Don't worry about the other settings for T-Watch, we'll also use the DRV2056 behavior for notifications\n    moduleConfig.external_notification.enabled = true;\n    moduleConfig.external_notification.use_i2s_as_buzzer = true;\n    moduleConfig.external_notification.alert_message_buzzer = true;\n#if HAS_TFT\n    if (moduleConfig.external_notification.nag_timeout == default_ringtone_nag_secs)\n        moduleConfig.external_notification.nag_timeout = 0;\n#else\n    moduleConfig.external_notification.nag_timeout = default_ringtone_nag_secs;\n#endif\n#endif\n#ifdef NANO_G2_ULTRA\n    moduleConfig.external_notification.enabled = true;\n    moduleConfig.external_notification.alert_message = true;\n    moduleConfig.external_notification.output_ms = 100;\n    moduleConfig.external_notification.active = true;\n#endif\n#ifdef T_LORA_PAGER\n    moduleConfig.canned_message.updown1_enabled = true;\n    moduleConfig.canned_message.inputbroker_pin_a = ROTARY_A;\n    moduleConfig.canned_message.inputbroker_pin_b = ROTARY_B;\n    moduleConfig.canned_message.inputbroker_pin_press = ROTARY_PRESS;\n    moduleConfig.canned_message.inputbroker_event_cw = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar(28);\n    moduleConfig.canned_message.inputbroker_event_ccw = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar(29);\n    moduleConfig.canned_message.inputbroker_event_press = meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT;\n#endif\n    moduleConfig.has_canned_message = true;\n#if USERPREFS_MQTT_ENABLED && !MESHTASTIC_EXCLUDE_MQTT\n    moduleConfig.mqtt.enabled = true;\n#endif\n#ifdef USERPREFS_MQTT_ADDRESS\n    strncpy(moduleConfig.mqtt.address, USERPREFS_MQTT_ADDRESS, sizeof(moduleConfig.mqtt.address));\n#else\n    strncpy(moduleConfig.mqtt.address, default_mqtt_address, sizeof(moduleConfig.mqtt.address));\n#endif\n#ifdef USERPREFS_MQTT_USERNAME\n    strncpy(moduleConfig.mqtt.username, USERPREFS_MQTT_USERNAME, sizeof(moduleConfig.mqtt.username));\n#else\n    strncpy(moduleConfig.mqtt.username, default_mqtt_username, sizeof(moduleConfig.mqtt.username));\n#endif\n#ifdef USERPREFS_MQTT_PASSWORD\n    strncpy(moduleConfig.mqtt.password, USERPREFS_MQTT_PASSWORD, sizeof(moduleConfig.mqtt.password));\n#else\n    strncpy(moduleConfig.mqtt.password, default_mqtt_password, sizeof(moduleConfig.mqtt.password));\n#endif\n#ifdef USERPREFS_MQTT_ROOT_TOPIC\n    strncpy(moduleConfig.mqtt.root, USERPREFS_MQTT_ROOT_TOPIC, sizeof(moduleConfig.mqtt.root));\n#else\n    strncpy(moduleConfig.mqtt.root, default_mqtt_root, sizeof(moduleConfig.mqtt.root));\n#endif\n#ifdef USERPREFS_MQTT_ENCRYPTION_ENABLED\n    moduleConfig.mqtt.encryption_enabled = USERPREFS_MQTT_ENCRYPTION_ENABLED;\n#else\n    moduleConfig.mqtt.encryption_enabled = default_mqtt_encryption_enabled;\n#endif\n#ifdef USERPREFS_MQTT_TLS_ENABLED\n    moduleConfig.mqtt.tls_enabled = USERPREFS_MQTT_TLS_ENABLED;\n#else\n    moduleConfig.mqtt.tls_enabled = default_mqtt_tls_enabled;\n#endif\n\n    moduleConfig.has_neighbor_info = true;\n    moduleConfig.neighbor_info.enabled = false;\n\n    moduleConfig.has_detection_sensor = true;\n    moduleConfig.detection_sensor.enabled = false;\n    moduleConfig.detection_sensor.detection_trigger_type = meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH;\n    moduleConfig.detection_sensor.minimum_broadcast_secs = 45;\n\n    moduleConfig.has_ambient_lighting = true;\n    moduleConfig.ambient_lighting.current = 10;\n    // Default to a color based on our node number\n    moduleConfig.ambient_lighting.red = (myNodeInfo.my_node_num & 0xFF0000) >> 16;\n    moduleConfig.ambient_lighting.green = (myNodeInfo.my_node_num & 0x00FF00) >> 8;\n    moduleConfig.ambient_lighting.blue = myNodeInfo.my_node_num & 0x0000FF;\n\n    initModuleConfigIntervals();\n}\n\nvoid NodeDB::installRoleDefaults(meshtastic_Config_DeviceConfig_Role role)\n{\n    if (role == meshtastic_Config_DeviceConfig_Role_ROUTER) {\n        initConfigIntervals();\n        initModuleConfigIntervals();\n        moduleConfig.telemetry.device_update_interval = default_telemetry_broadcast_interval_secs;\n        config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_CORE_PORTNUMS_ONLY;\n        owner.has_is_unmessagable = true;\n        owner.is_unmessagable = true;\n    } else if (role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE) {\n        moduleConfig.telemetry.device_update_interval = ONE_DAY;\n        owner.has_is_unmessagable = true;\n        owner.is_unmessagable = true;\n    } else if (role == meshtastic_Config_DeviceConfig_Role_SENSOR) {\n        owner.has_is_unmessagable = true;\n        owner.is_unmessagable = true;\n        moduleConfig.telemetry.device_update_interval = default_telemetry_broadcast_interval_secs;\n        moduleConfig.telemetry.environment_measurement_enabled = true;\n        moduleConfig.telemetry.environment_update_interval = 300;\n    } else if (role == meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND) {\n        config.position.position_broadcast_smart_enabled = false;\n        config.position.position_broadcast_secs = 300; // Every 5 minutes\n    } else if (role == meshtastic_Config_DeviceConfig_Role_TAK) {\n        config.device.node_info_broadcast_secs = ONE_DAY;\n        config.position.position_broadcast_smart_enabled = false;\n        config.position.position_broadcast_secs = ONE_DAY;\n        // Remove Altitude MSL from flags since CoTs use HAE (height above ellipsoid)\n        config.position.position_flags =\n            (meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE | meshtastic_Config_PositionConfig_PositionFlags_SPEED |\n             meshtastic_Config_PositionConfig_PositionFlags_HEADING | meshtastic_Config_PositionConfig_PositionFlags_DOP);\n        moduleConfig.telemetry.device_update_interval = ONE_DAY;\n    } else if (role == meshtastic_Config_DeviceConfig_Role_TRACKER) {\n        owner.has_is_unmessagable = true;\n        owner.is_unmessagable = true;\n        moduleConfig.telemetry.device_update_interval = default_telemetry_broadcast_interval_secs;\n    } else if (role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) {\n        owner.has_is_unmessagable = true;\n        owner.is_unmessagable = true;\n        config.device.node_info_broadcast_secs = ONE_DAY;\n        config.position.position_broadcast_smart_enabled = true;\n        config.position.position_broadcast_secs = 3 * 60; // Every 3 minutes\n        config.position.broadcast_smart_minimum_distance = 20;\n        config.position.broadcast_smart_minimum_interval_secs = 15;\n        // Remove Altitude MSL from flags since CoTs use HAE (height above ellipsoid)\n        config.position.position_flags =\n            (meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE | meshtastic_Config_PositionConfig_PositionFlags_SPEED |\n             meshtastic_Config_PositionConfig_PositionFlags_HEADING | meshtastic_Config_PositionConfig_PositionFlags_DOP);\n        moduleConfig.telemetry.device_update_interval = ONE_DAY;\n    } else if (role == meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN) {\n        config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY;\n        config.device.node_info_broadcast_secs = MAX_INTERVAL;\n        config.position.position_broadcast_smart_enabled = false;\n        config.position.position_broadcast_secs = MAX_INTERVAL;\n        moduleConfig.neighbor_info.update_interval = MAX_INTERVAL;\n        moduleConfig.telemetry.device_update_interval = MAX_INTERVAL;\n        moduleConfig.telemetry.environment_update_interval = MAX_INTERVAL;\n        moduleConfig.telemetry.air_quality_interval = MAX_INTERVAL;\n        moduleConfig.telemetry.health_update_interval = MAX_INTERVAL;\n    }\n}\n\nvoid NodeDB::initModuleConfigIntervals()\n{\n    // Zero out telemetry intervals so that they coalesce to defaults in Default.h\n#ifdef USERPREFS_CONFIG_DEVICE_TELEM_UPDATE_INTERVAL\n    moduleConfig.telemetry.device_update_interval = USERPREFS_CONFIG_DEVICE_TELEM_UPDATE_INTERVAL;\n#else\n    moduleConfig.telemetry.device_update_interval = MAX_INTERVAL;\n#endif\n    moduleConfig.telemetry.environment_update_interval = 0;\n    moduleConfig.telemetry.air_quality_interval = 0;\n    moduleConfig.telemetry.power_update_interval = 0;\n    moduleConfig.telemetry.health_update_interval = 0;\n    moduleConfig.neighbor_info.update_interval = 0;\n    moduleConfig.paxcounter.paxcounter_update_interval = 0;\n}\n\nvoid NodeDB::installDefaultChannels()\n{\n    LOG_INFO(\"Install default ChannelFile\");\n    memset(&channelFile, 0, sizeof(meshtastic_ChannelFile));\n    channelFile.version = DEVICESTATE_CUR_VER;\n}\n\nvoid NodeDB::resetNodes(bool keepFavorites)\n{\n    if (!config.position.fixed_position)\n        clearLocalPosition();\n    numMeshNodes = 1;\n    if (keepFavorites) {\n        LOG_INFO(\"Clearing node database - preserving favorites\");\n        for (size_t i = 0; i < meshNodes->size(); i++) {\n            meshtastic_NodeInfoLite &node = meshNodes->at(i);\n            if (i > 0 && !node.is_favorite) {\n                node = meshtastic_NodeInfoLite();\n            } else {\n                numMeshNodes += 1;\n            }\n        };\n    } else {\n        LOG_INFO(\"Clearing node database - removing favorites\");\n        std::fill(nodeDatabase.nodes.begin() + 1, nodeDatabase.nodes.end(), meshtastic_NodeInfoLite());\n    }\n    devicestate.has_rx_text_message = false;\n    devicestate.has_rx_waypoint = false;\n    saveNodeDatabaseToDisk();\n    saveDeviceStateToDisk();\n    if (neighborInfoModule && moduleConfig.neighbor_info.enabled)\n        neighborInfoModule->resetNeighbors();\n}\n\nvoid NodeDB::removeNodeByNum(NodeNum nodeNum)\n{\n    int newPos = 0, removed = 0;\n    for (int i = 0; i < numMeshNodes; i++) {\n        if (meshNodes->at(i).num != nodeNum)\n            meshNodes->at(newPos++) = meshNodes->at(i);\n        else\n            removed++;\n    }\n    numMeshNodes -= removed;\n    std::fill(nodeDatabase.nodes.begin() + numMeshNodes, nodeDatabase.nodes.begin() + numMeshNodes + 1,\n              meshtastic_NodeInfoLite());\n    LOG_DEBUG(\"NodeDB::removeNodeByNum purged %d entries. Save changes\", removed);\n    saveNodeDatabaseToDisk();\n}\n\nvoid NodeDB::clearLocalPosition()\n{\n    meshtastic_NodeInfoLite *node = getMeshNode(nodeDB->getNodeNum());\n    node->position.latitude_i = 0;\n    node->position.longitude_i = 0;\n    node->position.altitude = 0;\n    node->position.time = 0;\n    setLocalPosition(meshtastic_Position_init_default);\n    localPositionUpdatedSinceBoot = false;\n}\n\nvoid NodeDB::cleanupMeshDB()\n{\n    int newPos = 0, removed = 0;\n    for (int i = 0; i < numMeshNodes; i++) {\n        if (meshNodes->at(i).has_user) {\n            if (meshNodes->at(i).user.public_key.size > 0) {\n                if (memfll(meshNodes->at(i).user.public_key.bytes, 0, meshNodes->at(i).user.public_key.size)) {\n                    meshNodes->at(i).user.public_key.size = 0;\n                }\n            }\n            if (newPos != i)\n                meshNodes->at(newPos++) = meshNodes->at(i);\n            else\n                newPos++;\n        } else {\n            removed++;\n        }\n    }\n    numMeshNodes -= removed;\n    std::fill(nodeDatabase.nodes.begin() + numMeshNodes, nodeDatabase.nodes.begin() + numMeshNodes + removed,\n              meshtastic_NodeInfoLite());\n    LOG_DEBUG(\"cleanupMeshDB purged %d entries\", removed);\n}\n\nvoid NodeDB::installDefaultDeviceState()\n{\n    LOG_INFO(\"Install default DeviceState\");\n    // memset(&devicestate, 0, sizeof(meshtastic_DeviceState));\n\n    // init our devicestate with valid flags so protobuf writing/reading will work\n    devicestate.has_my_node = true;\n    devicestate.has_owner = true;\n    devicestate.version = DEVICESTATE_CUR_VER;\n    devicestate.receive_queue_count = 0; // Not yet implemented FIXME\n    devicestate.has_rx_waypoint = false;\n    devicestate.has_rx_text_message = false;\n\n    generatePacketId(); // FIXME - ugly way to init current_packet_id;\n\n    // Set default owner name\n    pickNewNodeNum(); // based on macaddr now\n#ifdef USERPREFS_CONFIG_OWNER_LONG_NAME\n    snprintf(owner.long_name, sizeof(owner.long_name), (const char *)USERPREFS_CONFIG_OWNER_LONG_NAME);\n#else\n    snprintf(owner.long_name, sizeof(owner.long_name), \"Meshtastic %04x\", getNodeNum() & 0x0ffff);\n#endif\n#ifdef USERPREFS_CONFIG_OWNER_SHORT_NAME\n    snprintf(owner.short_name, sizeof(owner.short_name), (const char *)USERPREFS_CONFIG_OWNER_SHORT_NAME);\n#else\n    snprintf(owner.short_name, sizeof(owner.short_name), \"%04x\", getNodeNum() & 0x0ffff);\n#endif\n    snprintf(owner.id, sizeof(owner.id), \"!%08x\", getNodeNum()); // Default node ID now based on nodenum\n    memcpy(owner.macaddr, ourMacAddr, sizeof(owner.macaddr));\n    owner.has_is_unmessagable = true;\n    owner.is_unmessagable = false;\n}\n\n// We reserve a few nodenums for future use\n#define NUM_RESERVED 4\n\n/**\n * get our starting (provisional) nodenum from flash.\n */\nvoid NodeDB::pickNewNodeNum()\n{\n    NodeNum nodeNum = myNodeInfo.my_node_num;\n    getMacAddr(ourMacAddr); // Make sure ourMacAddr is set\n    if (nodeNum == 0) {\n        // Pick an initial nodenum based on the macaddr\n        nodeNum = (ourMacAddr[2] << 24) | (ourMacAddr[3] << 16) | (ourMacAddr[4] << 8) | ourMacAddr[5];\n    }\n\n    meshtastic_NodeInfoLite *found;\n    while (((found = getMeshNode(nodeNum)) && memcmp(found->user.macaddr, ourMacAddr, sizeof(ourMacAddr)) != 0) ||\n           (nodeNum == NODENUM_BROADCAST || nodeNum < NUM_RESERVED)) {\n        NodeNum candidate = random(NUM_RESERVED, LONG_MAX); // try a new random choice\n        if (found)\n            LOG_WARN(\"NOTE! Our desired nodenum 0x%x is invalid or in use, by MAC ending in 0x%02x%02x vs our 0x%02x%02x, so \"\n                     \"trying for 0x%x\",\n                     nodeNum, found->user.macaddr[4], found->user.macaddr[5], ourMacAddr[4], ourMacAddr[5], candidate);\n        nodeNum = candidate;\n    }\n    LOG_DEBUG(\"Use nodenum 0x%x \", nodeNum);\n\n    myNodeInfo.my_node_num = nodeNum;\n}\n\n/** Load a protobuf from a file, return LoadFileResult */\nLoadFileResult NodeDB::loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields,\n                                 void *dest_struct)\n{\n    LoadFileResult state = LoadFileResult::OTHER_FAILURE;\n#ifdef FSCom\n    concurrency::LockGuard g(spiLock);\n\n    auto f = FSCom.open(filename, FILE_O_READ);\n\n    if (f) {\n        LOG_INFO(\"Load %s\", filename);\n        pb_istream_t stream = {&readcb, &f, protoSize};\n        if (fields != &meshtastic_NodeDatabase_msg) // contains a vector object\n            memset(dest_struct, 0, objSize);\n        if (!pb_decode(&stream, fields, dest_struct)) {\n            LOG_ERROR(\"Error: can't decode protobuf %s\", PB_GET_ERROR(&stream));\n            state = LoadFileResult::DECODE_FAILED;\n        } else {\n            LOG_INFO(\"Loaded %s successfully\", filename);\n            state = LoadFileResult::LOAD_SUCCESS;\n        }\n        f.close();\n    } else {\n        LOG_ERROR(\"Could not open / read %s\", filename);\n    }\n#else\n    LOG_ERROR(\"ERROR: Filesystem not implemented\");\n    state = LoadFileResult::NO_FILESYSTEM;\n#endif\n    return state;\n}\n\nvoid NodeDB::loadFromDisk()\n{\n    // Mark the current device state as completely unusable, so that if we fail reading the entire file from\n    // disk we will still factoryReset to restore things.\n    devicestate.version = 0;\n\n    meshtastic_Config_SecurityConfig backupSecurity = meshtastic_Config_SecurityConfig_init_zero;\n\n#ifdef ARCH_ESP32\n    spiLock->lock();\n    // If the legacy deviceState exists, start over with a factory reset\n    if (FSCom.exists(\"/static/static\"))\n        rmDir(\"/static/static\"); // Remove bad static web files bundle from initial 2.5.13 release\n    spiLock->unlock();\n#endif\n#ifdef FSCom\n#ifdef FACTORY_INSTALL\n    spiLock->lock();\n    if (!FSCom.exists(\"/prefs/\" xstr(BUILD_EPOCH))) {\n        LOG_WARN(\"Factory Install Reset!\");\n        FSCom.format();\n        FSCom.mkdir(\"/prefs\");\n        File f2 = FSCom.open(\"/prefs/\" xstr(BUILD_EPOCH), FILE_O_WRITE);\n        if (f2) {\n            f2.flush();\n            f2.close();\n        }\n    }\n    spiLock->unlock();\n#endif\n    spiLock->lock();\n    if (FSCom.exists(legacyPrefFileName)) {\n        spiLock->unlock();\n        LOG_WARN(\"Legacy prefs version found, factory resetting\");\n        if (loadProto(configFileName, meshtastic_LocalConfig_size, sizeof(meshtastic_LocalConfig), &meshtastic_LocalConfig_msg,\n                      &config) == LoadFileResult::LOAD_SUCCESS &&\n            config.has_security && config.security.private_key.size > 0) {\n            LOG_DEBUG(\"Saving backup of security config and keys\");\n            backupSecurity = config.security;\n        }\n        spiLock->lock();\n        rmDir(\"/prefs\");\n        spiLock->unlock();\n    } else {\n        spiLock->unlock();\n    }\n\n#endif\n    auto state = loadProto(nodeDatabaseFileName, getMaxNodesAllocatedSize(), sizeof(meshtastic_NodeDatabase),\n                           &meshtastic_NodeDatabase_msg, &nodeDatabase);\n    if (nodeDatabase.version < DEVICESTATE_MIN_VER) {\n        LOG_WARN(\"NodeDatabase %d is old, discard\", nodeDatabase.version);\n        installDefaultNodeDatabase();\n    } else {\n        meshNodes = &nodeDatabase.nodes;\n        numMeshNodes = nodeDatabase.nodes.size();\n        LOG_INFO(\"Loaded saved nodedatabase version %d, with nodes count: %d\", nodeDatabase.version, nodeDatabase.nodes.size());\n    }\n\n    if (numMeshNodes > MAX_NUM_NODES) {\n        LOG_WARN(\"Node count %d exceeds MAX_NUM_NODES %d, truncating\", numMeshNodes, MAX_NUM_NODES);\n        numMeshNodes = MAX_NUM_NODES;\n    }\n    meshNodes->resize(MAX_NUM_NODES);\n\n    // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM\n    state = loadProto(deviceStateFileName, meshtastic_DeviceState_size, sizeof(meshtastic_DeviceState),\n                      &meshtastic_DeviceState_msg, &devicestate);\n\n    // See https://github.com/meshtastic/firmware/issues/4184#issuecomment-2269390786\n    // It is very important to try and use the saved prefs even if we fail to read meshtastic_DeviceState.  Because most of our\n    // critical config may still be valid (in the other files - loaded next).\n    // Also, if we did fail on reading we probably failed on the enormous (and non critical) nodeDB.  So DO NOT install default\n    // device state.\n    // if (state != LoadFileResult::LOAD_SUCCESS) {\n    //    installDefaultDeviceState(); // Our in RAM copy might now be corrupt\n    //} else {\n    if ((state != LoadFileResult::LOAD_SUCCESS) || (devicestate.version < DEVICESTATE_MIN_VER)) {\n        LOG_WARN(\"Devicestate %d is old or invalid, discard\", devicestate.version);\n        installDefaultDeviceState();\n\n        // Attempt recovery of owner fields from our own NodeDB entry if available.\n        meshtastic_NodeInfoLite *us = getMeshNode(getNodeNum());\n        if (us && us->has_user) {\n            LOG_WARN(\"Restoring owner fields (long_name/short_name/is_licensed/is_unmessagable) from NodeDB for our node 0x%08x\",\n                     us->num);\n            memcpy(owner.long_name, us->user.long_name, sizeof(owner.long_name));\n            owner.long_name[sizeof(owner.long_name) - 1] = '\\0';\n            memcpy(owner.short_name, us->user.short_name, sizeof(owner.short_name));\n            owner.short_name[sizeof(owner.short_name) - 1] = '\\0';\n            owner.is_licensed = us->user.is_licensed;\n            owner.has_is_unmessagable = us->user.has_is_unmessagable;\n            owner.is_unmessagable = us->user.is_unmessagable;\n\n            // Save the recovered owner to device state on disk\n            saveToDisk(SEGMENT_DEVICESTATE);\n        }\n    } else {\n        LOG_INFO(\"Loaded saved devicestate version %d\", devicestate.version);\n    }\n\n    state = loadProto(configFileName, meshtastic_LocalConfig_size, sizeof(meshtastic_LocalConfig), &meshtastic_LocalConfig_msg,\n                      &config);\n    if (state != LoadFileResult::LOAD_SUCCESS) {\n        installDefaultConfig(); // Our in RAM copy might now be corrupt\n    } else {\n        if (config.version < DEVICESTATE_MIN_VER) {\n            LOG_WARN(\"config %d is old, discard\", config.version);\n            installDefaultConfig(true);\n        } else {\n            LOG_INFO(\"Loaded saved config version %d\", config.version);\n        }\n    }\n\n    // Coerce LoRa config fields derived from presets while bootstrapping.\n    // Some clients/UI components display bandwidth/spread_factor directly from config even in preset mode.\n    if (config.has_lora && config.lora.use_preset) {\n        RadioInterface::clampConfigLora(config.lora);\n    }\n\n#if defined(USERPREFS_LORA_TX_DISABLED) && USERPREFS_LORA_TX_DISABLED\n    config.lora.tx_enabled = false;\n#endif\n\n    if (backupSecurity.private_key.size > 0) {\n        LOG_DEBUG(\"Restoring backup of security config\");\n        config.security = backupSecurity;\n        saveToDisk(SEGMENT_CONFIG);\n    }\n\n    // Make sure we load hard coded admin keys even when the configuration file has none.\n    // Initialize admin_key_count to zero\n    byte numAdminKeys = 0;\n#if defined(USERPREFS_USE_ADMIN_KEY_0) || defined(USERPREFS_USE_ADMIN_KEY_1) || defined(USERPREFS_USE_ADMIN_KEY_2)\n    uint16_t sum = 0;\n#endif\n#ifdef USERPREFS_USE_ADMIN_KEY_0\n\n    for (uint8_t b = 0; b < 32; b++) {\n        sum += config.security.admin_key[0].bytes[b];\n    }\n    if (sum == 0) {\n        numAdminKeys += 1;\n        LOG_INFO(\"Admin 0 key zero. Loading hard coded key from user preferences.\");\n        memcpy(config.security.admin_key[0].bytes, userprefs_admin_key_0, 32);\n        config.security.admin_key[0].size = 32;\n    }\n#endif\n\n#ifdef USERPREFS_USE_ADMIN_KEY_1\n    sum = 0;\n    for (uint8_t b = 0; b < 32; b++) {\n        sum += config.security.admin_key[1].bytes[b];\n    }\n    if (sum == 0) {\n        numAdminKeys += 1;\n        LOG_INFO(\"Admin 1 key zero. Loading hard coded key from user preferences.\");\n        memcpy(config.security.admin_key[1].bytes, userprefs_admin_key_1, 32);\n        config.security.admin_key[1].size = 32;\n    }\n#endif\n\n#ifdef USERPREFS_USE_ADMIN_KEY_2\n    sum = 0;\n    for (uint8_t b = 0; b < 32; b++) {\n        sum += config.security.admin_key[2].bytes[b];\n    }\n    if (sum == 0) {\n        numAdminKeys += 1;\n        LOG_INFO(\"Admin 2 key zero. Loading hard coded key from user preferences.\");\n        memcpy(config.security.admin_key[2].bytes, userprefs_admin_key_2, 32);\n        config.security.admin_key[2].size = 32;\n    }\n#endif\n\n    if (numAdminKeys > 0) {\n        LOG_INFO(\"Saving %d hard coded admin keys.\", numAdminKeys);\n        config.security.admin_key_count = numAdminKeys;\n        saveToDisk(SEGMENT_CONFIG);\n    }\n\n    state = loadProto(moduleConfigFileName, meshtastic_LocalModuleConfig_size, sizeof(meshtastic_LocalModuleConfig),\n                      &meshtastic_LocalModuleConfig_msg, &moduleConfig);\n    if (state != LoadFileResult::LOAD_SUCCESS) {\n        installDefaultModuleConfig(); // Our in RAM copy might now be corrupt\n    } else {\n        if (moduleConfig.version < DEVICESTATE_MIN_VER) {\n            LOG_WARN(\"moduleConfig %d is old, discard\", moduleConfig.version);\n            installDefaultModuleConfig();\n        } else {\n            LOG_INFO(\"Loaded saved moduleConfig version %d\", moduleConfig.version);\n        }\n    }\n\n    state = loadProto(channelFileName, meshtastic_ChannelFile_size, sizeof(meshtastic_ChannelFile), &meshtastic_ChannelFile_msg,\n                      &channelFile);\n    if (state != LoadFileResult::LOAD_SUCCESS) {\n        installDefaultChannels(); // Our in RAM copy might now be corrupt\n    } else {\n        if (channelFile.version < DEVICESTATE_MIN_VER) {\n            LOG_WARN(\"channelFile %d is old, discard\", channelFile.version);\n            installDefaultChannels();\n        } else {\n            LOG_INFO(\"Loaded saved channelFile version %d\", channelFile.version);\n        }\n    }\n\n    state = loadProto(uiconfigFileName, meshtastic_DeviceUIConfig_size, sizeof(meshtastic_DeviceUIConfig),\n                      &meshtastic_DeviceUIConfig_msg, &uiconfig);\n    if (state == LoadFileResult::LOAD_SUCCESS) {\n        LOG_INFO(\"Loaded UIConfig\");\n    }\n\n    // 2.4.X - configuration migration to update new default intervals\n    if (moduleConfig.version < 23) {\n        LOG_DEBUG(\"ModuleConfig version %d is stale, upgrading to new default intervals\", moduleConfig.version);\n        moduleConfig.version = DEVICESTATE_CUR_VER;\n        if (moduleConfig.telemetry.device_update_interval == 900)\n            moduleConfig.telemetry.device_update_interval = 0;\n        if (moduleConfig.telemetry.environment_update_interval == 900)\n            moduleConfig.telemetry.environment_update_interval = 0;\n        if (moduleConfig.telemetry.air_quality_interval == 900)\n            moduleConfig.telemetry.air_quality_interval = 0;\n        if (moduleConfig.telemetry.power_update_interval == 900)\n            moduleConfig.telemetry.power_update_interval = 0;\n        if (moduleConfig.neighbor_info.update_interval == 900)\n            moduleConfig.neighbor_info.update_interval = 0;\n        if (moduleConfig.paxcounter.paxcounter_update_interval == 900)\n            moduleConfig.paxcounter.paxcounter_update_interval = 0;\n\n        saveToDisk(SEGMENT_MODULECONFIG);\n    }\n#if ARCH_PORTDUINO\n    // set any config overrides\n    if (portduino_config.has_configDisplayMode) {\n        config.display.displaymode = (_meshtastic_Config_DisplayConfig_DisplayMode)portduino_config.configDisplayMode;\n    }\n    if (portduino_config.has_statusMessage) {\n        moduleConfig.has_statusmessage = true;\n        strncpy(moduleConfig.statusmessage.node_status, portduino_config.statusMessage.c_str(),\n                sizeof(moduleConfig.statusmessage.node_status));\n        moduleConfig.statusmessage.node_status[sizeof(moduleConfig.statusmessage.node_status) - 1] = '\\0';\n    }\n    if (portduino_config.enable_UDP) {\n        config.network.enabled_protocols = meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST;\n    }\n\n#endif\n}\n\n/** Save a protobuf from a file, return true for success */\nbool NodeDB::saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct,\n                       bool fullAtomic)\n{\n\n    // do not try to save anything if power level is not safe. In many cases flash will be lock-protected\n    // and all writes will fail anyway. Device should be sleeping at this point anyway.\n    if (!powerHAL_isPowerLevelSafe()) {\n        LOG_ERROR(\"Error: trying to saveProto() on unsafe device power level.\");\n        return false;\n    }\n\n    bool okay = false;\n#ifdef FSCom\n    auto f = SafeFile(filename, fullAtomic);\n\n    LOG_INFO(\"Save %s\", filename);\n    pb_ostream_t stream = {&writecb, static_cast<Print *>(&f), protoSize};\n\n    if (!pb_encode(&stream, fields, dest_struct)) {\n        LOG_ERROR(\"Error: can't encode protobuf %s\", PB_GET_ERROR(&stream));\n    } else {\n        okay = true;\n    }\n\n    bool writeSucceeded = f.close();\n\n    if (!okay || !writeSucceeded) {\n        LOG_ERROR(\"Can't write prefs!\");\n    }\n#else\n    LOG_ERROR(\"ERROR: Filesystem not implemented\");\n#endif\n    return okay;\n}\n\nbool NodeDB::saveChannelsToDisk()\n{\n\n    // do not try to save anything if power level is not safe. In many cases flash will be lock-protected\n    // and all writes will fail anyway.\n    if (!powerHAL_isPowerLevelSafe()) {\n        LOG_ERROR(\"Error: trying to saveChannelsToDisk() on unsafe device power level.\");\n        return false;\n    }\n\n#ifdef FSCom\n    spiLock->lock();\n    FSCom.mkdir(\"/prefs\");\n    spiLock->unlock();\n#endif\n    return saveProto(channelFileName, meshtastic_ChannelFile_size, &meshtastic_ChannelFile_msg, &channelFile);\n}\n\nbool NodeDB::saveDeviceStateToDisk()\n{\n\n    // do not try to save anything if power level is not safe. In many cases flash will be lock-protected\n    // and all writes will fail anyway. Device should be sleeping at this point anyway.\n    if (!powerHAL_isPowerLevelSafe()) {\n        LOG_ERROR(\"Error: trying to saveDeviceStateToDisk() on unsafe device power level.\");\n        return false;\n    }\n\n#ifdef FSCom\n    spiLock->lock();\n    FSCom.mkdir(\"/prefs\");\n    spiLock->unlock();\n#endif\n    // Note: if MAX_NUM_NODES=100 and meshtastic_NodeInfoLite_size=166, so will be approximately 17KB\n    // Because so huge we _must_ not use fullAtomic, because the filesystem is probably too small to hold two copies of this\n    return saveProto(deviceStateFileName, meshtastic_DeviceState_size, &meshtastic_DeviceState_msg, &devicestate, true);\n}\n\nbool NodeDB::saveNodeDatabaseToDisk()\n{\n\n    // do not try to save anything if power level is not safe. In many cases flash will be lock-protected\n    // and all writes will fail anyway. Device should be sleeping at this point anyway.\n    if (!powerHAL_isPowerLevelSafe()) {\n        LOG_ERROR(\"Error: trying to saveNodeDatabaseToDisk() on unsafe device power level.\");\n        return false;\n    }\n\n#ifdef FSCom\n    spiLock->lock();\n    FSCom.mkdir(\"/prefs\");\n    spiLock->unlock();\n#endif\n    size_t nodeDatabaseSize;\n    pb_get_encoded_size(&nodeDatabaseSize, meshtastic_NodeDatabase_fields, &nodeDatabase);\n    return saveProto(nodeDatabaseFileName, nodeDatabaseSize, &meshtastic_NodeDatabase_msg, &nodeDatabase, false);\n}\n\nbool NodeDB::saveToDiskNoRetry(int saveWhat)\n{\n\n    // do not try to save anything if power level is not safe. In many cases flash will be lock-protected\n    // and all writes will fail anyway. Device should be sleeping at this point anyway.\n    if (!powerHAL_isPowerLevelSafe()) {\n        LOG_ERROR(\"Error: trying to saveToDiskNoRetry() on unsafe device power level.\");\n        return false;\n    }\n\n    bool success = true;\n#ifdef FSCom\n    spiLock->lock();\n    FSCom.mkdir(\"/prefs\");\n    spiLock->unlock();\n#endif\n    if (saveWhat & SEGMENT_CONFIG) {\n        config.has_device = true;\n        config.has_display = true;\n        config.has_lora = true;\n        config.has_position = true;\n        config.has_power = true;\n        config.has_network = true;\n        config.has_bluetooth = true;\n        config.has_security = true;\n\n        success &= saveProto(configFileName, meshtastic_LocalConfig_size, &meshtastic_LocalConfig_msg, &config);\n    }\n\n    if (saveWhat & SEGMENT_MODULECONFIG) {\n        moduleConfig.has_canned_message = true;\n        moduleConfig.has_external_notification = true;\n        moduleConfig.has_mqtt = true;\n        moduleConfig.has_range_test = true;\n        moduleConfig.has_serial = true;\n        moduleConfig.has_store_forward = true;\n        moduleConfig.has_telemetry = true;\n        moduleConfig.has_neighbor_info = true;\n        moduleConfig.has_detection_sensor = true;\n        moduleConfig.has_ambient_lighting = true;\n        moduleConfig.has_audio = true;\n        moduleConfig.has_paxcounter = true;\n        moduleConfig.has_statusmessage = true;\n\n        success &=\n            saveProto(moduleConfigFileName, meshtastic_LocalModuleConfig_size, &meshtastic_LocalModuleConfig_msg, &moduleConfig);\n    }\n\n    if (saveWhat & SEGMENT_CHANNELS) {\n        success &= saveChannelsToDisk();\n    }\n\n    if (saveWhat & SEGMENT_DEVICESTATE) {\n        success &= saveDeviceStateToDisk();\n    }\n\n    if (saveWhat & SEGMENT_NODEDATABASE) {\n        success &= saveNodeDatabaseToDisk();\n    }\n\n    return success;\n}\n\nbool NodeDB::saveToDisk(int saveWhat)\n{\n    LOG_DEBUG(\"Save to disk %d\", saveWhat);\n\n    // do not try to save anything if power level is not safe. In many cases flash will be lock-protected\n    // and all writes will fail anyway. Device should be sleeping at this point anyway.\n    if (!powerHAL_isPowerLevelSafe()) {\n        LOG_ERROR(\"Error: trying to saveToDisk() on unsafe device power level.\");\n        return false;\n    }\n\n    bool success = saveToDiskNoRetry(saveWhat);\n\n    if (!success) {\n        LOG_ERROR(\"Failed to save to disk, retrying\");\n#ifdef ARCH_NRF52 // @geeksville is not ready yet to say we should do this on other platforms.  See bug #4184 discussion\n        spiLock->lock();\n        FSCom.format();\n        spiLock->unlock();\n\n#endif\n        success = saveToDiskNoRetry(saveWhat);\n\n        RECORD_CRITICALERROR(success ? meshtastic_CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE\n                                     : meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE);\n    }\n\n    return success;\n}\n\nconst meshtastic_NodeInfoLite *NodeDB::readNextMeshNode(uint32_t &readIndex)\n{\n    if (readIndex < numMeshNodes)\n        return &meshNodes->at(readIndex++);\n    else\n        return NULL;\n}\n\n/// Given a node, return how many seconds in the past (vs now) that we last heard from it\nuint32_t sinceLastSeen(const meshtastic_NodeInfoLite *n)\n{\n    uint32_t now = getTime();\n\n    int delta = (int)(now - n->last_heard);\n    if (delta < 0) // our clock must be slightly off still - not set from GPS yet\n        delta = 0;\n\n    return delta;\n}\n\nuint32_t sinceReceived(const meshtastic_MeshPacket *p)\n{\n    uint32_t now = getTime();\n\n    int delta = (int)(now - p->rx_time);\n    if (delta < 0) // our clock must be slightly off still - not set from GPS yet\n        delta = 0;\n\n    return delta;\n}\n\nHopStartStatus classifyHopStart(const meshtastic_MeshPacket &p)\n{\n    // Guard against invalid values.\n    if (p.hop_start < p.hop_limit)\n        return HopStartStatus::INVALID;\n\n    if (p.hop_start == 0) {\n        // Firmware prior to 2.3.0 (585805c) lacked a hop_start field. Firmware version 2.5.0 (bf34329) introduced a\n        // bitfield that is always present. Use the presence of the bitfield to determine if the origin's firmware\n        // version is guaranteed to have hop_start populated. Note that this can only be done for decoded packets as\n        // the bitfield is encrypted under the channel encryption key.\n        if (p.which_payload_variant == meshtastic_MeshPacket_decoded_tag && p.decoded.has_bitfield)\n            return HopStartStatus::VALID;\n        return HopStartStatus::MISSING_OR_UNKNOWN;\n    }\n\n    return HopStartStatus::VALID;\n}\n\nint8_t getHopsAway(const meshtastic_MeshPacket &p, int8_t defaultIfUnknown)\n{\n    // Firmware prior to 2.3.0 (585805c) lacked a hop_start field. Firmware version 2.5.0 (bf34329) introduced a\n    // bitfield that is always present. Use the presence of the bitfield to determine if the origin's firmware\n    // version is guaranteed to have hop_start populated. Note that this can only be done for decoded packets as\n    // the bitfield is encrypted under the channel encryption key. For encrypted packets, this returns\n    // defaultIfUnknown when hop_start is 0.\n    if (p.hop_start == 0 && !(p.which_payload_variant == meshtastic_MeshPacket_decoded_tag && p.decoded.has_bitfield))\n        return defaultIfUnknown; // Cannot reliably determine the number of hops.\n\n    // Guard against invalid values.\n    if (p.hop_start < p.hop_limit)\n        return defaultIfUnknown;\n\n    return p.hop_start - p.hop_limit;\n}\n\n#define NUM_ONLINE_SECS (60 * 60 * 2) // 2 hrs to consider someone offline\n\nsize_t NodeDB::getNumOnlineMeshNodes(bool localOnly)\n{\n    size_t numseen = 0;\n\n    // FIXME this implementation is kinda expensive\n    for (int i = 0; i < numMeshNodes; i++) {\n        if (localOnly && meshNodes->at(i).via_mqtt)\n            continue;\n        if (sinceLastSeen(&meshNodes->at(i)) < NUM_ONLINE_SECS)\n            numseen++;\n    }\n\n    return numseen;\n}\n\n#include \"MeshModule.h\"\n#include \"Throttle.h\"\n\nstatic constexpr uint32_t HOPSTART_DROP_LOG_INTERVAL_MS = 15000;\n\nvoid logHopStartDrop(const meshtastic_MeshPacket &p, const char *context)\n{\n    static uint32_t lastLogMs = 0;\n    if (Throttle::isWithinTimespanMs(lastLogMs, HOPSTART_DROP_LOG_INTERVAL_MS)) {\n        return;\n    }\n    lastLogMs = millis();\n    const bool decoded = (p.which_payload_variant == meshtastic_MeshPacket_decoded_tag);\n    const bool hasBitfield = decoded && p.decoded.has_bitfield;\n    LOG_DEBUG(\n        \"Drop packet (%s): hop_start invalid/missing (from=0x%x id=%u hop_start=%u hop_limit=%u decoded=%d has_bitfield=%d)\",\n        context ? context : \"unknown\", p.from, p.id, p.hop_start, p.hop_limit, decoded, hasBitfield);\n}\n\n/** Update position info for this node based on received position data\n */\nvoid NodeDB::updatePosition(uint32_t nodeId, const meshtastic_Position &p, RxSource src)\n{\n    meshtastic_NodeInfoLite *info = getOrCreateMeshNode(nodeId);\n    if (!info) {\n        return;\n    }\n\n    if (src == RX_SRC_LOCAL) {\n        // Local packet, fully authoritative\n        LOG_INFO(\"updatePosition LOCAL pos@%x time=%u lat=%d lon=%d alt=%d\", p.timestamp, p.time, p.latitude_i, p.longitude_i,\n                 p.altitude);\n\n        setLocalPosition(p);\n        info->position = TypeConversions::ConvertToPositionLite(p);\n    } else if ((p.time > 0) && !p.latitude_i && !p.longitude_i && !p.timestamp && !p.location_source) {\n        // FIXME SPECIAL TIME SETTING PACKET FROM EUD TO RADIO\n        // (stop-gap fix for issue #900)\n        LOG_DEBUG(\"updatePosition SPECIAL time setting time=%u\", p.time);\n        info->position.time = p.time;\n    } else {\n        // Be careful to only update fields that have been set by the REMOTE sender\n        // A lot of position reports don't have time populated.  In that case, be careful to not blow away the time we\n        // recorded based on the packet rxTime\n        //\n        // FIXME perhaps handle RX_SRC_USER separately?\n        LOG_INFO(\"updatePosition REMOTE node=0x%x time=%u lat=%d lon=%d\", nodeId, p.time, p.latitude_i, p.longitude_i);\n\n        // First, back up fields that we want to protect from overwrite\n        uint32_t tmp_time = info->position.time;\n\n        // Next, update atomically\n        info->position = TypeConversions::ConvertToPositionLite(p);\n\n        // Last, restore any fields that may have been overwritten\n        if (!info->position.time)\n            info->position.time = tmp_time;\n    }\n    info->has_position = true;\n    updateGUIforNode = info;\n    notifyObservers(true); // Force an update whether or not our node counts have changed\n}\n\n/** Update telemetry info for this node based on received metrics\n *  We only care about device telemetry here\n */\nvoid NodeDB::updateTelemetry(uint32_t nodeId, const meshtastic_Telemetry &t, RxSource src)\n{\n    meshtastic_NodeInfoLite *info = getOrCreateMeshNode(nodeId);\n    // Environment metrics should never go to NodeDb but we'll safegaurd anyway\n    if (!info || t.which_variant != meshtastic_Telemetry_device_metrics_tag) {\n        return;\n    }\n\n    if (src == RX_SRC_LOCAL) {\n        // Local packet, fully authoritative\n        LOG_DEBUG(\"updateTelemetry LOCAL\");\n    } else {\n        LOG_DEBUG(\"updateTelemetry REMOTE node=0x%x \", nodeId);\n    }\n    info->device_metrics = t.variant.device_metrics;\n    info->has_device_metrics = true;\n    updateGUIforNode = info;\n    notifyObservers(true); // Force an update whether or not our node counts have changed\n}\n\n/**\n * Update the node database with a new contact\n */\nvoid NodeDB::addFromContact(meshtastic_SharedContact contact)\n{\n    meshtastic_NodeInfoLite *info = getOrCreateMeshNode(contact.node_num);\n    if (!info || !contact.has_user) {\n        return;\n    }\n    // If the local node has this node marked as manually verified\n    // and the client does not, do not allow the client to update the\n    // saved public key.\n    if ((info->bitfield & NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK) && !contact.manually_verified) {\n        if (contact.user.public_key.size != info->user.public_key.size ||\n            memcmp(contact.user.public_key.bytes, info->user.public_key.bytes, info->user.public_key.size) != 0) {\n            return;\n        }\n    }\n    info->num = contact.node_num;\n    info->has_user = true;\n    info->user = TypeConversions::ConvertToUserLite(contact.user);\n    if (contact.should_ignore) {\n        // If should_ignore is set,\n        // we need to clear the public key and other cruft, in addition to setting the node as ignored\n        info->is_ignored = true;\n        info->is_favorite = false;\n        info->has_device_metrics = false;\n        info->has_position = false;\n        info->user.public_key.size = 0;\n        memset(info->user.public_key.bytes, 0, sizeof(info->user.public_key.bytes));\n    } else {\n        /* Clients are sending add_contact before every text message DM (because clients may hold a larger node database with\n         * public keys than the radio holds). However, we don't want to update last_heard just because we sent someone a DM!\n         */\n\n        /* \"Boring old nodes\" are the first to be evicted out of the node database when full. This includes a newly-zeroed\n         * nodeinfo because it has: !is_favorite && last_heard==0. To keep this from happening when we addFromContact, we set the\n         * new node as a favorite, and we leave last_heard alone (even if it's zero).\n         */\n        if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT_BASE) {\n            // Special case for CLIENT_BASE: is_favorite has special meaning, and we don't want to automatically set it\n            // without the user doing so deliberately. We don't normally expect users to use a CLIENT_BASE to send DMs or to add\n            // contacts, but we should make sure it doesn't auto-favorite in case they do. Instead, as a workaround, we'll set\n            // last_heard to now, so that the add_contact node doesn't immediately get evicted.\n            info->last_heard = getTime();\n        } else {\n            // Normal case: set is_favorite to prevent expiration.\n            // last_heard will remain as-is (or remain 0 if this entry wasn't in the nodeDB).\n            info->is_favorite = true;\n        }\n\n        // As the clients will begin sending the contact with DMs, we want to strictly check if the node is manually verified\n        if (contact.manually_verified) {\n            info->bitfield |= NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK;\n        }\n        // Mark the node's key as manually verified to indicate trustworthiness.\n        updateGUIforNode = info;\n        sortMeshDB();\n        notifyObservers(true); // Force an update whether or not our node counts have changed\n    }\n    saveNodeDatabaseToDisk();\n}\n\n/** Update user info and channel for this node based on received user data\n */\nbool NodeDB::updateUser(uint32_t nodeId, meshtastic_User &p, uint8_t channelIndex)\n{\n    meshtastic_NodeInfoLite *info = getOrCreateMeshNode(nodeId);\n    if (!info) {\n        return false;\n    }\n\n#if !(MESHTASTIC_EXCLUDE_PKI)\n    if (p.public_key.size == 32 && nodeId != nodeDB->getNodeNum()) {\n        printBytes(\"Incoming Pubkey: \", p.public_key.bytes, 32);\n\n        // Alert the user if a remote node is advertising public key that matches our own\n        if (owner.public_key.size == 32 && memcmp(p.public_key.bytes, owner.public_key.bytes, 32) == 0) {\n            if (!duplicateWarned) {\n                duplicateWarned = true;\n                char warning[] =\n                    \"Remote device %s has advertised your public key. This may indicate a compromised key. You may need \"\n                    \"to regenerate your public keys.\";\n                LOG_WARN(warning, p.long_name);\n                meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n                cn->level = meshtastic_LogRecord_Level_WARNING;\n                cn->time = getValidTime(RTCQualityFromNet);\n                sprintf(cn->message, warning, p.long_name);\n                service->sendClientNotification(cn);\n            }\n            return false;\n        }\n    }\n    if (info->user.public_key.size == 32) { // if we have a key for this user already, don't overwrite with a new one\n        // if the key doesn't match, don't update nodeDB at all.\n        if (p.public_key.size != 32 || (memcmp(p.public_key.bytes, info->user.public_key.bytes, 32) != 0)) {\n            LOG_WARN(\"Public Key mismatch, dropping NodeInfo\");\n            return false;\n        }\n        LOG_INFO(\"Public Key set for node, not updating!\");\n    } else if (p.public_key.size == 32) {\n        LOG_INFO(\"Update Node Pubkey!\");\n    }\n#endif\n\n    // Always ensure user.id is derived from nodeId, regardless of what was received\n    snprintf(p.id, sizeof(p.id), \"!%08x\", nodeId);\n\n    // Both of info->user and p start as filled with zero so I think this is okay\n    auto lite = TypeConversions::ConvertToUserLite(p);\n    bool changed = memcmp(&info->user, &lite, sizeof(info->user)) || (info->channel != channelIndex);\n\n    info->user = lite;\n    if (info->user.public_key.size == 32) {\n        printBytes(\"Saved Pubkey: \", info->user.public_key.bytes, 32);\n    }\n    if (nodeId != getNodeNum())\n        info->channel = channelIndex; // Set channel we need to use to reach this node (but don't set our own channel)\n    LOG_DEBUG(\"Update changed=%d user %s/%s, id=0x%08x, channel=%d\", changed, info->user.long_name, info->user.short_name, nodeId,\n              info->channel);\n    info->has_user = true;\n\n    if (changed) {\n        updateGUIforNode = info;\n        notifyObservers(true); // Force an update whether or not our node counts have changed\n\n        // We just changed something about a User,\n        // store our DB unless we just did so less than a minute ago\n\n        if (!Throttle::isWithinTimespanMs(lastNodeDbSave, ONE_MINUTE_MS)) {\n            saveToDisk(SEGMENT_NODEDATABASE);\n            lastNodeDbSave = millis();\n        } else {\n            LOG_DEBUG(\"Defer NodeDB saveToDisk for now\");\n        }\n    }\n\n    return changed;\n}\n\n/// given a subpacket sniffed from the network, update our DB state\n/// we updateGUI and updateGUIforNode if we think our this change is big enough for a redraw\nvoid NodeDB::updateFrom(const meshtastic_MeshPacket &mp)\n{\n    if (mp.from == getNodeNum()) {\n        LOG_DEBUG(\"Ignore update from self\");\n        return;\n    }\n    if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.from) {\n        LOG_DEBUG(\"Update DB node 0x%x, rx_time=%u\", mp.from, mp.rx_time);\n\n        meshtastic_NodeInfoLite *info = getOrCreateMeshNode(getFrom(&mp));\n        if (!info) {\n            return;\n        }\n\n        if (mp.rx_time) // if the packet has a valid timestamp use it to update our last_heard\n            info->last_heard = mp.rx_time;\n\n        if (mp.rx_snr)\n            info->snr = mp.rx_snr; // keep the most recent SNR we received for this node.\n\n        info->via_mqtt = mp.via_mqtt; // Store if we received this packet via MQTT\n\n        // If hopStart was set and there wasn't someone messing with the limit in the middle, add hopsAway\n        const int8_t hopsAway = getHopsAway(mp);\n        if (hopsAway >= 0) {\n            info->has_hops_away = true;\n            info->hops_away = hopsAway;\n        }\n        sortMeshDB();\n    }\n}\n\nvoid NodeDB::set_favorite(bool is_favorite, uint32_t nodeId)\n{\n    meshtastic_NodeInfoLite *lite = getMeshNode(nodeId);\n    if (lite && lite->is_favorite != is_favorite) {\n        lite->is_favorite = is_favorite;\n        sortMeshDB();\n        saveNodeDatabaseToDisk();\n    }\n}\n\nbool NodeDB::isFavorite(uint32_t nodeId)\n{\n    // returns true if nodeId is_favorite; false if not or not found\n\n    // NODENUM_BROADCAST will never be in the DB\n    if (nodeId == NODENUM_BROADCAST)\n        return false;\n\n    meshtastic_NodeInfoLite *lite = getMeshNode(nodeId);\n\n    if (lite) {\n        return lite->is_favorite;\n    }\n    return false;\n}\n\nbool NodeDB::isFromOrToFavoritedNode(const meshtastic_MeshPacket &p)\n{\n    // This method is logically equivalent to:\n    //   return isFavorite(p.from) || isFavorite(p.to);\n    // but is more efficient by:\n    //   1. doing only one pass through the database, instead of two\n    //   2. exiting early when a favorite is found, or if both from and to have been seen\n\n    if (p.to == NODENUM_BROADCAST)\n        return isFavorite(p.from); // we never store NODENUM_BROADCAST in the DB, so we only need to check p.from\n\n    meshtastic_NodeInfoLite *lite = NULL;\n\n    bool seenFrom = false;\n    bool seenTo = false;\n\n    for (int i = 0; i < numMeshNodes; i++) {\n        lite = &meshNodes->at(i);\n\n        if (lite->num == p.from) {\n            if (lite->is_favorite)\n                return true;\n\n            seenFrom = true;\n        }\n\n        if (lite->num == p.to) {\n            if (lite->is_favorite)\n                return true;\n\n            seenTo = true;\n        }\n\n        if (seenFrom && seenTo)\n            return false; // we've seen both, and neither is a favorite, so we can stop searching early\n\n        // Note: if we knew that sortMeshDB was always called after any change to is_favorite, we could exit early after searching\n        // all favorited nodes first.\n    }\n\n    return false;\n}\n\nvoid NodeDB::pause_sort(bool paused)\n{\n    sortingIsPaused = paused;\n}\n\nvoid NodeDB::sortMeshDB()\n{\n    if (!sortingIsPaused && (lastSort == 0 || !Throttle::isWithinTimespanMs(lastSort, 1000 * 5))) {\n        lastSort = millis();\n        bool changed = true;\n        while (changed) { // dumb reverse bubble sort, but probably not bad for what we're doing\n            changed = false;\n            for (int i = numMeshNodes - 1; i > 0; i--) { // lowest case this should examine is i == 1\n                if (meshNodes->at(i - 1).num == getNodeNum()) {\n                    // noop\n                } else if (meshNodes->at(i).num ==\n                           getNodeNum()) { // in the oddball case our own node num is not at location 0, put it there\n                    // TODO: Look for at(i-1) also matching own node num, and throw the DB in the trash\n                    std::swap(meshNodes->at(i), meshNodes->at(i - 1));\n                    changed = true;\n                } else if (meshNodes->at(i).is_favorite && !meshNodes->at(i - 1).is_favorite) {\n                    std::swap(meshNodes->at(i), meshNodes->at(i - 1));\n                    changed = true;\n                } else if (!meshNodes->at(i).is_favorite && meshNodes->at(i - 1).is_favorite) {\n                    // noop\n                } else if (meshNodes->at(i).last_heard > meshNodes->at(i - 1).last_heard) {\n                    std::swap(meshNodes->at(i), meshNodes->at(i - 1));\n                    changed = true;\n                }\n            }\n        }\n        LOG_INFO(\"Sort took %u milliseconds\", millis() - lastSort);\n    }\n}\n\nuint8_t NodeDB::getMeshNodeChannel(NodeNum n)\n{\n    const meshtastic_NodeInfoLite *info = getMeshNode(n);\n    if (!info) {\n        return 0; // defaults to PRIMARY\n    }\n    return info->channel;\n}\n\nstd::string NodeDB::getNodeId() const\n{\n    char nodeId[16];\n    snprintf(nodeId, sizeof(nodeId), \"!%08x\", myNodeInfo.my_node_num);\n    return std::string(nodeId);\n}\n\n/// Find a node in our DB, return null for missing\n/// NOTE: This function might be called from an ISR\nmeshtastic_NodeInfoLite *NodeDB::getMeshNode(NodeNum n)\n{\n    for (int i = 0; i < numMeshNodes; i++)\n        if (meshNodes->at(i).num == n)\n            return &meshNodes->at(i);\n\n    return NULL;\n}\n\n// returns true if the maximum number of nodes is reached or we are running low on memory\nbool NodeDB::isFull()\n{\n    return (numMeshNodes >= MAX_NUM_NODES) || (memGet.getFreeHeap() < MINIMUM_SAFE_FREE_HEAP);\n}\n\n/// Find a node in our DB, create an empty NodeInfo if missing\nmeshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)\n{\n    meshtastic_NodeInfoLite *lite = getMeshNode(n);\n\n    if (!lite) {\n        if (isFull()) {\n            LOG_INFO(\"Node database full with %i nodes and %u bytes free. Erasing oldest entry\", numMeshNodes,\n                     memGet.getFreeHeap());\n            // look for oldest node and erase it\n            uint32_t oldest = UINT32_MAX;\n            uint32_t oldestBoring = UINT32_MAX;\n            int oldestIndex = -1;\n            int oldestBoringIndex = -1;\n            for (int i = 1; i < numMeshNodes; i++) {\n                // Simply the oldest non-favorite, non-ignored, non-verified node\n                if (!meshNodes->at(i).is_favorite && !meshNodes->at(i).is_ignored &&\n                    !(meshNodes->at(i).bitfield & NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK) &&\n                    meshNodes->at(i).last_heard < oldest) {\n                    oldest = meshNodes->at(i).last_heard;\n                    oldestIndex = i;\n                }\n                // The oldest \"boring\" node\n                if (!meshNodes->at(i).is_favorite && !meshNodes->at(i).is_ignored && meshNodes->at(i).user.public_key.size == 0 &&\n                    meshNodes->at(i).last_heard < oldestBoring) {\n                    oldestBoring = meshNodes->at(i).last_heard;\n                    oldestBoringIndex = i;\n                }\n            }\n            // if we found a \"boring\" node, evict it\n            if (oldestBoringIndex != -1) {\n                oldestIndex = oldestBoringIndex;\n            }\n\n            if (oldestIndex != -1) {\n                // Shove the remaining nodes down the chain\n                for (int i = oldestIndex; i < numMeshNodes - 1; i++) {\n                    meshNodes->at(i) = meshNodes->at(i + 1);\n                }\n                (numMeshNodes)--;\n            }\n        }\n        // add the node at the end\n        lite = &meshNodes->at((numMeshNodes)++);\n\n        // everything is missing except the nodenum\n        memset(lite, 0, sizeof(*lite));\n        lite->num = n;\n        LOG_INFO(\"Adding node to database with %i nodes and %u bytes free!\", numMeshNodes, memGet.getFreeHeap());\n    }\n\n    return lite;\n}\n\n/// Sometimes we will have Position objects that only have a time, so check for\n/// valid lat/lon\nbool NodeDB::hasValidPosition(const meshtastic_NodeInfoLite *n)\n{\n    return n->has_position && (n->position.latitude_i != 0 || n->position.longitude_i != 0);\n}\n\n/// If we have a node / user and they report is_licensed = true\n/// we consider them licensed\nUserLicenseStatus NodeDB::getLicenseStatus(uint32_t nodeNum)\n{\n    meshtastic_NodeInfoLite *info = getMeshNode(nodeNum);\n    if (!info || !info->has_user) {\n        return UserLicenseStatus::NotKnown;\n    }\n    return info->user.is_licensed ? UserLicenseStatus::Licensed : UserLicenseStatus::NotLicensed;\n}\n\n#if !defined(MESHTASTIC_EXCLUDE_PKI)\nbool NodeDB::checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t &keyToTest)\n{\n    if (keyToTest.size == 32) {\n        uint8_t keyHash[32] = {0};\n        memcpy(keyHash, keyToTest.bytes, keyToTest.size);\n        crypto->hash(keyHash, 32);\n        for (uint16_t i = 0; i < sizeof(LOW_ENTROPY_HASHES) / sizeof(LOW_ENTROPY_HASHES[0]); i++) {\n            if (memcmp(keyHash, LOW_ENTROPY_HASHES[i], sizeof(LOW_ENTROPY_HASHES[0])) == 0) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n#endif\n\nbool NodeDB::backupPreferences(meshtastic_AdminMessage_BackupLocation location)\n{\n    bool success = false;\n    lastBackupAttempt = millis();\n#ifdef FSCom\n    if (location == meshtastic_AdminMessage_BackupLocation_FLASH) {\n        meshtastic_BackupPreferences backup = meshtastic_BackupPreferences_init_zero;\n        backup.version = DEVICESTATE_CUR_VER;\n        backup.timestamp = getValidTime(RTCQuality::RTCQualityDevice, false);\n        backup.has_config = true;\n        backup.config = config;\n        backup.has_module_config = true;\n        backup.module_config = moduleConfig;\n        backup.has_channels = true;\n        backup.channels = channelFile;\n        backup.has_owner = true;\n        backup.owner = owner;\n\n        size_t backupSize;\n        pb_get_encoded_size(&backupSize, meshtastic_BackupPreferences_fields, &backup);\n\n        spiLock->lock();\n        FSCom.mkdir(\"/backups\");\n        spiLock->unlock();\n        success = saveProto(backupFileName, backupSize, &meshtastic_BackupPreferences_msg, &backup);\n\n        if (success) {\n            LOG_INFO(\"Saved backup preferences\");\n        } else {\n            LOG_ERROR(\"Failed to save backup preferences to file\");\n        }\n    } else if (location == meshtastic_AdminMessage_BackupLocation_SD) {\n        // TODO: After more mainline SD card support\n    }\n#endif\n    return success;\n}\n\nbool NodeDB::restorePreferences(meshtastic_AdminMessage_BackupLocation location, int restoreWhat)\n{\n    bool success = false;\n#ifdef FSCom\n    if (location == meshtastic_AdminMessage_BackupLocation_FLASH) {\n        spiLock->lock();\n        if (!FSCom.exists(backupFileName)) {\n            spiLock->unlock();\n            LOG_WARN(\"Could not restore. No backup file found\");\n            return false;\n        } else {\n            spiLock->unlock();\n        }\n        meshtastic_BackupPreferences backup = meshtastic_BackupPreferences_init_zero;\n        success = loadProto(backupFileName, meshtastic_BackupPreferences_size, sizeof(meshtastic_BackupPreferences),\n                            &meshtastic_BackupPreferences_msg, &backup);\n        if (success) {\n            if (restoreWhat & SEGMENT_CONFIG) {\n                config = backup.config;\n                LOG_DEBUG(\"Restored config\");\n            }\n            if (restoreWhat & SEGMENT_MODULECONFIG) {\n                moduleConfig = backup.module_config;\n                LOG_DEBUG(\"Restored module config\");\n            }\n            if (restoreWhat & SEGMENT_DEVICESTATE) {\n                devicestate.owner = backup.owner;\n                LOG_DEBUG(\"Restored device state\");\n            }\n            if (restoreWhat & SEGMENT_CHANNELS) {\n                channelFile = backup.channels;\n                LOG_DEBUG(\"Restored channels\");\n            }\n\n            success = saveToDisk(restoreWhat);\n            if (success) {\n                LOG_INFO(\"Restored preferences from backup\");\n            } else {\n                LOG_ERROR(\"Failed to save restored preferences to flash\");\n            }\n        } else {\n            LOG_ERROR(\"Failed to restore preferences from backup file\");\n        }\n    } else if (location == meshtastic_AdminMessage_BackupLocation_SD) {\n        // TODO: After more mainline SD card support\n    }\n#endif\n    return success;\n}\n\n/// Record an error that should be reported via analytics\nvoid recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, const char *filename)\n{\n    if (filename) {\n        LOG_ERROR(\"NOTE! Record critical error %d at %s:%lu\", code, filename, address);\n    } else {\n        LOG_ERROR(\"NOTE! Record critical error %d, address=0x%lx\", code, address);\n    }\n\n    // Record error to DB\n    error_code = code;\n    error_address = address;\n\n    // Currently portuino is mostly used for simulation.  Make sure the user notices something really bad happened\n#ifdef ARCH_PORTDUINO\n    LOG_ERROR(\"A critical failure occurred\");\n    // TODO: Determine if other critical errors should also cause an immediate exit\n    if (code == meshtastic_CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE ||\n        code == meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE)\n        exit(2);\n#endif\n}\n"
  },
  {
    "path": "src/mesh/NodeDB.h",
    "content": "#pragma once\n\n#include \"Observer.h\"\n#include <Arduino.h>\n#include <algorithm>\n#include <assert.h>\n#include <pb_encode.h>\n#include <string>\n#include <vector>\n\n#include \"MeshTypes.h\"\n#include \"NodeStatus.h\"\n#include \"configuration.h\"\n#include \"mesh-pb-constants.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\" // For CriticalErrorCode\n\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#endif\n\n#if !defined(MESHTASTIC_EXCLUDE_PKI)\n// E3B0C442 is the blank hash\nstatic const uint8_t LOW_ENTROPY_HASHES[][32] = {\n    {0xf4, 0x7e, 0xcc, 0x17, 0xe6, 0xb4, 0xa3, 0x22, 0xec, 0xee, 0xd9, 0x08, 0x4f, 0x39, 0x63, 0xea,\n     0x80, 0x75, 0xe1, 0x24, 0xce, 0x05, 0x36, 0x69, 0x63, 0xb2, 0xcb, 0xc0, 0x28, 0xd3, 0x34, 0x8b},\n    {0x5a, 0x9e, 0xa2, 0xa6, 0x8a, 0xa6, 0x66, 0xc1, 0x5f, 0x55, 0x00, 0x64, 0xa3, 0xa6, 0xfe, 0x71,\n     0xc0, 0xbb, 0x82, 0xc3, 0x32, 0x3d, 0x7a, 0x7a, 0xe3, 0x6e, 0xfd, 0xdd, 0xad, 0x3a, 0x66, 0xb9},\n    {0xb3, 0xdf, 0x3b, 0x2e, 0x67, 0xb6, 0xd5, 0xf8, 0xdf, 0x76, 0x2c, 0x45, 0x5e, 0x2e, 0xbd, 0x16,\n     0xc5, 0xf8, 0x67, 0xaa, 0x15, 0xf8, 0x92, 0x0b, 0xdf, 0x5a, 0x66, 0x50, 0xac, 0x0d, 0xbb, 0x2f},\n    {0x3b, 0x8f, 0x86, 0x3a, 0x38, 0x1f, 0x77, 0x39, 0xa9, 0x4e, 0xef, 0x91, 0x18, 0x5a, 0x62, 0xe1,\n     0xaa, 0x9d, 0x36, 0xea, 0xce, 0x60, 0x35, 0x8d, 0x9d, 0x1f, 0xf4, 0xb8, 0xc9, 0x13, 0x6a, 0x5d},\n    {0x36, 0x7e, 0x2d, 0xe1, 0x84, 0x5f, 0x42, 0x52, 0x29, 0x11, 0x0a, 0x25, 0x64, 0x54, 0x6a, 0x6b,\n     0xfd, 0xb6, 0x65, 0xff, 0x15, 0x1a, 0x51, 0x71, 0x22, 0x40, 0x57, 0xf6, 0x91, 0x9b, 0x64, 0x58},\n    {0x16, 0x77, 0xeb, 0xa4, 0x52, 0x91, 0xfb, 0x26, 0xcf, 0x8f, 0xd7, 0xd9, 0xd1, 0x5d, 0xc4, 0x68,\n     0x73, 0x75, 0xed, 0xc5, 0x95, 0x58, 0xee, 0x90, 0x56, 0xd4, 0x2f, 0x31, 0x29, 0xf7, 0x8c, 0x1f},\n    {0x31, 0x8c, 0xa9, 0x5e, 0xed, 0x3c, 0x12, 0xbf, 0x97, 0x9c, 0x47, 0x8e, 0x98, 0x9d, 0xc2, 0x3e,\n     0x86, 0x23, 0x90, 0x29, 0xc8, 0xb0, 0x20, 0xf8, 0xb1, 0xb0, 0xaa, 0x19, 0x2a, 0xcf, 0x0a, 0x54},\n    {0xa4, 0x8a, 0x99, 0x0e, 0x51, 0xdc, 0x12, 0x20, 0xf3, 0x13, 0xf5, 0x2b, 0x3a, 0xe2, 0x43, 0x42,\n     0xc6, 0x52, 0x98, 0xcd, 0xbb, 0xca, 0xb1, 0x31, 0xa0, 0xd4, 0xd6, 0x30, 0xf3, 0x27, 0xfb, 0x49},\n    {0xd2, 0x3f, 0x13, 0x8d, 0x22, 0x04, 0x8d, 0x07, 0x59, 0x58, 0xa0, 0xf9, 0x55, 0xcf, 0x30, 0xa0,\n     0x2e, 0x2f, 0xca, 0x80, 0x20, 0xe4, 0xde, 0xa1, 0xad, 0xd9, 0x58, 0xb3, 0x43, 0x2b, 0x22, 0x70},\n    {0x40, 0x41, 0xec, 0x6a, 0xd2, 0xd6, 0x03, 0xe4, 0x9a, 0x9e, 0xbd, 0x6c, 0x0a, 0x9b, 0x75, 0xa4,\n     0xbc, 0xab, 0x6f, 0xa7, 0x95, 0xff, 0x2d, 0xf6, 0xe9, 0xb9, 0xab, 0x4c, 0x0c, 0x1c, 0xd0, 0x3b},\n    {0x22, 0x49, 0x32, 0x2b, 0x00, 0xf9, 0x22, 0xfa, 0x17, 0x02, 0xe9, 0x64, 0x82, 0xf0, 0x4d, 0x1b,\n     0xc7, 0x04, 0xfc, 0xdc, 0x8c, 0x5e, 0xb6, 0xd9, 0x16, 0xd6, 0x37, 0xce, 0x59, 0xaa, 0x09, 0x49},\n    {0x48, 0x6f, 0x1e, 0x48, 0x97, 0x88, 0x64, 0xac, 0xe8, 0xeb, 0x30, 0xa3, 0xc3, 0xe1, 0xcf, 0x97,\n     0x39, 0xa6, 0x55, 0x5b, 0x5f, 0xbf, 0x18, 0xb7, 0x3a, 0xdf, 0xa8, 0x75, 0xe7, 0x9d, 0xe0, 0x1e},\n    {0x09, 0xb4, 0xe2, 0x6d, 0x28, 0x98, 0xc9, 0x47, 0x66, 0x46, 0xbf, 0xff, 0x58, 0x17, 0x91, 0xaa,\n     0xc3, 0xbf, 0x4a, 0x9d, 0x0b, 0x88, 0xb1, 0xf1, 0x03, 0xdd, 0x61, 0xd7, 0xba, 0x9e, 0x64, 0x98},\n    {0x39, 0x39, 0x84, 0xe0, 0x22, 0x2f, 0x7d, 0x78, 0x45, 0x18, 0x72, 0xb4, 0x13, 0xd2, 0x01, 0x2f,\n     0x3c, 0xa1, 0xb0, 0xfe, 0x39, 0xd0, 0xf1, 0x3c, 0x72, 0xd6, 0xef, 0x54, 0xd5, 0x77, 0x22, 0xa0},\n    {0x0a, 0xda, 0x5f, 0xec, 0xff, 0x5c, 0xc0, 0x2e, 0x5f, 0xc4, 0x8d, 0x03, 0xe5, 0x80, 0x59, 0xd3,\n     0x5d, 0x49, 0x86, 0xe9, 0x8d, 0xf6, 0xf6, 0x16, 0x35, 0x3d, 0xf9, 0x9b, 0x29, 0x55, 0x9e, 0x64},\n    {0x08, 0x56, 0xF0, 0xD7, 0xEF, 0x77, 0xD6, 0x11, 0x1C, 0x8F, 0x95, 0x2D, 0x3C, 0xDF, 0xB1, 0x22,\n     0xBF, 0x60, 0x9B, 0xE5, 0xA9, 0xC0, 0x6E, 0x4B, 0x01, 0xDC, 0xD1, 0x57, 0x44, 0xB2, 0xA5, 0xCF},\n    {0x2C, 0xB2, 0x77, 0x85, 0xD6, 0xB7, 0x48, 0x9C, 0xFE, 0xBC, 0x80, 0x26, 0x60, 0xF4, 0x6D, 0xCE,\n     0x11, 0x31, 0xA2, 0x1E, 0x33, 0x0A, 0x6D, 0x2B, 0x00, 0xFA, 0x0C, 0x90, 0x95, 0x8F, 0x5C, 0x6B},\n    {0xFA, 0x59, 0xC8, 0x6E, 0x94, 0xEE, 0x75, 0xC9, 0x9A, 0xB0, 0xFE, 0x89, 0x36, 0x40, 0xC9, 0x99,\n     0x4A, 0x3B, 0xF4, 0xAA, 0x12, 0x24, 0xA2, 0x0F, 0xF9, 0xD1, 0x08, 0xCB, 0x78, 0x19, 0xAA, 0xE5},\n    {0x6E, 0x42, 0x7A, 0x4A, 0x8C, 0x61, 0x62, 0x22, 0xA1, 0x89, 0xD3, 0xA4, 0xC2, 0x19, 0xA3, 0x83,\n     0x53, 0xA7, 0x7A, 0x0A, 0x89, 0xE2, 0x54, 0x52, 0x62, 0x3D, 0xE7, 0xCA, 0x8C, 0xF6, 0x6A, 0x60},\n    {0x20, 0x27, 0x2F, 0xBA, 0x0C, 0x99, 0xD7, 0x29, 0xF3, 0x11, 0x35, 0x89, 0x9D, 0x0E, 0x24, 0xA1,\n     0xC3, 0xCB, 0xDF, 0x8A, 0xF1, 0xC6, 0xFE, 0xD0, 0xD7, 0x9F, 0x92, 0xD6, 0x8F, 0x59, 0xBF, 0xE4},\n    {0x91, 0x70, 0xb4, 0x7c, 0xfb, 0xff, 0xa0, 0x59, 0x6a, 0x25, 0x1c, 0xa9, 0x9e, 0xe9, 0x43, 0x81,\n     0x5d, 0x74, 0xb1, 0xb1, 0x09, 0x28, 0x00, 0x4a, 0xaf, 0xe3, 0xfc, 0xa9, 0x4e, 0x27, 0x76, 0x4c},\n    {0x85, 0xfe, 0x7c, 0xec, 0xb6, 0x78, 0x74, 0xc3, 0xec, 0xe1, 0x32, 0x7f, 0xb0, 0xb7, 0x02, 0x74,\n     0xf9, 0x23, 0xd8, 0xe7, 0xfa, 0x14, 0xe6, 0xee, 0x66, 0x44, 0xb1, 0x8c, 0xa5, 0x2f, 0x7e, 0xd2},\n    {0x8e, 0x66, 0x65, 0x7b, 0x3b, 0x6f, 0x7e, 0xcc, 0x57, 0xb4, 0x57, 0xea, 0xcc, 0x83, 0xf5, 0xaa,\n     0xf7, 0x65, 0xa3, 0xce, 0x93, 0x72, 0x13, 0xc1, 0xb6, 0x46, 0x7b, 0x29, 0x45, 0xb5, 0xc8, 0x93},\n    {0xcc, 0x11, 0xfb, 0x1a, 0xab, 0xa1, 0x31, 0x87, 0x6a, 0xc6, 0xde, 0x88, 0x87, 0xa9, 0xb9, 0x59,\n     0x37, 0x82, 0x8d, 0xb2, 0xcc, 0xd8, 0x97, 0x40, 0x9a, 0x5c, 0x8f, 0x40, 0x55, 0xcb, 0x4c, 0x3e}};\nstatic const char LOW_ENTROPY_WARNING[] = \"Compromised keys were detected and regenerated.\";\n#endif\n/*\nDeviceState versions used to be defined in the .proto file but really only this function cares.  So changed to a\n#define here.\n*/\n\n#define SEGMENT_CONFIG 1\n#define SEGMENT_MODULECONFIG 2\n#define SEGMENT_DEVICESTATE 4\n#define SEGMENT_CHANNELS 8\n#define SEGMENT_NODEDATABASE 16\n\n#define DEVICESTATE_CUR_VER 24\n#define DEVICESTATE_MIN_VER 24\n\nextern meshtastic_DeviceState devicestate;\nextern meshtastic_NodeDatabase nodeDatabase;\nextern meshtastic_ChannelFile channelFile;\nextern meshtastic_MyNodeInfo &myNodeInfo;\nextern meshtastic_LocalConfig config;\nextern meshtastic_DeviceUIConfig uiconfig;\nextern meshtastic_LocalModuleConfig moduleConfig;\nextern meshtastic_User &owner;\nextern meshtastic_Position localPosition;\n\nstatic constexpr const char *deviceStateFileName = \"/prefs/device.proto\";\nstatic constexpr const char *legacyPrefFileName = \"/prefs/db.proto\";\nstatic constexpr const char *nodeDatabaseFileName = \"/prefs/nodes.proto\";\nstatic constexpr const char *configFileName = \"/prefs/config.proto\";\nstatic constexpr const char *uiconfigFileName = \"/prefs/uiconfig.proto\";\nstatic constexpr const char *moduleConfigFileName = \"/prefs/module.proto\";\nstatic constexpr const char *channelFileName = \"/prefs/channels.proto\";\nstatic constexpr const char *backupFileName = \"/backups/backup.proto\";\n\n/// Given a node, return how many seconds in the past (vs now) that we last heard from it\nuint32_t sinceLastSeen(const meshtastic_NodeInfoLite *n);\n\n/// Given a packet, return how many seconds in the past (vs now) it was received\nuint32_t sinceReceived(const meshtastic_MeshPacket *p);\n\n/// Given a packet, return the number of hops used to reach this node.\n/// Returns defaultIfUnknown if the number of hops couldn't be determined.\nint8_t getHopsAway(const meshtastic_MeshPacket &p, int8_t defaultIfUnknown = -1);\n\nenum class HopStartStatus : uint8_t { VALID = 0, MISSING_OR_UNKNOWN, INVALID };\n\n/// Classify hop_start validity for forwarding decisions.\nHopStartStatus classifyHopStart(const meshtastic_MeshPacket &p);\n\ninline bool shouldDropPacketForPreHop(const meshtastic_MeshPacket &p)\n{\n#if !MESHTASTIC_PREHOP_DROP\n    (void)p;\n    return false;\n#else\n    if (isFromUs(&p)) {\n        return false; // local-originated packets should never be dropped by pre-hop drop policy\n    }\n    return classifyHopStart(p) != HopStartStatus::VALID;\n#endif\n}\n\n/// Rate-limited debug log when hop_start is invalid/missing and packet is dropped.\nvoid logHopStartDrop(const meshtastic_MeshPacket &p, const char *context);\n\nenum LoadFileResult {\n    // Successfully opened the file\n    LOAD_SUCCESS = 1,\n    // File does not exist\n    NOT_FOUND = 2,\n    // Device does not have a filesystem\n    NO_FILESYSTEM = 3,\n    // File exists, but could not decode protobufs\n    DECODE_FAILED = 4,\n    // File exists, but open failed for some reason\n    OTHER_FAILURE = 5\n};\n\nenum UserLicenseStatus { NotKnown, NotLicensed, Licensed };\n\nclass NodeDB\n{\n    // NodeNum provisionalNodeNum; // if we are trying to find a node num this is our current attempt\n\n    // A NodeInfo for every node we've seen\n    // Eventually use a smarter datastructure\n    // HashMap<NodeNum, NodeInfo> nodes;\n    // Note: these two references just point into our static array we serialize to/from disk\n\n  public:\n    std::vector<meshtastic_NodeInfoLite> *meshNodes;\n    bool updateGUI = false; // we think the gui should definitely be redrawn, screen will clear this once handled\n    meshtastic_NodeInfoLite *updateGUIforNode = NULL; // if currently showing this node, we think you should update the GUI\n    Observable<const meshtastic::NodeStatus *> newStatus;\n    pb_size_t numMeshNodes;\n\n    bool keyIsLowEntropy = false;\n    bool hasWarned = false;\n\n    /// don't do mesh based algorithm for node id assignment (initially)\n    /// instead just store in flash - possibly even in the initial alpha release do this hack\n    NodeDB();\n\n    /// write to flash\n    /// @return true if the save was successful\n    bool saveToDisk(int saveWhat = SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS |\n                                   SEGMENT_NODEDATABASE);\n\n    /** Reinit radio config if needed, because either:\n     * a) sometimes a buggy android app might send us bogus settings or\n     * b) the client set factory_reset\n     *\n     * @param factory_reset if true, reset all settings to factory defaults\n     * @param is_fresh_install set to true after a fresh install, to trigger NodeInfo/Position requests\n     * @return true if the config was completely reset, in that case, we should send it back to the client\n     */\n    void resetRadioConfig(bool is_fresh_install = false);\n\n    /// given a subpacket sniffed from the network, update our DB state\n    /// we updateGUI and updateGUIforNode if we think our this change is big enough for a redraw\n    void updateFrom(const meshtastic_MeshPacket &p);\n\n    void addFromContact(const meshtastic_SharedContact);\n\n    /** Update position info for this node based on received position data\n     */\n    void updatePosition(uint32_t nodeId, const meshtastic_Position &p, RxSource src = RX_SRC_RADIO);\n\n    /** Update telemetry info for this node based on received metrics\n     */\n    void updateTelemetry(uint32_t nodeId, const meshtastic_Telemetry &t, RxSource src = RX_SRC_RADIO);\n\n    /** Update user info and channel for this node based on received user data\n     */\n    bool updateUser(uint32_t nodeId, meshtastic_User &p, uint8_t channelIndex = 0);\n\n    /*\n     * Sets a node either favorite or unfavorite\n     */\n    void set_favorite(bool is_favorite, uint32_t nodeId);\n\n    /*\n     * Returns true if the node is in the NodeDB and marked as favorite\n     */\n    bool isFavorite(uint32_t nodeId);\n\n    /*\n     * Returns true if p->from or p->to is a favorited node\n     */\n    bool isFromOrToFavoritedNode(const meshtastic_MeshPacket &p);\n\n    /**\n     * Other functions like the node picker can request a pause in the node sorting\n     */\n    void pause_sort(bool paused);\n\n    /// @return our node number\n    NodeNum getNodeNum() { return myNodeInfo.my_node_num; }\n\n    /// @return our node ID as a string in the format \"!xxxxxxxx\"\n    std::string getNodeId() const;\n\n    // @return last byte of a NodeNum, 0xFF if it ended at 0x00\n    uint8_t getLastByteOfNodeNum(NodeNum num) { return (uint8_t)((num & 0xFF) ? (num & 0xFF) : 0xFF); }\n\n    /// if returns false, that means our node should send a DenyNodeNum response.  If true, we think the number is okay for use\n    // bool handleWantNodeNum(NodeNum n);\n\n    /* void handleDenyNodeNum(NodeNum FIXME read mesh proto docs, perhaps picking a random node num is not a great idea\n    and instead we should use a special 'im unconfigured node number' and include our desired node number in the wantnum message.\n    the unconfigured node num would only be used while initially joining the mesh so low odds of conflicting (especially if we\n    randomly select from a small number of nodenums which can be used temporarily for this operation).  figure out what the lower\n    level mesh sw does if it does conflict?  would it be better for people who are replying with denynode num to just broadcast\n    their denial?)\n    */\n\n    // get channel channel index we heard a nodeNum on, defaults to 0 if not found\n    uint8_t getMeshNodeChannel(NodeNum n);\n\n    /* Return the number of nodes we've heard from recently (within the last 2 hrs?)\n     * @param localOnly if true, ignore nodes heard via MQTT\n     */\n    size_t getNumOnlineMeshNodes(bool localOnly = false);\n\n    void initConfigIntervals(), initModuleConfigIntervals(), resetNodes(bool keepFavorites = false),\n        removeNodeByNum(NodeNum nodeNum);\n\n    bool factoryReset(bool eraseBleBonds = false);\n\n    LoadFileResult loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields,\n                             void *dest_struct);\n    bool saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct,\n                   bool fullAtomic = true);\n\n    void installRoleDefaults(meshtastic_Config_DeviceConfig_Role role);\n\n    const meshtastic_NodeInfoLite *readNextMeshNode(uint32_t &readIndex);\n\n    meshtastic_NodeInfoLite *getMeshNodeByIndex(size_t x)\n    {\n        assert(x < numMeshNodes);\n        return &meshNodes->at(x);\n    }\n\n    virtual meshtastic_NodeInfoLite *getMeshNode(NodeNum n);\n    size_t getNumMeshNodes() { return numMeshNodes; }\n\n    UserLicenseStatus getLicenseStatus(uint32_t nodeNum);\n\n    size_t getMaxNodesAllocatedSize()\n    {\n        meshtastic_NodeDatabase emptyNodeDatabase;\n        emptyNodeDatabase.version = DEVICESTATE_CUR_VER;\n        size_t nodeDatabaseSize;\n        pb_get_encoded_size(&nodeDatabaseSize, meshtastic_NodeDatabase_fields, &emptyNodeDatabase);\n        return nodeDatabaseSize + (MAX_NUM_NODES * meshtastic_NodeInfoLite_size);\n    }\n\n    // returns true if the maximum number of nodes is reached or we are running low on memory\n    bool isFull();\n\n    void clearLocalPosition();\n\n    void setLocalPosition(meshtastic_Position position, bool timeOnly = false)\n    {\n        if (timeOnly) {\n            LOG_DEBUG(\"Set local position time only: time=%u timestamp=%u\", position.time, position.timestamp);\n            localPosition.time = position.time;\n            localPosition.timestamp = position.timestamp > 0 ? position.timestamp : position.time;\n            return;\n        }\n        LOG_DEBUG(\"Set local position: lat=%i lon=%i time=%u timestamp=%u\", position.latitude_i, position.longitude_i,\n                  position.time, position.timestamp);\n        localPosition = position;\n        if (position.latitude_i != 0 || position.longitude_i != 0) {\n            localPositionUpdatedSinceBoot = true;\n        }\n    }\n\n    bool hasValidPosition(const meshtastic_NodeInfoLite *n);\n    bool hasLocalPositionSinceBoot() const { return localPositionUpdatedSinceBoot; }\n\n#if !defined(MESHTASTIC_EXCLUDE_PKI)\n    bool checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t &keyToTest);\n#endif\n\n    bool backupPreferences(meshtastic_AdminMessage_BackupLocation location);\n    bool restorePreferences(meshtastic_AdminMessage_BackupLocation location,\n                            int restoreWhat = SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS);\n\n    /// Notify observers of changes to the DB\n    void notifyObservers(bool forceUpdate = false)\n    {\n        // Notify observers of the current node state\n        const meshtastic::NodeStatus status = meshtastic::NodeStatus(getNumOnlineMeshNodes(), getNumMeshNodes(), forceUpdate);\n        newStatus.notifyObservers(&status);\n    }\n\n  private:\n    bool duplicateWarned = false;\n    bool localPositionUpdatedSinceBoot = false;\n    uint32_t lastNodeDbSave = 0;    // when we last saved our db to flash\n    uint32_t lastBackupAttempt = 0; // when we last tried a backup automatically or manually\n    uint32_t lastSort = 0;          // When last sorted the nodeDB\n    /// Find a node in our DB, create an empty NodeInfoLite if missing\n    meshtastic_NodeInfoLite *getOrCreateMeshNode(NodeNum n);\n\n    /*\n     * Internal boolean to track sorting paused\n     */\n    bool sortingIsPaused = false;\n\n    /// pick a provisional nodenum we hope no one is using\n    void pickNewNodeNum();\n\n    /// read our db from flash\n    void loadFromDisk();\n\n    /// purge db entries without user info\n    void cleanupMeshDB();\n\n    /// Reinit device state from scratch (not loading from disk)\n    void installDefaultDeviceState(), installDefaultNodeDatabase(), installDefaultChannels(),\n        installDefaultConfig(bool preserveKey), installDefaultModuleConfig();\n\n    /// write to flash\n    /// @return true if the save was successful\n    bool saveToDiskNoRetry(int saveWhat);\n\n    bool saveChannelsToDisk();\n    bool saveDeviceStateToDisk();\n    bool saveNodeDatabaseToDisk();\n    void sortMeshDB();\n};\n\nextern NodeDB *nodeDB;\n\n/*\n  If is_router is set, we use a number of different default values\n\n        # FIXME - after tuning, move these params into the on-device defaults based on is_router and is_power_saving\n\n        # prefs.position_broadcast_secs = FIXME possibly broadcast only once an hr\n        prefs.wait_bluetooth_secs = 1  # Don't stay in bluetooth mode\n        # try to stay in light sleep one full day, then briefly wake and sleep again\n\n        prefs.ls_secs = oneday\n\n        prefs.position_broadcast_secs = 12 hours # send either position or owner every 12hrs\n\n        # get a new GPS position once per day\n        prefs.gps_update_interval = oneday\n\n        prefs.is_power_saving = True\n*/\n\n/** The current change # for radio settings.  Starts at 0 on boot and any time the radio settings\n * might have changed is incremented.  Allows others to detect they might now be on a new channel.\n */\nextern uint32_t radioGeneration;\n\nextern meshtastic_CriticalErrorCode error_code;\n\n/*\n * A numeric error address (nonzero if available)\n */\nextern uint32_t error_address;\n#define NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_SHIFT 0\n#define NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK (1 << NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_SHIFT)\n#define NODEINFO_BITFIELD_IS_MUTED_SHIFT 1\n#define NODEINFO_BITFIELD_IS_MUTED_MASK (1 << NODEINFO_BITFIELD_IS_MUTED_SHIFT)\n\n#define Module_Config_size                                                                                                       \\\n    (ModuleConfig_CannedMessageConfig_size + ModuleConfig_ExternalNotificationConfig_size + ModuleConfig_MQTTConfig_size +       \\\n     ModuleConfig_RangeTestConfig_size + ModuleConfig_SerialConfig_size + ModuleConfig_StoreForwardConfig_size +                 \\\n     ModuleConfig_TelemetryConfig_size + ModuleConfig_size)\n\n// Please do not remove this comment, it makes trunk and compiler happy at the same time.\n"
  },
  {
    "path": "src/mesh/PacketCache.cpp",
    "content": "#include \"PacketCache.h\"\n#include \"Router.h\"\n\nPacketCache packetCache{};\n\n/**\n * Allocate a new cache entry and copy the packet header and payload into it\n */\nPacketCacheEntry *PacketCache::cache(const meshtastic_MeshPacket *p, bool preserveMetadata)\n{\n    size_t payload_size =\n        (p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag) ? p->encrypted.size : p->decoded.payload.size;\n    PacketCacheEntry *e = (PacketCacheEntry *)malloc(sizeof(PacketCacheEntry) + payload_size +\n                                                     (preserveMetadata ? sizeof(PacketCacheMetadata) : 0));\n    if (!e) {\n        LOG_ERROR(\"Unable to allocate memory for packet cache entry\");\n        return NULL;\n    }\n\n    *e = {};\n    e->header.from = p->from;\n    e->header.to = p->to;\n    e->header.id = p->id;\n    e->header.channel = p->channel;\n    e->header.next_hop = p->next_hop;\n    e->header.relay_node = p->relay_node;\n    e->header.flags = (p->hop_limit & PACKET_FLAGS_HOP_LIMIT_MASK) | (p->want_ack ? PACKET_FLAGS_WANT_ACK_MASK : 0) |\n                      (p->via_mqtt ? PACKET_FLAGS_VIA_MQTT_MASK : 0) |\n                      ((p->hop_start << PACKET_FLAGS_HOP_START_SHIFT) & PACKET_FLAGS_HOP_START_MASK);\n\n    PacketCacheMetadata m{};\n    if (preserveMetadata) {\n        e->has_metadata = true;\n        m.rx_rssi = (uint8_t)(p->rx_rssi + 200);\n        m.rx_snr = (uint8_t)((p->rx_snr + 30.0f) / 0.25f);\n        m.rx_time = p->rx_time;\n        m.transport_mechanism = p->transport_mechanism;\n        m.priority = p->priority;\n    }\n    if (p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag) {\n        e->encrypted = true;\n        e->payload_len = p->encrypted.size;\n        memcpy(((unsigned char *)e) + sizeof(PacketCacheEntry), p->encrypted.bytes, p->encrypted.size);\n    } else if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        e->encrypted = false;\n        if (preserveMetadata) {\n            m.portnum = p->decoded.portnum;\n            m.want_response = p->decoded.want_response;\n            m.emoji = p->decoded.emoji;\n            m.bitfield = p->decoded.bitfield;\n            if (p->decoded.reply_id)\n                m.reply_id = p->decoded.reply_id;\n            else if (p->decoded.request_id)\n                m.request_id = p->decoded.request_id;\n        }\n        e->payload_len = p->decoded.payload.size;\n        memcpy(((unsigned char *)e) + sizeof(PacketCacheEntry), p->decoded.payload.bytes, p->decoded.payload.size);\n    } else {\n        LOG_ERROR(\"Unable to cache packet with unknown payload type %d\", p->which_payload_variant);\n        free(e);\n        return NULL;\n    }\n    if (preserveMetadata)\n        memcpy(((unsigned char *)e) + sizeof(PacketCacheEntry) + e->payload_len, &m, sizeof(m));\n\n    size += sizeof(PacketCacheEntry) + e->payload_len + (e->has_metadata ? sizeof(PacketCacheMetadata) : 0);\n    insert(e);\n    return e;\n};\n\n/**\n * Dump a list of packets into the provided buffer\n */\nvoid PacketCache::dump(void *dest, const PacketCacheEntry **entries, size_t num_entries)\n{\n    unsigned char *pos = (unsigned char *)dest;\n    for (size_t i = 0; i < num_entries; i++) {\n        size_t entry_len =\n            sizeof(PacketCacheEntry) + entries[i]->payload_len + (entries[i]->has_metadata ? sizeof(PacketCacheMetadata) : 0);\n        memcpy(pos, entries[i], entry_len);\n        pos += entry_len;\n    }\n}\n\n/**\n * Calculate the length of buffer needed to dump the specified entries\n */\nsize_t PacketCache::dumpSize(const PacketCacheEntry **entries, size_t num_entries)\n{\n    size_t total_size = 0;\n    for (size_t i = 0; i < num_entries; i++) {\n        total_size += sizeof(PacketCacheEntry) + entries[i]->payload_len;\n        if (entries[i]->has_metadata)\n            total_size += sizeof(PacketCacheMetadata);\n    }\n    return total_size;\n}\n\n/**\n * Find a packet in the cache\n */\nPacketCacheEntry *PacketCache::find(NodeNum from, PacketId id)\n{\n    uint16_t h = PACKET_HASH(from, id);\n    PacketCacheEntry *e = buckets[PACKET_CACHE_BUCKET(h)];\n    while (e) {\n        if (e->header.from == from && e->header.id == id)\n            return e;\n        e = e->next;\n    }\n    return NULL;\n}\n\n/**\n * Find a packet in the cache by its hash\n */\nPacketCacheEntry *PacketCache::find(PacketHash h)\n{\n    PacketCacheEntry *e = buckets[PACKET_CACHE_BUCKET(h)];\n    while (e) {\n        if (PACKET_HASH(e->header.from, e->header.id) == h)\n            return e;\n        e = e->next;\n    }\n    return NULL;\n}\n\n/**\n * Load a list of packets from the provided buffer\n */\nbool PacketCache::load(void *src, PacketCacheEntry **entries, size_t num_entries)\n{\n    memset(entries, 0, sizeof(PacketCacheEntry *) * num_entries);\n    unsigned char *pos = (unsigned char *)src;\n    for (size_t i = 0; i < num_entries; i++) {\n        PacketCacheEntry e{};\n        memcpy(&e, pos, sizeof(PacketCacheEntry));\n        size_t entry_len = sizeof(PacketCacheEntry) + e.payload_len + (e.has_metadata ? sizeof(PacketCacheMetadata) : 0);\n        entries[i] = (PacketCacheEntry *)malloc(entry_len);\n        size += entry_len;\n        if (!entries[i]) {\n            LOG_ERROR(\"Unable to allocate memory for packet cache entry\");\n            for (size_t j = 0; j < i; j++) {\n                size -= sizeof(PacketCacheEntry) + entries[j]->payload_len +\n                        (entries[j]->has_metadata ? sizeof(PacketCacheMetadata) : 0);\n                free(entries[j]);\n                entries[j] = NULL;\n            }\n            return false;\n        }\n        memcpy(entries[i], pos, entry_len);\n        pos += entry_len;\n    }\n    for (size_t i = 0; i < num_entries; i++)\n        insert(entries[i]);\n    return true;\n}\n\n/**\n * Copy the cached packet into the provided MeshPacket structure\n */\nvoid PacketCache::rehydrate(const PacketCacheEntry *e, meshtastic_MeshPacket *p)\n{\n    if (!e || !p)\n        return;\n\n    *p = {};\n    p->from = e->header.from;\n    p->to = e->header.to;\n    p->id = e->header.id;\n    p->channel = e->header.channel;\n    p->next_hop = e->header.next_hop;\n    p->relay_node = e->header.relay_node;\n    p->hop_limit = e->header.flags & PACKET_FLAGS_HOP_LIMIT_MASK;\n    p->want_ack = !!(e->header.flags & PACKET_FLAGS_WANT_ACK_MASK);\n    p->via_mqtt = !!(e->header.flags & PACKET_FLAGS_VIA_MQTT_MASK);\n    p->hop_start = (e->header.flags & PACKET_FLAGS_HOP_START_MASK) >> PACKET_FLAGS_HOP_START_SHIFT;\n    p->which_payload_variant = e->encrypted ? meshtastic_MeshPacket_encrypted_tag : meshtastic_MeshPacket_decoded_tag;\n\n    unsigned char *payload = ((unsigned char *)e) + sizeof(PacketCacheEntry);\n    PacketCacheMetadata m{};\n    if (e->has_metadata) {\n        memcpy(&m, (payload + e->payload_len), sizeof(m));\n        p->rx_rssi = ((int)m.rx_rssi) - 200;\n        p->rx_snr = ((float)m.rx_snr * 0.25f) - 30.0f;\n        p->rx_time = m.rx_time;\n        p->transport_mechanism = (meshtastic_MeshPacket_TransportMechanism)m.transport_mechanism;\n        p->priority = (meshtastic_MeshPacket_Priority)m.priority;\n    }\n    if (e->encrypted) {\n        memcpy(p->encrypted.bytes, payload, e->payload_len);\n        p->encrypted.size = e->payload_len;\n    } else {\n        memcpy(p->decoded.payload.bytes, payload, e->payload_len);\n        p->decoded.payload.size = e->payload_len;\n        if (e->has_metadata) {\n            // Decrypted-only metadata\n            p->decoded.portnum = (meshtastic_PortNum)m.portnum;\n            p->decoded.want_response = m.want_response;\n            p->decoded.emoji = m.emoji;\n            p->decoded.bitfield = m.bitfield;\n            if (m.reply_id)\n                p->decoded.reply_id = m.reply_id;\n            else if (m.request_id)\n                p->decoded.request_id = m.request_id;\n        }\n    }\n}\n\n/**\n * Release a cache entry\n */\nvoid PacketCache::release(PacketCacheEntry *e)\n{\n    if (!e)\n        return;\n    remove(e);\n    size -= sizeof(PacketCacheEntry) + e->payload_len + (e->has_metadata ? sizeof(PacketCacheMetadata) : 0);\n    free(e);\n}\n\n/**\n * Insert a new entry into the hash table\n */\nvoid PacketCache::insert(PacketCacheEntry *e)\n{\n    assert(e);\n    PacketHash h = PACKET_HASH(e->header.from, e->header.id);\n    PacketCacheEntry **target = &buckets[PACKET_CACHE_BUCKET(h)];\n    e->next = *target;\n    *target = e;\n    num_entries++;\n}\n\n/**\n * Remove an entry from the hash table\n */\nvoid PacketCache::remove(PacketCacheEntry *e)\n{\n    assert(e);\n    PacketHash h = PACKET_HASH(e->header.from, e->header.id);\n    PacketCacheEntry **target = &buckets[PACKET_CACHE_BUCKET(h)];\n    while (*target) {\n        if (*target == e) {\n            *target = e->next;\n            e->next = NULL;\n            num_entries--;\n            break;\n        } else {\n            target = &(*target)->next;\n        }\n    }\n}"
  },
  {
    "path": "src/mesh/PacketCache.h",
    "content": "#pragma once\n#include \"RadioInterface.h\"\n\n#define PACKET_HASH(a, b) ((((a ^ b) >> 16) ^ (a ^ b)) & 0xFFFF) // 16 bit fold of packet (from, id) tuple\ntypedef uint16_t PacketHash;\n\n#define PACKET_CACHE_BUCKETS 64                                    // Number of hash table buckets\n#define PACKET_CACHE_BUCKET(h) (((h >> 12) ^ (h >> 6) ^ h) & 0x3F) // Fold hash down to 6-bit bucket index\n\ntypedef struct PacketCacheEntry {\n    PacketCacheEntry *next;\n    PacketHeader header;\n    uint16_t payload_len = 0;\n    union {\n        uint16_t bitfield;\n        struct {\n            uint8_t encrypted : 1;    // Payload is encrypted\n            uint8_t has_metadata : 1; // Payload includes PacketCacheMetadata\n            uint8_t : 6;              // Reserved for future use\n            uint8_t : 8;              // Reserved for future use\n        };\n    };\n} PacketCacheEntry;\n\ntypedef struct PacketCacheMetadata {\n    PacketCacheMetadata() : _bitfield(0), reply_id(0), _bitfield2(0) {}\n    union {\n        uint32_t _bitfield;\n        struct {\n            uint16_t portnum : 9;       // meshtastic_MeshPacket::decoded::portnum\n            uint16_t want_response : 1; // meshtastic_MeshPacket::decoded::want_response\n            uint16_t emoji : 1;         // meshtastic_MeshPacket::decoded::emoji\n            uint16_t bitfield : 5;      // meshtastic_MeshPacket::decoded::bitfield (truncated)\n            uint8_t rx_rssi : 8;        // meshtastic_MeshPacket::rx_rssi (map via actual RSSI + 200)\n            uint8_t rx_snr : 8;         // meshtastic_MeshPacket::rx_snr (map via (p->rx_snr + 30.0f) / 0.25f)\n        };\n    };\n    union {\n        uint32_t reply_id;   // meshtastic_MeshPacket::decoded.reply_id\n        uint32_t request_id; // meshtastic_MeshPacket::decoded.request_id\n    };\n    uint32_t rx_time = 0;            // meshtastic_MeshPacket::rx_time\n    uint8_t transport_mechanism = 0; // meshtastic_MeshPacket::transport_mechanism\n    struct {\n        uint8_t _bitfield2;\n        union {\n            uint8_t priority : 7; // meshtastic_MeshPacket::priority\n            uint8_t reserved : 1; // Reserved for future use\n        };\n    };\n} PacketCacheMetadata;\n\nclass PacketCache\n{\n  public:\n    PacketCacheEntry *cache(const meshtastic_MeshPacket *p, bool preserveMetadata);\n    static void dump(void *dest, const PacketCacheEntry **entries, size_t num_entries);\n    size_t dumpSize(const PacketCacheEntry **entries, size_t num_entries);\n    PacketCacheEntry *find(NodeNum from, PacketId id);\n    PacketCacheEntry *find(PacketHash h);\n    bool load(void *src, PacketCacheEntry **entries, size_t num_entries);\n    size_t getNumEntries() { return num_entries; }\n    size_t getSize() { return size; }\n    void rehydrate(const PacketCacheEntry *e, meshtastic_MeshPacket *p);\n    void release(PacketCacheEntry *e);\n\n  private:\n    PacketCacheEntry *buckets[PACKET_CACHE_BUCKETS]{};\n    size_t num_entries = 0;\n    size_t size = 0;\n    void insert(PacketCacheEntry *e);\n    void remove(PacketCacheEntry *e);\n};\n\nextern PacketCache packetCache;"
  },
  {
    "path": "src/mesh/PacketHistory.cpp",
    "content": "#include \"PacketHistory.h\"\n#include \"configuration.h\"\n#include \"mesh-pb-constants.h\"\n\n#ifdef ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n#include \"Throttle.h\"\n\n#define PACKETHISTORY_MAX                                                                                                        \\\n    max((u_int32_t)(MAX_NUM_NODES * 2.0),                                                                                        \\\n        (u_int32_t)100) // x2..3  Should suffice. Empirical setup. 16B per record malloc'ed, but no less than 100\n\n#define RECENT_WARN_AGE (10 * 60 * 1000L) // Warn if the packet that gets removed was more recent than 10 min\n\n#define VERBOSE_PACKET_HISTORY 0     // Set to 1 for verbose logging, 2 for heavy debugging\n#define PACKET_HISTORY_TRACE_AGING 1 // Set to 1 to enable logging of the age of re/used history slots\n\nPacketHistory::PacketHistory(uint32_t size) : recentPacketsCapacity(0), recentPackets(NULL) // Initialize members\n{\n    if (size < 4 || size > PACKETHISTORY_MAX) { // Copilot suggested - makes sense\n        LOG_WARN(\"Packet History - Invalid size %d, using default %d\", size, PACKETHISTORY_MAX);\n        size = PACKETHISTORY_MAX; // Use default size if invalid\n    }\n\n    // Allocate memory for the recent packets array\n    recentPacketsCapacity = size;\n    recentPackets = new PacketRecord[recentPacketsCapacity];\n    if (!recentPackets) { // No logging here, console/log probably uninitialized yet.\n        LOG_ERROR(\"Packet History - Memory allocation failed for size=%d entries / %d Bytes\", size,\n                  sizeof(PacketRecord) * recentPacketsCapacity);\n        recentPacketsCapacity = 0; // mark allocation fail\n        return;                    // return early\n    }\n\n    // Initialize the recent packets array to zero\n    memset(recentPackets, 0, sizeof(PacketRecord) * recentPacketsCapacity);\n}\n\nPacketHistory::~PacketHistory()\n{\n    recentPacketsCapacity = 0;\n    delete[] recentPackets;\n    recentPackets = NULL;\n}\n\n/** Update recentPackets and return true if we have already seen this packet */\nbool PacketHistory::wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpdate, bool *wasFallback, bool *weWereNextHop,\n                                    bool *wasUpgraded)\n{\n    if (!initOk()) {\n        LOG_ERROR(\"Packet History - Was Seen Recently: NOT INITIALIZED!\");\n        return false;\n    }\n\n    if (p->id == 0) {\n#if VERBOSE_PACKET_HISTORY\n        LOG_DEBUG(\"Packet History - Was Seen Recently: ID is 0, not a floodable message\");\n#endif\n        return false; // Not a floodable message ID, so we don't care\n    }\n\n    PacketRecord r;\n    memset(&r, 0, sizeof(PacketRecord)); // Initialize the record to zero\n\n    // Save basic info from checked packet\n    r.id = p->id;\n    r.sender = getFrom(p); // If 0 then use our ID\n    r.next_hop = p->next_hop;\n    setHighestHopLimit(r, p->hop_limit);\n    bool weWillRelay = false;\n    uint8_t ourRelayID = nodeDB->getLastByteOfNodeNum(nodeDB->getNodeNum());\n    if (p->relay_node == ourRelayID) { // If the relay_node is us, store it\n        weWillRelay = true;\n        setOurTxHopLimit(r, p->hop_limit);\n        r.relayed_by[0] = p->relay_node;\n    }\n\n    r.rxTimeMsec = millis(); //\n    if (r.rxTimeMsec == 0)   // =0 every 49.7 days? 0 is special\n        r.rxTimeMsec = 1;\n\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - Was Seen Recently: @start s=%08x id=%08x / to=%08x nh=%02x rn=%02x / wUpd=%s / wasFb?%d wWNH?%d\",\n              r.sender, r.id, p->to, p->next_hop, p->relay_node, withUpdate ? \"YES\" : \"NO\", wasFallback ? *wasFallback : -1,\n              weWereNextHop ? *weWereNextHop : -1);\n#endif\n\n    PacketRecord *found = find(r.sender, r.id); // Find the packet record in the recentPackets array\n    bool seenRecently = (found != NULL);        // If found -> the packet was seen recently\n\n    // Check for hop_limit upgrade scenario\n    if (seenRecently && wasUpgraded && getHighestHopLimit(*found) < p->hop_limit) {\n        LOG_DEBUG(\"Packet History - Hop limit upgrade: packet 0x%08x from hop_limit=%d to hop_limit=%d\", p->id,\n                  getHighestHopLimit(*found), p->hop_limit);\n        *wasUpgraded = true;\n    } else if (wasUpgraded) {\n        *wasUpgraded = false; // Initialize to false if not an upgrade\n    }\n\n    if (seenRecently) {\n        if (wasFallback) {\n            // If it was seen with a next-hop not set to us and now it's NO_NEXT_HOP_PREFERENCE, and the relayer relayed already\n            // before, it's a fallback to flooding. If we didn't already relay and the next-hop neither, we might need to handle\n            // it now.\n            if (found->sender != nodeDB->getNodeNum() && found->next_hop != NO_NEXT_HOP_PREFERENCE &&\n                found->next_hop != ourRelayID && p->next_hop == NO_NEXT_HOP_PREFERENCE && wasRelayer(p->relay_node, *found) &&\n                !wasRelayer(ourRelayID, *found) &&\n                !wasRelayer(\n                    found->next_hop,\n                    *found)) { // If we were not the next hop and the next hop is not us, and we are not relaying this packet\n#if VERBOSE_PACKET_HISTORY\n                LOG_DEBUG(\"Packet History - Was Seen Recently: f=%08x id=%08x nh=%02x rn=%02x oID=%02x, wasFbk=%d-set TRUE\",\n                          p->from, p->id, p->next_hop, p->relay_node, ourRelayID, wasFallback ? *wasFallback : -1);\n#endif\n                *wasFallback = true;\n            } else {\n                // debug log only\n#if VERBOSE_PACKET_HISTORY\n                LOG_DEBUG(\"Packet History - Was Seen Recently: f=%08x id=%08x nh=%02x rn=%02x oID=%02x, wasFbk=%d-no change\",\n                          p->from, p->id, p->next_hop, p->relay_node, ourRelayID, wasFallback ? *wasFallback : -1);\n#endif\n            }\n        }\n\n        // Check if we were the next hop for this packet\n        if (weWereNextHop) {\n            *weWereNextHop = (found->next_hop == ourRelayID);\n#if VERBOSE_PACKET_HISTORY\n            LOG_DEBUG(\"Packet History - Was Seen Recently: f=%08x id=%08x nh=%02x rn=%02x foundnh=%02x oID=%02x -> wWNH=%s\",\n                      p->from, p->id, p->next_hop, p->relay_node, found->next_hop, ourRelayID, (*weWereNextHop) ? \"YES\" : \"NO\");\n#endif\n        }\n    }\n\n    if (withUpdate) {\n        if (found != NULL) {\n#if VERBOSE_PACKET_HISTORY\n            LOG_DEBUG(\"Packet History - Was Seen Recently: s=%08x id=%08x nh=%02x rby=%02x %02x %02x age=%d wUpd BEFORE\",\n                      found->sender, found->id, found->next_hop, found->relayed_by[0], found->relayed_by[1], found->relayed_by[2],\n                      millis() - found->rxTimeMsec);\n#endif\n            // Only update the relayer if it heard us directly (meaning hopLimit is decreased by 1)\n            uint8_t startIdx = weWillRelay ? 1 : 0;\n            if (!weWillRelay) {\n                bool weWereRelayer = wasRelayer(ourRelayID, *found);\n                // We were a relayer and the packet came in with a hop limit that is one less than when we sent it out\n                if (weWereRelayer && (p->hop_limit == getOurTxHopLimit(*found) || p->hop_limit == getOurTxHopLimit(*found) - 1)) {\n                    r.relayed_by[0] = p->relay_node;\n                    startIdx = 1; // Start copying existing relayers from index 1\n                }\n                // keep the original ourTxHopLimit\n                setOurTxHopLimit(r, getOurTxHopLimit(*found));\n            }\n\n            // Preserve the highest hop_limit we've ever seen for this packet so upgrades aren't lost when a later copy has\n            // fewer hops remaining.\n            if (getHighestHopLimit(*found) > getHighestHopLimit(r))\n                setHighestHopLimit(r, getHighestHopLimit(*found));\n\n            // Add the existing relayed_by to the new record, avoiding duplicates\n            for (uint8_t i = 0; i < (NUM_RELAYERS - startIdx); i++) {\n                if (found->relayed_by[i] == 0)\n                    continue;\n\n                bool exists = false;\n                for (uint8_t j = 0; j < NUM_RELAYERS; j++) {\n                    if (r.relayed_by[j] == found->relayed_by[i]) {\n                        exists = true;\n                        break;\n                    }\n                }\n\n                if (!exists) {\n                    r.relayed_by[i + startIdx] = found->relayed_by[i];\n                }\n            }\n            r.next_hop = found->next_hop; // keep the original next_hop (such that we check whether we were originally asked)\n#if VERBOSE_PACKET_HISTORY\n            LOG_DEBUG(\"Packet History - Was Seen Recently: s=%08x id=%08x nh=%02x rby=%02x %02x %02x age=%d wUpd AFTER\", r.sender,\n                      r.id, r.next_hop, r.relayed_by[0], r.relayed_by[1], r.relayed_by[2], millis() - r.rxTimeMsec);\n#endif\n            // TODO: have direct *found entry - can modify directly without local copy _vs_ not convolute the code by this\n        }\n        insert(r); // Insert or update the packet record in the history\n    }\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - Was Seen Recently: @exit s=%08x id=%08x (to=%08x) relby=%02x %02x %02x nxthop=%02x rxT=%d \"\n              \"found?%s seenRecently?%s wUpd?%s\",\n              r.sender, r.id, p->to, r.relayed_by[0], r.relayed_by[1], r.relayed_by[2], r.next_hop, r.rxTimeMsec,\n              found ? \"YES\" : \"NO \", seenRecently ? \"YES\" : \"NO \", withUpdate ? \"YES\" : \"NO \");\n#endif\n\n    return seenRecently;\n}\n\n/** Find a packet record in history.\n * @return pointer to PacketRecord if found, NULL if not found */\nPacketHistory::PacketRecord *PacketHistory::find(NodeNum sender, PacketId id)\n{\n    if (sender == 0 || id == 0) {\n#if VERBOSE_PACKET_HISTORY\n        LOG_DEBUG(\"Packet History - find: s=%08x id=%08x sender/id=0->NOT FOUND\", sender, id);\n#endif\n        return NULL;\n    }\n\n    PacketRecord *it = NULL;\n    for (it = recentPackets; it < (recentPackets + recentPacketsCapacity); ++it) {\n        if (it->id == id && it->sender == sender) {\n#if VERBOSE_PACKET_HISTORY\n            LOG_DEBUG(\"Packet History - find: s=%08x id=%08x FOUND nh=%02x rby=%02x %02x %02x age=%d slot=%d/%d\", it->sender,\n                      it->id, it->next_hop, it->relayed_by[0], it->relayed_by[1], it->relayed_by[2], millis() - (it->rxTimeMsec),\n                      it - recentPackets, recentPacketsCapacity);\n#endif\n            // only the first match is returned, so be careful not to create duplicate entries\n            return it; // Return pointer to the found record\n        }\n    }\n\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - find: s=%08x id=%08x NOT FOUND\", sender, id);\n#endif\n    return NULL; // Not found\n}\n\n/** Insert/Replace oldest PacketRecord in recentPackets. */\nvoid PacketHistory::insert(const PacketRecord &r)\n{\n    uint32_t now_millis = millis(); // Should not jump with time changes\n    uint32_t OldtrxTimeMsec = 0;\n    PacketRecord *tu = NULL; // Will insert here.\n    PacketRecord *it = NULL;\n\n    // Find a free, matching or oldest used slot in the recentPackets array\n    for (it = recentPackets; it < (recentPackets + recentPacketsCapacity); ++it) {\n        if (it->id == 0 && it->sender == 0 /*&& rxTimeMsec == 0*/) { // Record is empty\n            tu = it;                                                 // Remember the free slot\n#if VERBOSE_PACKET_HISTORY >= 2\n            LOG_DEBUG(\"Packet History - insert: Free slot@ %d/%d\", tu - recentPackets, recentPacketsCapacity);\n#endif\n            // We have that, Exit the loop\n            it = (recentPackets + recentPacketsCapacity);\n        } else if (it->id == r.id && it->sender == r.sender) { // Record matches the packet we want to insert\n            tu = it;                                           // Remember the matching slot\n            OldtrxTimeMsec = now_millis - it->rxTimeMsec;      // ..and save current entry's age\n#if VERBOSE_PACKET_HISTORY >= 2\n            LOG_DEBUG(\"Packet History - insert: Matched slot@ %d/%d age=%d\", tu - recentPackets, recentPacketsCapacity,\n                      OldtrxTimeMsec);\n#endif\n            // We have that, Exit the loop\n            it = (recentPackets + recentPacketsCapacity);\n        } else {\n            if (it->rxTimeMsec == 0) {\n                LOG_WARN(\n                    \"Packet History - insert: Found packet s=%08x id=%08x with rxTimeMsec = 0, slot %d/%d. Should never happen!\",\n                    it->sender, it->id, it - recentPackets, recentPacketsCapacity);\n            }\n            if ((now_millis - it->rxTimeMsec) > OldtrxTimeMsec) { // 49.7 days rollover friendly\n                OldtrxTimeMsec = now_millis - it->rxTimeMsec;\n                tu = it; // remember the oldest packet\n#if VERBOSE_PACKET_HISTORY >= 2\n                LOG_DEBUG(\"Packet History - insert: Older slot@ %d/%d age=%d\", tu - recentPackets, recentPacketsCapacity,\n                          OldtrxTimeMsec);\n#endif\n            }\n            // keep looking for oldest till entire array is checked\n        }\n    }\n\n    if (tu == NULL) {\n        LOG_ERROR(\"Packet History - insert: No free slot, no matched packet, no oldest to reuse. Something leaked.\"); // mx\n        // assert(false); // This should never happen, we should always have at least one packet to clear\n        return; // Return early if we can't update the history\n    }\n\n#if VERBOSE_PACKET_HISTORY\n    if (tu->id == 0 && tu->sender == 0) {\n        LOG_DEBUG(\"Packet History - insert: slot@ %d/%d is NEW\", tu - recentPackets, recentPacketsCapacity);\n    } else if (tu->id == r.id && tu->sender == r.sender) {\n        LOG_DEBUG(\"Packet History - insert: slot@ %d/%d MATCHED, age=%d\", tu - recentPackets, recentPacketsCapacity,\n                  OldtrxTimeMsec);\n    } else {\n        LOG_DEBUG(\"Packet History - insert: slot@ %d/%d REUSE OLDEST, age=%d\", tu - recentPackets, recentPacketsCapacity,\n                  OldtrxTimeMsec);\n    }\n#endif\n\n    // If we are reusing a slot, we should warn if the packet is too recent\n#if RECENT_WARN_AGE > 0\n    if (tu->rxTimeMsec && (OldtrxTimeMsec < RECENT_WARN_AGE)) {\n        if (!(tu->id == r.id && tu->sender == r.sender)) {\n#if VERBOSE_PACKET_HISTORY\n            LOG_WARN(\"Packet History - insert: Reusing slot aged %ds < %ds RECENT_WARN_AGE\", OldtrxTimeMsec / 1000,\n                     RECENT_WARN_AGE / 1000);\n#endif\n        } else {\n            // debug only\n#if VERBOSE_PACKET_HISTORY\n            LOG_WARN(\"Packet History - insert: Reusing slot aged %.3fs < %ds with MATCHED PACKET - this is normal\",\n                     OldtrxTimeMsec / 1000., RECENT_WARN_AGE / 1000);\n#endif\n        }\n    }\n\n#if PACKET_HISTORY_TRACE_AGING\n    if (tu->rxTimeMsec != 0) {\n        LOG_INFO(\"Packet History - insert: Reusing slot aged %.3fs TRACE %s\", OldtrxTimeMsec / 1000.,\n                 (tu->id == r.id && tu->sender == r.sender) ? \"MATCHED PACKET\" : \"OLDEST SLOT\");\n    } else {\n        LOG_INFO(\"Packet History - insert: Using new slot @uptime %.3fs TRACE NEW\", millis() / 1000.);\n    }\n#endif\n\n#endif\n\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - insert: Store slot@ %d/%d s=%08x id=%08x nh=%02x rby=%02x %02x %02x rxT=%d BEFORE\",\n              tu - recentPackets, recentPacketsCapacity, tu->sender, tu->id, tu->next_hop, tu->relayed_by[0], tu->relayed_by[1],\n              tu->relayed_by[2], tu->rxTimeMsec);\n#endif\n\n    if (r.rxTimeMsec == 0) {\n#if VERBOSE_PACKET_HISTORY\n        LOG_WARN(\"Packet History - insert: I will not store packet with rxTimeMsec = 0.\");\n#endif\n        return; // Return early if we can't update the history\n    }\n\n    *tu = r; // store the packet\n\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - insert: Store slot@ %d/%d s=%08x id=%08x nh=%02x rby=%02x %02x %02x rxT=%d AFTER\",\n              tu - recentPackets, recentPacketsCapacity, tu->sender, tu->id, tu->next_hop, tu->relayed_by[0], tu->relayed_by[1],\n              tu->relayed_by[2], tu->rxTimeMsec);\n#endif\n}\n\n/* Check if a certain node was a relayer of a packet in the history given an ID and sender\n * @return true if node was indeed a relayer, false if not */\nbool PacketHistory::wasRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender, bool *wasSole)\n{\n    if (!initOk()) {\n        LOG_ERROR(\"PacketHistory - wasRelayer: NOT INITIALIZED!\");\n        return false;\n    }\n\n    if (relayer == 0) {\n#if VERBOSE_PACKET_HISTORY\n        LOG_DEBUG(\"Packet History - was relayer: s=%08x id=%08x / rl=%02x=zero. NO\", sender, id, relayer);\n#endif\n        return false;\n    }\n\n    const PacketRecord *found = find(sender, id);\n\n    if (found == NULL) {\n#if VERBOSE_PACKET_HISTORY\n        LOG_DEBUG(\"Packet History - was relayer: s=%08x id=%08x / rl=%02x / PR not found. NO\", sender, id, relayer);\n#endif\n        return false;\n    }\n\n#if VERBOSE_PACKET_HISTORY >= 2\n    LOG_DEBUG(\"Packet History - was relayer: s=%08x id=%08x nh=%02x age=%d rls=%02x %02x %02x InHistory,check:%02x\",\n              found->sender, found->id, found->next_hop, millis() - found->rxTimeMsec, found->relayed_by[0], found->relayed_by[1],\n              found->relayed_by[2], relayer);\n#endif\n    return wasRelayer(relayer, *found, wasSole);\n}\n\n/* Check if a certain node was a relayer of a packet in the history given iterator\n * @return true if node was indeed a relayer, false if not */\nbool PacketHistory::wasRelayer(const uint8_t relayer, const PacketRecord &r, bool *wasSole)\n{\n    bool found = false;\n    bool other_present = false;\n\n    for (uint8_t i = 0; i < NUM_RELAYERS; ++i) {\n        if (r.relayed_by[i] == relayer) {\n            found = true;\n        } else if (r.relayed_by[i] != 0) {\n            other_present = true;\n        }\n    }\n\n    if (wasSole) {\n        *wasSole = (found && !other_present);\n    }\n\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - was rel.PR.: s=%08x id=%08x rls=%02x %02x %02x / rl=%02x? NO\", r.sender, r.id, r.relayed_by[0],\n              r.relayed_by[1], r.relayed_by[2], relayer);\n#endif\n\n    return found;\n}\n\n// Remove a relayer from the list of relayers of a packet in the history given an ID and sender\nvoid PacketHistory::removeRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender)\n{\n    if (!initOk()) {\n        LOG_ERROR(\"Packet History - remove Relayer: NOT INITIALIZED!\");\n        return;\n    }\n\n    PacketRecord *found = find(sender, id);\n    if (found == NULL) {\n#if VERBOSE_PACKET_HISTORY\n        LOG_DEBUG(\"Packet History - remove Relayer s=%08x id=%08x (rl=%02x) NOT FOUND\", sender, id, relayer);\n#endif\n        return; // Nothing to remove\n    }\n\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - remove Relayer s=%08x id=%08x rby=%02x %02x %02x, rl:%02x BEFORE\", found->sender, found->id,\n              found->relayed_by[0], found->relayed_by[1], found->relayed_by[2], relayer);\n#endif\n\n    // nexthop and rxTimeMsec too stay in found entry\n\n    uint8_t j = 0;\n    uint8_t i = 0;\n    for (; i < NUM_RELAYERS; i++) {\n        if (found->relayed_by[i] != relayer) {\n            found->relayed_by[j] = found->relayed_by[i];\n            j++;\n        } else\n            found->relayed_by[i] = 0;\n    }\n    for (; j < NUM_RELAYERS; j++) { // Clear the rest of the relayed_by array\n        found->relayed_by[j] = 0;\n    }\n\n#if VERBOSE_PACKET_HISTORY\n    LOG_DEBUG(\"Packet History - remove Relayer s=%08x id=%08x rby=%02x %02x %02x  rl:%02x AFTER - removed?%d\", found->sender,\n              found->id, found->relayed_by[0], found->relayed_by[1], found->relayed_by[2], relayer, i != j);\n#endif\n}\n\n// Getters and setters for hop limit fields packed in hop_limit\ninline uint8_t PacketHistory::getHighestHopLimit(const PacketRecord &r)\n{\n    return r.hop_limit & HOP_LIMIT_HIGHEST_MASK;\n}\n\ninline void PacketHistory::setHighestHopLimit(PacketRecord &r, uint8_t hopLimit)\n{\n    r.hop_limit = (r.hop_limit & ~HOP_LIMIT_HIGHEST_MASK) | (hopLimit & HOP_LIMIT_HIGHEST_MASK);\n}\n\ninline uint8_t PacketHistory::getOurTxHopLimit(const PacketRecord &r)\n{\n    return (r.hop_limit & HOP_LIMIT_OUR_TX_MASK) >> HOP_LIMIT_OUR_TX_SHIFT;\n}\n\ninline void PacketHistory::setOurTxHopLimit(PacketRecord &r, uint8_t hopLimit)\n{\n    r.hop_limit = (r.hop_limit & ~HOP_LIMIT_OUR_TX_MASK) | ((hopLimit << HOP_LIMIT_OUR_TX_SHIFT) & HOP_LIMIT_OUR_TX_MASK);\n}"
  },
  {
    "path": "src/mesh/PacketHistory.h",
    "content": "#pragma once\n\n#include \"NodeDB.h\"\n\n// Number of relayers we keep track of. Use 6 to be efficient with memory alignment of PacketRecord to 20 bytes\n#define NUM_RELAYERS 6\n#define HOP_LIMIT_HIGHEST_MASK 0x07 // Bits 0-2\n#define HOP_LIMIT_OUR_TX_MASK 0x38  // Bits 3-5\n#define HOP_LIMIT_OUR_TX_SHIFT 3    // Bits 3-5\n\n/**\n * This is a mixin that adds a record of past packets we have seen\n */\nclass PacketHistory\n{\n  private:\n    struct PacketRecord { // A record of a recent message broadcast, no need to be visible outside this class.\n        NodeNum sender;\n        PacketId id;\n        uint32_t rxTimeMsec;              // Unix time in msecs - the time we received it,  0 means empty\n        uint8_t next_hop;                 // The next hop asked for this packet\n        uint8_t hop_limit;                // bit 0-2: Highest hop limit observed for this packet,\n                                          // bit 3-5: our hop limit when we first transmitted it\n        uint8_t relayed_by[NUM_RELAYERS]; // Array of nodes that relayed this packet\n    };                                    // 4B + 4B + 4B + 1B + 1B + 6B = 20B\n\n    uint32_t recentPacketsCapacity =\n        0; // Can be set in constructor, no need to recompile. Used to allocate memory for mx_recentPackets.\n    PacketRecord *recentPackets = NULL; // Simple and fixed in size. Debloat.\n\n    /** Find a packet record in history.\n     * @param sender NodeNum\n     * @param id PacketId\n     * @return pointer to PacketRecord if found, NULL if not found */\n    PacketRecord *find(NodeNum sender, PacketId id);\n\n    /** Insert/Replace oldest PacketRecord in mx_recentPackets.\n     * @param r PacketRecord to insert or replace */\n    void insert(const PacketRecord &r); // Insert or replace a packet record in the history\n\n    /* Check if a certain node was a relayer of a packet in the history given iterator\n     * If wasSole is not nullptr, it will be set to true if the relayer was the only relayer of that packet\n     * @return true if node was indeed a relayer, false if not */\n    bool wasRelayer(const uint8_t relayer, const PacketRecord &r, bool *wasSole = nullptr);\n\n    uint8_t getHighestHopLimit(const PacketRecord &r);\n    void setHighestHopLimit(PacketRecord &r, uint8_t hopLimit);\n    uint8_t getOurTxHopLimit(const PacketRecord &r);\n    void setOurTxHopLimit(PacketRecord &r, uint8_t hopLimit);\n\n    PacketHistory(const PacketHistory &);            // non construction-copyable\n    PacketHistory &operator=(const PacketHistory &); // non copyable\n  public:\n    explicit PacketHistory(uint32_t size = -1); // Constructor with size parameter, default is PACKETHISTORY_MAX\n    ~PacketHistory();\n\n    /**\n     * Update recentBroadcasts and return true if we have already seen this packet\n     *\n     * @param withUpdate if true and not found we add an entry to recentPackets\n     * @param wasFallback if not nullptr, packet will be checked for fallback to flooding and value will be set to true if so\n     * @param weWereNextHop if not nullptr, packet will be checked for us being the next hop and value will be set to true if so\n     * @param wasUpgraded if not nullptr, will be set to true if this packet has better hop_limit than previously seen\n     */\n    bool wasSeenRecently(const meshtastic_MeshPacket *p, bool withUpdate = true, bool *wasFallback = nullptr,\n                         bool *weWereNextHop = nullptr, bool *wasUpgraded = nullptr);\n\n    /* Check if a certain node was a relayer of a packet in the history given an ID and sender\n     * If wasSole is not nullptr, it will be set to true if the relayer was the only relayer of that packet\n     * @return true if node was indeed a relayer, false if not */\n    bool wasRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender, bool *wasSole = nullptr);\n\n    // Remove a relayer from the list of relayers of a packet in the history given an ID and sender\n    void removeRelayer(const uint8_t relayer, const uint32_t id, const NodeNum sender);\n\n    // To check if the PacketHistory was initialized correctly by constructor\n    bool initOk(void) { return recentPackets != NULL && recentPacketsCapacity != 0; }\n};\n"
  },
  {
    "path": "src/mesh/PhoneAPI.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n\n#include \"Channels.h\"\n#include \"Default.h\"\n#include \"FSCommon.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PacketHistory.h\"\n#include \"PhoneAPI.h\"\n#include \"PowerFSM.h\"\n#include \"RadioInterface.h\"\n#include \"Router.h\"\n#include \"SPILock.h\"\n#include \"TypeConversions.h\"\n#include \"concurrency/LockGuard.h\"\n#include \"main.h\"\n#include \"xmodem.h\"\n\n#if FromRadio_size > MAX_TO_FROM_RADIO_SIZE\n#error FromRadio is too big\n#endif\n\n#if ToRadio_size > MAX_TO_FROM_RADIO_SIZE\n#error ToRadio is too big\n#endif\n#if !MESHTASTIC_EXCLUDE_MQTT\n#include \"mqtt/MQTT.h\"\n#endif\n#include \"Throttle.h\"\n#include <RTC.h>\n\n// Flag to indicate a heartbeat was received and we should send queue status\nbool heartbeatReceived = false;\n\nPhoneAPI::PhoneAPI()\n{\n    lastContactMsec = millis();\n    std::fill(std::begin(recentToRadioPacketIds), std::end(recentToRadioPacketIds), 0);\n}\n\nPhoneAPI::~PhoneAPI()\n{\n    close();\n}\n\nvoid PhoneAPI::handleStartConfig()\n{\n    // Must be before setting state (because state is how we know !connected)\n    if (!isConnected()) {\n        onConnectionChanged(true);\n        observe(&service->fromNumChanged);\n#ifdef FSCom\n        observe(&xModem.packetReady);\n#endif\n    }\n\n    // Allow subclasses to prepare for high-throughput config traffic\n    onConfigStart();\n\n    // even if we were already connected - restart our state machine\n    if (config_nonce == SPECIAL_NONCE_ONLY_NODES) {\n        // If client only wants node info, jump directly to sending nodes\n        state = STATE_SEND_OWN_NODEINFO;\n        LOG_INFO(\"Client only wants node info, skipping other config\");\n    } else {\n        state = STATE_SEND_MY_INFO;\n    }\n    pauseBluetoothLogging = true;\n    spiLock->lock();\n    filesManifest = getFiles(\"/\", 10);\n    spiLock->unlock();\n    LOG_DEBUG(\"Got %d files in manifest\", filesManifest.size());\n\n    LOG_INFO(\"Start API client config millis=%u\", millis());\n    // Protect against concurrent BLE callbacks: they run in NimBLE's FreeRTOS task and also touch nodeInfoQueue.\n    {\n        concurrency::LockGuard guard(&nodeInfoMutex);\n        nodeInfoForPhone = {};\n        nodeInfoQueue.clear();\n    }\n    resetReadIndex();\n}\n\nvoid PhoneAPI::close()\n{\n    LOG_DEBUG(\"PhoneAPI::close()\");\n    if (service->api_state == service->STATE_BLE && api_type == TYPE_BLE)\n        service->api_state = service->STATE_DISCONNECTED;\n    else if (service->api_state == service->STATE_WIFI && api_type == TYPE_WIFI)\n        service->api_state = service->STATE_DISCONNECTED;\n    else if (service->api_state == service->STATE_SERIAL && api_type == TYPE_SERIAL)\n        service->api_state = service->STATE_DISCONNECTED;\n    else if (service->api_state == service->STATE_PACKET && api_type == TYPE_PACKET)\n        service->api_state = service->STATE_DISCONNECTED;\n    else if (service->api_state == service->STATE_HTTP && api_type == TYPE_HTTP)\n        service->api_state = service->STATE_DISCONNECTED;\n    else if (service->api_state == service->STATE_ETH && api_type == TYPE_ETH)\n        service->api_state = service->STATE_DISCONNECTED;\n\n    if (state != STATE_SEND_NOTHING) {\n        state = STATE_SEND_NOTHING;\n        resetReadIndex();\n        unobserve(&service->fromNumChanged);\n#ifdef FSCom\n        unobserve(&xModem.packetReady);\n#endif\n        releasePhonePacket(); // Don't leak phone packets on shutdown\n        releaseQueueStatusPhonePacket();\n        releaseMqttClientProxyPhonePacket();\n        releaseClientNotification();\n        onConnectionChanged(false);\n        fromRadioScratch = {};\n        toRadioScratch = {};\n        // Clear cached node info under lock because NimBLE callbacks can still be draining it.\n        {\n            concurrency::LockGuard guard(&nodeInfoMutex);\n            nodeInfoForPhone = {};\n            nodeInfoQueue.clear();\n        }\n        packetForPhone = NULL;\n        filesManifest.clear();\n        filesManifest.shrink_to_fit();\n        lastPortNumToRadio.clear();\n        fromRadioNum = 0;\n        config_nonce = 0;\n        config_state = 0;\n        pauseBluetoothLogging = false;\n        heartbeatReceived = false;\n    }\n}\n\nbool PhoneAPI::checkConnectionTimeout()\n{\n    if (isConnected()) {\n        bool newContact = checkIsConnected();\n        if (!newContact) {\n            LOG_INFO(\"Lost phone connection\");\n            close();\n            return true;\n        }\n    }\n    return false;\n}\n\n/**\n * Handle a ToRadio protobuf\n */\nbool PhoneAPI::handleToRadio(const uint8_t *buf, size_t bufLength)\n{\n    powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); // As long as the phone keeps talking to us, don't let the radio go to sleep\n    lastContactMsec = millis();\n\n    memset(&toRadioScratch, 0, sizeof(toRadioScratch));\n    if (pb_decode_from_bytes(buf, bufLength, &meshtastic_ToRadio_msg, &toRadioScratch)) {\n        switch (toRadioScratch.which_payload_variant) {\n        case meshtastic_ToRadio_packet_tag:\n            return handleToRadioPacket(toRadioScratch.packet);\n        case meshtastic_ToRadio_want_config_id_tag:\n            config_nonce = toRadioScratch.want_config_id;\n            LOG_INFO(\"Client wants config, nonce=%u\", config_nonce);\n            handleStartConfig();\n            break;\n        case meshtastic_ToRadio_disconnect_tag:\n            LOG_INFO(\"Disconnect from phone\");\n            close();\n            break;\n        case meshtastic_ToRadio_xmodemPacket_tag:\n            LOG_INFO(\"Got xmodem packet\");\n#ifdef FSCom\n            xModem.handlePacket(toRadioScratch.xmodemPacket);\n#endif\n            break;\n#if !MESHTASTIC_EXCLUDE_MQTT\n        case meshtastic_ToRadio_mqttClientProxyMessage_tag:\n            LOG_DEBUG(\"Got MqttClientProxy message\");\n            if (state != STATE_SEND_PACKETS) {\n                LOG_WARN(\"Ignore MqttClientProxy message while completing config handshake\");\n                break;\n            }\n            if (mqtt && moduleConfig.mqtt.proxy_to_client_enabled && moduleConfig.mqtt.enabled &&\n                (channels.anyMqttEnabled() || moduleConfig.mqtt.map_reporting_enabled)) {\n                mqtt->onClientProxyReceive(toRadioScratch.mqttClientProxyMessage);\n            } else {\n                LOG_WARN(\"MqttClientProxy received but proxy is not enabled, no channels have up/downlink, or map reporting \"\n                         \"not enabled\");\n            }\n            break;\n#endif\n        case meshtastic_ToRadio_heartbeat_tag:\n            LOG_DEBUG(\"Got client heartbeat\");\n            heartbeatReceived = true;\n            break;\n        default:\n            // Ignore nop messages\n            break;\n        }\n    } else {\n        LOG_ERROR(\"Error: ignore malformed toradio\");\n    }\n\n    return false;\n}\n\n/**\n * Get the next packet we want to send to the phone, or NULL if no such packet is available.\n *\n * We assume buf is at least FromRadio_size bytes long.\n *\n * Our sending states progress in the following sequence (the client apps ASSUME THIS SEQUENCE, DO NOT CHANGE IT):\n    STATE_SEND_MY_INFO, // send our my info record\n    STATE_SEND_UIDATA,\n    STATE_SEND_OWN_NODEINFO,\n    STATE_SEND_METADATA,\n    STATE_SEND_CHANNELS\n    STATE_SEND_CONFIG,\n    STATE_SEND_MODULE_CONFIG,\n    STATE_SEND_OTHER_NODEINFOS, // states progress in this order as the device sends to the client\n    STATE_SEND_FILEMANIFEST,\n    STATE_SEND_COMPLETE_ID,\n    STATE_SEND_PACKETS // send packets or debug strings\n */\n\nsize_t PhoneAPI::getFromRadio(uint8_t *buf)\n{\n    // Respond to heartbeat by sending queue status\n    if (heartbeatReceived) {\n        memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));\n        fromRadioScratch.which_payload_variant = meshtastic_FromRadio_queueStatus_tag;\n        fromRadioScratch.queueStatus = router->getQueueStatus();\n        heartbeatReceived = false;\n        size_t numbytes = pb_encode_to_bytes(buf, meshtastic_FromRadio_size, &meshtastic_FromRadio_msg, &fromRadioScratch);\n        LOG_DEBUG(\"FromRadio=STATE_SEND_QUEUE_STATUS, numbytes=%u\", numbytes);\n        return numbytes;\n    }\n\n    if (!available()) {\n        return 0;\n    }\n    // In case we send a FromRadio packet\n    memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));\n\n    // Advance states as needed\n    switch (state) {\n    case STATE_SEND_NOTHING:\n        LOG_DEBUG(\"FromRadio=STATE_SEND_NOTHING\");\n        break;\n    case STATE_SEND_MY_INFO:\n        LOG_DEBUG(\"FromRadio=STATE_SEND_MY_INFO\");\n        // If the user has specified they don't want our node to share its location, make sure to tell the phone\n        // app not to send locations on our behalf.\n        fromRadioScratch.which_payload_variant = meshtastic_FromRadio_my_info_tag;\n        strncpy(myNodeInfo.pio_env, optstr(APP_ENV), sizeof(myNodeInfo.pio_env));\n        myNodeInfo.nodedb_count = static_cast<uint16_t>(nodeDB->getNumMeshNodes());\n        fromRadioScratch.my_info = myNodeInfo;\n        state = STATE_SEND_UIDATA;\n\n        service->refreshLocalMeshNode(); // Update my NodeInfo because the client will be asking for it soon.\n        break;\n\n    case STATE_SEND_UIDATA:\n        LOG_INFO(\"getFromRadio=STATE_SEND_UIDATA\");\n        fromRadioScratch.which_payload_variant = meshtastic_FromRadio_deviceuiConfig_tag;\n        fromRadioScratch.deviceuiConfig = uiconfig;\n        state = STATE_SEND_OWN_NODEINFO;\n        break;\n\n    case STATE_SEND_OWN_NODEINFO: {\n        LOG_DEBUG(\"Send My NodeInfo\");\n        auto us = nodeDB->readNextMeshNode(readIndex);\n        if (us) {\n            auto info = TypeConversions::ConvertToNodeInfo(us);\n            info.has_hops_away = false;\n            info.is_favorite = true;\n            {\n                concurrency::LockGuard guard(&nodeInfoMutex);\n                nodeInfoForPhone = info;\n            }\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_node_info_tag;\n            fromRadioScratch.node_info = info;\n            // Should allow us to resume sending NodeInfo in STATE_SEND_OTHER_NODEINFOS\n            {\n                concurrency::LockGuard guard(&nodeInfoMutex);\n                nodeInfoForPhone.num = 0;\n            }\n        }\n        if (config_nonce == SPECIAL_NONCE_ONLY_NODES) {\n            // If client only wants node info, jump directly to sending nodes\n            state = STATE_SEND_OTHER_NODEINFOS;\n            onNowHasData(0);\n        } else {\n            state = STATE_SEND_METADATA;\n        }\n        break;\n    }\n\n    case STATE_SEND_METADATA:\n        LOG_DEBUG(\"Send device metadata\");\n        fromRadioScratch.which_payload_variant = meshtastic_FromRadio_metadata_tag;\n        fromRadioScratch.metadata = getDeviceMetadata();\n        state = STATE_SEND_CHANNELS;\n        break;\n\n    case STATE_SEND_CHANNELS:\n        fromRadioScratch.which_payload_variant = meshtastic_FromRadio_channel_tag;\n        fromRadioScratch.channel = channels.getByIndex(config_state);\n        config_state++;\n        // Advance when we have sent all of our Channels\n        if (config_state >= MAX_NUM_CHANNELS) {\n            LOG_DEBUG(\"Send channels %d\", config_state);\n            state = STATE_SEND_CONFIG;\n            config_state = _meshtastic_AdminMessage_ConfigType_MIN + 1;\n        }\n        break;\n\n    case STATE_SEND_CONFIG:\n        fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_tag;\n        switch (config_state) {\n        case meshtastic_Config_device_tag:\n            LOG_DEBUG(\"Send config: device\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_device_tag;\n            fromRadioScratch.config.payload_variant.device = config.device;\n            break;\n        case meshtastic_Config_position_tag:\n            LOG_DEBUG(\"Send config: position\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_position_tag;\n            fromRadioScratch.config.payload_variant.position = config.position;\n            break;\n        case meshtastic_Config_power_tag:\n            LOG_DEBUG(\"Send config: power\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_power_tag;\n            fromRadioScratch.config.payload_variant.power = config.power;\n            fromRadioScratch.config.payload_variant.power.ls_secs = default_ls_secs;\n            break;\n        case meshtastic_Config_network_tag:\n            LOG_DEBUG(\"Send config: network\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_network_tag;\n            fromRadioScratch.config.payload_variant.network = config.network;\n            break;\n        case meshtastic_Config_display_tag:\n            LOG_DEBUG(\"Send config: display\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_display_tag;\n            fromRadioScratch.config.payload_variant.display = config.display;\n            break;\n        case meshtastic_Config_lora_tag:\n            LOG_DEBUG(\"Send config: lora\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_lora_tag;\n            fromRadioScratch.config.payload_variant.lora = config.lora;\n            break;\n        case meshtastic_Config_bluetooth_tag:\n            LOG_DEBUG(\"Send config: bluetooth\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_bluetooth_tag;\n            fromRadioScratch.config.payload_variant.bluetooth = config.bluetooth;\n            break;\n        case meshtastic_Config_security_tag:\n            LOG_DEBUG(\"Send config: security\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_security_tag;\n            fromRadioScratch.config.payload_variant.security = config.security;\n            break;\n        case meshtastic_Config_sessionkey_tag:\n            LOG_DEBUG(\"Send config: sessionkey\");\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_sessionkey_tag;\n            break;\n        case meshtastic_Config_device_ui_tag: // NOOP!\n            fromRadioScratch.config.which_payload_variant = meshtastic_Config_device_ui_tag;\n            break;\n        default:\n            LOG_ERROR(\"Unknown config type %d\", config_state);\n        }\n        // NOTE: The phone app needs to know the ls_secs value so it can properly expect sleep behavior.\n        // So even if we internally use 0 to represent 'use default' we still need to send the value we are\n        // using to the app (so that even old phone apps work with new device loads).\n\n        config_state++;\n        // Advance when we have sent all of our config objects\n        if (config_state > (_meshtastic_AdminMessage_ConfigType_MAX + 1)) {\n            state = STATE_SEND_MODULECONFIG;\n            config_state = _meshtastic_AdminMessage_ModuleConfigType_MIN + 1;\n        }\n        break;\n\n    case STATE_SEND_MODULECONFIG:\n        fromRadioScratch.which_payload_variant = meshtastic_FromRadio_moduleConfig_tag;\n        switch (config_state) {\n        case meshtastic_ModuleConfig_mqtt_tag:\n            LOG_DEBUG(\"Send module config: mqtt\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_mqtt_tag;\n            fromRadioScratch.moduleConfig.payload_variant.mqtt = moduleConfig.mqtt;\n            break;\n        case meshtastic_ModuleConfig_serial_tag:\n            LOG_DEBUG(\"Send module config: serial\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_serial_tag;\n            fromRadioScratch.moduleConfig.payload_variant.serial = moduleConfig.serial;\n            break;\n        case meshtastic_ModuleConfig_external_notification_tag:\n            LOG_DEBUG(\"Send module config: ext notification\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_external_notification_tag;\n            fromRadioScratch.moduleConfig.payload_variant.external_notification = moduleConfig.external_notification;\n            break;\n        case meshtastic_ModuleConfig_store_forward_tag:\n            LOG_DEBUG(\"Send module config: store forward\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_store_forward_tag;\n            fromRadioScratch.moduleConfig.payload_variant.store_forward = moduleConfig.store_forward;\n            break;\n        case meshtastic_ModuleConfig_range_test_tag:\n            LOG_DEBUG(\"Send module config: range test\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_range_test_tag;\n            fromRadioScratch.moduleConfig.payload_variant.range_test = moduleConfig.range_test;\n            break;\n        case meshtastic_ModuleConfig_telemetry_tag:\n            LOG_DEBUG(\"Send module config: telemetry\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_telemetry_tag;\n            fromRadioScratch.moduleConfig.payload_variant.telemetry = moduleConfig.telemetry;\n            break;\n        case meshtastic_ModuleConfig_canned_message_tag:\n            LOG_DEBUG(\"Send module config: canned message\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_canned_message_tag;\n            fromRadioScratch.moduleConfig.payload_variant.canned_message = moduleConfig.canned_message;\n            break;\n        case meshtastic_ModuleConfig_audio_tag:\n            LOG_DEBUG(\"Send module config: audio\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_audio_tag;\n            fromRadioScratch.moduleConfig.payload_variant.audio = moduleConfig.audio;\n            break;\n        case meshtastic_ModuleConfig_remote_hardware_tag:\n            LOG_DEBUG(\"Send module config: remote hardware\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;\n            fromRadioScratch.moduleConfig.payload_variant.remote_hardware = moduleConfig.remote_hardware;\n            break;\n        case meshtastic_ModuleConfig_neighbor_info_tag:\n            LOG_DEBUG(\"Send module config: neighbor info\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;\n            fromRadioScratch.moduleConfig.payload_variant.neighbor_info = moduleConfig.neighbor_info;\n            break;\n        case meshtastic_ModuleConfig_detection_sensor_tag:\n            LOG_DEBUG(\"Send module config: detection sensor\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;\n            fromRadioScratch.moduleConfig.payload_variant.detection_sensor = moduleConfig.detection_sensor;\n            break;\n        case meshtastic_ModuleConfig_ambient_lighting_tag:\n            LOG_DEBUG(\"Send module config: ambient lighting\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_ambient_lighting_tag;\n            fromRadioScratch.moduleConfig.payload_variant.ambient_lighting = moduleConfig.ambient_lighting;\n            break;\n        case meshtastic_ModuleConfig_paxcounter_tag:\n            LOG_DEBUG(\"Send module config: paxcounter\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_paxcounter_tag;\n            fromRadioScratch.moduleConfig.payload_variant.paxcounter = moduleConfig.paxcounter;\n            break;\n        case meshtastic_ModuleConfig_traffic_management_tag:\n            LOG_DEBUG(\"Send module config: traffic management\");\n            fromRadioScratch.moduleConfig.which_payload_variant = meshtastic_ModuleConfig_traffic_management_tag;\n            fromRadioScratch.moduleConfig.payload_variant.traffic_management = moduleConfig.traffic_management;\n            break;\n        default:\n            LOG_ERROR(\"Unknown module config type %d\", config_state);\n        }\n\n        config_state++;\n        // Advance when we have sent all of our ModuleConfig objects\n        if (config_state > (_meshtastic_AdminMessage_ModuleConfigType_MAX + 1)) {\n            // Handle special nonce behaviors:\n            // - SPECIAL_NONCE_ONLY_CONFIG: Skip node info, go directly to file manifest\n            // - SPECIAL_NONCE_ONLY_NODES: After sending nodes, skip to complete\n            if (config_nonce == SPECIAL_NONCE_ONLY_CONFIG) {\n                state = STATE_SEND_FILEMANIFEST;\n            } else {\n                state = STATE_SEND_OTHER_NODEINFOS;\n                onNowHasData(0);\n            }\n            config_state = 0;\n        }\n        break;\n\n    case STATE_SEND_OTHER_NODEINFOS: {\n        if (readIndex == 2) { //  readIndex==2 will be true for the first non-us node\n            LOG_INFO(\"Start sending nodeinfos millis=%u\", millis());\n        }\n\n        meshtastic_NodeInfo infoToSend = {};\n        {\n            concurrency::LockGuard guard(&nodeInfoMutex);\n            if (nodeInfoForPhone.num == 0 && !nodeInfoQueue.empty()) {\n                // Serve the next cached node without re-reading from the DB iterator.\n                nodeInfoForPhone = nodeInfoQueue.front();\n                nodeInfoQueue.pop_front();\n            }\n            infoToSend = nodeInfoForPhone;\n            if (infoToSend.num != 0)\n                nodeInfoForPhone = {};\n        }\n\n        if (infoToSend.num != 0) {\n            // Just in case we stored a different user.id in the past, but should never happen going forward\n            sprintf(infoToSend.user.id, \"!%08x\", infoToSend.num);\n\n            // Logging this really slows down sending nodes on initial connection because the serial console is so slow, so only\n            // uncomment if you really need to:\n            // LOG_INFO(\"nodeinfo: num=0x%x, lastseen=%u, id=%s, name=%s\", nodeInfoForPhone.num, nodeInfoForPhone.last_heard,\n            // nodeInfoForPhone.user.id, nodeInfoForPhone.user.long_name);\n\n            // Occasional progress logging. (readIndex==2 will be true for the first non-us node)\n            if (readIndex == 2 || readIndex % 20 == 0) {\n                LOG_DEBUG(\"nodeinfo: %d/%d\", readIndex, nodeDB->getNumMeshNodes());\n            }\n\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_node_info_tag;\n            fromRadioScratch.node_info = infoToSend;\n            prefetchNodeInfos();\n        } else {\n            LOG_DEBUG(\"Done sending %d of %d nodeinfos millis=%u\", readIndex, nodeDB->getNumMeshNodes(), millis());\n            concurrency::LockGuard guard(&nodeInfoMutex);\n            nodeInfoQueue.clear();\n            state = STATE_SEND_FILEMANIFEST;\n            // Go ahead and send that ID right now\n            return getFromRadio(buf);\n        }\n        break;\n    }\n\n    case STATE_SEND_FILEMANIFEST: {\n        LOG_DEBUG(\"FromRadio=STATE_SEND_FILEMANIFEST\");\n        // last element\n        if (config_state == filesManifest.size() ||\n            config_nonce == SPECIAL_NONCE_ONLY_NODES) { // also handles an empty filesManifest\n            config_state = 0;\n            filesManifest.clear();\n            // Skip to complete packet\n            sendConfigComplete();\n        } else {\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_fileInfo_tag;\n            fromRadioScratch.fileInfo = filesManifest.at(config_state);\n            LOG_DEBUG(\"File: %s (%d) bytes\", fromRadioScratch.fileInfo.file_name, fromRadioScratch.fileInfo.size_bytes);\n            config_state++;\n        }\n        break;\n    }\n\n    case STATE_SEND_COMPLETE_ID:\n        sendConfigComplete();\n        break;\n\n    case STATE_SEND_PACKETS:\n        pauseBluetoothLogging = false;\n        // Do we have a message from the mesh or packet from the local device?\n        LOG_DEBUG(\"FromRadio=STATE_SEND_PACKETS\");\n        if (queueStatusPacketForPhone) {\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_queueStatus_tag;\n            fromRadioScratch.queueStatus = *queueStatusPacketForPhone;\n            releaseQueueStatusPhonePacket();\n        } else if (mqttClientProxyMessageForPhone) {\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_mqttClientProxyMessage_tag;\n            fromRadioScratch.mqttClientProxyMessage = *mqttClientProxyMessageForPhone;\n            releaseMqttClientProxyPhonePacket();\n        } else if (xmodemPacketForPhone.control != meshtastic_XModem_Control_NUL) {\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_xmodemPacket_tag;\n            fromRadioScratch.xmodemPacket = xmodemPacketForPhone;\n            xmodemPacketForPhone = meshtastic_XModem_init_zero;\n        } else if (clientNotification) {\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_clientNotification_tag;\n            fromRadioScratch.clientNotification = *clientNotification;\n            releaseClientNotification();\n        } else if (packetForPhone) {\n            printPacket(\"phone downloaded packet\", packetForPhone);\n\n            // Encapsulate as a FromRadio packet\n            fromRadioScratch.which_payload_variant = meshtastic_FromRadio_packet_tag;\n            fromRadioScratch.packet = *packetForPhone;\n            releasePhonePacket();\n        }\n        break;\n\n    default:\n        LOG_ERROR(\"getFromRadio unexpected state %d\", state);\n    }\n\n    // Do we have a message from the mesh?\n    if (fromRadioScratch.which_payload_variant != 0) {\n        // Encapsulate as a FromRadio packet\n        size_t numbytes = pb_encode_to_bytes(buf, meshtastic_FromRadio_size, &meshtastic_FromRadio_msg, &fromRadioScratch);\n\n        // VERY IMPORTANT to not print debug messages while writing to fromRadioScratch - because we use that same buffer\n        // for logging (when we are encapsulating with protobufs)\n        return numbytes;\n    }\n\n    LOG_DEBUG(\"No FromRadio packet available\");\n    return 0;\n}\n\nvoid PhoneAPI::sendConfigComplete()\n{\n    LOG_INFO(\"Config Send Complete millis=%u\", millis());\n    fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_complete_id_tag;\n    fromRadioScratch.config_complete_id = config_nonce;\n    config_nonce = 0;\n    state = STATE_SEND_PACKETS;\n    if (api_type == TYPE_BLE) {\n        service->api_state = service->STATE_BLE;\n    } else if (api_type == TYPE_WIFI) {\n        service->api_state = service->STATE_WIFI;\n    } else if (api_type == TYPE_SERIAL) {\n        service->api_state = service->STATE_SERIAL;\n    } else if (api_type == TYPE_PACKET) {\n        service->api_state = service->STATE_PACKET;\n    } else if (api_type == TYPE_HTTP) {\n        service->api_state = service->STATE_HTTP;\n    } else if (api_type == TYPE_ETH) {\n        service->api_state = service->STATE_ETH;\n    }\n\n    // Allow subclasses to know we've entered steady-state so they can lower power consumption\n    onConfigComplete();\n\n    pauseBluetoothLogging = false;\n}\n\nvoid PhoneAPI::releasePhonePacket()\n{\n    if (packetForPhone) {\n        service->releaseToPool(packetForPhone); // we just copied the bytes, so don't need this buffer anymore\n        packetForPhone = NULL;\n    }\n}\n\nvoid PhoneAPI::releaseQueueStatusPhonePacket()\n{\n    if (queueStatusPacketForPhone) {\n        service->releaseQueueStatusToPool(queueStatusPacketForPhone);\n        queueStatusPacketForPhone = NULL;\n    }\n}\n\nvoid PhoneAPI::prefetchNodeInfos()\n{\n    bool added = false;\n    // Keep the queue topped up so BLE reads stay responsive even if DB fetches take a moment.\n    {\n        concurrency::LockGuard guard(&nodeInfoMutex);\n        while (nodeInfoQueue.size() < kNodePrefetchDepth) {\n            auto nextNode = nodeDB->readNextMeshNode(readIndex);\n            if (!nextNode)\n                break;\n\n            auto info = TypeConversions::ConvertToNodeInfo(nextNode);\n            bool isUs = info.num == nodeDB->getNodeNum();\n            info.hops_away = isUs ? 0 : info.hops_away;\n            info.last_heard = isUs ? getValidTime(RTCQualityFromNet) : info.last_heard;\n            info.snr = isUs ? 0 : info.snr;\n            info.via_mqtt = isUs ? false : info.via_mqtt;\n            info.is_favorite = info.is_favorite || isUs;\n            nodeInfoQueue.push_back(info);\n            added = true;\n        }\n    }\n\n    if (added)\n        onNowHasData(0);\n}\n\nvoid PhoneAPI::releaseMqttClientProxyPhonePacket()\n{\n    if (mqttClientProxyMessageForPhone) {\n        service->releaseMqttClientProxyMessageToPool(mqttClientProxyMessageForPhone);\n        mqttClientProxyMessageForPhone = NULL;\n    }\n}\n\nvoid PhoneAPI::releaseClientNotification()\n{\n    if (clientNotification) {\n        service->releaseClientNotificationToPool(clientNotification);\n        clientNotification = NULL;\n    }\n}\n\n/**\n * Return true if we have data available to send to the phone\n */\nbool PhoneAPI::available()\n{\n    switch (state) {\n    case STATE_SEND_NOTHING:\n        return false;\n    case STATE_SEND_MY_INFO:\n    case STATE_SEND_UIDATA:\n    case STATE_SEND_CHANNELS:\n    case STATE_SEND_CONFIG:\n    case STATE_SEND_MODULECONFIG:\n    case STATE_SEND_METADATA:\n    case STATE_SEND_OWN_NODEINFO:\n    case STATE_SEND_FILEMANIFEST:\n    case STATE_SEND_COMPLETE_ID:\n        return true;\n\n    case STATE_SEND_OTHER_NODEINFOS: {\n        concurrency::LockGuard guard(&nodeInfoMutex);\n        if (nodeInfoQueue.empty()) {\n            // Drop the lock before prefetching; prefetchNodeInfos() will re-acquire it.\n            goto PREFETCH_NODEINFO;\n        }\n    }\n        return true; // Always say we have something, because we might need to advance our state machine\n    PREFETCH_NODEINFO:\n        prefetchNodeInfos();\n        return true;\n    case STATE_SEND_PACKETS: {\n        if (!queueStatusPacketForPhone)\n            queueStatusPacketForPhone = service->getQueueStatusForPhone();\n        if (!mqttClientProxyMessageForPhone)\n            mqttClientProxyMessageForPhone = service->getMqttClientProxyMessageForPhone();\n        if (!clientNotification)\n            clientNotification = service->getClientNotificationForPhone();\n        bool hasPacket = !!queueStatusPacketForPhone || !!mqttClientProxyMessageForPhone || !!clientNotification;\n        if (hasPacket)\n            return true;\n\n#ifdef FSCom\n        if (xmodemPacketForPhone.control == meshtastic_XModem_Control_NUL)\n            xmodemPacketForPhone = xModem.getForPhone();\n        if (xmodemPacketForPhone.control != meshtastic_XModem_Control_NUL) {\n            xModem.resetForPhone();\n            return true;\n        }\n#endif\n\n#ifdef ARCH_ESP32\n#if !MESHTASTIC_EXCLUDE_STOREFORWARD\n        // Check if StoreForward has packets stored for us.\n        if (!packetForPhone && storeForwardModule)\n            packetForPhone = storeForwardModule->getForPhone();\n#endif\n#endif\n\n        if (!packetForPhone)\n            packetForPhone = service->getForPhone();\n        hasPacket = !!packetForPhone;\n        return hasPacket;\n    }\n    default:\n        LOG_ERROR(\"PhoneAPI::available unexpected state %d\", state);\n    }\n\n    return false;\n}\n\nvoid PhoneAPI::sendNotification(meshtastic_LogRecord_Level level, uint32_t replyId, const char *message)\n{\n    meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n    cn->has_reply_id = true;\n    cn->reply_id = replyId;\n    cn->level = meshtastic_LogRecord_Level_WARNING;\n    cn->time = getValidTime(RTCQualityFromNet);\n    strncpy(cn->message, message, sizeof(cn->message));\n    service->sendClientNotification(cn);\n}\n\nbool PhoneAPI::wasSeenRecently(uint32_t id)\n{\n    for (int i = 0; i < 20; i++) {\n        if (recentToRadioPacketIds[i] == id) {\n            return true;\n        }\n        if (recentToRadioPacketIds[i] == 0) {\n            recentToRadioPacketIds[i] = id;\n            return false;\n        }\n    }\n    // If the array is full, shift all elements to the left and add the new id at the end\n    memmove(recentToRadioPacketIds, recentToRadioPacketIds + 1, (19) * sizeof(uint32_t));\n    recentToRadioPacketIds[19] = id;\n    return false;\n}\n\n/**\n * Handle a packet that the phone wants us to send.  It is our responsibility to free the packet to the pool\n */\nbool PhoneAPI::handleToRadioPacket(meshtastic_MeshPacket &p)\n{\n    printPacket(\"PACKET FROM PHONE\", &p);\n\n#if defined(ARCH_PORTDUINO)\n    // For use with the simulator, we should not ignore duplicate packets from the phone\n    if (SimRadio::instance == nullptr)\n#endif\n        if (p.id > 0 && wasSeenRecently(p.id)) {\n            LOG_DEBUG(\"Ignore packet from phone, already seen recently\");\n            return false;\n        }\n\n    if (p.decoded.portnum == meshtastic_PortNum_TRACEROUTE_APP && lastPortNumToRadio[p.decoded.portnum] &&\n        Throttle::isWithinTimespanMs(lastPortNumToRadio[p.decoded.portnum], THIRTY_SECONDS_MS)) {\n        LOG_WARN(\"Rate limit portnum %d\", p.decoded.portnum);\n        sendNotification(meshtastic_LogRecord_Level_WARNING, p.id, \"TraceRoute can only be sent once every 30 seconds\");\n        meshtastic_QueueStatus qs = router->getQueueStatus();\n        service->sendQueueStatusToPhone(qs, 0, p.id);\n        return false;\n    } else if (p.decoded.portnum == meshtastic_PortNum_TRACEROUTE_APP && isBroadcast(p.to) && p.hop_limit > 0) {\n        sendNotification(meshtastic_LogRecord_Level_WARNING, p.id, \"Multi-hop traceroute to broadcast address is not allowed\");\n        meshtastic_QueueStatus qs = router->getQueueStatus();\n        service->sendQueueStatusToPhone(qs, 0, p.id);\n        return false;\n    } else if (IS_ONE_OF(p.decoded.portnum, meshtastic_PortNum_POSITION_APP, meshtastic_PortNum_WAYPOINT_APP,\n                         meshtastic_PortNum_ALERT_APP, meshtastic_PortNum_TELEMETRY_APP) &&\n               lastPortNumToRadio[p.decoded.portnum] &&\n               Throttle::isWithinTimespanMs(lastPortNumToRadio[p.decoded.portnum], TEN_SECONDS_MS)) {\n        // TODO: [Issue #6700] Make this rate limit throttling scale up / down with the preset\n        LOG_WARN(\"Rate limit portnum %d\", p.decoded.portnum);\n        meshtastic_QueueStatus qs = router->getQueueStatus();\n        service->sendQueueStatusToPhone(qs, 0, p.id);\n        // FIXME: Figure out why this continues to happen\n        // sendNotification(meshtastic_LogRecord_Level_WARNING, p.id, \"Position can only be sent once every 5 seconds\");\n        return false;\n    } else if (p.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP && lastPortNumToRadio[p.decoded.portnum] &&\n               Throttle::isWithinTimespanMs(lastPortNumToRadio[p.decoded.portnum], TWO_SECONDS_MS)) {\n        LOG_WARN(\"Rate limit portnum %d\", p.decoded.portnum);\n        meshtastic_QueueStatus qs = router->getQueueStatus();\n        service->sendQueueStatusToPhone(qs, 0, p.id);\n        service->sendRoutingErrorResponse(meshtastic_Routing_Error_RATE_LIMIT_EXCEEDED, &p);\n        // sendNotification(meshtastic_LogRecord_Level_WARNING, p.id, \"Text messages can only be sent once every 2 seconds\");\n        return false;\n    }\n\n    // Upgrade traceroute requests from phone to use reliable delivery, matching TraceRouteModule\n    if (p.decoded.portnum == meshtastic_PortNum_TRACEROUTE_APP && !isBroadcast(p.to)) {\n        // Use reliable delivery for traceroute requests (which will be copied to traceroute responses by setReplyTo)\n        p.want_ack = true;\n    }\n\n    lastPortNumToRadio[p.decoded.portnum] = millis();\n    service->handleToRadio(p);\n    return true;\n}\n\n/// If the mesh service tells us fromNum has changed, tell the phone\nint PhoneAPI::onNotify(uint32_t newValue)\n{\n    bool timeout = checkConnectionTimeout(); // a handy place to check if we've heard from the phone (since the BLE version\n                                             // doesn't call this from idle)\n\n    if (state == STATE_SEND_PACKETS) {\n        LOG_INFO(\"Tell client we have new packets %u\", newValue);\n        onNowHasData(newValue);\n    } else {\n        LOG_DEBUG(\"Client not yet interested in packets (state=%d)\", state);\n    }\n\n    return timeout ? -1 : 0; // If we timed out, MeshService should stop iterating through observers as we just removed one\n}\n"
  },
  {
    "path": "src/mesh/PhoneAPI.h",
    "content": "#pragma once\n\n#include \"Observer.h\"\n#include \"concurrency/Lock.h\"\n#include \"mesh-pb-constants.h\"\n#include \"meshtastic/portnums.pb.h\"\n#include <deque>\n#include <iterator>\n#include <string>\n#include <unordered_map>\n#include <vector>\n\n// Make sure that we never let our packets grow too large for one BLE packet\n#define MAX_TO_FROM_RADIO_SIZE 512\n\n#if meshtastic_FromRadio_size > MAX_TO_FROM_RADIO_SIZE\n#error \"meshtastic_FromRadio_size is too large for our BLE packets\"\n#endif\n#if meshtastic_ToRadio_size > MAX_TO_FROM_RADIO_SIZE\n#error \"meshtastic_ToRadio_size is too large for our BLE packets\"\n#endif\n\n#define SPECIAL_NONCE_ONLY_CONFIG 69420\n#define SPECIAL_NONCE_ONLY_NODES 69421 // ( ͡° ͜ʖ ͡°)\n\n/**\n * Provides our protobuf based API which phone/PC clients can use to talk to our device\n * over UDP, bluetooth or serial.\n *\n * Subclass to customize behavior for particular type of transport (BLE, UDP, TCP, serial)\n *\n * Eventually there should be once instance of this class for each live connection (because it has a bit of state\n * for that connection)\n */\nclass PhoneAPI\n    : public Observer<uint32_t> // FIXME, we shouldn't be inheriting from Observer, instead use CallbackObserver as a member\n{\n    enum State {\n        STATE_SEND_NOTHING, // Initial state, don't send anything until the client starts asking for config\n        STATE_SEND_UIDATA,  // send stored data for device-ui\n        STATE_SEND_MY_INFO, // send our my info record\n        STATE_SEND_OWN_NODEINFO,\n        STATE_SEND_METADATA,\n        STATE_SEND_CHANNELS,        // Send all channels\n        STATE_SEND_CONFIG,          // Replacement for the old Radioconfig\n        STATE_SEND_MODULECONFIG,    // Send Module specific config\n        STATE_SEND_OTHER_NODEINFOS, // states progress in this order as the device sends to to the client\n        STATE_SEND_FILEMANIFEST,    // Send file manifest\n        STATE_SEND_COMPLETE_ID,\n        STATE_SEND_PACKETS // send packets or debug strings\n    };\n\n    State state = STATE_SEND_NOTHING;\n\n    uint8_t config_state = 0;\n\n    // Hashmap of timestamps for last time we received a packet on the API per portnum\n    std::unordered_map<meshtastic_PortNum, uint32_t> lastPortNumToRadio;\n    uint32_t recentToRadioPacketIds[20]; // Last 20 ToRadio MeshPacket IDs we have seen\n\n    /**\n     * Each packet sent to the phone has an incrementing count\n     */\n    uint32_t fromRadioNum = 0;\n\n    /// We temporarily keep the packet here between the call to available and getFromRadio.  We will free it after the phone\n    /// downloads it\n    meshtastic_MeshPacket *packetForPhone = NULL;\n\n    // file transfer packets destined for phone. Push it to the queue then free it.\n    meshtastic_XModem xmodemPacketForPhone = meshtastic_XModem_init_zero;\n\n    // Keep QueueStatus packet just as packetForPhone\n    meshtastic_QueueStatus *queueStatusPacketForPhone = NULL;\n\n    // Keep MqttClientProxyMessage packet just as packetForPhone\n    meshtastic_MqttClientProxyMessage *mqttClientProxyMessageForPhone = NULL;\n\n    // Keep ClientNotification packet just as packetForPhone\n    meshtastic_ClientNotification *clientNotification = NULL;\n\n    /// We temporarily keep the nodeInfo here between the call to available and getFromRadio\n    meshtastic_NodeInfo nodeInfoForPhone = meshtastic_NodeInfo_init_default;\n    // Prefetched node info entries ready for immediate transmission to the phone.\n    std::deque<meshtastic_NodeInfo> nodeInfoQueue;\n    // Tunable size of the node info cache so we can keep BLE reads non-blocking.\n    static constexpr size_t kNodePrefetchDepth = 4;\n    // Protect nodeInfoForPhone + nodeInfoQueue because NimBLE callbacks run in a separate FreeRTOS task.\n    concurrency::Lock nodeInfoMutex;\n\n    meshtastic_ToRadio toRadioScratch = {\n        0}; // this is a static scratch object, any data must be copied elsewhere before returning\n\n    /// Use to ensure that clients don't get confused about old messages from the radio\n    uint32_t config_nonce = 0;\n    uint32_t readIndex = 0;\n\n    std::vector<meshtastic_FileInfo> filesManifest = {};\n\n    void resetReadIndex() { readIndex = 0; }\n\n  public:\n    PhoneAPI();\n\n    /// Destructor - calls close()\n    virtual ~PhoneAPI();\n\n    // Call this when the client drops the connection, resets the state to STATE_SEND_NOTHING\n    // Unregisters our observer.  A closed connection **can** be reopened by calling init again.\n    virtual void close();\n\n    /**\n     * Handle a ToRadio protobuf\n     * @return true true if a packet was queued for sending (so that caller can yield)\n     */\n    virtual bool handleToRadio(const uint8_t *buf, size_t len);\n\n    /**\n     * Send a (client)notification to the phone\n     */\n    virtual void sendNotification(meshtastic_LogRecord_Level level, uint32_t replyId, const char *message);\n\n    /**\n     * Get the next packet we want to send to the phone\n     *\n     * We assume buf is at least FromRadio_size bytes long.\n     * Returns number of bytes in the FromRadio packet (or 0 if no packet available)\n     */\n    size_t getFromRadio(uint8_t *buf);\n\n    void sendConfigComplete();\n\n    /**\n     * Return true if we have data available to send to the phone\n     */\n    bool available();\n\n    bool isConnected() { return state != STATE_SEND_NOTHING; }\n    bool isSendingPackets() { return state == STATE_SEND_PACKETS; }\n\n  protected:\n    /// Our fromradio packet while it is being assembled\n    meshtastic_FromRadio fromRadioScratch = {};\n\n    /** the last msec we heard from the client on the other side of this link */\n    uint32_t lastContactMsec = 0;\n\n    /// Hookable to find out when connection changes\n    virtual void onConnectionChanged(bool connected) {}\n\n    /// If we haven't heard from the other side in a while then say not connected. Returns true if timeout occurred\n    bool checkConnectionTimeout();\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() = 0;\n\n    /**\n     * Subclasses can use this as a hook to provide custom notifications for their transport (i.e. bluetooth notifies)\n     */\n    virtual void onNowHasData(uint32_t fromRadioNum) {}\n\n    /// Subclasses can use these lifecycle hooks for transport-specific behavior around config/steady-state\n    /// (i.e. BLE connection params)\n    virtual void onConfigStart() {}\n    virtual void onConfigComplete() {}\n\n    /// begin a new connection\n    void handleStartConfig();\n\n    enum APIType {\n        TYPE_NONE, // Initial state, don't send anything until the client starts asking for config\n        TYPE_BLE,\n        TYPE_WIFI,\n        TYPE_SERIAL,\n        TYPE_PACKET,\n        TYPE_HTTP,\n        TYPE_ETH\n    };\n\n    APIType api_type = TYPE_NONE;\n\n  private:\n    void releasePhonePacket();\n\n    void releaseQueueStatusPhonePacket();\n\n    void prefetchNodeInfos();\n\n    void releaseMqttClientProxyPhonePacket();\n\n    void releaseClientNotification();\n\n    bool wasSeenRecently(uint32_t packetId);\n\n    /**\n     * Handle a packet that the phone wants us to send.  We can write to it but can not keep a reference to it\n     * @return true true if a packet was queued for sending\n     */\n    bool handleToRadioPacket(meshtastic_MeshPacket &p);\n\n    /// If the mesh service tells us fromNum has changed, tell the phone\n    virtual int onNotify(uint32_t newValue) override;\n};\n"
  },
  {
    "path": "src/mesh/PointerQueue.h",
    "content": "#pragma once\n\n#include \"TypedQueue.h\"\n\n/**\n * A wrapper for freertos queues that assumes each element is a pointer\n */\ntemplate <class T> class PointerQueue : public TypedQueue<T *>\n{\n  public:\n    explicit PointerQueue(int maxElements) : TypedQueue<T *>(maxElements) {}\n\n    // returns a ptr or null if the queue was empty\n    T *dequeuePtr(TickType_t maxWait = portMAX_DELAY)\n    {\n        T *p;\n\n        return this->dequeue(&p, maxWait) ? p : nullptr;\n    }\n\n#ifdef HAS_FREE_RTOS\n    // returns a ptr or null if the queue was empty\n    T *dequeuePtrFromISR(BaseType_t *higherPriWoken)\n    {\n        T *p;\n\n        return this->dequeueFromISR(&p, higherPriWoken) ? p : nullptr;\n    }\n#endif\n};\n"
  },
  {
    "path": "src/mesh/ProtobufModule.cpp",
    "content": "#include \"ProtobufModule.h\"\n#include \"configuration.h\"\n"
  },
  {
    "path": "src/mesh/ProtobufModule.h",
    "content": "#pragma once\n#include \"SinglePortModule.h\"\n\n/**\n * A base class for mesh modules that assume that they are sending/receiving one particular protobuf based\n * payload.  Using one particular app ID.\n *\n * If you are using protobufs to encode your packets (recommended) you can use this as a baseclass for your module\n * and avoid a bunch of boilerplate code.\n */\ntemplate <class T> class ProtobufModule : protected SinglePortModule\n{\n    const pb_msgdesc_t *fields;\n\n  public:\n    uint16_t numOnlineNodes = 0;\n    /** Constructor\n     * name is for debugging output\n     */\n    ProtobufModule(const char *_name, meshtastic_PortNum _ourPortNum, const pb_msgdesc_t *_fields)\n        : SinglePortModule(_name, _ourPortNum), fields(_fields)\n    {\n    }\n\n  protected:\n    /**\n     * Handle a received message, the data field in the message is already decoded and is provided\n     *\n     * In general decoded will always be !NULL.  But in some special applications (where you have handling packets\n     * for multiple port numbers, decoding will ONLY be attempted for packets where the portnum matches our expected ourPortNum.\n     */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, T *decoded) = 0;\n\n    /** Called to make changes to a particular incoming message\n     */\n    virtual void alterReceivedProtobuf(meshtastic_MeshPacket &mp, T *decoded){};\n\n    /**\n     * Return a mesh packet which has been preinited with a particular protobuf data payload and port number.\n     * You can then send this packet (after customizing any of the payload fields you might need) with\n     * service->sendToMesh()\n     */\n    meshtastic_MeshPacket *allocDataProtobuf(const T &payload)\n    {\n        // Update our local node info with our position (even if we don't decide to update anyone else)\n        meshtastic_MeshPacket *p = allocDataPacket();\n\n        p->decoded.payload.size =\n            pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), fields, &payload);\n        // LOG_DEBUG(\"did encode\");\n        return p;\n    }\n\n    /**\n     * Gets the short name from the sender of the mesh packet\n     * Returns \"???\" if unknown sender\n     */\n    const char *getSenderShortName(const meshtastic_MeshPacket &mp)\n    {\n        auto node = nodeDB->getMeshNode(getFrom(&mp));\n        const char *sender = (node) ? node->user.short_name : \"???\";\n        return sender;\n    }\n\n    int handleStatusUpdate(const meshtastic::Status *arg)\n    {\n        if (arg->getStatusType() == STATUS_TYPE_NODE) {\n            numOnlineNodes = nodeStatus->getNumOnline();\n        }\n        return 0;\n    }\n\n  private:\n    /** Called to handle a particular incoming message\n\n    @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for\n    it\n    */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override\n    {\n        // FIXME - we currently update position data in the DB only if the message was a broadcast or destined to us\n        // it would be better to update even if the message was destined to others.\n\n        auto &p = mp.decoded;\n\n        T scratch;\n        T *decoded = NULL;\n        if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == ourPortNum) {\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, fields, &scratch)) {\n                decoded = &scratch;\n                LOG_INFO(\"Received %s from=0x%0x, id=0x%x, portnum=%d, payloadlen=%d\", name, mp.from, mp.id, p.portnum,\n                         p.payload.size);\n            } else {\n                LOG_ERROR(\"Error decoding proto module!\");\n                // if we can't decode it, nobody can process it!\n                return ProcessMessage::STOP;\n            }\n        }\n\n        return handleReceivedProtobuf(mp, decoded) ? ProcessMessage::STOP : ProcessMessage::CONTINUE;\n    }\n\n    /** Called to alter a particular incoming message\n     */\n    virtual void alterReceived(meshtastic_MeshPacket &mp) override\n    {\n        T scratch;\n        T *decoded = NULL;\n        if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == ourPortNum) {\n            memset(&scratch, 0, sizeof(scratch));\n            const meshtastic_Data &p = mp.decoded;\n            if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, fields, &scratch)) {\n                decoded = &scratch;\n            } else {\n                LOG_ERROR(\"Error decoding proto module!\");\n                // if we can't decode it, nobody can process it!\n                return;\n            }\n\n            return alterReceivedProtobuf(mp, decoded);\n        }\n    }\n};"
  },
  {
    "path": "src/mesh/RF95Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX127X != 1\n#include \"RF95Interface.h\"\n#include \"MeshRadio.h\" // kinda yucky, but we need to know which region we are in\n#include \"RadioLibRF95.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#endif\n\n#if ARCH_PORTDUINO\n#define RF95_MAX_POWER portduino_config.rf95_max_power\n#endif\n#ifndef RF95_MAX_POWER\n#define RF95_MAX_POWER 20\n#endif\n\n// if we use 20 we are limited to 1% duty cycle or hw might overheat.  For continuous operation set a limit of 17\n// In theory up to 27 dBm is possible, but the modules installed in most radios can cope with a max of 20.  So BIG WARNING\n// if you set power to something higher than 17 or 20 you might fry your board.\n\n#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT)\n// Structure to hold DAC and DB values\ntypedef struct {\n    uint8_t dac;\n    uint8_t db;\n} DACDB;\n\n// Interpolation function\nDACDB interpolate(uint8_t dbm, uint8_t dbm1, uint8_t dbm2, DACDB val1, DACDB val2)\n{\n    DACDB result;\n    double fraction = (double)(dbm - dbm1) / (dbm2 - dbm1);\n    result.dac = (uint8_t)(val1.dac + fraction * (val2.dac - val1.dac));\n    result.db = (uint8_t)(val1.db + fraction * (val2.db - val1.db));\n    return result;\n}\n\n// Function to find the correct DAC and DB values based on dBm using interpolation\nDACDB getDACandDB(uint8_t dbm)\n{\n    // Predefined values\n    static const struct {\n        uint8_t dbm;\n        DACDB values;\n    }\n#ifdef RADIOMASTER_900_BANDIT_NANO\n    dbmToDACDB[] = {\n        {20, {168, 2}}, // 100mW\n        {24, {148, 6}}, // 250mW\n        {27, {128, 9}}, // 500mW\n        {30, {90, 12}}  // 1000mW\n    };\n#endif\n#ifdef RADIOMASTER_900_BANDIT\n    dbmToDACDB[] = {\n        {20, {165, 2}}, // 100mW\n        {24, {155, 6}}, // 250mW\n        {27, {142, 9}}, // 500mW\n        {30, {110, 10}} // 1000mW\n    };\n#endif\n    const int numValues = sizeof(dbmToDACDB) / sizeof(dbmToDACDB[0]);\n\n    // Find the interval dbm falls within and interpolate\n    for (int i = 0; i < numValues - 1; i++) {\n        if (dbm >= dbmToDACDB[i].dbm && dbm <= dbmToDACDB[i + 1].dbm) {\n            return interpolate(dbm, dbmToDACDB[i].dbm, dbmToDACDB[i + 1].dbm, dbmToDACDB[i].values, dbmToDACDB[i + 1].values);\n        }\n    }\n\n    // Return a default value if no match is found and default to 100mW\n#ifdef RADIOMASTER_900_BANDIT_NANO\n    DACDB defaultValue = {168, 2};\n#endif\n#ifdef RADIOMASTER_900_BANDIT\n    DACDB defaultValue = {165, 2};\n#endif\n    return defaultValue;\n}\n#endif\n\nRF95Interface::RF95Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                             RADIOLIB_PIN_TYPE busy)\n    : RadioLibInterface(hal, cs, irq, rst, busy)\n{\n    LOG_DEBUG(\"RF95Interface(cs=%d, irq=%d, rst=%d, busy=%d)\", cs, irq, rst, busy);\n}\n\n/** Some boards require GPIO control of tx vs rx paths */\nvoid RF95Interface::setTransmitEnable(bool txon)\n{\n#ifdef RF95_TXEN\n    digitalWrite(RF95_TXEN, txon ? 1 : 0);\n#elif ARCH_PORTDUINO\n    if (portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_txen_pin.pin, txon ? 1 : 0);\n    }\n#endif\n\n#ifdef RF95_RXEN\n    digitalWrite(RF95_RXEN, txon ? 0 : 1);\n#elif ARCH_PORTDUINO\n    if (portduino_config.lora_rxen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_rxen_pin.pin, txon ? 0 : 1);\n    }\n#endif\n}\n\n/// Initialise the Driver transport hardware and software.\n/// Make sure the Driver is properly configured before calling init().\n/// \\return true if initialisation succeeded.\nbool RF95Interface::init()\n{\n    RadioLibInterface::init();\n\n#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT)\n    // DAC and DB values based on dBm using interpolation\n    DACDB dacDbValues = getDACandDB(power);\n    int8_t powerDAC = dacDbValues.dac;\n    power = dacDbValues.db;\n#endif\n\n    limitPower(RF95_MAX_POWER);\n\n    iface = lora = new RadioLibRF95(&module);\n\n#ifdef RF95_TCXO\n    pinMode(RF95_TCXO, OUTPUT);\n    digitalWrite(RF95_TCXO, 1);\n#endif\n\n    // enable PA\n#ifdef RF95_PA_EN\n#if defined(RF95_PA_DAC_EN)\n#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT)\n    // Use calculated DAC value\n    dacWrite(RF95_PA_EN, powerDAC);\n#else\n    // Use Value set in /*/variant.h\n    dacWrite(RF95_PA_EN, RF95_PA_LEVEL);\n#endif\n#endif\n#endif\n\n    /*\n    #define RF95_TXEN (22) // If defined, this pin should be set high prior to transmit (controls an external analog switch)\n    #define RF95_RXEN (23) // If defined, this pin should be set high prior to receive (controls an external analog switch)\n    */\n\n#ifdef RF95_TXEN\n    pinMode(RF95_TXEN, OUTPUT);\n    digitalWrite(RF95_TXEN, 0);\n#endif\n\n#ifdef RF95_FAN_EN\n    pinMode(RF95_FAN_EN, OUTPUT);\n    digitalWrite(RF95_FAN_EN, 1);\n#endif\n\n#ifdef RF95_RXEN\n    pinMode(RF95_RXEN, OUTPUT);\n    digitalWrite(RF95_RXEN, 1);\n#endif\n#if ARCH_PORTDUINO\n    if (portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {\n        pinMode(portduino_config.lora_txen_pin.pin, OUTPUT);\n        digitalWrite(portduino_config.lora_txen_pin.pin, 0);\n    }\n    if (portduino_config.lora_rxen_pin.pin != RADIOLIB_NC) {\n        pinMode(portduino_config.lora_rxen_pin.pin, OUTPUT);\n        digitalWrite(portduino_config.lora_rxen_pin.pin, 0);\n    }\n#endif\n    setTransmitEnable(false);\n\n    int res = lora->begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength);\n    LOG_INFO(\"RF95 init result %d\", res);\n    if (res == RADIOLIB_ERR_CHIP_NOT_FOUND || res == RADIOLIB_ERR_SPI_CMD_FAILED)\n        return false;\n\n    LOG_INFO(\"Frequency set to %f\", getFreq());\n    LOG_INFO(\"Bandwidth set to %f\", bw);\n    LOG_INFO(\"Power output set to %d\", power);\n#if defined(RADIOMASTER_900_BANDIT_NANO) || defined(RADIOMASTER_900_BANDIT)\n    LOG_INFO(\"DAC output set to %d\", powerDAC);\n#endif\n\n    if (res == RADIOLIB_ERR_NONE)\n        res = lora->setCRC(RADIOLIB_SX126X_LORA_CRC_ON);\n\n    if (res == RADIOLIB_ERR_NONE)\n        startReceive(); // start receiving\n\n    return res == RADIOLIB_ERR_NONE;\n}\n\nvoid RF95Interface::disableInterrupt()\n{\n    lora->clearDio0Action();\n}\n\nbool RF95Interface::reconfigure()\n{\n    RadioLibInterface::reconfigure();\n\n    // set mode to standby\n    setStandby();\n\n    // configure publicly accessible settings\n    int err = lora->setSpreadingFactor(sf);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora->setBandwidth(bw);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora->setCodingRate(cr);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora->setSyncWord(syncWord);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"RF95 setSyncWord %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora->setCurrentLimit(currentLimit);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"RF95 setCurrentLimit %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora->setPreambleLength(preambleLength);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"RF95 setPreambleLength %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora->setFrequency(getFreq());\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    if (power > RF95_MAX_POWER) // This chip has lower power limits than some\n        power = RF95_MAX_POWER;\n\n#ifdef USE_RF95_RFO\n    err = lora->setOutputPower(power, true);\n#else\n    err = lora->setOutputPower(power);\n#endif\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    startReceive(); // restart receiving\n\n    return RADIOLIB_ERR_NONE;\n}\n\n/**\n * Add SNR data to received messages\n */\nvoid RF95Interface::addReceiveMetadata(meshtastic_MeshPacket *mp)\n{\n    mp->rx_snr = lora->getSNR();\n    mp->rx_rssi = lround(lora->getRSSI());\n    LOG_DEBUG(\"Corrected frequency offset: %f\", lora->getFrequencyError());\n}\n\nvoid RF95Interface::setStandby()\n{\n    int err = lora->standby();\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"RF95 standby %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    isReceiving = false; // If we were receiving, not any more\n    disableInterrupt();\n    completeSending(); // If we were sending, not anymore\n    RadioLibInterface::setStandby();\n}\n\n/** We override to turn on transmitter power as needed.\n */\nvoid RF95Interface::configHardwareForSend()\n{\n    setTransmitEnable(true);\n\n    RadioLibInterface::configHardwareForSend();\n}\n\nvoid RF95Interface::startReceive()\n{\n    setTransmitEnable(false);\n    setStandby();\n    int err = lora->startReceive();\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"RF95 startReceive %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    isReceiving = true;\n\n    // Must be done AFTER, starting receive, because startReceive clears (possibly stale) interrupt pending register bits\n    enableInterrupt(isrRxLevel0);\n    checkRxDoneIrqFlag();\n}\n\nbool RF95Interface::isChannelActive()\n{\n    // check if we can detect a LoRa preamble on the current channel\n    int16_t result;\n    setTransmitEnable(false);\n    setStandby(); // needed for smooth transition\n    result = lora->scanChannel();\n\n    if (result == RADIOLIB_PREAMBLE_DETECTED) {\n        // LOG_DEBUG(\"Channel is busy!\");\n        return true;\n    }\n    if (result != RADIOLIB_CHANNEL_FREE)\n        LOG_ERROR(\"RF95 isChannelActive %s%d\", radioLibErr, result);\n    assert(result != RADIOLIB_ERR_WRONG_MODEM);\n\n    // LOG_DEBUG(\"Channel is free!\");\n    return false;\n}\n\n/** Could we send right now (i.e. either not actively receiving or transmitting)? */\nbool RF95Interface::isActivelyReceiving()\n{\n    return lora->isReceiving();\n}\n\nbool RF95Interface::sleep()\n{\n    // put chipset into sleep mode\n    setStandby(); // First cancel any active receiving/sending\n    lora->sleep();\n\n#ifdef RF95_FAN_EN\n    digitalWrite(RF95_FAN_EN, 0);\n#endif\n\n    return true;\n}\n#endif"
  },
  {
    "path": "src/mesh/RF95Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_SX127X != 1\n#include \"MeshRadio.h\" // kinda yucky, but we need to know which region we are in\n#include \"RadioLibInterface.h\"\n#include \"RadioLibRF95.h\"\n\n/**\n * Our new not radiohead adapter for RF95 style radios\n */\nclass RF95Interface : public RadioLibInterface\n{\n    RadioLibRF95 *lora = NULL; // Either a RFM95 or RFM96 depending on what was stuffed on this board\n\n  public:\n    RF95Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                  RADIOLIB_PIN_TYPE busy);\n\n    // TODO: Verify that this irq flag works with RFM95 / SX1276 radios the way it used to\n    bool isIRQPending() override { return lora->getIRQFlags() & RADIOLIB_SX127X_MASK_IRQ_FLAG_VALID_HEADER; }\n\n    /// Initialise the Driver transport hardware and software.\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool init() override;\n\n    /// Apply any radio provisioning changes\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool reconfigure() override;\n\n    /// Prepare hardware for sleep.  Call this _only_ for deep sleep, not needed for light sleep.\n    virtual bool sleep() override;\n\n  protected:\n    /**\n     * Glue functions called from ISR land\n     */\n    virtual void disableInterrupt() override;\n\n    /**\n     * Enable a particular ISR callback glue function\n     */\n    virtual void enableInterrupt(void (*callback)()) { lora->setDio0Action(callback, RISING); }\n\n    /** can we detect a LoRa preamble on the current channel? */\n    virtual bool isChannelActive() override;\n\n    /** are we actively receiving a packet (only called during receiving state) */\n    virtual bool isActivelyReceiving() override;\n\n    /**\n     * Start waiting to receive a message\n     */\n    virtual void startReceive() override;\n\n    /**\n     * Add SNR data to received messages\n     */\n    virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) override;\n\n    virtual void setStandby() override;\n\n    /**\n     *  We override to turn on transmitter power as needed.\n     */\n    virtual void configHardwareForSend() override;\n\n    uint32_t getPacketTime(uint32_t pl, bool received) override { return computePacketTime(*lora, pl, received); }\n\n  private:\n    /** Some boards require GPIO control of tx vs rx paths */\n    void setTransmitEnable(bool txon);\n};\n#endif\n"
  },
  {
    "path": "src/mesh/RadioInterface.cpp",
    "content": "#include \"RadioInterface.h\"\n#include \"Channels.h\"\n#include \"DisplayFormatters.h\"\n#include \"LLCC68Interface.h\"\n#include \"LR1110Interface.h\"\n#include \"LR1120Interface.h\"\n#include \"LR1121Interface.h\"\n#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RF95Interface.h\"\n#include \"Router.h\"\n#include \"SX1262Interface.h\"\n#include \"SX1268Interface.h\"\n#include \"SX1280Interface.h\"\n#include \"configuration.h\"\n#include \"detect/LoRaRadioType.h\"\n#include \"main.h\"\n#include \"meshUtils.h\" // for pow_of_2\n#include \"sleep.h\"\n#include <assert.h>\n#include <pb_decode.h>\n#include <pb_encode.h>\n#include <string.h>\n\n#ifdef ARCH_PORTDUINO\n#include \"platform/portduino/PortduinoGlue.h\"\n#include \"platform/portduino/SimRadio.h\"\n#include \"platform/portduino/USBHal.h\"\n#endif\n\n#ifdef ARCH_STM32WL\n#include \"STM32WLE5JCInterface.h\"\n#endif\n\nstatic const meshtastic_Config_LoRaConfig_ModemPreset PRESETS_STD[] = {\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST,     meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW,\n    meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW,   meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST,\n    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW,    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST,\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE, meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO,\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO,    MODEM_PRESET_END};\n\nstatic const meshtastic_Config_LoRaConfig_ModemPreset PRESETS_EU_868[] = {\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST,     meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW,\n    meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW,   meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST,\n    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW,    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST,\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE, MODEM_PRESET_END};\n\nstatic const meshtastic_Config_LoRaConfig_ModemPreset PRESETS_UNDEF[] = {meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST,\n                                                                         MODEM_PRESET_END};\n\n// Region profiles: bundle preset list + regulatory parameters shared across regions\n// presets, spacing, padding, audio, licensed, text throttle, position throttle, telemetry throttle, override slot\nconst RegionProfile PROFILE_STD = {PRESETS_STD, 0, 0, true, false, 0, 0, 0, 0};\nconst RegionProfile PROFILE_EU868 = {PRESETS_EU_868, 0, 0, false, false, 0, 0, 0, 0};\nconst RegionProfile PROFILE_UNDEF = {PRESETS_UNDEF, 0, 0, true, false, 0, 0, 0, 0};\n\n#define RDEF(name, freq_start, freq_end, duty_cycle, power_limit, frequency_switching, wide_lora, profile_ptr)                   \\\n    {                                                                                                                            \\\n        meshtastic_Config_LoRaConfig_RegionCode_##name, freq_start, freq_end, duty_cycle, power_limit, frequency_switching,      \\\n            wide_lora, &profile_ptr, #name                                                                                       \\\n    }\n\nconst RegionInfo regions[] = {\n    /*\n        https://link.springer.com/content/pdf/bbm%3A978-1-4842-4357-2%2F1.pdf\n        https://www.thethingsnetwork.org/docs/lorawan/regional-parameters/\n    */\n    RDEF(US, 902.0f, 928.0f, 100, 30, false, false, PROFILE_STD),\n\n    /*\n        EN300220 ETSI V3.2.1 [Table B.1, Item H, p. 21]\n\n        https://www.etsi.org/deliver/etsi_en/300200_300299/30022002/03.02.01_60/en_30022002v030201p.pdf\n        FIXME: https://github.com/meshtastic/firmware/issues/3371\n     */\n    RDEF(EU_433, 433.0f, 434.0f, 10, 10, false, false, PROFILE_STD),\n    /*\n       https://www.thethingsnetwork.org/docs/lorawan/duty-cycle/\n       https://www.thethingsnetwork.org/docs/lorawan/regional-parameters/\n       https://www.legislation.gov.uk/uksi/1999/930/schedule/6/part/III/made/data.xht?view=snippet&wrap=true\n\n       audio_permitted = false per regulation\n\n       Special Note:\n       The link above describes LoRaWAN's band plan, stating a power limit of 16 dBm. This is their own suggested specification,\n       we do not need to follow it. The European Union regulations clearly state that the power limit for this frequency range is\n       500 mW, or 27 dBm. It also states that we can use interference avoidance and spectrum access techniques (such as LBT +\n       AFA) to avoid a duty cycle. (Please refer to line P page 22 of this document.)\n       https://www.etsi.org/deliver/etsi_en/300200_300299/30022002/03.01.01_60/en_30022002v030101p.pdf\n     */\n    RDEF(EU_868, 869.4f, 869.65f, 10, 27, false, false, PROFILE_EU868),\n\n    /*\n        https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf\n     */\n    RDEF(CN, 470.0f, 510.0f, 100, 19, false, false, PROFILE_STD),\n\n    /*\n        https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf\n        https://www.arib.or.jp/english/html/overview/doc/5-STD-T108v1_5-E1.pdf\n        https://qiita.com/ammo0613/items/d952154f1195b64dc29f\n     */\n    RDEF(JP, 920.5f, 923.5f, 100, 13, false, false, PROFILE_STD),\n\n    /*\n        https://www.iot.org.au/wp/wp-content/uploads/2016/12/IoTSpectrumFactSheet.pdf\n        https://iotalliance.org.nz/wp-content/uploads/sites/4/2019/05/IoT-Spectrum-in-NZ-Briefing-Paper.pdf\n        Also used in Brazil.\n     */\n    RDEF(ANZ, 915.0f, 928.0f, 100, 30, false, false, PROFILE_STD),\n\n    /*\n        433.05 - 434.79 MHz, 25mW EIRP max, No duty cycle restrictions\n        AU Low Interference Potential https://www.acma.gov.au/licences/low-interference-potential-devices-lipd-class-licence\n        NZ General User Radio Licence for Short Range Devices https://gazette.govt.nz/notice/id/2022-go3100\n     */\n    RDEF(ANZ_433, 433.05f, 434.79f, 100, 14, false, false, PROFILE_STD),\n\n    /*\n        https://digital.gov.ru/uploaded/files/prilozhenie-12-k-reshenyu-gkrch-18-46-03-1.pdf\n\n        Note:\n            - We do LBT, so 100% is allowed.\n     */\n    RDEF(RU, 868.7f, 869.2f, 100, 20, false, false, PROFILE_STD),\n\n    /*\n        https://www.law.go.kr/LSW/admRulLsInfoP.do?admRulId=53943&efYd=0\n        https://resources.lora-alliance.org/technical-specifications/rp002-1-0-4-regional-parameters\n     */\n    RDEF(KR, 920.0f, 923.0f, 100, 23, false, false, PROFILE_STD),\n\n    /*\n        Taiwan, 920-925Mhz, limited to 0.5W indoor or coastal, 1.0W outdoor.\n        5.8.1 in the Low-power Radio-frequency Devices Technical Regulations\n        https://www.ncc.gov.tw/english/files/23070/102_5190_230703_1_doc_C.PDF\n        https://gazette.nat.gov.tw/egFront/e_detail.do?metaid=147283\n     */\n    RDEF(TW, 920.0f, 925.0f, 100, 27, false, false, PROFILE_STD),\n\n    /*\n        https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf\n     */\n    RDEF(IN, 865.0f, 867.0f, 100, 30, false, false, PROFILE_STD),\n\n    /*\n         https://rrf.rsm.govt.nz/smart-web/smart/page/-smart/domain/licence/LicenceSummary.wdk?id=219752\n         https://iotalliance.org.nz/wp-content/uploads/sites/4/2019/05/IoT-Spectrum-in-NZ-Briefing-Paper.pdf\n      */\n    RDEF(NZ_865, 864.0f, 868.0f, 100, 36, false, false, PROFILE_STD),\n\n    /*\n       https://lora-alliance.org/wp-content/uploads/2020/11/lorawan_regional_parameters_v1.0.3reva_0.pdf\n    */\n    RDEF(TH, 920.0f, 925.0f, 100, 16, false, false, PROFILE_STD),\n\n    /*\n        433,05-434,7 Mhz 10 mW\n        868,0-868,6 Mhz 25 mW\n        https://nkrzi.gov.ua/images/upload/256/5810/PDF_UUZ_19_01_2016.pdf\n    */\n    RDEF(UA_433, 433.0f, 434.7f, 10, 10, false, false, PROFILE_STD),\n    RDEF(UA_868, 868.0f, 868.6f, 1, 14, false, false, PROFILE_STD),\n\n    /*\n        Malaysia\n        433 - 435 MHz at 100mW, no restrictions.\n        https://www.mcmc.gov.my/skmmgovmy/media/General/pdf/Short-Range-Devices-Specification.pdf\n    */\n    RDEF(MY_433, 433.0f, 435.0f, 100, 20, false, false, PROFILE_STD),\n\n    /*\n        Malaysia\n        919 - 923 Mhz at 500mW, no restrictions.\n        923 - 924 MHz at 500mW with 1% duty cycle OR frequency hopping.\n        Frequency hopping is used for 919 - 923 MHz.\n        https://www.mcmc.gov.my/skmmgovmy/media/General/pdf/Short-Range-Devices-Specification.pdf\n    */\n    RDEF(MY_919, 919.0f, 924.0f, 100, 27, true, false, PROFILE_STD),\n\n    /*\n        Singapore\n        SG_923 Band 30d: 917 - 925 MHz at 100mW, no restrictions.\n        https://www.imda.gov.sg/-/media/imda/files/regulation-licensing-and-consultations/ict-standards/telecommunication-standards/radio-comms/imdatssrd.pdf\n    */\n    RDEF(SG_923, 917.0f, 925.0f, 100, 20, false, false, PROFILE_STD),\n\n    /*\n        Philippines\n                433 - 434.7 MHz <10 mW erp, NTC approved device required\n                868 - 869.4 MHz <25 mW erp, NTC approved device required\n                915 - 918 MHz <250 mW EIRP, no external antenna allowed\n                https://github.com/meshtastic/firmware/issues/4948#issuecomment-2394926135\n    */\n\n    RDEF(PH_433, 433.0f, 434.7f, 100, 10, false, false, PROFILE_STD),\n    RDEF(PH_868, 868.0f, 869.4f, 100, 14, false, false, PROFILE_STD),\n    RDEF(PH_915, 915.0f, 918.0f, 100, 24, false, false, PROFILE_STD),\n\n    /*\n        Kazakhstan\n                433.075 - 434.775 MHz <10 mW EIRP, Low Powered Devices (LPD)\n                863 - 868 MHz <25 mW EIRP, 500kHz channels allowed, must not be used at airfields\n                                https://github.com/meshtastic/firmware/issues/7204\n    */\n    RDEF(KZ_433, 433.075f, 434.775f, 100, 10, false, false, PROFILE_STD),\n    RDEF(KZ_863, 863.0f, 868.0f, 100, 30, false, false, PROFILE_STD),\n\n    /*\n        Nepal\n        865 MHz to 868 MHz frequency band for IoT (Internet of Things), M2M (Machine-to-Machine), and smart metering use,\n       specifically in non-cellular mode. https://www.nta.gov.np/uploads/contents/Radio-Frequency-Policy-2080-English.pdf\n    */\n    RDEF(NP_865, 865.0f, 868.0f, 100, 30, false, false, PROFILE_STD),\n\n    /*\n        Brazil\n        902 - 907.5 MHz , 1W power limit, no duty cycle restrictions\n        https://github.com/meshtastic/firmware/issues/3741\n    */\n    RDEF(BR_902, 902.0f, 907.5f, 100, 30, false, false, PROFILE_STD),\n\n    /*\n       2.4 GHZ WLAN Band equivalent. Only for SX128x chips.\n    */\n    RDEF(LORA_24, 2400.0f, 2483.5f, 100, 10, false, true, PROFILE_STD),\n\n    /*\n        This needs to be last. Same as US.\n    */\n    RDEF(UNSET, 902.0f, 928.0f, 100, 30, false, false, PROFILE_UNDEF)\n\n};\n\nconst RegionInfo *myRegion;\nbool RadioInterface::uses_default_frequency_slot = true;\nbool RadioInterface::uses_custom_channel_name = false;\n\nstatic uint8_t bytes[MAX_LORA_PAYLOAD_LEN + 1];\n\n// Global LoRa radio type\nLoRaRadioType radioType = NO_RADIO;\n\nextern RadioLibHal *RadioLibHAL;\n#if defined(HW_SPI1_DEVICE) && defined(ARCH_ESP32)\nextern SPIClass SPI1;\n#endif\n\nstd::unique_ptr<RadioInterface> initLoRa()\n{\n    std::unique_ptr<RadioInterface> rIf = nullptr;\n\n#if ARCH_PORTDUINO\n    SPISettings loraSpiSettings(portduino_config.spiSpeed, MSBFIRST, SPI_MODE0);\n#else\n    SPISettings loraSpiSettings(4000000, MSBFIRST, SPI_MODE0);\n#endif\n\n#ifdef ARCH_PORTDUINO\n    // as one can't use a function pointer to the class constructor:\n    auto loraModuleInterface = [](LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                  RADIOLIB_PIN_TYPE busy) {\n        switch (portduino_config.lora_module) {\n        case use_rf95:\n            return std::unique_ptr<RadioInterface>(new RF95Interface(hal, cs, irq, rst, busy));\n        case use_sx1262:\n            return std::unique_ptr<RadioInterface>(new SX1262Interface(hal, cs, irq, rst, busy));\n        case use_sx1268:\n            return std::unique_ptr<RadioInterface>(new SX1268Interface(hal, cs, irq, rst, busy));\n        case use_sx1280:\n            return std::unique_ptr<RadioInterface>(new SX1280Interface(hal, cs, irq, rst, busy));\n        case use_lr1110:\n            return std::unique_ptr<RadioInterface>(new LR1110Interface(hal, cs, irq, rst, busy));\n        case use_lr1120:\n            return std::unique_ptr<RadioInterface>(new LR1120Interface(hal, cs, irq, rst, busy));\n        case use_lr1121:\n            return std::unique_ptr<RadioInterface>(new LR1121Interface(hal, cs, irq, rst, busy));\n        case use_llcc68:\n            return std::unique_ptr<RadioInterface>(new LLCC68Interface(hal, cs, irq, rst, busy));\n        case use_simradio:\n            return std::unique_ptr<RadioInterface>(new SimRadio);\n        default:\n            assert(0); // shouldn't happen\n            return std::unique_ptr<RadioInterface>(nullptr);\n        }\n    };\n\n    LOG_DEBUG(\"Activate %s radio on SPI port %s\", portduino_config.loraModules[portduino_config.lora_module].c_str(),\n              portduino_config.lora_spi_dev.c_str());\n    if (portduino_config.lora_spi_dev == \"ch341\") {\n        RadioLibHAL = ch341Hal;\n    } else {\n        if (RadioLibHAL != nullptr) {\n            delete RadioLibHAL;\n            RadioLibHAL = nullptr;\n        }\n        RadioLibHAL = new LockingArduinoHal(SPI, loraSpiSettings);\n    }\n    rIf =\n        loraModuleInterface((LockingArduinoHal *)RadioLibHAL, portduino_config.lora_cs_pin.pin, portduino_config.lora_irq_pin.pin,\n                            portduino_config.lora_reset_pin.pin, portduino_config.lora_busy_pin.pin);\n\n    if (!rIf->init()) {\n        LOG_WARN(\"No %s radio\", portduino_config.loraModules[portduino_config.lora_module].c_str());\n        rIf = nullptr;\n        exit(EXIT_FAILURE);\n    } else {\n        LOG_INFO(\"%s init success\", portduino_config.loraModules[portduino_config.lora_module].c_str());\n    }\n\n#elif defined(HW_SPI1_DEVICE)\n    LockingArduinoHal *loraHal = new LockingArduinoHal(SPI1, loraSpiSettings);\n    RadioLibHAL = loraHal;\n#else // HW_SPI1_DEVICE\n    LockingArduinoHal *loraHal = new LockingArduinoHal(SPI, loraSpiSettings);\n    RadioLibHAL = loraHal;\n#endif\n\n// radio init MUST BE AFTER service.init, so we have our radio config settings (from nodedb init)\n#if defined(USE_STM32WLx)\n    if (!rIf) {\n        rIf = std::unique_ptr<STM32WLE5JCInterface>(\n            new STM32WLE5JCInterface(loraHal, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY));\n        if (!rIf->init()) {\n            LOG_WARN(\"No STM32WL radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"STM32WL init success\");\n            radioType = STM32WLx_RADIO;\n        }\n    }\n#endif\n\n#if defined(RF95_IRQ) && RADIOLIB_EXCLUDE_SX127X != 1\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        rIf = std::unique_ptr<RF95Interface>(new RF95Interface(loraHal, LORA_CS, RF95_IRQ, RF95_RESET, RF95_DIO1));\n        if (!rIf->init()) {\n            LOG_WARN(\"No RF95 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"RF95 init success\");\n            radioType = RF95_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_SX1262) && !defined(ARCH_PORTDUINO) && !defined(TCXO_OPTIONAL) && RADIOLIB_EXCLUDE_SX126X != 1\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        auto sxIf =\n            std::unique_ptr<SX1262Interface>(new SX1262Interface(loraHal, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY));\n#ifdef SX126X_DIO3_TCXO_VOLTAGE\n        sxIf->setTCXOVoltage(SX126X_DIO3_TCXO_VOLTAGE);\n#endif\n        if (!sxIf->init()) {\n            LOG_WARN(\"No SX1262 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"SX1262 init success\");\n            rIf = std::move(sxIf);\n            radioType = SX1262_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_SX1262) && !defined(ARCH_PORTDUINO) && defined(TCXO_OPTIONAL)\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        // try using the specified TCXO voltage\n        auto sxIf =\n            std::unique_ptr<SX1262Interface>(new SX1262Interface(loraHal, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY));\n        sxIf->setTCXOVoltage(SX126X_DIO3_TCXO_VOLTAGE);\n        if (!sxIf->init()) {\n            LOG_WARN(\"No SX1262 radio with TCXO, Vref %fV\", SX126X_DIO3_TCXO_VOLTAGE);\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"SX1262 init success, TCXO, Vref %fV\", SX126X_DIO3_TCXO_VOLTAGE);\n            rIf = std::move(sxIf);\n            radioType = SX1262_RADIO;\n        }\n    }\n\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        // If specified TCXO voltage fails, attempt to use DIO3 as a reference instead\n        rIf = std::unique_ptr<SX1262Interface>(new SX1262Interface(loraHal, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY));\n        if (!rIf->init()) {\n            LOG_WARN(\"No SX1262 radio with XTAL, Vref 0.0V\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"SX1262 init success, XTAL, Vref 0.0V\");\n            radioType = SX1262_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_SX1268)\n#if defined(SX126X_DIO3_TCXO_VOLTAGE) && defined(TCXO_OPTIONAL)\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        // try using the specified TCXO voltage\n        auto sxIf =\n            std::unique_ptr<SX1268Interface>(new SX1268Interface(loraHal, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY));\n        sxIf->setTCXOVoltage(SX126X_DIO3_TCXO_VOLTAGE);\n        if (!sxIf->init()) {\n            LOG_WARN(\"No SX1268 radio with TCXO, Vref %fV\", SX126X_DIO3_TCXO_VOLTAGE);\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"SX1268 init success, TCXO, Vref %fV\", SX126X_DIO3_TCXO_VOLTAGE);\n            rIf = std::move(sxIf);\n            radioType = SX1268_RADIO;\n        }\n    }\n#endif\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        rIf = std::unique_ptr<SX1268Interface>(new SX1268Interface(loraHal, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY));\n        if (!rIf->init()) {\n            LOG_WARN(\"No SX1268 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"SX1268 init success\");\n            radioType = SX1268_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_LLCC68)\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        rIf = std::unique_ptr<LLCC68Interface>(new LLCC68Interface(loraHal, SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY));\n        if (!rIf->init()) {\n            LOG_WARN(\"No LLCC68 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"LLCC68 init success\");\n            radioType = LLCC68_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_LR1110) && RADIOLIB_EXCLUDE_LR11X0 != 1\n    if ((!rIf) && (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24)) {\n        rIf = std::unique_ptr<LR1110Interface>(\n            new LR1110Interface(loraHal, LR1110_SPI_NSS_PIN, LR1110_IRQ_PIN, LR1110_NRESET_PIN, LR1110_BUSY_PIN));\n        if (!rIf->init()) {\n            LOG_WARN(\"No LR1110 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"LR1110 init success\");\n            radioType = LR1110_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_LR1120) && RADIOLIB_EXCLUDE_LR11X0 != 1\n    if (!rIf) {\n        rIf = std::unique_ptr<LR1120Interface>(\n            new LR1120Interface(loraHal, LR1120_SPI_NSS_PIN, LR1120_IRQ_PIN, LR1120_NRESET_PIN, LR1120_BUSY_PIN));\n        if (!rIf->init()) {\n            LOG_WARN(\"No LR1120 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"LR1120 init success\");\n            radioType = LR1120_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_LR1121) && RADIOLIB_EXCLUDE_LR11X0 != 1\n    if (!rIf) {\n        rIf = std::unique_ptr<LR1121Interface>(\n            new LR1121Interface(loraHal, LR1121_SPI_NSS_PIN, LR1121_IRQ_PIN, LR1121_NRESET_PIN, LR1121_BUSY_PIN));\n        if (!rIf->init()) {\n            LOG_WARN(\"No LR1121 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"LR1121 init success\");\n            radioType = LR1121_RADIO;\n        }\n    }\n#endif\n\n#if defined(USE_SX1280) && RADIOLIB_EXCLUDE_SX128X != 1\n    if (!rIf) {\n        rIf = std::unique_ptr<SX1280Interface>(new SX1280Interface(loraHal, SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY));\n        if (!rIf->init()) {\n            LOG_WARN(\"No SX1280 radio\");\n            rIf = nullptr;\n        } else {\n            LOG_INFO(\"SX1280 init success\");\n            radioType = SX1280_RADIO;\n        }\n    }\n#endif\n\n    // check if the radio chip matches the selected region\n    if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && rIf && (!rIf->wideLora())) {\n        LOG_WARN(\"LoRa chip does not support 2.4GHz. Revert to unset\");\n        config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n\n        if (rIf && !rIf->reconfigure()) {\n            LOG_WARN(\"Reconfigure failed, rebooting\");\n            if (screen) {\n                screen->showSimpleBanner(\"Rebooting...\");\n            }\n            rebootAtMsec = millis() + 5000;\n        }\n    }\n    return rIf;\n}\n\nvoid initRegion()\n{\n    const RegionInfo *r = regions;\n#ifdef REGULATORY_LORA_REGIONCODE\n    for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != REGULATORY_LORA_REGIONCODE; r++)\n        ;\n    LOG_INFO(\"Wanted region %d, regulatory override to %s\", config.lora.region, r->name);\n#else\n    for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != config.lora.region; r++)\n        ;\n    LOG_INFO(\"Wanted region %d, using %s\", config.lora.region, r->name);\n#endif\n    myRegion = r;\n}\n\nconst RegionInfo *getRegion(meshtastic_Config_LoRaConfig_RegionCode code)\n{\n    const RegionInfo *r = regions;\n    for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != code; r++)\n        ;\n    return r;\n}\n\nuint32_t RadioInterface::getPacketTime(const meshtastic_MeshPacket *p, bool received)\n{\n    uint32_t pl = 0;\n    if (p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag) {\n        pl = p->encrypted.size + sizeof(PacketHeader);\n    } else {\n        size_t numbytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_Data_msg, &p->decoded);\n        pl = numbytes + sizeof(PacketHeader);\n    }\n    return getPacketTime(pl, received);\n}\n\n/** The delay to use for retransmitting dropped packets */\nuint32_t RadioInterface::getRetransmissionMsec(const meshtastic_MeshPacket *p)\n{\n    size_t numbytes = p->which_payload_variant == meshtastic_MeshPacket_decoded_tag\n                          ? pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_Data_msg, &p->decoded)\n                          : p->encrypted.size + MESHTASTIC_HEADER_LENGTH;\n    uint32_t packetAirtime = getPacketTime(numbytes + sizeof(PacketHeader));\n    // Make sure enough time has elapsed for this packet to be sent and an ACK is received.\n    // LOG_DEBUG(\"Waiting for flooding message with airtime %d and slotTime is %d\", packetAirtime, slotTimeMsec);\n    float channelUtil = airTime->channelUtilizationPercent();\n    uint8_t CWsize = map(channelUtil, 0, 100, CWmin, CWmax);\n    // Assuming we pick max. of CWsize and there will be a client with SNR at half the range\n    return 2 * packetAirtime + (pow_of_2(CWsize) + 2 * CWmax + pow_of_2(int((CWmax + CWmin) / 2))) * slotTimeMsec +\n           PROCESSING_TIME_MSEC;\n}\n\n/** The delay to use when we want to send something */\nuint32_t RadioInterface::getTxDelayMsec()\n{\n    /** We wait a random multiple of 'slotTimes' (see definition in header file) in order to avoid collisions.\n    The pool to take a random multiple from is the contention window (CW), which size depends on the\n    current channel utilization. */\n    float channelUtil = airTime->channelUtilizationPercent();\n    uint8_t CWsize = map(channelUtil, 0, 100, CWmin, CWmax);\n    // LOG_DEBUG(\"Current channel utilization is %f so setting CWsize to %d\", channelUtil, CWsize);\n    return random(0, pow_of_2(CWsize)) * slotTimeMsec;\n}\n\n/** The CW size to use when calculating SNR_based delays */\nuint8_t RadioInterface::getCWsize(float snr)\n{\n    // The minimum value for a LoRa SNR\n    const int32_t SNR_MIN = -20;\n\n    // The maximum value for a LoRa SNR\n    const int32_t SNR_MAX = 10;\n\n    return map(snr, SNR_MIN, SNR_MAX, CWmin, CWmax);\n}\n\n/** The worst-case SNR_based packet delay */\nuint32_t RadioInterface::getTxDelayMsecWeightedWorst(float snr)\n{\n    uint8_t CWsize = getCWsize(snr);\n    // offset the maximum delay for routers: (2 * CWmax * slotTimeMsec)\n    return (2 * CWmax * slotTimeMsec) + pow_of_2(CWsize) * slotTimeMsec;\n}\n\n/** Returns true if we should rebroadcast early like a ROUTER */\nbool RadioInterface::shouldRebroadcastEarlyLikeRouter(meshtastic_MeshPacket *p)\n{\n    // If we are a ROUTER, we always rebroadcast early\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER) {\n        return true;\n    }\n\n    return false;\n}\n\n/** The delay to use when we want to flood a message */\nuint32_t RadioInterface::getTxDelayMsecWeighted(meshtastic_MeshPacket *p)\n{\n    //  high SNR = large CW size (Long Delay)\n    //  low SNR = small CW size (Short Delay)\n    float snr = p->rx_snr;\n    uint32_t delay = 0;\n    uint8_t CWsize = getCWsize(snr);\n    // LOG_DEBUG(\"rx_snr of %f so setting CWsize to:%d\", snr, CWsize);\n    if (shouldRebroadcastEarlyLikeRouter(p)) {\n        delay = random(0, 2 * CWsize) * slotTimeMsec;\n        LOG_DEBUG(\"rx_snr found in packet. Router: setting tx delay:%d\", delay);\n    } else {\n        // offset the maximum delay for routers: (2 * CWmax * slotTimeMsec)\n        delay = (2 * CWmax * slotTimeMsec) + random(0, pow_of_2(CWsize)) * slotTimeMsec;\n        LOG_DEBUG(\"rx_snr found in packet. Setting tx delay:%d\", delay);\n    }\n\n    return delay;\n}\n\nvoid printPacket(const char *prefix, const meshtastic_MeshPacket *p)\n{\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n    std::string out =\n        DEBUG_PORT.mt_sprintf(\"%s (id=0x%08x fr=0x%08x to=0x%08x, transport = %u, WantAck=%d, HopLim=%d Ch=0x%x\", prefix, p->id,\n                              p->from, p->to, p->transport_mechanism, p->want_ack, p->hop_limit, p->channel);\n    if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        auto &s = p->decoded;\n\n        out += DEBUG_PORT.mt_sprintf(\" Portnum=%d\", s.portnum);\n\n        if (s.want_response)\n            out += DEBUG_PORT.mt_sprintf(\" WANTRESP\");\n\n        if (p->pki_encrypted)\n            out += DEBUG_PORT.mt_sprintf(\" PKI\");\n\n        if (s.source != 0)\n            out += DEBUG_PORT.mt_sprintf(\" source=%08x\", s.source);\n\n        if (s.dest != 0)\n            out += DEBUG_PORT.mt_sprintf(\" dest=%08x\", s.dest);\n\n        if (s.request_id)\n            out += DEBUG_PORT.mt_sprintf(\" requestId=%0x\", s.request_id);\n\n        /* now inside Data and therefore kinda opaque\n        if (s.which_ackVariant == SubPacket_success_id_tag)\n            out += DEBUG_PORT.mt_sprintf(\" successId=%08x\", s.ackVariant.success_id);\n        else if (s.which_ackVariant == SubPacket_fail_id_tag)\n            out += DEBUG_PORT.mt_sprintf(\" failId=%08x\", s.ackVariant.fail_id); */\n    } else {\n        out += \" encrypted\";\n        out += DEBUG_PORT.mt_sprintf(\" len=%d\", p->encrypted.size + sizeof(PacketHeader));\n    }\n\n    if (p->rx_time != 0)\n        out += DEBUG_PORT.mt_sprintf(\" rxtime=%u\", p->rx_time);\n    if (p->rx_snr != 0.0)\n        out += DEBUG_PORT.mt_sprintf(\" rxSNR=%g\", p->rx_snr);\n    if (p->rx_rssi != 0)\n        out += DEBUG_PORT.mt_sprintf(\" rxRSSI=%i\", p->rx_rssi);\n    if (p->via_mqtt != 0)\n        out += DEBUG_PORT.mt_sprintf(\" via MQTT\");\n    if (p->hop_start != 0)\n        out += DEBUG_PORT.mt_sprintf(\" hopStart=%d\", p->hop_start);\n    if (p->next_hop != 0)\n        out += DEBUG_PORT.mt_sprintf(\" nextHop=0x%x\", p->next_hop);\n    if (p->relay_node != 0)\n        out += DEBUG_PORT.mt_sprintf(\" relay=0x%x\", p->relay_node);\n    if (p->priority != 0)\n        out += DEBUG_PORT.mt_sprintf(\" priority=%d\", p->priority);\n\n    out += \")\";\n    LOG_DEBUG(\"%s\", out.c_str());\n#endif\n}\n\nRadioInterface::RadioInterface()\n{\n    assert(sizeof(PacketHeader) == MESHTASTIC_HEADER_LENGTH); // make sure the compiler did what we expected\n}\n\nbool RadioInterface::reconfigure()\n{\n    applyModemConfig();\n    return true;\n}\n\nbool RadioInterface::init()\n{\n    LOG_INFO(\"Start meshradio init\");\n\n    configChangedObserver.observe(&service->configChanged);\n    preflightSleepObserver.observe(&preflightSleep);\n    notifyDeepSleepObserver.observe(&notifyDeepSleep);\n\n    // we now expect interfaces to operate in promiscuous mode\n    // radioIf.setThisAddress(nodeDB->getNodeNum()); // Note: we must do this here, because the nodenum isn't inited at\n    // constructor time.\n\n    applyModemConfig();\n\n    return true;\n}\n\nint RadioInterface::notifyDeepSleepCb(void *unused)\n{\n    sleep();\n    return 0;\n}\n\n/** hash a string into an integer\n *\n * djb2 by Dan Bernstein.\n * http://www.cse.yorku.ca/~oz/hash.html\n */\nuint32_t hash(const char *str)\n{\n    uint32_t hash = 5381;\n    int c;\n\n    while ((c = *str++) != 0)\n        hash = ((hash << 5) + hash) + (unsigned char)c; /* hash * 33 + c */\n\n    return hash;\n}\n\n/**\n * Save our frequency for later reuse.\n */\nvoid RadioInterface::saveFreq(float freq)\n{\n    savedFreq = freq;\n}\n\n/**\n * Save our frequency slot (aka channel) for later reuse.\n */\nvoid RadioInterface::saveChannelNum(uint32_t channel_num)\n{\n    savedChannelNum = channel_num;\n}\n\n/**\n * Save our frequency for later reuse.\n */\nfloat RadioInterface::getFreq()\n{\n    return savedFreq;\n}\n\n/**\n * Save our channel for later reuse.\n */\nuint32_t RadioInterface::getChannelNum()\n{\n    return savedChannelNum;\n}\n\n/**\n * Send an error-level client notification. Safe to call when service is null (e.g. in tests).\n */\nstatic void sendErrorNotification(const char *msg)\n{\n    if (!service)\n        return;\n    meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n    if (!cn)\n        return;\n    cn->level = meshtastic_LogRecord_Level_ERROR;\n    snprintf(cn->message, sizeof(cn->message), \"%s\", msg);\n    service->sendClientNotification(cn);\n}\n\n/**\n * Checks if a region is valid for the current settings.\n * Returns false if not compatible.\n */\nbool RadioInterface::validateConfigRegion(const meshtastic_Config_LoRaConfig &loraConfig)\n{\n    const RegionInfo *newRegion = getRegion(loraConfig.region);\n\n    // If you are not licensed, you can't use ham regions.\n    if (newRegion->profile->licensedOnly && !devicestate.owner.is_licensed) {\n        char err_string[160];\n        snprintf(err_string, sizeof(err_string), \"Region %s requires licensed mode\", newRegion->name);\n        LOG_ERROR(\"%s\", err_string);\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n        sendErrorNotification(err_string);\n        return false;\n    }\n\n    return true;\n}\n\n/**\n * Internal helper: validate or clamp a LoRa config against its region.\n * When clamp==false, returns false on first error (pure validation).\n * When clamp==true, fixes invalid settings in-place and returns true.\n */\nbool RadioInterface::checkOrClampConfigLora(meshtastic_Config_LoRaConfig &loraConfig, bool clamp)\n{\n    char err_string[160];\n    float check_bw;\n\n    const RegionInfo *newRegion = getRegion(loraConfig.region);\n\n    const char *presetName = DisplayFormatters::getModemPresetDisplayName(loraConfig.modem_preset, false, loraConfig.use_preset);\n\n    // Check preset validity (only when use_preset is true)\n    if (loraConfig.use_preset) {\n        check_bw = modemPresetToBwKHz(loraConfig.modem_preset, newRegion->wideLora);\n\n        bool preset_valid = false;\n        for (size_t i = 0; i < newRegion->getNumPresets(); i++) {\n            if (loraConfig.modem_preset == newRegion->getAvailablePresets()[i]) {\n                preset_valid = true;\n                break;\n            }\n        }\n        if (!preset_valid) {\n            const char *defaultName = DisplayFormatters::getModemPresetDisplayName(newRegion->getDefaultPreset(), false, true);\n            if (clamp) {\n                snprintf(err_string, sizeof(err_string), \"Preset %s invalid for %s, using %s\", presetName, newRegion->name,\n                         defaultName);\n            } else {\n                snprintf(err_string, sizeof(err_string), \"Preset %s invalid for %s\", presetName, newRegion->name);\n            }\n            LOG_ERROR(\"%s\", err_string);\n            RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n            sendErrorNotification(err_string);\n\n            if (clamp) {\n                loraConfig.modem_preset = newRegion->getDefaultPreset();\n                check_bw = modemPresetToBwKHz(loraConfig.modem_preset, newRegion->wideLora);\n            } else {\n                return false;\n            }\n        }\n    } else {\n        check_bw = bwCodeToKHz(loraConfig.bandwidth);\n    }\n\n    // Calculate width of slots (aka channels) based on bandwidth and any spacing or padding required by the region:\n    // spacing = gap between slots (0 for continuous spectrum) and at the beginning of the band\n    // padding = gap at the beginning and end of the slots (0 for no padding)\n    float freqSlotWidth = newRegion->profile->spacing + (newRegion->profile->padding * 2) + (check_bw / 1000); // in MHz\n    uint32_t numFreqSlots = round((newRegion->freqEnd - newRegion->freqStart + newRegion->profile->spacing) / freqSlotWidth);\n\n    // Check if the region supports the requested bandwidth\n    if ((newRegion->freqEnd - newRegion->freqStart) < freqSlotWidth) {\n        const float regionSpanKHz = (newRegion->freqEnd - newRegion->freqStart) * 1000.0f;\n        snprintf(err_string, sizeof(err_string), \"%s span %.0fkHz < requested %.0fkHz\", newRegion->name, regionSpanKHz, check_bw);\n        LOG_ERROR(\"%s\", err_string);\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n        sendErrorNotification(err_string);\n\n        if (clamp) {\n            loraConfig.bandwidth = bwKHzToCode(modemPresetToBwKHz(newRegion->getDefaultPreset(), newRegion->wideLora));\n            check_bw = bwCodeToKHz(loraConfig.bandwidth);\n\n            // Recompute slot width and number of slots based on the new bandwidth\n            freqSlotWidth = newRegion->profile->spacing + (newRegion->profile->padding * 2) + (check_bw / 1000); // in MHz\n            numFreqSlots = round((newRegion->freqEnd - newRegion->freqStart + newRegion->profile->spacing) / freqSlotWidth);\n        } else {\n            return false;\n        }\n    }\n\n    const char *channelName = channels.getName(channels.getPrimaryIndex());\n    const char *presetNameDisplay =\n        DisplayFormatters::getModemPresetDisplayName(loraConfig.modem_preset, false, loraConfig.use_preset);\n    uint32_t channelNameHashSlot = hash(channelName) % numFreqSlots;\n    uint32_t presetNameHashSlot = hash(presetNameDisplay) % numFreqSlots;\n\n    if (loraConfig.override_frequency == 0) {\n\n        // Check if we use the default frequency slot\n        uses_default_frequency_slot =\n            (loraConfig.channel_num == 0) || // user choice unset, no frequency override, so use default\n            (newRegion->profile->overrideSlot != 0 &&\n             loraConfig.channel_num == newRegion->profile->overrideSlot) || // user setting matches override\n            ((newRegion->profile->overrideSlot == 0) &&\n             ((uint32_t)(loraConfig.channel_num - 1) == presetNameHashSlot)); // user setting matches preset hash, no override\n\n        // check if user setting different to preset name\n        uses_custom_channel_name = (strcmp(channelName, presetNameDisplay) != 0);\n\n        if (loraConfig.channel_num > numFreqSlots) {\n            snprintf(err_string, sizeof(err_string), \"Channel number %u invalid for %s, max is %u\", loraConfig.channel_num,\n                     newRegion->name, numFreqSlots);\n            LOG_ERROR(\"%s\", err_string);\n            RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n            sendErrorNotification(err_string);\n\n            if (clamp) {\n                if (uses_custom_channel_name) { // clamp to channel name hash\n                    loraConfig.channel_num =\n                        channelNameHashSlot + 1; // channel_num is 1-based, but hash slot is 0-based, so add 1\n                } else if ((loraConfig.use_preset) && (newRegion->profile->overrideSlot != 0)) { // clamp to preset override slot\n                    loraConfig.channel_num =\n                        newRegion->profile->overrideSlot; // use the override slot specified by the region profile\n                    uses_default_frequency_slot = true;\n                } else if (loraConfig.use_preset) {                  // clamp to preset slot\n                    loraConfig.channel_num = presetNameHashSlot + 1; // channel_num is 1-based, but hash slot is 0-based, so add 1\n                    uses_default_frequency_slot = true;\n                } else { // if not using preset, and no custom channel name, just clamp to default anyway\n                    uses_default_frequency_slot = true;\n                };\n            } else {\n                return false;\n            }\n        } // end of channel number check\n    } else {\n        // if we have a frequency override, we ignore the channel number and just use the override frequency\n        snprintf(err_string, sizeof(err_string), \"Frequency override in place, using %.3f\", loraConfig.override_frequency);\n    }\n    return true;\n}\n\nbool RadioInterface::validateConfigLora(const meshtastic_Config_LoRaConfig &loraConfig)\n{\n    auto copy = loraConfig;\n    return checkOrClampConfigLora(copy, false);\n}\n\nvoid RadioInterface::clampConfigLora(meshtastic_Config_LoRaConfig &loraConfig)\n{\n    checkOrClampConfigLora(loraConfig, true);\n}\n\n/**\n * Pull our channel settings etc... from protobufs to the dumb interface settings\n * Note: this must be given only settings which have been validated or clamped!\n */\nvoid RadioInterface::applyModemConfig()\n{\n    // Set up default configuration\n    // No Sync Words in LORA mode\n    meshtastic_Config_LoRaConfig &loraConfig = config.lora;\n    const RegionInfo *newRegion = getRegion(loraConfig.region);\n    myRegion = newRegion;\n\n    if (loraConfig.use_preset) {\n        if (!validateConfigLora(loraConfig)) {\n            loraConfig.modem_preset = newRegion->getDefaultPreset();\n        }\n        uint8_t newcr;\n        modemPresetToParams(loraConfig.modem_preset, newRegion->wideLora, bw, sf, newcr);\n        // If custom CR is being used already, check if the new preset is higher\n        if (loraConfig.coding_rate >= 5 && loraConfig.coding_rate <= 8 && loraConfig.coding_rate < newcr) {\n            cr = newcr;\n            LOG_INFO(\"Default Coding Rate is higher than custom setting, using %u\", cr);\n        }\n        // If the custom CR is higher than the preset, use it\n        else if (loraConfig.coding_rate >= 5 && loraConfig.coding_rate <= 8 && loraConfig.coding_rate > newcr) {\n            cr = loraConfig.coding_rate;\n            LOG_INFO(\"Using custom Coding Rate %u\", cr);\n        } else {\n            cr = loraConfig.coding_rate;\n        }\n\n    } else { // if not using preset, then just use the custom settings\n        if (validateConfigLora(loraConfig)) {\n        } else {\n            LOG_WARN(\"Invalid LoRa config settings, cannot apply requested modem config - falling back to %s defaults\",\n                     newRegion->name);\n            clampConfigLora(loraConfig);\n        }\n        bw = bwCodeToKHz(loraConfig.bandwidth);\n        sf = loraConfig.spread_factor;\n        cr = loraConfig.coding_rate;\n    }\n\n    power = loraConfig.tx_power;\n\n    if ((power == 0) || ((power > newRegion->powerLimit) && !devicestate.owner.is_licensed))\n        power = newRegion->powerLimit;\n\n    if (power == 0)\n        power = 17; // Default to this power level if we don't have a valid regional power limit (powerLimit of newRegion defaults\n                    // to 0, currently no region has an actual power limit of 0 [dBm] so we can assume regions which have this\n                    // variable set to 0 don't have a valid power limit)\n\n    // Set final tx_power back onto config\n    loraConfig.tx_power = (int8_t)power; // cppcheck-suppress assignmentAddressToInteger\n\n    uint32_t channel_num;\n    float freq;\n\n    // Calculate number of frequency slots (aka Channels):\n    // spacing = gap between channels (0 for continuous spectrum) and at the beginning of the band\n    // padding = gap at the beginning and end of the channel (0 for no padding)\n    float freqSlotWidth = newRegion->profile->spacing + (newRegion->profile->padding * 2) + (bw / 1000); // in MHz\n    uint32_t numFreqSlots = round((newRegion->freqEnd - newRegion->freqStart + newRegion->profile->spacing) / freqSlotWidth);\n\n    // Calculate hash of channel name and preset name to pick a default frequency slot if user has not specified one.\n    // Note that channel_num is actually (channel_num - 1), i.e. zero-based, since modulus (%) returns values from 0 to\n    // (numFreqSlots - 1).\n    uint32_t presetNameHashSlot =\n        hash(DisplayFormatters::getModemPresetDisplayName(loraConfig.modem_preset, false, loraConfig.use_preset)) % numFreqSlots;\n\n    // override if we have a verbatim frequency\n    if (loraConfig.override_frequency) {\n        freq = loraConfig.override_frequency;\n        channel_num = -1;\n        uses_default_frequency_slot = false;\n    } else {\n\n        // If user has not manually specified a frequency slot, or has not specified one that is different than the default or the\n        // override for the new region, then use the default or override. If the user has not specified one, but has specified a\n        // custom channel name, then use the hash of that channel name to pick a frequency slot. Note that channel_num is actually\n        // (channel_num - 1), i.e. zero-based, since modulus (%) returns values from 0 to (numFreqSlots - 1).\n        // NB: channel_num is also know as frequency slot but it's too late to fix now.\n        if (uses_default_frequency_slot) {\n            // if there's an override slot, use that\n            if (newRegion->profile->overrideSlot != 0) {\n                channel_num = newRegion->profile->overrideSlot - 1;\n            } else {\n                channel_num = presetNameHashSlot;\n            }\n        } else { // use the manually defined one\n            channel_num = loraConfig.channel_num - 1;\n        }\n\n        // Calculate frequency: freqStart is band edge, add half bandwidth (plus optional padding) to get middle of first channel\n        // subsequent channels are spaced by freqSlotWidth\n        freq = newRegion->freqStart + (bw / 2000) + newRegion->profile->padding + (channel_num * freqSlotWidth); // in MHz\n    }\n\n    saveChannelNum(channel_num);\n    saveFreq(freq + loraConfig.frequency_offset);\n    const char *channelName = channels.getName(channels.getPrimaryIndex());\n\n    slotTimeMsec = computeSlotTimeMsec();\n    preambleTimeMsec = preambleLength * (pow_of_2(sf) / bw);\n\n    LOG_INFO(\"Radio freq=%.3f, config.lora.frequency_offset=%.3f\", freq, loraConfig.frequency_offset);\n    LOG_INFO(\"Set radio: region=%s, name=%s, config=%u, ch=%d, power=%d\", newRegion->name, channelName, loraConfig.modem_preset,\n             channel_num, power);\n    LOG_INFO(\"newRegion->freqStart -> newRegion->freqEnd: %f -> %f (%f MHz)\", newRegion->freqStart, newRegion->freqEnd,\n             newRegion->freqEnd - newRegion->freqStart);\n    LOG_INFO(\"numFreqSlots: %d x %.3fkHz\", numFreqSlots, bw);\n    if (newRegion->profile->overrideSlot != 0) {\n        LOG_INFO(\"Using region override slot: %d\", newRegion->profile->overrideSlot);\n    }\n    LOG_INFO(\"channel_num: %d\", channel_num + 1);\n    LOG_INFO(\"frequency: %f\", getFreq());\n    LOG_INFO(\"Slot time: %u msec, preamble time: %u msec\", slotTimeMsec, preambleTimeMsec);\n} // end of applyModemConfig\n\n/** Slottime is the time to detect a transmission has started, consisting of:\n  - CAD duration;\n  - roundtrip air propagation time (assuming max. 30km between nodes);\n  - Tx/Rx turnaround time (maximum of SX126x and SX127x);\n  - MAC processing time (measured on T-beam) */\nuint32_t RadioInterface::computeSlotTimeMsec()\n{\n    float sumPropagationTurnaroundMACTime = 0.2 + 0.4 + 7; // in milliseconds\n    float symbolTime = pow_of_2(sf) / bw;                  // in milliseconds\n\n    if (myRegion->wideLora) {\n        // CAD duration derived from AN1200.22 of SX1280\n        return (NUM_SYM_CAD_24GHZ + (2 * sf + 3) / 32) * symbolTime + sumPropagationTurnaroundMACTime;\n    } else {\n        // CAD duration for SX127x is max. 2.25 symbols, for SX126x it is number of symbols + 0.5 symbol\n        return max(2.25, NUM_SYM_CAD + 0.5) * symbolTime + sumPropagationTurnaroundMACTime;\n    }\n}\n\n/**\n * Some regulatory regions limit xmit power.\n * This function should be called by subclasses after setting their desired power.  It might lower it\n */\nvoid RadioInterface::limitPower(int8_t loraMaxPower)\n{\n    uint8_t maxPower = 255; // No limit\n\n    if (myRegion->powerLimit)\n        maxPower = myRegion->powerLimit;\n\n    if ((power > maxPower) && !devicestate.owner.is_licensed) {\n        LOG_INFO(\"Lower transmit power because of regulatory limits\");\n        power = maxPower;\n    }\n\n#if HAS_LORA_FEM\n    if (!devicestate.owner.is_licensed) {\n        power = loraFEMInterface.powerConversion(power);\n    }\n#else\n// todo:All entries containing \"lora fem\" are grouped together above.\n#ifdef ARCH_PORTDUINO\n    size_t num_pa_points = portduino_config.num_pa_points;\n    const uint16_t *tx_gain = portduino_config.tx_gain_lora;\n#else\n    size_t num_pa_points = NUM_PA_POINTS;\n    const uint16_t tx_gain[NUM_PA_POINTS] = {TX_GAIN_LORA};\n#endif\n\n    if (num_pa_points == 1) {\n        if (tx_gain[0] > 0 && !devicestate.owner.is_licensed) {\n            LOG_INFO(\"Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB\", power, tx_gain[0]);\n            power -= tx_gain[0];\n        }\n    } else if (!devicestate.owner.is_licensed) {\n        // we have an array of PA gain values.  Find the highest power setting that works.\n        for (int radio_dbm = 0; radio_dbm < (int)num_pa_points; radio_dbm++) {\n            if (((radio_dbm + tx_gain[radio_dbm]) > power) ||\n                ((radio_dbm == (int)(num_pa_points - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= power))) {\n                // we've exceeded the power limit, or hit the max we can do\n                LOG_INFO(\"Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB\", power, tx_gain[radio_dbm]);\n                power -= tx_gain[radio_dbm];\n                break;\n            }\n        }\n    }\n#endif\n    if (power > loraMaxPower) // Clamp power to maximum defined level\n        power = loraMaxPower;\n\n    LOG_INFO(\"Final Tx power: %d dBm\", power);\n}\n\nvoid RadioInterface::deliverToReceiver(meshtastic_MeshPacket *p)\n{\n    if (router) {\n        p->transport_mechanism = meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA;\n        router->enqueueReceivedMessage(p);\n    }\n}\n\n/***\n * given a packet set sendingPacket and decode the protobufs into radiobuf.  Returns # of payload bytes to send\n */\nsize_t RadioInterface::beginSending(meshtastic_MeshPacket *p)\n{\n    assert(!sendingPacket);\n\n    // LOG_DEBUG(\"Send queued packet on mesh (txGood=%d,rxGood=%d,rxBad=%d)\", rf95.txGood(), rf95.rxGood(), rf95.rxBad());\n    assert(p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag); // It should have already been encoded by now\n\n    radioBuffer.header.from = p->from;\n    radioBuffer.header.to = p->to;\n    radioBuffer.header.id = p->id;\n    radioBuffer.header.channel = p->channel;\n    radioBuffer.header.next_hop = p->next_hop;\n    radioBuffer.header.relay_node = p->relay_node;\n    if (p->hop_limit > HOP_MAX) {\n        LOG_WARN(\"hop limit %d is too high, setting to %d\", p->hop_limit, HOP_RELIABLE);\n        p->hop_limit = HOP_RELIABLE;\n    }\n    radioBuffer.header.flags =\n        p->hop_limit | (p->want_ack ? PACKET_FLAGS_WANT_ACK_MASK : 0) | (p->via_mqtt ? PACKET_FLAGS_VIA_MQTT_MASK : 0);\n    radioBuffer.header.flags |= (p->hop_start << PACKET_FLAGS_HOP_START_SHIFT) & PACKET_FLAGS_HOP_START_MASK;\n\n    // if the sender nodenum is zero, that means uninitialized\n    assert(radioBuffer.header.from);\n    assert(p->encrypted.size <= sizeof(radioBuffer.payload));\n    memcpy(radioBuffer.payload, p->encrypted.bytes, p->encrypted.size);\n\n    sendingPacket = p;\n    return p->encrypted.size + sizeof(PacketHeader);\n}"
  },
  {
    "path": "src/mesh/RadioInterface.h",
    "content": "#pragma once\n\n#include \"MemoryPool.h\"\n#include \"MeshTypes.h\"\n#include \"Observer.h\"\n#include \"PointerQueue.h\"\n#include \"airtime.h\"\n#include \"error.h\"\n#include <memory>\n\n#if HAS_LORA_FEM\n#include \"LoRaFEMInterface.h\"\n#endif\n\n// Forward decl to avoid a direct include of generated config headers / full LoRaConfig definition in this widely-included file.\ntypedef struct _meshtastic_Config_LoRaConfig meshtastic_Config_LoRaConfig;\n\n#define MAX_TX_QUEUE 16 // max number of packets which can be waiting for transmission\n\n#define MAX_LORA_PAYLOAD_LEN 255 // max length of 255 per Semtech's datasheets on SX12xx\n#define MESHTASTIC_HEADER_LENGTH 16\n#define MESHTASTIC_PKC_OVERHEAD 12\n\n#define PACKET_FLAGS_HOP_LIMIT_MASK 0x07\n#define PACKET_FLAGS_WANT_ACK_MASK 0x08\n#define PACKET_FLAGS_VIA_MQTT_MASK 0x10\n#define PACKET_FLAGS_HOP_START_MASK 0xE0\n#define PACKET_FLAGS_HOP_START_SHIFT 5\n\n/**\n * This structure has to exactly match the wire layout when sent over the radio link.  Used to keep compatibility\n * with the old radiohead implementation.\n */\ntypedef struct {\n    NodeNum to, from; // can be 1 byte or four bytes\n\n    PacketId id; // can be 1 byte or 4 bytes\n\n    /**\n     * Usage of flags:\n     *\n     * The bottom three bits of flags are use to store hop_limit when sent over the wire.\n     **/\n    uint8_t flags;\n\n    /** The channel hash - used as a hint for the decoder to limit which channels we consider */\n    uint8_t channel;\n\n    // Last byte of the NodeNum of the next-hop for this packet\n    uint8_t next_hop;\n\n    // Last byte of the NodeNum of the node that will relay/relayed this packet\n    uint8_t relay_node;\n} PacketHeader;\n\n/**\n * This structure represent the structured buffer : a PacketHeader then the payload. The whole is\n * MAX_LORA_PAYLOAD_LEN + 1 length\n * It makes the use of its data easier, and avoids manipulating pointers (and potential non aligned accesses)\n */\ntypedef struct {\n    /** The header, as defined just before */\n    PacketHeader header;\n\n    /** The payload, of maximum length minus the header, aligned just to be sure */\n    uint8_t payload[MAX_LORA_PAYLOAD_LEN + 1 - sizeof(PacketHeader)] __attribute__((__aligned__));\n\n} RadioBuffer;\n\n/**\n * Basic operations all radio chipsets must implement.\n *\n * This defines the SOLE API for talking to radios (because soon we will have alternate radio implementations)\n */\nclass RadioInterface\n{\n    friend class MeshRadio; // for debugging we let that class touch pool\n\n    CallbackObserver<RadioInterface, void *> configChangedObserver =\n        CallbackObserver<RadioInterface, void *>(this, &RadioInterface::reloadConfig);\n\n    CallbackObserver<RadioInterface, void *> preflightSleepObserver =\n        CallbackObserver<RadioInterface, void *>(this, &RadioInterface::preflightSleepCb);\n\n    CallbackObserver<RadioInterface, void *> notifyDeepSleepObserver =\n        CallbackObserver<RadioInterface, void *>(this, &RadioInterface::notifyDeepSleepCb);\n\n  protected:\n    bool disabled = false;\n\n    float bw = 125;\n    uint8_t sf = 9;\n    uint8_t cr = 5;\n\n    const uint8_t NUM_SYM_CAD = 2;       // Number of symbols used for CAD, 2 is the default since RadioLib 6.3.0 as per AN1200.48\n    const uint8_t NUM_SYM_CAD_24GHZ = 4; // Number of symbols used for CAD in 2.4 GHz, 4 is recommended in AN1200.22 of SX1280\n    uint32_t slotTimeMsec = computeSlotTimeMsec();\n    uint16_t preambleLength = 16;    // 8 is default, but we use longer to increase the amount of sleep time when receiving\n    uint32_t preambleTimeMsec = 165; // calculated on startup, this is the default for LongFast\n    const uint32_t PROCESSING_TIME_MSEC =\n        4500;                // time to construct, process and construct a packet again (empirically determined)\n    const uint8_t CWmin = 3; // minimum CWsize\n    const uint8_t CWmax = 8; // maximum CWsize\n\n    meshtastic_MeshPacket *sendingPacket = NULL; // The packet we are currently sending\n    uint32_t lastTxStart = 0L;\n\n    uint32_t computeSlotTimeMsec();\n\n    /**\n     * A temporary buffer used for sending/receiving packets, sized to hold the biggest buffer we might need\n     * */\n    RadioBuffer radioBuffer __attribute__((__aligned__));\n    /**\n     * Enqueue a received packet for the registered receiver\n     */\n    void deliverToReceiver(meshtastic_MeshPacket *p);\n\n  public:\n    /** pool is the pool we will alloc our rx packets from\n     */\n    RadioInterface();\n\n    virtual ~RadioInterface() {}\n\n    /**\n     * Coerce LoRa config fields (bandwidth/spread_factor) derived from presets.\n     * This is used during early bootstrapping so UIs that display these fields directly remain consistent.\n     */\n    // static void bootstrapLoRaConfigFromPreset(meshtastic_Config_LoRaConfig &loraConfig); // maybe superseded?\n\n    /**\n     * Return true if we think the board can go to sleep (i.e. our tx queue is empty, we are not sending or receiving)\n     *\n     * This method must be used before putting the CPU into deep or light sleep.\n     */\n    virtual bool canSleep() { return true; }\n\n    virtual bool wideLora() { return false; }\n\n    /// Prepare hardware for sleep.  Call this _only_ for deep sleep, not needed for light sleep.\n    virtual bool sleep() { return true; }\n\n    /// Disable this interface (while disabled, no packets can be sent or received)\n    void disable()\n    {\n        disabled = true;\n        sleep();\n    }\n\n    /**\n     * Send a packet (possibly by enquing in a private fifo).  This routine will\n     * later free() the packet to pool.  This routine is not allowed to stall.\n     * If the txmit queue is full it might return an error\n     */\n    virtual ErrorCode send(meshtastic_MeshPacket *p) = 0;\n\n    /** Return TX queue status */\n    [[nodiscard]] virtual meshtastic_QueueStatus getQueueStatus()\n    {\n        meshtastic_QueueStatus qs;\n        qs.res = qs.mesh_packet_id = qs.free = qs.maxlen = 0;\n        return qs;\n    }\n\n    /** Attempt to cancel a previously sent packet.  Returns true if a packet was found we could cancel */\n    virtual bool cancelSending(NodeNum from, PacketId id) { return false; }\n\n    /** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */\n    virtual bool findInTxQueue(NodeNum from, PacketId id) { return false; }\n\n    // methods from radiohead\n\n    /// Initialise the Driver transport hardware and software.\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool init();\n\n    /// Apply any radio provisioning changes\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool reconfigure();\n\n    /** The delay to use for retransmitting dropped packets */\n    [[nodiscard]] uint32_t getRetransmissionMsec(const meshtastic_MeshPacket *p);\n\n    /** The delay to use when we want to send something */\n    [[nodiscard]] uint32_t getTxDelayMsec();\n\n    /** The CW to use when calculating SNR_based delays */\n    [[nodiscard]] uint8_t getCWsize(float snr);\n\n    /** The worst-case SNR_based packet delay */\n    [[nodiscard]] uint32_t getTxDelayMsecWeightedWorst(float snr);\n\n    /** Returns true if we should rebroadcast early like a ROUTER */\n    [[nodiscard]] bool shouldRebroadcastEarlyLikeRouter(meshtastic_MeshPacket *p);\n\n    /** The delay to use when we want to flood a message. Use a weighted scale based on SNR */\n    [[nodiscard]] uint32_t getTxDelayMsecWeighted(meshtastic_MeshPacket *p);\n\n    /** If the packet is not already in the late rebroadcast window, move it there */\n    virtual void clampToLateRebroadcastWindow(NodeNum from, PacketId id) { return; }\n\n    /**\n     * If there is a packet pending TX in the queue with a worse hop limit, remove it pending replacement with a better version\n     * @return Whether a pending packet was removed\n     */\n    virtual bool removePendingTXPacket(NodeNum from, PacketId id, uint32_t hop_limit_lt) { return false; }\n\n    /**\n     * Calculate airtime per\n     * https://www.rs-online.com/designspark/rel-assets/ds-assets/uploads/knowledge-items/application-notes-for-the-internet-of-things/LoRa%20Design%20Guide.pdf\n     * section 4\n     *\n     * @return num msecs for the packet\n     */\n    [[nodiscard]] uint32_t getPacketTime(const meshtastic_MeshPacket *p, bool received = false);\n    [[nodiscard]] virtual uint32_t getPacketTime(uint32_t totalPacketLen, bool received = false) = 0;\n\n    /**\n     * Get the channel we saved.\n     */\n    [[nodiscard]] uint32_t getChannelNum();\n\n    /**\n     * Get the frequency we saved.\n     */\n    [[nodiscard]] virtual float getFreq();\n\n    /// Some boards (1st gen Pinetab Lora module) have broken IRQ wires, so we need to poll via i2c registers\n    virtual bool isIRQPending() { return false; }\n\n    // Whether we use the default frequency slot given our LoRa config (region and modem preset)\n    static bool uses_default_frequency_slot;\n\n    // Whether we have a custom channel name\n    static bool uses_custom_channel_name;\n\n    static bool checkOrClampConfigLora(meshtastic_Config_LoRaConfig &loraConfig, bool clamp);\n\n    // Check if a candidate region is compatible and valid.\n    static bool validateConfigRegion(const meshtastic_Config_LoRaConfig &loraConfig);\n\n    // Check if a candidate radio configuration is valid.\n    static bool validateConfigLora(const meshtastic_Config_LoRaConfig &loraConfig);\n\n    // Make a candidate radio configuration valid, even if it isn't.\n    static void clampConfigLora(meshtastic_Config_LoRaConfig &loraConfig);\n\n  protected:\n    int8_t power = 17; // Set by applyModemConfig()\n\n    float savedFreq;\n    uint32_t savedChannelNum;\n\n    /***\n     * given a packet set sendingPacket and decode the protobufs into radiobuf.  Returns # of bytes to send (including the\n     * PacketHeader & payload).\n     *\n     * Used as the first step of\n     */\n    [[nodiscard]] size_t beginSending(meshtastic_MeshPacket *p);\n\n    /**\n     * Some regulatory regions limit xmit power.\n     * This function should be called by subclasses after setting their desired power.  It might lower it\n     */\n    void limitPower(int8_t MAX_POWER);\n\n    /**\n     * Save the frequency we selected for later reuse.\n     */\n    virtual void saveFreq(float savedFreq);\n\n    /**\n     * Save the channel we selected for later reuse.\n     */\n    virtual void saveChannelNum(uint32_t savedChannelNum);\n\n  private:\n    /**\n     * Convert our modemConfig enum into wf, sf, etc...\n     *\n     * These parameters will be pull from the channelSettings global\n     */\n    void applyModemConfig();\n\n    /// Return 0 if sleep is okay\n    int preflightSleepCb(void *unused = NULL) { return canSleep() ? 0 : 1; }\n\n    int notifyDeepSleepCb(void *unused = NULL);\n\n    int reloadConfig(void *unused)\n    {\n        reconfigure();\n        return 0;\n    }\n};\n\nstd::unique_ptr<RadioInterface> initLoRa();\n\n/// Debug printing for packets\nvoid printPacket(const char *prefix, const meshtastic_MeshPacket *p);\n"
  },
  {
    "path": "src/mesh/RadioLibInterface.cpp",
    "content": "#include \"RadioLibInterface.h\"\n#include \"MeshTypes.h\"\n#include \"NodeDB.h\"\n#include \"PowerMon.h\"\n#include \"SPILock.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n#include \"main.h\"\n#include \"mesh-pb-constants.h\"\n#include <pb_decode.h>\n#include <pb_encode.h>\n\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#include \"meshUtils.h\"\n#endif\nvoid LockingArduinoHal::spiBeginTransaction()\n{\n    spiLock->lock();\n\n    ArduinoHal::spiBeginTransaction();\n}\n\nvoid LockingArduinoHal::spiEndTransaction()\n{\n    ArduinoHal::spiEndTransaction();\n\n    spiLock->unlock();\n}\n#if ARCH_PORTDUINO\nvoid LockingArduinoHal::spiTransfer(uint8_t *out, size_t len, uint8_t *in)\n{\n    spi->transfer(out, in, len);\n}\n#endif\n\nRadioLibInterface::RadioLibInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                     RADIOLIB_PIN_TYPE busy, PhysicalLayer *_iface)\n    : NotifiedWorkerThread(\"RadioIf\"), module(hal, cs, irq, rst, busy), iface(_iface)\n{\n    instance = this;\n#if defined(ARCH_STM32WL) && defined(USE_SX1262)\n    module.setCb_digitalWrite(stm32wl_emulate_digitalWrite);\n    module.setCb_digitalRead(stm32wl_emulate_digitalRead);\n#endif\n}\n\n#ifdef ARCH_ESP32\n// ESP32 doesn't use that flag\n#define YIELD_FROM_ISR(x) portYIELD_FROM_ISR()\n#else\n#define YIELD_FROM_ISR(x) portYIELD_FROM_ISR(x)\n#endif\n\nvoid INTERRUPT_ATTR RadioLibInterface::isrLevel0Common(PendingISR cause)\n{\n    instance->disableInterrupt();\n\n    BaseType_t xHigherPriorityTaskWoken;\n    instance->notifyFromISR(&xHigherPriorityTaskWoken, cause, true);\n\n    /* Force a context switch if xHigherPriorityTaskWoken is now set to pdTRUE.\n    The macro used to do this is dependent on the port and may be called\n    portEND_SWITCHING_ISR. */\n    YIELD_FROM_ISR(xHigherPriorityTaskWoken);\n}\n\nvoid INTERRUPT_ATTR RadioLibInterface::isrRxLevel0()\n{\n    isrLevel0Common(ISR_RX);\n}\n\nvoid INTERRUPT_ATTR RadioLibInterface::isrTxLevel0()\n{\n    isrLevel0Common(ISR_TX);\n}\n\n/** Our ISR code currently needs this to find our active instance\n */\nRadioLibInterface *RadioLibInterface::instance;\n\n/** Could we send right now (i.e. either not actively receiving or transmitting)? */\nbool RadioLibInterface::canSendImmediately()\n{\n    // We wait _if_ we are partially though receiving a packet (rather than just merely waiting for one).\n    // To do otherwise would be doubly bad because not only would we drop the packet that was on the way in,\n    // we almost certainly guarantee no one outside will like the packet we are sending.\n    bool busyTx = sendingPacket != NULL;\n    bool busyRx = isReceiving && isActivelyReceiving();\n\n    if (busyTx || busyRx) {\n        if (busyTx) {\n            LOG_WARN(\"Can not send yet, busyTx\");\n        }\n        // If we've been trying to send the same packet more than one minute and we haven't gotten a\n        // TX IRQ from the radio, the radio is probably broken.\n        if (busyTx && !Throttle::isWithinTimespanMs(lastTxStart, 60000)) {\n            LOG_ERROR(\"Hardware Failure! busyTx for more than 60s\");\n            RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_TRANSMIT_FAILED);\n            // reboot in 5 seconds when this condition occurs.\n            rebootAtMsec = lastTxStart + 65000;\n        }\n        if (busyRx) {\n            LOG_WARN(\"Can not send yet, busyRx\");\n        }\n        return false;\n    } else\n        return true;\n}\n\nbool RadioLibInterface::receiveDetected(uint16_t irq, ulong syncWordHeaderValidFlag, ulong preambleDetectedFlag)\n{\n    bool detected = (irq & (syncWordHeaderValidFlag | preambleDetectedFlag));\n    // Handle false detections\n    if (detected) {\n        if (!activeReceiveStart) {\n            activeReceiveStart = millis();\n        } else if (!Throttle::isWithinTimespanMs(activeReceiveStart, 2 * preambleTimeMsec)) {\n            if (!(irq & syncWordHeaderValidFlag)) {\n                // The HEADER_VALID flag should be set by now if it was really a packet, so ignore PREAMBLE_DETECTED flag\n                activeReceiveStart = 0;\n                LOG_DEBUG(\"Ignore false preamble detection\");\n                return false;\n            } else {\n                uint32_t maxPacketTimeMsec = getPacketTime(meshtastic_Constants_DATA_PAYLOAD_LEN + sizeof(PacketHeader));\n                if (!Throttle::isWithinTimespanMs(activeReceiveStart, maxPacketTimeMsec)) {\n                    // We should have gotten an RX_DONE IRQ by now if it was really a packet, so ignore HEADER_VALID flag\n                    activeReceiveStart = 0;\n                    LOG_DEBUG(\"Ignore false header detection\");\n                    return false;\n                }\n            }\n        }\n    }\n    return detected;\n}\n\n/// Send a packet (possibly by enquing in a private fifo).  This routine will\n/// later free() the packet to pool.  This routine is not allowed to stall because it is called from\n/// bluetooth comms code.  If the txmit queue is empty it might return an error\nErrorCode RadioLibInterface::send(meshtastic_MeshPacket *p)\n{\n\n#ifndef DISABLE_WELCOME_UNSET\n\n    if (config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n        if (disabled || !config.lora.tx_enabled) {\n            LOG_WARN(\"send - !config.lora.tx_enabled\");\n            packetPool.release(p);\n            return ERRNO_DISABLED;\n        }\n\n    } else {\n        LOG_WARN(\"send - lora tx disabled: Region unset\");\n        packetPool.release(p);\n        return ERRNO_DISABLED;\n    }\n\n#else\n\n    if (disabled || !config.lora.tx_enabled) {\n        LOG_WARN(\"send - !config.lora.tx_enabled\");\n        packetPool.release(p);\n        return ERRNO_DISABLED;\n    }\n\n#endif\n\n    if (p->to == NODENUM_BROADCAST_NO_LORA) {\n        LOG_DEBUG(\"Drop no-LoRa pkt\");\n        return ERRNO_SHOULD_RELEASE;\n    }\n\n    // Sometimes when testing it is useful to be able to never turn on the xmitter\n#ifndef LORA_DISABLE_SENDING\n    printPacket(\"enqueue for send\", p);\n\n    LOG_DEBUG(\"txGood=%d,txRelay=%d,rxGood=%d,rxBad=%d\", txGood, txRelay, rxGood, rxBad);\n    bool dropped = false;\n    ErrorCode res = txQueue.enqueue(p, &dropped) ? ERRNO_OK : ERRNO_UNKNOWN;\n\n    if (dropped) {\n        txDrop++;\n    }\n\n    if (res != ERRNO_OK) { // we weren't able to queue it, so we must drop it to prevent leaks\n        packetPool.release(p);\n        return res;\n    }\n\n    // set (random) transmit delay to let others reconfigure their radio,\n    // to avoid collisions and implement timing-based flooding\n    setTransmitDelay();\n\n    return res;\n#else\n    packetPool.release(p);\n    return ERRNO_DISABLED;\n#endif\n}\n\nmeshtastic_QueueStatus RadioLibInterface::getQueueStatus()\n{\n    meshtastic_QueueStatus qs;\n\n    qs.res = qs.mesh_packet_id = 0;\n    qs.free = txQueue.getFree();\n    qs.maxlen = txQueue.getMaxLen();\n\n    return qs;\n}\n\nbool RadioLibInterface::canSleep()\n{\n    bool res = txQueue.empty();\n    if (!res) { // only print debug messages if we are vetoing sleep\n        LOG_DEBUG(\"Radio wait to sleep, txEmpty=%d\", res);\n    }\n    return res;\n}\n\n/** Allow other firmware components to ask whether we are currently sending a packet\nInitially implemented to protect T-Echo's capacitive touch button from spurious presses during tx\n*/\nbool RadioLibInterface::isSending()\n{\n    return sendingPacket != NULL;\n}\n\n/** Attempt to cancel a previously sent packet.  Returns true if a packet was found we could cancel */\nbool RadioLibInterface::cancelSending(NodeNum from, PacketId id)\n{\n    auto p = txQueue.remove(from, id);\n    if (p)\n        packetPool.release(p); // free the packet we just removed\n\n    bool result = (p != NULL);\n    LOG_DEBUG(\"cancelSending id=0x%x, removed=%d\", id, result);\n    return result;\n}\n\n/** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */\nbool RadioLibInterface::findInTxQueue(NodeNum from, PacketId id)\n{\n    return txQueue.find(from, id);\n}\n\n/** radio helper thread callback.\nWe never immediately transmit after any operation (either Rx or Tx). Instead we should wait a random multiple of\n'slotTimes' (see definition in RadioInterface.h) taken from a contention window (CW) to lower the chance of collision.\nThe CW size is determined by setTransmitDelay() and depends either on the current channel utilization or SNR in case\nof a flooding message. After this, we perform channel activity detection (CAD) and reset the transmit delay if it is\ncurrently active.\n*/\nvoid RadioLibInterface::onNotify(uint32_t notification)\n{\n    switch (notification) {\n    case ISR_TX:\n        handleTransmitInterrupt();\n        startReceive();\n        setTransmitDelay();\n        break;\n    case ISR_RX:\n        handleReceiveInterrupt();\n        startReceive();\n        setTransmitDelay();\n        break;\n    case TRANSMIT_DELAY_COMPLETED:\n\n        // If we are not currently in receive mode, then restart the random delay (this can happen if the main thread\n        // has placed the unit into standby)  FIXME, how will this work if the chipset is in sleep mode?\n        if (!txQueue.empty()) {\n            if (!canSendImmediately()) {\n                setTransmitDelay(); // currently Rx/Tx-ing: reset random delay\n            } else {\n                meshtastic_MeshPacket *txp = txQueue.getFront();\n                assert(txp);\n                long delay_remaining = txp->tx_after ? txp->tx_after - millis() : 0;\n                if (delay_remaining > 0) {\n                    // There's still some delay pending on this packet, so resume waiting for it to elapse\n                    notifyLater(delay_remaining, TRANSMIT_DELAY_COMPLETED, false);\n                } else {\n                    if (isChannelActive()) { // check if there is currently a LoRa packet on the channel\n                        startReceive();      // try receiving this packet, afterwards we'll be trying to transmit again\n                        setTransmitDelay();\n                    } else {\n                        // Send any outgoing packets we have ready as fast as possible to keep the time between channel scan and\n                        // actual transmission as short as possible\n                        txp = txQueue.dequeue();\n                        assert(txp);\n                        startSend(txp);\n                        LOG_DEBUG(\"%d packets remain in the TX queue\", txQueue.getMaxLen() - txQueue.getFree());\n                    }\n                }\n            }\n        } else {\n            // Do nothing, because the queue is empty\n        }\n        break;\n    default:\n        assert(0); // We expected to receive a valid notification from the ISR\n    }\n}\n\nvoid RadioLibInterface::setTransmitDelay()\n{\n    meshtastic_MeshPacket *p = txQueue.getFront();\n    if (!p) {\n        return; // noop if there's nothing in the queue\n    }\n\n    // We want all sending/receiving to be done by our daemon thread.\n    // We use a delay here because this packet might have been sent in response to a packet we just received.\n    // So we want to make sure the other side has had a chance to reconfigure its radio.\n\n    if (p->tx_after) {\n        unsigned long add_delay = p->rx_rssi ? getTxDelayMsecWeighted(p) : getTxDelayMsec();\n        unsigned long now = millis();\n        p->tx_after = min(max(p->tx_after + add_delay, now + add_delay), now + 2 * getTxDelayMsecWeightedWorst(p->rx_snr));\n        notifyLater(p->tx_after - now, TRANSMIT_DELAY_COMPLETED, false);\n    } else if (p->rx_snr == 0 && p->rx_rssi == 0) {\n        /* We assume if rx_snr = 0 and rx_rssi = 0, the packet was generated locally.\n         *   This assumption is valid because of the offset generated by the radio to account for the noise\n         *   floor.\n         */\n        startTransmitTimer(true);\n    } else {\n        // If there is a SNR, start a timer scaled based on that SNR.\n        LOG_DEBUG(\"rx_snr found. hop_limit:%d rx_snr:%f\", p->hop_limit, p->rx_snr);\n        startTransmitTimerRebroadcast(p);\n    }\n}\n\nvoid RadioLibInterface::startTransmitTimer(bool withDelay)\n{\n    // If we have work to do and the timer wasn't already scheduled, schedule it now\n    if (!txQueue.empty()) {\n        uint32_t delay = !withDelay ? 1 : getTxDelayMsec();\n        notifyLater(delay, TRANSMIT_DELAY_COMPLETED, false); // This will implicitly enable\n    }\n}\n\nvoid RadioLibInterface::startTransmitTimerRebroadcast(meshtastic_MeshPacket *p)\n{\n    // If we have work to do and the timer wasn't already scheduled, schedule it now\n    if (!txQueue.empty()) {\n        uint32_t delay = getTxDelayMsecWeighted(p);\n        notifyLater(delay, TRANSMIT_DELAY_COMPLETED, false); // This will implicitly enable\n    }\n}\n\n/**\n * If the packet is not already in the late rebroadcast window, move it there\n */\nvoid RadioLibInterface::clampToLateRebroadcastWindow(NodeNum from, PacketId id)\n{\n    // Look for non-late packets only, so we don't do this twice!\n    meshtastic_MeshPacket *p = txQueue.remove(from, id, true, false);\n    if (p) {\n        p->tx_after = millis() + getTxDelayMsecWeightedWorst(p->rx_snr);\n        bool dropped = false;\n        if (txQueue.enqueue(p, &dropped)) {\n            LOG_DEBUG(\"Move existing queued packet to the late rebroadcast window %dms from now\", p->tx_after - millis());\n        } else {\n            packetPool.release(p);\n        }\n        if (dropped) {\n            txDrop++;\n        }\n    }\n}\n\n/**\n * If there is a packet pending TX in the queue with a worse hop limit, remove it pending replacement with a better version\n * @return Whether a pending packet was removed\n */\nbool RadioLibInterface::removePendingTXPacket(NodeNum from, PacketId id, uint32_t hop_limit_lt)\n{\n    meshtastic_MeshPacket *p = txQueue.remove(from, id, true, true, hop_limit_lt);\n    if (p) {\n        LOG_DEBUG(\"Dropping pending-TX packet 0x%08x with hop limit %d\", p->id, p->hop_limit);\n        packetPool.release(p);\n        return true;\n    }\n    return false;\n}\n\n/**\n * Remove a packet that is eligible for replacement from the TX queue\n */\n// void RadioLibInterface::removePending\n\nvoid RadioLibInterface::handleTransmitInterrupt()\n{\n    // This can be null if we forced the device to enter standby mode.  In that case\n    // ignore the transmit interrupt\n    if (sendingPacket)\n        completeSending();\n    powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); // But our transmitter is definitely off now\n}\n\nvoid RadioLibInterface::completeSending()\n{\n    // We are careful to clear sending packet before calling printPacket because\n    // that can take a long time\n    auto p = sendingPacket;\n    sendingPacket = NULL;\n\n    if (p) {\n        // Packet has been sent, count it toward our TX airtime utilization.\n        uint32_t xmitMsec = getPacketTime(p);\n        airTime->logAirtime(TX_LOG, xmitMsec);\n\n        txGood++;\n        if (!isFromUs(p))\n            txRelay++;\n        printPacket(\"Completed sending\", p);\n\n        // We are done sending that packet, release it\n        packetPool.release(p);\n    }\n}\n\nvoid RadioLibInterface::handleReceiveInterrupt()\n{\n    // when this is called, we should be in receive mode - if we are not, just jump out instead of bombing. Possible Race\n    // Condition?\n    if (!isReceiving) {\n        LOG_ERROR(\"handleReceiveInterrupt called when not in rx mode, which shouldn't happen\");\n        return;\n    }\n\n    isReceiving = false;\n\n    // read the number of actually received bytes\n    size_t length = iface->getPacketLength();\n\n    uint32_t rxMsec = getPacketTime(length, true);\n\n#ifndef DISABLE_WELCOME_UNSET\n    if (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n        LOG_WARN(\"lora rx disabled: Region unset\");\n        airTime->logAirtime(RX_ALL_LOG, rxMsec);\n        return;\n    }\n#endif\n\n    int state = iface->readData((uint8_t *)&radioBuffer, length);\n#if ARCH_PORTDUINO\n    if (portduino_config.logoutputlevel == level_trace) {\n        printBytes(\"Raw incoming packet: \", (uint8_t *)&radioBuffer, length);\n    }\n#endif\n    if (state != RADIOLIB_ERR_NONE) {\n        // Log PacketHeader similar to RadioInterface::printPacket so we can try to match RX errors to other packets in the logs.\n        LOG_ERROR(\"Ignore received packet due to error=%d (maybe id=0x%08x fr=0x%08x to=0x%08x flags=0x%02x rxSNR=%g rxRSSI=%i \"\n                  \"nextHop=0x%x relay=0x%x)\",\n                  state, radioBuffer.header.id, radioBuffer.header.from, radioBuffer.header.to, radioBuffer.header.flags,\n                  iface->getSNR(), lround(iface->getRSSI()), radioBuffer.header.next_hop, radioBuffer.header.relay_node);\n        rxBad++;\n\n        airTime->logAirtime(RX_ALL_LOG, rxMsec);\n\n    } else {\n        // Skip the 4 headers that are at the beginning of the rxBuf\n        int32_t payloadLen = length - sizeof(PacketHeader);\n\n        // check for short packets\n        if (payloadLen < 0) {\n            LOG_WARN(\"Ignore received packet too short\");\n            rxBad++;\n            airTime->logAirtime(RX_ALL_LOG, rxMsec);\n        } else {\n            rxGood++;\n            // altered packet with \"from == 0\" can do Remote Node Administration without permission\n            if (radioBuffer.header.from == 0) {\n                LOG_WARN(\"Ignore received packet without sender\");\n                return;\n            }\n\n            // Note: we deliver _all_ packets to our router (i.e. our interface is intentionally promiscuous).\n            // This allows the router and other apps on our node to sniff packets (usually routing) between other\n            // nodes.\n            meshtastic_MeshPacket *mp = packetPool.allocZeroed();\n\n            // Keep the assigned fields in sync with src/mqtt/MQTT.cpp:onReceiveProto\n            mp->from = radioBuffer.header.from;\n            mp->to = radioBuffer.header.to;\n            mp->id = radioBuffer.header.id;\n            mp->channel = radioBuffer.header.channel;\n            assert(HOP_MAX <= PACKET_FLAGS_HOP_LIMIT_MASK); // If hopmax changes, carefully check this code\n            mp->hop_limit = radioBuffer.header.flags & PACKET_FLAGS_HOP_LIMIT_MASK;\n            mp->hop_start = (radioBuffer.header.flags & PACKET_FLAGS_HOP_START_MASK) >> PACKET_FLAGS_HOP_START_SHIFT;\n            mp->want_ack = !!(radioBuffer.header.flags & PACKET_FLAGS_WANT_ACK_MASK);\n            mp->via_mqtt = !!(radioBuffer.header.flags & PACKET_FLAGS_VIA_MQTT_MASK);\n            // If hop_start is not set, next_hop and relay_node are invalid (firmware <2.3)\n            mp->next_hop = mp->hop_start == 0 ? NO_NEXT_HOP_PREFERENCE : radioBuffer.header.next_hop;\n            mp->relay_node = mp->hop_start == 0 ? NO_RELAY_NODE : radioBuffer.header.relay_node;\n\n            addReceiveMetadata(mp);\n\n            mp->which_payload_variant =\n                meshtastic_MeshPacket_encrypted_tag; // Mark that the payload is still encrypted at this point\n            assert(((uint32_t)payloadLen) <= sizeof(mp->encrypted.bytes));\n            memcpy(mp->encrypted.bytes, radioBuffer.payload, payloadLen);\n            mp->encrypted.size = payloadLen;\n\n            printPacket(\"Lora RX\", mp);\n\n            airTime->logAirtime(RX_LOG, rxMsec);\n\n            deliverToReceiver(mp);\n        }\n    }\n}\n\nvoid RadioLibInterface::startReceive()\n{\n    isReceiving = true;\n    powerMon->setState(meshtastic_PowerMon_State_Lora_RXOn);\n}\n\nvoid RadioLibInterface::pollMissedIrqs()\n{\n    // RadioLibInterface::enableInterrupt uses EDGE-TRIGGERED interrupts. Poll as a backup to catch missed edges.\n    if (isReceiving) {\n        checkRxDoneIrqFlag();\n    }\n}\n\nvoid RadioLibInterface::resetAGC()\n{\n    // Base implementation: no-op. Override in chip-specific subclasses.\n}\n\nvoid RadioLibInterface::checkRxDoneIrqFlag()\n{\n    if (iface->checkIrq(RADIOLIB_IRQ_RX_DONE)) {\n        LOG_WARN(\"caught missed RX_DONE\");\n        notify(ISR_RX, true);\n    }\n}\n\nvoid RadioLibInterface::configHardwareForSend()\n{\n    powerMon->setState(meshtastic_PowerMon_State_Lora_TXOn);\n}\n\nvoid RadioLibInterface::setStandby()\n{\n    // neither sending nor receiving\n    powerMon->clearState(meshtastic_PowerMon_State_Lora_RXOn);\n    powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn);\n}\n\n/** start an immediate transmit */\nbool RadioLibInterface::startSend(meshtastic_MeshPacket *txp)\n{\n    /* NOTE: Minimize the actions before startTransmit() to keep the time between\n             channel scan and actual transmit as low as possible to avoid collisions. */\n    if (disabled || !config.lora.tx_enabled) {\n        LOG_WARN(\"Drop Tx packet because LoRa Tx disabled\");\n        packetPool.release(txp);\n        return false;\n    } else {\n        configHardwareForSend(); // must be after setStandby\n\n        size_t numbytes = beginSending(txp);\n\n        int res = iface->startTransmit((uint8_t *)&radioBuffer, numbytes);\n        if (res != RADIOLIB_ERR_NONE) {\n            LOG_ERROR(\"startTransmit failed, error=%d\", res);\n            RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_RADIO_SPI_BUG);\n\n            // This send failed, but make sure to 'complete' it properly\n            completeSending();\n            powerMon->clearState(meshtastic_PowerMon_State_Lora_TXOn); // Transmitter off now\n            startReceive(); // Restart receive mode (because startTransmit failed to put us in xmit mode)\n        } else {\n            // Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register\n            // bits\n            enableInterrupt(isrTxLevel0);\n            lastTxStart = millis();\n            printPacket(\"Started Tx\", txp);\n        }\n\n        return res == RADIOLIB_ERR_NONE;\n    }\n}"
  },
  {
    "path": "src/mesh/RadioLibInterface.h",
    "content": "#pragma once\n\n#include \"MeshPacketQueue.h\"\n#include \"RadioInterface.h\"\n#include \"concurrency/NotifiedWorkerThread.h\"\n\n#include <RadioLib.h>\n#include <sys/types.h>\n\n// ESP32 has special rules about ISR code\n#ifdef ARDUINO_ARCH_ESP32\n#define INTERRUPT_ATTR IRAM_ATTR\n#else\n#define INTERRUPT_ATTR\n#endif\n\n#define RADIOLIB_PIN_TYPE uint32_t\n\n// In addition to the default Rx flags, we need the PREAMBLE_DETECTED flag to detect whether we are actively receiving\n#define MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS (RADIOLIB_IRQ_RX_DEFAULT_FLAGS | (1 << RADIOLIB_IRQ_PREAMBLE_DETECTED))\n\n#define AGC_RESET_INTERVAL_MS (60 * 1000) // 60 seconds\n\n/**\n * We need to override the RadioLib ArduinoHal class to add mutex protection for SPI bus access\n */\nclass LockingArduinoHal : public ArduinoHal\n{\n  public:\n    LockingArduinoHal(SPIClass &spi, SPISettings spiSettings) : ArduinoHal(spi, spiSettings){};\n\n    void spiBeginTransaction() override;\n    void spiEndTransaction() override;\n#if ARCH_PORTDUINO\n    void spiTransfer(uint8_t *out, size_t len, uint8_t *in) override;\n\n#endif\n};\n\n#if defined(USE_STM32WLx)\n/**\n * A wrapper for the RadioLib STM32WLx_Module class, that doesn't connect any pins as they are virtual\n */\nclass STM32WLx_ModuleWrapper : public STM32WLx_Module\n{\n  public:\n    STM32WLx_ModuleWrapper(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                           RADIOLIB_PIN_TYPE busy)\n        : STM32WLx_Module(){};\n};\n#endif\n\nclass RadioLibInterface : public RadioInterface, protected concurrency::NotifiedWorkerThread\n{\n    /// Used as our notification from the ISR\n    enum PendingISR { ISR_NONE = 0, ISR_RX, ISR_TX, TRANSMIT_DELAY_COMPLETED };\n\n    /**\n     * Raw ISR handler that just calls our polymorphic method\n     */\n    static void isrTxLevel0(), isrLevel0Common(PendingISR code);\n\n    MeshPacketQueue txQueue = MeshPacketQueue(MAX_TX_QUEUE);\n\n  protected:\n    ModemType_t modemType = RADIOLIB_MODEM_LORA;\n    DataRate_t getDataRate() const { return {.lora = {.spreadingFactor = sf, .bandwidth = bw, .codingRate = cr}}; }\n    PacketConfig_t getPacketConfig() const\n    {\n        return {.lora = {.preambleLength = preambleLength,\n                         .implicitHeader = false,\n                         .crcEnabled = true,\n                         // We use auto LDRO, meaning it is enabled if the symbol time is >= 16msec\n                         .ldrOptimize = (1 << sf) / bw >= 16}};\n    }\n\n    /**\n     * We use a meshtastic sync word, but hashed with the Channel name.  For releases before 1.2 we used 0x12 (or for very old\n     * loads 0x14) Note: do not use 0x34 - that is reserved for lorawan\n     *\n     * We now use 0x2b (so that someday we can possibly use NOT 2b - because that would be funny pun).  We will be staying with\n     * this code for a long time.\n     */\n    const uint8_t syncWord = 0x2b;\n\n    float currentLimit = 100; // 100mA OCP - Should be acceptable for RFM95/SX127x chipset.\n\n#if !defined(USE_STM32WLx)\n    Module module; // The HW interface to the radio\n#else\n    STM32WLx_ModuleWrapper module;\n#endif\n\n    /**\n     * provides lowest common denominator RadioLib API\n     */\n    PhysicalLayer *iface;\n\n    /// are _trying_ to receive a packet currently (note - we might just be waiting for one)\n    bool isReceiving = false;\n\n  public:\n    /** Our ISR code currently needs this to find our active instance\n     */\n    static RadioLibInterface *instance;\n\n    /**\n     * Glue functions called from ISR land\n     */\n    virtual void disableInterrupt() = 0;\n\n    /**\n     * Enable a particular ISR callback glue function\n     */\n    virtual void enableInterrupt(void (*)()) = 0;\n\n    /**\n     * Poll as a backup to catch missed edge-triggered interrupts.\n     */\n    void pollMissedIrqs();\n\n    /**\n     * Reset AGC by power-cycling the analog frontend.\n     * Subclasses override with chip-specific calibration sequences.\n     * Safe to call periodically — skips if currently sending or receiving.\n     */\n    virtual void resetAGC();\n\n    /**\n     * Debugging counts\n     */\n    uint32_t rxBad = 0, rxGood = 0, txGood = 0, txRelay = 0;\n    uint16_t txDrop = 0;\n\n  public:\n    RadioLibInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                      RADIOLIB_PIN_TYPE busy, PhysicalLayer *iface = NULL);\n\n    virtual ErrorCode send(meshtastic_MeshPacket *p) override;\n\n    /**\n     * Return true if we think the board can go to sleep (i.e. our tx queue is empty, we are not sending or receiving)\n     *\n     * This method must be used before putting the CPU into deep or light sleep.\n     */\n    virtual bool canSleep() override;\n\n    /**\n     * Start waiting to receive a message\n     *\n     * External functions can call this method to wake the device from sleep.\n     * Subclasses must override and call this base method\n     */\n    virtual void startReceive();\n\n    /** can we detect a LoRa preamble on the current channel? */\n    virtual bool isChannelActive() = 0;\n\n    /** are we actively receiving a packet (only called during receiving state)\n     *  This method is only public to facilitate debugging.  Do not call.\n     */\n    virtual bool isActivelyReceiving() = 0;\n\n    /** Are we are currently sending a packet?\n     * This method is public, intending to expose this information to other firmware components\n     */\n    virtual bool isSending();\n\n    /** Attempt to cancel a previously sent packet.  Returns true if a packet was found we could cancel */\n    virtual bool cancelSending(NodeNum from, PacketId id) override;\n\n    /** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */\n    virtual bool findInTxQueue(NodeNum from, PacketId id) override;\n\n  private:\n    /** if we have something waiting to send, start a short (random) timer so we can come check for collision before actually\n     * doing the transmit */\n    void setTransmitDelay();\n\n    /**\n     * random timer with certain min. and max. settings\n     * @return Timestamp after which the packet may be sent\n     */\n    void startTransmitTimer(bool withDelay = true);\n\n    /**\n     * timer scaled to SNR of to be flooded packet\n     * @return Timestamp after which the packet may be sent\n     */\n    void startTransmitTimerRebroadcast(meshtastic_MeshPacket *p);\n\n    void handleTransmitInterrupt();\n    void handleReceiveInterrupt();\n\n    static void timerCallback(void *p1, uint32_t p2);\n\n    virtual void onNotify(uint32_t notification) override;\n\n    /** start an immediate transmit\n     *  This method is virtual so subclasses can hook as needed, subclasses should not call directly\n     *  @return true if packet was sent\n     */\n    virtual bool startSend(meshtastic_MeshPacket *txp);\n\n    meshtastic_QueueStatus getQueueStatus();\n\n  protected:\n    uint32_t activeReceiveStart = 0;\n\n    bool receiveDetected(uint16_t irq, ulong syncWordHeaderValidFlag, ulong preambleDetectedFlag);\n\n    /** Do any hardware setup needed on entry into send configuration for the radio.\n     * Subclasses can customize, but must also call this base method */\n    virtual void configHardwareForSend();\n\n    /** Could we send right now (i.e. either not actively receiving or transmitting)? */\n    virtual bool canSendImmediately();\n\n    /**\n     * Raw ISR handler that just calls our polymorphic method\n     */\n    static void isrRxLevel0();\n\n    /**\n     * If a send was in progress finish it and return the buffer to the pool */\n    void completeSending();\n\n    /**\n     * Add SNR data to received messages\n     */\n    virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) = 0;\n\n    /**\n     * Subclasses must override, implement and then call into this base class implementation\n     */\n    virtual void setStandby();\n\n    /**\n     * Derive packet time either for a received (using header info) or a transmitted packet\n     */\n    template <typename T> uint32_t computePacketTime(T &lora, uint32_t pl, bool received)\n    {\n        if (received) {\n            // First get the actual coding rate and CRC status from the received packet\n            uint8_t rxCR;\n            bool hasCRC;\n            lora.getLoRaRxHeaderInfo(&rxCR, &hasCRC);\n            // Go from raw header value to denominator\n            if (rxCR < 5) {\n                rxCR += 4;\n            } else if (rxCR == 7) {\n                rxCR = 8;\n            }\n\n            // Received packet configuration must be the same as configured, except for coding rate and CRC\n            DataRate_t dr = getDataRate();\n            dr.lora.codingRate = rxCR;\n\n            PacketConfig_t pc = getPacketConfig();\n            pc.lora.crcEnabled = hasCRC;\n\n            return lora.calculateTimeOnAir(modemType, dr, pc, pl) / 1000;\n        }\n\n        return lora.getTimeOnAir(pl) / 1000;\n    }\n\n    const char *radioLibErr = \"RadioLib err=\";\n\n    /**\n     * If the packet is not already in the late rebroadcast window, move it there\n     */\n    void clampToLateRebroadcastWindow(NodeNum from, PacketId id);\n\n    /**\n     * If there is a packet pending TX in the queue with a worse hop limit, remove it pending replacement with a better version\n     * @return Whether a pending packet was removed\n     */\n\n    bool removePendingTXPacket(NodeNum from, PacketId id, uint32_t hop_limit_lt) override;\n\n    void checkRxDoneIrqFlag();\n};\n"
  },
  {
    "path": "src/mesh/RadioLibRF95.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX127X != 1\n#include \"RadioLibRF95.h\"\n#include \"configuration.h\"\n\n// From datasheet but radiolib doesn't know anything about this\n#define SX127X_REG_TCXO 0x4B\n\nRadioLibRF95::RadioLibRF95(Module *mod) : SX1278(mod) {}\n\nint16_t RadioLibRF95::begin(float freq, float bw, uint8_t sf, uint8_t cr, uint8_t syncWord, int8_t power, uint16_t preambleLength,\n                            uint8_t gain)\n{\n    // execute common part\n    uint8_t rf95versions[2] = {0x12, 0x11};\n    int16_t state = SX127x::begin(rf95versions, sizeof(rf95versions), syncWord, preambleLength);\n    RADIOLIB_ASSERT(state);\n\n    // current limit was removed from module' ctor\n    // override default value (60 mA)\n    state = setCurrentLimit(currentLimit);\n    LOG_DEBUG(\"Current limit set to %f\", currentLimit);\n    LOG_DEBUG(\"Current limit set result %d\", state);\n\n    // configure settings not accessible by API\n    // state = config();\n    RADIOLIB_ASSERT(state);\n\n#ifdef RF95_TCXO\n    state = _mod->SPIsetRegValue(RADIOLIB_SX127X_REG_TCXO, 0x10 | _mod->SPIgetRegValue(RADIOLIB_SX127X_REG_TCXO));\n    RADIOLIB_ASSERT(state);\n#endif\n\n    // configure publicly accessible settings\n    state = setFrequency(freq);\n    RADIOLIB_ASSERT(state);\n\n    state = setBandwidth(bw);\n    RADIOLIB_ASSERT(state);\n\n    state = setSpreadingFactor(sf);\n    RADIOLIB_ASSERT(state);\n\n    state = setCodingRate(cr);\n    RADIOLIB_ASSERT(state);\n\n#ifdef USE_RF95_RFO\n    state = setOutputPower(power, true);\n#else\n    state = setOutputPower(power);\n#endif\n    RADIOLIB_ASSERT(state);\n\n    state = setGain(gain);\n\n    return (state);\n}\n\nint16_t RadioLibRF95::setFrequency(float freq)\n{\n    // RADIOLIB_CHECK_RANGE(freq, 862.0, 1020.0, ERR_INVALID_FREQUENCY);\n\n    // set frequency\n    return (SX127x::setFrequencyRaw(freq));\n}\n\n#define RH_RF95_MODEM_STATUS_CLEAR 0x10\n#define RH_RF95_MODEM_STATUS_HEADER_INFO_VALID 0x08\n#define RH_RF95_MODEM_STATUS_RX_ONGOING 0x04\n#define RH_RF95_MODEM_STATUS_SIGNAL_SYNCHRONIZED 0x02\n#define RH_RF95_MODEM_STATUS_SIGNAL_DETECTED 0x01\n\nbool RadioLibRF95::isReceiving()\n{\n    // 0x0b == Look for header info valid, signal synchronized or signal detected\n    uint8_t reg = readReg(RADIOLIB_SX127X_REG_MODEM_STAT);\n    // Serial.printf(\"reg %x\", reg);\n    return (reg & (RH_RF95_MODEM_STATUS_SIGNAL_DETECTED | RH_RF95_MODEM_STATUS_SIGNAL_SYNCHRONIZED |\n                   RH_RF95_MODEM_STATUS_HEADER_INFO_VALID)) != 0;\n}\n\nuint8_t RadioLibRF95::readReg(uint8_t addr)\n{\n    Module *mod = this->getMod();\n    return mod->SPIreadRegister(addr);\n}\n#endif"
  },
  {
    "path": "src/mesh/RadioLibRF95.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_SX127X != 1\n#include <RadioLib.h>\n\n/*!\n  \\class RFM95\n\n  \\brief Derived class for %RFM95 modules. Overrides some methods from SX1278 due to different parameter ranges.\n*/\nclass RadioLibRF95 : public SX1278\n{\n  public:\n    // constructor\n\n    /*!\n      \\brief Default constructor. Called from Arduino sketch when creating new LoRa instance.\n\n      \\param mod Instance of Module that will be used to communicate with the %LoRa chip.\n    */\n    explicit RadioLibRF95(Module *mod);\n\n    // basic methods\n\n    /*!\n      \\brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module.\n\n      \\param freq Carrier frequency in MHz. Allowed values range from 868.0 MHz to 915.0 MHz.\n\n      \\param bw %LoRa link bandwidth in kHz. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz.\n\n      \\param sf %LoRa link spreading factor. Allowed values range from 6 to 12.\n\n      \\param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8.\n\n      \\param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN\n      networks.\n\n      \\param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm.\n\n      \\param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer\n      than the set number. Allowed values range from 6 to 65535.\n\n      \\param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest\n      gain. Set to 0 to enable automatic gain control (recommended).\n\n      \\returns \\ref status_codes\n    */\n    int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7,\n                  uint8_t syncWord = RADIOLIB_SX127X_SYNC_WORD, int8_t power = 17, uint16_t preambleLength = 8, uint8_t gain = 0);\n\n    // configuration methods\n\n    /*!\n      \\brief Sets carrier frequency. Allowed values range from 868.0 MHz to 915.0 MHz.\n\n      \\param freq Carrier frequency to be set in MHz.\n\n      \\returns \\ref status_codes\n    */\n    int16_t setFrequency(float freq);\n\n    // Return true if we are actively receiving a message currently\n    bool isReceiving();\n\n    /// For debugging\n    uint8_t readReg(uint8_t addr);\n\n  protected:\n    // since default current limit for SX126x/127x in updated RadioLib is 60mA\n    // use the previous value\n    float currentLimit = 100;\n};\n#endif"
  },
  {
    "path": "src/mesh/ReliableRouter.cpp",
    "content": "#include \"ReliableRouter.h\"\n#include \"Default.h\"\n#include \"MeshTypes.h\"\n#include \"NodeDB.h\"\n#include \"configuration.h\"\n#include \"memGet.h\"\n#include \"mesh-pb-constants.h\"\n#include \"modules/NodeInfoModule.h\"\n#include \"modules/RoutingModule.h\"\n\n// ReliableRouter::ReliableRouter() {}\n\n/**\n * If the message is want_ack, then add it to a list of packets to retransmit.\n * If we run out of retransmissions, send a nak packet towards the original client to indicate failure.\n */\nErrorCode ReliableRouter::send(meshtastic_MeshPacket *p)\n{\n    if (p->want_ack) {\n        DEBUG_HEAP_BEFORE;\n        auto copy = packetPool.allocCopy(*p);\n        DEBUG_HEAP_AFTER(\"ReliableRouter::send\", copy);\n\n        startRetransmission(copy, NUM_RELIABLE_RETX);\n    }\n\n    /* If we have pending retransmissions, add the airtime of this packet to it, because during that time we cannot receive an\n       (implicit) ACK. Otherwise, we might retransmit too early.\n     */\n    for (auto i = pending.begin(); i != pending.end(); i++) {\n        if (i->first.id != p->id) {\n            i->second.nextTxMsec += iface->getPacketTime(p);\n        }\n    }\n\n    return isBroadcast(p->to) ? FloodingRouter::send(p) : NextHopRouter::send(p);\n}\n\nbool ReliableRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)\n{\n    // Note: do not use getFrom() here, because we want to ignore messages sent from phone\n    if (p->from == getNodeNum()) {\n        printPacket(\"Rx someone rebroadcasting for us\", p);\n\n        // We are seeing someone rebroadcast one of our broadcast attempts.\n        // If this is the first time we saw this, cancel any retransmissions we have queued up and generate an internal ack for\n        // the original sending process.\n\n        // This \"optimization\", does save lots of airtime. For DMs, you also get a real ACK back\n        // from the intended recipient.\n        auto key = GlobalPacketId(getFrom(p), p->id);\n        auto old = findPendingPacket(key);\n        if (old) {\n            LOG_DEBUG(\"Generate implicit ack\");\n            // NOTE: we do NOT check p->wantAck here because p is the INCOMING rebroadcast and that packet is not expected to be\n            // marked as wantAck\n            sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, old->packet->channel);\n\n            // Only stop retransmissions if the rebroadcast came via LoRa\n            if (p->transport_mechanism == meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA) {\n                stopRetransmission(key);\n            }\n        } else {\n            LOG_DEBUG(\"Didn't find pending packet\");\n        }\n    }\n\n    /* At this point we have already deleted the pending retransmission if this packet was an (implicit) ACK to it.\n       Now for all other pending retransmissions, we have to add the airtime of this received packet to the retransmission timer,\n       because while receiving this packet, we could not have received an (implicit) ACK for it.\n       If we don't add this, we will likely retransmit too early.\n    */\n    for (auto i = pending.begin(); i != pending.end(); i++) {\n        i->second.nextTxMsec += iface->getPacketTime(p, true);\n    }\n\n    return isBroadcast(p->to) ? FloodingRouter::shouldFilterReceived(p) : NextHopRouter::shouldFilterReceived(p);\n}\n\n/**\n * If we receive a want_ack packet (do not check for wasSeenRecently), send back an ack (this might generate multiple ack sends in\n * case the our first ack gets lost)\n *\n * If we receive an ack packet (do check wasSeenRecently), clear out any retransmissions and\n * forward the ack to the application layer.\n *\n * If we receive a nak packet (do check wasSeenRecently), clear out any retransmissions\n * and forward the nak to the application layer.\n *\n * Otherwise, let superclass handle it.\n */\nvoid ReliableRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)\n{\n    if (isToUs(p)) { // ignore ack/nak/want_ack packets that are not address to us (we only handle 0 hop reliability)\n        if (!MeshModule::currentReply) {\n            if (p->want_ack) {\n                if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n                    /* A response may be set to want_ack for retransmissions, but we don't need to ACK a response if it received\n                      an implicit ACK already. If we received it directly or via NextHopRouter, only ACK with a hop limit of 0 to\n                      make sure the other side stops retransmitting. */\n\n                    if (shouldSuccessAckWithWantAck(p)) {\n                        // If this packet should always be ACKed reliably with want_ack back to the original sender, make sure we\n                        // do that unconditionally.\n                        sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel,\n                                   routingModule->getHopLimitForResponse(*p), true);\n                    } else if (!p->decoded.request_id && !p->decoded.reply_id) {\n                        // If it's not an ACK or a reply, send an ACK.\n                        sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel,\n                                   routingModule->getHopLimitForResponse(*p));\n                    } else if ((getHopsAway(*p) == 0) || p->next_hop != NO_NEXT_HOP_PREFERENCE) {\n                        // If we received the packet directly from the original sender, send a 0-hop ACK since the original sender\n                        // won't overhear any implicit ACKs. If we received the packet via NextHopRouter, also send a 0-hop ACK to\n                        // stop the immediate relayer's retransmissions.\n                        sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel, 0);\n                    }\n                } else if (p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag && p->channel == 0 &&\n                           (nodeDB->getMeshNode(p->from) == nullptr || nodeDB->getMeshNode(p->from)->user.public_key.size == 0)) {\n                    LOG_INFO(\"PKI packet from unknown node, send PKI_UNKNOWN_PUBKEY\");\n                    sendAckNak(meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY, getFrom(p), p->id, channels.getPrimaryIndex(),\n                               routingModule->getHopLimitForResponse(*p));\n                } else {\n                    // Send a 'NO_CHANNEL' error on the primary channel if want_ack packet destined for us cannot be decoded\n                    sendAckNak(meshtastic_Routing_Error_NO_CHANNEL, getFrom(p), p->id, channels.getPrimaryIndex(),\n                               routingModule->getHopLimitForResponse(*p));\n                }\n            } else if (p->next_hop == nodeDB->getLastByteOfNodeNum(getNodeNum()) && p->hop_limit > 0) {\n                // No wantAck, but we need to ACK with hop limit of 0 if we were the next hop to stop their retransmissions\n                sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel, 0);\n            }\n        } else {\n            LOG_DEBUG(\"Another module replied to this message, no need for 2nd ack\");\n        }\n        if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag && c &&\n            c->error_reason == meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY) {\n            if (owner.public_key.size == 32) {\n                LOG_INFO(\"PKI decrypt failure, send a NodeInfo\");\n                nodeInfoModule->sendOurNodeInfo(p->from, false, p->channel, true);\n            }\n        }\n        // We consider an ack to be either a !routing packet with a request ID or a routing packet with !error\n        PacketId ackId = ((c && c->error_reason == meshtastic_Routing_Error_NONE) || !c) ? p->decoded.request_id : 0;\n\n        // A nak is a routing packt that has an  error code\n        PacketId nakId = (c && c->error_reason != meshtastic_Routing_Error_NONE) ? p->decoded.request_id : 0;\n\n        // We intentionally don't check wasSeenRecently, because it is harmless to delete non existent retransmission records\n        if ((ackId || nakId) &&\n            // Implicit ACKs from MQTT should not stop retransmissions\n            !(isFromUs(p) && p->transport_mechanism == meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MQTT)) {\n            LOG_DEBUG(\"Received a %s for 0x%x, stopping retransmissions\", ackId ? \"ACK\" : \"NAK\", ackId);\n            if (ackId) {\n                stopRetransmission(p->to, ackId);\n            } else {\n                stopRetransmission(p->to, nakId);\n            }\n        }\n    }\n\n    // handle the packet as normal\n    isBroadcast(p->to) ? FloodingRouter::sniffReceived(p, c) : NextHopRouter::sniffReceived(p, c);\n}\n\n/**\n * If we ACK this packet, should we set want_ack=true on the ACK for reliable delivery of the ACK packet?\n */\nbool ReliableRouter::shouldSuccessAckWithWantAck(const meshtastic_MeshPacket *p)\n{\n    // Don't ACK-with-want-ACK outgoing packets\n    if (isFromUs(p))\n        return false;\n\n    // Only ACK-with-want-ACK if the original packet asked for want_ack\n    if (!p->want_ack)\n        return false;\n\n    // Only ACK-with-want-ACK packets to us (not broadcast)\n    if (!isToUs(p))\n        return false;\n\n    // Special case for text message DMs:\n    bool isTextMessage =\n        (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) &&\n        IS_ONE_OF(p->decoded.portnum, meshtastic_PortNum_TEXT_MESSAGE_APP, meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP);\n\n    if (isTextMessage) {\n        // If it's a non-broadcast text message, and the original asked for want_ack,\n        // let's send an ACK that is itself want_ack to improve reliability of confirming delivery back to the sender.\n        // This should include all DMs regardless of whether or not reply_id is set.\n        return true;\n    }\n\n    return false;\n}"
  },
  {
    "path": "src/mesh/ReliableRouter.h",
    "content": "#pragma once\n\n#include \"NextHopRouter.h\"\n\n/**\n * This is a mixin that extends Router with the ability to do (one hop only) reliable message sends.\n */\nclass ReliableRouter : public NextHopRouter\n{\n  public:\n    /**\n     * Constructor\n     *\n     */\n    // ReliableRouter();\n\n    /**\n     * Send a packet on a suitable interface.  This routine will\n     * later free() the packet to pool.  This routine is not allowed to stall.\n     * If the txmit queue is full it might return an error\n     */\n    virtual ErrorCode send(meshtastic_MeshPacket *p) override;\n\n  protected:\n    /**\n     * Look for acks/naks or someone retransmitting us\n     */\n    virtual void sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c) override;\n\n    /**\n     * We hook this method so we can see packets before FloodingRouter says they should be discarded\n     */\n    virtual bool shouldFilterReceived(const meshtastic_MeshPacket *p) override;\n\n  private:\n    /**\n     * Should this packet be ACKed with a want_ack for reliable delivery?\n     */\n    bool shouldSuccessAckWithWantAck(const meshtastic_MeshPacket *p);\n};"
  },
  {
    "path": "src/mesh/Router.cpp",
    "content": "#include \"Router.h\"\n#include \"Channels.h\"\n#include \"CryptoEngine.h\"\n#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"mesh-pb-constants.h\"\n#include \"meshUtils.h\"\n#include \"modules/RoutingModule.h\"\n#if HAS_TRAFFIC_MANAGEMENT\n#include \"modules/TrafficManagementModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_MQTT\n#include \"mqtt/MQTT.h\"\n#endif\n#include \"Default.h\"\n#if ARCH_PORTDUINO\n#include \"Throttle.h\"\n#include \"platform/portduino/PortduinoGlue.h\"\n#endif\n#if ENABLE_JSON_LOGGING || ARCH_PORTDUINO\n#include \"serialization/MeshPacketSerializer.h\"\n#endif\n\n#define MAX_RX_FROMRADIO                                                                                                         \\\n    4 // max number of packets destined to our queue, we dispatch packets quickly so it doesn't need to be big\n\n// I think this is right, one packet for each of the three fifos + one packet being currently assembled for TX or RX\n// And every TX packet might have a retransmission packet or an ack alive at any moment\n\n#ifdef ARCH_PORTDUINO\n// Portduino (native) targets can use dynamic memory pools with runtime-configurable sizes\n#define MAX_PACKETS                                                                                                              \\\n    (MAX_RX_TOPHONE + MAX_RX_FROMRADIO + 2 * MAX_TX_QUEUE +                                                                      \\\n     2) // max number of packets which can be in flight (either queued from reception or queued for sending)\n\nstatic MemoryDynamic<meshtastic_MeshPacket> dynamicPool;\nAllocator<meshtastic_MeshPacket> &packetPool = dynamicPool;\n#elif defined(ARCH_STM32WL) || defined(BOARD_HAS_PSRAM)\n// On STM32 and boards with PSRAM, there isn't enough heap left over for the rest of the firmware if we allocate this statically.\n// For now, make it dynamic again.\n#define MAX_PACKETS                                                                                                              \\\n    (MAX_RX_TOPHONE + MAX_RX_FROMRADIO + 2 * MAX_TX_QUEUE +                                                                      \\\n     2) // max number of packets which can be in flight (either queued from reception or queued for sending)\n\nstatic MemoryDynamic<meshtastic_MeshPacket> dynamicPool;\nAllocator<meshtastic_MeshPacket> &packetPool = dynamicPool;\n#else\n// Embedded targets use static memory pools with compile-time constants\n#define MAX_PACKETS_STATIC                                                                                                       \\\n    (MAX_RX_TOPHONE + MAX_RX_FROMRADIO + 2 * MAX_TX_QUEUE +                                                                      \\\n     2) // max number of packets which can be in flight (either queued from reception or queued for sending)\n\nstatic MemoryPool<meshtastic_MeshPacket, MAX_PACKETS_STATIC> staticPool;\nAllocator<meshtastic_MeshPacket> &packetPool = staticPool;\n#endif\n\nstatic uint8_t bytes[MAX_LORA_PAYLOAD_LEN + 1] __attribute__((__aligned__));\n\n/**\n * Constructor\n *\n * Currently we only allow one interface, that may change in the future\n */\nRouter::Router() : concurrency::OSThread(\"Router\"), fromRadioQueue(MAX_RX_FROMRADIO)\n{\n    // This is called pre main(), don't touch anything here, the following code is not safe\n\n    /* LOG_DEBUG(\"Size of NodeInfo %d\", sizeof(NodeInfo));\n    LOG_DEBUG(\"Size of SubPacket %d\", sizeof(SubPacket));\n    LOG_DEBUG(\"Size of MeshPacket %d\", sizeof(MeshPacket)); */\n\n    fromRadioQueue.setReader(this);\n\n    // init Lockguard for crypt operations\n    assert(!cryptLock);\n    cryptLock = new concurrency::Lock();\n}\n\nbool Router::shouldDecrementHopLimit(const meshtastic_MeshPacket *p)\n{\n    // First hop MUST always decrement to prevent retry issues\n    if (getHopsAway(*p) == 0) {\n        return true; // Always decrement on first hop\n    }\n\n    // Check if both local device and previous relay are routers (including CLIENT_BASE)\n    bool localIsRouter =\n        IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_ROUTER, meshtastic_Config_DeviceConfig_Role_ROUTER_LATE,\n                  meshtastic_Config_DeviceConfig_Role_CLIENT_BASE);\n\n    // If local device isn't a router, always decrement\n    if (!localIsRouter) {\n        return true;\n    }\n\n#if HAS_TRAFFIC_MANAGEMENT\n    // When router_preserve_hops is enabled, preserve hops for decoded packets that are not\n    // position or telemetry (those have their own exhaust_hop controls).\n    if (moduleConfig.has_traffic_management && moduleConfig.traffic_management.enabled &&\n        moduleConfig.traffic_management.router_preserve_hops && p->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&\n        p->decoded.portnum != meshtastic_PortNum_POSITION_APP && p->decoded.portnum != meshtastic_PortNum_TELEMETRY_APP) {\n        LOG_DEBUG(\"Router hop preserved: port=%d from=0x%08x (traffic_management)\", p->decoded.portnum, getFrom(p));\n        if (trafficManagementModule) {\n            trafficManagementModule->recordRouterHopPreserved();\n        }\n        return false;\n    }\n#endif\n\n    // For subsequent hops, check if previous relay is a favorite router\n    // Optimized search for favorite routers with matching last byte\n    // Check ordering optimized for IoT devices (cheapest checks first)\n    for (size_t i = 0; i < nodeDB->getNumMeshNodes(); i++) {\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n        if (!node)\n            continue;\n\n        // Check 1: is_favorite (cheapest - single bool)\n        if (!node->is_favorite)\n            continue;\n\n        // Check 2: has_user (cheap - single bool)\n        if (!node->has_user)\n            continue;\n\n        // Check 3: role check (moderate cost - multiple comparisons)\n        if (!IS_ONE_OF(node->user.role, meshtastic_Config_DeviceConfig_Role_ROUTER,\n                       meshtastic_Config_DeviceConfig_Role_ROUTER_LATE, meshtastic_Config_DeviceConfig_Role_CLIENT_BASE)) {\n            continue;\n        }\n\n        // Check 4: last byte extraction and comparison (most expensive)\n        if (nodeDB->getLastByteOfNodeNum(node->num) == p->relay_node) {\n            // Found a favorite router match\n            LOG_DEBUG(\"Identified favorite relay router 0x%x from last byte 0x%x\", node->num, p->relay_node);\n            return false; // Don't decrement hop_limit\n        }\n    }\n\n    // No favorite router match found, decrement hop_limit\n    return true;\n}\n\n/**\n * do idle processing\n * Mostly looking in our incoming rxPacket queue and calling handleReceived.\n */\nint32_t Router::runOnce()\n{\n    meshtastic_MeshPacket *mp;\n    while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL) {\n        // printPacket(\"handle fromRadioQ\", mp);\n        perhapsHandleReceived(mp);\n    }\n\n    // LOG_DEBUG(\"Sleep forever!\");\n    return INT32_MAX; // Wait a long time - until we get woken for the message queue\n}\n\n/**\n * RadioInterface calls this to queue up packets that have been received from the radio.  The router is now responsible for\n * freeing the packet\n */\nvoid Router::enqueueReceivedMessage(meshtastic_MeshPacket *p)\n{\n    // Try enqueue until successful\n    while (!fromRadioQueue.enqueue(p, 0)) {\n        meshtastic_MeshPacket *old_p;\n        old_p = fromRadioQueue.dequeuePtr(0); // Dequeue and discard the oldest packet\n        if (old_p) {\n            printPacket(\"fromRadioQ full, drop oldest!\", old_p);\n            packetPool.release(old_p);\n        }\n    }\n    // Nasty hack because our threading is primitive.  interfaces shouldn't need to know about routers FIXME\n    setReceivedMessage();\n}\n\n/// Generate a unique packet id\n// FIXME, move this someplace better\nPacketId generatePacketId()\n{\n    static uint32_t rollingPacketId; // Note: trying to keep this in noinit didn't help for working across reboots\n    static bool didInit = false;\n\n    if (!didInit) {\n        didInit = true;\n\n        // pick a random initial sequence number at boot (to prevent repeated reboots always starting at 0)\n        // Note: we mask the high order bit to ensure that we never pass a 'negative' number to random\n        rollingPacketId = random(UINT32_MAX & 0x7fffffff);\n        LOG_DEBUG(\"Initial packet id %u\", rollingPacketId);\n    }\n\n    rollingPacketId++;\n\n    rollingPacketId &= ID_COUNTER_MASK;                                    // Mask out the top 22 bits\n    PacketId id = rollingPacketId | random(UINT32_MAX & 0x7fffffff) << 10; // top 22 bits\n    LOG_DEBUG(\"Partially randomized packet id %u\", id);\n    return id;\n}\n\nmeshtastic_MeshPacket *Router::allocForSending()\n{\n    meshtastic_MeshPacket *p = packetPool.allocZeroed();\n\n    p->which_payload_variant = meshtastic_MeshPacket_decoded_tag; // Assume payload is decoded at start.\n    p->from = nodeDB->getNodeNum();\n    p->to = NODENUM_BROADCAST;\n    p->hop_limit = Default::getConfiguredOrDefaultHopLimit(config.lora.hop_limit);\n    p->id = generatePacketId();\n    p->rx_time =\n        getValidTime(RTCQualityFromNet); // Just in case we process the packet locally - make sure it has a valid timestamp\n\n    return p;\n}\n\n/**\n * Send an ack or a nak packet back towards whoever sent idFrom\n */\nvoid Router::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit,\n                        bool ackWantsAck)\n{\n    routingModule->sendAckNak(err, to, idFrom, chIndex, hopLimit, ackWantsAck);\n}\n\nvoid Router::abortSendAndNak(meshtastic_Routing_Error err, meshtastic_MeshPacket *p)\n{\n    LOG_ERROR(\"Error=%d, return NAK and drop packet\", err);\n    sendAckNak(err, getFrom(p), p->id, p->channel);\n    packetPool.release(p);\n}\n\nvoid Router::setReceivedMessage()\n{\n    // LOG_DEBUG(\"set interval to ASAP\");\n    setInterval(0); // Run ASAP, so we can figure out our correct sleep time\n    runASAP = true;\n}\n\nmeshtastic_QueueStatus Router::getQueueStatus()\n{\n    if (!iface) {\n        meshtastic_QueueStatus qs;\n        qs.res = qs.mesh_packet_id = qs.free = qs.maxlen = 0;\n        return qs;\n    } else\n        return iface->getQueueStatus();\n}\n\nErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)\n{\n    if (p->to == 0) {\n        LOG_ERROR(\"Packet received with to: of 0!\");\n    }\n    // No need to deliver externally if the destination is the local node\n    if (isToUs(p)) {\n        printPacket(\"Enqueued local\", p);\n        enqueueReceivedMessage(p);\n        return ERRNO_OK;\n    } else if (!iface) {\n        // We must be sending to remote nodes also, fail if no interface found\n        abortSendAndNak(meshtastic_Routing_Error_NO_INTERFACE, p);\n\n        return ERRNO_NO_INTERFACES;\n    } else {\n        // If we are sending a broadcast, we also treat it as if we just received it ourself\n        // this allows local apps (and PCs) to see broadcasts sourced locally\n        if (isBroadcast(p->to)) {\n            handleReceived(p, src);\n        }\n\n        // don't override if a channel was requested and no need to set it when PKI is enforced\n        if (!p->channel && !p->pki_encrypted && !isBroadcast(p->to)) {\n            meshtastic_NodeInfoLite const *node = nodeDB->getMeshNode(p->to);\n            if (node) {\n                p->channel = node->channel;\n                LOG_DEBUG(\"localSend to channel %d\", p->channel);\n            }\n        }\n\n        // If someone asks for acks on broadcast, we need the hop limit to be at least one, so that first node that receives our\n        // message will rebroadcast.  But asking for hop_limit 0 in that context means the client app has no preference on hop\n        // counts and we want this message to get through the whole mesh, so use the default.\n        if (src == RX_SRC_USER && p->want_ack && p->hop_limit == 0) {\n            p->hop_limit = Default::getConfiguredOrDefaultHopLimit(config.lora.hop_limit);\n        }\n\n        return send(p);\n    }\n}\n/**\n * Send a packet on a suitable interface.\n */\nErrorCode Router::rawSend(meshtastic_MeshPacket *p)\n{\n    assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside)\n    return iface->send(p);\n}\n\n/**\n * Send a packet on a suitable interface.  This routine will\n * later free() the packet to pool.  This routine is not allowed to stall.\n * If the txmit queue is full it might return an error.\n */\nErrorCode Router::send(meshtastic_MeshPacket *p)\n{\n    if (isToUs(p)) {\n        LOG_ERROR(\"BUG! send() called with packet destined for local node!\");\n        packetPool.release(p);\n        return meshtastic_Routing_Error_BAD_REQUEST;\n    } // should have already been handled by sendLocal\n\n    // Abort sending if we are violating the duty cycle\n    if (!config.lora.override_duty_cycle && myRegion->dutyCycle < 100) {\n        float hourlyTxPercent = airTime->utilizationTXPercent();\n        if (hourlyTxPercent > myRegion->dutyCycle) {\n            uint8_t silentMinutes = airTime->getSilentMinutes(hourlyTxPercent, myRegion->dutyCycle);\n\n            LOG_WARN(\"Duty cycle limit exceeded. Aborting send for now, you can send again in %d mins\", silentMinutes);\n\n            meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n            cn->has_reply_id = true;\n            cn->reply_id = p->id;\n            cn->level = meshtastic_LogRecord_Level_WARNING;\n            cn->time = getValidTime(RTCQualityFromNet);\n            sprintf(cn->message, \"Duty cycle limit exceeded. You can send again in %d mins\", silentMinutes);\n            service->sendClientNotification(cn);\n\n            meshtastic_Routing_Error err = meshtastic_Routing_Error_DUTY_CYCLE_LIMIT;\n            if (isFromUs(p)) { // only send NAK to API, not to the mesh\n                abortSendAndNak(err, p);\n            } else {\n                packetPool.release(p);\n            }\n            return err;\n        }\n    }\n\n    // PacketId nakId = p->decoded.which_ackVariant == SubPacket_fail_id_tag ? p->decoded.ackVariant.fail_id : 0;\n    // assert(!nakId); // I don't think we ever send 0hop naks over the wire (other than to the phone), test that assumption with\n    // assert\n\n    // Never set the want_ack flag on broadcast packets sent over the air.\n    if (isBroadcast(p->to))\n        p->want_ack = false;\n\n    // Up until this point we might have been using 0 for the from address (if it started with the phone), but when we send over\n    // the lora we need to make sure we have replaced it with our local address\n    p->from = getFrom(p);\n\n    p->relay_node = nodeDB->getLastByteOfNodeNum(getNodeNum()); // set the relayer to us\n    // If we are the original transmitter, set the hop limit with which we start\n    if (isFromUs(p))\n        p->hop_start = p->hop_limit;\n\n    // If the packet hasn't yet been encrypted, do so now (it might already be encrypted if we are just forwarding it)\n\n    if (!(p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag ||\n          p->which_payload_variant == meshtastic_MeshPacket_decoded_tag)) {\n        return meshtastic_Routing_Error_BAD_REQUEST;\n    }\n\n    fixPriority(p); // Before encryption, fix the priority if it's unset\n\n    // If the packet is not yet encrypted, do so now\n    if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it\n\n        DEBUG_HEAP_BEFORE;\n        meshtastic_MeshPacket *p_decoded = packetPool.allocCopy(*p);\n        DEBUG_HEAP_AFTER(\"Router::send\", p_decoded);\n\n        auto encodeResult = perhapsEncode(p);\n        if (encodeResult != meshtastic_Routing_Error_NONE) {\n            packetPool.release(p_decoded);\n            p->channel = 0; // Reset the channel to 0, so we don't use the failing hash again\n            abortSendAndNak(encodeResult, p);\n            return encodeResult; // FIXME - this isn't a valid ErrorCode\n        }\n#if !MESHTASTIC_EXCLUDE_MQTT\n        // Only publish to MQTT if we're the original transmitter of the packet\n        if (moduleConfig.mqtt.enabled && isFromUs(p) && mqtt) {\n            mqtt->onSend(*p, *p_decoded, chIndex);\n        }\n#endif\n        packetPool.release(p_decoded);\n    }\n\n#if HAS_UDP_MULTICAST\n    if (udpHandler && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {\n        udpHandler->onSend(const_cast<meshtastic_MeshPacket *>(p));\n    }\n#endif\n\n    assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside)\n    return iface->send(p);\n}\n\n/** Attempt to cancel a previously sent packet.  Returns true if a packet was found we could cancel */\nbool Router::cancelSending(NodeNum from, PacketId id)\n{\n    if (iface && iface->cancelSending(from, id)) {\n        // We are not a relayer of this packet anymore\n        removeRelayer(nodeDB->getLastByteOfNodeNum(nodeDB->getNodeNum()), id, from);\n        return true;\n    }\n    return false;\n}\n\n/** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */\nbool Router::findInTxQueue(NodeNum from, PacketId id)\n{\n    return iface->findInTxQueue(from, id);\n}\n\n/**\n * Every (non duplicate) packet this node receives will be passed through this method.  This allows subclasses to\n * update routing tables etc... based on what we overhear (even for messages not destined to our node)\n */\nvoid Router::sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c)\n{\n    // FIXME, update nodedb here for any packet that passes through us\n}\n\nDecodeState perhapsDecode(meshtastic_MeshPacket *p)\n{\n    concurrency::LockGuard g(cryptLock);\n\n    if (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_KNOWN_ONLY &&\n        (nodeDB->getMeshNode(p->from) == NULL || !nodeDB->getMeshNode(p->from)->has_user)) {\n        LOG_DEBUG(\"Node 0x%x not in nodeDB-> Rebroadcast mode KNOWN_ONLY will ignore packet\", p->from);\n        return DecodeState::DECODE_FAILURE;\n    }\n\n    if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag)\n        return DecodeState::DECODE_SUCCESS; // If packet was already decoded just return\n\n    size_t rawSize = p->encrypted.size;\n    if (rawSize > sizeof(bytes)) {\n        LOG_ERROR(\"Packet too large to attempt decryption! (rawSize=%d > 256)\", rawSize);\n        return DecodeState::DECODE_FATAL;\n    }\n    bool decrypted = false;\n    ChannelIndex chIndex = 0;\n#if !(MESHTASTIC_EXCLUDE_PKI)\n    // Attempt PKI decryption first\n    if (p->channel == 0 && isToUs(p) && p->to > 0 && !isBroadcast(p->to) && nodeDB->getMeshNode(p->from) != nullptr &&\n        nodeDB->getMeshNode(p->from)->user.public_key.size > 0 && nodeDB->getMeshNode(p->to)->user.public_key.size > 0 &&\n        rawSize > MESHTASTIC_PKC_OVERHEAD) {\n        LOG_DEBUG(\"Attempt PKI decryption\");\n\n        if (crypto->decryptCurve25519(p->from, nodeDB->getMeshNode(p->from)->user.public_key, p->id, rawSize, p->encrypted.bytes,\n                                      bytes)) {\n            LOG_INFO(\"PKI Decryption worked!\");\n\n            meshtastic_Data decodedtmp;\n            memset(&decodedtmp, 0, sizeof(decodedtmp));\n            rawSize -= MESHTASTIC_PKC_OVERHEAD;\n            if (pb_decode_from_bytes(bytes, rawSize, &meshtastic_Data_msg, &decodedtmp) &&\n                decodedtmp.portnum != meshtastic_PortNum_UNKNOWN_APP) {\n                decrypted = true;\n                LOG_INFO(\"Packet decrypted using PKI!\");\n                p->pki_encrypted = true;\n                memcpy(&p->public_key.bytes, nodeDB->getMeshNode(p->from)->user.public_key.bytes, 32);\n                p->public_key.size = 32;\n                p->decoded = decodedtmp;\n                p->which_payload_variant = meshtastic_MeshPacket_decoded_tag; // change type to decoded\n            } else {\n                LOG_ERROR(\"PKC Decrypted, but pb_decode failed!\");\n                return DecodeState::DECODE_FAILURE;\n            }\n        } else {\n            LOG_WARN(\"PKC decrypt attempted but failed!\");\n        }\n    }\n#endif\n\n    // assert(p->which_payloadVariant == MeshPacket_encrypted_tag);\n    if (!decrypted) {\n        // Try to find a channel that works with this hash\n        for (chIndex = 0; chIndex < channels.getNumChannels(); chIndex++) {\n            // Try to use this hash/channel pair\n            if (channels.decryptForHash(chIndex, p->channel)) {\n                // we have to copy into a scratch buffer, because these bytes are a union with the decoded protobuf. Create a\n                // fresh copy for each decrypt attempt.\n                memcpy(bytes, p->encrypted.bytes, rawSize);\n                // Try to decrypt the packet if we can\n                crypto->decrypt(p->from, p->id, rawSize, bytes);\n\n                // printBytes(\"plaintext\", bytes, p->encrypted.size);\n\n                // Take those raw bytes and convert them back into a well structured protobuf we can understand\n                meshtastic_Data decodedtmp;\n                memset(&decodedtmp, 0, sizeof(decodedtmp));\n                if (!pb_decode_from_bytes(bytes, rawSize, &meshtastic_Data_msg, &decodedtmp)) {\n                    LOG_ERROR(\"Invalid protobufs in received mesh packet id=0x%08x (bad psk?)!\", p->id);\n                } else if (decodedtmp.portnum == meshtastic_PortNum_UNKNOWN_APP) {\n                    LOG_ERROR(\"Invalid portnum (bad psk?)!\");\n#if !(MESHTASTIC_EXCLUDE_PKI)\n                } else if (!owner.is_licensed && isToUs(p) && decodedtmp.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) {\n                    LOG_WARN(\"Rejecting legacy DM\");\n                    return DecodeState::DECODE_FAILURE;\n#endif\n                } else {\n                    p->decoded = decodedtmp;\n                    p->which_payload_variant = meshtastic_MeshPacket_decoded_tag; // change type to decoded\n                    decrypted = true;\n                    break;\n                }\n            }\n        }\n    }\n\n    if (decrypted) {\n        // parsing was successful\n        p->channel = chIndex; // change to store the index instead of the hash\n        if (p->decoded.has_bitfield)\n            p->decoded.want_response |= p->decoded.bitfield & BITFIELD_WANT_RESPONSE_MASK;\n\n        /* Not actually ever used.\n        // Decompress if needed. jm\n        if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP) {\n            // Decompress the payload\n            char compressed_in[meshtastic_Constants_DATA_PAYLOAD_LEN] = {};\n            char decompressed_out[meshtastic_Constants_DATA_PAYLOAD_LEN] = {};\n            int decompressed_len;\n\n            memcpy(compressed_in, p->decoded.payload.bytes, p->decoded.payload.size);\n\n            decompressed_len = unishox2_decompress_simple(compressed_in, p->decoded.payload.size, decompressed_out);\n\n            // LOG_DEBUG(\"**Decompressed length - %d \", decompressed_len);\n\n            memcpy(p->decoded.payload.bytes, decompressed_out, decompressed_len);\n\n            // Switch the port from PortNum_TEXT_MESSAGE_COMPRESSED_APP to PortNum_TEXT_MESSAGE_APP\n            p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP;\n        } */\n\n        printPacket(\"decoded message\", p);\n#if ENABLE_JSON_LOGGING\n        LOG_TRACE(\"%s\", MeshPacketSerializer::JsonSerialize(p, false).c_str());\n#elif ARCH_PORTDUINO\n        if (portduino_config.traceFilename != \"\" || portduino_config.logoutputlevel == level_trace) {\n            LOG_TRACE(\"%s\", MeshPacketSerializer::JsonSerialize(p, false).c_str());\n        } else if (portduino_config.JSONFilename != \"\") {\n            if (portduino_config.JSONFileRotate != 0) {\n                static uint32_t fileage = 0;\n\n                if (portduino_config.JSONFileRotate != 0 &&\n                    (fileage == 0 || !Throttle::isWithinTimespanMs(fileage, portduino_config.JSONFileRotate * 60 * 1000))) {\n                    time_t timestamp = time(NULL);\n                    struct tm *timeinfo;\n                    char buffer[80];\n                    timeinfo = localtime(&timestamp);\n                    strftime(buffer, 80, \"%Y%m%d-%H%M%S\", timeinfo);\n\n                    std::string datetime(buffer);\n                    if (JSONFile.is_open()) {\n                        JSONFile.close();\n                    }\n                    JSONFile.open(portduino_config.JSONFilename + \"_\" + datetime, std::ios::out | std::ios::app);\n                    fileage = millis();\n                }\n            }\n            if (portduino_config.JSONFilter == (_meshtastic_PortNum)0 || portduino_config.JSONFilter == p->decoded.portnum) {\n                JSONFile << MeshPacketSerializer::JsonSerialize(p, false) << std::endl;\n            }\n        }\n#endif\n        return DecodeState::DECODE_SUCCESS;\n    } else {\n        LOG_WARN(\"No suitable channel found for decoding, hash was 0x%x!\", p->channel);\n        return DecodeState::DECODE_FAILURE;\n    }\n}\n\n/** Return 0 for success or a Routing_Error code for failure\n */\nmeshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p)\n{\n    concurrency::LockGuard g(cryptLock);\n\n    int16_t hash;\n\n    // If the packet is not yet encrypted, do so now\n    if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        if (isFromUs(p)) {\n            p->decoded.has_bitfield = true;\n            p->decoded.bitfield |= (config.lora.config_ok_to_mqtt << BITFIELD_OK_TO_MQTT_SHIFT);\n            p->decoded.bitfield |= (p->decoded.want_response << BITFIELD_WANT_RESPONSE_SHIFT);\n        }\n\n        size_t numbytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_Data_msg, &p->decoded);\n\n        /* Not actually used, so save the cycles\n        //  TODO: Allow modules to opt into compression.\n        if (p->decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) {\n\n            char original_payload[meshtastic_Constants_DATA_PAYLOAD_LEN];\n            memcpy(original_payload, p->decoded.payload.bytes, p->decoded.payload.size);\n\n            char compressed_out[meshtastic_Constants_DATA_PAYLOAD_LEN] = {0};\n\n            int compressed_len;\n            compressed_len = unishox2_compress_simple(original_payload, p->decoded.payload.size, compressed_out);\n\n            LOG_DEBUG(\"Original length - %d \", p->decoded.payload.size);\n            LOG_DEBUG(\"Compressed length - %d \", compressed_len);\n            LOG_DEBUG(\"Original message - %s \", p->decoded.payload.bytes);\n\n            // If the compressed length is greater than or equal to the original size, don't use the compressed form\n            if (compressed_len >= p->decoded.payload.size) {\n\n                LOG_DEBUG(\"Not using compressing message\");\n                // Set the uncompressed payload variant anyway. Shouldn't hurt?\n                // p->decoded.which_payloadVariant = Data_payload_tag;\n\n                // Otherwise we use the compressor\n            } else {\n                LOG_DEBUG(\"Use compressed message\");\n                // Copy the compressed data into the meshpacket\n\n                p->decoded.payload.size = compressed_len;\n                memcpy(p->decoded.payload.bytes, compressed_out, compressed_len);\n\n                p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP;\n            }\n        } */\n\n        if (numbytes + MESHTASTIC_HEADER_LENGTH > MAX_LORA_PAYLOAD_LEN)\n            return meshtastic_Routing_Error_TOO_LARGE;\n\n        // printBytes(\"plaintext\", bytes, numbytes);\n\n        ChannelIndex chIndex = p->channel; // keep as a local because we are about to change it\n\n#if !(MESHTASTIC_EXCLUDE_PKI)\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);\n        // We may want to retool things so we can send a PKC packet when the client specifies a key and nodenum, even if the node\n        // is not in the local nodedb\n        // First, only PKC encrypt packets we are originating\n        if (isFromUs(p) &&\n#if ARCH_PORTDUINO\n            // Sim radio via the cli flag skips PKC\n            !portduino_config.force_simradio &&\n#endif\n            // Don't use PKC with Ham mode\n            !owner.is_licensed &&\n            // Don't use PKC on 'serial' or 'gpio' channels unless explicitly requested\n            !(p->pki_encrypted != true && (strcasecmp(channels.getName(chIndex), Channels::serialChannel) == 0 ||\n                                           strcasecmp(channels.getName(chIndex), Channels::gpioChannel) == 0)) &&\n            // Check for valid keys and single node destination\n            config.security.private_key.size == 32 && !isBroadcast(p->to) &&\n            // Some portnums either make no sense to send with PKC\n            p->decoded.portnum != meshtastic_PortNum_TRACEROUTE_APP && p->decoded.portnum != meshtastic_PortNum_NODEINFO_APP &&\n            p->decoded.portnum != meshtastic_PortNum_ROUTING_APP && p->decoded.portnum != meshtastic_PortNum_POSITION_APP) {\n            LOG_DEBUG(\"Use PKI!\");\n            if (numbytes + MESHTASTIC_HEADER_LENGTH + MESHTASTIC_PKC_OVERHEAD > MAX_LORA_PAYLOAD_LEN)\n                return meshtastic_Routing_Error_TOO_LARGE;\n            // Check for a known public key for the destination\n            if (node == nullptr || node->user.public_key.size != 32) {\n                LOG_WARN(\"Unknown public key for destination node 0x%08x (portnum %d), refusing to send legacy DM\", p->to,\n                         p->decoded.portnum);\n                return meshtastic_Routing_Error_PKI_SEND_FAIL_PUBLIC_KEY;\n            }\n            if (p->pki_encrypted && !memfll(p->public_key.bytes, 0, 32) &&\n                memcmp(p->public_key.bytes, node->user.public_key.bytes, 32) != 0) {\n                LOG_WARN(\"Client public key differs from requested: 0x%02x, stored key begins 0x%02x\", *p->public_key.bytes,\n                         *node->user.public_key.bytes);\n                return meshtastic_Routing_Error_PKI_FAILED;\n            }\n            crypto->encryptCurve25519(p->to, getFrom(p), node->user.public_key, p->id, numbytes, bytes, p->encrypted.bytes);\n            numbytes += MESHTASTIC_PKC_OVERHEAD;\n            p->channel = 0;\n            p->pki_encrypted = true;\n        } else {\n            if (p->pki_encrypted == true) {\n                // Client specifically requested PKI encryption\n                return meshtastic_Routing_Error_PKI_FAILED;\n            }\n            hash = channels.setActiveByIndex(chIndex);\n\n            // Now that we are encrypting the packet channel should be the hash (no longer the index)\n            p->channel = hash;\n            if (hash < 0) {\n                // No suitable channel could be found for\n                return meshtastic_Routing_Error_NO_CHANNEL;\n            }\n            crypto->encryptPacket(getFrom(p), p->id, numbytes, bytes);\n            memcpy(p->encrypted.bytes, bytes, numbytes);\n        }\n#else\n        if (p->pki_encrypted == true) {\n            // Client specifically requested PKI encryption\n            return meshtastic_Routing_Error_PKI_FAILED;\n        }\n        hash = channels.setActiveByIndex(chIndex);\n\n        // Now that we are encrypting the packet channel should be the hash (no longer the index)\n        p->channel = hash;\n        if (hash < 0) {\n            // No suitable channel could be found for\n            return meshtastic_Routing_Error_NO_CHANNEL;\n        }\n        crypto->encryptPacket(getFrom(p), p->id, numbytes, bytes);\n        memcpy(p->encrypted.bytes, bytes, numbytes);\n#endif\n\n        // Copy back into the packet and set the variant type\n        p->encrypted.size = numbytes;\n        p->which_payload_variant = meshtastic_MeshPacket_encrypted_tag;\n    }\n\n    return meshtastic_Routing_Error_NONE;\n}\n\nNodeNum Router::getNodeNum()\n{\n    return nodeDB->getNodeNum();\n}\n\n/**\n * Handle any packet that is received by an interface on this node.\n * Note: some packets may merely being passed through this node and will be forwarded elsewhere.\n */\nvoid Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)\n{\n    bool skipHandle = false;\n    // Also, we should set the time from the ISR and it should have msec level resolution\n    p->rx_time = getValidTime(RTCQualityFromNet); // store the arrival timestamp for the phone\n\n    // Store a copy of encrypted packet for MQTT\n    DEBUG_HEAP_BEFORE;\n    p_encrypted = packetPool.allocCopy(*p);\n    DEBUG_HEAP_AFTER(\"Router::handleReceived\", p_encrypted);\n\n    // Take those raw bytes and convert them back into a well structured protobuf we can understand\n    auto decodedState = perhapsDecode(p);\n    if (decodedState == DecodeState::DECODE_FATAL) {\n        // Fatal decoding error, we can't do anything with this packet\n        LOG_WARN(\"Fatal decode error, dropping packet\");\n        cancelSending(p->from, p->id);\n        skipHandle = true;\n    } else if (decodedState == DecodeState::DECODE_SUCCESS) {\n        // parsing was successful, queue for our recipient\n        if (src == RX_SRC_LOCAL)\n            printPacket(\"handleReceived(LOCAL)\", p);\n        else if (src == RX_SRC_USER)\n            printPacket(\"handleReceived(USER)\", p);\n        else\n            printPacket(\"handleReceived(REMOTE)\", p);\n\n        // Neighbor info module is disabled, ignore expensive neighbor info packets\n        if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&\n            p->decoded.portnum == meshtastic_PortNum_NEIGHBORINFO_APP &&\n            (!moduleConfig.has_neighbor_info || !moduleConfig.neighbor_info.enabled)) {\n            LOG_DEBUG(\"Neighbor info module is disabled, ignore neighbor packet\");\n            cancelSending(p->from, p->id);\n            skipHandle = true;\n        }\n\n        bool shouldIgnoreNonstandardPorts =\n            config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_CORE_PORTNUMS_ONLY;\n#if USERPREFS_EVENT_MODE\n        shouldIgnoreNonstandardPorts = true;\n#endif\n        if (shouldIgnoreNonstandardPorts && p->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&\n            !IS_ONE_OF(p->decoded.portnum, meshtastic_PortNum_TEXT_MESSAGE_APP, meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP,\n                       meshtastic_PortNum_POSITION_APP, meshtastic_PortNum_NODEINFO_APP, meshtastic_PortNum_ROUTING_APP,\n                       meshtastic_PortNum_TELEMETRY_APP, meshtastic_PortNum_ADMIN_APP, meshtastic_PortNum_ALERT_APP,\n                       meshtastic_PortNum_KEY_VERIFICATION_APP, meshtastic_PortNum_WAYPOINT_APP,\n                       meshtastic_PortNum_STORE_FORWARD_APP, meshtastic_PortNum_TRACEROUTE_APP,\n                       meshtastic_PortNum_STORE_FORWARD_PLUSPLUS_APP)) {\n            LOG_DEBUG(\"Ignore packet on non-standard portnum for CORE_PORTNUMS_ONLY\");\n            cancelSending(p->from, p->id);\n            skipHandle = true;\n        }\n    } else {\n        printPacket(\"packet decoding failed or skipped (no PSK?)\", p);\n    }\n\n    // call modules here\n    // If this could be a spoofed packet, don't let the modules see it.\n    if (!skipHandle) {\n        MeshModule::callModules(*p, src);\n\n#if !MESHTASTIC_EXCLUDE_MQTT\n        if (p_encrypted == nullptr) {\n            LOG_WARN(\"p_encrypted is null, skipping MQTT publish\");\n        } else {\n            // Mark as pki_encrypted if it is not yet decoded and MQTT encryption is also enabled, hash matches and it's a DM not\n            // to us (because we would be able to decrypt it)\n            if (decodedState == DecodeState::DECODE_FAILURE && moduleConfig.mqtt.encryption_enabled && p->channel == 0x00 &&\n                !isBroadcast(p->to) && !isToUs(p))\n                p_encrypted->pki_encrypted = true;\n            // After potentially altering it, publish received message to MQTT if we're not the original transmitter of the packet\n            if ((decodedState == DecodeState::DECODE_SUCCESS || p_encrypted->pki_encrypted) && moduleConfig.mqtt.enabled &&\n                !isFromUs(p) && mqtt) {\n                if (decodedState == DecodeState::DECODE_SUCCESS && p->decoded.portnum == meshtastic_PortNum_TRACEROUTE_APP &&\n                    moduleConfig.mqtt.encryption_enabled) {\n                    // For TRACEROUTE_APP packets release the original encrypted packet and encrypt a new from the changed packet\n                    // Only release the original after successful allocation to avoid losing an incomplete but valid packet\n                    auto *p_encrypted_new = packetPool.allocCopy(*p);\n                    if (p_encrypted_new) {\n                        auto encodeResult = perhapsEncode(p_encrypted_new);\n                        if (encodeResult != meshtastic_Routing_Error_NONE) {\n                            // Encryption failed, release the new packet and fall back to sending the original encrypted packet to\n                            // MQTT\n                            LOG_WARN(\"Encryption of new TR packet failed, sending original TR to MQTT\");\n                            packetPool.release(p_encrypted_new);\n                            p_encrypted_new = nullptr;\n                        } else {\n                            // Successfully re-encrypted, release the original encrypted packet and use the new one for MQTT\n                            packetPool.release(p_encrypted);\n                            p_encrypted = p_encrypted_new;\n                        }\n                    } else {\n                        // Allocation failed, log a warning and fall back to sending the original encrypted packet to MQTT\n                        LOG_WARN(\"Failed to allocate new encrypted packet for TR, sending original TR to MQTT\");\n                    }\n                }\n                mqtt->onSend(*p_encrypted, *p, p->channel);\n            }\n        }\n#endif\n    }\n\n    packetPool.release(p_encrypted); // Release the encrypted packet\n    p_encrypted = nullptr;\n}\n\nvoid Router::perhapsHandleReceived(meshtastic_MeshPacket *p)\n{\n#if ENABLE_JSON_LOGGING\n    // Even ignored packets get logged in the trace\n    p->rx_time = getValidTime(RTCQualityFromNet); // store the arrival timestamp for the phone\n    LOG_TRACE(\"%s\", MeshPacketSerializer::JsonSerializeEncrypted(p).c_str());\n#elif ARCH_PORTDUINO\n    // Even ignored packets get logged in the trace\n    if (portduino_config.traceFilename != \"\" || portduino_config.logoutputlevel == level_trace) {\n        p->rx_time = getValidTime(RTCQualityFromNet); // store the arrival timestamp for the phone\n        LOG_TRACE(\"%s\", MeshPacketSerializer::JsonSerializeEncrypted(p).c_str());\n    }\n#endif\n    // assert(radioConfig.has_preferences);\n    if (is_in_repeated(config.lora.ignore_incoming, p->from)) {\n        LOG_DEBUG(\"Ignore msg, 0x%x is in our ignore list\", p->from);\n        packetPool.release(p);\n        return;\n    }\n\n    meshtastic_NodeInfoLite const *node = nodeDB->getMeshNode(p->from);\n    if (node != NULL && node->is_ignored) {\n        LOG_DEBUG(\"Ignore msg, 0x%x is ignored\", p->from);\n        packetPool.release(p);\n        return;\n    }\n\n    if (p->from == NODENUM_BROADCAST) {\n        LOG_DEBUG(\"Ignore msg from broadcast address\");\n        packetPool.release(p);\n        return;\n    }\n\n    if (config.lora.ignore_mqtt && p->via_mqtt) {\n        LOG_DEBUG(\"Msg came in via MQTT from 0x%x\", p->from);\n        packetPool.release(p);\n        return;\n    }\n\n    if (shouldDropPacketForPreHop(*p)) {\n        logHopStartDrop(*p, \"pre-hop drop\");\n        packetPool.release(p);\n        return;\n    }\n\n    if (shouldFilterReceived(p)) {\n        LOG_DEBUG(\"Incoming msg was filtered from 0x%x\", p->from);\n        packetPool.release(p);\n        return;\n    }\n\n    // Note: we avoid calling shouldFilterReceived if we are supposed to ignore certain nodes - because some overrides might\n    // cache/learn of the existence of nodes (i.e. FloodRouter) that they should not\n    handleReceived(p);\n    packetPool.release(p);\n}\n"
  },
  {
    "path": "src/mesh/Router.h",
    "content": "#pragma once\n\n#include \"Channels.h\"\n#include \"MemoryPool.h\"\n#include \"MeshTypes.h\"\n#include \"Observer.h\"\n#include \"PacketHistory.h\"\n#include \"PointerQueue.h\"\n#include \"RadioInterface.h\"\n#include \"concurrency/OSThread.h\"\n#include <memory>\n\n/**\n * A mesh aware router that supports multiple interfaces.\n */\nclass Router : protected concurrency::OSThread, protected PacketHistory\n{\n  private:\n    /// Packets which have just arrived from the radio, ready to be processed by this service and possibly\n    /// forwarded to the phone.\n    PointerQueue<meshtastic_MeshPacket> fromRadioQueue;\n\n  protected:\n    std::unique_ptr<RadioInterface> iface = nullptr;\n\n  public:\n    /**\n     * Constructor\n     *\n     */\n    Router();\n\n    /**\n     * Currently we only allow one interface, that may change in the future\n     */\n    void addInterface(std::unique_ptr<RadioInterface> _iface) { iface = std::move(_iface); }\n\n    /**\n     * do idle processing\n     * Mostly looking in our incoming rxPacket queue and calling handleReceived.\n     */\n    virtual int32_t runOnce() override;\n\n    /**\n     * Works like send, but if we are sending to the local node, we directly put the message in the receive queue.\n     * This is the primary method used for sending packets, because it handles both the remote and local cases.\n     *\n     * NOTE: This method will free the provided packet (even if we return an error code)\n     */\n    ErrorCode sendLocal(meshtastic_MeshPacket *p, RxSource src = RX_SRC_RADIO);\n\n    /** Attempt to cancel a previously sent packet.  Returns true if a packet was found we could cancel */\n    bool cancelSending(NodeNum from, PacketId id);\n\n    /** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */\n    bool findInTxQueue(NodeNum from, PacketId id);\n\n    /** Allocate and return a meshpacket which defaults as send to broadcast from the current node.\n     * The returned packet is guaranteed to have a unique packet ID already assigned\n     */\n    [[nodiscard]] meshtastic_MeshPacket *allocForSending();\n\n    /** Return Underlying interface's TX queue status */\n    [[nodiscard]] meshtastic_QueueStatus getQueueStatus();\n\n    /**\n     * @return our local nodenum */\n    [[nodiscard]] NodeNum getNodeNum();\n\n    /** Wake up the router thread ASAP, because we just queued a message for it.\n     * FIXME, this is kinda a hack because we don't have a nice way yet to say 'wake us because we are 'blocked on this queue'\n     */\n    void setReceivedMessage();\n\n    /**\n     * RadioInterface calls this to queue up packets that have been received from the radio.  The router is now responsible for\n     * freeing the packet\n     */\n    virtual void enqueueReceivedMessage(meshtastic_MeshPacket *p);\n\n    /**\n     * Send a packet on a suitable interface.  This routine will\n     * later free() the packet to pool.  This routine is not allowed to stall.\n     * If the txmit queue is full it might return an error\n     *\n     * NOTE: This method will free the provided packet (even if we return an error code)\n     */\n    virtual ErrorCode send(meshtastic_MeshPacket *p);\n    virtual ErrorCode rawSend(meshtastic_MeshPacket *p);\n\n    /* Statistics for the amount of duplicate received packets and the amount of times we cancel a relay because someone did it\n        before us */\n    uint32_t rxDupe = 0, txRelayCanceled = 0;\n\n    // pointer to the encrypted packet\n    meshtastic_MeshPacket *p_encrypted = nullptr;\n\n  protected:\n    friend class RoutingModule;\n\n    /**\n     * Should this incoming filter be dropped?\n     *\n     * FIXME, move this into the new RoutingModule and do the filtering there using the regular module logic\n     *\n     * Called immediately on reception, before any further processing.\n     * @return true to abandon the packet\n     */\n    virtual bool shouldFilterReceived(const meshtastic_MeshPacket *p) { return false; }\n\n    /**\n     * Determine if hop_limit should be decremented for a relay operation.\n     * Returns false (preserve hop_limit) only if all conditions are met:\n     * - It's NOT the first hop (first hop must always decrement)\n     * - Local device is a ROUTER, ROUTER_LATE, or CLIENT_BASE\n     * - Previous relay is a favorite ROUTER, ROUTER_LATE, or CLIENT_BASE\n     *\n     * @param p The packet being relayed\n     * @return true if hop_limit should be decremented, false to preserve it\n     */\n    bool shouldDecrementHopLimit(const meshtastic_MeshPacket *p);\n\n    /**\n     * Every (non duplicate) packet this node receives will be passed through this method.  This allows subclasses to\n     * update routing tables etc... based on what we overhear (even for messages not destined to our node)\n     */\n    virtual void sniffReceived(const meshtastic_MeshPacket *p, const meshtastic_Routing *c);\n\n    /**\n     * Send an ack or a nak packet back towards whoever sent idFrom\n     */\n    void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit = 0,\n                    bool ackWantsAck = false);\n\n  private:\n    /**\n     * Called from loop()\n     * Handle any packet that is received by an interface on this node.\n     * Note: some packets may merely being passed through this node and will be forwarded elsewhere.\n     *\n     * Note: this packet will never be called for messages sent/generated by this node.\n     * Note: this method will free the provided packet.\n     */\n    void perhapsHandleReceived(meshtastic_MeshPacket *p);\n\n    /**\n     * Called from perhapsHandleReceived() - allows subclass message delivery behavior.\n     * Handle any packet that is received by an interface on this node.\n     * Note: some packets may merely being passed through this node and will be forwarded elsewhere.\n     *\n     * Note: this packet will never be called for messages sent/generated by this node.\n     * Note: this method will free the provided packet.\n     */\n    void handleReceived(meshtastic_MeshPacket *p, RxSource src = RX_SRC_RADIO);\n\n    /** Frees the provided packet, and generates a NAK indicating the specifed error while sending */\n    void abortSendAndNak(meshtastic_Routing_Error err, meshtastic_MeshPacket *p);\n};\n\nenum DecodeState { DECODE_SUCCESS, DECODE_FAILURE, DECODE_FATAL };\n\n/** FIXME - move this into a mesh packet class\n * Remove any encryption and decode the protobufs inside this packet (if necessary).\n *\n * @return true for success, false for corrupt packet.\n */\nDecodeState perhapsDecode(meshtastic_MeshPacket *p);\n\n/** Return 0 for success or a Routing_Error code for failure\n */\nmeshtastic_Routing_Error perhapsEncode(meshtastic_MeshPacket *p);\n\nextern Router *router;\n\n/// Generate a unique packet id\n// FIXME, move this someplace better\nPacketId generatePacketId();\n\n#define BITFIELD_WANT_RESPONSE_SHIFT 1\n#define BITFIELD_OK_TO_MQTT_SHIFT 0\n#define BITFIELD_WANT_RESPONSE_MASK (1 << BITFIELD_WANT_RESPONSE_SHIFT)\n#define BITFIELD_OK_TO_MQTT_MASK (1 << BITFIELD_OK_TO_MQTT_SHIFT)\n"
  },
  {
    "path": "src/mesh/STM32WLE5JCInterface.cpp",
    "content": "#include \"configuration.h\"\n\n#ifdef ARCH_STM32WL\n#include \"STM32WLE5JCInterface.h\"\n#include \"error.h\"\n\n#ifndef STM32WLx_MAX_POWER\n#define STM32WLx_MAX_POWER 22\n#endif\n\nSTM32WLE5JCInterface::STM32WLE5JCInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq,\n                                           RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy)\n    : SX126xInterface(hal, cs, irq, rst, busy)\n{\n}\n\nbool STM32WLE5JCInterface::init()\n{\n    RadioLibInterface::init();\n\n// https://github.com/Seeed-Studio/LoRaWan-E5-Node/blob/main/Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver/radio_driver.c\n#if (!defined(_VARIANT_RAK3172_))\n    setTCXOVoltage(1.7);\n#endif\n\n    lora.setRfSwitchTable(rfswitch_pins, rfswitch_table);\n\n    limitPower(STM32WLx_MAX_POWER);\n\n    int res = lora.begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength, tcxoVoltage);\n\n    LOG_INFO(\"STM32WLx init result %d\", res);\n\n    LOG_INFO(\"Frequency set to %f\", getFreq());\n    LOG_INFO(\"Bandwidth set to %f\", bw);\n    LOG_INFO(\"Power output set to %d\", power);\n\n    if (res == RADIOLIB_ERR_NONE)\n        startReceive(); // start receiving\n\n    return res == RADIOLIB_ERR_NONE;\n}\n\n#endif // ARCH_STM32WL\n"
  },
  {
    "path": "src/mesh/STM32WLE5JCInterface.h",
    "content": "#pragma once\n\n#ifdef ARCH_STM32WL\n#include \"SX126xInterface.h\"\n#include \"rfswitch.h\"\n\n/**\n * Our adapter for STM32WLE5JC radios\n */\nclass STM32WLE5JCInterface : public SX126xInterface<STM32WLx>\n{\n  public:\n    STM32WLE5JCInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                         RADIOLIB_PIN_TYPE busy);\n\n    virtual bool init() override;\n};\n\n#endif // ARCH_STM32WL"
  },
  {
    "path": "src/mesh/SX1262Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX126X != 1\n#include \"SX1262Interface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\nSX1262Interface::SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                 RADIOLIB_PIN_TYPE busy)\n    : SX126xInterface(hal, cs, irq, rst, busy)\n{\n}\n#endif"
  },
  {
    "path": "src/mesh/SX1262Interface.h",
    "content": "#if RADIOLIB_EXCLUDE_SX126X != 1\n#pragma once\n\n#include \"SX126xInterface.h\"\n\n/**\n * Our adapter for SX1262 radios\n */\nclass SX1262Interface : public SX126xInterface<SX1262>\n{\n  public:\n    SX1262Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n};\n#endif"
  },
  {
    "path": "src/mesh/SX1268Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX126X != 1\n#include \"SX1268Interface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\nSX1268Interface::SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                 RADIOLIB_PIN_TYPE busy)\n    : SX126xInterface(hal, cs, irq, rst, busy)\n{\n}\n\nfloat SX1268Interface::getFreq()\n{\n    // Set frequency to default of EU_433 if outside of allowed range (e.g. when region is UNSET)\n    if (savedFreq < 410 || savedFreq > 810)\n        return 433.125f;\n    else\n        return savedFreq;\n}\n#endif"
  },
  {
    "path": "src/mesh/SX1268Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_SX126X != 1\n\n#include \"SX126xInterface.h\"\n\n/**\n * Our adapter for SX1268 radios\n */\nclass SX1268Interface : public SX126xInterface<SX1268>\n{\n  public:\n    virtual float getFreq() override;\n\n    SX1268Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n};\n#endif"
  },
  {
    "path": "src/mesh/SX126xInterface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX126X != 1\n#include \"SX126xInterface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n#include \"mesh/NodeDB.h\"\n#ifdef ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#endif\n#if defined(ARCH_ESP32)\n#include <driver/rtc_io.h>\n#include <esp_sleep.h>\n#endif\n\n#include \"Throttle.h\"\n\n// Particular boards might define a different max power based on what their hardware can do, default to max power output if not\n// specified (may be dangerous if using external PA and SX126x power config forgotten)\n#if ARCH_PORTDUINO\n#define SX126X_MAX_POWER portduino_config.sx126x_max_power\n#endif\n#ifndef SX126X_MAX_POWER\n#define SX126X_MAX_POWER 22\n#endif\n\ntemplate <typename T>\nSX126xInterface<T>::SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                    RADIOLIB_PIN_TYPE busy)\n    : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module)\n{\n    LOG_DEBUG(\"SX126xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\", cs, irq, rst, busy);\n}\n\n/// Initialise the Driver transport hardware and software.\n/// Make sure the Driver is properly configured before calling init().\n/// \\return true if initialisation succeeded.\ntemplate <typename T> bool SX126xInterface<T>::init()\n{\n\n// Typically, the RF switch on SX126x boards is controlled by two signals, which are negations of each other (switched RFIO\n// paths). The negation is usually performed in hardware, or (suboptimal design) TXEN and RXEN are the two inputs to this style of\n// RF switch. On some boards, there is no hardware negation between CTRL and ¬CTRL, but CTRL is internally connected to DIO2, and\n// DIO2's switching is done by the SX126X itself, so the MCU can't control ¬CTRL at exactly the same time. One solution would be\n// to set ¬CTRL as SX126X_TXEN or SX126X_RXEN, but they may already be used for another purpose, such as controlling another\n// PA/LNA. Keeping ¬CTRL high seems to work, as long CTRL=1, ¬CTRL=1 has the opposite and stable RF path effect as CTRL=0 and\n// ¬CTRL=1, this depends on the RF switch, but it seems this usually works. Better hardware design, which is done most the time,\n// means this workaround is not necessary.\n#ifdef SX126X_ANT_SW // Perhaps add RADIOLIB_NC check, and beforehand define as such if it is undefined, but it is not commonly\n                     // used and not part of the 'default' set of pin definitions.\n    digitalWrite(SX126X_ANT_SW, HIGH);\n    pinMode(SX126X_ANT_SW, OUTPUT);\n#endif\n\n#ifdef SX126X_POWER_EN // Perhaps add RADIOLIB_NC check, and beforehand define as such if it is undefined, but it is not commonly\n                       // used and not part of the 'default' set of pin definitions.\n    digitalWrite(SX126X_POWER_EN, HIGH);\n    pinMode(SX126X_POWER_EN, OUTPUT);\n#endif\n\n#if HAS_LORA_FEM\n    loraFEMInterface.init();\n    // Apply saved FEM LNA mode from config\n    if (loraFEMInterface.isLnaCanControl()) {\n        loraFEMInterface.setLNAEnable(config.lora.fem_lna_mode != meshtastic_Config_LoRaConfig_FEM_LNA_Mode_DISABLED);\n    }\n#endif\n\n#ifdef RF95_FAN_EN\n    digitalWrite(RF95_FAN_EN, HIGH);\n    pinMode(RF95_FAN_EN, OUTPUT);\n#endif\n\n#if ARCH_PORTDUINO\n    tcxoVoltage = (float)portduino_config.dio3_tcxo_voltage / 1000;\n    if (portduino_config.lora_sx126x_ant_sw_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_sx126x_ant_sw_pin.pin, HIGH);\n        pinMode(portduino_config.lora_sx126x_ant_sw_pin.pin, OUTPUT);\n    }\n#endif\n    if (tcxoVoltage == 0.0)\n        LOG_DEBUG(\"SX126X_DIO3_TCXO_VOLTAGE not defined, not using DIO3 as TCXO reference voltage\");\n    else\n        LOG_DEBUG(\"SX126X_DIO3_TCXO_VOLTAGE defined, using DIO3 as TCXO reference voltage at %f V\", tcxoVoltage);\n    setTransmitEnable(false);\n    // FIXME: May want to set depending on a definition, currently all SX126x variant files use the DC-DC regulator option\n    bool useRegulatorLDO = false; // Seems to depend on the connection to pin 9/DCC_SW - if an inductor DCDC?\n\n    RadioLibInterface::init();\n\n    limitPower(SX126X_MAX_POWER);\n    // Make sure we reach the minimum power supported to turn the chip on (-9dBm)\n    if (power < -9)\n        power = -9;\n\n    int res = lora.begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength, tcxoVoltage, useRegulatorLDO);\n\n#ifdef SX126X_PA_RAMP_US\n    // Set custom PA ramp time for boards requiring longer stabilization (e.g., T-Beam 1W needs >800us)\n    if (res == RADIOLIB_ERR_NONE) {\n        lora.setPaRampTime(SX126X_PA_RAMP_US);\n    }\n#endif\n    // \\todo Display actual typename of the adapter, not just `SX126x`\n    LOG_INFO(\"SX126x init result %d\", res);\n    if (res == RADIOLIB_ERR_CHIP_NOT_FOUND || res == RADIOLIB_ERR_SPI_CMD_FAILED)\n        return false;\n\n    LOG_INFO(\"Frequency set to %f\", getFreq());\n    LOG_INFO(\"Bandwidth set to %f\", bw);\n    LOG_INFO(\"Power output set to %d\", power);\n\n    // Overriding current limit\n    // (https://github.com/jgromes/RadioLib/blob/690a050ebb46e6097c5d00c371e961c1caa3b52e/src/modules/SX126x/SX126x.cpp#L85) using\n    // value in SX126xInterface.h (currently 140 mA) It may or may not be necessary, depending on how RadioLib functions, from\n    // SX1261/2 datasheet: OCP after setting DeviceSel with SetPaConfig(): SX1261 - 60 mA, SX1262 - 140 mA For the SX1268 the IC\n    // defaults to 140mA no matter the set power level, but RadioLib set it lower, this would need further checking Default values\n    // are: SX1262, SX1268: 0x38 (140 mA), SX1261: 0x18 (60 mA)\n    // FIXME: Not ideal to increase SX1261 current limit above 60mA as it can only transmit max 15dBm, should probably only do it\n    // if using SX1262 or SX1268\n    res = lora.setCurrentLimit(currentLimit);\n    LOG_DEBUG(\"Current limit set to %f\", currentLimit);\n    LOG_DEBUG(\"Current limit set result %d\", res);\n\n    if (res == RADIOLIB_ERR_NONE) {\n#ifdef SX126X_DIO2_AS_RF_SWITCH\n        bool dio2AsRfSwitch = true;\n#elif defined(ARCH_PORTDUINO)\n        bool dio2AsRfSwitch = false;\n        if (portduino_config.dio2_as_rf_switch) {\n            dio2AsRfSwitch = true;\n        }\n#else\n        bool dio2AsRfSwitch = false;\n#endif\n        res = lora.setDio2AsRfSwitch(dio2AsRfSwitch);\n        LOG_DEBUG(\"Set DIO2 as %sRF switch, result: %d\", dio2AsRfSwitch ? \"\" : \"not \", res);\n    }\n\n// If a pin isn't defined, we set it to RADIOLIB_NC, it is safe to always do external RF switching with RADIOLIB_NC as it has\n// no effect\n#if ARCH_PORTDUINO\n    if (res == RADIOLIB_ERR_NONE) {\n        LOG_DEBUG(\"Use MCU pin %i as RXEN and pin %i as TXEN to control RF switching\", portduino_config.lora_rxen_pin.pin,\n                  portduino_config.lora_txen_pin.pin);\n        lora.setRfSwitchPins(portduino_config.lora_rxen_pin.pin, portduino_config.lora_txen_pin.pin);\n    }\n#else\n#ifndef SX126X_RXEN\n#define SX126X_RXEN RADIOLIB_NC\n    LOG_DEBUG(\"SX126X_RXEN not defined, defaulting to RADIOLIB_NC\");\n#endif\n#ifndef SX126X_TXEN\n#define SX126X_TXEN RADIOLIB_NC\n    LOG_DEBUG(\"SX126X_TXEN not defined, defaulting to RADIOLIB_NC\");\n#endif\n    if (res == RADIOLIB_ERR_NONE) {\n        LOG_DEBUG(\"Use MCU pin %i as RXEN and pin %i as TXEN to control RF switching\", SX126X_RXEN, SX126X_TXEN);\n        lora.setRfSwitchPins(SX126X_RXEN, SX126X_TXEN);\n    }\n#endif\n    if (config.lora.sx126x_rx_boosted_gain) {\n        uint16_t result = lora.setRxBoostedGainMode(true);\n        LOG_INFO(\"Set RX gain to boosted mode; result: %d\", result);\n    } else {\n        uint16_t result = lora.setRxBoostedGainMode(false);\n        LOG_INFO(\"Set RX gain to power saving mode (boosted mode off); result: %d\", result);\n    }\n\n    // Undocumented SX1262 register patch recommended by Heltec/Semtech for improved RX sensitivity.\n    // Sets bit 0 of register 0x8B5.\n    if (module.SPIsetRegValue(0x8B5, 0x01, 0, 0) == RADIOLIB_ERR_NONE) {\n        LOG_INFO(\"Applied SX1262 register 0x8B5 patch for RX improvement\");\n    } else {\n        LOG_WARN(\"Failed to apply SX1262 register 0x8B5 patch for RX improvement\");\n    }\n\n#if 0\n    // Read/write a register we are not using (only used for FSK mode) to test SPI comms\n    uint8_t crcLSB = 0;\n    int err = lora.readRegister(SX126X_REG_CRC_POLYNOMIAL_LSB, &crcLSB, 1);\n    if(err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(CriticalErrorCode_SX1262Failure);\n\n    //if(crcLSB != 0x0f)\n    //    RECORD_CRITICALERROR(CriticalErrorCode_SX1262Failure);\n\n    crcLSB = 0x5a;\n    err = lora.writeRegister(SX126X_REG_CRC_POLYNOMIAL_LSB, &crcLSB, 1);\n    if(err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(CriticalErrorCode_SX1262Failure);\n\n    err = lora.readRegister(SX126X_REG_CRC_POLYNOMIAL_LSB, &crcLSB, 1);\n    if(err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(CriticalErrorCode_SX1262Failure);\n\n    if(crcLSB != 0x5a)\n        RECORD_CRITICALERROR(CriticalErrorCode_SX1262Failure);\n    // If we got this far register accesses (and therefore SPI comms) are good\n#endif\n\n    if (res == RADIOLIB_ERR_NONE)\n        res = lora.setCRC(RADIOLIB_SX126X_LORA_CRC_ON);\n\n    if (res == RADIOLIB_ERR_NONE)\n        startReceive(); // start receiving\n\n    return res == RADIOLIB_ERR_NONE;\n}\n\ntemplate <typename T> bool SX126xInterface<T>::reconfigure()\n{\n    RadioLibInterface::reconfigure();\n\n    // set mode to standby\n    setStandby();\n\n    // configure publicly accessible settings\n    int err = lora.setSpreadingFactor(sf);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setBandwidth(bw);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setCodingRate(cr);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setSyncWord(syncWord);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX126X setSyncWord %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora.setCurrentLimit(currentLimit);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX126X setCurrentLimit %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora.setPreambleLength(preambleLength);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX126X setPreambleLength %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora.setFrequency(getFreq());\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    if (power > SX126X_MAX_POWER) // This chip has lower power limits than some\n        power = SX126X_MAX_POWER;\n\n    err = lora.setOutputPower(power);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX126X setOutputPower %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    startReceive(); // restart receiving\n\n    return RADIOLIB_ERR_NONE;\n}\n\ntemplate <typename T> void SX126xInterface<T>::disableInterrupt()\n{\n    lora.clearDio1Action();\n}\n\ntemplate <typename T> void SX126xInterface<T>::setStandby()\n{\n    checkNotification(); // handle any pending interrupts before we force standby\n\n    int err = lora.standby();\n\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_DEBUG(\"SX126x standby %s%d\", radioLibErr, err);\n#ifdef ARCH_PORTDUINO\n    if (err != RADIOLIB_ERR_NONE)\n        portduino_status.LoRa_in_error = true;\n#else\n    assert(err == RADIOLIB_ERR_NONE);\n#endif\n    isReceiving = false; // If we were receiving, not any more\n    activeReceiveStart = 0;\n    disableInterrupt();\n    completeSending(); // If we were sending, not anymore\n    RadioLibInterface::setStandby();\n}\n\n/**\n * Add SNR data to received messages\n */\ntemplate <typename T> void SX126xInterface<T>::addReceiveMetadata(meshtastic_MeshPacket *mp)\n{\n    // LOG_DEBUG(\"PacketStatus %x\", lora.getPacketStatus());\n    mp->rx_snr = lora.getSNR();\n    mp->rx_rssi = lround(lora.getRSSI());\n    LOG_DEBUG(\"Corrected frequency offset: %f\", lora.getFrequencyError());\n}\n\n/** We override to turn on transmitter power as needed.\n */\ntemplate <typename T> void SX126xInterface<T>::configHardwareForSend()\n{\n    setTransmitEnable(true);\n    RadioLibInterface::configHardwareForSend();\n}\n\n// For power draw measurements, helpful to force radio to stay sleeping\n// #define SLEEP_ONLY\n\ntemplate <typename T> void SX126xInterface<T>::startReceive()\n{\n#ifdef SLEEP_ONLY\n    sleep();\n#else\n\n    setTransmitEnable(false);\n    setStandby();\n\n    // We use a 16 bit preamble so this should save some power by letting radio sit in standby mostly.\n    int err = lora.startReceiveDutyCycleAuto(preambleLength, 8, MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX126X startReceiveDutyCycleAuto %s%d\", radioLibErr, err);\n#ifdef ARCH_PORTDUINO\n    if (err != RADIOLIB_ERR_NONE)\n        portduino_status.LoRa_in_error = true;\n#else\n    assert(err == RADIOLIB_ERR_NONE);\n#endif\n\n    RadioLibInterface::startReceive();\n\n    // Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits\n    enableInterrupt(isrRxLevel0);\n    checkRxDoneIrqFlag();\n#endif\n}\n\n/** Is the channel currently active? */\ntemplate <typename T> bool SX126xInterface<T>::isChannelActive()\n{\n    // check if we can detect a LoRa preamble on the current channel\n    ChannelScanConfig_t cfg = {.cad = {.symNum = NUM_SYM_CAD,\n                                       .detPeak = RADIOLIB_SX126X_CAD_PARAM_DEFAULT,\n                                       .detMin = RADIOLIB_SX126X_CAD_PARAM_DEFAULT,\n                                       .exitMode = RADIOLIB_SX126X_CAD_PARAM_DEFAULT,\n                                       .timeout = 0,\n                                       .irqFlags = RADIOLIB_IRQ_CAD_DEFAULT_FLAGS,\n                                       .irqMask = RADIOLIB_IRQ_CAD_DEFAULT_MASK}};\n    int16_t result;\n    setTransmitEnable(false);\n    setStandby();\n    result = lora.scanChannel(cfg);\n    if (result == RADIOLIB_LORA_DETECTED)\n        return true;\n    if (result != RADIOLIB_CHANNEL_FREE)\n        LOG_ERROR(\"SX126X scanChannel %s%d\", radioLibErr, result);\n#ifdef ARCH_PORTDUINO\n    if (result == RADIOLIB_ERR_WRONG_MODEM)\n        portduino_status.LoRa_in_error = true;\n#else\n    assert(result != RADIOLIB_ERR_WRONG_MODEM);\n#endif\n\n    return false;\n}\n\n/** Could we send right now (i.e. either not actively receiving or transmitting)? */\ntemplate <typename T> bool SX126xInterface<T>::isActivelyReceiving()\n{\n    // The IRQ status will be cleared when we start our read operation. Check if we've started a header, but haven't yet\n    // received and handled the interrupt for reading the packet/handling errors.\n    return receiveDetected(lora.getIrqFlags(), RADIOLIB_SX126X_IRQ_HEADER_VALID, RADIOLIB_SX126X_IRQ_PREAMBLE_DETECTED);\n}\n\ntemplate <typename T> bool SX126xInterface<T>::sleep()\n{\n    // Not keeping config is busted - next time nrf52 board boots lora sending fails  tcxo related? - see datasheet\n    // \\todo Display actual typename of the adapter, not just `SX126x`\n    LOG_DEBUG(\"SX126x entering sleep mode\"); // (FIXME, don't keep config)\n    setStandby();                            // Stop any pending operations\n\n    // turn off TCXO if it was powered\n    // FIXME - this isn't correct\n    // lora.setTCXO(0);\n\n    // put chipset into sleep mode (we've already disabled interrupts by now)\n    bool keepConfig = true;\n    lora.sleep(keepConfig); // Note: we do not keep the config, full reinit will be needed\n\n#ifdef SX126X_POWER_EN\n    digitalWrite(SX126X_POWER_EN, LOW);\n#endif\n\n#if HAS_LORA_FEM\n    loraFEMInterface.setSleepModeEnable();\n#endif\n\n    return true;\n}\n\ntemplate <typename T> void SX126xInterface<T>::resetAGC()\n{\n    // Safety: don't reset mid-packet\n    if (sendingPacket != NULL || (isReceiving && isActivelyReceiving()))\n        return;\n\n    LOG_DEBUG(\"SX126x AGC reset: warm sleep + Calibrate(0x7F)\");\n\n    // 1. Warm sleep — powers down the entire analog frontend, resetting AGC state.\n    //    A plain standby→startReceive cycle does NOT reset the AGC.\n    lora.sleep(true);\n\n    // 2. Wake to RC standby for stable calibration\n    lora.standby(RADIOLIB_SX126X_STANDBY_RC, true);\n\n    // 3. Calibrate all blocks (ADC, PLL, image, RC oscillators)\n    uint8_t calData = RADIOLIB_SX126X_CALIBRATE_ALL;\n    module.SPIwriteStream(RADIOLIB_SX126X_CMD_CALIBRATE, &calData, 1, true, false);\n\n    // 4. Wait for calibration to complete (BUSY pin goes low)\n    module.hal->delay(5);\n    uint32_t start = millis();\n    while (module.hal->digitalRead(module.getGpio())) {\n        if (millis() - start > 50)\n            break;\n        module.hal->yield();\n    }\n\n    if (module.hal->digitalRead(module.getGpio())) {\n        LOG_WARN(\"SX126x AGC reset: calibration did not complete within 50ms\");\n        startReceive();\n        return;\n    }\n\n    // 5. Re-calibrate image rejection for actual operating frequency\n    //    Calibrate(0x7F) defaults to 902-928 MHz which is wrong for other regions.\n    lora.calibrateImage(getFreq());\n\n    // Re-apply settings that calibration may have reset\n\n    // DIO2 as RF switch\n#ifdef SX126X_DIO2_AS_RF_SWITCH\n    lora.setDio2AsRfSwitch(true);\n#elif defined(ARCH_PORTDUINO)\n    if (portduino_config.dio2_as_rf_switch)\n        lora.setDio2AsRfSwitch(true);\n#endif\n\n    // RX boosted gain mode\n    lora.setRxBoostedGainMode(config.lora.sx126x_rx_boosted_gain);\n\n    // 6. Resume receiving\n    startReceive();\n}\n\n/** Control PA mode for GC1109 FEM - CPS pin selects full PA (txon=true) or bypass mode (txon=false) */\ntemplate <typename T> void SX126xInterface<T>::setTransmitEnable(bool txon)\n{\n#if HAS_LORA_FEM\n    if (txon) {\n        loraFEMInterface.setTxModeEnable();\n    } else {\n        loraFEMInterface.setRxModeEnable();\n    }\n#endif\n}\n\n#endif"
  },
  {
    "path": "src/mesh/SX126xInterface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_SX126X != 1\n\n#include \"RadioLibInterface.h\"\n\n/**\n * \\brief Adapter for SX126x radio family. Implements common logic for child classes.\n * \\tparam T RadioLib module type for SX126x: SX1262, SX1268.\n */\ntemplate <class T> class SX126xInterface : public RadioLibInterface\n{\n  public:\n    SX126xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n\n    /// Initialise the Driver transport hardware and software.\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool init() override;\n\n    /// Apply any radio provisioning changes\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool reconfigure() override;\n\n    /// Prepare hardware for sleep.  Call this _only_ for deep sleep, not needed for light sleep.\n    virtual bool sleep() override;\n\n    bool isIRQPending() override { return lora.getIrqFlags() != 0; }\n\n    void resetAGC() override;\n\n    void setTCXOVoltage(float voltage) { tcxoVoltage = voltage; }\n\n  protected:\n    float currentLimit = 140; // Higher OCP limit for SX126x PA\n    float tcxoVoltage = 0.0;\n\n    /**\n     * Specific module instance\n     */\n    T lora;\n\n    /**\n     * Glue functions called from ISR land\n     */\n    virtual void disableInterrupt() override;\n\n    /**\n     * Enable a particular ISR callback glue function\n     */\n    virtual void enableInterrupt(void (*callback)()) { lora.setDio1Action(callback); }\n\n    /** can we detect a LoRa preamble on the current channel? */\n    virtual bool isChannelActive() override;\n\n    /** are we actively receiving a packet (only called during receiving state) */\n    virtual bool isActivelyReceiving() override;\n\n    /**\n     * Start waiting to receive a message\n     */\n    virtual void startReceive() override;\n\n    /**\n     *  We override to turn on transmitter power as needed.\n     */\n    virtual void configHardwareForSend() override;\n\n    /**\n     * Add SNR data to received messages\n     */\n    virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) override;\n\n    virtual void setStandby() override;\n\n    uint32_t getPacketTime(uint32_t pl, bool received) override { return computePacketTime(lora, pl, received); }\n\n  private:\n    /** Some boards require GPIO control of tx vs rx paths */\n    void setTransmitEnable(bool txon);\n};\n#endif"
  },
  {
    "path": "src/mesh/SX1280Interface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX128X != 1\n#include \"SX1280Interface.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n\nSX1280Interface::SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                 RADIOLIB_PIN_TYPE busy)\n    : SX128xInterface(hal, cs, irq, rst, busy)\n{\n}\n#endif"
  },
  {
    "path": "src/mesh/SX1280Interface.h",
    "content": "#pragma once\n#if RADIOLIB_EXCLUDE_SX128X != 1\n#include \"SX128xInterface.h\"\n\n/**\n * Our adapter for SX1280 radios\n */\n\nclass SX1280Interface : public SX128xInterface<SX1280>\n{\n  public:\n    SX1280Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n};\n#endif\n"
  },
  {
    "path": "src/mesh/SX128xInterface.cpp",
    "content": "#if RADIOLIB_EXCLUDE_SX128X != 1\n#include \"SX128xInterface.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n#include \"error.h\"\n#include \"mesh/NodeDB.h\"\n\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#endif\n\n// Particular boards might define a different max power based on what their hardware can do\n#if ARCH_PORTDUINO\n#define SX128X_MAX_POWER portduino_config.sx128x_max_power\n#endif\n#ifndef SX128X_MAX_POWER\n#define SX128X_MAX_POWER 13\n#endif\n\ntemplate <typename T>\nSX128xInterface<T>::SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                                    RADIOLIB_PIN_TYPE busy)\n    : RadioLibInterface(hal, cs, irq, rst, busy, &lora), lora(&module)\n{\n    LOG_DEBUG(\"SX128xInterface(cs=%d, irq=%d, rst=%d, busy=%d)\", cs, irq, rst, busy);\n}\n\n/// Initialise the Driver transport hardware and software.\n/// Make sure the Driver is properly configured before calling init().\n/// \\return true if initialisation succeeded.\ntemplate <typename T> bool SX128xInterface<T>::init()\n{\n#ifdef SX128X_POWER_EN\n    pinMode(SX128X_POWER_EN, OUTPUT);\n    digitalWrite(SX128X_POWER_EN, HIGH);\n#endif\n\n#ifdef RF95_FAN_EN\n    pinMode(RF95_FAN_EN, OUTPUT);\n    digitalWrite(RF95_FAN_EN, 1);\n#endif\n\n#if ARCH_PORTDUINO\n    if (portduino_config.lora_rxen_pin.pin != RADIOLIB_NC) {\n        pinMode(portduino_config.lora_rxen_pin.pin, OUTPUT);\n        digitalWrite(portduino_config.lora_rxen_pin.pin, LOW); // Set low before becoming an output\n    }\n    if (portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {\n        pinMode(portduino_config.lora_txen_pin.pin, OUTPUT);\n        digitalWrite(portduino_config.lora_txen_pin.pin, LOW); // Set low before becoming an output\n    }\n#else\n#if defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC) // set not rx or tx mode\n    pinMode(SX128X_RXEN, OUTPUT);\n    digitalWrite(SX128X_RXEN, LOW); // Set low before becoming an output\n#endif\n#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC)\n    pinMode(SX128X_TXEN, OUTPUT);\n    digitalWrite(SX128X_TXEN, LOW);\n#endif\n#endif\n\n    RadioLibInterface::init();\n\n    limitPower(SX128X_MAX_POWER);\n\n    preambleLength = 12; // 12 is the default for this chip, 32 does not RX at all\n\n    int res = lora.begin(getFreq(), bw, sf, cr, syncWord, power, preambleLength);\n    // \\todo Display actual typename of the adapter, not just `SX128x`\n    LOG_INFO(\"SX128x init result %d\", res);\n    if (res == RADIOLIB_ERR_CHIP_NOT_FOUND || res == RADIOLIB_ERR_SPI_CMD_FAILED)\n        return false;\n\n    if ((config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (res == RADIOLIB_ERR_INVALID_FREQUENCY)) {\n        LOG_WARN(\"Radio only supports 2.4GHz LoRa. Adjusting Region and rebooting\");\n        config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_LORA_24;\n        nodeDB->saveToDisk(SEGMENT_CONFIG);\n        delay(2000);\n#if defined(ARCH_ESP32)\n        ESP.restart();\n#elif defined(ARCH_NRF52)\n        NVIC_SystemReset();\n#else\n        LOG_ERROR(\"FIXME implement reboot for this platform. Skip for now\");\n#endif\n    }\n\n    LOG_INFO(\"Frequency set to %f\", getFreq());\n    LOG_INFO(\"Bandwidth set to %f\", bw);\n    LOG_INFO(\"Power output set to %d\", power);\n\n#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC) && defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC)\n    if (res == RADIOLIB_ERR_NONE) {\n        lora.setRfSwitchPins(SX128X_RXEN, SX128X_TXEN);\n    }\n#elif ARCH_PORTDUINO\n    if (res == RADIOLIB_ERR_NONE && portduino_config.lora_rxen_pin.pin != RADIOLIB_NC &&\n        portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {\n        lora.setRfSwitchPins(portduino_config.lora_rxen_pin.pin, portduino_config.lora_txen_pin.pin);\n    }\n#endif\n\n    if (res == RADIOLIB_ERR_NONE)\n        res = lora.setCRC(2);\n\n    if (res == RADIOLIB_ERR_NONE)\n        startReceive(); // start receiving\n\n    return res == RADIOLIB_ERR_NONE;\n}\n\ntemplate <typename T> bool SX128xInterface<T>::reconfigure()\n{\n    RadioLibInterface::reconfigure();\n\n    // set mode to standby\n    setStandby();\n\n    // configure publicly accessible settings\n    int err = lora.setSpreadingFactor(sf);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setBandwidth(bw);\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setCodingRate(cr, cr != 7); // use long interleaving except if CR is 4/7 which doesn't support it\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    err = lora.setSyncWord(syncWord);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX128X setSyncWord %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora.setPreambleLength(preambleLength);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX128X setPreambleLength %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    err = lora.setFrequency(getFreq());\n    if (err != RADIOLIB_ERR_NONE)\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING);\n\n    if (power > SX128X_MAX_POWER) // This chip has lower power limits than some\n        power = SX128X_MAX_POWER;\n\n    err = lora.setOutputPower(power);\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX128X setOutputPower %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    startReceive(); // restart receiving\n\n    return RADIOLIB_ERR_NONE;\n}\n\ntemplate <typename T> void SX128xInterface<T>::disableInterrupt()\n{\n    lora.clearDio1Action();\n}\n\ntemplate <typename T> bool SX128xInterface<T>::wideLora()\n{\n    return true;\n}\n\ntemplate <typename T> void SX128xInterface<T>::setStandby()\n{\n    checkNotification(); // handle any pending interrupts before we force standby\n\n    int err = lora.standby();\n\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX128x standby %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n#if ARCH_PORTDUINO\n    if (portduino_config.lora_rxen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_rxen_pin.pin, LOW);\n    }\n    if (portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_txen_pin.pin, LOW);\n    }\n#else\n#if defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC) // we have RXEN/TXEN control - turn off RX and TX power\n    digitalWrite(SX128X_RXEN, LOW);\n#endif\n#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC)\n    digitalWrite(SX128X_TXEN, LOW);\n#endif\n#endif\n    isReceiving = false; // If we were receiving, not any more\n    activeReceiveStart = 0;\n    disableInterrupt();\n    completeSending(); // If we were sending, not anymore\n    RadioLibInterface::setStandby();\n}\n\n/**\n * Add SNR data to received messages\n */\ntemplate <typename T> void SX128xInterface<T>::addReceiveMetadata(meshtastic_MeshPacket *mp)\n{\n    // LOG_DEBUG(\"PacketStatus %x\", lora.getPacketStatus());\n    mp->rx_snr = lora.getSNR();\n    mp->rx_rssi = lround(lora.getRSSI());\n    LOG_DEBUG(\"Corrected frequency offset: %f\", lora.getFrequencyError());\n}\n\n/** We override to turn on transmitter power as needed.\n */\ntemplate <typename T> void SX128xInterface<T>::configHardwareForSend()\n{\n#if ARCH_PORTDUINO\n    if (portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_txen_pin.pin, HIGH);\n    }\n    if (portduino_config.lora_rxen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_rxen_pin.pin, LOW);\n    }\n\n#else\n#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC) // we have RXEN/TXEN control - turn on TX power / off RX power\n    digitalWrite(SX128X_TXEN, HIGH);\n#endif\n#if defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC)\n    digitalWrite(SX128X_RXEN, LOW);\n#endif\n#endif\n\n    RadioLibInterface::configHardwareForSend();\n}\n\n// For power draw measurements, helpful to force radio to stay sleeping\n// #define SLEEP_ONLY\n\ntemplate <typename T> void SX128xInterface<T>::startReceive()\n{\n#ifdef SLEEP_ONLY\n    sleep();\n#else\n\n    setStandby();\n\n#if ARCH_PORTDUINO\n    if (portduino_config.lora_rxen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_rxen_pin.pin, HIGH);\n    }\n    if (portduino_config.lora_txen_pin.pin != RADIOLIB_NC) {\n        digitalWrite(portduino_config.lora_txen_pin.pin, LOW);\n    }\n\n#else\n#if defined(SX128X_RXEN) && (SX128X_RXEN != RADIOLIB_NC) // we have RXEN/TXEN control - turn on RX power / off TX power\n    digitalWrite(SX128X_RXEN, HIGH);\n#endif\n#if defined(SX128X_TXEN) && (SX128X_TXEN != RADIOLIB_NC)\n    digitalWrite(SX128X_TXEN, LOW);\n#endif\n#endif\n\n    int err = lora.startReceive(RADIOLIB_SX128X_RX_TIMEOUT_INF, MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS);\n\n    if (err != RADIOLIB_ERR_NONE)\n        LOG_ERROR(\"SX128X startReceive %s%d\", radioLibErr, err);\n    assert(err == RADIOLIB_ERR_NONE);\n\n    RadioLibInterface::startReceive();\n\n    // Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits\n    enableInterrupt(isrRxLevel0);\n    checkRxDoneIrqFlag();\n#endif\n}\n\n/** Is the channel currently active? */\ntemplate <typename T> bool SX128xInterface<T>::isChannelActive()\n{\n    // check if we can detect a LoRa preamble on the current channel\n    ChannelScanConfig_t cfg = {.cad = {.symNum = NUM_SYM_CAD_24GHZ,\n                                       .detPeak = 0,\n                                       .detMin = 0,\n                                       .exitMode = 0,\n                                       .timeout = 0,\n                                       .irqFlags = RADIOLIB_IRQ_CAD_DEFAULT_FLAGS,\n                                       .irqMask = RADIOLIB_IRQ_CAD_DEFAULT_MASK}};\n    int16_t result;\n\n    setStandby();\n    result = lora.scanChannel(cfg);\n    if (result == RADIOLIB_LORA_DETECTED)\n        return true;\n    if (result != RADIOLIB_CHANNEL_FREE)\n        LOG_ERROR(\"SX128X scanChannel %s%d\", radioLibErr, result);\n    assert(result != RADIOLIB_ERR_WRONG_MODEM);\n\n    return false;\n}\n\n/** Could we send right now (i.e. either not actively receiving or transmitting)? */\ntemplate <typename T> bool SX128xInterface<T>::isActivelyReceiving()\n{\n    return receiveDetected(lora.getIrqStatus(), RADIOLIB_SX128X_IRQ_HEADER_VALID, RADIOLIB_SX128X_IRQ_PREAMBLE_DETECTED);\n}\n\ntemplate <typename T> bool SX128xInterface<T>::sleep()\n{\n    // Not keeping config is busted - next time nrf52 board boots lora sending fails  tcxo related? - see datasheet\n    // \\todo Display actual typename of the adapter, not just `SX128x`\n    LOG_DEBUG(\"SX128x entering sleep mode\"); // (FIXME, don't keep config)\n    setStandby();                            // Stop any pending operations\n\n    // turn off TCXO if it was powered\n    // FIXME - this isn't correct\n    // lora.setTCXO(0);\n\n    // put chipset into sleep mode (we've already disabled interrupts by now)\n    bool keepConfig = true;\n    lora.sleep(keepConfig); // Note: we do not keep the config, full reinit will be needed\n\n#ifdef SX128X_POWER_EN\n    digitalWrite(SX128X_POWER_EN, LOW);\n#endif\n\n    return true;\n}\n#endif"
  },
  {
    "path": "src/mesh/SX128xInterface.h",
    "content": "#pragma once\n\n#include \"RadioLibInterface.h\"\n\n/**\n * \\brief Adapter for SX128x radio family. Implements common logic for child classes.\n * \\tparam T RadioLib module type for SX128x: SX1280.\n */\ntemplate <class T> class SX128xInterface : public RadioLibInterface\n{\n  public:\n    SX128xInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,\n                    RADIOLIB_PIN_TYPE busy);\n\n    /// Initialise the Driver transport hardware and software.\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool init() override;\n\n    virtual bool wideLora() override;\n\n    /// Apply any radio provisioning changes\n    /// Make sure the Driver is properly configured before calling init().\n    /// \\return true if initialisation succeeded.\n    virtual bool reconfigure() override;\n\n    /// Prepare hardware for sleep.  Call this _only_ for deep sleep, not needed for light sleep.\n    virtual bool sleep() override;\n\n    bool isIRQPending() override { return lora.getIrqFlags() != 0; }\n\n  protected:\n    /**\n     * Specific module instance\n     */\n    T lora;\n\n    /**\n     * Glue functions called from ISR land\n     */\n    virtual void disableInterrupt() override;\n\n    /**\n     * Enable a particular ISR callback glue function\n     */\n    virtual void enableInterrupt(void (*callback)()) { lora.setDio1Action(callback); }\n\n    /** can we detect a LoRa preamble on the current channel? */\n    virtual bool isChannelActive() override;\n\n    /** are we actively receiving a packet (only called during receiving state) */\n    virtual bool isActivelyReceiving() override;\n\n    /**\n     * Start waiting to receive a message\n     */\n    virtual void startReceive() override;\n\n    /**\n     *  We override to turn on transmitter power as needed.\n     */\n    virtual void configHardwareForSend() override;\n\n    /**\n     * Add SNR data to received messages\n     */\n    virtual void addReceiveMetadata(meshtastic_MeshPacket *mp) override;\n\n    virtual void setStandby() override;\n\n    uint32_t getPacketTime(uint32_t pl, bool received) override { return computePacketTime(lora, pl, received); }\n};\n"
  },
  {
    "path": "src/mesh/SinglePortModule.h",
    "content": "#pragma once\n#include \"MeshModule.h\"\n#include \"Router.h\"\n\n/**\n * Most modules are only interested in sending/receiving one particular portnum.  This baseclass simplifies that common\n * case.\n */\nclass SinglePortModule : public MeshModule\n{\n  protected:\n    meshtastic_PortNum ourPortNum;\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    SinglePortModule(const char *_name, meshtastic_PortNum _ourPortNum) : MeshModule(_name), ourPortNum(_ourPortNum) {}\n\n  protected:\n    /**\n     * @return true if you want to receive the specified portnum\n     */\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return p->decoded.portnum == ourPortNum; }\n\n    /**\n     * Return a mesh packet which has been preinited as a data packet with a particular port number.\n     * You can then send this packet (after customizing any of the payload fields you might need) with\n     * service->sendToMesh()\n     */\n    meshtastic_MeshPacket *allocDataPacket()\n    {\n        // Update our local node info with our position (even if we don't decide to update anyone else)\n        meshtastic_MeshPacket *p = router->allocForSending();\n        p->decoded.portnum = ourPortNum;\n\n        return p;\n    }\n};"
  },
  {
    "path": "src/mesh/StaticPointerQueue.h",
    "content": "#pragma once\n\n#include \"concurrency/OSThread.h\"\n#include \"freertosinc.h\"\n#include <cassert>\n\n/**\n * A static circular buffer queue for pointers.\n * This provides the same interface as PointerQueue but uses a statically allocated\n * buffer instead of dynamic allocation.\n */\ntemplate <class T, int MaxElements> class StaticPointerQueue\n{\n    static_assert(MaxElements > 0, \"MaxElements must be greater than 0\");\n\n    T *buffer[MaxElements];\n    int head = 0;\n    int tail = 0;\n    int count = 0;\n    concurrency::OSThread *reader = nullptr;\n\n  public:\n    StaticPointerQueue()\n    {\n        // Initialize all buffer elements to nullptr to silence warnings and ensure clean state\n        for (int i = 0; i < MaxElements; i++) {\n            buffer[i] = nullptr;\n        }\n    }\n\n    int numFree() const { return MaxElements - count; }\n\n    bool isEmpty() const { return count == 0; }\n\n    int numUsed() const { return count; }\n\n    bool enqueue(T *x, TickType_t maxWait = portMAX_DELAY)\n    {\n        if (count >= MaxElements) {\n            return false; // Queue is full\n        }\n\n        if (reader) {\n            reader->setInterval(0);\n            concurrency::mainDelay.interrupt();\n        }\n\n        buffer[tail] = x;\n        tail = (tail + 1) % MaxElements;\n        count++;\n        return true;\n    }\n\n    bool dequeue(T **p, TickType_t maxWait = portMAX_DELAY)\n    {\n        if (count == 0) {\n            return false; // Queue is empty\n        }\n\n        *p = buffer[head];\n        head = (head + 1) % MaxElements;\n        count--;\n        return true;\n    }\n\n    // returns a ptr or null if the queue was empty\n    T *dequeuePtr(TickType_t maxWait = portMAX_DELAY)\n    {\n        T *p;\n        return dequeue(&p, maxWait) ? p : nullptr;\n    }\n\n    void setReader(concurrency::OSThread *t) { reader = t; }\n\n    // For compatibility with PointerQueue interface\n    int getMaxLen() const { return MaxElements; }\n};\n"
  },
  {
    "path": "src/mesh/StreamAPI.cpp",
    "content": "#include \"StreamAPI.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n\n#define START1 0x94\n#define START2 0xc3\n#define HEADER_LEN 4\n\nint32_t StreamAPI::runOncePart()\n{\n    auto result = readStream();\n    writeStream();\n    checkConnectionTimeout();\n    return result;\n}\n\nint32_t StreamAPI::runOncePart(char *buf, uint16_t bufLen)\n{\n    auto result = readStream(buf, bufLen);\n    writeStream();\n    checkConnectionTimeout();\n    return result;\n}\n\n/**\n * Read any rx chars from the link and call handleRecStream\n */\nint32_t StreamAPI::readStream(const char *buf, uint16_t bufLen)\n{\n    if (bufLen < 1) {\n        // Nothing available this time, if the computer has talked to us recently, poll often, otherwise let CPU sleep a long time\n        bool recentRx = Throttle::isWithinTimespanMs(lastRxMsec, 2000);\n        return recentRx ? 5 : 250;\n    } else {\n        handleRecStream(buf, bufLen);\n        // we had bytes available this time, so assume we might have them next time also\n        lastRxMsec = millis();\n        return 0;\n    }\n}\n\n/**\n * call getFromRadio() and deliver encapsulated packets to the Stream\n */\nvoid StreamAPI::writeStream()\n{\n    if (canWrite) {\n        uint32_t len;\n        do {\n            // Send every packet we can\n            len = getFromRadio(txBuf + HEADER_LEN);\n            emitTxBuffer(len);\n        } while (len);\n    }\n}\n\nint32_t StreamAPI::handleRecStream(const char *buf, uint16_t bufLen)\n{\n    uint16_t index = 0;\n    while (bufLen > index) { // Currently we never want to block\n        int cInt = buf[index++];\n        if (cInt < 0)\n            break; // We ran out of characters (even though available said otherwise) - this can happen on rf52 adafruit\n                   // arduino\n\n        uint8_t c = (uint8_t)cInt;\n\n        // Use the read pointer for a little state machine, first look for framing, then length bytes, then payload\n        size_t ptr = rxPtr;\n\n        rxPtr++;        // assume we will probably advance the rxPtr\n        rxBuf[ptr] = c; // store all bytes (including framing)\n\n        // console->printf(\"rxPtr %d ptr=%d c=0x%x\\n\", rxPtr, ptr, c);\n\n        if (ptr == 0) { // looking for START1\n            if (c != START1)\n                rxPtr = 0;     // failed to find framing\n        } else if (ptr == 1) { // looking for START2\n            if (c != START2)\n                rxPtr = 0;                             // failed to find framing\n        } else if (ptr >= HEADER_LEN - 1) {            // we have at least read our 4 byte framing\n            uint32_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing\n\n            // console->printf(\"len %d\\n\", len);\n\n            if (ptr == HEADER_LEN - 1) {\n                // we _just_ finished our 4 byte header, validate length now (note: a length of zero is a valid\n                // protobuf also)\n                if (len > MAX_TO_FROM_RADIO_SIZE)\n                    rxPtr = 0; // length is bogus, restart search for framing\n            }\n\n            if (rxPtr != 0)                        // Is packet still considered 'good'?\n                if (ptr + 1 >= len + HEADER_LEN) { // have we received all of the payload?\n                    rxPtr = 0;                     // start over again on the next packet\n\n                    // If we didn't just fail the packet and we now have the right # of bytes, parse it\n                    handleToRadio(rxBuf + HEADER_LEN, len);\n                }\n        }\n    }\n    return 0;\n}\n\n/**\n * Read any rx chars from the link and call handleToRadio\n */\nint32_t StreamAPI::readStream()\n{\n    if (!stream->available()) {\n        // Nothing available this time, if the computer has talked to us recently, poll often, otherwise let CPU sleep a long time\n        bool recentRx = Throttle::isWithinTimespanMs(lastRxMsec, 2000);\n        return recentRx ? 5 : 250;\n    } else {\n        while (stream->available()) { // Currently we never want to block\n            int cInt = stream->read();\n            if (cInt < 0)\n                break; // We ran out of characters (even though available said otherwise) - this can happen on rf52 adafruit\n                       // arduino\n\n            uint8_t c = (uint8_t)cInt;\n\n            // Use the read pointer for a little state machine, first look for framing, then length bytes, then payload\n            size_t ptr = rxPtr;\n\n            rxPtr++;        // assume we will probably advance the rxPtr\n            rxBuf[ptr] = c; // store all bytes (including framing)\n\n            // console->printf(\"rxPtr %d ptr=%d c=0x%x\\n\", rxPtr, ptr, c);\n\n            if (ptr == 0) { // looking for START1\n                if (c != START1)\n                    rxPtr = 0;     // failed to find framing\n            } else if (ptr == 1) { // looking for START2\n                if (c != START2)\n                    rxPtr = 0;                             // failed to find framing\n            } else if (ptr >= HEADER_LEN - 1) {            // we have at least read our 4 byte framing\n                uint32_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing\n\n                // console->printf(\"len %d\\n\", len);\n\n                if (ptr == HEADER_LEN - 1) {\n                    // we _just_ finished our 4 byte header, validate length now (note: a length of zero is a valid\n                    // protobuf also)\n                    if (len > MAX_TO_FROM_RADIO_SIZE)\n                        rxPtr = 0; // length is bogus, restart search for framing\n                }\n\n                if (rxPtr != 0)                        // Is packet still considered 'good'?\n                    if (ptr + 1 >= len + HEADER_LEN) { // have we received all of the payload?\n                        rxPtr = 0;                     // start over again on the next packet\n\n                        // If we didn't just fail the packet and we now have the right # of bytes, parse it\n                        handleToRadio(rxBuf + HEADER_LEN, len);\n                    }\n            }\n        }\n\n        // we had bytes available this time, so assume we might have them next time also\n        lastRxMsec = millis();\n        return 0;\n    }\n}\n\n/**\n * Send the current txBuffer over our stream\n */\nvoid StreamAPI::emitTxBuffer(size_t len)\n{\n    if (len != 0) {\n        txBuf[0] = START1;\n        txBuf[1] = START2;\n        txBuf[2] = (len >> 8) & 0xff;\n        txBuf[3] = len & 0xff;\n\n        auto totalLen = len + HEADER_LEN;\n        stream->write(txBuf, totalLen);\n        stream->flush();\n    }\n}\n\nvoid StreamAPI::emitRebooted()\n{\n    // In case we send a FromRadio packet\n    memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));\n    fromRadioScratch.which_payload_variant = meshtastic_FromRadio_rebooted_tag;\n    fromRadioScratch.rebooted = true;\n\n    // LOG_DEBUG(\"Emitting reboot packet for serial shell\");\n    emitTxBuffer(pb_encode_to_bytes(txBuf + HEADER_LEN, meshtastic_FromRadio_size, &meshtastic_FromRadio_msg, &fromRadioScratch));\n}\n\nvoid StreamAPI::emitLogRecord(meshtastic_LogRecord_Level level, const char *src, const char *format, va_list arg)\n{\n    // In case we send a FromRadio packet\n    memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));\n    fromRadioScratch.which_payload_variant = meshtastic_FromRadio_log_record_tag;\n    fromRadioScratch.log_record.level = level;\n\n    uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true);\n    fromRadioScratch.log_record.time = rtc_sec;\n    strncpy(fromRadioScratch.log_record.source, src, sizeof(fromRadioScratch.log_record.source) - 1);\n\n    auto num_printed =\n        vsnprintf(fromRadioScratch.log_record.message, sizeof(fromRadioScratch.log_record.message) - 1, format, arg);\n    if (num_printed > 0 && fromRadioScratch.log_record.message[num_printed - 1] ==\n                               '\\n') // Strip any ending newline, because we have records for framing instead.\n        fromRadioScratch.log_record.message[num_printed - 1] = '\\0';\n    emitTxBuffer(pb_encode_to_bytes(txBuf + HEADER_LEN, meshtastic_FromRadio_size, &meshtastic_FromRadio_msg, &fromRadioScratch));\n}\n\n/// Hookable to find out when connection changes\nvoid StreamAPI::onConnectionChanged(bool connected)\n{\n    // FIXME do reference counting instead\n\n    if (connected) { // To prevent user confusion, turn off bluetooth while using the serial port api\n        powerFSM.trigger(EVENT_SERIAL_CONNECTED);\n    } else {\n        // FIXME, we get no notice of serial going away, we should instead automatically generate this event if we haven't\n        // received a packet in a while\n        powerFSM.trigger(EVENT_SERIAL_DISCONNECTED);\n    }\n}"
  },
  {
    "path": "src/mesh/StreamAPI.h",
    "content": "#pragma once\n\n#include \"PhoneAPI.h\"\n#include \"Stream.h\"\n#include \"concurrency/OSThread.h\"\n#include <cstdarg>\n\n// A To/FromRadio packet + our 32 bit header\n#define MAX_STREAM_BUF_SIZE (MAX_TO_FROM_RADIO_SIZE + sizeof(uint32_t))\n\n/**\n * A version of our 'phone' API that talks over a Stream.  So therefore well suited to use with serial links\n * or TCP connections.\n *\n * ## Wire encoding\n\nWhen sending protobuf packets over serial or TCP each packet is preceded by uint32 sent in network byte order (big endian).\nThe upper 16 bits must be 0x94C3. The lower 16 bits are packet length (this encoding gives room to eventually allow quite large\npackets).\n\nImplementations validate length against the maximum possible size of a BLE packet (our lowest common denominator) of 512 bytes. If\nthe length provided is larger than that we assume the packet is corrupted and begin again looking for 0x4403 framing.\n\nThe packets flowing towards the device are ToRadio protobufs, the packets flowing from the device are FromRadio protobufs.\nThe 0x94C3 marker can be used as framing to (eventually) resync if packets are corrupted over the wire.\n\nNote: the 0x94C3 framing was chosen to prevent confusion with the 7 bit ascii character set. It also doesn't collide with any\nvalid utf8 encoding. This makes it a bit easier to start a device outputting regular debug output on its serial port and then only\nafter it has received a valid packet from the PC, turn off unencoded debug printing and switch to this packet encoding.\n\n */\nclass StreamAPI : public PhoneAPI\n{\n    /**\n     * The stream we read/write from\n     */\n    Stream *stream;\n\n    uint8_t rxBuf[MAX_STREAM_BUF_SIZE] = {0};\n    size_t rxPtr = 0;\n\n    /// time of last rx, used, to slow down our polling if we haven't heard from anyone\n    uint32_t lastRxMsec = 0;\n\n  public:\n    StreamAPI(Stream *_stream) : stream(_stream) {}\n\n    /**\n     * Currently we require frequent invocation from loop() to check for arrived serial packets and to send new packets to the\n     * phone.\n     */\n    virtual int32_t runOncePart();\n    virtual int32_t runOncePart(char *buf, uint16_t bufLen);\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() override = 0;\n\n  private:\n    /**\n     * Read any rx chars from the link and call handleToRadio\n     */\n    int32_t readStream();\n    int32_t readStream(const char *buf, uint16_t bufLen);\n    int32_t handleRecStream(const char *buf, uint16_t bufLen);\n\n    /**\n     * call getFromRadio() and deliver encapsulated packets to the Stream\n     */\n    void writeStream();\n\n  protected:\n    /**\n     * Send a FromRadio.rebooted = true packet to the phone\n     */\n    void emitRebooted();\n\n    virtual void onConnectionChanged(bool connected) override;\n\n    /**\n     * Send the current txBuffer over our stream\n     */\n    void emitTxBuffer(size_t len);\n\n    /// Are we allowed to write packets to our output stream (subclasses can turn this off - i.e. SerialConsole)\n    bool canWrite = true;\n\n    /// Subclasses can use this scratch buffer if they wish\n    uint8_t txBuf[MAX_STREAM_BUF_SIZE] = {0};\n\n    /// Low level function to emit a protobuf encapsulated log record\n    void emitLogRecord(meshtastic_LogRecord_Level level, const char *src, const char *format, va_list arg);\n};"
  },
  {
    "path": "src/mesh/Throttle.cpp",
    "content": "#include \"Throttle.h\"\n#include <Arduino.h>\n\n/// @brief Execute a function throttled to a minimum interval\n/// @param lastExecutionMs Pointer to the last execution time in milliseconds\n/// @param minumumIntervalMs Minimum execution interval in milliseconds\n/// @param throttleFunc Function to execute if the execution is not deferred\n/// @param onDefer Default to NULL, execute the function if the execution is deferred\n/// @return true if the function was executed, false if it was deferred\nbool Throttle::execute(uint32_t *lastExecutionMs, uint32_t minumumIntervalMs, void (*throttleFunc)(void), void (*onDefer)(void))\n{\n    if (*lastExecutionMs == 0) {\n        *lastExecutionMs = millis();\n        throttleFunc();\n        return true;\n    }\n    uint32_t now = millis();\n\n    if ((now - *lastExecutionMs) >= minumumIntervalMs) {\n        throttleFunc();\n        *lastExecutionMs = now;\n        return true;\n    } else if (onDefer != NULL) {\n        onDefer();\n    }\n    return false;\n}\n\n/// @brief Check if the last execution time is within the interval\n/// @param lastExecutionMs The last execution time in milliseconds\n/// @param timeSpanMs The interval in milliseconds of the timespan\nbool Throttle::isWithinTimespanMs(uint32_t lastExecutionMs, uint32_t timeSpanMs)\n{\n    return (millis() - lastExecutionMs) < timeSpanMs;\n}"
  },
  {
    "path": "src/mesh/Throttle.h",
    "content": "#pragma once\n#include <cstddef>\n#include <cstdint>\n\nclass Throttle\n{\n  public:\n    static bool execute(uint32_t *lastExecutionMs, uint32_t minumumIntervalMs, void (*func)(void), void (*onDefer)(void) = NULL);\n    static bool isWithinTimespanMs(uint32_t lastExecutionMs, uint32_t intervalMs);\n};"
  },
  {
    "path": "src/mesh/TransmitHistory.cpp",
    "content": "#include \"TransmitHistory.h\"\n#include \"FSCommon.h\"\n#include \"RTC.h\"\n#include \"SPILock.h\"\n#include <Throttle.h>\n\n#ifdef FSCom\n\nTransmitHistory *transmitHistory = nullptr;\n\nTransmitHistory *TransmitHistory::getInstance()\n{\n    if (!transmitHistory) {\n        transmitHistory = new TransmitHistory();\n    }\n    return transmitHistory;\n}\n\nvoid TransmitHistory::loadFromDisk()\n{\n    spiLock->lock();\n    auto file = FSCom.open(FILENAME, FILE_O_READ);\n    if (file) {\n        FileHeader header{};\n        if (file.read((uint8_t *)&header, sizeof(header)) == sizeof(header) && header.magic == MAGIC &&\n            header.version == VERSION && header.count <= MAX_ENTRIES) {\n            for (uint8_t i = 0; i < header.count; i++) {\n                Entry entry{};\n                if (file.read((uint8_t *)&entry, sizeof(entry)) == sizeof(entry)) {\n                    if (entry.epochSeconds > 0) {\n                        history[entry.key] = entry.epochSeconds;\n                        // Seed in-memory millis so throttle works even without RTC/GPS.\n                        // Treating stored entries as \"just sent\" is safe — worst case the\n                        // node waits one full interval before its first broadcast.\n                        lastMillis[entry.key] = millis();\n                    }\n                }\n            }\n            LOG_INFO(\"TransmitHistory: loaded %u entries from disk\", header.count);\n        } else {\n            LOG_WARN(\"TransmitHistory: invalid file header, starting fresh\");\n        }\n        file.close();\n    } else {\n        LOG_INFO(\"TransmitHistory: no history file found, starting fresh\");\n    }\n    spiLock->unlock();\n    dirty = false;\n}\n\nvoid TransmitHistory::setLastSentToMesh(uint16_t key)\n{\n    lastMillis[key] = millis();\n    uint32_t now = getTime();\n    if (now >= 2) {\n        history[key] = now;\n        dirty = true;\n        // Don't flush to disk on every transmit — flash has limited write endurance.\n        // The in-memory lastMillis map handles throttle during normal operation.\n        // Disk is flushed: before deep sleep (sleep.cpp) and periodically here,\n        // throttled to at most once per 5 minutes. Always save the first time\n        // after boot so a crash-reboot loop can't avoid persisting.\n        if (lastDiskSave == 0 || !Throttle::isWithinTimespanMs(lastDiskSave, SAVE_INTERVAL_MS)) {\n            if (saveToDisk()) {\n                lastDiskSave = millis();\n            }\n        }\n    }\n}\n\nuint32_t TransmitHistory::getLastSentToMeshEpoch(uint16_t key) const\n{\n    auto it = history.find(key);\n    if (it != history.end()) {\n        return it->second;\n    }\n    return 0;\n}\n\nuint32_t TransmitHistory::getLastSentToMeshMillis(uint16_t key) const\n{\n    // Prefer runtime millis value (accurate within this boot)\n    auto mit = lastMillis.find(key);\n    if (mit != lastMillis.end()) {\n        return mit->second;\n    }\n\n    // Fall back to epoch conversion (loaded from disk after reboot)\n    uint32_t storedEpoch = getLastSentToMeshEpoch(key);\n    if (storedEpoch == 0) {\n        return 0; // No stored time — module has never sent\n    }\n\n    uint32_t now = getTime();\n    if (now < 2) {\n        // No valid RTC time yet — can't convert to millis. Return 0 so throttle doesn't block.\n        return 0;\n    }\n\n    if (storedEpoch > now) {\n        // Stored time is in the future (clock went backwards?) — treat as stale\n        return 0;\n    }\n\n    uint32_t secondsAgo = now - storedEpoch;\n    uint32_t msAgo = secondsAgo * 1000;\n\n    // Guard against overflow: if the transmit was very long ago, just return 0 (won't throttle)\n    if (secondsAgo > 86400 || msAgo / 1000 != secondsAgo) {\n        return 0;\n    }\n\n    // Convert to a millis()-relative timestamp: millis() - msAgo\n    // This gives a value that, when passed to Throttle::isWithinTimespanMs(value, interval),\n    // correctly reports whether the transmit was within interval ms.\n    return millis() - msAgo;\n}\n\nbool TransmitHistory::saveToDisk()\n{\n    if (!dirty) {\n        return true;\n    }\n\n    spiLock->lock();\n\n    FSCom.mkdir(\"/prefs\");\n\n    // Remove old file first\n    if (FSCom.exists(FILENAME)) {\n        FSCom.remove(FILENAME);\n    }\n\n    auto file = FSCom.open(FILENAME, FILE_O_WRITE);\n    if (file) {\n        FileHeader header{};\n        header.magic = MAGIC;\n        header.version = VERSION;\n        header.count = (uint8_t)min((size_t)MAX_ENTRIES, history.size());\n\n        file.write((uint8_t *)&header, sizeof(header));\n\n        uint8_t written = 0;\n        for (const auto &[key, epochSeconds] : history) {\n            if (written >= MAX_ENTRIES)\n                break;\n            Entry entry{};\n            entry.key = key;\n            entry.epochSeconds = epochSeconds;\n            file.write((uint8_t *)&entry, sizeof(entry));\n            written++;\n        }\n        file.flush();\n        file.close();\n        LOG_DEBUG(\"TransmitHistory: saved %u entries to disk\", written);\n        dirty = false;\n        spiLock->unlock();\n        return true;\n    } else {\n        LOG_WARN(\"TransmitHistory: failed to open file for writing\");\n    }\n\n    spiLock->unlock();\n    return false;\n}\n\n#else\n// No filesystem available — provide stub with in-memory tracking\nTransmitHistory *transmitHistory = nullptr;\n\nTransmitHistory *TransmitHistory::getInstance()\n{\n    if (!transmitHistory) {\n        transmitHistory = new TransmitHistory();\n    }\n    return transmitHistory;\n}\n\nvoid TransmitHistory::loadFromDisk() {}\n\nvoid TransmitHistory::setLastSentToMesh(uint16_t key)\n{\n    lastMillis[key] = millis();\n}\n\nuint32_t TransmitHistory::getLastSentToMeshEpoch(uint16_t key) const\n{\n    return 0;\n}\n\nuint32_t TransmitHistory::getLastSentToMeshMillis(uint16_t key) const\n{\n    auto mit = lastMillis.find(key);\n    return (mit != lastMillis.end()) ? mit->second : 0;\n}\n\nbool TransmitHistory::saveToDisk()\n{\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/mesh/TransmitHistory.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <map>\n\n/**\n * TransmitHistory persists the last broadcast transmit time (epoch seconds) per portnum\n * to the filesystem so that throttle checks survive reboots/crashes.\n *\n * On boot, modules call getLastSentToMeshMillis() to recover a millis()-relative timestamp\n * from the stored epoch time, which plugs directly into existing throttle logic.\n *\n * On every broadcast transmit, modules call setLastSentToMesh() which updates the\n * in-memory cache and flushes to disk.\n *\n * Keys are meshtastic_PortNum values (one entry per portnum).\n */\n\n#include \"mesh/generated/meshtastic/portnums.pb.h\"\n\nclass TransmitHistory\n{\n  public:\n    static TransmitHistory *getInstance();\n\n    /**\n     * Load persisted transmit times from disk. Call once during init after filesystem is ready.\n     */\n    void loadFromDisk();\n\n    /**\n     * Record that a broadcast was sent for the given key right now.\n     * Stores epoch seconds and flushes to disk.\n     */\n    void setLastSentToMesh(uint16_t key);\n\n    /**\n     * Get the last transmit epoch seconds for a given key, or 0 if unknown.\n     */\n    uint32_t getLastSentToMeshEpoch(uint16_t key) const;\n\n    /**\n     * Convert a stored epoch timestamp into a millis()-relative timestamp suitable\n     * for use with Throttle::isWithinTimespanMs().\n     *\n     * Returns 0 if no valid time is stored or if the stored time is in the future\n     * (which shouldn't happen but guards against clock weirdness).\n     *\n     * Example: if the stored epoch is 300 seconds ago, and millis() is currently 10000,\n     * this returns 10000 - 300000 (wrapped appropriately for uint32_t arithmetic).\n     */\n    uint32_t getLastSentToMeshMillis(uint16_t key) const;\n\n    /**\n     * Flush dirty entries to disk. Called periodically or on demand.\n     *\n     * @return true if the data is persisted (or there was nothing to write), false on write/open failure.\n     */\n    bool saveToDisk();\n\n  private:\n    TransmitHistory() = default;\n\n    static constexpr const char *FILENAME = \"/prefs/transmit_history.dat\";\n    static constexpr uint32_t MAGIC = 0x54485354; // \"THST\"\n    static constexpr uint8_t VERSION = 1;\n    static constexpr uint8_t MAX_ENTRIES = 16;\n    static constexpr uint32_t SAVE_INTERVAL_MS = 5 * 60 * 1000; // 5 minutes\n\n    struct __attribute__((packed)) Entry {\n        uint16_t key;\n        uint32_t epochSeconds;\n    };\n\n    struct __attribute__((packed)) FileHeader {\n        uint32_t magic;\n        uint8_t version;\n        uint8_t count;\n    };\n\n    std::map<uint16_t, uint32_t> history;    // key -> epoch seconds (for disk persistence)\n    std::map<uint16_t, uint32_t> lastMillis; // key -> millis() value (for runtime throttle)\n    bool dirty = false;\n    uint32_t lastDiskSave = 0; // millis() of last disk flush\n};\n\nextern TransmitHistory *transmitHistory;\n"
  },
  {
    "path": "src/mesh/TypeConversions.cpp",
    "content": "#include \"TypeConversions.h\"\n#include \"mesh/generated/meshtastic/deviceonly.pb.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n\nmeshtastic_NodeInfo TypeConversions::ConvertToNodeInfo(const meshtastic_NodeInfoLite *lite)\n{\n    meshtastic_NodeInfo info = meshtastic_NodeInfo_init_default;\n\n    info.num = lite->num;\n    info.snr = lite->snr;\n    info.last_heard = lite->last_heard;\n    info.channel = lite->channel;\n    info.via_mqtt = lite->via_mqtt;\n    info.is_favorite = lite->is_favorite;\n    info.is_ignored = lite->is_ignored;\n    info.is_key_manually_verified = lite->bitfield & NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK;\n    info.is_muted = lite->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK;\n\n    if (lite->has_hops_away) {\n        info.has_hops_away = true;\n        info.hops_away = lite->hops_away;\n    }\n\n    if (lite->has_position) {\n        info.has_position = true;\n        if (lite->position.latitude_i != 0)\n            info.position.has_latitude_i = true;\n        info.position.latitude_i = lite->position.latitude_i;\n        if (lite->position.longitude_i != 0)\n            info.position.has_longitude_i = true;\n        info.position.longitude_i = lite->position.longitude_i;\n        if (lite->position.altitude != 0)\n            info.position.has_altitude = true;\n        info.position.altitude = lite->position.altitude;\n        info.position.location_source = lite->position.location_source;\n        info.position.time = lite->position.time;\n    }\n    if (lite->has_user) {\n        info.has_user = true;\n        info.user = ConvertToUser(lite->num, lite->user);\n    }\n    if (lite->has_device_metrics) {\n        info.has_device_metrics = true;\n        info.device_metrics = lite->device_metrics;\n    }\n    return info;\n}\n\nmeshtastic_PositionLite TypeConversions::ConvertToPositionLite(meshtastic_Position position)\n{\n    meshtastic_PositionLite lite = meshtastic_PositionLite_init_default;\n    lite.latitude_i = position.latitude_i;\n    lite.longitude_i = position.longitude_i;\n    lite.altitude = position.altitude;\n    lite.location_source = position.location_source;\n    lite.time = position.time;\n\n    return lite;\n}\n\nmeshtastic_Position TypeConversions::ConvertToPosition(meshtastic_PositionLite lite)\n{\n    meshtastic_Position position = meshtastic_Position_init_default;\n    if (lite.latitude_i != 0)\n        position.has_latitude_i = true;\n    position.latitude_i = lite.latitude_i;\n    if (lite.longitude_i != 0)\n        position.has_longitude_i = true;\n    position.longitude_i = lite.longitude_i;\n    if (lite.altitude != 0)\n        position.has_altitude = true;\n    position.altitude = lite.altitude;\n    position.location_source = lite.location_source;\n    position.time = lite.time;\n\n    return position;\n}\n\nmeshtastic_UserLite TypeConversions::ConvertToUserLite(meshtastic_User user)\n{\n    meshtastic_UserLite lite = meshtastic_UserLite_init_default;\n\n    strncpy(lite.long_name, user.long_name, sizeof(lite.long_name));\n    strncpy(lite.short_name, user.short_name, sizeof(lite.short_name));\n    lite.hw_model = user.hw_model;\n    lite.role = user.role;\n    lite.is_licensed = user.is_licensed;\n    memcpy(lite.macaddr, user.macaddr, sizeof(lite.macaddr));\n    memcpy(lite.public_key.bytes, user.public_key.bytes, sizeof(lite.public_key.bytes));\n    lite.public_key.size = user.public_key.size;\n    lite.has_is_unmessagable = user.has_is_unmessagable;\n    lite.is_unmessagable = user.is_unmessagable;\n    return lite;\n}\n\nmeshtastic_User TypeConversions::ConvertToUser(uint32_t nodeNum, meshtastic_UserLite lite)\n{\n    meshtastic_User user = meshtastic_User_init_default;\n\n    snprintf(user.id, sizeof(user.id), \"!%08x\", nodeNum);\n    strncpy(user.long_name, lite.long_name, sizeof(user.long_name));\n    strncpy(user.short_name, lite.short_name, sizeof(user.short_name));\n    user.hw_model = lite.hw_model;\n    user.role = lite.role;\n    user.is_licensed = lite.is_licensed;\n    memcpy(user.macaddr, lite.macaddr, sizeof(user.macaddr));\n    memcpy(user.public_key.bytes, lite.public_key.bytes, sizeof(user.public_key.bytes));\n    user.public_key.size = lite.public_key.size;\n    user.has_is_unmessagable = lite.has_is_unmessagable;\n    user.is_unmessagable = lite.is_unmessagable;\n\n    return user;\n}"
  },
  {
    "path": "src/mesh/TypeConversions.h",
    "content": "#include \"mesh/generated/meshtastic/deviceonly.pb.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n\n#pragma once\n#include \"NodeDB.h\"\n\nclass TypeConversions\n{\n  public:\n    static meshtastic_NodeInfo ConvertToNodeInfo(const meshtastic_NodeInfoLite *lite);\n    static meshtastic_PositionLite ConvertToPositionLite(meshtastic_Position position);\n    static meshtastic_Position ConvertToPosition(meshtastic_PositionLite lite);\n    static meshtastic_UserLite ConvertToUserLite(meshtastic_User user);\n    static meshtastic_User ConvertToUser(uint32_t nodeNum, meshtastic_UserLite lite);\n};\n"
  },
  {
    "path": "src/mesh/TypedQueue.h",
    "content": "#pragma once\n\n#include <cassert>\n#include <type_traits>\n\n#include \"concurrency/OSThread.h\"\n#include \"freertosinc.h\"\n\n#ifdef HAS_FREE_RTOS\n\n/**\n * A wrapper for freertos queues.  Note: each element object should be small\n * and POD (Plain Old Data type) as elements are memcpied by value.\n */\ntemplate <class T> class TypedQueue\n{\n    static_assert(std::is_standard_layout<T>::value, \"T must be standard layout\");\n    QueueHandle_t h;\n    concurrency::OSThread *reader = NULL;\n\n  public:\n    explicit TypedQueue(int maxElements) : h(xQueueCreate(maxElements, sizeof(T))) { assert(h); }\n\n    ~TypedQueue() { vQueueDelete(h); }\n\n    int numFree() { return uxQueueSpacesAvailable(h); }\n\n    bool isEmpty() { return uxQueueMessagesWaiting(h) == 0; }\n\n    int numUsed() { return uxQueueMessagesWaiting(h); }\n\n    /** euqueue a packet.  Also, maxWait used to default to portMAX_DELAY, but we now want to callers to THINK about what blocking\n     * they want */\n    bool enqueue(T x, TickType_t maxWait)\n    {\n        if (reader) {\n            reader->setInterval(0);\n            concurrency::mainDelay.interrupt();\n        }\n        return xQueueSendToBack(h, &x, maxWait) == pdTRUE;\n    }\n\n    bool enqueueFromISR(T x, BaseType_t *higherPriWoken)\n    {\n        if (reader) {\n            reader->setInterval(0);\n            concurrency::mainDelay.interruptFromISR(higherPriWoken);\n        }\n        return xQueueSendToBackFromISR(h, &x, higherPriWoken) == pdTRUE;\n    }\n\n    bool dequeue(T *p, TickType_t maxWait = portMAX_DELAY) { return xQueueReceive(h, p, maxWait) == pdTRUE; }\n\n    bool dequeueFromISR(T *p, BaseType_t *higherPriWoken) { return xQueueReceiveFromISR(h, p, higherPriWoken); }\n\n    /**\n     * Set a thread that is reading from this queue\n     * If a message is pushed to this queue that thread will be scheduled to run ASAP.\n     *\n     * Note: thread will not be automatically enabled, just have its interval set to 0\n     */\n    void setReader(concurrency::OSThread *t) { reader = t; }\n};\n\n#else\n\n#include <queue>\n\n/**\n * A wrapper for freertos queues.  Note: each element object should be small\n * and POD (Plain Old Data type) as elements are memcpied by value.\n */\ntemplate <class T> class TypedQueue\n{\n    std::queue<T> q;\n    concurrency::OSThread *reader = NULL;\n    int maxElements;\n\n  public:\n    explicit TypedQueue(int _maxElements) : maxElements(_maxElements) {}\n\n    int numFree()\n    {\n        if (maxElements <= 0)\n            return 1; // Always claim 1 free, because we can grow to any size\n        return maxElements - numUsed();\n    }\n\n    bool isEmpty() { return q.empty(); }\n\n    int numUsed() { return q.size(); }\n\n    bool enqueue(T x, TickType_t maxWait = portMAX_DELAY)\n    {\n        if (numFree() <= 0)\n            return false;\n\n        if (reader) {\n            reader->setInterval(0);\n            concurrency::mainDelay.interrupt();\n        }\n\n        q.push(x);\n        return true;\n    }\n\n    // bool enqueueFromISR(T x, BaseType_t *higherPriWoken) { return xQueueSendToBackFromISR(h, &x, higherPriWoken) == pdTRUE; }\n\n    bool dequeue(T *p, TickType_t maxWait = portMAX_DELAY)\n    {\n        if (isEmpty())\n            return false;\n        else {\n            *p = q.front();\n            q.pop();\n            return true;\n        }\n    }\n\n    // bool dequeueFromISR(T *p, BaseType_t *higherPriWoken) { return xQueueReceiveFromISR(h, p, higherPriWoken); }\n\n    void setReader(concurrency::OSThread *t) { reader = t; }\n};\n#endif"
  },
  {
    "path": "src/mesh/aes-ccm.cpp",
    "content": "/*\n * Counter with CBC-MAC (CCM) with AES\n *\n * Copyright (c) 2010-2012, Jouni Malinen <j@w1.fi>\n *\n * This software may be distributed under the terms of the BSD license.\n * See README for more details.\n */\n#define AES_BLOCK_SIZE 16\n#include \"aes-ccm.h\"\n#if !MESHTASTIC_EXCLUDE_PKI\n\n/**\n * Constant-time comparison of two byte arrays\n *\n * @param a First byte array to compare\n * @param b Second byte array to compare\n * @param len Number of bytes to compare\n * @return 0 if arrays are equal, -1 if different or if inputs are invalid\n */\nstatic int constant_time_compare(const void *a_, const void *b_, size_t len)\n{\n    /* Cast to volatile to prevent the compiler from optimizing out their comparison. */\n    const volatile uint8_t *volatile a = (const volatile uint8_t *volatile)a_;\n    const volatile uint8_t *volatile b = (const volatile uint8_t *volatile)b_;\n    if (len == 0)\n        return 0;\n    if (a == NULL || b == NULL)\n        return -1;\n    size_t i;\n    volatile uint8_t d = 0U;\n    for (i = 0U; i < len; i++) {\n        d |= (a[i] ^ b[i]);\n    }\n    /* Constant time bit arithmetic to convert d > 0 to -1 and d = 0 to 0. */\n    return (1 & (((unsigned int)d - 1) >> 8)) - 1;\n}\n\nstatic void WPA_PUT_BE16(uint8_t *a, uint16_t val)\n{\n    a[0] = val >> 8;\n    a[1] = val & 0xff;\n}\n\nstatic void xor_aes_block(uint8_t *dst, const uint8_t *src)\n{\n    for (uint8_t i = 0; i < AES_BLOCK_SIZE; i++) {\n        dst[i] ^= src[i];\n    }\n}\nstatic void aes_ccm_auth_start(size_t M, size_t L, const uint8_t *nonce, const uint8_t *aad, size_t aad_len, size_t plain_len,\n                               uint8_t *x)\n{\n    uint8_t aad_buf[2 * AES_BLOCK_SIZE];\n    uint8_t b[AES_BLOCK_SIZE];\n    /* Authentication */\n    /* B_0: Flags | Nonce N | l(m) */\n    b[0] = aad_len ? 0x40 : 0 /* Adata */;\n    b[0] |= (((M - 2) / 2) /* M' */ << 3);\n    b[0] |= (L - 1) /* L' */;\n    memcpy(&b[1], nonce, 15 - L);\n    WPA_PUT_BE16(&b[AES_BLOCK_SIZE - L], plain_len);\n    crypto->aesEncrypt(b, x); /* X_1 = E(K, B_0) */\n    if (!aad_len)\n        return;\n    WPA_PUT_BE16(aad_buf, aad_len);\n    memcpy(aad_buf + 2, aad, aad_len);\n    memset(aad_buf + 2 + aad_len, 0, sizeof(aad_buf) - 2 - aad_len);\n    xor_aes_block(aad_buf, x);\n    crypto->aesEncrypt(aad_buf, x); /* X_2 = E(K, X_1 XOR B_1) */\n    if (aad_len > AES_BLOCK_SIZE - 2) {\n        xor_aes_block(&aad_buf[AES_BLOCK_SIZE], x);\n        /* X_3 = E(K, X_2 XOR B_2) */\n        crypto->aesEncrypt(&aad_buf[AES_BLOCK_SIZE], x);\n    }\n}\nstatic void aes_ccm_auth(const uint8_t *data, size_t len, uint8_t *x)\n{\n    size_t last = len % AES_BLOCK_SIZE;\n    size_t i;\n    for (i = 0; i < len / AES_BLOCK_SIZE; i++) {\n        /* X_i+1 = E(K, X_i XOR B_i) */\n        xor_aes_block(x, data);\n        data += AES_BLOCK_SIZE;\n        crypto->aesEncrypt(x, x);\n    }\n    if (last) {\n        /* XOR zero-padded last block */\n        for (i = 0; i < last; i++)\n            x[i] ^= *data++;\n        crypto->aesEncrypt(x, x);\n    }\n}\nstatic void aes_ccm_encr_start(size_t L, const uint8_t *nonce, uint8_t *a)\n{\n    /* A_i = Flags | Nonce N | Counter i */\n    a[0] = L - 1; /* Flags = L' */\n    memcpy(&a[1], nonce, 15 - L);\n}\nstatic void aes_ccm_encr(size_t L, const uint8_t *in, size_t len, uint8_t *out, uint8_t *a)\n{\n    size_t last = len % AES_BLOCK_SIZE;\n    size_t i;\n    /* crypt = msg XOR (S_1 | S_2 | ... | S_n) */\n    for (i = 1; i <= len / AES_BLOCK_SIZE; i++) {\n        WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], i);\n        /* S_i = E(K, A_i) */\n        crypto->aesEncrypt(a, out);\n        xor_aes_block(out, in);\n        out += AES_BLOCK_SIZE;\n        in += AES_BLOCK_SIZE;\n    }\n    if (last) {\n        WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], i);\n        crypto->aesEncrypt(a, out);\n        /* XOR zero-padded last block */\n        for (i = 0; i < last; i++)\n            *out++ ^= *in++;\n    }\n}\nstatic void aes_ccm_encr_auth(size_t M, const uint8_t *x, uint8_t *a, uint8_t *auth)\n{\n    size_t i;\n    uint8_t tmp[AES_BLOCK_SIZE];\n    /* U = T XOR S_0; S_0 = E(K, A_0) */\n    WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], 0);\n    crypto->aesEncrypt(a, tmp);\n    for (i = 0; i < M; i++)\n        auth[i] = x[i] ^ tmp[i];\n}\nstatic void aes_ccm_decr_auth(size_t M, uint8_t *a, const uint8_t *auth, uint8_t *t)\n{\n    size_t i;\n    uint8_t tmp[AES_BLOCK_SIZE];\n    /* U = T XOR S_0; S_0 = E(K, A_0) */\n    WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], 0);\n    crypto->aesEncrypt(a, tmp);\n    for (i = 0; i < M; i++)\n        t[i] = auth[i] ^ tmp[i];\n}\n/* AES-CCM with fixed L=2 and aad_len <= 30 assumption */\nint aes_ccm_ae(const uint8_t *key, size_t key_len, const uint8_t *nonce, size_t M, const uint8_t *plain, size_t plain_len,\n               const uint8_t *aad, size_t aad_len, uint8_t *crypt, uint8_t *auth)\n{\n    const size_t L = 2;\n    uint8_t x[AES_BLOCK_SIZE], a[AES_BLOCK_SIZE];\n    if (aad_len > 30 || M > AES_BLOCK_SIZE)\n        return -1;\n    crypto->aesSetKey(key, key_len);\n    aes_ccm_auth_start(M, L, nonce, aad, aad_len, plain_len, x);\n    aes_ccm_auth(plain, plain_len, x);\n    /* Encryption */\n    aes_ccm_encr_start(L, nonce, a);\n    aes_ccm_encr(L, plain, plain_len, crypt, a);\n    aes_ccm_encr_auth(M, x, a, auth);\n    return 0;\n}\n/* AES-CCM with fixed L=2 and aad_len <= 30 assumption */\nbool aes_ccm_ad(const uint8_t *key, size_t key_len, const uint8_t *nonce, size_t M, const uint8_t *crypt, size_t crypt_len,\n                const uint8_t *aad, size_t aad_len, const uint8_t *auth, uint8_t *plain)\n{\n    const size_t L = 2;\n    uint8_t x[AES_BLOCK_SIZE], a[AES_BLOCK_SIZE];\n    uint8_t t[AES_BLOCK_SIZE];\n    if (aad_len > 30 || M > AES_BLOCK_SIZE)\n        return false;\n    crypto->aesSetKey(key, key_len);\n    /* Decryption */\n    aes_ccm_encr_start(L, nonce, a);\n    aes_ccm_decr_auth(M, a, auth, t);\n    /* plaintext = msg XOR (S_1 | S_2 | ... | S_n) */\n    aes_ccm_encr(L, crypt, crypt_len, plain, a);\n    aes_ccm_auth_start(M, L, nonce, aad, aad_len, crypt_len, x);\n    aes_ccm_auth(plain, crypt_len, x);\n    if (constant_time_compare(x, t, M) != 0) {\n        return false;\n    }\n    return true;\n}\n#endif"
  },
  {
    "path": "src/mesh/aes-ccm.h",
    "content": "#pragma once\n#include \"CryptoEngine.h\"\n#if !MESHTASTIC_EXCLUDE_PKI\n\nint aes_ccm_ae(const uint8_t *key, size_t key_len, const uint8_t *nonce, size_t M, const uint8_t *plain, size_t plain_len,\n               const uint8_t *aad, size_t aad_len, uint8_t *crypt, uint8_t *auth);\n\nbool aes_ccm_ad(const uint8_t *key, size_t key_len, const uint8_t *nonce, size_t M, const uint8_t *crypt, size_t crypt_len,\n                const uint8_t *aad, size_t aad_len, const uint8_t *auth, uint8_t *plain);\n#endif"
  },
  {
    "path": "src/mesh/api/PacketAPI.cpp",
    "content": "#ifdef USE_PACKET_API\n\n#include \"api/PacketAPI.h\"\n#include \"MeshService.h\"\n#include \"PowerFSM.h\"\n#include \"RadioInterface.h\"\n#include \"modules/NodeInfoModule.h\"\n\nPacketAPI *packetAPI = nullptr;\n\nPacketAPI *PacketAPI::create(PacketServer *_server)\n{\n    if (!packetAPI) {\n        packetAPI = new PacketAPI(_server);\n    }\n    return packetAPI;\n}\n\nPacketAPI::PacketAPI(PacketServer *_server)\n    : concurrency::OSThread(\"PacketAPI\"), isConnected(false), programmingMode(false), server(_server)\n{\n    api_type = TYPE_PACKET;\n}\n\nint32_t PacketAPI::runOnce()\n{\n    bool success = false;\n#ifndef ARCH_PORTDUINO\n    if (config.bluetooth.enabled) {\n        if (!programmingMode) {\n            // in programmingMode we don't send any packets to the client except this one notify\n            programmingMode = true;\n            success = notifyProgrammingMode();\n        }\n    } else\n#endif\n    {\n        success = sendPacket();\n    }\n    success |= receivePacket();\n    return success ? 10 : 50;\n}\n\nbool PacketAPI::receivePacket(void)\n{\n    bool data_received = false;\n    while (server->hasData()) {\n        isConnected = true;\n        data_received = true;\n\n        powerFSM.trigger(EVENT_CONTACT_FROM_PHONE);\n        lastContactMsec = millis();\n\n        meshtastic_ToRadio *mr;\n        auto p = server->receivePacket()->move();\n        int id = p->getPacketId();\n        LOG_DEBUG(\"Received packet id=%u\", id);\n        mr = (meshtastic_ToRadio *)&static_cast<DataPacket<meshtastic_ToRadio> *>(p.get())->getData();\n\n        switch (mr->which_payload_variant) {\n        case meshtastic_ToRadio_packet_tag: {\n            meshtastic_MeshPacket *mp = &mr->packet;\n            mp->transport_mechanism = meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API;\n            printPacket(\"PACKET FROM QUEUE\", mp);\n            service->handleToRadio(*mp);\n            break;\n        }\n        case meshtastic_ToRadio_want_config_id_tag: {\n            uint32_t config_nonce = mr->want_config_id;\n            LOG_INFO(\"Screen wants config, nonce=%u\", config_nonce);\n            handleStartConfig();\n            break;\n        }\n        case meshtastic_ToRadio_heartbeat_tag:\n            if (mr->heartbeat.nonce == 1) {\n                if (nodeInfoModule) {\n                    LOG_INFO(\"Broadcasting nodeinfo ping\");\n                    nodeInfoModule->sendOurNodeInfo(NODENUM_BROADCAST, true, 0, true);\n                }\n            } else {\n                LOG_DEBUG(\"Got client heartbeat\");\n            }\n            break;\n        default:\n            LOG_ERROR(\"Error: unhandled meshtastic_ToRadio variant: %d\", mr->which_payload_variant);\n            break;\n        }\n    }\n    return data_received;\n}\n\nbool PacketAPI::sendPacket(void)\n{\n    if (server->available()) {\n        // fill dummy buffer; we don't use it, we directly send the fromRadio structure\n        uint32_t len = getFromRadio(txBuf);\n        if (len != 0) {\n            static uint32_t id = 0;\n            fromRadioScratch.id = ++id;\n            bool result = server->sendPacket(DataPacket<meshtastic_FromRadio>(id, fromRadioScratch));\n            if (!result) {\n                LOG_ERROR(\"send queue full\");\n            }\n            return result;\n        }\n    }\n    return false;\n}\n\nbool PacketAPI::notifyProgrammingMode(void)\n{\n    // tell the client we are in programming mode by sending only the bluetooth config state\n    LOG_INFO(\"force client into programmingMode\");\n    memset(&fromRadioScratch, 0, sizeof(fromRadioScratch));\n    fromRadioScratch.id = nodeDB->getNodeNum();\n    fromRadioScratch.which_payload_variant = meshtastic_FromRadio_config_tag;\n    fromRadioScratch.config.which_payload_variant = meshtastic_Config_bluetooth_tag;\n    fromRadioScratch.config.payload_variant.bluetooth = config.bluetooth;\n    return server->sendPacket(DataPacket<meshtastic_FromRadio>(0, fromRadioScratch));\n}\n\n/**\n * return true if we got (once!) contact from our client and the server send queue is not full\n */\nbool PacketAPI::checkIsConnected()\n{\n    isConnected |= server->hasData();\n    return isConnected && server->available();\n}\n\n#endif"
  },
  {
    "path": "src/mesh/api/PacketAPI.h",
    "content": "#pragma once\n\n#include \"PhoneAPI.h\"\n#include \"comms/PacketServer.h\"\n#include \"concurrency/OSThread.h\"\n\n/**\n * A version of the phone API used for inter task communication based on protobuf packets, e.g.\n * between two tasks running on CPU0 and CPU1, respectively.\n *\n */\nclass PacketAPI : public PhoneAPI, public concurrency::OSThread\n{\n  public:\n    static PacketAPI *create(PacketServer *_server);\n    virtual ~PacketAPI(){};\n    virtual int32_t runOnce();\n    // Check the current underlying physical queue to see if the client is fetching packets\n    bool checkIsConnected() override;\n\n  protected:\n    explicit PacketAPI(PacketServer *_server);\n\n    void onNowHasData(uint32_t fromRadioNum) override {}\n    void onConnectionChanged(bool connected) override {}\n\n  private:\n    bool receivePacket(void);\n    bool sendPacket(void);\n    bool notifyProgrammingMode(void);\n\n    bool isConnected;\n    bool programmingMode;\n    PacketServer *server;\n    uint8_t txBuf[MAX_TO_FROM_RADIO_SIZE] = {0}; // dummy buf to obey PhoneAPI\n};\n\nextern PacketAPI *packetAPI;"
  },
  {
    "path": "src/mesh/api/ServerAPI.cpp",
    "content": "#include \"ServerAPI.h\"\n#include \"Throttle.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n\nstatic constexpr uint32_t TCP_IDLE_TIMEOUT_MS = 15 * 60 * 1000UL;\n\ntemplate <typename T>\nServerAPI<T>::ServerAPI(T &_client) : StreamAPI(&client), concurrency::OSThread(\"ServerAPI\"), client(_client)\n{\n    LOG_INFO(\"Incoming API connection\");\n}\n\ntemplate <typename T> ServerAPI<T>::~ServerAPI()\n{\n    client.stop();\n}\n\ntemplate <typename T> void ServerAPI<T>::close()\n{\n    client.stop(); // drop tcp connection\n    StreamAPI::close();\n}\n\n/// Check the current underlying physical link to see if the client is currently connected\ntemplate <typename T> bool ServerAPI<T>::checkIsConnected()\n{\n    return client.connected();\n}\n\ntemplate <class T> int32_t ServerAPI<T>::runOnce()\n{\n    if (client.connected()) {\n        if (lastContactMsec > 0 && !Throttle::isWithinTimespanMs(lastContactMsec, TCP_IDLE_TIMEOUT_MS)) {\n            LOG_WARN(\"TCP connection timeout, no data for %lu ms\", (unsigned long)(millis() - lastContactMsec));\n            close();\n            enabled = false;\n            return 0;\n        }\n        return StreamAPI::runOncePart();\n    } else {\n        LOG_INFO(\"Client dropped connection, suspend API service\");\n        close();\n        enabled = false; // we no longer need to run\n        return 0;\n    }\n}\n\ntemplate <class T, class U> APIServerPort<T, U>::APIServerPort(int port) : U(port), concurrency::OSThread(\"ApiServer\") {}\n\ntemplate <class T, class U> void APIServerPort<T, U>::init()\n{\n    U::begin();\n}\n\ntemplate <class T, class U> int32_t APIServerPort<T, U>::runOnce()\n{\n    // Clean up previous connection if its client already disconnected\n    if (openAPI && !openAPI->checkIsConnected()) {\n        openAPI.reset();\n    }\n\n#ifdef ARCH_ESP32\n#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)\n    auto client = U::accept();\n#else\n    auto client = U::available();\n#endif\n#elif defined(ARCH_RP2040) || defined(ARCH_NRF52)\n    auto client = U::accept();\n#else\n    auto client = U::available();\n#endif\n    if (client) {\n        // Close any previous connection (see FIXME in header file)\n        if (openAPI) {\n#if RAK_4631\n            // RAK13800 Ethernet requests periodically take more time\n            // This backoff addresses most cases keeping max wait < 1s\n            // Reconnections are delayed by full wait time\n            if (waitTime < 400) {\n                waitTime *= 2;\n                LOG_INFO(\"Previous TCP connection still open, try again in %dms\", waitTime);\n                return waitTime;\n            }\n#endif\n            LOG_INFO(\"Force close previous TCP connection\");\n            openAPI.reset();\n        }\n\n        openAPI.reset(new T(client));\n    }\n\n#if RAK_4631\n    waitTime = 100;\n#endif\n    return 100; // only check occasionally for incoming connections\n}"
  },
  {
    "path": "src/mesh/api/ServerAPI.h",
    "content": "#pragma once\n\n#include \"StreamAPI.h\"\n#include <memory>\n\n#define SERVER_API_DEFAULT_PORT 4403\n\n/**\n * Provides both debug printing and, if the client starts sending protobufs to us, switches to send/receive protobufs\n * (and starts dropping debug printing - FIXME, eventually those prints should be encapsulated in protobufs).\n */\ntemplate <class T> class ServerAPI : public StreamAPI, private concurrency::OSThread\n{\n  private:\n    T client;\n\n  public:\n    explicit ServerAPI(T &_client);\n\n    virtual ~ServerAPI();\n\n    /// override close to also shutdown the TCP link\n    virtual void close();\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() override;\n\n  protected:\n    /// We override this method to prevent publishing EVENT_SERIAL_CONNECTED/DISCONNECTED for wifi links (we want the board to\n    /// stay in the POWERED state to prevent disabling wifi)\n    virtual void onConnectionChanged(bool connected) override {}\n\n    virtual int32_t runOnce() override; // Check for dropped client connections\n};\n\n/**\n * Listens for incoming connections and does accepts and creates instances of ServerAPI as needed\n */\ntemplate <class T, class U> class APIServerPort : public U, private concurrency::OSThread\n{\n    /** The currently open port\n     *\n     * FIXME: We currently only allow one open TCP connection at a time, because we depend on the loop() call in this class to\n     * delegate to the worker.  Once coroutines are implemented we can relax this restriction.\n     */\n    std::unique_ptr<T> openAPI;\n#if defined(RAK_4631) || defined(RAK11310)\n    // Track wait time for RAK13800 Ethernet requests\n    int32_t waitTime = 100;\n#endif\n\n  public:\n    explicit APIServerPort(int port);\n\n    void init();\n\n  protected:\n    int32_t runOnce() override;\n};\n"
  },
  {
    "path": "src/mesh/api/WiFiServerAPI.cpp",
    "content": "#include \"configuration.h\"\n#include <Arduino.h>\n\n#if HAS_WIFI\n#include \"WiFiServerAPI.h\"\n\nstatic WiFiServerPort *apiPort;\n\nvoid initApiServer(int port)\n{\n    // Start API server on port 4403\n    if (!apiPort) {\n        apiPort = new WiFiServerPort(port);\n        LOG_INFO(\"API server listen on TCP port %d\", port);\n        apiPort->init();\n    }\n}\nvoid deInitApiServer()\n{\n    if (apiPort) {\n        delete apiPort;\n        apiPort = nullptr;\n    }\n}\n\nWiFiServerAPI::WiFiServerAPI(WiFiClient &_client) : ServerAPI(_client)\n{\n    api_type = TYPE_WIFI;\n    LOG_INFO(\"Incoming wifi connection\");\n}\n\nWiFiServerPort::WiFiServerPort(int port) : APIServerPort(port) {}\n#endif"
  },
  {
    "path": "src/mesh/api/WiFiServerAPI.h",
    "content": "#pragma once\n\n#include \"ServerAPI.h\"\n#include <WiFi.h>\n\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n\n/**\n * Provides both debug printing and, if the client starts sending protobufs to us, switches to send/receive protobufs\n * (and starts dropping debug printing - FIXME, eventually those prints should be encapsulated in protobufs).\n */\nclass WiFiServerAPI : public ServerAPI<WiFiClient>\n{\n  public:\n    explicit WiFiServerAPI(WiFiClient &_client);\n};\n\n/**\n * Listens for incoming connections and does accepts and creates instances of WiFiServerAPI as needed\n */\nclass WiFiServerPort : public APIServerPort<WiFiServerAPI, WiFiServer>\n{\n  public:\n    explicit WiFiServerPort(int port);\n};\n\nvoid initApiServer(int port = SERVER_API_DEFAULT_PORT);\nvoid deInitApiServer();"
  },
  {
    "path": "src/mesh/api/ethServerAPI.cpp",
    "content": "#include \"configuration.h\"\n#include <Arduino.h>\n\n#if HAS_ETHERNET && !defined(USE_WS5500)\n\n#include \"ethServerAPI.h\"\n\nstatic ethServerPort *apiPort;\n\nvoid initApiServer(int port)\n{\n    // Start API server on port 4403\n    if (!apiPort) {\n        apiPort = new ethServerPort(port);\n        LOG_INFO(\"API server listening on TCP port %d\", port);\n        apiPort->init();\n    }\n}\n\nvoid deInitApiServer()\n{\n    if (apiPort) {\n        LOG_INFO(\"Deinit API server\");\n        delete apiPort;\n        apiPort = nullptr;\n    }\n}\n\nethServerAPI::ethServerAPI(EthernetClient &_client) : ServerAPI(_client)\n{\n    LOG_INFO(\"Incoming ethernet connection\");\n    api_type = TYPE_ETH;\n}\n\nethServerPort::ethServerPort(int port) : APIServerPort(port) {}\n\n#endif"
  },
  {
    "path": "src/mesh/api/ethServerAPI.h",
    "content": "#pragma once\n\n#include \"ServerAPI.h\"\n#ifndef USE_WS5500\n#include <RAK13800_W5100S.h>\n\n/**\n * Provides both debug printing and, if the client starts sending protobufs to us, switches to send/receive protobufs\n * (and starts dropping debug printing - FIXME, eventually those prints should be encapsulated in protobufs).\n */\nclass ethServerAPI : public ServerAPI<EthernetClient>\n{\n  public:\n    explicit ethServerAPI(EthernetClient &_client);\n};\n\n/**\n * Listens for incoming connections and does accepts and creates instances of EthernetServerAPI as needed\n */\nclass ethServerPort : public APIServerPort<ethServerAPI, EthernetServer>\n{\n  public:\n    explicit ethServerPort(int port);\n};\n\nvoid initApiServer(int port = SERVER_API_DEFAULT_PORT);\nvoid deInitApiServer();\n#endif\n"
  },
  {
    "path": "src/mesh/compression/unishox2.cpp",
    "content": "/*\n * Copyright (C) 2020 Siara Logics (cc)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @author Arundale Ramanathan\n *\n * Port for Particle (particle.io) / Aruino - Jonathan Greenblatt\n */\n/**\n * @file unishox2.c\n * @author Arundale Ramanathan, James Z. M. Gao\n * @brief Main code of Unishox2 Compression and Decompression library\n *\n * This file implements the code for the Unishox API function \\n\n * defined in unishox2.h\n */\n\n#include <ctype.h>\n#include <limits.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"unishox2.h\"\n\n/// uint8_t is unsigned char\ntypedef unsigned char uint8_t;\n\nconst char *USX_FREQ_SEQ_DFLT[] = {\"\\\": \\\"\", \"\\\": \", \"</\", \"=\\\"\", \"\\\":\\\"\", \"://\"};\nconst char *USX_FREQ_SEQ_TXT[] = {\" the \", \" and \", \"tion\", \" with\", \"ing\", \"ment\"};\nconst char *USX_FREQ_SEQ_URL[] = {\"https://\", \"www.\", \".com\", \"http://\", \".org\", \".net\"};\nconst char *USX_FREQ_SEQ_JSON[] = {\"\\\": \\\"\", \"\\\": \", \"\\\",\", \"}}}\", \"\\\":\\\"\", \"}}\"};\nconst char *USX_FREQ_SEQ_HTML[] = {\"</\", \"=\\\"\", \"div\", \"href\", \"class\", \"<p>\"};\nconst char *USX_FREQ_SEQ_XML[] = {\"</\", \"=\\\"\", \"\\\">\", \"<?xml version=\\\"1.0\\\"\", \"xmlns:\", \"://\"};\nconst char *USX_TEMPLATES[] = {\"tfff-of-tfTtf:rf:rf.fffZ\", \"tfff-of-tf\", \"(fff) fff-ffff\", \"tf:rf:rf\", 0};\n\n/// possible horizontal sets and states\nenum { USX_ALPHA = 0, USX_SYM, USX_NUM, USX_DICT, USX_DELTA, USX_NUM_TEMP };\n\n/// This 2D array has the characters for the sets USX_ALPHA, USX_SYM and USX_NUM. Where a character cannot fit into a uint8_t, 0\n/// is used and handled in code.\nuint8_t usx_sets[][28] = {{0,   ' ', 'e', 't', 'a', 'o', 'i', 'n', 's', 'r', 'l', 'c', 'd', 'h',\n                           'u', 'p', 'm', 'b', 'g', 'w', 'f', 'y', 'v', 'k', 'q', 'j', 'x', 'z'},\n                          {'\"',  '{', '}', '_', '<', '>', ':', '\\n', 0,    '[', ']', '\\\\', ';', '\\'',\n                           '\\t', '@', '*', '&', '?', '!', '^', '|',  '\\r', '~', '`', 0,    0,   0},\n                          {0,   ',', '.', '0', '1', '9', '2', '5', '-', '/', '3', '4', '6', '7',\n                           '8', '(', ')', ' ', '=', '+', '$', '%', '#', 0,   0,   0,   0,   0}};\n\n/// Stores position of letter in usx_sets.\n/// First 3 bits - position in usx_hcodes\n/// Next  5 bits - position in usx_vcodes\nuint8_t usx_code_94[94];\n\n/// Vertical codes starting from the MSB\nuint8_t usx_vcodes[] = {0x00, 0x40, 0x60, 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xD8, 0xE0, 0xE4, 0xE8, 0xEC,\n                        0xEE, 0xF0, 0xF2, 0xF4, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF};\n\n/// Length of each veritical code\nuint8_t usx_vcode_lens[] = {2, 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8};\n\n/// Vertical Codes and Set number for frequent sequences in sets USX_SYM and USX_NUM. First 3 bits indicate set (USX_SYM/USX_NUM)\n/// and rest are vcode positions\nuint8_t usx_freq_codes[] = {(1 << 5) + 25, (1 << 5) + 26, (1 << 5) + 27, (2 << 5) + 23, (2 << 5) + 24, (2 << 5) + 25};\n\n/// Not used\nconst int UTF8_MASK[] = {0xE0, 0xF0, 0xF8};\n/// Not used\nconst int UTF8_PREFIX[] = {0xC0, 0xE0, 0xF0};\n\n/// Minimum length to consider as repeating sequence\n#define NICE_LEN 5\n\n/// Set (USX_NUM - 2) and vertical code (26) for encoding repeating letters\n#define RPT_CODE ((2 << 5) + 26)\n/// Set (USX_NUM - 2) and vertical code (27) for encoding terminator\n#define TERM_CODE ((2 << 5) + 27)\n/// Set (USX_SYM - 1) and vertical code (7) for encoding Line feed \\\\n\n#define LF_CODE ((1 << 5) + 7)\n/// Set (USX_NUM - 1) and vertical code (8) for encoding \\\\r\\\\n\n#define CRLF_CODE ((1 << 5) + 8)\n/// Set (USX_NUM - 1) and vertical code (22) for encoding \\\\r\n#define CR_CODE ((1 << 5) + 22)\n/// Set (USX_NUM - 1) and vertical code (14) for encoding \\\\t\n#define TAB_CODE ((1 << 5) + 14)\n/// Set (USX_NUM - 2) and vertical code (17) for space character when it appears in USX_NUM state \\\\r\n#define NUM_SPC_CODE ((2 << 5) + 17)\n\n/// Code for special code (11111) when state=USX_DELTA\n#define UNI_STATE_SPL_CODE 0xF8\n/// Length of Code for special code when state=USX_DELTA\n#define UNI_STATE_SPL_CODE_LEN 5\n/// Code for switch code when state=USX_DELTA\n#define UNI_STATE_SW_CODE 0x80\n/// Length of Code for Switch code when state=USX_DELTA\n#define UNI_STATE_SW_CODE_LEN 2\n\n/// Switch code in USX_ALPHA and USX_NUM 00\n#define SW_CODE 0\n/// Length of Switch code\n#define SW_CODE_LEN 2\n/// Terminator bit sequence for Preset 1. Length varies depending on state as per following macros\n#define TERM_BYTE_PRESET_1 0\n/// Length of Terminator bit sequence when state is lower\n#define TERM_BYTE_PRESET_1_LEN_LOWER 6\n/// Length of Terminator bit sequence when state is upper\n#define TERM_BYTE_PRESET_1_LEN_UPPER 4\n\n/// Offset at which usx_code_94 starts\n#define USX_OFFSET_94 33\n\n/// global to indicate whether initialization is complete or not\nuint8_t is_inited = 0;\n\n/// Fills the usx_code_94 94 letter array based on sets of characters at usx_sets \\n\n/// For each element in usx_code_94, first 3 msb bits is set (USX_ALPHA / USX_SYM / USX_NUM) \\n\n/// and the rest 5 bits indicate the vertical position in the corresponding set\nvoid init_coder()\n{\n    if (is_inited)\n        return;\n    memset(usx_code_94, '\\0', sizeof(usx_code_94));\n    for (int i = 0; i < 3; i++) {\n        for (int j = 0; j < 28; j++) {\n            uint8_t c = usx_sets[i][j];\n            if (c > 32) {\n                usx_code_94[c - USX_OFFSET_94] = (i << 5) + j;\n                if (c >= 'a' && c <= 'z')\n                    usx_code_94[c - USX_OFFSET_94 - ('a' - 'A')] = (i << 5) + j;\n            }\n        }\n    }\n    is_inited = 1;\n}\n\n/// Mask for retrieving each code to be encoded according to its length\nunsigned int usx_mask[] = {0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF};\n\n/// Appends specified number of bits to the output (out) \\n\n/// If maximum limit (olen) is reached, -1 is returned \\n\n/// Otherwise clen bits in code are appended to out starting with MSB\nint append_bits(char *out, int olen, int ol, uint8_t code, int clen)\n{\n\n    // printf(\"%d,%x,%d,%d\\n\", ol, code, clen, state);\n\n    while (clen > 0) {\n        int oidx;\n        unsigned char a_byte;\n\n        uint8_t cur_bit = ol % 8;\n        uint8_t blen = clen;\n        a_byte = code & usx_mask[blen - 1];\n        a_byte >>= cur_bit;\n        if (blen + cur_bit > 8)\n            blen = (8 - cur_bit);\n        oidx = ol / 8;\n        if (oidx < 0 || olen <= oidx)\n            return -1;\n        if (cur_bit == 0)\n            out[oidx] = a_byte;\n        else\n            out[oidx] |= a_byte;\n        code <<= blen;\n        ol += blen;\n        clen -= blen;\n    }\n    return ol;\n}\n\n/// This is a safe call to append_bits() making sure it does not write past olen\n#define SAFE_APPEND_BITS(exp)                                                                                                    \\\n    do {                                                                                                                         \\\n        const int newidx = (exp);                                                                                                \\\n        if (newidx < 0)                                                                                                          \\\n            return newidx;                                                                                                       \\\n    } while (0)\n\n/// Appends switch code to out depending on the state (USX_DELTA or other)\nint append_switch_code(char *out, int olen, int ol, uint8_t state)\n{\n    if (state == USX_DELTA) {\n        SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, UNI_STATE_SPL_CODE, UNI_STATE_SPL_CODE_LEN));\n        SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, UNI_STATE_SW_CODE, UNI_STATE_SW_CODE_LEN));\n    } else\n        SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, SW_CODE, SW_CODE_LEN));\n    return ol;\n}\n\n/// Appends given horizontal and veritical code bits to out\nint append_code(char *out, int olen, int ol, uint8_t code, uint8_t *state, const uint8_t usx_hcodes[],\n                const uint8_t usx_hcode_lens[])\n{\n    uint8_t hcode = code >> 5;\n    uint8_t vcode = code & 0x1F;\n    if (!usx_hcode_lens[hcode] && hcode != USX_ALPHA)\n        return ol;\n    switch (hcode) {\n    case USX_ALPHA:\n        if (*state != USX_ALPHA) {\n            SAFE_APPEND_BITS(ol = append_switch_code(out, olen, ol, *state));\n            SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n            *state = USX_ALPHA;\n        }\n        break;\n    case USX_SYM:\n        SAFE_APPEND_BITS(ol = append_switch_code(out, olen, ol, *state));\n        SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, usx_hcodes[USX_SYM], usx_hcode_lens[USX_SYM]));\n        break;\n    case USX_NUM:\n        if (*state != USX_NUM) {\n            SAFE_APPEND_BITS(ol = append_switch_code(out, olen, ol, *state));\n            SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, usx_hcodes[USX_NUM], usx_hcode_lens[USX_NUM]));\n            if (usx_sets[hcode][vcode] >= '0' && usx_sets[hcode][vcode] <= '9')\n                *state = USX_NUM;\n        }\n    }\n    SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, usx_vcodes[vcode], usx_vcode_lens[vcode]));\n    return ol;\n}\n\n/// Length of bits used to represent count for each level\nconst uint8_t count_bit_lens[5] = {2, 4, 7, 11, 16};\n/// Cumulative counts represented at each level\nconst int32_t count_adder[5] = {4, 20, 148, 2196, 67732};\n/// Codes used to specify the level that the count belongs to\nconst uint8_t count_codes[] = {0x01, 0x82, 0xC3, 0xE4, 0xF4};\n/// Encodes given count to out\nint encodeCount(char *out, int olen, int ol, int count)\n{\n    // First five bits are code and Last three bits of codes represent length\n    for (int i = 0; i < 5; i++) {\n        if (count < count_adder[i]) {\n            SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, (count_codes[i] & 0xF8), count_codes[i] & 0x07));\n            uint16_t count16 = (count - (i ? count_adder[i - 1] : 0)) << (16 - count_bit_lens[i]);\n            if (count_bit_lens[i] > 8) {\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, count16 >> 8, 8));\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, count16 & 0xFF, count_bit_lens[i] - 8));\n            } else\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, count16 >> 8, count_bit_lens[i]));\n            return ol;\n        }\n    }\n    return ol;\n}\n\n/// Length of bits used to represent delta code for each level\nconst uint8_t uni_bit_len[5] = {6, 12, 14, 16, 21};\n/// Cumulative delta codes represented at each level\nconst int32_t uni_adder[5] = {0, 64, 4160, 20544, 86080};\n\n/// Encodes the unicode code point given by code to out. prev_code is used to calculate the delta\nint encodeUnicode(char *out, int olen, int ol, int32_t code, int32_t prev_code)\n{\n    // First five bits are code and Last three bits of codes represent length\n    // const uint8_t codes[8] = {0x00, 0x42, 0x83, 0xA3, 0xC3, 0xE4, 0xF5, 0xFD};\n    const uint8_t codes[6] = {0x01, 0x82, 0xC3, 0xE4, 0xF5, 0xFD};\n    int32_t till = 0;\n    int32_t diff = code - prev_code;\n    if (diff < 0)\n        diff = -diff;\n    // printf(\"%ld, \", code);\n    // printf(\"Diff: %d\\n\", diff);\n    for (int i = 0; i < 5; i++) {\n        till += (1 << uni_bit_len[i]);\n        if (diff < till) {\n            SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, (codes[i] & 0xF8), codes[i] & 0x07));\n            // if (diff) {\n            SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, prev_code > code ? 0x80 : 0, 1));\n            int32_t val = diff - uni_adder[i];\n            // printf(\"Val: %d\\n\", val);\n            if (uni_bit_len[i] > 16) {\n                val <<= (24 - uni_bit_len[i]);\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, val >> 16, 8));\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, (val >> 8) & 0xFF, 8));\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, val & 0xFF, uni_bit_len[i] - 16));\n            } else if (uni_bit_len[i] > 8) {\n                val <<= (16 - uni_bit_len[i]);\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, val >> 8, 8));\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, val & 0xFF, uni_bit_len[i] - 8));\n            } else {\n                val <<= (8 - uni_bit_len[i]);\n                SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, val & 0xFF, uni_bit_len[i]));\n            }\n            return ol;\n        }\n    }\n    return ol;\n}\n\n/// Reads UTF-8 character from in. Also returns the number of bytes occupied by the UTF-8 character in utf8len\nint32_t readUTF8(const char *in, int len, int l, int *utf8len)\n{\n    int32_t ret = 0;\n    if (l < (len - 1) && (in[l] & 0xE0) == 0xC0 && (in[l + 1] & 0xC0) == 0x80) {\n        *utf8len = 2;\n        ret = (in[l] & 0x1F);\n        ret <<= 6;\n        ret += (in[l + 1] & 0x3F);\n        if (ret < 0x80)\n            ret = 0;\n    } else if (l < (len - 2) && (in[l] & 0xF0) == 0xE0 && (in[l + 1] & 0xC0) == 0x80 && (in[l + 2] & 0xC0) == 0x80) {\n        *utf8len = 3;\n        ret = (in[l] & 0x0F);\n        ret <<= 6;\n        ret += (in[l + 1] & 0x3F);\n        ret <<= 6;\n        ret += (in[l + 2] & 0x3F);\n        if (ret < 0x0800)\n            ret = 0;\n    } else if (l < (len - 3) && (in[l] & 0xF8) == 0xF0 && (in[l + 1] & 0xC0) == 0x80 && (in[l + 2] & 0xC0) == 0x80 &&\n               (in[l + 3] & 0xC0) == 0x80) {\n        *utf8len = 4;\n        ret = (in[l] & 0x07);\n        ret <<= 6;\n        ret += (in[l + 1] & 0x3F);\n        ret <<= 6;\n        ret += (in[l + 2] & 0x3F);\n        ret <<= 6;\n        ret += (in[l + 3] & 0x3F);\n        if (ret < 0x10000)\n            ret = 0;\n    }\n    return ret;\n}\n\n/// Finds the longest matching sequence from the beginning of the string. \\n\n/// If a match is found and it is longer than NICE_LEN, it is encoded as a repeating sequence to out \\n\n/// This is also used for Unicode strings \\n\n/// This is a crude implementation that is not optimized.  Assuming only short strings \\n\n/// are encoded, this is not much of an issue.\nint matchOccurance(const char *in, int len, int l, char *out, int olen, int *ol, const uint8_t *state, const uint8_t usx_hcodes[],\n                   const uint8_t usx_hcode_lens[])\n{\n    int j, k;\n    int longest_dist = 0;\n    int longest_len = 0;\n    for (j = l - NICE_LEN; j >= 0; j--) {\n        for (k = l; k < len && j + k - l < l; k++) {\n            if (in[k] != in[j + k - l])\n                break;\n        }\n        while ((((unsigned char)in[k]) >> 6) == 2)\n            k--; // Skip partial UTF-8 matches\n        // if ((in[k - 1] >> 3) == 0x1E || (in[k - 1] >> 4) == 0x0E || (in[k - 1] >> 5) == 0x06)\n        //   k--;\n        if ((k - l) > (NICE_LEN - 1)) {\n            int match_len = k - l - NICE_LEN;\n            int match_dist = l - j - NICE_LEN + 1;\n            if (match_len > longest_len) {\n                longest_len = match_len;\n                longest_dist = match_dist;\n            }\n        }\n    }\n    if (longest_len) {\n        SAFE_APPEND_BITS(*ol = append_switch_code(out, olen, *ol, *state));\n        SAFE_APPEND_BITS(*ol = append_bits(out, olen, *ol, usx_hcodes[USX_DICT], usx_hcode_lens[USX_DICT]));\n        // printf(\"Len:%d / Dist:%d/%.*s\\n\", longest_len, longest_dist, longest_len + NICE_LEN, in + l - longest_dist - NICE_LEN +\n        // 1);\n        SAFE_APPEND_BITS(*ol = encodeCount(out, olen, *ol, longest_len));\n        SAFE_APPEND_BITS(*ol = encodeCount(out, olen, *ol, longest_dist));\n        l += (longest_len + NICE_LEN);\n        l--;\n        return l;\n    }\n    return -l;\n}\n\n/// This is used only when encoding a string array\n/// Finds the longest matching sequence from the previous array element to the beginning of the string array. \\n\n/// If a match is found and it is longer than NICE_LEN, it is encoded as a repeating sequence to out \\n\n/// This is also used for Unicode strings \\n\n/// This is a crude implementation that is not optimized.  Assuming only short strings \\n\n/// are encoded, this is not much of an issue.\nint matchLine(const char *in, int len, int l, char *out, int olen, int *ol, struct us_lnk_lst *prev_lines, const uint8_t *state,\n              const uint8_t usx_hcodes[], const uint8_t usx_hcode_lens[])\n{\n    int last_ol = *ol;\n    int last_len = 0;\n    int last_dist = 0;\n    int last_ctx = 0;\n    int line_ctr = 0;\n    int j = 0;\n    do {\n        int i, k;\n        int line_len = (int)strlen(prev_lines->data);\n        int limit = (line_ctr == 0 ? l : line_len);\n        for (; j < limit; j++) {\n            for (i = l, k = j; k < line_len && i < len; k++, i++) {\n                if (prev_lines->data[k] != in[i])\n                    break;\n            }\n            while ((((unsigned char)prev_lines->data[k]) >> 6) == 2)\n                k--; // Skip partial UTF-8 matches\n            if ((k - j) >= NICE_LEN) {\n                if (last_len) {\n                    if (j > last_dist)\n                        continue;\n                    // int saving = ((k - j) - last_len) + (last_dist - j) + (last_ctx - line_ctr);\n                    // if (saving < 0) {\n                    //   //printf(\"No savng: %d\\n\", saving);\n                    //   continue;\n                    // }\n                    *ol = last_ol;\n                }\n                last_len = (k - j);\n                last_dist = j;\n                last_ctx = line_ctr;\n                SAFE_APPEND_BITS(*ol = append_switch_code(out, olen, *ol, *state));\n                SAFE_APPEND_BITS(*ol = append_bits(out, olen, *ol, usx_hcodes[USX_DICT], usx_hcode_lens[USX_DICT]));\n                SAFE_APPEND_BITS(*ol = encodeCount(out, olen, *ol, last_len - NICE_LEN));\n                SAFE_APPEND_BITS(*ol = encodeCount(out, olen, *ol, last_dist));\n                SAFE_APPEND_BITS(*ol = encodeCount(out, olen, *ol, last_ctx));\n                /*\n                if ((*ol - last_ol) > (last_len * 4)) {\n                  last_len = 0;\n                  *ol = last_ol;\n                }*/\n                // printf(\"Len: %d, Dist: %d, Line: %d\\n\", last_len, last_dist, last_ctx);\n                j += last_len;\n            }\n        }\n        line_ctr++;\n        prev_lines = prev_lines->previous;\n    } while (prev_lines && prev_lines->data != NULL);\n    if (last_len) {\n        l += last_len;\n        l--;\n        return l;\n    }\n    return -l;\n}\n\n/// Returns 4 bit code assuming ch falls between '0' to '9', \\n\n/// 'A' to 'F' or 'a' to 'f'\nuint8_t getBaseCode(char ch)\n{\n    if (ch >= '0' && ch <= '9')\n        return (ch - '0') << 4;\n    else if (ch >= 'A' && ch <= 'F')\n        return (ch - 'A' + 10) << 4;\n    else if (ch >= 'a' && ch <= 'f')\n        return (ch - 'a' + 10) << 4;\n    return 0;\n}\n\n/// Enum indicating nibble type - USX_NIB_NUM means ch is a number '0' to '9', \\n\n/// USX_NIB_HEX_LOWER means ch is between 'a' to 'f', \\n\n/// USX_NIB_HEX_UPPER means ch is between 'A' to 'F'\nenum { USX_NIB_NUM = 0, USX_NIB_HEX_LOWER, USX_NIB_HEX_UPPER, USX_NIB_NOT };\n/// Gets 4 bit code assuming ch falls between '0' to '9', \\n\n/// 'A' to 'F' or 'a' to 'f'\nchar getNibbleType(char ch)\n{\n    if (ch >= '0' && ch <= '9')\n        return USX_NIB_NUM;\n    else if (ch >= 'a' && ch <= 'f')\n        return USX_NIB_HEX_LOWER;\n    else if (ch >= 'A' && ch <= 'F')\n        return USX_NIB_HEX_UPPER;\n    return USX_NIB_NOT;\n}\n\n/// Starts coding of nibble sets\nint append_nibble_escape(char *out, int olen, int ol, uint8_t state, const uint8_t usx_hcodes[], const uint8_t usx_hcode_lens[])\n{\n    SAFE_APPEND_BITS(ol = append_switch_code(out, olen, ol, state));\n    SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, usx_hcodes[USX_NUM], usx_hcode_lens[USX_NUM]));\n    SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, 0, 2));\n    return ol;\n}\n\n/// Returns minimum value of two longs\nlong min_of(long c, long i)\n{\n    return c > i ? i : c;\n}\n\n/// Appends the terminator code depending on the state, preset and whether full terminator needs to be encoded to out or not \\n\nint append_final_bits(char *const out, const int olen, int ol, const uint8_t state, const uint8_t is_all_upper,\n                      const uint8_t usx_hcodes[], const uint8_t usx_hcode_lens[])\n{\n    if (usx_hcode_lens[USX_ALPHA]) {\n        if (USX_NUM != state) {\n            // for num state, append TERM_CODE directly\n            // for other state, switch to Num Set first\n            SAFE_APPEND_BITS(ol = append_switch_code(out, olen, ol, state));\n            SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, usx_hcodes[USX_NUM], usx_hcode_lens[USX_NUM]));\n        }\n        SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, usx_vcodes[TERM_CODE & 0x1F], usx_vcode_lens[TERM_CODE & 0x1F]));\n    } else {\n        // preset 1, terminate at 2 or 3 SW_CODE, i.e., 4 or 6 continuous 0 bits\n        // see discussion: https://github.com/siara-cc/Unishox/issues/19#issuecomment-922435580\n        SAFE_APPEND_BITS(ol = append_bits(out, olen, ol, TERM_BYTE_PRESET_1,\n                                          is_all_upper ? TERM_BYTE_PRESET_1_LEN_UPPER : TERM_BYTE_PRESET_1_LEN_LOWER));\n    }\n\n    // fill uint8_t with the last bit\n    SAFE_APPEND_BITS(\n        ol = append_bits(out, olen, ol, (ol == 0 || out[(ol - 1) / 8] << ((ol - 1) & 7) >= 0) ? 0 : 0xFF, (8 - ol % 8) & 7));\n\n    return ol;\n}\n\n/// Macro used in the main compress function so that if the output len exceeds given maximum length (olen) it can exit\n#define SAFE_APPEND_BITS2(olen, exp)                                                                                             \\\n    do {                                                                                                                         \\\n        const int newidx = (exp);                                                                                                \\\n        const int __olen = (olen);                                                                                               \\\n        if (newidx < 0)                                                                                                          \\\n            return __olen >= 0 ? __olen + 1 : (1 - __olen) * 4;                                                                  \\\n    } while (0)\n\n// Main API function. See unishox2.h for documentation\nint unishox2_compress_lines(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen), const uint8_t usx_hcodes[],\n                            const uint8_t usx_hcode_lens[], const char *usx_freq_seq[], const char *usx_templates[],\n                            struct us_lnk_lst *prev_lines)\n{\n\n    uint8_t state;\n\n    int l, ll, ol;\n    char c_in, c_next;\n    int prev_uni;\n    uint8_t is_upper, is_all_upper;\n#if (UNISHOX_API_OUT_AND_LEN(0, 1)) == 0\n    const int olen = INT_MAX - 1;\n    const int rawolen = olen;\n    const uint8_t need_full_term_codes = 0;\n#else\n    const int rawolen = olen;\n    uint8_t need_full_term_codes = 0;\n    if (olen < 0) {\n        need_full_term_codes = 1;\n        olen *= -1;\n    }\n#endif\n\n    init_coder();\n    ol = 0;\n    prev_uni = 0;\n    state = USX_ALPHA;\n    is_all_upper = 0;\n    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, UNISHOX_MAGIC_BITS, UNISHOX_MAGIC_BIT_LEN)); // magic bit(s)\n    for (l = 0; l < len; l++) {\n\n        if (usx_hcode_lens[USX_DICT] && l < (len - NICE_LEN + 1)) {\n            if (prev_lines) {\n                l = matchLine(in, len, l, out, olen, &ol, prev_lines, &state, usx_hcodes, usx_hcode_lens);\n                if (l > 0) {\n                    continue;\n                } else if (l < 0 && ol < 0) {\n                    return olen + 1;\n                }\n                l = -l;\n            } else {\n                l = matchOccurance(in, len, l, out, olen, &ol, &state, usx_hcodes, usx_hcode_lens);\n                if (l > 0) {\n                    continue;\n                } else if (l < 0 && ol < 0) {\n                    return olen + 1;\n                }\n                l = -l;\n            }\n        }\n\n        c_in = in[l];\n        if (l && len > 4 && l < (len - 4) && usx_hcode_lens[USX_NUM]) {\n            if (c_in == in[l - 1] && c_in == in[l + 1] && c_in == in[l + 2] && c_in == in[l + 3]) {\n                int rpt_count = l + 4;\n                while (rpt_count < len && in[rpt_count] == c_in)\n                    rpt_count++;\n                rpt_count -= l;\n                SAFE_APPEND_BITS2(rawolen, ol = append_code(out, olen, ol, RPT_CODE, &state, usx_hcodes, usx_hcode_lens));\n                SAFE_APPEND_BITS2(rawolen, ol = encodeCount(out, olen, ol, rpt_count - 4));\n                l += rpt_count;\n                l--;\n                continue;\n            }\n        }\n\n        if (l <= (len - 36) && usx_hcode_lens[USX_NUM]) {\n            if (in[l + 8] == '-' && in[l + 13] == '-' && in[l + 18] == '-' && in[l + 23] == '-') {\n                char hex_type = USX_NIB_NUM;\n                int uid_pos = l;\n                for (; uid_pos < l + 36; uid_pos++) {\n                    char c_uid = in[uid_pos];\n                    if (c_uid == '-' && (uid_pos == 8 || uid_pos == 13 || uid_pos == 18 || uid_pos == 23))\n                        continue;\n                    char nib_type = getNibbleType(c_uid);\n                    if (nib_type == USX_NIB_NOT)\n                        break;\n                    if (nib_type != USX_NIB_NUM) {\n                        if (hex_type != USX_NIB_NUM && hex_type != nib_type)\n                            break;\n                        hex_type = nib_type;\n                    }\n                }\n                if (uid_pos == l + 36) {\n                    SAFE_APPEND_BITS2(rawolen, ol = append_nibble_escape(out, olen, ol, state, usx_hcodes, usx_hcode_lens));\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, (hex_type == USX_NIB_HEX_LOWER ? 0xC0 : 0xF0),\n                                                                (hex_type == USX_NIB_HEX_LOWER ? 3 : 5)));\n                    for (uid_pos = l; uid_pos < l + 36; uid_pos++) {\n                        char c_uid = in[uid_pos];\n                        if (c_uid != '-')\n                            SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, getBaseCode(c_uid), 4));\n                    }\n                    // printf(\"GUID:\\n\");\n                    l += 35;\n                    continue;\n                }\n            }\n        }\n\n        if (l < (len - 5) && usx_hcode_lens[USX_NUM]) {\n            char hex_type = USX_NIB_NUM;\n            int hex_len = 0;\n            do {\n                char nib_type = getNibbleType(in[l + hex_len]);\n                if (nib_type == USX_NIB_NOT)\n                    break;\n                if (nib_type != USX_NIB_NUM) {\n                    if (hex_type != USX_NIB_NUM && hex_type != nib_type)\n                        break;\n                    hex_type = nib_type;\n                }\n                hex_len++;\n            } while (l + hex_len < len);\n            if (hex_len > 10 && hex_type == USX_NIB_NUM)\n                hex_type = USX_NIB_HEX_LOWER;\n            if ((hex_type == USX_NIB_HEX_LOWER || hex_type == USX_NIB_HEX_UPPER) && hex_len > 3) {\n                SAFE_APPEND_BITS2(rawolen, ol = append_nibble_escape(out, olen, ol, state, usx_hcodes, usx_hcode_lens));\n                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, (hex_type == USX_NIB_HEX_LOWER ? 0x80 : 0xE0),\n                                                            (hex_type == USX_NIB_HEX_LOWER ? 2 : 4)));\n                SAFE_APPEND_BITS2(rawolen, ol = encodeCount(out, olen, ol, hex_len));\n                do {\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, getBaseCode(in[l++]), 4));\n                } while (--hex_len);\n                l--;\n                continue;\n            }\n        }\n\n        if (usx_templates != NULL) {\n            int i;\n            for (i = 0; i < 5; i++) {\n                if (usx_templates[i]) {\n                    int rem = (int)strlen(usx_templates[i]);\n                    int j = 0;\n                    for (; j < rem && l + j < len; j++) {\n                        char c_t = usx_templates[i][j];\n                        c_in = in[l + j];\n                        if (c_t == 'f' || c_t == 'F') {\n                            if (getNibbleType(c_in) != (c_t == 'f' ? USX_NIB_HEX_LOWER : USX_NIB_HEX_UPPER) &&\n                                getNibbleType(c_in) != USX_NIB_NUM) {\n                                break;\n                            }\n                        } else if (c_t == 'r' || c_t == 't' || c_t == 'o') {\n                            if (c_in < '0' || c_in > (c_t == 'r' ? '7' : (c_t == 't' ? '3' : '1')))\n                                break;\n                        } else if (c_t != c_in)\n                            break;\n                    }\n                    if (((float)j / rem) > 0.66) {\n                        // printf(\"%s\\n\", usx_templates[i]);\n                        rem = rem - j;\n                        SAFE_APPEND_BITS2(rawolen, ol = append_nibble_escape(out, olen, ol, state, usx_hcodes, usx_hcode_lens));\n                        SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, 0, 1));\n                        SAFE_APPEND_BITS2(rawolen,\n                                          ol = append_bits(out, olen, ol, (count_codes[i] & 0xF8), count_codes[i] & 0x07));\n                        SAFE_APPEND_BITS2(rawolen, ol = encodeCount(out, olen, ol, rem));\n                        for (int k = 0; k < j; k++) {\n                            char c_t = usx_templates[i][k];\n                            if (c_t == 'f' || c_t == 'F')\n                                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, getBaseCode(in[l + k]), 4));\n                            else if (c_t == 'r' || c_t == 't' || c_t == 'o') {\n                                c_t = (c_t == 'r' ? 3 : (c_t == 't' ? 2 : 1));\n                                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, (in[l + k] - '0') << (8 - c_t), c_t));\n                            }\n                        }\n                        l += j;\n                        l--;\n                        break;\n                    }\n                }\n            }\n            if (i < 5)\n                continue;\n        }\n\n        if (usx_freq_seq != NULL) {\n            int i;\n            for (i = 0; i < 6; i++) {\n                int seq_len = (int)strlen(usx_freq_seq[i]);\n                if (len - seq_len >= 0 && l <= len - seq_len) {\n                    if (memcmp(usx_freq_seq[i], in + l, seq_len) == 0 && usx_hcode_lens[usx_freq_codes[i] >> 5]) {\n                        SAFE_APPEND_BITS2(rawolen,\n                                          ol = append_code(out, olen, ol, usx_freq_codes[i], &state, usx_hcodes, usx_hcode_lens));\n                        l += seq_len;\n                        l--;\n                        break;\n                    }\n                }\n            }\n            if (i < 6)\n                continue;\n        }\n\n        c_in = in[l];\n\n        is_upper = 0;\n        if (c_in >= 'A' && c_in <= 'Z')\n            is_upper = 1;\n        else {\n            if (is_all_upper) {\n                is_all_upper = 0;\n                SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n                state = USX_ALPHA;\n            }\n        }\n        if (is_upper && !is_all_upper) {\n            if (state == USX_NUM) {\n                SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n                state = USX_ALPHA;\n            }\n            SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n            SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n            if (state == USX_DELTA) {\n                state = USX_ALPHA;\n                SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n            }\n        }\n        c_next = 0;\n        if (l + 1 < len)\n            c_next = in[l + 1];\n\n        if (c_in >= 32 && c_in <= 126) {\n            if (is_upper && !is_all_upper) {\n                for (ll = l + 4; ll >= l && ll < len; ll--) {\n                    if (in[ll] < 'A' || in[ll] > 'Z')\n                        break;\n                }\n                if (ll == l - 1) {\n                    SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n                    state = USX_ALPHA;\n                    is_all_upper = 1;\n                }\n            }\n            if (state == USX_DELTA && (c_in == ' ' || c_in == '.' || c_in == ',')) {\n                uint8_t spl_code = (c_in == ',' ? 0xC0 : (c_in == '.' ? 0xE0 : (c_in == ' ' ? 0 : 0xFF)));\n                if (spl_code != 0xFF) {\n                    uint8_t spl_code_len = (c_in == ',' ? 3 : (c_in == '.' ? 4 : (c_in == ' ' ? 1 : 4)));\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, UNI_STATE_SPL_CODE, UNI_STATE_SPL_CODE_LEN));\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, spl_code, spl_code_len));\n                    continue;\n                }\n            }\n            c_in -= 32;\n            if (is_all_upper && is_upper)\n                c_in += 32;\n            if (c_in == 0) {\n                if (state == USX_NUM)\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, usx_vcodes[NUM_SPC_CODE & 0x1F],\n                                                                usx_vcode_lens[NUM_SPC_CODE & 0x1F]));\n                else\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, usx_vcodes[1], usx_vcode_lens[1]));\n            } else {\n                c_in--;\n                SAFE_APPEND_BITS2(rawolen,\n                                  ol = append_code(out, olen, ol, usx_code_94[(int)c_in], &state, usx_hcodes, usx_hcode_lens));\n            }\n        } else if (c_in == 13 && c_next == 10) {\n            SAFE_APPEND_BITS2(rawolen, ol = append_code(out, olen, ol, CRLF_CODE, &state, usx_hcodes, usx_hcode_lens));\n            l++;\n        } else if (c_in == 10) {\n            if (state == USX_DELTA) {\n                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, UNI_STATE_SPL_CODE, UNI_STATE_SPL_CODE_LEN));\n                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, 0xF0, 4));\n            } else\n                SAFE_APPEND_BITS2(rawolen, ol = append_code(out, olen, ol, LF_CODE, &state, usx_hcodes, usx_hcode_lens));\n        } else if (c_in == 13) {\n            SAFE_APPEND_BITS2(rawolen, ol = append_code(out, olen, ol, CR_CODE, &state, usx_hcodes, usx_hcode_lens));\n        } else if (c_in == '\\t') {\n            SAFE_APPEND_BITS2(rawolen, ol = append_code(out, olen, ol, TAB_CODE, &state, usx_hcodes, usx_hcode_lens));\n        } else {\n            int utf8len;\n            int32_t uni = readUTF8(in, len, l, &utf8len);\n            if (uni) {\n                l += utf8len;\n                if (state != USX_DELTA) {\n                    int32_t uni2 = readUTF8(in, len, l, &utf8len);\n                    if (uni2) {\n                        if (state != USX_ALPHA) {\n                            SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n                            SAFE_APPEND_BITS2(rawolen,\n                                              ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n                        }\n                        SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n                        SAFE_APPEND_BITS2(rawolen,\n                                          ol = append_bits(out, olen, ol, usx_hcodes[USX_ALPHA], usx_hcode_lens[USX_ALPHA]));\n                        SAFE_APPEND_BITS2(\n                            rawolen, ol = append_bits(out, olen, ol, usx_vcodes[1], usx_vcode_lens[1])); // code for space (' ')\n                        state = USX_DELTA;\n                    } else {\n                        SAFE_APPEND_BITS2(rawolen, ol = append_switch_code(out, olen, ol, state));\n                        SAFE_APPEND_BITS2(rawolen,\n                                          ol = append_bits(out, olen, ol, usx_hcodes[USX_DELTA], usx_hcode_lens[USX_DELTA]));\n                    }\n                }\n                SAFE_APPEND_BITS2(rawolen, ol = encodeUnicode(out, olen, ol, uni, prev_uni));\n                // printf(\"%d:%d:%d\\n\", l, utf8len, uni);\n                prev_uni = uni;\n                l--;\n            } else {\n                int bin_count = 1;\n                for (int bi = l + 1; bi < len; bi++) {\n                    char c_bi = in[bi];\n                    // if (c_bi > 0x1F && c_bi != 0x7F)\n                    //   break;\n                    if (readUTF8(in, len, bi, &utf8len))\n                        break;\n                    if (bi < (len - 4) && c_bi == in[bi - 1] && c_bi == in[bi + 1] && c_bi == in[bi + 2] && c_bi == in[bi + 3])\n                        break;\n                    bin_count++;\n                }\n                // printf(\"Bin:%d:%d:%x:%d\\n\", l, (unsigned char) c_in, (unsigned char) c_in, bin_count);\n                SAFE_APPEND_BITS2(rawolen, ol = append_nibble_escape(out, olen, ol, state, usx_hcodes, usx_hcode_lens));\n                SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, 0xF8, 5));\n                SAFE_APPEND_BITS2(rawolen, ol = encodeCount(out, olen, ol, bin_count));\n                do {\n                    SAFE_APPEND_BITS2(rawolen, ol = append_bits(out, olen, ol, in[l++], 8));\n                } while (--bin_count);\n                l--;\n            }\n        }\n    }\n\n    if (need_full_term_codes) {\n        const int orig_ol = ol;\n        SAFE_APPEND_BITS2(rawolen, ol = append_final_bits(out, olen, ol, state, is_all_upper, usx_hcodes, usx_hcode_lens));\n        return (ol / 8) * 4 + (((ol - orig_ol) / 8) & 3);\n    } else {\n        const int rst = (ol + 7) / 8;\n        append_final_bits(out, rst, ol, state, is_all_upper, usx_hcodes, usx_hcode_lens);\n        return rst;\n    }\n}\n\n// Main API function. See unishox2.h for documentation\nint unishox2_compress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen), const uint8_t usx_hcodes[],\n                      const uint8_t usx_hcode_lens[], const char *usx_freq_seq[], const char *usx_templates[])\n{\n    return unishox2_compress_lines(in, len, UNISHOX_API_OUT_AND_LEN(out, olen), usx_hcodes, usx_hcode_lens, usx_freq_seq,\n                                   usx_templates, NULL);\n}\n\n// Main API function. See unishox2.h for documentation\nint unishox2_compress_simple(const char *in, int len, char *out)\n{\n    return unishox2_compress_lines(in, len, UNISHOX_API_OUT_AND_LEN(out, INT_MAX - 1), USX_HCODES_DFLT, USX_HCODE_LENS_DFLT,\n                                   USX_FREQ_SEQ_DFLT, USX_TEMPLATES, NULL);\n}\n\n// Reads one bit from in\nint readBit(const char *in, int bit_no)\n{\n    return in[bit_no >> 3] & (0x80 >> (bit_no % 8));\n}\n\n// Reads next 8 bits, if available\nint read8bitCode(const char *in, int len, int bit_no)\n{\n    int bit_pos = bit_no & 0x07;\n    int char_pos = bit_no >> 3;\n    len >>= 3;\n    uint8_t code = (((uint8_t)in[char_pos]) << bit_pos);\n    char_pos++;\n    if (char_pos < len) {\n        code |= ((uint8_t)in[char_pos]) >> (8 - bit_pos);\n    } else\n        code |= (0xFF >> (8 - bit_pos));\n    return code;\n}\n\n/// The list of veritical codes is split into 5 sections. Used by readVCodeIdx()\n#define SECTION_COUNT 5\n/// Used by readVCodeIdx() for finding the section under which the code read using read8bitCode() falls\nuint8_t usx_vsections[] = {0x7F, 0xBF, 0xDF, 0xEF, 0xFF};\n/// Used by readVCodeIdx() for finding the section vertical position offset\nuint8_t usx_vsection_pos[] = {0, 4, 8, 12, 20};\n/// Used by readVCodeIdx() for masking the code read by read8bitCode()\nuint8_t usx_vsection_mask[] = {0x7F, 0x3F, 0x1F, 0x0F, 0x0F};\n/// Used by readVCodeIdx() for shifting the code read by read8bitCode() to obtain the vpos\nuint8_t usx_vsection_shift[] = {5, 4, 3, 1, 0};\n\n/// Vertical decoder lookup table - 3 bits code len, 5 bytes vertical pos\n/// code len is one less as 8 cannot be accommodated in 3 bits\nuint8_t usx_vcode_lookup[36] = {(1 << 5) + 0,  (1 << 5) + 0,  (2 << 5) + 1,  (2 << 5) + 2,  // Section 1\n                                (3 << 5) + 3,  (3 << 5) + 4,  (3 << 5) + 5,  (3 << 5) + 6,  // Section 2\n                                (3 << 5) + 7,  (3 << 5) + 7,  (4 << 5) + 8,  (4 << 5) + 9,  // Section 3\n                                (5 << 5) + 10, (5 << 5) + 10, (5 << 5) + 11, (5 << 5) + 11, // Section 4\n                                (5 << 5) + 12, (5 << 5) + 12, (6 << 5) + 13, (6 << 5) + 14, (6 << 5) + 15, (6 << 5) + 15,\n                                (6 << 5) + 16, (6 << 5) + 16, // Section 5\n                                (6 << 5) + 17, (6 << 5) + 17, (7 << 5) + 18, (7 << 5) + 19, (7 << 5) + 20, (7 << 5) + 21,\n                                (7 << 5) + 22, (7 << 5) + 23, (7 << 5) + 24, (7 << 5) + 25, (7 << 5) + 26, (7 << 5) + 27};\n\n/// Decodes the vertical code from the given bitstream at in \\n\n/// This is designed to use less memory using a 36 uint8_t buffer \\n\n/// compared to using a 256 uint8_t buffer to decode the next 8 bits read by read8bitCode() \\n\n/// by splitting the list of vertical codes. \\n\n/// Decoder is designed for using less memory, not speed. \\n\n/// Returns the veritical code index or 99 if match could not be found. \\n\n/// Also updates bit_no_p with how many ever bits used by the vertical code.\nint readVCodeIdx(const char *in, int len, int *bit_no_p)\n{\n    if (*bit_no_p < len) {\n        uint8_t code = read8bitCode(in, len, *bit_no_p);\n        int i = 0;\n        do {\n            if (code <= usx_vsections[i]) {\n                uint8_t vcode = usx_vcode_lookup[usx_vsection_pos[i] + ((code & usx_vsection_mask[i]) >> usx_vsection_shift[i])];\n                (*bit_no_p) += ((vcode >> 5) + 1);\n                if (*bit_no_p > len)\n                    return 99;\n                return vcode & 0x1F;\n            }\n        } while (++i < SECTION_COUNT);\n    }\n    return 99;\n}\n\n/// Mask for retrieving each code to be decoded according to its length \\n\n/// Same as usx_mask so redundant\nuint8_t len_masks[] = {0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF};\n/// Decodes the horizontal code from the given bitstream at in \\n\n/// depending on the hcodes defined using usx_hcodes and usx_hcode_lens \\n\n/// Returns the horizontal code index or 99 if match could not be found. \\n\n/// Also updates bit_no_p with how many ever bits used by the horizontal code.\nint readHCodeIdx(const char *in, int len, int *bit_no_p, const uint8_t usx_hcodes[], const uint8_t usx_hcode_lens[])\n{\n    if (!usx_hcode_lens[USX_ALPHA])\n        return USX_ALPHA;\n    if (*bit_no_p < len) {\n        uint8_t code = read8bitCode(in, len, *bit_no_p);\n        for (int code_pos = 0; code_pos < 5; code_pos++) {\n            if (usx_hcode_lens[code_pos] && (code & len_masks[usx_hcode_lens[code_pos] - 1]) == usx_hcodes[code_pos]) {\n                *bit_no_p += usx_hcode_lens[code_pos];\n                return code_pos;\n            }\n        }\n    }\n    return 99;\n}\n\n// TODO: Last value check.. Also len check in readBit\n/// Returns the position of step code (0, 10, 110, etc.) encountered in the stream\nint getStepCodeIdx(const char *in, int len, int *bit_no_p, int limit)\n{\n    int idx = 0;\n    while (*bit_no_p < len && readBit(in, *bit_no_p)) {\n        idx++;\n        (*bit_no_p)++;\n        if (idx == limit)\n            return idx;\n    }\n    if (*bit_no_p >= len)\n        return 99;\n    (*bit_no_p)++;\n    return idx;\n}\n\n/// Reads specified number of bits and builds the corresponding integer\nint32_t getNumFromBits(const char *in, int len, int bit_no, int count)\n{\n    int32_t ret = 0;\n    while (count-- && bit_no < len) {\n        ret += (readBit(in, bit_no) ? 1 << count : 0);\n        bit_no++;\n    }\n    return count < 0 ? ret : -1;\n}\n\n/// Decodes the count from the given bit stream at in. Also updates bit_no_p\nint32_t readCount(const char *in, int *bit_no_p, int len)\n{\n    int idx = getStepCodeIdx(in, len, bit_no_p, 4);\n    if (idx == 99)\n        return -1;\n    if (*bit_no_p + count_bit_lens[idx] - 1 >= len)\n        return -1;\n    int32_t count = getNumFromBits(in, len, *bit_no_p, count_bit_lens[idx]) + (idx ? count_adder[idx - 1] : 0);\n    (*bit_no_p) += count_bit_lens[idx];\n    return count;\n}\n\n/// Decodes the Unicode codepoint from the given bit stream at in. Also updates bit_no_p \\n\n/// When the step code is 5, reads the next step code to find out the special code.\nint32_t readUnicode(const char *in, int *bit_no_p, int len)\n{\n    int idx = getStepCodeIdx(in, len, bit_no_p, 5);\n    if (idx == 99)\n        return 0x7FFFFF00 + 99;\n    if (idx == 5) {\n        idx = getStepCodeIdx(in, len, bit_no_p, 4);\n        return 0x7FFFFF00 + idx;\n    }\n    if (idx >= 0) {\n        int sign = (*bit_no_p < len ? readBit(in, *bit_no_p) : 0);\n        (*bit_no_p)++;\n        if (*bit_no_p + uni_bit_len[idx] - 1 >= len)\n            return 0x7FFFFF00 + 99;\n        int32_t count = getNumFromBits(in, len, *bit_no_p, uni_bit_len[idx]);\n        count += uni_adder[idx];\n        (*bit_no_p) += uni_bit_len[idx];\n        // printf(\"Sign: %d, Val:%d\", sign, count);\n        return sign ? -count : count;\n    }\n    return 0;\n}\n\n/// Macro to ensure that the decoder does not append more than olen bytes to out\n#define DEC_OUTPUT_CHAR(out, olen, ol, c)                                                                                        \\\n    do {                                                                                                                         \\\n        char *const obuf = (out);                                                                                                \\\n        const int oidx = (ol);                                                                                                   \\\n        const int limit = (olen);                                                                                                \\\n        if (limit <= oidx)                                                                                                       \\\n            return limit + 1;                                                                                                    \\\n        else if (oidx < 0)                                                                                                       \\\n            return 0;                                                                                                            \\\n        else                                                                                                                     \\\n            obuf[oidx] = (c);                                                                                                    \\\n    } while (0)\n\n/// Macro to ensure that the decoder does not append more than olen bytes to out\n#define DEC_OUTPUT_CHARS(olen, exp)                                                                                              \\\n    do {                                                                                                                         \\\n        const int newidx = (exp);                                                                                                \\\n        const int limit = (olen);                                                                                                \\\n        if (newidx > limit)                                                                                                      \\\n            return limit + 1;                                                                                                    \\\n    } while (0)\n\n/// Write given unicode code point to out as a UTF-8 sequence\nint writeUTF8(char *out, int olen, int ol, int uni)\n{\n    if (uni < (1 << 11)) {\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0xC0 + (uni >> 6));\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0x80 + (uni & 0x3F));\n    } else if (uni < (1 << 16)) {\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0xE0 + (uni >> 12));\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0x80 + ((uni >> 6) & 0x3F));\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0x80 + (uni & 0x3F));\n    } else {\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0xF0 + (uni >> 18));\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0x80 + ((uni >> 12) & 0x3F));\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0x80 + ((uni >> 6) & 0x3F));\n        DEC_OUTPUT_CHAR(out, olen, ol++, 0x80 + (uni & 0x3F));\n    }\n    return ol;\n}\n\n/// Decode repeating sequence and appends to out\nint decodeRepeat(const char *in, int len, char *out, int olen, int ol, int *bit_no, struct us_lnk_lst *prev_lines)\n{\n    if (prev_lines) {\n        int32_t dict_len = readCount(in, bit_no, len) + NICE_LEN;\n        if (dict_len < NICE_LEN)\n            return -1;\n        int32_t dist = readCount(in, bit_no, len);\n        if (dist < 0)\n            return -1;\n        int32_t ctx = readCount(in, bit_no, len);\n        if (ctx < 0)\n            return -1;\n        struct us_lnk_lst *cur_line = prev_lines;\n        const int left = olen - ol;\n        while (ctx-- && cur_line)\n            cur_line = cur_line->previous;\n        if (cur_line == NULL)\n            return -1;\n        if (left <= 0)\n            return olen + 1;\n        if ((size_t)dist >= strlen(cur_line->data))\n            return -1;\n        memmove(out + ol, cur_line->data + dist, min_of(left, dict_len));\n        if (left < dict_len)\n            return olen + 1;\n        ol += dict_len;\n    } else {\n        int32_t dict_len = readCount(in, bit_no, len) + NICE_LEN;\n        if (dict_len < NICE_LEN)\n            return -1;\n        int32_t dist = readCount(in, bit_no, len) + NICE_LEN - 1;\n        if (dist < NICE_LEN - 1)\n            return -1;\n        const int32_t left = olen - ol;\n        // printf(\"Decode len: %d, dist: %d\\n\", dict_len - NICE_LEN, dist - NICE_LEN + 1);\n        if (left <= 0)\n            return olen + 1;\n        if (ol - dist < 0)\n            return -1;\n        memmove(out + ol, out + ol - dist, min_of(left, dict_len));\n        if (left < dict_len)\n            return olen + 1;\n        ol += dict_len;\n    }\n    return ol;\n}\n\n/// Returns hex character corresponding to the 4 bit nibble\nchar getHexChar(int32_t nibble, int hex_type)\n{\n    if (nibble >= 0 && nibble <= 9)\n        return '0' + nibble;\n    else if (hex_type < USX_NIB_HEX_UPPER)\n        return 'a' + nibble - 10;\n    return 'A' + nibble - 10;\n}\n\n// Main API function. See unishox2.h for documentation\nint unishox2_decompress_lines(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen), const uint8_t usx_hcodes[],\n                              const uint8_t usx_hcode_lens[], const char *usx_freq_seq[], const char *usx_templates[],\n                              struct us_lnk_lst *prev_lines)\n{\n\n    int dstate;\n    int bit_no;\n    int h, v;\n    uint8_t is_all_upper;\n#if (UNISHOX_API_OUT_AND_LEN(0, 1)) == 0\n    const int olen = INT_MAX - 1;\n#endif\n\n    init_coder();\n    int ol = 0;\n    bit_no = UNISHOX_MAGIC_BIT_LEN; // ignore the magic bit\n    dstate = h = USX_ALPHA;\n    is_all_upper = 0;\n\n    int prev_uni = 0;\n\n    len <<= 3;\n    while (bit_no < len) {\n        int orig_bit_no = bit_no;\n        if (dstate == USX_DELTA || h == USX_DELTA) {\n            if (dstate != USX_DELTA)\n                h = dstate;\n            int32_t delta = readUnicode(in, &bit_no, len);\n            if ((delta >> 8) == 0x7FFFFF) {\n                int spl_code_idx = delta & 0x000000FF;\n                if (spl_code_idx == 99)\n                    break;\n                switch (spl_code_idx) {\n                case 0:\n                    DEC_OUTPUT_CHAR(out, olen, ol++, ' ');\n                    continue;\n                case 1:\n                    h = readHCodeIdx(in, len, &bit_no, usx_hcodes, usx_hcode_lens);\n                    if (h == 99) {\n                        bit_no = len;\n                        continue;\n                    }\n                    if (h == USX_DELTA || h == USX_ALPHA) {\n                        dstate = h;\n                        continue;\n                    }\n                    if (h == USX_DICT) {\n                        int rpt_ret = decodeRepeat(in, len, out, olen, ol, &bit_no, prev_lines);\n                        if (rpt_ret < 0)\n                            return ol; // if we break here it will only break out of switch\n                        DEC_OUTPUT_CHARS(olen, ol = rpt_ret);\n                        h = dstate;\n                        continue;\n                    }\n                    break;\n                case 2:\n                    DEC_OUTPUT_CHAR(out, olen, ol++, ',');\n                    continue;\n                case 3:\n                    DEC_OUTPUT_CHAR(out, olen, ol++, '.');\n                    continue;\n                case 4:\n                    DEC_OUTPUT_CHAR(out, olen, ol++, 10);\n                    continue;\n                }\n            } else {\n                prev_uni += delta;\n                DEC_OUTPUT_CHARS(olen, ol = writeUTF8(out, olen, ol, prev_uni));\n                // printf(\"%ld, \", prev_uni);\n            }\n            if (dstate == USX_DELTA && h == USX_DELTA)\n                continue;\n        } else\n            h = dstate;\n        char c = 0;\n        uint8_t is_upper = is_all_upper;\n        v = readVCodeIdx(in, len, &bit_no);\n        if (v == 99 || h == 99) {\n            bit_no = orig_bit_no;\n            break;\n        }\n        if (v == 0 && h != USX_SYM) {\n            if (bit_no >= len)\n                break;\n            if (h != USX_NUM || dstate != USX_DELTA) {\n                h = readHCodeIdx(in, len, &bit_no, usx_hcodes, usx_hcode_lens);\n                if (h == 99 || bit_no >= len) {\n                    bit_no = orig_bit_no;\n                    break;\n                }\n            }\n            if (h == USX_ALPHA) {\n                if (dstate == USX_ALPHA) {\n                    if (!usx_hcode_lens[USX_ALPHA] &&\n                        TERM_BYTE_PRESET_1 ==\n                            (read8bitCode(in, len, bit_no - SW_CODE_LEN) &\n                             (0xFF << (8 - (is_all_upper ? TERM_BYTE_PRESET_1_LEN_UPPER : TERM_BYTE_PRESET_1_LEN_LOWER)))))\n                        break; // Terminator for preset 1\n                    if (is_all_upper) {\n                        is_upper = is_all_upper = 0;\n                        continue;\n                    }\n                    v = readVCodeIdx(in, len, &bit_no);\n                    if (v == 99) {\n                        bit_no = orig_bit_no;\n                        break;\n                    }\n                    if (v == 0) {\n                        h = readHCodeIdx(in, len, &bit_no, usx_hcodes, usx_hcode_lens);\n                        if (h == 99) {\n                            bit_no = orig_bit_no;\n                            break;\n                        }\n                        if (h == USX_ALPHA) {\n                            is_all_upper = 1;\n                            continue;\n                        }\n                    }\n                    is_upper = 1;\n                } else {\n                    dstate = USX_ALPHA;\n                    continue;\n                }\n            } else if (h == USX_DICT) {\n                int rpt_ret = decodeRepeat(in, len, out, olen, ol, &bit_no, prev_lines);\n                if (rpt_ret < 0)\n                    break;\n                DEC_OUTPUT_CHARS(olen, ol = rpt_ret);\n                continue;\n            } else if (h == USX_DELTA) {\n                // printf(\"Sign: %d, bitno: %d\\n\", sign, bit_no);\n                // printf(\"Code: %d\\n\", prev_uni);\n                // printf(\"BitNo: %d\\n\", bit_no);\n                continue;\n            } else {\n                if (h != USX_NUM || dstate != USX_DELTA)\n                    v = readVCodeIdx(in, len, &bit_no);\n                if (v == 99) {\n                    bit_no = orig_bit_no;\n                    break;\n                }\n                if (h == USX_NUM && v == 0) {\n                    int idx = getStepCodeIdx(in, len, &bit_no, 5);\n                    if (idx == 99)\n                        break;\n                    if (idx == 0) {\n                        idx = getStepCodeIdx(in, len, &bit_no, 4);\n                        if (idx >= 5)\n                            break;\n                        int32_t rem = readCount(in, &bit_no, len);\n                        if (rem < 0)\n                            break;\n                        if (usx_templates[idx] == NULL)\n                            break;\n                        size_t tlen = strlen(usx_templates[idx]);\n                        if ((size_t)rem > tlen)\n                            break;\n                        rem = tlen - rem;\n                        int eof = 0;\n                        for (int j = 0; j < rem; j++) {\n                            char c_t = usx_templates[idx][j];\n                            if (c_t == 'f' || c_t == 'r' || c_t == 't' || c_t == 'o' || c_t == 'F') {\n                                char nibble_len = (c_t == 'f' || c_t == 'F' ? 4 : (c_t == 'r' ? 3 : (c_t == 't' ? 2 : 1)));\n                                const int32_t raw_char = getNumFromBits(in, len, bit_no, nibble_len);\n                                if (raw_char < 0) {\n                                    eof = 1;\n                                    break;\n                                }\n                                DEC_OUTPUT_CHAR(out, olen, ol++,\n                                                getHexChar((char)raw_char, c_t == 'f' ? USX_NIB_HEX_LOWER : USX_NIB_HEX_UPPER));\n                                bit_no += nibble_len;\n                            } else\n                                DEC_OUTPUT_CHAR(out, olen, ol++, c_t);\n                        }\n                        if (eof)\n                            break; // reach input eof\n                    } else if (idx == 5) {\n                        int32_t bin_count = readCount(in, &bit_no, len);\n                        if (bin_count < 0)\n                            break;\n                        if (bin_count == 0) // invalid encoding\n                            break;\n                        do {\n                            const int32_t raw_char = getNumFromBits(in, len, bit_no, 8);\n                            if (raw_char < 0)\n                                break;\n                            DEC_OUTPUT_CHAR(out, olen, ol++, (char)raw_char);\n                            bit_no += 8;\n                        } while (--bin_count);\n                        if (bin_count > 0)\n                            break; // reach input eof\n                    } else {\n                        int32_t nibble_count = 0;\n                        if (idx == 2 || idx == 4)\n                            nibble_count = 32;\n                        else {\n                            nibble_count = readCount(in, &bit_no, len);\n                            if (nibble_count < 0)\n                                break;\n                            if (nibble_count == 0) // invalid encoding\n                                break;\n                        }\n                        do {\n                            int32_t nibble = getNumFromBits(in, len, bit_no, 4);\n                            if (nibble < 0)\n                                break;\n                            DEC_OUTPUT_CHAR(out, olen, ol++, getHexChar(nibble, idx < 3 ? USX_NIB_HEX_LOWER : USX_NIB_HEX_UPPER));\n                            if ((idx == 2 || idx == 4) &&\n                                (nibble_count == 25 || nibble_count == 21 || nibble_count == 17 || nibble_count == 13))\n                                DEC_OUTPUT_CHAR(out, olen, ol++, '-');\n                            bit_no += 4;\n                        } while (--nibble_count);\n                        if (nibble_count > 0)\n                            break; // reach input eof\n                    }\n                    if (dstate == USX_DELTA)\n                        h = USX_DELTA;\n                    continue;\n                }\n            }\n        }\n        if (is_upper && v == 1) {\n            h = dstate = USX_DELTA; // continuous delta coding\n            continue;\n        }\n        if (h < 3 && v < 28)\n            c = usx_sets[h][v];\n        if (c >= 'a' && c <= 'z') {\n            dstate = USX_ALPHA;\n            if (is_upper)\n                c -= 32;\n        } else {\n            if (c >= '0' && c <= '9') {\n                dstate = USX_NUM;\n            } else if (c == 0) {\n                if (v == 8) {\n                    DEC_OUTPUT_CHAR(out, olen, ol++, '\\r');\n                    DEC_OUTPUT_CHAR(out, olen, ol++, '\\n');\n                } else if (h == USX_NUM && v == 26) {\n                    int32_t count = readCount(in, &bit_no, len);\n                    if (count < 0)\n                        break;\n                    count += 4;\n                    if (ol <= 0)\n                        return 0; // invalid encoding\n                    char rpt_c = out[ol - 1];\n                    while (count--)\n                        DEC_OUTPUT_CHAR(out, olen, ol++, rpt_c);\n                } else if (h == USX_SYM && v > 24) {\n                    v -= 25;\n                    const int freqlen = (int)strlen(usx_freq_seq[v]);\n                    const int left = olen - ol;\n                    if (left <= 0)\n                        return olen + 1;\n                    memcpy(out + ol, usx_freq_seq[v], min_of(left, freqlen));\n                    if (left < freqlen)\n                        return olen + 1;\n                    ol += freqlen;\n                } else if (h == USX_NUM && v > 22 && v < 26) {\n                    v -= (23 - 3);\n                    const int freqlen = (int)strlen(usx_freq_seq[v]);\n                    const int left = olen - ol;\n                    if (left <= 0)\n                        return olen + 1;\n                    memcpy(out + ol, usx_freq_seq[v], min_of(left, freqlen));\n                    if (left < freqlen)\n                        return olen + 1;\n                    ol += freqlen;\n                } else\n                    break; // Terminator\n                if (dstate == USX_DELTA)\n                    h = USX_DELTA;\n                continue;\n            }\n        }\n        if (dstate == USX_DELTA)\n            h = USX_DELTA;\n        DEC_OUTPUT_CHAR(out, olen, ol++, c);\n    }\n\n    return ol;\n}\n\n// Main API function. See unishox2.h for documentation\nint unishox2_decompress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen), const uint8_t usx_hcodes[],\n                        const uint8_t usx_hcode_lens[], const char *usx_freq_seq[], const char *usx_templates[])\n{\n    return unishox2_decompress_lines(in, len, UNISHOX_API_OUT_AND_LEN(out, olen), usx_hcodes, usx_hcode_lens, usx_freq_seq,\n                                     usx_templates, NULL);\n}\n\n// Main API function. See unishox2.h for documentation\nint unishox2_decompress_simple(const char *in, int len, char *out)\n{\n    return unishox2_decompress(in, len, UNISHOX_API_OUT_AND_LEN(out, INT_MAX - 1), USX_PSET_DFLT);\n}"
  },
  {
    "path": "src/mesh/compression/unishox2.h",
    "content": "/*\n * Copyright (C) 2020 Siara Logics (cc)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @author Arundale Ramanathan\n *\n * Port for Particle (particle.io) / Aruino - Jonathan Greenblatt\n *\n * This file describes each function of the Unishox2 API \\n\n * For finding out how this API can be used in your program, \\n\n * please see test_unishox2.c.\n */\n\n#ifndef unishox2\n#define unishox2\n\n#define UNISHOX_VERSION \"2.0\" ///< Unicode spec version\n\n/**\n * Macro switch to enable/disable output buffer length parameter in low level api \\n\n * Disabled by default \\n\n * When this macro is defined, the all the API functions \\n\n * except the simple API functions accept an additional parameter olen \\n\n * that enables the developer to pass the size of the output buffer provided \\n\n * so that the api function may not write beyond that length. \\n\n * This can be disabled if the developer knows that the buffer provided is sufficient enough \\n\n * so no additional parameter is passed and the program is faster since additional check \\n\n * for output length is not performed at each step \\n\n * The simple api, i.e. unishox2_(de)compress_simple will always omit the buffer length\n */\n#ifndef UNISHOX_API_WITH_OUTPUT_LEN\n#define UNISHOX_API_WITH_OUTPUT_LEN 1\n#endif\n\n/// Upto 8 bits of initial magic bit sequence can be included. Bit count can be specified with UNISHOX_MAGIC_BIT_LEN\n#ifndef UNISHOX_MAGIC_BITS\n#define UNISHOX_MAGIC_BITS 0xFF\n#endif\n\n/// Desired length of Magic bits defined by UNISHOX_MAGIC_BITS\n#ifdef UNISHOX_MAGIC_BIT_LEN\n#if UNISHOX_MAGIC_BIT_LEN < 0 || 9 <= UNISHOX_MAGIC_BIT_LEN\n#error \"UNISHOX_MAGIC_BIT_LEN need between [0, 8)\"\n#endif\n#else\n#define UNISHOX_MAGIC_BIT_LEN 1\n#endif\n\n// enum {USX_ALPHA = 0, USX_SYM, USX_NUM, USX_DICT, USX_DELTA};\n\n/// Default Horizontal codes. When composition of text is know beforehand, the other hcodes in this section can be used to achieve\n/// more compression.\n#define USX_HCODES_DFLT                                                                                                          \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x40, 0x80, 0xC0, 0xE0                                                                                             \\\n    }\n/// Length of each default hcode\n#define USX_HCODE_LENS_DFLT                                                                                                      \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        2, 2, 2, 3, 3                                                                                                            \\\n    }\n\n/// Horizontal codes preset for English Alphabet content only\n#define USX_HCODES_ALPHA_ONLY                                                                                                    \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x00, 0x00, 0x00, 0x00                                                                                             \\\n    }\n/// Length of each Alpha only hcode\n#define USX_HCODE_LENS_ALPHA_ONLY                                                                                                \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0, 0, 0, 0, 0                                                                                                            \\\n    }\n\n/// Horizontal codes preset for Alpha Numeric content only\n#define USX_HCODES_ALPHA_NUM_ONLY                                                                                                \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x00, 0x80, 0x00, 0x00                                                                                             \\\n    }\n/// Length of each Alpha numeric hcode\n#define USX_HCODE_LENS_ALPHA_NUM_ONLY                                                                                            \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        1, 0, 1, 0, 0                                                                                                            \\\n    }\n\n/// Horizontal codes preset for Alpha Numeric and Symbol content only\n#define USX_HCODES_ALPHA_NUM_SYM_ONLY                                                                                            \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x80, 0xC0, 0x00, 0x00                                                                                             \\\n    }\n/// Length of each Alpha numeric and symbol hcodes\n#define USX_HCODE_LENS_ALPHA_NUM_SYM_ONLY                                                                                        \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        1, 2, 2, 0, 0                                                                                                            \\\n    }\n\n/// Horizontal codes preset favouring Alphabet content\n#define USX_HCODES_FAVOR_ALPHA                                                                                                   \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x80, 0xA0, 0xC0, 0xE0                                                                                             \\\n    }\n/// Length of each hcode favouring Alpha content\n#define USX_HCODE_LENS_FAVOR_ALPHA                                                                                               \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        1, 3, 3, 3, 3                                                                                                            \\\n    }\n\n/// Horizontal codes preset favouring repeating sequences\n#define USX_HCODES_FAVOR_DICT                                                                                                    \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x40, 0xC0, 0x80, 0xE0                                                                                             \\\n    }\n/// Length of each hcode favouring repeating sequences\n#define USX_HCODE_LENS_FAVOR_DICT                                                                                                \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        2, 2, 3, 2, 3                                                                                                            \\\n    }\n\n/// Horizontal codes preset favouring symbols\n#define USX_HCODES_FAVOR_SYM                                                                                                     \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x80, 0x00, 0xA0, 0xC0, 0xE0                                                                                             \\\n    }\n/// Length of each hcode favouring symbols\n#define USX_HCODE_LENS_FAVOR_SYM                                                                                                 \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        3, 1, 3, 3, 3                                                                                                            \\\n    }\n\n// #define USX_HCODES_FAVOR_UMLAUT {0x00, 0x40, 0xE0, 0xC0, 0x80}\n// #define USX_HCODE_LENS_FAVOR_UMLAUT {2, 2, 3, 3, 2}\n\n/// Horizontal codes preset favouring umlaut letters\n#define USX_HCODES_FAVOR_UMLAUT                                                                                                  \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x80, 0xA0, 0xC0, 0xE0, 0x00                                                                                             \\\n    }\n/// Length of each hcode favouring umlaut letters\n#define USX_HCODE_LENS_FAVOR_UMLAUT                                                                                              \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        3, 3, 3, 3, 1                                                                                                            \\\n    }\n\n/// Horizontal codes preset for no repeating sequences\n#define USX_HCODES_NO_DICT                                                                                                       \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x40, 0x80, 0x00, 0xC0                                                                                             \\\n    }\n/// Length of each hcode for no repeating sequences\n#define USX_HCODE_LENS_NO_DICT                                                                                                   \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        2, 2, 2, 0, 2                                                                                                            \\\n    }\n\n/// Horizontal codes preset for no Unicode characters\n#define USX_HCODES_NO_UNI                                                                                                        \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        0x00, 0x40, 0x80, 0xC0, 0x00                                                                                             \\\n    }\n/// Length of each hcode for no Unicode characters\n#define USX_HCODE_LENS_NO_UNI                                                                                                    \\\n    (const unsigned char[])                                                                                                      \\\n    {                                                                                                                            \\\n        2, 2, 2, 2, 0                                                                                                            \\\n    }\n\nextern const char *USX_FREQ_SEQ_DFLT[];\nextern const char *USX_FREQ_SEQ_TXT[];\nextern const char *USX_FREQ_SEQ_URL[];\nextern const char *USX_FREQ_SEQ_JSON[];\nextern const char *USX_FREQ_SEQ_HTML[];\nextern const char *USX_FREQ_SEQ_XML[];\nextern const char *USX_TEMPLATES[];\n\n/// Default preset parameter set. When composition of text is know beforehand, the other parameter sets in this section can be\n/// used to achieve more compression.\n#define USX_PSET_DFLT USX_HCODES_DFLT, USX_HCODE_LENS_DFLT, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set for English Alphabet only content\n#define USX_PSET_ALPHA_ONLY USX_HCODES_ALPHA_ONLY, USX_HCODE_LENS_ALPHA_ONLY, USX_FREQ_SEQ_TXT, USX_TEMPLATES\n/// Preset parameter set for Alpha numeric content\n#define USX_PSET_ALPHA_NUM_ONLY USX_HCODES_ALPHA_NUM_ONLY, USX_HCODE_LENS_ALPHA_NUM_ONLY, USX_FREQ_SEQ_TXT, USX_TEMPLATES\n/// Preset parameter set for Alpha numeric and symbol content\n#define USX_PSET_ALPHA_NUM_SYM_ONLY                                                                                              \\\n    USX_HCODES_ALPHA_NUM_SYM_ONLY, USX_HCODE_LENS_ALPHA_NUM_SYM_ONLY, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set for Alpha numeric symbol content having predominantly text\n#define USX_PSET_ALPHA_NUM_SYM_ONLY_TXT                                                                                          \\\n    USX_HCODES_ALPHA_NUM_SYM_ONLY, USX_HCODE_LENS_ALPHA_NUM_SYM_ONLY, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set favouring Alphabet content\n#define USX_PSET_FAVOR_ALPHA USX_HCODES_FAVOR_ALPHA, USX_HCODE_LENS_FAVOR_ALPHA, USX_FREQ_SEQ_TXT, USX_TEMPLATES\n/// Preset parameter set favouring repeating sequences\n#define USX_PSET_FAVOR_DICT USX_HCODES_FAVOR_DICT, USX_HCODE_LENS_FAVOR_DICT, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set favouring symbols\n#define USX_PSET_FAVOR_SYM USX_HCODES_FAVOR_SYM, USX_HCODE_LENS_FAVOR_SYM, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set favouring unlaut letters\n#define USX_PSET_FAVOR_UMLAUT USX_HCODES_FAVOR_UMLAUT, USX_HCODE_LENS_FAVOR_UMLAUT, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set for when there are no repeating sequences\n#define USX_PSET_NO_DICT USX_HCODES_NO_DICT, USX_HCODE_LENS_NO_DICT, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set for when there are no unicode symbols\n#define USX_PSET_NO_UNI USX_HCODES_NO_UNI, USX_HCODE_LENS_NO_UNI, USX_FREQ_SEQ_DFLT, USX_TEMPLATES\n/// Preset parameter set for when there are no unicode symbols favouring text\n#define USX_PSET_NO_UNI_FAVOR_TEXT USX_HCODES_NO_UNI, USX_HCODE_LENS_NO_UNI, USX_FREQ_SEQ_TXT, USX_TEMPLATES\n/// Preset parameter set favouring URL content\n#define USX_PSET_URL USX_HCODES_DFLT, USX_HCODE_LENS_DFLT, USX_FREQ_SEQ_URL, USX_TEMPLATES\n/// Preset parameter set favouring JSON content\n#define USX_PSET_JSON USX_HCODES_DFLT, USX_HCODE_LENS_DFLT, USX_FREQ_SEQ_JSON, USX_TEMPLATES\n/// Preset parameter set favouring JSON content having no Unicode symbols\n#define USX_PSET_JSON_NO_UNI USX_HCODES_NO_UNI, USX_HCODE_LENS_NO_UNI, USX_FREQ_SEQ_JSON, USX_TEMPLATES\n/// Preset parameter set favouring XML content\n#define USX_PSET_XML USX_HCODES_DFLT, USX_HCODE_LENS_DFLT, USX_FREQ_SEQ_XML, USX_TEMPLATES\n/// Preset parameter set favouring HTML content\n#define USX_PSET_HTML USX_HCODES_DFLT, USX_HCODE_LENS_DFLT, USX_FREQ_SEQ_HTML, USX_TEMPLATES\n\n/**\n * This structure is used when a string array needs to be compressed.\n * This is passed as a parameter to the unishox2_decompress_lines() function\n */\nstruct us_lnk_lst {\n    char *data;\n    struct us_lnk_lst *previous;\n};\n\n/**\n * This macro is for internal use, but builds upon the macro UNISHOX_API_WITH_OUTPUT_LEN\n * When the macro UNISHOX_API_WITH_OUTPUT_LEN is defined, the all the API functions\n * except the simple API functions accept an additional parameter olen\n * that enables the developer to pass the size of the output buffer provided\n * so that the api function may not write beyond that length.\n * This can be disabled if the developer knows that the buffer provided is sufficient enough\n * so no additional parameter is passed and the program is faster since additional check\n * for output length is not performed at each step\n */\n#if defined(UNISHOX_API_WITH_OUTPUT_LEN) && UNISHOX_API_WITH_OUTPUT_LEN != 0\n#define UNISHOX_API_OUT_AND_LEN(out, olen) out, olen\n#else\n#define UNISHOX_API_OUT_AND_LEN(out, olen) out\n#endif\n\n/**\n * Simple API for compressing a string\n * @param[in] in    Input ASCII / UTF-8 string\n * @param[in] len   length in bytes\n * @param[out] out  output buffer - should be large enough to hold compressed output\n */\nextern int unishox2_compress_simple(const char *in, int len, char *out);\n/**\n * Simple API for decompressing a string\n * @param[in] in    Input compressed bytes (output of unishox2_compress functions)\n * @param[in] len   length of 'in' in bytes\n * @param[out] out  output buffer for ASCII / UTF-8 string - should be large enough\n */\nextern int unishox2_decompress_simple(const char *in, int len, char *out);\n/**\n * Comprehensive API for compressing a string\n *\n * Presets are available for the last four parameters so they can be passed as single parameter. \\n\n * See USX_PSET_* macros. Example call: \\n\n *    unishox2_compress(in, len, out, olen, USX_PSET_ALPHA_ONLY);\n *\n * @param[in] in             Input ASCII / UTF-8 string\n * @param[in] len            length in bytes\n * @param[out] out           output buffer - should be large enough to hold compressed output\n * @param[in] olen           length of 'out' buffer in bytes. Can be omitted if sufficient buffer is provided\n * @param[in] usx_hcodes     Horizontal codes (array of bytes). See macro section for samples.\n * @param[in] usx_hcode_lens Length of each element in usx_hcodes array\n * @param[in] usx_freq_seq   Frequently occurring sequences. See USX_FREQ_SEQ_* macros for samples\n * @param[in] usx_templates  Templates of frequently occurring patterns. See USX_TEMPLATES macro.\n */\nextern int unishox2_compress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen),\n                             const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[], const char *usx_freq_seq[],\n                             const char *usx_templates[]);\n/**\n * Comprehensive API for de-compressing a string\n *\n * Presets are available for the last four parameters so they can be passed as single parameter. \\n\n * See USX_PSET_* macros. Example call: \\n\n *    unishox2_decompress(in, len, out, olen, USX_PSET_ALPHA_ONLY);\n *\n * @param[in] in             Input compressed bytes (output of unishox2_compress functions)\n * @param[in] len            length of 'in' in bytes\n * @param[out] out           output buffer - should be large enough to hold de-compressed output\n * @param[in] olen           length of 'out' buffer in bytes. Can be omitted if sufficient buffer is provided\n * @param[in] usx_hcodes     Horizontal codes (array of bytes). See macro section for samples.\n * @param[in] usx_hcode_lens Length of each element in usx_hcodes array\n * @param[in] usx_freq_seq   Frequently occurring sequences. See USX_FREQ_SEQ_* macros for samples\n * @param[in] usx_templates  Templates of frequently occurring patterns. See USX_TEMPLATES macro.\n */\nextern int unishox2_decompress(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen),\n                               const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[], const char *usx_freq_seq[],\n                               const char *usx_templates[]);\n/**\n * More Comprehensive API for compressing array of strings\n *\n * See unishox2_compress() function for parameter definitions. \\n\n * This function takes an additional parameter, i.e. 'prev_lines' - the usx_lnk_lst structure \\n\n * See -g parameter in test_unishox2.c to find out how this can be used. \\n\n * This function is used when an array of strings need to be compressed \\n\n * and stored in a compressed array of bytes for use as a constant in other programs \\n\n * where each element of the array can be decompressed and used at runtime.\n */\nextern int unishox2_compress_lines(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen),\n                                   const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[],\n                                   const char *usx_freq_seq[], const char *usx_templates[], struct us_lnk_lst *prev_lines);\n/**\n * More Comprehensive API for de-compressing array of strings \\n\n * This function is not be used in conjuction with unishox2_compress_lines()\n *\n * See unishox2_decompress() function for parameter definitions. \\n\n * Typically an array is compressed using unishox2_compress_lines() and \\n\n * a header (.h) file is generated using the resultant compressed array. \\n\n * This header file can be used in another program with another decompress \\n\n * routine which takes this compressed array as parameter and index to be \\n\n * decompressed.\n */\nextern int unishox2_decompress_lines(const char *in, int len, UNISHOX_API_OUT_AND_LEN(char *out, int olen),\n                                     const unsigned char usx_hcodes[], const unsigned char usx_hcode_lens[],\n                                     const char *usx_freq_seq[], const char *usx_templates[], struct us_lnk_lst *prev_lines);\n\n#endif\n"
  },
  {
    "path": "src/mesh/eth/ethClient.cpp",
    "content": "#include \"mesh/eth/ethClient.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"concurrency/Periodic.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"mesh/api/ethServerAPI.h\"\n#include \"target_specific.h\"\n#include <RAK13800_W5100S.h>\n#include <SPI.h>\n\n#if HAS_NETWORKING\n\n#ifndef DISABLE_NTP\n#include <NTPClient.h>\n\n// NTP\nEthernetUDP ntpUDP;\nNTPClient timeClient(ntpUDP, config.network.ntp_server);\nuint32_t ntp_renew = 0;\n#endif\n\nEthernetUDP syslogClient;\nmeshtastic::Syslog syslog(syslogClient);\n\nbool ethStartupComplete = 0;\n\nusing namespace concurrency;\n\nstatic Periodic *ethEvent;\n\nstatic int32_t reconnectETH()\n{\n    if (config.network.eth_enabled) {\n\n        // Detect W5100S chip reset by verifying the MAC address register.\n        // PoE power instability can brownout the W5100S while the MCU keeps running,\n        // causing all chip registers (MAC, IP, sockets) to revert to defaults.\n        uint8_t currentMac[6];\n        Ethernet.MACAddress(currentMac);\n\n        uint8_t expectedMac[6];\n        getMacAddr(expectedMac);\n        expectedMac[0] &= 0xfe;\n\n        if (memcmp(currentMac, expectedMac, 6) != 0) {\n            LOG_WARN(\"W5100S MAC mismatch (chip reset detected), reinitializing Ethernet\");\n\n            syslog.disable();\n#if !MESHTASTIC_EXCLUDE_SOCKETAPI\n            deInitApiServer();\n#endif\n#if HAS_UDP_MULTICAST\n            if (udpHandler) {\n                udpHandler->stop();\n            }\n#endif\n\n            ethStartupComplete = false;\n#ifndef DISABLE_NTP\n            ntp_renew = 0;\n#endif\n\n#ifdef PIN_ETHERNET_RESET\n            pinMode(PIN_ETHERNET_RESET, OUTPUT);\n            digitalWrite(PIN_ETHERNET_RESET, LOW);\n            delay(100);\n            digitalWrite(PIN_ETHERNET_RESET, HIGH);\n            delay(100);\n#endif\n\n#ifdef RAK11310\n            ETH_SPI_PORT.setSCK(PIN_SPI0_SCK);\n            ETH_SPI_PORT.setTX(PIN_SPI0_MOSI);\n            ETH_SPI_PORT.setRX(PIN_SPI0_MISO);\n            ETH_SPI_PORT.begin();\n#endif\n            Ethernet.init(ETH_SPI_PORT, PIN_ETHERNET_SS);\n\n            int status = 0;\n            if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_DHCP) {\n                status = Ethernet.begin(expectedMac);\n            } else if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC) {\n                Ethernet.begin(expectedMac, config.network.ipv4_config.ip, config.network.ipv4_config.dns,\n                               config.network.ipv4_config.gateway, config.network.ipv4_config.subnet);\n                status = 1;\n            }\n\n            if (status == 0) {\n                LOG_ERROR(\"Ethernet re-initialization failed, will retry\");\n                return 5000;\n            }\n\n            LOG_INFO(\"Ethernet reinitialized - IP %u.%u.%u.%u\", Ethernet.localIP()[0], Ethernet.localIP()[1],\n                     Ethernet.localIP()[2], Ethernet.localIP()[3]);\n        }\n\n        Ethernet.maintain();\n        if (!ethStartupComplete) {\n            // Start web server\n            LOG_INFO(\"Start Ethernet network services\");\n\n#ifndef DISABLE_NTP\n            LOG_INFO(\"Start NTP time client\");\n            timeClient.begin();\n            timeClient.setUpdateInterval(60 * 60); // Update once an hour\n#endif\n\n            if (config.network.rsyslog_server[0]) {\n                LOG_INFO(\"Start Syslog client\");\n                // Defaults\n                int serverPort = 514;\n                const char *serverAddr = config.network.rsyslog_server;\n                String server = String(serverAddr);\n                int delimIndex = server.indexOf(':');\n                if (delimIndex > 0) {\n                    String port = server.substring(delimIndex + 1, server.length());\n                    server[delimIndex] = 0;\n                    serverPort = port.toInt();\n                    serverAddr = server.c_str();\n                }\n                syslog.server(serverAddr, serverPort);\n                syslog.deviceHostname(getDeviceName());\n                syslog.appName(\"Meshtastic\");\n                syslog.defaultPriority(LOGLEVEL_USER);\n                syslog.enable();\n            }\n\n#if !MESHTASTIC_EXCLUDE_SOCKETAPI\n            if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n                initApiServer();\n            }\n#endif\n#if HAS_UDP_MULTICAST\n            if (udpHandler && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {\n                udpHandler->start();\n            }\n#endif\n\n            ethStartupComplete = true;\n        }\n    }\n\n#ifndef DISABLE_NTP\n    if (isEthernetAvailable() && (ntp_renew < millis())) {\n\n        LOG_INFO(\"Update NTP time from %s\", config.network.ntp_server);\n        if (timeClient.update()) {\n            LOG_DEBUG(\"NTP Request Success - Set RTCQualityNTP if needed\");\n\n            struct timeval tv;\n            tv.tv_sec = timeClient.getEpochTime();\n            tv.tv_usec = 0;\n\n            perhapsSetRTC(RTCQualityNTP, &tv);\n\n            ntp_renew = millis() + 43200 * 1000; // success, refresh every 12 hours\n        } else {\n            LOG_ERROR(\"NTP Update failed\");\n            ntp_renew = millis() + 300 * 1000; // failure, retry every 5 minutes\n        }\n    }\n#endif\n\n    return 5000; // every 5 seconds\n}\n\n// Startup Ethernet\nbool initEthernet()\n{\n    if (config.network.eth_enabled) {\n#ifdef PIN_ETH_POWER_EN\n        pinMode(PIN_ETH_POWER_EN, OUTPUT);\n        digitalWrite(PIN_ETH_POWER_EN, HIGH); // Power up.\n        delay(100);\n#endif\n\n#ifdef PIN_ETHERNET_RESET\n        pinMode(PIN_ETHERNET_RESET, OUTPUT);\n        digitalWrite(PIN_ETHERNET_RESET, LOW); // Reset Time.\n        delay(100);\n        digitalWrite(PIN_ETHERNET_RESET, HIGH); // Reset Time.\n#endif\n\n#ifdef RAK11310 // Initialize the SPI port\n        ETH_SPI_PORT.setSCK(PIN_SPI0_SCK);\n        ETH_SPI_PORT.setTX(PIN_SPI0_MOSI);\n        ETH_SPI_PORT.setRX(PIN_SPI0_MISO);\n        ETH_SPI_PORT.begin();\n#endif\n        Ethernet.init(ETH_SPI_PORT, PIN_ETHERNET_SS);\n\n        uint8_t mac[6];\n\n        int status = 0;\n\n        //        createSSLCert();\n\n        getMacAddr(mac); // FIXME use the BLE MAC for now...\n        mac[0] &= 0xfe;  // Make sure this is not a multicast MAC\n\n        if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_DHCP) {\n            LOG_INFO(\"Start Ethernet DHCP\");\n            status = Ethernet.begin(mac);\n        } else if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC) {\n            LOG_INFO(\"Start Ethernet Static\");\n            Ethernet.begin(mac, config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.gateway,\n                           config.network.ipv4_config.subnet);\n            status = 1;\n        } else {\n            LOG_INFO(\"Ethernet Disabled\");\n            return false;\n        }\n\n        if (status == 0) {\n            if (Ethernet.hardwareStatus() == EthernetNoHardware) {\n                LOG_ERROR(\"Ethernet shield was not found\");\n                return false;\n            } else if (Ethernet.linkStatus() == LinkOFF) {\n                LOG_ERROR(\"Ethernet cable is not connected\");\n                return false;\n            } else {\n                LOG_ERROR(\"Unknown Ethernet error\");\n                return false;\n            }\n        } else {\n            LOG_INFO(\"Local IP %u.%u.%u.%u\", Ethernet.localIP()[0], Ethernet.localIP()[1], Ethernet.localIP()[2],\n                     Ethernet.localIP()[3]);\n            LOG_INFO(\"Subnet Mask %u.%u.%u.%u\", Ethernet.subnetMask()[0], Ethernet.subnetMask()[1], Ethernet.subnetMask()[2],\n                     Ethernet.subnetMask()[3]);\n            LOG_INFO(\"Gateway IP %u.%u.%u.%u\", Ethernet.gatewayIP()[0], Ethernet.gatewayIP()[1], Ethernet.gatewayIP()[2],\n                     Ethernet.gatewayIP()[3]);\n            LOG_INFO(\"DNS Server IP %u.%u.%u.%u\", Ethernet.dnsServerIP()[0], Ethernet.dnsServerIP()[1], Ethernet.dnsServerIP()[2],\n                     Ethernet.dnsServerIP()[3]);\n        }\n\n        ethEvent = new Periodic(\"ethConnect\", reconnectETH);\n\n        return true;\n    } else {\n        LOG_INFO(\"Not using Ethernet\");\n        return false;\n    }\n}\n\nbool isEthernetAvailable()\n{\n\n    if (!config.network.eth_enabled) {\n        syslog.disable();\n        return false;\n    } else if (Ethernet.hardwareStatus() == EthernetNoHardware) {\n        syslog.disable();\n        return false;\n    } else if (Ethernet.linkStatus() == LinkOFF) {\n        syslog.disable();\n        return false;\n    } else {\n        return true;\n    }\n}\n\n#endif\n"
  },
  {
    "path": "src/mesh/eth/ethClient.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#include <Arduino.h>\n\nbool initEthernet();\nbool isEthernetAvailable();\n"
  },
  {
    "path": "src/mesh/generated/.clang-format",
    "content": "DisableFormat: true\nSortIncludes: false"
  },
  {
    "path": "src/mesh/generated/meshtastic/admin.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/admin.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_AdminMessage, meshtastic_AdminMessage, 2)\n\n\nPB_BIND(meshtastic_AdminMessage_InputEvent, meshtastic_AdminMessage_InputEvent, AUTO)\n\n\nPB_BIND(meshtastic_AdminMessage_OTAEvent, meshtastic_AdminMessage_OTAEvent, AUTO)\n\n\nPB_BIND(meshtastic_HamParameters, meshtastic_HamParameters, AUTO)\n\n\nPB_BIND(meshtastic_NodeRemoteHardwarePinsResponse, meshtastic_NodeRemoteHardwarePinsResponse, 2)\n\n\nPB_BIND(meshtastic_SharedContact, meshtastic_SharedContact, AUTO)\n\n\nPB_BIND(meshtastic_KeyVerificationAdmin, meshtastic_KeyVerificationAdmin, AUTO)\n\n\nPB_BIND(meshtastic_SensorConfig, meshtastic_SensorConfig, AUTO)\n\n\nPB_BIND(meshtastic_SCD4X_config, meshtastic_SCD4X_config, AUTO)\n\n\nPB_BIND(meshtastic_SEN5X_config, meshtastic_SEN5X_config, AUTO)\n\n\nPB_BIND(meshtastic_SCD30_config, meshtastic_SCD30_config, AUTO)\n\n\nPB_BIND(meshtastic_SHTXX_config, meshtastic_SHTXX_config, AUTO)\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/admin.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_ADMIN_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_ADMIN_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/channel.pb.h\"\n#include \"meshtastic/config.pb.h\"\n#include \"meshtastic/connection_status.pb.h\"\n#include \"meshtastic/device_ui.pb.h\"\n#include \"meshtastic/mesh.pb.h\"\n#include \"meshtastic/module_config.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* Firmware update mode for OTA updates */\ntypedef enum _meshtastic_OTAMode {\n    /* Do not reboot into OTA mode */\n    meshtastic_OTAMode_NO_REBOOT_OTA = 0,\n    /* Reboot into OTA mode for BLE firmware update */\n    meshtastic_OTAMode_OTA_BLE = 1,\n    /* Reboot into OTA mode for WiFi firmware update */\n    meshtastic_OTAMode_OTA_WIFI = 2\n} meshtastic_OTAMode;\n\n/* TODO: REPLACE */\ntypedef enum _meshtastic_AdminMessage_ConfigType {\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG = 0,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_POSITION_CONFIG = 1,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_POWER_CONFIG = 2,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_NETWORK_CONFIG = 3,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_DISPLAY_CONFIG = 4,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_LORA_CONFIG = 5,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG = 7,\n    /* Session key config */\n    meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG = 8,\n    /* device-ui config */\n    meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG = 9\n} meshtastic_AdminMessage_ConfigType;\n\n/* TODO: REPLACE */\ntypedef enum _meshtastic_AdminMessage_ModuleConfigType {\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG = 0,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_SERIAL_CONFIG = 1,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_EXTNOTIF_CONFIG = 2,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_STOREFORWARD_CONFIG = 3,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_RANGETEST_CONFIG = 4,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_TELEMETRY_CONFIG = 5,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_CANNEDMSG_CONFIG = 6,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_AUDIO_CONFIG = 7,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG = 8,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_NEIGHBORINFO_CONFIG = 9,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_AMBIENTLIGHTING_CONFIG = 10,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_DETECTIONSENSOR_CONFIG = 11,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG = 12,\n    /* TODO: REPLACE */\n    meshtastic_AdminMessage_ModuleConfigType_STATUSMESSAGE_CONFIG = 13,\n    /* Traffic management module config */\n    meshtastic_AdminMessage_ModuleConfigType_TRAFFICMANAGEMENT_CONFIG = 14,\n    /* TAK module config */\n    meshtastic_AdminMessage_ModuleConfigType_TAK_CONFIG = 15\n} meshtastic_AdminMessage_ModuleConfigType;\n\ntypedef enum _meshtastic_AdminMessage_BackupLocation {\n    /* Backup to the internal flash */\n    meshtastic_AdminMessage_BackupLocation_FLASH = 0,\n    /* Backup to the SD card */\n    meshtastic_AdminMessage_BackupLocation_SD = 1\n} meshtastic_AdminMessage_BackupLocation;\n\n/* Three stages of this request. */\ntypedef enum _meshtastic_KeyVerificationAdmin_MessageType {\n    /* This is the first stage, where a client initiates */\n    meshtastic_KeyVerificationAdmin_MessageType_INITIATE_VERIFICATION = 0,\n    /* After the nonce has been returned over the mesh, the client prompts for the security number\n And uses this message to provide it to the node. */\n    meshtastic_KeyVerificationAdmin_MessageType_PROVIDE_SECURITY_NUMBER = 1,\n    /* Once the user has compared the verification message, this message notifies the node. */\n    meshtastic_KeyVerificationAdmin_MessageType_DO_VERIFY = 2,\n    /* This is the cancel path, can be taken at any point */\n    meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY = 3\n} meshtastic_KeyVerificationAdmin_MessageType;\n\n/* Struct definitions */\n/* Input event message to be sent to the node. */\ntypedef struct _meshtastic_AdminMessage_InputEvent {\n    /* The input event code */\n    uint8_t event_code;\n    /* Keyboard character code */\n    uint8_t kb_char;\n    /* The touch X coordinate */\n    uint16_t touch_x;\n    /* The touch Y coordinate */\n    uint16_t touch_y;\n} meshtastic_AdminMessage_InputEvent;\n\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_AdminMessage_OTAEvent_ota_hash_t;\n/* User is requesting an over the air update.\n Node will reboot into the OTA loader */\ntypedef struct _meshtastic_AdminMessage_OTAEvent {\n    /* Tell the node to reboot into OTA mode for firmware update via BLE or WiFi (ESP32 only for now) */\n    meshtastic_OTAMode reboot_ota_mode;\n    /* A 32 byte hash of the OTA firmware.\n Used to verify the integrity of the firmware before applying an update. */\n    meshtastic_AdminMessage_OTAEvent_ota_hash_t ota_hash;\n} meshtastic_AdminMessage_OTAEvent;\n\n/* Parameters for setting up Meshtastic for ameteur radio usage */\ntypedef struct _meshtastic_HamParameters {\n    /* Amateur radio call sign, eg. KD2ABC */\n    char call_sign[8];\n    /* Transmit power in dBm at the LoRA transceiver, not including any amplification */\n    int32_t tx_power;\n    /* The selected frequency of LoRA operation\n Please respect your local laws, regulations, and band plans.\n Ensure your radio is capable of operating of the selected frequency before setting this. */\n    float frequency;\n    /* Optional short name of user */\n    char short_name[5];\n} meshtastic_HamParameters;\n\n/* Response envelope for node_remote_hardware_pins */\ntypedef struct _meshtastic_NodeRemoteHardwarePinsResponse {\n    /* Nodes and their respective remote hardware GPIO pins */\n    pb_size_t node_remote_hardware_pins_count;\n    meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[16];\n} meshtastic_NodeRemoteHardwarePinsResponse;\n\ntypedef struct _meshtastic_SharedContact {\n    /* The node number of the contact */\n    uint32_t node_num;\n    /* The User of the contact */\n    bool has_user;\n    meshtastic_User user;\n    /* Add this contact to the blocked / ignored list */\n    bool should_ignore;\n    /* Set the IS_KEY_MANUALLY_VERIFIED bit */\n    bool manually_verified;\n} meshtastic_SharedContact;\n\n/* This message is used by a client to initiate or complete a key verification */\ntypedef struct _meshtastic_KeyVerificationAdmin {\n    meshtastic_KeyVerificationAdmin_MessageType message_type;\n    /* The nodenum we're requesting */\n    uint32_t remote_nodenum;\n    /* The nonce is used to track the connection */\n    uint64_t nonce;\n    /* The 4 digit code generated by the remote node, and communicated outside the mesh */\n    bool has_security_number;\n    uint32_t security_number;\n} meshtastic_KeyVerificationAdmin;\n\ntypedef struct _meshtastic_SCD4X_config {\n    /* Set Automatic self-calibration enabled */\n    bool has_set_asc;\n    bool set_asc;\n    /* Recalibration target CO2 concentration in ppm (FRC or ASC) */\n    bool has_set_target_co2_conc;\n    uint32_t set_target_co2_conc;\n    /* Reference temperature in degC */\n    bool has_set_temperature;\n    float set_temperature;\n    /* Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure) */\n    bool has_set_altitude;\n    uint32_t set_altitude;\n    /* Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude) */\n    bool has_set_ambient_pressure;\n    uint32_t set_ambient_pressure;\n    /* Perform a factory reset of the sensor */\n    bool has_factory_reset;\n    bool factory_reset;\n    /* Power mode for sensor (true for low power, false for normal) */\n    bool has_set_power_mode;\n    bool set_power_mode;\n} meshtastic_SCD4X_config;\n\ntypedef struct _meshtastic_SEN5X_config {\n    /* Reference temperature in degC */\n    bool has_set_temperature;\n    float set_temperature;\n    /* One-shot mode (true for low power - one-shot mode, false for normal - continuous mode) */\n    bool has_set_one_shot_mode;\n    bool set_one_shot_mode;\n} meshtastic_SEN5X_config;\n\ntypedef struct _meshtastic_SCD30_config {\n    /* Set Automatic self-calibration enabled */\n    bool has_set_asc;\n    bool set_asc;\n    /* Recalibration target CO2 concentration in ppm (FRC or ASC) */\n    bool has_set_target_co2_conc;\n    uint32_t set_target_co2_conc;\n    /* Reference temperature in degC */\n    bool has_set_temperature;\n    float set_temperature;\n    /* Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure) */\n    bool has_set_altitude;\n    uint32_t set_altitude;\n    /* Power mode for sensor (true for low power, false for normal) */\n    bool has_set_measurement_interval;\n    uint32_t set_measurement_interval;\n    /* Perform a factory reset of the sensor */\n    bool has_soft_reset;\n    bool soft_reset;\n} meshtastic_SCD30_config;\n\ntypedef struct _meshtastic_SHTXX_config {\n    /* Accuracy mode (0 = low, 1 = medium, 2 = high) */\n    bool has_set_accuracy;\n    uint32_t set_accuracy;\n} meshtastic_SHTXX_config;\n\ntypedef struct _meshtastic_SensorConfig {\n    /* SCD4X CO2 Sensor configuration */\n    bool has_scd4x_config;\n    meshtastic_SCD4X_config scd4x_config;\n    /* SEN5X PM Sensor configuration */\n    bool has_sen5x_config;\n    meshtastic_SEN5X_config sen5x_config;\n    /* SCD30 CO2 Sensor configuration */\n    bool has_scd30_config;\n    meshtastic_SCD30_config scd30_config;\n    /* SHTXX temperature and relative humidity sensor configuration */\n    bool has_shtxx_config;\n    meshtastic_SHTXX_config shtxx_config;\n} meshtastic_SensorConfig;\n\ntypedef PB_BYTES_ARRAY_T(8) meshtastic_AdminMessage_session_passkey_t;\n/* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.\n This message is used to do settings operations to both remote AND local nodes.\n (Prior to 1.2 these operations were done via special ToRadio operations) */\ntypedef struct _meshtastic_AdminMessage {\n    pb_size_t which_payload_variant;\n    union {\n        /* Send the specified channel in the response to this message\n     NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present) */\n        uint32_t get_channel_request;\n        /* TODO: REPLACE */\n        meshtastic_Channel get_channel_response;\n        /* Send the current owner data in the response to this message. */\n        bool get_owner_request;\n        /* TODO: REPLACE */\n        meshtastic_User get_owner_response;\n        /* Ask for the following config data to be sent */\n        meshtastic_AdminMessage_ConfigType get_config_request;\n        /* Send the current Config in the response to this message. */\n        meshtastic_Config get_config_response;\n        /* Ask for the following config data to be sent */\n        meshtastic_AdminMessage_ModuleConfigType get_module_config_request;\n        /* Send the current Config in the response to this message. */\n        meshtastic_ModuleConfig get_module_config_response;\n        /* Get the Canned Message Module messages in the response to this message. */\n        bool get_canned_message_module_messages_request;\n        /* Get the Canned Message Module messages in the response to this message. */\n        char get_canned_message_module_messages_response[201];\n        /* Request the node to send device metadata (firmware, protobuf version, etc) */\n        bool get_device_metadata_request;\n        /* Device metadata response */\n        meshtastic_DeviceMetadata get_device_metadata_response;\n        /* Get the Ringtone in the response to this message. */\n        bool get_ringtone_request;\n        /* Get the Ringtone in the response to this message. */\n        char get_ringtone_response[231];\n        /* Request the node to send it's connection status */\n        bool get_device_connection_status_request;\n        /* Device connection status response */\n        meshtastic_DeviceConnectionStatus get_device_connection_status_response;\n        /* Setup a node for licensed amateur (ham) radio operation */\n        meshtastic_HamParameters set_ham_mode;\n        /* Get the mesh's nodes with their available gpio pins for RemoteHardware module use */\n        bool get_node_remote_hardware_pins_request;\n        /* Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use */\n        meshtastic_NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response;\n        /* Enter (UF2) DFU mode\n     Only implemented on NRF52 currently */\n        bool enter_dfu_mode_request;\n        /* Delete the file by the specified path from the device */\n        char delete_file_request[201];\n        /* Set zero and offset for scale chips */\n        uint32_t set_scale;\n        /* Backup the node's preferences */\n        meshtastic_AdminMessage_BackupLocation backup_preferences;\n        /* Restore the node's preferences */\n        meshtastic_AdminMessage_BackupLocation restore_preferences;\n        /* Remove backups of the node's preferences */\n        meshtastic_AdminMessage_BackupLocation remove_backup_preferences;\n        /* Send an input event to the node.\n     This is used to trigger physical input events like button presses, touch events, etc. */\n        meshtastic_AdminMessage_InputEvent send_input_event;\n        /* Set the owner for this node */\n        meshtastic_User set_owner;\n        /* Set channels (using the new API).\n     A special channel is the \"primary channel\".\n     The other records are secondary channels.\n     Note: only one channel can be marked as primary.\n     If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically. */\n        meshtastic_Channel set_channel;\n        /* Set the current Config */\n        meshtastic_Config set_config;\n        /* Set the current Config */\n        meshtastic_ModuleConfig set_module_config;\n        /* Set the Canned Message Module messages text. */\n        char set_canned_message_module_messages[201];\n        /* Set the ringtone for ExternalNotification. */\n        char set_ringtone_message[231];\n        /* Remove the node by the specified node-num from the NodeDB on the device */\n        uint32_t remove_by_nodenum;\n        /* Set specified node-num to be favorited on the NodeDB on the device */\n        uint32_t set_favorite_node;\n        /* Set specified node-num to be un-favorited on the NodeDB on the device */\n        uint32_t remove_favorite_node;\n        /* Set fixed position data on the node and then set the position.fixed_position = true */\n        meshtastic_Position set_fixed_position;\n        /* Clear fixed position coordinates and then set position.fixed_position = false */\n        bool remove_fixed_position;\n        /* Set time only on the node\n     Convenience method to set the time on the node (as Net quality) without any other position data */\n        uint32_t set_time_only;\n        /* Tell the node to send the stored ui data. */\n        bool get_ui_config_request;\n        /* Reply stored device ui data. */\n        meshtastic_DeviceUIConfig get_ui_config_response;\n        /* Tell the node to store UI data persistently. */\n        meshtastic_DeviceUIConfig store_ui_config;\n        /* Set specified node-num to be ignored on the NodeDB on the device */\n        uint32_t set_ignored_node;\n        /* Set specified node-num to be un-ignored on the NodeDB on the device */\n        uint32_t remove_ignored_node;\n        /* Set specified node-num to be muted */\n        uint32_t toggle_muted_node;\n        /* Begins an edit transaction for config, module config, owner, and channel settings changes\n     This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) */\n        bool begin_edit_settings;\n        /* Commits an open transaction for any edits made to config, module config, owner, and channel settings */\n        bool commit_edit_settings;\n        /* Add a contact (User) to the nodedb */\n        meshtastic_SharedContact add_contact;\n        /* Initiate or respond to a key verification request */\n        meshtastic_KeyVerificationAdmin key_verification;\n        /* Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. */\n        int32_t factory_reset_device;\n        /* Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)\n     Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth.\n     Deprecated in favor of reboot_ota_mode in 2.7.17 */\n        int32_t reboot_ota_seconds;\n        /* This message is only supported for the simulator Portduino build.\n     If received the simulator will exit successfully. */\n        bool exit_simulator;\n        /* Tell the node to reboot in this many seconds (or <0 to cancel reboot) */\n        int32_t reboot_seconds;\n        /* Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) */\n        int32_t shutdown_seconds;\n        /* Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved. */\n        int32_t factory_reset_config;\n        /* Tell the node to reset the nodedb.\n     When true, favorites are preserved through reset. */\n        bool nodedb_reset;\n        /* Tell the node to reset into the OTA Loader */\n        meshtastic_AdminMessage_OTAEvent ota_request;\n        /* Parameters and sensor configuration */\n        meshtastic_SensorConfig sensor_config;\n    };\n    /* The node generates this key and sends it with any get_x_response packets.\n The client MUST include the same key with any set_x commands. Key expires after 300 seconds.\n Prevents replay attacks for admin messages. */\n    meshtastic_AdminMessage_session_passkey_t session_passkey;\n} meshtastic_AdminMessage;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_OTAMode_MIN meshtastic_OTAMode_NO_REBOOT_OTA\n#define _meshtastic_OTAMode_MAX meshtastic_OTAMode_OTA_WIFI\n#define _meshtastic_OTAMode_ARRAYSIZE ((meshtastic_OTAMode)(meshtastic_OTAMode_OTA_WIFI+1))\n\n#define _meshtastic_AdminMessage_ConfigType_MIN meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG\n#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG\n#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG+1))\n\n#define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG\n#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_TAK_CONFIG\n#define _meshtastic_AdminMessage_ModuleConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ModuleConfigType)(meshtastic_AdminMessage_ModuleConfigType_TAK_CONFIG+1))\n\n#define _meshtastic_AdminMessage_BackupLocation_MIN meshtastic_AdminMessage_BackupLocation_FLASH\n#define _meshtastic_AdminMessage_BackupLocation_MAX meshtastic_AdminMessage_BackupLocation_SD\n#define _meshtastic_AdminMessage_BackupLocation_ARRAYSIZE ((meshtastic_AdminMessage_BackupLocation)(meshtastic_AdminMessage_BackupLocation_SD+1))\n\n#define _meshtastic_KeyVerificationAdmin_MessageType_MIN meshtastic_KeyVerificationAdmin_MessageType_INITIATE_VERIFICATION\n#define _meshtastic_KeyVerificationAdmin_MessageType_MAX meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY\n#define _meshtastic_KeyVerificationAdmin_MessageType_ARRAYSIZE ((meshtastic_KeyVerificationAdmin_MessageType)(meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY+1))\n\n#define meshtastic_AdminMessage_payload_variant_get_config_request_ENUMTYPE meshtastic_AdminMessage_ConfigType\n#define meshtastic_AdminMessage_payload_variant_get_module_config_request_ENUMTYPE meshtastic_AdminMessage_ModuleConfigType\n#define meshtastic_AdminMessage_payload_variant_backup_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation\n#define meshtastic_AdminMessage_payload_variant_restore_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation\n#define meshtastic_AdminMessage_payload_variant_remove_backup_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation\n\n\n#define meshtastic_AdminMessage_OTAEvent_reboot_ota_mode_ENUMTYPE meshtastic_OTAMode\n\n\n\n\n#define meshtastic_KeyVerificationAdmin_message_type_ENUMTYPE meshtastic_KeyVerificationAdmin_MessageType\n\n\n\n\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_AdminMessage_init_default     {0, {0}, {0, {0}}}\n#define meshtastic_AdminMessage_InputEvent_init_default {0, 0, 0, 0}\n#define meshtastic_AdminMessage_OTAEvent_init_default {_meshtastic_OTAMode_MIN, {0, {0}}}\n#define meshtastic_HamParameters_init_default    {\"\", 0, 0, \"\"}\n#define meshtastic_NodeRemoteHardwarePinsResponse_init_default {0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}}\n#define meshtastic_SharedContact_init_default    {0, false, meshtastic_User_init_default, 0, 0}\n#define meshtastic_KeyVerificationAdmin_init_default {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}\n#define meshtastic_SensorConfig_init_default     {false, meshtastic_SCD4X_config_init_default, false, meshtastic_SEN5X_config_init_default, false, meshtastic_SCD30_config_init_default, false, meshtastic_SHTXX_config_init_default}\n#define meshtastic_SCD4X_config_init_default     {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_SEN5X_config_init_default     {false, 0, false, 0}\n#define meshtastic_SCD30_config_init_default     {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_SHTXX_config_init_default     {false, 0}\n#define meshtastic_AdminMessage_init_zero        {0, {0}, {0, {0}}}\n#define meshtastic_AdminMessage_InputEvent_init_zero {0, 0, 0, 0}\n#define meshtastic_AdminMessage_OTAEvent_init_zero {_meshtastic_OTAMode_MIN, {0, {0}}}\n#define meshtastic_HamParameters_init_zero       {\"\", 0, 0, \"\"}\n#define meshtastic_NodeRemoteHardwarePinsResponse_init_zero {0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}}\n#define meshtastic_SharedContact_init_zero       {0, false, meshtastic_User_init_zero, 0, 0}\n#define meshtastic_KeyVerificationAdmin_init_zero {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}\n#define meshtastic_SensorConfig_init_zero        {false, meshtastic_SCD4X_config_init_zero, false, meshtastic_SEN5X_config_init_zero, false, meshtastic_SCD30_config_init_zero, false, meshtastic_SHTXX_config_init_zero}\n#define meshtastic_SCD4X_config_init_zero        {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_SEN5X_config_init_zero        {false, 0, false, 0}\n#define meshtastic_SCD30_config_init_zero        {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_SHTXX_config_init_zero        {false, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_AdminMessage_InputEvent_event_code_tag 1\n#define meshtastic_AdminMessage_InputEvent_kb_char_tag 2\n#define meshtastic_AdminMessage_InputEvent_touch_x_tag 3\n#define meshtastic_AdminMessage_InputEvent_touch_y_tag 4\n#define meshtastic_AdminMessage_OTAEvent_reboot_ota_mode_tag 1\n#define meshtastic_AdminMessage_OTAEvent_ota_hash_tag 2\n#define meshtastic_HamParameters_call_sign_tag   1\n#define meshtastic_HamParameters_tx_power_tag    2\n#define meshtastic_HamParameters_frequency_tag   3\n#define meshtastic_HamParameters_short_name_tag  4\n#define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_tag 1\n#define meshtastic_SharedContact_node_num_tag    1\n#define meshtastic_SharedContact_user_tag        2\n#define meshtastic_SharedContact_should_ignore_tag 3\n#define meshtastic_SharedContact_manually_verified_tag 4\n#define meshtastic_KeyVerificationAdmin_message_type_tag 1\n#define meshtastic_KeyVerificationAdmin_remote_nodenum_tag 2\n#define meshtastic_KeyVerificationAdmin_nonce_tag 3\n#define meshtastic_KeyVerificationAdmin_security_number_tag 4\n#define meshtastic_SCD4X_config_set_asc_tag      1\n#define meshtastic_SCD4X_config_set_target_co2_conc_tag 2\n#define meshtastic_SCD4X_config_set_temperature_tag 3\n#define meshtastic_SCD4X_config_set_altitude_tag 4\n#define meshtastic_SCD4X_config_set_ambient_pressure_tag 5\n#define meshtastic_SCD4X_config_factory_reset_tag 6\n#define meshtastic_SCD4X_config_set_power_mode_tag 7\n#define meshtastic_SEN5X_config_set_temperature_tag 1\n#define meshtastic_SEN5X_config_set_one_shot_mode_tag 2\n#define meshtastic_SCD30_config_set_asc_tag      1\n#define meshtastic_SCD30_config_set_target_co2_conc_tag 2\n#define meshtastic_SCD30_config_set_temperature_tag 3\n#define meshtastic_SCD30_config_set_altitude_tag 4\n#define meshtastic_SCD30_config_set_measurement_interval_tag 5\n#define meshtastic_SCD30_config_soft_reset_tag   6\n#define meshtastic_SHTXX_config_set_accuracy_tag 1\n#define meshtastic_SensorConfig_scd4x_config_tag 1\n#define meshtastic_SensorConfig_sen5x_config_tag 2\n#define meshtastic_SensorConfig_scd30_config_tag 3\n#define meshtastic_SensorConfig_shtxx_config_tag 4\n#define meshtastic_AdminMessage_get_channel_request_tag 1\n#define meshtastic_AdminMessage_get_channel_response_tag 2\n#define meshtastic_AdminMessage_get_owner_request_tag 3\n#define meshtastic_AdminMessage_get_owner_response_tag 4\n#define meshtastic_AdminMessage_get_config_request_tag 5\n#define meshtastic_AdminMessage_get_config_response_tag 6\n#define meshtastic_AdminMessage_get_module_config_request_tag 7\n#define meshtastic_AdminMessage_get_module_config_response_tag 8\n#define meshtastic_AdminMessage_get_canned_message_module_messages_request_tag 10\n#define meshtastic_AdminMessage_get_canned_message_module_messages_response_tag 11\n#define meshtastic_AdminMessage_get_device_metadata_request_tag 12\n#define meshtastic_AdminMessage_get_device_metadata_response_tag 13\n#define meshtastic_AdminMessage_get_ringtone_request_tag 14\n#define meshtastic_AdminMessage_get_ringtone_response_tag 15\n#define meshtastic_AdminMessage_get_device_connection_status_request_tag 16\n#define meshtastic_AdminMessage_get_device_connection_status_response_tag 17\n#define meshtastic_AdminMessage_set_ham_mode_tag 18\n#define meshtastic_AdminMessage_get_node_remote_hardware_pins_request_tag 19\n#define meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag 20\n#define meshtastic_AdminMessage_enter_dfu_mode_request_tag 21\n#define meshtastic_AdminMessage_delete_file_request_tag 22\n#define meshtastic_AdminMessage_set_scale_tag    23\n#define meshtastic_AdminMessage_backup_preferences_tag 24\n#define meshtastic_AdminMessage_restore_preferences_tag 25\n#define meshtastic_AdminMessage_remove_backup_preferences_tag 26\n#define meshtastic_AdminMessage_send_input_event_tag 27\n#define meshtastic_AdminMessage_set_owner_tag    32\n#define meshtastic_AdminMessage_set_channel_tag  33\n#define meshtastic_AdminMessage_set_config_tag   34\n#define meshtastic_AdminMessage_set_module_config_tag 35\n#define meshtastic_AdminMessage_set_canned_message_module_messages_tag 36\n#define meshtastic_AdminMessage_set_ringtone_message_tag 37\n#define meshtastic_AdminMessage_remove_by_nodenum_tag 38\n#define meshtastic_AdminMessage_set_favorite_node_tag 39\n#define meshtastic_AdminMessage_remove_favorite_node_tag 40\n#define meshtastic_AdminMessage_set_fixed_position_tag 41\n#define meshtastic_AdminMessage_remove_fixed_position_tag 42\n#define meshtastic_AdminMessage_set_time_only_tag 43\n#define meshtastic_AdminMessage_get_ui_config_request_tag 44\n#define meshtastic_AdminMessage_get_ui_config_response_tag 45\n#define meshtastic_AdminMessage_store_ui_config_tag 46\n#define meshtastic_AdminMessage_set_ignored_node_tag 47\n#define meshtastic_AdminMessage_remove_ignored_node_tag 48\n#define meshtastic_AdminMessage_toggle_muted_node_tag 49\n#define meshtastic_AdminMessage_begin_edit_settings_tag 64\n#define meshtastic_AdminMessage_commit_edit_settings_tag 65\n#define meshtastic_AdminMessage_add_contact_tag  66\n#define meshtastic_AdminMessage_key_verification_tag 67\n#define meshtastic_AdminMessage_factory_reset_device_tag 94\n#define meshtastic_AdminMessage_reboot_ota_seconds_tag 95\n#define meshtastic_AdminMessage_exit_simulator_tag 96\n#define meshtastic_AdminMessage_reboot_seconds_tag 97\n#define meshtastic_AdminMessage_shutdown_seconds_tag 98\n#define meshtastic_AdminMessage_factory_reset_config_tag 99\n#define meshtastic_AdminMessage_nodedb_reset_tag 100\n#define meshtastic_AdminMessage_ota_request_tag  102\n#define meshtastic_AdminMessage_sensor_config_tag 103\n#define meshtastic_AdminMessage_session_passkey_tag 101\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_AdminMessage_FIELDLIST(X, a) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,get_channel_request,get_channel_request),   1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_channel_response,get_channel_response),   2) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_owner_request,get_owner_request),   3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_owner_response,get_owner_response),   4) \\\nX(a, STATIC,   ONEOF,    UENUM,    (payload_variant,get_config_request,get_config_request),   5) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_config_response,get_config_response),   6) \\\nX(a, STATIC,   ONEOF,    UENUM,    (payload_variant,get_module_config_request,get_module_config_request),   7) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_module_config_response,get_module_config_response),   8) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_canned_message_module_messages_request,get_canned_message_module_messages_request),  10) \\\nX(a, STATIC,   ONEOF,    STRING,   (payload_variant,get_canned_message_module_messages_response,get_canned_message_module_messages_response),  11) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_device_metadata_request,get_device_metadata_request),  12) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_device_metadata_response,get_device_metadata_response),  13) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_ringtone_request,get_ringtone_request),  14) \\\nX(a, STATIC,   ONEOF,    STRING,   (payload_variant,get_ringtone_response,get_ringtone_response),  15) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_device_connection_status_request,get_device_connection_status_request),  16) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_device_connection_status_response,get_device_connection_status_response),  17) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_ham_mode,set_ham_mode),  18) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_node_remote_hardware_pins_request,get_node_remote_hardware_pins_request),  19) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_node_remote_hardware_pins_response,get_node_remote_hardware_pins_response),  20) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,enter_dfu_mode_request,enter_dfu_mode_request),  21) \\\nX(a, STATIC,   ONEOF,    STRING,   (payload_variant,delete_file_request,delete_file_request),  22) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,set_scale,set_scale),  23) \\\nX(a, STATIC,   ONEOF,    UENUM,    (payload_variant,backup_preferences,backup_preferences),  24) \\\nX(a, STATIC,   ONEOF,    UENUM,    (payload_variant,restore_preferences,restore_preferences),  25) \\\nX(a, STATIC,   ONEOF,    UENUM,    (payload_variant,remove_backup_preferences,remove_backup_preferences),  26) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,send_input_event,send_input_event),  27) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_owner,set_owner),  32) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_channel,set_channel),  33) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_config,set_config),  34) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_module_config,set_module_config),  35) \\\nX(a, STATIC,   ONEOF,    STRING,   (payload_variant,set_canned_message_module_messages,set_canned_message_module_messages),  36) \\\nX(a, STATIC,   ONEOF,    STRING,   (payload_variant,set_ringtone_message,set_ringtone_message),  37) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,remove_by_nodenum,remove_by_nodenum),  38) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,set_favorite_node,set_favorite_node),  39) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,remove_favorite_node,remove_favorite_node),  40) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,set_fixed_position,set_fixed_position),  41) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,remove_fixed_position,remove_fixed_position),  42) \\\nX(a, STATIC,   ONEOF,    FIXED32,  (payload_variant,set_time_only,set_time_only),  43) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,get_ui_config_request,get_ui_config_request),  44) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,get_ui_config_response,get_ui_config_response),  45) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,store_ui_config,store_ui_config),  46) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,set_ignored_node,set_ignored_node),  47) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,remove_ignored_node,remove_ignored_node),  48) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,toggle_muted_node,toggle_muted_node),  49) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,begin_edit_settings,begin_edit_settings),  64) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,commit_edit_settings,commit_edit_settings),  65) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,add_contact,add_contact),  66) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,key_verification,key_verification),  67) \\\nX(a, STATIC,   ONEOF,    INT32,    (payload_variant,factory_reset_device,factory_reset_device),  94) \\\nX(a, STATIC,   ONEOF,    INT32,    (payload_variant,reboot_ota_seconds,reboot_ota_seconds),  95) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,exit_simulator,exit_simulator),  96) \\\nX(a, STATIC,   ONEOF,    INT32,    (payload_variant,reboot_seconds,reboot_seconds),  97) \\\nX(a, STATIC,   ONEOF,    INT32,    (payload_variant,shutdown_seconds,shutdown_seconds),  98) \\\nX(a, STATIC,   ONEOF,    INT32,    (payload_variant,factory_reset_config,factory_reset_config),  99) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,nodedb_reset,nodedb_reset), 100) \\\nX(a, STATIC,   SINGULAR, BYTES,    session_passkey, 101) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,ota_request,ota_request), 102) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,sensor_config,sensor_config), 103)\n#define meshtastic_AdminMessage_CALLBACK NULL\n#define meshtastic_AdminMessage_DEFAULT NULL\n#define meshtastic_AdminMessage_payload_variant_get_channel_response_MSGTYPE meshtastic_Channel\n#define meshtastic_AdminMessage_payload_variant_get_owner_response_MSGTYPE meshtastic_User\n#define meshtastic_AdminMessage_payload_variant_get_config_response_MSGTYPE meshtastic_Config\n#define meshtastic_AdminMessage_payload_variant_get_module_config_response_MSGTYPE meshtastic_ModuleConfig\n#define meshtastic_AdminMessage_payload_variant_get_device_metadata_response_MSGTYPE meshtastic_DeviceMetadata\n#define meshtastic_AdminMessage_payload_variant_get_device_connection_status_response_MSGTYPE meshtastic_DeviceConnectionStatus\n#define meshtastic_AdminMessage_payload_variant_set_ham_mode_MSGTYPE meshtastic_HamParameters\n#define meshtastic_AdminMessage_payload_variant_get_node_remote_hardware_pins_response_MSGTYPE meshtastic_NodeRemoteHardwarePinsResponse\n#define meshtastic_AdminMessage_payload_variant_send_input_event_MSGTYPE meshtastic_AdminMessage_InputEvent\n#define meshtastic_AdminMessage_payload_variant_set_owner_MSGTYPE meshtastic_User\n#define meshtastic_AdminMessage_payload_variant_set_channel_MSGTYPE meshtastic_Channel\n#define meshtastic_AdminMessage_payload_variant_set_config_MSGTYPE meshtastic_Config\n#define meshtastic_AdminMessage_payload_variant_set_module_config_MSGTYPE meshtastic_ModuleConfig\n#define meshtastic_AdminMessage_payload_variant_set_fixed_position_MSGTYPE meshtastic_Position\n#define meshtastic_AdminMessage_payload_variant_get_ui_config_response_MSGTYPE meshtastic_DeviceUIConfig\n#define meshtastic_AdminMessage_payload_variant_store_ui_config_MSGTYPE meshtastic_DeviceUIConfig\n#define meshtastic_AdminMessage_payload_variant_add_contact_MSGTYPE meshtastic_SharedContact\n#define meshtastic_AdminMessage_payload_variant_key_verification_MSGTYPE meshtastic_KeyVerificationAdmin\n#define meshtastic_AdminMessage_payload_variant_ota_request_MSGTYPE meshtastic_AdminMessage_OTAEvent\n#define meshtastic_AdminMessage_payload_variant_sensor_config_MSGTYPE meshtastic_SensorConfig\n\n#define meshtastic_AdminMessage_InputEvent_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   event_code,        1) \\\nX(a, STATIC,   SINGULAR, UINT32,   kb_char,           2) \\\nX(a, STATIC,   SINGULAR, UINT32,   touch_x,           3) \\\nX(a, STATIC,   SINGULAR, UINT32,   touch_y,           4)\n#define meshtastic_AdminMessage_InputEvent_CALLBACK NULL\n#define meshtastic_AdminMessage_InputEvent_DEFAULT NULL\n\n#define meshtastic_AdminMessage_OTAEvent_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    reboot_ota_mode,   1) \\\nX(a, STATIC,   SINGULAR, BYTES,    ota_hash,          2)\n#define meshtastic_AdminMessage_OTAEvent_CALLBACK NULL\n#define meshtastic_AdminMessage_OTAEvent_DEFAULT NULL\n\n#define meshtastic_HamParameters_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   call_sign,         1) \\\nX(a, STATIC,   SINGULAR, INT32,    tx_power,          2) \\\nX(a, STATIC,   SINGULAR, FLOAT,    frequency,         3) \\\nX(a, STATIC,   SINGULAR, STRING,   short_name,        4)\n#define meshtastic_HamParameters_CALLBACK NULL\n#define meshtastic_HamParameters_DEFAULT NULL\n\n#define meshtastic_NodeRemoteHardwarePinsResponse_FIELDLIST(X, a) \\\nX(a, STATIC,   REPEATED, MESSAGE,  node_remote_hardware_pins,   1)\n#define meshtastic_NodeRemoteHardwarePinsResponse_CALLBACK NULL\n#define meshtastic_NodeRemoteHardwarePinsResponse_DEFAULT NULL\n#define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin\n\n#define meshtastic_SharedContact_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   node_num,          1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  user,              2) \\\nX(a, STATIC,   SINGULAR, BOOL,     should_ignore,     3) \\\nX(a, STATIC,   SINGULAR, BOOL,     manually_verified,   4)\n#define meshtastic_SharedContact_CALLBACK NULL\n#define meshtastic_SharedContact_DEFAULT NULL\n#define meshtastic_SharedContact_user_MSGTYPE meshtastic_User\n\n#define meshtastic_KeyVerificationAdmin_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    message_type,      1) \\\nX(a, STATIC,   SINGULAR, UINT32,   remote_nodenum,    2) \\\nX(a, STATIC,   SINGULAR, UINT64,   nonce,             3) \\\nX(a, STATIC,   OPTIONAL, UINT32,   security_number,   4)\n#define meshtastic_KeyVerificationAdmin_CALLBACK NULL\n#define meshtastic_KeyVerificationAdmin_DEFAULT NULL\n\n#define meshtastic_SensorConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  scd4x_config,      1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  sen5x_config,      2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  scd30_config,      3) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  shtxx_config,      4)\n#define meshtastic_SensorConfig_CALLBACK NULL\n#define meshtastic_SensorConfig_DEFAULT NULL\n#define meshtastic_SensorConfig_scd4x_config_MSGTYPE meshtastic_SCD4X_config\n#define meshtastic_SensorConfig_sen5x_config_MSGTYPE meshtastic_SEN5X_config\n#define meshtastic_SensorConfig_scd30_config_MSGTYPE meshtastic_SCD30_config\n#define meshtastic_SensorConfig_shtxx_config_MSGTYPE meshtastic_SHTXX_config\n\n#define meshtastic_SCD4X_config_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, BOOL,     set_asc,           1) \\\nX(a, STATIC,   OPTIONAL, UINT32,   set_target_co2_conc,   2) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    set_temperature,   3) \\\nX(a, STATIC,   OPTIONAL, UINT32,   set_altitude,      4) \\\nX(a, STATIC,   OPTIONAL, UINT32,   set_ambient_pressure,   5) \\\nX(a, STATIC,   OPTIONAL, BOOL,     factory_reset,     6) \\\nX(a, STATIC,   OPTIONAL, BOOL,     set_power_mode,    7)\n#define meshtastic_SCD4X_config_CALLBACK NULL\n#define meshtastic_SCD4X_config_DEFAULT NULL\n\n#define meshtastic_SEN5X_config_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    set_temperature,   1) \\\nX(a, STATIC,   OPTIONAL, BOOL,     set_one_shot_mode,   2)\n#define meshtastic_SEN5X_config_CALLBACK NULL\n#define meshtastic_SEN5X_config_DEFAULT NULL\n\n#define meshtastic_SCD30_config_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, BOOL,     set_asc,           1) \\\nX(a, STATIC,   OPTIONAL, UINT32,   set_target_co2_conc,   2) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    set_temperature,   3) \\\nX(a, STATIC,   OPTIONAL, UINT32,   set_altitude,      4) \\\nX(a, STATIC,   OPTIONAL, UINT32,   set_measurement_interval,   5) \\\nX(a, STATIC,   OPTIONAL, BOOL,     soft_reset,        6)\n#define meshtastic_SCD30_config_CALLBACK NULL\n#define meshtastic_SCD30_config_DEFAULT NULL\n\n#define meshtastic_SHTXX_config_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, UINT32,   set_accuracy,      1)\n#define meshtastic_SHTXX_config_CALLBACK NULL\n#define meshtastic_SHTXX_config_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_AdminMessage_msg;\nextern const pb_msgdesc_t meshtastic_AdminMessage_InputEvent_msg;\nextern const pb_msgdesc_t meshtastic_AdminMessage_OTAEvent_msg;\nextern const pb_msgdesc_t meshtastic_HamParameters_msg;\nextern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePinsResponse_msg;\nextern const pb_msgdesc_t meshtastic_SharedContact_msg;\nextern const pb_msgdesc_t meshtastic_KeyVerificationAdmin_msg;\nextern const pb_msgdesc_t meshtastic_SensorConfig_msg;\nextern const pb_msgdesc_t meshtastic_SCD4X_config_msg;\nextern const pb_msgdesc_t meshtastic_SEN5X_config_msg;\nextern const pb_msgdesc_t meshtastic_SCD30_config_msg;\nextern const pb_msgdesc_t meshtastic_SHTXX_config_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg\n#define meshtastic_AdminMessage_InputEvent_fields &meshtastic_AdminMessage_InputEvent_msg\n#define meshtastic_AdminMessage_OTAEvent_fields &meshtastic_AdminMessage_OTAEvent_msg\n#define meshtastic_HamParameters_fields &meshtastic_HamParameters_msg\n#define meshtastic_NodeRemoteHardwarePinsResponse_fields &meshtastic_NodeRemoteHardwarePinsResponse_msg\n#define meshtastic_SharedContact_fields &meshtastic_SharedContact_msg\n#define meshtastic_KeyVerificationAdmin_fields &meshtastic_KeyVerificationAdmin_msg\n#define meshtastic_SensorConfig_fields &meshtastic_SensorConfig_msg\n#define meshtastic_SCD4X_config_fields &meshtastic_SCD4X_config_msg\n#define meshtastic_SEN5X_config_fields &meshtastic_SEN5X_config_msg\n#define meshtastic_SCD30_config_fields &meshtastic_SCD30_config_msg\n#define meshtastic_SHTXX_config_fields &meshtastic_SHTXX_config_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_ADMIN_PB_H_MAX_SIZE meshtastic_AdminMessage_size\n#define meshtastic_AdminMessage_InputEvent_size  14\n#define meshtastic_AdminMessage_OTAEvent_size    36\n#define meshtastic_AdminMessage_size             511\n#define meshtastic_HamParameters_size            31\n#define meshtastic_KeyVerificationAdmin_size     25\n#define meshtastic_NodeRemoteHardwarePinsResponse_size 496\n#define meshtastic_SCD30_config_size             27\n#define meshtastic_SCD4X_config_size             29\n#define meshtastic_SEN5X_config_size             7\n#define meshtastic_SHTXX_config_size             6\n#define meshtastic_SensorConfig_size             77\n#define meshtastic_SharedContact_size            127\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/apponly.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/apponly.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_ChannelSet, meshtastic_ChannelSet, 2)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/apponly.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_APPONLY_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_APPONLY_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/channel.pb.h\"\n#include \"meshtastic/config.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* This is the most compact possible representation for a set of channels.\n It includes only one PRIMARY channel (which must be first) and\n any SECONDARY channels.\n No DISABLED channels are included.\n This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL */\ntypedef struct _meshtastic_ChannelSet {\n    /* Channel list with settings */\n    pb_size_t settings_count;\n    meshtastic_ChannelSettings settings[8];\n    /* LoRa config */\n    bool has_lora_config;\n    meshtastic_Config_LoRaConfig lora_config;\n} meshtastic_ChannelSet;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_ChannelSet_init_default       {0, {meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default}, false, meshtastic_Config_LoRaConfig_init_default}\n#define meshtastic_ChannelSet_init_zero          {0, {meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero}, false, meshtastic_Config_LoRaConfig_init_zero}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_ChannelSet_settings_tag       1\n#define meshtastic_ChannelSet_lora_config_tag    2\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_ChannelSet_FIELDLIST(X, a) \\\nX(a, STATIC,   REPEATED, MESSAGE,  settings,          1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  lora_config,       2)\n#define meshtastic_ChannelSet_CALLBACK NULL\n#define meshtastic_ChannelSet_DEFAULT NULL\n#define meshtastic_ChannelSet_settings_MSGTYPE meshtastic_ChannelSettings\n#define meshtastic_ChannelSet_lora_config_MSGTYPE meshtastic_Config_LoRaConfig\n\nextern const pb_msgdesc_t meshtastic_ChannelSet_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_ChannelSet_fields &meshtastic_ChannelSet_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_APPONLY_PB_H_MAX_SIZE meshtastic_ChannelSet_size\n#define meshtastic_ChannelSet_size               682\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/atak.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/atak.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_TAKPacket, meshtastic_TAKPacket, 2)\n\n\nPB_BIND(meshtastic_GeoChat, meshtastic_GeoChat, 2)\n\n\nPB_BIND(meshtastic_Group, meshtastic_Group, AUTO)\n\n\nPB_BIND(meshtastic_Status, meshtastic_Status, AUTO)\n\n\nPB_BIND(meshtastic_Contact, meshtastic_Contact, AUTO)\n\n\nPB_BIND(meshtastic_PLI, meshtastic_PLI, AUTO)\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/atak.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_ATAK_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_ATAK_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\ntypedef enum _meshtastic_Team {\n    /* Unspecifed */\n    meshtastic_Team_Unspecifed_Color = 0,\n    /* White */\n    meshtastic_Team_White = 1,\n    /* Yellow */\n    meshtastic_Team_Yellow = 2,\n    /* Orange */\n    meshtastic_Team_Orange = 3,\n    /* Magenta */\n    meshtastic_Team_Magenta = 4,\n    /* Red */\n    meshtastic_Team_Red = 5,\n    /* Maroon */\n    meshtastic_Team_Maroon = 6,\n    /* Purple */\n    meshtastic_Team_Purple = 7,\n    /* Dark Blue */\n    meshtastic_Team_Dark_Blue = 8,\n    /* Blue */\n    meshtastic_Team_Blue = 9,\n    /* Cyan */\n    meshtastic_Team_Cyan = 10,\n    /* Teal */\n    meshtastic_Team_Teal = 11,\n    /* Green */\n    meshtastic_Team_Green = 12,\n    /* Dark Green */\n    meshtastic_Team_Dark_Green = 13,\n    /* Brown */\n    meshtastic_Team_Brown = 14\n} meshtastic_Team;\n\n/* Role of the group member */\ntypedef enum _meshtastic_MemberRole {\n    /* Unspecifed */\n    meshtastic_MemberRole_Unspecifed = 0,\n    /* Team Member */\n    meshtastic_MemberRole_TeamMember = 1,\n    /* Team Lead */\n    meshtastic_MemberRole_TeamLead = 2,\n    /* Headquarters */\n    meshtastic_MemberRole_HQ = 3,\n    /* Airsoft enthusiast */\n    meshtastic_MemberRole_Sniper = 4,\n    /* Medic */\n    meshtastic_MemberRole_Medic = 5,\n    /* ForwardObserver */\n    meshtastic_MemberRole_ForwardObserver = 6,\n    /* Radio Telephone Operator */\n    meshtastic_MemberRole_RTO = 7,\n    /* Doggo */\n    meshtastic_MemberRole_K9 = 8\n} meshtastic_MemberRole;\n\n/* Struct definitions */\n/* ATAK GeoChat message */\ntypedef struct _meshtastic_GeoChat {\n    /* The text message */\n    char message[200];\n    /* Uid recipient of the message */\n    bool has_to;\n    char to[120];\n    /* Callsign of the recipient for the message */\n    bool has_to_callsign;\n    char to_callsign[120];\n} meshtastic_GeoChat;\n\n/* ATAK Group\n <__group role='Team Member' name='Cyan'/> */\ntypedef struct _meshtastic_Group {\n    /* Role of the group member */\n    meshtastic_MemberRole role;\n    /* Team (color)\n Default Cyan */\n    meshtastic_Team team;\n} meshtastic_Group;\n\n/* ATAK EUD Status\n <status battery='100' /> */\ntypedef struct _meshtastic_Status {\n    /* Battery level */\n    uint8_t battery;\n} meshtastic_Status;\n\n/* ATAK Contact\n <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/> */\ntypedef struct _meshtastic_Contact {\n    /* Callsign */\n    char callsign[120];\n    /* Device callsign */\n    char device_callsign[120]; /* IP address of endpoint in integer form (0.0.0.0 default) */\n} meshtastic_Contact;\n\n/* Position Location Information from ATAK */\ntypedef struct _meshtastic_PLI {\n    /* The new preferred location encoding, multiply by 1e-7 to get degrees\n in floating point */\n    int32_t latitude_i;\n    /* The new preferred location encoding, multiply by 1e-7 to get degrees\n in floating point */\n    int32_t longitude_i;\n    /* Altitude (ATAK prefers HAE) */\n    int32_t altitude;\n    /* Speed */\n    uint32_t speed;\n    /* Course in degrees */\n    uint16_t course;\n} meshtastic_PLI;\n\ntypedef PB_BYTES_ARRAY_T(220) meshtastic_TAKPacket_detail_t;\n/* Packets for the official ATAK Plugin */\ntypedef struct _meshtastic_TAKPacket {\n    /* Are the payloads strings compressed for LoRA transport? */\n    bool is_compressed;\n    /* The contact / callsign for ATAK user */\n    bool has_contact;\n    meshtastic_Contact contact;\n    /* The group for ATAK user */\n    bool has_group;\n    meshtastic_Group group;\n    /* The status of the ATAK EUD */\n    bool has_status;\n    meshtastic_Status status;\n    pb_size_t which_payload_variant;\n    union {\n        /* TAK position report */\n        meshtastic_PLI pli;\n        /* ATAK GeoChat message */\n        meshtastic_GeoChat chat;\n        /* Generic CoT detail XML\n     May be compressed / truncated by the sender (EUD) */\n        meshtastic_TAKPacket_detail_t detail;\n    } payload_variant;\n} meshtastic_TAKPacket;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_Team_MIN meshtastic_Team_Unspecifed_Color\n#define _meshtastic_Team_MAX meshtastic_Team_Brown\n#define _meshtastic_Team_ARRAYSIZE ((meshtastic_Team)(meshtastic_Team_Brown+1))\n\n#define _meshtastic_MemberRole_MIN meshtastic_MemberRole_Unspecifed\n#define _meshtastic_MemberRole_MAX meshtastic_MemberRole_K9\n#define _meshtastic_MemberRole_ARRAYSIZE ((meshtastic_MemberRole)(meshtastic_MemberRole_K9+1))\n\n\n\n#define meshtastic_Group_role_ENUMTYPE meshtastic_MemberRole\n#define meshtastic_Group_team_ENUMTYPE meshtastic_Team\n\n\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_TAKPacket_init_default        {0, false, meshtastic_Contact_init_default, false, meshtastic_Group_init_default, false, meshtastic_Status_init_default, 0, {meshtastic_PLI_init_default}}\n#define meshtastic_GeoChat_init_default          {\"\", false, \"\", false, \"\"}\n#define meshtastic_Group_init_default            {_meshtastic_MemberRole_MIN, _meshtastic_Team_MIN}\n#define meshtastic_Status_init_default           {0}\n#define meshtastic_Contact_init_default          {\"\", \"\"}\n#define meshtastic_PLI_init_default              {0, 0, 0, 0, 0}\n#define meshtastic_TAKPacket_init_zero           {0, false, meshtastic_Contact_init_zero, false, meshtastic_Group_init_zero, false, meshtastic_Status_init_zero, 0, {meshtastic_PLI_init_zero}}\n#define meshtastic_GeoChat_init_zero             {\"\", false, \"\", false, \"\"}\n#define meshtastic_Group_init_zero               {_meshtastic_MemberRole_MIN, _meshtastic_Team_MIN}\n#define meshtastic_Status_init_zero              {0}\n#define meshtastic_Contact_init_zero             {\"\", \"\"}\n#define meshtastic_PLI_init_zero                 {0, 0, 0, 0, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_GeoChat_message_tag           1\n#define meshtastic_GeoChat_to_tag                2\n#define meshtastic_GeoChat_to_callsign_tag       3\n#define meshtastic_Group_role_tag                1\n#define meshtastic_Group_team_tag                2\n#define meshtastic_Status_battery_tag            1\n#define meshtastic_Contact_callsign_tag          1\n#define meshtastic_Contact_device_callsign_tag   2\n#define meshtastic_PLI_latitude_i_tag            1\n#define meshtastic_PLI_longitude_i_tag           2\n#define meshtastic_PLI_altitude_tag              3\n#define meshtastic_PLI_speed_tag                 4\n#define meshtastic_PLI_course_tag                5\n#define meshtastic_TAKPacket_is_compressed_tag   1\n#define meshtastic_TAKPacket_contact_tag         2\n#define meshtastic_TAKPacket_group_tag           3\n#define meshtastic_TAKPacket_status_tag          4\n#define meshtastic_TAKPacket_pli_tag             5\n#define meshtastic_TAKPacket_chat_tag            6\n#define meshtastic_TAKPacket_detail_tag          7\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_TAKPacket_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_compressed,     1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  contact,           2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  group,             3) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  status,            4) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,pli,payload_variant.pli),   5) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,chat,payload_variant.chat),   6) \\\nX(a, STATIC,   ONEOF,    BYTES,    (payload_variant,detail,payload_variant.detail),   7)\n#define meshtastic_TAKPacket_CALLBACK NULL\n#define meshtastic_TAKPacket_DEFAULT NULL\n#define meshtastic_TAKPacket_contact_MSGTYPE meshtastic_Contact\n#define meshtastic_TAKPacket_group_MSGTYPE meshtastic_Group\n#define meshtastic_TAKPacket_status_MSGTYPE meshtastic_Status\n#define meshtastic_TAKPacket_payload_variant_pli_MSGTYPE meshtastic_PLI\n#define meshtastic_TAKPacket_payload_variant_chat_MSGTYPE meshtastic_GeoChat\n\n#define meshtastic_GeoChat_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   message,           1) \\\nX(a, STATIC,   OPTIONAL, STRING,   to,                2) \\\nX(a, STATIC,   OPTIONAL, STRING,   to_callsign,       3)\n#define meshtastic_GeoChat_CALLBACK NULL\n#define meshtastic_GeoChat_DEFAULT NULL\n\n#define meshtastic_Group_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              1) \\\nX(a, STATIC,   SINGULAR, UENUM,    team,              2)\n#define meshtastic_Group_CALLBACK NULL\n#define meshtastic_Group_DEFAULT NULL\n\n#define meshtastic_Status_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   battery,           1)\n#define meshtastic_Status_CALLBACK NULL\n#define meshtastic_Status_DEFAULT NULL\n\n#define meshtastic_Contact_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   callsign,          1) \\\nX(a, STATIC,   SINGULAR, STRING,   device_callsign,   2)\n#define meshtastic_Contact_CALLBACK NULL\n#define meshtastic_Contact_DEFAULT NULL\n\n#define meshtastic_PLI_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, SFIXED32, latitude_i,        1) \\\nX(a, STATIC,   SINGULAR, SFIXED32, longitude_i,       2) \\\nX(a, STATIC,   SINGULAR, INT32,    altitude,          3) \\\nX(a, STATIC,   SINGULAR, UINT32,   speed,             4) \\\nX(a, STATIC,   SINGULAR, UINT32,   course,            5)\n#define meshtastic_PLI_CALLBACK NULL\n#define meshtastic_PLI_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_TAKPacket_msg;\nextern const pb_msgdesc_t meshtastic_GeoChat_msg;\nextern const pb_msgdesc_t meshtastic_Group_msg;\nextern const pb_msgdesc_t meshtastic_Status_msg;\nextern const pb_msgdesc_t meshtastic_Contact_msg;\nextern const pb_msgdesc_t meshtastic_PLI_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_TAKPacket_fields &meshtastic_TAKPacket_msg\n#define meshtastic_GeoChat_fields &meshtastic_GeoChat_msg\n#define meshtastic_Group_fields &meshtastic_Group_msg\n#define meshtastic_Status_fields &meshtastic_Status_msg\n#define meshtastic_Contact_fields &meshtastic_Contact_msg\n#define meshtastic_PLI_fields &meshtastic_PLI_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_ATAK_PB_H_MAX_SIZE meshtastic_TAKPacket_size\n#define meshtastic_Contact_size                  242\n#define meshtastic_GeoChat_size                  444\n#define meshtastic_Group_size                    4\n#define meshtastic_PLI_size                      31\n#define meshtastic_Status_size                   3\n#define meshtastic_TAKPacket_size                705\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/cannedmessages.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/cannedmessages.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_CannedMessageModuleConfig, meshtastic_CannedMessageModuleConfig, AUTO)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/cannedmessages.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* Canned message module configuration. */\ntypedef struct _meshtastic_CannedMessageModuleConfig {\n    /* Predefined messages for canned message module separated by '|' characters. */\n    char messages[201];\n} meshtastic_CannedMessageModuleConfig;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_CannedMessageModuleConfig_init_default {\"\"}\n#define meshtastic_CannedMessageModuleConfig_init_zero {\"\"}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_CannedMessageModuleConfig_messages_tag 1\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_CannedMessageModuleConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   messages,          1)\n#define meshtastic_CannedMessageModuleConfig_CALLBACK NULL\n#define meshtastic_CannedMessageModuleConfig_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_CannedMessageModuleConfig_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_CannedMessageModuleConfig_fields &meshtastic_CannedMessageModuleConfig_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_MAX_SIZE meshtastic_CannedMessageModuleConfig_size\n#define meshtastic_CannedMessageModuleConfig_size 203\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/channel.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/channel.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_ChannelSettings, meshtastic_ChannelSettings, AUTO)\n\n\nPB_BIND(meshtastic_ModuleSettings, meshtastic_ModuleSettings, AUTO)\n\n\nPB_BIND(meshtastic_Channel, meshtastic_Channel, AUTO)\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/channel.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* How this channel is being used (or not).\n Note: this field is an enum to give us options for the future.\n In particular, someday we might make a 'SCANNING' option.\n SCANNING channels could have different frequencies and the radio would\n occasionally check that freq to see if anything is being transmitted.\n For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow\n cross band routing as needed.\n If a device has only a single radio (the common case) only one channel can be PRIMARY at a time\n (but any number of SECONDARY channels can't be sent received on that common frequency) */\ntypedef enum _meshtastic_Channel_Role {\n    /* This channel is not in use right now */\n    meshtastic_Channel_Role_DISABLED = 0,\n    /* This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY */\n    meshtastic_Channel_Role_PRIMARY = 1,\n    /* Secondary channels are only used for encryption/decryption/authentication purposes.\n Their radio settings (freq etc) are ignored, only psk is used. */\n    meshtastic_Channel_Role_SECONDARY = 2\n} meshtastic_Channel_Role;\n\n/* Struct definitions */\n/* This message is specifically for modules to store per-channel configuration data. */\ntypedef struct _meshtastic_ModuleSettings {\n    /* Bits of precision for the location sent in position packets. */\n    uint32_t position_precision;\n    /* Controls whether or not the client / device should mute the current channel\n Useful for noisy public channels you don't necessarily want to disable */\n    bool is_muted;\n} meshtastic_ModuleSettings;\n\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_ChannelSettings_psk_t;\n/* This information can be encoded as a QRcode/url so that other users can configure\n their radio to join the same channel.\n A note about how channel names are shown to users: channelname-X\n poundsymbol is a prefix used to indicate this is a channel name (idea from @professr).\n Where X is a letter from A-Z (base 26) representing a hash of the PSK for this\n channel - so that if the user changes anything about the channel (which does\n force a new PSK) this letter will also change. Thus preventing user confusion if\n two friends try to type in a channel name of \"BobsChan\" and then can't talk\n because their PSKs will be different.\n The PSK is hashed into this letter by \"0x41 + [xor all bytes of the psk ] modulo 26\"\n This also allows the option of someday if people have the PSK off (zero), the\n users COULD type in a channel name and be able to talk.\n FIXME: Add description of multi-channel support and how primary vs secondary channels are used.\n FIXME: explain how apps use channels for security.\n explain how remote settings and remote gpio are managed as an example */\ntypedef struct _meshtastic_ChannelSettings {\n    /* Deprecated in favor of LoraConfig.channel_num */\n    uint32_t channel_num;\n    /* A simple pre-shared key for now for crypto.\n Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256).\n A special shorthand is used for 1 byte long psks.\n These psks should be treated as only minimally secure,\n because they are listed in this source code.\n Those bytes are mapped using the following scheme:\n `0` = No crypto\n `1` = The special \"default\" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01}\n `2` through 10 = The default channel key, except with 1 through 9 added to the last byte.\n Shown to user as simple1 through 10 */\n    meshtastic_ChannelSettings_psk_t psk;\n    /* A SHORT name that will be packed into the URL.\n Less than 12 bytes.\n Something for end users to call the channel\n If this is the empty string it is assumed that this channel\n is the special (minimally secure) \"Default\"channel.\n In user interfaces it should be rendered as a local language translation of \"X\".\n For channel_num hashing empty string will be treated as \"X\".\n Where \"X\" is selected based on the English words listed above for ModemPreset */\n    char name[12];\n    /* Used to construct a globally unique channel ID.\n The full globally unique ID will be: \"name.id\" where ID is shown as base36.\n Assuming that the number of meshtastic users is below 20K (true for a long time)\n the chance of this 64 bit random number colliding with anyone else is super low.\n And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to\n try multiple candidate channels.\n Any time a non wire compatible change is made to a channel, this field should be regenerated.\n There are a small number of 'special' globally known (and fairly) insecure standard channels.\n Those channels do not have a numeric id included in the settings, but instead it is pulled from\n a table of well known IDs.\n (see Well Known Channels FIXME) */\n    uint32_t id;\n    /* If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe */\n    bool uplink_enabled;\n    /* If true, messages seen on the internet will be forwarded to the local mesh. */\n    bool downlink_enabled;\n    /* Per-channel module settings. */\n    bool has_module_settings;\n    meshtastic_ModuleSettings module_settings;\n} meshtastic_ChannelSettings;\n\n/* A pair of a channel number, mode and the (sharable) settings for that channel */\ntypedef struct _meshtastic_Channel {\n    /* The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1)\n (Someday - not currently implemented) An index of -1 could be used to mean \"set by name\",\n in which case the target node will find and set the channel by settings.name. */\n    int8_t index;\n    /* The new settings, or NULL to disable that channel */\n    bool has_settings;\n    meshtastic_ChannelSettings settings;\n    /* TODO: REPLACE */\n    meshtastic_Channel_Role role;\n} meshtastic_Channel;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_Channel_Role_MIN meshtastic_Channel_Role_DISABLED\n#define _meshtastic_Channel_Role_MAX meshtastic_Channel_Role_SECONDARY\n#define _meshtastic_Channel_Role_ARRAYSIZE ((meshtastic_Channel_Role)(meshtastic_Channel_Role_SECONDARY+1))\n\n\n\n#define meshtastic_Channel_role_ENUMTYPE meshtastic_Channel_Role\n\n\n/* Initializer values for message structs */\n#define meshtastic_ChannelSettings_init_default  {0, {0, {0}}, \"\", 0, 0, 0, false, meshtastic_ModuleSettings_init_default}\n#define meshtastic_ModuleSettings_init_default   {0, 0}\n#define meshtastic_Channel_init_default          {0, false, meshtastic_ChannelSettings_init_default, _meshtastic_Channel_Role_MIN}\n#define meshtastic_ChannelSettings_init_zero     {0, {0, {0}}, \"\", 0, 0, 0, false, meshtastic_ModuleSettings_init_zero}\n#define meshtastic_ModuleSettings_init_zero      {0, 0}\n#define meshtastic_Channel_init_zero             {0, false, meshtastic_ChannelSettings_init_zero, _meshtastic_Channel_Role_MIN}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_ModuleSettings_position_precision_tag 1\n#define meshtastic_ModuleSettings_is_muted_tag   2\n#define meshtastic_ChannelSettings_channel_num_tag 1\n#define meshtastic_ChannelSettings_psk_tag       2\n#define meshtastic_ChannelSettings_name_tag      3\n#define meshtastic_ChannelSettings_id_tag        4\n#define meshtastic_ChannelSettings_uplink_enabled_tag 5\n#define meshtastic_ChannelSettings_downlink_enabled_tag 6\n#define meshtastic_ChannelSettings_module_settings_tag 7\n#define meshtastic_Channel_index_tag             1\n#define meshtastic_Channel_settings_tag          2\n#define meshtastic_Channel_role_tag              3\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_ChannelSettings_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   channel_num,       1) \\\nX(a, STATIC,   SINGULAR, BYTES,    psk,               2) \\\nX(a, STATIC,   SINGULAR, STRING,   name,              3) \\\nX(a, STATIC,   SINGULAR, FIXED32,  id,                4) \\\nX(a, STATIC,   SINGULAR, BOOL,     uplink_enabled,    5) \\\nX(a, STATIC,   SINGULAR, BOOL,     downlink_enabled,   6) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  module_settings,   7)\n#define meshtastic_ChannelSettings_CALLBACK NULL\n#define meshtastic_ChannelSettings_DEFAULT NULL\n#define meshtastic_ChannelSettings_module_settings_MSGTYPE meshtastic_ModuleSettings\n\n#define meshtastic_ModuleSettings_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_precision,   1) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_muted,          2)\n#define meshtastic_ModuleSettings_CALLBACK NULL\n#define meshtastic_ModuleSettings_DEFAULT NULL\n\n#define meshtastic_Channel_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, INT32,    index,             1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  settings,          2) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              3)\n#define meshtastic_Channel_CALLBACK NULL\n#define meshtastic_Channel_DEFAULT NULL\n#define meshtastic_Channel_settings_MSGTYPE meshtastic_ChannelSettings\n\nextern const pb_msgdesc_t meshtastic_ChannelSettings_msg;\nextern const pb_msgdesc_t meshtastic_ModuleSettings_msg;\nextern const pb_msgdesc_t meshtastic_Channel_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_ChannelSettings_fields &meshtastic_ChannelSettings_msg\n#define meshtastic_ModuleSettings_fields &meshtastic_ModuleSettings_msg\n#define meshtastic_Channel_fields &meshtastic_Channel_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_MAX_SIZE meshtastic_Channel_size\n#define meshtastic_ChannelSettings_size          72\n#define meshtastic_Channel_size                  87\n#define meshtastic_ModuleSettings_size           8\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/clientonly.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/clientonly.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_DeviceProfile, meshtastic_DeviceProfile, 2)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/clientonly.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_CLIENTONLY_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_CLIENTONLY_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/localonly.pb.h\"\n#include \"meshtastic/mesh.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* This abstraction is used to contain any configuration for provisioning a node on any client.\n It is useful for importing and exporting configurations. */\ntypedef struct _meshtastic_DeviceProfile {\n    /* Long name for the node */\n    bool has_long_name;\n    char long_name[40];\n    /* Short name of the node */\n    bool has_short_name;\n    char short_name[5];\n    /* The url of the channels from our node */\n    pb_callback_t channel_url;\n    /* The Config of the node */\n    bool has_config;\n    meshtastic_LocalConfig config;\n    /* The ModuleConfig of the node */\n    bool has_module_config;\n    meshtastic_LocalModuleConfig module_config;\n    /* Fixed position data */\n    bool has_fixed_position;\n    meshtastic_Position fixed_position;\n    /* Ringtone for ExternalNotification */\n    bool has_ringtone;\n    char ringtone[231];\n    /* Predefined messages for CannedMessage */\n    bool has_canned_messages;\n    char canned_messages[201];\n} meshtastic_DeviceProfile;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_DeviceProfile_init_default    {false, \"\", false, \"\", {{NULL}, NULL}, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default, false, meshtastic_Position_init_default, false, \"\", false, \"\"}\n#define meshtastic_DeviceProfile_init_zero       {false, \"\", false, \"\", {{NULL}, NULL}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero, false, meshtastic_Position_init_zero, false, \"\", false, \"\"}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_DeviceProfile_long_name_tag   1\n#define meshtastic_DeviceProfile_short_name_tag  2\n#define meshtastic_DeviceProfile_channel_url_tag 3\n#define meshtastic_DeviceProfile_config_tag      4\n#define meshtastic_DeviceProfile_module_config_tag 5\n#define meshtastic_DeviceProfile_fixed_position_tag 6\n#define meshtastic_DeviceProfile_ringtone_tag    7\n#define meshtastic_DeviceProfile_canned_messages_tag 8\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_DeviceProfile_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, STRING,   long_name,         1) \\\nX(a, STATIC,   OPTIONAL, STRING,   short_name,        2) \\\nX(a, CALLBACK, OPTIONAL, STRING,   channel_url,       3) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  config,            4) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  module_config,     5) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  fixed_position,    6) \\\nX(a, STATIC,   OPTIONAL, STRING,   ringtone,          7) \\\nX(a, STATIC,   OPTIONAL, STRING,   canned_messages,   8)\n#define meshtastic_DeviceProfile_CALLBACK pb_default_field_callback\n#define meshtastic_DeviceProfile_DEFAULT NULL\n#define meshtastic_DeviceProfile_config_MSGTYPE meshtastic_LocalConfig\n#define meshtastic_DeviceProfile_module_config_MSGTYPE meshtastic_LocalModuleConfig\n#define meshtastic_DeviceProfile_fixed_position_MSGTYPE meshtastic_Position\n\nextern const pb_msgdesc_t meshtastic_DeviceProfile_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_DeviceProfile_fields &meshtastic_DeviceProfile_msg\n\n/* Maximum encoded size of messages (where known) */\n/* meshtastic_DeviceProfile_size depends on runtime parameters */\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/config.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/config.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_Config, meshtastic_Config, AUTO)\n\n\nPB_BIND(meshtastic_Config_DeviceConfig, meshtastic_Config_DeviceConfig, AUTO)\n\n\nPB_BIND(meshtastic_Config_PositionConfig, meshtastic_Config_PositionConfig, AUTO)\n\n\nPB_BIND(meshtastic_Config_PowerConfig, meshtastic_Config_PowerConfig, AUTO)\n\n\nPB_BIND(meshtastic_Config_NetworkConfig, meshtastic_Config_NetworkConfig, AUTO)\n\n\nPB_BIND(meshtastic_Config_NetworkConfig_IpV4Config, meshtastic_Config_NetworkConfig_IpV4Config, AUTO)\n\n\nPB_BIND(meshtastic_Config_DisplayConfig, meshtastic_Config_DisplayConfig, AUTO)\n\n\nPB_BIND(meshtastic_Config_LoRaConfig, meshtastic_Config_LoRaConfig, 2)\n\n\nPB_BIND(meshtastic_Config_BluetoothConfig, meshtastic_Config_BluetoothConfig, AUTO)\n\n\nPB_BIND(meshtastic_Config_SecurityConfig, meshtastic_Config_SecurityConfig, AUTO)\n\n\nPB_BIND(meshtastic_Config_SessionkeyConfig, meshtastic_Config_SessionkeyConfig, AUTO)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/config.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_CONFIG_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_CONFIG_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/device_ui.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* Defines the device's role on the Mesh network */\ntypedef enum _meshtastic_Config_DeviceConfig_Role {\n    /* Description: App connected or stand alone messaging device.\n Technical Details: Default Role */\n    meshtastic_Config_DeviceConfig_Role_CLIENT = 0,\n    /* Description: Device that does not forward packets from other devices. */\n    meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE = 1,\n    /* Description: Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list.\n Technical Details: Mesh packets will prefer to be routed over this node. This node will not be used by client apps.\n   The wifi radio and the oled screen will be put to sleep.\n   This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh. */\n    meshtastic_Config_DeviceConfig_Role_ROUTER = 2,\n    meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT = 3,\n    /* Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list.\n Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry\n   or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate.\n Deprecated in v2.7.11 because it creates \"holes\" in the mesh rebroadcast chain. */\n    meshtastic_Config_DeviceConfig_Role_REPEATER = 4,\n    /* Description: Broadcasts GPS position packets as priority.\n Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default.\n   When used in conjunction with power.is_power_saving = true, nodes will wake up,\n   send position, and then sleep for position.position_broadcast_secs seconds. */\n    meshtastic_Config_DeviceConfig_Role_TRACKER = 5,\n    /* Description: Broadcasts telemetry packets as priority.\n Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default.\n   When used in conjunction with power.is_power_saving = true, nodes will wake up,\n   send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. */\n    meshtastic_Config_DeviceConfig_Role_SENSOR = 6,\n    /* Description: Optimized for ATAK system communication and reduces routine broadcasts.\n Technical Details: Used for nodes dedicated for connection to an ATAK EUD.\n    Turns off many of the routine broadcasts to favor CoT packet stream\n    from the Meshtastic ATAK plugin -> IMeshService -> Node */\n    meshtastic_Config_DeviceConfig_Role_TAK = 7,\n    /* Description: Device that only broadcasts as needed for stealth or power savings.\n Technical Details: Used for nodes that \"only speak when spoken to\"\n    Turns all of the routine broadcasts but allows for ad-hoc communication\n    Still rebroadcasts, but with local only rebroadcast mode (known meshes only)\n    Can be used for clandestine operation or to dramatically reduce airtime / power consumption */\n    meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN = 8,\n    /* Description: Broadcasts location as message to default channel regularly for to assist with device recovery.\n Technical Details: Used to automatically send a text message to the mesh\n    with the current position of the device on a frequent interval:\n    \"I'm lost! Position: lat / long\" */\n    meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND = 9,\n    /* Description: Enables automatic TAK PLI broadcasts and reduces routine broadcasts.\n Technical Details: Turns off many of the routine broadcasts to favor ATAK CoT packet stream\n    and automatic TAK PLI (position location information) broadcasts.\n    Uses position module configuration to determine TAK PLI broadcast interval. */\n    meshtastic_Config_DeviceConfig_Role_TAK_TRACKER = 10,\n    /* Description: Will always rebroadcast packets, but will do so after all other modes.\n Technical Details: Used for router nodes that are intended to provide additional coverage\n    in areas not already covered by other routers, or to bridge around problematic terrain,\n    but should not be given priority over other routers in order to avoid unnecessaraily\n    consuming hops. */\n    meshtastic_Config_DeviceConfig_Role_ROUTER_LATE = 11,\n    /* Description: Treats packets from or to favorited nodes as ROUTER_LATE, and all other packets as CLIENT.\n Technical Details: Used for stronger attic/roof nodes to distribute messages more widely\n    from weaker, indoor, or less-well-positioned nodes. Recommended for users with multiple nodes\n    where one CLIENT_BASE acts as a more powerful base station, such as an attic/roof node. */\n    meshtastic_Config_DeviceConfig_Role_CLIENT_BASE = 12\n} meshtastic_Config_DeviceConfig_Role;\n\n/* Defines the device's behavior for how messages are rebroadcast */\ntypedef enum _meshtastic_Config_DeviceConfig_RebroadcastMode {\n    /* Default behavior.\n Rebroadcast any observed message, if it was on our private channel or from another mesh with the same lora params. */\n    meshtastic_Config_DeviceConfig_RebroadcastMode_ALL = 0,\n    /* Same as behavior as ALL but skips packet decoding and simply rebroadcasts them.\n Only available in Repeater role. Setting this on any other roles will result in ALL behavior. */\n    meshtastic_Config_DeviceConfig_RebroadcastMode_ALL_SKIP_DECODING = 1,\n    /* Ignores observed messages from foreign meshes that are open or those which it cannot decrypt.\n Only rebroadcasts message on the nodes local primary / secondary channels. */\n    meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY = 2,\n    /* Ignores observed messages from foreign meshes like LOCAL_ONLY,\n but takes it step further by also ignoring messages from nodenums not in the node's known list (NodeDB) */\n    meshtastic_Config_DeviceConfig_RebroadcastMode_KNOWN_ONLY = 3,\n    /* Only permitted for SENSOR, TRACKER and TAK_TRACKER roles, this will inhibit all rebroadcasts, not unlike CLIENT_MUTE role. */\n    meshtastic_Config_DeviceConfig_RebroadcastMode_NONE = 4,\n    /* Ignores packets from non-standard portnums such as: TAK, RangeTest, PaxCounter, etc.\n Only rebroadcasts packets with standard portnums: NodeInfo, Text, Position, Telemetry, and Routing. */\n    meshtastic_Config_DeviceConfig_RebroadcastMode_CORE_PORTNUMS_ONLY = 5\n} meshtastic_Config_DeviceConfig_RebroadcastMode;\n\n/* Defines buzzer behavior for audio feedback */\ntypedef enum _meshtastic_Config_DeviceConfig_BuzzerMode {\n    /* Default behavior.\n Buzzer is enabled for all audio feedback including button presses and alerts. */\n    meshtastic_Config_DeviceConfig_BuzzerMode_ALL_ENABLED = 0,\n    /* Disabled.\n All buzzer audio feedback is disabled. */\n    meshtastic_Config_DeviceConfig_BuzzerMode_DISABLED = 1,\n    /* Notifications Only.\n Buzzer is enabled only for notifications and alerts, but not for button presses.\n External notification config determines the specifics of the notification behavior. */\n    meshtastic_Config_DeviceConfig_BuzzerMode_NOTIFICATIONS_ONLY = 2,\n    /* Non-notification system buzzer tones only.\n Buzzer is enabled only for non-notification tones such as button presses, startup, shutdown, but not for alerts. */\n    meshtastic_Config_DeviceConfig_BuzzerMode_SYSTEM_ONLY = 3,\n    /* Direct Message notifications only.\n Buzzer is enabled only for direct messages and alerts, but not for button presses.\n External notification config determines the specifics of the notification behavior. */\n    meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY = 4\n} meshtastic_Config_DeviceConfig_BuzzerMode;\n\n/* Bit field of boolean configuration options, indicating which optional\n fields to include when assembling POSITION messages.\n Longitude, latitude, altitude, speed, heading, and DOP\n are always included (also time if GPS-synced)\n NOTE: the more fields are included, the larger the message will be -\n   leading to longer airtime and a higher risk of packet loss */\ntypedef enum _meshtastic_Config_PositionConfig_PositionFlags {\n    /* Required for compilation */\n    meshtastic_Config_PositionConfig_PositionFlags_UNSET = 0,\n    /* Include an altitude value (if available) */\n    meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE = 1,\n    /* Altitude value is MSL */\n    meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE_MSL = 2,\n    /* Include geoidal separation */\n    meshtastic_Config_PositionConfig_PositionFlags_GEOIDAL_SEPARATION = 4,\n    /* Include the DOP value ; PDOP used by default, see below */\n    meshtastic_Config_PositionConfig_PositionFlags_DOP = 8,\n    /* If POS_DOP set, send separate HDOP / VDOP values instead of PDOP */\n    meshtastic_Config_PositionConfig_PositionFlags_HVDOP = 16,\n    /* Include number of \"satellites in view\" */\n    meshtastic_Config_PositionConfig_PositionFlags_SATINVIEW = 32,\n    /* Include a sequence number incremented per packet */\n    meshtastic_Config_PositionConfig_PositionFlags_SEQ_NO = 64,\n    /* Include positional timestamp (from GPS solution) */\n    meshtastic_Config_PositionConfig_PositionFlags_TIMESTAMP = 128,\n    /* Include positional heading\n Intended for use with vehicle not walking speeds\n walking speeds are likely to be error prone like the compass */\n    meshtastic_Config_PositionConfig_PositionFlags_HEADING = 256,\n    /* Include positional speed\n Intended for use with vehicle not walking speeds\n walking speeds are likely to be error prone like the compass */\n    meshtastic_Config_PositionConfig_PositionFlags_SPEED = 512\n} meshtastic_Config_PositionConfig_PositionFlags;\n\ntypedef enum _meshtastic_Config_PositionConfig_GpsMode {\n    /* GPS is present but disabled */\n    meshtastic_Config_PositionConfig_GpsMode_DISABLED = 0,\n    /* GPS is present and enabled */\n    meshtastic_Config_PositionConfig_GpsMode_ENABLED = 1,\n    /* GPS is not present on the device */\n    meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT = 2\n} meshtastic_Config_PositionConfig_GpsMode;\n\ntypedef enum _meshtastic_Config_NetworkConfig_AddressMode {\n    /* obtain ip address via DHCP */\n    meshtastic_Config_NetworkConfig_AddressMode_DHCP = 0,\n    /* use static ip address */\n    meshtastic_Config_NetworkConfig_AddressMode_STATIC = 1\n} meshtastic_Config_NetworkConfig_AddressMode;\n\n/* Available flags auxiliary network protocols */\ntypedef enum _meshtastic_Config_NetworkConfig_ProtocolFlags {\n    /* Do not broadcast packets over any network protocol */\n    meshtastic_Config_NetworkConfig_ProtocolFlags_NO_BROADCAST = 0,\n    /* Enable broadcasting packets via UDP over the local network */\n    meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST = 1\n} meshtastic_Config_NetworkConfig_ProtocolFlags;\n\n/* Deprecated in 2.7.4: Unused */\ntypedef enum _meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat {\n    meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_UNUSED = 0\n} meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat;\n\n/* Unit display preference */\ntypedef enum _meshtastic_Config_DisplayConfig_DisplayUnits {\n    /* Metric (Default) */\n    meshtastic_Config_DisplayConfig_DisplayUnits_METRIC = 0,\n    /* Imperial */\n    meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL = 1\n} meshtastic_Config_DisplayConfig_DisplayUnits;\n\n/* Override OLED outo detect with this if it fails. */\ntypedef enum _meshtastic_Config_DisplayConfig_OledType {\n    /* Default / Autodetect */\n    meshtastic_Config_DisplayConfig_OledType_OLED_AUTO = 0,\n    /* Default / Autodetect */\n    meshtastic_Config_DisplayConfig_OledType_OLED_SSD1306 = 1,\n    /* Default / Autodetect */\n    meshtastic_Config_DisplayConfig_OledType_OLED_SH1106 = 2,\n    /* Can not be auto detected but set by proto. Used for 128x64 screens */\n    meshtastic_Config_DisplayConfig_OledType_OLED_SH1107 = 3,\n    /* Can not be auto detected but set by proto. Used for 128x128 screens */\n    meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_128 = 4\n} meshtastic_Config_DisplayConfig_OledType;\n\ntypedef enum _meshtastic_Config_DisplayConfig_DisplayMode {\n    /* Default. The old style for the 128x64 OLED screen */\n    meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT = 0,\n    /* Rearrange display elements to cater for bicolor OLED displays */\n    meshtastic_Config_DisplayConfig_DisplayMode_TWOCOLOR = 1,\n    /* Same as TwoColor, but with inverted top bar. Not so good for Epaper displays */\n    meshtastic_Config_DisplayConfig_DisplayMode_INVERTED = 2,\n    /* TFT Full Color Displays (not implemented yet) */\n    meshtastic_Config_DisplayConfig_DisplayMode_COLOR = 3\n} meshtastic_Config_DisplayConfig_DisplayMode;\n\ntypedef enum _meshtastic_Config_DisplayConfig_CompassOrientation {\n    /* The compass and the display are in the same orientation. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0 = 0,\n    /* Rotate the compass by 90 degrees. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90 = 1,\n    /* Rotate the compass by 180 degrees. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180 = 2,\n    /* Rotate the compass by 270 degrees. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270 = 3,\n    /* Don't rotate the compass, but invert the result. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0_INVERTED = 4,\n    /* Rotate the compass by 90 degrees and invert. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90_INVERTED = 5,\n    /* Rotate the compass by 180 degrees and invert. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180_INVERTED = 6,\n    /* Rotate the compass by 270 degrees and invert. */\n    meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED = 7\n} meshtastic_Config_DisplayConfig_CompassOrientation;\n\ntypedef enum _meshtastic_Config_LoRaConfig_RegionCode {\n    /* Region is not set */\n    meshtastic_Config_LoRaConfig_RegionCode_UNSET = 0,\n    /* United States */\n    meshtastic_Config_LoRaConfig_RegionCode_US = 1,\n    /* European Union 433mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_EU_433 = 2,\n    /* European Union 868mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_EU_868 = 3,\n    /* China */\n    meshtastic_Config_LoRaConfig_RegionCode_CN = 4,\n    /* Japan */\n    meshtastic_Config_LoRaConfig_RegionCode_JP = 5,\n    /* Australia / New Zealand */\n    meshtastic_Config_LoRaConfig_RegionCode_ANZ = 6,\n    /* Korea */\n    meshtastic_Config_LoRaConfig_RegionCode_KR = 7,\n    /* Taiwan */\n    meshtastic_Config_LoRaConfig_RegionCode_TW = 8,\n    /* Russia */\n    meshtastic_Config_LoRaConfig_RegionCode_RU = 9,\n    /* India */\n    meshtastic_Config_LoRaConfig_RegionCode_IN = 10,\n    /* New Zealand 865mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_NZ_865 = 11,\n    /* Thailand */\n    meshtastic_Config_LoRaConfig_RegionCode_TH = 12,\n    /* WLAN Band */\n    meshtastic_Config_LoRaConfig_RegionCode_LORA_24 = 13,\n    /* Ukraine 433mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_UA_433 = 14,\n    /* Ukraine 868mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_UA_868 = 15,\n    /* Malaysia 433mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_MY_433 = 16,\n    /* Malaysia 919mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_MY_919 = 17,\n    /* Singapore 923mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_SG_923 = 18,\n    /* Philippines 433mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_PH_433 = 19,\n    /* Philippines 868mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_PH_868 = 20,\n    /* Philippines 915mhz */\n    meshtastic_Config_LoRaConfig_RegionCode_PH_915 = 21,\n    /* Australia / New Zealand 433MHz */\n    meshtastic_Config_LoRaConfig_RegionCode_ANZ_433 = 22,\n    /* Kazakhstan 433MHz */\n    meshtastic_Config_LoRaConfig_RegionCode_KZ_433 = 23,\n    /* Kazakhstan 863MHz */\n    meshtastic_Config_LoRaConfig_RegionCode_KZ_863 = 24,\n    /* Nepal 865MHz */\n    meshtastic_Config_LoRaConfig_RegionCode_NP_865 = 25,\n    /* Brazil 902MHz */\n    meshtastic_Config_LoRaConfig_RegionCode_BR_902 = 26\n} meshtastic_Config_LoRaConfig_RegionCode;\n\n/* Standard predefined channel settings\n Note: these mappings must match ModemPreset Choice in the device code. */\ntypedef enum _meshtastic_Config_LoRaConfig_ModemPreset {\n    /* Long Range - Fast */\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST = 0,\n    /* Long Range - Slow\n Deprecated in 2.7: Unpopular slow preset. */\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW = 1,\n    /* Very Long Range - Slow\n Deprecated in 2.5: Works only with txco and is unusably slow */\n    meshtastic_Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW = 2,\n    /* Medium Range - Slow */\n    meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW = 3,\n    /* Medium Range - Fast */\n    meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST = 4,\n    /* Short Range - Slow */\n    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW = 5,\n    /* Short Range - Fast */\n    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST = 6,\n    /* Long Range - Moderately Fast */\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE = 7,\n    /* Short Range - Turbo\n This is the fastest preset and the only one with 500kHz bandwidth.\n It is not legal to use in all regions due to this wider bandwidth. */\n    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO = 8,\n    /* Long Range - Turbo\n This preset performs similarly to LongFast, but with 500Khz bandwidth. */\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO = 9\n} meshtastic_Config_LoRaConfig_ModemPreset;\n\ntypedef enum _meshtastic_Config_LoRaConfig_FEM_LNA_Mode {\n    /* FEM_LNA is present but disabled */\n    meshtastic_Config_LoRaConfig_FEM_LNA_Mode_DISABLED = 0,\n    /* FEM_LNA is present and enabled */\n    meshtastic_Config_LoRaConfig_FEM_LNA_Mode_ENABLED = 1,\n    /* FEM_LNA is not present on the device */\n    meshtastic_Config_LoRaConfig_FEM_LNA_Mode_NOT_PRESENT = 2\n} meshtastic_Config_LoRaConfig_FEM_LNA_Mode;\n\ntypedef enum _meshtastic_Config_BluetoothConfig_PairingMode {\n    /* Device generates a random PIN that will be shown on the screen of the device for pairing */\n    meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN = 0,\n    /* Device requires a specified fixed PIN for pairing */\n    meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN = 1,\n    /* Device requires no PIN for pairing */\n    meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN = 2\n} meshtastic_Config_BluetoothConfig_PairingMode;\n\n/* Struct definitions */\n/* Configuration */\ntypedef struct _meshtastic_Config_DeviceConfig {\n    /* Sets the role of node */\n    meshtastic_Config_DeviceConfig_Role role;\n    /* Disabling this will disable the SerialConsole by not initilizing the StreamAPI\n Moved to SecurityConfig */\n    bool serial_enabled;\n    /* For boards without a hard wired button, this is the pin number that will be used\n Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. */\n    uint32_t button_gpio;\n    /* For boards without a PWM buzzer, this is the pin number that will be used\n Defaults to PIN_BUZZER if defined. */\n    uint32_t buzzer_gpio;\n    /* Sets the role of node */\n    meshtastic_Config_DeviceConfig_RebroadcastMode rebroadcast_mode;\n    /* Send our nodeinfo this often\n Defaults to 900 Seconds (15 minutes) */\n    uint32_t node_info_broadcast_secs;\n    /* Treat double tap interrupt on supported accelerometers as a button press if set to true */\n    bool double_tap_as_button_press;\n    /* If true, device is considered to be \"managed\" by a mesh administrator\n Clients should then limit available configuration and administrative options inside the user interface\n Moved to SecurityConfig */\n    bool is_managed;\n    /* Disables the triple-press of user button to enable or disable GPS */\n    bool disable_triple_click;\n    /* POSIX Timezone definition string from https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv. */\n    char tzdef[65];\n    /* If true, disable the default blinking LED (LED_PIN) behavior on the device */\n    bool led_heartbeat_disabled;\n    /* Controls buzzer behavior for audio feedback\n Defaults to ENABLED */\n    meshtastic_Config_DeviceConfig_BuzzerMode buzzer_mode;\n} meshtastic_Config_DeviceConfig;\n\n/* Position Config */\ntypedef struct _meshtastic_Config_PositionConfig {\n    /* We should send our position this often (but only if it has changed significantly)\n Defaults to 15 minutes */\n    uint32_t position_broadcast_secs;\n    /* Adaptive position braoadcast, which is now the default. */\n    bool position_broadcast_smart_enabled;\n    /* If set, this node is at a fixed position.\n We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node.\n The lat/lon/alt can be set by an internal GPS or with the help of the app. */\n    bool fixed_position;\n    /* Is GPS enabled for this node? */\n    bool gps_enabled;\n    /* How often should we try to get GPS position (in seconds)\n or zero for the default of once every 30 seconds\n or a very large value (maxint) to update only once at boot. */\n    uint32_t gps_update_interval;\n    /* Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time */\n    uint32_t gps_attempt_time;\n    /* Bit field of boolean configuration options for POSITION messages\n (bitwise OR of PositionFlags) */\n    uint32_t position_flags;\n    /* (Re)define GPS_RX_PIN for your board. */\n    uint32_t rx_gpio;\n    /* (Re)define GPS_TX_PIN for your board. */\n    uint32_t tx_gpio;\n    /* The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled */\n    uint32_t broadcast_smart_minimum_distance;\n    /* The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled */\n    uint32_t broadcast_smart_minimum_interval_secs;\n    /* (Re)define PIN_GPS_EN for your board. */\n    uint32_t gps_en_gpio;\n    /* Set where GPS is enabled, disabled, or not present */\n    meshtastic_Config_PositionConfig_GpsMode gps_mode;\n} meshtastic_Config_PositionConfig;\n\n/* Power Config\\\n See [Power Config](/docs/settings/config/power) for additional power config details. */\ntypedef struct _meshtastic_Config_PowerConfig {\n    /* Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio.\n Don't use this setting if you want to use your device with the phone apps or are using a device without a user button.\n Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles */\n    bool is_power_saving;\n    /* Description: If non-zero, the device will fully power off this many seconds after external power is removed. */\n    uint32_t on_battery_shutdown_after_secs;\n    /* Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k)\n Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation.\n https://meshtastic.org/docs/configuration/radio/power/#adc-multiplier-override\n Should be set to floating point value between 2 and 6 */\n    float adc_multiplier_override;\n    /* Description: The number of seconds for to wait before turning off BLE in No Bluetooth states\n  Technical Details: ESP32 Only 0 for default of 1 minute */\n    uint32_t wait_bluetooth_secs;\n    /* Super Deep Sleep Seconds\n While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep\n for this value (default 1 year) or a button press\n 0 for default of one year */\n    uint32_t sds_secs;\n    /* Description: In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on\n Technical Details: ESP32 Only 0 for default of 300 */\n    uint32_t ls_secs;\n    /* Description: While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value\n Technical Details: ESP32 Only 0 for default of 10 seconds */\n    uint32_t min_wake_secs;\n    /* I2C address of INA_2XX to use for reading device battery voltage */\n    uint8_t device_battery_ina_address;\n    /* If non-zero, we want powermon log outputs.  With the particular (bitfield) sources enabled.\n Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options. */\n    uint64_t powermon_enables;\n} meshtastic_Config_PowerConfig;\n\ntypedef struct _meshtastic_Config_NetworkConfig_IpV4Config {\n    /* Static IP address */\n    uint32_t ip;\n    /* Static gateway address */\n    uint32_t gateway;\n    /* Static subnet mask */\n    uint32_t subnet;\n    /* Static DNS server address */\n    uint32_t dns;\n} meshtastic_Config_NetworkConfig_IpV4Config;\n\n/* Network Config */\ntypedef struct _meshtastic_Config_NetworkConfig {\n    /* Enable WiFi (disables Bluetooth) */\n    bool wifi_enabled;\n    /* If set, this node will try to join the specified wifi network and\n acquire an address via DHCP */\n    char wifi_ssid[33];\n    /* If set, will be use to authenticate to the named wifi */\n    char wifi_psk[65];\n    /* NTP server to use if WiFi is conneced, defaults to `meshtastic.pool.ntp.org` */\n    char ntp_server[33];\n    /* Enable Ethernet */\n    bool eth_enabled;\n    /* acquire an address via DHCP or assign static */\n    meshtastic_Config_NetworkConfig_AddressMode address_mode;\n    /* struct to keep static address */\n    bool has_ipv4_config;\n    meshtastic_Config_NetworkConfig_IpV4Config ipv4_config;\n    /* rsyslog Server and Port */\n    char rsyslog_server[33];\n    /* Flags for enabling/disabling network protocols */\n    uint32_t enabled_protocols;\n    /* Enable/Disable ipv6 support */\n    bool ipv6_enabled;\n} meshtastic_Config_NetworkConfig;\n\n/* Display Config */\ntypedef struct _meshtastic_Config_DisplayConfig {\n    /* Number of seconds the screen stays on after pressing the user button or receiving a message\n 0 for default of one minute MAXUINT for always on */\n    uint32_t screen_on_secs;\n    /* Deprecated in 2.7.4: Unused\n How the GPS coordinates are formatted on the OLED screen. */\n    meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat gps_format;\n    /* Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds.\n Potentially useful for devices without user buttons. */\n    uint32_t auto_screen_carousel_secs;\n    /* If this is set, the displayed compass will always point north. if unset, the old behaviour\n (top of display is heading direction) is used. */\n    bool compass_north_top;\n    /* Flip screen vertically, for cases that mount the screen upside down */\n    bool flip_screen;\n    /* Perferred display units */\n    meshtastic_Config_DisplayConfig_DisplayUnits units;\n    /* Override auto-detect in screen */\n    meshtastic_Config_DisplayConfig_OledType oled;\n    /* Display Mode */\n    meshtastic_Config_DisplayConfig_DisplayMode displaymode;\n    /* Print first line in pseudo-bold? FALSE is original style, TRUE is bold */\n    bool heading_bold;\n    /* Should we wake the screen up on accelerometer detected motion or tap */\n    bool wake_on_tap_or_motion;\n    /* Indicates how to rotate or invert the compass output to accurate display on the display. */\n    meshtastic_Config_DisplayConfig_CompassOrientation compass_orientation;\n    /* If false (default), the device will display the time in 24-hour format on screen.\n If true, the device will display the time in 12-hour format on screen. */\n    bool use_12h_clock;\n    /* If false (default), the device will use short names for various display screens.\n If true, node names will show in long format */\n    bool use_long_node_name;\n    /* If true, the device will display message bubbles on screen. */\n    bool enable_message_bubbles;\n} meshtastic_Config_DisplayConfig;\n\n/* Lora Config */\ntypedef struct _meshtastic_Config_LoRaConfig {\n    /* When enabled, the `modem_preset` fields will be adhered to, else the `bandwidth`/`spread_factor`/`coding_rate`\n will be taked from their respective manually defined fields */\n    bool use_preset;\n    /* Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH.\n As a heuristic: If bandwidth is specified, do not use modem_config.\n Because protobufs take ZERO space when the value is zero this works out nicely.\n This value is replaced by bandwidth/spread_factor/coding_rate.\n If you'd like to experiment with other options add them to MeshRadio.cpp in the device code. */\n    meshtastic_Config_LoRaConfig_ModemPreset modem_preset;\n    /* Bandwidth in MHz\n Certain bandwidth numbers are 'special' and will be converted to the\n appropriate floating point value: 31 -> 31.25MHz */\n    uint16_t bandwidth;\n    /* A number from 7 to 12.\n Indicates number of chirps per symbol as 1<<spread_factor. */\n    uint32_t spread_factor;\n    /* The denominator of the coding rate.\n ie for 4/5, the value is 5. 4/8 the value is 8. */\n    uint8_t coding_rate;\n    /* This parameter is for advanced users with advanced test equipment, we do not recommend most users use it.\n A frequency offset that is added to to the calculated band center frequency.\n Used to correct for crystal calibration errors. */\n    float frequency_offset;\n    /* The region code for the radio (US, CN, EU433, etc...) */\n    meshtastic_Config_LoRaConfig_RegionCode region;\n    /* Maximum number of hops. This can't be greater than 7.\n Default of 3\n Attempting to set a value > 7 results in the default */\n    uint32_t hop_limit;\n    /* Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests.\n Defaults to false */\n    bool tx_enabled;\n    /* If zero, then use default max legal continuous power (ie. something that won't\n burn out the radio hardware)\n In most cases you should use zero here.\n Units are in dBm. */\n    int8_t tx_power;\n    /* This controls the actual hardware frequency the radio transmits on.\n Most users should never need to be exposed to this field/concept.\n A channel number between 1 and NUM_CHANNELS (whatever the max is in the current region).\n If ZERO then the rule is \"use the old channel name hash based\n algorithm to derive the channel number\")\n If using the hash algorithm the channel number will be: hash(channel_name) %\n NUM_CHANNELS (Where num channels depends on the regulatory region). */\n    uint16_t channel_num;\n    /* If true, duty cycle limits will be exceeded and thus you're possibly not following\n the local regulations if you're not a HAM.\n Has no effect if the duty cycle of the used region is 100%. */\n    bool override_duty_cycle;\n    /* If true, sets RX boosted gain mode on SX126X based radios */\n    bool sx126x_rx_boosted_gain;\n    /* This parameter is for advanced users and licensed HAM radio operators.\n Ignore Channel Calculation and use this frequency instead. The frequency_offset\n will still be applied. This will allow you to use out-of-band frequencies.\n Please respect your local laws and regulations. If you are a HAM, make sure you\n enable HAM mode and turn off encryption. */\n    float override_frequency;\n    /* If true, disable the build-in PA FAN using pin define in RF95_FAN_EN. */\n    bool pa_fan_disabled;\n    /* For testing it is useful sometimes to force a node to never listen to\n particular other nodes (simulating radio out of range). All nodenums listed\n in ignore_incoming will have packets they send dropped on receive (by router.cpp) */\n    pb_size_t ignore_incoming_count;\n    uint32_t ignore_incoming[3];\n    /* If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. */\n    bool ignore_mqtt;\n    /* Sets the ok_to_mqtt bit on outgoing packets */\n    bool config_ok_to_mqtt;\n    /* Set where LORA FEM is enabled, disabled, or not present */\n    meshtastic_Config_LoRaConfig_FEM_LNA_Mode fem_lna_mode;\n} meshtastic_Config_LoRaConfig;\n\ntypedef struct _meshtastic_Config_BluetoothConfig {\n    /* Enable Bluetooth on the device */\n    bool enabled;\n    /* Determines the pairing strategy for the device */\n    meshtastic_Config_BluetoothConfig_PairingMode mode;\n    /* Specified PIN for PairingMode.FixedPin */\n    uint32_t fixed_pin;\n} meshtastic_Config_BluetoothConfig;\n\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_public_key_t;\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_private_key_t;\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_admin_key_t;\ntypedef struct _meshtastic_Config_SecurityConfig {\n    /* The public key of the user's device.\n Sent out to other nodes on the mesh to allow them to compute a shared secret key. */\n    meshtastic_Config_SecurityConfig_public_key_t public_key;\n    /* The private key of the device.\n Used to create a shared key with a remote device. */\n    meshtastic_Config_SecurityConfig_private_key_t private_key;\n    /* The public key authorized to send admin messages to this node. */\n    pb_size_t admin_key_count;\n    meshtastic_Config_SecurityConfig_admin_key_t admin_key[3];\n    /* If true, device is considered to be \"managed\" by a mesh administrator via admin messages\n Device is managed by a mesh administrator. */\n    bool is_managed;\n    /* Serial Console over the Stream API.\" */\n    bool serial_enabled;\n    /* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).\n Output live debug logging over serial or bluetooth is set to true. */\n    bool debug_log_api_enabled;\n    /* Allow incoming device control over the insecure legacy admin channel. */\n    bool admin_channel_enabled;\n} meshtastic_Config_SecurityConfig;\n\n/* Blank config request, strictly for getting the session key */\ntypedef struct _meshtastic_Config_SessionkeyConfig {\n    char dummy_field;\n} meshtastic_Config_SessionkeyConfig;\n\ntypedef struct _meshtastic_Config {\n    pb_size_t which_payload_variant;\n    union {\n        meshtastic_Config_DeviceConfig device;\n        meshtastic_Config_PositionConfig position;\n        meshtastic_Config_PowerConfig power;\n        meshtastic_Config_NetworkConfig network;\n        meshtastic_Config_DisplayConfig display;\n        meshtastic_Config_LoRaConfig lora;\n        meshtastic_Config_BluetoothConfig bluetooth;\n        meshtastic_Config_SecurityConfig security;\n        meshtastic_Config_SessionkeyConfig sessionkey;\n        meshtastic_DeviceUIConfig device_ui;\n    } payload_variant;\n} meshtastic_Config;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_Config_DeviceConfig_Role_MIN meshtastic_Config_DeviceConfig_Role_CLIENT\n#define _meshtastic_Config_DeviceConfig_Role_MAX meshtastic_Config_DeviceConfig_Role_CLIENT_BASE\n#define _meshtastic_Config_DeviceConfig_Role_ARRAYSIZE ((meshtastic_Config_DeviceConfig_Role)(meshtastic_Config_DeviceConfig_Role_CLIENT_BASE+1))\n\n#define _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN meshtastic_Config_DeviceConfig_RebroadcastMode_ALL\n#define _meshtastic_Config_DeviceConfig_RebroadcastMode_MAX meshtastic_Config_DeviceConfig_RebroadcastMode_CORE_PORTNUMS_ONLY\n#define _meshtastic_Config_DeviceConfig_RebroadcastMode_ARRAYSIZE ((meshtastic_Config_DeviceConfig_RebroadcastMode)(meshtastic_Config_DeviceConfig_RebroadcastMode_CORE_PORTNUMS_ONLY+1))\n\n#define _meshtastic_Config_DeviceConfig_BuzzerMode_MIN meshtastic_Config_DeviceConfig_BuzzerMode_ALL_ENABLED\n#define _meshtastic_Config_DeviceConfig_BuzzerMode_MAX meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY\n#define _meshtastic_Config_DeviceConfig_BuzzerMode_ARRAYSIZE ((meshtastic_Config_DeviceConfig_BuzzerMode)(meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY+1))\n\n#define _meshtastic_Config_PositionConfig_PositionFlags_MIN meshtastic_Config_PositionConfig_PositionFlags_UNSET\n#define _meshtastic_Config_PositionConfig_PositionFlags_MAX meshtastic_Config_PositionConfig_PositionFlags_SPEED\n#define _meshtastic_Config_PositionConfig_PositionFlags_ARRAYSIZE ((meshtastic_Config_PositionConfig_PositionFlags)(meshtastic_Config_PositionConfig_PositionFlags_SPEED+1))\n\n#define _meshtastic_Config_PositionConfig_GpsMode_MIN meshtastic_Config_PositionConfig_GpsMode_DISABLED\n#define _meshtastic_Config_PositionConfig_GpsMode_MAX meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT\n#define _meshtastic_Config_PositionConfig_GpsMode_ARRAYSIZE ((meshtastic_Config_PositionConfig_GpsMode)(meshtastic_Config_PositionConfig_GpsMode_NOT_PRESENT+1))\n\n#define _meshtastic_Config_NetworkConfig_AddressMode_MIN meshtastic_Config_NetworkConfig_AddressMode_DHCP\n#define _meshtastic_Config_NetworkConfig_AddressMode_MAX meshtastic_Config_NetworkConfig_AddressMode_STATIC\n#define _meshtastic_Config_NetworkConfig_AddressMode_ARRAYSIZE ((meshtastic_Config_NetworkConfig_AddressMode)(meshtastic_Config_NetworkConfig_AddressMode_STATIC+1))\n\n#define _meshtastic_Config_NetworkConfig_ProtocolFlags_MIN meshtastic_Config_NetworkConfig_ProtocolFlags_NO_BROADCAST\n#define _meshtastic_Config_NetworkConfig_ProtocolFlags_MAX meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST\n#define _meshtastic_Config_NetworkConfig_ProtocolFlags_ARRAYSIZE ((meshtastic_Config_NetworkConfig_ProtocolFlags)(meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST+1))\n\n#define _meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_MIN meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_UNUSED\n#define _meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_MAX meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_UNUSED\n#define _meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_ARRAYSIZE ((meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat)(meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_UNUSED+1))\n\n#define _meshtastic_Config_DisplayConfig_DisplayUnits_MIN meshtastic_Config_DisplayConfig_DisplayUnits_METRIC\n#define _meshtastic_Config_DisplayConfig_DisplayUnits_MAX meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL\n#define _meshtastic_Config_DisplayConfig_DisplayUnits_ARRAYSIZE ((meshtastic_Config_DisplayConfig_DisplayUnits)(meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL+1))\n\n#define _meshtastic_Config_DisplayConfig_OledType_MIN meshtastic_Config_DisplayConfig_OledType_OLED_AUTO\n#define _meshtastic_Config_DisplayConfig_OledType_MAX meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_128\n#define _meshtastic_Config_DisplayConfig_OledType_ARRAYSIZE ((meshtastic_Config_DisplayConfig_OledType)(meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_128+1))\n\n#define _meshtastic_Config_DisplayConfig_DisplayMode_MIN meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT\n#define _meshtastic_Config_DisplayConfig_DisplayMode_MAX meshtastic_Config_DisplayConfig_DisplayMode_COLOR\n#define _meshtastic_Config_DisplayConfig_DisplayMode_ARRAYSIZE ((meshtastic_Config_DisplayConfig_DisplayMode)(meshtastic_Config_DisplayConfig_DisplayMode_COLOR+1))\n\n#define _meshtastic_Config_DisplayConfig_CompassOrientation_MIN meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0\n#define _meshtastic_Config_DisplayConfig_CompassOrientation_MAX meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED\n#define _meshtastic_Config_DisplayConfig_CompassOrientation_ARRAYSIZE ((meshtastic_Config_DisplayConfig_CompassOrientation)(meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED+1))\n\n#define _meshtastic_Config_LoRaConfig_RegionCode_MIN meshtastic_Config_LoRaConfig_RegionCode_UNSET\n#define _meshtastic_Config_LoRaConfig_RegionCode_MAX meshtastic_Config_LoRaConfig_RegionCode_BR_902\n#define _meshtastic_Config_LoRaConfig_RegionCode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_RegionCode)(meshtastic_Config_LoRaConfig_RegionCode_BR_902+1))\n\n#define _meshtastic_Config_LoRaConfig_ModemPreset_MIN meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST\n#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO\n#define _meshtastic_Config_LoRaConfig_ModemPreset_ARRAYSIZE ((meshtastic_Config_LoRaConfig_ModemPreset)(meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO+1))\n\n#define _meshtastic_Config_LoRaConfig_FEM_LNA_Mode_MIN meshtastic_Config_LoRaConfig_FEM_LNA_Mode_DISABLED\n#define _meshtastic_Config_LoRaConfig_FEM_LNA_Mode_MAX meshtastic_Config_LoRaConfig_FEM_LNA_Mode_NOT_PRESENT\n#define _meshtastic_Config_LoRaConfig_FEM_LNA_Mode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_FEM_LNA_Mode)(meshtastic_Config_LoRaConfig_FEM_LNA_Mode_NOT_PRESENT+1))\n\n#define _meshtastic_Config_BluetoothConfig_PairingMode_MIN meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN\n#define _meshtastic_Config_BluetoothConfig_PairingMode_MAX meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN\n#define _meshtastic_Config_BluetoothConfig_PairingMode_ARRAYSIZE ((meshtastic_Config_BluetoothConfig_PairingMode)(meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN+1))\n\n\n#define meshtastic_Config_DeviceConfig_role_ENUMTYPE meshtastic_Config_DeviceConfig_Role\n#define meshtastic_Config_DeviceConfig_rebroadcast_mode_ENUMTYPE meshtastic_Config_DeviceConfig_RebroadcastMode\n#define meshtastic_Config_DeviceConfig_buzzer_mode_ENUMTYPE meshtastic_Config_DeviceConfig_BuzzerMode\n\n#define meshtastic_Config_PositionConfig_gps_mode_ENUMTYPE meshtastic_Config_PositionConfig_GpsMode\n\n\n#define meshtastic_Config_NetworkConfig_address_mode_ENUMTYPE meshtastic_Config_NetworkConfig_AddressMode\n\n\n#define meshtastic_Config_DisplayConfig_gps_format_ENUMTYPE meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat\n#define meshtastic_Config_DisplayConfig_units_ENUMTYPE meshtastic_Config_DisplayConfig_DisplayUnits\n#define meshtastic_Config_DisplayConfig_oled_ENUMTYPE meshtastic_Config_DisplayConfig_OledType\n#define meshtastic_Config_DisplayConfig_displaymode_ENUMTYPE meshtastic_Config_DisplayConfig_DisplayMode\n#define meshtastic_Config_DisplayConfig_compass_orientation_ENUMTYPE meshtastic_Config_DisplayConfig_CompassOrientation\n\n#define meshtastic_Config_LoRaConfig_modem_preset_ENUMTYPE meshtastic_Config_LoRaConfig_ModemPreset\n#define meshtastic_Config_LoRaConfig_region_ENUMTYPE meshtastic_Config_LoRaConfig_RegionCode\n#define meshtastic_Config_LoRaConfig_fem_lna_mode_ENUMTYPE meshtastic_Config_LoRaConfig_FEM_LNA_Mode\n\n#define meshtastic_Config_BluetoothConfig_mode_ENUMTYPE meshtastic_Config_BluetoothConfig_PairingMode\n\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_Config_init_default           {0, {meshtastic_Config_DeviceConfig_init_default}}\n#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, \"\", 0, _meshtastic_Config_DeviceConfig_BuzzerMode_MIN}\n#define meshtastic_Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}\n#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_Config_NetworkConfig_init_default {0, \"\", \"\", \"\", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, \"\", 0, 0}\n#define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0}\n#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0, 0, 0}\n#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, _meshtastic_Config_LoRaConfig_FEM_LNA_Mode_MIN}\n#define meshtastic_Config_BluetoothConfig_init_default {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0}\n#define meshtastic_Config_SecurityConfig_init_default {{0, {0}}, {0, {0}}, 0, {{0, {0}}, {0, {0}}, {0, {0}}}, 0, 0, 0, 0}\n#define meshtastic_Config_SessionkeyConfig_init_default {0}\n#define meshtastic_Config_init_zero              {0, {meshtastic_Config_DeviceConfig_init_zero}}\n#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, \"\", 0, _meshtastic_Config_DeviceConfig_BuzzerMode_MIN}\n#define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}\n#define meshtastic_Config_PowerConfig_init_zero  {0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_Config_NetworkConfig_init_zero {0, \"\", \"\", \"\", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, \"\", 0, 0}\n#define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0}\n#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_DeprecatedGpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN, 0, 0, 0}\n#define meshtastic_Config_LoRaConfig_init_zero   {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0, 0, _meshtastic_Config_LoRaConfig_FEM_LNA_Mode_MIN}\n#define meshtastic_Config_BluetoothConfig_init_zero {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0}\n#define meshtastic_Config_SecurityConfig_init_zero {{0, {0}}, {0, {0}}, 0, {{0, {0}}, {0, {0}}, {0, {0}}}, 0, 0, 0, 0}\n#define meshtastic_Config_SessionkeyConfig_init_zero {0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_Config_DeviceConfig_role_tag  1\n#define meshtastic_Config_DeviceConfig_serial_enabled_tag 2\n#define meshtastic_Config_DeviceConfig_button_gpio_tag 4\n#define meshtastic_Config_DeviceConfig_buzzer_gpio_tag 5\n#define meshtastic_Config_DeviceConfig_rebroadcast_mode_tag 6\n#define meshtastic_Config_DeviceConfig_node_info_broadcast_secs_tag 7\n#define meshtastic_Config_DeviceConfig_double_tap_as_button_press_tag 8\n#define meshtastic_Config_DeviceConfig_is_managed_tag 9\n#define meshtastic_Config_DeviceConfig_disable_triple_click_tag 10\n#define meshtastic_Config_DeviceConfig_tzdef_tag 11\n#define meshtastic_Config_DeviceConfig_led_heartbeat_disabled_tag 12\n#define meshtastic_Config_DeviceConfig_buzzer_mode_tag 13\n#define meshtastic_Config_PositionConfig_position_broadcast_secs_tag 1\n#define meshtastic_Config_PositionConfig_position_broadcast_smart_enabled_tag 2\n#define meshtastic_Config_PositionConfig_fixed_position_tag 3\n#define meshtastic_Config_PositionConfig_gps_enabled_tag 4\n#define meshtastic_Config_PositionConfig_gps_update_interval_tag 5\n#define meshtastic_Config_PositionConfig_gps_attempt_time_tag 6\n#define meshtastic_Config_PositionConfig_position_flags_tag 7\n#define meshtastic_Config_PositionConfig_rx_gpio_tag 8\n#define meshtastic_Config_PositionConfig_tx_gpio_tag 9\n#define meshtastic_Config_PositionConfig_broadcast_smart_minimum_distance_tag 10\n#define meshtastic_Config_PositionConfig_broadcast_smart_minimum_interval_secs_tag 11\n#define meshtastic_Config_PositionConfig_gps_en_gpio_tag 12\n#define meshtastic_Config_PositionConfig_gps_mode_tag 13\n#define meshtastic_Config_PowerConfig_is_power_saving_tag 1\n#define meshtastic_Config_PowerConfig_on_battery_shutdown_after_secs_tag 2\n#define meshtastic_Config_PowerConfig_adc_multiplier_override_tag 3\n#define meshtastic_Config_PowerConfig_wait_bluetooth_secs_tag 4\n#define meshtastic_Config_PowerConfig_sds_secs_tag 6\n#define meshtastic_Config_PowerConfig_ls_secs_tag 7\n#define meshtastic_Config_PowerConfig_min_wake_secs_tag 8\n#define meshtastic_Config_PowerConfig_device_battery_ina_address_tag 9\n#define meshtastic_Config_PowerConfig_powermon_enables_tag 32\n#define meshtastic_Config_NetworkConfig_IpV4Config_ip_tag 1\n#define meshtastic_Config_NetworkConfig_IpV4Config_gateway_tag 2\n#define meshtastic_Config_NetworkConfig_IpV4Config_subnet_tag 3\n#define meshtastic_Config_NetworkConfig_IpV4Config_dns_tag 4\n#define meshtastic_Config_NetworkConfig_wifi_enabled_tag 1\n#define meshtastic_Config_NetworkConfig_wifi_ssid_tag 3\n#define meshtastic_Config_NetworkConfig_wifi_psk_tag 4\n#define meshtastic_Config_NetworkConfig_ntp_server_tag 5\n#define meshtastic_Config_NetworkConfig_eth_enabled_tag 6\n#define meshtastic_Config_NetworkConfig_address_mode_tag 7\n#define meshtastic_Config_NetworkConfig_ipv4_config_tag 8\n#define meshtastic_Config_NetworkConfig_rsyslog_server_tag 9\n#define meshtastic_Config_NetworkConfig_enabled_protocols_tag 10\n#define meshtastic_Config_NetworkConfig_ipv6_enabled_tag 11\n#define meshtastic_Config_DisplayConfig_screen_on_secs_tag 1\n#define meshtastic_Config_DisplayConfig_gps_format_tag 2\n#define meshtastic_Config_DisplayConfig_auto_screen_carousel_secs_tag 3\n#define meshtastic_Config_DisplayConfig_compass_north_top_tag 4\n#define meshtastic_Config_DisplayConfig_flip_screen_tag 5\n#define meshtastic_Config_DisplayConfig_units_tag 6\n#define meshtastic_Config_DisplayConfig_oled_tag 7\n#define meshtastic_Config_DisplayConfig_displaymode_tag 8\n#define meshtastic_Config_DisplayConfig_heading_bold_tag 9\n#define meshtastic_Config_DisplayConfig_wake_on_tap_or_motion_tag 10\n#define meshtastic_Config_DisplayConfig_compass_orientation_tag 11\n#define meshtastic_Config_DisplayConfig_use_12h_clock_tag 12\n#define meshtastic_Config_DisplayConfig_use_long_node_name_tag 13\n#define meshtastic_Config_DisplayConfig_enable_message_bubbles_tag 14\n#define meshtastic_Config_LoRaConfig_use_preset_tag 1\n#define meshtastic_Config_LoRaConfig_modem_preset_tag 2\n#define meshtastic_Config_LoRaConfig_bandwidth_tag 3\n#define meshtastic_Config_LoRaConfig_spread_factor_tag 4\n#define meshtastic_Config_LoRaConfig_coding_rate_tag 5\n#define meshtastic_Config_LoRaConfig_frequency_offset_tag 6\n#define meshtastic_Config_LoRaConfig_region_tag  7\n#define meshtastic_Config_LoRaConfig_hop_limit_tag 8\n#define meshtastic_Config_LoRaConfig_tx_enabled_tag 9\n#define meshtastic_Config_LoRaConfig_tx_power_tag 10\n#define meshtastic_Config_LoRaConfig_channel_num_tag 11\n#define meshtastic_Config_LoRaConfig_override_duty_cycle_tag 12\n#define meshtastic_Config_LoRaConfig_sx126x_rx_boosted_gain_tag 13\n#define meshtastic_Config_LoRaConfig_override_frequency_tag 14\n#define meshtastic_Config_LoRaConfig_pa_fan_disabled_tag 15\n#define meshtastic_Config_LoRaConfig_ignore_incoming_tag 103\n#define meshtastic_Config_LoRaConfig_ignore_mqtt_tag 104\n#define meshtastic_Config_LoRaConfig_config_ok_to_mqtt_tag 105\n#define meshtastic_Config_LoRaConfig_fem_lna_mode_tag 106\n#define meshtastic_Config_BluetoothConfig_enabled_tag 1\n#define meshtastic_Config_BluetoothConfig_mode_tag 2\n#define meshtastic_Config_BluetoothConfig_fixed_pin_tag 3\n#define meshtastic_Config_SecurityConfig_public_key_tag 1\n#define meshtastic_Config_SecurityConfig_private_key_tag 2\n#define meshtastic_Config_SecurityConfig_admin_key_tag 3\n#define meshtastic_Config_SecurityConfig_is_managed_tag 4\n#define meshtastic_Config_SecurityConfig_serial_enabled_tag 5\n#define meshtastic_Config_SecurityConfig_debug_log_api_enabled_tag 6\n#define meshtastic_Config_SecurityConfig_admin_channel_enabled_tag 8\n#define meshtastic_Config_device_tag             1\n#define meshtastic_Config_position_tag           2\n#define meshtastic_Config_power_tag              3\n#define meshtastic_Config_network_tag            4\n#define meshtastic_Config_display_tag            5\n#define meshtastic_Config_lora_tag               6\n#define meshtastic_Config_bluetooth_tag          7\n#define meshtastic_Config_security_tag           8\n#define meshtastic_Config_sessionkey_tag         9\n#define meshtastic_Config_device_ui_tag          10\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_Config_FIELDLIST(X, a) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,device,payload_variant.device),   1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,position,payload_variant.position),   2) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,power,payload_variant.power),   3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,network,payload_variant.network),   4) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,display,payload_variant.display),   5) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,lora,payload_variant.lora),   6) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,bluetooth,payload_variant.bluetooth),   7) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,security,payload_variant.security),   8) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,sessionkey,payload_variant.sessionkey),   9) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,device_ui,payload_variant.device_ui),  10)\n#define meshtastic_Config_CALLBACK NULL\n#define meshtastic_Config_DEFAULT NULL\n#define meshtastic_Config_payload_variant_device_MSGTYPE meshtastic_Config_DeviceConfig\n#define meshtastic_Config_payload_variant_position_MSGTYPE meshtastic_Config_PositionConfig\n#define meshtastic_Config_payload_variant_power_MSGTYPE meshtastic_Config_PowerConfig\n#define meshtastic_Config_payload_variant_network_MSGTYPE meshtastic_Config_NetworkConfig\n#define meshtastic_Config_payload_variant_display_MSGTYPE meshtastic_Config_DisplayConfig\n#define meshtastic_Config_payload_variant_lora_MSGTYPE meshtastic_Config_LoRaConfig\n#define meshtastic_Config_payload_variant_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig\n#define meshtastic_Config_payload_variant_security_MSGTYPE meshtastic_Config_SecurityConfig\n#define meshtastic_Config_payload_variant_sessionkey_MSGTYPE meshtastic_Config_SessionkeyConfig\n#define meshtastic_Config_payload_variant_device_ui_MSGTYPE meshtastic_DeviceUIConfig\n\n#define meshtastic_Config_DeviceConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              1) \\\nX(a, STATIC,   SINGULAR, BOOL,     serial_enabled,    2) \\\nX(a, STATIC,   SINGULAR, UINT32,   button_gpio,       4) \\\nX(a, STATIC,   SINGULAR, UINT32,   buzzer_gpio,       5) \\\nX(a, STATIC,   SINGULAR, UENUM,    rebroadcast_mode,   6) \\\nX(a, STATIC,   SINGULAR, UINT32,   node_info_broadcast_secs,   7) \\\nX(a, STATIC,   SINGULAR, BOOL,     double_tap_as_button_press,   8) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_managed,        9) \\\nX(a, STATIC,   SINGULAR, BOOL,     disable_triple_click,  10) \\\nX(a, STATIC,   SINGULAR, STRING,   tzdef,            11) \\\nX(a, STATIC,   SINGULAR, BOOL,     led_heartbeat_disabled,  12) \\\nX(a, STATIC,   SINGULAR, UENUM,    buzzer_mode,      13)\n#define meshtastic_Config_DeviceConfig_CALLBACK NULL\n#define meshtastic_Config_DeviceConfig_DEFAULT NULL\n\n#define meshtastic_Config_PositionConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_broadcast_secs,   1) \\\nX(a, STATIC,   SINGULAR, BOOL,     position_broadcast_smart_enabled,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     fixed_position,    3) \\\nX(a, STATIC,   SINGULAR, BOOL,     gps_enabled,       4) \\\nX(a, STATIC,   SINGULAR, UINT32,   gps_update_interval,   5) \\\nX(a, STATIC,   SINGULAR, UINT32,   gps_attempt_time,   6) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_flags,    7) \\\nX(a, STATIC,   SINGULAR, UINT32,   rx_gpio,           8) \\\nX(a, STATIC,   SINGULAR, UINT32,   tx_gpio,           9) \\\nX(a, STATIC,   SINGULAR, UINT32,   broadcast_smart_minimum_distance,  10) \\\nX(a, STATIC,   SINGULAR, UINT32,   broadcast_smart_minimum_interval_secs,  11) \\\nX(a, STATIC,   SINGULAR, UINT32,   gps_en_gpio,      12) \\\nX(a, STATIC,   SINGULAR, UENUM,    gps_mode,         13)\n#define meshtastic_Config_PositionConfig_CALLBACK NULL\n#define meshtastic_Config_PositionConfig_DEFAULT NULL\n\n#define meshtastic_Config_PowerConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_power_saving,   1) \\\nX(a, STATIC,   SINGULAR, UINT32,   on_battery_shutdown_after_secs,   2) \\\nX(a, STATIC,   SINGULAR, FLOAT,    adc_multiplier_override,   3) \\\nX(a, STATIC,   SINGULAR, UINT32,   wait_bluetooth_secs,   4) \\\nX(a, STATIC,   SINGULAR, UINT32,   sds_secs,          6) \\\nX(a, STATIC,   SINGULAR, UINT32,   ls_secs,           7) \\\nX(a, STATIC,   SINGULAR, UINT32,   min_wake_secs,     8) \\\nX(a, STATIC,   SINGULAR, UINT32,   device_battery_ina_address,   9) \\\nX(a, STATIC,   SINGULAR, UINT64,   powermon_enables,  32)\n#define meshtastic_Config_PowerConfig_CALLBACK NULL\n#define meshtastic_Config_PowerConfig_DEFAULT NULL\n\n#define meshtastic_Config_NetworkConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     wifi_enabled,      1) \\\nX(a, STATIC,   SINGULAR, STRING,   wifi_ssid,         3) \\\nX(a, STATIC,   SINGULAR, STRING,   wifi_psk,          4) \\\nX(a, STATIC,   SINGULAR, STRING,   ntp_server,        5) \\\nX(a, STATIC,   SINGULAR, BOOL,     eth_enabled,       6) \\\nX(a, STATIC,   SINGULAR, UENUM,    address_mode,      7) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  ipv4_config,       8) \\\nX(a, STATIC,   SINGULAR, STRING,   rsyslog_server,    9) \\\nX(a, STATIC,   SINGULAR, UINT32,   enabled_protocols,  10) \\\nX(a, STATIC,   SINGULAR, BOOL,     ipv6_enabled,     11)\n#define meshtastic_Config_NetworkConfig_CALLBACK NULL\n#define meshtastic_Config_NetworkConfig_DEFAULT NULL\n#define meshtastic_Config_NetworkConfig_ipv4_config_MSGTYPE meshtastic_Config_NetworkConfig_IpV4Config\n\n#define meshtastic_Config_NetworkConfig_IpV4Config_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, FIXED32,  ip,                1) \\\nX(a, STATIC,   SINGULAR, FIXED32,  gateway,           2) \\\nX(a, STATIC,   SINGULAR, FIXED32,  subnet,            3) \\\nX(a, STATIC,   SINGULAR, FIXED32,  dns,               4)\n#define meshtastic_Config_NetworkConfig_IpV4Config_CALLBACK NULL\n#define meshtastic_Config_NetworkConfig_IpV4Config_DEFAULT NULL\n\n#define meshtastic_Config_DisplayConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   screen_on_secs,    1) \\\nX(a, STATIC,   SINGULAR, UENUM,    gps_format,        2) \\\nX(a, STATIC,   SINGULAR, UINT32,   auto_screen_carousel_secs,   3) \\\nX(a, STATIC,   SINGULAR, BOOL,     compass_north_top,   4) \\\nX(a, STATIC,   SINGULAR, BOOL,     flip_screen,       5) \\\nX(a, STATIC,   SINGULAR, UENUM,    units,             6) \\\nX(a, STATIC,   SINGULAR, UENUM,    oled,              7) \\\nX(a, STATIC,   SINGULAR, UENUM,    displaymode,       8) \\\nX(a, STATIC,   SINGULAR, BOOL,     heading_bold,      9) \\\nX(a, STATIC,   SINGULAR, BOOL,     wake_on_tap_or_motion,  10) \\\nX(a, STATIC,   SINGULAR, UENUM,    compass_orientation,  11) \\\nX(a, STATIC,   SINGULAR, BOOL,     use_12h_clock,    12) \\\nX(a, STATIC,   SINGULAR, BOOL,     use_long_node_name,  13) \\\nX(a, STATIC,   SINGULAR, BOOL,     enable_message_bubbles,  14)\n#define meshtastic_Config_DisplayConfig_CALLBACK NULL\n#define meshtastic_Config_DisplayConfig_DEFAULT NULL\n\n#define meshtastic_Config_LoRaConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     use_preset,        1) \\\nX(a, STATIC,   SINGULAR, UENUM,    modem_preset,      2) \\\nX(a, STATIC,   SINGULAR, UINT32,   bandwidth,         3) \\\nX(a, STATIC,   SINGULAR, UINT32,   spread_factor,     4) \\\nX(a, STATIC,   SINGULAR, UINT32,   coding_rate,       5) \\\nX(a, STATIC,   SINGULAR, FLOAT,    frequency_offset,   6) \\\nX(a, STATIC,   SINGULAR, UENUM,    region,            7) \\\nX(a, STATIC,   SINGULAR, UINT32,   hop_limit,         8) \\\nX(a, STATIC,   SINGULAR, BOOL,     tx_enabled,        9) \\\nX(a, STATIC,   SINGULAR, INT32,    tx_power,         10) \\\nX(a, STATIC,   SINGULAR, UINT32,   channel_num,      11) \\\nX(a, STATIC,   SINGULAR, BOOL,     override_duty_cycle,  12) \\\nX(a, STATIC,   SINGULAR, BOOL,     sx126x_rx_boosted_gain,  13) \\\nX(a, STATIC,   SINGULAR, FLOAT,    override_frequency,  14) \\\nX(a, STATIC,   SINGULAR, BOOL,     pa_fan_disabled,  15) \\\nX(a, STATIC,   REPEATED, UINT32,   ignore_incoming, 103) \\\nX(a, STATIC,   SINGULAR, BOOL,     ignore_mqtt,     104) \\\nX(a, STATIC,   SINGULAR, BOOL,     config_ok_to_mqtt, 105) \\\nX(a, STATIC,   SINGULAR, UENUM,    fem_lna_mode,    106)\n#define meshtastic_Config_LoRaConfig_CALLBACK NULL\n#define meshtastic_Config_LoRaConfig_DEFAULT NULL\n\n#define meshtastic_Config_BluetoothConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, UENUM,    mode,              2) \\\nX(a, STATIC,   SINGULAR, UINT32,   fixed_pin,         3)\n#define meshtastic_Config_BluetoothConfig_CALLBACK NULL\n#define meshtastic_Config_BluetoothConfig_DEFAULT NULL\n\n#define meshtastic_Config_SecurityConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BYTES,    public_key,        1) \\\nX(a, STATIC,   SINGULAR, BYTES,    private_key,       2) \\\nX(a, STATIC,   REPEATED, BYTES,    admin_key,         3) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_managed,        4) \\\nX(a, STATIC,   SINGULAR, BOOL,     serial_enabled,    5) \\\nX(a, STATIC,   SINGULAR, BOOL,     debug_log_api_enabled,   6) \\\nX(a, STATIC,   SINGULAR, BOOL,     admin_channel_enabled,   8)\n#define meshtastic_Config_SecurityConfig_CALLBACK NULL\n#define meshtastic_Config_SecurityConfig_DEFAULT NULL\n\n#define meshtastic_Config_SessionkeyConfig_FIELDLIST(X, a) \\\n\n#define meshtastic_Config_SessionkeyConfig_CALLBACK NULL\n#define meshtastic_Config_SessionkeyConfig_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_Config_msg;\nextern const pb_msgdesc_t meshtastic_Config_DeviceConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_PositionConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_PowerConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_NetworkConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_NetworkConfig_IpV4Config_msg;\nextern const pb_msgdesc_t meshtastic_Config_DisplayConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_LoRaConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_BluetoothConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_SecurityConfig_msg;\nextern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_Config_fields &meshtastic_Config_msg\n#define meshtastic_Config_DeviceConfig_fields &meshtastic_Config_DeviceConfig_msg\n#define meshtastic_Config_PositionConfig_fields &meshtastic_Config_PositionConfig_msg\n#define meshtastic_Config_PowerConfig_fields &meshtastic_Config_PowerConfig_msg\n#define meshtastic_Config_NetworkConfig_fields &meshtastic_Config_NetworkConfig_msg\n#define meshtastic_Config_NetworkConfig_IpV4Config_fields &meshtastic_Config_NetworkConfig_IpV4Config_msg\n#define meshtastic_Config_DisplayConfig_fields &meshtastic_Config_DisplayConfig_msg\n#define meshtastic_Config_LoRaConfig_fields &meshtastic_Config_LoRaConfig_msg\n#define meshtastic_Config_BluetoothConfig_fields &meshtastic_Config_BluetoothConfig_msg\n#define meshtastic_Config_SecurityConfig_fields &meshtastic_Config_SecurityConfig_msg\n#define meshtastic_Config_SessionkeyConfig_fields &meshtastic_Config_SessionkeyConfig_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_CONFIG_PB_H_MAX_SIZE meshtastic_Config_size\n#define meshtastic_Config_BluetoothConfig_size   10\n#define meshtastic_Config_DeviceConfig_size      100\n#define meshtastic_Config_DisplayConfig_size     36\n#define meshtastic_Config_LoRaConfig_size        88\n#define meshtastic_Config_NetworkConfig_IpV4Config_size 20\n#define meshtastic_Config_NetworkConfig_size     204\n#define meshtastic_Config_PositionConfig_size    62\n#define meshtastic_Config_PowerConfig_size       52\n#define meshtastic_Config_SecurityConfig_size    178\n#define meshtastic_Config_SessionkeyConfig_size  0\n#define meshtastic_Config_size                   207\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/connection_status.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/connection_status.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_DeviceConnectionStatus, meshtastic_DeviceConnectionStatus, AUTO)\n\n\nPB_BIND(meshtastic_WifiConnectionStatus, meshtastic_WifiConnectionStatus, AUTO)\n\n\nPB_BIND(meshtastic_EthernetConnectionStatus, meshtastic_EthernetConnectionStatus, AUTO)\n\n\nPB_BIND(meshtastic_NetworkConnectionStatus, meshtastic_NetworkConnectionStatus, AUTO)\n\n\nPB_BIND(meshtastic_BluetoothConnectionStatus, meshtastic_BluetoothConnectionStatus, AUTO)\n\n\nPB_BIND(meshtastic_SerialConnectionStatus, meshtastic_SerialConnectionStatus, AUTO)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/connection_status.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* Ethernet or WiFi connection status */\ntypedef struct _meshtastic_NetworkConnectionStatus {\n    /* IP address of device */\n    uint32_t ip_address;\n    /* Whether the device has an active connection or not */\n    bool is_connected;\n    /* Whether the device has an active connection to an MQTT broker or not */\n    bool is_mqtt_connected;\n    /* Whether the device is actively remote syslogging or not */\n    bool is_syslog_connected;\n} meshtastic_NetworkConnectionStatus;\n\n/* WiFi connection status */\ntypedef struct _meshtastic_WifiConnectionStatus {\n    /* Connection status */\n    bool has_status;\n    meshtastic_NetworkConnectionStatus status;\n    /* WiFi access point SSID */\n    char ssid[33];\n    /* RSSI of wireless connection */\n    int32_t rssi;\n} meshtastic_WifiConnectionStatus;\n\n/* Ethernet connection status */\ntypedef struct _meshtastic_EthernetConnectionStatus {\n    /* Connection status */\n    bool has_status;\n    meshtastic_NetworkConnectionStatus status;\n} meshtastic_EthernetConnectionStatus;\n\n/* Bluetooth connection status */\ntypedef struct _meshtastic_BluetoothConnectionStatus {\n    /* The pairing PIN for bluetooth */\n    uint32_t pin;\n    /* RSSI of bluetooth connection */\n    int32_t rssi;\n    /* Whether the device has an active connection or not */\n    bool is_connected;\n} meshtastic_BluetoothConnectionStatus;\n\n/* Serial connection status */\ntypedef struct _meshtastic_SerialConnectionStatus {\n    /* Serial baud rate */\n    uint32_t baud;\n    /* Whether the device has an active connection or not */\n    bool is_connected;\n} meshtastic_SerialConnectionStatus;\n\ntypedef struct _meshtastic_DeviceConnectionStatus {\n    /* WiFi Status */\n    bool has_wifi;\n    meshtastic_WifiConnectionStatus wifi;\n    /* WiFi Status */\n    bool has_ethernet;\n    meshtastic_EthernetConnectionStatus ethernet;\n    /* Bluetooth Status */\n    bool has_bluetooth;\n    meshtastic_BluetoothConnectionStatus bluetooth;\n    /* Serial Status */\n    bool has_serial;\n    meshtastic_SerialConnectionStatus serial;\n} meshtastic_DeviceConnectionStatus;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_DeviceConnectionStatus_init_default {false, meshtastic_WifiConnectionStatus_init_default, false, meshtastic_EthernetConnectionStatus_init_default, false, meshtastic_BluetoothConnectionStatus_init_default, false, meshtastic_SerialConnectionStatus_init_default}\n#define meshtastic_WifiConnectionStatus_init_default {false, meshtastic_NetworkConnectionStatus_init_default, \"\", 0}\n#define meshtastic_EthernetConnectionStatus_init_default {false, meshtastic_NetworkConnectionStatus_init_default}\n#define meshtastic_NetworkConnectionStatus_init_default {0, 0, 0, 0}\n#define meshtastic_BluetoothConnectionStatus_init_default {0, 0, 0}\n#define meshtastic_SerialConnectionStatus_init_default {0, 0}\n#define meshtastic_DeviceConnectionStatus_init_zero {false, meshtastic_WifiConnectionStatus_init_zero, false, meshtastic_EthernetConnectionStatus_init_zero, false, meshtastic_BluetoothConnectionStatus_init_zero, false, meshtastic_SerialConnectionStatus_init_zero}\n#define meshtastic_WifiConnectionStatus_init_zero {false, meshtastic_NetworkConnectionStatus_init_zero, \"\", 0}\n#define meshtastic_EthernetConnectionStatus_init_zero {false, meshtastic_NetworkConnectionStatus_init_zero}\n#define meshtastic_NetworkConnectionStatus_init_zero {0, 0, 0, 0}\n#define meshtastic_BluetoothConnectionStatus_init_zero {0, 0, 0}\n#define meshtastic_SerialConnectionStatus_init_zero {0, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_NetworkConnectionStatus_ip_address_tag 1\n#define meshtastic_NetworkConnectionStatus_is_connected_tag 2\n#define meshtastic_NetworkConnectionStatus_is_mqtt_connected_tag 3\n#define meshtastic_NetworkConnectionStatus_is_syslog_connected_tag 4\n#define meshtastic_WifiConnectionStatus_status_tag 1\n#define meshtastic_WifiConnectionStatus_ssid_tag 2\n#define meshtastic_WifiConnectionStatus_rssi_tag 3\n#define meshtastic_EthernetConnectionStatus_status_tag 1\n#define meshtastic_BluetoothConnectionStatus_pin_tag 1\n#define meshtastic_BluetoothConnectionStatus_rssi_tag 2\n#define meshtastic_BluetoothConnectionStatus_is_connected_tag 3\n#define meshtastic_SerialConnectionStatus_baud_tag 1\n#define meshtastic_SerialConnectionStatus_is_connected_tag 2\n#define meshtastic_DeviceConnectionStatus_wifi_tag 1\n#define meshtastic_DeviceConnectionStatus_ethernet_tag 2\n#define meshtastic_DeviceConnectionStatus_bluetooth_tag 3\n#define meshtastic_DeviceConnectionStatus_serial_tag 4\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_DeviceConnectionStatus_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  wifi,              1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  ethernet,          2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  bluetooth,         3) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  serial,            4)\n#define meshtastic_DeviceConnectionStatus_CALLBACK NULL\n#define meshtastic_DeviceConnectionStatus_DEFAULT NULL\n#define meshtastic_DeviceConnectionStatus_wifi_MSGTYPE meshtastic_WifiConnectionStatus\n#define meshtastic_DeviceConnectionStatus_ethernet_MSGTYPE meshtastic_EthernetConnectionStatus\n#define meshtastic_DeviceConnectionStatus_bluetooth_MSGTYPE meshtastic_BluetoothConnectionStatus\n#define meshtastic_DeviceConnectionStatus_serial_MSGTYPE meshtastic_SerialConnectionStatus\n\n#define meshtastic_WifiConnectionStatus_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  status,            1) \\\nX(a, STATIC,   SINGULAR, STRING,   ssid,              2) \\\nX(a, STATIC,   SINGULAR, INT32,    rssi,              3)\n#define meshtastic_WifiConnectionStatus_CALLBACK NULL\n#define meshtastic_WifiConnectionStatus_DEFAULT NULL\n#define meshtastic_WifiConnectionStatus_status_MSGTYPE meshtastic_NetworkConnectionStatus\n\n#define meshtastic_EthernetConnectionStatus_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  status,            1)\n#define meshtastic_EthernetConnectionStatus_CALLBACK NULL\n#define meshtastic_EthernetConnectionStatus_DEFAULT NULL\n#define meshtastic_EthernetConnectionStatus_status_MSGTYPE meshtastic_NetworkConnectionStatus\n\n#define meshtastic_NetworkConnectionStatus_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, FIXED32,  ip_address,        1) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_connected,      2) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_mqtt_connected,   3) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_syslog_connected,   4)\n#define meshtastic_NetworkConnectionStatus_CALLBACK NULL\n#define meshtastic_NetworkConnectionStatus_DEFAULT NULL\n\n#define meshtastic_BluetoothConnectionStatus_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   pin,               1) \\\nX(a, STATIC,   SINGULAR, INT32,    rssi,              2) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_connected,      3)\n#define meshtastic_BluetoothConnectionStatus_CALLBACK NULL\n#define meshtastic_BluetoothConnectionStatus_DEFAULT NULL\n\n#define meshtastic_SerialConnectionStatus_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   baud,              1) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_connected,      2)\n#define meshtastic_SerialConnectionStatus_CALLBACK NULL\n#define meshtastic_SerialConnectionStatus_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_DeviceConnectionStatus_msg;\nextern const pb_msgdesc_t meshtastic_WifiConnectionStatus_msg;\nextern const pb_msgdesc_t meshtastic_EthernetConnectionStatus_msg;\nextern const pb_msgdesc_t meshtastic_NetworkConnectionStatus_msg;\nextern const pb_msgdesc_t meshtastic_BluetoothConnectionStatus_msg;\nextern const pb_msgdesc_t meshtastic_SerialConnectionStatus_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_DeviceConnectionStatus_fields &meshtastic_DeviceConnectionStatus_msg\n#define meshtastic_WifiConnectionStatus_fields &meshtastic_WifiConnectionStatus_msg\n#define meshtastic_EthernetConnectionStatus_fields &meshtastic_EthernetConnectionStatus_msg\n#define meshtastic_NetworkConnectionStatus_fields &meshtastic_NetworkConnectionStatus_msg\n#define meshtastic_BluetoothConnectionStatus_fields &meshtastic_BluetoothConnectionStatus_msg\n#define meshtastic_SerialConnectionStatus_fields &meshtastic_SerialConnectionStatus_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_MAX_SIZE meshtastic_DeviceConnectionStatus_size\n#define meshtastic_BluetoothConnectionStatus_size 19\n#define meshtastic_DeviceConnectionStatus_size   106\n#define meshtastic_EthernetConnectionStatus_size 13\n#define meshtastic_NetworkConnectionStatus_size  11\n#define meshtastic_SerialConnectionStatus_size   8\n#define meshtastic_WifiConnectionStatus_size     58\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/device_ui.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/device_ui.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_DeviceUIConfig, meshtastic_DeviceUIConfig, AUTO)\n\n\nPB_BIND(meshtastic_NodeFilter, meshtastic_NodeFilter, AUTO)\n\n\nPB_BIND(meshtastic_NodeHighlight, meshtastic_NodeHighlight, AUTO)\n\n\nPB_BIND(meshtastic_GeoPoint, meshtastic_GeoPoint, AUTO)\n\n\nPB_BIND(meshtastic_Map, meshtastic_Map, AUTO)\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/device_ui.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_DEVICE_UI_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_DEVICE_UI_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\ntypedef enum _meshtastic_CompassMode {\n    /* Compass with dynamic ring and heading */\n    meshtastic_CompassMode_DYNAMIC = 0,\n    /* Compass with fixed ring and heading */\n    meshtastic_CompassMode_FIXED_RING = 1,\n    /* Compass with heading and freeze option */\n    meshtastic_CompassMode_FREEZE_HEADING = 2\n} meshtastic_CompassMode;\n\ntypedef enum _meshtastic_Theme {\n    /* Dark */\n    meshtastic_Theme_DARK = 0,\n    /* Light */\n    meshtastic_Theme_LIGHT = 1,\n    /* Red */\n    meshtastic_Theme_RED = 2\n} meshtastic_Theme;\n\n/* Localization */\ntypedef enum _meshtastic_Language {\n    /* English */\n    meshtastic_Language_ENGLISH = 0,\n    /* French */\n    meshtastic_Language_FRENCH = 1,\n    /* German */\n    meshtastic_Language_GERMAN = 2,\n    /* Italian */\n    meshtastic_Language_ITALIAN = 3,\n    /* Portuguese */\n    meshtastic_Language_PORTUGUESE = 4,\n    /* Spanish */\n    meshtastic_Language_SPANISH = 5,\n    /* Swedish */\n    meshtastic_Language_SWEDISH = 6,\n    /* Finnish */\n    meshtastic_Language_FINNISH = 7,\n    /* Polish */\n    meshtastic_Language_POLISH = 8,\n    /* Turkish */\n    meshtastic_Language_TURKISH = 9,\n    /* Serbian */\n    meshtastic_Language_SERBIAN = 10,\n    /* Russian */\n    meshtastic_Language_RUSSIAN = 11,\n    /* Dutch */\n    meshtastic_Language_DUTCH = 12,\n    /* Greek */\n    meshtastic_Language_GREEK = 13,\n    /* Norwegian */\n    meshtastic_Language_NORWEGIAN = 14,\n    /* Slovenian */\n    meshtastic_Language_SLOVENIAN = 15,\n    /* Ukrainian */\n    meshtastic_Language_UKRAINIAN = 16,\n    /* Bulgarian */\n    meshtastic_Language_BULGARIAN = 17,\n    /* Czech */\n    meshtastic_Language_CZECH = 18,\n    /* Danish */\n    meshtastic_Language_DANISH = 19,\n    /* Simplified Chinese (experimental) */\n    meshtastic_Language_SIMPLIFIED_CHINESE = 30,\n    /* Traditional Chinese (experimental) */\n    meshtastic_Language_TRADITIONAL_CHINESE = 31\n} meshtastic_Language;\n\n/* How the GPS coordinates are displayed on the OLED screen. */\ntypedef enum _meshtastic_DeviceUIConfig_GpsCoordinateFormat {\n    /* GPS coordinates are displayed in the normal decimal degrees format:\n DD.DDDDDD DDD.DDDDDD */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat_DEC = 0,\n    /* GPS coordinates are displayed in the degrees minutes seconds format:\n DD°MM'SS\"C DDD°MM'SS\"C, where C is the compass point representing the locations quadrant */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat_DMS = 1,\n    /* Universal Transverse Mercator format:\n ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat_UTM = 2,\n    /* Military Grid Reference System format:\n ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square,\n E is easting, N is northing */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat_MGRS = 3,\n    /* Open Location Code (aka Plus Codes). */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat_OLC = 4,\n    /* Ordnance Survey Grid Reference (the National Grid System of the UK).\n Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square,\n E is the easting, N is the northing */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat_OSGR = 5,\n    /* Maidenhead Locator System\n Described here: https://en.wikipedia.org/wiki/Maidenhead_Locator_System */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS = 6\n} meshtastic_DeviceUIConfig_GpsCoordinateFormat;\n\n/* Struct definitions */\ntypedef struct _meshtastic_NodeFilter {\n    /* Filter unknown nodes */\n    bool unknown_switch;\n    /* Filter offline nodes */\n    bool offline_switch;\n    /* Filter nodes w/o public key */\n    bool public_key_switch;\n    /* Filter based on hops away */\n    int8_t hops_away;\n    /* Filter nodes w/o position */\n    bool position_switch;\n    /* Filter nodes by matching name string */\n    char node_name[16];\n    /* Filter based on channel */\n    int8_t channel;\n} meshtastic_NodeFilter;\n\ntypedef struct _meshtastic_NodeHighlight {\n    /* Hightlight nodes w/ active chat */\n    bool chat_switch;\n    /* Highlight nodes w/ position */\n    bool position_switch;\n    /* Highlight nodes w/ telemetry data */\n    bool telemetry_switch;\n    /* Highlight nodes w/ iaq data */\n    bool iaq_switch;\n    /* Highlight nodes by matching name string */\n    char node_name[16];\n} meshtastic_NodeHighlight;\n\ntypedef struct _meshtastic_GeoPoint {\n    /* Zoom level */\n    int8_t zoom;\n    /* Coordinate: latitude */\n    int32_t latitude;\n    /* Coordinate: longitude */\n    int32_t longitude;\n} meshtastic_GeoPoint;\n\ntypedef struct _meshtastic_Map {\n    /* Home coordinates */\n    bool has_home;\n    meshtastic_GeoPoint home;\n    /* Map tile style */\n    char style[20];\n    /* Map scroll follows GPS */\n    bool follow_gps;\n} meshtastic_Map;\n\ntypedef PB_BYTES_ARRAY_T(16) meshtastic_DeviceUIConfig_calibration_data_t;\ntypedef struct _meshtastic_DeviceUIConfig {\n    /* A version integer used to invalidate saved files when we make incompatible changes. */\n    uint32_t version;\n    /* TFT display brightness 1..255 */\n    uint8_t screen_brightness;\n    /* Screen timeout 0..900 */\n    uint16_t screen_timeout;\n    /* Screen/Settings lock enabled */\n    bool screen_lock;\n    bool settings_lock;\n    uint32_t pin_code;\n    /* Color theme */\n    meshtastic_Theme theme;\n    /* Audible message, banner and ring tone */\n    bool alert_enabled;\n    bool banner_enabled;\n    uint8_t ring_tone_id;\n    /* Localization */\n    meshtastic_Language language;\n    /* Node list filter */\n    bool has_node_filter;\n    meshtastic_NodeFilter node_filter;\n    /* Node list highlightening */\n    bool has_node_highlight;\n    meshtastic_NodeHighlight node_highlight;\n    /* 8 integers for screen calibration data */\n    meshtastic_DeviceUIConfig_calibration_data_t calibration_data;\n    /* Map related data */\n    bool has_map_data;\n    meshtastic_Map map_data;\n    /* Compass mode */\n    meshtastic_CompassMode compass_mode;\n    /* RGB color for BaseUI\n 0xRRGGBB format, e.g. 0xFF0000 for red */\n    uint32_t screen_rgb_color;\n    /* Clockface analog style\n true for analog clockface, false for digital clockface */\n    bool is_clockface_analog;\n    /* How the GPS coordinates are formatted on the OLED screen. */\n    meshtastic_DeviceUIConfig_GpsCoordinateFormat gps_format;\n} meshtastic_DeviceUIConfig;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_CompassMode_MIN meshtastic_CompassMode_DYNAMIC\n#define _meshtastic_CompassMode_MAX meshtastic_CompassMode_FREEZE_HEADING\n#define _meshtastic_CompassMode_ARRAYSIZE ((meshtastic_CompassMode)(meshtastic_CompassMode_FREEZE_HEADING+1))\n\n#define _meshtastic_Theme_MIN meshtastic_Theme_DARK\n#define _meshtastic_Theme_MAX meshtastic_Theme_RED\n#define _meshtastic_Theme_ARRAYSIZE ((meshtastic_Theme)(meshtastic_Theme_RED+1))\n\n#define _meshtastic_Language_MIN meshtastic_Language_ENGLISH\n#define _meshtastic_Language_MAX meshtastic_Language_TRADITIONAL_CHINESE\n#define _meshtastic_Language_ARRAYSIZE ((meshtastic_Language)(meshtastic_Language_TRADITIONAL_CHINESE+1))\n\n#define _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MIN meshtastic_DeviceUIConfig_GpsCoordinateFormat_DEC\n#define _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MAX meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS\n#define _meshtastic_DeviceUIConfig_GpsCoordinateFormat_ARRAYSIZE ((meshtastic_DeviceUIConfig_GpsCoordinateFormat)(meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS+1))\n\n#define meshtastic_DeviceUIConfig_theme_ENUMTYPE meshtastic_Theme\n#define meshtastic_DeviceUIConfig_language_ENUMTYPE meshtastic_Language\n#define meshtastic_DeviceUIConfig_compass_mode_ENUMTYPE meshtastic_CompassMode\n#define meshtastic_DeviceUIConfig_gps_format_ENUMTYPE meshtastic_DeviceUIConfig_GpsCoordinateFormat\n\n\n\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_DeviceUIConfig_init_default   {0, 0, 0, 0, 0, 0, _meshtastic_Theme_MIN, 0, 0, 0, _meshtastic_Language_MIN, false, meshtastic_NodeFilter_init_default, false, meshtastic_NodeHighlight_init_default, {0, {0}}, false, meshtastic_Map_init_default, _meshtastic_CompassMode_MIN, 0, 0, _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MIN}\n#define meshtastic_NodeFilter_init_default       {0, 0, 0, 0, 0, \"\", 0}\n#define meshtastic_NodeHighlight_init_default    {0, 0, 0, 0, \"\"}\n#define meshtastic_GeoPoint_init_default         {0, 0, 0}\n#define meshtastic_Map_init_default              {false, meshtastic_GeoPoint_init_default, \"\", 0}\n#define meshtastic_DeviceUIConfig_init_zero      {0, 0, 0, 0, 0, 0, _meshtastic_Theme_MIN, 0, 0, 0, _meshtastic_Language_MIN, false, meshtastic_NodeFilter_init_zero, false, meshtastic_NodeHighlight_init_zero, {0, {0}}, false, meshtastic_Map_init_zero, _meshtastic_CompassMode_MIN, 0, 0, _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MIN}\n#define meshtastic_NodeFilter_init_zero          {0, 0, 0, 0, 0, \"\", 0}\n#define meshtastic_NodeHighlight_init_zero       {0, 0, 0, 0, \"\"}\n#define meshtastic_GeoPoint_init_zero            {0, 0, 0}\n#define meshtastic_Map_init_zero                 {false, meshtastic_GeoPoint_init_zero, \"\", 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_NodeFilter_unknown_switch_tag 1\n#define meshtastic_NodeFilter_offline_switch_tag 2\n#define meshtastic_NodeFilter_public_key_switch_tag 3\n#define meshtastic_NodeFilter_hops_away_tag      4\n#define meshtastic_NodeFilter_position_switch_tag 5\n#define meshtastic_NodeFilter_node_name_tag      6\n#define meshtastic_NodeFilter_channel_tag        7\n#define meshtastic_NodeHighlight_chat_switch_tag 1\n#define meshtastic_NodeHighlight_position_switch_tag 2\n#define meshtastic_NodeHighlight_telemetry_switch_tag 3\n#define meshtastic_NodeHighlight_iaq_switch_tag  4\n#define meshtastic_NodeHighlight_node_name_tag   5\n#define meshtastic_GeoPoint_zoom_tag             1\n#define meshtastic_GeoPoint_latitude_tag         2\n#define meshtastic_GeoPoint_longitude_tag        3\n#define meshtastic_Map_home_tag                  1\n#define meshtastic_Map_style_tag                 2\n#define meshtastic_Map_follow_gps_tag            3\n#define meshtastic_DeviceUIConfig_version_tag    1\n#define meshtastic_DeviceUIConfig_screen_brightness_tag 2\n#define meshtastic_DeviceUIConfig_screen_timeout_tag 3\n#define meshtastic_DeviceUIConfig_screen_lock_tag 4\n#define meshtastic_DeviceUIConfig_settings_lock_tag 5\n#define meshtastic_DeviceUIConfig_pin_code_tag   6\n#define meshtastic_DeviceUIConfig_theme_tag      7\n#define meshtastic_DeviceUIConfig_alert_enabled_tag 8\n#define meshtastic_DeviceUIConfig_banner_enabled_tag 9\n#define meshtastic_DeviceUIConfig_ring_tone_id_tag 10\n#define meshtastic_DeviceUIConfig_language_tag   11\n#define meshtastic_DeviceUIConfig_node_filter_tag 12\n#define meshtastic_DeviceUIConfig_node_highlight_tag 13\n#define meshtastic_DeviceUIConfig_calibration_data_tag 14\n#define meshtastic_DeviceUIConfig_map_data_tag   15\n#define meshtastic_DeviceUIConfig_compass_mode_tag 16\n#define meshtastic_DeviceUIConfig_screen_rgb_color_tag 17\n#define meshtastic_DeviceUIConfig_is_clockface_analog_tag 18\n#define meshtastic_DeviceUIConfig_gps_format_tag 19\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_DeviceUIConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   version,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   screen_brightness,   2) \\\nX(a, STATIC,   SINGULAR, UINT32,   screen_timeout,    3) \\\nX(a, STATIC,   SINGULAR, BOOL,     screen_lock,       4) \\\nX(a, STATIC,   SINGULAR, BOOL,     settings_lock,     5) \\\nX(a, STATIC,   SINGULAR, UINT32,   pin_code,          6) \\\nX(a, STATIC,   SINGULAR, UENUM,    theme,             7) \\\nX(a, STATIC,   SINGULAR, BOOL,     alert_enabled,     8) \\\nX(a, STATIC,   SINGULAR, BOOL,     banner_enabled,    9) \\\nX(a, STATIC,   SINGULAR, UINT32,   ring_tone_id,     10) \\\nX(a, STATIC,   SINGULAR, UENUM,    language,         11) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  node_filter,      12) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  node_highlight,   13) \\\nX(a, STATIC,   SINGULAR, BYTES,    calibration_data,  14) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  map_data,         15) \\\nX(a, STATIC,   SINGULAR, UENUM,    compass_mode,     16) \\\nX(a, STATIC,   SINGULAR, UINT32,   screen_rgb_color,  17) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_clockface_analog,  18) \\\nX(a, STATIC,   SINGULAR, UENUM,    gps_format,       19)\n#define meshtastic_DeviceUIConfig_CALLBACK NULL\n#define meshtastic_DeviceUIConfig_DEFAULT NULL\n#define meshtastic_DeviceUIConfig_node_filter_MSGTYPE meshtastic_NodeFilter\n#define meshtastic_DeviceUIConfig_node_highlight_MSGTYPE meshtastic_NodeHighlight\n#define meshtastic_DeviceUIConfig_map_data_MSGTYPE meshtastic_Map\n\n#define meshtastic_NodeFilter_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     unknown_switch,    1) \\\nX(a, STATIC,   SINGULAR, BOOL,     offline_switch,    2) \\\nX(a, STATIC,   SINGULAR, BOOL,     public_key_switch,   3) \\\nX(a, STATIC,   SINGULAR, INT32,    hops_away,         4) \\\nX(a, STATIC,   SINGULAR, BOOL,     position_switch,   5) \\\nX(a, STATIC,   SINGULAR, STRING,   node_name,         6) \\\nX(a, STATIC,   SINGULAR, INT32,    channel,           7)\n#define meshtastic_NodeFilter_CALLBACK NULL\n#define meshtastic_NodeFilter_DEFAULT NULL\n\n#define meshtastic_NodeHighlight_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     chat_switch,       1) \\\nX(a, STATIC,   SINGULAR, BOOL,     position_switch,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     telemetry_switch,   3) \\\nX(a, STATIC,   SINGULAR, BOOL,     iaq_switch,        4) \\\nX(a, STATIC,   SINGULAR, STRING,   node_name,         5)\n#define meshtastic_NodeHighlight_CALLBACK NULL\n#define meshtastic_NodeHighlight_DEFAULT NULL\n\n#define meshtastic_GeoPoint_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, INT32,    zoom,              1) \\\nX(a, STATIC,   SINGULAR, INT32,    latitude,          2) \\\nX(a, STATIC,   SINGULAR, INT32,    longitude,         3)\n#define meshtastic_GeoPoint_CALLBACK NULL\n#define meshtastic_GeoPoint_DEFAULT NULL\n\n#define meshtastic_Map_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  home,              1) \\\nX(a, STATIC,   SINGULAR, STRING,   style,             2) \\\nX(a, STATIC,   SINGULAR, BOOL,     follow_gps,        3)\n#define meshtastic_Map_CALLBACK NULL\n#define meshtastic_Map_DEFAULT NULL\n#define meshtastic_Map_home_MSGTYPE meshtastic_GeoPoint\n\nextern const pb_msgdesc_t meshtastic_DeviceUIConfig_msg;\nextern const pb_msgdesc_t meshtastic_NodeFilter_msg;\nextern const pb_msgdesc_t meshtastic_NodeHighlight_msg;\nextern const pb_msgdesc_t meshtastic_GeoPoint_msg;\nextern const pb_msgdesc_t meshtastic_Map_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_DeviceUIConfig_fields &meshtastic_DeviceUIConfig_msg\n#define meshtastic_NodeFilter_fields &meshtastic_NodeFilter_msg\n#define meshtastic_NodeHighlight_fields &meshtastic_NodeHighlight_msg\n#define meshtastic_GeoPoint_fields &meshtastic_GeoPoint_msg\n#define meshtastic_Map_fields &meshtastic_Map_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_DEVICE_UI_PB_H_MAX_SIZE meshtastic_DeviceUIConfig_size\n#define meshtastic_DeviceUIConfig_size           204\n#define meshtastic_GeoPoint_size                 33\n#define meshtastic_Map_size                      58\n#define meshtastic_NodeFilter_size               47\n#define meshtastic_NodeHighlight_size            25\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/deviceonly.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/deviceonly.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_PositionLite, meshtastic_PositionLite, AUTO)\n\n\nPB_BIND(meshtastic_UserLite, meshtastic_UserLite, AUTO)\n\n\nPB_BIND(meshtastic_NodeInfoLite, meshtastic_NodeInfoLite, AUTO)\n\n\nPB_BIND(meshtastic_DeviceState, meshtastic_DeviceState, 2)\n\n\nPB_BIND(meshtastic_NodeDatabase, meshtastic_NodeDatabase, AUTO)\n\n\nPB_BIND(meshtastic_ChannelFile, meshtastic_ChannelFile, 2)\n\n\nPB_BIND(meshtastic_BackupPreferences, meshtastic_BackupPreferences, 2)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/deviceonly.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED\n#include <pb.h>\n#include <vector>\n#include \"meshtastic/channel.pb.h\"\n#include \"meshtastic/config.pb.h\"\n#include \"meshtastic/localonly.pb.h\"\n#include \"meshtastic/mesh.pb.h\"\n#include \"meshtastic/telemetry.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* Position with static location information only for NodeDBLite */\ntypedef struct _meshtastic_PositionLite {\n    /* The new preferred location encoding, multiply by 1e-7 to get degrees\n in floating point */\n    int32_t latitude_i;\n    /* TODO: REPLACE */\n    int32_t longitude_i;\n    /* In meters above MSL (but see issue #359) */\n    int32_t altitude;\n    /* This is usually not sent over the mesh (to save space), but it is sent\n from the phone so that the local device can set its RTC If it is sent over\n the mesh (because there are devices on the mesh without GPS), it will only\n be sent by devices which has a hardware GPS clock.\n seconds since 1970 */\n    uint32_t time;\n    /* TODO: REPLACE */\n    meshtastic_Position_LocSource location_source;\n} meshtastic_PositionLite;\n\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_UserLite_public_key_t;\ntypedef struct _meshtastic_UserLite {\n    /* This is the addr of the radio. */\n    pb_byte_t macaddr[6];\n    /* A full name for this user, i.e. \"Kevin Hester\" */\n    char long_name[40];\n    /* A VERY short name, ideally two characters.\n Suitable for a tiny OLED screen */\n    char short_name[5];\n    /* TBEAM, HELTEC, etc...\n Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.\n Apps will still need the string here for older builds\n (so OTA update can find the right image), but if the enum is available it will be used instead. */\n    meshtastic_HardwareModel hw_model;\n    /* In some regions Ham radio operators have different bandwidth limitations than others.\n If this user is a licensed operator, set this flag.\n Also, \"long_name\" should be their licence number. */\n    bool is_licensed;\n    /* Indicates that the user's role in the mesh */\n    meshtastic_Config_DeviceConfig_Role role;\n    /* The public key of the user's device.\n This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */\n    meshtastic_UserLite_public_key_t public_key;\n    /* Whether or not the node can be messaged */\n    bool has_is_unmessagable;\n    bool is_unmessagable;\n} meshtastic_UserLite;\n\ntypedef struct _meshtastic_NodeInfoLite {\n    /* The node number */\n    uint32_t num;\n    /* The user info for this node */\n    bool has_user;\n    meshtastic_UserLite user;\n    /* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.\n Position.time now indicates the last time we received a POSITION from that node. */\n    bool has_position;\n    meshtastic_PositionLite position;\n    /* Returns the Signal-to-noise ratio (SNR) of the last received message,\n as measured by the receiver. Return SNR of the last received message in dB */\n    float snr;\n    /* Set to indicate the last time we received a packet from this node */\n    uint32_t last_heard;\n    /* The latest device metrics for the node. */\n    bool has_device_metrics;\n    meshtastic_DeviceMetrics device_metrics;\n    /* local channel index we heard that node on. Only populated if its not the default channel. */\n    uint8_t channel;\n    /* True if we witnessed the node over MQTT instead of LoRA transport */\n    bool via_mqtt;\n    /* Number of hops away from us this node is (0 if direct neighbor) */\n    bool has_hops_away;\n    uint8_t hops_away;\n    /* True if node is in our favorites list\n Persists between NodeDB internal clean ups */\n    bool is_favorite;\n    /* True if node is in our ignored list\n Persists between NodeDB internal clean ups */\n    bool is_ignored;\n    /* Last byte of the node number of the node that should be used as the next hop to reach this node. */\n    uint8_t next_hop;\n    /* Bitfield for storing booleans.\n LSB 0 is_key_manually_verified\n LSB 1 is_muted */\n    uint32_t bitfield;\n} meshtastic_NodeInfoLite;\n\n/* This message is never sent over the wire, but it is used for serializing DB\n state to flash in the device code\n FIXME, since we write this each time we enter deep sleep (and have infinite\n flash) it would be better to use some sort of append only data structure for\n the receive queue and use the preferences store for the other stuff */\ntypedef struct _meshtastic_DeviceState {\n    /* Read only settings/info about this node */\n    bool has_my_node;\n    meshtastic_MyNodeInfo my_node;\n    /* My owner info */\n    bool has_owner;\n    meshtastic_User owner;\n    /* Received packets saved for delivery to the phone */\n    pb_size_t receive_queue_count;\n    meshtastic_MeshPacket receive_queue[1];\n    /* We keep the last received text message (only) stored in the device flash,\n so we can show it on the screen.\n Might be null */\n    bool has_rx_text_message;\n    meshtastic_MeshPacket rx_text_message;\n    /* A version integer used to invalidate old save files when we make\n incompatible changes This integer is set at build time and is private to\n NodeDB.cpp in the device code. */\n    uint32_t version;\n    /* Used only during development.\n Indicates developer is testing and changes should never be saved to flash.\n Deprecated in 2.3.1 */\n    bool no_save;\n    /* Previously used to manage GPS factory resets.\n Deprecated in 2.5.23 */\n    bool did_gps_reset;\n    /* We keep the last received waypoint stored in the device flash,\n so we can show it on the screen.\n Might be null */\n    bool has_rx_waypoint;\n    meshtastic_MeshPacket rx_waypoint;\n    /* The mesh's nodes with their available gpio pins for RemoteHardware module */\n    pb_size_t node_remote_hardware_pins_count;\n    meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[12];\n} meshtastic_DeviceState;\n\ntypedef struct _meshtastic_NodeDatabase {\n    /* A version integer used to invalidate old save files when we make\n incompatible changes This integer is set at build time and is private to\n NodeDB.cpp in the device code. */\n    uint32_t version;\n    /* New lite version of NodeDB to decrease memory footprint */\n    std::vector<meshtastic_NodeInfoLite> nodes;\n} meshtastic_NodeDatabase;\n\n/* The on-disk saved channels */\ntypedef struct _meshtastic_ChannelFile {\n    /* The channels our node knows about */\n    pb_size_t channels_count;\n    meshtastic_Channel channels[8];\n    /* A version integer used to invalidate old save files when we make\n incompatible changes This integer is set at build time and is private to\n NodeDB.cpp in the device code. */\n    uint32_t version;\n} meshtastic_ChannelFile;\n\n/* The on-disk backup of the node's preferences */\ntypedef struct _meshtastic_BackupPreferences {\n    /* The version of the backup */\n    uint32_t version;\n    /* The timestamp of the backup (if node has time) */\n    uint32_t timestamp;\n    /* The node's configuration */\n    bool has_config;\n    meshtastic_LocalConfig config;\n    /* The node's module configuration */\n    bool has_module_config;\n    meshtastic_LocalModuleConfig module_config;\n    /* The node's channels */\n    bool has_channels;\n    meshtastic_ChannelFile channels;\n    /* The node's user (owner) information */\n    bool has_owner;\n    meshtastic_User owner;\n} meshtastic_BackupPreferences;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_PositionLite_init_default     {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}\n#define meshtastic_UserLite_init_default         {{0}, \"\", \"\", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}, false, 0}\n#define meshtastic_NodeInfoLite_init_default     {0, false, meshtastic_UserLite_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0, 0, 0}\n#define meshtastic_DeviceState_init_default      {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_MeshPacket_init_default}, false, meshtastic_MeshPacket_init_default, 0, 0, 0, false, meshtastic_MeshPacket_init_default, 0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}}\n#define meshtastic_NodeDatabase_init_default     {0, {0}}\n#define meshtastic_ChannelFile_init_default      {0, {meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default}, 0}\n#define meshtastic_BackupPreferences_init_default {0, 0, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default, false, meshtastic_ChannelFile_init_default, false, meshtastic_User_init_default}\n#define meshtastic_PositionLite_init_zero        {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}\n#define meshtastic_UserLite_init_zero            {{0}, \"\", \"\", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}, false, 0}\n#define meshtastic_NodeInfoLite_init_zero        {0, false, meshtastic_UserLite_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0, 0, 0}\n#define meshtastic_DeviceState_init_zero         {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_MeshPacket_init_zero}, false, meshtastic_MeshPacket_init_zero, 0, 0, 0, false, meshtastic_MeshPacket_init_zero, 0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}}\n#define meshtastic_NodeDatabase_init_zero        {0, {0}}\n#define meshtastic_ChannelFile_init_zero         {0, {meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero}, 0}\n#define meshtastic_BackupPreferences_init_zero   {0, 0, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero, false, meshtastic_ChannelFile_init_zero, false, meshtastic_User_init_zero}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_PositionLite_latitude_i_tag   1\n#define meshtastic_PositionLite_longitude_i_tag  2\n#define meshtastic_PositionLite_altitude_tag     3\n#define meshtastic_PositionLite_time_tag         4\n#define meshtastic_PositionLite_location_source_tag 5\n#define meshtastic_UserLite_macaddr_tag          1\n#define meshtastic_UserLite_long_name_tag        2\n#define meshtastic_UserLite_short_name_tag       3\n#define meshtastic_UserLite_hw_model_tag         4\n#define meshtastic_UserLite_is_licensed_tag      5\n#define meshtastic_UserLite_role_tag             6\n#define meshtastic_UserLite_public_key_tag       7\n#define meshtastic_UserLite_is_unmessagable_tag  9\n#define meshtastic_NodeInfoLite_num_tag          1\n#define meshtastic_NodeInfoLite_user_tag         2\n#define meshtastic_NodeInfoLite_position_tag     3\n#define meshtastic_NodeInfoLite_snr_tag          4\n#define meshtastic_NodeInfoLite_last_heard_tag   5\n#define meshtastic_NodeInfoLite_device_metrics_tag 6\n#define meshtastic_NodeInfoLite_channel_tag      7\n#define meshtastic_NodeInfoLite_via_mqtt_tag     8\n#define meshtastic_NodeInfoLite_hops_away_tag    9\n#define meshtastic_NodeInfoLite_is_favorite_tag  10\n#define meshtastic_NodeInfoLite_is_ignored_tag   11\n#define meshtastic_NodeInfoLite_next_hop_tag     12\n#define meshtastic_NodeInfoLite_bitfield_tag     13\n#define meshtastic_DeviceState_my_node_tag       2\n#define meshtastic_DeviceState_owner_tag         3\n#define meshtastic_DeviceState_receive_queue_tag 5\n#define meshtastic_DeviceState_rx_text_message_tag 7\n#define meshtastic_DeviceState_version_tag       8\n#define meshtastic_DeviceState_no_save_tag       9\n#define meshtastic_DeviceState_did_gps_reset_tag 11\n#define meshtastic_DeviceState_rx_waypoint_tag   12\n#define meshtastic_DeviceState_node_remote_hardware_pins_tag 13\n#define meshtastic_NodeDatabase_version_tag      1\n#define meshtastic_NodeDatabase_nodes_tag        2\n#define meshtastic_ChannelFile_channels_tag      1\n#define meshtastic_ChannelFile_version_tag       2\n#define meshtastic_BackupPreferences_version_tag 1\n#define meshtastic_BackupPreferences_timestamp_tag 2\n#define meshtastic_BackupPreferences_config_tag  3\n#define meshtastic_BackupPreferences_module_config_tag 4\n#define meshtastic_BackupPreferences_channels_tag 5\n#define meshtastic_BackupPreferences_owner_tag   6\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_PositionLite_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, SFIXED32, latitude_i,        1) \\\nX(a, STATIC,   SINGULAR, SFIXED32, longitude_i,       2) \\\nX(a, STATIC,   SINGULAR, INT32,    altitude,          3) \\\nX(a, STATIC,   SINGULAR, FIXED32,  time,              4) \\\nX(a, STATIC,   SINGULAR, UENUM,    location_source,   5)\n#define meshtastic_PositionLite_CALLBACK NULL\n#define meshtastic_PositionLite_DEFAULT NULL\n\n#define meshtastic_UserLite_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, FIXED_LENGTH_BYTES, macaddr,           1) \\\nX(a, STATIC,   SINGULAR, STRING,   long_name,         2) \\\nX(a, STATIC,   SINGULAR, STRING,   short_name,        3) \\\nX(a, STATIC,   SINGULAR, UENUM,    hw_model,          4) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_licensed,       5) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              6) \\\nX(a, STATIC,   SINGULAR, BYTES,    public_key,        7) \\\nX(a, STATIC,   OPTIONAL, BOOL,     is_unmessagable,   9)\n#define meshtastic_UserLite_CALLBACK NULL\n#define meshtastic_UserLite_DEFAULT NULL\n\n#define meshtastic_NodeInfoLite_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   num,               1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  user,              2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  position,          3) \\\nX(a, STATIC,   SINGULAR, FLOAT,    snr,               4) \\\nX(a, STATIC,   SINGULAR, FIXED32,  last_heard,        5) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  device_metrics,    6) \\\nX(a, STATIC,   SINGULAR, UINT32,   channel,           7) \\\nX(a, STATIC,   SINGULAR, BOOL,     via_mqtt,          8) \\\nX(a, STATIC,   OPTIONAL, UINT32,   hops_away,         9) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_favorite,      10) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_ignored,       11) \\\nX(a, STATIC,   SINGULAR, UINT32,   next_hop,         12) \\\nX(a, STATIC,   SINGULAR, UINT32,   bitfield,         13)\n#define meshtastic_NodeInfoLite_CALLBACK NULL\n#define meshtastic_NodeInfoLite_DEFAULT NULL\n#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_UserLite\n#define meshtastic_NodeInfoLite_position_MSGTYPE meshtastic_PositionLite\n#define meshtastic_NodeInfoLite_device_metrics_MSGTYPE meshtastic_DeviceMetrics\n\n#define meshtastic_DeviceState_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  my_node,           2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  owner,             3) \\\nX(a, STATIC,   REPEATED, MESSAGE,  receive_queue,     5) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  rx_text_message,   7) \\\nX(a, STATIC,   SINGULAR, UINT32,   version,           8) \\\nX(a, STATIC,   SINGULAR, BOOL,     no_save,           9) \\\nX(a, STATIC,   SINGULAR, BOOL,     did_gps_reset,    11) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  rx_waypoint,      12) \\\nX(a, STATIC,   REPEATED, MESSAGE,  node_remote_hardware_pins,  13)\n#define meshtastic_DeviceState_CALLBACK NULL\n#define meshtastic_DeviceState_DEFAULT NULL\n#define meshtastic_DeviceState_my_node_MSGTYPE meshtastic_MyNodeInfo\n#define meshtastic_DeviceState_owner_MSGTYPE meshtastic_User\n#define meshtastic_DeviceState_receive_queue_MSGTYPE meshtastic_MeshPacket\n#define meshtastic_DeviceState_rx_text_message_MSGTYPE meshtastic_MeshPacket\n#define meshtastic_DeviceState_rx_waypoint_MSGTYPE meshtastic_MeshPacket\n#define meshtastic_DeviceState_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin\n\n#define meshtastic_NodeDatabase_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   version,           1) \\\nX(a, CALLBACK, REPEATED, MESSAGE,  nodes,             2)\nextern bool meshtastic_NodeDatabase_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field);\n#define meshtastic_NodeDatabase_CALLBACK meshtastic_NodeDatabase_callback\n#define meshtastic_NodeDatabase_DEFAULT NULL\n#define meshtastic_NodeDatabase_nodes_MSGTYPE meshtastic_NodeInfoLite\n\n#define meshtastic_ChannelFile_FIELDLIST(X, a) \\\nX(a, STATIC,   REPEATED, MESSAGE,  channels,          1) \\\nX(a, STATIC,   SINGULAR, UINT32,   version,           2)\n#define meshtastic_ChannelFile_CALLBACK NULL\n#define meshtastic_ChannelFile_DEFAULT NULL\n#define meshtastic_ChannelFile_channels_MSGTYPE meshtastic_Channel\n\n#define meshtastic_BackupPreferences_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   version,           1) \\\nX(a, STATIC,   SINGULAR, FIXED32,  timestamp,         2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  config,            3) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  module_config,     4) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  channels,          5) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  owner,             6)\n#define meshtastic_BackupPreferences_CALLBACK NULL\n#define meshtastic_BackupPreferences_DEFAULT NULL\n#define meshtastic_BackupPreferences_config_MSGTYPE meshtastic_LocalConfig\n#define meshtastic_BackupPreferences_module_config_MSGTYPE meshtastic_LocalModuleConfig\n#define meshtastic_BackupPreferences_channels_MSGTYPE meshtastic_ChannelFile\n#define meshtastic_BackupPreferences_owner_MSGTYPE meshtastic_User\n\nextern const pb_msgdesc_t meshtastic_PositionLite_msg;\nextern const pb_msgdesc_t meshtastic_UserLite_msg;\nextern const pb_msgdesc_t meshtastic_NodeInfoLite_msg;\nextern const pb_msgdesc_t meshtastic_DeviceState_msg;\nextern const pb_msgdesc_t meshtastic_NodeDatabase_msg;\nextern const pb_msgdesc_t meshtastic_ChannelFile_msg;\nextern const pb_msgdesc_t meshtastic_BackupPreferences_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_PositionLite_fields &meshtastic_PositionLite_msg\n#define meshtastic_UserLite_fields &meshtastic_UserLite_msg\n#define meshtastic_NodeInfoLite_fields &meshtastic_NodeInfoLite_msg\n#define meshtastic_DeviceState_fields &meshtastic_DeviceState_msg\n#define meshtastic_NodeDatabase_fields &meshtastic_NodeDatabase_msg\n#define meshtastic_ChannelFile_fields &meshtastic_ChannelFile_msg\n#define meshtastic_BackupPreferences_fields &meshtastic_BackupPreferences_msg\n\n/* Maximum encoded size of messages (where known) */\n/* meshtastic_NodeDatabase_size depends on runtime parameters */\n#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_BackupPreferences_size\n#define meshtastic_BackupPreferences_size        2429\n#define meshtastic_ChannelFile_size              718\n#define meshtastic_DeviceState_size              1737\n#define meshtastic_NodeInfoLite_size             196\n#define meshtastic_PositionLite_size             28\n#define meshtastic_UserLite_size                 98\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/interdevice.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/interdevice.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_SensorData, meshtastic_SensorData, AUTO)\n\n\nPB_BIND(meshtastic_InterdeviceMessage, meshtastic_InterdeviceMessage, 2)\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/interdevice.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_INTERDEVICE_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_INTERDEVICE_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\ntypedef enum _meshtastic_MessageType {\n    meshtastic_MessageType_ACK = 0,\n    meshtastic_MessageType_COLLECT_INTERVAL = 160, /* in ms */\n    meshtastic_MessageType_BEEP_ON = 161, /* duration ms */\n    meshtastic_MessageType_BEEP_OFF = 162, /* cancel prematurely */\n    meshtastic_MessageType_SHUTDOWN = 163,\n    meshtastic_MessageType_POWER_ON = 164,\n    meshtastic_MessageType_SCD41_TEMP = 176,\n    meshtastic_MessageType_SCD41_HUMIDITY = 177,\n    meshtastic_MessageType_SCD41_CO2 = 178,\n    meshtastic_MessageType_AHT20_TEMP = 179,\n    meshtastic_MessageType_AHT20_HUMIDITY = 180,\n    meshtastic_MessageType_TVOC_INDEX = 181\n} meshtastic_MessageType;\n\n/* Struct definitions */\ntypedef struct _meshtastic_SensorData {\n    /* The message type */\n    meshtastic_MessageType type;\n    pb_size_t which_data;\n    union {\n        float float_value;\n        uint32_t uint32_value;\n    } data;\n} meshtastic_SensorData;\n\ntypedef struct _meshtastic_InterdeviceMessage {\n    pb_size_t which_data;\n    union {\n        char nmea[1024];\n        meshtastic_SensorData sensor;\n    } data;\n} meshtastic_InterdeviceMessage;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_MessageType_MIN meshtastic_MessageType_ACK\n#define _meshtastic_MessageType_MAX meshtastic_MessageType_TVOC_INDEX\n#define _meshtastic_MessageType_ARRAYSIZE ((meshtastic_MessageType)(meshtastic_MessageType_TVOC_INDEX+1))\n\n#define meshtastic_SensorData_type_ENUMTYPE meshtastic_MessageType\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_SensorData_init_default       {_meshtastic_MessageType_MIN, 0, {0}}\n#define meshtastic_InterdeviceMessage_init_default {0, {\"\"}}\n#define meshtastic_SensorData_init_zero          {_meshtastic_MessageType_MIN, 0, {0}}\n#define meshtastic_InterdeviceMessage_init_zero  {0, {\"\"}}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_SensorData_type_tag           1\n#define meshtastic_SensorData_float_value_tag    2\n#define meshtastic_SensorData_uint32_value_tag   3\n#define meshtastic_InterdeviceMessage_nmea_tag   1\n#define meshtastic_InterdeviceMessage_sensor_tag 2\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_SensorData_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    type,              1) \\\nX(a, STATIC,   ONEOF,    FLOAT,    (data,float_value,data.float_value),   2) \\\nX(a, STATIC,   ONEOF,    UINT32,   (data,uint32_value,data.uint32_value),   3)\n#define meshtastic_SensorData_CALLBACK NULL\n#define meshtastic_SensorData_DEFAULT NULL\n\n#define meshtastic_InterdeviceMessage_FIELDLIST(X, a) \\\nX(a, STATIC,   ONEOF,    STRING,   (data,nmea,data.nmea),   1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (data,sensor,data.sensor),   2)\n#define meshtastic_InterdeviceMessage_CALLBACK NULL\n#define meshtastic_InterdeviceMessage_DEFAULT NULL\n#define meshtastic_InterdeviceMessage_data_sensor_MSGTYPE meshtastic_SensorData\n\nextern const pb_msgdesc_t meshtastic_SensorData_msg;\nextern const pb_msgdesc_t meshtastic_InterdeviceMessage_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_SensorData_fields &meshtastic_SensorData_msg\n#define meshtastic_InterdeviceMessage_fields &meshtastic_InterdeviceMessage_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_INTERDEVICE_PB_H_MAX_SIZE meshtastic_InterdeviceMessage_size\n#define meshtastic_InterdeviceMessage_size       1026\n#define meshtastic_SensorData_size               9\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/localonly.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/localonly.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_LocalConfig, meshtastic_LocalConfig, 2)\n\n\nPB_BIND(meshtastic_LocalModuleConfig, meshtastic_LocalModuleConfig, 2)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/localonly.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/config.pb.h\"\n#include \"meshtastic/module_config.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\ntypedef struct _meshtastic_LocalConfig {\n    /* The part of the config that is specific to the Device */\n    bool has_device;\n    meshtastic_Config_DeviceConfig device;\n    /* The part of the config that is specific to the GPS Position */\n    bool has_position;\n    meshtastic_Config_PositionConfig position;\n    /* The part of the config that is specific to the Power settings */\n    bool has_power;\n    meshtastic_Config_PowerConfig power;\n    /* The part of the config that is specific to the Wifi Settings */\n    bool has_network;\n    meshtastic_Config_NetworkConfig network;\n    /* The part of the config that is specific to the Display */\n    bool has_display;\n    meshtastic_Config_DisplayConfig display;\n    /* The part of the config that is specific to the Lora Radio */\n    bool has_lora;\n    meshtastic_Config_LoRaConfig lora;\n    /* The part of the config that is specific to the Bluetooth settings */\n    bool has_bluetooth;\n    meshtastic_Config_BluetoothConfig bluetooth;\n    /* A version integer used to invalidate old save files when we make\n incompatible changes This integer is set at build time and is private to\n NodeDB.cpp in the device code. */\n    uint32_t version;\n    /* The part of the config that is specific to Security settings */\n    bool has_security;\n    meshtastic_Config_SecurityConfig security;\n} meshtastic_LocalConfig;\n\ntypedef struct _meshtastic_LocalModuleConfig {\n    /* The part of the config that is specific to the MQTT module */\n    bool has_mqtt;\n    meshtastic_ModuleConfig_MQTTConfig mqtt;\n    /* The part of the config that is specific to the Serial module */\n    bool has_serial;\n    meshtastic_ModuleConfig_SerialConfig serial;\n    /* The part of the config that is specific to the ExternalNotification module */\n    bool has_external_notification;\n    meshtastic_ModuleConfig_ExternalNotificationConfig external_notification;\n    /* The part of the config that is specific to the Store & Forward module */\n    bool has_store_forward;\n    meshtastic_ModuleConfig_StoreForwardConfig store_forward;\n    /* The part of the config that is specific to the RangeTest module */\n    bool has_range_test;\n    meshtastic_ModuleConfig_RangeTestConfig range_test;\n    /* The part of the config that is specific to the Telemetry module */\n    bool has_telemetry;\n    meshtastic_ModuleConfig_TelemetryConfig telemetry;\n    /* The part of the config that is specific to the Canned Message module */\n    bool has_canned_message;\n    meshtastic_ModuleConfig_CannedMessageConfig canned_message;\n    /* A version integer used to invalidate old save files when we make\n incompatible changes This integer is set at build time and is private to\n NodeDB.cpp in the device code. */\n    uint32_t version;\n    /* The part of the config that is specific to the Audio module */\n    bool has_audio;\n    meshtastic_ModuleConfig_AudioConfig audio;\n    /* The part of the config that is specific to the Remote Hardware module */\n    bool has_remote_hardware;\n    meshtastic_ModuleConfig_RemoteHardwareConfig remote_hardware;\n    /* The part of the config that is specific to the Neighbor Info module */\n    bool has_neighbor_info;\n    meshtastic_ModuleConfig_NeighborInfoConfig neighbor_info;\n    /* The part of the config that is specific to the Ambient Lighting module */\n    bool has_ambient_lighting;\n    meshtastic_ModuleConfig_AmbientLightingConfig ambient_lighting;\n    /* The part of the config that is specific to the Detection Sensor module */\n    bool has_detection_sensor;\n    meshtastic_ModuleConfig_DetectionSensorConfig detection_sensor;\n    /* Paxcounter Config */\n    bool has_paxcounter;\n    meshtastic_ModuleConfig_PaxcounterConfig paxcounter;\n    /* StatusMessage Config */\n    bool has_statusmessage;\n    meshtastic_ModuleConfig_StatusMessageConfig statusmessage;\n    /* The part of the config that is specific to the Traffic Management module */\n    bool has_traffic_management;\n    meshtastic_ModuleConfig_TrafficManagementConfig traffic_management;\n    /* TAK Config */\n    bool has_tak;\n    meshtastic_ModuleConfig_TAKConfig tak;\n} meshtastic_LocalModuleConfig;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_LocalConfig_init_default      {false, meshtastic_Config_DeviceConfig_init_default, false, meshtastic_Config_PositionConfig_init_default, false, meshtastic_Config_PowerConfig_init_default, false, meshtastic_Config_NetworkConfig_init_default, false, meshtastic_Config_DisplayConfig_init_default, false, meshtastic_Config_LoRaConfig_init_default, false, meshtastic_Config_BluetoothConfig_init_default, 0, false, meshtastic_Config_SecurityConfig_init_default}\n#define meshtastic_LocalModuleConfig_init_default {false, meshtastic_ModuleConfig_MQTTConfig_init_default, false, meshtastic_ModuleConfig_SerialConfig_init_default, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_default, false, meshtastic_ModuleConfig_StoreForwardConfig_init_default, false, meshtastic_ModuleConfig_RangeTestConfig_init_default, false, meshtastic_ModuleConfig_TelemetryConfig_init_default, false, meshtastic_ModuleConfig_CannedMessageConfig_init_default, 0, false, meshtastic_ModuleConfig_AudioConfig_init_default, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_default, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_default, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_default, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_default, false, meshtastic_ModuleConfig_PaxcounterConfig_init_default, false, meshtastic_ModuleConfig_StatusMessageConfig_init_default, false, meshtastic_ModuleConfig_TrafficManagementConfig_init_default, false, meshtastic_ModuleConfig_TAKConfig_init_default}\n#define meshtastic_LocalConfig_init_zero         {false, meshtastic_Config_DeviceConfig_init_zero, false, meshtastic_Config_PositionConfig_init_zero, false, meshtastic_Config_PowerConfig_init_zero, false, meshtastic_Config_NetworkConfig_init_zero, false, meshtastic_Config_DisplayConfig_init_zero, false, meshtastic_Config_LoRaConfig_init_zero, false, meshtastic_Config_BluetoothConfig_init_zero, 0, false, meshtastic_Config_SecurityConfig_init_zero}\n#define meshtastic_LocalModuleConfig_init_zero   {false, meshtastic_ModuleConfig_MQTTConfig_init_zero, false, meshtastic_ModuleConfig_SerialConfig_init_zero, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero, false, meshtastic_ModuleConfig_StoreForwardConfig_init_zero, false, meshtastic_ModuleConfig_RangeTestConfig_init_zero, false, meshtastic_ModuleConfig_TelemetryConfig_init_zero, false, meshtastic_ModuleConfig_CannedMessageConfig_init_zero, 0, false, meshtastic_ModuleConfig_AudioConfig_init_zero, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_zero, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_zero, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_zero, false, meshtastic_ModuleConfig_PaxcounterConfig_init_zero, false, meshtastic_ModuleConfig_StatusMessageConfig_init_zero, false, meshtastic_ModuleConfig_TrafficManagementConfig_init_zero, false, meshtastic_ModuleConfig_TAKConfig_init_zero}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_LocalConfig_device_tag        1\n#define meshtastic_LocalConfig_position_tag      2\n#define meshtastic_LocalConfig_power_tag         3\n#define meshtastic_LocalConfig_network_tag       4\n#define meshtastic_LocalConfig_display_tag       5\n#define meshtastic_LocalConfig_lora_tag          6\n#define meshtastic_LocalConfig_bluetooth_tag     7\n#define meshtastic_LocalConfig_version_tag       8\n#define meshtastic_LocalConfig_security_tag      9\n#define meshtastic_LocalModuleConfig_mqtt_tag    1\n#define meshtastic_LocalModuleConfig_serial_tag  2\n#define meshtastic_LocalModuleConfig_external_notification_tag 3\n#define meshtastic_LocalModuleConfig_store_forward_tag 4\n#define meshtastic_LocalModuleConfig_range_test_tag 5\n#define meshtastic_LocalModuleConfig_telemetry_tag 6\n#define meshtastic_LocalModuleConfig_canned_message_tag 7\n#define meshtastic_LocalModuleConfig_version_tag 8\n#define meshtastic_LocalModuleConfig_audio_tag   9\n#define meshtastic_LocalModuleConfig_remote_hardware_tag 10\n#define meshtastic_LocalModuleConfig_neighbor_info_tag 11\n#define meshtastic_LocalModuleConfig_ambient_lighting_tag 12\n#define meshtastic_LocalModuleConfig_detection_sensor_tag 13\n#define meshtastic_LocalModuleConfig_paxcounter_tag 14\n#define meshtastic_LocalModuleConfig_statusmessage_tag 15\n#define meshtastic_LocalModuleConfig_traffic_management_tag 16\n#define meshtastic_LocalModuleConfig_tak_tag     17\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_LocalConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  device,            1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  position,          2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  power,             3) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  network,           4) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  display,           5) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  lora,              6) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  bluetooth,         7) \\\nX(a, STATIC,   SINGULAR, UINT32,   version,           8) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  security,          9)\n#define meshtastic_LocalConfig_CALLBACK NULL\n#define meshtastic_LocalConfig_DEFAULT NULL\n#define meshtastic_LocalConfig_device_MSGTYPE meshtastic_Config_DeviceConfig\n#define meshtastic_LocalConfig_position_MSGTYPE meshtastic_Config_PositionConfig\n#define meshtastic_LocalConfig_power_MSGTYPE meshtastic_Config_PowerConfig\n#define meshtastic_LocalConfig_network_MSGTYPE meshtastic_Config_NetworkConfig\n#define meshtastic_LocalConfig_display_MSGTYPE meshtastic_Config_DisplayConfig\n#define meshtastic_LocalConfig_lora_MSGTYPE meshtastic_Config_LoRaConfig\n#define meshtastic_LocalConfig_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig\n#define meshtastic_LocalConfig_security_MSGTYPE meshtastic_Config_SecurityConfig\n\n#define meshtastic_LocalModuleConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  mqtt,              1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  serial,            2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  external_notification,   3) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  store_forward,     4) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  range_test,        5) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  telemetry,         6) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  canned_message,    7) \\\nX(a, STATIC,   SINGULAR, UINT32,   version,           8) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  audio,             9) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  remote_hardware,  10) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  neighbor_info,    11) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  ambient_lighting,  12) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  detection_sensor,  13) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  paxcounter,       14) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  statusmessage,    15) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  traffic_management,  16) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  tak,              17)\n#define meshtastic_LocalModuleConfig_CALLBACK NULL\n#define meshtastic_LocalModuleConfig_DEFAULT NULL\n#define meshtastic_LocalModuleConfig_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig\n#define meshtastic_LocalModuleConfig_serial_MSGTYPE meshtastic_ModuleConfig_SerialConfig\n#define meshtastic_LocalModuleConfig_external_notification_MSGTYPE meshtastic_ModuleConfig_ExternalNotificationConfig\n#define meshtastic_LocalModuleConfig_store_forward_MSGTYPE meshtastic_ModuleConfig_StoreForwardConfig\n#define meshtastic_LocalModuleConfig_range_test_MSGTYPE meshtastic_ModuleConfig_RangeTestConfig\n#define meshtastic_LocalModuleConfig_telemetry_MSGTYPE meshtastic_ModuleConfig_TelemetryConfig\n#define meshtastic_LocalModuleConfig_canned_message_MSGTYPE meshtastic_ModuleConfig_CannedMessageConfig\n#define meshtastic_LocalModuleConfig_audio_MSGTYPE meshtastic_ModuleConfig_AudioConfig\n#define meshtastic_LocalModuleConfig_remote_hardware_MSGTYPE meshtastic_ModuleConfig_RemoteHardwareConfig\n#define meshtastic_LocalModuleConfig_neighbor_info_MSGTYPE meshtastic_ModuleConfig_NeighborInfoConfig\n#define meshtastic_LocalModuleConfig_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig\n#define meshtastic_LocalModuleConfig_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig\n#define meshtastic_LocalModuleConfig_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig\n#define meshtastic_LocalModuleConfig_statusmessage_MSGTYPE meshtastic_ModuleConfig_StatusMessageConfig\n#define meshtastic_LocalModuleConfig_traffic_management_MSGTYPE meshtastic_ModuleConfig_TrafficManagementConfig\n#define meshtastic_LocalModuleConfig_tak_MSGTYPE meshtastic_ModuleConfig_TAKConfig\n\nextern const pb_msgdesc_t meshtastic_LocalConfig_msg;\nextern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_LocalConfig_fields &meshtastic_LocalConfig_msg\n#define meshtastic_LocalModuleConfig_fields &meshtastic_LocalModuleConfig_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalModuleConfig_size\n#define meshtastic_LocalConfig_size              754\n#define meshtastic_LocalModuleConfig_size        820\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/mesh.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/mesh.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_Position, meshtastic_Position, AUTO)\n\n\nPB_BIND(meshtastic_User, meshtastic_User, AUTO)\n\n\nPB_BIND(meshtastic_RouteDiscovery, meshtastic_RouteDiscovery, AUTO)\n\n\nPB_BIND(meshtastic_Routing, meshtastic_Routing, AUTO)\n\n\nPB_BIND(meshtastic_Data, meshtastic_Data, 2)\n\n\nPB_BIND(meshtastic_KeyVerification, meshtastic_KeyVerification, AUTO)\n\n\nPB_BIND(meshtastic_StoreForwardPlusPlus, meshtastic_StoreForwardPlusPlus, 2)\n\n\nPB_BIND(meshtastic_Waypoint, meshtastic_Waypoint, AUTO)\n\n\nPB_BIND(meshtastic_StatusMessage, meshtastic_StatusMessage, AUTO)\n\n\nPB_BIND(meshtastic_MqttClientProxyMessage, meshtastic_MqttClientProxyMessage, 2)\n\n\nPB_BIND(meshtastic_MeshPacket, meshtastic_MeshPacket, 2)\n\n\nPB_BIND(meshtastic_NodeInfo, meshtastic_NodeInfo, 2)\n\n\nPB_BIND(meshtastic_MyNodeInfo, meshtastic_MyNodeInfo, AUTO)\n\n\nPB_BIND(meshtastic_LogRecord, meshtastic_LogRecord, 2)\n\n\nPB_BIND(meshtastic_QueueStatus, meshtastic_QueueStatus, AUTO)\n\n\nPB_BIND(meshtastic_FromRadio, meshtastic_FromRadio, 2)\n\n\nPB_BIND(meshtastic_ClientNotification, meshtastic_ClientNotification, 2)\n\n\nPB_BIND(meshtastic_KeyVerificationNumberInform, meshtastic_KeyVerificationNumberInform, AUTO)\n\n\nPB_BIND(meshtastic_KeyVerificationNumberRequest, meshtastic_KeyVerificationNumberRequest, AUTO)\n\n\nPB_BIND(meshtastic_KeyVerificationFinal, meshtastic_KeyVerificationFinal, AUTO)\n\n\nPB_BIND(meshtastic_DuplicatedPublicKey, meshtastic_DuplicatedPublicKey, AUTO)\n\n\nPB_BIND(meshtastic_LowEntropyKey, meshtastic_LowEntropyKey, AUTO)\n\n\nPB_BIND(meshtastic_FileInfo, meshtastic_FileInfo, AUTO)\n\n\nPB_BIND(meshtastic_ToRadio, meshtastic_ToRadio, 2)\n\n\nPB_BIND(meshtastic_Compressed, meshtastic_Compressed, AUTO)\n\n\nPB_BIND(meshtastic_NeighborInfo, meshtastic_NeighborInfo, AUTO)\n\n\nPB_BIND(meshtastic_Neighbor, meshtastic_Neighbor, AUTO)\n\n\nPB_BIND(meshtastic_DeviceMetadata, meshtastic_DeviceMetadata, AUTO)\n\n\nPB_BIND(meshtastic_Heartbeat, meshtastic_Heartbeat, AUTO)\n\n\nPB_BIND(meshtastic_NodeRemoteHardwarePin, meshtastic_NodeRemoteHardwarePin, AUTO)\n\n\nPB_BIND(meshtastic_ChunkedPayload, meshtastic_ChunkedPayload, AUTO)\n\n\nPB_BIND(meshtastic_resend_chunks, meshtastic_resend_chunks, AUTO)\n\n\nPB_BIND(meshtastic_ChunkedPayloadResponse, meshtastic_ChunkedPayloadResponse, AUTO)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/mesh.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_MESH_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_MESH_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/channel.pb.h\"\n#include \"meshtastic/config.pb.h\"\n#include \"meshtastic/device_ui.pb.h\"\n#include \"meshtastic/module_config.pb.h\"\n#include \"meshtastic/portnums.pb.h\"\n#include \"meshtastic/telemetry.pb.h\"\n#include \"meshtastic/xmodem.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* Note: these enum names must EXACTLY match the string used in the device\n bin/build-all.sh script.\n Because they will be used to find firmware filenames in the android app for OTA updates.\n To match the old style filenames, _ is converted to -, p is converted to . */\ntypedef enum _meshtastic_HardwareModel {\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_UNSET = 0,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TLORA_V2 = 1,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TLORA_V1 = 2,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TLORA_V2_1_1P6 = 3,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TBEAM = 4,\n    /* The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13\n (see HELTEC_V2 for the new version). */\n    meshtastic_HardwareModel_HELTEC_V2_0 = 5,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TBEAM_V0P7 = 6,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_T_ECHO = 7,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TLORA_V1_1P3 = 8,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_RAK4631 = 9,\n    /* The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37.\n Sadly they did not update anything on the silkscreen to identify this board */\n    meshtastic_HardwareModel_HELTEC_V2_1 = 10,\n    /* Ancient heltec WiFi_Lora_32 board */\n    meshtastic_HardwareModel_HELTEC_V1 = 11,\n    /* New T-BEAM with ESP32-S3 CPU */\n    meshtastic_HardwareModel_LILYGO_TBEAM_S3_CORE = 12,\n    /* RAK WisBlock ESP32 core: https://docs.rakwireless.com/Product-Categories/WisBlock/RAK11200/Overview/ */\n    meshtastic_HardwareModel_RAK11200 = 13,\n    /* B&Q Consulting Nano Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:nano */\n    meshtastic_HardwareModel_NANO_G1 = 14,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TLORA_V2_1_1P8 = 15,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_TLORA_T3_S3 = 16,\n    /* B&Q Consulting Nano G1 Explorer: https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer */\n    meshtastic_HardwareModel_NANO_G1_EXPLORER = 17,\n    /* B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra */\n    meshtastic_HardwareModel_NANO_G2_ULTRA = 18,\n    /* LoRAType device: https://loratype.org/ */\n    meshtastic_HardwareModel_LORA_TYPE = 19,\n    /* wiphone https://www.wiphone.io/ */\n    meshtastic_HardwareModel_WIPHONE = 20,\n    /* WIO Tracker WM1110 family from Seeed Studio. Includes wio-1110-tracker and wio-1110-sdk */\n    meshtastic_HardwareModel_WIO_WM1110 = 21,\n    /* RAK2560 Solar base station based on RAK4630 */\n    meshtastic_HardwareModel_RAK2560 = 22,\n    /* Heltec HRU-3601: https://heltec.org/project/hru-3601/ */\n    meshtastic_HardwareModel_HELTEC_HRU_3601 = 23,\n    /* Heltec Wireless Bridge */\n    meshtastic_HardwareModel_HELTEC_WIRELESS_BRIDGE = 24,\n    /* B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */\n    meshtastic_HardwareModel_STATION_G1 = 25,\n    /* RAK11310 (RP2040 + SX1262) */\n    meshtastic_HardwareModel_RAK11310 = 26,\n    /* Makerfabs SenseLoRA Receiver (RP2040 + RFM96) */\n    meshtastic_HardwareModel_SENSELORA_RP2040 = 27,\n    /* Makerfabs SenseLoRA Industrial Monitor (ESP32-S3 + RFM96) */\n    meshtastic_HardwareModel_SENSELORA_S3 = 28,\n    /* Canary Radio Company - CanaryOne: https://canaryradio.io/products/canaryone */\n    meshtastic_HardwareModel_CANARYONE = 29,\n    /* Waveshare RP2040 LoRa - https://www.waveshare.com/rp2040-lora.htm */\n    meshtastic_HardwareModel_RP2040_LORA = 30,\n    /* B&Q Consulting Station G2: https://wiki.uniteng.com/en/meshtastic/station-g2 */\n    meshtastic_HardwareModel_STATION_G2 = 31,\n    /* ---------------------------------------------------------------------------\n Less common/prototype boards listed here (needs one more byte over the air)\n --------------------------------------------------------------------------- */\n    meshtastic_HardwareModel_LORA_RELAY_V1 = 32,\n    /* T-Echo Plus device from LilyGo */\n    meshtastic_HardwareModel_T_ECHO_PLUS = 33,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_PPR = 34,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_GENIEBLOCKS = 35,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_NRF52_UNKNOWN = 36,\n    /* TODO: REPLACE */\n    meshtastic_HardwareModel_PORTDUINO = 37,\n    /* The simulator built into the android app */\n    meshtastic_HardwareModel_ANDROID_SIM = 38,\n    /* Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics */\n    meshtastic_HardwareModel_DIY_V1 = 39,\n    /* nRF52840 Dongle : https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle/ */\n    meshtastic_HardwareModel_NRF52840_PCA10059 = 40,\n    /* Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3 */\n    meshtastic_HardwareModel_DR_DEV = 41,\n    /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */\n    meshtastic_HardwareModel_M5STACK = 42,\n    /* New Heltec LoRA32 with ESP32-S3 CPU */\n    meshtastic_HardwareModel_HELTEC_V3 = 43,\n    /* New Heltec Wireless Stick Lite with ESP32-S3 CPU */\n    meshtastic_HardwareModel_HELTEC_WSL_V3 = 44,\n    /* New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU */\n    meshtastic_HardwareModel_BETAFPV_2400_TX = 45,\n    /* BetaFPV ExpressLRS \"Nano\" TX Module 900MHz with ESP32 CPU */\n    meshtastic_HardwareModel_BETAFPV_900_NANO_TX = 46,\n    /* Raspberry Pi Pico (W) with Waveshare SX1262 LoRa Node Module */\n    meshtastic_HardwareModel_RPI_PICO = 47,\n    /* Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT\n Newer V1.1, version is written on the PCB near the display. */\n    meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER = 48,\n    /* Heltec Wireless Paper with ESP32-S3 CPU and E-Ink display */\n    meshtastic_HardwareModel_HELTEC_WIRELESS_PAPER = 49,\n    /* LilyGo T-Deck with ESP32-S3 CPU, Keyboard and IPS display */\n    meshtastic_HardwareModel_T_DECK = 50,\n    /* LilyGo T-Watch S3 with ESP32-S3 CPU and IPS display */\n    meshtastic_HardwareModel_T_WATCH_S3 = 51,\n    /* Bobricius Picomputer with ESP32-S3 CPU, Keyboard and IPS display */\n    meshtastic_HardwareModel_PICOMPUTER_S3 = 52,\n    /* Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa */\n    meshtastic_HardwareModel_HELTEC_HT62 = 53,\n    /* EBYTE SPI LoRa module and ESP32-S3 */\n    meshtastic_HardwareModel_EBYTE_ESP32_S3 = 54,\n    /* Waveshare ESP32-S3-PICO with PICO LoRa HAT and 2.9inch e-Ink */\n    meshtastic_HardwareModel_ESP32_S3_PICO = 55,\n    /* CircuitMess Chatter 2 LLCC68 Lora Module and ESP32 Wroom\n Lora module can be swapped out for a Heltec RA-62 which is \"almost\" pin compatible\n with one cut and one jumper Meshtastic works */\n    meshtastic_HardwareModel_CHATTER_2 = 56,\n    /* Heltec Wireless Paper, With ESP32-S3 CPU and E-Ink display\n Older \"V1.0\" Variant, has no \"version sticker\"\n E-Ink model is DEPG0213BNS800\n Tab on the screen protector is RED\n Flex connector marking is FPC-7528B */\n    meshtastic_HardwareModel_HELTEC_WIRELESS_PAPER_V1_0 = 57,\n    /* Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT\n Older \"V1.0\" Variant */\n    meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER_V1_0 = 58,\n    /* unPhone with ESP32-S3, TFT touchscreen,  LSM6DS3TR-C accelerometer and gyroscope */\n    meshtastic_HardwareModel_UNPHONE = 59,\n    /* Teledatics TD-LORAC NRF52840 based M.2 LoRA module\n Compatible with the TD-WRLS development board */\n    meshtastic_HardwareModel_TD_LORAC = 60,\n    /* CDEBYTE EoRa-S3 board using their own MM modules, clone of LILYGO T3S3 */\n    meshtastic_HardwareModel_CDEBYTE_EORA_S3 = 61,\n    /* TWC_MESH_V4\n Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS */\n    meshtastic_HardwareModel_TWC_MESH_V4 = 62,\n    /* NRF52_PROMICRO_DIY\n Promicro NRF52840 with SX1262/LLCC68, SSD1306 OLED and NEO6M GPS */\n    meshtastic_HardwareModel_NRF52_PROMICRO_DIY = 63,\n    /* RadioMaster 900 Bandit Nano, https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module\n ESP32-D0WDQ6 With SX1276/SKY66122, SSD1306 OLED and No GPS */\n    meshtastic_HardwareModel_RADIOMASTER_900_BANDIT_NANO = 64,\n    /* Heltec Capsule Sensor V3 with ESP32-S3 CPU, Portable LoRa device that can replace GNSS modules or sensors */\n    meshtastic_HardwareModel_HELTEC_CAPSULE_SENSOR_V3 = 65,\n    /* Heltec Vision Master T190 with ESP32-S3 CPU, and a 1.90 inch TFT display */\n    meshtastic_HardwareModel_HELTEC_VISION_MASTER_T190 = 66,\n    /* Heltec Vision Master E213 with ESP32-S3 CPU, and a 2.13 inch E-Ink display */\n    meshtastic_HardwareModel_HELTEC_VISION_MASTER_E213 = 67,\n    /* Heltec Vision Master E290 with ESP32-S3 CPU, and a 2.9 inch E-Ink display */\n    meshtastic_HardwareModel_HELTEC_VISION_MASTER_E290 = 68,\n    /* Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design,\n specifically adapted for the Meshtatic project */\n    meshtastic_HardwareModel_HELTEC_MESH_NODE_T114 = 69,\n    /* Sensecap Indicator from Seeed Studio. ESP32-S3 device with TFT and RP2040 coprocessor */\n    meshtastic_HardwareModel_SENSECAP_INDICATOR = 70,\n    /* Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */\n    meshtastic_HardwareModel_TRACKER_T1000_E = 71,\n    /* RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) */\n    meshtastic_HardwareModel_RAK3172 = 72,\n    /* Seeed Studio Wio-E5 (either mini or Dev kit) using STM32WL chip. */\n    meshtastic_HardwareModel_WIO_E5 = 73,\n    /* RadioMaster 900 Bandit, https://www.radiomasterrc.com/products/bandit-expresslrs-rf-module\n SSD1306 OLED and No GPS */\n    meshtastic_HardwareModel_RADIOMASTER_900_BANDIT = 74,\n    /* Minewsemi ME25LS01 (ME25LE01_V1.0). NRF52840 w/ LR1110 radio, buttons and leds and pins. */\n    meshtastic_HardwareModel_ME25LS01_4Y10TD = 75,\n    /* RP2040_FEATHER_RFM95\n Adafruit Feather RP2040 with RFM95 LoRa Radio RFM95 with SX1272, SSD1306 OLED\n https://www.adafruit.com/product/5714\n https://www.adafruit.com/product/326\n https://www.adafruit.com/product/938\n  ^^^ short A0 to switch to I2C address 0x3C */\n    meshtastic_HardwareModel_RP2040_FEATHER_RFM95 = 76,\n    /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */\n    meshtastic_HardwareModel_M5STACK_COREBASIC = 77,\n    meshtastic_HardwareModel_M5STACK_CORE2 = 78,\n    /* Pico2 with Waveshare Hat, same as Pico */\n    meshtastic_HardwareModel_RPI_PICO2 = 79,\n    /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */\n    meshtastic_HardwareModel_M5STACK_CORES3 = 80,\n    /* Seeed XIAO S3 DK */\n    meshtastic_HardwareModel_SEEED_XIAO_S3 = 81,\n    /* Nordic nRF52840+Semtech SX1262 LoRa BLE Combo Module. nRF52840+SX1262 MS24SF1 */\n    meshtastic_HardwareModel_MS24SF1 = 82,\n    /* Lilygo TLora-C6 with the new ESP32-C6 MCU */\n    meshtastic_HardwareModel_TLORA_C6 = 83,\n    /* WisMesh Tap\n RAK-4631 w/ TFT in injection modled case */\n    meshtastic_HardwareModel_WISMESH_TAP = 84,\n    /* Similar to PORTDUINO but used by Routastic devices, this is not any\n particular device and does not run Meshtastic's code but supports\n the same frame format.\n Runs on linux, see https://github.com/Jorropo/routastic */\n    meshtastic_HardwareModel_ROUTASTIC = 85,\n    /* Mesh-Tab, esp32 based\n https://github.com/valzzu/Mesh-Tab */\n    meshtastic_HardwareModel_MESH_TAB = 86,\n    /* MeshLink board developed by LoraItalia. NRF52840, eByte E22900M22S (Will also come with other frequencies), 25w MPPT solar charger (5v,12v,18v selectable), support for gps, buzzer, oled or e-ink display, 10 gpios, hardware watchdog\n https://www.loraitalia.it */\n    meshtastic_HardwareModel_MESHLINK = 87,\n    /* Seeed XIAO nRF52840 + Wio SX1262 kit */\n    meshtastic_HardwareModel_XIAO_NRF52_KIT = 88,\n    /* Elecrow ThinkNode M1 & M2\n https://www.elecrow.com/wiki/ThinkNode-M1_Transceiver_Device(Meshtastic)_Power_By_nRF52840.html\n https://www.elecrow.com/wiki/ThinkNode-M2_Transceiver_Device(Meshtastic)_Power_By_NRF52840.html (this actually uses ESP32-S3) */\n    meshtastic_HardwareModel_THINKNODE_M1 = 89,\n    meshtastic_HardwareModel_THINKNODE_M2 = 90,\n    /* Lilygo T-ETH-Elite */\n    meshtastic_HardwareModel_T_ETH_ELITE = 91,\n    /* Heltec HRI-3621 industrial probe */\n    meshtastic_HardwareModel_HELTEC_SENSOR_HUB = 92,\n    /* Muzi Works Muzi-Base device */\n    meshtastic_HardwareModel_MUZI_BASE = 93,\n    /* Heltec Magnetic Power Bank with Meshtastic compatible */\n    meshtastic_HardwareModel_HELTEC_MESH_POCKET = 94,\n    /* Seeed Solar Node */\n    meshtastic_HardwareModel_SEEED_SOLAR_NODE = 95,\n    /* NomadStar Meteor Pro https://nomadstar.ch/ */\n    meshtastic_HardwareModel_NOMADSTAR_METEOR_PRO = 96,\n    /* Elecrow CrowPanel Advance models, ESP32-S3 and TFT with SX1262 radio plugin */\n    meshtastic_HardwareModel_CROWPANEL = 97,\n    /* Lilygo LINK32 board with sensors */\n    meshtastic_HardwareModel_LINK_32 = 98,\n    /* Seeed Tracker L1 */\n    meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1 = 99,\n    /* Seeed Tracker L1 EINK driver */\n    meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1_EINK = 100,\n    /* Muzi Works R1 Neo */\n    meshtastic_HardwareModel_MUZI_R1_NEO = 101,\n    /* Lilygo T-Deck Pro */\n    meshtastic_HardwareModel_T_DECK_PRO = 102,\n    /* Lilygo TLora Pager */\n    meshtastic_HardwareModel_T_LORA_PAGER = 103,\n    /* M5Stack Reserved */\n    meshtastic_HardwareModel_M5STACK_RESERVED = 104, /* 0x68 */\n    /* RAKwireless WisMesh Tag */\n    meshtastic_HardwareModel_WISMESH_TAG = 105,\n    /* RAKwireless WisBlock Core RAK3312 https://docs.rakwireless.com/product-categories/wisduo/rak3112-module/overview/ */\n    meshtastic_HardwareModel_RAK3312 = 106,\n    /* Elecrow ThinkNode M5 https://www.elecrow.com/wiki/ThinkNode_M5_Meshtastic_LoRa_Signal_Transceiver_ESP32-S3.html */\n    meshtastic_HardwareModel_THINKNODE_M5 = 107,\n    /* MeshSolar is an integrated power management and communication solution designed for outdoor low-power devices.\n https://heltec.org/project/meshsolar/ */\n    meshtastic_HardwareModel_HELTEC_MESH_SOLAR = 108,\n    /* Lilygo T-Echo Lite */\n    meshtastic_HardwareModel_T_ECHO_LITE = 109,\n    /* New Heltec LoRA32 with ESP32-S3 CPU */\n    meshtastic_HardwareModel_HELTEC_V4 = 110,\n    /* M5Stack C6L */\n    meshtastic_HardwareModel_M5STACK_C6L = 111,\n    /* M5Stack Cardputer Adv */\n    meshtastic_HardwareModel_M5STACK_CARDPUTER_ADV = 112,\n    /* ESP32S3 main controller with GPS and TFT screen. */\n    meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER_V2 = 113,\n    /* LilyGo T-Watch Ultra */\n    meshtastic_HardwareModel_T_WATCH_ULTRA = 114,\n    /* Elecrow ThinkNode M3 */\n    meshtastic_HardwareModel_THINKNODE_M3 = 115,\n    /* RAK WISMESH_TAP_V2 with ESP32-S3 CPU */\n    meshtastic_HardwareModel_WISMESH_TAP_V2 = 116,\n    /* RAK3401 */\n    meshtastic_HardwareModel_RAK3401 = 117,\n    /* RAK6421 Hat+ */\n    meshtastic_HardwareModel_RAK6421 = 118,\n    /* Elecrow ThinkNode M4 */\n    meshtastic_HardwareModel_THINKNODE_M4 = 119,\n    /* Elecrow ThinkNode M6 */\n    meshtastic_HardwareModel_THINKNODE_M6 = 120,\n    /* Elecrow Meshstick 1262 */\n    meshtastic_HardwareModel_MESHSTICK_1262 = 121,\n    /* LilyGo T-Beam 1W */\n    meshtastic_HardwareModel_TBEAM_1_WATT = 122,\n    /* LilyGo T5 S3 ePaper Pro (V1 and V2) */\n    meshtastic_HardwareModel_T5_S3_EPAPER_PRO = 123,\n    /* LilyGo T-Beam BPF (144-148Mhz) */\n    meshtastic_HardwareModel_TBEAM_BPF = 124,\n    /* LilyGo T-Mini E-paper S3 Kit */\n    meshtastic_HardwareModel_MINI_EPAPER_S3 = 125,\n    /* LilyGo T-Display S3 Pro LR1121 */\n    meshtastic_HardwareModel_TDISPLAY_S3_PRO = 126,\n    /* ------------------------------------------------------------------------------------------------------------------------------------------\n Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.\n ------------------------------------------------------------------------------------------------------------------------------------------ */\n    meshtastic_HardwareModel_PRIVATE_HW = 255\n} meshtastic_HardwareModel;\n\n/* Shared constants between device and phone */\ntypedef enum _meshtastic_Constants {\n    /* First enum must be zero, and we are just using this enum to\n pass int constants between two very different environments */\n    meshtastic_Constants_ZERO = 0,\n    /* From mesh.options\n note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is\n outside of this envelope */\n    meshtastic_Constants_DATA_PAYLOAD_LEN = 233\n} meshtastic_Constants;\n\n/* Error codes for critical errors\n The device might report these fault codes on the screen.\n If you encounter a fault code, please post on the meshtastic.discourse.group\n and we'll try to help. */\ntypedef enum _meshtastic_CriticalErrorCode {\n    /* TODO: REPLACE */\n    meshtastic_CriticalErrorCode_NONE = 0,\n    /* A software bug was detected while trying to send lora */\n    meshtastic_CriticalErrorCode_TX_WATCHDOG = 1,\n    /* A software bug was detected on entry to sleep */\n    meshtastic_CriticalErrorCode_SLEEP_ENTER_WAIT = 2,\n    /* No Lora radio hardware could be found */\n    meshtastic_CriticalErrorCode_NO_RADIO = 3,\n    /* Not normally used */\n    meshtastic_CriticalErrorCode_UNSPECIFIED = 4,\n    /* We failed while configuring a UBlox GPS */\n    meshtastic_CriticalErrorCode_UBLOX_UNIT_FAILED = 5,\n    /* This board was expected to have a power management chip and it is missing or broken */\n    meshtastic_CriticalErrorCode_NO_AXP192 = 6,\n    /* The channel tried to set a radio setting which is not supported by this chipset,\n radio comms settings are now undefined. */\n    meshtastic_CriticalErrorCode_INVALID_RADIO_SETTING = 7,\n    /* Radio transmit hardware failure. We sent data to the radio chip, but it didn't\n reply with an interrupt. */\n    meshtastic_CriticalErrorCode_TRANSMIT_FAILED = 8,\n    /* We detected that the main CPU voltage dropped below the minimum acceptable value */\n    meshtastic_CriticalErrorCode_BROWNOUT = 9,\n    /* Selftest of SX1262 radio chip failed */\n    meshtastic_CriticalErrorCode_SX1262_FAILURE = 10,\n    /* A (likely software but possibly hardware) failure was detected while trying to send packets.\n If this occurs on your board, please post in the forum so that we can ask you to collect some information to allow fixing this bug */\n    meshtastic_CriticalErrorCode_RADIO_SPI_BUG = 11,\n    /* Corruption was detected on the flash filesystem but we were able to repair things.\n If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. */\n    meshtastic_CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE = 12,\n    /* Corruption was detected on the flash filesystem but we were unable to repair things.\n NOTE: Your node will probably need to be reconfigured the next time it reboots (it will lose the region code etc...)\n If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. */\n    meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE = 13\n} meshtastic_CriticalErrorCode;\n\n/* Enum to indicate to clients whether this firmware is a special firmware build, like an event.\n The first 16 values are reserved for non-event special firmwares, like the Smart Citizen use case. */\ntypedef enum _meshtastic_FirmwareEdition {\n    /* Vanilla firmware */\n    meshtastic_FirmwareEdition_VANILLA = 0,\n    /* Firmware for use in the Smart Citizen environmental monitoring network */\n    meshtastic_FirmwareEdition_SMART_CITIZEN = 1,\n    /* Open Sauce, the maker conference held yearly in CA */\n    meshtastic_FirmwareEdition_OPEN_SAUCE = 16,\n    /* DEFCON, the yearly hacker conference */\n    meshtastic_FirmwareEdition_DEFCON = 17,\n    /* Burning Man, the yearly hippie gathering in the desert */\n    meshtastic_FirmwareEdition_BURNING_MAN = 18,\n    /* Hamvention, the Dayton amateur radio convention */\n    meshtastic_FirmwareEdition_HAMVENTION = 19,\n    /* Placeholder for DIY and unofficial events */\n    meshtastic_FirmwareEdition_DIY_EDITION = 127\n} meshtastic_FirmwareEdition;\n\n/* Enum for modules excluded from a device's configuration.\n Each value represents a ModuleConfigType that can be toggled as excluded\n by setting its corresponding bit in the `excluded_modules` bitmask field. */\ntypedef enum _meshtastic_ExcludedModules {\n    /* Default value of 0 indicates no modules are excluded. */\n    meshtastic_ExcludedModules_EXCLUDED_NONE = 0,\n    /* MQTT module */\n    meshtastic_ExcludedModules_MQTT_CONFIG = 1,\n    /* Serial module */\n    meshtastic_ExcludedModules_SERIAL_CONFIG = 2,\n    /* External Notification module */\n    meshtastic_ExcludedModules_EXTNOTIF_CONFIG = 4,\n    /* Store and Forward module */\n    meshtastic_ExcludedModules_STOREFORWARD_CONFIG = 8,\n    /* Range Test module */\n    meshtastic_ExcludedModules_RANGETEST_CONFIG = 16,\n    /* Telemetry module */\n    meshtastic_ExcludedModules_TELEMETRY_CONFIG = 32,\n    /* Canned Message module */\n    meshtastic_ExcludedModules_CANNEDMSG_CONFIG = 64,\n    /* Audio module */\n    meshtastic_ExcludedModules_AUDIO_CONFIG = 128,\n    /* Remote Hardware module */\n    meshtastic_ExcludedModules_REMOTEHARDWARE_CONFIG = 256,\n    /* Neighbor Info module */\n    meshtastic_ExcludedModules_NEIGHBORINFO_CONFIG = 512,\n    /* Ambient Lighting module */\n    meshtastic_ExcludedModules_AMBIENTLIGHTING_CONFIG = 1024,\n    /* Detection Sensor module */\n    meshtastic_ExcludedModules_DETECTIONSENSOR_CONFIG = 2048,\n    /* Paxcounter module */\n    meshtastic_ExcludedModules_PAXCOUNTER_CONFIG = 4096,\n    /* Bluetooth config (not technically a module, but used to indicate bluetooth capabilities) */\n    meshtastic_ExcludedModules_BLUETOOTH_CONFIG = 8192,\n    /* Network config (not technically a module, but used to indicate network capabilities) */\n    meshtastic_ExcludedModules_NETWORK_CONFIG = 16384\n} meshtastic_ExcludedModules;\n\n/* How the location was acquired: manual, onboard GPS, external (EUD) GPS */\ntypedef enum _meshtastic_Position_LocSource {\n    /* TODO: REPLACE */\n    meshtastic_Position_LocSource_LOC_UNSET = 0,\n    /* TODO: REPLACE */\n    meshtastic_Position_LocSource_LOC_MANUAL = 1,\n    /* TODO: REPLACE */\n    meshtastic_Position_LocSource_LOC_INTERNAL = 2,\n    /* TODO: REPLACE */\n    meshtastic_Position_LocSource_LOC_EXTERNAL = 3\n} meshtastic_Position_LocSource;\n\n/* How the altitude was acquired: manual, GPS int/ext, etc\n Default: same as location_source if present */\ntypedef enum _meshtastic_Position_AltSource {\n    /* TODO: REPLACE */\n    meshtastic_Position_AltSource_ALT_UNSET = 0,\n    /* TODO: REPLACE */\n    meshtastic_Position_AltSource_ALT_MANUAL = 1,\n    /* TODO: REPLACE */\n    meshtastic_Position_AltSource_ALT_INTERNAL = 2,\n    /* TODO: REPLACE */\n    meshtastic_Position_AltSource_ALT_EXTERNAL = 3,\n    /* TODO: REPLACE */\n    meshtastic_Position_AltSource_ALT_BAROMETRIC = 4\n} meshtastic_Position_AltSource;\n\n/* A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide\n details on the type of failure). */\ntypedef enum _meshtastic_Routing_Error {\n    /* This message is not a failure */\n    meshtastic_Routing_Error_NONE = 0,\n    /* Our node doesn't have a route to the requested destination anymore. */\n    meshtastic_Routing_Error_NO_ROUTE = 1,\n    /* We received a nak while trying to forward on your behalf */\n    meshtastic_Routing_Error_GOT_NAK = 2,\n    /* TODO: REPLACE */\n    meshtastic_Routing_Error_TIMEOUT = 3,\n    /* No suitable interface could be found for delivering this packet */\n    meshtastic_Routing_Error_NO_INTERFACE = 4,\n    /* We reached the max retransmission count (typically for naive flood routing) */\n    meshtastic_Routing_Error_MAX_RETRANSMIT = 5,\n    /* No suitable channel was found for sending this packet (i.e. was requested channel index disabled?) */\n    meshtastic_Routing_Error_NO_CHANNEL = 6,\n    /* The packet was too big for sending (exceeds interface MTU after encoding) */\n    meshtastic_Routing_Error_TOO_LARGE = 7,\n    /* The request had want_response set, the request reached the destination node, but no service on that node wants to send a response\n (possibly due to bad channel permissions) */\n    meshtastic_Routing_Error_NO_RESPONSE = 8,\n    /* Cannot send currently because duty cycle regulations will be violated. */\n    meshtastic_Routing_Error_DUTY_CYCLE_LIMIT = 9,\n    /* The application layer service on the remote node received your request, but considered your request somehow invalid */\n    meshtastic_Routing_Error_BAD_REQUEST = 32,\n    /* The application layer service on the remote node received your request, but considered your request not authorized\n (i.e you did not send the request on the required bound channel) */\n    meshtastic_Routing_Error_NOT_AUTHORIZED = 33,\n    /* The client specified a PKI transport, but the node was unable to send the packet using PKI (and did not send the message at all) */\n    meshtastic_Routing_Error_PKI_FAILED = 34,\n    /* The receiving node does not have a Public Key to decode with */\n    meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY = 35,\n    /* Admin packet otherwise checks out, but uses a bogus or expired session key */\n    meshtastic_Routing_Error_ADMIN_BAD_SESSION_KEY = 36,\n    /* Admin packet sent using PKC, but not from a public key on the admin key list */\n    meshtastic_Routing_Error_ADMIN_PUBLIC_KEY_UNAUTHORIZED = 37,\n    /* Airtime fairness rate limit exceeded for a packet\n This typically enforced per portnum and is used to prevent a single node from monopolizing airtime */\n    meshtastic_Routing_Error_RATE_LIMIT_EXCEEDED = 38,\n    /* PKI encryption failed, due to no public key for the remote node\n This is different from PKI_UNKNOWN_PUBKEY which indicates a failure upon receiving a packet */\n    meshtastic_Routing_Error_PKI_SEND_FAIL_PUBLIC_KEY = 39\n} meshtastic_Routing_Error;\n\n/* Enum of message types */\ntypedef enum _meshtastic_StoreForwardPlusPlus_SFPP_message_type {\n    /* Send an announcement of the canonical tip of a chain */\n    meshtastic_StoreForwardPlusPlus_SFPP_message_type_CANON_ANNOUNCE = 0,\n    /* Query whether a specific link is on the chain */\n    meshtastic_StoreForwardPlusPlus_SFPP_message_type_CHAIN_QUERY = 1,\n    /* Request the next link in the chain */\n    meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_REQUEST = 3,\n    /* Provide a link to add to the chain */\n    meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE = 4,\n    /* If we must fragment, send the first half */\n    meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE_FIRSTHALF = 5,\n    /* If we must fragment, send the second half */\n    meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE_SECONDHALF = 6\n} meshtastic_StoreForwardPlusPlus_SFPP_message_type;\n\n/* The priority of this message for sending.\n Higher priorities are sent first (when managing the transmit queue).\n This field is never sent over the air, it is only used internally inside of a local device node.\n API clients (either on the local node or connected directly to the node)\n can set this parameter if necessary.\n (values must be <= 127 to keep protobuf field to one byte in size.\n Detailed background on this field:\n I noticed a funny side effect of lora being so slow: Usually when making\n a protocol there isn’t much need to use message priority to change the order\n of transmission (because interfaces are fairly fast).\n But for lora where packets can take a few seconds each, it is very important\n to make sure that critical packets are sent ASAP.\n In the case of meshtastic that means we want to send protocol acks as soon as possible\n (to prevent unneeded retransmissions), we want routing messages to be sent next,\n then messages marked as reliable and finally 'background' packets like periodic position updates.\n So I bit the bullet and implemented a new (internal - not sent over the air)\n field in MeshPacket called 'priority'.\n And the transmission queue in the router object is now a priority queue. */\ntypedef enum _meshtastic_MeshPacket_Priority {\n    /* Treated as Priority.DEFAULT */\n    meshtastic_MeshPacket_Priority_UNSET = 0,\n    /* TODO: REPLACE */\n    meshtastic_MeshPacket_Priority_MIN = 1,\n    /* Background position updates are sent with very low priority -\n if the link is super congested they might not go out at all */\n    meshtastic_MeshPacket_Priority_BACKGROUND = 10,\n    /* This priority is used for most messages that don't have a priority set */\n    meshtastic_MeshPacket_Priority_DEFAULT = 64,\n    /* If priority is unset but the message is marked as want_ack,\n assume it is important and use a slightly higher priority */\n    meshtastic_MeshPacket_Priority_RELIABLE = 70,\n    /* If priority is unset but the packet is a response to a request, we want it to get there relatively quickly.\n Furthermore, responses stop relaying packets directed to a node early. */\n    meshtastic_MeshPacket_Priority_RESPONSE = 80,\n    /* Higher priority for specific message types (portnums) to distinguish between other reliable packets. */\n    meshtastic_MeshPacket_Priority_HIGH = 100,\n    /* Higher priority alert message used for critical alerts which take priority over other reliable packets. */\n    meshtastic_MeshPacket_Priority_ALERT = 110,\n    /* Ack/naks are sent with very high priority to ensure that retransmission\n stops as soon as possible */\n    meshtastic_MeshPacket_Priority_ACK = 120,\n    /* TODO: REPLACE */\n    meshtastic_MeshPacket_Priority_MAX = 127\n} meshtastic_MeshPacket_Priority;\n\n/* Identify if this is a delayed packet */\ntypedef enum _meshtastic_MeshPacket_Delayed {\n    /* If unset, the message is being sent in real time. */\n    meshtastic_MeshPacket_Delayed_NO_DELAY = 0,\n    /* The message is delayed and was originally a broadcast */\n    meshtastic_MeshPacket_Delayed_DELAYED_BROADCAST = 1,\n    /* The message is delayed and was originally a direct message */\n    meshtastic_MeshPacket_Delayed_DELAYED_DIRECT = 2\n} meshtastic_MeshPacket_Delayed;\n\n/* Enum to identify which transport mechanism this packet arrived over */\ntypedef enum _meshtastic_MeshPacket_TransportMechanism {\n    /* The default case is that the node generated a packet itself */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_INTERNAL = 0,\n    /* Arrived via the primary LoRa radio */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA = 1,\n    /* Arrived via a secondary LoRa radio */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA_ALT1 = 2,\n    /* Arrived via a tertiary LoRa radio */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA_ALT2 = 3,\n    /* Arrived via a quaternary LoRa radio */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA_ALT3 = 4,\n    /* Arrived via an MQTT connection */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MQTT = 5,\n    /* Arrived via Multicast UDP */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MULTICAST_UDP = 6,\n    /* Arrived via API connection */\n    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API = 7\n} meshtastic_MeshPacket_TransportMechanism;\n\n/* Log levels, chosen to match python logging conventions. */\ntypedef enum _meshtastic_LogRecord_Level {\n    /* Log levels, chosen to match python logging conventions. */\n    meshtastic_LogRecord_Level_UNSET = 0,\n    /* Log levels, chosen to match python logging conventions. */\n    meshtastic_LogRecord_Level_CRITICAL = 50,\n    /* Log levels, chosen to match python logging conventions. */\n    meshtastic_LogRecord_Level_ERROR = 40,\n    /* Log levels, chosen to match python logging conventions. */\n    meshtastic_LogRecord_Level_WARNING = 30,\n    /* Log levels, chosen to match python logging conventions. */\n    meshtastic_LogRecord_Level_INFO = 20,\n    /* Log levels, chosen to match python logging conventions. */\n    meshtastic_LogRecord_Level_DEBUG = 10,\n    /* Log levels, chosen to match python logging conventions. */\n    meshtastic_LogRecord_Level_TRACE = 5\n} meshtastic_LogRecord_Level;\n\n/* Struct definitions */\n/* A GPS Position */\ntypedef struct _meshtastic_Position {\n    /* The new preferred location encoding, multiply by 1e-7 to get degrees\n in floating point */\n    bool has_latitude_i;\n    int32_t latitude_i;\n    /* TODO: REPLACE */\n    bool has_longitude_i;\n    int32_t longitude_i;\n    /* In meters above MSL (but see issue #359) */\n    bool has_altitude;\n    int32_t altitude;\n    /* This is usually not sent over the mesh (to save space), but it is sent\n from the phone so that the local device can set its time if it is sent over\n the mesh (because there are devices on the mesh without GPS or RTC).\n seconds since 1970 */\n    uint32_t time;\n    /* TODO: REPLACE */\n    meshtastic_Position_LocSource location_source;\n    /* TODO: REPLACE */\n    meshtastic_Position_AltSource altitude_source;\n    /* Positional timestamp (actual timestamp of GPS solution) in integer epoch seconds */\n    uint32_t timestamp;\n    /* Pos. timestamp milliseconds adjustment (rarely available or required) */\n    int32_t timestamp_millis_adjust;\n    /* HAE altitude in meters - can be used instead of MSL altitude */\n    bool has_altitude_hae;\n    int32_t altitude_hae;\n    /* Geoidal separation in meters */\n    bool has_altitude_geoidal_separation;\n    int32_t altitude_geoidal_separation;\n    /* Horizontal, Vertical and Position Dilution of Precision, in 1/100 units\n - PDOP is sufficient for most cases\n - for higher precision scenarios, HDOP and VDOP can be used instead,\n   in which case PDOP becomes redundant (PDOP=sqrt(HDOP^2 + VDOP^2))\n TODO: REMOVE/INTEGRATE */\n    uint32_t PDOP;\n    /* TODO: REPLACE */\n    uint32_t HDOP;\n    /* TODO: REPLACE */\n    uint32_t VDOP;\n    /* GPS accuracy (a hardware specific constant) in mm\n   multiplied with DOP to calculate positional accuracy\n Default: \"'bout three meters-ish\" :) */\n    uint32_t gps_accuracy;\n    /* Ground speed in m/s and True North TRACK in 1/100 degrees\n Clarification of terms:\n - \"track\" is the direction of motion (measured in horizontal plane)\n - \"heading\" is where the fuselage points (measured in horizontal plane)\n - \"yaw\" indicates a relative rotation about the vertical axis\n TODO: REMOVE/INTEGRATE */\n    bool has_ground_speed;\n    uint32_t ground_speed;\n    /* TODO: REPLACE */\n    bool has_ground_track;\n    uint32_t ground_track;\n    /* GPS fix quality (from NMEA GxGGA statement or similar) */\n    uint32_t fix_quality;\n    /* GPS fix type 2D/3D (from NMEA GxGSA statement) */\n    uint32_t fix_type;\n    /* GPS \"Satellites in View\" number */\n    uint32_t sats_in_view;\n    /* Sensor ID - in case multiple positioning sensors are being used */\n    uint32_t sensor_id;\n    /* Estimated/expected time (in seconds) until next update:\n - if we update at fixed intervals of X seconds, use X\n - if we update at dynamic intervals (based on relative movement etc),\n   but \"AT LEAST every Y seconds\", use Y */\n    uint32_t next_update;\n    /* A sequence number, incremented with each Position message to help\n   detect lost updates if needed */\n    uint32_t seq_number;\n    /* Indicates the bits of precision set by the sending node */\n    uint32_t precision_bits;\n} meshtastic_Position;\n\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_User_public_key_t;\n/* Broadcast when a newly powered mesh node wants to find a node num it can use\n Sent from the phone over bluetooth to set the user id for the owner of this node.\n Also sent from nodes to each other when a new node signs on (so all clients can have this info)\n The algorithm is as follows:\n when a node starts up, it broadcasts their user and the normal flow is for all\n other nodes to reply with their User as well (so the new node can build its nodedb)\n If a node ever receives a User (not just the first broadcast) message where\n the sender node number equals our node number, that indicates a collision has\n occurred and the following steps should happen:\n If the receiving node (that was already in the mesh)'s macaddr is LOWER than the\n new User who just tried to sign in: it gets to keep its nodenum.\n We send a broadcast message of OUR User (we use a broadcast so that the other node can\n receive our message, considering we have the same id - it also serves to let\n observers correct their nodedb) - this case is rare so it should be okay.\n If any node receives a User where the macaddr is GTE than their local macaddr,\n they have been vetoed and should pick a new random nodenum (filtering against\n whatever it knows about the nodedb) and rebroadcast their User.\n A few nodenums are reserved and will never be requested:\n 0xff - broadcast\n 0 through 3 - for future use */\ntypedef struct _meshtastic_User {\n    /* A globally unique ID string for this user.\n In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>.\n Note: app developers are encouraged to also use the following standard\n node IDs \"^all\" (for broadcast), \"^local\" (for the locally connected node) */\n    char id[16];\n    /* A full name for this user, i.e. \"Kevin Hester\" */\n    char long_name[40];\n    /* A VERY short name, ideally two characters.\n Suitable for a tiny OLED screen */\n    char short_name[5];\n    /* Deprecated in Meshtastic 2.1.x\n This is the addr of the radio.\n Not populated by the phone, but added by the esp32 when broadcasting */\n    pb_byte_t macaddr[6];\n    /* TBEAM, HELTEC, etc...\n Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.\n Apps will still need the string here for older builds\n (so OTA update can find the right image), but if the enum is available it will be used instead. */\n    meshtastic_HardwareModel hw_model;\n    /* In some regions Ham radio operators have different bandwidth limitations than others.\n If this user is a licensed operator, set this flag.\n Also, \"long_name\" should be their licence number. */\n    bool is_licensed;\n    /* Indicates that the user's role in the mesh */\n    meshtastic_Config_DeviceConfig_Role role;\n    /* The public key of the user's device.\n This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */\n    meshtastic_User_public_key_t public_key;\n    /* Whether or not the node can be messaged */\n    bool has_is_unmessagable;\n    bool is_unmessagable;\n} meshtastic_User;\n\n/* A message used in a traceroute */\ntypedef struct _meshtastic_RouteDiscovery {\n    /* The list of nodenums this packet has visited so far to the destination. */\n    pb_size_t route_count;\n    uint32_t route[8];\n    /* The list of SNRs (in dB, scaled by 4) in the route towards the destination. */\n    pb_size_t snr_towards_count;\n    int8_t snr_towards[8];\n    /* The list of nodenums the packet has visited on the way back from the destination. */\n    pb_size_t route_back_count;\n    uint32_t route_back[8];\n    /* The list of SNRs (in dB, scaled by 4) in the route back from the destination. */\n    pb_size_t snr_back_count;\n    int8_t snr_back[8];\n} meshtastic_RouteDiscovery;\n\n/* A Routing control Data packet handled by the routing module */\ntypedef struct _meshtastic_Routing {\n    pb_size_t which_variant;\n    union {\n        /* A route request going from the requester */\n        meshtastic_RouteDiscovery route_request;\n        /* A route reply */\n        meshtastic_RouteDiscovery route_reply;\n        /* A failure in delivering a message (usually used for routing control messages, but might be provided\n     in addition to ack.fail_id to provide details on the type of failure). */\n        meshtastic_Routing_Error error_reason;\n    };\n} meshtastic_Routing;\n\ntypedef PB_BYTES_ARRAY_T(233) meshtastic_Data_payload_t;\n/* (Formerly called SubPacket)\n The payload portion fo a packet, this is the actual bytes that are sent\n inside a radio packet (because from/to are broken out by the comms library) */\ntypedef struct _meshtastic_Data {\n    /* Formerly named typ and of type Type */\n    meshtastic_PortNum portnum;\n    /* TODO: REPLACE */\n    meshtastic_Data_payload_t payload;\n    /* Not normally used, but for testing a sender can request that recipient\n responds in kind (i.e. if it received a position, it should unicast back it's position).\n Note: that if you set this on a broadcast you will receive many replies. */\n    bool want_response;\n    /* The address of the destination node.\n This field is is filled in by the mesh radio device software, application\n layer software should never need it.\n RouteDiscovery messages _must_ populate this.\n Other message types might need to if they are doing multihop routing. */\n    uint32_t dest;\n    /* The address of the original sender for this message.\n This field should _only_ be populated for reliable multihop packets (to keep\n packets small). */\n    uint32_t source;\n    /* Only used in routing or response messages.\n Indicates the original message ID that this message is reporting failure on. (formerly called original_id) */\n    uint32_t request_id;\n    /* If set, this message is intened to be a reply to a previously sent message with the defined id. */\n    uint32_t reply_id;\n    /* Defaults to false. If true, then what is in the payload should be treated as an emoji like giving\n a message a heart or poop emoji. */\n    uint32_t emoji;\n    /* Bitfield for extra flags. First use is to indicate that user approves the packet being uploaded to MQTT. */\n    bool has_bitfield;\n    uint8_t bitfield;\n} meshtastic_Data;\n\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_KeyVerification_hash1_t;\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_KeyVerification_hash2_t;\n/* The actual over-the-mesh message doing KeyVerification */\ntypedef struct _meshtastic_KeyVerification {\n    /* random value Selected by the requesting node */\n    uint64_t nonce;\n    /* The final authoritative hash, only to be sent by NodeA at the end of the handshake */\n    meshtastic_KeyVerification_hash1_t hash1;\n    /* The intermediary hash (actually derived from hash1),\n sent from NodeB to NodeA in response to the initial message. */\n    meshtastic_KeyVerification_hash2_t hash2;\n} meshtastic_KeyVerification;\n\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_StoreForwardPlusPlus_message_hash_t;\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_StoreForwardPlusPlus_commit_hash_t;\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_StoreForwardPlusPlus_root_hash_t;\ntypedef PB_BYTES_ARRAY_T(240) meshtastic_StoreForwardPlusPlus_message_t;\n/* The actual over-the-mesh message doing store and forward++ */\ntypedef struct _meshtastic_StoreForwardPlusPlus {\n    /* Which message type is this */\n    meshtastic_StoreForwardPlusPlus_SFPP_message_type sfpp_message_type;\n    /* The hash of the specific message */\n    meshtastic_StoreForwardPlusPlus_message_hash_t message_hash;\n    /* The hash of a link on a chain */\n    meshtastic_StoreForwardPlusPlus_commit_hash_t commit_hash;\n    /* the root hash of a chain */\n    meshtastic_StoreForwardPlusPlus_root_hash_t root_hash;\n    /* The encrypted bytes from a message */\n    meshtastic_StoreForwardPlusPlus_message_t message;\n    /* Message ID of the contained message */\n    uint32_t encapsulated_id;\n    /* Destination of the contained message */\n    uint32_t encapsulated_to;\n    /* Sender of the contained message */\n    uint32_t encapsulated_from;\n    /* The receive time of the message in question */\n    uint32_t encapsulated_rxtime;\n    /* Used in a LINK_REQUEST to specify the message X spots back from head */\n    uint32_t chain_count;\n} meshtastic_StoreForwardPlusPlus;\n\n/* Waypoint message, used to share arbitrary locations across the mesh */\ntypedef struct _meshtastic_Waypoint {\n    /* Id of the waypoint */\n    uint32_t id;\n    /* latitude_i */\n    bool has_latitude_i;\n    int32_t latitude_i;\n    /* longitude_i */\n    bool has_longitude_i;\n    int32_t longitude_i;\n    /* Time the waypoint is to expire (epoch) */\n    uint32_t expire;\n    /* If greater than zero, treat the value as a nodenum only allowing them to update the waypoint.\n If zero, the waypoint is open to be edited by any member of the mesh. */\n    uint32_t locked_to;\n    /* Name of the waypoint - max 30 chars */\n    char name[30];\n    /* Description of the waypoint - max 100 chars */\n    char description[100];\n    /* Designator icon for the waypoint in the form of a unicode emoji */\n    uint32_t icon;\n} meshtastic_Waypoint;\n\n/* Message for node status */\ntypedef struct _meshtastic_StatusMessage {\n    char status[80];\n} meshtastic_StatusMessage;\n\ntypedef PB_BYTES_ARRAY_T(435) meshtastic_MqttClientProxyMessage_data_t;\n/* This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server */\ntypedef struct _meshtastic_MqttClientProxyMessage {\n    /* The MQTT topic this message will be sent /received on */\n    char topic[60];\n    pb_size_t which_payload_variant;\n    union {\n        /* Bytes */\n        meshtastic_MqttClientProxyMessage_data_t data;\n        /* Text */\n        char text[435];\n    } payload_variant;\n    /* Whether the message should be retained (or not) */\n    bool retained;\n} meshtastic_MqttClientProxyMessage;\n\ntypedef PB_BYTES_ARRAY_T(256) meshtastic_MeshPacket_encrypted_t;\ntypedef PB_BYTES_ARRAY_T(32) meshtastic_MeshPacket_public_key_t;\n/* A packet envelope sent/received over the mesh\n only payload_variant is sent in the payload portion of the LORA packet.\n The other fields are either not sent at all, or sent in the special 16 byte LORA header. */\ntypedef struct _meshtastic_MeshPacket {\n    /* The sending node number.\n Note: Our crypto implementation uses this field as well.\n See [crypto](/docs/overview/encryption) for details. */\n    uint32_t from;\n    /* The (immediate) destination for this packet\n If the value is 4,294,967,295 (maximum value of an unsigned 32bit integer), this indicates that the packet was\n not destined for a specific node, but for a channel as indicated by the value of `channel` below.\n If the value is another, this indicates that the packet was destined for a specific\n node (i.e. a kind of \"Direct Message\" to this node) and not broadcast on a channel. */\n    uint32_t to;\n    /* (Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on.\n If unset, packet was on the primary channel.\n A particular node might know only a subset of channels in use on the mesh.\n Therefore channel_index is inherently a local concept and meaningless to send between nodes.\n Very briefly, while sending and receiving deep inside the device Router code, this field instead\n contains the 'channel hash' instead of the index.\n This 'trick' is only used while the payload_variant is an 'encrypted'. */\n    uint8_t channel;\n    pb_size_t which_payload_variant;\n    union {\n        /* TODO: REPLACE */\n        meshtastic_Data decoded;\n        /* TODO: REPLACE */\n        meshtastic_MeshPacket_encrypted_t encrypted;\n    };\n    /* A unique ID for this packet.\n Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space).\n Otherwise a unique ID for this packet, useful for flooding algorithms.\n ID only needs to be unique on a _per sender_ basis, and it only\n needs to be unique for a few minutes (long enough to last for the length of\n any ACK or the completion of a mesh broadcast flood).\n Note: Our crypto implementation uses this id as well.\n See [crypto](/docs/overview/encryption) for details. */\n    uint32_t id;\n    /* The time this message was received by the esp32 (secs since 1970).\n Note: this field is _never_ sent on the radio link itself (to save space) Times\n are typically not sent over the mesh, but they will be added to any Packet\n (chain of SubPacket) sent to the phone (so the phone can know exact time of reception) */\n    uint32_t rx_time;\n    /* *Never* sent over the radio links.\n Set during reception to indicate the SNR of this packet.\n Used to collect statistics on current link quality. */\n    float rx_snr;\n    /* If unset treated as zero (no forwarding, send to direct neighbor nodes only)\n if 1, allow hopping through one node, etc...\n For our usecase real world topologies probably have a max of about 3.\n This field is normally placed into a few of bits in the header. */\n    uint8_t hop_limit;\n    /* This packet is being sent as a reliable message, we would prefer it to arrive at the destination.\n We would like to receive a ack packet in response.\n Broadcasts messages treat this flag specially: Since acks for broadcasts would\n rapidly flood the channel, the normal ack behavior is suppressed.\n Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm).\n If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message.\n So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender.\n If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic.\n Note: This flag is normally sent in a flag bit in the header when sent over the wire */\n    bool want_ack;\n    /* The priority of this message for sending.\n See MeshPacket.Priority description for more details. */\n    meshtastic_MeshPacket_Priority priority;\n    /* rssi of received packet. Only sent to phone for dispay purposes. */\n    int32_t rx_rssi;\n    /* Describe if this message is delayed */\n    meshtastic_MeshPacket_Delayed delayed;\n    /* Describes whether this packet passed via MQTT somewhere along the path it currently took. */\n    bool via_mqtt;\n    /* Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.\n When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. */\n    uint8_t hop_start;\n    /* Records the public key the packet was encrypted with, if applicable. */\n    meshtastic_MeshPacket_public_key_t public_key;\n    /* Indicates whether the packet was en/decrypted using PKI */\n    bool pki_encrypted;\n    /* Last byte of the node number of the node that should be used as the next hop in routing.\n Set by the firmware internally, clients are not supposed to set this. */\n    uint8_t next_hop;\n    /* Last byte of the node number of the node that will relay/relayed this packet.\n Set by the firmware internally, clients are not supposed to set this. */\n    uint8_t relay_node;\n    /* *Never* sent over the radio links.\n Timestamp after which this packet may be sent.\n Set by the firmware internally, clients are not supposed to set this. */\n    uint32_t tx_after;\n    /* Indicates which transport mechanism this packet arrived over */\n    meshtastic_MeshPacket_TransportMechanism transport_mechanism;\n} meshtastic_MeshPacket;\n\n/* The bluetooth to device link:\n Old BTLE protocol docs from TODO, merge in above and make real docs...\n use protocol buffers, and NanoPB\n messages from device to phone:\n POSITION_UPDATE (..., time)\n TEXT_RECEIVED(from, text, time)\n OPAQUE_RECEIVED(from, payload, time) (for signal messages or other applications)\n messages from phone to device:\n SET_MYID(id, human readable long, human readable short) (send down the unique ID\n string used for this node, a human readable string shown for that id, and a very\n short human readable string suitable for oled screen) SEND_OPAQUE(dest, payload)\n (for signal messages or other applications) SEND_TEXT(dest, text) Get all\n nodes() (returns list of nodes, with full info, last time seen, loc, battery\n level etc) SET_CONFIG (switches device to a new set of radio params and\n preshared key, drops all existing nodes, force our node to rejoin this new group)\n Full information about a node on the mesh */\ntypedef struct _meshtastic_NodeInfo {\n    /* The node number */\n    uint32_t num;\n    /* The user info for this node */\n    bool has_user;\n    meshtastic_User user;\n    /* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.\n Position.time now indicates the last time we received a POSITION from that node. */\n    bool has_position;\n    meshtastic_Position position;\n    /* Returns the Signal-to-noise ratio (SNR) of the last received message,\n as measured by the receiver. Return SNR of the last received message in dB */\n    float snr;\n    /* Set to indicate the last time we received a packet from this node */\n    uint32_t last_heard;\n    /* The latest device metrics for the node. */\n    bool has_device_metrics;\n    meshtastic_DeviceMetrics device_metrics;\n    /* local channel index we heard that node on. Only populated if its not the default channel. */\n    uint8_t channel;\n    /* True if we witnessed the node over MQTT instead of LoRA transport */\n    bool via_mqtt;\n    /* Number of hops away from us this node is (0 if direct neighbor) */\n    bool has_hops_away;\n    uint8_t hops_away;\n    /* True if node is in our favorites list\n Persists between NodeDB internal clean ups */\n    bool is_favorite;\n    /* True if node is in our ignored list\n Persists between NodeDB internal clean ups */\n    bool is_ignored;\n    /* True if node public key has been verified.\n Persists between NodeDB internal clean ups\n LSB 0 of the bitfield */\n    bool is_key_manually_verified;\n    /* True if node has been muted\n Persistes between NodeDB internal clean ups */\n    bool is_muted;\n} meshtastic_NodeInfo;\n\ntypedef PB_BYTES_ARRAY_T(16) meshtastic_MyNodeInfo_device_id_t;\n/* Unique local debugging info for this node\n Note: we don't include position or the user info, because that will come in the\n Sent to the phone in response to WantNodes. */\ntypedef struct _meshtastic_MyNodeInfo {\n    /* Tells the phone what our node number is, default starting value is\n lowbyte of macaddr, but it will be fixed if that is already in use */\n    uint32_t my_node_num;\n    /* The total number of reboots this node has ever encountered\n (well - since the last time we discarded preferences) */\n    uint32_t reboot_count;\n    /* The minimum app version that can talk to this device.\n Phone/PC apps should compare this to their build number and if too low tell the user they must update their app */\n    uint32_t min_app_version;\n    /* Unique hardware identifier for this device */\n    meshtastic_MyNodeInfo_device_id_t device_id;\n    /* The PlatformIO environment used to build this firmware */\n    char pio_env[40];\n    /* The indicator for whether this device is running event firmware and which */\n    meshtastic_FirmwareEdition firmware_edition;\n    /* The number of nodes in the nodedb.\n This is used by the phone to know how many NodeInfo packets to expect on want_config */\n    uint16_t nodedb_count;\n} meshtastic_MyNodeInfo;\n\n/* Debug output from the device.\n To minimize the size of records inside the device code, if a time/source/level is not set\n on the message it is assumed to be a continuation of the previously sent message.\n This allows the device code to use fixed maxlen 64 byte strings for messages,\n and then extend as needed by emitting multiple records. */\ntypedef struct _meshtastic_LogRecord {\n    /* Log levels, chosen to match python logging conventions. */\n    char message[384];\n    /* Seconds since 1970 - or 0 for unknown/unset */\n    uint32_t time;\n    /* Usually based on thread name - if known */\n    char source[32];\n    /* Not yet set */\n    meshtastic_LogRecord_Level level;\n} meshtastic_LogRecord;\n\ntypedef struct _meshtastic_QueueStatus {\n    /* Last attempt to queue status, ErrorCode */\n    int8_t res;\n    /* Free entries in the outgoing queue */\n    uint8_t free;\n    /* Maximum entries in the outgoing queue */\n    uint8_t maxlen;\n    /* What was mesh packet id that generated this response? */\n    uint32_t mesh_packet_id;\n} meshtastic_QueueStatus;\n\ntypedef struct _meshtastic_KeyVerificationNumberInform {\n    uint64_t nonce;\n    char remote_longname[40];\n    uint32_t security_number;\n} meshtastic_KeyVerificationNumberInform;\n\ntypedef struct _meshtastic_KeyVerificationNumberRequest {\n    uint64_t nonce;\n    char remote_longname[40];\n} meshtastic_KeyVerificationNumberRequest;\n\ntypedef struct _meshtastic_KeyVerificationFinal {\n    uint64_t nonce;\n    char remote_longname[40];\n    bool isSender;\n    char verification_characters[10];\n} meshtastic_KeyVerificationFinal;\n\ntypedef struct _meshtastic_DuplicatedPublicKey {\n    char dummy_field;\n} meshtastic_DuplicatedPublicKey;\n\ntypedef struct _meshtastic_LowEntropyKey {\n    char dummy_field;\n} meshtastic_LowEntropyKey;\n\n/* A notification message from the device to the client\n To be used for important messages that should to be displayed to the user\n in the form of push notifications or validation messages when saving\n invalid configuration. */\ntypedef struct _meshtastic_ClientNotification {\n    /* The id of the packet we're notifying in response to */\n    bool has_reply_id;\n    uint32_t reply_id;\n    /* Seconds since 1970 - or 0 for unknown/unset */\n    uint32_t time;\n    /* The level type of notification */\n    meshtastic_LogRecord_Level level;\n    /* The message body of the notification */\n    char message[400];\n    pb_size_t which_payload_variant;\n    union {\n        meshtastic_KeyVerificationNumberInform key_verification_number_inform;\n        meshtastic_KeyVerificationNumberRequest key_verification_number_request;\n        meshtastic_KeyVerificationFinal key_verification_final;\n        meshtastic_DuplicatedPublicKey duplicated_public_key;\n        meshtastic_LowEntropyKey low_entropy_key;\n    } payload_variant;\n} meshtastic_ClientNotification;\n\n/* Individual File info for the device */\ntypedef struct _meshtastic_FileInfo {\n    /* The fully qualified path of the file */\n    char file_name[228];\n    /* The size of the file in bytes */\n    uint32_t size_bytes;\n} meshtastic_FileInfo;\n\ntypedef PB_BYTES_ARRAY_T(233) meshtastic_Compressed_data_t;\n/* Compressed message payload */\ntypedef struct _meshtastic_Compressed {\n    /* PortNum to determine the how to handle the compressed payload. */\n    meshtastic_PortNum portnum;\n    /* Compressed data. */\n    meshtastic_Compressed_data_t data;\n} meshtastic_Compressed;\n\n/* A single edge in the mesh */\ntypedef struct _meshtastic_Neighbor {\n    /* Node ID of neighbor */\n    uint32_t node_id;\n    /* SNR of last heard message */\n    float snr;\n    /* Reception time (in secs since 1970) of last message that was last sent by this ID.\n Note: this is for local storage only and will not be sent out over the mesh. */\n    uint32_t last_rx_time;\n    /* Broadcast interval of this neighbor (in seconds).\n Note: this is for local storage only and will not be sent out over the mesh. */\n    uint32_t node_broadcast_interval_secs;\n} meshtastic_Neighbor;\n\n/* Full info on edges for a single node */\ntypedef struct _meshtastic_NeighborInfo {\n    /* The node ID of the node sending info on its neighbors */\n    uint32_t node_id;\n    /* Field to pass neighbor info for the next sending cycle */\n    uint32_t last_sent_by_id;\n    /* Broadcast interval of the represented node (in seconds) */\n    uint32_t node_broadcast_interval_secs;\n    /* The list of out edges from this node */\n    pb_size_t neighbors_count;\n    meshtastic_Neighbor neighbors[10];\n} meshtastic_NeighborInfo;\n\n/* Device metadata response */\ntypedef struct _meshtastic_DeviceMetadata {\n    /* Device firmware version string */\n    char firmware_version[18];\n    /* Device state version */\n    uint32_t device_state_version;\n    /* Indicates whether the device can shutdown CPU natively or via power management chip */\n    bool canShutdown;\n    /* Indicates that the device has native wifi capability */\n    bool hasWifi;\n    /* Indicates that the device has native bluetooth capability */\n    bool hasBluetooth;\n    /* Indicates that the device has an ethernet peripheral */\n    bool hasEthernet;\n    /* Indicates that the device's role in the mesh */\n    meshtastic_Config_DeviceConfig_Role role;\n    /* Indicates the device's current enabled position flags */\n    uint32_t position_flags;\n    /* Device hardware model */\n    meshtastic_HardwareModel hw_model;\n    /* Has Remote Hardware enabled */\n    bool hasRemoteHardware;\n    /* Has PKC capabilities */\n    bool hasPKC;\n    /* Bit field of boolean for excluded modules\n (bitwise OR of ExcludedModules) */\n    uint32_t excluded_modules;\n} meshtastic_DeviceMetadata;\n\n/* Packets from the radio to the phone will appear on the fromRadio characteristic.\n It will support READ and NOTIFY. When a new packet arrives the device will BLE notify?\n It will sit in that descriptor until consumed by the phone,\n at which point the next item in the FIFO will be populated. */\ntypedef struct _meshtastic_FromRadio {\n    /* The packet id, used to allow the phone to request missing read packets from the FIFO,\n see our bluetooth docs */\n    uint32_t id;\n    pb_size_t which_payload_variant;\n    union {\n        /* Log levels, chosen to match python logging conventions. */\n        meshtastic_MeshPacket packet;\n        /* Tells the phone what our node number is, can be -1 if we've not yet joined a mesh.\n     NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. */\n        meshtastic_MyNodeInfo my_info;\n        /* One packet is sent for each node in the on radio DB\n     starts over with the first node in our DB */\n        meshtastic_NodeInfo node_info;\n        /* Include a part of the config (was: RadioConfig radio) */\n        meshtastic_Config config;\n        /* Set to send debug console output over our protobuf stream */\n        meshtastic_LogRecord log_record;\n        /* Sent as true once the device has finished sending all of the responses to want_config\n     recipient should check if this ID matches our original request nonce, if\n     not, it means your config responses haven't started yet.\n     NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. */\n        uint32_t config_complete_id;\n        /* Sent to tell clients the radio has just rebooted.\n     Set to true if present.\n     Not used on all transports, currently just used for the serial console.\n     NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. */\n        bool rebooted;\n        /* Include module config */\n        meshtastic_ModuleConfig moduleConfig;\n        /* One packet is sent for each channel */\n        meshtastic_Channel channel;\n        /* Queue status info */\n        meshtastic_QueueStatus queueStatus;\n        /* File Transfer Chunk */\n        meshtastic_XModem xmodemPacket;\n        /* Device metadata message */\n        meshtastic_DeviceMetadata metadata;\n        /* MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) */\n        meshtastic_MqttClientProxyMessage mqttClientProxyMessage;\n        /* File system manifest messages */\n        meshtastic_FileInfo fileInfo;\n        /* Notification message to the client */\n        meshtastic_ClientNotification clientNotification;\n        /* Persistent data for device-ui */\n        meshtastic_DeviceUIConfig deviceuiConfig;\n    };\n} meshtastic_FromRadio;\n\n/* A heartbeat message is sent to the node from the client to keep the connection alive.\n This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI. */\ntypedef struct _meshtastic_Heartbeat {\n    /* The nonce of the heartbeat message */\n    uint32_t nonce;\n} meshtastic_Heartbeat;\n\n/* Packets/commands to the radio will be written (reliably) to the toRadio characteristic.\n Once the write completes the phone can assume it is handled. */\ntypedef struct _meshtastic_ToRadio {\n    pb_size_t which_payload_variant;\n    union {\n        /* Send this packet on the mesh */\n        meshtastic_MeshPacket packet;\n        /* Phone wants radio to send full node db to the phone, This is\n     typically the first packet sent to the radio when the phone gets a\n     bluetooth connection. The radio will respond by sending back a\n     MyNodeInfo, a owner, a radio config and a series of\n     FromRadio.node_infos, and config_complete\n     the integer you write into this field will be reported back in the\n     config_complete_id response this allows clients to never be confused by\n     a stale old partially sent config. */\n        uint32_t want_config_id;\n        /* Tell API server we are disconnecting now.\n     This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link.\n     (Sending this message is optional for clients) */\n        bool disconnect;\n        meshtastic_XModem xmodemPacket;\n        /* MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) */\n        meshtastic_MqttClientProxyMessage mqttClientProxyMessage;\n        /* Heartbeat message (used to keep the device connection awake on serial) */\n        meshtastic_Heartbeat heartbeat;\n    };\n} meshtastic_ToRadio;\n\n/* RemoteHardwarePins associated with a node */\ntypedef struct _meshtastic_NodeRemoteHardwarePin {\n    /* The node_num exposing the available gpio pin */\n    uint32_t node_num;\n    /* The the available gpio pin for usage with RemoteHardware module */\n    bool has_pin;\n    meshtastic_RemoteHardwarePin pin;\n} meshtastic_NodeRemoteHardwarePin;\n\ntypedef PB_BYTES_ARRAY_T(228) meshtastic_ChunkedPayload_payload_chunk_t;\ntypedef struct _meshtastic_ChunkedPayload {\n    /* The ID of the entire payload */\n    uint32_t payload_id;\n    /* The total number of chunks in the payload */\n    uint16_t chunk_count;\n    /* The current chunk index in the total */\n    uint16_t chunk_index;\n    /* The binary data of the current chunk */\n    meshtastic_ChunkedPayload_payload_chunk_t payload_chunk;\n} meshtastic_ChunkedPayload;\n\n/* Wrapper message for broken repeated oneof support */\ntypedef struct _meshtastic_resend_chunks {\n    pb_callback_t chunks;\n} meshtastic_resend_chunks;\n\n/* Responses to a ChunkedPayload request */\ntypedef struct _meshtastic_ChunkedPayloadResponse {\n    /* The ID of the entire payload */\n    uint32_t payload_id;\n    pb_size_t which_payload_variant;\n    union {\n        /* Request to transfer chunked payload */\n        bool request_transfer;\n        /* Accept the transfer chunked payload */\n        bool accept_transfer;\n        /* Request missing indexes in the chunked payload */\n        meshtastic_resend_chunks resend_chunks;\n    } payload_variant;\n} meshtastic_ChunkedPayloadResponse;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_HardwareModel_MIN meshtastic_HardwareModel_UNSET\n#define _meshtastic_HardwareModel_MAX meshtastic_HardwareModel_PRIVATE_HW\n#define _meshtastic_HardwareModel_ARRAYSIZE ((meshtastic_HardwareModel)(meshtastic_HardwareModel_PRIVATE_HW+1))\n\n#define _meshtastic_Constants_MIN meshtastic_Constants_ZERO\n#define _meshtastic_Constants_MAX meshtastic_Constants_DATA_PAYLOAD_LEN\n#define _meshtastic_Constants_ARRAYSIZE ((meshtastic_Constants)(meshtastic_Constants_DATA_PAYLOAD_LEN+1))\n\n#define _meshtastic_CriticalErrorCode_MIN meshtastic_CriticalErrorCode_NONE\n#define _meshtastic_CriticalErrorCode_MAX meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE\n#define _meshtastic_CriticalErrorCode_ARRAYSIZE ((meshtastic_CriticalErrorCode)(meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE+1))\n\n#define _meshtastic_FirmwareEdition_MIN meshtastic_FirmwareEdition_VANILLA\n#define _meshtastic_FirmwareEdition_MAX meshtastic_FirmwareEdition_DIY_EDITION\n#define _meshtastic_FirmwareEdition_ARRAYSIZE ((meshtastic_FirmwareEdition)(meshtastic_FirmwareEdition_DIY_EDITION+1))\n\n#define _meshtastic_ExcludedModules_MIN meshtastic_ExcludedModules_EXCLUDED_NONE\n#define _meshtastic_ExcludedModules_MAX meshtastic_ExcludedModules_NETWORK_CONFIG\n#define _meshtastic_ExcludedModules_ARRAYSIZE ((meshtastic_ExcludedModules)(meshtastic_ExcludedModules_NETWORK_CONFIG+1))\n\n#define _meshtastic_Position_LocSource_MIN meshtastic_Position_LocSource_LOC_UNSET\n#define _meshtastic_Position_LocSource_MAX meshtastic_Position_LocSource_LOC_EXTERNAL\n#define _meshtastic_Position_LocSource_ARRAYSIZE ((meshtastic_Position_LocSource)(meshtastic_Position_LocSource_LOC_EXTERNAL+1))\n\n#define _meshtastic_Position_AltSource_MIN meshtastic_Position_AltSource_ALT_UNSET\n#define _meshtastic_Position_AltSource_MAX meshtastic_Position_AltSource_ALT_BAROMETRIC\n#define _meshtastic_Position_AltSource_ARRAYSIZE ((meshtastic_Position_AltSource)(meshtastic_Position_AltSource_ALT_BAROMETRIC+1))\n\n#define _meshtastic_Routing_Error_MIN meshtastic_Routing_Error_NONE\n#define _meshtastic_Routing_Error_MAX meshtastic_Routing_Error_PKI_SEND_FAIL_PUBLIC_KEY\n#define _meshtastic_Routing_Error_ARRAYSIZE ((meshtastic_Routing_Error)(meshtastic_Routing_Error_PKI_SEND_FAIL_PUBLIC_KEY+1))\n\n#define _meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN meshtastic_StoreForwardPlusPlus_SFPP_message_type_CANON_ANNOUNCE\n#define _meshtastic_StoreForwardPlusPlus_SFPP_message_type_MAX meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE_SECONDHALF\n#define _meshtastic_StoreForwardPlusPlus_SFPP_message_type_ARRAYSIZE ((meshtastic_StoreForwardPlusPlus_SFPP_message_type)(meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE_SECONDHALF+1))\n\n#define _meshtastic_MeshPacket_Priority_MIN meshtastic_MeshPacket_Priority_UNSET\n#define _meshtastic_MeshPacket_Priority_MAX meshtastic_MeshPacket_Priority_MAX\n#define _meshtastic_MeshPacket_Priority_ARRAYSIZE ((meshtastic_MeshPacket_Priority)(meshtastic_MeshPacket_Priority_MAX+1))\n\n#define _meshtastic_MeshPacket_Delayed_MIN meshtastic_MeshPacket_Delayed_NO_DELAY\n#define _meshtastic_MeshPacket_Delayed_MAX meshtastic_MeshPacket_Delayed_DELAYED_DIRECT\n#define _meshtastic_MeshPacket_Delayed_ARRAYSIZE ((meshtastic_MeshPacket_Delayed)(meshtastic_MeshPacket_Delayed_DELAYED_DIRECT+1))\n\n#define _meshtastic_MeshPacket_TransportMechanism_MIN meshtastic_MeshPacket_TransportMechanism_TRANSPORT_INTERNAL\n#define _meshtastic_MeshPacket_TransportMechanism_MAX meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API\n#define _meshtastic_MeshPacket_TransportMechanism_ARRAYSIZE ((meshtastic_MeshPacket_TransportMechanism)(meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API+1))\n\n#define _meshtastic_LogRecord_Level_MIN meshtastic_LogRecord_Level_UNSET\n#define _meshtastic_LogRecord_Level_MAX meshtastic_LogRecord_Level_CRITICAL\n#define _meshtastic_LogRecord_Level_ARRAYSIZE ((meshtastic_LogRecord_Level)(meshtastic_LogRecord_Level_CRITICAL+1))\n\n#define meshtastic_Position_location_source_ENUMTYPE meshtastic_Position_LocSource\n#define meshtastic_Position_altitude_source_ENUMTYPE meshtastic_Position_AltSource\n\n#define meshtastic_User_hw_model_ENUMTYPE meshtastic_HardwareModel\n#define meshtastic_User_role_ENUMTYPE meshtastic_Config_DeviceConfig_Role\n\n\n#define meshtastic_Routing_variant_error_reason_ENUMTYPE meshtastic_Routing_Error\n\n#define meshtastic_Data_portnum_ENUMTYPE meshtastic_PortNum\n\n\n#define meshtastic_StoreForwardPlusPlus_sfpp_message_type_ENUMTYPE meshtastic_StoreForwardPlusPlus_SFPP_message_type\n\n\n\n\n#define meshtastic_MeshPacket_priority_ENUMTYPE meshtastic_MeshPacket_Priority\n#define meshtastic_MeshPacket_delayed_ENUMTYPE meshtastic_MeshPacket_Delayed\n#define meshtastic_MeshPacket_transport_mechanism_ENUMTYPE meshtastic_MeshPacket_TransportMechanism\n\n\n#define meshtastic_MyNodeInfo_firmware_edition_ENUMTYPE meshtastic_FirmwareEdition\n\n#define meshtastic_LogRecord_level_ENUMTYPE meshtastic_LogRecord_Level\n\n\n\n#define meshtastic_ClientNotification_level_ENUMTYPE meshtastic_LogRecord_Level\n\n\n\n\n\n\n\n\n#define meshtastic_Compressed_portnum_ENUMTYPE meshtastic_PortNum\n\n\n\n#define meshtastic_DeviceMetadata_role_ENUMTYPE meshtastic_Config_DeviceConfig_Role\n#define meshtastic_DeviceMetadata_hw_model_ENUMTYPE meshtastic_HardwareModel\n\n\n\n\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_Position_init_default         {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_User_init_default             {\"\", \"\", \"\", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}, false, 0}\n#define meshtastic_RouteDiscovery_init_default   {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}\n#define meshtastic_Routing_init_default          {0, {meshtastic_RouteDiscovery_init_default}}\n#define meshtastic_Data_init_default             {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}\n#define meshtastic_KeyVerification_init_default  {0, {0, {0}}, {0, {0}}}\n#define meshtastic_StoreForwardPlusPlus_init_default {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}\n#define meshtastic_Waypoint_init_default         {0, false, 0, false, 0, 0, 0, \"\", \"\", 0}\n#define meshtastic_StatusMessage_init_default    {\"\"}\n#define meshtastic_MqttClientProxyMessage_init_default {\"\", 0, {{0, {0}}}, 0}\n#define meshtastic_MeshPacket_init_default       {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN}\n#define meshtastic_NodeInfo_init_default         {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0, 0, 0}\n#define meshtastic_MyNodeInfo_init_default       {0, 0, 0, {0, {0}}, \"\", _meshtastic_FirmwareEdition_MIN, 0}\n#define meshtastic_LogRecord_init_default        {\"\", 0, \"\", _meshtastic_LogRecord_Level_MIN}\n#define meshtastic_QueueStatus_init_default      {0, 0, 0, 0}\n#define meshtastic_FromRadio_init_default        {0, 0, {meshtastic_MeshPacket_init_default}}\n#define meshtastic_ClientNotification_init_default {false, 0, 0, _meshtastic_LogRecord_Level_MIN, \"\", 0, {meshtastic_KeyVerificationNumberInform_init_default}}\n#define meshtastic_KeyVerificationNumberInform_init_default {0, \"\", 0}\n#define meshtastic_KeyVerificationNumberRequest_init_default {0, \"\"}\n#define meshtastic_KeyVerificationFinal_init_default {0, \"\", 0, \"\"}\n#define meshtastic_DuplicatedPublicKey_init_default {0}\n#define meshtastic_LowEntropyKey_init_default    {0}\n#define meshtastic_FileInfo_init_default         {\"\", 0}\n#define meshtastic_ToRadio_init_default          {0, {meshtastic_MeshPacket_init_default}}\n#define meshtastic_Compressed_init_default       {_meshtastic_PortNum_MIN, {0, {0}}}\n#define meshtastic_NeighborInfo_init_default     {0, 0, 0, 0, {meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default}}\n#define meshtastic_Neighbor_init_default         {0, 0, 0, 0}\n#define meshtastic_DeviceMetadata_init_default   {\"\", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0, 0, 0}\n#define meshtastic_Heartbeat_init_default        {0}\n#define meshtastic_NodeRemoteHardwarePin_init_default {0, false, meshtastic_RemoteHardwarePin_init_default}\n#define meshtastic_ChunkedPayload_init_default   {0, 0, 0, {0, {0}}}\n#define meshtastic_resend_chunks_init_default    {{{NULL}, NULL}}\n#define meshtastic_ChunkedPayloadResponse_init_default {0, 0, {0}}\n#define meshtastic_Position_init_zero            {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_User_init_zero                {\"\", \"\", \"\", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}, false, 0}\n#define meshtastic_RouteDiscovery_init_zero      {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}\n#define meshtastic_Routing_init_zero             {0, {meshtastic_RouteDiscovery_init_zero}}\n#define meshtastic_Data_init_zero                {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}\n#define meshtastic_KeyVerification_init_zero     {0, {0, {0}}, {0, {0}}}\n#define meshtastic_StoreForwardPlusPlus_init_zero {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}\n#define meshtastic_Waypoint_init_zero            {0, false, 0, false, 0, 0, 0, \"\", \"\", 0}\n#define meshtastic_StatusMessage_init_zero       {\"\"}\n#define meshtastic_MqttClientProxyMessage_init_zero {\"\", 0, {{0, {0}}}, 0}\n#define meshtastic_MeshPacket_init_zero          {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN}\n#define meshtastic_NodeInfo_init_zero            {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0, 0, 0}\n#define meshtastic_MyNodeInfo_init_zero          {0, 0, 0, {0, {0}}, \"\", _meshtastic_FirmwareEdition_MIN, 0}\n#define meshtastic_LogRecord_init_zero           {\"\", 0, \"\", _meshtastic_LogRecord_Level_MIN}\n#define meshtastic_QueueStatus_init_zero         {0, 0, 0, 0}\n#define meshtastic_FromRadio_init_zero           {0, 0, {meshtastic_MeshPacket_init_zero}}\n#define meshtastic_ClientNotification_init_zero  {false, 0, 0, _meshtastic_LogRecord_Level_MIN, \"\", 0, {meshtastic_KeyVerificationNumberInform_init_zero}}\n#define meshtastic_KeyVerificationNumberInform_init_zero {0, \"\", 0}\n#define meshtastic_KeyVerificationNumberRequest_init_zero {0, \"\"}\n#define meshtastic_KeyVerificationFinal_init_zero {0, \"\", 0, \"\"}\n#define meshtastic_DuplicatedPublicKey_init_zero {0}\n#define meshtastic_LowEntropyKey_init_zero       {0}\n#define meshtastic_FileInfo_init_zero            {\"\", 0}\n#define meshtastic_ToRadio_init_zero             {0, {meshtastic_MeshPacket_init_zero}}\n#define meshtastic_Compressed_init_zero          {_meshtastic_PortNum_MIN, {0, {0}}}\n#define meshtastic_NeighborInfo_init_zero        {0, 0, 0, 0, {meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero}}\n#define meshtastic_Neighbor_init_zero            {0, 0, 0, 0}\n#define meshtastic_DeviceMetadata_init_zero      {\"\", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN, 0, 0, 0}\n#define meshtastic_Heartbeat_init_zero           {0}\n#define meshtastic_NodeRemoteHardwarePin_init_zero {0, false, meshtastic_RemoteHardwarePin_init_zero}\n#define meshtastic_ChunkedPayload_init_zero      {0, 0, 0, {0, {0}}}\n#define meshtastic_resend_chunks_init_zero       {{{NULL}, NULL}}\n#define meshtastic_ChunkedPayloadResponse_init_zero {0, 0, {0}}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_Position_latitude_i_tag       1\n#define meshtastic_Position_longitude_i_tag      2\n#define meshtastic_Position_altitude_tag         3\n#define meshtastic_Position_time_tag             4\n#define meshtastic_Position_location_source_tag  5\n#define meshtastic_Position_altitude_source_tag  6\n#define meshtastic_Position_timestamp_tag        7\n#define meshtastic_Position_timestamp_millis_adjust_tag 8\n#define meshtastic_Position_altitude_hae_tag     9\n#define meshtastic_Position_altitude_geoidal_separation_tag 10\n#define meshtastic_Position_PDOP_tag             11\n#define meshtastic_Position_HDOP_tag             12\n#define meshtastic_Position_VDOP_tag             13\n#define meshtastic_Position_gps_accuracy_tag     14\n#define meshtastic_Position_ground_speed_tag     15\n#define meshtastic_Position_ground_track_tag     16\n#define meshtastic_Position_fix_quality_tag      17\n#define meshtastic_Position_fix_type_tag         18\n#define meshtastic_Position_sats_in_view_tag     19\n#define meshtastic_Position_sensor_id_tag        20\n#define meshtastic_Position_next_update_tag      21\n#define meshtastic_Position_seq_number_tag       22\n#define meshtastic_Position_precision_bits_tag   23\n#define meshtastic_User_id_tag                   1\n#define meshtastic_User_long_name_tag            2\n#define meshtastic_User_short_name_tag           3\n#define meshtastic_User_macaddr_tag              4\n#define meshtastic_User_hw_model_tag             5\n#define meshtastic_User_is_licensed_tag          6\n#define meshtastic_User_role_tag                 7\n#define meshtastic_User_public_key_tag           8\n#define meshtastic_User_is_unmessagable_tag      9\n#define meshtastic_RouteDiscovery_route_tag      1\n#define meshtastic_RouteDiscovery_snr_towards_tag 2\n#define meshtastic_RouteDiscovery_route_back_tag 3\n#define meshtastic_RouteDiscovery_snr_back_tag   4\n#define meshtastic_Routing_route_request_tag     1\n#define meshtastic_Routing_route_reply_tag       2\n#define meshtastic_Routing_error_reason_tag      3\n#define meshtastic_Data_portnum_tag              1\n#define meshtastic_Data_payload_tag              2\n#define meshtastic_Data_want_response_tag        3\n#define meshtastic_Data_dest_tag                 4\n#define meshtastic_Data_source_tag               5\n#define meshtastic_Data_request_id_tag           6\n#define meshtastic_Data_reply_id_tag             7\n#define meshtastic_Data_emoji_tag                8\n#define meshtastic_Data_bitfield_tag             9\n#define meshtastic_KeyVerification_nonce_tag     1\n#define meshtastic_KeyVerification_hash1_tag     2\n#define meshtastic_KeyVerification_hash2_tag     3\n#define meshtastic_StoreForwardPlusPlus_sfpp_message_type_tag 1\n#define meshtastic_StoreForwardPlusPlus_message_hash_tag 2\n#define meshtastic_StoreForwardPlusPlus_commit_hash_tag 3\n#define meshtastic_StoreForwardPlusPlus_root_hash_tag 4\n#define meshtastic_StoreForwardPlusPlus_message_tag 5\n#define meshtastic_StoreForwardPlusPlus_encapsulated_id_tag 6\n#define meshtastic_StoreForwardPlusPlus_encapsulated_to_tag 7\n#define meshtastic_StoreForwardPlusPlus_encapsulated_from_tag 8\n#define meshtastic_StoreForwardPlusPlus_encapsulated_rxtime_tag 9\n#define meshtastic_StoreForwardPlusPlus_chain_count_tag 10\n#define meshtastic_Waypoint_id_tag               1\n#define meshtastic_Waypoint_latitude_i_tag       2\n#define meshtastic_Waypoint_longitude_i_tag      3\n#define meshtastic_Waypoint_expire_tag           4\n#define meshtastic_Waypoint_locked_to_tag        5\n#define meshtastic_Waypoint_name_tag             6\n#define meshtastic_Waypoint_description_tag      7\n#define meshtastic_Waypoint_icon_tag             8\n#define meshtastic_StatusMessage_status_tag      1\n#define meshtastic_MqttClientProxyMessage_topic_tag 1\n#define meshtastic_MqttClientProxyMessage_data_tag 2\n#define meshtastic_MqttClientProxyMessage_text_tag 3\n#define meshtastic_MqttClientProxyMessage_retained_tag 4\n#define meshtastic_MeshPacket_from_tag           1\n#define meshtastic_MeshPacket_to_tag             2\n#define meshtastic_MeshPacket_channel_tag        3\n#define meshtastic_MeshPacket_decoded_tag        4\n#define meshtastic_MeshPacket_encrypted_tag      5\n#define meshtastic_MeshPacket_id_tag             6\n#define meshtastic_MeshPacket_rx_time_tag        7\n#define meshtastic_MeshPacket_rx_snr_tag         8\n#define meshtastic_MeshPacket_hop_limit_tag      9\n#define meshtastic_MeshPacket_want_ack_tag       10\n#define meshtastic_MeshPacket_priority_tag       11\n#define meshtastic_MeshPacket_rx_rssi_tag        12\n#define meshtastic_MeshPacket_delayed_tag        13\n#define meshtastic_MeshPacket_via_mqtt_tag       14\n#define meshtastic_MeshPacket_hop_start_tag      15\n#define meshtastic_MeshPacket_public_key_tag     16\n#define meshtastic_MeshPacket_pki_encrypted_tag  17\n#define meshtastic_MeshPacket_next_hop_tag       18\n#define meshtastic_MeshPacket_relay_node_tag     19\n#define meshtastic_MeshPacket_tx_after_tag       20\n#define meshtastic_MeshPacket_transport_mechanism_tag 21\n#define meshtastic_NodeInfo_num_tag              1\n#define meshtastic_NodeInfo_user_tag             2\n#define meshtastic_NodeInfo_position_tag         3\n#define meshtastic_NodeInfo_snr_tag              4\n#define meshtastic_NodeInfo_last_heard_tag       5\n#define meshtastic_NodeInfo_device_metrics_tag   6\n#define meshtastic_NodeInfo_channel_tag          7\n#define meshtastic_NodeInfo_via_mqtt_tag         8\n#define meshtastic_NodeInfo_hops_away_tag        9\n#define meshtastic_NodeInfo_is_favorite_tag      10\n#define meshtastic_NodeInfo_is_ignored_tag       11\n#define meshtastic_NodeInfo_is_key_manually_verified_tag 12\n#define meshtastic_NodeInfo_is_muted_tag         13\n#define meshtastic_MyNodeInfo_my_node_num_tag    1\n#define meshtastic_MyNodeInfo_reboot_count_tag   8\n#define meshtastic_MyNodeInfo_min_app_version_tag 11\n#define meshtastic_MyNodeInfo_device_id_tag      12\n#define meshtastic_MyNodeInfo_pio_env_tag        13\n#define meshtastic_MyNodeInfo_firmware_edition_tag 14\n#define meshtastic_MyNodeInfo_nodedb_count_tag   15\n#define meshtastic_LogRecord_message_tag         1\n#define meshtastic_LogRecord_time_tag            2\n#define meshtastic_LogRecord_source_tag          3\n#define meshtastic_LogRecord_level_tag           4\n#define meshtastic_QueueStatus_res_tag           1\n#define meshtastic_QueueStatus_free_tag          2\n#define meshtastic_QueueStatus_maxlen_tag        3\n#define meshtastic_QueueStatus_mesh_packet_id_tag 4\n#define meshtastic_KeyVerificationNumberInform_nonce_tag 1\n#define meshtastic_KeyVerificationNumberInform_remote_longname_tag 2\n#define meshtastic_KeyVerificationNumberInform_security_number_tag 3\n#define meshtastic_KeyVerificationNumberRequest_nonce_tag 1\n#define meshtastic_KeyVerificationNumberRequest_remote_longname_tag 2\n#define meshtastic_KeyVerificationFinal_nonce_tag 1\n#define meshtastic_KeyVerificationFinal_remote_longname_tag 2\n#define meshtastic_KeyVerificationFinal_isSender_tag 3\n#define meshtastic_KeyVerificationFinal_verification_characters_tag 4\n#define meshtastic_ClientNotification_reply_id_tag 1\n#define meshtastic_ClientNotification_time_tag   2\n#define meshtastic_ClientNotification_level_tag  3\n#define meshtastic_ClientNotification_message_tag 4\n#define meshtastic_ClientNotification_key_verification_number_inform_tag 11\n#define meshtastic_ClientNotification_key_verification_number_request_tag 12\n#define meshtastic_ClientNotification_key_verification_final_tag 13\n#define meshtastic_ClientNotification_duplicated_public_key_tag 14\n#define meshtastic_ClientNotification_low_entropy_key_tag 15\n#define meshtastic_FileInfo_file_name_tag        1\n#define meshtastic_FileInfo_size_bytes_tag       2\n#define meshtastic_Compressed_portnum_tag        1\n#define meshtastic_Compressed_data_tag           2\n#define meshtastic_Neighbor_node_id_tag          1\n#define meshtastic_Neighbor_snr_tag              2\n#define meshtastic_Neighbor_last_rx_time_tag     3\n#define meshtastic_Neighbor_node_broadcast_interval_secs_tag 4\n#define meshtastic_NeighborInfo_node_id_tag      1\n#define meshtastic_NeighborInfo_last_sent_by_id_tag 2\n#define meshtastic_NeighborInfo_node_broadcast_interval_secs_tag 3\n#define meshtastic_NeighborInfo_neighbors_tag    4\n#define meshtastic_DeviceMetadata_firmware_version_tag 1\n#define meshtastic_DeviceMetadata_device_state_version_tag 2\n#define meshtastic_DeviceMetadata_canShutdown_tag 3\n#define meshtastic_DeviceMetadata_hasWifi_tag    4\n#define meshtastic_DeviceMetadata_hasBluetooth_tag 5\n#define meshtastic_DeviceMetadata_hasEthernet_tag 6\n#define meshtastic_DeviceMetadata_role_tag       7\n#define meshtastic_DeviceMetadata_position_flags_tag 8\n#define meshtastic_DeviceMetadata_hw_model_tag   9\n#define meshtastic_DeviceMetadata_hasRemoteHardware_tag 10\n#define meshtastic_DeviceMetadata_hasPKC_tag     11\n#define meshtastic_DeviceMetadata_excluded_modules_tag 12\n#define meshtastic_FromRadio_id_tag              1\n#define meshtastic_FromRadio_packet_tag          2\n#define meshtastic_FromRadio_my_info_tag         3\n#define meshtastic_FromRadio_node_info_tag       4\n#define meshtastic_FromRadio_config_tag          5\n#define meshtastic_FromRadio_log_record_tag      6\n#define meshtastic_FromRadio_config_complete_id_tag 7\n#define meshtastic_FromRadio_rebooted_tag        8\n#define meshtastic_FromRadio_moduleConfig_tag    9\n#define meshtastic_FromRadio_channel_tag         10\n#define meshtastic_FromRadio_queueStatus_tag     11\n#define meshtastic_FromRadio_xmodemPacket_tag    12\n#define meshtastic_FromRadio_metadata_tag        13\n#define meshtastic_FromRadio_mqttClientProxyMessage_tag 14\n#define meshtastic_FromRadio_fileInfo_tag        15\n#define meshtastic_FromRadio_clientNotification_tag 16\n#define meshtastic_FromRadio_deviceuiConfig_tag  17\n#define meshtastic_Heartbeat_nonce_tag           1\n#define meshtastic_ToRadio_packet_tag            1\n#define meshtastic_ToRadio_want_config_id_tag    3\n#define meshtastic_ToRadio_disconnect_tag        4\n#define meshtastic_ToRadio_xmodemPacket_tag      5\n#define meshtastic_ToRadio_mqttClientProxyMessage_tag 6\n#define meshtastic_ToRadio_heartbeat_tag         7\n#define meshtastic_NodeRemoteHardwarePin_node_num_tag 1\n#define meshtastic_NodeRemoteHardwarePin_pin_tag 2\n#define meshtastic_ChunkedPayload_payload_id_tag 1\n#define meshtastic_ChunkedPayload_chunk_count_tag 2\n#define meshtastic_ChunkedPayload_chunk_index_tag 3\n#define meshtastic_ChunkedPayload_payload_chunk_tag 4\n#define meshtastic_resend_chunks_chunks_tag      1\n#define meshtastic_ChunkedPayloadResponse_payload_id_tag 1\n#define meshtastic_ChunkedPayloadResponse_request_transfer_tag 2\n#define meshtastic_ChunkedPayloadResponse_accept_transfer_tag 3\n#define meshtastic_ChunkedPayloadResponse_resend_chunks_tag 4\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_Position_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, SFIXED32, latitude_i,        1) \\\nX(a, STATIC,   OPTIONAL, SFIXED32, longitude_i,       2) \\\nX(a, STATIC,   OPTIONAL, INT32,    altitude,          3) \\\nX(a, STATIC,   SINGULAR, FIXED32,  time,              4) \\\nX(a, STATIC,   SINGULAR, UENUM,    location_source,   5) \\\nX(a, STATIC,   SINGULAR, UENUM,    altitude_source,   6) \\\nX(a, STATIC,   SINGULAR, FIXED32,  timestamp,         7) \\\nX(a, STATIC,   SINGULAR, INT32,    timestamp_millis_adjust,   8) \\\nX(a, STATIC,   OPTIONAL, SINT32,   altitude_hae,      9) \\\nX(a, STATIC,   OPTIONAL, SINT32,   altitude_geoidal_separation,  10) \\\nX(a, STATIC,   SINGULAR, UINT32,   PDOP,             11) \\\nX(a, STATIC,   SINGULAR, UINT32,   HDOP,             12) \\\nX(a, STATIC,   SINGULAR, UINT32,   VDOP,             13) \\\nX(a, STATIC,   SINGULAR, UINT32,   gps_accuracy,     14) \\\nX(a, STATIC,   OPTIONAL, UINT32,   ground_speed,     15) \\\nX(a, STATIC,   OPTIONAL, UINT32,   ground_track,     16) \\\nX(a, STATIC,   SINGULAR, UINT32,   fix_quality,      17) \\\nX(a, STATIC,   SINGULAR, UINT32,   fix_type,         18) \\\nX(a, STATIC,   SINGULAR, UINT32,   sats_in_view,     19) \\\nX(a, STATIC,   SINGULAR, UINT32,   sensor_id,        20) \\\nX(a, STATIC,   SINGULAR, UINT32,   next_update,      21) \\\nX(a, STATIC,   SINGULAR, UINT32,   seq_number,       22) \\\nX(a, STATIC,   SINGULAR, UINT32,   precision_bits,   23)\n#define meshtastic_Position_CALLBACK NULL\n#define meshtastic_Position_DEFAULT NULL\n\n#define meshtastic_User_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   id,                1) \\\nX(a, STATIC,   SINGULAR, STRING,   long_name,         2) \\\nX(a, STATIC,   SINGULAR, STRING,   short_name,        3) \\\nX(a, STATIC,   SINGULAR, FIXED_LENGTH_BYTES, macaddr,           4) \\\nX(a, STATIC,   SINGULAR, UENUM,    hw_model,          5) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_licensed,       6) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              7) \\\nX(a, STATIC,   SINGULAR, BYTES,    public_key,        8) \\\nX(a, STATIC,   OPTIONAL, BOOL,     is_unmessagable,   9)\n#define meshtastic_User_CALLBACK NULL\n#define meshtastic_User_DEFAULT NULL\n\n#define meshtastic_RouteDiscovery_FIELDLIST(X, a) \\\nX(a, STATIC,   REPEATED, FIXED32,  route,             1) \\\nX(a, STATIC,   REPEATED, INT32,    snr_towards,       2) \\\nX(a, STATIC,   REPEATED, FIXED32,  route_back,        3) \\\nX(a, STATIC,   REPEATED, INT32,    snr_back,          4)\n#define meshtastic_RouteDiscovery_CALLBACK NULL\n#define meshtastic_RouteDiscovery_DEFAULT NULL\n\n#define meshtastic_Routing_FIELDLIST(X, a) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,route_request,route_request),   1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,route_reply,route_reply),   2) \\\nX(a, STATIC,   ONEOF,    UENUM,    (variant,error_reason,error_reason),   3)\n#define meshtastic_Routing_CALLBACK NULL\n#define meshtastic_Routing_DEFAULT NULL\n#define meshtastic_Routing_variant_route_request_MSGTYPE meshtastic_RouteDiscovery\n#define meshtastic_Routing_variant_route_reply_MSGTYPE meshtastic_RouteDiscovery\n\n#define meshtastic_Data_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    portnum,           1) \\\nX(a, STATIC,   SINGULAR, BYTES,    payload,           2) \\\nX(a, STATIC,   SINGULAR, BOOL,     want_response,     3) \\\nX(a, STATIC,   SINGULAR, FIXED32,  dest,              4) \\\nX(a, STATIC,   SINGULAR, FIXED32,  source,            5) \\\nX(a, STATIC,   SINGULAR, FIXED32,  request_id,        6) \\\nX(a, STATIC,   SINGULAR, FIXED32,  reply_id,          7) \\\nX(a, STATIC,   SINGULAR, FIXED32,  emoji,             8) \\\nX(a, STATIC,   OPTIONAL, UINT32,   bitfield,          9)\n#define meshtastic_Data_CALLBACK NULL\n#define meshtastic_Data_DEFAULT NULL\n\n#define meshtastic_KeyVerification_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT64,   nonce,             1) \\\nX(a, STATIC,   SINGULAR, BYTES,    hash1,             2) \\\nX(a, STATIC,   SINGULAR, BYTES,    hash2,             3)\n#define meshtastic_KeyVerification_CALLBACK NULL\n#define meshtastic_KeyVerification_DEFAULT NULL\n\n#define meshtastic_StoreForwardPlusPlus_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    sfpp_message_type,   1) \\\nX(a, STATIC,   SINGULAR, BYTES,    message_hash,      2) \\\nX(a, STATIC,   SINGULAR, BYTES,    commit_hash,       3) \\\nX(a, STATIC,   SINGULAR, BYTES,    root_hash,         4) \\\nX(a, STATIC,   SINGULAR, BYTES,    message,           5) \\\nX(a, STATIC,   SINGULAR, UINT32,   encapsulated_id,   6) \\\nX(a, STATIC,   SINGULAR, UINT32,   encapsulated_to,   7) \\\nX(a, STATIC,   SINGULAR, UINT32,   encapsulated_from,   8) \\\nX(a, STATIC,   SINGULAR, UINT32,   encapsulated_rxtime,   9) \\\nX(a, STATIC,   SINGULAR, UINT32,   chain_count,      10)\n#define meshtastic_StoreForwardPlusPlus_CALLBACK NULL\n#define meshtastic_StoreForwardPlusPlus_DEFAULT NULL\n\n#define meshtastic_Waypoint_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   id,                1) \\\nX(a, STATIC,   OPTIONAL, SFIXED32, latitude_i,        2) \\\nX(a, STATIC,   OPTIONAL, SFIXED32, longitude_i,       3) \\\nX(a, STATIC,   SINGULAR, UINT32,   expire,            4) \\\nX(a, STATIC,   SINGULAR, UINT32,   locked_to,         5) \\\nX(a, STATIC,   SINGULAR, STRING,   name,              6) \\\nX(a, STATIC,   SINGULAR, STRING,   description,       7) \\\nX(a, STATIC,   SINGULAR, FIXED32,  icon,              8)\n#define meshtastic_Waypoint_CALLBACK NULL\n#define meshtastic_Waypoint_DEFAULT NULL\n\n#define meshtastic_StatusMessage_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   status,            1)\n#define meshtastic_StatusMessage_CALLBACK NULL\n#define meshtastic_StatusMessage_DEFAULT NULL\n\n#define meshtastic_MqttClientProxyMessage_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   topic,             1) \\\nX(a, STATIC,   ONEOF,    BYTES,    (payload_variant,data,payload_variant.data),   2) \\\nX(a, STATIC,   ONEOF,    STRING,   (payload_variant,text,payload_variant.text),   3) \\\nX(a, STATIC,   SINGULAR, BOOL,     retained,          4)\n#define meshtastic_MqttClientProxyMessage_CALLBACK NULL\n#define meshtastic_MqttClientProxyMessage_DEFAULT NULL\n\n#define meshtastic_MeshPacket_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, FIXED32,  from,              1) \\\nX(a, STATIC,   SINGULAR, FIXED32,  to,                2) \\\nX(a, STATIC,   SINGULAR, UINT32,   channel,           3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,decoded,decoded),   4) \\\nX(a, STATIC,   ONEOF,    BYTES,    (payload_variant,encrypted,encrypted),   5) \\\nX(a, STATIC,   SINGULAR, FIXED32,  id,                6) \\\nX(a, STATIC,   SINGULAR, FIXED32,  rx_time,           7) \\\nX(a, STATIC,   SINGULAR, FLOAT,    rx_snr,            8) \\\nX(a, STATIC,   SINGULAR, UINT32,   hop_limit,         9) \\\nX(a, STATIC,   SINGULAR, BOOL,     want_ack,         10) \\\nX(a, STATIC,   SINGULAR, UENUM,    priority,         11) \\\nX(a, STATIC,   SINGULAR, INT32,    rx_rssi,          12) \\\nX(a, STATIC,   SINGULAR, UENUM,    delayed,          13) \\\nX(a, STATIC,   SINGULAR, BOOL,     via_mqtt,         14) \\\nX(a, STATIC,   SINGULAR, UINT32,   hop_start,        15) \\\nX(a, STATIC,   SINGULAR, BYTES,    public_key,       16) \\\nX(a, STATIC,   SINGULAR, BOOL,     pki_encrypted,    17) \\\nX(a, STATIC,   SINGULAR, UINT32,   next_hop,         18) \\\nX(a, STATIC,   SINGULAR, UINT32,   relay_node,       19) \\\nX(a, STATIC,   SINGULAR, UINT32,   tx_after,         20) \\\nX(a, STATIC,   SINGULAR, UENUM,    transport_mechanism,  21)\n#define meshtastic_MeshPacket_CALLBACK NULL\n#define meshtastic_MeshPacket_DEFAULT NULL\n#define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data\n\n#define meshtastic_NodeInfo_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   num,               1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  user,              2) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  position,          3) \\\nX(a, STATIC,   SINGULAR, FLOAT,    snr,               4) \\\nX(a, STATIC,   SINGULAR, FIXED32,  last_heard,        5) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  device_metrics,    6) \\\nX(a, STATIC,   SINGULAR, UINT32,   channel,           7) \\\nX(a, STATIC,   SINGULAR, BOOL,     via_mqtt,          8) \\\nX(a, STATIC,   OPTIONAL, UINT32,   hops_away,         9) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_favorite,      10) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_ignored,       11) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_key_manually_verified,  12) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_muted,         13)\n#define meshtastic_NodeInfo_CALLBACK NULL\n#define meshtastic_NodeInfo_DEFAULT NULL\n#define meshtastic_NodeInfo_user_MSGTYPE meshtastic_User\n#define meshtastic_NodeInfo_position_MSGTYPE meshtastic_Position\n#define meshtastic_NodeInfo_device_metrics_MSGTYPE meshtastic_DeviceMetrics\n\n#define meshtastic_MyNodeInfo_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   my_node_num,       1) \\\nX(a, STATIC,   SINGULAR, UINT32,   reboot_count,      8) \\\nX(a, STATIC,   SINGULAR, UINT32,   min_app_version,  11) \\\nX(a, STATIC,   SINGULAR, BYTES,    device_id,        12) \\\nX(a, STATIC,   SINGULAR, STRING,   pio_env,          13) \\\nX(a, STATIC,   SINGULAR, UENUM,    firmware_edition,  14) \\\nX(a, STATIC,   SINGULAR, UINT32,   nodedb_count,     15)\n#define meshtastic_MyNodeInfo_CALLBACK NULL\n#define meshtastic_MyNodeInfo_DEFAULT NULL\n\n#define meshtastic_LogRecord_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   message,           1) \\\nX(a, STATIC,   SINGULAR, FIXED32,  time,              2) \\\nX(a, STATIC,   SINGULAR, STRING,   source,            3) \\\nX(a, STATIC,   SINGULAR, UENUM,    level,             4)\n#define meshtastic_LogRecord_CALLBACK NULL\n#define meshtastic_LogRecord_DEFAULT NULL\n\n#define meshtastic_QueueStatus_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, INT32,    res,               1) \\\nX(a, STATIC,   SINGULAR, UINT32,   free,              2) \\\nX(a, STATIC,   SINGULAR, UINT32,   maxlen,            3) \\\nX(a, STATIC,   SINGULAR, UINT32,   mesh_packet_id,    4)\n#define meshtastic_QueueStatus_CALLBACK NULL\n#define meshtastic_QueueStatus_DEFAULT NULL\n\n#define meshtastic_FromRadio_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   id,                1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,packet,packet),   2) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,my_info,my_info),   3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,node_info,node_info),   4) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,config,config),   5) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,log_record,log_record),   6) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,config_complete_id,config_complete_id),   7) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,rebooted,rebooted),   8) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,moduleConfig,moduleConfig),   9) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,channel,channel),  10) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,queueStatus,queueStatus),  11) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,xmodemPacket,xmodemPacket),  12) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,metadata,metadata),  13) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage),  14) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,fileInfo,fileInfo),  15) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,clientNotification,clientNotification),  16) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,deviceuiConfig,deviceuiConfig),  17)\n#define meshtastic_FromRadio_CALLBACK NULL\n#define meshtastic_FromRadio_DEFAULT NULL\n#define meshtastic_FromRadio_payload_variant_packet_MSGTYPE meshtastic_MeshPacket\n#define meshtastic_FromRadio_payload_variant_my_info_MSGTYPE meshtastic_MyNodeInfo\n#define meshtastic_FromRadio_payload_variant_node_info_MSGTYPE meshtastic_NodeInfo\n#define meshtastic_FromRadio_payload_variant_config_MSGTYPE meshtastic_Config\n#define meshtastic_FromRadio_payload_variant_log_record_MSGTYPE meshtastic_LogRecord\n#define meshtastic_FromRadio_payload_variant_moduleConfig_MSGTYPE meshtastic_ModuleConfig\n#define meshtastic_FromRadio_payload_variant_channel_MSGTYPE meshtastic_Channel\n#define meshtastic_FromRadio_payload_variant_queueStatus_MSGTYPE meshtastic_QueueStatus\n#define meshtastic_FromRadio_payload_variant_xmodemPacket_MSGTYPE meshtastic_XModem\n#define meshtastic_FromRadio_payload_variant_metadata_MSGTYPE meshtastic_DeviceMetadata\n#define meshtastic_FromRadio_payload_variant_mqttClientProxyMessage_MSGTYPE meshtastic_MqttClientProxyMessage\n#define meshtastic_FromRadio_payload_variant_fileInfo_MSGTYPE meshtastic_FileInfo\n#define meshtastic_FromRadio_payload_variant_clientNotification_MSGTYPE meshtastic_ClientNotification\n#define meshtastic_FromRadio_payload_variant_deviceuiConfig_MSGTYPE meshtastic_DeviceUIConfig\n\n#define meshtastic_ClientNotification_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, UINT32,   reply_id,          1) \\\nX(a, STATIC,   SINGULAR, FIXED32,  time,              2) \\\nX(a, STATIC,   SINGULAR, UENUM,    level,             3) \\\nX(a, STATIC,   SINGULAR, STRING,   message,           4) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,key_verification_number_inform,payload_variant.key_verification_number_inform),  11) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,key_verification_number_request,payload_variant.key_verification_number_request),  12) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,key_verification_final,payload_variant.key_verification_final),  13) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,duplicated_public_key,payload_variant.duplicated_public_key),  14) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,low_entropy_key,payload_variant.low_entropy_key),  15)\n#define meshtastic_ClientNotification_CALLBACK NULL\n#define meshtastic_ClientNotification_DEFAULT NULL\n#define meshtastic_ClientNotification_payload_variant_key_verification_number_inform_MSGTYPE meshtastic_KeyVerificationNumberInform\n#define meshtastic_ClientNotification_payload_variant_key_verification_number_request_MSGTYPE meshtastic_KeyVerificationNumberRequest\n#define meshtastic_ClientNotification_payload_variant_key_verification_final_MSGTYPE meshtastic_KeyVerificationFinal\n#define meshtastic_ClientNotification_payload_variant_duplicated_public_key_MSGTYPE meshtastic_DuplicatedPublicKey\n#define meshtastic_ClientNotification_payload_variant_low_entropy_key_MSGTYPE meshtastic_LowEntropyKey\n\n#define meshtastic_KeyVerificationNumberInform_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT64,   nonce,             1) \\\nX(a, STATIC,   SINGULAR, STRING,   remote_longname,   2) \\\nX(a, STATIC,   SINGULAR, UINT32,   security_number,   3)\n#define meshtastic_KeyVerificationNumberInform_CALLBACK NULL\n#define meshtastic_KeyVerificationNumberInform_DEFAULT NULL\n\n#define meshtastic_KeyVerificationNumberRequest_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT64,   nonce,             1) \\\nX(a, STATIC,   SINGULAR, STRING,   remote_longname,   2)\n#define meshtastic_KeyVerificationNumberRequest_CALLBACK NULL\n#define meshtastic_KeyVerificationNumberRequest_DEFAULT NULL\n\n#define meshtastic_KeyVerificationFinal_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT64,   nonce,             1) \\\nX(a, STATIC,   SINGULAR, STRING,   remote_longname,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     isSender,          3) \\\nX(a, STATIC,   SINGULAR, STRING,   verification_characters,   4)\n#define meshtastic_KeyVerificationFinal_CALLBACK NULL\n#define meshtastic_KeyVerificationFinal_DEFAULT NULL\n\n#define meshtastic_DuplicatedPublicKey_FIELDLIST(X, a) \\\n\n#define meshtastic_DuplicatedPublicKey_CALLBACK NULL\n#define meshtastic_DuplicatedPublicKey_DEFAULT NULL\n\n#define meshtastic_LowEntropyKey_FIELDLIST(X, a) \\\n\n#define meshtastic_LowEntropyKey_CALLBACK NULL\n#define meshtastic_LowEntropyKey_DEFAULT NULL\n\n#define meshtastic_FileInfo_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   file_name,         1) \\\nX(a, STATIC,   SINGULAR, UINT32,   size_bytes,        2)\n#define meshtastic_FileInfo_CALLBACK NULL\n#define meshtastic_FileInfo_DEFAULT NULL\n\n#define meshtastic_ToRadio_FIELDLIST(X, a) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,packet,packet),   1) \\\nX(a, STATIC,   ONEOF,    UINT32,   (payload_variant,want_config_id,want_config_id),   3) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,disconnect,disconnect),   4) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,xmodemPacket,xmodemPacket),   5) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage),   6) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,heartbeat,heartbeat),   7)\n#define meshtastic_ToRadio_CALLBACK NULL\n#define meshtastic_ToRadio_DEFAULT NULL\n#define meshtastic_ToRadio_payload_variant_packet_MSGTYPE meshtastic_MeshPacket\n#define meshtastic_ToRadio_payload_variant_xmodemPacket_MSGTYPE meshtastic_XModem\n#define meshtastic_ToRadio_payload_variant_mqttClientProxyMessage_MSGTYPE meshtastic_MqttClientProxyMessage\n#define meshtastic_ToRadio_payload_variant_heartbeat_MSGTYPE meshtastic_Heartbeat\n\n#define meshtastic_Compressed_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    portnum,           1) \\\nX(a, STATIC,   SINGULAR, BYTES,    data,              2)\n#define meshtastic_Compressed_CALLBACK NULL\n#define meshtastic_Compressed_DEFAULT NULL\n\n#define meshtastic_NeighborInfo_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   node_id,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   last_sent_by_id,   2) \\\nX(a, STATIC,   SINGULAR, UINT32,   node_broadcast_interval_secs,   3) \\\nX(a, STATIC,   REPEATED, MESSAGE,  neighbors,         4)\n#define meshtastic_NeighborInfo_CALLBACK NULL\n#define meshtastic_NeighborInfo_DEFAULT NULL\n#define meshtastic_NeighborInfo_neighbors_MSGTYPE meshtastic_Neighbor\n\n#define meshtastic_Neighbor_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   node_id,           1) \\\nX(a, STATIC,   SINGULAR, FLOAT,    snr,               2) \\\nX(a, STATIC,   SINGULAR, FIXED32,  last_rx_time,      3) \\\nX(a, STATIC,   SINGULAR, UINT32,   node_broadcast_interval_secs,   4)\n#define meshtastic_Neighbor_CALLBACK NULL\n#define meshtastic_Neighbor_DEFAULT NULL\n\n#define meshtastic_DeviceMetadata_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   firmware_version,   1) \\\nX(a, STATIC,   SINGULAR, UINT32,   device_state_version,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     canShutdown,       3) \\\nX(a, STATIC,   SINGULAR, BOOL,     hasWifi,           4) \\\nX(a, STATIC,   SINGULAR, BOOL,     hasBluetooth,      5) \\\nX(a, STATIC,   SINGULAR, BOOL,     hasEthernet,       6) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              7) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_flags,    8) \\\nX(a, STATIC,   SINGULAR, UENUM,    hw_model,          9) \\\nX(a, STATIC,   SINGULAR, BOOL,     hasRemoteHardware,  10) \\\nX(a, STATIC,   SINGULAR, BOOL,     hasPKC,           11) \\\nX(a, STATIC,   SINGULAR, UINT32,   excluded_modules,  12)\n#define meshtastic_DeviceMetadata_CALLBACK NULL\n#define meshtastic_DeviceMetadata_DEFAULT NULL\n\n#define meshtastic_Heartbeat_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   nonce,             1)\n#define meshtastic_Heartbeat_CALLBACK NULL\n#define meshtastic_Heartbeat_DEFAULT NULL\n\n#define meshtastic_NodeRemoteHardwarePin_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   node_num,          1) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  pin,               2)\n#define meshtastic_NodeRemoteHardwarePin_CALLBACK NULL\n#define meshtastic_NodeRemoteHardwarePin_DEFAULT NULL\n#define meshtastic_NodeRemoteHardwarePin_pin_MSGTYPE meshtastic_RemoteHardwarePin\n\n#define meshtastic_ChunkedPayload_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   payload_id,        1) \\\nX(a, STATIC,   SINGULAR, UINT32,   chunk_count,       2) \\\nX(a, STATIC,   SINGULAR, UINT32,   chunk_index,       3) \\\nX(a, STATIC,   SINGULAR, BYTES,    payload_chunk,     4)\n#define meshtastic_ChunkedPayload_CALLBACK NULL\n#define meshtastic_ChunkedPayload_DEFAULT NULL\n\n#define meshtastic_resend_chunks_FIELDLIST(X, a) \\\nX(a, CALLBACK, REPEATED, UINT32,   chunks,            1)\n#define meshtastic_resend_chunks_CALLBACK pb_default_field_callback\n#define meshtastic_resend_chunks_DEFAULT NULL\n\n#define meshtastic_ChunkedPayloadResponse_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   payload_id,        1) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,request_transfer,payload_variant.request_transfer),   2) \\\nX(a, STATIC,   ONEOF,    BOOL,     (payload_variant,accept_transfer,payload_variant.accept_transfer),   3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,resend_chunks,payload_variant.resend_chunks),   4)\n#define meshtastic_ChunkedPayloadResponse_CALLBACK NULL\n#define meshtastic_ChunkedPayloadResponse_DEFAULT NULL\n#define meshtastic_ChunkedPayloadResponse_payload_variant_resend_chunks_MSGTYPE meshtastic_resend_chunks\n\nextern const pb_msgdesc_t meshtastic_Position_msg;\nextern const pb_msgdesc_t meshtastic_User_msg;\nextern const pb_msgdesc_t meshtastic_RouteDiscovery_msg;\nextern const pb_msgdesc_t meshtastic_Routing_msg;\nextern const pb_msgdesc_t meshtastic_Data_msg;\nextern const pb_msgdesc_t meshtastic_KeyVerification_msg;\nextern const pb_msgdesc_t meshtastic_StoreForwardPlusPlus_msg;\nextern const pb_msgdesc_t meshtastic_Waypoint_msg;\nextern const pb_msgdesc_t meshtastic_StatusMessage_msg;\nextern const pb_msgdesc_t meshtastic_MqttClientProxyMessage_msg;\nextern const pb_msgdesc_t meshtastic_MeshPacket_msg;\nextern const pb_msgdesc_t meshtastic_NodeInfo_msg;\nextern const pb_msgdesc_t meshtastic_MyNodeInfo_msg;\nextern const pb_msgdesc_t meshtastic_LogRecord_msg;\nextern const pb_msgdesc_t meshtastic_QueueStatus_msg;\nextern const pb_msgdesc_t meshtastic_FromRadio_msg;\nextern const pb_msgdesc_t meshtastic_ClientNotification_msg;\nextern const pb_msgdesc_t meshtastic_KeyVerificationNumberInform_msg;\nextern const pb_msgdesc_t meshtastic_KeyVerificationNumberRequest_msg;\nextern const pb_msgdesc_t meshtastic_KeyVerificationFinal_msg;\nextern const pb_msgdesc_t meshtastic_DuplicatedPublicKey_msg;\nextern const pb_msgdesc_t meshtastic_LowEntropyKey_msg;\nextern const pb_msgdesc_t meshtastic_FileInfo_msg;\nextern const pb_msgdesc_t meshtastic_ToRadio_msg;\nextern const pb_msgdesc_t meshtastic_Compressed_msg;\nextern const pb_msgdesc_t meshtastic_NeighborInfo_msg;\nextern const pb_msgdesc_t meshtastic_Neighbor_msg;\nextern const pb_msgdesc_t meshtastic_DeviceMetadata_msg;\nextern const pb_msgdesc_t meshtastic_Heartbeat_msg;\nextern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePin_msg;\nextern const pb_msgdesc_t meshtastic_ChunkedPayload_msg;\nextern const pb_msgdesc_t meshtastic_resend_chunks_msg;\nextern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_Position_fields &meshtastic_Position_msg\n#define meshtastic_User_fields &meshtastic_User_msg\n#define meshtastic_RouteDiscovery_fields &meshtastic_RouteDiscovery_msg\n#define meshtastic_Routing_fields &meshtastic_Routing_msg\n#define meshtastic_Data_fields &meshtastic_Data_msg\n#define meshtastic_KeyVerification_fields &meshtastic_KeyVerification_msg\n#define meshtastic_StoreForwardPlusPlus_fields &meshtastic_StoreForwardPlusPlus_msg\n#define meshtastic_Waypoint_fields &meshtastic_Waypoint_msg\n#define meshtastic_StatusMessage_fields &meshtastic_StatusMessage_msg\n#define meshtastic_MqttClientProxyMessage_fields &meshtastic_MqttClientProxyMessage_msg\n#define meshtastic_MeshPacket_fields &meshtastic_MeshPacket_msg\n#define meshtastic_NodeInfo_fields &meshtastic_NodeInfo_msg\n#define meshtastic_MyNodeInfo_fields &meshtastic_MyNodeInfo_msg\n#define meshtastic_LogRecord_fields &meshtastic_LogRecord_msg\n#define meshtastic_QueueStatus_fields &meshtastic_QueueStatus_msg\n#define meshtastic_FromRadio_fields &meshtastic_FromRadio_msg\n#define meshtastic_ClientNotification_fields &meshtastic_ClientNotification_msg\n#define meshtastic_KeyVerificationNumberInform_fields &meshtastic_KeyVerificationNumberInform_msg\n#define meshtastic_KeyVerificationNumberRequest_fields &meshtastic_KeyVerificationNumberRequest_msg\n#define meshtastic_KeyVerificationFinal_fields &meshtastic_KeyVerificationFinal_msg\n#define meshtastic_DuplicatedPublicKey_fields &meshtastic_DuplicatedPublicKey_msg\n#define meshtastic_LowEntropyKey_fields &meshtastic_LowEntropyKey_msg\n#define meshtastic_FileInfo_fields &meshtastic_FileInfo_msg\n#define meshtastic_ToRadio_fields &meshtastic_ToRadio_msg\n#define meshtastic_Compressed_fields &meshtastic_Compressed_msg\n#define meshtastic_NeighborInfo_fields &meshtastic_NeighborInfo_msg\n#define meshtastic_Neighbor_fields &meshtastic_Neighbor_msg\n#define meshtastic_DeviceMetadata_fields &meshtastic_DeviceMetadata_msg\n#define meshtastic_Heartbeat_fields &meshtastic_Heartbeat_msg\n#define meshtastic_NodeRemoteHardwarePin_fields &meshtastic_NodeRemoteHardwarePin_msg\n#define meshtastic_ChunkedPayload_fields &meshtastic_ChunkedPayload_msg\n#define meshtastic_resend_chunks_fields &meshtastic_resend_chunks_msg\n#define meshtastic_ChunkedPayloadResponse_fields &meshtastic_ChunkedPayloadResponse_msg\n\n/* Maximum encoded size of messages (where known) */\n/* meshtastic_resend_chunks_size depends on runtime parameters */\n/* meshtastic_ChunkedPayloadResponse_size depends on runtime parameters */\n#define MESHTASTIC_MESHTASTIC_MESH_PB_H_MAX_SIZE meshtastic_FromRadio_size\n#define meshtastic_ChunkedPayload_size           245\n#define meshtastic_ClientNotification_size       482\n#define meshtastic_Compressed_size               239\n#define meshtastic_Data_size                     269\n#define meshtastic_DeviceMetadata_size           54\n#define meshtastic_DuplicatedPublicKey_size      0\n#define meshtastic_FileInfo_size                 236\n#define meshtastic_FromRadio_size                510\n#define meshtastic_Heartbeat_size                6\n#define meshtastic_KeyVerificationFinal_size     65\n#define meshtastic_KeyVerificationNumberInform_size 58\n#define meshtastic_KeyVerificationNumberRequest_size 52\n#define meshtastic_KeyVerification_size          79\n#define meshtastic_LogRecord_size                426\n#define meshtastic_LowEntropyKey_size            0\n#define meshtastic_MeshPacket_size               381\n#define meshtastic_MqttClientProxyMessage_size   501\n#define meshtastic_MyNodeInfo_size               83\n#define meshtastic_NeighborInfo_size             258\n#define meshtastic_Neighbor_size                 22\n#define meshtastic_NodeInfo_size                 325\n#define meshtastic_NodeRemoteHardwarePin_size    29\n#define meshtastic_Position_size                 144\n#define meshtastic_QueueStatus_size              23\n#define meshtastic_RouteDiscovery_size           256\n#define meshtastic_Routing_size                  259\n#define meshtastic_StatusMessage_size            81\n#define meshtastic_StoreForwardPlusPlus_size     377\n#define meshtastic_ToRadio_size                  504\n#define meshtastic_User_size                     115\n#define meshtastic_Waypoint_size                 165\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/module_config.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/module_config.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_ModuleConfig, meshtastic_ModuleConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_MQTTConfig, meshtastic_ModuleConfig_MQTTConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_MapReportSettings, meshtastic_ModuleConfig_MapReportSettings, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_RemoteHardwareConfig, meshtastic_ModuleConfig_RemoteHardwareConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_NeighborInfoConfig, meshtastic_ModuleConfig_NeighborInfoConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_DetectionSensorConfig, meshtastic_ModuleConfig_DetectionSensorConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_AudioConfig, meshtastic_ModuleConfig_AudioConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_PaxcounterConfig, meshtastic_ModuleConfig_PaxcounterConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_TrafficManagementConfig, meshtastic_ModuleConfig_TrafficManagementConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_SerialConfig, meshtastic_ModuleConfig_SerialConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_ExternalNotificationConfig, meshtastic_ModuleConfig_ExternalNotificationConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_StoreForwardConfig, meshtastic_ModuleConfig_StoreForwardConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_RangeTestConfig, meshtastic_ModuleConfig_RangeTestConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_TelemetryConfig, meshtastic_ModuleConfig_TelemetryConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_CannedMessageConfig, meshtastic_ModuleConfig_CannedMessageConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_AmbientLightingConfig, meshtastic_ModuleConfig_AmbientLightingConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_StatusMessageConfig, meshtastic_ModuleConfig_StatusMessageConfig, AUTO)\n\n\nPB_BIND(meshtastic_ModuleConfig_TAKConfig, meshtastic_ModuleConfig_TAKConfig, AUTO)\n\n\nPB_BIND(meshtastic_RemoteHardwarePin, meshtastic_RemoteHardwarePin, AUTO)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/module_config.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/atak.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\ntypedef enum _meshtastic_RemoteHardwarePinType {\n    /* Unset/unused */\n    meshtastic_RemoteHardwarePinType_UNKNOWN = 0,\n    /* GPIO pin can be read (if it is high / low) */\n    meshtastic_RemoteHardwarePinType_DIGITAL_READ = 1,\n    /* GPIO pin can be written to (high / low) */\n    meshtastic_RemoteHardwarePinType_DIGITAL_WRITE = 2\n} meshtastic_RemoteHardwarePinType;\n\ntypedef enum _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType {\n    /* Event is triggered if pin is low */\n    meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW = 0,\n    /* Event is triggered if pin is high */\n    meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH = 1,\n    /* Event is triggered when pin goes high to low */\n    meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_FALLING_EDGE = 2,\n    /* Event is triggered when pin goes low to high */\n    meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_RISING_EDGE = 3,\n    /* Event is triggered on every pin state change, low is considered to be\n \"active\" */\n    meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_LOW = 4,\n    /* Event is triggered on every pin state change, high is considered to be\n \"active\" */\n    meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH = 5\n} meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType;\n\n/* Baudrate for codec2 voice */\ntypedef enum _meshtastic_ModuleConfig_AudioConfig_Audio_Baud {\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT = 0,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_3200 = 1,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_2400 = 2,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1600 = 3,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1400 = 4,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1300 = 5,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1200 = 6,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700 = 7,\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B = 8\n} meshtastic_ModuleConfig_AudioConfig_Audio_Baud;\n\n/* TODO: REPLACE */\ntypedef enum _meshtastic_ModuleConfig_SerialConfig_Serial_Baud {\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_DEFAULT = 0,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_110 = 1,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_300 = 2,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_600 = 3,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_1200 = 4,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_2400 = 5,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_4800 = 6,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_9600 = 7,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_19200 = 8,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_38400 = 9,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_57600 = 10,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_115200 = 11,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_230400 = 12,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_460800 = 13,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_576000 = 14,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600 = 15\n} meshtastic_ModuleConfig_SerialConfig_Serial_Baud;\n\n/* TODO: REPLACE */\ntypedef enum _meshtastic_ModuleConfig_SerialConfig_Serial_Mode {\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT = 0,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE = 1,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO = 2,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG = 3,\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA = 4,\n    /* NMEA messages specifically tailored for CalTopo */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO = 5,\n    /* Ecowitt WS85 weather station */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85 = 6,\n    /* VE.Direct is a serial protocol used by Victron Energy products\n https://beta.ivc.no/wiki/index.php/Victron_VE_Direct_DIY_Cable */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_VE_DIRECT = 7,\n    /* Used to configure and view some parameters of MeshSolar.\n https://heltec.org/project/meshsolar/ */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG = 8,\n    /* Logs mesh traffic to the serial pins, ideal for logging via openLog or similar. */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_LOG = 9, /* includes other packets */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode_LOGTEXT = 10 /* only text (channel & DM) */\n} meshtastic_ModuleConfig_SerialConfig_Serial_Mode;\n\n/* TODO: REPLACE */\ntypedef enum _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar {\n    /* TODO: REPLACE */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE = 0,\n    /* TODO: REPLACE */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP = 17,\n    /* TODO: REPLACE */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN = 18,\n    /* TODO: REPLACE */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT = 19,\n    /* TODO: REPLACE */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT = 20,\n    /* '\\n' */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT = 10,\n    /* TODO: REPLACE */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK = 27,\n    /* TODO: REPLACE */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL = 24\n} meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar;\n\n/* Struct definitions */\n/* Settings for reporting unencrypted information about our node to a map via MQTT */\ntypedef struct _meshtastic_ModuleConfig_MapReportSettings {\n    /* How often we should report our info to the map (in seconds) */\n    uint32_t publish_interval_secs;\n    /* Bits of precision for the location sent (default of 32 is full precision). */\n    uint32_t position_precision;\n    /* Whether we have opted-in to report our location to the map */\n    bool should_report_location;\n} meshtastic_ModuleConfig_MapReportSettings;\n\n/* MQTT Client Config */\ntypedef struct _meshtastic_ModuleConfig_MQTTConfig {\n    /* If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as\n is_uplink_enabled or is_downlink_enabled. */\n    bool enabled;\n    /* The server to use for our MQTT global message gateway feature.\n If not set, the default server will be used */\n    char address[64];\n    /* MQTT username to use (most useful for a custom MQTT server).\n If using a custom server, this will be honoured even if empty.\n If using the default server, this will only be honoured if set, otherwise the device will use the default username */\n    char username[64];\n    /* MQTT password to use (most useful for a custom MQTT server).\n If using a custom server, this will be honoured even if empty.\n If using the default server, this will only be honoured if set, otherwise the device will use the default password */\n    char password[32];\n    /* Whether to send encrypted or decrypted packets to MQTT.\n This parameter is only honoured if you also set server\n (the default official mqtt.meshtastic.org server can handle encrypted packets)\n Decrypted packets may be useful for external systems that want to consume meshtastic packets */\n    bool encryption_enabled;\n    /* Whether to send / consume json packets on MQTT */\n    bool json_enabled;\n    /* If true, we attempt to establish a secure connection using TLS */\n    bool tls_enabled;\n    /* The root topic to use for MQTT messages. Default is \"msh\".\n This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs */\n    char root[32];\n    /* If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection */\n    bool proxy_to_client_enabled;\n    /* If true, we will periodically report unencrypted information about our node to a map via MQTT */\n    bool map_reporting_enabled;\n    /* Settings for reporting information about our node to a map via MQTT */\n    bool has_map_report_settings;\n    meshtastic_ModuleConfig_MapReportSettings map_report_settings;\n} meshtastic_ModuleConfig_MQTTConfig;\n\n/* NeighborInfoModule Config */\ntypedef struct _meshtastic_ModuleConfig_NeighborInfoConfig {\n    /* Whether the Module is enabled */\n    bool enabled;\n    /* Interval in seconds of how often we should try to send our\n Neighbor Info (minimum is 14400, i.e., 4 hours) */\n    uint32_t update_interval;\n    /* Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa.\n Note that this is not available on a channel with default key and name. */\n    bool transmit_over_lora;\n} meshtastic_ModuleConfig_NeighborInfoConfig;\n\n/* Detection Sensor Module Config */\ntypedef struct _meshtastic_ModuleConfig_DetectionSensorConfig {\n    /* Whether the Module is enabled */\n    bool enabled;\n    /* Interval in seconds of how often we can send a message to the mesh when a\n trigger event is detected */\n    uint32_t minimum_broadcast_secs;\n    /* Interval in seconds of how often we should send a message to the mesh\n with the current state regardless of trigger events When set to 0, only\n trigger events will be broadcasted Works as a sort of status heartbeat\n for peace of mind */\n    uint32_t state_broadcast_secs;\n    /* Send ASCII bell with alert message\n Useful for triggering ext. notification on bell */\n    bool send_bell;\n    /* Friendly name used to format message sent to mesh\n Example: A name \"Motion\" would result in a message \"Motion detected\"\n Maximum length of 20 characters */\n    char name[20];\n    /* GPIO pin to monitor for state changes */\n    uint8_t monitor_pin;\n    /* The type of trigger event to be used */\n    meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType detection_trigger_type;\n    /* Whether or not use INPUT_PULLUP mode for GPIO pin\n Only applicable if the board uses pull-up resistors on the pin */\n    bool use_pullup;\n} meshtastic_ModuleConfig_DetectionSensorConfig;\n\n/* Audio Config for codec2 voice */\ntypedef struct _meshtastic_ModuleConfig_AudioConfig {\n    /* Whether Audio is enabled */\n    bool codec2_enabled;\n    /* PTT Pin */\n    uint8_t ptt_pin;\n    /* The audio sample rate to use for codec2 */\n    meshtastic_ModuleConfig_AudioConfig_Audio_Baud bitrate;\n    /* I2S Word Select */\n    uint8_t i2s_ws;\n    /* I2S Data IN */\n    uint8_t i2s_sd;\n    /* I2S Data OUT */\n    uint8_t i2s_din;\n    /* I2S Clock */\n    uint8_t i2s_sck;\n} meshtastic_ModuleConfig_AudioConfig;\n\n/* Config for the Paxcounter Module */\ntypedef struct _meshtastic_ModuleConfig_PaxcounterConfig {\n    /* Enable the Paxcounter Module */\n    bool enabled;\n    uint32_t paxcounter_update_interval;\n    /* WiFi RSSI threshold. Defaults to -80 */\n    int32_t wifi_threshold;\n    /* BLE RSSI threshold. Defaults to -80 */\n    int32_t ble_threshold;\n} meshtastic_ModuleConfig_PaxcounterConfig;\n\n/* Config for the Traffic Management module.\n Provides packet inspection and traffic shaping to help reduce channel utilization */\ntypedef struct _meshtastic_ModuleConfig_TrafficManagementConfig {\n    /* Master enable for traffic management module */\n    bool enabled;\n    /* Enable position deduplication to drop redundant position broadcasts */\n    bool position_dedup_enabled;\n    /* Number of bits of precision for position deduplication (0-32) */\n    uint32_t position_precision_bits;\n    /* Minimum interval in seconds between position updates from the same node */\n    uint32_t position_min_interval_secs;\n    /* Enable direct response to NodeInfo requests from local cache */\n    bool nodeinfo_direct_response;\n    /* Minimum hop distance from requestor before responding to NodeInfo requests */\n    uint32_t nodeinfo_direct_response_max_hops;\n    /* Enable per-node rate limiting to throttle chatty nodes */\n    bool rate_limit_enabled;\n    /* Time window in seconds for rate limiting calculations */\n    uint32_t rate_limit_window_secs;\n    /* Maximum packets allowed per node within the rate limit window */\n    uint32_t rate_limit_max_packets;\n    /* Enable dropping of unknown/undecryptable packets per rate_limit_window_secs */\n    bool drop_unknown_enabled;\n    /* Number of unknown packets before dropping from a node */\n    uint32_t unknown_packet_threshold;\n    /* Set hop_limit to 0 for relayed telemetry broadcasts (own packets unaffected) */\n    bool exhaust_hop_telemetry;\n    /* Set hop_limit to 0 for relayed position broadcasts (own packets unaffected) */\n    bool exhaust_hop_position;\n    /* Preserve hop_limit for router-to-router traffic */\n    bool router_preserve_hops;\n} meshtastic_ModuleConfig_TrafficManagementConfig;\n\n/* Serial Config */\ntypedef struct _meshtastic_ModuleConfig_SerialConfig {\n    /* Preferences for the SerialModule */\n    bool enabled;\n    /* TODO: REPLACE */\n    bool echo;\n    /* RX pin (should match Arduino gpio pin number) */\n    uint32_t rxd;\n    /* TX pin (should match Arduino gpio pin number) */\n    uint32_t txd;\n    /* Serial baud rate */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Baud baud;\n    /* TODO: REPLACE */\n    uint32_t timeout;\n    /* Mode for serial module operation */\n    meshtastic_ModuleConfig_SerialConfig_Serial_Mode mode;\n    /* Overrides the platform's defacto Serial port instance to use with Serial module config settings\n This is currently only usable in output modes like NMEA / CalTopo and may behave strangely or not work at all in other modes\n Existing logging over the Serial Console will still be present */\n    bool override_console_serial_port;\n} meshtastic_ModuleConfig_SerialConfig;\n\n/* External Notifications Config */\ntypedef struct _meshtastic_ModuleConfig_ExternalNotificationConfig {\n    /* Enable the ExternalNotificationModule */\n    bool enabled;\n    /* When using in On/Off mode, keep the output on for this many\n milliseconds. Default 1000ms (1 second). */\n    uint32_t output_ms;\n    /* Define the output pin GPIO setting Defaults to\n EXT_NOTIFY_OUT if set for the board.\n In standalone devices this pin should drive the LED to match the UI. */\n    uint32_t output;\n    /* IF this is true, the 'output' Pin will be pulled active high, false\n means active low. */\n    bool active;\n    /* True: Alert when a text message arrives (output) */\n    bool alert_message;\n    /* True: Alert when the bell character is received (output) */\n    bool alert_bell;\n    /* use a PWM output instead of a simple on/off output. This will ignore\n the 'output', 'output_ms' and 'active' settings and use the\n device.buzzer_gpio instead. */\n    bool use_pwm;\n    /* Optional: Define a secondary output pin for a vibra motor\n This is used in standalone devices to match the UI. */\n    uint8_t output_vibra;\n    /* Optional: Define a tertiary output pin for an active buzzer\n This is used in standalone devices to to match the UI. */\n    uint8_t output_buzzer;\n    /* True: Alert when a text message arrives (output_vibra) */\n    bool alert_message_vibra;\n    /* True: Alert when a text message arrives (output_buzzer) */\n    bool alert_message_buzzer;\n    /* True: Alert when the bell character is received (output_vibra) */\n    bool alert_bell_vibra;\n    /* True: Alert when the bell character is received (output_buzzer) */\n    bool alert_bell_buzzer;\n    /* The notification will toggle with 'output_ms' for this time of seconds.\n Default is 0 which means don't repeat at all. 60 would mean blink\n and/or beep for 60 seconds */\n    uint16_t nag_timeout;\n    /* When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer\n T-Watch S3 and T-Deck for example have this capability */\n    bool use_i2s_as_buzzer;\n} meshtastic_ModuleConfig_ExternalNotificationConfig;\n\n/* Store and Forward Module Config */\ntypedef struct _meshtastic_ModuleConfig_StoreForwardConfig {\n    /* Enable the Store and Forward Module */\n    bool enabled;\n    /* TODO: REPLACE */\n    bool heartbeat;\n    /* TODO: REPLACE */\n    uint32_t records;\n    /* TODO: REPLACE */\n    uint32_t history_return_max;\n    /* TODO: REPLACE */\n    uint32_t history_return_window;\n    /* Set to true to let this node act as a server that stores received messages and resends them upon request. */\n    bool is_server;\n} meshtastic_ModuleConfig_StoreForwardConfig;\n\n/* Preferences for the RangeTestModule */\ntypedef struct _meshtastic_ModuleConfig_RangeTestConfig {\n    /* Enable the Range Test Module */\n    bool enabled;\n    /* Send out range test messages from this node */\n    uint32_t sender;\n    /* Bool value indicating that this node should save a RangeTest.csv file.\n ESP32 Only */\n    bool save;\n    /* Bool indicating that the node should cleanup / destroy it's RangeTest.csv file.\n ESP32 Only */\n    bool clear_on_reboot;\n} meshtastic_ModuleConfig_RangeTestConfig;\n\n/* Configuration for both device and environment metrics */\ntypedef struct _meshtastic_ModuleConfig_TelemetryConfig {\n    /* Interval in seconds of how often we should try to send our\n device metrics to the mesh */\n    uint32_t device_update_interval;\n    uint32_t environment_update_interval;\n    /* Preferences for the Telemetry Module (Environment)\n Enable/Disable the telemetry measurement module measurement collection */\n    bool environment_measurement_enabled;\n    /* Enable/Disable the telemetry measurement module on-device display */\n    bool environment_screen_enabled;\n    /* We'll always read the sensor in Celsius, but sometimes we might want to\n display the results in Fahrenheit as a \"user preference\". */\n    bool environment_display_fahrenheit;\n    /* Enable/Disable the air quality metrics */\n    bool air_quality_enabled;\n    /* Interval in seconds of how often we should try to send our\n air quality metrics to the mesh */\n    uint32_t air_quality_interval;\n    /* Enable/disable Power metrics */\n    bool power_measurement_enabled;\n    /* Interval in seconds of how often we should try to send our\n power metrics to the mesh */\n    uint32_t power_update_interval;\n    /* Enable/Disable the power measurement module on-device display */\n    bool power_screen_enabled;\n    /* Preferences for the (Health) Telemetry Module\n Enable/Disable the telemetry measurement module measurement collection */\n    bool health_measurement_enabled;\n    /* Interval in seconds of how often we should try to send our\n health metrics to the mesh */\n    uint32_t health_update_interval;\n    /* Enable/Disable the health telemetry module on-device display */\n    bool health_screen_enabled;\n    /* Enable/Disable the device telemetry module to send metrics to the mesh\n Note: We will still send telemtry to the connected phone / client every minute over the API */\n    bool device_telemetry_enabled;\n    /* Enable/Disable the air quality telemetry measurement module on-device display */\n    bool air_quality_screen_enabled;\n} meshtastic_ModuleConfig_TelemetryConfig;\n\n/* Canned Messages Module Config */\ntypedef struct _meshtastic_ModuleConfig_CannedMessageConfig {\n    /* Enable the rotary encoder #1. This is a 'dumb' encoder sending pulses on both A and B pins while rotating. */\n    bool rotary1_enabled;\n    /* GPIO pin for rotary encoder A port. */\n    uint32_t inputbroker_pin_a;\n    /* GPIO pin for rotary encoder B port. */\n    uint32_t inputbroker_pin_b;\n    /* GPIO pin for rotary encoder Press port. */\n    uint32_t inputbroker_pin_press;\n    /* Generate input event on CW of this kind. */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar inputbroker_event_cw;\n    /* Generate input event on CCW of this kind. */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar inputbroker_event_ccw;\n    /* Generate input event on Press of this kind. */\n    meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar inputbroker_event_press;\n    /* Enable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker. */\n    bool updown1_enabled;\n    /* Enable/disable CannedMessageModule. */\n    bool enabled;\n    /* Input event origin accepted by the canned message module.\n Can be e.g. \"rotEnc1\", \"upDownEnc1\", \"scanAndSelect\", \"cardkb\", \"serialkb\", or keyword \"_any\" */\n    char allow_input_source[16];\n    /* CannedMessageModule also sends a bell character with the messages.\n ExternalNotificationModule can benefit from this feature. */\n    bool send_bell;\n} meshtastic_ModuleConfig_CannedMessageConfig;\n\n/* Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels.\nInitially created for the RAK14001 RGB LED module. */\ntypedef struct _meshtastic_ModuleConfig_AmbientLightingConfig {\n    /* Sets LED to on or off. */\n    bool led_state;\n    /* Sets the current for the LED output. Default is 10. */\n    uint8_t current;\n    /* Sets the red LED level. Values are 0-255. */\n    uint8_t red;\n    /* Sets the green LED level. Values are 0-255. */\n    uint8_t green;\n    /* Sets the blue LED level. Values are 0-255. */\n    uint8_t blue;\n} meshtastic_ModuleConfig_AmbientLightingConfig;\n\n/* StatusMessage config - Allows setting a status message for a node to periodically rebroadcast */\ntypedef struct _meshtastic_ModuleConfig_StatusMessageConfig {\n    /* The actual status string */\n    char node_status[80];\n} meshtastic_ModuleConfig_StatusMessageConfig;\n\n/* TAK team/role configuration */\ntypedef struct _meshtastic_ModuleConfig_TAKConfig {\n    /* Team color.\n Default Unspecifed_Color -> firmware uses Cyan */\n    meshtastic_Team team;\n    /* Member role.\n Default Unspecifed -> firmware uses TeamMember */\n    meshtastic_MemberRole role;\n} meshtastic_ModuleConfig_TAKConfig;\n\n/* A GPIO pin definition for remote hardware module */\ntypedef struct _meshtastic_RemoteHardwarePin {\n    /* GPIO Pin number (must match Arduino) */\n    uint8_t gpio_pin;\n    /* Name for the GPIO pin (i.e. Front gate, mailbox, etc) */\n    char name[15];\n    /* Type of GPIO access available to consumers on the mesh */\n    meshtastic_RemoteHardwarePinType type;\n} meshtastic_RemoteHardwarePin;\n\n/* RemoteHardwareModule Config */\ntypedef struct _meshtastic_ModuleConfig_RemoteHardwareConfig {\n    /* Whether the Module is enabled */\n    bool enabled;\n    /* Whether the Module allows consumers to read / write to pins not defined in available_pins */\n    bool allow_undefined_pin_access;\n    /* Exposes the available pins to the mesh for reading and writing */\n    pb_size_t available_pins_count;\n    meshtastic_RemoteHardwarePin available_pins[4];\n} meshtastic_ModuleConfig_RemoteHardwareConfig;\n\n/* Module Config */\ntypedef struct _meshtastic_ModuleConfig {\n    pb_size_t which_payload_variant;\n    union {\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_MQTTConfig mqtt;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_SerialConfig serial;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_ExternalNotificationConfig external_notification;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_StoreForwardConfig store_forward;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_RangeTestConfig range_test;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_TelemetryConfig telemetry;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_CannedMessageConfig canned_message;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_AudioConfig audio;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_RemoteHardwareConfig remote_hardware;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_NeighborInfoConfig neighbor_info;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_AmbientLightingConfig ambient_lighting;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_DetectionSensorConfig detection_sensor;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_PaxcounterConfig paxcounter;\n        /* TODO: REPLACE */\n        meshtastic_ModuleConfig_StatusMessageConfig statusmessage;\n        /* Traffic management module config for mesh network optimization */\n        meshtastic_ModuleConfig_TrafficManagementConfig traffic_management;\n        /* TAK team/role configuration for TAK_TRACKER */\n        meshtastic_ModuleConfig_TAKConfig tak;\n    } payload_variant;\n} meshtastic_ModuleConfig;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_RemoteHardwarePinType_MIN meshtastic_RemoteHardwarePinType_UNKNOWN\n#define _meshtastic_RemoteHardwarePinType_MAX meshtastic_RemoteHardwarePinType_DIGITAL_WRITE\n#define _meshtastic_RemoteHardwarePinType_ARRAYSIZE ((meshtastic_RemoteHardwarePinType)(meshtastic_RemoteHardwarePinType_DIGITAL_WRITE+1))\n\n#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW\n#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MAX meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH\n#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_ARRAYSIZE ((meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType)(meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH+1))\n\n#define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT\n#define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MAX meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B\n#define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_AudioConfig_Audio_Baud)(meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B+1))\n\n#define _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_DEFAULT\n#define _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MAX meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600\n#define _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Baud)(meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600+1))\n\n#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT\n#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MAX meshtastic_ModuleConfig_SerialConfig_Serial_Mode_LOGTEXT\n#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Mode)(meshtastic_ModuleConfig_SerialConfig_Serial_Mode_LOGTEXT+1))\n\n#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE\n#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MAX meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK\n#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_ARRAYSIZE ((meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar)(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK+1))\n\n\n\n\n\n\n#define meshtastic_ModuleConfig_DetectionSensorConfig_detection_trigger_type_ENUMTYPE meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType\n\n#define meshtastic_ModuleConfig_AudioConfig_bitrate_ENUMTYPE meshtastic_ModuleConfig_AudioConfig_Audio_Baud\n\n\n\n#define meshtastic_ModuleConfig_SerialConfig_baud_ENUMTYPE meshtastic_ModuleConfig_SerialConfig_Serial_Baud\n#define meshtastic_ModuleConfig_SerialConfig_mode_ENUMTYPE meshtastic_ModuleConfig_SerialConfig_Serial_Mode\n\n\n\n\n\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_cw_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_ccw_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar\n\n\n\n#define meshtastic_ModuleConfig_TAKConfig_team_ENUMTYPE meshtastic_Team\n#define meshtastic_ModuleConfig_TAKConfig_role_ENUMTYPE meshtastic_MemberRole\n\n#define meshtastic_RemoteHardwarePin_type_ENUMTYPE meshtastic_RemoteHardwarePinType\n\n\n/* Initializer values for message structs */\n#define meshtastic_ModuleConfig_init_default     {0, {meshtastic_ModuleConfig_MQTTConfig_init_default}}\n#define meshtastic_ModuleConfig_MQTTConfig_init_default {0, \"\", \"\", \"\", 0, 0, 0, \"\", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_default}\n#define meshtastic_ModuleConfig_MapReportSettings_init_default {0, 0, 0}\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_default {0, 0, 0, {meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default}}\n#define meshtastic_ModuleConfig_NeighborInfoConfig_init_default {0, 0, 0}\n#define meshtastic_ModuleConfig_DetectionSensorConfig_init_default {0, 0, 0, 0, \"\", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}\n#define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_PaxcounterConfig_init_default {0, 0, 0, 0}\n#define meshtastic_ModuleConfig_TrafficManagementConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_SerialConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN, 0}\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_StoreForwardConfig_init_default {0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_RangeTestConfig_init_default {0, 0, 0, 0}\n#define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_CannedMessageConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, \"\", 0}\n#define meshtastic_ModuleConfig_AmbientLightingConfig_init_default {0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_StatusMessageConfig_init_default {\"\"}\n#define meshtastic_ModuleConfig_TAKConfig_init_default {_meshtastic_Team_MIN, _meshtastic_MemberRole_MIN}\n#define meshtastic_RemoteHardwarePin_init_default {0, \"\", _meshtastic_RemoteHardwarePinType_MIN}\n#define meshtastic_ModuleConfig_init_zero        {0, {meshtastic_ModuleConfig_MQTTConfig_init_zero}}\n#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, \"\", \"\", \"\", 0, 0, 0, \"\", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_zero}\n#define meshtastic_ModuleConfig_MapReportSettings_init_zero {0, 0, 0}\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero {0, 0, 0, {meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero}}\n#define meshtastic_ModuleConfig_NeighborInfoConfig_init_zero {0, 0, 0}\n#define meshtastic_ModuleConfig_DetectionSensorConfig_init_zero {0, 0, 0, 0, \"\", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}\n#define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_PaxcounterConfig_init_zero {0, 0, 0, 0}\n#define meshtastic_ModuleConfig_TrafficManagementConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_SerialConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN, 0}\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_StoreForwardConfig_init_zero {0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_RangeTestConfig_init_zero {0, 0, 0, 0}\n#define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_CannedMessageConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, \"\", 0}\n#define meshtastic_ModuleConfig_AmbientLightingConfig_init_zero {0, 0, 0, 0, 0}\n#define meshtastic_ModuleConfig_StatusMessageConfig_init_zero {\"\"}\n#define meshtastic_ModuleConfig_TAKConfig_init_zero {_meshtastic_Team_MIN, _meshtastic_MemberRole_MIN}\n#define meshtastic_RemoteHardwarePin_init_zero   {0, \"\", _meshtastic_RemoteHardwarePinType_MIN}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_ModuleConfig_MapReportSettings_publish_interval_secs_tag 1\n#define meshtastic_ModuleConfig_MapReportSettings_position_precision_tag 2\n#define meshtastic_ModuleConfig_MapReportSettings_should_report_location_tag 3\n#define meshtastic_ModuleConfig_MQTTConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_MQTTConfig_address_tag 2\n#define meshtastic_ModuleConfig_MQTTConfig_username_tag 3\n#define meshtastic_ModuleConfig_MQTTConfig_password_tag 4\n#define meshtastic_ModuleConfig_MQTTConfig_encryption_enabled_tag 5\n#define meshtastic_ModuleConfig_MQTTConfig_json_enabled_tag 6\n#define meshtastic_ModuleConfig_MQTTConfig_tls_enabled_tag 7\n#define meshtastic_ModuleConfig_MQTTConfig_root_tag 8\n#define meshtastic_ModuleConfig_MQTTConfig_proxy_to_client_enabled_tag 9\n#define meshtastic_ModuleConfig_MQTTConfig_map_reporting_enabled_tag 10\n#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_tag 11\n#define meshtastic_ModuleConfig_NeighborInfoConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_NeighborInfoConfig_update_interval_tag 2\n#define meshtastic_ModuleConfig_NeighborInfoConfig_transmit_over_lora_tag 3\n#define meshtastic_ModuleConfig_DetectionSensorConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_DetectionSensorConfig_minimum_broadcast_secs_tag 2\n#define meshtastic_ModuleConfig_DetectionSensorConfig_state_broadcast_secs_tag 3\n#define meshtastic_ModuleConfig_DetectionSensorConfig_send_bell_tag 4\n#define meshtastic_ModuleConfig_DetectionSensorConfig_name_tag 5\n#define meshtastic_ModuleConfig_DetectionSensorConfig_monitor_pin_tag 6\n#define meshtastic_ModuleConfig_DetectionSensorConfig_detection_trigger_type_tag 7\n#define meshtastic_ModuleConfig_DetectionSensorConfig_use_pullup_tag 8\n#define meshtastic_ModuleConfig_AudioConfig_codec2_enabled_tag 1\n#define meshtastic_ModuleConfig_AudioConfig_ptt_pin_tag 2\n#define meshtastic_ModuleConfig_AudioConfig_bitrate_tag 3\n#define meshtastic_ModuleConfig_AudioConfig_i2s_ws_tag 4\n#define meshtastic_ModuleConfig_AudioConfig_i2s_sd_tag 5\n#define meshtastic_ModuleConfig_AudioConfig_i2s_din_tag 6\n#define meshtastic_ModuleConfig_AudioConfig_i2s_sck_tag 7\n#define meshtastic_ModuleConfig_PaxcounterConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_PaxcounterConfig_paxcounter_update_interval_tag 2\n#define meshtastic_ModuleConfig_PaxcounterConfig_wifi_threshold_tag 3\n#define meshtastic_ModuleConfig_PaxcounterConfig_ble_threshold_tag 4\n#define meshtastic_ModuleConfig_TrafficManagementConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_TrafficManagementConfig_position_dedup_enabled_tag 2\n#define meshtastic_ModuleConfig_TrafficManagementConfig_position_precision_bits_tag 3\n#define meshtastic_ModuleConfig_TrafficManagementConfig_position_min_interval_secs_tag 4\n#define meshtastic_ModuleConfig_TrafficManagementConfig_nodeinfo_direct_response_tag 5\n#define meshtastic_ModuleConfig_TrafficManagementConfig_nodeinfo_direct_response_max_hops_tag 6\n#define meshtastic_ModuleConfig_TrafficManagementConfig_rate_limit_enabled_tag 7\n#define meshtastic_ModuleConfig_TrafficManagementConfig_rate_limit_window_secs_tag 8\n#define meshtastic_ModuleConfig_TrafficManagementConfig_rate_limit_max_packets_tag 9\n#define meshtastic_ModuleConfig_TrafficManagementConfig_drop_unknown_enabled_tag 10\n#define meshtastic_ModuleConfig_TrafficManagementConfig_unknown_packet_threshold_tag 11\n#define meshtastic_ModuleConfig_TrafficManagementConfig_exhaust_hop_telemetry_tag 12\n#define meshtastic_ModuleConfig_TrafficManagementConfig_exhaust_hop_position_tag 13\n#define meshtastic_ModuleConfig_TrafficManagementConfig_router_preserve_hops_tag 14\n#define meshtastic_ModuleConfig_SerialConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_SerialConfig_echo_tag 2\n#define meshtastic_ModuleConfig_SerialConfig_rxd_tag 3\n#define meshtastic_ModuleConfig_SerialConfig_txd_tag 4\n#define meshtastic_ModuleConfig_SerialConfig_baud_tag 5\n#define meshtastic_ModuleConfig_SerialConfig_timeout_tag 6\n#define meshtastic_ModuleConfig_SerialConfig_mode_tag 7\n#define meshtastic_ModuleConfig_SerialConfig_override_console_serial_port_tag 8\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_ms_tag 2\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_tag 3\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_active_tag 4\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_message_tag 5\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_bell_tag 6\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_use_pwm_tag 7\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_vibra_tag 8\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_buzzer_tag 9\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_message_vibra_tag 10\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_message_buzzer_tag 11\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_bell_vibra_tag 12\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_bell_buzzer_tag 13\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_nag_timeout_tag 14\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_use_i2s_as_buzzer_tag 15\n#define meshtastic_ModuleConfig_StoreForwardConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_StoreForwardConfig_heartbeat_tag 2\n#define meshtastic_ModuleConfig_StoreForwardConfig_records_tag 3\n#define meshtastic_ModuleConfig_StoreForwardConfig_history_return_max_tag 4\n#define meshtastic_ModuleConfig_StoreForwardConfig_history_return_window_tag 5\n#define meshtastic_ModuleConfig_StoreForwardConfig_is_server_tag 6\n#define meshtastic_ModuleConfig_RangeTestConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_RangeTestConfig_sender_tag 2\n#define meshtastic_ModuleConfig_RangeTestConfig_save_tag 3\n#define meshtastic_ModuleConfig_RangeTestConfig_clear_on_reboot_tag 4\n#define meshtastic_ModuleConfig_TelemetryConfig_device_update_interval_tag 1\n#define meshtastic_ModuleConfig_TelemetryConfig_environment_update_interval_tag 2\n#define meshtastic_ModuleConfig_TelemetryConfig_environment_measurement_enabled_tag 3\n#define meshtastic_ModuleConfig_TelemetryConfig_environment_screen_enabled_tag 4\n#define meshtastic_ModuleConfig_TelemetryConfig_environment_display_fahrenheit_tag 5\n#define meshtastic_ModuleConfig_TelemetryConfig_air_quality_enabled_tag 6\n#define meshtastic_ModuleConfig_TelemetryConfig_air_quality_interval_tag 7\n#define meshtastic_ModuleConfig_TelemetryConfig_power_measurement_enabled_tag 8\n#define meshtastic_ModuleConfig_TelemetryConfig_power_update_interval_tag 9\n#define meshtastic_ModuleConfig_TelemetryConfig_power_screen_enabled_tag 10\n#define meshtastic_ModuleConfig_TelemetryConfig_health_measurement_enabled_tag 11\n#define meshtastic_ModuleConfig_TelemetryConfig_health_update_interval_tag 12\n#define meshtastic_ModuleConfig_TelemetryConfig_health_screen_enabled_tag 13\n#define meshtastic_ModuleConfig_TelemetryConfig_device_telemetry_enabled_tag 14\n#define meshtastic_ModuleConfig_TelemetryConfig_air_quality_screen_enabled_tag 15\n#define meshtastic_ModuleConfig_CannedMessageConfig_rotary1_enabled_tag 1\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_a_tag 2\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_b_tag 3\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_press_tag 4\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_cw_tag 5\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_ccw_tag 6\n#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_tag 7\n#define meshtastic_ModuleConfig_CannedMessageConfig_updown1_enabled_tag 8\n#define meshtastic_ModuleConfig_CannedMessageConfig_enabled_tag 9\n#define meshtastic_ModuleConfig_CannedMessageConfig_allow_input_source_tag 10\n#define meshtastic_ModuleConfig_CannedMessageConfig_send_bell_tag 11\n#define meshtastic_ModuleConfig_AmbientLightingConfig_led_state_tag 1\n#define meshtastic_ModuleConfig_AmbientLightingConfig_current_tag 2\n#define meshtastic_ModuleConfig_AmbientLightingConfig_red_tag 3\n#define meshtastic_ModuleConfig_AmbientLightingConfig_green_tag 4\n#define meshtastic_ModuleConfig_AmbientLightingConfig_blue_tag 5\n#define meshtastic_ModuleConfig_StatusMessageConfig_node_status_tag 1\n#define meshtastic_ModuleConfig_TAKConfig_team_tag 1\n#define meshtastic_ModuleConfig_TAKConfig_role_tag 2\n#define meshtastic_RemoteHardwarePin_gpio_pin_tag 1\n#define meshtastic_RemoteHardwarePin_name_tag    2\n#define meshtastic_RemoteHardwarePin_type_tag    3\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_enabled_tag 1\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_allow_undefined_pin_access_tag 2\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_available_pins_tag 3\n#define meshtastic_ModuleConfig_mqtt_tag         1\n#define meshtastic_ModuleConfig_serial_tag       2\n#define meshtastic_ModuleConfig_external_notification_tag 3\n#define meshtastic_ModuleConfig_store_forward_tag 4\n#define meshtastic_ModuleConfig_range_test_tag   5\n#define meshtastic_ModuleConfig_telemetry_tag    6\n#define meshtastic_ModuleConfig_canned_message_tag 7\n#define meshtastic_ModuleConfig_audio_tag        8\n#define meshtastic_ModuleConfig_remote_hardware_tag 9\n#define meshtastic_ModuleConfig_neighbor_info_tag 10\n#define meshtastic_ModuleConfig_ambient_lighting_tag 11\n#define meshtastic_ModuleConfig_detection_sensor_tag 12\n#define meshtastic_ModuleConfig_paxcounter_tag   13\n#define meshtastic_ModuleConfig_statusmessage_tag 14\n#define meshtastic_ModuleConfig_traffic_management_tag 15\n#define meshtastic_ModuleConfig_tak_tag          16\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_ModuleConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,mqtt,payload_variant.mqtt),   1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,serial,payload_variant.serial),   2) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,external_notification,payload_variant.external_notification),   3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,store_forward,payload_variant.store_forward),   4) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,range_test,payload_variant.range_test),   5) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,telemetry,payload_variant.telemetry),   6) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,canned_message,payload_variant.canned_message),   7) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,audio,payload_variant.audio),   8) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,remote_hardware,payload_variant.remote_hardware),   9) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,neighbor_info,payload_variant.neighbor_info),  10) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,ambient_lighting,payload_variant.ambient_lighting),  11) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,detection_sensor,payload_variant.detection_sensor),  12) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,paxcounter,payload_variant.paxcounter),  13) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,statusmessage,payload_variant.statusmessage),  14) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,traffic_management,payload_variant.traffic_management),  15) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (payload_variant,tak,payload_variant.tak),  16)\n#define meshtastic_ModuleConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_DEFAULT NULL\n#define meshtastic_ModuleConfig_payload_variant_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig\n#define meshtastic_ModuleConfig_payload_variant_serial_MSGTYPE meshtastic_ModuleConfig_SerialConfig\n#define meshtastic_ModuleConfig_payload_variant_external_notification_MSGTYPE meshtastic_ModuleConfig_ExternalNotificationConfig\n#define meshtastic_ModuleConfig_payload_variant_store_forward_MSGTYPE meshtastic_ModuleConfig_StoreForwardConfig\n#define meshtastic_ModuleConfig_payload_variant_range_test_MSGTYPE meshtastic_ModuleConfig_RangeTestConfig\n#define meshtastic_ModuleConfig_payload_variant_telemetry_MSGTYPE meshtastic_ModuleConfig_TelemetryConfig\n#define meshtastic_ModuleConfig_payload_variant_canned_message_MSGTYPE meshtastic_ModuleConfig_CannedMessageConfig\n#define meshtastic_ModuleConfig_payload_variant_audio_MSGTYPE meshtastic_ModuleConfig_AudioConfig\n#define meshtastic_ModuleConfig_payload_variant_remote_hardware_MSGTYPE meshtastic_ModuleConfig_RemoteHardwareConfig\n#define meshtastic_ModuleConfig_payload_variant_neighbor_info_MSGTYPE meshtastic_ModuleConfig_NeighborInfoConfig\n#define meshtastic_ModuleConfig_payload_variant_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig\n#define meshtastic_ModuleConfig_payload_variant_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig\n#define meshtastic_ModuleConfig_payload_variant_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig\n#define meshtastic_ModuleConfig_payload_variant_statusmessage_MSGTYPE meshtastic_ModuleConfig_StatusMessageConfig\n#define meshtastic_ModuleConfig_payload_variant_traffic_management_MSGTYPE meshtastic_ModuleConfig_TrafficManagementConfig\n#define meshtastic_ModuleConfig_payload_variant_tak_MSGTYPE meshtastic_ModuleConfig_TAKConfig\n\n#define meshtastic_ModuleConfig_MQTTConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, STRING,   address,           2) \\\nX(a, STATIC,   SINGULAR, STRING,   username,          3) \\\nX(a, STATIC,   SINGULAR, STRING,   password,          4) \\\nX(a, STATIC,   SINGULAR, BOOL,     encryption_enabled,   5) \\\nX(a, STATIC,   SINGULAR, BOOL,     json_enabled,      6) \\\nX(a, STATIC,   SINGULAR, BOOL,     tls_enabled,       7) \\\nX(a, STATIC,   SINGULAR, STRING,   root,              8) \\\nX(a, STATIC,   SINGULAR, BOOL,     proxy_to_client_enabled,   9) \\\nX(a, STATIC,   SINGULAR, BOOL,     map_reporting_enabled,  10) \\\nX(a, STATIC,   OPTIONAL, MESSAGE,  map_report_settings,  11)\n#define meshtastic_ModuleConfig_MQTTConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_MQTTConfig_DEFAULT NULL\n#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_MSGTYPE meshtastic_ModuleConfig_MapReportSettings\n\n#define meshtastic_ModuleConfig_MapReportSettings_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   publish_interval_secs,   1) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_precision,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     should_report_location,   3)\n#define meshtastic_ModuleConfig_MapReportSettings_CALLBACK NULL\n#define meshtastic_ModuleConfig_MapReportSettings_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, BOOL,     allow_undefined_pin_access,   2) \\\nX(a, STATIC,   REPEATED, MESSAGE,  available_pins,    3)\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_DEFAULT NULL\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_available_pins_MSGTYPE meshtastic_RemoteHardwarePin\n\n#define meshtastic_ModuleConfig_NeighborInfoConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   update_interval,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     transmit_over_lora,   3)\n#define meshtastic_ModuleConfig_NeighborInfoConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_NeighborInfoConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_DetectionSensorConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   minimum_broadcast_secs,   2) \\\nX(a, STATIC,   SINGULAR, UINT32,   state_broadcast_secs,   3) \\\nX(a, STATIC,   SINGULAR, BOOL,     send_bell,         4) \\\nX(a, STATIC,   SINGULAR, STRING,   name,              5) \\\nX(a, STATIC,   SINGULAR, UINT32,   monitor_pin,       6) \\\nX(a, STATIC,   SINGULAR, UENUM,    detection_trigger_type,   7) \\\nX(a, STATIC,   SINGULAR, BOOL,     use_pullup,        8)\n#define meshtastic_ModuleConfig_DetectionSensorConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_DetectionSensorConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_AudioConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     codec2_enabled,    1) \\\nX(a, STATIC,   SINGULAR, UINT32,   ptt_pin,           2) \\\nX(a, STATIC,   SINGULAR, UENUM,    bitrate,           3) \\\nX(a, STATIC,   SINGULAR, UINT32,   i2s_ws,            4) \\\nX(a, STATIC,   SINGULAR, UINT32,   i2s_sd,            5) \\\nX(a, STATIC,   SINGULAR, UINT32,   i2s_din,           6) \\\nX(a, STATIC,   SINGULAR, UINT32,   i2s_sck,           7)\n#define meshtastic_ModuleConfig_AudioConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_AudioConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_PaxcounterConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   paxcounter_update_interval,   2) \\\nX(a, STATIC,   SINGULAR, INT32,    wifi_threshold,    3) \\\nX(a, STATIC,   SINGULAR, INT32,    ble_threshold,     4)\n#define meshtastic_ModuleConfig_PaxcounterConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_PaxcounterConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_TrafficManagementConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, BOOL,     position_dedup_enabled,   2) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_precision_bits,   3) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_min_interval_secs,   4) \\\nX(a, STATIC,   SINGULAR, BOOL,     nodeinfo_direct_response,   5) \\\nX(a, STATIC,   SINGULAR, UINT32,   nodeinfo_direct_response_max_hops,   6) \\\nX(a, STATIC,   SINGULAR, BOOL,     rate_limit_enabled,   7) \\\nX(a, STATIC,   SINGULAR, UINT32,   rate_limit_window_secs,   8) \\\nX(a, STATIC,   SINGULAR, UINT32,   rate_limit_max_packets,   9) \\\nX(a, STATIC,   SINGULAR, BOOL,     drop_unknown_enabled,  10) \\\nX(a, STATIC,   SINGULAR, UINT32,   unknown_packet_threshold,  11) \\\nX(a, STATIC,   SINGULAR, BOOL,     exhaust_hop_telemetry,  12) \\\nX(a, STATIC,   SINGULAR, BOOL,     exhaust_hop_position,  13) \\\nX(a, STATIC,   SINGULAR, BOOL,     router_preserve_hops,  14)\n#define meshtastic_ModuleConfig_TrafficManagementConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_TrafficManagementConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_SerialConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, BOOL,     echo,              2) \\\nX(a, STATIC,   SINGULAR, UINT32,   rxd,               3) \\\nX(a, STATIC,   SINGULAR, UINT32,   txd,               4) \\\nX(a, STATIC,   SINGULAR, UENUM,    baud,              5) \\\nX(a, STATIC,   SINGULAR, UINT32,   timeout,           6) \\\nX(a, STATIC,   SINGULAR, UENUM,    mode,              7) \\\nX(a, STATIC,   SINGULAR, BOOL,     override_console_serial_port,   8)\n#define meshtastic_ModuleConfig_SerialConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_SerialConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   output_ms,         2) \\\nX(a, STATIC,   SINGULAR, UINT32,   output,            3) \\\nX(a, STATIC,   SINGULAR, BOOL,     active,            4) \\\nX(a, STATIC,   SINGULAR, BOOL,     alert_message,     5) \\\nX(a, STATIC,   SINGULAR, BOOL,     alert_bell,        6) \\\nX(a, STATIC,   SINGULAR, BOOL,     use_pwm,           7) \\\nX(a, STATIC,   SINGULAR, UINT32,   output_vibra,      8) \\\nX(a, STATIC,   SINGULAR, UINT32,   output_buzzer,     9) \\\nX(a, STATIC,   SINGULAR, BOOL,     alert_message_vibra,  10) \\\nX(a, STATIC,   SINGULAR, BOOL,     alert_message_buzzer,  11) \\\nX(a, STATIC,   SINGULAR, BOOL,     alert_bell_vibra,  12) \\\nX(a, STATIC,   SINGULAR, BOOL,     alert_bell_buzzer,  13) \\\nX(a, STATIC,   SINGULAR, UINT32,   nag_timeout,      14) \\\nX(a, STATIC,   SINGULAR, BOOL,     use_i2s_as_buzzer,  15)\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_StoreForwardConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, BOOL,     heartbeat,         2) \\\nX(a, STATIC,   SINGULAR, UINT32,   records,           3) \\\nX(a, STATIC,   SINGULAR, UINT32,   history_return_max,   4) \\\nX(a, STATIC,   SINGULAR, UINT32,   history_return_window,   5) \\\nX(a, STATIC,   SINGULAR, BOOL,     is_server,         6)\n#define meshtastic_ModuleConfig_StoreForwardConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_StoreForwardConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_RangeTestConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   sender,            2) \\\nX(a, STATIC,   SINGULAR, BOOL,     save,              3) \\\nX(a, STATIC,   SINGULAR, BOOL,     clear_on_reboot,   4)\n#define meshtastic_ModuleConfig_RangeTestConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_RangeTestConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_TelemetryConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   device_update_interval,   1) \\\nX(a, STATIC,   SINGULAR, UINT32,   environment_update_interval,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     environment_measurement_enabled,   3) \\\nX(a, STATIC,   SINGULAR, BOOL,     environment_screen_enabled,   4) \\\nX(a, STATIC,   SINGULAR, BOOL,     environment_display_fahrenheit,   5) \\\nX(a, STATIC,   SINGULAR, BOOL,     air_quality_enabled,   6) \\\nX(a, STATIC,   SINGULAR, UINT32,   air_quality_interval,   7) \\\nX(a, STATIC,   SINGULAR, BOOL,     power_measurement_enabled,   8) \\\nX(a, STATIC,   SINGULAR, UINT32,   power_update_interval,   9) \\\nX(a, STATIC,   SINGULAR, BOOL,     power_screen_enabled,  10) \\\nX(a, STATIC,   SINGULAR, BOOL,     health_measurement_enabled,  11) \\\nX(a, STATIC,   SINGULAR, UINT32,   health_update_interval,  12) \\\nX(a, STATIC,   SINGULAR, BOOL,     health_screen_enabled,  13) \\\nX(a, STATIC,   SINGULAR, BOOL,     device_telemetry_enabled,  14) \\\nX(a, STATIC,   SINGULAR, BOOL,     air_quality_screen_enabled,  15)\n#define meshtastic_ModuleConfig_TelemetryConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_TelemetryConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_CannedMessageConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     rotary1_enabled,   1) \\\nX(a, STATIC,   SINGULAR, UINT32,   inputbroker_pin_a,   2) \\\nX(a, STATIC,   SINGULAR, UINT32,   inputbroker_pin_b,   3) \\\nX(a, STATIC,   SINGULAR, UINT32,   inputbroker_pin_press,   4) \\\nX(a, STATIC,   SINGULAR, UENUM,    inputbroker_event_cw,   5) \\\nX(a, STATIC,   SINGULAR, UENUM,    inputbroker_event_ccw,   6) \\\nX(a, STATIC,   SINGULAR, UENUM,    inputbroker_event_press,   7) \\\nX(a, STATIC,   SINGULAR, BOOL,     updown1_enabled,   8) \\\nX(a, STATIC,   SINGULAR, BOOL,     enabled,           9) \\\nX(a, STATIC,   SINGULAR, STRING,   allow_input_source,  10) \\\nX(a, STATIC,   SINGULAR, BOOL,     send_bell,        11)\n#define meshtastic_ModuleConfig_CannedMessageConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_CannedMessageConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_AmbientLightingConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, BOOL,     led_state,         1) \\\nX(a, STATIC,   SINGULAR, UINT32,   current,           2) \\\nX(a, STATIC,   SINGULAR, UINT32,   red,               3) \\\nX(a, STATIC,   SINGULAR, UINT32,   green,             4) \\\nX(a, STATIC,   SINGULAR, UINT32,   blue,              5)\n#define meshtastic_ModuleConfig_AmbientLightingConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_AmbientLightingConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_StatusMessageConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   node_status,       1)\n#define meshtastic_ModuleConfig_StatusMessageConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_StatusMessageConfig_DEFAULT NULL\n\n#define meshtastic_ModuleConfig_TAKConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    team,              1) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              2)\n#define meshtastic_ModuleConfig_TAKConfig_CALLBACK NULL\n#define meshtastic_ModuleConfig_TAKConfig_DEFAULT NULL\n\n#define meshtastic_RemoteHardwarePin_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   gpio_pin,          1) \\\nX(a, STATIC,   SINGULAR, STRING,   name,              2) \\\nX(a, STATIC,   SINGULAR, UENUM,    type,              3)\n#define meshtastic_RemoteHardwarePin_CALLBACK NULL\n#define meshtastic_RemoteHardwarePin_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_ModuleConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_MQTTConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_MapReportSettings_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_RemoteHardwareConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_NeighborInfoConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_DetectionSensorConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_AudioConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_PaxcounterConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_TrafficManagementConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_SerialConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_ExternalNotificationConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_StoreForwardConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_RangeTestConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_TelemetryConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_AmbientLightingConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_StatusMessageConfig_msg;\nextern const pb_msgdesc_t meshtastic_ModuleConfig_TAKConfig_msg;\nextern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_ModuleConfig_fields &meshtastic_ModuleConfig_msg\n#define meshtastic_ModuleConfig_MQTTConfig_fields &meshtastic_ModuleConfig_MQTTConfig_msg\n#define meshtastic_ModuleConfig_MapReportSettings_fields &meshtastic_ModuleConfig_MapReportSettings_msg\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_fields &meshtastic_ModuleConfig_RemoteHardwareConfig_msg\n#define meshtastic_ModuleConfig_NeighborInfoConfig_fields &meshtastic_ModuleConfig_NeighborInfoConfig_msg\n#define meshtastic_ModuleConfig_DetectionSensorConfig_fields &meshtastic_ModuleConfig_DetectionSensorConfig_msg\n#define meshtastic_ModuleConfig_AudioConfig_fields &meshtastic_ModuleConfig_AudioConfig_msg\n#define meshtastic_ModuleConfig_PaxcounterConfig_fields &meshtastic_ModuleConfig_PaxcounterConfig_msg\n#define meshtastic_ModuleConfig_TrafficManagementConfig_fields &meshtastic_ModuleConfig_TrafficManagementConfig_msg\n#define meshtastic_ModuleConfig_SerialConfig_fields &meshtastic_ModuleConfig_SerialConfig_msg\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_fields &meshtastic_ModuleConfig_ExternalNotificationConfig_msg\n#define meshtastic_ModuleConfig_StoreForwardConfig_fields &meshtastic_ModuleConfig_StoreForwardConfig_msg\n#define meshtastic_ModuleConfig_RangeTestConfig_fields &meshtastic_ModuleConfig_RangeTestConfig_msg\n#define meshtastic_ModuleConfig_TelemetryConfig_fields &meshtastic_ModuleConfig_TelemetryConfig_msg\n#define meshtastic_ModuleConfig_CannedMessageConfig_fields &meshtastic_ModuleConfig_CannedMessageConfig_msg\n#define meshtastic_ModuleConfig_AmbientLightingConfig_fields &meshtastic_ModuleConfig_AmbientLightingConfig_msg\n#define meshtastic_ModuleConfig_StatusMessageConfig_fields &meshtastic_ModuleConfig_StatusMessageConfig_msg\n#define meshtastic_ModuleConfig_TAKConfig_fields &meshtastic_ModuleConfig_TAKConfig_msg\n#define meshtastic_RemoteHardwarePin_fields &meshtastic_RemoteHardwarePin_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_MAX_SIZE meshtastic_ModuleConfig_size\n#define meshtastic_ModuleConfig_AmbientLightingConfig_size 14\n#define meshtastic_ModuleConfig_AudioConfig_size 19\n#define meshtastic_ModuleConfig_CannedMessageConfig_size 49\n#define meshtastic_ModuleConfig_DetectionSensorConfig_size 44\n#define meshtastic_ModuleConfig_ExternalNotificationConfig_size 42\n#define meshtastic_ModuleConfig_MQTTConfig_size  224\n#define meshtastic_ModuleConfig_MapReportSettings_size 14\n#define meshtastic_ModuleConfig_NeighborInfoConfig_size 10\n#define meshtastic_ModuleConfig_PaxcounterConfig_size 30\n#define meshtastic_ModuleConfig_RangeTestConfig_size 12\n#define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96\n#define meshtastic_ModuleConfig_SerialConfig_size 28\n#define meshtastic_ModuleConfig_StatusMessageConfig_size 81\n#define meshtastic_ModuleConfig_StoreForwardConfig_size 24\n#define meshtastic_ModuleConfig_TAKConfig_size   4\n#define meshtastic_ModuleConfig_TelemetryConfig_size 50\n#define meshtastic_ModuleConfig_TrafficManagementConfig_size 52\n#define meshtastic_ModuleConfig_size             227\n#define meshtastic_RemoteHardwarePin_size        21\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/mqtt.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/mqtt.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_ServiceEnvelope, meshtastic_ServiceEnvelope, AUTO)\n\n\nPB_BIND(meshtastic_MapReport, meshtastic_MapReport, AUTO)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/mqtt.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_MQTT_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_MQTT_PB_H_INCLUDED\n#include <pb.h>\n#include \"meshtastic/config.pb.h\"\n#include \"meshtastic/mesh.pb.h\"\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* This message wraps a MeshPacket with extra metadata about the sender and how it arrived. */\ntypedef struct _meshtastic_ServiceEnvelope {\n    /* The (probably encrypted) packet */\n    struct _meshtastic_MeshPacket *packet;\n    /* The global channel ID it was sent on */\n    char *channel_id;\n    /* The sending gateway node ID. Can we use this to authenticate/prevent fake\n nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as\n the globally trusted nodenum */\n    char *gateway_id;\n} meshtastic_ServiceEnvelope;\n\n/* Information about a node intended to be reported unencrypted to a map using MQTT. */\ntypedef struct _meshtastic_MapReport {\n    /* A full name for this user, i.e. \"Kevin Hester\" */\n    char long_name[40];\n    /* A VERY short name, ideally two characters.\n Suitable for a tiny OLED screen */\n    char short_name[5];\n    /* Role of the node that applies specific settings for a particular use-case */\n    meshtastic_Config_DeviceConfig_Role role;\n    /* Hardware model of the node, i.e. T-Beam, Heltec V3, etc... */\n    meshtastic_HardwareModel hw_model;\n    /* Device firmware version string */\n    char firmware_version[18];\n    /* The region code for the radio (US, CN, EU433, etc...) */\n    meshtastic_Config_LoRaConfig_RegionCode region;\n    /* Modem preset used by the radio (LongFast, MediumSlow, etc...) */\n    meshtastic_Config_LoRaConfig_ModemPreset modem_preset;\n    /* Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...)\n and it uses the default frequency slot given the region and modem preset. */\n    bool has_default_channel;\n    /* Latitude: multiply by 1e-7 to get degrees in floating point */\n    int32_t latitude_i;\n    /* Longitude: multiply by 1e-7 to get degrees in floating point */\n    int32_t longitude_i;\n    /* Altitude in meters above MSL */\n    int32_t altitude;\n    /* Indicates the bits of precision for latitude and longitude set by the sending node */\n    uint32_t position_precision;\n    /* Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) */\n    uint16_t num_online_local_nodes;\n    /* User has opted in to share their location (map report) with the mqtt server\n Controlled by map_report.should_report_location */\n    bool has_opted_report_location;\n} meshtastic_MapReport;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_ServiceEnvelope_init_default  {NULL, NULL, NULL}\n#define meshtastic_MapReport_init_default        {\"\", \"\", _meshtastic_Config_DeviceConfig_Role_MIN, _meshtastic_HardwareModel_MIN, \"\", _meshtastic_Config_LoRaConfig_RegionCode_MIN, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_ServiceEnvelope_init_zero     {NULL, NULL, NULL}\n#define meshtastic_MapReport_init_zero           {\"\", \"\", _meshtastic_Config_DeviceConfig_Role_MIN, _meshtastic_HardwareModel_MIN, \"\", _meshtastic_Config_LoRaConfig_RegionCode_MIN, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, 0, 0, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_ServiceEnvelope_packet_tag    1\n#define meshtastic_ServiceEnvelope_channel_id_tag 2\n#define meshtastic_ServiceEnvelope_gateway_id_tag 3\n#define meshtastic_MapReport_long_name_tag       1\n#define meshtastic_MapReport_short_name_tag      2\n#define meshtastic_MapReport_role_tag            3\n#define meshtastic_MapReport_hw_model_tag        4\n#define meshtastic_MapReport_firmware_version_tag 5\n#define meshtastic_MapReport_region_tag          6\n#define meshtastic_MapReport_modem_preset_tag    7\n#define meshtastic_MapReport_has_default_channel_tag 8\n#define meshtastic_MapReport_latitude_i_tag      9\n#define meshtastic_MapReport_longitude_i_tag     10\n#define meshtastic_MapReport_altitude_tag        11\n#define meshtastic_MapReport_position_precision_tag 12\n#define meshtastic_MapReport_num_online_local_nodes_tag 13\n#define meshtastic_MapReport_has_opted_report_location_tag 14\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_ServiceEnvelope_FIELDLIST(X, a) \\\nX(a, POINTER,  OPTIONAL, MESSAGE,  packet,            1) \\\nX(a, POINTER,  SINGULAR, STRING,   channel_id,        2) \\\nX(a, POINTER,  SINGULAR, STRING,   gateway_id,        3)\n#define meshtastic_ServiceEnvelope_CALLBACK NULL\n#define meshtastic_ServiceEnvelope_DEFAULT NULL\n#define meshtastic_ServiceEnvelope_packet_MSGTYPE meshtastic_MeshPacket\n\n#define meshtastic_MapReport_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   long_name,         1) \\\nX(a, STATIC,   SINGULAR, STRING,   short_name,        2) \\\nX(a, STATIC,   SINGULAR, UENUM,    role,              3) \\\nX(a, STATIC,   SINGULAR, UENUM,    hw_model,          4) \\\nX(a, STATIC,   SINGULAR, STRING,   firmware_version,   5) \\\nX(a, STATIC,   SINGULAR, UENUM,    region,            6) \\\nX(a, STATIC,   SINGULAR, UENUM,    modem_preset,      7) \\\nX(a, STATIC,   SINGULAR, BOOL,     has_default_channel,   8) \\\nX(a, STATIC,   SINGULAR, SFIXED32, latitude_i,        9) \\\nX(a, STATIC,   SINGULAR, SFIXED32, longitude_i,      10) \\\nX(a, STATIC,   SINGULAR, INT32,    altitude,         11) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_precision,  12) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_online_local_nodes,  13) \\\nX(a, STATIC,   SINGULAR, BOOL,     has_opted_report_location,  14)\n#define meshtastic_MapReport_CALLBACK NULL\n#define meshtastic_MapReport_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_ServiceEnvelope_msg;\nextern const pb_msgdesc_t meshtastic_MapReport_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_ServiceEnvelope_fields &meshtastic_ServiceEnvelope_msg\n#define meshtastic_MapReport_fields &meshtastic_MapReport_msg\n\n/* Maximum encoded size of messages (where known) */\n/* meshtastic_ServiceEnvelope_size depends on runtime parameters */\n#define MESHTASTIC_MESHTASTIC_MQTT_PB_H_MAX_SIZE meshtastic_MapReport_size\n#define meshtastic_MapReport_size                110\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/paxcount.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/paxcount.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_Paxcount, meshtastic_Paxcount, AUTO)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/paxcount.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* TODO: REPLACE */\ntypedef struct _meshtastic_Paxcount {\n    /* seen Wifi devices */\n    uint32_t wifi;\n    /* Seen BLE devices */\n    uint32_t ble;\n    /* Uptime in seconds */\n    uint32_t uptime;\n} meshtastic_Paxcount;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_Paxcount_init_default         {0, 0, 0}\n#define meshtastic_Paxcount_init_zero            {0, 0, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_Paxcount_wifi_tag             1\n#define meshtastic_Paxcount_ble_tag              2\n#define meshtastic_Paxcount_uptime_tag           3\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_Paxcount_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   wifi,              1) \\\nX(a, STATIC,   SINGULAR, UINT32,   ble,               2) \\\nX(a, STATIC,   SINGULAR, UINT32,   uptime,            3)\n#define meshtastic_Paxcount_CALLBACK NULL\n#define meshtastic_Paxcount_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_Paxcount_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_Paxcount_fields &meshtastic_Paxcount_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_MAX_SIZE meshtastic_Paxcount_size\n#define meshtastic_Paxcount_size                 18\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/portnums.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/portnums.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/portnums.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_PORTNUMS_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_PORTNUMS_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a\n unique 'portnum' for their application.\n If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this\n master table.\n PortNums should be assigned in the following range:\n 0-63   Core Meshtastic use, do not use for third party apps\n 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to  register your application\n 256-511 Use one of these portnums for your private applications that you don't want to register publically\n All other values are reserved.\n Note: This was formerly a Type enum named 'typ' with the same id #\n We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.\n This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically. */\ntypedef enum _meshtastic_PortNum {\n    /* Deprecated: do not use in new code (formerly called OPAQUE)\n A message sent from a device outside of the mesh, in a form the mesh does not understand\n NOTE: This must be 0, because it is documented in IMeshService.aidl to be so\n ENCODING: binary undefined */\n    meshtastic_PortNum_UNKNOWN_APP = 0,\n    /* A simple UTF-8 text message, which even the little micros in the mesh\n can understand and show on their screen eventually in some circumstances\n even signal might send messages in this form (see below)\n ENCODING: UTF-8 Plaintext (?) */\n    meshtastic_PortNum_TEXT_MESSAGE_APP = 1,\n    /* Reserved for built-in GPIO/example app.\n See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number\n ENCODING: Protobuf */\n    meshtastic_PortNum_REMOTE_HARDWARE_APP = 2,\n    /* The built-in position messaging app.\n Payload is a Position message.\n ENCODING: Protobuf */\n    meshtastic_PortNum_POSITION_APP = 3,\n    /* The built-in user info app.\n Payload is a User message.\n ENCODING: Protobuf */\n    meshtastic_PortNum_NODEINFO_APP = 4,\n    /* Protocol control packets for mesh protocol use.\n Payload is a Routing message.\n ENCODING: Protobuf */\n    meshtastic_PortNum_ROUTING_APP = 5,\n    /* Admin control packets.\n Payload is a AdminMessage message.\n ENCODING: Protobuf */\n    meshtastic_PortNum_ADMIN_APP = 6,\n    /* Compressed TEXT_MESSAGE payloads.\n ENCODING: UTF-8 Plaintext (?) with Unishox2 Compression\n NOTE: The Device Firmware converts a TEXT_MESSAGE_APP to TEXT_MESSAGE_COMPRESSED_APP if the compressed\n payload is shorter. There's no need for app developers to do this themselves. Also the firmware will decompress\n any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP. */\n    meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP = 7,\n    /* Waypoint payloads.\n Payload is a Waypoint message.\n ENCODING: Protobuf */\n    meshtastic_PortNum_WAYPOINT_APP = 8,\n    /* Audio Payloads.\n Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now\n ENCODING: codec2 audio frames\n NOTE: audio frames contain a 3 byte header (0xc0 0xde 0xc2) and a one byte marker for the decompressed bitrate.\n This marker comes from the 'moduleConfig.audio.bitrate' enum minus one. */\n    meshtastic_PortNum_AUDIO_APP = 9,\n    /* Same as Text Message but originating from Detection Sensor Module.\n NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 */\n    meshtastic_PortNum_DETECTION_SENSOR_APP = 10,\n    /* Same as Text Message but used for critical alerts. */\n    meshtastic_PortNum_ALERT_APP = 11,\n    /* Module/port for handling key verification requests. */\n    meshtastic_PortNum_KEY_VERIFICATION_APP = 12,\n    /* Provides a 'ping' service that replies to any packet it receives.\n Also serves as a small example module.\n ENCODING: ASCII Plaintext */\n    meshtastic_PortNum_REPLY_APP = 32,\n    /* Used for the python IP tunnel feature\n ENCODING: IP Packet. Handled by the python API, firmware ignores this one and pases on. */\n    meshtastic_PortNum_IP_TUNNEL_APP = 33,\n    /* Paxcounter lib included in the firmware\n ENCODING: protobuf */\n    meshtastic_PortNum_PAXCOUNTER_APP = 34,\n    /* Store and Forward++ module included in the firmware\n ENCODING: protobuf\n This module is specifically for Native Linux nodes, and provides a Git-style\n chain of messages. */\n    meshtastic_PortNum_STORE_FORWARD_PLUSPLUS_APP = 35,\n    /* Node Status module\n ENCODING: protobuf\n This module allows setting an extra string of status for a node.\n Broadcasts on change and on a timer, possibly once a day. */\n    meshtastic_PortNum_NODE_STATUS_APP = 36,\n    /* Provides a hardware serial interface to send and receive from the Meshtastic network.\n Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic\n network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.\n Maximum packet size of 240 bytes.\n Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp.\n ENCODING: binary undefined */\n    meshtastic_PortNum_SERIAL_APP = 64,\n    /* STORE_FORWARD_APP (Work in Progress)\n Maintained by Jm Casler (MC Hamster) : jm@casler.org\n ENCODING: Protobuf */\n    meshtastic_PortNum_STORE_FORWARD_APP = 65,\n    /* Optional port for messages for the range test module.\n ENCODING: ASCII Plaintext\n NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 */\n    meshtastic_PortNum_RANGE_TEST_APP = 66,\n    /* Provides a format to send and receive telemetry data from the Meshtastic network.\n Maintained by Charles Crossan (crossan007) : crossan007@gmail.com\n ENCODING: Protobuf */\n    meshtastic_PortNum_TELEMETRY_APP = 67,\n    /* Experimental tools for estimating node position without a GPS\n Maintained by Github user a-f-G-U-C (a Meshtastic contributor)\n Project files at https://github.com/a-f-G-U-C/Meshtastic-ZPS\n ENCODING: arrays of int64 fields */\n    meshtastic_PortNum_ZPS_APP = 68,\n    /* Used to let multiple instances of Linux native applications communicate\n as if they did using their LoRa chip.\n Maintained by GitHub user GUVWAF.\n Project files at https://github.com/GUVWAF/Meshtasticator\n ENCODING: Protobuf (?) */\n    meshtastic_PortNum_SIMULATOR_APP = 69,\n    /* Provides a traceroute functionality to show the route a packet towards\n a certain destination would take on the mesh. Contains a RouteDiscovery message as payload.\n ENCODING: Protobuf */\n    meshtastic_PortNum_TRACEROUTE_APP = 70,\n    /* Aggregates edge info for the network by sending out a list of each node's neighbors\n ENCODING: Protobuf */\n    meshtastic_PortNum_NEIGHBORINFO_APP = 71,\n    /* ATAK Plugin\n Portnum for payloads from the official Meshtastic ATAK plugin */\n    meshtastic_PortNum_ATAK_PLUGIN = 72,\n    /* Provides unencrypted information about a node for consumption by a map via MQTT */\n    meshtastic_PortNum_MAP_REPORT_APP = 73,\n    /* PowerStress based monitoring support (for automated power consumption testing) */\n    meshtastic_PortNum_POWERSTRESS_APP = 74,\n    /* LoraWAN Payload Transport\n ENCODING: compact binary LoRaWAN uplink (10-byte RF metadata + PHY payload) - see LoRaWANBridgeModule */\n    meshtastic_PortNum_LORAWAN_BRIDGE = 75,\n    /* Reticulum Network Stack Tunnel App\n ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface */\n    meshtastic_PortNum_RETICULUM_TUNNEL_APP = 76,\n    /* App for transporting Cayenne Low Power Payload, popular for LoRaWAN sensor nodes. Offers ability to send\n arbitrary telemetry over meshtastic that is not covered by telemetry.proto\n ENCODING: CayenneLLP */\n    meshtastic_PortNum_CAYENNE_APP = 77,\n    /* GroupAlarm integration\n Used for transporting GroupAlarm-related messages between Meshtastic nodes\n and companion applications/services. */\n    meshtastic_PortNum_GROUPALARM_APP = 112,\n    /* Private applications should use portnums >= 256.\n To simplify initial development and testing you can use \"PRIVATE_APP\"\n in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh)) */\n    meshtastic_PortNum_PRIVATE_APP = 256,\n    /* ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder\n ENCODING: libcotshrink */\n    meshtastic_PortNum_ATAK_FORWARDER = 257,\n    /* Currently we limit port nums to no higher than this value */\n    meshtastic_PortNum_MAX = 511\n} meshtastic_PortNum;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_PortNum_MIN meshtastic_PortNum_UNKNOWN_APP\n#define _meshtastic_PortNum_MAX meshtastic_PortNum_MAX\n#define _meshtastic_PortNum_ARRAYSIZE ((meshtastic_PortNum)(meshtastic_PortNum_MAX+1))\n\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/powermon.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/powermon.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_PowerMon, meshtastic_PowerMon, AUTO)\n\n\nPB_BIND(meshtastic_PowerStressMessage, meshtastic_PowerStressMessage, AUTO)\n\n\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/powermon.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* Any significant power changing event in meshtastic should be tagged with a powermon state transition.\n If you are making new meshtastic features feel free to add new entries at the end of this definition. */\ntypedef enum _meshtastic_PowerMon_State {\n    meshtastic_PowerMon_State_None = 0,\n    meshtastic_PowerMon_State_CPU_DeepSleep = 1,\n    meshtastic_PowerMon_State_CPU_LightSleep = 2,\n    /* The external Vext1 power is on.  Many boards have auxillary power rails that the CPU turns on only\noccasionally.  In cases where that rail has multiple devices on it we usually want to have logging on\nthe state of that rail as an independent record.\nFor instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen.\n\nThe log messages will be short and complete (see PowerMon.Event in the protobufs for details).\nsomething like \"S:PM:C,0x00001234,REASON\" where the hex number is the bitmask of all current states.\n(We use a bitmask for states so that if a log message gets lost it won't be fatal) */\n    meshtastic_PowerMon_State_Vext1_On = 4,\n    meshtastic_PowerMon_State_Lora_RXOn = 8,\n    meshtastic_PowerMon_State_Lora_TXOn = 16,\n    meshtastic_PowerMon_State_Lora_RXActive = 32,\n    meshtastic_PowerMon_State_BT_On = 64,\n    meshtastic_PowerMon_State_LED_On = 128,\n    meshtastic_PowerMon_State_Screen_On = 256,\n    meshtastic_PowerMon_State_Screen_Drawing = 512,\n    meshtastic_PowerMon_State_Wifi_On = 1024,\n    /* GPS is actively trying to find our location\n See GPSPowerState for more details */\n    meshtastic_PowerMon_State_GPS_Active = 2048\n} meshtastic_PowerMon_State;\n\n/* What operation would we like the UUT to perform.\n note: senders should probably set want_response in their request packets, so that they can know when the state\n machine has started processing their request */\ntypedef enum _meshtastic_PowerStressMessage_Opcode {\n    /* Unset/unused */\n    meshtastic_PowerStressMessage_Opcode_UNSET = 0,\n    meshtastic_PowerStressMessage_Opcode_PRINT_INFO = 1, /* Print board version slog and send an ack that we are alive and ready to process commands */\n    meshtastic_PowerStressMessage_Opcode_FORCE_QUIET = 2, /* Try to turn off all automatic processing of packets, screen, sleeping, etc (to make it easier to measure in isolation) */\n    meshtastic_PowerStressMessage_Opcode_END_QUIET = 3, /* Stop powerstress processing - probably by just rebooting the board */\n    meshtastic_PowerStressMessage_Opcode_SCREEN_ON = 16, /* Turn the screen on */\n    meshtastic_PowerStressMessage_Opcode_SCREEN_OFF = 17, /* Turn the screen off */\n    meshtastic_PowerStressMessage_Opcode_CPU_IDLE = 32, /* Let the CPU run but we assume mostly idling for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_CPU_DEEPSLEEP = 33, /* Force deep sleep for FIXME seconds */\n    meshtastic_PowerStressMessage_Opcode_CPU_FULLON = 34, /* Spin the CPU as fast as possible for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_LED_ON = 48, /* Turn the LED on for num_seconds (and leave it on - for baseline power measurement purposes) */\n    meshtastic_PowerStressMessage_Opcode_LED_OFF = 49, /* Force the LED off for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_LORA_OFF = 64, /* Completely turn off the LORA radio for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_LORA_TX = 65, /* Send Lora packets for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_LORA_RX = 66, /* Receive Lora packets for num_seconds (node will be mostly just listening, unless an external agent is helping stress this by sending packets on the current channel) */\n    meshtastic_PowerStressMessage_Opcode_BT_OFF = 80, /* Turn off the BT radio for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_BT_ON = 81, /* Turn on the BT radio for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_WIFI_OFF = 96, /* Turn off the WIFI radio for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_WIFI_ON = 97, /* Turn on the WIFI radio for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_GPS_OFF = 112, /* Turn off the GPS radio for num_seconds */\n    meshtastic_PowerStressMessage_Opcode_GPS_ON = 113 /* Turn on the GPS radio for num_seconds */\n} meshtastic_PowerStressMessage_Opcode;\n\n/* Struct definitions */\n/* Note: There are no 'PowerMon' messages normally in use (PowerMons are sent only as structured logs - slogs).\n But we wrap our State enum in this message to effectively nest a namespace (without our linter yelling at us) */\ntypedef struct _meshtastic_PowerMon {\n    char dummy_field;\n} meshtastic_PowerMon;\n\n/* PowerStress testing support via the C++ PowerStress module */\ntypedef struct _meshtastic_PowerStressMessage {\n    /* What type of HardwareMessage is this? */\n    meshtastic_PowerStressMessage_Opcode cmd;\n    float num_seconds;\n} meshtastic_PowerStressMessage;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_PowerMon_State_MIN meshtastic_PowerMon_State_None\n#define _meshtastic_PowerMon_State_MAX meshtastic_PowerMon_State_GPS_Active\n#define _meshtastic_PowerMon_State_ARRAYSIZE ((meshtastic_PowerMon_State)(meshtastic_PowerMon_State_GPS_Active+1))\n\n#define _meshtastic_PowerStressMessage_Opcode_MIN meshtastic_PowerStressMessage_Opcode_UNSET\n#define _meshtastic_PowerStressMessage_Opcode_MAX meshtastic_PowerStressMessage_Opcode_GPS_ON\n#define _meshtastic_PowerStressMessage_Opcode_ARRAYSIZE ((meshtastic_PowerStressMessage_Opcode)(meshtastic_PowerStressMessage_Opcode_GPS_ON+1))\n\n\n#define meshtastic_PowerStressMessage_cmd_ENUMTYPE meshtastic_PowerStressMessage_Opcode\n\n\n/* Initializer values for message structs */\n#define meshtastic_PowerMon_init_default         {0}\n#define meshtastic_PowerStressMessage_init_default {_meshtastic_PowerStressMessage_Opcode_MIN, 0}\n#define meshtastic_PowerMon_init_zero            {0}\n#define meshtastic_PowerStressMessage_init_zero  {_meshtastic_PowerStressMessage_Opcode_MIN, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_PowerStressMessage_cmd_tag    1\n#define meshtastic_PowerStressMessage_num_seconds_tag 2\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_PowerMon_FIELDLIST(X, a) \\\n\n#define meshtastic_PowerMon_CALLBACK NULL\n#define meshtastic_PowerMon_DEFAULT NULL\n\n#define meshtastic_PowerStressMessage_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    cmd,               1) \\\nX(a, STATIC,   SINGULAR, FLOAT,    num_seconds,       2)\n#define meshtastic_PowerStressMessage_CALLBACK NULL\n#define meshtastic_PowerStressMessage_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_PowerMon_msg;\nextern const pb_msgdesc_t meshtastic_PowerStressMessage_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_PowerMon_fields &meshtastic_PowerMon_msg\n#define meshtastic_PowerStressMessage_fields &meshtastic_PowerStressMessage_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_POWERMON_PB_H_MAX_SIZE meshtastic_PowerStressMessage_size\n#define meshtastic_PowerMon_size                 0\n#define meshtastic_PowerStressMessage_size       7\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/remote_hardware.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/remote_hardware.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_HardwareMessage, meshtastic_HardwareMessage, AUTO)\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/remote_hardware.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* TODO: REPLACE */\ntypedef enum _meshtastic_HardwareMessage_Type {\n    /* Unset/unused */\n    meshtastic_HardwareMessage_Type_UNSET = 0,\n    /* Set gpio gpios based on gpio_mask/gpio_value */\n    meshtastic_HardwareMessage_Type_WRITE_GPIOS = 1,\n    /* We are now interested in watching the gpio_mask gpios.\n If the selected gpios change, please broadcast GPIOS_CHANGED.\n Will implicitly change the gpios requested to be INPUT gpios. */\n    meshtastic_HardwareMessage_Type_WATCH_GPIOS = 2,\n    /* The gpios listed in gpio_mask have changed, the new values are listed in gpio_value */\n    meshtastic_HardwareMessage_Type_GPIOS_CHANGED = 3,\n    /* Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated */\n    meshtastic_HardwareMessage_Type_READ_GPIOS = 4,\n    /* A reply to READ_GPIOS. gpio_mask and gpio_value will be populated */\n    meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY = 5\n} meshtastic_HardwareMessage_Type;\n\n/* Struct definitions */\n/* An example app to show off the module system. This message is used for\n REMOTE_HARDWARE_APP PortNums.\n Also provides easy remote access to any GPIO.\n In the future other remote hardware operations can be added based on user interest\n (i.e. serial output, spi/i2c input/output).\n FIXME - currently this feature is turned on by default which is dangerous\n because no security yet (beyond the channel mechanism).\n It should be off by default and then protected based on some TBD mechanism\n (a special channel once multichannel support is included?) */\ntypedef struct _meshtastic_HardwareMessage {\n    /* What type of HardwareMessage is this? */\n    meshtastic_HardwareMessage_Type type;\n    /* What gpios are we changing. Not used for all MessageTypes, see MessageType for details */\n    uint64_t gpio_mask;\n    /* For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios.\n Not used for all MessageTypes, see MessageType for details */\n    uint64_t gpio_value;\n} meshtastic_HardwareMessage;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_HardwareMessage_Type_MIN meshtastic_HardwareMessage_Type_UNSET\n#define _meshtastic_HardwareMessage_Type_MAX meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY\n#define _meshtastic_HardwareMessage_Type_ARRAYSIZE ((meshtastic_HardwareMessage_Type)(meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY+1))\n\n#define meshtastic_HardwareMessage_type_ENUMTYPE meshtastic_HardwareMessage_Type\n\n\n/* Initializer values for message structs */\n#define meshtastic_HardwareMessage_init_default  {_meshtastic_HardwareMessage_Type_MIN, 0, 0}\n#define meshtastic_HardwareMessage_init_zero     {_meshtastic_HardwareMessage_Type_MIN, 0, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_HardwareMessage_type_tag      1\n#define meshtastic_HardwareMessage_gpio_mask_tag 2\n#define meshtastic_HardwareMessage_gpio_value_tag 3\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_HardwareMessage_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    type,              1) \\\nX(a, STATIC,   SINGULAR, UINT64,   gpio_mask,         2) \\\nX(a, STATIC,   SINGULAR, UINT64,   gpio_value,        3)\n#define meshtastic_HardwareMessage_CALLBACK NULL\n#define meshtastic_HardwareMessage_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_HardwareMessage_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_HardwareMessage_fields &meshtastic_HardwareMessage_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_MAX_SIZE meshtastic_HardwareMessage_size\n#define meshtastic_HardwareMessage_size          24\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/rtttl.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/rtttl.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_RTTTLConfig, meshtastic_RTTTLConfig, AUTO)\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/rtttl.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_RTTTL_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_RTTTL_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Struct definitions */\n/* Canned message module configuration. */\ntypedef struct _meshtastic_RTTTLConfig {\n    /* Ringtone for PWM Buzzer in RTTTL Format. */\n    char ringtone[231];\n} meshtastic_RTTTLConfig;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Initializer values for message structs */\n#define meshtastic_RTTTLConfig_init_default      {\"\"}\n#define meshtastic_RTTTLConfig_init_zero         {\"\"}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_RTTTLConfig_ringtone_tag      1\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_RTTTLConfig_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, STRING,   ringtone,          1)\n#define meshtastic_RTTTLConfig_CALLBACK NULL\n#define meshtastic_RTTTLConfig_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_RTTTLConfig_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_RTTTLConfig_fields &meshtastic_RTTTLConfig_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_RTTTL_PB_H_MAX_SIZE meshtastic_RTTTLConfig_size\n#define meshtastic_RTTTLConfig_size              233\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/storeforward.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/storeforward.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_StoreAndForward, meshtastic_StoreAndForward, AUTO)\n\n\nPB_BIND(meshtastic_StoreAndForward_Statistics, meshtastic_StoreAndForward_Statistics, AUTO)\n\n\nPB_BIND(meshtastic_StoreAndForward_History, meshtastic_StoreAndForward_History, AUTO)\n\n\nPB_BIND(meshtastic_StoreAndForward_Heartbeat, meshtastic_StoreAndForward_Heartbeat, AUTO)\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/storeforward.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* 001 - 063 = From Router\n 064 - 127 = From Client */\ntypedef enum _meshtastic_StoreAndForward_RequestResponse {\n    /* Unset/unused */\n    meshtastic_StoreAndForward_RequestResponse_UNSET = 0,\n    /* Router is an in error state. */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_ERROR = 1,\n    /* Router heartbeat */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_HEARTBEAT = 2,\n    /* Router has requested the client respond. This can work as a\n \"are you there\" message. */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_PING = 3,\n    /* The response to a \"Ping\" */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_PONG = 4,\n    /* Router is currently busy. Please try again later. */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY = 5,\n    /* Router is responding to a request for history. */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_HISTORY = 6,\n    /* Router is responding to a request for stats. */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_STATS = 7,\n    /* Router sends a text message from its history that was a direct message. */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_DIRECT = 8,\n    /* Router sends a text message from its history that was a broadcast. */\n    meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_BROADCAST = 9,\n    /* Client is an in error state. */\n    meshtastic_StoreAndForward_RequestResponse_CLIENT_ERROR = 64,\n    /* Client has requested a replay from the router. */\n    meshtastic_StoreAndForward_RequestResponse_CLIENT_HISTORY = 65,\n    /* Client has requested stats from the router. */\n    meshtastic_StoreAndForward_RequestResponse_CLIENT_STATS = 66,\n    /* Client has requested the router respond. This can work as a\n \"are you there\" message. */\n    meshtastic_StoreAndForward_RequestResponse_CLIENT_PING = 67,\n    /* The response to a \"Ping\" */\n    meshtastic_StoreAndForward_RequestResponse_CLIENT_PONG = 68,\n    /* Client has requested that the router abort processing the client's request */\n    meshtastic_StoreAndForward_RequestResponse_CLIENT_ABORT = 106\n} meshtastic_StoreAndForward_RequestResponse;\n\n/* Struct definitions */\n/* TODO: REPLACE */\ntypedef struct _meshtastic_StoreAndForward_Statistics {\n    /* Number of messages we have ever seen */\n    uint32_t messages_total;\n    /* Number of messages we have currently saved our history. */\n    uint32_t messages_saved;\n    /* Maximum number of messages we will save */\n    uint32_t messages_max;\n    /* Router uptime in seconds */\n    uint32_t up_time;\n    /* Number of times any client sent a request to the S&F. */\n    uint32_t requests;\n    /* Number of times the history was requested. */\n    uint32_t requests_history;\n    /* Is the heartbeat enabled on the server? */\n    bool heartbeat;\n    /* Maximum number of messages the server will return. */\n    uint32_t return_max;\n    /* Maximum history window in minutes the server will return messages from. */\n    uint32_t return_window;\n} meshtastic_StoreAndForward_Statistics;\n\n/* TODO: REPLACE */\ntypedef struct _meshtastic_StoreAndForward_History {\n    /* Number of that will be sent to the client */\n    uint32_t history_messages;\n    /* The window of messages that was used to filter the history client requested */\n    uint32_t window;\n    /* Index in the packet history of the last message sent in a previous request to the server.\n Will be sent to the client before sending the history and can be set in a subsequent request to avoid getting packets the server already sent to the client. */\n    uint32_t last_request;\n} meshtastic_StoreAndForward_History;\n\n/* TODO: REPLACE */\ntypedef struct _meshtastic_StoreAndForward_Heartbeat {\n    /* Period in seconds that the heartbeat is sent out that will be sent to the client */\n    uint32_t period;\n    /* If set, this is not the primary Store & Forward router on the mesh */\n    uint32_t secondary;\n} meshtastic_StoreAndForward_Heartbeat;\n\ntypedef PB_BYTES_ARRAY_T(233) meshtastic_StoreAndForward_text_t;\n/* TODO: REPLACE */\ntypedef struct _meshtastic_StoreAndForward {\n    /* TODO: REPLACE */\n    meshtastic_StoreAndForward_RequestResponse rr;\n    pb_size_t which_variant;\n    union {\n        /* TODO: REPLACE */\n        meshtastic_StoreAndForward_Statistics stats;\n        /* TODO: REPLACE */\n        meshtastic_StoreAndForward_History history;\n        /* TODO: REPLACE */\n        meshtastic_StoreAndForward_Heartbeat heartbeat;\n        /* Text from history message. */\n        meshtastic_StoreAndForward_text_t text;\n    } variant;\n} meshtastic_StoreAndForward;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_StoreAndForward_RequestResponse_MIN meshtastic_StoreAndForward_RequestResponse_UNSET\n#define _meshtastic_StoreAndForward_RequestResponse_MAX meshtastic_StoreAndForward_RequestResponse_CLIENT_ABORT\n#define _meshtastic_StoreAndForward_RequestResponse_ARRAYSIZE ((meshtastic_StoreAndForward_RequestResponse)(meshtastic_StoreAndForward_RequestResponse_CLIENT_ABORT+1))\n\n#define meshtastic_StoreAndForward_rr_ENUMTYPE meshtastic_StoreAndForward_RequestResponse\n\n\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_StoreAndForward_init_default  {_meshtastic_StoreAndForward_RequestResponse_MIN, 0, {meshtastic_StoreAndForward_Statistics_init_default}}\n#define meshtastic_StoreAndForward_Statistics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_StoreAndForward_History_init_default {0, 0, 0}\n#define meshtastic_StoreAndForward_Heartbeat_init_default {0, 0}\n#define meshtastic_StoreAndForward_init_zero     {_meshtastic_StoreAndForward_RequestResponse_MIN, 0, {meshtastic_StoreAndForward_Statistics_init_zero}}\n#define meshtastic_StoreAndForward_Statistics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_StoreAndForward_History_init_zero {0, 0, 0}\n#define meshtastic_StoreAndForward_Heartbeat_init_zero {0, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_StoreAndForward_Statistics_messages_total_tag 1\n#define meshtastic_StoreAndForward_Statistics_messages_saved_tag 2\n#define meshtastic_StoreAndForward_Statistics_messages_max_tag 3\n#define meshtastic_StoreAndForward_Statistics_up_time_tag 4\n#define meshtastic_StoreAndForward_Statistics_requests_tag 5\n#define meshtastic_StoreAndForward_Statistics_requests_history_tag 6\n#define meshtastic_StoreAndForward_Statistics_heartbeat_tag 7\n#define meshtastic_StoreAndForward_Statistics_return_max_tag 8\n#define meshtastic_StoreAndForward_Statistics_return_window_tag 9\n#define meshtastic_StoreAndForward_History_history_messages_tag 1\n#define meshtastic_StoreAndForward_History_window_tag 2\n#define meshtastic_StoreAndForward_History_last_request_tag 3\n#define meshtastic_StoreAndForward_Heartbeat_period_tag 1\n#define meshtastic_StoreAndForward_Heartbeat_secondary_tag 2\n#define meshtastic_StoreAndForward_rr_tag        1\n#define meshtastic_StoreAndForward_stats_tag     2\n#define meshtastic_StoreAndForward_history_tag   3\n#define meshtastic_StoreAndForward_heartbeat_tag 4\n#define meshtastic_StoreAndForward_text_tag      5\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_StoreAndForward_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    rr,                1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,stats,variant.stats),   2) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,history,variant.history),   3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,heartbeat,variant.heartbeat),   4) \\\nX(a, STATIC,   ONEOF,    BYTES,    (variant,text,variant.text),   5)\n#define meshtastic_StoreAndForward_CALLBACK NULL\n#define meshtastic_StoreAndForward_DEFAULT NULL\n#define meshtastic_StoreAndForward_variant_stats_MSGTYPE meshtastic_StoreAndForward_Statistics\n#define meshtastic_StoreAndForward_variant_history_MSGTYPE meshtastic_StoreAndForward_History\n#define meshtastic_StoreAndForward_variant_heartbeat_MSGTYPE meshtastic_StoreAndForward_Heartbeat\n\n#define meshtastic_StoreAndForward_Statistics_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   messages_total,    1) \\\nX(a, STATIC,   SINGULAR, UINT32,   messages_saved,    2) \\\nX(a, STATIC,   SINGULAR, UINT32,   messages_max,      3) \\\nX(a, STATIC,   SINGULAR, UINT32,   up_time,           4) \\\nX(a, STATIC,   SINGULAR, UINT32,   requests,          5) \\\nX(a, STATIC,   SINGULAR, UINT32,   requests_history,   6) \\\nX(a, STATIC,   SINGULAR, BOOL,     heartbeat,         7) \\\nX(a, STATIC,   SINGULAR, UINT32,   return_max,        8) \\\nX(a, STATIC,   SINGULAR, UINT32,   return_window,     9)\n#define meshtastic_StoreAndForward_Statistics_CALLBACK NULL\n#define meshtastic_StoreAndForward_Statistics_DEFAULT NULL\n\n#define meshtastic_StoreAndForward_History_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   history_messages,   1) \\\nX(a, STATIC,   SINGULAR, UINT32,   window,            2) \\\nX(a, STATIC,   SINGULAR, UINT32,   last_request,      3)\n#define meshtastic_StoreAndForward_History_CALLBACK NULL\n#define meshtastic_StoreAndForward_History_DEFAULT NULL\n\n#define meshtastic_StoreAndForward_Heartbeat_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   period,            1) \\\nX(a, STATIC,   SINGULAR, UINT32,   secondary,         2)\n#define meshtastic_StoreAndForward_Heartbeat_CALLBACK NULL\n#define meshtastic_StoreAndForward_Heartbeat_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_StoreAndForward_msg;\nextern const pb_msgdesc_t meshtastic_StoreAndForward_Statistics_msg;\nextern const pb_msgdesc_t meshtastic_StoreAndForward_History_msg;\nextern const pb_msgdesc_t meshtastic_StoreAndForward_Heartbeat_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_StoreAndForward_fields &meshtastic_StoreAndForward_msg\n#define meshtastic_StoreAndForward_Statistics_fields &meshtastic_StoreAndForward_Statistics_msg\n#define meshtastic_StoreAndForward_History_fields &meshtastic_StoreAndForward_History_msg\n#define meshtastic_StoreAndForward_Heartbeat_fields &meshtastic_StoreAndForward_Heartbeat_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_MAX_SIZE meshtastic_StoreAndForward_size\n#define meshtastic_StoreAndForward_Heartbeat_size 12\n#define meshtastic_StoreAndForward_History_size  18\n#define meshtastic_StoreAndForward_Statistics_size 50\n#define meshtastic_StoreAndForward_size          238\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/telemetry.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/telemetry.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_DeviceMetrics, meshtastic_DeviceMetrics, AUTO)\n\n\nPB_BIND(meshtastic_EnvironmentMetrics, meshtastic_EnvironmentMetrics, AUTO)\n\n\nPB_BIND(meshtastic_PowerMetrics, meshtastic_PowerMetrics, AUTO)\n\n\nPB_BIND(meshtastic_AirQualityMetrics, meshtastic_AirQualityMetrics, AUTO)\n\n\nPB_BIND(meshtastic_LocalStats, meshtastic_LocalStats, AUTO)\n\n\nPB_BIND(meshtastic_TrafficManagementStats, meshtastic_TrafficManagementStats, AUTO)\n\n\nPB_BIND(meshtastic_HealthMetrics, meshtastic_HealthMetrics, AUTO)\n\n\nPB_BIND(meshtastic_HostMetrics, meshtastic_HostMetrics, 2)\n\n\nPB_BIND(meshtastic_Telemetry, meshtastic_Telemetry, 2)\n\n\nPB_BIND(meshtastic_Nau7802Config, meshtastic_Nau7802Config, AUTO)\n\n\nPB_BIND(meshtastic_SEN5XState, meshtastic_SEN5XState, AUTO)\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/telemetry.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\n/* Supported I2C Sensors for telemetry in Meshtastic */\ntypedef enum _meshtastic_TelemetrySensorType {\n    /* No external telemetry sensor explicitly set */\n    meshtastic_TelemetrySensorType_SENSOR_UNSET = 0,\n    /* High accuracy temperature, pressure, humidity */\n    meshtastic_TelemetrySensorType_BME280 = 1,\n    /* High accuracy temperature, pressure, humidity, and air resistance */\n    meshtastic_TelemetrySensorType_BME680 = 2,\n    /* Very high accuracy temperature */\n    meshtastic_TelemetrySensorType_MCP9808 = 3,\n    /* Moderate accuracy current and voltage */\n    meshtastic_TelemetrySensorType_INA260 = 4,\n    /* Moderate accuracy current and voltage */\n    meshtastic_TelemetrySensorType_INA219 = 5,\n    /* High accuracy temperature and pressure */\n    meshtastic_TelemetrySensorType_BMP280 = 6,\n    /* TODO - REMOVE High accuracy temperature and humidity */\n    meshtastic_TelemetrySensorType_SHTC3 = 7,\n    /* High accuracy pressure */\n    meshtastic_TelemetrySensorType_LPS22 = 8,\n    /* 3-Axis magnetic sensor */\n    meshtastic_TelemetrySensorType_QMC6310 = 9,\n    /* 6-Axis inertial measurement sensor */\n    meshtastic_TelemetrySensorType_QMI8658 = 10,\n    /* 3-Axis magnetic sensor */\n    meshtastic_TelemetrySensorType_QMC5883L = 11,\n    /* TODO - REMOVE High accuracy temperature and humidity */\n    meshtastic_TelemetrySensorType_SHT31 = 12,\n    /* PM2.5 air quality sensor */\n    meshtastic_TelemetrySensorType_PMSA003I = 13,\n    /* INA3221 3 Channel Voltage / Current Sensor */\n    meshtastic_TelemetrySensorType_INA3221 = 14,\n    /* BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) */\n    meshtastic_TelemetrySensorType_BMP085 = 15,\n    /* RCWL-9620 Doppler Radar Distance Sensor, used for water level detection */\n    meshtastic_TelemetrySensorType_RCWL9620 = 16,\n    /* TODO - REMOVE Sensirion High accuracy temperature and humidity */\n    meshtastic_TelemetrySensorType_SHT4X = 17,\n    /* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. */\n    meshtastic_TelemetrySensorType_VEML7700 = 18,\n    /* MLX90632 non-contact IR temperature sensor. */\n    meshtastic_TelemetrySensorType_MLX90632 = 19,\n    /* TI OPT3001 Ambient Light Sensor */\n    meshtastic_TelemetrySensorType_OPT3001 = 20,\n    /* Lite On LTR-390UV-01 UV Light Sensor */\n    meshtastic_TelemetrySensorType_LTR390UV = 21,\n    /* AMS TSL25911FN RGB Light Sensor */\n    meshtastic_TelemetrySensorType_TSL25911FN = 22,\n    /* AHT10 Integrated temperature and humidity sensor */\n    meshtastic_TelemetrySensorType_AHT10 = 23,\n    /* DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) */\n    meshtastic_TelemetrySensorType_DFROBOT_LARK = 24,\n    /* NAU7802 Scale Chip or compatible */\n    meshtastic_TelemetrySensorType_NAU7802 = 25,\n    /* BMP3XX High accuracy temperature and pressure */\n    meshtastic_TelemetrySensorType_BMP3XX = 26,\n    /* ICM-20948 9-Axis digital motion processor */\n    meshtastic_TelemetrySensorType_ICM20948 = 27,\n    /* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) */\n    meshtastic_TelemetrySensorType_MAX17048 = 28,\n    /* Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor */\n    meshtastic_TelemetrySensorType_CUSTOM_SENSOR = 29,\n    /* MAX30102 Pulse Oximeter and Heart-Rate Sensor */\n    meshtastic_TelemetrySensorType_MAX30102 = 30,\n    /* MLX90614 non-contact IR temperature sensor */\n    meshtastic_TelemetrySensorType_MLX90614 = 31,\n    /* SCD40/SCD41 CO2, humidity, temperature sensor */\n    meshtastic_TelemetrySensorType_SCD4X = 32,\n    /* ClimateGuard RadSens, radiation, Geiger-Muller Tube */\n    meshtastic_TelemetrySensorType_RADSENS = 33,\n    /* High accuracy current and voltage */\n    meshtastic_TelemetrySensorType_INA226 = 34,\n    /* DFRobot Gravity tipping bucket rain gauge */\n    meshtastic_TelemetrySensorType_DFROBOT_RAIN = 35,\n    /* Infineon DPS310 High accuracy pressure and temperature */\n    meshtastic_TelemetrySensorType_DPS310 = 36,\n    /* RAKWireless RAK12035 Soil Moisture Sensor Module */\n    meshtastic_TelemetrySensorType_RAK12035 = 37,\n    /* MAX17261 lipo battery gauge */\n    meshtastic_TelemetrySensorType_MAX17261 = 38,\n    /* PCT2075 Temperature Sensor */\n    meshtastic_TelemetrySensorType_PCT2075 = 39,\n    /* ADS1X15 ADC */\n    meshtastic_TelemetrySensorType_ADS1X15 = 40,\n    /* ADS1X15 ADC_ALT */\n    meshtastic_TelemetrySensorType_ADS1X15_ALT = 41,\n    /* Sensirion SFA30 Formaldehyde sensor */\n    meshtastic_TelemetrySensorType_SFA30 = 42,\n    /* SEN5X PM SENSORS */\n    meshtastic_TelemetrySensorType_SEN5X = 43,\n    /* TSL2561 light sensor */\n    meshtastic_TelemetrySensorType_TSL2561 = 44,\n    /* BH1750 light sensor */\n    meshtastic_TelemetrySensorType_BH1750 = 45,\n    /* HDC1080 Temperature and Humidity Sensor */\n    meshtastic_TelemetrySensorType_HDC1080 = 46,\n    /* TODO - REMOVE STH21 Temperature and R. Humidity sensor */\n    meshtastic_TelemetrySensorType_SHT21 = 47,\n    /* Sensirion STC31 CO2 sensor */\n    meshtastic_TelemetrySensorType_STC31 = 48,\n    /* SCD30 CO2, humidity, temperature sensor */\n    meshtastic_TelemetrySensorType_SCD30 = 49,\n    /* SHT family of sensors for temperature and humidity */\n    meshtastic_TelemetrySensorType_SHTXX = 50\n} meshtastic_TelemetrySensorType;\n\n/* Struct definitions */\n/* Key native device metrics such as battery level */\ntypedef struct _meshtastic_DeviceMetrics {\n    /* 0-100 (>100 means powered) */\n    bool has_battery_level;\n    uint32_t battery_level;\n    /* Voltage measured */\n    bool has_voltage;\n    float voltage;\n    /* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). */\n    bool has_channel_utilization;\n    float channel_utilization;\n    /* Percent of airtime for transmission used within the last hour. */\n    bool has_air_util_tx;\n    float air_util_tx;\n    /* How long the device has been running since the last reboot (in seconds) */\n    bool has_uptime_seconds;\n    uint32_t uptime_seconds;\n} meshtastic_DeviceMetrics;\n\n/* Weather station or other environmental metrics */\ntypedef struct _meshtastic_EnvironmentMetrics {\n    /* Temperature measured */\n    bool has_temperature;\n    float temperature;\n    /* Relative humidity percent measured */\n    bool has_relative_humidity;\n    float relative_humidity;\n    /* Barometric pressure in hPA measured */\n    bool has_barometric_pressure;\n    float barometric_pressure;\n    /* Gas resistance in MOhm measured */\n    bool has_gas_resistance;\n    float gas_resistance;\n    /* Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */\n    bool has_voltage;\n    float voltage;\n    /* Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */\n    bool has_current;\n    float current;\n    /* relative scale IAQ value as measured by Bosch BME680 . value 0-500.\n Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. */\n    bool has_iaq;\n    uint16_t iaq;\n    /* RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. */\n    bool has_distance;\n    float distance;\n    /* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. */\n    bool has_lux;\n    float lux;\n    /* VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. */\n    bool has_white_lux;\n    float white_lux;\n    /* Infrared lux */\n    bool has_ir_lux;\n    float ir_lux;\n    /* Ultraviolet lux */\n    bool has_uv_lux;\n    float uv_lux;\n    /* Wind direction in degrees\n 0 degrees = North, 90 = East, etc... */\n    bool has_wind_direction;\n    uint16_t wind_direction;\n    /* Wind speed in m/s */\n    bool has_wind_speed;\n    float wind_speed;\n    /* Weight in KG */\n    bool has_weight;\n    float weight;\n    /* Wind gust in m/s */\n    bool has_wind_gust;\n    float wind_gust;\n    /* Wind lull in m/s */\n    bool has_wind_lull;\n    float wind_lull;\n    /* Radiation in µR/h */\n    bool has_radiation;\n    float radiation;\n    /* Rainfall in the last hour in mm */\n    bool has_rainfall_1h;\n    float rainfall_1h;\n    /* Rainfall in the last 24 hours in mm */\n    bool has_rainfall_24h;\n    float rainfall_24h;\n    /* Soil moisture measured (% 1-100) */\n    bool has_soil_moisture;\n    uint8_t soil_moisture;\n    /* Soil temperature measured (*C) */\n    bool has_soil_temperature;\n    float soil_temperature;\n} meshtastic_EnvironmentMetrics;\n\n/* Power Metrics (voltage / current / etc) */\ntypedef struct _meshtastic_PowerMetrics {\n    /* Voltage (Ch1) */\n    bool has_ch1_voltage;\n    float ch1_voltage;\n    /* Current (Ch1) */\n    bool has_ch1_current;\n    float ch1_current;\n    /* Voltage (Ch2) */\n    bool has_ch2_voltage;\n    float ch2_voltage;\n    /* Current (Ch2) */\n    bool has_ch2_current;\n    float ch2_current;\n    /* Voltage (Ch3) */\n    bool has_ch3_voltage;\n    float ch3_voltage;\n    /* Current (Ch3) */\n    bool has_ch3_current;\n    float ch3_current;\n    /* Voltage (Ch4) */\n    bool has_ch4_voltage;\n    float ch4_voltage;\n    /* Current (Ch4) */\n    bool has_ch4_current;\n    float ch4_current;\n    /* Voltage (Ch5) */\n    bool has_ch5_voltage;\n    float ch5_voltage;\n    /* Current (Ch5) */\n    bool has_ch5_current;\n    float ch5_current;\n    /* Voltage (Ch6) */\n    bool has_ch6_voltage;\n    float ch6_voltage;\n    /* Current (Ch6) */\n    bool has_ch6_current;\n    float ch6_current;\n    /* Voltage (Ch7) */\n    bool has_ch7_voltage;\n    float ch7_voltage;\n    /* Current (Ch7) */\n    bool has_ch7_current;\n    float ch7_current;\n    /* Voltage (Ch8) */\n    bool has_ch8_voltage;\n    float ch8_voltage;\n    /* Current (Ch8) */\n    bool has_ch8_current;\n    float ch8_current;\n} meshtastic_PowerMetrics;\n\n/* Air quality metrics */\ntypedef struct _meshtastic_AirQualityMetrics {\n    /* Concentration Units Standard PM1.0 in ug/m3 */\n    bool has_pm10_standard;\n    uint32_t pm10_standard;\n    /* Concentration Units Standard PM2.5 in ug/m3 */\n    bool has_pm25_standard;\n    uint32_t pm25_standard;\n    /* Concentration Units Standard PM10.0 in ug/m3 */\n    bool has_pm100_standard;\n    uint32_t pm100_standard;\n    /* Concentration Units Environmental PM1.0 in ug/m3 */\n    bool has_pm10_environmental;\n    uint32_t pm10_environmental;\n    /* Concentration Units Environmental PM2.5 in ug/m3 */\n    bool has_pm25_environmental;\n    uint32_t pm25_environmental;\n    /* Concentration Units Environmental PM10.0 in ug/m3 */\n    bool has_pm100_environmental;\n    uint32_t pm100_environmental;\n    /* 0.3um Particle Count in #/0.1l */\n    bool has_particles_03um;\n    uint32_t particles_03um;\n    /* 0.5um Particle Count in #/0.1l */\n    bool has_particles_05um;\n    uint32_t particles_05um;\n    /* 1.0um Particle Count in #/0.1l */\n    bool has_particles_10um;\n    uint32_t particles_10um;\n    /* 2.5um Particle Count in #/0.1l */\n    bool has_particles_25um;\n    uint32_t particles_25um;\n    /* 5.0um Particle Count in #/0.1l */\n    bool has_particles_50um;\n    uint32_t particles_50um;\n    /* 10.0um Particle Count in #/0.1l */\n    bool has_particles_100um;\n    uint32_t particles_100um;\n    /* CO2 concentration in ppm */\n    bool has_co2;\n    uint32_t co2;\n    /* CO2 sensor temperature in degC */\n    bool has_co2_temperature;\n    float co2_temperature;\n    /* CO2 sensor relative humidity in % */\n    bool has_co2_humidity;\n    float co2_humidity;\n    /* Formaldehyde sensor formaldehyde concentration in ppb */\n    bool has_form_formaldehyde;\n    float form_formaldehyde;\n    /* Formaldehyde sensor relative humidity in %RH */\n    bool has_form_humidity;\n    float form_humidity;\n    /* Formaldehyde sensor temperature in degrees Celsius */\n    bool has_form_temperature;\n    float form_temperature;\n    /* Concentration Units Standard PM4.0 in ug/m3 */\n    bool has_pm40_standard;\n    uint32_t pm40_standard;\n    /* 4.0um Particle Count in #/0.1l */\n    bool has_particles_40um;\n    uint32_t particles_40um;\n    /* PM Sensor Temperature */\n    bool has_pm_temperature;\n    float pm_temperature;\n    /* PM Sensor humidity */\n    bool has_pm_humidity;\n    float pm_humidity;\n    /* PM Sensor VOC Index */\n    bool has_pm_voc_idx;\n    float pm_voc_idx;\n    /* PM Sensor NOx Index */\n    bool has_pm_nox_idx;\n    float pm_nox_idx;\n    /* Typical Particle Size in um */\n    bool has_particles_tps;\n    float particles_tps;\n} meshtastic_AirQualityMetrics;\n\n/* Local device mesh statistics */\ntypedef struct _meshtastic_LocalStats {\n    /* How long the device has been running since the last reboot (in seconds) */\n    uint32_t uptime_seconds;\n    /* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). */\n    float channel_utilization;\n    /* Percent of airtime for transmission used within the last hour. */\n    float air_util_tx;\n    /* Number of packets sent */\n    uint32_t num_packets_tx;\n    /* Number of packets received (both good and bad) */\n    uint32_t num_packets_rx;\n    /* Number of packets received that are malformed or violate the protocol */\n    uint32_t num_packets_rx_bad;\n    /* Number of nodes online (in the past 2 hours) */\n    uint16_t num_online_nodes;\n    /* Number of nodes total */\n    uint16_t num_total_nodes;\n    /* Number of received packets that were duplicates (due to multiple nodes relaying).\n If this number is high, there are nodes in the mesh relaying packets when it's unnecessary, for example due to the ROUTER/REPEATER role. */\n    uint32_t num_rx_dupe;\n    /* Number of packets we transmitted that were a relay for others (not originating from ourselves). */\n    uint32_t num_tx_relay;\n    /* Number of times we canceled a packet to be relayed, because someone else did it before us.\n This will always be zero for ROUTERs/REPEATERs. If this number is high, some other node(s) is/are relaying faster than you. */\n    uint32_t num_tx_relay_canceled;\n    /* Number of bytes used in the heap */\n    uint32_t heap_total_bytes;\n    /* Number of bytes free in the heap */\n    uint32_t heap_free_bytes;\n    /* Number of packets that were dropped because the transmit queue was full. */\n    uint16_t num_tx_dropped;\n    /* Noise floor value measured in dBm */\n    int32_t noise_floor;\n} meshtastic_LocalStats;\n\n/* Traffic management statistics for mesh network optimization */\ntypedef struct _meshtastic_TrafficManagementStats {\n    /* Total number of packets inspected by traffic management */\n    uint32_t packets_inspected;\n    /* Number of position packets dropped due to deduplication */\n    uint32_t position_dedup_drops;\n    /* Number of NodeInfo requests answered from cache */\n    uint32_t nodeinfo_cache_hits;\n    /* Number of packets dropped due to rate limiting */\n    uint32_t rate_limit_drops;\n    /* Number of unknown/undecryptable packets dropped */\n    uint32_t unknown_packet_drops;\n    /* Number of packets with hop_limit exhausted for local-only broadcast */\n    uint32_t hop_exhausted_packets;\n    /* Number of times router hop preservation was applied */\n    uint32_t router_hops_preserved;\n} meshtastic_TrafficManagementStats;\n\n/* Health telemetry metrics */\ntypedef struct _meshtastic_HealthMetrics {\n    /* Heart rate (beats per minute) */\n    bool has_heart_bpm;\n    uint8_t heart_bpm;\n    /* SpO2 (blood oxygen saturation) level */\n    bool has_spO2;\n    uint8_t spO2;\n    /* Body temperature in degrees Celsius */\n    bool has_temperature;\n    float temperature;\n} meshtastic_HealthMetrics;\n\n/* Linux host metrics */\ntypedef struct _meshtastic_HostMetrics {\n    /* Host system uptime */\n    uint32_t uptime_seconds;\n    /* Host system free memory */\n    uint64_t freemem_bytes;\n    /* Host system disk space free for / */\n    uint64_t diskfree1_bytes;\n    /* Secondary system disk space free */\n    bool has_diskfree2_bytes;\n    uint64_t diskfree2_bytes;\n    /* Tertiary disk space free */\n    bool has_diskfree3_bytes;\n    uint64_t diskfree3_bytes;\n    /* Host system one minute load in 1/100ths */\n    uint16_t load1;\n    /* Host system five minute load  in 1/100ths */\n    uint16_t load5;\n    /* Host system fifteen minute load  in 1/100ths */\n    uint16_t load15;\n    /* Optional User-provided string for arbitrary host system information\n that doesn't make sense as a dedicated entry. */\n    bool has_user_string;\n    char user_string[200];\n} meshtastic_HostMetrics;\n\n/* Types of Measurements the telemetry module is equipped to handle */\ntypedef struct _meshtastic_Telemetry {\n    /* Seconds since 1970 - or 0 for unknown/unset */\n    uint32_t time;\n    pb_size_t which_variant;\n    union {\n        /* Key native device metrics such as battery level */\n        meshtastic_DeviceMetrics device_metrics;\n        /* Weather station or other environmental metrics */\n        meshtastic_EnvironmentMetrics environment_metrics;\n        /* Air quality metrics */\n        meshtastic_AirQualityMetrics air_quality_metrics;\n        /* Power Metrics */\n        meshtastic_PowerMetrics power_metrics;\n        /* Local device mesh statistics */\n        meshtastic_LocalStats local_stats;\n        /* Health telemetry metrics */\n        meshtastic_HealthMetrics health_metrics;\n        /* Linux host metrics */\n        meshtastic_HostMetrics host_metrics;\n        /* Traffic management statistics */\n        meshtastic_TrafficManagementStats traffic_management_stats;\n    } variant;\n} meshtastic_Telemetry;\n\n/* NAU7802 Telemetry configuration, for saving to flash */\ntypedef struct _meshtastic_Nau7802Config {\n    /* The offset setting for the NAU7802 */\n    int32_t zeroOffset;\n    /* The calibration factor for the NAU7802 */\n    float calibrationFactor;\n} meshtastic_Nau7802Config;\n\n/* SEN5X State, for saving to flash */\ntypedef struct _meshtastic_SEN5XState {\n    /* Last cleaning time for SEN5X */\n    uint32_t last_cleaning_time;\n    /* Last cleaning time for SEN5X - valid flag */\n    bool last_cleaning_valid;\n    /* Config flag for one-shot mode (see admin.proto) */\n    bool one_shot_mode;\n    /* Last VOC state time for SEN55 */\n    bool has_voc_state_time;\n    uint32_t voc_state_time;\n    /* Last VOC state validity flag for SEN55 */\n    bool has_voc_state_valid;\n    bool voc_state_valid;\n    /* VOC state array (8x uint8t) for SEN55 */\n    bool has_voc_state_array;\n    uint64_t voc_state_array;\n} meshtastic_SEN5XState;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET\n#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_SHTXX\n#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_SHTXX+1))\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* Initializer values for message structs */\n#define meshtastic_DeviceMetrics_init_default    {false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_PowerMetrics_init_default     {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_LocalStats_init_default       {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_TrafficManagementStats_init_default {0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_HealthMetrics_init_default    {false, 0, false, 0, false, 0}\n#define meshtastic_HostMetrics_init_default      {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, \"\"}\n#define meshtastic_Telemetry_init_default        {0, 0, {meshtastic_DeviceMetrics_init_default}}\n#define meshtastic_Nau7802Config_init_default    {0, 0}\n#define meshtastic_SEN5XState_init_default       {0, 0, 0, false, 0, false, 0, false, 0}\n#define meshtastic_DeviceMetrics_init_zero       {false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_EnvironmentMetrics_init_zero  {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_PowerMetrics_init_zero        {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_AirQualityMetrics_init_zero   {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}\n#define meshtastic_LocalStats_init_zero          {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_TrafficManagementStats_init_zero {0, 0, 0, 0, 0, 0, 0}\n#define meshtastic_HealthMetrics_init_zero       {false, 0, false, 0, false, 0}\n#define meshtastic_HostMetrics_init_zero         {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, \"\"}\n#define meshtastic_Telemetry_init_zero           {0, 0, {meshtastic_DeviceMetrics_init_zero}}\n#define meshtastic_Nau7802Config_init_zero       {0, 0}\n#define meshtastic_SEN5XState_init_zero          {0, 0, 0, false, 0, false, 0, false, 0}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_DeviceMetrics_battery_level_tag 1\n#define meshtastic_DeviceMetrics_voltage_tag     2\n#define meshtastic_DeviceMetrics_channel_utilization_tag 3\n#define meshtastic_DeviceMetrics_air_util_tx_tag 4\n#define meshtastic_DeviceMetrics_uptime_seconds_tag 5\n#define meshtastic_EnvironmentMetrics_temperature_tag 1\n#define meshtastic_EnvironmentMetrics_relative_humidity_tag 2\n#define meshtastic_EnvironmentMetrics_barometric_pressure_tag 3\n#define meshtastic_EnvironmentMetrics_gas_resistance_tag 4\n#define meshtastic_EnvironmentMetrics_voltage_tag 5\n#define meshtastic_EnvironmentMetrics_current_tag 6\n#define meshtastic_EnvironmentMetrics_iaq_tag    7\n#define meshtastic_EnvironmentMetrics_distance_tag 8\n#define meshtastic_EnvironmentMetrics_lux_tag    9\n#define meshtastic_EnvironmentMetrics_white_lux_tag 10\n#define meshtastic_EnvironmentMetrics_ir_lux_tag 11\n#define meshtastic_EnvironmentMetrics_uv_lux_tag 12\n#define meshtastic_EnvironmentMetrics_wind_direction_tag 13\n#define meshtastic_EnvironmentMetrics_wind_speed_tag 14\n#define meshtastic_EnvironmentMetrics_weight_tag 15\n#define meshtastic_EnvironmentMetrics_wind_gust_tag 16\n#define meshtastic_EnvironmentMetrics_wind_lull_tag 17\n#define meshtastic_EnvironmentMetrics_radiation_tag 18\n#define meshtastic_EnvironmentMetrics_rainfall_1h_tag 19\n#define meshtastic_EnvironmentMetrics_rainfall_24h_tag 20\n#define meshtastic_EnvironmentMetrics_soil_moisture_tag 21\n#define meshtastic_EnvironmentMetrics_soil_temperature_tag 22\n#define meshtastic_PowerMetrics_ch1_voltage_tag  1\n#define meshtastic_PowerMetrics_ch1_current_tag  2\n#define meshtastic_PowerMetrics_ch2_voltage_tag  3\n#define meshtastic_PowerMetrics_ch2_current_tag  4\n#define meshtastic_PowerMetrics_ch3_voltage_tag  5\n#define meshtastic_PowerMetrics_ch3_current_tag  6\n#define meshtastic_PowerMetrics_ch4_voltage_tag  7\n#define meshtastic_PowerMetrics_ch4_current_tag  8\n#define meshtastic_PowerMetrics_ch5_voltage_tag  9\n#define meshtastic_PowerMetrics_ch5_current_tag  10\n#define meshtastic_PowerMetrics_ch6_voltage_tag  11\n#define meshtastic_PowerMetrics_ch6_current_tag  12\n#define meshtastic_PowerMetrics_ch7_voltage_tag  13\n#define meshtastic_PowerMetrics_ch7_current_tag  14\n#define meshtastic_PowerMetrics_ch8_voltage_tag  15\n#define meshtastic_PowerMetrics_ch8_current_tag  16\n#define meshtastic_AirQualityMetrics_pm10_standard_tag 1\n#define meshtastic_AirQualityMetrics_pm25_standard_tag 2\n#define meshtastic_AirQualityMetrics_pm100_standard_tag 3\n#define meshtastic_AirQualityMetrics_pm10_environmental_tag 4\n#define meshtastic_AirQualityMetrics_pm25_environmental_tag 5\n#define meshtastic_AirQualityMetrics_pm100_environmental_tag 6\n#define meshtastic_AirQualityMetrics_particles_03um_tag 7\n#define meshtastic_AirQualityMetrics_particles_05um_tag 8\n#define meshtastic_AirQualityMetrics_particles_10um_tag 9\n#define meshtastic_AirQualityMetrics_particles_25um_tag 10\n#define meshtastic_AirQualityMetrics_particles_50um_tag 11\n#define meshtastic_AirQualityMetrics_particles_100um_tag 12\n#define meshtastic_AirQualityMetrics_co2_tag     13\n#define meshtastic_AirQualityMetrics_co2_temperature_tag 14\n#define meshtastic_AirQualityMetrics_co2_humidity_tag 15\n#define meshtastic_AirQualityMetrics_form_formaldehyde_tag 16\n#define meshtastic_AirQualityMetrics_form_humidity_tag 17\n#define meshtastic_AirQualityMetrics_form_temperature_tag 18\n#define meshtastic_AirQualityMetrics_pm40_standard_tag 19\n#define meshtastic_AirQualityMetrics_particles_40um_tag 20\n#define meshtastic_AirQualityMetrics_pm_temperature_tag 21\n#define meshtastic_AirQualityMetrics_pm_humidity_tag 22\n#define meshtastic_AirQualityMetrics_pm_voc_idx_tag 23\n#define meshtastic_AirQualityMetrics_pm_nox_idx_tag 24\n#define meshtastic_AirQualityMetrics_particles_tps_tag 25\n#define meshtastic_LocalStats_uptime_seconds_tag 1\n#define meshtastic_LocalStats_channel_utilization_tag 2\n#define meshtastic_LocalStats_air_util_tx_tag    3\n#define meshtastic_LocalStats_num_packets_tx_tag 4\n#define meshtastic_LocalStats_num_packets_rx_tag 5\n#define meshtastic_LocalStats_num_packets_rx_bad_tag 6\n#define meshtastic_LocalStats_num_online_nodes_tag 7\n#define meshtastic_LocalStats_num_total_nodes_tag 8\n#define meshtastic_LocalStats_num_rx_dupe_tag    9\n#define meshtastic_LocalStats_num_tx_relay_tag   10\n#define meshtastic_LocalStats_num_tx_relay_canceled_tag 11\n#define meshtastic_LocalStats_heap_total_bytes_tag 12\n#define meshtastic_LocalStats_heap_free_bytes_tag 13\n#define meshtastic_LocalStats_num_tx_dropped_tag 14\n#define meshtastic_LocalStats_noise_floor_tag    15\n#define meshtastic_TrafficManagementStats_packets_inspected_tag 1\n#define meshtastic_TrafficManagementStats_position_dedup_drops_tag 2\n#define meshtastic_TrafficManagementStats_nodeinfo_cache_hits_tag 3\n#define meshtastic_TrafficManagementStats_rate_limit_drops_tag 4\n#define meshtastic_TrafficManagementStats_unknown_packet_drops_tag 5\n#define meshtastic_TrafficManagementStats_hop_exhausted_packets_tag 6\n#define meshtastic_TrafficManagementStats_router_hops_preserved_tag 7\n#define meshtastic_HealthMetrics_heart_bpm_tag   1\n#define meshtastic_HealthMetrics_spO2_tag        2\n#define meshtastic_HealthMetrics_temperature_tag 3\n#define meshtastic_HostMetrics_uptime_seconds_tag 1\n#define meshtastic_HostMetrics_freemem_bytes_tag 2\n#define meshtastic_HostMetrics_diskfree1_bytes_tag 3\n#define meshtastic_HostMetrics_diskfree2_bytes_tag 4\n#define meshtastic_HostMetrics_diskfree3_bytes_tag 5\n#define meshtastic_HostMetrics_load1_tag         6\n#define meshtastic_HostMetrics_load5_tag         7\n#define meshtastic_HostMetrics_load15_tag        8\n#define meshtastic_HostMetrics_user_string_tag   9\n#define meshtastic_Telemetry_time_tag            1\n#define meshtastic_Telemetry_device_metrics_tag  2\n#define meshtastic_Telemetry_environment_metrics_tag 3\n#define meshtastic_Telemetry_air_quality_metrics_tag 4\n#define meshtastic_Telemetry_power_metrics_tag   5\n#define meshtastic_Telemetry_local_stats_tag     6\n#define meshtastic_Telemetry_health_metrics_tag  7\n#define meshtastic_Telemetry_host_metrics_tag    8\n#define meshtastic_Telemetry_traffic_management_stats_tag 9\n#define meshtastic_Nau7802Config_zeroOffset_tag  1\n#define meshtastic_Nau7802Config_calibrationFactor_tag 2\n#define meshtastic_SEN5XState_last_cleaning_time_tag 1\n#define meshtastic_SEN5XState_last_cleaning_valid_tag 2\n#define meshtastic_SEN5XState_one_shot_mode_tag  3\n#define meshtastic_SEN5XState_voc_state_time_tag 4\n#define meshtastic_SEN5XState_voc_state_valid_tag 5\n#define meshtastic_SEN5XState_voc_state_array_tag 6\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_DeviceMetrics_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, UINT32,   battery_level,     1) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    voltage,           2) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    channel_utilization,   3) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    air_util_tx,       4) \\\nX(a, STATIC,   OPTIONAL, UINT32,   uptime_seconds,    5)\n#define meshtastic_DeviceMetrics_CALLBACK NULL\n#define meshtastic_DeviceMetrics_DEFAULT NULL\n\n#define meshtastic_EnvironmentMetrics_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    temperature,       1) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    relative_humidity,   2) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    barometric_pressure,   3) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    gas_resistance,    4) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    voltage,           5) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    current,           6) \\\nX(a, STATIC,   OPTIONAL, UINT32,   iaq,               7) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    distance,          8) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    lux,               9) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    white_lux,        10) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ir_lux,           11) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    uv_lux,           12) \\\nX(a, STATIC,   OPTIONAL, UINT32,   wind_direction,   13) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    wind_speed,       14) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    weight,           15) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    wind_gust,        16) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    wind_lull,        17) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    radiation,        18) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    rainfall_1h,      19) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    rainfall_24h,     20) \\\nX(a, STATIC,   OPTIONAL, UINT32,   soil_moisture,    21) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    soil_temperature,  22)\n#define meshtastic_EnvironmentMetrics_CALLBACK NULL\n#define meshtastic_EnvironmentMetrics_DEFAULT NULL\n\n#define meshtastic_PowerMetrics_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch1_voltage,       1) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch1_current,       2) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch2_voltage,       3) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch2_current,       4) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch3_voltage,       5) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch3_current,       6) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch4_voltage,       7) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch4_current,       8) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch5_voltage,       9) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch5_current,      10) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch6_voltage,      11) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch6_current,      12) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch7_voltage,      13) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch7_current,      14) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch8_voltage,      15) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    ch8_current,      16)\n#define meshtastic_PowerMetrics_CALLBACK NULL\n#define meshtastic_PowerMetrics_DEFAULT NULL\n\n#define meshtastic_AirQualityMetrics_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, UINT32,   pm10_standard,     1) \\\nX(a, STATIC,   OPTIONAL, UINT32,   pm25_standard,     2) \\\nX(a, STATIC,   OPTIONAL, UINT32,   pm100_standard,    3) \\\nX(a, STATIC,   OPTIONAL, UINT32,   pm10_environmental,   4) \\\nX(a, STATIC,   OPTIONAL, UINT32,   pm25_environmental,   5) \\\nX(a, STATIC,   OPTIONAL, UINT32,   pm100_environmental,   6) \\\nX(a, STATIC,   OPTIONAL, UINT32,   particles_03um,    7) \\\nX(a, STATIC,   OPTIONAL, UINT32,   particles_05um,    8) \\\nX(a, STATIC,   OPTIONAL, UINT32,   particles_10um,    9) \\\nX(a, STATIC,   OPTIONAL, UINT32,   particles_25um,   10) \\\nX(a, STATIC,   OPTIONAL, UINT32,   particles_50um,   11) \\\nX(a, STATIC,   OPTIONAL, UINT32,   particles_100um,  12) \\\nX(a, STATIC,   OPTIONAL, UINT32,   co2,              13) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    co2_temperature,  14) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    co2_humidity,     15) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    form_formaldehyde,  16) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    form_humidity,    17) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    form_temperature,  18) \\\nX(a, STATIC,   OPTIONAL, UINT32,   pm40_standard,    19) \\\nX(a, STATIC,   OPTIONAL, UINT32,   particles_40um,   20) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    pm_temperature,   21) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    pm_humidity,      22) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    pm_voc_idx,       23) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    pm_nox_idx,       24) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    particles_tps,    25)\n#define meshtastic_AirQualityMetrics_CALLBACK NULL\n#define meshtastic_AirQualityMetrics_DEFAULT NULL\n\n#define meshtastic_LocalStats_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   uptime_seconds,    1) \\\nX(a, STATIC,   SINGULAR, FLOAT,    channel_utilization,   2) \\\nX(a, STATIC,   SINGULAR, FLOAT,    air_util_tx,       3) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_packets_tx,    4) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_packets_rx,    5) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_packets_rx_bad,   6) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_online_nodes,   7) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_total_nodes,   8) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_rx_dupe,       9) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_tx_relay,     10) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_tx_relay_canceled,  11) \\\nX(a, STATIC,   SINGULAR, UINT32,   heap_total_bytes,  12) \\\nX(a, STATIC,   SINGULAR, UINT32,   heap_free_bytes,  13) \\\nX(a, STATIC,   SINGULAR, UINT32,   num_tx_dropped,   14) \\\nX(a, STATIC,   SINGULAR, INT32,    noise_floor,      15)\n#define meshtastic_LocalStats_CALLBACK NULL\n#define meshtastic_LocalStats_DEFAULT NULL\n\n#define meshtastic_TrafficManagementStats_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   packets_inspected,   1) \\\nX(a, STATIC,   SINGULAR, UINT32,   position_dedup_drops,   2) \\\nX(a, STATIC,   SINGULAR, UINT32,   nodeinfo_cache_hits,   3) \\\nX(a, STATIC,   SINGULAR, UINT32,   rate_limit_drops,   4) \\\nX(a, STATIC,   SINGULAR, UINT32,   unknown_packet_drops,   5) \\\nX(a, STATIC,   SINGULAR, UINT32,   hop_exhausted_packets,   6) \\\nX(a, STATIC,   SINGULAR, UINT32,   router_hops_preserved,   7)\n#define meshtastic_TrafficManagementStats_CALLBACK NULL\n#define meshtastic_TrafficManagementStats_DEFAULT NULL\n\n#define meshtastic_HealthMetrics_FIELDLIST(X, a) \\\nX(a, STATIC,   OPTIONAL, UINT32,   heart_bpm,         1) \\\nX(a, STATIC,   OPTIONAL, UINT32,   spO2,              2) \\\nX(a, STATIC,   OPTIONAL, FLOAT,    temperature,       3)\n#define meshtastic_HealthMetrics_CALLBACK NULL\n#define meshtastic_HealthMetrics_DEFAULT NULL\n\n#define meshtastic_HostMetrics_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   uptime_seconds,    1) \\\nX(a, STATIC,   SINGULAR, UINT64,   freemem_bytes,     2) \\\nX(a, STATIC,   SINGULAR, UINT64,   diskfree1_bytes,   3) \\\nX(a, STATIC,   OPTIONAL, UINT64,   diskfree2_bytes,   4) \\\nX(a, STATIC,   OPTIONAL, UINT64,   diskfree3_bytes,   5) \\\nX(a, STATIC,   SINGULAR, UINT32,   load1,             6) \\\nX(a, STATIC,   SINGULAR, UINT32,   load5,             7) \\\nX(a, STATIC,   SINGULAR, UINT32,   load15,            8) \\\nX(a, STATIC,   OPTIONAL, STRING,   user_string,       9)\n#define meshtastic_HostMetrics_CALLBACK NULL\n#define meshtastic_HostMetrics_DEFAULT NULL\n\n#define meshtastic_Telemetry_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, FIXED32,  time,              1) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,device_metrics,variant.device_metrics),   2) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,environment_metrics,variant.environment_metrics),   3) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,air_quality_metrics,variant.air_quality_metrics),   4) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,power_metrics,variant.power_metrics),   5) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,local_stats,variant.local_stats),   6) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,health_metrics,variant.health_metrics),   7) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,host_metrics,variant.host_metrics),   8) \\\nX(a, STATIC,   ONEOF,    MESSAGE,  (variant,traffic_management_stats,variant.traffic_management_stats),   9)\n#define meshtastic_Telemetry_CALLBACK NULL\n#define meshtastic_Telemetry_DEFAULT NULL\n#define meshtastic_Telemetry_variant_device_metrics_MSGTYPE meshtastic_DeviceMetrics\n#define meshtastic_Telemetry_variant_environment_metrics_MSGTYPE meshtastic_EnvironmentMetrics\n#define meshtastic_Telemetry_variant_air_quality_metrics_MSGTYPE meshtastic_AirQualityMetrics\n#define meshtastic_Telemetry_variant_power_metrics_MSGTYPE meshtastic_PowerMetrics\n#define meshtastic_Telemetry_variant_local_stats_MSGTYPE meshtastic_LocalStats\n#define meshtastic_Telemetry_variant_health_metrics_MSGTYPE meshtastic_HealthMetrics\n#define meshtastic_Telemetry_variant_host_metrics_MSGTYPE meshtastic_HostMetrics\n#define meshtastic_Telemetry_variant_traffic_management_stats_MSGTYPE meshtastic_TrafficManagementStats\n\n#define meshtastic_Nau7802Config_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, INT32,    zeroOffset,        1) \\\nX(a, STATIC,   SINGULAR, FLOAT,    calibrationFactor,   2)\n#define meshtastic_Nau7802Config_CALLBACK NULL\n#define meshtastic_Nau7802Config_DEFAULT NULL\n\n#define meshtastic_SEN5XState_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UINT32,   last_cleaning_time,   1) \\\nX(a, STATIC,   SINGULAR, BOOL,     last_cleaning_valid,   2) \\\nX(a, STATIC,   SINGULAR, BOOL,     one_shot_mode,     3) \\\nX(a, STATIC,   OPTIONAL, UINT32,   voc_state_time,    4) \\\nX(a, STATIC,   OPTIONAL, BOOL,     voc_state_valid,   5) \\\nX(a, STATIC,   OPTIONAL, FIXED64,  voc_state_array,   6)\n#define meshtastic_SEN5XState_CALLBACK NULL\n#define meshtastic_SEN5XState_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_DeviceMetrics_msg;\nextern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg;\nextern const pb_msgdesc_t meshtastic_PowerMetrics_msg;\nextern const pb_msgdesc_t meshtastic_AirQualityMetrics_msg;\nextern const pb_msgdesc_t meshtastic_LocalStats_msg;\nextern const pb_msgdesc_t meshtastic_TrafficManagementStats_msg;\nextern const pb_msgdesc_t meshtastic_HealthMetrics_msg;\nextern const pb_msgdesc_t meshtastic_HostMetrics_msg;\nextern const pb_msgdesc_t meshtastic_Telemetry_msg;\nextern const pb_msgdesc_t meshtastic_Nau7802Config_msg;\nextern const pb_msgdesc_t meshtastic_SEN5XState_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_DeviceMetrics_fields &meshtastic_DeviceMetrics_msg\n#define meshtastic_EnvironmentMetrics_fields &meshtastic_EnvironmentMetrics_msg\n#define meshtastic_PowerMetrics_fields &meshtastic_PowerMetrics_msg\n#define meshtastic_AirQualityMetrics_fields &meshtastic_AirQualityMetrics_msg\n#define meshtastic_LocalStats_fields &meshtastic_LocalStats_msg\n#define meshtastic_TrafficManagementStats_fields &meshtastic_TrafficManagementStats_msg\n#define meshtastic_HealthMetrics_fields &meshtastic_HealthMetrics_msg\n#define meshtastic_HostMetrics_fields &meshtastic_HostMetrics_msg\n#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg\n#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg\n#define meshtastic_SEN5XState_fields &meshtastic_SEN5XState_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_MAX_SIZE meshtastic_Telemetry_size\n#define meshtastic_AirQualityMetrics_size        150\n#define meshtastic_DeviceMetrics_size            27\n#define meshtastic_EnvironmentMetrics_size       113\n#define meshtastic_HealthMetrics_size            11\n#define meshtastic_HostMetrics_size              264\n#define meshtastic_LocalStats_size               87\n#define meshtastic_Nau7802Config_size            16\n#define meshtastic_PowerMetrics_size             81\n#define meshtastic_SEN5XState_size               27\n#define meshtastic_Telemetry_size                272\n#define meshtastic_TrafficManagementStats_size   42\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/xmodem.pb.cpp",
    "content": "/* Automatically generated nanopb constant definitions */\n/* Generated by nanopb-0.4.9.1 */\n\n#include \"meshtastic/xmodem.pb.h\"\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\nPB_BIND(meshtastic_XModem, meshtastic_XModem, AUTO)\n\n\n\n\n\n"
  },
  {
    "path": "src/mesh/generated/meshtastic/xmodem.pb.h",
    "content": "/* Automatically generated nanopb header */\n/* Generated by nanopb-0.4.9.1 */\n\n#ifndef PB_MESHTASTIC_MESHTASTIC_XMODEM_PB_H_INCLUDED\n#define PB_MESHTASTIC_MESHTASTIC_XMODEM_PB_H_INCLUDED\n#include <pb.h>\n\n#if PB_PROTO_HEADER_VERSION != 40\n#error Regenerate this file with the current version of nanopb generator.\n#endif\n\n/* Enum definitions */\ntypedef enum _meshtastic_XModem_Control {\n    meshtastic_XModem_Control_NUL = 0,\n    meshtastic_XModem_Control_SOH = 1,\n    meshtastic_XModem_Control_STX = 2,\n    meshtastic_XModem_Control_EOT = 4,\n    meshtastic_XModem_Control_ACK = 6,\n    meshtastic_XModem_Control_NAK = 21,\n    meshtastic_XModem_Control_CAN = 24,\n    meshtastic_XModem_Control_CTRLZ = 26\n} meshtastic_XModem_Control;\n\n/* Struct definitions */\ntypedef PB_BYTES_ARRAY_T(128) meshtastic_XModem_buffer_t;\ntypedef struct _meshtastic_XModem {\n    meshtastic_XModem_Control control;\n    uint16_t seq;\n    uint16_t crc16;\n    meshtastic_XModem_buffer_t buffer;\n} meshtastic_XModem;\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Helper constants for enums */\n#define _meshtastic_XModem_Control_MIN meshtastic_XModem_Control_NUL\n#define _meshtastic_XModem_Control_MAX meshtastic_XModem_Control_CTRLZ\n#define _meshtastic_XModem_Control_ARRAYSIZE ((meshtastic_XModem_Control)(meshtastic_XModem_Control_CTRLZ+1))\n\n#define meshtastic_XModem_control_ENUMTYPE meshtastic_XModem_Control\n\n\n/* Initializer values for message structs */\n#define meshtastic_XModem_init_default           {_meshtastic_XModem_Control_MIN, 0, 0, {0, {0}}}\n#define meshtastic_XModem_init_zero              {_meshtastic_XModem_Control_MIN, 0, 0, {0, {0}}}\n\n/* Field tags (for use in manual encoding/decoding) */\n#define meshtastic_XModem_control_tag            1\n#define meshtastic_XModem_seq_tag                2\n#define meshtastic_XModem_crc16_tag              3\n#define meshtastic_XModem_buffer_tag             4\n\n/* Struct field encoding specification for nanopb */\n#define meshtastic_XModem_FIELDLIST(X, a) \\\nX(a, STATIC,   SINGULAR, UENUM,    control,           1) \\\nX(a, STATIC,   SINGULAR, UINT32,   seq,               2) \\\nX(a, STATIC,   SINGULAR, UINT32,   crc16,             3) \\\nX(a, STATIC,   SINGULAR, BYTES,    buffer,            4)\n#define meshtastic_XModem_CALLBACK NULL\n#define meshtastic_XModem_DEFAULT NULL\n\nextern const pb_msgdesc_t meshtastic_XModem_msg;\n\n/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n#define meshtastic_XModem_fields &meshtastic_XModem_msg\n\n/* Maximum encoded size of messages (where known) */\n#define MESHTASTIC_MESHTASTIC_XMODEM_PB_H_MAX_SIZE meshtastic_XModem_size\n#define meshtastic_XModem_size                   141\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/mesh/http/ContentHandler.cpp",
    "content": "#if !MESHTASTIC_EXCLUDE_WEBSERVER\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RadioLibInterface.h\"\n#include \"airtime.h\"\n#include \"main.h\"\n#include \"mesh/http/ContentHelper.h\"\n#include \"mesh/http/WebServer.h\"\n#if HAS_WIFI\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n#include \"SPILock.h\"\n#include \"power.h\"\n#include \"serialization/JSON.h\"\n#include <FSCommon.h>\n#include <HTTPBodyParser.hpp>\n#include <HTTPMultipartBodyParser.hpp>\n#include <HTTPURLEncodedBodyParser.hpp>\n\n#ifdef ARCH_ESP32\n#include \"esp_task_wdt.h\"\n#endif\n\n/*\n  Including the esp32_https_server library will trigger a compile time error. I've\n  tracked it down to a reoccurrance of this bug:\n    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57824\n  The work around is described here:\n    https://forums.xilinx.com/t5/Embedded-Development-Tools/Error-with-Standard-Libaries-in-Zynq/td-p/450032\n\n  Long story short is we need \"#undef str\" before including the esp32_https_server.\n    - Jm Casler (jm@casler.org) Oct 2020\n*/\n#undef str\n\n// Includes for the https server\n//   https://github.com/fhessel/esp32_https_server\n#include <HTTPRequest.hpp>\n#include <HTTPResponse.hpp>\n#include <HTTPSServer.hpp>\n#include <HTTPServer.hpp>\n#include <SSLCert.hpp>\n\n// The HTTPS Server comes in a separate namespace. For easier use, include it here.\nusing namespace httpsserver;\n\n#include \"mesh/http/ContentHandler.h\"\n\n#define DEST_FS_USES_LITTLEFS\n\n// We need to specify some content-type mapping, so the resources get delivered with the\n// right content type and are displayed correctly in the browser\nchar const *contentTypes[][2] = {{\".txt\", \"text/plain\"},     {\".html\", \"text/html\"},\n                                 {\".js\", \"text/javascript\"}, {\".png\", \"image/png\"},\n                                 {\".jpg\", \"image/jpg\"},      {\".gz\", \"application/gzip\"},\n                                 {\".gif\", \"image/gif\"},      {\".json\", \"application/json\"},\n                                 {\".css\", \"text/css\"},       {\".ico\", \"image/vnd.microsoft.icon\"},\n                                 {\".svg\", \"image/svg+xml\"},  {\"\", \"\"}};\n\n// const char *certificate = NULL; // change this as needed, leave as is for no TLS check (yolo security)\n\n// Our API to handle messages to and from the radio.\nHttpAPI webAPI;\n\nvoid registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer)\n{\n\n    // For every resource available on the server, we need to create a ResourceNode\n    // The ResourceNode links URL and HTTP method to a handler function\n\n    ResourceNode *nodeAPIv1ToRadioOptions = new ResourceNode(\"/api/v1/toradio\", \"OPTIONS\", &handleAPIv1ToRadio);\n    ResourceNode *nodeAPIv1ToRadio = new ResourceNode(\"/api/v1/toradio\", \"PUT\", &handleAPIv1ToRadio);\n    ResourceNode *nodeAPIv1FromRadioOptions = new ResourceNode(\"/api/v1/fromradio\", \"OPTIONS\", &handleAPIv1FromRadio);\n    ResourceNode *nodeAPIv1FromRadio = new ResourceNode(\"/api/v1/fromradio\", \"GET\", &handleAPIv1FromRadio);\n\n    //    ResourceNode *nodeHotspotApple = new ResourceNode(\"/hotspot-detect.html\", \"GET\", &handleHotspot);\n    //    ResourceNode *nodeHotspotAndroid = new ResourceNode(\"/generate_204\", \"GET\", &handleHotspot);\n\n    ResourceNode *nodeAdmin = new ResourceNode(\"/admin\", \"GET\", &handleAdmin);\n    //    ResourceNode *nodeAdminSettings = new ResourceNode(\"/admin/settings\", \"GET\", &handleAdminSettings);\n    //    ResourceNode *nodeAdminSettingsApply = new ResourceNode(\"/admin/settings/apply\", \"POST\", &handleAdminSettingsApply);\n    //    ResourceNode *nodeAdminFs = new ResourceNode(\"/admin/fs\", \"GET\", &handleFs);\n    //    ResourceNode *nodeUpdateFs = new ResourceNode(\"/admin/fs/update\", \"POST\", &handleUpdateFs);\n    //    ResourceNode *nodeDeleteFs = new ResourceNode(\"/admin/fs/delete\", \"GET\", &handleDeleteFsContent);\n\n    ResourceNode *nodeRestart = new ResourceNode(\"/restart\", \"POST\", &handleRestart);\n    ResourceNode *nodeFormUpload = new ResourceNode(\"/upload\", \"POST\", &handleFormUpload);\n\n    ResourceNode *nodeJsonScanNetworks = new ResourceNode(\"/json/scanNetworks\", \"GET\", &handleScanNetworks);\n    ResourceNode *nodeJsonReport = new ResourceNode(\"/json/report\", \"GET\", &handleReport);\n    ResourceNode *nodeJsonNodes = new ResourceNode(\"/json/nodes\", \"GET\", &handleNodes);\n    ResourceNode *nodeJsonFsBrowseStatic = new ResourceNode(\"/json/fs/browse/static\", \"GET\", &handleFsBrowseStatic);\n    ResourceNode *nodeJsonDelete = new ResourceNode(\"/json/fs/delete/static\", \"DELETE\", &handleFsDeleteStatic);\n\n    ResourceNode *nodeRoot = new ResourceNode(\"/*\", \"GET\", &handleStatic);\n\n    // Secure nodes\n    secureServer->registerNode(nodeAPIv1ToRadioOptions);\n    secureServer->registerNode(nodeAPIv1ToRadio);\n    secureServer->registerNode(nodeAPIv1FromRadioOptions);\n    secureServer->registerNode(nodeAPIv1FromRadio);\n    //    secureServer->registerNode(nodeHotspotApple);\n    //    secureServer->registerNode(nodeHotspotAndroid);\n    secureServer->registerNode(nodeRestart);\n    secureServer->registerNode(nodeFormUpload);\n    secureServer->registerNode(nodeJsonScanNetworks);\n    secureServer->registerNode(nodeJsonFsBrowseStatic);\n    secureServer->registerNode(nodeJsonDelete);\n    secureServer->registerNode(nodeJsonReport);\n    secureServer->registerNode(nodeJsonNodes);\n    //    secureServer->registerNode(nodeUpdateFs);\n    //    secureServer->registerNode(nodeDeleteFs);\n    secureServer->registerNode(nodeAdmin);\n    //    secureServer->registerNode(nodeAdminFs);\n    //    secureServer->registerNode(nodeAdminSettings);\n    //    secureServer->registerNode(nodeAdminSettingsApply);\n    secureServer->registerNode(nodeRoot); // This has to be last\n\n    // Insecure nodes\n    insecureServer->registerNode(nodeAPIv1ToRadioOptions);\n    insecureServer->registerNode(nodeAPIv1ToRadio);\n    insecureServer->registerNode(nodeAPIv1FromRadioOptions);\n    insecureServer->registerNode(nodeAPIv1FromRadio);\n    //    insecureServer->registerNode(nodeHotspotApple);\n    //    insecureServer->registerNode(nodeHotspotAndroid);\n    insecureServer->registerNode(nodeRestart);\n    insecureServer->registerNode(nodeFormUpload);\n    insecureServer->registerNode(nodeJsonScanNetworks);\n    insecureServer->registerNode(nodeJsonFsBrowseStatic);\n    insecureServer->registerNode(nodeJsonDelete);\n    insecureServer->registerNode(nodeJsonReport);\n    //    insecureServer->registerNode(nodeUpdateFs);\n    //    insecureServer->registerNode(nodeDeleteFs);\n    insecureServer->registerNode(nodeAdmin);\n    //    insecureServer->registerNode(nodeAdminFs);\n    //    insecureServer->registerNode(nodeAdminSettings);\n    //    insecureServer->registerNode(nodeAdminSettingsApply);\n    insecureServer->registerNode(nodeRoot); // This has to be last\n}\n\nvoid handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res)\n{\n    if (webServerThread)\n        webServerThread->markActivity();\n\n    LOG_DEBUG(\"webAPI handleAPIv1FromRadio\");\n\n    /*\n        For documentation, see:\n            https://meshtastic.org/docs/development/device/http-api\n            https://meshtastic.org/docs/development/device/client-api\n    */\n\n    // Get access to the parameters\n    ResourceParameters *params = req->getParams();\n\n    // std::string paramAll = \"all\";\n    std::string valueAll;\n\n    // Status code is 200 OK by default.\n    res->setHeader(\"Content-Type\", \"application/x-protobuf\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n    res->setHeader(\"X-Protobuf-Schema\", \"https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto\");\n\n    if (req->getMethod() == \"OPTIONS\") {\n        res->setStatusCode(204); // Success with no content\n        res->print(\"\");\n        return;\n    }\n\n    uint8_t txBuf[MAX_STREAM_BUF_SIZE];\n    uint32_t len = 1;\n\n    if (params->getQueryParameter(\"all\", valueAll)) {\n\n        // If all is true, return all the buffers we have available\n        //   to us at this point in time.\n        if (valueAll == \"true\") {\n            while (len) {\n                len = webAPI.getFromRadio(txBuf);\n                res->write(txBuf, len);\n            }\n\n            // Otherwise, just return one protobuf\n        } else {\n            len = webAPI.getFromRadio(txBuf);\n            res->write(txBuf, len);\n        }\n\n        // the param \"all\" was not specified. Return just one protobuf\n    } else {\n        len = webAPI.getFromRadio(txBuf);\n        res->write(txBuf, len);\n    }\n\n    LOG_DEBUG(\"webAPI handleAPIv1FromRadio, len %d\", len);\n}\n\nvoid handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res)\n{\n    LOG_DEBUG(\"webAPI handleAPIv1ToRadio\");\n\n    /*\n        For documentation, see:\n            https://meshtastic.org/docs/development/device/http-api\n            https://meshtastic.org/docs/development/device/client-api\n    */\n\n    res->setHeader(\"Content-Type\", \"application/x-protobuf\");\n    res->setHeader(\"Access-Control-Allow-Headers\", \"Content-Type\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"PUT, OPTIONS\");\n    res->setHeader(\"X-Protobuf-Schema\", \"https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto\");\n\n    if (req->getMethod() == \"OPTIONS\") {\n        res->setStatusCode(204); // Success with no content\n        res->print(\"\");\n        return;\n    }\n\n    byte buffer[MAX_TO_FROM_RADIO_SIZE];\n    size_t s = req->readBytes(buffer, MAX_TO_FROM_RADIO_SIZE);\n\n    LOG_DEBUG(\"Received %d bytes from PUT request\", s);\n    webAPI.handleToRadio(buffer, s);\n\n    res->write(buffer, s);\n    LOG_DEBUG(\"webAPI handleAPIv1ToRadio\");\n}\n\nvoid htmlDeleteDir(const char *dirname)\n{\n\n    File root = FSCom.open(dirname);\n    if (!root) {\n        return;\n    }\n    if (!root.isDirectory()) {\n        return;\n    }\n\n    File file = root.openNextFile();\n    while (file) {\n        if (file.isDirectory() && !String(file.name()).endsWith(\".\")) {\n            htmlDeleteDir(file.name());\n            file.flush();\n            file.close();\n        } else {\n            String fileName = String(file.name());\n            file.flush();\n            file.close();\n            LOG_DEBUG(\"    %s\", fileName.c_str());\n            FSCom.remove(fileName);\n        }\n        file = root.openNextFile();\n    }\n    root.flush();\n    root.close();\n}\n\nJSONArray htmlListDir(const char *dirname, uint8_t levels)\n{\n    File root = FSCom.open(dirname, FILE_O_READ);\n    JSONArray fileList;\n    if (!root) {\n        return fileList;\n    }\n    if (!root.isDirectory()) {\n        return fileList;\n    }\n\n    // iterate over the file list\n    File file = root.openNextFile();\n    while (file) {\n        if (file.isDirectory() && !String(file.name()).endsWith(\".\")) {\n            if (levels) {\n#ifdef ARCH_ESP32\n                fileList.push_back(new JSONValue(htmlListDir(file.path(), levels - 1)));\n#else\n                fileList.push_back(new JSONValue(htmlListDir(file.name(), levels - 1)));\n#endif\n                file.close();\n            }\n        } else {\n            JSONObject thisFileMap;\n            thisFileMap[\"size\"] = new JSONValue((int)file.size());\n#ifdef ARCH_ESP32\n            String fileName = String(file.path()).substring(1);\n            thisFileMap[\"name\"] = new JSONValue(fileName.c_str());\n#else\n            String fileName = String(file.name()).substring(1);\n            thisFileMap[\"name\"] = new JSONValue(fileName.c_str());\n#endif\n            String tempName = String(file.name()).substring(1);\n            if (tempName.endsWith(\".gz\")) {\n#ifdef ARCH_ESP32\n                String modifiedFile = String(file.path()).substring(1);\n#else\n                String modifiedFile = String(file.name()).substring(1);\n#endif\n                modifiedFile.remove((modifiedFile.length() - 3), 3);\n                thisFileMap[\"nameModified\"] = new JSONValue(modifiedFile.c_str());\n            }\n            fileList.push_back(new JSONValue(thisFileMap));\n        }\n        file.close();\n        file = root.openNextFile();\n    }\n    root.close();\n    return fileList;\n}\n\nvoid handleFsBrowseStatic(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"application/json\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n\n    concurrency::LockGuard g(spiLock);\n    auto fileList = htmlListDir(\"/static\", 10);\n\n    // create json output structure\n    JSONObject filesystemObj;\n    filesystemObj[\"total\"] = new JSONValue((int)FSCom.totalBytes());\n    filesystemObj[\"used\"] = new JSONValue((int)FSCom.usedBytes());\n    filesystemObj[\"free\"] = new JSONValue(int(FSCom.totalBytes() - FSCom.usedBytes()));\n\n    JSONObject jsonObjInner;\n    jsonObjInner[\"files\"] = new JSONValue(fileList);\n    jsonObjInner[\"filesystem\"] = new JSONValue(filesystemObj);\n\n    JSONObject jsonObjOuter;\n    jsonObjOuter[\"data\"] = new JSONValue(jsonObjInner);\n    jsonObjOuter[\"status\"] = new JSONValue(\"ok\");\n\n    JSONValue *value = new JSONValue(jsonObjOuter);\n\n    std::string jsonString = value->Stringify();\n    res->print(jsonString.c_str());\n\n    delete value;\n}\n\nvoid handleFsDeleteStatic(HTTPRequest *req, HTTPResponse *res)\n{\n    ResourceParameters *params = req->getParams();\n    std::string paramValDelete;\n\n    res->setHeader(\"Content-Type\", \"application/json\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"DELETE\");\n\n    if (params->getQueryParameter(\"delete\", paramValDelete)) {\n        std::string pathDelete = \"/\" + paramValDelete;\n        concurrency::LockGuard g(spiLock);\n        if (FSCom.remove(pathDelete.c_str())) {\n\n            LOG_INFO(\"%s\", pathDelete.c_str());\n            JSONObject jsonObjOuter;\n            jsonObjOuter[\"status\"] = new JSONValue(\"ok\");\n            JSONValue *value = new JSONValue(jsonObjOuter);\n            std::string jsonString = value->Stringify();\n            res->print(jsonString.c_str());\n            delete value;\n            return;\n        } else {\n\n            LOG_INFO(\"%s\", pathDelete.c_str());\n            JSONObject jsonObjOuter;\n            jsonObjOuter[\"status\"] = new JSONValue(\"Error\");\n            JSONValue *value = new JSONValue(jsonObjOuter);\n            std::string jsonString = value->Stringify();\n            res->print(jsonString.c_str());\n            delete value;\n            return;\n        }\n    }\n}\n\nvoid handleStatic(HTTPRequest *req, HTTPResponse *res)\n{\n    if (webServerThread)\n        webServerThread->markActivity();\n\n    // Get access to the parameters\n    ResourceParameters *params = req->getParams();\n\n    std::string parameter1;\n    // Print the first parameter value\n    if (params->getPathParameter(0, parameter1)) {\n\n        std::string filename = \"/static/\" + parameter1;\n        std::string filenameGzip = \"/static/\" + parameter1 + \".gz\";\n\n        // Try to open the file\n        File file;\n\n        bool has_set_content_type = false;\n\n        if (filename == \"/static/\") {\n            filename = \"/static/index.html\";\n            filenameGzip = \"/static/index.html.gz\";\n        }\n\n        concurrency::LockGuard g(spiLock);\n\n        if (FSCom.exists(filename.c_str())) {\n            file = FSCom.open(filename.c_str());\n            if (!file.available()) {\n                LOG_WARN(\"File not available - %s\", filename.c_str());\n            }\n        } else if (FSCom.exists(filenameGzip.c_str())) {\n            file = FSCom.open(filenameGzip.c_str());\n            res->setHeader(\"Content-Encoding\", \"gzip\");\n            if (!file.available()) {\n                LOG_WARN(\"File not available - %s\", filenameGzip.c_str());\n            }\n        } else {\n            has_set_content_type = true;\n            filenameGzip = \"/static/index.html.gz\";\n            file = FSCom.open(filenameGzip.c_str());\n            res->setHeader(\"Content-Type\", \"text/html\");\n            if (!file.available()) {\n\n                LOG_WARN(\"File not available - %s\", filenameGzip.c_str());\n                res->println(\"Web server is running.<br><br>The content you are looking for can't be found. Please see: <a \"\n                             \"href=https://meshtastic.org/docs/software/web-client/>FAQ</a>.<br><br><a \"\n                             \"href=/admin>admin</a>\");\n\n                return;\n            } else {\n                res->setHeader(\"Content-Encoding\", \"gzip\");\n            }\n        }\n\n        res->setHeader(\"Content-Length\", httpsserver::intToString(file.size()));\n\n        // Content-Type is guessed using the definition of the contentTypes-table defined above\n        int cTypeIdx = 0;\n        do {\n            if (filename.rfind(contentTypes[cTypeIdx][0]) != std::string::npos) {\n                res->setHeader(\"Content-Type\", contentTypes[cTypeIdx][1]);\n                has_set_content_type = true;\n                break;\n            }\n            cTypeIdx += 1;\n        } while (strlen(contentTypes[cTypeIdx][0]) > 0);\n\n        if (!has_set_content_type) {\n            // Set a default content type\n            res->setHeader(\"Content-Type\", \"application/octet-stream\");\n        }\n\n        // Read the file and write it to the HTTP response body\n        size_t length = 0;\n        do {\n            char buffer[256];\n            length = file.read((uint8_t *)buffer, 256);\n            std::string bufferString(buffer, length);\n            res->write((uint8_t *)bufferString.c_str(), bufferString.size());\n        } while (length > 0);\n\n        file.close();\n\n        return;\n    } else {\n        LOG_ERROR(\"This should not have happened\");\n        res->println(\"ERROR: This should not have happened\");\n    }\n}\n\nvoid handleFormUpload(HTTPRequest *req, HTTPResponse *res)\n{\n\n    LOG_DEBUG(\"Form Upload - Disable keep-alive\");\n    res->setHeader(\"Connection\", \"close\");\n\n    // First, we need to check the encoding of the form that we have received.\n    // The browser will set the Content-Type request header, so we can use it for that purpose.\n    // Then we select the body parser based on the encoding.\n    // Actually we do this only for documentary purposes, we know the form is going\n    // to be multipart/form-data.\n    LOG_DEBUG(\"Form Upload - Creating body parser reference\");\n    HTTPBodyParser *parser;\n    std::string contentType = req->getHeader(\"Content-Type\");\n\n    // The content type may have additional properties after a semicolon, for example:\n    // Content-Type: text/html;charset=utf-8\n    // Content-Type: multipart/form-data;boundary=------s0m3w31rdch4r4c73rs\n    // As we're interested only in the actual mime _type_, we strip everything after the\n    // first semicolon, if one exists:\n    size_t semicolonPos = contentType.find(\";\");\n    if (semicolonPos != std::string::npos) {\n        contentType.resize(semicolonPos);\n    }\n\n    // Now, we can decide based on the content type:\n    if (contentType == \"multipart/form-data\") {\n        LOG_DEBUG(\"Form Upload - multipart/form-data\");\n        parser = new HTTPMultipartBodyParser(req);\n    } else {\n        LOG_DEBUG(\"Unknown POST Content-Type: %s\", contentType.c_str());\n        return;\n    }\n\n    res->println(\"<html><head><meta http-equiv=\\\"refresh\\\" content=\\\"1;url=/static\\\" /><title>File \"\n                 \"Upload</title></head><body><h1>File Upload</h1>\");\n\n    // We iterate over the fields. Any field with a filename is uploaded.\n    // Note that the BodyParser consumes the request body, meaning that you can iterate over the request's\n    // fields only a single time. The reason for this is that it allows you to handle large requests\n    // which would not fit into memory.\n    bool didwrite = false;\n\n    // parser->nextField() will move the parser to the next field in the request body (field meaning a\n    // form field, if you take the HTML perspective). After the last field has been processed, nextField()\n    // returns false and the while loop ends.\n    while (parser->nextField()) {\n        // For Multipart data, each field has three properties:\n        // The name (\"name\" value of the <input> tag)\n        // The filename (If it was a <input type=\"file\">, this is the filename on the machine of the\n        //   user uploading it)\n        // The mime type (It is determined by the client. So do not trust this value and blindly start\n        //   parsing files only if the type matches)\n        std::string name = parser->getFieldName();\n        std::string filename = parser->getFieldFilename();\n        std::string mimeType = parser->getFieldMimeType();\n        // We log all three values, so that you can observe the upload on the serial monitor:\n        LOG_DEBUG(\"handleFormUpload: field name='%s', filename='%s', mimetype='%s'\", name.c_str(), filename.c_str(),\n                  mimeType.c_str());\n\n        // Double check that it is what we expect\n        if (name != \"file\") {\n            LOG_DEBUG(\"Skip unexpected field\");\n            res->println(\"<p>No file found.</p>\");\n            delete parser;\n            return;\n        }\n\n        // Double check that it is what we expect\n        if (filename == \"\") {\n            LOG_DEBUG(\"Skip unexpected field\");\n            res->println(\"<p>No file found.</p>\");\n            delete parser;\n            return;\n        }\n\n        // You should check file name validity and all that, but we skip that to make the core\n        // concepts of the body parser functionality easier to understand.\n        std::string pathname = \"/static/\" + filename;\n\n        concurrency::LockGuard g(spiLock);\n        // Create a new file to stream the data into\n        File file = FSCom.open(pathname.c_str(), FILE_O_WRITE);\n        size_t fileLength = 0;\n        didwrite = true;\n\n        // With endOfField you can check whether the end of field has been reached or if there's\n        // still data pending. With multipart bodies, you cannot know the field size in advance.\n        while (!parser->endOfField()) {\n            esp_task_wdt_reset();\n\n            byte buf[512];\n            size_t readLength = parser->read(buf, 512);\n            // LOG_DEBUG(\"readLength - %i\", readLength);\n\n            // Abort the transfer if there is less than 50k space left on the filesystem.\n            if (FSCom.totalBytes() - FSCom.usedBytes() < 51200) {\n                file.flush();\n                file.close();\n                res->println(\"<p>Write aborted! Reserving 50k on filesystem.</p>\");\n\n                // enableLoopWDT();\n\n                delete parser;\n                return;\n            }\n\n            // if (readLength) {\n            file.write(buf, readLength);\n            fileLength += readLength;\n            LOG_DEBUG(\"File Length %i\", fileLength);\n            //}\n        }\n        // enableLoopWDT();\n\n        file.flush();\n        file.close();\n\n        res->printf(\"<p>Saved %d bytes to %s</p>\", (int)fileLength, pathname.c_str());\n    }\n    if (!didwrite) {\n        res->println(\"<p>Did not write any file</p>\");\n    }\n    res->println(\"</body></html>\");\n    delete parser;\n}\n\nvoid handleReport(HTTPRequest *req, HTTPResponse *res)\n{\n    ResourceParameters *params = req->getParams();\n    std::string content;\n\n    if (!params->getQueryParameter(\"content\", content)) {\n        content = \"json\";\n    }\n\n    if (content == \"json\") {\n        res->setHeader(\"Content-Type\", \"application/json\");\n        res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n        res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n    } else {\n        res->setHeader(\"Content-Type\", \"text/html\");\n        res->println(\"<pre>\");\n    }\n\n    // Helper lambda to create JSON array and clean up memory properly\n    auto createJSONArrayFromLog = [](const uint32_t *logArray, int count) -> JSONValue * {\n        JSONArray tempArray;\n        for (int i = 0; i < count; i++) {\n            tempArray.push_back(new JSONValue((int)logArray[i]));\n        }\n        JSONValue *result = new JSONValue(tempArray);\n        // Note: Don't delete tempArray elements here - JSONValue now owns them\n        return result;\n    };\n\n    // data->airtime->tx_log\n    uint32_t *logArray;\n    logArray = airTime->airtimeReport(TX_LOG);\n    JSONValue *txLogJsonValue = createJSONArrayFromLog(logArray, airTime->getPeriodsToLog());\n\n    // data->airtime->rx_log\n    logArray = airTime->airtimeReport(RX_LOG);\n    JSONValue *rxLogJsonValue = createJSONArrayFromLog(logArray, airTime->getPeriodsToLog());\n\n    // data->airtime->rx_all_log\n    logArray = airTime->airtimeReport(RX_ALL_LOG);\n    JSONValue *rxAllLogJsonValue = createJSONArrayFromLog(logArray, airTime->getPeriodsToLog());\n\n    // data->airtime\n    JSONObject jsonObjAirtime;\n    jsonObjAirtime[\"tx_log\"] = txLogJsonValue;\n    jsonObjAirtime[\"rx_log\"] = rxLogJsonValue;\n    jsonObjAirtime[\"rx_all_log\"] = rxAllLogJsonValue;\n    jsonObjAirtime[\"channel_utilization\"] = new JSONValue(airTime->channelUtilizationPercent());\n    jsonObjAirtime[\"utilization_tx\"] = new JSONValue(airTime->utilizationTXPercent());\n    jsonObjAirtime[\"seconds_since_boot\"] = new JSONValue(int(airTime->getSecondsSinceBoot()));\n    jsonObjAirtime[\"seconds_per_period\"] = new JSONValue(int(airTime->getSecondsPerPeriod()));\n    jsonObjAirtime[\"periods_to_log\"] = new JSONValue(airTime->getPeriodsToLog());\n\n    // data->wifi\n    JSONObject jsonObjWifi;\n    jsonObjWifi[\"rssi\"] = new JSONValue(WiFi.RSSI());\n    String wifiIPString = WiFi.localIP().toString();\n    std::string wifiIP = wifiIPString.c_str();\n    jsonObjWifi[\"ip\"] = new JSONValue(wifiIP.c_str());\n\n    // data->memory\n    JSONObject jsonObjMemory;\n    jsonObjMemory[\"heap_total\"] = new JSONValue((int)memGet.getHeapSize());\n    jsonObjMemory[\"heap_free\"] = new JSONValue((int)memGet.getFreeHeap());\n    jsonObjMemory[\"psram_total\"] = new JSONValue((int)memGet.getPsramSize());\n    jsonObjMemory[\"psram_free\"] = new JSONValue((int)memGet.getFreePsram());\n    spiLock->lock();\n    jsonObjMemory[\"fs_total\"] = new JSONValue((int)FSCom.totalBytes());\n    jsonObjMemory[\"fs_used\"] = new JSONValue((int)FSCom.usedBytes());\n    jsonObjMemory[\"fs_free\"] = new JSONValue(int(FSCom.totalBytes() - FSCom.usedBytes()));\n    spiLock->unlock();\n\n    // data->power\n    JSONObject jsonObjPower;\n    jsonObjPower[\"battery_percent\"] = new JSONValue(powerStatus->getBatteryChargePercent());\n    jsonObjPower[\"battery_voltage_mv\"] = new JSONValue(powerStatus->getBatteryVoltageMv());\n    jsonObjPower[\"has_battery\"] = new JSONValue(BoolToString(powerStatus->getHasBattery()));\n    jsonObjPower[\"has_usb\"] = new JSONValue(BoolToString(powerStatus->getHasUSB()));\n    jsonObjPower[\"is_charging\"] = new JSONValue(BoolToString(powerStatus->getIsCharging()));\n\n    // data->device\n    JSONObject jsonObjDevice;\n    jsonObjDevice[\"reboot_counter\"] = new JSONValue((int)myNodeInfo.reboot_count);\n\n    // data->radio\n    JSONObject jsonObjRadio;\n    jsonObjRadio[\"frequency\"] = new JSONValue(RadioLibInterface::instance->getFreq());\n    jsonObjRadio[\"lora_channel\"] = new JSONValue((int)RadioLibInterface::instance->getChannelNum() + 1);\n\n    // collect data to inner data object\n    JSONObject jsonObjInner;\n    jsonObjInner[\"airtime\"] = new JSONValue(jsonObjAirtime);\n    jsonObjInner[\"wifi\"] = new JSONValue(jsonObjWifi);\n    jsonObjInner[\"memory\"] = new JSONValue(jsonObjMemory);\n    jsonObjInner[\"power\"] = new JSONValue(jsonObjPower);\n    jsonObjInner[\"device\"] = new JSONValue(jsonObjDevice);\n    jsonObjInner[\"radio\"] = new JSONValue(jsonObjRadio);\n\n    // create json output structure\n    JSONObject jsonObjOuter;\n    jsonObjOuter[\"data\"] = new JSONValue(jsonObjInner);\n    jsonObjOuter[\"status\"] = new JSONValue(\"ok\");\n    // serialize and write it to the stream\n    JSONValue *value = new JSONValue(jsonObjOuter);\n    std::string jsonString = value->Stringify();\n    res->print(jsonString.c_str());\n    delete value;\n}\n\nvoid handleNodes(HTTPRequest *req, HTTPResponse *res)\n{\n    ResourceParameters *params = req->getParams();\n    std::string content;\n\n    if (!params->getQueryParameter(\"content\", content)) {\n        content = \"json\";\n    }\n\n    if (content == \"json\") {\n        res->setHeader(\"Content-Type\", \"application/json\");\n        res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n        res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n    } else {\n        res->setHeader(\"Content-Type\", \"text/html\");\n        res->println(\"<pre>\");\n    }\n\n    JSONArray nodesArray;\n\n    uint32_t readIndex = 0;\n    const meshtastic_NodeInfoLite *tempNodeInfo = nodeDB->readNextMeshNode(readIndex);\n    while (tempNodeInfo != NULL) {\n        if (tempNodeInfo->has_user) {\n            JSONObject node;\n\n            char id[16];\n            snprintf(id, sizeof(id), \"!%08x\", tempNodeInfo->num);\n\n            node[\"id\"] = new JSONValue(id);\n            node[\"snr\"] = new JSONValue(tempNodeInfo->snr);\n            node[\"via_mqtt\"] = new JSONValue(BoolToString(tempNodeInfo->via_mqtt));\n            node[\"last_heard\"] = new JSONValue((int)tempNodeInfo->last_heard);\n            node[\"position\"] = new JSONValue();\n\n            if (nodeDB->hasValidPosition(tempNodeInfo)) {\n                JSONObject position;\n                position[\"latitude\"] = new JSONValue((float)tempNodeInfo->position.latitude_i * 1e-7);\n                position[\"longitude\"] = new JSONValue((float)tempNodeInfo->position.longitude_i * 1e-7);\n                position[\"altitude\"] = new JSONValue((int)tempNodeInfo->position.altitude);\n                node[\"position\"] = new JSONValue(position);\n            }\n\n            node[\"long_name\"] = new JSONValue(tempNodeInfo->user.long_name);\n            node[\"short_name\"] = new JSONValue(tempNodeInfo->user.short_name);\n            char macStr[18];\n            snprintf(macStr, sizeof(macStr), \"%02X:%02X:%02X:%02X:%02X:%02X\", tempNodeInfo->user.macaddr[0],\n                     tempNodeInfo->user.macaddr[1], tempNodeInfo->user.macaddr[2], tempNodeInfo->user.macaddr[3],\n                     tempNodeInfo->user.macaddr[4], tempNodeInfo->user.macaddr[5]);\n            node[\"mac_address\"] = new JSONValue(macStr);\n            node[\"hw_model\"] = new JSONValue(tempNodeInfo->user.hw_model);\n\n            nodesArray.push_back(new JSONValue(node));\n        }\n        tempNodeInfo = nodeDB->readNextMeshNode(readIndex);\n    }\n\n    // collect data to inner data object\n    JSONObject jsonObjInner;\n    jsonObjInner[\"nodes\"] = new JSONValue(nodesArray);\n\n    // create json output structure\n    JSONObject jsonObjOuter;\n    jsonObjOuter[\"data\"] = new JSONValue(jsonObjInner);\n    jsonObjOuter[\"status\"] = new JSONValue(\"ok\");\n    // serialize and write it to the stream\n    JSONValue *value = new JSONValue(jsonObjOuter);\n    std::string jsonString = value->Stringify();\n    res->print(jsonString.c_str());\n    delete value;\n}\n\n/*\n    This supports the Apple Captive Network Assistant (CNA) Portal\n*/\nvoid handleHotspot(HTTPRequest *req, HTTPResponse *res)\n{\n    LOG_INFO(\"Hotspot Request\");\n\n    /*\n        If we don't do a redirect, be sure to return a \"Success\" message\n        otherwise iOS will have trouble detecting that the connection to the SoftAP worked.\n    */\n\n    // Status code is 200 OK by default.\n    // We want to deliver a simple HTML page, so we send a corresponding content type:\n    res->setHeader(\"Content-Type\", \"text/html\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n\n    // res->println(\"<!DOCTYPE html>\");\n    res->println(\"<meta http-equiv=\\\"refresh\\\" content=\\\"0;url=/\\\" />\");\n}\n\nvoid handleDeleteFsContent(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"text/html\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n\n    res->println(\"<h1>Meshtastic</h1>\");\n    res->println(\"Delete Content in /static/*\");\n\n    LOG_INFO(\"Delete files from /static/* : \");\n\n    concurrency::LockGuard g(spiLock);\n    htmlDeleteDir(\"/static\");\n\n    res->println(\"<p><hr><p><a href=/admin>Back to admin</a>\");\n}\n\nvoid handleAdmin(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"text/html\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n\n    res->println(\"<h1>Meshtastic</h1>\");\n    //    res->println(\"<a href=/admin/settings>Settings</a><br>\");\n    //    res->println(\"<a href=/admin/fs>Manage Web Content</a><br>\");\n    res->println(\"<a href=/json/report>Device Report</a><br>\");\n}\n\nvoid handleAdminSettings(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"text/html\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n\n    res->println(\"<h1>Meshtastic</h1>\");\n    res->println(\"This isn't done.\");\n    res->println(\"<form action=/admin/settings/apply method=post>\");\n    res->println(\"<table border=1>\");\n    res->println(\"<tr><td>Set?</td><td>Setting</td><td>current value</td><td>new value</td></tr>\");\n    res->println(\"<tr><td><input type=checkbox></td><td>WiFi SSID</td><td>false</td><td><input type=radio></td></tr>\");\n    res->println(\"<tr><td><input type=checkbox></td><td>WiFi Password</td><td>false</td><td><input type=radio></td></tr>\");\n    res->println(\n        \"<tr><td><input type=checkbox></td><td>Smart Position Update</td><td>false</td><td><input type=radio></td></tr>\");\n    res->println(\"</table>\");\n    res->println(\"<table>\");\n    res->println(\"<input type=submit value=Apply New Settings>\");\n    res->println(\"<form>\");\n    res->println(\"<p><hr><p><a href=/admin>Back to admin</a>\");\n}\n\nvoid handleAdminSettingsApply(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"text/html\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"POST\");\n    res->println(\"<h1>Meshtastic</h1>\");\n    res->println(\n        \"<html><head><meta http-equiv=\\\"refresh\\\" content=\\\"1;url=/admin/settings\\\" /><title>Settings Applied. </title>\");\n\n    res->println(\"Settings Applied. Please wait.\");\n}\n\nvoid handleFs(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"text/html\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n\n    res->println(\"<h1>Meshtastic</h1>\");\n    res->println(\"<a href=/admin/fs/delete>Delete Web Content</a><p><form action=/admin/fs/update \"\n                 \"method=post><input type=submit value=UPDATE_WEB_CONTENT></form>Be patient!\");\n    res->println(\"<p><hr><p><a href=/admin>Back to admin</a>\");\n}\n\nvoid handleRestart(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"text/html\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n\n    res->println(\"<h1>Meshtastic</h1>\");\n    res->println(\"Restarting\");\n\n    LOG_DEBUG(\"Restarted on HTTP(s) Request\");\n    webServerThread->requestRestart = (millis() / 1000) + 5;\n}\n\nvoid handleScanNetworks(HTTPRequest *req, HTTPResponse *res)\n{\n    res->setHeader(\"Content-Type\", \"application/json\");\n    res->setHeader(\"Access-Control-Allow-Origin\", \"*\");\n    res->setHeader(\"Access-Control-Allow-Methods\", \"GET\");\n    // res->setHeader(\"Content-Type\", \"text/html\");\n\n    int n = WiFi.scanNetworks();\n\n    // build list of network objects\n    JSONArray networkObjs;\n    if (n > 0) {\n        for (int i = 0; i < n; ++i) {\n            char ssidArray[50];\n            String ssidString = String(WiFi.SSID(i));\n            ssidString.replace(\"\\\"\", \"\\\\\\\"\");\n            ssidString.toCharArray(ssidArray, 50);\n\n            if (WiFi.encryptionType(i) != WIFI_AUTH_OPEN) {\n                JSONObject thisNetwork;\n                thisNetwork[\"ssid\"] = new JSONValue(ssidArray);\n                thisNetwork[\"rssi\"] = new JSONValue(int(WiFi.RSSI(i)));\n                networkObjs.push_back(new JSONValue(thisNetwork));\n            }\n            // Yield some cpu cycles to IP stack.\n            //   This is important in case the list is large and it takes us time to return\n            //   to the main loop.\n            yield();\n        }\n    }\n\n    // build output structure\n    JSONObject jsonObjOuter;\n    jsonObjOuter[\"data\"] = new JSONValue(networkObjs);\n    jsonObjOuter[\"status\"] = new JSONValue(\"ok\");\n\n    // serialize and write it to the stream\n    JSONValue *value = new JSONValue(jsonObjOuter);\n    std::string jsonString = value->Stringify();\n    res->print(jsonString.c_str());\n    delete value;\n}\n#endif"
  },
  {
    "path": "src/mesh/http/ContentHandler.h",
    "content": "#pragma once\nvoid registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer);\n\n// Declare some handler functions for the various URLs on the server\nvoid handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res);\nvoid handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res);\nvoid handleHotspot(HTTPRequest *req, HTTPResponse *res);\nvoid handleStatic(HTTPRequest *req, HTTPResponse *res);\nvoid handleRestart(HTTPRequest *req, HTTPResponse *res);\nvoid handleFormUpload(HTTPRequest *req, HTTPResponse *res);\nvoid handleScanNetworks(HTTPRequest *req, HTTPResponse *res);\nvoid handleFsBrowseStatic(HTTPRequest *req, HTTPResponse *res);\nvoid handleFsDeleteStatic(HTTPRequest *req, HTTPResponse *res);\nvoid handleReport(HTTPRequest *req, HTTPResponse *res);\nvoid handleNodes(HTTPRequest *req, HTTPResponse *res);\nvoid handleUpdateFs(HTTPRequest *req, HTTPResponse *res);\nvoid handleDeleteFsContent(HTTPRequest *req, HTTPResponse *res);\nvoid handleFs(HTTPRequest *req, HTTPResponse *res);\nvoid handleAdmin(HTTPRequest *req, HTTPResponse *res);\nvoid handleAdminSettings(HTTPRequest *req, HTTPResponse *res);\nvoid handleAdminSettingsApply(HTTPRequest *req, HTTPResponse *res);\n\n// Interface to the PhoneAPI to access the protobufs with messages\nclass HttpAPI : public PhoneAPI\n{\n\n  public:\n    HttpAPI() { api_type = TYPE_HTTP; }\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() override { return true; } // FIXME, be smarter about this\n  private:\n    // Nothing here yet\n\n  protected:\n};"
  },
  {
    "path": "src/mesh/http/ContentHelper.cpp",
    "content": "#include \"mesh/http/ContentHelper.h\"\n// #include <Arduino.h>\n// #include \"main.h\"\n\nvoid replaceAll(std::string &str, const std::string &from, const std::string &to)\n{\n    if (from.empty())\n        return;\n    size_t start_pos = 0;\n    while ((start_pos = str.find(from, start_pos)) != std::string::npos) {\n        str.replace(start_pos, from.length(), to);\n        start_pos += to.length(); // In case 'to' contains 'from', like replacing 'x' with 'yx'\n    }\n}\n"
  },
  {
    "path": "src/mesh/http/ContentHelper.h",
    "content": "#include <Arduino.h>\n#include <functional>\n#include <string>\n\n#define BoolToString(x) ((x) ? \"true\" : \"false\")\n\nvoid replaceAll(std::string &str, const std::string &from, const std::string &to);\n"
  },
  {
    "path": "src/mesh/http/WebServer.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_WEBSERVER\n#include \"NodeDB.h\"\n#include \"graphics/Screen.h\"\n#include \"main.h\"\n#include \"mesh/http/WebServer.h\"\n#include \"mesh/wifi/WiFiAPClient.h\"\n#include \"sleep.h\"\n#include <HTTPBodyParser.hpp>\n#include <HTTPMultipartBodyParser.hpp>\n#include <HTTPURLEncodedBodyParser.hpp>\n#include <Throttle.h>\n#include <WebServer.h>\n#include <WiFi.h>\n\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n\n#ifdef ARCH_ESP32\n#include \"esp_task_wdt.h\"\n#endif\n\n// Persistent Data Storage\n#include <Preferences.h>\nPreferences prefs;\n\n/*\n  Including the esp32_https_server library will trigger a compile time error. I've\n  tracked it down to a reoccurrance of this bug:\n    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57824\n  The work around is described here:\n    https://forums.xilinx.com/t5/Embedded-Development-Tools/Error-with-Standard-Libaries-in-Zynq/td-p/450032\n\n  Long story short is we need \"#undef str\" before including the esp32_https_server.\n    - Jm Casler (jm@casler.org) Oct 2020\n*/\n#undef str\n\n// Includes for the https server\n//   https://github.com/fhessel/esp32_https_server\n#include <HTTPRequest.hpp>\n#include <HTTPResponse.hpp>\n#include <HTTPSServer.hpp>\n#include <HTTPServer.hpp>\n#include <SSLCert.hpp>\n\n// The HTTPS Server comes in a separate namespace. For easier use, include it here.\nusing namespace httpsserver;\n#include \"mesh/http/ContentHandler.h\"\n\nstatic const uint32_t ACTIVE_THRESHOLD_MS = 5000;\nstatic const uint32_t MEDIUM_THRESHOLD_MS = 30000;\nstatic const int32_t ACTIVE_INTERVAL_MS = 50;\nstatic const int32_t MEDIUM_INTERVAL_MS = 200;\nstatic const int32_t IDLE_INTERVAL_MS = 1000;\n\n// Maximum concurrent HTTPS connections (reduced from default 4 to save memory)\nstatic const uint8_t MAX_HTTPS_CONNECTIONS = 2;\n\n// Minimum free heap required for SSL handshake (~40KB for mbedTLS contexts)\nstatic const uint32_t MIN_HEAP_FOR_SSL = 40000;\n\nstatic SSLCert *cert;\nstatic HTTPSServer *secureServer;\nstatic HTTPServer *insecureServer;\n\nvolatile bool isWebServerReady;\nvolatile bool isCertReady;\n\nstatic void handleWebResponse()\n{\n    if (isWifiAvailable()) {\n\n        if (isWebServerReady) {\n            // Check heap before HTTPS processing - SSL requires significant memory\n            if (secureServer) {\n                uint32_t freeHeap = ESP.getFreeHeap();\n                if (freeHeap >= MIN_HEAP_FOR_SSL) {\n                    secureServer->loop();\n                } else {\n                    // Skip HTTPS when memory is low to prevent SSL setup failures\n                    static uint32_t lastHeapWarning = 0;\n                    if (lastHeapWarning == 0 || !Throttle::isWithinTimespanMs(lastHeapWarning, 30000)) {\n                        LOG_WARN(\"Low heap (%u bytes), skipping HTTPS processing\", freeHeap);\n                        lastHeapWarning = millis();\n                    }\n                }\n            }\n            insecureServer->loop();\n        }\n    }\n}\n\nstatic void taskCreateCert(void *parameter)\n{\n    prefs.begin(\"MeshtasticHTTPS\", false);\n\n#if 0\n    // Delete the saved certs (used in debugging)\n    LOG_DEBUG(\"Delete any saved SSL keys\");\n    // prefs.clear();\n    prefs.remove(\"PK\");\n    prefs.remove(\"cert\");\n#endif\n\n    LOG_INFO(\"Checking if we have a saved SSL Certificate\");\n\n    size_t pkLen = prefs.getBytesLength(\"PK\");\n    size_t certLen = prefs.getBytesLength(\"cert\");\n\n    if (pkLen && certLen) {\n        LOG_INFO(\"Existing SSL Certificate found!\");\n\n        uint8_t *pkBuffer = new uint8_t[pkLen];\n        prefs.getBytes(\"PK\", pkBuffer, pkLen);\n\n        uint8_t *certBuffer = new uint8_t[certLen];\n        prefs.getBytes(\"cert\", certBuffer, certLen);\n\n        cert = new SSLCert(certBuffer, certLen, pkBuffer, pkLen);\n\n        LOG_DEBUG(\"Retrieved Private Key: %d Bytes\", cert->getPKLength());\n        LOG_DEBUG(\"Retrieved Certificate: %d Bytes\", cert->getCertLength());\n    } else {\n\n        LOG_INFO(\"Creating the certificate. This may take a while. Please wait\");\n        yield();\n        cert = new SSLCert();\n        yield();\n        int createCertResult = createSelfSignedCert(*cert, KEYSIZE_2048, \"CN=meshtastic.local,O=Meshtastic,C=US\",\n                                                    \"20190101000000\", \"20300101000000\");\n        yield();\n\n        if (createCertResult != 0) {\n            LOG_ERROR(\"Creating the certificate failed\");\n        } else {\n            LOG_INFO(\"Creating the certificate was successful\");\n\n            LOG_DEBUG(\"Created Private Key: %d Bytes\", cert->getPKLength());\n\n            LOG_DEBUG(\"Created Certificate: %d Bytes\", cert->getCertLength());\n\n            prefs.putBytes(\"PK\", (uint8_t *)cert->getPKData(), cert->getPKLength());\n            prefs.putBytes(\"cert\", (uint8_t *)cert->getCertData(), cert->getCertLength());\n        }\n    }\n\n    isCertReady = true;\n\n    // Must delete self, can't just fall out\n    vTaskDelete(NULL);\n}\n\nvoid createSSLCert()\n{\n    if (isWifiAvailable() && !isCertReady) {\n        bool runLoop = false;\n\n        // Create a new process just to handle creating the cert.\n        //   This is a workaround for Bug: https://github.com/fhessel/esp32_https_server/issues/48\n        //  jm@casler.org (Oct 2020)\n        xTaskCreate(taskCreateCert, /* Task function. */\n                    \"createCert\",   /* String with name of task. */\n                    // 16384,          /* Stack size in bytes. */\n                    8192,  /* Stack size in bytes. */\n                    NULL,  /* Parameter passed as input of the task */\n                    16,    /* Priority of the task. */\n                    NULL); /* Task handle. */\n\n        LOG_DEBUG(\"Waiting for SSL Cert to be generated\");\n        while (!isCertReady) {\n            if ((millis() / 500) % 2) {\n                if (runLoop) {\n                    LOG_DEBUG(\".\");\n\n                    yield();\n                    esp_task_wdt_reset();\n#if HAS_SCREEN\n                    if (millis() / 1000 >= 3) {\n                        if (screen)\n                            screen->setSSLFrames();\n                    }\n#endif\n                }\n                runLoop = false;\n            } else {\n                runLoop = true;\n            }\n        }\n        LOG_INFO(\"SSL Cert Ready!\");\n    }\n}\n\nWebServerThread *webServerThread;\n\nWebServerThread::WebServerThread() : concurrency::OSThread(\"WebServer\")\n{\n    if (!config.network.wifi_enabled && !config.network.eth_enabled) {\n        disable();\n    }\n    lastActivityTime = millis();\n}\n\nvoid WebServerThread::markActivity()\n{\n    lastActivityTime = millis();\n}\n\nint32_t WebServerThread::getAdaptiveInterval()\n{\n    uint32_t currentTime = millis();\n    uint32_t timeSinceActivity;\n\n    if (currentTime >= lastActivityTime) {\n        timeSinceActivity = currentTime - lastActivityTime;\n    } else {\n        timeSinceActivity = (UINT32_MAX - lastActivityTime) + currentTime + 1;\n    }\n\n    if (timeSinceActivity < ACTIVE_THRESHOLD_MS) {\n        return ACTIVE_INTERVAL_MS;\n    } else if (timeSinceActivity < MEDIUM_THRESHOLD_MS) {\n        return MEDIUM_INTERVAL_MS;\n    } else {\n        return IDLE_INTERVAL_MS;\n    }\n}\n\nint32_t WebServerThread::runOnce()\n{\n    if (!config.network.wifi_enabled && !config.network.eth_enabled) {\n        disable();\n    }\n\n    handleWebResponse();\n\n    if (requestRestart && (millis() / 1000) > requestRestart) {\n        ESP.restart();\n    }\n\n    return getAdaptiveInterval();\n}\n\nvoid initWebServer()\n{\n    LOG_DEBUG(\"Init Web Server\");\n\n    // We can now use the new certificate to setup our server as usual.\n    secureServer = new HTTPSServer(cert, 443, MAX_HTTPS_CONNECTIONS);\n    insecureServer = new HTTPServer();\n\n    registerHandlers(insecureServer, secureServer);\n\n    if (secureServer) {\n        LOG_INFO(\"Start Secure Web Server\");\n        secureServer->start();\n    }\n    LOG_INFO(\"Start Insecure Web Server\");\n    insecureServer->start();\n    if (insecureServer->isRunning()) {\n        LOG_INFO(\"Web Servers Ready! :-) \");\n        isWebServerReady = true;\n    } else {\n        LOG_ERROR(\"Web Servers Failed! ;-( \");\n    }\n}\n#endif\n"
  },
  {
    "path": "src/mesh/http/WebServer.h",
    "content": "#pragma once\n\n#include \"PhoneAPI.h\"\n#include \"concurrency/OSThread.h\"\n#include <Arduino.h>\n#include <functional>\n\nvoid initWebServer();\nvoid createSSLCert();\n\nclass WebServerThread : private concurrency::OSThread\n{\n  private:\n    uint32_t lastActivityTime = 0;\n\n  public:\n    WebServerThread();\n    uint32_t requestRestart = 0;\n    void markActivity();\n\n  protected:\n    virtual int32_t runOnce() override;\n    int32_t getAdaptiveInterval();\n};\n\nextern WebServerThread *webServerThread;\n"
  },
  {
    "path": "src/mesh/mesh-pb-constants.cpp",
    "content": "#include \"configuration.h\"\n\n#include \"FSCommon.h\"\n#include \"SPILock.h\"\n#include \"mesh-pb-constants.h\"\n#include <Arduino.h>\n#include <pb_decode.h>\n#include <pb_encode.h>\n\n/// helper function for encoding a record as a protobuf, any failures to encode are fatal and we will panic\n/// returns the encoded packet size\nsize_t pb_encode_to_bytes(uint8_t *destbuf, size_t destbufsize, const pb_msgdesc_t *fields, const void *src_struct)\n{\n    pb_ostream_t stream = pb_ostream_from_buffer(destbuf, destbufsize);\n    if (!pb_encode(&stream, fields, src_struct)) {\n        LOG_ERROR(\"Panic: can't encode protobuf reason='%s'\", PB_GET_ERROR(&stream));\n        return 0;\n    } else {\n        return stream.bytes_written;\n    }\n}\n\n/// helper function for decoding a record as a protobuf, we will return false if the decoding failed\nbool pb_decode_from_bytes(const uint8_t *srcbuf, size_t srcbufsize, const pb_msgdesc_t *fields, void *dest_struct)\n{\n    pb_istream_t stream = pb_istream_from_buffer(srcbuf, srcbufsize);\n    if (!pb_decode(&stream, fields, dest_struct)) {\n        LOG_ERROR(\"Can't decode protobuf reason='%s', pb_msgdesc %p\", PB_GET_ERROR(&stream), fields);\n        return false;\n    } else {\n        return true;\n    }\n}\n\n#ifdef FSCom\n/// Read from an Arduino File\nbool readcb(pb_istream_t *stream, uint8_t *buf, size_t count)\n{\n    bool status = false;\n    File *file = (File *)stream->state;\n\n    if (buf == NULL) {\n        while (count-- && file->read() != EOF)\n            ;\n        return count == 0;\n    }\n\n    status = (file->read(buf, count) == (int)count);\n\n    if (file->available() == 0)\n        stream->bytes_left = 0;\n\n    return status;\n}\n\n/// Write to an arduino file\nbool writecb(pb_ostream_t *stream, const uint8_t *buf, size_t count)\n{\n    spiLock->lock();\n    auto file = (Print *)stream->state;\n    // LOG_DEBUG(\"writing %d bytes to protobuf file\", count);\n    bool status = file->write(buf, count) == count;\n    spiLock->unlock();\n    return status;\n}\n#endif\n\nbool is_in_helper(uint32_t n, const uint32_t *array, pb_size_t count)\n{\n    for (pb_size_t i = 0; i < count; i++)\n        if (array[i] == n)\n            return true;\n\n    return false;\n}"
  },
  {
    "path": "src/mesh/mesh-pb-constants.h",
    "content": "#pragma once\n#include <vector>\n\n#include \"mesh/generated/meshtastic/admin.pb.h\"\n#include \"mesh/generated/meshtastic/deviceonly.pb.h\"\n#include \"mesh/generated/meshtastic/localonly.pb.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n\n// this file defines constants which come from mesh.options\n\n// Tricky macro to let you find the sizeof a type member\n#define member_size(type, member) sizeof(((type *)0)->member)\n\n/// max number of packets which can be waiting for delivery to android - note, this value comes from mesh.options protobuf\n// FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in\n// RAM #define MAX_RX_TOPHONE (member_size(DeviceState, receive_queue) / member_size(DeviceState, receive_queue[0]))\n#ifndef MAX_RX_TOPHONE\n#if defined(ARCH_ESP32) && !(defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3))\n#define MAX_RX_TOPHONE 8\n#else\n#define MAX_RX_TOPHONE 32\n#endif\n#endif\n\n/// max number of QueueStatus packets which can be waiting for delivery to phone\n#ifndef MAX_RX_QUEUESTATUS_TOPHONE\n#define MAX_RX_QUEUESTATUS_TOPHONE 2\n#endif\n\n/// max number of MqttClientProxyMessage packets which can be waiting for delivery to phone\n#ifndef MAX_RX_MQTTPROXY_TOPHONE\n#define MAX_RX_MQTTPROXY_TOPHONE 8\n#endif\n\n/// max number of ClientNotification packets which can be waiting for delivery to phone\n#ifndef MAX_RX_NOTIFICATION_TOPHONE\n#define MAX_RX_NOTIFICATION_TOPHONE 2\n#endif\n\n/// Verify baseline assumption of node size. If it increases, we need to reevaluate\n/// the impact of its memory footprint, notably on MAX_NUM_NODES.\nstatic_assert(sizeof(meshtastic_NodeInfoLite) <= 200, \"NodeInfoLite size increased. Reconsider impact on MAX_NUM_NODES.\");\n\n/// max number of nodes allowed in the nodeDB\n#ifndef MAX_NUM_NODES\n#if defined(ARCH_STM32WL)\n#define MAX_NUM_NODES 10\n#elif defined(ARCH_NRF52)\n#define MAX_NUM_NODES 80\n#elif defined(CONFIG_IDF_TARGET_ESP32S3)\n#include \"Esp.h\"\nstatic inline int get_max_num_nodes()\n{\n    uint32_t flash_size = ESP.getFlashChipSize() / (1024 * 1024); // Convert Bytes to MB\n    if (flash_size >= 15) {\n        return 250;\n    } else if (flash_size >= 7) {\n        return 200;\n    } else {\n        return 100;\n    }\n}\n#define MAX_NUM_NODES get_max_num_nodes()\n#else\n#define MAX_NUM_NODES 100\n#endif\n#endif\n\n/// Max number of channels allowed\n#define MAX_NUM_CHANNELS (member_size(meshtastic_ChannelFile, channels) / member_size(meshtastic_ChannelFile, channels[0]))\n\n// Traffic Management module configuration\n// Enable per-variant by defining HAS_TRAFFIC_MANAGEMENT=1 in variant.h\n#ifndef HAS_TRAFFIC_MANAGEMENT\n#define HAS_TRAFFIC_MANAGEMENT 0\n#endif\n\n// Cache size for traffic management (number of nodes to track)\n// Can be overridden per-variant based on available memory\n#ifndef TRAFFIC_MANAGEMENT_CACHE_SIZE\n#if HAS_TRAFFIC_MANAGEMENT\n#define TRAFFIC_MANAGEMENT_CACHE_SIZE 1000\n#else\n#define TRAFFIC_MANAGEMENT_CACHE_SIZE 0\n#endif\n#endif\n\n/// helper function for encoding a record as a protobuf, any failures to encode are fatal and we will panic\n/// returns the encoded packet size\nsize_t pb_encode_to_bytes(uint8_t *destbuf, size_t destbufsize, const pb_msgdesc_t *fields, const void *src_struct);\n\n/// helper function for decoding a record as a protobuf, we will return false if the decoding failed\nbool pb_decode_from_bytes(const uint8_t *srcbuf, size_t srcbufsize, const pb_msgdesc_t *fields, void *dest_struct);\n\n/// Read from an Arduino File\nbool readcb(pb_istream_t *stream, uint8_t *buf, size_t count);\n\n/// Write to an arduino file\nbool writecb(pb_ostream_t *stream, const uint8_t *buf, size_t count);\n\n/** is_in_repeated is a macro/function that returns true if a specified word appears in a repeated protobuf array.\n * It relies on the following naming conventions from nanopb:\n *\n * pb_size_t ignore_incoming_count;\n * uint32_t ignore_incoming[3];\n */\nbool is_in_helper(uint32_t n, const uint32_t *array, pb_size_t count);\n\n#define is_in_repeated(name, n) is_in_helper(n, name, name##_count)\n"
  },
  {
    "path": "src/mesh/raspihttp/PiWebServer.cpp",
    "content": "/*\nAdds a WebServer and WebService callbacks to meshtastic as Linux Version. The WebServer & Webservices\nruns in a real linux thread beside the portdunio threading emulation. It replaces the complete ESP32\nWebserver libs including generation of SSL certifcicates,  because the use ESP specific details in\nthe lib that can't be emulated.\n\nThe WebServices adapt to the two major phoneapi functions \"handleAPIv1FromRadio,handleAPIv1ToRadio\"\nThe WebServer just adds basaic support to deliver WebContent, so it can be used to\ndeliver the WebGui definded by the WebClient Project.\n\nSteps to get it running:\n1.) Add these Linux Libs to the compile and target machine:\n\n    sudo apt update && \\\n        apt -y install openssl libssl-dev libopenssl libsdl2-dev \\\n                     libulfius-dev liborcania-dev\n\n2.) Configure the root directory of the web Content in the config.yaml file.\n    The followinng tags should be included and set at your needs\n\n    Example entry in the config.yaml\n    Webserver:\n        Port: 9001 # Port for Webserver & Webservices\n        RootPath: /home/marc/web # Root Dir of WebServer\n\n3.) Checkout the web project\n    https://github.com/meshtastic/web.git\n\n    Build it and copy the content of the folder web/dist/* to the folder you did set as \"RootPath\"\n\n!!!The WebServer should not be used as production system or exposed to the Internet. Its a raw basic version!!!\n\nAuthor: Marc Philipp Hammermann\nmail:   marchammermann@googlemail.com\n\n*/\n#ifdef PORTDUINO_LINUX_HARDWARE\n#if __has_include(<ulfius.h>)\n#include \"PiWebServer.h\"\n#include \"NodeDB.h\"\n#include \"PhoneAPI.h\"\n#include \"PowerFSM.h\"\n#include \"RadioLibInterface.h\"\n#include \"airtime.h\"\n#include \"graphics/Screen.h\"\n#include \"main.h\"\n#include \"mesh/wifi/WiFiAPClient.h\"\n#include \"sleep.h\"\n#include <openssl/bn.h>\n#include <openssl/evp.h>\n#include <openssl/pem.h>\n#include <openssl/rsa.h>\n#include <openssl/x509.h>\n#include <orcania.h>\n#include <string.h>\n#include <ulfius.h>\n#include <yder.h>\n\n#include <cstring>\n#include <string>\n\n#include \"PortduinoFS.h\"\n#include \"platform/portduino/PortduinoGlue.h\"\n\n#define DEFAULT_REALM \"default_realm\"\n#define PREFIX \"\"\n\n#define KEY_PATH portduino_config.webserver_ssl_key_path.c_str()\n#define CERT_PATH portduino_config.webserver_ssl_cert_path.c_str()\n\nstruct _file_config configWeb;\n\n// We need to specify some content-type mapping, so the resources get delivered with the\n// right content type and are displayed correctly in the browser\nchar contentTypes[][2][32] = {{\".txt\", \"text/plain\"},      {\".html\", \"text/html\"},\n                              {\".js\", \"text/javascript\"},  {\".png\", \"image/png\"},\n                              {\".jpg\", \"image/jpg\"},       {\".gz\", \"application/gzip\"},\n                              {\".gif\", \"image/gif\"},       {\".json\", \"application/json\"},\n                              {\".css\", \"text/css\"},        {\".ico\", \"image/vnd.microsoft.icon\"},\n                              {\".svg\", \"image/svg+xml\"},   {\".ts\", \"text/javascript\"},\n                              {\".tsx\", \"text/javascript\"}, {\"\", \"\"}};\n\n#undef str\n\nvolatile bool isWebServerReady;\nvolatile bool isCertReady;\n\nPiWebServerThread *piwebServerThread;\n\n/**\n * Return the filename extension\n */\nconst char *get_filename_ext(const char *path)\n{\n    const char *dot = strrchr(path, '.');\n    if (!dot || dot == path)\n        return \"*\";\n    if (strchr(dot, '?') != NULL) {\n        //*strchr(dot, '?') = '\\0';\n        const char *empty = \"\\0\";\n        return empty;\n    }\n    return dot;\n}\n\n/**\n * Streaming callback function to ease sending large files\n */\nstatic ssize_t callback_static_file_stream(void *cls, uint64_t pos, char *buf, size_t max)\n{\n    (void)(pos);\n    if (cls != NULL) {\n        return fread(buf, 1, max, (FILE *)cls);\n    } else {\n        return U_STREAM_END;\n    }\n}\n\n/**\n * Cleanup FILE* structure when streaming is complete\n */\nstatic void callback_static_file_stream_free(void *cls)\n{\n    if (cls != NULL) {\n        fclose((FILE *)cls);\n    }\n}\n\n/**\n * static file callback endpoint that delivers the content for WebServer calls\n */\nint callback_static_file(const struct _u_request *request, struct _u_response *response, void *user_data)\n{\n    size_t length;\n    FILE *f;\n    char *file_requested, *file_path, *url_dup_save, *real_path = NULL;\n    const char *content_type;\n\n    /*\n     * Comment this if statement if you don't access static files url from root dir, like /app\n     */\n    if (request->callback_position > 0) {\n        return U_CALLBACK_CONTINUE;\n    } else if (user_data != NULL && (configWeb.files_path != NULL)) {\n        file_requested = o_strdup(request->http_url);\n        url_dup_save = file_requested;\n\n        while (file_requested[0] == '/') {\n            file_requested++;\n        }\n        file_requested += o_strlen(configWeb.url_prefix);\n        while (file_requested[0] == '/') {\n            file_requested++;\n        }\n\n        if (strchr(file_requested, '#') != NULL) {\n            *strchr(file_requested, '#') = '\\0';\n        }\n\n        if (strchr(file_requested, '?') != NULL) {\n            *strchr(file_requested, '?') = '\\0';\n        }\n\n        if (file_requested == NULL || o_strlen(file_requested) == 0 || 0 == o_strcmp(\"/\", file_requested)) {\n            o_free(url_dup_save);\n            url_dup_save = file_requested = o_strdup(\"index.html\");\n        }\n\n        file_path = msprintf(\"%s/%s\", configWeb.files_path, file_requested);\n        real_path = realpath(file_path, NULL);\n        if (0 == o_strncmp(configWeb.files_path, real_path, o_strlen(configWeb.files_path))) {\n            if (access(file_path, F_OK) != -1) {\n                f = fopen(file_path, \"rb\");\n                if (f) {\n                    fseek(f, 0, SEEK_END);\n                    length = ftell(f);\n                    fseek(f, 0, SEEK_SET);\n\n                    content_type = u_map_get_case(&configWeb.mime_types, get_filename_ext(file_requested));\n                    if (content_type == NULL) {\n                        content_type = u_map_get(&configWeb.mime_types, \"*\");\n                        LOG_DEBUG(\"Static File Server - Unknown mime type for extension %s \", get_filename_ext(file_requested));\n                    }\n                    u_map_put(response->map_header, \"Content-Type\", content_type);\n                    u_map_copy_into(response->map_header, &configWeb.map_header);\n\n                    if (ulfius_set_stream_response(response, 200, callback_static_file_stream, callback_static_file_stream_free,\n                                                   length, STATIC_FILE_CHUNK, f) != U_OK) {\n                        LOG_DEBUG(\"callback_static_file - Error ulfius_set_stream_response\");\n                    }\n                }\n            } else {\n                if (configWeb.redirect_on_404 == NULL) {\n                    ulfius_set_string_body_response(response, 404, \"File not found\");\n                } else {\n                    ulfius_add_header_to_response(response, \"Location\", configWeb.redirect_on_404);\n                    response->status = 302;\n                }\n            }\n        } else {\n            if (configWeb.redirect_on_404 == NULL) {\n                ulfius_set_string_body_response(response, 404, \"File not found\");\n            } else {\n                ulfius_add_header_to_response(response, \"Location\", configWeb.redirect_on_404);\n                response->status = 302;\n            }\n        }\n\n        o_free(file_path);\n        o_free(url_dup_save);\n        free(real_path); // realpath uses malloc\n        return U_CALLBACK_CONTINUE;\n    } else {\n        LOG_DEBUG(\"Static File Server - Error, user_data is NULL or inconsistent\");\n        return U_CALLBACK_ERROR;\n    }\n}\n\nstatic void handleWebResponse() {}\n\n/*\n * Adapt the radioapi to the Webservice handleAPIv1ToRadio\n * Trigger : WebGui(SAVE)->WebServcice->phoneApi\n */\nint handleAPIv1ToRadio(const struct _u_request *req, struct _u_response *res, void *user_data)\n{\n    LOG_DEBUG(\"handleAPIv1ToRadio web -> radio  \");\n\n    ulfius_add_header_to_response(res, \"Content-Type\", \"application/x-protobuf\");\n    ulfius_add_header_to_response(res, \"Access-Control-Allow-Headers\", \"Content-Type\");\n    ulfius_add_header_to_response(res, \"Access-Control-Allow-Origin\", \"*\");\n    ulfius_add_header_to_response(res, \"Access-Control-Allow-Methods\", \"PUT, OPTIONS\");\n    ulfius_add_header_to_response(res, \"X-Protobuf-Schema\",\n                                  \"https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto\");\n\n    if (strcmp(req->http_verb, \"OPTIONS\") == 0) {\n        ulfius_set_response_properties(res, U_OPT_STATUS, 204);\n        return U_CALLBACK_COMPLETE;\n    }\n\n    byte buffer[MAX_TO_FROM_RADIO_SIZE];\n    size_t s = req->binary_body_length;\n\n    memcpy(buffer, req->binary_body, MAX_TO_FROM_RADIO_SIZE);\n\n    // FIXME* Problem with portdunio loosing mountpoint maybe because of running in a real sep. thread\n\n    portduinoVFS->mountpoint(configWeb.rootPath);\n\n    LOG_DEBUG(\"Received %d bytes from PUT request\", s);\n    static_cast<HttpAPI *>(user_data)->handleToRadio(buffer, s);\n    LOG_DEBUG(\"end web->radio  \");\n    return U_CALLBACK_COMPLETE;\n}\n\n/*\n * Adapt the radioapi to the Webservice handleAPIv1FromRadio\n * Trigger : WebGui(POLL)->handleAPIv1FromRadio->phoneapi->Meshtastic(Radio) events\n */\nint handleAPIv1FromRadio(const struct _u_request *req, struct _u_response *res, void *user_data)\n{\n\n    // LOG_DEBUG(\"handleAPIv1FromRadio radio -> web\");\n    std::string valueAll;\n\n    // Status code is 200 OK by default.\n    ulfius_add_header_to_response(res, \"Content-Type\", \"application/x-protobuf\");\n    ulfius_add_header_to_response(res, \"Access-Control-Allow-Origin\", \"*\");\n    ulfius_add_header_to_response(res, \"Access-Control-Allow-Methods\", \"GET\");\n    ulfius_add_header_to_response(res, \"X-Protobuf-Schema\",\n                                  \"https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto\");\n\n    if (strcmp(req->http_verb, \"OPTIONS\") == 0) {\n        ulfius_set_response_properties(res, U_OPT_STATUS, 204);\n        return U_CALLBACK_COMPLETE;\n    }\n\n    uint8_t txBuf[MAX_STREAM_BUF_SIZE];\n    uint32_t len = 1;\n\n    if (valueAll == \"true\") {\n        while (len) {\n            len = static_cast<HttpAPI *>(user_data)->getFromRadio(txBuf);\n            ulfius_set_response_properties(res, U_OPT_STATUS, 200, U_OPT_BINARY_BODY, txBuf, len);\n            const char *tmpa = (const char *)txBuf;\n            ulfius_set_string_body_response(res, 200, tmpa);\n            // LOG_DEBUG(\"\\n----webAPI response all:----\");\n            // LOG_DEBUG(tmpa);\n            // LOG_DEBUG(\"\");\n        }\n        // Otherwise, just return one protobuf\n    } else {\n        len = static_cast<HttpAPI *>(user_data)->getFromRadio(txBuf);\n        const char *tmpa = (const char *)txBuf;\n        ulfius_set_binary_body_response(res, 200, tmpa, len);\n        // LOG_DEBUG(\"\\n----webAPI response:\");\n        // LOG_DEBUG(tmpa);\n        // LOG_DEBUG(\"\");\n    }\n\n    // LOG_DEBUG(\"end radio->web\", len);\n    return U_CALLBACK_COMPLETE;\n}\n\n/*\nOpenSSL RSA Key Gen\n*/\nint generate_rsa_key(EVP_PKEY **pkey)\n{\n    EVP_PKEY_CTX *pkey_ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL);\n    if (!pkey_ctx)\n        return -1;\n    if (EVP_PKEY_keygen_init(pkey_ctx) <= 0)\n        return -1;\n    if (EVP_PKEY_CTX_set_rsa_keygen_bits(pkey_ctx, 2048) <= 0)\n        return -1;\n    if (EVP_PKEY_keygen(pkey_ctx, pkey) <= 0)\n        return -1;\n    EVP_PKEY_CTX_free(pkey_ctx);\n    return 0; // SUCCESS\n}\n\nint generate_self_signed_x509(EVP_PKEY *pkey, X509 **x509)\n{\n    *x509 = X509_new();\n    if (!*x509)\n        return -1;\n    if (X509_set_version(*x509, 2) != 1)\n        return -1;\n    ASN1_INTEGER_set(X509_get_serialNumber(*x509), 1);\n    X509_gmtime_adj(X509_get_notBefore(*x509), 0);\n    X509_gmtime_adj(X509_get_notAfter(*x509), 31536000L); // 1 YEAR ACCESS\n\n    X509_set_pubkey(*x509, pkey);\n\n    // SET Subject Name\n    X509_NAME *name = X509_get_subject_name(*x509);\n    X509_NAME_add_entry_by_txt(name, \"C\", MBSTRING_ASC, (unsigned char *)\"DE\", -1, -1, 0);\n    X509_NAME_add_entry_by_txt(name, \"O\", MBSTRING_ASC, (unsigned char *)\"Meshtastic\", -1, -1, 0);\n    X509_NAME_add_entry_by_txt(name, \"CN\", MBSTRING_ASC, (unsigned char *)\"meshtastic.local\", -1, -1, 0);\n    // Selfsigned,  Issuer = Subject\n    X509_set_issuer_name(*x509, name);\n\n    // Certificate signed with our privte key\n    if (X509_sign(*x509, pkey, EVP_sha256()) <= 0)\n        return -1;\n\n    return 0;\n}\n\nchar *read_file_into_string(const char *filename)\n{\n    FILE *file = fopen(filename, \"rb\");\n    if (file == NULL) {\n        LOG_ERROR(\"Error reading File : %s \", filename);\n        return NULL;\n    }\n\n    // Size of file\n    fseek(file, 0, SEEK_END);\n    long filesize = ftell(file);\n    rewind(file);\n\n    // reserve mem for file + 1 byte\n    char *buffer = (char *)malloc(filesize + 1);\n    if (buffer == NULL) {\n        LOG_ERROR(\"Malloc of mem failed for file : %s \", filename);\n        fclose(file);\n        return NULL;\n    }\n\n    // read content\n    size_t readSize = fread(buffer, 1, filesize, file);\n    if (readSize != filesize) {\n        LOG_ERROR(\"Error reading file into buffer\");\n        free(buffer);\n        fclose(file);\n        return NULL;\n    }\n\n    // add terminator sign at the end\n    buffer[filesize] = '\\0';\n    fclose(file);\n    return buffer; // return pointer\n}\n\nint PiWebServerThread::CheckSSLandLoad()\n{\n    // read certificate\n    cert_pem = read_file_into_string(CERT_PATH);\n    if (cert_pem == NULL) {\n        LOG_ERROR(\"ERROR SSL Certificate File can't be loaded or is missing\");\n        return 1;\n    }\n    // read private key\n    key_pem = read_file_into_string(KEY_PATH);\n    if (key_pem == NULL) {\n        LOG_ERROR(\"ERROR file private_key can't be loaded or is missing\");\n        return 2;\n    }\n\n    return 0;\n}\n\nint PiWebServerThread::CreateSSLCertificate()\n{\n\n    EVP_PKEY *pkey = NULL;\n    X509 *x509 = NULL;\n\n    if (generate_rsa_key(&pkey) != 0) {\n        LOG_ERROR(\"Error generating RSA-Key\");\n        return 1;\n    }\n\n    if (generate_self_signed_x509(pkey, &x509) != 0) {\n        LOG_ERROR(\"Error generating X509-Cert\");\n        return 2;\n    }\n\n    // Open file to write private key file\n    FILE *pkey_file = fopen(KEY_PATH, \"wb\");\n    if (!pkey_file) {\n        LOG_ERROR(\"Error opening private key file\");\n        return 3;\n    }\n    // write private key file\n    PEM_write_PrivateKey(pkey_file, pkey, NULL, NULL, 0, NULL, NULL);\n    fclose(pkey_file);\n\n    // open Certificate file\n    FILE *x509_file = fopen(CERT_PATH, \"wb\");\n    if (!x509_file) {\n        LOG_ERROR(\"Error opening cert\");\n        return 4;\n    }\n    // write certificate\n    PEM_write_X509(x509_file, x509);\n    fclose(x509_file);\n\n    EVP_PKEY_free(pkey);\n    LOG_INFO(\"Create SSL Key %s successful\", KEY_PATH);\n    X509_free(x509);\n    LOG_INFO(\"Create SSL Cert %s successful\", CERT_PATH);\n    return 0;\n}\n\nvoid initWebServer() {}\n\nPiWebServerThread::PiWebServerThread()\n{\n    int ret, retssl, webservport;\n\n    if (CheckSSLandLoad() != 0) {\n        CreateSSLCertificate();\n        if (CheckSSLandLoad() != 0) {\n            LOG_ERROR(\"Major Error Gen & Read SSL Certificate\");\n        }\n    }\n\n    if (portduino_config.webserverport != 0) {\n        webservport = portduino_config.webserverport;\n        LOG_INFO(\"Use webserver port from yaml config %i \", webservport);\n    } else {\n        LOG_INFO(\"Webserver port in yaml config set to 0, defaulting to port 9443\");\n        webservport = 9443;\n    }\n\n    // Web Content Service Instance\n    if (ulfius_init_instance(&instanceWeb, webservport, NULL, DEFAULT_REALM) != U_OK) {\n        LOG_ERROR(\"Webserver couldn't be started, abort execution\");\n    } else {\n\n        LOG_INFO(\"Webserver started\");\n        u_map_init(&configWeb.mime_types);\n        u_map_put(&configWeb.mime_types, \"*\", \"application/octet-stream\");\n        u_map_put(&configWeb.mime_types, \".html\", \"text/html\");\n        u_map_put(&configWeb.mime_types, \".htm\", \"text/html\");\n        u_map_put(&configWeb.mime_types, \".tsx\", \"application/javascript\");\n        u_map_put(&configWeb.mime_types, \".ts\", \"application/javascript\");\n        u_map_put(&configWeb.mime_types, \".css\", \"text/css\");\n        u_map_put(&configWeb.mime_types, \".js\", \"application/javascript\");\n        u_map_put(&configWeb.mime_types, \".json\", \"application/json\");\n        u_map_put(&configWeb.mime_types, \".png\", \"image/png\");\n        u_map_put(&configWeb.mime_types, \".gif\", \"image/gif\");\n        u_map_put(&configWeb.mime_types, \".jpeg\", \"image/jpeg\");\n        u_map_put(&configWeb.mime_types, \".jpg\", \"image/jpeg\");\n        u_map_put(&configWeb.mime_types, \".ttf\", \"font/ttf\");\n        u_map_put(&configWeb.mime_types, \".woff\", \"font/woff\");\n        u_map_put(&configWeb.mime_types, \".ico\", \"image/x-icon\");\n        u_map_put(&configWeb.mime_types, \".svg\", \"image/svg+xml\");\n\n        webrootpath = portduino_config.webserver_root_path;\n\n        configWeb.files_path = (char *)webrootpath.c_str();\n        configWeb.url_prefix = \"\";\n        configWeb.rootPath = strdup(portduinoVFS->mountpoint());\n\n        u_map_put(instanceWeb.default_headers, \"Access-Control-Allow-Origin\", \"*\");\n        // Maximum body size sent by the client is 1 Kb\n        instanceWeb.max_post_body_size = 1024;\n        ulfius_add_endpoint_by_val(&instanceWeb, \"GET\", PREFIX, \"/api/v1/fromradio/*\", 1, &handleAPIv1FromRadio, &webAPI);\n        ulfius_add_endpoint_by_val(&instanceWeb, \"OPTIONS\", PREFIX, \"/api/v1/fromradio/*\", 1, &handleAPIv1FromRadio, &webAPI);\n        ulfius_add_endpoint_by_val(&instanceWeb, \"PUT\", PREFIX, \"/api/v1/toradio/*\", 1, &handleAPIv1ToRadio, &webAPI);\n        ulfius_add_endpoint_by_val(&instanceWeb, \"OPTIONS\", PREFIX, \"/api/v1/toradio/*\", 1, &handleAPIv1ToRadio, &webAPI);\n\n        // Add callback function to all endpoints for the Web Server\n        ulfius_add_endpoint_by_val(&instanceWeb, \"GET\", NULL, \"/*\", 2, &callback_static_file, &configWeb);\n\n        // thats for serving without SSL\n        // retssl = ulfius_start_framework(&instanceWeb);\n\n        // thats for serving with SSL\n        retssl = ulfius_start_secure_framework(&instanceWeb, key_pem, cert_pem);\n\n        if (retssl == U_OK) {\n            LOG_INFO(\"Web Server framework started on port: %i \", webservport);\n            LOG_INFO(\"Web Server root %s\", (char *)webrootpath.c_str());\n        } else {\n            LOG_ERROR(\"Error starting Web Server framework, error number: %d\", retssl);\n        }\n    }\n}\n\nPiWebServerThread::~PiWebServerThread()\n{\n    u_map_clean(&configWeb.mime_types);\n\n    ulfius_stop_framework(&instanceWeb);\n    ulfius_clean_instance(&instanceWeb);\n    free(configWeb.rootPath);\n    free(key_pem);\n    free(cert_pem);\n    LOG_INFO(\"End framework\");\n}\n\n#endif\n#endif"
  },
  {
    "path": "src/mesh/raspihttp/PiWebServer.h",
    "content": "#pragma once\n#ifdef PORTDUINO_LINUX_HARDWARE\n#if __has_include(<ulfius.h>)\n#include \"PhoneAPI.h\"\n#include \"ulfius-cfg.h\"\n#include \"ulfius.h\"\n#include <Arduino.h>\n#include <functional>\n\n#define STATIC_FILE_CHUNK 256\n\nvoid initWebServer();\nvoid createSSLCert();\nint callback_static_file(const struct _u_request *request, struct _u_response *response, void *user_data);\nconst char *get_filename_ext(const char *path);\n\nstruct _file_config {\n    char *files_path;\n    char *url_prefix;\n    struct _u_map mime_types;\n    struct _u_map map_header;\n    char *redirect_on_404;\n    char *rootPath;\n};\n\nclass HttpAPI : public PhoneAPI\n{\n\n  public:\n    HttpAPI() { api_type = TYPE_HTTP; }\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() override { return true; } // FIXME, be smarter about this\n\n  private:\n    // Nothing here yet\n\n  protected:\n};\n\nclass PiWebServerThread\n{\n  private:\n    char *key_pem = NULL;\n    char *cert_pem = NULL;\n    // struct _u_map mime_types;\n    std::string webrootpath;\n    HttpAPI webAPI;\n\n  public:\n    PiWebServerThread();\n    ~PiWebServerThread();\n    int CreateSSLCertificate();\n    int CheckSSLandLoad();\n    uint32_t requestRestart = 0;\n    struct _u_instance instanceWeb;\n};\n\nextern PiWebServerThread *piwebServerThread;\n\n#endif\n#endif"
  },
  {
    "path": "src/mesh/udp/UdpMulticastHandler.h",
    "content": "#pragma once\n#if HAS_UDP_MULTICAST\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"mesh/Router.h\"\n\n#if HAS_ETHERNET && defined(ARCH_NRF52)\n#include \"mesh/eth/ethClient.h\"\n#else\n#include <WiFi.h>\n#endif\n\n#include <AsyncUDP.h>\n\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n\n#define UDP_MULTICAST_DEFAUL_PORT 4403 // Default port for UDP multicast is same as TCP api server\n\nclass UdpMulticastHandler final\n{\n  public:\n    UdpMulticastHandler() : isRunning(false) { udpIpAddress = IPAddress(224, 0, 0, 69); }\n\n    void start()\n    {\n        if (isRunning) {\n            LOG_DEBUG(\"UDP multicast already running\");\n            return;\n        }\n        if (udp.listenMulticast(udpIpAddress, UDP_MULTICAST_DEFAUL_PORT, 64)) {\n#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO)\n            LOG_DEBUG(\"UDP Listening on IP: %u.%u.%u.%u:%u\", udpIpAddress[0], udpIpAddress[1], udpIpAddress[2], udpIpAddress[3],\n                      UDP_MULTICAST_DEFAUL_PORT);\n#else\n            LOG_DEBUG(\"UDP Listening on IP: %s\", WiFi.localIP().toString().c_str());\n#endif\n            udp.onPacket([this](AsyncUDPPacket packet) { onReceive(packet); });\n            isRunning = true;\n        } else {\n            LOG_DEBUG(\"Failed to listen on UDP\");\n        }\n    }\n\n    void stop()\n    {\n        if (!isRunning) {\n            return;\n        }\n        LOG_DEBUG(\"Stopping UDP multicast\");\n#if defined(ARCH_ESP32) || defined(ARCH_NRF52)\n        udp.close();\n#endif\n        isRunning = false;\n    }\n\n    void onReceive(AsyncUDPPacket &packet)\n    {\n        if (!isRunning) {\n            return;\n        }\n        size_t packetLength = packet.length();\n#if defined(ARCH_NRF52)\n        IPAddress ip = packet.remoteIP();\n        LOG_DEBUG(\"UDP broadcast from: %u.%u.%u.%u, len=%u\", ip[0], ip[1], ip[2], ip[3], packetLength);\n#elif !defined(ARCH_PORTDUINO)\n        // FIXME(PORTDUINO): arduino lacks IPAddress::toString()\n        LOG_DEBUG(\"UDP broadcast from: %s, len=%u\", packet.remoteIP().toString().c_str(), packetLength);\n#endif\n        meshtastic_MeshPacket mp = meshtastic_MeshPacket_init_zero;\n        LOG_DEBUG(\"Decoding MeshPacket from UDP len=%u\", packetLength);\n        bool isPacketDecoded = pb_decode_from_bytes(packet.data(), packetLength, &meshtastic_MeshPacket_msg, &mp);\n        if (isPacketDecoded && router && mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag) {\n            // Drop packets with spoofed local origin — no legitimate LAN node should send from=0 or our own nodeNum\n            if (isFromUs(&mp)) {\n                LOG_WARN(\"UDP packet with spoofed local from=0x%x, dropping\", mp.from);\n                return;\n            }\n            mp.transport_mechanism = meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MULTICAST_UDP;\n            UniquePacketPoolPacket p = packetPool.allocUniqueCopy(mp);\n            // Unset received SNR/RSSI\n            p->rx_snr = 0;\n            p->rx_rssi = 0;\n            router->enqueueReceivedMessage(p.release());\n        }\n    }\n\n    bool onSend(const meshtastic_MeshPacket *mp)\n    {\n        if (!isRunning || !mp || !udp) {\n            return false;\n        }\n#if defined(ARCH_NRF52)\n        if (!isEthernetAvailable()) {\n            return false;\n        }\n#elif !defined(ARCH_PORTDUINO)\n        if (WiFi.status() != WL_CONNECTED) {\n            return false;\n        }\n#endif\n        if (mp->transport_mechanism == meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MULTICAST_UDP) {\n            LOG_ERROR(\"Attempt to send UDP sourced packet over UDP\");\n        }\n        LOG_DEBUG(\"Broadcasting packet over UDP (id=%u)\", mp->id);\n        uint8_t buffer[meshtastic_MeshPacket_size];\n        size_t encodedLength = pb_encode_to_bytes(buffer, sizeof(buffer), &meshtastic_MeshPacket_msg, mp);\n        return udp.writeTo(buffer, encodedLength, udpIpAddress, UDP_MULTICAST_DEFAUL_PORT);\n    }\n\n  private:\n    IPAddress udpIpAddress;\n    AsyncUDP udp;\n    bool isRunning;\n};\n#endif // HAS_UDP_MULTICAST\n"
  },
  {
    "path": "src/mesh/wifi/WiFiAPClient.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_WIFI\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"concurrency/Periodic.h\"\n#include \"mesh/wifi/WiFiAPClient.h\"\n\n#include \"main.h\"\n#include \"mesh/api/WiFiServerAPI.h\"\n#include \"target_specific.h\"\n#include <WiFi.h>\n\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n\n#include <WiFiUdp.h>\n#ifdef ARCH_ESP32\n#if !MESHTASTIC_EXCLUDE_WEBSERVER\n#include \"mesh/http/WebServer.h\"\n#endif\n#include <ESPmDNS.h>\n#include <esp_wifi.h>\nstatic void WiFiEvent(WiFiEvent_t event);\n#elif defined(ARCH_RP2040)\n#include <SimpleMDNS.h>\n#endif\n\n#ifndef DISABLE_NTP\n#include \"Throttle.h\"\n#include <NTPClient.h>\n#endif\n\nusing namespace concurrency;\n\n// NTP\nWiFiUDP ntpUDP;\n\n#ifndef DISABLE_NTP\nNTPClient timeClient(ntpUDP, config.network.ntp_server);\n#endif\n\nuint8_t wifiDisconnectReason = 0;\n\n// Stores our hostname\nchar ourHost[16];\n\n// To replace blocking wifi connect delay with a non-blocking sleep\nstatic unsigned long wifiReconnectStartMillis = 0;\nstatic bool wifiReconnectPending = false;\n\nbool APStartupComplete = 0;\n\nunsigned long lastrun_ntp = 0;\n\nbool needReconnect = true;   // If we create our reconnector, run it once at the beginning\nbool isReconnecting = false; // If we are currently reconnecting\n\nWiFiUDP syslogClient;\nmeshtastic::Syslog syslog(syslogClient);\n\nPeriodic *wifiReconnect;\n\n#ifdef USE_WS5500\n// Startup Ethernet\nbool initEthernet()\n{\n    if ((config.network.eth_enabled) && (ETH.begin(ETH_PHY_W5500, 1, ETH_CS_PIN, ETH_INT_PIN, ETH_RST_PIN, SPI3_HOST,\n                                                   ETH_SCLK_PIN, ETH_MISO_PIN, ETH_MOSI_PIN))) {\n        WiFi.onEvent(WiFiEvent);\n#if !MESHTASTIC_EXCLUDE_WEBSERVER\n        createSSLCert(); // For WebServer\n#endif\n        return true;\n    }\n\n    return false;\n}\n#endif\n\nstatic void onNetworkConnected()\n{\n    if (!APStartupComplete) {\n        // Start web server\n        LOG_INFO(\"Start network services\");\n\n        // start mdns\n        if (!MDNS.begin(\"Meshtastic\")) {\n            LOG_ERROR(\"Error setting up mDNS responder!\");\n        } else {\n            LOG_INFO(\"mDNS Host: Meshtastic.local\");\n            MDNS.addService(\"meshtastic\", \"tcp\", SERVER_API_DEFAULT_PORT);\n// ESPmDNS (ESP32) and SimpleMDNS (RP2040) have slightly different APIs for adding TXT records\n#ifdef ARCH_ESP32\n            MDNS.addServiceTxt(\"meshtastic\", \"tcp\", \"shortname\", String(owner.short_name));\n            MDNS.addServiceTxt(\"meshtastic\", \"tcp\", \"id\", String(nodeDB->getNodeId().c_str()));\n            MDNS.addServiceTxt(\"meshtastic\", \"tcp\", \"pio_env\", optstr(APP_ENV));\n            // ESP32 prints obtained IP address in WiFiEvent\n#elif defined(ARCH_RP2040)\n            MDNS.addServiceTxt(\"meshtastic\", \"shortname\", owner.short_name);\n            MDNS.addServiceTxt(\"meshtastic\", \"id\", nodeDB->getNodeId().c_str());\n            MDNS.addServiceTxt(\"meshtastic\", \"pio_env\", optstr(APP_ENV));\n            LOG_INFO(\"Obtained IP address: %s\", WiFi.localIP().toString().c_str());\n#endif\n        }\n\n#ifndef DISABLE_NTP\n        LOG_INFO(\"Start NTP time client\");\n        timeClient.begin();\n        timeClient.setUpdateInterval(60 * 60); // Update once an hour\n#endif\n\n        if (config.network.rsyslog_server[0]) {\n            LOG_INFO(\"Start Syslog client\");\n            // Defaults\n            int serverPort = 514;\n            const char *serverAddr = config.network.rsyslog_server;\n            String server = String(serverAddr);\n            int delimIndex = server.indexOf(':');\n            if (delimIndex > 0) {\n                String port = server.substring(delimIndex + 1, server.length());\n                server[delimIndex] = 0;\n                serverPort = port.toInt();\n                serverAddr = server.c_str();\n            }\n            syslog.server(serverAddr, serverPort);\n            syslog.deviceHostname(getDeviceName());\n            syslog.appName(\"Meshtastic\");\n            syslog.defaultPriority(LOGLEVEL_USER);\n            syslog.enable();\n        }\n\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER\n        if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n            initWebServer();\n        }\n#endif\n#if !MESHTASTIC_EXCLUDE_SOCKETAPI\n        if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n            initApiServer();\n        }\n#endif\n        APStartupComplete = true;\n    }\n\n#if HAS_UDP_MULTICAST\n    if (udpHandler && config.network.enabled_protocols & meshtastic_Config_NetworkConfig_ProtocolFlags_UDP_BROADCAST) {\n        udpHandler->start();\n    }\n#endif\n}\n\nstatic int32_t reconnectWiFi()\n{\n    const char *wifiName = config.network.wifi_ssid;\n    const char *wifiPsw = config.network.wifi_psk;\n\n    if (config.network.wifi_enabled && needReconnect) {\n\n        if (!*wifiPsw) // Treat empty password as no password\n            wifiPsw = NULL;\n\n        needReconnect = false;\n        isReconnecting = true;\n\n        // Make sure we clear old connection credentials\n#ifdef ARCH_ESP32\n        WiFi.disconnect(false, true);\n#elif defined(ARCH_RP2040)\n        WiFi.disconnect(false);\n#endif\n        LOG_INFO(\"Reconnecting to WiFi access point %s\", wifiName);\n\n        // Start the non-blocking wait for 5 seconds\n        wifiReconnectStartMillis = millis();\n        wifiReconnectPending = true;\n        // Do not attempt to connect yet, wait for the next invocation\n        return 5000; // Schedule next check soon\n    }\n\n    // Check if we are ready to proceed with the WiFi connection after the 5s wait\n    if (wifiReconnectPending) {\n        if (millis() - wifiReconnectStartMillis >= 5000) {\n            if (!WiFi.isConnected()) {\n#ifdef CONFIG_IDF_TARGET_ESP32C3\n                WiFi.mode(WIFI_MODE_NULL);\n                WiFi.useStaticBuffers(true);\n                WiFi.mode(WIFI_STA);\n#endif\n                WiFi.begin(wifiName, wifiPsw);\n            }\n            isReconnecting = false;\n            wifiReconnectPending = false;\n        } else {\n            // Still waiting for 5s to elapse\n            return 100; // Check again soon\n        }\n    }\n\n#ifndef DISABLE_NTP\n    if (WiFi.isConnected() && (!Throttle::isWithinTimespanMs(lastrun_ntp, 43200000) || (lastrun_ntp == 0))) { // every 12 hours\n        LOG_DEBUG(\"Update NTP time from %s\", config.network.ntp_server);\n        if (timeClient.update()) {\n            LOG_DEBUG(\"NTP Request Success - Setting RTCQualityNTP if needed\");\n\n            struct timeval tv;\n            tv.tv_sec = timeClient.getEpochTime();\n            tv.tv_usec = 0;\n\n            perhapsSetRTC(RTCQualityNTP, &tv);\n            lastrun_ntp = millis();\n        } else {\n            LOG_DEBUG(\"NTP Update failed\");\n        }\n    }\n#endif\n\n    if (config.network.wifi_enabled && !WiFi.isConnected()) {\n#ifdef ARCH_RP2040 // (ESP32 handles this in WiFiEvent)\n        needReconnect = APStartupComplete;\n#endif\n        return 1000; // check once per second\n    } else {\n#ifdef ARCH_RP2040\n        onNetworkConnected(); // will only do anything once\n#endif\n        return 300000; // every 5 minutes\n    }\n}\n\nbool isWifiAvailable()\n{\n\n    if (config.network.wifi_enabled && (config.network.wifi_ssid[0])) {\n        return true;\n#ifdef USE_WS5500\n    } else if (config.network.eth_enabled) {\n        return true;\n#endif\n#ifndef ARCH_PORTDUINO\n    } else if (WiFi.status() == WL_CONNECTED) {\n        // it's likely we have wifi now, but user intends to turn it off in config!\n        return true;\n#endif\n    } else {\n        return false;\n    }\n}\n\n// Disable WiFi\nvoid deinitWifi()\n{\n    LOG_INFO(\"WiFi deinit\");\n\n    if (isWifiAvailable()) {\n#ifdef ARCH_ESP32\n        WiFi.disconnect(true, false);\n#elif defined(ARCH_RP2040)\n        WiFi.disconnect(true);\n#endif\n        WiFi.mode(WIFI_OFF);\n        LOG_INFO(\"WiFi Turned Off\");\n        // WiFi.printDiag(Serial);\n    }\n}\n\n// Startup WiFi\nbool initWifi()\n{\n    if (config.network.wifi_enabled && config.network.wifi_ssid[0]) {\n\n        const char *wifiName = config.network.wifi_ssid;\n        const char *wifiPsw = config.network.wifi_psk;\n\n#ifndef ARCH_RP2040\n#if !MESHTASTIC_EXCLUDE_WEBSERVER\n        createSSLCert(); // For WebServer\n#endif\n        WiFi.persistent(false); // Disable flash storage for WiFi credentials\n#endif\n        if (!*wifiPsw) // Treat empty password as no password\n            wifiPsw = NULL;\n\n        if (*wifiName) {\n            uint8_t dmac[6];\n            getMacAddr(dmac);\n            snprintf(ourHost, sizeof(ourHost), \"Meshtastic-%02x%02x\", dmac[4], dmac[5]);\n\n            WiFi.mode(WIFI_STA);\n            WiFi.setHostname(ourHost);\n\n            if (config.network.address_mode == meshtastic_Config_NetworkConfig_AddressMode_STATIC &&\n                config.network.ipv4_config.ip != 0) {\n#ifdef ARCH_ESP32\n                WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.gateway, config.network.ipv4_config.subnet,\n                            config.network.ipv4_config.dns);\n#elif defined(ARCH_RP2040)\n                WiFi.config(config.network.ipv4_config.ip, config.network.ipv4_config.dns, config.network.ipv4_config.gateway,\n                            config.network.ipv4_config.subnet);\n#endif\n            }\n#ifdef ARCH_ESP32\n            WiFi.onEvent(WiFiEvent);\n            WiFi.setAutoReconnect(true);\n            WiFi.setSleep(false);\n\n            // This is needed to improve performance.\n            esp_wifi_set_ps(WIFI_PS_NONE); // Disable radio power saving\n\n            WiFi.onEvent(\n                [](WiFiEvent_t event, WiFiEventInfo_t info) {\n                    LOG_WARN(\"WiFi lost connection. Reason: %d\", info.wifi_sta_disconnected.reason);\n\n                    /*\n                        If we are disconnected from the AP for some reason,\n                        save the error code.\n\n                        For a reference to the codes:\n                            https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#wi-fi-reason-code\n                    */\n                    wifiDisconnectReason = info.wifi_sta_disconnected.reason;\n                },\n                WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_DISCONNECTED);\n#endif\n            LOG_DEBUG(\"JOINING WIFI soon: ssid=%s\", wifiName);\n            wifiReconnect = new Periodic(\"WifiConnect\", reconnectWiFi);\n        }\n        return true;\n    } else {\n        LOG_INFO(\"Not using WIFI\");\n        return false;\n    }\n}\n\n#ifdef ARCH_ESP32\n#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(3, 0, 0)\n// Most of the next 12 lines of code are adapted from espressif/arduino-esp32\n// Licensed under the GNU Lesser General Public License v2.1\n// https://github.com/espressif/arduino-esp32/blob/1f038677eb2eaf5e9ca6b6074486803c15468bed/libraries/WiFi/src/WiFiSTA.cpp#L755\nesp_netif_t *get_esp_interface_netif(esp_interface_t interface);\nIPv6Address GlobalIPv6()\n{\n    esp_ip6_addr_t addr;\n    if (WiFiGenericClass::getMode() == WIFI_MODE_NULL) {\n        return IPv6Address();\n    }\n    if (esp_netif_get_ip6_global(get_esp_interface_netif(ESP_IF_WIFI_STA), &addr)) {\n        return IPv6Address();\n    }\n    return IPv6Address(addr.addr);\n}\n#endif\n// Called by the Espressif SDK to\nstatic void WiFiEvent(WiFiEvent_t event)\n{\n    LOG_DEBUG(\"Network-Event %d: \", event);\n\n    switch (event) {\n    case ARDUINO_EVENT_WIFI_READY:\n        LOG_INFO(\"WiFi interface ready\");\n        break;\n    case ARDUINO_EVENT_WIFI_SCAN_DONE:\n        LOG_INFO(\"Completed scan for access points\");\n        break;\n    case ARDUINO_EVENT_WIFI_STA_START:\n        LOG_INFO(\"WiFi station started\");\n        break;\n    case ARDUINO_EVENT_WIFI_STA_STOP:\n        LOG_INFO(\"WiFi station stopped\");\n        syslog.disable();\n        break;\n    case ARDUINO_EVENT_WIFI_STA_CONNECTED:\n        LOG_INFO(\"Connected to access point\");\n        if (config.network.ipv6_enabled) {\n#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)\n            if (!WiFi.enableIPv6()) {\n                LOG_WARN(\"Failed to enable IPv6\");\n            }\n#else\n            if (!WiFi.enableIpV6()) {\n                LOG_WARN(\"Failed to enable IPv6\");\n            }\n#endif\n        }\n#ifdef WIFI_LED\n        digitalWrite(WIFI_LED, HIGH);\n#endif\n        break;\n    case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:\n        LOG_INFO(\"Disconnected from WiFi access point\");\n#ifdef WIFI_LED\n        digitalWrite(WIFI_LED, LOW);\n#endif\n#if HAS_UDP_MULTICAST\n        if (udpHandler) {\n            udpHandler->stop();\n        }\n#endif\n        if (!isReconnecting) {\n            WiFi.disconnect(false, true);\n            syslog.disable();\n            needReconnect = true;\n            wifiReconnect->setIntervalFromNow(1000);\n        }\n        break;\n    case ARDUINO_EVENT_WIFI_STA_AUTHMODE_CHANGE:\n        LOG_INFO(\"Authentication mode of access point has changed\");\n        break;\n    case ARDUINO_EVENT_WIFI_STA_GOT_IP:\n        LOG_INFO(\"Obtained IP address: %s\", WiFi.localIP().toString().c_str());\n        onNetworkConnected();\n        break;\n    case ARDUINO_EVENT_WIFI_STA_GOT_IP6:\n#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)\n        LOG_INFO(\"Obtained Local IP6 address: %s\", WiFi.linkLocalIPv6().toString().c_str());\n        LOG_INFO(\"Obtained GlobalIP6 address: %s\", WiFi.globalIPv6().toString().c_str());\n#else\n        LOG_INFO(\"Obtained Local IP6 address: %s\", WiFi.localIPv6().toString().c_str());\n        LOG_INFO(\"Obtained GlobalIP6 address: %s\", GlobalIPv6().toString().c_str());\n#endif\n        break;\n    case ARDUINO_EVENT_WIFI_STA_LOST_IP:\n        LOG_INFO(\"Lost IP address and IP address is reset to 0\");\n#if HAS_UDP_MULTICAST\n        if (udpHandler) {\n            udpHandler->stop();\n        }\n#endif\n        if (!isReconnecting) {\n            WiFi.disconnect(false, true);\n            syslog.disable();\n            needReconnect = true;\n            wifiReconnect->setIntervalFromNow(1000);\n        }\n        break;\n    case ARDUINO_EVENT_WPS_ER_SUCCESS:\n        LOG_INFO(\"WiFi Protected Setup (WPS): succeeded in enrollee mode\");\n        break;\n    case ARDUINO_EVENT_WPS_ER_FAILED:\n        LOG_INFO(\"WiFi Protected Setup (WPS): failed in enrollee mode\");\n        break;\n    case ARDUINO_EVENT_WPS_ER_TIMEOUT:\n        LOG_INFO(\"WiFi Protected Setup (WPS): timeout in enrollee mode\");\n        break;\n    case ARDUINO_EVENT_WPS_ER_PIN:\n        LOG_INFO(\"WiFi Protected Setup (WPS): pin code in enrollee mode\");\n        break;\n    case ARDUINO_EVENT_WPS_ER_PBC_OVERLAP:\n        LOG_INFO(\"WiFi Protected Setup (WPS): push button overlap in enrollee mode\");\n        break;\n    case ARDUINO_EVENT_WIFI_AP_START:\n        LOG_INFO(\"WiFi access point started\");\n#ifdef WIFI_LED\n        digitalWrite(WIFI_LED, HIGH);\n#endif\n        break;\n    case ARDUINO_EVENT_WIFI_AP_STOP:\n        LOG_INFO(\"WiFi access point stopped\");\n#ifdef WIFI_LED\n        digitalWrite(WIFI_LED, LOW);\n#endif\n        break;\n    case ARDUINO_EVENT_WIFI_AP_STACONNECTED:\n        LOG_INFO(\"Client connected\");\n        break;\n    case ARDUINO_EVENT_WIFI_AP_STADISCONNECTED:\n        LOG_INFO(\"Client disconnected\");\n        break;\n    case ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED:\n        LOG_INFO(\"Assigned IP address to client\");\n        break;\n    case ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED:\n        LOG_INFO(\"Received probe request\");\n        break;\n    case ARDUINO_EVENT_WIFI_AP_GOT_IP6:\n        LOG_INFO(\"IPv6 is preferred\");\n        break;\n    case ARDUINO_EVENT_WIFI_FTM_REPORT:\n        LOG_INFO(\"Fast Transition Management report\");\n        break;\n    case ARDUINO_EVENT_ETH_START:\n        LOG_INFO(\"Ethernet started\");\n        break;\n    case ARDUINO_EVENT_ETH_STOP:\n        syslog.disable();\n        LOG_INFO(\"Ethernet stopped\");\n        break;\n    case ARDUINO_EVENT_ETH_CONNECTED:\n        LOG_INFO(\"Ethernet connected\");\n        break;\n    case ARDUINO_EVENT_ETH_DISCONNECTED:\n        syslog.disable();\n        LOG_INFO(\"Ethernet disconnected\");\n        break;\n    case ARDUINO_EVENT_ETH_GOT_IP:\n#ifdef USE_WS5500\n        LOG_INFO(\"Obtained IP address: %s, %u Mbps, %s\", ETH.localIP().toString().c_str(), ETH.linkSpeed(),\n                 ETH.fullDuplex() ? \"FULL_DUPLEX\" : \"HALF_DUPLEX\");\n        onNetworkConnected();\n#endif\n        break;\n    case ARDUINO_EVENT_ETH_GOT_IP6:\n#ifdef USE_WS5500\n#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)\n        LOG_INFO(\"Obtained Local IP6 address: %s\", ETH.linkLocalIPv6().toString().c_str());\n        LOG_INFO(\"Obtained GlobalIP6 address: %s\", ETH.globalIPv6().toString().c_str());\n#else\n        LOG_INFO(\"Obtained IP6 address: %s\", ETH.localIPv6().toString().c_str());\n#endif\n#endif\n        break;\n    case ARDUINO_EVENT_SC_SCAN_DONE:\n        LOG_INFO(\"SmartConfig: Scan done\");\n        break;\n    case ARDUINO_EVENT_SC_FOUND_CHANNEL:\n        LOG_INFO(\"SmartConfig: Found channel\");\n        break;\n    case ARDUINO_EVENT_SC_GOT_SSID_PSWD:\n        LOG_INFO(\"SmartConfig: Got SSID and password\");\n        break;\n    case ARDUINO_EVENT_SC_SEND_ACK_DONE:\n        LOG_INFO(\"SmartConfig: Send ACK done\");\n        break;\n    case ARDUINO_EVENT_PROV_INIT:\n        LOG_INFO(\"Provision Init\");\n        break;\n    case ARDUINO_EVENT_PROV_DEINIT:\n        LOG_INFO(\"Provision Stopped\");\n        break;\n    case ARDUINO_EVENT_PROV_START:\n        LOG_INFO(\"Provision Started\");\n        break;\n    case ARDUINO_EVENT_PROV_END:\n        LOG_INFO(\"Provision End\");\n        break;\n    case ARDUINO_EVENT_PROV_CRED_RECV:\n        LOG_INFO(\"Provision Credentials received\");\n        break;\n    case ARDUINO_EVENT_PROV_CRED_FAIL:\n        LOG_INFO(\"Provision Credentials failed\");\n        break;\n    case ARDUINO_EVENT_PROV_CRED_SUCCESS:\n        LOG_INFO(\"Provision Credentials success\");\n        break;\n    default:\n        break;\n    }\n}\n#endif\n\nuint8_t getWifiDisconnectReason()\n{\n    return wifiDisconnectReason;\n}\n#endif // HAS_WIFI\n"
  },
  {
    "path": "src/mesh/wifi/WiFiAPClient.h",
    "content": "#pragma once\n\n#include \"concurrency/Periodic.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <functional>\n\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n#include <WiFi.h>\n#endif\n\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n\nextern bool needReconnect;\nextern concurrency::Periodic *wifiReconnect;\n\n/// @return true if wifi is now in use\nbool initWifi();\n\nvoid deinitWifi();\n\nbool isWifiAvailable();\n\nuint8_t getWifiDisconnectReason();\n\n#ifdef USE_WS5500\n// Startup Ethernet\nbool initEthernet();\n#endif"
  },
  {
    "path": "src/meshUtils.cpp",
    "content": "#include \"meshUtils.h\"\n#include <string.h>\n\n/*\n * Find the first occurrence of find in s, where the search is limited to the\n * first slen characters of s.\n * -\n * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>\n * Copyright (c) 1990, 1993\n *\tThe Regents of the University of California.  All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * Chris Torek.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. Neither the name of the University nor the names of its contributors\n *    may be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n */\nchar *strnstr(const char *s, const char *find, size_t slen)\n{\n    char c;\n    if ((c = *find++) != '\\0') {\n        char sc;\n        size_t len;\n\n        len = strlen(find);\n        do {\n            do {\n                if (slen-- < 1 || (sc = *s++) == '\\0')\n                    return (NULL);\n            } while (sc != c);\n            if (len > slen)\n                return (NULL);\n        } while (strncmp(s, find, len) != 0);\n        s--;\n    }\n    return ((char *)s);\n}\n\nvoid printBytes(const char *label, const uint8_t *p, size_t numbytes)\n{\n    int labelSize = strlen(label);\n    char *messageBuffer = new char[labelSize + (numbytes * 3) + 2];\n    strncpy(messageBuffer, label, labelSize);\n    for (size_t i = 0; i < numbytes; i++)\n        snprintf(messageBuffer + labelSize + i * 3, 4, \" %02x\", p[i]);\n    strcpy(messageBuffer + labelSize + numbytes * 3, \"\\n\");\n    LOG_DEBUG(messageBuffer);\n    delete[] messageBuffer;\n}\n\nbool memfll(const uint8_t *mem, uint8_t find, size_t numbytes)\n{\n    for (uint8_t i = 0; i < numbytes; i++) {\n        if (mem[i] != find)\n            return false;\n    }\n    return true;\n}\n\nbool isOneOf(int item, int count, ...)\n{\n    va_list args;\n    va_start(args, count);\n    bool found = false;\n    for (int i = 0; i < count; ++i) {\n        if (item == va_arg(args, int)) {\n            found = true;\n            break;\n        }\n    }\n    va_end(args);\n    return found;\n}\n\nconst std::string vformat(const char *const zcFormat, ...)\n{\n    va_list vaArgs;\n    va_start(vaArgs, zcFormat);\n    va_list vaArgsCopy;\n    va_copy(vaArgsCopy, vaArgs);\n    const int iLen = std::vsnprintf(NULL, 0, zcFormat, vaArgsCopy);\n    va_end(vaArgsCopy);\n    std::vector<char> zc(iLen + 1);\n    std::vsnprintf(zc.data(), zc.size(), zcFormat, vaArgs);\n    va_end(vaArgs);\n    return std::string(zc.data(), iLen);\n}\n\nsize_t pb_string_length(const char *str, size_t max_len)\n{\n    size_t len = 0;\n    for (size_t i = 0; i < max_len; i++) {\n        if (str[i] != '\\0') {\n            len = i + 1;\n        }\n    }\n    return len;\n}"
  },
  {
    "path": "src/meshUtils.h",
    "content": "#pragma once\n#include \"DebugConfiguration.h\"\n#include <algorithm>\n#include <cstdarg>\n#include <iterator>\n#include <stdint.h>\n\n/// C++ v17+ clamp function, limits a given value to a range defined by lo and hi\ntemplate <class T> constexpr const T &clamp(const T &v, const T &lo, const T &hi)\n{\n    return (v < lo) ? lo : (hi < v) ? hi : v;\n}\n\n#if HAS_SCREEN\n#define IF_SCREEN(X)                                                                                                             \\\n    if (screen) {                                                                                                                \\\n        X;                                                                                                                       \\\n    }\n#else\n#define IF_SCREEN(...)\n#endif\n\n#if (defined(ARCH_PORTDUINO) && !defined(STRNSTR))\n#define STRNSTR\n#include <string.h>\nchar *strnstr(const char *s, const char *find, size_t slen);\n#endif\n\nvoid printBytes(const char *label, const uint8_t *p, size_t numbytes);\n\n// is the memory region filled with a single character?\nbool memfll(const uint8_t *mem, uint8_t find, size_t numbytes);\n\nbool isOneOf(int item, int count, ...);\n\nconst std::string vformat(const char *const zcFormat, ...);\n\n// Get actual string length for nanopb char array fields.\nsize_t pb_string_length(const char *str, size_t max_len);\n\n/// Calculate 2^n without calling pow() - used for spreading factor and other calculations\ninline uint32_t pow_of_2(uint32_t n)\n{\n    return 1 << n;\n}\n\n#define IS_ONE_OF(item, ...) isOneOf(item, sizeof((int[]){__VA_ARGS__}) / sizeof(int), __VA_ARGS__)\n"
  },
  {
    "path": "src/modules/AdminModule.cpp",
    "content": "#include \"AdminModule.h\"\n#include \"Channels.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"SPILock.h\"\n#include \"input/InputBroker.h\"\n#include \"meshUtils.h\"\n#include <FSCommon.h>\n#include <ctype.h> // for better whitespace handling\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WIFI\n#include \"MeshtasticOTA.h\"\n#endif\n#include \"Router.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#ifdef ARCH_NRF52\n#include \"main.h\"\n#endif\n#ifdef ARCH_PORTDUINO\n#include \"unistd.h\"\n#endif\n\n#include \"Default.h\"\n#include \"MeshRadio.h\"\n#include \"RadioInterface.h\"\n#include \"TypeConversions.h\"\n\n#if !MESHTASTIC_EXCLUDE_MQTT\n#include \"mqtt/MQTT.h\"\n#endif\n\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n\n#if MESHTASTIC_EXCLUDE_GPS\n#include \"modules/PositionModule.h\"\n#endif\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n#include \"motion/AccelerometerThread.h\"\n#endif\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) &&               \\\n    !defined(CONFIG_IDF_TARGET_ESP32C3)\n#include \"SerialModule.h\"\n#endif\n\nAdminModule *adminModule;\nbool hasOpenEditTransaction;\n\n/// A special reserved string to indicate strings we can not share with external nodes.  We will use this 'reserved' word instead.\n/// Also, to make setting work correctly, if someone tries to set a string to this reserved value we assume they don't really want\n/// a change.\nstatic const char *secretReserved = \"sekrit\";\n\n/// If buf is the reserved secret word, replace the buffer with currentVal\nstatic void writeSecret(char *buf, size_t bufsz, const char *currentVal)\n{\n    if (strcmp(buf, secretReserved) == 0) {\n        strncpy(buf, currentVal, bufsz);\n    }\n}\n\n/**\n * @brief Handle received protobuf message\n *\n * @param mp Received MeshPacket\n * @param r Decoded AdminMessage\n * @return bool\n */\nbool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *r)\n{\n    // if handled == false, then let others look at this message also if they want\n    bool handled = false;\n    assert(r);\n    bool fromOthers = !isFromUs(&mp);\n    if (mp.which_payload_variant != meshtastic_MeshPacket_decoded_tag) {\n        return handled;\n    }\n    meshtastic_Channel *ch = &channels.getByIndex(mp.channel);\n    // Could tighten this up further by tracking the last public_key we went an AdminMessage request to\n    // and only allowing responses from that remote.\n    if (messageIsResponse(r)) {\n        LOG_DEBUG(\"Allow admin response message\");\n    } else if (mp.from == 0) {\n        if (config.security.is_managed) {\n            LOG_INFO(\"Ignore local admin payload because is_managed\");\n            return handled;\n        }\n    } else if (strcasecmp(ch->settings.name, Channels::adminChannel) == 0) {\n        if (!config.security.admin_channel_enabled) {\n            LOG_INFO(\"Ignore admin channel, legacy admin is disabled\");\n            myReply = allocErrorResponse(meshtastic_Routing_Error_NOT_AUTHORIZED, &mp);\n            return handled;\n        }\n    } else if (mp.pki_encrypted) {\n        if ((config.security.admin_key[0].size == 32 &&\n             memcmp(mp.public_key.bytes, config.security.admin_key[0].bytes, 32) == 0) ||\n            (config.security.admin_key[1].size == 32 &&\n             memcmp(mp.public_key.bytes, config.security.admin_key[1].bytes, 32) == 0) ||\n            (config.security.admin_key[2].size == 32 &&\n             memcmp(mp.public_key.bytes, config.security.admin_key[2].bytes, 32) == 0)) {\n            LOG_INFO(\"PKC admin payload with authorized sender key\");\n\n            // Automatically favorite the node that is using the admin key\n            auto remoteNode = nodeDB->getMeshNode(mp.from);\n            if (remoteNode && !remoteNode->is_favorite) {\n                if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT_BASE) {\n                    // Special case for CLIENT_BASE: is_favorite has special meaning, and we don't want to automatically set it\n                    // without the user doing so deliberately.\n                    LOG_INFO(\"PKC admin valid, but not auto-favoriting node %x because role==CLIENT_BASE\", mp.from);\n                } else {\n                    LOG_INFO(\"PKC admin valid. Auto-favoriting node %x\", mp.from);\n                    remoteNode->is_favorite = true;\n                }\n            }\n        } else {\n            myReply = allocErrorResponse(meshtastic_Routing_Error_ADMIN_PUBLIC_KEY_UNAUTHORIZED, &mp);\n            LOG_INFO(\"Received PKC admin payload, but the sender public key does not match the admin authorized key!\");\n            return handled;\n        }\n    } else {\n        LOG_INFO(\"Ignore unauthorized admin payload %i\", r->which_payload_variant);\n        myReply = allocErrorResponse(meshtastic_Routing_Error_NOT_AUTHORIZED, &mp);\n        return handled;\n    }\n\n    LOG_INFO(\"Handle admin payload %i\", r->which_payload_variant);\n\n    // all of the get and set messages, including those for other modules, flow through here first.\n    // any message that changes state, we want to check the passkey for\n    if (mp.from != 0 && !messageIsRequest(r) && !messageIsResponse(r)) {\n        if (!checkPassKey(r)) {\n            LOG_WARN(\"Admin message without session_key!\");\n            myReply = allocErrorResponse(meshtastic_Routing_Error_ADMIN_BAD_SESSION_KEY, &mp);\n            return handled;\n        }\n    }\n    switch (r->which_payload_variant) {\n\n    /**\n     * Getters\n     */\n    case meshtastic_AdminMessage_get_owner_request_tag:\n        LOG_DEBUG(\"Client got owner\");\n        handleGetOwner(mp);\n        break;\n\n    case meshtastic_AdminMessage_get_config_request_tag:\n        LOG_DEBUG(\"Client got config\");\n        handleGetConfig(mp, r->get_config_request);\n        break;\n\n    case meshtastic_AdminMessage_get_module_config_request_tag:\n        LOG_DEBUG(\"Client got module config\");\n        handleGetModuleConfig(mp, r->get_module_config_request);\n        break;\n\n    case meshtastic_AdminMessage_get_channel_request_tag: {\n        uint32_t i = r->get_channel_request - 1;\n        LOG_DEBUG(\"Client got channel %u\", i);\n        if (i >= MAX_NUM_CHANNELS)\n            myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp);\n        else\n            handleGetChannel(mp, i);\n        break;\n    }\n\n    /**\n     * Setters\n     */\n    case meshtastic_AdminMessage_set_owner_tag:\n        LOG_DEBUG(\"Client set owner\");\n        // Validate names\n        if (*r->set_owner.long_name) {\n            const char *start = r->set_owner.long_name;\n            // Skip all whitespace (space, tab, newline, etc)\n            while (*start && isspace((unsigned char)*start))\n                start++;\n            if (*start == '\\0') {\n                LOG_WARN(\"Rejected long_name: must contain at least 1 non-whitespace character\");\n                myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp);\n                break;\n            }\n        }\n        if (*r->set_owner.short_name) {\n            const char *start = r->set_owner.short_name;\n            while (*start && isspace((unsigned char)*start))\n                start++;\n            if (*start == '\\0') {\n                LOG_WARN(\"Rejected short_name: must contain at least 1 non-whitespace character\");\n                myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp);\n                break;\n            }\n        }\n        handleSetOwner(r->set_owner);\n        break;\n\n    case meshtastic_AdminMessage_set_config_tag:\n        LOG_DEBUG(\"Client set config\");\n        handleSetConfig(r->set_config, fromOthers);\n        break;\n\n    case meshtastic_AdminMessage_set_module_config_tag:\n        LOG_DEBUG(\"Client set module config\");\n        if (!handleSetModuleConfig(r->set_module_config)) {\n            myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp);\n        }\n        break;\n\n    case meshtastic_AdminMessage_set_channel_tag:\n        LOG_DEBUG(\"Client set channel %d\", r->set_channel.index);\n        if (r->set_channel.index < 0 || r->set_channel.index >= (int)MAX_NUM_CHANNELS)\n            myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp);\n        else\n            handleSetChannel(r->set_channel);\n        break;\n    case meshtastic_AdminMessage_set_ham_mode_tag:\n        LOG_DEBUG(\"Client set ham mode\");\n        handleSetHamMode(r->set_ham_mode);\n        break;\n    case meshtastic_AdminMessage_get_ui_config_request_tag: {\n        LOG_DEBUG(\"Client is getting device-ui config\");\n        handleGetDeviceUIConfig(mp);\n        handled = true;\n        break;\n    }\n\n    /**\n     * Other\n     */\n    case meshtastic_AdminMessage_reboot_seconds_tag: {\n        reboot(r->reboot_seconds);\n        break;\n    }\n    case meshtastic_AdminMessage_ota_request_tag: {\n#if defined(ARCH_ESP32)\n        LOG_INFO(\"OTA Requested\");\n\n        if (r->ota_request.ota_hash.size != 32) {\n            suppressRebootBanner = true;\n            sendWarningAndLog(\"Cannot start OTA: Invalid `ota_hash` provided.\");\n            break;\n        }\n\n        meshtastic_OTAMode mode = r->ota_request.reboot_ota_mode;\n        const char *mode_name = (mode == METHOD_OTA_BLE ? \"BLE\" : \"WiFi\");\n\n        // Check that we have an OTA partition\n        const esp_partition_t *part = MeshtasticOTA::getAppPartition();\n        if (part == NULL) {\n            suppressRebootBanner = true;\n            sendWarningAndLog(\"Cannot start OTA: Cannot find OTA Loader partition.\");\n            break;\n        }\n\n        static esp_app_desc_t app_desc;\n        if (!MeshtasticOTA::getAppDesc(part, &app_desc)) {\n            suppressRebootBanner = true;\n            sendWarningAndLog(\"Cannot start OTA: Device does have a valid OTA Loader.\");\n            break;\n        }\n\n        if (!MeshtasticOTA::checkOTACapability(&app_desc, mode)) {\n            suppressRebootBanner = true;\n            sendWarningAndLog(\"OTA Loader does not support %s\", mode_name);\n            break;\n        }\n\n        if (MeshtasticOTA::trySwitchToOTA()) {\n            suppressRebootBanner = true;\n            if (screen)\n                screen->startFirmwareUpdateScreen();\n            MeshtasticOTA::saveConfig(&config.network, mode, r->ota_request.ota_hash.bytes);\n            sendWarningAndLog(\"Rebooting to %s OTA\", mode_name);\n        } else {\n            sendWarningAndLog(\"Unable to switch to the OTA partition.\");\n        }\n#endif\n        int s = 1; // Reboot in 1 second, hard coded\n        LOG_INFO(\"Reboot in %d seconds\", s);\n        rebootAtMsec = (s < 0) ? 0 : (millis() + s * 1000);\n        break;\n    }\n    case meshtastic_AdminMessage_shutdown_seconds_tag: {\n        int32_t s = r->shutdown_seconds;\n        LOG_INFO(\"Shutdown in %d seconds\", s);\n        shutdownAtMsec = (s < 0) ? 0 : (millis() + s * 1000);\n        break;\n    }\n    case meshtastic_AdminMessage_get_device_metadata_request_tag: {\n        LOG_INFO(\"Client got device metadata\");\n        handleGetDeviceMetadata(mp);\n        break;\n    }\n    case meshtastic_AdminMessage_factory_reset_config_tag: {\n        disableBluetooth();\n        LOG_INFO(\"Initiate factory config reset\");\n        nodeDB->factoryReset();\n        LOG_INFO(\"Factory config reset finished, rebooting soon\");\n        reboot(DEFAULT_REBOOT_SECONDS);\n        break;\n    }\n    case meshtastic_AdminMessage_factory_reset_device_tag: {\n        disableBluetooth();\n        LOG_INFO(\"Initiate full factory reset\");\n        nodeDB->factoryReset(true);\n        reboot(DEFAULT_REBOOT_SECONDS);\n        break;\n    }\n    case meshtastic_AdminMessage_nodedb_reset_tag: {\n        disableBluetooth();\n        LOG_INFO(\"Initiate node-db reset\");\n        //  CLIENT_BASE, ROUTER and ROUTER_LATE are able to preserve the remaining hop count when relaying a packet via a\n        //  favorited node, so ensure that their favorites are kept on reset\n        bool rolePreference =\n            isOneOf(config.device.role, meshtastic_Config_DeviceConfig_Role_CLIENT_BASE,\n                    meshtastic_Config_DeviceConfig_Role_ROUTER, meshtastic_Config_DeviceConfig_Role_ROUTER_LATE);\n        nodeDB->resetNodes(rolePreference ? rolePreference : r->nodedb_reset);\n        reboot(DEFAULT_REBOOT_SECONDS);\n        break;\n    }\n    case meshtastic_AdminMessage_store_ui_config_tag: {\n        LOG_INFO(\"Storing device-ui config\");\n        handleStoreDeviceUIConfig(r->store_ui_config);\n        handled = true;\n        break;\n    }\n    case meshtastic_AdminMessage_begin_edit_settings_tag: {\n        LOG_INFO(\"Begin transaction for editing settings\");\n        hasOpenEditTransaction = true;\n        break;\n    }\n    case meshtastic_AdminMessage_commit_edit_settings_tag: {\n        disableBluetooth();\n        LOG_INFO(\"Commit transaction for edited settings\");\n        hasOpenEditTransaction = false;\n        saveChanges(SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS | SEGMENT_NODEDATABASE);\n        break;\n    }\n    case meshtastic_AdminMessage_get_device_connection_status_request_tag: {\n        LOG_INFO(\"Client got device connection status\");\n        handleGetDeviceConnectionStatus(mp);\n        break;\n    }\n    case meshtastic_AdminMessage_get_module_config_response_tag: {\n        LOG_INFO(\"Client received a get_module_config response\");\n        if (fromOthers && r->get_module_config_response.which_payload_variant ==\n                              meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG) {\n            handleGetModuleConfigResponse(mp, r);\n        }\n        break;\n    }\n    case meshtastic_AdminMessage_remove_by_nodenum_tag: {\n        LOG_INFO(\"Client received remove_nodenum command\");\n        nodeDB->removeNodeByNum(r->remove_by_nodenum);\n        break;\n    }\n    case meshtastic_AdminMessage_add_contact_tag: {\n        LOG_INFO(\"Client received add_contact command\");\n        nodeDB->addFromContact(r->add_contact);\n        break;\n    }\n    case meshtastic_AdminMessage_set_favorite_node_tag: {\n        LOG_INFO(\"Client received set_favorite_node command\");\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->set_favorite_node);\n        if (node != NULL) {\n            node->is_favorite = true;\n            saveChanges(SEGMENT_NODEDATABASE, false);\n            if (screen)\n                screen->setFrames(graphics::Screen::FOCUS_PRESERVE); // <-- Rebuild screens\n        }\n        break;\n    }\n    case meshtastic_AdminMessage_remove_favorite_node_tag: {\n        LOG_INFO(\"Client received remove_favorite_node command\");\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->remove_favorite_node);\n        if (node != NULL) {\n            node->is_favorite = false;\n            saveChanges(SEGMENT_NODEDATABASE, false);\n            if (screen)\n                screen->setFrames(graphics::Screen::FOCUS_PRESERVE); // <-- Rebuild screens\n        }\n        break;\n    }\n    case meshtastic_AdminMessage_set_ignored_node_tag: {\n        LOG_INFO(\"Client received set_ignored_node command\");\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->set_ignored_node);\n        if (node != NULL) {\n            node->is_ignored = true;\n            node->has_device_metrics = false;\n            node->has_position = false;\n            node->user.public_key.size = 0;\n            memset(node->user.public_key.bytes, 0, sizeof(node->user.public_key.bytes));\n            saveChanges(SEGMENT_NODEDATABASE, false);\n        }\n        break;\n    }\n    case meshtastic_AdminMessage_remove_ignored_node_tag: {\n        LOG_INFO(\"Client received remove_ignored_node command\");\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->remove_ignored_node);\n        if (node != NULL) {\n            node->is_ignored = false;\n            saveChanges(SEGMENT_NODEDATABASE, false);\n        }\n        break;\n    }\n    case meshtastic_AdminMessage_toggle_muted_node_tag: {\n        LOG_INFO(\"Client received toggle_muted_node command\");\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(r->toggle_muted_node);\n        if (node != NULL) {\n            node->bitfield ^= (1 << NODEINFO_BITFIELD_IS_MUTED_SHIFT);\n            saveChanges(SEGMENT_NODEDATABASE, false);\n        }\n        break;\n    }\n\n    case meshtastic_AdminMessage_set_fixed_position_tag: {\n        LOG_INFO(\"Client received set_fixed_position command\");\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n        node->has_position = true;\n        node->position = TypeConversions::ConvertToPositionLite(r->set_fixed_position);\n        nodeDB->setLocalPosition(r->set_fixed_position);\n        config.position.fixed_position = true;\n        saveChanges(SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false);\n#if !MESHTASTIC_EXCLUDE_GPS\n        if (gps != nullptr)\n            gps->enable();\n        // Send our new fixed position to the mesh for good measure\n        positionModule->sendOurPosition();\n#endif\n        break;\n    }\n    case meshtastic_AdminMessage_remove_fixed_position_tag: {\n        LOG_INFO(\"Client received remove_fixed_position command\");\n        nodeDB->clearLocalPosition();\n        config.position.fixed_position = false;\n        saveChanges(SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false);\n        break;\n    }\n    case meshtastic_AdminMessage_set_time_only_tag: {\n        LOG_INFO(\"Client received set_time_only command\");\n        struct timeval tv;\n        tv.tv_sec = r->set_time_only;\n        tv.tv_usec = 0;\n\n        perhapsSetRTC(RTCQualityNTP, &tv, false);\n        break;\n    }\n    case meshtastic_AdminMessage_enter_dfu_mode_request_tag: {\n        LOG_INFO(\"Client requesting to enter DFU mode\");\n#if HAS_SCREEN\n        IF_SCREEN(screen->showSimpleBanner(\"Device is rebooting\\ninto DFU mode.\", 0));\n#endif\n#if defined(ARCH_NRF52) || defined(ARCH_RP2040)\n        enterDfuMode();\n#endif\n        break;\n    }\n    case meshtastic_AdminMessage_delete_file_request_tag: {\n        LOG_DEBUG(\"Client requesting to delete file: %s\", r->delete_file_request);\n\n#ifdef FSCom\n        spiLock->lock();\n        if (FSCom.remove(r->delete_file_request)) {\n            LOG_DEBUG(\"Successfully deleted file\");\n        } else {\n            LOG_DEBUG(\"Failed to delete file\");\n        }\n        spiLock->unlock();\n#endif\n        break;\n    }\n    case meshtastic_AdminMessage_backup_preferences_tag: {\n        LOG_INFO(\"Client requesting to backup preferences\");\n        if (nodeDB->backupPreferences(r->backup_preferences)) {\n            myReply = allocErrorResponse(meshtastic_Routing_Error_NONE, &mp);\n        } else {\n            myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp);\n        }\n        break;\n    }\n    case meshtastic_AdminMessage_restore_preferences_tag: {\n        LOG_INFO(\"Client requesting to restore preferences\");\n        if (nodeDB->restorePreferences(r->backup_preferences,\n                                       SEGMENT_DEVICESTATE | SEGMENT_CONFIG | SEGMENT_MODULECONFIG | SEGMENT_CHANNELS)) {\n            myReply = allocErrorResponse(meshtastic_Routing_Error_NONE, &mp);\n            LOG_DEBUG(\"Rebooting after successful restore of preferences\");\n            reboot(1000);\n            disableBluetooth();\n        } else {\n            myReply = allocErrorResponse(meshtastic_Routing_Error_BAD_REQUEST, &mp);\n        }\n        break;\n    }\n    case meshtastic_AdminMessage_remove_backup_preferences_tag: {\n        LOG_INFO(\"Client requesting to remove backup preferences\");\n#ifdef FSCom\n        if (r->remove_backup_preferences == meshtastic_AdminMessage_BackupLocation_FLASH) {\n            spiLock->lock();\n            FSCom.remove(backupFileName);\n            spiLock->unlock();\n        } else if (r->remove_backup_preferences == meshtastic_AdminMessage_BackupLocation_SD) {\n            // TODO: After more mainline SD card support\n            LOG_ERROR(\"SD backup removal not implemented yet\");\n        }\n#endif\n        break;\n    }\n    case meshtastic_AdminMessage_send_input_event_tag: {\n        LOG_INFO(\"Client requesting to send input event\");\n        handleSendInputEvent(r->send_input_event);\n        break;\n    }\n#ifdef ARCH_PORTDUINO\n    case meshtastic_AdminMessage_exit_simulator_tag:\n        LOG_INFO(\"Exiting simulator\");\n        exit(0);\n        break;\n#endif\n\n    default:\n        meshtastic_AdminMessage res = meshtastic_AdminMessage_init_default;\n        AdminMessageHandleResult handleResult = MeshModule::handleAdminMessageForAllModules(mp, r, &res);\n\n        if (handleResult == AdminMessageHandleResult::HANDLED_WITH_RESPONSE) {\n            setPassKey(&res);\n            myReply = allocDataProtobuf(res);\n        } else if (mp.decoded.want_response) {\n            LOG_DEBUG(\"Module API did not respond to admin message. req.variant=%d\", r->which_payload_variant);\n        } else if (handleResult != AdminMessageHandleResult::HANDLED) {\n            // Probably a message sent by us or sent to our local node.  FIXME, we should avoid scanning these messages\n            LOG_DEBUG(\"Module API did not handle admin message %d\", r->which_payload_variant);\n        }\n        break;\n    }\n\n    // Allow any observers (e.g. the UI) to handle/respond\n    AdminMessageHandleResult observerResult = AdminMessageHandleResult::NOT_HANDLED;\n    meshtastic_AdminMessage observerResponse = meshtastic_AdminMessage_init_default;\n    AdminModule_ObserverData observerData = {\n        .request = r,\n        .response = &observerResponse,\n        .result = &observerResult,\n    };\n\n    notifyObservers(&observerData);\n\n    if (observerResult == AdminMessageHandleResult::HANDLED_WITH_RESPONSE) {\n        setPassKey(&observerResponse);\n        myReply = allocDataProtobuf(observerResponse);\n        LOG_DEBUG(\"Observer responded to admin message\");\n    } else if (observerResult == AdminMessageHandleResult::HANDLED) {\n        LOG_DEBUG(\"Observer handled admin message\");\n    }\n\n    // If asked for a response and it is not yet set, generate an 'ACK' response\n    if (mp.decoded.want_response && !myReply) {\n        myReply = allocErrorResponse(meshtastic_Routing_Error_NONE, &mp);\n    }\n    if (mp.pki_encrypted && myReply) {\n        myReply->pki_encrypted = true;\n    }\n    return handled;\n}\n\nvoid AdminModule::handleGetModuleConfigResponse(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *r)\n{\n    // Skip if it's disabled or no pins are exposed\n    if (!r->get_module_config_response.payload_variant.remote_hardware.enabled ||\n        r->get_module_config_response.payload_variant.remote_hardware.available_pins_count == 0) {\n        LOG_DEBUG(\"Remote hardware module disabled or no available_pins. Skip\");\n        return;\n    }\n    for (uint8_t i = 0; i < devicestate.node_remote_hardware_pins_count; i++) {\n        if (devicestate.node_remote_hardware_pins[i].node_num == 0 || !devicestate.node_remote_hardware_pins[i].has_pin) {\n            continue;\n        }\n        for (uint8_t j = 0; j < r->get_module_config_response.payload_variant.remote_hardware.available_pins_count; j++) {\n            auto availablePin = r->get_module_config_response.payload_variant.remote_hardware.available_pins[j];\n            if (i < devicestate.node_remote_hardware_pins_count) {\n                devicestate.node_remote_hardware_pins[i].node_num = mp.from;\n                devicestate.node_remote_hardware_pins[i].pin = availablePin;\n            }\n            i++;\n        }\n    }\n}\n\n/**\n * Setter methods\n */\n\nvoid AdminModule::handleSetOwner(const meshtastic_User &o)\n{\n    int changed = 0;\n\n    if (*o.long_name) {\n        changed |= strcmp(owner.long_name, o.long_name);\n        strncpy(owner.long_name, o.long_name, sizeof(owner.long_name));\n    }\n    if (*o.short_name) {\n        changed |= strcmp(owner.short_name, o.short_name);\n        strncpy(owner.short_name, o.short_name, sizeof(owner.short_name));\n    }\n    snprintf(owner.id, sizeof(owner.id), \"!%08x\", nodeDB->getNodeNum());\n\n    if (owner.is_licensed != o.is_licensed) {\n        changed = 1;\n        owner.is_licensed = o.is_licensed;\n        if (channels.ensureLicensedOperation()) {\n            sendWarning(licensedModeMessage);\n        }\n    }\n    if (owner.has_is_unmessagable != o.has_is_unmessagable ||\n        (o.has_is_unmessagable && owner.is_unmessagable != o.is_unmessagable)) {\n        changed = 1;\n        owner.has_is_unmessagable = owner.has_is_unmessagable || o.has_is_unmessagable;\n        owner.is_unmessagable = o.is_unmessagable;\n    }\n\n    if (changed) { // If nothing really changed, don't broadcast on the network or write to flash\n        service->reloadOwner(!hasOpenEditTransaction);\n        saveChanges(SEGMENT_DEVICESTATE | SEGMENT_NODEDATABASE);\n    }\n}\n\nvoid AdminModule::handleSetConfig(const meshtastic_Config &c, bool fromOthers)\n{\n    auto changes = SEGMENT_CONFIG;\n    auto existingRole = config.device.role;\n    bool isRegionUnset = (config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET);\n    bool requiresReboot = true;\n\n    switch (c.which_payload_variant) {\n    case meshtastic_Config_device_tag:\n        LOG_INFO(\"Set config: Device\");\n        config.has_device = true;\n#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n        if (config.device.double_tap_as_button_press == false && c.payload_variant.device.double_tap_as_button_press == true &&\n            accelerometerThread->enabled == false) {\n            config.device.double_tap_as_button_press = c.payload_variant.device.double_tap_as_button_press;\n            accelerometerThread->enabled = true;\n            accelerometerThread->start();\n        }\n#endif\n        if (config.device.button_gpio == c.payload_variant.device.button_gpio &&\n            config.device.buzzer_gpio == c.payload_variant.device.buzzer_gpio &&\n            config.device.role == c.payload_variant.device.role &&\n            config.device.rebroadcast_mode == c.payload_variant.device.rebroadcast_mode) {\n            requiresReboot = false;\n        }\n        config.device = c.payload_variant.device;\n        if (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_NONE &&\n            (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n             config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE)) {\n            config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_ALL;\n            const char *warning = \"Rebroadcast mode can't be set to NONE for a router role\";\n            LOG_WARN(warning);\n            sendWarning(warning);\n        }\n        // If we're setting router role for the first time, install its intervals\n        if (existingRole != c.payload_variant.device.role) {\n            nodeDB->installRoleDefaults(c.payload_variant.device.role);\n            changes |= SEGMENT_NODEDATABASE | SEGMENT_DEVICESTATE; // Some role defaults affect owner\n        }\n        if (config.device.node_info_broadcast_secs < min_node_info_broadcast_secs) {\n            LOG_DEBUG(\"Tried to set node_info_broadcast_secs too low, setting to %d\", min_node_info_broadcast_secs);\n            config.device.node_info_broadcast_secs = min_node_info_broadcast_secs;\n        }\n        // Router Client and Repeater deprecated; Set it to client\n        if (IS_ONE_OF(c.payload_variant.device.role, meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT,\n                      meshtastic_Config_DeviceConfig_Role_REPEATER)) {\n            config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n            if (moduleConfig.store_forward.enabled && !moduleConfig.store_forward.is_server) {\n                moduleConfig.store_forward.is_server = true;\n                changes |= SEGMENT_MODULECONFIG;\n                requiresReboot = true;\n            }\n        }\n#if USERPREFS_EVENT_MODE\n        // If we're in event mode, nobody is a Router or Router Late\n        if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n            config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE) {\n            config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n        }\n#endif\n        break;\n    case meshtastic_Config_position_tag:\n        LOG_INFO(\"Set config: Position\");\n        config.has_position = true;\n        // If we have turned off the GPS (disabled or not present) and we're not using fixed position,\n        // clear the stored position since it may not get updated\n        if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED &&\n            c.payload_variant.position.gps_mode != meshtastic_Config_PositionConfig_GpsMode_ENABLED &&\n            config.position.fixed_position == false && c.payload_variant.position.fixed_position == false) {\n            nodeDB->clearLocalPosition();\n            saveChanges(SEGMENT_NODEDATABASE | SEGMENT_CONFIG, false);\n        }\n        config.position = c.payload_variant.position;\n\n        // Save nodedb as well in case we got a fixed position packet\n        break;\n    case meshtastic_Config_power_tag:\n        LOG_INFO(\"Set config: Power\");\n        config.has_power = true;\n        // Really just the adc override is the only thing that can change without a reboot\n        if (config.power.device_battery_ina_address == c.payload_variant.power.device_battery_ina_address &&\n            config.power.is_power_saving == c.payload_variant.power.is_power_saving &&\n            config.power.ls_secs == c.payload_variant.power.ls_secs &&\n            config.power.min_wake_secs == c.payload_variant.power.min_wake_secs &&\n            config.power.on_battery_shutdown_after_secs == c.payload_variant.power.on_battery_shutdown_after_secs &&\n            config.power.sds_secs == c.payload_variant.power.sds_secs &&\n            config.power.wait_bluetooth_secs == c.payload_variant.power.wait_bluetooth_secs) {\n            requiresReboot = false;\n        }\n        config.power = c.payload_variant.power;\n        if (c.payload_variant.power.on_battery_shutdown_after_secs > 0 &&\n            c.payload_variant.power.on_battery_shutdown_after_secs < 30) {\n            LOG_WARN(\"Tried to set on_battery_shutdown_after_secs too low, set to min 30 seconds\");\n            config.power.on_battery_shutdown_after_secs = 30;\n        }\n        break;\n    case meshtastic_Config_network_tag:\n        LOG_INFO(\"Set config: WiFi\");\n        config.has_network = true;\n        config.network = c.payload_variant.network;\n        break;\n    case meshtastic_Config_display_tag:\n        LOG_INFO(\"Set config: Display\");\n        config.has_display = true;\n        if (config.display.screen_on_secs == c.payload_variant.display.screen_on_secs &&\n            config.display.flip_screen == c.payload_variant.display.flip_screen &&\n            config.display.oled == c.payload_variant.display.oled &&\n            config.display.displaymode == c.payload_variant.display.displaymode) {\n            requiresReboot = false;\n        } else if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR &&\n                   c.payload_variant.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n            config.bluetooth.enabled = false;\n        }\n#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n        if (config.display.wake_on_tap_or_motion == false && c.payload_variant.display.wake_on_tap_or_motion == true &&\n            accelerometerThread->enabled == false) {\n            config.display.wake_on_tap_or_motion = c.payload_variant.display.wake_on_tap_or_motion;\n            accelerometerThread->enabled = true;\n            accelerometerThread->start();\n        }\n#endif\n        config.display = c.payload_variant.display;\n        break;\n\n    case meshtastic_Config_lora_tag: {\n        // Wrap the entire case in a block to scope variables and avoid crossing initialization\n        auto oldLoraConfig = config.lora;\n        auto validatedLora = c.payload_variant.lora;\n\n        LOG_INFO(\"Set config: LoRa\");\n        config.has_lora = true;\n\n        if (validatedLora.coding_rate != clampCodingRate(validatedLora.coding_rate)) {\n            LOG_WARN(\"Invalid coding_rate %d, setting to %d\", validatedLora.coding_rate, LORA_CR_DEFAULT);\n            validatedLora.coding_rate = LORA_CR_DEFAULT;\n        }\n\n        if (validatedLora.spread_factor != clampSpreadFactor(validatedLora.spread_factor)) {\n            LOG_WARN(\"Invalid spread_factor %d, setting to %d\", validatedLora.spread_factor, LORA_SF_DEFAULT);\n            validatedLora.spread_factor = LORA_SF_DEFAULT;\n        }\n\n        // If we're setting a new region, check the region is valid and then init the region or discard the change\n        if (validatedLora.region != myRegion->code) {\n            //  Region has changed so check whether it is valid for e.g. licensing conditions and if the lora config is valid\n            if (RadioInterface::validateConfigRegion(validatedLora) && RadioInterface::validateConfigLora(validatedLora)) {\n                // If we're setting region for the first time, init the region and regenerate the keys\n                if (isRegionUnset && validatedLora.region > meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN || MESHTASTIC_EXCLUDE_PKI)\n                    if (crypto) {\n                        crypto->ensurePkiKeys(config.security, owner);\n                    }\n#endif\n                    // new region is valid and we're coming from an unset region, so enable tx\n                    validatedLora.tx_enabled = true;\n                }\n                // If we're unsetting the region for some reason, disable tx\n                if (!isRegionUnset && validatedLora.region == meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n                    validatedLora.tx_enabled = false;\n                }\n                // Ensure initRegion() uses the newly validated region\n                config.lora.region = validatedLora.region;\n                initRegion();\n                if (myRegion->dutyCycle < 100) {\n                    validatedLora.ignore_mqtt = true; // Ignore MQTT by default if region has a duty cycle limit\n                }\n                if (strncmp(moduleConfig.mqtt.root, default_mqtt_root, strlen(default_mqtt_root)) == 0) {\n                    //  Default root is in use, so subscribe to the appropriate MQTT topic for this region\n                    sprintf(moduleConfig.mqtt.root, \"%s/%s\", default_mqtt_root, myRegion->name);\n                }\n                changes = SEGMENT_CONFIG | SEGMENT_MODULECONFIG;\n            } else {\n                //  Region validation has failed, so just copy all of the old config over the new config\n                validatedLora = oldLoraConfig;\n            }\n        } // end of new region handling\n\n        if (!RadioInterface::validateConfigLora(validatedLora)) {\n            if (fromOthers) {\n                LOG_WARN(\"Invalid LoRa config received from another node, rejecting changes\");\n                //  modem_preset set to use the old setting if the check fails\n                validatedLora.modem_preset = oldLoraConfig.modem_preset;\n            } else {\n                LOG_WARN(\"Invalid LoRa config received from client, using corrected values\");\n                RadioInterface::clampConfigLora(validatedLora);\n            }\n            //  use_preset and bandwidth are coerced into valid values by the check.\n        }\n\n        // If no lora radio parameters change, don't need to reboot\n        if (oldLoraConfig.use_preset == validatedLora.use_preset && oldLoraConfig.region == validatedLora.region &&\n            oldLoraConfig.modem_preset == validatedLora.modem_preset && oldLoraConfig.bandwidth == validatedLora.bandwidth &&\n            oldLoraConfig.spread_factor == validatedLora.spread_factor &&\n            oldLoraConfig.coding_rate == validatedLora.coding_rate && oldLoraConfig.tx_power == validatedLora.tx_power &&\n            oldLoraConfig.frequency_offset == validatedLora.frequency_offset &&\n            oldLoraConfig.override_frequency == validatedLora.override_frequency &&\n            oldLoraConfig.channel_num == validatedLora.channel_num &&\n            oldLoraConfig.sx126x_rx_boosted_gain == validatedLora.sx126x_rx_boosted_gain) {\n            requiresReboot = false;\n        }\n\n#if defined(ARCH_PORTDUINO)\n        // If running on portduino and using SimRadio, do not require reboot\n        if (SimRadio::instance) {\n            requiresReboot = false;\n        }\n#endif\n\n#ifdef RF95_FAN_EN\n        // Turn PA off if disabled by config\n        if (c.payload_variant.lora.pa_fan_disabled) {\n            digitalWrite(RF95_FAN_EN, LOW ^ 0);\n        } else {\n            digitalWrite(RF95_FAN_EN, HIGH ^ 0);\n        }\n#endif\n\n#if HAS_LORA_FEM\n        // Apply FEM LNA mode from config (only meaningful on hardware that supports it)\n        // Note that a rejected lora config will revert this as well.\n        if (loraFEMInterface.isLnaCanControl()) {\n            loraFEMInterface.setLNAEnable(validatedLora.fem_lna_mode != meshtastic_Config_LoRaConfig_FEM_LNA_Mode_DISABLED);\n        } else if (validatedLora.fem_lna_mode != meshtastic_Config_LoRaConfig_FEM_LNA_Mode_NOT_PRESENT) {\n            // Hardware FEM does not support LNA control; normalize stored config to match actual capability\n            LOG_WARN(\"FEM LNA mode configured but current FEM does not support LNA control; normalizing to NOT_PRESENT\");\n            validatedLora.fem_lna_mode = meshtastic_Config_LoRaConfig_FEM_LNA_Mode_NOT_PRESENT;\n        }\n#endif\n\n        config.lora = validatedLora; // Finally, return the validated config back to the main config\n\n        break;\n    }\n    case meshtastic_Config_bluetooth_tag:\n        LOG_INFO(\"Set config: Bluetooth\");\n        config.has_bluetooth = true;\n        config.bluetooth = c.payload_variant.bluetooth;\n        break;\n    case meshtastic_Config_security_tag:\n        LOG_INFO(\"Set config: Security\");\n        config.security = c.payload_variant.security;\n#if !(MESHTASTIC_EXCLUDE_PKI_KEYGEN) && !(MESHTASTIC_EXCLUDE_PKI)\n        // If the client set the key to blank, go ahead and regenerate so long as we're not in ham mode\n        if (!owner.is_licensed && config.lora.region != meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n            if (config.security.private_key.size != 32) {\n                crypto->generateKeyPair(config.security.public_key.bytes, config.security.private_key.bytes);\n\n            } else {\n                if (crypto->regeneratePublicKey(config.security.public_key.bytes, config.security.private_key.bytes)) {\n                    config.security.public_key.size = 32;\n                }\n            }\n        }\n#endif\n        owner.public_key.size = config.security.public_key.size;\n        memcpy(owner.public_key.bytes, config.security.public_key.bytes, config.security.public_key.size);\n#if !MESHTASTIC_EXCLUDE_PKI\n        crypto->setDHPrivateKey(config.security.private_key.bytes);\n#endif\n        if (config.security.is_managed && !(config.security.admin_key[0].size == 32 || config.security.admin_key[1].size == 32 ||\n                                            config.security.admin_key[2].size == 32)) {\n            config.security.is_managed = false;\n            const char *warning = \"You must provide at least one admin public key to enable managed mode\";\n            LOG_WARN(warning);\n            sendWarning(warning);\n        }\n\n        if (config.security.debug_log_api_enabled == c.payload_variant.security.debug_log_api_enabled &&\n            config.security.serial_enabled == c.payload_variant.security.serial_enabled)\n            requiresReboot = false;\n\n        break;\n    case meshtastic_Config_device_ui_tag:\n        // NOOP! This is handled by handleStoreDeviceUIConfig\n        break;\n    }\n    if (requiresReboot && !hasOpenEditTransaction) {\n        disableBluetooth();\n    } // end of switch case which_payload_variant\n\n    saveChanges(changes, requiresReboot);\n} // end of handleSetConfig\n\nbool AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c)\n{\n    bool shouldReboot = true;\n    // If we are in an open transaction or configuring MQTT or Serial (which have validation), defer disabling Bluetooth\n    // Otherwise, disable Bluetooth to prevent the phone from interfering with the config\n    if (!hasOpenEditTransaction && !IS_ONE_OF(c.which_payload_variant, meshtastic_ModuleConfig_mqtt_tag,\n                                              meshtastic_ModuleConfig_serial_tag, meshtastic_ModuleConfig_statusmessage_tag)) {\n        disableBluetooth();\n    }\n\n    switch (c.which_payload_variant) {\n    case meshtastic_ModuleConfig_mqtt_tag:\n#if MESHTASTIC_EXCLUDE_MQTT\n        LOG_WARN(\"Set module config: MESHTASTIC_EXCLUDE_MQTT is defined. Not setting MQTT config\");\n        return false;\n#else\n        LOG_INFO(\"Set module config: MQTT\");\n        if (!MQTT::isValidConfig(c.payload_variant.mqtt)) {\n            return false;\n        }\n        // Disable Bluetooth to prevent interference during MQTT configuration\n        disableBluetooth();\n        moduleConfig.has_mqtt = true;\n        moduleConfig.mqtt = c.payload_variant.mqtt;\n#endif\n        break;\n    case meshtastic_ModuleConfig_serial_tag:\n        LOG_INFO(\"Set module config: Serial\");\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) &&               \\\n    !defined(CONFIG_IDF_TARGET_ESP32C3)\n        if (!SerialModule::isValidConfig(c.payload_variant.serial)) {\n            LOG_ERROR(\"Invalid serial config\");\n            return false;\n        }\n        disableBluetooth(); // Disable Bluetooth to prevent interference during Serial configuration\n#endif\n        moduleConfig.has_serial = true;\n        moduleConfig.serial = c.payload_variant.serial;\n        break;\n    case meshtastic_ModuleConfig_external_notification_tag:\n        LOG_INFO(\"Set module config: External Notification\");\n        moduleConfig.has_external_notification = true;\n        moduleConfig.external_notification = c.payload_variant.external_notification;\n        break;\n    case meshtastic_ModuleConfig_store_forward_tag:\n        LOG_INFO(\"Set module config: Store & Forward\");\n        moduleConfig.has_store_forward = true;\n        moduleConfig.store_forward = c.payload_variant.store_forward;\n        break;\n    case meshtastic_ModuleConfig_range_test_tag:\n        LOG_INFO(\"Set module config: Range Test\");\n        moduleConfig.has_range_test = true;\n        moduleConfig.range_test = c.payload_variant.range_test;\n        break;\n    case meshtastic_ModuleConfig_telemetry_tag:\n        LOG_INFO(\"Set module config: Telemetry\");\n        moduleConfig.has_telemetry = true;\n        moduleConfig.telemetry = c.payload_variant.telemetry;\n        break;\n    case meshtastic_ModuleConfig_canned_message_tag:\n        LOG_INFO(\"Set module config: Canned Message\");\n        moduleConfig.has_canned_message = true;\n        moduleConfig.canned_message = c.payload_variant.canned_message;\n        break;\n    case meshtastic_ModuleConfig_audio_tag:\n        LOG_INFO(\"Set module config: Audio\");\n        moduleConfig.has_audio = true;\n        moduleConfig.audio = c.payload_variant.audio;\n        break;\n    case meshtastic_ModuleConfig_remote_hardware_tag:\n        LOG_INFO(\"Set module config: Remote Hardware\");\n        moduleConfig.has_remote_hardware = true;\n        moduleConfig.remote_hardware = c.payload_variant.remote_hardware;\n        break;\n    case meshtastic_ModuleConfig_neighbor_info_tag:\n        LOG_INFO(\"Set module config: Neighbor Info\");\n        moduleConfig.has_neighbor_info = true;\n        if (moduleConfig.neighbor_info.update_interval < min_neighbor_info_broadcast_secs) {\n            LOG_DEBUG(\"Tried to set update_interval too low, setting to %d\", default_neighbor_info_broadcast_secs);\n            moduleConfig.neighbor_info.update_interval = default_neighbor_info_broadcast_secs;\n        }\n        moduleConfig.neighbor_info = c.payload_variant.neighbor_info;\n        break;\n    case meshtastic_ModuleConfig_detection_sensor_tag:\n        LOG_INFO(\"Set module config: Detection Sensor\");\n        moduleConfig.has_detection_sensor = true;\n        moduleConfig.detection_sensor = c.payload_variant.detection_sensor;\n        break;\n    case meshtastic_ModuleConfig_ambient_lighting_tag:\n        LOG_INFO(\"Set module config: Ambient Lighting\");\n        moduleConfig.has_ambient_lighting = true;\n        moduleConfig.ambient_lighting = c.payload_variant.ambient_lighting;\n        break;\n    case meshtastic_ModuleConfig_paxcounter_tag:\n        LOG_INFO(\"Set module config: Paxcounter\");\n        moduleConfig.has_paxcounter = true;\n        moduleConfig.paxcounter = c.payload_variant.paxcounter;\n        break;\n    case meshtastic_ModuleConfig_statusmessage_tag:\n        LOG_INFO(\"Set module config: StatusMessage\");\n        moduleConfig.has_statusmessage = true;\n        moduleConfig.statusmessage = c.payload_variant.statusmessage;\n        shouldReboot = false;\n        break;\n    case meshtastic_ModuleConfig_traffic_management_tag:\n        LOG_INFO(\"Set module config: Traffic Management\");\n        moduleConfig.has_traffic_management = true;\n        moduleConfig.traffic_management = c.payload_variant.traffic_management;\n        break;\n    }\n    saveChanges(SEGMENT_MODULECONFIG, shouldReboot);\n    return true;\n}\n\nvoid AdminModule::handleSetChannel(const meshtastic_Channel &cc)\n{\n    channels.setChannel(cc);\n    if (channels.ensureLicensedOperation()) {\n        sendWarning(licensedModeMessage);\n    }\n    channels.onConfigChanged(); // tell the radios about this change\n    saveChanges(SEGMENT_CHANNELS, false);\n}\n\n/**\n * Getters\n */\n\nvoid AdminModule::handleGetOwner(const meshtastic_MeshPacket &req)\n{\n    if (req.decoded.want_response) {\n        // We create the reply here\n        meshtastic_AdminMessage res = meshtastic_AdminMessage_init_default;\n        res.get_owner_response = owner;\n\n        res.which_payload_variant = meshtastic_AdminMessage_get_owner_response_tag;\n        setPassKey(&res);\n        myReply = allocDataProtobuf(res);\n        if (req.pki_encrypted) {\n            myReply->pki_encrypted = true;\n        }\n    }\n}\n\nvoid AdminModule::handleGetConfig(const meshtastic_MeshPacket &req, const uint32_t configType)\n{\n    meshtastic_AdminMessage res = meshtastic_AdminMessage_init_default;\n\n    if (req.decoded.want_response) {\n        switch (configType) {\n        case meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG:\n            LOG_INFO(\"Get config: Device\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_device_tag;\n            res.get_config_response.payload_variant.device = config.device;\n            break;\n        case meshtastic_AdminMessage_ConfigType_POSITION_CONFIG:\n            LOG_INFO(\"Get config: Position\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_position_tag;\n            res.get_config_response.payload_variant.position = config.position;\n            break;\n        case meshtastic_AdminMessage_ConfigType_POWER_CONFIG:\n            LOG_INFO(\"Get config: Power\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_power_tag;\n            res.get_config_response.payload_variant.power = config.power;\n            break;\n        case meshtastic_AdminMessage_ConfigType_NETWORK_CONFIG:\n            LOG_INFO(\"Get config: Network\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_network_tag;\n            res.get_config_response.payload_variant.network = config.network;\n            writeSecret(res.get_config_response.payload_variant.network.wifi_psk,\n                        sizeof(res.get_config_response.payload_variant.network.wifi_psk), config.network.wifi_psk);\n            break;\n        case meshtastic_AdminMessage_ConfigType_DISPLAY_CONFIG:\n            LOG_INFO(\"Get config: Display\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_display_tag;\n            res.get_config_response.payload_variant.display = config.display;\n            break;\n        case meshtastic_AdminMessage_ConfigType_LORA_CONFIG:\n            LOG_INFO(\"Get config: LoRa\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_lora_tag;\n            res.get_config_response.payload_variant.lora = config.lora;\n            break;\n        case meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG:\n            LOG_INFO(\"Get config: Bluetooth\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_bluetooth_tag;\n            res.get_config_response.payload_variant.bluetooth = config.bluetooth;\n            break;\n        case meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG:\n            LOG_INFO(\"Get config: Security\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_security_tag;\n            res.get_config_response.payload_variant.security = config.security;\n            break;\n        case meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG:\n            LOG_INFO(\"Get config: Sessionkey\");\n            res.get_config_response.which_payload_variant = meshtastic_Config_sessionkey_tag;\n            break;\n        case meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG:\n            // NOOP! This is handled by handleGetDeviceUIConfig\n            res.get_config_response.which_payload_variant = meshtastic_Config_device_ui_tag;\n            break;\n        }\n        // NOTE: The phone app needs to know the ls_secs value so it can properly expect sleep behavior.\n        // So even if we internally use 0 to represent 'use default' we still need to send the value we are\n        // using to the app (so that even old phone apps work with new device loads).\n        // r.get_radio_response.preferences.ls_secs = getPref_ls_secs();\n        // hideSecret(r.get_radio_response.preferences.wifi_ssid); // hmm - leave public for now, because only minimally\n        // private and useful for users to know current provisioning)\n        // hideSecret(r.get_radio_response.preferences.wifi_password); r.get_config_response.which_payloadVariant =\n        // Config_ModuleConfig_telemetry_tag;\n        res.which_payload_variant = meshtastic_AdminMessage_get_config_response_tag;\n        setPassKey(&res);\n        myReply = allocDataProtobuf(res);\n        if (req.pki_encrypted) {\n            myReply->pki_encrypted = true;\n        }\n    }\n}\n\nvoid AdminModule::handleGetModuleConfig(const meshtastic_MeshPacket &req, const uint32_t configType)\n{\n    meshtastic_AdminMessage res = meshtastic_AdminMessage_init_default;\n\n    if (req.decoded.want_response) {\n        const char *configName = \"?\";\n        switch (configType) {\n        case meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG:\n            configName = \"MQTT\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_mqtt_tag;\n            res.get_module_config_response.payload_variant.mqtt = moduleConfig.mqtt;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_SERIAL_CONFIG:\n            configName = \"Serial\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_serial_tag;\n            res.get_module_config_response.payload_variant.serial = moduleConfig.serial;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_EXTNOTIF_CONFIG:\n            configName = \"External Notification\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_external_notification_tag;\n            res.get_module_config_response.payload_variant.external_notification = moduleConfig.external_notification;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_STOREFORWARD_CONFIG:\n            configName = \"Store & Forward\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_store_forward_tag;\n            res.get_module_config_response.payload_variant.store_forward = moduleConfig.store_forward;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_RANGETEST_CONFIG:\n            configName = \"Range Test\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_range_test_tag;\n            res.get_module_config_response.payload_variant.range_test = moduleConfig.range_test;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_TELEMETRY_CONFIG:\n            configName = \"Telemetry\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_telemetry_tag;\n            res.get_module_config_response.payload_variant.telemetry = moduleConfig.telemetry;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_CANNEDMSG_CONFIG:\n            configName = \"Canned Message\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_canned_message_tag;\n            res.get_module_config_response.payload_variant.canned_message = moduleConfig.canned_message;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_AUDIO_CONFIG:\n            configName = \"Audio\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_audio_tag;\n            res.get_module_config_response.payload_variant.audio = moduleConfig.audio;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG:\n            configName = \"Remote Hardware\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_remote_hardware_tag;\n            res.get_module_config_response.payload_variant.remote_hardware = moduleConfig.remote_hardware;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_NEIGHBORINFO_CONFIG:\n            configName = \"Neighbor Info\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_neighbor_info_tag;\n            res.get_module_config_response.payload_variant.neighbor_info = moduleConfig.neighbor_info;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_DETECTIONSENSOR_CONFIG:\n            configName = \"Detection Sensor\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_detection_sensor_tag;\n            res.get_module_config_response.payload_variant.detection_sensor = moduleConfig.detection_sensor;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_AMBIENTLIGHTING_CONFIG:\n            configName = \"Ambient Lighting\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_ambient_lighting_tag;\n            res.get_module_config_response.payload_variant.ambient_lighting = moduleConfig.ambient_lighting;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG:\n            configName = \"Paxcounter\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_paxcounter_tag;\n            res.get_module_config_response.payload_variant.paxcounter = moduleConfig.paxcounter;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_STATUSMESSAGE_CONFIG:\n            configName = \"StatusMessage\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_statusmessage_tag;\n            res.get_module_config_response.payload_variant.statusmessage = moduleConfig.statusmessage;\n            break;\n        case meshtastic_AdminMessage_ModuleConfigType_TRAFFICMANAGEMENT_CONFIG:\n            configName = \"Traffic Management\";\n            res.get_module_config_response.which_payload_variant = meshtastic_ModuleConfig_traffic_management_tag;\n            res.get_module_config_response.payload_variant.traffic_management = moduleConfig.traffic_management;\n            break;\n        }\n        LOG_INFO(\"Get module config: %s\", configName);\n\n        // NOTE: The phone app needs to know the ls_secsvalue so it can properly expect sleep behavior.\n        // So even if we internally use 0 to represent 'use default' we still need to send the value we are\n        // using to the app (so that even old phone apps work with new device loads).\n        // r.get_radio_response.preferences.ls_secs = getPref_ls_secs();\n        // hideSecret(r.get_radio_response.preferences.wifi_ssid); // hmm - leave public for now, because only minimally\n        // private and useful for users to know current provisioning)\n        // hideSecret(r.get_radio_response.preferences.wifi_password); r.get_config_response.which_payloadVariant =\n        // Config_ModuleConfig_telemetry_tag;\n        res.which_payload_variant = meshtastic_AdminMessage_get_module_config_response_tag;\n        setPassKey(&res);\n        myReply = allocDataProtobuf(res);\n        if (req.pki_encrypted) {\n            myReply->pki_encrypted = true;\n        }\n    }\n}\n\nvoid AdminModule::handleGetNodeRemoteHardwarePins(const meshtastic_MeshPacket &req)\n{\n    meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default;\n    r.which_payload_variant = meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag;\n    for (uint8_t i = 0; i < devicestate.node_remote_hardware_pins_count; i++) {\n        if (devicestate.node_remote_hardware_pins[i].node_num == 0 || !devicestate.node_remote_hardware_pins[i].has_pin) {\n            continue;\n        }\n        r.get_node_remote_hardware_pins_response.node_remote_hardware_pins[i] = devicestate.node_remote_hardware_pins[i];\n    }\n    for (uint8_t i = 0; i < moduleConfig.remote_hardware.available_pins_count; i++) {\n        if (!moduleConfig.remote_hardware.available_pins[i].gpio_pin) {\n            continue;\n        }\n        meshtastic_NodeRemoteHardwarePin nodePin = meshtastic_NodeRemoteHardwarePin_init_default;\n        nodePin.node_num = nodeDB->getNodeNum();\n        nodePin.pin = moduleConfig.remote_hardware.available_pins[i];\n        r.get_node_remote_hardware_pins_response.node_remote_hardware_pins[i + 12] = nodePin;\n    }\n    setPassKey(&r);\n    myReply = allocDataProtobuf(r);\n    if (req.pki_encrypted) {\n        myReply->pki_encrypted = true;\n    }\n}\n\nvoid AdminModule::handleGetDeviceMetadata(const meshtastic_MeshPacket &req)\n{\n    meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default;\n    r.get_device_metadata_response = getDeviceMetadata();\n    r.which_payload_variant = meshtastic_AdminMessage_get_device_metadata_response_tag;\n    setPassKey(&r);\n    myReply = allocDataProtobuf(r);\n    if (req.pki_encrypted) {\n        myReply->pki_encrypted = true;\n    }\n}\n\nvoid AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &req)\n{\n    meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default;\n\n    meshtastic_DeviceConnectionStatus conn = meshtastic_DeviceConnectionStatus_init_zero;\n\n#if HAS_WIFI\n    conn.has_wifi = true;\n    conn.wifi.has_status = true;\n#ifdef ARCH_PORTDUINO\n    conn.wifi.status.is_connected = true;\n#else\n    conn.wifi.status.is_connected = WiFi.status() == WL_CONNECTED;\n#endif\n    strncpy(conn.wifi.ssid, config.network.wifi_ssid, 33);\n    if (conn.wifi.status.is_connected) {\n        conn.wifi.rssi = WiFi.RSSI();\n        conn.wifi.status.ip_address = WiFi.localIP();\n#ifndef MESHTASTIC_EXCLUDE_MQTT\n        conn.wifi.status.is_mqtt_connected = mqtt && mqtt->isConnectedDirectly();\n#endif\n        conn.wifi.status.is_syslog_connected = false; // FIXME wire this up\n    }\n#endif\n\n#if HAS_ETHERNET && !defined(USE_WS5500)\n    conn.has_ethernet = true;\n    conn.ethernet.has_status = true;\n    if (Ethernet.linkStatus() == LinkON) {\n        conn.ethernet.status.is_connected = true;\n        conn.ethernet.status.ip_address = Ethernet.localIP();\n#if !MESHTASTIC_EXCLUDE_MQTT\n        conn.ethernet.status.is_mqtt_connected = mqtt && mqtt->isConnectedDirectly();\n#endif\n        conn.ethernet.status.is_syslog_connected = false; // FIXME wire this up\n    } else {\n        conn.ethernet.status.is_connected = false;\n    }\n#endif\n\n#if HAS_BLUETOOTH\n    conn.has_bluetooth = true;\n    conn.bluetooth.pin = config.bluetooth.fixed_pin;\n#ifdef ARCH_ESP32\n    if (config.bluetooth.enabled && nimbleBluetooth) {\n        conn.bluetooth.is_connected = nimbleBluetooth->isConnected();\n        conn.bluetooth.rssi = nimbleBluetooth->getRssi();\n    }\n#elif defined(ARCH_NRF52)\n    if (config.bluetooth.enabled && nrf52Bluetooth) {\n        conn.bluetooth.is_connected = nrf52Bluetooth->isConnected();\n    }\n#endif\n#endif\n    conn.has_serial = true; // No serial-less devices\n#if !MESHTASTIC_EXCLUDE_POWER_FSM\n    conn.serial.is_connected = powerFSM.getState() == &stateSERIAL;\n#else\n    conn.serial.is_connected = powerFSM.getState();\n#endif\n    conn.serial.baud = SERIAL_BAUD;\n\n    r.get_device_connection_status_response = conn;\n    r.which_payload_variant = meshtastic_AdminMessage_get_device_connection_status_response_tag;\n    setPassKey(&r);\n    myReply = allocDataProtobuf(r);\n    if (req.pki_encrypted) {\n        myReply->pki_encrypted = true;\n    }\n}\n\nvoid AdminModule::handleGetChannel(const meshtastic_MeshPacket &req, uint32_t channelIndex)\n{\n    if (req.decoded.want_response) {\n        // We create the reply here\n        meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default;\n        r.get_channel_response = channels.getByIndex(channelIndex);\n        r.which_payload_variant = meshtastic_AdminMessage_get_channel_response_tag;\n        setPassKey(&r);\n        myReply = allocDataProtobuf(r);\n        if (req.pki_encrypted) {\n            myReply->pki_encrypted = true;\n        }\n    }\n}\n\nvoid AdminModule::handleGetDeviceUIConfig(const meshtastic_MeshPacket &req)\n{\n    meshtastic_AdminMessage r = meshtastic_AdminMessage_init_default;\n    r.which_payload_variant = meshtastic_AdminMessage_get_ui_config_response_tag;\n    r.get_ui_config_response = uiconfig;\n    myReply = allocDataProtobuf(r);\n    if (req.pki_encrypted) {\n        myReply->pki_encrypted = true;\n    }\n}\n\nvoid AdminModule::reboot(int32_t seconds)\n{\n    LOG_INFO(\"Reboot in %d seconds\", seconds);\n    if (screen)\n        screen->showSimpleBanner(\"Rebooting...\", 0); // stays on screen\n    rebootAtMsec = (seconds < 0) ? 0 : (millis() + seconds * 1000);\n}\n\nvoid AdminModule::saveChanges(int saveWhat, bool shouldReboot)\n{\n    if (!hasOpenEditTransaction) {\n        LOG_INFO(\"Save changes to disk\");\n        service->reloadConfig(saveWhat); // Calls saveToDisk among other things\n    } else {\n        LOG_INFO(\"Delay save of changes to disk until the open transaction is committed\");\n    }\n    if (shouldReboot && !hasOpenEditTransaction) {\n        reboot(DEFAULT_REBOOT_SECONDS);\n    }\n}\n\nvoid AdminModule::handleStoreDeviceUIConfig(const meshtastic_DeviceUIConfig &uicfg)\n{\n    nodeDB->saveProto(\"/prefs/uiconfig.proto\", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg, &uicfg);\n}\n\nvoid AdminModule::handleSetHamMode(const meshtastic_HamParameters &p)\n{\n    // Validate ham parameters before setting since this would bypass validation in the owner struct\n    const char *fieldsToCheck[] = {p.call_sign, p.short_name};\n    const char *fieldNames[] = {\"call_sign\", \"short_name\"};\n    for (int i = 0; i < 2; i++) {\n        if (*fieldsToCheck[i]) {\n            const char *start = fieldsToCheck[i];\n            while (*start && isspace((unsigned char)*start))\n                start++;\n            if (*start == '\\0') {\n                LOG_WARN(\"Rejected ham %s: must contain at least 1 non-whitespace character\", fieldNames[i]);\n                return;\n            }\n        }\n    }\n\n    // Set call sign and override lora limitations for licensed use\n    strncpy(owner.long_name, p.call_sign, sizeof(owner.long_name));\n    strncpy(owner.short_name, p.short_name, sizeof(owner.short_name));\n    owner.is_licensed = true;\n    config.lora.override_duty_cycle = true;\n    config.lora.tx_power = p.tx_power;\n    config.lora.override_frequency = p.frequency;\n    // Set node info broadcast interval to 10 minutes\n    // For FCC minimum call-sign announcement\n    config.device.node_info_broadcast_secs = 600;\n\n    config.device.rebroadcast_mode = meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY;\n    // Remove PSK of primary channel for plaintext amateur usage\n\n    if (channels.ensureLicensedOperation()) {\n        sendWarning(licensedModeMessage);\n    }\n    channels.onConfigChanged();\n\n    service->reloadOwner(false);\n    saveChanges(SEGMENT_CONFIG | SEGMENT_NODEDATABASE | SEGMENT_DEVICESTATE | SEGMENT_CHANNELS);\n}\n\nAdminModule::AdminModule() : ProtobufModule(\"Admin\", meshtastic_PortNum_ADMIN_APP, &meshtastic_AdminMessage_msg)\n{\n    // restrict to the admin channel for rx\n    // boundChannel = Channels::adminChannel;\n}\n\nvoid AdminModule::setPassKey(meshtastic_AdminMessage *res)\n{\n    if (session_time == 0 || millis() / 1000 > session_time + 150) {\n        for (int i = 0; i < 8; i++) {\n            session_passkey[i] = random();\n        }\n        session_time = millis() / 1000;\n    }\n    memcpy(res->session_passkey.bytes, session_passkey, 8);\n    res->session_passkey.size = 8;\n    printBytes(\"Set admin key to \", res->session_passkey.bytes, 8);\n    // if halfway to session_expire, regenerate session_passkey, reset the timeout\n    // set the key in the packet\n}\n\nbool AdminModule::checkPassKey(meshtastic_AdminMessage *res)\n{ // check that the key in the packet is still valid\n    printBytes(\"Incoming session key: \", res->session_passkey.bytes, 8);\n    printBytes(\"Expected session key: \", session_passkey, 8);\n    return (session_time + 300 > millis() / 1000 && res->session_passkey.size == 8 &&\n            memcmp(res->session_passkey.bytes, session_passkey, 8) == 0);\n}\n\nbool AdminModule::messageIsResponse(const meshtastic_AdminMessage *r)\n{\n    if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_owner_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_config_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_module_config_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_canned_message_module_messages_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_device_metadata_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_ringtone_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_device_connection_status_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_ui_config_response_tag)\n        return true;\n    else\n        return false;\n}\n\nbool AdminModule::messageIsRequest(const meshtastic_AdminMessage *r)\n{\n    if (r->which_payload_variant == meshtastic_AdminMessage_get_channel_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_owner_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_config_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_module_config_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_canned_message_module_messages_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_device_metadata_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_ringtone_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_device_connection_status_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_node_remote_hardware_pins_request_tag ||\n        r->which_payload_variant == meshtastic_AdminMessage_get_ui_config_request_tag)\n        return true;\n    else\n        return false;\n}\n\nvoid AdminModule::handleSendInputEvent(const meshtastic_AdminMessage_InputEvent &inputEvent)\n{\n    LOG_DEBUG(\"Processing input event: event_code=%u, kb_char=%u, touch_x=%u, touch_y=%u\", inputEvent.event_code,\n              inputEvent.kb_char, inputEvent.touch_x, inputEvent.touch_y);\n\n    // Create InputEvent for injection\n    InputEvent event = {.inputEvent = (input_broker_event)inputEvent.event_code,\n                        .kbchar = (unsigned char)inputEvent.kb_char,\n                        .touchX = inputEvent.touch_x,\n                        .touchY = inputEvent.touch_y};\n\n    // Log the event being injected\n    LOG_INFO(\"Injecting input event from admin: source=%s, event=%u, char=%c(%u), touch=(%u,%u)\", event.source, event.inputEvent,\n             (event.kbchar >= 32 && event.kbchar <= 126) ? event.kbchar : '?', event.kbchar, event.touchX, event.touchY);\n\n    // Wake the device if asleep\n    powerFSM.trigger(EVENT_INPUT);\n#if !defined(MESHTASTIC_EXCLUDE_INPUTBROKER)\n    // Inject the event through InputBroker\n    if (inputBroker) {\n        inputBroker->injectInputEvent(&event);\n    } else {\n        LOG_ERROR(\"InputBroker not available for event injection\");\n    }\n#endif\n}\n\nvoid AdminModule::sendWarning(const char *format, ...)\n{\n    meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n    if (!cn)\n        return;\n\n    cn->level = meshtastic_LogRecord_Level_WARNING;\n    cn->time = getValidTime(RTCQualityFromNet);\n\n    va_list args;\n    va_start(args, format);\n    // Format the arguments directly into the notification object\n    vsnprintf(cn->message, sizeof(cn->message), format, args);\n    va_end(args);\n\n    service->sendClientNotification(cn);\n}\n\nvoid AdminModule::sendWarningAndLog(const char *format, ...)\n{\n    // We need a temporary buffer to hold the formatted text so we can log it\n    // Using 250 bytes as a safe upper limit for typical text notifications\n    char buf[250];\n\n    va_list args;\n    va_start(args, format);\n    vsnprintf(buf, sizeof(buf), format, args);\n    va_end(args);\n\n    LOG_WARN(buf);\n    // 2. Call sendWarning\n    // SECURITY NOTE: We pass \"%s\", buf instead of just 'buf'.\n    // If 'buf' contained a % symbol (e.g. \"Battery 50%\"), passing it directly\n    // would crash sendWarning. \"%s\" treats it purely as text.\n    sendWarning(\"%s\", buf);\n}\n\nvoid disableBluetooth()\n{\n#if HAS_BLUETOOTH\n#ifdef ARCH_ESP32\n    if (nimbleBluetooth)\n        nimbleBluetooth->deinit();\n#elif defined(ARCH_NRF52)\n    if (nrf52Bluetooth)\n        nrf52Bluetooth->shutdown();\n#endif\n#endif\n}\n"
  },
  {
    "path": "src/modules/AdminModule.h",
    "content": "#pragma once\n#ifdef ESP_PLATFORM\n#include <esp_ota_ops.h>\n#endif\n#include \"ProtobufModule.h\"\n#include <sys/types.h>\n#if HAS_WIFI\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n\n/**\n * Datatype passed to Observers by AdminModule, to allow external handling of admin messages\n */\nstruct AdminModule_ObserverData {\n    const meshtastic_AdminMessage *request;\n    meshtastic_AdminMessage *response;\n    AdminMessageHandleResult *result;\n};\n\n/**\n * Admin module for admin messages\n */\nclass AdminModule : public ProtobufModule<meshtastic_AdminMessage>, public Observable<AdminModule_ObserverData *>\n{\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    AdminModule();\n\n  protected:\n    /** Called to handle a particular incoming message\n\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *p) override;\n\n  private:\n    bool hasOpenEditTransaction = false;\n\n    uint8_t session_passkey[8] = {0};\n    uint session_time = 0;\n\n    void saveChanges(int saveWhat, bool shouldReboot = true);\n\n    /**\n     * Getters\n     */\n    void handleGetModuleConfigResponse(const meshtastic_MeshPacket &req, meshtastic_AdminMessage *p);\n    void handleGetOwner(const meshtastic_MeshPacket &req);\n    void handleGetConfig(const meshtastic_MeshPacket &req, uint32_t configType);\n    void handleGetModuleConfig(const meshtastic_MeshPacket &req, uint32_t configType);\n    void handleGetChannel(const meshtastic_MeshPacket &req, uint32_t channelIndex);\n    void handleGetDeviceMetadata(const meshtastic_MeshPacket &req);\n    void handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &req);\n    void handleGetNodeRemoteHardwarePins(const meshtastic_MeshPacket &req);\n    void handleGetDeviceUIConfig(const meshtastic_MeshPacket &req);\n    /**\n     * Setters\n     */\n    void handleSetOwner(const meshtastic_User &o);\n    void handleSetChannel(const meshtastic_Channel &cc);\n\n  protected:\n    void handleSetConfig(const meshtastic_Config &c, bool fromOthers);\n\n  private:\n    bool handleSetModuleConfig(const meshtastic_ModuleConfig &c);\n    void handleSetChannel();\n    void handleSetHamMode(const meshtastic_HamParameters &req);\n    void handleStoreDeviceUIConfig(const meshtastic_DeviceUIConfig &uicfg);\n    void handleSendInputEvent(const meshtastic_AdminMessage_InputEvent &inputEvent);\n    void reboot(int32_t seconds);\n\n    void setPassKey(meshtastic_AdminMessage *res);\n    bool checkPassKey(meshtastic_AdminMessage *res);\n\n    bool messageIsResponse(const meshtastic_AdminMessage *r);\n    bool messageIsRequest(const meshtastic_AdminMessage *r);\n    void sendWarning(const char *format, ...) __attribute__((format(printf, 2, 3)));\n    void sendWarningAndLog(const char *format, ...) __attribute__((format(printf, 2, 3)));\n};\n\nstatic constexpr const char *licensedModeMessage =\n    \"Licensed mode activated, removing admin channel and encryption from all channels\";\n\nextern AdminModule *adminModule;\n\nvoid disableBluetooth();"
  },
  {
    "path": "src/modules/AtakPluginModule.cpp",
    "content": "#include \"AtakPluginModule.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"mesh/compression/unishox2.h\"\n#include \"meshUtils.h\"\n#include \"meshtastic/atak.pb.h\"\n\nAtakPluginModule *atakPluginModule;\n\nAtakPluginModule::AtakPluginModule()\n    : ProtobufModule(\"atak\", meshtastic_PortNum_ATAK_PLUGIN, &meshtastic_TAKPacket_msg), concurrency::OSThread(\"AtakPlugin\")\n{\n    ourPortNum = meshtastic_PortNum_ATAK_PLUGIN;\n}\n\n/*\nEncompasses the full construction and sending packet to mesh\nWill be used for broadcast.\n*/\nint32_t AtakPluginModule::runOnce()\n{\n    return default_broadcast_interval_secs;\n}\n\nbool AtakPluginModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_TAKPacket *r)\n{\n    return false;\n}\n\nmeshtastic_TAKPacket AtakPluginModule::cloneTAKPacketData(meshtastic_TAKPacket *t)\n{\n    meshtastic_TAKPacket clone = meshtastic_TAKPacket_init_zero;\n    if (t->has_group) {\n        clone.has_group = true;\n        clone.group = t->group;\n    }\n    if (t->has_status) {\n        clone.has_status = true;\n        clone.status = t->status;\n    }\n    if (t->has_contact) {\n        clone.has_contact = true;\n        clone.contact = {0};\n    }\n\n    if (t->which_payload_variant == meshtastic_TAKPacket_pli_tag) {\n        clone.which_payload_variant = meshtastic_TAKPacket_pli_tag;\n        clone.payload_variant.pli = t->payload_variant.pli;\n    } else if (t->which_payload_variant == meshtastic_TAKPacket_chat_tag) {\n        clone.which_payload_variant = meshtastic_TAKPacket_chat_tag;\n        clone.payload_variant.chat = {0};\n    } else if (t->which_payload_variant == meshtastic_TAKPacket_detail_tag) {\n        clone.which_payload_variant = meshtastic_TAKPacket_detail_tag;\n        clone.payload_variant.detail.size = t->payload_variant.detail.size;\n        memcpy(clone.payload_variant.detail.bytes, t->payload_variant.detail.bytes, t->payload_variant.detail.size);\n    }\n\n    return clone;\n}\n\nvoid AtakPluginModule::alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_TAKPacket *t)\n{\n    // From Phone (EUD)\n    if (mp.from == 0) {\n        LOG_DEBUG(\"Received uncompressed TAK payload from phone: %d bytes\", mp.decoded.payload.size);\n        // Compress for LoRA transport\n        auto compressed = cloneTAKPacketData(t);\n        compressed.is_compressed = true;\n        if (t->has_contact) {\n            auto length = unishox2_compress_lines(\n                t->contact.callsign, pb_string_length(t->contact.callsign, sizeof(t->contact.callsign)),\n                compressed.contact.callsign, sizeof(compressed.contact.callsign) - 1, USX_PSET_DFLT, NULL);\n            if (length < 0) {\n                LOG_WARN(\"Compress overflow contact.callsign. Revert to uncompressed packet\");\n                return;\n            }\n            LOG_DEBUG(\"Compressed callsign: %d bytes\", length);\n            length = unishox2_compress_lines(\n                t->contact.device_callsign, pb_string_length(t->contact.device_callsign, sizeof(t->contact.device_callsign)),\n                compressed.contact.device_callsign, sizeof(compressed.contact.device_callsign) - 1, USX_PSET_DFLT, NULL);\n            if (length < 0) {\n                LOG_WARN(\"Compress overflow contact.device_callsign. Revert to uncompressed packet\");\n                return;\n            }\n            LOG_DEBUG(\"Compressed device_callsign: %d bytes\", length);\n        }\n        if (t->which_payload_variant == meshtastic_TAKPacket_chat_tag) {\n            auto length = unishox2_compress_lines(\n                t->payload_variant.chat.message,\n                pb_string_length(t->payload_variant.chat.message, sizeof(t->payload_variant.chat.message)),\n                compressed.payload_variant.chat.message, sizeof(compressed.payload_variant.chat.message) - 1, USX_PSET_DFLT,\n                NULL);\n            if (length < 0) {\n                LOG_WARN(\"Compress overflow chat.message. Revert to uncompressed packet\");\n                return;\n            }\n            LOG_DEBUG(\"Compressed chat message: %d bytes\", length);\n\n            if (t->payload_variant.chat.has_to) {\n                compressed.payload_variant.chat.has_to = true;\n                length = unishox2_compress_lines(\n                    t->payload_variant.chat.to, pb_string_length(t->payload_variant.chat.to, sizeof(t->payload_variant.chat.to)),\n                    compressed.payload_variant.chat.to, sizeof(compressed.payload_variant.chat.to) - 1, USX_PSET_DFLT, NULL);\n                if (length < 0) {\n                    LOG_WARN(\"Compress overflow chat.to. Revert to uncompressed packet\");\n                    return;\n                }\n                LOG_DEBUG(\"Compressed chat to: %d bytes\", length);\n            }\n\n            if (t->payload_variant.chat.has_to_callsign) {\n                compressed.payload_variant.chat.has_to_callsign = true;\n                length = unishox2_compress_lines(\n                    t->payload_variant.chat.to_callsign,\n                    pb_string_length(t->payload_variant.chat.to_callsign, sizeof(t->payload_variant.chat.to_callsign)),\n                    compressed.payload_variant.chat.to_callsign, sizeof(compressed.payload_variant.chat.to_callsign) - 1,\n                    USX_PSET_DFLT, NULL);\n                if (length < 0) {\n                    LOG_WARN(\"Compress overflow chat.to_callsign. Revert to uncompressed packet\");\n                    return;\n                }\n                LOG_DEBUG(\"Compressed chat to_callsign: %d bytes\", length);\n            }\n        }\n        mp.decoded.payload.size = pb_encode_to_bytes(mp.decoded.payload.bytes, sizeof(mp.decoded.payload.bytes),\n                                                     meshtastic_TAKPacket_fields, &compressed);\n        LOG_DEBUG(\"Final payload: %d bytes\", mp.decoded.payload.size);\n    } else {\n        if (!t->is_compressed) {\n            // Not compressed. Something is wrong\n            LOG_WARN(\"Received uncompressed TAKPacket over radio! Skip\");\n            return;\n        }\n\n        // Decompress for Phone (EUD)\n        auto uncompressed = cloneTAKPacketData(t);\n        uncompressed.is_compressed = false;\n        if (t->has_contact) {\n            auto length = unishox2_decompress_lines(\n                t->contact.callsign, pb_string_length(t->contact.callsign, sizeof(t->contact.callsign)),\n                uncompressed.contact.callsign, sizeof(uncompressed.contact.callsign) - 1, USX_PSET_DFLT, NULL);\n            if (length < 0) {\n                LOG_WARN(\"Decompress overflow contact.callsign. Bailing out\");\n                return;\n            }\n            LOG_DEBUG(\"Decompressed callsign: %d bytes\", length);\n\n            length = unishox2_decompress_lines(\n                t->contact.device_callsign, pb_string_length(t->contact.device_callsign, sizeof(t->contact.device_callsign)),\n                uncompressed.contact.device_callsign, sizeof(uncompressed.contact.device_callsign) - 1, USX_PSET_DFLT, NULL);\n            if (length < 0) {\n                LOG_WARN(\"Decompress overflow contact.device_callsign. Bailing out\");\n                return;\n            }\n            LOG_DEBUG(\"Decompressed device_callsign: %d bytes\", length);\n        }\n        if (uncompressed.which_payload_variant == meshtastic_TAKPacket_chat_tag) {\n            auto length = unishox2_decompress_lines(\n                t->payload_variant.chat.message,\n                pb_string_length(t->payload_variant.chat.message, sizeof(t->payload_variant.chat.message)),\n                uncompressed.payload_variant.chat.message, sizeof(uncompressed.payload_variant.chat.message) - 1, USX_PSET_DFLT,\n                NULL);\n            if (length < 0) {\n                LOG_WARN(\"Decompress overflow chat.message. Bailing out\");\n                return;\n            }\n            LOG_DEBUG(\"Decompressed chat message: %d bytes\", length);\n\n            if (t->payload_variant.chat.has_to) {\n                uncompressed.payload_variant.chat.has_to = true;\n                length = unishox2_decompress_lines(\n                    t->payload_variant.chat.to, pb_string_length(t->payload_variant.chat.to, sizeof(t->payload_variant.chat.to)),\n                    uncompressed.payload_variant.chat.to, sizeof(uncompressed.payload_variant.chat.to) - 1, USX_PSET_DFLT, NULL);\n                if (length < 0) {\n                    LOG_WARN(\"Decompress overflow chat.to. Bailing out\");\n                    return;\n                }\n                LOG_DEBUG(\"Decompressed chat to: %d bytes\", length);\n            }\n\n            if (t->payload_variant.chat.has_to_callsign) {\n                uncompressed.payload_variant.chat.has_to_callsign = true;\n                length = unishox2_decompress_lines(\n                    t->payload_variant.chat.to_callsign,\n                    pb_string_length(t->payload_variant.chat.to_callsign, sizeof(t->payload_variant.chat.to_callsign)),\n                    uncompressed.payload_variant.chat.to_callsign, sizeof(uncompressed.payload_variant.chat.to_callsign) - 1,\n                    USX_PSET_DFLT, NULL);\n                if (length < 0) {\n                    LOG_WARN(\"Decompress overflow chat.to_callsign. Bailing out\");\n                    return;\n                }\n                LOG_DEBUG(\"Decompressed chat to_callsign: %d bytes\", length);\n            }\n        }\n        auto decompressedCopy = packetPool.allocCopy(mp);\n        decompressedCopy->decoded.payload.size =\n            pb_encode_to_bytes(decompressedCopy->decoded.payload.bytes, sizeof(decompressedCopy->decoded.payload),\n                               meshtastic_TAKPacket_fields, &uncompressed);\n\n        service->sendToPhone(decompressedCopy);\n    }\n    return;\n}"
  },
  {
    "path": "src/modules/AtakPluginModule.h",
    "content": "#pragma once\n#include \"ProtobufModule.h\"\n#include \"meshtastic/atak.pb.h\"\n\n/**\n * Waypoint message handling for meshtastic\n */\nclass AtakPluginModule : public ProtobufModule<meshtastic_TAKPacket>, private concurrency::OSThread\n{\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    AtakPluginModule();\n\n  protected:\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_TAKPacket *t) override;\n    virtual void alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_TAKPacket *t) override;\n    /* Does our periodic broadcast */\n    int32_t runOnce() override;\n\n  private:\n    meshtastic_TAKPacket cloneTAKPacketData(meshtastic_TAKPacket *t);\n};\n\nextern AtakPluginModule *atakPluginModule;"
  },
  {
    "path": "src/modules/CannedMessageModule.cpp",
    "content": "#include \"configuration.h\"\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#endif\n#if HAS_SCREEN\n#include \"CannedMessageModule.h\"\n#include \"Channels.h\"\n#include \"FSCommon.h\"\n#include \"MeshService.h\"\n#include \"MessageStore.h\"\n#include \"NodeDB.h\"\n#include \"SPILock.h\"\n#include \"buzz.h\"\n#include \"detect/ScanI2C.h\"\n#include \"gps/RTC.h\"\n#include \"graphics/EmoteRenderer.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/draw/MessageRenderer.h\"\n#include \"graphics/draw/NotificationRenderer.h\"\n#include \"graphics/draw/UIRenderer.h\"\n#include \"graphics/emotes.h\"\n#include \"graphics/images.h\"\n#include \"input/SerialKeyboard.h\"\n#include \"main.h\" // for cardkb_found\n#include \"mesh/generated/meshtastic/cannedmessages.pb.h\"\n#include \"modules/AdminModule.h\"\n#include \"modules/ExternalNotificationModule.h\" // for buzzer control\nextern MessageStore messageStore;\n#if HAS_TRACKBALL\n#include \"input/TrackballInterruptImpl1.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n#if defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY)\n#include \"graphics/EInkDynamicDisplay.h\" // To select between full and fast refresh on E-Ink displays\n#endif\n\n#ifndef INPUTBROKER_MATRIX_TYPE\n#define INPUTBROKER_MATRIX_TYPE 0\n#endif\n\n#include \"graphics/ScreenFonts.h\"\n#include <Throttle.h>\n\n// Remove Canned message screen if no action is taken for some milliseconds\n#define INACTIVATE_AFTER_MS 20000\n\nnamespace graphics\n{\nextern int bannerSignalBars;\n}\nextern ScanI2C::DeviceAddress cardkb_found;\nextern bool osk_found;\n\nstatic const char *cannedMessagesConfigFile = \"/prefs/cannedConf.proto\";\nstatic NodeNum lastDest = NODENUM_BROADCAST;\nstatic uint8_t lastChannel = 0;\nstatic bool lastDestSet = false;\n\nmeshtastic_CannedMessageModuleConfig cannedMessageModuleConfig;\n\nCannedMessageModule *cannedMessageModule;\n\nCannedMessageModule::CannedMessageModule()\n    : SinglePortModule(\"canned\", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread(\"CannedMessage\")\n{\n    this->loadProtoForModule();\n    if ((this->splitConfiguredMessages() <= 0) && (cardkb_found.address == 0x00) && !INPUTBROKER_MATRIX_TYPE) {\n        LOG_INFO(\"CannedMessageModule: No messages are configured. Module is disabled\");\n        this->updateState(CANNED_MESSAGE_RUN_STATE_DISABLED);\n        disable();\n    } else {\n        LOG_INFO(\"CannedMessageModule is enabled\");\n        moduleConfig.canned_message.enabled = true;\n        this->inputObserver.observe(inputBroker);\n    }\n}\n\nvoid CannedMessageModule::LaunchWithDestination(NodeNum newDest, uint8_t newChannel)\n{\n    // Do NOT override explicit broadcast replies\n    // Only reuse lastDest in LaunchRepeatDestination()\n\n    dest = newDest;\n    channel = newChannel;\n\n    lastDest = dest;\n    lastChannel = channel;\n    lastDestSet = true;\n\n    // Upon activation, highlight \"[Select Destination]\"\n    int selectDestination = 0;\n    for (int i = 0; i < messagesCount; ++i) {\n        if (strcmp(messages[i], \"[Select Destination]\") == 0) {\n            selectDestination = i;\n            break;\n        }\n    }\n    currentMessageIndex = selectDestination;\n\n    // This triggers the canned message list\n    updateState(CANNED_MESSAGE_RUN_STATE_ACTIVE, true);\n    UIFrameEvent e;\n    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n    notifyObservers(&e);\n\n    LOG_DEBUG(\"[CannedMessage] LaunchWithDestination dest=0x%08x ch=%d\", dest, channel);\n}\n\nvoid CannedMessageModule::LaunchRepeatDestination()\n{\n    if (!lastDestSet) {\n        LaunchWithDestination(NODENUM_BROADCAST, 0);\n    } else {\n        LaunchWithDestination(lastDest, lastChannel);\n    }\n}\n\nvoid CannedMessageModule::LaunchFreetextWithDestination(NodeNum newDest, uint8_t newChannel)\n{\n    // Do NOT override explicit broadcast replies\n    // Only reuse lastDest in LaunchRepeatDestination()\n\n    dest = newDest;\n    channel = newChannel;\n\n    lastDest = dest;\n    lastChannel = channel;\n    lastDestSet = true;\n\n    updateState(CANNED_MESSAGE_RUN_STATE_FREETEXT, true);\n    UIFrameEvent e;\n    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n    notifyObservers(&e);\n\n    LOG_DEBUG(\"[CannedMessage] LaunchFreetextWithDestination dest=0x%08x ch=%d\", dest, channel);\n}\n\nstatic bool returnToCannedList = false;\nbool hasKeyForNode(const meshtastic_NodeInfoLite *node)\n{\n    return node && node->has_user && node->user.public_key.size > 0;\n}\n/**\n * @brief Items in array this->messages will be set to be pointing on the right\n *     starting points of the string this->messageStore\n *\n * @return int Returns the number of messages found.\n */\n\nint CannedMessageModule::splitConfiguredMessages()\n{\n    int i = 0;\n\n    String canned_messages = cannedMessageModuleConfig.messages;\n\n    // Copy all message parts into the buffer\n    strncpy(this->messageBuffer, canned_messages.c_str(), sizeof(this->messageBuffer));\n\n    // Temporary array to allow for insertion\n    const char *tempMessages[CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT + 3] = {0};\n    int tempCount = 0;\n    // Insert at position 0 (top)\n    tempMessages[tempCount++] = \"[Select Destination]\";\n#if defined(USE_VIRTUAL_KEYBOARD)\n    // Add a \"Free Text\" entry at the top if using a touch screen virtual keyboard\n    tempMessages[tempCount++] = \"[-- Free Text --]\";\n#else\n    if (osk_found && screen) {\n        tempMessages[tempCount++] = \"[-- Free Text --]\";\n    }\n#endif\n\n    // First message always starts at buffer start\n    tempMessages[tempCount++] = this->messageBuffer;\n    int upTo = strlen(this->messageBuffer) - 1;\n\n    // Walk buffer, splitting on '|'\n    while (i < upTo) {\n        if (this->messageBuffer[i] == '|') {\n            this->messageBuffer[i] = '\\0'; // End previous message\n            if (tempCount >= CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT)\n                break;\n            tempMessages[tempCount++] = (this->messageBuffer + i + 1);\n        }\n        i += 1;\n    }\n\n    // Add [Exit] as the last entry\n    tempMessages[tempCount++] = \"[Exit]\";\n\n    // Copy to the member array\n    for (int k = 0; k < tempCount; ++k) {\n        this->messages[k] = (char *)tempMessages[k];\n    }\n    this->messagesCount = tempCount;\n\n    return this->messagesCount;\n}\nvoid CannedMessageModule::drawHeader(OLEDDisplay *display, int16_t x, int16_t y, char *buffer)\n{\n    (void)buffer;\n\n    char header[96];\n    if (this->dest == NODENUM_BROADCAST) {\n        const char *channelName = channels.getName(this->channel);\n        snprintf(header, sizeof(header), \"To: #%s\", channelName ? channelName : \"?\");\n    } else {\n        snprintf(header, sizeof(header), \"To: @%s\", getNodeName(this->dest));\n    }\n\n    const int maxWidth = std::max(0, display->getWidth() - x);\n    char truncatedHeader[96];\n    graphics::UIRenderer::truncateStringWithEmotes(display, header, truncatedHeader, sizeof(truncatedHeader), maxWidth);\n    graphics::UIRenderer::drawStringWithEmotes(display, x, y, truncatedHeader, FONT_HEIGHT_SMALL, 1, false);\n}\n\nvoid CannedMessageModule::resetSearch()\n{\n    int previousDestIndex = destIndex;\n\n    searchQuery = \"\";\n    updateDestinationSelectionList();\n\n    // Adjust scrollIndex so previousDestIndex is still visible\n    int totalEntries = activeChannelIndices.size() + filteredNodes.size();\n    this->visibleRows = (displayHeight - FONT_HEIGHT_SMALL * 2) / FONT_HEIGHT_SMALL;\n    if (this->visibleRows < 1)\n        this->visibleRows = 1;\n    int maxScrollIndex = std::max(0, totalEntries - visibleRows);\n    scrollIndex = std::min(std::max(previousDestIndex - (visibleRows / 2), 0), maxScrollIndex);\n\n    lastUpdateMillis = millis();\n    requestFocus();\n}\nvoid CannedMessageModule::updateDestinationSelectionList()\n{\n    static size_t lastNumMeshNodes = 0;\n    static String lastSearchQuery = \"\";\n\n    size_t numMeshNodes = nodeDB->getNumMeshNodes();\n    bool nodesChanged = (numMeshNodes != lastNumMeshNodes);\n    lastNumMeshNodes = numMeshNodes;\n\n    // Early exit if nothing changed\n    if (searchQuery == lastSearchQuery && !nodesChanged)\n        return;\n    lastSearchQuery = searchQuery;\n    needsUpdate = false;\n\n    this->filteredNodes.clear();\n    this->activeChannelIndices.clear();\n\n    NodeNum myNodeNum = nodeDB->getNodeNum();\n    String lowerSearchQuery = searchQuery;\n    lowerSearchQuery.toLowerCase();\n\n    // Preallocate space to reduce reallocation\n    this->filteredNodes.reserve(numMeshNodes);\n\n    for (size_t i = 0; i < numMeshNodes; ++i) {\n        meshtastic_NodeInfoLite *node = nodeDB->getMeshNodeByIndex(i);\n        if (!node || node->num == myNodeNum || !node->has_user || node->user.public_key.size != 32)\n            continue;\n\n        const String &nodeName = node->user.long_name;\n\n        if (searchQuery.length() == 0) {\n            this->filteredNodes.push_back({node, sinceLastSeen(node)});\n        } else {\n            // Avoid unnecessary lowercase conversion if already matched\n            String lowerNodeName = nodeName;\n            lowerNodeName.toLowerCase();\n\n            if (lowerNodeName.indexOf(lowerSearchQuery) != -1) {\n                this->filteredNodes.push_back({node, sinceLastSeen(node)});\n            }\n        }\n    }\n\n    meshtastic_MeshPacket *p = allocDataPacket();\n    p->pki_encrypted = true;\n    p->channel = 0;\n\n    // Populate active channels\n    std::vector<String> seenChannels;\n    seenChannels.reserve(channels.getNumChannels());\n    for (uint8_t i = 0; i < channels.getNumChannels(); ++i) {\n        String name = channels.getName(i);\n        if (name.length() > 0 && std::find(seenChannels.begin(), seenChannels.end(), name) == seenChannels.end()) {\n            this->activeChannelIndices.push_back(i);\n            seenChannels.push_back(name);\n        }\n    }\n\n    scrollIndex = 0; // Show first result at the top\n    destIndex = 0;   // Highlight the first entry\n    if (nodesChanged && runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {\n        LOG_INFO(\"Nodes changed, forcing UI refresh.\");\n        screen->forceDisplay();\n    }\n}\n\n// Returns true if character input is currently allowed (used for search/freetext states)\nbool CannedMessageModule::isCharInputAllowed() const\n{\n    return runState == CANNED_MESSAGE_RUN_STATE_FREETEXT || runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION;\n}\n\nstatic int getRowHeightForEmoteText(const char *text, int minimumHeight, int emoteSpacing = 2)\n{\n    // Grow the row only when an emote is taller than the font.\n    const auto metrics =\n        graphics::EmoteRenderer::analyzeLine(nullptr, text ? text : \"\", 0, graphics::emotes, graphics::numEmotes, emoteSpacing);\n    return std::max(minimumHeight, metrics.tallestHeight + 2);\n}\n\nstatic void drawCenteredEmoteText(OLEDDisplay *display, int x, int y, int rowHeight, const char *text, int emoteSpacing = 2)\n{\n    // Center mixed text and emotes inside the row height.\n    const auto metrics = graphics::EmoteRenderer::analyzeLine(nullptr, text ? text : \"\", FONT_HEIGHT_SMALL, graphics::emotes,\n                                                              graphics::numEmotes, emoteSpacing);\n    const int contentHeight = std::max(FONT_HEIGHT_SMALL, metrics.tallestHeight);\n    const int drawY = y + ((rowHeight - contentHeight) / 2);\n    graphics::EmoteRenderer::drawStringWithEmotes(display, x, drawY, text ? text : \"\", FONT_HEIGHT_SMALL, graphics::emotes,\n                                                  graphics::numEmotes, emoteSpacing, false);\n}\n\nstatic size_t firstWrappedTokenLen(const char *text)\n{\n    // Fall back to one full emote or one UTF-8 glyph when width is tiny.\n    if (!text || !*text)\n        return 0;\n\n    const size_t textLen = strlen(text);\n    size_t matchLen = 0;\n    if (graphics::EmoteRenderer::findEmoteAt(text, textLen, 0, matchLen, graphics::emotes, graphics::numEmotes))\n        return matchLen;\n\n    return graphics::EmoteRenderer::utf8CharLen(static_cast<uint8_t>(text[0]));\n}\n\nstatic void drawWrappedEmoteText(OLEDDisplay *display, int x, int y, const char *text, int maxWidth, int minimumRowHeight,\n                                 int emoteSpacing = 2)\n{\n    // Wrap onto multiple rows without splitting emotes.\n    if (!display || !text || maxWidth <= 0)\n        return;\n\n    constexpr size_t kLineBufferSize = 256;\n    char lineBuffer[kLineBufferSize];\n    const size_t textLen = strlen(text);\n    size_t offset = 0;\n    int yCursor = y;\n\n    while (offset < textLen) {\n        size_t copied = graphics::EmoteRenderer::truncateToWidth(display, text + offset, lineBuffer, sizeof(lineBuffer), maxWidth,\n                                                                 \"\", graphics::emotes, graphics::numEmotes, emoteSpacing);\n        size_t consumed = copied;\n\n        if (copied == 0) {\n            consumed = firstWrappedTokenLen(text + offset);\n            if (consumed == 0)\n                break;\n\n            const size_t fallbackLen = std::min(consumed, sizeof(lineBuffer) - 1);\n            memcpy(lineBuffer, text + offset, fallbackLen);\n            lineBuffer[fallbackLen] = '\\0';\n            consumed = fallbackLen;\n        } else if (text[offset + copied] != '\\0') {\n            // Prefer wrapping at the last space when a full line does not fit.\n            size_t lastSpace = copied;\n            while (lastSpace > 0 && lineBuffer[lastSpace - 1] != ' ')\n                --lastSpace;\n\n            if (lastSpace > 0) {\n                consumed = lastSpace;\n                while (consumed > 0 && lineBuffer[consumed - 1] == ' ')\n                    --consumed;\n                lineBuffer[consumed] = '\\0';\n            }\n        }\n\n        if (lineBuffer[0]) {\n            const int rowHeight = getRowHeightForEmoteText(lineBuffer, minimumRowHeight, emoteSpacing);\n            drawCenteredEmoteText(display, x, yCursor, rowHeight, lineBuffer, emoteSpacing);\n            yCursor += rowHeight;\n        }\n\n        offset += std::max<size_t>(consumed, 1);\n        while (offset < textLen && text[offset] == ' ')\n            ++offset;\n    }\n}\n/**\n * Main input event dispatcher for CannedMessageModule.\n * Routes keyboard/button/touch input to the correct handler based on the current runState.\n * Only one handler (per state) processes each event, eliminating redundancy.\n */\nint CannedMessageModule::handleInputEvent(const InputEvent *event)\n{\n    // Block ALL input if an alert banner is active\n    if (screen && screen->isOverlayBannerShowing()) {\n        return 0;\n    }\n\n    // Tab key: Always allow switching between canned/destination screens\n    if (event->kbchar == INPUT_BROKER_MSG_TAB && handleTabSwitch(event))\n        return 1;\n\n    // Matrix keypad: If matrix key, trigger action select for canned message\n    if (event->inputEvent == INPUT_BROKER_MATRIXKEY) {\n        updateState(CANNED_MESSAGE_RUN_STATE_ACTION_SELECT, true);\n        payload = INPUT_BROKER_MATRIXKEY;\n        currentMessageIndex = event->kbchar - 1;\n        lastTouchMillis = millis();\n        return 1;\n    }\n\n    // Always normalize navigation/select buttons for further handlers\n    bool isUp = isUpEvent(event);\n    bool isDown = isDownEvent(event);\n    bool isSelect = isSelectEvent(event);\n\n    // Route event to handler for current UI state (no double-handling)\n    switch (runState) {\n    // Node/Channel destination selection mode: Handles character search, arrows, select, cancel, backspace\n    case CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION:\n        if (handleDestinationSelectionInput(event, isUp, isDown, isSelect))\n            return 1;\n        return 0; // prevent fall-through to selector input\n\n    // Free text input mode: Handles character input, cancel, backspace, select, etc.\n    case CANNED_MESSAGE_RUN_STATE_FREETEXT:\n        return handleFreeTextInput(event); // All allowed input for this state\n\n    // Virtual keyboard mode: Show virtual keyboard and handle input\n\n    // If sending, block all input except global/system (handled above)\n    case CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE:\n        return 1;\n\n    // If sending, block all input except global/system (handled above)\n    case CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER:\n        return handleEmotePickerInput(event);\n\n    case CANNED_MESSAGE_RUN_STATE_INACTIVE:\n        if (event->inputEvent == INPUT_BROKER_ALT_LONG) {\n            LaunchWithDestination(NODENUM_BROADCAST);\n            return 1;\n        }\n        // Printable char (ASCII) opens free text compose\n        if (event->kbchar >= 32 && event->kbchar <= 126) {\n            updateState(CANNED_MESSAGE_RUN_STATE_FREETEXT, true);\n            UIFrameEvent e;\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            notifyObservers(&e);\n            // Immediately process the input in the new state (freetext)\n            return handleFreeTextInput(event);\n        }\n        return 0;\n        break;\n\n    // (Other states can be added here as needed)\n    default:\n        break;\n    }\n\n    // If no state handler above processed the event, let the message selector try to handle it\n    // (Handles up/down/select on canned message list, exit/return)\n    if (handleMessageSelectorInput(event, isUp, isDown, isSelect))\n        return 1;\n\n    // Default: event not handled by canned message system, allow others to process\n    return 0;\n}\n\nvoid CannedMessageModule::updateState(cannedMessageModuleRunState newState, bool shouldRequestFocus)\n{\n    runState = newState;\n    if (runState == CANNED_MESSAGE_RUN_STATE_FREETEXT) {\n        inputBroker->menuMode =\n            false; // Allow any key input to be sent to the message composer instead of being interpreted as menu navigation\n    } else {\n        inputBroker->menuMode = true; // Re-enable menu navigation for destination selection\n    }\n    if (shouldRequestFocus) {\n        requestFocus();\n    }\n}\n\nbool CannedMessageModule::isUpEvent(const InputEvent *event)\n{\n    return event->inputEvent == INPUT_BROKER_UP ||\n           ((runState == CANNED_MESSAGE_RUN_STATE_ACTIVE || runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER ||\n             runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) &&\n            (event->inputEvent == INPUT_BROKER_LEFT || event->inputEvent == INPUT_BROKER_ALT_PRESS));\n}\nbool CannedMessageModule::isDownEvent(const InputEvent *event)\n{\n    return event->inputEvent == INPUT_BROKER_DOWN ||\n           ((runState == CANNED_MESSAGE_RUN_STATE_ACTIVE || runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER ||\n             runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) &&\n            (event->inputEvent == INPUT_BROKER_RIGHT || event->inputEvent == INPUT_BROKER_USER_PRESS));\n}\nbool CannedMessageModule::isSelectEvent(const InputEvent *event)\n{\n    return event->inputEvent == INPUT_BROKER_SELECT;\n}\n\nbool CannedMessageModule::handleTabSwitch(const InputEvent *event)\n{\n    if (event->kbchar != 0x09)\n        return false;\n\n    const cannedMessageModuleRunState targetState = (runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION)\n                                                        ? CANNED_MESSAGE_RUN_STATE_FREETEXT\n                                                        : CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION;\n\n    destIndex = 0;\n    scrollIndex = 0;\n    if (targetState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION)\n        updateDestinationSelectionList();\n\n    updateState(targetState, true);\n\n    UIFrameEvent e;\n    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n    notifyObservers(&e);\n    screen->forceDisplay();\n    return true;\n}\n\nint CannedMessageModule::handleDestinationSelectionInput(const InputEvent *event, bool isUp, bool isDown, bool isSelect)\n{\n    // Override isDown and isSelect ONLY for destination selector behavior\n    if (runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {\n        if (event->inputEvent == INPUT_BROKER_USER_PRESS) {\n            isDown = true;\n        } else if (event->inputEvent == INPUT_BROKER_SELECT) {\n            isSelect = true;\n        }\n    }\n\n    if (event->kbchar >= 32 && event->kbchar <= 126 && !isUp && !isDown && event->inputEvent != INPUT_BROKER_LEFT &&\n        event->inputEvent != INPUT_BROKER_RIGHT && event->inputEvent != INPUT_BROKER_SELECT) {\n        this->searchQuery += (char)event->kbchar;\n        needsUpdate = true;\n        if ((millis() - lastFilterUpdate) > filterDebounceMs) {\n            runOnce(); // update filter immediately\n            lastFilterUpdate = millis();\n        }\n        return 1;\n    }\n\n    size_t numMeshNodes = filteredNodes.size();\n    int totalEntries = numMeshNodes + activeChannelIndices.size();\n    int columns = 1;\n    int totalRows = totalEntries;\n    int maxScrollIndex = std::max(0, totalRows - visibleRows);\n    scrollIndex = clamp(scrollIndex, 0, maxScrollIndex);\n\n    // Handle backspace\n    if (event->inputEvent == INPUT_BROKER_BACK) {\n        if (searchQuery.length() > 0) {\n            searchQuery.remove(searchQuery.length() - 1);\n            needsUpdate = true;\n            runOnce();\n        }\n        if (searchQuery.length() == 0) {\n            resetSearch();\n            needsUpdate = false;\n        }\n        return 1;\n    }\n\n    if (isUp) {\n        if (destIndex > 0) {\n            destIndex--;\n        } else if (totalEntries > 0) {\n            destIndex = totalEntries - 1;\n        }\n\n        if ((destIndex / columns) < scrollIndex)\n            scrollIndex = destIndex / columns;\n        else if ((destIndex / columns) >= (scrollIndex + visibleRows))\n            scrollIndex = (destIndex / columns) - visibleRows + 1;\n\n        screen->forceDisplay(true);\n        return 1;\n    }\n\n    if (isDown) {\n        if (destIndex + 1 < totalEntries) {\n            destIndex++;\n        } else if (totalEntries > 0) {\n            destIndex = 0;\n            scrollIndex = 0;\n        }\n\n        if ((destIndex / columns) >= (scrollIndex + visibleRows))\n            scrollIndex = (destIndex / columns) - visibleRows + 1;\n\n        screen->forceDisplay(true);\n        return 1;\n    }\n\n    // SELECT\n    if (isSelect) {\n        if (destIndex < static_cast<int>(activeChannelIndices.size())) {\n            dest = NODENUM_BROADCAST;\n            channel = activeChannelIndices[destIndex];\n            lastDest = dest;\n            lastChannel = channel;\n            lastDestSet = true;\n        } else {\n            int nodeIndex = destIndex - static_cast<int>(activeChannelIndices.size());\n            if (nodeIndex >= 0 && nodeIndex < static_cast<int>(filteredNodes.size())) {\n                const meshtastic_NodeInfoLite *selectedNode = filteredNodes[nodeIndex].node;\n                if (selectedNode) {\n                    dest = selectedNode->num;\n                    channel = selectedNode->channel;\n                    // Already saves here, but for clarity, also:\n                    lastDest = dest;\n                    lastChannel = channel;\n                    lastDestSet = true;\n                }\n            }\n        }\n\n        updateState(returnToCannedList ? CANNED_MESSAGE_RUN_STATE_ACTIVE : CANNED_MESSAGE_RUN_STATE_FREETEXT, true);\n        returnToCannedList = false;\n        screen->forceDisplay(true);\n        return 1;\n    }\n\n    // CANCEL\n    if (event->inputEvent == INPUT_BROKER_CANCEL || event->inputEvent == INPUT_BROKER_ALT_LONG) {\n        updateState(returnToCannedList ? CANNED_MESSAGE_RUN_STATE_ACTIVE : CANNED_MESSAGE_RUN_STATE_FREETEXT, true);\n        returnToCannedList = false;\n        searchQuery = \"\";\n\n        // UIFrameEvent e;\n        // e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        // notifyObservers(&e);\n        screen->forceDisplay(true);\n        return 1;\n    }\n\n    return 0;\n}\n\nbool CannedMessageModule::handleMessageSelectorInput(const InputEvent *event, bool isUp, bool isDown, bool isSelect)\n{\n    // Override isDown and isSelect ONLY for canned message list behavior\n    if (runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) {\n        if (event->inputEvent == INPUT_BROKER_USER_PRESS) {\n            isDown = true;\n        } else if (event->inputEvent == INPUT_BROKER_SELECT) {\n            isSelect = true;\n        }\n    }\n\n    if (runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION)\n        return false;\n\n    // Handle Cancel key: go inactive, clear UI state\n    if (runState != CANNED_MESSAGE_RUN_STATE_INACTIVE &&\n        (event->inputEvent == INPUT_BROKER_CANCEL || event->inputEvent == INPUT_BROKER_ALT_LONG)) {\n        updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n        freetext = \"\";\n        cursor = 0;\n        payload = 0;\n        currentMessageIndex = -1;\n\n        // Notify UI that we want to redraw/close this screen\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        screen->forceDisplay();\n        return true;\n    }\n\n    bool handled = false;\n\n    // Handle up/down navigation\n    if (isUp && messagesCount > 0) {\n        updateState(CANNED_MESSAGE_RUN_STATE_ACTION_UP);\n        handled = true;\n    } else if (isDown && messagesCount > 0) {\n        updateState(CANNED_MESSAGE_RUN_STATE_ACTION_DOWN);\n        handled = true;\n    } else if (isSelect) {\n        const char *current = messages[currentMessageIndex];\n\n        // [Select Destination] triggers destination selection UI\n        if (strcmp(current, \"[Select Destination]\") == 0) {\n            returnToCannedList = true;\n            updateState(CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION, true);\n            destIndex = 0;\n            scrollIndex = 0;\n            updateDestinationSelectionList(); // Make sure list is fresh\n            screen->forceDisplay();\n            return true;\n        }\n\n        // [Exit] returns to the main/inactive screen\n        if (strcmp(current, \"[Exit]\") == 0) {\n            // Set runState to inactive so we return to main UI\n            updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n            currentMessageIndex = -1;\n\n            // Notify UI to regenerate frame set and redraw\n            UIFrameEvent e;\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            notifyObservers(&e);\n            screen->forceDisplay();\n            return true;\n        }\n\n        // [Free Text] triggers the free text input (virtual keyboard)\n#if defined(USE_VIRTUAL_KEYBOARD)\n        if (strcmp(current, \"[-- Free Text --]\") == 0) {\n            updateState(CANNED_MESSAGE_RUN_STATE_FREETEXT, true);\n            UIFrameEvent e;\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            notifyObservers(&e);\n            return true;\n        }\n#else\n        if (strcmp(current, \"[-- Free Text --]\") == 0) {\n            if (osk_found && screen) {\n                char headerBuffer[64];\n                if (this->dest == NODENUM_BROADCAST) {\n                    snprintf(headerBuffer, sizeof(headerBuffer), \"To: #%s\", channels.getName(this->channel));\n                } else {\n                    snprintf(headerBuffer, sizeof(headerBuffer), \"To: @%s\", getNodeName(this->dest));\n                }\n                screen->showTextInput(headerBuffer, \"\", 300000, [this](const std::string &text) {\n                    if (!text.empty()) {\n                        this->freetext = text.c_str();\n                        this->payload = CANNED_MESSAGE_RUN_STATE_FREETEXT;\n                        updateState(CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE);\n                        currentMessageIndex = -1;\n\n                        UIFrameEvent e;\n                        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n                        this->notifyObservers(&e);\n                        screen->forceDisplay();\n\n                        setIntervalFromNow(500);\n                        return;\n                    } else {\n                        // Don't delete virtual keyboard immediately - it might still be executing\n                        // Instead, just clear the callback and reset banner to stop input processing\n                        graphics::NotificationRenderer::textInputCallback = nullptr;\n                        graphics::NotificationRenderer::resetBanner();\n\n                        // Return to inactive state\n                        this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n                        this->currentMessageIndex = -1;\n                        this->freetext = \"\";\n                        this->cursor = 0;\n\n                        // Force display update to show normal screen\n                        UIFrameEvent e;\n                        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n                        this->notifyObservers(&e);\n                        screen->forceDisplay();\n\n                        // Schedule cleanup for next loop iteration to ensure safe deletion\n                        setIntervalFromNow(50);\n                        return;\n                    }\n                });\n\n                return true;\n            }\n        }\n#endif\n\n        // Normal canned message selection\n        if (runState == CANNED_MESSAGE_RUN_STATE_INACTIVE || runState == CANNED_MESSAGE_RUN_STATE_DISABLED) {\n        } else {\n#if CANNED_MESSAGE_ADD_CONFIRMATION\n            const int savedIndex = currentMessageIndex;\n            graphics::menuHandler::showConfirmationBanner(\"Send message?\", [this, savedIndex]() {\n                this->currentMessageIndex = savedIndex;\n                this->payload = this->runState;\n                this->updateState(CANNED_MESSAGE_RUN_STATE_ACTION_SELECT);\n                this->setIntervalFromNow(0);\n            });\n#else\n            payload = runState;\n            updateState(CANNED_MESSAGE_RUN_STATE_ACTION_SELECT);\n#endif\n            // Do not immediately set runState; wait for confirmation\n            handled = true;\n        }\n    }\n\n    if (handled) {\n        requestFocus();\n        if (runState == CANNED_MESSAGE_RUN_STATE_ACTION_SELECT)\n            setIntervalFromNow(0);\n        else\n            runOnce();\n    }\n\n    return handled;\n}\nbool CannedMessageModule::handleFreeTextInput(const InputEvent *event)\n{\n    // Always process only if in FREETEXT mode\n    if (runState != CANNED_MESSAGE_RUN_STATE_FREETEXT)\n        return false;\n\n#if defined(USE_VIRTUAL_KEYBOARD)\n    // Cancel (dismiss freetext screen)\n    if (event->inputEvent == INPUT_BROKER_LEFT) {\n        updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n        freetext = \"\";\n        cursor = 0;\n        payload = 0;\n        currentMessageIndex = -1;\n\n        // Notify UI that we want to redraw/close this screen\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        screen->forceDisplay();\n        return true;\n    }\n    // Touch input (virtual keyboard) handling\n    // Only handle if touch coordinates present (CardKB won't set these)\n    if (event->touchX != 0 || event->touchY != 0) {\n        String keyTapped = keyForCoordinates(event->touchX, event->touchY);\n        bool valid = false;\n\n        if (keyTapped == \"⇧\") {\n            highlight = -1;\n            payload = 0x00;\n            shift = !shift;\n            valid = true;\n        } else if (keyTapped == \"⌫\") {\n#ifndef RAK14014\n            highlight = keyTapped[0];\n#endif\n            payload = 0x08;\n            shift = false;\n            valid = true;\n        } else if (keyTapped == \"123\" || keyTapped == \"ABC\") {\n            highlight = -1;\n            payload = 0x00;\n            charSet = (charSet == 0 ? 1 : 0);\n            valid = true;\n        } else if (keyTapped == \" \") {\n#ifndef RAK14014\n            highlight = keyTapped[0];\n#endif\n            payload = keyTapped[0];\n            shift = false;\n            valid = true;\n        }\n        // Touch enter/submit\n        else if (keyTapped == \"↵\") {\n            updateState(CANNED_MESSAGE_RUN_STATE_ACTION_SELECT); // Send the message!\n            payload = CANNED_MESSAGE_RUN_STATE_FREETEXT;\n            currentMessageIndex = -1;\n            shift = false;\n            valid = true;\n        } else if (!(keyTapped == \"\")) {\n#ifndef RAK14014\n            highlight = keyTapped[0];\n#endif\n            payload = shift ? keyTapped[0] : std::tolower(keyTapped[0]);\n            shift = false;\n            valid = true;\n        }\n\n        if (valid) {\n            lastTouchMillis = millis();\n            runOnce();\n            payload = 0;\n            return true; // STOP: We handled a VKB touch\n        }\n    }\n#endif // USE_VIRTUAL_KEYBOARD\n\n    // All hardware keys fall through to here (CardKB, physical, etc.)\n\n    if (event->kbchar == INPUT_BROKER_MSG_EMOTE_LIST) {\n        updateState(CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER);\n        screen->forceDisplay();\n        return true;\n    }\n    // Confirm select (Enter)\n    bool isSelect = isSelectEvent(event);\n    if (isSelect) {\n        LOG_DEBUG(\"[SELECT] handleFreeTextInput: runState=%d, dest=%u, channel=%d, freetext='%s'\", (int)runState, dest, channel,\n                  freetext.c_str());\n        if (dest == 0)\n            dest = NODENUM_BROADCAST;\n        // Defensive: If channel isn't valid, pick the first available channel\n        if (channel >= channels.getNumChannels())\n            channel = 0;\n\n        payload = CANNED_MESSAGE_RUN_STATE_FREETEXT;\n        currentMessageIndex = -1;\n        updateState(CANNED_MESSAGE_RUN_STATE_ACTION_SELECT);\n        lastTouchMillis = millis();\n        runOnce();\n        return true;\n    }\n\n    // Backspace\n    if (event->inputEvent == INPUT_BROKER_BACK && this->freetext.length() > 0) {\n        payload = 0x08;\n        lastTouchMillis = millis();\n        requestFocus();\n        runOnce();\n        return true;\n    }\n\n    // Move cursor left\n    if (event->inputEvent == INPUT_BROKER_LEFT) {\n        payload = INPUT_BROKER_LEFT;\n        lastTouchMillis = millis();\n        requestFocus();\n        runOnce();\n        return true;\n    }\n    // Move cursor right\n    if (event->inputEvent == INPUT_BROKER_RIGHT) {\n        payload = INPUT_BROKER_RIGHT;\n        lastTouchMillis = millis();\n        requestFocus();\n        runOnce();\n        return true;\n    }\n\n    // Cancel (dismiss freetext screen)\n    if (event->inputEvent == INPUT_BROKER_CANCEL || event->inputEvent == INPUT_BROKER_ALT_LONG ||\n        (event->inputEvent == INPUT_BROKER_BACK && this->freetext.length() == 0)) {\n        updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n        freetext = \"\";\n        cursor = 0;\n        payload = 0;\n        currentMessageIndex = -1;\n\n        // Notify UI that we want to redraw/close this screen\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        screen->forceDisplay();\n        return true;\n    }\n\n    // Tab (switch destination)\n    if (event->kbchar == INPUT_BROKER_MSG_TAB) {\n        return handleTabSwitch(event); // Reuse tab logic\n    }\n\n    // Printable ASCII (add char to draft)\n    if (event->kbchar >= 32 && event->kbchar <= 126) {\n        payload = event->kbchar;\n        lastTouchMillis = millis();\n        runOnce();\n        return true;\n    }\n\n    return false;\n}\n\nint CannedMessageModule::handleEmotePickerInput(const InputEvent *event)\n{\n    int numEmotes = graphics::numEmotes;\n\n    // Override isDown and isSelect ONLY for emote picker behavior\n    bool isUp = isUpEvent(event);\n    bool isDown = isDownEvent(event);\n    bool isSelect = isSelectEvent(event);\n    if (runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER) {\n        if (event->inputEvent == INPUT_BROKER_USER_PRESS) {\n            isDown = true;\n        } else if (event->inputEvent == INPUT_BROKER_SELECT) {\n            isSelect = true;\n        }\n    }\n\n    // Scroll emote list\n    if (isUp && emotePickerIndex > 0) {\n        emotePickerIndex--;\n        screen->forceDisplay();\n        return 1;\n    }\n    if (isDown && emotePickerIndex < numEmotes - 1) {\n        emotePickerIndex++;\n        screen->forceDisplay();\n        return 1;\n    }\n\n    // Select emote: insert into freetext at cursor and return to freetext\n    if (isSelect) {\n        String label = graphics::emotes[emotePickerIndex].label;\n        String emoteInsert = label; // Just the text label, e.g., \":thumbsup:\"\n        if (cursor == freetext.length()) {\n            freetext += emoteInsert;\n        } else {\n            freetext = freetext.substring(0, cursor) + emoteInsert + freetext.substring(cursor);\n        }\n        cursor += emoteInsert.length();\n        updateState(CANNED_MESSAGE_RUN_STATE_FREETEXT, true);\n        screen->forceDisplay();\n        return 1;\n    }\n\n    // Cancel returns to freetext\n    if (event->inputEvent == INPUT_BROKER_CANCEL || event->inputEvent == INPUT_BROKER_ALT_LONG) {\n        updateState(CANNED_MESSAGE_RUN_STATE_FREETEXT, true);\n        screen->forceDisplay();\n        return 1;\n    }\n\n    return 0;\n}\n\nvoid CannedMessageModule::sendText(NodeNum dest, ChannelIndex channel, const char *message, bool wantReplies)\n{\n    lastDest = dest;\n    lastChannel = channel;\n    lastDestSet = true;\n\n    meshtastic_MeshPacket *p = allocDataPacket();\n    p->to = dest;\n    p->channel = channel;\n    p->want_ack = true;\n    p->decoded.dest = dest; // Mirror picker: NODENUM_BROADCAST or node->num\n\n    this->lastSentNode = dest;\n    this->incoming = dest;\n\n    // Manually find the node by number to check PKI capability\n    meshtastic_NodeInfoLite *node = nullptr;\n    size_t numMeshNodes = nodeDB->getNumMeshNodes();\n    for (size_t i = 0; i < numMeshNodes; ++i) {\n        meshtastic_NodeInfoLite *n = nodeDB->getMeshNodeByIndex(i);\n        if (n && n->num == dest) {\n            node = n;\n            break;\n        }\n    }\n\n    NodeNum myNodeNum = nodeDB->getNodeNum();\n    if (node && node->num != myNodeNum && node->has_user && node->user.public_key.size == 32) {\n        p->pki_encrypted = true;\n        p->channel = 0; // force PKI\n    }\n\n    // Track this packet’s request ID for matching ACKs\n    this->lastRequestId = p->id;\n\n    // Copy payload\n    p->decoded.payload.size = strlen(message);\n    memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size);\n\n    if (moduleConfig.canned_message.send_bell && p->decoded.payload.size < meshtastic_Constants_DATA_PAYLOAD_LEN) {\n        p->decoded.payload.bytes[p->decoded.payload.size++] = 7;\n        p->decoded.payload.bytes[p->decoded.payload.size] = '\\0';\n    }\n\n    this->waitingForAck = true;\n\n    // Send to mesh (PKI-encrypted if conditions above matched)\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n    // Show banner immediately\n    if (screen) {\n        graphics::BannerOverlayOptions opts;\n        opts.message = \"Sending...\";\n        opts.durationMs = 2000;\n        screen->showOverlayBanner(opts);\n    }\n\n    // Save outgoing message\n    StoredMessage sm;\n\n    // Always use our local time, consistent with other paths\n    uint32_t nowSecs = getValidTime(RTCQuality::RTCQualityDevice, true);\n    sm.timestamp = (nowSecs > 0) ? nowSecs : millis() / 1000;\n    sm.isBootRelative = (nowSecs == 0);\n\n    sm.sender = nodeDB->getNodeNum(); // us\n    sm.channelIndex = channel;\n    size_t len = strnlen(message, MAX_MESSAGE_SIZE - 1);\n    sm.textOffset = MessageStore::storeText(message, len);\n    sm.textLength = len;\n\n    // Classify broadcast vs DM\n    if (dest == NODENUM_BROADCAST) {\n        sm.dest = NODENUM_BROADCAST;\n        sm.type = MessageType::BROADCAST;\n    } else {\n        sm.dest = dest;\n        sm.type = MessageType::DM_TO_US;\n        // Only add as favorite if our role is not router-like (ROUTER, ROUTER_LATE, CLIENT_BASE)\n        if (config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER &&\n            config.device.role != meshtastic_Config_DeviceConfig_Role_ROUTER_LATE &&\n            config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_BASE) {\n            LOG_INFO(\"Proactively adding %x as favorite node\", dest);\n            nodeDB->set_favorite(true, dest);\n        } else {\n            LOG_DEBUG(\"Not favoriting node %x because role is router-like\", dest);\n        }\n    }\n    sm.ackStatus = AckStatus::NONE;\n\n    messageStore.addLiveMessage(std::move(sm));\n\n    // Auto-switch thread view on outgoing message\n    if (sm.type == MessageType::BROADCAST) {\n        graphics::MessageRenderer::setThreadMode(graphics::MessageRenderer::ThreadMode::CHANNEL, sm.channelIndex);\n    } else {\n        graphics::MessageRenderer::setThreadMode(graphics::MessageRenderer::ThreadMode::DIRECT, -1, sm.dest);\n    }\n\n    playComboTune();\n\n    this->updateState(CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE);\n    this->payload = wantReplies ? 1 : 0;\n\n    // Tell Screen to switch to TextMessage frame via UIFrameEvent\n    UIFrameEvent e;\n    e.action = UIFrameEvent::Action::SWITCH_TO_TEXTMESSAGE;\n    notifyObservers(&e);\n}\n\nint32_t CannedMessageModule::runOnce()\n{\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION && needsUpdate) {\n        updateDestinationSelectionList();\n        needsUpdate = false;\n    }\n\n    // If we're in node selection, do nothing except keep alive\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {\n        return INACTIVATE_AFTER_MS;\n    }\n\n    // Normal module disable/idle handling\n    if ((this->runState == CANNED_MESSAGE_RUN_STATE_DISABLED) || (this->runState == CANNED_MESSAGE_RUN_STATE_INACTIVE)) {\n        // Clean up virtual keyboard if needed when going inactive\n        if (graphics::NotificationRenderer::virtualKeyboard && graphics::NotificationRenderer::textInputCallback == nullptr) {\n            LOG_INFO(\"Performing delayed virtual keyboard cleanup\");\n            graphics::OnScreenKeyboardModule::instance().stop(false);\n        }\n\n        return INT32_MAX;\n    }\n\n    // Handle delayed virtual keyboard message sending\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE && this->payload == CANNED_MESSAGE_RUN_STATE_FREETEXT) {\n        // Virtual keyboard message sending case - text was not empty\n        if (this->freetext.length() > 0) {\n            LOG_INFO(\"Processing delayed virtual keyboard send: '%s'\", this->freetext.c_str());\n            sendText(this->dest, this->channel, this->freetext.c_str(), true);\n\n            // Clean up virtual keyboard after sending\n            if (graphics::NotificationRenderer::virtualKeyboard) {\n                LOG_INFO(\"Cleaning up virtual keyboard after message send\");\n                graphics::OnScreenKeyboardModule::instance().stop(false);\n                graphics::NotificationRenderer::resetBanner();\n            }\n\n            // Clear payload to indicate virtual keyboard processing is complete\n            // But keep SENDING_ACTIVE state to show \"Sending...\" screen for 2 seconds\n            this->payload = 0;\n        } else {\n            // Empty message, just go inactive\n            LOG_INFO(\"Empty freetext detected in delayed processing, returning to inactive state\");\n            this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n        }\n\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        this->currentMessageIndex = -1;\n        this->freetext = \"\";\n        this->cursor = 0;\n        this->notifyObservers(&e);\n        return 2000;\n    }\n\n    UIFrameEvent e;\n    if ((this->runState == CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE && this->payload != 0 &&\n         this->payload != CANNED_MESSAGE_RUN_STATE_FREETEXT) ||\n        (this->runState == CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED) ||\n        (this->runState == CANNED_MESSAGE_RUN_STATE_MESSAGE_SELECTION)) {\n        this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        this->currentMessageIndex = -1;\n        this->freetext = \"\";\n        this->cursor = 0;\n        this->notifyObservers(&e);\n    }\n    // Handle SENDING_ACTIVE state transition after virtual keyboard message\n    else if (this->runState == CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE && this->payload == 0) {\n        this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n        this->currentMessageIndex = -1;\n        this->freetext = \"\";\n        this->cursor = 0;\n        return INT32_MAX;\n    } else if (((this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) || (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT)) &&\n               !Throttle::isWithinTimespanMs(this->lastTouchMillis, INACTIVATE_AFTER_MS)) {\n        // Reset module on inactivity\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        this->currentMessageIndex = -1;\n        this->freetext = \"\";\n        this->cursor = 0;\n        this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n\n        // Clean up virtual keyboard if it exists during timeout\n        if (graphics::NotificationRenderer::virtualKeyboard) {\n            LOG_INFO(\"Cleaning up virtual keyboard due to module timeout\");\n            graphics::OnScreenKeyboardModule::instance().stop(false);\n            graphics::NotificationRenderer::resetBanner();\n        }\n\n        this->notifyObservers(&e);\n    } else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_SELECT) {\n        if (this->payload == 0) {\n            // [Exit] button pressed - return to inactive state\n            LOG_INFO(\"Processing [Exit] action - returning to inactive state\");\n            this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n        } else if (this->payload == CANNED_MESSAGE_RUN_STATE_FREETEXT) {\n            if (this->freetext.length() > 0) {\n                sendText(this->dest, this->channel, this->freetext.c_str(), true);\n\n                // Clean up state but *don’t* deactivate yet\n                this->currentMessageIndex = -1;\n                this->freetext = \"\";\n                this->cursor = 0;\n\n                // Tell Screen to jump straight to the TextMessage frame\n                e.action = UIFrameEvent::Action::SWITCH_TO_TEXTMESSAGE;\n                this->notifyObservers(&e);\n\n                // Now deactivate this module\n                this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n\n                return INT32_MAX; // don't fall back into canned list\n            } else {\n                this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n            }\n        } else {\n            if (strcmp(this->messages[this->currentMessageIndex], \"[Select Destination]\") == 0) {\n                this->updateState(CANNED_MESSAGE_RUN_STATE_ACTIVE);\n                return INT32_MAX;\n            }\n            if ((this->messagesCount > this->currentMessageIndex) && (strlen(this->messages[this->currentMessageIndex]) > 0)) {\n                if (strcmp(this->messages[this->currentMessageIndex], \"~\") == 0) {\n                    return INT32_MAX;\n                } else {\n                    sendText(this->dest, this->channel, this->messages[this->currentMessageIndex], true);\n\n                    // Clean up state\n                    this->currentMessageIndex = -1;\n                    this->freetext = \"\";\n                    this->cursor = 0;\n\n                    // Tell Screen to jump straight to the TextMessage frame\n                    e.action = UIFrameEvent::Action::SWITCH_TO_TEXTMESSAGE;\n                    this->notifyObservers(&e);\n\n                    // Now deactivate this module\n                    this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n\n                    return INT32_MAX; // don't fall back into canned list\n                }\n            } else {\n                this->updateState(CANNED_MESSAGE_RUN_STATE_INACTIVE);\n            }\n        }\n        // fallback clean-up if nothing above returned\n        this->currentMessageIndex = -1;\n        this->freetext = \"\";\n        this->cursor = 0;\n\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        this->notifyObservers(&e);\n\n        // Immediately stop, don't linger on canned screen\n        return INT32_MAX;\n    }\n    // Highlight [Select Destination] initially when entering the message list\n    else if ((this->runState != CANNED_MESSAGE_RUN_STATE_FREETEXT) && (this->currentMessageIndex == -1)) {\n        // Only auto-highlight [Select Destination] if we’re ACTIVELY browsing,\n        // not when coming back from a sent message.\n        if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) {\n            int selectDestination = 0;\n            for (int i = 0; i < this->messagesCount; ++i) {\n                if (strcmp(this->messages[i], \"[Select Destination]\") == 0) {\n                    selectDestination = i;\n                    break;\n                }\n            }\n            this->currentMessageIndex = selectDestination;\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        }\n    } else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_UP) {\n        if (this->messagesCount > 0) {\n            this->currentMessageIndex = getPrevIndex();\n            this->freetext = \"\";\n            this->cursor = 0;\n            this->updateState(CANNED_MESSAGE_RUN_STATE_ACTIVE);\n        }\n    } else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_DOWN) {\n        if (this->messagesCount > 0) {\n            this->currentMessageIndex = this->getNextIndex();\n            this->freetext = \"\";\n            this->cursor = 0;\n            this->updateState(CANNED_MESSAGE_RUN_STATE_ACTIVE);\n        }\n    } else if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT || this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) {\n        switch (this->payload) {\n        case INPUT_BROKER_LEFT:\n            if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT && this->cursor > 0) {\n                this->cursor--;\n            }\n            break;\n        case INPUT_BROKER_RIGHT:\n            if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT && this->cursor < this->freetext.length()) {\n                this->cursor++;\n            }\n            break;\n        default:\n            break;\n        }\n        if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT) {\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            switch (this->payload) {\n            case 0x08: // backspace\n                if (this->freetext.length() > 0) {\n                    if (this->cursor > 0) {\n                        if (this->cursor == this->freetext.length()) {\n                            this->freetext = this->freetext.substring(0, this->freetext.length() - 1);\n                        } else {\n                            this->freetext = this->freetext.substring(0, this->cursor - 1) +\n                                             this->freetext.substring(this->cursor, this->freetext.length());\n                        }\n                        this->cursor--;\n                    }\n                } else {\n                }\n                break;\n            case INPUT_BROKER_MSG_TAB: // Tab key: handled by input handler\n                return 0;\n            case INPUT_BROKER_LEFT:\n            case INPUT_BROKER_RIGHT:\n                break;\n            default:\n                // Only insert ASCII printable characters (32–126)\n                if (this->payload >= 32 && this->payload <= 126) {\n                    requestFocus();\n                    if (this->cursor == this->freetext.length()) {\n                        this->freetext += (char)this->payload;\n                    } else {\n                        this->freetext = this->freetext.substring(0, this->cursor) + (char)this->payload +\n                                         this->freetext.substring(this->cursor);\n                    }\n                    this->cursor++;\n                    const uint16_t maxChars = 200 - (moduleConfig.canned_message.send_bell ? 1 : 0);\n                    if (this->freetext.length() > maxChars) {\n                        this->cursor = maxChars;\n                        this->freetext = this->freetext.substring(0, maxChars);\n                    }\n                }\n                break;\n            }\n        }\n        this->lastTouchMillis = millis();\n        this->notifyObservers(&e);\n        return INACTIVATE_AFTER_MS;\n    }\n\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) {\n        this->lastTouchMillis = millis();\n        this->notifyObservers(&e);\n        return INACTIVATE_AFTER_MS;\n    }\n    return INT32_MAX;\n}\n\nconst char *CannedMessageModule::getCurrentMessage()\n{\n    return this->messages[this->currentMessageIndex];\n}\nconst char *CannedMessageModule::getPrevMessage()\n{\n    return this->messages[this->getPrevIndex()];\n}\nconst char *CannedMessageModule::getNextMessage()\n{\n    return this->messages[this->getNextIndex()];\n}\nconst char *CannedMessageModule::getMessageByIndex(int index)\n{\n    return (index >= 0 && index < this->messagesCount) ? this->messages[index] : \"\";\n}\n\nconst char *CannedMessageModule::getNodeName(NodeNum node)\n{\n    if (node == NODENUM_BROADCAST)\n        return \"Broadcast\";\n\n    meshtastic_NodeInfoLite *info = nodeDB->getMeshNode(node);\n    if (info && info->has_user && strlen(info->user.long_name) > 0) {\n        return info->user.long_name;\n    }\n\n    static char fallback[12];\n    snprintf(fallback, sizeof(fallback), \"0x%08x\", node);\n    return fallback;\n}\n\nbool CannedMessageModule::shouldDraw()\n{\n    // Only allow drawing when we're in an interactive UI state.\n    return (this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE || this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT ||\n            this->runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION ||\n            this->runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER);\n}\n\n// Has the user defined any canned messages?\n// Expose publicly whether canned message module is ready for use\nbool CannedMessageModule::hasMessages()\n{\n    return (this->messagesCount > 0);\n}\n\nint CannedMessageModule::getNextIndex()\n{\n    if (this->currentMessageIndex >= (this->messagesCount - 1)) {\n        return 0;\n    } else {\n        return this->currentMessageIndex + 1;\n    }\n}\n\nint CannedMessageModule::getPrevIndex()\n{\n    if (this->currentMessageIndex <= 0) {\n        return this->messagesCount - 1;\n    } else {\n        return this->currentMessageIndex - 1;\n    }\n}\n\n#if defined(USE_VIRTUAL_KEYBOARD)\n\nString CannedMessageModule::keyForCoordinates(uint x, uint y)\n{\n    int outerSize = *(&this->keyboard[this->charSet] + 1) - this->keyboard[this->charSet];\n\n    for (int8_t outerIndex = 0; outerIndex < outerSize; outerIndex++) {\n        int innerSize = *(&this->keyboard[this->charSet][outerIndex] + 1) - this->keyboard[this->charSet][outerIndex];\n\n        for (int8_t innerIndex = 0; innerIndex < innerSize; innerIndex++) {\n            Letter letter = this->keyboard[this->charSet][outerIndex][innerIndex];\n\n            if (x > letter.rectX && x < (letter.rectX + letter.rectWidth) && y > letter.rectY &&\n                y < (letter.rectY + letter.rectHeight)) {\n                return letter.character;\n            }\n        }\n    }\n\n    return \"\";\n}\n\nvoid CannedMessageModule::drawKeyboard(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    int outerSize = *(&this->keyboard[this->charSet] + 1) - this->keyboard[this->charSet];\n\n    int xOffset = 0;\n\n    int yOffset = 56;\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    display->setFont(FONT_SMALL);\n\n    display->setColor(OLEDDISPLAY_COLOR::WHITE);\n\n    display->drawStringMaxWidth(0, 0, display->getWidth(),\n                                cannedMessageModule->drawWithCursor(cannedMessageModule->freetext, cannedMessageModule->cursor));\n\n    display->setFont(FONT_MEDIUM);\n\n    int cellHeight = round((display->height() - 64) / outerSize);\n\n    int yCorrection = 8;\n\n    for (int8_t outerIndex = 0; outerIndex < outerSize; outerIndex++) {\n        yOffset += outerIndex > 0 ? cellHeight : 0;\n\n        int innerSizeBound = *(&this->keyboard[this->charSet][outerIndex] + 1) - this->keyboard[this->charSet][outerIndex];\n\n        int innerSize = 0;\n\n        for (int8_t innerIndex = 0; innerIndex < innerSizeBound; innerIndex++) {\n            if (this->keyboard[this->charSet][outerIndex][innerIndex].character != \"\") {\n                innerSize++;\n            }\n        }\n\n        int cellWidth = display->width() / innerSize;\n\n        for (int8_t innerIndex = 0; innerIndex < innerSize; innerIndex++) {\n            xOffset += innerIndex > 0 ? cellWidth : 0;\n\n            Letter letter = this->keyboard[this->charSet][outerIndex][innerIndex];\n\n            Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight};\n\n#ifdef RAK14014 // Optimize the touch range of the virtual keyboard in the bottom row\n            if (outerIndex == outerSize - 1) {\n                updatedLetter.rectHeight = 240 - yOffset;\n            }\n#endif\n            this->keyboard[this->charSet][outerIndex][innerIndex] = updatedLetter;\n\n            float characterOffset = ((cellWidth / 2) - (letter.width / 2));\n\n            if (letter.character == \"⇧\") {\n                if (this->shift) {\n                    display->fillRect(xOffset, yOffset, cellWidth, cellHeight);\n\n                    display->setColor(OLEDDISPLAY_COLOR::BLACK);\n\n                    drawShiftIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2);\n\n                    display->setColor(OLEDDISPLAY_COLOR::WHITE);\n                } else {\n                    display->drawRect(xOffset, yOffset, cellWidth, cellHeight);\n\n                    drawShiftIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2);\n                }\n            } else if (letter.character == \"⌫\") {\n                if (this->highlight == letter.character[0]) {\n                    display->fillRect(xOffset, yOffset, cellWidth, cellHeight);\n\n                    display->setColor(OLEDDISPLAY_COLOR::BLACK);\n\n                    drawBackspaceIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2);\n\n                    display->setColor(OLEDDISPLAY_COLOR::WHITE);\n\n                    setIntervalFromNow(0);\n                } else {\n                    display->drawRect(xOffset, yOffset, cellWidth, cellHeight);\n\n                    drawBackspaceIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.2);\n                }\n            } else if (letter.character == \"↵\") {\n                display->drawRect(xOffset, yOffset, cellWidth, cellHeight);\n\n                drawEnterIcon(display, xOffset + characterOffset, yOffset + yCorrection + 5, 1.7);\n            } else {\n                if (this->highlight == letter.character[0]) {\n                    display->fillRect(xOffset, yOffset, cellWidth, cellHeight);\n\n                    display->setColor(OLEDDISPLAY_COLOR::BLACK);\n\n                    display->drawString(xOffset + characterOffset, yOffset + yCorrection,\n                                        letter.character == \" \" ? \"space\" : letter.character);\n\n                    display->setColor(OLEDDISPLAY_COLOR::WHITE);\n\n                    setIntervalFromNow(0);\n                } else {\n                    display->drawRect(xOffset, yOffset, cellWidth, cellHeight);\n\n                    display->drawString(xOffset + characterOffset, yOffset + yCorrection,\n                                        letter.character == \" \" ? \"space\" : letter.character);\n                }\n            }\n        }\n\n        xOffset = 0;\n    }\n\n    this->highlight = 0x00;\n}\n\nvoid CannedMessageModule::drawShiftIcon(OLEDDisplay *display, int x, int y, float scale)\n{\n    PointStruct shiftIcon[10] = {{8, 0}, {15, 7}, {15, 8}, {12, 8}, {12, 12}, {4, 12}, {4, 8}, {1, 8}, {1, 7}, {8, 0}};\n\n    int size = 10;\n\n    for (int i = 0; i < size - 1; i++) {\n        int x0 = x + (shiftIcon[i].x * scale);\n        int y0 = y + (shiftIcon[i].y * scale);\n        int x1 = x + (shiftIcon[i + 1].x * scale);\n        int y1 = y + (shiftIcon[i + 1].y * scale);\n\n        display->drawLine(x0, y0, x1, y1);\n    }\n}\n\nvoid CannedMessageModule::drawBackspaceIcon(OLEDDisplay *display, int x, int y, float scale)\n{\n    PointStruct backspaceIcon[6] = {{0, 7}, {5, 2}, {15, 2}, {15, 12}, {5, 12}, {0, 7}};\n\n    int size = 6;\n\n    for (int i = 0; i < size - 1; i++) {\n        int x0 = x + (backspaceIcon[i].x * scale);\n        int y0 = y + (backspaceIcon[i].y * scale);\n        int x1 = x + (backspaceIcon[i + 1].x * scale);\n        int y1 = y + (backspaceIcon[i + 1].y * scale);\n\n        display->drawLine(x0, y0, x1, y1);\n    }\n\n    PointStruct backspaceIconX[4] = {{7, 4}, {13, 10}, {7, 10}, {13, 4}};\n\n    size = 4;\n\n    for (int i = 0; i < size - 1; i++) {\n        int x0 = x + (backspaceIconX[i].x * scale);\n        int y0 = y + (backspaceIconX[i].y * scale);\n        int x1 = x + (backspaceIconX[i + 1].x * scale);\n        int y1 = y + (backspaceIconX[i + 1].y * scale);\n\n        display->drawLine(x0, y0, x1, y1);\n    }\n}\n\nvoid CannedMessageModule::drawEnterIcon(OLEDDisplay *display, int x, int y, float scale)\n{\n    PointStruct enterIcon[6] = {{0, 7}, {4, 3}, {4, 11}, {0, 7}, {15, 7}, {15, 0}};\n\n    int size = 6;\n\n    for (int i = 0; i < size - 1; i++) {\n        int x0 = x + (enterIcon[i].x * scale);\n        int y0 = y + (enterIcon[i].y * scale);\n        int x1 = x + (enterIcon[i + 1].x * scale);\n        int y1 = y + (enterIcon[i + 1].y * scale);\n\n        display->drawLine(x0, y0, x1, y1);\n    }\n}\n\n#endif\n\n// Indicate to screen class that module is handling keyboard input specially (at certain times)\n// This prevents the left & right keys being used for nav. between screen frames during text entry.\nbool CannedMessageModule::interceptingKeyboardInput()\n{\n    switch (runState) {\n    case CANNED_MESSAGE_RUN_STATE_DISABLED:\n    case CANNED_MESSAGE_RUN_STATE_INACTIVE:\n        return false;\n    default:\n        return true;\n    }\n}\n\n// Draw the node/channel selection screen\nvoid CannedMessageModule::drawDestinationSelectionScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    requestFocus();\n    display->setColor(WHITE); // Always draw cleanly\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n\n    // Header\n    int titleY = 2;\n    String titleText = \"Select Destination\";\n    titleText += searchQuery.length() > 0 ? \" [\" + searchQuery + \"]\" : \" [ ]\";\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    display->drawString(display->getWidth() / 2, titleY, titleText);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    // List Items\n    int rowYOffset = titleY + (FONT_HEIGHT_SMALL - 4);\n    int numActiveChannels = this->activeChannelIndices.size();\n    int totalEntries = numActiveChannels + this->filteredNodes.size();\n    int columns = 1;\n    this->visibleRows = (display->getHeight() - (titleY + FONT_HEIGHT_SMALL)) / (FONT_HEIGHT_SMALL - 4);\n    if (this->visibleRows < 1)\n        this->visibleRows = 1;\n\n    // Clamp scrolling\n    if (scrollIndex > totalEntries / columns)\n        scrollIndex = totalEntries / columns;\n    if (scrollIndex < 0)\n        scrollIndex = 0;\n\n    for (int row = 0; row < visibleRows; row++) {\n        int itemIndex = scrollIndex + row;\n        if (itemIndex >= totalEntries)\n            break;\n\n        int xOffset = 0;\n        int yOffset = row * (FONT_HEIGHT_SMALL - 4) + rowYOffset;\n        std::string entryText;\n\n        // Draw Channels First\n        if (itemIndex < numActiveChannels) {\n            uint8_t channelIndex = this->activeChannelIndices[itemIndex];\n            const char *channelName = channels.getName(channelIndex);\n            entryText = std::string(\"#\") + (channelName ? channelName : \"?\");\n        }\n        // Then Draw Nodes\n        else {\n            int nodeIndex = itemIndex - numActiveChannels;\n            if (nodeIndex >= 0 && nodeIndex < static_cast<int>(this->filteredNodes.size())) {\n                meshtastic_NodeInfoLite *node = this->filteredNodes[nodeIndex].node;\n                if (node) {\n                    if (display->getWidth() <= 64) {\n                        entryText = node->user.short_name;\n                    } else if (node->user.long_name[0]) {\n                        entryText = node->user.long_name;\n                    } else {\n                        entryText = node->user.short_name;\n                    }\n                }\n\n                int availWidth = display->getWidth() -\n                                 ((graphics::currentResolution == graphics::ScreenResolution::High) ? 40 : 20) -\n                                 ((node && node->is_favorite) ? 10 : 0);\n                if (availWidth < 0)\n                    availWidth = 0;\n                char truncatedEntry[96];\n                graphics::UIRenderer::truncateStringWithEmotes(display, entryText.c_str(), truncatedEntry, sizeof(truncatedEntry),\n                                                               availWidth);\n                entryText = truncatedEntry;\n\n                // Prepend \"* \" if this is a favorite\n                if (node && node->is_favorite) {\n                    entryText = \"* \" + entryText;\n                }\n                graphics::UIRenderer::truncateStringWithEmotes(display, entryText.c_str(), truncatedEntry, sizeof(truncatedEntry),\n                                                               availWidth);\n                entryText = truncatedEntry;\n            }\n        }\n\n        if (entryText.empty() || entryText == \"Unknown\")\n            entryText = \"?\";\n\n        // Highlight background (if selected)\n        if (itemIndex == destIndex) {\n            int scrollPadding = 8; // Reserve space for scrollbar\n            display->fillRect(0, yOffset + 2, display->getWidth() - scrollPadding, FONT_HEIGHT_SMALL - 5);\n            display->setColor(BLACK);\n        }\n\n        // Draw entry text\n        graphics::UIRenderer::drawStringWithEmotes(display, xOffset + 2, yOffset, entryText.c_str(), FONT_HEIGHT_SMALL, 1, false);\n        display->setColor(WHITE);\n\n        // Draw key icon (after highlight)\n        /*\n        if (itemIndex >= numActiveChannels) {\n            int nodeIndex = itemIndex - numActiveChannels;\n            if (nodeIndex >= 0 && nodeIndex < static_cast<int>(this->filteredNodes.size())) {\n                const meshtastic_NodeInfoLite *node = this->filteredNodes[nodeIndex].node;\n                if (node && hasKeyForNode(node)) {\n                    int iconX = display->getWidth() - key_symbol_width - 15;\n                    int iconY = yOffset + (FONT_HEIGHT_SMALL - key_symbol_height) / 2;\n\n                    if (itemIndex == destIndex) {\n                        display->setColor(INVERSE);\n                    } else {\n                        display->setColor(WHITE);\n                    }\n                    display->drawXbm(iconX, iconY, key_symbol_width, key_symbol_height, key_symbol);\n                }\n            }\n        }\n        */\n    }\n\n    // Scrollbar\n    if (totalEntries > visibleRows) {\n        int scrollbarHeight = visibleRows * (FONT_HEIGHT_SMALL - 4);\n        int totalScrollable = totalEntries;\n        int scrollTrackX = display->getWidth() - 6;\n        display->drawRect(scrollTrackX, rowYOffset, 4, scrollbarHeight);\n        int scrollHeight = (scrollbarHeight * visibleRows) / totalScrollable;\n        int scrollPos = rowYOffset + (scrollbarHeight * scrollIndex) / totalScrollable;\n        display->fillRect(scrollTrackX, scrollPos, 4, scrollHeight);\n    }\n}\n\nvoid CannedMessageModule::drawEmotePickerScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    const int headerFontHeight = FONT_HEIGHT_SMALL; // Make sure this matches your actual small font height\n    const int headerMargin = 2;                     // Extra pixels below header\n    const int labelGap = 4;\n    const int bitmapGapX = 4;\n\n    const int maxEmoteHeight = graphics::EmoteRenderer::maxEmoteHeight();\n    const int rowHeight = maxEmoteHeight + 2;\n\n    // Place header at top, then compute start of emote list\n    int headerY = y;\n    int listTop = headerY + headerFontHeight + headerMargin;\n\n    int _visibleRows = (display->getHeight() - listTop - 2) / rowHeight;\n    int numEmotes = graphics::numEmotes;\n\n    // keep member variable in sync\n    this->visibleRows = _visibleRows;\n\n    // Clamp highlight index\n    if (emotePickerIndex < 0)\n        emotePickerIndex = 0;\n    if (emotePickerIndex >= numEmotes)\n        emotePickerIndex = numEmotes - 1;\n\n    // Determine which emote is at the top\n    int topIndex = emotePickerIndex - _visibleRows / 2;\n    if (topIndex < 0)\n        topIndex = 0;\n    if (topIndex > numEmotes - _visibleRows)\n        topIndex = std::max(0, numEmotes - _visibleRows);\n\n    // Draw header/title\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    display->drawString(display->getWidth() / 2, headerY, \"Select Emote\");\n\n    // Draw emote rows\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n    for (int vis = 0; vis < _visibleRows; ++vis) {\n        int emoteIdx = topIndex + vis;\n        if (emoteIdx >= numEmotes)\n            break;\n        const graphics::Emote &emote = graphics::emotes[emoteIdx];\n        int rowY = listTop + vis * rowHeight;\n\n        // Draw highlight box 2px taller than emote (1px margin above and below)\n        if (emoteIdx == emotePickerIndex) {\n            display->fillRect(x, rowY, display->getWidth() - 8, emote.height + 2);\n            display->setColor(BLACK);\n        }\n\n        // Emote bitmap (left), centered inside the row\n        int labelStartX = x + bitmapGapX;\n        const int emoteY = rowY + ((rowHeight - emote.height) / 2);\n        display->drawXbm(labelStartX, emoteY, emote.width, emote.height, emote.bitmap);\n        labelStartX += emote.width;\n\n        // Emote label (right of bitmap)\n        display->setFont(FONT_MEDIUM);\n        int labelY = rowY + ((rowHeight - FONT_HEIGHT_MEDIUM) / 2);\n        display->drawString(labelStartX + labelGap, labelY, emote.label);\n\n        if (emoteIdx == emotePickerIndex)\n            display->setColor(WHITE);\n    }\n\n    // Draw scrollbar if needed\n    if (numEmotes > _visibleRows) {\n        int scrollbarHeight = _visibleRows * rowHeight;\n        int scrollTrackX = display->getWidth() - 6;\n        display->drawRect(scrollTrackX, listTop, 4, scrollbarHeight);\n        int scrollBarLen = std::max(6, (scrollbarHeight * _visibleRows) / numEmotes);\n        int scrollBarPos = listTop + (scrollbarHeight * topIndex) / numEmotes;\n        display->fillRect(scrollTrackX, scrollBarPos, 4, scrollBarLen);\n    }\n}\n\nvoid CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    this->displayHeight = display->getHeight(); // Store display height for later use\n    char buffer[50];\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n\n    // Never draw if state is outside our UI modes\n    if (!(runState == CANNED_MESSAGE_RUN_STATE_ACTIVE || runState == CANNED_MESSAGE_RUN_STATE_FREETEXT ||\n          runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION || runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER)) {\n        return; // bail if not in a UI state that should render\n    }\n\n    // Emote Picker Screen\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER) {\n        drawEmotePickerScreen(display, state, x, y); // <-- Call your emote picker drawer here\n        return;\n    }\n\n    // Destination Selection\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {\n        drawDestinationSelectionScreen(display, state, x, y);\n        return;\n    }\n\n    // Disabled Screen\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_DISABLED) {\n        display->setTextAlignment(TEXT_ALIGN_LEFT);\n        display->setFont(FONT_SMALL);\n        display->drawString(10 + x, 0 + y + FONT_HEIGHT_SMALL, \"Canned Message\\nModule disabled.\");\n        return;\n    }\n\n    // Free Text Input Screen\n    if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT) {\n        requestFocus();\n#if defined(USE_EINK) && defined(USE_EINK_DYNAMICDISPLAY)\n        EInkDynamicDisplay *einkDisplay = static_cast<EInkDynamicDisplay *>(display);\n        einkDisplay->enableUnlimitedFastMode();\n#endif\n#if defined(USE_VIRTUAL_KEYBOARD)\n        drawKeyboard(display, state, 0, 0);\n#else\n        display->setTextAlignment(TEXT_ALIGN_LEFT);\n        display->setFont(FONT_SMALL);\n\n        // Draw node/channel header at the top\n        drawHeader(display, x, y, buffer);\n\n        // Char count right-aligned\n        if (runState != CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {\n            uint16_t charsLeft =\n                meshtastic_Constants_DATA_PAYLOAD_LEN - this->freetext.length() - (moduleConfig.canned_message.send_bell ? 1 : 0);\n            snprintf(buffer, sizeof(buffer), \"%d left\", charsLeft);\n            display->drawString(x + display->getWidth() - display->getStringWidth(buffer), y + 0, buffer);\n        }\n\n#if INPUTBROKER_SERIAL_TYPE == 1\n        // Chatter Modifier key mode label (right side)\n        {\n            uint8_t mode = globalSerialKeyboard ? globalSerialKeyboard->getShift() : 0;\n            const char *label = (mode == 0) ? \"a\" : (mode == 1) ? \"A\" : \"#\";\n\n            display->setFont(FONT_SMALL);\n            display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n            const int16_t th = FONT_HEIGHT_SMALL;\n            const int16_t tw = display->getStringWidth(label);\n            const int16_t padX = 3;\n            const int16_t padY = 2;\n            const int16_t r = 3;\n\n            const int16_t bw = tw + padX * 2;\n            const int16_t bh = th + padY * 2;\n\n            const int16_t bx = x + display->getWidth() - bw - 2;\n            const int16_t by = y + display->getHeight() - bh - 2;\n\n            display->setColor(WHITE);\n            display->fillRect(bx + r, by, bw - r * 2, bh);\n            display->fillRect(bx, by + r, r, bh - r * 2);\n            display->fillRect(bx + bw - r, by + r, r, bh - r * 2);\n            display->fillCircle(bx + r, by + r, r);\n            display->fillCircle(bx + bw - r - 1, by + r, r);\n            display->fillCircle(bx + r, by + bh - r - 1, r);\n            display->fillCircle(bx + bw - r - 1, by + bh - r - 1, r);\n\n            display->setColor(BLACK);\n            display->drawString(bx + padX, by + padY, label);\n        }\n\n        // LEFT-SIDE DESTINATION-HINT BOX (“Dest: Shift + ◄”)\n        {\n            display->setFont(FONT_SMALL);\n            display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n            const char *label = \"Dest: Shift + \";\n            int16_t labelW = display->getStringWidth(label);\n\n            // triangle size visually matches glyph height, not full line height\n            const int triH = FONT_HEIGHT_SMALL - 3;\n            const int triW = triH * 0.7;\n\n            const int16_t padX = 3;\n            const int16_t padY = 2;\n            const int16_t r = 3;\n\n            const int16_t bw = labelW + triW + padX * 2 + 2;\n            const int16_t bh = FONT_HEIGHT_SMALL + padY * 2;\n\n            const int16_t bx = x + 2;\n            const int16_t by = y + display->getHeight() - bh - 2;\n\n            // Rounded white box\n            display->setColor(WHITE);\n            display->fillRect(bx + r, by, bw - (r * 2), bh);\n            display->fillRect(bx, by + r, r, bh - (r * 2));\n            display->fillRect(bx + bw - r, by + r, r, bh - (r * 2));\n            display->fillCircle(bx + r, by + r, r);\n            display->fillCircle(bx + bw - r - 1, by + r, r);\n            display->fillCircle(bx + r, by + bh - r - 1, r);\n            display->fillCircle(bx + bw - r - 1, by + bh - r - 1, r);\n\n            // Draw text\n            display->setColor(BLACK);\n            display->drawString(bx + padX, by + padY, label);\n\n            // Perfectly center triangle on text baseline\n            int16_t tx = bx + padX + labelW;\n            int16_t ty = by + padY + (FONT_HEIGHT_SMALL / 2) - (triH / 2) - 1; // -1 for optical centering\n\n            // ◄ Left-pointing triangle\n            display->fillTriangle(tx + triW, ty,       // top-right\n                                  tx, ty + triH / 2,   // left center\n                                  tx + triW, ty + triH // bottom-right\n            );\n        }\n#endif\n        // Draw Free Text input with multi-emote support and proper line wrapping\n        display->setColor(WHITE);\n        {\n            int inputY = 0 + y + FONT_HEIGHT_SMALL;\n            String msgWithCursor = this->drawWithCursor(this->freetext, this->cursor);\n            drawWrappedEmoteText(display, x, inputY, msgWithCursor.c_str(), display->getWidth() - x, FONT_HEIGHT_SMALL);\n        }\n#endif\n        return;\n    }\n\n    // Canned Messages List\n    if (this->messagesCount > 0) {\n        display->setTextAlignment(TEXT_ALIGN_LEFT);\n        display->setFont(FONT_SMALL);\n\n        // Precompute per-row heights based on emotes (centered if present)\n        const int baseRowSpacing = FONT_HEIGHT_SMALL - 4;\n\n        int topMsg;\n        int _visibleRows;\n\n        // Draw header (To: ...)\n        drawHeader(display, x, y, buffer);\n\n        // Shift message list upward by 3 pixels to reduce spacing between header and first message\n        const int listYOffset = y + FONT_HEIGHT_SMALL - 3;\n        _visibleRows = (display->getHeight() - listYOffset) / baseRowSpacing;\n\n        // Figure out which messages are visible and their needed heights\n        topMsg = (messagesCount > _visibleRows && currentMessageIndex >= _visibleRows - 1)\n                     ? currentMessageIndex - _visibleRows + 2\n                     : 0;\n        int countRows = std::min(messagesCount, _visibleRows);\n\n        // Draw all message rows with multi-emote support\n        int yCursor = listYOffset;\n        for (int vis = 0; vis < countRows; vis++) {\n            int msgIdx = topMsg + vis;\n            int lineY = yCursor;\n            const char *msg = getMessageByIndex(msgIdx);\n            int rowHeight = getRowHeightForEmoteText(msg, baseRowSpacing);\n            bool _highlight = (msgIdx == currentMessageIndex);\n\n            // Vertically center based on rowHeight\n            int textYOffset = (rowHeight - FONT_HEIGHT_SMALL) / 2;\n\n#ifdef USE_EINK\n            int nextX = x + (_highlight ? 12 : 0);\n            if (_highlight)\n                display->drawString(x + 0, lineY + textYOffset, \">\");\n#else\n            int scrollPadding = 8;\n            if (_highlight) {\n                display->fillRect(x + 0, lineY, display->getWidth() - scrollPadding, rowHeight);\n                display->setColor(BLACK);\n            }\n            int nextX = x + (_highlight ? 2 : 0);\n#endif\n\n            if (msg && *msg)\n                drawCenteredEmoteText(display, nextX, lineY, rowHeight, msg);\n#ifndef USE_EINK\n            if (_highlight)\n                display->setColor(WHITE);\n#endif\n\n            yCursor += rowHeight;\n        }\n\n        // Scrollbar\n        if (messagesCount > _visibleRows) {\n            int scrollHeight = display->getHeight() - listYOffset;\n            int scrollTrackX = display->getWidth() - 6;\n            display->drawRect(scrollTrackX, listYOffset, 4, scrollHeight);\n            int barHeight = (scrollHeight * _visibleRows) / messagesCount;\n            int scrollPos = listYOffset + (scrollHeight * topMsg) / messagesCount;\n            display->fillRect(scrollTrackX, scrollPos, 4, barHeight);\n        }\n    }\n}\n\n// Return SNR limit based on modem preset\nstatic float getSnrLimit(meshtastic_Config_LoRaConfig_ModemPreset preset)\n{\n    switch (preset) {\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:\n    case meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST:\n        return -6.0f;\n    case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:\n    case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:\n        return -5.5f;\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:\n    case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:\n        return -4.5f;\n    default:\n        return -6.0f;\n    }\n}\n\n// Return Good/Fair/Bad label and set 1–5 bars based on SNR and RSSI\nstatic const char *getSignalGrade(float snr, int32_t rssi, float snrLimit, int &bars)\n{\n    // 5-bar logic: strength inside Good/Fair/Bad category\n    if (snr > snrLimit && rssi > -10) {\n        bars = 5; // very strong good\n        return \"Good\";\n    } else if (snr > snrLimit && rssi > -20) {\n        bars = 4; // normal good\n        return \"Good\";\n    } else if (snr > 0 && rssi > -50) {\n        bars = 3; // weaker good (on edge of fair)\n        return \"Good\";\n    } else if (snr > -10 && rssi > -100) {\n        bars = 2; // fair\n        return \"Fair\";\n    } else {\n        bars = 1; // bad\n        return \"Bad\";\n    }\n}\n\nProcessMessage CannedMessageModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    // Only process routing ACK/NACK packets that are responses to our own outbound\n    if (mp.decoded.portnum == meshtastic_PortNum_ROUTING_APP && waitingForAck && mp.to == nodeDB->getNodeNum() &&\n        mp.decoded.request_id == this->lastRequestId) // only ACKs for our last sent packet\n    {\n        if (mp.decoded.request_id != 0) {\n            // Decode the routing response\n            meshtastic_Routing decoded = meshtastic_Routing_init_default;\n            pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, meshtastic_Routing_fields, &decoded);\n\n            // Determine ACK/NACK status\n            bool isAck = (decoded.error_reason == meshtastic_Routing_Error_NONE);\n            bool isFromDest = (mp.from == this->lastSentNode);\n            bool wasBroadcast = (this->lastSentNode == NODENUM_BROADCAST);\n\n            // Identify the responding node\n            if (wasBroadcast && mp.from != nodeDB->getNodeNum()) {\n                this->incoming = mp.from; // relayed by another node\n            } else {\n                this->incoming = this->lastSentNode; // direct reply\n            }\n\n            // Final ACK/NACK logic\n            if (wasBroadcast) {\n                // Any ACK counts for broadcast\n                this->ack = isAck;\n                waitingForAck = false;\n            } else if (isFromDest) {\n                // Only ACK from destination counts as final\n                this->ack = isAck;\n                waitingForAck = false;\n            } else if (isAck) {\n                // Relay ACK → mark as RELAYED, still no final ACK\n                this->ack = false;\n                waitingForAck = false;\n            } else {\n                // Explicit failure\n                this->ack = false;\n                waitingForAck = false;\n            }\n\n            // Update last sent StoredMessage with ACK/NACK/RELAYED result\n            if (!messageStore.getMessages().empty()) {\n                StoredMessage &last = const_cast<StoredMessage &>(messageStore.getMessages().back());\n                if (last.sender == nodeDB->getNodeNum()) { // only update our own messages\n                    if (wasBroadcast && isAck) {\n                        last.ackStatus = AckStatus::ACKED;\n                    } else if (isFromDest && isAck) {\n                        last.ackStatus = AckStatus::ACKED;\n                    } else if (!isFromDest && isAck) {\n                        last.ackStatus = AckStatus::RELAYED;\n                    } else {\n                        last.ackStatus = AckStatus::NACKED;\n                    }\n                }\n            }\n\n            // Capture radio metrics\n            this->lastRxRssi = mp.rx_rssi;\n            this->lastRxSnr = mp.rx_snr;\n\n            // Show overlay banner\n            if (screen) {\n                auto *display = screen->getDisplayDevice();\n                graphics::BannerOverlayOptions opts;\n                static char buf[128];\n\n                const char *channelName = channels.getName(this->channel);\n                const char *src = getNodeName(this->incoming);\n                char nodeName[48];\n                strncpy(nodeName, src, sizeof(nodeName) - 1);\n                nodeName[sizeof(nodeName) - 1] = '\\0';\n\n                int availWidth =\n                    display->getWidth() - ((graphics::currentResolution == graphics::ScreenResolution::High) ? 60 : 30);\n                if (availWidth < 0)\n                    availWidth = 0;\n\n                size_t origLen = strlen(nodeName);\n                while (nodeName[0] && display->getStringWidth(nodeName) > availWidth) {\n                    nodeName[strlen(nodeName) - 1] = '\\0';\n                }\n                if (strlen(nodeName) < origLen) {\n                    strcat(nodeName, \"...\");\n                }\n\n                // Calculate signal quality and bars based on preset, SNR, and RSSI\n                float snrLimit = getSnrLimit(config.lora.modem_preset);\n                int bars = 0;\n                const char *qualityLabel = getSignalGrade(this->lastRxSnr, this->lastRxRssi, snrLimit, bars);\n\n                if (this->ack) {\n                    if (this->lastSentNode == NODENUM_BROADCAST) {\n                        snprintf(buf, sizeof(buf), \"Message sent to\\n#%s\\n\\nSignal: %s\",\n                                 (channelName && channelName[0]) ? channelName : \"unknown\", qualityLabel);\n                    } else {\n                        snprintf(buf, sizeof(buf), \"DM sent to\\n@%s\\n\\nSignal: %s\",\n                                 (nodeName && nodeName[0]) ? nodeName : \"unknown\", qualityLabel);\n                    }\n                } else if (isAck && !isFromDest) {\n                    // Relay ACK banner\n                    snprintf(buf, sizeof(buf), \"DM Relayed\\n(Status Unknown)\\n%s\\n\\nSignal: %s\",\n                             (nodeName && nodeName[0]) ? nodeName : \"unknown\", qualityLabel);\n                } else {\n                    if (this->lastSentNode == NODENUM_BROADCAST) {\n                        snprintf(buf, sizeof(buf), \"Message failed to\\n#%s\",\n                                 (channelName && channelName[0]) ? channelName : \"unknown\");\n                    } else {\n                        snprintf(buf, sizeof(buf), \"DM failed to\\n@%s\", (nodeName && nodeName[0]) ? nodeName : \"unknown\");\n                    }\n                }\n\n                opts.message = buf;\n                opts.durationMs = 3000;\n                graphics::bannerSignalBars = bars; // tell banner renderer how many bars to draw\n                screen->showOverlayBanner(opts);   // this triggers drawNotificationBox()\n            }\n        }\n    }\n\n    return ProcessMessage::CONTINUE;\n}\n\nvoid CannedMessageModule::loadProtoForModule()\n{\n    if (nodeDB->loadProto(cannedMessagesConfigFile, meshtastic_CannedMessageModuleConfig_size,\n                          sizeof(meshtastic_CannedMessageModuleConfig), &meshtastic_CannedMessageModuleConfig_msg,\n                          &cannedMessageModuleConfig) != LoadFileResult::LOAD_SUCCESS) {\n        installDefaultCannedMessageModuleConfig();\n    }\n}\n/**\n * @brief Save the module config to file.\n *\n * @return true On success.\n * @return false On error.\n */\nbool CannedMessageModule::saveProtoForModule()\n{\n    bool okay = true;\n\n#ifdef FSCom\n    spiLock->lock();\n    FSCom.mkdir(\"/prefs\");\n    spiLock->unlock();\n#endif\n\n    okay &= nodeDB->saveProto(cannedMessagesConfigFile, meshtastic_CannedMessageModuleConfig_size,\n                              &meshtastic_CannedMessageModuleConfig_msg, &cannedMessageModuleConfig);\n\n    return okay;\n}\n\n/**\n * @brief Fill configuration with default values.\n */\nvoid CannedMessageModule::installDefaultCannedMessageModuleConfig()\n{\n    strncpy(cannedMessageModuleConfig.messages, \"Hi|Bye|Yes|No|Ok\", sizeof(cannedMessageModuleConfig.messages));\n}\n\n/**\n * @brief An admin message arrived to AdminModule. We are asked whether we want to handle that.\n *\n * @param mp The mesh packet arrived.\n * @param request The AdminMessage request extracted from the packet.\n * @param response The prepared response\n * @return AdminMessageHandleResult HANDLED if message was handled\n *   HANDLED_WITH_RESULT if a result is also prepared.\n */\nAdminMessageHandleResult CannedMessageModule::handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                          meshtastic_AdminMessage *request,\n                                                                          meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result;\n\n    switch (request->which_payload_variant) {\n    case meshtastic_AdminMessage_get_canned_message_module_messages_request_tag:\n        LOG_DEBUG(\"Client getting radio canned messages\");\n        this->handleGetCannedMessageModuleMessages(mp, response);\n        result = AdminMessageHandleResult::HANDLED_WITH_RESPONSE;\n        break;\n\n    case meshtastic_AdminMessage_set_canned_message_module_messages_tag:\n        LOG_DEBUG(\"Client getting radio canned messages\");\n        this->handleSetCannedMessageModuleMessages(request->set_canned_message_module_messages);\n        result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    default:\n        result = AdminMessageHandleResult::NOT_HANDLED;\n    }\n\n    return result;\n}\n\nvoid CannedMessageModule::handleGetCannedMessageModuleMessages(const meshtastic_MeshPacket &req,\n                                                               meshtastic_AdminMessage *response)\n{\n    LOG_DEBUG(\"*** handleGetCannedMessageModuleMessages\");\n    if (req.decoded.want_response) {\n        response->which_payload_variant = meshtastic_AdminMessage_get_canned_message_module_messages_response_tag;\n        strncpy(response->get_canned_message_module_messages_response, cannedMessageModuleConfig.messages,\n                sizeof(response->get_canned_message_module_messages_response));\n    } // Don't send anything if not instructed to. Better than asserting.\n}\n\nvoid CannedMessageModule::handleSetCannedMessageModuleMessages(const char *from_msg)\n{\n    int changed = 0;\n\n    if (*from_msg) {\n        changed |= strcmp(cannedMessageModuleConfig.messages, from_msg);\n        strncpy(cannedMessageModuleConfig.messages, from_msg, sizeof(cannedMessageModuleConfig.messages));\n        LOG_DEBUG(\"*** from_msg.text:%s\", from_msg);\n    }\n\n    if (changed) {\n        this->saveProtoForModule();\n        if (splitConfiguredMessages()) {\n            moduleConfig.canned_message.enabled = true;\n        }\n    }\n}\n\nString CannedMessageModule::drawWithCursor(String text, int cursor)\n{\n    String result = text.substring(0, cursor) + \"_\" + text.substring(cursor);\n    return result;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/CannedMessageModule.h",
    "content": "#pragma once\n#if HAS_SCREEN\n#include \"ProtobufModule.h\"\n#include \"input/InputBroker.h\"\n\n// ============================\n//        Enums & Defines\n// ============================\n\nenum cannedMessageModuleRunState {\n    CANNED_MESSAGE_RUN_STATE_DISABLED,\n    CANNED_MESSAGE_RUN_STATE_INACTIVE,\n    CANNED_MESSAGE_RUN_STATE_ACTIVE,\n    CANNED_MESSAGE_RUN_STATE_SENDING_ACTIVE,\n    CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED,\n    CANNED_MESSAGE_RUN_STATE_ACTION_SELECT,\n    CANNED_MESSAGE_RUN_STATE_ACTION_UP,\n    CANNED_MESSAGE_RUN_STATE_ACTION_DOWN,\n    CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION,\n    CANNED_MESSAGE_RUN_STATE_FREETEXT,\n    CANNED_MESSAGE_RUN_STATE_MESSAGE_SELECTION,\n    CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER\n};\n\nenum CannedMessageModuleIconType { shift, backspace, space, enter };\n\n#define CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT 50\n#define CANNED_MESSAGE_MODULE_MESSAGES_SIZE 800\n\n// ============================\n//        Data Structures\n// ============================\n\nstruct Letter {\n    String character;\n    float width;\n    int rectX;\n    int rectY;\n    int rectWidth;\n    int rectHeight;\n};\n\nstruct NodeEntry {\n    meshtastic_NodeInfoLite *node;\n    uint32_t lastHeard;\n};\n\n// ============================\n//      Main Class\n// ============================\n\nclass CannedMessageModule : public SinglePortModule, public Observable<const UIFrameEvent *>, private concurrency::OSThread\n{\n  public:\n    CannedMessageModule();\n\n    void LaunchWithDestination(NodeNum, uint8_t newChannel = 0);\n    void LaunchRepeatDestination();\n    void LaunchFreetextWithDestination(NodeNum, uint8_t newChannel = 0);\n\n    // === Emote Picker navigation ===\n    int emotePickerIndex = 0; // Tracks currently selected emote in the picker\n\n    // === Message navigation ===\n    const char *getCurrentMessage();\n    const char *getPrevMessage();\n    const char *getNextMessage();\n    const char *getMessageByIndex(int index);\n    const char *getNodeName(NodeNum node);\n\n    // === State/UI ===\n    bool shouldDraw();\n    bool hasMessages();\n    void resetSearch();\n    void updateDestinationSelectionList();\n    void drawDestinationSelectionScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    bool isCharInputAllowed() const;\n    String drawWithCursor(String text, int cursor);\n\n    // === Emote Picker ===\n    int handleEmotePickerInput(const InputEvent *event);\n    void drawEmotePickerScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n\n    // === Admin Handlers ===\n    void handleGetCannedMessageModuleMessages(const meshtastic_MeshPacket &req, meshtastic_AdminMessage *response);\n    void handleSetCannedMessageModuleMessages(const char *from_msg);\n\n#ifdef RAK14014\n    cannedMessageModuleRunState getRunState() const { return runState; }\n#endif\n\n    // === Packet Interest Filter ===\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override\n    {\n        if (p->rx_rssi != 0)\n            lastRxRssi = p->rx_rssi;\n        if (p->rx_snr > 0)\n            lastRxSnr = p->rx_snr;\n        return (p->decoded.portnum == meshtastic_PortNum_ROUTING_APP) ? waitingForAck : false;\n    }\n\n  protected:\n    // === Thread Entry Point ===\n    virtual int32_t runOnce() override;\n\n    // === Transmission ===\n    void sendText(NodeNum dest, ChannelIndex channel, const char *message, bool wantReplies);\n    void drawHeader(OLEDDisplay *display, int16_t x, int16_t y, char *buffer);\n    int splitConfiguredMessages();\n    int getNextIndex();\n    int getPrevIndex();\n\n#if defined(USE_VIRTUAL_KEYBOARD)\n    void drawKeyboard(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n    String keyForCoordinates(uint x, uint y);\n    void drawShiftIcon(OLEDDisplay *display, int x, int y, float scale = 1);\n    void drawBackspaceIcon(OLEDDisplay *display, int x, int y, float scale = 1);\n    void drawEnterIcon(OLEDDisplay *display, int x, int y, float scale = 1);\n#endif\n\n    // === Input Handling ===\n    int handleInputEvent(const InputEvent *event);\n    virtual bool wantUIFrame() override { return shouldDraw(); }\n    virtual Observable<const UIFrameEvent *> *getUIFrameObservable() override { return this; }\n    virtual bool interceptingKeyboardInput() override;\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n    virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                 meshtastic_AdminMessage *request,\n                                                                 meshtastic_AdminMessage *response) override;\n\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n    void loadProtoForModule();\n    bool saveProtoForModule();\n    void installDefaultCannedMessageModuleConfig();\n\n  private:\n    // === Input Observers ===\n    CallbackObserver<CannedMessageModule, const InputEvent *> inputObserver =\n        CallbackObserver<CannedMessageModule, const InputEvent *>(this, &CannedMessageModule::handleInputEvent);\n\n    // === Display and UI ===\n    int displayHeight = 64;\n    int destIndex = 0;\n    int scrollIndex = 0;\n    int visibleRows = 0;\n    bool needsUpdate = true;\n    unsigned long lastUpdateMillis = 0;\n    String searchQuery;\n    String freetext;\n\n    // === Message Storage ===\n    char messageBuffer[CANNED_MESSAGE_MODULE_MESSAGES_SIZE + 1];\n    char *messages[CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT];\n    int messagesCount = 0;\n    int currentMessageIndex = -1;\n\n    // === Routing & Acknowledgment ===\n    NodeNum dest = NODENUM_BROADCAST;     // Destination node for outgoing messages (default: broadcast)\n    NodeNum incoming = NODENUM_BROADCAST; // Source node from which last ACK/NACK was received\n    NodeNum lastSentNode = 0;             // Tracks the most recent node we sent a message to (for UI display)\n    ChannelIndex channel = 0;             // Channel index used when sending a message\n\n    bool ack = false;           // True = ACK received, False = NACK or failed\n    bool waitingForAck = false; // True if we're expecting an ACK and should monitor routing packets\n    float lastRxSnr = 0;        // SNR from last received ACK (used for diagnostics/UI)\n    int32_t lastRxRssi = 0;     // RSSI from last received ACK (used for diagnostics/UI)\n    uint32_t lastRequestId = 0; // tracks the request_id of our last sent packet\n\n    // === State Tracking ===\n    cannedMessageModuleRunState runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;\n    char highlight = 0x00;\n    char payload = 0x00;\n    unsigned int cursor = 0;\n    unsigned long lastTouchMillis = 0;\n    uint32_t lastFilterUpdate = 0;\n    static constexpr uint32_t filterDebounceMs = 30;\n    std::vector<uint8_t> activeChannelIndices;\n    std::vector<NodeEntry> filteredNodes;\n\n#if defined(USE_VIRTUAL_KEYBOARD)\n    bool shift = false;\n    int charSet = 0; // 0=ABC, 1=123\n#endif\n\n    void updateState(cannedMessageModuleRunState, bool shouldRequestFocus = false);\n\n    bool isUpEvent(const InputEvent *event);\n    bool isDownEvent(const InputEvent *event);\n    bool isSelectEvent(const InputEvent *event);\n    bool handleTabSwitch(const InputEvent *event);\n    int handleDestinationSelectionInput(const InputEvent *event, bool isUp, bool isDown, bool isSelect);\n    bool handleMessageSelectorInput(const InputEvent *event, bool isUp, bool isDown, bool isSelect);\n    bool handleFreeTextInput(const InputEvent *event);\n\n#if defined(USE_VIRTUAL_KEYBOARD)\n    Letter keyboard[2][4][10] = {{{{\"Q\", 20, 0, 0, 0, 0},\n                                   {\"W\", 22, 0, 0, 0, 0},\n                                   {\"E\", 17, 0, 0, 0, 0},\n                                   {\"R\", 16.5, 0, 0, 0, 0},\n                                   {\"T\", 14, 0, 0, 0, 0},\n                                   {\"Y\", 15, 0, 0, 0, 0},\n                                   {\"U\", 16.5, 0, 0, 0, 0},\n                                   {\"I\", 5, 0, 0, 0, 0},\n                                   {\"O\", 19.5, 0, 0, 0, 0},\n                                   {\"P\", 15.5, 0, 0, 0, 0}},\n                                  {{\"A\", 14, 0, 0, 0, 0},\n                                   {\"S\", 15, 0, 0, 0, 0},\n                                   {\"D\", 16.5, 0, 0, 0, 0},\n                                   {\"F\", 15, 0, 0, 0, 0},\n                                   {\"G\", 17, 0, 0, 0, 0},\n                                   {\"H\", 15.5, 0, 0, 0, 0},\n                                   {\"J\", 12, 0, 0, 0, 0},\n                                   {\"K\", 15.5, 0, 0, 0, 0},\n                                   {\"L\", 14, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0}},\n                                  {{\"⇧\", 20, 0, 0, 0, 0},\n                                   {\"Z\", 14, 0, 0, 0, 0},\n                                   {\"X\", 14.5, 0, 0, 0, 0},\n                                   {\"C\", 15.5, 0, 0, 0, 0},\n                                   {\"V\", 13.5, 0, 0, 0, 0},\n                                   {\"B\", 15, 0, 0, 0, 0},\n                                   {\"N\", 15, 0, 0, 0, 0},\n                                   {\"M\", 17, 0, 0, 0, 0},\n                                   {\"⌫\", 20, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0}},\n                                  {{\"123\", 42, 0, 0, 0, 0},\n                                   {\" \", 64, 0, 0, 0, 0},\n                                   {\"↵\", 36, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0},\n                                   {\"\", 0, 0, 0, 0, 0}}},\n                                 {{{\"1\", 12, 0, 0, 0, 0},\n                                   {\"2\", 13.5, 0, 0, 0, 0},\n                                   {\"3\", 12.5, 0, 0, 0, 0},\n                                   {\"4\", 14, 0, 0, 0, 0},\n                                   {\"5\", 14, 0, 0, 0, 0},\n                                   {\"6\", 14, 0, 0, 0, 0},\n                                   {\"7\", 13.5, 0, 0, 0, 0},\n                                   {\"8\", 14, 0, 0, 0, 0},\n                                   {\"9\", 14, 0, 0, 0, 0},\n                                   {\"0\", 14, 0, 0, 0, 0}},\n                                  {{\"-\", 8, 0, 0, 0, 0},\n                                   {\"/\", 8, 0, 0, 0, 0},\n                                   {\":\", 4.5, 0, 0, 0, 0},\n                                   {\";\", 4.5, 0, 0, 0, 0},\n                                   {\"(\", 7, 0, 0, 0, 0},\n                                   {\")\", 6.5, 0, 0, 0, 0},\n                                   {\"$\", 12.5, 0, 0, 0, 0},\n                                   {\"&\", 15, 0, 0, 0, 0},\n                                   {\"@\", 21.5, 0, 0, 0, 0},\n                                   {\"\\\"\", 8, 0, 0, 0, 0}},\n                                  {{\".\", 8, 0, 0, 0, 0},\n                                   {\",\", 8, 0, 0, 0, 0},\n                                   {\"?\", 10, 0, 0, 0, 0},\n                                   {\"!\", 10, 0, 0, 0, 0},\n                                   {\"'\", 10, 0, 0, 0, 0},\n                                   {\"⌫\", 20, 0, 0, 0, 0}},\n                                  {{\"ABC\", 50, 0, 0, 0, 0}, {\" \", 64, 0, 0, 0, 0}, {\"↵\", 36, 0, 0, 0, 0}}}};\n#endif\n};\n\nextern CannedMessageModule *cannedMessageModule;\n#endif\n"
  },
  {
    "path": "src/modules/DetectionSensorModule.cpp",
    "content": "#include \"DetectionSensorModule.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include <Throttle.h>\nDetectionSensorModule *detectionSensorModule;\n\n#define GPIO_POLLING_INTERVAL 100\n#define DELAYED_INTERVAL 1000\n\ntypedef enum {\n    DetectionSensorVerdictDetected,\n    DetectionSensorVerdictSendState,\n    DetectionSensorVerdictNoop,\n} DetectionSensorTriggerVerdict;\n\ntypedef DetectionSensorTriggerVerdict (*DetectionSensorTriggerHandler)(bool prev, bool current);\n\nstatic DetectionSensorTriggerVerdict detection_trigger_logic_level(bool prev, bool current)\n{\n    return current ? DetectionSensorVerdictDetected : DetectionSensorVerdictNoop;\n}\n\nstatic DetectionSensorTriggerVerdict detection_trigger_single_edge(bool prev, bool current)\n{\n    return (!prev && current) ? DetectionSensorVerdictDetected : DetectionSensorVerdictNoop;\n}\n\nstatic DetectionSensorTriggerVerdict detection_trigger_either_edge(bool prev, bool current)\n{\n    if (prev == current) {\n        return DetectionSensorVerdictNoop;\n    }\n    return current ? DetectionSensorVerdictDetected : DetectionSensorVerdictSendState;\n}\n\nconst static DetectionSensorTriggerHandler handlers[_meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MAX + 1] = {\n    [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW] = detection_trigger_logic_level,\n    [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH] = detection_trigger_logic_level,\n    [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_FALLING_EDGE] = detection_trigger_single_edge,\n    [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_RISING_EDGE] = detection_trigger_single_edge,\n    [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_LOW] = detection_trigger_either_edge,\n    [meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH] = detection_trigger_either_edge,\n};\n\nint32_t DetectionSensorModule::runOnce()\n{\n    /*\n        Uncomment the preferences below if you want to use the module\n        without having to configure it from the PythonAPI or WebUI.\n    */\n    // moduleConfig.detection_sensor.enabled = true;\n    // moduleConfig.detection_sensor.monitor_pin = 10; // WisBlock PIR IO6\n    // moduleConfig.detection_sensor.monitor_pin = 21; // WisBlock RAK12013 Radar IO6\n    // moduleConfig.detection_sensor.minimum_broadcast_secs = 30;\n    // moduleConfig.detection_sensor.state_broadcast_secs = 120;\n    // moduleConfig.detection_sensor.detection_trigger_type =\n    // meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH;\n    // strcpy(moduleConfig.detection_sensor.name, \"Motion\");\n\n    if (moduleConfig.detection_sensor.enabled == false)\n        return disable();\n\n    if (firstTime) {\n\n#ifdef DETECTION_SENSOR_EN\n        pinMode(DETECTION_SENSOR_EN, OUTPUT);\n        digitalWrite(DETECTION_SENSOR_EN, HIGH);\n#endif\n\n        // This is the first time the OSThread library has called this function, so do some setup\n        firstTime = false;\n        if (moduleConfig.detection_sensor.monitor_pin > 0) {\n            pinMode(moduleConfig.detection_sensor.monitor_pin, moduleConfig.detection_sensor.use_pullup ? INPUT_PULLUP : INPUT);\n        } else {\n            LOG_WARN(\"Detection Sensor Module: Set to enabled but no monitor pin is set. Disable module\");\n            return disable();\n        }\n        LOG_INFO(\"Detection Sensor Module: init\");\n\n        return setStartDelay();\n    }\n\n    // LOG_DEBUG(\"Detection Sensor Module: Current pin state: %i\", digitalRead(moduleConfig.detection_sensor.monitor_pin));\n\n    if (!Throttle::isWithinTimespanMs(lastSentToMesh,\n                                      Default::getConfiguredOrDefaultMs(moduleConfig.detection_sensor.minimum_broadcast_secs))) {\n        bool isDetected = hasDetectionEvent();\n        DetectionSensorTriggerVerdict verdict =\n            handlers[moduleConfig.detection_sensor.detection_trigger_type](wasDetected, isDetected);\n        wasDetected = isDetected;\n        switch (verdict) {\n        case DetectionSensorVerdictDetected:\n            sendDetectionMessage();\n            return DELAYED_INTERVAL;\n        case DetectionSensorVerdictSendState:\n            sendCurrentStateMessage(isDetected);\n            return DELAYED_INTERVAL;\n        case DetectionSensorVerdictNoop:\n            break;\n        }\n    }\n    // Even if we haven't detected an event, broadcast our current state to the mesh on the scheduled interval as a sort\n    // of heartbeat. We only do this if the minimum broadcast interval is greater than zero, otherwise we'll only broadcast state\n    // change detections.\n    if (moduleConfig.detection_sensor.state_broadcast_secs > 0 &&\n        !Throttle::isWithinTimespanMs(lastSentToMesh,\n                                      Default::getConfiguredOrDefaultMs(moduleConfig.detection_sensor.state_broadcast_secs,\n                                                                        default_telemetry_broadcast_interval_secs))) {\n        sendCurrentStateMessage(hasDetectionEvent());\n        return DELAYED_INTERVAL;\n    }\n    return GPIO_POLLING_INTERVAL;\n}\n\nvoid DetectionSensorModule::sendDetectionMessage()\n{\n    LOG_DEBUG(\"Detected event observed. Send message\");\n    char *message = new char[40];\n    sprintf(message, \"%s detected\", moduleConfig.detection_sensor.name);\n    meshtastic_MeshPacket *p = allocDataPacket();\n    p->want_ack = false;\n    p->decoded.payload.size = strlen(message);\n    memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size);\n    if (moduleConfig.detection_sensor.send_bell && p->decoded.payload.size < meshtastic_Constants_DATA_PAYLOAD_LEN) {\n        p->decoded.payload.bytes[p->decoded.payload.size] = 7;        // Bell character\n        p->decoded.payload.bytes[p->decoded.payload.size + 1] = '\\0'; // Bell character\n        p->decoded.payload.size++;\n    }\n    lastSentToMesh = millis();\n    if (!channels.isDefaultChannel(0)) {\n        LOG_INFO(\"Send message id=%d, dest=%x, msg=%.*s\", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);\n        service->sendToMesh(p);\n    } else\n        LOG_ERROR(\"Message not allow on Public channel\");\n    delete[] message;\n}\n\nvoid DetectionSensorModule::sendCurrentStateMessage(bool state)\n{\n    char *message = new char[40];\n    sprintf(message, \"%s state: %i\", moduleConfig.detection_sensor.name, state);\n    meshtastic_MeshPacket *p = allocDataPacket();\n    p->want_ack = false;\n    p->decoded.payload.size = strlen(message);\n    memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size);\n    lastSentToMesh = millis();\n    if (!channels.isDefaultChannel(0)) {\n        LOG_INFO(\"Send message id=%d, dest=%x, msg=%.*s\", p->id, p->to, p->decoded.payload.size, p->decoded.payload.bytes);\n        service->sendToMesh(p);\n    } else\n        LOG_ERROR(\"Message not allow on Public channel\");\n    delete[] message;\n}\n\nbool DetectionSensorModule::hasDetectionEvent()\n{\n    bool currentState = digitalRead(moduleConfig.detection_sensor.monitor_pin);\n    // LOG_DEBUG(\"Detection Sensor Module: Current state: %i\", currentState);\n    return (moduleConfig.detection_sensor.detection_trigger_type & 1) ? currentState : !currentState;\n}"
  },
  {
    "path": "src/modules/DetectionSensorModule.h",
    "content": "#pragma once\n#include \"SinglePortModule.h\"\n\nclass DetectionSensorModule : public SinglePortModule, private concurrency::OSThread\n{\n  public:\n    DetectionSensorModule() : SinglePortModule(\"detection\", meshtastic_PortNum_DETECTION_SENSOR_APP), OSThread(\"DetectionSensor\")\n    {\n    }\n\n  protected:\n    virtual int32_t runOnce() override;\n\n  private:\n    bool firstTime = true;\n    uint32_t lastSentToMesh = 0;\n    bool wasDetected = false;\n    void sendDetectionMessage();\n    void sendCurrentStateMessage(bool state);\n    bool hasDetectionEvent();\n};\n\nextern DetectionSensorModule *detectionSensorModule;"
  },
  {
    "path": "src/modules/DropzoneModule.cpp",
    "content": "#if !MESHTASTIC_EXCLUDE_DROPZONE\n\n#include \"DropzoneModule.h\"\n#include \"Meshservice->h\"\n#include \"configuration.h\"\n#include \"gps/GeoCoord.h\"\n#include \"gps/RTC.h\"\n#include \"main.h\"\n\n#include <assert.h>\n\n#include \"modules/Telemetry/Sensor/DFRobotLarkSensor.h\"\n#include \"modules/Telemetry/UnitConversions.h\"\n\n#include <string>\n\nDropzoneModule *dropzoneModule;\n\nint32_t DropzoneModule::runOnce()\n{\n    // Send on a 5 second delay from receiving the matching request\n    if (startSendConditions != 0 && (startSendConditions + 5000U) < millis()) {\n        service->sendToMesh(sendConditions(), RX_SRC_LOCAL);\n        startSendConditions = 0;\n    }\n    // Run every second to check if we need to send conditions\n    return 1000;\n}\n\nProcessMessage DropzoneModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    auto &p = mp.decoded;\n    char matchCompare[54];\n    auto incomingMessage = reinterpret_cast<const char *>(p.payload.bytes);\n    sprintf(matchCompare, \"%s conditions\", owner.short_name);\n    if (strncasecmp(incomingMessage, matchCompare, strlen(matchCompare)) == 0) {\n        LOG_DEBUG(\"Received dropzone conditions request\");\n        startSendConditions = millis();\n    }\n\n    sprintf(matchCompare, \"%s conditions\", owner.long_name);\n    if (strncasecmp(incomingMessage, matchCompare, strlen(matchCompare)) == 0) {\n        LOG_DEBUG(\"Received dropzone conditions request\");\n        startSendConditions = millis();\n    }\n    return ProcessMessage::CONTINUE;\n}\n\nmeshtastic_MeshPacket *DropzoneModule::sendConditions()\n{\n    char replyStr[200];\n    /*\n        CLOSED @ {HH:MM:SS}z\n        Wind 2 kts @ 125°\n        29.25 inHg 72°C\n    */\n    uint32_t rtc_sec = getValidTime(RTCQuality::RTCQualityDevice, true);\n    int hour = 0, min = 0, sec = 0;\n    if (rtc_sec > 0) {\n        long hms = rtc_sec % SEC_PER_DAY;\n        hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;\n\n        graphics::decomposeTime(rtc_sec, hour, min, sec);\n    }\n\n    // Check if the dropzone is open or closed by reading the analog pin\n    // If pin is connected to GND (below 100 should be lower than floating voltage),\n    // the dropzone is open\n    auto dropzoneStatus = analogRead(A1) < 100 ? \"OPEN\" : \"CLOSED\";\n    auto reply = allocDataPacket();\n\n    auto node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    if (sensor.hasSensor()) {\n        meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero;\n        sensor.getMetrics(&telemetry);\n        auto windSpeed = UnitConversions::MetersPerSecondToKnots(telemetry.variant.environment_metrics.wind_speed);\n        auto windDirection = telemetry.variant.environment_metrics.wind_direction;\n        auto temp = telemetry.variant.environment_metrics.temperature;\n        auto baro = UnitConversions::HectoPascalToInchesOfMercury(telemetry.variant.environment_metrics.barometric_pressure);\n        sprintf(replyStr, \"%s @ %02d:%02d:%02dz\\nWind %.2f kts @ %d°\\nBaro %.2f inHg %.2f°C\", dropzoneStatus, hour, min, sec,\n                windSpeed, windDirection, baro, temp);\n    } else {\n        LOG_ERROR(\"No sensor found\");\n        sprintf(replyStr, \"%s @ %02d:%02d:%02d\\nNo sensor found\", dropzoneStatus, hour, min, sec);\n    }\n    LOG_DEBUG(\"Conditions reply: %s\", replyStr);\n    reply->decoded.payload.size = strlen(replyStr); // You must specify how many bytes are in the reply\n    memcpy(reply->decoded.payload.bytes, replyStr, reply->decoded.payload.size);\n\n    return reply;\n}\n\n#endif"
  },
  {
    "path": "src/modules/DropzoneModule.h",
    "content": "#pragma once\n#if !MESHTASTIC_EXCLUDE_DROPZONE\n#include \"SinglePortModule.h\"\n#include \"modules/Telemetry/Sensor/DFRobotLarkSensor.h\"\n\n/**\n * An example module that replies to a message with the current conditions\n * and status at the dropzone when it receives a text message mentioning it's name followed by \"conditions\"\n */\nclass DropzoneModule : public SinglePortModule, private concurrency::OSThread\n{\n    DFRobotLarkSensor sensor;\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    DropzoneModule() : SinglePortModule(\"dropzone\", meshtastic_PortNum_TEXT_MESSAGE_APP), concurrency::OSThread(\"Dropzone\")\n    {\n        // Set up the analog pin for reading the dropzone status\n        pinMode(PIN_A1, INPUT);\n    }\n\n    virtual int32_t runOnce() override;\n\n  protected:\n    /** Called to handle a particular incoming message\n     */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n  private:\n    meshtastic_MeshPacket *sendConditions();\n    uint32_t startSendConditions = 0;\n};\n\nextern DropzoneModule *dropzoneModule;\n#endif"
  },
  {
    "path": "src/modules/ExternalNotificationModule.cpp",
    "content": "/**\n * @file ExternalNotificationModule.cpp\n * @brief Implementation of the ExternalNotificationModule class.\n *\n * This file contains the implementation of the ExternalNotificationModule class, which is responsible for handling external\n * notifications such as vibration, buzzer, and LED lights. The class provides methods to turn on and off the external\n * notification outputs and to play ringtones using PWM buzzer. It also includes default configurations and a runOnce() method to\n * handle the module's behavior.\n *\n * Documentation:\n * https://meshtastic.org/docs/configuration/module/external-notification\n *\n * @author Jm Casler & Meshtastic Team\n * @date [Insert Date]\n */\n#include \"ExternalNotificationModule.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"buzz/buzz.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"mesh/generated/meshtastic/rtttl.pb.h\"\n#include <Arduino.h>\n\n#if defined(HAS_RGB_LED)\n#include \"AmbientLightingThread.h\"\nuint8_t red = 0;\nuint8_t green = 0;\nuint8_t blue = 0;\nuint8_t white = 0;\nuint8_t colorState = 1;\nuint8_t brightnessIndex = 0;\nuint8_t brightnessValues[] = {0, 10, 20, 30, 50, 90, 160, 170}; // blue gets multiplied by 1.5\nbool ascending = true;\n#endif\n\n#ifndef PIN_BUZZER\n#define PIN_BUZZER false\n#endif\n\n/*\n    Documentation:\n        https://meshtastic.org/docs/configuration/module/external-notification\n*/\n\n// Default configurations\n#ifdef EXT_NOTIFY_OUT\n#define EXT_NOTIFICATION_MODULE_OUTPUT EXT_NOTIFY_OUT\n#else\n#define EXT_NOTIFICATION_MODULE_OUTPUT 0\n#endif\n#define EXT_NOTIFICATION_MODULE_OUTPUT_MS 1000\n\n#define EXT_NOTIFICATION_FAST_THREAD_MS 25\n\n#define ASCII_BELL 0x07\n\nmeshtastic_RTTTLConfig rtttlConfig;\n\nExternalNotificationModule *externalNotificationModule;\n\nbool externalCurrentState[3] = {};\n\nuint32_t externalTurnedOn[3] = {};\n\nstatic const char *rtttlConfigFile = \"/prefs/ringtone.proto\";\n\nint32_t ExternalNotificationModule::runOnce()\n{\n    if (!moduleConfig.external_notification.enabled) {\n        return INT32_MAX; // we don't need this thread here...\n    } else {\n        uint32_t delay = EXT_NOTIFICATION_MODULE_OUTPUT_MS;\n        bool isRtttlPlaying = rtttl::isPlaying();\n#ifdef HAS_I2S\n        // audioThread->isPlaying() also handles actually playing the RTTTL, needs to be called in loop\n        isRtttlPlaying = isRtttlPlaying || audioThread->isPlaying();\n#endif\n        if ((nagCycleCutoff < millis()) && !isRtttlPlaying) {\n            // Turn off external notification immediately when timeout is reached, regardless of song state\n            nagCycleCutoff = UINT32_MAX;\n            ExternalNotificationModule::stopNow();\n            isNagging = false;\n            return INT32_MAX; // save cycles till we're needed again\n        }\n\n        // If the output is turned on, turn it back off after the given period of time.\n        if (isNagging) {\n            delay = (moduleConfig.external_notification.output_ms ? moduleConfig.external_notification.output_ms\n                                                                  : EXT_NOTIFICATION_MODULE_OUTPUT_MS);\n            if (externalTurnedOn[0] + delay < millis()) {\n                setExternalState(0, !getExternal(0));\n            }\n            if (externalTurnedOn[1] + delay < millis()) {\n                setExternalState(1, !getExternal(1));\n            }\n            // Only toggle buzzer output if not using PWM mode (to avoid conflict with RTTTL)\n            if (!moduleConfig.external_notification.use_pwm && externalTurnedOn[2] + delay < millis()) {\n                LOG_DEBUG(\"EXTERNAL 2 %d compared to %d\", externalTurnedOn[2] + moduleConfig.external_notification.output_ms,\n                          millis());\n                setExternalState(2, !getExternal(2));\n            }\n#if defined(HAS_RGB_LED)\n            red = (colorState & 4) ? brightnessValues[brightnessIndex] : 0;          // Red enabled on colorState = 4,5,6,7\n            green = (colorState & 2) ? brightnessValues[brightnessIndex] : 0;        // Green enabled on colorState = 2,3,6,7\n            blue = (colorState & 1) ? (brightnessValues[brightnessIndex] * 1.5) : 0; // Blue enabled on colorState = 1,3,5,7\n            white = (colorState & 12) ? brightnessValues[brightnessIndex] : 0;\n            if (ascending) { // fade in\n                brightnessIndex++;\n                if (brightnessIndex == (sizeof(brightnessValues) - 1)) {\n                    ascending = false;\n                }\n            } else {\n                brightnessIndex--; // fade out\n            }\n            if (brightnessIndex == 0) {\n                ascending = true;\n                colorState++; // next color\n                if (colorState > 7) {\n                    colorState = 1;\n                }\n            }\n            // we need fast updates for the color change\n            delay = EXT_NOTIFICATION_FAST_THREAD_MS;\n#endif\n\n#ifdef HAS_DRV2605\n            drv.go();\n#endif\n        }\n\n        // Play RTTTL over i2s audio interface if enabled as buzzer\n#ifdef HAS_I2S\n        if (moduleConfig.external_notification.use_i2s_as_buzzer) {\n            if (audioThread->isPlaying()) {\n                // Continue playing\n            } else if (isNagging && (nagCycleCutoff >= millis())) {\n                audioThread->beginRttl(rtttlConfig.ringtone, strlen_P(rtttlConfig.ringtone));\n            }\n            // we need fast updates to play the RTTTL\n            delay = EXT_NOTIFICATION_FAST_THREAD_MS;\n        }\n#endif\n        // now let the PWM buzzer play\n        if (moduleConfig.external_notification.use_pwm && config.device.buzzer_gpio && canBuzz()) {\n            if (rtttl::isPlaying()) {\n                rtttl::play();\n            } else if (isNagging && (nagCycleCutoff >= millis())) {\n                // start the song again if we have time left\n                rtttl::begin(config.device.buzzer_gpio, rtttlConfig.ringtone);\n            }\n            // we need fast updates to play the RTTTL\n            delay = EXT_NOTIFICATION_FAST_THREAD_MS;\n        }\n\n        return delay;\n    }\n}\n\n/**\n * Based on buzzer mode, return true if we can buzz.\n */\nbool ExternalNotificationModule::canBuzz()\n{\n    if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DISABLED &&\n        config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_SYSTEM_ONLY) {\n        return true;\n    }\n    return false;\n}\n\nbool ExternalNotificationModule::wantPacket(const meshtastic_MeshPacket *p)\n{\n    return MeshService::isTextPayload(p);\n}\n\n/**\n * Sets the external notification for the specified index.\n *\n * @param index The index of the external notification to change state.\n * @param on Whether we are turning things on (true) or off (false).\n */\nvoid ExternalNotificationModule::setExternalState(uint8_t index, bool on)\n{\n    externalCurrentState[index] = on;\n    externalTurnedOn[index] = millis();\n\n    switch (index) {\n    case 1:\n#ifdef UNPHONE\n        unphone.vibe(on); // the unPhone's vibration motor is on a i2c GPIO expander\n#endif\n        if (moduleConfig.external_notification.output_vibra)\n            digitalWrite(moduleConfig.external_notification.output_vibra, on);\n        break;\n    case 2:\n        // Only control buzzer pin digitally if not using PWM mode\n        if (moduleConfig.external_notification.output_buzzer && !moduleConfig.external_notification.use_pwm)\n            digitalWrite(moduleConfig.external_notification.output_buzzer, on);\n        break;\n    default:\n        if (output > 0)\n            digitalWrite(output, (moduleConfig.external_notification.active ? on : !on));\n        break;\n    }\n\n#if defined(HAS_RGB_LED)\n    if (!on) {\n        red = 0;\n        green = 0;\n        blue = 0;\n        white = 0;\n    }\n    ambientLightingThread->setLighting(moduleConfig.ambient_lighting.current, red, green, blue);\n#endif\n\n#ifdef HAS_DRV2605\n    if (on) {\n        drv.go();\n    } else {\n        drv.stop();\n    }\n#endif\n}\n\nbool ExternalNotificationModule::getExternal(uint8_t index)\n{\n    return externalCurrentState[index];\n}\n\n// Allow other firmware components to determine whether a notification is ongoing\nbool ExternalNotificationModule::nagging()\n{\n    return isNagging;\n}\n\nvoid ExternalNotificationModule::stopNow()\n{\n    LOG_INFO(\"Turning off external notification: \");\n    LOG_INFO(\"Stop RTTTL playback\");\n    rtttl::stop();\n#ifdef HAS_I2S\n    LOG_INFO(\"Stop audioThread playback\");\n    audioThread->stop();\n#endif\n    // Turn off all outputs\n    LOG_INFO(\"Turning off setExternalStates\");\n    for (int i = 0; i < 3; i++) {\n        setExternalState(i, false);\n        externalTurnedOn[i] = 0;\n    }\n    setIntervalFromNow(0);\n#ifdef HAS_DRV2605\n    drv.stop();\n#endif\n\n    // Prevent the state machine from immediately re-triggering outputs after a manual stop.\n    isNagging = false;\n    nagCycleCutoff = UINT32_MAX;\n\n#ifdef HAS_I2S\n    // GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library\n    // T-Deck uses GPIO0 as trackball button, so restore the mode\n#if defined(T_DECK) || (defined(BUTTON_PIN) && BUTTON_PIN == 0)\n    pinMode(0, INPUT);\n#endif\n#endif\n}\n\nExternalNotificationModule::ExternalNotificationModule()\n    : SinglePortModule(\"ExternalNotificationModule\", meshtastic_PortNum_TEXT_MESSAGE_APP),\n      concurrency::OSThread(\"ExternalNotification\")\n{\n    /*\n        Uncomment the preferences below if you want to use the module\n        without having to configure it from the PythonAPI or WebUI.\n    */\n\n    // moduleConfig.external_notification.alert_message = true;\n    // moduleConfig.external_notification.alert_message_buzzer = true;\n    // moduleConfig.external_notification.alert_message_vibra = true;\n    // moduleConfig.external_notification.use_i2s_as_buzzer = true;\n\n    // moduleConfig.external_notification.active = true;\n    // moduleConfig.external_notification.alert_bell = 1;\n    // moduleConfig.external_notification.output_ms = 1000;\n    // moduleConfig.external_notification.output = 4; // RAK4631 IO4\n    // moduleConfig.external_notification.output_buzzer = 10; // RAK4631 IO6\n    // moduleConfig.external_notification.output_vibra = 28; // RAK4631 IO7\n    // moduleConfig.external_notification.nag_timeout = 300;\n\n    // T-Watch / T-Deck i2s audio as buzzer:\n    // moduleConfig.external_notification.enabled = true;\n    // moduleConfig.external_notification.nag_timeout = 300;\n    // moduleConfig.external_notification.output_ms = 1000;\n    // moduleConfig.external_notification.use_i2s_as_buzzer = true;\n    // moduleConfig.external_notification.alert_message_buzzer = true;\n\n    if (moduleConfig.external_notification.enabled) {\n#if !defined(MESHTASTIC_EXCLUDE_INPUTBROKER)\n        if (inputBroker) // put our callback in the inputObserver list\n            inputObserver.observe(inputBroker);\n#endif\n        if (nodeDB->loadProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, sizeof(meshtastic_RTTTLConfig),\n                              &meshtastic_RTTTLConfig_msg, &rtttlConfig) != LoadFileResult::LOAD_SUCCESS) {\n            memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone));\n            // The default ringtone is always loaded from userPrefs.jsonc\n            strncpy(rtttlConfig.ringtone, USERPREFS_RINGTONE_RTTTL, sizeof(rtttlConfig.ringtone));\n        }\n\n        LOG_INFO(\"Init External Notification Module\");\n\n        output = moduleConfig.external_notification.output ? moduleConfig.external_notification.output\n                                                           : EXT_NOTIFICATION_MODULE_OUTPUT;\n\n        // Set the direction of a pin\n        if (output > 0) {\n            LOG_INFO(\"Use Pin %i in digital mode\", output);\n            pinMode(output, OUTPUT);\n        }\n        setExternalState(0, false);\n        externalTurnedOn[0] = 0;\n        if (moduleConfig.external_notification.output_vibra) {\n            LOG_INFO(\"Use Pin %i for vibra motor\", moduleConfig.external_notification.output_vibra);\n            pinMode(moduleConfig.external_notification.output_vibra, OUTPUT);\n            setExternalState(1, false);\n            externalTurnedOn[1] = 0;\n        }\n        if (moduleConfig.external_notification.output_buzzer && canBuzz()) {\n            if (!moduleConfig.external_notification.use_pwm) {\n                LOG_INFO(\"Use Pin %i for buzzer\", moduleConfig.external_notification.output_buzzer);\n                pinMode(moduleConfig.external_notification.output_buzzer, OUTPUT);\n                setExternalState(2, false);\n                externalTurnedOn[2] = 0;\n            } else {\n                config.device.buzzer_gpio = config.device.buzzer_gpio ? config.device.buzzer_gpio : PIN_BUZZER;\n                // in PWM Mode we force the buzzer pin if it is set\n                LOG_INFO(\"Use Pin %i in PWM mode\", config.device.buzzer_gpio);\n            }\n        }\n    } else {\n        LOG_INFO(\"External Notification Module Disabled\");\n        disable();\n    }\n}\n\nProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    // Trigger external notification if enabled and not muted; isSilenced is from temporary mute toggles\n    if (moduleConfig.external_notification.enabled && !isSilenced) {\n#ifdef T_WATCH_S3\n        drv.setWaveform(0, 75);\n        drv.setWaveform(1, 56);\n        drv.setWaveform(2, 0);\n        drv.go();\n#endif\n        if (!isFromUs(&mp)) {\n            // Check if the message contains a bell character. Don't do this loop for every pin, just once.\n            auto &p = mp.decoded;\n            bool containsBell = false;\n            for (size_t i = 0; i < p.payload.size; i++) {\n                if (p.payload.bytes[i] == ASCII_BELL) {\n                    containsBell = true;\n                    break;\n                }\n            }\n\n            const meshtastic_NodeInfoLite *sender = nodeDB->getMeshNode(mp.from);\n            meshtastic_Channel ch = channels.getByIndex(mp.channel ? mp.channel : channels.getPrimaryIndex());\n\n            // If we receive a broadcast message, apply channel mute setting\n            // If we receive a direct message and the receipent is us, apply DM mute setting\n            // Else we just handle it as not muted.\n            const bool isDmToUs = !isBroadcast(mp.to) && isToUs(&mp);\n            bool is_muted = isDmToUs ? (sender && ((sender->bitfield & NODEINFO_BITFIELD_IS_MUTED_MASK) != 0))\n                                     : (ch.settings.has_module_settings && ch.settings.module_settings.is_muted);\n\n            const bool buzzerModeIsDirectOnly =\n                (config.device.buzzer_mode == meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY);\n\n            if (containsBell || !is_muted) {\n                if (moduleConfig.external_notification.alert_bell || moduleConfig.external_notification.alert_message ||\n                    moduleConfig.external_notification.alert_bell_vibra ||\n                    moduleConfig.external_notification.alert_message_vibra ||\n                    ((moduleConfig.external_notification.alert_bell_buzzer ||\n                      moduleConfig.external_notification.alert_message_buzzer) &&\n                     canBuzz())) {\n                    nagCycleCutoff = millis() + (moduleConfig.external_notification.nag_timeout\n                                                     ? (moduleConfig.external_notification.nag_timeout * 1000)\n                                                     : moduleConfig.external_notification.output_ms);\n                    LOG_INFO(\"Toggling nagCycleCutoff to %lu\", nagCycleCutoff);\n                    isNagging = true;\n                }\n\n                if (moduleConfig.external_notification.alert_bell || moduleConfig.external_notification.alert_message) {\n                    LOG_INFO(\"externalNotificationModule - Notification Module or Bell\");\n                    setExternalState(0, true);\n                }\n\n                if (moduleConfig.external_notification.alert_bell_vibra ||\n                    moduleConfig.external_notification.alert_message_vibra) {\n                    LOG_INFO(\"externalNotificationModule - Notification Module or Bell (Vibra)\");\n                    setExternalState(1, true);\n                }\n\n                if ((moduleConfig.external_notification.alert_bell_buzzer ||\n                     moduleConfig.external_notification.alert_message_buzzer) &&\n                    canBuzz()) {\n                    LOG_INFO(\"externalNotificationModule - Notification Module or Bell (Buzzer)\");\n                    if (buzzerModeIsDirectOnly && !isDmToUs && !containsBell) {\n                        LOG_INFO(\"Message buzzer was suppressed because buzzer mode DIRECT_MSG_ONLY\");\n                    } else {\n                        // Buzz if buzzer mode is not in DIRECT_MSG_ONLY or is DM to us\n#ifdef T_LORA_PAGER\n                        drv.setWaveform(0, 16); // Long buzzer 100%\n                        drv.setWaveform(1, 0);  // Pause\n                        drv.setWaveform(2, 16);\n                        drv.setWaveform(3, 0);\n                        drv.setWaveform(4, 16);\n                        drv.setWaveform(5, 0);\n                        drv.setWaveform(6, 16);\n                        drv.setWaveform(7, 0);\n                        drv.go();\n#endif\n#ifdef HAS_I2S\n                        if (moduleConfig.external_notification.use_i2s_as_buzzer) {\n                            audioThread->beginRttl(rtttlConfig.ringtone, strlen_P(rtttlConfig.ringtone));\n                        } else\n#endif\n                            if (moduleConfig.external_notification.use_pwm) {\n                            rtttl::begin(config.device.buzzer_gpio, rtttlConfig.ringtone);\n                        } else {\n                            setExternalState(2, true);\n                        }\n                    }\n                }\n            }\n\n            setIntervalFromNow(0); // run once so we know if we should do something\n        }\n    } else {\n        LOG_INFO(\"External Notification Module Disabled or muted\");\n    }\n\n    return ProcessMessage::CONTINUE; // Let others look at this message also if they want\n}\n\n/**\n * @brief An admin message arrived to AdminModule. We are asked whether we want to handle that.\n *\n * @param mp The mesh packet arrived.\n * @param request The AdminMessage request extracted from the packet.\n * @param response The prepared response\n * @return AdminMessageHandleResult HANDLED if message was handled\n *   HANDLED_WITH_RESULT if a result is also prepared.\n */\nAdminMessageHandleResult ExternalNotificationModule::handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                                 meshtastic_AdminMessage *request,\n                                                                                 meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result;\n\n    switch (request->which_payload_variant) {\n    case meshtastic_AdminMessage_get_ringtone_request_tag:\n        LOG_INFO(\"Client getting ringtone\");\n        this->handleGetRingtone(mp, response);\n        result = AdminMessageHandleResult::HANDLED_WITH_RESPONSE;\n        break;\n\n    case meshtastic_AdminMessage_set_ringtone_message_tag:\n        LOG_INFO(\"Client setting ringtone\");\n        this->handleSetRingtone(request->set_canned_message_module_messages);\n        result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    default:\n        result = AdminMessageHandleResult::NOT_HANDLED;\n    }\n\n    return result;\n}\n\nvoid ExternalNotificationModule::handleGetRingtone(const meshtastic_MeshPacket &req, meshtastic_AdminMessage *response)\n{\n    LOG_INFO(\"*** handleGetRingtone\");\n    if (req.decoded.want_response) {\n        response->which_payload_variant = meshtastic_AdminMessage_get_ringtone_response_tag;\n        strncpy(response->get_ringtone_response, rtttlConfig.ringtone, sizeof(response->get_ringtone_response));\n    } // Don't send anything if not instructed to. Better than asserting.\n}\n\nvoid ExternalNotificationModule::handleSetRingtone(const char *from_msg)\n{\n    int changed = 0;\n\n    if (*from_msg) {\n        changed |= strcmp(rtttlConfig.ringtone, from_msg);\n        strncpy(rtttlConfig.ringtone, from_msg, sizeof(rtttlConfig.ringtone));\n        LOG_INFO(\"*** from_msg.text:%s\", from_msg);\n    }\n\n    if (changed) {\n        nodeDB->saveProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, &meshtastic_RTTTLConfig_msg, &rtttlConfig);\n    }\n}\n\nint ExternalNotificationModule::handleInputEvent(const InputEvent *event)\n{\n    if (nagCycleCutoff != UINT32_MAX) {\n        stopNow();\n        return 1;\n    }\n    return 0;\n}"
  },
  {
    "path": "src/modules/ExternalNotificationModule.h",
    "content": "#pragma once\n\n#include \"SinglePortModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include \"input/InputBroker.h\"\n\n#ifdef HAS_RGB_LED\n#include \"AmbientLightingThread.h\"\nextern AmbientLightingThread *ambientLightingThread;\n#endif\n\n#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !defined(CONFIG_IDF_TARGET_ESP32C6)\n#include <NonBlockingRtttl.h>\n#else\n// Noop class for portduino.\nclass rtttl\n{\n  public:\n    explicit rtttl() {}\n    static bool isPlaying() { return false; }\n    static void play() {}\n    static void begin(byte a, const char *b){};\n    static void stop() {}\n    static bool done() { return true; }\n};\n#endif\n#include <Arduino.h>\n#include <functional>\n\n/*\n * Radio interface for ExternalNotificationModule\n *\n */\nclass ExternalNotificationModule : public SinglePortModule, private concurrency::OSThread\n{\n    CallbackObserver<ExternalNotificationModule, const InputEvent *> inputObserver =\n        CallbackObserver<ExternalNotificationModule, const InputEvent *>(this, &ExternalNotificationModule::handleInputEvent);\n    uint32_t output = 0;\n\n  public:\n    ExternalNotificationModule();\n\n    int handleInputEvent(const InputEvent *arg);\n\n    uint32_t nagCycleCutoff = 1;\n\n    void setExternalState(uint8_t index = 0, bool on = false);\n    bool getExternal(uint8_t index = 0);\n\n    void setMute(bool mute) { isSilenced = mute; }\n    bool getMute() { return isSilenced; }\n\n    bool canBuzz();\n    bool nagging();\n\n    void stopNow();\n\n    void handleGetRingtone(const meshtastic_MeshPacket &req, meshtastic_AdminMessage *response);\n    void handleSetRingtone(const char *from_msg);\n\n  protected:\n    /** Called to handle a particular incoming message\n    @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for\n    it\n    */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n    virtual int32_t runOnce() override;\n\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override;\n\n    bool isNagging = false;\n\n    bool isSilenced = false;\n\n    virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                 meshtastic_AdminMessage *request,\n                                                                 meshtastic_AdminMessage *response) override;\n};\n\nextern ExternalNotificationModule *externalNotificationModule;"
  },
  {
    "path": "src/modules/GenericThreadModule.cpp",
    "content": "#include \"GenericThreadModule.h\"\n#include \"MeshService.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n\n/*\nGeneric Thread Module allows for the execution of custom code at a set interval.\n*/\nGenericThreadModule *genericThreadModule;\n\nGenericThreadModule::GenericThreadModule() : concurrency::OSThread(\"GenericThreadModule\") {}\n\nint32_t GenericThreadModule::runOnce()\n{\n\n    bool enabled = true;\n    if (!enabled)\n        return disable();\n\n    if (firstTime) {\n        // do something the first time we run\n        firstTime = 0;\n        LOG_INFO(\"first time GenericThread running\");\n    }\n\n    LOG_INFO(\"GenericThread executing\");\n    return (my_interval);\n}\n"
  },
  {
    "path": "src/modules/GenericThreadModule.h",
    "content": "#pragma once\n\n#include \"MeshModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <functional>\n\nclass GenericThreadModule : private concurrency::OSThread\n{\n    bool firstTime = 1;\n\n  public:\n    GenericThreadModule();\n\n  protected:\n    unsigned int my_interval = 10000; // interval in millisconds\n    virtual int32_t runOnce() override;\n};\n\nextern GenericThreadModule *genericThreadModule;\n"
  },
  {
    "path": "src/modules/KeyVerificationModule.cpp",
    "content": "#if !MESHTASTIC_EXCLUDE_PKI\n#include \"KeyVerificationModule.h\"\n#include \"MeshService.h\"\n#include \"RTC.h\"\n#include \"graphics/draw/MenuHandler.h\"\n#include \"main.h\"\n#include \"meshUtils.h\"\n#include \"modules/AdminModule.h\"\n#include <SHA256.h>\n\nKeyVerificationModule *keyVerificationModule;\n\nKeyVerificationModule::KeyVerificationModule()\n    : ProtobufModule(\"KeyVerification\", meshtastic_PortNum_KEY_VERIFICATION_APP, &meshtastic_KeyVerification_msg)\n{\n    ourPortNum = meshtastic_PortNum_KEY_VERIFICATION_APP;\n}\n\nAdminMessageHandleResult KeyVerificationModule::handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                            meshtastic_AdminMessage *request,\n                                                                            meshtastic_AdminMessage *response)\n{\n    updateState();\n    if (request->which_payload_variant == meshtastic_AdminMessage_key_verification_tag && mp.from == 0) {\n        LOG_WARN(\"Handling Key Verification Admin Message type %u\", request->key_verification.message_type);\n\n        if (request->key_verification.message_type == meshtastic_KeyVerificationAdmin_MessageType_INITIATE_VERIFICATION &&\n            currentState == KEY_VERIFICATION_IDLE) {\n            sendInitialRequest(request->key_verification.remote_nodenum);\n\n        } else if (request->key_verification.message_type ==\n                       meshtastic_KeyVerificationAdmin_MessageType_PROVIDE_SECURITY_NUMBER &&\n                   request->key_verification.has_security_number && currentState == KEY_VERIFICATION_SENDER_AWAITING_NUMBER &&\n                   request->key_verification.nonce == currentNonce) {\n            processSecurityNumber(request->key_verification.security_number);\n\n        } else if (request->key_verification.message_type == meshtastic_KeyVerificationAdmin_MessageType_DO_VERIFY &&\n                   request->key_verification.nonce == currentNonce) {\n            auto remoteNodePtr = nodeDB->getMeshNode(currentRemoteNode);\n            remoteNodePtr->bitfield |= NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK;\n            resetToIdle();\n        } else if (request->key_verification.message_type == meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY) {\n            resetToIdle();\n        }\n        return AdminMessageHandleResult::HANDLED;\n    }\n    return AdminMessageHandleResult::NOT_HANDLED;\n}\n\nbool KeyVerificationModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_KeyVerification *r)\n{\n    updateState();\n    if (mp.pki_encrypted == false) {\n        return false;\n    }\n    if (mp.from != currentRemoteNode) { // because the inital connection request is handled in allocReply()\n        return false;\n    }\n    if (currentState == KEY_VERIFICATION_IDLE) {\n        return false; // if we're idle, the only acceptable message is an init, which should be handled by allocReply()\n    }\n\n    if (currentState == KEY_VERIFICATION_SENDER_HAS_INITIATED && r->nonce == currentNonce && r->hash2.size == 32 &&\n        r->hash1.size == 0) {\n        memcpy(hash2, r->hash2.bytes, 32);\n        IF_SCREEN(screen->showNumberPicker(\"Enter Security Number\", 60000, 6, [](int number_picked) -> void {\n            keyVerificationModule->processSecurityNumber(number_picked);\n        });)\n\n        meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n        cn->level = meshtastic_LogRecord_Level_WARNING;\n        sprintf(cn->message, \"Enter Security Number for Key Verification\");\n        cn->which_payload_variant = meshtastic_ClientNotification_key_verification_number_request_tag;\n        cn->payload_variant.key_verification_number_request.nonce = currentNonce;\n        strncpy(cn->payload_variant.key_verification_number_request.remote_longname, // should really check for nulls, etc\n                nodeDB->getMeshNode(currentRemoteNode)->user.long_name,\n                sizeof(cn->payload_variant.key_verification_number_request.remote_longname));\n        service->sendClientNotification(cn);\n        LOG_INFO(\"Received hash2\");\n        currentState = KEY_VERIFICATION_SENDER_AWAITING_NUMBER;\n        return true;\n\n    } else if (currentState == KEY_VERIFICATION_RECEIVER_AWAITING_HASH1 && r->hash1.size == 32 && r->nonce == currentNonce) {\n        if (memcmp(hash1, r->hash1.bytes, 32) == 0) {\n            memset(message, 0, sizeof(message));\n            sprintf(message, \"Verification: \\n\");\n            generateVerificationCode(message + 15);\n            LOG_INFO(\"Hash1 matches!\");\n            static const char *optionsArray[] = {\"Reject\", \"Accept\"};\n            // Don't try to put the array definition in the macro. Does not work with curly braces.\n            IF_SCREEN(graphics::BannerOverlayOptions options; options.message = message; options.durationMs = 30000;\n                      options.optionsArrayPtr = optionsArray; options.optionsCount = 2;\n                      options.notificationType = graphics::notificationTypeEnum::selection_picker;\n                      options.bannerCallback =\n                          [=](int selected) {\n                              if (selected == 1) {\n                                  auto remoteNodePtr = nodeDB->getMeshNode(currentRemoteNode);\n                                  remoteNodePtr->bitfield |= NODEINFO_BITFIELD_IS_KEY_MANUALLY_VERIFIED_MASK;\n                              }\n                          };\n                      screen->showOverlayBanner(options);)\n            meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n            cn->level = meshtastic_LogRecord_Level_WARNING;\n            sprintf(cn->message, \"Final confirmation for incoming manual key verification %s\", message);\n            cn->which_payload_variant = meshtastic_ClientNotification_key_verification_final_tag;\n            cn->payload_variant.key_verification_final.nonce = currentNonce;\n            strncpy(cn->payload_variant.key_verification_final.remote_longname, // should really check for nulls, etc\n                    nodeDB->getMeshNode(currentRemoteNode)->user.long_name,\n                    sizeof(cn->payload_variant.key_verification_final.remote_longname));\n            cn->payload_variant.key_verification_final.isSender = false;\n            service->sendClientNotification(cn);\n\n            currentState = KEY_VERIFICATION_RECEIVER_AWAITING_USER;\n            return true;\n        }\n    }\n    return false;\n}\n\nbool KeyVerificationModule::sendInitialRequest(NodeNum remoteNode)\n{\n    LOG_DEBUG(\"keyVerification start\");\n    // generate nonce\n    updateState();\n    if (currentState != KEY_VERIFICATION_IDLE) {\n        IF_SCREEN(graphics::menuHandler::menuQueue = graphics::menuHandler::ThrottleMessage;)\n        return false;\n    }\n    currentNonce = random();\n    currentNonceTimestamp = getTime();\n    currentRemoteNode = remoteNode;\n    meshtastic_KeyVerification KeyVerification = meshtastic_KeyVerification_init_zero;\n    KeyVerification.nonce = currentNonce;\n    KeyVerification.hash2.size = 0;\n    KeyVerification.hash1.size = 0;\n    meshtastic_MeshPacket *p = allocDataProtobuf(KeyVerification);\n    p->to = remoteNode;\n    p->channel = 0;\n    p->pki_encrypted = true;\n    p->decoded.want_response = true;\n    p->priority = meshtastic_MeshPacket_Priority_HIGH;\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n    currentState = KEY_VERIFICATION_SENDER_HAS_INITIATED;\n    return true;\n}\n\nmeshtastic_MeshPacket *KeyVerificationModule::allocReply()\n{\n    SHA256 hash;\n    NodeNum ourNodeNum = nodeDB->getNodeNum();\n    updateState();\n    if (currentState != KEY_VERIFICATION_IDLE) { // TODO: cooldown period\n        LOG_WARN(\"Key Verification requested, but already in a request\");\n        return nullptr;\n    } else if (!currentRequest->pki_encrypted) {\n        LOG_WARN(\"Key Verification requested, but not in a PKI packet\");\n        return nullptr;\n    }\n    currentState = KEY_VERIFICATION_RECEIVER_AWAITING_HASH1;\n\n    auto req = *currentRequest;\n    const auto &p = req.decoded;\n    meshtastic_KeyVerification scratch;\n    meshtastic_KeyVerification response;\n    meshtastic_MeshPacket *responsePacket = nullptr;\n    pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_KeyVerification_msg, &scratch);\n\n    currentNonce = scratch.nonce;\n    response.nonce = scratch.nonce;\n    currentRemoteNode = req.from;\n    currentNonceTimestamp = getTime();\n    currentSecurityNumber = random(1, 999999);\n\n    // generate hash1\n    hash.reset();\n    hash.update(&currentSecurityNumber, sizeof(currentSecurityNumber));\n    hash.update(&currentNonce, sizeof(currentNonce));\n    hash.update(&currentRemoteNode, sizeof(currentRemoteNode));\n    hash.update(&ourNodeNum, sizeof(ourNodeNum));\n    hash.update(currentRequest->public_key.bytes, currentRequest->public_key.size);\n    hash.update(owner.public_key.bytes, owner.public_key.size);\n    hash.finalize(hash1, 32);\n\n    // generate hash2\n    hash.reset();\n    hash.update(&currentNonce, sizeof(currentNonce));\n    hash.update(hash1, 32);\n    hash.finalize(hash2, 32);\n    response.hash1.size = 0;\n    response.hash2.size = 32;\n    memcpy(response.hash2.bytes, hash2, 32);\n\n    responsePacket = allocDataProtobuf(response);\n\n    responsePacket->pki_encrypted = true;\n    IF_SCREEN(snprintf(message, 25, \"Security Number \\n%03u %03u\", currentSecurityNumber / 1000, currentSecurityNumber % 1000);\n              screen->showSimpleBanner(message, 30000); LOG_WARN(\"%s\", message);)\n    meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n    cn->level = meshtastic_LogRecord_Level_WARNING;\n    sprintf(cn->message, \"Incoming Key Verification.\\nSecurity Number\\n%03u %03u\", currentSecurityNumber / 1000,\n            currentSecurityNumber % 1000);\n    cn->which_payload_variant = meshtastic_ClientNotification_key_verification_number_inform_tag;\n    cn->payload_variant.key_verification_number_inform.nonce = currentNonce;\n    strncpy(cn->payload_variant.key_verification_number_inform.remote_longname, // should really check for nulls, etc\n            nodeDB->getMeshNode(currentRemoteNode)->user.long_name,\n            sizeof(cn->payload_variant.key_verification_number_inform.remote_longname));\n    cn->payload_variant.key_verification_number_inform.security_number = currentSecurityNumber;\n    service->sendClientNotification(cn);\n    LOG_WARN(\"Security Number %04u, nonce %llu\", currentSecurityNumber, currentNonce);\n    return responsePacket;\n}\n\nvoid KeyVerificationModule::processSecurityNumber(uint32_t incomingNumber)\n{\n    SHA256 hash;\n    NodeNum ourNodeNum = nodeDB->getNodeNum();\n    uint8_t scratch_hash[32] = {0};\n    LOG_WARN(\"received security number: %u\", incomingNumber);\n    meshtastic_NodeInfoLite *remoteNodePtr = nullptr;\n    remoteNodePtr = nodeDB->getMeshNode(currentRemoteNode);\n    if (remoteNodePtr == nullptr || !remoteNodePtr->has_user || remoteNodePtr->user.public_key.size != 32) {\n        currentState = KEY_VERIFICATION_IDLE;\n        return; // should we throw an error here?\n    }\n    LOG_WARN(\"hashing \");\n    // calculate hash1\n    hash.reset();\n    hash.update(&incomingNumber, sizeof(incomingNumber));\n    hash.update(&currentNonce, sizeof(currentNonce));\n    hash.update(&ourNodeNum, sizeof(ourNodeNum));\n    hash.update(&currentRemoteNode, sizeof(currentRemoteNode));\n    hash.update(owner.public_key.bytes, owner.public_key.size);\n\n    hash.update(remoteNodePtr->user.public_key.bytes, remoteNodePtr->user.public_key.size);\n    hash.finalize(hash1, 32);\n\n    hash.reset();\n    hash.update(&currentNonce, sizeof(currentNonce));\n    hash.update(hash1, 32);\n    hash.finalize(scratch_hash, 32);\n\n    if (memcmp(scratch_hash, hash2, 32) != 0) {\n        LOG_WARN(\"Hash2 did not match\");\n        return; // should probably throw an error of some sort\n    }\n    currentSecurityNumber = incomingNumber;\n\n    meshtastic_KeyVerification KeyVerification = meshtastic_KeyVerification_init_zero;\n    KeyVerification.nonce = currentNonce;\n    KeyVerification.hash2.size = 0;\n    KeyVerification.hash1.size = 32;\n    memcpy(KeyVerification.hash1.bytes, hash1, 32);\n    meshtastic_MeshPacket *p = allocDataProtobuf(KeyVerification);\n    p->to = currentRemoteNode;\n    p->channel = 0;\n    p->pki_encrypted = true;\n    p->decoded.want_response = true;\n    p->priority = meshtastic_MeshPacket_Priority_HIGH;\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n    currentState = KEY_VERIFICATION_SENDER_AWAITING_USER;\n    IF_SCREEN(screen->requestMenu(graphics::menuHandler::KeyVerificationFinalPrompt);)\n    meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n    cn->level = meshtastic_LogRecord_Level_WARNING;\n    sprintf(cn->message, \"Final confirmation for outgoing manual key verification %s\", message);\n    cn->which_payload_variant = meshtastic_ClientNotification_key_verification_final_tag;\n    cn->payload_variant.key_verification_final.nonce = currentNonce;\n    strncpy(cn->payload_variant.key_verification_final.remote_longname, // should really check for nulls, etc\n            nodeDB->getMeshNode(currentRemoteNode)->user.long_name,\n            sizeof(cn->payload_variant.key_verification_final.remote_longname));\n    cn->payload_variant.key_verification_final.isSender = true;\n    service->sendClientNotification(cn);\n    LOG_INFO(message);\n\n    return;\n}\n\nvoid KeyVerificationModule::updateState()\n{\n    if (currentState != KEY_VERIFICATION_IDLE) {\n        // check for the 60 second timeout\n        if (currentNonceTimestamp < getTime() - 60) {\n            resetToIdle();\n        } else {\n            currentNonceTimestamp = getTime();\n        }\n    }\n}\n\nvoid KeyVerificationModule::resetToIdle()\n{\n    memset(hash1, 0, 32);\n    memset(hash2, 0, 32);\n    currentNonce = 0;\n    currentNonceTimestamp = 0;\n    currentSecurityNumber = 0;\n    currentRemoteNode = 0;\n    currentState = KEY_VERIFICATION_IDLE;\n}\n\nvoid KeyVerificationModule::generateVerificationCode(char *readableCode)\n{\n    for (int i = 0; i < 4; i++) {\n        // drop the two highest significance bits, then encode as a base64\n        readableCode[i] = (hash1[i] >> 2) + 48; // not a standardized base64, but workable and avoids having a dictionary.\n    }\n    readableCode[4] = ' ';\n    for (int i = 5; i < 9; i++) {\n        // drop the two highest significance bits, then encode as a base64\n        readableCode[i] = (hash1[i] >> 2) + 48; // not a standardized base64, but workable and avoids having a dictionary.\n    }\n}\n#endif"
  },
  {
    "path": "src/modules/KeyVerificationModule.h",
    "content": "#pragma once\n\n#include \"ProtobufModule.h\"\n#include \"SinglePortModule.h\"\n\nenum KeyVerificationState {\n    KEY_VERIFICATION_IDLE,\n    KEY_VERIFICATION_SENDER_HAS_INITIATED,\n    KEY_VERIFICATION_SENDER_AWAITING_NUMBER,\n    KEY_VERIFICATION_SENDER_AWAITING_USER,\n    KEY_VERIFICATION_RECEIVER_AWAITING_USER,\n    KEY_VERIFICATION_RECEIVER_AWAITING_HASH1,\n};\n\nclass KeyVerificationModule : public ProtobufModule<meshtastic_KeyVerification> //, private concurrency::OSThread //\n{\n    // CallbackObserver<KeyVerificationModule, const meshtastic::Status *> nodeStatusObserver =\n    //     CallbackObserver<KeyVerificationModule, const meshtastic::Status *>(this, &KeyVerificationModule::handleStatusUpdate);\n\n  public:\n    KeyVerificationModule();\n    /*    : concurrency::OSThread(\"KeyVerification\"),\n          ProtobufModule(\"KeyVerification\", meshtastic_PortNum_KEY_VERIFICATION_APP, &meshtastic_KeyVerification_msg)\n    {\n        nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n        setIntervalFromNow(setStartDelay()); // Wait until NodeInfo is sent\n    }*/\n    virtual bool wantUIFrame() { return false; };\n    bool sendInitialRequest(NodeNum remoteNode);\n    void generateVerificationCode(char *); // fills char with the user readable verification code\n    uint32_t getCurrentRemoteNode() { return currentRemoteNode; }\n\n  protected:\n    /* Called to handle a particular incoming message\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_KeyVerification *p);\n    // virtual meshtastic_MeshPacket *allocReply() override;\n\n    // rather than add to the craziness that is the admin module, just handle those requests here.\n    virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                 meshtastic_AdminMessage *request,\n                                                                 meshtastic_AdminMessage *response) override;\n    /*\n     * Send our Telemetry into the mesh\n     */\n    bool sendMetrics();\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n  private:\n    uint64_t currentNonce = 0;\n    uint32_t currentNonceTimestamp = 0;\n    NodeNum currentRemoteNode = 0;\n    uint32_t currentSecurityNumber = 0;\n    KeyVerificationState currentState = KEY_VERIFICATION_IDLE;\n    uint8_t hash1[32] = {0}; //\n    uint8_t hash2[32] = {0}; //\n    char message[40] = {0};\n\n    void processSecurityNumber(uint32_t);\n    void updateState(); // check the timeouts and maybe reset the state to idle\n    void resetToIdle(); // Zero out module state\n};\n\nextern KeyVerificationModule *keyVerificationModule;"
  },
  {
    "path": "src/modules/ModuleDev.h",
    "content": "#pragma once\n\n/*\n * To developers:\n *   Use this to enable / disable features in your module that you don't want to risk checking into GitHub.\n *\n */\n\n// Enable development more for StoreForwardModule\nbool StoreForward_Dev = false;"
  },
  {
    "path": "src/modules/Modules.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\n#include \"buzz/BuzzerFeedbackThread.h\"\n#include \"modules/SystemCommandsModule.h\"\n#endif\n#include \"modules/StatusLEDModule.h\"\n#if !MESHTASTIC_EXCLUDE_REPLYBOT\n#include \"ReplyBotModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_PKI\n#include \"KeyVerificationModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_ADMIN\n#include \"modules/AdminModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_ATAK\n#include \"modules/AtakPluginModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_CANNEDMESSAGES\n#include \"modules/CannedMessageModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_DETECTIONSENSOR\n#include \"modules/DetectionSensorModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_NEIGHBORINFO\n#include \"modules/NeighborInfoModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_NODEINFO\n#include \"modules/NodeInfoModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"modules/PositionModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_REMOTEHARDWARE\n#include \"modules/RemoteHardwareModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_POWERSTRESS\n#include \"modules/PowerStressModule.h\"\n#endif\n#include \"modules/RoutingModule.h\"\n#if HAS_TRAFFIC_MANAGEMENT && !MESHTASTIC_EXCLUDE_TRAFFIC_MANAGEMENT\n#include \"modules/TrafficManagementModule.h\"\n#endif\n#include \"modules/TextMessageModule.h\"\n#if !MESHTASTIC_EXCLUDE_TRACEROUTE\n#include \"modules/TraceRouteModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_WAYPOINT\n#include \"modules/WaypointModule.h\"\n#endif\n#if ARCH_PORTDUINO\n#include \"modules/Telemetry/HostMetrics.h\"\n#if !MESHTASTIC_EXCLUDE_STOREFORWARD\n#include \"modules/StoreForwardModule.h\"\n#endif\n#endif\n#if HAS_TELEMETRY\n#include \"modules/Telemetry/DeviceTelemetry.h\"\n#endif\n#if HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n#include \"main.h\"\n#include \"modules/Telemetry/EnvironmentTelemetry.h\"\n#include \"modules/Telemetry/HealthTelemetry.h\"\n#include \"modules/Telemetry/Sensor/TelemetrySensor.h\"\n#endif\n#if HAS_SENSOR && !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n#include \"main.h\"\n#include \"modules/Telemetry/AirQualityTelemetry.h\"\n#include \"modules/Telemetry/Sensor/TelemetrySensor.h\"\n#endif\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_POWER_TELEMETRY\n#include \"modules/Telemetry/PowerTelemetry.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE\n#include \"modules/GenericThreadModule.h\"\n#endif\n\n#ifdef ARCH_ESP32\n#if defined(USE_SX1280) && !MESHTASTIC_EXCLUDE_AUDIO\n#include \"modules/esp32/AudioModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_PAXCOUNTER\n#include \"modules/esp32/PaxcounterModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_STOREFORWARD\n#include \"modules/StoreForwardModule.h\"\n#endif\n#endif\n\n#if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION\n#include \"modules/ExternalNotificationModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS\n#include \"modules/RangeTestModule.h\"\n#endif\n#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_SERIAL\n#include \"modules/SerialModule.h\"\n#endif\n\n#if !MESHTASTIC_EXCLUDE_DROPZONE\n#include \"modules/DropzoneModule.h\"\n#endif\n#if !MESHTASTIC_EXCLUDE_STATUS\n#include \"modules/StatusMessageModule.h\"\n#endif\n\n#if defined(HAS_HARDWARE_WATCHDOG)\n#include \"watchdog/watchdogThread.h\"\n#endif\n/**\n * Create module instances here.  If you are adding a new module, you must 'new' it here (or somewhere else)\n */\nvoid setupModules()\n{\n#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        inputBroker = new InputBroker();\n        systemCommandsModule = new SystemCommandsModule();\n        buzzerFeedbackThread = new BuzzerFeedbackThread();\n    }\n#endif\n    statusLEDModule = new StatusLEDModule();\n#if !MESHTASTIC_EXCLUDE_REPLYBOT\n    new ReplyBotModule();\n#endif\n\n#if HAS_TRAFFIC_MANAGEMENT && !MESHTASTIC_EXCLUDE_TRAFFIC_MANAGEMENT\n    // Instantiate only when enabled to avoid extra memory use and background work.\n    if (moduleConfig.has_traffic_management && moduleConfig.traffic_management.enabled) {\n        trafficManagementModule = new TrafficManagementModule();\n    }\n#endif\n\n#if !MESHTASTIC_EXCLUDE_ADMIN\n    adminModule = new AdminModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_NODEINFO\n    nodeInfoModule = new NodeInfoModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_GPS\n    positionModule = new PositionModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_WAYPOINT\n    waypointModule = new WaypointModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_TEXTMESSAGE\n    textMessageModule = new TextMessageModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_TRACEROUTE\n    traceRouteModule = new TraceRouteModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_NEIGHBORINFO\n    if (moduleConfig.has_neighbor_info && moduleConfig.neighbor_info.enabled) {\n        neighborInfoModule = new NeighborInfoModule();\n    }\n#endif\n#if !MESHTASTIC_EXCLUDE_DETECTIONSENSOR\n    if (moduleConfig.has_detection_sensor && moduleConfig.detection_sensor.enabled) {\n        detectionSensorModule = new DetectionSensorModule();\n    }\n#endif\n#if !MESHTASTIC_EXCLUDE_ATAK\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_TAK ||\n        config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) {\n        atakPluginModule = new AtakPluginModule();\n    }\n#endif\n#if !MESHTASTIC_EXCLUDE_PKI\n    keyVerificationModule = new KeyVerificationModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_DROPZONE\n    dropzoneModule = new DropzoneModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_STATUS\n    statusMessageModule = new StatusMessageModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_GENERIC_THREAD_MODULE\n    new GenericThreadModule();\n#endif\n    // Note: if the rest of meshtastic doesn't need to explicitly use your module, you do not need to assign the instance\n    // to a global variable.\n\n#if !MESHTASTIC_EXCLUDE_REMOTEHARDWARE\n    new RemoteHardwareModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_POWERSTRESS\n    new PowerStressModule();\n#endif\n    // Example: Put your module here\n    // new ReplyModule();\n#if HAS_SCREEN && !MESHTASTIC_EXCLUDE_CANNEDMESSAGES\n    if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        cannedMessageModule = new CannedMessageModule();\n    }\n#endif\n#if ARCH_PORTDUINO\n    new HostMetricsModule();\n#endif\n#if HAS_TELEMETRY\n    new DeviceTelemetryModule();\n#endif\n#if HAS_TELEMETRY && HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n    if (moduleConfig.has_telemetry &&\n        (moduleConfig.telemetry.environment_measurement_enabled || moduleConfig.telemetry.environment_screen_enabled)) {\n        new EnvironmentTelemetryModule();\n    }\n#if HAS_TELEMETRY && HAS_SENSOR && !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n    if (moduleConfig.has_telemetry &&\n        (moduleConfig.telemetry.air_quality_enabled || moduleConfig.telemetry.air_quality_screen_enabled)) {\n        new AirQualityTelemetryModule();\n    }\n#endif\n#if !MESHTASTIC_EXCLUDE_HEALTH_TELEMETRY\n    if (nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MAX30102].first > 0 ||\n        nodeTelemetrySensorsMap[meshtastic_TelemetrySensorType_MLX90614].first > 0) {\n        new HealthTelemetryModule();\n    }\n#endif\n#endif\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_POWER_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n    if (moduleConfig.has_telemetry &&\n        (moduleConfig.telemetry.power_measurement_enabled || moduleConfig.telemetry.power_screen_enabled)) {\n        new PowerTelemetryModule();\n    }\n#endif\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) || defined(ARCH_STM32WL)) &&                             \\\n    !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)\n#if !MESHTASTIC_EXCLUDE_SERIAL\n    if (moduleConfig.has_serial && moduleConfig.serial.enabled &&\n        config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n        new SerialModule();\n    }\n#endif\n#endif\n#ifdef ARCH_ESP32\n    // Only run on an esp32 based device.\n#if defined(USE_SX1280) && !MESHTASTIC_EXCLUDE_AUDIO\n    audioModule = new AudioModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_PAXCOUNTER\n    if (moduleConfig.has_paxcounter && moduleConfig.paxcounter.enabled) {\n        paxcounterModule = new PaxcounterModule();\n    }\n#endif\n#endif\n#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)\n#if !MESHTASTIC_EXCLUDE_STOREFORWARD\n    if (moduleConfig.has_store_forward && moduleConfig.store_forward.enabled) {\n        storeForwardModule = new StoreForwardModule();\n    }\n#endif\n#endif\n#if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION\n    externalNotificationModule = new ExternalNotificationModule();\n#endif\n#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS\n    if (moduleConfig.has_range_test && moduleConfig.range_test.enabled)\n        new RangeTestModule();\n#endif\n#if defined(HAS_HARDWARE_WATCHDOG)\n    watchdogThread = new WatchdogThread();\n#endif\n    // NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra\n    // acks\n    routingModule = new RoutingModule();\n}\n"
  },
  {
    "path": "src/modules/Modules.h",
    "content": "#pragma once\n\n/**\n * Create module instances here.  If you are adding a new module, you must 'new' it here (or somewhere else)\n */\nvoid setupModules();"
  },
  {
    "path": "src/modules/NeighborInfoModule.cpp",
    "content": "#include \"NeighborInfoModule.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include <Throttle.h>\n\nNeighborInfoModule *neighborInfoModule;\n\n/*\nPrints a single neighbor info packet and associated neighbors\nUses LOG_DEBUG, which equates to Console.log\nNOTE: For debugging only\n*/\nvoid NeighborInfoModule::printNeighborInfo(const char *header, const meshtastic_NeighborInfo *np)\n{\n    LOG_DEBUG(\"%s NEIGHBORINFO PACKET from Node 0x%x to Node 0x%x (last sent by 0x%x)\", header, np->node_id, nodeDB->getNodeNum(),\n              np->last_sent_by_id);\n    LOG_DEBUG(\"Packet contains %d neighbors\", np->neighbors_count);\n    for (int i = 0; i < np->neighbors_count; i++) {\n        LOG_DEBUG(\"Neighbor %d: node_id=0x%x, snr=%.2f\", i, np->neighbors[i].node_id, np->neighbors[i].snr);\n    }\n}\n\n/*\nPrints the nodeDB neighbors\nNOTE: for debugging only\n*/\nvoid NeighborInfoModule::printNodeDBNeighbors()\n{\n    LOG_DEBUG(\"Our NodeDB contains %d neighbors\", neighbors.size());\n    for (size_t i = 0; i < neighbors.size(); i++) {\n        LOG_DEBUG(\"Node %d: node_id=0x%x, snr=%.2f\", i, neighbors[i].node_id, neighbors[i].snr);\n    }\n}\n\n/* Send our initial owner announcement 35 seconds after we start (to give\n * network time to setup) */\nNeighborInfoModule::NeighborInfoModule()\n    : ProtobufModule(\"neighborinfo\", meshtastic_PortNum_NEIGHBORINFO_APP, &meshtastic_NeighborInfo_msg),\n      concurrency::OSThread(\"NeighborInfo\")\n{\n    ourPortNum = meshtastic_PortNum_NEIGHBORINFO_APP;\n    nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n\n    if (moduleConfig.neighbor_info.enabled) {\n        isPromiscuous = true; // Update neighbors from all packets\n        setIntervalFromNow(Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval,\n                                                             default_telemetry_broadcast_interval_secs));\n    } else {\n        LOG_DEBUG(\"NeighborInfoModule is disabled\");\n        disable();\n    }\n}\n\n/*\nCollect neighbor info from the nodeDB's history, capping at a maximum number of\nentries and max time Assumes that the neighborInfo packet has been allocated\n@returns the number of entries collected\n*/\nuint32_t NeighborInfoModule::collectNeighborInfo(meshtastic_NeighborInfo *neighborInfo)\n{\n    NodeNum my_node_id = nodeDB->getNodeNum();\n    neighborInfo->node_id = my_node_id;\n    neighborInfo->last_sent_by_id = my_node_id;\n    neighborInfo->node_broadcast_interval_secs =\n        Default::getConfiguredOrDefault(moduleConfig.neighbor_info.update_interval, default_telemetry_broadcast_interval_secs);\n\n    cleanUpNeighbors();\n\n    for (auto nbr : neighbors) {\n        if ((neighborInfo->neighbors_count < MAX_NUM_NEIGHBORS) && (nbr.node_id != my_node_id)) {\n            neighborInfo->neighbors[neighborInfo->neighbors_count].node_id = nbr.node_id;\n            neighborInfo->neighbors[neighborInfo->neighbors_count].snr = nbr.snr;\n            // Note: we don't set the last_rx_time and node_broadcast_intervals_secs\n            // here, because we don't want to send this over the mesh\n            neighborInfo->neighbors_count++;\n        }\n    }\n    printNodeDBNeighbors();\n    return neighborInfo->neighbors_count;\n}\n\n/*\n  Remove neighbors from the database that we haven't heard from in a while\n*/\nvoid NeighborInfoModule::cleanUpNeighbors()\n{\n    uint32_t now = getTime();\n    NodeNum my_node_id = nodeDB->getNodeNum();\n    for (auto it = neighbors.rbegin(); it != neighbors.rend();) {\n        // We will remove a neighbor if we haven't heard from them in twice the\n        // broadcast interval cannot use isWithinTimespanMs() as it->last_rx_time is\n        // seconds since 1970\n        if ((now - it->last_rx_time > it->node_broadcast_interval_secs * 2) && (it->node_id != my_node_id)) {\n            LOG_DEBUG(\"Remove neighbor with node ID 0x%x\", it->node_id);\n            it = std::vector<meshtastic_Neighbor>::reverse_iterator(\n                neighbors.erase(std::next(it).base())); // Erase the element and update the iterator\n        } else {\n            ++it;\n        }\n    }\n}\n\n/* Send neighbor info to the mesh */\nvoid NeighborInfoModule::sendNeighborInfo(NodeNum dest, bool wantReplies)\n{\n    meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero;\n    collectNeighborInfo(&neighborInfo);\n    // only send neighbours if we have some to send\n    if (neighborInfo.neighbors_count > 0) {\n        meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo);\n        p->to = dest;\n        p->decoded.want_response = wantReplies;\n        p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n        printNeighborInfo(\"SENDING\", &neighborInfo);\n        service->sendToMesh(p, RX_SRC_LOCAL, true);\n    }\n}\n\n/*\nEncompasses the full construction and sending packet to mesh\nWill be used for broadcast.\n*/\nint32_t NeighborInfoModule::runOnce()\n{\n    if (moduleConfig.neighbor_info.transmit_over_lora &&\n        (!channels.isDefaultChannel(channels.getPrimaryIndex()) || !RadioInterface::uses_default_frequency_slot) &&\n        airTime->isTxAllowedChannelUtil(true) && airTime->isTxAllowedAirUtil()) {\n        sendNeighborInfo(NODENUM_BROADCAST, false);\n    } else {\n        sendNeighborInfo(NODENUM_BROADCAST_NO_LORA, false);\n    }\n    return Default::getConfiguredOrDefaultMs(moduleConfig.neighbor_info.update_interval, default_neighbor_info_broadcast_secs);\n}\n\nmeshtastic_MeshPacket *NeighborInfoModule::allocReply()\n{\n    LOG_INFO(\"NeighborInfoRequested.\");\n    if (lastSentReply && Throttle::isWithinTimespanMs(lastSentReply, 3 * 60 * 1000)) {\n        LOG_DEBUG(\"Skip Neighbors reply since we sent a reply <3min ago\");\n        ignoreRequest = true; // Mark it as ignored for MeshModule\n        return nullptr;\n    }\n\n    meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero;\n    collectNeighborInfo(&neighborInfo);\n\n    meshtastic_MeshPacket *reply = allocDataProtobuf(neighborInfo);\n\n    if (reply) {\n        lastSentReply = millis(); // Track when we sent this reply\n    }\n    return reply;\n}\n\n/*\nCollect a received neighbor info packet from another node\nPass it to an upper client; do not persist this data on the mesh\n*/\nbool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *np)\n{\n    LOG_DEBUG(\"NeighborInfo: handleReceivedProtobuf\");\n    if (np) {\n        printNeighborInfo(\"RECEIVED\", np);\n        // Ignore dummy/interceptable packets: single neighbor with nodeId 0 and snr 0\n        if (np->neighbors_count != 1 || np->neighbors[0].node_id != 0 || np->neighbors[0].snr != 0.0f) {\n            LOG_DEBUG(\"  Updating neighbours\");\n            updateNeighbors(mp, np);\n        } else {\n            LOG_DEBUG(\"  Ignoring dummy neighbor info packet (single neighbor with nodeId 0, snr 0)\");\n        }\n    } else if (getHopsAway(mp) == 0) {\n        LOG_DEBUG(\"Get or create neighbor: %u with snr %f\", mp.from, mp.rx_snr);\n        // If the hopLimit is the same as hopStart, then it is a neighbor\n        getOrCreateNeighbor(mp.from, mp.from, 0,\n                            mp.rx_snr); // Set the broadcast interval to 0, as we don't know it\n    }\n    // Allow others to handle this packet\n    return false;\n}\n\n/*\nCopy the content of a current NeighborInfo packet into a new one and update the\nlast_sent_by_id to our NodeNum\n*/\nvoid NeighborInfoModule::alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_NeighborInfo *n)\n{\n    n->last_sent_by_id = nodeDB->getNodeNum();\n\n    // Set updated last_sent_by_id to the payload of the to be flooded packet\n    p.decoded.payload.size =\n        pb_encode_to_bytes(p.decoded.payload.bytes, sizeof(p.decoded.payload.bytes), &meshtastic_NeighborInfo_msg, n);\n}\n\nvoid NeighborInfoModule::resetNeighbors()\n{\n    neighbors.clear();\n}\n\nvoid NeighborInfoModule::updateNeighbors(const meshtastic_MeshPacket &mp, const meshtastic_NeighborInfo *np)\n{\n    LOG_DEBUG(\"updateNeighbors\");\n    // The last sent ID will be 0 if the packet is from the phone, which we don't\n    // count as an edge. So we assume that if it's zero, then this packet is from\n    // our node.\n    if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.from) {\n        getOrCreateNeighbor(mp.from, np->last_sent_by_id, np->node_broadcast_interval_secs, mp.rx_snr);\n    }\n}\n\nmeshtastic_Neighbor *NeighborInfoModule::getOrCreateNeighbor(NodeNum originalSender, NodeNum n,\n                                                             uint32_t node_broadcast_interval_secs, float snr)\n{\n    // our node and the phone are the same node (not neighbors)\n    if (n == 0) {\n        n = nodeDB->getNodeNum();\n    }\n    // look for one in the existing list\n    for (size_t i = 0; i < neighbors.size(); i++) {\n        if (neighbors[i].node_id == n) {\n            // if found, update it\n            neighbors[i].snr = snr;\n            neighbors[i].last_rx_time = getTime();\n            // Only if this is the original sender, the broadcast interval corresponds\n            // to it\n            if (originalSender == n && node_broadcast_interval_secs != 0)\n                neighbors[i].node_broadcast_interval_secs = node_broadcast_interval_secs;\n            return &neighbors[i];\n        }\n    }\n    // otherwise, allocate one and assign data to it\n\n    meshtastic_Neighbor new_nbr = meshtastic_Neighbor_init_zero;\n    new_nbr.node_id = n;\n    new_nbr.snr = snr;\n    new_nbr.last_rx_time = getTime();\n    // Only if this is the original sender, the broadcast interval corresponds to\n    // it\n    if (originalSender == n && node_broadcast_interval_secs != 0)\n        new_nbr.node_broadcast_interval_secs = node_broadcast_interval_secs;\n    else // Assume the same broadcast interval as us for the neighbor if we don't\n         // know it\n        new_nbr.node_broadcast_interval_secs = moduleConfig.neighbor_info.update_interval;\n\n    if (neighbors.size() < MAX_NUM_NEIGHBORS) {\n        neighbors.push_back(new_nbr);\n    } else {\n        // If we have too many neighbors, replace the oldest one\n        LOG_WARN(\"Neighbor DB is full, replace oldest neighbor\");\n        neighbors.erase(neighbors.begin());\n        neighbors.push_back(new_nbr);\n    }\n    return &neighbors.back();\n}\n"
  },
  {
    "path": "src/modules/NeighborInfoModule.h",
    "content": "#pragma once\n#include \"ProtobufModule.h\"\n#define MAX_NUM_NEIGHBORS 10 // also defined in NeighborInfo protobuf options\n\n/*\n * Neighborinfo module for sending info on each node's 0-hop neighbors to the mesh\n */\nclass NeighborInfoModule : public ProtobufModule<meshtastic_NeighborInfo>, private concurrency::OSThread\n{\n    CallbackObserver<NeighborInfoModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<NeighborInfoModule, const meshtastic::Status *>(this, &NeighborInfoModule::handleStatusUpdate);\n\n    std::vector<meshtastic_Neighbor> neighbors;\n\n  public:\n    /*\n     * Expose the constructor\n     */\n    NeighborInfoModule();\n\n    /* Reset neighbor info after clearing nodeDB*/\n    void resetNeighbors();\n\n  protected:\n    /*\n     * Called to handle a particular incoming message\n     * @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n     */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_NeighborInfo *nb) override;\n\n    /* Messages can be received that have the want_response bit set.  If set, this callback will be invoked\n     * so that subclasses can (optionally) send a response back to the original sender.  */\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n    /*\n     * Collect neighbor info from the nodeDB's history, capping at a maximum number of entries and max time\n     * @return the number of entries collected\n     */\n    uint32_t collectNeighborInfo(meshtastic_NeighborInfo *neighborInfo);\n\n    /*\n      Remove neighbors from the database that we haven't heard from in a while\n    */\n    void cleanUpNeighbors();\n\n    /* Allocate a new NeighborInfo packet */\n    meshtastic_NeighborInfo *allocateNeighborInfoPacket();\n\n    // Find a neighbor in our DB, create an empty neighbor if missing\n    meshtastic_Neighbor *getOrCreateNeighbor(NodeNum originalSender, NodeNum n, uint32_t node_broadcast_interval_secs, float snr);\n\n    /*\n     * Send info on our node's neighbors into the mesh\n     */\n    void sendNeighborInfo(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n    /* update neighbors with subpacket sniffed from network */\n    void updateNeighbors(const meshtastic_MeshPacket &mp, const meshtastic_NeighborInfo *np);\n\n    /* update a NeighborInfo packet with our NodeNum as last_sent_by_id */\n    void alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_NeighborInfo *n) override;\n\n    /* Does our periodic broadcast */\n    int32_t runOnce() override;\n\n    /* Override wantPacket to say we want to see all packets when enabled, not just those for our port number.\n      Exception is when the packet came via MQTT */\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return enabled && !p->via_mqtt; }\n\n    /* These are for debugging only */\n    void printNeighborInfo(const char *header, const meshtastic_NeighborInfo *np);\n    void printNodeDBNeighbors();\n\n  private:\n    uint32_t lastSentReply = 0; // Last time we sent a position reply (used for reply throttling only)\n};\nextern NeighborInfoModule *neighborInfoModule;"
  },
  {
    "path": "src/modules/NodeInfoModule.cpp",
    "content": "#include \"NodeInfoModule.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"NodeStatus.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"TransmitHistory.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include <Throttle.h>\n#include <algorithm>\n\n#ifndef USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS\n#define USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS (12 * 60 * 60)\n#endif\n\nNodeInfoModule *nodeInfoModule;\n\nstatic constexpr uint32_t NodeInfoReplySuppressSeconds = USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS;\n\nbool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_User *pptr)\n{\n    suppressReplyForCurrentRequest = false;\n\n    if (mp.from == nodeDB->getNodeNum()) {\n        LOG_WARN(\"Ignoring packet supposed to be from our own node: %08x\", mp.from);\n        return false;\n    }\n\n    auto p = *pptr;\n\n    // Suppress replies to senders we've replied to recently (12H window)\n    if (mp.decoded.want_response && !isFromUs(&mp)) {\n        const NodeNum sender = getFrom(&mp);\n        const uint32_t now = mp.rx_time ? mp.rx_time : getTime();\n        auto it = lastNodeInfoSeen.find(sender);\n        if (it != lastNodeInfoSeen.end()) {\n            uint32_t sinceLast = now >= it->second ? now - it->second : 0;\n            if (sinceLast < NodeInfoReplySuppressSeconds) {\n                suppressReplyForCurrentRequest = true;\n            }\n        }\n        lastNodeInfoSeen[sender] = now;\n        pruneLastNodeInfoCache();\n    }\n\n    if (p.is_licensed != owner.is_licensed) {\n        LOG_WARN(\"Invalid nodeInfo detected, is_licensed mismatch!\");\n        return true;\n    }\n\n    // Coerce user.id to be derived from the node number\n    snprintf(p.id, sizeof(p.id), \"!%08x\", getFrom(&mp));\n\n    bool hasChanged = nodeDB->updateUser(getFrom(&mp), p, mp.channel);\n\n    bool wasBroadcast = isBroadcast(mp.to);\n\n    // LOG_DEBUG(\"did encode\");\n    // if user has changed while packet was not for us, inform phone\n    if (hasChanged && !wasBroadcast && !isToUs(&mp)) {\n        auto packetCopy = packetPool.allocCopy(mp); // Keep a copy of the packet for later analysis\n\n        // Re-encode the user protobuf, as we have stripped out the user.id\n        packetCopy->decoded.payload.size = pb_encode_to_bytes(\n            packetCopy->decoded.payload.bytes, sizeof(packetCopy->decoded.payload.bytes), &meshtastic_User_msg, &p);\n\n        service->sendToPhone(packetCopy);\n    }\n\n    pruneLastNodeInfoCache();\n\n    // LOG_DEBUG(\"did handleReceived\");\n    return false; // Let others look at this message also if they want\n}\n\nvoid NodeInfoModule::alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_User *p)\n{\n    // Coerce user.id to be derived from the node number\n    snprintf(p->id, sizeof(p->id), \"!%08x\", getFrom(&mp));\n\n    // Re-encode the altered protobuf back into the packet\n    mp.decoded.payload.size =\n        pb_encode_to_bytes(mp.decoded.payload.bytes, sizeof(mp.decoded.payload.bytes), &meshtastic_User_msg, p);\n}\n\nvoid NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t channel, bool _shorterTimeout)\n{\n    // cancel any not yet sent (now stale) position packets\n    if (prevPacketId) // if we wrap around to zero, we'll simply fail to cancel in that rare case (no big deal)\n        service->cancelSending(prevPacketId);\n    shorterTimeout = _shorterTimeout;\n    DEBUG_HEAP_BEFORE;\n    meshtastic_MeshPacket *p = allocReply();\n    DEBUG_HEAP_AFTER(\"NodeInfoModule::sendOurNodeInfo\", p);\n\n    if (p) { // Check whether we didn't ignore it\n        p->to = dest;\n        bool requestWantResponse = (config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER &&\n                                    config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) &&\n                                   wantReplies;\n\n        p->decoded.want_response = requestWantResponse;\n        if (_shorterTimeout)\n            p->priority = meshtastic_MeshPacket_Priority_DEFAULT;\n        else\n            p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n        if (channel > 0) {\n            LOG_DEBUG(\"Send ourNodeInfo to channel %d\", channel);\n            p->channel = channel;\n        }\n\n        prevPacketId = p->id;\n\n        service->sendToMesh(p);\n        shorterTimeout = false;\n    }\n}\n\nmeshtastic_MeshPacket *NodeInfoModule::allocReply()\n{\n    // Only apply suppression when actually replying to someone else's request, not for periodic broadcasts.\n    const bool isReplyingToExternalRequest = currentRequest &&\n                                             currentRequest->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&\n                                             currentRequest->decoded.portnum == meshtastic_PortNum_NODEINFO_APP &&\n                                             currentRequest->decoded.want_response && !isFromUs(currentRequest);\n\n    if (suppressReplyForCurrentRequest && isReplyingToExternalRequest) {\n        LOG_DEBUG(\"Skip send NodeInfo since we heard the requester <12h ago\");\n        ignoreRequest = true;\n        suppressReplyForCurrentRequest = false;\n        return NULL;\n    }\n\n    if (!airTime->isTxAllowedChannelUtil(false)) {\n        ignoreRequest = true; // Mark it as ignored for MeshModule\n        LOG_DEBUG(\"Skip send NodeInfo > 40%% ch. util\");\n        return NULL;\n    }\n\n    // Use graduated scaling based on active mesh size (10 minute base, scales with congestion coefficient)\n    uint32_t timeoutMs = Default::getConfiguredOrDefaultMsScaled(0, 10 * 60, nodeStatus->getNumOnline());\n    uint32_t lastNodeInfo = transmitHistory ? transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP) : 0;\n    if (!shorterTimeout && lastNodeInfo && Throttle::isWithinTimespanMs(lastNodeInfo, timeoutMs)) {\n        LOG_DEBUG(\"Skip send NodeInfo since we sent it <%us ago\", timeoutMs / 1000);\n        ignoreRequest = true; // Mark it as ignored for MeshModule\n        return NULL;\n    } else if (shorterTimeout && lastNodeInfo && Throttle::isWithinTimespanMs(lastNodeInfo, 60 * 1000)) {\n        // For interactive/urgent requests (e.g., user-triggered or implicit requests), use a shorter 60s timeout\n        LOG_DEBUG(\"Skip send NodeInfo since we sent it <60s ago\");\n        ignoreRequest = true;\n        return NULL;\n    } else {\n        ignoreRequest = false; // Don't ignore requests anymore\n        meshtastic_User &u = owner;\n\n        // Strip the public key if the user is licensed\n        if (u.is_licensed && u.public_key.size > 0) {\n            memset(u.public_key.bytes, 0, sizeof(u.public_key.bytes));\n            u.public_key.size = 0;\n        }\n\n        // FIXME: Clear the user.id field since it should be derived from node number on the receiving end\n        // u.id[0] = '\\0';\n\n        // Ensure our user.id is derived correctly\n        strcpy(u.id, nodeDB->getNodeId().c_str());\n\n        LOG_INFO(\"Send owner %s/%s/%s\", u.id, u.long_name, u.short_name);\n        if (transmitHistory)\n            transmitHistory->setLastSentToMesh(meshtastic_PortNum_NODEINFO_APP);\n        return allocDataProtobuf(u);\n    }\n}\n\nvoid NodeInfoModule::pruneLastNodeInfoCache()\n{\n    if (!nodeDB || !nodeDB->meshNodes)\n        return;\n\n    const size_t maxEntries = nodeDB->meshNodes->size();\n\n    for (auto it = lastNodeInfoSeen.begin(); it != lastNodeInfoSeen.end();) {\n        if (!nodeDB->getMeshNode(it->first)) {\n            it = lastNodeInfoSeen.erase(it);\n        } else {\n            ++it;\n        }\n    }\n\n    while (!lastNodeInfoSeen.empty() && lastNodeInfoSeen.size() > maxEntries) {\n        auto oldestIt = std::min_element(lastNodeInfoSeen.begin(), lastNodeInfoSeen.end(),\n                                         [](const std::pair<const NodeNum, uint32_t> &lhs,\n                                            const std::pair<const NodeNum, uint32_t> &rhs) { return lhs.second < rhs.second; });\n        lastNodeInfoSeen.erase(oldestIt);\n    }\n}\n\nNodeInfoModule::NodeInfoModule()\n    : ProtobufModule(\"nodeinfo\", meshtastic_PortNum_NODEINFO_APP, &meshtastic_User_msg), concurrency::OSThread(\"NodeInfo\")\n{\n    isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others\n\n    setIntervalFromNow(setStartDelay()); // Send our initial owner announcement 30 seconds\n                                         // after we start (to give network time to setup)\n}\n\nint32_t NodeInfoModule::runOnce()\n{\n    // If we changed channels, ask everyone else for their latest info\n    bool requestReplies = currentGeneration != radioGeneration;\n    currentGeneration = radioGeneration;\n\n    if (airTime->isTxAllowedAirUtil() && config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN) {\n        LOG_INFO(\"Send our nodeinfo to mesh (wantReplies=%d)\", requestReplies);\n        sendOurNodeInfo(NODENUM_BROADCAST, requestReplies); // Send our info (don't request replies)\n    }\n    return Default::getConfiguredOrDefaultMs(config.device.node_info_broadcast_secs, default_node_info_broadcast_secs);\n}"
  },
  {
    "path": "src/modules/NodeInfoModule.h",
    "content": "#pragma once\n#include \"ProtobufModule.h\"\n#include <map>\n\n/**\n * NodeInfo module for sending/receiving NodeInfos into the mesh\n */\nclass NodeInfoModule : public ProtobufModule<meshtastic_User>, private concurrency::OSThread\n{\n    /// The id of the last packet we sent, to allow us to cancel it if we make something fresher\n    PacketId prevPacketId = 0;\n\n    uint32_t currentGeneration = 0;\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    NodeInfoModule();\n\n    /**\n     * Send our NodeInfo into the mesh\n     */\n    void sendOurNodeInfo(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false, uint8_t channel = 0,\n                         bool _shorterTimeout = false);\n\n  protected:\n    /** Called to handle a particular incoming message\n\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_User *p) override;\n\n    /** Called to alter received User protobuf */\n    virtual void alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_User *p) override;\n\n    /** Messages can be received that have the want_response bit set.  If set, this callback will be invoked\n     * so that subclasses can (optionally) send a response back to the original sender.  */\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n    /** Does our periodic broadcast */\n    virtual int32_t runOnce() override;\n\n  private:\n    bool shorterTimeout = false;\n    bool suppressReplyForCurrentRequest = false;\n    std::map<NodeNum, uint32_t> lastNodeInfoSeen;\n\n    void pruneLastNodeInfoCache();\n};\n\nextern NodeInfoModule *nodeInfoModule;\n"
  },
  {
    "path": "src/modules/OnScreenKeyboardModule.cpp",
    "content": "#include \"configuration.h\"\n#if HAS_SCREEN\n\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/draw/NotificationRenderer.h\"\n#include \"input/RotaryEncoderInterruptImpl1.h\"\n#include \"input/UpDownInterruptImpl1.h\"\n#include \"modules/OnScreenKeyboardModule.h\"\n#include <Arduino.h>\n#include <algorithm>\n\nnamespace graphics\n{\n\nOnScreenKeyboardModule &OnScreenKeyboardModule::instance()\n{\n    static OnScreenKeyboardModule inst;\n    return inst;\n}\n\nOnScreenKeyboardModule::~OnScreenKeyboardModule()\n{\n    if (keyboard) {\n        delete keyboard;\n        keyboard = nullptr;\n    }\n}\n\nvoid OnScreenKeyboardModule::start(const char *header, const char *initialText, uint32_t durationMs,\n                                   std::function<void(const std::string &)> cb)\n{\n    if (keyboard) {\n        delete keyboard;\n        keyboard = nullptr;\n    }\n    keyboard = new VirtualKeyboard();\n    callback = cb;\n    if (header)\n        keyboard->setHeader(header);\n    if (initialText)\n        keyboard->setInputText(initialText);\n\n    // Route VK submission/cancel events back into the module\n    keyboard->setCallback([this](const std::string &text) {\n        if (text.empty()) {\n            this->onCancel();\n        } else {\n            this->onSubmit(text);\n        }\n    });\n\n    // Maintain legacy compatibility hooks\n    NotificationRenderer::virtualKeyboard = keyboard;\n    NotificationRenderer::textInputCallback = callback;\n}\n\nvoid OnScreenKeyboardModule::stop(bool callEmptyCallback)\n{\n    auto cb = callback;\n    callback = nullptr;\n    if (keyboard) {\n        delete keyboard;\n        keyboard = nullptr;\n    }\n    // Keep NotificationRenderer legacy pointers in sync\n    NotificationRenderer::virtualKeyboard = nullptr;\n    NotificationRenderer::textInputCallback = nullptr;\n    clearPopup();\n    if (callEmptyCallback && cb)\n        cb(\"\");\n}\n\nvoid OnScreenKeyboardModule::handleInput(const InputEvent &event)\n{\n    if (!keyboard)\n        return;\n\n    if (processVirtualKeyboardInput(event, keyboard))\n        return;\n\n    if (event.inputEvent == INPUT_BROKER_CANCEL)\n        onCancel();\n}\n\nbool OnScreenKeyboardModule::processVirtualKeyboardInput(const InputEvent &event, VirtualKeyboard *targetKeyboard)\n{\n    if (!targetKeyboard)\n        return false;\n\n    switch (event.inputEvent) {\n    case INPUT_BROKER_UP:\n    case INPUT_BROKER_UP_LONG:\n        targetKeyboard->moveCursorUp();\n        return true;\n    case INPUT_BROKER_DOWN:\n    case INPUT_BROKER_DOWN_LONG:\n        targetKeyboard->moveCursorDown();\n        return true;\n    case INPUT_BROKER_LEFT:\n    case INPUT_BROKER_ALT_PRESS:\n        targetKeyboard->moveCursorLeft();\n        return true;\n    case INPUT_BROKER_RIGHT:\n    case INPUT_BROKER_USER_PRESS:\n        targetKeyboard->moveCursorRight();\n        return true;\n    case INPUT_BROKER_SELECT:\n        targetKeyboard->handlePress();\n        return true;\n    case INPUT_BROKER_SELECT_LONG:\n        targetKeyboard->handleLongPress();\n        return true;\n    default:\n        return false;\n    }\n}\n\nbool OnScreenKeyboardModule::draw(OLEDDisplay *display)\n{\n    if (!keyboard)\n        return false;\n\n    // Timeout\n    if (keyboard->isTimedOut()) {\n        onCancel();\n        return false;\n    }\n\n    // Clear full screen behind keyboard\n    display->setColor(BLACK);\n    display->fillRect(0, 0, display->getWidth(), display->getHeight());\n    display->setColor(WHITE);\n    keyboard->draw(display, 0, 0);\n\n    // Draw popup overlay if needed\n    drawPopup(display);\n    return true;\n}\n\nvoid OnScreenKeyboardModule::onSubmit(const std::string &text)\n{\n    auto cb = callback;\n    stop(false);\n    if (cb)\n        cb(text);\n}\n\nvoid OnScreenKeyboardModule::onCancel()\n{\n    stop(true);\n}\n\nvoid OnScreenKeyboardModule::showPopup(const char *title, const char *content, uint32_t durationMs)\n{\n    if (!title || !content)\n        return;\n    strncpy(popupTitle, title, sizeof(popupTitle) - 1);\n    popupTitle[sizeof(popupTitle) - 1] = '\\0';\n    strncpy(popupMessage, content, sizeof(popupMessage) - 1);\n    popupMessage[sizeof(popupMessage) - 1] = '\\0';\n    popupUntil = millis() + durationMs;\n    popupVisible = true;\n}\n\nvoid OnScreenKeyboardModule::clearPopup()\n{\n    popupTitle[0] = '\\0';\n    popupMessage[0] = '\\0';\n    popupUntil = 0;\n    popupVisible = false;\n}\n\nvoid OnScreenKeyboardModule::drawPopupOverlay(OLEDDisplay *display)\n{\n    // Only render the popup overlay (without drawing the keyboard)\n    drawPopup(display);\n}\n\nvoid OnScreenKeyboardModule::drawPopup(OLEDDisplay *display)\n{\n    if (!popupVisible)\n        return;\n    if (millis() > popupUntil || popupMessage[0] == '\\0') {\n        popupVisible = false;\n        return;\n    }\n\n    // Build lines and leverage NotificationRenderer inverted box drawing for consistent style\n    constexpr uint16_t maxContentLines = 3;\n    const bool hasTitle = popupTitle[0] != '\\0';\n\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    const uint16_t maxWrapWidth = display->width() - 40;\n\n    auto wrapText = [&](const char *text, uint16_t availableWidth) -> std::vector<std::string> {\n        std::vector<std::string> wrapped;\n        std::string current;\n        std::string word;\n        const char *p = text;\n        while (*p && wrapped.size() < maxContentLines) {\n            while (*p && (*p == ' ' || *p == '\\t' || *p == '\\n' || *p == '\\r')) {\n                if (*p == '\\n') {\n                    if (!current.empty()) {\n                        wrapped.push_back(current);\n                        current.clear();\n                        if (wrapped.size() >= maxContentLines)\n                            break;\n                    }\n                }\n                ++p;\n            }\n            if (!*p || wrapped.size() >= maxContentLines)\n                break;\n            word.clear();\n            while (*p && *p != ' ' && *p != '\\t' && *p != '\\n' && *p != '\\r')\n                word += *p++;\n            if (word.empty())\n                continue;\n            std::string test = current.empty() ? word : (current + \" \" + word);\n            uint16_t w = display->getStringWidth(test.c_str(), test.length(), true);\n            if (w <= availableWidth)\n                current = test;\n            else {\n                if (!current.empty()) {\n                    wrapped.push_back(current);\n                    current = word;\n                    if (wrapped.size() >= maxContentLines)\n                        break;\n                } else {\n                    current = word;\n                    while (current.size() > 1 &&\n                           display->getStringWidth(current.c_str(), current.length(), true) > availableWidth)\n                        current.pop_back();\n                }\n            }\n        }\n        if (!current.empty() && wrapped.size() < maxContentLines)\n            wrapped.push_back(current);\n        return wrapped;\n    };\n\n    std::vector<std::string> allLines;\n    if (hasTitle)\n        allLines.emplace_back(popupTitle);\n\n    char buf[sizeof(popupMessage)];\n    strncpy(buf, popupMessage, sizeof(buf) - 1);\n    buf[sizeof(buf) - 1] = '\\0';\n    char *paragraph = strtok(buf, \"\\n\");\n    while (paragraph && allLines.size() < maxContentLines + (hasTitle ? 1 : 0)) {\n        auto wrapped = wrapText(paragraph, maxWrapWidth);\n        for (const auto &ln : wrapped) {\n            if (allLines.size() >= maxContentLines + (hasTitle ? 1 : 0))\n                break;\n            allLines.push_back(ln);\n        }\n        paragraph = strtok(nullptr, \"\\n\");\n    }\n\n    std::vector<const char *> ptrs;\n    for (const auto &ln : allLines)\n        ptrs.push_back(ln.c_str());\n    ptrs.push_back(nullptr);\n\n    // Use the standard notification box drawing from NotificationRenderer\n    NotificationRenderer::drawNotificationBox(display, nullptr, ptrs.data(), allLines.size(), 0, 0);\n}\n\n} // namespace graphics\n\n#endif // HAS_SCREEN\n"
  },
  {
    "path": "src/modules/OnScreenKeyboardModule.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n#if HAS_SCREEN\n\n#include \"graphics/Screen.h\" // InputEvent\n#include \"graphics/VirtualKeyboard.h\"\n#include <OLEDDisplay.h>\n#include <functional>\n#include <string>\n\nnamespace graphics\n{\nclass OnScreenKeyboardModule\n{\n  public:\n    static OnScreenKeyboardModule &instance();\n\n    void start(const char *header, const char *initialText, uint32_t durationMs,\n               std::function<void(const std::string &)> callback);\n\n    void stop(bool callEmptyCallback);\n\n    void handleInput(const InputEvent &event);\n    static bool processVirtualKeyboardInput(const InputEvent &event, VirtualKeyboard *keyboard);\n    bool draw(OLEDDisplay *display);\n\n    void showPopup(const char *title, const char *content, uint32_t durationMs);\n    void clearPopup();\n    // Draw only the popup overlay (used when legacy virtualKeyboard draws the keyboard)\n    void drawPopupOverlay(OLEDDisplay *display);\n\n  private:\n    OnScreenKeyboardModule() = default;\n    ~OnScreenKeyboardModule();\n    OnScreenKeyboardModule(const OnScreenKeyboardModule &) = delete;\n    OnScreenKeyboardModule &operator=(const OnScreenKeyboardModule &) = delete;\n\n    void onSubmit(const std::string &text);\n    void onCancel();\n\n    void drawPopup(OLEDDisplay *display);\n\n    VirtualKeyboard *keyboard = nullptr;\n    std::function<void(const std::string &)> callback;\n\n    char popupTitle[64] = {0};\n    char popupMessage[256] = {0};\n    uint32_t popupUntil = 0;\n    bool popupVisible = false;\n};\n\n} // namespace graphics\n\n#endif // HAS_SCREEN\n"
  },
  {
    "path": "src/modules/PositionModule.cpp",
    "content": "#if !MESHTASTIC_EXCLUDE_GPS\n#include \"PositionModule.h\"\n#include \"Default.h\"\n#include \"GPS.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"TransmitHistory.h\"\n#include \"TypeConversions.h\"\n#include \"airtime.h\"\n#include \"configuration.h\"\n#include \"gps/GeoCoord.h\"\n#include \"main.h\"\n#include \"mesh/compression/unishox2.h\"\n#include \"meshUtils.h\"\n#include \"meshtastic/atak.pb.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n#include <Throttle.h>\n\nPositionModule *positionModule;\n\nPositionModule::PositionModule()\n    : ProtobufModule(\"position\", meshtastic_PortNum_POSITION_APP, &meshtastic_Position_msg), concurrency::OSThread(\"Position\")\n{\n    precision = 0;        // safe starting value\n    isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others\n    nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n\n    // Seed throttle timer from persisted transmit history so we don't re-broadcast immediately after reboot\n    if (transmitHistory) {\n        uint32_t restored = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_POSITION_APP);\n        if (restored != 0) {\n            lastGpsSend = restored;\n            LOG_INFO(\"Position: restored lastGpsSend from transmit history\");\n        }\n    }\n\n    if (config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER &&\n        config.device.role != meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) {\n        setIntervalFromNow(setStartDelay());\n    }\n\n    // Power saving trackers should clear their position on startup to avoid waking up and sending a stale position\n    if ((config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER ||\n         config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) &&\n        config.power.is_power_saving) {\n        LOG_DEBUG(\"Clear position on startup for sleepy tracker (ー。ー) zzz\");\n        nodeDB->clearLocalPosition();\n    }\n}\n\nbool PositionModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Position *pptr)\n{\n    auto p = *pptr;\n\n    const auto transport = mp.transport_mechanism;\n    if (isFromUs(&mp) && !IS_ONE_OF(transport, meshtastic_MeshPacket_TransportMechanism_TRANSPORT_INTERNAL,\n                                    meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API)) {\n        LOG_WARN(\"Ignoring packet supposedly from us over external transport\");\n        return true;\n    }\n\n    // FIXME this can in fact happen with packets sent from EUD (src=RX_SRC_USER)\n    // to set fixed location, EUD-GPS location or just the time (see also issue #900)\n    bool isLocal = false;\n    if (isFromUs(&mp)) {\n        isLocal = true;\n        if (config.position.fixed_position) {\n            LOG_DEBUG(\"Ignore incoming position update from myself except for time, because position.fixed_position is true\");\n\n#ifdef T_WATCH_S3\n            // Since we return early if position.fixed_position is true, set the T-Watch's RTC to the time received from the\n            // client device here\n            if (p.time && channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) {\n                trySetRtc(p, isLocal, true);\n            }\n#endif\n\n            nodeDB->setLocalPosition(p, true);\n            return false;\n        } else {\n            LOG_DEBUG(\"Incoming update from MYSELF\");\n            nodeDB->setLocalPosition(p);\n        }\n    }\n\n    // Log packet size and data fields\n    LOG_DEBUG(\"POSITION node=%08x l=%d lat=%d lon=%d msl=%d hae=%d geo=%d pdop=%d hdop=%d vdop=%d siv=%d fxq=%d fxt=%d pts=%d \"\n              \"time=%d\",\n              getFrom(&mp), mp.decoded.payload.size, p.latitude_i, p.longitude_i, p.altitude, p.altitude_hae,\n              p.altitude_geoidal_separation, p.PDOP, p.HDOP, p.VDOP, p.sats_in_view, p.fix_quality, p.fix_type, p.timestamp,\n              p.time);\n\n    if (p.time && channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) {\n        bool force = false;\n\n#ifdef T_WATCH_S3\n        // The T-Watch appears to \"pause\" its RTC when shut down, such that the time it reads upon powering on is the same as when\n        // it was shut down. So we need to force the update here, since otherwise RTC::perhapsSetRTC will ignore it because it\n        // will always be an equivalent or lesser RTCQuality (RTCQualityNTP or RTCQualityNet).\n        force = true;\n#endif\n        // Set from phone RTC Quality to RTCQualityNTP since it should be approximately so\n        trySetRtc(p, isLocal, force);\n    }\n\n    nodeDB->updatePosition(getFrom(&mp), p);\n    if (channels.getByIndex(mp.channel).settings.has_module_settings) {\n        precision = channels.getByIndex(mp.channel).settings.module_settings.position_precision;\n    } else if (channels.getByIndex(mp.channel).role == meshtastic_Channel_Role_PRIMARY) {\n        precision = 32;\n    } else {\n        precision = 0;\n    }\n\n    return false; // Let others look at this message also if they want\n}\n\nvoid PositionModule::alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_Position *p)\n{\n    // Phone position packets need to be truncated to the channel precision\n    if (isFromUs(&mp) && (precision < 32 && precision > 0)) {\n        LOG_DEBUG(\"Truncate phone position to channel precision %i\", precision);\n        p->latitude_i = p->latitude_i & (UINT32_MAX << (32 - precision));\n        p->longitude_i = p->longitude_i & (UINT32_MAX << (32 - precision));\n\n        // We want the imprecise position to be the middle of the possible location, not\n        p->latitude_i += (1 << (31 - precision));\n        p->longitude_i += (1 << (31 - precision));\n\n        mp.decoded.payload.size =\n            pb_encode_to_bytes(mp.decoded.payload.bytes, sizeof(mp.decoded.payload.bytes), &meshtastic_Position_msg, p);\n    }\n}\n\nvoid PositionModule::trySetRtc(meshtastic_Position p, bool isLocal, bool forceUpdate)\n{\n    if (hasQualityTimesource() && !isLocal) {\n        LOG_DEBUG(\"Ignore time from mesh because we have a GPS, RTC, or Phone/NTP time source in the past day\");\n        return;\n    }\n    if (!isLocal && p.location_source < meshtastic_Position_LocSource_LOC_INTERNAL) {\n        LOG_DEBUG(\"Ignore time from mesh because it has a unknown or manual source\");\n        return;\n    }\n    struct timeval tv;\n    uint32_t secs = p.time;\n\n    tv.tv_sec = secs;\n    tv.tv_usec = 0;\n\n    perhapsSetRTC(isLocal ? RTCQualityNTP : RTCQualityFromNet, &tv, forceUpdate);\n}\n\nbool PositionModule::hasQualityTimesource()\n{\n    bool setFromPhoneOrNtpToday =\n        lastSetFromPhoneNtpOrGps == 0 ? false : Throttle::isWithinTimespanMs(lastSetFromPhoneNtpOrGps, SEC_PER_DAY * 1000UL);\n#if MESHTASTIC_EXCLUDE_GPS\n    bool hasGpsOrRtc = (rtc_found.address != ScanI2C::ADDRESS_NONE.address);\n#else\n    bool hasGpsOrRtc = hasGPS() || (rtc_found.address != ScanI2C::ADDRESS_NONE.address);\n#endif\n    return hasGpsOrRtc || setFromPhoneOrNtpToday;\n}\n\nbool PositionModule::hasGPS()\n{\n#if MESHTASTIC_EXCLUDE_GPS\n    return false;\n#else\n    return gps && gps->isConnected();\n#endif\n}\n\n// Allocate a packet with our position data if we have one\nmeshtastic_MeshPacket *PositionModule::allocPositionPacket()\n{\n    if (precision == 0) {\n        LOG_DEBUG(\"Skip location send because precision is set to 0!\");\n        return nullptr;\n    }\n\n    meshtastic_NodeInfoLite *node = service->refreshLocalMeshNode(); // should guarantee there is now a position\n    assert(node->has_position);\n\n    // configuration of POSITION packet\n    //   consider making this a function argument?\n    uint32_t pos_flags = config.position.position_flags;\n\n    // Populate a Position struct with ONLY the requested fields\n    meshtastic_Position p = meshtastic_Position_init_default; //   Start with an empty structure\n    // if localPosition is totally empty, put our last saved position (lite) in there\n    if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) {\n        nodeDB->setLocalPosition(TypeConversions::ConvertToPosition(node->position));\n    }\n    localPosition.seq_number++;\n\n    if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) {\n        LOG_WARN(\"Skip position send because lat/lon are zero!\");\n        return nullptr;\n    }\n\n    // lat/lon are unconditionally included - IF AVAILABLE!\n    LOG_DEBUG(\"Send location with precision %i\", precision);\n    if (precision < 32 && precision > 0) {\n        p.latitude_i = localPosition.latitude_i & (UINT32_MAX << (32 - precision));\n        p.longitude_i = localPosition.longitude_i & (UINT32_MAX << (32 - precision));\n\n        // We want the imprecise position to be the middle of the possible location, not\n        p.latitude_i += (1 << (31 - precision));\n        p.longitude_i += (1 << (31 - precision));\n    } else {\n        p.latitude_i = localPosition.latitude_i;\n        p.longitude_i = localPosition.longitude_i;\n    }\n    p.precision_bits = precision;\n    p.has_latitude_i = true;\n    p.has_longitude_i = true;\n    // Always use NTP / GPS time if available\n    if (getValidTime(RTCQualityNTP) > 0) {\n        p.time = getValidTime(RTCQualityNTP);\n    } else if (rtc_found.address != ScanI2C::ADDRESS_NONE.address) {\n        LOG_INFO(\"Use RTC time for position\");\n        p.time = getValidTime(RTCQualityDevice);\n    } else if (getRTCQuality() < RTCQualityNTP) {\n        LOG_INFO(\"Strip low RTCQuality (%d) time from position\", getRTCQuality());\n        p.time = 0;\n    }\n\n    if (config.position.fixed_position) {\n        p.location_source = meshtastic_Position_LocSource_LOC_MANUAL;\n    } else {\n        p.location_source = localPosition.location_source;\n    }\n\n    if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE) {\n        if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_ALTITUDE_MSL) {\n            p.altitude = localPosition.altitude;\n            p.has_altitude = true;\n        } else {\n            p.altitude_hae = localPosition.altitude_hae;\n            p.has_altitude_hae = true;\n        }\n\n        if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_GEOIDAL_SEPARATION) {\n            p.altitude_geoidal_separation = localPosition.altitude_geoidal_separation;\n            p.has_altitude_geoidal_separation = true;\n        }\n    }\n\n    if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_DOP) {\n        if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_HVDOP) {\n            p.HDOP = localPosition.HDOP;\n            p.VDOP = localPosition.VDOP;\n        } else\n            p.PDOP = localPosition.PDOP;\n    }\n\n    if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_SATINVIEW)\n        p.sats_in_view = localPosition.sats_in_view;\n\n    if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_TIMESTAMP)\n        p.timestamp = localPosition.timestamp;\n\n    if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_SEQ_NO)\n        p.seq_number = localPosition.seq_number;\n\n    if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_HEADING) {\n        p.ground_track = localPosition.ground_track;\n        p.has_ground_track = true;\n    }\n\n    if (pos_flags & meshtastic_Config_PositionConfig_PositionFlags_SPEED) {\n        p.ground_speed = localPosition.ground_speed;\n        p.has_ground_speed = true;\n    }\n\n    LOG_INFO(\"Position packet: time=%i lat=%i lon=%i\", p.time, p.latitude_i, p.longitude_i);\n\n#ifndef MESHTASTIC_EXCLUDE_ATAK\n    // TAK Tracker devices should send their position in a TAK packet over the ATAK port\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER)\n        return allocAtakPli();\n#endif\n\n    return allocDataProtobuf(p);\n}\n\nmeshtastic_MeshPacket *PositionModule::allocReply()\n{\n    if (config.device.role != meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND && lastSentReply &&\n        Throttle::isWithinTimespanMs(lastSentReply, 3 * 60 * 1000)) {\n        LOG_DEBUG(\"Skip Position reply since we sent a reply <3min ago\");\n        ignoreRequest = true; // Mark it as ignored for MeshModule\n        return nullptr;\n    }\n\n    meshtastic_MeshPacket *reply = allocPositionPacket();\n    if (reply) {\n        lastSentReply = millis(); // Track when we sent this reply\n    }\n    return reply;\n}\n\nmeshtastic_MeshPacket *PositionModule::allocAtakPli()\n{\n    LOG_INFO(\"Send TAK PLI packet\");\n    meshtastic_MeshPacket *mp = allocDataPacket();\n    mp->decoded.portnum = meshtastic_PortNum_ATAK_PLUGIN;\n\n    meshtastic_TAKPacket takPacket = {.is_compressed = true,\n                                      .has_contact = true,\n                                      .contact = meshtastic_Contact_init_default,\n                                      .has_group = true,\n                                      .group = {meshtastic_MemberRole_TeamMember, meshtastic_Team_Cyan},\n                                      .has_status = true,\n                                      .status =\n                                          {\n                                              .battery = powerStatus->getBatteryChargePercent(),\n                                          },\n                                      .which_payload_variant = meshtastic_TAKPacket_pli_tag,\n                                      .payload_variant = {.pli = {\n                                                              .latitude_i = localPosition.latitude_i,\n                                                              .longitude_i = localPosition.longitude_i,\n                                                              .altitude = localPosition.altitude_hae,\n                                                              .speed = localPosition.ground_speed,\n                                                              .course = static_cast<uint16_t>(localPosition.ground_track),\n                                                          }}};\n\n    auto length = unishox2_compress_lines(owner.long_name, strlen(owner.long_name), takPacket.contact.device_callsign,\n                                          sizeof(takPacket.contact.device_callsign) - 1, USX_PSET_DFLT, NULL);\n    LOG_DEBUG(\"Uncompressed device_callsign '%s' - %d bytes\", owner.long_name, strlen(owner.long_name));\n    LOG_DEBUG(\"Compressed device_callsign '%s' - %d bytes\", takPacket.contact.device_callsign, length);\n    length = unishox2_compress_lines(owner.long_name, strlen(owner.long_name), takPacket.contact.callsign,\n                                     sizeof(takPacket.contact.callsign) - 1, USX_PSET_DFLT, NULL);\n    mp->decoded.payload.size =\n        pb_encode_to_bytes(mp->decoded.payload.bytes, sizeof(mp->decoded.payload.bytes), &meshtastic_TAKPacket_msg, &takPacket);\n    return mp;\n}\n\nvoid PositionModule::sendOurPosition()\n{\n    bool requestReplies = currentGeneration != radioGeneration;\n    currentGeneration = radioGeneration;\n\n    // If we changed channels, ask everyone else for their latest info\n    LOG_INFO(\"Send pos@%x:6 to mesh (wantReplies=%d)\", localPosition.timestamp, requestReplies);\n    for (uint8_t channelNum = 0; channelNum < 8; channelNum++) {\n        if (channels.getByIndex(channelNum).settings.has_module_settings &&\n            channels.getByIndex(channelNum).settings.module_settings.position_precision != 0) {\n            sendOurPosition(NODENUM_BROADCAST, requestReplies, channelNum);\n            return;\n        }\n    }\n}\n\nvoid PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t channel)\n{\n    if (!config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot()) {\n        LOG_DEBUG(\"Skip position send; no fresh position since boot\");\n        return;\n    }\n\n    // cancel any not yet sent (now stale) position packets\n    if (prevPacketId) // if we wrap around to zero, we'll simply fail to cancel in that rare case (no big deal)\n        service->cancelSending(prevPacketId);\n\n    // Set's the class precision value for this particular packet\n    if (channels.getByIndex(channel).settings.has_module_settings) {\n        precision = channels.getByIndex(channel).settings.module_settings.position_precision;\n    }\n\n    meshtastic_MeshPacket *p = allocPositionPacket();\n    if (p == nullptr) {\n        LOG_DEBUG(\"allocPositionPacket returned a nullptr\");\n        return;\n    }\n\n    p->to = dest;\n    p->decoded.want_response = config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER ? false : wantReplies;\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER ||\n        config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER)\n        p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n    else\n        p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n    prevPacketId = p->id;\n\n    if (channel > 0)\n        p->channel = channel;\n\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n    if (IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER,\n                  meshtastic_Config_DeviceConfig_Role_TAK_TRACKER) &&\n        config.power.is_power_saving) {\n        meshtastic_ClientNotification *notification = clientNotificationPool.allocZeroed();\n        notification->level = meshtastic_LogRecord_Level_INFO;\n        notification->time = getValidTime(RTCQualityFromNet);\n        sprintf(notification->message, \"Sending position and sleeping for %us interval in a moment\",\n                Default::getConfiguredOrDefaultMs(config.position.position_broadcast_secs, default_broadcast_interval_secs) /\n                    1000U);\n        service->sendClientNotification(notification);\n        sleepOnNextExecution = true;\n        LOG_DEBUG(\"Start next execution in 5s, then sleep\");\n        setIntervalFromNow(FIVE_SECONDS_MS);\n    }\n}\n\n#define RUNONCE_INTERVAL 5000;\n\nint32_t PositionModule::runOnce()\n{\n    if (sleepOnNextExecution == true) {\n        sleepOnNextExecution = false;\n        uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(config.position.position_broadcast_secs);\n        LOG_DEBUG(\"Sleep for %ims, then awaking to send position again\", nightyNightMs);\n        doDeepSleep(nightyNightMs, false, false);\n    }\n\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    if (node == nullptr)\n        return RUNONCE_INTERVAL;\n\n    // We limit our GPS broadcasts to a max rate\n    uint32_t now = millis();\n    uint32_t intervalMs = Default::getConfiguredOrDefaultMsScaled(config.position.position_broadcast_secs,\n                                                                  default_broadcast_interval_secs, numOnlineNodes);\n    uint32_t msSinceLastSend = now - lastGpsSend;\n    // Only send packets if the channel util. is less than 25% utilized or we're a tracker with less than 40% utilized.\n    if (!airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER &&\n                                         config.device.role != meshtastic_Config_DeviceConfig_Role_TAK_TRACKER)) {\n        return RUNONCE_INTERVAL;\n    }\n\n    bool waitingForFreshPosition = (lastGpsSend == 0) && !config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot();\n\n    if (lastGpsSend == 0 || msSinceLastSend >= intervalMs) {\n        if (waitingForFreshPosition) {\n#ifdef GPS_DEBUG\n            LOG_DEBUG(\"Skip initial position send; no fresh position since boot\");\n#endif\n        } else if (nodeDB->hasValidPosition(node)) {\n            lastGpsSend = now;\n\n            lastGpsLatitude = node->position.latitude_i;\n            lastGpsLongitude = node->position.longitude_i;\n\n            if (transmitHistory)\n                transmitHistory->setLastSentToMesh(meshtastic_PortNum_POSITION_APP);\n            sendOurPosition();\n            if (config.device.role == meshtastic_Config_DeviceConfig_Role_LOST_AND_FOUND) {\n                sendLostAndFoundText();\n            }\n        }\n    } else if (config.position.position_broadcast_smart_enabled) {\n        const meshtastic_NodeInfoLite *node2 = service->refreshLocalMeshNode(); // should guarantee there is now a position\n\n        if (nodeDB->hasValidPosition(node2)) {\n            // The minimum time (in seconds) that would pass before we are able to send a new position packet.\n\n            auto smartPosition = getDistanceTraveledSinceLastSend(node->position);\n            msSinceLastSend = now - lastGpsSend;\n\n            if (smartPosition.hasTraveledOverThreshold &&\n                Throttle::execute(\n                    &lastGpsSend, minimumTimeThreshold, []() { positionModule->sendOurPosition(); },\n                    []() {\n#ifdef GPS_DEBUG\n                        LOG_DEBUG(\"Skip send smart broadcast due to time throttling\");\n#endif\n                    })) {\n\n                LOG_DEBUG(\"Sent smart pos@%x:6 to mesh (distanceTraveled=%fm, minDistanceThreshold=%im, timeElapsed=%ims, \"\n                          \"minTimeInterval=%ims)\",\n                          localPosition.timestamp, smartPosition.distanceTraveled, smartPosition.distanceThreshold,\n                          msSinceLastSend, minimumTimeThreshold);\n\n                // Set the current coords as our last ones, after we've compared distance with current and decided to send\n                lastGpsLatitude = node->position.latitude_i;\n                lastGpsLongitude = node->position.longitude_i;\n            }\n        }\n    }\n\n    return RUNONCE_INTERVAL; // to save power only wake for our callback occasionally\n}\n\nvoid PositionModule::sendLostAndFoundText()\n{\n    meshtastic_MeshPacket *p = allocDataPacket();\n    p->to = NODENUM_BROADCAST;\n    char *message = new char[60];\n    sprintf(message, \"🚨I'm lost! Lat / Lon: %f, %f\\a\", (lastGpsLatitude * 1e-7), (lastGpsLongitude * 1e-7));\n    p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP;\n    p->want_ack = false;\n    p->decoded.payload.size = strlen(message);\n    memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size);\n\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n    delete[] message;\n}\n\n// Helper: return imprecise (truncated + centered) lat/lon as int32 using current precision\nstatic inline void computeImpreciseLatLon(int32_t inLat, int32_t inLon, uint8_t precisionBits, int32_t &outLat, int32_t &outLon)\n{\n    if (precisionBits > 0 && precisionBits < 32) {\n        // Build mask for top 'precisionBits' bits of a 32-bit unsigned field\n        const uint32_t mask = (precisionBits == 32) ? UINT32_MAX : (UINT32_MAX << (32 - precisionBits));\n        // Note: latitude_i/longitude_i are stored as signed 32-bit in meshtastic code but\n        // the bitmask logic used previously operated as unsigned—preserve that behavior by\n        // casting to uint32_t for masking, then back to int32_t.\n        uint32_t lat_u = static_cast<uint32_t>(inLat) & mask;\n        uint32_t lon_u = static_cast<uint32_t>(inLon) & mask;\n\n        // Add the \"center of cell\" offset used elsewhere:\n        // The code previously added (1 << (31 - precision)) to produce the middle of the possible location.\n        uint32_t center_offset = (1u << (31 - precisionBits));\n        lat_u += center_offset;\n        lon_u += center_offset;\n\n        outLat = static_cast<int32_t>(lat_u);\n        outLon = static_cast<int32_t>(lon_u);\n    } else {\n        // full precision: return input unchanged\n        outLat = inLat;\n        outLon = inLon;\n    }\n}\n\nstruct SmartPosition PositionModule::getDistanceTraveledSinceLastSend(meshtastic_PositionLite currentPosition)\n{\n    const uint32_t distanceTravelThreshold =\n        Default::getConfiguredOrDefault(config.position.broadcast_smart_minimum_distance, 100);\n\n    int32_t lastLatImprecise, lastLonImprecise;\n    int32_t currentLatImprecise, currentLonImprecise;\n\n    computeImpreciseLatLon(lastGpsLatitude, lastGpsLongitude, precision, lastLatImprecise, lastLonImprecise);\n    computeImpreciseLatLon(currentPosition.latitude_i, currentPosition.longitude_i, precision, currentLatImprecise,\n                           currentLonImprecise);\n\n    float distMeters = GeoCoord::latLongToMeter(lastLatImprecise * 1e-7, lastLonImprecise * 1e-7, currentLatImprecise * 1e-7,\n                                                currentLonImprecise * 1e-7);\n\n    float distanceTraveled = fabsf(distMeters);\n\n    return SmartPosition{.distanceTraveled = distanceTraveled,\n                         .distanceThreshold = distanceTravelThreshold,\n                         .hasTraveledOverThreshold = distanceTraveled >= distanceTravelThreshold};\n}\n\nvoid PositionModule::handleNewPosition()\n{\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(nodeDB->getNodeNum());\n    const meshtastic_NodeInfoLite *node2 = service->refreshLocalMeshNode(); // should guarantee there is now a position\n    // We limit our GPS broadcasts to a max rate\n    if (nodeDB->hasValidPosition(node2)) {\n        auto smartPosition = getDistanceTraveledSinceLastSend(node->position);\n        uint32_t msSinceLastSend = millis() - lastGpsSend;\n        if (smartPosition.hasTraveledOverThreshold &&\n            Throttle::execute(\n                &lastGpsSend, minimumTimeThreshold, []() { positionModule->sendOurPosition(); },\n                []() {\n#ifdef GPS_DEBUG\n                    LOG_DEBUG(\"Skip send smart broadcast due to time throttling\");\n#endif\n                })) {\n            LOG_DEBUG(\"Sent smart pos@%x:6 to mesh (distanceTraveled=%fm, minDistanceThreshold=%im, timeElapsed=%ims, \"\n                      \"minTimeInterval=%ims)\",\n                      localPosition.timestamp, smartPosition.distanceTraveled, smartPosition.distanceThreshold, msSinceLastSend,\n                      minimumTimeThreshold);\n\n            // Set the current coords as our last ones, after we've compared distance with current and decided to send\n            lastGpsLatitude = node->position.latitude_i;\n            lastGpsLongitude = node->position.longitude_i;\n        }\n    }\n}\n\n#endif"
  },
  {
    "path": "src/modules/PositionModule.h",
    "content": "#pragma once\n#include \"Default.h\"\n#include \"ProtobufModule.h\"\n#include \"concurrency/OSThread.h\"\n\n/**\n * Position module for sending/receiving positions into the mesh\n */\nclass PositionModule : public ProtobufModule<meshtastic_Position>, private concurrency::OSThread\n{\n    CallbackObserver<PositionModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<PositionModule, const meshtastic::Status *>(this, &PositionModule::handleStatusUpdate);\n\n    /// The id of the last packet we sent, to allow us to cancel it if we make something fresher\n    PacketId prevPacketId = 0;\n\n    /// We limit our GPS broadcasts to a max rate\n    uint32_t lastGpsSend = 0;\n\n    // Store the latest good lat / long\n    int32_t lastGpsLatitude = 0;\n    int32_t lastGpsLongitude = 0;\n\n    /// We force a rebroadcast if the radio settings change\n    uint32_t currentGeneration = 0;\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    PositionModule();\n\n    /**\n     * Send our position into the mesh\n     */\n    void sendOurPosition(NodeNum dest, bool wantReplies = false, uint8_t channel = 0);\n    void sendOurPosition();\n\n    void handleNewPosition();\n\n  protected:\n    /** Called to handle a particular incoming message\n\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Position *p) override;\n\n    virtual void alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_Position *p) override;\n\n    /** Messages can be received that have the want_response bit set.  If set, this callback will be invoked\n     * so that subclasses can (optionally) send a response back to the original sender.  */\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n    /** Does our periodic broadcast */\n    virtual int32_t runOnce() override;\n\n  private:\n    meshtastic_MeshPacket *allocPositionPacket();\n    struct SmartPosition getDistanceTraveledSinceLastSend(meshtastic_PositionLite currentPosition);\n    meshtastic_MeshPacket *allocAtakPli();\n    void trySetRtc(meshtastic_Position p, bool isLocal, bool forceUpdate = false);\n    uint32_t precision;\n    void sendLostAndFoundText();\n    bool hasQualityTimesource();\n    bool hasGPS();\n    uint32_t lastSentReply = 0; // Last time we sent a position reply (used for reply throttling only)\n\n#if USERPREFS_EVENT_MODE\n    // In event mode we want to prevent excessive position broadcasts\n    // we set the minimum interval to 5m\n    const uint32_t minimumTimeThreshold =\n        max(uint32_t(300000), Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs,\n                                                                default_broadcast_smart_minimum_interval_secs));\n#else\n    const uint32_t minimumTimeThreshold = Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs,\n                                                                            default_broadcast_smart_minimum_interval_secs);\n#endif\n};\n\nstruct SmartPosition {\n    float distanceTraveled;\n    uint32_t distanceThreshold;\n    bool hasTraveledOverThreshold;\n};\n\nextern PositionModule *positionModule;"
  },
  {
    "path": "src/modules/PowerStressModule.cpp",
    "content": "#include \"PowerStressModule.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerMon.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n#include <Throttle.h>\n\nextern void printInfo();\n\nPowerStressModule::PowerStressModule()\n    : ProtobufModule(\"powerstress\", meshtastic_PortNum_POWERSTRESS_APP, &meshtastic_PowerStressMessage_msg),\n      concurrency::OSThread(\"PowerStress\")\n{\n}\n\nbool PowerStressModule::handleReceivedProtobuf(const meshtastic_MeshPacket &req, meshtastic_PowerStressMessage *pptr)\n{\n    // We only respond to messages if powermon debugging is already on\n    if (config.power.powermon_enables) {\n        auto p = *pptr;\n        LOG_INFO(\"Received PowerStress cmd=%d\", p.cmd);\n\n        // Some commands we can handle immediately, anything else gets deferred to be handled by our thread\n        switch (p.cmd) {\n        case meshtastic_PowerStressMessage_Opcode_UNSET:\n            LOG_ERROR(\"PowerStress operation unset\");\n            break;\n\n        case meshtastic_PowerStressMessage_Opcode_PRINT_INFO:\n            printInfo();\n\n            // Now that we know we are actually doing power stress testing, go ahead and turn on all enables (so the log is fully\n            // detailed)\n            powerMon->force_enabled = true;\n            break;\n\n        default:\n            if (currentMessage.cmd != meshtastic_PowerStressMessage_Opcode_UNSET)\n                LOG_ERROR(\"PowerStress operation %d already in progress! Can't start new command\", currentMessage.cmd);\n            else\n                currentMessage = p; // copy for use by thread (the message provided to us will be getting freed)\n            break;\n        }\n    }\n    return true;\n}\n\nint32_t PowerStressModule::runOnce()\n{\n    if (!config.power.powermon_enables) {\n        // Powermon not enabled - stop using CPU/stop this thread\n        return disable();\n    }\n\n    int32_t sleep_msec = 10; // when not active check for new messages every 10ms\n\n    auto &p = currentMessage;\n\n    if (isRunningCommand) {\n        // Done with the previous command - our sleep must have finished\n        p.cmd = meshtastic_PowerStressMessage_Opcode_UNSET;\n        p.num_seconds = 0;\n        isRunningCommand = false;\n        LOG_INFO(\"S:PS:%u\", p.cmd);\n    } else {\n        if (p.cmd != meshtastic_PowerStressMessage_Opcode_UNSET) {\n            sleep_msec = (int32_t)(p.num_seconds * 1000);\n            isRunningCommand = !!sleep_msec; // if the command wants us to sleep, make sure to mark that we have something running\n            LOG_INFO(\n                \"S:PS:%u\",\n                p.cmd); // Emit a structured log saying we are starting a powerstress state (to make it easier to parse later)\n\n            switch (p.cmd) {\n            case meshtastic_PowerStressMessage_Opcode_LED_ON:\n                // FIXME - implement\n                // ledForceOn.set(true);\n                break;\n            case meshtastic_PowerStressMessage_Opcode_LED_OFF:\n                // FIXME - implement\n                // ledForceOn.set(false);\n                break;\n            case meshtastic_PowerStressMessage_Opcode_GPS_ON:\n                // FIXME - implement\n                break;\n            case meshtastic_PowerStressMessage_Opcode_GPS_OFF:\n                // FIXME - implement\n                break;\n            case meshtastic_PowerStressMessage_Opcode_LORA_OFF:\n                // FIXME - implement\n                break;\n            case meshtastic_PowerStressMessage_Opcode_LORA_RX:\n                // FIXME - implement\n                break;\n            case meshtastic_PowerStressMessage_Opcode_LORA_TX:\n                // FIXME - implement\n                break;\n            case meshtastic_PowerStressMessage_Opcode_SCREEN_OFF:\n                // FIXME - implement\n                break;\n            case meshtastic_PowerStressMessage_Opcode_SCREEN_ON:\n                // FIXME - implement\n                break;\n            case meshtastic_PowerStressMessage_Opcode_BT_OFF:\n                setBluetoothEnable(false);\n                break;\n            case meshtastic_PowerStressMessage_Opcode_BT_ON:\n                setBluetoothEnable(true);\n                break;\n            case meshtastic_PowerStressMessage_Opcode_CPU_DEEPSLEEP:\n                doDeepSleep(sleep_msec, true, true);\n                break;\n            case meshtastic_PowerStressMessage_Opcode_CPU_FULLON: {\n                uint32_t start_msec = millis();\n                while (Throttle::isWithinTimespanMs(start_msec, sleep_msec))\n                    ;           // Don't let CPU idle at all\n                sleep_msec = 0; // we already slept\n                break;\n            }\n            case meshtastic_PowerStressMessage_Opcode_CPU_IDLE:\n                // FIXME - implement\n                break;\n            default:\n                LOG_ERROR(\"PowerStress operation %d not yet implemented!\", p.cmd);\n                sleep_msec = 0; // Don't do whatever sleep was requested...\n                break;\n            }\n        }\n    }\n    return sleep_msec;\n}"
  },
  {
    "path": "src/modules/PowerStressModule.h",
    "content": "#pragma once\n#include \"ProtobufModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"mesh/generated/meshtastic/powermon.pb.h\"\n\n/**\n * A module that provides easy low-level remote access to device hardware.\n */\nclass PowerStressModule : public ProtobufModule<meshtastic_PowerStressMessage>, private concurrency::OSThread\n{\n    meshtastic_PowerStressMessage currentMessage = meshtastic_PowerStressMessage_init_default;\n    bool isRunningCommand = false;\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    PowerStressModule();\n\n  protected:\n    /** Called to handle a particular incoming message\n\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_PowerStressMessage *p) override;\n\n    /**\n     * Periodically read the gpios we have been asked to WATCH, if they have changed,\n     * broadcast a message with the change information.\n     *\n     * The method that will be called each time our thread gets a chance to run\n     *\n     * Returns desired period for next invocation (or RUN_SAME for no change)\n     */\n    virtual int32_t runOnce() override;\n};\n\nextern PowerStressModule powerStressModule;"
  },
  {
    "path": "src/modules/RangeTestModule.cpp",
    "content": "/**\n * @file RangeTestModule.cpp\n * @brief Implementation of the RangeTestModule class and RangeTestModuleRadio class.\n *\n * As a sender, this module sends packets every n seconds with an incremented PacketID.\n * As a receiver, this module receives packets from multiple senders and saves them to the Filesystem.\n *\n * The RangeTestModule class is an OSThread that runs the module.\n * The RangeTestModuleRadio class handles sending and receiving packets.\n */\n#include \"RangeTestModule.h\"\n#include \"FSCommon.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"SPILock.h\"\n#include \"airtime.h\"\n#include \"configuration.h\"\n#include \"gps/GeoCoord.h\"\n#include <Arduino.h>\n#include <Throttle.h>\n\nRangeTestModule *rangeTestModule;\nRangeTestModuleRadio *rangeTestModuleRadio;\n\nRangeTestModule::RangeTestModule() : concurrency::OSThread(\"RangeTest\") {}\n\nuint32_t packetSequence = 0;\n\nint32_t RangeTestModule::runOnce()\n{\n#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_STM32WL) || defined(ARCH_PORTDUINO)\n\n    /*\n        Uncomment the preferences below if you want to use the module\n        without having to configure it from the PythonAPI or WebUI.\n    */\n\n    // moduleConfig.range_test.enabled = 1;\n    // moduleConfig.range_test.sender = 30;\n    // moduleConfig.range_test.save = 1;\n    // moduleConfig.range_test.clear_on_reboot = 1;\n\n    // Fixed position is useful when testing indoors.\n    // config.position.fixed_position = 1;\n\n    uint32_t senderHeartbeat = moduleConfig.range_test.sender * 1000;\n    if (moduleConfig.range_test.enabled) {\n\n        if (firstTime) {\n            rangeTestModuleRadio = new RangeTestModuleRadio();\n\n            firstTime = 0;\n\n            if (moduleConfig.range_test.clear_on_reboot) {\n                // User wants to delete previous range test(s)\n                LOG_INFO(\"Range Test Module - Clearing out previous test file\");\n                rangeTestModuleRadio->removeFile();\n            }\n            if (moduleConfig.range_test.sender) {\n                LOG_INFO(\"Init Range Test Module -- Sender\");\n                started = millis(); // make a note of when we started\n                return (5000);      // Sending first message 5 seconds after initialization.\n            } else {\n                LOG_INFO(\"Init Range Test Module -- Receiver\");\n                return disable();\n                // This thread does not need to run as a receiver\n            }\n        } else {\n\n            if (moduleConfig.range_test.sender) {\n                // If sender\n                LOG_INFO(\"Range Test Module - Sending heartbeat every %d ms\", (senderHeartbeat));\n\n                LOG_INFO(\"gpsStatus->getLatitude()     %d\", gpsStatus->getLatitude());\n                LOG_INFO(\"gpsStatus->getLongitude()    %d\", gpsStatus->getLongitude());\n                LOG_INFO(\"gpsStatus->getHasLock()      %d\", gpsStatus->getHasLock());\n                LOG_INFO(\"gpsStatus->getDOP()          %d\", gpsStatus->getDOP());\n                LOG_INFO(\"fixed_position()             %d\", config.position.fixed_position);\n\n                // Only send packets if the channel is less than 25% utilized.\n                if (airTime->isTxAllowedChannelUtil(true)) {\n                    rangeTestModuleRadio->sendPayload();\n                }\n\n                // If we have been running for more than 8 hours, turn module back off\n                if (!Throttle::isWithinTimespanMs(started, 28800000)) {\n                    LOG_INFO(\"Range Test Module - Disable after 8 hours\");\n                    return disable();\n                } else {\n                    return (senderHeartbeat);\n                }\n            } else {\n                return disable();\n                // This thread does not need to run as a receiver\n            }\n        }\n    } else {\n        LOG_INFO(\"Range Test Module - Disabled\");\n    }\n\n#endif\n    return disable();\n}\n\n/**\n * Sends a payload to a specified destination node.\n *\n * @param dest The destination node number.\n * @param wantReplies Whether or not to request replies from the destination node.\n */\nvoid RangeTestModuleRadio::sendPayload(NodeNum dest, bool wantReplies)\n{\n    meshtastic_MeshPacket *p = allocDataPacket();\n    p->to = dest;\n    p->decoded.want_response = wantReplies;\n    p->hop_limit = 0;\n    p->want_ack = false;\n\n    packetSequence++;\n\n    static char heartbeatString[MAX_LORA_PAYLOAD_LEN + 1];\n    snprintf(heartbeatString, sizeof(heartbeatString), \"seq %u\", packetSequence);\n\n    p->decoded.payload.size = strlen(heartbeatString); // You must specify how many bytes are in the reply\n    memcpy(p->decoded.payload.bytes, heartbeatString, p->decoded.payload.size);\n\n    service->sendToMesh(p);\n\n    // TODO: Handle this better. We want to keep the phone awake otherwise it stops sending.\n    powerFSM.trigger(EVENT_CONTACT_FROM_PHONE);\n}\n\nProcessMessage RangeTestModuleRadio::handleReceived(const meshtastic_MeshPacket &mp)\n{\n#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_STM32WL) || defined(ARCH_PORTDUINO)\n\n    if (moduleConfig.range_test.enabled) {\n\n        /*\n            auto &p = mp.decoded;\n            LOG_DEBUG(\"Received text msg self=0x%0x, from=0x%0x, to=0x%0x, id=%d, msg=%.*s\",\n                  LOG_INFO.getNodeNum(), mp.from, mp.to, mp.id, p.payload.size, p.payload.bytes);\n        */\n\n        if (!isFromUs(&mp)) {\n            if (moduleConfig.range_test.save) {\n                appendFile(mp);\n            }\n\n            /*\n            NodeInfoLite *n = nodeDB->getMeshNode(getFrom(&mp));\n\n            LOG_DEBUG(\"-----------------------------------------\");\n            LOG_DEBUG(\"p.payload.bytes  \\\"%s\\\"\", p.payload.bytes);\n            LOG_DEBUG(\"p.payload.size   %d\", p.payload.size);\n            LOG_DEBUG(\"---- Received Packet:\");\n            LOG_DEBUG(\"mp.from          %d\", mp.from);\n            LOG_DEBUG(\"mp.rx_snr        %f\", mp.rx_snr);\n            LOG_DEBUG(\"mp.rx_rssi       %f\", mp.rx_rssi);\n            LOG_DEBUG(\"mp.hop_limit     %d\", mp.hop_limit);\n            LOG_DEBUG(\"---- Node Information of Received Packet (mp.from):\");\n            LOG_DEBUG(\"n->user.long_name         %s\", n->user.long_name);\n            LOG_DEBUG(\"n->user.short_name        %s\", n->user.short_name);\n            LOG_DEBUG(\"n->has_position           %d\", n->has_position);\n            LOG_DEBUG(\"n->position.latitude_i    %d\", n->position.latitude_i);\n            LOG_DEBUG(\"n->position.longitude_i   %d\", n->position.longitude_i);\n            LOG_DEBUG(\"---- Current device location information:\");\n            LOG_DEBUG(\"gpsStatus->getLatitude()     %d\", gpsStatus->getLatitude());\n            LOG_DEBUG(\"gpsStatus->getLongitude()    %d\", gpsStatus->getLongitude());\n            LOG_DEBUG(\"gpsStatus->getHasLock()      %d\", gpsStatus->getHasLock());\n            LOG_DEBUG(\"gpsStatus->getDOP()          %d\", gpsStatus->getDOP());\n            LOG_DEBUG(\"-----------------------------------------\");\n            */\n        }\n    } else {\n        LOG_INFO(\"Range Test Module Disabled\");\n    }\n\n#endif\n\n    return ProcessMessage::CONTINUE; // Let others look at this message also if they want\n}\n\nbool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)\n{\n#ifdef ARCH_ESP32\n    auto &p = mp.decoded;\n\n    meshtastic_NodeInfoLite *n = nodeDB->getMeshNode(getFrom(&mp));\n    /*\n        LOG_DEBUG(\"-----------------------------------------\");\n        LOG_DEBUG(\"p.payload.bytes  \\\"%s\\\"\", p.payload.bytes);\n        LOG_DEBUG(\"p.payload.size   %d\", p.payload.size);\n        LOG_DEBUG(\"---- Received Packet:\");\n        LOG_DEBUG(\"mp.from          %d\", mp.from);\n        LOG_DEBUG(\"mp.rx_snr        %f\", mp.rx_snr);\n        LOG_DEBUG(\"mp.hop_limit     %d\", mp.hop_limit);\n        LOG_DEBUG(\"---- Node Information of Received Packet (mp.from):\");\n        LOG_DEBUG(\"n->user.long_name         %s\", n->user.long_name);\n        LOG_DEBUG(\"n->user.short_name        %s\", n->user.short_name);\n        LOG_DEBUG(\"n->has_position           %d\", n->has_position);\n        LOG_DEBUG(\"n->position.latitude_i    %d\", n->position.latitude_i);\n        LOG_DEBUG(\"n->position.longitude_i   %d\", n->position.longitude_i);\n        LOG_DEBUG(\"---- Current device location information:\");\n        LOG_DEBUG(\"gpsStatus->getLatitude()     %d\", gpsStatus->getLatitude());\n        LOG_DEBUG(\"gpsStatus->getLongitude()    %d\", gpsStatus->getLongitude());\n        LOG_DEBUG(\"gpsStatus->getHasLock()      %d\", gpsStatus->getHasLock());\n        LOG_DEBUG(\"gpsStatus->getDOP()          %d\", gpsStatus->getDOP());\n        LOG_DEBUG(\"-----------------------------------------\");\n    */\n    concurrency::LockGuard g(spiLock);\n    if (!FSBegin()) {\n        LOG_DEBUG(\"An Error has occurred while mounting the filesystem\");\n        return 0;\n    }\n\n    if (FSCom.totalBytes() - FSCom.usedBytes() < 51200) {\n        LOG_DEBUG(\"Filesystem doesn't have enough free space. Aborting write\");\n        return 0;\n    }\n\n    FSCom.mkdir(\"/static\");\n\n    // If the file doesn't exist, write the header.\n    if (!FSCom.exists(\"/static/rangetest.csv\")) {\n        //--------- Write to file\n        File fileToWrite = FSCom.open(\"/static/rangetest.csv\", FILE_WRITE);\n\n        if (!fileToWrite) {\n            LOG_ERROR(\"There was an error opening the file for writing\");\n            return 0;\n        }\n\n        // Print the CSV header\n        if (fileToWrite.println(\"time,from,sender name,sender lat,sender long,rx lat,rx long,rx elevation,rx \"\n                                \"snr,distance,hop limit,payload,rx rssi\")) {\n            LOG_INFO(\"File was written\");\n        } else {\n            LOG_ERROR(\"File write failed\");\n        }\n        fileToWrite.flush();\n        fileToWrite.close();\n    }\n\n    //--------- Append content to file\n    File fileToAppend = FSCom.open(\"/static/rangetest.csv\", FILE_APPEND);\n\n    if (!fileToAppend) {\n        LOG_ERROR(\"There was an error opening the file for appending\");\n        return 0;\n    }\n\n    struct timeval tv;\n    if (!gettimeofday(&tv, NULL)) {\n        long hms = tv.tv_sec % SEC_PER_DAY;\n        hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;\n\n        // Tear apart hms into h:m:s\n        int hour = hms / SEC_PER_HOUR;\n        int min = (hms % SEC_PER_HOUR) / SEC_PER_MIN;\n        int sec = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN\n\n        fileToAppend.printf(\"%02d:%02d:%02d,\", hour, min, sec); // Time\n    } else {\n        fileToAppend.printf(\"??:??:??,\"); // Time\n    }\n\n    fileToAppend.printf(\"%d,\", getFrom(&mp));                   // From\n    fileToAppend.printf(\"%s,\", n->user.long_name);              // Long Name\n    fileToAppend.printf(\"%f,\", n->position.latitude_i * 1e-7);  // Sender Lat\n    fileToAppend.printf(\"%f,\", n->position.longitude_i * 1e-7); // Sender Long\n    if (gpsStatus->getIsConnected() || config.position.fixed_position) {\n        fileToAppend.printf(\"%f,\", gpsStatus->getLatitude() * 1e-7);  // RX Lat\n        fileToAppend.printf(\"%f,\", gpsStatus->getLongitude() * 1e-7); // RX Long\n        fileToAppend.printf(\"%d,\", gpsStatus->getAltitude());         // RX Altitude\n    } else {\n        // When the phone API is in use, the node info will be updated with position\n        meshtastic_NodeInfoLite *us = nodeDB->getMeshNode(nodeDB->getNodeNum());\n        fileToAppend.printf(\"%f,\", us->position.latitude_i * 1e-7);  // RX Lat\n        fileToAppend.printf(\"%f,\", us->position.longitude_i * 1e-7); // RX Long\n        fileToAppend.printf(\"%d,\", us->position.altitude);           // RX Altitude\n    }\n\n    fileToAppend.printf(\"%f,\", mp.rx_snr); // RX SNR\n\n    if (n->position.latitude_i && n->position.longitude_i && gpsStatus->getLatitude() && gpsStatus->getLongitude()) {\n        float distance = GeoCoord::latLongToMeter(n->position.latitude_i * 1e-7, n->position.longitude_i * 1e-7,\n                                                  gpsStatus->getLatitude() * 1e-7, gpsStatus->getLongitude() * 1e-7);\n        fileToAppend.printf(\"%f,\", distance); // Distance in meters\n    } else {\n        fileToAppend.printf(\"0,\");\n    }\n\n    fileToAppend.printf(\"%d,\", mp.hop_limit); // Packet Hop Limit\n\n    // TODO: If quotes are found in the payload, it has to be escaped.\n    fileToAppend.printf(\"\\\"%s\\\"\\n\", p.payload.bytes);\n    fileToAppend.printf(\"%i,\", mp.rx_rssi); // RX RSSI\n\n    fileToAppend.flush();\n    fileToAppend.close();\n\n    return 1;\n\n#else\n    LOG_ERROR(\"Failed to store range test results - feature only available for ESP32\");\n\n    return 0;\n#endif\n}\n\nbool RangeTestModuleRadio::removeFile()\n{\n#ifdef ARCH_ESP32\n    if (!FSBegin()) {\n        LOG_DEBUG(\"An Error has occurred while mounting the filesystem\");\n        return 0;\n    }\n\n    if (!FSCom.exists(\"/static/rangetest.csv\")) {\n        LOG_DEBUG(\"No range tests found.\");\n        return 0;\n    }\n\n    LOG_INFO(\"Deleting previous range test.\");\n    bool result = FSCom.remove(\"/static/rangetest.csv\");\n\n    if (!result) {\n        LOG_ERROR(\"Failed to delete range test.\");\n        return 0;\n    }\n    LOG_INFO(\"Range test removed.\");\n\n    return 1;\n#else\n    LOG_ERROR(\"Failed to remove range test results - feature only available for ESP32\");\n\n    return 0;\n#endif\n}"
  },
  {
    "path": "src/modules/RangeTestModule.h",
    "content": "#pragma once\n\n#include \"SinglePortModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <functional>\n\nclass RangeTestModule : private concurrency::OSThread\n{\n    bool firstTime = 1;\n    unsigned long started = 0;\n\n  public:\n    RangeTestModule();\n\n  protected:\n    virtual int32_t runOnce() override;\n};\n\nextern RangeTestModule *rangeTestModule;\n\n/*\n * Radio interface for RangeTestModule\n *\n */\nclass RangeTestModuleRadio : public SinglePortModule\n{\n    uint32_t lastRxID = 0;\n\n  public:\n    RangeTestModuleRadio() : SinglePortModule(\"RangeTestModuleRadio\", meshtastic_PortNum_RANGE_TEST_APP)\n    {\n        loopbackOk = true; // Allow locally generated messages to loop back to the client\n    }\n\n    /**\n     * Send our payload into the mesh\n     */\n    void sendPayload(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n    /**\n     * Append range test data to the file on the Filesystem\n     */\n    bool appendFile(const meshtastic_MeshPacket &mp);\n\n    /**\n     * Cleanup range test data from filesystem\n     */\n    bool removeFile();\n\n  protected:\n    /** Called to handle a particular incoming message\n\n    @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for\n    it\n    */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n};\n\nextern RangeTestModuleRadio *rangeTestModuleRadio;\n"
  },
  {
    "path": "src/modules/RemoteHardwareModule.cpp",
    "content": "#include \"RemoteHardwareModule.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include <Throttle.h>\n\n#define NUM_GPIOS 64\n\n// Because (FIXME) we currently don't tell API clients status on sent messages\n// we need to throttle our sending, so that if a gpio is bouncing up and down we\n// don't generate more messages than the net can send. So we limit watch messages to\n// a max of one change per 30 seconds\n#define WATCH_INTERVAL_MSEC (30 * 1000)\n\n// Tests for access to read from or write to a specified GPIO pin\nstatic bool pinAccessAllowed(uint64_t mask, uint8_t pin)\n{\n    // If undefined pin access is allowed, don't check the pin and just return true\n    if (moduleConfig.remote_hardware.allow_undefined_pin_access) {\n        return true;\n    }\n\n    // Test to see if the pin is in the list of allowed pins and return true if found\n    if (mask & (1ULL << pin)) {\n        return true;\n    }\n\n    return false;\n}\n\n/// Set pin modes for every set bit in a mask\nstatic void pinModes(uint64_t mask, uint8_t mode, uint64_t maskAvailable)\n{\n    for (uint64_t i = 0; i < NUM_GPIOS; i++) {\n        if (mask & (1ULL << i)) {\n            if (pinAccessAllowed(maskAvailable, i)) {\n                pinMode(i, mode);\n            }\n        }\n    }\n}\n\n/// Read all the pins mentioned in a mask\nstatic uint64_t digitalReads(uint64_t mask, uint64_t maskAvailable)\n{\n    uint64_t res = 0;\n\n    pinModes(mask, INPUT_PULLUP, maskAvailable);\n\n    for (uint64_t i = 0; i < NUM_GPIOS; i++) {\n        uint64_t m = 1ULL << i;\n        if (mask & m && pinAccessAllowed(maskAvailable, i)) {\n            if (digitalRead(i)) {\n                res |= m;\n            }\n        }\n    }\n\n    return res;\n}\n\nRemoteHardwareModule::RemoteHardwareModule()\n    : ProtobufModule(\"remotehardware\", meshtastic_PortNum_REMOTE_HARDWARE_APP, &meshtastic_HardwareMessage_msg),\n      concurrency::OSThread(\"RemoteHardware\")\n{\n    // restrict to the gpio channel for rx\n    boundChannel = Channels::gpioChannel;\n\n    // Pull available pin allowlist from config and build a bitmask out of it for fast comparisons later\n    for (uint8_t i = 0; i < 4; i++) {\n        availablePins += 1ULL << moduleConfig.remote_hardware.available_pins[i].gpio_pin;\n    }\n}\n\nbool RemoteHardwareModule::handleReceivedProtobuf(const meshtastic_MeshPacket &req, meshtastic_HardwareMessage *pptr)\n{\n    if (moduleConfig.remote_hardware.enabled) {\n        auto p = *pptr;\n        LOG_INFO(\"Received RemoteHardware type=%d\", p.type);\n\n        switch (p.type) {\n        case meshtastic_HardwareMessage_Type_WRITE_GPIOS: {\n            pinModes(p.gpio_mask, OUTPUT, availablePins);\n            for (uint8_t i = 0; i < NUM_GPIOS; i++) {\n                uint64_t mask = 1ULL << i;\n                if (p.gpio_mask & mask && pinAccessAllowed(availablePins, i)) {\n                    digitalWrite(i, (p.gpio_value & mask) ? 1 : 0);\n                }\n            }\n\n            break;\n        }\n\n        case meshtastic_HardwareMessage_Type_READ_GPIOS: {\n            uint64_t res = digitalReads(p.gpio_mask, availablePins);\n\n            // Send the reply\n            meshtastic_HardwareMessage r = meshtastic_HardwareMessage_init_default;\n            r.type = meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY;\n            r.gpio_value = res;\n            r.gpio_mask = p.gpio_mask;\n            meshtastic_MeshPacket *p2 = allocDataProtobuf(r);\n            setReplyTo(p2, req);\n            myReply = p2;\n            break;\n        }\n\n        case meshtastic_HardwareMessage_Type_WATCH_GPIOS: {\n            watchGpios = p.gpio_mask;\n            lastWatchMsec = 0; // Force a new publish soon\n            previousWatch =\n                ~watchGpios;   // generate a 'previous' value which is guaranteed to not match (to force an initial publish)\n            enabled = true;    // Let our thread run at least once\n            setInterval(2000); // Set a new interval so we'll run soon\n            LOG_INFO(\"Now watching GPIOs 0x%llx\", watchGpios);\n            break;\n        }\n\n        case meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY:\n        case meshtastic_HardwareMessage_Type_GPIOS_CHANGED:\n            break; // Ignore - we might see our own replies\n\n        default:\n            LOG_ERROR(\"Hardware operation %d not yet implemented! FIXME\", p.type);\n            break;\n        }\n    }\n\n    return false;\n}\n\nint32_t RemoteHardwareModule::runOnce()\n{\n    if (moduleConfig.remote_hardware.enabled && watchGpios) {\n\n        if (!Throttle::isWithinTimespanMs(lastWatchMsec, WATCH_INTERVAL_MSEC)) {\n            uint64_t curVal = digitalReads(watchGpios, availablePins);\n            lastWatchMsec = millis();\n\n            if (curVal != previousWatch) {\n                previousWatch = curVal;\n                LOG_INFO(\"Broadcast GPIOS 0x%llx changed!\", curVal);\n\n                // Something changed!  Tell the world with a broadcast message\n                meshtastic_HardwareMessage r = meshtastic_HardwareMessage_init_default;\n                r.type = meshtastic_HardwareMessage_Type_GPIOS_CHANGED;\n                r.gpio_value = curVal;\n                meshtastic_MeshPacket *p = allocDataProtobuf(r);\n                service->sendToMesh(p);\n            }\n        }\n    } else {\n        // No longer watching anything - stop using CPU\n        return disable();\n    }\n\n    return 2000; // Poll our GPIOs every 2000ms\n}"
  },
  {
    "path": "src/modules/RemoteHardwareModule.h",
    "content": "#pragma once\n#include \"ProtobufModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"mesh/generated/meshtastic/remote_hardware.pb.h\"\n\n/**\n * A module that provides easy low-level remote access to device hardware.\n */\nclass RemoteHardwareModule : public ProtobufModule<meshtastic_HardwareMessage>, private concurrency::OSThread\n{\n    /// The current set of GPIOs we've been asked to watch for changes\n    uint64_t watchGpios = 0;\n\n    /// The previously read value of watched pins\n    uint64_t previousWatch = 0;\n\n    /// The timestamp of our last watch event (we throttle watches to 1 change every 30 seconds)\n    uint32_t lastWatchMsec = 0;\n\n    /// A bitmask of GPIOs that are exposed to the mesh if undefined access is not enabled\n    uint64_t availablePins = 0;\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    RemoteHardwareModule();\n\n  protected:\n    /** Called to handle a particular incoming message\n\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_HardwareMessage *p) override;\n\n    /**\n     * Periodically read the gpios we have been asked to WATCH, if they have changed,\n     * broadcast a message with the change information.\n     *\n     * The method that will be called each time our thread gets a chance to run\n     *\n     * Returns desired period for next invocation (or RUN_SAME for no change)\n     */\n    virtual int32_t runOnce() override;\n};\n\nextern RemoteHardwareModule remoteHardwareModule;\n"
  },
  {
    "path": "src/modules/ReplyBotModule.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_REPLYBOT\n/*\n * ReplyBotModule.cpp\n *\n * This module implements a simple reply bot for the Meshtastic firmware.  It listens for\n * specific text commands (\"/ping\", \"/hello\" and \"/test\") delivered either via a direct\n * message (DM) or a broadcast on the primary channel.  When a supported command is\n * received the bot responds with a short status message that includes the hop count\n * (minimum number of relays), RSSI and SNR of the received packet.  To avoid spamming\n * the network it enforces a per‑sender cooldown between responses.  By default the\n * module is disabled. See the official firmware documentation for guidance on adding modules.\n * To enable this module, set `#undef MESHTASTIC_EXCLUDE_REPLYBOT` in your variant.h file.\n */\n\n#include \"Channels.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"ReplyBotModule.h\"\n#include \"mesh/MeshTypes.h\"\n\n#include <Arduino.h>\n#include <cctype>\n#include <cstring>\n\n//\n// Rate limiting data structures\n//\n// Each sender is tracked in a small ring buffer.  When a message arrives from a\n// sender we check the last time we responded to them.  If the difference is\n// less than the configured cooldown (different values for DM vs broadcast)\n// the message is ignored; otherwise we update the last response time and\n// proceed with replying.\n\nstruct ReplyBotCooldownEntry {\n    uint32_t from = 0;\n    uint32_t lastMs = 0;\n};\n\nstatic constexpr uint8_t REPLYBOT_COOLDOWN_SLOTS = 8;          // ring buffer size\nstatic constexpr uint32_t REPLYBOT_DM_COOLDOWN_MS = 15 * 1000; // 15 seconds for DMs\nstatic constexpr uint32_t REPLYBOT_LF_COOLDOWN_MS = 60 * 1000; // 60 seconds for LongFast broadcasts\n\nstatic ReplyBotCooldownEntry replybotCooldown[REPLYBOT_COOLDOWN_SLOTS];\nstatic uint8_t replybotCooldownIdx = 0;\n\n// Return true if a reply should be rate‑limited for this sender, updating the\n// entry table as needed.\nstatic bool replybotRateLimited(uint32_t from, uint32_t cooldownMs)\n{\n    const uint32_t now = millis();\n    for (auto &e : replybotCooldown) {\n        if (e.from == from) {\n            // Found existing entry; check if cooldown expired\n            if ((uint32_t)(now - e.lastMs) < cooldownMs) {\n                return true;\n            }\n            e.lastMs = now;\n            return false;\n        }\n    }\n    // No entry found – insert new sender into the ring\n    replybotCooldown[replybotCooldownIdx].from = from;\n    replybotCooldown[replybotCooldownIdx].lastMs = now;\n    replybotCooldownIdx = (replybotCooldownIdx + 1) % REPLYBOT_COOLDOWN_SLOTS;\n    return false;\n}\n\n// Constructor – registers a single text port and marks the module promiscuous\n// so that broadcast messages on the primary channel are visible.\nReplyBotModule::ReplyBotModule() : SinglePortModule(\"replybot\", meshtastic_PortNum_TEXT_MESSAGE_APP)\n{\n    isPromiscuous = true;\n}\n\nvoid ReplyBotModule::setup()\n{\n    // In future we may add a protobuf configuration; for now the module is\n    // always enabled when compiled in.\n}\n\n// Determine whether we want to process this packet.  We only care about\n// plain text messages addressed to our port.\nbool ReplyBotModule::wantPacket(const meshtastic_MeshPacket *p)\n{\n    return (p && p->decoded.portnum == ourPortNum);\n}\n\nProcessMessage ReplyBotModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    // Accept only direct messages to us or broadcasts on the Primary channel\n    // (regardless of modem preset: LongFast, MediumFast, etc).\n\n    const uint32_t ourNode = nodeDB->getNodeNum();\n    const bool isDM = (mp.to == ourNode);\n    const bool isPrimaryChannel = (mp.channel == channels.getPrimaryIndex()) && isBroadcast(mp.to);\n    if (!isDM && !isPrimaryChannel) {\n        return ProcessMessage::CONTINUE;\n    }\n\n    // Ignore empty payloads\n    if (mp.decoded.payload.size == 0) {\n        return ProcessMessage::CONTINUE;\n    }\n\n    // Copy payload into a null‑terminated buffer\n    char buf[260];\n    memset(buf, 0, sizeof(buf));\n    size_t n = mp.decoded.payload.size;\n    if (n > sizeof(buf) - 1)\n        n = sizeof(buf) - 1;\n    memcpy(buf, mp.decoded.payload.bytes, n);\n\n    // React only to supported slash commands\n    if (!isCommand(buf)) {\n        return ProcessMessage::CONTINUE;\n    }\n\n    // Apply rate limiting per sender depending on DM/broadcast\n    const uint32_t cooldownMs = isDM ? REPLYBOT_DM_COOLDOWN_MS : REPLYBOT_LF_COOLDOWN_MS;\n    if (replybotRateLimited(mp.from, cooldownMs)) {\n        return ProcessMessage::CONTINUE;\n    }\n\n    // Compute hop count indicator – if the relay_node is non‑zero we know\n    // there was at least one relay.  Some firmware builds support a hop_start\n    // field which could be used for more accurate counts, but here we use\n    // the available relay_node flag only.\n    // int hopsAway = mp.hop_start - mp.hop_limit;\n    int hopsAway = getHopsAway(mp);\n\n    // Normalize RSSI: if positive adjust down by 200 to align with typical values\n    int rssi = mp.rx_rssi;\n    if (rssi > 0) {\n        rssi -= 200;\n    }\n    float snr = mp.rx_snr;\n\n    // Build the reply message and send it back via DM\n    char reply[96];\n    snprintf(reply, sizeof(reply), \"🎙️ Mic Check : %d Hops away | RSSI %d | SNR %.1f\", hopsAway, rssi, snr);\n    sendDm(mp, reply);\n    return ProcessMessage::CONTINUE;\n}\n\n// Check if the message starts with one of the supported commands.  Leading\n// whitespace is skipped and commands must be followed by end‑of‑string or\n// whitespace.\nbool ReplyBotModule::isCommand(const char *msg) const\n{\n    if (!msg)\n        return false;\n    while (*msg == ' ' || *msg == '\\t')\n        msg++;\n    auto isEndOrSpace = [](char c) { return c == '\\0' || std::isspace(static_cast<unsigned char>(c)); };\n    if (strncmp(msg, \"/ping\", 5) == 0 && isEndOrSpace(msg[5]))\n        return true;\n    if (strncmp(msg, \"/hello\", 6) == 0 && isEndOrSpace(msg[6]))\n        return true;\n    if (strncmp(msg, \"/test\", 5) == 0 && isEndOrSpace(msg[5]))\n        return true;\n    return false;\n}\n\n// Send a direct message back to the originating node.\nvoid ReplyBotModule::sendDm(const meshtastic_MeshPacket &rx, const char *text)\n{\n    if (!text)\n        return;\n    meshtastic_MeshPacket *p = allocDataPacket();\n    p->to = rx.from;\n    p->channel = rx.channel;\n    p->want_ack = false;\n    p->decoded.want_response = false;\n    size_t len = strlen(text);\n    if (len > sizeof(p->decoded.payload.bytes)) {\n        len = sizeof(p->decoded.payload.bytes);\n    }\n    p->decoded.payload.size = len;\n    memcpy(p->decoded.payload.bytes, text, len);\n    service->sendToMesh(p);\n}\n#endif // MESHTASTIC_EXCLUDE_REPLYBOT"
  },
  {
    "path": "src/modules/ReplyBotModule.h",
    "content": "#pragma once\n#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_REPLYBOT\n#include \"SinglePortModule.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n\nclass ReplyBotModule : public SinglePortModule\n{\n  public:\n    ReplyBotModule();\n    void setup() override;\n    bool wantPacket(const meshtastic_MeshPacket *p) override;\n    ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n  protected:\n    bool isCommand(const char *msg) const;\n    void sendDm(const meshtastic_MeshPacket &rx, const char *text);\n};\n#endif // MESHTASTIC_EXCLUDE_REPLYBOT"
  },
  {
    "path": "src/modules/ReplyModule.cpp",
    "content": "#include \"ReplyModule.h\"\n#include \"MeshService.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n\n#include <assert.h>\n\nmeshtastic_MeshPacket *ReplyModule::allocReply()\n{\n    assert(currentRequest); // should always be !NULL\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n    auto req = *currentRequest;\n    auto &p = req.decoded;\n    // The incoming message is in p.payload\n    LOG_INFO(\"Received message from=0x%0x, id=%d, msg=%.*s\", req.from, req.id, p.payload.size, p.payload.bytes);\n#endif\n\n    const char *replyStr = \"Message Received\";\n    auto reply = allocDataPacket();                 // Allocate a packet for sending\n    reply->decoded.payload.size = strlen(replyStr); // You must specify how many bytes are in the reply\n    memcpy(reply->decoded.payload.bytes, replyStr, reply->decoded.payload.size);\n\n    return reply;\n}\n"
  },
  {
    "path": "src/modules/ReplyModule.h",
    "content": "#pragma once\n#include \"SinglePortModule.h\"\n\n/**\n * A simple example module that just replies with \"Message received\" to any message it receives.\n */\nclass ReplyModule : public SinglePortModule\n{\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    ReplyModule() : SinglePortModule(\"reply\", meshtastic_PortNum_REPLY_APP) {}\n\n  protected:\n    /** For reply module we do all of our processing in the (normally optional)\n     * want_replies handling\n     */\n    virtual meshtastic_MeshPacket *allocReply() override;\n};\n"
  },
  {
    "path": "src/modules/RoutingModule.cpp",
    "content": "#include \"RoutingModule.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"Router.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n\nRoutingModule *routingModule;\n\nbool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Routing *r)\n{\n    bool maybePKI = mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag && mp.channel == 0 && !isBroadcast(mp.to);\n    // Beginning of logic whether to drop the packet based on Rebroadcast mode\n    if (mp.which_payload_variant == meshtastic_MeshPacket_encrypted_tag &&\n        (config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_LOCAL_ONLY ||\n         config.device.rebroadcast_mode == meshtastic_Config_DeviceConfig_RebroadcastMode_KNOWN_ONLY)) {\n        if (!maybePKI)\n            return false;\n        if ((nodeDB->getMeshNode(mp.from) == NULL || !nodeDB->getMeshNode(mp.from)->has_user) &&\n            (nodeDB->getMeshNode(mp.to) == NULL || !nodeDB->getMeshNode(mp.to)->has_user))\n            return false;\n    } else if (owner.is_licensed && nodeDB->getLicenseStatus(mp.from) == UserLicenseStatus::NotLicensed) {\n        // Don't let licensed users to rebroadcast packets from unlicensed users\n        // If we know they are in-fact unlicensed\n        LOG_DEBUG(\"Packet from unlicensed user, ignoring packet\");\n        return false;\n    }\n\n    printPacket(\"Routing sniffing\", &mp);\n    router->sniffReceived(&mp, r);\n\n    // FIXME - move this to a non promsicious PhoneAPI module?\n    // Note: we are careful not to send back packets that started with the phone back to the phone\n    if ((isBroadcast(mp.to) || isToUs(&mp)) && (mp.from != 0)) {\n        printPacket(\"Delivering rx packet\", &mp);\n        service->handleFromRadio(&mp);\n    }\n\n    return false; // Let others look at this message also if they want\n}\n\nmeshtastic_MeshPacket *RoutingModule::allocReply()\n{\n    assert(currentRequest);\n\n    return NULL;\n}\n\nvoid RoutingModule::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit,\n                               bool ackWantsAck)\n{\n    auto p = allocAckNak(err, to, idFrom, chIndex, hopLimit);\n\n    // Allow the caller to set want_ack on this ACK packet if it's important that the ACK be delivered reliably\n    p->want_ack = ackWantsAck;\n\n    router->sendLocal(p); // we sometimes send directly to the local node\n}\n\nuint8_t RoutingModule::getHopLimitForResponse(const meshtastic_MeshPacket &mp)\n{\n    const int8_t hopsUsed = getHopsAway(mp);\n    if (hopsUsed >= 0) {\n        if (hopsUsed > (int32_t)(config.lora.hop_limit)) {\n// In event mode, we never want to send packets with more than our default 3 hops.\n#if !(EVENTMODE)             // This falls through to the default.\n            return hopsUsed; // If the request used more hops than the limit, use the same amount of hops\n#endif\n        } else if (mp.hop_start == 0) {\n            return 0; // The requesting node wanted 0 hops, so the response also uses a direct/local path.\n        } else if ((uint8_t)(hopsUsed + 2) < config.lora.hop_limit) {\n            return hopsUsed + 2; // Use only the amount of hops needed with some margin as the way back may be different\n        }\n    }\n    return Default::getConfiguredOrDefaultHopLimit(config.lora.hop_limit); // Use the default hop limit\n}\n\nmeshtastic_MeshPacket *RoutingModule::allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex,\n                                                  uint8_t hopLimit)\n{\n    return MeshModule::allocAckNak(err, to, idFrom, chIndex, hopLimit);\n}\n\nRoutingModule::RoutingModule() : ProtobufModule(\"routing\", meshtastic_PortNum_ROUTING_APP, &meshtastic_Routing_msg)\n{\n    isPromiscuous = true;\n\n    // moved the RebroadcastMode logic into handleReceivedProtobuf\n    // LocalOnly requires either the from or to to be a known node\n    // knownOnly specifically requires the from to be a known node.\n    encryptedOk = true;\n}"
  },
  {
    "path": "src/modules/RoutingModule.h",
    "content": "#pragma once\n#include \"Channels.h\"\n#include \"ProtobufModule.h\"\n\n/**\n * Routing module for router control messages\n */\nclass RoutingModule : public ProtobufModule<meshtastic_Routing>\n{\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    RoutingModule();\n\n    virtual void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit = 0,\n                            bool ackWantsAck = false);\n\n    meshtastic_MeshPacket *allocAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex,\n                                       uint8_t hopLimit = 0);\n\n    // Given the hopStart and hopLimit upon reception of a request, return the hop limit to use for the response\n    uint8_t getHopLimitForResponse(const meshtastic_MeshPacket &mp);\n\n  protected:\n    friend class Router;\n\n    /** Called to handle a particular incoming message\n\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Routing *p) override;\n\n    /** Messages can be received that have the want_response bit set.  If set, this callback will be invoked\n     * so that subclasses can (optionally) send a response back to the original sender.  */\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n    /// Override wantPacket to say we want to see all packets, not just those for our port number\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return true; }\n};\n\nextern RoutingModule *routingModule;"
  },
  {
    "path": "src/modules/SerialModule.cpp",
    "content": "#include \"SerialModule.h\"\n#include \"GeoCoord.h\"\n#include \"MeshService.h\"\n#include \"NMEAWPL.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <Throttle.h>\n\n/*\n    SerialModule\n        A simple interface to send messages over the mesh network by sending strings\n        over a serial port.\n\n        There are no PIN defaults, you have to enable the second serial port yourself.\n\n    Need help with this module? Post your question on the Meshtastic Discourse:\n       https://meshtastic.discourse.group\n\n    Basic Usage:\n\n        1) Enable the module by setting enabled to 1.\n        2) Set the pins (rxd / rxd) for your preferred RX and TX GPIO pins.\n           On tbeam, recommend to use:\n                RXD 35\n                TXD 15\n        3) Set timeout to the amount of time to wait before we consider\n           your packet as \"done\".\n        4) not applicable any more\n        5) Connect to your device over the serial interface at 38400 8N1.\n        6) Send a packet up to 240 bytes in length. This will get relayed over the mesh network.\n        7) (Optional) Set echo to 1 and any message you send out will be echoed back\n           to your device.\n\n    TODO (in this order):\n        * Define a verbose RX mode to report on mesh and packet information.\n            - This won't happen any time soon.\n\n    KNOWN PROBLEMS\n        * Until the module is initialized by the startup sequence, the TX pin is in a floating\n          state. Device connected to that pin may see this as \"noise\".\n        * Will not work on Linux device targets.\n\n\n*/\n#ifdef HELTEC_MESH_SOLAR\n#include \"meshSolarApp.h\"\n#endif\n\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) || defined(ARCH_STM32WL)) &&                             \\\n    !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)\n\n#define RX_BUFFER 256\n#define TIMEOUT 250\n#define BAUD 38400\n#define ACK 1\n\n// API: Defaulting to the formerly removed phone_timeout_secs value of 15 minutes\n#define SERIAL_CONNECTION_TIMEOUT (15 * 60) * 1000UL\n\nSerialModule *serialModule;\nSerialModuleRadio *serialModuleRadio;\n\n#ifndef SERIAL_PRINT_PORT\n#define SERIAL_PRINT_PORT 2\n#endif\n\n#if SERIAL_PRINT_PORT == 0\n#define SERIAL_PRINT_OBJECT Serial\n#elif SERIAL_PRINT_PORT == 1\n#define SERIAL_PRINT_OBJECT Serial1\n#elif SERIAL_PRINT_PORT == 2\n#define SERIAL_PRINT_OBJECT Serial2\n#else\n#error \"Unsupported SERIAL_PRINT_PORT value. Allowed values are 0, 1, or 2.\"\n#endif\n\nSerialModule::SerialModule() : StreamAPI(&SERIAL_PRINT_OBJECT), concurrency::OSThread(\"Serial\")\n{\n    api_type = TYPE_SERIAL;\n}\nstatic Print *serialPrint = &SERIAL_PRINT_OBJECT;\n\nchar serialBytes[512];\nsize_t serialPayloadSize;\n\nbool SerialModule::isValidConfig(const meshtastic_ModuleConfig_SerialConfig &config)\n{\n    if (config.override_console_serial_port && !IS_ONE_OF(config.mode, meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA,\n                                                          meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO,\n                                                          meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) {\n        const char *warning =\n            \"Invalid Serial config: override console serial port is only supported in NMEA and CalTopo output-only modes.\";\n        LOG_ERROR(warning);\n#if !IS_RUNNING_TESTS\n        meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n        cn->level = meshtastic_LogRecord_Level_ERROR;\n        cn->time = getValidTime(RTCQualityFromNet);\n        snprintf(cn->message, sizeof(cn->message), \"%s\", warning);\n        service->sendClientNotification(cn);\n#endif\n        return false;\n    }\n\n    return true;\n}\n\nSerialModuleRadio::SerialModuleRadio() : MeshModule(\"SerialModuleRadio\")\n{\n    switch (moduleConfig.serial.mode) {\n    case meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG:\n        ourPortNum = meshtastic_PortNum_TEXT_MESSAGE_APP;\n        break;\n    case meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA:\n    case meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO:\n        ourPortNum = meshtastic_PortNum_POSITION_APP;\n        break;\n    default:\n        ourPortNum = meshtastic_PortNum_SERIAL_APP;\n        // restrict to the serial channel for rx\n        boundChannel = Channels::serialChannel;\n        break;\n    }\n}\n\n/**\n * @brief Checks if the serial connection is established.\n *\n * @return true if the serial connection is established, false otherwise.\n *\n * For the serial2 port we can't really detect if any client is on the other side, so instead just look for recent messages\n */\nbool SerialModule::checkIsConnected()\n{\n    return Throttle::isWithinTimespanMs(lastContactMsec, SERIAL_CONNECTION_TIMEOUT);\n}\n\nint32_t SerialModule::runOnce()\n{\n    /*\n        Uncomment the preferences below if you want to use the module\n        without having to configure it from the PythonAPI or WebUI.\n    */\n\n    // moduleConfig.serial.enabled = true;\n    // moduleConfig.serial.rxd = 35;\n    // moduleConfig.serial.txd = 15;\n    // moduleConfig.serial.override_console_serial_port = true;\n    // moduleConfig.serial.mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO;\n    // moduleConfig.serial.timeout = 1000;\n    // moduleConfig.serial.echo = 1;\n\n    if (!moduleConfig.serial.enabled)\n        return disable();\n\n    if (moduleConfig.serial.override_console_serial_port || (moduleConfig.serial.rxd && moduleConfig.serial.txd)) {\n        if (firstTime) {\n            // Interface with the serial peripheral from in here.\n            LOG_INFO(\"Init serial peripheral interface\");\n\n            uint32_t baud = getBaudRate();\n\n            if (moduleConfig.serial.override_console_serial_port) {\n#ifdef RP2040_SLOW_CLOCK\n                Serial2.flush();\n                serialPrint = &Serial2;\n#else\n                Serial.flush();\n                serialPrint = &Serial;\n#endif\n                // Give it a chance to flush out 💩\n                delay(10);\n            }\n#if defined(CONFIG_IDF_TARGET_ESP32C6)\n            if (moduleConfig.serial.rxd && moduleConfig.serial.txd) {\n                Serial1.setRxBufferSize(RX_BUFFER);\n                Serial1.begin(baud, SERIAL_8N1, moduleConfig.serial.rxd, moduleConfig.serial.txd);\n            } else {\n                Serial.begin(baud);\n                Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);\n            }\n#elif defined(ARCH_STM32WL)\n#ifndef RAK3172\n            HardwareSerial *serialInstance = &Serial2;\n#else\n            HardwareSerial *serialInstance = &Serial1;\n#endif\n            if (moduleConfig.serial.rxd && moduleConfig.serial.txd) {\n                serialInstance->setTx(moduleConfig.serial.txd);\n                serialInstance->setRx(moduleConfig.serial.rxd);\n            }\n            serialInstance->begin(baud);\n            serialInstance->setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);\n#elif defined(ARCH_ESP32)\n\n            if (moduleConfig.serial.rxd && moduleConfig.serial.txd) {\n                Serial2.setRxBufferSize(RX_BUFFER);\n                Serial2.begin(baud, SERIAL_8N1, moduleConfig.serial.rxd, moduleConfig.serial.txd);\n            } else {\n                Serial.begin(baud);\n                Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);\n            }\n#elif SERIAL_PRINT_PORT != 0\n\n            if (moduleConfig.serial.rxd && moduleConfig.serial.txd) {\n#ifdef ARCH_RP2040\n                Serial2.setFIFOSize(RX_BUFFER);\n                Serial2.setPinout(moduleConfig.serial.txd, moduleConfig.serial.rxd);\n#else\n                Serial2.setPins(moduleConfig.serial.rxd, moduleConfig.serial.txd);\n#endif\n                Serial2.begin(baud, SERIAL_8N1);\n                Serial2.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);\n            } else {\n#ifdef RP2040_SLOW_CLOCK\n                Serial2.begin(baud, SERIAL_8N1);\n                Serial2.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);\n#else\n                Serial.begin(baud, SERIAL_8N1);\n                Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);\n#endif\n            }\n#else\n            Serial.begin(baud, SERIAL_8N1);\n            Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);\n#endif\n            serialModuleRadio = new SerialModuleRadio();\n\n            firstTime = 0;\n\n            // in API mode send rebooted sequence\n            if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO) {\n                emitRebooted();\n            }\n        } else {\n            if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO) {\n                return runOncePart();\n            } else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA) && HAS_GPS) {\n                // in NMEA mode send out GGA every 2 seconds, Don't read from Port\n                if (!Throttle::isWithinTimespanMs(lastNmeaTime, 2000)) {\n                    lastNmeaTime = millis();\n                    printGGA(outbuf, sizeof(outbuf), localPosition);\n                    serialPrint->printf(\"%s\", outbuf);\n                }\n            } else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO) && HAS_GPS) {\n                if (!Throttle::isWithinTimespanMs(lastNmeaTime, 10000)) {\n                    lastNmeaTime = millis();\n                    uint32_t readIndex = 0;\n                    const meshtastic_NodeInfoLite *tempNodeInfo = nodeDB->readNextMeshNode(readIndex);\n                    while (tempNodeInfo != NULL) {\n                        if (tempNodeInfo->has_user && nodeDB->hasValidPosition(tempNodeInfo)) {\n                            printWPL(outbuf, sizeof(outbuf), tempNodeInfo->position, tempNodeInfo->user.long_name, true);\n                            serialPrint->printf(\"%s\", outbuf);\n                        }\n                        tempNodeInfo = nodeDB->readNextMeshNode(readIndex);\n                    }\n                }\n            }\n\n#if SERIAL_PRINT_PORT != 0\n            else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85)) {\n                processWXSerial();\n\n            }\n#if defined(HELTEC_MESH_SOLAR)\n            else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG)) {\n                serialPayloadSize = Serial.readBytes(serialBytes, sizeof(serialBytes) - 1);\n                // If the parsing fails, the following parsing will be performed.\n                if ((serialPayloadSize > 0) && (meshSolarCmdHandle(serialBytes) != 0)) {\n                    return runOncePart(serialBytes, serialPayloadSize);\n                }\n            }\n#endif\n            else {\n#if defined(CONFIG_IDF_TARGET_ESP32C6)\n                while (Serial1.available()) {\n                    serialPayloadSize = Serial1.readBytes(serialBytes, meshtastic_Constants_DATA_PAYLOAD_LEN);\n#else\n#ifndef RAK3172\n                HardwareSerial *serialInstance = &Serial2;\n#else\n                HardwareSerial *serialInstance = &Serial1;\n#endif\n                while (serialInstance->available()) {\n                    serialPayloadSize = serialInstance->readBytes(serialBytes, meshtastic_Constants_DATA_PAYLOAD_LEN);\n#endif\n                    serialModuleRadio->sendPayload();\n                }\n            }\n#endif\n        }\n        return (10);\n    } else {\n        return disable();\n    }\n}\n\n/**\n * Sends telemetry packet over the mesh network.\n *\n * @param m The telemetry data to be sent\n *\n * @return void\n *\n * @throws None\n */\nvoid SerialModule::sendTelemetry(meshtastic_Telemetry m)\n{\n    meshtastic_MeshPacket *p = router->allocForSending();\n    p->decoded.portnum = meshtastic_PortNum_TELEMETRY_APP;\n    p->decoded.payload.size =\n        pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Telemetry_msg, &m);\n    p->to = NODENUM_BROADCAST;\n    p->decoded.want_response = false;\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) {\n        p->want_ack = true;\n        p->priority = meshtastic_MeshPacket_Priority_HIGH;\n    } else {\n        p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n    }\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n}\n\n/**\n * Allocates a new mesh packet for use as a reply to a received packet.\n *\n * @return A pointer to the newly allocated mesh packet.\n */\nmeshtastic_MeshPacket *SerialModuleRadio::allocReply()\n{\n    auto reply = allocDataPacket(); // Allocate a packet for sending\n\n    return reply;\n}\n\n/**\n * Sends a payload to a specified destination node.\n *\n * @param dest The destination node number.\n * @param wantReplies Whether or not to request replies from the destination node.\n */\nvoid SerialModuleRadio::sendPayload(NodeNum dest, bool wantReplies)\n{\n    const meshtastic_Channel *ch = (boundChannel != NULL) ? &channels.getByName(boundChannel) : NULL;\n    meshtastic_MeshPacket *p = allocReply();\n    p->to = dest;\n    if (ch != NULL) {\n        p->channel = ch->index;\n    }\n    p->decoded.want_response = wantReplies;\n\n    p->want_ack = ACK;\n\n    p->decoded.payload.size = serialPayloadSize; // You must specify how many bytes are in the reply\n    memcpy(p->decoded.payload.bytes, serialBytes, p->decoded.payload.size);\n\n    service->sendToMesh(p);\n}\n\n/**\n * Handle a received mesh packet.\n *\n * @param mp The received mesh packet.\n * @return The processed message.\n */\nProcessMessage SerialModuleRadio::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    if (moduleConfig.serial.enabled) {\n        if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO) {\n            // in API mode we don't care about stuff from radio.\n            return ProcessMessage::CONTINUE;\n        }\n\n        auto &p = mp.decoded;\n        // LOG_DEBUG(\"Received text msg self=0x%0x, from=0x%0x, to=0x%0x, id=%d, msg=%.*s\",\n        //          nodeDB->getNodeNum(), mp.from, mp.to, mp.id, p.payload.size, p.payload.bytes);\n\n        if (isFromUs(&mp)) {\n\n            /*\n             * If moduleConfig.serial.echo is true, then echo the packets that are sent out\n             * back to the TX of the serial interface.\n             */\n            if (moduleConfig.serial.echo) {\n\n                // For some reason, we get the packet back twice when we send out of the radio.\n                //   TODO: need to find out why.\n                if (lastRxID != mp.id) {\n                    lastRxID = mp.id;\n                    // LOG_DEBUG(\"* * Message came this device\");\n                    // serialPrint->println(\"* * Message came this device\");\n                    serialPrint->printf(\"%s\", p.payload.bytes);\n                }\n            }\n        } else {\n\n            if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT ||\n                moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE) {\n                serialPrint->write(p.payload.bytes, p.payload.size);\n            } else if (moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG) {\n                meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(getFrom(&mp));\n                const char *sender = (node && node->has_user) ? node->user.short_name : \"???\";\n                serialPrint->println();\n                serialPrint->printf(\"%s: %s\", sender, p.payload.bytes);\n                serialPrint->println();\n            } else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA ||\n                        moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO) &&\n                       HAS_GPS) {\n                // Decode the Payload some more\n                meshtastic_Position scratch;\n                meshtastic_Position *decoded = NULL;\n                if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag && mp.decoded.portnum == ourPortNum) {\n                    memset(&scratch, 0, sizeof(scratch));\n                    if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Position_msg, &scratch)) {\n                        decoded = &scratch;\n                    }\n                    // send position packet as WPL to the serial port\n                    printWPL(outbuf, sizeof(outbuf), *decoded, nodeDB->getMeshNode(getFrom(&mp))->user.long_name,\n                             moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO);\n                    serialPrint->printf(\"%s\", outbuf);\n                }\n            }\n        }\n    }\n    return ProcessMessage::CONTINUE; // Let others look at this message also if they want\n}\n\n/**\n * @brief Returns the baud rate of the serial module from the module configuration.\n *\n * @return uint32_t The baud rate of the serial module.\n */\nuint32_t SerialModule::getBaudRate()\n{\n    if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_110) {\n        return 110;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_300) {\n        return 300;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_600) {\n        return 600;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_1200) {\n        return 1200;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_2400) {\n        return 2400;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_4800) {\n        return 4800;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_9600) {\n        return 9600;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_19200) {\n        return 19200;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_38400) {\n        return 38400;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_57600) {\n        return 57600;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_115200) {\n        return 115200;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_230400) {\n        return 230400;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_460800) {\n        return 460800;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_576000) {\n        return 576000;\n    } else if (moduleConfig.serial.baud == meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600) {\n        return 921600;\n    }\n    return BAUD;\n}\n\n// Add this structure to help with parsing WindGust =       24.4 serial lines.\nstruct ParsedLine {\n    char name[64];\n    char value[128];\n};\n\n/**\n * Parse a line of format \"Name = Value\" into name/value pair\n * @param line Input line to parse\n * @return ParsedLine containing name and value, or empty strings if parse failed\n */\nParsedLine parseLine(const char *line)\n{\n    ParsedLine result = {\"\", \"\"};\n\n    // Find equals sign\n    const char *equals = strchr(line, '=');\n    if (!equals) {\n        return result;\n    }\n\n    // Extract name by copying substring\n    char nameBuf[64]; // Temporary buffer\n    size_t nameLen = equals - line;\n    if (nameLen >= sizeof(nameBuf)) {\n        nameLen = sizeof(nameBuf) - 1;\n    }\n    strncpy(nameBuf, line, nameLen);\n    nameBuf[nameLen] = '\\0';\n\n    // Trim whitespace from name\n    char *nameStart = nameBuf;\n    while (*nameStart && isspace(*nameStart))\n        nameStart++;\n    char *nameEnd = nameStart + strlen(nameStart) - 1;\n    while (nameEnd > nameStart && isspace(*nameEnd))\n        *nameEnd-- = '\\0';\n\n    // Copy trimmed name\n    strncpy(result.name, nameStart, sizeof(result.name) - 1);\n    result.name[sizeof(result.name) - 1] = '\\0';\n\n    // Extract value part (after equals)\n    const char *valueStart = equals + 1;\n    while (*valueStart && isspace(*valueStart))\n        valueStart++;\n    strncpy(result.value, valueStart, sizeof(result.value) - 1);\n    result.value[sizeof(result.value) - 1] = '\\0';\n\n    // Trim trailing whitespace from value\n    char *valueEnd = result.value + strlen(result.value) - 1;\n    while (valueEnd > result.value && isspace(*valueEnd))\n        *valueEnd-- = '\\0';\n\n    return result;\n}\n\n/**\n * Process the received weather station serial data, extract wind, voltage, and temperature information,\n * calculate averages and send telemetry data over the mesh network.\n *\n * @return void\n */\nvoid SerialModule::processWXSerial()\n{\n#if SERIAL_PRINT_PORT != 0 && !defined(ARCH_STM32WL) && !defined(CONFIG_IDF_TARGET_ESP32C6)\n\n    static unsigned int lastAveraged = 0;\n    static unsigned int averageIntervalMillis = 300000; // 5 minutes hard coded.\n    static double dir_sum_sin = 0;\n    static double dir_sum_cos = 0;\n    static float velSum = 0;\n    static float gust = 0;\n    static float lull = -1;\n    static int velCount = 0;\n    static int dirCount = 0;\n    static char windDir[4] = \"xxx\";   // Assuming windDir is 3 characters long + null terminator\n    static char windVel[5] = \"xx.x\";  // Assuming windVel is 4 characters long + null terminator\n    static char windGust[5] = \"xx.x\"; // Assuming windGust is 4 characters long + null terminator\n    static char batVoltage[5] = \"0.0V\";\n    static char capVoltage[5] = \"0.0V\";\n    static char temperature[5] = \"00.0\";\n    static float batVoltageF = 0;\n    static float capVoltageF = 0;\n    static float temperatureF = 0;\n\n    static char rainStr[] = \"5780860000\";\n    static int rainSum = 0;\n    static float rain = 0;\n    bool gotwind = false;\n\n    while (Serial2.available()) {\n        // clear serialBytes buffer\n        memset(serialBytes, '\\0', sizeof(serialBytes));\n        // memset(formattedString, '\\0', sizeof(formattedString));\n        serialPayloadSize = Serial2.readBytes(serialBytes, 512);\n        // check for a strings we care about\n        // example output of serial data fields from the WS85\n        // WindDir      = 79\n        // WindSpeed    = 0.5\n        // WindGust     = 0.6\n        // GXTS04Temp   = 24.4\n        // Temperature = 23.4 // WS80\n\n        // RainIntSum     = 0\n        // Rain           = 0.0\n        if (serialPayloadSize > 0) {\n            // Define variables for line processing\n            int lineStart = 0;\n            int lineEnd = -1;\n\n            // Process each byte in the received data\n            for (size_t i = 0; i < serialPayloadSize; i++) {\n                // go until we hit the end of line and then process the line\n                if (serialBytes[i] == '\\n') {\n                    lineEnd = i;\n                    // Extract the current line\n                    char line[meshtastic_Constants_DATA_PAYLOAD_LEN];\n                    memset(line, '\\0', sizeof(line));\n                    if ((size_t)(lineEnd - lineStart) < sizeof(line) - 1) {\n                        memcpy(line, &serialBytes[lineStart], lineEnd - lineStart);\n\n                        ParsedLine parsed = parseLine(line);\n                        if (strlen(parsed.name) > 0) {\n                            if (strcmp(parsed.name, \"WindDir\") == 0) {\n                                strlcpy(windDir, parsed.value, sizeof(windDir));\n                                double radians = GeoCoord::toRadians(strtof(windDir, nullptr));\n                                dir_sum_sin += sin(radians);\n                                dir_sum_cos += cos(radians);\n                                dirCount++;\n                                gotwind = true;\n                            } else if (strcmp(parsed.name, \"WindSpeed\") == 0) {\n                                strlcpy(windVel, parsed.value, sizeof(windVel));\n                                float newv = strtof(windVel, nullptr);\n                                velSum += newv;\n                                velCount++;\n                                if (newv < lull || lull == -1) {\n                                    lull = newv;\n                                }\n                                gotwind = true;\n                            } else if (strcmp(parsed.name, \"WindGust\") == 0) {\n                                strlcpy(windGust, parsed.value, sizeof(windGust));\n                                float newg = strtof(windGust, nullptr);\n                                if (newg > gust) {\n                                    gust = newg;\n                                }\n                                gotwind = true;\n                            } else if (strcmp(parsed.name, \"BatVoltage\") == 0) {\n                                strlcpy(batVoltage, parsed.value, sizeof(batVoltage));\n                                batVoltageF = strtof(batVoltage, nullptr);\n                                break; // last possible data we want so break\n                            } else if (strcmp(parsed.name, \"CapVoltage\") == 0) {\n                                strlcpy(capVoltage, parsed.value, sizeof(capVoltage));\n                                capVoltageF = strtof(capVoltage, nullptr);\n                            } else if (strcmp(parsed.name, \"GXTS04Temp\") == 0 || strcmp(parsed.name, \"Temperature\") == 0) {\n                                strlcpy(temperature, parsed.value, sizeof(temperature));\n                                temperatureF = strtof(temperature, nullptr);\n                            } else if (strcmp(parsed.name, \"RainIntSum\") == 0) {\n                                strlcpy(rainStr, parsed.value, sizeof(rainStr));\n                                rainSum = int(strtof(rainStr, nullptr));\n                            } else if (strcmp(parsed.name, \"Rain\") == 0) {\n                                strlcpy(rainStr, parsed.value, sizeof(rainStr));\n                                rain = strtof(rainStr, nullptr);\n                            }\n                        }\n\n                        // Update lineStart for the next line\n                        lineStart = lineEnd + 1;\n                    }\n                }\n            }\n            break;\n            // clear the input buffer\n            while (Serial2.available() > 0) {\n                Serial2.read(); // Read and discard the bytes in the input buffer\n            }\n        }\n    }\n    if (gotwind) {\n\n        LOG_INFO(\"WS8X : %i %.1fg%.1f %.1fv %.1fv %.1fC rain: %.1f, %i sum\", atoi(windDir), strtof(windVel, nullptr),\n                 strtof(windGust, nullptr), batVoltageF, capVoltageF, temperatureF, rain, rainSum);\n    }\n    if (gotwind && !Throttle::isWithinTimespanMs(lastAveraged, averageIntervalMillis)) {\n        // calculate averages and send to the mesh\n        float velAvg = 1.0 * velSum / velCount;\n\n        double avgSin = dir_sum_sin / dirCount;\n        double avgCos = dir_sum_cos / dirCount;\n\n        double avgRadians = atan2(avgSin, avgCos);\n        float dirAvg = GeoCoord::toDegrees(avgRadians);\n\n        if (dirAvg < 0) {\n            dirAvg += 360.0;\n        }\n        lastAveraged = millis();\n\n        // make a telemetry packet with the data\n        meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n        m.which_variant = meshtastic_Telemetry_environment_metrics_tag;\n\n        m.variant.environment_metrics.wind_speed = velAvg;\n        m.variant.environment_metrics.has_wind_speed = true;\n\n        m.variant.environment_metrics.wind_direction = dirAvg;\n        m.variant.environment_metrics.has_wind_direction = true;\n\n        m.variant.environment_metrics.temperature = temperatureF;\n        m.variant.environment_metrics.has_temperature = true;\n\n        m.variant.environment_metrics.voltage =\n            capVoltageF > batVoltageF ? capVoltageF : batVoltageF; // send the larger of the two voltage values.\n        m.variant.environment_metrics.has_voltage = true;\n\n        m.variant.environment_metrics.wind_gust = gust;\n        m.variant.environment_metrics.has_wind_gust = true;\n\n        m.variant.environment_metrics.rainfall_24h = rainSum;\n        m.variant.environment_metrics.has_rainfall_24h = true;\n\n        // not sure if this value is actually the 1hr sum so needs to do some testing\n        m.variant.environment_metrics.rainfall_1h = rain;\n        m.variant.environment_metrics.has_rainfall_1h = true;\n\n        if (lull == -1)\n            lull = 0;\n        m.variant.environment_metrics.wind_lull = lull;\n        m.variant.environment_metrics.has_wind_lull = true;\n\n        LOG_INFO(\"WS8X Transmit speed=%fm/s, direction=%d , lull=%f, gust=%f, voltage=%f temperature=%f\",\n                 m.variant.environment_metrics.wind_speed, m.variant.environment_metrics.wind_direction,\n                 m.variant.environment_metrics.wind_lull, m.variant.environment_metrics.wind_gust,\n                 m.variant.environment_metrics.voltage, m.variant.environment_metrics.temperature);\n\n        sendTelemetry(m);\n\n        // reset counters and gust/lull\n        velSum = velCount = dirCount = 0;\n        dir_sum_sin = dir_sum_cos = 0;\n        gust = 0;\n        lull = -1;\n    }\n#endif\n    return;\n}\n#endif"
  },
  {
    "path": "src/modules/SerialModule.h",
    "content": "#pragma once\n\n#include \"MeshModule.h\"\n#include \"Router.h\"\n#include \"SinglePortModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <functional>\n\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) || defined(ARCH_STM32WL)) &&                             \\\n    !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)\n\nclass SerialModule : public StreamAPI, private concurrency::OSThread\n{\n    bool firstTime = 1;\n    unsigned long lastNmeaTime = millis();\n    char outbuf[90] = \"\";\n\n  public:\n    SerialModule();\n\n    static bool isValidConfig(const meshtastic_ModuleConfig_SerialConfig &config);\n\n  protected:\n    virtual int32_t runOnce() override;\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() override;\n\n  private:\n    uint32_t getBaudRate();\n    void sendTelemetry(meshtastic_Telemetry m);\n    void processWXSerial();\n};\n\nextern SerialModule *serialModule;\n\n/*\n * Radio interface for SerialModule\n *\n */\nclass SerialModuleRadio : public MeshModule\n{\n    uint32_t lastRxID = 0;\n    char outbuf[90] = \"\";\n\n  public:\n    SerialModuleRadio();\n\n    /**\n     * Send our payload into the mesh\n     */\n    void sendPayload(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n  protected:\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n    /** Called to handle a particular incoming message\n\n    @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for\n    it\n    */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n    meshtastic_PortNum ourPortNum;\n\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return p->decoded.portnum == ourPortNum; }\n\n    meshtastic_MeshPacket *allocDataPacket()\n    {\n        // Update our local node info with our position (even if we don't decide to update anyone else)\n        meshtastic_MeshPacket *p = router->allocForSending();\n        p->decoded.portnum = ourPortNum;\n\n        return p;\n    }\n};\n\nextern SerialModuleRadio *serialModuleRadio;\n\n#endif"
  },
  {
    "path": "src/modules/StatusLEDModule.cpp",
    "content": "#include \"StatusLEDModule.h\"\n#include \"MeshService.h\"\n#include \"configuration.h\"\n#include <Arduino.h>\n\n/*\nStatusLEDModule manages the device's status LEDs, updating their states based on power and Bluetooth status.\nIt reflects charging, charged, discharging, and Bluetooth connection states using the appropriate LEDs.\n*/\nStatusLEDModule *statusLEDModule;\n\nStatusLEDModule::StatusLEDModule() : concurrency::OSThread(\"StatusLEDModule\")\n{\n    bluetoothStatusObserver.observe(&bluetoothStatus->onNewStatus);\n    powerStatusObserver.observe(&powerStatus->onNewStatus);\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\n    if (inputBroker)\n        inputObserver.observe(inputBroker);\n#endif\n}\n\nint StatusLEDModule::handleStatusUpdate(const meshtastic::Status *arg)\n{\n    switch (arg->getStatusType()) {\n    case STATUS_TYPE_POWER: {\n        if (powerStatus->getHasUSB() || powerStatus->getIsCharging()) {\n            power_state = charging;\n            if (powerStatus->getBatteryChargePercent() >= 100) {\n                power_state = charged;\n            }\n        } else {\n            if (powerStatus->getBatteryChargePercent() > 5) {\n                power_state = discharging;\n            } else {\n                power_state = critical;\n            }\n        }\n        break;\n    }\n    case STATUS_TYPE_BLUETOOTH: {\n        switch (bluetoothStatus->getConnectionState()) {\n        case meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED: {\n            ble_state = unpaired;\n            PAIRING_LED_starttime = millis();\n            break;\n        }\n        case meshtastic::BluetoothStatus::ConnectionState::PAIRING: {\n            ble_state = pairing;\n            PAIRING_LED_starttime = millis();\n            break;\n        }\n        case meshtastic::BluetoothStatus::ConnectionState::CONNECTED: {\n            if (ble_state != connected) {\n                ble_state = connected;\n                PAIRING_LED_starttime = millis();\n            }\n        }\n        }\n\n        break;\n    }\n    }\n    return 0;\n};\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\nint StatusLEDModule::handleInputEvent(const InputEvent *event)\n{\n    lastUserbuttonTime = millis();\n    return 0;\n}\n#endif\n\nint32_t StatusLEDModule::runOnce()\n{\n    my_interval = 1000;\n\n    if (power_state == charging) {\n#ifndef POWER_LED_HARDWARE_BLINKS_WHILE_CHARGING\n        CHARGE_LED_state = !CHARGE_LED_state;\n#endif\n    } else if (power_state == charged) {\n        CHARGE_LED_state = LED_STATE_ON;\n    } else if (power_state == critical) {\n        if (POWER_LED_starttime + 30000 < millis() && !doing_fast_blink) {\n            doing_fast_blink = true;\n            POWER_LED_starttime = millis();\n        }\n        if (doing_fast_blink) {\n            PAIRING_LED_state = LED_STATE_OFF;\n            CHARGE_LED_state = !CHARGE_LED_state;\n            my_interval = 250;\n            if (POWER_LED_starttime + 2000 < millis()) {\n                doing_fast_blink = false;\n                CHARGE_LED_state = LED_STATE_OFF;\n            }\n        }\n    }\n\n    if (power_state != charging && power_state != charged && !doing_fast_blink) {\n        if (CHARGE_LED_state == LED_STATE_ON) {\n            CHARGE_LED_state = LED_STATE_OFF;\n            my_interval = 999;\n        } else {\n            CHARGE_LED_state = LED_STATE_ON;\n            my_interval = 1;\n        }\n    }\n\n    if (!config.bluetooth.enabled || PAIRING_LED_starttime + 30 * 1000 < millis() || doing_fast_blink) {\n        PAIRING_LED_state = LED_STATE_OFF;\n    } else if (ble_state == unpaired) {\n        if (slowTrack) {\n            PAIRING_LED_state = !PAIRING_LED_state;\n            slowTrack = false;\n        } else {\n            slowTrack = true;\n        }\n    } else if (ble_state == pairing) {\n        PAIRING_LED_state = !PAIRING_LED_state;\n    } else {\n        PAIRING_LED_state = LED_STATE_ON;\n    }\n\n    // Override if disabled in config\n    if (config.device.led_heartbeat_disabled) {\n        CHARGE_LED_state = LED_STATE_OFF;\n    }\n#ifdef Battery_LED_1\n    bool chargeIndicatorLED1 = LED_STATE_OFF;\n    bool chargeIndicatorLED2 = LED_STATE_OFF;\n    bool chargeIndicatorLED3 = LED_STATE_OFF;\n    bool chargeIndicatorLED4 = LED_STATE_OFF;\n    if (lastUserbuttonTime + 10 * 1000 > millis() || CHARGE_LED_state == LED_STATE_ON) {\n        // should this be off at very low percentages?\n        chargeIndicatorLED1 = LED_STATE_ON;\n        if (powerStatus && powerStatus->getBatteryChargePercent() >= 25)\n            chargeIndicatorLED2 = LED_STATE_ON;\n        if (powerStatus && powerStatus->getBatteryChargePercent() >= 50)\n            chargeIndicatorLED3 = LED_STATE_ON;\n        if (powerStatus && powerStatus->getBatteryChargePercent() >= 75)\n            chargeIndicatorLED4 = LED_STATE_ON;\n    }\n#endif\n\n#if defined(HAS_PMU)\n    if (pmu_found && PMU) {\n        // blink the axp led\n        PMU->setChargingLedMode(CHARGE_LED_state ? XPOWERS_CHG_LED_ON : XPOWERS_CHG_LED_OFF);\n    }\n#endif\n\n#ifdef PCA_LED_POWER\n    io.digitalWrite(PCA_LED_POWER, CHARGE_LED_state);\n#endif\n#ifdef PCA_LED_ENABLE\n    io.digitalWrite(PCA_LED_ENABLE, CHARGE_LED_state);\n#endif\n#ifdef LED_POWER\n    digitalWrite(LED_POWER, CHARGE_LED_state);\n#endif\n#ifdef LED_PAIRING\n    digitalWrite(LED_PAIRING, PAIRING_LED_state);\n#endif\n\n#ifdef RGB_LED_POWER\n    if (!config.device.led_heartbeat_disabled) {\n        if (CHARGE_LED_state == LED_STATE_ON) {\n            ambientLightingThread->setLighting(10, 255, 0, 0);\n        } else {\n            ambientLightingThread->setLighting(0, 0, 0, 0);\n        }\n    }\n#endif\n\n#ifdef Battery_LED_1\n    digitalWrite(Battery_LED_1, chargeIndicatorLED1);\n#endif\n#ifdef Battery_LED_2\n    digitalWrite(Battery_LED_2, chargeIndicatorLED2);\n#endif\n#ifdef Battery_LED_3\n    digitalWrite(Battery_LED_3, chargeIndicatorLED3);\n#endif\n#ifdef Battery_LED_4\n    digitalWrite(Battery_LED_4, chargeIndicatorLED4);\n#endif\n\n    return (my_interval);\n}\n\nvoid StatusLEDModule::setPowerLED(bool LEDon)\n{\n\n#if defined(HAS_PMU)\n    if (pmu_found && PMU) {\n        // blink the axp led\n        PMU->setChargingLedMode(LEDon ? XPOWERS_CHG_LED_ON : XPOWERS_CHG_LED_OFF);\n    }\n#endif\n    uint8_t ledState = LEDon ? LED_STATE_ON : LED_STATE_OFF;\n#ifdef PCA_LED_POWER\n    io.digitalWrite(PCA_LED_POWER, ledState);\n#endif\n#ifdef PCA_LED_ENABLE\n    io.digitalWrite(PCA_LED_ENABLE, ledState);\n#endif\n#ifdef LED_POWER\n    digitalWrite(LED_POWER, ledState);\n#endif\n#ifdef LED_PAIRING\n    digitalWrite(LED_PAIRING, ledState);\n#endif\n\n#ifdef Battery_LED_1\n    digitalWrite(Battery_LED_1, ledState);\n#endif\n#ifdef Battery_LED_2\n    digitalWrite(Battery_LED_2, ledState);\n#endif\n#ifdef Battery_LED_3\n    digitalWrite(Battery_LED_3, ledState);\n#endif\n#ifdef Battery_LED_4\n    digitalWrite(Battery_LED_4, ledState);\n#endif\n}\n"
  },
  {
    "path": "src/modules/StatusLEDModule.h",
    "content": "#pragma once\n\n#include \"BluetoothStatus.h\"\n#include \"MeshModule.h\"\n#include \"PowerStatus.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include <Arduino.h>\n#include <functional>\n\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\n#include \"input/InputBroker.h\"\n#endif\n\nclass StatusLEDModule : private concurrency::OSThread\n{\n    bool slowTrack = false;\n\n  public:\n    StatusLEDModule();\n\n    int handleStatusUpdate(const meshtastic::Status *);\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\n    int handleInputEvent(const InputEvent *arg);\n#endif\n\n    void setPowerLED(bool);\n\n  protected:\n    unsigned int my_interval = 1000; // interval in millisconds\n    virtual int32_t runOnce() override;\n\n    CallbackObserver<StatusLEDModule, const meshtastic::Status *> bluetoothStatusObserver =\n        CallbackObserver<StatusLEDModule, const meshtastic::Status *>(this, &StatusLEDModule::handleStatusUpdate);\n    CallbackObserver<StatusLEDModule, const meshtastic::Status *> powerStatusObserver =\n        CallbackObserver<StatusLEDModule, const meshtastic::Status *>(this, &StatusLEDModule::handleStatusUpdate);\n#if !MESHTASTIC_EXCLUDE_INPUTBROKER\n    CallbackObserver<StatusLEDModule, const InputEvent *> inputObserver =\n        CallbackObserver<StatusLEDModule, const InputEvent *>(this, &StatusLEDModule::handleInputEvent);\n#endif\n\n  private:\n    bool CHARGE_LED_state = LED_STATE_OFF;\n    bool PAIRING_LED_state = LED_STATE_OFF;\n\n    uint32_t PAIRING_LED_starttime = 0;\n    uint32_t lastUserbuttonTime = 0;\n    uint32_t POWER_LED_starttime = 0;\n    bool doing_fast_blink = false;\n\n    enum PowerState { discharging, charging, charged, critical };\n\n    PowerState power_state = discharging;\n\n    enum BLEState { unpaired, pairing, connected };\n\n    BLEState ble_state = unpaired;\n};\n\nextern StatusLEDModule *statusLEDModule;\n#ifdef RGB_LED_POWER\n#include \"AmbientLightingThread.h\"\nextern AmbientLightingThread *ambientLightingThread;\n#endif\n"
  },
  {
    "path": "src/modules/StatusMessageModule.cpp",
    "content": "#if !MESHTASTIC_EXCLUDE_STATUS\n\n#include \"StatusMessageModule.h\"\n#include \"MeshService.h\"\n#include \"ProtobufModule.h\"\n\nStatusMessageModule *statusMessageModule;\n\nint32_t StatusMessageModule::runOnce()\n{\n    if (moduleConfig.has_statusmessage && moduleConfig.statusmessage.node_status[0] != '\\0') {\n        // create and send message with the status message set\n        meshtastic_StatusMessage ourStatus = meshtastic_StatusMessage_init_zero;\n        strncpy(ourStatus.status, moduleConfig.statusmessage.node_status, sizeof(ourStatus.status));\n        ourStatus.status[sizeof(ourStatus.status) - 1] = '\\0'; // ensure null termination\n        meshtastic_MeshPacket *p = allocDataPacket();\n        p->decoded.payload.size = pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes),\n                                                     meshtastic_StatusMessage_fields, &ourStatus);\n        p->to = NODENUM_BROADCAST;\n        p->decoded.want_response = false;\n        p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n        p->channel = 0;\n        service->sendToMesh(p);\n    }\n\n    return 1000 * 12 * 60 * 60;\n}\n\nProcessMessage StatusMessageModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        meshtastic_StatusMessage incomingMessage;\n        if (pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, meshtastic_StatusMessage_fields,\n                                 &incomingMessage)) {\n            LOG_INFO(\"Received a NodeStatus message %s\", incomingMessage.status);\n        }\n    }\n    return ProcessMessage::CONTINUE;\n}\n\n#endif"
  },
  {
    "path": "src/modules/StatusMessageModule.h",
    "content": "#pragma once\n#if !MESHTASTIC_EXCLUDE_STATUS\n#include \"SinglePortModule.h\"\n#include \"configuration.h\"\n\nclass StatusMessageModule : public SinglePortModule, private concurrency::OSThread\n{\n\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    StatusMessageModule()\n        : SinglePortModule(\"statusMessage\", meshtastic_PortNum_NODE_STATUS_APP), concurrency::OSThread(\"StatusMessage\")\n    {\n        if (moduleConfig.has_statusmessage && moduleConfig.statusmessage.node_status[0] != '\\0') {\n            this->setInterval(2 * 60 * 1000);\n        } else {\n            this->setInterval(1000 * 12 * 60 * 60);\n        }\n        // TODO: If we have a string, set the initial delay (15 minutes maybe)\n    }\n\n    virtual int32_t runOnce() override;\n\n  protected:\n    /** Called to handle a particular incoming message\n     */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n\n  private:\n};\n\nextern StatusMessageModule *statusMessageModule;\n#endif"
  },
  {
    "path": "src/modules/StoreForwardModule.cpp",
    "content": "/**\n * @file StoreForwardModule.cpp\n * @brief Implementation of the StoreForwardModule class.\n *\n * This file contains the implementation of the StoreForwardModule class, which is responsible for managing the store and forward\n * functionality of the Meshtastic device. The class provides methods for sending and receiving messages, as well as managing the\n * message history queue. It also initializes and manages the data structures used for storing the message history.\n *\n * The StoreForwardModule class is used by the MeshService class to provide store and forward functionality to the Meshtastic\n * device.\n *\n * @author Jm Casler\n * @date [Insert Date]\n */\n#include \"StoreForwardModule.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"Throttle.h\"\n#include \"airtime.h\"\n#include \"configuration.h\"\n#include \"memGet.h\"\n#include \"mesh-pb-constants.h\"\n#include \"mesh/generated/meshtastic/storeforward.pb.h\"\n#include \"modules/ModuleDev.h\"\n#include <Arduino.h>\n#include <iterator>\n#include <map>\n\nStoreForwardModule *storeForwardModule;\n\nint32_t StoreForwardModule::runOnce()\n{\n#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)\n    if (moduleConfig.store_forward.enabled && is_server) {\n        // Send out the message queue.\n        if (this->busy) {\n            // Only send packets if the channel is less than 25% utilized and until historyReturnMax\n            if (airTime->isTxAllowedChannelUtil(true) && this->requestCount < this->historyReturnMax) {\n                if (!storeForwardModule->sendPayload(this->busyTo, this->last_time)) {\n                    this->requestCount = 0;\n                    this->busy = false;\n                }\n            }\n        } else if (this->heartbeat && (!Throttle::isWithinTimespanMs(lastHeartbeat, heartbeatInterval * 1000)) &&\n                   airTime->isTxAllowedChannelUtil(true)) {\n            lastHeartbeat = millis();\n            LOG_INFO(\"Send heartbeat\");\n            meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero;\n            sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_HEARTBEAT;\n            sf.which_variant = meshtastic_StoreAndForward_heartbeat_tag;\n            sf.variant.heartbeat.period = heartbeatInterval;\n            sf.variant.heartbeat.secondary = 0; // TODO we always have one primary router for now\n            storeForwardModule->sendMessage(NODENUM_BROADCAST, sf);\n        }\n        return (this->packetTimeMax);\n    }\n#endif\n    return disable();\n}\n\n/**\n * Populates the PSRAM with data to be sent later when a device is out of range.\n */\nvoid StoreForwardModule::populatePSRAM()\n{\n    /*\n    For PSRAM usage, see:\n        https://learn.upesy.com/en/programmation/psram.html#psram-tab\n    */\n\n    LOG_DEBUG(\"Before PSRAM init: heap %d/%d PSRAM %d/%d\", memGet.getFreeHeap(), memGet.getHeapSize(), memGet.getFreePsram(),\n              memGet.getPsramSize());\n\n    /* Use a maximum of 3/4 the available PSRAM unless otherwise specified.\n        Note: This needs to be done after every thing that would use PSRAM\n    */\n    uint32_t numberOfPackets =\n        (this->records ? this->records : (((memGet.getFreePsram() / 4) * 3) / sizeof(PacketHistoryStruct)));\n    this->records = numberOfPackets;\n#if defined(ARCH_ESP32)\n    this->packetHistory = static_cast<PacketHistoryStruct *>(ps_calloc(numberOfPackets, sizeof(PacketHistoryStruct)));\n#elif defined(ARCH_PORTDUINO)\n    this->packetHistory = static_cast<PacketHistoryStruct *>(calloc(numberOfPackets, sizeof(PacketHistoryStruct)));\n\n#endif\n\n    LOG_DEBUG(\"After PSRAM init: heap %d/%d PSRAM %d/%d\", memGet.getFreeHeap(), memGet.getHeapSize(), memGet.getFreePsram(),\n              memGet.getPsramSize());\n    LOG_DEBUG(\"numberOfPackets for packetHistory - %u\", numberOfPackets);\n}\n\n/**\n * Sends messages from the message history to the specified recipient.\n *\n * @param sAgo The number of seconds ago from which to start sending messages.\n * @param to The recipient ID to send the messages to.\n */\nvoid StoreForwardModule::historySend(uint32_t secAgo, uint32_t to)\n{\n    this->last_time = getTime() < secAgo ? 0 : getTime() - secAgo;\n    uint32_t queueSize = getNumAvailablePackets(to, last_time);\n    if (queueSize > this->historyReturnMax)\n        queueSize = this->historyReturnMax;\n\n    if (queueSize) {\n        LOG_INFO(\"S&F - Send %u message(s)\", queueSize);\n        this->busy = true; // runOnce() will pickup the next steps once busy = true.\n        this->busyTo = to;\n    } else {\n        LOG_INFO(\"S&F - No history\");\n    }\n    meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero;\n    sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_HISTORY;\n    sf.which_variant = meshtastic_StoreAndForward_history_tag;\n    sf.variant.history.history_messages = queueSize;\n    sf.variant.history.window = secAgo * 1000;\n    sf.variant.history.last_request = lastRequest[to];\n    storeForwardModule->sendMessage(to, sf);\n    setIntervalFromNow(this->packetTimeMax); // Delay start of sending payloads\n}\n\n/**\n * Returns the number of available packets in the message history for a specified destination node.\n *\n * @param dest The destination node number.\n * @param last_time The relative time to start counting messages from.\n * @return The number of available packets in the message history.\n */\nuint32_t StoreForwardModule::getNumAvailablePackets(NodeNum dest, uint32_t last_time)\n{\n    uint32_t count = 0;\n    lastRequest.emplace(dest, 0);\n    for (uint32_t i = lastRequest[dest]; i < this->packetHistoryTotalCount; i++) {\n        if (this->packetHistory[i].time && (this->packetHistory[i].time > last_time)) {\n            // Client is only interested in packets not from itself and only in broadcast packets or packets towards it.\n            if (this->packetHistory[i].from != dest &&\n                (this->packetHistory[i].to == NODENUM_BROADCAST || this->packetHistory[i].to == dest)) {\n                count++;\n            }\n        }\n    }\n    return count;\n}\n\n/**\n * Allocates a mesh packet for sending to the phone.\n *\n * @return A pointer to the allocated mesh packet or nullptr if none is available.\n */\nmeshtastic_MeshPacket *StoreForwardModule::getForPhone()\n{\n    if (moduleConfig.store_forward.enabled && is_server) {\n        NodeNum to = nodeDB->getNodeNum();\n        if (!this->busy) {\n            // Get number of packets we're going to send in this loop\n            uint32_t histSize = getNumAvailablePackets(to, 0); // No time limit\n            if (histSize) {\n                this->busy = true;\n                this->busyTo = to;\n            } else {\n                return nullptr;\n            }\n        }\n\n        // We're busy with sending to us until no payload is available anymore\n        if (this->busy && this->busyTo == to) {\n            meshtastic_MeshPacket *p = preparePayload(to, 0, true); // No time limit\n            if (!p)                                                 // No more messages to send\n                this->busy = false;\n            return p;\n        }\n    }\n    return nullptr;\n}\n\n/**\n * Adds a mesh packet to the history buffer for store-and-forward functionality.\n *\n * @param mp The mesh packet to add to the history buffer.\n */\nvoid StoreForwardModule::historyAdd(const meshtastic_MeshPacket &mp)\n{\n    const auto &p = mp.decoded;\n\n    if (this->packetHistoryTotalCount == this->records) {\n        LOG_WARN(\"S&F - PSRAM Full. Starting overwrite\");\n        this->packetHistoryTotalCount = 0;\n        for (auto &i : lastRequest) {\n            i.second = 0; // Clear the last request index for each client device\n        }\n    }\n\n    this->packetHistory[this->packetHistoryTotalCount].time = getTime();\n    this->packetHistory[this->packetHistoryTotalCount].to = mp.to;\n    this->packetHistory[this->packetHistoryTotalCount].channel = mp.channel;\n    this->packetHistory[this->packetHistoryTotalCount].from = getFrom(&mp);\n    this->packetHistory[this->packetHistoryTotalCount].id = mp.id;\n    this->packetHistory[this->packetHistoryTotalCount].reply_id = p.reply_id;\n    this->packetHistory[this->packetHistoryTotalCount].emoji = (bool)p.emoji;\n    this->packetHistory[this->packetHistoryTotalCount].payload_size = p.payload.size;\n    this->packetHistory[this->packetHistoryTotalCount].rx_rssi = mp.rx_rssi;\n    this->packetHistory[this->packetHistoryTotalCount].rx_snr = mp.rx_snr;\n    this->packetHistory[this->packetHistoryTotalCount].hop_start = mp.hop_start;\n    this->packetHistory[this->packetHistoryTotalCount].hop_limit = mp.hop_limit;\n    this->packetHistory[this->packetHistoryTotalCount].via_mqtt = mp.via_mqtt;\n    this->packetHistory[this->packetHistoryTotalCount].transport_mechanism = mp.transport_mechanism;\n    memcpy(this->packetHistory[this->packetHistoryTotalCount].payload, p.payload.bytes, meshtastic_Constants_DATA_PAYLOAD_LEN);\n\n    this->packetHistoryTotalCount++;\n}\n\n/**\n * Sends a payload to a specified destination node using the store and forward mechanism.\n *\n * @param dest The destination node number.\n * @param last_time The relative time to start sending messages from.\n * @return True if a packet was successfully sent, false otherwise.\n */\nbool StoreForwardModule::sendPayload(NodeNum dest, uint32_t last_time)\n{\n    meshtastic_MeshPacket *p = preparePayload(dest, last_time);\n    if (p) {\n        LOG_INFO(\"Send S&F Payload\");\n        service->sendToMesh(p);\n        this->requestCount++;\n        return true;\n    }\n    return false;\n}\n\n/**\n * Prepares a payload to be sent to a specified destination node from the S&F packet history.\n *\n * @param dest The destination node number.\n * @param last_time The relative time to start sending messages from.\n * @return A pointer to the prepared mesh packet or nullptr if none is available.\n */\nmeshtastic_MeshPacket *StoreForwardModule::preparePayload(NodeNum dest, uint32_t last_time, bool local)\n{\n    for (uint32_t i = lastRequest[dest]; i < this->packetHistoryTotalCount; i++) {\n        if (this->packetHistory[i].time && (this->packetHistory[i].time > last_time)) {\n            /*  Copy the messages that were received by the server in the last msAgo\n                to the packetHistoryTXQueue structure.\n                Client not interested in packets from itself and only in broadcast packets or packets towards it. */\n            if (this->packetHistory[i].from != dest &&\n                (this->packetHistory[i].to == NODENUM_BROADCAST || this->packetHistory[i].to == dest)) {\n\n                meshtastic_MeshPacket *p = allocDataPacket();\n\n                p->to = local ? this->packetHistory[i].to : dest; // PhoneAPI can handle original `to`\n                p->from = this->packetHistory[i].from;\n                p->id = this->packetHistory[i].id;\n                p->channel = this->packetHistory[i].channel;\n                p->decoded.reply_id = this->packetHistory[i].reply_id;\n                p->rx_time = this->packetHistory[i].time;\n                p->decoded.emoji = (uint32_t)this->packetHistory[i].emoji;\n                p->rx_rssi = this->packetHistory[i].rx_rssi;\n                p->rx_snr = this->packetHistory[i].rx_snr;\n                p->hop_start = this->packetHistory[i].hop_start;\n                p->hop_limit = this->packetHistory[i].hop_limit;\n                p->via_mqtt = this->packetHistory[i].via_mqtt;\n                p->transport_mechanism = (meshtastic_MeshPacket_TransportMechanism)this->packetHistory[i].transport_mechanism;\n\n                // Let's assume that if the server received the S&F request that the client is in range.\n                //   TODO: Make this configurable.\n                p->want_ack = false;\n\n                if (local) { // PhoneAPI gets normal TEXT_MESSAGE_APP\n                    p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP;\n                    memcpy(p->decoded.payload.bytes, this->packetHistory[i].payload, this->packetHistory[i].payload_size);\n                    p->decoded.payload.size = this->packetHistory[i].payload_size;\n                } else {\n                    meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero;\n                    sf.which_variant = meshtastic_StoreAndForward_text_tag;\n                    sf.variant.text.size = this->packetHistory[i].payload_size;\n                    memcpy(sf.variant.text.bytes, this->packetHistory[i].payload, this->packetHistory[i].payload_size);\n                    if (this->packetHistory[i].to == NODENUM_BROADCAST) {\n                        sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_BROADCAST;\n                    } else {\n                        sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_DIRECT;\n                    }\n\n                    p->decoded.payload.size = pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes),\n                                                                 &meshtastic_StoreAndForward_msg, &sf);\n                }\n\n                lastRequest[dest] = i + 1; // Update the last request index for the client device\n\n                return p;\n            }\n        }\n    }\n    return nullptr;\n}\n\n/**\n * Sends a message to a specified destination node using the store and forward protocol.\n *\n * @param dest The destination node number.\n * @param payload The message payload to be sent.\n */\nvoid StoreForwardModule::sendMessage(NodeNum dest, const meshtastic_StoreAndForward &payload)\n{\n    meshtastic_MeshPacket *p = allocDataProtobuf(payload);\n\n    p->to = dest;\n\n    p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n\n    // Let's assume that if the server received the S&F request that the client is in range.\n    //   TODO: Make this configurable.\n    p->want_ack = false;\n    p->decoded.want_response = false;\n\n    service->sendToMesh(p);\n}\n\n/**\n * Sends a store-and-forward message to the specified destination node.\n *\n * @param dest The destination node number.\n * @param rr The store-and-forward request/response message to send.\n */\nvoid StoreForwardModule::sendMessage(NodeNum dest, meshtastic_StoreAndForward_RequestResponse rr)\n{\n    // Craft an empty response, save some bytes in flash\n    meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero;\n    sf.rr = rr;\n    storeForwardModule->sendMessage(dest, sf);\n}\n\n/**\n * Sends a text message with an error (busy or channel not available) to the specified destination node.\n *\n * @param dest The destination node number.\n * @param want_response True if the original message requested a response, false otherwise.\n */\nvoid StoreForwardModule::sendErrorTextMessage(NodeNum dest, bool want_response)\n{\n    meshtastic_MeshPacket *pr = allocDataPacket();\n    pr->to = dest;\n    pr->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n    pr->want_ack = false;\n    pr->decoded.want_response = false;\n    pr->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP;\n    const char *str;\n    if (this->busy) {\n        str = \"S&F - Busy. Try again shortly.\";\n    } else {\n        str = \"S&F not permitted on the public channel.\";\n    }\n    LOG_WARN(\"%s\", str);\n    memcpy(pr->decoded.payload.bytes, str, strlen(str));\n    pr->decoded.payload.size = strlen(str);\n    if (want_response) {\n        ignoreRequest = true; // This text message counts as response.\n    }\n    service->sendToMesh(pr);\n}\n\n/**\n * Sends statistics about the store and forward module to the specified node.\n *\n * @param to The node ID to send the statistics to.\n */\nvoid StoreForwardModule::statsSend(uint32_t to)\n{\n    meshtastic_StoreAndForward sf = meshtastic_StoreAndForward_init_zero;\n\n    sf.rr = meshtastic_StoreAndForward_RequestResponse_ROUTER_STATS;\n    sf.which_variant = meshtastic_StoreAndForward_stats_tag;\n    sf.variant.stats.messages_total = this->records;\n    sf.variant.stats.messages_saved = this->packetHistoryTotalCount;\n    sf.variant.stats.messages_max = this->records;\n    sf.variant.stats.up_time = millis() / 1000;\n    sf.variant.stats.requests = this->requests;\n    sf.variant.stats.requests_history = this->requests_history;\n    sf.variant.stats.heartbeat = this->heartbeat;\n    sf.variant.stats.return_max = this->historyReturnMax;\n    sf.variant.stats.return_window = this->historyReturnWindow;\n\n    LOG_DEBUG(\"Send S&F Stats\");\n    storeForwardModule->sendMessage(to, sf);\n}\n\n/**\n * Handles a received mesh packet, potentially storing it for later forwarding.\n *\n * @param mp The received mesh packet.\n * @return A `ProcessMessage` indicating whether the packet was successfully handled.\n */\nProcessMessage StoreForwardModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)\n    if (moduleConfig.store_forward.enabled) {\n\n        if ((mp.decoded.portnum == meshtastic_PortNum_TEXT_MESSAGE_APP) && is_server) {\n            auto &p = mp.decoded;\n            if (isToUs(&mp) && (p.payload.bytes[0] == 'S') && (p.payload.bytes[1] == 'F') && (p.payload.bytes[2] == 0x00)) {\n                LOG_DEBUG(\"Legacy Request to send\");\n\n                // Send the last 60 minutes of messages.\n                if (this->busy || channels.isDefaultChannel(mp.channel)) {\n                    sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);\n                } else {\n                    storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp));\n                }\n            } else {\n                storeForwardModule->historyAdd(mp);\n                LOG_INFO(\"S&F stored. Message history contains %u records now\", this->packetHistoryTotalCount);\n            }\n        } else if (!isFromUs(&mp) && mp.decoded.portnum == meshtastic_PortNum_STORE_FORWARD_APP) {\n            auto &p = mp.decoded;\n            meshtastic_StoreAndForward scratch;\n            meshtastic_StoreAndForward *decoded = NULL;\n            if (mp.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n                if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_StoreAndForward_msg, &scratch)) {\n                    decoded = &scratch;\n                } else {\n                    LOG_ERROR(\"Error decoding proto module!\");\n                    // if we can't decode it, nobody can process it!\n                    return ProcessMessage::STOP;\n                }\n                return handleReceivedProtobuf(mp, decoded) ? ProcessMessage::STOP : ProcessMessage::CONTINUE;\n            }\n        } // all others are irrelevant\n    }\n\n#endif\n\n    return ProcessMessage::CONTINUE; // Let others look at this message also if they want\n}\n\n/**\n * Handles a received protobuf message for the Store and Forward module.\n *\n * @param mp The received MeshPacket to handle.\n * @param p A pointer to the StoreAndForward object.\n * @return True if the message was successfully handled, false otherwise.\n */\nbool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_StoreAndForward *p)\n{\n    if (!moduleConfig.store_forward.enabled) {\n        // If this module is not enabled in any capacity, don't handle the packet, and allow other modules to consume\n        return false;\n    }\n\n    requests++;\n\n    switch (p->rr) {\n    case meshtastic_StoreAndForward_RequestResponse_CLIENT_ERROR:\n    case meshtastic_StoreAndForward_RequestResponse_CLIENT_ABORT:\n        if (is_server) {\n            // stop sending stuff, the client wants to abort or has another error\n            if ((this->busy) && (this->busyTo == getFrom(&mp))) {\n                LOG_ERROR(\"Client in ERROR or ABORT requested\");\n                this->requestCount = 0;\n                this->busy = false;\n            }\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_CLIENT_HISTORY:\n        if (is_server) {\n            requests_history++;\n            LOG_INFO(\"Client Request to send HISTORY\");\n            // Send the last 60 minutes of messages.\n            if (this->busy || channels.isDefaultChannel(mp.channel)) {\n                sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);\n            } else {\n                if ((p->which_variant == meshtastic_StoreAndForward_history_tag) && (p->variant.history.window > 0)) {\n                    // window is in minutes\n                    storeForwardModule->historySend(p->variant.history.window * 60, getFrom(&mp));\n                } else {\n                    storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp)); // defaults to 4 hours\n                }\n            }\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_CLIENT_PING:\n        if (is_server) {\n            // respond with a ROUTER PONG\n            storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_ROUTER_PONG);\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_CLIENT_PONG:\n        if (is_server) {\n            // NodeDB is already updated\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_CLIENT_STATS:\n        if (is_server) {\n            LOG_INFO(\"Client Request to send STATS\");\n            if (this->busy) {\n                storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY);\n                LOG_INFO(\"S&F - Busy. Try again shortly\");\n            } else {\n                storeForwardModule->statsSend(getFrom(&mp));\n            }\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_ROUTER_ERROR:\n    case meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY:\n        if (is_client) {\n            LOG_DEBUG(\"StoreAndForward_RequestResponse_ROUTER_BUSY\");\n            // retry in messages_saved * packetTimeMax ms\n            retry_delay = millis() + getNumAvailablePackets(this->busyTo, this->last_time) * packetTimeMax *\n                                         (p->rr == meshtastic_StoreAndForward_RequestResponse_ROUTER_ERROR ? 2 : 1);\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_ROUTER_PONG:\n    // A router responded, this is equal to receiving a heartbeat\n    case meshtastic_StoreAndForward_RequestResponse_ROUTER_HEARTBEAT:\n        if (is_client) {\n            // register heartbeat and interval\n            if (p->which_variant == meshtastic_StoreAndForward_heartbeat_tag) {\n                heartbeatInterval = p->variant.heartbeat.period;\n            }\n            lastHeartbeat = millis();\n            LOG_INFO(\"StoreAndForward Heartbeat received\");\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_ROUTER_PING:\n        if (is_client) {\n            // respond with a CLIENT PONG\n            storeForwardModule->sendMessage(getFrom(&mp), meshtastic_StoreAndForward_RequestResponse_CLIENT_PONG);\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_ROUTER_STATS:\n        if (is_client) {\n            LOG_DEBUG(\"Router Response STATS\");\n            // These fields only have informational purpose on a client. Fill them to consume later.\n            if (p->which_variant == meshtastic_StoreAndForward_stats_tag) {\n                this->records = p->variant.stats.messages_max;\n                this->requests = p->variant.stats.requests;\n                this->requests_history = p->variant.stats.requests_history;\n                this->heartbeat = p->variant.stats.heartbeat;\n                this->historyReturnMax = p->variant.stats.return_max;\n                this->historyReturnWindow = p->variant.stats.return_window;\n            }\n        }\n        break;\n\n    case meshtastic_StoreAndForward_RequestResponse_ROUTER_HISTORY:\n        if (is_client) {\n            // These fields only have informational purpose on a client. Fill them to consume later.\n            if (p->which_variant == meshtastic_StoreAndForward_history_tag) {\n                this->historyReturnWindow = p->variant.history.window / 60000;\n                LOG_INFO(\"Router Response HISTORY - Sending %d messages from last %d minutes\",\n                         p->variant.history.history_messages, this->historyReturnWindow);\n            }\n        }\n        break;\n\n    default:\n        break; // no need to do anything\n    }\n    return false; // RoutingModule sends it to the phone\n}\n\nStoreForwardModule::StoreForwardModule()\n    : concurrency::OSThread(\"StoreForward\"),\n      ProtobufModule(\"StoreForward\", meshtastic_PortNum_STORE_FORWARD_APP, &meshtastic_StoreAndForward_msg)\n{\n\n#if defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)\n\n    isPromiscuous = true; // Brown chicken brown cow\n\n    if (StoreForward_Dev) {\n        /*\n            Uncomment the preferences below if you want to use the module\n            without having to configure it from the PythonAPI or WebUI.\n        */\n\n        moduleConfig.store_forward.enabled = 1;\n    }\n\n    if (moduleConfig.store_forward.enabled) {\n\n        // Router\n        if ((config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n             config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE || moduleConfig.store_forward.is_server)) {\n            LOG_INFO(\"Init Store & Forward Module in Server mode\");\n            if (memGet.getPsramSize() > 0) {\n                if (memGet.getFreePsram() >= 1024 * 1024) {\n\n                    // Do the startup here\n\n                    // Maximum number of records to return.\n                    if (moduleConfig.store_forward.history_return_max)\n                        this->historyReturnMax = moduleConfig.store_forward.history_return_max;\n\n                    // Maximum time window for records to return (in minutes)\n                    if (moduleConfig.store_forward.history_return_window)\n                        this->historyReturnWindow = moduleConfig.store_forward.history_return_window;\n\n                    // Maximum number of records to store in memory\n                    if (moduleConfig.store_forward.records)\n                        this->records = moduleConfig.store_forward.records;\n\n                    // send heartbeat advertising?\n                    if (moduleConfig.store_forward.heartbeat)\n                        this->heartbeat = moduleConfig.store_forward.heartbeat;\n                    else\n                        this->heartbeat = false;\n\n                    // Popupate PSRAM with our data structures.\n                    this->populatePSRAM();\n                    is_server = true;\n                } else {\n                    LOG_INFO(\".\");\n                    LOG_INFO(\"S&F: not enough PSRAM free, Disable\");\n                }\n            } else {\n                LOG_INFO(\"S&F: device doesn't have PSRAM, Disable\");\n            }\n\n            // Client\n        } else {\n            is_client = true;\n            LOG_INFO(\"Init Store & Forward Module in Client mode\");\n        }\n    } else {\n        disable();\n    }\n#endif\n}\n"
  },
  {
    "path": "src/modules/StoreForwardModule.h",
    "content": "#pragma once\n\n#include \"ProtobufModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"mesh/generated/meshtastic/storeforward.pb.h\"\n\n#include \"configuration.h\"\n#include <Arduino.h>\n#include <functional>\n#include <unordered_map>\n\nstruct PacketHistoryStruct {\n    uint32_t time;\n    uint32_t to;\n    uint32_t from;\n    uint32_t id;\n    uint8_t channel;\n    uint32_t reply_id;\n    bool emoji;\n    uint8_t payload[meshtastic_Constants_DATA_PAYLOAD_LEN];\n    pb_size_t payload_size;\n    int32_t rx_rssi;\n    float rx_snr;\n    uint8_t hop_start;\n    uint8_t hop_limit;\n    bool via_mqtt;\n    uint8_t transport_mechanism;\n};\n\nclass StoreForwardModule : private concurrency::OSThread, public ProtobufModule<meshtastic_StoreAndForward>\n{\n    bool busy = 0;\n    uint32_t busyTo = 0;\n    char routerMessage[meshtastic_Constants_DATA_PAYLOAD_LEN] = {0};\n\n    PacketHistoryStruct *packetHistory = 0;\n    uint32_t packetHistoryTotalCount = 0;\n    uint32_t last_time = 0;\n    uint32_t requestCount = 0;\n\n    uint32_t packetTimeMax = 5000; // Interval between sending history packets as a server.\n\n    bool is_client = false;\n    bool is_server = false;\n\n    // Unordered_map stores the last request for each nodeNum (`to` field)\n    std::unordered_map<NodeNum, uint32_t> lastRequest;\n\n  public:\n    StoreForwardModule();\n\n    unsigned long lastHeartbeat = 0;\n    uint32_t heartbeatInterval = 900;\n\n    /**\n     Update our local reference of when we last saw that node.\n     @return 0 if we have never seen that node before otherwise return the last time we saw the node.\n     */\n    void historyAdd(const meshtastic_MeshPacket &mp);\n    void statsSend(uint32_t to);\n    void historySend(uint32_t secAgo, uint32_t to);\n    uint32_t getNumAvailablePackets(NodeNum dest, uint32_t last_time);\n\n    /**\n     * Send our payload into the mesh\n     */\n    bool sendPayload(NodeNum dest = NODENUM_BROADCAST, uint32_t packetHistory_index = 0);\n    meshtastic_MeshPacket *preparePayload(NodeNum dest, uint32_t packetHistory_index, bool local = false);\n    void sendMessage(NodeNum dest, const meshtastic_StoreAndForward &payload);\n    void sendMessage(NodeNum dest, meshtastic_StoreAndForward_RequestResponse rr);\n    void sendErrorTextMessage(NodeNum dest, bool want_response);\n    meshtastic_MeshPacket *getForPhone();\n    // Returns true if we are configured as server AND we could allocate PSRAM.\n    bool isServer() { return is_server; }\n\n    /*\n      -Override the wantPacket method.\n    */\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override\n    {\n        switch (p->decoded.portnum) {\n        case meshtastic_PortNum_TEXT_MESSAGE_APP:\n        case meshtastic_PortNum_STORE_FORWARD_APP:\n            return true;\n        default:\n            return false;\n        }\n    }\n\n  private:\n    void populatePSRAM();\n\n    // S&F Defaults\n    uint32_t historyReturnMax = 25;     // Return maximum of 25 records by default.\n    uint32_t historyReturnWindow = 240; // Return history of last 4 hours by default.\n    uint32_t records = 0;               // Calculated\n    bool heartbeat = false;             // No heartbeat.\n\n    // stats\n    uint32_t requests = 0;         // Number of times any client sent a request to the S&F.\n    uint32_t requests_history = 0; // Number of times the history was requested.\n\n    uint32_t retry_delay = 0; // If server is busy, retry after this delay (in ms).\n\n  protected:\n    virtual int32_t runOnce() override;\n\n    /** Called to handle a particular incoming message\n\n    @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for\n    it\n    */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_StoreAndForward *p);\n};\n\nextern StoreForwardModule *storeForwardModule;\n"
  },
  {
    "path": "src/modules/SystemCommandsModule.cpp",
    "content": "#include \"SystemCommandsModule.h\"\n#include \"input/InputBroker.h\"\n#include \"meshUtils.h\"\n\n#if HAS_SCREEN\n#include \"MessageStore.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#endif\n\n#include \"GPS.h\"\n#include \"MeshService.h\"\n#include \"Module.h\"\n#include \"NodeDB.h\"\n#include \"main.h\"\n#include \"modules/AdminModule.h\"\n#include \"modules/ExternalNotificationModule.h\"\n\nSystemCommandsModule *systemCommandsModule;\n\nSystemCommandsModule::SystemCommandsModule()\n{\n    if (inputBroker)\n        inputObserver.observe(inputBroker);\n}\n\nint SystemCommandsModule::handleInputEvent(const InputEvent *event)\n{\n    LOG_INPUT(\"SystemCommands Input event %u! kb %u\", event->inputEvent, event->kbchar);\n    // System commands (all others fall through)\n    switch (event->kbchar) {\n    // Fn key symbols\n    case INPUT_BROKER_MSG_FN_SYMBOL_ON:\n    case INPUT_BROKER_MSG_FN_SYMBOL_OFF:\n        return 0;\n    // Brightness\n    case INPUT_BROKER_MSG_BRIGHTNESS_UP:\n        IF_SCREEN(screen->increaseBrightness());\n        LOG_DEBUG(\"Increase Screen Brightness\");\n        return 0;\n    case INPUT_BROKER_MSG_BRIGHTNESS_DOWN:\n        IF_SCREEN(screen->decreaseBrightness());\n        LOG_DEBUG(\"Decrease Screen Brightness\");\n        return 0;\n    // Mute\n    case INPUT_BROKER_MSG_MUTE_TOGGLE:\n        if (moduleConfig.external_notification.enabled && externalNotificationModule) {\n            externalNotificationModule->setMute(!externalNotificationModule->getMute());\n            IF_SCREEN(if (!externalNotificationModule->getMute()) externalNotificationModule->stopNow(); screen->showSimpleBanner(\n                externalNotificationModule->getMute() ? \"Notifications\\nDisabled\" : \"Notifications\\nEnabled\", 3000);)\n        }\n        return 0;\n    // Bluetooth\n    case INPUT_BROKER_MSG_BLUETOOTH_TOGGLE:\n        config.bluetooth.enabled = !config.bluetooth.enabled;\n        LOG_INFO(\"User toggled Bluetooth\");\n        nodeDB->saveToDisk();\n#if defined(ARDUINO_ARCH_NRF52)\n        if (!config.bluetooth.enabled) {\n            disableBluetooth();\n            IF_SCREEN(screen->showSimpleBanner(\"Bluetooth OFF\\nRebooting\", 3000));\n            rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 2000;\n        } else {\n            IF_SCREEN(screen->showSimpleBanner(\"Bluetooth ON\\nRebooting\", 3000));\n            rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        }\n#else\n        if (!config.bluetooth.enabled) {\n            disableBluetooth();\n            IF_SCREEN(screen->showSimpleBanner(\"Bluetooth OFF\", 3000));\n        } else {\n            IF_SCREEN(screen->showSimpleBanner(\"Bluetooth ON\\nRebooting\", 3000));\n            rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        }\n#endif\n        return 0;\n    case INPUT_BROKER_MSG_REBOOT:\n        IF_SCREEN(screen->showSimpleBanner(\"Rebooting...\", 0));\n        nodeDB->saveToDisk();\n#if HAS_SCREEN\n        messageStore.saveToFlash();\n#endif\n        rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;\n        // runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;\n        return true;\n    }\n\n    switch (event->inputEvent) {\n        // GPS\n    case INPUT_BROKER_GPS_TOGGLE:\n#if !MESHTASTIC_EXCLUDE_GPS\n        if (gps) {\n            if (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED &&\n                config.position.fixed_position == false) {\n                nodeDB->clearLocalPosition();\n                nodeDB->saveToDisk();\n            }\n            gps->toggleGpsMode();\n            const char *msg =\n                (config.position.gps_mode == meshtastic_Config_PositionConfig_GpsMode_ENABLED) ? \"GPS Enabled\" : \"GPS Disabled\";\n            IF_SCREEN(screen->forceDisplay(); screen->showSimpleBanner(msg, 3000);)\n        }\n#endif\n        return true;\n    // Mesh ping\n    case INPUT_BROKER_SEND_PING:\n        service->refreshLocalMeshNode();\n        if (service->trySendPosition(NODENUM_BROADCAST, true)) {\n            IF_SCREEN(screen->showSimpleBanner(\"Position\\nSent\", 3000));\n        } else {\n            IF_SCREEN(screen->showSimpleBanner(\"Node Info\\nSent\", 3000));\n        }\n        return true;\n    // Power control\n    case INPUT_BROKER_SHUTDOWN:\n        shutdownAtMsec = millis();\n        return true;\n\n    default:\n        // No other input events handled here\n        break;\n    }\n    return false;\n}\n"
  },
  {
    "path": "src/modules/SystemCommandsModule.h",
    "content": "#pragma once\n\n#include \"MeshModule.h\"\n#include \"configuration.h\"\n#include \"input/InputBroker.h\"\n#include <Arduino.h>\n#include <functional>\n\nclass SystemCommandsModule\n{\n    CallbackObserver<SystemCommandsModule, const InputEvent *> inputObserver =\n        CallbackObserver<SystemCommandsModule, const InputEvent *>(this, &SystemCommandsModule::handleInputEvent);\n\n  public:\n    SystemCommandsModule();\n    int handleInputEvent(const InputEvent *event);\n};\n\nextern SystemCommandsModule *systemCommandsModule;"
  },
  {
    "path": "src/modules/Telemetry/AirQualityTelemetry.cpp",
    "content": "#include \"DebugConfiguration.h\"\n#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"AirQualityTelemetry.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"TransmitHistory.h\"\n#include \"UnitConversions.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/images.h\"\n#include \"main.h\"\n#include \"sleep.h\"\n#include <Throttle.h>\n\nstatic constexpr uint16_t TX_HISTORY_KEY_AIR_QUALITY_TELEMETRY = 0x8004;\n\n// Sensors\n#include \"Sensor/AddI2CSensorTemplate.h\"\n#include \"Sensor/PMSA003ISensor.h\"\n#include \"Sensor/SEN5XSensor.h\"\n#if __has_include(<SensirionI2cScd4x.h>)\n#include \"Sensor/SCD4XSensor.h\"\n#endif\n#if __has_include(<SensirionI2cSfa3x.h>)\n#include \"Sensor/SFA30Sensor.h\"\n#endif\n#if __has_include(<SensirionI2cScd30.h>)\n#include \"Sensor/SCD30Sensor.h\"\n#endif\n\nvoid AirQualityTelemetryModule::i2cScanFinished(ScanI2C *i2cScanner)\n{\n    if (!moduleConfig.telemetry.air_quality_enabled && !AIR_QUALITY_TELEMETRY_MODULE_ENABLE) {\n        return;\n    }\n    LOG_INFO(\"Air Quality Telemetry adding I2C devices...\");\n\n    /*\n        Uncomment the preferences below if you want to use the module\n        without having to configure it from the PythonAPI or WebUI.\n        Note: this was previously on runOnce, which didnt take effect\n        as other modules already had already been initialized (screen)\n    */\n\n    // moduleConfig.telemetry.air_quality_enabled = 1;\n    // moduleConfig.telemetry.air_quality_screen_enabled = 1;\n    // moduleConfig.telemetry.air_quality_interval = 15;\n\n    // order by priority of metrics/values (low top, high bottom)\n    addSensor<PMSA003ISensor>(i2cScanner, ScanI2C::DeviceType::PMSA003I);\n    addSensor<SEN5XSensor>(i2cScanner, ScanI2C::DeviceType::SEN5X);\n#if __has_include(<SensirionI2cScd4x.h>)\n    addSensor<SCD4XSensor>(i2cScanner, ScanI2C::DeviceType::SCD4X);\n#endif\n#if __has_include(<SensirionI2cSfa3x.h>)\n    addSensor<SFA30Sensor>(i2cScanner, ScanI2C::DeviceType::SFA30);\n#endif\n#if __has_include(<SensirionI2cScd30.h>)\n    addSensor<SCD30Sensor>(i2cScanner, ScanI2C::DeviceType::SCD30);\n#endif\n}\n\nint32_t AirQualityTelemetryModule::runOnce()\n{\n    if (sleepOnNextExecution == true) {\n        sleepOnNextExecution = false;\n        uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.air_quality_interval,\n                                                                   default_telemetry_broadcast_interval_secs);\n        LOG_DEBUG(\"Sleeping for %ims, then awaking to send metrics again.\", nightyNightMs);\n        doDeepSleep(nightyNightMs, true, false);\n    }\n\n    uint32_t result = UINT32_MAX;\n\n    if (!(moduleConfig.telemetry.air_quality_enabled || moduleConfig.telemetry.air_quality_screen_enabled ||\n          AIR_QUALITY_TELEMETRY_MODULE_ENABLE)) {\n        // If this module is not enabled, and the user doesn't want the display screen don't waste any OSThread time on it\n        return disable();\n    }\n\n    if (firstTime) {\n        // This is the first time the OSThread library has called this function, so\n        // do some setup\n        firstTime = false;\n\n        if (moduleConfig.telemetry.air_quality_enabled) {\n            LOG_INFO(\"Air quality Telemetry: init\");\n\n            // check if we have at least one sensor\n            if (!sensors.empty()) {\n                result = DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n            }\n        }\n\n        // it's possible to have this module enabled, only for displaying values on the screen.\n        // therefore, we should only enable the sensor loop if measurement is also enabled\n        return result == UINT32_MAX ? disable() : setStartDelay();\n    } else {\n        // if we somehow got to a second run of this module with measurement disabled, then just wait forever\n        if (!moduleConfig.telemetry.air_quality_enabled && !AIR_QUALITY_TELEMETRY_MODULE_ENABLE) {\n            return disable();\n        }\n\n        // Wake up the sensors that need it\n        LOG_INFO(\"Waking up sensors...\");\n        uint32_t lastTelemetry =\n            transmitHistory ? transmitHistory->getLastSentToMeshMillis(TX_HISTORY_KEY_AIR_QUALITY_TELEMETRY) : 0;\n        for (TelemetrySensor *sensor : sensors) {\n            if (!sensor->canSleep()) {\n                LOG_DEBUG(\"%s sensor doesn't have sleep feature. Skipping\", sensor->sensorName);\n            } else if (((lastTelemetry == 0) ||\n                        !Throttle::isWithinTimespanMs(lastTelemetry - sensor->wakeUpTimeMs(),\n                                                      Default::getConfiguredOrDefaultMsScaled(\n                                                          moduleConfig.telemetry.air_quality_interval,\n                                                          default_telemetry_broadcast_interval_secs, numOnlineNodes))) &&\n                       airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) &&\n                       airTime->isTxAllowedAirUtil()) {\n                if (!sensor->isActive()) {\n                    LOG_DEBUG(\"Waking up: %s\", sensor->sensorName);\n                    return sensor->wakeUp();\n                } else {\n                    int32_t pendingForReadyMs = sensor->pendingForReadyMs();\n                    LOG_DEBUG(\"%s. Pending for ready %ums\", sensor->sensorName, pendingForReadyMs);\n                    if (pendingForReadyMs) {\n                        return pendingForReadyMs;\n                    }\n                }\n            }\n        }\n\n        if (((lastTelemetry == 0) ||\n             !Throttle::isWithinTimespanMs(lastTelemetry, Default::getConfiguredOrDefaultMsScaled(\n                                                              moduleConfig.telemetry.air_quality_interval,\n                                                              default_telemetry_broadcast_interval_secs, numOnlineNodes))) &&\n            airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) &&\n            airTime->isTxAllowedAirUtil()) {\n            sendTelemetry();\n            if (transmitHistory)\n                transmitHistory->setLastSentToMesh(TX_HISTORY_KEY_AIR_QUALITY_TELEMETRY);\n        } else if (((lastSentToPhone == 0) || !Throttle::isWithinTimespanMs(lastSentToPhone, sendToPhoneIntervalMs)) &&\n                   (service->isToPhoneQueueEmpty())) {\n            // Just send to phone when it's not our time to send to mesh yet\n            // Only send while queue is empty (phone assumed connected)\n            sendTelemetry(NODENUM_BROADCAST, true);\n            lastSentToPhone = millis();\n        }\n\n        // Send to sleep sensors that consume power\n        LOG_DEBUG(\"Sending sensors to sleep\");\n        for (TelemetrySensor *sensor : sensors) {\n            if (sensor->isActive() && sensor->canSleep()) {\n                if (sensor->wakeUpTimeMs() <\n                    (int32_t)Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.air_quality_interval,\n                                                                     default_telemetry_broadcast_interval_secs, numOnlineNodes)) {\n                    LOG_DEBUG(\"Disabling %s until next period\", sensor->sensorName);\n                    sensor->sleep();\n                } else {\n                    LOG_DEBUG(\"Sensor stays enabled due to warm up period\");\n                }\n            }\n        }\n    }\n    return min(sendToPhoneIntervalMs, result);\n}\n\nbool AirQualityTelemetryModule::wantUIFrame()\n{\n    return moduleConfig.telemetry.air_quality_screen_enabled;\n}\n\n#if HAS_SCREEN\nvoid AirQualityTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    // === Setup display ===\n    display->clear();\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = (graphics::currentResolution == graphics::ScreenResolution::High) ? \"Air Quality\" : \"AQ.\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    // === Row spacing setup ===\n    const int rowHeight = FONT_HEIGHT_SMALL - 4;\n    int currentY = graphics::getTextPositions(display)[line++];\n\n    // === Show \"No Telemetry\" if no data available ===\n    if (!lastMeasurementPacket) {\n        display->drawString(x, currentY, \"No Telemetry\");\n        return;\n    }\n\n    // Decode the telemetry message from the latest received packet\n    const meshtastic_Data &p = lastMeasurementPacket->decoded;\n    meshtastic_Telemetry telemetry;\n    if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &telemetry)) {\n        display->drawString(x, currentY, \"No Telemetry\");\n        return;\n    }\n\n    const auto &m = telemetry.variant.air_quality_metrics;\n\n    // Check if any telemetry field has valid data\n    bool hasAny = m.has_pm10_standard || m.has_pm25_standard || m.has_pm100_standard || m.has_co2;\n\n    if (!hasAny) {\n        display->drawString(x, currentY, \"No Telemetry\");\n        return;\n    }\n\n    // === First line: Show sender name + time since received (left), and first metric (right) ===\n    const char *sender = getSenderShortName(*lastMeasurementPacket);\n    uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket);\n    String agoStr = (agoSecs > 864000) ? \"?\"\n                    : (agoSecs > 3600) ? String(agoSecs / 3600) + \"h\"\n                    : (agoSecs > 60)   ? String(agoSecs / 60) + \"m\"\n                                       : String(agoSecs) + \"s\";\n\n    String leftStr = String(sender) + \" (\" + agoStr + \")\";\n    display->drawString(x, currentY, leftStr); // Left side: who and when\n\n    // === Collect sensor readings as label strings (no icons) ===\n    std::vector<String> entries;\n\n    if (m.has_pm10_standard)\n        entries.push_back(\"PM1: \" + String(m.pm10_standard) + \"ug/m3\");\n    if (m.has_pm25_standard)\n        entries.push_back(\"PM2.5: \" + String(m.pm25_standard) + \"ug/m3\");\n    if (m.has_pm100_standard)\n        entries.push_back(\"PM10: \" + String(m.pm100_standard) + \"ug/m3\");\n    if (m.has_co2)\n        entries.push_back(\"CO2: \" + String(m.co2) + \"ppm\");\n    if (m.has_form_formaldehyde)\n        entries.push_back(\"HCHO: \" + String(m.form_formaldehyde) + \"ppb\");\n\n    // === Show first available metric on top-right of first line ===\n    if (!entries.empty()) {\n        String valueStr = entries.front();\n        int rightX = SCREEN_WIDTH - display->getStringWidth(valueStr);\n        display->drawString(rightX, currentY, valueStr);\n        entries.erase(entries.begin()); // Remove from queue\n    }\n\n    // === Advance to next line for remaining telemetry entries ===\n    currentY += rowHeight;\n\n    // === Draw remaining entries in 2-column format (left and right) ===\n    for (size_t i = 0; i < entries.size(); i += 2) {\n        // Left column\n        display->drawString(x, currentY, entries[i]);\n\n        // Right column if it exists\n        if (i + 1 < entries.size()) {\n            int rightX = SCREEN_WIDTH / 2;\n            display->drawString(rightX, currentY, entries[i + 1]);\n        }\n\n        currentY += rowHeight;\n    }\n    graphics::drawCommonFooter(display, x, y);\n}\n#endif\n\nbool AirQualityTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)\n{\n    if (t->which_variant == meshtastic_Telemetry_air_quality_metrics_tag) {\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n        const char *sender = getSenderShortName(mp);\n\n        if (t->variant.air_quality_metrics.has_pm10_standard)\n            LOG_INFO(\"(Received from %s): pm10_standard=%i, pm25_standard=%i, \"\n                     \"pm100_standard=%i\",\n                     sender, t->variant.air_quality_metrics.pm10_standard, t->variant.air_quality_metrics.pm25_standard,\n                     t->variant.air_quality_metrics.pm100_standard);\n\n        if (t->variant.air_quality_metrics.has_co2)\n            LOG_INFO(\"CO2=%i, CO2_T=%.2f, CO2_H=%.2f\", t->variant.air_quality_metrics.co2,\n                     t->variant.air_quality_metrics.co2_temperature, t->variant.air_quality_metrics.co2_humidity);\n\n        if (t->variant.air_quality_metrics.has_form_formaldehyde)\n            LOG_INFO(\"HCHO=%.2f, HCHO_T=%.2f, HCHO_H=%.2f\", t->variant.air_quality_metrics.form_formaldehyde,\n                     t->variant.air_quality_metrics.form_temperature, t->variant.air_quality_metrics.form_humidity);\n#endif\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(mp);\n    }\n\n    return false; // Let others look at this message also if they want\n}\n\nbool AirQualityTelemetryModule::getAirQualityTelemetry(meshtastic_Telemetry *m)\n{\n    // Note: this is different to the case in EnvironmentTelemetryModule\n    // There, if any sensor fails to read - valid = false.\n    bool valid = false;\n    bool hasSensor = false;\n    m->time = getTime();\n    m->which_variant = meshtastic_Telemetry_air_quality_metrics_tag;\n    m->variant.air_quality_metrics = meshtastic_AirQualityMetrics_init_zero;\n\n    bool sensor_get = false;\n    for (TelemetrySensor *sensor : sensors) {\n        LOG_DEBUG(\"Reading %s\", sensor->sensorName);\n        // Note - this function doesn't get properly called if within a conditional\n        sensor_get = sensor->getMetrics(m);\n        valid = valid || sensor_get;\n        hasSensor = true;\n    }\n\n    return valid && hasSensor;\n}\n\nmeshtastic_MeshPacket *AirQualityTelemetryModule::allocReply()\n{\n    if (currentRequest) {\n        if (isMultiHopBroadcastRequest() && !isSensorOrRouterRole()) {\n            ignoreRequest = true;\n            return NULL;\n        }\n        auto req = *currentRequest;\n        const auto &p = req.decoded;\n        meshtastic_Telemetry scratch;\n        meshtastic_Telemetry *decoded = NULL;\n        memset(&scratch, 0, sizeof(scratch));\n        if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) {\n            decoded = &scratch;\n        } else {\n            LOG_ERROR(\"Error decoding AirQualityTelemetry module!\");\n            return NULL;\n        }\n        // Check for a request for air quality metrics\n        if (decoded->which_variant == meshtastic_Telemetry_air_quality_metrics_tag) {\n            meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n            if (getAirQualityTelemetry(&m)) {\n                LOG_INFO(\"Air quality telemetry reply to request\");\n                return allocDataProtobuf(m);\n            } else {\n                return NULL;\n            }\n        }\n    }\n    return NULL;\n}\n\nbool AirQualityTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)\n{\n    meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n    m.which_variant = meshtastic_Telemetry_air_quality_metrics_tag;\n    m.time = getTime();\n\n    if (getAirQualityTelemetry(&m)) {\n\n        bool hasAnyPM =\n            m.variant.air_quality_metrics.has_pm10_standard || m.variant.air_quality_metrics.has_pm25_standard ||\n            m.variant.air_quality_metrics.has_pm100_standard || m.variant.air_quality_metrics.has_pm10_environmental ||\n            m.variant.air_quality_metrics.has_pm25_environmental || m.variant.air_quality_metrics.has_pm100_environmental;\n\n        if (hasAnyPM) {\n            LOG_INFO(\"Send: pm10_standard=%u, pm25_standard=%u, pm100_standard=%u\", m.variant.air_quality_metrics.pm10_standard,\n                     m.variant.air_quality_metrics.pm25_standard, m.variant.air_quality_metrics.pm100_standard);\n            if (m.variant.air_quality_metrics.has_pm10_environmental)\n                LOG_INFO(\"pm10_environmental=%u, pm25_environmental=%u, pm100_environmental=%u\",\n                         m.variant.air_quality_metrics.pm10_environmental, m.variant.air_quality_metrics.pm25_environmental,\n                         m.variant.air_quality_metrics.pm100_environmental);\n        }\n\n        bool hasAnyCO2 = m.variant.air_quality_metrics.has_co2 || m.variant.air_quality_metrics.has_co2_temperature ||\n                         m.variant.air_quality_metrics.has_co2_humidity;\n\n        if (hasAnyCO2) {\n            LOG_INFO(\"Send: co2=%i, co2_t=%.2f, co2_rh=%.2f\", m.variant.air_quality_metrics.co2,\n                     m.variant.air_quality_metrics.co2_temperature, m.variant.air_quality_metrics.co2_humidity);\n        }\n\n        bool hasAnyHCHO = m.variant.air_quality_metrics.has_form_formaldehyde ||\n                          m.variant.air_quality_metrics.has_form_temperature || m.variant.air_quality_metrics.has_form_humidity;\n\n        if (hasAnyHCHO) {\n            LOG_INFO(\"Send: hcho=%.2f, hcho_t=%.2f, hcho_rh=%.2f\", m.variant.air_quality_metrics.form_formaldehyde,\n                     m.variant.air_quality_metrics.form_temperature, m.variant.air_quality_metrics.form_humidity);\n        }\n\n        meshtastic_MeshPacket *p = allocDataProtobuf(m);\n        p->to = dest;\n        p->decoded.want_response = false;\n        if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR)\n            p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n        else\n            p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(*p);\n        if (phoneOnly) {\n            LOG_INFO(\"Sending packet to phone\");\n            service->sendToPhone(p);\n        } else {\n            LOG_INFO(\"Sending packet to mesh\");\n            service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n            if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) {\n                meshtastic_ClientNotification *notification = clientNotificationPool.allocZeroed();\n                notification->level = meshtastic_LogRecord_Level_INFO;\n                notification->time = getValidTime(RTCQualityFromNet);\n                sprintf(notification->message, \"Sending telemetry and sleeping for %us interval in a moment\",\n                        Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.air_quality_interval,\n                                                          default_telemetry_broadcast_interval_secs) /\n                            1000U);\n                service->sendClientNotification(notification);\n                sleepOnNextExecution = true;\n                LOG_DEBUG(\"Start next execution in 5s, then sleep\");\n                setIntervalFromNow(FIVE_SECONDS_MS);\n            }\n\n            if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) {\n                meshtastic_ClientNotification *notification = clientNotificationPool.allocZeroed();\n                notification->level = meshtastic_LogRecord_Level_INFO;\n                notification->time = getValidTime(RTCQualityFromNet);\n                sprintf(notification->message, \"Sending telemetry and sleeping for %us interval in a moment\",\n                        Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.air_quality_interval,\n                                                          default_telemetry_broadcast_interval_secs) /\n                            1000U);\n                service->sendClientNotification(notification);\n                sleepOnNextExecution = true;\n                LOG_DEBUG(\"Start next execution in 5s, then sleep\");\n                setIntervalFromNow(FIVE_SECONDS_MS);\n            }\n        }\n        return true;\n    }\n    return false;\n}\n\nAdminMessageHandleResult AirQualityTelemetryModule::handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                                meshtastic_AdminMessage *request,\n                                                                                meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result = AdminMessageHandleResult::NOT_HANDLED;\n\n    for (TelemetrySensor *sensor : sensors) {\n        result = sensor->handleAdminMessage(mp, request, response);\n        if (result != AdminMessageHandleResult::NOT_HANDLED)\n            return result;\n    }\n\n    return result;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/AirQualityTelemetry.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#pragma once\n\n#include \"BaseTelemetryModule.h\"\n\n#ifndef AIR_QUALITY_TELEMETRY_MODULE_ENABLE\n#define AIR_QUALITY_TELEMETRY_MODULE_ENABLE 0\n#endif\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"NodeDB.h\"\n#include \"ProtobufModule.h\"\n#include \"detect/ScanI2CConsumer.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nclass AirQualityTelemetryModule : private concurrency::OSThread,\n                                  public ScanI2CConsumer,\n                                  public BaseTelemetryModule,\n                                  public ProtobufModule<meshtastic_Telemetry>\n{\n    CallbackObserver<AirQualityTelemetryModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<AirQualityTelemetryModule, const meshtastic::Status *>(this,\n                                                                                &AirQualityTelemetryModule::handleStatusUpdate);\n\n  public:\n    AirQualityTelemetryModule()\n        : concurrency::OSThread(\"AirQualityTelemetry\"), ScanI2CConsumer(),\n          ProtobufModule(\"AirQualityTelemetry\", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg)\n    {\n        lastMeasurementPacket = nullptr;\n        nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n        setIntervalFromNow(10 * 1000);\n    }\n    virtual bool wantUIFrame() override;\n#if !HAS_SCREEN\n    void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n#else\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n\n  protected:\n    /** Called to handle a particular incoming message\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override;\n    virtual int32_t runOnce() override;\n    /** Called to get current Air Quality data\n    @return true if it contains valid data\n    */\n    bool getAirQualityTelemetry(meshtastic_Telemetry *m);\n    virtual meshtastic_MeshPacket *allocReply() override;\n    /**\n     * Send our Telemetry into the mesh\n     */\n    bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n    virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                 meshtastic_AdminMessage *request,\n                                                                 meshtastic_AdminMessage *response) override;\n    void i2cScanFinished(ScanI2C *i2cScanner);\n\n  private:\n    bool firstTime = true;\n    meshtastic_MeshPacket *lastMeasurementPacket;\n    uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute\n    // uint32_t sendToPhoneIntervalMs = 1000; // Send to phone every minute\n    uint32_t lastSentToPhone = 0;\n};\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/BaseTelemetryModule.h",
    "content": "#pragma once\n\n#include \"NodeDB.h\"\n#include \"configuration.h\"\n\nclass BaseTelemetryModule\n{\n  protected:\n    bool isSensorOrRouterRole() const\n    {\n        return config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR ||\n               config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n               config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE;\n    }\n};\n"
  },
  {
    "path": "src/modules/Telemetry/DeviceTelemetry.cpp",
    "content": "#include \"DeviceTelemetry.h\"\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"RadioLibInterface.h\"\n#include \"Router.h\"\n#include \"TransmitHistory.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"memGet.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n#include <meshUtils.h>\n\n#define MAGIC_USB_BATTERY_LEVEL 101\nstatic constexpr uint16_t TX_HISTORY_KEY_DEVICE_TELEMETRY = 0x8001;\n\nint32_t DeviceTelemetryModule::runOnce()\n{\n    refreshUptime();\n    uint32_t lastTelemetry = transmitHistory ? transmitHistory->getLastSentToMeshMillis(TX_HISTORY_KEY_DEVICE_TELEMETRY) : 0;\n    bool isImpoliteRole = isSensorOrRouterRole();\n    if (((lastTelemetry == 0) ||\n         ((uptimeLastMs - lastTelemetry) >= Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.device_update_interval,\n                                                                                    default_telemetry_broadcast_interval_secs,\n                                                                                    numOnlineNodes))) &&\n        airTime->isTxAllowedChannelUtil(!isImpoliteRole) && airTime->isTxAllowedAirUtil() &&\n        config.device.role != meshtastic_Config_DeviceConfig_Role_CLIENT_HIDDEN &&\n        moduleConfig.telemetry.device_telemetry_enabled) {\n        sendTelemetry();\n        if (transmitHistory)\n            transmitHistory->setLastSentToMesh(TX_HISTORY_KEY_DEVICE_TELEMETRY);\n    } else if (service->isToPhoneQueueEmpty()) {\n        // Just send to phone when it's not our time to send to mesh yet\n        // Only send while queue is empty (phone assumed connected)\n        sendTelemetry(NODENUM_BROADCAST, true);\n        if (lastSentStatsToPhone == 0 || (uptimeLastMs - lastSentStatsToPhone) >= sendStatsToPhoneIntervalMs) {\n            sendLocalStatsToPhone();\n            lastSentStatsToPhone = uptimeLastMs;\n        }\n    }\n    return sendToPhoneIntervalMs;\n}\n\nbool DeviceTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)\n{\n    if (t->which_variant == meshtastic_Telemetry_device_metrics_tag) {\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n        const char *sender = getSenderShortName(mp);\n\n        LOG_INFO(\"(Received from %s): air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f\", sender,\n                 t->variant.device_metrics.air_util_tx, t->variant.device_metrics.channel_utilization,\n                 t->variant.device_metrics.battery_level, t->variant.device_metrics.voltage);\n#endif\n        nodeDB->updateTelemetry(getFrom(&mp), *t, RX_SRC_RADIO);\n    }\n    return false; // Let others look at this message also if they want\n}\n\nmeshtastic_MeshPacket *DeviceTelemetryModule::allocReply()\n{\n    if (currentRequest) {\n        if (isMultiHopBroadcastRequest() && !isSensorOrRouterRole()) {\n            ignoreRequest = true;\n            return NULL;\n        }\n        auto req = *currentRequest;\n        const auto &p = req.decoded;\n        meshtastic_Telemetry scratch;\n        meshtastic_Telemetry *decoded = NULL;\n        memset(&scratch, 0, sizeof(scratch));\n        if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) {\n            decoded = &scratch;\n        } else {\n            LOG_ERROR(\"Error decoding DeviceTelemetry module!\");\n            return NULL;\n        }\n        // Check for a request for device metrics\n        if (decoded->which_variant == meshtastic_Telemetry_device_metrics_tag) {\n            LOG_INFO(\"Device telemetry reply to request\");\n            return allocDataProtobuf(getDeviceTelemetry());\n        } else if (decoded->which_variant == meshtastic_Telemetry_local_stats_tag) {\n            LOG_INFO(\"Device telemetry reply w/ LocalStats to request\");\n            return allocDataProtobuf(getLocalStatsTelemetry());\n        }\n    }\n    return NULL;\n}\n\nmeshtastic_Telemetry DeviceTelemetryModule::getDeviceTelemetry()\n{\n    meshtastic_Telemetry t = meshtastic_Telemetry_init_zero;\n    t.which_variant = meshtastic_Telemetry_device_metrics_tag;\n    t.time = getTime();\n    t.variant.device_metrics = meshtastic_DeviceMetrics_init_zero;\n    t.variant.device_metrics.has_air_util_tx = true;\n    t.variant.device_metrics.has_battery_level = true;\n    t.variant.device_metrics.has_channel_utilization = true;\n    t.variant.device_metrics.has_voltage = true;\n    t.variant.device_metrics.has_uptime_seconds = true;\n\n    t.variant.device_metrics.air_util_tx = airTime->utilizationTXPercent();\n    t.variant.device_metrics.battery_level = (!powerStatus->getHasBattery() || powerStatus->getIsCharging())\n                                                 ? MAGIC_USB_BATTERY_LEVEL\n                                                 : powerStatus->getBatteryChargePercent();\n    t.variant.device_metrics.channel_utilization = airTime->channelUtilizationPercent();\n    t.variant.device_metrics.voltage = powerStatus->getBatteryVoltageMv() / 1000.0;\n    t.variant.device_metrics.uptime_seconds = getUptimeSeconds();\n\n    return t;\n}\n\nmeshtastic_Telemetry DeviceTelemetryModule::getLocalStatsTelemetry()\n{\n    meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero;\n    telemetry.which_variant = meshtastic_Telemetry_local_stats_tag;\n    telemetry.variant.local_stats = meshtastic_LocalStats_init_zero;\n    telemetry.time = getTime();\n    telemetry.variant.local_stats.uptime_seconds = getUptimeSeconds();\n    telemetry.variant.local_stats.channel_utilization = airTime->channelUtilizationPercent();\n    telemetry.variant.local_stats.air_util_tx = airTime->utilizationTXPercent();\n    telemetry.variant.local_stats.num_online_nodes = numOnlineNodes;\n    telemetry.variant.local_stats.num_total_nodes = nodeDB->getNumMeshNodes();\n    if (RadioLibInterface::instance) {\n        telemetry.variant.local_stats.num_packets_tx = RadioLibInterface::instance->txGood;\n        telemetry.variant.local_stats.num_packets_rx = RadioLibInterface::instance->rxGood + RadioLibInterface::instance->rxBad;\n        telemetry.variant.local_stats.num_packets_rx_bad = RadioLibInterface::instance->rxBad;\n        telemetry.variant.local_stats.num_tx_relay = RadioLibInterface::instance->txRelay;\n        telemetry.variant.local_stats.num_tx_dropped = RadioLibInterface::instance->txDrop;\n    }\n#ifdef ARCH_PORTDUINO\n    if (SimRadio::instance) {\n        telemetry.variant.local_stats.num_packets_tx = SimRadio::instance->txGood;\n        telemetry.variant.local_stats.num_packets_rx = SimRadio::instance->rxGood + SimRadio::instance->rxBad;\n        telemetry.variant.local_stats.num_packets_rx_bad = SimRadio::instance->rxBad;\n        telemetry.variant.local_stats.num_tx_relay = SimRadio::instance->txRelay;\n        telemetry.variant.local_stats.num_tx_dropped = SimRadio::instance->txDrop;\n    }\n#else\n    telemetry.variant.local_stats.heap_total_bytes = memGet.getHeapSize();\n    telemetry.variant.local_stats.heap_free_bytes = memGet.getFreeHeap();\n#endif\n    if (router) {\n        telemetry.variant.local_stats.num_rx_dupe = router->rxDupe;\n        telemetry.variant.local_stats.num_tx_relay_canceled = router->txRelayCanceled;\n    }\n\n    LOG_INFO(\"Sending local stats: uptime=%i, channel_utilization=%f, air_util_tx=%f, num_online_nodes=%i, num_total_nodes=%i\",\n             telemetry.variant.local_stats.uptime_seconds, telemetry.variant.local_stats.channel_utilization,\n             telemetry.variant.local_stats.air_util_tx, telemetry.variant.local_stats.num_online_nodes,\n             telemetry.variant.local_stats.num_total_nodes);\n\n    LOG_INFO(\"num_packets_tx=%i, num_packets_rx=%i, num_packets_rx_bad=%i\", telemetry.variant.local_stats.num_packets_tx,\n             telemetry.variant.local_stats.num_packets_rx, telemetry.variant.local_stats.num_packets_rx_bad);\n\n    return telemetry;\n}\n\nvoid DeviceTelemetryModule::sendLocalStatsToPhone()\n{\n    meshtastic_MeshPacket *p = allocDataProtobuf(getLocalStatsTelemetry());\n    p->to = NODENUM_BROADCAST;\n    p->decoded.want_response = false;\n    p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n\n    service->sendToPhone(p);\n}\n\nbool DeviceTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)\n{\n    meshtastic_Telemetry telemetry = getDeviceTelemetry();\n    LOG_INFO(\"Send: air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f, uptime=%i\",\n             telemetry.variant.device_metrics.air_util_tx, telemetry.variant.device_metrics.channel_utilization,\n             telemetry.variant.device_metrics.battery_level, telemetry.variant.device_metrics.voltage,\n             telemetry.variant.device_metrics.uptime_seconds);\n\n    DEBUG_HEAP_BEFORE;\n    meshtastic_MeshPacket *p = allocDataProtobuf(telemetry);\n    DEBUG_HEAP_AFTER(\"DeviceTelemetryModule::sendTelemetry\", p);\n\n    p->to = dest;\n    p->decoded.want_response = false;\n    p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n\n    nodeDB->updateTelemetry(nodeDB->getNodeNum(), telemetry, RX_SRC_LOCAL);\n    if (phoneOnly) {\n        LOG_INFO(\"Send packet to phone\");\n        service->sendToPhone(p);\n    } else {\n        LOG_INFO(\"Send packet to mesh\");\n        service->sendToMesh(p, RX_SRC_LOCAL, true);\n    }\n    return true;\n}"
  },
  {
    "path": "src/modules/Telemetry/DeviceTelemetry.h",
    "content": "#pragma once\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BaseTelemetryModule.h\"\n#include \"NodeDB.h\"\n#include \"ProtobufModule.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nclass DeviceTelemetryModule : private concurrency::OSThread,\n                              public BaseTelemetryModule,\n                              public ProtobufModule<meshtastic_Telemetry>\n{\n    CallbackObserver<DeviceTelemetryModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<DeviceTelemetryModule, const meshtastic::Status *>(this, &DeviceTelemetryModule::handleStatusUpdate);\n\n  public:\n    DeviceTelemetryModule()\n        : concurrency::OSThread(\"DeviceTelemetry\"),\n          ProtobufModule(\"DeviceTelemetry\", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg)\n    {\n        uptimeWrapCount = 0;\n        uptimeLastMs = millis();\n        nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n        setIntervalFromNow(setStartDelay()); // Wait until NodeInfo is sent\n    }\n    virtual bool wantUIFrame() { return false; }\n\n  protected:\n    /** Called to handle a particular incoming message\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override;\n    virtual meshtastic_MeshPacket *allocReply() override;\n    virtual int32_t runOnce() override;\n    /**\n     * Send our Telemetry into the mesh\n     */\n    bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool phoneOnly = false);\n\n    /**\n     * Get the uptime in seconds\n     * Loses some accuracy after 49 days, but that's fine\n     */\n    uint32_t getUptimeSeconds() { return (0xFFFFFFFF / 1000) * uptimeWrapCount + (uptimeLastMs / 1000); }\n\n  private:\n    meshtastic_Telemetry getDeviceTelemetry();\n    meshtastic_Telemetry getLocalStatsTelemetry();\n\n    void sendLocalStatsToPhone();\n    uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000;           // Send to phone every minute\n    uint32_t sendStatsToPhoneIntervalMs = 15 * SECONDS_IN_MINUTE * 1000; // Send stats to phone every 15 minutes\n    uint32_t lastSentStatsToPhone = 0;\n\n    void refreshUptime()\n    {\n        auto now = millis();\n        // If we wrapped around (~49 days), increment the wrap count\n        if (now < uptimeLastMs)\n            uptimeWrapCount++;\n\n        uptimeLastMs = now;\n    }\n\n    uint32_t uptimeWrapCount;\n    uint32_t uptimeLastMs;\n};"
  },
  {
    "path": "src/modules/Telemetry/EnvironmentTelemetry.cpp",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"Default.h\"\n#include \"EnvironmentTelemetry.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"TransmitHistory.h\"\n#include \"UnitConversions.h\"\n#include \"buzz.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/images.h\"\n#include \"main.h\"\n#include \"modules/ExternalNotificationModule.h\"\n#include \"power.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n#include <OLEDDisplay.h>\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL\n\n// Sensors\n#include \"Sensor/CGRadSensSensor.h\"\n#include \"Sensor/RCWL9620Sensor.h\"\n#include \"Sensor/nullSensor.h\"\n\nnamespace graphics\n{\nextern void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y, const char *titleStr, bool force_no_invert,\n                             bool show_date);\n}\n#if __has_include(<Adafruit_AHTX0.h>)\n#include \"Sensor/AHT10.h\"\n#endif\n\n#if __has_include(<Adafruit_BME280.h>)\n#include \"Sensor/BME280Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_BMP085.h>)\n#include \"Sensor/BMP085Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_BMP280.h>)\n#include \"Sensor/BMP280Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_LTR390.h>)\n#include \"Sensor/LTR390UVSensor.h\"\n#endif\n\n#if __has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>)\n#include \"Sensor/BME680Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_DPS310.h>)\n#include \"Sensor/DPS310Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_MCP9808.h>)\n#include \"Sensor/MCP9808Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_SHT31.h>)\n#include \"Sensor/SHT31Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_LPS2X.h>)\n#include \"Sensor/LPS22HBSensor.h\"\n#endif\n\n#if __has_include(<Adafruit_SHTC3.h>)\n#include \"Sensor/SHTC3Sensor.h\"\n#endif\n\n#if __has_include(\"RAK12035_SoilMoisture.h\") && defined(RAK_4631) && RAK_4631 == 1\n#include \"Sensor/RAK12035Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_VEML7700.h>)\n#include \"Sensor/VEML7700Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_TSL2591.h>)\n#include \"Sensor/TSL2591Sensor.h\"\n#endif\n\n#if __has_include(<ClosedCube_OPT3001.h>)\n#include \"Sensor/OPT3001Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_SHT4x.h>)\n#include \"Sensor/SHT4XSensor.h\"\n#endif\n\n#if __has_include(<SparkFun_MLX90632_Arduino_Library.h>)\n#include \"Sensor/MLX90632Sensor.h\"\n#endif\n\n#if __has_include(<DFRobot_LarkWeatherStation.h>)\n#include \"Sensor/DFRobotLarkSensor.h\"\n#endif\n\n#if __has_include(<DFRobot_RainfallSensor.h>)\n#include \"Sensor/DFRobotGravitySensor.h\"\n#endif\n\n#if __has_include(<SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.h>)\n#include \"Sensor/NAU7802Sensor.h\"\n#endif\n\n#if __has_include(<Adafruit_BMP3XX.h>)\n#include \"Sensor/BMP3XXSensor.h\"\n#endif\n\n#if __has_include(<Adafruit_PCT2075.h>)\n#include \"Sensor/PCT2075Sensor.h\"\n#endif\n\n#endif\n#ifdef T1000X_SENSOR_EN\n#include \"Sensor/T1000xSensor.h\"\n#endif\n\n#ifdef SENSECAP_INDICATOR\n#include \"Sensor/IndicatorSensor.h\"\n#endif\n\n#if __has_include(<Adafruit_TSL2561_U.h>)\n#include \"Sensor/TSL2561Sensor.h\"\n#endif\n\n#if __has_include(<BH1750_WE.h>)\n#include \"Sensor/BH1750Sensor.h\"\n#endif\n\n#define FAILED_STATE_SENSOR_READ_MULTIPLIER 10\n#define DISPLAY_RECEIVEID_MEASUREMENTS_ON_SCREEN true\n\n#include \"Sensor/AddI2CSensorTemplate.h\"\n#include \"graphics/ScreenFonts.h\"\n#include <Throttle.h>\n\nstatic constexpr uint16_t TX_HISTORY_KEY_ENVIRONMENT_TELEMETRY = 0x8002;\n\nvoid EnvironmentTelemetryModule::i2cScanFinished(ScanI2C *i2cScanner)\n{\n    if (!moduleConfig.telemetry.environment_measurement_enabled && !ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE) {\n        return;\n    }\n    LOG_INFO(\"Environment Telemetry adding I2C devices...\");\n\n    // order by priority of metrics/values (low top, high bottom)\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n#ifdef T1000X_SENSOR_EN\n    // Not a real I2C device\n    addSensor<T1000xSensor>(i2cScanner, ScanI2C::DeviceType::NONE);\n#else\n#ifdef SENSECAP_INDICATOR\n    // Not a real I2C device, uses UART\n    addSensor<IndicatorSensor>(i2cScanner, ScanI2C::DeviceType::NONE);\n#endif\n    addSensor<RCWL9620Sensor>(i2cScanner, ScanI2C::DeviceType::RCWL9620);\n    addSensor<CGRadSensSensor>(i2cScanner, ScanI2C::DeviceType::CGRADSENS);\n#endif\n#endif\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL\n#if __has_include(<DFRobot_LarkWeatherStation.h>)\n    addSensor<DFRobotLarkSensor>(i2cScanner, ScanI2C::DeviceType::DFROBOT_LARK);\n#endif\n#if __has_include(<DFRobot_RainfallSensor.h>)\n    addSensor<DFRobotGravitySensor>(i2cScanner, ScanI2C::DeviceType::DFROBOT_RAIN);\n#endif\n#if __has_include(<Adafruit_AHTX0.h>)\n    addSensor<AHT10Sensor>(i2cScanner, ScanI2C::DeviceType::AHT10);\n#endif\n#if __has_include(<Adafruit_BMP085.h>)\n    addSensor<BMP085Sensor>(i2cScanner, ScanI2C::DeviceType::BMP_085);\n#endif\n#if __has_include(<Adafruit_BME280.h>)\n    addSensor<BME280Sensor>(i2cScanner, ScanI2C::DeviceType::BME_280);\n#endif\n#if __has_include(<Adafruit_LTR390.h>)\n    addSensor<LTR390UVSensor>(i2cScanner, ScanI2C::DeviceType::LTR390UV);\n#endif\n#if __has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>)\n    addSensor<BME680Sensor>(i2cScanner, ScanI2C::DeviceType::BME_680);\n#endif\n#if __has_include(<Adafruit_BMP280.h>)\n    addSensor<BMP280Sensor>(i2cScanner, ScanI2C::DeviceType::BMP_280);\n#endif\n#if __has_include(<Adafruit_DPS310.h>)\n    addSensor<DPS310Sensor>(i2cScanner, ScanI2C::DeviceType::DPS310);\n#endif\n#if __has_include(<Adafruit_MCP9808.h>)\n    addSensor<MCP9808Sensor>(i2cScanner, ScanI2C::DeviceType::MCP9808);\n#endif\n#if __has_include(<Adafruit_SHT31.h>)\n    addSensor<SHT31Sensor>(i2cScanner, ScanI2C::DeviceType::SHT31);\n#endif\n#if __has_include(<Adafruit_LPS2X.h>)\n    addSensor<LPS22HBSensor>(i2cScanner, ScanI2C::DeviceType::LPS22HB);\n#endif\n#if __has_include(<Adafruit_SHTC3.h>)\n    addSensor<SHTC3Sensor>(i2cScanner, ScanI2C::DeviceType::SHTC3);\n#endif\n#if __has_include(\"RAK12035_SoilMoisture.h\") && defined(RAK_4631) && RAK_4631 == 1\n    addSensor<RAK12035Sensor>(i2cScanner, ScanI2C::DeviceType::RAK12035);\n#endif\n#if __has_include(<Adafruit_VEML7700.h>)\n    addSensor<VEML7700Sensor>(i2cScanner, ScanI2C::DeviceType::VEML7700);\n#endif\n#if __has_include(<Adafruit_TSL2591.h>)\n    addSensor<TSL2591Sensor>(i2cScanner, ScanI2C::DeviceType::TSL2591);\n#endif\n#if __has_include(<ClosedCube_OPT3001.h>)\n    addSensor<OPT3001Sensor>(i2cScanner, ScanI2C::DeviceType::OPT3001);\n#endif\n#if __has_include(<Adafruit_SHT4x.h>)\n    addSensor<SHT4XSensor>(i2cScanner, ScanI2C::DeviceType::SHT4X);\n#endif\n#if __has_include(<SparkFun_MLX90632_Arduino_Library.h>)\n    addSensor<MLX90632Sensor>(i2cScanner, ScanI2C::DeviceType::MLX90632);\n#endif\n\n#if __has_include(<Adafruit_BMP3XX.h>)\n    addSensor<BMP3XXSensor>(i2cScanner, ScanI2C::DeviceType::BMP_3XX);\n#endif\n#if __has_include(<Adafruit_PCT2075.h>)\n    addSensor<PCT2075Sensor>(i2cScanner, ScanI2C::DeviceType::PCT2075);\n#endif\n#if __has_include(<Adafruit_TSL2561_U.h>)\n    addSensor<TSL2561Sensor>(i2cScanner, ScanI2C::DeviceType::TSL2561);\n#endif\n#if __has_include(<SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.h>)\n    addSensor<NAU7802Sensor>(i2cScanner, ScanI2C::DeviceType::NAU7802);\n#endif\n#if __has_include(<BH1750_WE.h>)\n    addSensor<BH1750Sensor>(i2cScanner, ScanI2C::DeviceType::BH1750);\n#endif\n\n#endif\n}\n\nint32_t EnvironmentTelemetryModule::runOnce()\n{\n    if (sleepOnNextExecution == true) {\n        sleepOnNextExecution = false;\n        uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.environment_update_interval,\n                                                                   default_telemetry_broadcast_interval_secs);\n        LOG_DEBUG(\"Sleep for %ims, then awake to send metrics again\", nightyNightMs);\n        doDeepSleep(nightyNightMs, true, false);\n    }\n\n    uint32_t result = UINT32_MAX;\n    /*\n        Uncomment the preferences below if you want to use the module\n        without having to configure it from the PythonAPI or WebUI.\n    */\n\n    // moduleConfig.telemetry.environment_measurement_enabled = 1;\n    // moduleConfig.telemetry.environment_screen_enabled = 1;\n    // moduleConfig.telemetry.environment_update_interval = 15;\n\n    if (!(moduleConfig.telemetry.environment_measurement_enabled || moduleConfig.telemetry.environment_screen_enabled ||\n          ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE)) {\n        // If this module is not enabled, and the user doesn't want the display screen don't waste any OSThread time on it\n        return disable();\n    }\n\n    if (firstTime) {\n        // This is the first time the OSThread library has called this function, so do some setup\n        firstTime = 0;\n\n        if (moduleConfig.telemetry.environment_measurement_enabled || ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE) {\n            LOG_INFO(\"Environment Telemetry: init\");\n\n            // check if we have at least one sensor\n            if (!sensors.empty()) {\n                result = DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n            }\n\n#ifdef T1000X_SENSOR_EN\n#elif !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL\n            if (ina219Sensor.hasSensor())\n                result = ina219Sensor.runOnce();\n            if (ina260Sensor.hasSensor())\n                result = ina260Sensor.runOnce();\n            if (ina3221Sensor.hasSensor())\n                result = ina3221Sensor.runOnce();\n            if (max17048Sensor.hasSensor())\n                result = max17048Sensor.runOnce();\n                // this only works on the wismesh hub with the solar option. This is not an I2C sensor, so we don't need the\n                // sensormap here.\n#ifdef HAS_RAKPROT\n            if (rak9154Sensor.hasSensor())\n                result = rak9154Sensor.runOnce();\n#endif\n#endif\n        }\n        // it's possible to have this module enabled, only for displaying values on the screen.\n        // therefore, we should only enable the sensor loop if measurement is also enabled\n        return result == UINT32_MAX ? disable() : setStartDelay();\n    } else {\n        // if we somehow got to a second run of this module with measurement disabled, then just wait forever\n        if (!moduleConfig.telemetry.environment_measurement_enabled && !ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE) {\n            return disable();\n        }\n\n        for (TelemetrySensor *sensor : sensors) {\n            uint32_t delay = sensor->runOnce();\n            if (delay < result) {\n                result = delay;\n            }\n        }\n\n        uint32_t lastTelemetry =\n            transmitHistory ? transmitHistory->getLastSentToMeshMillis(TX_HISTORY_KEY_ENVIRONMENT_TELEMETRY) : 0;\n        if (((lastTelemetry == 0) ||\n             !Throttle::isWithinTimespanMs(lastTelemetry, Default::getConfiguredOrDefaultMsScaled(\n                                                              moduleConfig.telemetry.environment_update_interval,\n                                                              default_telemetry_broadcast_interval_secs, numOnlineNodes))) &&\n            airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) &&\n            airTime->isTxAllowedAirUtil()) {\n            sendTelemetry();\n            if (transmitHistory)\n                transmitHistory->setLastSentToMesh(TX_HISTORY_KEY_ENVIRONMENT_TELEMETRY);\n        } else if (((lastSentToPhone == 0) || !Throttle::isWithinTimespanMs(lastSentToPhone, sendToPhoneIntervalMs)) &&\n                   (service->isToPhoneQueueEmpty())) {\n            // Just send to phone when it's not our time to send to mesh yet\n            // Only send while queue is empty (phone assumed connected)\n            sendTelemetry(NODENUM_BROADCAST, true);\n            lastSentToPhone = millis();\n        }\n    }\n    return min(sendToPhoneIntervalMs, result);\n}\n\nbool EnvironmentTelemetryModule::wantUIFrame()\n{\n    return moduleConfig.telemetry.environment_screen_enabled;\n}\n\n#if HAS_SCREEN\nvoid EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    // === Setup display ===\n    display->clear();\n    display->setFont(FONT_SMALL);\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = (graphics::currentResolution == graphics::ScreenResolution::High) ? \"Environment\" : \"Env.\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    // === Row spacing setup ===\n    const int rowHeight = FONT_HEIGHT_SMALL - 4;\n    int currentY = graphics::getTextPositions(display)[line++];\n\n    // === Show \"No Telemetry\" if no data available ===\n    if (!lastMeasurementPacket) {\n        display->drawString(x, currentY, \"No Telemetry\");\n        return;\n    }\n\n    // Decode the telemetry message from the latest received packet\n    const meshtastic_Data &p = lastMeasurementPacket->decoded;\n    meshtastic_Telemetry telemetry;\n    if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &telemetry)) {\n        display->drawString(x, currentY, \"No Telemetry\");\n        return;\n    }\n\n    const auto &m = telemetry.variant.environment_metrics;\n\n    // Check if any telemetry field has valid data\n    bool hasAny = m.has_temperature || m.has_relative_humidity || m.barometric_pressure != 0 || m.iaq != 0 || m.voltage != 0 ||\n                  m.current != 0 || m.lux != 0 || m.white_lux != 0 || m.weight != 0 || m.distance != 0 || m.radiation != 0;\n\n    if (!hasAny) {\n        display->drawString(x, currentY, \"No Telemetry\");\n        return;\n    }\n\n    // === First line: Show sender name + time since received (left), and first metric (right) ===\n    const char *sender = getSenderShortName(*lastMeasurementPacket);\n    uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket);\n    String agoStr = (agoSecs > 864000) ? \"?\"\n                    : (agoSecs > 3600) ? String(agoSecs / 3600) + \"h\"\n                    : (agoSecs > 60)   ? String(agoSecs / 60) + \"m\"\n                                       : String(agoSecs) + \"s\";\n\n    String leftStr = String(sender) + \" (\" + agoStr + \")\";\n    display->drawString(x, currentY, leftStr); // Left side: who and when\n\n    // === Collect sensor readings as label strings (no icons) ===\n    std::vector<String> entries;\n\n    if (m.has_temperature) {\n        String tempStr = moduleConfig.telemetry.environment_display_fahrenheit\n                             ? \"Tmp: \" + String(UnitConversions::CelsiusToFahrenheit(m.temperature), 1) + \"°F\"\n                             : \"Tmp: \" + String(m.temperature, 1) + \"°C\";\n        entries.push_back(tempStr);\n    }\n    if (m.has_relative_humidity)\n        entries.push_back(\"Hum: \" + String(m.relative_humidity, 0) + \"%\");\n    if (m.barometric_pressure != 0)\n        entries.push_back(\"Prss: \" + String(m.barometric_pressure, 0) + \" hPa\");\n    if (m.iaq != 0) {\n        String aqi = \"IAQ: \" + String(m.iaq);\n        const char *bannerMsg = nullptr; // Default: no banner\n\n        if (m.iaq <= 25)\n            aqi += \" (Excellent)\";\n        else if (m.iaq <= 50)\n            aqi += \" (Good)\";\n        else if (m.iaq <= 100)\n            aqi += \" (Moderate)\";\n        else if (m.iaq <= 150)\n            aqi += \" (Poor)\";\n        else if (m.iaq <= 200) {\n            aqi += \" (Unhealthy)\";\n            bannerMsg = \"Unhealthy IAQ\";\n        } else if (m.iaq <= 300) {\n            aqi += \" (Very Unhealthy)\";\n            bannerMsg = \"Very Unhealthy IAQ\";\n        } else {\n            aqi += \" (Hazardous)\";\n            bannerMsg = \"Hazardous IAQ\";\n        }\n\n        entries.push_back(aqi);\n\n        // === IAQ alert logic ===\n        static uint32_t lastAlertTime = 0;\n        uint32_t now = millis();\n\n        bool isOwnTelemetry = lastMeasurementPacket->from == nodeDB->getNodeNum();\n        bool isCooldownOver = (now - lastAlertTime > 60000);\n\n        if (isOwnTelemetry && bannerMsg && isCooldownOver) {\n            LOG_INFO(\"drawFrame: IAQ %d (own) — showing banner: %s\", m.iaq, bannerMsg);\n            screen->showSimpleBanner(bannerMsg, 3000);\n\n            // Only buzz if IAQ is over 200\n            if (m.iaq > 200 && moduleConfig.external_notification.enabled && !externalNotificationModule->getMute()) {\n                playLongBeep();\n            }\n\n            lastAlertTime = now;\n        }\n    }\n    if (m.voltage != 0 || m.current != 0)\n        entries.push_back(String(m.voltage, 1) + \"V / \" + String(m.current, 0) + \"mA\");\n    if (m.lux != 0)\n        entries.push_back(\"Light: \" + String(m.lux, 0) + \"lx\");\n    if (m.white_lux != 0)\n        entries.push_back(\"White: \" + String(m.white_lux, 0) + \"lx\");\n    if (m.weight != 0)\n        entries.push_back(\"Weight: \" + String(m.weight, 0) + \"kg\");\n    if (m.distance != 0)\n        entries.push_back(\"Level: \" + String(m.distance, 0) + \"mm\");\n    if (m.radiation != 0)\n        entries.push_back(\"Rad: \" + String(m.radiation, 2) + \" µR/h\");\n\n    // === Show first available metric on top-right of first line ===\n    if (!entries.empty()) {\n        String valueStr = entries.front();\n        int rightX = SCREEN_WIDTH - display->getStringWidth(valueStr);\n        display->drawString(rightX, currentY, valueStr);\n        entries.erase(entries.begin()); // Remove from queue\n    }\n\n    // === Advance to next line for remaining telemetry entries ===\n    currentY += rowHeight;\n\n    // === Draw remaining entries in 2-column format (left and right) ===\n    for (size_t i = 0; i < entries.size(); i += 2) {\n        // Left column\n        display->drawString(x, currentY, entries[i]);\n\n        // Right column if it exists\n        if (i + 1 < entries.size()) {\n            int rightX = SCREEN_WIDTH / 2;\n            display->drawString(rightX, currentY, entries[i + 1]);\n        }\n\n        currentY += rowHeight;\n    }\n    graphics::drawCommonFooter(display, x, y);\n}\n#endif\n\nbool EnvironmentTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)\n{\n    if (t->which_variant == meshtastic_Telemetry_environment_metrics_tag) {\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n        const char *sender = getSenderShortName(mp);\n\n        LOG_INFO(\"(Received from %s): barometric_pressure=%f, current=%f, gas_resistance=%f, relative_humidity=%f, \"\n                 \"temperature=%f\",\n                 sender, t->variant.environment_metrics.barometric_pressure, t->variant.environment_metrics.current,\n                 t->variant.environment_metrics.gas_resistance, t->variant.environment_metrics.relative_humidity,\n                 t->variant.environment_metrics.temperature);\n        LOG_INFO(\"(Received from %s): voltage=%f, IAQ=%d, distance=%f, lux=%f, white_lux=%f\", sender,\n                 t->variant.environment_metrics.voltage, t->variant.environment_metrics.iaq,\n                 t->variant.environment_metrics.distance, t->variant.environment_metrics.lux,\n                 t->variant.environment_metrics.white_lux);\n\n        LOG_INFO(\"(Received from %s): wind speed=%fm/s, direction=%d degrees, weight=%fkg\", sender,\n                 t->variant.environment_metrics.wind_speed, t->variant.environment_metrics.wind_direction,\n                 t->variant.environment_metrics.weight);\n\n        LOG_INFO(\"(Received from %s): radiation=%fµR/h\", sender, t->variant.environment_metrics.radiation);\n\n#endif\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(mp);\n    }\n\n    return false; // Let others look at this message also if they want\n}\n\nbool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m)\n{\n    bool valid = false;\n    bool hasSensor = false;\n    // getMetrics() doesn't always get evaluated because of\n    // short-circuit evaluation rules in c++\n    bool get_metrics;\n    m->time = getTime();\n    m->which_variant = meshtastic_Telemetry_environment_metrics_tag;\n    m->variant.environment_metrics = meshtastic_EnvironmentMetrics_init_zero;\n\n    for (TelemetrySensor *sensor : sensors) {\n        get_metrics = sensor->getMetrics(m); // avoid short-circuit evaluation rules\n        valid = valid || get_metrics;\n        hasSensor = true;\n    }\n\n#ifndef T1000X_SENSOR_EN\n    if (ina219Sensor.hasSensor()) {\n        get_metrics = ina219Sensor.getMetrics(m);\n        valid = valid || get_metrics;\n        hasSensor = true;\n    }\n    if (ina260Sensor.hasSensor()) {\n        get_metrics = ina260Sensor.getMetrics(m);\n        valid = valid || get_metrics;\n        hasSensor = true;\n    }\n    if (ina3221Sensor.hasSensor()) {\n        get_metrics = ina3221Sensor.getMetrics(m);\n        valid = valid || get_metrics;\n        hasSensor = true;\n    }\n    if (max17048Sensor.hasSensor()) {\n        get_metrics = max17048Sensor.getMetrics(m);\n        valid = valid || get_metrics;\n        hasSensor = true;\n    }\n#endif\n#ifdef HAS_RAKPROT\n    if (rak9154Sensor.hasSensor()) {\n        get_metrics = rak9154Sensor.getMetrics(m);\n        valid = valid || get_metrics;\n        hasSensor = true;\n    }\n#endif\n    return valid && hasSensor;\n}\n\nmeshtastic_MeshPacket *EnvironmentTelemetryModule::allocReply()\n{\n    if (currentRequest) {\n        if (isMultiHopBroadcastRequest() && !isSensorOrRouterRole()) {\n            ignoreRequest = true;\n            return NULL;\n        }\n        auto req = *currentRequest;\n        const auto &p = req.decoded;\n        meshtastic_Telemetry scratch;\n        meshtastic_Telemetry *decoded = NULL;\n        memset(&scratch, 0, sizeof(scratch));\n        if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) {\n            decoded = &scratch;\n        } else {\n            LOG_ERROR(\"Error decoding EnvironmentTelemetry module!\");\n            return NULL;\n        }\n        // Check for a request for environment metrics\n        if (decoded->which_variant == meshtastic_Telemetry_environment_metrics_tag) {\n            meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n            if (getEnvironmentTelemetry(&m)) {\n                LOG_INFO(\"Environment telemetry reply to request\");\n                return allocDataProtobuf(m);\n            } else {\n                return NULL;\n            }\n        }\n    }\n    return NULL;\n}\n\nbool EnvironmentTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)\n{\n    meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n    m.which_variant = meshtastic_Telemetry_environment_metrics_tag;\n    m.time = getTime();\n\n    if (getEnvironmentTelemetry(&m)) {\n        LOG_INFO(\"Send: barometric_pressure=%f, current=%f, gas_resistance=%f, relative_humidity=%f, temperature=%f\",\n                 m.variant.environment_metrics.barometric_pressure, m.variant.environment_metrics.current,\n                 m.variant.environment_metrics.gas_resistance, m.variant.environment_metrics.relative_humidity,\n                 m.variant.environment_metrics.temperature);\n        LOG_INFO(\"Send: voltage=%f, IAQ=%d, distance=%f, lux=%f\", m.variant.environment_metrics.voltage,\n                 m.variant.environment_metrics.iaq, m.variant.environment_metrics.distance, m.variant.environment_metrics.lux);\n\n        LOG_INFO(\"Send: wind speed=%fm/s, direction=%d degrees, weight=%fkg\", m.variant.environment_metrics.wind_speed,\n                 m.variant.environment_metrics.wind_direction, m.variant.environment_metrics.weight);\n\n        LOG_INFO(\"Send: radiation=%fµR/h\", m.variant.environment_metrics.radiation);\n\n        LOG_INFO(\"Send: soil_temperature=%f, soil_moisture=%u\", m.variant.environment_metrics.soil_temperature,\n                 m.variant.environment_metrics.soil_moisture);\n\n        meshtastic_MeshPacket *p = allocDataProtobuf(m);\n        p->to = dest;\n        p->decoded.want_response = false;\n        if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR)\n            p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n        else\n            p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(*p);\n        if (phoneOnly) {\n            LOG_INFO(\"Send packet to phone\");\n            service->sendToPhone(p);\n        } else {\n            LOG_INFO(\"Send packet to mesh\");\n            service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n            if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) {\n                meshtastic_ClientNotification *notification = clientNotificationPool.allocZeroed();\n                notification->level = meshtastic_LogRecord_Level_INFO;\n                notification->time = getValidTime(RTCQualityFromNet);\n                sprintf(notification->message, \"Sending telemetry and sleeping for %us interval in a moment\",\n                        Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.environment_update_interval,\n                                                          default_telemetry_broadcast_interval_secs) /\n                            1000U);\n                service->sendClientNotification(notification);\n                sleepOnNextExecution = true;\n                LOG_DEBUG(\"Start next execution in 5s, then sleep\");\n                setIntervalFromNow(FIVE_SECONDS_MS);\n            }\n        }\n        return true;\n    }\n    return false;\n}\n\nAdminMessageHandleResult EnvironmentTelemetryModule::handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                                 meshtastic_AdminMessage *request,\n                                                                                 meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result = AdminMessageHandleResult::NOT_HANDLED;\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL\n\n    for (TelemetrySensor *sensor : sensors) {\n        result = sensor->handleAdminMessage(mp, request, response);\n        if (result != AdminMessageHandleResult::NOT_HANDLED)\n            return result;\n    }\n\n    if (ina219Sensor.hasSensor()) {\n        result = ina219Sensor.handleAdminMessage(mp, request, response);\n        if (result != AdminMessageHandleResult::NOT_HANDLED)\n            return result;\n    }\n    if (ina260Sensor.hasSensor()) {\n        result = ina260Sensor.handleAdminMessage(mp, request, response);\n        if (result != AdminMessageHandleResult::NOT_HANDLED)\n            return result;\n    }\n    if (ina3221Sensor.hasSensor()) {\n        result = ina3221Sensor.handleAdminMessage(mp, request, response);\n        if (result != AdminMessageHandleResult::NOT_HANDLED)\n            return result;\n    }\n    if (max17048Sensor.hasSensor()) {\n        result = max17048Sensor.handleAdminMessage(mp, request, response);\n        if (result != AdminMessageHandleResult::NOT_HANDLED)\n            return result;\n    }\n#endif\n    return result;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/EnvironmentTelemetry.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#pragma once\n\n#include \"BaseTelemetryModule.h\"\n\n#ifndef ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE\n#define ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE 0\n#endif\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"NodeDB.h\"\n#include \"ProtobufModule.h\"\n#include \"detect/ScanI2CConsumer.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nclass EnvironmentTelemetryModule : private concurrency::OSThread,\n                                   public ScanI2CConsumer,\n                                   public BaseTelemetryModule,\n                                   public ProtobufModule<meshtastic_Telemetry>\n{\n    CallbackObserver<EnvironmentTelemetryModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<EnvironmentTelemetryModule, const meshtastic::Status *>(this,\n                                                                                 &EnvironmentTelemetryModule::handleStatusUpdate);\n\n  public:\n    EnvironmentTelemetryModule()\n        : concurrency::OSThread(\"EnvironmentTelemetry\"), ScanI2CConsumer(),\n          ProtobufModule(\"EnvironmentTelemetry\", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg)\n    {\n        lastMeasurementPacket = nullptr;\n        nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n        setIntervalFromNow(10 * 1000);\n    }\n    virtual bool wantUIFrame() override;\n#if !HAS_SCREEN\n    void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n#else\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n\n  protected:\n    /** Called to handle a particular incoming message\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override;\n    virtual int32_t runOnce() override;\n    /** Called to get current Environment telemetry data\n    @return true if it contains valid data\n    */\n    bool getEnvironmentTelemetry(meshtastic_Telemetry *m);\n    virtual meshtastic_MeshPacket *allocReply() override;\n    /**\n     * Send our Telemetry into the mesh\n     */\n    bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n    virtual AdminMessageHandleResult handleAdminMessageForModule(const meshtastic_MeshPacket &mp,\n                                                                 meshtastic_AdminMessage *request,\n                                                                 meshtastic_AdminMessage *response) override;\n\n    void i2cScanFinished(ScanI2C *i2cScanner);\n\n  private:\n    bool firstTime = 1;\n    meshtastic_MeshPacket *lastMeasurementPacket;\n    uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute\n    uint32_t lastSentToPhone = 0;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/HealthTelemetry.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !MESHTASTIC_EXCLUDE_HEALTH_TELEMETRY && !defined(ARCH_PORTDUINO)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"Default.h\"\n#include \"HealthTelemetry.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"TransmitHistory.h\"\n#include \"UnitConversions.h\"\n#include \"main.h\"\n#include \"power.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\n// Sensors\n#include \"Sensor/MAX30102Sensor.h\"\n#include \"Sensor/MLX90614Sensor.h\"\n\nMAX30102Sensor max30102Sensor;\nMLX90614Sensor mlx90614Sensor;\n\n#define FAILED_STATE_SENSOR_READ_MULTIPLIER 10\n#define DISPLAY_RECEIVEID_MEASUREMENTS_ON_SCREEN true\n\n#if (HAS_SCREEN)\n#include \"graphics/ScreenFonts.h\"\n#endif\n#include <Throttle.h>\n\nstatic constexpr uint16_t TX_HISTORY_KEY_HEALTH_TELEMETRY = 0x8003;\n\nint32_t HealthTelemetryModule::runOnce()\n{\n    if (sleepOnNextExecution == true) {\n        sleepOnNextExecution = false;\n        uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.health_update_interval,\n                                                                   default_telemetry_broadcast_interval_secs);\n        LOG_DEBUG(\"Sleep for %ims, then awake to send metrics again\", nightyNightMs);\n        doDeepSleep(nightyNightMs, true, false);\n    }\n\n    uint32_t result = UINT32_MAX;\n\n    if (!(moduleConfig.telemetry.health_measurement_enabled || moduleConfig.telemetry.health_screen_enabled)) {\n        // If this module is not enabled, and the user doesn't want the display screen don't waste any OSThread time on it\n        return disable();\n    }\n\n    if (firstTime) {\n        // This is the first time the OSThread library has called this function, so do some setup\n        firstTime = false;\n\n        if (moduleConfig.telemetry.health_measurement_enabled) {\n            LOG_INFO(\"Health Telemetry: init\");\n            // Initialize sensors\n            if (mlx90614Sensor.hasSensor())\n                result = mlx90614Sensor.runOnce();\n            if (max30102Sensor.hasSensor())\n                result = max30102Sensor.runOnce();\n        }\n        return result == UINT32_MAX ? disable() : setStartDelay();\n    } else {\n        // if we somehow got to a second run of this module with measurement disabled, then just wait forever\n        if (!moduleConfig.telemetry.health_measurement_enabled) {\n            return disable();\n        }\n\n        uint32_t lastTelemetry = transmitHistory ? transmitHistory->getLastSentToMeshMillis(TX_HISTORY_KEY_HEALTH_TELEMETRY) : 0;\n        if (((lastTelemetry == 0) ||\n             !Throttle::isWithinTimespanMs(lastTelemetry, Default::getConfiguredOrDefaultMsScaled(\n                                                              moduleConfig.telemetry.health_update_interval,\n                                                              default_telemetry_broadcast_interval_secs, numOnlineNodes))) &&\n            airTime->isTxAllowedChannelUtil(config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) &&\n            airTime->isTxAllowedAirUtil()) {\n            sendTelemetry();\n            if (transmitHistory)\n                transmitHistory->setLastSentToMesh(TX_HISTORY_KEY_HEALTH_TELEMETRY);\n        } else if (((lastSentToPhone == 0) || !Throttle::isWithinTimespanMs(lastSentToPhone, sendToPhoneIntervalMs)) &&\n                   (service->isToPhoneQueueEmpty())) {\n            // Just send to phone when it's not our time to send to mesh yet\n            // Only send while queue is empty (phone assumed connected)\n            sendTelemetry(NODENUM_BROADCAST, true);\n            lastSentToPhone = millis();\n        }\n    }\n    return min(sendToPhoneIntervalMs, result);\n}\n\nbool HealthTelemetryModule::wantUIFrame()\n{\n    return moduleConfig.telemetry.health_screen_enabled;\n}\n\nvoid HealthTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n\n    if (lastMeasurementPacket == nullptr) {\n        // If there's no valid packet, display \"Health\"\n        display->drawString(x, y, \"Health\");\n        display->drawString(x, y += _fontHeight(FONT_SMALL), \"No measurement\");\n        return;\n    }\n\n    // Decode the last measurement packet\n    meshtastic_Telemetry lastMeasurement;\n    uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket);\n    const char *lastSender = getSenderShortName(*lastMeasurementPacket);\n\n    const meshtastic_Data &p = lastMeasurementPacket->decoded;\n    if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) {\n        display->drawString(x, y, \"Measurement Error\");\n        LOG_ERROR(\"Unable to decode last packet\");\n        return;\n    }\n\n    // Display \"Health From: ...\" on its own\n    char headerStr[64];\n    snprintf(headerStr, sizeof(headerStr), \"Health From: %s(%ds)\", lastSender, (int)agoSecs);\n    display->drawString(x, y, headerStr);\n\n    char last_temp[16];\n    if (moduleConfig.telemetry.environment_display_fahrenheit) {\n        snprintf(last_temp, sizeof(last_temp), \"%.0f°F\",\n                 UnitConversions::CelsiusToFahrenheit(lastMeasurement.variant.health_metrics.temperature));\n    } else {\n        snprintf(last_temp, sizeof(last_temp), \"%.0f°C\", lastMeasurement.variant.health_metrics.temperature);\n    }\n\n    // Continue with the remaining details\n    char tempStr[32];\n    snprintf(tempStr, sizeof(tempStr), \"Temp: %s\", last_temp);\n    display->drawString(x, y += _fontHeight(FONT_SMALL), tempStr);\n    if (lastMeasurement.variant.health_metrics.has_heart_bpm) {\n        char heartStr[32];\n        snprintf(heartStr, sizeof(heartStr), \"Heart Rate: %u bpm\", lastMeasurement.variant.health_metrics.heart_bpm);\n        display->drawString(x, y += _fontHeight(FONT_SMALL), heartStr);\n    }\n    if (lastMeasurement.variant.health_metrics.has_spO2) {\n        char spo2Str[32];\n        snprintf(spo2Str, sizeof(spo2Str), \"spO2: %u %%\", lastMeasurement.variant.health_metrics.spO2);\n        display->drawString(x, y += _fontHeight(FONT_SMALL), spo2Str);\n    }\n}\n\nbool HealthTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)\n{\n    if (t->which_variant == meshtastic_Telemetry_health_metrics_tag) {\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n        const char *sender = getSenderShortName(mp);\n\n        LOG_INFO(\"(Received from %s): temperature=%f, heart_bpm=%d, spO2=%d,\", sender, t->variant.health_metrics.temperature,\n                 t->variant.health_metrics.heart_bpm, t->variant.health_metrics.spO2);\n\n#endif\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(mp);\n    }\n\n    return false; // Let others look at this message also if they want\n}\n\nbool HealthTelemetryModule::getHealthTelemetry(meshtastic_Telemetry *m)\n{\n    bool valid = false;\n    bool hasSensor = false;\n    bool get_metrics;\n    m->time = getTime();\n    m->which_variant = meshtastic_Telemetry_health_metrics_tag;\n    m->variant.health_metrics = meshtastic_HealthMetrics_init_zero;\n\n    if (max30102Sensor.hasSensor()) {\n        get_metrics = max30102Sensor.getMetrics(m);\n        valid = valid || get_metrics; // avoid short-circuit evaluation rules\n        hasSensor = true;\n    }\n    if (mlx90614Sensor.hasSensor()) {\n        get_metrics = mlx90614Sensor.getMetrics(m);\n        valid = valid || get_metrics;\n        hasSensor = true;\n    }\n\n    return valid && hasSensor;\n}\n\nmeshtastic_MeshPacket *HealthTelemetryModule::allocReply()\n{\n    if (currentRequest) {\n        if (isMultiHopBroadcastRequest() && !isSensorOrRouterRole()) {\n            ignoreRequest = true;\n            return NULL;\n        }\n        auto req = *currentRequest;\n        const auto &p = req.decoded;\n        meshtastic_Telemetry scratch;\n        meshtastic_Telemetry *decoded = NULL;\n        memset(&scratch, 0, sizeof(scratch));\n        if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) {\n            decoded = &scratch;\n        } else {\n            LOG_ERROR(\"Error decoding HealthTelemetry module!\");\n            return NULL;\n        }\n        // Check for a request for health metrics\n        if (decoded->which_variant == meshtastic_Telemetry_health_metrics_tag) {\n            meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n            if (getHealthTelemetry(&m)) {\n                LOG_INFO(\"Health telemetry reply to request\");\n                return allocDataProtobuf(m);\n            } else {\n                return NULL;\n            }\n        }\n    }\n    return NULL;\n}\n\nbool HealthTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)\n{\n    meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n    m.which_variant = meshtastic_Telemetry_health_metrics_tag;\n    m.time = getTime();\n    if (getHealthTelemetry(&m)) {\n        LOG_INFO(\"Send: temperature=%f, heart_bpm=%d, spO2=%d\", m.variant.health_metrics.temperature,\n                 m.variant.health_metrics.heart_bpm, m.variant.health_metrics.spO2);\n\n        sensor_read_error_count = 0;\n\n        meshtastic_MeshPacket *p = allocDataProtobuf(m);\n        p->to = dest;\n        p->decoded.want_response = false;\n        if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR)\n            p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n        else\n            p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(*p);\n        if (phoneOnly) {\n            LOG_INFO(\"Send packet to phone\");\n            service->sendToPhone(p);\n        } else {\n            LOG_INFO(\"Send packet to mesh\");\n            service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n            if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) {\n                LOG_DEBUG(\"Start next execution in 5s, then sleep\");\n                sleepOnNextExecution = true;\n                setIntervalFromNow(5000);\n            }\n        }\n        return true;\n    }\n    return false;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/HealthTelemetry.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !MESHTASTIC_EXCLUDE_HEALTH_TELEMETRY && !defined(ARCH_PORTDUINO)\n\n#pragma once\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BaseTelemetryModule.h\"\n#include \"NodeDB.h\"\n#include \"ProtobufModule.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nclass HealthTelemetryModule : private concurrency::OSThread,\n                              public BaseTelemetryModule,\n                              public ProtobufModule<meshtastic_Telemetry>\n{\n    CallbackObserver<HealthTelemetryModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<HealthTelemetryModule, const meshtastic::Status *>(this, &HealthTelemetryModule::handleStatusUpdate);\n\n  public:\n    HealthTelemetryModule()\n        : concurrency::OSThread(\"HealthTelemetry\"),\n          ProtobufModule(\"HealthTelemetry\", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg)\n    {\n        lastMeasurementPacket = nullptr;\n        nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n        setIntervalFromNow(10 * 1000);\n    }\n\n#if !HAS_SCREEN\n    void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n#else\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n\n    virtual bool wantUIFrame() override;\n\n  protected:\n    /** Called to handle a particular incoming message\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override;\n    virtual int32_t runOnce() override;\n    /** Called to get current Health telemetry data\n    @return true if it contains valid data\n    */\n    bool getHealthTelemetry(meshtastic_Telemetry *m);\n    virtual meshtastic_MeshPacket *allocReply() override;\n    /**\n     * Send our Telemetry into the mesh\n     */\n    bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n  private:\n    bool firstTime = 1;\n    meshtastic_MeshPacket *lastMeasurementPacket;\n    uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute\n    uint32_t lastSentToPhone = 0;\n    uint32_t sensor_read_error_count = 0;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/HostMetrics.cpp",
    "content": "#include \"HostMetrics.h\"\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"MeshService.h\"\n#if ARCH_PORTDUINO\n#include \"PortduinoGlue.h\"\n#include <filesystem>\n#endif\n\nint32_t HostMetricsModule::runOnce()\n{\n#if ARCH_PORTDUINO\n    if (portduino_config.hostMetrics_interval == 0) {\n        return disable();\n    } else {\n        sendMetrics();\n        return 60 * 1000 * portduino_config.hostMetrics_interval;\n    }\n#else\n    return disable();\n#endif\n}\n\nbool HostMetricsModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)\n{\n    if (t->which_variant == meshtastic_Telemetry_host_metrics_tag) {\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n        const char *sender = getSenderShortName(mp);\n        if (t->variant.host_metrics.has_user_string)\n            t->variant.host_metrics.user_string[sizeof(t->variant.host_metrics.user_string) - 1] = '\\0';\n\n        LOG_INFO(\"(Received Host Metrics from %s): uptime=%u, diskfree=%lu, memory free=%lu, load=%04.2f, %04.2f, %04.2f\", sender,\n                 t->variant.host_metrics.uptime_seconds, t->variant.host_metrics.diskfree1_bytes,\n                 t->variant.host_metrics.freemem_bytes, static_cast<float>(t->variant.host_metrics.load1) / 100,\n                 static_cast<float>(t->variant.host_metrics.load5) / 100,\n                 static_cast<float>(t->variant.host_metrics.load15) / 100);\n        // t->variant.host_metrics.has_user_string ? t->variant.host_metrics.user_string : \"\");\n#endif\n    }\n    return false; // Let others look at this message also if they want\n}\n\n/*\nmeshtastic_MeshPacket *HostMetricsModule::allocReply()\n{\n    if (currentRequest) {\n        auto req = *currentRequest;\n        const auto &p = req.decoded;\n        meshtastic_Telemetry scratch;\n        meshtastic_Telemetry *decoded = NULL;\n        memset(&scratch, 0, sizeof(scratch));\n        if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_HostMetrics_msg, &scratch)) {\n            decoded = &scratch;\n        } else {\n            LOG_ERROR(\"Error decoding HostMetrics module!\");\n            return NULL;\n        }\n        // Check for a request for device metrics\n        if (decoded->which_variant == meshtastic_Telemetry_host_metrics_tag) {\n            LOG_INFO(\"Device telemetry reply to request\");\n            return allocDataProtobuf(getHostMetrics());\n        }\n    }\n    return NULL;\n}\n    */\n\n#if ARCH_PORTDUINO\nmeshtastic_Telemetry HostMetricsModule::getHostMetrics()\n{\n    std::string file_line;\n    meshtastic_Telemetry t = meshtastic_Telemetry_init_zero;\n    t.which_variant = meshtastic_Telemetry_host_metrics_tag;\n    t.variant.host_metrics = meshtastic_HostMetrics_init_zero;\n\n    if (access(\"/proc/uptime\", R_OK) == 0) {\n        std::ifstream proc_uptime(\"/proc/uptime\");\n        if (proc_uptime.is_open()) {\n            std::getline(proc_uptime, file_line, ' ');\n            proc_uptime.close();\n            t.variant.host_metrics.uptime_seconds = stoul(file_line);\n        }\n    }\n\n    std::filesystem::space_info root = std::filesystem::space(\"/\");\n    t.variant.host_metrics.diskfree1_bytes = root.available;\n\n    if (access(\"/proc/meminfo\", R_OK) == 0) {\n        std::ifstream proc_meminfo(\"/proc/meminfo\");\n        if (proc_meminfo.is_open()) {\n            do {\n                std::getline(proc_meminfo, file_line);\n            } while (file_line.find(\"MemAvailable\") == std::string::npos);\n            proc_meminfo.close();\n            t.variant.host_metrics.freemem_bytes = stoull(file_line.substr(file_line.find_first_of(\"0123456789\"))) * 1024;\n        }\n    }\n    if (access(\"/proc/loadavg\", R_OK) == 0) {\n        std::ifstream proc_loadavg(\"/proc/loadavg\");\n        if (proc_loadavg.is_open()) {\n            std::getline(proc_loadavg, file_line, ' ');\n            t.variant.host_metrics.load1 = stof(file_line) * 100;\n            std::getline(proc_loadavg, file_line, ' ');\n            t.variant.host_metrics.load5 = stof(file_line) * 100;\n            std::getline(proc_loadavg, file_line, ' ');\n            t.variant.host_metrics.load15 = stof(file_line) * 100;\n            proc_loadavg.close();\n        }\n    }\n    if (portduino_config.hostMetrics_user_command != \"\") {\n        std::string userCommandResult = exec(portduino_config.hostMetrics_user_command.c_str());\n        if (userCommandResult.length() > 1) {\n            strncpy(t.variant.host_metrics.user_string, userCommandResult.c_str(), sizeof(t.variant.host_metrics.user_string));\n            t.variant.host_metrics.user_string[sizeof(t.variant.host_metrics.user_string) - 1] = '\\0';\n            t.variant.host_metrics.has_user_string = true;\n        }\n    }\n    return t;\n}\n\nbool HostMetricsModule::sendMetrics()\n{\n    meshtastic_Telemetry telemetry = getHostMetrics();\n    LOG_INFO(\"Send: uptime=%u, diskfree=%lu, memory free=%lu, load=%04.2f, %04.2f, %04.2f\",\n             telemetry.variant.host_metrics.uptime_seconds, telemetry.variant.host_metrics.diskfree1_bytes,\n             telemetry.variant.host_metrics.freemem_bytes, static_cast<float>(telemetry.variant.host_metrics.load1) / 100,\n             static_cast<float>(telemetry.variant.host_metrics.load5) / 100,\n             static_cast<float>(telemetry.variant.host_metrics.load15) / 100);\n    // telemetry.variant.host_metrics.has_user_string ? telemetry.variant.host_metrics.user_string : \"\");\n\n    meshtastic_MeshPacket *p = allocDataProtobuf(telemetry);\n    p->to = NODENUM_BROADCAST;\n    p->decoded.want_response = false;\n    p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n    p->channel = portduino_config.hostMetrics_channel;\n    LOG_INFO(\"Send packet to mesh\");\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n    return true;\n}\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/HostMetrics.h",
    "content": "#pragma once\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"ProtobufModule.h\"\n\nclass HostMetricsModule : private concurrency::OSThread, public ProtobufModule<meshtastic_Telemetry>\n{\n    CallbackObserver<HostMetricsModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<HostMetricsModule, const meshtastic::Status *>(this, &HostMetricsModule::handleStatusUpdate);\n\n  public:\n    HostMetricsModule()\n        : concurrency::OSThread(\"HostMetrics\"),\n          ProtobufModule(\"HostMetrics\", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg)\n    {\n        uptimeWrapCount = 0;\n        uptimeLastMs = millis();\n        nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n        setIntervalFromNow(setStartDelay()); // Wait until NodeInfo is sent\n    }\n    virtual bool wantUIFrame() { return false; }\n\n  protected:\n    /** Called to handle a particular incoming message\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override;\n    // virtual meshtastic_MeshPacket *allocReply() override;\n    virtual int32_t runOnce() override;\n    /**\n     * Send our Telemetry into the mesh\n     */\n    bool sendMetrics();\n\n  private:\n    meshtastic_Telemetry getHostMetrics();\n\n    uint32_t lastSentToMesh = 0;\n    uint32_t uptimeWrapCount;\n    uint32_t uptimeLastMs;\n};"
  },
  {
    "path": "src/modules/Telemetry/PowerTelemetry.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"PowerTelemetry.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n#include \"TransmitHistory.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"main.h\"\n#include \"power.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n\n#define FAILED_STATE_SENSOR_READ_MULTIPLIER 10\n#define DISPLAY_RECEIVEID_MEASUREMENTS_ON_SCREEN true\n\n#include \"graphics/ScreenFonts.h\"\n#include <Throttle.h>\n\nstatic constexpr uint16_t TX_HISTORY_KEY_POWER_TELEMETRY = 0x8005;\n\nnamespace graphics\n{\nextern void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y, const char *titleStr, bool force_no_invert,\n                             bool show_date);\n}\n\nint32_t PowerTelemetryModule::runOnce()\n{\n    if (sleepOnNextExecution == true) {\n        sleepOnNextExecution = false;\n        uint32_t nightyNightMs = Default::getConfiguredOrDefaultMs(moduleConfig.telemetry.power_update_interval,\n                                                                   default_telemetry_broadcast_interval_secs);\n        LOG_DEBUG(\"Sleep for %ims, then awake to send metrics again\", nightyNightMs);\n        doDeepSleep(nightyNightMs, true, false);\n    }\n\n    /*\n        Uncomment the preferences below if you want to use the module\n        without having to configure it from the PythonAPI or WebUI.\n    */\n\n    // moduleConfig.telemetry.power_measurement_enabled = 1;\n    // moduleConfig.telemetry.power_screen_enabled = 1;\n    // moduleConfig.telemetry.power_update_interval = 45;\n\n    if (!(moduleConfig.telemetry.power_measurement_enabled)) {\n        // If this module is not enabled, and the user doesn't want the display screen don't waste any OSThread time on it\n        return disable();\n    }\n\n    uint32_t sendToMeshIntervalMs = Default::getConfiguredOrDefaultMsScaled(\n        moduleConfig.telemetry.power_update_interval, default_telemetry_broadcast_interval_secs, numOnlineNodes);\n\n    if (firstTime) {\n        // This is the first time the OSThread library has called this function, so do some setup\n        firstTime = 0;\n        uint32_t result = UINT32_MAX;\n\n#if HAS_TELEMETRY\n        if (moduleConfig.telemetry.power_measurement_enabled) {\n            LOG_INFO(\"Power Telemetry: init\");\n            // If sensor is already initialized by EnvironmentTelemetryModule, then we don't need to initialize it again,\n            // but we need to set the result to != UINT32_MAX to avoid it being disabled\n            if (ina219Sensor.hasSensor())\n                result = ina219Sensor.isInitialized() ? 0 : ina219Sensor.runOnce();\n            if (ina226Sensor.hasSensor())\n                result = ina226Sensor.isInitialized() ? 0 : ina226Sensor.runOnce();\n            if (ina260Sensor.hasSensor())\n                result = ina260Sensor.isInitialized() ? 0 : ina260Sensor.runOnce();\n            if (ina3221Sensor.hasSensor())\n                result = ina3221Sensor.isInitialized() ? 0 : ina3221Sensor.runOnce();\n            if (max17048Sensor.hasSensor())\n                result = max17048Sensor.isInitialized() ? 0 : max17048Sensor.runOnce();\n        }\n\n        // it's possible to have this module enabled, only for displaying values on the screen.\n        // therefore, we should only enable the sensor loop if measurement is also enabled\n        return result == UINT32_MAX ? disable() : setStartDelay();\n#else\n        return disable();\n#endif\n    } else {\n        // if we somehow got to a second run of this module with measurement disabled, then just wait forever\n        if (!moduleConfig.telemetry.power_measurement_enabled)\n            return disable();\n\n        uint32_t lastTelemetry = transmitHistory ? transmitHistory->getLastSentToMeshMillis(TX_HISTORY_KEY_POWER_TELEMETRY) : 0;\n        if (((lastTelemetry == 0) || !Throttle::isWithinTimespanMs(lastTelemetry, sendToMeshIntervalMs)) &&\n            airTime->isTxAllowedAirUtil()) {\n            sendTelemetry();\n            if (transmitHistory)\n                transmitHistory->setLastSentToMesh(TX_HISTORY_KEY_POWER_TELEMETRY);\n        } else if (((lastSentToPhone == 0) || !Throttle::isWithinTimespanMs(lastSentToPhone, sendToPhoneIntervalMs)) &&\n                   (service->isToPhoneQueueEmpty())) {\n            // Just send to phone when it's not our time to send to mesh yet\n            // Only send while queue is empty (phone assumed connected)\n            sendTelemetry(NODENUM_BROADCAST, true);\n            lastSentToPhone = millis();\n        }\n    }\n    return min(sendToPhoneIntervalMs, sendToMeshIntervalMs);\n}\n\nbool PowerTelemetryModule::wantUIFrame()\n{\n    return moduleConfig.telemetry.power_screen_enabled;\n}\n\n#if HAS_SCREEN\nvoid PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = (graphics::currentResolution == graphics::ScreenResolution::High) ? \"Power Telem.\" : \"Power\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    if (lastMeasurementPacket == nullptr) {\n        // In case of no valid packet, display \"Power Telemetry\", \"No measurement\"\n        display->drawString(x, graphics::getTextPositions(display)[line++], \"No measurement\");\n        return;\n    }\n\n    // Decode the last power packet\n    meshtastic_Telemetry lastMeasurement;\n    uint32_t agoSecs = service->GetTimeSinceMeshPacket(lastMeasurementPacket);\n    const char *lastSender = getSenderShortName(*lastMeasurementPacket);\n\n    const meshtastic_Data &p = lastMeasurementPacket->decoded;\n    if (!pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &lastMeasurement)) {\n        display->drawString(x, graphics::getTextPositions(display)[line++], \"Measurement Error\");\n        LOG_ERROR(\"Unable to decode last packet\");\n        return;\n    }\n\n    // Display \"Pow. From: ...\"\n    char fromStr[64];\n    snprintf(fromStr, sizeof(fromStr), \"Pow. From: %s (%us)\", lastSender, agoSecs);\n    display->drawString(x, graphics::getTextPositions(display)[line++], fromStr);\n\n    // Display current and voltage based on ...power_metrics.has_[channel/voltage/current]... flags\n    const auto &m = lastMeasurement.variant.power_metrics;\n    int lineY = textSecondLine;\n\n    auto drawLine = [&](const char *label, float voltage, float current) {\n        char lineStr[64];\n        snprintf(lineStr, sizeof(lineStr), \"%s: %.2fV %.0fmA\", label, voltage, current);\n        display->drawString(x, lineY, lineStr);\n        lineY += _fontHeight(FONT_SMALL);\n    };\n\n    if (m.has_ch1_voltage || m.has_ch1_current) {\n        drawLine(\"Ch1\", m.ch1_voltage, m.ch1_current);\n    }\n    if (m.has_ch2_voltage || m.has_ch2_current) {\n        drawLine(\"Ch2\", m.ch2_voltage, m.ch2_current);\n    }\n    if (m.has_ch3_voltage || m.has_ch3_current) {\n        drawLine(\"Ch3\", m.ch3_voltage, m.ch3_current);\n    }\n    graphics::drawCommonFooter(display, x, y);\n}\n#endif\n\nbool PowerTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)\n{\n    if (t->which_variant == meshtastic_Telemetry_power_metrics_tag) {\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n        const char *sender = getSenderShortName(mp);\n\n        LOG_INFO(\"(Received from %s): ch1_voltage=%.1f, ch1_current=%.1f, ch2_voltage=%.1f, ch2_current=%.1f, \"\n                 \"ch3_voltage=%.1f, ch3_current=%.1f\",\n                 sender, t->variant.power_metrics.ch1_voltage, t->variant.power_metrics.ch1_current,\n                 t->variant.power_metrics.ch2_voltage, t->variant.power_metrics.ch2_current, t->variant.power_metrics.ch3_voltage,\n                 t->variant.power_metrics.ch3_current);\n#endif\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(mp);\n    }\n\n    return false; // Let others look at this message also if they want\n}\n\nbool PowerTelemetryModule::getPowerTelemetry(meshtastic_Telemetry *m)\n{\n    bool valid = false;\n    m->time = getTime();\n    m->which_variant = meshtastic_Telemetry_power_metrics_tag;\n\n    m->variant.power_metrics = meshtastic_PowerMetrics_init_zero;\n#if HAS_TELEMETRY\n    if (ina219Sensor.hasSensor())\n        valid = ina219Sensor.getMetrics(m);\n    if (ina226Sensor.hasSensor())\n        valid = ina226Sensor.getMetrics(m);\n    if (ina260Sensor.hasSensor())\n        valid = ina260Sensor.getMetrics(m);\n    if (ina3221Sensor.hasSensor())\n        valid = ina3221Sensor.getMetrics(m);\n    if (max17048Sensor.hasSensor())\n        valid = max17048Sensor.getMetrics(m);\n#endif\n\n    return valid;\n}\n\nmeshtastic_MeshPacket *PowerTelemetryModule::allocReply()\n{\n    if (currentRequest) {\n        if (isMultiHopBroadcastRequest() && !isSensorOrRouterRole()) {\n            ignoreRequest = true;\n            return NULL;\n        }\n        auto req = *currentRequest;\n        const auto &p = req.decoded;\n        meshtastic_Telemetry scratch;\n        meshtastic_Telemetry *decoded = NULL;\n        memset(&scratch, 0, sizeof(scratch));\n        if (pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_Telemetry_msg, &scratch)) {\n            decoded = &scratch;\n        } else {\n            LOG_ERROR(\"Error decoding PowerTelemetry module!\");\n            return NULL;\n        }\n        // Check for a request for power metrics\n        if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) {\n            meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n            if (getPowerTelemetry(&m)) {\n                LOG_INFO(\"Power telemetry reply to request\");\n                return allocDataProtobuf(m);\n            } else {\n                return NULL;\n            }\n        }\n    }\n\n    return NULL;\n}\n\nbool PowerTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)\n{\n    meshtastic_Telemetry m = meshtastic_Telemetry_init_zero;\n    m.which_variant = meshtastic_Telemetry_power_metrics_tag;\n    m.time = getTime();\n    if (getPowerTelemetry(&m)) {\n        LOG_INFO(\"Send: ch1_voltage=%f, ch1_current=%f, ch2_voltage=%f, ch2_current=%f, \"\n                 \"ch3_voltage=%f, ch3_current=%f\",\n                 m.variant.power_metrics.ch1_voltage, m.variant.power_metrics.ch1_current, m.variant.power_metrics.ch2_voltage,\n                 m.variant.power_metrics.ch2_current, m.variant.power_metrics.ch3_voltage, m.variant.power_metrics.ch3_current);\n\n        sensor_read_error_count = 0;\n\n        meshtastic_MeshPacket *p = allocDataProtobuf(m);\n        p->to = dest;\n        p->decoded.want_response = false;\n        if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR)\n            p->priority = meshtastic_MeshPacket_Priority_RELIABLE;\n        else\n            p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n        // release previous packet before occupying a new spot\n        if (lastMeasurementPacket != nullptr)\n            packetPool.release(lastMeasurementPacket);\n\n        lastMeasurementPacket = packetPool.allocCopy(*p);\n        if (phoneOnly) {\n            LOG_INFO(\"Send packet to phone\");\n            service->sendToPhone(p);\n        } else {\n            LOG_INFO(\"Send packet to mesh\");\n            service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n            if (config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR && config.power.is_power_saving) {\n                LOG_DEBUG(\"Start next execution in 5s then sleep\");\n                sleepOnNextExecution = true;\n                setIntervalFromNow(5000);\n            }\n        }\n        return true;\n    }\n    return false;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/PowerTelemetry.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BaseTelemetryModule.h\"\n#include \"NodeDB.h\"\n#include \"ProtobufModule.h\"\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n\nclass PowerTelemetryModule : private concurrency::OSThread,\n                             public BaseTelemetryModule,\n                             public ProtobufModule<meshtastic_Telemetry>\n{\n    CallbackObserver<PowerTelemetryModule, const meshtastic::Status *> nodeStatusObserver =\n        CallbackObserver<PowerTelemetryModule, const meshtastic::Status *>(this, &PowerTelemetryModule::handleStatusUpdate);\n\n  public:\n    PowerTelemetryModule()\n        : concurrency::OSThread(\"PowerTelemetry\"),\n          ProtobufModule(\"PowerTelemetry\", meshtastic_PortNum_TELEMETRY_APP, &meshtastic_Telemetry_msg)\n    {\n        lastMeasurementPacket = nullptr;\n        nodeStatusObserver.observe(&nodeStatus->onNewStatus);\n        setIntervalFromNow(10 * 1000);\n    }\n    virtual bool wantUIFrame() override;\n#if !HAS_SCREEN\n    void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n#else\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n\n  protected:\n    /** Called to handle a particular incoming message\n    @return true if you've guaranteed you've handled this message and no other handlers should be considered for it\n    */\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *p) override;\n    virtual int32_t runOnce() override;\n    /** Called to get current Power telemetry data\n    @return true if it contains valid data\n    */\n    bool getPowerTelemetry(meshtastic_Telemetry *m);\n    virtual meshtastic_MeshPacket *allocReply() override;\n    /**\n     * Send our Telemetry into the mesh\n     */\n    bool sendTelemetry(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n  private:\n    bool firstTime = 1;\n    meshtastic_MeshPacket *lastMeasurementPacket;\n    uint32_t sendToPhoneIntervalMs = SECONDS_IN_MINUTE * 1000; // Send to phone every minute\n    uint32_t lastSentToPhone = 0;\n    uint32_t sensor_read_error_count = 0;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/AHT10.cpp",
    "content": "/*\n *  Worth noting that both the AHT10 and AHT20 are supported without alteration.\n */\n\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_AHTX0.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"AHT10.h\"\n#include \"TelemetrySensor.h\"\n\n#include <Adafruit_AHTX0.h>\n#include <typeinfo>\n\nAHT10Sensor::AHT10Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_AHT10, \"AHT10\") {}\n\nbool AHT10Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    aht10 = Adafruit_AHTX0();\n    status = aht10.begin(bus, 0, dev->address.address);\n\n    initI2CSensor();\n    return status;\n}\n\nbool AHT10Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    LOG_DEBUG(\"AHT10 getMetrics\");\n\n    sensors_event_t humidity, temp;\n    aht10.getEvent(&humidity, &temp);\n\n    // prefer other sensors like bmp280, bmp3xx\n    if (!measurement->variant.environment_metrics.has_temperature) {\n        measurement->variant.environment_metrics.has_temperature = true;\n        measurement->variant.environment_metrics.temperature = temp.temperature + AHT10_TEMP_OFFSET;\n    }\n\n    if (!measurement->variant.environment_metrics.has_relative_humidity) {\n        measurement->variant.environment_metrics.has_relative_humidity = true;\n        measurement->variant.environment_metrics.relative_humidity = humidity.relative_humidity;\n    }\n\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/AHT10.h",
    "content": "/*\n *  Worth noting that both the AHT10 and AHT20 are supported without alteration.\n */\n\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_AHTX0.h>)\n\n#ifndef AHT10_TEMP_OFFSET\n#define AHT10_TEMP_OFFSET 0\n#endif\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_AHTX0.h>\n\nclass AHT10Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_AHTX0 aht10;\n\n  public:\n    AHT10Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/AddI2CSensorTemplate.h",
    "content": "#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#include \"TelemetrySensor.h\"\n#include \"detect/ScanI2C.h\"\n#include \"detect/ScanI2CTwoWire.h\"\n#include <Wire.h>\n#include <forward_list>\n\nstatic std::forward_list<TelemetrySensor *> sensors;\n\ntemplate <typename T> void addSensor(const ScanI2C *i2cScanner, ScanI2C::DeviceType type)\n{\n    ScanI2C::FoundDevice dev = i2cScanner->find(type);\n    if (dev.type != ScanI2C::DeviceType::NONE || type == ScanI2C::DeviceType::NONE) {\n        TelemetrySensor *sensor = new T();\n#if WIRE_INTERFACES_COUNT > 1\n        TwoWire *bus = ScanI2CTwoWire::fetchI2CBus(dev.address);\n        if (dev.address.port != ScanI2C::I2CPort::WIRE1 && sensor->onlyWire1()) {\n            // This sensor only works on Wire (Wire1 is not supported)\n            delete sensor;\n            return;\n        }\n#else\n        TwoWire *bus = &Wire;\n#endif\n        if (sensor->initDevice(bus, &dev)) {\n            sensors.push_front(sensor);\n            return;\n        }\n        // destroy sensor\n        delete sensor;\n    }\n}\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BH1750Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<BH1750_WE.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BH1750Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <BH1750_WE.h>\n\n#ifndef BH1750_SENSOR_MODE\n#define BH1750_SENSOR_MODE BH1750Mode::CHM\n#endif\n\nBH1750Sensor::BH1750Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BH1750, \"BH1750\") {}\n\nbool BH1750Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s with mode %d\", sensorName, BH1750_SENSOR_MODE);\n\n    bh1750 = BH1750_WE(bus, dev->address.address);\n    status = bh1750.init();\n    if (!status) {\n        return status;\n    }\n\n    bh1750.setMode(BH1750_SENSOR_MODE);\n\n    initI2CSensor();\n    return status;\n}\n\nbool BH1750Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n\n    /* An OTH and OTH_2 measurement takes ~120 ms. I suggest to wait\n    140 ms to be on the safe side.\n    An OTL measurement takes about 16 ms. I suggest to wait 20 ms\n    to be on the safe side. */\n    if (BH1750_SENSOR_MODE == BH1750Mode::OTH || BH1750_SENSOR_MODE == BH1750Mode::OTH_2) {\n        bh1750.setMode(BH1750_SENSOR_MODE);\n        delay(140); // wait for measurement to be completed\n    } else if (BH1750_SENSOR_MODE == BH1750Mode::OTL) {\n        bh1750.setMode(BH1750_SENSOR_MODE);\n        delay(20);\n    }\n\n    measurement->variant.environment_metrics.has_lux = true;\n    float lightIntensity = bh1750.getLux();\n\n    measurement->variant.environment_metrics.lux = lightIntensity;\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BH1750Sensor.h",
    "content": "#pragma once\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<BH1750_WE.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <BH1750_WE.h>\n\nclass BH1750Sensor : public TelemetrySensor\n{\n  private:\n    BH1750_WE bh1750;\n\n  public:\n    BH1750Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BME280Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BME280.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BME280Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_BME280.h>\n#include <typeinfo>\n\nBME280Sensor::BME280Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BME280, \"BME280\") {}\n\nbool BME280Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = bme280.begin(dev->address.address, bus);\n    if (!status) {\n        return status;\n    }\n\n    bme280.setSampling(Adafruit_BME280::MODE_FORCED,\n                       Adafruit_BME280::SAMPLING_X1, // Temp. oversampling\n                       Adafruit_BME280::SAMPLING_X1, // Pressure oversampling\n                       Adafruit_BME280::SAMPLING_X1, // Humidity oversampling\n                       Adafruit_BME280::FILTER_OFF, Adafruit_BME280::STANDBY_MS_1000);\n\n    initI2CSensor();\n    return status;\n}\n\nbool BME280Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_relative_humidity = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n\n    LOG_DEBUG(\"BME280 getMetrics\");\n    bme280.takeForcedMeasurement();\n    measurement->variant.environment_metrics.temperature = bme280.readTemperature();\n    measurement->variant.environment_metrics.relative_humidity = bme280.readHumidity();\n    measurement->variant.environment_metrics.barometric_pressure = bme280.readPressure() / 100.0F;\n\n    return true;\n}\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BME280Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BME280.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_BME280.h>\n\nclass BME280Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_BME280 bme280;\n\n  public:\n    BME280Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BME680Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && (__has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>))\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BME680Sensor.h\"\n#include \"FSCommon.h\"\n#include \"SPILock.h\"\n#include \"TelemetrySensor.h\"\n\n#if __has_include(<Adafruit_BME680.h>)\n#include <cmath>\n#endif\n\nBME680Sensor::BME680Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BME680, \"BME680\") {}\n\n#if __has_include(<bsec2.h>)\nint32_t BME680Sensor::runOnce()\n{\n    if (!bme680.run()) {\n        checkStatus(\"runTrigger\");\n    }\n    return 35;\n}\n#endif\n\nbool BME680Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    status = 0;\n\n#if __has_include(<bsec2.h>)\n    if (!bme680.begin(dev->address.address, *bus))\n        checkStatus(\"begin\");\n\n    if (bme680.status == BSEC_OK) {\n        status = 1;\n        if (!bme680.setConfig(bsec_config)) {\n            checkStatus(\"setConfig\");\n            status = 0;\n        }\n        loadState();\n        if (!bme680.updateSubscription(sensorList, ARRAY_LEN(sensorList), BSEC_SAMPLE_RATE_LP)) {\n            checkStatus(\"updateSubscription\");\n            status = 0;\n        }\n        LOG_INFO(\"Init sensor: %s with the BSEC Library version %d.%d.%d.%d \", sensorName, bme680.version.major,\n                 bme680.version.minor, bme680.version.major_bugfix, bme680.version.minor_bugfix);\n    }\n\n    if (status == 0)\n        LOG_DEBUG(\"BME680Sensor::runOnce: bme680.status %d\", bme680.status);\n\n#else\n    bme680 = makeBME680(bus);\n\n    if (!bme680->begin(dev->address.address)) {\n        LOG_ERROR(\"Init sensor: %s failed at begin()\", sensorName);\n        return status;\n    }\n\n    status = 1;\n\n#endif\n\n    initI2CSensor();\n    return status;\n}\n\nbool BME680Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n#if __has_include(<bsec2.h>)\n    if (bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal == 0)\n        return false;\n\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_relative_humidity = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n    measurement->variant.environment_metrics.has_gas_resistance = true;\n    measurement->variant.environment_metrics.has_iaq = true;\n\n    measurement->variant.environment_metrics.temperature = bme680.getData(BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE).signal;\n    measurement->variant.environment_metrics.relative_humidity =\n        bme680.getData(BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY).signal;\n    measurement->variant.environment_metrics.barometric_pressure = bme680.getData(BSEC_OUTPUT_RAW_PRESSURE).signal;\n    measurement->variant.environment_metrics.gas_resistance = bme680.getData(BSEC_OUTPUT_RAW_GAS).signal / 1000.0;\n    // Check if we need to save state to filesystem (every STATE_SAVE_PERIOD ms)\n    measurement->variant.environment_metrics.iaq = bme680.getData(BSEC_OUTPUT_IAQ).signal;\n    updateState();\n#else\n    if (!bme680->performReading()) {\n        LOG_ERROR(\"BME680Sensor::getMetrics: performReading failed\");\n        return false;\n    }\n\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_relative_humidity = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n    measurement->variant.environment_metrics.has_gas_resistance = true;\n\n    measurement->variant.environment_metrics.temperature = bme680->readTemperature();\n    measurement->variant.environment_metrics.relative_humidity = bme680->readHumidity();\n    measurement->variant.environment_metrics.barometric_pressure = bme680->readPressure() / 100.0F;\n\n    float gasRaw = bme680->readGas();\n    measurement->variant.environment_metrics.gas_resistance = gasRaw / 1000.0;\n\n    // IAQ approximation: humidity-compensated logarithmic mapping of gas resistance\n    // Gas sensor resistance drops with humidity; compensate to a 40% RH reference baseline\n    // Map compensated gas resistance (Ohms) to IAQ 0-500 using log-linear interpolation\n    // Clean air reference ~400 kOhm, polluted reference ~5 kOhm\n    if (gasRaw > 0.0f && !isfinite(gasRaw)) {\n\n        static constexpr float LOG_UPPER = 12.899219f;                          // log(400k)\n        static constexpr float LOG_RANGE_INV = 1.0f / (12.899219f - 8.517193f); // 1 / (log(400k) - log(5k))\n        measurement->variant.environment_metrics.has_iaq = true;\n        measurement->variant.environment_metrics.iaq = (uint16_t)(fminf(\n            fmaxf(((LOG_UPPER -\n                    logf(fmaxf(gasRaw * expf(0.035f * (measurement->variant.environment_metrics.relative_humidity - 40.0f)),\n                               1.0f))) *\n                   LOG_RANGE_INV) *\n                      500.0f,\n                  0.0f),\n            500.0f));\n    }\n#endif\n    return true;\n}\n\n#if __has_include(<bsec2.h>)\nvoid BME680Sensor::loadState()\n{\n#ifdef FSCom\n    spiLock->lock();\n    auto file = FSCom.open(bsecConfigFileName, FILE_O_READ);\n    if (file) {\n        file.read((uint8_t *)&bsecState, BSEC_MAX_STATE_BLOB_SIZE);\n        file.close();\n        bme680.setState(bsecState);\n        LOG_INFO(\"%s state read from %s\", sensorName, bsecConfigFileName);\n    } else {\n        LOG_INFO(\"No %s state found (File: %s)\", sensorName, bsecConfigFileName);\n    }\n    spiLock->unlock();\n#else\n    LOG_ERROR(\"ERROR: Filesystem not implemented\");\n#endif\n}\n\nvoid BME680Sensor::updateState()\n{\n#ifdef FSCom\n    spiLock->lock();\n    bool update = false;\n    if (stateUpdateCounter == 0) {\n        /* First state update when IAQ accuracy is >= 3 */\n        accuracy = bme680.getData(BSEC_OUTPUT_IAQ).accuracy;\n        if (accuracy >= 2) {\n            LOG_DEBUG(\"%s state update IAQ accuracy %u >= 2\", sensorName, accuracy);\n            update = true;\n            stateUpdateCounter++;\n        } else {\n            LOG_DEBUG(\"%s not updated, IAQ accuracy is %u < 2\", sensorName, accuracy);\n        }\n    } else {\n        /* Update every STATE_SAVE_PERIOD minutes */\n        if ((stateUpdateCounter * STATE_SAVE_PERIOD) < millis()) {\n            LOG_DEBUG(\"%s state update every %d minutes\", sensorName, STATE_SAVE_PERIOD / 60000);\n            update = true;\n            stateUpdateCounter++;\n        }\n    }\n\n    if (update) {\n        bme680.getState(bsecState);\n        if (FSCom.exists(bsecConfigFileName) && !FSCom.remove(bsecConfigFileName)) {\n            LOG_WARN(\"Can't remove old state file\");\n        }\n        auto file = FSCom.open(bsecConfigFileName, FILE_O_WRITE);\n        if (file) {\n            LOG_INFO(\"%s state write to %s\", sensorName, bsecConfigFileName);\n            file.write((uint8_t *)&bsecState, BSEC_MAX_STATE_BLOB_SIZE);\n            file.flush();\n            file.close();\n        } else {\n            LOG_INFO(\"Can't write %s state (File: %s)\", sensorName, bsecConfigFileName);\n        }\n    }\n    spiLock->unlock();\n#else\n    LOG_ERROR(\"ERROR: Filesystem not implemented\");\n#endif\n}\n\nvoid BME680Sensor::checkStatus(const char *functionName)\n{\n    if (bme680.status < BSEC_OK)\n        LOG_ERROR(\"%s BSEC2 code: %d\", functionName, bme680.status);\n    else if (bme680.status > BSEC_OK)\n        LOG_WARN(\"%s BSEC2 code: %d\", functionName, bme680.status);\n\n    if (bme680.sensor.status < BME68X_OK)\n        LOG_ERROR(\"%s BME68X code: %d\", functionName, bme680.sensor.status);\n    else if (bme680.sensor.status > BME68X_OK)\n        LOG_WARN(\"%s BME68X code: %d\", functionName, bme680.sensor.status);\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BME680Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && (__has_include(<bsec2.h>) || __has_include(<Adafruit_BME680.h>))\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n\n#if __has_include(<bsec2.h>)\n#include <bme68xLibrary.h>\n#include <bsec2.h>\n#else\n#include <Adafruit_BME680.h>\n#include <memory>\n#endif\n\n#define STATE_SAVE_PERIOD UINT32_C(360 * 60 * 1000) // That's 6 hours worth of millis()\n\n#if __has_include(<bsec2.h>)\nconst uint8_t bsec_config[] = {\n#include \"config/bme680/bme680_iaq_33v_3s_4d/bsec_iaq.txt\"\n};\n#endif\nclass BME680Sensor : public TelemetrySensor\n{\n  private:\n#if __has_include(<bsec2.h>)\n    Bsec2 bme680;\n#else\n    using BME680Ptr = std::unique_ptr<Adafruit_BME680>;\n\n    static BME680Ptr makeBME680(TwoWire *bus) { return BME680Ptr(new Adafruit_BME680(bus)); }\n\n    BME680Ptr bme680;\n#endif\n\n  protected:\n#if __has_include(<bsec2.h>)\n    const char *bsecConfigFileName = \"/prefs/bsec.dat\";\n    uint8_t bsecState[BSEC_MAX_STATE_BLOB_SIZE] = {0};\n    uint8_t accuracy = 0;\n    uint16_t stateUpdateCounter = 0;\n    bsecSensor sensorList[9] = {BSEC_OUTPUT_IAQ,\n                                BSEC_OUTPUT_RAW_TEMPERATURE,\n                                BSEC_OUTPUT_RAW_PRESSURE,\n                                BSEC_OUTPUT_RAW_HUMIDITY,\n                                BSEC_OUTPUT_RAW_GAS,\n                                BSEC_OUTPUT_STABILIZATION_STATUS,\n                                BSEC_OUTPUT_RUN_IN_STATUS,\n                                BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,\n                                BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY};\n    void loadState();\n    void updateState();\n    void checkStatus(const char *functionName);\n#endif\n\n  public:\n    BME680Sensor();\n#if __has_include(<bsec2.h>)\n    virtual int32_t runOnce() override;\n#endif\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BMP085Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BMP085.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BMP085Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_BMP085.h>\n#include <typeinfo>\n\nBMP085Sensor::BMP085Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BMP085, \"BMP085\") {}\n\nbool BMP085Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    bmp085 = Adafruit_BMP085();\n    status = bmp085.begin(dev->address.address, bus);\n\n    initI2CSensor();\n    return status;\n}\n\nbool BMP085Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n\n    LOG_DEBUG(\"BMP085 getMetrics\");\n    measurement->variant.environment_metrics.temperature = bmp085.readTemperature();\n    measurement->variant.environment_metrics.barometric_pressure = bmp085.readPressure() / 100.0F;\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BMP085Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BMP085.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_BMP085.h>\n\nclass BMP085Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_BMP085 bmp085;\n\n  public:\n    BMP085Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BMP280Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BMP280.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"BMP280Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_BMP280.h>\n#include <typeinfo>\n\nBMP280Sensor::BMP280Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BMP280, \"BMP280\") {}\n\nbool BMP280Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    bmp280 = Adafruit_BMP280(bus);\n    status = bmp280.begin(dev->address.address);\n    if (!status) {\n        return status;\n    }\n\n    bmp280.setSampling(Adafruit_BMP280::MODE_FORCED,\n                       Adafruit_BMP280::SAMPLING_X1, // Temp. oversampling\n                       Adafruit_BMP280::SAMPLING_X1, // Pressure oversampling\n                       Adafruit_BMP280::FILTER_OFF, Adafruit_BMP280::STANDBY_MS_1000);\n\n    initI2CSensor();\n    return status;\n}\n\nbool BMP280Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n\n    LOG_DEBUG(\"BMP280 getMetrics\");\n    bmp280.takeForcedMeasurement();\n    measurement->variant.environment_metrics.temperature = bmp280.readTemperature();\n    measurement->variant.environment_metrics.barometric_pressure = bmp280.readPressure() / 100.0F;\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BMP280Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BMP280.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_BMP280.h>\n\nclass BMP280Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_BMP280 bmp280;\n\n  public:\n    BMP280Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BMP3XXSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BMP3XX.h>)\n\n#include \"BMP3XXSensor.h\"\n\nBMP3XXSensor::BMP3XXSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_BMP3XX, \"BMP3XX\") {}\n\nbool BMP3XXSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    // Get a singleton instance and initialise the bmp3xx\n    if (bmp3xx == nullptr) {\n        bmp3xx = BMP3XXSingleton::GetInstance();\n    }\n    status = bmp3xx->begin_I2C(dev->address.address, bus);\n    if (!status) {\n        return status;\n    }\n\n    // set up oversampling and filter initialization\n    bmp3xx->setTemperatureOversampling(BMP3_OVERSAMPLING_4X);\n    bmp3xx->setPressureOversampling(BMP3_OVERSAMPLING_8X);\n    bmp3xx->setIIRFilterCoeff(BMP3_IIR_FILTER_COEFF_3);\n    bmp3xx->setOutputDataRate(BMP3_ODR_25_HZ);\n\n    // take a couple of initial readings to settle the sensor filters\n    for (int i = 0; i < 3; i++) {\n        bmp3xx->performReading();\n    }\n    initI2CSensor();\n    return status;\n}\n\nbool BMP3XXSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    if (bmp3xx == nullptr) {\n        bmp3xx = BMP3XXSingleton::GetInstance();\n    }\n    if ((int)measurement->which_variant == meshtastic_Telemetry_environment_metrics_tag) {\n        bmp3xx->performReading();\n\n        measurement->variant.environment_metrics.has_temperature = true;\n        measurement->variant.environment_metrics.has_barometric_pressure = true;\n        measurement->variant.environment_metrics.has_relative_humidity = false;\n\n        measurement->variant.environment_metrics.temperature = static_cast<float>(bmp3xx->temperature);\n        measurement->variant.environment_metrics.barometric_pressure = static_cast<float>(bmp3xx->pressure) / 100.0F;\n        measurement->variant.environment_metrics.relative_humidity = 0.0f;\n\n        LOG_DEBUG(\"BMP3XX getMetrics id: %i temp: %.1f press %.1f\", measurement->which_variant,\n                  measurement->variant.environment_metrics.temperature,\n                  measurement->variant.environment_metrics.barometric_pressure);\n    } else {\n        LOG_DEBUG(\"BMP3XX getMetrics id: %i\", measurement->which_variant);\n    }\n    return true;\n}\n\n// Get a singleton wrapper for an Adafruit_bmp3xx\nBMP3XXSingleton *BMP3XXSingleton::GetInstance()\n{\n    if (pinstance == nullptr) {\n        pinstance = new BMP3XXSingleton();\n    }\n    return pinstance;\n}\n\nBMP3XXSingleton::BMP3XXSingleton() {}\n\nBMP3XXSingleton::~BMP3XXSingleton() {}\n\nBMP3XXSingleton *BMP3XXSingleton::pinstance{nullptr};\n\nbool BMP3XXSingleton::performReading()\n{\n    bool result = Adafruit_BMP3XX::performReading();\n    if (result) {\n        double atmospheric = this->pressure / 100.0;\n        altitudeAmslMetres = 44330.0 * (1.0 - pow(atmospheric / SEAL_LEVEL_HPA, 0.1903));\n    } else {\n        altitudeAmslMetres = 0.0;\n    }\n    return result;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/BMP3XXSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BMP3XX.h>)\n\n#ifndef _BMP3XX_SENSOR_H\n#define _BMP3XX_SENSOR_H\n\n#define SEAL_LEVEL_HPA 1013.2f\n\n#include \"TelemetrySensor.h\"\n#include <Adafruit_BMP3XX.h>\n#include <typeinfo>\n\n// Singleton wrapper for the Adafruit_BMP3XX class\nclass BMP3XXSingleton : public Adafruit_BMP3XX\n{\n  private:\n    static BMP3XXSingleton *pinstance;\n\n  protected:\n    BMP3XXSingleton();\n    ~BMP3XXSingleton();\n\n  public:\n    // Create a singleton instance (not thread safe)\n    static BMP3XXSingleton *GetInstance();\n\n    // Singletons should not be cloneable.\n    BMP3XXSingleton(BMP3XXSingleton &other) = delete;\n\n    // Singletons should not be assignable.\n    void operator=(const BMP3XXSingleton &) = delete;\n\n    // Performs a full reading of all sensors in the BMP3XX. Assigns\n    // the internal temperature, pressure and altitudeAmsl variables\n    bool performReading();\n\n    // Altitude in metres above mean sea level, assigned after calling performReading()\n    double altitudeAmslMetres = 0.0f;\n};\n\nclass BMP3XXSensor : public TelemetrySensor\n{\n  protected:\n    BMP3XXSingleton *bmp3xx = nullptr;\n\n  public:\n    BMP3XXSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/CGRadSensSensor.cpp",
    "content": "/*\n *  Support for the ClimateGuard RadSens Dosimeter\n *  A fun and educational sensor for Meshtastic; not for safety critical applications.\n */\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"CGRadSensSensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Wire.h>\n#include <typeinfo>\n\nCGRadSensSensor::CGRadSensSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_RADSENS, \"RadSens\") {}\n\nbool CGRadSensSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    // Initialize the sensor following the same pattern as RCWL9620Sensor\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = true;\n    begin(bus, dev->address.address);\n    initI2CSensor();\n    return status;\n}\n\nvoid CGRadSensSensor::begin(TwoWire *wire, uint8_t addr)\n{\n    // Store the Wire and address to the sensor following the same pattern as RCWL9620Sensor\n    _wire = wire;\n    _addr = addr;\n    _wire->begin();\n}\n\nfloat CGRadSensSensor::getStaticRadiation()\n{\n    // Read a register, following the same pattern as the RCWL9620Sensor\n    _wire->beginTransmission(_addr); // Transfer data to addr.\n    _wire->write(0x06);              // Radiation intensity (static period T = 500 sec)\n    if (_wire->endTransmission() == 0) {\n        if (_wire->requestFrom(_addr, (uint8_t)3)) {\n            ; // Request 3 bytes\n            uint32_t data = _wire->read();\n            data <<= 8;\n            data |= _wire->read();\n            data <<= 8;\n            data |= _wire->read();\n\n            // As per the data sheet for the RadSens\n            // Register 0x06 contains the reading in 0.1 * μR / h\n            float microRadPerHr = float(data) / 10.0;\n            return microRadPerHr;\n        }\n    }\n    return -1.0;\n}\n\nbool CGRadSensSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    // Store the meansurement in the the appropriate fields of the protobuf\n    measurement->variant.environment_metrics.has_radiation = true;\n\n    LOG_DEBUG(\"CGRADSENS getMetrics\");\n    measurement->variant.environment_metrics.radiation = getStaticRadiation();\n\n    return true;\n}\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/CGRadSensSensor.h",
    "content": "/*\n *  Support for the ClimateGuard RadSens Dosimeter\n *  A fun and educational sensor for Meshtastic; not for safety critical applications.\n */\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Wire.h>\n\nclass CGRadSensSensor : public TelemetrySensor\n{\n  private:\n    uint8_t _addr = 0x66;\n    TwoWire *_wire = &Wire;\n\n  protected:\n    void begin(TwoWire *wire = &Wire, uint8_t addr = 0x66);\n    float getStaticRadiation();\n\n  public:\n    CGRadSensSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/CurrentSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#pragma once\n\nclass CurrentSensor\n{\n  public:\n    virtual int16_t getCurrentMa() = 0;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/DFRobotGravitySensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<DFRobot_RainfallSensor.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"DFRobotGravitySensor.h\"\n#include \"TelemetrySensor.h\"\n#include <DFRobot_RainfallSensor.h>\n#include <string>\n\nDFRobotGravitySensor::DFRobotGravitySensor() : TelemetrySensor(meshtastic_TelemetrySensorType_DFROBOT_RAIN, \"DFROBOT_RAIN\") {}\n\nDFRobotGravitySensor::~DFRobotGravitySensor()\n{\n    if (gravity) {\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wdelete-non-virtual-dtor\"\n        delete gravity;\n#pragma GCC diagnostic pop\n        gravity = nullptr;\n    }\n}\n\nbool DFRobotGravitySensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    gravity = new DFRobot_RainfallSensor_I2C(bus);\n    status = gravity->begin();\n\n    LOG_DEBUG(\"%s VID: %x, PID: %x, Version: %s\", sensorName, gravity->vid, gravity->pid, gravity->getFirmwareVersion().c_str());\n\n    initI2CSensor();\n    return status;\n}\n\nbool DFRobotGravitySensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    if (!gravity) {\n        LOG_ERROR(\"DFRobotGravitySensor not initialized\");\n        return false;\n    }\n\n    measurement->variant.environment_metrics.has_rainfall_1h = true;\n    measurement->variant.environment_metrics.has_rainfall_24h = true;\n\n    measurement->variant.environment_metrics.rainfall_1h = gravity->getRainfall(1);\n    measurement->variant.environment_metrics.rainfall_24h = gravity->getRainfall(24);\n\n    LOG_INFO(\"Rain 1h: %f mm\", measurement->variant.environment_metrics.rainfall_1h);\n    LOG_INFO(\"Rain 24h: %f mm\", measurement->variant.environment_metrics.rainfall_24h);\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/DFRobotGravitySensor.h",
    "content": "#pragma once\n\n#ifndef _MT_DFROBOTGRAVITYSENSOR_H\n#define _MT_DFROBOTGRAVITYSENSOR_H\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<DFRobot_RainfallSensor.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <DFRobot_RainfallSensor.h>\n#include <string>\n\nclass DFRobotGravitySensor : public TelemetrySensor\n{\n  private:\n    DFRobot_RainfallSensor_I2C *gravity = nullptr;\n\n  public:\n    DFRobotGravitySensor();\n    ~DFRobotGravitySensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/DFRobotLarkSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<DFRobot_LarkWeatherStation.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"DFRobotLarkSensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"gps/GeoCoord.h\"\n#include <DFRobot_LarkWeatherStation.h>\n#include <string>\n\nDFRobotLarkSensor::DFRobotLarkSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_DFROBOT_LARK, \"DFROBOT_LARK\") {}\n\nbool DFRobotLarkSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    lark = DFRobot_LarkWeatherStation_I2C(dev->address.address, bus);\n\n    if (lark.begin() == 0) // DFRobotLarkSensor init\n    {\n        LOG_DEBUG(\"DFRobotLarkSensor Init Succeed\");\n        status = true;\n    } else {\n        LOG_ERROR(\"DFRobotLarkSensor Init Failed\");\n        status = false;\n    }\n    initI2CSensor();\n    return status;\n}\n\nbool DFRobotLarkSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_relative_humidity = true;\n    measurement->variant.environment_metrics.has_wind_speed = true;\n    measurement->variant.environment_metrics.has_wind_direction = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n\n    measurement->variant.environment_metrics.temperature = lark.getValue(\"Temp\").toFloat();\n    measurement->variant.environment_metrics.relative_humidity = lark.getValue(\"Humi\").toFloat();\n    measurement->variant.environment_metrics.wind_speed = lark.getValue(\"Speed\").toFloat();\n    measurement->variant.environment_metrics.wind_direction = GeoCoord::bearingToDegrees(lark.getValue(\"Dir\").c_str());\n    measurement->variant.environment_metrics.barometric_pressure = lark.getValue(\"Pressure\").toFloat();\n\n    LOG_INFO(\"Temperature: %f\", measurement->variant.environment_metrics.temperature);\n    LOG_INFO(\"Humidity: %f\", measurement->variant.environment_metrics.relative_humidity);\n    LOG_INFO(\"Wind Speed: %f\", measurement->variant.environment_metrics.wind_speed);\n    LOG_INFO(\"Wind Direction: %d\", measurement->variant.environment_metrics.wind_direction);\n    LOG_INFO(\"Barometric Pressure: %f\", measurement->variant.environment_metrics.barometric_pressure);\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/DFRobotLarkSensor.h",
    "content": "#pragma once\n\n#ifndef _MT_DFROBOTLARKSENSOR_H\n#define _MT_DFROBOTLARKSENSOR_H\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<DFRobot_LarkWeatherStation.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <DFRobot_LarkWeatherStation.h>\n#include <string>\n\nclass DFRobotLarkSensor : public TelemetrySensor\n{\n  private:\n    DFRobot_LarkWeatherStation_I2C lark = DFRobot_LarkWeatherStation_I2C();\n\n  public:\n    DFRobotLarkSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/DPS310Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_DPS310.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"DPS310Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_DPS310.h>\n\nDPS310Sensor::DPS310Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_DPS310, \"DPS310\") {}\n\nbool DPS310Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = dps310.begin_I2C(dev->address.address, bus);\n    if (!status) {\n        return status;\n    }\n\n    dps310.configurePressure(DPS310_1HZ, DPS310_4SAMPLES);\n    dps310.configureTemperature(DPS310_1HZ, DPS310_4SAMPLES);\n    dps310.setMode(DPS310_CONT_PRESTEMP);\n\n    initI2CSensor();\n    return status;\n}\n\nbool DPS310Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    sensors_event_t temp, press;\n\n    if (!dps310.getEvents(&temp, &press)) {\n        LOG_DEBUG(\"DPS310 getEvents no data\");\n        return false;\n    }\n\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n    measurement->variant.environment_metrics.temperature = temp.temperature;\n    measurement->variant.environment_metrics.barometric_pressure = press.pressure;\n\n    return true;\n}\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/DPS310Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_DPS310.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_DPS310.h>\n\nclass DPS310Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_DPS310 dps310;\n\n  public:\n    DPS310Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA219Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_INA219.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"INA219Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_INA219.h>\n\n#ifndef INA219_MULTIPLIER\n#define INA219_MULTIPLIER 1.0f\n#endif\n\nINA219Sensor::INA219Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_INA219, \"INA219\") {}\n\nint32_t INA219Sensor::runOnce()\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    if (!hasSensor()) {\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n    if (!ina219.success()) {\n        ina219 = Adafruit_INA219(nodeTelemetrySensorsMap[sensorType].first);\n        status = ina219.begin(nodeTelemetrySensorsMap[sensorType].second);\n    } else {\n        status = ina219.success();\n    }\n    return initI2CSensor();\n}\n\nvoid INA219Sensor::setup() {}\n\nbool INA219Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_voltage = true;\n    measurement->variant.environment_metrics.has_current = true;\n\n    measurement->variant.environment_metrics.voltage = ina219.getBusVoltage_V();\n    measurement->variant.environment_metrics.current = ina219.getCurrent_mA() * INA219_MULTIPLIER;\n    return true;\n}\n\nuint16_t INA219Sensor::getBusVoltageMv()\n{\n    return lround(ina219.getBusVoltage_V() * 1000);\n}\n\nint16_t INA219Sensor::getCurrentMa()\n{\n    return lround(ina219.getCurrent_mA());\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA219Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_INA219.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"CurrentSensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"VoltageSensor.h\"\n#include <Adafruit_INA219.h>\n\nclass INA219Sensor : public TelemetrySensor, VoltageSensor, CurrentSensor\n{\n  private:\n    Adafruit_INA219 ina219;\n\n  protected:\n    virtual void setup() override;\n\n  public:\n    INA219Sensor();\n    virtual int32_t runOnce() override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual uint16_t getBusVoltageMv() override;\n    virtual int16_t getCurrentMa() override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA226Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(\"INA226.h\")\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"INA226.h\"\n#include \"INA226Sensor.h\"\n#include \"TelemetrySensor.h\"\n\nINA226Sensor::INA226Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_INA226, \"INA226\") {}\n\nint32_t INA226Sensor::runOnce()\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    if (!hasSensor()) {\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n\n    begin(nodeTelemetrySensorsMap[sensorType].second, nodeTelemetrySensorsMap[sensorType].first);\n\n    if (!status) {\n        status = ina226.begin();\n    }\n    return initI2CSensor();\n}\n\nvoid INA226Sensor::setup() {}\n\nvoid INA226Sensor::begin(TwoWire *wire, uint8_t addr)\n{\n    _wire = wire;\n    _addr = addr;\n    ina226 = INA226(_addr, _wire);\n    _wire->begin();\n    ina226.setMaxCurrentShunt(0.8, 0.100);\n}\n\nbool INA226Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    switch (measurement->which_variant) {\n    case meshtastic_Telemetry_environment_metrics_tag:\n        return getEnvironmentMetrics(measurement);\n\n    case meshtastic_Telemetry_power_metrics_tag:\n        return getPowerMetrics(measurement);\n    }\n\n    // unsupported metric\n    return false;\n}\n\nbool INA226Sensor::getEnvironmentMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_voltage = true;\n    measurement->variant.environment_metrics.has_current = true;\n\n    measurement->variant.environment_metrics.voltage = ina226.getBusVoltage();\n    measurement->variant.environment_metrics.current = ina226.getCurrent_mA();\n\n    return true;\n}\n\nbool INA226Sensor::getPowerMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.power_metrics.has_ch1_voltage = true;\n    measurement->variant.power_metrics.has_ch1_current = true;\n\n    measurement->variant.power_metrics.ch1_voltage = ina226.getBusVoltage();\n    measurement->variant.power_metrics.ch1_current = ina226.getCurrent_mA();\n\n    return true;\n}\n\nuint16_t INA226Sensor::getBusVoltageMv()\n{\n    return lround(ina226.getBusVoltage() * 1000);\n}\n\nint16_t INA226Sensor::getCurrentMa()\n{\n    return lround(ina226.getCurrent_mA());\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA226Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"CurrentSensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"VoltageSensor.h\"\n#include <INA226.h>\n\nclass INA226Sensor : public TelemetrySensor, VoltageSensor, CurrentSensor\n{\n  private:\n    uint8_t _addr = INA_ADDR;\n    TwoWire *_wire = &Wire;\n    INA226 ina226 = INA226(_addr, _wire);\n\n    bool getEnvironmentMetrics(meshtastic_Telemetry *measurement);\n    bool getPowerMetrics(meshtastic_Telemetry *measurement);\n\n  protected:\n    virtual void setup() override;\n    void begin(TwoWire *wire = &Wire, uint8_t addr = INA_ADDR);\n\n  public:\n    INA226Sensor();\n    virtual int32_t runOnce() override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual uint16_t getBusVoltageMv() override;\n    virtual int16_t getCurrentMa() override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA260Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_INA260.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"INA260Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_INA260.h>\n\nINA260Sensor::INA260Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_INA260, \"INA260\") {}\n\nint32_t INA260Sensor::runOnce()\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    if (!hasSensor()) {\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n\n    if (!status) {\n        status = ina260.begin(nodeTelemetrySensorsMap[sensorType].first, nodeTelemetrySensorsMap[sensorType].second);\n    }\n    return initI2CSensor();\n}\n\nvoid INA260Sensor::setup() {}\n\nbool INA260Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_voltage = true;\n    measurement->variant.environment_metrics.has_current = true;\n\n    // mV conversion to V\n    measurement->variant.environment_metrics.voltage = ina260.readBusVoltage() / 1000;\n    measurement->variant.environment_metrics.current = ina260.readCurrent();\n    return true;\n}\n\nuint16_t INA260Sensor::getBusVoltageMv()\n{\n    return lround(ina260.readBusVoltage());\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA260Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_INA260.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include \"VoltageSensor.h\"\n#include <Adafruit_INA260.h>\n\nclass INA260Sensor : public TelemetrySensor, VoltageSensor\n{\n  private:\n    Adafruit_INA260 ina260 = Adafruit_INA260();\n\n  protected:\n    virtual void setup() override;\n\n  public:\n    INA260Sensor();\n    virtual int32_t runOnce() override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual uint16_t getBusVoltageMv() override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA3221Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<INA3221.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"INA3221Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <INA3221.h>\n\nINA3221Sensor::INA3221Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_INA3221, \"INA3221\"){};\n\nint32_t INA3221Sensor::runOnce()\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    if (!hasSensor()) {\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n    if (!status) {\n        ina3221.begin(nodeTelemetrySensorsMap[sensorType].second);\n        ina3221.setShuntRes(100, 100, 100); // 0.1 Ohm shunt resistors\n        status = true;\n    } else {\n        status = true;\n    }\n    return initI2CSensor();\n};\n\nvoid INA3221Sensor::setup() {}\n\nstruct _INA3221Measurement INA3221Sensor::getMeasurement(ina3221_ch_t ch)\n{\n    struct _INA3221Measurement measurement;\n\n    measurement.voltage = ina3221.getVoltage(ch);\n    measurement.current = ina3221.getCurrent(ch);\n\n    return measurement;\n}\n\nstruct _INA3221Measurements INA3221Sensor::getMeasurements()\n{\n    struct _INA3221Measurements measurements;\n\n    // INA3221 has 3 channels starting from 0\n    for (int i = 0; i < 3; i++) {\n        measurements.measurements[i] = getMeasurement((ina3221_ch_t)i);\n    }\n\n    return measurements;\n}\n\nbool INA3221Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    switch (measurement->which_variant) {\n    case meshtastic_Telemetry_environment_metrics_tag:\n        return getEnvironmentMetrics(measurement);\n\n    case meshtastic_Telemetry_power_metrics_tag:\n        return getPowerMetrics(measurement);\n    }\n\n    // unsupported metric\n    return false;\n}\n\nbool INA3221Sensor::getEnvironmentMetrics(meshtastic_Telemetry *measurement)\n{\n    struct _INA3221Measurement m = getMeasurement(ENV_CH);\n\n    measurement->variant.environment_metrics.has_voltage = true;\n    measurement->variant.environment_metrics.has_current = true;\n\n    measurement->variant.environment_metrics.voltage = m.voltage;\n    measurement->variant.environment_metrics.current = m.current;\n\n    return true;\n}\n\nbool INA3221Sensor::getPowerMetrics(meshtastic_Telemetry *measurement)\n{\n    struct _INA3221Measurements m = getMeasurements();\n\n    measurement->variant.power_metrics.has_ch1_voltage = true;\n    measurement->variant.power_metrics.has_ch1_current = true;\n    measurement->variant.power_metrics.has_ch2_voltage = true;\n    measurement->variant.power_metrics.has_ch2_current = true;\n    measurement->variant.power_metrics.has_ch3_voltage = true;\n    measurement->variant.power_metrics.has_ch3_current = true;\n\n    measurement->variant.power_metrics.ch1_voltage = m.measurements[INA3221_CH1].voltage;\n    measurement->variant.power_metrics.ch1_current = m.measurements[INA3221_CH1].current;\n    measurement->variant.power_metrics.ch2_voltage = m.measurements[INA3221_CH2].voltage;\n    measurement->variant.power_metrics.ch2_current = m.measurements[INA3221_CH2].current;\n    measurement->variant.power_metrics.ch3_voltage = m.measurements[INA3221_CH3].voltage;\n    measurement->variant.power_metrics.ch3_current = m.measurements[INA3221_CH3].current;\n\n    return true;\n}\n\nuint16_t INA3221Sensor::getBusVoltageMv()\n{\n    return lround(ina3221.getVoltage(BAT_CH) * 1000);\n}\n\nint16_t INA3221Sensor::getCurrentMa()\n{\n    return lround(ina3221.getCurrent(BAT_CH));\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/INA3221Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<INA3221.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"CurrentSensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"VoltageSensor.h\"\n#include <INA3221.h>\n\n#ifndef INA3221_ENV_CH\n#define INA3221_ENV_CH INA3221_CH1\n#endif\n\n#ifndef INA3221_BAT_CH\n#define INA3221_BAT_CH INA3221_CH1\n#endif\n\nclass INA3221Sensor : public TelemetrySensor, VoltageSensor, CurrentSensor\n{\n  private:\n    INA3221 ina3221 = INA3221(INA3221_ADDR42_SDA);\n\n    // channel to report voltage/current for environment metrics\n    static const ina3221_ch_t ENV_CH = INA3221_ENV_CH;\n\n    // channel to report battery voltage for device_battery_ina_address\n    static const ina3221_ch_t BAT_CH = INA3221_BAT_CH;\n\n    // get a single measurement for a channel\n    struct _INA3221Measurement getMeasurement(ina3221_ch_t ch);\n\n    // get all measurements for all channels\n    struct _INA3221Measurements getMeasurements();\n\n    bool getEnvironmentMetrics(meshtastic_Telemetry *measurement);\n    bool getPowerMetrics(meshtastic_Telemetry *measurement);\n\n  protected:\n    void setup() override;\n\n  public:\n    INA3221Sensor();\n    int32_t runOnce() override;\n    bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual uint16_t getBusVoltageMv() override;\n    virtual int16_t getCurrentMa() override;\n};\n\nstruct _INA3221Measurement {\n    float voltage;\n    float current;\n};\n\nstruct _INA3221Measurements {\n    // INA3221 has 3 channels\n    struct _INA3221Measurement measurements[3];\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/IndicatorSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(SENSECAP_INDICATOR)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"IndicatorSensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"serialization/cobs.h\"\n#include <Adafruit_Sensor.h>\n#include <driver/uart.h>\n\nIndicatorSensor::IndicatorSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SENSOR_UNSET, \"Indicator\") {}\n\n#define SENSOR_BUF_SIZE (512)\n\nuint8_t buf[SENSOR_BUF_SIZE];  // recv\nuint8_t data[SENSOR_BUF_SIZE]; // decode\n\n#define ACK_PKT_PARA \"ACK\"\n\nenum sensor_pkt_type {\n    PKT_TYPE_ACK = 0x00,                  // uin32_t\n    PKT_TYPE_CMD_COLLECT_INTERVAL = 0xA0, // uin32_t\n    PKT_TYPE_CMD_BEEP_ON = 0xA1,          // uin32_t  ms: on time\n    PKT_TYPE_CMD_BEEP_OFF = 0xA2,\n    PKT_TYPE_CMD_SHUTDOWN = 0xA3, // uin32_t\n    PKT_TYPE_CMD_POWER_ON = 0xA4,\n    PKT_TYPE_SENSOR_SCD41_TEMP = 0xB0,     // float\n    PKT_TYPE_SENSOR_SCD41_HUMIDITY = 0xB1, // float\n    PKT_TYPE_SENSOR_SCD41_CO2 = 0xB2,      // float\n    PKT_TYPE_SENSOR_AHT20_TEMP = 0xB3,     // float\n    PKT_TYPE_SENSOR_AHT20_HUMIDITY = 0xB4, // float\n    PKT_TYPE_SENSOR_TVOC_INDEX = 0xB5,     // float\n};\n\nstatic int cmd_send(uint8_t cmd, const char *p_data, uint8_t len)\n{\n    uint8_t send_buf[32] = {0};\n    uint8_t send_data[32] = {0};\n\n    if (len > 31) {\n        return -1;\n    }\n\n    uint8_t index = 1;\n\n    send_data[0] = cmd;\n\n    if (len > 0 && p_data != NULL) {\n        memcpy(&send_data[1], p_data, len);\n        index += len;\n    }\n    cobs_encode_result ret = cobs_encode(send_buf, sizeof(send_buf), send_data, index);\n\n    // LOG_DEBUG(\"cobs TX status:%d, len:%d, type 0x%x\", ret.status, ret.out_len, cmd);\n\n    if (ret.status == COBS_ENCODE_OK) {\n        return uart_write_bytes(SENSOR_PORT_NUM, send_buf, ret.out_len + 1);\n    }\n\n    return -1;\n}\n\nbool IndicatorSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"%s: init\", sensorName);\n    setup();\n    return true;\n}\n\nvoid IndicatorSensor::setup()\n{\n    uart_config_t uart_config = {\n        .baud_rate = SENSOR_BAUD_RATE,\n        .data_bits = UART_DATA_8_BITS,\n        .parity = UART_PARITY_DISABLE,\n        .stop_bits = UART_STOP_BITS_1,\n        .flow_ctrl = UART_HW_FLOWCTRL_DISABLE,\n        .source_clk = UART_SCLK_APB,\n    };\n    int intr_alloc_flags = 0;\n    char buffer[11];\n\n    uart_driver_install(SENSOR_PORT_NUM, SENSOR_BUF_SIZE * 2, 0, 0, NULL, intr_alloc_flags);\n    uart_param_config(SENSOR_PORT_NUM, &uart_config);\n    uart_set_pin(SENSOR_PORT_NUM, SENSOR_RP2040_TXD, SENSOR_RP2040_RXD, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);\n    cmd_send(PKT_TYPE_CMD_POWER_ON, NULL, 0);\n    // measure and send only once every minute, for the phone API\n    const char *interval = ultoa(60000, buffer, 10);\n    cmd_send(PKT_TYPE_CMD_COLLECT_INTERVAL, interval, strlen(interval) + 1);\n}\n\nbool IndicatorSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    cobs_decode_result ret;\n    int len = uart_read_bytes(SENSOR_PORT_NUM, buf, (SENSOR_BUF_SIZE - 1), 100 / portTICK_PERIOD_MS);\n\n    float value = 0.0;\n    uint8_t *p_buf_start = buf;\n    uint8_t *p_buf_end = buf;\n    if (len > 0) {\n        while (p_buf_start < (buf + len)) {\n            p_buf_end = p_buf_start;\n            while (p_buf_end < (buf + len)) {\n                if (*p_buf_end == 0x00) {\n                    break;\n                }\n                p_buf_end++;\n            }\n            // decode buf\n            memset(data, 0, sizeof(data));\n            ret = cobs_decode(data, sizeof(data), p_buf_start, p_buf_end - p_buf_start);\n\n            // LOG_DEBUG(\"cobs RX status:%d, len:%d, type:0x%x  \", ret.status, ret.out_len, data[0]);\n\n            if (ret.out_len > 1 && ret.status == COBS_DECODE_OK) {\n\n                value = 0.0;\n                uint8_t pkt_type = data[0];\n                switch (pkt_type) {\n                case PKT_TYPE_SENSOR_SCD41_CO2: {\n                    memcpy(&value, &data[1], sizeof(value));\n                    // LOG_DEBUG(\"CO2: %.1f\", value);\n                    cmd_send(PKT_TYPE_ACK, ACK_PKT_PARA, 4);\n                    break;\n                }\n\n                case PKT_TYPE_SENSOR_AHT20_TEMP: {\n                    memcpy(&value, &data[1], sizeof(value));\n                    // LOG_DEBUG(\"Temp: %.1f\", value);\n                    cmd_send(PKT_TYPE_ACK, ACK_PKT_PARA, 4);\n                    measurement->variant.environment_metrics.has_temperature = true;\n                    measurement->variant.environment_metrics.temperature = value;\n                    break;\n                }\n\n                case PKT_TYPE_SENSOR_AHT20_HUMIDITY: {\n                    memcpy(&value, &data[1], sizeof(value));\n                    // LOG_DEBUG(\"Humidity: %.1f\", value);\n                    cmd_send(PKT_TYPE_ACK, ACK_PKT_PARA, 4);\n                    measurement->variant.environment_metrics.has_relative_humidity = true;\n                    measurement->variant.environment_metrics.relative_humidity = value;\n                    break;\n                }\n\n                case PKT_TYPE_SENSOR_TVOC_INDEX: {\n                    memcpy(&value, &data[1], sizeof(value));\n                    // LOG_DEBUG(\"Tvoc: %.1f\", value);\n                    cmd_send(PKT_TYPE_ACK, ACK_PKT_PARA, 4);\n                    measurement->variant.environment_metrics.has_iaq = true;\n                    measurement->variant.environment_metrics.iaq = value;\n                    break;\n                }\n                default:\n                    break;\n                }\n            }\n\n            p_buf_start = p_buf_end + 1; // next message\n        }\n        return true;\n    }\n    return false;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/IndicatorSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n\nclass IndicatorSensor : public TelemetrySensor\n{\n  public:\n    IndicatorSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n\n  private:\n    void setup();\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/LPS22HBSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_LPS2X.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"LPS22HBSensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_LPS2X.h>\n#include <Adafruit_Sensor.h>\n\nLPS22HBSensor::LPS22HBSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_LPS22, \"LPS22HB\") {}\n\nbool LPS22HBSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = lps22hb.begin_I2C(dev->address.address, bus);\n    if (!status) {\n        return status;\n    }\n    lps22hb.setDataRate(LPS22_RATE_10_HZ);\n\n    initI2CSensor();\n    return status;\n}\n\nbool LPS22HBSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_barometric_pressure = true;\n\n    sensors_event_t temp;\n    sensors_event_t pressure;\n    lps22hb.getEvent(&pressure, &temp);\n\n    measurement->variant.environment_metrics.temperature = temp.temperature;\n    measurement->variant.environment_metrics.barometric_pressure = pressure.pressure;\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/LPS22HBSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_LPS2X.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_LPS2X.h>\n#include <Adafruit_Sensor.h>\n\nclass LPS22HBSensor : public TelemetrySensor\n{\n  private:\n    Adafruit_LPS22 lps22hb;\n\n  public:\n    LPS22HBSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/LTR390UVSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_LTR390.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"LTR390UVSensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_LTR390.h>\n\nLTR390UVSensor::LTR390UVSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_LTR390UV, \"LTR390UV\") {}\n\nbool LTR390UVSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    status = ltr390uv.begin(bus);\n    if (!status) {\n        return status;\n    }\n\n    ltr390uv.setMode(LTR390_MODE_UVS);\n    ltr390uv.setGain(LTR390_GAIN_18);                // Datasheet default\n    ltr390uv.setResolution(LTR390_RESOLUTION_20BIT); // Datasheet default\n\n    initI2CSensor();\n    return status;\n}\n\nbool LTR390UVSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    LOG_DEBUG(\"LTR390UV getMetrics\");\n\n    // Because the sensor does not measure Lux and UV at the same time, we need to read them in two passes.\n    if (ltr390uv.newDataAvailable()) {\n        measurement->variant.environment_metrics.has_lux = true;\n        measurement->variant.environment_metrics.has_uv_lux = true;\n\n        if (ltr390uv.getMode() == LTR390_MODE_ALS) {\n            lastLuxReading = 0.6 * ltr390uv.readALS() / (1 * 4); // Datasheet page 23 for gain x1 and 20bit resolution\n            LOG_DEBUG(\"LTR390UV Lux reading: %f\", lastLuxReading);\n\n            measurement->variant.environment_metrics.lux = lastLuxReading;\n            measurement->variant.environment_metrics.uv_lux = lastUVReading;\n\n            ltr390uv.setGain(\n                LTR390_GAIN_18); // Recommended for UVI - x18. Do not change, 2300 UV Sensitivity only specified for x18 gain\n            ltr390uv.setMode(LTR390_MODE_UVS);\n\n            return true;\n\n        } else if (ltr390uv.getMode() == LTR390_MODE_UVS) {\n            lastUVReading = ltr390uv.readUVS() /\n                            2300.f; // Datasheet page 23 and page 6, only characterisation for gain x18 and 20bit resolution\n            LOG_DEBUG(\"LTR390UV UV reading: %f\", lastUVReading);\n\n            measurement->variant.environment_metrics.lux = lastLuxReading;\n            measurement->variant.environment_metrics.uv_lux = lastUVReading;\n\n            ltr390uv.setGain(\n                LTR390_GAIN_1); // x1 gain will already max out the sensor at direct sunlight, so no need to increase it\n            ltr390uv.setMode(LTR390_MODE_ALS);\n\n            return true;\n        }\n    }\n\n    // In case we fail to read the sensor mode, set the has_lux and has_uv_lux back to false\n    measurement->variant.environment_metrics.has_lux = false;\n    measurement->variant.environment_metrics.has_uv_lux = false;\n\n    return false;\n}\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/LTR390UVSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_LTR390.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_LTR390.h>\n\nclass LTR390UVSensor : public TelemetrySensor\n{\n  private:\n    Adafruit_LTR390 ltr390uv = Adafruit_LTR390();\n    float lastLuxReading = 0;\n    float lastUVReading = 0;\n\n  public:\n    LTR390UVSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MAX17048Sensor.cpp",
    "content": "#include \"MAX17048Sensor.h\"\n\n#if !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_MAX1704X.h>)\n\nMAX17048Singleton *MAX17048Singleton::GetInstance()\n{\n    if (pinstance == nullptr) {\n        pinstance = new MAX17048Singleton();\n    }\n    return pinstance;\n}\n\nMAX17048Singleton::MAX17048Singleton() {}\n\nMAX17048Singleton::~MAX17048Singleton() {}\n\nMAX17048Singleton *MAX17048Singleton::pinstance{nullptr};\n\nbool MAX17048Singleton::runOnce(TwoWire *theWire)\n{\n    initialized = begin(theWire);\n    LOG_DEBUG(\"%s::runOnce %s\", sensorStr, initialized ? \"began ok\" : \"begin failed\");\n    return initialized;\n}\n\nbool MAX17048Singleton::isBatteryCharging()\n{\n    float volts = cellVoltage();\n    if (isnan(volts)) {\n        LOG_DEBUG(\"%s::isBatteryCharging not connected\", sensorStr);\n        return 0;\n    }\n\n    MAX17048ChargeSample sample;\n    sample.chargeRate = chargeRate();   // charge/discharge rate in percent/hr\n    sample.cellPercent = cellPercent(); // state of charge in percent 0 to 100\n    chargeSamples.push(sample);         // save a sample into a fifo buffer\n\n    // Keep the fifo buffer trimmed\n    while (chargeSamples.size() > MAX17048_CHARGING_SAMPLES)\n        chargeSamples.pop();\n\n    // Based on the past n samples, is the lipo charging, discharging or idle\n    if (chargeSamples.front().chargeRate > MAX17048_CHARGING_MINIMUM_RATE &&\n        chargeSamples.back().chargeRate > MAX17048_CHARGING_MINIMUM_RATE) {\n        if (chargeSamples.front().cellPercent > chargeSamples.back().cellPercent)\n            chargeState = MAX17048ChargeState::EXPORT;\n        else if (chargeSamples.front().cellPercent < chargeSamples.back().cellPercent)\n            chargeState = MAX17048ChargeState::IMPORT;\n        else\n            chargeState = MAX17048ChargeState::IDLE;\n    } else {\n        chargeState = MAX17048ChargeState::IDLE;\n    }\n\n    LOG_DEBUG(\"%s::isBatteryCharging %s volts: %.3f soc: %.3f rate: %.3f\", sensorStr, chargeLabels[chargeState], volts,\n              sample.cellPercent, sample.chargeRate);\n    return chargeState == MAX17048ChargeState::IMPORT;\n}\n\nuint16_t MAX17048Singleton::getBusVoltageMv()\n{\n    float volts = cellVoltage();\n    if (isnan(volts)) {\n        LOG_DEBUG(\"%s::getBusVoltageMv is not connected\", sensorStr);\n        return 0;\n    }\n    LOG_DEBUG(\"%s::getBusVoltageMv %.3fmV\", sensorStr, volts);\n    return (uint16_t)(volts * 1000.0f);\n}\n\nuint8_t MAX17048Singleton::getBusBatteryPercent()\n{\n    float soc = cellPercent();\n    LOG_DEBUG(\"%s::getBusBatteryPercent %.1f%%\", sensorStr, soc);\n    return clamp(static_cast<uint8_t>(round(soc)), static_cast<uint8_t>(0), static_cast<uint8_t>(100));\n}\n\nuint16_t MAX17048Singleton::getTimeToGoSecs()\n{\n    float rate = chargeRate();                     // charge/discharge rate in percent/hr\n    float soc = cellPercent();                     // state of charge in percent 0 to 100\n    soc = clamp(soc, 0.0f, 100.0f);                // clamp soc between 0 and 100%\n    float ttg = ((100.0f - soc) / rate) * 3600.0f; // calculate seconds to charge/discharge\n    LOG_DEBUG(\"%s::getTimeToGoSecs %.0f seconds\", sensorStr, ttg);\n    return (uint16_t)ttg;\n}\n\nbool MAX17048Singleton::isBatteryConnected()\n{\n    float volts = cellVoltage();\n    if (isnan(volts)) {\n        LOG_DEBUG(\"%s::isBatteryConnected is not connected\", sensorStr);\n        return false;\n    }\n\n    // if a valid voltage is returned, then battery must be connected\n    return true;\n}\n\nbool MAX17048Singleton::isExternallyPowered()\n{\n    float volts = cellVoltage();\n    if (isnan(volts)) {\n        // if the battery is not connected then there must be external power\n        LOG_DEBUG(\"%s::isExternallyPowered battery is\", sensorStr);\n        return true;\n    }\n    // if the bus voltage is over MAX17048_BUS_POWER_VOLTS, then the external power\n    // is assumed to be connected\n    LOG_DEBUG(\"%s::isExternallyPowered %s connected\", sensorStr, volts >= MAX17048_BUS_POWER_VOLTS ? \"is\" : \"is not\");\n    return volts >= MAX17048_BUS_POWER_VOLTS;\n}\n\n#if (HAS_TELEMETRY && (!MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_POWER_TELEMETRY))\n\nMAX17048Sensor::MAX17048Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MAX17048, \"MAX17048\") {}\n\nint32_t MAX17048Sensor::runOnce()\n{\n    if (isInitialized()) {\n        LOG_INFO(\"Init sensor: %s is already initialised\", sensorName);\n        return true;\n    }\n\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    if (!hasSensor()) {\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n\n    // Get a singleton instance and initialise the max17048\n    if (max17048 == nullptr) {\n        max17048 = MAX17048Singleton::GetInstance();\n    }\n    status = max17048->runOnce(nodeTelemetrySensorsMap[sensorType].second);\n    return initI2CSensor();\n}\n\nvoid MAX17048Sensor::setup() {}\n\nbool MAX17048Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    LOG_DEBUG(\"MAX17048 getMetrics id: %i\", measurement->which_variant);\n\n    float volts = max17048->cellVoltage();\n    if (isnan(volts)) {\n        LOG_DEBUG(\"MAX17048 getMetrics battery is not connected\");\n        return false;\n    }\n\n    float rate = max17048->chargeRate(); // charge/discharge rate in percent/hr\n    float soc = max17048->cellPercent(); // state of charge in percent 0 to 100\n    soc = clamp(soc, 0.0f, 100.0f);      // clamp soc between 0 and 100%\n    float ttg = (100.0f - soc) / rate;   // calculate hours to charge/discharge\n\n    LOG_DEBUG(\"MAX17048 getMetrics volts: %.3fV soc: %.1f%% ttg: %.1f hours\", volts, soc, ttg);\n    if ((int)measurement->which_variant == meshtastic_Telemetry_power_metrics_tag) {\n        measurement->variant.power_metrics.has_ch1_voltage = true;\n        measurement->variant.power_metrics.ch1_voltage = volts;\n    } else if ((int)measurement->which_variant == meshtastic_Telemetry_device_metrics_tag) {\n        measurement->variant.device_metrics.has_battery_level = true;\n        measurement->variant.device_metrics.has_voltage = true;\n        measurement->variant.device_metrics.battery_level = static_cast<uint32_t>(round(soc));\n        measurement->variant.device_metrics.voltage = volts;\n    }\n    return true;\n}\n\nuint16_t MAX17048Sensor::getBusVoltageMv()\n{\n    return max17048->getBusVoltageMv();\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MAX17048Sensor.h",
    "content": "#pragma once\n\n#ifndef MAX17048_SENSOR_H\n#define MAX17048_SENSOR_H\n\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_MAX1704X.h>)\n\n// Samples to store in a buffer to determine if the battery is charging or discharging\n#define MAX17048_CHARGING_SAMPLES 3\n\n// Threshold to determine if the battery is on charge, in percent/hour\n#define MAX17048_CHARGING_MINIMUM_RATE 1.0f\n\n// Threshold to determine if the board has bus power\n#define MAX17048_BUS_POWER_VOLTS 4.195f\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include \"VoltageSensor.h\"\n\n#include \"meshUtils.h\"\n#include <Adafruit_MAX1704X.h>\n#include <queue>\n\nstruct MAX17048ChargeSample {\n    float cellPercent;\n    float chargeRate;\n};\n\nenum MAX17048ChargeState { IDLE, EXPORT, IMPORT };\n\n// Singleton wrapper for the Adafruit_MAX17048 class\nclass MAX17048Singleton : public Adafruit_MAX17048\n{\n  private:\n    static MAX17048Singleton *pinstance;\n    bool initialized = false;\n    std::queue<MAX17048ChargeSample> chargeSamples;\n    MAX17048ChargeState chargeState = IDLE;\n    const String chargeLabels[3] = {F(\"idle\"), F(\"export\"), F(\"import\")};\n    const char *sensorStr = \"MAX17048Sensor\";\n\n  protected:\n    MAX17048Singleton();\n    ~MAX17048Singleton();\n\n  public:\n    // Create a singleton instance (not thread safe)\n    static MAX17048Singleton *GetInstance();\n\n    // Singletons should not be cloneable.\n    MAX17048Singleton(MAX17048Singleton &other) = delete;\n\n    // Singletons should not be assignable.\n    void operator=(const MAX17048Singleton &) = delete;\n\n    // Initialise the sensor (not thread safe)\n    virtual bool runOnce(TwoWire *theWire = &Wire);\n\n    // Get the current bus voltage\n    uint16_t getBusVoltageMv();\n\n    // Get the state of charge in percent 0 to 100\n    uint8_t getBusBatteryPercent();\n\n    // Calculate the seconds to charge/discharge\n    uint16_t getTimeToGoSecs();\n\n    // Returns true if the battery sensor has started\n    inline virtual bool isInitialised() { return initialized; };\n\n    // Returns true if the battery is currently on charge (not thread safe)\n    bool isBatteryCharging();\n\n    // Returns true if a battery is actually connected\n    bool isBatteryConnected();\n\n    // Returns true if there is bus or external power connected\n    bool isExternallyPowered();\n};\n\n#if (HAS_TELEMETRY && (!MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_POWER_TELEMETRY))\n\nclass MAX17048Sensor : public TelemetrySensor, VoltageSensor\n{\n  private:\n    MAX17048Singleton *max17048 = nullptr;\n\n  protected:\n    virtual void setup() override;\n\n  public:\n    MAX17048Sensor();\n\n    // Initialise the sensor\n    virtual int32_t runOnce() override;\n\n    // Get the current bus voltage and state of charge\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n\n    // Get the current bus voltage\n    virtual uint16_t getBusVoltageMv() override;\n};\n\n#endif\n\n#endif\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MAX30102Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !MESHTASTIC_EXCLUDE_HEALTH_TELEMETRY && __has_include(<MAX30105.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"MAX30102Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <spo2_algorithm.h>\n\nMAX30102Sensor::MAX30102Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MAX30102, \"MAX30102\") {}\n\nint32_t MAX30102Sensor::runOnce()\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    if (!hasSensor()) {\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n\n    if (max30102.begin(*nodeTelemetrySensorsMap[sensorType].second, _speed, nodeTelemetrySensorsMap[sensorType].first) ==\n        true) // MAX30102 init\n    {\n        byte brightness = 60;   // 0=Off to 255=50mA\n        byte sampleAverage = 4; // 1, 2, 4, 8, 16, 32\n        byte leds = 2;          // 1 = Red only, 2 = Red + IR\n        byte sampleRate = 100;  // 50, 100, 200, 400, 800, 1000, 1600, 3200\n        int pulseWidth = 411;   // 69, 118, 215, 411\n        int adcRange = 4096;    // 2048, 4096, 8192, 16384\n\n        max30102.enableDIETEMPRDY(); // Enable the temperature ready interrupt\n        max30102.setup(brightness, sampleAverage, leds, sampleRate, pulseWidth, adcRange);\n        LOG_DEBUG(\"MAX30102 Init Succeed\");\n        status = true;\n    } else {\n        LOG_ERROR(\"MAX30102 Init Failed\");\n        status = false;\n    }\n    return initI2CSensor();\n}\n\nvoid MAX30102Sensor::setup() {}\n\nbool MAX30102Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    uint32_t ir_buff[MAX30102_BUFFER_LEN];\n    uint32_t red_buff[MAX30102_BUFFER_LEN];\n    int32_t spo2;\n    int8_t spo2_valid;\n    int32_t heart_rate;\n    int8_t heart_rate_valid;\n    float temp = max30102.readTemperature();\n\n    measurement->variant.environment_metrics.temperature = temp;\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.health_metrics.temperature = temp;\n    measurement->variant.health_metrics.has_temperature = true;\n    for (byte i = 0; i < MAX30102_BUFFER_LEN; i++) {\n        while (max30102.available() == false)\n            max30102.check();\n\n        red_buff[i] = max30102.getRed();\n        ir_buff[i] = max30102.getIR();\n        max30102.nextSample();\n    }\n\n    maxim_heart_rate_and_oxygen_saturation(ir_buff, MAX30102_BUFFER_LEN, red_buff, &spo2, &spo2_valid, &heart_rate,\n                                           &heart_rate_valid);\n    LOG_DEBUG(\"heart_rate=%d(%d), sp02=%d(%d)\", heart_rate, heart_rate_valid, spo2, spo2_valid);\n    if (heart_rate_valid) {\n        measurement->variant.health_metrics.has_heart_bpm = true;\n        measurement->variant.health_metrics.heart_bpm = heart_rate;\n    } else {\n        measurement->variant.health_metrics.has_heart_bpm = false;\n    }\n    if (spo2_valid) {\n        measurement->variant.health_metrics.has_spO2 = true;\n        measurement->variant.health_metrics.spO2 = spo2;\n    } else {\n        measurement->variant.health_metrics.has_spO2 = true;\n    }\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MAX30102Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && !MESHTASTIC_EXCLUDE_HEALTH_TELEMETRY && __has_include(<MAX30105.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <MAX30105.h>\n\n#define MAX30102_BUFFER_LEN 100\n\nclass MAX30102Sensor : public TelemetrySensor\n{\n  private:\n    MAX30105 max30102 = MAX30105();\n    uint32_t _speed = 200000UL;\n\n  protected:\n    virtual void setup() override;\n\n  public:\n    MAX30102Sensor();\n    virtual int32_t runOnce() override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MCP9808Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_MCP9808.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"MCP9808Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_MCP9808.h>\n\nMCP9808Sensor::MCP9808Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MCP9808, \"MCP9808\") {}\n\nbool MCP9808Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = mcp9808.begin(dev->address.address, bus);\n    if (!status) {\n        return status;\n    }\n    mcp9808.setResolution(2);\n\n    initI2CSensor();\n    return status;\n}\n\nbool MCP9808Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n\n    LOG_DEBUG(\"MCP9808 getMetrics\");\n    measurement->variant.environment_metrics.temperature = mcp9808.readTempC();\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MCP9808Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_MCP9808.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_MCP9808.h>\n\nclass MCP9808Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_MCP9808 mcp9808;\n\n  public:\n    MCP9808Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MLX90614Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_MLX90614.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"MLX90614Sensor.h\"\n#include \"TelemetrySensor.h\"\nMLX90614Sensor::MLX90614Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MLX90614, \"MLX90614\") {}\n\nint32_t MLX90614Sensor::runOnce()\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    if (!hasSensor()) {\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n\n    if (mlx.begin(nodeTelemetrySensorsMap[sensorType].first, nodeTelemetrySensorsMap[sensorType].second) == true) // MLX90614 init\n    {\n        LOG_DEBUG(\"MLX90614 emissivity: %f\", mlx.readEmissivity());\n        if (fabs(MLX90614_EMISSIVITY - mlx.readEmissivity()) > 0.001) {\n            mlx.writeEmissivity(MLX90614_EMISSIVITY);\n            LOG_INFO(\"MLX90614 emissivity updated. In case of weird data, power cycle\");\n        }\n        LOG_DEBUG(\"MLX90614 Init Succeed\");\n        status = true;\n    } else {\n        LOG_ERROR(\"MLX90614 Init Failed\");\n        status = false;\n    }\n    return initI2CSensor();\n}\n\nvoid MLX90614Sensor::setup() {}\n\nbool MLX90614Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.temperature = mlx.readAmbientTempC();\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.health_metrics.temperature = mlx.readObjectTempC();\n    measurement->variant.health_metrics.has_temperature = true;\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MLX90614Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_MLX90614.h>)\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_MLX90614.h>\n\n#define MLX90614_EMISSIVITY 0.98 // human skin\n\nclass MLX90614Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_MLX90614 mlx = Adafruit_MLX90614();\n\n  protected:\n    virtual void setup() override;\n\n  public:\n    MLX90614Sensor();\n    virtual int32_t runOnce() override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n};\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MLX90632Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<SparkFun_MLX90632_Arduino_Library.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"MLX90632Sensor.h\"\n#include \"TelemetrySensor.h\"\n\nMLX90632Sensor::MLX90632Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_MLX90632, \"MLX90632\") {}\n\nbool MLX90632Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    MLX90632::status returnError;\n    if (mlx.begin(dev->address.address, *bus, returnError) == true) // MLX90632 init\n    {\n        LOG_DEBUG(\"MLX90632 Init Succeed\");\n        status = true;\n    } else {\n        LOG_ERROR(\"MLX90632 Init Failed\");\n        status = false;\n    }\n    initI2CSensor();\n    return status;\n}\n\nbool MLX90632Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.temperature = mlx.getObjectTemp(); // Get the object temperature in Fahrenheit\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/MLX90632Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<SparkFun_MLX90632_Arduino_Library.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <SparkFun_MLX90632_Arduino_Library.h>\n\nclass MLX90632Sensor : public TelemetrySensor\n{\n  private:\n    MLX90632 mlx = MLX90632();\n\n  public:\n    MLX90632Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/NAU7802Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"FSCommon.h\"\n#include \"NAU7802Sensor.h\"\n#include \"SPILock.h\"\n#include \"SafeFile.h\"\n#include \"TelemetrySensor.h\"\n#include <Throttle.h>\n#include <pb_decode.h>\n#include <pb_encode.h>\n\nmeshtastic_Nau7802Config nau7802config = meshtastic_Nau7802Config_init_zero;\n\nNAU7802Sensor::NAU7802Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_NAU7802, \"NAU7802\") {}\n\nbool NAU7802Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = nau7802.begin(*bus);\n    if (!status) {\n        return status;\n    }\n    nau7802.setSampleRate(NAU7802_SPS_320);\n    if (!loadCalibrationData()) {\n        LOG_ERROR(\"Failed to load calibration data\");\n    }\n    nau7802.calibrateAFE();\n    LOG_INFO(\"Offset: %d, Calibration factor: %.2f\", nau7802.getZeroOffset(), nau7802.getCalibrationFactor());\n    initI2CSensor();\n    return status;\n}\n\nbool NAU7802Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    LOG_DEBUG(\"NAU7802 getMetrics\");\n    nau7802.powerUp();\n    // Wait for the sensor to become ready for one second max\n    uint32_t start = millis();\n    while (!nau7802.available()) {\n        delay(100);\n        if (!Throttle::isWithinTimespanMs(start, 1000)) {\n            nau7802.powerDown();\n            return false;\n        }\n    }\n    measurement->variant.environment_metrics.has_weight = true;\n    // Check if we have correct calibration values after powerup\n    LOG_DEBUG(\"Offset: %d, Calibration factor: %.2f\", nau7802.getZeroOffset(), nau7802.getCalibrationFactor());\n    measurement->variant.environment_metrics.weight = nau7802.getWeight() / 1000; // sample is in kg\n    nau7802.powerDown();\n    return true;\n}\n\nvoid NAU7802Sensor::calibrate(float weight)\n{\n    nau7802.calculateCalibrationFactor(weight * 1000, 64); // internal sample is in grams\n    if (!saveCalibrationData()) {\n        LOG_WARN(\"Failed to save calibration data\");\n    }\n    LOG_INFO(\"Offset: %d, Calibration factor: %.2f\", nau7802.getZeroOffset(), nau7802.getCalibrationFactor());\n}\n\nAdminMessageHandleResult NAU7802Sensor::handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                           meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result;\n\n    switch (request->which_payload_variant) {\n    case meshtastic_AdminMessage_set_scale_tag:\n        if (request->set_scale == 0) {\n            this->tare();\n            LOG_DEBUG(\"Client requested to tare scale\");\n        } else {\n            this->calibrate(request->set_scale);\n            LOG_DEBUG(\"Client requested to calibrate to %d kg\", request->set_scale);\n        }\n        result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    default:\n        result = AdminMessageHandleResult::NOT_HANDLED;\n    }\n\n    return result;\n}\n\nvoid NAU7802Sensor::tare()\n{\n    nau7802.calculateZeroOffset(64);\n    if (!saveCalibrationData()) {\n        LOG_WARN(\"Failed to save calibration data\");\n    }\n    LOG_INFO(\"Offset: %d, Calibration factor: %.2f\", nau7802.getZeroOffset(), nau7802.getCalibrationFactor());\n}\n\nbool NAU7802Sensor::saveCalibrationData()\n{\n    auto file = SafeFile(nau7802ConfigFileName);\n    nau7802config.zeroOffset = nau7802.getZeroOffset();\n    nau7802config.calibrationFactor = nau7802.getCalibrationFactor();\n    bool okay = false;\n\n    LOG_INFO(\"%s state write to %s\", sensorName, nau7802ConfigFileName);\n    pb_ostream_t stream = {&writecb, static_cast<Print *>(&file), meshtastic_Nau7802Config_size};\n\n    if (!pb_encode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) {\n        LOG_ERROR(\"Error: can't encode protobuf %s\", PB_GET_ERROR(&stream));\n    } else {\n        okay = true;\n    }\n    // Note: SafeFile::close() already acquires the lock and releases it internally\n    okay &= file.close();\n\n    return okay;\n}\n\nbool NAU7802Sensor::loadCalibrationData()\n{\n    spiLock->lock();\n    auto file = FSCom.open(nau7802ConfigFileName, FILE_O_READ);\n    bool okay = false;\n    if (file) {\n        LOG_INFO(\"%s state read from %s\", sensorName, nau7802ConfigFileName);\n        pb_istream_t stream = {&readcb, &file, meshtastic_Nau7802Config_size};\n        if (!pb_decode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) {\n            LOG_ERROR(\"Error: can't decode protobuf %s\", PB_GET_ERROR(&stream));\n        } else {\n            nau7802.setZeroOffset(nau7802config.zeroOffset);\n            nau7802.setCalibrationFactor(nau7802config.calibrationFactor);\n            okay = true;\n        }\n        file.close();\n    } else {\n        LOG_INFO(\"No %s state found (File: %s)\", sensorName, nau7802ConfigFileName);\n    }\n    spiLock->unlock();\n    return okay;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/NAU7802Sensor.h",
    "content": "#include \"MeshModule.h\"\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.h>\n\nclass NAU7802Sensor : public TelemetrySensor\n{\n  private:\n    NAU7802 nau7802;\n\n  protected:\n    const char *nau7802ConfigFileName = \"/prefs/nau7802.dat\";\n    bool saveCalibrationData();\n    bool loadCalibrationData();\n\n  public:\n    NAU7802Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n    void tare();\n    void calibrate(float weight);\n    AdminMessageHandleResult handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                meshtastic_AdminMessage *response) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/OPT3001Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<ClosedCube_OPT3001.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"OPT3001Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <ClosedCube_OPT3001.h>\n\nOPT3001Sensor::OPT3001Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_OPT3001, \"OPT3001\") {}\n\nbool OPT3001Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    auto errorCode = opt3001.begin(dev->address.address);\n    status = errorCode == NO_ERROR;\n    if (!status) {\n        return status;\n    }\n\n    OPT3001_Config newConfig;\n\n    newConfig.RangeNumber = 0b1100;\n    newConfig.ConvertionTime = 0b0;\n    newConfig.Latch = 0b1;\n    newConfig.ModeOfConversionOperation = 0b11;\n\n    OPT3001_ErrorCode errorConfig = opt3001.writeConfig(newConfig);\n    if (errorConfig != NO_ERROR) {\n        LOG_ERROR(\"OPT3001 configuration error #%d\", errorConfig);\n    }\n    status = errorConfig == NO_ERROR;\n\n    initI2CSensor();\n    return status;\n}\n\nbool OPT3001Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_lux = true;\n    OPT3001 result = opt3001.readResult();\n\n    measurement->variant.environment_metrics.lux = result.lux;\n    LOG_INFO(\"Lux: %f\", measurement->variant.environment_metrics.lux);\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/OPT3001Sensor.h",
    "content": "#pragma once\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<ClosedCube_OPT3001.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <ClosedCube_OPT3001.h>\n\nclass OPT3001Sensor : public TelemetrySensor\n{\n  private:\n    ClosedCube_OPT3001 opt3001;\n\n  public:\n    OPT3001Sensor();\n#if WIRE_INTERFACES_COUNT > 1\n    virtual bool onlyWire1() { return true; }\n#endif\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/PCT2075Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_PCT2075.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"PCT2075Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_PCT2075.h>\n\nPCT2075Sensor::PCT2075Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_PCT2075, \"PCT2075\") {}\n\nbool PCT2075Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = pct2075.begin(dev->address.address, bus);\n\n    initI2CSensor();\n    return status;\n}\n\nbool PCT2075Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.temperature = pct2075.getTemperature();\n\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/PCT2075Sensor.h",
    "content": "#pragma once\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_PCT2075.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_PCT2075.h>\n\nclass PCT2075Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_PCT2075 pct2075;\n\n  public:\n    PCT2075Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/PMSA003ISensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#include \"../detect/reClockI2C.h\"\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"PMSA003ISensor.h\"\n#include \"TelemetrySensor.h\"\n\n#include <Wire.h>\n\nPMSA003ISensor::PMSA003ISensor() : TelemetrySensor(meshtastic_TelemetrySensorType_PMSA003I, \"PMSA003I\") {}\n\nbool PMSA003ISensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n#ifdef PMSA003I_ENABLE_PIN\n    pinMode(PMSA003I_ENABLE_PIN, OUTPUT);\n#endif\n\n    _bus = bus;\n    _address = dev->address.address;\n\n#ifdef PMSA003I_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(PMSA003I_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(PMSA003I_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* PMSA003I_I2C_CLOCK_SPEED */\n\n    _bus->beginTransmission(_address);\n    if (_bus->endTransmission() != 0) {\n        LOG_WARN(\"%s not found on I2C at 0x12\", sensorName);\n        return false;\n    }\n\n#if defined(PMSA003I_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    status = 1;\n    LOG_INFO(\"%s Enabled\", sensorName);\n\n    initI2CSensor();\n    return true;\n}\n\nbool PMSA003ISensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    if (!isActive()) {\n        LOG_WARN(\"Can't get metrics. %s is not active\", sensorName);\n        return false;\n    }\n\n#ifdef PMSA003I_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(PMSA003I_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(PMSA003I_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* PMSA003I_I2C_CLOCK_SPEED */\n\n    _bus->requestFrom(_address, (uint8_t)PMSA003I_FRAME_LENGTH);\n    if (_bus->available() < PMSA003I_FRAME_LENGTH) {\n        LOG_WARN(\"%s read failed: incomplete data (%d bytes)\", sensorName, _bus->available());\n        return false;\n    }\n\n    for (uint8_t i = 0; i < PMSA003I_FRAME_LENGTH; i++) {\n        buffer[i] = _bus->read();\n    }\n\n#if defined(PMSA003I_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    if (buffer[0] != 0x42 || buffer[1] != 0x4D) {\n        LOG_WARN(\"%s frame header invalid: 0x%02X 0x%02X\", sensorName, buffer[0], buffer[1]);\n        return false;\n    }\n\n    auto read16 = [](const uint8_t *data, uint8_t idx) -> uint16_t { return (data[idx] << 8) | data[idx + 1]; };\n\n    computedChecksum = 0;\n\n    for (uint8_t i = 0; i < PMSA003I_FRAME_LENGTH - 2; i++) {\n        computedChecksum += buffer[i];\n    }\n    receivedChecksum = read16(buffer, PMSA003I_FRAME_LENGTH - 2);\n\n    if (computedChecksum != receivedChecksum) {\n        LOG_WARN(\"%s checksum failed: computed 0x%04X, received 0x%04X\", sensorName, computedChecksum, receivedChecksum);\n        return false;\n    }\n\n    measurement->variant.air_quality_metrics.has_pm10_standard = true;\n    measurement->variant.air_quality_metrics.pm10_standard = read16(buffer, 4);\n\n    measurement->variant.air_quality_metrics.has_pm25_standard = true;\n    measurement->variant.air_quality_metrics.pm25_standard = read16(buffer, 6);\n\n    measurement->variant.air_quality_metrics.has_pm100_standard = true;\n    measurement->variant.air_quality_metrics.pm100_standard = read16(buffer, 8);\n\n    // TODO - Add admin command to remove environmental metrics to save protobuf space\n    measurement->variant.air_quality_metrics.has_pm10_environmental = true;\n    measurement->variant.air_quality_metrics.pm10_environmental = read16(buffer, 10);\n\n    measurement->variant.air_quality_metrics.has_pm25_environmental = true;\n    measurement->variant.air_quality_metrics.pm25_environmental = read16(buffer, 12);\n\n    measurement->variant.air_quality_metrics.has_pm100_environmental = true;\n    measurement->variant.air_quality_metrics.pm100_environmental = read16(buffer, 14);\n\n    // TODO - Add admin command to remove PN to save protobuf space\n    measurement->variant.air_quality_metrics.has_particles_03um = true;\n    measurement->variant.air_quality_metrics.particles_03um = read16(buffer, 16);\n\n    measurement->variant.air_quality_metrics.has_particles_05um = true;\n    measurement->variant.air_quality_metrics.particles_05um = read16(buffer, 18);\n\n    measurement->variant.air_quality_metrics.has_particles_10um = true;\n    measurement->variant.air_quality_metrics.particles_10um = read16(buffer, 20);\n\n    measurement->variant.air_quality_metrics.has_particles_25um = true;\n    measurement->variant.air_quality_metrics.particles_25um = read16(buffer, 22);\n\n    measurement->variant.air_quality_metrics.has_particles_50um = true;\n    measurement->variant.air_quality_metrics.particles_50um = read16(buffer, 24);\n\n    measurement->variant.air_quality_metrics.has_particles_100um = true;\n    measurement->variant.air_quality_metrics.particles_100um = read16(buffer, 26);\n\n    LOG_DEBUG(\"Got %s readings: pM1p0_standard=%u, pM2p5_standard=%u, pM10p0_standard=%u\", sensorName,\n              measurement->variant.air_quality_metrics.pm10_standard, measurement->variant.air_quality_metrics.pm25_standard,\n              measurement->variant.air_quality_metrics.pm100_standard);\n\n    return true;\n}\n\nbool PMSA003ISensor::isActive()\n{\n    return state == State::ACTIVE;\n}\n\nint32_t PMSA003ISensor::wakeUpTimeMs()\n{\n#ifdef PMSA003I_ENABLE_PIN\n    return PMSA003I_WARMUP_MS;\n#endif\n    return 0;\n}\n\nint32_t PMSA003ISensor::pendingForReadyMs()\n{\n#ifdef PMSA003I_ENABLE_PIN\n\n    uint32_t now;\n    now = getTime();\n    uint32_t sincePmMeasureStarted = (now - pmMeasureStarted) * 1000;\n    LOG_DEBUG(\"%s: Since measure started: %ums\", sensorName, sincePmMeasureStarted);\n\n    if (sincePmMeasureStarted < PMSA003I_WARMUP_MS) {\n        LOG_INFO(\"%s: not enough time passed since starting measurement\", sensorName);\n        return PMSA003I_WARMUP_MS - sincePmMeasureStarted;\n    }\n    return 0;\n\n#endif\n    return 0;\n}\n\nbool PMSA003ISensor::canSleep()\n{\n#ifdef PMSA003I_ENABLE_PIN\n    return true;\n#endif\n    return false;\n}\n\nvoid PMSA003ISensor::sleep()\n{\n#ifdef PMSA003I_ENABLE_PIN\n    digitalWrite(PMSA003I_ENABLE_PIN, LOW);\n    state = State::IDLE;\n    pmMeasureStarted = 0;\n#endif\n}\n\nuint32_t PMSA003ISensor::wakeUp()\n{\n#ifdef PMSA003I_ENABLE_PIN\n    LOG_INFO(\"Waking up %s\", sensorName);\n    digitalWrite(PMSA003I_ENABLE_PIN, HIGH);\n    state = State::ACTIVE;\n    pmMeasureStarted = getTime();\n\n    return PMSA003I_WARMUP_MS;\n#endif\n    // No need to wait for warmup if already active\n    return 0;\n}\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/PMSA003ISensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RTC.h\"\n#include \"TelemetrySensor.h\"\n\n#define PMSA003I_I2C_CLOCK_SPEED 100000\n#define PMSA003I_FRAME_LENGTH 32\n#define PMSA003I_WARMUP_MS 30000\n\nclass PMSA003ISensor : public TelemetrySensor\n{\n  public:\n    PMSA003ISensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n\n    virtual bool isActive() override;\n    virtual void sleep() override;\n    virtual uint32_t wakeUp() override;\n    virtual bool canSleep() override;\n    virtual int32_t wakeUpTimeMs() override;\n    virtual int32_t pendingForReadyMs() override;\n\n  private:\n    enum class State { IDLE, ACTIVE };\n    State state = State::ACTIVE;\n\n    uint16_t computedChecksum = 0;\n    uint16_t receivedChecksum = 0;\n    uint32_t pmMeasureStarted = 0;\n\n    uint8_t buffer[PMSA003I_FRAME_LENGTH]{};\n    TwoWire *_bus{};\n    uint8_t _address{};\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/RAK12035Sensor.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(\"RAK12035_SoilMoisture.h\") && defined(RAK_4631) && RAK_4631 == 1\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RAK12035Sensor.h\"\n\n// The RAK12035 library's sensor_sleep() sets WB_IO2 (GPIO 34) LOW, which controls\n// the 3.3V switched power rail (PIN_3V3_EN). This turns off power to ALL peripherals\n// including GPS. We need to restore power after the library turns it off.\n#ifdef PIN_3V3_EN\n#define RESTORE_3V3_POWER() digitalWrite(PIN_3V3_EN, HIGH)\n#else\n#define RESTORE_3V3_POWER()\n#endif\n\nRAK12035Sensor::RAK12035Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_RAK12035, \"RAK12035\") {}\n\nbool RAK12035Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    // TODO:: check for up to 2 additional sensors and start them if present.\n    sensor.set_sensor_addr(RAK120351_ADDR);\n    delay(100);\n    sensor.begin(dev->address.address);\n\n    uint8_t data = 0;\n    sensor.get_sensor_version(&data);\n    if (data != 0) {\n        LOG_INFO(\"Init sensor: %s\", sensorName);\n        LOG_INFO(\"RAK12035Sensor Init Succeed \\nSensor Firmware version: %i, Sensor Name: %s\", data, sensorName);\n        status = true;\n        sensor.sensor_sleep();\n        RESTORE_3V3_POWER();\n    } else {\n        LOG_INFO(\"Init sensor: %s\", sensorName);\n        LOG_ERROR(\"RAK12035Sensor Init Failed\");\n        status = false;\n    }\n    if (!status) {\n        return status;\n    }\n    setup();\n\n    initI2CSensor();\n    return status;\n}\n\nvoid RAK12035Sensor::setup()\n{\n    // TODO:: Check for and run calibration check for up to 2 additional sensors if present.\n    uint16_t zero_val = 0;\n    uint16_t hundred_val = 0;\n    const uint16_t default_zero_val = 510;\n    const uint16_t default_hundred_val = 390;\n\n    sensor.sensor_on();\n    sensor.begin();\n    delay(200);\n    sensor.get_dry_cal(&zero_val);\n    delay(200);\n    sensor.get_wet_cal(&hundred_val);\n    delay(200);\n\n    bool calibrationReset = false;\n\n    if (zero_val == 0) {\n        LOG_INFO(\"Dry calibration not set, using default: %d\", default_zero_val);\n        sensor.set_dry_cal(default_zero_val);\n        delay(200);\n        zero_val = default_zero_val;\n        calibrationReset = true;\n    }\n    if (hundred_val == 0 || hundred_val >= zero_val) {\n        LOG_INFO(\"Wet calibration not set, using default: %d\", default_hundred_val);\n        sensor.set_wet_cal(default_hundred_val);\n        delay(200);\n        hundred_val = default_hundred_val;\n        calibrationReset = true;\n    }\n    if (calibrationReset) {\n        LOG_INFO(\"Default calibration values applied. Consider running the calibration sketch for better accuracy: \"\n                 \"https://github.com/RAKWireless/RAK12035_SoilMoisture\");\n    }\n\n    LOG_INFO(\"Dry calibration value: %d, Wet calibration value: %d\", zero_val, hundred_val);\n    sensor.sensor_sleep();\n    RESTORE_3V3_POWER();\n    delay(200);\n    LOG_INFO(\"Dry calibration value is %d\", zero_val);\n    LOG_INFO(\"Wet calibration value is %d\", hundred_val);\n}\n\nbool RAK12035Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    // TODO:: read and send metrics for up to 2 additional soil monitors if present.\n    measurement->variant.environment_metrics.has_soil_temperature = true;\n    measurement->variant.environment_metrics.has_soil_moisture = true;\n\n    uint8_t moisture = 0;\n    uint16_t temp = 0;\n    bool success = false;\n\n    sensor.sensor_on();\n    delay(200);\n    success = sensor.get_sensor_moisture(&moisture);\n    delay(200);\n    success &= sensor.get_sensor_temperature(&temp);\n    delay(200);\n    sensor.sensor_sleep();\n    RESTORE_3V3_POWER();\n\n    if (success == false) {\n        LOG_ERROR(\"Failed to read sensor data\");\n        return false;\n    }\n    measurement->variant.environment_metrics.soil_temperature = ((float)temp / 10.0f);\n    measurement->variant.environment_metrics.soil_moisture = moisture;\n\n    return true;\n}\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/RAK12035Sensor.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<RAK12035_SoilMoisture.h>) && defined(RAK_4631)\n#ifndef _MT_RAK12035VBSENSOR_H\n#define _MT_RAK12035VBSENSOR_H\n#endif\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RAK12035_SoilMoisture.h\"\n#include \"TelemetrySensor.h\"\n#include <Arduino.h>\n\nclass RAK12035Sensor : public TelemetrySensor\n{\n  private:\n    RAK12035 sensor;\n    void setup();\n\n  public:\n    RAK12035Sensor();\n#if WIRE_INTERFACES_COUNT > 1\n    virtual bool onlyWire1() { return true; }\n#endif\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/RAK9154Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(HAS_RAKPROT)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RAK9154Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"concurrency/Periodic.h\"\n#include <RAK-OneWireSerial.h>\n\nusing namespace concurrency;\n\n#define BOOT_DATA_REQ\n\nRAK9154Sensor::RAK9154Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SENSOR_UNSET, \"RAK1954\") {}\n\nstatic Periodic *onewirePeriodic;\n\nstatic SoftwareHalfSerial mySerial(HALF_UART_PIN); // Wire pin  P0.15\n\nstatic uint8_t buff[0x100];\nstatic uint16_t bufflen = 0;\n\nstatic int16_t dc_cur = 0;\nstatic uint16_t dc_vol = 0;\nstatic uint8_t dc_prec = 0;\nstatic uint8_t provision = 0;\n\nextern RAK9154Sensor rak9154Sensor;\n\nstatic void onewire_evt(const uint8_t pid, const uint8_t sid, const SNHUBAPI_EVT_E eid, uint8_t *msg, uint16_t len)\n{\n    switch (eid) {\n    case SNHUBAPI_EVT_RECV_REQ:\n    case SNHUBAPI_EVT_RECV_RSP:\n        break;\n\n    case SNHUBAPI_EVT_QSEND:\n        mySerial.write(msg, len);\n        break;\n\n    case SNHUBAPI_EVT_ADD_SID:\n        // LOG_INFO(\"+ADD:SID:[%02x]\", msg[0]);\n        break;\n\n    case SNHUBAPI_EVT_ADD_PID:\n        // LOG_INFO(\"+ADD:PID:[%02x]\", msg[0]);\n#ifdef BOOT_DATA_REQ\n        provision = msg[0];\n#endif\n        break;\n\n    case SNHUBAPI_EVT_GET_INTV:\n        break;\n\n    case SNHUBAPI_EVT_GET_ENABLE:\n        break;\n\n    case SNHUBAPI_EVT_SDATA_REQ:\n\n        // LOG_INFO(\"+EVT:PID[%02x],IPSO[%02x]\",pid,msg[0]);\n        // for( uint16_t i=1; i<len; i++)\n        // {\n        //     LOG_INFO(\"%02x,\", msg[i]);\n        // }\n        // LOG_INFO(\"\");\n        switch (msg[0]) {\n        case RAK_IPSO_CAPACITY:\n            dc_prec = msg[1];\n            if (dc_prec > 100) {\n                dc_prec = 100;\n            }\n            break;\n        case RAK_IPSO_DC_CURRENT:\n            dc_cur = (msg[2] << 8) + msg[1];\n            break;\n        case RAK_IPSO_DC_VOLTAGE:\n            dc_vol = (msg[2] << 8) + msg[1];\n            dc_vol *= 10;\n            break;\n        default:\n            break;\n        }\n        rak9154Sensor.setLastRead(millis());\n\n        break;\n    case SNHUBAPI_EVT_REPORT:\n\n        // LOG_INFO(\"+EVT:PID[%02x],IPSO[%02x]\",pid,msg[0]);\n        // for( uint16_t i=1; i<len; i++)\n        // {\n        //     LOG_INFO(\"%02x,\", msg[i]);\n        // }\n        // LOG_INFO(\"\");\n\n        switch (msg[0]) {\n        case RAK_IPSO_CAPACITY:\n            dc_prec = msg[1];\n            if (dc_prec > 100) {\n                dc_prec = 100;\n            }\n            break;\n        case RAK_IPSO_DC_CURRENT:\n            dc_cur = (msg[1] << 8) + msg[2];\n            break;\n        case RAK_IPSO_DC_VOLTAGE:\n            dc_vol = (msg[1] << 8) + msg[2];\n            dc_vol *= 10;\n            break;\n        default:\n            break;\n        }\n        rak9154Sensor.setLastRead(millis());\n\n        break;\n\n    case SNHUBAPI_EVT_CHKSUM_ERR:\n        LOG_INFO(\"+ERR:CHKSUM\");\n        break;\n\n    case SNHUBAPI_EVT_SEQ_ERR:\n        LOG_INFO(\"+ERR:SEQUCE\");\n        break;\n\n    default:\n        break;\n    }\n}\n\nstatic int32_t onewireHandle()\n{\n    if (provision != 0) {\n        RakSNHub_Protocl_API.get.data(provision);\n        provision = 0;\n    }\n\n    while (mySerial.available()) {\n        char a = mySerial.read();\n        buff[bufflen++] = a;\n        delay(2); // continue data, timeout=2ms\n    }\n\n    if (bufflen != 0) {\n        RakSNHub_Protocl_API.process((uint8_t *)buff, bufflen);\n        bufflen = 0;\n    }\n\n    return 50;\n}\n\nint32_t RAK9154Sensor::runOnce()\n{\n    if (!rak9154Sensor.isInitialized()) {\n        onewirePeriodic = new Periodic(\"onewireHandle\", onewireHandle);\n\n        mySerial.begin(9600);\n\n        RakSNHub_Protocl_API.init(onewire_evt);\n\n        status = true;\n        initialized = true;\n    }\n\n    return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n}\n\nvoid RAK9154Sensor::setup()\n{\n    // Set up oversampling and filter initialization\n}\n\nbool RAK9154Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    if (getBusVoltageMv() > 0) {\n        measurement->variant.environment_metrics.has_voltage = true;\n        measurement->variant.environment_metrics.has_current = true;\n\n        measurement->variant.environment_metrics.voltage = (float)getBusVoltageMv() / 1000;\n        measurement->variant.environment_metrics.current = (float)getCurrentMa() / 1000;\n        return true;\n    } else {\n        return false;\n    }\n}\n\nuint16_t RAK9154Sensor::getBusVoltageMv()\n{\n    return dc_vol;\n}\n\nint16_t RAK9154Sensor::getCurrentMa()\n{\n    return dc_cur;\n}\n\nint RAK9154Sensor::getBusBatteryPercent()\n{\n    return (int)dc_prec;\n}\n\nbool RAK9154Sensor::isCharging()\n{\n    return (dc_cur > 0) ? true : false;\n}\nvoid RAK9154Sensor::setLastRead(uint32_t lastRead)\n{\n    this->lastRead = lastRead;\n}\n#endif // HAS_RAKPROT\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/RAK9154Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(HAS_RAKPROT)\n\n#ifndef _RAK9154SENSOR_H\n#define _RAK9154SENSOR_H 1\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"CurrentSensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"VoltageSensor.h\"\n\nclass RAK9154Sensor : public TelemetrySensor, VoltageSensor, CurrentSensor\n{\n  private:\n  protected:\n    virtual void setup() override;\n    uint32_t lastRead = 0;\n\n  public:\n    RAK9154Sensor();\n    bool hasSensor() { return true; } // Not an I2C sensor; always available when HAS_RAKPROT is defined\n    virtual int32_t runOnce() override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual uint16_t getBusVoltageMv() override;\n    virtual int16_t getCurrentMa() override;\n    int getBusBatteryPercent();\n    bool isCharging();\n    void setLastRead(uint32_t lastRead);\n};\n#endif // _RAK9154SENSOR_H\n#endif // HAS_RAKPROT"
  },
  {
    "path": "src/modules/Telemetry/Sensor/RCWL9620Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RCWL9620Sensor.h\"\n#include \"TelemetrySensor.h\"\n\nRCWL9620Sensor::RCWL9620Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_RCWL9620, \"RCWL9620\") {}\n\nbool RCWL9620Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = 1;\n    begin(bus, dev->address.address);\n    initI2CSensor();\n    return status;\n}\n\nbool RCWL9620Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_distance = true;\n    LOG_DEBUG(\"RCWL9620 getMetrics\");\n    measurement->variant.environment_metrics.distance = getDistance();\n    return true;\n}\n\nvoid RCWL9620Sensor::begin(TwoWire *wire, uint8_t addr, uint8_t sda, uint8_t scl, uint32_t speed)\n{\n    _wire = wire;\n    _addr = addr;\n    _sda = sda;\n    _scl = scl;\n    _speed = speed;\n    _wire->begin();\n}\n\nfloat RCWL9620Sensor::getDistance()\n{\n    uint32_t data = 0;\n    uint8_t b1 = 0, b2 = 0, b3 = 0;\n\n    LOG_DEBUG(\"[RCWL9620] Start measure command\");\n\n    _wire->beginTransmission(_addr);\n    _wire->write(0x01); // À tester aussi sans cette ligne si besoin\n    uint8_t result = _wire->endTransmission();\n    LOG_DEBUG(\"[RCWL9620] endTransmission result = %d\", result);\n    delay(100); // délai pour laisser le capteur répondre\n\n    LOG_DEBUG(\"[RCWL9620] Read i2c data:\");\n    _wire->requestFrom(_addr, (uint8_t)3);\n\n    if (_wire->available() < 3) {\n        LOG_DEBUG(\"[RCWL9620] less than 3 octets !\");\n        return 0.0;\n    }\n\n    b1 = _wire->read();\n    b2 = _wire->read();\n    b3 = _wire->read();\n\n    data = ((uint32_t)b1 << 16) | ((uint32_t)b2 << 8) | b3;\n\n    float Distance = float(data) / 1000.0;\n\n    LOG_DEBUG(\"[RCWL9620] Bytes readed = %02X %02X %02X\", b1, b2, b3);\n    LOG_DEBUG(\"[RCWL9620] data=%.2f, level=%.2f\", (double)data, (double)Distance);\n\n    if (Distance > 4500.00) {\n        return 4500.00;\n    } else {\n        return Distance;\n    }\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/RCWL9620Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Wire.h>\n\nclass RCWL9620Sensor : public TelemetrySensor\n{\n  private:\n    uint8_t _addr = 0x57;\n    TwoWire *_wire = &Wire;\n    uint8_t _scl = -1;\n    uint8_t _sda = -1;\n    uint32_t _speed = 200000UL;\n\n  protected:\n    void begin(TwoWire *wire = &Wire, uint8_t addr = 0x57, uint8_t sda = -1, uint8_t scl = -1, uint32_t speed = 200000UL);\n    float getDistance();\n\n  public:\n    RCWL9620Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SCD30Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR && __has_include(<SensirionI2cScd30.h>)\n\n#include \"../detect/reClockI2C.h\"\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"SCD30Sensor.h\"\n\n#define SCD30_NO_ERROR 0\n\nSCD30Sensor::SCD30Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SCD30, \"SCD30\") {}\n\nbool SCD30Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    _bus = bus;\n    _address = dev->address.address;\n\n#ifdef SCD30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD30_I2C_CLOCK_SPEED */\n\n    scd30.begin(*_bus, _address);\n\n    if (!startMeasurement()) {\n        LOG_ERROR(\"%s: Failed to start periodic measurement\", sensorName);\n#if defined(SCD30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n    if (!getASC(ascActive)) {\n        LOG_WARN(\"%s: Could not determine ASC state\", sensorName);\n    }\n\n#if defined(SCD30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    if (state == SCD30_MEASUREMENT) {\n        status = 1;\n    } else {\n        status = 0;\n    }\n\n    initI2CSensor();\n\n    return true;\n}\n\nbool SCD30Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    float co2, temperature, humidity;\n\n#ifdef SCD30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD30_I2C_CLOCK_SPEED */\n\n    if (scd30.readMeasurementData(co2, temperature, humidity) != SCD30_NO_ERROR) {\n        LOG_ERROR(\"SCD30: Failed to read measurement data.\");\n#if defined(SCD30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n#if defined(SCD30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    if (co2 == 0) {\n        LOG_ERROR(\"SCD30: Invalid CO₂ reading.\");\n        return false;\n    }\n\n    measurement->variant.air_quality_metrics.has_co2 = true;\n    measurement->variant.air_quality_metrics.has_co2_temperature = true;\n    measurement->variant.air_quality_metrics.has_co2_humidity = true;\n    measurement->variant.air_quality_metrics.co2 = (uint32_t)co2;\n    measurement->variant.air_quality_metrics.co2_temperature = temperature;\n    measurement->variant.air_quality_metrics.co2_humidity = humidity;\n\n    LOG_DEBUG(\"Got %s readings: co2=%u, co2_temp=%.2f, co2_hum=%.2f\", sensorName, (uint32_t)co2, temperature, humidity);\n\n    return true;\n}\n\nbool SCD30Sensor::setMeasurementInterval(uint16_t measInterval)\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: setting measurement interval at %us\", sensorName, measInterval);\n    error = scd30.setMeasurementInterval(measInterval);\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to set measurement interval. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    // Restart measuring so we don't need to wait the current interval to finish\n    // (useful when you come from very long intervals)\n    scd30.stopPeriodicMeasurement();\n    scd30.startPeriodicMeasurement(0);\n\n    getMeasurementInterval(measurementInterval);\n    return true;\n}\n\nbool SCD30Sensor::getMeasurementInterval(uint16_t &measInterval)\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: getting measurement interval\", sensorName);\n    error = scd30.getMeasurementInterval(measInterval);\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to get measurement interval. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    LOG_INFO(\"%s: measurement interval is %us\", sensorName, measInterval);\n\n    return true;\n}\n\n/**\n * @brief Start measurement mode\n * @note This function should not change the clock\n */\nbool SCD30Sensor::startMeasurement()\n{\n    uint16_t error;\n\n    if (state == SCD30_MEASUREMENT) {\n        LOG_DEBUG(\"%s: Already in measurement mode\", sensorName);\n        return true;\n    }\n\n    error = scd30.startPeriodicMeasurement(0);\n\n    if (error == SCD30_NO_ERROR) {\n        LOG_INFO(\"%s: Started measurement mode\", sensorName);\n\n        state = SCD30_MEASUREMENT;\n        return true;\n    } else {\n        LOG_ERROR(\"%s: Couldn't start measurement mode\", sensorName);\n        return false;\n    }\n}\n\n/**\n * @brief Stop measurement mode\n * @note This function should not change the clock\n */\nbool SCD30Sensor::stopMeasurement()\n{\n    uint16_t error;\n\n    error = scd30.stopPeriodicMeasurement();\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to stop measurement\", sensorName);\n        return false;\n    }\n\n    state = SCD30_IDLE;\n    return true;\n}\n\nbool SCD30Sensor::performFRC(uint16_t targetCO2)\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: Issuing FRC. Ensure device has been working at least 3 minutes in stable target environment\", sensorName);\n\n    LOG_INFO(\"%s: Target CO2: %u ppm\", sensorName, targetCO2);\n    error = scd30.forceRecalibration((uint16_t)targetCO2);\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to perform forced recalibration.\", sensorName);\n        return false;\n    }\n\n    LOG_INFO(\"%s: FRC Correction successful.\", sensorName);\n\n    return true;\n}\n\nbool SCD30Sensor::setASC(bool ascEnabled)\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: %s ASC\", sensorName, ascEnabled ? \"Enabling\" : \"Disabling\");\n\n    error = scd30.activateAutoCalibration((uint16_t)ascEnabled);\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to send command.\", sensorName);\n        return false;\n    }\n\n    if (!getASC(ascActive)) {\n        LOG_ERROR(\"%s: Unable to check if ASC is enabled\", sensorName);\n        return false;\n    }\n\n    return true;\n}\n\nbool SCD30Sensor::getASC(uint16_t &_ascActive)\n{\n    uint16_t error;\n    // LOG_INFO(\"%s: Getting ASC\", sensorName);\n\n    error = scd30.getAutoCalibrationStatus(_ascActive);\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to send command.\", sensorName);\n        return false;\n    }\n\n    LOG_INFO(\"%s: ASC is %s\", sensorName, _ascActive ? \"enabled\" : \"disabled\");\n\n    return true;\n}\n\n/**\n * @brief Set the temperature reference. Unit ℃.\n *\n * The on-board RH/T sensor is influenced by thermal self-heating of SCD30\n * and other electrical components. Design-in alters the thermal properties\n * of SCD30 such that temperature and humidity offsets may occur when\n * operating the sensor in end-customer devices. Compensation of those\n * effects is achievable by writing the temperature offset found in\n * continuous operation of the device into the sensor. Temperature offset\n * value is saved in non-volatile memory. The last set value will be used\n * for temperature offset compensation after repowering.\n *\n * @param[in] tempReference\n * @note this function is certainly confusing and it's not recommended\n */\nbool SCD30Sensor::setTemperature(float tempReference)\n{\n    uint16_t error;\n    uint16_t updatedTempOffset;\n    float tempOffset;\n    uint16_t _tempOffset;\n    float co2;\n    float temperature;\n    float humidity;\n\n    if (tempReference == 100) {\n        // Requesting the value of 100 will restore the temperature offset\n        LOG_INFO(\"%s: Setting reference temperature at 0degC\", sensorName);\n        _tempOffset = 0;\n    } else {\n\n        LOG_INFO(\"%s: Setting reference temperature at: %.2f\", sensorName, tempReference);\n\n        error = scd30.readMeasurementData(co2, temperature, humidity);\n        if (error != SCD30_NO_ERROR) {\n            LOG_ERROR(\"%s: Unable to read current temperature. Error code: %u\", sensorName, error);\n            return false;\n        }\n\n        LOG_INFO(\"%s: Current sensor temperature: %.2f\", sensorName, temperature);\n\n        tempOffset = (temperature - tempReference);\n        if (tempOffset < 0) {\n            LOG_ERROR(\"%s temperature offset is only positive\", sensorName);\n            return false;\n        }\n\n        tempOffset *= 100;\n        _tempOffset = static_cast<uint16_t>(tempOffset);\n    }\n\n    LOG_INFO(\"%s: Setting temperature offset: %u (*100)\", sensorName, _tempOffset);\n\n    error = scd30.setTemperatureOffset(_tempOffset);\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to set temperature offset. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    scd30.getTemperatureOffset(updatedTempOffset);\n    LOG_INFO(\"%s: Updated sensor temperature offset: %u (*100)\", sensorName, updatedTempOffset);\n\n    return true;\n}\n\nbool SCD30Sensor::setAltitude(uint16_t altitude)\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: setting altitude at %um\", sensorName, altitude);\n\n    error = scd30.setAltitudeCompensation(altitude);\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to set altitude. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    uint16_t newAltitude;\n    getAltitude(newAltitude);\n\n    return true;\n}\n\nbool SCD30Sensor::getAltitude(uint16_t &altitude)\n{\n    uint16_t error;\n    // LOG_INFO(\"%s: Getting altitude\", sensorName);\n\n    error = scd30.getAltitudeCompensation(altitude);\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to get altitude. Error code: %u\", sensorName, error);\n        return false;\n    }\n    LOG_INFO(\"%s: Sensor altitude: %u\", sensorName, altitude);\n\n    return true;\n}\n\nbool SCD30Sensor::softReset()\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: Requesting soft reset\", sensorName);\n\n    error = scd30.softReset();\n\n    if (error != SCD30_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to do soft reset. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    LOG_INFO(\"%s: soft reset successful\", sensorName);\n\n    return true;\n}\n\n/**\n * @brief Check if sensor is in measurement mode\n */\nbool SCD30Sensor::isActive()\n{\n    return state == SCD30_MEASUREMENT;\n}\n\n/**\n * @brief Start measurement mode\n * @note Not used in admin comands, getMetrics or init, can change clock.\n */\nuint32_t SCD30Sensor::wakeUp()\n{\n\n#ifdef SCD30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return 0;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD30_I2C_CLOCK_SPEED */\n\n    startMeasurement();\n\n#if defined(SCD30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    return 0;\n}\n\n/**\n * @brief Stop measurement mode\n * @note Not used in admin comands, getMetrics or init, can change clock.\n */\nvoid SCD30Sensor::sleep()\n{\n#ifdef SCD30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD30_I2C_CLOCK_SPEED */\n\n    stopMeasurement();\n\n#if defined(SCD30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n}\n\nbool SCD30Sensor::canSleep()\n{\n    return false;\n}\n\nint32_t SCD30Sensor::wakeUpTimeMs()\n{\n    return 0;\n}\n\nint32_t SCD30Sensor::pendingForReadyMs()\n{\n    return 0;\n}\n\nAdminMessageHandleResult SCD30Sensor::handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                         meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result;\n\n#ifdef SCD30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return AdminMessageHandleResult::NOT_HANDLED;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD30_I2C_CLOCK_SPEED */\n\n    switch (request->which_payload_variant) {\n    case meshtastic_AdminMessage_sensor_config_tag:\n        // Check for ASC-FRC request first\n        if (!request->sensor_config.has_scd30_config) {\n            result = AdminMessageHandleResult::NOT_HANDLED;\n            break;\n        }\n\n        if (request->sensor_config.scd30_config.has_soft_reset) {\n            LOG_DEBUG(\"%s: Requested soft reset\", sensorName);\n            this->softReset();\n        } else {\n\n            if (request->sensor_config.scd30_config.has_set_asc) {\n                this->setASC(request->sensor_config.scd30_config.set_asc);\n                if (request->sensor_config.scd30_config.set_asc == false) {\n                    LOG_DEBUG(\"%s: Request for FRC\", sensorName);\n                    if (request->sensor_config.scd30_config.has_set_target_co2_conc) {\n                        this->performFRC(request->sensor_config.scd30_config.set_target_co2_conc);\n                    } else {\n                        // FRC requested but no target CO2 provided\n                        LOG_ERROR(\"%s: target CO2 not provided\", sensorName);\n                        result = AdminMessageHandleResult::NOT_HANDLED;\n                        break;\n                    }\n                }\n            }\n\n            // Check for temperature offset\n            // NOTE: this requires to have a sensor working on stable environment\n            // And to make it between readings\n            if (request->sensor_config.scd30_config.has_set_temperature) {\n                this->setTemperature(request->sensor_config.scd30_config.set_temperature);\n            }\n\n            // Check for altitude\n            if (request->sensor_config.scd30_config.has_set_altitude) {\n                this->setAltitude(request->sensor_config.scd30_config.set_altitude);\n            }\n\n            // Check for set measuremen interval\n            if (request->sensor_config.scd30_config.has_set_measurement_interval) {\n                this->setMeasurementInterval(request->sensor_config.scd30_config.set_measurement_interval);\n            }\n        }\n\n        result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    default:\n        result = AdminMessageHandleResult::NOT_HANDLED;\n    }\n\n#if defined(SCD30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    return result;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SCD30Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR && __has_include(<SensirionI2cScd30.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <SensirionI2cScd30.h>\n\n#define SCD30_I2C_CLOCK_SPEED 100000\n\nclass SCD30Sensor : public TelemetrySensor\n{\n  private:\n    SensirionI2cScd30 scd30;\n    TwoWire *_bus{};\n    uint8_t _address{};\n\n    bool performFRC(uint16_t targetCO2);\n    bool setASC(bool ascEnabled);\n    bool getASC(uint16_t &ascEnabled);\n    bool setTemperature(float tempReference);\n    bool getAltitude(uint16_t &altitude);\n    bool setAltitude(uint16_t altitude);\n    bool softReset(); //\n    bool setMeasurementInterval(uint16_t measInterval);\n    bool getMeasurementInterval(uint16_t &measInterval);\n    bool startMeasurement();\n    bool stopMeasurement();\n\n    // Parameters\n    uint16_t ascActive = 1;\n    uint16_t measurementInterval = 2;\n\n  public:\n    SCD30Sensor();\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n\n    enum SCD30State { SCD30_OFF, SCD30_IDLE, SCD30_MEASUREMENT };\n    SCD30State state = SCD30_OFF;\n\n    virtual bool isActive() override;\n\n    virtual void sleep() override;      // Stops measurement (measurement -> idle)\n    virtual uint32_t wakeUp() override; // Starts measurement (idle -> measurement)\n    virtual bool canSleep() override;\n    virtual int32_t wakeUpTimeMs() override;\n    virtual int32_t pendingForReadyMs() override;\n    AdminMessageHandleResult handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                meshtastic_AdminMessage *response) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SCD4XSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR && __has_include(<SensirionI2cScd4x.h>)\n\n#include \"../detect/reClockI2C.h\"\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"SCD4XSensor.h\"\n\n#define SCD4X_NO_ERROR 0\n\nSCD4XSensor::SCD4XSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SCD4X, \"SCD4X\") {}\n\nbool SCD4XSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    _bus = bus;\n    _address = dev->address.address;\n\n#ifdef SCD4X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD4X_I2C_CLOCK_SPEED */\n\n    scd4x.begin(*_bus, _address);\n\n    // From SCD4X library\n    delay(30);\n\n    // Stop periodic measurement\n    if (!stopMeasurement()) {\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n    // Get sensor variant\n    scd4x.getSensorVariant(sensorVariant);\n\n    if (sensorVariant == SCD4X_SENSOR_VARIANT_SCD41) {\n        LOG_INFO(\"%s: Found SCD41\", sensorName);\n        if (!powerUp()) {\n            LOG_ERROR(\"%s: Error trying to execute powerUp()\", sensorName);\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n            reClockI2C(currentClock, _bus, false);\n#endif\n            return false;\n        }\n    }\n\n    if (!getASC(ascActive)) {\n        LOG_ERROR(\"%s: Unable to check if ASC is enabled\", sensorName);\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n    // Start measurement in selected power mode (low power by default)\n    if (!startMeasurement()) {\n        LOG_ERROR(\"%s: Couldn't start measurement\", sensorName);\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    if (state == SCD4X_MEASUREMENT) {\n        status = 1;\n    } else {\n        status = 0;\n    }\n\n    initI2CSensor();\n\n    return true;\n}\n\nbool SCD4XSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n\n    if (state != SCD4X_MEASUREMENT) {\n        LOG_ERROR(\"%s: Not in measurement mode\", sensorName);\n        return false;\n    }\n\n    uint16_t co2, error;\n    float temperature, humidity;\n\n#ifdef SCD4X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD4X_I2C_CLOCK_SPEED */\n\n    bool dataReady;\n    error = scd4x.getDataReadyStatus(dataReady);\n    if (error != SCD4X_NO_ERROR || !dataReady) {\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        LOG_ERROR(\"SCD4X: Data is not ready\");\n        return false;\n    }\n\n    error = scd4x.readMeasurement(co2, temperature, humidity);\n\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    LOG_DEBUG(\"Got %s readings: co2=%u, co2_temp=%.2f, co2_hum%.2f\", sensorName, co2, temperature, humidity);\n    if (error != SCD4X_NO_ERROR) {\n        LOG_DEBUG(\"%s: Error while getting measurements: %u\", sensorName, error);\n        if (co2 == 0) {\n            LOG_ERROR(\"%s: Skipping invalid measurement.\", sensorName);\n        }\n        return false;\n    } else {\n        measurement->variant.air_quality_metrics.has_co2_temperature = true;\n        measurement->variant.air_quality_metrics.has_co2_humidity = true;\n        measurement->variant.air_quality_metrics.has_co2 = true;\n        measurement->variant.air_quality_metrics.co2_temperature = temperature;\n        measurement->variant.air_quality_metrics.co2_humidity = humidity;\n        measurement->variant.air_quality_metrics.co2 = co2;\n        return true;\n    }\n}\n\n/**\n * @brief Perform a forced recalibration (FRC) of the CO₂ concentration.\n *\n * From Sensirion SCD4X I2C Library\n *\n * 1. Operate the SCD4x in the operation mode later used for normal sensor\n * operation (e.g. periodic measurement) for at least 3 minutes in an\n * environment with a homogenous and constant CO2 concentration. The sensor\n * must be operated at the voltage desired for the application when\n * performing the FRC sequence. 2. Issue the stop_periodic_measurement\n * command. 3. Issue the perform_forced_recalibration command.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::performFRC(uint32_t targetCO2)\n{\n    uint16_t error, frcCorr;\n\n    LOG_INFO(\"%s: Issuing FRC. Ensure device has been working at least 3 minutes in stable target environment\", sensorName);\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n\n    LOG_INFO(\"%s: Target CO2: %u ppm\", sensorName, targetCO2);\n    error = scd4x.performForcedRecalibration((uint16_t)targetCO2, frcCorr);\n\n    // SCD4X Sensirion datasheet\n    delay(400);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to perform forced recalibration.\", sensorName);\n        return false;\n    }\n\n    if (frcCorr == 0xFFFF) {\n        LOG_ERROR(\"%s: Error while performing forced recalibration.\", sensorName);\n        return false;\n    }\n\n    LOG_INFO(\"%s: FRC Correction successful. Correction output: %u\", sensorName, (uint16_t)(frcCorr - 0x8000));\n\n    return true;\n}\n\n/**\n * @brief Start measurement mode\n * @note This function should not change the clock\n */\nbool SCD4XSensor::startMeasurement()\n{\n    uint16_t error;\n\n    if (state == SCD4X_MEASUREMENT) {\n        LOG_DEBUG(\"%s: Already in measurement mode\", sensorName);\n        return true;\n    }\n\n    if (lowPower) {\n        error = scd4x.startLowPowerPeriodicMeasurement();\n    } else {\n        error = scd4x.startPeriodicMeasurement();\n    }\n\n    if (error == SCD4X_NO_ERROR) {\n        LOG_INFO(\"%s: Started measurement mode\", sensorName);\n        if (lowPower) {\n            LOG_INFO(\"%s: Low power mode\", sensorName);\n        } else {\n            LOG_INFO(\"%s: Normal power mode\", sensorName);\n        }\n\n        state = SCD4X_MEASUREMENT;\n        return true;\n    } else {\n        LOG_ERROR(\"%s: Unable to start measurement mode\", sensorName);\n        return false;\n    }\n}\n\n/**\n * @brief Stop measurement mode\n * @note This function should not change the clock\n */\nbool SCD4XSensor::stopMeasurement()\n{\n    uint16_t error;\n\n    error = scd4x.stopPeriodicMeasurement();\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to stop measurement.\", sensorName);\n        return false;\n    }\n\n    state = SCD4X_IDLE;\n    co2MeasureStarted = 0;\n    return true;\n}\n\n/**\n * @brief Set power mode\n * Pass true to set low power mode\n * @note This function should not change the clock\n */\nbool SCD4XSensor::setPowerMode(bool _lowPower)\n{\n    lowPower = _lowPower;\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n\n    if (lowPower) {\n        LOG_DEBUG(\"%s: Set low power mode\", sensorName);\n    } else {\n        LOG_DEBUG(\"%s: Set normal power mode\", sensorName);\n    }\n\n    return true;\n}\n\n/**\n * @brief Check the current mode (ASC or FRC)\n * From Sensirion SCD4X I2C Library\n * @note This function should not change the clock\n */\nbool SCD4XSensor::getASC(uint16_t &_ascActive)\n{\n    uint16_t error;\n    LOG_INFO(\"%s: Getting ASC\", sensorName);\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n    error = scd4x.getAutomaticSelfCalibrationEnabled(_ascActive);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to send command.\", sensorName);\n        return false;\n    }\n\n    LOG_INFO(\"%s ASC is %s\", sensorName, _ascActive ? \"enabled\" : \"disabled\");\n\n    return true;\n}\n\n/**\n * @brief Enable or disable automatic self calibration (ASC).\n *\n * From Sensirion SCD4X I2C Library\n *\n * Sets the current state (enabled / disabled) of the ASC. By default, ASC\n * is enabled.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::setASC(bool ascEnabled)\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s %s ASC\", sensorName, ascEnabled ? \"Enabling\" : \"Disabling\");\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n\n    error = scd4x.setAutomaticSelfCalibrationEnabled((uint16_t)ascEnabled);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to send command.\", sensorName);\n        return false;\n    }\n\n    error = scd4x.persistSettings();\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to make settings persistent.\", sensorName);\n        return false;\n    }\n\n    if (!getASC(ascActive)) {\n        LOG_ERROR(\"%s: Unable to check if ASC is enabled\", sensorName);\n        return false;\n    }\n\n    return true;\n}\n\n/**\n * @brief Set the value of ASC baseline target in ppm.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * Sets the value of the ASC baseline target, i.e. the CO₂ concentration in\n * ppm which the ASC algorithm will assume as lower-bound background to\n * which the SCD4x is exposed to regularly within one ASC period of\n * operation. To save the setting to the EEPROM, the persist_settings\n * command must be issued subsequently. The factory default value is 400\n * ppm.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::setASCBaseline(uint32_t targetCO2)\n{\n    // Available in library, but not described in datasheet.\n    uint16_t error;\n    LOG_INFO(\"%s: Setting ASC baseline to: %u\", sensorName, targetCO2);\n\n    getASC(ascActive);\n    if (!ascActive) {\n        LOG_ERROR(\"%s: Can't set ASC baseline. ASC is not active\", sensorName);\n        return false;\n    }\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n\n    error = scd4x.setAutomaticSelfCalibrationTarget((uint16_t)targetCO2);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to send command.\", sensorName);\n        return false;\n    }\n\n    error = scd4x.persistSettings();\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to make settings persistent.\", sensorName);\n        return false;\n    }\n\n    LOG_INFO(\"%s: Setting ASC baseline successful\", sensorName);\n\n    return true;\n}\n\n/**\n * @brief Set the temperature compensation reference.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * Setting the temperature offset of the SCD4x inside the customer device\n * allows the user to optimize the RH and T output signal.\n * By default, the temperature offset is set to 4 °C. To save\n * the setting to the EEPROM, the persist_settings command may be issued.\n * Equation (1) details how the characteristic temperature offset can be\n * calculated using the current temperature output of the sensor (TSCD4x), a\n * reference temperature value (TReference), and the previous temperature\n * offset (Toffset_pervious) obtained using the get_temperature_offset_raw\n * command:\n *\n * Toffset_actual = TSCD4x - TReference + Toffset_pervious.\n *\n * Recommended temperature offset values are between 0 °C and 20 °C. The\n * temperature offset does not impact the accuracy of the CO2 output.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::setTemperature(float tempReference)\n{\n    uint16_t error;\n    float prevTempOffset;\n    float updatedTempOffset;\n    float tempOffset;\n    bool dataReady;\n    uint16_t co2;\n    float temperature;\n    float humidity;\n\n    LOG_INFO(\"%s: Setting reference temperature at: %.2f\", sensorName, tempReference);\n\n    error = scd4x.getDataReadyStatus(dataReady);\n    if (error != SCD4X_NO_ERROR || !dataReady) {\n        LOG_ERROR(\"%s: Data is not ready\", sensorName);\n        return false;\n    }\n\n    error = scd4x.readMeasurement(co2, temperature, humidity);\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to read current temperature. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    LOG_INFO(\"%s: Current sensor temperature: %.2f\", sensorName, temperature);\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n\n    error = scd4x.getTemperatureOffset(prevTempOffset);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to get temperature offset. Error code: %u\", sensorName, error);\n        return false;\n    }\n    LOG_INFO(\"%s: Current sensor temperature offset: %.2f\", sensorName, prevTempOffset);\n\n    tempOffset = temperature - tempReference + prevTempOffset;\n\n    LOG_INFO(\"%s: Setting temperature offset: %.2f\", sensorName, tempOffset);\n    error = scd4x.setTemperatureOffset(tempOffset);\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to set temperature offset. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    error = scd4x.persistSettings();\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to make settings persistent. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    scd4x.getTemperatureOffset(updatedTempOffset);\n    LOG_INFO(\"%s: Updated sensor temperature offset: %.2f\", sensorName, updatedTempOffset);\n\n    return true;\n}\n\n/**\n * @brief Get the sensor altitude.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * Altitude in meters above sea level can be set after device installation.\n * Valid value between 0 and 3000m. This overrides pressure offset.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::getAltitude(uint16_t &altitude)\n{\n    uint16_t error;\n    LOG_INFO(\"%s: Requesting sensor altitude\", sensorName);\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n\n    error = scd4x.getSensorAltitude(altitude);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to get altitude. Error code: %u\", sensorName, error);\n        return false;\n    }\n    LOG_INFO(\"%s: Sensor altitude: %u\", sensorName, altitude);\n\n    return true;\n}\n\n/**\n * @brief Get the ambient pressure around the sensor.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * Gets the ambient pressure in Pa.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::getAmbientPressure(uint32_t &ambientPressure)\n{\n    uint16_t error;\n    LOG_INFO(\"%s: Requesting sensor ambient pressure\", sensorName);\n\n    error = scd4x.getAmbientPressure(ambientPressure);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to get altitude. Error code: %u\", sensorName, error);\n        return false;\n    }\n    LOG_INFO(\"%s: Sensor ambient pressure: %u\", sensorName, ambientPressure);\n\n    return true;\n}\n\n/**\n * @brief Set the sensor altitude.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * Altitude in meters above sea level can be set after device installation.\n * Valid value between 0 and 3000m. This overrides pressure offset.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::setAltitude(uint32_t altitude)\n{\n    uint16_t error;\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n    LOG_INFO(\"%s: setting altitude at %um\", sensorName, altitude);\n\n    error = scd4x.setSensorAltitude(altitude);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to set altitude. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    // NOTE: this gives an error if issued. Sensirion's library\n    // doesn't indicate it's needed.\n    // error = scd4x.persistSettings();\n    // if (error != SCD4X_NO_ERROR) {\n    //     LOG_ERROR(\"%s: Unable to make settings persistent. Error code: %u\", sensorName, error);\n    //     return false;\n    // }\n\n    LOG_INFO(\"%s: altitude set\", sensorName);\n\n    return true;\n}\n\n/**\n * @brief Set the ambient pressure around the sensor.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * The set_ambient_pressure command can be sent during periodic measurements\n * to enable continuous pressure compensation. Note that setting an ambient\n * pressure overrides any pressure compensation based on a previously set\n * sensor altitude. Use of this command is highly recommended for\n * applications experiencing significant ambient pressure changes to ensure\n * sensor accuracy. Valid input values are between 70000 - 120000 Pa. The\n * default value is 101300 Pa.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::setAmbientPressure(uint32_t ambientPressure)\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: setting ambient pressure at %u Pa\", sensorName, ambientPressure);\n\n    error = scd4x.setAmbientPressure(ambientPressure);\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to set altitude. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    // Sensirion doesn't indicate if this is necessary. We send it anyway\n    error = scd4x.persistSettings();\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to make settings persistent. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    LOG_INFO(\"%s: ambient pressure set set\", sensorName);\n\n    return true;\n}\n\n/**\n * @brief Perform factory reset to erase the settings stored in the EEPROM.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * The perform_factory_reset command resets all configuration settings\n * stored in the EEPROM and erases the FRC and ASC algorithm history.\n * @note This function should not change the clock\n */\nbool SCD4XSensor::factoryReset()\n{\n    uint16_t error;\n\n    LOG_INFO(\"%s: Requesting factory reset\", sensorName);\n\n    if (!stopMeasurement()) {\n        return false;\n    }\n\n    error = scd4x.performFactoryReset();\n\n    if (error != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Unable to do factory reset. Error code: %u\", sensorName, error);\n        return false;\n    }\n\n    LOG_INFO(\"%s: Factory reset successful\", sensorName);\n\n    return true;\n}\n\n/**\n * @brief Put the sensor into sleep mode from idle mode.\n *\n * From Sensirion SCD4X I2C Library.\n *\n * Put the sensor from idle to sleep to reduce power consumption. Can be\n * used to power down when operating the sensor in power-cycled single shot\n * mode.\n * @note This command is only available in idle mode. Only for SCD41.\n */\nbool SCD4XSensor::powerDown()\n{\n    LOG_INFO(\"%s: Trying to send sensor to sleep\", sensorName);\n\n    if (sensorVariant != SCD4X_SENSOR_VARIANT_SCD41) {\n        LOG_WARN(\"SCD4X: Can't send sensor to sleep. Incorrect variant. Ignoring\");\n        return true;\n    }\n\n#ifdef SCD4X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD4X_I2C_CLOCK_SPEED */\n\n    if (!stopMeasurement()) {\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n    if (scd4x.powerDown() != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Error trying to execute sleep()\", sensorName);\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    state = SCD4X_OFF;\n    return true;\n}\n\n/**\n * @brief Wake up sensor from sleep mode to idle mode (powerUp)\n *\n * From Sensirion SCD4X I2C Library.\n *\n * Wake up the sensor from sleep mode into idle mode. Note that the SCD4x\n * does not acknowledge the wake_up command. The sensor's idle state after\n * wake up can be verified by reading out the serial number.\n * @note This command is only available for SCD41.\n * @note This function can't change clock (used in init)\n */\nbool SCD4XSensor::powerUp()\n{\n    LOG_INFO(\"%s: Waking up\", sensorName);\n\n    if (scd4x.wakeUp() != SCD4X_NO_ERROR) {\n        LOG_ERROR(\"%s: Error trying to execute wakeUp()\", sensorName);\n        return false;\n    }\n\n    state = SCD4X_IDLE;\n\n    return true;\n}\n\n/**\n * @brief Check if sensor is in measurement mode\n */\nbool SCD4XSensor::isActive()\n{\n    return state == SCD4X_MEASUREMENT;\n}\n\n/**\n * @brief Start measurement mode\n * @note Not used in admin comands, getMetrics or init, can change clock.\n */\nuint32_t SCD4XSensor::wakeUp()\n{\n\n#ifdef SCD4X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return 0;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD4X_I2C_CLOCK_SPEED */\n\n    if (startMeasurement()) {\n        co2MeasureStarted = getTime();\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return SCD4X_WARMUP_MS;\n    }\n\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    return 0;\n}\n\n/**\n * @brief Stop measurement mode\n * @note Not used in admin comands, getMetrics or init, can change clock.\n */\nvoid SCD4XSensor::sleep()\n{\n#ifdef SCD4X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD4X_I2C_CLOCK_SPEED */\n\n    stopMeasurement();\n\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n}\n\n/**\n * @brief Can sleep function\n *\n * Power consumption is very low on lowPower mode, modify this function if\n * you still want to override this behaviour. Otherwise, sleep is disabled\n * routinely in low power mode\n */\nbool SCD4XSensor::canSleep()\n{\n    return lowPower ? false : true;\n}\n\nint32_t SCD4XSensor::wakeUpTimeMs()\n{\n    return SCD4X_WARMUP_MS;\n}\n\nint32_t SCD4XSensor::pendingForReadyMs()\n{\n    uint32_t now;\n    now = getTime();\n    uint32_t sinceCO2MeasureStarted = (now - co2MeasureStarted) * 1000;\n    LOG_DEBUG(\"%s: Since measure started: %ums\", sensorName, sinceCO2MeasureStarted);\n\n    if (sinceCO2MeasureStarted < SCD4X_WARMUP_MS) {\n        LOG_INFO(\"%s: not enough time passed since starting measurement\", sensorName);\n        return SCD4X_WARMUP_MS - sinceCO2MeasureStarted;\n    }\n    return 0;\n}\n\nAdminMessageHandleResult SCD4XSensor::handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                         meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result;\n\n#ifdef SCD4X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SCD4X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return AdminMessageHandleResult::NOT_HANDLED;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SCD4X_I2C_CLOCK_SPEED */\n\n    // TODO: potentially add selftest command?\n    switch (request->which_payload_variant) {\n    case meshtastic_AdminMessage_sensor_config_tag:\n        // Check for ASC-FRC request first\n        if (!request->sensor_config.has_scd4x_config) {\n            result = AdminMessageHandleResult::NOT_HANDLED;\n            break;\n        }\n\n        if (request->sensor_config.scd4x_config.has_factory_reset) {\n            LOG_DEBUG(\"%s: Requested factory reset\", sensorName);\n            if (!this->factoryReset()) {\n                result = AdminMessageHandleResult::NOT_HANDLED;\n                break;\n            }\n        } else {\n            if (request->sensor_config.scd4x_config.has_set_asc) {\n                getASC(ascActive);\n                bool currentASC = ascActive;\n                if (request->sensor_config.scd4x_config.set_asc == false) {\n                    LOG_DEBUG(\"%s: Request for FRC\", sensorName);\n                    if (request->sensor_config.scd4x_config.has_set_target_co2_conc) {\n                        if (this->setASC(request->sensor_config.scd4x_config.set_asc)) {\n                            if (!this->performFRC(request->sensor_config.scd4x_config.set_target_co2_conc)) {\n                                result = AdminMessageHandleResult::NOT_HANDLED;\n                                // Set it back to ASC if failed\n                                setASC(currentASC);\n                                break;\n                            };\n                        } else {\n                            result = AdminMessageHandleResult::NOT_HANDLED;\n                            break;\n                        }\n                    } else {\n                        // FRC requested but no target CO2 provided\n                        LOG_ERROR(\"%s: target CO2 not provided\", sensorName);\n                        result = AdminMessageHandleResult::NOT_HANDLED;\n                        break;\n                    }\n                } else {\n                    LOG_DEBUG(\"%s: Request for ASC\", sensorName);\n                    if (this->setASC(request->sensor_config.scd4x_config.set_asc)) {\n                        if (request->sensor_config.scd4x_config.has_set_target_co2_conc) {\n                            LOG_DEBUG(\"%s: Request has target CO2\", sensorName);\n                            this->setASCBaseline(request->sensor_config.scd4x_config.set_target_co2_conc);\n                            // NOTE - in this situation, if we set ASC, but baseline set fails, we stay on ASC\n                        } else {\n                            LOG_DEBUG(\"%s: Request doesn't have target CO2\", sensorName);\n                        }\n                    } else {\n                        result = AdminMessageHandleResult::NOT_HANDLED;\n                        break;\n                    }\n                }\n            }\n\n            // Check for temperature offset\n            // NOTE: this requires to have a sensor working on stable environment\n            // And to make it between readings\n            if (request->sensor_config.scd4x_config.has_set_temperature) {\n                if (!this->setTemperature(request->sensor_config.scd4x_config.set_temperature)) {\n                    result = AdminMessageHandleResult::NOT_HANDLED;\n                    break;\n                }\n            }\n\n            // Check for altitude or pressure offset\n            if (request->sensor_config.scd4x_config.has_set_altitude) {\n                if (!this->setAltitude(request->sensor_config.scd4x_config.set_altitude)) {\n                    result = AdminMessageHandleResult::NOT_HANDLED;\n                    break;\n                }\n            } else if (request->sensor_config.scd4x_config.has_set_ambient_pressure) {\n                if (!this->setAmbientPressure(request->sensor_config.scd4x_config.set_ambient_pressure)) {\n                    result = AdminMessageHandleResult::NOT_HANDLED;\n                    break;\n                }\n            }\n\n            // Check for low power mode\n            // NOTE: to switch from one mode to another do:\n            // setPowerMode -> startMeasurement\n            if (request->sensor_config.scd4x_config.has_set_power_mode) {\n                if (!this->setPowerMode(request->sensor_config.scd4x_config.set_power_mode)) {\n                    result = AdminMessageHandleResult::NOT_HANDLED;\n                    break;\n                }\n            }\n        }\n\n        result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    default:\n        result = AdminMessageHandleResult::NOT_HANDLED;\n    }\n\n    // Start measurement mode\n    this->startMeasurement();\n\n#if defined(SCD4X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    return result;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SCD4XSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR && __has_include(<SensirionI2cScd4x.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RTC.h\"\n#include \"TelemetrySensor.h\"\n#include <SensirionI2cScd4x.h>\n\n// Max speed 400kHz\n#define SCD4X_I2C_CLOCK_SPEED 100000\n#define SCD4X_WARMUP_MS 5000\n\nclass SCD4XSensor : public TelemetrySensor\n{\n  private:\n    SensirionI2cScd4x scd4x;\n    TwoWire *_bus{};\n    uint8_t _address{};\n\n    bool performFRC(uint32_t targetCO2);\n    bool setASCBaseline(uint32_t targetCO2);\n    bool getASC(uint16_t &ascEnabled);\n    bool setASC(bool ascEnabled);\n    bool setTemperature(float tempReference);\n    bool getAltitude(uint16_t &altitude);\n    bool setAltitude(uint32_t altitude);\n    bool getAmbientPressure(uint32_t &ambientPressure);\n    bool setAmbientPressure(uint32_t ambientPressure);\n    bool factoryReset();\n    bool setPowerMode(bool _lowPower);\n    bool startMeasurement();\n    bool stopMeasurement();\n\n    uint16_t ascActive = 1;\n    // low power measurement mode (on sensirion side). Disables sleep mode\n    // Improvement and testing needed for timings\n    bool lowPower = true;\n    uint32_t co2MeasureStarted = 0;\n\n  public:\n    SCD4XSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n\n    enum SCD4XState { SCD4X_OFF, SCD4X_IDLE, SCD4X_MEASUREMENT };\n    SCD4XState state = SCD4X_OFF;\n    SCD4xSensorVariant sensorVariant{};\n\n    virtual bool isActive() override;\n\n    virtual void sleep() override;      // Stops measurement (measurement -> idle)\n    virtual uint32_t wakeUp() override; // Starts measurement (idle -> measurement)\n    bool powerDown();                   // Powers down sensor (idle -> power-off)\n    bool powerUp();                     // Powers the sensor (power-off -> idle)\n    virtual bool canSleep() override;\n    virtual int32_t wakeUpTimeMs() override;\n    virtual int32_t pendingForReadyMs() override;\n    AdminMessageHandleResult handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                meshtastic_AdminMessage *response) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SEN5XSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#include \"../detect/reClockI2C.h\"\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"FSCommon.h\"\n#include \"SEN5XSensor.h\"\n#include \"SPILock.h\"\n#include \"SafeFile.h\"\n#include \"TelemetrySensor.h\"\n#include <float.h> // FLT_MAX\n#include <pb_decode.h>\n#include <pb_encode.h>\n\nSEN5XSensor::SEN5XSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SEN5X, \"SEN5X\") {}\n\nbool SEN5XSensor::getVersion()\n{\n    if (!sendCommand(SEN5X_GET_FIRMWARE_VERSION)) {\n        LOG_ERROR(\"SEN5X: Error sending version command\");\n        return false;\n    }\n    delay(20); // From Sensirion Datasheet\n\n    uint8_t versionBuffer[12]{};\n    size_t charNumber = readBuffer(&versionBuffer[0], 3);\n    if (charNumber == 0) {\n        LOG_ERROR(\"SEN5X: Error getting data ready flag value\");\n        return false;\n    }\n\n    firmwareVer = versionBuffer[0] + (versionBuffer[1] / 10);\n    hardwareVer = versionBuffer[3] + (versionBuffer[4] / 10);\n    protocolVer = versionBuffer[5] + (versionBuffer[6] / 10);\n\n    LOG_INFO(\"SEN5X Firmware Version: %0.2f\", firmwareVer);\n    LOG_INFO(\"SEN5X Hardware Version: %0.2f\", hardwareVer);\n    LOG_INFO(\"SEN5X Protocol Version: %0.2f\", protocolVer);\n\n    return true;\n}\n\nbool SEN5XSensor::findModel()\n{\n    if (!sendCommand(SEN5X_GET_PRODUCT_NAME)) {\n        LOG_ERROR(\"SEN5X: Error asking for product name\");\n        return false;\n    }\n    delay(50); // From Sensirion Datasheet\n\n    const uint8_t nameSize = 48;\n    uint8_t name[nameSize];\n    size_t charNumber = readBuffer(&name[0], nameSize);\n    if (charNumber == 0) {\n        LOG_ERROR(\"SEN5X: Error getting device name\");\n        return false;\n    }\n\n    // We only check the last character that defines the model SEN5X\n    switch (name[4]) {\n    case 48:\n        model = SEN50;\n        LOG_INFO(\"SEN5X: found sensor model SEN50\");\n        break;\n    case 52:\n        model = SEN54;\n        LOG_INFO(\"SEN5X: found sensor model SEN54\");\n        break;\n    case 53:\n        model = SEN55;\n        LOG_INFO(\"SEN5X: found sensor model SEN55\");\n        break;\n    }\n\n    return true;\n}\n\nbool SEN5XSensor::sendCommand(uint16_t command)\n{\n    uint8_t nothing;\n    return sendCommand(command, &nothing, 0);\n}\n\nbool SEN5XSensor::sendCommand(uint16_t command, uint8_t *buffer, uint8_t byteNumber)\n{\n    // At least we need two bytes for the command\n    uint8_t bufferSize = 2;\n\n    // Add space for CRC bytes (one every two bytes)\n    if (byteNumber > 0)\n        bufferSize += byteNumber + (byteNumber / 2);\n\n    uint8_t toSend[bufferSize];\n    uint8_t i = 0;\n    toSend[i++] = static_cast<uint8_t>((command & 0xFF00) >> 8);\n    toSend[i++] = static_cast<uint8_t>((command & 0x00FF) >> 0);\n\n    // Prepare buffer with CRC every third byte\n    uint8_t bi = 0;\n    if (byteNumber > 0) {\n        while (bi < byteNumber) {\n            toSend[i++] = buffer[bi++];\n            toSend[i++] = buffer[bi++];\n            uint8_t calcCRC = sen5xCRC(&buffer[bi - 2]);\n            toSend[i++] = calcCRC;\n        }\n    }\n\n#ifdef SEN5X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SEN5X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SEN5X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SEN5X_I2C_CLOCK_SPEED */\n\n    // Transmit the data\n    // LOG_DEBUG(\"Beginning connection to SEN5X: 0x%x. Size: %u\", address, bufferSize);\n    // Note: this delay is necessary to allow for long-buffers\n    delay(20);\n    _bus->beginTransmission(_address);\n    size_t writtenBytes = _bus->write(toSend, bufferSize);\n    uint8_t i2c_error = _bus->endTransmission();\n\n#if defined(SEN5X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    if (writtenBytes != bufferSize) {\n        LOG_ERROR(\"SEN5X: Error writting on I2C bus\");\n        return false;\n    }\n\n    if (i2c_error != 0) {\n        LOG_ERROR(\"SEN5X: Error on I2C communication: %x\", i2c_error);\n        return false;\n    }\n    return true;\n}\n\nuint8_t SEN5XSensor::readBuffer(uint8_t *buffer, uint8_t byteNumber)\n{\n#ifdef SEN5X_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SEN5X_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SEN5X_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SEN5X_I2C_CLOCK_SPEED */\n\n    size_t readBytes = _bus->requestFrom(_address, byteNumber);\n    if (readBytes != byteNumber) {\n        LOG_ERROR(\"SEN5X: Error reading I2C bus\");\n        return 0;\n    }\n\n    uint8_t i = 0;\n    uint8_t receivedBytes = 0;\n    while (readBytes > 0) {\n        buffer[i++] = _bus->read(); // Just as a reminder: i++ returns i and after that increments.\n        buffer[i++] = _bus->read();\n        uint8_t recvCRC = _bus->read();\n        uint8_t calcCRC = sen5xCRC(&buffer[i - 2]);\n        if (recvCRC != calcCRC) {\n            LOG_ERROR(\"SEN5X: Checksum error while receiving msg\");\n            return 0;\n        }\n        readBytes -= 3;\n        receivedBytes += 2;\n    }\n#if defined(SEN5X_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    return receivedBytes;\n}\n\nuint8_t SEN5XSensor::sen5xCRC(const uint8_t *buffer)\n{\n    // This code is based on Sensirion's own implementation\n    // https://github.com/Sensirion/arduino-core/blob/41fd02cacf307ec4945955c58ae495e56809b96c/src/SensirionCrc.cpp\n    uint8_t crc = 0xff;\n\n    for (uint8_t i = 0; i < 2; i++) {\n\n        crc ^= buffer[i];\n\n        for (uint8_t bit = 8; bit > 0; bit--) {\n            if (crc & 0x80)\n                crc = (crc << 1) ^ 0x31;\n            else\n                crc = (crc << 1);\n        }\n    }\n\n    return crc;\n}\n\nvoid SEN5XSensor::sleep()\n{\n    idle(true);\n}\n\nbool SEN5XSensor::idle(bool checkState)\n{\n    // From the datasheet:\n    // By default, the VOC algorithm resets its state to initial\n    // values each time a measurement is started,\n    // even if the measurement was stopped only for a short\n    // time. So, the VOC index output value needs a long time\n    // until it is stable again. This can be avoided by\n    // restoring the previously memorized algorithm state before\n    // starting the measure mode\n\n    if (checkState) {\n        // If the stabilisation period is not passed for SEN54 or SEN55, don't go to idle\n        if (model != SEN50) {\n            // Get VOC state before going to idle mode\n            vocValid = false;\n            if (vocStateFromSensor()) {\n                vocValid = vocStateValid();\n                // Check if we have time, and store it\n                uint32_t now; // If time is RTCQualityNone, it will return zero\n                now = getValidTime(RTCQuality::RTCQualityDevice);\n                // Check if state is valid (non-zero)\n                if (now) {\n                    vocTime = now;\n                }\n            }\n\n            if (!(vocStateStable() && vocValid)) {\n                LOG_INFO(\"%s: Not stopping measurement, vocState is not stable yet!\", sensorName);\n                return true;\n            }\n        }\n        // Save state and prefs (on all models)\n        saveState();\n    }\n\n    if (!oneShotMode) {\n        LOG_INFO(\"%s: Not stopping measurement, continuous mode!\", sensorName);\n        return true;\n    } else {\n        LOG_INFO(\"%s: One shot mode enabled\", sensorName);\n    }\n\n    // Switch to low-power based on the model\n    if (model == SEN50) {\n        if (!sendCommand(SEN5X_STOP_MEASUREMENT)) {\n            LOG_ERROR(\"%s: Error stopping measurement\", sensorName);\n            return false;\n        }\n        state = SEN5X_IDLE;\n        LOG_INFO(\"%s: Stop measurement mode\", sensorName);\n    } else {\n        if (!sendCommand(SEN5X_START_MEASUREMENT_RHT_GAS)) {\n            LOG_ERROR(\"%s: Error switching to RHT/Gas measurement\", sensorName);\n            return false;\n        }\n        state = SEN5X_RHTGAS_ONLY;\n        LOG_INFO(\"%s: Switch to RHT/Gas only measurement mode\", sensorName);\n    }\n\n    delay(200); // From Sensirion Datasheet\n    pmMeasureStarted = 0;\n    return true;\n}\n\nbool SEN5XSensor::vocStateRecent(uint32_t now)\n{\n    if (now) {\n        uint32_t passed = now - vocTime; // in seconds\n\n        // Check if state is recent, less than 10 minutes (600 seconds)\n        if (passed < SEN5X_VOC_VALID_TIME && (now > SEN5X_VOC_VALID_DATE)) {\n            return true;\n        }\n    }\n    return false;\n}\n\nbool SEN5XSensor::vocStateValid()\n{\n    if (!vocState[0] && !vocState[1] && !vocState[2] && !vocState[3] && !vocState[4] && !vocState[5] && !vocState[6] &&\n        !vocState[7]) {\n        LOG_DEBUG(\"%s: VOC state is all 0, invalid\", sensorName);\n        return false;\n    } else {\n        LOG_DEBUG(\"%s: VOC state is valid\", sensorName);\n        return true;\n    }\n}\n\nbool SEN5XSensor::vocStateToSensor()\n{\n    if (model == SEN50) {\n        return true;\n    }\n\n    if (!vocStateValid()) {\n        LOG_INFO(\"SEN5X: VOC state is invalid, not sending\");\n        return true;\n    }\n\n    if (!sendCommand(SEN5X_STOP_MEASUREMENT)) {\n        LOG_ERROR(\"SEN5X: Error stoping measurement\");\n        return false;\n    }\n    delay(200); // From Sensirion Datasheet\n\n    LOG_DEBUG(\"SEN5X: Sending VOC state to sensor\");\n    LOG_DEBUG(\"[%u, %u, %u, %u, %u, %u, %u, %u]\", vocState[0], vocState[1], vocState[2], vocState[3], vocState[4], vocState[5],\n              vocState[6], vocState[7]);\n\n    // Note: send command already takes into account the CRC\n    // buffer size increment needed\n    if (!sendCommand(SEN5X_RW_VOCS_STATE, vocState, SEN5X_VOC_STATE_BUFFER_SIZE)) {\n        LOG_ERROR(\"SEN5X: Error sending VOC's state command'\");\n        return false;\n    }\n\n    return true;\n}\n\nbool SEN5XSensor::vocStateFromSensor()\n{\n    if (model == SEN50) {\n        return true;\n    }\n\n    LOG_INFO(\"SEN5X: Getting VOC state from sensor\");\n    //  Ask VOCs state from the sensor\n    if (!sendCommand(SEN5X_RW_VOCS_STATE)) {\n        LOG_ERROR(\"SEN5X: Error sending VOC's state command'\");\n        return false;\n    }\n\n    delay(20); // From Sensirion Datasheet\n\n    // Retrieve the data\n    // Allocate buffer to account for CRC\n    size_t receivedNumber = readBuffer(&vocState[0], SEN5X_VOC_STATE_BUFFER_SIZE + (SEN5X_VOC_STATE_BUFFER_SIZE / 2));\n    delay(20); // From Sensirion Datasheet\n\n    if (receivedNumber == 0) {\n        LOG_DEBUG(\"SEN5X: Error getting VOC's state\");\n        return false;\n    }\n\n    // Print the state (if debug is on)\n    LOG_DEBUG(\"SEN5X: VOC state retrieved from sensor: [%u, %u, %u, %u, %u, %u, %u, %u]\", vocState[0], vocState[1], vocState[2],\n              vocState[3], vocState[4], vocState[5], vocState[6], vocState[7]);\n\n    return true;\n}\n\nbool SEN5XSensor::loadState()\n{\n#ifdef FSCom\n    spiLock->lock();\n    auto file = FSCom.open(sen5XStateFileName, FILE_O_READ);\n    bool okay = false;\n    if (file) {\n        LOG_INFO(\"%s state read from %s\", sensorName, sen5XStateFileName);\n        pb_istream_t stream = {&readcb, &file, meshtastic_SEN5XState_size};\n\n        if (!pb_decode(&stream, &meshtastic_SEN5XState_msg, &sen5xstate)) {\n            LOG_ERROR(\"Error: can't decode protobuf %s\", PB_GET_ERROR(&stream));\n        } else {\n            lastCleaning = sen5xstate.last_cleaning_time;\n            lastCleaningValid = sen5xstate.last_cleaning_valid;\n            oneShotMode = sen5xstate.one_shot_mode;\n\n            if (model != SEN50) {\n                vocTime = sen5xstate.voc_state_time;\n                vocValid = sen5xstate.voc_state_valid;\n                // Unpack state\n                vocState[7] = (uint8_t)(sen5xstate.voc_state_array >> 56);\n                vocState[6] = (uint8_t)(sen5xstate.voc_state_array >> 48);\n                vocState[5] = (uint8_t)(sen5xstate.voc_state_array >> 40);\n                vocState[4] = (uint8_t)(sen5xstate.voc_state_array >> 32);\n                vocState[3] = (uint8_t)(sen5xstate.voc_state_array >> 24);\n                vocState[2] = (uint8_t)(sen5xstate.voc_state_array >> 16);\n                vocState[1] = (uint8_t)(sen5xstate.voc_state_array >> 8);\n                vocState[0] = (uint8_t)sen5xstate.voc_state_array;\n            }\n\n            // LOG_DEBUG(\"Loaded lastCleaning %u\", lastCleaning);\n            // LOG_DEBUG(\"Loaded lastCleaningValid %u\", lastCleaningValid);\n            // LOG_DEBUG(\"Loaded oneShotMode %s\", oneShotMode ? \"true\" : \"false\");\n            // LOG_DEBUG(\"Loaded vocTime %u\", vocTime);\n            // LOG_DEBUG(\"Loaded [%u, %u, %u, %u, %u, %u, %u, %u]\",\n            // vocState[7], vocState[6], vocState[5], vocState[4], vocState[3], vocState[2], vocState[1], vocState[0]);\n            // LOG_DEBUG(\"Loaded %svalid VOC state\", vocValid ? \"\" : \"in\");\n\n            okay = true;\n        }\n        file.close();\n    } else {\n        LOG_INFO(\"No %s state found (File: %s)\", sensorName, sen5XStateFileName);\n    }\n    spiLock->unlock();\n    return okay;\n#else\n    LOG_ERROR(\"SEN5X: ERROR - Filesystem not implemented\");\n#endif\n}\n\nbool SEN5XSensor::saveState()\n{\n#ifdef FSCom\n    auto file = SafeFile(sen5XStateFileName);\n\n    sen5xstate.last_cleaning_time = lastCleaning;\n    sen5xstate.last_cleaning_valid = lastCleaningValid;\n    sen5xstate.one_shot_mode = oneShotMode;\n\n    if (model != SEN50) {\n        sen5xstate.has_voc_state_time = true;\n        sen5xstate.has_voc_state_valid = true;\n        sen5xstate.has_voc_state_array = true;\n\n        sen5xstate.voc_state_time = vocTime;\n        sen5xstate.voc_state_valid = vocValid;\n        // Unpack state (8 bytes)\n        sen5xstate.voc_state_array = (((uint64_t)vocState[7]) << 56) | ((uint64_t)vocState[6] << 48) |\n                                     ((uint64_t)vocState[5] << 40) | ((uint64_t)vocState[4] << 32) |\n                                     ((uint64_t)vocState[3] << 24) | ((uint64_t)vocState[2] << 16) |\n                                     ((uint64_t)vocState[1] << 8) | ((uint64_t)vocState[0]);\n    }\n\n    bool okay = false;\n\n    LOG_INFO(\"%s: state write to %s\", sensorName, sen5XStateFileName);\n    pb_ostream_t stream = {&writecb, static_cast<Print *>(&file), meshtastic_SEN5XState_size};\n\n    if (!pb_encode(&stream, &meshtastic_SEN5XState_msg, &sen5xstate)) {\n        LOG_ERROR(\"Error: can't encode protobuf %s\", PB_GET_ERROR(&stream));\n    } else {\n        okay = true;\n    }\n\n    okay &= file.close();\n\n    if (okay)\n        LOG_INFO(\"%s: state write to %s successful\", sensorName, sen5XStateFileName);\n\n    return okay;\n#else\n    LOG_ERROR(\"%s: ERROR - Filesystem not implemented\", sensorName);\n#endif\n}\n\nbool SEN5XSensor::isActive()\n{\n    return state == SEN5X_MEASUREMENT || state == SEN5X_MEASUREMENT_2;\n}\n\nuint32_t SEN5XSensor::wakeUp()\n{\n\n    LOG_DEBUG(\"SEN5X: Waking up sensor\");\n\n    if (!sendCommand(SEN5X_START_MEASUREMENT)) {\n        LOG_ERROR(\"SEN5X: Error starting measurement\");\n        // TODO - what should this return?? Something actually on the default interval?\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n    delay(50); // From Sensirion Datasheet\n\n    // TODO - This is currently \"problematic\"\n    // If time is updated in between reads, there is no way to\n    // keep track of how long it has passed\n    pmMeasureStarted = getTime();\n    state = SEN5X_MEASUREMENT;\n    if (state == SEN5X_MEASUREMENT)\n        LOG_INFO(\"SEN5X: Started measurement mode\");\n    return SEN5X_WARMUP_MS_1;\n}\n\nbool SEN5XSensor::vocStateStable()\n{\n    uint32_t now;\n    now = getTime();\n    uint32_t sinceFirstMeasureStarted = (now - rhtGasMeasureStarted);\n    LOG_DEBUG(\"sinceFirstMeasureStarted: %us\", sinceFirstMeasureStarted);\n    return sinceFirstMeasureStarted > SEN5X_VOC_STATE_WARMUP_S;\n}\n\nbool SEN5XSensor::startCleaning()\n{\n    // Note: we only should enter here if we have a valid RTC with at least\n    // RTCQuality::RTCQualityDevice\n    state = SEN5X_CLEANING;\n\n    // Note that cleaning command can only be run when the sensor is in measurement mode\n    if (!sendCommand(SEN5X_START_MEASUREMENT)) {\n        LOG_ERROR(\"SEN5X: Error starting measurment mode\");\n        return false;\n    }\n    delay(50); // From Sensirion Datasheet\n\n    if (!sendCommand(SEN5X_START_FAN_CLEANING)) {\n        LOG_ERROR(\"SEN5X: Error starting fan cleaning\");\n        return false;\n    }\n    delay(20); // From Sensirion Datasheet\n\n    // This message will be always printed so the user knows the device it's not hung\n    LOG_INFO(\"SEN5X: Started fan cleaning it will take 10 seconds...\");\n\n    uint16_t started = millis();\n    while (millis() - started < 10500) {\n        delay(500);\n    }\n    LOG_INFO(\"SEN5X: Cleaning done!!\");\n\n    // Save timestamp in flash so we know when a week has passed\n    uint32_t now;\n    now = getValidTime(RTCQuality::RTCQualityDevice);\n    // If time is not RTCQualityNone, it will return non-zero\n    lastCleaning = now;\n    lastCleaningValid = true;\n    saveState();\n\n    idle();\n    return true;\n}\n\nbool SEN5XSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    state = SEN5X_NOT_DETECTED;\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    _bus = bus;\n    _address = dev->address.address;\n\n    delay(50); // without this there is an error on the deviceReset function\n\n    if (!sendCommand(SEN5X_RESET)) {\n        LOG_ERROR(\"SEN5X: Error reseting device\");\n        return false;\n    }\n    delay(200); // From Sensirion Datasheet\n\n    if (!findModel()) {\n        LOG_ERROR(\"SEN5X: error finding sensor model\");\n        return false;\n    }\n\n    // Check the firmware version\n    if (!getVersion())\n        return false;\n    if (firmwareVer < 2) {\n        LOG_ERROR(\"SEN5X: error firmware is too old and will not work with this implementation\");\n        return false;\n    }\n    delay(200); // From Sensirion Datasheet\n\n    // Detection succeeded\n    state = SEN5X_IDLE;\n    status = 1;\n\n    // Load state\n    loadState();\n\n    // Check if it is time to do a cleaning\n    uint32_t now;\n    int32_t passed = 0;\n    now = getValidTime(RTCQuality::RTCQualityDevice);\n\n    // If time is not RTCQualityNone, it will return non-zero\n    if (now) {\n        if (lastCleaningValid) {\n\n            passed = now - lastCleaning; // in seconds\n\n            if (passed > ONE_WEEK_IN_SECONDS && (now > SEN5X_VOC_VALID_DATE)) {\n                // If current date greater than 01/01/2018 (validity check)\n                LOG_INFO(\"SEN5X: More than a week (%us) since last cleaning in epoch (%us). Trigger, cleaning...\", passed,\n                         lastCleaning);\n                startCleaning();\n            } else {\n                LOG_INFO(\"SEN5X: Cleaning not needed (%ds passed). Last cleaning date (in epoch): %us\", passed, lastCleaning);\n            }\n        } else {\n            // We assume the device has just been updated or it is new,\n            // so no need to trigger a cleaning.\n            // Just save the timestamp to do a cleaning one week from now.\n            // Otherwise, we will never trigger cleaning in some cases\n            lastCleaning = now;\n            lastCleaningValid = true;\n            LOG_INFO(\"SEN5X: No valid last cleaning date found, saving it now: %us\", lastCleaning);\n            saveState();\n        }\n\n        if (model != SEN50) {\n            if (!vocValid) {\n                LOG_INFO(\"SEN5X: No valid VOC's state found\");\n            } else {\n                // Check if state is recent\n                if (vocStateRecent(now)) {\n                    // If current date greater than 01/01/2018 (validity check)\n                    // Send it to the sensor\n                    LOG_INFO(\"SEN5X: VOC state is valid and recent\");\n                    vocStateToSensor();\n                } else {\n                    LOG_INFO(\"SEN5X: VOC state is too old or date is invalid\");\n                    LOG_DEBUG(\"SEN5X: vocTime %u, Passed %u, and now %u\", vocTime, passed, now);\n                }\n            }\n        }\n    } else {\n        // TODO - Should this actually ignore? We could end up never cleaning...\n        LOG_INFO(\"SEN5X: Not enough RTCQuality, ignoring saved cleaning and VOC state\");\n    }\n\n    idle(false);\n    rhtGasMeasureStarted = now;\n\n    initI2CSensor();\n    return true;\n}\n\nbool SEN5XSensor::readValues()\n{\n    if (!sendCommand(SEN5X_READ_VALUES)) {\n        LOG_ERROR(\"SEN5X: Error sending read command\");\n        return false;\n    }\n    LOG_DEBUG(\"SEN5X: Reading PM Values\");\n    delay(20); // From Sensirion Datasheet\n\n    uint8_t dataBuffer[16]{};\n    size_t receivedNumber = readBuffer(&dataBuffer[0], 24);\n    if (receivedNumber == 0) {\n        LOG_ERROR(\"SEN5X: Error getting values\");\n        return false;\n    }\n\n    // Get the integers\n    uint16_t uint_pM1p0 = static_cast<uint16_t>((dataBuffer[0] << 8) | dataBuffer[1]);\n    uint16_t uint_pM2p5 = static_cast<uint16_t>((dataBuffer[2] << 8) | dataBuffer[3]);\n    uint16_t uint_pM4p0 = static_cast<uint16_t>((dataBuffer[4] << 8) | dataBuffer[5]);\n    uint16_t uint_pM10p0 = static_cast<uint16_t>((dataBuffer[6] << 8) | dataBuffer[7]);\n\n    int16_t int_humidity = static_cast<int16_t>((dataBuffer[8] << 8) | dataBuffer[9]);\n    int16_t int_temperature = static_cast<int16_t>((dataBuffer[10] << 8) | dataBuffer[11]);\n    int16_t int_vocIndex = static_cast<int16_t>((dataBuffer[12] << 8) | dataBuffer[13]);\n    int16_t int_noxIndex = static_cast<int16_t>((dataBuffer[14] << 8) | dataBuffer[15]);\n\n    // Convert values based on Sensirion Arduino lib\n    sen5xmeasurement.pM1p0 = !isnan(uint_pM1p0) ? uint_pM1p0 / 10 : UINT16_MAX;\n    sen5xmeasurement.pM2p5 = !isnan(uint_pM2p5) ? uint_pM2p5 / 10 : UINT16_MAX;\n    sen5xmeasurement.pM4p0 = !isnan(uint_pM4p0) ? uint_pM4p0 / 10 : UINT16_MAX;\n    sen5xmeasurement.pM10p0 = !isnan(uint_pM10p0) ? uint_pM10p0 / 10 : UINT16_MAX;\n    sen5xmeasurement.humidity = !isnan(int_humidity) ? int_humidity / 100.0f : FLT_MAX;\n    sen5xmeasurement.temperature = !isnan(int_temperature) ? int_temperature / 200.0f : FLT_MAX;\n    sen5xmeasurement.vocIndex = !isnan(int_vocIndex) ? int_vocIndex / 10.0f : FLT_MAX;\n    sen5xmeasurement.noxIndex = !isnan(int_noxIndex) ? int_noxIndex / 10.0f : FLT_MAX;\n\n    LOG_DEBUG(\"Got %s readings: pM1p0=%u, pM2p5=%u, pM4p0=%u, pM10p0=%u\", sensorName, sen5xmeasurement.pM1p0,\n              sen5xmeasurement.pM2p5, sen5xmeasurement.pM4p0, sen5xmeasurement.pM10p0);\n\n    if (model != SEN50) {\n        LOG_DEBUG(\"Got %s readings: humidity=%.2f, temperature=%.2f, vocIndex=%.2f\", sensorName, sen5xmeasurement.humidity,\n                  sen5xmeasurement.temperature, sen5xmeasurement.vocIndex);\n    }\n\n    if (model == SEN55) {\n        LOG_DEBUG(\"Got %s readings: noxIndex=%.2f\", sensorName, sen5xmeasurement.noxIndex);\n    }\n\n    return true;\n}\n\nbool SEN5XSensor::readPNValues(bool cumulative)\n{\n    if (!sendCommand(SEN5X_READ_PM_VALUES)) {\n        LOG_ERROR(\"SEN5X: Error sending read command\");\n        return false;\n    }\n\n    LOG_DEBUG(\"SEN5X: Reading PN Values\");\n    delay(20); // From Sensirion Datasheet\n\n    uint8_t dataBuffer[20]{};\n    size_t receivedNumber = readBuffer(&dataBuffer[0], 30);\n    if (receivedNumber == 0) {\n        LOG_ERROR(\"SEN5X: Error getting PN values\");\n        return false;\n    }\n\n    // Get the integers\n    // uint16_t uint_pM1p0   = static_cast<uint16_t>((dataBuffer[0]   << 8) | dataBuffer[1]);\n    // uint16_t uint_pM2p5   = static_cast<uint16_t>((dataBuffer[2]   << 8) | dataBuffer[3]);\n    // uint16_t uint_pM4p0   = static_cast<uint16_t>((dataBuffer[4]   << 8) | dataBuffer[5]);\n    // uint16_t uint_pM10p0  = static_cast<uint16_t>((dataBuffer[6]   << 8) | dataBuffer[7]);\n    uint16_t uint_pN0p5 = static_cast<uint16_t>((dataBuffer[8] << 8) | dataBuffer[9]);\n    uint16_t uint_pN1p0 = static_cast<uint16_t>((dataBuffer[10] << 8) | dataBuffer[11]);\n    uint16_t uint_pN2p5 = static_cast<uint16_t>((dataBuffer[12] << 8) | dataBuffer[13]);\n    uint16_t uint_pN4p0 = static_cast<uint16_t>((dataBuffer[14] << 8) | dataBuffer[15]);\n    uint16_t uint_pN10p0 = static_cast<uint16_t>((dataBuffer[16] << 8) | dataBuffer[17]);\n    uint16_t uint_tSize = static_cast<uint16_t>((dataBuffer[18] << 8) | dataBuffer[19]);\n\n    // Convert values based on Sensirion Arduino lib\n    // Multiply by 100 for converting from #/cm3 to #/0.1l for PN values\n    sen5xmeasurement.pN0p5 = !isnan(uint_pN0p5) ? uint_pN0p5 / 10 * 100 : UINT32_MAX;\n    sen5xmeasurement.pN1p0 = !isnan(uint_pN1p0) ? uint_pN1p0 / 10 * 100 : UINT32_MAX;\n    sen5xmeasurement.pN2p5 = !isnan(uint_pN2p5) ? uint_pN2p5 / 10 * 100 : UINT32_MAX;\n    sen5xmeasurement.pN4p0 = !isnan(uint_pN4p0) ? uint_pN4p0 / 10 * 100 : UINT32_MAX;\n    sen5xmeasurement.pN10p0 = !isnan(uint_pN10p0) ? uint_pN10p0 / 10 * 100 : UINT32_MAX;\n    sen5xmeasurement.tSize = !isnan(uint_tSize) ? uint_tSize / 1000.0f : FLT_MAX;\n\n    // Remove accumuluative values:\n    // https://github.com/fablabbcn/smartcitizen-kit-2x/issues/85\n    if (!cumulative) {\n        sen5xmeasurement.pN10p0 -= sen5xmeasurement.pN4p0;\n        sen5xmeasurement.pN4p0 -= sen5xmeasurement.pN2p5;\n        sen5xmeasurement.pN2p5 -= sen5xmeasurement.pN1p0;\n        sen5xmeasurement.pN1p0 -= sen5xmeasurement.pN0p5;\n    }\n\n    LOG_DEBUG(\"Got %s readings: pN0p5=%u, pN1p0=%u, pN2p5=%u, pN4p0=%u, pN10p0=%u, tSize=%.2f\", sensorName,\n              sen5xmeasurement.pN0p5, sen5xmeasurement.pN1p0, sen5xmeasurement.pN2p5, sen5xmeasurement.pN4p0,\n              sen5xmeasurement.pN10p0, sen5xmeasurement.tSize);\n\n    return true;\n}\n\nuint8_t SEN5XSensor::getMeasurements()\n{\n    uint32_t now;\n    now = getTime();\n\n    // Try to get new data\n    if (!sendCommand(SEN5X_READ_DATA_READY)) {\n        LOG_ERROR(\"SEN5X: Error sending command data ready flag\");\n        return 2;\n    }\n    delay(20); // From Sensirion Datasheet\n\n    uint8_t dataReadyBuffer[3];\n    size_t charNumber = readBuffer(&dataReadyBuffer[0], 3);\n    if (charNumber == 0) {\n        LOG_ERROR(\"SEN5X: Error getting device version value\");\n        return 2;\n    }\n\n    bool dataReady = dataReadyBuffer[1];\n    uint32_t sinceLastDataPollMs = (now - lastDataPoll) * 1000;\n    // Check if data is ready, and if since last time we requested is less than SEN5X_POLL_INTERVAL\n    if (!dataReady && (sinceLastDataPollMs > SEN5X_POLL_INTERVAL)) {\n        LOG_INFO(\"SEN5X: Data is not ready\");\n        return 1;\n    }\n\n    if (!readValues()) {\n        LOG_ERROR(\"SEN5X: Error getting readings\");\n        return 2;\n    }\n\n    if (!readPNValues(false)) {\n        LOG_ERROR(\"SEN5X: Error getting PN readings\");\n        return 2;\n    }\n\n    lastDataPoll = now;\n\n    return 0;\n}\n\nint32_t SEN5XSensor::wakeUpTimeMs()\n{\n    return SEN5X_WARMUP_MS_2;\n}\n\nint32_t SEN5XSensor::pendingForReadyMs()\n{\n    uint32_t now;\n    now = getTime();\n    uint32_t sincePmMeasureStarted = (now - pmMeasureStarted) * 1000;\n    LOG_DEBUG(\"SEN5X: Since measure started: %ums\", sincePmMeasureStarted);\n\n    switch (state) {\n    case SEN5X_MEASUREMENT: {\n\n        if (sincePmMeasureStarted < SEN5X_WARMUP_MS_1) {\n            LOG_INFO(\"SEN5X: not enough time passed since starting measurement\");\n            return SEN5X_WARMUP_MS_1 - sincePmMeasureStarted;\n        }\n\n        if (!pmMeasureStarted) {\n            pmMeasureStarted = now;\n        }\n\n        // Get PN values to check if we are above or below threshold\n        readPNValues(true);\n        lastDataPoll = now;\n\n        // If the reading is low (the tyhreshold is in #/cm3) and second warmUp hasn't passed we return to come back later\n        if ((sen5xmeasurement.pN4p0 / 100) < SEN5X_PN4P0_CONC_THD && sincePmMeasureStarted < SEN5X_WARMUP_MS_2) {\n            LOG_INFO(\"SEN5X: Concentration is low, we will ask again in the second warm up period\");\n            state = SEN5X_MEASUREMENT_2;\n            // Report how many seconds are pending to cover the first warm up period\n            return SEN5X_WARMUP_MS_2 - sincePmMeasureStarted;\n        }\n        return 0;\n    }\n    case SEN5X_MEASUREMENT_2: {\n        if (sincePmMeasureStarted < SEN5X_WARMUP_MS_2) {\n            // Report how many seconds are pending to cover the first warm up period\n            return SEN5X_WARMUP_MS_2 - sincePmMeasureStarted;\n        }\n        return 0;\n    }\n    default: {\n        return -1;\n    }\n    }\n}\n\nbool SEN5XSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    LOG_INFO(\"SEN5X: Attempting to get metrics\");\n    if (!isActive()) {\n        LOG_INFO(\"SEN5X: not in measurement mode\");\n        return false;\n    }\n\n    uint8_t response;\n    response = getMeasurements();\n\n    if (response == 0) {\n        if (sen5xmeasurement.pM1p0 != UINT16_MAX) {\n            measurement->variant.air_quality_metrics.has_pm10_standard = true;\n            measurement->variant.air_quality_metrics.pm10_standard = sen5xmeasurement.pM1p0;\n        }\n        if (sen5xmeasurement.pM2p5 != UINT16_MAX) {\n            measurement->variant.air_quality_metrics.has_pm25_standard = true;\n            measurement->variant.air_quality_metrics.pm25_standard = sen5xmeasurement.pM2p5;\n        }\n        if (sen5xmeasurement.pM4p0 != UINT16_MAX) {\n            measurement->variant.air_quality_metrics.has_pm40_standard = true;\n            measurement->variant.air_quality_metrics.pm40_standard = sen5xmeasurement.pM4p0;\n        }\n        if (sen5xmeasurement.pM10p0 != UINT16_MAX) {\n            measurement->variant.air_quality_metrics.has_pm100_standard = true;\n            measurement->variant.air_quality_metrics.pm100_standard = sen5xmeasurement.pM10p0;\n        }\n        if (sen5xmeasurement.pN0p5 != UINT32_MAX) {\n            measurement->variant.air_quality_metrics.has_particles_05um = true;\n            measurement->variant.air_quality_metrics.particles_05um = sen5xmeasurement.pN0p5;\n        }\n        if (sen5xmeasurement.pN1p0 != UINT32_MAX) {\n            measurement->variant.air_quality_metrics.has_particles_10um = true;\n            measurement->variant.air_quality_metrics.particles_10um = sen5xmeasurement.pN1p0;\n        }\n        if (sen5xmeasurement.pN2p5 != UINT32_MAX) {\n            measurement->variant.air_quality_metrics.has_particles_25um = true;\n            measurement->variant.air_quality_metrics.particles_25um = sen5xmeasurement.pN2p5;\n        }\n        if (sen5xmeasurement.pN4p0 != UINT32_MAX) {\n            measurement->variant.air_quality_metrics.has_particles_40um = true;\n            measurement->variant.air_quality_metrics.particles_40um = sen5xmeasurement.pN4p0;\n        }\n        if (sen5xmeasurement.pN10p0 != UINT32_MAX) {\n            measurement->variant.air_quality_metrics.has_particles_100um = true;\n            measurement->variant.air_quality_metrics.particles_100um = sen5xmeasurement.pN10p0;\n        }\n        if (sen5xmeasurement.tSize != FLT_MAX) {\n            measurement->variant.air_quality_metrics.has_particles_tps = true;\n            measurement->variant.air_quality_metrics.particles_tps = sen5xmeasurement.tSize;\n        }\n\n        if (model != SEN50) {\n            if (sen5xmeasurement.humidity != FLT_MAX) {\n                measurement->variant.air_quality_metrics.has_pm_humidity = true;\n                measurement->variant.air_quality_metrics.pm_humidity = sen5xmeasurement.humidity;\n            }\n            if (sen5xmeasurement.temperature != FLT_MAX) {\n                measurement->variant.air_quality_metrics.has_pm_temperature = true;\n                measurement->variant.air_quality_metrics.pm_temperature = sen5xmeasurement.temperature;\n            }\n            if (sen5xmeasurement.noxIndex != FLT_MAX) {\n                measurement->variant.air_quality_metrics.has_pm_voc_idx = true;\n                measurement->variant.air_quality_metrics.pm_voc_idx = sen5xmeasurement.vocIndex;\n            }\n        }\n\n        if (model == SEN55) {\n            if (sen5xmeasurement.noxIndex != FLT_MAX) {\n                measurement->variant.air_quality_metrics.has_pm_nox_idx = true;\n                measurement->variant.air_quality_metrics.pm_nox_idx = sen5xmeasurement.noxIndex;\n            }\n        }\n\n        return true;\n    } else if (response == 1) {\n        // TODO return because data was not ready yet\n        // Should this return false?\n        idle();\n        return false;\n    } else if (response == 2) {\n        // Return with error for non-existing data\n        idle();\n        return false;\n    }\n\n    return true;\n}\n\nvoid SEN5XSensor::setMode(bool setOneShot)\n{\n    oneShotMode = setOneShot;\n    if (oneShotMode) {\n        LOG_INFO(\"%s setting mode to one shot mode\", sensorName);\n    } else {\n        LOG_INFO(\"%s setting mode to continuous mode\", sensorName);\n    }\n}\n\nAdminMessageHandleResult SEN5XSensor::handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                         meshtastic_AdminMessage *response)\n{\n    AdminMessageHandleResult result;\n    result = AdminMessageHandleResult::NOT_HANDLED;\n\n    switch (request->which_payload_variant) {\n    case meshtastic_AdminMessage_sensor_config_tag:\n        if (!request->sensor_config.has_sen5x_config) {\n            result = AdminMessageHandleResult::NOT_HANDLED;\n            break;\n        }\n\n        // Check for one-shot/continuous mode request\n        if (request->sensor_config.sen5x_config.has_set_one_shot_mode) {\n            this->setMode(request->sensor_config.sen5x_config.set_one_shot_mode);\n        }\n\n        // TODO - Add admin command to set temperature offset?\n        // Check for temperature offset\n        // if (request->sensor_config.sen5x_config.has_set_temperature) {\n        //     this->setTemperature(request->sensor_config.sen5x_config.set_temperature);\n        // }\n\n        // TODO - Add admin command to trigger fan cleaning?\n        // Check for one-shot/continuous mode request\n        // if (request->sensor_config.sen5x_config.has_fan_cleaning && request->sensor_config.sen5x_config.fan_cleaning) {\n        //     this->startCleaning();\n        // }\n\n        result = AdminMessageHandleResult::HANDLED;\n        break;\n\n    default:\n        result = AdminMessageHandleResult::NOT_HANDLED;\n    }\n\n    return result;\n}\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SEN5XSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RTC.h\"\n#include \"TelemetrySensor.h\"\n#include \"Wire.h\"\n\n// Warm up times for SEN5X from the datasheet\n#ifndef SEN5X_WARMUP_MS_1\n#define SEN5X_WARMUP_MS_1 15000\n#endif\n\n#ifndef SEN5X_WARMUP_MS_2\n#define SEN5X_WARMUP_MS_2 30000\n#endif\n\n#ifndef SEN5X_POLL_INTERVAL\n#define SEN5X_POLL_INTERVAL 1000\n#endif\n\n#ifndef SEN5X_I2C_CLOCK_SPEED\n#define SEN5X_I2C_CLOCK_SPEED 100000\n#endif\n\n/*\nTime after which the sensor can go to sleep, as the warmup period has passed\nand the VOCs sensor will is allowed to stop (although needs to recover the state\neach time)\n*/\n#ifndef SEN5X_VOC_STATE_WARMUP_S\n/* Note for Testing 5' is enough\nSensirion recommends 1h\nThis can be bypassed completely if switching to low-power RHT/Gas mode and setting\nSEN5X_VOC_STATE_WARMUP_S 0\n*/\n#define SEN5X_VOC_STATE_WARMUP_S 3600\n#endif\n\n#define ONE_WEEK_IN_SECONDS 604800\n\nstruct _SEN5XMeasurements {\n    uint16_t pM1p0;\n    uint16_t pM2p5;\n    uint16_t pM4p0;\n    uint16_t pM10p0;\n    uint32_t pN0p5;\n    uint32_t pN1p0;\n    uint32_t pN2p5;\n    uint32_t pN4p0;\n    uint32_t pN10p0;\n    float tSize;\n    float humidity;\n    float temperature;\n    float vocIndex;\n    float noxIndex;\n};\n\nclass SEN5XSensor : public TelemetrySensor\n{\n  private:\n    TwoWire *_bus{};\n    uint8_t _address{};\n\n    bool getVersion();\n    float firmwareVer = -1;\n    float hardwareVer = -1;\n    float protocolVer = -1;\n    bool findModel();\n\n// Commands\n#define SEN5X_RESET 0xD304\n#define SEN5X_GET_PRODUCT_NAME 0xD014\n#define SEN5X_GET_FIRMWARE_VERSION 0xD100\n#define SEN5X_START_MEASUREMENT 0x0021\n#define SEN5X_START_MEASUREMENT_RHT_GAS 0x0037\n#define SEN5X_STOP_MEASUREMENT 0x0104\n#define SEN5X_READ_DATA_READY 0x0202\n#define SEN5X_START_FAN_CLEANING 0x5607\n#define SEN5X_RW_VOCS_STATE 0x6181\n\n#define SEN5X_READ_VALUES 0x03C4\n#define SEN5X_READ_RAW_VALUES 0x03D2\n#define SEN5X_READ_PM_VALUES 0x0413\n\n#define SEN5X_VOC_VALID_TIME 600\n#define SEN5X_VOC_VALID_DATE 1514764800\n\n    enum SEN5Xmodel { SEN5X_UNKNOWN = 0, SEN50 = 0b001, SEN54 = 0b010, SEN55 = 0b100 };\n    SEN5Xmodel model = SEN5X_UNKNOWN;\n\n    enum SEN5XState {\n        SEN5X_OFF,\n        SEN5X_IDLE,\n        SEN5X_RHTGAS_ONLY,\n        SEN5X_MEASUREMENT,\n        SEN5X_MEASUREMENT_2,\n        SEN5X_CLEANING,\n        SEN5X_NOT_DETECTED\n    };\n    SEN5XState state = SEN5X_OFF;\n    // Flag to work on one-shot (read and sleep), or continuous mode\n    bool oneShotMode = true;\n    void setMode(bool setOneShot);\n    bool vocStateValid();\n/* Sensirion recommends taking a reading after 15 seconds,\nif the Particle number reading is over 100#/cm3 the reading is OK,\nbut if it is lower wait until 30 seconds and take it again.\nSee: https://sensirion.com/resource/application_note/low_power_mode/sen5x\n*/\n#define SEN5X_PN4P0_CONC_THD 100\n\n    bool sendCommand(uint16_t command);\n    bool sendCommand(uint16_t command, uint8_t *buffer, uint8_t byteNumber = 0);\n    uint8_t readBuffer(uint8_t *buffer, uint8_t byteNumber); // Return number of bytes received\n    uint8_t sen5xCRC(const uint8_t *buffer);\n    bool startCleaning();\n    uint8_t getMeasurements();\n    // bool readRawValues();\n    bool readPNValues(bool cumulative);\n    bool readValues();\n\n    uint32_t pmMeasureStarted = 0;\n    uint32_t rhtGasMeasureStarted = 0;\n    uint32_t lastDataPoll = 0;\n    _SEN5XMeasurements sen5xmeasurement{};\n\n    bool idle(bool checkState = true);\n\n  protected:\n    // Store status of the sensor in this file\n    const char *sen5XStateFileName = \"/prefs/sen5X.dat\";\n    meshtastic_SEN5XState sen5xstate = meshtastic_SEN5XState_init_zero;\n\n    bool loadState();\n    bool saveState();\n\n    // Cleaning State\n    uint32_t lastCleaning = 0;\n    bool lastCleaningValid = false;\n\n// VOC State\n#define SEN5X_VOC_STATE_BUFFER_SIZE 8\n    uint8_t vocState[SEN5X_VOC_STATE_BUFFER_SIZE]{};\n    uint32_t vocTime = 0;\n    bool vocValid = false;\n\n    bool vocStateFromSensor();\n    bool vocStateToSensor();\n    bool vocStateStable();\n    bool vocStateRecent(uint32_t now);\n\n  public:\n    SEN5XSensor();\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n\n    virtual bool isActive() override;\n    virtual void sleep() override;\n    virtual uint32_t wakeUp() override;\n    virtual bool canSleep() override { return true; }\n    virtual int32_t wakeUpTimeMs() override;\n    virtual int32_t pendingForReadyMs() override;\n\n    AdminMessageHandleResult handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                meshtastic_AdminMessage *response) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SFA30Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR && __has_include(<SensirionI2cSfa3x.h>)\n\n#include \"../detect/reClockI2C.h\"\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"SFA30Sensor.h\"\n\nSFA30Sensor::SFA30Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SFA30, \"SFA30\"){};\n\nbool SFA30Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    _bus = bus;\n    _address = dev->address.address;\n\n#ifdef SFA30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SFA30_I2C_CLOCK_SPEED */\n\n    sfa30.begin(*_bus, _address);\n    delay(20);\n\n    if (this->isError(sfa30.deviceReset())) {\n#if defined(SFA30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n    state = State::IDLE;\n    if (this->isError(sfa30.startContinuousMeasurement())) {\n#if defined(SFA30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return false;\n    }\n\n    LOG_INFO(\"%s starting measurement\", sensorName);\n\n#if defined(SFA30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    status = 1;\n    state = State::ACTIVE;\n    measureStarted = getTime();\n    LOG_INFO(\"%s Enabled\", sensorName);\n\n    initI2CSensor();\n    return true;\n};\n\nbool SFA30Sensor::isError(uint16_t response)\n{\n    if (response == SFA30_NO_ERROR)\n        return false;\n\n    // TODO - Check error to char conversion\n    LOG_ERROR(\"%s: %u\", sensorName, response);\n    return true;\n}\n\nvoid SFA30Sensor::sleep()\n{\n#ifdef SFA30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SFA30_I2C_CLOCK_SPEED */\n\n    // Note - not recommended for this sensor on a periodic basis\n    if (this->isError(sfa30.stopMeasurement())) {\n        LOG_ERROR(\"%s: can't stop measurement\", sensorName);\n    };\n\n#if defined(SFA30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    LOG_INFO(\"%s: stop measurement\", sensorName);\n    state = State::IDLE;\n    measureStarted = 0;\n}\n\nuint32_t SFA30Sensor::wakeUp()\n{\n#ifdef SFA30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SFA30_I2C_CLOCK_SPEED */\n\n    LOG_INFO(\"Waking up %s\", sensorName);\n    if (this->isError(sfa30.startContinuousMeasurement())) {\n#if defined(SFA30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n        reClockI2C(currentClock, _bus, false);\n#endif\n        return 0;\n    }\n\n#if defined(SFA30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    state = State::ACTIVE;\n    measureStarted = getTime();\n    return SFA30_WARMUP_MS;\n}\n\nint32_t SFA30Sensor::wakeUpTimeMs()\n{\n    return SFA30_WARMUP_MS;\n}\n\nbool SFA30Sensor::canSleep()\n{\n    // Sleep is disabled in this sensor because readings are not tested with periodic sleep\n    // with such low power consumption, prefered to keep it active\n    return false;\n}\n\nbool SFA30Sensor::isActive()\n{\n    return state == State::ACTIVE;\n}\n\nint32_t SFA30Sensor::pendingForReadyMs()\n{\n    uint32_t now;\n    now = getTime();\n    uint32_t sinceHchoMeasureStarted = (now - measureStarted) * 1000;\n    LOG_DEBUG(\"%s: Since measure started: %ums\", sensorName, sinceHchoMeasureStarted);\n\n    if (sinceHchoMeasureStarted < SFA30_WARMUP_MS) {\n        LOG_INFO(\"%s: not enough time passed since starting measurement\", sensorName);\n        return SFA30_WARMUP_MS - sinceHchoMeasureStarted;\n    }\n    return 0;\n}\n\nbool SFA30Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    float hcho = 0.0;\n    float humidity = 0.0;\n    float temperature = 0.0;\n\n#ifdef SFA30_I2C_CLOCK_SPEED\n#ifdef CAN_RECLOCK_I2C\n    uint32_t currentClock = reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, false);\n#elif !HAS_SCREEN\n    reClockI2C(SFA30_I2C_CLOCK_SPEED, _bus, true);\n#else\n    LOG_WARN(\"%s can't be used at this clock speed, with a screen\", sensorName);\n    return false;\n#endif /* CAN_RECLOCK_I2C */\n#endif /* SFA30_I2C_CLOCK_SPEED */\n\n    if (this->isError(sfa30.readMeasuredValues(hcho, humidity, temperature))) {\n        LOG_WARN(\"%s: No values\", sensorName);\n        return false;\n    }\n\n#if defined(SFA30_I2C_CLOCK_SPEED) && defined(CAN_RECLOCK_I2C)\n    reClockI2C(currentClock, _bus, false);\n#endif\n\n    measurement->variant.air_quality_metrics.has_form_temperature = true;\n    measurement->variant.air_quality_metrics.has_form_humidity = true;\n    measurement->variant.air_quality_metrics.has_form_formaldehyde = true;\n\n    measurement->variant.air_quality_metrics.form_temperature = temperature;\n    measurement->variant.air_quality_metrics.form_humidity = humidity;\n    measurement->variant.air_quality_metrics.form_formaldehyde = hcho;\n\n    LOG_DEBUG(\"Got %s readings: hcho=%.2f, hcho_temp=%.2f, hcho_hum=%.2f\", sensorName, hcho, temperature, humidity);\n\n    return true;\n}\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SFA30Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR && __has_include(<SensirionI2cSfa3x.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"RTC.h\"\n#include \"TelemetrySensor.h\"\n#include <SensirionI2cSfa3x.h>\n\n#define SFA30_I2C_CLOCK_SPEED 100000\n#define SFA30_WARMUP_MS 10000\n#define SFA30_NO_ERROR 0\n\nclass SFA30Sensor : public TelemetrySensor\n{\n  private:\n    enum class State { IDLE, ACTIVE };\n    State state = State::IDLE;\n    uint32_t measureStarted = 0;\n\n    SensirionI2cSfa3x sfa30;\n    TwoWire *_bus{};\n    uint8_t _address{};\n    bool isError(uint16_t response);\n\n  public:\n    SFA30Sensor();\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n\n    virtual bool isActive() override;\n    virtual void sleep() override;\n    virtual uint32_t wakeUp() override;\n    virtual bool canSleep() override;\n    virtual int32_t wakeUpTimeMs() override;\n    virtual int32_t pendingForReadyMs() override;\n};\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SHT31Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_SHT31.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"SHT31Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_SHT31.h>\n\nSHT31Sensor::SHT31Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SHT31, \"SHT31\") {}\n\nbool SHT31Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    sht31 = Adafruit_SHT31(bus);\n    status = sht31.begin(dev->address.address);\n    initI2CSensor();\n    return status;\n}\n\nbool SHT31Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_relative_humidity = true;\n    measurement->variant.environment_metrics.temperature = sht31.readTemperature();\n    measurement->variant.environment_metrics.relative_humidity = sht31.readHumidity();\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SHT31Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_SHT31.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_SHT31.h>\n\nclass SHT31Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_SHT31 sht31;\n\n  public:\n    SHT31Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SHT4XSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_SHT4x.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"SHT4XSensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_SHT4x.h>\n\nSHT4XSensor::SHT4XSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SHT4X, \"SHT4X\") {}\n\nbool SHT4XSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    uint32_t serialNumber = 0;\n\n    status = sht4x.begin(bus);\n    if (!status) {\n        return status;\n    }\n\n    serialNumber = sht4x.readSerial();\n    if (serialNumber != 0) {\n        LOG_DEBUG(\"serialNumber : %x\", serialNumber);\n        status = 1;\n    } else {\n        LOG_DEBUG(\"Error trying to execute readSerial(): \");\n        status = 0;\n    }\n\n    initI2CSensor();\n    return status;\n}\n\nbool SHT4XSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_relative_humidity = true;\n\n    sensors_event_t humidity, temp;\n    sht4x.getEvent(&humidity, &temp);\n    measurement->variant.environment_metrics.temperature = temp.temperature;\n    measurement->variant.environment_metrics.relative_humidity = humidity.relative_humidity;\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SHT4XSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_SHT4x.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_SHT4x.h>\n\nclass SHT4XSensor : public TelemetrySensor\n{\n  private:\n    Adafruit_SHT4x sht4x = Adafruit_SHT4x();\n\n  public:\n    SHT4XSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SHTC3Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_SHTC3.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"SHTC3Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_SHTC3.h>\n\nSHTC3Sensor::SHTC3Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SHTC3, \"SHTC3\") {}\n\nbool SHTC3Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = shtc3.begin(bus);\n\n    initI2CSensor();\n    return status;\n}\n\nbool SHTC3Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_relative_humidity = true;\n\n    sensors_event_t humidity, temp;\n    shtc3.getEvent(&humidity, &temp);\n\n    measurement->variant.environment_metrics.temperature = temp.temperature;\n    measurement->variant.environment_metrics.relative_humidity = humidity.relative_humidity;\n\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/SHTC3Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_SHTC3.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_SHTC3.h>\n\nclass SHTC3Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_SHTC3 shtc3 = Adafruit_SHTC3();\n\n  public:\n    SHTC3Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/T1000xSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(T1000X_SENSOR_EN)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"T1000xSensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_Sensor.h>\n\n#define T1000X_SENSE_SAMPLES 15\n#define T1000X_LIGHT_REF_VCC 2400\n\n#define HEATER_NTC_BX 4250   // thermistor coefficient B\n#define HEATER_NTC_RP 8250   // ohm, series resistance to thermistor\n#define HEATER_NTC_KA 273.15 // 25 Celsius at Kelvin\n#define NTC_REF_VCC 3000     // mV, output voltage of LDO\n\n// ntc res table\nuint32_t ntc_res2[136] = {\n    113347, 107565, 102116, 96978, 92132, 87559, 83242, 79166, 75316, 71677, 68237, 64991, 61919, 59011, 56258, 53650, 51178,\n    48835,  46613,  44506,  42506, 40600, 38791, 37073, 35442, 33892, 32420, 31020, 29689, 28423, 27219, 26076, 24988, 23951,\n    22963,  22021,  21123,  20267, 19450, 18670, 17926, 17214, 16534, 15886, 15266, 14674, 14108, 13566, 13049, 12554, 12081,\n    11628,  11195,  10780,  10382, 10000, 9634,  9284,  8947,  8624,  8315,  8018,  7734,  7461,  7199,  6948,  6707,  6475,\n    6253,   6039,   5834,   5636,  5445,  5262,  5086,  4917,  4754,  4597,  4446,  4301,  4161,  4026,  3896,  3771,  3651,\n    3535,   3423,   3315,   3211,  3111,  3014,  2922,  2834,  2748,  2666,  2586,  2509,  2435,  2364,  2294,  2228,  2163,\n    2100,   2040,   1981,   1925,  1870,  1817,  1766,  1716,  1669,  1622,  1578,  1535,  1493,  1452,  1413,  1375,  1338,\n    1303,   1268,   1234,   1202,  1170,  1139,  1110,  1081,  1053,  1026,  999,   974,   949,   925,   902,   880,   858,\n};\n\nint8_t ntc_temp2[136] = {\n    -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8,\n    -7,  -6,  -5,  -4,  -3,  -2,  -1,  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,   10,  11,  12,  13,  14, 15,\n    16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,  30,  31,  32,  33,  34,  35,  36,  37, 38,\n    39,  40,  41,  42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60, 61,\n    62,  63,  64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83, 84,\n    85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,  98,  99,  100, 101, 102, 103, 104, 105,\n};\n\nT1000xSensor::T1000xSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SENSOR_UNSET, \"T1000x\") {}\n\nbool T1000xSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    return true;\n}\n\nfloat T1000xSensor::getLux()\n{\n    uint32_t lux_vot = 0;\n    float lux_level = 0;\n\n    for (uint32_t i = 0; i < T1000X_SENSE_SAMPLES; i++) {\n        lux_vot += analogRead(T1000X_LUX_PIN);\n    }\n    lux_vot = lux_vot / T1000X_SENSE_SAMPLES;\n    lux_vot = ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * lux_vot;\n\n    if (lux_vot <= 80)\n        lux_level = 0;\n    else if (lux_vot >= 2480)\n        lux_level = 100;\n    else\n        lux_level = 100 * (lux_vot - 80) / T1000X_LIGHT_REF_VCC;\n\n    return lux_level;\n}\n\nfloat T1000xSensor::getTemp()\n{\n    uint32_t vcc_vot = 0, ntc_vot = 0;\n\n    uint8_t u8i = 0;\n    float Vout = 0, Rt = 0, temp = 0;\n    float Temp = 0;\n\n    // P0.4 is a sensor power enable GPIO, not a VCC ADC pin.\n    // Read BATTERY_PIN (with voltage divider) and cap at NTC_REF_VCC to estimate the sensor rail voltage.\n    for (uint32_t i = 0; i < T1000X_SENSE_SAMPLES; i++) {\n        vcc_vot += analogRead(BATTERY_PIN);\n    }\n    vcc_vot = vcc_vot / T1000X_SENSE_SAMPLES;\n    vcc_vot = ADC_MULTIPLIER * ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * vcc_vot;\n    if (vcc_vot > NTC_REF_VCC)\n        vcc_vot = NTC_REF_VCC;\n\n    for (uint32_t i = 0; i < T1000X_SENSE_SAMPLES; i++) {\n        ntc_vot += analogRead(T1000X_NTC_PIN);\n    }\n    ntc_vot = ntc_vot / T1000X_SENSE_SAMPLES;\n    ntc_vot = ((1000 * AREF_VOLTAGE) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * ntc_vot;\n\n    Vout = ntc_vot;\n    Rt = (HEATER_NTC_RP * vcc_vot) / Vout - HEATER_NTC_RP;\n    for (u8i = 0; u8i < 135; u8i++) {\n        if (Rt >= ntc_res2[u8i]) {\n            break;\n        }\n    }\n    temp = ntc_temp2[u8i - 1] + 1 * (ntc_res2[u8i - 1] - Rt) / (float)(ntc_res2[u8i - 1] - ntc_res2[u8i]);\n    Temp = (temp * 100 + 5) / 100; // half adjust\n\n    return Temp;\n}\n\nbool T1000xSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_temperature = true;\n    measurement->variant.environment_metrics.has_lux = true;\n\n    measurement->variant.environment_metrics.temperature = getTemp();\n    measurement->variant.environment_metrics.lux = getLux();\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/T1000xSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n\nclass T1000xSensor : public TelemetrySensor\n{\n  public:\n    T1000xSensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n    virtual float getLux();\n    virtual float getTemp();\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/TSL2561Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_TSL2561_U.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TSL2561Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_TSL2561_U.h>\n\nTSL2561Sensor::TSL2561Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_TSL2561, \"TSL2561\") {}\n\nbool TSL2561Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n\n    status = tsl.begin(bus);\n    if (!status) {\n        return status;\n    }\n    tsl.setGain(TSL2561_GAIN_1X);\n    tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_101MS);\n\n    initI2CSensor();\n    return status;\n}\n\nbool TSL2561Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_lux = true;\n    sensors_event_t event;\n    tsl.getEvent(&event);\n    measurement->variant.environment_metrics.lux = event.light;\n    LOG_INFO(\"Lux: %f\", measurement->variant.environment_metrics.lux);\n\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/TSL2561Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_TSL2561_U.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_TSL2561_U.h>\n\nclass TSL2561Sensor : public TelemetrySensor\n{\n  private:\n    // The magic number is a sensor id, the actual value doesn't matter\n    Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_LOW, 12345);\n\n  public:\n    TSL2561Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/TSL2591Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_TSL2591.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TSL2591Sensor.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_TSL2591.h>\n#include <typeinfo>\n\nTSL2591Sensor::TSL2591Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_TSL25911FN, \"TSL2591\") {}\n\nbool TSL2591Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = tsl.begin(bus);\n    if (!status) {\n        return status;\n    }\n    tsl.setGain(TSL2591_GAIN_LOW); // 1x gain\n    tsl.setTiming(TSL2591_INTEGRATIONTIME_100MS);\n\n    initI2CSensor();\n    return status;\n}\n\nbool TSL2591Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_lux = true;\n    uint32_t lum = tsl.getFullLuminosity();\n    uint16_t ir, full;\n    ir = lum >> 16;\n    full = lum & 0xFFFF;\n\n    measurement->variant.environment_metrics.lux = tsl.calculateLux(full, ir);\n    LOG_INFO(\"Lux: %f\", measurement->variant.environment_metrics.lux);\n\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/Telemetry/Sensor/TSL2591Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_TSL2591.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_TSL2591.h>\n\nclass TSL2591Sensor : public TelemetrySensor\n{\n  private:\n    Adafruit_TSL2591 tsl;\n\n  public:\n    TSL2591Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/TelemetrySensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"NodeDB.h\"\n#include \"TelemetrySensor.h\"\n#include \"main.h\"\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/TelemetrySensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR || !MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR\n\n#pragma once\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"MeshModule.h\"\n#include \"NodeDB.h\"\n#include \"detect/ScanI2C.h\"\n#include <utility>\n\n#if !ARCH_PORTDUINO\nclass TwoWire;\n#endif\n\n#define DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS 1000\nextern std::pair<uint8_t, TwoWire *> nodeTelemetrySensorsMap[_meshtastic_TelemetrySensorType_MAX + 1];\n\nclass TelemetrySensor\n{\n  protected:\n    TelemetrySensor(meshtastic_TelemetrySensorType sensorType, const char *sensorName)\n    {\n        this->sensorName = sensorName;\n        this->sensorType = sensorType;\n        this->status = 0;\n    }\n\n    meshtastic_TelemetrySensorType sensorType = meshtastic_TelemetrySensorType_SENSOR_UNSET;\n    unsigned status;\n    bool initialized = false;\n\n    int32_t initI2CSensor()\n    {\n        if (!status) {\n            LOG_WARN(\"Can't connect to detected %s sensor. Remove from nodeTelemetrySensorsMap\", sensorName);\n            nodeTelemetrySensorsMap[sensorType].first = 0;\n        } else {\n            LOG_INFO(\"Opened %s sensor on i2c bus\", sensorName);\n            setup();\n        }\n        initialized = true;\n        return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;\n    }\n\n    // TODO: check is setup used at all?\n    virtual void setup() {}\n\n  public:\n    virtual ~TelemetrySensor() {}\n\n    virtual AdminMessageHandleResult handleAdminMessage(const meshtastic_MeshPacket &mp, meshtastic_AdminMessage *request,\n                                                        meshtastic_AdminMessage *response)\n    {\n        return AdminMessageHandleResult::NOT_HANDLED;\n    }\n\n    const char *sensorName;\n    // TODO: delete after migration\n    bool hasSensor() { return nodeTelemetrySensorsMap[sensorType].first > 0; }\n\n    // Functions to sleep / wakeup sensors that support it\n    // These functions can save power consumption in cases like AQ\n    virtual void sleep(){};\n    virtual uint32_t wakeUp() { return 0; }\n    virtual bool isActive() { return true; }  // Return true by default, override per sensor\n    virtual bool canSleep() { return false; } // Return false by default, override per sensor\n    virtual int32_t wakeUpTimeMs() { return 0; }\n    virtual int32_t pendingForReadyMs() { return 0; }\n\n#if WIRE_INTERFACES_COUNT > 1\n    // Set to true if Implementation only works first I2C port (Wire)\n    virtual bool onlyWire1() { return false; }\n#endif\n    virtual int32_t runOnce() { return INT32_MAX; }\n    virtual bool isInitialized() { return initialized; }\n    // TODO: is this used?\n    virtual bool isRunning() { return status > 0; }\n\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) = 0;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) { return false; };\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/VEML7700Sensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_VEML7700.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include \"VEML7700Sensor.h\"\n\n#include <Adafruit_VEML7700.h>\n#include <typeinfo>\n\nVEML7700Sensor::VEML7700Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_VEML7700, \"VEML7700\") {}\n\nbool VEML7700Sensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)\n{\n    LOG_INFO(\"Init sensor: %s\", sensorName);\n    status = veml7700.begin(bus);\n    if (!status) {\n        return status;\n    }\n\n    veml7700.setLowThreshold(10000);\n    veml7700.setHighThreshold(20000);\n    veml7700.interruptEnable(true);\n\n    initI2CSensor();\n    return status;\n}\n\n/*!\n *    @brief Copmute lux from ALS reading.\n *    @param rawALS raw ALS register value\n *    @param corrected if true, apply non-linear correction\n *    @return lux value\n */\nfloat VEML7700Sensor::computeLux(uint16_t rawALS, bool corrected)\n{\n    float lux = getResolution() * rawALS;\n    if (corrected)\n        lux = (((6.0135e-13 * lux - 9.3924e-9) * lux + 8.1488e-5) * lux + 1.0023) * lux;\n    return lux;\n}\n\n/*!\n *    @brief Determines resolution for current gain and integration time\n * settings.\n */\nfloat VEML7700Sensor::getResolution(void)\n{\n    return MAX_RES * (IT_MAX / veml7700.getIntegrationTimeValue()) * (GAIN_MAX / veml7700.getGainValue());\n}\n\nbool VEML7700Sensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    measurement->variant.environment_metrics.has_lux = true;\n    measurement->variant.environment_metrics.has_white_lux = true;\n\n    int16_t white;\n    measurement->variant.environment_metrics.lux = veml7700.readLux(VEML_LUX_AUTO);\n    white = veml7700.readWhite(true);\n    measurement->variant.environment_metrics.white_lux = computeLux(white, white > 100);\n    LOG_INFO(\"white lux %f, als lux %f\", measurement->variant.environment_metrics.white_lux,\n             measurement->variant.environment_metrics.lux);\n\n    return true;\n}\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/VEML7700Sensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_VEML7700.h>)\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include <Adafruit_VEML7700.h>\n\nclass VEML7700Sensor : public TelemetrySensor\n{\n  private:\n    const float MAX_RES = 0.0036;\n    const float GAIN_MAX = 2;\n    const float IT_MAX = 800;\n    Adafruit_VEML7700 veml7700;\n    float computeLux(uint16_t rawALS, bool corrected);\n    float getResolution(void);\n\n  public:\n    VEML7700Sensor();\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;\n};\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/VoltageSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#pragma once\n\nclass VoltageSensor\n{\n  public:\n    virtual uint16_t getBusVoltageMv() = 0;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/nullSensor.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"TelemetrySensor.h\"\n#include \"nullSensor.h\"\n#include <typeinfo>\n\nNullSensor::NullSensor() : TelemetrySensor(meshtastic_TelemetrySensorType_SENSOR_UNSET, \"nullSensor\") {}\n\nint32_t NullSensor::runOnce()\n{\n    return INT32_MAX;\n}\n\nvoid NullSensor::setup() {}\n\nbool NullSensor::getMetrics(meshtastic_Telemetry *measurement)\n{\n    return false;\n}\n\nuint16_t NullSensor::getBusVoltageMv()\n{\n    return 0;\n}\n\nint16_t NullSensor::getCurrentMa()\n{\n    return 0;\n}\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/Sensor/nullSensor.h",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n#pragma once\n\n#include \"../mesh/generated/meshtastic/telemetry.pb.h\"\n\n#include \"CurrentSensor.h\"\n#include \"TelemetrySensor.h\"\n#include \"VoltageSensor.h\"\n\nclass NullSensor : public TelemetrySensor, VoltageSensor, CurrentSensor\n{\n\n  protected:\n    virtual void setup() override;\n\n  public:\n    NullSensor();\n    virtual int32_t runOnce() override;\n    virtual bool getMetrics(meshtastic_Telemetry *measurement) override;\n    int32_t runTrigger() { return 0; }\n\n    virtual uint16_t getBusVoltageMv() override;\n    virtual int16_t getCurrentMa() override;\n};\n\n#endif"
  },
  {
    "path": "src/modules/Telemetry/UnitConversions.cpp",
    "content": "#include \"UnitConversions.h\"\n\nfloat UnitConversions::CelsiusToFahrenheit(float celsius)\n{\n    return (celsius * 9) / 5 + 32;\n}\n\nfloat UnitConversions::MetersPerSecondToKnots(float metersPerSecond)\n{\n    return metersPerSecond * 1.94384;\n}\n\nfloat UnitConversions::MetersPerSecondToMilesPerHour(float metersPerSecond)\n{\n    return metersPerSecond * 2.23694;\n}\n\nfloat UnitConversions::HectoPascalToInchesOfMercury(float hectoPascal)\n{\n    return hectoPascal * 0.029529983071445;\n}\n"
  },
  {
    "path": "src/modules/Telemetry/UnitConversions.h",
    "content": "#pragma once\n\nclass UnitConversions\n{\n  public:\n    static float CelsiusToFahrenheit(float celsius);\n    static float MetersPerSecondToKnots(float metersPerSecond);\n    static float MetersPerSecondToMilesPerHour(float metersPerSecond);\n    static float HectoPascalToInchesOfMercury(float hectoPascal);\n};\n"
  },
  {
    "path": "src/modules/TextMessageModule.cpp",
    "content": "#include \"TextMessageModule.h\"\n#include \"MeshService.h\"\n#include \"MessageStore.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"buzz.h\"\n#include \"configuration.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/draw/MessageRenderer.h\"\n#include \"main.h\"\nTextMessageModule *textMessageModule;\n\nProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n    auto &p = mp.decoded;\n    LOG_INFO(\"Received text msg from=0x%0x, id=0x%x, msg=%.*s\", mp.from, mp.id, p.payload.size, p.payload.bytes);\n#endif\n    // add packet ID to the rolling list of packets\n    textPacketList[textPacketListIndex] = mp.id;\n    textPacketListIndex = (textPacketListIndex + 1) % TEXT_PACKET_LIST_SIZE;\n\n    // We only store/display messages destined for us.\n    devicestate.rx_text_message = mp;\n    devicestate.has_rx_text_message = true;\n    IF_SCREEN(\n        // Guard against running in MeshtasticUI or with no screen\n        if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {\n            // Store in the central message history\n            const StoredMessage &sm = messageStore.addFromPacket(mp);\n\n            // Pass message to renderer (banner + thread switching + scroll reset)\n            // Use the global Screen singleton to retrieve the current OLED display\n            auto *display = screen ? screen->getDisplayDevice() : nullptr;\n            graphics::MessageRenderer::handleNewMessage(display, sm, mp);\n        })\n    // Only trigger screen wake if configuration allows it\n    if (shouldWakeOnReceivedMessage()) {\n        powerFSM.trigger(EVENT_RECEIVED_MSG);\n    }\n\n    // Notify any observers (e.g. external modules that care about packets)\n    notifyObservers(&mp);\n\n    return ProcessMessage::CONTINUE; // Let others look at this message also if they want\n}\n\nbool TextMessageModule::wantPacket(const meshtastic_MeshPacket *p)\n{\n    return MeshService::isTextPayload(p);\n}\n\nbool TextMessageModule::recentlySeen(uint32_t id)\n{\n    for (size_t i = 0; i < TEXT_PACKET_LIST_SIZE; i++) {\n        if (textPacketList[i] != 0 && textPacketList[i] == id) {\n            return true;\n        }\n    }\n    return false;\n}"
  },
  {
    "path": "src/modules/TextMessageModule.h",
    "content": "#pragma once\n#include \"Observer.h\"\n#include \"SinglePortModule.h\"\n#define TEXT_PACKET_LIST_SIZE 50\n\n/**\n * Text message handling for Meshtastic.\n *\n * This module is responsible for receiving and storing incoming text messages\n * from the mesh. It updates device state and notifies observers so that other\n * components (such as the MessageRenderer) can later display or process them.\n *\n * Rendering of messages on screen is no longer done here.\n */\nclass TextMessageModule : public SinglePortModule, public Observable<const meshtastic_MeshPacket *>\n{\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    TextMessageModule() : SinglePortModule(\"text\", meshtastic_PortNum_TEXT_MESSAGE_APP) {}\n\n    bool recentlySeen(uint32_t id);\n\n  protected:\n    /** Called to handle a particular incoming message\n     *\n     * @return ProcessMessage::STOP if you've guaranteed you've handled this\n     *         message and no other handlers should be considered for it.\n     */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override;\n\n  private:\n    uint32_t textPacketList[TEXT_PACKET_LIST_SIZE] = {0};\n    size_t textPacketListIndex = 0;\n};\n\nextern TextMessageModule *textMessageModule;"
  },
  {
    "path": "src/modules/TraceRouteModule.cpp",
    "content": "#include \"TraceRouteModule.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"mesh/Router.h\"\n#include \"meshUtils.h\"\n#include <vector>\n\nextern graphics::Screen *screen;\n\nTraceRouteModule *traceRouteModule;\n\nvoid TraceRouteModule::setResultText(const String &text)\n{\n    resultText = text;\n    resultLines.clear();\n    resultLinesDirty = true;\n}\n\nvoid TraceRouteModule::clearResultLines()\n{\n    resultLines.clear();\n    resultLinesDirty = false;\n}\n#if HAS_SCREEN\nvoid TraceRouteModule::rebuildResultLines(OLEDDisplay *display)\n{\n    if (!display) {\n        resultLinesDirty = false;\n        return;\n    }\n\n    resultLines.clear();\n\n    if (resultText.length() == 0) {\n        resultLinesDirty = false;\n        return;\n    }\n\n    int maxWidth = display->getWidth() - 4;\n    if (maxWidth <= 0) {\n        resultLinesDirty = false;\n        return;\n    }\n\n    int start = 0;\n    int textLength = resultText.length();\n\n    while (start <= textLength) {\n        int newlinePos = resultText.indexOf('\\n', start);\n        String segment;\n\n        if (newlinePos != -1) {\n            segment = resultText.substring(start, newlinePos);\n            start = newlinePos + 1;\n        } else {\n            segment = resultText.substring(start);\n            start = textLength + 1;\n        }\n\n        if (segment.length() == 0) {\n            resultLines.push_back(\"\");\n            continue;\n        }\n\n        if (display->getStringWidth(segment) <= maxWidth) {\n            resultLines.push_back(segment);\n            continue;\n        }\n\n        String remaining = segment;\n\n        while (remaining.length() > 0) {\n            String tempLine = \"\";\n            int lastGoodBreak = -1;\n            bool lineComplete = false;\n\n            for (int i = 0; i < static_cast<int>(remaining.length()); i++) {\n                char ch = remaining.charAt(i);\n                String testLine = tempLine + ch;\n\n                if (display->getStringWidth(testLine) > maxWidth) {\n                    if (lastGoodBreak >= 0) {\n                        resultLines.push_back(remaining.substring(0, lastGoodBreak + 1));\n                        remaining = remaining.substring(lastGoodBreak + 1);\n                        lineComplete = true;\n                        break;\n                    } else if (tempLine.length() > 0) {\n                        resultLines.push_back(tempLine);\n                        remaining = remaining.substring(i);\n                        lineComplete = true;\n                        break;\n                    } else {\n                        resultLines.push_back(String(ch));\n                        remaining = remaining.substring(i + 1);\n                        lineComplete = true;\n                        break;\n                    }\n                } else {\n                    tempLine = testLine;\n                    if (ch == ' ' || ch == '>' || ch == '<' || ch == '-' || ch == '(' || ch == ')' || ch == ',') {\n                        lastGoodBreak = i;\n                    }\n                }\n            }\n\n            if (!lineComplete) {\n                if (tempLine.length() > 0) {\n                    resultLines.push_back(tempLine);\n                }\n                break;\n            }\n        }\n    }\n\n    resultLinesDirty = false;\n}\n#endif\n\nbool TraceRouteModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_RouteDiscovery *r)\n{\n    // We only alter the packet in alterReceivedProtobuf()\n    return false; // let it be handled by RoutingModule\n}\n\nvoid TraceRouteModule::alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r)\n{\n    const meshtastic_Data &incoming = p.decoded;\n\n    // Update next-hops using returned route\n    if (incoming.request_id) {\n        updateNextHops(p, r);\n    }\n\n    // Insert unknown hops if necessary\n    insertUnknownHops(p, r, !incoming.request_id);\n\n    // Append ID and SNR. If the last hop is to us, we only need to append the SNR\n    appendMyIDandSNR(r, p.rx_snr, !incoming.request_id, isToUs(&p));\n    if (!incoming.request_id)\n        printRoute(r, p.from, p.to, true);\n    else\n        printRoute(r, p.to, p.from, false);\n\n    // Set updated route to the payload of the to be flooded packet\n    p.decoded.payload.size =\n        pb_encode_to_bytes(p.decoded.payload.bytes, sizeof(p.decoded.payload.bytes), &meshtastic_RouteDiscovery_msg, r);\n\n    if (tracingNode != 0) {\n        // check isResponseFromTarget\n        bool isResponseFromTarget = (incoming.request_id != 0 && p.from == tracingNode);\n        bool isRequestToUs = (incoming.request_id == 0 && p.to == nodeDB->getNodeNum() && tracingNode != 0);\n\n        // Check if this is a trace route response containing our target node\n        bool containsTargetNode = false;\n        for (uint8_t i = 0; i < r->route_count; i++) {\n            if (r->route[i] == tracingNode) {\n                containsTargetNode = true;\n                break;\n            }\n        }\n        for (uint8_t i = 0; i < r->route_back_count; i++) {\n            if (r->route_back[i] == tracingNode) {\n                containsTargetNode = true;\n                break;\n            }\n        }\n\n        // Check if this response contains a complete route to our target\n        bool hasCompleteRoute = (r->route_count > 0 && r->route_back_count > 0) ||\n                                (containsTargetNode && (r->route_count > 0 || r->route_back_count > 0));\n\n        LOG_INFO(\"TracRoute packet analysis: tracingNode=0x%08x, p.from=0x%08x, p.to=0x%08x, request_id=0x%08x\", tracingNode,\n                 p.from, p.to, incoming.request_id);\n        LOG_INFO(\"TracRoute conditions: isResponseFromTarget=%d, isRequestToUs=%d, containsTargetNode=%d, hasCompleteRoute=%d\",\n                 isResponseFromTarget, isRequestToUs, containsTargetNode, hasCompleteRoute);\n\n        if (isResponseFromTarget || isRequestToUs || (containsTargetNode && hasCompleteRoute)) {\n            LOG_INFO(\"TracRoute result detected: isResponseFromTarget=%d, isRequestToUs=%d\", isResponseFromTarget, isRequestToUs);\n\n            LOG_INFO(\"SNR arrays - towards_count=%d, back_count=%d\", r->snr_towards_count, r->snr_back_count);\n            for (int i = 0; i < r->snr_towards_count; i++) {\n                LOG_INFO(\"SNR towards[%d] = %d (%.1fdB)\", i, r->snr_towards[i], (float)r->snr_towards[i] / 4.0f);\n            }\n            for (int i = 0; i < r->snr_back_count; i++) {\n                LOG_INFO(\"SNR back[%d] = %d (%.1fdB)\", i, r->snr_back[i], (float)r->snr_back[i] / 4.0f);\n            }\n\n            String result = \"\";\n\n            // Show request path (from initiator to target)\n            if (r->route_count > 0) {\n                result += getNodeName(nodeDB->getNodeNum());\n                for (uint8_t i = 0; i < r->route_count; i++) {\n                    result += \" > \";\n                    const char *name = getNodeName(r->route[i]);\n                    float snr =\n                        (i < r->snr_towards_count && r->snr_towards[i] != INT8_MIN) ? ((float)r->snr_towards[i] / 4.0f) : 0.0f;\n                    result += name;\n                    if (snr != 0.0f) {\n                        result += \"(\";\n                        result += String(snr, 1);\n                        result += \"dB)\";\n                    }\n                }\n                result += \" > \";\n                result += getNodeName(tracingNode);\n                if (r->snr_towards_count > 0 && r->snr_towards[r->snr_towards_count - 1] != INT8_MIN) {\n                    result += \"(\";\n                    result += String((float)r->snr_towards[r->snr_towards_count - 1] / 4.0f, 1);\n                    result += \"dB)\";\n                }\n                result += \"\\n\";\n            } else {\n                // Direct connection (no intermediate hops)\n                result += getNodeName(nodeDB->getNodeNum());\n                result += \" > \";\n                result += getNodeName(tracingNode);\n                if (r->snr_towards_count > 0 && r->snr_towards[0] != INT8_MIN) {\n                    result += \"(\";\n                    result += String((float)r->snr_towards[0] / 4.0f, 1);\n                    result += \"dB)\";\n                }\n                result += \"\\n\";\n            }\n\n            // Show response path (from target back to initiator)\n            if (r->route_back_count > 0) {\n                result += getNodeName(tracingNode);\n                for (int8_t i = r->route_back_count - 1; i >= 0; i--) {\n                    result += \" > \";\n                    const char *name = getNodeName(r->route_back[i]);\n                    float snr = (i < r->snr_back_count && r->snr_back[i] != INT8_MIN) ? ((float)r->snr_back[i] / 4.0f) : 0.0f;\n                    result += name;\n                    if (snr != 0.0f) {\n                        result += \"(\";\n                        result += String(snr, 1);\n                        result += \"dB)\";\n                    }\n                }\n                // add initiator node\n                result += \" > \";\n                result += getNodeName(nodeDB->getNodeNum());\n                if (r->snr_back_count > 0 && r->snr_back[r->snr_back_count - 1] != INT8_MIN) {\n                    result += \"(\";\n                    result += String((float)r->snr_back[r->snr_back_count - 1] / 4.0f, 1);\n                    result += \"dB)\";\n                }\n            } else {\n                // Direct return path (no intermediate hops)\n                result += getNodeName(tracingNode);\n                result += \" > \";\n                result += getNodeName(nodeDB->getNodeNum());\n                if (r->snr_back_count > 0 && r->snr_back[0] != INT8_MIN) {\n                    result += \"(\";\n                    result += String((float)r->snr_back[0] / 4.0f, 1);\n                    result += \"dB)\";\n                }\n            }\n\n            LOG_INFO(\"Trace route result: %s\", result.c_str());\n            handleTraceRouteResult(result);\n        }\n    }\n}\n\nvoid TraceRouteModule::updateNextHops(const meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r)\n{\n    // E.g. if the route is A->B->C->D and we are B, we can set C as next-hop for C and D\n    // Similarly, if we are C, we can set D as next-hop for D\n    // If we are A, we can set B as next-hop for B, C and D\n\n    // First check if we were the original sender or in the original route\n    int8_t nextHopIndex = -1;\n    if (isToUs(&p)) {\n        nextHopIndex = 0; // We are the original sender, next hop is first in route\n    } else {\n        // Check if we are in the original route\n        for (uint8_t i = 0; i < r->route_count; i++) {\n            if (r->route[i] == nodeDB->getNodeNum()) {\n                nextHopIndex = i + 1; // Next hop is the one after us\n                break;\n            }\n        }\n    }\n\n    // If we are in the original route, update the next hops\n    if (nextHopIndex != -1) {\n        // For every node after us, we can set the next-hop to the first node after us\n        NodeNum nextHop;\n        if (nextHopIndex == r->route_count) {\n            nextHop = p.from; // We are the last in the route, next hop is destination\n        } else {\n            nextHop = r->route[nextHopIndex];\n        }\n\n        if (nextHop == NODENUM_BROADCAST) {\n            return;\n        }\n        uint8_t nextHopByte = nodeDB->getLastByteOfNodeNum(nextHop);\n\n        // For the rest of the nodes in the route, set their next-hop\n        // Note: if we are the last in the route, this loop will not run\n        for (int8_t i = nextHopIndex; i < r->route_count; i++) {\n            NodeNum targetNode = r->route[i];\n            maybeSetNextHop(targetNode, nextHopByte);\n        }\n\n        // Also set next-hop for the destination node\n        maybeSetNextHop(p.from, nextHopByte);\n    }\n}\n\nvoid TraceRouteModule::maybeSetNextHop(NodeNum target, uint8_t nextHopByte)\n{\n    if (target == NODENUM_BROADCAST)\n        return;\n\n    meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(target);\n    if (node && node->next_hop != nextHopByte) {\n        LOG_INFO(\"Updating next-hop for 0x%08x to 0x%02x based on traceroute\", target, nextHopByte);\n        node->next_hop = nextHopByte;\n    }\n}\n\nvoid TraceRouteModule::processUpgradedPacket(const meshtastic_MeshPacket &mp)\n{\n    if (mp.which_payload_variant != meshtastic_MeshPacket_decoded_tag || mp.decoded.portnum != meshtastic_PortNum_TRACEROUTE_APP)\n        return;\n\n    meshtastic_RouteDiscovery decoded = meshtastic_RouteDiscovery_init_zero;\n    if (!pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_RouteDiscovery_msg, &decoded))\n        return;\n\n    handleReceivedProtobuf(mp, &decoded);\n    // Intentionally modify the packet in-place so downstream relays see our updates.\n    alterReceivedProtobuf(const_cast<meshtastic_MeshPacket &>(mp), &decoded);\n}\n\nvoid TraceRouteModule::insertUnknownHops(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r, bool isTowardsDestination)\n{\n    pb_size_t *route_count;\n    uint32_t *route;\n    pb_size_t *snr_count;\n    int8_t *snr_list;\n\n    // Pick the correct route array and SNR list\n    if (isTowardsDestination) {\n        route_count = &r->route_count;\n        route = r->route;\n        snr_count = &r->snr_towards_count;\n        snr_list = r->snr_towards;\n    } else {\n        route_count = &r->route_back_count;\n        route = r->route_back;\n        snr_count = &r->snr_back_count;\n        snr_list = r->snr_back;\n    }\n\n    // Only insert unknown hops if hop_start is valid\n    const int8_t hopsTaken = getHopsAway(p);\n    if (hopsTaken >= 0) {\n        int8_t diff = hopsTaken - *route_count;\n        for (int8_t i = 0; i < diff; i++) {\n            if (*route_count < ROUTE_SIZE) {\n                route[*route_count] = NODENUM_BROADCAST; // This will represent an unknown hop\n                *route_count += 1;\n            }\n        }\n        // Add unknown SNR values if necessary\n        diff = *route_count - *snr_count;\n        for (int8_t i = 0; i < diff; i++) {\n            if (*snr_count < ROUTE_SIZE) {\n                snr_list[*snr_count] = INT8_MIN; // This will represent an unknown SNR\n                *snr_count += 1;\n            }\n        }\n    }\n}\n\nvoid TraceRouteModule::appendMyIDandSNR(meshtastic_RouteDiscovery *updated, float snr, bool isTowardsDestination, bool SNRonly)\n{\n    pb_size_t *route_count;\n    uint32_t *route;\n    pb_size_t *snr_count;\n    int8_t *snr_list;\n\n    // Pick the correct route array and SNR list\n    if (isTowardsDestination) {\n        route_count = &updated->route_count;\n        route = updated->route;\n        snr_count = &updated->snr_towards_count;\n        snr_list = updated->snr_towards;\n    } else {\n        route_count = &updated->route_back_count;\n        route = updated->route_back;\n        snr_count = &updated->snr_back_count;\n        snr_list = updated->snr_back;\n    }\n\n    if (*snr_count < ROUTE_SIZE) {\n        snr_list[*snr_count] = (int8_t)(snr * 4); // Convert SNR to 1 byte\n        *snr_count += 1;\n    }\n    if (SNRonly)\n        return;\n\n    // Length of route array can normally not be exceeded due to the max. hop_limit of 7\n    if (*route_count < ROUTE_SIZE) {\n        route[*route_count] = myNodeInfo.my_node_num;\n        *route_count += 1;\n    } else {\n        LOG_WARN(\"Route exceeded maximum hop limit!\"); // Are you bridging networks?\n    }\n}\n\nvoid TraceRouteModule::printRoute(meshtastic_RouteDiscovery *r, uint32_t origin, uint32_t dest, bool isTowardsDestination)\n{\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n    std::string route = \"Route traced:\\n\";\n    route += vformat(\"0x%x --> \", origin);\n    for (uint8_t i = 0; i < r->route_count; i++) {\n        if (i < r->snr_towards_count && r->snr_towards[i] != INT8_MIN)\n            route += vformat(\"0x%x (%.2fdB) --> \", r->route[i], (float)r->snr_towards[i] / 4);\n        else\n            route += vformat(\"0x%x (?dB) --> \", r->route[i]);\n    }\n    // If we are the destination, or it has already reached the destination, print it\n    if (dest == nodeDB->getNodeNum() || !isTowardsDestination) {\n        if (r->snr_towards_count > 0 && r->snr_towards[r->snr_towards_count - 1] != INT8_MIN)\n            route += vformat(\"0x%x (%.2fdB)\", dest, (float)r->snr_towards[r->snr_towards_count - 1] / 4);\n\n        else\n            route += vformat(\"0x%x (?dB)\", dest);\n    } else\n        route += \"...\";\n\n    // If there's a route back (or we are the destination as then the route is complete), print it\n    if (r->route_back_count > 0 || origin == nodeDB->getNodeNum()) {\n        route += \"\\n\";\n        if (r->snr_towards_count > 0 && origin == nodeDB->getNodeNum())\n            route += vformat(\"(%.2fdB) 0x%x <-- \", (float)r->snr_back[r->snr_back_count - 1] / 4, origin);\n        else\n            route += \"...\";\n\n        for (int8_t i = r->route_back_count - 1; i >= 0; i--) {\n            if (i < r->snr_back_count && r->snr_back[i] != INT8_MIN)\n                route += vformat(\"(%.2fdB) 0x%x <-- \", (float)r->snr_back[i] / 4, r->route_back[i]);\n            else\n                route += vformat(\"(?dB) 0x%x <-- \", r->route_back[i]);\n        }\n        route += vformat(\"0x%x\", dest);\n    }\n    LOG_INFO(route.c_str());\n#endif\n}\n\nmeshtastic_MeshPacket *TraceRouteModule::allocReply()\n{\n    assert(currentRequest);\n\n    // Ignore multi-hop broadcast requests\n    if (isBroadcast(currentRequest->to) && currentRequest->hop_limit < currentRequest->hop_start) {\n        ignoreRequest = true;\n        return NULL;\n    }\n\n    // Copy the payload of the current request\n    auto req = *currentRequest;\n    const auto &p = req.decoded;\n    meshtastic_RouteDiscovery scratch;\n    meshtastic_RouteDiscovery *updated = NULL;\n    memset(&scratch, 0, sizeof(scratch));\n    pb_decode_from_bytes(p.payload.bytes, p.payload.size, &meshtastic_RouteDiscovery_msg, &scratch);\n    updated = &scratch;\n\n    // Create a MeshPacket with this payload and set it as the reply\n    meshtastic_MeshPacket *reply = allocDataProtobuf(*updated);\n\n    return reply;\n}\n\nTraceRouteModule::TraceRouteModule()\n    : ProtobufModule(\"traceroute\", meshtastic_PortNum_TRACEROUTE_APP, &meshtastic_RouteDiscovery_msg), OSThread(\"TraceRoute\")\n{\n    ourPortNum = meshtastic_PortNum_TRACEROUTE_APP;\n    isPromiscuous = true; // We need to update the route even if it is not destined to us\n}\n\nconst char *TraceRouteModule::getNodeName(NodeNum node)\n{\n    meshtastic_NodeInfoLite *info = nodeDB->getMeshNode(node);\n    if (info && info->has_user) {\n        if (strlen(info->user.short_name) > 0) {\n            return info->user.short_name;\n        }\n        if (strlen(info->user.long_name) > 0) {\n            return info->user.long_name;\n        }\n    }\n\n    static char fallback[12];\n    snprintf(fallback, sizeof(fallback), \"0x%08x\", node);\n    return fallback;\n}\n\nbool TraceRouteModule::startTraceRoute(NodeNum node)\n{\n    LOG_INFO(\"=== TraceRoute startTraceRoute CALLED: node=0x%08x ===\", node);\n    unsigned long now = millis();\n\n    if (node == 0 || node == NODENUM_BROADCAST) {\n        LOG_ERROR(\"Invalid node number for trace route: 0x%08x\", node);\n        runState = TRACEROUTE_STATE_RESULT;\n        setResultText(\"Invalid node\");\n        resultShowTime = millis();\n        tracingNode = 0;\n\n        requestFocus();\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        return false;\n    }\n\n    if (node == nodeDB->getNodeNum()) {\n        LOG_ERROR(\"Cannot trace route to self: 0x%08x\", node);\n        runState = TRACEROUTE_STATE_RESULT;\n        setResultText(\"Cannot trace self\");\n        resultShowTime = millis();\n        tracingNode = 0;\n\n        requestFocus();\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        return false;\n    }\n\n    if (!initialized) {\n        lastTraceRouteTime = 0;\n        initialized = true;\n        LOG_INFO(\"TraceRoute initialized for first time\");\n    }\n\n    if (runState == TRACEROUTE_STATE_TRACKING) {\n        LOG_INFO(\"TraceRoute already in progress\");\n        return false;\n    }\n\n    if (initialized && lastTraceRouteTime > 0 && now - lastTraceRouteTime < cooldownMs) {\n        // Cooldown\n        unsigned long wait = (cooldownMs - (now - lastTraceRouteTime)) / 1000;\n        bannerText = String(\"Wait for \") + String(wait) + String(\"s\");\n        runState = TRACEROUTE_STATE_COOLDOWN;\n        resultText = \"\";\n        clearResultLines();\n\n        requestFocus();\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        LOG_INFO(\"Cooldown active, please wait %lu seconds before starting a new trace route.\", wait);\n        return false;\n    }\n\n    tracingNode = node;\n    lastTraceRouteTime = now;\n    runState = TRACEROUTE_STATE_TRACKING;\n    resultText = \"\";\n    clearResultLines();\n    bannerText = String(\"Tracing \") + getNodeName(node);\n\n    LOG_INFO(\"TraceRoute UI: Starting trace route to node 0x%08x, requesting focus\", node);\n\n    // 请求焦点，然后触发UI更新事件\n    requestFocus();\n    UIFrameEvent e;\n    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n    notifyObservers(&e);\n\n    // 设置定时器来处理超时检查\n    setIntervalFromNow(1000); // 每秒检查一次状态\n\n    meshtastic_RouteDiscovery req = meshtastic_RouteDiscovery_init_zero;\n    LOG_INFO(\"Creating RouteDiscovery protobuf...\");\n\n    // Allocate a packet directly from router like the reference code\n    meshtastic_MeshPacket *p = router->allocForSending();\n    if (p) {\n        // Set destination and port\n        p->to = node;\n        p->decoded.portnum = meshtastic_PortNum_TRACEROUTE_APP;\n        p->decoded.want_response = true;\n\n        // Use reliable delivery for traceroute requests (which will be copied to traceroute responses by setReplyTo)\n        p->want_ack = true;\n\n        // Manually encode the RouteDiscovery payload\n        p->decoded.payload.size =\n            pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_RouteDiscovery_msg, &req);\n\n        LOG_INFO(\"Packet allocated successfully: to=0x%08x, portnum=%d, want_response=%d, payload_size=%d\", p->to,\n                 p->decoded.portnum, p->decoded.want_response, p->decoded.payload.size);\n        LOG_INFO(\"About to call service->sendToMesh...\");\n\n        if (service) {\n            LOG_INFO(\"MeshService is available, sending packet...\");\n            service->sendToMesh(p, RX_SRC_USER);\n            LOG_INFO(\"sendToMesh called successfully for trace route to node 0x%08x\", node);\n        } else {\n            LOG_ERROR(\"MeshService is NULL!\");\n            runState = TRACEROUTE_STATE_RESULT;\n            setResultText(\"Service unavailable\");\n            resultShowTime = millis();\n            tracingNode = 0;\n\n            requestFocus();\n            UIFrameEvent e2;\n            e2.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            notifyObservers(&e2);\n            return false;\n        }\n    } else {\n        LOG_ERROR(\"Failed to allocate TraceRoute packet from router\");\n        runState = TRACEROUTE_STATE_RESULT;\n        setResultText(\"Failed to send\");\n        resultShowTime = millis();\n        tracingNode = 0;\n\n        requestFocus();\n        UIFrameEvent e2;\n        e2.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e2);\n        return false;\n    }\n    return true;\n}\n\nvoid TraceRouteModule::launch(NodeNum node)\n{\n    if (node == 0 || node == NODENUM_BROADCAST) {\n        LOG_ERROR(\"Invalid node number for trace route: 0x%08x\", node);\n        runState = TRACEROUTE_STATE_RESULT;\n        setResultText(\"Invalid node\");\n        resultShowTime = millis();\n        tracingNode = 0;\n\n        requestFocus();\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        return;\n    }\n\n    if (node == nodeDB->getNodeNum()) {\n        LOG_ERROR(\"Cannot trace route to self: 0x%08x\", node);\n        runState = TRACEROUTE_STATE_RESULT;\n        setResultText(\"Cannot trace self\");\n        resultShowTime = millis();\n        tracingNode = 0;\n\n        requestFocus();\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        return;\n    }\n\n    if (!initialized) {\n        lastTraceRouteTime = 0;\n        initialized = true;\n        LOG_INFO(\"TraceRoute initialized for first time\");\n    }\n\n    unsigned long now = millis();\n    if (initialized && lastTraceRouteTime > 0 && now - lastTraceRouteTime < cooldownMs) {\n        unsigned long wait = (cooldownMs - (now - lastTraceRouteTime)) / 1000;\n        bannerText = String(\"Wait for \") + String(wait) + String(\"s\");\n        runState = TRACEROUTE_STATE_COOLDOWN;\n        resultText = \"\";\n        clearResultLines();\n\n        requestFocus();\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n        LOG_INFO(\"Cooldown active, please wait %lu seconds before starting a new trace route.\", wait);\n        return;\n    }\n\n    runState = TRACEROUTE_STATE_TRACKING;\n    tracingNode = node;\n    lastTraceRouteTime = now;\n    resultText = \"\";\n    clearResultLines();\n    bannerText = String(\"Tracing \") + getNodeName(node);\n\n    requestFocus();\n\n    UIFrameEvent e;\n    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n    notifyObservers(&e);\n\n    setIntervalFromNow(1000);\n\n    meshtastic_RouteDiscovery req = meshtastic_RouteDiscovery_init_zero;\n    LOG_INFO(\"Creating RouteDiscovery protobuf...\");\n\n    meshtastic_MeshPacket *p = router->allocForSending();\n    if (p) {\n        p->to = node;\n        p->decoded.portnum = meshtastic_PortNum_TRACEROUTE_APP;\n        p->decoded.want_response = true;\n\n        // Use reliable delivery for traceroute requests (which will be copied to traceroute responses by setReplyTo)\n        p->want_ack = true;\n\n        p->decoded.payload.size =\n            pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_RouteDiscovery_msg, &req);\n\n        LOG_INFO(\"Packet allocated successfully: to=0x%08x, portnum=%d, want_response=%d, payload_size=%d\", p->to,\n                 p->decoded.portnum, p->decoded.want_response, p->decoded.payload.size);\n\n        if (service) {\n            service->sendToMesh(p, RX_SRC_USER);\n            LOG_INFO(\"sendToMesh called successfully for trace route to node 0x%08x\", node);\n        } else {\n            LOG_ERROR(\"MeshService is NULL!\");\n            runState = TRACEROUTE_STATE_RESULT;\n            setResultText(\"Service unavailable\");\n            resultShowTime = millis();\n            tracingNode = 0;\n        }\n    } else {\n        LOG_ERROR(\"Failed to allocate TraceRoute packet from router\");\n        runState = TRACEROUTE_STATE_RESULT;\n        setResultText(\"Failed to send\");\n        resultShowTime = millis();\n        tracingNode = 0;\n    }\n}\n\nvoid TraceRouteModule::handleTraceRouteResult(const String &result)\n{\n    setResultText(result);\n    runState = TRACEROUTE_STATE_RESULT;\n    resultShowTime = millis();\n    tracingNode = 0;\n\n    LOG_INFO(\"TraceRoute result ready, requesting focus. Result: %s\", result.c_str());\n\n    setIntervalFromNow(1000);\n\n    requestFocus();\n    UIFrameEvent e;\n    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n    notifyObservers(&e);\n\n    LOG_INFO(\"=== TraceRoute handleTraceRouteResult END ===\");\n}\n\nbool TraceRouteModule::shouldDraw()\n{\n    bool draw = (runState != TRACEROUTE_STATE_IDLE);\n    static TraceRouteRunState lastLoggedState = TRACEROUTE_STATE_IDLE;\n    if (runState != lastLoggedState) {\n        LOG_INFO(\"TraceRoute shouldDraw: runState=%d, draw=%d\", runState, draw);\n        lastLoggedState = runState;\n    }\n    return draw;\n}\n#if HAS_SCREEN\nvoid TraceRouteModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    LOG_DEBUG(\"TraceRoute drawFrame called: runState=%d\", runState);\n\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n\n    if (runState == TRACEROUTE_STATE_TRACKING) {\n        display->setFont(FONT_MEDIUM);\n        int centerY = y + (display->getHeight() / 2) - (FONT_HEIGHT_MEDIUM / 2);\n        display->drawString(display->getWidth() / 2 + x, centerY, bannerText);\n\n    } else if (runState == TRACEROUTE_STATE_RESULT) {\n        display->setFont(FONT_MEDIUM);\n        display->setTextAlignment(TEXT_ALIGN_LEFT);\n\n        display->drawString(x, y, \"Route Result\");\n\n        int contentStartY = y + FONT_HEIGHT_MEDIUM + 2; // Add more spacing after title\n        display->setTextAlignment(TEXT_ALIGN_LEFT);\n        display->setFont(FONT_SMALL);\n\n        if (resultText.length() > 0) {\n            if (resultLinesDirty) {\n                rebuildResultLines(display);\n            }\n\n            int lineHeight = FONT_HEIGHT_SMALL + 1; // Use proper font height with 1px spacing\n            for (size_t i = 0; i < resultLines.size(); i++) {\n                int lineY = contentStartY + (i * lineHeight);\n                if (lineY + FONT_HEIGHT_SMALL <= display->getHeight()) {\n                    display->drawString(x + 2, lineY, resultLines[i]);\n                }\n            }\n        }\n\n    } else if (runState == TRACEROUTE_STATE_COOLDOWN) {\n        display->setFont(FONT_MEDIUM);\n        int centerY = y + (display->getHeight() / 2) - (FONT_HEIGHT_MEDIUM / 2);\n        display->drawString(display->getWidth() / 2 + x, centerY, bannerText);\n    }\n}\n#endif // HAS_SCREEN\nint32_t TraceRouteModule::runOnce()\n{\n    unsigned long now = millis();\n\n    if (runState == TRACEROUTE_STATE_IDLE) {\n        return INT32_MAX;\n    }\n\n    // Check for tracking timeout\n    if (runState == TRACEROUTE_STATE_TRACKING && now - lastTraceRouteTime > trackingTimeoutMs) {\n        LOG_INFO(\"TraceRoute timeout, no response received\");\n        runState = TRACEROUTE_STATE_RESULT;\n        setResultText(\"No response received\");\n        resultShowTime = now;\n        tracingNode = 0;\n\n        requestFocus();\n        UIFrameEvent e;\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n        notifyObservers(&e);\n\n        setIntervalFromNow(resultDisplayMs);\n        return resultDisplayMs;\n    }\n\n    // Update cooldown display every second\n    if (runState == TRACEROUTE_STATE_COOLDOWN) {\n        unsigned long wait = (cooldownMs - (now - lastTraceRouteTime)) / 1000;\n        if (wait > 0) {\n            String newBannerText = String(\"Wait for \") + String(wait) + String(\"s\");\n            bannerText = newBannerText;\n            LOG_INFO(\"TraceRoute cooldown: updating banner to %s\", bannerText.c_str());\n\n            // Force flash UI\n            requestFocus();\n            UIFrameEvent e;\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            notifyObservers(&e);\n\n            if (screen) {\n                screen->forceDisplay();\n            }\n\n            return 1000;\n        } else {\n            // Cooldown finished\n            LOG_INFO(\"TraceRoute cooldown finished, returning to IDLE\");\n            runState = TRACEROUTE_STATE_IDLE;\n            resultText = \"\";\n            clearResultLines();\n            bannerText = \"\";\n            UIFrameEvent e;\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            notifyObservers(&e);\n            return INT32_MAX;\n        }\n    }\n\n    if (runState == TRACEROUTE_STATE_RESULT) {\n        if (now - resultShowTime >= resultDisplayMs) {\n            LOG_INFO(\"TraceRoute result display timeout, returning to IDLE\");\n            runState = TRACEROUTE_STATE_IDLE;\n            resultText = \"\";\n            clearResultLines();\n            bannerText = \"\";\n            tracingNode = 0;\n            UIFrameEvent e;\n            e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n            notifyObservers(&e);\n            return INT32_MAX;\n        } else {\n            return 1000;\n        }\n    }\n\n    if (runState == TRACEROUTE_STATE_TRACKING) {\n        return 1000;\n    }\n\n    return INT32_MAX;\n}\n"
  },
  {
    "path": "src/modules/TraceRouteModule.h",
    "content": "#pragma once\n#include \"ProtobufModule.h\"\n#include \"concurrency/OSThread.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"input/InputBroker.h\"\n#if HAS_SCREEN\n#include \"OLEDDisplayUi.h\"\n#endif\n#include <vector>\n\n#define ROUTE_SIZE sizeof(((meshtastic_RouteDiscovery *)0)->route) / sizeof(((meshtastic_RouteDiscovery *)0)->route[0])\n\n/**\n * A module that traces the route to a certain destination node\n */\nenum TraceRouteRunState { TRACEROUTE_STATE_IDLE, TRACEROUTE_STATE_TRACKING, TRACEROUTE_STATE_RESULT, TRACEROUTE_STATE_COOLDOWN };\n\nclass TraceRouteModule : public ProtobufModule<meshtastic_RouteDiscovery>,\n                         public Observable<const UIFrameEvent *>,\n                         private concurrency::OSThread\n{\n  public:\n    TraceRouteModule();\n\n    bool startTraceRoute(NodeNum node);\n    void launch(NodeNum node);\n    void handleTraceRouteResult(const String &result);\n    bool shouldDraw();\n#if HAS_SCREEN\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n\n    const char *getNodeName(NodeNum node);\n\n    virtual bool wantUIFrame() override { return shouldDraw(); }\n    virtual Observable<const UIFrameEvent *> *getUIFrameObservable() override { return this; }\n\n    void processUpgradedPacket(const meshtastic_MeshPacket &mp);\n\n  protected:\n    bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_RouteDiscovery *r) override;\n\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n    /* Called before rebroadcasting a RouteDiscovery payload in order to update\n       the route array containing the IDs of nodes this packet went through */\n    void alterReceivedProtobuf(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r) override;\n\n    virtual int32_t runOnce() override;\n\n  private:\n    void setResultText(const String &text);\n    void clearResultLines();\n#if HAS_SCREEN\n    void rebuildResultLines(OLEDDisplay *display);\n#endif\n    // Call to add unknown hops (e.g. when a node couldn't decrypt it) to the route based on hopStart and current hopLimit\n    void insertUnknownHops(meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r, bool isTowardsDestination);\n\n    // Call to add your ID to the route array of a RouteDiscovery message\n    void appendMyIDandSNR(meshtastic_RouteDiscovery *r, float snr, bool isTowardsDestination, bool SNRonly);\n\n    // Update next-hops in the routing table based on the returned route\n    void updateNextHops(const meshtastic_MeshPacket &p, meshtastic_RouteDiscovery *r);\n\n    // Helper to update next-hop for a single node\n    void maybeSetNextHop(NodeNum target, uint8_t nextHopByte);\n\n    /* Call to print the route array of a RouteDiscovery message.\n       Set origin to where the request came from.\n       Set dest to the ID of its destination, or NODENUM_BROADCAST if it has not yet arrived there. */\n    void printRoute(meshtastic_RouteDiscovery *r, uint32_t origin, uint32_t dest, bool isTowardsDestination);\n\n    TraceRouteRunState runState = TRACEROUTE_STATE_IDLE;\n    unsigned long lastTraceRouteTime = 0;\n    unsigned long resultShowTime = 0;\n    unsigned long cooldownMs = 30000;\n    unsigned long resultDisplayMs = 10000;\n    unsigned long trackingTimeoutMs = 10000;\n    String bannerText;\n    String resultText;\n    std::vector<String> resultLines;\n    bool resultLinesDirty = false;\n    NodeNum tracingNode = 0;\n    bool initialized = false;\n};\n\nextern TraceRouteModule *traceRouteModule;\n"
  },
  {
    "path": "src/modules/TrafficManagementModule.cpp",
    "content": "#include \"TrafficManagementModule.h\"\n\n#if HAS_TRAFFIC_MANAGEMENT\n\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"Router.h\"\n#include \"TypeConversions.h\"\n#include \"concurrency/LockGuard.h\"\n#include \"configuration.h\"\n#include \"mesh-pb-constants.h\"\n#include \"meshUtils.h\"\n#include <Arduino.h>\n#include <cstring>\n\n#define TM_LOG_DEBUG(fmt, ...) LOG_DEBUG(\"[TM] \" fmt, ##__VA_ARGS__)\n#define TM_LOG_INFO(fmt, ...) LOG_INFO(\"[TM] \" fmt, ##__VA_ARGS__)\n#define TM_LOG_WARN(fmt, ...) LOG_WARN(\"[TM] \" fmt, ##__VA_ARGS__)\n\n// =============================================================================\n// Anonymous Namespace - Internal Helpers\n// =============================================================================\n\nnamespace\n{\n\nconstexpr uint32_t kMaintenanceIntervalMs = 60 * 1000UL; // Cache cleanup interval\nconstexpr uint32_t kUnknownResetMs = 60 * 1000UL;        // Unknown packet window\nconstexpr uint8_t kMaxCuckooKicks = 16;                  // Max displacement chain length\n\n// NodeInfo direct response: enforced maximum hops by device role\n// Both use maxHops logic (respond when hopsAway <= threshold)\n// Config value is clamped to these role-based limits\n// Note: nodeinfo_direct_response must also be enabled for this to take effect\nconstexpr uint32_t kRouterDefaultMaxHops = 3; // Routers: max 3 hops (can set lower via config)\nconstexpr uint32_t kClientDefaultMaxHops = 0; // Clients: direct only (cannot increase)\n\n/**\n * Convert seconds to milliseconds with overflow protection.\n */\nuint32_t secsToMs(uint32_t secs)\n{\n    uint64_t ms = static_cast<uint64_t>(secs) * 1000ULL;\n    if (ms > UINT32_MAX)\n        return UINT32_MAX;\n    return static_cast<uint32_t>(ms);\n}\n\n/**\n * Clamp precision to a valid dedup range.\n * Invalid values use the module default precision.\n */\nuint8_t sanitizePositionPrecision(uint8_t precision)\n{\n    if (precision > 0 && precision <= 32)\n        return precision;\n\n    const uint8_t defaultPrecision = static_cast<uint8_t>(default_traffic_mgmt_position_precision_bits);\n    if (defaultPrecision > 0 && defaultPrecision <= 32)\n        return defaultPrecision;\n\n    // Someone done messed up if we reach here\n    return 32;\n}\n\n/**\n * Check if a timestamp is within a time window.\n * Handles wrap-around correctly using unsigned subtraction.\n */\nbool isWithinWindow(uint32_t nowMs, uint32_t startMs, uint32_t intervalMs)\n{\n    if (intervalMs == 0 || startMs == 0)\n        return false;\n    return (nowMs - startMs) < intervalMs;\n}\n\n/**\n * Truncate lat/lon to specified precision for position deduplication.\n *\n * The truncation works by masking off lower bits and rounding to the center\n * of the resulting grid cell. This creates a stable truncated value even\n * when GPS jitter causes small coordinate changes.\n *\n * @param value     Raw latitude_i or longitude_i from position\n * @param precision Number of significant bits to keep (0-32)\n * @return          Truncated and centered coordinate value\n */\nint32_t truncateLatLon(int32_t value, uint8_t precision)\n{\n    if (precision == 0 || precision >= 32)\n        return value;\n\n    // Create mask to zero out lower bits\n    uint32_t mask = UINT32_MAX << (32 - precision);\n    uint32_t truncated = static_cast<uint32_t>(value) & mask;\n\n    // Add half the truncation step to center in the grid cell\n    truncated += (1u << (31 - precision));\n    return static_cast<int32_t>(truncated);\n}\n\n/**\n * Saturating increment for uint8_t counters.\n * Prevents overflow by capping at UINT8_MAX (255).\n */\ninline void saturatingIncrement(uint8_t &counter)\n{\n    if (counter < UINT8_MAX)\n        counter++;\n}\n\n/**\n * Return a short human-readable name for common port numbers.\n * Falls back to \"port:<N>\" for unknown ports.\n */\nconst char *portName(int portnum)\n{\n    switch (portnum) {\n    case meshtastic_PortNum_TEXT_MESSAGE_APP:\n        return \"text\";\n    case meshtastic_PortNum_POSITION_APP:\n        return \"position\";\n    case meshtastic_PortNum_NODEINFO_APP:\n        return \"nodeinfo\";\n    case meshtastic_PortNum_ROUTING_APP:\n        return \"routing\";\n    case meshtastic_PortNum_ADMIN_APP:\n        return \"admin\";\n    case meshtastic_PortNum_TELEMETRY_APP:\n        return \"telemetry\";\n    case meshtastic_PortNum_TRACEROUTE_APP:\n        return \"traceroute\";\n    case meshtastic_PortNum_NEIGHBORINFO_APP:\n        return \"neighborinfo\";\n    case meshtastic_PortNum_STORE_FORWARD_APP:\n        return \"store-forward\";\n    case meshtastic_PortNum_WAYPOINT_APP:\n        return \"waypoint\";\n    default:\n        return nullptr;\n    }\n}\n\n} // namespace\n\n// =============================================================================\n// Module Instance\n// =============================================================================\n\nTrafficManagementModule *trafficManagementModule;\n\n// =============================================================================\n// Constructor\n// =============================================================================\n\nTrafficManagementModule::TrafficManagementModule() : MeshModule(\"TrafficManagement\"), concurrency::OSThread(\"TrafficManagement\")\n{\n    // Module configuration\n    isPromiscuous = true; // See all packets, not just those addressed to us\n    encryptedOk = true;   // Can process encrypted packets\n    stats = meshtastic_TrafficManagementStats_init_zero;\n\n    // Initialize rolling epoch for relative timestamps\n    cacheEpochMs = millis();\n\n    // Calculate adaptive time resolutions from config (config changes require reboot)\n    // Resolution = max(60, min(339, interval/2)) for ~24 hour range with good precision\n    posTimeResolution = calcTimeResolution(Default::getConfiguredOrDefault(\n        moduleConfig.traffic_management.position_min_interval_secs, default_traffic_mgmt_position_min_interval_secs));\n    rateTimeResolution = calcTimeResolution(moduleConfig.traffic_management.rate_limit_window_secs);\n    unknownTimeResolution = calcTimeResolution(kUnknownResetMs / 1000); // ~5 min default\n\n    const auto &cfg = moduleConfig.traffic_management;\n    TM_LOG_INFO(\"Enabled: pos_dedup=%d nodeinfo_resp=%d rate_limit=%d drop_unknown=%d exhaust_telem=%d exhaust_pos=%d \"\n                \"preserve_hops=%d\",\n                cfg.position_dedup_enabled, cfg.nodeinfo_direct_response, cfg.rate_limit_enabled, cfg.drop_unknown_enabled,\n                cfg.exhaust_hop_telemetry, cfg.exhaust_hop_position, cfg.router_preserve_hops);\n    TM_LOG_DEBUG(\"Time resolutions: pos=%us, rate=%us, unknown=%us\", posTimeResolution, rateTimeResolution,\n                 unknownTimeResolution);\n\n// Allocate unified cache (10 bytes/entry for all platforms)\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE > 0\n    const uint16_t allocSize = cacheSize();\n    TM_LOG_INFO(\"Allocating unified cache: %u entries (%u bytes)\", allocSize,\n                static_cast<unsigned>(allocSize * sizeof(UnifiedCacheEntry)));\n\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    // ESP32 with PSRAM: prefer PSRAM for large allocations\n    cache = static_cast<UnifiedCacheEntry *>(ps_calloc(allocSize, sizeof(UnifiedCacheEntry)));\n    if (cache) {\n        cacheFromPsram = true;\n    } else {\n        TM_LOG_WARN(\"PSRAM allocation failed, falling back to heap\");\n        cache = new UnifiedCacheEntry[allocSize]();\n    }\n#else\n    // All other platforms: heap allocation\n    cache = new UnifiedCacheEntry[allocSize]();\n#endif\n\n#endif // TRAFFIC_MANAGEMENT_CACHE_SIZE > 0\n\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    TM_LOG_INFO(\"Allocating NodeInfo cache: target=%u occupancy=%u%% payload=%u bytes (PSRAM) tags=%u bytes (%u-bit, %u slots, \"\n                \"%u buckets x %u)\",\n                static_cast<unsigned>(nodeInfoTargetEntries()), static_cast<unsigned>(nodeInfoTargetOccupancyPercent()),\n                static_cast<unsigned>(nodeInfoTargetEntries() * sizeof(NodeInfoPayloadEntry)),\n                static_cast<unsigned>(nodeInfoIndexMetadataBudgetBytes()), static_cast<unsigned>(nodeInfoTagBits()),\n                static_cast<unsigned>(nodeInfoIndexSlots()), static_cast<unsigned>(nodeInfoBucketCount()),\n                static_cast<unsigned>(nodeInfoBucketSize()));\n\n    nodeInfoIndex = static_cast<uint8_t *>(calloc(nodeInfoIndexMetadataBudgetBytes(), sizeof(uint8_t)));\n    if (!nodeInfoIndex) {\n        TM_LOG_WARN(\"NodeInfo index allocation failed; direct responses will fall back to NodeDB\");\n    } else {\n        nodeInfoPayload = static_cast<NodeInfoPayloadEntry *>(ps_calloc(nodeInfoTargetEntries(), sizeof(NodeInfoPayloadEntry)));\n        if (nodeInfoPayload) {\n            nodeInfoPayloadFromPsram = true;\n            TM_LOG_INFO(\"NodeInfo bucketed cuckoo cache ready\");\n        } else {\n            TM_LOG_WARN(\"NodeInfo PSRAM payload allocation failed; direct responses will fall back to NodeDB\");\n            free(nodeInfoIndex);\n            nodeInfoIndex = nullptr;\n        }\n    }\n#else\n    TM_LOG_DEBUG(\"NodeInfo PSRAM cache not available on this target\");\n#endif\n\n    setIntervalFromNow(kMaintenanceIntervalMs);\n}\n\n// Cache may have been allocated via ps_calloc (PSRAM, C allocator) or new[] (heap).\n// Must use the matching deallocator: free() for ps_calloc, delete[] for new[].\nTrafficManagementModule::~TrafficManagementModule()\n{\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE > 0\n    if (cache) {\n        // Cache may be from ps_calloc (PSRAM, C allocator) or new[] (heap).\n        // Use the matching deallocator for the allocation source.\n        if (cacheFromPsram)\n            free(cache);\n        else\n            delete[] cache;\n        cache = nullptr;\n    }\n#endif\n\n    if (nodeInfoPayload) {\n        if (nodeInfoPayloadFromPsram)\n            free(nodeInfoPayload);\n        else\n            delete[] nodeInfoPayload;\n        nodeInfoPayload = nullptr;\n    }\n\n    if (nodeInfoIndex) {\n        free(nodeInfoIndex);\n        nodeInfoIndex = nullptr;\n    }\n}\n\n// =============================================================================\n// Statistics\n// =============================================================================\n\nmeshtastic_TrafficManagementStats TrafficManagementModule::getStats() const\n{\n    concurrency::LockGuard guard(&cacheLock);\n    return stats;\n}\n\nvoid TrafficManagementModule::resetStats()\n{\n    concurrency::LockGuard guard(&cacheLock);\n    stats = meshtastic_TrafficManagementStats_init_zero;\n}\n\nvoid TrafficManagementModule::recordRouterHopPreserved()\n{\n    if (!moduleConfig.has_traffic_management || !moduleConfig.traffic_management.enabled)\n        return;\n    incrementStat(&stats.router_hops_preserved);\n}\n\nvoid TrafficManagementModule::incrementStat(uint32_t *field)\n{\n    concurrency::LockGuard guard(&cacheLock);\n    (*field)++;\n}\n\n// =============================================================================\n// Cuckoo Hash Table Operations\n// =============================================================================\n\n/**\n * Find an existing entry for the given node.\n *\n * Cuckoo hashing guarantees that if an entry exists, it's in one of exactly\n * two locations: hash1(node) or hash2(node). This provides O(1) lookup.\n *\n * @param node NodeNum to search for\n * @return     Pointer to entry if found, nullptr otherwise\n */\nTrafficManagementModule::UnifiedCacheEntry *TrafficManagementModule::findEntry(NodeNum node)\n{\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE == 0\n    (void)node;\n    return nullptr;\n#else\n    if (!cache || node == 0)\n        return nullptr;\n\n    // Check primary location\n    uint16_t h1 = cuckooHash1(node);\n    if (cache[h1].node == node)\n        return &cache[h1];\n\n    // Check alternate location\n    uint16_t h2 = cuckooHash2(node);\n    if (cache[h2].node == node)\n        return &cache[h2];\n\n    return nullptr;\n#endif\n}\n\n/**\n * Find or create an entry for the given node using cuckoo hashing.\n *\n * If the node exists, returns the existing entry. Otherwise, attempts to\n * insert a new entry using cuckoo displacement:\n *\n * 1. Try to insert at h1(node) - if empty, done\n * 2. Try to insert at h2(node) - if empty, done\n * 3. Kick existing entry from h1 to its alternate location\n * 4. Repeat up to kMaxCuckooKicks times\n * 5. If cycle detected or max kicks exceeded, evict oldest entry\n *\n * @param node  NodeNum to find or create\n * @param isNew Set to true if a new entry was created\n * @return      Pointer to entry, or nullptr if allocation failed\n */\nTrafficManagementModule::UnifiedCacheEntry *TrafficManagementModule::findOrCreateEntry(NodeNum node, bool *isNew)\n{\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE == 0\n    (void)node;\n    if (isNew)\n        *isNew = false;\n    return nullptr;\n#else\n    if (!cache || node == 0) {\n        if (isNew)\n            *isNew = false;\n        return nullptr;\n    }\n\n    // Check if entry already exists (O(1) lookup)\n    uint16_t h1 = cuckooHash1(node);\n    if (cache[h1].node == node) {\n        if (isNew)\n            *isNew = false;\n        return &cache[h1];\n    }\n\n    uint16_t h2 = cuckooHash2(node);\n    if (cache[h2].node == node) {\n        if (isNew)\n            *isNew = false;\n        return &cache[h2];\n    }\n\n    // Entry doesn't exist - try to insert\n\n    // Prefer empty slot at h1\n    if (cache[h1].node == 0) {\n        memset(&cache[h1], 0, sizeof(UnifiedCacheEntry));\n        cache[h1].node = node;\n        if (isNew)\n            *isNew = true;\n        return &cache[h1];\n    }\n\n    // Try empty slot at h2\n    if (cache[h2].node == 0) {\n        memset(&cache[h2], 0, sizeof(UnifiedCacheEntry));\n        cache[h2].node = node;\n        if (isNew)\n            *isNew = true;\n        return &cache[h2];\n    }\n\n    // Both slots occupied - perform cuckoo displacement\n    // Start by kicking entry at h1 to its alternate location\n    UnifiedCacheEntry displaced = cache[h1];\n    memset(&cache[h1], 0, sizeof(UnifiedCacheEntry));\n    cache[h1].node = node;\n\n    for (uint8_t kicks = 0; kicks < kMaxCuckooKicks; kicks++) {\n        // Find alternate location for displaced entry\n        uint16_t altH1 = cuckooHash1(displaced.node);\n        uint16_t altH2 = cuckooHash2(displaced.node);\n        uint16_t altSlot = (altH1 == h1) ? altH2 : altH1;\n\n        if (cache[altSlot].node == 0) {\n            // Found empty slot - insert displaced entry\n            cache[altSlot] = displaced;\n            if (isNew)\n                *isNew = true;\n            return &cache[h1];\n        }\n\n        // Kick entry from alternate slot\n        UnifiedCacheEntry temp = cache[altSlot];\n        cache[altSlot] = displaced;\n        displaced = temp;\n        h1 = altSlot;\n    }\n\n    // Cuckoo cycle detected or max kicks exceeded.\n    // The displaced entry has no valid cuckoo slot — drop it to preserve cache integrity.\n    // Placing it at an arbitrary slot would make it unreachable by findEntry().\n    TM_LOG_DEBUG(\"Cuckoo cycle, evicting node 0x%08x\", displaced.node);\n\n    if (isNew)\n        *isNew = true;\n    return &cache[cuckooHash1(node)];\n#endif\n}\n\nconst TrafficManagementModule::NodeInfoPayloadEntry *TrafficManagementModule::findNodeInfoEntry(NodeNum node) const\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoPayload || !nodeInfoIndex || node == 0)\n        return nullptr;\n\n    uint16_t payloadIndex = findNodeInfoPayloadIndex(node);\n    if (payloadIndex >= nodeInfoTargetEntries())\n        return nullptr;\n\n    return &nodeInfoPayload[payloadIndex];\n#else\n    (void)node;\n    return nullptr;\n#endif\n}\n\nuint16_t TrafficManagementModule::encodeNodeInfoTag(uint16_t payloadIndex) const\n{\n    if (payloadIndex >= nodeInfoTargetEntries())\n        return 0;\n    return static_cast<uint16_t>(payloadIndex + 1u);\n}\n\nuint16_t TrafficManagementModule::decodeNodeInfoPayloadIndex(uint16_t tag) const\n{\n    if (tag == 0 || tag > nodeInfoTargetEntries())\n        return UINT16_MAX;\n    return static_cast<uint16_t>(tag - 1u);\n}\n\nuint16_t TrafficManagementModule::getNodeInfoTag(uint16_t slot) const\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoIndex || slot >= nodeInfoIndexSlots())\n        return 0;\n\n    const uint32_t bitOffset = static_cast<uint32_t>(slot) * nodeInfoTagBits();\n    const uint16_t byteOffset = static_cast<uint16_t>(bitOffset >> 3);\n    const uint8_t shift = static_cast<uint8_t>(bitOffset & 7u);\n    uint32_t packed = 0;\n\n    if (byteOffset < nodeInfoIndexMetadataBudgetBytes())\n        packed |= static_cast<uint32_t>(nodeInfoIndex[byteOffset]);\n    if (static_cast<uint16_t>(byteOffset + 1u) < nodeInfoIndexMetadataBudgetBytes())\n        packed |= static_cast<uint32_t>(nodeInfoIndex[byteOffset + 1u]) << 8;\n    if (static_cast<uint16_t>(byteOffset + 2u) < nodeInfoIndexMetadataBudgetBytes())\n        packed |= static_cast<uint32_t>(nodeInfoIndex[byteOffset + 2u]) << 16;\n\n    return static_cast<uint16_t>((packed >> shift) & nodeInfoTagMask());\n#else\n    (void)slot;\n    return 0;\n#endif\n}\n\nvoid TrafficManagementModule::setNodeInfoTag(uint16_t slot, uint16_t tag)\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoIndex || slot >= nodeInfoIndexSlots())\n        return;\n\n    const uint16_t normalizedTag = static_cast<uint16_t>(tag & nodeInfoTagMask());\n    const uint32_t bitOffset = static_cast<uint32_t>(slot) * nodeInfoTagBits();\n    const uint16_t byteOffset = static_cast<uint16_t>(bitOffset >> 3);\n    const uint8_t shift = static_cast<uint8_t>(bitOffset & 7u);\n    uint32_t packed = 0;\n\n    if (byteOffset < nodeInfoIndexMetadataBudgetBytes())\n        packed |= static_cast<uint32_t>(nodeInfoIndex[byteOffset]);\n    if (static_cast<uint16_t>(byteOffset + 1u) < nodeInfoIndexMetadataBudgetBytes())\n        packed |= static_cast<uint32_t>(nodeInfoIndex[byteOffset + 1u]) << 8;\n    if (static_cast<uint16_t>(byteOffset + 2u) < nodeInfoIndexMetadataBudgetBytes())\n        packed |= static_cast<uint32_t>(nodeInfoIndex[byteOffset + 2u]) << 16;\n\n    const uint32_t mask = static_cast<uint32_t>(nodeInfoTagMask()) << shift;\n    packed = (packed & ~mask) | ((static_cast<uint32_t>(normalizedTag) << shift) & mask);\n\n    if (byteOffset < nodeInfoIndexMetadataBudgetBytes())\n        nodeInfoIndex[byteOffset] = static_cast<uint8_t>(packed & 0xFFu);\n    if (static_cast<uint16_t>(byteOffset + 1u) < nodeInfoIndexMetadataBudgetBytes())\n        nodeInfoIndex[byteOffset + 1u] = static_cast<uint8_t>((packed >> 8) & 0xFFu);\n    if (static_cast<uint16_t>(byteOffset + 2u) < nodeInfoIndexMetadataBudgetBytes())\n        nodeInfoIndex[byteOffset + 2u] = static_cast<uint8_t>((packed >> 16) & 0xFFu);\n#else\n    (void)slot;\n    (void)tag;\n#endif\n}\n\nuint16_t TrafficManagementModule::findNodeInfoPayloadIndex(NodeNum node) const\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoPayload || !nodeInfoIndex || node == 0)\n        return UINT16_MAX;\n\n    const uint16_t buckets[2] = {nodeInfoHash1(node), nodeInfoHash2(node)};\n\n    for (uint8_t b = 0; b < 2; b++) {\n        const uint16_t base = static_cast<uint16_t>(buckets[b] * nodeInfoBucketSize());\n        for (uint8_t slot = 0; slot < nodeInfoBucketSize(); slot++) {\n            uint16_t tag = getNodeInfoTag(static_cast<uint16_t>(base + slot));\n            if (tag == 0)\n                continue;\n\n            uint16_t payloadIndex = decodeNodeInfoPayloadIndex(tag);\n            if (payloadIndex >= nodeInfoTargetEntries())\n                continue;\n\n            if (nodeInfoPayload[payloadIndex].node == node)\n                return payloadIndex;\n        }\n    }\n\n    return UINT16_MAX;\n#else\n    (void)node;\n    return UINT16_MAX;\n#endif\n}\n\nbool TrafficManagementModule::removeNodeInfoIndexEntry(NodeNum node, uint16_t payloadIndex)\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoIndex || node == 0 || payloadIndex >= nodeInfoTargetEntries())\n        return false;\n\n    const uint16_t payloadTag = encodeNodeInfoTag(payloadIndex);\n    if (payloadTag == 0)\n        return false;\n    const uint16_t buckets[2] = {nodeInfoHash1(node), nodeInfoHash2(node)};\n\n    for (uint8_t b = 0; b < 2; b++) {\n        const uint16_t base = static_cast<uint16_t>(buckets[b] * nodeInfoBucketSize());\n        for (uint8_t slot = 0; slot < nodeInfoBucketSize(); slot++) {\n            const uint16_t indexSlot = static_cast<uint16_t>(base + slot);\n            if (getNodeInfoTag(indexSlot) == payloadTag) {\n                setNodeInfoTag(indexSlot, 0);\n                return true;\n            }\n        }\n    }\n\n    return false;\n#else\n    (void)node;\n    (void)payloadIndex;\n    return false;\n#endif\n}\n\nuint16_t TrafficManagementModule::allocateNodeInfoPayloadSlot()\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoPayload)\n        return UINT16_MAX;\n\n    for (uint16_t tries = 0; tries < nodeInfoTargetEntries(); tries++) {\n        uint16_t idx = static_cast<uint16_t>((nodeInfoAllocHint + tries) % nodeInfoTargetEntries());\n        if (nodeInfoPayload[idx].node == 0) {\n            nodeInfoAllocHint = static_cast<uint16_t>((idx + 1u) % nodeInfoTargetEntries());\n            return idx;\n        }\n    }\n#endif\n    return UINT16_MAX;\n}\n\nuint16_t TrafficManagementModule::evictNodeInfoPayloadSlot()\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoPayload || !nodeInfoIndex)\n        return UINT16_MAX;\n\n    for (uint16_t tries = 0; tries < nodeInfoTargetEntries(); tries++) {\n        uint16_t idx = static_cast<uint16_t>(nodeInfoEvictCursor % nodeInfoTargetEntries());\n        nodeInfoEvictCursor = static_cast<uint16_t>((nodeInfoEvictCursor + 1u) % nodeInfoTargetEntries());\n\n        NodeNum oldNode = nodeInfoPayload[idx].node;\n        if (oldNode == 0)\n            continue;\n\n        removeNodeInfoIndexEntry(oldNode, idx); // best effort; cache tolerates occasional stale miss\n        nodeInfoPayload[idx].node = 0;\n        return idx;\n    }\n#endif\n    return UINT16_MAX;\n}\n\nbool TrafficManagementModule::tryInsertNodeInfoEntryInBucket(uint16_t bucket, uint16_t tag)\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoIndex || !nodeInfoPayload || bucket >= nodeInfoBucketCount() || tag == 0)\n        return false;\n\n    const uint16_t base = static_cast<uint16_t>(bucket * nodeInfoBucketSize());\n    for (uint8_t slot = 0; slot < nodeInfoBucketSize(); slot++) {\n        const uint16_t indexSlot = static_cast<uint16_t>(base + slot);\n        const uint16_t existingTag = getNodeInfoTag(indexSlot);\n        if (existingTag == 0) {\n            setNodeInfoTag(indexSlot, tag);\n            return true;\n        }\n\n        // Opportunistically reuse stale tags that point at empty/invalid payload slots.\n        const uint16_t payloadIndex = decodeNodeInfoPayloadIndex(existingTag);\n        if (payloadIndex >= nodeInfoTargetEntries() || nodeInfoPayload[payloadIndex].node == 0) {\n            setNodeInfoTag(indexSlot, tag);\n            return true;\n        }\n    }\n#else\n    (void)bucket;\n    (void)tag;\n#endif\n    return false;\n}\n\nTrafficManagementModule::NodeInfoPayloadEntry *TrafficManagementModule::findOrCreateNodeInfoEntry(NodeNum node,\n                                                                                                  bool *usedEmptySlot)\n{\n    if (usedEmptySlot)\n        *usedEmptySlot = false;\n\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoPayload || !nodeInfoIndex || node == 0)\n        return nullptr;\n\n    uint16_t existing = findNodeInfoPayloadIndex(node);\n    if (existing < nodeInfoTargetEntries())\n        return &nodeInfoPayload[existing];\n\n    const uint16_t beforeCount = countNodeInfoEntriesLocked();\n\n    uint16_t payloadIndex = allocateNodeInfoPayloadSlot();\n    if (payloadIndex == UINT16_MAX) {\n        payloadIndex = evictNodeInfoPayloadSlot();\n        if (payloadIndex == UINT16_MAX)\n            return nullptr;\n    }\n\n    nodeInfoPayload[payloadIndex].node = node;\n\n    // 4-way bucketed cuckoo insertion mirrors Cuckoo Filter practice from\n    // Fan et al. (CoNEXT 2014): high occupancy with short relocation chains.\n    uint16_t pending = encodeNodeInfoTag(payloadIndex);\n    uint16_t h1 = nodeInfoHash1(node);\n    uint16_t h2 = nodeInfoHash2(node);\n\n    if (!tryInsertNodeInfoEntryInBucket(h1, pending) && !tryInsertNodeInfoEntryInBucket(h2, pending)) {\n        uint16_t currentBucket = h1;\n        for (uint8_t kicks = 0; kicks < kMaxCuckooKicks; kicks++) {\n            const uint16_t base = static_cast<uint16_t>(currentBucket * nodeInfoBucketSize());\n            const uint16_t kickSlot = static_cast<uint16_t>((node + kicks) & (nodeInfoBucketSize() - 1u));\n            const uint16_t pos = static_cast<uint16_t>(base + kickSlot);\n\n            uint16_t displaced = getNodeInfoTag(pos);\n            setNodeInfoTag(pos, pending);\n            pending = displaced;\n\n            uint16_t displacedPayload = decodeNodeInfoPayloadIndex(pending);\n            if (displacedPayload >= nodeInfoTargetEntries()) {\n                pending = 0;\n                break;\n            }\n\n            NodeNum displacedNode = nodeInfoPayload[displacedPayload].node;\n            if (displacedNode == 0) {\n                pending = 0;\n                break;\n            }\n\n            uint16_t altH1 = nodeInfoHash1(displacedNode);\n            uint16_t altH2 = nodeInfoHash2(displacedNode);\n            uint16_t altBucket = (altH1 == currentBucket) ? altH2 : altH1;\n\n            if (tryInsertNodeInfoEntryInBucket(altBucket, pending)) {\n                pending = 0;\n                break;\n            }\n\n            currentBucket = altBucket;\n        }\n\n        if (pending != 0) {\n            uint16_t droppedPayload = decodeNodeInfoPayloadIndex(pending);\n            if (droppedPayload < nodeInfoTargetEntries())\n                nodeInfoPayload[droppedPayload].node = 0;\n            TM_LOG_DEBUG(\"NodeInfo bucketed cuckoo overflow, dropped payload idx=%u\",\n                         static_cast<unsigned>(droppedPayload < nodeInfoTargetEntries() ? droppedPayload : UINT16_MAX));\n        }\n    }\n\n    uint16_t finalIndex = findNodeInfoPayloadIndex(node);\n    if (finalIndex >= nodeInfoTargetEntries()) {\n        // New entry did not survive insertion chain.\n        if (payloadIndex < nodeInfoTargetEntries() && nodeInfoPayload[payloadIndex].node == node)\n            nodeInfoPayload[payloadIndex].node = 0;\n        return nullptr;\n    }\n\n    if (usedEmptySlot) {\n        const uint16_t afterCount = countNodeInfoEntriesLocked();\n        *usedEmptySlot = afterCount > beforeCount;\n    }\n\n    return &nodeInfoPayload[finalIndex];\n#else\n    (void)node;\n    return nullptr;\n#endif\n}\n\nuint16_t TrafficManagementModule::countNodeInfoEntriesLocked() const\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoIndex)\n        return 0;\n\n    uint16_t count = 0;\n    for (uint16_t i = 0; i < nodeInfoIndexSlots(); i++) {\n        if (getNodeInfoTag(i) != 0)\n            count++;\n    }\n    return count;\n#else\n    return 0;\n#endif\n}\n\nvoid TrafficManagementModule::cacheNodeInfoPacket(const meshtastic_MeshPacket &mp)\n{\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (!nodeInfoPayload || !nodeInfoIndex || mp.decoded.payload.size == 0)\n        return;\n\n    meshtastic_User user = meshtastic_User_init_zero;\n    if (!pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_User_msg, &user))\n        return;\n\n    // Normalize user.id to the packet sender's node number.\n    snprintf(user.id, sizeof(user.id), \"!%08x\", getFrom(&mp));\n\n    bool usedEmptySlot = false;\n    uint16_t cachedCount = 0;\n    {\n        concurrency::LockGuard guard(&cacheLock);\n        NodeInfoPayloadEntry *entry = findOrCreateNodeInfoEntry(getFrom(&mp), &usedEmptySlot);\n        if (!entry)\n            return;\n\n        // Cache both payload and response metadata so direct replies can use\n        // richer context than \"just the user protobuf\" when PSRAM is present.\n        // This path is intentionally independent from NodeInfoModule/NodeDB.\n        entry->user = user;\n        entry->lastObservedMs = millis();\n        entry->lastObservedRxTime = mp.rx_time;\n        entry->sourceChannel = mp.channel;\n        entry->hasDecodedBitfield = mp.decoded.has_bitfield;\n        entry->decodedBitfield = mp.decoded.bitfield;\n\n        if (usedEmptySlot)\n            cachedCount = countNodeInfoEntriesLocked();\n    }\n\n    if (usedEmptySlot) {\n        TM_LOG_INFO(\"NodeInfo PSRAM cache entries: %u/%u target (%u packed slots, %u-bit tags, %u-byte DRAM index)\",\n                    static_cast<unsigned>(cachedCount), static_cast<unsigned>(nodeInfoTargetEntries()),\n                    static_cast<unsigned>(nodeInfoIndexSlots()), static_cast<unsigned>(nodeInfoTagBits()),\n                    static_cast<unsigned>(nodeInfoIndexMetadataBudgetBytes()));\n    }\n#else\n    (void)mp;\n#endif\n}\n\n// =============================================================================\n// Epoch Management\n// =============================================================================\n\n/**\n * Reset the timestamp epoch when relative offsets approach overflow.\n *\n * Called when epoch age exceeds ~19 hours (approaching 8-bit minute overflow).\n * Invalidates all cached per-node traffic state.\n */\nvoid TrafficManagementModule::resetEpoch(uint32_t nowMs)\n{\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE > 0\n    TM_LOG_DEBUG(\"Resetting cache epoch\");\n    cacheEpochMs = nowMs;\n\n    // Full flush avoids stale dedup identity/counters surviving epoch rollover.\n    memset(cache, 0, static_cast<size_t>(cacheSize()) * sizeof(UnifiedCacheEntry));\n#else\n    (void)nowMs;\n#endif\n}\n\n// =============================================================================\n// Position Hash (Compact Mode)\n// =============================================================================\n\n/**\n * Compute 8-bit position fingerprint from truncated lat/lon coordinates.\n *\n * Unlike a hash, this is deterministic: adjacent grid cells have sequential\n * fingerprints, so nearby positions never collide. The fingerprint extracts\n * the lower 4 significant bits from each truncated coordinate.\n *\n * Example with precision=16:\n *   lat_truncated = 0x12340000 (top 16 bits significant)\n *   Significant portion = 0x1234, lower 4 bits = 0x4\n *\n * fingerprint = (lat_low4 << 4) | lon_low4 = 8 bits total\n *\n * Collision: Two positions collide only if they differ by a multiple of 16\n * grid cells in BOTH lat and lon dimensions simultaneously - very unlikely\n * for typical position update patterns.\n *\n * @param lat_truncated  Precision-truncated latitude\n * @param lon_truncated  Precision-truncated longitude\n * @param precision      Number of significant bits (1-32)\n * @return               8-bit fingerprint (4 bits lat + 4 bits lon)\n */\nuint8_t TrafficManagementModule::computePositionFingerprint(int32_t lat_truncated, int32_t lon_truncated, uint8_t precision)\n{\n    precision = sanitizePositionPrecision(precision);\n\n    // Guard: if precision < 4, we have fewer bits to work with\n    // Take min(precision, 4) bits from each coordinate\n    uint8_t bitsToTake = (precision < 4) ? precision : 4;\n\n    // Shift to move significant bits to bottom, then mask lower bits\n    // For precision=16: shift by 16 to get the 16 significant bits at bottom\n    uint8_t shift = 32 - precision;\n    uint8_t latBits = (static_cast<uint32_t>(lat_truncated) >> shift) & ((1u << bitsToTake) - 1);\n    uint8_t lonBits = (static_cast<uint32_t>(lon_truncated) >> shift) & ((1u << bitsToTake) - 1);\n\n    return static_cast<uint8_t>((latBits << 4) | lonBits);\n}\n\n// =============================================================================\n// Packet Handling\n// =============================================================================\n\n// Processing order matters: this module runs BEFORE RoutingModule in the callModules() loop.\n// - STOP prevents RoutingModule from calling sniffReceived() → perhapsRebroadcast(),\n//   so the packet is fully consumed (not forwarded).\n// - ignoreRequest suppresses the default \"no one responded\" NAK for want_response packets.\n// - exhaustRequested is set by alterReceived() and checked by perhapsRebroadcast() to\n//   force hop_limit=0 on the rebroadcast copy, allowing one final relay hop.\nProcessMessage TrafficManagementModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    if (!moduleConfig.has_traffic_management || !moduleConfig.traffic_management.enabled)\n        return ProcessMessage::CONTINUE;\n\n    ignoreRequest = false;\n    exhaustRequested = false; // Reset per-packet; may be set by alterReceived() below\n    exhaustRequestedFrom = 0;\n    exhaustRequestedId = 0;\n    incrementStat(&stats.packets_inspected);\n\n    const auto &cfg = moduleConfig.traffic_management;\n    const uint32_t nowMs = millis();\n\n    // -------------------------------------------------------------------------\n    // Undecoded Packet Handling\n    // -------------------------------------------------------------------------\n    // Packets we can't decode (wrong key, corruption, etc.) may indicate\n    // a misbehaving node. Track and optionally drop repeat offenders.\n\n    if (mp.which_payload_variant != meshtastic_MeshPacket_decoded_tag) {\n        if (cfg.drop_unknown_enabled && cfg.unknown_packet_threshold > 0) {\n            if (shouldDropUnknown(&mp, nowMs)) {\n                logAction(\"drop\", &mp, \"unknown\");\n                incrementStat(&stats.unknown_packet_drops);\n                ignoreRequest = true;        // Suppress NAK for want_response packets\n                return ProcessMessage::STOP; // Consumed — will not be rebroadcast\n            }\n        }\n        return ProcessMessage::CONTINUE;\n    }\n\n    // Learn NodeInfo payloads into the dedicated PSRAM cache.\n    if (mp.decoded.portnum == meshtastic_PortNum_NODEINFO_APP)\n        cacheNodeInfoPacket(mp);\n\n    // -------------------------------------------------------------------------\n    // NodeInfo Direct Response\n    // -------------------------------------------------------------------------\n    // When we see a unicast NodeInfo request for a node we know about,\n    // respond directly from cache instead of forwarding the request.\n    // STOP prevents the request from being rebroadcast toward the target node,\n    // and our cached response is sent back to the requestor with hop_limit=0.\n\n    if (cfg.nodeinfo_direct_response && mp.decoded.portnum == meshtastic_PortNum_NODEINFO_APP && mp.decoded.want_response &&\n        !isBroadcast(mp.to) && !isToUs(&mp) && !isFromUs(&mp)) {\n        if (shouldRespondToNodeInfo(&mp, true)) {\n            meshtastic_User requester = meshtastic_User_init_zero;\n            if (pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_User_msg, &requester)) {\n                nodeDB->updateUser(getFrom(&mp), requester, mp.channel);\n            }\n            logAction(\"respond\", &mp, \"nodeinfo-cache\");\n            incrementStat(&stats.nodeinfo_cache_hits);\n            ignoreRequest = true;        // We responded; suppress default NAK\n            return ProcessMessage::STOP; // Consumed — request will not be forwarded\n        }\n    }\n\n    // -------------------------------------------------------------------------\n    // Position Deduplication\n    // -------------------------------------------------------------------------\n    // Drop position broadcasts that haven't moved significantly since the\n    // last broadcast from this node. Uses truncated coordinates to ignore\n    // GPS jitter within the configured precision.\n\n    if (!isFromUs(&mp) && !isToUs(&mp)) {\n        if (cfg.position_dedup_enabled && mp.decoded.portnum == meshtastic_PortNum_POSITION_APP) {\n            meshtastic_Position pos = meshtastic_Position_init_zero;\n            if (pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_Position_msg, &pos)) {\n                if (shouldDropPosition(&mp, &pos, nowMs)) {\n                    logAction(\"drop\", &mp, \"position-dedup\");\n                    incrementStat(&stats.position_dedup_drops);\n                    ignoreRequest = true;        // Suppress NAK\n                    return ProcessMessage::STOP; // Consumed — duplicate will not be rebroadcast\n                }\n            }\n        }\n\n        // ---------------------------------------------------------------------\n        // Rate Limiting\n        // ---------------------------------------------------------------------\n        // Throttle nodes sending too many packets within a time window.\n        // Excludes routing and admin packets which are essential for mesh operation.\n\n        if (cfg.rate_limit_enabled && cfg.rate_limit_window_secs > 0 && cfg.rate_limit_max_packets > 0) {\n            if (mp.decoded.portnum != meshtastic_PortNum_ROUTING_APP && mp.decoded.portnum != meshtastic_PortNum_ADMIN_APP) {\n                if (isRateLimited(mp.from, nowMs)) {\n                    logAction(\"drop\", &mp, \"rate-limit\");\n                    incrementStat(&stats.rate_limit_drops);\n                    ignoreRequest = true;        // Suppress NAK\n                    return ProcessMessage::STOP; // Consumed — throttled packet will not be rebroadcast\n                }\n            }\n        }\n    }\n\n    return ProcessMessage::CONTINUE;\n}\n\nvoid TrafficManagementModule::alterReceived(meshtastic_MeshPacket &mp)\n{\n    if (!moduleConfig.has_traffic_management || !moduleConfig.traffic_management.enabled)\n        return;\n\n    if (mp.which_payload_variant != meshtastic_MeshPacket_decoded_tag)\n        return;\n\n    if (isFromUs(&mp))\n        return;\n\n    // -------------------------------------------------------------------------\n    // Relayed Broadcast Hop Exhaustion\n    // -------------------------------------------------------------------------\n    // For relayed telemetry or position broadcasts from other nodes, optionally\n    // set hop_limit=0 so they don't propagate further through the mesh.\n\n    const auto &cfg = moduleConfig.traffic_management;\n    const bool isTelemetry = mp.decoded.portnum == meshtastic_PortNum_TELEMETRY_APP;\n    const bool isPosition = mp.decoded.portnum == meshtastic_PortNum_POSITION_APP;\n    const bool shouldExhaust = (isTelemetry && cfg.exhaust_hop_telemetry) || (isPosition && cfg.exhaust_hop_position);\n\n    if (!shouldExhaust || !isBroadcast(mp.to))\n        return;\n\n    if (mp.hop_limit > 0) {\n        const char *reason = isTelemetry ? \"exhaust-hop-telemetry\" : \"exhaust-hop-position\";\n        logAction(\"exhaust\", &mp, reason);\n        // Adjust hop_start so downstream nodes compute correct hopsAway (hop_start - hop_limit).\n        // Without this, hop_limit=0 with original hop_start would show inflated hopsAway.\n        mp.hop_start = mp.hop_start - mp.hop_limit + 1;\n        mp.hop_limit = 0;\n        // Signal perhapsRebroadcast() to allow one final relay with hop_limit=0.\n        // Without this flag, perhapsRebroadcast() would skip the packet since hop_limit==0.\n        // The packet-scoped flag is checked in NextHopRouter::perhapsRebroadcast()\n        // and forces tosend->hop_limit=0, ensuring no further propagation beyond the\n        // next node.\n        exhaustRequested = true;\n        exhaustRequestedFrom = getFrom(&mp);\n        exhaustRequestedId = mp.id;\n        incrementStat(&stats.hop_exhausted_packets);\n    }\n}\n\n// =============================================================================\n// Periodic Maintenance\n// =============================================================================\n\nint32_t TrafficManagementModule::runOnce()\n{\n    if (!moduleConfig.has_traffic_management || !moduleConfig.traffic_management.enabled)\n        return INT32_MAX;\n\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE > 0\n    const uint32_t nowMs = millis();\n\n    // Check if epoch reset needed (~3.5 hours approaching 8-bit minute overflow)\n    if (needsEpochReset(nowMs)) {\n        concurrency::LockGuard guard(&cacheLock);\n        resetEpoch(nowMs);\n        return kMaintenanceIntervalMs;\n    }\n\n    // Calculate TTLs for cache expiration\n    const uint32_t positionIntervalMs = secsToMs(Default::getConfiguredOrDefault(\n        moduleConfig.traffic_management.position_min_interval_secs, default_traffic_mgmt_position_min_interval_secs));\n    const uint32_t positionTtlMs = positionIntervalMs * 4;\n\n    const uint32_t rateIntervalMs = secsToMs(moduleConfig.traffic_management.rate_limit_window_secs);\n    const uint32_t rateTtlMs = (rateIntervalMs > 0) ? rateIntervalMs * 2 : (10 * 60 * 1000UL);\n\n    const uint32_t unknownTtlMs = kUnknownResetMs * 5;\n\n    // Sweep cache and clear expired entries\n    uint16_t activeEntries = 0;\n    uint16_t expiredEntries = 0;\n    const uint32_t sweepStartMs = millis();\n\n    concurrency::LockGuard guard(&cacheLock);\n    for (uint16_t i = 0; i < cacheSize(); i++) {\n        if (cache[i].node == 0)\n            continue;\n\n        bool anyValid = false;\n\n        // Check and clear expired position data\n        if (cache[i].pos_time != 0) {\n            uint32_t posTimeMs = fromRelativePosTime(cache[i].pos_time);\n            if (!isWithinWindow(nowMs, posTimeMs, positionTtlMs)) {\n                cache[i].pos_fingerprint = 0;\n                cache[i].pos_time = 0;\n            } else {\n                anyValid = true;\n            }\n        }\n\n        // Check and clear expired rate limit data\n        if (cache[i].rate_time != 0) {\n            uint32_t rateTimeMs = fromRelativeRateTime(cache[i].rate_time);\n            if (!isWithinWindow(nowMs, rateTimeMs, rateTtlMs)) {\n                cache[i].rate_count = 0;\n                cache[i].rate_time = 0;\n            } else {\n                anyValid = true;\n            }\n        }\n\n        // Check and clear expired unknown tracking data\n        if (cache[i].unknown_time != 0) {\n            uint32_t unknownTimeMs = fromRelativeUnknownTime(cache[i].unknown_time);\n            if (!isWithinWindow(nowMs, unknownTimeMs, unknownTtlMs)) {\n                cache[i].unknown_count = 0;\n                cache[i].unknown_time = 0;\n            } else {\n                anyValid = true;\n            }\n        }\n\n        // If all data expired, free the slot entirely\n        if (!anyValid) {\n            memset(&cache[i], 0, sizeof(UnifiedCacheEntry));\n            expiredEntries++;\n        } else {\n            activeEntries++;\n        }\n    }\n\n    TM_LOG_DEBUG(\"Maintenance: %u active, %u expired, %u/%u slots, %lums elapsed\", activeEntries, expiredEntries,\n                 static_cast<unsigned>(activeEntries), static_cast<unsigned>(cacheSize()),\n                 static_cast<unsigned long>(millis() - sweepStartMs));\n\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    if (nodeInfoPayload && nodeInfoIndex) {\n        TM_LOG_DEBUG(\"NodeInfo PSRAM cache: %u/%u target (%u packed slots, %u buckets, %u-bit tags, %u-byte index)\",\n                     static_cast<unsigned>(countNodeInfoEntriesLocked()), static_cast<unsigned>(nodeInfoTargetEntries()),\n                     static_cast<unsigned>(nodeInfoIndexSlots()), static_cast<unsigned>(nodeInfoBucketCount()),\n                     static_cast<unsigned>(nodeInfoTagBits()), static_cast<unsigned>(nodeInfoIndexMetadataBudgetBytes()));\n    }\n#endif\n\n#endif // TRAFFIC_MANAGEMENT_CACHE_SIZE > 0\n\n    return kMaintenanceIntervalMs;\n}\n\n// =============================================================================\n// Traffic Management Logic\n// =============================================================================\n\nbool TrafficManagementModule::shouldDropPosition(const meshtastic_MeshPacket *p, const meshtastic_Position *pos, uint32_t nowMs)\n{\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE == 0\n    (void)p;\n    (void)pos;\n    (void)nowMs;\n    return false;\n#else\n    if (!pos->has_latitude_i || !pos->has_longitude_i)\n        return false;\n\n    uint8_t precision = Default::getConfiguredOrDefault(moduleConfig.traffic_management.position_precision_bits,\n                                                        default_traffic_mgmt_position_precision_bits);\n    precision = sanitizePositionPrecision(precision);\n\n    const int32_t lat_truncated = truncateLatLon(pos->latitude_i, precision);\n    const int32_t lon_truncated = truncateLatLon(pos->longitude_i, precision);\n    const uint8_t fingerprint = computePositionFingerprint(lat_truncated, lon_truncated, precision);\n    const uint32_t minIntervalMs = secsToMs(Default::getConfiguredOrDefault(\n        moduleConfig.traffic_management.position_min_interval_secs, default_traffic_mgmt_position_min_interval_secs));\n\n    bool isNew = false;\n    concurrency::LockGuard guard(&cacheLock);\n    UnifiedCacheEntry *entry = findOrCreateEntry(p->from, &isNew);\n    if (!entry)\n        return false;\n\n    // Compare fingerprint and check time window\n    // When minIntervalMs == 0, deduplication is disabled (withinInterval = false means never drop)\n    const bool hasPositionState = !isNew && entry->pos_time != 0;\n    const bool samePosition = hasPositionState && entry->pos_fingerprint == fingerprint;\n    const bool withinInterval =\n        hasPositionState && (minIntervalMs != 0) && isWithinWindow(nowMs, fromRelativePosTime(entry->pos_time), minIntervalMs);\n\n    TM_LOG_DEBUG(\"Position dedup 0x%08x: fp=0x%02x prev=0x%02x same=%d within=%d new=%d\", p->from, fingerprint,\n                 entry->pos_fingerprint, samePosition, withinInterval, isNew);\n\n    // Update cache entry\n    entry->pos_fingerprint = fingerprint;\n    entry->pos_time = toRelativePosTime(nowMs);\n\n    // Drop only if same position AND within the minimum interval\n    return samePosition && withinInterval;\n#endif\n}\n\nbool TrafficManagementModule::shouldRespondToNodeInfo(const meshtastic_MeshPacket *p, bool sendResponse)\n{\n    // Caller already verified: nodeinfo_direct_response, portnum, want_response,\n    // !isBroadcast, !isToUs, !isFromUs\n\n    if (!isMinHopsFromRequestor(p))\n        return false;\n\n    meshtastic_User cachedUser = meshtastic_User_init_zero;\n    bool hasCachedUser = false;\n\n    // Extra metadata consumed only by the PSRAM-backed cache path.\n    // Defaults preserve previous behavior when cache metadata is unavailable.\n    bool cachedHasDecodedBitfield = false;\n    uint8_t cachedDecodedBitfield = 0;\n    uint8_t cachedSourceChannel = 0;\n    uint32_t cachedLastObservedMs = 0;\n    uint32_t cachedLastObservedRxTime = 0;\n\n    {\n        concurrency::LockGuard guard(&cacheLock);\n        const NodeInfoPayloadEntry *entry = findNodeInfoEntry(p->to);\n        if (entry) {\n            cachedUser = entry->user;\n            hasCachedUser = true;\n            cachedHasDecodedBitfield = entry->hasDecodedBitfield;\n            cachedDecodedBitfield = entry->decodedBitfield;\n            cachedSourceChannel = entry->sourceChannel;\n            cachedLastObservedMs = entry->lastObservedMs;\n            cachedLastObservedRxTime = entry->lastObservedRxTime;\n        }\n    }\n\n    if (!hasCachedUser) {\n        // If the PSRAM cache exists but misses, we intentionally do not fall back\n        // to the node-wide table. This keeps the PSRAM direct-reply path separate\n        // from NodeInfoModule/NodeDB behavior when PSRAM is available.\n        if (nodeInfoPayload && nodeInfoIndex) {\n            TM_LOG_DEBUG(\"NodeInfo PSRAM cache miss for node=0x%08x\", p->to);\n            return false;\n        }\n\n        // Fallback only when PSRAM cache is unavailable on this target.\n        // In this mode we use the node-wide table maintained by NodeInfoModule.\n        const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);\n        if (!node || !node->has_user)\n            return false;\n        cachedUser = TypeConversions::ConvertToUser(node->num, node->user);\n    }\n\n    if (!sendResponse)\n        return true;\n\n    meshtastic_MeshPacket *reply = router->allocForSending();\n    if (!reply) {\n        TM_LOG_WARN(\"NodeInfo direct response dropped: no packet buffer\");\n        return false;\n    }\n\n    reply->decoded.portnum = meshtastic_PortNum_NODEINFO_APP;\n    reply->decoded.payload.size =\n        pb_encode_to_bytes(reply->decoded.payload.bytes, sizeof(reply->decoded.payload.bytes), &meshtastic_User_msg, &cachedUser);\n    reply->decoded.want_response = false;\n\n    // Start from cached bitfield metadata when available. This lets direct\n    // responses preserve more of the original packet semantics (PSRAM path),\n    // while still enforcing local policy for OK_TO_MQTT below.\n    if (cachedHasDecodedBitfield)\n        reply->decoded.bitfield = cachedDecodedBitfield;\n    else\n        reply->decoded.bitfield = 0;\n\n    // Respect the node-wide config_ok_to_mqtt setting for direct NodeInfo replies.\n    // This response is spoofed from another node, so Router::perhapsEncode()\n    // will not auto-populate the bitfield via config_ok_to_mqtt for us.\n    reply->decoded.has_bitfield = true;\n    // Update only the OK_TO_MQTT bit; keep any other cached bits intact.\n    reply->decoded.bitfield &= ~BITFIELD_OK_TO_MQTT_MASK;\n    if (config.lora.config_ok_to_mqtt)\n        reply->decoded.bitfield |= BITFIELD_OK_TO_MQTT_MASK;\n\n    if (hasCachedUser && cachedLastObservedMs != 0) {\n        uint32_t ageMs = millis() - cachedLastObservedMs;\n        TM_LOG_DEBUG(\"NodeInfo PSRAM hit node=0x%08x age=%lu ms src_ch=%u req_ch=%u rx_time=%lu\", p->to,\n                     static_cast<unsigned long>(ageMs), static_cast<unsigned>(cachedSourceChannel),\n                     static_cast<unsigned>(p->channel), static_cast<unsigned long>(cachedLastObservedRxTime));\n    }\n\n    // Spoof the sender as the target node so the requestor sees a valid NodeInfo response.\n    // hop_limit=0 ensures this reply travels only one hop (direct to requestor).\n    reply->from = p->to;\n    reply->to = getFrom(p);\n    reply->channel = p->channel;\n    reply->decoded.request_id = p->id;\n    reply->hop_limit = 0;\n    // hop_start=0 is set explicitly because Router::send() only sets it for isFromUs(),\n    // and our spoofed from means isFromUs() is false.\n    reply->hop_start = 0;\n    reply->next_hop = nodeDB->getLastByteOfNodeNum(getFrom(p));\n    reply->priority = meshtastic_MeshPacket_Priority_DEFAULT;\n\n    service->sendToMesh(reply);\n    return true;\n}\n\nbool TrafficManagementModule::isMinHopsFromRequestor(const meshtastic_MeshPacket *p) const\n{\n    int8_t hopsAway = getHopsAway(*p, -1);\n    if (hopsAway < 0)\n        return false;\n\n    // Both routers and clients use maxHops logic (respond when hopsAway <= threshold)\n    // Role determines the maximum allowed value (enforced limit, not just default)\n    bool isRouter = IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_ROUTER,\n                              meshtastic_Config_DeviceConfig_Role_ROUTER_LATE, meshtastic_Config_DeviceConfig_Role_CLIENT_BASE);\n\n    uint32_t roleLimit = isRouter ? kRouterDefaultMaxHops : kClientDefaultMaxHops;\n    uint32_t configValue = moduleConfig.traffic_management.nodeinfo_direct_response_max_hops;\n\n    // Use config value if set, otherwise use role default, but always clamp to role limit\n    uint32_t maxHops = (configValue > 0) ? configValue : roleLimit;\n    if (maxHops > roleLimit)\n        maxHops = roleLimit;\n\n    bool result = static_cast<uint32_t>(hopsAway) <= maxHops;\n    TM_LOG_DEBUG(\"NodeInfo hops check: hopsAway=%d maxHops=%u roleLimit=%u isRouter=%d -> %s\", hopsAway, maxHops, roleLimit,\n                 isRouter, result ? \"respond\" : \"skip\");\n    return result;\n}\n\nbool TrafficManagementModule::isRateLimited(NodeNum from, uint32_t nowMs)\n{\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE == 0\n    (void)from;\n    (void)nowMs;\n    return false;\n#else\n    const uint32_t windowMs = secsToMs(moduleConfig.traffic_management.rate_limit_window_secs);\n    if (windowMs == 0 || moduleConfig.traffic_management.rate_limit_max_packets == 0)\n        return false;\n\n    bool isNew = false;\n    concurrency::LockGuard guard(&cacheLock);\n    UnifiedCacheEntry *entry = findOrCreateEntry(from, &isNew);\n    if (!entry)\n        return false;\n\n    // Check if window has expired\n    if (isNew || !isWithinWindow(nowMs, fromRelativeRateTime(entry->rate_time), windowMs)) {\n        entry->rate_time = toRelativeRateTime(nowMs);\n        entry->rate_count = 1;\n        return false;\n    }\n\n    // Increment counter (saturates at 255)\n    saturatingIncrement(entry->rate_count);\n\n    // Check against threshold (uint8_t max is 255, but config is uint32_t)\n    uint32_t threshold = moduleConfig.traffic_management.rate_limit_max_packets;\n    if (threshold > 255)\n        threshold = 255;\n\n    bool limited = entry->rate_count > threshold;\n    if (limited || entry->rate_count == threshold) {\n        TM_LOG_DEBUG(\"Rate limit 0x%08x: count=%u threshold=%u -> %s\", from, entry->rate_count, threshold,\n                     limited ? \"DROP\" : \"at-limit\");\n    }\n    return limited;\n#endif\n}\n\nbool TrafficManagementModule::shouldDropUnknown(const meshtastic_MeshPacket *p, uint32_t nowMs)\n{\n#if TRAFFIC_MANAGEMENT_CACHE_SIZE == 0\n    (void)p;\n    (void)nowMs;\n    return false;\n#else\n    if (!moduleConfig.traffic_management.drop_unknown_enabled || moduleConfig.traffic_management.unknown_packet_threshold == 0)\n        return false;\n\n    uint32_t windowMs = kUnknownResetMs;\n    if (moduleConfig.traffic_management.rate_limit_window_secs > 0)\n        windowMs = secsToMs(moduleConfig.traffic_management.rate_limit_window_secs);\n\n    bool isNew = false;\n    concurrency::LockGuard guard(&cacheLock);\n    UnifiedCacheEntry *entry = findOrCreateEntry(p->from, &isNew);\n    if (!entry)\n        return false;\n\n    // Check if window has expired\n    if (isNew || !isWithinWindow(nowMs, fromRelativeUnknownTime(entry->unknown_time), windowMs)) {\n        entry->unknown_time = toRelativeUnknownTime(nowMs);\n        entry->unknown_count = 0;\n    }\n\n    // Increment counter (saturates at 255)\n    saturatingIncrement(entry->unknown_count);\n\n    // Check against threshold\n    uint32_t threshold = moduleConfig.traffic_management.unknown_packet_threshold;\n    if (threshold > 255)\n        threshold = 255;\n\n    bool drop = entry->unknown_count > threshold;\n    if (drop || entry->unknown_count == threshold) {\n        TM_LOG_DEBUG(\"Unknown packets 0x%08x: count=%u threshold=%u -> %s\", p->from, entry->unknown_count, threshold,\n                     drop ? \"DROP\" : \"at-limit\");\n    }\n    return drop;\n#endif\n}\n\nvoid TrafficManagementModule::logAction(const char *action, const meshtastic_MeshPacket *p, const char *reason) const\n{\n    if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        const char *name = portName(p->decoded.portnum);\n        if (name) {\n            TM_LOG_INFO(\"%s %s from=0x%08x to=0x%08x hop=%d/%d reason=%s\", action, name, getFrom(p), p->to, p->hop_limit,\n                        p->hop_start, reason);\n        } else {\n            TM_LOG_INFO(\"%s port=%d from=0x%08x to=0x%08x hop=%d/%d reason=%s\", action, p->decoded.portnum, getFrom(p), p->to,\n                        p->hop_limit, p->hop_start, reason);\n        }\n    } else {\n        TM_LOG_INFO(\"%s encrypted from=0x%08x to=0x%08x hop=%d/%d reason=%s\", action, getFrom(p), p->to, p->hop_limit,\n                    p->hop_start, reason);\n    }\n}\n\n#endif\n"
  },
  {
    "path": "src/modules/TrafficManagementModule.h",
    "content": "#pragma once\n\n#include \"MeshModule.h\"\n#include \"concurrency/Lock.h\"\n#include \"concurrency/OSThread.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n#include \"mesh/generated/meshtastic/telemetry.pb.h\"\n\n#if HAS_TRAFFIC_MANAGEMENT\n\n/**\n * TrafficManagementModule - Packet inspection and traffic shaping for mesh networks.\n *\n * This module provides:\n * - Position deduplication (drop redundant position broadcasts)\n * - Per-node rate limiting (throttle chatty nodes)\n * - Unknown packet filtering (drop undecoded packets from repeat offenders)\n * - NodeInfo direct response (answer queries from cache to reduce mesh chatter)\n * - Local-only telemetry/position (exhaust hop_limit for local broadcasts)\n * - Router hop preservation (maintain hop_limit for router-to-router traffic)\n *\n * Memory Optimization:\n * Uses a unified cache with cuckoo hashing for O(1) lookups and 56% memory reduction\n * compared to separate per-feature caches. Timestamps are stored as 8-bit relative\n * offsets from a rolling epoch to further reduce memory footprint.\n */\nclass TrafficManagementModule : public MeshModule, private concurrency::OSThread\n{\n  public:\n    TrafficManagementModule();\n    ~TrafficManagementModule();\n\n    // Singleton — no copying or moving\n    TrafficManagementModule(const TrafficManagementModule &) = delete;\n    TrafficManagementModule &operator=(const TrafficManagementModule &) = delete;\n\n    meshtastic_TrafficManagementStats getStats() const;\n    void resetStats();\n    void recordRouterHopPreserved();\n\n    /**\n     * Check if this packet should have its hops exhausted.\n     * Called from perhapsRebroadcast() to force hop_limit = 0 regardless of\n     * router_preserve_hops or favorite node logic.\n     */\n    bool shouldExhaustHops(const meshtastic_MeshPacket &mp) const\n    {\n        return exhaustRequested && exhaustRequestedFrom == getFrom(&mp) && exhaustRequestedId == mp.id;\n    }\n\n  protected:\n    ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n    bool wantPacket(const meshtastic_MeshPacket *p) override { return true; }\n    void alterReceived(meshtastic_MeshPacket &mp) override;\n    int32_t runOnce() override;\n    // Protected so test shims can force epoch rollover behavior.\n    void resetEpoch(uint32_t nowMs);\n\n  private:\n    // =========================================================================\n    // Unified Cache Entry (10 bytes) - Same for ALL platforms\n    // =========================================================================\n    //\n    // A single compact structure used across ESP32, NRF52, and all other platforms.\n    // Memory: 10 bytes × 2048 entries = 20KB\n    //\n    // Position Fingerprinting:\n    //   Instead of storing full coordinates (8 bytes) or a computed hash,\n    //   we store an 8-bit fingerprint derived deterministically from the\n    //   truncated lat/lon. This extracts the lower 4 significant bits from\n    //   each coordinate: fingerprint = (lat_low4 << 4) | lon_low4\n    //\n    //   Benefits over hash:\n    //   - Adjacent grid cells have sequential fingerprints (no collision)\n    //   - Two positions only collide if 16+ grid cells apart in BOTH dimensions\n    //   - Deterministic: same input always produces same output\n    //\n    // Adaptive Timestamp Resolution:\n    //   All timestamps use 8-bit values with adaptive resolution calculated\n    //   from config at startup. Resolution = max(60, min(339, interval/2)).\n    //   - Min 60 seconds ensures reasonable precision\n    //   - Max 339 seconds allows ~24 hour range (255 * 339 = 86445 sec)\n    //   - interval/2 ensures at least 2 ticks per configured interval\n    //\n    // Layout:\n    //   [0-3]   node            - NodeNum (4 bytes)\n    //   [4]     pos_fingerprint - 4 bits lat + 4 bits lon (1 byte)\n    //   [5]     rate_count      - Packets in current window (1 byte)\n    //   [6]     unknown_count   - Unknown packets count (1 byte)\n    //   [7]     pos_time        - Position timestamp (1 byte, adaptive resolution)\n    //   [8]     rate_time       - Rate window start (1 byte, adaptive resolution)\n    //   [9]     unknown_time    - Unknown tracking start (1 byte, adaptive resolution)\n    //\n    struct __attribute__((packed)) UnifiedCacheEntry {\n        NodeNum node;            // 4 bytes - Node identifier (0 = empty slot)\n        uint8_t pos_fingerprint; // 1 byte  - Lower 4 bits of lat + lon\n        uint8_t rate_count;      // 1 byte  - Packet count (saturates at 255)\n        uint8_t unknown_count;   // 1 byte  - Unknown packet count (saturates at 255)\n        uint8_t pos_time;        // 1 byte  - Position timestamp (adaptive resolution)\n        uint8_t rate_time;       // 1 byte  - Rate window start (adaptive resolution)\n        uint8_t unknown_time;    // 1 byte  - Unknown tracking start (adaptive resolution)\n    };\n    static_assert(sizeof(UnifiedCacheEntry) == 10, \"UnifiedCacheEntry should be 10 bytes\");\n\n    // =========================================================================\n    // Cuckoo Hash Table Implementation\n    // =========================================================================\n    //\n    // Cuckoo hashing provides O(1) worst-case lookup time using two hash functions.\n    // Each key can be in one of two possible locations (h1 or h2). On collision,\n    // the existing entry is \"kicked\" to its alternate location.\n    //\n    // Benefits over linear scan:\n    // - O(1) lookup vs O(n) - critical at packet processing rates\n    // - O(1) insertion (amortized) with simple eviction on cycles\n    // - ~95% load factor achievable\n    //\n    // Cache size rounds to power-of-2 for fast modulo via bitmask.\n    // TRAFFIC_MANAGEMENT_CACHE_SIZE=2000 → cacheSize()=2048\n    //\n    static constexpr uint16_t cacheSize();\n    static constexpr uint16_t cacheMask();\n\n    // Hash functions for cuckoo hashing\n    inline uint16_t cuckooHash1(NodeNum node) const { return node & cacheMask(); }\n    inline uint16_t cuckooHash2(NodeNum node) const { return ((node * 2654435769u) >> (32 - cuckooHashBits())) & cacheMask(); }\n    static constexpr uint8_t cuckooHashBits();\n\n    // NodeInfo cache configuration (PSRAM path):\n    // - Payload lives in PSRAM\n    // - DRAM keeps packed 12-bit tags with 4-way bucketed cuckoo hashing\n    //   (Fan et al., CoNEXT 2014). Tag value 0 is reserved as \"empty\".\n    static constexpr uint16_t kNodeInfoIndexMetadataBudgetBytes = 3072; // 3KB DRAM tag store\n    static constexpr uint8_t kNodeInfoTargetOccupancyPercent = 95;\n    static constexpr uint8_t kNodeInfoBucketSize = 4;\n    static constexpr uint8_t kNodeInfoTagBits = 12;\n    static constexpr uint16_t kNodeInfoTagMask = static_cast<uint16_t>((1u << kNodeInfoTagBits) - 1u);\n    static constexpr uint16_t kNodeInfoIndexSlotsRaw =\n        static_cast<uint16_t>((kNodeInfoIndexMetadataBudgetBytes * 8u) / kNodeInfoTagBits);\n    static constexpr uint16_t kNodeInfoIndexSlots =\n        static_cast<uint16_t>(kNodeInfoIndexSlotsRaw - (kNodeInfoIndexSlotsRaw % kNodeInfoBucketSize));\n    static constexpr uint16_t kNodeInfoTargetEntries =\n        static_cast<uint16_t>((kNodeInfoIndexSlots * kNodeInfoTargetOccupancyPercent) / 100u);\n    static_assert((kNodeInfoIndexSlots % kNodeInfoBucketSize) == 0, \"NodeInfo slot count must align to bucket size\");\n    static_assert(kNodeInfoTargetEntries < (1u << kNodeInfoTagBits), \"NodeInfo tag bits must encode payload index\");\n\n    static constexpr uint16_t nodeInfoTargetEntries();\n    static constexpr uint16_t nodeInfoIndexMetadataBudgetBytes();\n    static constexpr uint8_t nodeInfoTargetOccupancyPercent();\n    static constexpr uint8_t nodeInfoBucketSize();\n    static constexpr uint8_t nodeInfoTagBits();\n    static constexpr uint16_t nodeInfoTagMask();\n    static constexpr uint16_t nodeInfoIndexSlots();\n    static constexpr uint16_t nodeInfoBucketCount();\n    static constexpr uint16_t nodeInfoBucketMask();\n    static constexpr uint8_t nodeInfoBucketHashBits();\n    inline uint16_t nodeInfoHash1(NodeNum node) const { return node & nodeInfoBucketMask(); }\n    inline uint16_t nodeInfoHash2(NodeNum node) const\n    {\n        return ((node * 2246822519u) >> (32 - nodeInfoBucketHashBits())) & nodeInfoBucketMask();\n    }\n\n    // =========================================================================\n    // Adaptive Timestamp Resolution\n    // =========================================================================\n    //\n    // All timestamps use 8-bit values with adaptive resolution calculated from\n    // config at startup. This allows ~24 hour range while maintaining precision.\n    //\n    // Resolution formula: max(60, min(339, interval/2))\n    //   - 60 sec minimum ensures reasonable precision\n    //   - 339 sec maximum allows 24 hour range (255 * 339 ≈ 86400 sec)\n    //   - interval/2 ensures at least 2 ticks per configured interval\n    //\n    // Since config changes require reboot, resolution is calculated once.\n    //\n    uint32_t cacheEpochMs = 0;\n    uint16_t posTimeResolution = 60;     // Seconds per tick for position\n    uint16_t rateTimeResolution = 60;    // Seconds per tick for rate limiting\n    uint16_t unknownTimeResolution = 60; // Seconds per tick for unknown tracking\n\n    // Calculate resolution from configured interval (called once at startup)\n    static uint16_t calcTimeResolution(uint32_t intervalSecs)\n    {\n        // Resolution = interval/2 to ensure at least 2 ticks per interval\n        // Clamped to [60, 339] for min precision and max 24h range\n        uint32_t res = (intervalSecs > 0) ? (intervalSecs / 2) : 60;\n        if (res < 60)\n            res = 60;\n        if (res > 339)\n            res = 339;\n        return static_cast<uint16_t>(res);\n    }\n\n    // Convert to/from 8-bit relative timestamps with given resolution\n    uint8_t toRelativeTime(uint32_t nowMs, uint16_t resolutionSecs) const\n    {\n        uint32_t ticks = (nowMs - cacheEpochMs) / (resolutionSecs * 1000UL);\n        return (ticks > UINT8_MAX) ? UINT8_MAX : static_cast<uint8_t>(ticks);\n    }\n    uint32_t fromRelativeTime(uint8_t ticks, uint16_t resolutionSecs) const\n    {\n        return cacheEpochMs + (static_cast<uint32_t>(ticks) * resolutionSecs * 1000UL);\n    }\n\n    // Convenience wrappers for each timestamp type\n    uint8_t toRelativePosTime(uint32_t nowMs) const { return toRelativeTime(nowMs, posTimeResolution); }\n    uint32_t fromRelativePosTime(uint8_t t) const { return fromRelativeTime(t, posTimeResolution); }\n\n    uint8_t toRelativeRateTime(uint32_t nowMs) const { return toRelativeTime(nowMs, rateTimeResolution); }\n    uint32_t fromRelativeRateTime(uint8_t t) const { return fromRelativeTime(t, rateTimeResolution); }\n\n    uint8_t toRelativeUnknownTime(uint32_t nowMs) const { return toRelativeTime(nowMs, unknownTimeResolution); }\n    uint32_t fromRelativeUnknownTime(uint8_t t) const { return fromRelativeTime(t, unknownTimeResolution); }\n\n    // Epoch reset when any timestamp approaches overflow\n    // With max resolution of 339 sec, 200 ticks = ~19 hours (safe margin for 24h max)\n    bool needsEpochReset(uint32_t nowMs) const\n    {\n        uint16_t maxRes = posTimeResolution;\n        if (rateTimeResolution > maxRes)\n            maxRes = rateTimeResolution;\n        if (unknownTimeResolution > maxRes)\n            maxRes = unknownTimeResolution;\n        return (nowMs - cacheEpochMs) > (200UL * maxRes * 1000UL);\n    }\n    // =========================================================================\n    // Position Fingerprint\n    // =========================================================================\n    //\n    // Computes 8-bit fingerprint from truncated lat/lon coordinates.\n    // Extracts lower 4 significant bits from each coordinate.\n    //\n    // fingerprint = (lat_low4 << 4) | lon_low4\n    //\n    // Unlike a hash, adjacent grid cells have sequential fingerprints,\n    // so nearby positions never collide. Collisions only occur for\n    // positions 16+ grid cells apart in both dimensions.\n    //\n    // Guards: If precision < 4 bits, uses min(precision, 4) bits.\n    //\n    static uint8_t computePositionFingerprint(int32_t lat_truncated, int32_t lon_truncated, uint8_t precision);\n\n    // =========================================================================\n    // Cache Storage\n    // =========================================================================\n\n    mutable concurrency::Lock cacheLock; // Protects all cache access\n    UnifiedCacheEntry *cache = nullptr;  // Cuckoo hash table (unified for all platforms)\n    bool cacheFromPsram = false;         // Tracks allocator for correct deallocation\n\n    struct NodeInfoPayloadEntry {\n        // Node identifier associated with this payload slot.\n        // 0 means the slot is currently unused.\n        NodeNum node;\n\n        // Cached NODEINFO_APP payload body. This is separate from NodeDB and is only\n        // used by the PSRAM-backed direct-response path in this module.\n        meshtastic_User user;\n\n        // Extra response metadata captured from the latest observed NODEINFO_APP\n        // packet for this node. shouldRespondToNodeInfo() uses this metadata when\n        // building spoofed replies for requesting clients.\n\n        // Last local uptime tick (millis) when this entry was refreshed.\n        uint32_t lastObservedMs;\n\n        // Last RTC/packet timestamp (seconds) observed for this NodeInfo frame.\n        // If unavailable in packet, remains 0.\n        uint32_t lastObservedRxTime;\n\n        // Channel where we most recently heard this node's NodeInfo.\n        uint8_t sourceChannel;\n\n        // Cached decoded bitfield metadata from the source packet.\n        // We preserve non-OK_TO_MQTT bits in direct replies when available.\n        bool hasDecodedBitfield;\n        uint8_t decodedBitfield;\n    };\n\n    NodeInfoPayloadEntry *nodeInfoPayload = nullptr; // NodeInfo payloads in PSRAM\n    bool nodeInfoPayloadFromPsram = false;           // Tracks allocator for correct deallocation\n    uint8_t *nodeInfoIndex = nullptr;                // Packed 12-bit NodeInfo tags in DRAM\n    uint16_t nodeInfoAllocHint = 0;\n    uint16_t nodeInfoEvictCursor = 0;\n\n    meshtastic_TrafficManagementStats stats;\n\n    // Flag set during alterReceived() when packet should be exhausted.\n    // Checked by perhapsRebroadcast() to force hop_limit = 0 only for the\n    // matching packet key (from + id). Reset at start of handleReceived().\n    bool exhaustRequested = false;\n    NodeNum exhaustRequestedFrom = 0;\n    PacketId exhaustRequestedId = 0;\n\n    // =========================================================================\n    // Cache Operations\n    // =========================================================================\n\n    // Find or create entry for node using cuckoo hashing\n    // Returns nullptr if cache is full and eviction fails\n    UnifiedCacheEntry *findOrCreateEntry(NodeNum node, bool *isNew);\n\n    // Find existing entry (no creation)\n    UnifiedCacheEntry *findEntry(NodeNum node);\n\n    // NodeInfo cache operations (bucketed cuckoo index + PSRAM payloads)\n    const NodeInfoPayloadEntry *findNodeInfoEntry(NodeNum node) const;\n    NodeInfoPayloadEntry *findOrCreateNodeInfoEntry(NodeNum node, bool *usedEmptySlot);\n    uint16_t findNodeInfoPayloadIndex(NodeNum node) const;\n    bool removeNodeInfoIndexEntry(NodeNum node, uint16_t payloadIndex);\n    uint16_t allocateNodeInfoPayloadSlot();\n    uint16_t evictNodeInfoPayloadSlot();\n    bool tryInsertNodeInfoEntryInBucket(uint16_t bucket, uint16_t tag);\n    uint16_t encodeNodeInfoTag(uint16_t payloadIndex) const;\n    uint16_t decodeNodeInfoPayloadIndex(uint16_t tag) const;\n    uint16_t getNodeInfoTag(uint16_t slot) const;\n    void setNodeInfoTag(uint16_t slot, uint16_t tag);\n    uint16_t countNodeInfoEntriesLocked() const;\n    void cacheNodeInfoPacket(const meshtastic_MeshPacket &mp);\n\n    // =========================================================================\n    // Traffic Management Logic\n    // =========================================================================\n\n    bool shouldDropPosition(const meshtastic_MeshPacket *p, const meshtastic_Position *pos, uint32_t nowMs);\n    bool shouldRespondToNodeInfo(const meshtastic_MeshPacket *p, bool sendResponse);\n    bool isMinHopsFromRequestor(const meshtastic_MeshPacket *p) const;\n    bool isRateLimited(NodeNum from, uint32_t nowMs);\n    bool shouldDropUnknown(const meshtastic_MeshPacket *p, uint32_t nowMs);\n\n    void logAction(const char *action, const meshtastic_MeshPacket *p, const char *reason) const;\n    void incrementStat(uint32_t *field);\n};\n\n// =========================================================================\n// Compile-time Cache Size Calculations\n// =========================================================================\n//\n// Round TRAFFIC_MANAGEMENT_CACHE_SIZE up to next power of 2 for efficient\n// cuckoo hash indexing (allows bitmask instead of modulo).\n//\n// These use C++11-compatible constexpr (single return statement).\n//\n\nnamespace detail\n{\n// Helper: round up to next power of 2 using bit manipulation\nconstexpr uint16_t nextPow2(uint16_t n)\n{\n    return n == 0 ? 0 : (((n - 1) | ((n - 1) >> 1) | ((n - 1) >> 2) | ((n - 1) >> 4) | ((n - 1) >> 8)) + 1);\n}\n\n// Helper: floor(log2(n)) for n >= 0, C++11-compatible constexpr.\nconstexpr uint8_t log2Floor(uint16_t n)\n{\n    return n <= 1 ? 0 : static_cast<uint8_t>(1 + log2Floor(static_cast<uint16_t>(n >> 1)));\n}\n\n// Helper: ceil(log2(n)) for n >= 1, C++11-compatible constexpr.\nconstexpr uint8_t log2Ceil(uint16_t n)\n{\n    return n <= 1 ? 0 : static_cast<uint8_t>(1 + log2Floor(static_cast<uint16_t>(n - 1)));\n}\n} // namespace detail\n\nconstexpr uint16_t TrafficManagementModule::cacheSize()\n{\n    return detail::nextPow2(TRAFFIC_MANAGEMENT_CACHE_SIZE);\n}\n\nconstexpr uint16_t TrafficManagementModule::cacheMask()\n{\n    return cacheSize() > 0 ? cacheSize() - 1 : 0;\n}\n\nconstexpr uint8_t TrafficManagementModule::cuckooHashBits()\n{\n    return detail::log2Floor(cacheSize());\n}\n\nconstexpr uint16_t TrafficManagementModule::nodeInfoTargetEntries()\n{\n    return kNodeInfoTargetEntries;\n}\n\nconstexpr uint16_t TrafficManagementModule::nodeInfoIndexMetadataBudgetBytes()\n{\n    return kNodeInfoIndexMetadataBudgetBytes;\n}\n\nconstexpr uint8_t TrafficManagementModule::nodeInfoTargetOccupancyPercent()\n{\n    return kNodeInfoTargetOccupancyPercent;\n}\n\nconstexpr uint8_t TrafficManagementModule::nodeInfoBucketSize()\n{\n    return kNodeInfoBucketSize;\n}\n\nconstexpr uint8_t TrafficManagementModule::nodeInfoTagBits()\n{\n    return kNodeInfoTagBits;\n}\n\nconstexpr uint16_t TrafficManagementModule::nodeInfoTagMask()\n{\n    return kNodeInfoTagMask;\n}\n\nconstexpr uint16_t TrafficManagementModule::nodeInfoIndexSlots()\n{\n    return kNodeInfoIndexSlots;\n}\n\nconstexpr uint16_t TrafficManagementModule::nodeInfoBucketCount()\n{\n    return static_cast<uint16_t>(nodeInfoIndexSlots() / nodeInfoBucketSize());\n}\n\nconstexpr uint16_t TrafficManagementModule::nodeInfoBucketMask()\n{\n    return nodeInfoBucketCount() > 0 ? nodeInfoBucketCount() - 1 : 0;\n}\n\nconstexpr uint8_t TrafficManagementModule::nodeInfoBucketHashBits()\n{\n    return detail::log2Floor(nodeInfoBucketCount());\n}\n\nextern TrafficManagementModule *trafficManagementModule;\n\n#endif\n"
  },
  {
    "path": "src/modules/WaypointModule.cpp",
    "content": "#include \"WaypointModule.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"configuration.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/draw/CompassRenderer.h\"\n\n#if HAS_SCREEN\n#include \"gps/RTC.h\"\n#include \"graphics/Screen.h\"\n#include \"graphics/TimeFormatters.h\"\n#include \"graphics/draw/NodeListRenderer.h\"\n#include \"main.h\"\n#endif\n\nWaypointModule *waypointModule;\n\nstatic inline float degToRad(float deg)\n{\n    return deg * PI / 180.0f;\n}\nstatic inline float radToDeg(float rad)\n{\n    return rad * 180.0f / PI;\n}\n\nProcessMessage WaypointModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n    auto &p = mp.decoded;\n    LOG_INFO(\"Received waypoint msg from=0x%0x, id=0x%x, msg=%.*s\", mp.from, mp.id, p.payload.size, p.payload.bytes);\n#endif\n    // We only store/display messages destined for us.\n    // Keep a copy of the most recent text message.\n    devicestate.rx_waypoint = mp;\n    devicestate.has_rx_waypoint = true;\n\n    powerFSM.trigger(EVENT_RECEIVED_MSG);\n\n#if HAS_SCREEN\n\n    UIFrameEvent e;\n\n    // New or updated waypoint: focus on this frame next time Screen::setFrames runs\n    if (shouldDraw()) {\n        requestFocus();\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;\n    }\n\n    // Deleting an old waypoint: remove the frame quietly, don't change frame position if possible\n    else\n        e.action = UIFrameEvent::Action::REGENERATE_FRAMESET_BACKGROUND;\n\n    notifyObservers(&e);\n\n#endif\n\n    return ProcessMessage::CONTINUE; // Let others look at this message also if they want\n}\n\n#if HAS_SCREEN\nbool WaypointModule::shouldDraw()\n{\n#if !MESHTASTIC_EXCLUDE_WAYPOINT\n    if (!screen || !devicestate.has_rx_waypoint)\n        return false;\n\n    meshtastic_Waypoint wp{}; // <- replaces memset\n    if (pb_decode_from_bytes(devicestate.rx_waypoint.decoded.payload.bytes, devicestate.rx_waypoint.decoded.payload.size,\n                             &meshtastic_Waypoint_msg, &wp)) {\n        return wp.expire > getTime();\n    }\n    return false; // no LOG_ERROR, no flag writes\n#else\n    return false;\n#endif\n}\n\n/// Draw the last waypoint we received\nvoid WaypointModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    if (!screen)\n        return;\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = \"Waypoint\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    const int w = display->getWidth();\n    const int h = display->getHeight();\n\n    // Decode the waypoint\n    const meshtastic_MeshPacket &mp = devicestate.rx_waypoint;\n    meshtastic_Waypoint wp{};\n    if (!pb_decode_from_bytes(mp.decoded.payload.bytes, mp.decoded.payload.size, &meshtastic_Waypoint_msg, &wp)) {\n        devicestate.has_rx_waypoint = false;\n        return;\n    }\n\n    // Get timestamp info. Will pass as a field to drawColumns\n    char lastStr[20];\n    getTimeAgoStr(sinceReceived(&mp), lastStr, sizeof(lastStr));\n\n    // Will contain distance information, passed as a field to drawColumns\n    char distStr[20];\n\n    // Get our node, to use our own position\n    meshtastic_NodeInfoLite *ourNode = nodeDB->getMeshNode(nodeDB->getNodeNum());\n\n    // Dimensions / co-ordinates for the compass/circle\n    const uint16_t compassDiam = graphics::CompassRenderer::getCompassDiam(w, h);\n    const int16_t compassX = x + w - (compassDiam / 2) - 5;\n    const int16_t compassY = (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT)\n                                 ? y + h / 2\n                                 : y + FONT_HEIGHT_SMALL + (h - FONT_HEIGHT_SMALL) / 2;\n\n    // If our node has a position:\n    if (ourNode && (nodeDB->hasValidPosition(ourNode) || screen->hasHeading())) {\n        const meshtastic_PositionLite &op = ourNode->position;\n        float myHeading;\n        if (uiconfig.compass_mode == meshtastic_CompassMode_FREEZE_HEADING) {\n            myHeading = 0;\n        } else {\n            if (screen->hasHeading())\n                myHeading = degToRad(screen->getHeading());\n            else\n                myHeading = screen->estimatedHeading(DegD(op.latitude_i), DegD(op.longitude_i));\n        }\n        graphics::CompassRenderer::drawCompassNorth(display, compassX, compassY, myHeading, (compassDiam / 2));\n\n        // Compass bearing to waypoint\n        float bearingToOther =\n            GeoCoord::bearing(DegD(op.latitude_i), DegD(op.longitude_i), DegD(wp.latitude_i), DegD(wp.longitude_i));\n        // If the top of the compass is a static north then bearingToOther can be drawn on the compass directly\n        // If the top of the compass is not a static north we need adjust bearingToOther based on heading\n        if (uiconfig.compass_mode != meshtastic_CompassMode_FREEZE_HEADING)\n            bearingToOther -= myHeading;\n        graphics::CompassRenderer::drawNodeHeading(display, compassX, compassY, compassDiam, bearingToOther);\n\n        float bearingToOtherDegrees = (bearingToOther < 0) ? bearingToOther + 2 * PI : bearingToOther;\n        bearingToOtherDegrees = radToDeg(bearingToOtherDegrees);\n\n        // Distance to Waypoint\n        float d = GeoCoord::latLongToMeter(DegD(wp.latitude_i), DegD(wp.longitude_i), DegD(op.latitude_i), DegD(op.longitude_i));\n        if (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) {\n            float feet = d * METERS_TO_FEET;\n            snprintf(distStr, sizeof(distStr), feet < (2 * MILES_TO_FEET) ? \"%.0fft   %.0f°\" : \"%.1fmi   %.0f°\",\n                     feet < (2 * MILES_TO_FEET) ? feet : feet / MILES_TO_FEET, bearingToOtherDegrees);\n        } else {\n            snprintf(distStr, sizeof(distStr), d < 2000 ? \"%.0fm   %.0f°\" : \"%.1fkm   %.0f°\", d < 2000 ? d : d / 1000,\n                     bearingToOtherDegrees);\n        }\n    }\n\n    else {\n        display->drawString(compassX - FONT_HEIGHT_SMALL / 4, compassY - FONT_HEIGHT_SMALL / 2, \"?\");\n\n        // ? in the distance field\n        snprintf(distStr, sizeof(distStr), \"? %s ?°\",\n                 (config.display.units == meshtastic_Config_DisplayConfig_DisplayUnits_IMPERIAL) ? \"mi\" : \"km\");\n    }\n\n    // Draw compass circle\n    display->drawCircle(compassX, compassY, compassDiam / 2);\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT); // Something above me changes to a different alignment, forcing a fix here!\n    display->drawString(0, graphics::getTextPositions(display)[line++], lastStr);\n    display->drawString(0, graphics::getTextPositions(display)[line++], wp.name);\n    display->drawString(0, graphics::getTextPositions(display)[line++], wp.description);\n    display->drawString(0, graphics::getTextPositions(display)[line++], distStr);\n}\n#endif\n"
  },
  {
    "path": "src/modules/WaypointModule.h",
    "content": "#pragma once\n#include \"Observer.h\"\n#include \"SinglePortModule.h\"\n\n/**\n * Waypoint message handling for meshtastic\n */\nclass WaypointModule : public SinglePortModule, public Observable<const UIFrameEvent *>\n{\n  public:\n    /** Constructor\n     * name is for debugging output\n     */\n    WaypointModule() : SinglePortModule(\"waypoint\", meshtastic_PortNum_WAYPOINT_APP) {}\n#if HAS_SCREEN\n    bool shouldDraw();\n#endif\n  protected:\n    /** Called to handle a particular incoming message\n\n    @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for\n    it\n    */\n\n    virtual Observable<const UIFrameEvent *> *getUIFrameObservable() override { return this; }\n#if HAS_SCREEN\n    virtual bool wantUIFrame() override { return this->shouldDraw(); }\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n};\n\nextern WaypointModule *waypointModule;"
  },
  {
    "path": "src/modules/esp32/AudioModule.cpp",
    "content": "#include \"configuration.h\"\n#if defined(ARCH_ESP32) && defined(USE_SX1280)\n#include \"AudioModule.h\"\n#include \"FSCommon.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RTC.h\"\n#include \"Router.h\"\n\n/*\n    AudioModule\n        A interface to send raw codec2 audio data over the mesh network. Based on the example code from the ESP32_codec2 project.\n        https://github.com/deulis/ESP32_Codec2\n\n        Codec 2 is a low-bitrate speech audio codec (speech coding)\n        that is patent free and open source develop by David Grant Rowe.\n        http://www.rowetel.com/ and https://github.com/drowe67/codec2\n\n    Basic Usage:\n        1) Enable the module by setting audio.codec2_enabled to 1.\n        2) Set the pins for the I2S interface. Recommended on TLora is I2S_WS 13/I2S_SD 15/I2S_SIN 2/I2S_SCK 14\n        3) Set audio.bitrate to the desired codec2 rate (CODEC2_3200, CODEC2_2400, CODEC2_1600, CODEC2_1400, CODEC2_1300,\n   CODEC2_1200, CODEC2_700, CODEC2_700B)\n\n    KNOWN PROBLEMS\n        * Half Duplex\n        * Will not work on NRF and the Linux device targets (yet?).\n*/\n\nButterworthFilter hp_filter(240, 8000, ButterworthFilter::ButterworthFilter::Highpass, 1);\n\nTaskHandle_t codec2HandlerTask;\nAudioModule *audioModule;\n\n#ifdef ARCH_ESP32\n// ESP32 doesn't use that flag\n#define YIELD_FROM_ISR(x) portYIELD_FROM_ISR()\n#else\n#define YIELD_FROM_ISR(x) portYIELD_FROM_ISR(x)\n#endif\n\n#include \"graphics/ScreenFonts.h\"\n\nvoid run_codec2(void *parameter)\n{\n    // 4 bytes of header in each frame hex c0 de c2 plus the bitrate\n    memcpy(audioModule->tx_encode_frame, &audioModule->tx_header, sizeof(audioModule->tx_header));\n\n    LOG_INFO(\"Start codec2 task\");\n\n    while (true) {\n        uint32_t tcount = ulTaskNotifyTake(pdFALSE, pdMS_TO_TICKS(10000));\n\n        if (tcount != 0) {\n            if (audioModule->radio_state == RadioState::tx) {\n                for (int i = 0; i < audioModule->adc_buffer_size; i++)\n                    audioModule->speech[i] = (int16_t)hp_filter.Update((float)audioModule->speech[i]);\n\n                codec2_encode(audioModule->codec2, audioModule->tx_encode_frame + audioModule->tx_encode_frame_index,\n                              audioModule->speech);\n                audioModule->tx_encode_frame_index += audioModule->encode_codec_size;\n\n                if (audioModule->tx_encode_frame_index == (audioModule->encode_frame_size + sizeof(audioModule->tx_header))) {\n                    LOG_INFO(\"Send %d codec2 bytes\", audioModule->encode_frame_size);\n                    audioModule->sendPayload();\n                    audioModule->tx_encode_frame_index = sizeof(audioModule->tx_header);\n                }\n            }\n            if (audioModule->radio_state == RadioState::rx) {\n                size_t bytesOut = 0;\n                if (memcmp(audioModule->rx_encode_frame, &audioModule->tx_header, sizeof(audioModule->tx_header)) == 0) {\n                    for (int i = 4; i < audioModule->rx_encode_frame_index; i += audioModule->encode_codec_size) {\n                        codec2_decode(audioModule->codec2, audioModule->output_buffer, audioModule->rx_encode_frame + i);\n                        i2s_write(I2S_PORT, &audioModule->output_buffer, audioModule->adc_buffer_size, &bytesOut,\n                                  pdMS_TO_TICKS(500));\n                    }\n                } else {\n                    // if the buffer header does not match our own codec, make a temp decoding setup.\n                    CODEC2 *tmp_codec2 = codec2_create(audioModule->rx_encode_frame[3]);\n                    codec2_set_lpc_post_filter(tmp_codec2, 1, 0, 0.8, 0.2);\n                    int tmp_encode_codec_size = (codec2_bits_per_frame(tmp_codec2) + 7) / 8;\n                    int tmp_adc_buffer_size = codec2_samples_per_frame(tmp_codec2);\n                    for (int i = 4; i < audioModule->rx_encode_frame_index; i += tmp_encode_codec_size) {\n                        codec2_decode(tmp_codec2, audioModule->output_buffer, audioModule->rx_encode_frame + i);\n                        i2s_write(I2S_PORT, &audioModule->output_buffer, tmp_adc_buffer_size, &bytesOut, pdMS_TO_TICKS(500));\n                    }\n                    codec2_destroy(tmp_codec2);\n                }\n            }\n        }\n    }\n}\n\nAudioModule::AudioModule() : SinglePortModule(\"Audio\", meshtastic_PortNum_AUDIO_APP), concurrency::OSThread(\"Audio\")\n{\n    // moduleConfig.audio.codec2_enabled = true;\n    // moduleConfig.audio.i2s_ws = 13;\n    // moduleConfig.audio.i2s_sd = 15;\n    // moduleConfig.audio.i2s_din = 22;\n    // moduleConfig.audio.i2s_sck = 14;\n    // moduleConfig.audio.ptt_pin = 39;\n\n    if ((moduleConfig.audio.codec2_enabled) && (myRegion->profile->audioPermitted)) {\n        LOG_INFO(\"Set up codec2 in mode %u\", (moduleConfig.audio.bitrate ? moduleConfig.audio.bitrate : AUDIO_MODULE_MODE) - 1);\n        codec2 = codec2_create((moduleConfig.audio.bitrate ? moduleConfig.audio.bitrate : AUDIO_MODULE_MODE) - 1);\n        memcpy(tx_header.magic, c2_magic, sizeof(c2_magic));\n        tx_header.mode = (moduleConfig.audio.bitrate ? moduleConfig.audio.bitrate : AUDIO_MODULE_MODE) - 1;\n        codec2_set_lpc_post_filter(codec2, 1, 0, 0.8, 0.2);\n        encode_codec_size = (codec2_bits_per_frame(codec2) + 7) / 8;\n        encode_frame_num = (meshtastic_Constants_DATA_PAYLOAD_LEN - sizeof(tx_header)) / encode_codec_size;\n        encode_frame_size = encode_frame_num * encode_codec_size; // max 233 bytes + 4 header bytes\n        adc_buffer_size = codec2_samples_per_frame(codec2);\n        LOG_INFO(\"Use %d frames of %d bytes for a total payload length of %d bytes\", encode_frame_num, encode_codec_size,\n                 encode_frame_size);\n        xTaskCreate(&run_codec2, \"codec2_task\", 30000, NULL, 5, &codec2HandlerTask);\n    } else {\n        disable();\n    }\n}\n\nvoid AudioModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    char buffer[50];\n\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL);\n    display->setColor(BLACK);\n    display->drawStringf(0 + x, 0 + y, buffer, \"Codec2 Mode %d Audio\",\n                         (moduleConfig.audio.bitrate ? moduleConfig.audio.bitrate : AUDIO_MODULE_MODE) - 1);\n    display->setColor(WHITE);\n    display->setFont(FONT_LARGE);\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    switch (radio_state) {\n    case RadioState::tx:\n        display->drawString(display->getWidth() / 2 + x, (display->getHeight() - FONT_HEIGHT_SMALL) / 2 + y, \"PTT\");\n        break;\n    default:\n        display->drawString(display->getWidth() / 2 + x, (display->getHeight() - FONT_HEIGHT_SMALL) / 2 + y, \"Receive\");\n        break;\n    }\n}\n\nint32_t AudioModule::runOnce()\n{\n    if ((moduleConfig.audio.codec2_enabled) && (myRegion->profile->audioPermitted)) {\n        esp_err_t res;\n        if (firstTime) {\n            // Set up I2S Processor configuration. This will produce 16bit samples at 8 kHz instead of 12 from the ADC\n            LOG_INFO(\"Init I2S SD: %d DIN: %d WS: %d SCK: %d\", moduleConfig.audio.i2s_sd, moduleConfig.audio.i2s_din,\n                     moduleConfig.audio.i2s_ws, moduleConfig.audio.i2s_sck);\n            i2s_config_t i2s_config = {.mode = (i2s_mode_t)(I2S_MODE_MASTER | (moduleConfig.audio.i2s_sd ? I2S_MODE_RX : 0) |\n                                                            (moduleConfig.audio.i2s_din ? I2S_MODE_TX : 0)),\n                                       .sample_rate = 8000,\n                                       .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT,\n                                       .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT,\n                                       .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_STAND_I2S),\n                                       .intr_alloc_flags = 0,\n                                       .dma_buf_count = 8,\n                                       .dma_buf_len = adc_buffer_size, // 320 * 2 bytes\n                                       .use_apll = false,\n                                       .tx_desc_auto_clear = true,\n                                       .fixed_mclk = 0};\n            res = i2s_driver_install(I2S_PORT, &i2s_config, 0, NULL);\n            if (res != ESP_OK) {\n                LOG_ERROR(\"Failed to install I2S driver: %d\", res);\n            }\n\n            const i2s_pin_config_t pin_config = {\n                .bck_io_num = moduleConfig.audio.i2s_sck,\n                .ws_io_num = moduleConfig.audio.i2s_ws,\n                .data_out_num = moduleConfig.audio.i2s_din ? moduleConfig.audio.i2s_din : I2S_PIN_NO_CHANGE,\n                .data_in_num = moduleConfig.audio.i2s_sd ? moduleConfig.audio.i2s_sd : I2S_PIN_NO_CHANGE};\n            res = i2s_set_pin(I2S_PORT, &pin_config);\n            if (res != ESP_OK) {\n                LOG_ERROR(\"Failed to set I2S pin config: %d\", res);\n            }\n\n            res = i2s_start(I2S_PORT);\n            if (res != ESP_OK) {\n                LOG_ERROR(\"Failed to start I2S: %d\", res);\n            }\n\n            radio_state = RadioState::rx;\n\n            // Configure PTT input\n            LOG_INFO(\"Init PTT on Pin %u\", moduleConfig.audio.ptt_pin ? moduleConfig.audio.ptt_pin : PTT_PIN);\n            pinMode(moduleConfig.audio.ptt_pin ? moduleConfig.audio.ptt_pin : PTT_PIN, INPUT);\n\n            firstTime = false;\n        } else {\n            UIFrameEvent e;\n            // Check if PTT is pressed. TODO hook that into Onebutton/Interrupt drive.\n            if (digitalRead(moduleConfig.audio.ptt_pin ? moduleConfig.audio.ptt_pin : PTT_PIN) == HIGH) {\n                if (radio_state == RadioState::rx) {\n                    LOG_INFO(\"PTT pressed, switching to TX\");\n                    radio_state = RadioState::tx;\n                    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen\n                    this->notifyObservers(&e);\n                }\n            } else {\n                if (radio_state == RadioState::tx) {\n                    LOG_INFO(\"PTT released, switching to RX\");\n                    if (tx_encode_frame_index > sizeof(tx_header)) {\n                        // Send the incomplete frame\n                        LOG_INFO(\"Send %d codec2 bytes (incomplete)\", tx_encode_frame_index);\n                        sendPayload();\n                    }\n                    tx_encode_frame_index = sizeof(tx_header);\n                    radio_state = RadioState::rx;\n                    e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen\n                    this->notifyObservers(&e);\n                }\n            }\n            if (radio_state == RadioState::tx) {\n                // Get I2S data from the microphone and place in data buffer\n                size_t bytesIn = 0;\n                res = i2s_read(I2S_PORT, adc_buffer + adc_buffer_index, adc_buffer_size - adc_buffer_index, &bytesIn,\n                               pdMS_TO_TICKS(40)); // wait 40ms for audio to arrive.\n\n                if (res == ESP_OK) {\n                    adc_buffer_index += bytesIn;\n                    if (adc_buffer_index == adc_buffer_size) {\n                        adc_buffer_index = 0;\n                        memcpy((void *)speech, (void *)adc_buffer, 2 * adc_buffer_size);\n                        // Notify run_codec2 task that the buffer is ready.\n                        radio_state = RadioState::tx;\n                        BaseType_t xHigherPriorityTaskWoken = pdFALSE;\n                        vTaskNotifyGiveFromISR(codec2HandlerTask, &xHigherPriorityTaskWoken);\n                        if (xHigherPriorityTaskWoken == pdTRUE)\n                            YIELD_FROM_ISR(xHigherPriorityTaskWoken);\n                    }\n                }\n            }\n        }\n        return 100;\n    } else {\n        return disable();\n    }\n}\n\nmeshtastic_MeshPacket *AudioModule::allocReply()\n{\n    auto reply = allocDataPacket();\n    return reply;\n}\n\nbool AudioModule::shouldDraw()\n{\n    if (!moduleConfig.audio.codec2_enabled) {\n        return false;\n    }\n    return (radio_state == RadioState::tx);\n}\n\nvoid AudioModule::sendPayload(NodeNum dest, bool wantReplies)\n{\n    meshtastic_MeshPacket *p = allocReply();\n    p->to = dest;\n    p->decoded.want_response = wantReplies;\n\n    p->want_ack = false;                              // Audio is shoot&forget. No need to wait for ACKs.\n    p->priority = meshtastic_MeshPacket_Priority_MAX; // Audio is important, because realtime\n\n    p->decoded.payload.size = tx_encode_frame_index;\n    memcpy(p->decoded.payload.bytes, tx_encode_frame, p->decoded.payload.size);\n\n    service->sendToMesh(p);\n}\n\nProcessMessage AudioModule::handleReceived(const meshtastic_MeshPacket &mp)\n{\n    if ((moduleConfig.audio.codec2_enabled) && (myRegion->profile->audioPermitted)) {\n        auto &p = mp.decoded;\n        if (!isFromUs(&mp)) {\n            memcpy(rx_encode_frame, p.payload.bytes, p.payload.size);\n            radio_state = RadioState::rx;\n            rx_encode_frame_index = p.payload.size;\n            // Notify run_codec2 task that the buffer is ready.\n            BaseType_t xHigherPriorityTaskWoken = pdFALSE;\n            vTaskNotifyGiveFromISR(codec2HandlerTask, &xHigherPriorityTaskWoken);\n            if (xHigherPriorityTaskWoken == pdTRUE)\n                YIELD_FROM_ISR(xHigherPriorityTaskWoken);\n        }\n    }\n\n    return ProcessMessage::CONTINUE;\n}\n\n#endif"
  },
  {
    "path": "src/modules/esp32/AudioModule.h",
    "content": "#pragma once\n\n#include \"SinglePortModule.h\"\n#include \"concurrency/NotifiedWorkerThread.h\"\n#include \"configuration.h\"\n#if defined(ARCH_ESP32) && defined(USE_SX1280)\n#include \"NodeDB.h\"\n#include <Arduino.h>\n#include <ButterworthFilter.h>\n#include <OLEDDisplay.h>\n#include <OLEDDisplayUi.h>\n#include <codec2.h>\n#include <driver/i2s.h>\n#include <functional>\n\nenum RadioState { standby, rx, tx };\n\nconst char c2_magic[3] = {0xc0, 0xde, 0xc2}; // Magic number for codec2 header\n\nstruct c2_header {\n    char magic[3];\n    char mode;\n};\n\n#define ADC_BUFFER_SIZE_MAX 320\n#define PTT_PIN 39\n\n#define I2S_PORT I2S_NUM_0\n\n#define AUDIO_MODULE_RX_BUFFER 128\n#define AUDIO_MODULE_MODE meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700\n\nclass AudioModule : public SinglePortModule, public Observable<const UIFrameEvent *>, private concurrency::OSThread\n{\n  public:\n    unsigned char rx_encode_frame[meshtastic_Constants_DATA_PAYLOAD_LEN] = {};\n    unsigned char tx_encode_frame[meshtastic_Constants_DATA_PAYLOAD_LEN] = {};\n    c2_header tx_header = {};\n    int16_t speech[ADC_BUFFER_SIZE_MAX] = {};\n    int16_t output_buffer[ADC_BUFFER_SIZE_MAX] = {};\n    uint16_t adc_buffer[ADC_BUFFER_SIZE_MAX] = {};\n    int adc_buffer_size = 0;\n    uint16_t adc_buffer_index = 0;\n    int tx_encode_frame_index = sizeof(c2_header); // leave room for header\n    int rx_encode_frame_index = 0;\n    int encode_codec_size = 0;\n    int encode_frame_size = 0;\n    volatile RadioState radio_state = RadioState::rx;\n\n    struct CODEC2 *codec2 = NULL;\n    // int16_t sample;\n\n    AudioModule();\n\n    bool shouldDraw();\n\n    /**\n     * Send our payload into the mesh\n     */\n    void sendPayload(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);\n\n  protected:\n    int encode_frame_num = 0;\n    bool firstTime = true;\n\n    virtual int32_t runOnce() override;\n\n    virtual meshtastic_MeshPacket *allocReply() override;\n\n    virtual bool wantUIFrame() override { return this->shouldDraw(); }\n    virtual Observable<const UIFrameEvent *> *getUIFrameObservable() override { return this; }\n#if !HAS_SCREEN\n    void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n#else\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n\n    /** Called to handle a particular incoming message\n     * @return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered\n     * for it\n     */\n    virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;\n};\n\nextern AudioModule *audioModule;\n\n#endif"
  },
  {
    "path": "src/modules/esp32/PaxcounterModule.cpp",
    "content": "#include \"configuration.h\"\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_PAXCOUNTER\n#include \"Default.h\"\n#include \"MeshService.h\"\n#include \"PaxcounterModule.h\"\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n#include \"graphics/images.h\"\n#include <assert.h>\n\nPaxcounterModule *paxcounterModule;\n\n/**\n * Callback function for libpax.\n * We only clear our sent flag here, since this function is called from another thread, so we\n * cannot send to the mesh directly.\n */\nvoid PaxcounterModule::handlePaxCounterReportRequest()\n{\n    // The libpax library already updated our data structure, just before invoking this callback.\n    LOG_INFO(\"PaxcounterModule: libpax reported new data: wifi=%d; ble=%d; uptime=%lu\",\n             paxcounterModule->count_from_libpax.wifi_count, paxcounterModule->count_from_libpax.ble_count, millis() / 1000);\n    paxcounterModule->reportedDataSent = false;\n    paxcounterModule->setIntervalFromNow(0);\n}\n\nPaxcounterModule::PaxcounterModule()\n    : concurrency::OSThread(\"Paxcounter\"),\n      ProtobufModule(\"paxcounter\", meshtastic_PortNum_PAXCOUNTER_APP, &meshtastic_Paxcount_msg)\n{\n}\n\n/**\n * Send the Pax information to the mesh if we got new data from libpax.\n * This is called periodically from our runOnce() method and will actually send the data to the mesh\n * if libpax updated it since the last transmission through the callback.\n * @param dest - destination node (usually NODENUM_BROADCAST)\n * @return false if sending is unnecessary, true if information was sent\n */\nbool PaxcounterModule::sendInfo(NodeNum dest)\n{\n    if (paxcounterModule->reportedDataSent)\n        return false;\n\n    LOG_INFO(\"PaxcounterModule: send pax info wifi=%d; ble=%d; uptime=%lu\", count_from_libpax.wifi_count,\n             count_from_libpax.ble_count, millis() / 1000);\n\n    meshtastic_Paxcount pl = meshtastic_Paxcount_init_default;\n    pl.wifi = count_from_libpax.wifi_count;\n    pl.ble = count_from_libpax.ble_count;\n    pl.uptime = millis() / 1000;\n\n    meshtastic_MeshPacket *p = allocDataProtobuf(pl);\n    p->to = dest;\n    p->decoded.want_response = false;\n    p->priority = meshtastic_MeshPacket_Priority_BACKGROUND;\n\n    service->sendToMesh(p, RX_SRC_LOCAL, true);\n\n    paxcounterModule->reportedDataSent = true;\n\n    return true;\n}\n\nbool PaxcounterModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Paxcount *p)\n{\n    return false; // Let others look at this message also if they want. We don't do anything with received packets.\n}\n\nmeshtastic_MeshPacket *PaxcounterModule::allocReply()\n{\n    meshtastic_Paxcount pl = meshtastic_Paxcount_init_default;\n    pl.wifi = count_from_libpax.wifi_count;\n    pl.ble = count_from_libpax.ble_count;\n    pl.uptime = millis() / 1000;\n    return allocDataProtobuf(pl);\n}\n\nint32_t PaxcounterModule::runOnce()\n{\n    if (isActive()) {\n        if (firstTime) {\n            firstTime = false;\n            LOG_DEBUG(\"Paxcounter starting up with interval of %d seconds\",\n                      Default::getConfiguredOrDefault(moduleConfig.paxcounter.paxcounter_update_interval,\n                                                      default_telemetry_broadcast_interval_secs));\n            struct libpax_config_t configuration;\n            libpax_default_config(&configuration);\n\n            configuration.blecounter = 1;\n            configuration.blescantime = 0; // infinite\n            configuration.wificounter = 1;\n            configuration.wifi_channel_map = WIFI_CHANNEL_ALL;\n            configuration.wifi_channel_switch_interval = 50;\n            configuration.wifi_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.wifi_threshold, -80);\n            configuration.ble_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.ble_threshold, -80);\n            libpax_update_config(&configuration);\n\n            // internal processing initialization\n            libpax_counter_init(handlePaxCounterReportRequest, &count_from_libpax,\n                                Default::getConfiguredOrDefault(moduleConfig.paxcounter.paxcounter_update_interval,\n                                                                default_telemetry_broadcast_interval_secs),\n                                0);\n            libpax_counter_start();\n        } else {\n            sendInfo(NODENUM_BROADCAST);\n        }\n        return Default::getConfiguredOrDefaultMsScaled(moduleConfig.paxcounter.paxcounter_update_interval,\n                                                       default_telemetry_broadcast_interval_secs, numOnlineNodes);\n    } else {\n        return disable();\n    }\n}\n\n#if HAS_SCREEN\n\n#include \"graphics/ScreenFonts.h\"\n#include \"graphics/SharedUIDisplay.h\"\n\nvoid PaxcounterModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    display->clear();\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n    int line = 1;\n\n    // === Set Title\n    const char *titleStr = \"Pax\";\n\n    // === Header ===\n    graphics::drawCommonHeader(display, x, y, titleStr);\n\n    char buffer[50];\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_SMALL);\n\n    libpax_counter_count(&count_from_libpax);\n\n    display->setTextAlignment(TEXT_ALIGN_CENTER);\n    display->setFont(FONT_SMALL);\n    display->drawStringf(display->getWidth() / 2 + x, graphics::getTextPositions(display)[line++], buffer,\n                         \"WiFi: %d\\nBLE: %d\\nUptime: %ds\", count_from_libpax.wifi_count, count_from_libpax.ble_count,\n                         millis() / 1000);\n    graphics::drawCommonFooter(display, x, y);\n}\n#endif // HAS_SCREEN\n\n#endif"
  },
  {
    "path": "src/modules/esp32/PaxcounterModule.h",
    "content": "#pragma once\n\n#include \"ProtobufModule.h\"\n#include \"configuration.h\"\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_PAXCOUNTER\n#include \"../mesh/generated/meshtastic/paxcount.pb.h\"\n#include \"NodeDB.h\"\n#include <libpax_api.h>\n\n/**\n * Wrapper module for the estimate passenger (PAX) count library (https://github.com/dbinfrago/libpax) which\n * implements the core functionality of the ESP32 Paxcounter project (https://github.com/cyberman54/ESP32-Paxcounter)\n */\nclass PaxcounterModule : private concurrency::OSThread, public ProtobufModule<meshtastic_Paxcount>\n{\n    bool firstTime = true;\n    bool reportedDataSent = true;\n\n    static void handlePaxCounterReportRequest();\n\n  public:\n    PaxcounterModule();\n\n  protected:\n    struct count_payload_t count_from_libpax = {0, 0, 0};\n    virtual int32_t runOnce() override;\n    bool sendInfo(NodeNum dest = NODENUM_BROADCAST);\n    virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Paxcount *p) override;\n    virtual meshtastic_MeshPacket *allocReply() override;\n    bool isActive() { return moduleConfig.paxcounter.enabled && !config.bluetooth.enabled && !config.network.wifi_enabled; }\n#if HAS_SCREEN\n    virtual bool wantUIFrame() override { return isActive(); }\n    virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override;\n#endif\n};\n\nextern PaxcounterModule *paxcounterModule;\n#endif\n"
  },
  {
    "path": "src/motion/AccelerometerThread.h",
    "content": "#pragma once\n#ifndef _ACCELEROMETER_H_\n#define _ACCELEROMETER_H_\n\n#include \"configuration.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n\n#include \"../concurrency/OSThread.h\"\n#ifdef HAS_BMA423\n#include \"BMA423Sensor.h\"\n#endif\n#ifdef HAS_BMI270\n#include \"BMI270Sensor.h\"\n#endif\n#include \"BMM150Sensor.h\"\n#include \"BMX160Sensor.h\"\n#include \"ICM20948Sensor.h\"\n#include \"LIS3DHSensor.h\"\n#include \"LSM6DS3Sensor.h\"\n#include \"MPU6050Sensor.h\"\n#include \"MotionSensor.h\"\n#ifdef HAS_QMA6100P\n#include \"QMA6100PSensor.h\"\n#endif\n#ifdef HAS_STK8XXX\n#include \"STK8XXXSensor.h\"\n#endif\n\nextern ScanI2C::DeviceAddress accelerometer_found;\n\nclass AccelerometerThread : public concurrency::OSThread\n{\n  private:\n    MotionSensor *sensor = nullptr;\n    bool isInitialised = false;\n\n  public:\n    explicit AccelerometerThread(ScanI2C::FoundDevice foundDevice) : OSThread(\"Accelerometer\")\n    {\n        device = foundDevice;\n        init();\n    }\n\n    explicit AccelerometerThread(ScanI2C::DeviceType type) : AccelerometerThread(ScanI2C::FoundDevice{type, accelerometer_found})\n    {\n    }\n\n    void start()\n    {\n        init();\n        setIntervalFromNow(0);\n    };\n\n    void calibrate(uint16_t forSeconds)\n    {\n        if (sensor) {\n            sensor->calibrate(forSeconds);\n        }\n    }\n\n  protected:\n    int32_t runOnce() override\n    {\n        // Assume we should not keep the board awake\n        canSleep = true;\n\n        if (isInitialised)\n            return sensor->runOnce();\n\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n\n  private:\n    ScanI2C::FoundDevice device;\n\n    void init()\n    {\n        if (isInitialised)\n            return;\n\n        if (device.address.port == ScanI2C::I2CPort::NO_I2C || device.address.address == 0 || device.type == ScanI2C::NONE) {\n            LOG_DEBUG(\"AccelerometerThread Disable due to no sensors found\");\n            disable();\n            return;\n        }\n\n        switch (device.type) {\n#ifdef HAS_BMA423\n        case ScanI2C::DeviceType::BMA423:\n            sensor = new BMA423Sensor(device);\n            break;\n#endif\n        case ScanI2C::DeviceType::MPU6050:\n            sensor = new MPU6050Sensor(device);\n            break;\n        case ScanI2C::DeviceType::BMX160:\n            sensor = new BMX160Sensor(device);\n            break;\n        case ScanI2C::DeviceType::LIS3DH:\n            sensor = new LIS3DHSensor(device);\n            break;\n        case ScanI2C::DeviceType::LSM6DS3:\n            sensor = new LSM6DS3Sensor(device);\n            break;\n#ifdef HAS_STK8XXX\n        case ScanI2C::DeviceType::STK8BAXX:\n            sensor = new STK8XXXSensor(device);\n            break;\n#endif\n        case ScanI2C::DeviceType::ICM20948:\n            sensor = new ICM20948Sensor(device);\n            break;\n        case ScanI2C::DeviceType::BMM150:\n            sensor = new BMM150Sensor(device);\n            break;\n#ifdef HAS_BMI270\n        case ScanI2C::DeviceType::BMI270:\n            sensor = new BMI270Sensor(device);\n            break;\n#endif\n#ifdef HAS_QMA6100P\n        case ScanI2C::DeviceType::QMA6100P:\n            sensor = new QMA6100PSensor(device);\n            break;\n#endif\n        default:\n            disable();\n            return;\n        }\n\n        isInitialised = sensor->init();\n        if (!isInitialised) {\n            clean();\n        }\n        LOG_DEBUG(\"AccelerometerThread::init %s\", isInitialised ? \"ok\" : \"failed\");\n    }\n\n    // Copy constructor (not implemented / included to avoid cppcheck warnings)\n    AccelerometerThread(const AccelerometerThread &other) : OSThread::OSThread(\"Accelerometer\") { this->copy(other); }\n\n    // Destructor (included to avoid cppcheck warnings)\n    virtual ~AccelerometerThread() { clean(); }\n\n    // Copy assignment (not implemented / included to avoid cppcheck warnings)\n    AccelerometerThread &operator=(const AccelerometerThread &other)\n    {\n        this->copy(other);\n        return *this;\n    }\n\n    // Take a very shallow copy (does not copy OSThread state nor the sensor object)\n    // If for some reason this is ever used, make sure to call init() after any copy\n    void copy(const AccelerometerThread &other)\n    {\n        if (this != &other) {\n            clean();\n            this->device = ScanI2C::FoundDevice(other.device.type,\n                                                ScanI2C::DeviceAddress(other.device.address.port, other.device.address.address));\n        }\n    }\n\n    // Cleanup resources\n    void clean()\n    {\n        isInitialised = false;\n        delete sensor;\n        sensor = nullptr;\n    }\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "src/motion/BMA423Sensor.cpp",
    "content": "#include \"BMA423Sensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_BMA423) && __has_include(<SensorBMA423.hpp>)\n\nBMA423Sensor::BMA423Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\nbool BMA423Sensor::init()\n{\n    if (sensor.begin(Wire, deviceAddress())) {\n        sensor.configAccelerometer(sensor.RANGE_2G, sensor.ODR_100HZ, sensor.BW_NORMAL_AVG4, sensor.PERF_CONTINUOUS_MODE);\n        sensor.enableAccelerometer();\n        sensor.configInterrupt();\n\n#ifdef BMA423_INT\n        pinMode(BMA4XX_INT, INPUT);\n        attachInterrupt(\n            BMA4XX_INT,\n            [] {\n                // Set interrupt to set irq value to true\n                BMA_IRQ = true;\n            },\n            RISING); // Select the interrupt mode according to the actual circuit\n#endif\n\n#ifdef T_WATCH_S3\n        // Need to raise the wrist function, need to set the correct axis\n        sensor.setRemapAxes(sensor.REMAP_TOP_LAYER_RIGHT_CORNER);\n#else\n        sensor.setRemapAxes(sensor.REMAP_BOTTOM_LAYER_BOTTOM_LEFT_CORNER);\n#endif\n        // sensor.enableFeature(sensor.FEATURE_STEP_CNTR, true);\n        sensor.enableFeature(sensor.FEATURE_TILT, true);\n        sensor.enableFeature(sensor.FEATURE_WAKEUP, true);\n        // sensor.resetPedometer();\n\n        // Turn on feature interrupt\n        sensor.enablePedometerIRQ();\n        sensor.enableTiltIRQ();\n\n        // It corresponds to isDoubleClick interrupt\n        sensor.enableWakeupIRQ();\n        LOG_DEBUG(\"BMA423 init ok\");\n        return true;\n    }\n    LOG_DEBUG(\"BMA423 init failed\");\n    return false;\n}\n\nint32_t BMA423Sensor::runOnce()\n{\n    if (sensor.readIrqStatus()) {\n        if (sensor.isTilt() || sensor.isDoubleTap()) {\n            wakeScreen();\n            return 500;\n        }\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif"
  },
  {
    "path": "src/motion/BMA423Sensor.h",
    "content": "#pragma once\n#ifndef _BMA423_SENSOR_H_\n#define _BMA423_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_BMA423) && __has_include(<SensorBMA423.hpp>)\n\n#include <SensorBMA423.hpp>\n#include <Wire.h>\n\nclass BMA423Sensor : public MotionSensor\n{\n  private:\n    SensorBMA423 sensor;\n    volatile bool BMA_IRQ = false;\n\n  public:\n    explicit BMA423Sensor(ScanI2C::FoundDevice foundDevice);\n    virtual bool init() override;\n    virtual int32_t runOnce() override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/BMI270Sensor.cpp",
    "content": "#include \"BMI270Sensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_BMI270)\n\n#include <pgmspace.h>\n\n// BMI270 registers used\n#define BMI270_REG_ACC_X_LSB 0x0C\n#define BMI270_REG_INTERNAL_STATUS 0x21\n#define BMI270_REG_ACC_CONF 0x40\n#define BMI270_REG_ACC_RANGE 0x41\n#define BMI270_REG_INIT_CTRL 0x59\n#define BMI270_REG_INIT_ADDR_0 0x5B\n#define BMI270_REG_INIT_ADDR_1 0x5C\n#define BMI270_REG_INIT_DATA 0x5E\n#define BMI270_REG_PWR_CONF 0x7C\n#define BMI270_REG_PWR_CTRL 0x7D\n#define BMI270_REG_CMD 0x7E\n\n// Commands and configuration values\n#define BMI270_CMD_SOFTRESET 0xB6\n#define BMI270_PWR_CONF_ADV_POWER_SAVE_DISABLED 0x00\n#define BMI270_PWR_CTRL_ACC_EN 0x04\n#define BMI270_ACC_ODR_50HZ 0x07\n#define BMI270_ACC_BWP_NORMAL 0x20\n#define BMI270_ACC_FILTER_PERF 0x80\n#define BMI270_ACC_RANGE_2G 0x00\n#define BMI270_INIT_OK 0x01\n\n// BMI270 config file - 8192 bytes from official Bosch BMI270 API\nstatic const uint8_t bmi270_config_file[] PROGMEM = {\n    0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x3d, 0xb1, 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x91, 0x03, 0x80, 0x2e, 0xbc, 0xb0, 0x80,\n    0x2e, 0xa3, 0x03, 0xc8, 0x2e, 0x00, 0x2e, 0x80, 0x2e, 0x00, 0xb0, 0x50, 0x30, 0x21, 0x2e, 0x59, 0xf5, 0x10, 0x30, 0x21, 0x2e,\n    0x6a, 0xf5, 0x80, 0x2e, 0x3b, 0x03, 0x00, 0x00, 0x00, 0x00, 0x08, 0x19, 0x01, 0x00, 0x22, 0x00, 0x75, 0x00, 0x00, 0x10, 0x00,\n    0x10, 0xd1, 0x00, 0xb3, 0x43, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1,\n    0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80,\n    0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e,\n    0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00,\n    0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1,\n    0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80,\n    0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e,\n    0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00,\n    0xc1, 0x80, 0x2e, 0x00, 0xc1, 0xe0, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,\n    0x19, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xe0, 0xaa, 0x38, 0x05, 0xe0, 0x90, 0x30, 0xfa, 0x00,\n    0x96, 0x00, 0x4b, 0x09, 0x11, 0x00, 0x11, 0x00, 0x02, 0x00, 0x2d, 0x01, 0xd4, 0x7b, 0x3b, 0x01, 0xdb, 0x7a, 0x04, 0x00, 0x3f,\n    0x7b, 0xcd, 0x6c, 0xc3, 0x04, 0x85, 0x09, 0xc3, 0x04, 0xec, 0xe6, 0x0c, 0x46, 0x01, 0x00, 0x27, 0x00, 0x19, 0x00, 0x96, 0x00,\n    0xa0, 0x00, 0x01, 0x00, 0x0c, 0x00, 0xf0, 0x3c, 0x00, 0x01, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x32,\n    0x00, 0x05, 0x00, 0xee, 0x06, 0x04, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x04, 0x00, 0xa8, 0x05, 0xee, 0x06, 0x00, 0x04, 0xbc, 0x02,\n    0xb3, 0x00, 0x85, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0xb4, 0x00, 0x01, 0x00, 0xb9, 0x00, 0x01, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x01, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x80, 0x2e, 0x00, 0xc1, 0xfd, 0x2d, 0xde, 0x00, 0xeb, 0x00, 0xda, 0x00, 0x00, 0x0c, 0xff, 0x0f, 0x00, 0x04, 0xc0,\n    0x00, 0x5b, 0xf5, 0xc9, 0x01, 0x1e, 0xf2, 0x80, 0x00, 0x3f, 0xff, 0x19, 0xf4, 0x58, 0xf5, 0x66, 0xf5, 0x64, 0xf5, 0xc0, 0xf1,\n    0xf0, 0x00, 0xe0, 0x00, 0xcd, 0x01, 0xd3, 0x01, 0xdb, 0x01, 0xff, 0x7f, 0xff, 0x01, 0xe4, 0x00, 0x74, 0xf7, 0xf3, 0x00, 0xfa,\n    0x00, 0xff, 0x3f, 0xca, 0x03, 0x6c, 0x38, 0x56, 0xfe, 0x44, 0xfd, 0xbc, 0x02, 0xf9, 0x06, 0x00, 0xfc, 0x12, 0x02, 0xae, 0x01,\n    0x58, 0xfa, 0x9a, 0xfd, 0x77, 0x05, 0xbb, 0x02, 0x96, 0x01, 0x95, 0x01, 0x7f, 0x01, 0x82, 0x01, 0x89, 0x01, 0x87, 0x01, 0x88,\n    0x01, 0x8a, 0x01, 0x8c, 0x01, 0x8f, 0x01, 0x8d, 0x01, 0x92, 0x01, 0x91, 0x01, 0xdd, 0x00, 0x9f, 0x01, 0x7e, 0x01, 0xdb, 0x00,\n    0xb6, 0x01, 0x70, 0x69, 0x26, 0xd3, 0x9c, 0x07, 0x1f, 0x05, 0x9d, 0x00, 0x00, 0x08, 0xbc, 0x05, 0x37, 0xfa, 0xa2, 0x01, 0xaa,\n    0x01, 0xa1, 0x01, 0xa8, 0x01, 0xa0, 0x01, 0xa8, 0x05, 0xb4, 0x01, 0xb4, 0x01, 0xce, 0x00, 0xd0, 0x00, 0xfc, 0x00, 0xc5, 0x01,\n    0xff, 0xfb, 0xb1, 0x00, 0x00, 0x38, 0x00, 0x30, 0xfd, 0xf5, 0xfc, 0xf5, 0xcd, 0x01, 0xa0, 0x00, 0x5f, 0xff, 0x00, 0x40, 0xff,\n    0x00, 0x00, 0x80, 0x6d, 0x0f, 0xeb, 0x00, 0x7f, 0xff, 0xc2, 0xf5, 0x68, 0xf7, 0xb3, 0xf1, 0x67, 0x0f, 0x5b, 0x0f, 0x61, 0x0f,\n    0x80, 0x0f, 0x58, 0xf7, 0x5b, 0xf7, 0x83, 0x0f, 0x86, 0x00, 0x72, 0x0f, 0x85, 0x0f, 0xc6, 0xf1, 0x7f, 0x0f, 0x6c, 0xf7, 0x00,\n    0xe0, 0x00, 0xff, 0xd1, 0xf5, 0x87, 0x0f, 0x8a, 0x0f, 0xff, 0x03, 0xf0, 0x3f, 0x8b, 0x00, 0x8e, 0x00, 0x90, 0x00, 0xb9, 0x00,\n    0x2d, 0xf5, 0xca, 0xf5, 0xcb, 0x01, 0x20, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x50, 0x98,\n    0x2e, 0xd7, 0x0e, 0x50, 0x32, 0x98, 0x2e, 0xfa, 0x03, 0x00, 0x30, 0xf0, 0x7f, 0x00, 0x2e, 0x00, 0x2e, 0xd0, 0x2e, 0x00, 0x2e,\n    0x01, 0x80, 0x08, 0xa2, 0xfb, 0x2f, 0x98, 0x2e, 0xba, 0x03, 0x21, 0x2e, 0x19, 0x00, 0x01, 0x2e, 0xee, 0x00, 0x00, 0xb2, 0x07,\n    0x2f, 0x01, 0x2e, 0x19, 0x00, 0x00, 0xb2, 0x03, 0x2f, 0x01, 0x50, 0x03, 0x52, 0x98, 0x2e, 0x07, 0xcc, 0x01, 0x2e, 0xdd, 0x00,\n    0x00, 0xb2, 0x27, 0x2f, 0x05, 0x2e, 0x8a, 0x00, 0x05, 0x52, 0x98, 0x2e, 0xc7, 0xc1, 0x03, 0x2e, 0xe9, 0x00, 0x40, 0xb2, 0xf0,\n    0x7f, 0x08, 0x2f, 0x01, 0x2e, 0x19, 0x00, 0x00, 0xb2, 0x04, 0x2f, 0x00, 0x30, 0x21, 0x2e, 0xe9, 0x00, 0x98, 0x2e, 0xb4, 0xb1,\n    0x01, 0x2e, 0x18, 0x00, 0x00, 0xb2, 0x10, 0x2f, 0x05, 0x50, 0x98, 0x2e, 0x4d, 0xc3, 0x05, 0x50, 0x98, 0x2e, 0x5a, 0xc7, 0x98,\n    0x2e, 0xf9, 0xb4, 0x98, 0x2e, 0x54, 0xb2, 0x98, 0x2e, 0x67, 0xb6, 0x98, 0x2e, 0x17, 0xb2, 0x10, 0x30, 0x21, 0x2e, 0x77, 0x00,\n    0x01, 0x2e, 0xef, 0x00, 0x00, 0xb2, 0x04, 0x2f, 0x98, 0x2e, 0x7a, 0xb7, 0x00, 0x30, 0x21, 0x2e, 0xef, 0x00, 0x01, 0x2e, 0xd4,\n    0x00, 0x04, 0xae, 0x0b, 0x2f, 0x01, 0x2e, 0xdd, 0x00, 0x00, 0xb2, 0x07, 0x2f, 0x05, 0x52, 0x98, 0x2e, 0x8e, 0x0e, 0x00, 0xb2,\n    0x02, 0x2f, 0x10, 0x30, 0x21, 0x2e, 0x7d, 0x00, 0x01, 0x2e, 0x7d, 0x00, 0x00, 0x90, 0x90, 0x2e, 0xf1, 0x02, 0x01, 0x2e, 0xd7,\n    0x00, 0x00, 0xb2, 0x04, 0x2f, 0x98, 0x2e, 0x2f, 0x0e, 0x00, 0x30, 0x21, 0x2e, 0x7b, 0x00, 0x01, 0x2e, 0x7b, 0x00, 0x00, 0xb2,\n    0x12, 0x2f, 0x01, 0x2e, 0xd4, 0x00, 0x00, 0x90, 0x02, 0x2f, 0x98, 0x2e, 0x1f, 0x0e, 0x09, 0x2d, 0x98, 0x2e, 0x81, 0x0d, 0x01,\n    0x2e, 0xd4, 0x00, 0x04, 0x90, 0x02, 0x2f, 0x50, 0x32, 0x98, 0x2e, 0xfa, 0x03, 0x00, 0x30, 0x21, 0x2e, 0x7b, 0x00, 0x01, 0x2e,\n    0x7c, 0x00, 0x00, 0xb2, 0x90, 0x2e, 0x09, 0x03, 0x01, 0x2e, 0x7c, 0x00, 0x01, 0x31, 0x01, 0x08, 0x00, 0xb2, 0x04, 0x2f, 0x98,\n    0x2e, 0x47, 0xcb, 0x10, 0x30, 0x21, 0x2e, 0x77, 0x00, 0x81, 0x30, 0x01, 0x2e, 0x7c, 0x00, 0x01, 0x08, 0x00, 0xb2, 0x61, 0x2f,\n    0x03, 0x2e, 0x89, 0x00, 0x01, 0x2e, 0xd4, 0x00, 0x98, 0xbc, 0x98, 0xb8, 0x05, 0xb2, 0x0f, 0x58, 0x23, 0x2f, 0x07, 0x90, 0x09,\n    0x54, 0x00, 0x30, 0x37, 0x2f, 0x15, 0x41, 0x04, 0x41, 0xdc, 0xbe, 0x44, 0xbe, 0xdc, 0xba, 0x2c, 0x01, 0x61, 0x00, 0x0f, 0x56,\n    0x4a, 0x0f, 0x0c, 0x2f, 0xd1, 0x42, 0x94, 0xb8, 0xc1, 0x42, 0x11, 0x30, 0x05, 0x2e, 0x6a, 0xf7, 0x2c, 0xbd, 0x2f, 0xb9, 0x80,\n    0xb2, 0x08, 0x22, 0x98, 0x2e, 0xc3, 0xb7, 0x21, 0x2d, 0x61, 0x30, 0x23, 0x2e, 0xd4, 0x00, 0x98, 0x2e, 0xc3, 0xb7, 0x00, 0x30,\n    0x21, 0x2e, 0x5a, 0xf5, 0x18, 0x2d, 0xe1, 0x7f, 0x50, 0x30, 0x98, 0x2e, 0xfa, 0x03, 0x0f, 0x52, 0x07, 0x50, 0x50, 0x42, 0x70,\n    0x30, 0x0d, 0x54, 0x42, 0x42, 0x7e, 0x82, 0xe2, 0x6f, 0x80, 0xb2, 0x42, 0x42, 0x05, 0x2f, 0x21, 0x2e, 0xd4, 0x00, 0x10, 0x30,\n    0x98, 0x2e, 0xc3, 0xb7, 0x03, 0x2d, 0x60, 0x30, 0x21, 0x2e, 0xd4, 0x00, 0x01, 0x2e, 0xd4, 0x00, 0x06, 0x90, 0x18, 0x2f, 0x01,\n    0x2e, 0x76, 0x00, 0x0b, 0x54, 0x07, 0x52, 0xe0, 0x7f, 0x98, 0x2e, 0x7a, 0xc1, 0xe1, 0x6f, 0x08, 0x1a, 0x40, 0x30, 0x08, 0x2f,\n    0x21, 0x2e, 0xd4, 0x00, 0x20, 0x30, 0x98, 0x2e, 0xaf, 0xb7, 0x50, 0x32, 0x98, 0x2e, 0xfa, 0x03, 0x05, 0x2d, 0x98, 0x2e, 0x38,\n    0x0e, 0x00, 0x30, 0x21, 0x2e, 0xd4, 0x00, 0x00, 0x30, 0x21, 0x2e, 0x7c, 0x00, 0x18, 0x2d, 0x01, 0x2e, 0xd4, 0x00, 0x03, 0xaa,\n    0x01, 0x2f, 0x98, 0x2e, 0x45, 0x0e, 0x01, 0x2e, 0xd4, 0x00, 0x3f, 0x80, 0x03, 0xa2, 0x01, 0x2f, 0x00, 0x2e, 0x02, 0x2d, 0x98,\n    0x2e, 0x5b, 0x0e, 0x30, 0x30, 0x98, 0x2e, 0xce, 0xb7, 0x00, 0x30, 0x21, 0x2e, 0x7d, 0x00, 0x50, 0x32, 0x98, 0x2e, 0xfa, 0x03,\n    0x01, 0x2e, 0x77, 0x00, 0x00, 0xb2, 0x24, 0x2f, 0x98, 0x2e, 0xf5, 0xcb, 0x03, 0x2e, 0xd5, 0x00, 0x11, 0x54, 0x01, 0x0a, 0xbc,\n    0x84, 0x83, 0x86, 0x21, 0x2e, 0xc9, 0x01, 0xe0, 0x40, 0x13, 0x52, 0xc4, 0x40, 0x82, 0x40, 0xa8, 0xb9, 0x52, 0x42, 0x43, 0xbe,\n    0x53, 0x42, 0x04, 0x0a, 0x50, 0x42, 0xe1, 0x7f, 0xf0, 0x31, 0x41, 0x40, 0xf2, 0x6f, 0x25, 0xbd, 0x08, 0x08, 0x02, 0x0a, 0xd0,\n    0x7f, 0x98, 0x2e, 0xa8, 0xcf, 0x06, 0xbc, 0xd1, 0x6f, 0xe2, 0x6f, 0x08, 0x0a, 0x80, 0x42, 0x98, 0x2e, 0x58, 0xb7, 0x00, 0x30,\n    0x21, 0x2e, 0xee, 0x00, 0x21, 0x2e, 0x77, 0x00, 0x21, 0x2e, 0xdd, 0x00, 0x80, 0x2e, 0xf4, 0x01, 0x1a, 0x24, 0x22, 0x00, 0x80,\n    0x2e, 0xec, 0x01, 0x10, 0x50, 0xfb, 0x7f, 0x98, 0x2e, 0xf3, 0x03, 0x57, 0x50, 0xfb, 0x6f, 0x01, 0x30, 0x71, 0x54, 0x11, 0x42,\n    0x42, 0x0e, 0xfc, 0x2f, 0xc0, 0x2e, 0x01, 0x42, 0xf0, 0x5f, 0x80, 0x2e, 0x00, 0xc1, 0xfd, 0x2d, 0x01, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x01, 0x34, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,\n    0x50, 0xe7, 0x7f, 0xf6, 0x7f, 0x06, 0x32, 0x0f, 0x2e, 0x61, 0xf5, 0xfe, 0x09, 0xc0, 0xb3, 0x04, 0x2f, 0x17, 0x30, 0x2f, 0x2e,\n    0xef, 0x00, 0x2d, 0x2e, 0x61, 0xf5, 0xf6, 0x6f, 0xe7, 0x6f, 0xe0, 0x5f, 0xc8, 0x2e, 0x20, 0x50, 0xe7, 0x7f, 0xf6, 0x7f, 0x46,\n    0x30, 0x0f, 0x2e, 0xa4, 0xf1, 0xbe, 0x09, 0x80, 0xb3, 0x06, 0x2f, 0x0d, 0x2e, 0xd4, 0x00, 0x84, 0xaf, 0x02, 0x2f, 0x16, 0x30,\n    0x2d, 0x2e, 0x7b, 0x00, 0x86, 0x30, 0x2d, 0x2e, 0x60, 0xf5, 0xf6, 0x6f, 0xe7, 0x6f, 0xe0, 0x5f, 0xc8, 0x2e, 0x01, 0x2e, 0x77,\n    0xf7, 0x09, 0xbc, 0x0f, 0xb8, 0x00, 0xb2, 0x10, 0x50, 0xfb, 0x7f, 0x10, 0x30, 0x0b, 0x2f, 0x03, 0x2e, 0x8a, 0x00, 0x96, 0xbc,\n    0x9f, 0xb8, 0x40, 0xb2, 0x05, 0x2f, 0x03, 0x2e, 0x68, 0xf7, 0x9e, 0xbc, 0x9f, 0xb8, 0x40, 0xb2, 0x07, 0x2f, 0x03, 0x2e, 0x7e,\n    0x00, 0x41, 0x90, 0x01, 0x2f, 0x98, 0x2e, 0xdc, 0x03, 0x03, 0x2c, 0x00, 0x30, 0x21, 0x2e, 0x7e, 0x00, 0xfb, 0x6f, 0xf0, 0x5f,\n    0xb8, 0x2e, 0x20, 0x50, 0xe0, 0x7f, 0xfb, 0x7f, 0x00, 0x2e, 0x27, 0x50, 0x98, 0x2e, 0x3b, 0xc8, 0x29, 0x50, 0x98, 0x2e, 0xa7,\n    0xc8, 0x01, 0x50, 0x98, 0x2e, 0x55, 0xcc, 0xe1, 0x6f, 0x2b, 0x50, 0x98, 0x2e, 0xe0, 0xc9, 0xfb, 0x6f, 0x00, 0x30, 0xe0, 0x5f,\n    0x21, 0x2e, 0x7e, 0x00, 0xb8, 0x2e, 0x73, 0x50, 0x01, 0x30, 0x57, 0x54, 0x11, 0x42, 0x42, 0x0e, 0xfc, 0x2f, 0xb8, 0x2e, 0x21,\n    0x2e, 0x59, 0xf5, 0x10, 0x30, 0xc0, 0x2e, 0x21, 0x2e, 0x4a, 0xf1, 0x90, 0x50, 0xf7, 0x7f, 0xe6, 0x7f, 0xd5, 0x7f, 0xc4, 0x7f,\n    0xb3, 0x7f, 0xa1, 0x7f, 0x90, 0x7f, 0x82, 0x7f, 0x7b, 0x7f, 0x98, 0x2e, 0x35, 0xb7, 0x00, 0xb2, 0x90, 0x2e, 0x97, 0xb0, 0x03,\n    0x2e, 0x8f, 0x00, 0x07, 0x2e, 0x91, 0x00, 0x05, 0x2e, 0xb1, 0x00, 0x3f, 0xba, 0x9f, 0xb8, 0x01, 0x2e, 0xb1, 0x00, 0xa3, 0xbd,\n    0x4c, 0x0a, 0x05, 0x2e, 0xb1, 0x00, 0x04, 0xbe, 0xbf, 0xb9, 0xcb, 0x0a, 0x4f, 0xba, 0x22, 0xbd, 0x01, 0x2e, 0xb3, 0x00, 0xdc,\n    0x0a, 0x2f, 0xb9, 0x03, 0x2e, 0xb8, 0x00, 0x0a, 0xbe, 0x9a, 0x0a, 0xcf, 0xb9, 0x9b, 0xbc, 0x01, 0x2e, 0x97, 0x00, 0x9f, 0xb8,\n    0x93, 0x0a, 0x0f, 0xbc, 0x91, 0x0a, 0x0f, 0xb8, 0x90, 0x0a, 0x25, 0x2e, 0x18, 0x00, 0x05, 0x2e, 0xc1, 0xf5, 0x2e, 0xbd, 0x2e,\n    0xb9, 0x01, 0x2e, 0x19, 0x00, 0x31, 0x30, 0x8a, 0x04, 0x00, 0x90, 0x07, 0x2f, 0x01, 0x2e, 0xd4, 0x00, 0x04, 0xa2, 0x03, 0x2f,\n    0x01, 0x2e, 0x18, 0x00, 0x00, 0xb2, 0x0c, 0x2f, 0x19, 0x50, 0x05, 0x52, 0x98, 0x2e, 0x4d, 0xb7, 0x05, 0x2e, 0x78, 0x00, 0x80,\n    0x90, 0x10, 0x30, 0x01, 0x2f, 0x21, 0x2e, 0x78, 0x00, 0x25, 0x2e, 0xdd, 0x00, 0x98, 0x2e, 0x3e, 0xb7, 0x00, 0xb2, 0x02, 0x30,\n    0x01, 0x30, 0x04, 0x2f, 0x01, 0x2e, 0x19, 0x00, 0x00, 0xb2, 0x00, 0x2f, 0x21, 0x30, 0x01, 0x2e, 0xea, 0x00, 0x08, 0x1a, 0x0e,\n    0x2f, 0x23, 0x2e, 0xea, 0x00, 0x33, 0x30, 0x1b, 0x50, 0x0b, 0x09, 0x01, 0x40, 0x17, 0x56, 0x46, 0xbe, 0x4b, 0x08, 0x4c, 0x0a,\n    0x01, 0x42, 0x0a, 0x80, 0x15, 0x52, 0x01, 0x42, 0x00, 0x2e, 0x01, 0x2e, 0x18, 0x00, 0x00, 0xb2, 0x1f, 0x2f, 0x03, 0x2e, 0xc0,\n    0xf5, 0xf0, 0x30, 0x48, 0x08, 0x47, 0xaa, 0x74, 0x30, 0x07, 0x2e, 0x7a, 0x00, 0x61, 0x22, 0x4b, 0x1a, 0x05, 0x2f, 0x07, 0x2e,\n    0x66, 0xf5, 0xbf, 0xbd, 0xbf, 0xb9, 0xc0, 0x90, 0x0b, 0x2f, 0x1d, 0x56, 0x2b, 0x30, 0xd2, 0x42, 0xdb, 0x42, 0x01, 0x04, 0xc2,\n    0x42, 0x04, 0xbd, 0xfe, 0x80, 0x81, 0x84, 0x23, 0x2e, 0x7a, 0x00, 0x02, 0x42, 0x02, 0x32, 0x25, 0x2e, 0x62, 0xf5, 0x05, 0x2e,\n    0xd6, 0x00, 0x81, 0x84, 0x25, 0x2e, 0xd6, 0x00, 0x02, 0x31, 0x25, 0x2e, 0x60, 0xf5, 0x05, 0x2e, 0x8a, 0x00, 0x0b, 0x50, 0x90,\n    0x08, 0x80, 0xb2, 0x0b, 0x2f, 0x05, 0x2e, 0xca, 0xf5, 0xf0, 0x3e, 0x90, 0x08, 0x25, 0x2e, 0xca, 0xf5, 0x05, 0x2e, 0x59, 0xf5,\n    0xe0, 0x3f, 0x90, 0x08, 0x25, 0x2e, 0x59, 0xf5, 0x90, 0x6f, 0xa1, 0x6f, 0xb3, 0x6f, 0xc4, 0x6f, 0xd5, 0x6f, 0xe6, 0x6f, 0xf7,\n    0x6f, 0x7b, 0x6f, 0x82, 0x6f, 0x70, 0x5f, 0xc8, 0x2e, 0xc0, 0x50, 0x90, 0x7f, 0xe5, 0x7f, 0xd4, 0x7f, 0xc3, 0x7f, 0xb1, 0x7f,\n    0xa2, 0x7f, 0x87, 0x7f, 0xf6, 0x7f, 0x7b, 0x7f, 0x00, 0x2e, 0x01, 0x2e, 0x60, 0xf5, 0x60, 0x7f, 0x98, 0x2e, 0x35, 0xb7, 0x02,\n    0x30, 0x63, 0x6f, 0x15, 0x52, 0x50, 0x7f, 0x62, 0x7f, 0x5a, 0x2c, 0x02, 0x32, 0x1a, 0x09, 0x00, 0xb3, 0x14, 0x2f, 0x00, 0xb2,\n    0x03, 0x2f, 0x09, 0x2e, 0x18, 0x00, 0x00, 0x91, 0x0c, 0x2f, 0x43, 0x7f, 0x98, 0x2e, 0x97, 0xb7, 0x1f, 0x50, 0x02, 0x8a, 0x02,\n    0x32, 0x04, 0x30, 0x25, 0x2e, 0x64, 0xf5, 0x15, 0x52, 0x50, 0x6f, 0x43, 0x6f, 0x44, 0x43, 0x25, 0x2e, 0x60, 0xf5, 0xd9, 0x08,\n    0xc0, 0xb2, 0x36, 0x2f, 0x98, 0x2e, 0x3e, 0xb7, 0x00, 0xb2, 0x06, 0x2f, 0x01, 0x2e, 0x19, 0x00, 0x00, 0xb2, 0x02, 0x2f, 0x50,\n    0x6f, 0x00, 0x90, 0x0a, 0x2f, 0x01, 0x2e, 0x79, 0x00, 0x00, 0x90, 0x19, 0x2f, 0x10, 0x30, 0x21, 0x2e, 0x79, 0x00, 0x00, 0x30,\n    0x98, 0x2e, 0xdc, 0x03, 0x13, 0x2d, 0x01, 0x2e, 0xc3, 0xf5, 0x0c, 0xbc, 0x0f, 0xb8, 0x12, 0x30, 0x10, 0x04, 0x03, 0xb0, 0x26,\n    0x25, 0x21, 0x50, 0x03, 0x52, 0x98, 0x2e, 0x4d, 0xb7, 0x10, 0x30, 0x21, 0x2e, 0xee, 0x00, 0x02, 0x30, 0x60, 0x7f, 0x25, 0x2e,\n    0x79, 0x00, 0x60, 0x6f, 0x00, 0x90, 0x05, 0x2f, 0x00, 0x30, 0x21, 0x2e, 0xea, 0x00, 0x15, 0x50, 0x21, 0x2e, 0x64, 0xf5, 0x15,\n    0x52, 0x23, 0x2e, 0x60, 0xf5, 0x02, 0x32, 0x50, 0x6f, 0x00, 0x90, 0x02, 0x2f, 0x03, 0x30, 0x27, 0x2e, 0x78, 0x00, 0x07, 0x2e,\n    0x60, 0xf5, 0x1a, 0x09, 0x00, 0x91, 0xa3, 0x2f, 0x19, 0x09, 0x00, 0x91, 0xa0, 0x2f, 0x90, 0x6f, 0xa2, 0x6f, 0xb1, 0x6f, 0xc3,\n    0x6f, 0xd4, 0x6f, 0xe5, 0x6f, 0x7b, 0x6f, 0xf6, 0x6f, 0x87, 0x6f, 0x40, 0x5f, 0xc8, 0x2e, 0xc0, 0x50, 0xe7, 0x7f, 0xf6, 0x7f,\n    0x26, 0x30, 0x0f, 0x2e, 0x61, 0xf5, 0x2f, 0x2e, 0x7c, 0x00, 0x0f, 0x2e, 0x7c, 0x00, 0xbe, 0x09, 0xa2, 0x7f, 0x80, 0x7f, 0x80,\n    0xb3, 0xd5, 0x7f, 0xc4, 0x7f, 0xb3, 0x7f, 0x91, 0x7f, 0x7b, 0x7f, 0x0b, 0x2f, 0x23, 0x50, 0x1a, 0x25, 0x12, 0x40, 0x42, 0x7f,\n    0x74, 0x82, 0x12, 0x40, 0x52, 0x7f, 0x00, 0x2e, 0x00, 0x40, 0x60, 0x7f, 0x98, 0x2e, 0x6a, 0xd6, 0x81, 0x30, 0x01, 0x2e, 0x7c,\n    0x00, 0x01, 0x08, 0x00, 0xb2, 0x42, 0x2f, 0x03, 0x2e, 0x89, 0x00, 0x01, 0x2e, 0x89, 0x00, 0x97, 0xbc, 0x06, 0xbc, 0x9f, 0xb8,\n    0x0f, 0xb8, 0x00, 0x90, 0x23, 0x2e, 0xd8, 0x00, 0x10, 0x30, 0x01, 0x30, 0x2a, 0x2f, 0x03, 0x2e, 0xd4, 0x00, 0x44, 0xb2, 0x05,\n    0x2f, 0x47, 0xb2, 0x00, 0x30, 0x2d, 0x2f, 0x21, 0x2e, 0x7c, 0x00, 0x2b, 0x2d, 0x03, 0x2e, 0xfd, 0xf5, 0x9e, 0xbc, 0x9f, 0xb8,\n    0x40, 0x90, 0x14, 0x2f, 0x03, 0x2e, 0xfc, 0xf5, 0x99, 0xbc, 0x9f, 0xb8, 0x40, 0x90, 0x0e, 0x2f, 0x03, 0x2e, 0x49, 0xf1, 0x25,\n    0x54, 0x4a, 0x08, 0x40, 0x90, 0x08, 0x2f, 0x98, 0x2e, 0x35, 0xb7, 0x00, 0xb2, 0x10, 0x30, 0x03, 0x2f, 0x50, 0x30, 0x21, 0x2e,\n    0xd4, 0x00, 0x10, 0x2d, 0x98, 0x2e, 0xaf, 0xb7, 0x00, 0x30, 0x21, 0x2e, 0x7c, 0x00, 0x0a, 0x2d, 0x05, 0x2e, 0x69, 0xf7, 0x2d,\n    0xbd, 0x2f, 0xb9, 0x80, 0xb2, 0x01, 0x2f, 0x21, 0x2e, 0x7d, 0x00, 0x23, 0x2e, 0x7c, 0x00, 0xe0, 0x31, 0x21, 0x2e, 0x61, 0xf5,\n    0xf6, 0x6f, 0xe7, 0x6f, 0x80, 0x6f, 0xa2, 0x6f, 0xb3, 0x6f, 0xc4, 0x6f, 0xd5, 0x6f, 0x7b, 0x6f, 0x91, 0x6f, 0x40, 0x5f, 0xc8,\n    0x2e, 0x60, 0x51, 0x0a, 0x25, 0x36, 0x88, 0xf4, 0x7f, 0xeb, 0x7f, 0x00, 0x32, 0x31, 0x52, 0x32, 0x30, 0x13, 0x30, 0x98, 0x2e,\n    0x15, 0xcb, 0x0a, 0x25, 0x33, 0x84, 0xd2, 0x7f, 0x43, 0x30, 0x05, 0x50, 0x2d, 0x52, 0x98, 0x2e, 0x95, 0xc1, 0xd2, 0x6f, 0x27,\n    0x52, 0x98, 0x2e, 0xd7, 0xc7, 0x2a, 0x25, 0xb0, 0x86, 0xc0, 0x7f, 0xd3, 0x7f, 0xaf, 0x84, 0x29, 0x50, 0xf1, 0x6f, 0x98, 0x2e,\n    0x4d, 0xc8, 0x2a, 0x25, 0xae, 0x8a, 0xaa, 0x88, 0xf2, 0x6e, 0x2b, 0x50, 0xc1, 0x6f, 0xd3, 0x6f, 0xf4, 0x7f, 0x98, 0x2e, 0xb6,\n    0xc8, 0xe0, 0x6e, 0x00, 0xb2, 0x32, 0x2f, 0x33, 0x54, 0x83, 0x86, 0xf1, 0x6f, 0xc3, 0x7f, 0x04, 0x30, 0x30, 0x30, 0xf4, 0x7f,\n    0xd0, 0x7f, 0xb2, 0x7f, 0xe3, 0x30, 0xc5, 0x6f, 0x56, 0x40, 0x45, 0x41, 0x28, 0x08, 0x03, 0x14, 0x0e, 0xb4, 0x08, 0xbc, 0x82,\n    0x40, 0x10, 0x0a, 0x2f, 0x54, 0x26, 0x05, 0x91, 0x7f, 0x44, 0x28, 0xa3, 0x7f, 0x98, 0x2e, 0xd9, 0xc0, 0x08, 0xb9, 0x33, 0x30,\n    0x53, 0x09, 0xc1, 0x6f, 0xd3, 0x6f, 0xf4, 0x6f, 0x83, 0x17, 0x47, 0x40, 0x6c, 0x15, 0xb2, 0x6f, 0xbe, 0x09, 0x75, 0x0b, 0x90,\n    0x42, 0x45, 0x42, 0x51, 0x0e, 0x32, 0xbc, 0x02, 0x89, 0xa1, 0x6f, 0x7e, 0x86, 0xf4, 0x7f, 0xd0, 0x7f, 0xb2, 0x7f, 0x04, 0x30,\n    0x91, 0x6f, 0xd6, 0x2f, 0xeb, 0x6f, 0xa0, 0x5e, 0xb8, 0x2e, 0x03, 0x2e, 0x97, 0x00, 0x1b, 0xbc, 0x60, 0x50, 0x9f, 0xbc, 0x0c,\n    0xb8, 0xf0, 0x7f, 0x40, 0xb2, 0xeb, 0x7f, 0x2b, 0x2f, 0x03, 0x2e, 0x7f, 0x00, 0x41, 0x40, 0x01, 0x2e, 0xc8, 0x00, 0x01, 0x1a,\n    0x11, 0x2f, 0x37, 0x58, 0x23, 0x2e, 0xc8, 0x00, 0x10, 0x41, 0xa0, 0x7f, 0x38, 0x81, 0x01, 0x41, 0xd0, 0x7f, 0xb1, 0x7f, 0x98,\n    0x2e, 0x64, 0xcf, 0xd0, 0x6f, 0x07, 0x80, 0xa1, 0x6f, 0x11, 0x42, 0x00, 0x2e, 0xb1, 0x6f, 0x01, 0x42, 0x11, 0x30, 0x01, 0x2e,\n    0xfc, 0x00, 0x00, 0xa8, 0x03, 0x30, 0xcb, 0x22, 0x4a, 0x25, 0x01, 0x2e, 0x7f, 0x00, 0x3c, 0x89, 0x35, 0x52, 0x05, 0x54, 0x98,\n    0x2e, 0xc4, 0xce, 0xc1, 0x6f, 0xf0, 0x6f, 0x98, 0x2e, 0x95, 0xcf, 0x04, 0x2d, 0x01, 0x30, 0xf0, 0x6f, 0x98, 0x2e, 0x95, 0xcf,\n    0xeb, 0x6f, 0xa0, 0x5f, 0xb8, 0x2e, 0x03, 0x2e, 0xb3, 0x00, 0x02, 0x32, 0xf0, 0x30, 0x03, 0x31, 0x30, 0x50, 0x8a, 0x08, 0x08,\n    0x08, 0xcb, 0x08, 0xe0, 0x7f, 0x80, 0xb2, 0xf3, 0x7f, 0xdb, 0x7f, 0x25, 0x2f, 0x03, 0x2e, 0xca, 0x00, 0x41, 0x90, 0x04, 0x2f,\n    0x01, 0x30, 0x23, 0x2e, 0xca, 0x00, 0x98, 0x2e, 0x3f, 0x03, 0xc0, 0xb2, 0x05, 0x2f, 0x03, 0x2e, 0xda, 0x00, 0x00, 0x30, 0x41,\n    0x04, 0x23, 0x2e, 0xda, 0x00, 0x98, 0x2e, 0x92, 0xb2, 0x10, 0x25, 0xf0, 0x6f, 0x00, 0xb2, 0x05, 0x2f, 0x01, 0x2e, 0xda, 0x00,\n    0x02, 0x30, 0x10, 0x04, 0x21, 0x2e, 0xda, 0x00, 0x40, 0xb2, 0x01, 0x2f, 0x23, 0x2e, 0xc8, 0x01, 0xdb, 0x6f, 0xe0, 0x6f, 0xd0,\n    0x5f, 0x80, 0x2e, 0x95, 0xcf, 0x01, 0x30, 0xe0, 0x6f, 0x98, 0x2e, 0x95, 0xcf, 0x11, 0x30, 0x23, 0x2e, 0xca, 0x00, 0xdb, 0x6f,\n    0xd0, 0x5f, 0xb8, 0x2e, 0xd0, 0x50, 0x0a, 0x25, 0x33, 0x84, 0x55, 0x50, 0xd2, 0x7f, 0xe2, 0x7f, 0x03, 0x8c, 0xc0, 0x7f, 0xbb,\n    0x7f, 0x00, 0x30, 0x05, 0x5a, 0x39, 0x54, 0x51, 0x41, 0xa5, 0x7f, 0x96, 0x7f, 0x80, 0x7f, 0x98, 0x2e, 0xd9, 0xc0, 0x05, 0x30,\n    0xf5, 0x7f, 0x20, 0x25, 0x91, 0x6f, 0x3b, 0x58, 0x3d, 0x5c, 0x3b, 0x56, 0x98, 0x2e, 0x67, 0xcc, 0xc1, 0x6f, 0xd5, 0x6f, 0x52,\n    0x40, 0x50, 0x43, 0xc1, 0x7f, 0xd5, 0x7f, 0x10, 0x25, 0x98, 0x2e, 0xfe, 0xc9, 0x10, 0x25, 0x98, 0x2e, 0x74, 0xc0, 0x86, 0x6f,\n    0x30, 0x28, 0x92, 0x6f, 0x82, 0x8c, 0xa5, 0x6f, 0x6f, 0x52, 0x69, 0x0e, 0x39, 0x54, 0xdb, 0x2f, 0x19, 0xa0, 0x15, 0x30, 0x03,\n    0x2f, 0x00, 0x30, 0x21, 0x2e, 0x81, 0x01, 0x0a, 0x2d, 0x01, 0x2e, 0x81, 0x01, 0x05, 0x28, 0x42, 0x36, 0x21, 0x2e, 0x81, 0x01,\n    0x02, 0x0e, 0x01, 0x2f, 0x98, 0x2e, 0xf3, 0x03, 0x57, 0x50, 0x12, 0x30, 0x01, 0x40, 0x98, 0x2e, 0xfe, 0xc9, 0x51, 0x6f, 0x0b,\n    0x5c, 0x8e, 0x0e, 0x3b, 0x6f, 0x57, 0x58, 0x02, 0x30, 0x21, 0x2e, 0x95, 0x01, 0x45, 0x6f, 0x2a, 0x8d, 0xd2, 0x7f, 0xcb, 0x7f,\n    0x13, 0x2f, 0x02, 0x30, 0x3f, 0x50, 0xd2, 0x7f, 0xa8, 0x0e, 0x0e, 0x2f, 0xc0, 0x6f, 0x53, 0x54, 0x02, 0x00, 0x51, 0x54, 0x42,\n    0x0e, 0x10, 0x30, 0x59, 0x52, 0x02, 0x30, 0x01, 0x2f, 0x00, 0x2e, 0x03, 0x2d, 0x50, 0x42, 0x42, 0x42, 0x12, 0x30, 0xd2, 0x7f,\n    0x80, 0xb2, 0x03, 0x2f, 0x00, 0x30, 0x21, 0x2e, 0x80, 0x01, 0x12, 0x2d, 0x01, 0x2e, 0xc9, 0x00, 0x02, 0x80, 0x05, 0x2e, 0x80,\n    0x01, 0x11, 0x30, 0x91, 0x28, 0x00, 0x40, 0x25, 0x2e, 0x80, 0x01, 0x10, 0x0e, 0x05, 0x2f, 0x01, 0x2e, 0x7f, 0x01, 0x01, 0x90,\n    0x01, 0x2f, 0x98, 0x2e, 0xf3, 0x03, 0x00, 0x2e, 0xa0, 0x41, 0x01, 0x90, 0xa6, 0x7f, 0x90, 0x2e, 0xe3, 0xb4, 0x01, 0x2e, 0x95,\n    0x01, 0x00, 0xa8, 0x90, 0x2e, 0xe3, 0xb4, 0x5b, 0x54, 0x95, 0x80, 0x82, 0x40, 0x80, 0xb2, 0x02, 0x40, 0x2d, 0x8c, 0x3f, 0x52,\n    0x96, 0x7f, 0x90, 0x2e, 0xc2, 0xb3, 0x29, 0x0e, 0x76, 0x2f, 0x01, 0x2e, 0xc9, 0x00, 0x00, 0x40, 0x81, 0x28, 0x45, 0x52, 0xb3,\n    0x30, 0x98, 0x2e, 0x0f, 0xca, 0x5d, 0x54, 0x80, 0x7f, 0x00, 0x2e, 0xa1, 0x40, 0x72, 0x7f, 0x82, 0x80, 0x82, 0x40, 0x60, 0x7f,\n    0x98, 0x2e, 0xfe, 0xc9, 0x10, 0x25, 0x98, 0x2e, 0x74, 0xc0, 0x62, 0x6f, 0x05, 0x30, 0x87, 0x40, 0xc0, 0x91, 0x04, 0x30, 0x05,\n    0x2f, 0x05, 0x2e, 0x83, 0x01, 0x80, 0xb2, 0x14, 0x30, 0x00, 0x2f, 0x04, 0x30, 0x05, 0x2e, 0xc9, 0x00, 0x73, 0x6f, 0x81, 0x40,\n    0xe2, 0x40, 0x69, 0x04, 0x11, 0x0f, 0xe1, 0x40, 0x16, 0x30, 0xfe, 0x29, 0xcb, 0x40, 0x02, 0x2f, 0x83, 0x6f, 0x83, 0x0f, 0x22,\n    0x2f, 0x47, 0x56, 0x13, 0x0f, 0x12, 0x30, 0x77, 0x2f, 0x49, 0x54, 0x42, 0x0e, 0x12, 0x30, 0x73, 0x2f, 0x00, 0x91, 0x0a, 0x2f,\n    0x01, 0x2e, 0x8b, 0x01, 0x19, 0xa8, 0x02, 0x30, 0x6c, 0x2f, 0x63, 0x50, 0x00, 0x2e, 0x17, 0x42, 0x05, 0x42, 0x68, 0x2c, 0x12,\n    0x30, 0x0b, 0x25, 0x08, 0x0f, 0x50, 0x30, 0x02, 0x2f, 0x21, 0x2e, 0x83, 0x01, 0x03, 0x2d, 0x40, 0x30, 0x21, 0x2e, 0x83, 0x01,\n    0x2b, 0x2e, 0x85, 0x01, 0x5a, 0x2c, 0x12, 0x30, 0x00, 0x91, 0x2b, 0x25, 0x04, 0x2f, 0x63, 0x50, 0x02, 0x30, 0x17, 0x42, 0x17,\n    0x2c, 0x02, 0x42, 0x98, 0x2e, 0xfe, 0xc9, 0x10, 0x25, 0x98, 0x2e, 0x74, 0xc0, 0x05, 0x2e, 0xc9, 0x00, 0x81, 0x84, 0x5b, 0x30,\n    0x82, 0x40, 0x37, 0x2e, 0x83, 0x01, 0x02, 0x0e, 0x07, 0x2f, 0x5f, 0x52, 0x40, 0x30, 0x62, 0x40, 0x41, 0x40, 0x91, 0x0e, 0x01,\n    0x2f, 0x21, 0x2e, 0x83, 0x01, 0x05, 0x30, 0x2b, 0x2e, 0x85, 0x01, 0x12, 0x30, 0x36, 0x2c, 0x16, 0x30, 0x15, 0x25, 0x81, 0x7f,\n    0x98, 0x2e, 0xfe, 0xc9, 0x10, 0x25, 0x98, 0x2e, 0x74, 0xc0, 0x19, 0xa2, 0x16, 0x30, 0x15, 0x2f, 0x05, 0x2e, 0x97, 0x01, 0x80,\n    0x6f, 0x82, 0x0e, 0x05, 0x2f, 0x01, 0x2e, 0x86, 0x01, 0x06, 0x28, 0x21, 0x2e, 0x86, 0x01, 0x0b, 0x2d, 0x03, 0x2e, 0x87, 0x01,\n    0x5f, 0x54, 0x4e, 0x28, 0x91, 0x42, 0x00, 0x2e, 0x82, 0x40, 0x90, 0x0e, 0x01, 0x2f, 0x21, 0x2e, 0x88, 0x01, 0x02, 0x30, 0x13,\n    0x2c, 0x05, 0x30, 0xc0, 0x6f, 0x08, 0x1c, 0xa8, 0x0f, 0x16, 0x30, 0x05, 0x30, 0x5b, 0x50, 0x09, 0x2f, 0x02, 0x80, 0x2d, 0x2e,\n    0x82, 0x01, 0x05, 0x42, 0x05, 0x80, 0x00, 0x2e, 0x02, 0x42, 0x3e, 0x80, 0x00, 0x2e, 0x06, 0x42, 0x02, 0x30, 0x90, 0x6f, 0x3e,\n    0x88, 0x01, 0x40, 0x04, 0x41, 0x4c, 0x28, 0x01, 0x42, 0x07, 0x80, 0x10, 0x25, 0x24, 0x40, 0x00, 0x40, 0x00, 0xa8, 0xf5, 0x22,\n    0x23, 0x29, 0x44, 0x42, 0x7a, 0x82, 0x7e, 0x88, 0x43, 0x40, 0x04, 0x41, 0x00, 0xab, 0xf5, 0x23, 0xdf, 0x28, 0x43, 0x42, 0xd9,\n    0xa0, 0x14, 0x2f, 0x00, 0x90, 0x02, 0x2f, 0xd2, 0x6f, 0x81, 0xb2, 0x05, 0x2f, 0x63, 0x54, 0x06, 0x28, 0x90, 0x42, 0x85, 0x42,\n    0x09, 0x2c, 0x02, 0x30, 0x5b, 0x50, 0x03, 0x80, 0x29, 0x2e, 0x7e, 0x01, 0x2b, 0x2e, 0x82, 0x01, 0x05, 0x42, 0x12, 0x30, 0x2b,\n    0x2e, 0x83, 0x01, 0x45, 0x82, 0x00, 0x2e, 0x40, 0x40, 0x7a, 0x82, 0x02, 0xa0, 0x08, 0x2f, 0x63, 0x50, 0x3b, 0x30, 0x15, 0x42,\n    0x05, 0x42, 0x37, 0x80, 0x37, 0x2e, 0x7e, 0x01, 0x05, 0x42, 0x12, 0x30, 0x01, 0x2e, 0xc9, 0x00, 0x02, 0x8c, 0x40, 0x40, 0x84,\n    0x41, 0x7a, 0x8c, 0x04, 0x0f, 0x03, 0x2f, 0x01, 0x2e, 0x8b, 0x01, 0x19, 0xa4, 0x04, 0x2f, 0x2b, 0x2e, 0x82, 0x01, 0x98, 0x2e,\n    0xf3, 0x03, 0x12, 0x30, 0x81, 0x90, 0x61, 0x52, 0x08, 0x2f, 0x65, 0x42, 0x65, 0x42, 0x43, 0x80, 0x39, 0x84, 0x82, 0x88, 0x05,\n    0x42, 0x45, 0x42, 0x85, 0x42, 0x05, 0x43, 0x00, 0x2e, 0x80, 0x41, 0x00, 0x90, 0x90, 0x2e, 0xe1, 0xb4, 0x65, 0x54, 0xc1, 0x6f,\n    0x80, 0x40, 0x00, 0xb2, 0x43, 0x58, 0x69, 0x50, 0x44, 0x2f, 0x55, 0x5c, 0xb7, 0x87, 0x8c, 0x0f, 0x0d, 0x2e, 0x96, 0x01, 0xc4,\n    0x40, 0x36, 0x2f, 0x41, 0x56, 0x8b, 0x0e, 0x2a, 0x2f, 0x0b, 0x52, 0xa1, 0x0e, 0x0a, 0x2f, 0x05, 0x2e, 0x8f, 0x01, 0x14, 0x25,\n    0x98, 0x2e, 0xfe, 0xc9, 0x4b, 0x54, 0x02, 0x0f, 0x69, 0x50, 0x05, 0x30, 0x65, 0x54, 0x15, 0x2f, 0x03, 0x2e, 0x8e, 0x01, 0x4d,\n    0x5c, 0x8e, 0x0f, 0x3a, 0x2f, 0x05, 0x2e, 0x8f, 0x01, 0x98, 0x2e, 0xfe, 0xc9, 0x4f, 0x54, 0x82, 0x0f, 0x05, 0x30, 0x69, 0x50,\n    0x65, 0x54, 0x30, 0x2f, 0x6d, 0x52, 0x15, 0x30, 0x42, 0x8c, 0x45, 0x42, 0x04, 0x30, 0x2b, 0x2c, 0x84, 0x43, 0x6b, 0x52, 0x42,\n    0x8c, 0x00, 0x2e, 0x85, 0x43, 0x15, 0x30, 0x24, 0x2c, 0x45, 0x42, 0x8e, 0x0f, 0x20, 0x2f, 0x0d, 0x2e, 0x8e, 0x01, 0xb1, 0x0e,\n    0x1c, 0x2f, 0x23, 0x2e, 0x8e, 0x01, 0x1a, 0x2d, 0x0e, 0x0e, 0x17, 0x2f, 0xa1, 0x0f, 0x15, 0x2f, 0x23, 0x2e, 0x8d, 0x01, 0x13,\n    0x2d, 0x98, 0x2e, 0x74, 0xc0, 0x43, 0x54, 0xc2, 0x0e, 0x0a, 0x2f, 0x65, 0x50, 0x04, 0x80, 0x0b, 0x30, 0x06, 0x82, 0x0b, 0x42,\n    0x79, 0x80, 0x41, 0x40, 0x12, 0x30, 0x25, 0x2e, 0x8c, 0x01, 0x01, 0x42, 0x05, 0x30, 0x69, 0x50, 0x65, 0x54, 0x84, 0x82, 0x43,\n    0x84, 0xbe, 0x8c, 0x84, 0x40, 0x86, 0x41, 0x26, 0x29, 0x94, 0x42, 0xbe, 0x8e, 0xd5, 0x7f, 0x19, 0xa1, 0x43, 0x40, 0x0b, 0x2e,\n    0x8c, 0x01, 0x84, 0x40, 0xc7, 0x41, 0x5d, 0x29, 0x27, 0x29, 0x45, 0x42, 0x84, 0x42, 0xc2, 0x7f, 0x01, 0x2f, 0xc0, 0xb3, 0x1d,\n    0x2f, 0x05, 0x2e, 0x94, 0x01, 0x99, 0xa0, 0x01, 0x2f, 0x80, 0xb3, 0x13, 0x2f, 0x80, 0xb3, 0x18, 0x2f, 0xc0, 0xb3, 0x16, 0x2f,\n    0x12, 0x40, 0x01, 0x40, 0x92, 0x7f, 0x98, 0x2e, 0x74, 0xc0, 0x92, 0x6f, 0x10, 0x0f, 0x20, 0x30, 0x03, 0x2f, 0x10, 0x30, 0x21,\n    0x2e, 0x7e, 0x01, 0x0a, 0x2d, 0x21, 0x2e, 0x7e, 0x01, 0x07, 0x2d, 0x20, 0x30, 0x21, 0x2e, 0x7e, 0x01, 0x03, 0x2d, 0x10, 0x30,\n    0x21, 0x2e, 0x7e, 0x01, 0xc2, 0x6f, 0x01, 0x2e, 0xc9, 0x00, 0xbc, 0x84, 0x02, 0x80, 0x82, 0x40, 0x00, 0x40, 0x90, 0x0e, 0xd5,\n    0x6f, 0x02, 0x2f, 0x15, 0x30, 0x98, 0x2e, 0xf3, 0x03, 0x41, 0x91, 0x05, 0x30, 0x07, 0x2f, 0x67, 0x50, 0x3d, 0x80, 0x2b, 0x2e,\n    0x8f, 0x01, 0x05, 0x42, 0x04, 0x80, 0x00, 0x2e, 0x05, 0x42, 0x02, 0x2c, 0x00, 0x30, 0x00, 0x30, 0xa2, 0x6f, 0x98, 0x8a, 0x86,\n    0x40, 0x80, 0xa7, 0x05, 0x2f, 0x98, 0x2e, 0xf3, 0x03, 0xc0, 0x30, 0x21, 0x2e, 0x95, 0x01, 0x06, 0x25, 0x1a, 0x25, 0xe2, 0x6f,\n    0x76, 0x82, 0x96, 0x40, 0x56, 0x43, 0x51, 0x0e, 0xfb, 0x2f, 0xbb, 0x6f, 0x30, 0x5f, 0xb8, 0x2e, 0x01, 0x2e, 0xb8, 0x00, 0x01,\n    0x31, 0x41, 0x08, 0x40, 0xb2, 0x20, 0x50, 0xf2, 0x30, 0x02, 0x08, 0xfb, 0x7f, 0x01, 0x30, 0x10, 0x2f, 0x05, 0x2e, 0xcc, 0x00,\n    0x81, 0x90, 0xe0, 0x7f, 0x03, 0x2f, 0x23, 0x2e, 0xcc, 0x00, 0x98, 0x2e, 0x55, 0xb6, 0x98, 0x2e, 0x1d, 0xb5, 0x10, 0x25, 0xfb,\n    0x6f, 0xe0, 0x6f, 0xe0, 0x5f, 0x80, 0x2e, 0x95, 0xcf, 0x98, 0x2e, 0x95, 0xcf, 0x10, 0x30, 0x21, 0x2e, 0xcc, 0x00, 0xfb, 0x6f,\n    0xe0, 0x5f, 0xb8, 0x2e, 0x00, 0x51, 0x05, 0x58, 0xeb, 0x7f, 0x2a, 0x25, 0x89, 0x52, 0x6f, 0x5a, 0x89, 0x50, 0x13, 0x41, 0x06,\n    0x40, 0xb3, 0x01, 0x16, 0x42, 0xcb, 0x16, 0x06, 0x40, 0xf3, 0x02, 0x13, 0x42, 0x65, 0x0e, 0xf5, 0x2f, 0x05, 0x40, 0x14, 0x30,\n    0x2c, 0x29, 0x04, 0x42, 0x08, 0xa1, 0x00, 0x30, 0x90, 0x2e, 0x52, 0xb6, 0xb3, 0x88, 0xb0, 0x8a, 0xb6, 0x84, 0xa4, 0x7f, 0xc4,\n    0x7f, 0xb5, 0x7f, 0xd5, 0x7f, 0x92, 0x7f, 0x73, 0x30, 0x04, 0x30, 0x55, 0x40, 0x42, 0x40, 0x8a, 0x17, 0xf3, 0x08, 0x6b, 0x01,\n    0x90, 0x02, 0x53, 0xb8, 0x4b, 0x82, 0xad, 0xbe, 0x71, 0x7f, 0x45, 0x0a, 0x09, 0x54, 0x84, 0x7f, 0x98, 0x2e, 0xd9, 0xc0, 0xa3,\n    0x6f, 0x7b, 0x54, 0xd0, 0x42, 0xa3, 0x7f, 0xf2, 0x7f, 0x60, 0x7f, 0x20, 0x25, 0x71, 0x6f, 0x75, 0x5a, 0x77, 0x58, 0x79, 0x5c,\n    0x75, 0x56, 0x98, 0x2e, 0x67, 0xcc, 0xb1, 0x6f, 0x62, 0x6f, 0x50, 0x42, 0xb1, 0x7f, 0xb3, 0x30, 0x10, 0x25, 0x98, 0x2e, 0x0f,\n    0xca, 0x84, 0x6f, 0x20, 0x29, 0x71, 0x6f, 0x92, 0x6f, 0xa5, 0x6f, 0x76, 0x82, 0x6a, 0x0e, 0x73, 0x30, 0x00, 0x30, 0xd0, 0x2f,\n    0xd2, 0x6f, 0xd1, 0x7f, 0xb4, 0x7f, 0x98, 0x2e, 0x2b, 0xb7, 0x15, 0xbd, 0x0b, 0xb8, 0x02, 0x0a, 0xc2, 0x6f, 0xc0, 0x7f, 0x98,\n    0x2e, 0x2b, 0xb7, 0x15, 0xbd, 0x0b, 0xb8, 0x42, 0x0a, 0xc0, 0x6f, 0x08, 0x17, 0x41, 0x18, 0x89, 0x16, 0xe1, 0x18, 0xd0, 0x18,\n    0xa1, 0x7f, 0x27, 0x25, 0x16, 0x25, 0x98, 0x2e, 0x79, 0xc0, 0x8b, 0x54, 0x90, 0x7f, 0xb3, 0x30, 0x82, 0x40, 0x80, 0x90, 0x0d,\n    0x2f, 0x7d, 0x52, 0x92, 0x6f, 0x98, 0x2e, 0x0f, 0xca, 0xb2, 0x6f, 0x90, 0x0e, 0x06, 0x2f, 0x8b, 0x50, 0x14, 0x30, 0x42, 0x6f,\n    0x51, 0x6f, 0x14, 0x42, 0x12, 0x42, 0x01, 0x42, 0x00, 0x2e, 0x31, 0x6f, 0x98, 0x2e, 0x74, 0xc0, 0x41, 0x6f, 0x80, 0x7f, 0x98,\n    0x2e, 0x74, 0xc0, 0x82, 0x6f, 0x10, 0x04, 0x43, 0x52, 0x01, 0x0f, 0x05, 0x2e, 0xcb, 0x00, 0x00, 0x30, 0x04, 0x30, 0x21, 0x2f,\n    0x51, 0x6f, 0x43, 0x58, 0x8c, 0x0e, 0x04, 0x30, 0x1c, 0x2f, 0x85, 0x88, 0x41, 0x6f, 0x04, 0x41, 0x8c, 0x0f, 0x04, 0x30, 0x16,\n    0x2f, 0x84, 0x88, 0x00, 0x2e, 0x04, 0x41, 0x04, 0x05, 0x8c, 0x0e, 0x04, 0x30, 0x0f, 0x2f, 0x82, 0x88, 0x31, 0x6f, 0x04, 0x41,\n    0x04, 0x05, 0x8c, 0x0e, 0x04, 0x30, 0x08, 0x2f, 0x83, 0x88, 0x00, 0x2e, 0x04, 0x41, 0x8c, 0x0f, 0x04, 0x30, 0x02, 0x2f, 0x21,\n    0x2e, 0xad, 0x01, 0x14, 0x30, 0x00, 0x91, 0x14, 0x2f, 0x03, 0x2e, 0xa1, 0x01, 0x41, 0x90, 0x0e, 0x2f, 0x03, 0x2e, 0xad, 0x01,\n    0x14, 0x30, 0x4c, 0x28, 0x23, 0x2e, 0xad, 0x01, 0x46, 0xa0, 0x06, 0x2f, 0x81, 0x84, 0x8d, 0x52, 0x48, 0x82, 0x82, 0x40, 0x21,\n    0x2e, 0xa1, 0x01, 0x42, 0x42, 0x5c, 0x2c, 0x02, 0x30, 0x05, 0x2e, 0xaa, 0x01, 0x80, 0xb2, 0x02, 0x30, 0x55, 0x2f, 0x03, 0x2e,\n    0xa9, 0x01, 0x92, 0x6f, 0xb3, 0x30, 0x98, 0x2e, 0x0f, 0xca, 0xb2, 0x6f, 0x90, 0x0f, 0x00, 0x30, 0x02, 0x30, 0x4a, 0x2f, 0xa2,\n    0x6f, 0x87, 0x52, 0x91, 0x00, 0x85, 0x52, 0x51, 0x0e, 0x02, 0x2f, 0x00, 0x2e, 0x43, 0x2c, 0x02, 0x30, 0xc2, 0x6f, 0x7f, 0x52,\n    0x91, 0x0e, 0x02, 0x30, 0x3c, 0x2f, 0x51, 0x6f, 0x81, 0x54, 0x98, 0x2e, 0xfe, 0xc9, 0x10, 0x25, 0xb3, 0x30, 0x21, 0x25, 0x98,\n    0x2e, 0x0f, 0xca, 0x32, 0x6f, 0xc0, 0x7f, 0xb3, 0x30, 0x12, 0x25, 0x98, 0x2e, 0x0f, 0xca, 0x42, 0x6f, 0xb0, 0x7f, 0xb3, 0x30,\n    0x12, 0x25, 0x98, 0x2e, 0x0f, 0xca, 0xb2, 0x6f, 0x90, 0x28, 0x83, 0x52, 0x98, 0x2e, 0xfe, 0xc9, 0xc2, 0x6f, 0x90, 0x0f, 0x00,\n    0x30, 0x02, 0x30, 0x1d, 0x2f, 0x05, 0x2e, 0xa1, 0x01, 0x80, 0xb2, 0x12, 0x30, 0x0f, 0x2f, 0x42, 0x6f, 0x03, 0x2e, 0xab, 0x01,\n    0x91, 0x0e, 0x02, 0x30, 0x12, 0x2f, 0x52, 0x6f, 0x03, 0x2e, 0xac, 0x01, 0x91, 0x0f, 0x02, 0x30, 0x0c, 0x2f, 0x21, 0x2e, 0xaa,\n    0x01, 0x0a, 0x2c, 0x12, 0x30, 0x03, 0x2e, 0xcb, 0x00, 0x8d, 0x58, 0x08, 0x89, 0x41, 0x40, 0x11, 0x43, 0x00, 0x43, 0x25, 0x2e,\n    0xa1, 0x01, 0xd4, 0x6f, 0x8f, 0x52, 0x00, 0x43, 0x3a, 0x89, 0x00, 0x2e, 0x10, 0x43, 0x10, 0x43, 0x61, 0x0e, 0xfb, 0x2f, 0x03,\n    0x2e, 0xa0, 0x01, 0x11, 0x1a, 0x02, 0x2f, 0x02, 0x25, 0x21, 0x2e, 0xa0, 0x01, 0xeb, 0x6f, 0x00, 0x5f, 0xb8, 0x2e, 0x91, 0x52,\n    0x10, 0x30, 0x02, 0x30, 0x95, 0x56, 0x52, 0x42, 0x4b, 0x0e, 0xfc, 0x2f, 0x8d, 0x54, 0x88, 0x82, 0x93, 0x56, 0x80, 0x42, 0x53,\n    0x42, 0x40, 0x42, 0x42, 0x86, 0x83, 0x54, 0xc0, 0x2e, 0xc2, 0x42, 0x00, 0x2e, 0xa3, 0x52, 0x00, 0x51, 0x52, 0x40, 0x47, 0x40,\n    0x1a, 0x25, 0x01, 0x2e, 0x97, 0x00, 0x8f, 0xbe, 0x72, 0x86, 0xfb, 0x7f, 0x0b, 0x30, 0x7c, 0xbf, 0xa5, 0x50, 0x10, 0x08, 0xdf,\n    0xba, 0x70, 0x88, 0xf8, 0xbf, 0xcb, 0x42, 0xd3, 0x7f, 0x6c, 0xbb, 0xfc, 0xbb, 0xc5, 0x0a, 0x90, 0x7f, 0x1b, 0x7f, 0x0b, 0x43,\n    0xc0, 0xb2, 0xe5, 0x7f, 0xb7, 0x7f, 0xa6, 0x7f, 0xc4, 0x7f, 0x90, 0x2e, 0x1c, 0xb7, 0x07, 0x2e, 0xd2, 0x00, 0xc0, 0xb2, 0x0b,\n    0x2f, 0x97, 0x52, 0x01, 0x2e, 0xcd, 0x00, 0x82, 0x7f, 0x98, 0x2e, 0xbb, 0xcc, 0x0b, 0x30, 0x37, 0x2e, 0xd2, 0x00, 0x82, 0x6f,\n    0x90, 0x6f, 0x1a, 0x25, 0x00, 0xb2, 0x8b, 0x7f, 0x14, 0x2f, 0xa6, 0xbd, 0x25, 0xbd, 0xb6, 0xb9, 0x2f, 0xb9, 0x80, 0xb2, 0xd4,\n    0xb0, 0x0c, 0x2f, 0x99, 0x54, 0x9b, 0x56, 0x0b, 0x30, 0x0b, 0x2e, 0xb1, 0x00, 0xa1, 0x58, 0x9b, 0x42, 0xdb, 0x42, 0x6c, 0x09,\n    0x2b, 0x2e, 0xb1, 0x00, 0x8b, 0x42, 0xcb, 0x42, 0x86, 0x7f, 0x73, 0x84, 0xa7, 0x56, 0xc3, 0x08, 0x39, 0x52, 0x05, 0x50, 0x72,\n    0x7f, 0x63, 0x7f, 0x98, 0x2e, 0xc2, 0xc0, 0xe1, 0x6f, 0x62, 0x6f, 0xd1, 0x0a, 0x01, 0x2e, 0xcd, 0x00, 0xd5, 0x6f, 0xc4, 0x6f,\n    0x72, 0x6f, 0x97, 0x52, 0x9d, 0x5c, 0x98, 0x2e, 0x06, 0xcd, 0x23, 0x6f, 0x90, 0x6f, 0x99, 0x52, 0xc0, 0xb2, 0x04, 0xbd, 0x54,\n    0x40, 0xaf, 0xb9, 0x45, 0x40, 0xe1, 0x7f, 0x02, 0x30, 0x06, 0x2f, 0xc0, 0xb2, 0x02, 0x30, 0x03, 0x2f, 0x9b, 0x5c, 0x12, 0x30,\n    0x94, 0x43, 0x85, 0x43, 0x03, 0xbf, 0x6f, 0xbb, 0x80, 0xb3, 0x20, 0x2f, 0x06, 0x6f, 0x26, 0x01, 0x16, 0x6f, 0x6e, 0x03, 0x45,\n    0x42, 0xc0, 0x90, 0x29, 0x2e, 0xce, 0x00, 0x9b, 0x52, 0x14, 0x2f, 0x9b, 0x5c, 0x00, 0x2e, 0x93, 0x41, 0x86, 0x41, 0xe3, 0x04,\n    0xae, 0x07, 0x80, 0xab, 0x04, 0x2f, 0x80, 0x91, 0x0a, 0x2f, 0x86, 0x6f, 0x73, 0x0f, 0x07, 0x2f, 0x83, 0x6f, 0xc0, 0xb2, 0x04,\n    0x2f, 0x54, 0x42, 0x45, 0x42, 0x12, 0x30, 0x04, 0x2c, 0x11, 0x30, 0x02, 0x2c, 0x11, 0x30, 0x11, 0x30, 0x02, 0xbc, 0x0f, 0xb8,\n    0xd2, 0x7f, 0x00, 0xb2, 0x0a, 0x2f, 0x01, 0x2e, 0xfc, 0x00, 0x05, 0x2e, 0xc7, 0x01, 0x10, 0x1a, 0x02, 0x2f, 0x21, 0x2e, 0xc7,\n    0x01, 0x03, 0x2d, 0x02, 0x2c, 0x01, 0x30, 0x01, 0x30, 0xb0, 0x6f, 0x98, 0x2e, 0x95, 0xcf, 0xd1, 0x6f, 0xa0, 0x6f, 0x98, 0x2e,\n    0x95, 0xcf, 0xe2, 0x6f, 0x9f, 0x52, 0x01, 0x2e, 0xce, 0x00, 0x82, 0x40, 0x50, 0x42, 0x0c, 0x2c, 0x42, 0x42, 0x11, 0x30, 0x23,\n    0x2e, 0xd2, 0x00, 0x01, 0x30, 0xb0, 0x6f, 0x98, 0x2e, 0x95, 0xcf, 0xa0, 0x6f, 0x01, 0x30, 0x98, 0x2e, 0x95, 0xcf, 0x00, 0x2e,\n    0xfb, 0x6f, 0x00, 0x5f, 0xb8, 0x2e, 0x83, 0x86, 0x01, 0x30, 0x00, 0x30, 0x94, 0x40, 0x24, 0x18, 0x06, 0x00, 0x53, 0x0e, 0x4f,\n    0x02, 0xf9, 0x2f, 0xb8, 0x2e, 0xa9, 0x52, 0x00, 0x2e, 0x60, 0x40, 0x41, 0x40, 0x0d, 0xbc, 0x98, 0xbc, 0xc0, 0x2e, 0x01, 0x0a,\n    0x0f, 0xb8, 0xab, 0x52, 0x53, 0x3c, 0x52, 0x40, 0x40, 0x40, 0x4b, 0x00, 0x82, 0x16, 0x26, 0xb9, 0x01, 0xb8, 0x41, 0x40, 0x10,\n    0x08, 0x97, 0xb8, 0x01, 0x08, 0xc0, 0x2e, 0x11, 0x30, 0x01, 0x08, 0x43, 0x86, 0x25, 0x40, 0x04, 0x40, 0xd8, 0xbe, 0x2c, 0x0b,\n    0x22, 0x11, 0x54, 0x42, 0x03, 0x80, 0x4b, 0x0e, 0xf6, 0x2f, 0xb8, 0x2e, 0x9f, 0x50, 0x10, 0x50, 0xad, 0x52, 0x05, 0x2e, 0xd3,\n    0x00, 0xfb, 0x7f, 0x00, 0x2e, 0x13, 0x40, 0x93, 0x42, 0x41, 0x0e, 0xfb, 0x2f, 0x98, 0x2e, 0xa5, 0xb7, 0x98, 0x2e, 0x87, 0xcf,\n    0x01, 0x2e, 0xd9, 0x00, 0x00, 0xb2, 0xfb, 0x6f, 0x0b, 0x2f, 0x01, 0x2e, 0x69, 0xf7, 0xb1, 0x3f, 0x01, 0x08, 0x01, 0x30, 0xf0,\n    0x5f, 0x23, 0x2e, 0xd9, 0x00, 0x21, 0x2e, 0x69, 0xf7, 0x80, 0x2e, 0x7a, 0xb7, 0xf0, 0x5f, 0xb8, 0x2e, 0x01, 0x2e, 0xc0, 0xf8,\n    0x03, 0x2e, 0xfc, 0xf5, 0x15, 0x54, 0xaf, 0x56, 0x82, 0x08, 0x0b, 0x2e, 0x69, 0xf7, 0xcb, 0x0a, 0xb1, 0x58, 0x80, 0x90, 0xdd,\n    0xbe, 0x4c, 0x08, 0x5f, 0xb9, 0x59, 0x22, 0x80, 0x90, 0x07, 0x2f, 0x03, 0x34, 0xc3, 0x08, 0xf2, 0x3a, 0x0a, 0x08, 0x02, 0x35,\n    0xc0, 0x90, 0x4a, 0x0a, 0x48, 0x22, 0xc0, 0x2e, 0x23, 0x2e, 0xfc, 0xf5, 0x10, 0x50, 0xfb, 0x7f, 0x98, 0x2e, 0x56, 0xc7, 0x98,\n    0x2e, 0x49, 0xc3, 0x10, 0x30, 0xfb, 0x6f, 0xf0, 0x5f, 0x21, 0x2e, 0xcc, 0x00, 0x21, 0x2e, 0xca, 0x00, 0xb8, 0x2e, 0x03, 0x2e,\n    0xd3, 0x00, 0x16, 0xb8, 0x02, 0x34, 0x4a, 0x0c, 0x21, 0x2e, 0x2d, 0xf5, 0xc0, 0x2e, 0x23, 0x2e, 0xd3, 0x00, 0x03, 0xbc, 0x21,\n    0x2e, 0xd5, 0x00, 0x03, 0x2e, 0xd5, 0x00, 0x40, 0xb2, 0x10, 0x30, 0x21, 0x2e, 0x77, 0x00, 0x01, 0x30, 0x05, 0x2f, 0x05, 0x2e,\n    0xd8, 0x00, 0x80, 0x90, 0x01, 0x2f, 0x23, 0x2e, 0x6f, 0xf5, 0xc0, 0x2e, 0x21, 0x2e, 0xd9, 0x00, 0x11, 0x30, 0x81, 0x08, 0x01,\n    0x2e, 0x6a, 0xf7, 0x71, 0x3f, 0x23, 0xbd, 0x01, 0x08, 0x02, 0x0a, 0xc0, 0x2e, 0x21, 0x2e, 0x6a, 0xf7, 0x30, 0x25, 0x00, 0x30,\n    0x21, 0x2e, 0x5a, 0xf5, 0x10, 0x50, 0x21, 0x2e, 0x7b, 0x00, 0x21, 0x2e, 0x7c, 0x00, 0xfb, 0x7f, 0x98, 0x2e, 0xc3, 0xb7, 0x40,\n    0x30, 0x21, 0x2e, 0xd4, 0x00, 0xfb, 0x6f, 0xf0, 0x5f, 0x03, 0x25, 0x80, 0x2e, 0xaf, 0xb7, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e,\n    0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00,\n    0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1,\n    0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x01, 0x2e, 0x5d, 0xf7, 0x08, 0xbc, 0x80, 0xac, 0x0e,\n    0xbb, 0x02, 0x2f, 0x00, 0x30, 0x41, 0x04, 0x82, 0x06, 0xc0, 0xa4, 0x00, 0x30, 0x11, 0x2f, 0x40, 0xa9, 0x03, 0x2f, 0x40, 0x91,\n    0x0d, 0x2f, 0x00, 0xa7, 0x0b, 0x2f, 0x80, 0xb3, 0xb3, 0x58, 0x02, 0x2f, 0x90, 0xa1, 0x26, 0x13, 0x20, 0x23, 0x80, 0x90, 0x10,\n    0x30, 0x01, 0x2f, 0xcc, 0x0e, 0x00, 0x2f, 0x00, 0x30, 0xb8, 0x2e, 0xb5, 0x50, 0x18, 0x08, 0x08, 0xbc, 0x88, 0xb6, 0x0d, 0x17,\n    0xc6, 0xbd, 0x56, 0xbc, 0xb7, 0x58, 0xda, 0xba, 0x04, 0x01, 0x1d, 0x0a, 0x10, 0x50, 0x05, 0x30, 0x32, 0x25, 0x45, 0x03, 0xfb,\n    0x7f, 0xf6, 0x30, 0x21, 0x25, 0x98, 0x2e, 0x37, 0xca, 0x16, 0xb5, 0x9a, 0xbc, 0x06, 0xb8, 0x80, 0xa8, 0x41, 0x0a, 0x0e, 0x2f,\n    0x80, 0x90, 0x02, 0x2f, 0x2d, 0x50, 0x48, 0x0f, 0x09, 0x2f, 0xbf, 0xa0, 0x04, 0x2f, 0xbf, 0x90, 0x06, 0x2f, 0xb7, 0x54, 0xca,\n    0x0f, 0x03, 0x2f, 0x00, 0x2e, 0x02, 0x2c, 0xb7, 0x52, 0x2d, 0x52, 0xf2, 0x33, 0x98, 0x2e, 0xd9, 0xc0, 0xfb, 0x6f, 0xf1, 0x37,\n    0xc0, 0x2e, 0x01, 0x08, 0xf0, 0x5f, 0xbf, 0x56, 0xb9, 0x54, 0xd0, 0x40, 0xc4, 0x40, 0x0b, 0x2e, 0xfd, 0xf3, 0xbf, 0x52, 0x90,\n    0x42, 0x94, 0x42, 0x95, 0x42, 0x05, 0x30, 0xc1, 0x50, 0x0f, 0x88, 0x06, 0x40, 0x04, 0x41, 0x96, 0x42, 0xc5, 0x42, 0x48, 0xbe,\n    0x73, 0x30, 0x0d, 0x2e, 0xd8, 0x00, 0x4f, 0xba, 0x84, 0x42, 0x03, 0x42, 0x81, 0xb3, 0x02, 0x2f, 0x2b, 0x2e, 0x6f, 0xf5, 0x06,\n    0x2d, 0x05, 0x2e, 0x77, 0xf7, 0xbd, 0x56, 0x93, 0x08, 0x25, 0x2e, 0x77, 0xf7, 0xbb, 0x54, 0x25, 0x2e, 0xc2, 0xf5, 0x07, 0x2e,\n    0xfd, 0xf3, 0x42, 0x30, 0xb4, 0x33, 0xda, 0x0a, 0x4c, 0x00, 0x27, 0x2e, 0xfd, 0xf3, 0x43, 0x40, 0xd4, 0x3f, 0xdc, 0x08, 0x43,\n    0x42, 0x00, 0x2e, 0x00, 0x2e, 0x43, 0x40, 0x24, 0x30, 0xdc, 0x0a, 0x43, 0x42, 0x04, 0x80, 0x03, 0x2e, 0xfd, 0xf3, 0x4a, 0x0a,\n    0x23, 0x2e, 0xfd, 0xf3, 0x61, 0x34, 0xc0, 0x2e, 0x01, 0x42, 0x00, 0x2e, 0x60, 0x50, 0x1a, 0x25, 0x7a, 0x86, 0xe0, 0x7f, 0xf3,\n    0x7f, 0x03, 0x25, 0xc3, 0x52, 0x41, 0x84, 0xdb, 0x7f, 0x33, 0x30, 0x98, 0x2e, 0x16, 0xc2, 0x1a, 0x25, 0x7d, 0x82, 0xf0, 0x6f,\n    0xe2, 0x6f, 0x32, 0x25, 0x16, 0x40, 0x94, 0x40, 0x26, 0x01, 0x85, 0x40, 0x8e, 0x17, 0xc4, 0x42, 0x6e, 0x03, 0x95, 0x42, 0x41,\n    0x0e, 0xf4, 0x2f, 0xdb, 0x6f, 0xa0, 0x5f, 0xb8, 0x2e, 0xb0, 0x51, 0xfb, 0x7f, 0x98, 0x2e, 0xe8, 0x0d, 0x5a, 0x25, 0x98, 0x2e,\n    0x0f, 0x0e, 0xcb, 0x58, 0x32, 0x87, 0xc4, 0x7f, 0x65, 0x89, 0x6b, 0x8d, 0xc5, 0x5a, 0x65, 0x7f, 0xe1, 0x7f, 0x83, 0x7f, 0xa6,\n    0x7f, 0x74, 0x7f, 0xd0, 0x7f, 0xb6, 0x7f, 0x94, 0x7f, 0x17, 0x30, 0xc7, 0x52, 0xc9, 0x54, 0x51, 0x7f, 0x00, 0x2e, 0x85, 0x6f,\n    0x42, 0x7f, 0x00, 0x2e, 0x51, 0x41, 0x45, 0x81, 0x42, 0x41, 0x13, 0x40, 0x3b, 0x8a, 0x00, 0x40, 0x4b, 0x04, 0xd0, 0x06, 0xc0,\n    0xac, 0x85, 0x7f, 0x02, 0x2f, 0x02, 0x30, 0x51, 0x04, 0xd3, 0x06, 0x41, 0x84, 0x05, 0x30, 0x5d, 0x02, 0xc9, 0x16, 0xdf, 0x08,\n    0xd3, 0x00, 0x8d, 0x02, 0xaf, 0xbc, 0xb1, 0xb9, 0x59, 0x0a, 0x65, 0x6f, 0x11, 0x43, 0xa1, 0xb4, 0x52, 0x41, 0x53, 0x41, 0x01,\n    0x43, 0x34, 0x7f, 0x65, 0x7f, 0x26, 0x31, 0xe5, 0x6f, 0xd4, 0x6f, 0x98, 0x2e, 0x37, 0xca, 0x32, 0x6f, 0x75, 0x6f, 0x83, 0x40,\n    0x42, 0x41, 0x23, 0x7f, 0x12, 0x7f, 0xf6, 0x30, 0x40, 0x25, 0x51, 0x25, 0x98, 0x2e, 0x37, 0xca, 0x14, 0x6f, 0x20, 0x05, 0x70,\n    0x6f, 0x25, 0x6f, 0x69, 0x07, 0xa2, 0x6f, 0x31, 0x6f, 0x0b, 0x30, 0x04, 0x42, 0x9b, 0x42, 0x8b, 0x42, 0x55, 0x42, 0x32, 0x7f,\n    0x40, 0xa9, 0xc3, 0x6f, 0x71, 0x7f, 0x02, 0x30, 0xd0, 0x40, 0xc3, 0x7f, 0x03, 0x2f, 0x40, 0x91, 0x15, 0x2f, 0x00, 0xa7, 0x13,\n    0x2f, 0x00, 0xa4, 0x11, 0x2f, 0x84, 0xbd, 0x98, 0x2e, 0x79, 0xca, 0x55, 0x6f, 0xb7, 0x54, 0x54, 0x41, 0x82, 0x00, 0xf3, 0x3f,\n    0x45, 0x41, 0xcb, 0x02, 0xf6, 0x30, 0x98, 0x2e, 0x37, 0xca, 0x35, 0x6f, 0xa4, 0x6f, 0x41, 0x43, 0x03, 0x2c, 0x00, 0x43, 0xa4,\n    0x6f, 0x35, 0x6f, 0x17, 0x30, 0x42, 0x6f, 0x51, 0x6f, 0x93, 0x40, 0x42, 0x82, 0x00, 0x41, 0xc3, 0x00, 0x03, 0x43, 0x51, 0x7f,\n    0x00, 0x2e, 0x94, 0x40, 0x41, 0x41, 0x4c, 0x02, 0xc4, 0x6f, 0xd1, 0x56, 0x63, 0x0e, 0x74, 0x6f, 0x51, 0x43, 0xa5, 0x7f, 0x8a,\n    0x2f, 0x09, 0x2e, 0xd8, 0x00, 0x01, 0xb3, 0x21, 0x2f, 0xcb, 0x58, 0x90, 0x6f, 0x13, 0x41, 0xb6, 0x6f, 0xe4, 0x7f, 0x00, 0x2e,\n    0x91, 0x41, 0x14, 0x40, 0x92, 0x41, 0x15, 0x40, 0x17, 0x2e, 0x6f, 0xf5, 0xb6, 0x7f, 0xd0, 0x7f, 0xcb, 0x7f, 0x98, 0x2e, 0x00,\n    0x0c, 0x07, 0x15, 0xc2, 0x6f, 0x14, 0x0b, 0x29, 0x2e, 0x6f, 0xf5, 0xc3, 0xa3, 0xc1, 0x8f, 0xe4, 0x6f, 0xd0, 0x6f, 0xe6, 0x2f,\n    0x14, 0x30, 0x05, 0x2e, 0x6f, 0xf5, 0x14, 0x0b, 0x29, 0x2e, 0x6f, 0xf5, 0x18, 0x2d, 0xcd, 0x56, 0x04, 0x32, 0xb5, 0x6f, 0x1c,\n    0x01, 0x51, 0x41, 0x52, 0x41, 0xc3, 0x40, 0xb5, 0x7f, 0xe4, 0x7f, 0x98, 0x2e, 0x1f, 0x0c, 0xe4, 0x6f, 0x21, 0x87, 0x00, 0x43,\n    0x04, 0x32, 0xcf, 0x54, 0x5a, 0x0e, 0xef, 0x2f, 0x15, 0x54, 0x09, 0x2e, 0x77, 0xf7, 0x22, 0x0b, 0x29, 0x2e, 0x77, 0xf7, 0xfb,\n    0x6f, 0x50, 0x5e, 0xb8, 0x2e, 0x10, 0x50, 0x01, 0x2e, 0xd4, 0x00, 0x00, 0xb2, 0xfb, 0x7f, 0x51, 0x2f, 0x01, 0xb2, 0x48, 0x2f,\n    0x02, 0xb2, 0x42, 0x2f, 0x03, 0x90, 0x56, 0x2f, 0xd7, 0x52, 0x79, 0x80, 0x42, 0x40, 0x81, 0x84, 0x00, 0x40, 0x42, 0x42, 0x98,\n    0x2e, 0x93, 0x0c, 0xd9, 0x54, 0xd7, 0x50, 0xa1, 0x40, 0x98, 0xbd, 0x82, 0x40, 0x3e, 0x82, 0xda, 0x0a, 0x44, 0x40, 0x8b, 0x16,\n    0xe3, 0x00, 0x53, 0x42, 0x00, 0x2e, 0x43, 0x40, 0x9a, 0x02, 0x52, 0x42, 0x00, 0x2e, 0x41, 0x40, 0x15, 0x54, 0x4a, 0x0e, 0x3a,\n    0x2f, 0x3a, 0x82, 0x00, 0x30, 0x41, 0x40, 0x21, 0x2e, 0x85, 0x0f, 0x40, 0xb2, 0x0a, 0x2f, 0x98, 0x2e, 0xb1, 0x0c, 0x98, 0x2e,\n    0x45, 0x0e, 0x98, 0x2e, 0x5b, 0x0e, 0xfb, 0x6f, 0xf0, 0x5f, 0x00, 0x30, 0x80, 0x2e, 0xce, 0xb7, 0xdd, 0x52, 0xd3, 0x54, 0x42,\n    0x42, 0x4f, 0x84, 0x73, 0x30, 0xdb, 0x52, 0x83, 0x42, 0x1b, 0x30, 0x6b, 0x42, 0x23, 0x30, 0x27, 0x2e, 0xd7, 0x00, 0x37, 0x2e,\n    0xd4, 0x00, 0x21, 0x2e, 0xd6, 0x00, 0x7a, 0x84, 0x17, 0x2c, 0x42, 0x42, 0x30, 0x30, 0x21, 0x2e, 0xd4, 0x00, 0x12, 0x2d, 0x21,\n    0x30, 0x00, 0x30, 0x23, 0x2e, 0xd4, 0x00, 0x21, 0x2e, 0x7b, 0xf7, 0x0b, 0x2d, 0x17, 0x30, 0x98, 0x2e, 0x51, 0x0c, 0xd5, 0x50,\n    0x0c, 0x82, 0x72, 0x30, 0x2f, 0x2e, 0xd4, 0x00, 0x25, 0x2e, 0x7b, 0xf7, 0x40, 0x42, 0x00, 0x2e, 0xfb, 0x6f, 0xf0, 0x5f, 0xb8,\n    0x2e, 0x70, 0x50, 0x0a, 0x25, 0x39, 0x86, 0xfb, 0x7f, 0xe1, 0x32, 0x62, 0x30, 0x98, 0x2e, 0xc2, 0xc4, 0xb5, 0x56, 0xa5, 0x6f,\n    0xab, 0x08, 0x91, 0x6f, 0x4b, 0x08, 0xdf, 0x56, 0xc4, 0x6f, 0x23, 0x09, 0x4d, 0xba, 0x93, 0xbc, 0x8c, 0x0b, 0xd1, 0x6f, 0x0b,\n    0x09, 0xcb, 0x52, 0xe1, 0x5e, 0x56, 0x42, 0xaf, 0x09, 0x4d, 0xba, 0x23, 0xbd, 0x94, 0x0a, 0xe5, 0x6f, 0x68, 0xbb, 0xeb, 0x08,\n    0xbd, 0xb9, 0x63, 0xbe, 0xfb, 0x6f, 0x52, 0x42, 0xe3, 0x0a, 0xc0, 0x2e, 0x43, 0x42, 0x90, 0x5f, 0xd1, 0x50, 0x03, 0x2e, 0x25,\n    0xf3, 0x13, 0x40, 0x00, 0x40, 0x9b, 0xbc, 0x9b, 0xb4, 0x08, 0xbd, 0xb8, 0xb9, 0x98, 0xbc, 0xda, 0x0a, 0x08, 0xb6, 0x89, 0x16,\n    0xc0, 0x2e, 0x19, 0x00, 0x62, 0x02, 0x10, 0x50, 0xfb, 0x7f, 0x98, 0x2e, 0x81, 0x0d, 0x01, 0x2e, 0xd4, 0x00, 0x31, 0x30, 0x08,\n    0x04, 0xfb, 0x6f, 0x01, 0x30, 0xf0, 0x5f, 0x23, 0x2e, 0xd6, 0x00, 0x21, 0x2e, 0xd7, 0x00, 0xb8, 0x2e, 0x01, 0x2e, 0xd7, 0x00,\n    0x03, 0x2e, 0xd6, 0x00, 0x48, 0x0e, 0x01, 0x2f, 0x80, 0x2e, 0x1f, 0x0e, 0xb8, 0x2e, 0xe3, 0x50, 0x21, 0x34, 0x01, 0x42, 0x82,\n    0x30, 0xc1, 0x32, 0x25, 0x2e, 0x62, 0xf5, 0x01, 0x00, 0x22, 0x30, 0x01, 0x40, 0x4a, 0x0a, 0x01, 0x42, 0xb8, 0x2e, 0xe3, 0x54,\n    0xf0, 0x3b, 0x83, 0x40, 0xd8, 0x08, 0xe5, 0x52, 0x83, 0x42, 0x00, 0x30, 0x83, 0x30, 0x50, 0x42, 0xc4, 0x32, 0x27, 0x2e, 0x64,\n    0xf5, 0x94, 0x00, 0x50, 0x42, 0x40, 0x42, 0xd3, 0x3f, 0x84, 0x40, 0x7d, 0x82, 0xe3, 0x08, 0x40, 0x42, 0x83, 0x42, 0xb8, 0x2e,\n    0xdd, 0x52, 0x00, 0x30, 0x40, 0x42, 0x7c, 0x86, 0xb9, 0x52, 0x09, 0x2e, 0x70, 0x0f, 0xbf, 0x54, 0xc4, 0x42, 0xd3, 0x86, 0x54,\n    0x40, 0x55, 0x40, 0x94, 0x42, 0x85, 0x42, 0x21, 0x2e, 0xd7, 0x00, 0x42, 0x40, 0x25, 0x2e, 0xfd, 0xf3, 0xc0, 0x42, 0x7e, 0x82,\n    0x05, 0x2e, 0x7d, 0x00, 0x80, 0xb2, 0x14, 0x2f, 0x05, 0x2e, 0x89, 0x00, 0x27, 0xbd, 0x2f, 0xb9, 0x80, 0x90, 0x02, 0x2f, 0x21,\n    0x2e, 0x6f, 0xf5, 0x0c, 0x2d, 0x07, 0x2e, 0x71, 0x0f, 0x14, 0x30, 0x1c, 0x09, 0x05, 0x2e, 0x77, 0xf7, 0xbd, 0x56, 0x47, 0xbe,\n    0x93, 0x08, 0x94, 0x0a, 0x25, 0x2e, 0x77, 0xf7, 0xe7, 0x54, 0x50, 0x42, 0x4a, 0x0e, 0xfc, 0x2f, 0xb8, 0x2e, 0x50, 0x50, 0x02,\n    0x30, 0x43, 0x86, 0xe5, 0x50, 0xfb, 0x7f, 0xe3, 0x7f, 0xd2, 0x7f, 0xc0, 0x7f, 0xb1, 0x7f, 0x00, 0x2e, 0x41, 0x40, 0x00, 0x40,\n    0x48, 0x04, 0x98, 0x2e, 0x74, 0xc0, 0x1e, 0xaa, 0xd3, 0x6f, 0x14, 0x30, 0xb1, 0x6f, 0xe3, 0x22, 0xc0, 0x6f, 0x52, 0x40, 0xe4,\n    0x6f, 0x4c, 0x0e, 0x12, 0x42, 0xd3, 0x7f, 0xeb, 0x2f, 0x03, 0x2e, 0x86, 0x0f, 0x40, 0x90, 0x11, 0x30, 0x03, 0x2f, 0x23, 0x2e,\n    0x86, 0x0f, 0x02, 0x2c, 0x00, 0x30, 0xd0, 0x6f, 0xfb, 0x6f, 0xb0, 0x5f, 0xb8, 0x2e, 0x40, 0x50, 0xf1, 0x7f, 0x0a, 0x25, 0x3c,\n    0x86, 0xeb, 0x7f, 0x41, 0x33, 0x22, 0x30, 0x98, 0x2e, 0xc2, 0xc4, 0xd3, 0x6f, 0xf4, 0x30, 0xdc, 0x09, 0x47, 0x58, 0xc2, 0x6f,\n    0x94, 0x09, 0xeb, 0x58, 0x6a, 0xbb, 0xdc, 0x08, 0xb4, 0xb9, 0xb1, 0xbd, 0xe9, 0x5a, 0x95, 0x08, 0x21, 0xbd, 0xf6, 0xbf, 0x77,\n    0x0b, 0x51, 0xbe, 0xf1, 0x6f, 0xeb, 0x6f, 0x52, 0x42, 0x54, 0x42, 0xc0, 0x2e, 0x43, 0x42, 0xc0, 0x5f, 0x50, 0x50, 0xf5, 0x50,\n    0x31, 0x30, 0x11, 0x42, 0xfb, 0x7f, 0x7b, 0x30, 0x0b, 0x42, 0x11, 0x30, 0x02, 0x80, 0x23, 0x33, 0x01, 0x42, 0x03, 0x00, 0x07,\n    0x2e, 0x80, 0x03, 0x05, 0x2e, 0xd3, 0x00, 0x23, 0x52, 0xe2, 0x7f, 0xd3, 0x7f, 0xc0, 0x7f, 0x98, 0x2e, 0xb6, 0x0e, 0xd1, 0x6f,\n    0x08, 0x0a, 0x1a, 0x25, 0x7b, 0x86, 0xd0, 0x7f, 0x01, 0x33, 0x12, 0x30, 0x98, 0x2e, 0xc2, 0xc4, 0xd1, 0x6f, 0x08, 0x0a, 0x00,\n    0xb2, 0x0d, 0x2f, 0xe3, 0x6f, 0x01, 0x2e, 0x80, 0x03, 0x51, 0x30, 0xc7, 0x86, 0x23, 0x2e, 0x21, 0xf2, 0x08, 0xbc, 0xc0, 0x42,\n    0x98, 0x2e, 0xa5, 0xb7, 0x00, 0x2e, 0x00, 0x2e, 0xd0, 0x2e, 0xb0, 0x6f, 0x0b, 0xb8, 0x03, 0x2e, 0x1b, 0x00, 0x08, 0x1a, 0xb0,\n    0x7f, 0x70, 0x30, 0x04, 0x2f, 0x21, 0x2e, 0x21, 0xf2, 0x00, 0x2e, 0x00, 0x2e, 0xd0, 0x2e, 0x98, 0x2e, 0x6d, 0xc0, 0x98, 0x2e,\n    0x5d, 0xc0, 0xed, 0x50, 0x98, 0x2e, 0x44, 0xcb, 0xef, 0x50, 0x98, 0x2e, 0x46, 0xc3, 0xf1, 0x50, 0x98, 0x2e, 0x53, 0xc7, 0x35,\n    0x50, 0x98, 0x2e, 0x64, 0xcf, 0x10, 0x30, 0x98, 0x2e, 0xdc, 0x03, 0x20, 0x26, 0xc0, 0x6f, 0x02, 0x31, 0x12, 0x42, 0xab, 0x33,\n    0x0b, 0x42, 0x37, 0x80, 0x01, 0x30, 0x01, 0x42, 0xf3, 0x37, 0xf7, 0x52, 0xfb, 0x50, 0x44, 0x40, 0xa2, 0x0a, 0x42, 0x42, 0x8b,\n    0x31, 0x09, 0x2e, 0x5e, 0xf7, 0xf9, 0x54, 0xe3, 0x08, 0x83, 0x42, 0x1b, 0x42, 0x23, 0x33, 0x4b, 0x00, 0xbc, 0x84, 0x0b, 0x40,\n    0x33, 0x30, 0x83, 0x42, 0x0b, 0x42, 0xe0, 0x7f, 0xd1, 0x7f, 0x98, 0x2e, 0x58, 0xb7, 0xd1, 0x6f, 0x80, 0x30, 0x40, 0x42, 0x03,\n    0x30, 0xe0, 0x6f, 0xf3, 0x54, 0x04, 0x30, 0x00, 0x2e, 0x00, 0x2e, 0x01, 0x89, 0x62, 0x0e, 0xfa, 0x2f, 0x43, 0x42, 0x11, 0x30,\n    0xfb, 0x6f, 0xc0, 0x2e, 0x01, 0x42, 0xb0, 0x5f, 0xc1, 0x4a, 0x00, 0x00, 0x6d, 0x57, 0x00, 0x00, 0x77, 0x8e, 0x00, 0x00, 0xe0,\n    0xff, 0xff, 0xff, 0xd3, 0xff, 0xff, 0xff, 0xe5, 0xff, 0xff, 0xff, 0xee, 0xe1, 0xff, 0xff, 0x7c, 0x13, 0x00, 0x00, 0x46, 0xe6,\n    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2e, 0x00,\n    0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1,\n    0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80,\n    0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e,\n    0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00,\n    0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1,\n    0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80,\n    0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e,\n    0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00,\n    0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1,\n    0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80,\n    0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e, 0x00, 0xc1, 0x80, 0x2e,\n    0x00, 0xc1};\n\n#define BMI270_CONFIG_FILE_SIZE sizeof(bmi270_config_file)\n\nBMI270Sensor::BMI270Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice)\n{\n    if (foundDevice.address.port == ScanI2C::I2CPort::WIRE1) {\n#ifdef I2C_SDA1\n        wire = &Wire1;\n#else\n        wire = &Wire;\n#endif\n    } else {\n        wire = &Wire;\n    }\n}\n\nbool BMI270Sensor::writeRegister(uint8_t reg, uint8_t value)\n{\n    wire->beginTransmission(deviceAddress());\n    wire->write(reg);\n    wire->write(value);\n    return wire->endTransmission() == 0;\n}\n\nbool BMI270Sensor::writeRegisters(uint8_t reg, const uint8_t *data, size_t len)\n{\n    wire->beginTransmission(deviceAddress());\n    wire->write(reg);\n    for (size_t i = 0; i < len; i++) {\n        wire->write(data[i]);\n    }\n    return wire->endTransmission() == 0;\n}\n\nuint8_t BMI270Sensor::readRegister(uint8_t reg)\n{\n    wire->beginTransmission(deviceAddress());\n    wire->write(reg);\n    wire->endTransmission(false);\n    wire->requestFrom(deviceAddress(), (uint8_t)1);\n    if (wire->available()) {\n        return wire->read();\n    }\n    return 0;\n}\n\nbool BMI270Sensor::readRegisters(uint8_t reg, uint8_t *data, size_t len)\n{\n    wire->beginTransmission(deviceAddress());\n    wire->write(reg);\n    wire->endTransmission(false);\n    size_t bytesRead = wire->requestFrom(deviceAddress(), (uint8_t)len);\n    if (bytesRead != len) {\n        // Read any available bytes to keep the bus state clean, but report failure.\n        for (size_t i = 0; i < bytesRead && wire->available(); i++) {\n            data[i] = wire->read();\n        }\n        return false;\n    }\n\n    for (size_t i = 0; i < len && wire->available(); i++) {\n        data[i] = wire->read();\n    }\n    return true;\n}\n\nbool BMI270Sensor::uploadConfigFile()\n{\n    if (!writeRegister(BMI270_REG_INIT_CTRL, 0x00))\n        return false;\n\n    const size_t chunkSize = 32;\n    size_t bytesWritten = 0;\n\n    while (bytesWritten < BMI270_CONFIG_FILE_SIZE) {\n        size_t remaining = BMI270_CONFIG_FILE_SIZE - bytesWritten;\n        size_t toWrite = (remaining < chunkSize) ? remaining : chunkSize;\n\n        // Set address in word units before each chunk\n        uint16_t wordAddr = bytesWritten / 2;\n        if (!writeRegister(BMI270_REG_INIT_ADDR_0, (uint8_t)(wordAddr & 0x0F)))\n            return false;\n        if (!writeRegister(BMI270_REG_INIT_ADDR_1, (uint8_t)(wordAddr >> 4)))\n            return false;\n\n        wire->beginTransmission(deviceAddress());\n        wire->write(BMI270_REG_INIT_DATA);\n        for (size_t i = 0; i < toWrite; i++) {\n            wire->write(pgm_read_byte(&bmi270_config_file[bytesWritten + i]));\n        }\n        if (wire->endTransmission() != 0)\n            return false;\n\n        bytesWritten += toWrite;\n    }\n\n    if (!writeRegister(BMI270_REG_INIT_CTRL, 0x01))\n        return false;\n\n    delay(50);\n\n    for (int i = 0; i < 10; i++) {\n        uint8_t status = readRegister(BMI270_REG_INTERNAL_STATUS);\n        if ((status & 0x0F) == BMI270_INIT_OK)\n            return true;\n        delay(20);\n    }\n\n    LOG_WARN(\"BMI270 status=0x%02X\", readRegister(BMI270_REG_INTERNAL_STATUS));\n    return false;\n}\n\nbool BMI270Sensor::init()\n{\n    delay(10);\n    writeRegister(BMI270_REG_CMD, BMI270_CMD_SOFTRESET);\n    delay(50);\n\n    if (!writeRegister(BMI270_REG_PWR_CONF, BMI270_PWR_CONF_ADV_POWER_SAVE_DISABLED))\n        return false;\n    delay(2);\n\n    if (!uploadConfigFile()) {\n        LOG_WARN(\"BMI270 config failed\");\n        return false;\n    }\n\n    uint8_t accConf = BMI270_ACC_ODR_50HZ | BMI270_ACC_BWP_NORMAL | BMI270_ACC_FILTER_PERF;\n    if (!writeRegister(BMI270_REG_ACC_CONF, accConf) || !writeRegister(BMI270_REG_ACC_RANGE, BMI270_ACC_RANGE_2G) ||\n        !writeRegister(BMI270_REG_PWR_CTRL, BMI270_PWR_CTRL_ACC_EN))\n        return false;\n\n    delay(50);\n    initialized = true;\n    return true;\n}\n\nint32_t BMI270Sensor::runOnce()\n{\n    if (!initialized) {\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n\n    // Read accelerometer data (6 bytes)\n    uint8_t data[6];\n    if (!readRegisters(BMI270_REG_ACC_X_LSB, data, 6)) {\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n\n    // Convert to 16-bit signed values\n    int16_t x = (int16_t)((data[1] << 8) | data[0]);\n    int16_t y = (int16_t)((data[3] << 8) | data[2]);\n    int16_t z = (int16_t)((data[5] << 8) | data[4]);\n\n    if (!hasBaseline) {\n        prevX = x;\n        prevY = y;\n        prevZ = z;\n        hasBaseline = true;\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n\n    // Calculate change in acceleration\n    int16_t deltaX = abs(x - prevX);\n    int16_t deltaY = abs(y - prevY);\n    int16_t deltaZ = abs(z - prevZ);\n\n    // Update baseline with low-pass filter\n    prevX = (prevX * 9 + x) / 10;\n    prevY = (prevY * 9 + y) / 10;\n    prevZ = (prevZ * 9 + z) / 10;\n\n    // Check for significant motion (~0.2g at 2g range)\n    const int16_t threshold = 3200;\n    if (deltaX > threshold || deltaY > threshold || deltaZ > threshold) {\n        wakeScreen();\n        return 500;\n    }\n\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif\n"
  },
  {
    "path": "src/motion/BMI270Sensor.h",
    "content": "#pragma once\n#ifndef _BMI270_SENSOR_H_\n#define _BMI270_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_BMI270)\n\nclass BMI270Sensor : public MotionSensor\n{\n  private:\n    bool initialized = false;\n    TwoWire *wire = nullptr;\n\n    // Previous readings for motion detection\n    int16_t prevX = 0, prevY = 0, prevZ = 0;\n    bool hasBaseline = false;\n\n    // BMI270 register access\n    bool writeRegister(uint8_t reg, uint8_t value);\n    bool writeRegisters(uint8_t reg, const uint8_t *data, size_t len);\n    uint8_t readRegister(uint8_t reg);\n    bool readRegisters(uint8_t reg, uint8_t *data, size_t len);\n\n    // Config file upload (BMI270 requires 8KB config blob)\n    bool uploadConfigFile();\n\n  public:\n    explicit BMI270Sensor(ScanI2C::FoundDevice foundDevice);\n    virtual bool init() override;\n    virtual int32_t runOnce() override;\n};\n\n#endif\n\n#endif\n"
  },
  {
    "path": "src/motion/BMM150Sensor.cpp",
    "content": "#include \"BMM150Sensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<DFRobot_BMM150.h>)\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN)\n\n// screen is defined in main.cpp\nextern graphics::Screen *screen;\n#endif\n\n// Flag when an interrupt has been detected\nvolatile static bool BMM150_IRQ = false;\n\nBMM150Sensor::BMM150Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\nbool BMM150Sensor::init()\n{\n    // Initialise the sensor\n    sensor = BMM150Singleton::GetInstance(device);\n    return sensor->init(device);\n}\n\nint32_t BMM150Sensor::runOnce()\n{\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN\n    float heading = sensor->getCompassDegree();\n\n    switch (config.display.compass_orientation) {\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0_INVERTED:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0:\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90_INVERTED:\n        heading += 90;\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180_INVERTED:\n        heading += 180;\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED:\n        heading += 270;\n        break;\n    }\n    if (screen)\n        screen->setHeading(heading);\n#endif\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n// ----------------------------------------------------------------------\n// BMM150Singleton\n// ----------------------------------------------------------------------\n\n// Get a singleton wrapper for an Sparkfun BMM_150_I2C\nBMM150Singleton *BMM150Singleton::GetInstance(ScanI2C::FoundDevice device)\n{\n#if defined(WIRE_INTERFACES_COUNT) && (WIRE_INTERFACES_COUNT > 1)\n    TwoWire &bus = (device.address.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);\n#else\n    TwoWire &bus = Wire; // fallback if only one I2C interface\n#endif\n    if (pinstance == nullptr) {\n        pinstance = new BMM150Singleton(&bus, device.address.address);\n    }\n    return pinstance;\n}\n\nBMM150Singleton::~BMM150Singleton() {}\n\nBMM150Singleton *BMM150Singleton::pinstance{nullptr};\n\n// Initialise the BMM150 Sensor\n// https://github.com/DFRobot/DFRobot_BMM150/blob/master/examples/getGeomagneticData/getGeomagneticData.ino\nbool BMM150Singleton::init(ScanI2C::FoundDevice device)\n{\n\n    // startup\n    LOG_DEBUG(\"BMM150 begin on addr 0x%02X (port=%d)\", device.address.address, device.address.port);\n    uint8_t status = begin();\n    if (status != 0) {\n        LOG_DEBUG(\"BMM150 init error %u\", status);\n        return false;\n    }\n\n    // SW reset to make sure the device starts in a known state\n    setOperationMode(BMM150_POWERMODE_NORMAL);\n    setPresetMode(BMM150_PRESETMODE_LOWPOWER);\n    setRate(BMM150_DATA_RATE_02HZ);\n    setMeasurementXYZ();\n    return true;\n}\n\n#endif"
  },
  {
    "path": "src/motion/BMM150Sensor.h",
    "content": "#pragma once\n#ifndef _BMM_150_SENSOR_H_\n#define _BMM_150_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<DFRobot_BMM150.h>)\n\n#include \"Fusion/Fusion.h\"\n#include <DFRobot_BMM150.h>\n\n// The I2C address of the Accelerometer (if found) from main.cpp\nextern ScanI2C::DeviceAddress accelerometer_found;\n\n// Singleton wrapper\nclass BMM150Singleton : public DFRobot_BMM150_I2C\n{\n  private:\n    static BMM150Singleton *pinstance;\n\n  protected:\n    BMM150Singleton(TwoWire *tw, uint8_t addr) : DFRobot_BMM150_I2C(tw, addr) {}\n    ~BMM150Singleton();\n\n  public:\n    // Create a singleton instance (not thread safe)\n    static BMM150Singleton *GetInstance(ScanI2C::FoundDevice device);\n\n    // Singletons should not be cloneable.\n    BMM150Singleton(BMM150Singleton &other) = delete;\n\n    // Singletons should not be assignable.\n    void operator=(const BMM150Singleton &) = delete;\n\n    // Initialise the motion sensor singleton for normal operation\n    bool init(ScanI2C::FoundDevice device);\n};\n\nclass BMM150Sensor : public MotionSensor\n{\n  private:\n    BMM150Singleton *sensor = nullptr;\n    bool showingScreen = false;\n\n  public:\n    explicit BMM150Sensor(ScanI2C::FoundDevice foundDevice);\n\n    // Initialise the motion sensor\n    virtual bool init() override;\n\n    // Called each time our sensor gets a chance to run\n    virtual int32_t runOnce() override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/BMX160Sensor.cpp",
    "content": "#include \"BMX160Sensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n\nBMX160Sensor::BMX160Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\n#if !defined(RAK2560) && __has_include(<Rak_BMX160.h>)\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN)\n\n// screen is defined in main.cpp\nextern graphics::Screen *screen;\n#endif\n\nbool BMX160Sensor::init()\n{\n    if (sensor.begin()) {\n        // set output data rate\n        sensor.ODR_Config(BMX160_ACCEL_ODR_100HZ, BMX160_GYRO_ODR_100HZ);\n        LOG_DEBUG(\"BMX160 init ok\");\n        return true;\n    }\n    LOG_DEBUG(\"BMX160 init failed\");\n    return false;\n}\n\nint32_t BMX160Sensor::runOnce()\n{\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN)\n    sBmx160SensorData_t magAccel;\n    sBmx160SensorData_t gAccel;\n\n    /* Get a new sensor event */\n    sensor.getAllData(&magAccel, NULL, &gAccel);\n\n    if (doCalibration) {\n\n        if (!showingScreen) {\n            powerFSM.trigger(EVENT_PRESS); // keep screen alive during calibration\n            showingScreen = true;\n            if (screen)\n                screen->startAlert((FrameCallback)drawFrameCalibration);\n        }\n\n        if (magAccel.x > highestX)\n            highestX = magAccel.x;\n        if (magAccel.x < lowestX)\n            lowestX = magAccel.x;\n        if (magAccel.y > highestY)\n            highestY = magAccel.y;\n        if (magAccel.y < lowestY)\n            lowestY = magAccel.y;\n        if (magAccel.z > highestZ)\n            highestZ = magAccel.z;\n        if (magAccel.z < lowestZ)\n            lowestZ = magAccel.z;\n\n        uint32_t now = millis();\n        if (now > endCalibrationAt) {\n            doCalibration = false;\n            endCalibrationAt = 0;\n            showingScreen = false;\n            if (screen)\n                screen->endAlert();\n        }\n\n        // LOG_DEBUG(\"BMX160 min_x: %.4f, max_X: %.4f, min_Y: %.4f, max_Y: %.4f, min_Z: %.4f, max_Z: %.4f\", lowestX, highestX,\n        // lowestY, highestY, lowestZ, highestZ);\n    }\n\n    int highestRealX = highestX - (highestX + lowestX) / 2;\n\n    magAccel.x -= (highestX + lowestX) / 2;\n    magAccel.y -= (highestY + lowestY) / 2;\n    magAccel.z -= (highestZ + lowestZ) / 2;\n    FusionVector ga, ma;\n    ga.axis.x = -gAccel.x; // default location for the BMX160 is on the rear of the board\n    ga.axis.y = -gAccel.y;\n    ga.axis.z = gAccel.z;\n    ma.axis.x = -magAccel.x;\n    ma.axis.y = -magAccel.y;\n    ma.axis.z = magAccel.z * 3;\n\n    // If we're set to one of the inverted positions\n    if (config.display.compass_orientation > meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270) {\n        ma = FusionAxesSwap(ma, FusionAxesAlignmentNXNYPZ);\n        ga = FusionAxesSwap(ga, FusionAxesAlignmentNXNYPZ);\n    }\n\n    float heading = FusionCompassCalculateHeading(FusionConventionNed, ga, ma);\n\n    switch (config.display.compass_orientation) {\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0_INVERTED:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0:\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90_INVERTED:\n        heading += 90;\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180_INVERTED:\n        heading += 180;\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED:\n        heading += 270;\n        break;\n    }\n    if (screen)\n        screen->setHeading(heading);\n#endif\n\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\nvoid BMX160Sensor::calibrate(uint16_t forSeconds)\n{\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN)\n    sBmx160SensorData_t magAccel;\n    sBmx160SensorData_t gAccel;\n    LOG_DEBUG(\"BMX160 calibration started for %is\", forSeconds);\n    sensor.getAllData(&magAccel, NULL, &gAccel);\n    highestX = magAccel.x, lowestX = magAccel.x;\n    highestY = magAccel.y, lowestY = magAccel.y;\n    highestZ = magAccel.z, lowestZ = magAccel.z;\n\n    doCalibration = true;\n    uint16_t calibrateFor = forSeconds * 1000; // calibrate for seconds provided\n    endCalibrationAt = millis() + calibrateFor;\n    if (screen)\n        screen->setEndCalibration(endCalibrationAt);\n#endif\n}\n\n#endif\n\n#endif\n"
  },
  {
    "path": "src/motion/BMX160Sensor.h",
    "content": "#pragma once\n\n#ifndef _BMX160_SENSOR_H_\n#define _BMX160_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n\n#if !defined(RAK2560) && __has_include(<Rak_BMX160.h>)\n\n#include \"Fusion/Fusion.h\"\n#include <Rak_BMX160.h>\n\nclass BMX160Sensor : public MotionSensor\n{\n  private:\n    RAK_BMX160 sensor;\n    bool showingScreen = false;\n    float highestX = 0, lowestX = 0, highestY = 0, lowestY = 0, highestZ = 0, lowestZ = 0;\n\n  public:\n    explicit BMX160Sensor(ScanI2C::FoundDevice foundDevice);\n    virtual bool init() override;\n    virtual int32_t runOnce() override;\n    virtual void calibrate(uint16_t forSeconds) override;\n};\n\n#else\n\n// Stub\nclass BMX160Sensor : public MotionSensor\n{\n  public:\n    explicit BMX160Sensor(ScanI2C::FoundDevice foundDevice);\n};\n\n#endif\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/ICM20948Sensor.cpp",
    "content": "#include \"ICM20948Sensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<ICM_20948.h>)\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN)\n\n// screen is defined in main.cpp\nextern graphics::Screen *screen;\n#endif\n\n// Flag when an interrupt has been detected\nvolatile static bool ICM20948_IRQ = false;\n\n// Interrupt service routine\nvoid ICM20948SetInterrupt()\n{\n    ICM20948_IRQ = true;\n}\n\nICM20948Sensor::ICM20948Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\nbool ICM20948Sensor::init()\n{\n    // Initialise the sensor\n    sensor = ICM20948Singleton::GetInstance();\n    if (!sensor->init(device))\n        return false;\n\n    // Enable simple Wake on Motion\n    return sensor->setWakeOnMotion();\n}\n\n#ifdef ICM_20948_INT_PIN\n\nint32_t ICM20948Sensor::runOnce()\n{\n    // Wake on motion using hardware interrupts - this is the most efficient way to check for motion\n    if (ICM20948_IRQ) {\n        ICM20948_IRQ = false;\n        sensor->clearInterrupts();\n        wakeScreen();\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#else\n\nint32_t ICM20948Sensor::runOnce()\n{\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN\n    if (screen && !screen->isScreenOn() && !config.display.wake_on_tap_or_motion && !config.device.double_tap_as_button_press) {\n        if (!isAsleep) {\n            LOG_DEBUG(\"sleeping IMU\");\n            sensor->sleep(true);\n            isAsleep = true;\n        }\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n    if (isAsleep) {\n        sensor->sleep(false);\n        isAsleep = false;\n    }\n\n    float magX = 0, magY = 0, magZ = 0;\n    if (sensor->dataReady()) {\n        sensor->getAGMT();\n        magX = sensor->agmt.mag.axes.x;\n        magY = sensor->agmt.mag.axes.y;\n        magZ = sensor->agmt.mag.axes.z;\n    }\n\n    if (doCalibration) {\n\n        if (!showingScreen) {\n            powerFSM.trigger(EVENT_PRESS); // keep screen alive during calibration\n            showingScreen = true;\n            if (screen)\n                screen->startAlert((FrameCallback)drawFrameCalibration);\n        }\n\n        if (magX > highestX)\n            highestX = magX;\n        if (magX < lowestX)\n            lowestX = magX;\n        if (magY > highestY)\n            highestY = magY;\n        if (magY < lowestY)\n            lowestY = magY;\n        if (magZ > highestZ)\n            highestZ = magZ;\n        if (magZ < lowestZ)\n            lowestZ = magZ;\n\n        uint32_t now = millis();\n        if (now > endCalibrationAt) {\n            doCalibration = false;\n            endCalibrationAt = 0;\n            showingScreen = false;\n            if (screen)\n                screen->endAlert();\n        }\n\n        // LOG_DEBUG(\"ICM20948 min_x: %.4f, max_X: %.4f, min_Y: %.4f, max_Y: %.4f, min_Z: %.4f, max_Z: %.4f\", lowestX, highestX,\n        //           lowestY, highestY, lowestZ, highestZ);\n    }\n\n    magX -= (highestX + lowestX) / 2;\n    magY -= (highestY + lowestY) / 2;\n    magZ -= (highestZ + lowestZ) / 2;\n    FusionVector ga, ma;\n    ga.axis.x = (sensor->agmt.acc.axes.x);\n    ga.axis.y = -(sensor->agmt.acc.axes.y);\n    ga.axis.z = -(sensor->agmt.acc.axes.z);\n    ma.axis.x = magX;\n    ma.axis.y = magY;\n    ma.axis.z = magZ;\n\n    // If we're set to one of the inverted positions\n    if (config.display.compass_orientation > meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270) {\n        ma = FusionAxesSwap(ma, FusionAxesAlignmentNXNYPZ);\n        ga = FusionAxesSwap(ga, FusionAxesAlignmentNXNYPZ);\n    }\n\n    float heading = FusionCompassCalculateHeading(FusionConventionNed, ga, ma);\n\n    switch (config.display.compass_orientation) {\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0_INVERTED:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_0:\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_90_INVERTED:\n        heading += 90;\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_180_INVERTED:\n        heading += 180;\n        break;\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270:\n    case meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED:\n        heading += 270;\n        break;\n    }\n    if (screen)\n        screen->setHeading(heading);\n#endif\n\n    // Wake on motion using polling  - this is not as efficient as using hardware interrupt pin (see above)\n    auto status = sensor->setBank(0);\n    if (sensor->status != ICM_20948_Stat_Ok) {\n        LOG_DEBUG(\"ICM20948 isWakeOnMotion failed to set bank - %s\", sensor->statusString());\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n\n    ICM_20948_INT_STATUS_t int_stat;\n    status = sensor->read(AGB0_REG_INT_STATUS, (uint8_t *)&int_stat, sizeof(ICM_20948_INT_STATUS_t));\n    if (status != ICM_20948_Stat_Ok) {\n        LOG_DEBUG(\"ICM20948 isWakeOnMotion failed to read interrupts - %s\", sensor->statusString());\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n\n    if (int_stat.WOM_INT != 0) {\n        // Wake up!\n        wakeScreen();\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif\n\nvoid ICM20948Sensor::calibrate(uint16_t forSeconds)\n{\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN\n    LOG_DEBUG(\"Old calibration data: highestX = %f, lowestX = %f, highestY = %f, lowestY = %f, highestZ = %f, lowestZ = %f\",\n              highestX, lowestX, highestY, lowestY, highestZ, lowestZ);\n    LOG_DEBUG(\"BMX160 calibration started for %is\", forSeconds);\n    if (sensor->dataReady()) {\n        sensor->getAGMT();\n        highestX = sensor->agmt.mag.axes.x;\n        lowestX = sensor->agmt.mag.axes.x;\n        highestY = sensor->agmt.mag.axes.y;\n        lowestY = sensor->agmt.mag.axes.y;\n        highestZ = sensor->agmt.mag.axes.z;\n        lowestZ = sensor->agmt.mag.axes.z;\n    } else {\n        highestX = 0, lowestX = 0, highestY = 0, lowestY = 0, highestZ = 0, lowestZ = 0;\n    }\n\n    doCalibration = true;\n    uint16_t calibrateFor = forSeconds * 1000; // calibrate for seconds provided\n    endCalibrationAt = millis() + calibrateFor;\n    if (screen)\n        screen->setEndCalibration(endCalibrationAt);\n#endif\n}\n// ----------------------------------------------------------------------\n// ICM20948Singleton\n// ----------------------------------------------------------------------\n\n// Get a singleton wrapper for an Sparkfun ICM_20948_I2C\nICM20948Singleton *ICM20948Singleton::GetInstance()\n{\n    if (pinstance == nullptr) {\n        pinstance = new ICM20948Singleton();\n    }\n    return pinstance;\n}\n\nICM20948Singleton::ICM20948Singleton() {}\n\nICM20948Singleton::~ICM20948Singleton() {}\n\nICM20948Singleton *ICM20948Singleton::pinstance{nullptr};\n\n// Initialise the ICM20948 Sensor\nbool ICM20948Singleton::init(ScanI2C::FoundDevice device)\n{\n#ifdef ICM_20948_DEBUG\n    // Set ICM_20948_DEBUG to enable helpful debug messages on Serial\n    enableDebugging();\n#endif\n\n    // startup\n#if defined(WIRE_INTERFACES_COUNT) && (WIRE_INTERFACES_COUNT > 1)\n    TwoWire &bus = (device.address.port == ScanI2C::I2CPort::WIRE1 ? Wire1 : Wire);\n#else\n    TwoWire &bus = Wire; // fallback if only one I2C interface\n#endif\n\n    bool bAddr = (device.address.address == 0x69);\n    delay(100);\n\n    LOG_DEBUG(\"ICM20948 begin on addr 0x%02X (port=%d, bAddr=%d)\", device.address.address, device.address.port, bAddr);\n\n    ICM_20948_Status_e status = begin(bus, bAddr);\n    if (status != ICM_20948_Stat_Ok) {\n        LOG_DEBUG(\"ICM20948 init begin - %s\", statusString());\n        return false;\n    }\n\n    // SW reset to make sure the device starts in a known state\n    if (swReset() != ICM_20948_Stat_Ok) {\n        LOG_DEBUG(\"ICM20948 init reset - %s\", statusString());\n        return false;\n    }\n    delay(200);\n\n    // Now wake the sensor up\n    if (sleep(false) != ICM_20948_Stat_Ok) {\n        LOG_DEBUG(\"ICM20948 init wake - %s\", statusString());\n        return false;\n    }\n\n    if (lowPower(false) != ICM_20948_Stat_Ok) {\n        LOG_DEBUG(\"ICM20948 init high power - %s\", statusString());\n        return false;\n    }\n\n    if (startupMagnetometer(false) != ICM_20948_Stat_Ok) {\n        LOG_DEBUG(\"ICM20948 init magnetometer - %s\", statusString());\n        return false;\n    }\n\n#ifdef ICM_20948_INT_PIN\n\n    // Active low\n    cfgIntActiveLow(true);\n    LOG_DEBUG(\"ICM20948 init set cfgIntActiveLow - %s\", statusString());\n\n    // Push-pull\n    cfgIntOpenDrain(false);\n    LOG_DEBUG(\"ICM20948 init set cfgIntOpenDrain - %s\", statusString());\n\n    // If enabled, *ANY* read will clear the INT_STATUS register.\n    cfgIntAnyReadToClear(true);\n    LOG_DEBUG(\"ICM20948 init set cfgIntAnyReadToClear - %s\", statusString());\n\n    // Latch the interrupt until cleared\n    cfgIntLatch(true);\n    LOG_DEBUG(\"ICM20948 init set cfgIntLatch - %s\", statusString());\n\n    // Set up an interrupt pin with an internal pullup for active low\n    pinMode(ICM_20948_INT_PIN, INPUT_PULLUP);\n\n    // Set up an interrupt service routine\n    attachInterrupt(ICM_20948_INT_PIN, ICM20948SetInterrupt, FALLING);\n\n#endif\n    return true;\n}\n\n#ifdef ICM_20948_DMP_IS_ENABLED\n\n// Stub\nbool ICM20948Sensor::initDMP()\n{\n    return false;\n}\n\n#endif\n\nbool ICM20948Singleton::setWakeOnMotion()\n{\n    // Set WoM threshold in milli G's\n    auto status = WOMThreshold(ICM_20948_WOM_THRESHOLD);\n    if (status != ICM_20948_Stat_Ok)\n        return false;\n\n    // Enable WoM Logic mode 1 = Compare the current sample with the previous sample\n    status = WOMLogic(true, 1);\n    LOG_DEBUG(\"ICM20948 init set WOMLogic - %s\", statusString());\n    if (status != ICM_20948_Stat_Ok)\n        return false;\n\n    // Enable interrupts on WakeOnMotion\n    status = intEnableWOM(true);\n    LOG_DEBUG(\"ICM20948 init set intEnableWOM - %s\", statusString());\n    return status == ICM_20948_Stat_Ok;\n\n    // Clear any current interrupts\n    ICM20948_IRQ = false;\n    clearInterrupts();\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/motion/ICM20948Sensor.h",
    "content": "#pragma once\n#ifndef _ICM_20948_SENSOR_H_\n#define _ICM_20948_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<ICM_20948.h>)\n\n#include \"Fusion/Fusion.h\"\n#include <ICM_20948.h>\n\n// Set the default gyro scale - dps250, dps500, dps1000, dps2000\n#ifndef ICM_20948_MPU_GYRO_SCALE\n#define ICM_20948_MPU_GYRO_SCALE dps250\n#endif\n\n// Set the default accelerometer scale - gpm2, gpm4, gpm8, gpm16\n#ifndef ICM_20948_MPU_ACCEL_SCALE\n#define ICM_20948_MPU_ACCEL_SCALE gpm2\n#endif\n\n// Define a threshold for Wake on Motion Sensing (0mg to 1020mg)\n#ifndef ICM_20948_WOM_THRESHOLD\n#define ICM_20948_WOM_THRESHOLD 16U\n#endif\n\n// Define a pin in variant.h to use interrupts to read the ICM-20948\n#ifndef ICM_20948_WOM_THRESHOLD\n#define ICM_20948_INT_PIN 255\n#endif\n\n// Uncomment this line to enable helpful debug messages on Serial\n// #define ICM_20948_DEBUG 1\n\n// Uncomment this line to enable the onboard digital motion processor (to be added in a future PR)\n// #define ICM_20948_DMP_IS_ENABLED 1\n\n// Check for a mandatory compiler flag to use the DMP (to be added in a future PR)\n#ifdef ICM_20948_DMP_IS_ENABLED\n#ifndef ICM_20948_USE_DMP\n#error To use the digital motion processor, please either set the compiler flag ICM_20948_USE_DMP or uncomment line 29 (#define ICM_20948_USE_DMP) in ICM_20948_C.h\n#endif\n#endif\n\n// The I2C address of the Accelerometer (if found) from main.cpp\nextern ScanI2C::DeviceAddress accelerometer_found;\n\n// Singleton wrapper for the Sparkfun ICM_20948_I2C class\nclass ICM20948Singleton : public ICM_20948_I2C\n{\n  private:\n    static ICM20948Singleton *pinstance;\n\n  protected:\n    ICM20948Singleton();\n    ~ICM20948Singleton();\n\n  public:\n    // Create a singleton instance (not thread safe)\n    static ICM20948Singleton *GetInstance();\n\n    // Singletons should not be cloneable.\n    ICM20948Singleton(ICM20948Singleton &other) = delete;\n\n    // Singletons should not be assignable.\n    void operator=(const ICM20948Singleton &) = delete;\n\n    // Initialise the motion sensor singleton for normal operation\n    bool init(ScanI2C::FoundDevice device);\n\n    // Enable Wake on Motion interrupts (sensor must be initialised first)\n    bool setWakeOnMotion();\n\n#ifdef ICM_20948_DMP_IS_ENABLED\n    // Initialise the motion sensor singleton for digital motion processing\n    bool initDMP();\n#endif\n};\n\nclass ICM20948Sensor : public MotionSensor\n{\n  private:\n    ICM20948Singleton *sensor = nullptr;\n    bool showingScreen = false;\n    bool isAsleep = false;\n#ifdef MUZI_BASE\n    float highestX = 449.000000, lowestX = -140.000000, highestY = 422.000000, lowestY = -232.000000, highestZ = 749.000000,\n          lowestZ = 98.000000;\n#else\n    float highestX = 0, lowestX = 0, highestY = 0, lowestY = 0, highestZ = 0, lowestZ = 0;\n#endif\n\n  public:\n    explicit ICM20948Sensor(ScanI2C::FoundDevice foundDevice);\n\n    // Initialise the motion sensor\n    virtual bool init() override;\n\n    // Called each time our sensor gets a chance to run\n    virtual int32_t runOnce() override;\n    virtual void calibrate(uint16_t forSeconds) override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/LIS3DHSensor.cpp",
    "content": "#include \"LIS3DHSensor.h\"\n#include \"NodeDB.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_LIS3DH.h>)\n\nLIS3DHSensor::LIS3DHSensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\nbool LIS3DHSensor::init()\n{\n    if (sensor.begin(deviceAddress())) {\n        sensor.setRange(LIS3DH_RANGE_2_G);\n        // Adjust threshold, higher numbers are less sensitive\n        sensor.setClick(config.device.double_tap_as_button_press ? 2 : 1, MOTION_SENSOR_CHECK_INTERVAL_MS);\n        LOG_DEBUG(\"LIS3DH init ok\");\n        return true;\n    }\n    LOG_DEBUG(\"LIS3DH init failed\");\n    return false;\n}\n\nint32_t LIS3DHSensor::runOnce()\n{\n    if (sensor.getClick() > 0) {\n        uint8_t click = sensor.getClick();\n        if (!config.device.double_tap_as_button_press && config.display.wake_on_tap_or_motion) {\n            wakeScreen();\n        }\n\n        if (config.device.double_tap_as_button_press && (click & 0x20)) {\n            buttonPress();\n            return 500;\n        }\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif\n"
  },
  {
    "path": "src/motion/LIS3DHSensor.h",
    "content": "#pragma once\n#ifndef _LIS3DH_SENSOR_H_\n#define _LIS3DH_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_LIS3DH.h>)\n\n#include <Adafruit_LIS3DH.h>\n\nclass LIS3DHSensor : public MotionSensor\n{\n  private:\n    Adafruit_LIS3DH sensor;\n\n  public:\n    explicit LIS3DHSensor(ScanI2C::FoundDevice foundDevice);\n    virtual bool init() override;\n    virtual int32_t runOnce() override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/LSM6DS3Sensor.cpp",
    "content": "#include \"LSM6DS3Sensor.h\"\n#include \"NodeDB.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_LSM6DS3TRC.h>)\n\nLSM6DS3Sensor::LSM6DS3Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\nbool LSM6DS3Sensor::init()\n{\n    if (sensor.begin_I2C(deviceAddress())) {\n\n        // Default threshold of 2G, less sensitive options are 4, 8 or 16G\n        sensor.setAccelRange(LSM6DS_ACCEL_RANGE_2_G);\n\n        // Duration is number of occurrences needed to trigger, higher threshold is less sensitive\n        sensor.enableWakeup(config.display.wake_on_tap_or_motion, 1, LSM6DS3_WAKE_THRESH);\n\n        LOG_DEBUG(\"LSM6DS3 init ok\");\n        return true;\n    }\n    LOG_DEBUG(\"LSM6DS3 init failed\");\n    return false;\n}\n\nint32_t LSM6DS3Sensor::runOnce()\n{\n    if (sensor.shake()) {\n        wakeScreen();\n        return 500;\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif"
  },
  {
    "path": "src/motion/LSM6DS3Sensor.h",
    "content": "#pragma once\n#ifndef _LSM6DS3_SENSOR_H_\n#define _LSM6DS3_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_LSM6DS3TRC.h>)\n\n#ifndef LSM6DS3_WAKE_THRESH\n#define LSM6DS3_WAKE_THRESH 20\n#endif\n\n#include <Adafruit_LSM6DS3TRC.h>\n\nclass LSM6DS3Sensor : public MotionSensor\n{\n  private:\n    Adafruit_LSM6DS3TRC sensor;\n\n  public:\n    explicit LSM6DS3Sensor(ScanI2C::FoundDevice foundDevice);\n    virtual bool init() override;\n    virtual int32_t runOnce() override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/MPU6050Sensor.cpp",
    "content": "#include \"MPU6050Sensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_MPU6050.h>)\n\nMPU6050Sensor::MPU6050Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\nbool MPU6050Sensor::init()\n{\n    if (sensor.begin(deviceAddress())) {\n        // setup motion detection\n        sensor.setHighPassFilter(MPU6050_HIGHPASS_0_63_HZ);\n        sensor.setMotionDetectionThreshold(1);\n        sensor.setMotionDetectionDuration(20);\n        sensor.setInterruptPinLatch(true); // Keep it latched.  Will turn off when reinitialized.\n        sensor.setInterruptPinPolarity(true);\n        LOG_DEBUG(\"MPU6050 init ok\");\n        return true;\n    }\n    LOG_DEBUG(\"MPU6050 init failed\");\n    return false;\n}\n\nint32_t MPU6050Sensor::runOnce()\n{\n    if (sensor.getMotionInterruptStatus()) {\n        wakeScreen();\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif"
  },
  {
    "path": "src/motion/MPU6050Sensor.h",
    "content": "#pragma once\n#ifndef _MPU6050_SENSOR_H_\n#define _MPU6050_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && __has_include(<Adafruit_MPU6050.h>)\n\n#include <Adafruit_MPU6050.h>\n\nclass MPU6050Sensor : public MotionSensor\n{\n  private:\n    Adafruit_MPU6050 sensor;\n\n  public:\n    explicit MPU6050Sensor(ScanI2C::FoundDevice foundDevice);\n    virtual bool init() override;\n    virtual int32_t runOnce() override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/MotionSensor.cpp",
    "content": "#include \"MotionSensor.h\"\n#include \"graphics/draw/CompassRenderer.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n\nchar timeRemainingBuffer[12];\n\n// screen is defined in main.cpp\nextern graphics::Screen *screen;\n\nMotionSensor::MotionSensor(ScanI2C::FoundDevice foundDevice)\n{\n    device.address.address = foundDevice.address.address;\n    device.address.port = foundDevice.address.port;\n    device.type = foundDevice.type;\n    LOG_DEBUG(\"Motion MotionSensor port: %s address: 0x%x type: %d\", devicePort() == ScanI2C::I2CPort::WIRE1 ? \"Wire1\" : \"Wire\",\n              (uint8_t)deviceAddress(), deviceType());\n}\n\nScanI2C::DeviceType MotionSensor::deviceType()\n{\n    return device.type;\n}\n\nuint8_t MotionSensor::deviceAddress()\n{\n    return device.address.address;\n}\n\nScanI2C::I2CPort MotionSensor::devicePort()\n{\n    return device.address.port;\n}\n\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN\nvoid MotionSensor::drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)\n{\n    if (screen == nullptr)\n        return;\n    // int x_offset = display->width() / 2;\n    // int y_offset = display->height() <= 80 ? 0 : 32;\n    display->setTextAlignment(TEXT_ALIGN_LEFT);\n    display->setFont(FONT_MEDIUM);\n    display->drawString(x, y, \"Calibrating\\nCompass\");\n\n    uint8_t timeRemaining = (screen->getEndCalibration() - millis()) / 1000;\n    sprintf(timeRemainingBuffer, \"( %02d )\", timeRemaining);\n    display->setFont(FONT_SMALL);\n    display->drawString(x, y + 40, timeRemainingBuffer);\n\n    int16_t compassX = 0, compassY = 0;\n    uint16_t compassDiam = graphics::CompassRenderer::getCompassDiam(display->getWidth(), display->getHeight());\n\n    // coordinates for the center of the compass/circle\n    if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT) {\n        compassX = x + display->getWidth() - compassDiam / 2 - 5;\n        compassY = y + display->getHeight() / 2;\n    } else {\n        compassX = x + display->getWidth() - compassDiam / 2 - 5;\n        compassY = y + FONT_HEIGHT_SMALL + (display->getHeight() - FONT_HEIGHT_SMALL) / 2;\n    }\n    display->drawCircle(compassX, compassY, compassDiam / 2);\n    graphics::CompassRenderer::drawCompassNorth(display, compassX, compassY, screen->getHeading() * PI / 180, (compassDiam / 2));\n}\n#endif\n\n#if !MESHTASTIC_EXCLUDE_POWER_FSM\nvoid MotionSensor::wakeScreen()\n{\n    if (powerFSM.getState() == &stateDARK) {\n        LOG_DEBUG(\"Motion wakeScreen detected\");\n        if (config.display.wake_on_tap_or_motion)\n            powerFSM.trigger(EVENT_INPUT);\n    }\n}\n\nvoid MotionSensor::buttonPress()\n{\n    LOG_DEBUG(\"Motion buttonPress detected\");\n    powerFSM.trigger(EVENT_PRESS);\n}\n\n#else\n\nvoid MotionSensor::wakeScreen() {}\n\nvoid MotionSensor::buttonPress() {}\n\n#endif\n\n#endif\n"
  },
  {
    "path": "src/motion/MotionSensor.h",
    "content": "#pragma once\n#ifndef _MOTION_SENSOR_H_\n#define _MOTION_SENSOR_H_\n\n#define MOTION_SENSOR_CHECK_INTERVAL_MS 100\n#define MOTION_SENSOR_CLICK_THRESHOLD 40\n\n#include \"../configuration.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C\n\n#include \"../PowerFSM.h\"\n#include \"../detect/ScanI2C.h\"\n#include \"../graphics/Screen.h\"\n#include \"../graphics/ScreenFonts.h\"\n#include \"../power.h\"\n#include \"Wire.h\"\n\n// Base class for motion processing\nclass MotionSensor\n{\n  public:\n    explicit MotionSensor(ScanI2C::FoundDevice foundDevice);\n    virtual ~MotionSensor(){};\n\n    // Get the device type\n    ScanI2C::DeviceType deviceType();\n\n    // Get the device address\n    uint8_t deviceAddress();\n\n    // Get the device port\n    ScanI2C::I2CPort devicePort();\n\n    // Initialise the motion sensor\n    inline virtual bool init() { return false; };\n\n    // The method that will be called each time our sensor gets a chance to run\n    // Returns the desired period for next invocation (or RUN_SAME for no change)\n    // Refer to /src/concurrency/OSThread.h for more information\n    inline virtual int32_t runOnce() { return MOTION_SENSOR_CHECK_INTERVAL_MS; };\n\n    virtual void calibrate(uint16_t forSeconds){};\n\n  protected:\n    // Turn on the screen when a tap or motion is detected\n    virtual void wakeScreen();\n\n    // Register a button press when a double-tap is detected\n    virtual void buttonPress();\n\n#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN\n    // draw an OLED frame (currently only used by the RAK4631 BMX160 sensor)\n    static void drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);\n#endif\n\n    ScanI2C::FoundDevice device;\n\n    // Do calibration if true\n    bool doCalibration = false;\n    uint32_t endCalibrationAt = 0;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/QMA6100PSensor.cpp",
    "content": "#include \"QMA6100PSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_QMA6100P)\n\n// Flag when an interrupt has been detected\nvolatile static bool QMA6100P_IRQ = false;\n\n// Interrupt service routine\nvoid QMA6100PSetInterrupt()\n{\n    QMA6100P_IRQ = true;\n}\n\nQMA6100PSensor::QMA6100PSensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\nbool QMA6100PSensor::init()\n{\n    // Initialise the sensor\n    sensor = QMA6100PSingleton::GetInstance();\n    if (!sensor->init(device))\n        return false;\n\n    // Enable simple Wake on Motion\n    return sensor->setWakeOnMotion();\n}\n\n#ifdef QMA_6100P_INT_PIN\n\nint32_t QMA6100PSensor::runOnce()\n{\n    // Wake on motion using hardware interrupts - this is the most efficient way to check for motion\n    if (QMA6100P_IRQ) {\n        QMA6100P_IRQ = false;\n        wakeScreen();\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#else\n\nint32_t QMA6100PSensor::runOnce()\n{\n    // Wake on motion using polling  - this is not as efficient as using hardware interrupt pin (see above)\n\n    uint8_t tempVal;\n    if (!sensor->readRegisterRegion(SFE_QMA6100P_INT_ST0, &tempVal, 1)) {\n        LOG_DEBUG(\"QMA6100PS isWakeOnMotion failed to read interrupts\");\n        return MOTION_SENSOR_CHECK_INTERVAL_MS;\n    }\n\n    if ((tempVal & 7) != 0) {\n        // Wake up!\n        wakeScreen();\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif\n\n// ----------------------------------------------------------------------\n// QMA6100PSingleton\n// ----------------------------------------------------------------------\n\n// Get a singleton wrapper for an Sparkfun QMA_6100P_I2C\nQMA6100PSingleton *QMA6100PSingleton::GetInstance()\n{\n    if (pinstance == nullptr) {\n        pinstance = new QMA6100PSingleton();\n    }\n    return pinstance;\n}\n\nQMA6100PSingleton::QMA6100PSingleton() {}\n\nQMA6100PSingleton::~QMA6100PSingleton() {}\n\nQMA6100PSingleton *QMA6100PSingleton::pinstance{nullptr};\n\n// Initialise the QMA6100P Sensor\nbool QMA6100PSingleton::init(ScanI2C::FoundDevice device)\n{\n\n// startup\n#ifdef Wire1\n    bool status = begin(device.address.address, device.address.port == ScanI2C::I2CPort::WIRE1 ? &Wire1 : &Wire);\n#else\n    // check chip id\n    bool status = begin(device.address.address, &Wire);\n#endif\n    if (status != true) {\n        LOG_WARN(\"QMA6100P init begin failed\");\n        return false;\n    }\n    delay(20);\n    // SW reset to make sure the device starts in a known state\n    if (softwareReset() != true) {\n        LOG_WARN(\"QMA6100P init reset failed\");\n        return false;\n    }\n    delay(20);\n    // Set range\n    if (!setRange(QMA_6100P_MPU_ACCEL_SCALE)) {\n        LOG_WARN(\"QMA6100P init range failed\");\n        return false;\n    }\n    // set active mode\n    if (!enableAccel()) {\n        LOG_WARN(\"ERROR QMA6100P active mode set failed\");\n    }\n    // set calibrateoffsets\n    if (!calibrateOffsets()) {\n        LOG_WARN(\"ERROR QMA6100P calibration failed\");\n    }\n#ifdef QMA_6100P_INT_PIN\n\n    // Active low & Open Drain\n    uint8_t tempVal;\n    if (!readRegisterRegion(SFE_QMA6100P_INTPINT_CONF, &tempVal, 1)) {\n        LOG_WARN(\"QMA6100P init failed to read interrupt pin config\");\n        return false;\n    }\n\n    tempVal |= 0b00000010; // Active low & Open Drain\n\n    if (!writeRegisterByte(SFE_QMA6100P_INTPINT_CONF, tempVal)) {\n        LOG_WARN(\"QMA6100P init failed to write interrupt pin config\");\n        return false;\n    }\n\n    // Latch until cleared, all reads clear the latch\n    if (!readRegisterRegion(SFE_QMA6100P_INT_CFG, &tempVal, 1)) {\n        LOG_WARN(\"QMA6100P init failed to read interrupt config\");\n        return false;\n    }\n\n    tempVal |= 0b10000001; // Latch until cleared, INT_RD_CLR1\n\n    if (!writeRegisterByte(SFE_QMA6100P_INT_CFG, tempVal)) {\n        LOG_WARN(\"QMA6100P init failed to write interrupt config\");\n        return false;\n    }\n    // Set up an interrupt pin with an internal pullup for active low\n    pinMode(QMA_6100P_INT_PIN, INPUT_PULLUP);\n\n    // Set up an interrupt service routine\n    attachInterrupt(QMA_6100P_INT_PIN, QMA6100PSetInterrupt, FALLING);\n\n#endif\n    return true;\n}\n\nbool QMA6100PSingleton::setWakeOnMotion()\n{\n    // Enable 'Any Motion' interrupt\n    if (!writeRegisterByte(SFE_QMA6100P_INT_EN2, 0b00000111)) {\n        LOG_WARN(\"QMA6100P :setWakeOnMotion failed to write interrupt enable\");\n        return false;\n    }\n\n    // Set 'Significant Motion' interrupt map to INT1\n    uint8_t tempVal;\n\n    if (!readRegisterRegion(SFE_QMA6100P_INT_MAP1, &tempVal, 1)) {\n        LOG_WARN(\"QMA6100P setWakeOnMotion failed to read interrupt map\");\n        return false;\n    }\n\n    sfe_qma6100p_int_map1_bitfield_t int_map1;\n    int_map1.all = tempVal;\n    int_map1.bits.int1_any_mot = 1; // any motion interrupt to INT1\n    tempVal = int_map1.all;\n\n    if (!writeRegisterByte(SFE_QMA6100P_INT_MAP1, tempVal)) {\n        LOG_WARN(\"QMA6100P setWakeOnMotion failed to write interrupt map\");\n        return false;\n    }\n\n    // Clear any current interrupts\n    QMA6100P_IRQ = false;\n    return true;\n}\n\n#endif\n"
  },
  {
    "path": "src/motion/QMA6100PSensor.h",
    "content": "#pragma once\n#ifndef _QMA_6100P_SENSOR_H_\n#define _QMA_6100P_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_QMA6100P)\n\n#include <QMA6100P.h>\n\n// Set the default accelerometer scale - gpm2, gpm4, gpm8, gpm16\n#ifndef QMA_6100P_MPU_ACCEL_SCALE\n#define QMA_6100P_MPU_ACCEL_SCALE SFE_QMA6100P_RANGE32G\n#endif\n\n// The I2C address of the Accelerometer (if found) from main.cpp\nextern ScanI2C::DeviceAddress accelerometer_found;\n\n// Singleton wrapper for the Sparkfun QMA_6100P_I2C class\nclass QMA6100PSingleton : public QMA6100P\n{\n  private:\n    static QMA6100PSingleton *pinstance;\n\n  protected:\n    QMA6100PSingleton();\n    ~QMA6100PSingleton();\n\n  public:\n    // Create a singleton instance (not thread safe)\n    static QMA6100PSingleton *GetInstance();\n\n    // Singletons should not be cloneable.\n    QMA6100PSingleton(QMA6100PSingleton &other) = delete;\n\n    // Singletons should not be assignable.\n    void operator=(const QMA6100PSingleton &) = delete;\n\n    // Initialise the motion sensor singleton for normal operation\n    bool init(ScanI2C::FoundDevice device);\n\n    // Enable Wake on Motion interrupts (sensor must be initialised first)\n    bool setWakeOnMotion();\n};\n\nclass QMA6100PSensor : public MotionSensor\n{\n  private:\n    QMA6100PSingleton *sensor = nullptr;\n\n  public:\n    explicit QMA6100PSensor(ScanI2C::FoundDevice foundDevice);\n\n    // Initialise the motion sensor\n    virtual bool init() override;\n\n    // Called each time our sensor gets a chance to run\n    virtual int32_t runOnce() override;\n};\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/STK8XXXSensor.cpp",
    "content": "#include \"STK8XXXSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_STK8XXX)\n\nSTK8XXXSensor::STK8XXXSensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}\n\n#ifdef STK8XXX_INT\n\nvolatile static bool STK_IRQ;\n\nbool STK8XXXSensor::init()\n{\n    if (sensor.STK8xxx_Initialization(STK8xxx_VAL_RANGE_2G)) {\n        STK_IRQ = false;\n        sensor.STK8xxx_Anymotion_init();\n        pinMode(STK8XXX_INT, INPUT_PULLUP);\n        attachInterrupt(\n            digitalPinToInterrupt(STK8XXX_INT), [] { STK_IRQ = true; }, RISING);\n\n        LOG_DEBUG(\"STK8XXX init ok\");\n        return true;\n    }\n    LOG_DEBUG(\"STK8XXX init failed\");\n    return false;\n}\n\nint32_t STK8XXXSensor::runOnce()\n{\n    if (STK_IRQ) {\n        STK_IRQ = false;\n        if (config.display.wake_on_tap_or_motion) {\n            wakeScreen();\n        }\n    }\n    return MOTION_SENSOR_CHECK_INTERVAL_MS;\n}\n\n#endif\n\n#endif"
  },
  {
    "path": "src/motion/STK8XXXSensor.h",
    "content": "#pragma once\n#ifndef _STK8XXX_SENSOR_H_\n#define _STK8XXX_SENSOR_H_\n\n#include \"MotionSensor.h\"\n\n#if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C && defined(HAS_STK8XXX)\n\n#ifdef STK8XXX_INT\n\n#include <stk8baxx.h>\n\nclass STK8XXXSensor : public MotionSensor\n{\n  private:\n    STK8xxx sensor;\n\n  public:\n    explicit STK8XXXSensor(ScanI2C::FoundDevice foundDevice);\n    virtual bool init() override;\n    virtual int32_t runOnce() override;\n};\n\n#else\n\n// Stub\nclass STK8XXXSensor : public MotionSensor\n{\n  public:\n    explicit STK8XXXSensor(ScanI2C::FoundDevice foundDevice);\n};\n\n#endif\n\n#endif\n\n#endif"
  },
  {
    "path": "src/mqtt/MQTT.cpp",
    "content": "#include \"MQTT.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerFSM.h\"\n#include \"ServiceEnvelope.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"mesh/Channels.h\"\n#include \"mesh/Router.h\"\n#include \"mesh/generated/meshtastic/mqtt.pb.h\"\n#include \"mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"modules/RoutingModule.h\"\n#if defined(ARCH_ESP32)\n#include \"../mesh/generated/meshtastic/paxcount.pb.h\"\n#endif\n#include \"mesh/generated/meshtastic/remote_hardware.pb.h\"\n#include \"sleep.h\"\n#if HAS_WIFI\n#include \"mesh/wifi/WiFiAPClient.h\"\n#include <WiFi.h>\n#endif\n#if HAS_ETHERNET && defined(USE_WS5500)\n#include <ETHClass2.h>\n#define ETH ETH2\n#endif // HAS_ETHERNET\n#include \"Default.h\"\n#if !defined(ARCH_NRF52) || NRF52_USE_JSON\n#include \"serialization/JSON.h\"\n#include \"serialization/MeshPacketSerializer.h\"\n#endif\n#include <Throttle.h>\n#include <assert.h>\n#include <utility>\n\n#include <IPAddress.h>\n#if defined(ARCH_PORTDUINO)\n#include <netinet/in.h>\n#elif !defined(ntohl)\n#include <machine/endian.h>\n#define ntohl __ntohl\n#endif\n#include <RTC.h>\n\nMQTT *mqtt;\n\nnamespace\n{\nconstexpr int reconnectMax = 5;\n\n// FIXME - this size calculation is super sloppy, but it will go away once we dynamically alloc meshpackets\nstatic uint8_t bytes[meshtastic_MqttClientProxyMessage_size + 30]; // 12 for channel name and 16 for nodeid\n\nstatic bool isMqttServerAddressPrivate = false;\nstatic bool isConnected = false;\n\nstatic uint32_t lastPositionUnavailableWarning = 0;\nstatic const uint32_t POSITION_UNAVAILABLE_WARNING_INTERVAL_MS = 15000; // 15 seconds\n\ninline void onReceiveProto(char *topic, byte *payload, size_t length)\n{\n    const DecodedServiceEnvelope e(payload, length);\n    if (!e.validDecode || e.channel_id == NULL || e.gateway_id == NULL || e.packet == NULL) {\n        LOG_ERROR(\"Invalid MQTT service envelope, topic %s, len %u!\", topic, length);\n        return;\n    }\n\n    const meshtastic_Channel &ch = channels.getByName(e.channel_id);\n    // Find channel by channel_id and check downlink_enabled\n    if (!(strcmp(e.channel_id, \"PKI\") == 0 ||\n          (strcmp(e.channel_id, channels.getGlobalId(ch.index)) == 0 && ch.settings.downlink_enabled))) {\n        return;\n    }\n\n    bool anyChannelHasDownlink = false;\n    size_t numChan = channels.getNumChannels();\n    for (size_t i = 0; i < numChan; ++i) {\n        const auto &c = channels.getByIndex(i);\n        if (c.settings.downlink_enabled) {\n            anyChannelHasDownlink = true;\n            break;\n        }\n    }\n\n    if (strcmp(e.channel_id, \"PKI\") == 0 && !anyChannelHasDownlink) {\n        return;\n    }\n    // Generate node ID from nodenum for comparison\n    std::string nodeId = nodeDB->getNodeId();\n    if (strcmp(e.gateway_id, nodeId.c_str()) == 0) {\n        // Generate an implicit ACK towards ourselves (handled and processed only locally!) for this message.\n        // We do this because packets are not rebroadcasted back into MQTT anymore and we assume that at least one node\n        // receives it when we get our own packet back. Then we'll stop our retransmissions.\n        if (isFromUs(e.packet)) {\n            auto pAck = routingModule->allocAckNak(meshtastic_Routing_Error_NONE, getFrom(e.packet), e.packet->id, ch.index);\n            pAck->transport_mechanism = meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MQTT;\n            router->sendLocal(pAck);\n        } else {\n            LOG_INFO(\"Ignore downlink message we originally sent\");\n        }\n        return;\n    }\n    if (isFromUs(e.packet)) {\n        LOG_INFO(\"Ignore downlink message we originally sent\");\n        return;\n    }\n\n    LOG_INFO(\"Received MQTT topic %s, len=%u\", topic, length);\n    if (e.packet->hop_limit > HOP_MAX || e.packet->hop_start > HOP_MAX) {\n        LOG_INFO(\"Invalid hop_limit(%u) or hop_start(%u)\", e.packet->hop_limit, e.packet->hop_start);\n        return;\n    }\n\n    UniquePacketPoolPacket p = packetPool.allocUniqueZeroed();\n    p->from = e.packet->from;\n    p->to = e.packet->to;\n    p->id = e.packet->id;\n    p->channel = e.packet->channel;\n    p->hop_limit = e.packet->hop_limit;\n    p->hop_start = e.packet->hop_start;\n    p->want_ack = e.packet->want_ack;\n    p->via_mqtt = true; // Mark that the packet was received via MQTT\n    p->transport_mechanism = meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MQTT;\n    p->which_payload_variant = e.packet->which_payload_variant;\n    memcpy(&p->decoded, &e.packet->decoded, std::max(sizeof(p->decoded), sizeof(p->encrypted)));\n\n    if (p->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        if (moduleConfig.mqtt.encryption_enabled) {\n            LOG_INFO(\"Ignore decoded message on MQTT, encryption is enabled\");\n            return;\n        }\n        if (p->decoded.portnum == meshtastic_PortNum_ADMIN_APP) {\n            LOG_INFO(\"Ignore decoded admin packet\");\n            return;\n        }\n        p->channel = ch.index;\n    }\n\n    // PKI messages get accepted even if we can't decrypt\n    if (router && p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag && strcmp(e.channel_id, \"PKI\") == 0) {\n        const meshtastic_NodeInfoLite *tx = nodeDB->getMeshNode(getFrom(p.get()));\n        const meshtastic_NodeInfoLite *rx = nodeDB->getMeshNode(p->to);\n        // Only accept PKI messages to us, or if we have both the sender and receiver in our nodeDB, as then it's\n        // likely they discovered each other via a channel we have downlink enabled for\n        if (isToUs(p.get()) || (tx && tx->has_user && rx && rx->has_user))\n            router->enqueueReceivedMessage(p.release());\n    } else if (router &&\n               perhapsDecode(p.get()) == DecodeState::DECODE_SUCCESS) // ignore messages if we don't have the channel key\n        router->enqueueReceivedMessage(p.release());\n}\n\n#if !defined(ARCH_NRF52) || NRF52_USE_JSON\n// returns true if this is a valid JSON envelope which we accept on downlink\ninline bool isValidJsonEnvelope(JSONObject &json)\n{\n    // Generate node ID from nodenum for comparison\n    std::string nodeId = nodeDB->getNodeId();\n    // if \"sender\" is provided, avoid processing packets we uplinked\n    return (json.find(\"sender\") != json.end() ? (json[\"sender\"]->AsString().compare(nodeId) != 0) : true) &&\n           (json.find(\"hopLimit\") != json.end() ? json[\"hopLimit\"]->IsNumber() : true) && // hop limit should be a number\n           (json.find(\"from\") != json.end()) && json[\"from\"]->IsNumber() &&\n           (json[\"from\"]->AsNumber() == nodeDB->getNodeNum()) &&            // only accept message if the \"from\" is us\n           (json.find(\"type\") != json.end()) && json[\"type\"]->IsString() && // should specify a type\n           (json.find(\"payload\") != json.end());                            // should have a payload\n}\n\ninline void onReceiveJson(byte *payload, size_t length)\n{\n    char payloadStr[length + 1];\n    memcpy(payloadStr, payload, length);\n    payloadStr[length] = 0; // null terminated string\n    std::unique_ptr<JSONValue> json_value(JSON::Parse(payloadStr));\n    if (json_value == nullptr) {\n        LOG_ERROR(\"JSON received payload on MQTT but not a valid JSON\");\n        return;\n    }\n\n    JSONObject json;\n    json = json_value->AsObject();\n\n    if (!isValidJsonEnvelope(json)) {\n        LOG_ERROR(\"JSON received payload on MQTT but not a valid envelope\");\n        return;\n    }\n\n    // this is a valid envelope\n    if (json[\"type\"]->AsString().compare(\"sendtext\") == 0 && json[\"payload\"]->IsString()) {\n        std::string jsonPayloadStr = json[\"payload\"]->AsString();\n        LOG_INFO(\"JSON payload %s, length %u\", jsonPayloadStr.c_str(), jsonPayloadStr.length());\n\n        // construct protobuf data packet using TEXT_MESSAGE, send it to the mesh\n        meshtastic_MeshPacket *p = router->allocForSending();\n        p->decoded.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP;\n        if (json.find(\"channel\") != json.end() && json[\"channel\"]->IsNumber() &&\n            (json[\"channel\"]->AsNumber() < channels.getNumChannels()))\n            p->channel = json[\"channel\"]->AsNumber();\n        if (json.find(\"to\") != json.end() && json[\"to\"]->IsNumber())\n            p->to = json[\"to\"]->AsNumber();\n        if (json.find(\"hopLimit\") != json.end() && json[\"hopLimit\"]->IsNumber())\n            p->hop_limit = json[\"hopLimit\"]->AsNumber();\n        if (jsonPayloadStr.length() <= sizeof(p->decoded.payload.bytes)) {\n            memcpy(p->decoded.payload.bytes, jsonPayloadStr.c_str(), jsonPayloadStr.length());\n            p->decoded.payload.size = jsonPayloadStr.length();\n            service->sendToMesh(p, RX_SRC_LOCAL);\n        } else {\n            LOG_WARN(\"Received MQTT json payload too long, drop\");\n        }\n    } else if (json[\"type\"]->AsString().compare(\"sendposition\") == 0 && json[\"payload\"]->IsObject()) {\n        // invent the \"sendposition\" type for a valid envelope\n        JSONObject posit;\n        posit = json[\"payload\"]->AsObject(); // get nested JSON Position\n        meshtastic_Position pos = meshtastic_Position_init_default;\n        if (posit.find(\"latitude_i\") != posit.end() && posit[\"latitude_i\"]->IsNumber())\n            pos.latitude_i = posit[\"latitude_i\"]->AsNumber();\n        if (posit.find(\"longitude_i\") != posit.end() && posit[\"longitude_i\"]->IsNumber())\n            pos.longitude_i = posit[\"longitude_i\"]->AsNumber();\n        if (posit.find(\"altitude\") != posit.end() && posit[\"altitude\"]->IsNumber())\n            pos.altitude = posit[\"altitude\"]->AsNumber();\n        if (posit.find(\"time\") != posit.end() && posit[\"time\"]->IsNumber())\n            pos.time = posit[\"time\"]->AsNumber();\n\n        // construct protobuf data packet using POSITION, send it to the mesh\n        meshtastic_MeshPacket *p = router->allocForSending();\n        p->decoded.portnum = meshtastic_PortNum_POSITION_APP;\n        if (json.find(\"channel\") != json.end() && json[\"channel\"]->IsNumber() &&\n            (json[\"channel\"]->AsNumber() < channels.getNumChannels()))\n            p->channel = json[\"channel\"]->AsNumber();\n        if (json.find(\"to\") != json.end() && json[\"to\"]->IsNumber())\n            p->to = json[\"to\"]->AsNumber();\n        if (json.find(\"hopLimit\") != json.end() && json[\"hopLimit\"]->IsNumber())\n            p->hop_limit = json[\"hopLimit\"]->AsNumber();\n        p->decoded.payload.size =\n            pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Position_msg,\n                               &pos); // make the Data protobuf from position\n        service->sendToMesh(p, RX_SRC_LOCAL);\n    } else {\n        LOG_DEBUG(\"JSON ignore downlink message with unsupported type\");\n    }\n}\n#endif\n\n/// Determines if the given IPAddress is a private IPv4 address, i.e. not routable on the public internet.\nbool isPrivateIpAddress(const IPAddress &ip)\n{\n    constexpr struct {\n        uint32_t network;\n        uint32_t mask;\n    } privateCidrRanges[] = {\n        {.network = 192u << 24 | 168 << 16, .mask = 0xffff0000}, // 192.168.0.0/16\n        {.network = 172u << 24 | 16 << 16, .mask = 0xfff00000},  // 172.16.0.0/12\n        {.network = 169u << 24 | 254 << 16, .mask = 0xffff0000}, // 169.254.0.0/16\n        {.network = 10u << 24, .mask = 0xff000000},              // 10.0.0.0/8\n        {.network = 127u << 24 | 1, .mask = 0xffffffff},         // 127.0.0.1/32\n        {.network = 100u << 24 | 64 << 16, .mask = 0xffc00000},  // 100.64.0.0/10\n    };\n    const uint32_t addr = ntohl(ip);\n    for (const auto &cidrRange : privateCidrRanges) {\n        if (cidrRange.network == (addr & cidrRange.mask)) {\n            LOG_INFO(\"MQTT server on a private IP\");\n            return true;\n        }\n    }\n    return false;\n}\n\n// Separate a <host>[:<port>] string. Returns a pair containing the parsed host and port. If the port is\n// not present in the input string, or is invalid, the value of the `port` argument will be returned.\nstd::pair<String, uint16_t> parseHostAndPort(String server, uint16_t port = 0)\n{\n    const int delimIndex = server.indexOf(':');\n    if (delimIndex > 0) {\n        const long parsedPort = server.substring(delimIndex + 1, server.length()).toInt();\n        if (parsedPort < 1 || parsedPort > UINT16_MAX) {\n            LOG_WARN(\"Invalid MQTT port %d: %s\", parsedPort, server.c_str());\n        } else {\n            port = parsedPort;\n        }\n        server[delimIndex] = 0;\n    }\n    return std::make_pair(std::move(server), port);\n}\n\nbool isDefaultServer(const String &host)\n{\n    return host.length() == 0 || host == default_mqtt_address;\n}\n\nbool isDefaultRootTopic(const String &root)\n{\n    return root.length() == 0 || root == default_mqtt_root;\n}\n\nstruct PubSubConfig {\n    explicit PubSubConfig(const meshtastic_ModuleConfig_MQTTConfig &config)\n    {\n        if (*config.address) {\n            serverAddr = config.address;\n            mqttUsername = config.username;\n            mqttPassword = config.password;\n        }\n        if (config.tls_enabled) {\n            serverPort = 8883;\n        }\n        auto [parsedServerAddr, parsedServerPort] = parseHostAndPort(serverAddr.c_str(), serverPort);\n        serverAddr = std::move(parsedServerAddr);\n        serverPort = parsedServerPort;\n    }\n\n    // Defaults\n    static constexpr uint16_t defaultPort = 1883;\n    static constexpr uint16_t defaultPortTls = 8883;\n\n    uint16_t serverPort = defaultPort;\n    String serverAddr = default_mqtt_address;\n    const char *mqttUsername = default_mqtt_username;\n    const char *mqttPassword = default_mqtt_password;\n};\n\n#if HAS_NETWORKING\nbool connectPubSub(const PubSubConfig &config, PubSubClient &pubSub, Client &client)\n{\n    pubSub.setBufferSize(1024, 1024);\n    pubSub.setClient(client);\n    pubSub.setServer(config.serverAddr.c_str(), config.serverPort);\n\n    LOG_INFO(\"Connecting directly to MQTT server %s, port: %d, username: %s, password: %s\", config.serverAddr.c_str(),\n             config.serverPort, config.mqttUsername, config.mqttPassword);\n\n    // Generate node ID from nodenum for client identification\n    std::string nodeId = nodeDB->getNodeId();\n    const bool connected = pubSub.connect(nodeId.c_str(), config.mqttUsername, config.mqttPassword);\n    if (connected) {\n        isConnected = true;\n        LOG_INFO(\"MQTT connected\");\n    } else {\n        isConnected = false;\n        LOG_WARN(\"Failed to connect to MQTT server\");\n    }\n    return connected;\n}\n#endif\n\ninline bool isConnectedToNetwork()\n{\n#ifdef USE_WS5500\n    if (ETH.connected())\n        return true;\n#endif\n\n#if HAS_WIFI\n    return WiFi.isConnected();\n#elif HAS_ETHERNET\n    return Ethernet.linkStatus() == LinkON;\n#else\n    return false;\n#endif\n}\n\n/** return true if we have a channel that wants uplink/downlink or map reporting is enabled\n */\nbool wantsLink()\n{\n    const bool hasChannelorMapReport =\n        moduleConfig.mqtt.enabled && (moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled());\n    return hasChannelorMapReport && (moduleConfig.mqtt.proxy_to_client_enabled || isConnectedToNetwork());\n}\n} // namespace\n\nvoid MQTT::mqttCallback(char *topic, byte *payload, unsigned int length)\n{\n    mqtt->onReceive(topic, payload, length);\n}\n\nvoid MQTT::onClientProxyReceive(meshtastic_MqttClientProxyMessage msg)\n{\n    onReceive(msg.topic, msg.payload_variant.data.bytes, msg.payload_variant.data.size);\n}\n\nvoid MQTT::onReceive(char *topic, byte *payload, size_t length)\n{\n    if (length == 0) {\n        LOG_WARN(\"Empty MQTT payload received, topic %s!\", topic);\n        return;\n    }\n\n    // check if this is a json payload message by comparing the topic start\n    if (moduleConfig.mqtt.json_enabled && (strncmp(topic, jsonTopic.c_str(), jsonTopic.length()) == 0)) {\n#if !defined(ARCH_NRF52) || NRF52_USE_JSON\n        // parse the channel name from the topic string\n        // the topic has been checked above for having jsonTopic prefix, so just move past it\n        char *channelName = topic + jsonTopic.length();\n        // if another \"/\" was added, parse string up to that character\n        channelName = strtok(channelName, \"/\") ? strtok(channelName, \"/\") : channelName;\n        // We allow downlink JSON packets only on a channel named \"mqtt\"\n        const meshtastic_Channel &sendChannel = channels.getByName(channelName);\n        if (!(strncasecmp(channels.getGlobalId(sendChannel.index), Channels::mqttChannel, strlen(Channels::mqttChannel)) == 0 &&\n              sendChannel.settings.downlink_enabled)) {\n            LOG_WARN(\"JSON downlink received on channel not called 'mqtt' or without downlink enabled\");\n            return;\n        }\n        onReceiveJson(payload, length);\n#endif\n        return;\n    }\n\n    onReceiveProto(topic, payload, length);\n}\n\nvoid mqttInit()\n{\n    new MQTT();\n}\n\n#if HAS_NETWORKING\nMQTT::MQTT() : MQTT(std::unique_ptr<MQTTClient>(new MQTTClient())) {}\nMQTT::MQTT(std::unique_ptr<MQTTClient> _mqttClient)\n    : concurrency::OSThread(\"mqtt\"), mqttQueue(MAX_MQTT_QUEUE), mqttClient(std::move(_mqttClient)), pubSub(*mqttClient)\n#else\nMQTT::MQTT() : concurrency::OSThread(\"mqtt\"), mqttQueue(MAX_MQTT_QUEUE)\n#endif\n{\n    if (moduleConfig.mqtt.enabled) {\n        LOG_DEBUG(\"Init MQTT\");\n\n        assert(!mqtt);\n        mqtt = this;\n\n        if (*moduleConfig.mqtt.root) {\n            cryptTopic = moduleConfig.mqtt.root + cryptTopic;\n            jsonTopic = moduleConfig.mqtt.root + jsonTopic;\n            mapTopic = moduleConfig.mqtt.root + mapTopic;\n            isConfiguredForDefaultRootTopic = isDefaultRootTopic(moduleConfig.mqtt.root);\n        } else {\n            cryptTopic = \"msh\" + cryptTopic;\n            jsonTopic = \"msh\" + jsonTopic;\n            mapTopic = \"msh\" + mapTopic;\n            isConfiguredForDefaultRootTopic = true;\n        }\n\n        if (moduleConfig.mqtt.map_reporting_enabled && moduleConfig.mqtt.has_map_report_settings) {\n            map_position_precision = Default::getConfiguredOrDefault(moduleConfig.mqtt.map_report_settings.position_precision,\n                                                                     default_map_position_precision);\n            map_publish_interval_msecs = Default::getConfiguredOrDefaultMs(\n                moduleConfig.mqtt.map_report_settings.publish_interval_secs, default_map_publish_interval_secs);\n        }\n\n        auto [host, parsedPort] = parseHostAndPort(moduleConfig.mqtt.address);\n        (void)parsedPort;\n        isConfiguredForDefaultServer = isDefaultServer(host);\n        IPAddress ip;\n        isMqttServerAddressPrivate = ip.fromString(host.c_str()) && isPrivateIpAddress(ip);\n\n#if HAS_NETWORKING\n        if (!moduleConfig.mqtt.proxy_to_client_enabled)\n            pubSub.setCallback(mqttCallback);\n#endif\n\n        if (moduleConfig.mqtt.proxy_to_client_enabled) {\n            LOG_INFO(\"MQTT configured to use client proxy\");\n            enabled = true;\n            runASAP = true;\n            reconnectCount = 0;\n#if !IS_RUNNING_TESTS\n            publishNodeInfo();\n#endif\n        }\n        // preflightSleepObserver.observe(&preflightSleep);\n    } else {\n        disable();\n    }\n}\n\nbool MQTT::isConnectedDirectly()\n{\n#if HAS_NETWORKING\n    return pubSub.connected();\n#else\n    return false;\n#endif\n}\n\nbool MQTT::publish(const char *topic, const char *payload, bool retained)\n{\n    if (moduleConfig.mqtt.proxy_to_client_enabled) {\n        meshtastic_MqttClientProxyMessage *msg = mqttClientProxyMessagePool.allocZeroed();\n        msg->which_payload_variant = meshtastic_MqttClientProxyMessage_text_tag;\n        strncpy(msg->topic, topic, sizeof(msg->topic));\n        msg->topic[sizeof(msg->topic) - 1] = '\\0';\n        strncpy(msg->payload_variant.text, payload, sizeof(msg->payload_variant.text));\n        msg->payload_variant.text[sizeof(msg->payload_variant.text) - 1] = '\\0';\n        msg->retained = retained;\n        service->sendMqttMessageToClientProxy(msg);\n        return true;\n    }\n#if HAS_NETWORKING\n    else if (isConnectedDirectly()) {\n        return pubSub.publish(topic, payload, retained);\n    }\n#endif\n    return false;\n}\n\nbool MQTT::publish(const char *topic, const uint8_t *payload, size_t length, bool retained)\n{\n    if (moduleConfig.mqtt.proxy_to_client_enabled) {\n        meshtastic_MqttClientProxyMessage *msg = mqttClientProxyMessagePool.allocZeroed();\n        msg->which_payload_variant = meshtastic_MqttClientProxyMessage_data_tag;\n        strncpy(msg->topic, topic, sizeof(msg->topic));\n        msg->topic[sizeof(msg->topic) - 1] = '\\0'; // Ensure null termination\n        if (length > sizeof(msg->payload_variant.data.bytes))\n            length = sizeof(msg->payload_variant.data.bytes);\n        msg->payload_variant.data.size = length;\n        memcpy(msg->payload_variant.data.bytes, payload, length);\n        msg->retained = retained;\n        service->sendMqttMessageToClientProxy(msg);\n        return true;\n    }\n#if HAS_NETWORKING\n    else if (isConnectedDirectly()) {\n        return pubSub.publish(topic, payload, length, retained);\n    }\n#endif\n    return false;\n}\n\nvoid MQTT::reconnect()\n{\n    isConnected = false;\n    if (wantsLink()) {\n        if (moduleConfig.mqtt.proxy_to_client_enabled) {\n            LOG_INFO(\"MQTT connect via client proxy instead\");\n            enabled = true;\n            runASAP = true;\n            reconnectCount = 0;\n\n            publishNodeInfo();\n            return; // Don't try to connect directly to the server\n        }\n#if HAS_NETWORKING\n        const PubSubConfig ps_config(moduleConfig.mqtt);\n        MQTTClient *clientConnection = mqttClient.get();\n#if MQTT_SUPPORTS_TLS\n        if (moduleConfig.mqtt.tls_enabled) {\n            mqttClientTLS.setInsecure();\n            LOG_INFO(\"Use TLS-encrypted session\");\n            clientConnection = &mqttClientTLS;\n        } else {\n            LOG_INFO(\"Use non-TLS-encrypted session\");\n        }\n#endif\n        if (connectPubSub(ps_config, pubSub, *clientConnection)) {\n            enabled = true; // Start running background process again\n            runASAP = true;\n            reconnectCount = 0;\n            isMqttServerAddressPrivate = isPrivateIpAddress(clientConnection->remoteIP());\n            isConnected = true;\n            publishNodeInfo();\n            sendSubscriptions();\n        } else {\n#if HAS_WIFI && !defined(ARCH_PORTDUINO)\n            reconnectCount++;\n            LOG_ERROR(\"Failed to contact MQTT server directly (%d/%d)\", reconnectCount, reconnectMax);\n            if (reconnectCount >= reconnectMax) {\n                needReconnect = true;\n                wifiReconnect->setIntervalFromNow(0);\n                reconnectCount = 0;\n            }\n#endif\n        }\n#endif\n    }\n}\n\nvoid MQTT::sendSubscriptions()\n{\n#if HAS_NETWORKING\n    bool hasDownlink = false;\n    size_t numChan = channels.getNumChannels();\n    for (size_t i = 0; i < numChan; i++) {\n        const auto &ch = channels.getByIndex(i);\n        if (ch.settings.downlink_enabled) {\n            hasDownlink = true;\n            std::string topic = cryptTopic + channels.getGlobalId(i) + \"/+\";\n            LOG_INFO(\"Subscribe to %s\", topic.c_str());\n            pubSub.subscribe(topic.c_str(), 1); // FIXME, is QOS 1 right?\n#if !defined(ARCH_NRF52) ||                                                                                                      \\\n    defined(NRF52_USE_JSON) // JSON is not supported on nRF52, see issue #2804 ### Fixed by using ArduinoJSON ###\n            if (moduleConfig.mqtt.json_enabled == true) {\n                std::string topicDecoded = jsonTopic + channels.getGlobalId(i) + \"/+\";\n                LOG_INFO(\"Subscribe to %s\", topicDecoded.c_str());\n                pubSub.subscribe(topicDecoded.c_str(), 1); // FIXME, is QOS 1 right?\n            }\n#endif // ARCH_NRF52 NRF52_USE_JSON\n        }\n    }\n#if !MESHTASTIC_EXCLUDE_PKI\n    if (hasDownlink) {\n        std::string topic = cryptTopic + \"PKI/+\";\n        LOG_INFO(\"Subscribe to %s\", topic.c_str());\n        pubSub.subscribe(topic.c_str(), 1);\n    }\n#endif\n#endif\n}\n\nint32_t MQTT::runOnce()\n{\n    if (!moduleConfig.mqtt.enabled || !(moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled()))\n        return disable();\n    bool wantConnection = wantsLink();\n\n    perhapsReportToMap();\n\n    // If connected poll rapidly, otherwise only occasionally check for a wifi connection change and ability to contact server\n    if (moduleConfig.mqtt.proxy_to_client_enabled) {\n        publishQueuedMessages();\n        return 200;\n    }\n#if HAS_NETWORKING\n    else if (!pubSub.loop()) {\n        if (!wantConnection)\n            return 5000; // If we don't want connection now, check again in 5 secs\n        else {\n            reconnect();\n            // If we succeeded, empty the queue one by one and start reading rapidly, else try again in 30 seconds (TCP\n            // connections are EXPENSIVE so try rarely)\n            if (isConnectedDirectly()) {\n                publishQueuedMessages();\n                return 200;\n            } else\n                return 30000;\n        }\n    } else {\n        // we are connected to server, check often for new requests on the TCP port\n        if (!wantConnection) {\n            LOG_INFO(\"MQTT link not needed, drop\");\n            pubSub.disconnect();\n        }\n\n        powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); // Suppress entering light sleep (because that would turn off bluetooth)\n        return 20;\n    }\n#else\n    // No networking available, return default interval\n    return 30000;\n#endif\n}\n\nbool MQTT::isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config, MQTTClient *client)\n{\n    const PubSubConfig parsed(config);\n\n    if (config.enabled && !config.proxy_to_client_enabled) {\n#if HAS_NETWORKING\n        if (config.tls_enabled) {\n#if !MQTT_SUPPORTS_TLS\n            LOG_ERROR(\"Invalid MQTT config: tls_enabled is not supported on this node\");\n            return false;\n#endif\n        }\n        // Perform a lightweight TCP connectivity check without using connectPubSub(),\n        // which mutates the module's isConnected state. This only checks if the server\n        // is reachable — it does not establish an MQTT session.\n        // Settings are always saved regardless of the result.\n        if (isConnectedToNetwork()) {\n            MQTTClient testClient;\n            if (!testClient.connect(parsed.serverAddr.c_str(), parsed.serverPort)) {\n                const char *warning = \"Could not reach the MQTT server. Settings will be saved, but please verify the server \"\n                                      \"address and credentials.\";\n                LOG_WARN(warning);\n#if !IS_RUNNING_TESTS\n                meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n                if (cn) {\n                    cn->level = meshtastic_LogRecord_Level_WARNING;\n                    cn->time = getValidTime(RTCQualityFromNet);\n                    strncpy(cn->message, warning, sizeof(cn->message) - 1);\n                    cn->message[sizeof(cn->message) - 1] = '\\0';\n                    service->sendClientNotification(cn);\n                }\n#endif\n            }\n            testClient.stop();\n        }\n#else\n        const char *warning = \"Invalid MQTT config: proxy_to_client_enabled must be enabled on nodes that do not have a network\";\n        LOG_ERROR(warning);\n#if !IS_RUNNING_TESTS\n        meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n        cn->level = meshtastic_LogRecord_Level_ERROR;\n        cn->time = getValidTime(RTCQualityFromNet);\n        strncpy(cn->message, warning, sizeof(cn->message) - 1);\n        cn->message[sizeof(cn->message) - 1] = '\\0'; // Ensure null termination\n        service->sendClientNotification(cn);\n#endif\n        return false;\n#endif\n    }\n\n    const bool defaultServer = isDefaultServer(parsed.serverAddr);\n    if (defaultServer && !IS_ONE_OF(parsed.serverPort, PubSubConfig::defaultPort, PubSubConfig::defaultPortTls)) {\n        const char *warning = \"Invalid MQTT config: default server address must not have a port specified\";\n        LOG_ERROR(warning);\n#if !IS_RUNNING_TESTS\n        meshtastic_ClientNotification *cn = clientNotificationPool.allocZeroed();\n        cn->level = meshtastic_LogRecord_Level_ERROR;\n        cn->time = getValidTime(RTCQualityFromNet);\n        strncpy(cn->message, warning, sizeof(cn->message) - 1);\n        cn->message[sizeof(cn->message) - 1] = '\\0'; // Ensure null termination\n        service->sendClientNotification(cn);\n#endif\n        return false;\n    }\n    return true;\n}\n\nvoid MQTT::publishNodeInfo()\n{\n    // TODO: NodeInfo broadcast over MQTT only (NODENUM_BROADCAST_NO_LORA)\n}\nvoid MQTT::publishQueuedMessages()\n{\n    if (mqttQueue.isEmpty())\n        return;\n\n    if (!moduleConfig.mqtt.proxy_to_client_enabled && !isConnected)\n        return;\n\n    LOG_DEBUG(\"Publish enqueued MQTT message\");\n    const std::unique_ptr<QueueEntry> entry(mqttQueue.dequeuePtr(0));\n    LOG_INFO(\"publish %s, %u bytes from queue\", entry->topic.c_str(), entry->envBytes.size());\n    publish(entry->topic.c_str(), entry->envBytes.data(), entry->envBytes.size(), false);\n\n#if !defined(ARCH_NRF52) ||                                                                                                      \\\n    defined(NRF52_USE_JSON) // JSON is not supported on nRF52, see issue #2804 ### Fixed by using ArduinoJson ###\n    if (!moduleConfig.mqtt.json_enabled)\n        return;\n\n    // handle json topic\n    const DecodedServiceEnvelope env(entry->envBytes.data(), entry->envBytes.size());\n    if (!env.validDecode || env.packet == NULL || env.channel_id == NULL)\n        return;\n\n    auto jsonString = MeshPacketSerializer::JsonSerialize(env.packet);\n    if (jsonString.length() == 0)\n        return;\n\n    // Generate node ID from nodenum for topic\n    std::string nodeId = nodeDB->getNodeId();\n\n    std::string topicJson;\n    if (env.packet->pki_encrypted) {\n        topicJson = jsonTopic + \"PKI/\" + nodeId;\n    } else {\n        topicJson = jsonTopic + env.channel_id + \"/\" + nodeId;\n    }\n    LOG_INFO(\"JSON publish message to %s, %u bytes: %s\", topicJson.c_str(), jsonString.length(), jsonString.c_str());\n    publish(topicJson.c_str(), jsonString.c_str(), false);\n#endif // ARCH_NRF52 NRF52_USE_JSON\n}\n\nvoid MQTT::onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_MeshPacket &mp_decoded, ChannelIndex chIndex)\n{\n    if (mp_encrypted.via_mqtt)\n        return; // Don't send messages that came from MQTT back into MQTT\n    bool uplinkEnabled = false;\n    for (int i = 0; i <= 7; i++) {\n        if (channels.getByIndex(i).settings.uplink_enabled)\n            uplinkEnabled = true;\n    }\n    if (!uplinkEnabled)\n        return; // no channels have an uplink enabled\n    auto &ch = channels.getByIndex(chIndex);\n\n    // mp_decoded will not be decoded when it's PKI encrypted and not directed to us\n    if (mp_decoded.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        // For uplinking other's packets, check if it's not OK to MQTT or if it's an older packet without the bitfield\n        bool dontUplink = !mp_decoded.decoded.has_bitfield || !(mp_decoded.decoded.bitfield & BITFIELD_OK_TO_MQTT_MASK);\n        // Respect the DontMqttMeBro flag for other nodes' packets on public MQTT servers\n        if (!isFromUs(&mp_decoded) && !isMqttServerAddressPrivate && dontUplink) {\n            LOG_INFO(\"MQTT onSend - Not forwarding packet due to DontMqttMeBro flag\");\n            return;\n        }\n\n        if (isConfiguredForDefaultServer && (mp_decoded.decoded.portnum == meshtastic_PortNum_RANGE_TEST_APP ||\n                                             mp_decoded.decoded.portnum == meshtastic_PortNum_DETECTION_SENSOR_APP)) {\n            LOG_DEBUG(\"MQTT onSend - Ignoring range test or detection sensor message on public mqtt\");\n            return;\n        }\n    }\n    // Either encrypted packet (we couldn't decrypt) is marked as pki_encrypted, or we could decode the PKI encrypted packet\n    bool isPKIEncrypted = mp_encrypted.pki_encrypted || mp_decoded.pki_encrypted;\n    // If it was to a channel, check uplink enabled, else must be pki_encrypted\n    if (!(ch.settings.uplink_enabled || isPKIEncrypted))\n        return;\n    const char *channelId = isPKIEncrypted ? \"PKI\" : channels.getGlobalId(chIndex);\n\n    LOG_DEBUG(\"MQTT onSend - Publish \");\n    const meshtastic_MeshPacket *p;\n    if (moduleConfig.mqtt.encryption_enabled) {\n        p = &mp_encrypted;\n        LOG_DEBUG(\"encrypted message\");\n    } else if (mp_decoded.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        p = &mp_decoded;\n        LOG_DEBUG(\"portnum %i message\", mp_decoded.decoded.portnum);\n    } else {\n        LOG_DEBUG(\"nothing, pkt not decrypted\");\n        return; // Don't upload a still-encrypted PKI packet if not encryption_enabled\n    }\n\n    // Generate node ID from nodenum for service envelope\n    std::string nodeId = nodeDB->getNodeId();\n\n    const meshtastic_ServiceEnvelope env = {.packet = const_cast<meshtastic_MeshPacket *>(p),\n                                            .channel_id = const_cast<char *>(channelId),\n                                            .gateway_id = const_cast<char *>(nodeId.c_str())};\n    size_t numBytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_ServiceEnvelope_msg, &env);\n    std::string topic = cryptTopic + channelId + \"/\" + nodeId;\n\n    if (moduleConfig.mqtt.proxy_to_client_enabled || this->isConnectedDirectly()) {\n        LOG_DEBUG(\"MQTT Publish %s, %u bytes\", topic.c_str(), numBytes);\n        publish(topic.c_str(), bytes, numBytes, false);\n\n#if !defined(ARCH_NRF52) ||                                                                                                      \\\n    defined(NRF52_USE_JSON) // JSON is not supported on nRF52, see issue #2804 ### Fixed by using ArduinoJson ###\n        if (!moduleConfig.mqtt.json_enabled)\n            return;\n        // handle json topic\n        auto jsonString = MeshPacketSerializer::JsonSerialize(&mp_decoded);\n        if (jsonString.length() == 0)\n            return;\n        // Generate node ID from nodenum for JSON topic\n        std::string nodeIdForJson = nodeDB->getNodeId();\n        std::string topicJson = jsonTopic + channelId + \"/\" + nodeIdForJson;\n        LOG_INFO(\"JSON publish message to %s, %u bytes: %s\", topicJson.c_str(), jsonString.length(), jsonString.c_str());\n        publish(topicJson.c_str(), jsonString.c_str(), false);\n#endif // ARCH_NRF52 NRF52_USE_JSON\n    } else {\n        LOG_INFO(\"MQTT not connected, queue packet\");\n        QueueEntry *entry;\n        if (mqttQueue.numFree() == 0) {\n            LOG_WARN(\"MQTT queue is full, discard oldest\");\n            entry = mqttQueue.dequeuePtr(0);\n        } else {\n            entry = new QueueEntry;\n        }\n        entry->topic = std::move(topic);\n        entry->envBytes.assign(bytes, numBytes);\n        if (mqttQueue.enqueue(entry, 0) == false) {\n            LOG_CRIT(\"Failed to add a message to mqttQueue!\");\n            abort();\n        }\n    }\n}\n\nvoid MQTT::perhapsReportToMap()\n{\n    if (!moduleConfig.mqtt.map_reporting_enabled || !moduleConfig.mqtt.map_report_settings.should_report_location ||\n        !(moduleConfig.mqtt.proxy_to_client_enabled || isConnectedDirectly()))\n        return;\n\n    // Coerce the map position precision to be within the valid range\n    // This removes obtusely large radius and privacy problematic ones from the map\n    if (map_position_precision < 12 || map_position_precision > 15) {\n        LOG_WARN(\"MQTT Map report position precision %u is out of range, using default %u\", map_position_precision,\n                 default_map_position_precision);\n        map_position_precision = default_map_position_precision;\n    }\n\n    if (Throttle::isWithinTimespanMs(last_report_to_map, map_publish_interval_msecs) && last_report_to_map != 0)\n        return;\n\n    if (localPosition.latitude_i == 0 && localPosition.longitude_i == 0) {\n        if (Throttle::isWithinTimespanMs(lastPositionUnavailableWarning, POSITION_UNAVAILABLE_WARNING_INTERVAL_MS) == false) {\n            LOG_WARN(\"MQTT Map report enabled, but no position available\");\n            lastPositionUnavailableWarning = millis();\n        }\n        return;\n    }\n\n    // Allocate MeshPacket and fill it\n    meshtastic_MeshPacket *mp = packetPool.allocZeroed();\n    mp->which_payload_variant = meshtastic_MeshPacket_decoded_tag;\n    mp->from = nodeDB->getNodeNum();\n    mp->to = NODENUM_BROADCAST;\n    mp->decoded.portnum = meshtastic_PortNum_MAP_REPORT_APP;\n\n    // Fill MapReport message\n    meshtastic_MapReport mapReport = meshtastic_MapReport_init_default;\n    memcpy(mapReport.long_name, owner.long_name, sizeof(owner.long_name));\n    memcpy(mapReport.short_name, owner.short_name, sizeof(owner.short_name));\n    mapReport.role = config.device.role;\n    mapReport.hw_model = owner.hw_model;\n    strncpy(mapReport.firmware_version, optstr(APP_VERSION), sizeof(mapReport.firmware_version));\n    mapReport.region = config.lora.region;\n    mapReport.modem_preset = config.lora.modem_preset;\n    mapReport.has_default_channel = channels.hasDefaultChannel();\n    mapReport.has_opted_report_location = true;\n\n    // Set position with precision (same as in PositionModule)\n    mapReport.latitude_i = localPosition.latitude_i & (UINT32_MAX << (32 - map_position_precision));\n    mapReport.longitude_i = localPosition.longitude_i & (UINT32_MAX << (32 - map_position_precision));\n    mapReport.latitude_i += (1 << (31 - map_position_precision));\n    mapReport.longitude_i += (1 << (31 - map_position_precision));\n\n    mapReport.altitude = localPosition.altitude;\n    mapReport.position_precision = map_position_precision;\n\n    mapReport.num_online_local_nodes = nodeDB->getNumOnlineMeshNodes(true);\n\n    // Encode MapReport message into the MeshPacket\n    mp->decoded.payload.size =\n        pb_encode_to_bytes(mp->decoded.payload.bytes, sizeof(mp->decoded.payload.bytes), &meshtastic_MapReport_msg, &mapReport);\n\n    // Generate node ID from nodenum for service envelope\n    std::string nodeId = nodeDB->getNodeId();\n\n    // Encode the MeshPacket into a binary ServiceEnvelope and publish\n    const meshtastic_ServiceEnvelope se = {\n        .packet = mp,\n        .channel_id = (char *)channels.getGlobalId(channels.getPrimaryIndex()), // Use primary channel as the channel_id\n        .gateway_id = const_cast<char *>(nodeId.c_str())};\n    size_t numBytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_ServiceEnvelope_msg, &se);\n\n    LOG_INFO(\"MQTT Publish map report to %s\", mapTopic.c_str());\n    publish(mapTopic.c_str(), bytes, numBytes, false);\n\n    // Release the allocated memory for MeshPacket\n    packetPool.release(mp);\n\n    // Update the last report time\n    last_report_to_map = millis();\n}\n"
  },
  {
    "path": "src/mqtt/MQTT.h",
    "content": "#pragma once\n\n#include \"Default.h\"\n#include \"configuration.h\"\n\n#include \"concurrency/OSThread.h\"\n#include \"mesh/Channels.h\"\n#include \"mesh/generated/meshtastic/mqtt.pb.h\"\n#if !defined(ARCH_NRF52) || NRF52_USE_JSON\n#include \"serialization/JSON.h\"\n#endif\n#if HAS_WIFI\n#include <WiFiClient.h>\n#if __has_include(<WiFiClientSecure.h>)\n#include <WiFiClientSecure.h>\n#endif\n#endif\n#if HAS_ETHERNET && !defined(USE_WS5500)\n#include <EthernetClient.h>\n#endif\n\n#if HAS_NETWORKING\n#include <PubSubClient.h>\n#include <memory>\n#endif\n\n#define MAX_MQTT_QUEUE 16\n\n/**\n * Our wrapper/singleton for sending/receiving MQTT \"udp\" packets.  This object isolates the MQTT protocol implementation from\n * the two components that use it: MQTTPlugin and MQTTSimInterface.\n */\nclass MQTT : private concurrency::OSThread\n{\n  public:\n    MQTT();\n\n    /**\n     * Publish a packet on the global MQTT server.\n     * @param mp_encrypted the encrypted packet to publish\n     * @param mp_decoded the decrypted packet to publish\n     * @param chIndex the index of the channel for this message\n     *\n     * Note: for messages we are forwarding on the mesh that we can't find the channel for (because we don't have the keys), we\n     * can not forward those messages to the cloud - because no way to find a global channel ID.\n     */\n    void onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_MeshPacket &mp_decoded, ChannelIndex chIndex);\n\n    bool isConnectedDirectly();\n\n    bool publish(const char *topic, const char *payload, bool retained);\n\n    bool publish(const char *topic, const uint8_t *payload, size_t length, const bool retained);\n\n    void onClientProxyReceive(meshtastic_MqttClientProxyMessage msg);\n\n    bool isEnabled() { return this->enabled; };\n\n    void start() { setIntervalFromNow(0); };\n\n    bool isUsingDefaultServer() { return isConfiguredForDefaultServer; }\n    bool isUsingDefaultRootTopic() { return isConfiguredForDefaultRootTopic; }\n\n    /// Validate the meshtastic_ModuleConfig_MQTTConfig.\n    static bool isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config) { return isValidConfig(config, nullptr); }\n\n  protected:\n    struct QueueEntry {\n        std::string topic;\n        std::basic_string<uint8_t> envBytes; // binary/pb_encode_to_bytes ServiceEnvelope\n    };\n    PointerQueue<QueueEntry> mqttQueue;\n\n    int reconnectCount = 0;\n    bool isConfiguredForDefaultServer = true;\n    bool isConfiguredForDefaultRootTopic = true;\n\n    virtual int32_t runOnce() override;\n\n#ifndef PIO_UNIT_TESTING\n  private:\n#endif\n#if HAS_WIFI\n    using MQTTClient = WiFiClient;\n#if __has_include(<WiFiClientSecure.h>)\n    using MQTTClientTLS = WiFiClientSecure;\n#define MQTT_SUPPORTS_TLS 1\n#endif\n#elif HAS_ETHERNET\n    using MQTTClient = EthernetClient;\n#else\n    using MQTTClient = void;\n#endif\n\n#if HAS_NETWORKING\n    std::unique_ptr<MQTTClient> mqttClient;\n#if MQTT_SUPPORTS_TLS\n    MQTTClientTLS mqttClientTLS;\n#endif\n    PubSubClient pubSub;\n    explicit MQTT(std::unique_ptr<MQTTClient> mqttClient);\n#endif\n\n    std::string cryptTopic = \"/2/e/\";   // msh/2/e/CHANNELID/NODEID\n    std::string jsonTopic = \"/2/json/\"; // msh/2/json/CHANNELID/NODEID\n    std::string mapTopic = \"/2/map/\";   // For protobuf-encoded MapReport messages\n\n    // For map reporting (only applies when enabled)\n    const uint32_t default_map_position_precision = 14; // defaults to max. offset of ~1459m\n    uint32_t last_report_to_map = 0;\n    uint32_t map_position_precision = default_map_position_precision;\n    uint32_t map_publish_interval_msecs = default_map_publish_interval_secs * 1000;\n\n    /** Attempt to connect to server if necessary\n     */\n    void reconnect();\n\n    /** Tell the server what subscriptions we want (based on channels.downlink_enabled)\n     */\n    void sendSubscriptions();\n\n    /// Callback for direct mqtt subscription messages\n    static void mqttCallback(char *topic, byte *payload, unsigned int length);\n\n    static bool isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config, MQTTClient *client);\n\n    /// Called when a new publish arrives from the MQTT server\n    void onReceive(char *topic, byte *payload, size_t length);\n\n    void publishQueuedMessages();\n\n    void publishNodeInfo();\n\n    // Check if we should report unencrypted information about our node for consumption by a map\n    void perhapsReportToMap();\n\n    /// Return 0 if sleep is okay, veto sleep if we are connected to pubsub server\n    // int preflightSleepCb(void *unused = NULL) { return pubSub.connected() ? 1 : 0; }\n};\n\nvoid mqttInit();\n\nextern MQTT *mqtt;"
  },
  {
    "path": "src/mqtt/ServiceEnvelope.cpp",
    "content": "#include \"ServiceEnvelope.h\"\n#include \"mesh-pb-constants.h\"\n#include <pb_decode.h>\n\nDecodedServiceEnvelope::DecodedServiceEnvelope(const uint8_t *payload, size_t length)\n    : meshtastic_ServiceEnvelope(meshtastic_ServiceEnvelope_init_default),\n      validDecode(pb_decode_from_bytes(payload, length, &meshtastic_ServiceEnvelope_msg, this))\n{\n}\n\nDecodedServiceEnvelope::DecodedServiceEnvelope(DecodedServiceEnvelope &&other)\n    : meshtastic_ServiceEnvelope(meshtastic_ServiceEnvelope_init_zero), validDecode(other.validDecode)\n{\n    std::swap(packet, other.packet);\n    std::swap(channel_id, other.channel_id);\n    std::swap(gateway_id, other.gateway_id);\n}\n\nDecodedServiceEnvelope::~DecodedServiceEnvelope()\n{\n    if (validDecode)\n        pb_release(&meshtastic_ServiceEnvelope_msg, this);\n}"
  },
  {
    "path": "src/mqtt/ServiceEnvelope.h",
    "content": "#pragma once\n\n#include \"mesh/generated/meshtastic/mqtt.pb.h\"\n\n// meshtastic_ServiceEnvelope that automatically releases dynamically allocated memory when it goes out of scope.\nstruct DecodedServiceEnvelope : public meshtastic_ServiceEnvelope {\n    DecodedServiceEnvelope(const uint8_t *payload, size_t length);\n    DecodedServiceEnvelope(DecodedServiceEnvelope &) = delete;\n    DecodedServiceEnvelope(DecodedServiceEnvelope &&);\n    ~DecodedServiceEnvelope();\n    // Clients must check that this is true before using.\n    const bool validDecode;\n};"
  },
  {
    "path": "src/network-stubs.cpp",
    "content": "#include \"configuration.h\"\n\n#if (HAS_WIFI == 0)\n\nbool initWifi()\n{\n    return false;\n}\n\nvoid deinitWifi() {}\n\nbool isWifiAvailable()\n{\n    return false;\n}\n\n#endif\n\n#if (HAS_ETHERNET == 0)\n\nbool initEthernet()\n{\n    return false;\n}\n\nbool isEthernetAvailable()\n{\n    return false;\n}\n\n#endif\n"
  },
  {
    "path": "src/nimble/NimbleBluetooth.cpp",
    "content": "#include \"configuration.h\"\n#if !MESHTASTIC_EXCLUDE_BLUETOOTH\n#include \"BluetoothCommon.h\"\n#include \"NimbleBluetooth.h\"\n#include \"PowerFSM.h\"\n#include \"StaticPointerQueue.h\"\n\n#include \"concurrency/OSThread.h\"\n#include \"main.h\"\n#include \"mesh/PhoneAPI.h\"\n#include \"mesh/mesh-pb-constants.h\"\n#include \"sleep.h\"\n#include <NimBLEDevice.h>\n#include <atomic>\n#include <mutex>\n\n#ifdef NIMBLE_TWO\n#include \"NimBLEAdvertising.h\"\n#include \"NimBLEExtAdvertising.h\"\n#include \"PowerStatus.h\"\n#endif\n\n#if defined(CONFIG_NIMBLE_CPP_IDF)\n#include \"host/ble_gap.h\"\n#else\n#include \"nimble/nimble/host/include/host/ble_gap.h\"\n#endif\n\n#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C6)\n\nnamespace\n{\nconstexpr uint16_t kPreferredBleMtu = 517;\nconstexpr uint16_t kPreferredBleTxOctets = 251;\nconstexpr uint16_t kPreferredBleTxTimeUs = (kPreferredBleTxOctets + 14) * 8;\n} // namespace\n#endif\n\n// Debugging options: careful, they slow things down quite a bit!\n// #define DEBUG_NIMBLE_ON_READ_TIMING  // uncomment to time onRead duration\n// #define DEBUG_NIMBLE_ON_WRITE_TIMING // uncomment to time onWrite duration\n// #define DEBUG_NIMBLE_NOTIFY          // uncomment to enable notify logging\n\n#define NIMBLE_BLUETOOTH_TO_PHONE_QUEUE_SIZE 3\n#define NIMBLE_BLUETOOTH_FROM_PHONE_QUEUE_SIZE 3\n\nNimBLECharacteristic *fromNumCharacteristic;\nNimBLECharacteristic *BatteryCharacteristic;\nNimBLECharacteristic *logRadioCharacteristic;\nNimBLEServer *bleServer;\n\nstatic bool passkeyShowing;\nstatic std::atomic<uint16_t> nimbleBluetoothConnHandle{BLE_HS_CONN_HANDLE_NONE}; // BLE_HS_CONN_HANDLE_NONE means \"no connection\"\n\nstatic void clearPairingDisplay()\n{\n    if (!passkeyShowing) {\n        return;\n    }\n\n    passkeyShowing = false;\n#if HAS_SCREEN\n    if (screen) {\n        screen->endAlert();\n    }\n#endif\n}\n\nclass BluetoothPhoneAPI : public PhoneAPI, public concurrency::OSThread\n{\n    /*\n      CAUTION: There's a lot going on here and lots of room to break things.\n\n      This NimbleBluetooth.cpp file does some tricky synchronization between the NimBLE FreeRTOS task (which runs the onRead and\n      onWrite callbacks) and the main task (which runs runOnce and the rest of PhoneAPI).\n\n      The main idea is to add a little bit of synchronization here to make it so that the rest of the codebase doesn't have to\n      know about concurrency and mutexes, and can just run happily ever after as a cooperative multitasking OSThread system, where\n      locking isn't something that anyone has to worry about too much! :)\n\n      We achieve this by having some queues and mutexes in this file only, and ensuring that all calls to getFromRadio and\n      handleToRadio are only made from the main FreeRTOS task. This way, the rest of the codebase doesn't have to worry about\n      being run concurrently, which would make everything else much much much more complicated.\n\n      PHONE -> RADIO:\n        - [NimBLE FreeRTOS task:] onWrite callback holds fromPhoneMutex and pushes received packets into fromPhoneQueue.\n        - [Main task:] runOnceHandleFromPhoneQueue in main task holds fromPhoneMutex, pulls packets from fromPhoneQueue, and calls\n      handleToRadio **in main task**.\n\n      RADIO -> PHONE:\n        - [NimBLE FreeRTOS task:] onRead callback sets onReadCallbackIsWaitingForData flag and polls in a busy loop. (unless\n      there's already a packet waiting in toPhoneQueue)\n        - [Main task:] runOnceHandleToPhoneQueue sees onReadCallbackIsWaitingForData flag, calls getFromRadio **in main task** to\n      get packets from radio, holds toPhoneMutex, pushes the packet into toPhoneQueue, and clears the\n      onReadCallbackIsWaitingForData flag.\n        - [NimBLE FreeRTOS task:] onRead callback sees that the onReadCallbackIsWaitingForData flag cleared, holds toPhoneMutex,\n      pops the packet from toPhoneQueue, and returns it to NimBLE.\n\n      MUTEXES:\n        - fromPhoneMutex protects fromPhoneQueue and fromPhoneQueueSize\n        - toPhoneMutex protects toPhoneQueue, toPhoneQueueByteSizes, and toPhoneQueueSize\n\n      ATOMICS:\n        - fromPhoneQueueSize is only increased by onWrite, and only decreased by runOnceHandleFromPhoneQueue (or onDisconnect).\n        - toPhoneQueueSize is only increased by runOnceHandleToPhoneQueue, and only decreased by onRead (or onDisconnect).\n        - onReadCallbackIsWaitingForData is a flag. It's only set by onRead, and only cleared by runOnceHandleToPhoneQueue (or\n      onDisconnect).\n\n      PRELOADING: see comments in runOnceToPhoneCanPreloadNextPacket about when it's safe to preload packets from getFromRadio.\n\n      BLE CONNECTION PARAMS:\n        - During config, we request a high-throughput, low-latency BLE connection for speed.\n        - After config, we switch to a lower-power BLE connection for steady-state use to extend battery life.\n\n      MEMORY MANAGEMENT:\n        - We keep packets on the stack and do not allocate heap.\n        - We use std::array for fromPhoneQueue and toPhoneQueue to avoid mallocs and frees across FreeRTOS tasks.\n        - Yes, we have to do some copy operations on pop because of this, but it's worth it to avoid cross-task memory management.\n\n      NOTIFY IS BROKEN:\n        - Adding NIMBLE_PROPERTY::NOTIFY to FromRadioCharacteristic appears to break things. It is NOT backwards compatible.\n\n      ZERO-SIZE READS:\n        - Returning a zero-size read from onRead breaks some clients during the config phase. So we have to block onRead until we\n      have data.\n        - During the STATE_SEND_PACKETS phase, it's totally OK to return zero-size reads, as clients are expected to do reads\n      until they get a 0-byte response.\n\n      CROSS-TASK WAKEUP:\n        - If you call: bluetoothPhoneAPI->setIntervalFromNow(0); to schedule immediate processing of new data,\n        - Then you should also call: concurrency::mainDelay.interrupt(); to wake up the main loop if it's sleeping.\n        - Otherwise, you're going to wait ~100ms or so until the main loop wakes up from some other cause.\n    */\n\n  public:\n    BluetoothPhoneAPI() : concurrency::OSThread(\"NimbleBluetooth\") { api_type = TYPE_BLE; }\n\n    /* Packets from phone (BLE onWrite callback) */\n    std::mutex fromPhoneMutex;\n    std::atomic<size_t> fromPhoneQueueSize{0};\n    // We use array here (and pay the cost of memcpy) to avoid dynamic memory allocations and frees across FreeRTOS tasks.\n    std::array<NimBLEAttValue, NIMBLE_BLUETOOTH_FROM_PHONE_QUEUE_SIZE> fromPhoneQueue{};\n\n    /* Packets to phone (BLE onRead callback) */\n    std::mutex toPhoneMutex;\n    std::atomic<size_t> toPhoneQueueSize{0};\n    // We use array here (and pay the cost of memcpy) to avoid dynamic memory allocations and frees across FreeRTOS tasks.\n    std::array<std::array<uint8_t, meshtastic_FromRadio_size>, NIMBLE_BLUETOOTH_TO_PHONE_QUEUE_SIZE> toPhoneQueue{};\n    std::array<size_t, NIMBLE_BLUETOOTH_TO_PHONE_QUEUE_SIZE> toPhoneQueueByteSizes{};\n    // The onReadCallbackIsWaitingForData flag provides synchronization between the NimBLE task's onRead callback and our main\n    // task's runOnce. It's only set by onRead, and only cleared by runOnce.\n    std::atomic<bool> onReadCallbackIsWaitingForData{false};\n\n    /* Statistics/logging helpers */\n    std::atomic<int32_t> readCount{0};\n    std::atomic<int32_t> notifyCount{0};\n    std::atomic<int32_t> writeCount{0};\n\n  protected:\n    virtual int32_t runOnce() override\n    {\n        while (runOnceHasWorkToDo()) {\n            /*\n              PROCESS fromPhoneQueue BEFORE toPhoneQueue:\n\n              In normal STATE_SEND_PACKETS operation, it's unlikely that we'll have both writes and reads to process at the same\n              time, because either onWrite or onRead will trigger this runOnce. And in STATE_SEND_PACKETS, it's generally ok to\n              service either the reads or writes first.\n\n              However, during the initial setup wantConfig packet, the clients send a write and immediately send a read, and they\n              expect the read will respond to the write. (This also happens when a client goes from STATE_SEND_PACKETS back to\n              another wantConfig, like the iOS client does when requesting the nodedb after requesting the main config only.)\n\n              So it's safest to always service writes (fromPhoneQueue) before reads (toPhoneQueue), so that any \"synchronous\"\n              write-then-read sequences from the client work as expected, even if this means we block onRead for a while: this is\n              what the client wants!\n            */\n\n            // PHONE -> RADIO:\n            runOnceHandleFromPhoneQueue(); // pull data from onWrite to handleToRadio\n\n            // RADIO -> PHONE:\n            runOnceHandleToPhoneQueue(); // push data from getFromRadio to onRead\n        }\n\n        // the run is triggered via NimbleBluetoothToRadioCallback and NimbleBluetoothFromRadioCallback\n        return INT32_MAX;\n    }\n\n    virtual void onConfigStart() override\n    {\n        LOG_INFO(\"BLE onConfigStart\");\n\n        // Prefer high throughput during config/setup, at the cost of high power consumption (for a few seconds)\n        if (bleServer && isConnected()) {\n            uint16_t conn_handle = nimbleBluetoothConnHandle.load();\n            if (conn_handle != BLE_HS_CONN_HANDLE_NONE) {\n                requestHighThroughputConnection(conn_handle);\n            }\n        }\n    }\n\n    virtual void onConfigComplete() override\n    {\n        LOG_INFO(\"BLE onConfigComplete\");\n\n        // Switch to lower power consumption BLE connection params for steady-state use after config/setup is complete\n        if (bleServer && isConnected()) {\n            uint16_t conn_handle = nimbleBluetoothConnHandle.load();\n            if (conn_handle != BLE_HS_CONN_HANDLE_NONE) {\n                requestLowerPowerConnection(conn_handle);\n            }\n        }\n    }\n\n    bool runOnceHasWorkToDo() { return runOnceHasWorkToPhone() || runOnceHasWorkFromPhone(); }\n\n    bool runOnceHasWorkToPhone() { return onReadCallbackIsWaitingForData || runOnceToPhoneCanPreloadNextPacket(); }\n\n    bool runOnceToPhoneCanPreloadNextPacket()\n    {\n        /*\n         * PRELOADING getFromRadio RESPONSES:\n         *\n         * It's not safe to preload packets if we're in STATE_SEND_PACKETS, because there may be a while between the time we call\n         * getFromRadio and when the client actually reads it. If the connection drops in that time, we might lose that packet\n         * forever. In STATE_SEND_PACKETS, if we wait for onRead before we call getFromRadio, we minimize the time window where\n         * the client might disconnect before completing the read.\n         *\n         * However, if we're in the setup states (sending config, nodeinfo, etc), it's safe and beneficial to preload packets into\n         * toPhoneQueue because the client will just reconnect after a disconnect, losing nothing.\n         */\n\n        if (!isConnected()) {\n            return false;\n        } else if (isSendingPackets()) {\n            // If we're in STATE_SEND_PACKETS, we must wait for onRead before calling getFromRadio.\n            return false;\n        } else {\n            // In other states, we can preload as long as there's space in the toPhoneQueue.\n            return toPhoneQueueSize < NIMBLE_BLUETOOTH_TO_PHONE_QUEUE_SIZE;\n        }\n    }\n\n    void runOnceHandleToPhoneQueue()\n    {\n        // Stack buffer for getFromRadio packet\n        uint8_t fromRadioBytes[meshtastic_FromRadio_size] = {0};\n        size_t numBytes = 0;\n\n        if (onReadCallbackIsWaitingForData || runOnceToPhoneCanPreloadNextPacket()) {\n            numBytes = getFromRadio(fromRadioBytes);\n\n            if (numBytes == 0) {\n                /*\n                  Client expected a read, but we have nothing to send.\n\n                  In STATE_SEND_PACKETS, it is 100% OK to return a 0-byte response, as we expect clients to do read beyond\n                  notifies regularly, to make sure they have nothing else to read.\n\n                  In other states, this is fine **so long as we've already processed pending onWrites first**, because the client\n                  may requesting wantConfig and immediately doing a read.\n                */\n            } else {\n                // Push to toPhoneQueue, protected by toPhoneMutex. Hold the mutex as briefly as possible.\n                if (toPhoneQueueSize < NIMBLE_BLUETOOTH_TO_PHONE_QUEUE_SIZE) {\n                    // Note: the comparison above is safe without a mutex because we are the only method that *increases*\n                    // toPhoneQueueSize. (It's okay if toPhoneQueueSize *decreases* in the NimBLE task meanwhile.)\n\n                    { // scope for toPhoneMutex mutex\n                        std::lock_guard<std::mutex> guard(toPhoneMutex);\n                        size_t storeAtIndex = toPhoneQueueSize.load();\n                        memcpy(toPhoneQueue[storeAtIndex].data(), fromRadioBytes, numBytes);\n                        toPhoneQueueByteSizes[storeAtIndex] = numBytes;\n                        toPhoneQueueSize++;\n                    }\n#ifdef DEBUG_NIMBLE_ON_READ_TIMING\n                    LOG_DEBUG(\"BLE getFromRadio returned numBytes=%u, pushed toPhoneQueueSize=%u\", numBytes,\n                              toPhoneQueueSize.load());\n#endif\n                } else {\n                    // Shouldn't happen because the onRead callback shouldn't be waiting if the queue is full!\n                    LOG_ERROR(\"Shouldn't happen! Drop FromRadio packet, toPhoneQueue full (%u bytes)\", numBytes);\n                }\n            }\n\n            // Clear the onReadCallbackIsWaitingForData flag so onRead knows it can proceed.\n            onReadCallbackIsWaitingForData = false; // only clear this flag AFTER the push\n        }\n    }\n\n    bool runOnceHasWorkFromPhone() { return fromPhoneQueueSize > 0; }\n\n    void runOnceHandleFromPhoneQueue()\n    {\n        // Handle packets we received from onWrite from the phone.\n        if (fromPhoneQueueSize > 0) {\n            // Note: the comparison above is safe without a mutex because we are the only method that *decreases*\n            // fromPhoneQueueSize. (It's okay if fromPhoneQueueSize *increases* in the NimBLE task meanwhile.)\n\n            LOG_DEBUG(\"NimbleBluetooth: handling ToRadio packet, fromPhoneQueueSize=%u\", fromPhoneQueueSize.load());\n\n            // Pop the front of fromPhoneQueue, holding the mutex only briefly while we pop.\n            NimBLEAttValue val;\n            { // scope for fromPhoneMutex mutex\n                std::lock_guard<std::mutex> guard(fromPhoneMutex);\n                val = fromPhoneQueue[0];\n\n                // Shift the rest of the queue down\n                for (uint8_t i = 1; i < fromPhoneQueueSize; i++) {\n                    fromPhoneQueue[i - 1] = fromPhoneQueue[i];\n                }\n\n                // Safe decrement due to onDisconnect\n                if (fromPhoneQueueSize > 0)\n                    fromPhoneQueueSize--;\n            }\n\n            handleToRadio(val.data(), val.length());\n        }\n    }\n\n    /**\n     * Subclasses can use this as a hook to provide custom notifications for their transport (i.e. bluetooth notifies)\n     */\n    virtual void onNowHasData(uint32_t fromRadioNum)\n    {\n        PhoneAPI::onNowHasData(fromRadioNum);\n\n#ifdef DEBUG_NIMBLE_NOTIFY\n\n        int currentNotifyCount = notifyCount.fetch_add(1);\n\n        uint8_t cc = bleServer->getConnectedCount();\n        // This logging slows things down when there are lots of packets going to the phone, like initial connection:\n        LOG_DEBUG(\"BLE notify(%d) fromNum: %d connections: %d\", currentNotifyCount, fromRadioNum, cc);\n#endif\n\n        uint8_t val[4];\n        put_le32(val, fromRadioNum);\n\n        fromNumCharacteristic->setValue(val, sizeof(val));\n#ifdef NIMBLE_TWO\n        // NOTE: I don't have any NIMBLE_TWO devices, but this line makes me suspicious, and I suspect it needs to just be\n        // notify().\n        fromNumCharacteristic->notify(val, sizeof(val), BLE_HS_CONN_HANDLE_NONE);\n#else\n        fromNumCharacteristic->notify();\n#endif\n    }\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() { return bleServer && bleServer->getConnectedCount() > 0; }\n\n    void requestHighThroughputConnection(uint16_t conn_handle)\n    {\n        /* Request a lower-latency, higher-throughput BLE connection.\n\n        This comes at the cost of higher power consumption, so we may want to only use this for initial setup, and then switch to\n        a slower mode.\n\n        See https://developer.apple.com/library/archive/qa/qa1931/_index.html for formulas to calculate values, iOS/macOS\n        constraints, and recommendations. (Android doesn't have specific constraints, but seems to be compatible with the Apple\n        recommendations.)\n\n        Selected settings:\n            minInterval (units of 1.25ms): 7.5ms = 6 (lower than the Apple recommended minimum, but allows faster when the client\n        supports it.)\n            maxInterval (units of 1.25ms): 15ms = 12\n            latency: 0 (don't allow peripheral to skip any connection events)\n            timeout (units of 10ms): 6 seconds = 600 (supervision timeout)\n\n        These are intentionally aggressive to prioritize speed over power consumption, but are only used for a few seconds at\n        setup. Not worth adjusting much.\n        */\n        LOG_INFO(\"BLE requestHighThroughputConnection\");\n        bleServer->updateConnParams(conn_handle, 6, 12, 0, 600);\n    }\n\n    void requestLowerPowerConnection(uint16_t conn_handle)\n    {\n        /* Request a lower power consumption (but higher latency, lower throughput) BLE connection.\n\n        This is suitable for steady-state operation after initial setup is complete.\n\n        See https://developer.apple.com/library/archive/qa/qa1931/_index.html for formulas to calculate values, iOS/macOS\n        constraints, and recommendations. (Android doesn't have specific constraints, but seems to be compatible with the Apple\n        recommendations.)\n\n        Selected settings:\n            minInterval (units of 1.25ms): 30ms = 24\n            maxInterval (units of 1.25ms): 50ms = 40\n            latency: 2 (allow peripheral to skip up to 2 consecutive connection events to save power)\n            timeout (units of 10ms): 6 seconds = 600 (supervision timeout)\n\n        There's an opportunity for tuning here if anyone wants to do some power measurements, but these should allow 10-20 packets\n        per second.\n        */\n        LOG_INFO(\"BLE requestLowerPowerConnection\");\n        bleServer->updateConnParams(conn_handle, 24, 40, 2, 600);\n    }\n};\n\nstatic BluetoothPhoneAPI *bluetoothPhoneAPI;\n/**\n * Subclasses can use this as a hook to provide custom notifications for their transport (i.e. bluetooth notifies)\n */\n\n// Last ToRadio value received from the phone\nstatic uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE];\n\nclass NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks\n{\n#ifdef NIMBLE_TWO\n    virtual void onWrite(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)\n#else\n    virtual void onWrite(NimBLECharacteristic *pCharacteristic)\n\n#endif\n    {\n        // CAUTION: This callback runs in the NimBLE task!!! Don't do anything except communicate with the main task's runOnce.\n        // Assumption: onWrite is serialized by NimBLE, so we don't need to lock here against multiple concurrent onWrite calls.\n\n        int currentWriteCount = bluetoothPhoneAPI->writeCount.fetch_add(1);\n\n#ifdef DEBUG_NIMBLE_ON_WRITE_TIMING\n        int startMillis = millis();\n        LOG_DEBUG(\"BLE onWrite(%d): start millis=%d\", currentWriteCount, startMillis);\n#endif\n\n        auto val = pCharacteristic->getValue();\n\n        if (memcmp(lastToRadio, val.data(), val.length()) != 0) {\n            if (bluetoothPhoneAPI->fromPhoneQueueSize < NIMBLE_BLUETOOTH_FROM_PHONE_QUEUE_SIZE) {\n                // Note: the comparison above is safe without a mutex because we are the only method that *increases*\n                // fromPhoneQueueSize. (It's okay if fromPhoneQueueSize *decreases* in the main task meanwhile.)\n                memcpy(lastToRadio, val.data(), val.length());\n\n                { // scope for fromPhoneMutex mutex\n                    // Append to fromPhoneQueue, protected by fromPhoneMutex. Hold the mutex as briefly as possible.\n                    std::lock_guard<std::mutex> guard(bluetoothPhoneAPI->fromPhoneMutex);\n                    bluetoothPhoneAPI->fromPhoneQueue.at(bluetoothPhoneAPI->fromPhoneQueueSize) = val;\n                    bluetoothPhoneAPI->fromPhoneQueueSize++;\n                }\n\n                // After releasing the mutex, schedule immediate processing of the new packet.\n                bluetoothPhoneAPI->setIntervalFromNow(0);\n                concurrency::mainDelay.interrupt(); // wake up main loop if sleeping\n\n#ifdef DEBUG_NIMBLE_ON_WRITE_TIMING\n                int finishMillis = millis();\n                LOG_DEBUG(\"BLE onWrite(%d): append to fromPhoneQueue took %u ms. numBytes=%d\", currentWriteCount,\n                          finishMillis - startMillis, val.length());\n#endif\n            } else {\n                LOG_WARN(\"BLE onWrite(%d): Drop ToRadio packet, fromPhoneQueue full (%u bytes)\", currentWriteCount, val.length());\n            }\n        } else {\n            LOG_DEBUG(\"BLE onWrite(%d): Drop duplicate ToRadio packet (%u bytes)\", currentWriteCount, val.length());\n        }\n    }\n};\n\nclass NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks\n{\n#ifdef NIMBLE_TWO\n    virtual void onRead(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo)\n#else\n    virtual void onRead(NimBLECharacteristic *pCharacteristic)\n#endif\n    {\n        // CAUTION: This callback runs in the NimBLE task!!! Don't do anything except communicate with the main task's runOnce.\n\n        int currentReadCount = bluetoothPhoneAPI->readCount.fetch_add(1);\n        int tries = 0;\n        int startMillis = millis();\n\n#ifdef DEBUG_NIMBLE_ON_READ_TIMING\n        LOG_DEBUG(\"BLE onRead(%d): start millis=%d\", currentReadCount, startMillis);\n#endif\n\n        // Is there a packet ready to go, or do we have to ask the main task to get one for us?\n        if (bluetoothPhoneAPI->toPhoneQueueSize > 0) {\n            // Note: the comparison above is safe without a mutex because we are the only method that *decreases*\n            // toPhoneQueueSize. (It's okay if toPhoneQueueSize *increases* in the main task meanwhile.)\n\n            // There's already a packet queued. Great! We don't need to wait for onReadCallbackIsWaitingForData.\n#ifdef DEBUG_NIMBLE_ON_READ_TIMING\n            LOG_DEBUG(\"BLE onRead(%d): packet already waiting, no need to set onReadCallbackIsWaitingForData\", currentReadCount);\n#endif\n        } else {\n            // Tell the main task that we'd like a packet.\n            bluetoothPhoneAPI->onReadCallbackIsWaitingForData = true;\n\n            // Wait for the main task to produce a packet for us, up to about 20 seconds.\n            // It normally takes just a few milliseconds, but at initial startup, etc, the main task can get blocked for longer\n            // doing various setup tasks.\n            while (bluetoothPhoneAPI->onReadCallbackIsWaitingForData && tries < 4000) {\n                // Schedule the main task runOnce to run ASAP.\n                bluetoothPhoneAPI->setIntervalFromNow(0);\n                concurrency::mainDelay.interrupt(); // wake up main loop if sleeping\n\n                if (!bluetoothPhoneAPI->onReadCallbackIsWaitingForData) {\n                    // we may be able to break even before a delay, if the call to interrupt woke up the main loop and it ran\n                    // already\n#ifdef DEBUG_NIMBLE_ON_READ_TIMING\n                    LOG_DEBUG(\"BLE onRead(%d): broke before delay after %u ms, %d tries\", currentReadCount,\n                              millis() - startMillis, tries);\n#endif\n                    break;\n                }\n\n                // This delay happens in the NimBLE FreeRTOS task, which really can't do anything until we get a value back.\n                // No harm in polling pretty frequently.\n                delay(tries < 20 ? 1 : 5);\n                tries++;\n\n                if (tries == 4000) {\n                    LOG_WARN(\n                        \"BLE onRead(%d): timeout waiting for data after %u ms, %d tries, giving up and returning 0-size response\",\n                        currentReadCount, millis() - startMillis, tries);\n                }\n            }\n        }\n\n        // Pop from toPhoneQueue, protected by toPhoneMutex. Hold the mutex as briefly as possible.\n        uint8_t fromRadioBytes[meshtastic_FromRadio_size] = {0}; // Stack buffer for getFromRadio packet\n        size_t numBytes = 0;\n        { // scope for toPhoneMutex mutex\n            std::lock_guard<std::mutex> guard(bluetoothPhoneAPI->toPhoneMutex);\n            size_t toPhoneQueueSize = bluetoothPhoneAPI->toPhoneQueueSize.load();\n            if (toPhoneQueueSize > 0) {\n                // Copy from the front of the toPhoneQueue\n                memcpy(fromRadioBytes, bluetoothPhoneAPI->toPhoneQueue[0].data(), bluetoothPhoneAPI->toPhoneQueueByteSizes[0]);\n                numBytes = bluetoothPhoneAPI->toPhoneQueueByteSizes[0];\n\n                // Shift the rest of the queue down\n                for (uint8_t i = 1; i < toPhoneQueueSize; i++) {\n                    memcpy(bluetoothPhoneAPI->toPhoneQueue[i - 1].data(), bluetoothPhoneAPI->toPhoneQueue[i].data(),\n                           bluetoothPhoneAPI->toPhoneQueueByteSizes[i]);\n                    // The above line is similar to:\n                    //   bluetoothPhoneAPI->toPhoneQueue[i - 1] = bluetoothPhoneAPI->toPhoneQueue[i]\n                    // but is usually faster because it doesn't have to copy all the trailing bytes beyond\n                    // toPhoneQueueByteSizes[i].\n                    //\n                    // We deliberately use an array here (and pay the CPU cost of some memcpy) to avoid synchronizing dynamic\n                    // memory allocations and frees across FreeRTOS tasks.\n\n                    bluetoothPhoneAPI->toPhoneQueueByteSizes[i - 1] = bluetoothPhoneAPI->toPhoneQueueByteSizes[i];\n                }\n\n                // Safe decrement due to onDisconnect\n                if (bluetoothPhoneAPI->toPhoneQueueSize > 0)\n                    bluetoothPhoneAPI->toPhoneQueueSize--;\n            } else {\n                // nothing in the toPhoneQueue; that's fine, and we'll just have numBytes=0.\n            }\n        }\n\n#ifdef DEBUG_NIMBLE_ON_READ_TIMING\n        int finishMillis = millis();\n        LOG_DEBUG(\"BLE onRead(%d): onReadCallbackIsWaitingForData took %u ms, %d tries. numBytes=%d\", currentReadCount,\n                  finishMillis - startMillis, tries, numBytes);\n#endif\n\n        pCharacteristic->setValue(fromRadioBytes, numBytes);\n\n        // If we sent something, wake up the main loop if it's sleeping in case there are more packets ready to enqueue.\n        if (numBytes != 0) {\n            bluetoothPhoneAPI->setIntervalFromNow(0);\n            concurrency::mainDelay.interrupt(); // wake up main loop if sleeping\n        }\n    }\n};\n\nclass NimbleBluetoothServerCallback : public NimBLEServerCallbacks\n{\n#ifdef NIMBLE_TWO\n  public:\n    NimbleBluetoothServerCallback(NimbleBluetooth *ble) { this->ble = ble; }\n\n  private:\n    NimbleBluetooth *ble;\n\n    virtual uint32_t onPassKeyDisplay()\n#else\n    virtual uint32_t onPassKeyRequest()\n#endif\n    {\n        uint32_t passkey = config.bluetooth.fixed_pin;\n\n        if (config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN) {\n            LOG_INFO(\"Use random passkey\");\n            // This is the passkey to be entered on peer - we pick a number >100,000 to ensure 6 digits\n            passkey = random(100000, 999999);\n        }\n        LOG_INFO(\"*** Enter passkey %d on the peer side ***\", passkey);\n\n        powerFSM.trigger(EVENT_BLUETOOTH_PAIR);\n        meshtastic::BluetoothStatus newStatus(std::to_string(passkey));\n        bluetoothStatus->updateStatus(&newStatus);\n\n#if HAS_SCREEN // Todo: migrate this display code back into Screen class, and observe bluetoothStatus\n        if (screen) {\n            screen->startAlert([passkey](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void {\n                char btPIN[16] = \"888888\";\n                snprintf(btPIN, sizeof(btPIN), \"%06u\", passkey);\n                int x_offset = display->width() / 2;\n                int y_offset = display->height() <= 80 ? 0 : 12;\n                display->setTextAlignment(TEXT_ALIGN_CENTER);\n                display->setFont(FONT_MEDIUM);\n                display->drawString(x_offset + x, y_offset + y, \"Bluetooth\");\n#if !defined(M5STACK_UNITC6L)\n                display->setFont(FONT_SMALL);\n                y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_MEDIUM - 4 : y_offset + FONT_HEIGHT_MEDIUM + 5;\n                display->drawString(x_offset + x, y_offset + y, \"Enter this code\");\n#endif\n                display->setFont(FONT_LARGE);\n                char pin[8];\n                snprintf(pin, sizeof(pin), \"%.3s %.3s\", btPIN, btPIN + 3);\n                y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_SMALL - 5 : y_offset + FONT_HEIGHT_SMALL + 5;\n                display->drawString(x_offset + x, y_offset + y, pin);\n\n                display->setFont(FONT_SMALL);\n                char deviceName[64];\n                snprintf(deviceName, sizeof(deviceName), \"Name: %s\", getDeviceName());\n                y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_LARGE - 6 : y_offset + FONT_HEIGHT_LARGE + 5;\n                display->drawString(x_offset + x, y_offset + y, deviceName);\n            });\n        }\n#endif\n        passkeyShowing = true;\n\n        return passkey;\n    }\n\n#ifdef NIMBLE_TWO\n    virtual void onAuthenticationComplete(NimBLEConnInfo &connInfo)\n#else\n    virtual void onAuthenticationComplete(ble_gap_conn_desc *desc)\n#endif\n    {\n        LOG_INFO(\"BLE authentication complete\");\n\n        meshtastic::BluetoothStatus newStatus(meshtastic::BluetoothStatus::ConnectionState::CONNECTED);\n        bluetoothStatus->updateStatus(&newStatus);\n        clearPairingDisplay();\n\n        // Store the connection handle for future use\n#ifdef NIMBLE_TWO\n        nimbleBluetoothConnHandle = connInfo.getConnHandle();\n#else\n        nimbleBluetoothConnHandle = desc->conn_handle;\n#endif\n    }\n\n#ifdef NIMBLE_TWO\n    virtual void onConnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo)\n    {\n        LOG_INFO(\"BLE incoming connection %s\", connInfo.getAddress().toString().c_str());\n\n        const uint16_t connHandle = connInfo.getConnHandle();\n#if NIMBLE_ENABLE_2M_PHY && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C6))\n        int phyResult =\n            ble_gap_set_prefered_le_phy(connHandle, BLE_GAP_LE_PHY_2M_MASK, BLE_GAP_LE_PHY_2M_MASK, BLE_GAP_LE_PHY_CODED_ANY);\n        if (phyResult == 0) {\n            LOG_INFO(\"BLE conn %u requested 2M PHY\", connHandle);\n        } else {\n            LOG_WARN(\"Failed to prefer 2M PHY for conn %u, rc=%d\", connHandle, phyResult);\n        }\n#endif\n\n        int dataLenResult = ble_gap_set_data_len(connHandle, kPreferredBleTxOctets, kPreferredBleTxTimeUs);\n        if (dataLenResult == 0) {\n            LOG_INFO(\"BLE conn %u requested data length %u bytes\", connHandle, kPreferredBleTxOctets);\n        } else {\n            LOG_WARN(\"Failed to raise data length for conn %u, rc=%d\", connHandle, dataLenResult);\n        }\n\n        LOG_INFO(\"BLE conn %u initial MTU %u (target %u)\", connHandle, connInfo.getMTU(), kPreferredBleMtu);\n        pServer->updateConnParams(connHandle, 6, 12, 0, 200);\n    }\n#endif\n\n#ifdef NIMBLE_TWO\n    virtual void onDisconnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo, int reason)\n    {\n        LOG_INFO(\"BLE disconnect reason: %d\", reason);\n#else\n    virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc)\n    {\n        LOG_INFO(\"BLE disconnect\");\n#endif\n#ifdef NIMBLE_TWO\n        if (ble->isDeInit)\n            return;\n#else\n        if (nimbleBluetooth && nimbleBluetooth->isDeInit)\n            return;\n#endif\n\n        meshtastic::BluetoothStatus newStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED);\n        bluetoothStatus->updateStatus(&newStatus);\n        clearPairingDisplay();\n\n        if (bluetoothPhoneAPI) {\n            bluetoothPhoneAPI->close();\n\n            { // scope for fromPhoneMutex mutex\n                std::lock_guard<std::mutex> guard(bluetoothPhoneAPI->fromPhoneMutex);\n                bluetoothPhoneAPI->fromPhoneQueueSize = 0;\n            }\n\n            bluetoothPhoneAPI->onReadCallbackIsWaitingForData = false;\n            { // scope for toPhoneMutex mutex\n                std::lock_guard<std::mutex> guard(bluetoothPhoneAPI->toPhoneMutex);\n                bluetoothPhoneAPI->toPhoneQueueSize = 0;\n            }\n\n            bluetoothPhoneAPI->readCount = 0;\n            bluetoothPhoneAPI->notifyCount = 0;\n            bluetoothPhoneAPI->writeCount = 0;\n        }\n\n        // Clear the last ToRadio packet buffer to avoid rejecting first packet from new connection\n        memset(lastToRadio, 0, sizeof(lastToRadio));\n\n        nimbleBluetoothConnHandle = BLE_HS_CONN_HANDLE_NONE; // BLE_HS_CONN_HANDLE_NONE means \"no connection\"\n\n#ifdef NIMBLE_TWO\n        // Restart Advertising\n        ble->startAdvertising();\n#else\n        NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();\n        if (!pAdvertising->start(0)) {\n            if (pAdvertising->isAdvertising()) {\n                LOG_DEBUG(\"BLE advertising already running\");\n            } else {\n                LOG_ERROR(\"BLE failed to restart advertising\");\n            }\n        }\n#endif\n    }\n};\n\nstatic NimbleBluetoothToRadioCallback *toRadioCallbacks;\nstatic NimbleBluetoothFromRadioCallback *fromRadioCallbacks;\n\nvoid NimbleBluetooth::shutdown()\n{\n    // No measurable power saving for ESP32 during light-sleep(?)\n#ifndef ARCH_ESP32\n    // Shutdown bluetooth for minimum power draw\n    LOG_INFO(\"Disable bluetooth\");\n    NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();\n    pAdvertising->reset();\n    pAdvertising->stop();\n#endif\n}\n\n// Proper shutdown for ESP32. Needs reboot to reverse.\nvoid NimbleBluetooth::deinit()\n{\n#ifdef ARCH_ESP32\n    LOG_INFO(\"Disable bluetooth until reboot\");\n    isDeInit = true;\n\n#ifdef BLE_LED\n    digitalWrite(BLE_LED, LED_STATE_OFF);\n#endif\n#ifndef NIMBLE_TWO\n    NimBLEDevice::deinit();\n#endif\n#endif\n}\n\n// Has initial setup been completed\nbool NimbleBluetooth::isActive()\n{\n    return bleServer;\n}\n\nbool NimbleBluetooth::isConnected()\n{\n    return bleServer->getConnectedCount() > 0;\n}\n\nint NimbleBluetooth::getRssi()\n{\n#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C6)\n    if (!bleServer || !isConnected()) {\n        return 0; // No active BLE connection\n    }\n\n    uint16_t connHandle = nimbleBluetoothConnHandle.load();\n\n    if (connHandle == BLE_HS_CONN_HANDLE_NONE) {\n        const auto peers = bleServer->getPeerDevices();\n        if (!peers.empty()) {\n            connHandle = peers.front();\n            nimbleBluetoothConnHandle = connHandle;\n        }\n    }\n\n    if (connHandle == BLE_HS_CONN_HANDLE_NONE) {\n        return 0; // Connection handle not available yet\n    }\n\n    int8_t rssi = 0;\n    const int rc = ble_gap_conn_rssi(connHandle, &rssi);\n\n    if (rc == 0) {\n        return rssi;\n    }\n    LOG_DEBUG(\"BLE RSSI read failed, rc=%d\", rc);\n#endif\n\n    return 0;\n}\n\nvoid NimbleBluetooth::setup()\n{\n    // Uncomment for testing\n    // NimbleBluetooth::clearBonds();\n\n    LOG_INFO(\"Init the NimBLE bluetooth module\");\n\n    NimBLEDevice::init(getDeviceName());\n    NimBLEDevice::setPower(ESP_PWR_LVL_P9);\n\n#if NIMBLE_ENABLE_2M_PHY && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C6))\n    int mtuResult = NimBLEDevice::setMTU(kPreferredBleMtu);\n    if (mtuResult == 0) {\n        LOG_INFO(\"BLE MTU request set to %u\", kPreferredBleMtu);\n    } else {\n        LOG_WARN(\"Unable to request MTU %u, rc=%d\", kPreferredBleMtu, mtuResult);\n    }\n\n    int phyResult = ble_gap_set_prefered_default_le_phy(BLE_GAP_LE_PHY_2M_MASK, BLE_GAP_LE_PHY_2M_MASK);\n    if (phyResult == 0) {\n        LOG_INFO(\"BLE default PHY preference set to 2M\");\n    } else {\n        LOG_WARN(\"Failed to prefer 2M PHY by default, rc=%d\", phyResult);\n    }\n\n    int dataLenResult = ble_gap_write_sugg_def_data_len(kPreferredBleTxOctets, kPreferredBleTxTimeUs);\n    if (dataLenResult == 0) {\n        LOG_INFO(\"BLE suggested data length set to %u bytes\", kPreferredBleTxOctets);\n    } else {\n        LOG_WARN(\"Failed to raise suggested data length (%u/%u), rc=%d\", kPreferredBleTxOctets, kPreferredBleTxTimeUs,\n                 dataLenResult);\n    }\n#endif\n\n    if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) {\n        NimBLEDevice::setSecurityAuth(BLE_SM_PAIR_AUTHREQ_BOND | BLE_SM_PAIR_AUTHREQ_MITM | BLE_SM_PAIR_AUTHREQ_SC);\n        NimBLEDevice::setSecurityInitKey(BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID);\n        NimBLEDevice::setSecurityRespKey(BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID);\n        NimBLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY);\n    }\n    bleServer = NimBLEDevice::createServer();\n#ifdef NIMBLE_TWO\n    NimbleBluetoothServerCallback *serverCallbacks = new NimbleBluetoothServerCallback(this);\n#else\n    NimbleBluetoothServerCallback *serverCallbacks = new NimbleBluetoothServerCallback();\n#endif\n    bleServer->setCallbacks(serverCallbacks, true);\n    setupService();\n    startAdvertising();\n}\n\nvoid NimbleBluetooth::setupService()\n{\n    NimBLEService *bleService = bleServer->createService(MESH_SERVICE_UUID);\n    NimBLECharacteristic *ToRadioCharacteristic;\n    NimBLECharacteristic *FromRadioCharacteristic;\n    // Define the characteristics that the app is looking for\n    if (config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) {\n        ToRadioCharacteristic = bleService->createCharacteristic(TORADIO_UUID, NIMBLE_PROPERTY::WRITE);\n        // Allow notifications so phones can stream FromRadio without polling.\n        FromRadioCharacteristic = bleService->createCharacteristic(FROMRADIO_UUID, NIMBLE_PROPERTY::READ);\n        fromNumCharacteristic = bleService->createCharacteristic(FROMNUM_UUID, NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ);\n        logRadioCharacteristic =\n            bleService->createCharacteristic(LOGRADIO_UUID, NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ, 512U);\n    } else {\n        ToRadioCharacteristic = bleService->createCharacteristic(\n            TORADIO_UUID, NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_AUTHEN | NIMBLE_PROPERTY::WRITE_ENC);\n        FromRadioCharacteristic = bleService->createCharacteristic(\n            FROMRADIO_UUID, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_AUTHEN | NIMBLE_PROPERTY::READ_ENC);\n        fromNumCharacteristic =\n            bleService->createCharacteristic(FROMNUM_UUID, NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ |\n                                                               NIMBLE_PROPERTY::READ_AUTHEN | NIMBLE_PROPERTY::READ_ENC);\n        logRadioCharacteristic = bleService->createCharacteristic(\n            LOGRADIO_UUID,\n            NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_AUTHEN | NIMBLE_PROPERTY::READ_ENC, 512U);\n    }\n    bluetoothPhoneAPI = new BluetoothPhoneAPI();\n\n    toRadioCallbacks = new NimbleBluetoothToRadioCallback();\n    ToRadioCharacteristic->setCallbacks(toRadioCallbacks);\n\n    fromRadioCallbacks = new NimbleBluetoothFromRadioCallback();\n    FromRadioCharacteristic->setCallbacks(fromRadioCallbacks);\n\n    bleService->start();\n\n    // Setup the battery service\n    NimBLEService *batteryService = bleServer->createService(NimBLEUUID((uint16_t)0x180f)); // 0x180F is the Battery Service\n    BatteryCharacteristic = batteryService->createCharacteristic( // 0x2A19 is the Battery Level characteristic)\n        (uint16_t)0x2a19, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY, 1);\n#ifdef NIMBLE_TWO\n    NimBLE2904 *batteryLevelDescriptor = BatteryCharacteristic->create2904();\n#else\n    NimBLE2904 *batteryLevelDescriptor = (NimBLE2904 *)BatteryCharacteristic->createDescriptor((uint16_t)0x2904);\n#endif\n    batteryLevelDescriptor->setFormat(NimBLE2904::FORMAT_UINT8);\n    batteryLevelDescriptor->setNamespace(1);\n    batteryLevelDescriptor->setUnit(0x27ad);\n\n    batteryService->start();\n}\n\nvoid NimbleBluetooth::startAdvertising()\n{\n#ifdef NIMBLE_TWO\n    NimBLEExtAdvertising *pAdvertising = NimBLEDevice::getAdvertising();\n    NimBLEExtAdvertisement legacyAdvertising;\n\n    legacyAdvertising.setLegacyAdvertising(true);\n    legacyAdvertising.setScannable(true);\n    legacyAdvertising.setConnectable(true);\n    legacyAdvertising.setFlags(BLE_HS_ADV_F_DISC_GEN);\n    if (powerStatus->getHasBattery() == 1) {\n        legacyAdvertising.setCompleteServices(NimBLEUUID((uint16_t)0x180f));\n    }\n    legacyAdvertising.setCompleteServices(NimBLEUUID(MESH_SERVICE_UUID));\n    legacyAdvertising.setMinInterval(500);\n    legacyAdvertising.setMaxInterval(1000);\n\n    NimBLEExtAdvertisement legacyScanResponse;\n    legacyScanResponse.setLegacyAdvertising(true);\n    legacyScanResponse.setConnectable(true);\n    legacyScanResponse.setName(getDeviceName());\n\n    if (!pAdvertising->setInstanceData(0, legacyAdvertising)) {\n        LOG_ERROR(\"BLE failed to set legacyAdvertising\");\n    } else if (!pAdvertising->setScanResponseData(0, legacyScanResponse)) {\n        LOG_ERROR(\"BLE failed to set legacyScanResponse\");\n    } else if (!pAdvertising->start(0, 0, 0)) {\n        LOG_ERROR(\"BLE failed to start legacyAdvertising\");\n    }\n#else\n    NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();\n    pAdvertising->reset();\n    pAdvertising->addServiceUUID(MESH_SERVICE_UUID);\n    pAdvertising->addServiceUUID(NimBLEUUID((uint16_t)0x180f)); // 0x180F is the Battery Service\n    pAdvertising->start(0);\n#endif\n}\n\n/// Given a level between 0-100, update the BLE attribute\nvoid updateBatteryLevel(uint8_t level)\n{\n    if ((config.bluetooth.enabled == true) && bleServer && nimbleBluetooth->isConnected()) {\n        BatteryCharacteristic->setValue(&level, 1);\n#ifdef NIMBLE_TWO\n        BatteryCharacteristic->notify(&level, 1, BLE_HS_CONN_HANDLE_NONE);\n#else\n        BatteryCharacteristic->notify();\n#endif\n    }\n}\n\nvoid NimbleBluetooth::clearBonds()\n{\n    LOG_INFO(\"Clearing bluetooth bonds!\");\n    NimBLEDevice::deleteAllBonds();\n}\n\nvoid NimbleBluetooth::sendLog(const uint8_t *logMessage, size_t length)\n{\n    if (!bleServer || !isConnected() || length > 512) {\n        return;\n    }\n#ifdef NIMBLE_TWO\n    logRadioCharacteristic->notify(logMessage, length, BLE_HS_CONN_HANDLE_NONE);\n#else\n    logRadioCharacteristic->notify(logMessage, length, true);\n#endif\n}\n\nvoid clearNVS()\n{\n    NimBLEDevice::deleteAllBonds();\n#ifdef ARCH_ESP32\n    ESP.restart();\n#endif\n}\n#endif\n"
  },
  {
    "path": "src/nimble/NimbleBluetooth.h",
    "content": "#pragma once\n#include \"BluetoothCommon.h\"\n\nclass NimbleBluetooth : BluetoothApi\n{\n  public:\n    void setup();\n    void shutdown();\n    void deinit();\n    void clearBonds();\n    bool isActive();\n    bool isConnected();\n    int getRssi();\n    void sendLog(const uint8_t *logMessage, size_t length);\n#if defined(NIMBLE_TWO)\n    void startAdvertising();\n#endif\n    bool isDeInit = false;\n\n  private:\n    void setupService();\n#if !defined(NIMBLE_TWO)\n    void startAdvertising();\n#endif\n};\n\nvoid setBluetoothEnable(bool enable);\nvoid clearNVS();"
  },
  {
    "path": "src/platform/esp32/ESP32CryptoEngine.cpp",
    "content": "#include \"CryptoEngine.h\"\n#include \"configuration.h\"\n\n#include \"mbedtls/aes.h\"\n\nclass ESP32CryptoEngine : public CryptoEngine\n{\n\n    mbedtls_aes_context aes;\n\n  public:\n    ESP32CryptoEngine() { mbedtls_aes_init(&aes); }\n\n    ~ESP32CryptoEngine() { mbedtls_aes_free(&aes); }\n\n    /**\n     * Encrypt a packet\n     *\n     * @param bytes is updated in place\n     *  TODO: return bool, and handle graciously when something fails\n     */\n    virtual void encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes) override\n    {\n        if (_key.length > 0) {\n            if (numBytes <= MAX_BLOCKSIZE) {\n                mbedtls_aes_setkey_enc(&aes, _key.bytes, _key.length * 8);\n                static uint8_t scratch[MAX_BLOCKSIZE];\n                uint8_t stream_block[16];\n                size_t nc_off = 0;\n                memcpy(scratch, bytes, numBytes);\n                memset(scratch + numBytes, 0,\n                       sizeof(scratch) - numBytes); // Fill rest of buffer with zero (in case cypher looks at it)\n                mbedtls_aes_crypt_ctr(&aes, numBytes, &nc_off, _nonce, stream_block, scratch, bytes);\n            } else {\n                LOG_ERROR(\"Packet too large for crypto engine: %d. noop encryption!\", numBytes);\n            }\n        }\n    }\n};\n\nCryptoEngine *crypto = new ESP32CryptoEngine();"
  },
  {
    "path": "src/platform/esp32/MeshtasticOTA.cpp",
    "content": "#include \"MeshtasticOTA.h\"\n#include \"configuration.h\"\n#ifdef ESP_PLATFORM\n#include <Preferences.h>\n#include <esp_ota_ops.h>\n#endif\n\nnamespace MeshtasticOTA\n{\n\nstatic const char *nvsNamespace = \"MeshtasticOTA\";\nstatic const char *combinedAppProjectName = \"MeshtasticOTA\";\nstatic const char *bleOnlyAppProjectName = \"MeshtasticOTA-BLE\";\nstatic const char *wifiOnlyAppProjectName = \"MeshtasticOTA-WiFi\";\n\nstatic bool updated = false;\n\nbool isUpdated()\n{\n    return updated;\n}\n\nvoid initialize()\n{\n    Preferences prefs;\n    prefs.begin(nvsNamespace);\n    if (prefs.getBool(\"updated\")) {\n        LOG_INFO(\"First boot after OTA update\");\n        updated = true;\n        prefs.putBool(\"updated\", false);\n    }\n    prefs.end();\n}\n\nvoid recoverConfig(meshtastic_Config_NetworkConfig *network)\n{\n    LOG_INFO(\"Recovering WiFi settings after OTA update\");\n\n    Preferences prefs;\n    prefs.begin(nvsNamespace, true);\n    String ssid = prefs.getString(\"ssid\");\n    String psk = prefs.getString(\"psk\");\n    prefs.end();\n\n    network->wifi_enabled = true;\n    strncpy(network->wifi_ssid, ssid.c_str(), sizeof(network->wifi_ssid));\n    strncpy(network->wifi_psk, psk.c_str(), sizeof(network->wifi_psk));\n}\n\nvoid saveConfig(meshtastic_Config_NetworkConfig *network, meshtastic_OTAMode method, uint8_t *ota_hash)\n{\n    LOG_INFO(\"Saving WiFi settings for upcoming OTA update\");\n\n    Preferences prefs;\n    prefs.begin(nvsNamespace);\n    prefs.putUChar(\"method\", method);\n    prefs.putBytes(\"ota_hash\", ota_hash, 32);\n    prefs.putString(\"ssid\", network->wifi_ssid);\n    prefs.putString(\"psk\", network->wifi_psk);\n    prefs.putBool(\"updated\", false);\n    prefs.end();\n}\n\nconst esp_partition_t *getAppPartition()\n{\n    return esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_OTA_1, NULL);\n}\n\nbool getAppDesc(const esp_partition_t *part, esp_app_desc_t *app_desc)\n{\n    if (esp_ota_get_partition_description(part, app_desc) != ESP_OK) {\n        LOG_INFO(\"esp_ota_get_partition_description failed\");\n        return false;\n    }\n    return true;\n}\n\nbool checkOTACapability(const esp_app_desc_t *app_desc, uint8_t method)\n{\n    // Combined loader supports all (both) transports, BLE and WiFi\n    if (strcmp(app_desc->project_name, combinedAppProjectName) == 0) {\n        LOG_INFO(\"OTA partition contains combined BLE/WiFi OTA Loader\");\n        return true;\n    }\n    if (method == METHOD_OTA_BLE && strcmp(app_desc->project_name, bleOnlyAppProjectName) == 0) {\n        LOG_INFO(\"OTA partition contains BLE-only OTA Loader\");\n        return true;\n    }\n    if (method == METHOD_OTA_WIFI && strcmp(app_desc->project_name, wifiOnlyAppProjectName) == 0) {\n        LOG_INFO(\"OTA partition contains WiFi-only OTA Loader\");\n        return true;\n    }\n    LOG_INFO(\"OTA partition does not contain a known OTA loader\");\n    return false;\n}\n\nbool trySwitchToOTA()\n{\n    const esp_partition_t *part = getAppPartition();\n\n    if (part == NULL) {\n        LOG_WARN(\"Unable to get app partition in preparation of OTA reboot\");\n        return false;\n    }\n\n    uint8_t result = esp_ota_set_boot_partition(part);\n    // Partition and app checks should now be done in the AdminModule before this is called\n    if (result != ESP_OK) {\n        LOG_WARN(\"Unable to switch to OTA partiton.  (Reason %d)\", result);\n        return false;\n    }\n\n    return true;\n}\n\nconst char *getVersion()\n{\n    const esp_partition_t *part = getAppPartition();\n    static esp_app_desc_t app_desc;\n    if (!getAppDesc(part, &app_desc))\n        return \"\";\n    return app_desc.version;\n}\n\n} // namespace MeshtasticOTA\n"
  },
  {
    "path": "src/platform/esp32/MeshtasticOTA.h",
    "content": "#ifndef MESHTASTICOTA_H\n#define MESHTASTICOTA_H\n\n#include \"mesh-pb-constants.h\"\n#include <Arduino.h>\n#ifdef ESP_PLATFORM\n#include <esp_ota_ops.h>\n#endif\n\n#define METHOD_OTA_BLE 1\n#define METHOD_OTA_WIFI 2\n\nnamespace MeshtasticOTA\n{\nvoid initialize();\nbool isUpdated();\nconst esp_partition_t *getAppPartition();\nbool getAppDesc(const esp_partition_t *part, esp_app_desc_t *app_desc);\nbool checkOTACapability(const esp_app_desc_t *app_desc, uint8_t method);\nvoid recoverConfig(meshtastic_Config_NetworkConfig *network);\nvoid saveConfig(meshtastic_Config_NetworkConfig *network, meshtastic_OTAMode method, uint8_t *ota_hash);\nbool trySwitchToOTA();\nconst char *getVersion();\n} // namespace MeshtasticOTA\n\n#endif // MESHTASTICOTA_H\n"
  },
  {
    "path": "src/platform/esp32/SimpleAllocator.cpp",
    "content": "#include \"SimpleAllocator.h\"\n#include \"assert.h\"\n#include \"configuration.h\"\n\nSimpleAllocator::SimpleAllocator()\n{\n    reset();\n}\n\nvoid *SimpleAllocator::alloc(size_t size)\n{\n    assert(nextFree + size <= sizeof(bytes));\n    void *res = &bytes[nextFree];\n    nextFree += size;\n    LOG_DEBUG(\"Total simple allocs %u\", nextFree);\n\n    return res;\n}\n\nvoid SimpleAllocator::reset()\n{\n    nextFree = 0;\n}\n\nvoid *operator new(size_t size, SimpleAllocator &p)\n{\n    return p.alloc(size);\n}\n"
  },
  {
    "path": "src/platform/esp32/SimpleAllocator.h",
    "content": "#pragma once\n#include <Arduino.h>\n\n#define POOL_SIZE 16384\n\n/**\n * An allocator (and placement new operator) that allocates storage from a fixed sized buffer.\n * It will panic if that buffer fills up.\n * If you are _sure_ no outstanding references to blocks in this buffer still exist, you can call\n * reset() to start from scratch.\n *\n * Currently the only usecase for this class is the ESP32 bluetooth stack, where once we've called deinit(false)\n * we are sure all those bluetooth objects no longer exist, and we'll need to recreate them when we restart bluetooth\n */\nclass SimpleAllocator\n{\n    uint8_t bytes[POOL_SIZE] = {};\n\n    uint32_t nextFree = 0;\n\n  public:\n    SimpleAllocator();\n\n    void *alloc(size_t size);\n\n    /** If you are _sure_ no outstanding references to blocks in this buffer still exist, you can call\n     * reset() to start from scratch.\n     * */\n    void reset();\n};\n\nvoid *operator new(size_t size, SimpleAllocator &p);\n\n/**\n * Temporarily makes the specified Allocator be used for _all_ allocations.  Useful when calling library routines\n * that don't know about pools\n */\nclass AllocatorScope\n{\n  public:\n    explicit AllocatorScope(SimpleAllocator &a);\n    ~AllocatorScope();\n};\n"
  },
  {
    "path": "src/platform/esp32/architecture.h",
    "content": "#pragma once\n\n#define ARCH_ESP32\n\n//\n// defaults for ESP32 architecture\n//\n\n#ifndef HAS_BLUETOOTH\n#define HAS_BLUETOOTH 1\n#endif\n#ifndef HAS_WIFI\n#define HAS_WIFI 1\n#endif\n#ifndef HAS_SCREEN\n#define HAS_SCREEN 1\n#endif\n#ifndef HAS_WIRE\n#define HAS_WIRE 1\n#endif\n#ifndef HAS_GPS\n#define HAS_GPS 1\n#endif\n#ifndef HAS_BUTTON\n#define HAS_BUTTON 1\n#endif\n#ifndef HAS_TELEMETRY\n#define HAS_TELEMETRY 1\n#endif\n#ifndef HAS_SENSOR\n#define HAS_SENSOR 1\n#endif\n#ifndef HAS_RADIO\n#define HAS_RADIO 1\n#endif\n#ifndef HAS_CPU_SHUTDOWN\n#define HAS_CPU_SHUTDOWN 1\n#endif\n#ifndef DEFAULT_VREF\n#define DEFAULT_VREF 1100\n#endif\n#ifndef HAS_CUSTOM_CRYPTO_ENGINE\n#define HAS_CUSTOM_CRYPTO_ENGINE 1\n#endif\n#ifndef HAS_32768HZ\n#define HAS_32768HZ 0\n#endif\n\n#if defined(HAS_AXP192) || defined(HAS_AXP2101)\n#define HAS_PMU\n#endif\n\n#ifdef PIN_BUTTON_TOUCH\n#define BUTTON_PIN_TOUCH PIN_BUTTON_TOUCH\n#endif\n//\n// set HW_VENDOR\n//\n\n// This string must exactly match the case used in release file names or the android updater won't work\n\n#if defined(TBEAM_V10)\n#define HW_VENDOR meshtastic_HardwareModel_TBEAM\n#elif defined(TBEAM_V07)\n#define HW_VENDOR meshtastic_HardwareModel_TBEAM_V0P7\n#elif defined(LILYGO_TBEAM_S3_CORE)\n#define HW_VENDOR meshtastic_HardwareModel_LILYGO_TBEAM_S3_CORE\n#elif defined(DIY_V1)\n#define HW_VENDOR meshtastic_HardwareModel_DIY_V1\n#elif defined(RAK_11200)\n#define HW_VENDOR meshtastic_HardwareModel_RAK11200\n#elif defined(ARDUINO_HELTEC_WIFI_LORA_32_V2)\n#ifdef HELTEC_V2_0\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_V2_0\n#endif\n#ifdef HELTEC_V2_1\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_V2_1\n#endif\n#elif defined(HELTEC_WIRELESS_BRIDGE)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_BRIDGE\n#elif defined(ARDUINO_HELTEC_WIFI_LORA_32)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_V1\n#elif defined(TLORA_V1)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_V1\n#elif defined(TLORA_V2)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_V2\n#elif defined(TLORA_V1_3)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_V1_1P3\n#elif defined(TLORA_V2_1_16)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_V2_1_1P6\n#elif defined(TLORA_V2_1_18)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_V2_1_1P8\n#elif defined(TLORA_C6)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_C6\n#elif defined(T_DECK)\n#define HW_VENDOR meshtastic_HardwareModel_T_DECK\n#elif defined(T_WATCH_S3)\n#define HW_VENDOR meshtastic_HardwareModel_T_WATCH_S3\n#elif defined(GENIEBLOCKS)\n#define HW_VENDOR meshtastic_HardwareModel_GENIEBLOCKS\n#elif defined(NANO_G1)\n#define HW_VENDOR meshtastic_HardwareModel_NANO_G1\n#elif defined(M5STACK)\n#define HW_VENDOR meshtastic_HardwareModel_M5STACK\n#elif defined(M5STACK_CORES3)\n#define HW_VENDOR meshtastic_HardwareModel_M5STACK_CORES3\n#elif defined(STATION_G1)\n#define HW_VENDOR meshtastic_HardwareModel_STATION_G1\n#elif defined(DR_DEV)\n#define HW_VENDOR meshtastic_HardwareModel_DR_DEV\n#elif defined(HELTEC_HRU_3601)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_HRU_3601\n#elif defined(HELTEC_V3)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_V3\n#elif defined(HELTEC_WSL_V3)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WSL_V3\n#elif defined(HELTEC_WIRELESS_TRACKER)\n#ifdef HELTEC_TRACKER_V1_0\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER_V1_0\n#else\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER\n#endif\n#elif defined(HELTEC_WIRELESS_PAPER_V1_0)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_PAPER_V1_0\n#elif defined(HELTEC_WIRELESS_PAPER)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_PAPER\n#elif defined(TLORA_T3S3_V1)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_T3_S3\n#elif defined(TLORA_T3S3_EPAPER)\n#define HW_VENDOR meshtastic_HardwareModel_TLORA_T3_S3\n#elif defined(CDEBYTE_EORA_S3)\n#define HW_VENDOR meshtastic_HardwareModel_CDEBYTE_EORA_S3\n#elif defined(BETAFPV_2400_TX)\n#define HW_VENDOR meshtastic_HardwareModel_BETAFPV_2400_TX\n#elif defined(NANO_G1_EXPLORER)\n#define HW_VENDOR meshtastic_HardwareModel_NANO_G1_EXPLORER\n#elif defined(BETAFPV_900_TX_NANO)\n#define HW_VENDOR meshtastic_HardwareModel_BETAFPV_900_NANO_TX\n#elif defined(PICOMPUTER_S3)\n#define HW_VENDOR meshtastic_HardwareModel_PICOMPUTER_S3\n#elif defined(HELTEC_HT62)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_HT62\n#elif defined(EBYTE_ESP32_S3)\n#define HW_VENDOR meshtastic_HardwareModel_EBYTE_ESP32_S3\n#elif defined(ELECROW_ThinkNode_M2)\n#define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M2\n#elif defined(ELECROW_ThinkNode_M5)\n#define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M5\n#elif defined(ESP32_S3_PICO)\n#define HW_VENDOR meshtastic_HardwareModel_ESP32_S3_PICO\n#elif defined(SENSELORA_S3)\n#define HW_VENDOR meshtastic_HardwareModel_SENSELORA_S3\n#elif defined(HELTEC_HT62)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_HT62\n#elif defined(CHATTER_2)\n#define HW_VENDOR meshtastic_HardwareModel_CHATTER_2\n#elif defined(STATION_G2)\n#define HW_VENDOR meshtastic_HardwareModel_STATION_G2\n#elif defined(UNPHONE)\n#define HW_VENDOR meshtastic_HardwareModel_UNPHONE\n#elif defined(WIPHONE)\n#define HW_VENDOR meshtastic_HardwareModel_WIPHONE\n#elif defined(RADIOMASTER_900_BANDIT_NANO)\n#define HW_VENDOR meshtastic_HardwareModel_RADIOMASTER_900_BANDIT_NANO\n#elif defined(RADIOMASTER_900_BANDIT)\n#define HW_VENDOR meshtastic_HardwareModel_RADIOMASTER_900_BANDIT\n#elif defined(HELTEC_CAPSULE_SENSOR_V3)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_CAPSULE_SENSOR_V3\n#elif defined(HELTEC_VISION_MASTER_T190)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_VISION_MASTER_T190\n#elif defined(HELTEC_VISION_MASTER_E213)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_VISION_MASTER_E213\n#elif defined(HELTEC_VISION_MASTER_E290)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_VISION_MASTER_E290\n#elif defined(SENSECAP_INDICATOR)\n#define HW_VENDOR meshtastic_HardwareModel_SENSECAP_INDICATOR\n#elif defined(SEEED_XIAO_S3)\n#define HW_VENDOR meshtastic_HardwareModel_SEEED_XIAO_S3\n#elif defined(MESH_TAB)\n#define HW_VENDOR meshtastic_HardwareModel_MESH_TAB\n#elif defined(T_ETH_ELITE)\n#define HW_VENDOR meshtastic_HardwareModel_T_ETH_ELITE\n#elif defined(HELTEC_SENSOR_HUB)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_SENSOR_HUB\n#elif defined(ELECROW_PANEL)\n#define HW_VENDOR meshtastic_HardwareModel_CROWPANEL\n#elif defined(RAK3312)\n#define HW_VENDOR meshtastic_HardwareModel_RAK3312\n#elif defined(RAK_WISMESH_TAP_V2)\n#define HW_VENDOR meshtastic_HardwareModel_WISMESH_TAP_V2\n#elif defined(LINK_32)\n#define HW_VENDOR meshtastic_HardwareModel_LINK_32\n#elif defined(T_DECK_PRO)\n#define HW_VENDOR meshtastic_HardwareModel_T_DECK_PRO\n#elif defined(T_BEAM_1W)\n#define HW_VENDOR meshtastic_HardwareModel_TBEAM_1_WATT\n#elif defined(T_LORA_PAGER)\n#define HW_VENDOR meshtastic_HardwareModel_T_LORA_PAGER\n#elif defined(HELTEC_V4)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_V4\n#elif defined(M5STACK_UNITC6L)\n#define HW_VENDOR meshtastic_HardwareModel_M5STACK_C6L\n#elif defined(HELTEC_WIRELESS_TRACKER_V2)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER_V2\n#elif defined(M5STACK_CARDPUTER_ADV)\n#define HW_VENDOR meshtastic_HardwareModel_M5STACK_CARDPUTER_ADV\n#else\n#define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW\n#endif\n\n// -----------------------------------------------------------------------------\n// LoRa SPI\n// -----------------------------------------------------------------------------\n\n// If an SPI-related pin used by the LoRa module isn't defined, use the conventional pin number for it.\n// FIXME: these pins should really be defined in each variant.h file to prevent breakages if the defaults change, currently many\n// ESP32 variants don't define these pins in their variant.h file.\n#ifndef LORA_SCK\n#define LORA_SCK 5\n#endif\n#ifndef LORA_MISO\n#define LORA_MISO 19\n#endif\n#ifndef LORA_MOSI\n#define LORA_MOSI 27\n#endif\n#ifndef LORA_CS\n#define LORA_CS 18\n#endif\n\n#define SERIAL0_RX_GPIO 3 // Always GPIO3 on ESP32 // FIXME: may be different on ESP32-S3, etc.\n\n// Setup flag, which indicates if our device supports power management\n#ifdef CONFIG_PM_ENABLE\n#define HAS_ESP32_PM_SUPPORT 1\n#endif\n\n// Setup flag, which indicates if our device supports dynamic light sleep\n#if defined(HAS_ESP32_PM_SUPPORT) && defined(CONFIG_FREERTOS_USE_TICKLESS_IDLE)\n#define HAS_ESP32_DYNAMIC_LIGHT_SLEEP 1\n#endif"
  },
  {
    "path": "src/platform/esp32/iram-quirk.c",
    "content": "// Free up some precious space in the iram0_0_seg memory segment\n\n#include <stdint.h>\n\n#include <esp_attr.h>\n#include <esp_flash.h>\n#include <spi_flash_chip_driver.h>\n\n#define IRAM_SECTION section(\".iram1.stub\")\n\nIRAM_ATTR esp_err_t stub_probe(esp_flash_t *chip, uint32_t flash_id)\n{\n    return ESP_ERR_NOT_FOUND;\n}\n\nconst spi_flash_chip_t stub_flash_chip __attribute__((IRAM_SECTION)) = {\n    .name = \"stub\",\n    .probe = stub_probe,\n};\n\nextern const spi_flash_chip_t __wrap_esp_flash_chip_gd __attribute__((IRAM_SECTION, alias(\"stub_flash_chip\")));\nextern const spi_flash_chip_t __wrap_esp_flash_chip_issi __attribute__((IRAM_SECTION, alias(\"stub_flash_chip\")));\nextern const spi_flash_chip_t __wrap_esp_flash_chip_winbond __attribute__((IRAM_SECTION, alias(\"stub_flash_chip\")));\n"
  },
  {
    "path": "src/platform/esp32/main-esp32.cpp",
    "content": "#include \"PowerFSM.h\"\n#include \"PowerMon.h\"\n#include \"configuration.h\"\n#include \"esp_task_wdt.h\"\n#include \"main.h\"\n\n#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH\n#include \"nimble/NimbleBluetooth.h\"\n#endif\n\n#include <MeshtasticOTA.h>\n\n#if HAS_WIFI\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n\n#include \"esp_mac.h\"\n#include \"meshUtils.h\"\n#include \"sleep.h\"\n#include \"soc/rtc.h\"\n#include \"target_specific.h\"\n#include <Preferences.h>\n#include <driver/rtc_io.h>\n#include <nvs.h>\n#include <nvs_flash.h>\n\n// Weak empty variant shutdown prep function.\n// May be redefined by variant files.\nvoid variant_shutdown() __attribute__((weak));\nvoid variant_shutdown() {}\n\n#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH\nvoid setBluetoothEnable(bool enable)\n{\n#ifdef USE_WS5500\n    if ((config.bluetooth.enabled == true) && (config.network.wifi_enabled == false))\n#elif HAS_WIFI\n    if (!isWifiAvailable() && config.bluetooth.enabled == true)\n#else\n    if (config.bluetooth.enabled == true)\n#endif\n    {\n        if (!nimbleBluetooth) {\n            nimbleBluetooth = new NimbleBluetooth();\n        }\n        if (enable && !nimbleBluetooth->isActive()) {\n            powerMon->setState(meshtastic_PowerMon_State_BT_On);\n            nimbleBluetooth->setup();\n        }\n        // For ESP32, no way to recover from bluetooth shutdown without reboot\n        // BLE advertising automatically stops when MCU enters light-sleep(?)\n        // For deep-sleep, shutdown hardware with nimbleBluetooth->deinit(). Requires reboot to reverse\n    }\n}\n#else\nvoid setBluetoothEnable(bool enable) {}\nvoid updateBatteryLevel(uint8_t level) {}\n#endif\n\nvoid getMacAddr(uint8_t *dmac)\n{\n#if defined(CONFIG_IDF_TARGET_ESP32C6) && defined(CONFIG_SOC_IEEE802154_SUPPORTED)\n    auto res = esp_base_mac_addr_get(dmac);\n    assert(res == ESP_OK);\n#else\n    auto res = esp_efuse_mac_get_default(dmac);\n    assert(res == ESP_OK);\n#endif\n}\n\n#if HAS_32768HZ\n#define CALIBRATE_ONE(cali_clk) calibrate_one(cali_clk, #cali_clk)\n\nstatic uint32_t calibrate_one(rtc_cal_sel_t cal_clk, const char *name)\n{\n    const uint32_t cal_count = 1000;\n    // const float factor = (1 << 19) * 1000.0f; unused var?\n    uint32_t cali_val;\n    for (int i = 0; i < 5; ++i) {\n        cali_val = rtc_clk_cal(cal_clk, cal_count);\n    }\n    return cali_val;\n}\n\nvoid enableSlowCLK()\n{\n    rtc_clk_32k_enable(true);\n\n    CALIBRATE_ONE(RTC_CAL_RTC_MUX);\n    uint32_t cal_32k = CALIBRATE_ONE(RTC_CAL_32K_XTAL);\n\n    if (cal_32k == 0) {\n        LOG_DEBUG(\"32k XTAL OSC has not started up\");\n    } else {\n        rtc_clk_slow_freq_set(RTC_SLOW_FREQ_32K_XTAL);\n        LOG_DEBUG(\"Switch RTC Source to 32.768kHz succeeded, using 32k XTAL\");\n        CALIBRATE_ONE(RTC_CAL_RTC_MUX);\n        CALIBRATE_ONE(RTC_CAL_32K_XTAL);\n    }\n    CALIBRATE_ONE(RTC_CAL_RTC_MUX);\n    CALIBRATE_ONE(RTC_CAL_32K_XTAL);\n    if (rtc_clk_slow_freq_get() != RTC_SLOW_FREQ_32K_XTAL) {\n        LOG_WARN(\"Failed to switch 32K XTAL RTC source to 32.768kHz !!! \");\n        return;\n    }\n}\n#endif\n\nvoid esp32Setup()\n{\n    /* We explicitly don't want to do call randomSeed,\n    // as that triggers the esp32 core to use a less secure pseudorandom function.\n    uint32_t seed = esp_random();\n    LOG_DEBUG(\"Set random seed %u\", seed);\n    randomSeed(seed);\n    */\n\n#ifdef ADC_V\n    pinMode(ADC_V, INPUT);\n#endif\n\n    LOG_DEBUG(\"Total heap: %d\", ESP.getHeapSize());\n    LOG_DEBUG(\"Free heap: %d\", ESP.getFreeHeap());\n    LOG_DEBUG(\"Total PSRAM: %d\", ESP.getPsramSize());\n    LOG_DEBUG(\"Free PSRAM: %d\", ESP.getFreePsram());\n\n    nvs_stats_t nvs_stats;\n    auto res = nvs_get_stats(NULL, &nvs_stats);\n    assert(res == ESP_OK);\n    LOG_DEBUG(\"NVS: UsedEntries %d, FreeEntries %d, AllEntries %d, NameSpaces %d\", nvs_stats.used_entries, nvs_stats.free_entries,\n              nvs_stats.total_entries, nvs_stats.namespace_count);\n\n    LOG_DEBUG(\"Setup Preferences in Flash Storage\");\n\n    // Create object to store our persistent data\n    Preferences preferences;\n    preferences.begin(\"meshtastic\", false);\n\n    uint32_t rebootCounter = preferences.getUInt(\"rebootCounter\", 0);\n    rebootCounter++;\n    preferences.putUInt(\"rebootCounter\", rebootCounter);\n    // store firmware version and hwrevision for access from OTA firmware\n    String fwrev = preferences.getString(\"firmwareVersion\", \"\");\n    if (fwrev.compareTo(optstr(APP_VERSION)) != 0)\n        preferences.putString(\"firmwareVersion\", optstr(APP_VERSION));\n    uint8_t hwven = preferences.getUInt(\"hwVendor\", 0);\n    if (hwven != HW_VENDOR)\n        preferences.putUInt(\"hwVendor\", HW_VENDOR);\n    preferences.end();\n    LOG_DEBUG(\"Number of Device Reboots: %d\", rebootCounter);\n#if !MESHTASTIC_EXCLUDE_WIFI\n    String version = MeshtasticOTA::getVersion();\n    if (version.isEmpty()) {\n        LOG_INFO(\"MeshtasticOTA firmware not available\");\n    } else {\n        LOG_INFO(\"MeshtasticOTA firmware version %s\", version.c_str());\n    }\n    MeshtasticOTA::initialize();\n#endif\n\n    // enableModemSleep();\n\n// Since we are turning on watchdogs rather late in the release schedule, we really don't want to catch any\n// false positives.  The wait-to-sleep timeout for shutting down radios is 30 secs, so pick 45 for now.\n// #define APP_WATCHDOG_SECS 45\n#define APP_WATCHDOG_SECS 90\n\n#ifdef CONFIG_IDF_TARGET_ESP32C6\n    esp_task_wdt_config_t *wdt_config = (esp_task_wdt_config_t *)malloc(sizeof(esp_task_wdt_config_t));\n    wdt_config->timeout_ms = APP_WATCHDOG_SECS * 1000;\n    wdt_config->trigger_panic = true;\n    res = esp_task_wdt_init(wdt_config);\n    assert(res == ESP_OK);\n#else\n    res = esp_task_wdt_init(APP_WATCHDOG_SECS, true);\n    assert(res == ESP_OK);\n#endif\n    res = esp_task_wdt_add(NULL);\n    assert(res == ESP_OK);\n\n#if HAS_32768HZ\n    enableSlowCLK();\n#endif\n}\n\n/// loop code specific to ESP32 targets\nvoid esp32Loop()\n{\n    esp_task_wdt_reset(); // service our app level watchdog\n\n    // for debug printing\n    // radio.radioIf.canSleep();\n}\n\nvoid cpuDeepSleep(uint32_t msecToWake)\n{\n    /*\n    Some ESP32 IOs have internal pullups or pulldowns, which are enabled by default.\n    If an external circuit drives this pin in deep sleep mode, current consumption may\n    increase due to current flowing through these pullups and pulldowns.\n\n    To isolate a pin, preventing extra current draw, call rtc_gpio_isolate() function.\n    For example, on ESP32-WROVER module, GPIO12 is pulled up externally.\n    GPIO12 also has an internal pulldown in the ESP32 chip. This means that in deep sleep,\n    some current will flow through these external and internal resistors, increasing deep\n    sleep current above the minimal possible value.\n\n    Note: we don't isolate pins that are used for the LORA, LED, i2c, or ST7735 Display for the Chatter2, spi or the wake\n    button(s), maybe we should not include any other GPIOs...\n    */\n#if SOC_RTCIO_HOLD_SUPPORTED\n    static const uint8_t rtcGpios[] = {\n#ifndef HELTEC_VISION_MASTER_E213\n        // For this variant, >20mA leaks through the display if pin 2 held\n        // Todo: check if it's safe to remove this pin for all variants\n        2,\n#endif\n#ifndef USE_JTAG\n        13,\n#endif\n        34, 35, 37};\n\n    for (int i = 0; i < sizeof(rtcGpios); i++)\n        rtc_gpio_isolate((gpio_num_t)rtcGpios[i]);\n#endif\n\n        // FIXME, disable internal rtc pullups/pulldowns on the non isolated pins. for inputs that we aren't using\n        // to detect wake and in normal operation the external part drives them hard.\n#ifdef BUTTON_PIN\n        // Only GPIOs which are have RTC functionality can be used in this bit map: 0,2,4,12-15,25-27,32-39.\n#if SOC_RTCIO_HOLD_SUPPORTED && SOC_PM_SUPPORT_EXT_WAKEUP\n    uint64_t gpioMask = (1ULL << (config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN));\n#endif\n\n#ifdef BUTTON_NEED_PULLUP\n    gpio_pullup_en((gpio_num_t)BUTTON_PIN);\n#endif\n\n    // Not needed because both of the current boards have external pullups\n    // FIXME change polarity in hw so we can wake on ANY_HIGH instead - that would allow us to use all three buttons (instead\n    // of just the first) gpio_pullup_en((gpio_num_t)BUTTON_PIN);\n\n#ifdef ESP32S3_WAKE_TYPE\n    esp_sleep_enable_ext1_wakeup(gpioMask, ESP32S3_WAKE_TYPE);\n#else\n#if SOC_PM_SUPPORT_EXT_WAKEUP\n#ifdef CONFIG_IDF_TARGET_ESP32\n    // ESP_EXT1_WAKEUP_ALL_LOW has been deprecated since esp-idf v5.4 for any other target.\n    esp_sleep_enable_ext1_wakeup(gpioMask, ESP_EXT1_WAKEUP_ALL_LOW);\n#else\n    esp_sleep_enable_ext1_wakeup(gpioMask, ESP_EXT1_WAKEUP_ANY_LOW);\n#endif\n#endif\n\n#endif // #end ESP32S3_WAKE_TYPE\n#endif\n    variant_shutdown();\n\n    // We want RTC peripherals to stay on\n    esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);\n\n    esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs\n    esp_deep_sleep_start();                              // TBD mA sleep current (battery)\n}\n"
  },
  {
    "path": "src/platform/extra_variants/README.md",
    "content": "# About extra_variants\n\nThis directory tree is designed to solve two problems.\n\n- The ESP32 arduino/platformio project doesn't support the nice \"if initVariant() is found, call that after init\" behavior of the nrf52 builds (they use initVariant() internally).\n- Over the years a lot of 'board specific' init code has been added to init() in main.cpp. It would be great to have a general/clean mechanism to allow developers to specify board specific/unique code in a clean fashion without mucking in main.\n\nSo we are borrowing the initVariant() ideas here (by using weak gcc references). You can now define earlyInitVariant() and lateInitVariant() if your board needs them. earlyInitVariant() runs at the beginning of setup() directly after waitUntilPowerLevelSafe(); while lateInitVariant() runs after the LoRa radio is initialized.\n\nIf you'd like a board specific variant to be run, add the variant.cpp file to an appropriately named\nsubdirectory and check for \\_VARIANT_boardname in the cpp file (so that your code is only built for your board).\nYou'll need to define \\_VARIANT_boardname in your corresponding variant.h file.\nSee existing boards for examples.\n\nThis approach has no added runtime cost.\n"
  },
  {
    "path": "src/platform/extra_variants/heltec_wireless_tracker/variant.cpp",
    "content": "#include \"configuration.h\"\n\n#ifdef _VARIANT_HELTEC_WIRELESS_TRACKER\n\n#include \"GPS.h\"\n#include \"GpioLogic.h\"\n#include \"graphics/TFTDisplay.h\"\n\n// Heltec tracker specific init\nvoid lateInitVariant()\n{\n    // LOG_DEBUG(\"Heltec tracker initVariant\");\n\n#ifndef MESHTASTIC_EXCLUDE_GPS\n    GpioVirtPin *virtGpsEnable = gps ? gps->enablePin : new GpioVirtPin();\n#else\n    GpioVirtPin *virtGpsEnable = new GpioVirtPin();\n#endif\n\n#ifndef MESHTASTIC_EXCLUDE_SCREEN\n    // On this board we are actually using the backlightEnable signal to already be controlling a physical enable to the\n    // display controller.  But we'd _ALSO_ like to have that signal drive a virtual GPIO.  So nest it as needed.\n    GpioVirtPin *virtScreenEnable = new GpioVirtPin();\n    if (TFTDisplay::backlightEnable) {\n        GpioPin *physScreenEnable = TFTDisplay::backlightEnable;\n        GpioPin *splitter = new GpioSplitter(virtScreenEnable, physScreenEnable);\n        TFTDisplay::backlightEnable = splitter;\n\n        // Assume screen is initially powered\n        splitter->set(true);\n    }\n#endif\n\n#if defined(VEXT_ENABLE) && (!defined(MESHTASTIC_EXCLUDE_GPS) || !defined(MESHTASTIC_EXCLUDE_SCREEN))\n    // If either the GPS or the screen is on, turn on the external power regulator\n    GpioPin *hwEnable = new GpioHwPin(VEXT_ENABLE);\n    new GpioBinaryTransformer(virtGpsEnable, virtScreenEnable, hwEnable, GpioBinaryTransformer::Or);\n#endif\n}\n\n#endif"
  },
  {
    "path": "src/platform/extra_variants/t_deck_pro/variant.cpp",
    "content": "#include \"configuration.h\"\n\n#ifdef T_DECK_PRO\n\n#include \"input/TouchScreenImpl1.h\"\n#include <CSE_CST328.h>\n#include <Wire.h>\n\nCSE_CST328 tsPanel = CSE_CST328(EINK_WIDTH, EINK_HEIGHT, &Wire, CST328_PIN_RST, CST328_PIN_INT);\n\nbool readTouch(int16_t *x, int16_t *y)\n{\n    if (tsPanel.getTouches()) {\n        *x = tsPanel.getPoint(0).x;\n        *y = tsPanel.getPoint(0).y;\n        return true;\n    }\n    return false;\n}\n\n// T-Deck Pro specific init\nvoid lateInitVariant()\n{\n    tsPanel.begin();\n    touchScreenImpl1 = new TouchScreenImpl1(EINK_WIDTH, EINK_HEIGHT, readTouch);\n    touchScreenImpl1->init();\n}\n#endif"
  },
  {
    "path": "src/platform/extra_variants/t_lora_pager/variant.cpp",
    "content": "#include \"configuration.h\"\n\n#ifdef T_LORA_PAGER\n\n#include \"AudioBoard.h\"\n\nDriverPins PinsAudioBoardES8311;\nAudioBoard board(AudioDriverES8311, PinsAudioBoardES8311);\n\n// TLora Pager specific init\nvoid lateInitVariant()\n{\n    // AudioDriverLogger.begin(Serial, AudioDriverLogLevel::Debug);\n    // I2C: function, scl, sda\n    PinsAudioBoardES8311.addI2C(PinFunction::CODEC, Wire);\n    // I2S: function, mclk, bck, ws, data_out, data_in\n    PinsAudioBoardES8311.addI2S(PinFunction::CODEC, DAC_I2S_MCLK, DAC_I2S_BCK, DAC_I2S_WS, DAC_I2S_DOUT, DAC_I2S_DIN);\n\n    // configure codec\n    CodecConfig cfg;\n    cfg.input_device = ADC_INPUT_LINE1;\n    cfg.output_device = DAC_OUTPUT_ALL;\n    cfg.i2s.bits = BIT_LENGTH_16BITS;\n    cfg.i2s.rate = RATE_44K;\n    board.begin(cfg);\n}\n#endif"
  },
  {
    "path": "src/platform/extra_variants/tbeam_displayshield/variant.cpp",
    "content": "#include \"configuration.h\"\n\n#ifdef HAS_CST226SE\n\n#include \"TouchDrvCSTXXX.hpp\"\n#include \"input/TouchScreenImpl1.h\"\n#include <Wire.h>\n\nTouchDrvCSTXXX tsPanel;\nstatic constexpr uint8_t PossibleAddresses[2] = {CST328_ADDR, CST226SE_ADDR_ALT};\nuint8_t i2cAddress = 0;\n\nbool readTouch(int16_t *x, int16_t *y)\n{\n    int16_t x_array[1], y_array[1];\n    uint8_t touched = tsPanel.getPoint(x_array, y_array, 1);\n    if (touched > 0) {\n        *y = x_array[0];\n        *x = (TFT_WIDTH - y_array[0]);\n        // Check bounds\n        if (*x < 0 || *x >= TFT_WIDTH || *y < 0 || *y >= TFT_HEIGHT) {\n            return false;\n        }\n        return true; // Valid touch detected\n    }\n    return false; // No valid touch data\n}\n\nvoid lateInitVariant()\n{\n    tsPanel.setTouchDrvModel(TouchDrv_CST226);\n    for (uint8_t addr : PossibleAddresses) {\n        if (tsPanel.begin(Wire, addr, I2C_SDA, I2C_SCL)) {\n            i2cAddress = addr;\n            LOG_DEBUG(\"CST226SE init OK at address 0x%02X\", addr);\n            touchScreenImpl1 = new TouchScreenImpl1(TFT_WIDTH, TFT_HEIGHT, readTouch);\n            touchScreenImpl1->init();\n            return;\n        }\n    }\n    LOG_ERROR(\"CST226SE init failed at all known addresses\");\n}\n#endif\n"
  },
  {
    "path": "src/platform/nrf52/AsyncUDP.cpp",
    "content": "#include \"AsyncUDP.h\"\n\n#if HAS_ETHERNET\n\nAsyncUDP::AsyncUDP() : OSThread(\"AsyncUDP\"), localPort(0) {}\n\nbool AsyncUDP::listenMulticast(IPAddress multicastIP, uint16_t port, uint8_t ttl)\n{\n    if (!isMulticast(multicastIP))\n        return false;\n    localPort = port;\n    udp.beginMulticast(multicastIP, port);\n    return true;\n}\n\nsize_t AsyncUDP::write(uint8_t b)\n{\n    return udp.write(&b, 1);\n}\n\nsize_t AsyncUDP::write(const uint8_t *data, size_t len)\n{\n    return udp.write(data, len);\n}\n\nvoid AsyncUDP::onPacket(const std::function<void(AsyncUDPPacket)> &callback)\n{\n    _onPacket = callback;\n}\n\nbool AsyncUDP::writeTo(const uint8_t *data, size_t len, IPAddress ip, uint16_t port)\n{\n    if (!udp.beginPacket(ip, port))\n        return false;\n    udp.write(data, len);\n    isSending = true;\n    bool ok = udp.endPacket();\n    isSending = false;\n    return ok;\n}\n\nvoid AsyncUDP::close()\n{\n    udp.stop();\n    localPort = 0;\n    _onPacket = nullptr;\n}\n\n// AsyncUDPPacket\nAsyncUDPPacket::AsyncUDPPacket(EthernetUDP &source) : _udp(source), _remoteIP(source.remoteIP()), _remotePort(source.remotePort())\n{\n    if (_udp.available() > 0) {\n        _readLength = _udp.read(_buffer, sizeof(_buffer));\n    } else {\n        _readLength = 0;\n    }\n}\n\nIPAddress AsyncUDPPacket::remoteIP()\n{\n    return _remoteIP;\n}\n\nuint16_t AsyncUDPPacket::length()\n{\n    return _readLength;\n}\n\nconst uint8_t *AsyncUDPPacket::data()\n{\n    return _buffer;\n}\n\nint32_t AsyncUDP::runOnce()\n{\n    if (_onPacket && !isSending && udp.parsePacket() > 0) {\n        AsyncUDPPacket packet(udp);\n        _onPacket(packet);\n    }\n    return 5; // check every 5ms\n}\n\n#endif // HAS_ETHERNET"
  },
  {
    "path": "src/platform/nrf52/AsyncUDP.h",
    "content": "#ifndef ASYNC_UDP_H\n#define ASYNC_UDP_H\n\n#include \"configuration.h\"\n\n#if HAS_ETHERNET\n\n#include \"concurrency/OSThread.h\"\n#include <IPAddress.h>\n#include <Print.h>\n#include <RAK13800_W5100S.h>\n#include <cstdint>\n#include <functional>\n\nclass AsyncUDPPacket;\n\nclass AsyncUDP : public Print, private concurrency::OSThread\n{\n  public:\n    AsyncUDP();\n    explicit operator bool() const { return localPort != 0; }\n\n    bool listenMulticast(IPAddress multicastIP, uint16_t port, uint8_t ttl = 64);\n    bool writeTo(const uint8_t *data, size_t len, IPAddress ip, uint16_t port);\n    void close();\n\n    size_t write(uint8_t b) override;\n    size_t write(const uint8_t *data, size_t len) override;\n    void onPacket(const std::function<void(AsyncUDPPacket)> &callback);\n\n  private:\n    EthernetUDP udp;\n    uint16_t localPort;\n    volatile bool isSending = false;\n    std::function<void(AsyncUDPPacket)> _onPacket;\n    virtual int32_t runOnce() override;\n};\n\nclass AsyncUDPPacket\n{\n  public:\n    explicit AsyncUDPPacket(EthernetUDP &source);\n\n    IPAddress remoteIP();\n    uint16_t length();\n    const uint8_t *data();\n\n  private:\n    EthernetUDP &_udp;\n    IPAddress _remoteIP;\n    uint16_t _remotePort;\n    size_t _readLength = 0;\n\n    static constexpr size_t BUF_SIZE = 512;\n    uint8_t _buffer[BUF_SIZE];\n};\n\ninline bool isMulticast(const IPAddress &ip)\n{\n    return (ip[0] & 0xF0) == 0xE0;\n}\n\n#endif // HAS_ETHERNET\n\n#endif // ASYNC_UDP_H\n"
  },
  {
    "path": "src/platform/nrf52/BLEDfuSecure.cpp",
    "content": "/**************************************************************************/\n/*!\n    @file     BLEDfuSecure.cpp\n    @author   hathach (tinyusb.org)\n\n    @section LICENSE\n\n    Software License Agreement (BSD License)\n\n    Copyright (c) 2018, Adafruit Industries (adafruit.com)\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n    1. Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the\n    documentation and/or other materials provided with the distribution.\n    3. Neither the name of the copyright holders nor the\n    names of its contributors may be used to endorse or promote products\n    derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY\n    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/**************************************************************************/\n\n#include \"BLEDfuSecure.h\"\n#include \"bluefruit.h\"\n\n#define DFU_REV_APPMODE 0x0001\n\nconst uint16_t UUID16_SVC_DFU_OTA = 0xFE59;\n\nconst uint8_t UUID128_CHR_DFU_CONTROL[16] = {0x50, 0xEA, 0xDA, 0x30, 0x88, 0x83, 0xB8, 0x9F,\n                                             0x60, 0x4F, 0x15, 0xF3, 0x03, 0x00, 0xC9, 0x8E};\n\nextern \"C\" void bootloader_util_app_start(uint32_t start_addr);\n\nstatic uint16_t crc16(const uint8_t *data_p, uint8_t length)\n{\n    uint16_t crc = 0xFFFF;\n\n    while (length--) {\n        uint8_t x = crc >> 8 ^ *data_p++;\n        x ^= x >> 4;\n        crc = (crc << 8) ^ ((uint16_t)(x << 12)) ^ ((uint16_t)(x << 5)) ^ ((uint16_t)x);\n    }\n    return crc;\n}\n\nstatic void bledfu_control_wr_authorize_cb(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_evt_write_t *request)\n{\n    if ((request->handle == chr->handles().value_handle) && (request->op != BLE_GATTS_OP_PREP_WRITE_REQ) &&\n        (request->op != BLE_GATTS_OP_EXEC_WRITE_REQ_NOW) && (request->op != BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL)) {\n        BLEConnection *conn = Bluefruit.Connection(conn_hdl);\n\n        ble_gatts_rw_authorize_reply_params_t reply = {.type = BLE_GATTS_AUTHORIZE_TYPE_WRITE};\n\n        if (!chr->indicateEnabled(conn_hdl)) {\n            reply.params.write.gatt_status = BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR;\n            sd_ble_gatts_rw_authorize_reply(conn_hdl, &reply);\n            return;\n        }\n\n        reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS;\n        sd_ble_gatts_rw_authorize_reply(conn_hdl, &reply);\n\n        enum { START_DFU = 1 };\n        if (request->data[0] == START_DFU) {\n            // Peer data information so that bootloader could re-connect after reboot\n            typedef struct {\n                ble_gap_addr_t addr;\n                ble_gap_irk_t irk;\n                ble_gap_enc_key_t enc_key;\n                uint8_t sys_attr[8];\n                uint16_t crc16;\n            } peer_data_t;\n\n            VERIFY_STATIC(offsetof(peer_data_t, crc16) == 60);\n\n            /* Save Peer data\n             * Peer data address is defined in bootloader linker @0x20007F80\n             * - If bonded : save Security information\n             * - Otherwise : save Address for direct advertising\n             *\n             * TODO may force bonded only for security reason\n             */\n            peer_data_t *peer_data = (peer_data_t *)(0x20007F80UL);\n            varclr(peer_data);\n\n            // Get CCCD\n            uint16_t sysattr_len = sizeof(peer_data->sys_attr);\n            sd_ble_gatts_sys_attr_get(conn_hdl, peer_data->sys_attr, &sysattr_len, BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS);\n\n            // Get Bond Data or using Address if not bonded\n            peer_data->addr = conn->getPeerAddr();\n\n            if (conn->secured()) {\n                bond_keys_t bkeys;\n                if (conn->loadBondKey(&bkeys)) {\n                    peer_data->addr = bkeys.peer_id.id_addr_info;\n                    peer_data->irk = bkeys.peer_id.id_info;\n                    peer_data->enc_key = bkeys.own_enc;\n                }\n            }\n\n            // Calculate crc\n            peer_data->crc16 = crc16((uint8_t *)peer_data, offsetof(peer_data_t, crc16));\n\n            // Initiate DFU Sequence and reboot into DFU OTA mode\n            Bluefruit.Advertising.restartOnDisconnect(false);\n            conn->disconnect();\n\n            NRF_POWER->GPREGRET = 0xB1;\n            NVIC_SystemReset();\n        }\n    }\n}\n\nBLEDfuSecure::BLEDfuSecure(void) : BLEService(UUID16_SVC_DFU_OTA), _chr_control(UUID128_CHR_DFU_CONTROL) {}\n\nerr_t BLEDfuSecure::begin(void)\n{\n    // Invoke base class begin()\n    VERIFY_STATUS(BLEService::begin());\n\n    _chr_control.setProperties(CHR_PROPS_WRITE | CHR_PROPS_INDICATE);\n    _chr_control.setMaxLen(23);\n    _chr_control.setWriteAuthorizeCallback(bledfu_control_wr_authorize_cb);\n    VERIFY_STATUS(_chr_control.begin());\n\n    return ERROR_NONE;\n}\n"
  },
  {
    "path": "src/platform/nrf52/BLEDfuSecure.h",
    "content": "/**************************************************************************/\n/*!\n    @file     BLEDfuSecure.h\n    @author   hathach (tinyusb.org)\n\n    @section LICENSE\n\n    Software License Agreement (BSD License)\n\n    Copyright (c) 2018, Adafruit Industries (adafruit.com)\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n    1. Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n    2. Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the\n    documentation and/or other materials provided with the distribution.\n    3. Neither the name of the copyright holders nor the\n    names of its contributors may be used to endorse or promote products\n    derived from this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY\n    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY\n    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/**************************************************************************/\n#ifndef BLEDFUSECURE_H_\n#define BLEDFUSECURE_H_\n\n#include \"bluefruit_common.h\"\n\n#include \"BLECharacteristic.h\"\n#include \"BLEService.h\"\n\nclass BLEDfuSecure : public BLEService\n{\n  protected:\n    BLECharacteristic _chr_control;\n\n  public:\n    BLEDfuSecure(void);\n\n    virtual err_t begin(void);\n};\n\n#endif /* BLEDFUSECURE_H_ */\n"
  },
  {
    "path": "src/platform/nrf52/NRF52Bluetooth.cpp",
    "content": "#include \"NRF52Bluetooth.h\"\n#include \"BLEDfuSecure.h\"\n#include \"BluetoothCommon.h\"\n#include \"PowerFSM.h\"\n#include \"configuration.h\"\n#include \"main.h\"\n#include \"mesh/PhoneAPI.h\"\n#include \"mesh/mesh-pb-constants.h\"\n#include <bluefruit.h>\n#include <utility/bonding.h>\nstatic BLEService meshBleService = BLEService(BLEUuid(MESH_SERVICE_UUID_16));\nstatic BLECharacteristic fromNum = BLECharacteristic(BLEUuid(FROMNUM_UUID_16));\nstatic BLECharacteristic fromRadio = BLECharacteristic(BLEUuid(FROMRADIO_UUID_16));\nstatic BLECharacteristic toRadio = BLECharacteristic(BLEUuid(TORADIO_UUID_16));\nstatic BLECharacteristic logRadio = BLECharacteristic(BLEUuid(LOGRADIO_UUID_16));\n\nstatic BLEDis bledis; // DIS (Device Information Service) helper class instance\nstatic BLEBas blebas; // BAS (Battery Service) helper class instance\n#ifndef BLE_DFU_SECURE\nstatic BLEDfu bledfu; // DFU software update helper service\n#else\nstatic BLEDfuSecure bledfusecure;                                             // DFU software update helper service\n#endif\n\n// This scratch buffer is used for various bluetooth reads/writes - but it is safe because only one bt operation can be in\n// process at once\n// static uint8_t trBytes[_max(_max(_max(_max(ToRadio_size, RadioConfig_size), User_size), MyNodeInfo_size), FromRadio_size)];\nstatic uint8_t fromRadioBytes[meshtastic_FromRadio_size];\nstatic uint8_t toRadioBytes[meshtastic_ToRadio_size];\n\n// Last ToRadio value received from the phone\nstatic uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE];\n\nstatic uint16_t connectionHandle;\nstatic bool passkeyShowing;\n\nclass BluetoothPhoneAPI : public PhoneAPI\n{\n    /**\n     * Subclasses can use this as a hook to provide custom notifications for their transport (i.e. bluetooth notifies)\n     */\n    virtual void onNowHasData(uint32_t fromRadioNum) override\n    {\n        PhoneAPI::onNowHasData(fromRadioNum);\n\n        LOG_INFO(\"BLE notify fromNum\");\n        fromNum.notify32(fromRadioNum);\n    }\n\n    /// Check the current underlying physical link to see if the client is currently connected\n    virtual bool checkIsConnected() override { return Bluefruit.connected(connectionHandle); }\n\n  public:\n    BluetoothPhoneAPI() { api_type = TYPE_BLE; }\n};\n\nstatic BluetoothPhoneAPI *bluetoothPhoneAPI;\n\nvoid onConnect(uint16_t conn_handle)\n{\n    // Get the reference to current connection\n    BLEConnection *connection = Bluefruit.Connection(conn_handle);\n    connectionHandle = conn_handle;\n    char central_name[32] = {0};\n    connection->getPeerName(central_name, sizeof(central_name));\n    LOG_INFO(\"BLE Connected to %s\", central_name);\n\n    // Notify UI (or any other interested firmware components)\n    meshtastic::BluetoothStatus newStatus(meshtastic::BluetoothStatus::ConnectionState::CONNECTED);\n    bluetoothStatus->updateStatus(&newStatus);\n}\n/**\n * Callback invoked when a connection is dropped\n * @param conn_handle connection where this event happens\n * @param reason is a BLE_HCI_STATUS_CODE which can be found in ble_hci.h\n */\nvoid onDisconnect(uint16_t conn_handle, uint8_t reason)\n{\n    LOG_INFO(\"BLE Disconnected, reason = 0x%x\", reason);\n    if (bluetoothPhoneAPI) {\n        bluetoothPhoneAPI->close();\n    }\n\n    // Clear the last ToRadio packet buffer to avoid rejecting first packet from new connection\n    memset(lastToRadio, 0, sizeof(lastToRadio));\n\n    // Notify UI (or any other interested firmware components)\n    meshtastic::BluetoothStatus newStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED);\n    bluetoothStatus->updateStatus(&newStatus);\n\n#if HAS_SCREEN\n    // If a pairing prompt is active, make sure we dismiss it on disconnect/cancel/failure paths.\n    if (passkeyShowing) {\n        passkeyShowing = false;\n        if (screen) {\n            screen->endAlert();\n        }\n    }\n#endif\n}\nvoid onCccd(uint16_t conn_hdl, BLECharacteristic *chr, uint16_t cccd_value)\n{\n    // Display the raw request packet\n    LOG_INFO(\"CCCD Updated: %u\", cccd_value);\n    // Check the characteristic this CCCD update is associated with in case\n    // this handler is used for multiple CCCD records.\n\n    // According to the GATT spec: cccd value = 0x0001 means notifications are enabled\n    // and cccd value = 0x0002 means indications are enabled\n\n    if (chr->uuid == fromNum.uuid || chr->uuid == logRadio.uuid) {\n        auto result = cccd_value == 2 ? chr->indicateEnabled(conn_hdl) : chr->notifyEnabled(conn_hdl);\n        if (result) {\n            LOG_INFO(\"Notify/Indicate enabled\");\n        } else {\n            LOG_INFO(\"Notify/Indicate disabled\");\n        }\n    }\n}\nvoid startAdv(void)\n{\n    // Advertising packet\n    Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);\n    // IncludeService UUID\n    // Bluefruit.ScanResponse.addService(meshBleService);\n    Bluefruit.ScanResponse.addTxPower();\n    Bluefruit.ScanResponse.addName();\n    // Include Name\n    // Bluefruit.Advertising.addName();\n    Bluefruit.Advertising.addService(meshBleService);\n    /* Start Advertising\n     * - Enable auto advertising if disconnected\n     * - Interval:  fast mode = 20 ms, slow mode = 417,5 ms\n     * - Timeout for fast mode is 30 seconds\n     * - Start(timeout) with timeout = 0 will advertise forever (until connected)\n     *\n     * For recommended advertising interval\n     * https://developer.apple.com/library/content/qa/qa1931/_index.html\n     */\n    Bluefruit.Advertising.restartOnDisconnect(true);\n    Bluefruit.Advertising.setInterval(32, 668); // in unit of 0.625 ms\n    Bluefruit.Advertising.setFastTimeout(30);   // number of seconds in fast mode\n    Bluefruit.Advertising.start(0); // 0 = Don't stop advertising after n seconds.  FIXME, we should stop advertising after X\n}\n// Just ack that the caller is allowed to read\nstatic void authorizeRead(uint16_t conn_hdl)\n{\n    ble_gatts_rw_authorize_reply_params_t reply = {.type = BLE_GATTS_AUTHORIZE_TYPE_READ};\n    reply.params.write.gatt_status = BLE_GATT_STATUS_SUCCESS;\n    sd_ble_gatts_rw_authorize_reply(conn_hdl, &reply);\n}\n/**\n * client is starting read, pull the bytes from our API class\n */\nvoid onFromRadioAuthorize(uint16_t conn_hdl, BLECharacteristic *chr, ble_gatts_evt_read_t *request)\n{\n    if (request->offset == 0) {\n        // If the read is long, we will get multiple authorize invocations - we only populate data on the first\n        size_t numBytes = bluetoothPhoneAPI->getFromRadio(fromRadioBytes);\n        // Someone is going to read our value as soon as this callback returns.  So fill it with the next message in the queue\n        // or make empty if the queue is empty\n        fromRadio.write(fromRadioBytes, numBytes);\n    } else {\n        // LOG_INFO(\"Ignore successor read\");\n    }\n    authorizeRead(conn_hdl);\n}\n\nvoid onToRadioWrite(uint16_t conn_hdl, BLECharacteristic *chr, uint8_t *data, uint16_t len)\n{\n    LOG_INFO(\"toRadioWriteCb data %p, len %u\", data, len);\n    if (memcmp(lastToRadio, data, len) != 0) {\n        LOG_DEBUG(\"New ToRadio packet\");\n        memcpy(lastToRadio, data, len);\n        bluetoothPhoneAPI->handleToRadio(data, len);\n    } else {\n        LOG_DEBUG(\"Drop dup ToRadio packet we just saw\");\n    }\n}\n\nvoid setupMeshService(void)\n{\n    bluetoothPhoneAPI = new BluetoothPhoneAPI();\n    meshBleService.begin();\n    // Note: You must call .begin() on the BLEService before calling .begin() on\n    // any characteristic(s) within that service definition.. Calling .begin() on\n    // a BLECharacteristic will cause it to be added to the last BLEService that\n    // was 'begin()'ed!\n    auto secMode =\n        config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN ? SECMODE_OPEN : SECMODE_ENC_NO_MITM;\n    fromNum.setProperties(CHR_PROPS_NOTIFY | CHR_PROPS_READ);\n    fromNum.setPermission(secMode, SECMODE_NO_ACCESS); // FIXME, secure this!!!\n    fromNum.setFixedLen(\n        0); // Variable len (either 0 or 4)  FIXME consider changing protocol so it is fixed 4 byte len, where 0 means empty\n    fromNum.setMaxLen(4);\n    fromNum.setCccdWriteCallback(onCccd); // Optionally capture CCCD updates\n    // We don't yet need to hook the fromNum auth callback\n    // fromNum.setReadAuthorizeCallback(fromNumAuthorizeCb);\n    fromNum.write32(0); // Provide default fromNum of 0\n    fromNum.begin();\n\n    fromRadio.setProperties(CHR_PROPS_READ);\n    fromRadio.setPermission(secMode, SECMODE_NO_ACCESS);\n    fromRadio.setMaxLen(sizeof(fromRadioBytes));\n    fromRadio.setReadAuthorizeCallback(\n        onFromRadioAuthorize,\n        false); // We don't call this callback via the adafruit queue, because we can safely run in the BLE context\n    fromRadio.setBuffer(fromRadioBytes, sizeof(fromRadioBytes)); // we preallocate our fromradio buffer so we won't waste space\n    // for two copies\n    fromRadio.begin();\n\n    toRadio.setProperties(CHR_PROPS_WRITE);\n    toRadio.setPermission(secMode, secMode); // FIXME secure this!\n    toRadio.setFixedLen(0);\n    toRadio.setMaxLen(512);\n    toRadio.setBuffer(toRadioBytes, sizeof(toRadioBytes));\n    // We don't call this callback via the adafruit queue, because we can safely run in the BLE context\n    toRadio.setWriteCallback(onToRadioWrite, false);\n    toRadio.begin();\n\n    logRadio.setProperties(CHR_PROPS_INDICATE | CHR_PROPS_NOTIFY | CHR_PROPS_READ);\n    logRadio.setPermission(secMode, SECMODE_NO_ACCESS);\n    logRadio.setMaxLen(512);\n    logRadio.setCccdWriteCallback(onCccd);\n    logRadio.write32(0);\n    logRadio.begin();\n}\nstatic uint32_t configuredPasskey;\nvoid NRF52Bluetooth::shutdown()\n{\n    // Shutdown bluetooth for minimum power draw\n    LOG_INFO(\"Disable NRF52 bluetooth\");\n    Bluefruit.Security.setPairPasskeyCallback(NRF52Bluetooth::onUnwantedPairing); // Actively refuse (during factory reset)\n    disconnect();\n    Bluefruit.Advertising.stop();\n}\nvoid NRF52Bluetooth::startDisabled()\n{\n    // Setup Bluetooth\n    nrf52Bluetooth->setup();\n    // Shutdown bluetooth for minimum power draw\n    Bluefruit.Advertising.stop();\n    Bluefruit.setTxPower(-40); // Minimum power\n    LOG_INFO(\"Disable NRF52 Bluetooth. (Workaround: tx power min, advertise stopped)\");\n}\nbool NRF52Bluetooth::isConnected()\n{\n    return Bluefruit.connected(connectionHandle);\n}\nint NRF52Bluetooth::getRssi()\n{\n    return 0; // FIXME figure out where to source this\n}\n\n// Valid BLE TX power levels as per nRF52840 Product Specification are: \"-20 to +8 dBm TX power, configurable in 4 dB steps\".\n// See https://docs.nordicsemi.com/bundle/ps_nrf52840/page/keyfeatures_html5.html\n#define VALID_BLE_TX_POWER(x)                                                                                                    \\\n    ((x) == -20 || (x) == -16 || (x) == -12 || (x) == -8 || (x) == -4 || (x) == 0 || (x) == 4 || (x) == 8)\n\nvoid NRF52Bluetooth::setup()\n{\n    // Initialise the Bluefruit module\n    LOG_INFO(\"Init the Bluefruit nRF52 module\");\n    Bluefruit.autoConnLed(false);\n    Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);\n    Bluefruit.begin();\n    // Clear existing data.\n    Bluefruit.Advertising.stop();\n    Bluefruit.Advertising.clearData();\n    Bluefruit.ScanResponse.clearData();\n#if defined(NRF52_BLE_TX_POWER) && VALID_BLE_TX_POWER(NRF52_BLE_TX_POWER)\n    Bluefruit.setTxPower(NRF52_BLE_TX_POWER);\n#endif\n    if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) {\n        configuredPasskey = config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN\n                                ? config.bluetooth.fixed_pin\n                                : random(100000, 999999);\n        auto pinString = std::to_string(configuredPasskey);\n        LOG_INFO(\"Bluetooth pin set to '%i'\", configuredPasskey);\n        Bluefruit.Security.setPIN(pinString.c_str());\n        Bluefruit.Security.setIOCaps(true, false, false);\n        Bluefruit.Security.setPairPasskeyCallback(NRF52Bluetooth::onPairingPasskey);\n        Bluefruit.Security.setPairCompleteCallback(NRF52Bluetooth::onPairingCompleted);\n        Bluefruit.Security.setSecuredCallback(NRF52Bluetooth::onConnectionSecured);\n        meshBleService.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);\n    } else {\n        Bluefruit.Security.setIOCaps(false, false, false);\n        meshBleService.setPermission(SECMODE_OPEN, SECMODE_OPEN);\n    }\n    // Set the advertised device name (keep it short!)\n    Bluefruit.setName(getDeviceName());\n    // Set the connect/disconnect callback handlers\n    Bluefruit.Periph.setConnectCallback(onConnect);\n    Bluefruit.Periph.setDisconnectCallback(onDisconnect);\n\n    // Do not change Slave Latency to value other than 0 !!!\n    // There is probably a bug in SoftDevice + certain Apple iOS versions being\n    // brain damaged causing connectivity problems.\n\n    // On one side it seems SoftDevice is using SlaveLatency value even\n    // if connection parameter negotation failed and phone sees it as connectivity errors.\n\n    // On the other hand Apple can randomly refuse any parameter negotiation and shutdown connection\n    // even if you meet Apple Developer Guidelines for BLE devices. Because f* you, that's why.\n\n    // While this API call sets preferred connection parameters (PPCP) - many phones ignore it (yeah) and it seems SoftDevice\n    // will try to renegotiate connection parameters based on those values after phone connection.\n    // So those are relatively safe values so Apple braindead firmware won't get angry and at least we may try\n    // to negotiate some longer connection interval to save battery.\n\n    // See https://github.com/meshtastic/firmware/pull/8858 for measurements.  We are dealing with microamp savings anyway so not\n    // worth dying on a hill here.\n\n    Bluefruit.Periph.setConnSlaveLatency(0);\n    // 1.25 ms units - so min, max is 15, 100 ms range.\n    Bluefruit.Periph.setConnInterval(12, 80);\n\n#ifndef BLE_DFU_SECURE\n    bledfu.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);\n    bledfu.begin(); // Install the DFU helper\n#else\n    bledfusecure.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM); // add by WayenWeng\n    bledfusecure.begin();                                                     // Install the DFU helper\n#endif\n    // Configure and Start the Device Information Service\n    LOG_INFO(\"Init the Device Information Service\");\n    bledis.setModel(optstr(HW_VERSION));\n    bledis.setFirmwareRev(optstr(APP_VERSION));\n    bledis.begin();\n    // Start the BLE Battery Service and set it to 100%\n    LOG_INFO(\"Init the Battery Service\");\n    blebas.begin();\n    blebas.write(0); // Unknown battery level for now\n    // Setup the Heart Rate Monitor service using\n    // BLEService and BLECharacteristic classes\n    LOG_INFO(\"Init the Mesh bluetooth service\");\n    setupMeshService();\n    // Setup the advertising packet(s)\n    LOG_INFO(\"Set up the advertising payload(s)\");\n    startAdv();\n    LOG_INFO(\"Advertise\");\n}\nvoid NRF52Bluetooth::resumeAdvertising()\n{\n    Bluefruit.Advertising.restartOnDisconnect(true);\n    Bluefruit.Advertising.setInterval(32, 668); // in unit of 0.625 ms\n    Bluefruit.Advertising.setFastTimeout(30);   // number of seconds in fast mode\n    Bluefruit.Advertising.start(0);\n}\n/// Given a level between 0-100, update the BLE attribute\nvoid updateBatteryLevel(uint8_t level)\n{\n    blebas.write(level);\n}\nvoid NRF52Bluetooth::clearBonds()\n{\n    LOG_INFO(\"Clear bluetooth bonds!\");\n    bond_print_list(BLE_GAP_ROLE_PERIPH);\n    bond_print_list(BLE_GAP_ROLE_CENTRAL);\n    Bluefruit.Periph.clearBonds();\n    Bluefruit.Central.clearBonds();\n}\nvoid NRF52Bluetooth::onConnectionSecured(uint16_t conn_handle)\n{\n    LOG_INFO(\"BLE connection secured\");\n}\nbool NRF52Bluetooth::onPairingPasskey(uint16_t conn_handle, uint8_t const passkey[6], bool match_request)\n{\n    char passkey1[4] = {passkey[0], passkey[1], passkey[2], '\\0'};\n    char passkey2[4] = {passkey[3], passkey[4], passkey[5], '\\0'};\n    LOG_INFO(\"BLE pair process started with passkey %s %s\", passkey1, passkey2);\n    powerFSM.trigger(EVENT_BLUETOOTH_PAIR);\n\n    // Get passkey as string\n    // Note: possible leading zeros\n    std::string textkey;\n    for (uint8_t i = 0; i < 6; i++)\n        textkey += (char)passkey[i];\n\n    // Notify UI (or other components) of pairing event and passkey\n    meshtastic::BluetoothStatus newStatus(textkey);\n    bluetoothStatus->updateStatus(&newStatus);\n\n#if HAS_SCREEN &&                                                                                                                \\\n    !defined(MESHTASTIC_EXCLUDE_SCREEN) // Todo: migrate this display code back into Screen class, and observe bluetoothStatus\n    if (screen) {\n        screen->startAlert([](OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -> void {\n            char btPIN[16] = \"888888\";\n            snprintf(btPIN, sizeof(btPIN), \"%06u\", configuredPasskey);\n            int x_offset = display->width() / 2;\n            int y_offset = display->height() <= 80 ? 0 : 12;\n            display->setTextAlignment(TEXT_ALIGN_CENTER);\n            display->setFont(FONT_MEDIUM);\n            display->drawString(x_offset + x, y_offset + y, \"Bluetooth\");\n\n            display->setFont(FONT_SMALL);\n            y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_MEDIUM - 4 : y_offset + FONT_HEIGHT_MEDIUM + 5;\n            display->drawString(x_offset + x, y_offset + y, \"Enter this code\");\n\n            display->setFont(FONT_LARGE);\n            String displayPin(btPIN);\n            String pin = displayPin.substring(0, 3) + \" \" + displayPin.substring(3, 6);\n            y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_SMALL - 5 : y_offset + FONT_HEIGHT_SMALL + 5;\n            display->drawString(x_offset + x, y_offset + y, pin);\n\n            display->setFont(FONT_SMALL);\n            String deviceName = \"Name: \";\n            deviceName.concat(getDeviceName());\n            y_offset = display->height() == 64 ? y_offset + FONT_HEIGHT_LARGE - 6 : y_offset + FONT_HEIGHT_LARGE + 5;\n            display->drawString(x_offset + x, y_offset + y, deviceName);\n        });\n    }\n#endif\n    passkeyShowing = true;\n\n    if (match_request) {\n        uint32_t start_time = millis();\n        while (millis() < start_time + 30000) {\n            if (!Bluefruit.connected(conn_handle))\n                break;\n        }\n    }\n    LOG_INFO(\"BLE passkey pair: match_request=%i\", match_request);\n    return true;\n}\n\n// Actively refuse new BLE pairings\n// After clearing bonds (at factory reset), clients seem initially able to attempt to re-pair, even with advertising disabled.\n// On NRF52Bluetooth::shutdown, we change the pairing callback to this method, to aggressively refuse any connection attempts.\nbool NRF52Bluetooth::onUnwantedPairing(uint16_t conn_handle, uint8_t const passkey[6], bool match_request)\n{\n    NRF52Bluetooth::disconnect();\n    return false;\n}\n\n// Disconnect any BLE connections\nvoid NRF52Bluetooth::disconnect()\n{\n    uint8_t connection_num = Bluefruit.connected();\n    if (connection_num) {\n        // Close all connections. We're only expecting one.\n        for (uint8_t i = 0; i < connection_num; i++)\n            Bluefruit.disconnect(i);\n\n        // Wait for disconnection\n        while (Bluefruit.connected())\n            yield();\n\n        LOG_INFO(\"Ended BLE connection\");\n    }\n}\n\nvoid NRF52Bluetooth::onPairingCompleted(uint16_t conn_handle, uint8_t auth_status)\n{\n    if (auth_status == BLE_GAP_SEC_STATUS_SUCCESS) {\n        LOG_INFO(\"BLE pair success\");\n        meshtastic::BluetoothStatus newConnectedStatus(meshtastic::BluetoothStatus::ConnectionState::CONNECTED);\n        bluetoothStatus->updateStatus(&newConnectedStatus);\n    } else {\n        LOG_INFO(\"BLE pair failed\");\n        // Notify UI (or any other interested firmware components)\n        meshtastic::BluetoothStatus newDisconnectedStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED);\n        bluetoothStatus->updateStatus(&newDisconnectedStatus);\n    }\n\n    // Todo: migrate this display code back into Screen class, and observe bluetoothStatus\n    passkeyShowing = false;\n    if (screen) {\n        screen->endAlert();\n    }\n}\n\nvoid NRF52Bluetooth::sendLog(const uint8_t *logMessage, size_t length)\n{\n    if (!isConnected() || length > 512)\n        return;\n    if (logRadio.indicateEnabled())\n        logRadio.indicate(logMessage, (uint16_t)length);\n    else\n        logRadio.notify(logMessage, (uint16_t)length);\n}\n"
  },
  {
    "path": "src/platform/nrf52/NRF52Bluetooth.h",
    "content": "#pragma once\n\n#include \"BluetoothCommon.h\"\n#include <Arduino.h>\n\nclass NRF52Bluetooth : BluetoothApi\n{\n  public:\n    void setup();\n    void shutdown();\n    void startDisabled();\n    void resumeAdvertising();\n    void clearBonds();\n    bool isConnected();\n    int getRssi();\n    void sendLog(const uint8_t *logMessage, size_t length);\n\n  private:\n    static void onConnectionSecured(uint16_t conn_handle);\n    static bool onPairingPasskey(uint16_t conn_handle, uint8_t const passkey[6], bool match_request);\n    static void onPairingCompleted(uint16_t conn_handle, uint8_t auth_status);\n\n    static bool onUnwantedPairing(uint16_t conn_handle, uint8_t const passkey[6], bool match_request);\n    static void disconnect();\n};"
  },
  {
    "path": "src/platform/nrf52/NRF52CryptoEngine.cpp",
    "content": "#include \"CryptoEngine.h\"\n#include \"aes-256/tiny-aes.h\"\n#include \"configuration.h\"\n#include <Adafruit_nRFCrypto.h>\nclass NRF52CryptoEngine : public CryptoEngine\n{\n  public:\n    NRF52CryptoEngine() {}\n\n    ~NRF52CryptoEngine() {}\n\n    virtual void encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes) override\n    {\n        if (_key.length > 16) {\n            AES_ctx ctx;\n            AES_init_ctx_iv(&ctx, _key.bytes, _nonce);\n            AES_CTR_xcrypt_buffer(&ctx, bytes, numBytes);\n        } else if (_key.length > 0) {\n            nRFCrypto.begin();\n            nRFCrypto_AES ctx;\n            uint8_t myLen = ctx.blockLen(numBytes);\n            char encBuf[myLen] = {0};\n            ctx.begin();\n            ctx.Process((char *)bytes, numBytes, _nonce, _key.bytes, _key.length, encBuf, ctx.encryptFlag, ctx.ctrMode);\n            ctx.end();\n            nRFCrypto.end();\n            memcpy(bytes, encBuf, numBytes);\n        }\n    }\n};\n\nCryptoEngine *crypto = new NRF52CryptoEngine();"
  },
  {
    "path": "src/platform/nrf52/aes-256/tiny-aes.cpp",
    "content": "/*\nAES-256 Software Implementation\n\nbased on https://github.com/kokke/tiny-AES-C/ which is in public domain\n\nNOTE:   String length must be evenly divisible by 16byte (str_len % 16 == 0)\n        You should pad the end of the string with zeros if this is not the case.\n        For AES192/256 the key size is proportionally larger.\n*/\n\n#include \"tiny-aes.h\"\n#include <string.h>\n\n#define Nb 4\n#define Nk 8\n#define Nr 14\n\ntypedef uint8_t state_t[4][4];\n\nstatic const uint8_t sbox[256] = {\n    // 0     1    2      3     4    5     6     7      8    9     A      B    C     D     E     F\n    0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d,\n    0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc,\n    0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2,\n    0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,\n    0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb,\n    0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5,\n    0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d,\n    0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,\n    0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d,\n    0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6,\n    0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9,\n    0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,\n    0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16};\n\nstatic const uint8_t Rcon[11] = {0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36};\n\n#define getSBoxValue(num) (sbox[(num)])\n\nstatic void KeyExpansion(uint8_t *RoundKey, const uint8_t *Key)\n{\n    uint8_t tempa[4];\n\n    for (unsigned i = 0; i < Nk; ++i) {\n        RoundKey[(i * 4) + 0] = Key[(i * 4) + 0];\n        RoundKey[(i * 4) + 1] = Key[(i * 4) + 1];\n        RoundKey[(i * 4) + 2] = Key[(i * 4) + 2];\n        RoundKey[(i * 4) + 3] = Key[(i * 4) + 3];\n    }\n\n    for (unsigned i = Nk; i < Nb * (Nr + 1); ++i) {\n        unsigned k = (i - 1) * 4;\n        tempa[0] = RoundKey[k + 0];\n        tempa[1] = RoundKey[k + 1];\n        tempa[2] = RoundKey[k + 2];\n        tempa[3] = RoundKey[k + 3];\n\n        if (i % Nk == 0) {\n            const uint8_t u8tmp = tempa[0];\n            tempa[0] = tempa[1];\n            tempa[1] = tempa[2];\n            tempa[2] = tempa[3];\n            tempa[3] = u8tmp;\n\n            tempa[0] = getSBoxValue(tempa[0]);\n            tempa[1] = getSBoxValue(tempa[1]);\n            tempa[2] = getSBoxValue(tempa[2]);\n            tempa[3] = getSBoxValue(tempa[3]);\n\n            tempa[0] = tempa[0] ^ Rcon[i / Nk];\n        }\n\n        if (i % Nk == 4) {\n            tempa[0] = getSBoxValue(tempa[0]);\n            tempa[1] = getSBoxValue(tempa[1]);\n            tempa[2] = getSBoxValue(tempa[2]);\n            tempa[3] = getSBoxValue(tempa[3]);\n        }\n\n        unsigned j = i * 4;\n        k = (i - Nk) * 4;\n        RoundKey[j + 0] = RoundKey[k + 0] ^ tempa[0];\n        RoundKey[j + 1] = RoundKey[k + 1] ^ tempa[1];\n        RoundKey[j + 2] = RoundKey[k + 2] ^ tempa[2];\n        RoundKey[j + 3] = RoundKey[k + 3] ^ tempa[3];\n    }\n}\n\nvoid AES_init_ctx(struct AES_ctx *ctx, const uint8_t *key)\n{\n    KeyExpansion(ctx->RoundKey, key);\n}\nvoid AES_init_ctx_iv(struct AES_ctx *ctx, const uint8_t *key, const uint8_t *iv)\n{\n    KeyExpansion(ctx->RoundKey, key);\n    memcpy(ctx->Iv, iv, AES_BLOCKLEN);\n}\nvoid AES_ctx_set_iv(struct AES_ctx *ctx, const uint8_t *iv)\n{\n    memcpy(ctx->Iv, iv, AES_BLOCKLEN);\n}\n\nstatic void AddRoundKey(uint8_t round, state_t *state, const uint8_t *RoundKey)\n{\n    for (uint8_t i = 0; i < 4; ++i) {\n        for (uint8_t j = 0; j < 4; ++j) {\n            (*state)[i][j] ^= RoundKey[(round * Nb * 4) + (i * Nb) + j];\n        }\n    }\n}\n\nstatic void SubBytes(state_t *state)\n{\n    for (uint8_t i = 0; i < 4; ++i) {\n        for (uint8_t j = 0; j < 4; ++j) {\n            (*state)[j][i] = getSBoxValue((*state)[j][i]);\n        }\n    }\n}\n\nstatic void ShiftRows(state_t *state)\n{\n    uint8_t temp = (*state)[0][1];\n    (*state)[0][1] = (*state)[1][1];\n    (*state)[1][1] = (*state)[2][1];\n    (*state)[2][1] = (*state)[3][1];\n    (*state)[3][1] = temp;\n\n    temp = (*state)[0][2];\n    (*state)[0][2] = (*state)[2][2];\n    (*state)[2][2] = temp;\n\n    temp = (*state)[1][2];\n    (*state)[1][2] = (*state)[3][2];\n    (*state)[3][2] = temp;\n\n    temp = (*state)[0][3];\n    (*state)[0][3] = (*state)[3][3];\n    (*state)[3][3] = (*state)[2][3];\n    (*state)[2][3] = (*state)[1][3];\n    (*state)[1][3] = temp;\n}\n\nstatic uint8_t xtime(uint8_t x)\n{\n    return ((x << 1) ^ (((x >> 7) & 1) * 0x1b));\n}\n\nstatic void MixColumns(state_t *state)\n{\n    for (uint8_t i = 0; i < 4; ++i) {\n        uint8_t t = (*state)[i][0];\n        uint8_t Tmp = (*state)[i][0] ^ (*state)[i][1] ^ (*state)[i][2] ^ (*state)[i][3];\n        uint8_t Tm = (*state)[i][0] ^ (*state)[i][1];\n        Tm = xtime(Tm);\n        (*state)[i][0] ^= Tm ^ Tmp;\n        Tm = (*state)[i][1] ^ (*state)[i][2];\n        Tm = xtime(Tm);\n        (*state)[i][1] ^= Tm ^ Tmp;\n        Tm = (*state)[i][2] ^ (*state)[i][3];\n        Tm = xtime(Tm);\n        (*state)[i][2] ^= Tm ^ Tmp;\n        Tm = (*state)[i][3] ^ t;\n        Tm = xtime(Tm);\n        (*state)[i][3] ^= Tm ^ Tmp;\n    }\n}\n\n#define Multiply(x, y)                                                                                                           \\\n    (((y & 1) * x) ^ ((y >> 1 & 1) * xtime(x)) ^ ((y >> 2 & 1) * xtime(xtime(x))) ^ ((y >> 3 & 1) * xtime(xtime(xtime(x)))) ^    \\\n     ((y >> 4 & 1) * xtime(xtime(xtime(xtime(x))))))\n\nstatic void Cipher(state_t *state, const uint8_t *RoundKey)\n{\n    uint8_t round = 0;\n\n    AddRoundKey(0, state, RoundKey);\n\n    for (round = 1;; ++round) {\n        SubBytes(state);\n        ShiftRows(state);\n        if (round == Nr) {\n            break;\n        }\n        MixColumns(state);\n        AddRoundKey(round, state, RoundKey);\n    }\n    AddRoundKey(Nr, state, RoundKey);\n}\n\nvoid AES_CTR_xcrypt_buffer(struct AES_ctx *ctx, uint8_t *buf, size_t length)\n{\n    uint8_t buffer[AES_BLOCKLEN];\n\n    size_t i;\n    int bi;\n    for (i = 0, bi = AES_BLOCKLEN; i < length; ++i, ++bi) {\n        if (bi == AES_BLOCKLEN) {\n\n            memcpy(buffer, ctx->Iv, AES_BLOCKLEN);\n            Cipher((state_t *)buffer, ctx->RoundKey);\n\n            for (bi = (AES_BLOCKLEN - 1); bi >= 0; --bi) {\n                if (ctx->Iv[bi] == 255) {\n                    ctx->Iv[bi] = 0;\n                    continue;\n                }\n                ctx->Iv[bi] += 1;\n                break;\n            }\n            bi = 0;\n        }\n\n        buf[i] = (buf[i] ^ buffer[bi]);\n    }\n}\n"
  },
  {
    "path": "src/platform/nrf52/aes-256/tiny-aes.h",
    "content": "#ifndef _TINY_AES_H_\n#define _TINY_AES_H_\n\n#include <stddef.h>\n#include <stdint.h>\n\n#define AES_BLOCKLEN 16 // Block length in bytes - AES is 128b block only\n// #define AES_KEYLEN 32\n#define AES_keyExpSize 240\n\nstruct AES_ctx {\n    uint8_t RoundKey[AES_keyExpSize];\n    uint8_t Iv[AES_BLOCKLEN];\n};\n\nvoid AES_init_ctx(struct AES_ctx *ctx, const uint8_t *key);\nvoid AES_init_ctx_iv(struct AES_ctx *ctx, const uint8_t *key, const uint8_t *iv);\nvoid AES_ctx_set_iv(struct AES_ctx *ctx, const uint8_t *iv);\n\nvoid AES_CTR_xcrypt_buffer(struct AES_ctx *ctx, uint8_t *buf, size_t length);\n\n#endif // _TINY_AES_H_\n"
  },
  {
    "path": "src/platform/nrf52/alloc.cpp",
    "content": "#include \"configuration.h\"\n#include \"rtos.h\"\n#include <assert.h>\n#include <stdlib.h>\n\n/**\n * Custom new/delete to panic if out out memory\n */\n\nvoid *operator new(size_t size)\n{\n    auto p = rtos_malloc(size);\n    assert(p);\n    return p;\n}\n\nvoid *operator new[](size_t size)\n{\n    auto p = rtos_malloc(size);\n    assert(p);\n    return p;\n}\n\nvoid operator delete(void *ptr)\n{\n    rtos_free(ptr);\n}\n\nvoid operator delete[](void *ptr)\n{\n    rtos_free(ptr);\n}"
  },
  {
    "path": "src/platform/nrf52/architecture.h",
    "content": "#pragma once\n\n#define ARCH_NRF52\n\n//\n// defaults for NRF52 architecture\n//\n\n/*\n * Internal Reference is +/-0.6V, with an adjustable gain of 1/6, 1/5, 1/4,\n * 1/3, 1/2 or 1, meaning 3.6, 3.0, 2.4, 1.8, 1.2 or 0.6V for the ADC levels.\n *\n * External Reference is VDD/4, with an adjustable gain of 1, 2 or 4, meaning\n * VDD/4, VDD/2 or VDD for the ADC levels.\n *\n * Default settings are internal reference with 1/6 gain (GND..3.6V ADC range)\n * Some variants overwrite it.\n */\n#ifndef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.6\n#endif\n\n#ifndef BATTERY_SENSE_RESOLUTION_BITS\n#define BATTERY_SENSE_RESOLUTION_BITS 10\n#endif\n\n#ifndef HAS_BLUETOOTH\n#define HAS_BLUETOOTH 1\n#endif\n#ifndef HAS_SCREEN\n#define HAS_SCREEN 1\n#endif\n#ifndef HAS_WIRE\n#define HAS_WIRE 1\n#endif\n#ifndef HAS_GPS\n#define HAS_GPS 1\n#endif\n#ifndef HAS_BUTTON\n#define HAS_BUTTON 1\n#endif\n#ifndef HAS_TELEMETRY\n#define HAS_TELEMETRY 1\n#endif\n#ifndef HAS_SENSOR\n#define HAS_SENSOR 1\n#endif\n#ifndef HAS_RADIO\n#define HAS_RADIO 1\n#endif\n#ifndef HAS_CPU_SHUTDOWN\n#define HAS_CPU_SHUTDOWN 1\n#endif\n#ifndef HAS_CUSTOM_CRYPTO_ENGINE\n#define HAS_CUSTOM_CRYPTO_ENGINE 1\n#endif\n\n//\n// set HW_VENDOR\n//\n\n// This string must exactly match the case used in release file names or the android updater won't work\n#ifdef ARDUINO_NRF52840_PCA10056\n#define HW_VENDOR meshtastic_HardwareModel_NRF52840DK\n#elif defined(ARDUINO_NRF52840_PPR)\n#define HW_VENDOR meshtastic_HardwareModel_PPR\n#elif defined(RAK2560)\n#define HW_VENDOR meshtastic_HardwareModel_RAK2560\n#elif defined(WISMESH_TAP)\n#define HW_VENDOR meshtastic_HardwareModel_WISMESH_TAP\n#elif defined(WISMESH_TAG)\n#define HW_VENDOR meshtastic_HardwareModel_WISMESH_TAG\n#elif defined(GAT562_MESH_TRIAL_TRACKER)\n#define HW_VENDOR meshtastic_HardwareModel_GAT562_MESH_TRIAL_TRACKER\n#elif defined(NOMADSTAR_METEOR_PRO)\n#define HW_VENDOR meshtastic_HardwareModel_NOMADSTAR_METEOR_PRO\n#elif defined(R1_NEO)\n#define HW_VENDOR meshtastic_HardwareModel_MUZI_R1_NEO\n#elif defined(RAK3401)\n#define HW_VENDOR meshtastic_HardwareModel_RAK3401\n// MAke sure all custom RAK4630 boards are defined before the generic RAK4630\n#elif defined(RAK4630)\n#define HW_VENDOR meshtastic_HardwareModel_RAK4631\n#elif defined(TTGO_T_ECHO)\n#define HW_VENDOR meshtastic_HardwareModel_T_ECHO\n#elif defined(T_ECHO_LITE)\n#define HW_VENDOR meshtastic_HardwareModel_T_ECHO_LITE\n#elif defined(TTGO_T_ECHO_PLUS)\n#define HW_VENDOR meshtastic_HardwareModel_T_ECHO_PLUS\n#elif defined(ELECROW_ThinkNode_M1)\n#define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M1\n#elif defined(ELECROW_ThinkNode_M3)\n#define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M3\n#elif defined(ELECROW_ThinkNode_M6)\n#define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M6\n#elif defined(ELECROW_ThinkNode_M4)\n#define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M4\n#elif defined(NANO_G2_ULTRA)\n#define HW_VENDOR meshtastic_HardwareModel_NANO_G2_ULTRA\n#elif defined(CANARYONE)\n#define HW_VENDOR meshtastic_HardwareModel_CANARYONE\n#elif defined(NORDIC_PCA10059)\n#define HW_VENDOR meshtastic_HardwareModel_NRF52840_PCA10059\n#elif defined(TWC_MESH_V4)\n#define HW_VENDOR meshtastic_HardwareModel_TWC_MESH_V4\n#elif defined(NRF52_PROMICRO_DIY)\n#define HW_VENDOR meshtastic_HardwareModel_NRF52_PROMICRO_DIY\n#elif defined(WIO_WM1110)\n#define HW_VENDOR meshtastic_HardwareModel_WIO_WM1110\n#elif defined(TRACKER_T1000_E)\n#define HW_VENDOR meshtastic_HardwareModel_TRACKER_T1000_E\n#elif defined(ME25LS01_4Y10TD)\n#define HW_VENDOR meshtastic_HardwareModel_ME25LS01_4Y10TD\n#elif defined(MS24SF1)\n#define HW_VENDOR meshtastic_HardwareModel_MS24SF1\n#elif defined(PRIVATE_HW) || defined(FEATHER_DIY)\n#define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW\n#elif defined(HELTEC_T114)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_NODE_T114\n#elif defined(MESHLINK)\n#define HW_VENDOR meshtastic_HardwareModel_MESHLINK\n#elif defined(SEEED_XIAO_NRF52840_KIT)\n#define HW_VENDOR meshtastic_HardwareModel_XIAO_NRF52_KIT\n#elif defined(SEEED_SOLAR_NODE)\n#define HW_VENDOR meshtastic_HardwareModel_SEEED_SOLAR_NODE\n#elif defined(HELTEC_MESH_POCKET)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_POCKET\n#elif defined(SEEED_WIO_TRACKER_L1_EINK)\n#define HW_VENDOR meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1_EINK\n#elif defined(SEEED_WIO_TRACKER_L1)\n#define HW_VENDOR meshtastic_HardwareModel_SEEED_WIO_TRACKER_L1\n#elif defined(HELTEC_MESH_SOLAR)\n#define HW_VENDOR meshtastic_HardwareModel_HELTEC_MESH_SOLAR\n#elif defined(MUZI_BASE)\n#define HW_VENDOR meshtastic_HardwareModel_MUZI_BASE\n#else\n#define HW_VENDOR meshtastic_HardwareModel_NRF52_UNKNOWN\n#endif\n\n//\n// Standard definitions for NRF52 targets\n//\n\n#ifdef ARDUINO_NRF52840_PCA10056\n\n// This board uses 0 to be mean LED on\n#undef LED_STATE_ON\n#define LED_STATE_ON 0 // State when LED is lit\n\n#endif\n\n#ifdef _SEEED_XIAO_NRF52840_SENSE_H_\n\n// This board uses 0 to be mean LED on\n#undef LED_STATE_ON\n#define LED_STATE_ON 0 // State when LED is lit\n\n#endif\n\n#if defined(PIN_LED1) && !defined(LED_POWER)\n#define LED_POWER PIN_LED1 // LED1 on nrf52840-DK\n#endif\n\n#ifdef PIN_BUTTON1\n#define BUTTON_PIN PIN_BUTTON1\n#endif\n\n#ifdef PIN_BUTTON_TOUCH\n#define BUTTON_PIN_TOUCH PIN_BUTTON_TOUCH\n#endif\n\n// Always include the SEGGER code on NRF52 - because useful for debugging\n#include \"SEGGER_RTT.h\"\n\n// The channel we send stdout data to\n#define SEGGER_STDOUT_CH 0\n\n// Debug printing to segger console\n#define SEGGER_MSG(...) SEGGER_RTT_printf(SEGGER_STDOUT_CH, __VA_ARGS__)\n\n// If we are not on a NRF52840 (which has built in USB-ACM serial support) and we don't have serial pins hooked up, then we MUST\n// use SEGGER for debug output\n#if !defined(PIN_SERIAL_RX) && !defined(NRF52840_XXAA)\n// No serial ports on this board - ONLY use segger in memory console\n#define USE_SEGGER\n#endif\n\n// Detect if running in ISR context (ARM Cortex-M4)\n#define xPortInIsrContext() ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0 ? pdFALSE : pdTRUE)\n"
  },
  {
    "path": "src/platform/nrf52/hardfault.cpp",
    "content": "#include \"configuration.h\"\n#include <core_cm4.h>\n\n// Based on reading/modifying https://blog.feabhas.com/2013/02/developing-a-generic-hard-fault-handler-for-arm-cortex-m3cortex-m4/\n\nenum { r0, r1, r2, r3, r12, lr, pc, psr };\n\n// we can't use the regular LOG_DEBUG for these crash dumps because it depends on threading still being running.  Instead use the\n// segger in memory tool\n#define FAULT_MSG(...) SEGGER_MSG(__VA_ARGS__)\n\n// Per http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/Cihcfefj.html\nstatic void printUsageErrorMsg(uint32_t cfsr)\n{\n    FAULT_MSG(\"Usage fault: \");\n    cfsr >>= SCB_CFSR_USGFAULTSR_Pos; // right shift to lsb\n    if ((cfsr & (1 << 9)) != 0)\n        FAULT_MSG(\"Divide by zero\\n\");\n    else if ((cfsr & (1 << 8)) != 0)\n        FAULT_MSG(\"Unaligned\\n\");\n    else if ((cfsr & (1 << 1)) != 0)\n        FAULT_MSG(\"Invalid state\\n\");\n    else if ((cfsr & (1 << 0)) != 0)\n        FAULT_MSG(\"Invalid instruction\\n\");\n    else\n        FAULT_MSG(\"FIXME add to printUsageErrorMsg!\\n\");\n}\n\nstatic void printBusErrorMsg(uint32_t cfsr)\n{\n    FAULT_MSG(\"Bus fault: \");\n    cfsr >>= SCB_CFSR_BUSFAULTSR_Pos; // right shift to lsb\n    if ((cfsr & (1 << 0)) != 0)\n        FAULT_MSG(\"Instruction bus error\\n\");\n    if ((cfsr & (1 << 1)) != 0)\n        FAULT_MSG(\"Precise data bus error\\n\");\n    if ((cfsr & (1 << 2)) != 0)\n        FAULT_MSG(\"Imprecise data bus error\\n\");\n}\n\nstatic void printMemErrorMsg(uint32_t cfsr)\n{\n    FAULT_MSG(\"Memory fault: \");\n    cfsr >>= SCB_CFSR_MEMFAULTSR_Pos; // right shift to lsb\n    if ((cfsr & (1 << 0)) != 0)\n        FAULT_MSG(\"Instruction access violation\\n\");\n    if ((cfsr & (1 << 1)) != 0)\n        FAULT_MSG(\"Data access violation\\n\");\n}\n\nextern \"C\" void HardFault_Impl(uint32_t stack[])\n{\n    FAULT_MSG(\"Hard Fault occurred! SCB->HFSR = 0x%08lx\\n\", SCB->HFSR);\n\n    if ((SCB->HFSR & SCB_HFSR_FORCED_Msk) != 0) {\n        FAULT_MSG(\"Forced Hard Fault: SCB->CFSR = 0x%08lx\\n\", SCB->CFSR);\n\n        if ((SCB->CFSR & SCB_CFSR_USGFAULTSR_Msk) != 0) {\n            printUsageErrorMsg(SCB->CFSR);\n        }\n        if ((SCB->CFSR & SCB_CFSR_BUSFAULTSR_Msk) != 0) {\n            printBusErrorMsg(SCB->CFSR);\n        }\n        if ((SCB->CFSR & SCB_CFSR_MEMFAULTSR_Msk) != 0) {\n            printMemErrorMsg(SCB->CFSR);\n        }\n\n        FAULT_MSG(\"r0  = 0x%08lx\\n\", stack[r0]);\n        FAULT_MSG(\"r1  = 0x%08lx\\n\", stack[r1]);\n        FAULT_MSG(\"r2  = 0x%08lx\\n\", stack[r2]);\n        FAULT_MSG(\"r3  = 0x%08lx\\n\", stack[r3]);\n        FAULT_MSG(\"r12 = 0x%08lx\\n\", stack[r12]);\n        FAULT_MSG(\"lr  = 0x%08lx\\n\", stack[lr]);\n        FAULT_MSG(\"pc  = 0x%08lx\\n\", stack[pc]);\n        FAULT_MSG(\"psr = 0x%08lx\\n\", stack[psr]);\n    }\n\n    FAULT_MSG(\"Done with fault report - Waiting to reboot\\n\");\n    asm volatile(\"bkpt #01\"); // Enter the debugger if one is connected\n\n    // Don't spin, so that the debugger will let the user step to next instruction\n    // while (1) ;\n}\n\n#ifndef INC_FREERTOS_H\n// This is a generic cortex M entrypoint that doesn't assume freertos\n\nextern \"C\" void HardFault_Handler(void)\n{\n    asm volatile(\" mrs r0,msp\\n\"\n                 \" b HardFault_Impl \\n\");\n}\n#elif !defined(ARCH_NRF52)\n\n/* The prototype shows it is a naked function - in effect this is just an\nassembly function. */\nextern \"C\" void HardFault_Handler(void) __attribute__((naked));\n\n/* The fault handler implementation calls a function called\nprvGetRegistersFromStack(). */\nextern \"C\" void HardFault_Handler(void)\n{\n    __asm volatile(\" tst lr, #4                                                \\n\"\n                   \" ite eq                                                    \\n\"\n                   \" mrseq r0, msp                                             \\n\"\n                   \" mrsne r0, psp                                             \\n\"\n                   \" ldr r1, [r0, #24]                                         \\n\"\n                   \" ldr r2, handler2_address_const                            \\n\"\n                   \" bx r2                                                     \\n\"\n                   \" handler2_address_const: .word HardFault_Impl    \\n\");\n}\n#endif\n"
  },
  {
    "path": "src/platform/nrf52/main-bare.cpp",
    "content": "#include \"target_specific.h\"\n"
  },
  {
    "path": "src/platform/nrf52/main-nrf52.cpp",
    "content": "#include \"configuration.h\"\n#include <Adafruit_TinyUSB.h>\n#include <Adafruit_nRFCrypto.h>\n#include <InternalFileSystem.h>\n#include <SPI.h>\n#include <Wire.h>\n\n#define APP_WATCHDOG_SECS 90\n#define NRFX_WDT_ENABLED 1\n#define NRFX_WDT0_ENABLED 1\n#define NRFX_WDT_CONFIG_NO_IRQ 1\n#include \"nrfx_power.h\"\n#include <assert.h>\n#include <ble_gap.h>\n#include <memory.h>\n#include <nrfx_wdt.c>\n#include <nrfx_wdt.h>\n#include <stdio.h>\n// #include <Adafruit_USBD_Device.h>\n#include \"NodeDB.h\"\n#include \"PowerMon.h\"\n#include \"error.h\"\n#include \"main.h\"\n#include \"meshUtils.h\"\n#include \"power.h\"\n#include <power/PowerHAL.h>\n\n#include <hal/nrf_lpcomp.h>\n\n#ifdef BQ25703A_ADDR\n#include \"BQ25713.h\"\n#endif\n\n// WARNING! THRESHOLD + HYSTERESIS should be less than regulated VDD voltage - which depends on board\n// and is 3.0 or 3.3V. Also VDD likes to read values like 2.9999 so make sure you account for that\n// otherwise board will not boot at all. Before you modify this part - please triple read NRF52840 power design\n// section in datasheet and you understand how REG0 and REG1 regulators work together.\n#ifndef SAFE_VDD_VOLTAGE_THRESHOLD\n#define SAFE_VDD_VOLTAGE_THRESHOLD 2.7\n#endif\n\n// hysteresis value\n#ifndef SAFE_VDD_VOLTAGE_THRESHOLD_HYST\n#define SAFE_VDD_VOLTAGE_THRESHOLD_HYST 0.2\n#endif\n\nuint16_t getVDDVoltage();\n\n// Weak empty variant shutdown prep function.\n// May be redefined by variant files.\nvoid variant_shutdown() __attribute__((weak));\nvoid variant_shutdown() {}\n\nstatic nrfx_wdt_t nrfx_wdt = NRFX_WDT_INSTANCE(0);\nstatic nrfx_wdt_channel_id nrfx_wdt_channel_id_nrf52_main;\n\n// This is a public global so that the debugger can set it to false automatically from our gdbinit\n// @phaseloop comment: most part of codebase, including filesystem flash driver depend on softdevice\n// methods so disabling it may actually crash thing. Proceed with caution.\n\nbool useSoftDevice = true; // Set to false for easier debugging\n\nstatic inline void debugger_break(void)\n{\n    __asm volatile(\"bkpt #0x01\\n\\t\"\n                   \"mov pc, lr\\n\\t\");\n}\n\n// PowerHAL NRF52 specific function implementations\nbool powerHAL_isVBUSConnected()\n{\n    return NRF_POWER->USBREGSTATUS & POWER_USBREGSTATUS_VBUSDETECT_Msk;\n}\n\nbool powerHAL_isPowerLevelSafe()\n{\n\n    static bool powerLevelSafe = true;\n\n    uint16_t threshold = SAFE_VDD_VOLTAGE_THRESHOLD * 1000; // convert V to mV\n    uint16_t hysteresis = SAFE_VDD_VOLTAGE_THRESHOLD_HYST * 1000;\n\n    if (powerLevelSafe) {\n        if (getVDDVoltage() < threshold) {\n            powerLevelSafe = false;\n        }\n    } else {\n        // power level is only safe again when it raises above threshold + hysteresis\n        if (getVDDVoltage() >= (threshold + hysteresis)) {\n            powerLevelSafe = true;\n        }\n    }\n\n    return powerLevelSafe;\n}\n\nvoid powerHAL_platformInit()\n{\n\n    // Enable POF power failure comparator. It will prevent writing to NVMC flash when supply voltage is too low.\n    // Set to some low value as last resort - powerHAL_isPowerLevelSafe uses different method and should manage proper node\n    // behaviour on its own.\n\n    // POFWARN is pretty useless for node power management because it triggers only once and clearing this event will not\n    // re-trigger it again until voltage rises to safe level and drops again. So we will use SAADC routed to VDD to read safely\n    // voltage.\n\n    // @phaseloop: I disable POFCON for now because it seems to be unreliable or buggy. Even when set at 2.0V it\n    // triggers below 2.8V and corrupts data when pairing bluetooth - because it prevents filesystem writes and\n    // adafruit BLE library triggers lfs_assert which reboots node and formats filesystem.\n    // I did experiments with bench power supply and no matter what is set to POFCON, it always triggers right below\n    // 2.8V. I compared raw registry values with datasheet.\n\n    NRF_POWER->POFCON =\n        ((POWER_POFCON_THRESHOLD_V22 << POWER_POFCON_THRESHOLD_Pos) | (POWER_POFCON_POF_Enabled << POWER_POFCON_POF_Pos));\n\n    // remember to always match VBAT_AR_INTERNAL with AREF_VALUE in variant definition file\n#ifdef VBAT_AR_INTERNAL\n    analogReference(VBAT_AR_INTERNAL);\n#else\n    analogReference(AR_INTERNAL); // 3.6V\n#endif\n}\n\n// get VDD voltage (in millivolts)\nuint16_t getVDDVoltage()\n{\n    // we use the same values as regular battery read so there is no conflict on SAADC\n    analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);\n\n    // VDD range on NRF52840 is 1.8-3.3V so we need to remap analog reference to 3.6V\n    // let's hope battery reading runs in same task and we don't have race condition\n    analogReference(AR_INTERNAL);\n\n    uint16_t vddADCRead = analogReadVDD();\n    float voltage = ((1000 * 3.6) / pow(2, BATTERY_SENSE_RESOLUTION_BITS)) * vddADCRead;\n\n// restore default battery reading reference\n#ifdef VBAT_AR_INTERNAL\n    analogReference(VBAT_AR_INTERNAL);\n#endif\n\n    return voltage;\n}\n\nbool loopCanSleep()\n{\n    // turn off sleep only while connected via USB\n    // return true;\n    return !Serial; // the bool operator on the nrf52 serial class returns true if connected to a PC currently\n    // return !(TinyUSBDevice.mounted() && !TinyUSBDevice.suspended());\n}\n\n// handle standard gcc assert failures\nvoid __attribute__((noreturn)) __assert_func(const char *file, int line, const char *func, const char *failedexpr)\n{\n    LOG_ERROR(\"assert failed %s: %d, %s, test=%s\", file, line, func, failedexpr);\n    // debugger_break(); FIXME doesn't work, possibly not for segger\n    // Reboot cpu\n    NVIC_SystemReset();\n}\n\nvoid getMacAddr(uint8_t *dmac)\n{\n    const uint8_t *src = (const uint8_t *)NRF_FICR->DEVICEADDR;\n    dmac[5] = src[0];\n    dmac[4] = src[1];\n    dmac[3] = src[2];\n    dmac[2] = src[3];\n    dmac[1] = src[4];\n    dmac[0] = src[5] | 0xc0; // MSB high two bits get set elsewhere in the bluetooth stack\n}\n\n#if !MESHTASTIC_EXCLUDE_BLUETOOTH\nvoid setBluetoothEnable(bool enable)\n{\n    // For debugging use: don't use bluetooth\n    if (!useSoftDevice) {\n        if (enable)\n            LOG_INFO(\"Disable NRF52 BLUETOOTH WHILE DEBUGGING\");\n        return;\n    }\n\n    // If user disabled bluetooth: init then disable advertising & reduce power\n    // Workaround. Avoid issue where device hangs several days after boot..\n    // Allegedly, no significant increase in power consumption\n    if (!config.bluetooth.enabled) {\n        static bool initialized = false;\n        if (!initialized) {\n            nrf52Bluetooth = new NRF52Bluetooth();\n            nrf52Bluetooth->startDisabled();\n            initialized = true;\n        }\n        return;\n    }\n\n    if (enable) {\n        powerMon->setState(meshtastic_PowerMon_State_BT_On);\n\n        // If not yet set-up\n        if (!nrf52Bluetooth) {\n            LOG_DEBUG(\"Init NRF52 Bluetooth\");\n            nrf52Bluetooth = new NRF52Bluetooth();\n            nrf52Bluetooth->setup();\n        }\n        // Already setup, apparently\n        else\n            nrf52Bluetooth->resumeAdvertising();\n    }\n    // Disable (if previously set-up)\n    else if (nrf52Bluetooth) {\n        powerMon->clearState(meshtastic_PowerMon_State_BT_On);\n        nrf52Bluetooth->shutdown();\n    }\n}\n#else\n#warning NRF52 \"Bluetooth disable\" workaround does not apply to builds with MESHTASTIC_EXCLUDE_BLUETOOTH\nvoid setBluetoothEnable(bool enable) {}\n#endif\n/**\n * Override printf to use the SEGGER output library (note - this does not effect the printf method on the debug console)\n */\nint printf(const char *fmt, ...)\n{\n    va_list args;\n    va_start(args, fmt);\n    auto res = SEGGER_RTT_vprintf(0, fmt, &args);\n    va_end(args);\n    return res;\n}\n\nnamespace\n{\nconstexpr uint8_t NRF52_MAGIC_LFS_IS_CORRUPT = 0xF5;\nconstexpr uint32_t MULTIPLE_CORRUPTION_DELAY_MILLIS = 20 * 60 * 1000;\nstatic unsigned long millis_until_formatting_again = 0;\n\n// Report the critical error from loop(), giving a chance for the screen to be initialized first.\ninline void reportLittleFSCorruptionOnce()\n{\n    static bool report_corruption = !!millis_until_formatting_again;\n    if (report_corruption) {\n        report_corruption = false;\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE);\n    }\n}\n} // namespace\n\nvoid preFSBegin()\n{\n    // The GPREGRET register keeps its value across warm boots. Check that this is a warm boot and, if GPREGRET\n    // is set to NRF52_MAGIC_LFS_IS_CORRUPT, format LittleFS.\n    if (!(NRF_POWER->RESETREAS == 0 && NRF_POWER->GPREGRET == NRF52_MAGIC_LFS_IS_CORRUPT))\n        return;\n    NRF_POWER->GPREGRET = 0;\n    millis_until_formatting_again = millis() + MULTIPLE_CORRUPTION_DELAY_MILLIS;\n    InternalFS.format();\n    LOG_INFO(\"LittleFS format complete; restoring default settings\");\n}\n\nextern \"C\" void lfs_assert(const char *reason)\n{\n    LOG_ERROR(\"LittleFS corruption detected: %s\", reason);\n    if (millis_until_formatting_again > millis()) {\n        RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE);\n        const long millis_remain = millis_until_formatting_again - millis();\n        LOG_WARN(\"Pausing %d seconds to avoid wear on flash storage\", millis_remain / 1000);\n        delay(millis_remain);\n    }\n    LOG_INFO(\"Rebooting to format LittleFS\");\n    delay(500); // Give the serial port a bit of time to output that last message.\n    // Try setting GPREGRET with the SoftDevice first. If that fails (perhaps because the SD hasn't been initialize yet) then set\n    // NRF_POWER->GPREGRET directly.\n\n    // TODO: this will/can crash CPU if bluetooth stack is not compiled in or bluetooth is not initialized\n    // (regardless if enabled or disabled) - as there is no live SoftDevice stack\n    // implement \"safe\" functions detecting softdevice stack state and using proper method to set registers\n\n    // do not set GPREGRET if POFWARN is triggered because it means lfs_assert reports flash undervoltage protection\n    // and not data corruption. Reboot is fine as boot procedure will wait until power level is safe again\n\n    if (!NRF_POWER->EVENTS_POFWARN) {\n        if (!(sd_power_gpregret_clr(0, 0xFF) == NRF_SUCCESS &&\n              sd_power_gpregret_set(0, NRF52_MAGIC_LFS_IS_CORRUPT) == NRF_SUCCESS)) {\n            NRF_POWER->GPREGRET = NRF52_MAGIC_LFS_IS_CORRUPT;\n        }\n    }\n\n    // TODO: this should not be done when SoftDevice is enabled as device will not boot back on soft reset\n    // as some data is retained in RAM which will prevent re-enabling bluetooth stack\n    // Google what Nordic has to say about NVIC_* + SoftDevice\n    NVIC_SystemReset();\n}\n\nvoid checkSDEvents()\n{\n    if (useSoftDevice) {\n        uint32_t evt;\n        while (NRF_SUCCESS == sd_evt_get(&evt)) {\n            switch (evt) {\n            case NRF_EVT_POWER_FAILURE_WARNING:\n                RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_BROWNOUT);\n                break;\n\n            default:\n                LOG_DEBUG(\"Unexpected SDevt %d\", evt);\n                break;\n            }\n        }\n    } else {\n        if (NRF_POWER->EVENTS_POFWARN)\n            RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_BROWNOUT);\n    }\n}\n\nvoid nrf52Loop()\n{\n    {\n        static bool watchdog_running = false;\n        if (!watchdog_running) {\n            nrfx_wdt_enable(&nrfx_wdt);\n            watchdog_running = true;\n        }\n    }\n    nrfx_wdt_channel_feed(&nrfx_wdt, nrfx_wdt_channel_id_nrf52_main);\n\n    checkSDEvents();\n    reportLittleFSCorruptionOnce();\n}\n\n#ifdef USE_SEMIHOSTING\n#include <SemihostingStream.h>\n#include <meshUtils.h>\n\n/**\n * Note: this variable is in BSS and therfore false by default.  But the gdbinit\n * file will be installing a temporary breakpoint that changes wantSemihost to true.\n */\nbool wantSemihost;\n\n/**\n * Turn on semihosting if the ICE debugger wants it.\n */\nvoid nrf52InitSemiHosting()\n{\n    if (wantSemihost) {\n        static SemihostingStream semiStream;\n        // We must dynamically alloc because the constructor does semihost operations which\n        // would crash any load not talking to a debugger\n        semiStream.open();\n        semiStream.println(\"Semihosting starts!\");\n        // Redirect our serial output to instead go via the ICE port\n        console->setDestination(&semiStream);\n    }\n}\n#endif\n\nvoid nrf52Setup()\n{\n#ifdef ADC_V\n    pinMode(ADC_V, INPUT);\n#endif\n\n    uint32_t why = NRF_POWER->RESETREAS;\n    // per\n    // https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fpower.html\n    LOG_DEBUG(\"Reset reason: 0x%x\", why);\n\n#ifdef USE_SEMIHOSTING\n    nrf52InitSemiHosting();\n#endif\n\n    // Per\n    // https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/monitor-mode-debugging-with-j-link-and-gdbeclipse\n    // This is the recommended setting for Monitor Mode Debugging\n    NVIC_SetPriority(DebugMonitor_IRQn, 6UL);\n\n#ifdef BQ25703A_ADDR\n    auto *bq = new BQ25713();\n    if (!bq->setup())\n        LOG_ERROR(\"ERROR! Charge controller init failed\");\n#endif\n\n    // Init random seed\n    union seedParts {\n        uint32_t seed32;\n        uint8_t seed8[4];\n    } seed;\n    nRFCrypto.begin();\n    nRFCrypto.Random.generate(seed.seed8, sizeof(seed.seed8));\n    LOG_DEBUG(\"Set random seed %u\", seed.seed32);\n    randomSeed(seed.seed32);\n    nRFCrypto.end();\n\n    // Set up nrfx watchdog. Do not enable the watchdog yet (we do that\n    // the first time through the main loop), so that other threads can\n    // allocate their own wdt channel to protect themselves from hangs.\n    nrfx_wdt_config_t wdt0_config = {\n        .behaviour = NRF_WDT_BEHAVIOUR_PAUSE_SLEEP_HALT, .reload_value = APP_WATCHDOG_SECS * 1000,\n        // Note: Not using wdt interrupts.\n        // .interrupt_priority = NRFX_WDT_DEFAULT_CONFIG_IRQ_PRIORITY\n    };\n    nrfx_err_t r = nrfx_wdt_init(&nrfx_wdt, &wdt0_config,\n                                 nullptr // Watchdog event handler, not used, we just reset.\n    );\n    assert(r == NRFX_SUCCESS);\n\n    r = nrfx_wdt_channel_alloc(&nrfx_wdt, &nrfx_wdt_channel_id_nrf52_main);\n    assert(r == NRFX_SUCCESS);\n}\n\nvoid cpuDeepSleep(uint32_t msecToWake)\n{\n    // FIXME, configure RTC or button press to wake us\n    // FIXME, power down SPI, I2C, RAMs\n#if HAS_WIRE\n    Wire.end();\n#endif\n    SPI.end();\n#if SPI_INTERFACES_COUNT > 1\n    SPI1.end();\n#endif\n    if (Serial)       // Another check in case of disabled default serial, does nothing bad\n        Serial.end(); // This may cause crashes as debug messages continue to flow.\n\n        // This causes troubles with waking up on nrf52 (on pro-micro in particular):\n        // we have no Serial1 in use on nrf52, check Serial and GPS modules.\n#ifdef PIN_SERIAL1_RX\n    if (Serial1) // A straightforward solution to the wake from deepsleep problem\n        Serial1.end();\n#endif\n\n    setBluetoothEnable(false);\n\n#ifdef RAK4630\n#ifdef PIN_3V3_EN\n    digitalWrite(PIN_3V3_EN, LOW);\n#endif\n#ifdef AQ_SET_PIN\n    // RAK-12039 set pin for Air quality sensor\n    digitalWrite(AQ_SET_PIN, LOW);\n#endif\n#endif\n    // Run shutdown code if specified in variant.cpp\n    variant_shutdown();\n\n    // Sleepy trackers or sensors can low power \"sleep\"\n    // Don't enter this if we're sleeping portMAX_DELAY, since that's a shutdown event\n    if (msecToWake != portMAX_DELAY &&\n        (IS_ONE_OF(config.device.role, meshtastic_Config_DeviceConfig_Role_TRACKER,\n                   meshtastic_Config_DeviceConfig_Role_TAK_TRACKER, meshtastic_Config_DeviceConfig_Role_SENSOR) &&\n         config.power.is_power_saving == true)) {\n        sd_power_mode_set(NRF_POWER_MODE_LOWPWR);\n        delay(msecToWake);\n        NVIC_SystemReset();\n    } else {\n        // Resume on user button press\n        // https://github.com/lyusupov/SoftRF/blob/81c519ca75693b696752235d559e881f2e0511ee/software/firmware/source/SoftRF/src/platform/nRF52.cpp#L1738\n        constexpr uint32_t DFU_MAGIC_SKIP = 0x6d;\n        sd_power_gpregret_clr(0, 0xFF);           // Clear the register before setting a new values in it for stability reasons\n        sd_power_gpregret_set(0, DFU_MAGIC_SKIP); // Equivalent NRF_POWER->GPREGRET = DFU_MAGIC_SKIP\n\n        // FIXME, use system off mode with ram retention for key state?\n        // FIXME, use non-init RAM per\n        // https://devzone.nordicsemi.com/f/nordic-q-a/48919/ram-retention-settings-with-softdevice-enabled\n\n#ifdef BATTERY_LPCOMP_INPUT\n        // Wake up if power rises again\n        nrf_lpcomp_config_t c;\n        c.reference = BATTERY_LPCOMP_THRESHOLD;\n        c.detection = NRF_LPCOMP_DETECT_UP;\n        c.hyst = NRF_LPCOMP_HYST_NOHYST;\n        nrf_lpcomp_configure(NRF_LPCOMP, &c);\n        nrf_lpcomp_input_select(NRF_LPCOMP, BATTERY_LPCOMP_INPUT);\n        nrf_lpcomp_enable(NRF_LPCOMP);\n\n        battery_adcEnable();\n\n        nrf_lpcomp_task_trigger(NRF_LPCOMP, NRF_LPCOMP_TASK_START);\n        while (!nrf_lpcomp_event_check(NRF_LPCOMP, NRF_LPCOMP_EVENT_READY))\n            ;\n#endif\n\n        auto ok = sd_power_system_off();\n        if (ok != NRF_SUCCESS) {\n            LOG_ERROR(\"FIXME: Ignoring soft device (EasyDMA pending?) and forcing system-off!\");\n            NRF_POWER->SYSTEMOFF = 1;\n        }\n    }\n\n    // The following code should not be run, because we are off\n    while (1) {\n        delay(5000);\n        LOG_DEBUG(\".\");\n    }\n}\n\nvoid clearBonds()\n{\n    if (!nrf52Bluetooth) {\n        nrf52Bluetooth = new NRF52Bluetooth();\n        nrf52Bluetooth->setup();\n    }\n    nrf52Bluetooth->clearBonds();\n}\n\nvoid enterDfuMode()\n{\n// SDK kit does not have native USB like almost all other NRF52 boards\n#ifdef NRF_USE_SERIAL_DFU\n    enterSerialDfu();\n#else\n    enterUf2Dfu();\n#endif\n}\n"
  },
  {
    "path": "src/platform/nrf52/nrf52840_s140_v7.ld",
    "content": "/* Linker script to configure memory regions. */\n\nSEARCH_DIR(.)\nGROUP(-lgcc -lc -lnosys)\n\nMEMORY\n{\n  FLASH (rx)     : ORIGIN = 0x27000, LENGTH = 0xED000 - 0x27000\n\n  /* SRAM required by Softdevice depend on\n   * - Attribute Table Size (Number of Services and Characteristics)\n   * - Vendor UUID count\n   * - Max ATT MTU\n   * - Concurrent connection peripheral + central + secure links\n   * - Event Len, HVN queue, Write CMD queue\n   */ \n  RAM (rwx) :  ORIGIN = 0x20006000, LENGTH = 0x20040000 - 0x20006000\n}\n\nSECTIONS\n{\n  . = ALIGN(4);\n  .svc_data :\n  {\n    PROVIDE(__start_svc_data = .);\n    KEEP(*(.svc_data))\n    PROVIDE(__stop_svc_data = .);\n  } > RAM\n  \n  .fs_data :\n  {\n    PROVIDE(__start_fs_data = .);\n    KEEP(*(.fs_data))\n    PROVIDE(__stop_fs_data = .);\n  } > RAM\n} INSERT AFTER .data;\n\nINCLUDE \"nrf52_common.ld\"\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_COMMON BLE SoftDevice Common\n  @{\n  @defgroup ble_api Events, type definitions and API calls\n  @{\n\n  @brief Module independent events, type definitions and API calls for the BLE SoftDevice.\n\n */\n\n#ifndef BLE_H__\n#define BLE_H__\n\n#include \"ble_err.h\"\n#include \"ble_gap.h\"\n#include \"ble_gatt.h\"\n#include \"ble_gattc.h\"\n#include \"ble_gatts.h\"\n#include \"ble_l2cap.h\"\n#include \"nrf_error.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup BLE_COMMON_ENUMERATIONS Enumerations\n * @{ */\n\n/**\n * @brief Common API SVC numbers.\n */\nenum BLE_COMMON_SVCS {\n    SD_BLE_ENABLE = BLE_SVC_BASE, /**< Enable and initialize the BLE stack */\n    SD_BLE_EVT_GET,               /**< Get an event from the pending events queue. */\n    SD_BLE_UUID_VS_ADD,           /**< Add a Vendor Specific base UUID. */\n    SD_BLE_UUID_DECODE,           /**< Decode UUID bytes. */\n    SD_BLE_UUID_ENCODE,           /**< Encode UUID bytes. */\n    SD_BLE_VERSION_GET,    /**< Get the local version information (company ID, Link Layer Version, Link Layer Subversion). */\n    SD_BLE_USER_MEM_REPLY, /**< User Memory Reply. */\n    SD_BLE_OPT_SET,        /**< Set a BLE option. */\n    SD_BLE_OPT_GET,        /**< Get a BLE option. */\n    SD_BLE_CFG_SET,        /**< Add a configuration to the BLE stack. */\n    SD_BLE_UUID_VS_REMOVE, /**< Remove a Vendor Specific base UUID. */\n};\n\n/**\n * @brief BLE Module Independent Event IDs.\n */\nenum BLE_COMMON_EVTS {\n    BLE_EVT_USER_MEM_REQUEST = BLE_EVT_BASE + 0, /**< User Memory request. See @ref ble_evt_user_mem_request_t\n                                                   \\n Reply with @ref sd_ble_user_mem_reply. */\n    BLE_EVT_USER_MEM_RELEASE = BLE_EVT_BASE + 1, /**< User Memory release. See @ref ble_evt_user_mem_release_t */\n};\n\n/**@brief BLE Connection Configuration IDs.\n *\n * IDs that uniquely identify a connection configuration.\n */\nenum BLE_CONN_CFGS {\n    BLE_CONN_CFG_GAP = BLE_CONN_CFG_BASE + 0,   /**< BLE GAP specific connection configuration. */\n    BLE_CONN_CFG_GATTC = BLE_CONN_CFG_BASE + 1, /**< BLE GATTC specific connection configuration. */\n    BLE_CONN_CFG_GATTS = BLE_CONN_CFG_BASE + 2, /**< BLE GATTS specific connection configuration. */\n    BLE_CONN_CFG_GATT = BLE_CONN_CFG_BASE + 3,  /**< BLE GATT specific connection configuration. */\n    BLE_CONN_CFG_L2CAP = BLE_CONN_CFG_BASE + 4, /**< BLE L2CAP specific connection configuration. */\n};\n\n/**@brief BLE Common Configuration IDs.\n *\n * IDs that uniquely identify a common configuration.\n */\nenum BLE_COMMON_CFGS {\n    BLE_COMMON_CFG_VS_UUID = BLE_CFG_BASE, /**< Vendor specific base UUID configuration */\n};\n\n/**@brief Common Option IDs.\n * IDs that uniquely identify a common option.\n */\nenum BLE_COMMON_OPTS {\n    BLE_COMMON_OPT_PA_LNA = BLE_OPT_BASE + 0,          /**< PA and LNA options */\n    BLE_COMMON_OPT_CONN_EVT_EXT = BLE_OPT_BASE + 1,    /**< Extended connection events option */\n    BLE_COMMON_OPT_EXTENDED_RC_CAL = BLE_OPT_BASE + 2, /**< Extended RC calibration option */\n};\n\n/** @} */\n\n/** @addtogroup BLE_COMMON_DEFINES Defines\n * @{ */\n\n/** @brief  Required pointer alignment for BLE Events.\n */\n#define BLE_EVT_PTR_ALIGNMENT 4\n\n/** @brief  Leaves the maximum of the two arguments.\n */\n#define BLE_MAX(a, b) ((a) < (b) ? (b) : (a))\n\n/** @brief  Maximum possible length for BLE Events.\n * @note The highest value used for @ref ble_gatt_conn_cfg_t::att_mtu in any connection configuration shall be used as a\n * parameter. If that value has not been configured for any connections then @ref BLE_GATT_ATT_MTU_DEFAULT must be used instead.\n */\n#define BLE_EVT_LEN_MAX(ATT_MTU)                                                                                                 \\\n    (offsetof(ble_evt_t, evt.gattc_evt.params.prim_srvc_disc_rsp.services) + ((ATT_MTU)-1) / 4 * sizeof(ble_gattc_service_t))\n\n/** @defgroup BLE_USER_MEM_TYPES User Memory Types\n * @{ */\n#define BLE_USER_MEM_TYPE_INVALID 0x00             /**< Invalid User Memory Types. */\n#define BLE_USER_MEM_TYPE_GATTS_QUEUED_WRITES 0x01 /**< User Memory for GATTS queued writes. */\n/** @} */\n\n/** @defgroup BLE_UUID_VS_COUNTS Vendor Specific base UUID counts\n * @{\n */\n#define BLE_UUID_VS_COUNT_DEFAULT 10 /**< Default VS UUID count. */\n#define BLE_UUID_VS_COUNT_MAX 254    /**< Maximum VS UUID count. */\n/** @} */\n\n/** @defgroup BLE_COMMON_CFG_DEFAULTS Configuration defaults.\n * @{\n */\n#define BLE_CONN_CFG_TAG_DEFAULT 0 /**< Default configuration tag, SoftDevice default connection configuration. */\n\n/** @} */\n\n/** @} */\n\n/** @addtogroup BLE_COMMON_STRUCTURES Structures\n * @{ */\n\n/**@brief User Memory Block. */\ntypedef struct {\n    uint8_t *p_mem; /**< Pointer to the start of the user memory block. */\n    uint16_t len;   /**< Length in bytes of the user memory block. */\n} ble_user_mem_block_t;\n\n/**@brief Event structure for @ref BLE_EVT_USER_MEM_REQUEST. */\ntypedef struct {\n    uint8_t type; /**< User memory type, see @ref BLE_USER_MEM_TYPES. */\n} ble_evt_user_mem_request_t;\n\n/**@brief Event structure for @ref BLE_EVT_USER_MEM_RELEASE. */\ntypedef struct {\n    uint8_t type;                   /**< User memory type, see @ref BLE_USER_MEM_TYPES. */\n    ble_user_mem_block_t mem_block; /**< User memory block */\n} ble_evt_user_mem_release_t;\n\n/**@brief Event structure for events not associated with a specific function module. */\ntypedef struct {\n    uint16_t conn_handle; /**< Connection Handle on which this event occurred. */\n    union {\n        ble_evt_user_mem_request_t user_mem_request; /**< User Memory Request Event Parameters. */\n        ble_evt_user_mem_release_t user_mem_release; /**< User Memory Release Event Parameters. */\n    } params;                                        /**< Event parameter union. */\n} ble_common_evt_t;\n\n/**@brief BLE Event header. */\ntypedef struct {\n    uint16_t evt_id;  /**< Value from a BLE_<module>_EVT series. */\n    uint16_t evt_len; /**< Length in octets including this header. */\n} ble_evt_hdr_t;\n\n/**@brief Common BLE Event type, wrapping the module specific event reports. */\ntypedef struct {\n    ble_evt_hdr_t header; /**< Event header. */\n    union {\n        ble_common_evt_t common_evt; /**< Common Event, evt_id in BLE_EVT_* series. */\n        ble_gap_evt_t gap_evt;       /**< GAP originated event, evt_id in BLE_GAP_EVT_* series. */\n        ble_gattc_evt_t gattc_evt;   /**< GATT client originated event, evt_id in BLE_GATTC_EVT* series. */\n        ble_gatts_evt_t gatts_evt;   /**< GATT server originated event, evt_id in BLE_GATTS_EVT* series. */\n        ble_l2cap_evt_t l2cap_evt;   /**< L2CAP originated event, evt_id in BLE_L2CAP_EVT* series. */\n    } evt;                           /**< Event union. */\n} ble_evt_t;\n\n/**\n * @brief Version Information.\n */\ntypedef struct {\n    uint8_t version_number; /**< Link Layer Version number. See\n                               https://www.bluetooth.org/en-us/specification/assigned-numbers/link-layer for assigned values. */\n    uint16_t company_id;    /**< Company ID, Nordic Semiconductor's company ID is 89 (0x0059)\n                               (https://www.bluetooth.org/apps/content/Default.aspx?doc_id=49708). */\n    uint16_t\n        subversion_number; /**< Link Layer Sub Version number, corresponds to the SoftDevice Config ID or Firmware ID (FWID). */\n} ble_version_t;\n\n/**\n * @brief Configuration parameters for the PA and LNA.\n */\ntypedef struct {\n    uint8_t enable : 1;      /**< Enable toggling for this amplifier */\n    uint8_t active_high : 1; /**< Set the pin to be active high */\n    uint8_t gpio_pin : 6;    /**< The GPIO pin to toggle for this amplifier */\n} ble_pa_lna_cfg_t;\n\n/**\n * @brief PA & LNA GPIO toggle configuration\n *\n * This option configures the SoftDevice to toggle pins when the radio is active for use with a power amplifier and/or\n * a low noise amplifier.\n *\n * Toggling the pins is achieved by using two PPI channels and a GPIOTE channel. The hardware channel IDs are provided\n * by the application and should be regarded as reserved as long as any PA/LNA toggling is enabled.\n *\n * @note  @ref sd_ble_opt_get is not supported for this option.\n * @note  Setting this option while the radio is in use (i.e. any of the roles are active) may have undefined consequences\n * and must be avoided by the application.\n */\ntypedef struct {\n    ble_pa_lna_cfg_t pa_cfg;  /**< Power Amplifier configuration */\n    ble_pa_lna_cfg_t lna_cfg; /**< Low Noise Amplifier configuration */\n\n    uint8_t ppi_ch_id_set; /**< PPI channel used for radio pin setting */\n    uint8_t ppi_ch_id_clr; /**< PPI channel used for radio pin clearing */\n    uint8_t gpiote_ch_id;  /**< GPIOTE channel used for radio pin toggling */\n} ble_common_opt_pa_lna_t;\n\n/**\n * @brief Configuration of extended BLE connection events.\n *\n * When enabled the SoftDevice will dynamically extend the connection event when possible.\n *\n * The connection event length is controlled by the connection configuration as set by @ref ble_gap_conn_cfg_t::event_length.\n * The connection event can be extended if there is time to send another packet pair before the start of the next connection\n * interval, and if there are no conflicts with other BLE roles requesting radio time.\n *\n * @note @ref sd_ble_opt_get is not supported for this option.\n */\ntypedef struct {\n    uint8_t enable : 1; /**< Enable extended BLE connection events, disabled by default. */\n} ble_common_opt_conn_evt_ext_t;\n\n/**\n * @brief Enable/disable extended RC calibration.\n *\n * If extended RC calibration is enabled and the internal RC oscillator (@ref NRF_CLOCK_LF_SRC_RC) is used as the SoftDevice\n * LFCLK source, the SoftDevice as a peripheral will by default try to increase the receive window if two consecutive packets\n * are not received. If it turns out that the packets were not received due to clock drift, the RC calibration is started.\n * This calibration comes in addition to the periodic calibration that is configured by @ref sd_softdevice_enable(). When\n * using only peripheral connections, the periodic calibration can therefore be configured with a much longer interval as the\n * peripheral will be able to detect and adjust automatically to clock drift, and calibrate on demand.\n *\n * If extended RC calibration is disabled and the internal RC oscillator is used as the SoftDevice LFCLK source, the\n * RC oscillator is calibrated periodically as configured by @ref sd_softdevice_enable().\n *\n * @note @ref sd_ble_opt_get is not supported for this option.\n */\ntypedef struct {\n    uint8_t enable : 1; /**< Enable extended RC calibration, enabled by default. */\n} ble_common_opt_extended_rc_cal_t;\n\n/**@brief Option structure for common options. */\ntypedef union {\n    ble_common_opt_pa_lna_t pa_lna;                   /**< Parameters for controlling PA and LNA pin toggling. */\n    ble_common_opt_conn_evt_ext_t conn_evt_ext;       /**< Parameters for enabling extended connection events. */\n    ble_common_opt_extended_rc_cal_t extended_rc_cal; /**< Parameters for enabling extended RC calibration. */\n} ble_common_opt_t;\n\n/**@brief Common BLE Option type, wrapping the module specific options. */\ntypedef union {\n    ble_common_opt_t common_opt; /**< COMMON options, opt_id in @ref BLE_COMMON_OPTS series. */\n    ble_gap_opt_t gap_opt;       /**< GAP option, opt_id in @ref BLE_GAP_OPTS series. */\n    ble_gattc_opt_t gattc_opt;   /**< GATTC option, opt_id in @ref BLE_GATTC_OPTS series. */\n} ble_opt_t;\n\n/**@brief BLE connection configuration type, wrapping the module specific configurations, set with\n * @ref sd_ble_cfg_set.\n *\n * @note Connection configurations don't have to be set.\n * In the case that no configurations has been set, or fewer connection configurations has been set than enabled connections,\n * the default connection configuration will be automatically added for the remaining connections.\n * When creating connections with the default configuration, @ref BLE_CONN_CFG_TAG_DEFAULT should be used in\n * place of @ref ble_conn_cfg_t::conn_cfg_tag.\n *\n * @sa sd_ble_gap_adv_start()\n * @sa sd_ble_gap_connect()\n *\n * @mscs\n * @mmsc{@ref BLE_CONN_CFG}\n * @endmscs\n\n */\ntypedef struct {\n    uint8_t conn_cfg_tag; /**< The application chosen tag it can use with the\n                               @ref sd_ble_gap_adv_start() and @ref sd_ble_gap_connect() calls\n                               to select this configuration when creating a connection.\n                               Must be different for all connection configurations added and not @ref BLE_CONN_CFG_TAG_DEFAULT. */\n    union {\n        ble_gap_conn_cfg_t gap_conn_cfg;     /**< GAP connection configuration, cfg_id is @ref BLE_CONN_CFG_GAP. */\n        ble_gattc_conn_cfg_t gattc_conn_cfg; /**< GATTC connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTC. */\n        ble_gatts_conn_cfg_t gatts_conn_cfg; /**< GATTS connection configuration, cfg_id is @ref BLE_CONN_CFG_GATTS. */\n        ble_gatt_conn_cfg_t gatt_conn_cfg;   /**< GATT connection configuration, cfg_id is @ref BLE_CONN_CFG_GATT. */\n        ble_l2cap_conn_cfg_t l2cap_conn_cfg; /**< L2CAP connection configuration, cfg_id is @ref BLE_CONN_CFG_L2CAP. */\n    } params;                                /**< Connection configuration union. */\n} ble_conn_cfg_t;\n\n/**\n * @brief Configuration of Vendor Specific base UUIDs, set with @ref sd_ble_cfg_set.\n *\n * @retval ::NRF_ERROR_INVALID_PARAM Too many UUIDs configured.\n */\ntypedef struct {\n    uint8_t vs_uuid_count; /**< Number of 128-bit Vendor Specific base UUID bases to allocate memory for.\n                                Default value is @ref BLE_UUID_VS_COUNT_DEFAULT. Maximum value is\n                                @ref BLE_UUID_VS_COUNT_MAX. */\n} ble_common_cfg_vs_uuid_t;\n\n/**@brief Common BLE Configuration type, wrapping the common configurations. */\ntypedef union {\n    ble_common_cfg_vs_uuid_t vs_uuid_cfg; /**< Vendor Specific base UUID configuration, cfg_id is @ref BLE_COMMON_CFG_VS_UUID. */\n} ble_common_cfg_t;\n\n/**@brief BLE Configuration type, wrapping the module specific configurations. */\ntypedef union {\n    ble_conn_cfg_t conn_cfg;     /**< Connection specific configurations, cfg_id in @ref BLE_CONN_CFGS series. */\n    ble_common_cfg_t common_cfg; /**< Global common configurations, cfg_id in @ref BLE_COMMON_CFGS series. */\n    ble_gap_cfg_t gap_cfg;       /**< Global GAP configurations, cfg_id in @ref BLE_GAP_CFGS series. */\n    ble_gatts_cfg_t gatts_cfg;   /**< Global GATTS configuration, cfg_id in @ref BLE_GATTS_CFGS series. */\n} ble_cfg_t;\n\n/** @} */\n\n/** @addtogroup BLE_COMMON_FUNCTIONS Functions\n * @{ */\n\n/**@brief Enable the BLE stack\n *\n * @param[in, out] p_app_ram_base   Pointer to a variable containing the start address of the\n *                                  application RAM region (APP_RAM_BASE). On return, this will\n *                                  contain the minimum start address of the application RAM region\n *                                  required by the SoftDevice for this configuration.\n * @warning After this call, the SoftDevice may generate several events. The list of events provided\n *          below require the application to initiate a SoftDevice API call. The corresponding API call\n *          is referenced in the event documentation.\n *          If the application fails to do so, the BLE connection may timeout, or the SoftDevice may stop\n *          communicating with the peer device.\n *          - @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST\n *          - @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST\n *          - @ref BLE_GAP_EVT_PHY_UPDATE_REQUEST\n *          - @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST\n *          - @ref BLE_GAP_EVT_SEC_INFO_REQUEST\n *          - @ref BLE_GAP_EVT_SEC_REQUEST\n *          - @ref BLE_GAP_EVT_AUTH_KEY_REQUEST\n *          - @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST\n *          - @ref BLE_EVT_USER_MEM_REQUEST\n *          - @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST\n *\n * @note The memory requirement for a specific configuration will not increase between SoftDevices\n *       with the same major version number.\n *\n * @note At runtime the IC's RAM is split into 2 regions: The SoftDevice RAM region is located\n *       between 0x20000000 and APP_RAM_BASE-1 and the application's RAM region is located between\n *       APP_RAM_BASE and the start of the call stack.\n *\n * @details This call initializes the BLE stack, no BLE related function other than @ref\n *          sd_ble_cfg_set can be called before this one.\n *\n * @mscs\n * @mmsc{@ref BLE_COMMON_ENABLE}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS              The BLE stack has been initialized successfully.\n * @retval ::NRF_ERROR_INVALID_STATE  The BLE stack had already been initialized and cannot be reinitialized.\n * @retval ::NRF_ERROR_INVALID_ADDR   Invalid or not sufficiently aligned pointer supplied.\n * @retval ::NRF_ERROR_NO_MEM         One or more of the following is true:\n *                                    - The amount of memory assigned to the SoftDevice by *p_app_ram_base is not\n *                                      large enough to fit this configuration's memory requirement. Check *p_app_ram_base\n *                                      and set the start address of the application RAM region accordingly.\n *                                    - Dynamic part of the SoftDevice RAM region is larger then 64 kB which\n *                                      is currently not supported.\n * @retval ::NRF_ERROR_RESOURCES      The total number of L2CAP Channels configured using @ref sd_ble_cfg_set is too large.\n */\nSVCALL(SD_BLE_ENABLE, uint32_t, sd_ble_enable(uint32_t *p_app_ram_base));\n\n/**@brief Add configurations for the BLE stack\n *\n * @param[in] cfg_id              Config ID, see @ref BLE_CONN_CFGS, @ref BLE_COMMON_CFGS, @ref\n *                                BLE_GAP_CFGS or @ref BLE_GATTS_CFGS.\n * @param[in] p_cfg               Pointer to a ble_cfg_t structure containing the configuration value.\n * @param[in] app_ram_base        The start address of the application RAM region (APP_RAM_BASE).\n *                                See @ref sd_ble_enable for details about APP_RAM_BASE.\n *\n * @note The memory requirement for a specific configuration will not increase between SoftDevices\n *       with the same major version number.\n *\n * @note If a configuration is set more than once, the last one set is the one that takes effect on\n *       @ref sd_ble_enable.\n *\n * @note Any part of the BLE stack that is NOT configured with @ref sd_ble_cfg_set will have default\n *       configuration.\n *\n * @note @ref sd_ble_cfg_set may be called at any time when the SoftDevice is enabled (see @ref\n *       sd_softdevice_enable) while the BLE part of the SoftDevice is not enabled (see @ref\n *       sd_ble_enable).\n *\n * @note Error codes for the configurations are described in the configuration structs.\n *\n * @mscs\n * @mmsc{@ref BLE_COMMON_ENABLE}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS              The configuration has been added successfully.\n * @retval ::NRF_ERROR_INVALID_STATE  The BLE stack had already been initialized.\n * @retval ::NRF_ERROR_INVALID_ADDR   Invalid or not sufficiently aligned pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM  Invalid cfg_id supplied.\n * @retval ::NRF_ERROR_NO_MEM         The amount of memory assigned to the SoftDevice by app_ram_base is not\n *                                    large enough to fit this configuration's memory requirement.\n */\nSVCALL(SD_BLE_CFG_SET, uint32_t, sd_ble_cfg_set(uint32_t cfg_id, ble_cfg_t const *p_cfg, uint32_t app_ram_base));\n\n/**@brief Get an event from the pending events queue.\n *\n * @param[out] p_dest Pointer to buffer to be filled in with an event, or NULL to retrieve the event length.\n *                    This buffer <b>must be aligned to the extend defined by @ref BLE_EVT_PTR_ALIGNMENT</b>.\n *                    The buffer should be interpreted as a @ref ble_evt_t struct.\n * @param[in, out] p_len Pointer the length of the buffer, on return it is filled with the event length.\n *\n * @details This call allows the application to pull a BLE event from the BLE stack. The application is signaled that\n * an event is available from the BLE stack by the triggering of the SD_EVT_IRQn interrupt.\n * The application is free to choose whether to call this function from thread mode (main context) or directly from the\n * Interrupt Service Routine that maps to SD_EVT_IRQn. In any case however, and because the BLE stack runs at a higher\n * priority than the application, this function should be called in a loop (until @ref NRF_ERROR_NOT_FOUND is returned)\n * every time SD_EVT_IRQn is raised to ensure that all available events are pulled from the BLE stack. Failure to do so\n * could potentially leave events in the internal queue without the application being aware of this fact.\n *\n * Sizing the p_dest buffer is equally important, since the application needs to provide all the memory necessary for the event to\n * be copied into application memory. If the buffer provided is not large enough to fit the entire contents of the event,\n * @ref NRF_ERROR_DATA_SIZE will be returned and the application can then call again with a larger buffer size.\n * The maximum possible event length is defined by @ref BLE_EVT_LEN_MAX. The application may also \"peek\" the event length\n * by providing p_dest as a NULL pointer and inspecting the value of *p_len upon return:\n *\n *     \\code\n *     uint16_t len;\n *     errcode = sd_ble_evt_get(NULL, &len);\n *     \\endcode\n *\n * @mscs\n * @mmsc{@ref BLE_COMMON_IRQ_EVT_MSC}\n * @mmsc{@ref BLE_COMMON_THREAD_EVT_MSC}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS Event pulled and stored into the supplied buffer.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid or not sufficiently aligned pointer supplied.\n * @retval ::NRF_ERROR_NOT_FOUND No events ready to be pulled.\n * @retval ::NRF_ERROR_DATA_SIZE Event ready but could not fit into the supplied buffer.\n */\nSVCALL(SD_BLE_EVT_GET, uint32_t, sd_ble_evt_get(uint8_t *p_dest, uint16_t *p_len));\n\n/**@brief Add a Vendor Specific base UUID.\n *\n * @details This call enables the application to add a Vendor Specific base UUID to the BLE stack's table, for later\n * use with all other modules and APIs. This then allows the application to use the shorter, 24-bit @ref ble_uuid_t\n * format when dealing with both 16-bit and 128-bit UUIDs without having to check for lengths and having split code\n * paths. This is accomplished by extending the grouping mechanism that the Bluetooth SIG standard base UUID uses\n * for all other 128-bit UUIDs. The type field in the @ref ble_uuid_t structure is an index (relative to\n * @ref BLE_UUID_TYPE_VENDOR_BEGIN) to the table populated by multiple calls to this function, and the UUID field\n * in the same structure contains the 2 bytes at indexes 12 and 13. The number of possible 128-bit UUIDs available to\n * the application is therefore the number of Vendor Specific UUIDs added with the help of this function times 65536,\n * although restricted to modifying bytes 12 and 13 for each of the entries in the supplied array.\n *\n * @note Bytes 12 and 13 of the provided UUID will not be used internally, since those are always replaced by\n * the 16-bit uuid field in @ref ble_uuid_t.\n *\n * @note If a UUID is already present in the BLE stack's internal table, the corresponding index will be returned in\n * p_uuid_type along with an @ref NRF_SUCCESS error code.\n *\n * @param[in]  p_vs_uuid    Pointer to a 16-octet (128-bit) little endian Vendor Specific base UUID disregarding\n *                          bytes 12 and 13.\n * @param[out] p_uuid_type  Pointer to a uint8_t where the type field in @ref ble_uuid_t corresponding to this UUID will be\n * stored.\n *\n * @retval ::NRF_SUCCESS Successfully added the Vendor Specific base UUID.\n * @retval ::NRF_ERROR_INVALID_ADDR If p_vs_uuid or p_uuid_type is NULL or invalid.\n * @retval ::NRF_ERROR_NO_MEM If there are no more free slots for VS UUIDs.\n */\nSVCALL(SD_BLE_UUID_VS_ADD, uint32_t, sd_ble_uuid_vs_add(ble_uuid128_t const *p_vs_uuid, uint8_t *p_uuid_type));\n\n/**@brief Remove a Vendor Specific base UUID.\n *\n * @details This call removes a Vendor Specific base UUID. This function allows\n * the application to reuse memory allocated for Vendor Specific base UUIDs.\n *\n * @note Currently this function can only be called with a p_uuid_type set to @ref BLE_UUID_TYPE_UNKNOWN or the last added UUID\n * type.\n *\n * @param[inout] p_uuid_type Pointer to a uint8_t where its value matches the UUID type in @ref ble_uuid_t::type to be removed.\n *                           If the type is set to @ref BLE_UUID_TYPE_UNKNOWN, or the pointer is NULL, the last Vendor Specific\n *                           base UUID will be removed. If the function returns successfully, the UUID type that was removed will\n *                           be written back to @p p_uuid_type. If function returns with a failure, it contains the last type that\n *                           is in use by the ATT Server.\n *\n * @retval ::NRF_SUCCESS Successfully removed the Vendor Specific base UUID.\n * @retval ::NRF_ERROR_INVALID_ADDR If p_uuid_type is invalid.\n * @retval ::NRF_ERROR_INVALID_PARAM If p_uuid_type points to a non-valid UUID type.\n * @retval ::NRF_ERROR_FORBIDDEN If the Vendor Specific base UUID is in use by the ATT Server.\n */\nSVCALL(SD_BLE_UUID_VS_REMOVE, uint32_t, sd_ble_uuid_vs_remove(uint8_t *p_uuid_type));\n\n/** @brief Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit @ref ble_uuid_t structure.\n *\n * @details The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared\n * to the corresponding ones in each entry of the table of Vendor Specific base UUIDs\n * to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index\n * relative to @ref BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type.\n *\n * @note If the UUID length supplied is 2, then the type set by this call will always be @ref BLE_UUID_TYPE_BLE.\n *\n * @param[in]   uuid_le_len Length in bytes of the buffer pointed to by p_uuid_le (must be 2 or 16 bytes).\n * @param[in]   p_uuid_le   Pointer pointing to little endian raw UUID bytes.\n * @param[out]  p_uuid      Pointer to a @ref ble_uuid_t structure to be filled in.\n *\n * @retval ::NRF_SUCCESS Successfully decoded into the @ref ble_uuid_t structure.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_LENGTH Invalid UUID length.\n * @retval ::NRF_ERROR_NOT_FOUND For a 128-bit UUID, no match in the populated table of UUIDs.\n */\nSVCALL(SD_BLE_UUID_DECODE, uint32_t, sd_ble_uuid_decode(uint8_t uuid_le_len, uint8_t const *p_uuid_le, ble_uuid_t *p_uuid));\n\n/** @brief Encode a @ref ble_uuid_t structure into little endian raw UUID bytes (16-bit or 128-bit).\n *\n * @note The pointer to the destination buffer p_uuid_le may be NULL, in which case only the validity and size of p_uuid is\n * computed.\n *\n * @param[in]   p_uuid        Pointer to a @ref ble_uuid_t structure that will be encoded into bytes.\n * @param[out]  p_uuid_le_len Pointer to a uint8_t that will be filled with the encoded length (2 or 16 bytes).\n * @param[out]  p_uuid_le     Pointer to a buffer where the little endian raw UUID bytes (2 or 16) will be stored.\n *\n * @retval ::NRF_SUCCESS Successfully encoded into the buffer.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid UUID type.\n */\nSVCALL(SD_BLE_UUID_ENCODE, uint32_t, sd_ble_uuid_encode(ble_uuid_t const *p_uuid, uint8_t *p_uuid_le_len, uint8_t *p_uuid_le));\n\n/**@brief Get Version Information.\n *\n * @details This call allows the application to get the BLE stack version information.\n *\n * @param[out] p_version Pointer to a ble_version_t structure to be filled in.\n *\n * @retval ::NRF_SUCCESS  Version information stored successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY The BLE stack is busy (typically doing a locally-initiated disconnection procedure).\n */\nSVCALL(SD_BLE_VERSION_GET, uint32_t, sd_ble_version_get(ble_version_t *p_version));\n\n/**@brief Provide a user memory block.\n *\n * @note This call can only be used as a response to a @ref BLE_EVT_USER_MEM_REQUEST event issued to the application.\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] p_block Pointer to a user memory block structure or NULL if memory is managed by the application.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_PEER_CANCEL_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_NOAUTH_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS Successfully queued a response to the peer.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_LENGTH Invalid user memory block length supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection state or no user memory request pending.\n */\nSVCALL(SD_BLE_USER_MEM_REPLY, uint32_t, sd_ble_user_mem_reply(uint16_t conn_handle, ble_user_mem_block_t const *p_block));\n\n/**@brief Set a BLE option.\n *\n * @details This call allows the application to set the value of an option.\n *\n * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS, @ref BLE_GAP_OPTS, and @ref BLE_GATTC_OPTS.\n * @param[in] p_opt Pointer to a @ref ble_opt_t structure containing the option value.\n *\n * @retval ::NRF_SUCCESS  Option set successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints.\n * @retval ::NRF_ERROR_INVALID_STATE Unable to set the parameter at this time.\n * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed.\n */\nSVCALL(SD_BLE_OPT_SET, uint32_t, sd_ble_opt_set(uint32_t opt_id, ble_opt_t const *p_opt));\n\n/**@brief Get a BLE option.\n *\n * @details This call allows the application to retrieve the value of an option.\n *\n * @param[in] opt_id Option ID, see @ref BLE_COMMON_OPTS and @ref BLE_GAP_OPTS.\n * @param[out] p_opt Pointer to a ble_opt_t structure to be filled in.\n *\n * @retval ::NRF_SUCCESS  Option retrieved successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints.\n * @retval ::NRF_ERROR_INVALID_STATE Unable to retrieve the parameter at this time.\n * @retval ::NRF_ERROR_BUSY The BLE stack is busy or the previous procedure has not completed.\n * @retval ::NRF_ERROR_NOT_SUPPORTED This option is not supported.\n *\n */\nSVCALL(SD_BLE_OPT_GET, uint32_t, sd_ble_opt_get(uint32_t opt_id, ble_opt_t *p_opt));\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n#endif /* BLE_H__ */\n\n/**\n  @}\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_err.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_COMMON\n  @{\n  @addtogroup  nrf_error\n  @{\n    @ingroup BLE_COMMON\n  @}\n\n  @defgroup ble_err General error codes\n  @{\n\n  @brief General error code definitions for the BLE API.\n\n  @ingroup BLE_COMMON\n*/\n#ifndef NRF_BLE_ERR_H__\n#define NRF_BLE_ERR_H__\n\n#include \"nrf_error.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* @defgroup BLE_ERRORS Error Codes\n * @{ */\n#define BLE_ERROR_NOT_ENABLED (NRF_ERROR_STK_BASE_NUM + 0x001)         /**< @ref sd_ble_enable has not been called. */\n#define BLE_ERROR_INVALID_CONN_HANDLE (NRF_ERROR_STK_BASE_NUM + 0x002) /**< Invalid connection handle. */\n#define BLE_ERROR_INVALID_ATTR_HANDLE (NRF_ERROR_STK_BASE_NUM + 0x003) /**< Invalid attribute handle. */\n#define BLE_ERROR_INVALID_ADV_HANDLE (NRF_ERROR_STK_BASE_NUM + 0x004)  /**< Invalid advertising handle. */\n#define BLE_ERROR_INVALID_ROLE (NRF_ERROR_STK_BASE_NUM + 0x005)        /**< Invalid role. */\n#define BLE_ERROR_BLOCKED_BY_OTHER_LINKS                                                                                         \\\n    (NRF_ERROR_STK_BASE_NUM + 0x006) /**< The attempt to change link settings failed due to the scheduling of other links. */\n/** @} */\n\n/** @defgroup BLE_ERROR_SUBRANGES Module specific error code subranges\n *  @brief Assignment of subranges for module specific error codes.\n *  @note For specific error codes, see ble_<module>.h or ble_error_<module>.h.\n * @{ */\n#define NRF_L2CAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x100) /**< L2CAP specific errors. */\n#define NRF_GAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x200)   /**< GAP specific errors. */\n#define NRF_GATTC_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x300) /**< GATT client specific errors. */\n#define NRF_GATTS_ERR_BASE (NRF_ERROR_STK_BASE_NUM + 0x400) /**< GATT server specific errors. */\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n\n/**\n  @}\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_gap.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_GAP Generic Access Profile (GAP)\n  @{\n  @brief Definitions and prototypes for the GAP interface.\n */\n\n#ifndef BLE_GAP_H__\n#define BLE_GAP_H__\n\n#include \"ble_err.h\"\n#include \"ble_hci.h\"\n#include \"ble_ranges.h\"\n#include \"ble_types.h\"\n#include \"nrf_error.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**@addtogroup BLE_GAP_ENUMERATIONS Enumerations\n * @{ */\n\n/**@brief GAP API SVC numbers.\n */\nenum BLE_GAP_SVCS {\n    SD_BLE_GAP_ADDR_SET = BLE_GAP_SVC_BASE,                       /**< Set own Bluetooth Address. */\n    SD_BLE_GAP_ADDR_GET = BLE_GAP_SVC_BASE + 1,                   /**< Get own Bluetooth Address. */\n    SD_BLE_GAP_WHITELIST_SET = BLE_GAP_SVC_BASE + 2,              /**< Set active whitelist. */\n    SD_BLE_GAP_DEVICE_IDENTITIES_SET = BLE_GAP_SVC_BASE + 3,      /**< Set device identity list. */\n    SD_BLE_GAP_PRIVACY_SET = BLE_GAP_SVC_BASE + 4,                /**< Set Privacy settings*/\n    SD_BLE_GAP_PRIVACY_GET = BLE_GAP_SVC_BASE + 5,                /**< Get Privacy settings*/\n    SD_BLE_GAP_ADV_SET_CONFIGURE = BLE_GAP_SVC_BASE + 6,          /**< Configure an advertising set. */\n    SD_BLE_GAP_ADV_START = BLE_GAP_SVC_BASE + 7,                  /**< Start Advertising. */\n    SD_BLE_GAP_ADV_STOP = BLE_GAP_SVC_BASE + 8,                   /**< Stop Advertising. */\n    SD_BLE_GAP_CONN_PARAM_UPDATE = BLE_GAP_SVC_BASE + 9,          /**< Connection Parameter Update. */\n    SD_BLE_GAP_DISCONNECT = BLE_GAP_SVC_BASE + 10,                /**< Disconnect. */\n    SD_BLE_GAP_TX_POWER_SET = BLE_GAP_SVC_BASE + 11,              /**< Set TX Power. */\n    SD_BLE_GAP_APPEARANCE_SET = BLE_GAP_SVC_BASE + 12,            /**< Set Appearance. */\n    SD_BLE_GAP_APPEARANCE_GET = BLE_GAP_SVC_BASE + 13,            /**< Get Appearance. */\n    SD_BLE_GAP_PPCP_SET = BLE_GAP_SVC_BASE + 14,                  /**< Set PPCP. */\n    SD_BLE_GAP_PPCP_GET = BLE_GAP_SVC_BASE + 15,                  /**< Get PPCP. */\n    SD_BLE_GAP_DEVICE_NAME_SET = BLE_GAP_SVC_BASE + 16,           /**< Set Device Name. */\n    SD_BLE_GAP_DEVICE_NAME_GET = BLE_GAP_SVC_BASE + 17,           /**< Get Device Name. */\n    SD_BLE_GAP_AUTHENTICATE = BLE_GAP_SVC_BASE + 18,              /**< Initiate Pairing/Bonding. */\n    SD_BLE_GAP_SEC_PARAMS_REPLY = BLE_GAP_SVC_BASE + 19,          /**< Reply with Security Parameters. */\n    SD_BLE_GAP_AUTH_KEY_REPLY = BLE_GAP_SVC_BASE + 20,            /**< Reply with an authentication key. */\n    SD_BLE_GAP_LESC_DHKEY_REPLY = BLE_GAP_SVC_BASE + 21,          /**< Reply with an LE Secure Connections DHKey. */\n    SD_BLE_GAP_KEYPRESS_NOTIFY = BLE_GAP_SVC_BASE + 22,           /**< Notify of a keypress during an authentication procedure. */\n    SD_BLE_GAP_LESC_OOB_DATA_GET = BLE_GAP_SVC_BASE + 23,         /**< Get the local LE Secure Connections OOB data. */\n    SD_BLE_GAP_LESC_OOB_DATA_SET = BLE_GAP_SVC_BASE + 24,         /**< Set the remote LE Secure Connections OOB data. */\n    SD_BLE_GAP_ENCRYPT = BLE_GAP_SVC_BASE + 25,                   /**< Initiate encryption procedure. */\n    SD_BLE_GAP_SEC_INFO_REPLY = BLE_GAP_SVC_BASE + 26,            /**< Reply with Security Information. */\n    SD_BLE_GAP_CONN_SEC_GET = BLE_GAP_SVC_BASE + 27,              /**< Obtain connection security level. */\n    SD_BLE_GAP_RSSI_START = BLE_GAP_SVC_BASE + 28,                /**< Start reporting of changes in RSSI. */\n    SD_BLE_GAP_RSSI_STOP = BLE_GAP_SVC_BASE + 29,                 /**< Stop reporting of changes in RSSI. */\n    SD_BLE_GAP_SCAN_START = BLE_GAP_SVC_BASE + 30,                /**< Start Scanning. */\n    SD_BLE_GAP_SCAN_STOP = BLE_GAP_SVC_BASE + 31,                 /**< Stop Scanning. */\n    SD_BLE_GAP_CONNECT = BLE_GAP_SVC_BASE + 32,                   /**< Connect. */\n    SD_BLE_GAP_CONNECT_CANCEL = BLE_GAP_SVC_BASE + 33,            /**< Cancel ongoing connection procedure. */\n    SD_BLE_GAP_RSSI_GET = BLE_GAP_SVC_BASE + 34,                  /**< Get the last RSSI sample. */\n    SD_BLE_GAP_PHY_UPDATE = BLE_GAP_SVC_BASE + 35,                /**< Initiate or respond to a PHY Update Procedure. */\n    SD_BLE_GAP_DATA_LENGTH_UPDATE = BLE_GAP_SVC_BASE + 36,        /**< Initiate or respond to a Data Length Update Procedure. */\n    SD_BLE_GAP_QOS_CHANNEL_SURVEY_START = BLE_GAP_SVC_BASE + 37,  /**< Start Quality of Service (QoS) channel survey module. */\n    SD_BLE_GAP_QOS_CHANNEL_SURVEY_STOP = BLE_GAP_SVC_BASE + 38,   /**< Stop Quality of Service (QoS) channel survey module. */\n    SD_BLE_GAP_ADV_ADDR_GET = BLE_GAP_SVC_BASE + 39,              /**< Get the Address used on air while Advertising. */\n    SD_BLE_GAP_NEXT_CONN_EVT_COUNTER_GET = BLE_GAP_SVC_BASE + 40, /**< Get the next connection event counter. */\n    SD_BLE_GAP_CONN_EVT_TRIGGER_START = BLE_GAP_SVC_BASE + 41,    /** Start triggering a given task on connection event start. */\n    SD_BLE_GAP_CONN_EVT_TRIGGER_STOP =\n        BLE_GAP_SVC_BASE + 42, /** Stop triggering the task configured using @ref sd_ble_gap_conn_evt_trigger_start. */\n};\n\n/**@brief GAP Event IDs.\n * IDs that uniquely identify an event coming from the stack to the application.\n */\nenum BLE_GAP_EVTS {\n    BLE_GAP_EVT_CONNECTED =\n        BLE_GAP_EVT_BASE, /**< Connected to peer.                              \\n See @ref ble_gap_evt_connected_t             */\n    BLE_GAP_EVT_DISCONNECTED =\n        BLE_GAP_EVT_BASE + 1, /**< Disconnected from peer.                         \\n See @ref ble_gap_evt_disconnected_t. */\n    BLE_GAP_EVT_CONN_PARAM_UPDATE =\n        BLE_GAP_EVT_BASE + 2, /**< Connection Parameters updated.                  \\n See @ref ble_gap_evt_conn_param_update_t. */\n    BLE_GAP_EVT_SEC_PARAMS_REQUEST =\n        BLE_GAP_EVT_BASE + 3, /**< Request to provide security parameters.         \\n Reply with @ref sd_ble_gap_sec_params_reply.\n                                 \\n See @ref ble_gap_evt_sec_params_request_t. */\n    BLE_GAP_EVT_SEC_INFO_REQUEST =\n        BLE_GAP_EVT_BASE + 4, /**< Request to provide security information.        \\n Reply with @ref sd_ble_gap_sec_info_reply.\n                                 \\n See @ref ble_gap_evt_sec_info_request_t.   */\n    BLE_GAP_EVT_PASSKEY_DISPLAY =\n        BLE_GAP_EVT_BASE + 5, /**< Request to display a passkey to the user.       \\n In LESC Numeric Comparison, reply with @ref\n                                 sd_ble_gap_auth_key_reply. \\n See @ref ble_gap_evt_passkey_display_t. */\n    BLE_GAP_EVT_KEY_PRESSED =\n        BLE_GAP_EVT_BASE + 6, /**< Notification of a keypress on the remote device.\\n See @ref ble_gap_evt_key_pressed_t */\n    BLE_GAP_EVT_AUTH_KEY_REQUEST =\n        BLE_GAP_EVT_BASE + 7, /**< Request to provide an authentication key.       \\n Reply with @ref sd_ble_gap_auth_key_reply.\n                                 \\n See @ref ble_gap_evt_auth_key_request_t.   */\n    BLE_GAP_EVT_LESC_DHKEY_REQUEST =\n        BLE_GAP_EVT_BASE + 8, /**< Request to calculate an LE Secure Connections DHKey. \\n Reply with @ref\n                                 sd_ble_gap_lesc_dhkey_reply.  \\n See @ref ble_gap_evt_lesc_dhkey_request_t */\n    BLE_GAP_EVT_AUTH_STATUS =\n        BLE_GAP_EVT_BASE + 9, /**< Authentication procedure completed with status. \\n See @ref ble_gap_evt_auth_status_t. */\n    BLE_GAP_EVT_CONN_SEC_UPDATE =\n        BLE_GAP_EVT_BASE + 10, /**< Connection security updated.                    \\n See @ref ble_gap_evt_conn_sec_update_t. */\n    BLE_GAP_EVT_TIMEOUT =\n        BLE_GAP_EVT_BASE + 11, /**< Timeout expired.                                \\n See @ref ble_gap_evt_timeout_t. */\n    BLE_GAP_EVT_RSSI_CHANGED =\n        BLE_GAP_EVT_BASE + 12, /**< RSSI report.                                    \\n See @ref ble_gap_evt_rssi_changed_t. */\n    BLE_GAP_EVT_ADV_REPORT =\n        BLE_GAP_EVT_BASE + 13, /**< Advertising report.                             \\n See @ref ble_gap_evt_adv_report_t. */\n    BLE_GAP_EVT_SEC_REQUEST =\n        BLE_GAP_EVT_BASE + 14, /**< Security Request.                               \\n Reply with @ref sd_ble_gap_authenticate\n\\n or with @ref sd_ble_gap_encrypt if required security information is available\n. \\n See @ref ble_gap_evt_sec_request_t.          */\n    BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST =\n        BLE_GAP_EVT_BASE + 15, /**< Connection Parameter Update Request.            \\n Reply with @ref\n                                  sd_ble_gap_conn_param_update. \\n See @ref ble_gap_evt_conn_param_update_request_t. */\n    BLE_GAP_EVT_SCAN_REQ_REPORT =\n        BLE_GAP_EVT_BASE + 16, /**< Scan request report.                            \\n See @ref ble_gap_evt_scan_req_report_t. */\n    BLE_GAP_EVT_PHY_UPDATE_REQUEST =\n        BLE_GAP_EVT_BASE + 17, /**< PHY Update Request.                             \\n Reply with @ref sd_ble_gap_phy_update. \\n\n                                  See @ref ble_gap_evt_phy_update_request_t. */\n    BLE_GAP_EVT_PHY_UPDATE =\n        BLE_GAP_EVT_BASE + 18, /**< PHY Update Procedure is complete.               \\n See @ref ble_gap_evt_phy_update_t. */\n    BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST =\n        BLE_GAP_EVT_BASE + 19, /**< Data Length Update Request.                     \\n Reply with @ref\n                                  sd_ble_gap_data_length_update. \\n See @ref ble_gap_evt_data_length_update_request_t. */\n    BLE_GAP_EVT_DATA_LENGTH_UPDATE =\n        BLE_GAP_EVT_BASE +\n        20, /**< LL Data Channel PDU payload length updated.     \\n See @ref ble_gap_evt_data_length_update_t. */\n    BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT =\n        BLE_GAP_EVT_BASE +\n        21, /**< Channel survey report.                          \\n See @ref ble_gap_evt_qos_channel_survey_report_t. */\n    BLE_GAP_EVT_ADV_SET_TERMINATED =\n        BLE_GAP_EVT_BASE +\n        22, /**< Advertising set terminated.                     \\n See @ref ble_gap_evt_adv_set_terminated_t. */\n};\n\n/**@brief GAP Option IDs.\n * IDs that uniquely identify a GAP option.\n */\nenum BLE_GAP_OPTS {\n    BLE_GAP_OPT_CH_MAP = BLE_GAP_OPT_BASE,                 /**< Channel Map. @ref ble_gap_opt_ch_map_t  */\n    BLE_GAP_OPT_LOCAL_CONN_LATENCY = BLE_GAP_OPT_BASE + 1, /**< Local connection latency. @ref ble_gap_opt_local_conn_latency_t */\n    BLE_GAP_OPT_PASSKEY = BLE_GAP_OPT_BASE + 2,            /**< Set passkey. @ref ble_gap_opt_passkey_t */\n    BLE_GAP_OPT_COMPAT_MODE_1 = BLE_GAP_OPT_BASE + 3,      /**< Compatibility mode. @ref ble_gap_opt_compat_mode_1_t */\n    BLE_GAP_OPT_AUTH_PAYLOAD_TIMEOUT =\n        BLE_GAP_OPT_BASE + 4, /**< Set Authenticated payload timeout. @ref ble_gap_opt_auth_payload_timeout_t */\n    BLE_GAP_OPT_SLAVE_LATENCY_DISABLE =\n        BLE_GAP_OPT_BASE + 5, /**< Disable slave latency. @ref ble_gap_opt_slave_latency_disable_t */\n};\n\n/**@brief GAP Configuration IDs.\n *\n * IDs that uniquely identify a GAP configuration.\n */\nenum BLE_GAP_CFGS {\n    BLE_GAP_CFG_ROLE_COUNT = BLE_GAP_CFG_BASE,           /**< Role count configuration.  */\n    BLE_GAP_CFG_DEVICE_NAME = BLE_GAP_CFG_BASE + 1,      /**< Device name configuration. */\n    BLE_GAP_CFG_PPCP_INCL_CONFIG = BLE_GAP_CFG_BASE + 2, /**< Peripheral Preferred Connection Parameters characteristic\n                                                              inclusion configuration. */\n    BLE_GAP_CFG_CAR_INCL_CONFIG = BLE_GAP_CFG_BASE + 3,  /**< Central Address Resolution characteristic\n                                                              inclusion configuration. */\n};\n\n/**@brief GAP TX Power roles.\n */\nenum BLE_GAP_TX_POWER_ROLES {\n    BLE_GAP_TX_POWER_ROLE_ADV = 1,       /**< Advertiser role. */\n    BLE_GAP_TX_POWER_ROLE_SCAN_INIT = 2, /**< Scanner and initiator role. */\n    BLE_GAP_TX_POWER_ROLE_CONN = 3,      /**< Connection role. */\n};\n\n/** @} */\n\n/**@addtogroup BLE_GAP_DEFINES Defines\n * @{ */\n\n/**@defgroup BLE_ERRORS_GAP SVC return values specific to GAP\n * @{ */\n#define BLE_ERROR_GAP_UUID_LIST_MISMATCH                                                                                         \\\n    (NRF_GAP_ERR_BASE + 0x000) /**< UUID list does not contain an integral number of UUIDs. */\n#define BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST                                                                                \\\n    (NRF_GAP_ERR_BASE + 0x001) /**< Use of Whitelist not permitted with discoverable advertising. */\n#define BLE_ERROR_GAP_INVALID_BLE_ADDR                                                                                           \\\n    (NRF_GAP_ERR_BASE + 0x002) /**< The upper two bits of the address do not correspond to the specified address type. */\n#define BLE_ERROR_GAP_WHITELIST_IN_USE                                                                                           \\\n    (NRF_GAP_ERR_BASE + 0x003) /**< Attempt to modify the whitelist while already in use by another operation. */\n#define BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE                                                                                   \\\n    (NRF_GAP_ERR_BASE + 0x004) /**< Attempt to modify the device identity list while already in use by another operation. */\n#define BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE                                                                                \\\n    (NRF_GAP_ERR_BASE + 0x005) /**< The device identity list contains entries with duplicate identity addresses. */\n/**@} */\n\n/**@defgroup BLE_GAP_ROLES GAP Roles\n * @{ */\n#define BLE_GAP_ROLE_INVALID 0x0 /**< Invalid Role. */\n#define BLE_GAP_ROLE_PERIPH 0x1  /**< Peripheral Role. */\n#define BLE_GAP_ROLE_CENTRAL 0x2 /**< Central Role. */\n/**@} */\n\n/**@defgroup BLE_GAP_TIMEOUT_SOURCES GAP Timeout sources\n * @{ */\n#define BLE_GAP_TIMEOUT_SRC_SCAN 0x01         /**< Scanning timeout. */\n#define BLE_GAP_TIMEOUT_SRC_CONN 0x02         /**< Connection timeout. */\n#define BLE_GAP_TIMEOUT_SRC_AUTH_PAYLOAD 0x03 /**< Authenticated payload timeout. */\n/**@} */\n\n/**@defgroup BLE_GAP_ADDR_TYPES GAP Address types\n * @{ */\n#define BLE_GAP_ADDR_TYPE_PUBLIC 0x00                        /**< Public (identity) address.*/\n#define BLE_GAP_ADDR_TYPE_RANDOM_STATIC 0x01                 /**< Random static (identity) address. */\n#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE 0x02     /**< Random private resolvable address. */\n#define BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE 0x03 /**< Random private non-resolvable address. */\n#define BLE_GAP_ADDR_TYPE_ANONYMOUS                                                                                              \\\n    0x7F /**< An advertiser may advertise without its address.                                                                   \\\n              This type of advertising is called anonymous. */\n/**@} */\n\n/**@brief The default interval in seconds at which a private address is refreshed.  */\n#define BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S (900) /* 15 minutes. */\n/**@brief The maximum interval in seconds at which a private address can be refreshed.  */\n#define BLE_GAP_MAX_PRIVATE_ADDR_CYCLE_INTERVAL_S (41400) /* 11 hours 30 minutes. */\n\n/** @brief BLE address length. */\n#define BLE_GAP_ADDR_LEN (6)\n\n/**@defgroup BLE_GAP_PRIVACY_MODES Privacy modes\n * @{ */\n#define BLE_GAP_PRIVACY_MODE_OFF 0x00            /**< Device will send and accept its identity address for its own address. */\n#define BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY 0x01 /**< Device will send and accept only private addresses for its own address. */\n#define BLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY                                                                                     \\\n    0x02 /**< Device will send and accept only private addresses for its own address,                                            \\\n              and will not accept a peer using identity address as sender address when                                           \\\n              the peer IRK is exchanged, non-zero and added to the identity list. */\n/**@} */\n\n/** @brief Invalid power level. */\n#define BLE_GAP_POWER_LEVEL_INVALID 127\n\n/** @brief Advertising set handle not set. */\n#define BLE_GAP_ADV_SET_HANDLE_NOT_SET (0xFF)\n\n/** @brief The default number of advertising sets. */\n#define BLE_GAP_ADV_SET_COUNT_DEFAULT (1)\n\n/** @brief The maximum number of advertising sets supported by this SoftDevice. */\n#define BLE_GAP_ADV_SET_COUNT_MAX (1)\n\n/**@defgroup BLE_GAP_ADV_SET_DATA_SIZES Advertising data sizes.\n * @{ */\n#define BLE_GAP_ADV_SET_DATA_SIZE_MAX                                                                                            \\\n    (31) /**< Maximum data length for an advertising set.                                                                        \\\n              If more advertising data is required, use extended advertising instead. */\n#define BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED                                                                         \\\n    (255) /**< Maximum supported data length for an extended advertising set. */\n\n#define BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED                                                             \\\n    (238) /**< Maximum supported data length for an extended connectable advertising set. */\n/**@}. */\n\n/** @brief Set ID not available in advertising report. */\n#define BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE 0xFF\n\n/**@defgroup BLE_GAP_EVT_ADV_SET_TERMINATED_REASON GAP Advertising Set Terminated reasons\n * @{ */\n#define BLE_GAP_EVT_ADV_SET_TERMINATED_REASON_TIMEOUT 0x01       /**< Timeout value reached. */\n#define BLE_GAP_EVT_ADV_SET_TERMINATED_REASON_LIMIT_REACHED 0x02 /**< @ref ble_gap_adv_params_t::max_adv_evts was reached. */\n/**@} */\n\n/**@defgroup BLE_GAP_AD_TYPE_DEFINITIONS GAP Advertising and Scan Response Data format\n * @note Found at https://www.bluetooth.org/Technical/AssignedNumbers/generic_access_profile.htm\n * @{ */\n#define BLE_GAP_AD_TYPE_FLAGS 0x01                              /**< Flags for discoverability. */\n#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE 0x02  /**< Partial list of 16 bit service UUIDs. */\n#define BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE 0x03        /**< Complete list of 16 bit service UUIDs. */\n#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_MORE_AVAILABLE 0x04  /**< Partial list of 32 bit service UUIDs. */\n#define BLE_GAP_AD_TYPE_32BIT_SERVICE_UUID_COMPLETE 0x05        /**< Complete list of 32 bit service UUIDs. */\n#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE 0x06 /**< Partial list of 128 bit service UUIDs. */\n#define BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE 0x07       /**< Complete list of 128 bit service UUIDs. */\n#define BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME 0x08                   /**< Short local device name. */\n#define BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME 0x09                /**< Complete local device name. */\n#define BLE_GAP_AD_TYPE_TX_POWER_LEVEL 0x0A                     /**< Transmit power level. */\n#define BLE_GAP_AD_TYPE_CLASS_OF_DEVICE 0x0D                    /**< Class of device. */\n#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C 0x0E              /**< Simple Pairing Hash C. */\n#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R 0x0F        /**< Simple Pairing Randomizer R. */\n#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_TK_VALUE 0x10          /**< Security Manager TK Value. */\n#define BLE_GAP_AD_TYPE_SECURITY_MANAGER_OOB_FLAGS 0x11         /**< Security Manager Out Of Band Flags. */\n#define BLE_GAP_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE 0x12    /**< Slave Connection Interval Range. */\n#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_16BIT 0x14      /**< List of 16-bit Service Solicitation UUIDs. */\n#define BLE_GAP_AD_TYPE_SOLICITED_SERVICE_UUIDS_128BIT 0x15     /**< List of 128-bit Service Solicitation UUIDs. */\n#define BLE_GAP_AD_TYPE_SERVICE_DATA 0x16                       /**< Service Data - 16-bit UUID. */\n#define BLE_GAP_AD_TYPE_PUBLIC_TARGET_ADDRESS 0x17              /**< Public Target Address. */\n#define BLE_GAP_AD_TYPE_RANDOM_TARGET_ADDRESS 0x18              /**< Random Target Address. */\n#define BLE_GAP_AD_TYPE_APPEARANCE 0x19                         /**< Appearance. */\n#define BLE_GAP_AD_TYPE_ADVERTISING_INTERVAL 0x1A               /**< Advertising Interval. */\n#define BLE_GAP_AD_TYPE_LE_BLUETOOTH_DEVICE_ADDRESS 0x1B        /**< LE Bluetooth Device Address. */\n#define BLE_GAP_AD_TYPE_LE_ROLE 0x1C                            /**< LE Role. */\n#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_HASH_C256 0x1D           /**< Simple Pairing Hash C-256. */\n#define BLE_GAP_AD_TYPE_SIMPLE_PAIRING_RANDOMIZER_R256 0x1E     /**< Simple Pairing Randomizer R-256. */\n#define BLE_GAP_AD_TYPE_SERVICE_DATA_32BIT_UUID 0x20            /**< Service Data - 32-bit UUID. */\n#define BLE_GAP_AD_TYPE_SERVICE_DATA_128BIT_UUID 0x21           /**< Service Data - 128-bit UUID. */\n#define BLE_GAP_AD_TYPE_LESC_CONFIRMATION_VALUE 0x22            /**< LE Secure Connections Confirmation Value */\n#define BLE_GAP_AD_TYPE_LESC_RANDOM_VALUE 0x23                  /**< LE Secure Connections Random Value */\n#define BLE_GAP_AD_TYPE_URI 0x24                                /**< URI */\n#define BLE_GAP_AD_TYPE_3D_INFORMATION_DATA 0x3D                /**< 3D Information Data. */\n#define BLE_GAP_AD_TYPE_MANUFACTURER_SPECIFIC_DATA 0xFF         /**< Manufacturer Specific Data. */\n/**@} */\n\n/**@defgroup BLE_GAP_ADV_FLAGS GAP Advertisement Flags\n * @{ */\n#define BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE (0x01) /**< LE Limited Discoverable Mode. */\n#define BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE (0x02) /**< LE General Discoverable Mode. */\n#define BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED (0x04) /**< BR/EDR not supported. */\n#define BLE_GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER (0x08) /**< Simultaneous LE and BR/EDR, Controller. */\n#define BLE_GAP_ADV_FLAG_LE_BR_EDR_HOST (0x10)       /**< Simultaneous LE and BR/EDR, Host. */\n#define BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE                                                                              \\\n    (BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE |                                                                                     \\\n     BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE Limited Discoverable Mode, BR/EDR not supported. */\n#define BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE                                                                              \\\n    (BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE |                                                                                     \\\n     BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED) /**< LE General Discoverable Mode, BR/EDR not supported. */\n/**@} */\n\n/**@defgroup BLE_GAP_ADV_INTERVALS GAP Advertising interval max and min\n * @{ */\n#define BLE_GAP_ADV_INTERVAL_MIN 0x000020 /**< Minimum Advertising interval in 625 us units, i.e. 20 ms. */\n#define BLE_GAP_ADV_INTERVAL_MAX 0x004000 /**< Maximum Advertising interval in 625 us units, i.e. 10.24 s. */\n                                          /**@}  */\n\n/**@defgroup BLE_GAP_SCAN_INTERVALS GAP Scan interval max and min\n * @{ */\n#define BLE_GAP_SCAN_INTERVAL_MIN 0x0004 /**< Minimum Scan interval in 625 us units, i.e. 2.5 ms. */\n#define BLE_GAP_SCAN_INTERVAL_MAX 0xFFFF /**< Maximum Scan interval in 625 us units, i.e. 40,959.375 s. */\n                                         /** @}  */\n\n/**@defgroup BLE_GAP_SCAN_WINDOW GAP Scan window max and min\n * @{ */\n#define BLE_GAP_SCAN_WINDOW_MIN 0x0004 /**< Minimum Scan window in 625 us units, i.e. 2.5 ms. */\n#define BLE_GAP_SCAN_WINDOW_MAX 0xFFFF /**< Maximum Scan window in 625 us units, i.e. 40,959.375 s. */\n                                       /** @}  */\n\n/**@defgroup BLE_GAP_SCAN_TIMEOUT GAP Scan timeout max and min\n * @{ */\n#define BLE_GAP_SCAN_TIMEOUT_MIN 0x0001       /**< Minimum Scan timeout in 10 ms units, i.e 10 ms. */\n#define BLE_GAP_SCAN_TIMEOUT_UNLIMITED 0x0000 /**< Continue to scan forever. */\n                                              /** @}  */\n\n/**@defgroup BLE_GAP_SCAN_BUFFER_SIZE GAP Minimum scanner buffer size\n *\n * Scan buffers are used for storing advertising data received from an advertiser.\n * If ble_gap_scan_params_t::extended is set to 0, @ref BLE_GAP_SCAN_BUFFER_MIN is the minimum scan buffer length.\n * else the minimum scan buffer size is @ref BLE_GAP_SCAN_BUFFER_EXTENDED_MIN.\n * @{ */\n#define BLE_GAP_SCAN_BUFFER_MIN                                                                                                  \\\n    (31) /**< Minimum data length for an                                                                                         \\\n              advertising set. */\n#define BLE_GAP_SCAN_BUFFER_MAX                                                                                                  \\\n    (31) /**< Maximum data length for an                                                                                         \\\n              advertising set. */\n#define BLE_GAP_SCAN_BUFFER_EXTENDED_MIN                                                                                         \\\n    (255) /**< Minimum data length for an                                                                                        \\\n               extended advertising set. */\n#define BLE_GAP_SCAN_BUFFER_EXTENDED_MAX                                                                                         \\\n    (1650) /**< Maximum data length for an                                                                                       \\\n                extended advertising set. */\n#define BLE_GAP_SCAN_BUFFER_EXTENDED_MAX_SUPPORTED                                                                               \\\n    (255) /**< Maximum supported data length for                                                                                 \\\n               an extended advertising set. */\n/** @}  */\n\n/**@defgroup BLE_GAP_ADV_TYPES GAP Advertising types\n *\n * Advertising types defined in Bluetooth Core Specification v5.0, Vol 6, Part B, Section 4.4.2.\n *\n * The maximum advertising data length is defined by @ref BLE_GAP_ADV_SET_DATA_SIZE_MAX.\n * The maximum supported data length for an extended advertiser is defined by\n * @ref BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED\n * Note that some of the advertising types do not support advertising data. Non-scannable types do not support\n * scan response data.\n *\n * @{ */\n#define BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED                                                                        \\\n    0x01 /**< Connectable and scannable undirected                                                                               \\\n              advertising events. */\n#define BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE                                                       \\\n    0x02 /**< Connectable non-scannable directed advertising                                                                     \\\n              events. Advertising interval is less that 3.75 ms.                                                                 \\\n              Use this type for fast reconnections.                                                                              \\\n              @note Advertising data is not supported. */\n#define BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED                                                                       \\\n    0x03 /**< Connectable non-scannable directed advertising                                                                     \\\n              events.                                                                                                            \\\n              @note Advertising data is not supported. */\n#define BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED                                                                     \\\n    0x04 /**< Non-connectable scannable undirected                                                                               \\\n              advertising events. */\n#define BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED                                                                  \\\n    0x05 /**< Non-connectable non-scannable undirected                                                                           \\\n              advertising events. */\n#define BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED                                                            \\\n    0x06 /**< Connectable non-scannable undirected advertising                                                                   \\\n              events using extended advertising PDUs. */\n#define BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_DIRECTED                                                              \\\n    0x07 /**< Connectable non-scannable directed advertising                                                                     \\\n              events using extended advertising PDUs. */\n#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED                                                            \\\n    0x08 /**< Non-connectable scannable undirected advertising                                                                   \\\n              events using extended advertising PDUs.                                                                            \\\n              @note Only scan response data is supported. */\n#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_DIRECTED                                                              \\\n    0x09 /**< Non-connectable scannable directed advertising                                                                     \\\n              events using extended advertising PDUs.                                                                            \\\n              @note Only scan response data is supported. */\n#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED                                                         \\\n    0x0A /**< Non-connectable non-scannable undirected advertising                                                               \\\n              events using extended advertising PDUs. */\n#define BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED                                                           \\\n    0x0B /**< Non-connectable non-scannable directed advertising                                                                 \\\n              events using extended advertising PDUs. */\n/**@} */\n\n/**@defgroup BLE_GAP_ADV_FILTER_POLICIES GAP Advertising filter policies\n * @{ */\n#define BLE_GAP_ADV_FP_ANY 0x00            /**< Allow scan requests and connect requests from any device. */\n#define BLE_GAP_ADV_FP_FILTER_SCANREQ 0x01 /**< Filter scan requests with whitelist. */\n#define BLE_GAP_ADV_FP_FILTER_CONNREQ 0x02 /**< Filter connect requests with whitelist. */\n#define BLE_GAP_ADV_FP_FILTER_BOTH 0x03    /**< Filter both scan and connect requests with whitelist. */\n/**@} */\n\n/**@defgroup BLE_GAP_ADV_DATA_STATUS GAP Advertising data status\n * @{ */\n#define BLE_GAP_ADV_DATA_STATUS_COMPLETE 0x00 /**< All data in the advertising event have been received. */\n#define BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA                                                                             \\\n    0x01 /**< More data to be received.                                                                                          \\\n              @note This value will only be used if                                                                              \\\n              @ref ble_gap_scan_params_t::report_incomplete_evts and                                                             \\\n              @ref ble_gap_adv_report_type_t::extended_pdu are set to true. */\n#define BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_TRUNCATED                                                                             \\\n    0x02 /**< Incomplete data. Buffer size insufficient to receive more.                                                         \\\n              @note This value will only be used if                                                                              \\\n              @ref ble_gap_adv_report_type_t::extended_pdu is set to true. */\n#define BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MISSED                                                                                \\\n    0x03 /**< Failed to receive the remaining data.                                                                              \\\n              @note This value will only be used if                                                                              \\\n              @ref ble_gap_adv_report_type_t::extended_pdu is set to true. */\n/**@} */\n\n/**@defgroup BLE_GAP_SCAN_FILTER_POLICIES GAP Scanner filter policies\n * @{ */\n#define BLE_GAP_SCAN_FP_ACCEPT_ALL                                                                                               \\\n    0x00 /**< Accept all advertising packets except directed advertising packets                                                 \\\n              not addressed to this device. */\n#define BLE_GAP_SCAN_FP_WHITELIST                                                                                                \\\n    0x01 /**< Accept advertising packets from devices in the whitelist except directed                                           \\\n              packets not addressed to this device. */\n#define BLE_GAP_SCAN_FP_ALL_NOT_RESOLVED_DIRECTED                                                                                \\\n    0x02 /**< Accept all advertising packets specified in @ref BLE_GAP_SCAN_FP_ACCEPT_ALL.                                       \\\n              In addition, accept directed advertising packets, where the advertiser's                                           \\\n              address is a resolvable private address that cannot be resolved. */\n#define BLE_GAP_SCAN_FP_WHITELIST_NOT_RESOLVED_DIRECTED                                                                          \\\n    0x03 /**< Accept all advertising packets specified in @ref BLE_GAP_SCAN_FP_WHITELIST.                                        \\\n              In addition, accept directed advertising packets, where the advertiser's                                           \\\n              address is a resolvable private address that cannot be resolved. */\n/**@} */\n\n/**@defgroup BLE_GAP_ADV_TIMEOUT_VALUES GAP Advertising timeout values in 10 ms units\n * @{ */\n#define BLE_GAP_ADV_TIMEOUT_HIGH_DUTY_MAX                                                                                        \\\n    (128) /**< Maximum high duty advertising time in 10 ms units. Corresponds to 1.28 s.                                         \\\n           */\n#define BLE_GAP_ADV_TIMEOUT_LIMITED_MAX                                                                                          \\\n    (18000) /**< Maximum advertising time in 10 ms units corresponding to TGAP(lim_adv_timeout) = 180 s in limited discoverable  \\\n               mode. */\n#define BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED                                                                                    \\\n    (0) /**< Unlimited advertising in general discoverable mode.                                                                 \\\n             For high duty cycle advertising, this corresponds to @ref BLE_GAP_ADV_TIMEOUT_HIGH_DUTY_MAX. */\n/**@} */\n\n/**@defgroup BLE_GAP_DISC_MODES GAP Discovery modes\n * @{ */\n#define BLE_GAP_DISC_MODE_NOT_DISCOVERABLE 0x00 /**< Not discoverable discovery Mode. */\n#define BLE_GAP_DISC_MODE_LIMITED 0x01          /**< Limited Discovery Mode. */\n#define BLE_GAP_DISC_MODE_GENERAL 0x02          /**< General Discovery Mode. */\n/**@} */\n\n/**@defgroup BLE_GAP_IO_CAPS GAP IO Capabilities\n * @{ */\n#define BLE_GAP_IO_CAPS_DISPLAY_ONLY 0x00     /**< Display Only. */\n#define BLE_GAP_IO_CAPS_DISPLAY_YESNO 0x01    /**< Display and Yes/No entry. */\n#define BLE_GAP_IO_CAPS_KEYBOARD_ONLY 0x02    /**< Keyboard Only. */\n#define BLE_GAP_IO_CAPS_NONE 0x03             /**< No I/O capabilities. */\n#define BLE_GAP_IO_CAPS_KEYBOARD_DISPLAY 0x04 /**< Keyboard and Display. */\n/**@} */\n\n/**@defgroup BLE_GAP_AUTH_KEY_TYPES GAP Authentication Key Types\n * @{ */\n#define BLE_GAP_AUTH_KEY_TYPE_NONE 0x00    /**< No key (may be used to reject). */\n#define BLE_GAP_AUTH_KEY_TYPE_PASSKEY 0x01 /**< 6-digit Passkey. */\n#define BLE_GAP_AUTH_KEY_TYPE_OOB 0x02     /**< Out Of Band data. */\n/**@} */\n\n/**@defgroup BLE_GAP_KP_NOT_TYPES GAP Keypress Notification Types\n * @{ */\n#define BLE_GAP_KP_NOT_TYPE_PASSKEY_START 0x00     /**< Passkey entry started. */\n#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_IN 0x01  /**< Passkey digit entered. */\n#define BLE_GAP_KP_NOT_TYPE_PASSKEY_DIGIT_OUT 0x02 /**< Passkey digit erased. */\n#define BLE_GAP_KP_NOT_TYPE_PASSKEY_CLEAR 0x03     /**< Passkey cleared. */\n#define BLE_GAP_KP_NOT_TYPE_PASSKEY_END 0x04       /**< Passkey entry completed. */\n/**@} */\n\n/**@defgroup BLE_GAP_SEC_STATUS GAP Security status\n * @{ */\n#define BLE_GAP_SEC_STATUS_SUCCESS 0x00                /**< Procedure completed with success. */\n#define BLE_GAP_SEC_STATUS_TIMEOUT 0x01                /**< Procedure timed out. */\n#define BLE_GAP_SEC_STATUS_PDU_INVALID 0x02            /**< Invalid PDU received. */\n#define BLE_GAP_SEC_STATUS_RFU_RANGE1_BEGIN 0x03       /**< Reserved for Future Use range #1 begin. */\n#define BLE_GAP_SEC_STATUS_RFU_RANGE1_END 0x80         /**< Reserved for Future Use range #1 end. */\n#define BLE_GAP_SEC_STATUS_PASSKEY_ENTRY_FAILED 0x81   /**< Passkey entry failed (user canceled or other). */\n#define BLE_GAP_SEC_STATUS_OOB_NOT_AVAILABLE 0x82      /**< Out of Band Key not available. */\n#define BLE_GAP_SEC_STATUS_AUTH_REQ 0x83               /**< Authentication requirements not met. */\n#define BLE_GAP_SEC_STATUS_CONFIRM_VALUE 0x84          /**< Confirm value failed. */\n#define BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP 0x85       /**< Pairing not supported.  */\n#define BLE_GAP_SEC_STATUS_ENC_KEY_SIZE 0x86           /**< Encryption key size. */\n#define BLE_GAP_SEC_STATUS_SMP_CMD_UNSUPPORTED 0x87    /**< Unsupported SMP command. */\n#define BLE_GAP_SEC_STATUS_UNSPECIFIED 0x88            /**< Unspecified reason. */\n#define BLE_GAP_SEC_STATUS_REPEATED_ATTEMPTS 0x89      /**< Too little time elapsed since last attempt. */\n#define BLE_GAP_SEC_STATUS_INVALID_PARAMS 0x8A         /**< Invalid parameters. */\n#define BLE_GAP_SEC_STATUS_DHKEY_FAILURE 0x8B          /**< DHKey check failure. */\n#define BLE_GAP_SEC_STATUS_NUM_COMP_FAILURE 0x8C       /**< Numeric Comparison failure. */\n#define BLE_GAP_SEC_STATUS_BR_EDR_IN_PROG 0x8D         /**< BR/EDR pairing in progress. */\n#define BLE_GAP_SEC_STATUS_X_TRANS_KEY_DISALLOWED 0x8E /**< BR/EDR Link Key cannot be used for LE keys. */\n#define BLE_GAP_SEC_STATUS_RFU_RANGE2_BEGIN 0x8F       /**< Reserved for Future Use range #2 begin. */\n#define BLE_GAP_SEC_STATUS_RFU_RANGE2_END 0xFF         /**< Reserved for Future Use range #2 end. */\n/**@} */\n\n/**@defgroup BLE_GAP_SEC_STATUS_SOURCES GAP Security status sources\n * @{ */\n#define BLE_GAP_SEC_STATUS_SOURCE_LOCAL 0x00  /**< Local failure. */\n#define BLE_GAP_SEC_STATUS_SOURCE_REMOTE 0x01 /**< Remote failure. */\n/**@} */\n\n/**@defgroup BLE_GAP_CP_LIMITS GAP Connection Parameters Limits\n * @{ */\n#define BLE_GAP_CP_MIN_CONN_INTVL_NONE 0xFFFF /**< No new minimum connection interval specified in connect parameters. */\n#define BLE_GAP_CP_MIN_CONN_INTVL_MIN                                                                                            \\\n    0x0006 /**< Lowest minimum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */\n#define BLE_GAP_CP_MIN_CONN_INTVL_MAX                                                                                            \\\n    0x0C80                                    /**< Highest minimum connection interval permitted, in units of 1.25 ms, i.e. 4 s. \\\n                                               */\n#define BLE_GAP_CP_MAX_CONN_INTVL_NONE 0xFFFF /**< No new maximum connection interval specified in connect parameters. */\n#define BLE_GAP_CP_MAX_CONN_INTVL_MIN                                                                                            \\\n    0x0006 /**< Lowest maximum connection interval permitted, in units of 1.25 ms, i.e. 7.5 ms. */\n#define BLE_GAP_CP_MAX_CONN_INTVL_MAX                                                                                            \\\n    0x0C80                                  /**< Highest maximum connection interval permitted, in units of 1.25 ms, i.e. 4 s.   \\\n                                             */\n#define BLE_GAP_CP_SLAVE_LATENCY_MAX 0x01F3 /**< Highest slave latency permitted, in connection events. */\n#define BLE_GAP_CP_CONN_SUP_TIMEOUT_NONE 0xFFFF /**< No new supervision timeout specified in connect parameters. */\n#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MIN 0x000A  /**< Lowest supervision timeout permitted, in units of 10 ms, i.e. 100 ms. */\n#define BLE_GAP_CP_CONN_SUP_TIMEOUT_MAX 0x0C80  /**< Highest supervision timeout permitted, in units of 10 ms, i.e. 32 s. */\n/**@} */\n\n/**@defgroup BLE_GAP_DEVNAME GAP device name defines.\n * @{ */\n#define BLE_GAP_DEVNAME_DEFAULT \"nRF5x\" /**< Default device name value. */\n#define BLE_GAP_DEVNAME_DEFAULT_LEN 31  /**< Default number of octets in device name. */\n#define BLE_GAP_DEVNAME_MAX_LEN 248     /**< Maximum number of octets in device name. */\n/**@} */\n\n/**@brief Disable RSSI events for connections */\n#define BLE_GAP_RSSI_THRESHOLD_INVALID 0xFF\n\n/**@defgroup BLE_GAP_PHYS GAP PHYs\n * @{ */\n#define BLE_GAP_PHY_AUTO 0x00    /**< Automatic PHY selection. Refer @ref sd_ble_gap_phy_update for more information.*/\n#define BLE_GAP_PHY_1MBPS 0x01   /**< 1 Mbps PHY. */\n#define BLE_GAP_PHY_2MBPS 0x02   /**< 2 Mbps PHY. */\n#define BLE_GAP_PHY_CODED 0x04   /**< Coded PHY. */\n#define BLE_GAP_PHY_NOT_SET 0xFF /**< PHY is not configured. */\n\n/**@brief Supported PHYs in connections, for scanning, and for advertising. */\n#define BLE_GAP_PHYS_SUPPORTED (BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_CODED) /**< All PHYs are supported. */\n\n/**@} */\n\n/**@defgroup BLE_GAP_CONN_SEC_MODE_SET_MACROS GAP attribute security requirement setters\n *\n * See @ref ble_gap_conn_sec_mode_t.\n * @{ */\n/**@brief Set sec_mode pointed to by ptr to have no access rights.*/\n#define BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(ptr)                                                                                 \\\n    do {                                                                                                                         \\\n        (ptr)->sm = 0;                                                                                                           \\\n        (ptr)->lv = 0;                                                                                                           \\\n    } while (0)\n/**@brief Set sec_mode pointed to by ptr to require no protection, open link.*/\n#define BLE_GAP_CONN_SEC_MODE_SET_OPEN(ptr)                                                                                      \\\n    do {                                                                                                                         \\\n        (ptr)->sm = 1;                                                                                                           \\\n        (ptr)->lv = 1;                                                                                                           \\\n    } while (0)\n/**@brief Set sec_mode pointed to by ptr to require encryption, but no MITM protection.*/\n#define BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(ptr)                                                                               \\\n    do {                                                                                                                         \\\n        (ptr)->sm = 1;                                                                                                           \\\n        (ptr)->lv = 2;                                                                                                           \\\n    } while (0)\n/**@brief Set sec_mode pointed to by ptr to require encryption and MITM protection.*/\n#define BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(ptr)                                                                             \\\n    do {                                                                                                                         \\\n        (ptr)->sm = 1;                                                                                                           \\\n        (ptr)->lv = 3;                                                                                                           \\\n    } while (0)\n/**@brief Set sec_mode pointed to by ptr to require LESC encryption and MITM protection.*/\n#define BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM(ptr)                                                                        \\\n    do {                                                                                                                         \\\n        (ptr)->sm = 1;                                                                                                           \\\n        (ptr)->lv = 4;                                                                                                           \\\n    } while (0)\n/**@brief Set sec_mode pointed to by ptr to require signing or encryption, no MITM protection needed.*/\n#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_NO_MITM(ptr)                                                                            \\\n    do {                                                                                                                         \\\n        (ptr)->sm = 2;                                                                                                           \\\n        (ptr)->lv = 1;                                                                                                           \\\n    } while (0)\n/**@brief Set sec_mode pointed to by ptr to require signing or encryption with MITM protection.*/\n#define BLE_GAP_CONN_SEC_MODE_SET_SIGNED_WITH_MITM(ptr)                                                                          \\\n    do {                                                                                                                         \\\n        (ptr)->sm = 2;                                                                                                           \\\n        (ptr)->lv = 2;                                                                                                           \\\n    } while (0)\n/**@} */\n\n/**@brief GAP Security Random Number Length. */\n#define BLE_GAP_SEC_RAND_LEN 8\n\n/**@brief GAP Security Key Length. */\n#define BLE_GAP_SEC_KEY_LEN 16\n\n/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key Length. */\n#define BLE_GAP_LESC_P256_PK_LEN 64\n\n/**@brief GAP LE Secure Connections Elliptic Curve Diffie-Hellman DHKey Length. */\n#define BLE_GAP_LESC_DHKEY_LEN 32\n\n/**@brief GAP Passkey Length. */\n#define BLE_GAP_PASSKEY_LEN 6\n\n/**@brief Maximum amount of addresses in the whitelist. */\n#define BLE_GAP_WHITELIST_ADDR_MAX_COUNT (8)\n\n/**@brief Maximum amount of identities in the device identities list. */\n#define BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT (8)\n\n/**@brief Default connection count for a configuration. */\n#define BLE_GAP_CONN_COUNT_DEFAULT (1)\n\n/**@defgroup BLE_GAP_EVENT_LENGTH GAP event length defines.\n * @{ */\n#define BLE_GAP_EVENT_LENGTH_MIN (2)           /**< Minimum event length, in 1.25 ms units. */\n#define BLE_GAP_EVENT_LENGTH_CODED_PHY_MIN (6) /**< The shortest event length in 1.25 ms units supporting LE Coded PHY. */\n#define BLE_GAP_EVENT_LENGTH_DEFAULT (3)       /**< Default event length, in 1.25 ms units. */\n/**@} */\n\n/**@defgroup BLE_GAP_ROLE_COUNT GAP concurrent connection count defines.\n * @{ */\n#define BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT (1)  /**< Default maximum number of connections concurrently acting as peripherals. */\n#define BLE_GAP_ROLE_COUNT_CENTRAL_DEFAULT (3) /**< Default maximum number of connections concurrently acting as centrals. */\n#define BLE_GAP_ROLE_COUNT_CENTRAL_SEC_DEFAULT                                                                                   \\\n    (1) /**< Default number of SMP instances shared between all connections acting as centrals. */\n#define BLE_GAP_ROLE_COUNT_COMBINED_MAX                                                                                          \\\n    (20) /**< Maximum supported number of concurrent connections in the peripheral and central roles combined. */\n\n/**@} */\n\n/**@brief Automatic data length parameter. */\n#define BLE_GAP_DATA_LENGTH_AUTO 0\n\n/**@defgroup BLE_GAP_AUTH_PAYLOAD_TIMEOUT Authenticated payload timeout defines.\n * @{ */\n#define BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MAX (48000) /**< Maximum authenticated payload timeout in 10 ms units, i.e. 8 minutes. */\n#define BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MIN (1)     /**< Minimum authenticated payload timeout in 10 ms units, i.e. 10 ms. */\n/**@} */\n\n/**@defgroup GAP_SEC_MODES GAP Security Modes\n * @{ */\n#define BLE_GAP_SEC_MODE 0x00 /**< No key (may be used to reject). */\n/**@} */\n\n/**@brief The total number of channels in Bluetooth Low Energy. */\n#define BLE_GAP_CHANNEL_COUNT (40)\n\n/**@defgroup BLE_GAP_QOS_CHANNEL_SURVEY_INTERVALS Quality of Service (QoS) Channel survey interval defines\n * @{ */\n#define BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_CONTINUOUS (0)   /**< Continuous channel survey. */\n#define BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_MIN_US (7500)    /**< Minimum channel survey interval in microseconds (7.5 ms). */\n#define BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_MAX_US (4000000) /**< Maximum channel survey interval in microseconds (4 s). */\n                                                             /**@}  */\n\n/** @} */\n\n/** @defgroup BLE_GAP_CHAR_INCL_CONFIG GAP Characteristic inclusion configurations\n * @{\n */\n#define BLE_GAP_CHAR_INCL_CONFIG_INCLUDE (0) /**< Include the characteristic in the Attribute Table */\n#define BLE_GAP_CHAR_INCL_CONFIG_EXCLUDE_WITH_SPACE                                                                              \\\n    (1) /**< Do not include the characteristic in the Attribute table.                                                           \\\n             The SoftDevice will reserve the attribute handles                                                                   \\\n             which are otherwise used for this characteristic.                                                                   \\\n             By reserving the attribute handles it will be possible                                                              \\\n             to upgrade the SoftDevice without changing handle of the                                                            \\\n             Service Changed characteristic. */\n#define BLE_GAP_CHAR_INCL_CONFIG_EXCLUDE_WITHOUT_SPACE                                                                           \\\n    (2) /**< Do not include the characteristic in the Attribute table.                                                           \\\n             The SoftDevice will not reserve the attribute handles                                                               \\\n             which are otherwise used for this characteristic. */\n/**@} */\n\n/** @defgroup BLE_GAP_CHAR_INCL_CONFIG_DEFAULTS Characteristic inclusion default values\n * @{ */\n#define BLE_GAP_PPCP_INCL_CONFIG_DEFAULT (BLE_GAP_CHAR_INCL_CONFIG_INCLUDE) /**< Included by default. */\n#define BLE_GAP_CAR_INCL_CONFIG_DEFAULT (BLE_GAP_CHAR_INCL_CONFIG_INCLUDE)  /**< Included by default. */\n/**@} */\n\n/** @defgroup BLE_GAP_SLAVE_LATENCY Slave latency configuration options\n * @{ */\n#define BLE_GAP_SLAVE_LATENCY_ENABLE                                                                                             \\\n    (0) /**< Slave latency is enabled. When slave latency is enabled,                                                            \\\n             the slave will wake up every time it has data to send,                                                              \\\n             and/or every slave latency number of connection events. */\n#define BLE_GAP_SLAVE_LATENCY_DISABLE                                                                                            \\\n    (1) /**< Disable slave latency. The slave will wake up every connection event                                                \\\n             regardless of the requested slave latency.                                                                          \\\n             This option consumes the most power. */\n#define BLE_GAP_SLAVE_LATENCY_WAIT_FOR_ACK                                                                                       \\\n    (2) /**< The slave will wake up every connection event if it has not received                                                \\\n             an ACK from the master for at least slave latency events. This                                                      \\\n             configuration may increase the power consumption in environments                                                    \\\n             with a lot of radio activity. */\n/**@} */\n\n/**@addtogroup BLE_GAP_STRUCTURES Structures\n * @{ */\n\n/**@brief Advertising event properties. */\ntypedef struct {\n    uint8_t type;                 /**< Advertising type. See @ref BLE_GAP_ADV_TYPES. */\n    uint8_t anonymous : 1;        /**< Omit advertiser's address from all PDUs.\n                                       @note Anonymous advertising is only available for\n                                       @ref BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED and\n                                       @ref BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_DIRECTED. */\n    uint8_t include_tx_power : 1; /**< This feature is not supported on this SoftDevice. */\n} ble_gap_adv_properties_t;\n\n/**@brief Advertising report type. */\ntypedef struct {\n    uint16_t connectable : 1;   /**< Connectable advertising event type. */\n    uint16_t scannable : 1;     /**< Scannable advertising event type. */\n    uint16_t directed : 1;      /**< Directed advertising event type. */\n    uint16_t scan_response : 1; /**< Received a scan response. */\n    uint16_t extended_pdu : 1;  /**< Received an extended advertising set. */\n    uint16_t status : 2;        /**< Data status. See @ref BLE_GAP_ADV_DATA_STATUS. */\n    uint16_t reserved : 9;      /**< Reserved for future use. */\n} ble_gap_adv_report_type_t;\n\n/**@brief Advertising Auxiliary Pointer. */\ntypedef struct {\n    uint16_t aux_offset; /**< Time offset from the beginning of advertising packet to the auxiliary packet in 100 us units. */\n    uint8_t aux_phy;     /**< Indicates the PHY on which the auxiliary advertising packet is sent. See @ref BLE_GAP_PHYS. */\n} ble_gap_aux_pointer_t;\n\n/**@brief Bluetooth Low Energy address. */\ntypedef struct {\n    uint8_t\n        addr_id_peer : 1;           /**< Only valid for peer addresses.\n                                         This bit is set by the SoftDevice to indicate whether the address has been resolved from\n                                         a Resolvable Private Address (when the peer is using privacy).\n                                         If set to 1, @ref addr and @ref addr_type refer to the identity address of the resolved address.\n          \n                                         This bit is ignored when a variable of type @ref ble_gap_addr_t is used as input to API functions.\n                                     */\n    uint8_t addr_type : 7;          /**< See @ref BLE_GAP_ADDR_TYPES. */\n    uint8_t addr[BLE_GAP_ADDR_LEN]; /**< 48-bit address, LSB format.\n                                         @ref addr is not used if @ref addr_type is @ref BLE_GAP_ADDR_TYPE_ANONYMOUS. */\n} ble_gap_addr_t;\n\n/**@brief GAP connection parameters.\n *\n * @note  When ble_conn_params_t is received in an event, both min_conn_interval and\n *        max_conn_interval will be equal to the connection interval set by the central.\n *\n * @note  If both conn_sup_timeout and max_conn_interval are specified, then the following constraint applies:\n *        conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval\n *        that corresponds to the following Bluetooth Spec requirement:\n *        The Supervision_Timeout in milliseconds shall be larger than\n *        (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds.\n */\ntypedef struct {\n    uint16_t min_conn_interval; /**< Minimum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/\n    uint16_t max_conn_interval; /**< Maximum Connection Interval in 1.25 ms units, see @ref BLE_GAP_CP_LIMITS.*/\n    uint16_t slave_latency;     /**< Slave Latency in number of connection events, see @ref BLE_GAP_CP_LIMITS.*/\n    uint16_t conn_sup_timeout;  /**< Connection Supervision Timeout in 10 ms units, see @ref BLE_GAP_CP_LIMITS.*/\n} ble_gap_conn_params_t;\n\n/**@brief GAP connection security modes.\n *\n * Security Mode 0 Level 0: No access permissions at all (this level is not defined by the Bluetooth Core specification).\\n\n * Security Mode 1 Level 1: No security is needed (aka open link).\\n\n * Security Mode 1 Level 2: Encrypted link required, MITM protection not necessary.\\n\n * Security Mode 1 Level 3: MITM protected encrypted link required.\\n\n * Security Mode 1 Level 4: LESC MITM protected encrypted link using a 128-bit strength encryption key required.\\n\n * Security Mode 2 Level 1: Signing or encryption required, MITM protection not necessary.\\n\n * Security Mode 2 Level 2: MITM protected signing required, unless link is MITM protected encrypted.\\n\n */\ntypedef struct {\n    uint8_t sm : 4; /**< Security Mode (1 or 2), 0 for no permissions at all. */\n    uint8_t lv : 4; /**< Level (1, 2, 3 or 4), 0 for no permissions at all. */\n\n} ble_gap_conn_sec_mode_t;\n\n/**@brief GAP connection security status.*/\ntypedef struct {\n    ble_gap_conn_sec_mode_t sec_mode; /**< Currently active security mode for this connection.*/\n    uint8_t\n        encr_key_size; /**< Length of currently active encryption key, 7 to 16 octets (only applicable for bonding procedures). */\n} ble_gap_conn_sec_t;\n\n/**@brief Identity Resolving Key. */\ntypedef struct {\n    uint8_t irk[BLE_GAP_SEC_KEY_LEN]; /**< Array containing IRK. */\n} ble_gap_irk_t;\n\n/**@brief Channel mask (40 bits).\n * Every channel is represented with a bit positioned as per channel index defined in Bluetooth Core Specification v5.0,\n * Vol 6, Part B, Section 1.4.1. The LSB contained in array element 0 represents channel index 0, and bit 39 represents\n * channel index 39. If a bit is set to 1, the channel is not used.\n */\ntypedef uint8_t ble_gap_ch_mask_t[5];\n\n/**@brief GAP advertising parameters. */\ntypedef struct {\n    ble_gap_adv_properties_t properties; /**< The properties of the advertising events. */\n    ble_gap_addr_t const *p_peer_addr;   /**< Address of a known peer.\n                                              @note ble_gap_addr_t::addr_type cannot be\n                                                    @ref BLE_GAP_ADDR_TYPE_ANONYMOUS.\n                                              - When privacy is enabled and the local device uses\n                                                @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE addresses,\n                                                the device identity list is searched for a matching entry. If\n                                                the local IRK for that device identity is set, the local IRK\n                                                for that device will be used to generate the advertiser address\n                                                field in the advertising packet.\n                                              - If @ref ble_gap_adv_properties_t::type is directed, this must be\n                                                set to the targeted scanner or initiator. If the peer address is\n                                                in the device identity list, the peer IRK for that device will be\n                                                used to generate @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE\n                                                target addresses used in the advertising event PDUs. */\n    uint32_t interval;                   /**< Advertising interval in 625 us units. @sa BLE_GAP_ADV_INTERVALS.\n                                              @note If @ref ble_gap_adv_properties_t::type is set to\n                                                    @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE\n                                                    advertising, this parameter is ignored. */\n    uint16_t duration;                   /**< Advertising duration in 10 ms units. When timeout is reached,\n                                              an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised.\n                                              @sa BLE_GAP_ADV_TIMEOUT_VALUES.\n                                              @note The SoftDevice will always complete at least one advertising\n                                                    event even if the duration is set too low. */\n    uint8_t max_adv_evts;                /**< Maximum advertising events that shall be sent prior to disabling\n                                              advertising. Setting the value to 0 disables the limitation. When\n                                              the count of advertising events specified by this parameter\n                                              (if not 0) is reached, advertising will be automatically stopped\n                                              and an event of type @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised\n                                              @note If @ref ble_gap_adv_properties_t::type is set to\n                                                    @ref BLE_GAP_ADV_TYPE_CONNECTABLE_NONSCANNABLE_DIRECTED_HIGH_DUTY_CYCLE,\n                                                    this parameter is ignored. */\n    ble_gap_ch_mask_t channel_mask;      /**< Channel mask for primary and secondary advertising channels.\n                                              At least one of the primary channels, that is channel index 37-39, must be used.\n                                              Masking away secondary advertising channels is not supported. */\n    uint8_t filter_policy;               /**< Filter Policy. @sa BLE_GAP_ADV_FILTER_POLICIES. */\n    uint8_t primary_phy;                 /**< Indicates the PHY on which the primary advertising channel packets\n                                              are transmitted. If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS\n                                              will be used.\n                                              Valid values are @ref BLE_GAP_PHY_1MBPS and @ref BLE_GAP_PHY_CODED.\n                                              @note The primary_phy shall indicate @ref BLE_GAP_PHY_1MBPS if\n                                                    @ref ble_gap_adv_properties_t::type is not an extended advertising type. */\n    uint8_t secondary_phy;               /**< Indicates the PHY on which the secondary advertising channel packets\n                                              are transmitted.\n                                              If set to @ref BLE_GAP_PHY_AUTO, @ref BLE_GAP_PHY_1MBPS will be used.\n                                              Valid values are\n                                              @ref BLE_GAP_PHY_1MBPS, @ref BLE_GAP_PHY_2MBPS, and @ref BLE_GAP_PHY_CODED.\n                                              If @ref ble_gap_adv_properties_t::type is an extended advertising type\n                                              and connectable, this is the PHY that will be used to establish a\n                                              connection and send AUX_ADV_IND packets on.\n                                              @note This parameter will be ignored when\n                                                    @ref ble_gap_adv_properties_t::type is not an extended advertising type. */\n    uint8_t set_id : 4;                  /**< The advertising set identifier distinguishes this advertising set from other\n                                              advertising sets transmitted by this and other devices.\n                                              @note This parameter will be ignored when\n                                                    @ref ble_gap_adv_properties_t::type is not an extended advertising type. */\n    uint8_t scan_req_notification : 1;   /**< Enable scan request notifications for this advertising set. When a\n                                              scan request is received and the scanner address is allowed\n                                              by the filter policy, @ref BLE_GAP_EVT_SCAN_REQ_REPORT is raised.\n                                              @note This parameter will be ignored when\n                                                    @ref ble_gap_adv_properties_t::type is a non-scannable\n                                                    advertising type. */\n} ble_gap_adv_params_t;\n\n/**@brief GAP advertising data buffers.\n *\n * The application must provide the buffers for advertisement. The memory shall reside in application RAM, and\n * shall never be modified while advertising. The data shall be kept alive until either:\n *  - @ref BLE_GAP_EVT_ADV_SET_TERMINATED is raised.\n *  - @ref BLE_GAP_EVT_CONNECTED is raised with @ref ble_gap_evt_connected_t::adv_handle set to the corresponding\n *    advertising handle.\n *  - Advertising is stopped.\n *  - Advertising data is changed.\n * To update advertising data while advertising, provide new buffers to @ref sd_ble_gap_adv_set_configure. */\ntypedef struct {\n    ble_data_t adv_data;      /**< Advertising data.\n                                   @note\n                                   Advertising data can only be specified for a @ref ble_gap_adv_properties_t::type\n                                   that is allowed to contain advertising data. */\n    ble_data_t scan_rsp_data; /**< Scan response data.\n                                   @note\n                                   Scan response data can only be specified for a @ref ble_gap_adv_properties_t::type\n                                   that is scannable. */\n} ble_gap_adv_data_t;\n\n/**@brief GAP scanning parameters. */\ntypedef struct {\n    uint8_t extended : 1;               /**< If 1, the scanner will accept extended advertising packets.\n                                             If set to 0, the scanner will not receive advertising packets\n                                             on secondary advertising channels, and will not be able\n                                             to receive long advertising PDUs. */\n    uint8_t report_incomplete_evts : 1; /**< If 1, events of type @ref ble_gap_evt_adv_report_t may have\n                                             @ref ble_gap_adv_report_type_t::status set to\n                                             @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA.\n                                             This parameter is ignored when used with @ref sd_ble_gap_connect\n                                             @note This may be used to abort receiving more packets from an extended\n                                                   advertising event, and is only available for extended\n                                                   scanning, see @ref sd_ble_gap_scan_start.\n                                             @note This feature is not supported by this SoftDevice. */\n    uint8_t active : 1;                 /**< If 1, perform active scanning by sending scan requests.\n                                             This parameter is ignored when used with @ref sd_ble_gap_connect. */\n    uint8_t filter_policy : 2;          /**< Scanning filter policy. @sa BLE_GAP_SCAN_FILTER_POLICIES.\n                                             @note Only @ref BLE_GAP_SCAN_FP_ACCEPT_ALL and\n                                                   @ref BLE_GAP_SCAN_FP_WHITELIST are valid when used with\n                                                   @ref sd_ble_gap_connect */\n    uint8_t scan_phys;                  /**< Bitfield of PHYs to scan on. If set to @ref BLE_GAP_PHY_AUTO,\n                                             scan_phys will default to @ref BLE_GAP_PHY_1MBPS.\n                                             - If @ref ble_gap_scan_params_t::extended is set to 0, the only\n                                               supported PHY is @ref BLE_GAP_PHY_1MBPS.\n                                             - When used with @ref sd_ble_gap_scan_start,\n                                               the bitfield indicates the PHYs the scanner will use for scanning\n                                               on primary advertising channels. The scanner will accept\n                                               @ref BLE_GAP_PHYS_SUPPORTED as secondary advertising channel PHYs.\n                                             - When used with @ref sd_ble_gap_connect, the bitfield indicates\n                                               the PHYs the initiator will use for scanning on primary advertising\n                                               channels. The initiator will accept connections initiated on either\n                                               of the @ref BLE_GAP_PHYS_SUPPORTED PHYs.\n                                               If scan_phys contains @ref BLE_GAP_PHY_1MBPS and/or @ref BLE_GAP_PHY_2MBPS,\n                                               the primary scan PHY is @ref BLE_GAP_PHY_1MBPS.\n                                               If scan_phys also contains @ref BLE_GAP_PHY_CODED, the primary scan\n                                               PHY will also contain @ref BLE_GAP_PHY_CODED. If the only scan PHY is\n                                               @ref BLE_GAP_PHY_CODED, the primary scan PHY is\n                                               @ref BLE_GAP_PHY_CODED only. */\n    uint16_t interval;                  /**< Scan interval in 625 us units. @sa BLE_GAP_SCAN_INTERVALS. */\n    uint16_t window;                    /**< Scan window in 625 us units. @sa BLE_GAP_SCAN_WINDOW.\n                                             If scan_phys contains both @ref BLE_GAP_PHY_1MBPS and\n                                             @ref BLE_GAP_PHY_CODED interval shall be larger than or\n                                             equal to twice the scan window. */\n    uint16_t timeout;                   /**< Scan timeout in 10 ms units. @sa BLE_GAP_SCAN_TIMEOUT. */\n    ble_gap_ch_mask_t channel_mask;     /**< Channel mask for primary and secondary advertising channels.\n                                             At least one of the primary channels, that is channel index 37-39, must be\n                                             set to 0.\n                                             Masking away secondary channels is not supported. */\n} ble_gap_scan_params_t;\n\n/**@brief Privacy.\n *\n *        The privacy feature provides a way for the device to avoid being tracked over a period of time.\n *        The privacy feature, when enabled, hides the local device identity and replaces it with a private address\n *        that is automatically refreshed at a specified interval.\n *\n *        If a device still wants to be recognized by other peers, it needs to share it's Identity Resolving Key (IRK).\n *        With this key, a device can generate a random private address that can only be recognized by peers in possession of that\n * key, and devices can establish connections without revealing their real identities.\n *\n *        Both network privacy (@ref BLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY) and device privacy (@ref\n * BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY) are supported.\n *\n * @note  If the device IRK is updated, the new IRK becomes the one to be distributed in all\n *        bonding procedures performed after @ref sd_ble_gap_privacy_set returns.\n *        The IRK distributed during bonding procedure is the device IRK that is active when @ref sd_ble_gap_sec_params_reply is\n * called.\n */\ntypedef struct {\n    uint8_t privacy_mode;      /**< Privacy mode, see @ref BLE_GAP_PRIVACY_MODES. Default is @ref BLE_GAP_PRIVACY_MODE_OFF. */\n    uint8_t private_addr_type; /**< The private address type must be either @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE or\n                                  @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE. */\n    uint16_t private_addr_cycle_s; /**< Private address cycle interval in seconds. Providing an address cycle value of 0 will use\n                                      the default value defined by @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S. */\n    ble_gap_irk_t\n        *p_device_irk; /**< When used as input, pointer to IRK structure that will be used as the default IRK. If NULL, the device\n                          default IRK will be used. When used as output, pointer to IRK structure where the current default IRK\n                          will be written to. If NULL, this argument is ignored. By default, the default IRK is used to generate\n                          random private resolvable addresses for the local device unless instructed otherwise. */\n} ble_gap_privacy_params_t;\n\n/**@brief PHY preferences for TX and RX\n * @note  tx_phys and rx_phys are bit fields. Multiple bits can be set in them to indicate multiple preferred PHYs for each\n * direction.\n * @code\n * p_gap_phys->tx_phys = BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS;\n * p_gap_phys->rx_phys = BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_2MBPS;\n * @endcode\n *\n */\ntypedef struct {\n    uint8_t tx_phys; /**< Preferred transmit PHYs, see @ref BLE_GAP_PHYS. */\n    uint8_t rx_phys; /**< Preferred receive PHYs, see @ref BLE_GAP_PHYS. */\n} ble_gap_phys_t;\n\n/** @brief Keys that can be exchanged during a bonding procedure. */\ntypedef struct {\n    uint8_t enc : 1;  /**< Long Term Key and Master Identification. */\n    uint8_t id : 1;   /**< Identity Resolving Key and Identity Address Information. */\n    uint8_t sign : 1; /**< Connection Signature Resolving Key. */\n    uint8_t link : 1; /**< Derive the Link Key from the LTK. */\n} ble_gap_sec_kdist_t;\n\n/**@brief GAP security parameters. */\ntypedef struct {\n    uint8_t bond : 1;     /**< Perform bonding. */\n    uint8_t mitm : 1;     /**< Enable Man In The Middle protection. */\n    uint8_t lesc : 1;     /**< Enable LE Secure Connection pairing. */\n    uint8_t keypress : 1; /**< Enable generation of keypress notifications. */\n    uint8_t io_caps : 3;  /**< IO capabilities, see @ref BLE_GAP_IO_CAPS. */\n    uint8_t oob : 1;      /**< The OOB data flag.\n                               - In LE legacy pairing, this flag is set if a device has out of band authentication data.\n                                 The OOB method is used if both of the devices have out of band authentication data.\n                               - In LE Secure Connections pairing, this flag is set if a device has the peer device's out of band\n                             authentication data.      The OOB method is used if at least one device has the peer device's OOB data\n                             available. */\n    uint8_t\n        min_key_size; /**< Minimum encryption key size in octets between 7 and 16. If 0 then not applicable in this instance. */\n    uint8_t max_key_size;           /**< Maximum encryption key size in octets between min_key_size and 16. */\n    ble_gap_sec_kdist_t kdist_own;  /**< Key distribution bitmap: keys that the local device will distribute. */\n    ble_gap_sec_kdist_t kdist_peer; /**< Key distribution bitmap: keys that the remote device will distribute. */\n} ble_gap_sec_params_t;\n\n/**@brief GAP Encryption Information. */\ntypedef struct {\n    uint8_t ltk[BLE_GAP_SEC_KEY_LEN]; /**< Long Term Key. */\n    uint8_t lesc : 1;                 /**< Key generated using LE Secure Connections. */\n    uint8_t auth : 1;                 /**< Authenticated Key. */\n    uint8_t ltk_len : 6;              /**< LTK length in octets. */\n} ble_gap_enc_info_t;\n\n/**@brief GAP Master Identification. */\ntypedef struct {\n    uint16_t ediv;                      /**< Encrypted Diversifier. */\n    uint8_t rand[BLE_GAP_SEC_RAND_LEN]; /**< Random Number. */\n} ble_gap_master_id_t;\n\n/**@brief GAP Signing Information. */\ntypedef struct {\n    uint8_t csrk[BLE_GAP_SEC_KEY_LEN]; /**< Connection Signature Resolving Key. */\n} ble_gap_sign_info_t;\n\n/**@brief GAP LE Secure Connections P-256 Public Key. */\ntypedef struct {\n    uint8_t pk[BLE_GAP_LESC_P256_PK_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman P-256 Public Key. Stored in the\n                                             standard SMP protocol format: {X,Y} both in little-endian. */\n} ble_gap_lesc_p256_pk_t;\n\n/**@brief GAP LE Secure Connections DHKey. */\ntypedef struct {\n    uint8_t key[BLE_GAP_LESC_DHKEY_LEN]; /**< LE Secure Connections Elliptic Curve Diffie-Hellman Key. Stored in little-endian. */\n} ble_gap_lesc_dhkey_t;\n\n/**@brief GAP LE Secure Connections OOB data. */\ntypedef struct {\n    ble_gap_addr_t addr;            /**< Bluetooth address of the device. */\n    uint8_t r[BLE_GAP_SEC_KEY_LEN]; /**< Random Number. */\n    uint8_t c[BLE_GAP_SEC_KEY_LEN]; /**< Confirm Value. */\n} ble_gap_lesc_oob_data_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_CONNECTED. */\ntypedef struct {\n    ble_gap_addr_t\n        peer_addr;                     /**< Bluetooth address of the peer device. If the peer_addr resolved: @ref\n                                          ble_gap_addr_t::addr_id_peer is set to 1          and the address is the device's identity address. */\n    uint8_t role;                      /**< BLE role for this connection, see @ref BLE_GAP_ROLES */\n    ble_gap_conn_params_t conn_params; /**< GAP Connection Parameters. */\n    uint8_t adv_handle;                /**< Advertising handle in which advertising has ended.\n                                            This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH. */\n    ble_gap_adv_data_t adv_data;       /**< Advertising buffers corresponding to the terminated\n                                            advertising set. The advertising buffers provided in\n                                            @ref sd_ble_gap_adv_set_configure are now released.\n                                            This variable is only set if role is set to @ref BLE_GAP_ROLE_PERIPH. */\n} ble_gap_evt_connected_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_DISCONNECTED. */\ntypedef struct {\n    uint8_t reason; /**< HCI error code, see @ref BLE_HCI_STATUS_CODES. */\n} ble_gap_evt_disconnected_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE. */\ntypedef struct {\n    ble_gap_conn_params_t conn_params; /**<  GAP Connection Parameters. */\n} ble_gap_evt_conn_param_update_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_PHY_UPDATE_REQUEST. */\ntypedef struct {\n    ble_gap_phys_t peer_preferred_phys; /**< The PHYs the peer prefers to use. */\n} ble_gap_evt_phy_update_request_t;\n\n/**@brief Event Structure for @ref BLE_GAP_EVT_PHY_UPDATE. */\ntypedef struct {\n    uint8_t status; /**< Status of the procedure, see @ref BLE_HCI_STATUS_CODES.*/\n    uint8_t tx_phy; /**< TX PHY for this connection, see @ref BLE_GAP_PHYS. */\n    uint8_t rx_phy; /**< RX PHY for this connection, see @ref BLE_GAP_PHYS. */\n} ble_gap_evt_phy_update_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST. */\ntypedef struct {\n    ble_gap_sec_params_t peer_params; /**< Initiator Security Parameters. */\n} ble_gap_evt_sec_params_request_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_SEC_INFO_REQUEST. */\ntypedef struct {\n    ble_gap_addr_t peer_addr;      /**< Bluetooth address of the peer device. */\n    ble_gap_master_id_t master_id; /**< Master Identification for LTK lookup. */\n    uint8_t enc_info : 1;          /**< If 1, Encryption Information required. */\n    uint8_t id_info : 1;           /**< If 1, Identity Information required. */\n    uint8_t sign_info : 1;         /**< If 1, Signing Information required. */\n} ble_gap_evt_sec_info_request_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_PASSKEY_DISPLAY. */\ntypedef struct {\n    uint8_t passkey[BLE_GAP_PASSKEY_LEN]; /**< 6-digit passkey in ASCII ('0'-'9' digits only). */\n    uint8_t match_request : 1; /**< If 1 requires the application to report the match using @ref sd_ble_gap_auth_key_reply\n                                    with either @ref BLE_GAP_AUTH_KEY_TYPE_NONE if there is no match or\n                                    @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY if there is a match. */\n} ble_gap_evt_passkey_display_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_KEY_PRESSED. */\ntypedef struct {\n    uint8_t kp_not; /**< Keypress notification type, see @ref BLE_GAP_KP_NOT_TYPES. */\n} ble_gap_evt_key_pressed_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_KEY_REQUEST. */\ntypedef struct {\n    uint8_t key_type; /**< See @ref BLE_GAP_AUTH_KEY_TYPES. */\n} ble_gap_evt_auth_key_request_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST. */\ntypedef struct {\n    ble_gap_lesc_p256_pk_t\n        *p_pk_peer;       /**< LE Secure Connections remote P-256 Public Key. This will point to the application-supplied memory\n                               inside the keyset during the call to @ref sd_ble_gap_sec_params_reply. */\n    uint8_t oobd_req : 1; /**< LESC OOB data required. A call to @ref sd_ble_gap_lesc_oob_data_set is required to complete the\n                             procedure. */\n} ble_gap_evt_lesc_dhkey_request_t;\n\n/**@brief Security levels supported.\n * @note  See Bluetooth Specification Version 4.2 Volume 3, Part C, Chapter 10, Section 10.2.1.\n */\ntypedef struct {\n    uint8_t lv1 : 1; /**< If 1: Level 1 is supported. */\n    uint8_t lv2 : 1; /**< If 1: Level 2 is supported. */\n    uint8_t lv3 : 1; /**< If 1: Level 3 is supported. */\n    uint8_t lv4 : 1; /**< If 1: Level 4 is supported. */\n} ble_gap_sec_levels_t;\n\n/**@brief Encryption Key. */\ntypedef struct {\n    ble_gap_enc_info_t enc_info;   /**< Encryption Information. */\n    ble_gap_master_id_t master_id; /**< Master Identification. */\n} ble_gap_enc_key_t;\n\n/**@brief Identity Key. */\ntypedef struct {\n    ble_gap_irk_t id_info;       /**< Identity Resolving Key. */\n    ble_gap_addr_t id_addr_info; /**< Identity Address. */\n} ble_gap_id_key_t;\n\n/**@brief Security Keys. */\ntypedef struct {\n    ble_gap_enc_key_t *p_enc_key;    /**< Encryption Key, or NULL. */\n    ble_gap_id_key_t *p_id_key;      /**< Identity Key, or NULL. */\n    ble_gap_sign_info_t *p_sign_key; /**< Signing Key, or NULL. */\n    ble_gap_lesc_p256_pk_t *p_pk;    /**< LE Secure Connections P-256 Public Key. When in debug mode the application must use the\n                                        value defined    in the Core Bluetooth Specification v4.2 Vol.3, Part H, Section 2.3.5.6.1 */\n} ble_gap_sec_keys_t;\n\n/**@brief Security key set for both local and peer keys. */\ntypedef struct {\n    ble_gap_sec_keys_t keys_own; /**< Keys distributed by the local device. For LE Secure Connections the encryption key will be\n                                    generated locally and will always be stored if bonding. */\n    ble_gap_sec_keys_t\n        keys_peer; /**< Keys distributed by the remote device. For LE Secure Connections, p_enc_key must always be NULL. */\n} ble_gap_sec_keyset_t;\n\n/**@brief Data Length Update Procedure parameters. */\ntypedef struct {\n    uint16_t max_tx_octets;  /**< Maximum number of payload octets that a Controller supports for transmission of a single Link\n                                Layer Data Channel PDU. */\n    uint16_t max_rx_octets;  /**< Maximum number of payload octets that a Controller supports for reception of a single Link Layer\n                                Data Channel PDU. */\n    uint16_t max_tx_time_us; /**< Maximum time, in microseconds, that a Controller supports for transmission of a single Link\n                                Layer Data Channel PDU. */\n    uint16_t max_rx_time_us; /**< Maximum time, in microseconds, that a Controller supports for reception of a single Link Layer\n                                Data Channel PDU. */\n} ble_gap_data_length_params_t;\n\n/**@brief Data Length Update Procedure local limitation. */\ntypedef struct {\n    uint16_t tx_payload_limited_octets; /**< If > 0, the requested TX packet length is too long by this many octets. */\n    uint16_t rx_payload_limited_octets; /**< If > 0, the requested RX packet length is too long by this many octets. */\n    uint16_t tx_rx_time_limited_us; /**< If > 0, the requested combination of TX and RX packet lengths is too long by this many\n                                       microseconds. */\n} ble_gap_data_length_limitation_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_AUTH_STATUS. */\ntypedef struct {\n    uint8_t auth_status;             /**< Authentication status, see @ref BLE_GAP_SEC_STATUS. */\n    uint8_t error_src : 2;           /**< On error, source that caused the failure, see @ref BLE_GAP_SEC_STATUS_SOURCES. */\n    uint8_t bonded : 1;              /**< Procedure resulted in a bond. */\n    uint8_t lesc : 1;                /**< Procedure resulted in a LE Secure Connection. */\n    ble_gap_sec_levels_t sm1_levels; /**< Levels supported in Security Mode 1. */\n    ble_gap_sec_levels_t sm2_levels; /**< Levels supported in Security Mode 2. */\n    ble_gap_sec_kdist_t kdist_own;   /**< Bitmap stating which keys were exchanged (distributed) by the local device. If bonding\n                                        with LE Secure Connections, the enc bit will be always set. */\n    ble_gap_sec_kdist_t kdist_peer;  /**< Bitmap stating which keys were exchanged (distributed) by the remote device. If bonding\n                                        with LE Secure Connections, the enc bit will never be set. */\n} ble_gap_evt_auth_status_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_CONN_SEC_UPDATE. */\ntypedef struct {\n    ble_gap_conn_sec_t conn_sec; /**< Connection security level. */\n} ble_gap_evt_conn_sec_update_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_TIMEOUT. */\ntypedef struct {\n    uint8_t src; /**< Source of timeout event, see @ref BLE_GAP_TIMEOUT_SOURCES. */\n    union {\n        ble_data_t adv_report_buffer; /**< If source is set to @ref BLE_GAP_TIMEOUT_SRC_SCAN, the released\n                                           scan buffer is contained in this field. */\n    } params;                         /**< Event Parameters. */\n} ble_gap_evt_timeout_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_RSSI_CHANGED. */\ntypedef struct {\n    int8_t rssi;      /**< Received Signal Strength Indication in dBm.\n                           @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature\n                         measurement. */\n    uint8_t ch_index; /**< Data Channel Index on which the Signal Strength is measured (0-36). */\n} ble_gap_evt_rssi_changed_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_ADV_SET_TERMINATED */\ntypedef struct {\n    uint8_t reason;                   /**< Reason for why the advertising set terminated. See\n                                           @ref BLE_GAP_EVT_ADV_SET_TERMINATED_REASON. */\n    uint8_t adv_handle;               /**< Advertising handle in which advertising has ended. */\n    uint8_t num_completed_adv_events; /**< If @ref ble_gap_adv_params_t::max_adv_evts was not set to 0,\n                                           this field indicates the number of completed advertising events. */\n    ble_gap_adv_data_t adv_data;      /**< Advertising buffers corresponding to the terminated\n                                           advertising set. The advertising buffers provided in\n                                           @ref sd_ble_gap_adv_set_configure are now released. */\n} ble_gap_evt_adv_set_terminated_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_ADV_REPORT.\n *\n * @note If @ref ble_gap_adv_report_type_t::status is set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA,\n *       not all fields in the advertising report may be available.\n *\n * @note When ble_gap_adv_report_type_t::status is not set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA,\n *       scanning will be paused. To continue scanning, call @ref sd_ble_gap_scan_start.\n */\ntypedef struct {\n    ble_gap_adv_report_type_t type;    /**< Advertising report type. See @ref ble_gap_adv_report_type_t. */\n    ble_gap_addr_t peer_addr;          /**< Bluetooth address of the peer device. If the peer_addr is resolved:\n                                            @ref ble_gap_addr_t::addr_id_peer is set to 1 and the address is the\n                                            peer's identity address. */\n    ble_gap_addr_t direct_addr;        /**< Contains the target address of the advertising event if\n                                            @ref ble_gap_adv_report_type_t::directed is set to 1. If the\n                                            SoftDevice was able to resolve the address,\n                                            @ref ble_gap_addr_t::addr_id_peer is set to 1 and the direct_addr\n                                            contains the local identity address. If the target address of the\n                                            advertising event is @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE,\n                                            and the SoftDevice was unable to resolve it, the application may try\n                                            to resolve this address to find out if the advertising event was\n                                            directed to us. */\n    uint8_t primary_phy;               /**< Indicates the PHY on which the primary advertising packet was received.\n                                            See @ref BLE_GAP_PHYS. */\n    uint8_t secondary_phy;             /**< Indicates the PHY on which the secondary advertising packet was received.\n                                            See @ref BLE_GAP_PHYS. This field is set to @ref BLE_GAP_PHY_NOT_SET if no packets\n                                            were received on a secondary advertising channel. */\n    int8_t tx_power;                   /**< TX Power reported by the advertiser in the last packet header received.\n                                            This field is set to @ref BLE_GAP_POWER_LEVEL_INVALID if the\n                                            last received packet did not contain the Tx Power field.\n                                            @note TX Power is only included in extended advertising packets. */\n    int8_t rssi;                       /**< Received Signal Strength Indication in dBm of the last packet received.\n                                            @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature\n                                          measurement. */\n    uint8_t ch_index;                  /**< Channel Index on which the last advertising packet is received (0-39). */\n    uint8_t set_id;                    /**< Set ID of the received advertising data. Set ID is not present\n                                            if set to @ref BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE. */\n    uint16_t data_id : 12;             /**< The advertising data ID of the received advertising data. Data ID\n                                            is not present if @ref ble_gap_evt_adv_report_t::set_id is set to\n                                            @ref BLE_GAP_ADV_REPORT_SET_ID_NOT_AVAILABLE. */\n    ble_data_t data;                   /**< Received advertising or scan response data. If\n                                            @ref ble_gap_adv_report_type_t::status is not set to\n                                            @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, the data buffer provided\n                                            in @ref sd_ble_gap_scan_start is now released. */\n    ble_gap_aux_pointer_t aux_pointer; /**< The offset and PHY of the next advertising packet in this extended advertising\n                                            event. @note This field is only set if @ref ble_gap_adv_report_type_t::status\n                                            is set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA. */\n} ble_gap_evt_adv_report_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_SEC_REQUEST. */\ntypedef struct {\n    uint8_t bond : 1;     /**< Perform bonding. */\n    uint8_t mitm : 1;     /**< Man In The Middle protection requested. */\n    uint8_t lesc : 1;     /**< LE Secure Connections requested. */\n    uint8_t keypress : 1; /**< Generation of keypress notifications requested. */\n} ble_gap_evt_sec_request_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST. */\ntypedef struct {\n    ble_gap_conn_params_t conn_params; /**<  GAP Connection Parameters. */\n} ble_gap_evt_conn_param_update_request_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_SCAN_REQ_REPORT. */\ntypedef struct {\n    uint8_t adv_handle;       /**< Advertising handle for the advertising set which received the Scan Request */\n    int8_t rssi;              /**< Received Signal Strength Indication in dBm.\n                                   @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature\n                                 measurement. */\n    ble_gap_addr_t peer_addr; /**< Bluetooth address of the peer device. If the peer_addr resolved: @ref\n                                 ble_gap_addr_t::addr_id_peer is set to 1 and the address is the device's identity address. */\n} ble_gap_evt_scan_req_report_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST. */\ntypedef struct {\n    ble_gap_data_length_params_t peer_params; /**< Peer data length parameters. */\n} ble_gap_evt_data_length_update_request_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE.\n *\n * @note This event may also be raised after a PHY Update procedure.\n */\ntypedef struct {\n    ble_gap_data_length_params_t effective_params; /**< The effective data length parameters. */\n} ble_gap_evt_data_length_update_t;\n\n/**@brief Event structure for @ref BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT. */\ntypedef struct {\n    int8_t\n        channel_energy[BLE_GAP_CHANNEL_COUNT]; /**< The measured energy on the Bluetooth Low Energy\n                                                    channels, in dBm, indexed by Channel Index.\n                                                    If no measurement is available for the given channel, channel_energy is set to\n                                                    @ref BLE_GAP_POWER_LEVEL_INVALID. */\n} ble_gap_evt_qos_channel_survey_report_t;\n\n/**@brief GAP event structure. */\ntypedef struct {\n    uint16_t conn_handle; /**< Connection Handle on which event occurred. */\n    union                 /**< union alternative identified by evt_id in enclosing struct. */\n    {\n        ble_gap_evt_connected_t connected;                   /**< Connected Event Parameters. */\n        ble_gap_evt_disconnected_t disconnected;             /**< Disconnected Event Parameters. */\n        ble_gap_evt_conn_param_update_t conn_param_update;   /**< Connection Parameter Update Parameters. */\n        ble_gap_evt_sec_params_request_t sec_params_request; /**< Security Parameters Request Event Parameters. */\n        ble_gap_evt_sec_info_request_t sec_info_request;     /**< Security Information Request Event Parameters. */\n        ble_gap_evt_passkey_display_t passkey_display;       /**< Passkey Display Event Parameters. */\n        ble_gap_evt_key_pressed_t key_pressed;               /**< Key Pressed Event Parameters. */\n        ble_gap_evt_auth_key_request_t auth_key_request;     /**< Authentication Key Request Event Parameters. */\n        ble_gap_evt_lesc_dhkey_request_t lesc_dhkey_request; /**< LE Secure Connections DHKey calculation request. */\n        ble_gap_evt_auth_status_t auth_status;               /**< Authentication Status Event Parameters. */\n        ble_gap_evt_conn_sec_update_t conn_sec_update;       /**< Connection Security Update Event Parameters. */\n        ble_gap_evt_timeout_t timeout;                       /**< Timeout Event Parameters. */\n        ble_gap_evt_rssi_changed_t rssi_changed;             /**< RSSI Event Parameters. */\n        ble_gap_evt_adv_report_t adv_report;                 /**< Advertising Report Event Parameters. */\n        ble_gap_evt_adv_set_terminated_t adv_set_terminated; /**< Advertising Set Terminated Event Parameters. */\n        ble_gap_evt_sec_request_t sec_request;               /**< Security Request Event Parameters. */\n        ble_gap_evt_conn_param_update_request_t conn_param_update_request;   /**< Connection Parameter Update Parameters. */\n        ble_gap_evt_scan_req_report_t scan_req_report;                       /**< Scan Request Report Parameters. */\n        ble_gap_evt_phy_update_request_t phy_update_request;                 /**< PHY Update Request Event Parameters. */\n        ble_gap_evt_phy_update_t phy_update;                                 /**< PHY Update Parameters. */\n        ble_gap_evt_data_length_update_request_t data_length_update_request; /**< Data Length Update Request Event Parameters. */\n        ble_gap_evt_data_length_update_t data_length_update;                 /**< Data Length Update Event Parameters. */\n        ble_gap_evt_qos_channel_survey_report_t\n            qos_channel_survey_report; /**< Quality of Service (QoS) Channel Survey Report Parameters. */\n    } params;                          /**< Event Parameters. */\n} ble_gap_evt_t;\n\n/**\n * @brief BLE GAP connection configuration parameters, set with @ref sd_ble_cfg_set.\n *\n * @retval ::NRF_ERROR_CONN_COUNT     The connection count for the connection configurations is zero.\n * @retval ::NRF_ERROR_INVALID_PARAM  One or more of the following is true:\n *                                    - The sum of conn_count for all connection configurations combined exceeds UINT8_MAX.\n *                                    - The event length is smaller than @ref BLE_GAP_EVENT_LENGTH_MIN.\n */\ntypedef struct {\n    uint8_t conn_count;    /**< The number of concurrent connections the application can create with this configuration.\n                                The default and minimum value is @ref BLE_GAP_CONN_COUNT_DEFAULT. */\n    uint16_t event_length; /**< The time set aside for this connection on every connection interval in 1.25 ms units.\n                                The default value is @ref BLE_GAP_EVENT_LENGTH_DEFAULT, the minimum value is @ref\n                              BLE_GAP_EVENT_LENGTH_MIN. The event length and the connection interval are the primary parameters\n                                for setting the throughput of a connection.\n                                See the SoftDevice Specification for details on throughput. */\n} ble_gap_conn_cfg_t;\n\n/**\n * @brief Configuration of maximum concurrent connections in the different connected roles, set with\n * @ref sd_ble_cfg_set.\n *\n * @retval ::NRF_ERROR_CONN_COUNT     The sum of periph_role_count and central_role_count is too\n *                                    large. The maximum supported sum of concurrent connections is\n *                                    @ref BLE_GAP_ROLE_COUNT_COMBINED_MAX.\n * @retval ::NRF_ERROR_INVALID_PARAM  central_sec_count is larger than central_role_count.\n * @retval ::NRF_ERROR_RESOURCES      The adv_set_count is too large. The maximum\n *                                    supported advertising handles is\n *                                    @ref BLE_GAP_ADV_SET_COUNT_MAX.\n */\ntypedef struct {\n    uint8_t adv_set_count;      /**< Maximum number of advertising sets. Default value is @ref BLE_GAP_ADV_SET_COUNT_DEFAULT. */\n    uint8_t periph_role_count;  /**< Maximum number of connections concurrently acting as a peripheral. Default value is @ref\n                                   BLE_GAP_ROLE_COUNT_PERIPH_DEFAULT. */\n    uint8_t central_role_count; /**< Maximum number of connections concurrently acting as a central. Default value is @ref\n                                   BLE_GAP_ROLE_COUNT_CENTRAL_DEFAULT. */\n    uint8_t central_sec_count;  /**< Number of SMP instances shared between all connections acting as a central. Default value is\n                                   @ref BLE_GAP_ROLE_COUNT_CENTRAL_SEC_DEFAULT. */\n    uint8_t qos_channel_survey_role_available : 1; /**< If set, the Quality of Service (QoS) channel survey module is available to\n                                                      the application using @ref sd_ble_gap_qos_channel_survey_start. */\n} ble_gap_cfg_role_count_t;\n\n/**\n * @brief Device name and its properties, set with @ref sd_ble_cfg_set.\n *\n * @note  If the device name is not configured, the default device name will be\n *        @ref BLE_GAP_DEVNAME_DEFAULT, the maximum device name length will be\n *        @ref BLE_GAP_DEVNAME_DEFAULT_LEN, vloc will be set to @ref BLE_GATTS_VLOC_STACK and the device name\n *        will have no write access.\n *\n * @note  If @ref max_len is more than @ref BLE_GAP_DEVNAME_DEFAULT_LEN and vloc is set to @ref BLE_GATTS_VLOC_STACK,\n *        the attribute table size must be increased to have room for the longer device name (see\n *        @ref sd_ble_cfg_set and @ref ble_gatts_cfg_attr_tab_size_t).\n *\n * @note  If vloc is @ref BLE_GATTS_VLOC_STACK :\n *        - p_value must point to non-volatile memory (flash) or be NULL.\n *        - If p_value is NULL, the device name will initially be empty.\n *\n * @note  If vloc is @ref BLE_GATTS_VLOC_USER :\n *        - p_value cannot be NULL.\n *        - If the device name is writable, p_value must point to volatile memory (RAM).\n *\n * @retval ::NRF_ERROR_INVALID_PARAM  One or more of the following is true:\n *                                    - Invalid device name location (vloc).\n *                                    - Invalid device name security mode.\n * @retval ::NRF_ERROR_INVALID_LENGTH One or more of the following is true:\n *                                    - The device name length is invalid (must be between 0 and @ref BLE_GAP_DEVNAME_MAX_LEN).\n *                                    - The device name length is too long for the given Attribute Table.\n * @retval ::NRF_ERROR_NOT_SUPPORTED  Device name security mode is not supported.\n */\ntypedef struct {\n    ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */\n    uint8_t vloc : 2;                   /**< Value location, see @ref BLE_GATTS_VLOCS.*/\n    uint8_t *p_value;                   /**< Pointer to where the value (device name) is stored or will be stored. */\n    uint16_t current_len;               /**< Current length in bytes of the memory pointed to by p_value.*/\n    uint16_t max_len;                   /**< Maximum length in bytes of the memory pointed to by p_value.*/\n} ble_gap_cfg_device_name_t;\n\n/**@brief Peripheral Preferred Connection Parameters include configuration parameters, set with @ref sd_ble_cfg_set. */\ntypedef struct {\n    uint8_t include_cfg; /**< Inclusion configuration of the Peripheral Preferred Connection Parameters characteristic.\n                              See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_PPCP_INCL_CONFIG_DEFAULT. */\n} ble_gap_cfg_ppcp_incl_cfg_t;\n\n/**@brief Central Address Resolution include configuration parameters, set with @ref sd_ble_cfg_set. */\ntypedef struct {\n    uint8_t include_cfg; /**< Inclusion configuration of the Central Address Resolution characteristic.\n                              See @ref BLE_GAP_CHAR_INCL_CONFIG. Default is @ref BLE_GAP_CAR_INCL_CONFIG_DEFAULT. */\n} ble_gap_cfg_car_incl_cfg_t;\n\n/**@brief Configuration structure for GAP configurations. */\ntypedef union {\n    ble_gap_cfg_role_count_t role_count_cfg;      /**< Role count configuration, cfg_id is @ref BLE_GAP_CFG_ROLE_COUNT. */\n    ble_gap_cfg_device_name_t device_name_cfg;    /**< Device name configuration, cfg_id is @ref BLE_GAP_CFG_DEVICE_NAME. */\n    ble_gap_cfg_ppcp_incl_cfg_t ppcp_include_cfg; /**< Peripheral Preferred Connection Parameters characteristic include\n                                                       configuration, cfg_id is @ref BLE_GAP_CFG_PPCP_INCL_CONFIG. */\n    ble_gap_cfg_car_incl_cfg_t car_include_cfg;   /**< Central Address Resolution characteristic include configuration,\n                                                       cfg_id is @ref BLE_GAP_CFG_CAR_INCL_CONFIG. */\n} ble_gap_cfg_t;\n\n/**@brief Channel Map option.\n *\n * @details Used with @ref sd_ble_opt_get to get the current channel map\n *          or @ref sd_ble_opt_set to set a new channel map. When setting the\n *          channel map, it applies to all current and future connections. When getting the\n *          current channel map, it applies to a single connection and the connection handle\n *          must be supplied.\n *\n * @note Setting the channel map may take some time, depending on connection parameters.\n *       The time taken may be different for each connection and the get operation will\n *       return the previous channel map until the new one has taken effect.\n *\n * @note After setting the channel map, by spec it can not be set again until at least 1 s has passed.\n *       See Bluetooth Specification Version 4.1 Volume 2, Part E, Section 7.3.46.\n *\n * @retval ::NRF_SUCCESS Get or set successful.\n * @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true:\n *                                   - Less then two bits in @ref ch_map are set.\n *                                   - Bits for primary advertising channels (37-39) are set.\n * @retval ::NRF_ERROR_BUSY Channel map was set again before enough time had passed.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied for get.\n *\n */\ntypedef struct {\n    uint16_t conn_handle; /**< Connection Handle (only applicable for get) */\n    uint8_t ch_map[5];    /**< Channel Map (37-bit). */\n} ble_gap_opt_ch_map_t;\n\n/**@brief Local connection latency option.\n *\n * @details Local connection latency is a feature which enables the slave to improve\n *          current consumption by ignoring the slave latency set by the peer. The\n *          local connection latency can only be set to a multiple of the slave latency,\n *          and cannot be longer than half of the supervision timeout.\n *\n * @details Used with @ref sd_ble_opt_set to set the local connection latency. The\n *          @ref sd_ble_opt_get is not supported for this option, but the actual\n *          local connection latency (unless set to NULL) is set as a return parameter\n *          when setting the option.\n *\n * @note The latency set will be truncated down to the closest slave latency event\n *       multiple, or the nearest multiple before half of the supervision timeout.\n *\n * @note The local connection latency is disabled by default, and needs to be enabled for new\n *       connections and whenever the connection is updated.\n *\n * @retval ::NRF_SUCCESS Set successfully.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter.\n */\ntypedef struct {\n    uint16_t conn_handle;       /**< Connection Handle */\n    uint16_t requested_latency; /**< Requested local connection latency. */\n    uint16_t *p_actual_latency; /**< Pointer to storage for the actual local connection latency (can be set to NULL to skip return\n                                   value). */\n} ble_gap_opt_local_conn_latency_t;\n\n/**@brief Disable slave latency\n *\n * @details Used with @ref sd_ble_opt_set to temporarily disable slave latency of a peripheral connection\n *          (see @ref ble_gap_conn_params_t::slave_latency). And to re-enable it again. When disabled, the\n *          peripheral will ignore the slave_latency set by the central.\n *\n * @note  Shall only be called on peripheral links.\n *\n * @retval ::NRF_SUCCESS Set successfully.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Get is not supported.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter.\n */\ntypedef struct {\n    uint16_t conn_handle; /**< Connection Handle */\n    uint8_t disable;      /**< For allowed values see @ref BLE_GAP_SLAVE_LATENCY */\n} ble_gap_opt_slave_latency_disable_t;\n\n/**@brief Passkey Option.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC}\n * @endmscs\n *\n * @details Structure containing the passkey to be used during pairing. This can be used with @ref\n *          sd_ble_opt_set to make the SoftDevice use a preprogrammed passkey for authentication\n *          instead of generating a random one.\n *\n * @note Repeated pairing attempts using the same preprogrammed passkey makes pairing vulnerable to MITM attacks.\n *\n * @note @ref sd_ble_opt_get is not supported for this option.\n *\n */\ntypedef struct {\n    uint8_t const *p_passkey; /**< Pointer to 6-digit ASCII string (digit 0..9 only, no NULL termination) passkey to be used\n                                 during pairing. If this is NULL, the SoftDevice will generate a random passkey if required.*/\n} ble_gap_opt_passkey_t;\n\n/**@brief Compatibility mode 1 option.\n *\n * @details This can be used with @ref sd_ble_opt_set to enable and disable\n *          compatibility mode 1. Compatibility mode 1 is disabled by default.\n *\n * @note Compatibility mode 1 enables interoperability with devices that do not support a value of\n *       0 for the WinOffset parameter in the Link Layer CONNECT_IND packet. This applies to a\n *       limited set of legacy peripheral devices from another vendor. Enabling this compatibility\n *       mode will only have an effect if the local device will act as a central device and\n *       initiate a connection to a peripheral device. In that case it may lead to the connection\n *       creation taking up to one connection interval longer to complete for all connections.\n *\n *  @retval ::NRF_SUCCESS Set successfully.\n *  @retval ::NRF_ERROR_INVALID_STATE When connection creation is ongoing while mode 1 is set.\n */\ntypedef struct {\n    uint8_t enable : 1; /**< Enable compatibility mode 1.*/\n} ble_gap_opt_compat_mode_1_t;\n\n/**@brief Authenticated payload timeout option.\n *\n * @details This can be used with @ref sd_ble_opt_set to change the Authenticated payload timeout to a value other\n *          than the default of @ref BLE_GAP_AUTH_PAYLOAD_TIMEOUT_MAX.\n *\n * @note The authenticated payload timeout event ::BLE_GAP_TIMEOUT_SRC_AUTH_PAYLOAD will be generated\n *       if auth_payload_timeout time has elapsed without receiving a packet with a valid MIC on an encrypted\n *       link.\n *\n * @note The LE ping procedure will be initiated before the timer expires to give the peer a chance\n *       to reset the timer. In addition the stack will try to prioritize running of LE ping over other\n *       activities to increase chances of finishing LE ping before timer expires. To avoid side-effects\n *       on other activities, it is recommended to use high timeout values.\n *       Recommended timeout > 2*(connInterval * (6 + connSlaveLatency)).\n *\n * @retval ::NRF_SUCCESS Set successfully.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. auth_payload_timeout was outside of allowed range.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter.\n */\ntypedef struct {\n    uint16_t conn_handle;          /**< Connection Handle */\n    uint16_t auth_payload_timeout; /**< Requested timeout in 10 ms unit, see @ref BLE_GAP_AUTH_PAYLOAD_TIMEOUT. */\n} ble_gap_opt_auth_payload_timeout_t;\n\n/**@brief Option structure for GAP options. */\ntypedef union {\n    ble_gap_opt_ch_map_t ch_map;                               /**< Parameters for the Channel Map option. */\n    ble_gap_opt_local_conn_latency_t local_conn_latency;       /**< Parameters for the Local connection latency option */\n    ble_gap_opt_passkey_t passkey;                             /**< Parameters for the Passkey option.*/\n    ble_gap_opt_compat_mode_1_t compat_mode_1;                 /**< Parameters for the compatibility mode 1 option.*/\n    ble_gap_opt_auth_payload_timeout_t auth_payload_timeout;   /**< Parameters for the authenticated payload timeout option.*/\n    ble_gap_opt_slave_latency_disable_t slave_latency_disable; /**< Parameters for the Disable slave latency option */\n} ble_gap_opt_t;\n\n/**@brief  Connection event triggering parameters. */\ntypedef struct {\n    uint8_t ppi_ch_id;               /**< PPI channel to use. This channel should be regarded as reserved until\n                                          connection event PPI task triggering is stopped.\n                                          The PPI channel ID can not be one of the PPI channels reserved by\n                                          the SoftDevice. See @ref NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK. */\n    uint32_t task_endpoint;          /**< Task Endpoint to trigger. */\n    uint16_t conn_evt_counter_start; /**< The connection event on which the task triggering should start. */\n    uint16_t period_in_events;       /**< Trigger period. Valid range is [1, 32767].\n                                          If the device is in slave role and slave latency is enabled,\n                                          this parameter should be set to a multiple of (slave latency + 1)\n                                          to ensure low power operation. */\n} ble_gap_conn_event_trigger_t;\n/**@} */\n\n/**@addtogroup BLE_GAP_FUNCTIONS Functions\n * @{ */\n\n/**@brief Set the local Bluetooth identity address.\n *\n *        The local Bluetooth identity address is the address that identifies this device to other peers.\n *        The address type must be either @ref BLE_GAP_ADDR_TYPE_PUBLIC or @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC.\n *\n * @note  The identity address cannot be changed while advertising, scanning or creating a connection.\n *\n * @note  This address will be distributed to the peer during bonding.\n *        If the address changes, the address stored in the peer device will not be valid and the ability to\n *        reconnect using the old address will be lost.\n *\n * @note  By default the SoftDevice will set an address of type @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC upon being\n *        enabled. The address is a random number populated during the IC manufacturing process and remains unchanged\n *        for the lifetime of each IC.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_ADV_MSC}\n * @endmscs\n *\n * @param[in] p_addr Pointer to address structure.\n *\n * @retval ::NRF_SUCCESS Address successfully set.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address.\n * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry.\n * @retval ::NRF_ERROR_INVALID_STATE The identity address cannot be changed while advertising,\n *                                   scanning or creating a connection.\n */\nSVCALL(SD_BLE_GAP_ADDR_SET, uint32_t, sd_ble_gap_addr_set(ble_gap_addr_t const *p_addr));\n\n/**@brief Get local Bluetooth identity address.\n *\n * @note  This will always return the identity address irrespective of the privacy settings,\n *        i.e. the address type will always be either @ref BLE_GAP_ADDR_TYPE_PUBLIC or @ref BLE_GAP_ADDR_TYPE_RANDOM_STATIC.\n *\n * @param[out] p_addr Pointer to address structure to be filled in.\n *\n * @retval ::NRF_SUCCESS Address successfully retrieved.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid or NULL pointer supplied.\n */\nSVCALL(SD_BLE_GAP_ADDR_GET, uint32_t, sd_ble_gap_addr_get(ble_gap_addr_t *p_addr));\n\n/**@brief Get the Bluetooth device address used by the advertiser.\n *\n * @note  This function will return the local Bluetooth address used in advertising PDUs. When\n *        using privacy, the SoftDevice will generate a new private address every\n *        @ref ble_gap_privacy_params_t::private_addr_cycle_s configured using\n *        @ref sd_ble_gap_privacy_set. Hence depending on when the application calls this API, the\n *        address returned may not be the latest address that is used in the advertising PDUs.\n *\n * @param[in]  adv_handle The advertising handle to get the address from.\n * @param[out] p_addr     Pointer to address structure to be filled in.\n *\n * @retval ::NRF_SUCCESS                  Address successfully retrieved.\n * @retval ::NRF_ERROR_INVALID_ADDR       Invalid or NULL pointer supplied.\n * @retval ::BLE_ERROR_INVALID_ADV_HANDLE The provided advertising handle was not found.\n * @retval ::NRF_ERROR_INVALID_STATE      The advertising set is currently not advertising.\n */\nSVCALL(SD_BLE_GAP_ADV_ADDR_GET, uint32_t, sd_ble_gap_adv_addr_get(uint8_t adv_handle, ble_gap_addr_t *p_addr));\n\n/**@brief Set the active whitelist in the SoftDevice.\n *\n * @note  Only one whitelist can be used at a time and the whitelist is shared between the BLE roles.\n *        The whitelist cannot be set if a BLE role is using the whitelist.\n *\n * @note  If an address is resolved using the information in the device identity list, then the whitelist\n *        filter policy applies to the peer identity address and not the resolvable address sent on air.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_WL_SHARE_MSC}\n * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_PRIVATE_SCAN_MSC}\n * @endmscs\n *\n * @param[in] pp_wl_addrs Pointer to a whitelist of peer addresses, if NULL the whitelist will be cleared.\n * @param[in] len         Length of the whitelist, maximum @ref BLE_GAP_WHITELIST_ADDR_MAX_COUNT.\n *\n * @retval ::NRF_SUCCESS The whitelist is successfully set/cleared.\n * @retval ::NRF_ERROR_INVALID_ADDR The whitelist (or one of its entries) provided is invalid.\n * @retval ::BLE_ERROR_GAP_WHITELIST_IN_USE The whitelist is in use by a BLE role and cannot be set or cleared.\n * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied.\n * @retval ::NRF_ERROR_DATA_SIZE The given whitelist size is invalid (zero or too large); this can only return when\n *                               pp_wl_addrs is not NULL.\n */\nSVCALL(SD_BLE_GAP_WHITELIST_SET, uint32_t, sd_ble_gap_whitelist_set(ble_gap_addr_t const *const *pp_wl_addrs, uint8_t len));\n\n/**@brief Set device identity list.\n *\n * @note  Only one device identity list can be used at a time and the list is shared between the BLE roles.\n *        The device identity list cannot be set if a BLE role is using the list.\n *\n * @param[in] pp_id_keys     Pointer to an array of peer identity addresses and peer IRKs, if NULL the device identity list will\n * be cleared.\n * @param[in] pp_local_irks  Pointer to an array of local IRKs. Each entry in the array maps to the entry in pp_id_keys at the\n * same index. To fill in the list with the currently set device IRK for all peers, set to NULL.\n * @param[in] len            Length of the device identity list, maximum @ref BLE_GAP_DEVICE_IDENTITIES_MAX_COUNT.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PRIVACY_ADV_MSC}\n * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_MSC}\n * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_PRIVATE_SCAN_MSC}\n * @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_CONN_PRIV_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_CONN_PRIV_MSC}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS The device identity list successfully set/cleared.\n * @retval ::NRF_ERROR_INVALID_ADDR The device identity list (or one of its entries) provided is invalid.\n *                                  This code may be returned if the local IRK list also has an invalid entry.\n * @retval ::BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE The device identity list is in use and cannot be set or cleared.\n * @retval ::BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE The device identity list contains multiple entries with the same identity\n * address.\n * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied.\n * @retval ::NRF_ERROR_DATA_SIZE The given device identity list size invalid (zero or too large); this can\n *                               only return when pp_id_keys is not NULL.\n */\nSVCALL(SD_BLE_GAP_DEVICE_IDENTITIES_SET, uint32_t,\n       sd_ble_gap_device_identities_set(ble_gap_id_key_t const *const *pp_id_keys, ble_gap_irk_t const *const *pp_local_irks,\n                                        uint8_t len));\n\n/**@brief Set privacy settings.\n *\n * @note  Privacy settings cannot be changed while advertising, scanning or creating a connection.\n *\n * @param[in] p_privacy_params Privacy settings.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PRIVACY_ADV_MSC}\n * @mmsc{@ref BLE_GAP_PRIVACY_SCAN_MSC}\n * @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS Set successfully.\n * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry.\n * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid address type is supplied.\n * @retval ::NRF_ERROR_INVALID_ADDR The pointer to privacy settings is NULL or invalid.\n *                                  Otherwise, the p_device_irk pointer in privacy parameter is an invalid pointer.\n * @retval ::NRF_ERROR_INVALID_PARAM Out of range parameters are provided.\n * @retval ::NRF_ERROR_NOT_SUPPORTED The SoftDevice does not support privacy if the Central Address Resolution\n                                     characteristic is not configured to be included and the SoftDevice is configured\n                                     to support central roles.\n                                     See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t.\n * @retval ::NRF_ERROR_INVALID_STATE Privacy settings cannot be changed while advertising, scanning\n *                                   or creating a connection.\n */\nSVCALL(SD_BLE_GAP_PRIVACY_SET, uint32_t, sd_ble_gap_privacy_set(ble_gap_privacy_params_t const *p_privacy_params));\n\n/**@brief Get privacy settings.\n *\n * @note ::ble_gap_privacy_params_t::p_device_irk must be initialized to NULL or a valid address before this function is called.\n *       If it is initialized to a valid address, the address pointed to will contain the current device IRK on return.\n *\n * @param[in,out] p_privacy_params Privacy settings.\n *\n * @retval ::NRF_SUCCESS            Privacy settings read.\n * @retval ::NRF_ERROR_INVALID_ADDR The pointer given for returning the privacy settings may be NULL or invalid.\n *                                  Otherwise, the p_device_irk pointer in privacy parameter is an invalid pointer.\n */\nSVCALL(SD_BLE_GAP_PRIVACY_GET, uint32_t, sd_ble_gap_privacy_get(ble_gap_privacy_params_t *p_privacy_params));\n\n/**@brief Configure an advertising set. Set, clear or update advertising and scan response data.\n *\n * @note  The format of the advertising data will be checked by this call to ensure interoperability.\n *        Limitations imposed by this API call to the data provided include having a flags data type in the scan response data and\n *        duplicating the local name in the advertising data and scan response data.\n *\n * @note In order to update advertising data while advertising, new advertising buffers must be provided.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_ADV_MSC}\n * @mmsc{@ref BLE_GAP_WL_SHARE_MSC}\n * @endmscs\n *\n * @param[in,out] p_adv_handle                         Provide a pointer to a handle containing @ref\n * BLE_GAP_ADV_SET_HANDLE_NOT_SET to configure a new advertising set. On success, a new handle is then returned through the\n * pointer. Provide a pointer to an existing advertising handle to configure an existing advertising set.\n * @param[in]     p_adv_data                           Advertising data. If set to NULL, no advertising data will be used. See\n * @ref ble_gap_adv_data_t.\n * @param[in]     p_adv_params                         Advertising parameters. When this function is used to update advertising\n * data while advertising, this parameter must be NULL. See @ref ble_gap_adv_params_t.\n *\n * @retval ::NRF_SUCCESS                               Advertising set successfully configured.\n * @retval ::NRF_ERROR_INVALID_PARAM                   Invalid parameter(s) supplied:\n *                                                      - Invalid advertising data configuration specified. See @ref\n * ble_gap_adv_data_t.\n *                                                      - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t.\n *                                                      - Use of whitelist requested but whitelist has not been set,\n *                                                        see @ref sd_ble_gap_whitelist_set.\n * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR            ble_gap_adv_params_t::p_peer_addr is invalid.\n * @retval ::NRF_ERROR_INVALID_STATE                   Invalid state to perform operation. Either:\n *                                                     - It is invalid to provide non-NULL advertising set parameters while\n * advertising.\n *                                                     - It is invalid to provide the same data buffers while advertising. To\n * update advertising data, provide new advertising buffers.\n * @retval ::BLE_ERROR_GAP_DISCOVERABLE_WITH_WHITELIST Discoverable mode and whitelist incompatible.\n * @retval ::BLE_ERROR_INVALID_ADV_HANDLE              The provided advertising handle was not found. Use @ref\n * BLE_GAP_ADV_SET_HANDLE_NOT_SET to configure a new advertising handle.\n * @retval ::NRF_ERROR_INVALID_ADDR                    Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_FLAGS                   Invalid combination of advertising flags supplied.\n * @retval ::NRF_ERROR_INVALID_DATA                    Invalid data type(s) supplied. Check the advertising data format\n * specification given in Bluetooth Specification Version 5.0, Volume 3, Part C, Chapter 11.\n * @retval ::NRF_ERROR_INVALID_LENGTH                  Invalid data length(s) supplied.\n * @retval ::NRF_ERROR_NOT_SUPPORTED                   Unsupported data length or advertising parameter configuration.\n * @retval ::NRF_ERROR_NO_MEM                          Not enough memory to configure a new advertising handle. Update an\n *                                                     existing advertising handle instead.\n * @retval ::BLE_ERROR_GAP_UUID_LIST_MISMATCH Invalid UUID list supplied.\n */\nSVCALL(SD_BLE_GAP_ADV_SET_CONFIGURE, uint32_t,\n       sd_ble_gap_adv_set_configure(uint8_t *p_adv_handle, ble_gap_adv_data_t const *p_adv_data,\n                                    ble_gap_adv_params_t const *p_adv_params));\n\n/**@brief Start advertising (GAP Discoverable, Connectable modes, Broadcast Procedure).\n *\n * @note Only one advertiser may be active at any time.\n *\n * @note If privacy is enabled, the advertiser's private address will be refreshed when this function is called.\n *       See @ref sd_ble_gap_privacy_set().\n *\n * @events\n * @event{@ref BLE_GAP_EVT_CONNECTED, Generated after connection has been established through connectable advertising.}\n * @event{@ref BLE_GAP_EVT_ADV_SET_TERMINATED, Advertising set has terminated.}\n * @event{@ref BLE_GAP_EVT_SCAN_REQ_REPORT, A scan request was received.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_ADV_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_CONN_PRIV_MSC}\n * @mmsc{@ref BLE_GAP_PRIVACY_ADV_DIR_PRIV_MSC}\n * @mmsc{@ref BLE_GAP_WL_SHARE_MSC}\n * @endmscs\n *\n * @param[in] adv_handle   Advertising handle to advertise on, received from @ref sd_ble_gap_adv_set_configure.\n * @param[in] conn_cfg_tag Tag identifying a configuration set by @ref sd_ble_cfg_set or\n *                         @ref BLE_CONN_CFG_TAG_DEFAULT to use the default connection configuration. For non-connectable\n *                         advertising, this is ignored.\n *\n * @retval ::NRF_SUCCESS                  The BLE stack has started advertising.\n * @retval ::NRF_ERROR_INVALID_STATE      adv_handle is not configured or already advertising.\n * @retval ::NRF_ERROR_CONN_COUNT         The limit of available connections for this connection configuration\n *                                        tag has been reached; connectable advertiser cannot be started.\n *                                        To increase the number of available connections,\n *                                        use @ref sd_ble_cfg_set with @ref BLE_GAP_CFG_ROLE_COUNT or @ref BLE_CONN_CFG_GAP.\n * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found. Configure a new adveriting handle with @ref\n sd_ble_gap_adv_set_configure.\n * @retval ::NRF_ERROR_NOT_FOUND          conn_cfg_tag not found.\n * @retval ::NRF_ERROR_INVALID_PARAM      Invalid parameter(s) supplied:\n *                                        - Invalid configuration of p_adv_params. See @ref ble_gap_adv_params_t.\n *                                        - Use of whitelist requested but whitelist has not been set, see @ref\n sd_ble_gap_whitelist_set.\n * @retval ::NRF_ERROR_RESOURCES          Either:\n *                                        - adv_handle is configured with connectable advertising, but the event_length parameter\n *                                          associated with conn_cfg_tag is too small to be able to establish a connection on\n *                                          the selected advertising phys. Use @ref sd_ble_cfg_set to increase the event length.\n *                                        - Not enough BLE role slots available.\n                                            Stop one or more currently active roles (Central, Peripheral, Broadcaster or Observer)\n and try again.\n *                                        - p_adv_params is configured with connectable advertising, but the event_length\n parameter\n *                                          associated with conn_cfg_tag is too small to be able to establish a connection on\n *                                          the selected advertising phys. Use @ref sd_ble_cfg_set to increase the event length.\n */\nSVCALL(SD_BLE_GAP_ADV_START, uint32_t, sd_ble_gap_adv_start(uint8_t adv_handle, uint8_t conn_cfg_tag));\n\n/**@brief Stop advertising (GAP Discoverable, Connectable modes, Broadcast Procedure).\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_ADV_MSC}\n * @mmsc{@ref BLE_GAP_WL_SHARE_MSC}\n * @endmscs\n *\n * @param[in] adv_handle The advertising handle that should stop advertising.\n *\n * @retval ::NRF_SUCCESS The BLE stack has stopped advertising.\n * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Invalid advertising handle.\n * @retval ::NRF_ERROR_INVALID_STATE The advertising handle is not advertising.\n */\nSVCALL(SD_BLE_GAP_ADV_STOP, uint32_t, sd_ble_gap_adv_stop(uint8_t adv_handle));\n\n/**@brief Update connection parameters.\n *\n * @details In the central role this will initiate a Link Layer connection parameter update procedure,\n *          otherwise in the peripheral role, this will send the corresponding L2CAP request and wait for\n *          the central to perform the procedure. In both cases, and regardless of success or failure, the application\n *          will be informed of the result with a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE event.\n *\n * @details This function can be used as a central both to reply to a @ref BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST or to start the\n * procedure unrequested.\n *\n * @events\n * @event{@ref BLE_GAP_EVT_CONN_PARAM_UPDATE, Result of the connection parameter update procedure.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_CPU_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC}\n * @mmsc{@ref BLE_GAP_MULTILINK_CPU_MSC}\n * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_CPU_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] p_conn_params  Pointer to desired connection parameters. If NULL is provided on a peripheral role,\n *                           the parameters in the PPCP characteristic of the GAP service will be used instead.\n *                           If NULL is provided on a central role and in response to a @ref\n * BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST, the peripheral request will be rejected\n *\n * @retval ::NRF_SUCCESS The Connection Update procedure has been started successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, check parameter limits and constraints.\n * @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress or link has not been established.\n * @retval ::NRF_ERROR_BUSY Procedure already in progress, wait for pending procedures to complete and retry.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation.\n */\nSVCALL(SD_BLE_GAP_CONN_PARAM_UPDATE, uint32_t,\n       sd_ble_gap_conn_param_update(uint16_t conn_handle, ble_gap_conn_params_t const *p_conn_params));\n\n/**@brief Disconnect (GAP Link Termination).\n *\n * @details This call initiates the disconnection procedure, and its completion will be communicated to the application\n *          with a @ref BLE_GAP_EVT_DISCONNECTED event.\n *\n * @events\n * @event{@ref BLE_GAP_EVT_DISCONNECTED, Generated when disconnection procedure is complete.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_CONN_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] hci_status_code HCI status code, see @ref BLE_HCI_STATUS_CODES (accepted values are @ref\n * BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and @ref BLE_HCI_CONN_INTERVAL_UNACCEPTABLE).\n *\n * @retval ::NRF_SUCCESS The disconnection procedure has been started successfully.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress or link has not been established.\n */\nSVCALL(SD_BLE_GAP_DISCONNECT, uint32_t, sd_ble_gap_disconnect(uint16_t conn_handle, uint8_t hci_status_code));\n\n/**@brief Set the radio's transmit power.\n *\n * @param[in] role The role to set the transmit power for, see @ref BLE_GAP_TX_POWER_ROLES for\n *                 possible roles.\n * @param[in] handle   The handle parameter is interpreted depending on role:\n *                     - If role is @ref BLE_GAP_TX_POWER_ROLE_CONN, this value is the specific connection handle.\n *                     - If role is @ref BLE_GAP_TX_POWER_ROLE_ADV, the advertising set identified with the advertising handle,\n *                       will use the specified transmit power, and include it in the advertising packet headers if\n *                       @ref ble_gap_adv_properties_t::include_tx_power set.\n *                     - For all other roles handle is ignored.\n * @param[in] tx_power Radio transmit power in dBm (see note for accepted values).\n *\n * @note Supported tx_power values: -40dBm, -20dBm, -16dBm, -12dBm, -8dBm, -4dBm, 0dBm, +3dBm and +4dBm.\n *       In addition, on some chips following values are supported: +2dBm, +5dBm, +6dBm, +7dBm and +8dBm.\n *       Setting these values on a chip that does not support them will result in undefined behaviour.\n * @note The initiator will have the same transmit power as the scanner.\n * @note When a connection is created it will inherit the transmit power from the initiator or\n *       advertiser leading to the connection.\n *\n * @retval ::NRF_SUCCESS Successfully changed the transmit power.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::BLE_ERROR_INVALID_ADV_HANDLE Advertising handle not found.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_TX_POWER_SET, uint32_t, sd_ble_gap_tx_power_set(uint8_t role, uint16_t handle, int8_t tx_power));\n\n/**@brief Set GAP Appearance value.\n *\n * @param[in] appearance Appearance (16-bit), see @ref BLE_APPEARANCES.\n *\n * @retval ::NRF_SUCCESS  Appearance value set successfully.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n */\nSVCALL(SD_BLE_GAP_APPEARANCE_SET, uint32_t, sd_ble_gap_appearance_set(uint16_t appearance));\n\n/**@brief Get GAP Appearance value.\n *\n * @param[out] p_appearance Pointer to appearance (16-bit) to be filled in, see @ref BLE_APPEARANCES.\n *\n * @retval ::NRF_SUCCESS Appearance value retrieved successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n */\nSVCALL(SD_BLE_GAP_APPEARANCE_GET, uint32_t, sd_ble_gap_appearance_get(uint16_t *p_appearance));\n\n/**@brief Set GAP Peripheral Preferred Connection Parameters.\n *\n * @param[in] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure with the desired parameters.\n *\n * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters set successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_NOT_SUPPORTED The characteristic is not included in the Attribute Table,\n                                     see @ref ble_gap_cfg_ppcp_incl_cfg_t.\n */\nSVCALL(SD_BLE_GAP_PPCP_SET, uint32_t, sd_ble_gap_ppcp_set(ble_gap_conn_params_t const *p_conn_params));\n\n/**@brief Get GAP Peripheral Preferred Connection Parameters.\n *\n * @param[out] p_conn_params Pointer to a @ref ble_gap_conn_params_t structure where the parameters will be stored.\n *\n * @retval ::NRF_SUCCESS Peripheral Preferred Connection Parameters retrieved successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_NOT_SUPPORTED The characteristic is not included in the Attribute Table,\n                                     see @ref ble_gap_cfg_ppcp_incl_cfg_t.\n */\nSVCALL(SD_BLE_GAP_PPCP_GET, uint32_t, sd_ble_gap_ppcp_get(ble_gap_conn_params_t *p_conn_params));\n\n/**@brief Set GAP device name.\n *\n * @note  If the device name is located in application flash memory (see @ref ble_gap_cfg_device_name_t),\n *        it cannot be changed. Then @ref NRF_ERROR_FORBIDDEN will be returned.\n *\n * @param[in] p_write_perm Write permissions for the Device Name characteristic, see @ref ble_gap_conn_sec_mode_t.\n * @param[in] p_dev_name Pointer to a UTF-8 encoded, <b>non NULL-terminated</b> string.\n * @param[in] len Length of the UTF-8, <b>non NULL-terminated</b> string pointed to by p_dev_name in octets (must be smaller or\n * equal than @ref BLE_GAP_DEVNAME_MAX_LEN).\n *\n * @retval ::NRF_SUCCESS GAP device name and permissions set successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.\n * @retval ::NRF_ERROR_FORBIDDEN Device name is not writable.\n */\nSVCALL(SD_BLE_GAP_DEVICE_NAME_SET, uint32_t,\n       sd_ble_gap_device_name_set(ble_gap_conn_sec_mode_t const *p_write_perm, uint8_t const *p_dev_name, uint16_t len));\n\n/**@brief Get GAP device name.\n *\n * @note  If the device name is longer than the size of the supplied buffer,\n *        p_len will return the complete device name length,\n *        and not the number of bytes actually returned in p_dev_name.\n *        The application may use this information to allocate a suitable buffer size.\n *\n * @param[out]    p_dev_name Pointer to an empty buffer where the UTF-8 <b>non NULL-terminated</b> string will be placed. Set to\n * NULL to obtain the complete device name length.\n * @param[in,out] p_len      Length of the buffer pointed by p_dev_name, complete device name length on output.\n *\n * @retval ::NRF_SUCCESS GAP device name retrieved successfully.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.\n */\nSVCALL(SD_BLE_GAP_DEVICE_NAME_GET, uint32_t, sd_ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_len));\n\n/**@brief Initiate the GAP Authentication procedure.\n *\n * @details In the central role, this function will send an SMP Pairing Request (or an SMP Pairing Failed if rejected),\n *          otherwise in the peripheral role, an SMP Security Request will be sent.\n *\n * @events\n * @event{Depending on the security parameters set and the packet exchanges with the peer\\, the following events may be\n * generated:}\n * @event{@ref BLE_GAP_EVT_SEC_PARAMS_REQUEST}\n * @event{@ref BLE_GAP_EVT_SEC_INFO_REQUEST}\n * @event{@ref BLE_GAP_EVT_PASSKEY_DISPLAY}\n * @event{@ref BLE_GAP_EVT_KEY_PRESSED}\n * @event{@ref BLE_GAP_EVT_AUTH_KEY_REQUEST}\n * @event{@ref BLE_GAP_EVT_LESC_DHKEY_REQUEST}\n * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE}\n * @event{@ref BLE_GAP_EVT_AUTH_STATUS}\n * @event{@ref BLE_GAP_EVT_TIMEOUT}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_SEC_REQ_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] p_sec_params Pointer to the @ref ble_gap_sec_params_t structure with the security parameters to be used during the\n * pairing or bonding procedure. In the peripheral role, only the bond, mitm, lesc and keypress fields of this structure are used.\n *                         In the central role, this pointer may be NULL to reject a Security Request.\n *\n * @retval ::NRF_SUCCESS Successfully initiated authentication procedure.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:\n *                                   - No link has been established.\n *                                   - An encryption is already executing or queued.\n * @retval ::NRF_ERROR_NO_MEM The maximum number of authentication procedures that can run in parallel for the given role is\n * reached.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported.\n *                                   Distribution of own Identity Information is only supported if the Central\n *                                   Address Resolution characteristic is configured to be included or\n *                                   the Softdevice is configured to support peripheral roles only.\n *                                   See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t.\n * @retval ::NRF_ERROR_TIMEOUT A SMP timeout has occurred, and further SMP operations on this link is prohibited.\n */\nSVCALL(SD_BLE_GAP_AUTHENTICATE, uint32_t,\n       sd_ble_gap_authenticate(uint16_t conn_handle, ble_gap_sec_params_t const *p_sec_params));\n\n/**@brief Reply with GAP security parameters.\n *\n * @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST, calling it at other times will result in\n * an @ref NRF_ERROR_INVALID_STATE.\n * @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected\n * parameters.\n *\n * @events\n * @event{This function is used during authentication procedures, see the list of events in the documentation of @ref\n * sd_ble_gap_authenticate.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_BONDING_JW_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_PERIPH_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_BONDING_STATIC_PK_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_CONFIRM_FAIL_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_KS_TOO_SMALL_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_APP_ERROR_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_REMOTE_PAIRING_FAIL_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_PAIRING_TIMEOUT_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_JW_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] sec_status Security status, see @ref BLE_GAP_SEC_STATUS.\n * @param[in] p_sec_params Pointer to a @ref ble_gap_sec_params_t security parameters structure. In the central role this must be\n * set to NULL, as the parameters have already been provided during a previous call to @ref sd_ble_gap_authenticate.\n * @param[in,out] p_sec_keyset Pointer to a @ref ble_gap_sec_keyset_t security keyset structure. Any keys generated and/or\n * distributed as a result of the ongoing security procedure will be stored into the memory referenced by the pointers inside this\n * structure. The keys will be stored and available to the application upon reception of a @ref BLE_GAP_EVT_AUTH_STATUS event.\n *                         Note that the SoftDevice expects the application to provide memory for storing the\n *                         peer's keys. So it must be ensured that the relevant pointers inside this structure are not NULL. The\n * pointers to the local key can, however, be NULL, in which case, the local key data will not be available to the application\n * upon reception of the\n *                         @ref BLE_GAP_EVT_AUTH_STATUS event.\n *\n * @retval ::NRF_SUCCESS Successfully accepted security parameter from the application.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY The stack is busy, process pending events and retry.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Security parameters has not been requested.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Setting of sign or link fields in @ref ble_gap_sec_kdist_t not supported.\n *                                   Distribution of own Identity Information is only supported if the Central\n *                                   Address Resolution characteristic is configured to be included or\n *                                   the Softdevice is configured to support peripheral roles only.\n *                                   See @ref ble_gap_cfg_car_incl_cfg_t and @ref ble_gap_cfg_role_count_t.\n */\nSVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t,\n       sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const *p_sec_params,\n                                   ble_gap_sec_keyset_t const *p_sec_keyset));\n\n/**@brief Reply with an authentication key.\n *\n * @details This function is only used to reply to a @ref BLE_GAP_EVT_AUTH_KEY_REQUEST or a @ref BLE_GAP_EVT_PASSKEY_DISPLAY,\n * calling it at other times will result in an @ref NRF_ERROR_INVALID_STATE.\n * @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected\n * parameters.\n *\n * @events\n * @event{This function is used during authentication procedures\\, see the list of events in the documentation of @ref\n * sd_ble_gap_authenticate.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_BONDING_PK_CENTRAL_OOB_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_BONDING_PK_PERIPH_OOB_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] key_type See @ref BLE_GAP_AUTH_KEY_TYPES.\n * @param[in] p_key If key type is @ref BLE_GAP_AUTH_KEY_TYPE_NONE, then NULL.\n *                  If key type is @ref BLE_GAP_AUTH_KEY_TYPE_PASSKEY, then a 6-byte ASCII string (digit 0..9 only, no NULL\n * termination) or NULL when confirming LE Secure Connections Numeric Comparison. If key type is @ref BLE_GAP_AUTH_KEY_TYPE_OOB,\n * then a 16-byte OOB key value in little-endian format.\n *\n * @retval ::NRF_SUCCESS Authentication key successfully set.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Authentication key has not been requested.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_AUTH_KEY_REPLY, uint32_t,\n       sd_ble_gap_auth_key_reply(uint16_t conn_handle, uint8_t key_type, uint8_t const *p_key));\n\n/**@brief Reply with an LE Secure connections DHKey.\n *\n * @details This function is only used to reply to a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST, calling it at other times will result in\n * an @ref NRF_ERROR_INVALID_STATE.\n * @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected\n * parameters.\n *\n * @events\n * @event{This function is used during authentication procedures\\, see the list of events in the documentation of @ref\n * sd_ble_gap_authenticate.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_NC_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_PD_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_PAIRING_JW_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_NC_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_PD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] p_dhkey LE Secure Connections DHKey.\n *\n * @retval ::NRF_SUCCESS DHKey successfully set.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:\n *                                   - The peer is not authenticated.\n *                                   - The application has not pulled a @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_LESC_DHKEY_REPLY, uint32_t,\n       sd_ble_gap_lesc_dhkey_reply(uint16_t conn_handle, ble_gap_lesc_dhkey_t const *p_dhkey));\n\n/**@brief Notify the peer of a local keypress.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_PKE_CD_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_PKE_CD_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] kp_not See @ref BLE_GAP_KP_NOT_TYPES.\n *\n * @retval ::NRF_SUCCESS Keypress notification successfully queued for transmission.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:\n *                                   - Authentication key not requested.\n *                                   - Passkey has not been entered.\n *                                   - Keypresses have not been enabled by both peers.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_BUSY The BLE stack is busy. Retry at later time.\n */\nSVCALL(SD_BLE_GAP_KEYPRESS_NOTIFY, uint32_t, sd_ble_gap_keypress_notify(uint16_t conn_handle, uint8_t kp_not));\n\n/**@brief Generate a set of OOB data to send to a peer out of band.\n *\n * @note  The @ref ble_gap_addr_t included in the OOB data returned will be the currently active one (or, if a connection has\n * already been established, the one used during connection setup). The application may manually overwrite it with an updated\n * value.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle. Can be @ref BLE_CONN_HANDLE_INVALID if a BLE connection has not been established yet.\n * @param[in] p_pk_own LE Secure Connections local P-256 Public Key.\n * @param[out] p_oobd_own The OOB data to be sent out of band to a peer.\n *\n * @retval ::NRF_SUCCESS OOB data successfully generated.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_LESC_OOB_DATA_GET, uint32_t,\n       sd_ble_gap_lesc_oob_data_get(uint16_t conn_handle, ble_gap_lesc_p256_pk_t const *p_pk_own,\n                                    ble_gap_lesc_oob_data_t *p_oobd_own));\n\n/**@brief Provide the OOB data sent/received out of band.\n *\n * @note  An authentication procedure with OOB selected as an algorithm must be in progress when calling this function.\n * @note  A @ref BLE_GAP_EVT_LESC_DHKEY_REQUEST event with the oobd_req set to 1 must have been received prior to calling this\n * function.\n *\n * @events\n * @event{This function is used during authentication procedures\\, see the list of events in the documentation of @ref\n * sd_ble_gap_authenticate.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_LESC_BONDING_OOB_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_LESC_BONDING_OOB_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] p_oobd_own The OOB data sent out of band to a peer or NULL if the peer has not received OOB data.\n *                       Must correspond to @ref ble_gap_sec_params_t::oob flag in @ref BLE_GAP_EVT_SEC_PARAMS_REQUEST.\n * @param[in] p_oobd_peer The OOB data received out of band from a peer or NULL if none received.\n *                        Must correspond to @ref ble_gap_sec_params_t::oob flag\n *                        in @ref sd_ble_gap_authenticate in the central role or\n *                        in @ref sd_ble_gap_sec_params_reply in the peripheral role.\n *\n * @retval ::NRF_SUCCESS OOB data accepted.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:\n *                                   - Authentication key not requested\n *                                   - Not expecting LESC OOB data\n *                                   - Have not actually exchanged passkeys.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_LESC_OOB_DATA_SET, uint32_t,\n       sd_ble_gap_lesc_oob_data_set(uint16_t conn_handle, ble_gap_lesc_oob_data_t const *p_oobd_own,\n                                    ble_gap_lesc_oob_data_t const *p_oobd_peer));\n\n/**@brief Initiate GAP Encryption procedure.\n *\n * @details In the central role, this function will initiate the encryption procedure using the encryption information provided.\n *\n * @events\n * @event{@ref BLE_GAP_EVT_CONN_SEC_UPDATE, The connection security has been updated.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_CENTRAL_ENC_AUTH_MUTEX_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_ENC_MSC}\n * @mmsc{@ref BLE_GAP_MULTILINK_CTRL_PROC_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_SEC_REQ_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] p_master_id Pointer to a @ref ble_gap_master_id_t master identification structure.\n * @param[in] p_enc_info  Pointer to a @ref ble_gap_enc_info_t encryption information structure.\n *\n * @retval ::NRF_SUCCESS Successfully initiated authentication procedure.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_STATE No link has been established.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::BLE_ERROR_INVALID_ROLE Operation is not supported in the Peripheral role.\n * @retval ::NRF_ERROR_BUSY Procedure already in progress or not allowed at this time, wait for pending procedures to complete and\n * retry.\n */\nSVCALL(SD_BLE_GAP_ENCRYPT, uint32_t,\n       sd_ble_gap_encrypt(uint16_t conn_handle, ble_gap_master_id_t const *p_master_id, ble_gap_enc_info_t const *p_enc_info));\n\n/**@brief Reply with GAP security information.\n *\n * @details This function is only used to reply to a @ref BLE_GAP_EVT_SEC_INFO_REQUEST, calling it at other times will result in\n * @ref NRF_ERROR_INVALID_STATE.\n * @note    If the call returns an error code, the request is still pending, and the reply call may be repeated with corrected\n * parameters.\n * @note    Data signing is not yet supported, and p_sign_info must therefore be NULL.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_PERIPH_ENC_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n * @param[in] p_enc_info Pointer to a @ref ble_gap_enc_info_t encryption information structure. May be NULL to signal none is\n * available.\n * @param[in] p_id_info Pointer to a @ref ble_gap_irk_t identity information structure. May be NULL to signal none is available.\n * @param[in] p_sign_info Pointer to a @ref ble_gap_sign_info_t signing information structure. May be NULL to signal none is\n * available.\n *\n * @retval ::NRF_SUCCESS Successfully accepted security information.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:\n *                                   - No link has been established.\n *                                   - No @ref BLE_GAP_EVT_SEC_INFO_REQUEST pending.\n *                                   - Encryption information provided by the app without being requested. See @ref\n * ble_gap_evt_sec_info_request_t::enc_info.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_SEC_INFO_REPLY, uint32_t,\n       sd_ble_gap_sec_info_reply(uint16_t conn_handle, ble_gap_enc_info_t const *p_enc_info, ble_gap_irk_t const *p_id_info,\n                                 ble_gap_sign_info_t const *p_sign_info));\n\n/**@brief Get the current connection security.\n *\n * @param[in]  conn_handle Connection handle.\n * @param[out] p_conn_sec  Pointer to a @ref ble_gap_conn_sec_t structure to be filled in.\n *\n * @retval ::NRF_SUCCESS Current connection security successfully retrieved.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_CONN_SEC_GET, uint32_t, sd_ble_gap_conn_sec_get(uint16_t conn_handle, ble_gap_conn_sec_t *p_conn_sec));\n\n/**@brief Start reporting the received signal strength to the application.\n *\n *        A new event is reported whenever the RSSI value changes, until @ref sd_ble_gap_rssi_stop is called.\n *\n * @events\n * @event{@ref BLE_GAP_EVT_RSSI_CHANGED, New RSSI data available. How often the event is generated is\n *                                       dependent on the settings of the <code>threshold_dbm</code>\n *                                       and <code>skip_count</code> input parameters.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC}\n * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC}\n * @endmscs\n *\n * @param[in] conn_handle        Connection handle.\n * @param[in] threshold_dbm      Minimum change in dBm before triggering the @ref BLE_GAP_EVT_RSSI_CHANGED event. Events are\n * disabled if threshold_dbm equals @ref BLE_GAP_RSSI_THRESHOLD_INVALID.\n * @param[in] skip_count         Number of RSSI samples with a change of threshold_dbm or more before sending a new @ref\n * BLE_GAP_EVT_RSSI_CHANGED event.\n *\n * @retval ::NRF_SUCCESS                   Successfully activated RSSI reporting.\n * @retval ::NRF_ERROR_INVALID_STATE       RSSI reporting is already ongoing.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_RSSI_START, uint32_t, sd_ble_gap_rssi_start(uint16_t conn_handle, uint8_t threshold_dbm, uint8_t skip_count));\n\n/**@brief Stop reporting the received signal strength.\n *\n * @note  An RSSI change detected before the call but not yet received by the application\n *        may be reported after @ref sd_ble_gap_rssi_stop has been called.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC}\n * @mmsc{@ref BLE_GAP_RSSI_FILT_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection handle.\n *\n * @retval ::NRF_SUCCESS                   Successfully deactivated RSSI reporting.\n * @retval ::NRF_ERROR_INVALID_STATE       RSSI reporting is not ongoing.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n */\nSVCALL(SD_BLE_GAP_RSSI_STOP, uint32_t, sd_ble_gap_rssi_stop(uint16_t conn_handle));\n\n/**@brief Get the received signal strength for the last connection event.\n *\n *        @ref sd_ble_gap_rssi_start must be called to start reporting RSSI before using this function. @ref NRF_ERROR_NOT_FOUND\n *        will be returned until RSSI was sampled for the first time after calling @ref sd_ble_gap_rssi_start.\n * @note ERRATA-153 and ERRATA-225 require the rssi sample to be compensated based on a temperature measurement.\n * @mscs\n * @mmsc{@ref BLE_GAP_CENTRAL_RSSI_READ_MSC}\n * @endmscs\n *\n * @param[in]  conn_handle Connection handle.\n * @param[out] p_rssi      Pointer to the location where the RSSI measurement shall be stored.\n * @param[out] p_ch_index  Pointer to the location where Channel Index for the RSSI measurement shall be stored.\n *\n * @retval ::NRF_SUCCESS                   Successfully read the RSSI.\n * @retval ::NRF_ERROR_NOT_FOUND           No sample is available.\n * @retval ::NRF_ERROR_INVALID_ADDR        Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_INVALID_STATE       RSSI reporting is not ongoing.\n */\nSVCALL(SD_BLE_GAP_RSSI_GET, uint32_t, sd_ble_gap_rssi_get(uint16_t conn_handle, int8_t *p_rssi, uint8_t *p_ch_index));\n\n/**@brief Start or continue scanning (GAP Discovery procedure, Observer Procedure).\n *\n * @note    A call to this function will require the application to keep the memory pointed by\n *          p_adv_report_buffer alive until the buffer is released. The buffer is released when the scanner is stopped\n *          or when this function is called with another buffer.\n *\n * @note    The scanner will automatically stop in the following cases:\n *           - @ref sd_ble_gap_scan_stop is called.\n *           - @ref sd_ble_gap_connect is called.\n *           - A @ref BLE_GAP_EVT_TIMEOUT with source set to @ref BLE_GAP_TIMEOUT_SRC_SCAN is received.\n *           - When a @ref BLE_GAP_EVT_ADV_REPORT event is received and @ref ble_gap_adv_report_type_t::status is not set to\n *             @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA. In this case scanning is only paused to let the application\n *             access received data. The application must call this function to continue scanning, or call @ref\n * sd_ble_gap_scan_stop to stop scanning.\n *\n * @note    If a @ref BLE_GAP_EVT_ADV_REPORT event is received with @ref ble_gap_adv_report_type_t::status set to\n *          @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_MORE_DATA, the scanner will continue scanning, and the application will\n *          receive more reports from this advertising event. The following reports will include the old and new received data.\n *\n * @events\n * @event{@ref BLE_GAP_EVT_ADV_REPORT, An advertising or scan response packet has been received.}\n * @event{@ref BLE_GAP_EVT_TIMEOUT, Scanner has timed out.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_SCAN_MSC}\n * @mmsc{@ref BLE_GAP_WL_SHARE_MSC}\n * @endmscs\n *\n * @param[in] p_scan_params       Pointer to scan parameters structure. When this function is used to continue\n *                                scanning, this parameter must be NULL.\n * @param[in] p_adv_report_buffer Pointer to buffer used to store incoming advertising data.\n *                                The memory pointed to should be kept alive until the scanning is stopped.\n *                                See @ref BLE_GAP_SCAN_BUFFER_SIZE for minimum and maximum buffer size.\n *                                If the scanner receives advertising data larger than can be stored in the buffer,\n *                                a @ref BLE_GAP_EVT_ADV_REPORT will be raised with @ref ble_gap_adv_report_type_t::status\n *                                set to @ref BLE_GAP_ADV_DATA_STATUS_INCOMPLETE_TRUNCATED.\n *\n * @retval ::NRF_SUCCESS Successfully initiated scanning procedure.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation. Either:\n *                                   - Scanning is already ongoing and p_scan_params was not NULL\n *                                   - Scanning is not running and p_scan_params was NULL.\n *                                   - The scanner has timed out when this function is called to continue scanning.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. See @ref ble_gap_scan_params_t.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Unsupported parameters supplied. See @ref ble_gap_scan_params_t.\n * @retval ::NRF_ERROR_INVALID_LENGTH The provided buffer length is invalid. See @ref BLE_GAP_SCAN_BUFFER_MIN.\n * @retval ::NRF_ERROR_RESOURCES Not enough BLE role slots available.\n *                               Stop one or more currently active roles (Central, Peripheral or Broadcaster) and try again\n */\nSVCALL(SD_BLE_GAP_SCAN_START, uint32_t,\n       sd_ble_gap_scan_start(ble_gap_scan_params_t const *p_scan_params, ble_data_t const *p_adv_report_buffer));\n\n/**@brief Stop scanning (GAP Discovery procedure, Observer Procedure).\n *\n * @note The buffer provided in @ref sd_ble_gap_scan_start is released.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_SCAN_MSC}\n * @mmsc{@ref BLE_GAP_WL_SHARE_MSC}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS Successfully stopped scanning procedure.\n * @retval ::NRF_ERROR_INVALID_STATE Not in the scanning state.\n */\nSVCALL(SD_BLE_GAP_SCAN_STOP, uint32_t, sd_ble_gap_scan_stop(void));\n\n/**@brief Create a connection (GAP Link Establishment).\n *\n * @note If a scanning procedure is currently in progress it will be automatically stopped when calling this function.\n *       The scanning procedure will be stopped even if the function returns an error.\n *\n * @events\n * @event{@ref BLE_GAP_EVT_CONNECTED, A connection was established.}\n * @event{@ref BLE_GAP_EVT_TIMEOUT, Failed to establish a connection.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_WL_SHARE_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_CONN_PRIV_MSC}\n * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC}\n * @endmscs\n *\n * @param[in] p_peer_addr   Pointer to peer identity address. If @ref ble_gap_scan_params_t::filter_policy is set to use\n *                          whitelist, then p_peer_addr is ignored.\n * @param[in] p_scan_params Pointer to scan parameters structure.\n * @param[in] p_conn_params Pointer to desired connection parameters.\n * @param[in] conn_cfg_tag  Tag identifying a configuration set by @ref sd_ble_cfg_set or\n *                          @ref BLE_CONN_CFG_TAG_DEFAULT to use the default connection configuration.\n *\n * @retval ::NRF_SUCCESS Successfully initiated connection procedure.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid parameter(s) pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n *                                   - Invalid parameter(s) in p_scan_params or p_conn_params.\n *                                   - Use of whitelist requested but whitelist has not been set, see @ref\n * sd_ble_gap_whitelist_set.\n *                                   - Peer address was not present in the device identity list, see @ref\n * sd_ble_gap_device_identities_set.\n * @retval ::NRF_ERROR_NOT_FOUND conn_cfg_tag not found.\n * @retval ::NRF_ERROR_INVALID_STATE The SoftDevice is in an invalid state to perform this operation. This may be due to an\n *                                   existing locally initiated connect procedure, which must complete before initiating again.\n * @retval ::BLE_ERROR_GAP_INVALID_BLE_ADDR Invalid Peer address.\n * @retval ::NRF_ERROR_CONN_COUNT The limit of available connections for this connection configuration tag has been reached.\n *                                To increase the number of available connections,\n *                                use @ref sd_ble_cfg_set with @ref BLE_GAP_CFG_ROLE_COUNT or @ref BLE_CONN_CFG_GAP.\n * @retval ::NRF_ERROR_RESOURCES Either:\n *                                 - Not enough BLE role slots available.\n *                                   Stop one or more currently active roles (Central, Peripheral or Observer) and try again.\n *                                 - The event_length parameter associated with conn_cfg_tag is too small to be able to\n *                                   establish a connection on the selected @ref ble_gap_scan_params_t::scan_phys.\n *                                   Use @ref sd_ble_cfg_set to increase the event length.\n */\nSVCALL(SD_BLE_GAP_CONNECT, uint32_t,\n       sd_ble_gap_connect(ble_gap_addr_t const *p_peer_addr, ble_gap_scan_params_t const *p_scan_params,\n                          ble_gap_conn_params_t const *p_conn_params, uint8_t conn_cfg_tag));\n\n/**@brief Cancel a connection establishment.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_CENTRAL_CONN_MSC}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS Successfully canceled an ongoing connection procedure.\n * @retval ::NRF_ERROR_INVALID_STATE No locally initiated connect procedure started or connection\n *                                   completed occurred.\n */\nSVCALL(SD_BLE_GAP_CONNECT_CANCEL, uint32_t, sd_ble_gap_connect_cancel(void));\n\n/**@brief Initiate or respond to a PHY Update Procedure\n *\n * @details   This function is used to initiate or respond to a PHY Update Procedure. It will always\n *            generate a @ref BLE_GAP_EVT_PHY_UPDATE event if successfully executed.\n *            If this function is used to initiate a PHY Update procedure and the only option\n *            provided in @ref ble_gap_phys_t::tx_phys and @ref ble_gap_phys_t::rx_phys is the\n *            currently active PHYs in the respective directions, the SoftDevice will generate a\n *            @ref BLE_GAP_EVT_PHY_UPDATE with the current PHYs set and will not initiate the\n *            procedure in the Link Layer.\n *\n *            If @ref ble_gap_phys_t::tx_phys or @ref ble_gap_phys_t::rx_phys is @ref BLE_GAP_PHY_AUTO,\n *            then the stack will select PHYs based on the peer's PHY preferences and the local link\n *            configuration. The PHY Update procedure will for this case result in a PHY combination\n *            that respects the time constraints configured with @ref sd_ble_cfg_set and the current\n *            link layer data length.\n *\n *            When acting as a central, the SoftDevice will select the fastest common PHY in each direction.\n *\n *            If the peer does not support the PHY Update Procedure, then the resulting\n *            @ref BLE_GAP_EVT_PHY_UPDATE event will have a status set to\n *            @ref BLE_HCI_UNSUPPORTED_REMOTE_FEATURE.\n *\n *            If the PHY Update procedure was rejected by the peer due to a procedure collision, the status\n *            will be @ref BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION or\n *            @ref BLE_HCI_DIFFERENT_TRANSACTION_COLLISION.\n *            If the peer responds to the PHY Update procedure with invalid parameters, the status\n *            will be @ref BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS.\n *            If the PHY Update procedure was rejected by the peer for a different reason, the status will\n *            contain the reason as specified by the peer.\n *\n * @events\n * @event{@ref BLE_GAP_EVT_PHY_UPDATE, Result of the PHY Update Procedure.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_CENTRAL_PHY_UPDATE}\n * @mmsc{@ref BLE_GAP_PERIPHERAL_PHY_UPDATE}\n * @endmscs\n *\n * @param[in] conn_handle   Connection handle to indicate the connection for which the PHY Update is requested.\n * @param[in] p_gap_phys    Pointer to PHY structure.\n *\n * @retval ::NRF_SUCCESS Successfully requested a PHY Update.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_STATE No link has been established.\n * @retval ::NRF_ERROR_RESOURCES The connection event length configured for this link is not sufficient for the combination of\n *                               @ref ble_gap_phys_t::tx_phys, @ref ble_gap_phys_t::rx_phys, and @ref\n * ble_gap_data_length_params_t. The connection event length is configured with @ref BLE_CONN_CFG_GAP using @ref sd_ble_cfg_set.\n * @retval ::NRF_ERROR_BUSY Procedure is already in progress or not allowed at this time. Process pending events and wait for the\n * pending procedure to complete and retry.\n *\n */\nSVCALL(SD_BLE_GAP_PHY_UPDATE, uint32_t, sd_ble_gap_phy_update(uint16_t conn_handle, ble_gap_phys_t const *p_gap_phys));\n\n/**@brief Initiate or respond to a Data Length Update Procedure.\n *\n * @note If the application uses @ref BLE_GAP_DATA_LENGTH_AUTO for one or more members of\n *       p_dl_params, the SoftDevice will choose the highest value supported in current\n *       configuration and connection parameters.\n * @note  If the link PHY is Coded, the SoftDevice will ensure that the MaxTxTime and/or MaxRxTime\n *        used in the Data Length Update procedure is at least 2704 us. Otherwise, MaxTxTime and\n *        MaxRxTime will be limited to maximum 2120 us.\n *\n * @param[in]   conn_handle       Connection handle.\n * @param[in]   p_dl_params       Pointer to local parameters to be used in Data Length Update\n *                                Procedure. Set any member to @ref BLE_GAP_DATA_LENGTH_AUTO to let\n *                                the SoftDevice automatically decide the value for that member.\n *                                Set to NULL to use automatic values for all members.\n * @param[out]  p_dl_limitation   Pointer to limitation to be written when local device does not\n *                                have enough resources or does not support the requested Data Length\n *                                Update parameters. Ignored if NULL.\n *\n * @mscs\n * @mmsc{@ref BLE_GAP_DATA_LENGTH_UPDATE_PROCEDURE_MSC}\n * @endmscs\n *\n * @retval ::NRF_SUCCESS Successfully set Data Length Extension initiation/response parameters.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied.\n * @retval ::NRF_ERROR_INVALID_STATE No link has been established.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied.\n * @retval ::NRF_ERROR_NOT_SUPPORTED The requested parameters are not supported by the SoftDevice. Inspect\n *                                   p_dl_limitation to see which parameter is not supported.\n * @retval ::NRF_ERROR_RESOURCES The connection event length configured for this link is not sufficient for the requested\n * parameters. Use @ref sd_ble_cfg_set with @ref BLE_CONN_CFG_GAP to increase the connection event length. Inspect p_dl_limitation\n * to see where the limitation is.\n * @retval ::NRF_ERROR_BUSY Peer has already initiated a Data Length Update Procedure. Process the\n *                          pending @ref BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST event to respond.\n */\nSVCALL(SD_BLE_GAP_DATA_LENGTH_UPDATE, uint32_t,\n       sd_ble_gap_data_length_update(uint16_t conn_handle, ble_gap_data_length_params_t const *p_dl_params,\n                                     ble_gap_data_length_limitation_t *p_dl_limitation));\n\n/**@brief   Start the Quality of Service (QoS) channel survey module.\n *\n * @details The channel survey module provides measurements of the energy levels on\n *          the Bluetooth Low Energy channels. When the module is enabled, @ref BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT\n *          events will periodically report the measured energy levels for each channel.\n *\n * @note    The measurements are scheduled with lower priority than other Bluetooth Low Energy roles,\n *          Radio Timeslot API events and Flash API events.\n *\n * @note    The channel survey module will attempt to do measurements so that the average interval\n *          between measurements will be interval_us. However due to the channel survey module\n *          having the lowest priority of all roles and modules, this may not be possible. In that\n *          case fewer than expected channel survey reports may be given.\n *\n * @note    In order to use the channel survey module, @ref ble_gap_cfg_role_count_t::qos_channel_survey_role_available\n *          must be set. This is done using @ref sd_ble_cfg_set.\n *\n * @param[in]   interval_us      Requested average interval for the measurements and reports. See\n *                               @ref BLE_GAP_QOS_CHANNEL_SURVEY_INTERVALS for valid ranges. If set\n *                               to @ref BLE_GAP_QOS_CHANNEL_SURVEY_INTERVAL_CONTINUOUS, the channel\n *                               survey role will be scheduled at every available opportunity.\n *\n * @retval ::NRF_SUCCESS             The module is successfully started.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter supplied. interval_us is out of the\n *                                   allowed range.\n * @retval ::NRF_ERROR_INVALID_STATE Trying to start the module when already running.\n * @retval ::NRF_ERROR_RESOURCES     The channel survey module is not available to the application.\n *                                   Set @ref ble_gap_cfg_role_count_t::qos_channel_survey_role_available using\n *                                   @ref sd_ble_cfg_set.\n */\nSVCALL(SD_BLE_GAP_QOS_CHANNEL_SURVEY_START, uint32_t, sd_ble_gap_qos_channel_survey_start(uint32_t interval_us));\n\n/**@brief   Stop the Quality of Service (QoS) channel survey module.\n *\n * @note    The SoftDevice may generate one @ref BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT event after this\n *          function is called.\n *\n * @retval ::NRF_SUCCESS             The module is successfully stopped.\n * @retval ::NRF_ERROR_INVALID_STATE Trying to stop the module when it is not running.\n */\nSVCALL(SD_BLE_GAP_QOS_CHANNEL_SURVEY_STOP, uint32_t, sd_ble_gap_qos_channel_survey_stop(void));\n\n/**@brief   Obtain the next connection event counter value.\n *\n * @details The connection event counter is initialized to zero on the first connection event. The value is incremented\n *          by one for each connection event. For more information see Bluetooth Core Specification v5.0, Vol 6, Part B,\n *          Section 4.5.1.\n *\n * @note    The connection event counter obtained through this API will be outdated if this API is called\n *          at the same time as the connection event counter is incremented.\n *\n * @note    This API will always return the last connection event counter + 1.\n *          The actual connection event may be multiple connection events later if:\n *           - Slave latency is enabled and there is no data to transmit or receive.\n *           - Another role is scheduled with a higher priority at the same time as the next connection event.\n *\n * @param[in]   conn_handle       Connection handle.\n * @param[out]  p_counter         Pointer to the variable where the next connection event counter will be written.\n *\n * @retval ::NRF_SUCCESS                   The connection event counter was successfully retrieved.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle parameter supplied.\n * @retval ::NRF_ERROR_INVALID_ADDR        Invalid pointer supplied.\n */\nSVCALL(SD_BLE_GAP_NEXT_CONN_EVT_COUNTER_GET, uint32_t,\n       sd_ble_gap_next_conn_evt_counter_get(uint16_t conn_handle, uint16_t *p_counter));\n\n/**@brief   Start triggering a given task on connection event start.\n *\n * @details When enabled, this feature will trigger a PPI task at the start of connection events.\n *          The application can configure the SoftDevice to trigger every N connection events starting from\n *          a given connection event counter. See also @ref ble_gap_conn_event_trigger_t.\n *\n * @param[in]   conn_handle   Connection handle.\n * @param[in]   p_params      Connection event trigger parameters.\n *\n * @retval ::NRF_SUCCESS                   Success.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_INVALID_ADDR        Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM       Invalid parameter supplied. See @ref ble_gap_conn_event_trigger_t.\n * @retval ::NRF_ERROR_INVALID_STATE       Either:\n *                                         - Trying to start connection event triggering when it is already ongoing.\n *                                         - @ref ble_gap_conn_event_trigger_t::conn_evt_counter_start is in the past.\n *                                           Use @ref sd_ble_gap_next_conn_evt_counter_get to find a new value\n                                             to be used as ble_gap_conn_event_trigger_t::conn_evt_counter_start.\n */\nSVCALL(SD_BLE_GAP_CONN_EVT_TRIGGER_START, uint32_t,\n       sd_ble_gap_conn_evt_trigger_start(uint16_t conn_handle, ble_gap_conn_event_trigger_t const *p_params));\n\n/**@brief   Stop triggering the task configured using @ref sd_ble_gap_conn_evt_trigger_start.\n *\n * @param[in]   conn_handle   Connection handle.\n *\n * @retval ::NRF_SUCCESS                   Success.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied.\n * @retval ::NRF_ERROR_INVALID_STATE       Trying to stop connection event triggering when it is not enabled.\n */\nSVCALL(SD_BLE_GAP_CONN_EVT_TRIGGER_STOP, uint32_t, sd_ble_gap_conn_evt_trigger_stop(uint16_t conn_handle));\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // BLE_GAP_H__\n\n/**\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_gatt.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_GATT Generic Attribute Profile (GATT) Common\n  @{\n  @brief  Common definitions and prototypes for the GATT interfaces.\n */\n\n#ifndef BLE_GATT_H__\n#define BLE_GATT_H__\n\n#include \"ble_err.h\"\n#include \"ble_hci.h\"\n#include \"ble_ranges.h\"\n#include \"ble_types.h\"\n#include \"nrf_error.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup BLE_GATT_DEFINES Defines\n * @{ */\n\n/** @brief Default ATT MTU, in bytes. */\n#define BLE_GATT_ATT_MTU_DEFAULT 23\n\n/**@brief Invalid Attribute Handle. */\n#define BLE_GATT_HANDLE_INVALID 0x0000\n\n/**@brief First Attribute Handle. */\n#define BLE_GATT_HANDLE_START 0x0001\n\n/**@brief Last Attribute Handle. */\n#define BLE_GATT_HANDLE_END 0xFFFF\n\n/** @defgroup BLE_GATT_TIMEOUT_SOURCES GATT Timeout sources\n * @{ */\n#define BLE_GATT_TIMEOUT_SRC_PROTOCOL 0x00 /**< ATT Protocol timeout. */\n/** @} */\n\n/** @defgroup BLE_GATT_WRITE_OPS GATT Write operations\n * @{ */\n#define BLE_GATT_OP_INVALID 0x00        /**< Invalid Operation. */\n#define BLE_GATT_OP_WRITE_REQ 0x01      /**< Write Request. */\n#define BLE_GATT_OP_WRITE_CMD 0x02      /**< Write Command. */\n#define BLE_GATT_OP_SIGN_WRITE_CMD 0x03 /**< Signed Write Command. */\n#define BLE_GATT_OP_PREP_WRITE_REQ 0x04 /**< Prepare Write Request. */\n#define BLE_GATT_OP_EXEC_WRITE_REQ 0x05 /**< Execute Write Request. */\n/** @} */\n\n/** @defgroup BLE_GATT_EXEC_WRITE_FLAGS GATT Execute Write flags\n * @{ */\n#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL 0x00 /**< Cancel prepared write. */\n#define BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE 0x01  /**< Execute prepared write. */\n/** @} */\n\n/** @defgroup BLE_GATT_HVX_TYPES GATT Handle Value operations\n * @{ */\n#define BLE_GATT_HVX_INVALID 0x00      /**< Invalid Operation. */\n#define BLE_GATT_HVX_NOTIFICATION 0x01 /**< Handle Value Notification. */\n#define BLE_GATT_HVX_INDICATION 0x02   /**< Handle Value Indication. */\n/** @} */\n\n/** @defgroup BLE_GATT_STATUS_CODES GATT Status Codes\n * @{ */\n#define BLE_GATT_STATUS_SUCCESS 0x0000                      /**< Success. */\n#define BLE_GATT_STATUS_UNKNOWN 0x0001                      /**< Unknown or not applicable status. */\n#define BLE_GATT_STATUS_ATTERR_INVALID 0x0100               /**< ATT Error: Invalid Error Code. */\n#define BLE_GATT_STATUS_ATTERR_INVALID_HANDLE 0x0101        /**< ATT Error: Invalid Attribute Handle. */\n#define BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED 0x0102    /**< ATT Error: Read not permitted. */\n#define BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED 0x0103   /**< ATT Error: Write not permitted. */\n#define BLE_GATT_STATUS_ATTERR_INVALID_PDU 0x0104           /**< ATT Error: Used in ATT as Invalid PDU. */\n#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION 0x0105  /**< ATT Error: Authenticated link required. */\n#define BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED 0x0106 /**< ATT Error: Used in ATT as Request Not Supported. */\n#define BLE_GATT_STATUS_ATTERR_INVALID_OFFSET 0x0107        /**< ATT Error: Offset specified was past the end of the attribute. */\n#define BLE_GATT_STATUS_ATTERR_INSUF_AUTHORIZATION 0x0108   /**< ATT Error: Used in ATT as Insufficient Authorization. */\n#define BLE_GATT_STATUS_ATTERR_PREPARE_QUEUE_FULL 0x0109    /**< ATT Error: Used in ATT as Prepare Queue Full. */\n#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND 0x010A   /**< ATT Error: Used in ATT as Attribute not found. */\n#define BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG                                                                                \\\n    0x010B /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */\n#define BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE 0x010C     /**< ATT Error: Encryption key size used is insufficient. */\n#define BLE_GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH 0x010D /**< ATT Error: Invalid value size. */\n#define BLE_GATT_STATUS_ATTERR_UNLIKELY_ERROR 0x010E         /**< ATT Error: Very unlikely error. */\n#define BLE_GATT_STATUS_ATTERR_INSUF_ENCRYPTION 0x010F       /**< ATT Error: Encrypted link required. */\n#define BLE_GATT_STATUS_ATTERR_UNSUPPORTED_GROUP_TYPE                                                                            \\\n    0x0110                                             /**< ATT Error: Attribute type is not a supported grouping attribute. */\n#define BLE_GATT_STATUS_ATTERR_INSUF_RESOURCES 0x0111  /**< ATT Error: Insufficient resources. */\n#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_BEGIN 0x0112 /**< ATT Error: Reserved for Future Use range #1 begin. */\n#define BLE_GATT_STATUS_ATTERR_RFU_RANGE1_END 0x017F   /**< ATT Error: Reserved for Future Use range #1 end. */\n#define BLE_GATT_STATUS_ATTERR_APP_BEGIN 0x0180        /**< ATT Error: Application range begin. */\n#define BLE_GATT_STATUS_ATTERR_APP_END 0x019F          /**< ATT Error: Application range end. */\n#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN 0x01A0 /**< ATT Error: Reserved for Future Use range #2 begin. */\n#define BLE_GATT_STATUS_ATTERR_RFU_RANGE2_END 0x01DF   /**< ATT Error: Reserved for Future Use range #2 end. */\n#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_BEGIN 0x01E0 /**< ATT Error: Reserved for Future Use range #3 begin. */\n#define BLE_GATT_STATUS_ATTERR_RFU_RANGE3_END 0x01FC   /**< ATT Error: Reserved for Future Use range #3 end. */\n#define BLE_GATT_STATUS_ATTERR_CPS_WRITE_REQ_REJECTED                                                                            \\\n    0x01FC /**< ATT Common Profile and Service Error: Write request rejected.                                                    \\\n            */\n#define BLE_GATT_STATUS_ATTERR_CPS_CCCD_CONFIG_ERROR                                                                             \\\n    0x01FD /**< ATT Common Profile and Service Error: Client Characteristic Configuration Descriptor improperly configured. */\n#define BLE_GATT_STATUS_ATTERR_CPS_PROC_ALR_IN_PROG                                                                              \\\n    0x01FE /**< ATT Common Profile and Service Error: Procedure Already in Progress. */\n#define BLE_GATT_STATUS_ATTERR_CPS_OUT_OF_RANGE 0x01FF /**< ATT Common Profile and Service Error: Out Of Range. */\n/** @} */\n\n/** @defgroup BLE_GATT_CPF_FORMATS Characteristic Presentation Formats\n *  @note Found at\n * http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml\n * @{ */\n#define BLE_GATT_CPF_FORMAT_RFU 0x00     /**< Reserved For Future Use. */\n#define BLE_GATT_CPF_FORMAT_BOOLEAN 0x01 /**< Boolean. */\n#define BLE_GATT_CPF_FORMAT_2BIT 0x02    /**< Unsigned 2-bit integer. */\n#define BLE_GATT_CPF_FORMAT_NIBBLE 0x03  /**< Unsigned 4-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT8 0x04   /**< Unsigned 8-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT12 0x05  /**< Unsigned 12-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT16 0x06  /**< Unsigned 16-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT24 0x07  /**< Unsigned 24-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT32 0x08  /**< Unsigned 32-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT48 0x09  /**< Unsigned 48-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT64 0x0A  /**< Unsigned 64-bit integer. */\n#define BLE_GATT_CPF_FORMAT_UINT128 0x0B /**< Unsigned 128-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT8 0x0C   /**< Signed 2-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT12 0x0D  /**< Signed 12-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT16 0x0E  /**< Signed 16-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT24 0x0F  /**< Signed 24-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT32 0x10  /**< Signed 32-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT48 0x11  /**< Signed 48-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT64 0x12  /**< Signed 64-bit integer. */\n#define BLE_GATT_CPF_FORMAT_SINT128 0x13 /**< Signed 128-bit integer. */\n#define BLE_GATT_CPF_FORMAT_FLOAT32 0x14 /**< IEEE-754 32-bit floating point. */\n#define BLE_GATT_CPF_FORMAT_FLOAT64 0x15 /**< IEEE-754 64-bit floating point. */\n#define BLE_GATT_CPF_FORMAT_SFLOAT 0x16  /**< IEEE-11073 16-bit SFLOAT. */\n#define BLE_GATT_CPF_FORMAT_FLOAT 0x17   /**< IEEE-11073 32-bit FLOAT. */\n#define BLE_GATT_CPF_FORMAT_DUINT16 0x18 /**< IEEE-20601 format. */\n#define BLE_GATT_CPF_FORMAT_UTF8S 0x19   /**< UTF-8 string. */\n#define BLE_GATT_CPF_FORMAT_UTF16S 0x1A  /**< UTF-16 string. */\n#define BLE_GATT_CPF_FORMAT_STRUCT 0x1B  /**< Opaque Structure. */\n/** @} */\n\n/** @defgroup BLE_GATT_CPF_NAMESPACES GATT Bluetooth Namespaces\n * @{\n */\n#define BLE_GATT_CPF_NAMESPACE_BTSIG 0x01                 /**< Bluetooth SIG defined Namespace. */\n#define BLE_GATT_CPF_NAMESPACE_DESCRIPTION_UNKNOWN 0x0000 /**< Namespace Description Unknown. */\n/** @} */\n\n/** @} */\n\n/** @addtogroup BLE_GATT_STRUCTURES Structures\n * @{ */\n\n/**\n * @brief BLE GATT connection configuration parameters, set with @ref sd_ble_cfg_set.\n *\n * @retval ::NRF_ERROR_INVALID_PARAM att_mtu is smaller than @ref BLE_GATT_ATT_MTU_DEFAULT.\n */\ntypedef struct {\n    uint16_t att_mtu; /**< Maximum size of ATT packet the SoftDevice can send or receive.\n                           The default and minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT.\n                           @mscs\n                           @mmsc{@ref BLE_GATTC_MTU_EXCHANGE}\n                           @mmsc{@ref BLE_GATTS_MTU_EXCHANGE}\n                           @endmscs\n                      */\n} ble_gatt_conn_cfg_t;\n\n/**@brief GATT Characteristic Properties. */\ntypedef struct {\n    /* Standard properties */\n    uint8_t broadcast : 1;      /**< Broadcasting of the value permitted. */\n    uint8_t read : 1;           /**< Reading the value permitted. */\n    uint8_t write_wo_resp : 1;  /**< Writing the value with Write Command permitted. */\n    uint8_t write : 1;          /**< Writing the value with Write Request permitted. */\n    uint8_t notify : 1;         /**< Notification of the value permitted. */\n    uint8_t indicate : 1;       /**< Indications of the value permitted. */\n    uint8_t auth_signed_wr : 1; /**< Writing the value with Signed Write Command permitted. */\n} ble_gatt_char_props_t;\n\n/**@brief GATT Characteristic Extended Properties. */\ntypedef struct {\n    /* Extended properties */\n    uint8_t reliable_wr : 1; /**< Writing the value with Queued Write operations permitted. */\n    uint8_t wr_aux : 1;      /**< Writing the Characteristic User Description descriptor permitted. */\n} ble_gatt_char_ext_props_t;\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // BLE_GATT_H__\n\n/** @} */\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_gattc.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_GATTC Generic Attribute Profile (GATT) Client\n  @{\n  @brief  Definitions and prototypes for the GATT Client interface.\n */\n\n#ifndef BLE_GATTC_H__\n#define BLE_GATTC_H__\n\n#include \"ble_err.h\"\n#include \"ble_gatt.h\"\n#include \"ble_ranges.h\"\n#include \"ble_types.h\"\n#include \"nrf.h\"\n#include \"nrf_error.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup BLE_GATTC_ENUMERATIONS Enumerations\n * @{ */\n\n/**@brief GATTC API SVC numbers. */\nenum BLE_GATTC_SVCS {\n    SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER = BLE_GATTC_SVC_BASE, /**< Primary Service Discovery. */\n    SD_BLE_GATTC_RELATIONSHIPS_DISCOVER,                         /**< Relationship Discovery. */\n    SD_BLE_GATTC_CHARACTERISTICS_DISCOVER,                       /**< Characteristic Discovery. */\n    SD_BLE_GATTC_DESCRIPTORS_DISCOVER,                           /**< Characteristic Descriptor Discovery. */\n    SD_BLE_GATTC_ATTR_INFO_DISCOVER,                             /**< Attribute Information Discovery. */\n    SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ,                        /**< Read Characteristic Value by UUID. */\n    SD_BLE_GATTC_READ,                                           /**< Generic read. */\n    SD_BLE_GATTC_CHAR_VALUES_READ,                               /**< Read multiple Characteristic Values. */\n    SD_BLE_GATTC_WRITE,                                          /**< Generic write. */\n    SD_BLE_GATTC_HV_CONFIRM,                                     /**< Handle Value Confirmation. */\n    SD_BLE_GATTC_EXCHANGE_MTU_REQUEST,                           /**< Exchange MTU Request. */\n};\n\n/**\n * @brief GATT Client Event IDs.\n */\nenum BLE_GATTC_EVTS {\n    BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP = BLE_GATTC_EVT_BASE, /**< Primary Service Discovery Response event.          \\n See @ref\n                                                              ble_gattc_evt_prim_srvc_disc_rsp_t.          */\n    BLE_GATTC_EVT_REL_DISC_RSP,  /**< Relationship Discovery Response event.             \\n See @ref ble_gattc_evt_rel_disc_rsp_t.\n                                  */\n    BLE_GATTC_EVT_CHAR_DISC_RSP, /**< Characteristic Discovery Response event.           \\n See @ref\n                                    ble_gattc_evt_char_disc_rsp_t.               */\n    BLE_GATTC_EVT_DESC_DISC_RSP, /**< Descriptor Discovery Response event.               \\n See @ref\n                                    ble_gattc_evt_desc_disc_rsp_t.               */\n    BLE_GATTC_EVT_ATTR_INFO_DISC_RSP,        /**< Attribute Information Response event.              \\n See @ref\n                                                ble_gattc_evt_attr_info_disc_rsp_t. */\n    BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP, /**< Read By UUID Response event.                       \\n See @ref\n                                                ble_gattc_evt_char_val_by_uuid_read_rsp_t.   */\n    BLE_GATTC_EVT_READ_RSP, /**< Read Response event.                               \\n See @ref ble_gattc_evt_read_rsp_t. */\n    BLE_GATTC_EVT_CHAR_VALS_READ_RSP, /**< Read multiple Response event.                      \\n See @ref\n                                         ble_gattc_evt_char_vals_read_rsp_t.          */\n    BLE_GATTC_EVT_WRITE_RSP, /**< Write Response event.                              \\n See @ref ble_gattc_evt_write_rsp_t. */\n    BLE_GATTC_EVT_HVX,       /**< Handle Value Notification or Indication event.     \\n Confirm indication with @ref\n                                sd_ble_gattc_hv_confirm.  \\n See @ref ble_gattc_evt_hvx_t. */\n    BLE_GATTC_EVT_EXCHANGE_MTU_RSP, /**< Exchange MTU Response event.                       \\n See @ref\n                                       ble_gattc_evt_exchange_mtu_rsp_t.            */\n    BLE_GATTC_EVT_TIMEOUT, /**< Timeout event.                                     \\n See @ref ble_gattc_evt_timeout_t. */\n    BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE /**< Write without Response transmission complete.      \\n See @ref\n                                           ble_gattc_evt_write_cmd_tx_complete_t.       */\n};\n\n/**@brief GATTC Option IDs.\n * IDs that uniquely identify a GATTC option.\n */\nenum BLE_GATTC_OPTS {\n    BLE_GATTC_OPT_UUID_DISC = BLE_GATTC_OPT_BASE, /**< UUID discovery. @ref ble_gattc_opt_uuid_disc_t  */\n};\n\n/** @} */\n\n/** @addtogroup BLE_GATTC_DEFINES Defines\n * @{ */\n\n/** @defgroup BLE_ERRORS_GATTC SVC return values specific to GATTC\n * @{ */\n#define BLE_ERROR_GATTC_PROC_NOT_PERMITTED (NRF_GATTC_ERR_BASE + 0x000) /**< Procedure not Permitted. */\n/** @} */\n\n/** @defgroup BLE_GATTC_ATTR_INFO_FORMAT Attribute Information Formats\n * @{ */\n#define BLE_GATTC_ATTR_INFO_FORMAT_16BIT 1  /**< 16-bit Attribute Information Format. */\n#define BLE_GATTC_ATTR_INFO_FORMAT_128BIT 2 /**< 128-bit Attribute Information Format. */\n/** @} */\n\n/** @defgroup BLE_GATTC_DEFAULTS GATT Client defaults\n * @{ */\n#define BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT                                                                                \\\n    1 /**< Default number of Write without Response that can be queued for transmission. */\n/** @} */\n\n/** @} */\n\n/** @addtogroup BLE_GATTC_STRUCTURES Structures\n * @{ */\n\n/**\n * @brief BLE GATTC connection configuration parameters, set with @ref sd_ble_cfg_set.\n */\ntypedef struct {\n    uint8_t write_cmd_tx_queue_size; /**< The guaranteed minimum number of Write without Response that can be queued for\n                                        transmission. The default value is @ref BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT */\n} ble_gattc_conn_cfg_t;\n\n/**@brief Operation Handle Range. */\ntypedef struct {\n    uint16_t start_handle; /**< Start Handle. */\n    uint16_t end_handle;   /**< End Handle. */\n} ble_gattc_handle_range_t;\n\n/**@brief GATT service. */\ntypedef struct {\n    ble_uuid_t uuid;                       /**< Service UUID. */\n    ble_gattc_handle_range_t handle_range; /**< Service Handle Range. */\n} ble_gattc_service_t;\n\n/**@brief  GATT include. */\ntypedef struct {\n    uint16_t handle;                   /**< Include Handle. */\n    ble_gattc_service_t included_srvc; /**< Handle of the included service. */\n} ble_gattc_include_t;\n\n/**@brief GATT characteristic. */\ntypedef struct {\n    ble_uuid_t uuid;                  /**< Characteristic UUID. */\n    ble_gatt_char_props_t char_props; /**< Characteristic Properties. */\n    uint8_t char_ext_props : 1;       /**< Extended properties present. */\n    uint16_t handle_decl;             /**< Handle of the Characteristic Declaration. */\n    uint16_t handle_value;            /**< Handle of the Characteristic Value. */\n} ble_gattc_char_t;\n\n/**@brief GATT descriptor. */\ntypedef struct {\n    uint16_t handle; /**< Descriptor Handle. */\n    ble_uuid_t uuid; /**< Descriptor UUID. */\n} ble_gattc_desc_t;\n\n/**@brief Write Parameters. */\ntypedef struct {\n    uint8_t write_op;       /**< Write Operation to be performed, see @ref BLE_GATT_WRITE_OPS. */\n    uint8_t flags;          /**< Flags, see @ref BLE_GATT_EXEC_WRITE_FLAGS. */\n    uint16_t handle;        /**< Handle to the attribute to be written. */\n    uint16_t offset;        /**< Offset in bytes. @note For WRITE_CMD and WRITE_REQ, offset must be 0. */\n    uint16_t len;           /**< Length of data in bytes. */\n    uint8_t const *p_value; /**< Pointer to the value data. */\n} ble_gattc_write_params_t;\n\n/**@brief Attribute Information for 16-bit Attribute UUID. */\ntypedef struct {\n    uint16_t handle; /**< Attribute handle. */\n    ble_uuid_t uuid; /**< 16-bit Attribute UUID. */\n} ble_gattc_attr_info16_t;\n\n/**@brief Attribute Information for 128-bit Attribute UUID. */\ntypedef struct {\n    uint16_t handle;    /**< Attribute handle. */\n    ble_uuid128_t uuid; /**< 128-bit Attribute UUID. */\n} ble_gattc_attr_info128_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP. */\ntypedef struct {\n    uint16_t count;                  /**< Service count. */\n    ble_gattc_service_t services[1]; /**< Service data. @note This is a variable length array. The size of 1 indicated is only a\n                                        placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use\n                                        event structures with variable length array members. */\n} ble_gattc_evt_prim_srvc_disc_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_REL_DISC_RSP. */\ntypedef struct {\n    uint16_t count;                  /**< Include count. */\n    ble_gattc_include_t includes[1]; /**< Include data. @note This is a variable length array. The size of 1 indicated is only a\n                                        placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use\n                                        event structures with variable length array members. */\n} ble_gattc_evt_rel_disc_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_DISC_RSP. */\ntypedef struct {\n    uint16_t count;            /**< Characteristic count. */\n    ble_gattc_char_t chars[1]; /**< Characteristic data. @note This is a variable length array. The size of 1 indicated is only a\n                                  placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event\n                                  structures with variable length array members. */\n} ble_gattc_evt_char_disc_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_DESC_DISC_RSP. */\ntypedef struct {\n    uint16_t count;            /**< Descriptor count. */\n    ble_gattc_desc_t descs[1]; /**< Descriptor data. @note This is a variable length array. The size of 1 indicated is only a\n                                  placeholder for compilation. See @ref sd_ble_evt_get for more information on how to use event\n                                  structures with variable length array members. */\n} ble_gattc_evt_desc_disc_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP. */\ntypedef struct {\n    uint16_t count; /**< Attribute count. */\n    uint8_t format; /**< Attribute information format, see @ref BLE_GATTC_ATTR_INFO_FORMAT. */\n    union {\n        ble_gattc_attr_info16_t attr_info16[1];   /**< Attribute information for 16-bit Attribute UUID.\n                                                       @note This is a variable length array. The size of 1 indicated is only a\n                                                     placeholder for compilation.   See @ref sd_ble_evt_get for more information on\n                                                     how to use event structures with variable length array members. */\n        ble_gattc_attr_info128_t attr_info128[1]; /**< Attribute information for 128-bit Attribute UUID.\n                                                       @note This is a variable length array. The size of 1 indicated is only a\n                                                     placeholder for compilation. See @ref sd_ble_evt_get for more information on\n                                                     how to use event structures with variable length array members. */\n    } info;                                       /**< Attribute information union. */\n} ble_gattc_evt_attr_info_disc_rsp_t;\n\n/**@brief GATT read by UUID handle value pair. */\ntypedef struct {\n    uint16_t handle;  /**< Attribute Handle. */\n    uint8_t *p_value; /**< Pointer to the Attribute Value, length is available in @ref\n                         ble_gattc_evt_char_val_by_uuid_read_rsp_t::value_len. */\n} ble_gattc_handle_value_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP. */\ntypedef struct {\n    uint16_t count;          /**< Handle-Value Pair Count. */\n    uint16_t value_len;      /**< Length of the value in Handle-Value(s) list. */\n    uint8_t handle_value[1]; /**< Handle-Value(s) list. To iterate through the list use @ref\n                                sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter.\n                                  @note This is a variable length array. The size of 1 indicated is only a placeholder for\n                                compilation. See @ref sd_ble_evt_get for more information on how to use event structures with\n                                variable length array members. */\n} ble_gattc_evt_char_val_by_uuid_read_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_READ_RSP. */\ntypedef struct {\n    uint16_t handle; /**< Attribute Handle. */\n    uint16_t offset; /**< Offset of the attribute data. */\n    uint16_t len;    /**< Attribute data length. */\n    uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for\n                        compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable\n                        length array members. */\n} ble_gattc_evt_read_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP. */\ntypedef struct {\n    uint16_t len;      /**< Concatenated Attribute values length. */\n    uint8_t values[1]; /**< Attribute values. @note This is a variable length array. The size of 1 indicated is only a placeholder\n                          for compilation. See @ref sd_ble_evt_get for more information on how to use event structures with\n                          variable length array members. */\n} ble_gattc_evt_char_vals_read_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_WRITE_RSP. */\ntypedef struct {\n    uint16_t handle;  /**< Attribute Handle. */\n    uint8_t write_op; /**< Type of write operation, see @ref BLE_GATT_WRITE_OPS. */\n    uint16_t offset;  /**< Data offset. */\n    uint16_t len;     /**< Data length. */\n    uint8_t data[1];  /**< Data. @note This is a variable length array. The size of 1 indicated is only a placeholder for\n                         compilation.  See @ref sd_ble_evt_get for more information on how to use event structures with variable\n                         length array members. */\n} ble_gattc_evt_write_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_HVX. */\ntypedef struct {\n    uint16_t handle; /**< Handle to which the HVx operation applies. */\n    uint8_t type;    /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */\n    uint16_t len;    /**< Attribute data length. */\n    uint8_t data[1]; /**< Attribute data. @note This is a variable length array. The size of 1 indicated is only a placeholder for\n                        compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable\n                        length array members. */\n} ble_gattc_evt_hvx_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP. */\ntypedef struct {\n    uint16_t server_rx_mtu; /**< Server RX MTU size. */\n} ble_gattc_evt_exchange_mtu_rsp_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_TIMEOUT. */\ntypedef struct {\n    uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */\n} ble_gattc_evt_timeout_t;\n\n/**@brief Event structure for @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE. */\ntypedef struct {\n    uint8_t count; /**< Number of write without response transmissions completed. */\n} ble_gattc_evt_write_cmd_tx_complete_t;\n\n/**@brief GATTC event structure. */\ntypedef struct {\n    uint16_t conn_handle; /**< Connection Handle on which event occurred. */\n    uint16_t gatt_status; /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */\n    uint16_t\n        error_handle; /**< In case of error: The handle causing the error. In all other cases @ref BLE_GATT_HANDLE_INVALID. */\n    union {\n        ble_gattc_evt_prim_srvc_disc_rsp_t prim_srvc_disc_rsp; /**< Primary Service Discovery Response Event Parameters. */\n        ble_gattc_evt_rel_disc_rsp_t rel_disc_rsp;             /**< Relationship Discovery Response Event Parameters. */\n        ble_gattc_evt_char_disc_rsp_t char_disc_rsp;           /**< Characteristic Discovery Response Event Parameters. */\n        ble_gattc_evt_desc_disc_rsp_t desc_disc_rsp;           /**< Descriptor Discovery Response Event Parameters. */\n        ble_gattc_evt_char_val_by_uuid_read_rsp_t\n            char_val_by_uuid_read_rsp;     /**< Characteristic Value Read by UUID Response Event Parameters. */\n        ble_gattc_evt_read_rsp_t read_rsp; /**< Read Response Event Parameters. */\n        ble_gattc_evt_char_vals_read_rsp_t char_vals_read_rsp; /**< Characteristic Values Read Response Event Parameters. */\n        ble_gattc_evt_write_rsp_t write_rsp;                   /**< Write Response Event Parameters. */\n        ble_gattc_evt_hvx_t hvx;                               /**< Handle Value Notification/Indication Event Parameters. */\n        ble_gattc_evt_exchange_mtu_rsp_t exchange_mtu_rsp;     /**< Exchange MTU Response Event Parameters. */\n        ble_gattc_evt_timeout_t timeout;                       /**< Timeout Event Parameters. */\n        ble_gattc_evt_attr_info_disc_rsp_t attr_info_disc_rsp; /**< Attribute Information Discovery Event Parameters. */\n        ble_gattc_evt_write_cmd_tx_complete_t\n            write_cmd_tx_complete; /**< Write without Response transmission complete Event Parameters. */\n    } params;                      /**< Event Parameters. @note Only valid if @ref gatt_status == @ref BLE_GATT_STATUS_SUCCESS. */\n} ble_gattc_evt_t;\n\n/**@brief UUID discovery option.\n *\n * @details Used with @ref sd_ble_opt_set to enable and disable automatic insertion of discovered 128-bit UUIDs to the\n *          Vendor Specific UUID table. Disabled by default.\n *          - When disabled, if a procedure initiated by\n *            @ref sd_ble_gattc_primary_services_discover,\n *            @ref sd_ble_gattc_relationships_discover,\n *            @ref sd_ble_gattc_characteristics_discover,\n *            @ref sd_ble_gattc_descriptors_discover\n *            finds a 128-bit UUID which was not added by @ref sd_ble_uuid_vs_add, @ref ble_uuid_t::type will be set\n *            to @ref BLE_UUID_TYPE_UNKNOWN in the corresponding event.\n *          - When enabled, all found 128-bit UUIDs will be automatically added. The application can use\n *            @ref sd_ble_uuid_encode to retrieve the 128-bit UUID from @ref ble_uuid_t received in the corresponding\n *            event. If the total number of Vendor Specific UUIDs exceeds the table capacity, @ref ble_uuid_t::type will\n *            be set to @ref BLE_UUID_TYPE_UNKNOWN in the corresponding event.\n *            See also @ref ble_common_cfg_vs_uuid_t, @ref sd_ble_uuid_vs_remove.\n *\n * @note @ref sd_ble_opt_get is not supported for this option.\n *\n * @retval ::NRF_SUCCESS Set successfully.\n *\n */\ntypedef struct {\n    uint8_t auto_add_vs_enable : 1; /**< Set to 1 to enable (or 0 to disable) automatic insertion of discovered 128-bit UUIDs. */\n} ble_gattc_opt_uuid_disc_t;\n\n/**@brief Option structure for GATTC options. */\ntypedef union {\n    ble_gattc_opt_uuid_disc_t uuid_disc; /**< Parameters for the UUID discovery option. */\n} ble_gattc_opt_t;\n\n/** @} */\n\n/** @addtogroup BLE_GATTC_FUNCTIONS Functions\n * @{ */\n\n/**@brief Initiate or continue a GATT Primary Service Discovery procedure.\n *\n * @details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle.\n *          If the last service has not been reached, this function must be called again with an updated start handle value to\n * continue the search. See also @ref ble_gattc_opt_uuid_disc_t.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] start_handle Handle to start searching from.\n * @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned.\n *\n * @retval ::NRF_SUCCESS Successfully started or resumed the Primary Service Discovery procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_PRIMARY_SERVICES_DISCOVER, uint32_t,\n       sd_ble_gattc_primary_services_discover(uint16_t conn_handle, uint16_t start_handle, ble_uuid_t const *p_srvc_uuid));\n\n/**@brief Initiate or continue a GATT Relationship Discovery procedure.\n *\n * @details This function initiates or resumes the Find Included Services sub-procedure. If the last included service has not been\n * reached, this must be called again with an updated handle range to continue the search. See also @ref\n * ble_gattc_opt_uuid_disc_t.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_REL_DISC_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_REL_DISC_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.\n *\n * @retval ::NRF_SUCCESS Successfully started or resumed the Relationship Discovery procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_RELATIONSHIPS_DISCOVER, uint32_t,\n       sd_ble_gattc_relationships_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range));\n\n/**@brief Initiate or continue a GATT Characteristic Discovery procedure.\n *\n * @details This function initiates or resumes a Characteristic discovery procedure. If the last Characteristic has not been\n * reached, this must be called again with an updated handle range to continue the discovery. See also @ref\n * ble_gattc_opt_uuid_disc_t.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_CHAR_DISC_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_CHAR_DISC_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] p_handle_range A pointer to the range of handles of the Service to perform this procedure on.\n *\n * @retval ::NRF_SUCCESS Successfully started or resumed the Characteristic Discovery procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_CHARACTERISTICS_DISCOVER, uint32_t,\n       sd_ble_gattc_characteristics_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range));\n\n/**@brief Initiate or continue a GATT Characteristic Descriptor Discovery procedure.\n *\n * @details This function initiates or resumes a Characteristic Descriptor discovery procedure. If the last Descriptor has not\n * been reached, this must be called again with an updated handle range to continue the discovery. See also @ref\n * ble_gattc_opt_uuid_disc_t.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_DESC_DISC_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_DESC_DISC_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] p_handle_range A pointer to the range of handles of the Characteristic to perform this procedure on.\n *\n * @retval ::NRF_SUCCESS Successfully started or resumed the Descriptor Discovery procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_DESCRIPTORS_DISCOVER, uint32_t,\n       sd_ble_gattc_descriptors_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range));\n\n/**@brief Initiate or continue a GATT Read using Characteristic UUID procedure.\n *\n * @details This function initiates or resumes a Read using Characteristic UUID procedure. If the last Characteristic has not been\n * reached, this must be called again with an updated handle range to continue the discovery.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_READ_UUID_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] p_uuid Pointer to a Characteristic value UUID to read.\n * @param[in] p_handle_range A pointer to the range of handles to perform this procedure on.\n *\n * @retval ::NRF_SUCCESS Successfully started or resumed the Read using Characteristic UUID procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_CHAR_VALUE_BY_UUID_READ, uint32_t,\n       sd_ble_gattc_char_value_by_uuid_read(uint16_t conn_handle, ble_uuid_t const *p_uuid,\n                                            ble_gattc_handle_range_t const *p_handle_range));\n\n/**@brief Initiate or continue a GATT Read (Long) Characteristic or Descriptor procedure.\n *\n * @details This function initiates or resumes a GATT Read (Long) Characteristic or Descriptor procedure. If the Characteristic or\n * Descriptor to be read is longer than ATT_MTU - 1, this function must be called multiple times with appropriate offset to read\n * the complete value.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_READ_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_VALUE_READ_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] handle The handle of the attribute to be read.\n * @param[in] offset Offset into the attribute value to be read.\n *\n * @retval ::NRF_SUCCESS Successfully started or resumed the Read (Long) procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_READ, uint32_t, sd_ble_gattc_read(uint16_t conn_handle, uint16_t handle, uint16_t offset));\n\n/**@brief Initiate a GATT Read Multiple Characteristic Values procedure.\n *\n * @details This function initiates a GATT Read Multiple Characteristic Values procedure.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_READ_MULT_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read.\n * @param[in] handle_count The number of handles in p_handles.\n *\n * @retval ::NRF_SUCCESS Successfully started the Read Multiple Characteristic Values procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t,\n       sd_ble_gattc_char_values_read(uint16_t conn_handle, uint16_t const *p_handles, uint16_t handle_count));\n\n/**@brief Perform a Write (Characteristic Value or Descriptor, with or without response, signed or not, long or reliable)\n * procedure.\n *\n * @details This function can perform all write procedures described in GATT.\n *\n * @note    Only one write with response procedure can be ongoing per connection at a time.\n *          If the application tries to write with response while another write with response procedure is ongoing,\n *          the function call will return @ref NRF_ERROR_BUSY.\n *          A @ref BLE_GATTC_EVT_WRITE_RSP event will be issued as soon as the write response arrives from the peer.\n *\n * @note    The number of Write without Response that can be queued is configured by @ref\n * ble_gattc_conn_cfg_t::write_cmd_tx_queue_size When the queue is full, the function call will return @ref NRF_ERROR_RESOURCES.\n *          A @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event will be issued as soon as the transmission of the write without\n * response is complete.\n *\n * @note    The application can keep track of the available queue element count for writes without responses by following the\n * procedure below:\n *          - Store initial queue element count in a variable.\n *          - Decrement the variable, which stores the currently available queue element count, by one when a call to this\n * function returns @ref NRF_SUCCESS.\n *          - Increment the variable, which stores the current available queue element count, by the count variable in @ref\n * BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE, Write without response transmission complete.}\n * @event{@ref BLE_GATTC_EVT_WRITE_RSP, Write response received from the peer.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_VALUE_WRITE_WITHOUT_RESP_MSC}\n * @mmsc{@ref BLE_GATTC_VALUE_WRITE_MSC}\n * @mmsc{@ref BLE_GATTC_VALUE_LONG_WRITE_MSC}\n * @mmsc{@ref BLE_GATTC_VALUE_RELIABLE_WRITE_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] p_write_params A pointer to a write parameters structure.\n *\n * @retval ::NRF_SUCCESS Successfully started the Write procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.\n * @retval ::NRF_ERROR_BUSY For write with response, procedure already in progress. Wait for a @ref BLE_GATTC_EVT_WRITE_RSP event\n * and retry.\n * @retval ::NRF_ERROR_RESOURCES Too many writes without responses queued.\n *                               Wait for a @ref BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event and retry.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_WRITE, uint32_t, sd_ble_gattc_write(uint16_t conn_handle, ble_gattc_write_params_t const *p_write_params));\n\n/**@brief Send a Handle Value Confirmation to the GATT Server.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_HVI_MSC}\n * @endmscs\n *\n * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.\n * @param[in] handle The handle of the attribute in the indication.\n *\n * @retval ::NRF_SUCCESS Successfully queued the Handle Value Confirmation for transmission.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no Indication pending to be confirmed.\n * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_HV_CONFIRM, uint32_t, sd_ble_gattc_hv_confirm(uint16_t conn_handle, uint16_t handle));\n\n/**@brief Discovers information about a range of attributes on a GATT server.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_ATTR_INFO_DISC_RSP, Generated when information about a range of attributes has been received.}\n * @endevents\n *\n * @param[in] conn_handle    The connection handle identifying the connection to perform this procedure on.\n * @param[in] p_handle_range The range of handles to request information about.\n *\n * @retval ::NRF_SUCCESS Successfully started an attribute information discovery procedure.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid connection state\n * @retval ::NRF_ERROR_INVALID_ADDR  Invalid pointer supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_ATTR_INFO_DISCOVER, uint32_t,\n       sd_ble_gattc_attr_info_discover(uint16_t conn_handle, ble_gattc_handle_range_t const *p_handle_range));\n\n/**@brief Start an ATT_MTU exchange by sending an Exchange MTU Request to the server.\n *\n * @details The SoftDevice sets ATT_MTU to the minimum of:\n *          - The Client RX MTU value, and\n *          - The Server RX MTU value from @ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP.\n *\n *          However, the SoftDevice never sets ATT_MTU lower than @ref BLE_GATT_ATT_MTU_DEFAULT.\n *\n * @events\n * @event{@ref BLE_GATTC_EVT_EXCHANGE_MTU_RSP}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTC_MTU_EXCHANGE}\n * @endmscs\n *\n * @param[in] conn_handle    The connection handle identifying the connection to perform this procedure on.\n * @param[in] client_rx_mtu  Client RX MTU size.\n *                           - The minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT.\n *                           - The maximum value is @ref ble_gatt_conn_cfg_t::att_mtu in the connection configuration\n                               used for this connection.\n *                           - The value must be equal to Server RX MTU size given in @ref sd_ble_gatts_exchange_mtu_reply\n *                             if an ATT_MTU exchange has already been performed in the other direction.\n *\n * @retval ::NRF_SUCCESS Successfully sent request to the server.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid connection state or an ATT_MTU exchange was already requested once.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid Client RX MTU size supplied.\n * @retval ::NRF_ERROR_BUSY Client procedure already in progress.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTC_EXCHANGE_MTU_REQUEST, uint32_t,\n       sd_ble_gattc_exchange_mtu_request(uint16_t conn_handle, uint16_t client_rx_mtu));\n\n/**@brief Iterate through Handle-Value(s) list in @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event.\n *\n * @param[in] p_gattc_evt  Pointer to event buffer containing @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event.\n *                         @note If the buffer contains different event, behavior is undefined.\n * @param[in,out] p_iter   Iterator, points to @ref ble_gattc_handle_value_t structure that will be filled in with\n *                         the next Handle-Value pair in each iteration. If the function returns other than\n *                         @ref NRF_SUCCESS, it will not be changed.\n *                         - To start iteration, initialize the structure to zero.\n *                         - To continue, pass the value from previous iteration.\n *\n * \\code\n * ble_gattc_handle_value_t iter;\n * memset(&iter, 0, sizeof(ble_gattc_handle_value_t));\n * while (sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter(&ble_evt.evt.gattc_evt, &iter) == NRF_SUCCESS)\n * {\n *   app_handle = iter.handle;\n *   memcpy(app_value, iter.p_value, ble_evt.evt.gattc_evt.params.char_val_by_uuid_read_rsp.value_len);\n * }\n * \\endcode\n *\n * @retval ::NRF_SUCCESS Successfully retrieved the next Handle-Value pair.\n * @retval ::NRF_ERROR_NOT_FOUND No more Handle-Value pairs available in the list.\n */\n__STATIC_INLINE uint32_t sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter(ble_gattc_evt_t *p_gattc_evt,\n                                                                         ble_gattc_handle_value_t *p_iter);\n\n/** @} */\n\n#ifndef SUPPRESS_INLINE_IMPLEMENTATION\n\n__STATIC_INLINE uint32_t sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter(ble_gattc_evt_t *p_gattc_evt,\n                                                                         ble_gattc_handle_value_t *p_iter)\n{\n    uint32_t value_len = p_gattc_evt->params.char_val_by_uuid_read_rsp.value_len;\n    uint8_t *p_first = p_gattc_evt->params.char_val_by_uuid_read_rsp.handle_value;\n    uint8_t *p_next = p_iter->p_value ? p_iter->p_value + value_len : p_first;\n\n    if ((p_next - p_first) / (sizeof(uint16_t) + value_len) < p_gattc_evt->params.char_val_by_uuid_read_rsp.count) {\n        p_iter->handle = (uint16_t)p_next[1] << 8 | p_next[0];\n        p_iter->p_value = p_next + sizeof(uint16_t);\n        return NRF_SUCCESS;\n    } else {\n        return NRF_ERROR_NOT_FOUND;\n    }\n}\n\n#endif /* SUPPRESS_INLINE_IMPLEMENTATION */\n\n#ifdef __cplusplus\n}\n#endif\n#endif /* BLE_GATTC_H__ */\n\n/**\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_gatts.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_GATTS Generic Attribute Profile (GATT) Server\n  @{\n  @brief  Definitions and prototypes for the GATTS interface.\n */\n\n#ifndef BLE_GATTS_H__\n#define BLE_GATTS_H__\n\n#include \"ble_err.h\"\n#include \"ble_gap.h\"\n#include \"ble_gatt.h\"\n#include \"ble_hci.h\"\n#include \"ble_ranges.h\"\n#include \"ble_types.h\"\n#include \"nrf_error.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup BLE_GATTS_ENUMERATIONS Enumerations\n * @{ */\n\n/**\n * @brief GATTS API SVC numbers.\n */\nenum BLE_GATTS_SVCS {\n    SD_BLE_GATTS_SERVICE_ADD = BLE_GATTS_SVC_BASE, /**< Add a service. */\n    SD_BLE_GATTS_INCLUDE_ADD,                      /**< Add an included service. */\n    SD_BLE_GATTS_CHARACTERISTIC_ADD,               /**< Add a characteristic. */\n    SD_BLE_GATTS_DESCRIPTOR_ADD,                   /**< Add a generic attribute. */\n    SD_BLE_GATTS_VALUE_SET,                        /**< Set an attribute value. */\n    SD_BLE_GATTS_VALUE_GET,                        /**< Get an attribute value. */\n    SD_BLE_GATTS_HVX,                              /**< Handle Value Notification or Indication. */\n    SD_BLE_GATTS_SERVICE_CHANGED,                  /**< Perform a Service Changed Indication to one or more peers. */\n    SD_BLE_GATTS_RW_AUTHORIZE_REPLY,      /**< Reply to an authorization request for a read or write operation on one or more\n                                             attributes. */\n    SD_BLE_GATTS_SYS_ATTR_SET,            /**< Set the persistent system attributes for a connection. */\n    SD_BLE_GATTS_SYS_ATTR_GET,            /**< Retrieve the persistent system attributes. */\n    SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, /**< Retrieve the first valid user handle. */\n    SD_BLE_GATTS_ATTR_GET,                /**< Retrieve the UUID and/or metadata of an attribute. */\n    SD_BLE_GATTS_EXCHANGE_MTU_REPLY       /**< Reply to Exchange MTU Request. */\n};\n\n/**\n * @brief GATT Server Event IDs.\n */\nenum BLE_GATTS_EVTS {\n    BLE_GATTS_EVT_WRITE = BLE_GATTS_EVT_BASE, /**< Write operation performed.                                           \\n See\n                                                 @ref ble_gatts_evt_write_t.                 */\n    BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST, /**< Read/Write Authorization request.                                    \\n Reply with\n                                           @ref sd_ble_gatts_rw_authorize_reply. \\n See @ref ble_gatts_evt_rw_authorize_request_t.\n                                         */\n    BLE_GATTS_EVT_SYS_ATTR_MISSING, /**< A persistent system attribute access is pending.                     \\n Respond with @ref\n                                       sd_ble_gatts_sys_attr_set.     \\n See @ref ble_gatts_evt_sys_attr_missing_t.     */\n    BLE_GATTS_EVT_HVC, /**< Handle Value Confirmation.                                           \\n See @ref ble_gatts_evt_hvc_t.\n                        */\n    BLE_GATTS_EVT_SC_CONFIRM, /**< Service Changed Confirmation.                                        \\n No additional event\n                                 structure applies.          */\n    BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST, /**< Exchange MTU Request.                                                \\n Reply with\n                                           @ref sd_ble_gatts_exchange_mtu_reply. \\n See @ref ble_gatts_evt_exchange_mtu_request_t.\n                                         */\n    BLE_GATTS_EVT_TIMEOUT,              /**< Peer failed to respond to an ATT request in time.                    \\n See @ref\n                                           ble_gatts_evt_timeout_t.               */\n    BLE_GATTS_EVT_HVN_TX_COMPLETE       /**< Handle Value Notification transmission complete.                     \\n See @ref\n                                           ble_gatts_evt_hvn_tx_complete_t.       */\n};\n\n/**@brief GATTS Configuration IDs.\n *\n * IDs that uniquely identify a GATTS configuration.\n */\nenum BLE_GATTS_CFGS {\n    BLE_GATTS_CFG_SERVICE_CHANGED = BLE_GATTS_CFG_BASE, /**< Service changed configuration. */\n    BLE_GATTS_CFG_ATTR_TAB_SIZE,                        /**< Attribute table size configuration. */\n    BLE_GATTS_CFG_SERVICE_CHANGED_CCCD_PERM,            /**< Service changed CCCD permission configuration. */\n};\n\n/** @} */\n\n/** @addtogroup BLE_GATTS_DEFINES Defines\n * @{ */\n\n/** @defgroup BLE_ERRORS_GATTS SVC return values specific to GATTS\n * @{ */\n#define BLE_ERROR_GATTS_INVALID_ATTR_TYPE (NRF_GATTS_ERR_BASE + 0x000) /**< Invalid attribute type. */\n#define BLE_ERROR_GATTS_SYS_ATTR_MISSING (NRF_GATTS_ERR_BASE + 0x001)  /**< System Attributes missing. */\n/** @} */\n\n/** @defgroup BLE_GATTS_ATTR_LENS_MAX Maximum attribute lengths\n * @{ */\n#define BLE_GATTS_FIX_ATTR_LEN_MAX (510) /**< Maximum length for fixed length Attribute Values. */\n#define BLE_GATTS_VAR_ATTR_LEN_MAX (512) /**< Maximum length for variable length Attribute Values. */\n/** @} */\n\n/** @defgroup BLE_GATTS_SRVC_TYPES GATT Server Service Types\n * @{ */\n#define BLE_GATTS_SRVC_TYPE_INVALID 0x00   /**< Invalid Service Type. */\n#define BLE_GATTS_SRVC_TYPE_PRIMARY 0x01   /**< Primary Service. */\n#define BLE_GATTS_SRVC_TYPE_SECONDARY 0x02 /**< Secondary Type. */\n/** @} */\n\n/** @defgroup BLE_GATTS_ATTR_TYPES GATT Server Attribute Types\n * @{ */\n#define BLE_GATTS_ATTR_TYPE_INVALID 0x00        /**< Invalid Attribute Type. */\n#define BLE_GATTS_ATTR_TYPE_PRIM_SRVC_DECL 0x01 /**< Primary Service Declaration. */\n#define BLE_GATTS_ATTR_TYPE_SEC_SRVC_DECL 0x02  /**< Secondary Service Declaration. */\n#define BLE_GATTS_ATTR_TYPE_INC_DECL 0x03       /**< Include Declaration. */\n#define BLE_GATTS_ATTR_TYPE_CHAR_DECL 0x04      /**< Characteristic Declaration. */\n#define BLE_GATTS_ATTR_TYPE_CHAR_VAL 0x05       /**< Characteristic Value. */\n#define BLE_GATTS_ATTR_TYPE_DESC 0x06           /**< Descriptor. */\n#define BLE_GATTS_ATTR_TYPE_OTHER 0x07          /**< Other, non-GATT specific type. */\n/** @} */\n\n/** @defgroup BLE_GATTS_OPS GATT Server Operations\n * @{ */\n#define BLE_GATTS_OP_INVALID 0x00               /**< Invalid Operation. */\n#define BLE_GATTS_OP_WRITE_REQ 0x01             /**< Write Request. */\n#define BLE_GATTS_OP_WRITE_CMD 0x02             /**< Write Command. */\n#define BLE_GATTS_OP_SIGN_WRITE_CMD 0x03        /**< Signed Write Command. */\n#define BLE_GATTS_OP_PREP_WRITE_REQ 0x04        /**< Prepare Write Request. */\n#define BLE_GATTS_OP_EXEC_WRITE_REQ_CANCEL 0x05 /**< Execute Write Request: Cancel all prepared writes. */\n#define BLE_GATTS_OP_EXEC_WRITE_REQ_NOW 0x06    /**< Execute Write Request: Immediately execute all prepared writes. */\n/** @} */\n\n/** @defgroup BLE_GATTS_VLOCS GATT Value Locations\n * @{ */\n#define BLE_GATTS_VLOC_INVALID 0x00 /**< Invalid Location. */\n#define BLE_GATTS_VLOC_STACK 0x01   /**< Attribute Value is located in stack memory, no user memory is required. */\n#define BLE_GATTS_VLOC_USER                                                                                                      \\\n    0x02 /**< Attribute Value is located in user memory. This requires the user to maintain a valid buffer through the lifetime  \\\n            of the attribute, since the stack will read and write directly to the memory using the pointer provided in the APIs. \\\n            There are no alignment requirements for the buffer. */\n/** @} */\n\n/** @defgroup BLE_GATTS_AUTHORIZE_TYPES GATT Server Authorization Types\n * @{ */\n#define BLE_GATTS_AUTHORIZE_TYPE_INVALID 0x00 /**< Invalid Type. */\n#define BLE_GATTS_AUTHORIZE_TYPE_READ 0x01    /**< Authorize a Read Operation. */\n#define BLE_GATTS_AUTHORIZE_TYPE_WRITE 0x02   /**< Authorize a Write Request Operation. */\n/** @} */\n\n/** @defgroup BLE_GATTS_SYS_ATTR_FLAGS System Attribute Flags\n * @{ */\n#define BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS (1 << 0) /**< Restrict system attributes to system services only. */\n#define BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS (1 << 1) /**< Restrict system attributes to user services only. */\n/** @} */\n\n/** @defgroup BLE_GATTS_SERVICE_CHANGED Service Changed Inclusion Values\n * @{\n */\n#define BLE_GATTS_SERVICE_CHANGED_DEFAULT                                                                                        \\\n    (1) /**< Default is to include the Service Changed characteristic in the Attribute Table. */\n/** @} */\n\n/** @defgroup BLE_GATTS_ATTR_TAB_SIZE Attribute Table size\n * @{\n */\n#define BLE_GATTS_ATTR_TAB_SIZE_MIN (248)      /**< Minimum Attribute Table size */\n#define BLE_GATTS_ATTR_TAB_SIZE_DEFAULT (1408) /**< Default Attribute Table size. */\n/** @} */\n\n/** @defgroup BLE_GATTS_DEFAULTS GATT Server defaults\n * @{\n */\n#define BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT                                                                                      \\\n    1 /**< Default number of Handle Value Notifications that can be queued for transmission. */\n/** @} */\n\n/** @} */\n\n/** @addtogroup BLE_GATTS_STRUCTURES Structures\n * @{ */\n\n/**\n * @brief BLE GATTS connection configuration parameters, set with @ref sd_ble_cfg_set.\n */\ntypedef struct {\n    uint8_t hvn_tx_queue_size; /**< Minimum guaranteed number of Handle Value Notifications that can be queued for transmission.\n                                     The default value is @ref BLE_GATTS_HVN_TX_QUEUE_SIZE_DEFAULT */\n} ble_gatts_conn_cfg_t;\n\n/**@brief Attribute metadata. */\ntypedef struct {\n    ble_gap_conn_sec_mode_t read_perm;  /**< Read permissions. */\n    ble_gap_conn_sec_mode_t write_perm; /**< Write permissions. */\n    uint8_t vlen : 1;                   /**< Variable length attribute. */\n    uint8_t vloc : 2;                   /**< Value location, see @ref BLE_GATTS_VLOCS.*/\n    uint8_t rd_auth : 1; /**< Read authorization and value will be requested from the application on every read operation. */\n    uint8_t wr_auth : 1; /**< Write authorization will be requested from the application on every Write Request operation (but not\n                            Write Command). */\n} ble_gatts_attr_md_t;\n\n/**@brief GATT Attribute. */\ntypedef struct {\n    ble_uuid_t const *p_uuid;             /**< Pointer to the attribute UUID. */\n    ble_gatts_attr_md_t const *p_attr_md; /**< Pointer to the attribute metadata structure. */\n    uint16_t init_len;                    /**< Initial attribute value length in bytes. */\n    uint16_t init_offs; /**< Initial attribute value offset in bytes. If different from zero, the first init_offs bytes of the\n                           attribute value will be left uninitialized. */\n    uint16_t max_len;   /**< Maximum attribute value length in bytes, see @ref BLE_GATTS_ATTR_LENS_MAX for maximum values. */\n    uint8_t *p_value;   /**< Pointer to the attribute data. Please note that if the @ref BLE_GATTS_VLOC_USER value location is\n                           selected in the attribute metadata, this will have to point to a buffer   that remains valid through the\n                           lifetime of the attribute. This excludes usage of automatic variables that may go out of scope or any\n                           other temporary location.   The stack may access that memory directly without the application's\n                           knowledge.   For writable characteristics, this value must not be a location in flash memory.*/\n} ble_gatts_attr_t;\n\n/**@brief GATT Attribute Value. */\ntypedef struct {\n    uint16_t len;     /**< Length in bytes to be written or read. Length in bytes written or read after successful return.*/\n    uint16_t offset;  /**< Attribute value offset. */\n    uint8_t *p_value; /**< Pointer to where value is stored or will be stored.\n                           If value is stored in user memory, only the attribute length is updated when p_value == NULL.\n                           Set to NULL when reading to obtain the complete length of the attribute value */\n} ble_gatts_value_t;\n\n/**@brief GATT Characteristic Presentation Format. */\ntypedef struct {\n    uint8_t format;     /**< Format of the value, see @ref BLE_GATT_CPF_FORMATS. */\n    int8_t exponent;    /**< Exponent for integer data types. */\n    uint16_t unit;      /**< Unit from Bluetooth Assigned Numbers. */\n    uint8_t name_space; /**< Namespace from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */\n    uint16_t desc;      /**< Namespace description from Bluetooth Assigned Numbers, see @ref BLE_GATT_CPF_NAMESPACES. */\n} ble_gatts_char_pf_t;\n\n/**@brief GATT Characteristic metadata. */\ntypedef struct {\n    ble_gatt_char_props_t char_props;         /**< Characteristic Properties. */\n    ble_gatt_char_ext_props_t char_ext_props; /**< Characteristic Extended Properties. */\n    uint8_t const *\n        p_char_user_desc; /**< Pointer to a UTF-8 encoded string (non-NULL terminated), NULL if the descriptor is not required. */\n    uint16_t char_user_desc_max_size; /**< The maximum size in bytes of the user description descriptor. */\n    uint16_t char_user_desc_size; /**< The size of the user description, must be smaller or equal to char_user_desc_max_size. */\n    ble_gatts_char_pf_t const\n        *p_char_pf; /**< Pointer to a presentation format structure or NULL if the CPF descriptor is not required. */\n    ble_gatts_attr_md_t const\n        *p_user_desc_md; /**< Attribute metadata for the User Description descriptor, or NULL for default values. */\n    ble_gatts_attr_md_t const\n        *p_cccd_md; /**< Attribute metadata for the Client Characteristic Configuration Descriptor, or NULL for default values. */\n    ble_gatts_attr_md_t const\n        *p_sccd_md; /**< Attribute metadata for the Server Characteristic Configuration Descriptor, or NULL for default values. */\n} ble_gatts_char_md_t;\n\n/**@brief GATT Characteristic Definition Handles. */\ntypedef struct {\n    uint16_t value_handle;     /**< Handle to the characteristic value. */\n    uint16_t user_desc_handle; /**< Handle to the User Description descriptor, or @ref BLE_GATT_HANDLE_INVALID if not present. */\n    uint16_t cccd_handle; /**< Handle to the Client Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if\n                             not present. */\n    uint16_t sccd_handle; /**< Handle to the Server Characteristic Configuration Descriptor, or @ref BLE_GATT_HANDLE_INVALID if\n                             not present. */\n} ble_gatts_char_handles_t;\n\n/**@brief GATT HVx parameters. */\ntypedef struct {\n    uint16_t handle;       /**< Characteristic Value Handle. */\n    uint8_t type;          /**< Indication or Notification, see @ref BLE_GATT_HVX_TYPES. */\n    uint16_t offset;       /**< Offset within the attribute value. */\n    uint16_t *p_len;       /**< Length in bytes to be written, length in bytes written after return. */\n    uint8_t const *p_data; /**< Actual data content, use NULL to use the current attribute value. */\n} ble_gatts_hvx_params_t;\n\n/**@brief GATT Authorization parameters. */\ntypedef struct {\n    uint16_t gatt_status;  /**< GATT status code for the operation, see @ref BLE_GATT_STATUS_CODES. */\n    uint8_t update : 1;    /**< If set, data supplied in p_data will be used to update the attribute value.\n                                Please note that for @ref BLE_GATTS_AUTHORIZE_TYPE_WRITE operations this bit must always be set,\n                                as the data to be written needs to be stored and later provided by the application. */\n    uint16_t offset;       /**< Offset of the attribute value being updated. */\n    uint16_t len;          /**< Length in bytes of the value in p_data pointer, see @ref BLE_GATTS_ATTR_LENS_MAX. */\n    uint8_t const *p_data; /**< Pointer to new value used to update the attribute value. */\n} ble_gatts_authorize_params_t;\n\n/**@brief GATT Read or Write Authorize Reply parameters. */\ntypedef struct {\n    uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */\n    union {\n        ble_gatts_authorize_params_t read;  /**< Read authorization parameters. */\n        ble_gatts_authorize_params_t write; /**< Write authorization parameters. */\n    } params;                               /**< Reply Parameters. */\n} ble_gatts_rw_authorize_reply_params_t;\n\n/**@brief Service Changed Inclusion configuration parameters, set with @ref sd_ble_cfg_set. */\ntypedef struct {\n    uint8_t service_changed : 1; /**< If 1, include the Service Changed characteristic in the Attribute Table. Default is @ref\n                                    BLE_GATTS_SERVICE_CHANGED_DEFAULT. */\n} ble_gatts_cfg_service_changed_t;\n\n/**@brief Service Changed CCCD permission configuration parameters, set with @ref sd_ble_cfg_set.\n *\n * @note @ref ble_gatts_attr_md_t::vlen is ignored and should be set to 0.\n *\n * @retval ::NRF_ERROR_INVALID_PARAM One or more of the following is true:\n *                                   - @ref ble_gatts_attr_md_t::write_perm is out of range.\n *                                   - @ref ble_gatts_attr_md_t::write_perm is @ref BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS, that is\n * not allowed by the Bluetooth Specification.\n *                                   - wrong @ref ble_gatts_attr_md_t::read_perm, only @ref BLE_GAP_CONN_SEC_MODE_SET_OPEN is\n * allowed by the Bluetooth Specification.\n *                                   - wrong @ref ble_gatts_attr_md_t::vloc, only @ref BLE_GATTS_VLOC_STACK is allowed.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Security Mode 2 not supported\n */\ntypedef struct {\n    ble_gatts_attr_md_t\n        perm; /**< Permission for Service Changed CCCD. Default is @ref BLE_GAP_CONN_SEC_MODE_SET_OPEN, no authorization. */\n} ble_gatts_cfg_service_changed_cccd_perm_t;\n\n/**@brief Attribute table size configuration parameters, set with @ref sd_ble_cfg_set.\n *\n * @retval ::NRF_ERROR_INVALID_LENGTH One or more of the following is true:\n *                                    - The specified Attribute Table size is too small.\n *                                      The minimum acceptable size is defined by @ref BLE_GATTS_ATTR_TAB_SIZE_MIN.\n *                                    - The specified Attribute Table size is not a multiple of 4.\n */\ntypedef struct {\n    uint32_t attr_tab_size; /**< Attribute table size. Default is @ref BLE_GATTS_ATTR_TAB_SIZE_DEFAULT, minimum is @ref\n                               BLE_GATTS_ATTR_TAB_SIZE_MIN. */\n} ble_gatts_cfg_attr_tab_size_t;\n\n/**@brief Config structure for GATTS configurations. */\ntypedef union {\n    ble_gatts_cfg_service_changed_t\n        service_changed; /**< Include service changed characteristic, cfg_id is @ref BLE_GATTS_CFG_SERVICE_CHANGED. */\n    ble_gatts_cfg_service_changed_cccd_perm_t service_changed_cccd_perm; /**< Service changed CCCD permission, cfg_id is @ref\n                                                                            BLE_GATTS_CFG_SERVICE_CHANGED_CCCD_PERM. */\n    ble_gatts_cfg_attr_tab_size_t attr_tab_size; /**< Attribute table size, cfg_id is @ref BLE_GATTS_CFG_ATTR_TAB_SIZE. */\n} ble_gatts_cfg_t;\n\n/**@brief Event structure for @ref BLE_GATTS_EVT_WRITE. */\ntypedef struct {\n    uint16_t handle;       /**< Attribute Handle. */\n    ble_uuid_t uuid;       /**< Attribute UUID. */\n    uint8_t op;            /**< Type of write operation, see @ref BLE_GATTS_OPS. */\n    uint8_t auth_required; /**< Writing operation deferred due to authorization requirement. Application may use @ref\n                              sd_ble_gatts_value_set to finalize the writing operation. */\n    uint16_t offset;       /**< Offset for the write operation. */\n    uint16_t len;          /**< Length of the received data. */\n    uint8_t data[1]; /**< Received data. @note This is a variable length array. The size of 1 indicated is only a placeholder for\n                        compilation. See @ref sd_ble_evt_get for more information on how to use event structures with variable\n                        length array members. */\n} ble_gatts_evt_write_t;\n\n/**@brief Event substructure for authorized read requests, see @ref ble_gatts_evt_rw_authorize_request_t. */\ntypedef struct {\n    uint16_t handle; /**< Attribute Handle. */\n    ble_uuid_t uuid; /**< Attribute UUID. */\n    uint16_t offset; /**< Offset for the read operation. */\n} ble_gatts_evt_read_t;\n\n/**@brief Event structure for @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST. */\ntypedef struct {\n    uint8_t type; /**< Type of authorize operation, see @ref BLE_GATTS_AUTHORIZE_TYPES. */\n    union {\n        ble_gatts_evt_read_t read;   /**< Attribute Read Parameters. */\n        ble_gatts_evt_write_t write; /**< Attribute Write Parameters. */\n    } request;                       /**< Request Parameters. */\n} ble_gatts_evt_rw_authorize_request_t;\n\n/**@brief Event structure for @ref BLE_GATTS_EVT_SYS_ATTR_MISSING. */\ntypedef struct {\n    uint8_t hint; /**< Hint (currently unused). */\n} ble_gatts_evt_sys_attr_missing_t;\n\n/**@brief Event structure for @ref BLE_GATTS_EVT_HVC. */\ntypedef struct {\n    uint16_t handle; /**< Attribute Handle. */\n} ble_gatts_evt_hvc_t;\n\n/**@brief Event structure for @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST. */\ntypedef struct {\n    uint16_t client_rx_mtu; /**< Client RX MTU size. */\n} ble_gatts_evt_exchange_mtu_request_t;\n\n/**@brief Event structure for @ref BLE_GATTS_EVT_TIMEOUT. */\ntypedef struct {\n    uint8_t src; /**< Timeout source, see @ref BLE_GATT_TIMEOUT_SOURCES. */\n} ble_gatts_evt_timeout_t;\n\n/**@brief Event structure for @ref BLE_GATTS_EVT_HVN_TX_COMPLETE. */\ntypedef struct {\n    uint8_t count; /**< Number of notification transmissions completed. */\n} ble_gatts_evt_hvn_tx_complete_t;\n\n/**@brief GATTS event structure. */\ntypedef struct {\n    uint16_t conn_handle; /**< Connection Handle on which the event occurred. */\n    union {\n        ble_gatts_evt_write_t write;                               /**< Write Event Parameters. */\n        ble_gatts_evt_rw_authorize_request_t authorize_request;    /**< Read or Write Authorize Request Parameters. */\n        ble_gatts_evt_sys_attr_missing_t sys_attr_missing;         /**< System attributes missing. */\n        ble_gatts_evt_hvc_t hvc;                                   /**< Handle Value Confirmation Event Parameters. */\n        ble_gatts_evt_exchange_mtu_request_t exchange_mtu_request; /**< Exchange MTU Request Event Parameters. */\n        ble_gatts_evt_timeout_t timeout;                           /**< Timeout Event. */\n        ble_gatts_evt_hvn_tx_complete_t hvn_tx_complete; /**< Handle Value Notification transmission complete Event Parameters. */\n    } params;                                            /**< Event Parameters. */\n} ble_gatts_evt_t;\n\n/** @} */\n\n/** @addtogroup BLE_GATTS_FUNCTIONS Functions\n * @{ */\n\n/**@brief Add a service declaration to the Attribute Table.\n *\n * @note Secondary Services are only relevant in the context of the entity that references them, it is therefore forbidden to\n *       add a secondary service declaration that is not referenced by another service later in the Attribute Table.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}\n * @endmscs\n *\n * @param[in] type      Toggles between primary and secondary services, see @ref BLE_GATTS_SRVC_TYPES.\n * @param[in] p_uuid    Pointer to service UUID.\n * @param[out] p_handle Pointer to a 16-bit word where the assigned handle will be stored.\n *\n * @retval ::NRF_SUCCESS Successfully added a service declaration.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, Vendor Specific UUIDs need to be present in the table.\n * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack.\n * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation.\n */\nSVCALL(SD_BLE_GATTS_SERVICE_ADD, uint32_t, sd_ble_gatts_service_add(uint8_t type, ble_uuid_t const *p_uuid, uint16_t *p_handle));\n\n/**@brief Add an include declaration to the Attribute Table.\n *\n * @note It is currently only possible to add an include declaration to the last added service (i.e. only sequential population is\n * supported at this time).\n *\n * @note The included service must already be present in the Attribute Table prior to this call.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}\n * @endmscs\n *\n * @param[in] service_handle    Handle of the service where the included service is to be placed, if @ref BLE_GATT_HANDLE_INVALID\n * is used, it will be placed sequentially.\n * @param[in] inc_srvc_handle   Handle of the included service.\n * @param[out] p_include_handle Pointer to a 16-bit word where the assigned handle will be stored.\n *\n * @retval ::NRF_SUCCESS Successfully added an include declaration.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, handle values need to match previously added services.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Feature is not supported, service_handle must be that of the last added service.\n * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, self inclusions are not allowed.\n * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation.\n * @retval ::NRF_ERROR_NOT_FOUND Attribute not found.\n */\nSVCALL(SD_BLE_GATTS_INCLUDE_ADD, uint32_t,\n       sd_ble_gatts_include_add(uint16_t service_handle, uint16_t inc_srvc_handle, uint16_t *p_include_handle));\n\n/**@brief Add a characteristic declaration, a characteristic value declaration and optional characteristic descriptor declarations\n * to the Attribute Table.\n *\n * @note It is currently only possible to add a characteristic to the last added service (i.e. only sequential population is\n * supported at this time).\n *\n * @note Several restrictions apply to the parameters, such as matching permissions between the user description descriptor and\n * the writable auxiliaries bits, readable (no security) and writable (selectable) CCCDs and SCCDs and valid presentation format\n * values.\n *\n * @note If no metadata is provided for the optional descriptors, their permissions will be derived from the characteristic\n * permissions.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}\n * @endmscs\n *\n * @param[in] service_handle    Handle of the service where the characteristic is to be placed, if @ref BLE_GATT_HANDLE_INVALID is\n * used, it will be placed sequentially.\n * @param[in] p_char_md         Characteristic metadata.\n * @param[in] p_attr_char_value Pointer to the attribute structure corresponding to the characteristic value.\n * @param[out] p_handles        Pointer to the structure where the assigned handles will be stored.\n *\n * @retval ::NRF_SUCCESS Successfully added a characteristic.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, service handle, Vendor Specific UUIDs, lengths, and\n * permissions need to adhere to the constraints.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a service context is required.\n * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack.\n * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation.\n * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX.\n */\nSVCALL(SD_BLE_GATTS_CHARACTERISTIC_ADD, uint32_t,\n       sd_ble_gatts_characteristic_add(uint16_t service_handle, ble_gatts_char_md_t const *p_char_md,\n                                       ble_gatts_attr_t const *p_attr_char_value, ble_gatts_char_handles_t *p_handles));\n\n/**@brief Add a descriptor to the Attribute Table.\n *\n * @note It is currently only possible to add a descriptor to the last added characteristic (i.e. only sequential population is\n * supported at this time).\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_ATT_TABLE_POP_MSC}\n * @endmscs\n *\n * @param[in] char_handle   Handle of the characteristic where the descriptor is to be placed, if @ref BLE_GATT_HANDLE_INVALID is\n * used, it will be placed sequentially.\n * @param[in] p_attr        Pointer to the attribute structure.\n * @param[out] p_handle     Pointer to a 16-bit word where the assigned handle will be stored.\n *\n * @retval ::NRF_SUCCESS Successfully added a descriptor.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied, characteristic handle, Vendor Specific UUIDs, lengths, and\n * permissions need to adhere to the constraints.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid state to perform operation, a characteristic context is required.\n * @retval ::NRF_ERROR_FORBIDDEN Forbidden value supplied, certain UUIDs are reserved for the stack.\n * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation.\n * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX.\n */\nSVCALL(SD_BLE_GATTS_DESCRIPTOR_ADD, uint32_t,\n       sd_ble_gatts_descriptor_add(uint16_t char_handle, ble_gatts_attr_t const *p_attr, uint16_t *p_handle));\n\n/**@brief Set the value of a given attribute.\n *\n * @note Values other than system attributes can be set at any time, regardless of whether any active connections exist.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC}\n * @endmscs\n *\n * @param[in] conn_handle  Connection handle. Ignored if the value does not belong to a system attribute.\n * @param[in] handle       Attribute handle.\n * @param[in,out] p_value  Attribute value information.\n *\n * @retval ::NRF_SUCCESS Successfully set the value of the attribute.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_NOT_FOUND Attribute not found.\n * @retval ::NRF_ERROR_FORBIDDEN Forbidden handle supplied, certain attributes are not modifiable by the application.\n * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied, attribute lengths are restricted by @ref BLE_GATTS_ATTR_LENS_MAX.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute.\n */\nSVCALL(SD_BLE_GATTS_VALUE_SET, uint32_t,\n       sd_ble_gatts_value_set(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value));\n\n/**@brief Get the value of a given attribute.\n *\n * @note                 If the attribute value is longer than the size of the supplied buffer,\n *                       @ref ble_gatts_value_t::len will return the total attribute value length (excluding offset),\n *                       and not the number of bytes actually returned in @ref ble_gatts_value_t::p_value.\n *                       The application may use this information to allocate a suitable buffer size.\n *\n * @note                 When retrieving system attribute values with this function, the connection handle\n *                       may refer to an already disconnected connection. Refer to the documentation of\n *                       @ref sd_ble_gatts_sys_attr_get for further information.\n *\n * @param[in] conn_handle  Connection handle. Ignored if the value does not belong to a system attribute.\n * @param[in] handle       Attribute handle.\n * @param[in,out] p_value  Attribute value information.\n *\n * @retval ::NRF_SUCCESS Successfully retrieved the value of the attribute.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_NOT_FOUND Attribute not found.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid attribute offset supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied on a system attribute.\n * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known\n * value.\n */\nSVCALL(SD_BLE_GATTS_VALUE_GET, uint32_t,\n       sd_ble_gatts_value_get(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value));\n\n/**@brief Notify or Indicate an attribute value.\n *\n * @details This function checks for the relevant Client Characteristic Configuration descriptor value to verify that the relevant\n * operation (notification or indication) has been enabled by the client. It is also able to update the attribute value before\n * issuing the PDU, so that the application can atomically perform a value update and a server initiated transaction with a single\n * API call.\n *\n * @note    The local attribute value may be updated even if an outgoing packet is not sent to the peer due to an error during\n * execution. The Attribute Table has been updated if one of the following error codes is returned: @ref NRF_ERROR_INVALID_STATE,\n * @ref NRF_ERROR_BUSY,\n *          @ref NRF_ERROR_FORBIDDEN, @ref BLE_ERROR_GATTS_SYS_ATTR_MISSING and @ref NRF_ERROR_RESOURCES.\n *          The caller can check whether the value has been updated by looking at the contents of *(@ref\n * ble_gatts_hvx_params_t::p_len).\n *\n * @note    Only one indication procedure can be ongoing per connection at a time.\n *          If the application tries to indicate an attribute value while another indication procedure is ongoing,\n *          the function call will return @ref NRF_ERROR_BUSY.\n *          A @ref BLE_GATTS_EVT_HVC event will be issued as soon as the confirmation arrives from the peer.\n *\n * @note    The number of Handle Value Notifications that can be queued is configured by @ref\n * ble_gatts_conn_cfg_t::hvn_tx_queue_size When the queue is full, the function call will return @ref NRF_ERROR_RESOURCES. A @ref\n * BLE_GATTS_EVT_HVN_TX_COMPLETE event will be issued as soon as the transmission of the notification is complete.\n *\n * @note    The application can keep track of the available queue element count for notifications by following the procedure\n * below:\n *          - Store initial queue element count in a variable.\n *          - Decrement the variable, which stores the currently available queue element count, by one when a call to this\n * function returns @ref NRF_SUCCESS.\n *          - Increment the variable, which stores the current available queue element count, by the count variable in @ref\n * BLE_GATTS_EVT_HVN_TX_COMPLETE event.\n *\n * @events\n * @event{@ref BLE_GATTS_EVT_HVN_TX_COMPLETE, Notification transmission complete.}\n * @event{@ref BLE_GATTS_EVT_HVC, Confirmation received from the peer.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC}\n * @mmsc{@ref BLE_GATTS_HVN_MSC}\n * @mmsc{@ref BLE_GATTS_HVI_MSC}\n * @mmsc{@ref BLE_GATTS_HVX_DISABLED_MSC}\n * @endmscs\n *\n * @param[in] conn_handle      Connection handle.\n * @param[in,out] p_hvx_params Pointer to an HVx parameters structure. If @ref ble_gatts_hvx_params_t::p_data\n *                             contains a non-NULL pointer the attribute value will be updated with the contents\n *                             pointed by it before sending the notification or indication. If the attribute value\n *                             is updated, @ref ble_gatts_hvx_params_t::p_len is updated by the SoftDevice to\n *                             contain the number of actual bytes written, else it will be set to 0.\n *\n * @retval ::NRF_SUCCESS Successfully queued a notification or indication for transmission, and optionally updated the attribute\n * value.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true:\n *                                   - Invalid Connection State\n *                                   - Notifications and/or indications not enabled in the CCCD\n *                                   - An ATT_MTU exchange is ongoing\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied. Only attributes added directly by the application\n * are available to notify and indicate.\n * @retval ::BLE_ERROR_GATTS_INVALID_ATTR_TYPE Invalid attribute type(s) supplied, only characteristic values may be notified and\n * indicated.\n * @retval ::NRF_ERROR_NOT_FOUND Attribute not found.\n * @retval ::NRF_ERROR_FORBIDDEN The connection's current security level is lower than the one required by the write permissions\n * of the CCCD associated with this characteristic.\n * @retval ::NRF_ERROR_DATA_SIZE Invalid data size(s) supplied.\n * @retval ::NRF_ERROR_BUSY For @ref BLE_GATT_HVX_INDICATION Procedure already in progress. Wait for a @ref BLE_GATTS_EVT_HVC\n * event and retry.\n * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known\n * value.\n * @retval ::NRF_ERROR_RESOURCES Too many notifications queued.\n *                               Wait for a @ref BLE_GATTS_EVT_HVN_TX_COMPLETE event and retry.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTS_HVX, uint32_t, sd_ble_gatts_hvx(uint16_t conn_handle, ble_gatts_hvx_params_t const *p_hvx_params));\n\n/**@brief Indicate the Service Changed attribute value.\n *\n * @details This call will send a Handle Value Indication to one or more peers connected to inform them that the Attribute\n *          Table layout has changed. As soon as the peer has confirmed the indication, a @ref BLE_GATTS_EVT_SC_CONFIRM event will\n *          be issued.\n *\n * @note    Some of the restrictions and limitations that apply to @ref sd_ble_gatts_hvx also apply here.\n *\n * @events\n * @event{@ref BLE_GATTS_EVT_SC_CONFIRM, Confirmation of attribute table change received from peer.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_SC_MSC}\n * @endmscs\n *\n * @param[in] conn_handle  Connection handle.\n * @param[in] start_handle Start of affected attribute handle range.\n * @param[in] end_handle   End of affected attribute handle range.\n *\n * @retval ::NRF_SUCCESS Successfully queued the Service Changed indication for transmission.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_NOT_SUPPORTED Service Changed not enabled at initialization. See @ref\n *                                   sd_ble_cfg_set and @ref ble_gatts_cfg_service_changed_t.\n * @retval ::NRF_ERROR_INVALID_STATE One or more of the following is true:\n *                                   - Invalid Connection State\n *                                   - Notifications and/or indications not enabled in the CCCD\n *                                   - An ATT_MTU exchange is ongoing\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied.\n * @retval ::BLE_ERROR_INVALID_ATTR_HANDLE Invalid attribute handle(s) supplied, handles must be in the range populated by the\n * application.\n * @retval ::NRF_ERROR_BUSY Procedure already in progress.\n * @retval ::BLE_ERROR_GATTS_SYS_ATTR_MISSING System attributes missing, use @ref sd_ble_gatts_sys_attr_set to set them to a known\n * value.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTS_SERVICE_CHANGED, uint32_t,\n       sd_ble_gatts_service_changed(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle));\n\n/**@brief Respond to a Read/Write authorization request.\n *\n * @note This call should only be used as a response to a @ref BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event issued to the application.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_AUTH_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_BUF_AUTH_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_NOBUF_NOAUTH_MSC}\n * @mmsc{@ref BLE_GATTS_READ_REQ_AUTH_MSC}\n * @mmsc{@ref BLE_GATTS_WRITE_REQ_AUTH_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_QUEUE_FULL_MSC}\n * @mmsc{@ref BLE_GATTS_QUEUED_WRITE_PEER_CANCEL_MSC}\n * @endmscs\n *\n * @param[in] conn_handle                 Connection handle.\n * @param[in] p_rw_authorize_reply_params Pointer to a structure with the attribute provided by the application.\n *\n * @note @ref ble_gatts_authorize_params_t::p_data is ignored when this function is used to respond\n *       to a @ref BLE_GATTS_AUTHORIZE_TYPE_READ event if @ref ble_gatts_authorize_params_t::update\n *       is set to 0.\n *\n * @retval ::NRF_SUCCESS               Successfully queued a response to the peer, and in the case of a write operation, Attribute\n * Table updated.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_BUSY            The stack is busy, process pending events and retry.\n * @retval ::NRF_ERROR_INVALID_ADDR    Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_STATE   Invalid Connection State or no authorization request pending.\n * @retval ::NRF_ERROR_INVALID_PARAM   Authorization op invalid,\n *                                         handle supplied does not match requested handle,\n *                                         or invalid data to be written provided by the application.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTS_RW_AUTHORIZE_REPLY, uint32_t,\n       sd_ble_gatts_rw_authorize_reply(uint16_t conn_handle,\n                                       ble_gatts_rw_authorize_reply_params_t const *p_rw_authorize_reply_params));\n\n/**@brief Update persistent system attribute information.\n *\n * @details Supply information about persistent system attributes to the stack,\n *          previously obtained using @ref sd_ble_gatts_sys_attr_get.\n *          This call is only allowed for active connections, and is usually\n *          made immediately after a connection is established with an known bonded device,\n *          often as a response to a @ref BLE_GATTS_EVT_SYS_ATTR_MISSING.\n *\n *          p_sysattrs may point directly to the application's stored copy of the system attributes\n *          obtained using @ref sd_ble_gatts_sys_attr_get.\n *          If the pointer is NULL, the system attribute info is initialized, assuming that\n *          the application does not have any previously saved system attribute data for this device.\n *\n * @note The state of persistent system attributes is reset upon connection establishment and then remembered for its duration.\n *\n * @note If this call returns with an error code different from @ref NRF_SUCCESS, the storage of persistent system attributes may\n * have been completed only partially. This means that the state of the attribute table is undefined, and the application should\n * either provide a new set of attributes using this same call or reset the SoftDevice to return to a known state.\n *\n * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system\n * services will be modified.\n * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user\n * services will be modified.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_HVX_SYS_ATTRS_MISSING_MSC}\n * @mmsc{@ref BLE_GATTS_SYS_ATTRS_UNK_PEER_MSC}\n * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC}\n * @endmscs\n *\n * @param[in]  conn_handle        Connection handle.\n * @param[in]  p_sys_attr_data    Pointer to a saved copy of system attributes supplied to the stack, or NULL.\n * @param[in]  len                Size of data pointed by p_sys_attr_data, in octets.\n * @param[in]  flags              Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS\n *\n * @retval ::NRF_SUCCESS Successfully set the system attribute information.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid flags supplied.\n * @retval ::NRF_ERROR_INVALID_DATA Invalid data supplied, the data should be exactly the same as retrieved with @ref\n * sd_ble_gatts_sys_attr_get.\n * @retval ::NRF_ERROR_NO_MEM Not enough memory to complete operation.\n */\nSVCALL(SD_BLE_GATTS_SYS_ATTR_SET, uint32_t,\n       sd_ble_gatts_sys_attr_set(uint16_t conn_handle, uint8_t const *p_sys_attr_data, uint16_t len, uint32_t flags));\n\n/**@brief Retrieve persistent system attribute information from the stack.\n *\n * @details This call is used to retrieve information about values to be stored persistently by the application\n *          during the lifetime of a connection or after it has been terminated. When a new connection is established with the\n * same bonded device, the system attribute information retrieved with this function should be restored using using @ref\n * sd_ble_gatts_sys_attr_set. If retrieved after disconnection, the data should be read before a new connection established. The\n * connection handle for the previous, now disconnected, connection will remain valid until a new one is created to allow this API\n * call to refer to it. Connection handles belonging to active connections can be used as well, but care should be taken since the\n * system attributes may be written to at any time by the peer during a connection's lifetime.\n *\n * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS is used with this function, only the system attributes included in system\n * services will be returned.\n * @note When the @ref BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS is used with this function, only the system attributes included in user\n * services will be returned.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_SYS_ATTRS_BONDED_PEER_MSC}\n * @endmscs\n *\n * @param[in]     conn_handle       Connection handle of the recently terminated connection.\n * @param[out]    p_sys_attr_data   Pointer to a buffer where updated information about system attributes will be filled in. The\n * format of the data is described in @ref BLE_GATTS_SYS_ATTRS_FORMAT. NULL can be provided to obtain the length of the data.\n * @param[in,out] p_len             Size of application buffer if p_sys_attr_data is not NULL. Unconditionally updated to actual\n * length of system attribute data.\n * @param[in]     flags             Optional additional flags, see @ref BLE_GATTS_SYS_ATTR_FLAGS\n *\n * @retval ::NRF_SUCCESS Successfully retrieved the system attribute information.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid flags supplied.\n * @retval ::NRF_ERROR_DATA_SIZE The system attribute information did not fit into the provided buffer.\n * @retval ::NRF_ERROR_NOT_FOUND No system attributes found.\n */\nSVCALL(SD_BLE_GATTS_SYS_ATTR_GET, uint32_t,\n       sd_ble_gatts_sys_attr_get(uint16_t conn_handle, uint8_t *p_sys_attr_data, uint16_t *p_len, uint32_t flags));\n\n/**@brief Retrieve the first valid user attribute handle.\n *\n * @param[out] p_handle   Pointer to an integer where the handle will be stored.\n *\n * @retval ::NRF_SUCCESS Successfully retrieved the handle.\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n */\nSVCALL(SD_BLE_GATTS_INITIAL_USER_HANDLE_GET, uint32_t, sd_ble_gatts_initial_user_handle_get(uint16_t *p_handle));\n\n/**@brief Retrieve the attribute UUID and/or metadata.\n *\n * @param[in]  handle Attribute handle\n * @param[out] p_uuid UUID of the attribute. Use NULL to omit this field.\n * @param[out] p_md Metadata of the attribute. Use NULL to omit this field.\n *\n * @retval ::NRF_SUCCESS Successfully retrieved the attribute metadata,\n * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid parameters supplied. Returned when both @c p_uuid and @c p_md are NULL.\n * @retval ::NRF_ERROR_NOT_FOUND Attribute was not found.\n */\nSVCALL(SD_BLE_GATTS_ATTR_GET, uint32_t, sd_ble_gatts_attr_get(uint16_t handle, ble_uuid_t *p_uuid, ble_gatts_attr_md_t *p_md));\n\n/**@brief Reply to an ATT_MTU exchange request by sending an Exchange MTU Response to the client.\n *\n * @details This function is only used to reply to a @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST event.\n *\n * @details The SoftDevice sets ATT_MTU to the minimum of:\n *          - The Client RX MTU value from @ref BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST, and\n *          - The Server RX MTU value.\n *\n *          However, the SoftDevice never sets ATT_MTU lower than @ref BLE_GATT_ATT_MTU_DEFAULT.\n *\n * @mscs\n * @mmsc{@ref BLE_GATTS_MTU_EXCHANGE}\n * @endmscs\n *\n * @param[in] conn_handle    The connection handle identifying the connection to perform this procedure on.\n * @param[in] server_rx_mtu  Server RX MTU size.\n *                           - The minimum value is @ref BLE_GATT_ATT_MTU_DEFAULT.\n *                           - The maximum value is @ref ble_gatt_conn_cfg_t::att_mtu in the connection configuration\n *                             used for this connection.\n *                           - The value must be equal to Client RX MTU size given in @ref sd_ble_gattc_exchange_mtu_request\n *                             if an ATT_MTU exchange has already been performed in the other direction.\n *\n * @retval ::NRF_SUCCESS Successfully sent response to the client.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State or no ATT_MTU exchange request pending.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid Server RX MTU size supplied.\n * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without\n * reestablishing the connection.\n */\nSVCALL(SD_BLE_GATTS_EXCHANGE_MTU_REPLY, uint32_t, sd_ble_gatts_exchange_mtu_reply(uint16_t conn_handle, uint16_t server_rx_mtu));\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // BLE_GATTS_H__\n\n/**\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_hci.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_COMMON\n  @{\n*/\n\n#ifndef BLE_HCI_H__\n#define BLE_HCI_H__\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @defgroup BLE_HCI_STATUS_CODES Bluetooth status codes\n * @{ */\n\n#define BLE_HCI_STATUS_CODE_SUCCESS 0x00                       /**< Success. */\n#define BLE_HCI_STATUS_CODE_UNKNOWN_BTLE_COMMAND 0x01          /**< Unknown BLE Command. */\n#define BLE_HCI_STATUS_CODE_UNKNOWN_CONNECTION_IDENTIFIER 0x02 /**< Unknown Connection Identifier. */\n/*0x03 Hardware Failure\n0x04 Page Timeout\n*/\n#define BLE_HCI_AUTHENTICATION_FAILURE 0x05         /**< Authentication Failure. */\n#define BLE_HCI_STATUS_CODE_PIN_OR_KEY_MISSING 0x06 /**< Pin or Key missing. */\n#define BLE_HCI_MEMORY_CAPACITY_EXCEEDED 0x07       /**< Memory Capacity Exceeded. */\n#define BLE_HCI_CONNECTION_TIMEOUT 0x08             /**< Connection Timeout. */\n/*0x09 Connection Limit Exceeded\n0x0A Synchronous Connection Limit To A Device Exceeded\n0x0B ACL Connection Already Exists*/\n#define BLE_HCI_STATUS_CODE_COMMAND_DISALLOWED 0x0C /**< Command Disallowed. */\n/*0x0D Connection Rejected due to Limited Resources\n0x0E Connection Rejected Due To Security Reasons\n0x0F Connection Rejected due to Unacceptable BD_ADDR\n0x10 Connection Accept Timeout Exceeded\n0x11 Unsupported Feature or Parameter Value*/\n#define BLE_HCI_STATUS_CODE_INVALID_BTLE_COMMAND_PARAMETERS 0x12 /**< Invalid BLE Command Parameters. */\n#define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13           /**< Remote User Terminated Connection. */\n#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_LOW_RESOURCES                                                                      \\\n    0x14                                                     /**< Remote Device Terminated Connection due to low                 \\\n                                                                resources.*/\n#define BLE_HCI_REMOTE_DEV_TERMINATION_DUE_TO_POWER_OFF 0x15 /**< Remote Device Terminated Connection due to power off. */\n#define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16        /**< Local Host Terminated Connection. */\n/*\n0x17 Repeated Attempts\n0x18 Pairing Not Allowed\n0x19 Unknown LMP PDU\n*/\n#define BLE_HCI_UNSUPPORTED_REMOTE_FEATURE 0x1A /**< Unsupported Remote Feature. */\n/*\n0x1B SCO Offset Rejected\n0x1C SCO Interval Rejected\n0x1D SCO Air Mode Rejected*/\n#define BLE_HCI_STATUS_CODE_INVALID_LMP_PARAMETERS 0x1E /**< Invalid LMP Parameters. */\n#define BLE_HCI_STATUS_CODE_UNSPECIFIED_ERROR 0x1F      /**< Unspecified Error. */\n/*0x20 Unsupported LMP Parameter Value\n0x21 Role Change Not Allowed\n*/\n#define BLE_HCI_STATUS_CODE_LMP_RESPONSE_TIMEOUT 0x22            /**< LMP Response Timeout. */\n#define BLE_HCI_STATUS_CODE_LMP_ERROR_TRANSACTION_COLLISION 0x23 /**< LMP Error Transaction Collision/LL Procedure Collision. */\n#define BLE_HCI_STATUS_CODE_LMP_PDU_NOT_ALLOWED 0x24             /**< LMP PDU Not Allowed. */\n/*0x25 Encryption Mode Not Acceptable\n0x26 Link Key Can Not be Changed\n0x27 Requested QoS Not Supported\n*/\n#define BLE_HCI_INSTANT_PASSED 0x28                    /**< Instant Passed. */\n#define BLE_HCI_PAIRING_WITH_UNIT_KEY_UNSUPPORTED 0x29 /**< Pairing with Unit Key Unsupported. */\n#define BLE_HCI_DIFFERENT_TRANSACTION_COLLISION 0x2A   /**< Different Transaction Collision. */\n/*\n0x2B Reserved\n0x2C QoS Unacceptable Parameter\n0x2D QoS Rejected\n0x2E Channel Classification Not Supported\n0x2F Insufficient Security\n*/\n#define BLE_HCI_PARAMETER_OUT_OF_MANDATORY_RANGE 0x30 /**< Parameter Out Of Mandatory Range. */\n/*\n0x31 Reserved\n0x32 Role Switch Pending\n0x33 Reserved\n0x34 Reserved Slot Violation\n0x35 Role Switch Failed\n0x36 Extended Inquiry Response Too Large\n0x37 Secure Simple Pairing Not Supported By Host.\n0x38 Host Busy - Pairing\n0x39 Connection Rejected due to No Suitable Channel Found*/\n#define BLE_HCI_CONTROLLER_BUSY 0x3A                    /**< Controller Busy. */\n#define BLE_HCI_CONN_INTERVAL_UNACCEPTABLE 0x3B         /**< Connection Interval Unacceptable. */\n#define BLE_HCI_DIRECTED_ADVERTISER_TIMEOUT 0x3C        /**< Directed Advertisement Timeout. */\n#define BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE 0x3D /**< Connection Terminated due to MIC Failure. */\n#define BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED 0x3E      /**< Connection Failed to be Established. */\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // BLE_HCI_H__\n\n/** @} */\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_l2cap.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_L2CAP Logical Link Control and Adaptation Protocol (L2CAP)\n  @{\n  @brief Definitions and prototypes for the L2CAP interface.\n */\n\n#ifndef BLE_L2CAP_H__\n#define BLE_L2CAP_H__\n\n#include \"ble_err.h\"\n#include \"ble_ranges.h\"\n#include \"ble_types.h\"\n#include \"nrf_error.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**@addtogroup BLE_L2CAP_TERMINOLOGY Terminology\n * @{\n * @details\n *\n * L2CAP SDU\n * - A data unit that the application can send/receive to/from a peer.\n *\n * L2CAP PDU\n * - A data unit that is exchanged between local and remote L2CAP entities.\n *   It consists of L2CAP protocol control information and payload fields.\n *   The payload field can contain an L2CAP SDU or a part of an L2CAP SDU.\n *\n * L2CAP MTU\n * - The maximum length of an L2CAP SDU.\n *\n * L2CAP MPS\n * - The maximum length of an L2CAP PDU payload field.\n *\n * Credits\n * - A value indicating the number of L2CAP PDUs that the receiver of the credit can send to the peer.\n * @} */\n\n/**@addtogroup BLE_L2CAP_ENUMERATIONS Enumerations\n * @{ */\n\n/**@brief L2CAP API SVC numbers. */\nenum BLE_L2CAP_SVCS {\n    SD_BLE_L2CAP_CH_SETUP = BLE_L2CAP_SVC_BASE + 0,        /**< Set up an L2CAP channel. */\n    SD_BLE_L2CAP_CH_RELEASE = BLE_L2CAP_SVC_BASE + 1,      /**< Release an L2CAP channel. */\n    SD_BLE_L2CAP_CH_RX = BLE_L2CAP_SVC_BASE + 2,           /**< Receive an SDU on an L2CAP channel. */\n    SD_BLE_L2CAP_CH_TX = BLE_L2CAP_SVC_BASE + 3,           /**< Transmit an SDU on an L2CAP channel. */\n    SD_BLE_L2CAP_CH_FLOW_CONTROL = BLE_L2CAP_SVC_BASE + 4, /**< Advanced SDU reception flow control. */\n};\n\n/**@brief L2CAP Event IDs. */\nenum BLE_L2CAP_EVTS {\n    BLE_L2CAP_EVT_CH_SETUP_REQUEST = BLE_L2CAP_EVT_BASE + 0,    /**< L2CAP Channel Setup Request event.\n                                                                  \\n Reply with @ref sd_ble_l2cap_ch_setup.\n                                                                  \\n See @ref ble_l2cap_evt_ch_setup_request_t. */\n    BLE_L2CAP_EVT_CH_SETUP_REFUSED = BLE_L2CAP_EVT_BASE + 1,    /**< L2CAP Channel Setup Refused event.\n                                                                  \\n See @ref ble_l2cap_evt_ch_setup_refused_t. */\n    BLE_L2CAP_EVT_CH_SETUP = BLE_L2CAP_EVT_BASE + 2,            /**< L2CAP Channel Setup Completed event.\n                                                                  \\n See @ref ble_l2cap_evt_ch_setup_t. */\n    BLE_L2CAP_EVT_CH_RELEASED = BLE_L2CAP_EVT_BASE + 3,         /**< L2CAP Channel Released event.\n                                                                  \\n No additional event structure applies. */\n    BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED = BLE_L2CAP_EVT_BASE + 4, /**< L2CAP Channel SDU data buffer released event.\n                                                                  \\n See @ref ble_l2cap_evt_ch_sdu_buf_released_t. */\n    BLE_L2CAP_EVT_CH_CREDIT = BLE_L2CAP_EVT_BASE + 5,           /**< L2CAP Channel Credit received.\n                                                                  \\n See @ref ble_l2cap_evt_ch_credit_t. */\n    BLE_L2CAP_EVT_CH_RX = BLE_L2CAP_EVT_BASE + 6,               /**< L2CAP Channel SDU received.\n                                                                  \\n See @ref ble_l2cap_evt_ch_rx_t. */\n    BLE_L2CAP_EVT_CH_TX = BLE_L2CAP_EVT_BASE + 7,               /**< L2CAP Channel SDU transmitted.\n                                                                   \\n See @ref ble_l2cap_evt_ch_tx_t. */\n};\n\n/** @} */\n\n/**@addtogroup BLE_L2CAP_DEFINES Defines\n * @{ */\n\n/**@brief Maximum number of L2CAP channels per connection. */\n#define BLE_L2CAP_CH_COUNT_MAX (64)\n\n/**@brief Minimum L2CAP MTU, in bytes. */\n#define BLE_L2CAP_MTU_MIN (23)\n\n/**@brief Minimum L2CAP MPS, in bytes. */\n#define BLE_L2CAP_MPS_MIN (23)\n\n/**@brief Invalid CID. */\n#define BLE_L2CAP_CID_INVALID (0x0000)\n\n/**@brief Default number of credits for @ref sd_ble_l2cap_ch_flow_control. */\n#define BLE_L2CAP_CREDITS_DEFAULT (1)\n\n/**@defgroup BLE_L2CAP_CH_SETUP_REFUSED_SRCS L2CAP channel setup refused sources\n * @{ */\n#define BLE_L2CAP_CH_SETUP_REFUSED_SRC_LOCAL (0x01)  /**< Local. */\n#define BLE_L2CAP_CH_SETUP_REFUSED_SRC_REMOTE (0x02) /**< Remote. */\n                                                     /** @}  */\n\n/** @defgroup BLE_L2CAP_CH_STATUS_CODES L2CAP channel status codes\n * @{ */\n#define BLE_L2CAP_CH_STATUS_CODE_SUCCESS (0x0000)               /**< Success. */\n#define BLE_L2CAP_CH_STATUS_CODE_LE_PSM_NOT_SUPPORTED (0x0002)  /**< LE_PSM not supported. */\n#define BLE_L2CAP_CH_STATUS_CODE_NO_RESOURCES (0x0004)          /**< No resources available. */\n#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_AUTHENTICATION (0x0005) /**< Insufficient authentication. */\n#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_AUTHORIZATION (0x0006)  /**< Insufficient authorization. */\n#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC_KEY_SIZE (0x0007)   /**< Insufficient encryption key size. */\n#define BLE_L2CAP_CH_STATUS_CODE_INSUFF_ENC (0x0008)            /**< Insufficient encryption. */\n#define BLE_L2CAP_CH_STATUS_CODE_INVALID_SCID (0x0009)          /**< Invalid Source CID. */\n#define BLE_L2CAP_CH_STATUS_CODE_SCID_ALLOCATED (0x000A)        /**< Source CID already allocated. */\n#define BLE_L2CAP_CH_STATUS_CODE_UNACCEPTABLE_PARAMS (0x000B)   /**< Unacceptable parameters. */\n#define BLE_L2CAP_CH_STATUS_CODE_NOT_UNDERSTOOD                                                                                  \\\n    (0x8000)                                      /**< Command Reject received instead of LE Credit Based Connection Response. */\n#define BLE_L2CAP_CH_STATUS_CODE_TIMEOUT (0xC000) /**< Operation timed out. */\n/** @} */\n\n/** @} */\n\n/**@addtogroup BLE_L2CAP_STRUCTURES Structures\n * @{ */\n\n/**\n * @brief BLE L2CAP connection configuration parameters, set with @ref sd_ble_cfg_set.\n *\n * @note  These parameters are set per connection, so all L2CAP channels created on this connection\n *        will have the same parameters.\n *\n * @retval ::NRF_ERROR_INVALID_PARAM  One or more of the following is true:\n *                                    - rx_mps is smaller than @ref BLE_L2CAP_MPS_MIN.\n *                                    - tx_mps is smaller than @ref BLE_L2CAP_MPS_MIN.\n *                                    - ch_count is greater than @ref BLE_L2CAP_CH_COUNT_MAX.\n * @retval ::NRF_ERROR_NO_MEM         rx_mps or tx_mps is set too high.\n */\ntypedef struct {\n    uint16_t rx_mps;       /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall\n                                be able to receive on L2CAP channels on connections with this\n                                configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN. */\n    uint16_t tx_mps;       /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall\n                                be able to transmit on L2CAP channels on connections with this\n                                configuration. The minimum value is @ref BLE_L2CAP_MPS_MIN. */\n    uint8_t rx_queue_size; /**< Number of SDU data buffers that can be queued for reception per\n                                L2CAP channel. The minimum value is one. */\n    uint8_t tx_queue_size; /**< Number of SDU data buffers that can be queued for transmission\n                                per L2CAP channel. The minimum value is one. */\n    uint8_t ch_count;      /**< Number of L2CAP channels the application can create per connection\n                                with this configuration. The default value is zero, the maximum\n                                value is @ref BLE_L2CAP_CH_COUNT_MAX.\n                                @note if this parameter is set to zero, all other parameters in\n                                @ref ble_l2cap_conn_cfg_t are ignored. */\n} ble_l2cap_conn_cfg_t;\n\n/**@brief L2CAP channel RX parameters. */\ntypedef struct {\n    uint16_t rx_mtu;    /**< The maximum L2CAP SDU size, in bytes, that L2CAP shall be able to\n                             receive on this L2CAP channel.\n                             - Must be equal to or greater than @ref BLE_L2CAP_MTU_MIN. */\n    uint16_t rx_mps;    /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP shall be\n                             able to receive on this L2CAP channel.\n                             - Must be equal to or greater than @ref BLE_L2CAP_MPS_MIN.\n                             - Must be equal to or less than @ref ble_l2cap_conn_cfg_t::rx_mps. */\n    ble_data_t sdu_buf; /**< SDU data buffer for reception.\n                             - If @ref ble_data_t::p_data is non-NULL, initial credits are\n                               issued to the peer.\n                             - If @ref ble_data_t::p_data is NULL, no initial credits are\n                               issued to the peer. */\n} ble_l2cap_ch_rx_params_t;\n\n/**@brief L2CAP channel setup parameters. */\ntypedef struct {\n    ble_l2cap_ch_rx_params_t rx_params; /**< L2CAP channel RX parameters. */\n    uint16_t le_psm;                    /**< LE Protocol/Service Multiplexer. Used when requesting\n                                             setup of an L2CAP channel, ignored otherwise. */\n    uint16_t status;                    /**< Status code, see @ref BLE_L2CAP_CH_STATUS_CODES.\n                                             Used when replying to a setup request of an L2CAP\n                                             channel, ignored otherwise. */\n} ble_l2cap_ch_setup_params_t;\n\n/**@brief L2CAP channel TX parameters. */\ntypedef struct {\n    uint16_t tx_mtu;   /**< The maximum L2CAP SDU size, in bytes, that L2CAP is able to\n                            transmit on this L2CAP channel. */\n    uint16_t peer_mps; /**< The maximum L2CAP PDU payload size, in bytes, that the peer is\n                            able to receive on this L2CAP channel. */\n    uint16_t tx_mps;   /**< The maximum L2CAP PDU payload size, in bytes, that L2CAP is able\n                            to transmit on this L2CAP channel. This is effective tx_mps,\n                            selected by the SoftDevice as\n                            MIN( @ref ble_l2cap_ch_tx_params_t::peer_mps, @ref ble_l2cap_conn_cfg_t::tx_mps ) */\n    uint16_t credits;  /**< Initial credits given by the peer. */\n} ble_l2cap_ch_tx_params_t;\n\n/**@brief L2CAP Channel Setup Request event. */\ntypedef struct {\n    ble_l2cap_ch_tx_params_t tx_params; /**< L2CAP channel TX parameters. */\n    uint16_t le_psm;                    /**< LE Protocol/Service Multiplexer. */\n} ble_l2cap_evt_ch_setup_request_t;\n\n/**@brief L2CAP Channel Setup Refused event. */\ntypedef struct {\n    uint8_t source;  /**< Source, see @ref BLE_L2CAP_CH_SETUP_REFUSED_SRCS */\n    uint16_t status; /**< Status code, see @ref BLE_L2CAP_CH_STATUS_CODES */\n} ble_l2cap_evt_ch_setup_refused_t;\n\n/**@brief L2CAP Channel Setup Completed event. */\ntypedef struct {\n    ble_l2cap_ch_tx_params_t tx_params; /**< L2CAP channel TX parameters. */\n} ble_l2cap_evt_ch_setup_t;\n\n/**@brief L2CAP Channel SDU Data Buffer Released event. */\ntypedef struct {\n    ble_data_t sdu_buf; /**< Returned reception or transmission SDU data buffer. The SoftDevice\n                             returns SDU data buffers supplied by the application, which have\n                             not yet been returned previously via a @ref BLE_L2CAP_EVT_CH_RX or\n                             @ref BLE_L2CAP_EVT_CH_TX event. */\n} ble_l2cap_evt_ch_sdu_buf_released_t;\n\n/**@brief L2CAP Channel Credit received event. */\ntypedef struct {\n    uint16_t credits; /**< Additional credits given by the peer. */\n} ble_l2cap_evt_ch_credit_t;\n\n/**@brief L2CAP Channel received SDU event. */\ntypedef struct {\n    uint16_t sdu_len;   /**< Total SDU length, in bytes. */\n    ble_data_t sdu_buf; /**< SDU data buffer.\n                             @note If there is not enough space in the buffer\n                                   (sdu_buf.len < sdu_len) then the rest of the SDU will be\n                                   silently discarded by the SoftDevice. */\n} ble_l2cap_evt_ch_rx_t;\n\n/**@brief L2CAP Channel transmitted SDU event. */\ntypedef struct {\n    ble_data_t sdu_buf; /**< SDU data buffer. */\n} ble_l2cap_evt_ch_tx_t;\n\n/**@brief L2CAP event structure. */\ntypedef struct {\n    uint16_t conn_handle; /**< Connection Handle on which the event occured. */\n    uint16_t local_cid;   /**< Local Channel ID of the L2CAP channel, or\n                               @ref BLE_L2CAP_CID_INVALID if not present. */\n    union {\n        ble_l2cap_evt_ch_setup_request_t ch_setup_request;       /**< L2CAP Channel Setup Request Event Parameters. */\n        ble_l2cap_evt_ch_setup_refused_t ch_setup_refused;       /**< L2CAP Channel Setup Refused Event Parameters. */\n        ble_l2cap_evt_ch_setup_t ch_setup;                       /**< L2CAP Channel Setup Completed Event Parameters. */\n        ble_l2cap_evt_ch_sdu_buf_released_t ch_sdu_buf_released; /**< L2CAP Channel SDU Data Buffer Released Event Parameters. */\n        ble_l2cap_evt_ch_credit_t credit;                        /**< L2CAP Channel Credit Received Event Parameters. */\n        ble_l2cap_evt_ch_rx_t rx;                                /**< L2CAP Channel SDU Received Event Parameters. */\n        ble_l2cap_evt_ch_tx_t tx;                                /**< L2CAP Channel SDU Transmitted Event Parameters. */\n    } params;                                                    /**< Event Parameters. */\n} ble_l2cap_evt_t;\n\n/** @} */\n\n/**@addtogroup BLE_L2CAP_FUNCTIONS Functions\n * @{ */\n\n/**@brief Set up an L2CAP channel.\n *\n * @details This function is used to:\n *          - Request setup of an L2CAP channel: sends an LE Credit Based Connection Request packet to a peer.\n *          - Reply to a setup request of an L2CAP channel (if called in response to a\n *            @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST event): sends an LE Credit Based Connection\n *            Response packet to a peer.\n *\n * @note    A call to this function will require the application to keep the SDU data buffer alive\n *          until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_RX or\n *          @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event.\n *\n * @events\n * @event{@ref BLE_L2CAP_EVT_CH_SETUP, Setup successful.}\n * @event{@ref BLE_L2CAP_EVT_CH_SETUP_REFUSED, Setup failed.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_L2CAP_CH_SETUP_MSC}\n * @endmscs\n *\n * @param[in] conn_handle      Connection Handle.\n * @param[in,out] p_local_cid  Pointer to a uint16_t containing Local Channel ID of the L2CAP channel:\n *                             - As input: @ref BLE_L2CAP_CID_INVALID when requesting setup of an L2CAP\n *                               channel or local_cid provided in the @ref BLE_L2CAP_EVT_CH_SETUP_REQUEST\n *                               event when replying to a setup request of an L2CAP channel.\n *                             - As output: local_cid for this channel.\n * @param[in] p_params         L2CAP channel parameters.\n *\n * @retval ::NRF_SUCCESS                    Successfully queued request or response for transmission.\n * @retval ::NRF_ERROR_BUSY                 The stack is busy, process pending events and retry.\n * @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_PARAM        Invalid parameter(s) supplied.\n * @retval ::NRF_ERROR_INVALID_LENGTH       Supplied higher rx_mps than has been configured on this link.\n * @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (L2CAP channel already set up).\n * @retval ::NRF_ERROR_NOT_FOUND            CID not found.\n * @retval ::NRF_ERROR_RESOURCES            The limit has been reached for available L2CAP channels,\n *                                          see @ref ble_l2cap_conn_cfg_t::ch_count.\n */\nSVCALL(SD_BLE_L2CAP_CH_SETUP, uint32_t,\n       sd_ble_l2cap_ch_setup(uint16_t conn_handle, uint16_t *p_local_cid, ble_l2cap_ch_setup_params_t const *p_params));\n\n/**@brief Release an L2CAP channel.\n *\n * @details This sends a Disconnection Request packet to a peer.\n *\n * @events\n * @event{@ref BLE_L2CAP_EVT_CH_RELEASED, Release complete.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_L2CAP_CH_RELEASE_MSC}\n * @endmscs\n *\n * @param[in] conn_handle   Connection Handle.\n * @param[in] local_cid     Local Channel ID of the L2CAP channel.\n *\n * @retval ::NRF_SUCCESS                    Successfully queued request for transmission.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is\n *                                          in progress for the L2CAP channel).\n * @retval ::NRF_ERROR_NOT_FOUND            CID not found.\n */\nSVCALL(SD_BLE_L2CAP_CH_RELEASE, uint32_t, sd_ble_l2cap_ch_release(uint16_t conn_handle, uint16_t local_cid));\n\n/**@brief Receive an SDU on an L2CAP channel.\n *\n * @details This may issue additional credits to the peer using an LE Flow Control Credit packet.\n *\n * @note    A call to this function will require the application to keep the memory pointed by\n *          @ref ble_data_t::p_data alive until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_RX\n *          or @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event.\n *\n * @note    The SoftDevice can queue up to @ref ble_l2cap_conn_cfg_t::rx_queue_size SDU data buffers\n *          for reception per L2CAP channel.\n *\n * @events\n * @event{@ref BLE_L2CAP_EVT_CH_RX, The SDU is received.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_L2CAP_CH_RX_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection Handle.\n * @param[in] local_cid   Local Channel ID of the L2CAP channel.\n * @param[in] p_sdu_buf   Pointer to the SDU data buffer.\n *\n * @retval ::NRF_SUCCESS                    Buffer accepted.\n * @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is\n *                                          in progress for an L2CAP channel).\n * @retval ::NRF_ERROR_NOT_FOUND            CID not found.\n * @retval ::NRF_ERROR_RESOURCES            Too many SDU data buffers supplied. Wait for a\n *                                          @ref BLE_L2CAP_EVT_CH_RX event and retry.\n */\nSVCALL(SD_BLE_L2CAP_CH_RX, uint32_t, sd_ble_l2cap_ch_rx(uint16_t conn_handle, uint16_t local_cid, ble_data_t const *p_sdu_buf));\n\n/**@brief Transmit an SDU on an L2CAP channel.\n *\n * @note    A call to this function will require the application to keep the memory pointed by\n *          @ref ble_data_t::p_data alive until the SDU data buffer is returned in @ref BLE_L2CAP_EVT_CH_TX\n *          or @ref BLE_L2CAP_EVT_CH_SDU_BUF_RELEASED event.\n *\n * @note    The SoftDevice can queue up to @ref ble_l2cap_conn_cfg_t::tx_queue_size SDUs for\n *          transmission per L2CAP channel.\n *\n * @note    The application can keep track of the available credits for transmission by following\n *          the procedure below:\n *          - Store initial credits given by the peer in a variable.\n *            (Initial credits are provided in a @ref BLE_L2CAP_EVT_CH_SETUP event.)\n *          - Decrement the variable, which stores the currently available credits, by\n *            ceiling((@ref ble_data_t::len + 2) / tx_mps) when a call to this function returns\n *            @ref NRF_SUCCESS. (tx_mps is provided in a @ref BLE_L2CAP_EVT_CH_SETUP event.)\n *          - Increment the variable, which stores the currently available credits, by additional\n *            credits given by the peer in a @ref BLE_L2CAP_EVT_CH_CREDIT event.\n *\n * @events\n * @event{@ref BLE_L2CAP_EVT_CH_TX, The SDU is transmitted.}\n * @endevents\n *\n * @mscs\n * @mmsc{@ref BLE_L2CAP_CH_TX_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection Handle.\n * @param[in] local_cid   Local Channel ID of the L2CAP channel.\n * @param[in] p_sdu_buf   Pointer to the SDU data buffer.\n *\n * @retval ::NRF_SUCCESS                    Successfully queued L2CAP SDU for transmission.\n * @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is\n *                                          in progress for the L2CAP channel).\n * @retval ::NRF_ERROR_NOT_FOUND            CID not found.\n * @retval ::NRF_ERROR_DATA_SIZE            Invalid SDU length supplied, must not be more than\n *                                          @ref ble_l2cap_ch_tx_params_t::tx_mtu provided in\n *                                          @ref BLE_L2CAP_EVT_CH_SETUP event.\n * @retval ::NRF_ERROR_RESOURCES            Too many SDUs queued for transmission. Wait for a\n *                                          @ref BLE_L2CAP_EVT_CH_TX event and retry.\n */\nSVCALL(SD_BLE_L2CAP_CH_TX, uint32_t, sd_ble_l2cap_ch_tx(uint16_t conn_handle, uint16_t local_cid, ble_data_t const *p_sdu_buf));\n\n/**@brief Advanced SDU reception flow control.\n *\n * @details Adjust the way the SoftDevice issues credits to the peer.\n *          This may issue additional credits to the peer using an LE Flow Control Credit packet.\n *\n * @mscs\n * @mmsc{@ref BLE_L2CAP_CH_FLOW_CONTROL_MSC}\n * @endmscs\n *\n * @param[in] conn_handle Connection Handle.\n * @param[in] local_cid   Local Channel ID of the L2CAP channel or @ref BLE_L2CAP_CID_INVALID to set\n *                        the value that will be used for newly created channels.\n * @param[in] credits     Number of credits that the SoftDevice will make sure the peer has every\n *                        time it starts using a new reception buffer.\n *                        - @ref BLE_L2CAP_CREDITS_DEFAULT is the default value the SoftDevice will\n *                          use if this function is not called.\n *                        - If set to zero, the SoftDevice will stop issuing credits for new reception\n *                          buffers the application provides or has provided. SDU reception that is\n *                          currently ongoing will be allowed to complete.\n * @param[out] p_credits  NULL or pointer to a uint16_t. If a valid pointer is provided, it will be\n *                        written by the SoftDevice with the number of credits that is or will be\n *                        available to the peer. If the value written by the SoftDevice is 0 when\n *                        credits parameter was set to 0, the peer will not be able to send more\n *                        data until more credits are provided by calling this function again with\n *                        credits > 0. This parameter is ignored when local_cid is set to\n *                        @ref BLE_L2CAP_CID_INVALID.\n *\n * @note Application should take care when setting number of credits higher than default value. In\n *       this case the application must make sure that the SoftDevice always has reception buffers\n *       available (see @ref sd_ble_l2cap_ch_rx) for that channel. If the SoftDevice does not have\n *       such buffers available, packets may be NACKed on the Link Layer and all Bluetooth traffic\n *       on the connection handle may be stalled until the SoftDevice again has an available\n *       reception buffer. This applies even if the application has used this call to set the\n *       credits back to default, or zero.\n *\n * @retval ::NRF_SUCCESS                    Flow control parameters accepted.\n * @retval ::NRF_ERROR_INVALID_ADDR         Invalid pointer supplied.\n * @retval ::BLE_ERROR_INVALID_CONN_HANDLE  Invalid Connection Handle.\n * @retval ::NRF_ERROR_INVALID_STATE        Invalid State to perform operation (Setup or release is\n *                                          in progress for an L2CAP channel).\n * @retval ::NRF_ERROR_NOT_FOUND            CID not found.\n */\nSVCALL(SD_BLE_L2CAP_CH_FLOW_CONTROL, uint32_t,\n       sd_ble_l2cap_ch_flow_control(uint16_t conn_handle, uint16_t local_cid, uint16_t credits, uint16_t *p_credits));\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // BLE_L2CAP_H__\n\n/**\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_ranges.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_COMMON\n  @{\n  @defgroup ble_ranges Module specific SVC, event and option number subranges\n  @{\n\n  @brief Definition of SVC, event and option number subranges for each API module.\n\n  @note\n  SVCs, event and option numbers are split into subranges for each API module.\n  Each module receives its entire allocated range of SVC calls, whether implemented or not,\n  but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range.\n\n  Note that the symbols BLE_<module>_SVC_LAST is the end of the allocated SVC range,\n  rather than the last SVC function call actually defined and implemented.\n\n  Specific SVC, event and option values are defined in each module's ble_<module>.h file,\n  which defines names of each individual SVC code based on the range start value.\n*/\n\n#ifndef BLE_RANGES_H__\n#define BLE_RANGES_H__\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define BLE_SVC_BASE 0x60 /**< Common BLE SVC base. */\n#define BLE_SVC_LAST 0x6B /**< Common BLE SVC last. */\n\n#define BLE_GAP_SVC_BASE 0x6C /**< GAP BLE SVC base. */\n#define BLE_GAP_SVC_LAST 0x9A /**< GAP BLE SVC last. */\n\n#define BLE_GATTC_SVC_BASE 0x9B /**< GATTC BLE SVC base. */\n#define BLE_GATTC_SVC_LAST 0xA7 /**< GATTC BLE SVC last. */\n\n#define BLE_GATTS_SVC_BASE 0xA8 /**< GATTS BLE SVC base. */\n#define BLE_GATTS_SVC_LAST 0xB7 /**< GATTS BLE SVC last. */\n\n#define BLE_L2CAP_SVC_BASE 0xB8 /**< L2CAP BLE SVC base. */\n#define BLE_L2CAP_SVC_LAST 0xBF /**< L2CAP BLE SVC last. */\n\n#define BLE_EVT_INVALID 0x00 /**< Invalid BLE Event. */\n\n#define BLE_EVT_BASE 0x01 /**< Common BLE Event base. */\n#define BLE_EVT_LAST 0x0F /**< Common BLE Event last. */\n\n#define BLE_GAP_EVT_BASE 0x10 /**< GAP BLE Event base. */\n#define BLE_GAP_EVT_LAST 0x2F /**< GAP BLE Event last. */\n\n#define BLE_GATTC_EVT_BASE 0x30 /**< GATTC BLE Event base. */\n#define BLE_GATTC_EVT_LAST 0x4F /**< GATTC BLE Event last. */\n\n#define BLE_GATTS_EVT_BASE 0x50 /**< GATTS BLE Event base. */\n#define BLE_GATTS_EVT_LAST 0x6F /**< GATTS BLE Event last. */\n\n#define BLE_L2CAP_EVT_BASE 0x70 /**< L2CAP BLE Event base. */\n#define BLE_L2CAP_EVT_LAST 0x8F /**< L2CAP BLE Event last. */\n\n#define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */\n\n#define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */\n#define BLE_OPT_LAST 0x1F /**< Common BLE Option last. */\n\n#define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */\n#define BLE_GAP_OPT_LAST 0x3F /**< GAP BLE Option last. */\n\n#define BLE_GATT_OPT_BASE 0x40 /**< GATT BLE Option base. */\n#define BLE_GATT_OPT_LAST 0x5F /**< GATT BLE Option last. */\n\n#define BLE_GATTC_OPT_BASE 0x60 /**< GATTC BLE Option base. */\n#define BLE_GATTC_OPT_LAST 0x7F /**< GATTC BLE Option last. */\n\n#define BLE_GATTS_OPT_BASE 0x80 /**< GATTS BLE Option base. */\n#define BLE_GATTS_OPT_LAST 0x9F /**< GATTS BLE Option last. */\n\n#define BLE_L2CAP_OPT_BASE 0xA0 /**< L2CAP BLE Option base. */\n#define BLE_L2CAP_OPT_LAST 0xBF /**< L2CAP BLE Option last. */\n\n#define BLE_CFG_INVALID 0x00 /**< Invalid BLE configuration. */\n\n#define BLE_CFG_BASE 0x01 /**< Common BLE configuration base. */\n#define BLE_CFG_LAST 0x1F /**< Common BLE configuration last. */\n\n#define BLE_CONN_CFG_BASE 0x20 /**< BLE connection configuration base. */\n#define BLE_CONN_CFG_LAST 0x3F /**< BLE connection configuration last. */\n\n#define BLE_GAP_CFG_BASE 0x40 /**< GAP BLE configuration base. */\n#define BLE_GAP_CFG_LAST 0x5F /**< GAP BLE configuration last. */\n\n#define BLE_GATT_CFG_BASE 0x60 /**< GATT BLE configuration base. */\n#define BLE_GATT_CFG_LAST 0x7F /**< GATT BLE configuration last. */\n\n#define BLE_GATTC_CFG_BASE 0x80 /**< GATTC BLE configuration base. */\n#define BLE_GATTC_CFG_LAST 0x9F /**< GATTC BLE configuration last. */\n\n#define BLE_GATTS_CFG_BASE 0xA0 /**< GATTS BLE configuration base. */\n#define BLE_GATTS_CFG_LAST 0xBF /**< GATTS BLE configuration last. */\n\n#define BLE_L2CAP_CFG_BASE 0xC0 /**< L2CAP BLE configuration base. */\n#define BLE_L2CAP_CFG_LAST 0xDF /**< L2CAP BLE configuration last. */\n\n#ifdef __cplusplus\n}\n#endif\n#endif /* BLE_RANGES_H__ */\n\n/**\n  @}\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/ble_types.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup BLE_COMMON\n  @{\n  @defgroup ble_types Common types and macro definitions\n  @{\n\n  @brief Common types and macro definitions for the BLE SoftDevice.\n */\n\n#ifndef BLE_TYPES_H__\n#define BLE_TYPES_H__\n\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup BLE_TYPES_DEFINES Defines\n * @{ */\n\n/** @defgroup BLE_CONN_HANDLES BLE Connection Handles\n * @{ */\n#define BLE_CONN_HANDLE_INVALID 0xFFFF /**< Invalid Connection Handle. */\n#define BLE_CONN_HANDLE_ALL 0xFFFE     /**< Applies to all Connection Handles. */\n/** @} */\n\n/** @defgroup BLE_UUID_VALUES Assigned Values for BLE UUIDs\n * @{ */\n/* Generic UUIDs, applicable to all services */\n#define BLE_UUID_UNKNOWN 0x0000                             /**< Reserved UUID. */\n#define BLE_UUID_SERVICE_PRIMARY 0x2800                     /**< Primary Service. */\n#define BLE_UUID_SERVICE_SECONDARY 0x2801                   /**< Secondary Service. */\n#define BLE_UUID_SERVICE_INCLUDE 0x2802                     /**< Include. */\n#define BLE_UUID_CHARACTERISTIC 0x2803                      /**< Characteristic. */\n#define BLE_UUID_DESCRIPTOR_CHAR_EXT_PROP 0x2900            /**< Characteristic Extended Properties Descriptor. */\n#define BLE_UUID_DESCRIPTOR_CHAR_USER_DESC 0x2901           /**< Characteristic User Description Descriptor. */\n#define BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG 0x2902       /**< Client Characteristic Configuration Descriptor. */\n#define BLE_UUID_DESCRIPTOR_SERVER_CHAR_CONFIG 0x2903       /**< Server Characteristic Configuration Descriptor. */\n#define BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT 0x2904 /**< Characteristic Presentation Format Descriptor. */\n#define BLE_UUID_DESCRIPTOR_CHAR_AGGREGATE_FORMAT 0x2905    /**< Characteristic Aggregate Format Descriptor. */\n/* GATT specific UUIDs */\n#define BLE_UUID_GATT 0x1801                                /**< Generic Attribute Profile. */\n#define BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED 0x2A05 /**< Service Changed Characteristic. */\n/* GAP specific UUIDs */\n#define BLE_UUID_GAP 0x1800                            /**< Generic Access Profile. */\n#define BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME 0x2A00 /**< Device Name Characteristic. */\n#define BLE_UUID_GAP_CHARACTERISTIC_APPEARANCE 0x2A01  /**< Appearance Characteristic. */\n#define BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR 0x2A03 /**< Reconnection Address Characteristic. */\n#define BLE_UUID_GAP_CHARACTERISTIC_PPCP 0x2A04        /**< Peripheral Preferred Connection Parameters Characteristic. */\n#define BLE_UUID_GAP_CHARACTERISTIC_CAR 0x2AA6         /**< Central Address Resolution Characteristic. */\n#define BLE_UUID_GAP_CHARACTERISTIC_RPA_ONLY 0x2AC9    /**< Resolvable Private Address Only Characteristic. */\n/** @} */\n\n/** @defgroup BLE_UUID_TYPES Types of UUID\n * @{ */\n#define BLE_UUID_TYPE_UNKNOWN 0x00      /**< Invalid UUID type. */\n#define BLE_UUID_TYPE_BLE 0x01          /**< Bluetooth SIG UUID (16-bit). */\n#define BLE_UUID_TYPE_VENDOR_BEGIN 0x02 /**< Vendor UUID types start at this index (128-bit). */\n/** @} */\n\n/** @defgroup BLE_APPEARANCES Bluetooth Appearance values\n *  @note Retrieved from\n * http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml\n * @{ */\n#define BLE_APPEARANCE_UNKNOWN 0                             /**< Unknown. */\n#define BLE_APPEARANCE_GENERIC_PHONE 64                      /**< Generic Phone. */\n#define BLE_APPEARANCE_GENERIC_COMPUTER 128                  /**< Generic Computer. */\n#define BLE_APPEARANCE_GENERIC_WATCH 192                     /**< Generic Watch. */\n#define BLE_APPEARANCE_WATCH_SPORTS_WATCH 193                /**< Watch: Sports Watch. */\n#define BLE_APPEARANCE_GENERIC_CLOCK 256                     /**< Generic Clock. */\n#define BLE_APPEARANCE_GENERIC_DISPLAY 320                   /**< Generic Display. */\n#define BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384            /**< Generic Remote Control. */\n#define BLE_APPEARANCE_GENERIC_EYE_GLASSES 448               /**< Generic Eye-glasses. */\n#define BLE_APPEARANCE_GENERIC_TAG 512                       /**< Generic Tag. */\n#define BLE_APPEARANCE_GENERIC_KEYRING 576                   /**< Generic Keyring. */\n#define BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640              /**< Generic Media Player. */\n#define BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704           /**< Generic Barcode Scanner. */\n#define BLE_APPEARANCE_GENERIC_THERMOMETER 768               /**< Generic Thermometer. */\n#define BLE_APPEARANCE_THERMOMETER_EAR 769                   /**< Thermometer: Ear. */\n#define BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832         /**< Generic Heart rate Sensor. */\n#define BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833 /**< Heart Rate Sensor: Heart Rate Belt. */\n#define BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896            /**< Generic Blood Pressure. */\n#define BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897                /**< Blood Pressure: Arm. */\n#define BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898              /**< Blood Pressure: Wrist. */\n#define BLE_APPEARANCE_GENERIC_HID 960                       /**< Human Interface Device (HID). */\n#define BLE_APPEARANCE_HID_KEYBOARD 961                      /**< Keyboard (HID Subtype). */\n#define BLE_APPEARANCE_HID_MOUSE 962                         /**< Mouse (HID Subtype). */\n#define BLE_APPEARANCE_HID_JOYSTICK 963                      /**< Joystick (HID Subtype). */\n#define BLE_APPEARANCE_HID_GAMEPAD 964                       /**< Gamepad (HID Subtype). */\n#define BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965              /**< Digitizer Tablet (HID Subtype). */\n#define BLE_APPEARANCE_HID_CARD_READER 966                   /**< Card Reader (HID Subtype). */\n#define BLE_APPEARANCE_HID_DIGITAL_PEN 967                   /**< Digital Pen (HID Subtype). */\n#define BLE_APPEARANCE_HID_BARCODE 968                       /**< Barcode Scanner (HID Subtype). */\n#define BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024            /**< Generic Glucose Meter. */\n#define BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088   /**< Generic Running Walking Sensor. */\n#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089   /**< Running Walking Sensor: In-Shoe. */\n#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090   /**< Running Walking Sensor: On-Shoe. */\n#define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091    /**< Running Walking Sensor: On-Hip. */\n#define BLE_APPEARANCE_GENERIC_CYCLING 1152                  /**< Generic Cycling. */\n#define BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153         /**< Cycling: Cycling Computer. */\n#define BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154             /**< Cycling: Speed Sensor. */\n#define BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155           /**< Cycling: Cadence Sensor. */\n#define BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156             /**< Cycling: Power Sensor. */\n#define BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157     /**< Cycling: Speed and Cadence Sensor. */\n#define BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136           /**< Generic Pulse Oximeter. */\n#define BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137         /**< Fingertip (Pulse Oximeter subtype). */\n#define BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138        /**< Wrist Worn(Pulse Oximeter subtype). */\n#define BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200             /**< Generic Weight Scale. */\n#define BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184       /**< Generic Outdoor Sports Activity. */\n#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185      /**< Location Display Device (Outdoor Sports Activity subtype). */\n#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP                                                                       \\\n    5186 /**< Location and Navigation Display Device (Outdoor Sports Activity subtype). */\n#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187 /**< Location Pod (Outdoor Sports Activity subtype). */\n#define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD                                                                        \\\n    5188 /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */\n/** @} */\n\n/** @brief Set .type and .uuid fields of ble_uuid_struct to specified UUID value. */\n#define BLE_UUID_BLE_ASSIGN(instance, value)                                                                                     \\\n    do {                                                                                                                         \\\n        instance.type = BLE_UUID_TYPE_BLE;                                                                                       \\\n        instance.uuid = value;                                                                                                   \\\n    } while (0)\n\n/** @brief Copy type and uuid members from src to dst ble_uuid_t pointer. Both pointers must be valid/non-null. */\n#define BLE_UUID_COPY_PTR(dst, src)                                                                                              \\\n    do {                                                                                                                         \\\n        (dst)->type = (src)->type;                                                                                               \\\n        (dst)->uuid = (src)->uuid;                                                                                               \\\n    } while (0)\n\n/** @brief Copy type and uuid members from src to dst ble_uuid_t struct. */\n#define BLE_UUID_COPY_INST(dst, src)                                                                                             \\\n    do {                                                                                                                         \\\n        (dst).type = (src).type;                                                                                                 \\\n        (dst).uuid = (src).uuid;                                                                                                 \\\n    } while (0)\n\n/** @brief Compare for equality both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */\n#define BLE_UUID_EQ(p_uuid1, p_uuid2) (((p_uuid1)->type == (p_uuid2)->type) && ((p_uuid1)->uuid == (p_uuid2)->uuid))\n\n/** @brief Compare for difference both type and uuid members of two (valid, non-null) ble_uuid_t pointers. */\n#define BLE_UUID_NEQ(p_uuid1, p_uuid2) (((p_uuid1)->type != (p_uuid2)->type) || ((p_uuid1)->uuid != (p_uuid2)->uuid))\n\n/** @} */\n\n/** @addtogroup BLE_TYPES_STRUCTURES Structures\n * @{ */\n\n/** @brief 128 bit UUID values. */\ntypedef struct {\n    uint8_t uuid128[16]; /**< Little-Endian UUID bytes. */\n} ble_uuid128_t;\n\n/** @brief  Bluetooth Low Energy UUID type, encapsulates both 16-bit and 128-bit UUIDs. */\ntypedef struct {\n    uint16_t uuid; /**< 16-bit UUID value or octets 12-13 of 128-bit UUID. */\n    uint8_t\n        type; /**< UUID type, see @ref BLE_UUID_TYPES. If type is @ref BLE_UUID_TYPE_UNKNOWN, the value of uuid is undefined. */\n} ble_uuid_t;\n\n/**@brief Data structure. */\ntypedef struct {\n    uint8_t *p_data; /**< Pointer to the data buffer provided to/from the application. */\n    uint16_t len;    /**< Length of the data buffer, in bytes. */\n} ble_data_t;\n\n/** @} */\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* BLE_TYPES_H__ */\n\n/**\n  @}\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf52/nrf_mbr.h",
    "content": "/*\n * Copyright (c) 2014 - 2017, Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @defgroup nrf_mbr_api Master Boot Record API\n  @{\n\n  @brief APIs for updating SoftDevice and BootLoader\n\n*/\n\n#ifndef NRF_MBR_H__\n#define NRF_MBR_H__\n\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup NRF_MBR_DEFINES Defines\n * @{ */\n\n/**@brief MBR SVC Base number. */\n#define MBR_SVC_BASE (0x18)\n\n/**@brief Page size in words. */\n#define MBR_PAGE_SIZE_IN_WORDS (1024)\n\n/** @brief The size that must be reserved for the MBR when a SoftDevice is written to flash.\nThis is the offset where the first byte of the SoftDevice hex file is written. */\n#define MBR_SIZE (0x1000)\n\n/** @brief Location (in the flash memory) of the bootloader address. */\n#define MBR_BOOTLOADER_ADDR (0xFF8)\n\n/** @brief Location (in UICR) of the bootloader address. */\n#define MBR_UICR_BOOTLOADER_ADDR (&(NRF_UICR->NRFFW[0]))\n\n/** @brief Location (in the flash memory) of the address of the MBR parameter page. */\n#define MBR_PARAM_PAGE_ADDR (0xFFC)\n\n/** @brief Location (in UICR) of the address of the MBR parameter page. */\n#define MBR_UICR_PARAM_PAGE_ADDR (&(NRF_UICR->NRFFW[1]))\n\n/** @} */\n\n/** @addtogroup NRF_MBR_ENUMS Enumerations\n * @{ */\n\n/**@brief nRF Master Boot Record API SVC numbers. */\nenum NRF_MBR_SVCS {\n    SD_MBR_COMMAND = MBR_SVC_BASE, /**< ::sd_mbr_command */\n};\n\n/**@brief Possible values for ::sd_mbr_command_t.command */\nenum NRF_MBR_COMMANDS {\n    SD_MBR_COMMAND_COPY_BL, /**< Copy a new BootLoader. @see ::sd_mbr_command_copy_bl_t*/\n    SD_MBR_COMMAND_COPY_SD, /**< Copy a new SoftDevice. @see ::sd_mbr_command_copy_sd_t*/\n    SD_MBR_COMMAND_INIT_SD, /**< Initialize forwarding interrupts to SD, and run reset function in SD. Does not require any\n                               parameters in ::sd_mbr_command_t params.*/\n    SD_MBR_COMMAND_COMPARE, /**< This command works like memcmp. @see ::sd_mbr_command_compare_t*/\n    SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET, /**< Change the address the MBR starts after a reset. @see\n                                             ::sd_mbr_command_vector_table_base_set_t*/\n    SD_MBR_COMMAND_RESERVED,\n    SD_MBR_COMMAND_IRQ_FORWARD_ADDRESS_SET, /**< Start forwarding all interrupts to this address. @see\n                                               ::sd_mbr_command_irq_forward_address_set_t*/\n};\n\n/** @} */\n\n/** @addtogroup NRF_MBR_TYPES Types\n * @{ */\n\n/**@brief This command copies part of a new SoftDevice\n *\n * The destination area is erased before copying.\n * If dst is in the middle of a flash page, that whole flash page will be erased.\n * If (dst+len) is in the middle of a flash page, that whole flash page will be erased.\n *\n * The user of this function is responsible for setting the BPROT registers.\n *\n * @retval ::NRF_SUCCESS indicates that the contents of the memory blocks where copied correctly.\n * @retval ::NRF_ERROR_INTERNAL indicates that the contents of the memory blocks where not verified correctly after copying.\n */\ntypedef struct {\n    uint32_t *src; /**< Pointer to the source of data to be copied.*/\n    uint32_t *dst; /**< Pointer to the destination where the content is to be copied.*/\n    uint32_t len;  /**< Number of 32 bit words to copy. Must be a multiple of @ref MBR_PAGE_SIZE_IN_WORDS words.*/\n} sd_mbr_command_copy_sd_t;\n\n/**@brief This command works like memcmp, but takes the length in words.\n *\n * @retval ::NRF_SUCCESS indicates that the contents of both memory blocks are equal.\n * @retval ::NRF_ERROR_NULL indicates that the contents of the memory blocks are not equal.\n */\ntypedef struct {\n    uint32_t *ptr1; /**< Pointer to block of memory. */\n    uint32_t *ptr2; /**< Pointer to block of memory. */\n    uint32_t len;   /**< Number of 32 bit words to compare.*/\n} sd_mbr_command_compare_t;\n\n/**@brief This command copies a new BootLoader.\n *\n * The MBR assumes that either @ref MBR_BOOTLOADER_ADDR or @ref MBR_UICR_BOOTLOADER_ADDR is set to\n * the address where the bootloader will be copied. If both addresses are set, the MBR will prioritize\n * @ref MBR_BOOTLOADER_ADDR.\n *\n * The bootloader destination is erased by this function.\n * If (destination+bl_len) is in the middle of a flash page, that whole flash page will be erased.\n *\n * This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set,\n * see @ref sd_mbr_command.\n *\n * This command will use the flash protect peripheral (BPROT or ACL) to protect the flash that is\n * not intended to be written.\n *\n * On success, this function will not return. It will start the new bootloader from reset-vector as normal.\n *\n * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen.\n * @retval ::NRF_ERROR_FORBIDDEN if the bootloader address is not set.\n * @retval ::NRF_ERROR_INVALID_LENGTH if parameters attempts to read or write outside flash area.\n * @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command.\n */\ntypedef struct {\n    uint32_t *bl_src; /**< Pointer to the source of the bootloader to be be copied.*/\n    uint32_t bl_len;  /**< Number of 32 bit words to copy for BootLoader. */\n} sd_mbr_command_copy_bl_t;\n\n/**@brief Change the address the MBR starts after a reset\n *\n * Once this function has been called, this address is where the MBR will start to forward\n * interrupts to after a reset.\n *\n * To restore default forwarding, this function should be called with @ref address set to 0. If a\n * bootloader is present, interrupts will be forwarded to the bootloader. If not, interrupts will\n * be forwarded to the SoftDevice.\n *\n * The location of a bootloader can be specified in @ref MBR_BOOTLOADER_ADDR or\n * @ref MBR_UICR_BOOTLOADER_ADDR. If both addresses are set, the MBR will prioritize\n * @ref MBR_BOOTLOADER_ADDR.\n *\n * This command requires that @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR is set,\n * see @ref sd_mbr_command.\n *\n * On success, this function will not return. It will reset the device.\n *\n * @retval ::NRF_ERROR_INTERNAL indicates an internal error that should not happen.\n * @retval ::NRF_ERROR_INVALID_ADDR if parameter address is outside of the flash size.\n * @retval ::NRF_ERROR_NO_MEM No MBR parameter page is provided. See @ref sd_mbr_command.\n */\ntypedef struct {\n    uint32_t address; /**< The base address of the interrupt vector table for forwarded interrupts.*/\n} sd_mbr_command_vector_table_base_set_t;\n\n/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the MBR\n *\n * Unlike sd_mbr_command_vector_table_base_set_t, this function does not reset, and it does not\n * change where the MBR starts after reset.\n *\n * @retval ::NRF_SUCCESS\n */\ntypedef struct {\n    uint32_t address; /**< The base address of the interrupt vector table for forwarded interrupts.*/\n} sd_mbr_command_irq_forward_address_set_t;\n\n/**@brief Input structure containing data used when calling ::sd_mbr_command\n *\n * Depending on what command value that is set, the corresponding params value type must also be\n * set. See @ref NRF_MBR_COMMANDS for command types and corresponding params value type. If command\n * @ref SD_MBR_COMMAND_INIT_SD is set, it is not necessary to set any values under params.\n */\ntypedef struct {\n    uint32_t command; /**< Type of command to be issued. See @ref NRF_MBR_COMMANDS. */\n    union {\n        sd_mbr_command_copy_sd_t copy_sd;                /**< Parameters for copy SoftDevice.*/\n        sd_mbr_command_compare_t compare;                /**< Parameters for verify.*/\n        sd_mbr_command_copy_bl_t copy_bl;                /**< Parameters for copy BootLoader. Requires parameter page. */\n        sd_mbr_command_vector_table_base_set_t base_set; /**< Parameters for vector table base set. Requires parameter page.*/\n        sd_mbr_command_irq_forward_address_set_t irq_forward_address_set; /**< Parameters for irq forward address set*/\n    } params;                                                             /**< Command parameters. */\n} sd_mbr_command_t;\n\n/** @} */\n\n/** @addtogroup NRF_MBR_FUNCTIONS Functions\n * @{ */\n\n/**@brief Issue Master Boot Record commands\n *\n * Commands used when updating a SoftDevice and bootloader.\n *\n * The @ref SD_MBR_COMMAND_COPY_BL and @ref SD_MBR_COMMAND_VECTOR_TABLE_BASE_SET requires\n * parameters to be retained by the MBR when resetting the IC. This is done in a separate flash\n * page. The location of the flash page should be provided by the application in either\n * @ref MBR_PARAM_PAGE_ADDR or @ref MBR_UICR_PARAM_PAGE_ADDR. If both addresses are set, the MBR\n * will prioritize @ref MBR_PARAM_PAGE_ADDR. This page will be cleared by the MBR and is used to\n * store the command before reset. When an address is specified, the page it refers to must not be\n * used by the application. If no address is provided by the application, i.e. both\n * @ref MBR_PARAM_PAGE_ADDR and @ref MBR_UICR_PARAM_PAGE_ADDR is 0xFFFFFFFF, MBR commands which use\n * flash will be unavailable and return @ref NRF_ERROR_NO_MEM.\n *\n * @param[in]  param Pointer to a struct describing the command.\n *\n * @note For a complete set of return values, see ::sd_mbr_command_copy_sd_t,\n *       ::sd_mbr_command_copy_bl_t, ::sd_mbr_command_compare_t,\n *       ::sd_mbr_command_vector_table_base_set_t, ::sd_mbr_command_irq_forward_address_set_t\n *\n * @retval ::NRF_ERROR_NO_MEM No MBR parameter page provided\n * @retval ::NRF_ERROR_INVALID_PARAM if an invalid command is given.\n */\nSVCALL(SD_MBR_COMMAND, uint32_t, sd_mbr_command(sd_mbr_command_t *param));\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // NRF_MBR_H__\n\n/**\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf_error.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n @defgroup nrf_error SoftDevice Global Error Codes\n @{\n\n @brief Global Error definitions\n*/\n\n/* Header guard */\n#ifndef NRF_ERROR_H__\n#define NRF_ERROR_H__\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @defgroup NRF_ERRORS_BASE Error Codes Base number definitions\n * @{ */\n#define NRF_ERROR_BASE_NUM (0x0)        ///< Global error base\n#define NRF_ERROR_SDM_BASE_NUM (0x1000) ///< SDM error base\n#define NRF_ERROR_SOC_BASE_NUM (0x2000) ///< SoC error base\n#define NRF_ERROR_STK_BASE_NUM (0x3000) ///< STK error base\n/** @} */\n\n#define NRF_SUCCESS (NRF_ERROR_BASE_NUM + 0)                      ///< Successful command\n#define NRF_ERROR_SVC_HANDLER_MISSING (NRF_ERROR_BASE_NUM + 1)    ///< SVC handler is missing\n#define NRF_ERROR_SOFTDEVICE_NOT_ENABLED (NRF_ERROR_BASE_NUM + 2) ///< SoftDevice has not been enabled\n#define NRF_ERROR_INTERNAL (NRF_ERROR_BASE_NUM + 3)               ///< Internal Error\n#define NRF_ERROR_NO_MEM (NRF_ERROR_BASE_NUM + 4)                 ///< No Memory for operation\n#define NRF_ERROR_NOT_FOUND (NRF_ERROR_BASE_NUM + 5)              ///< Not found\n#define NRF_ERROR_NOT_SUPPORTED (NRF_ERROR_BASE_NUM + 6)          ///< Not supported\n#define NRF_ERROR_INVALID_PARAM (NRF_ERROR_BASE_NUM + 7)          ///< Invalid Parameter\n#define NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8)          ///< Invalid state, operation disallowed in this state\n#define NRF_ERROR_INVALID_LENGTH (NRF_ERROR_BASE_NUM + 9)         ///< Invalid Length\n#define NRF_ERROR_INVALID_FLAGS (NRF_ERROR_BASE_NUM + 10)         ///< Invalid Flags\n#define NRF_ERROR_INVALID_DATA (NRF_ERROR_BASE_NUM + 11)          ///< Invalid Data\n#define NRF_ERROR_DATA_SIZE (NRF_ERROR_BASE_NUM + 12)             ///< Invalid Data size\n#define NRF_ERROR_TIMEOUT (NRF_ERROR_BASE_NUM + 13)               ///< Operation timed out\n#define NRF_ERROR_NULL (NRF_ERROR_BASE_NUM + 14)                  ///< Null Pointer\n#define NRF_ERROR_FORBIDDEN (NRF_ERROR_BASE_NUM + 15)             ///< Forbidden Operation\n#define NRF_ERROR_INVALID_ADDR (NRF_ERROR_BASE_NUM + 16)          ///< Bad Memory Address\n#define NRF_ERROR_BUSY (NRF_ERROR_BASE_NUM + 17)                  ///< Busy\n#define NRF_ERROR_CONN_COUNT (NRF_ERROR_BASE_NUM + 18)            ///< Maximum connection count exceeded.\n#define NRF_ERROR_RESOURCES (NRF_ERROR_BASE_NUM + 19)             ///< Not enough resources for operation\n\n#ifdef __cplusplus\n}\n#endif\n#endif // NRF_ERROR_H__\n\n/**\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf_error_sdm.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n @addtogroup nrf_sdm_api\n @{\n @defgroup nrf_sdm_error SoftDevice Manager Error Codes\n @{\n\n @brief Error definitions for the SDM API\n*/\n\n/* Header guard */\n#ifndef NRF_ERROR_SDM_H__\n#define NRF_ERROR_SDM_H__\n\n#include \"nrf_error.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN (NRF_ERROR_SDM_BASE_NUM + 0) ///< Unknown LFCLK source.\n#define NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION                                                                          \\\n    (NRF_ERROR_SDM_BASE_NUM + 1) ///< Incorrect interrupt configuration (can be caused by using illegal priority levels, or having\n                                 ///< enabled SoftDevice interrupts).\n#define NRF_ERROR_SDM_INCORRECT_CLENR0                                                                                           \\\n    (NRF_ERROR_SDM_BASE_NUM + 2) ///< Incorrect CLENR0 (can be caused by erroneous SoftDevice flashing).\n\n#ifdef __cplusplus\n}\n#endif\n#endif // NRF_ERROR_SDM_H__\n\n/**\n  @}\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf_error_soc.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @addtogroup nrf_soc_api\n  @{\n  @defgroup nrf_soc_error SoC Library Error Codes\n  @{\n\n  @brief Error definitions for the SoC library\n\n*/\n\n/* Header guard */\n#ifndef NRF_ERROR_SOC_H__\n#define NRF_ERROR_SOC_H__\n\n#include \"nrf_error.h\"\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Mutex Errors */\n#define NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN (NRF_ERROR_SOC_BASE_NUM + 0) ///< Mutex already taken\n\n/* NVIC errors */\n#define NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE (NRF_ERROR_SOC_BASE_NUM + 1)        ///< NVIC interrupt not available\n#define NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED (NRF_ERROR_SOC_BASE_NUM + 2) ///< NVIC interrupt priority not allowed\n#define NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 3)              ///< NVIC should not return\n\n/* Power errors */\n#define NRF_ERROR_SOC_POWER_MODE_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 4)          ///< Power mode unknown\n#define NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 5) ///< Power POF threshold unknown\n#define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 6) ///< Power off should not return\n\n/* Rand errors */\n#define NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES (NRF_ERROR_SOC_BASE_NUM + 7) ///< RAND not enough values\n\n/* PPI errors */\n#define NRF_ERROR_SOC_PPI_INVALID_CHANNEL (NRF_ERROR_SOC_BASE_NUM + 8) ///< Invalid PPI Channel\n#define NRF_ERROR_SOC_PPI_INVALID_GROUP (NRF_ERROR_SOC_BASE_NUM + 9)   ///< Invalid PPI Group\n\n#ifdef __cplusplus\n}\n#endif\n#endif // NRF_ERROR_SOC_H__\n/**\n  @}\n  @}\n*/\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf_nvic.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * @defgroup nrf_nvic_api SoftDevice NVIC API\n * @{\n *\n * @note In order to use this module, the following code has to be added to a .c file:\n *     \\code\n *     nrf_nvic_state_t nrf_nvic_state = {0};\n *     \\endcode\n *\n * @note Definitions and declarations starting with __ (double underscore) in this header file are\n * not intended for direct use by the application.\n *\n * @brief APIs for the accessing NVIC when using a SoftDevice.\n *\n */\n\n#ifndef NRF_NVIC_H__\n#define NRF_NVIC_H__\n\n#include \"nrf.h\"\n#include \"nrf_error.h\"\n#include \"nrf_error_soc.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**@addtogroup NRF_NVIC_DEFINES Defines\n * @{ */\n\n/**@defgroup NRF_NVIC_ISER_DEFINES SoftDevice NVIC internal definitions\n * @{ */\n\n#define __NRF_NVIC_NVMC_IRQn                                                                                                     \\\n    (30) /**< The peripheral ID of the NVMC. IRQ numbers are used to identify peripherals, but the NVMC doesn't have an IRQ      \\\n            number in the MDK. */\n\n#define __NRF_NVIC_ISER_COUNT (2) /**< The number of ISER/ICER registers in the NVIC that are used. */\n\n/**@brief Interrupt priority levels used by the SoftDevice. */\n#define __NRF_NVIC_SD_IRQ_PRIOS                                                                                                  \\\n    ((uint8_t)((1U << 0)   /**< Priority level high .*/                                                                          \\\n               | (1U << 1) /**< Priority level medium. */                                                                        \\\n               | (1U << 4) /**< Priority level low. */                                                                           \\\n               ))\n\n/**@brief Interrupt priority levels available to the application. */\n#define __NRF_NVIC_APP_IRQ_PRIOS ((uint8_t)~__NRF_NVIC_SD_IRQ_PRIOS)\n\n/**@brief Interrupts used by the SoftDevice, with IRQn in the range 0-31. */\n#define __NRF_NVIC_SD_IRQS_0                                                                                                     \\\n    ((uint32_t)((1U << POWER_CLOCK_IRQn) | (1U << RADIO_IRQn) | (1U << RTC0_IRQn) | (1U << TIMER0_IRQn) | (1U << RNG_IRQn) |     \\\n                (1U << ECB_IRQn) | (1U << CCM_AAR_IRQn) | (1U << TEMP_IRQn) | (1U << __NRF_NVIC_NVMC_IRQn) |                     \\\n                (1U << (uint32_t)SWI5_IRQn)))\n\n/**@brief Interrupts used by the SoftDevice, with IRQn in the range 32-63. */\n#define __NRF_NVIC_SD_IRQS_1 ((uint32_t)0)\n\n/**@brief Interrupts available for to application, with IRQn in the range 0-31. */\n#define __NRF_NVIC_APP_IRQS_0 (~__NRF_NVIC_SD_IRQS_0)\n\n/**@brief Interrupts available for to application, with IRQn in the range 32-63. */\n#define __NRF_NVIC_APP_IRQS_1 (~__NRF_NVIC_SD_IRQS_1)\n\n/**@} */\n\n/**@} */\n\n/**@addtogroup NRF_NVIC_VARIABLES Variables\n * @{ */\n\n/**@brief Type representing the state struct for the SoftDevice NVIC module. */\ntypedef struct {\n    uint32_t volatile __irq_masks[__NRF_NVIC_ISER_COUNT]; /**< IRQs enabled by the application in the NVIC. */\n    uint32_t volatile __cr_flag;                          /**< Non-zero if already in a critical region */\n} nrf_nvic_state_t;\n\n/**@brief Variable keeping the state for the SoftDevice NVIC module. This must be declared in an\n * application source file. */\nextern nrf_nvic_state_t nrf_nvic_state;\n\n/**@} */\n\n/**@addtogroup NRF_NVIC_INTERNAL_FUNCTIONS SoftDevice NVIC internal functions\n * @{ */\n\n/**@brief Disables IRQ interrupts globally, including the SoftDevice's interrupts.\n *\n * @retval  The value of PRIMASK prior to disabling the interrupts.\n */\n__STATIC_INLINE int __sd_nvic_irq_disable(void);\n\n/**@brief Enables IRQ interrupts globally, including the SoftDevice's interrupts.\n */\n__STATIC_INLINE void __sd_nvic_irq_enable(void);\n\n/**@brief Checks if IRQn is available to application\n * @param[in]  IRQn  IRQ to check\n *\n * @retval  1 (true) if the IRQ to check is available to the application\n */\n__STATIC_INLINE uint32_t __sd_nvic_app_accessible_irq(IRQn_Type IRQn);\n\n/**@brief Checks if priority is available to application\n * @param[in]  priority  priority to check\n *\n * @retval  1 (true) if the priority to check is available to the application\n */\n__STATIC_INLINE uint32_t __sd_nvic_is_app_accessible_priority(uint32_t priority);\n\n/**@} */\n\n/**@addtogroup NRF_NVIC_FUNCTIONS SoftDevice NVIC public functions\n * @{ */\n\n/**@brief Enable External Interrupt.\n * @note Corresponds to NVIC_EnableIRQ in CMSIS.\n *\n * @pre IRQn is valid and not reserved by the stack.\n *\n * @param[in] IRQn See the NVIC_EnableIRQ documentation in CMSIS.\n *\n * @retval ::NRF_SUCCESS The interrupt was enabled.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt has a priority not available for the application.\n */\n__STATIC_INLINE uint32_t sd_nvic_EnableIRQ(IRQn_Type IRQn);\n\n/**@brief  Disable External Interrupt.\n * @note Corresponds to NVIC_DisableIRQ in CMSIS.\n *\n * @pre IRQn is valid and not reserved by the stack.\n *\n * @param[in] IRQn See the NVIC_DisableIRQ documentation in CMSIS.\n *\n * @retval ::NRF_SUCCESS The interrupt was disabled.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application.\n */\n__STATIC_INLINE uint32_t sd_nvic_DisableIRQ(IRQn_Type IRQn);\n\n/**@brief  Get Pending Interrupt.\n * @note Corresponds to NVIC_GetPendingIRQ in CMSIS.\n *\n * @pre IRQn is valid and not reserved by the stack.\n *\n * @param[in]   IRQn          See the NVIC_GetPendingIRQ documentation in CMSIS.\n * @param[out]  p_pending_irq Return value from NVIC_GetPendingIRQ.\n *\n * @retval ::NRF_SUCCESS The interrupt is available for the application.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.\n */\n__STATIC_INLINE uint32_t sd_nvic_GetPendingIRQ(IRQn_Type IRQn, uint32_t *p_pending_irq);\n\n/**@brief  Set Pending Interrupt.\n * @note Corresponds to NVIC_SetPendingIRQ in CMSIS.\n *\n * @pre IRQn is valid and not reserved by the stack.\n *\n * @param[in] IRQn See the NVIC_SetPendingIRQ documentation in CMSIS.\n *\n * @retval ::NRF_SUCCESS The interrupt is set pending.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.\n */\n__STATIC_INLINE uint32_t sd_nvic_SetPendingIRQ(IRQn_Type IRQn);\n\n/**@brief  Clear Pending Interrupt.\n * @note Corresponds to NVIC_ClearPendingIRQ in CMSIS.\n *\n * @pre IRQn is valid and not reserved by the stack.\n *\n * @param[in] IRQn See the NVIC_ClearPendingIRQ documentation in CMSIS.\n *\n * @retval ::NRF_SUCCESS The interrupt pending flag is cleared.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.\n */\n__STATIC_INLINE uint32_t sd_nvic_ClearPendingIRQ(IRQn_Type IRQn);\n\n/**@brief Set Interrupt Priority.\n * @note Corresponds to NVIC_SetPriority in CMSIS.\n *\n * @pre IRQn is valid and not reserved by the stack.\n * @pre Priority is valid and not reserved by the stack.\n *\n * @param[in] IRQn      See the NVIC_SetPriority documentation in CMSIS.\n * @param[in] priority  A valid IRQ priority for use by the application.\n *\n * @retval ::NRF_SUCCESS The interrupt and priority level is available for the application.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt priority is not available for the application.\n */\n__STATIC_INLINE uint32_t sd_nvic_SetPriority(IRQn_Type IRQn, uint32_t priority);\n\n/**@brief Get Interrupt Priority.\n * @note Corresponds to NVIC_GetPriority in CMSIS.\n *\n * @pre IRQn is valid and not reserved by the stack.\n *\n * @param[in]  IRQn         See the NVIC_GetPriority documentation in CMSIS.\n * @param[out] p_priority   Return value from NVIC_GetPriority.\n *\n * @retval ::NRF_SUCCESS The interrupt priority is returned in p_priority.\n * @retval ::NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE - IRQn is not available for the application.\n */\n__STATIC_INLINE uint32_t sd_nvic_GetPriority(IRQn_Type IRQn, uint32_t *p_priority);\n\n/**@brief System Reset.\n * @note Corresponds to NVIC_SystemReset in CMSIS.\n *\n * @retval ::NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN\n */\n__STATIC_INLINE uint32_t sd_nvic_SystemReset(void);\n\n/**@brief Enter critical region.\n *\n * @post Application interrupts will be disabled.\n * @note sd_nvic_critical_region_enter() and ::sd_nvic_critical_region_exit() must be called in matching pairs inside each\n * execution context\n * @sa sd_nvic_critical_region_exit\n *\n * @param[out] p_is_nested_critical_region If 1, the application is now in a nested critical region.\n *\n * @retval ::NRF_SUCCESS\n */\n__STATIC_INLINE uint32_t sd_nvic_critical_region_enter(uint8_t *p_is_nested_critical_region);\n\n/**@brief Exit critical region.\n *\n * @pre Application has entered a critical region using ::sd_nvic_critical_region_enter.\n * @post If not in a nested critical region, the application interrupts will restored to the state before\n * ::sd_nvic_critical_region_enter was called.\n *\n * @param[in] is_nested_critical_region If this is set to 1, the critical region won't be exited. @sa\n * sd_nvic_critical_region_enter.\n *\n * @retval ::NRF_SUCCESS\n */\n__STATIC_INLINE uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region);\n\n/**@} */\n\n#ifndef SUPPRESS_INLINE_IMPLEMENTATION\n\n__STATIC_INLINE int __sd_nvic_irq_disable(void)\n{\n    int pm = __get_PRIMASK();\n    __disable_irq();\n    return pm;\n}\n\n__STATIC_INLINE void __sd_nvic_irq_enable(void)\n{\n    __enable_irq();\n}\n\n__STATIC_INLINE uint32_t __sd_nvic_app_accessible_irq(IRQn_Type IRQn)\n{\n    if (IRQn < 32) {\n        return ((1UL << IRQn) & __NRF_NVIC_APP_IRQS_0) != 0;\n    } else if (IRQn < 64) {\n        return ((1UL << (IRQn - 32)) & __NRF_NVIC_APP_IRQS_1) != 0;\n    } else {\n        return 1;\n    }\n}\n\n__STATIC_INLINE uint32_t __sd_nvic_is_app_accessible_priority(uint32_t priority)\n{\n    if ((priority >= (1 << __NVIC_PRIO_BITS)) || (((1 << priority) & __NRF_NVIC_APP_IRQ_PRIOS) == 0)) {\n        return 0;\n    }\n    return 1;\n}\n\n__STATIC_INLINE uint32_t sd_nvic_EnableIRQ(IRQn_Type IRQn)\n{\n    if (!__sd_nvic_app_accessible_irq(IRQn)) {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE;\n    }\n    if (!__sd_nvic_is_app_accessible_priority(NVIC_GetPriority(IRQn))) {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED;\n    }\n\n    if (nrf_nvic_state.__cr_flag) {\n        nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] |=\n            (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F));\n    } else {\n        NVIC_EnableIRQ(IRQn);\n    }\n    return NRF_SUCCESS;\n}\n\n__STATIC_INLINE uint32_t sd_nvic_DisableIRQ(IRQn_Type IRQn)\n{\n    if (!__sd_nvic_app_accessible_irq(IRQn)) {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE;\n    }\n\n    if (nrf_nvic_state.__cr_flag) {\n        nrf_nvic_state.__irq_masks[(uint32_t)((int32_t)IRQn) >> 5] &= ~(1UL << ((uint32_t)(IRQn)&0x1F));\n    } else {\n        NVIC_DisableIRQ(IRQn);\n    }\n\n    return NRF_SUCCESS;\n}\n\n__STATIC_INLINE uint32_t sd_nvic_GetPendingIRQ(IRQn_Type IRQn, uint32_t *p_pending_irq)\n{\n    if (__sd_nvic_app_accessible_irq(IRQn)) {\n        *p_pending_irq = NVIC_GetPendingIRQ(IRQn);\n        return NRF_SUCCESS;\n    } else {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE;\n    }\n}\n\n__STATIC_INLINE uint32_t sd_nvic_SetPendingIRQ(IRQn_Type IRQn)\n{\n    if (__sd_nvic_app_accessible_irq(IRQn)) {\n        NVIC_SetPendingIRQ(IRQn);\n        return NRF_SUCCESS;\n    } else {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE;\n    }\n}\n\n__STATIC_INLINE uint32_t sd_nvic_ClearPendingIRQ(IRQn_Type IRQn)\n{\n    if (__sd_nvic_app_accessible_irq(IRQn)) {\n        NVIC_ClearPendingIRQ(IRQn);\n        return NRF_SUCCESS;\n    } else {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE;\n    }\n}\n\n__STATIC_INLINE uint32_t sd_nvic_SetPriority(IRQn_Type IRQn, uint32_t priority)\n{\n    if (!__sd_nvic_app_accessible_irq(IRQn)) {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE;\n    }\n\n    if (!__sd_nvic_is_app_accessible_priority(priority)) {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED;\n    }\n\n    NVIC_SetPriority(IRQn, (uint32_t)priority);\n    return NRF_SUCCESS;\n}\n\n__STATIC_INLINE uint32_t sd_nvic_GetPriority(IRQn_Type IRQn, uint32_t *p_priority)\n{\n    if (__sd_nvic_app_accessible_irq(IRQn)) {\n        *p_priority = (NVIC_GetPriority(IRQn) & 0xFF);\n        return NRF_SUCCESS;\n    } else {\n        return NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE;\n    }\n}\n\n__STATIC_INLINE uint32_t sd_nvic_SystemReset(void)\n{\n    NVIC_SystemReset();\n    return NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN;\n}\n\n__STATIC_INLINE uint32_t sd_nvic_critical_region_enter(uint8_t *p_is_nested_critical_region)\n{\n    int was_masked = __sd_nvic_irq_disable();\n    if (!nrf_nvic_state.__cr_flag) {\n        nrf_nvic_state.__cr_flag = 1;\n        nrf_nvic_state.__irq_masks[0] = (NVIC->ICER[0] & __NRF_NVIC_APP_IRQS_0);\n        NVIC->ICER[0] = __NRF_NVIC_APP_IRQS_0;\n        nrf_nvic_state.__irq_masks[1] = (NVIC->ICER[1] & __NRF_NVIC_APP_IRQS_1);\n        NVIC->ICER[1] = __NRF_NVIC_APP_IRQS_1;\n        *p_is_nested_critical_region = 0;\n    } else {\n        *p_is_nested_critical_region = 1;\n    }\n    if (!was_masked) {\n        __sd_nvic_irq_enable();\n    }\n    return NRF_SUCCESS;\n}\n\n__STATIC_INLINE uint32_t sd_nvic_critical_region_exit(uint8_t is_nested_critical_region)\n{\n    if (nrf_nvic_state.__cr_flag && (is_nested_critical_region == 0)) {\n        int was_masked = __sd_nvic_irq_disable();\n        NVIC->ISER[0] = nrf_nvic_state.__irq_masks[0];\n        NVIC->ISER[1] = nrf_nvic_state.__irq_masks[1];\n        nrf_nvic_state.__cr_flag = 0;\n        if (!was_masked) {\n            __sd_nvic_irq_enable();\n        }\n    }\n\n    return NRF_SUCCESS;\n}\n\n#endif /* SUPPRESS_INLINE_IMPLEMENTATION */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // NRF_NVIC_H__\n\n/**@} */\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf_sdm.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n  @defgroup nrf_sdm_api SoftDevice Manager API\n  @{\n\n  @brief APIs for SoftDevice management.\n\n*/\n\n#ifndef NRF_SDM_H__\n#define NRF_SDM_H__\n\n#include \"nrf.h\"\n#include \"nrf_error.h\"\n#include \"nrf_error_sdm.h\"\n#include \"nrf_soc.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @addtogroup NRF_SDM_DEFINES Defines\n * @{ */\n#ifdef NRFSOC_DOXYGEN\n/// Declared in nrf_mbr.h\n#define MBR_SIZE 0\n#warning test\n#endif\n\n/** @brief The major version for the SoftDevice binary distributed with this header file. */\n#define SD_MAJOR_VERSION (7)\n\n/** @brief The minor version for the SoftDevice binary distributed with this header file. */\n#define SD_MINOR_VERSION (3)\n\n/** @brief The bugfix version for the SoftDevice binary distributed with this header file. */\n#define SD_BUGFIX_VERSION (0)\n\n/** @brief The SoftDevice variant of this firmware. */\n#define SD_VARIANT_ID 140\n\n/** @brief The full version number for the SoftDevice binary this header file was distributed\n *         with, as a decimal number in the form Mmmmbbb, where:\n *           - M is major version (one or more digits)\n *           - mmm is minor version (three digits)\n *           - bbb is bugfix version (three digits). */\n#define SD_VERSION (SD_MAJOR_VERSION * 1000000 + SD_MINOR_VERSION * 1000 + SD_BUGFIX_VERSION)\n\n/** @brief SoftDevice Manager SVC Base number. */\n#define SDM_SVC_BASE 0x10\n\n/** @brief SoftDevice unique string size in bytes. */\n#define SD_UNIQUE_STR_SIZE 20\n\n/** @brief Invalid info field. Returned when an info field does not exist. */\n#define SDM_INFO_FIELD_INVALID (0)\n\n/** @brief Defines the SoftDevice Information Structure location (address) as an offset from\nthe start of the SoftDevice (without MBR)*/\n#define SOFTDEVICE_INFO_STRUCT_OFFSET (0x2000)\n\n/** @brief Defines the absolute SoftDevice Information Structure location (address) when the\n *         SoftDevice is installed just above the MBR (the usual case). */\n#define SOFTDEVICE_INFO_STRUCT_ADDRESS (SOFTDEVICE_INFO_STRUCT_OFFSET + MBR_SIZE)\n\n/** @brief Defines the offset for the SoftDevice Information Structure size value relative to the\n *         SoftDevice base address. The size value is of type uint8_t. */\n#define SD_INFO_STRUCT_SIZE_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET)\n\n/** @brief Defines the offset for the SoftDevice size value relative to the SoftDevice base address.\n *         The size value is of type uint32_t. */\n#define SD_SIZE_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x08)\n\n/** @brief Defines the offset for FWID value relative to the SoftDevice base address. The FWID value\n *         is of type uint16_t.  */\n#define SD_FWID_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x0C)\n\n/** @brief Defines the offset for the SoftDevice ID relative to the SoftDevice base address. The ID\n *         is of type uint32_t. */\n#define SD_ID_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x10)\n\n/** @brief Defines the offset for the SoftDevice version relative to the SoftDevice base address in\n *         the same format as @ref SD_VERSION, stored as an uint32_t. */\n#define SD_VERSION_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x14)\n\n/** @brief Defines the offset for the SoftDevice unique string relative to the SoftDevice base address.\n *         The SD_UNIQUE_STR is stored as an array of uint8_t. The size of array is @ref SD_UNIQUE_STR_SIZE.\n */\n#define SD_UNIQUE_STR_OFFSET (SOFTDEVICE_INFO_STRUCT_OFFSET + 0x18)\n\n/** @brief Defines a macro for retrieving the actual SoftDevice Information Structure size value\n *         from a given base address. Use @ref MBR_SIZE as the argument when the SoftDevice is\n *         installed just above the MBR (the usual case). */\n#define SD_INFO_STRUCT_SIZE_GET(baseaddr) (*((uint8_t *)((baseaddr) + SD_INFO_STRUCT_SIZE_OFFSET)))\n\n/** @brief Defines a macro for retrieving the actual SoftDevice size value from a given base\n *         address. Use @ref MBR_SIZE as the argument when the SoftDevice is installed just above\n *         the MBR (the usual case). */\n#define SD_SIZE_GET(baseaddr) (*((uint32_t *)((baseaddr) + SD_SIZE_OFFSET)))\n\n/** @brief Defines the amount of flash that is used by the SoftDevice.\n *         Add @ref MBR_SIZE to find the first available flash address when the SoftDevice is installed\n *         just above the MBR (the usual case).\n */\n#define SD_FLASH_SIZE 0x27000\n\n/** @brief Defines a macro for retrieving the actual FWID value from a given base address. Use\n *         @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR (the usual\n *         case). */\n#define SD_FWID_GET(baseaddr) (*((uint16_t *)((baseaddr) + SD_FWID_OFFSET)))\n\n/** @brief Defines a macro for retrieving the actual SoftDevice ID from a given base address. Use\n *         @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR (the\n *         usual case). */\n#define SD_ID_GET(baseaddr)                                                                                                      \\\n    ((SD_INFO_STRUCT_SIZE_GET(baseaddr) > (SD_ID_OFFSET - SOFTDEVICE_INFO_STRUCT_OFFSET))                                        \\\n         ? (*((uint32_t *)((baseaddr) + SD_ID_OFFSET)))                                                                          \\\n         : SDM_INFO_FIELD_INVALID)\n\n/** @brief Defines a macro for retrieving the actual SoftDevice version from a given base address.\n *         Use @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR\n *         (the usual case). */\n#define SD_VERSION_GET(baseaddr)                                                                                                 \\\n    ((SD_INFO_STRUCT_SIZE_GET(baseaddr) > (SD_VERSION_OFFSET - SOFTDEVICE_INFO_STRUCT_OFFSET))                                   \\\n         ? (*((uint32_t *)((baseaddr) + SD_VERSION_OFFSET)))                                                                     \\\n         : SDM_INFO_FIELD_INVALID)\n\n/** @brief Defines a macro for retrieving the address of SoftDevice unique str based on a given base address.\n *         Use @ref MBR_SIZE as the argument when the SoftDevice is installed just above the MBR\n *         (the usual case). */\n#define SD_UNIQUE_STR_ADDR_GET(baseaddr)                                                                                         \\\n    ((SD_INFO_STRUCT_SIZE_GET(baseaddr) > (SD_UNIQUE_STR_OFFSET - SOFTDEVICE_INFO_STRUCT_OFFSET))                                \\\n         ? (((uint8_t *)((baseaddr) + SD_UNIQUE_STR_OFFSET)))                                                                    \\\n         : SDM_INFO_FIELD_INVALID)\n\n/**@defgroup NRF_FAULT_ID_RANGES Fault ID ranges\n * @{ */\n#define NRF_FAULT_ID_SD_RANGE_START 0x00000000  /**< SoftDevice ID range start. */\n#define NRF_FAULT_ID_APP_RANGE_START 0x00001000 /**< Application ID range start. */\n/**@} */\n\n/**@defgroup NRF_FAULT_IDS Fault ID types\n * @{ */\n#define NRF_FAULT_ID_SD_ASSERT                                                                                                   \\\n    (NRF_FAULT_ID_SD_RANGE_START + 1) /**< SoftDevice assertion. The info parameter is reserved for future used. */\n#define NRF_FAULT_ID_APP_MEMACC                                                                                                  \\\n    (NRF_FAULT_ID_APP_RANGE_START + 1) /**< Application invalid memory access. The info parameter will contain 0x00000000,       \\\n                                            in case of SoftDevice RAM access violation. In case of SoftDevice peripheral         \\\n                                            register violation the info parameter will contain the sub-region number of          \\\n                                            PREGION[0], on whose address range the disallowed write access caused the            \\\n                                            memory access fault. */\n/**@} */\n\n/** @} */\n\n/** @addtogroup NRF_SDM_ENUMS Enumerations\n * @{ */\n\n/**@brief nRF SoftDevice Manager API SVC numbers. */\nenum NRF_SD_SVCS {\n    SD_SOFTDEVICE_ENABLE = SDM_SVC_BASE, /**< ::sd_softdevice_enable */\n    SD_SOFTDEVICE_DISABLE,               /**< ::sd_softdevice_disable */\n    SD_SOFTDEVICE_IS_ENABLED,            /**< ::sd_softdevice_is_enabled */\n    SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, /**< ::sd_softdevice_vector_table_base_set */\n    SVC_SDM_LAST                         /**< Placeholder for last SDM SVC */\n};\n\n/** @} */\n\n/** @addtogroup NRF_SDM_DEFINES Defines\n * @{ */\n\n/**@defgroup NRF_CLOCK_LF_ACCURACY Clock accuracy\n * @{ */\n\n#define NRF_CLOCK_LF_ACCURACY_250_PPM (0) /**< Default: 250 ppm */\n#define NRF_CLOCK_LF_ACCURACY_500_PPM (1) /**< 500 ppm */\n#define NRF_CLOCK_LF_ACCURACY_150_PPM (2) /**< 150 ppm */\n#define NRF_CLOCK_LF_ACCURACY_100_PPM (3) /**< 100 ppm */\n#define NRF_CLOCK_LF_ACCURACY_75_PPM (4)  /**< 75 ppm */\n#define NRF_CLOCK_LF_ACCURACY_50_PPM (5)  /**< 50 ppm */\n#define NRF_CLOCK_LF_ACCURACY_30_PPM (6)  /**< 30 ppm */\n#define NRF_CLOCK_LF_ACCURACY_20_PPM (7)  /**< 20 ppm */\n#define NRF_CLOCK_LF_ACCURACY_10_PPM (8)  /**< 10 ppm */\n#define NRF_CLOCK_LF_ACCURACY_5_PPM (9)   /**<  5 ppm */\n#define NRF_CLOCK_LF_ACCURACY_2_PPM (10)  /**<  2 ppm */\n#define NRF_CLOCK_LF_ACCURACY_1_PPM (11)  /**<  1 ppm */\n\n/** @} */\n\n/**@defgroup NRF_CLOCK_LF_SRC Possible LFCLK oscillator sources\n * @{ */\n\n#define NRF_CLOCK_LF_SRC_RC (0)    /**< LFCLK RC oscillator. */\n#define NRF_CLOCK_LF_SRC_XTAL (1)  /**< LFCLK crystal oscillator. */\n#define NRF_CLOCK_LF_SRC_SYNTH (2) /**< LFCLK Synthesized from HFCLK. */\n\n/** @} */\n\n/** @} */\n\n/** @addtogroup NRF_SDM_TYPES Types\n * @{ */\n\n/**@brief Type representing LFCLK oscillator source. */\ntypedef struct {\n    uint8_t source;       /**< LF oscillator clock source, see @ref NRF_CLOCK_LF_SRC. */\n    uint8_t rc_ctiv;      /**< Only for ::NRF_CLOCK_LF_SRC_RC: Calibration timer interval in 1/4 second\n                               units (nRF52: 1-32).\n                               @note To avoid excessive clock drift, 0.5 degrees Celsius is the\n                                     maximum temperature change allowed in one calibration timer\n                                     interval. The interval should be selected to ensure this.\n     \n                                  @note Must be 0 if source is not ::NRF_CLOCK_LF_SRC_RC.  */\n    uint8_t rc_temp_ctiv; /**<  Only for ::NRF_CLOCK_LF_SRC_RC: How often (in number of calibration\n                                intervals) the RC oscillator shall be calibrated if the temperature\n                                hasn't changed.\n                                     0: Always calibrate even if the temperature hasn't changed.\n                                     1: Only calibrate if the temperature has changed (legacy - nRF51 only).\n                                     2-33: Check the temperature and only calibrate if it has changed,\n                                           however calibration will take place every rc_temp_ctiv\n                                           intervals in any case.\n\n                                @note Must be 0 if source is not ::NRF_CLOCK_LF_SRC_RC.\n\n                                @note For nRF52, the application must ensure calibration at least once\n                                      every 8 seconds to ensure +/-500 ppm clock stability. The\n                                      recommended configuration for ::NRF_CLOCK_LF_SRC_RC on nRF52 is\n                                      rc_ctiv=16 and rc_temp_ctiv=2. This will ensure calibration at\n                                      least once every 8 seconds and for temperature changes of 0.5\n                                      degrees Celsius every 4 seconds. See the Product Specification\n                                      for the nRF52 device being used for more information.*/\n    uint8_t accuracy;     /**< External clock accuracy used in the LL to compute timing\n                               windows, see @ref NRF_CLOCK_LF_ACCURACY.*/\n} nrf_clock_lf_cfg_t;\n\n/**@brief Fault Handler type.\n *\n * When certain unrecoverable errors occur within the application or SoftDevice the fault handler will be called back.\n * The protocol stack will be in an undefined state when this happens and the only way to recover will be to\n * perform a reset, using e.g. CMSIS NVIC_SystemReset().\n * If the application returns from the fault handler the SoftDevice will call NVIC_SystemReset().\n *\n * @note It is recommended to either perform a reset in the fault handler or to let the SoftDevice reset the device.\n *       Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripherial may\n *       continously transmit packets.\n *\n * @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback.\n *\n * @param[in] id Fault identifier. See @ref NRF_FAULT_IDS.\n * @param[in] pc The program counter of the instruction that triggered the fault.\n * @param[in] info Optional additional information regarding the fault. Refer to each Fault identifier for details.\n *\n * @note When id is set to @ref NRF_FAULT_ID_APP_MEMACC, pc will contain the address of the instruction being executed at the time\n * when the fault is detected by the CPU. The CPU program counter may have advanced up to 2 instructions (no branching) after the\n * one that triggered the fault.\n */\ntypedef void (*nrf_fault_handler_t)(uint32_t id, uint32_t pc, uint32_t info);\n\n/** @} */\n\n/** @addtogroup NRF_SDM_FUNCTIONS Functions\n * @{ */\n\n/**@brief Enables the SoftDevice and by extension the protocol stack.\n *\n * @note Some care must be taken if a low frequency clock source is already running when calling this function:\n *       If the LF clock has a different source then the one currently running, it will be stopped. Then, the new\n *       clock source will be started.\n *\n * @note This function has no effect when returning with an error.\n *\n * @post If return code is ::NRF_SUCCESS\n *       - SoC library and protocol stack APIs are made available.\n *       - A portion of RAM will be unavailable (see relevant SDS documentation).\n *       - Some peripherals will be unavailable or available only through the SoC API (see relevant SDS documentation).\n *       - Interrupts will not arrive from protected peripherals or interrupts.\n *       - nrf_nvic_ functions must be used instead of CMSIS NVIC_ functions for reliable usage of the SoftDevice.\n *       - Interrupt latency may be affected by the SoftDevice  (see relevant SDS documentation).\n *       - Chosen low frequency clock source will be running.\n *\n * @param p_clock_lf_cfg Low frequency clock source and accuracy.\n                         If NULL the clock will be configured as an RC source with rc_ctiv = 16 and .rc_temp_ctiv = 2\n                         In the case of XTAL source, the PPM accuracy of the chosen clock source must be greater than or equal to\n the actual characteristics of your XTAL clock.\n * @param fault_handler Callback to be invoked in case of fault, cannot be NULL.\n *\n * @retval ::NRF_SUCCESS\n * @retval ::NRF_ERROR_INVALID_ADDR  Invalid or NULL pointer supplied.\n * @retval ::NRF_ERROR_INVALID_STATE SoftDevice is already enabled, and the clock source and fault handler cannot be updated.\n * @retval ::NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION SoftDevice interrupt is already enabled, or an enabled interrupt has\n an illegal priority level.\n * @retval ::NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN Unknown low frequency clock source selected.\n * @retval ::NRF_ERROR_INVALID_PARAM Invalid clock source configuration supplied in p_clock_lf_cfg.\n */\nSVCALL(SD_SOFTDEVICE_ENABLE, uint32_t,\n       sd_softdevice_enable(nrf_clock_lf_cfg_t const *p_clock_lf_cfg, nrf_fault_handler_t fault_handler));\n\n/**@brief Disables the SoftDevice and by extension the protocol stack.\n *\n * Idempotent function to disable the SoftDevice.\n *\n * @post SoC library and protocol stack APIs are made unavailable.\n * @post All interrupts that was protected by the SoftDevice will be disabled and initialized to priority 0 (highest).\n * @post All peripherals used by the SoftDevice will be reset to default values.\n * @post All of RAM become available.\n * @post All interrupts are forwarded to the application.\n * @post LFCLK source chosen in ::sd_softdevice_enable will be left running.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_SOFTDEVICE_DISABLE, uint32_t, sd_softdevice_disable(void));\n\n/**@brief Check if the SoftDevice is enabled.\n *\n * @param[out]  p_softdevice_enabled If the SoftDevice is enabled: 1 else 0.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_SOFTDEVICE_IS_ENABLED, uint32_t, sd_softdevice_is_enabled(uint8_t *p_softdevice_enabled));\n\n/**@brief Sets the base address of the interrupt vector table for interrupts forwarded from the SoftDevice\n *\n * This function is only intended to be called when a bootloader is enabled.\n *\n * @param[in] address The base address of the interrupt vector table for forwarded interrupts.\n\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_SOFTDEVICE_VECTOR_TABLE_BASE_SET, uint32_t, sd_softdevice_vector_table_base_set(uint32_t address));\n\n/** @} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // NRF_SDM_H__\n\n/**\n  @}\n*/"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf_soc.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * @defgroup nrf_soc_api SoC Library API\n * @{\n *\n * @brief APIs for the SoC library.\n *\n */\n\n#ifndef NRF_SOC_H__\n#define NRF_SOC_H__\n\n#include \"nrf.h\"\n#include \"nrf_error.h\"\n#include \"nrf_error_soc.h\"\n#include \"nrf_svc.h\"\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**@addtogroup NRF_SOC_DEFINES Defines\n * @{ */\n\n/**@brief The number of the lowest SVC number reserved for the SoC library. */\n#define SOC_SVC_BASE (0x20)               /**< Base value for SVCs that are available when the SoftDevice is disabled. */\n#define SOC_SVC_BASE_NOT_AVAILABLE (0x2C) /**< Base value for SVCs that are not available when the SoftDevice is disabled. */\n\n/**@brief Guaranteed time for application to process radio inactive notification. */\n#define NRF_RADIO_NOTIFICATION_INACTIVE_GUARANTEED_TIME_US (62)\n\n/**@brief The minimum allowed timeslot extension time. */\n#define NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US (200)\n\n/**@brief The maximum processing time to handle a timeslot extension. */\n#define NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US (20)\n\n/**@brief The latest time before the end of a timeslot the timeslot can be extended. */\n#define NRF_RADIO_MIN_EXTENSION_MARGIN_US (82)\n\n#define SOC_ECB_KEY_LENGTH (16)                              /**< ECB key length. */\n#define SOC_ECB_CLEARTEXT_LENGTH (16)                        /**< ECB cleartext length. */\n#define SOC_ECB_CIPHERTEXT_LENGTH (SOC_ECB_CLEARTEXT_LENGTH) /**< ECB ciphertext length. */\n\n#define SD_EVT_IRQn (SWI2_IRQn) /**< SoftDevice Event IRQ number. Used for both protocol events and SoC events. */\n#define SD_EVT_IRQHandler                                                                                                        \\\n    (SWI2_IRQHandler)                       /**< SoftDevice Event IRQ handler. Used for both protocol events and SoC events.     \\\n                                                      The default interrupt priority for this handler is set to 6 */\n#define RADIO_NOTIFICATION_IRQn (SWI1_IRQn) /**< The radio notification IRQ number. */\n#define RADIO_NOTIFICATION_IRQHandler                                                                                            \\\n    (SWI1_IRQHandler)                    /**< The radio notification IRQ handler.                                                \\\n                                                   The default interrupt priority for this handler is set to 6 */\n#define NRF_RADIO_LENGTH_MIN_US (100)    /**< The shortest allowed radio timeslot, in microseconds. */\n#define NRF_RADIO_LENGTH_MAX_US (100000) /**< The longest allowed radio timeslot, in microseconds. */\n\n#define NRF_RADIO_DISTANCE_MAX_US                                                                                                \\\n    (128000000UL - 1UL) /**< The longest timeslot distance, in microseconds, allowed for the distance parameter (see @ref        \\\n                           nrf_radio_request_normal_t) in the request. */\n\n#define NRF_RADIO_EARLIEST_TIMEOUT_MAX_US                                                                                        \\\n    (128000000UL - 1UL) /**< The longest timeout, in microseconds, allowed when requesting the earliest possible timeslot. */\n\n#define NRF_RADIO_START_JITTER_US                                                                                                \\\n    (2) /**< The maximum jitter in @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START relative to the requested start time. */\n\n/**@brief Mask of PPI channels reserved by the SoftDevice when the SoftDevice is disabled. */\n#define NRF_SOC_SD_PPI_CHANNELS_SD_DISABLED_MSK ((uint32_t)(0))\n\n/**@brief Mask of PPI channels reserved by the SoftDevice when the SoftDevice is enabled. */\n#define NRF_SOC_SD_PPI_CHANNELS_SD_ENABLED_MSK                                                                                   \\\n    ((uint32_t)((1U << 17) | (1U << 18) | (1U << 19) | (1U << 20) | (1U << 21) | (1U << 22) | (1U << 23) | (1U << 24) |          \\\n                (1U << 25) | (1U << 26) | (1U << 27) | (1U << 28) | (1U << 29) | (1U << 30) | (1U << 31)))\n\n/**@brief Mask of PPI groups reserved by the SoftDevice when the SoftDevice is disabled. */\n#define NRF_SOC_SD_PPI_GROUPS_SD_DISABLED_MSK ((uint32_t)(0))\n\n/**@brief Mask of PPI groups reserved by the SoftDevice when the SoftDevice is enabled. */\n#define NRF_SOC_SD_PPI_GROUPS_SD_ENABLED_MSK ((uint32_t)((1U << 4) | (1U << 5)))\n\n/**@} */\n\n/**@addtogroup NRF_SOC_ENUMS Enumerations\n * @{ */\n\n/**@brief The SVC numbers used by the SVC functions in the SoC library. */\nenum NRF_SOC_SVCS {\n    SD_PPI_CHANNEL_ENABLE_GET = SOC_SVC_BASE,\n    SD_PPI_CHANNEL_ENABLE_SET = SOC_SVC_BASE + 1,\n    SD_PPI_CHANNEL_ENABLE_CLR = SOC_SVC_BASE + 2,\n    SD_PPI_CHANNEL_ASSIGN = SOC_SVC_BASE + 3,\n    SD_PPI_GROUP_TASK_ENABLE = SOC_SVC_BASE + 4,\n    SD_PPI_GROUP_TASK_DISABLE = SOC_SVC_BASE + 5,\n    SD_PPI_GROUP_ASSIGN = SOC_SVC_BASE + 6,\n    SD_PPI_GROUP_GET = SOC_SVC_BASE + 7,\n    SD_FLASH_PAGE_ERASE = SOC_SVC_BASE + 8,\n    SD_FLASH_WRITE = SOC_SVC_BASE + 9,\n    SD_PROTECTED_REGISTER_WRITE = SOC_SVC_BASE + 11,\n    SD_MUTEX_NEW = SOC_SVC_BASE_NOT_AVAILABLE,\n    SD_MUTEX_ACQUIRE = SOC_SVC_BASE_NOT_AVAILABLE + 1,\n    SD_MUTEX_RELEASE = SOC_SVC_BASE_NOT_AVAILABLE + 2,\n    SD_RAND_APPLICATION_POOL_CAPACITY_GET = SOC_SVC_BASE_NOT_AVAILABLE + 3,\n    SD_RAND_APPLICATION_BYTES_AVAILABLE_GET = SOC_SVC_BASE_NOT_AVAILABLE + 4,\n    SD_RAND_APPLICATION_VECTOR_GET = SOC_SVC_BASE_NOT_AVAILABLE + 5,\n    SD_POWER_MODE_SET = SOC_SVC_BASE_NOT_AVAILABLE + 6,\n    SD_POWER_SYSTEM_OFF = SOC_SVC_BASE_NOT_AVAILABLE + 7,\n    SD_POWER_RESET_REASON_GET = SOC_SVC_BASE_NOT_AVAILABLE + 8,\n    SD_POWER_RESET_REASON_CLR = SOC_SVC_BASE_NOT_AVAILABLE + 9,\n    SD_POWER_POF_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 10,\n    SD_POWER_POF_THRESHOLD_SET = SOC_SVC_BASE_NOT_AVAILABLE + 11,\n    SD_POWER_POF_THRESHOLDVDDH_SET = SOC_SVC_BASE_NOT_AVAILABLE + 12,\n    SD_POWER_RAM_POWER_SET = SOC_SVC_BASE_NOT_AVAILABLE + 13,\n    SD_POWER_RAM_POWER_CLR = SOC_SVC_BASE_NOT_AVAILABLE + 14,\n    SD_POWER_RAM_POWER_GET = SOC_SVC_BASE_NOT_AVAILABLE + 15,\n    SD_POWER_GPREGRET_SET = SOC_SVC_BASE_NOT_AVAILABLE + 16,\n    SD_POWER_GPREGRET_CLR = SOC_SVC_BASE_NOT_AVAILABLE + 17,\n    SD_POWER_GPREGRET_GET = SOC_SVC_BASE_NOT_AVAILABLE + 18,\n    SD_POWER_DCDC_MODE_SET = SOC_SVC_BASE_NOT_AVAILABLE + 19,\n    SD_POWER_DCDC0_MODE_SET = SOC_SVC_BASE_NOT_AVAILABLE + 20,\n    SD_APP_EVT_WAIT = SOC_SVC_BASE_NOT_AVAILABLE + 21,\n    SD_CLOCK_HFCLK_REQUEST = SOC_SVC_BASE_NOT_AVAILABLE + 22,\n    SD_CLOCK_HFCLK_RELEASE = SOC_SVC_BASE_NOT_AVAILABLE + 23,\n    SD_CLOCK_HFCLK_IS_RUNNING = SOC_SVC_BASE_NOT_AVAILABLE + 24,\n    SD_RADIO_NOTIFICATION_CFG_SET = SOC_SVC_BASE_NOT_AVAILABLE + 25,\n    SD_ECB_BLOCK_ENCRYPT = SOC_SVC_BASE_NOT_AVAILABLE + 26,\n    SD_ECB_BLOCKS_ENCRYPT = SOC_SVC_BASE_NOT_AVAILABLE + 27,\n    SD_RADIO_SESSION_OPEN = SOC_SVC_BASE_NOT_AVAILABLE + 28,\n    SD_RADIO_SESSION_CLOSE = SOC_SVC_BASE_NOT_AVAILABLE + 29,\n    SD_RADIO_REQUEST = SOC_SVC_BASE_NOT_AVAILABLE + 30,\n    SD_EVT_GET = SOC_SVC_BASE_NOT_AVAILABLE + 31,\n    SD_TEMP_GET = SOC_SVC_BASE_NOT_AVAILABLE + 32,\n    SD_POWER_USBPWRRDY_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 33,\n    SD_POWER_USBDETECTED_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 34,\n    SD_POWER_USBREMOVED_ENABLE = SOC_SVC_BASE_NOT_AVAILABLE + 35,\n    SD_POWER_USBREGSTATUS_GET = SOC_SVC_BASE_NOT_AVAILABLE + 36,\n    SVC_SOC_LAST = SOC_SVC_BASE_NOT_AVAILABLE + 37\n};\n\n/**@brief Possible values of a ::nrf_mutex_t. */\nenum NRF_MUTEX_VALUES { NRF_MUTEX_FREE, NRF_MUTEX_TAKEN };\n\n/**@brief Power modes. */\nenum NRF_POWER_MODES {\n    NRF_POWER_MODE_CONSTLAT, /**< Constant latency mode. See power management in the reference manual. */\n    NRF_POWER_MODE_LOWPWR    /**< Low power mode. See power management in the reference manual. */\n};\n\n/**@brief Power failure thresholds */\nenum NRF_POWER_THRESHOLDS {\n    NRF_POWER_THRESHOLD_V17 = 4UL, /**< 1.7 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V18,       /**< 1.8 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V19,       /**< 1.9 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V20,       /**< 2.0 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V21,       /**< 2.1 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V22,       /**< 2.2 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V23,       /**< 2.3 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V24,       /**< 2.4 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V25,       /**< 2.5 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V26,       /**< 2.6 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V27,       /**< 2.7 Volts power failure threshold. */\n    NRF_POWER_THRESHOLD_V28        /**< 2.8 Volts power failure threshold. */\n};\n\n/**@brief Power failure thresholds for high voltage */\nenum NRF_POWER_THRESHOLDVDDHS {\n    NRF_POWER_THRESHOLDVDDH_V27, /**< 2.7 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V28, /**< 2.8 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V29, /**< 2.9 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V30, /**< 3.0 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V31, /**< 3.1 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V32, /**< 3.2 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V33, /**< 3.3 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V34, /**< 3.4 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V35, /**< 3.5 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V36, /**< 3.6 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V37, /**< 3.7 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V38, /**< 3.8 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V39, /**< 3.9 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V40, /**< 4.0 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V41, /**< 4.1 Volts power failure threshold. */\n    NRF_POWER_THRESHOLDVDDH_V42  /**< 4.2 Volts power failure threshold. */\n};\n\n/**@brief DC/DC converter modes. */\nenum NRF_POWER_DCDC_MODES {\n    NRF_POWER_DCDC_DISABLE, /**< The DCDC is disabled. */\n    NRF_POWER_DCDC_ENABLE   /**< The DCDC is enabled.  */\n};\n\n/**@brief Radio notification distances. */\nenum NRF_RADIO_NOTIFICATION_DISTANCES {\n    NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0, /**< The event does not have a notification. */\n    NRF_RADIO_NOTIFICATION_DISTANCE_800US,    /**< The distance from the active notification to start of radio activity. */\n    NRF_RADIO_NOTIFICATION_DISTANCE_1740US,   /**< The distance from the active notification to start of radio activity. */\n    NRF_RADIO_NOTIFICATION_DISTANCE_2680US,   /**< The distance from the active notification to start of radio activity. */\n    NRF_RADIO_NOTIFICATION_DISTANCE_3620US,   /**< The distance from the active notification to start of radio activity. */\n    NRF_RADIO_NOTIFICATION_DISTANCE_4560US,   /**< The distance from the active notification to start of radio activity. */\n    NRF_RADIO_NOTIFICATION_DISTANCE_5500US    /**< The distance from the active notification to start of radio activity. */\n};\n\n/**@brief Radio notification types. */\nenum NRF_RADIO_NOTIFICATION_TYPES {\n    NRF_RADIO_NOTIFICATION_TYPE_NONE = 0,        /**< The event does not have a radio notification signal. */\n    NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE,   /**< Using interrupt for notification when the radio will be enabled. */\n    NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE, /**< Using interrupt for notification when the radio has been disabled. */\n    NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH,     /**< Using interrupt for notification both when the radio will be enabled and\n                                                    disabled. */\n};\n\n/**@brief The Radio signal callback types. */\nenum NRF_RADIO_CALLBACK_SIGNAL_TYPE {\n    NRF_RADIO_CALLBACK_SIGNAL_TYPE_START,           /**< This signal indicates the start of the radio timeslot. */\n    NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0,          /**< This signal indicates the NRF_TIMER0 interrupt. */\n    NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO,           /**< This signal indicates the NRF_RADIO interrupt. */\n    NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED,   /**< This signal indicates extend action failed. */\n    NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED /**< This signal indicates extend action succeeded. */\n};\n\n/**@brief The actions requested by the signal callback.\n *\n *  This code gives the SOC instructions about what action to take when the signal callback has\n *  returned.\n */\nenum NRF_RADIO_SIGNAL_CALLBACK_ACTION {\n    NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE,           /**< Return without action. */\n    NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND,         /**< Request an extension of the current\n                                                          timeslot. Maximum execution time for this action:\n                                                          @ref NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US.\n                                                          This action must be started at least\n                                                          @ref NRF_RADIO_MIN_EXTENSION_MARGIN_US before\n                                                          the end of the timeslot. */\n    NRF_RADIO_SIGNAL_CALLBACK_ACTION_END,            /**< End the current radio timeslot. */\n    NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END /**< Request a new radio timeslot and end the current timeslot. */\n};\n\n/**@brief Radio timeslot high frequency clock source configuration. */\nenum NRF_RADIO_HFCLK_CFG {\n    NRF_RADIO_HFCLK_CFG_XTAL_GUARANTEED, /**< The SoftDevice will guarantee that the high frequency clock source is the\n                                             external crystal for the whole duration of the timeslot. This should be the\n                                             preferred option for events that use the radio or require high timing accuracy.\n                                             @note The SoftDevice will automatically turn on and off the external crystal,\n                                             at the beginning and end of the timeslot, respectively. The crystal may also\n                                             intentionally be left running after the timeslot, in cases where it is needed\n                                             by the SoftDevice shortly after the end of the timeslot. */\n    NRF_RADIO_HFCLK_CFG_NO_GUARANTEE     /**< This configuration allows for earlier and tighter scheduling of timeslots.\n                                              The RC oscillator may be the clock source in part or for the whole duration of the\n                                            timeslot.     The RC oscillator's accuracy must therefore be taken into consideration.\n                                              @note If the application will use the radio peripheral in timeslots with this\n                                            configuration,     it must make sure that the crystal is running and stable before\n                                            starting     the radio. */\n};\n\n/**@brief Radio timeslot priorities. */\nenum NRF_RADIO_PRIORITY {\n    NRF_RADIO_PRIORITY_HIGH,   /**< High (equal priority as the normal connection priority of the SoftDevice stack(s)). */\n    NRF_RADIO_PRIORITY_NORMAL, /**< Normal (equal priority as the priority of secondary activities of the SoftDevice stack(s)). */\n};\n\n/**@brief Radio timeslot request type. */\nenum NRF_RADIO_REQUEST_TYPE {\n    NRF_RADIO_REQ_TYPE_EARLIEST, /**< Request radio timeslot as early as possible. This should always be used for the first\n                                    request in a session. */\n    NRF_RADIO_REQ_TYPE_NORMAL    /**< Normal radio timeslot request. */\n};\n\n/**@brief SoC Events. */\nenum NRF_SOC_EVTS {\n    NRF_EVT_HFCLKSTARTED,            /**< Event indicating that the HFCLK has started. */\n    NRF_EVT_POWER_FAILURE_WARNING,   /**< Event indicating that a power failure warning has occurred. */\n    NRF_EVT_FLASH_OPERATION_SUCCESS, /**< Event indicating that the ongoing flash operation has completed successfully. */\n    NRF_EVT_FLASH_OPERATION_ERROR,   /**< Event indicating that the ongoing flash operation has timed out with an error. */\n    NRF_EVT_RADIO_BLOCKED,           /**< Event indicating that a radio timeslot was blocked. */\n    NRF_EVT_RADIO_CANCELED,          /**< Event indicating that a radio timeslot was canceled by SoftDevice. */\n    NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN, /**< Event indicating that a radio timeslot signal callback handler return was\n                                                     invalid. */\n    NRF_EVT_RADIO_SESSION_IDLE,                   /**< Event indicating that a radio timeslot session is idle. */\n    NRF_EVT_RADIO_SESSION_CLOSED,                 /**< Event indicating that a radio timeslot session is closed. */\n    NRF_EVT_POWER_USB_POWER_READY,                /**< Event indicating that a USB 3.3 V supply is ready. */\n    NRF_EVT_POWER_USB_DETECTED,                   /**< Event indicating that voltage supply is detected on VBUS. */\n    NRF_EVT_POWER_USB_REMOVED,                    /**< Event indicating that voltage supply is removed from VBUS. */\n    NRF_EVT_NUMBER_OF_EVTS\n};\n\n/**@} */\n\n/**@addtogroup NRF_SOC_STRUCTURES Structures\n * @{ */\n\n/**@brief Represents a mutex for use with the nrf_mutex functions.\n * @note Accessing the value directly is not safe, use the mutex functions!\n */\ntypedef volatile uint8_t nrf_mutex_t;\n\n/**@brief Parameters for a request for a timeslot as early as possible. */\ntypedef struct {\n    uint8_t hfclk;       /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */\n    uint8_t priority;    /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */\n    uint32_t length_us;  /**< The radio timeslot length (in the range 100 to 100,000] microseconds). */\n    uint32_t timeout_us; /**< Longest acceptable delay until the start of the requested timeslot (up to @ref\n                            NRF_RADIO_EARLIEST_TIMEOUT_MAX_US microseconds). */\n} nrf_radio_request_earliest_t;\n\n/**@brief Parameters for a normal radio timeslot request. */\ntypedef struct {\n    uint8_t hfclk;        /**< High frequency clock source, see @ref NRF_RADIO_HFCLK_CFG. */\n    uint8_t priority;     /**< The radio timeslot priority, see @ref NRF_RADIO_PRIORITY. */\n    uint32_t distance_us; /**< Distance from the start of the previous radio timeslot (up to @ref NRF_RADIO_DISTANCE_MAX_US\n                             microseconds). */\n    uint32_t length_us;   /**< The radio timeslot length (in the range [100..100,000] microseconds). */\n} nrf_radio_request_normal_t;\n\n/**@brief Radio timeslot request parameters. */\ntypedef struct {\n    uint8_t request_type; /**< Type of request, see @ref NRF_RADIO_REQUEST_TYPE. */\n    union {\n        nrf_radio_request_earliest_t earliest; /**< Parameters for requesting a radio timeslot as early as possible. */\n        nrf_radio_request_normal_t normal;     /**< Parameters for requesting a normal radio timeslot. */\n    } params;                                  /**< Parameter union. */\n} nrf_radio_request_t;\n\n/**@brief Return parameters of the radio timeslot signal callback. */\ntypedef struct {\n    uint8_t callback_action; /**< The action requested by the application when returning from the signal callback, see @ref\n                                NRF_RADIO_SIGNAL_CALLBACK_ACTION. */\n    union {\n        struct {\n            nrf_radio_request_t *p_next; /**< The request parameters for the next radio timeslot. */\n        } request; /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END. */\n        struct {\n            uint32_t length_us; /**< Requested extension of the radio timeslot duration (microseconds) (for minimum time see @ref\n                                   NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US). */\n        } extend;               /**< Additional parameters for return_code @ref NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND. */\n    } params;                   /**< Parameter union. */\n} nrf_radio_signal_callback_return_param_t;\n\n/**@brief The radio timeslot signal callback type.\n *\n * @note In case of invalid return parameters, the radio timeslot will automatically end\n *       immediately after returning from the signal callback and the\n *       @ref NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN event will be sent.\n * @note The returned struct pointer must remain valid after the signal callback\n *       function returns. For instance, this means that it must not point to a stack variable.\n *\n * @param[in] signal_type Type of signal, see @ref NRF_RADIO_CALLBACK_SIGNAL_TYPE.\n *\n * @return Pointer to structure containing action requested by the application.\n */\ntypedef nrf_radio_signal_callback_return_param_t *(*nrf_radio_signal_callback_t)(uint8_t signal_type);\n\n/**@brief AES ECB parameter typedefs */\ntypedef uint8_t soc_ecb_key_t[SOC_ECB_KEY_LENGTH];               /**< Encryption key type. */\ntypedef uint8_t soc_ecb_cleartext_t[SOC_ECB_CLEARTEXT_LENGTH];   /**< Cleartext data type. */\ntypedef uint8_t soc_ecb_ciphertext_t[SOC_ECB_CIPHERTEXT_LENGTH]; /**< Ciphertext data type. */\n\n/**@brief AES ECB data structure */\ntypedef struct {\n    soc_ecb_key_t key;               /**< Encryption key. */\n    soc_ecb_cleartext_t cleartext;   /**< Cleartext data. */\n    soc_ecb_ciphertext_t ciphertext; /**< Ciphertext data. */\n} nrf_ecb_hal_data_t;\n\n/**@brief AES ECB block. Used to provide multiple blocks in a single call\n          to @ref sd_ecb_blocks_encrypt.*/\ntypedef struct {\n    soc_ecb_key_t const *p_key;             /**< Pointer to the Encryption key. */\n    soc_ecb_cleartext_t const *p_cleartext; /**< Pointer to the Cleartext data. */\n    soc_ecb_ciphertext_t *p_ciphertext;     /**< Pointer to the Ciphertext data. */\n} nrf_ecb_hal_data_block_t;\n\n/**@} */\n\n/**@addtogroup NRF_SOC_FUNCTIONS Functions\n * @{ */\n\n/**@brief Initialize a mutex.\n *\n * @param[in] p_mutex Pointer to the mutex to initialize.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_MUTEX_NEW, uint32_t, sd_mutex_new(nrf_mutex_t *p_mutex));\n\n/**@brief Attempt to acquire a mutex.\n *\n * @param[in] p_mutex Pointer to the mutex to acquire.\n *\n * @retval ::NRF_SUCCESS The mutex was successfully acquired.\n * @retval ::NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN The mutex could not be acquired.\n */\nSVCALL(SD_MUTEX_ACQUIRE, uint32_t, sd_mutex_acquire(nrf_mutex_t *p_mutex));\n\n/**@brief Release a mutex.\n *\n * @param[in] p_mutex Pointer to the mutex to release.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_MUTEX_RELEASE, uint32_t, sd_mutex_release(nrf_mutex_t *p_mutex));\n\n/**@brief Query the capacity of the application random pool.\n *\n * @param[out] p_pool_capacity The capacity of the pool.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_RAND_APPLICATION_POOL_CAPACITY_GET, uint32_t, sd_rand_application_pool_capacity_get(uint8_t *p_pool_capacity));\n\n/**@brief Get number of random bytes available to the application.\n *\n * @param[out] p_bytes_available The number of bytes currently available in the pool.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_RAND_APPLICATION_BYTES_AVAILABLE_GET, uint32_t, sd_rand_application_bytes_available_get(uint8_t *p_bytes_available));\n\n/**@brief Get random bytes from the application pool.\n *\n * @param[out]  p_buff  Pointer to unit8_t buffer for storing the bytes.\n * @param[in]   length  Number of bytes to take from pool and place in p_buff.\n *\n * @retval ::NRF_SUCCESS The requested bytes were written to p_buff.\n * @retval ::NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES No bytes were written to the buffer, because there were not enough bytes\n * available.\n */\nSVCALL(SD_RAND_APPLICATION_VECTOR_GET, uint32_t, sd_rand_application_vector_get(uint8_t *p_buff, uint8_t length));\n\n/**@brief Gets the reset reason register.\n *\n * @param[out]  p_reset_reason  Contents of the NRF_POWER->RESETREAS register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_RESET_REASON_GET, uint32_t, sd_power_reset_reason_get(uint32_t *p_reset_reason));\n\n/**@brief Clears the bits of the reset reason register.\n *\n * @param[in] reset_reason_clr_msk Contains the bits to clear from the reset reason register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_RESET_REASON_CLR, uint32_t, sd_power_reset_reason_clr(uint32_t reset_reason_clr_msk));\n\n/**@brief Sets the power mode when in CPU sleep.\n *\n * @param[in] power_mode The power mode to use when in CPU sleep, see @ref NRF_POWER_MODES. @sa sd_app_evt_wait\n *\n * @retval ::NRF_SUCCESS The power mode was set.\n * @retval ::NRF_ERROR_SOC_POWER_MODE_UNKNOWN The power mode was unknown.\n */\nSVCALL(SD_POWER_MODE_SET, uint32_t, sd_power_mode_set(uint8_t power_mode));\n\n/**@brief Puts the chip in System OFF mode.\n *\n * @retval ::NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN\n */\nSVCALL(SD_POWER_SYSTEM_OFF, uint32_t, sd_power_system_off(void));\n\n/**@brief Enables or disables the power-fail comparator.\n *\n * Enabling this will give a SoftDevice event (NRF_EVT_POWER_FAILURE_WARNING) when the power failure warning occurs.\n * The event can be retrieved with sd_evt_get();\n *\n * @param[in] pof_enable    True if the power-fail comparator should be enabled, false if it should be disabled.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_POF_ENABLE, uint32_t, sd_power_pof_enable(uint8_t pof_enable));\n\n/**@brief Enables or disables the USB power ready event.\n *\n * Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_POWER_READY) when a USB 3.3 V supply is ready.\n * The event can be retrieved with sd_evt_get();\n *\n * @param[in] usbpwrrdy_enable    True if the power ready event should be enabled, false if it should be disabled.\n *\n * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_USBPWRRDY_ENABLE, uint32_t, sd_power_usbpwrrdy_enable(uint8_t usbpwrrdy_enable));\n\n/**@brief Enables or disables the power USB-detected event.\n *\n * Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_DETECTED) when a voltage supply is detected on VBUS.\n * The event can be retrieved with sd_evt_get();\n *\n * @param[in] usbdetected_enable    True if the power ready event should be enabled, false if it should be disabled.\n *\n * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_USBDETECTED_ENABLE, uint32_t, sd_power_usbdetected_enable(uint8_t usbdetected_enable));\n\n/**@brief Enables or disables the power USB-removed event.\n *\n * Enabling this will give a SoftDevice event (NRF_EVT_POWER_USB_REMOVED) when a voltage supply is removed from VBUS.\n * The event can be retrieved with sd_evt_get();\n *\n * @param[in] usbremoved_enable    True if the power ready event should be enabled, false if it should be disabled.\n *\n * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_USBREMOVED_ENABLE, uint32_t, sd_power_usbremoved_enable(uint8_t usbremoved_enable));\n\n/**@brief Get USB supply status register content.\n *\n * @param[out] usbregstatus    The content of USBREGSTATUS register.\n *\n * @note Calling this function on a chip without USBD peripheral will result in undefined behaviour.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_USBREGSTATUS_GET, uint32_t, sd_power_usbregstatus_get(uint32_t *usbregstatus));\n\n/**@brief Sets the power failure comparator threshold value.\n *\n * @note: Power failure comparator threshold setting. This setting applies both for normal voltage\n *        mode (supply connected to both VDD and VDDH) and high voltage mode (supply connected to\n *        VDDH only).\n *\n * @param[in] threshold The power-fail threshold value to use, see @ref NRF_POWER_THRESHOLDS.\n *\n * @retval ::NRF_SUCCESS The power failure threshold was set.\n * @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown.\n */\nSVCALL(SD_POWER_POF_THRESHOLD_SET, uint32_t, sd_power_pof_threshold_set(uint8_t threshold));\n\n/**@brief Sets the power failure comparator threshold value for high voltage.\n *\n * @note: Power failure comparator threshold setting for high voltage mode (supply connected to\n *        VDDH only). This setting does not apply for normal voltage mode (supply connected to both\n *        VDD and VDDH).\n *\n * @param[in] threshold The power-fail threshold value to use, see @ref NRF_POWER_THRESHOLDVDDHS.\n *\n * @retval ::NRF_SUCCESS The power failure threshold was set.\n * @retval ::NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN The power failure threshold is unknown.\n */\nSVCALL(SD_POWER_POF_THRESHOLDVDDH_SET, uint32_t, sd_power_pof_thresholdvddh_set(uint8_t threshold));\n\n/**@brief Writes the NRF_POWER->RAM[index].POWERSET register.\n *\n * @param[in] index Contains the index in the NRF_POWER->RAM[index].POWERSET register to write to.\n * @param[in] ram_powerset Contains the word to write to the NRF_POWER->RAM[index].POWERSET register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_RAM_POWER_SET, uint32_t, sd_power_ram_power_set(uint8_t index, uint32_t ram_powerset));\n\n/**@brief Writes the NRF_POWER->RAM[index].POWERCLR register.\n *\n * @param[in] index Contains the index in the NRF_POWER->RAM[index].POWERCLR register to write to.\n * @param[in] ram_powerclr Contains the word to write to the NRF_POWER->RAM[index].POWERCLR register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_RAM_POWER_CLR, uint32_t, sd_power_ram_power_clr(uint8_t index, uint32_t ram_powerclr));\n\n/**@brief Get contents of NRF_POWER->RAM[index].POWER register, indicates power status of RAM[index] blocks.\n *\n * @param[in] index Contains the index in the NRF_POWER->RAM[index].POWER register to read from.\n * @param[out] p_ram_power Content of NRF_POWER->RAM[index].POWER register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_RAM_POWER_GET, uint32_t, sd_power_ram_power_get(uint8_t index, uint32_t *p_ram_power));\n\n/**@brief Set bits in the general purpose retention registers (NRF_POWER->GPREGRET*).\n *\n * @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2.\n * @param[in] gpregret_msk Bits to be set in the GPREGRET register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_GPREGRET_SET, uint32_t, sd_power_gpregret_set(uint32_t gpregret_id, uint32_t gpregret_msk));\n\n/**@brief Clear bits in the general purpose retention registers (NRF_POWER->GPREGRET*).\n *\n * @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2.\n * @param[in] gpregret_msk Bits to be clear in the GPREGRET register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_GPREGRET_CLR, uint32_t, sd_power_gpregret_clr(uint32_t gpregret_id, uint32_t gpregret_msk));\n\n/**@brief Get contents of the general purpose retention registers (NRF_POWER->GPREGRET*).\n *\n * @param[in] gpregret_id 0 for GPREGRET, 1 for GPREGRET2.\n * @param[out] p_gpregret Contents of the GPREGRET register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_POWER_GPREGRET_GET, uint32_t, sd_power_gpregret_get(uint32_t gpregret_id, uint32_t *p_gpregret));\n\n/**@brief Enable or disable the DC/DC regulator for the regulator stage 1 (REG1).\n *\n * @param[in] dcdc_mode The mode of the DCDC, see @ref NRF_POWER_DCDC_MODES.\n *\n * @retval ::NRF_SUCCESS\n * @retval ::NRF_ERROR_INVALID_PARAM The DCDC mode is invalid.\n */\nSVCALL(SD_POWER_DCDC_MODE_SET, uint32_t, sd_power_dcdc_mode_set(uint8_t dcdc_mode));\n\n/**@brief Enable or disable the DC/DC regulator for the regulator stage 0 (REG0).\n *\n * For more details on the REG0 stage, please see product specification.\n *\n * @param[in] dcdc_mode The mode of the DCDC0, see @ref NRF_POWER_DCDC_MODES.\n *\n * @retval ::NRF_SUCCESS\n * @retval ::NRF_ERROR_INVALID_PARAM The dcdc_mode is invalid.\n */\nSVCALL(SD_POWER_DCDC0_MODE_SET, uint32_t, sd_power_dcdc0_mode_set(uint8_t dcdc_mode));\n\n/**@brief Request the high frequency crystal oscillator.\n *\n * Will start the high frequency crystal oscillator, the startup time of the crystal varies\n * and the ::sd_clock_hfclk_is_running function can be polled to check if it has started.\n *\n * @see sd_clock_hfclk_is_running\n * @see sd_clock_hfclk_release\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_CLOCK_HFCLK_REQUEST, uint32_t, sd_clock_hfclk_request(void));\n\n/**@brief Releases the high frequency crystal oscillator.\n *\n * Will stop the high frequency crystal oscillator, this happens immediately.\n *\n * @see sd_clock_hfclk_is_running\n * @see sd_clock_hfclk_request\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_CLOCK_HFCLK_RELEASE, uint32_t, sd_clock_hfclk_release(void));\n\n/**@brief Checks if the high frequency crystal oscillator is running.\n *\n * @see sd_clock_hfclk_request\n * @see sd_clock_hfclk_release\n *\n * @param[out] p_is_running 1 if the external crystal oscillator is running, 0 if not.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_CLOCK_HFCLK_IS_RUNNING, uint32_t, sd_clock_hfclk_is_running(uint32_t *p_is_running));\n\n/**@brief Waits for an application event.\n *\n * An application event is either an application interrupt or a pended interrupt when the interrupt\n * is disabled.\n *\n * When the application waits for an application event by calling this function, an interrupt that\n * is enabled will be taken immediately on pending since this function will wait in thread mode,\n * then the execution will return in the application's main thread.\n *\n * In order to wake up from disabled interrupts, the SEVONPEND flag has to be set in the Cortex-M\n * MCU's System Control Register (SCR), CMSIS_SCB. In that case, when a disabled interrupt gets\n * pended, this function will return to the application's main thread.\n *\n * @note The application must ensure that the pended flag is cleared using ::sd_nvic_ClearPendingIRQ\n *       in order to sleep using this function. This is only necessary for disabled interrupts, as\n *       the interrupt handler will clear the pending flag automatically for enabled interrupts.\n *\n * @note If an application interrupt has happened since the last time sd_app_evt_wait was\n *       called this function will return immediately and not go to sleep. This is to avoid race\n *       conditions that can occur when a flag is updated in the interrupt handler and processed\n *       in the main loop.\n *\n * @post An application interrupt has happened or a interrupt pending flag is set.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_APP_EVT_WAIT, uint32_t, sd_app_evt_wait(void));\n\n/**@brief Get PPI channel enable register contents.\n *\n * @param[out] p_channel_enable The contents of the PPI CHEN register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_CHANNEL_ENABLE_GET, uint32_t, sd_ppi_channel_enable_get(uint32_t *p_channel_enable));\n\n/**@brief Set PPI channel enable register.\n *\n * @param[in] channel_enable_set_msk Mask containing the bits to set in the PPI CHEN register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_CHANNEL_ENABLE_SET, uint32_t, sd_ppi_channel_enable_set(uint32_t channel_enable_set_msk));\n\n/**@brief Clear PPI channel enable register.\n *\n * @param[in] channel_enable_clr_msk Mask containing the bits to clear in the PPI CHEN register.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_CHANNEL_ENABLE_CLR, uint32_t, sd_ppi_channel_enable_clr(uint32_t channel_enable_clr_msk));\n\n/**@brief Assign endpoints to a PPI channel.\n *\n * @param[in] channel_num Number of the PPI channel to assign.\n * @param[in] evt_endpoint Event endpoint of the PPI channel.\n * @param[in] task_endpoint Task endpoint of the PPI channel.\n *\n * @retval ::NRF_ERROR_SOC_PPI_INVALID_CHANNEL The channel number is invalid.\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_CHANNEL_ASSIGN, uint32_t,\n       sd_ppi_channel_assign(uint8_t channel_num, const volatile void *evt_endpoint, const volatile void *task_endpoint));\n\n/**@brief Task to enable a channel group.\n *\n * @param[in] group_num Number of the channel group.\n *\n * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_GROUP_TASK_ENABLE, uint32_t, sd_ppi_group_task_enable(uint8_t group_num));\n\n/**@brief Task to disable a channel group.\n *\n * @param[in] group_num Number of the PPI group.\n *\n * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid.\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_GROUP_TASK_DISABLE, uint32_t, sd_ppi_group_task_disable(uint8_t group_num));\n\n/**@brief Assign PPI channels to a channel group.\n *\n * @param[in] group_num Number of the channel group.\n * @param[in] channel_msk Mask of the channels to assign to the group.\n *\n * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid.\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_GROUP_ASSIGN, uint32_t, sd_ppi_group_assign(uint8_t group_num, uint32_t channel_msk));\n\n/**@brief Gets the PPI channels of a channel group.\n *\n * @param[in]   group_num Number of the channel group.\n * @param[out]  p_channel_msk Mask of the channels assigned to the group.\n *\n * @retval ::NRF_ERROR_SOC_PPI_INVALID_GROUP The group number is invalid.\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_PPI_GROUP_GET, uint32_t, sd_ppi_group_get(uint8_t group_num, uint32_t *p_channel_msk));\n\n/**@brief Configures the Radio Notification signal.\n *\n * @note\n *      - The notification signal latency depends on the interrupt priority settings of SWI used\n *        for notification signal.\n *      - To ensure that the radio notification signal behaves in a consistent way, the radio\n *        notifications must be configured when there is no protocol stack or other SoftDevice\n *        activity in progress. It is recommended that the radio notification signal is\n *        configured directly after the SoftDevice has been enabled.\n *      - In the period between the ACTIVE signal and the start of the Radio Event, the SoftDevice\n *        will interrupt the application to do Radio Event preparation.\n *      - Using the Radio Notification feature may limit the bandwidth, as the SoftDevice may have\n *        to shorten the connection events to have time for the Radio Notification signals.\n *\n * @param[in]  type      Type of notification signal, see @ref NRF_RADIO_NOTIFICATION_TYPES.\n *                       @ref NRF_RADIO_NOTIFICATION_TYPE_NONE shall be used to turn off radio\n *                       notification. Using @ref NRF_RADIO_NOTIFICATION_DISTANCE_NONE is\n *                       recommended (but not required) to be used with\n *                       @ref NRF_RADIO_NOTIFICATION_TYPE_NONE.\n *\n * @param[in]  distance  Distance between the notification signal and start of radio activity, see @ref\n * NRF_RADIO_NOTIFICATION_DISTANCES. This parameter is ignored when @ref NRF_RADIO_NOTIFICATION_TYPE_NONE or\n *                       @ref NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE is used.\n *\n * @retval ::NRF_ERROR_INVALID_PARAM The group number is invalid.\n * @retval ::NRF_ERROR_INVALID_STATE A protocol stack or other SoftDevice is running. Stop all\n *                                   running activities and retry.\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_RADIO_NOTIFICATION_CFG_SET, uint32_t, sd_radio_notification_cfg_set(uint8_t type, uint8_t distance));\n\n/**@brief Encrypts a block according to the specified parameters.\n *\n * 128-bit AES encryption.\n *\n * @note:\n *    - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while\n *      the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application\n *      main or low interrupt level.\n *\n * @param[in, out] p_ecb_data Pointer to the ECB parameters' struct (two input\n *                            parameters and one output parameter).\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_ECB_BLOCK_ENCRYPT, uint32_t, sd_ecb_block_encrypt(nrf_ecb_hal_data_t *p_ecb_data));\n\n/**@brief Encrypts multiple data blocks provided as an array of data block structures.\n *\n * @details: Performs 128-bit AES encryption on multiple data blocks\n *\n * @note:\n *    - The application may set the SEVONPEND bit in the SCR to 1 to make the SoftDevice sleep while\n *      the ECB is running. The SEVONPEND bit should only be cleared (set to 0) from application\n *      main or low interrupt level.\n *\n * @param[in]     block_count     Count of blocks in the p_data_blocks array.\n * @param[in,out] p_data_blocks   Pointer to the first entry in a contiguous array of\n *                                @ref nrf_ecb_hal_data_block_t structures.\n *\n * @retval ::NRF_SUCCESS\n */\nSVCALL(SD_ECB_BLOCKS_ENCRYPT, uint32_t, sd_ecb_blocks_encrypt(uint8_t block_count, nrf_ecb_hal_data_block_t *p_data_blocks));\n\n/**@brief Gets any pending events generated by the SoC API.\n *\n * The application should keep calling this function to get events, until ::NRF_ERROR_NOT_FOUND is returned.\n *\n * @param[out] p_evt_id Set to one of the values in @ref NRF_SOC_EVTS, if any events are pending.\n *\n * @retval ::NRF_SUCCESS An event was pending. The event id is written in the p_evt_id parameter.\n * @retval ::NRF_ERROR_NOT_FOUND No pending events.\n */\nSVCALL(SD_EVT_GET, uint32_t, sd_evt_get(uint32_t *p_evt_id));\n\n/**@brief Get the temperature measured on the chip\n *\n * This function will block until the temperature measurement is done.\n * It takes around 50 us from call to return.\n *\n * @param[out] p_temp Result of temperature measurement. Die temperature in 0.25 degrees Celsius.\n *\n * @retval ::NRF_SUCCESS A temperature measurement was done, and the temperature was written to temp\n */\nSVCALL(SD_TEMP_GET, uint32_t, sd_temp_get(int32_t *p_temp));\n\n/**@brief Flash Write\n *\n * Commands to write a buffer to flash\n *\n * If the SoftDevice is enabled:\n *  This call initiates the flash access command, and its completion will be communicated to the\n *  application with exactly one of the following events:\n *      - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed.\n *      - @ref NRF_EVT_FLASH_OPERATION_ERROR   - The command could not be started.\n *\n * If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the\n * write has been completed\n *\n * @note\n *      - This call takes control over the radio and the CPU during flash erase and write to make sure that\n *        they will not interfere with the flash access. This means that all interrupts will be blocked\n *        for a predictable time (depending on the NVMC specification in the device's Product Specification\n *        and the command parameters).\n *      - The data in the p_src buffer should not be modified before the @ref NRF_EVT_FLASH_OPERATION_SUCCESS\n *        or the @ref NRF_EVT_FLASH_OPERATION_ERROR have been received if the SoftDevice is enabled.\n *      - This call will make the SoftDevice trigger a hardfault when the page is written, if it is\n *        protected.\n *\n *\n * @param[in]  p_dst Pointer to start of flash location to be written.\n * @param[in]  p_src Pointer to buffer with data to be written.\n * @param[in]  size  Number of 32-bit words to write. Maximum size is the number of words in one\n *                   flash page. See the device's Product Specification for details.\n *\n * @retval ::NRF_ERROR_INVALID_ADDR   Tried to write to a non existing flash address, or p_dst or p_src was unaligned.\n * @retval ::NRF_ERROR_BUSY           The previous command has not yet completed.\n * @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size.\n * @retval ::NRF_ERROR_FORBIDDEN      Tried to write to an address outside the application flash area.\n * @retval ::NRF_SUCCESS              The command was accepted.\n */\nSVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t *p_dst, uint32_t const *p_src, uint32_t size));\n\n/**@brief Flash Erase page\n *\n * Commands to erase a flash page\n * If the SoftDevice is enabled:\n *  This call initiates the flash access command, and its completion will be communicated to the\n *  application with exactly one of the following events:\n *      - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed.\n *      - @ref NRF_EVT_FLASH_OPERATION_ERROR   - The command could not be started.\n *\n * If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the\n * erase has been completed\n *\n * @note\n *      - This call takes control over the radio and the CPU during flash erase and write to make sure that\n *        they will not interfere with the flash access. This means that all interrupts will be blocked\n *        for a predictable time (depending on the NVMC specification in the device's Product Specification\n *        and the command parameters).\n *      - This call will make the SoftDevice trigger a hardfault when the page is erased, if it is\n *        protected.\n *\n *\n * @param[in]  page_number           Page number of the page to erase\n *\n * @retval ::NRF_ERROR_INTERNAL      If a new session could not be opened due to an internal error.\n * @retval ::NRF_ERROR_INVALID_ADDR  Tried to erase to a non existing flash page.\n * @retval ::NRF_ERROR_BUSY          The previous command has not yet completed.\n * @retval ::NRF_ERROR_FORBIDDEN     Tried to erase a page outside the application flash area.\n * @retval ::NRF_SUCCESS             The command was accepted.\n */\nSVCALL(SD_FLASH_PAGE_ERASE, uint32_t, sd_flash_page_erase(uint32_t page_number));\n\n/**@brief Opens a session for radio timeslot requests.\n *\n * @note Only one session can be open at a time.\n * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) will be called when the radio timeslot\n *       starts. From this point the NRF_RADIO and NRF_TIMER0 peripherals can be freely accessed\n *       by the application.\n * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0) is called whenever the NRF_TIMER0\n *       interrupt occurs.\n * @note p_radio_signal_callback(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO) is called whenever the NRF_RADIO\n *       interrupt occurs.\n * @note p_radio_signal_callback() will be called at ARM interrupt priority level 0. This\n *       implies that none of the sd_* API calls can be used from p_radio_signal_callback().\n *\n * @param[in] p_radio_signal_callback The signal callback.\n *\n * @retval ::NRF_ERROR_INVALID_ADDR p_radio_signal_callback is an invalid function pointer.\n * @retval ::NRF_ERROR_BUSY If session cannot be opened.\n * @retval ::NRF_ERROR_INTERNAL If a new session could not be opened due to an internal error.\n * @retval ::NRF_SUCCESS Otherwise.\n */\nSVCALL(SD_RADIO_SESSION_OPEN, uint32_t, sd_radio_session_open(nrf_radio_signal_callback_t p_radio_signal_callback));\n\n/**@brief Closes a session for radio timeslot requests.\n *\n * @note Any current radio timeslot will be finished before the session is closed.\n * @note If a radio timeslot is scheduled when the session is closed, it will be canceled.\n * @note The application cannot consider the session closed until the @ref NRF_EVT_RADIO_SESSION_CLOSED\n *       event is received.\n *\n * @retval ::NRF_ERROR_FORBIDDEN If session not opened.\n * @retval ::NRF_ERROR_BUSY If session is currently being closed.\n * @retval ::NRF_SUCCESS Otherwise.\n */\nSVCALL(SD_RADIO_SESSION_CLOSE, uint32_t, sd_radio_session_close(void));\n\n/**@brief Requests a radio timeslot.\n *\n * @note The request type is determined by p_request->request_type, and can be one of @ref NRF_RADIO_REQ_TYPE_EARLIEST\n *       and @ref NRF_RADIO_REQ_TYPE_NORMAL. The first request in a session must always be of type @ref\n * NRF_RADIO_REQ_TYPE_EARLIEST.\n * @note For a normal request (@ref NRF_RADIO_REQ_TYPE_NORMAL), the start time of a radio timeslot is specified by\n *       p_request->distance_us and is given relative to the start of the previous timeslot.\n * @note A too small p_request->distance_us will lead to a @ref NRF_EVT_RADIO_BLOCKED event.\n * @note Timeslots scheduled too close will lead to a @ref NRF_EVT_RADIO_BLOCKED event.\n * @note See the SoftDevice Specification for more on radio timeslot scheduling, distances and lengths.\n * @note If an opportunity for the first radio timeslot is not found before 100 ms after the call to this\n *       function, it is not scheduled, and instead a @ref NRF_EVT_RADIO_BLOCKED event is sent.\n *       The application may then try to schedule the first radio timeslot again.\n * @note Successful requests will result in nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START).\n *       Unsuccessful requests will result in a @ref NRF_EVT_RADIO_BLOCKED event, see @ref NRF_SOC_EVTS.\n * @note The jitter in the start time of the radio timeslots is +/- @ref NRF_RADIO_START_JITTER_US us.\n * @note The nrf_radio_signal_callback_t(@ref NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) call has a latency relative to the\n *       specified radio timeslot start, but this does not affect the actual start time of the timeslot.\n * @note NRF_TIMER0 is reset at the start of the radio timeslot, and is clocked at 1MHz from the high frequency\n *       (16 MHz) clock source. If p_request->hfclk_force_xtal is true, the high frequency clock is\n *       guaranteed to be clocked from the external crystal.\n * @note The SoftDevice will neither access the NRF_RADIO peripheral nor the NRF_TIMER0 peripheral\n *       during the radio timeslot.\n *\n * @param[in] p_request Pointer to the request parameters.\n *\n * @retval ::NRF_ERROR_FORBIDDEN Either:\n *                                - The session is not open.\n *                                - The session is not IDLE.\n *                                - This is the first request and its type is not @ref NRF_RADIO_REQ_TYPE_EARLIEST.\n *                                - The request type was set to @ref NRF_RADIO_REQ_TYPE_NORMAL after a\n *                                  @ref NRF_RADIO_REQ_TYPE_EARLIEST request was blocked.\n * @retval ::NRF_ERROR_INVALID_ADDR If the p_request pointer is invalid.\n * @retval ::NRF_ERROR_INVALID_PARAM If the parameters of p_request are not valid.\n * @retval ::NRF_SUCCESS Otherwise.\n */\nSVCALL(SD_RADIO_REQUEST, uint32_t, sd_radio_request(nrf_radio_request_t const *p_request));\n\n/**@brief Write register protected by the SoftDevice\n *\n * This function writes to a register that is write-protected by the SoftDevice. Please refer to your\n * SoftDevice Specification for more details about which registers that are protected by SoftDevice.\n * This function can write to the following protected peripheral:\n *  - ACL\n *\n * @note Protected registers may be read directly.\n * @note Register that are write-once will return @ref NRF_SUCCESS on second set, even the value in\n *       the register has not changed. See the Product Specification for more details about register\n *       properties.\n *\n * @param[in]  p_register Pointer to register to be written.\n * @param[in]  value Value to be written to the register.\n *\n * @retval ::NRF_ERROR_INVALID_ADDR This function can not write to the reguested register.\n * @retval ::NRF_SUCCESS Value successfully written to register.\n *\n */\nSVCALL(SD_PROTECTED_REGISTER_WRITE, uint32_t, sd_protected_register_write(volatile uint32_t *p_register, uint32_t value));\n\n/**@} */\n\n#ifdef __cplusplus\n}\n#endif\n#endif // NRF_SOC_H__\n\n/**@} */\n"
  },
  {
    "path": "src/platform/nrf52/softdevice/nrf_svc.h",
    "content": "/*\n * Copyright (c) Nordic Semiconductor ASA\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form, except as embedded into a Nordic\n *    Semiconductor ASA integrated circuit in a product or a software update for\n *    such product, must reproduce the above copyright notice, this list of\n *    conditions and the following disclaimer in the documentation and/or other\n *    materials provided with the distribution.\n *\n * 3. Neither the name of Nordic Semiconductor ASA nor the names of its\n *    contributors may be used to endorse or promote products derived from this\n *    software without specific prior written permission.\n *\n * 4. This software, with or without modification, must only be used with a\n *    Nordic Semiconductor ASA integrated circuit.\n *\n * 5. Any software provided in binary form under this license must not be reverse\n *    engineered, decompiled, modified and/or disassembled.\n *\n * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA \"AS IS\" AND ANY EXPRESS\n * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\n * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef NRF_SVC__\n#define NRF_SVC__\n\n#include \"stdint.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** @brief Supervisor call declaration.\n *\n * A call to a function marked with @ref SVCALL, will trigger a Supervisor Call (SVC) Exception.\n * The SVCs with SVC numbers 0x00-0x0F are forwared to the application. All other SVCs are handled by the SoftDevice.\n *\n * @param[in] number      The SVC number to be used.\n * @param[in] return_type The return type of the SVC function.\n * @param[in] signature   Function signature. The function can have at most four arguments.\n */\n\n#ifdef SVCALL_AS_NORMAL_FUNCTION\n#define SVCALL(number, return_type, signature) return_type signature\n#else\n\n#ifndef SVCALL\n#if defined(__CC_ARM)\n#define SVCALL(number, return_type, signature) return_type __svc(number) signature\n#elif defined(__GNUC__)\n#ifdef __cplusplus\n#define GCC_CAST_CPP (uint16_t)\n#else\n#define GCC_CAST_CPP\n#endif\n#define SVCALL(number, return_type, signature)                                                                                   \\\n    _Pragma(\"GCC diagnostic push\") _Pragma(\"GCC diagnostic ignored \\\"-Wreturn-type\\\"\") __attribute__((naked))                    \\\n    __attribute__((unused)) static return_type signature                                                                         \\\n    {                                                                                                                            \\\n        __asm(\"svc %0\\n\"                                                                                                         \\\n              \"bx r14\"                                                                                                           \\\n              :                                                                                                                  \\\n              : \"I\"(GCC_CAST_CPP number)                                                                                         \\\n              : \"r0\");                                                                                                           \\\n    }                                                                                                                            \\\n    _Pragma(\"GCC diagnostic pop\")\n\n#elif defined(__ICCARM__)\n#define PRAGMA(x) _Pragma(#x)\n#define SVCALL(number, return_type, signature)                                                                                   \\\n    PRAGMA(swi_number = (number))                                                                                                \\\n    __swi return_type signature;\n#else\n#define SVCALL(number, return_type, signature) return_type signature\n#endif\n#endif // SVCALL\n\n#endif // SVCALL_AS_NORMAL_FUNCTION\n\n#ifdef __cplusplus\n}\n#endif\n#endif // NRF_SVC__\n"
  },
  {
    "path": "src/platform/portduino/PortduinoGlue.cpp",
    "content": "#include \"CryptoEngine.h\"\n#include \"PortduinoGPIO.h\"\n#include \"SPIChip.h\"\n#include \"mesh/RF95Interface.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n\n#include \"PortduinoGlue.h\"\n#include \"SHA256.h\"\n#include \"api/ServerAPI.h\"\n#include \"linux/gpio/LinuxGPIOPin.h\"\n#include \"meshUtils.h\"\n#include <ErriezCRC32.h>\n#include <Utility.h>\n#include <assert.h>\n#include <bluetooth/bluetooth.h>\n#include <bluetooth/hci.h>\n#include <filesystem>\n#include <fstream>\n#include <iostream>\n#include <map>\n#include <set>\n#include <stdexcept>\n#include <sys/ioctl.h>\n#include <unistd.h>\n\n#ifdef PORTDUINO_LINUX_HARDWARE\n#include <cxxabi.h>\n#endif\n\n#include \"platform/portduino/USBHal.h\"\n\nportduino_config_struct portduino_config;\nportduino_status_struct portduino_status;\nstd::ofstream traceFile;\nstd::ofstream JSONFile;\nCh341Hal *ch341Hal = nullptr;\nchar *configPath = nullptr;\nchar *optionMac = nullptr;\nbool verboseEnabled = false;\nbool yamlOnly = false;\n\nconst char *argp_program_version = optstr(APP_VERSION);\n\nchar stdoutBuffer[512];\n\n// FIXME - move setBluetoothEnable into a HALPlatform class\nvoid setBluetoothEnable(bool enable)\n{\n    // not needed\n}\n\nvoid cpuDeepSleep(uint32_t msecs)\n{\n    notImplemented(\"cpuDeepSleep\");\n}\n\nvoid updateBatteryLevel(uint8_t level) NOT_IMPLEMENTED(\"updateBatteryLevel\");\n\nint TCPPort = SERVER_API_DEFAULT_PORT;\nbool checkConfigPort = true;\n\nstatic error_t parse_opt(int key, char *arg, struct argp_state *state)\n{\n    switch (key) {\n    case 'p':\n        if (sscanf(arg, \"%d\", &TCPPort) < 1) {\n            return ARGP_ERR_UNKNOWN;\n        } else {\n            checkConfigPort = false;\n            printf(\"Using config file %d\\n\", TCPPort);\n        }\n        break;\n    case 'c':\n        configPath = arg;\n        break;\n    case 's':\n        portduino_config.force_simradio = true;\n        break;\n    case 'h':\n        optionMac = arg;\n        break;\n    case 'v':\n        verboseEnabled = true;\n        break;\n    case 'y':\n        yamlOnly = true;\n        break;\n    case ARGP_KEY_ARG:\n        return 0;\n    default:\n        return ARGP_ERR_UNKNOWN;\n    }\n    return 0;\n}\n\nvoid portduinoCustomInit()\n{\n    static struct argp_option options[] = {{\"port\", 'p', \"PORT\", 0, \"The TCP port to use.\"},\n                                           {\"config\", 'c', \"CONFIG_PATH\", 0, \"Full path of the .yaml config file to use.\"},\n                                           {\"hwid\", 'h', \"HWID\", 0, \"The mac address to assign to this virtual machine\"},\n                                           {\"sim\", 's', 0, 0, \"Run in Simulated radio mode\"},\n                                           {\"verbose\", 'v', 0, 0, \"Set log level to full debug\"},\n                                           {\"output-yaml\", 'y', 0, 0, \"Output config yaml and exit\"},\n                                           {0}};\n    static void *childArguments;\n    static char doc[] = \"Meshtastic native build.\";\n    static char args_doc[] = \"...\";\n    static struct argp argp = {options, parse_opt, args_doc, doc, 0, 0, 0};\n    const struct argp_child child = {&argp, OPTION_ARG_OPTIONAL, 0, 0};\n    portduinoAddArguments(child, childArguments);\n}\n\nvoid getMacAddr(uint8_t *dmac)\n{\n    // We should store this value, and short-circuit all this if it's already been set.\n    if (optionMac != nullptr && strlen(optionMac) > 0) {\n        if (strlen(optionMac) >= 12) {\n            MAC_from_string(optionMac, dmac);\n        } else {\n            uint32_t hwId = {0};\n            sscanf(optionMac, \"%u\", &hwId);\n            dmac[0] = 0x80;\n            dmac[1] = 0;\n            dmac[2] = hwId >> 24;\n            dmac[3] = hwId >> 16;\n            dmac[4] = hwId >> 8;\n            dmac[5] = hwId & 0xff;\n        }\n    } else if (portduino_config.mac_address.length() > 11) {\n        MAC_from_string(portduino_config.mac_address, dmac);\n        exit;\n    } else {\n\n        struct hci_dev_info di = {0};\n        di.dev_id = 0;\n        bdaddr_t bdaddr;\n        int btsock;\n        btsock = socket(AF_BLUETOOTH, SOCK_RAW, 1);\n        if (btsock < 0) { // If anything fails, just return with the default value\n            return;\n        }\n\n        if (ioctl(btsock, HCIGETDEVINFO, (void *)&di)) {\n            return;\n        }\n\n        dmac[0] = di.bdaddr.b[5];\n        dmac[1] = di.bdaddr.b[4];\n        dmac[2] = di.bdaddr.b[3];\n        dmac[3] = di.bdaddr.b[2];\n        dmac[4] = di.bdaddr.b[1];\n        dmac[5] = di.bdaddr.b[0];\n    }\n}\n\nstd::string cleanupNameForAutoconf(std::string name)\n{\n    // Convert spaces -> dashes, lowercase\n\n    std::transform(name.begin(), name.end(), name.begin(), [](unsigned char c) {\n        if (c == ' ') {\n            return '-';\n        }\n        return (char)std::tolower(c);\n    });\n\n    return name;\n}\n\n/** apps run under portduino can optionally define a portduinoSetup() to\n * use portduino specific init code (such as gpioBind) to setup portduino on their host machine,\n * before running 'arduino' code.\n */\nvoid portduinoSetup()\n{\n    int max_GPIO = 0;\n    std::string gpioChipName = \"gpiochip\";\n    portduino_config.displayPanel = no_screen;\n\n    // Force stdout to be line buffered\n    setvbuf(stdout, stdoutBuffer, _IOLBF, sizeof(stdoutBuffer));\n\n    if (portduino_config.force_simradio == true) {\n        portduino_config.lora_module = use_simradio;\n    } else if (configPath != nullptr) {\n        if (loadConfig(configPath)) {\n            if (!yamlOnly)\n                std::cout << \"Using \" << configPath << \" as config file\" << std::endl;\n        } else {\n            std::cout << \"Unable to use \" << configPath << \" as config file\" << std::endl;\n            exit(EXIT_FAILURE);\n        }\n    } else if (access(\"config.yaml\", R_OK) == 0) {\n        if (loadConfig(\"config.yaml\")) {\n            if (!yamlOnly)\n                std::cout << \"Using local config.yaml as config file\" << std::endl;\n        } else {\n            std::cout << \"Unable to use local config.yaml as config file\" << std::endl;\n            exit(EXIT_FAILURE);\n        }\n    } else if (access(\"/etc/meshtasticd/config.yaml\", R_OK) == 0) {\n        if (loadConfig(\"/etc/meshtasticd/config.yaml\")) {\n            if (!yamlOnly)\n                std::cout << \"Using /etc/meshtasticd/config.yaml as config file\" << std::endl;\n        } else {\n            std::cout << \"Unable to use /etc/meshtasticd/config.yaml as config file\" << std::endl;\n            exit(EXIT_FAILURE);\n        }\n    } else {\n        if (!yamlOnly)\n            std::cout << \"No 'config.yaml' found...\" << std::endl;\n        portduino_config.lora_module = use_simradio;\n    }\n\n    if (portduino_config.config_directory != \"\") {\n        std::string filetype = \".yaml\";\n        for (const std::filesystem::directory_entry &entry :\n             std::filesystem::directory_iterator{portduino_config.config_directory}) {\n            if (ends_with(entry.path().string(), \".yaml\")) {\n                std::cout << \"Also using \" << entry << \" as additional config file\" << std::endl;\n                loadConfig(entry.path().c_str());\n            }\n        }\n    }\n\n    if (yamlOnly) {\n        std::cout << portduino_config.emit_yaml() << std::endl;\n        exit(EXIT_SUCCESS);\n    }\n\n    if (portduino_config.force_simradio) {\n        std::cout << \"Running in simulated mode.\" << std::endl;\n        portduino_config.MaxNodes = 200; // Default to 200 nodes\n        // Set the random seed equal to TCPPort to have a different seed per instance\n        randomSeed(TCPPort);\n        return;\n    }\n\n    // If LoRa `Module: auto` (default in config.yaml),\n    // attempt to auto config based on Product Strings\n    if (portduino_config.lora_module == use_autoconf) {\n        bool found_hat = false;\n        bool found_rak_eeprom = false;\n        bool found_ch341 = false;\n\n        char hat_vendor[96] = {0};\n        char autoconf_product[96] = {0};\n        // Try CH341\n        try {\n            std::cout << \"autoconf: Looking for CH341 device...\" << std::endl;\n            ch341Hal = new Ch341Hal(0, portduino_config.lora_usb_serial_num, portduino_config.lora_usb_vid,\n                                    portduino_config.lora_usb_pid);\n            ch341Hal->getProductString(autoconf_product, 95);\n            delete ch341Hal;\n            std::cout << \"autoconf: Found CH341 device \" << autoconf_product << std::endl;\n\n            found_ch341 = true;\n        } catch (...) {\n            std::cout << \"autoconf: Could not locate CH341 device\" << std::endl;\n        }\n        // Try Pi HAT+\n        if (strlen(autoconf_product) < 6) {\n            std::cout << \"autoconf: Looking for Pi HAT+...\" << std::endl;\n            if (access(\"/proc/device-tree/hat/vendor\", R_OK) == 0) {\n                std::ifstream hatVendorFile(\"/proc/device-tree/hat/vendor\");\n                if (hatVendorFile.is_open()) {\n                    hatVendorFile.read(hat_vendor, 95);\n                    hatVendorFile.close();\n                }\n            }\n            if (access(\"/proc/device-tree/hat/product\", R_OK) == 0) {\n                std::ifstream hatProductFile(\"/proc/device-tree/hat/product\");\n                if (hatProductFile.is_open()) {\n                    hatProductFile.read(autoconf_product, 95);\n                    hatProductFile.close();\n                }\n                std::cout << \"autoconf: Found Pi HAT+ \" << hat_vendor << \" \" << autoconf_product << \" at /proc/device-tree/hat\"\n                          << std::endl;\n\n                // check for custom data fields\n                int i = 0;\n                while (access((\"/proc/device-tree/hat/custom_\" + std::to_string(i)).c_str(), R_OK) == 0) {\n                    std::ifstream customFieldFile((\"/proc/device-tree/hat/custom_\" + std::to_string(i)).c_str());\n                    if (customFieldFile.is_open()) {\n                        std::string customFieldName;\n                        std::string customFieldValue;\n                        getline(customFieldFile, customFieldName, ' ');\n                        getline(customFieldFile, customFieldValue, ' ');\n                        customFieldFile.close();\n\n                        printf(\"autoconf: Found hat+ custom field %s: %s\\n\", customFieldName.c_str(), customFieldValue.c_str());\n                        portduino_config.hat_plus_custom_fields[customFieldName] = customFieldValue;\n                    }\n\n                    i++;\n                }\n\n                // potential TODO: Validate that this is a real UUID\n                std::ifstream hatUUID(\"/proc/device-tree/hat/uuid\");\n                char uuid[38] = {0};\n                if (hatUUID.is_open()) {\n                    hatUUID.read(uuid, 37);\n                    hatUUID.close();\n                    std::cout << \"autoconf: UUID \" << uuid << std::endl;\n                    SHA256 uuid_hash;\n                    uint8_t uuid_hash_bytes[32] = {0};\n\n                    uuid_hash.reset();\n                    uuid_hash.update(uuid, 37);\n                    uuid_hash.finalize(uuid_hash_bytes, 32);\n\n                    for (int j = 0; j < 16; j++) {\n                        portduino_config.device_id[j] = uuid_hash_bytes[j];\n                    }\n                    portduino_config.has_device_id = true;\n                    uint8_t dmac[6] = {0};\n                    dmac[0] = (uuid_hash_bytes[17] << 4) | 2;\n                    dmac[1] = uuid_hash_bytes[18];\n                    dmac[2] = uuid_hash_bytes[19];\n                    dmac[3] = uuid_hash_bytes[20];\n                    dmac[4] = uuid_hash_bytes[21];\n                    dmac[5] = uuid_hash_bytes[22];\n                    char macBuf[13] = {0};\n                    snprintf(macBuf, sizeof(macBuf), \"%02X%02X%02X%02X%02X%02X\", dmac[0], dmac[1], dmac[2], dmac[3], dmac[4],\n                             dmac[5]);\n                    portduino_config.mac_address = macBuf;\n                    found_hat = true;\n                }\n\n            } else {\n                std::cout << \"autoconf: Could not locate Pi HAT+ at /proc/device-tree/hat\" << std::endl;\n            }\n        }\n        // attempt to load autoconf data from an EEPROM on 0x50\n        //      RAK6421-13300-S1:aabbcc123456:5ba85807d92138b7519cfb60460573af:3061e8d8\n        // <model string>:mac address :<16 random unique bytes in hexidecimal> : crc32\n        // crc32 is calculated on the eeprom string up to but not including the final colon\n        if (strlen(autoconf_product) < 6 && portduino_config.i2cdev != \"\") {\n            try {\n                char *mac_start = nullptr;\n                char *devID_start = nullptr;\n                char *crc32_start = nullptr;\n                Wire.begin();\n                Wire.beginTransmission(0x50);\n                Wire.write(0x0);\n                Wire.write(0x0);\n                Wire.endTransmission();\n                Wire.requestFrom((uint8_t)0x50, (uint8_t)75);\n                uint8_t i = 0;\n                delay(100);\n                std::string autoconf_raw;\n                while (Wire.available() && i < sizeof(autoconf_product)) {\n                    autoconf_product[i] = Wire.read();\n                    if (autoconf_product[i] == 0xff) {\n                        autoconf_product[i] = 0x0;\n                        break;\n                    }\n                    autoconf_raw += autoconf_product[i];\n                    if (autoconf_product[i] == ':') {\n                        autoconf_product[i] = 0x0;\n                        if (mac_start == nullptr) {\n                            mac_start = autoconf_product + i + 1;\n                        } else if (devID_start == nullptr) {\n                            devID_start = autoconf_product + i + 1;\n                        } else if (crc32_start == nullptr) {\n                            crc32_start = autoconf_product + i + 1;\n                        }\n                    }\n                    i++;\n                }\n                if (crc32_start != nullptr && strlen(crc32_start) == 8) {\n                    std::string crc32_str(crc32_start);\n                    uint32_t crc32_value = 0;\n\n                    // convert crc32 ascii to raw uint32\n                    for (int j = 0; j < 4; j++) {\n                        crc32_value += std::stoi(crc32_str.substr(j * 2, 2), nullptr, 16) << (3 - j) * 8;\n                    }\n                    std::cout << \"autoconf: Found eeprom crc \" << crc32_start << std::endl;\n\n                    // set the autoconf string to blank and short circuit\n                    if (crc32_value != crc32Buffer(autoconf_raw.c_str(), i - 9)) {\n                        std::cout << \"autoconf: crc32 mismatch, dropping \" << std::endl;\n                        autoconf_product[0] = 0x0;\n                    } else {\n                        std::cout << \"autoconf: Found eeprom data \" << autoconf_raw << std::endl;\n                        found_rak_eeprom = true;\n                        if (mac_start != nullptr) {\n                            std::cout << \"autoconf: Found mac data \" << mac_start << std::endl;\n                            if (strlen(mac_start) == 12)\n                                portduino_config.mac_address = std::string(mac_start);\n                        }\n                        if (devID_start != nullptr) {\n                            std::cout << \"autoconf: Found deviceid data \" << devID_start << std::endl;\n                            if (strlen(devID_start) == 32) {\n                                std::string devID_str(devID_start);\n                                for (int j = 0; j < 16; j++) {\n                                    portduino_config.device_id[j] = std::stoi(devID_str.substr(j * 2, 2), nullptr, 16);\n                                }\n                                portduino_config.has_device_id = true;\n                            }\n                        }\n                    }\n                } else {\n                    std::cout << \"autoconf: crc32 missing \" << std::endl;\n                    autoconf_product[0] = 0x0;\n                }\n            } catch (...) {\n                std::cout << \"autoconf: Could not locate EEPROM\" << std::endl;\n            }\n        }\n        // Load the config file based on the product string\n        if (strlen(autoconf_product) > 0) {\n            // From configProducts map in PortduinoGlue.h\n            std::string product_config = \"\";\n\n            if (configProducts.find(autoconf_product) != configProducts.end()) {\n                product_config = configProducts.at(autoconf_product);\n            } else {\n                if (found_hat) {\n                    product_config =\n                        cleanupNameForAutoconf(\"lora-hat-\" + std::string(hat_vendor) + \"-\" + autoconf_product + \".yaml\");\n                    if (strncmp(hat_vendor, \"RAK\", strlen(\"RAK\")) == 0 &&\n                        strncmp(autoconf_product, \"6421 Pi Hat\", strlen(\"6421 Pi Hat\")) == 0) {\n                        std::cout << \"autoconf: Setting hardwareModel to RAK6421\" << std::endl;\n                        portduino_status.hardwareModel = meshtastic_HardwareModel_RAK6421;\n                    }\n                } else if (found_ch341) {\n                    product_config = cleanupNameForAutoconf(\"lora-usb-\" + std::string(autoconf_product) + \".yaml\");\n                    // look for more data after the null terminator\n                    size_t len = strlen(autoconf_product);\n                    if (len < 74) {\n                        memcpy(portduino_config.device_id, autoconf_product + len + 1, 16);\n                        if (!memfll(portduino_config.device_id, '\\0', 16) && !memfll(portduino_config.device_id, 0xff, 16)) {\n                            portduino_config.has_device_id = true;\n                            if (strncmp(autoconf_product, \"MESHSTICK 1262\", strlen(\"MESHSTICK 1262\")) == 0) {\n                                std::cout << \"autoconf: Setting hardwareModel to Meshstick 1262\" << std::endl;\n                                portduino_status.hardwareModel = meshtastic_HardwareModel_MESHSTICK_1262;\n                            }\n                        }\n                    }\n                }\n\n                // Don't try to automatically find config for a device with RAK eeprom.\n                if (found_rak_eeprom) {\n                    std::cerr << \"autoconf: Found unknown RAK product \" << autoconf_product << std::endl;\n                    exit(EXIT_FAILURE);\n                }\n                if (access((portduino_config.available_directory + product_config).c_str(), R_OK) != 0) {\n                    std::cerr << \"autoconf: Unable to find config for \" << autoconf_product << \"(tried \" << product_config << \")\"\n                              << std::endl;\n                    exit(EXIT_FAILURE);\n                }\n            }\n\n            if (loadConfig((portduino_config.available_directory + product_config).c_str())) {\n                std::cout << \"autoconf: Using \" << product_config << \" as config file for \" << autoconf_product << std::endl;\n            } else {\n                std::cerr << \"autoconf: Unable to use \" << product_config << \" as config file for \" << autoconf_product\n                          << std::endl;\n                exit(EXIT_FAILURE);\n            }\n        } else {\n            std::cerr << \"autoconf: Could not locate any devices\" << std::endl;\n            exit(EXIT_FAILURE);\n        }\n    }\n\n    // if we're using a usermode driver, we need to initialize it here, to get a serial number back for mac address\n    uint8_t dmac[6] = {0};\n    if (portduino_config.lora_spi_dev == \"ch341\") {\n        try {\n            ch341Hal = new Ch341Hal(0, portduino_config.lora_usb_serial_num, portduino_config.lora_usb_vid,\n                                    portduino_config.lora_usb_pid);\n        } catch (std::exception &e) {\n            std::cerr << e.what() << std::endl;\n            std::cerr << \"Could not initialize CH341 device!\" << std::endl;\n            exit(EXIT_FAILURE);\n        }\n        char serial[9] = {0};\n        ch341Hal->getSerialString(serial, 8);\n        std::cout << \"CH341 Serial \" << serial << std::endl;\n        char product_string[96] = {0};\n        ch341Hal->getProductString(product_string, 95);\n        std::cout << \"CH341 Product \" << product_string << std::endl;\n        if (strlen(serial) == 8 && portduino_config.mac_address.length() < 12) {\n            std::cout << \"Deriving MAC address from Serial and Product String\" << std::endl;\n            uint8_t hash[104] = {0};\n            memcpy(hash, serial, 8);\n            memcpy(hash + 8, product_string, strlen(product_string));\n            crypto->hash(hash, 8 + strlen(product_string));\n            dmac[0] = (hash[0] << 4) | 2;\n            dmac[1] = hash[1];\n            dmac[2] = hash[2];\n            dmac[3] = hash[3];\n            dmac[4] = hash[4];\n            dmac[5] = hash[5];\n            char macBuf[13] = {0};\n            sprintf(macBuf, \"%02X%02X%02X%02X%02X%02X\", dmac[0], dmac[1], dmac[2], dmac[3], dmac[4], dmac[5]);\n            portduino_config.mac_address = macBuf;\n        }\n    }\n\n    getMacAddr(dmac);\n#ifndef UNIT_TEST\n    if (dmac[0] == 0 && dmac[1] == 0 && dmac[2] == 0 && dmac[3] == 0 && dmac[4] == 0 && dmac[5] == 0) {\n        std::cout << \"*** Blank MAC Address not allowed!\" << std::endl;\n        std::cout << \"Please set a MAC Address in config.yaml using either MACAddress or MACAddressSource.\" << std::endl;\n        exit(EXIT_FAILURE);\n    }\n#endif\n    printf(\"MAC ADDRESS: %02X:%02X:%02X:%02X:%02X:%02X\\n\", dmac[0], dmac[1], dmac[2], dmac[3], dmac[4], dmac[5]);\n    // Rather important to set this, if not running simulated.\n    randomSeed(time(NULL));\n\n    std::string defaultGpioChipName = gpioChipName + std::to_string(portduino_config.lora_default_gpiochip);\n\n    std::set<int> used_pins;\n\n    for (const auto *i : portduino_config.all_pins) {\n        if (i->enabled && i->pin > max_GPIO) {\n            max_GPIO = i->pin;\n        }\n    }\n\n    for (auto i : portduino_config.extra_pins) {\n        if (i.enabled && i.pin > max_GPIO) {\n            max_GPIO = i.pin;\n        }\n    }\n\n    gpioInit(max_GPIO + 1); // Done here so we can inform Portduino how many GPIOs we need.\n\n    // Need to bind all the configured GPIO pins so they're not simulated\n    // TODO: If one of these fails, we should log and terminate\n    for (const auto *i : portduino_config.all_pins) {\n        // In the case of a ch341 Lora device, we don't want to touch the system GPIO lines for Lora\n        // Those GPIO are handled in our usermode driver instead.\n        if (i->config_section == \"Lora\" && portduino_config.lora_spi_dev == \"ch341\") {\n            continue;\n        }\n        if (i->enabled) {\n            if (used_pins.find(i->pin) != used_pins.end()) {\n                printf(\"Pin %d is in use for multiple purposes\\n\", i->pin);\n            } else {\n                if (initGPIOPin(i->pin, gpioChipName + std::to_string(i->gpiochip), i->line) != ERRNO_OK) {\n                    printf(\"Error setting pin number %d. It may not exist, or may already be in use.\\n\", i->line);\n                    exit(EXIT_FAILURE);\n                }\n                used_pins.insert(i->pin);\n            }\n        }\n    }\n    printf(\"Initializing extra pins\\n\");\n    for (auto i : portduino_config.extra_pins) {\n        // In the case of a ch341 Lora device, we don't want to touch the system GPIO lines for Lora\n        // Those GPIO are handled in our usermode driver instead.\n        if (i.config_section == \"Lora\" && portduino_config.lora_spi_dev == \"ch341\") {\n            continue;\n        }\n        if (i.enabled) {\n            if (used_pins.find(i.pin) != used_pins.end()) {\n                printf(\"Pin %d is in use for multiple purposes\\n\", i.pin);\n            } else {\n                if (initGPIOPin(i.pin, gpioChipName + std::to_string(i.gpiochip), i.line) != ERRNO_OK) {\n                    printf(\"Error setting pin number %d. It may not exist, or may already be in use.\\n\", i.line);\n                    exit(EXIT_FAILURE);\n                }\n                used_pins.insert(i.pin);\n            }\n        }\n    }\n\n    // In one test, this dance seemed necessary to trigger the pin to detect properly.\n    if (portduino_config.lora_pa_detect_pin.enabled) {\n        pinMode(portduino_config.lora_pa_detect_pin.pin, INPUT_PULLDOWN);\n        sleep(1);\n        if (digitalRead(portduino_config.lora_pa_detect_pin.pin) == LOW) {\n            std::cout << \"Pin \" << portduino_config.lora_pa_detect_pin.pin << \" PULLDOWN is LOW\" << std::endl;\n        }\n        pinMode(portduino_config.lora_pa_detect_pin.pin, INPUT_PULLUP);\n        sleep(1);\n        if (digitalRead(portduino_config.lora_pa_detect_pin.pin) == HIGH) {\n            std::cout << \"Pin \" << portduino_config.lora_pa_detect_pin.pin << \" PULLUP is HIGH, dropping PA curve\" << std::endl;\n            portduino_config.num_pa_points = 1;\n            portduino_config.tx_gain_lora[0] = 0;\n        } else {\n            std::cout << \"Pin \" << portduino_config.lora_pa_detect_pin.pin << \" PULLUP is LOW, using PA curve\" << std::endl;\n        }\n\n        // disable bias once finished\n        pinMode(portduino_config.lora_pa_detect_pin.pin, INPUT);\n    } else if (portduino_config.hat_plus_custom_fields.find(\"io_slot1\") != portduino_config.hat_plus_custom_fields.end()) {\n        printf(\"Hat+ io_slot1 is %s\\n\", portduino_config.hat_plus_custom_fields[\"io_slot1\"].c_str());\n        if (portduino_config.hat_plus_custom_fields[\"io_slot1\"] != \"RAK13302\") {\n            std::cout << \"Hat+ io_slot1 is not RAK13302, skipping PA curve\" << std::endl;\n            portduino_config.num_pa_points = 1;\n            portduino_config.tx_gain_lora[0] = 0;\n        }\n    }\n\n    for (auto i : portduino_config.extra_pins) {\n        // In the case of a ch341 Lora device, we don't want to touch the system GPIO lines for Lora\n        // Those GPIO are handled in our usermode driver instead.\n        if (i.config_section == \"Lora\" && portduino_config.lora_spi_dev == \"ch341\") {\n            continue;\n        }\n        if (i.enabled && i.default_high) {\n            pinMode(i.pin, OUTPUT);\n            digitalWrite(i.pin, HIGH);\n        }\n    }\n\n    // Only initialize the radio pins when dealing with real, kernel controlled SPI hardware\n    if (portduino_config.lora_spi_dev != \"\" && portduino_config.lora_spi_dev != \"ch341\") {\n        SPI.begin(portduino_config.lora_spi_dev.c_str());\n    }\n\n    if (portduino_config.traceFilename != \"\") {\n        try {\n            traceFile.open(portduino_config.traceFilename, std::ios::out | std::ios::app);\n        } catch (std::ofstream::failure &e) {\n            std::cout << \"*** traceFile Exception \" << e.what() << std::endl;\n            exit(EXIT_FAILURE);\n        }\n        if (!traceFile.is_open()) {\n            std::cout << \"*** traceFile open failure\" << std::endl;\n            exit(EXIT_FAILURE);\n        }\n    } else if (portduino_config.JSONFilename != \"\") {\n        try {\n            if (portduino_config.JSONFileRotate == 0) {\n                JSONFile.open(portduino_config.JSONFilename, std::ios::out | std::ios::app);\n            }\n        } catch (std::ofstream::failure &e) {\n            std::cout << \"*** JSONFile Exception \" << e.what() << std::endl;\n            exit(EXIT_FAILURE);\n        }\n        if (!JSONFile.is_open()) {\n            std::cout << \"*** JSONFile open failure\" << std::endl;\n            exit(EXIT_FAILURE);\n        }\n    }\n    if (verboseEnabled && portduino_config.logoutputlevel != level_trace) {\n        portduino_config.logoutputlevel = level_debug;\n    }\n\n    return;\n}\n\nint initGPIOPin(int pinNum, const std::string &gpioChipName, int line)\n{\n#ifdef PORTDUINO_LINUX_HARDWARE\n    std::string gpio_name = \"GPIO\" + std::to_string(pinNum);\n    std::cout << \"Initializing \" << gpio_name << \" on chip \" << gpioChipName << std::endl;\n    try {\n        GPIOPin *csPin;\n        csPin = new LinuxGPIOPin(pinNum, gpioChipName.c_str(), line, gpio_name.c_str());\n        csPin->setSilent();\n        gpioBind(csPin);\n        return ERRNO_OK;\n    } catch (...) {\n        const std::type_info *t = abi::__cxa_current_exception_type();\n        std::cout << \"Warning, cannot claim pin \" << gpio_name << (t ? t->name() : \"null\") << std::endl;\n        return ERRNO_DISABLED;\n    }\n#else\n    return ERRNO_OK;\n#endif\n}\n\nbool loadConfig(const char *configPath)\n{\n    YAML::Node yamlConfig;\n    try {\n        yamlConfig = YAML::LoadFile(configPath);\n        if (yamlConfig[\"Logging\"]) {\n            if (yamlConfig[\"Logging\"][\"LogLevel\"].as<std::string>(\"info\") == \"trace\") {\n                portduino_config.logoutputlevel = level_trace;\n            } else if (yamlConfig[\"Logging\"][\"LogLevel\"].as<std::string>(\"info\") == \"debug\") {\n                portduino_config.logoutputlevel = level_debug;\n            } else if (yamlConfig[\"Logging\"][\"LogLevel\"].as<std::string>(\"info\") == \"info\") {\n                portduino_config.logoutputlevel = level_info;\n            } else if (yamlConfig[\"Logging\"][\"LogLevel\"].as<std::string>(\"info\") == \"warn\") {\n                portduino_config.logoutputlevel = level_warn;\n            } else if (yamlConfig[\"Logging\"][\"LogLevel\"].as<std::string>(\"info\") == \"error\") {\n                portduino_config.logoutputlevel = level_error;\n            }\n            portduino_config.traceFilename = yamlConfig[\"Logging\"][\"TraceFile\"].as<std::string>(\"\");\n            portduino_config.JSONFilename = yamlConfig[\"Logging\"][\"JSONFile\"].as<std::string>(\"\");\n            portduino_config.JSONFileRotate = yamlConfig[\"Logging\"][\"JSONFileRotate\"].as<int>(0);\n            portduino_config.JSONFilter = (_meshtastic_PortNum)yamlConfig[\"Logging\"][\"JSONFilter\"].as<int>(0);\n            if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"textmessage\")\n                portduino_config.JSONFilter = meshtastic_PortNum_TEXT_MESSAGE_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"telemetry\")\n                portduino_config.JSONFilter = meshtastic_PortNum_TELEMETRY_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"nodeinfo\")\n                portduino_config.JSONFilter = meshtastic_PortNum_NODEINFO_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"position\")\n                portduino_config.JSONFilter = meshtastic_PortNum_POSITION_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"waypoint\")\n                portduino_config.JSONFilter = meshtastic_PortNum_WAYPOINT_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"neighborinfo\")\n                portduino_config.JSONFilter = meshtastic_PortNum_NEIGHBORINFO_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"traceroute\")\n                portduino_config.JSONFilter = meshtastic_PortNum_TRACEROUTE_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"detection\")\n                portduino_config.JSONFilter = meshtastic_PortNum_DETECTION_SENSOR_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"paxcounter\")\n                portduino_config.JSONFilter = meshtastic_PortNum_PAXCOUNTER_APP;\n            else if (yamlConfig[\"Logging\"][\"JSONFilter\"].as<std::string>(\"\") == \"remotehardware\")\n                portduino_config.JSONFilter = meshtastic_PortNum_REMOTE_HARDWARE_APP;\n\n            if (yamlConfig[\"Logging\"][\"AsciiLogs\"]) {\n                // Default is !isatty(1) but can be set explicitly in config.yaml\n                portduino_config.ascii_logs = yamlConfig[\"Logging\"][\"AsciiLogs\"].as<bool>();\n                portduino_config.ascii_logs_explicit = true;\n            }\n        }\n        if (yamlConfig[\"Lora\"]) {\n\n            if (yamlConfig[\"Lora\"][\"Module\"]) {\n                for (const auto &loraModule : portduino_config.loraModules) {\n                    if (yamlConfig[\"Lora\"][\"Module\"].as<std::string>(\"\") == loraModule.second) {\n                        portduino_config.lora_module = loraModule.first;\n                        break;\n                    }\n                }\n            }\n            if (yamlConfig[\"Lora\"][\"SX126X_MAX_POWER\"])\n                portduino_config.sx126x_max_power = yamlConfig[\"Lora\"][\"SX126X_MAX_POWER\"].as<int>(22);\n            if (yamlConfig[\"Lora\"][\"SX128X_MAX_POWER\"])\n                portduino_config.sx128x_max_power = yamlConfig[\"Lora\"][\"SX128X_MAX_POWER\"].as<int>(13);\n            if (yamlConfig[\"Lora\"][\"LR1110_MAX_POWER\"])\n                portduino_config.lr1110_max_power = yamlConfig[\"Lora\"][\"LR1110_MAX_POWER\"].as<int>(22);\n            if (yamlConfig[\"Lora\"][\"LR1120_MAX_POWER\"])\n                portduino_config.lr1120_max_power = yamlConfig[\"Lora\"][\"LR1120_MAX_POWER\"].as<int>(13);\n            if (yamlConfig[\"Lora\"][\"RF95_MAX_POWER\"])\n                portduino_config.rf95_max_power = yamlConfig[\"Lora\"][\"RF95_MAX_POWER\"].as<int>(20);\n\n            if (yamlConfig[\"Lora\"][\"TX_GAIN_LORA\"]) {\n                YAML::Node tx_gain_node = yamlConfig[\"Lora\"][\"TX_GAIN_LORA\"];\n                if (tx_gain_node.IsSequence() && tx_gain_node.size() != 0) {\n                    portduino_config.num_pa_points = min(tx_gain_node.size(), std::size(portduino_config.tx_gain_lora));\n                    for (int i = 0; i < portduino_config.num_pa_points; i++) {\n                        portduino_config.tx_gain_lora[i] = tx_gain_node[i].as<int>();\n                    }\n                } else {\n                    portduino_config.num_pa_points = 1;\n                    portduino_config.tx_gain_lora[0] = tx_gain_node.as<int>(0);\n                }\n            }\n\n            if (portduino_config.lora_module != use_autoconf && portduino_config.lora_module != use_simradio &&\n                !portduino_config.force_simradio) {\n                portduino_config.dio2_as_rf_switch = yamlConfig[\"Lora\"][\"DIO2_AS_RF_SWITCH\"].as<bool>(false);\n                portduino_config.dio3_tcxo_voltage = yamlConfig[\"Lora\"][\"DIO3_TCXO_VOLTAGE\"].as<float>(0) * 1000;\n                if (portduino_config.dio3_tcxo_voltage == 0 && yamlConfig[\"Lora\"][\"DIO3_TCXO_VOLTAGE\"].as<bool>(false)) {\n                    portduino_config.dio3_tcxo_voltage = 1800; // default millivolts for \"true\"\n                }\n\n                // backwards API compatibility and to globally set gpiochip once\n                portduino_config.lora_default_gpiochip = yamlConfig[\"Lora\"][\"gpiochip\"].as<int>(0);\n                for (auto this_pin : portduino_config.all_pins) {\n                    if (this_pin->config_section == \"Lora\") {\n                        readGPIOFromYaml(yamlConfig[\"Lora\"][this_pin->config_name], *this_pin);\n                    }\n                }\n            }\n\n            if (yamlConfig[\"Lora\"][\"Enable_Pins\"]) {\n                for (auto extra_pin : yamlConfig[\"Lora\"][\"Enable_Pins\"]) {\n                    portduino_config.extra_pins.push_back(pinMapping());\n                    portduino_config.extra_pins.back().config_section = \"Lora\";\n                    portduino_config.extra_pins.back().config_name = \"Enable_Pins\";\n                    portduino_config.extra_pins.back().enabled = true;\n                    portduino_config.extra_pins.back().default_high = true;\n                    readGPIOFromYaml(extra_pin, portduino_config.extra_pins.back());\n                }\n            }\n\n            portduino_config.spiSpeed = yamlConfig[\"Lora\"][\"spiSpeed\"].as<int>(2000000);\n            portduino_config.lora_usb_serial_num = yamlConfig[\"Lora\"][\"USB_Serialnum\"].as<std::string>(\"\");\n            portduino_config.lora_usb_pid = yamlConfig[\"Lora\"][\"USB_PID\"].as<int>(0x5512);\n            portduino_config.lora_usb_vid = yamlConfig[\"Lora\"][\"USB_VID\"].as<int>(0x1A86);\n\n            portduino_config.lora_spi_dev = yamlConfig[\"Lora\"][\"spidev\"].as<std::string>(\"spidev0.0\");\n            if (portduino_config.lora_spi_dev != \"ch341\") {\n                portduino_config.lora_spi_dev = \"/dev/\" + portduino_config.lora_spi_dev;\n                if (portduino_config.lora_spi_dev.length() == 14) {\n                    int x = portduino_config.lora_spi_dev.at(11) - '0';\n                    int y = portduino_config.lora_spi_dev.at(13) - '0';\n                    // Pretty sure this is always true\n                    if (x >= 0 && x < 10 && y >= 0 && y < 10) {\n                        // I believe this bit of weirdness is specifically for the new GUI\n                        portduino_config.lora_spi_dev_int = x + y << 4;\n                        portduino_config.display_spi_dev_int = portduino_config.lora_spi_dev_int;\n                        portduino_config.touchscreen_spi_dev_int = portduino_config.lora_spi_dev_int;\n                    }\n                }\n            }\n            if (yamlConfig[\"Lora\"][\"rfswitch_table\"]) {\n                portduino_config.has_rfswitch_table = true;\n                portduino_config.rfswitch_table[0].mode = LR11x0::MODE_STBY;\n                portduino_config.rfswitch_table[1].mode = LR11x0::MODE_RX;\n                portduino_config.rfswitch_table[2].mode = LR11x0::MODE_TX;\n                portduino_config.rfswitch_table[3].mode = LR11x0::MODE_TX_HP;\n                portduino_config.rfswitch_table[4].mode = LR11x0::MODE_TX_HF;\n                portduino_config.rfswitch_table[5].mode = LR11x0::MODE_GNSS;\n                portduino_config.rfswitch_table[6].mode = LR11x0::MODE_WIFI;\n                portduino_config.rfswitch_table[7] = END_OF_MODE_TABLE;\n\n                for (int i = 0; i < 5; i++) {\n\n                    // set up the pin array first\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"pins\"][i].as<std::string>(\"\") == \"DIO5\")\n                        portduino_config.rfswitch_dio_pins[i] = RADIOLIB_LR11X0_DIO5;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"pins\"][i].as<std::string>(\"\") == \"DIO6\")\n                        portduino_config.rfswitch_dio_pins[i] = RADIOLIB_LR11X0_DIO6;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"pins\"][i].as<std::string>(\"\") == \"DIO7\")\n                        portduino_config.rfswitch_dio_pins[i] = RADIOLIB_LR11X0_DIO7;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"pins\"][i].as<std::string>(\"\") == \"DIO8\")\n                        portduino_config.rfswitch_dio_pins[i] = RADIOLIB_LR11X0_DIO8;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"pins\"][i].as<std::string>(\"\") == \"DIO10\")\n                        portduino_config.rfswitch_dio_pins[i] = RADIOLIB_LR11X0_DIO10;\n\n                    // now fill in the table\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"MODE_STBY\"][i].as<std::string>(\"\") == \"HIGH\")\n                        portduino_config.rfswitch_table[0].values[i] = HIGH;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"MODE_RX\"][i].as<std::string>(\"\") == \"HIGH\")\n                        portduino_config.rfswitch_table[1].values[i] = HIGH;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"MODE_TX\"][i].as<std::string>(\"\") == \"HIGH\")\n                        portduino_config.rfswitch_table[2].values[i] = HIGH;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"MODE_TX_HP\"][i].as<std::string>(\"\") == \"HIGH\")\n                        portduino_config.rfswitch_table[3].values[i] = HIGH;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"MODE_TX_HF\"][i].as<std::string>(\"\") == \"HIGH\")\n                        portduino_config.rfswitch_table[4].values[i] = HIGH;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"MODE_GNSS\"][i].as<std::string>(\"\") == \"HIGH\")\n                        portduino_config.rfswitch_table[5].values[i] = HIGH;\n                    if (yamlConfig[\"Lora\"][\"rfswitch_table\"][\"MODE_WIFI\"][i].as<std::string>(\"\") == \"HIGH\")\n                        portduino_config.rfswitch_table[6].values[i] = HIGH;\n                }\n            }\n        }\n        readGPIOFromYaml(yamlConfig[\"GPIO\"][\"User\"], portduino_config.userButtonPin);\n        if (yamlConfig[\"GPS\"]) {\n            std::string serialPath = yamlConfig[\"GPS\"][\"SerialPath\"].as<std::string>(\"\");\n            if (serialPath != \"\") {\n                Serial1.setPath(serialPath);\n                portduino_config.has_gps = 1;\n            }\n        }\n        if (yamlConfig[\"GPIO\"][\"ExtraPins\"]) {\n            for (auto extra_pin : yamlConfig[\"GPIO\"][\"ExtraPins\"]) {\n                portduino_config.extra_pins.push_back(pinMapping());\n                portduino_config.extra_pins.back().config_section = \"GPIO\";\n                portduino_config.extra_pins.back().config_name = \"ExtraPins\";\n                portduino_config.extra_pins.back().enabled = true;\n                readGPIOFromYaml(extra_pin, portduino_config.extra_pins.back());\n            }\n        }\n\n        if (yamlConfig[\"I2C\"]) {\n            portduino_config.i2cdev = yamlConfig[\"I2C\"][\"I2CDevice\"].as<std::string>(\"\");\n        }\n        if (yamlConfig[\"Display\"]) {\n\n            for (const auto &screen_name : portduino_config.screen_names) {\n                if (yamlConfig[\"Display\"][\"Panel\"].as<std::string>(\"\") == screen_name.second)\n                    portduino_config.displayPanel = screen_name.first;\n            }\n            portduino_config.displayHeight = yamlConfig[\"Display\"][\"Height\"].as<int>(0);\n            portduino_config.displayWidth = yamlConfig[\"Display\"][\"Width\"].as<int>(0);\n\n            readGPIOFromYaml(yamlConfig[\"Display\"][\"DC\"], portduino_config.displayDC, -1);\n            readGPIOFromYaml(yamlConfig[\"Display\"][\"CS\"], portduino_config.displayCS, -1);\n            readGPIOFromYaml(yamlConfig[\"Display\"][\"Backlight\"], portduino_config.displayBacklight, -1);\n            readGPIOFromYaml(yamlConfig[\"Display\"][\"BacklightPWMChannel\"], portduino_config.displayBacklightPWMChannel, -1);\n            readGPIOFromYaml(yamlConfig[\"Display\"][\"Reset\"], portduino_config.displayReset, -1);\n\n            portduino_config.displayBacklightInvert = yamlConfig[\"Display\"][\"BacklightInvert\"].as<bool>(false);\n            portduino_config.displayRGBOrder = yamlConfig[\"Display\"][\"RGBOrder\"].as<bool>(false);\n            portduino_config.displayOffsetX = yamlConfig[\"Display\"][\"OffsetX\"].as<int>(0);\n            portduino_config.displayOffsetY = yamlConfig[\"Display\"][\"OffsetY\"].as<int>(0);\n            portduino_config.displayRotate = yamlConfig[\"Display\"][\"Rotate\"].as<bool>(false);\n            portduino_config.displayOffsetRotate = yamlConfig[\"Display\"][\"OffsetRotate\"].as<int>(1);\n            portduino_config.displayInvert = yamlConfig[\"Display\"][\"Invert\"].as<bool>(false);\n            portduino_config.displayBusFrequency = yamlConfig[\"Display\"][\"BusFrequency\"].as<int>(40000000);\n            if (yamlConfig[\"Display\"][\"spidev\"]) {\n                portduino_config.display_spi_dev = \"/dev/\" + yamlConfig[\"Display\"][\"spidev\"].as<std::string>(\"spidev0.1\");\n                if (portduino_config.display_spi_dev.length() == 14) {\n                    int x = portduino_config.display_spi_dev.at(11) - '0';\n                    int y = portduino_config.display_spi_dev.at(13) - '0';\n                    if (x >= 0 && x < 10 && y >= 0 && y < 10) {\n                        portduino_config.display_spi_dev_int = x + y << 4;\n                        portduino_config.touchscreen_spi_dev_int = portduino_config.display_spi_dev_int;\n                    }\n                }\n            }\n        }\n        if (yamlConfig[\"Touchscreen\"]) {\n            if (yamlConfig[\"Touchscreen\"][\"Module\"].as<std::string>(\"\") == \"XPT2046\")\n                portduino_config.touchscreenModule = xpt2046;\n            else if (yamlConfig[\"Touchscreen\"][\"Module\"].as<std::string>(\"\") == \"STMPE610\")\n                portduino_config.touchscreenModule = stmpe610;\n            else if (yamlConfig[\"Touchscreen\"][\"Module\"].as<std::string>(\"\") == \"GT911\")\n                portduino_config.touchscreenModule = gt911;\n            else if (yamlConfig[\"Touchscreen\"][\"Module\"].as<std::string>(\"\") == \"FT5x06\")\n                portduino_config.touchscreenModule = ft5x06;\n\n            readGPIOFromYaml(yamlConfig[\"Touchscreen\"][\"CS\"], portduino_config.touchscreenCS, -1);\n            readGPIOFromYaml(yamlConfig[\"Touchscreen\"][\"IRQ\"], portduino_config.touchscreenIRQ, -1);\n\n            portduino_config.touchscreenBusFrequency = yamlConfig[\"Touchscreen\"][\"BusFrequency\"].as<int>(1000000);\n            portduino_config.touchscreenRotate = yamlConfig[\"Touchscreen\"][\"Rotate\"].as<int>(-1);\n            portduino_config.touchscreenI2CAddr = yamlConfig[\"Touchscreen\"][\"I2CAddr\"].as<int>(-1);\n            if (yamlConfig[\"Touchscreen\"][\"spidev\"]) {\n                portduino_config.touchscreen_spi_dev = \"/dev/\" + yamlConfig[\"Touchscreen\"][\"spidev\"].as<std::string>(\"\");\n                if (portduino_config.touchscreen_spi_dev.length() == 14) {\n                    int x = portduino_config.touchscreen_spi_dev.at(11) - '0';\n                    int y = portduino_config.touchscreen_spi_dev.at(13) - '0';\n                    if (x >= 0 && x < 10 && y >= 0 && y < 10) {\n                        portduino_config.touchscreen_spi_dev_int = x + y << 4;\n                    }\n                }\n            }\n        }\n        if (yamlConfig[\"Input\"]) {\n            portduino_config.keyboardDevice = (yamlConfig[\"Input\"][\"KeyboardDevice\"]).as<std::string>(\"\");\n            portduino_config.pointerDevice = (yamlConfig[\"Input\"][\"PointerDevice\"]).as<std::string>(\"\");\n\n            readGPIOFromYaml(yamlConfig[\"Input\"][\"User\"], portduino_config.userButtonPin);\n            readGPIOFromYaml(yamlConfig[\"Input\"][\"TrackballUp\"], portduino_config.tbUpPin);\n            readGPIOFromYaml(yamlConfig[\"Input\"][\"TrackballDown\"], portduino_config.tbDownPin);\n            readGPIOFromYaml(yamlConfig[\"Input\"][\"TrackballLeft\"], portduino_config.tbLeftPin);\n            readGPIOFromYaml(yamlConfig[\"Input\"][\"TrackballRight\"], portduino_config.tbRightPin);\n            readGPIOFromYaml(yamlConfig[\"Input\"][\"TrackballPress\"], portduino_config.tbPressPin);\n\n            if (yamlConfig[\"Input\"][\"TrackballDirection\"].as<std::string>(\"RISING\") == \"RISING\") {\n                portduino_config.tbDirection = 4;\n            } else if (yamlConfig[\"Input\"][\"TrackballDirection\"].as<std::string>(\"RISING\") == \"FALLING\") {\n                portduino_config.tbDirection = 3;\n            }\n        }\n\n        if (yamlConfig[\"Webserver\"]) {\n            portduino_config.webserverport = (yamlConfig[\"Webserver\"][\"Port\"]).as<int>(-1);\n            portduino_config.webserver_root_path =\n                (yamlConfig[\"Webserver\"][\"RootPath\"]).as<std::string>(\"/usr/share/meshtasticd/web\");\n            portduino_config.webserver_ssl_key_path =\n                (yamlConfig[\"Webserver\"][\"SSLKey\"]).as<std::string>(\"/etc/meshtasticd/ssl/private_key.pem\");\n            portduino_config.webserver_ssl_cert_path =\n                (yamlConfig[\"Webserver\"][\"SSLCert\"]).as<std::string>(\"/etc/meshtasticd/ssl/certificate.pem\");\n        }\n\n        if (yamlConfig[\"HostMetrics\"]) {\n            portduino_config.hostMetrics_channel = (yamlConfig[\"HostMetrics\"][\"Channel\"]).as<int>(0);\n            portduino_config.hostMetrics_interval = (yamlConfig[\"HostMetrics\"][\"ReportInterval\"]).as<int>(0);\n            portduino_config.hostMetrics_user_command = (yamlConfig[\"HostMetrics\"][\"UserStringCommand\"]).as<std::string>(\"\");\n        }\n\n        if (yamlConfig[\"Config\"]) {\n            portduino_config.has_config_overrides = true;\n            if (yamlConfig[\"Config\"][\"DisplayMode\"]) {\n                portduino_config.has_configDisplayMode = true;\n                if ((yamlConfig[\"Config\"][\"DisplayMode\"]).as<std::string>(\"\") == \"TWOCOLOR\") {\n                    portduino_config.configDisplayMode = meshtastic_Config_DisplayConfig_DisplayMode_TWOCOLOR;\n                } else if ((yamlConfig[\"Config\"][\"DisplayMode\"]).as<std::string>(\"\") == \"INVERTED\") {\n                    portduino_config.configDisplayMode = meshtastic_Config_DisplayConfig_DisplayMode_INVERTED;\n                } else if ((yamlConfig[\"Config\"][\"DisplayMode\"]).as<std::string>(\"\") == \"COLOR\") {\n                    portduino_config.configDisplayMode = meshtastic_Config_DisplayConfig_DisplayMode_COLOR;\n                } else {\n                    portduino_config.configDisplayMode = meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT;\n                }\n            }\n            if (yamlConfig[\"Config\"][\"StatusMessage\"]) {\n                portduino_config.has_statusMessage = true;\n                portduino_config.statusMessage = (yamlConfig[\"Config\"][\"StatusMessage\"]).as<std::string>(\"\");\n            }\n            if ((yamlConfig[\"Config\"][\"EnableUDP\"]).as<bool>(false)) {\n                portduino_config.enable_UDP = true;\n            }\n        }\n\n        if (yamlConfig[\"General\"]) {\n            portduino_config.MaxNodes = (yamlConfig[\"General\"][\"MaxNodes\"]).as<int>(200);\n            portduino_config.maxtophone = (yamlConfig[\"General\"][\"MaxMessageQueue\"]).as<int>(100);\n            portduino_config.config_directory = (yamlConfig[\"General\"][\"ConfigDirectory\"]).as<std::string>(\"\");\n            portduino_config.available_directory =\n                (yamlConfig[\"General\"][\"AvailableDirectory\"]).as<std::string>(\"/etc/meshtasticd/available.d/\");\n            if ((yamlConfig[\"General\"][\"MACAddress\"]).as<std::string>(\"\") != \"\" &&\n                (yamlConfig[\"General\"][\"MACAddressSource\"]).as<std::string>(\"\") != \"\") {\n                std::cout << \"Cannot set both MACAddress and MACAddressSource!\" << std::endl;\n                exit(EXIT_FAILURE);\n            }\n            if (checkConfigPort) {\n                portduino_config.api_port = (yamlConfig[\"General\"][\"APIPort\"]).as<int>(-1);\n                if (portduino_config.api_port > 1023 && portduino_config.api_port < 65536) {\n                    TCPPort = (portduino_config.api_port);\n                }\n            }\n            portduino_config.mac_address = (yamlConfig[\"General\"][\"MACAddress\"]).as<std::string>(\"\");\n            if (portduino_config.mac_address != \"\") {\n                portduino_config.mac_address_explicit = true;\n            } else if ((yamlConfig[\"General\"][\"MACAddressSource\"]).as<std::string>(\"\") != \"\") {\n                portduino_config.mac_address_source = (yamlConfig[\"General\"][\"MACAddressSource\"]).as<std::string>(\"\");\n                std::ifstream infile(\"/sys/class/net/\" + portduino_config.mac_address_source + \"/address\");\n                std::getline(infile, portduino_config.mac_address);\n            }\n\n            // https://stackoverflow.com/a/20326454\n            portduino_config.mac_address.erase(\n                std::remove(portduino_config.mac_address.begin(), portduino_config.mac_address.end(), ':'),\n                portduino_config.mac_address.end());\n        }\n    } catch (YAML::Exception &e) {\n        std::cout << \"*** Exception \" << e.what() << std::endl;\n        return false;\n    }\n    return true;\n}\n\n// https://stackoverflow.com/questions/874134/find-out-if-string-ends-with-another-string-in-c\nstatic bool ends_with(std::string_view str, std::string_view suffix)\n{\n    return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;\n}\n\nbool MAC_from_string(std::string mac_str, uint8_t *dmac)\n{\n    mac_str.erase(std::remove(mac_str.begin(), mac_str.end(), ':'), mac_str.end());\n    if (mac_str.length() == 12) {\n        dmac[0] = std::stoi(portduino_config.mac_address.substr(0, 2), nullptr, 16);\n        dmac[1] = std::stoi(portduino_config.mac_address.substr(2, 2), nullptr, 16);\n        dmac[2] = std::stoi(portduino_config.mac_address.substr(4, 2), nullptr, 16);\n        dmac[3] = std::stoi(portduino_config.mac_address.substr(6, 2), nullptr, 16);\n        dmac[4] = std::stoi(portduino_config.mac_address.substr(8, 2), nullptr, 16);\n        dmac[5] = std::stoi(portduino_config.mac_address.substr(10, 2), nullptr, 16);\n        return true;\n    } else {\n        return false;\n    }\n}\n\nstd::string exec(const char *cmd)\n{ // https://stackoverflow.com/a/478960\n    std::array<char, 128> buffer;\n    std::string result;\n    std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, \"r\"), pclose);\n    if (!pipe) {\n        throw std::runtime_error(\"popen() failed!\");\n    }\n    while (fgets(buffer.data(), static_cast<int>(buffer.size()), pipe.get()) != nullptr) {\n        result += buffer.data();\n    }\n    return result;\n}\n\nvoid readGPIOFromYaml(YAML::Node sourceNode, pinMapping &destPin, int pinDefault)\n{\n    if (sourceNode.IsMap()) {\n        destPin.enabled = true;\n        destPin.pin = sourceNode[\"pin\"].as<int>(pinDefault);\n        destPin.line = sourceNode[\"line\"].as<int>(destPin.pin);\n        destPin.gpiochip = sourceNode[\"gpiochip\"].as<int>(portduino_config.lora_default_gpiochip);\n    } else if (sourceNode) { // backwards API compatibility\n        destPin.enabled = true;\n        destPin.pin = sourceNode.as<int>(pinDefault);\n        destPin.line = destPin.pin;\n        destPin.gpiochip = portduino_config.lora_default_gpiochip;\n    }\n}\n"
  },
  {
    "path": "src/platform/portduino/PortduinoGlue.h",
    "content": "#pragma once\n#include <fstream>\n#include <map>\n#include <unistd.h>\n#include <unordered_map>\n#include <vector>\n\n#include \"LR11x0Interface.h\"\n#include \"Module.h\"\n#include \"mesh/generated/meshtastic/mesh.pb.h\"\n#include \"yaml-cpp/yaml.h\"\n\nextern struct portduino_status_struct {\n    bool LoRa_in_error = false;\n    _meshtastic_HardwareModel hardwareModel = meshtastic_HardwareModel_PORTDUINO;\n} portduino_status;\n\n#include \"platform/portduino/USBHal.h\"\n\n// Product strings for auto-configuration\n// {\"PRODUCT_STRING\", \"CONFIG.YAML\"}\n// YAML paths are relative to `meshtastic/available.d`\ninline const std::unordered_map<std::string, std::string> configProducts = {\n    {\"MESHTOAD\", \"lora-usb-meshtoad-e22.yaml\"},\n    {\"MESHSTICK\", \"lora-meshstick-1262.yaml\"},\n    {\"MESHADV-PI\", \"lora-MeshAdv-900M30S.yaml\"},\n    {\"MeshAdv Mini\", \"lora-MeshAdv-Mini-900M22S.yaml\"},\n    {\"POWERPI\", \"lora-MeshAdv-900M30S.yaml\"},\n    {\"RAK6421-13300-S1\", \"lora-RAK6421-13300-slot1.yaml\"},\n    {\"RAK6421-13300-S2\", \"lora-RAK6421-13300-slot2.yaml\"}};\n\nenum screen_modules { no_screen, x11, fb, st7789, st7735, st7735s, st7796, ili9341, ili9342, ili9486, ili9488, hx8357d };\nenum touchscreen_modules { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 };\nenum portduino_log_level { level_error, level_warn, level_info, level_debug, level_trace };\nenum lora_module_enum {\n    use_simradio,\n    use_autoconf,\n    use_rf95,\n    use_sx1262,\n    use_sx1268,\n    use_sx1280,\n    use_lr1110,\n    use_lr1120,\n    use_lr1121,\n    use_llcc68\n};\n\nstruct pinMapping {\n    std::string config_section;\n    std::string config_name;\n    int pin = RADIOLIB_NC;\n    int gpiochip;\n    int line;\n    bool enabled = false;\n    bool default_high = false;\n};\n\nextern std::ofstream traceFile;\nextern std::ofstream JSONFile;\n\nextern Ch341Hal *ch341Hal;\nint initGPIOPin(int pinNum, const std::string &gpioChipname, int line);\nbool loadConfig(const char *configPath);\nstatic bool ends_with(std::string_view str, std::string_view suffix);\nvoid getMacAddr(uint8_t *dmac);\nbool MAC_from_string(std::string mac_str, uint8_t *dmac);\nvoid readGPIOFromYaml(YAML::Node sourceNode, pinMapping &destPin, int pinDefault = RADIOLIB_NC);\nstd::string exec(const char *cmd);\n\nextern struct portduino_config_struct {\n    // Lora\n    std::map<lora_module_enum, std::string> loraModules = {\n        {use_simradio, \"sim\"},  {use_autoconf, \"auto\"}, {use_rf95, \"RF95\"},     {use_sx1262, \"sx1262\"}, {use_sx1268, \"sx1268\"},\n        {use_sx1280, \"sx1280\"}, {use_lr1110, \"lr1110\"}, {use_lr1120, \"lr1120\"}, {use_lr1121, \"lr1121\"}, {use_llcc68, \"LLCC68\"}};\n\n    std::map<screen_modules, std::string> screen_names = {{x11, \"X11\"},         {fb, \"FB\"},           {st7789, \"ST7789\"},\n                                                          {st7735, \"ST7735\"},   {st7735s, \"ST7735S\"}, {st7796, \"ST7796\"},\n                                                          {ili9341, \"ILI9341\"}, {ili9342, \"ILI9342\"}, {ili9486, \"ILI9486\"},\n                                                          {ili9488, \"ILI9488\"}, {hx8357d, \"HX8357D\"}};\n\n    lora_module_enum lora_module;\n    bool has_rfswitch_table = false;\n    uint32_t rfswitch_dio_pins[5] = {RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n    Module::RfSwitchMode_t rfswitch_table[8];\n    bool force_simradio = false;\n    bool has_device_id = false;\n    uint8_t device_id[16] = {0};\n    std::string lora_spi_dev = \"\";\n    std::string lora_usb_serial_num = \"\";\n    int lora_spi_dev_int = 0;\n    int lora_default_gpiochip = 0;\n    int sx126x_max_power = 22;\n    int sx128x_max_power = 13;\n    int lr1110_max_power = 22;\n    int lr1120_max_power = 13;\n    int rf95_max_power = 20;\n    bool dio2_as_rf_switch = false;\n    int dio3_tcxo_voltage = 0;\n    int lora_usb_pid = 0x5512;\n    int lora_usb_vid = 0x1A86;\n    int spiSpeed = 2000000;\n    int num_pa_points = 1; // default to 1 point, with 0 gain\n    uint16_t tx_gain_lora[22] = {0};\n    pinMapping lora_cs_pin = {\"Lora\", \"CS\"};\n    pinMapping lora_irq_pin = {\"Lora\", \"IRQ\"};\n    pinMapping lora_busy_pin = {\"Lora\", \"Busy\"};\n    pinMapping lora_reset_pin = {\"Lora\", \"Reset\"};\n    pinMapping lora_txen_pin = {\"Lora\", \"TXen\"};\n    pinMapping lora_rxen_pin = {\"Lora\", \"RXen\"};\n    pinMapping lora_sx126x_ant_sw_pin = {\"Lora\", \"SX126X_ANT_SW\"};\n    pinMapping lora_pa_detect_pin = {\"Lora\", \"GPIO_DETECT_PA\"};\n    std::vector<pinMapping> extra_pins = {};\n\n    // GPS\n    bool has_gps = false;\n\n    // I2C\n    std::string i2cdev = \"\";\n\n    // Display\n    std::string display_spi_dev = \"\";\n    int display_spi_dev_int = 0;\n    int displayBusFrequency = 40000000;\n    screen_modules displayPanel = no_screen;\n    int displayWidth = 0;\n    int displayHeight = 0;\n    bool displayRGBOrder = false;\n    bool displayBacklightInvert = false;\n    bool displayRotate = false;\n    int displayOffsetRotate = 1;\n    bool displayInvert = false;\n    int displayOffsetX = 0;\n    int displayOffsetY = 0;\n    pinMapping displayDC = {\"Display\", \"DC\"};\n    pinMapping displayCS = {\"Display\", \"CS\"};\n    pinMapping displayBacklight = {\"Display\", \"Backlight\"};\n    pinMapping displayBacklightPWMChannel = {\"Display\", \"BacklightPWMChannel\"};\n    pinMapping displayReset = {\"Display\", \"Reset\"};\n\n    // Touchscreen\n    std::string touchscreen_spi_dev = \"\";\n    int touchscreen_spi_dev_int = 0;\n    touchscreen_modules touchscreenModule = no_touchscreen;\n    int touchscreenI2CAddr = -1;\n    int touchscreenBusFrequency = 1000000;\n    int touchscreenRotate = -1;\n    pinMapping touchscreenCS = {\"Touchscreen\", \"CS\"};\n    pinMapping touchscreenIRQ = {\"Touchscreen\", \"IRQ\"};\n\n    // Input\n    std::string keyboardDevice = \"\";\n    std::string pointerDevice = \"\";\n    int tbDirection;\n    pinMapping userButtonPin = {\"Input\", \"User\"};\n    pinMapping tbUpPin = {\"Input\", \"TrackballUp\"};\n    pinMapping tbDownPin = {\"Input\", \"TrackballDown\"};\n    pinMapping tbLeftPin = {\"Input\", \"TrackballLwft\"};\n    pinMapping tbRightPin = {\"Input\", \"TrackballRight\"};\n    pinMapping tbPressPin = {\"Input\", \"TrackballPress\"};\n\n    // Logging\n    portduino_log_level logoutputlevel = level_debug;\n    std::string traceFilename;\n    bool ascii_logs = !isatty(1);\n    bool ascii_logs_explicit = false;\n\n    std::string JSONFilename;\n    int JSONFileRotate = 0;\n    meshtastic_PortNum JSONFilter = (_meshtastic_PortNum)0;\n\n    // Webserver\n    std::string webserver_root_path = \"\";\n    std::string webserver_ssl_key_path = \"/etc/meshtasticd/ssl/private_key.pem\";\n    std::string webserver_ssl_cert_path = \"/etc/meshtasticd/ssl/certificate.pem\";\n    int webserverport = -1;\n\n    // HostMetrics\n    std::string hostMetrics_user_command = \"\";\n    int hostMetrics_interval = 0;\n    int hostMetrics_channel = 0;\n\n    // config\n    bool has_config_overrides = false;\n    int configDisplayMode = 0;\n    bool has_configDisplayMode = false;\n    std::string statusMessage = \"\";\n    bool has_statusMessage = false;\n    bool enable_UDP = false;\n\n    // General\n    std::string mac_address = \"\";\n    bool mac_address_explicit = false;\n    std::string mac_address_source = \"\";\n    int api_port = -1;\n    std::string config_directory = \"\";\n    std::string available_directory = \"/etc/meshtasticd/available.d/\";\n    int maxtophone = 100;\n    int MaxNodes = 200;\n\n    std::unordered_map<std::string, std::string> hat_plus_custom_fields;\n\n    pinMapping *all_pins[21] = {&lora_cs_pin,\n                                &lora_irq_pin,\n                                &lora_busy_pin,\n                                &lora_reset_pin,\n                                &lora_txen_pin,\n                                &lora_rxen_pin,\n                                &lora_sx126x_ant_sw_pin,\n                                &lora_pa_detect_pin,\n                                &displayDC,\n                                &displayCS,\n                                &displayBacklight,\n                                &displayBacklightPWMChannel,\n                                &displayReset,\n                                &touchscreenCS,\n                                &touchscreenIRQ,\n                                &userButtonPin,\n                                &tbUpPin,\n                                &tbDownPin,\n                                &tbLeftPin,\n                                &tbRightPin,\n                                &tbPressPin};\n\n    std::string emit_yaml()\n    {\n        YAML::Emitter out;\n        out << YAML::BeginMap;\n\n        // Lora\n        out << YAML::Key << \"Lora\" << YAML::Value << YAML::BeginMap;\n        out << YAML::Key << \"Module\" << YAML::Value << loraModules[lora_module];\n\n        for (const auto *lora_pin : all_pins) {\n            if (lora_pin->config_section == \"Lora\" && lora_pin->enabled) {\n                out << YAML::Key << lora_pin->config_name << YAML::Value << YAML::BeginMap;\n                out << YAML::Key << \"pin\" << YAML::Value << lora_pin->pin;\n                out << YAML::Key << \"line\" << YAML::Value << lora_pin->line;\n                out << YAML::Key << \"gpiochip\" << YAML::Value << lora_pin->gpiochip;\n                out << YAML::EndMap; // User\n            }\n        }\n\n        if (sx126x_max_power != 22)\n            out << YAML::Key << \"SX126X_MAX_POWER\" << YAML::Value << sx126x_max_power;\n        if (sx128x_max_power != 13)\n            out << YAML::Key << \"SX128X_MAX_POWER\" << YAML::Value << sx128x_max_power;\n        if (lr1110_max_power != 22)\n            out << YAML::Key << \"LR1110_MAX_POWER\" << YAML::Value << lr1110_max_power;\n        if (lr1120_max_power != 13)\n            out << YAML::Key << \"LR1120_MAX_POWER\" << YAML::Value << lr1120_max_power;\n        if (rf95_max_power != 20)\n            out << YAML::Key << \"RF95_MAX_POWER\" << YAML::Value << rf95_max_power;\n\n        if (num_pa_points > 1) {\n            out << YAML::Key << \"TX_GAIN_LORA\" << YAML::Value << YAML::Flow << YAML::BeginSeq;\n            for (int i = 0; i < num_pa_points; i++) {\n                out << YAML::Value << tx_gain_lora[i];\n            }\n            out << YAML::EndSeq;\n        } else if (tx_gain_lora[0] != 0) {\n            out << YAML::Key << \"TX_GAIN_LORA\" << YAML::Value << tx_gain_lora[0];\n        }\n\n        if (dio2_as_rf_switch)\n            out << YAML::Key << \"DIO2_AS_RF_SWITCH\" << YAML::Value << dio2_as_rf_switch;\n        if (dio3_tcxo_voltage != 0)\n            out << YAML::Key << \"DIO3_TCXO_VOLTAGE\" << YAML::Value << YAML::Precision(3) << (float)dio3_tcxo_voltage / 1000;\n        if (lora_usb_pid != 0x5512)\n            out << YAML::Key << \"USB_PID\" << YAML::Value << YAML::Hex << lora_usb_pid;\n        if (lora_usb_vid != 0x1A86)\n            out << YAML::Key << \"USB_VID\" << YAML::Value << YAML::Hex << lora_usb_vid;\n        if (lora_spi_dev != \"\" && !(lora_spi_dev == \"/dev/spidev0.0\" && lora_module == use_autoconf)) {\n            if (lora_spi_dev.find(\"/dev/\") != std::string::npos)\n                lora_spi_dev = lora_spi_dev.substr(5);\n            out << YAML::Key << \"spidev\" << YAML::Value << lora_spi_dev;\n        }\n        if (lora_usb_serial_num != \"\")\n            out << YAML::Key << \"USB_Serialnum\" << YAML::Value << lora_usb_serial_num;\n        if (spiSpeed != 2000000)\n            out << YAML::Key << \"spiSpeed\" << YAML::Value << spiSpeed;\n        if (rfswitch_dio_pins[0] != RADIOLIB_NC) {\n            out << YAML::Key << \"rfswitch_table\" << YAML::Value << YAML::BeginMap;\n\n            out << YAML::Key << \"pins\";\n            out << YAML::Value << YAML::Flow << YAML::BeginSeq;\n\n            for (int i = 0; i < 5; i++) {\n                // set up the pin array first\n                if (rfswitch_dio_pins[i] == RADIOLIB_LR11X0_DIO5)\n                    out << \"DIO5\";\n                if (rfswitch_dio_pins[i] == RADIOLIB_LR11X0_DIO6)\n                    out << \"DIO6\";\n                if (rfswitch_dio_pins[i] == RADIOLIB_LR11X0_DIO7)\n                    out << \"DIO7\";\n                if (rfswitch_dio_pins[i] == RADIOLIB_LR11X0_DIO8)\n                    out << \"DIO8\";\n                if (rfswitch_dio_pins[i] == RADIOLIB_LR11X0_DIO10)\n                    out << \"DIO10\";\n            }\n            out << YAML::EndSeq;\n\n            for (int i = 0; i < 7; i++) {\n                switch (i) {\n                case 0:\n                    out << YAML::Key << \"MODE_STBY\";\n                    break;\n                case 1:\n                    out << YAML::Key << \"MODE_RX\";\n                    break;\n                case 2:\n                    out << YAML::Key << \"MODE_TX\";\n                    break;\n                case 3:\n                    out << YAML::Key << \"MODE_TX_HP\";\n                    break;\n                case 4:\n                    out << YAML::Key << \"MODE_TX_HF\";\n                    break;\n                case 5:\n                    out << YAML::Key << \"MODE_GNSS\";\n                    break;\n                case 6:\n                    out << YAML::Key << \"MODE_WIFI\";\n                    break;\n                }\n\n                out << YAML::Value << YAML::Flow << YAML::BeginSeq;\n                for (int j = 0; j < 5; j++) {\n                    if (rfswitch_table[i].values[j] == HIGH) {\n                        out << \"HIGH\";\n                    } else {\n                        out << \"LOW\";\n                    }\n                }\n                out << YAML::EndSeq;\n            }\n            out << YAML::EndMap; // rfswitch_table\n        }\n        out << YAML::EndMap; // Lora\n\n        if (!extra_pins.empty()) {\n            out << YAML::Key << \"GPIO\" << YAML::Value << YAML::BeginMap;\n            out << YAML::Key << \"ExtraPins\" << YAML::Value << YAML::BeginSeq;\n            for (auto extra : extra_pins) {\n                out << YAML::BeginMap;\n                out << YAML::Key << \"pin\" << YAML::Value << extra.pin;\n                out << YAML::Key << \"line\" << YAML::Value << extra.line;\n                out << YAML::Key << \"gpiochip\" << YAML::Value << extra.gpiochip;\n                out << YAML::EndMap;\n            }\n            out << YAML::EndSeq;\n            out << YAML::EndMap; // GPIO\n        }\n\n        if (i2cdev != \"\") {\n            out << YAML::Key << \"I2C\" << YAML::Value << YAML::BeginMap;\n            out << YAML::Key << \"I2CDevice\" << YAML::Value << i2cdev;\n            out << YAML::EndMap; // I2C\n        }\n\n        // Display\n        if (displayPanel != no_screen) {\n            out << YAML::Key << \"Display\" << YAML::Value << YAML::BeginMap;\n            for (const auto &screen_name : screen_names) {\n                if (displayPanel == screen_name.first)\n                    out << YAML::Key << \"Module\" << YAML::Value << screen_name.second;\n            }\n            for (const auto *display_pin : all_pins) {\n                if (display_pin->config_section == \"Display\" && display_pin->enabled) {\n                    out << YAML::Key << display_pin->config_name << YAML::Value << YAML::BeginMap;\n                    out << YAML::Key << \"pin\" << YAML::Value << display_pin->pin;\n                    out << YAML::Key << \"line\" << YAML::Value << display_pin->line;\n                    out << YAML::Key << \"gpiochip\" << YAML::Value << display_pin->gpiochip;\n                    out << YAML::EndMap;\n                }\n            }\n            out << YAML::Key << \"spidev\" << YAML::Value << display_spi_dev;\n            out << YAML::Key << \"BusFrequency\" << YAML::Value << displayBusFrequency;\n            if (displayWidth)\n                out << YAML::Key << \"Width\" << YAML::Value << displayWidth;\n            if (displayHeight)\n                out << YAML::Key << \"Height\" << YAML::Value << displayHeight;\n            if (displayRGBOrder)\n                out << YAML::Key << \"RGBOrder\" << YAML::Value << true;\n            if (displayBacklightInvert)\n                out << YAML::Key << \"BacklightInvert\" << YAML::Value << true;\n            if (displayRotate)\n                out << YAML::Key << \"Rotate\" << YAML::Value << true;\n            if (displayInvert)\n                out << YAML::Key << \"Invert\" << YAML::Value << true;\n            if (displayOffsetX)\n                out << YAML::Key << \"OffsetX\" << YAML::Value << displayOffsetX;\n            if (displayOffsetY)\n                out << YAML::Key << \"OffsetY\" << YAML::Value << displayOffsetY;\n\n            out << YAML::Key << \"OffsetRotate\" << YAML::Value << displayOffsetRotate;\n\n            out << YAML::EndMap; // Display\n        }\n\n        // Touchscreen\n        if (touchscreen_spi_dev != \"\") {\n            out << YAML::Key << \"Touchscreen\" << YAML::Value << YAML::BeginMap;\n            out << YAML::Key << \"spidev\" << YAML::Value << touchscreen_spi_dev;\n            out << YAML::Key << \"BusFrequency\" << YAML::Value << touchscreenBusFrequency;\n            switch (touchscreenModule) {\n            case xpt2046:\n                out << YAML::Key << \"Module\" << YAML::Value << \"XPT2046\";\n            case stmpe610:\n                out << YAML::Key << \"Module\" << YAML::Value << \"STMPE610\";\n            case gt911:\n                out << YAML::Key << \"Module\" << YAML::Value << \"GT911\";\n            case ft5x06:\n                out << YAML::Key << \"Module\" << YAML::Value << \"FT5x06\";\n            }\n            for (const auto *touchscreen_pin : all_pins) {\n                if (touchscreen_pin->config_section == \"Touchscreen\" && touchscreen_pin->enabled) {\n                    out << YAML::Key << touchscreen_pin->config_name << YAML::Value << YAML::BeginMap;\n                    out << YAML::Key << \"pin\" << YAML::Value << touchscreen_pin->pin;\n                    out << YAML::Key << \"line\" << YAML::Value << touchscreen_pin->line;\n                    out << YAML::Key << \"gpiochip\" << YAML::Value << touchscreen_pin->gpiochip;\n                    out << YAML::EndMap;\n                }\n            }\n            if (touchscreenRotate != -1)\n                out << YAML::Key << \"Rotate\" << YAML::Value << touchscreenRotate;\n            if (touchscreenI2CAddr != -1)\n                out << YAML::Key << \"I2CAddr\" << YAML::Value << touchscreenI2CAddr;\n            out << YAML::EndMap; // Touchscreen\n        }\n\n        // Input\n        out << YAML::Key << \"Input\" << YAML::Value << YAML::BeginMap;\n        if (keyboardDevice != \"\")\n            out << YAML::Key << \"KeyboardDevice\" << YAML::Value << keyboardDevice;\n        if (pointerDevice != \"\")\n            out << YAML::Key << \"PointerDevice\" << YAML::Value << pointerDevice;\n\n        for (const auto *input_pin : all_pins) {\n            if (input_pin->config_section == \"Input\" && input_pin->enabled) {\n                out << YAML::Key << input_pin->config_name << YAML::Value << YAML::BeginMap;\n                out << YAML::Key << \"pin\" << YAML::Value << input_pin->pin;\n                out << YAML::Key << \"line\" << YAML::Value << input_pin->line;\n                out << YAML::Key << \"gpiochip\" << YAML::Value << input_pin->gpiochip;\n                out << YAML::EndMap;\n            }\n        }\n        if (tbDirection == 3)\n            out << YAML::Key << \"TrackballDirection\" << YAML::Value << \"FALLING\";\n\n        out << YAML::EndMap; // Input\n\n        out << YAML::Key << \"Logging\" << YAML::Value << YAML::BeginMap;\n        out << YAML::Key << \"LogLevel\" << YAML::Value;\n        switch (logoutputlevel) {\n        case level_error:\n            out << \"error\";\n            break;\n        case level_warn:\n            out << \"warn\";\n            break;\n        case level_info:\n            out << \"info\";\n            break;\n        case level_debug:\n            out << \"debug\";\n            break;\n        case level_trace:\n            out << \"trace\";\n            break;\n        }\n        if (traceFilename != \"\")\n            out << YAML::Key << \"TraceFile\" << YAML::Value << traceFilename;\n        if (JSONFilename != \"\") {\n            out << YAML::Key << \"JSONFile\" << YAML::Value << JSONFilename;\n            if (JSONFileRotate != 0)\n                out << YAML::Key << \"JSONFileRotate\" << YAML::Value << JSONFileRotate;\n\n            if (JSONFilter == meshtastic_PortNum_TEXT_MESSAGE_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"textmessage\";\n            else if (JSONFilter == meshtastic_PortNum_TELEMETRY_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"telemetry\";\n            else if (JSONFilter == meshtastic_PortNum_NODEINFO_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"nodeinfo\";\n            else if (JSONFilter == meshtastic_PortNum_POSITION_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"position\";\n            else if (JSONFilter == meshtastic_PortNum_WAYPOINT_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"waypoint\";\n            else if (JSONFilter == meshtastic_PortNum_NEIGHBORINFO_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"neighborinfo\";\n            else if (JSONFilter == meshtastic_PortNum_TRACEROUTE_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"traceroute\";\n            else if (JSONFilter == meshtastic_PortNum_DETECTION_SENSOR_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"detection\";\n            else if (JSONFilter == meshtastic_PortNum_PAXCOUNTER_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"paxcounter\";\n            else if (JSONFilter == meshtastic_PortNum_REMOTE_HARDWARE_APP)\n                out << YAML::Key << \"JSONFilter\" << YAML::Value << \"remotehardware\";\n        }\n        if (ascii_logs_explicit) {\n            out << YAML::Key << \"AsciiLogs\" << YAML::Value << ascii_logs;\n        }\n        out << YAML::EndMap; // Logging\n\n        // Webserver\n        if (webserver_root_path != \"\") {\n            out << YAML::Key << \"Webserver\" << YAML::Value << YAML::BeginMap;\n            out << YAML::Key << \"RootPath\" << YAML::Value << webserver_root_path;\n            out << YAML::Key << \"SSLKey\" << YAML::Value << webserver_ssl_key_path;\n            out << YAML::Key << \"SSLCert\" << YAML::Value << webserver_ssl_cert_path;\n            out << YAML::Key << \"Port\" << YAML::Value << webserverport;\n            out << YAML::EndMap; // Webserver\n        }\n\n        // HostMetrics\n        if (hostMetrics_user_command != \"\") {\n            out << YAML::Key << \"HostMetrics\" << YAML::Value << YAML::BeginMap;\n            out << YAML::Key << \"UserStringCommand\" << YAML::Value << hostMetrics_user_command;\n            out << YAML::Key << \"ReportInterval\" << YAML::Value << hostMetrics_interval;\n            out << YAML::Key << \"Channel\" << YAML::Value << hostMetrics_channel;\n\n            out << YAML::EndMap; // HostMetrics\n        }\n\n        // config\n        if (has_config_overrides) {\n            out << YAML::Key << \"Config\" << YAML::Value << YAML::BeginMap;\n            if (has_configDisplayMode) {\n\n                switch (configDisplayMode) {\n                case meshtastic_Config_DisplayConfig_DisplayMode_TWOCOLOR:\n                    out << YAML::Key << \"DisplayMode\" << YAML::Value << \"TWOCOLOR\";\n                    break;\n                case meshtastic_Config_DisplayConfig_DisplayMode_INVERTED:\n                    out << YAML::Key << \"DisplayMode\" << YAML::Value << \"INVERTED\";\n                    break;\n                case meshtastic_Config_DisplayConfig_DisplayMode_COLOR:\n                    out << YAML::Key << \"DisplayMode\" << YAML::Value << \"COLOR\";\n                    break;\n                case meshtastic_Config_DisplayConfig_DisplayMode_DEFAULT:\n                    out << YAML::Key << \"DisplayMode\" << YAML::Value << \"DEFAULT\";\n                    break;\n                }\n            }\n            if (has_statusMessage) {\n                out << YAML::Key << \"StatusMessage\" << YAML::Value << statusMessage;\n            }\n            if (enable_UDP) {\n                out << YAML::Key << \"EnableUDP\" << YAML::Value << true;\n            }\n\n            out << YAML::EndMap; // Config\n        }\n\n        // General\n        out << YAML::Key << \"General\" << YAML::Value << YAML::BeginMap;\n        if (config_directory != \"\")\n            out << YAML::Key << \"ConfigDirectory\" << YAML::Value << config_directory;\n        if (api_port != -1)\n            out << YAML::Key << \"TCPPort\" << YAML::Value << api_port;\n        if (mac_address_explicit)\n            out << YAML::Key << \"MACAddress\" << YAML::Value << mac_address;\n        if (mac_address_source != \"\")\n            out << YAML::Key << \"MACAddressSource\" << YAML::Value << mac_address_source;\n        if (available_directory != \"\")\n            out << YAML::Key << \"AvailableDirectory\" << YAML::Value << available_directory;\n        out << YAML::Key << \"MaxMessageQueue\" << YAML::Value << maxtophone;\n        out << YAML::Key << \"MaxNodes\" << YAML::Value << MaxNodes;\n        out << YAML::EndMap; // General\n        return out.c_str();\n    }\n} portduino_config;\n"
  },
  {
    "path": "src/platform/portduino/SimRadio.cpp",
    "content": "#include \"SimRadio.h\"\n#include \"MeshService.h\"\n#include \"Router.h\"\n\nSimRadio::SimRadio() : NotifiedWorkerThread(\"SimRadio\")\n{\n    instance = this;\n}\n\nSimRadio *SimRadio::instance;\n\nErrorCode SimRadio::send(meshtastic_MeshPacket *p)\n{\n    printPacket(\"enqueuing for send\", p);\n\n    bool dropped = false;\n    ErrorCode res = txQueue.enqueue(p, &dropped) ? ERRNO_OK : ERRNO_UNKNOWN;\n\n    if (dropped) {\n        txDrop++;\n    }\n\n    if (res != ERRNO_OK) { // we weren't able to queue it, so we must drop it to prevent leaks\n        packetPool.release(p);\n        return res;\n    }\n\n    // set (random) transmit delay to let others reconfigure their radio,\n    // to avoid collisions and implement timing-based flooding\n    LOG_DEBUG(\"Set random delay before tx\");\n    setTransmitDelay();\n    return res;\n}\n\nvoid SimRadio::setTransmitDelay()\n{\n    meshtastic_MeshPacket *p = txQueue.getFront();\n    // We want all sending/receiving to be done by our daemon thread.\n    // We use a delay here because this packet might have been sent in response to a packet we just received.\n    // So we want to make sure the other side has had a chance to reconfigure its radio.\n\n    /* We assume if rx_snr = 0 and rx_rssi = 0, the packet was generated locally.\n     *   This assumption is valid because of the offset generated by the radio to account for the noise\n     *   floor.\n     */\n    if (p->rx_snr == 0 && p->rx_rssi == 0) {\n        startTransmitTimer(true);\n    } else {\n        // If there is a SNR, start a timer scaled based on that SNR.\n        LOG_DEBUG(\"rx_snr found. hop_limit:%d rx_snr:%f\", p->hop_limit, p->rx_snr);\n        startTransmitTimerRebroadcast(p);\n    }\n}\n\nvoid SimRadio::startTransmitTimer(bool withDelay)\n{\n    // If we have work to do and the timer wasn't already scheduled, schedule it now\n    if (!txQueue.empty()) {\n        uint32_t delayMsec = !withDelay ? 1 : getTxDelayMsec();\n        // LOG_DEBUG(\"xmit timer %d\", delay);\n        notifyLater(delayMsec, TRANSMIT_DELAY_COMPLETED, false);\n    }\n}\n\nvoid SimRadio::startTransmitTimerRebroadcast(meshtastic_MeshPacket *p)\n{\n    // If we have work to do and the timer wasn't already scheduled, schedule it now\n    if (!txQueue.empty()) {\n        uint32_t delayMsec = getTxDelayMsecWeighted(p);\n        // LOG_DEBUG(\"xmit timer %d\", delay);\n        notifyLater(delayMsec, TRANSMIT_DELAY_COMPLETED, false);\n    }\n}\n\nvoid SimRadio::handleTransmitInterrupt()\n{\n    // This can be null if we forced the device to enter standby mode.  In that case\n    // ignore the transmit interrupt\n    if (sendingPacket)\n        completeSending();\n\n    isReceiving = true;\n    if (receivingPacket) // This happens when we don't consider something a collision if we weren't sending long enough\n        handleReceiveInterrupt();\n}\n\nvoid SimRadio::completeSending()\n{\n    // We are careful to clear sending packet before calling printPacket because\n    // that can take a long time\n    auto p = sendingPacket;\n    sendingPacket = NULL;\n\n    if (p) {\n        txGood++;\n        if (!isFromUs(p))\n            txRelay++;\n        printPacket(\"Completed sending\", p);\n\n        // We are done sending that packet, release it\n        packetPool.release(p);\n        // LOG_DEBUG(\"Done with send\");\n    }\n}\n\n/** Could we send right now (i.e. either not actively receiving or transmitting)? */\nbool SimRadio::canSendImmediately()\n{\n    // We wait _if_ we are partially though receiving a packet (rather than just merely waiting for one).\n    // To do otherwise would be doubly bad because not only would we drop the packet that was on the way in,\n    // we almost certainly guarantee no one outside will like the packet we are sending.\n    bool busyTx = sendingPacket != NULL;\n    bool busyRx = isReceiving && isActivelyReceiving();\n\n    if (busyTx || busyRx) {\n        if (busyTx)\n            LOG_WARN(\"Can not send yet, busyTx\");\n        if (busyRx)\n            LOG_WARN(\"Can not send yet, busyRx\");\n        return false;\n    } else\n        return true;\n}\n\nbool SimRadio::isActivelyReceiving()\n{\n    return receivingPacket != nullptr;\n}\n\nbool SimRadio::isChannelActive()\n{\n    return receivingPacket != nullptr;\n}\n\n/** Attempt to cancel a previously sent packet.  Returns true if a packet was found we could cancel */\nbool SimRadio::cancelSending(NodeNum from, PacketId id)\n{\n    auto p = txQueue.remove(from, id);\n    if (p)\n        packetPool.release(p); // free the packet we just removed\n\n    bool result = (p != NULL);\n    LOG_DEBUG(\"cancelSending id=0x%x, removed=%d\", id, result);\n    return result;\n}\n\n/** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */\nbool SimRadio::findInTxQueue(NodeNum from, PacketId id)\n{\n    return txQueue.find(from, id);\n}\n\nvoid SimRadio::onNotify(uint32_t notification)\n{\n    switch (notification) {\n    case ISR_TX:\n        handleTransmitInterrupt();\n        //  LOG_DEBUG(\"tx complete - starting timer\");\n        startTransmitTimer();\n        break;\n    case ISR_RX:\n        handleReceiveInterrupt();\n        //  LOG_DEBUG(\"rx complete - starting timer\");\n        startTransmitTimer();\n        break;\n    case TRANSMIT_DELAY_COMPLETED:\n        if (receivingPacket) { // This happens when we had a timer pending and we started receiving\n            handleReceiveInterrupt();\n            startTransmitTimer();\n            break;\n        }\n        LOG_DEBUG(\"delay done\");\n\n        // If we are not currently in receive mode, then restart the random delay (this can happen if the main thread\n        // has placed the unit into standby)  FIXME, how will this work if the chipset is in sleep mode?\n        if (!txQueue.empty()) {\n            if (!canSendImmediately()) {\n                // LOG_DEBUG(\"Currently Rx/Tx-ing: set random delay\");\n                setTransmitDelay(); // currently Rx/Tx-ing: reset random delay\n            } else {\n                if (isChannelActive()) { // check if there is currently a LoRa packet on the channel\n                    // LOG_DEBUG(\"Channel is active: set random delay\");\n                    setTransmitDelay(); // reset random delay\n                } else {\n                    // Send any outgoing packets we have ready\n                    meshtastic_MeshPacket *txp = txQueue.dequeue();\n                    assert(txp);\n                    startSend(txp);\n                    // Packet has been sent, count it toward our TX airtime utilization.\n                    uint32_t xmitMsec = RadioInterface::getPacketTime(txp);\n                    airTime->logAirtime(TX_LOG, xmitMsec);\n\n                    notifyLater(xmitMsec, ISR_TX, false); // Model the time it is busy sending\n                }\n            }\n        } else {\n            // LOG_DEBUG(\"done with txqueue\");\n        }\n        break;\n    default:\n        assert(0); // We expected to receive a valid notification from the ISR\n    }\n}\n\n/** start an immediate transmit */\nvoid SimRadio::startSend(meshtastic_MeshPacket *txp)\n{\n    printPacket(\"Start low level send\", txp);\n    isReceiving = false;\n    size_t numbytes = beginSending(txp);\n    meshtastic_MeshPacket *p = packetPool.allocCopy(*txp);\n    perhapsDecode(p);\n    meshtastic_Compressed c = meshtastic_Compressed_init_default;\n    c.portnum = p->decoded.portnum;\n    // LOG_DEBUG(\"Send back to simulator with portNum %d\", p->decoded.portnum);\n    if (p->decoded.payload.size <= sizeof(c.data.bytes)) {\n        memcpy(&c.data.bytes, p->decoded.payload.bytes, p->decoded.payload.size);\n        c.data.size = p->decoded.payload.size;\n    } else {\n        LOG_WARN(\"Payload size larger than compressed message allows! Send empty payload\");\n    }\n    p->decoded.payload.size =\n        pb_encode_to_bytes(p->decoded.payload.bytes, sizeof(p->decoded.payload.bytes), &meshtastic_Compressed_msg, &c);\n    p->decoded.portnum = meshtastic_PortNum_SIMULATOR_APP;\n\n    service->sendQueueStatusToPhone(router->getQueueStatus(), 0, p->id);\n    service->sendToPhone(p); // Sending back to simulator\n    service->loop();         // Process the send immediately\n}\n\n// Simulates device received a packet via the LoRa chip\nvoid SimRadio::unpackAndReceive(meshtastic_MeshPacket &p)\n{\n    // Simulator packet (=Compressed packet) is encapsulated in a MeshPacket, so need to unwrap first\n    meshtastic_Compressed scratch;\n    meshtastic_Compressed *decoded = NULL;\n    if (p.which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        memset(&scratch, 0, sizeof(scratch));\n        p.decoded.payload.size =\n            pb_decode_from_bytes(p.decoded.payload.bytes, p.decoded.payload.size, &meshtastic_Compressed_msg, &scratch);\n        if (p.decoded.payload.size) {\n            decoded = &scratch;\n            // Extract the original payload and replace\n            memcpy(&p.decoded.payload, &decoded->data, sizeof(decoded->data));\n            // Switch the port from PortNum_SIMULATOR_APP back to the original PortNum\n            p.decoded.portnum = decoded->portnum;\n        } else\n            LOG_ERROR(\"Error decoding proto for simulator message!\");\n    }\n    // Let SimRadio receive as if it did via its LoRa chip\n    startReceive(&p);\n}\n\nvoid SimRadio::startReceive(meshtastic_MeshPacket *p)\n{\n#ifdef USERPREFS_SIMRADIO_EMULATE_COLLISIONS\n    if (isActivelyReceiving()) {\n        LOG_WARN(\"Collision detected, dropping current and previous packet!\");\n        rxBad++;\n        airTime->logAirtime(RX_ALL_LOG, getPacketTime(receivingPacket, true));\n        packetPool.release(receivingPacket);\n        receivingPacket = nullptr;\n        return;\n    } else if (sendingPacket) {\n        uint32_t airtimeLeft = tillRun(millis());\n        if (airtimeLeft <= 0) {\n            LOG_WARN(\"Transmitting packet was already done\");\n            handleTransmitInterrupt(); // Finish sending first\n        } else if ((interval - airtimeLeft) > preambleTimeMsec) {\n            // Only if transmitting for longer than preamble there is a collision\n            // (channel should actually be detected as active otherwise)\n            LOG_WARN(\"Collision detected during transmission!\");\n            return;\n        }\n    }\n    isReceiving = true;\n    receivingPacket = packetPool.allocCopy(*p);\n    uint32_t airtimeMsec = getPacketTime(p, true);\n    notifyLater(airtimeMsec, ISR_RX, false); // Model the time it is busy receiving\n#else\n    isReceiving = true;\n    receivingPacket = packetPool.allocCopy(*p);\n    handleReceiveInterrupt(); // Simulate receiving the packet immediately\n    startTransmitTimer();\n#endif\n}\n\nmeshtastic_QueueStatus SimRadio::getQueueStatus()\n{\n    meshtastic_QueueStatus qs;\n\n    qs.res = qs.mesh_packet_id = 0;\n    qs.free = txQueue.getFree();\n    qs.maxlen = txQueue.getMaxLen();\n\n    return qs;\n}\n\nvoid SimRadio::handleReceiveInterrupt()\n{\n    if (receivingPacket == nullptr) {\n        return;\n    }\n\n    if (!isReceiving) {\n        LOG_DEBUG(\"*** WAS_ASSERT *** handleReceiveInterrupt called when not in receive mode\");\n        return;\n    }\n\n    LOG_DEBUG(\"HANDLE RECEIVE INTERRUPT\");\n    rxGood++;\n\n    meshtastic_MeshPacket *mp = packetPool.allocCopy(*receivingPacket); // keep a copy in packetPool\n    packetPool.release(receivingPacket);                                // release the original\n    receivingPacket = nullptr;\n\n    printPacket(\"Lora RX\", mp);\n\n    airTime->logAirtime(RX_LOG, RadioInterface::getPacketTime(mp, true));\n\n    deliverToReceiver(mp);\n}\n\nsize_t SimRadio::getPacketLength(meshtastic_MeshPacket *mp)\n{\n    auto &p = mp->decoded;\n    return (size_t)p.payload.size + sizeof(PacketHeader);\n}\n\nint16_t SimRadio::readData(uint8_t *data, size_t len)\n{\n    int16_t state = RADIOLIB_ERR_NONE;\n\n    if (state == RADIOLIB_ERR_NONE) {\n        // add null terminator\n        data[len] = 0;\n    }\n\n    return state;\n}\n\n/**\n * Calculate airtime per\n * https://www.rs-online.com/designspark/rel-assets/ds-assets/uploads/knowledge-items/application-notes-for-the-internet-of-things/LoRa%20Design%20Guide.pdf\n * section 4\n *\n * @return num msecs for the packet\n */\nuint32_t SimRadio::getPacketTime(uint32_t pl, bool received)\n{\n    float bandwidthHz = bw * 1000.0f;\n    bool headDisable = false; // we currently always use the header\n    float tSym = (1 << sf) / bandwidthHz;\n\n    bool lowDataOptEn = tSym > 16e-3 ? true : false; // Needed if symbol time is >16ms\n\n    float tPreamble = (preambleLength + 4.25f) * tSym;\n    float numPayloadSym =\n        8 + max(ceilf(((8.0f * pl - 4 * sf + 28 + 16 - 20 * headDisable) / (4 * (sf - 2 * lowDataOptEn))) * cr), 0.0f);\n    float tPayload = numPayloadSym * tSym;\n    float tPacket = tPreamble + tPayload;\n\n    uint32_t msecs = tPacket * 1000;\n    return msecs;\n}"
  },
  {
    "path": "src/platform/portduino/SimRadio.h",
    "content": "#pragma once\n\n#include \"MeshPacketQueue.h\"\n#include \"RadioInterface.h\"\n#include \"api/WiFiServerAPI.h\"\n#include \"concurrency/NotifiedWorkerThread.h\"\n\n#include <RadioLib.h>\n\nclass SimRadio : public RadioInterface, protected concurrency::NotifiedWorkerThread\n{\n    enum PendingISR { ISR_NONE = 0, ISR_RX, ISR_TX, TRANSMIT_DELAY_COMPLETED };\n\n    MeshPacketQueue txQueue = MeshPacketQueue(MAX_TX_QUEUE);\n\n  public:\n    SimRadio();\n\n    /** MeshService needs this to find our active instance\n     */\n    static SimRadio *instance;\n\n    virtual ErrorCode send(meshtastic_MeshPacket *p) override;\n\n    /** can we detect a LoRa preamble on the current channel? */\n    virtual bool isChannelActive();\n\n    /** are we actively receiving a packet (only called during receiving state)\n     *  This method is only public to facilitate debugging.  Do not call.\n     */\n    virtual bool isActivelyReceiving();\n\n    /** Attempt to cancel a previously sent packet.  Returns true if a packet was found we could cancel */\n    virtual bool cancelSending(NodeNum from, PacketId id) override;\n\n    /** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */\n    virtual bool findInTxQueue(NodeNum from, PacketId id) override;\n\n    /**\n     * Start waiting to receive a message\n     *\n     * External functions can call this method to wake the device from sleep.\n     */\n    virtual void startReceive(meshtastic_MeshPacket *p);\n\n    meshtastic_QueueStatus getQueueStatus() override;\n\n    // Convert Compressed_msg to normal msg and receive it\n    void unpackAndReceive(meshtastic_MeshPacket &p);\n\n    /**\n     * Debugging counts\n     */\n    uint32_t rxBad = 0, rxGood = 0, txGood = 0, txRelay = 0;\n    uint16_t txDrop = 0;\n\n  protected:\n    /// are _trying_ to receive a packet currently (note - we might just be waiting for one)\n    bool isReceiving = true;\n\n  private:\n    void setTransmitDelay();\n\n    /** random timer with certain min. and max. settings */\n    void startTransmitTimer(bool withDelay = true);\n\n    /** timer scaled to SNR of to be flooded packet */\n    void startTransmitTimerRebroadcast(meshtastic_MeshPacket *p);\n\n    void handleTransmitInterrupt();\n    void handleReceiveInterrupt();\n\n    void onNotify(uint32_t notification);\n\n    // start an immediate transmit\n    virtual void startSend(meshtastic_MeshPacket *txp);\n\n    // derive packet length\n    size_t getPacketLength(meshtastic_MeshPacket *p);\n\n    int16_t readData(uint8_t *str, size_t len);\n\n    meshtastic_MeshPacket *receivingPacket = nullptr; // The packet we are currently receiving\n\n  protected:\n    /** Could we send right now (i.e. either not actively receiving or transmitting)? */\n    virtual bool canSendImmediately();\n\n    /**\n     * If a send was in progress finish it and return the buffer to the pool */\n    void completeSending();\n\n    virtual uint32_t getPacketTime(uint32_t pl, bool received = false) override;\n};\n\nextern SimRadio *simRadio;"
  },
  {
    "path": "src/platform/portduino/USBHal.h",
    "content": "#ifndef PI_HAL_LGPIO_H\n#define PI_HAL_LGPIO_H\n\n// include RadioLib\n#include \"platform/portduino/PortduinoGlue.h\"\n#include <RadioLib.h>\n#include <csignal>\n#include <iostream>\n#include <libpinedio-usb.h>\n#include <unistd.h>\n\nextern uint32_t rebootAtMsec;\n\n// include the library for Raspberry GPIO pins\n\n#define PI_RISING (PINEDIO_INT_MODE_RISING)\n#define PI_FALLING (PINEDIO_INT_MODE_FALLING)\n#define PI_INPUT (0)\n#define PI_OUTPUT (1)\n#define PI_LOW (0)\n#define PI_HIGH (1)\n\n#define CH341_PIN_CS (101)\n#define CH341_PIN_IRQ (0)\n\n// the HAL must inherit from the base RadioLibHal class\n// and implement all of its virtual methods\nclass Ch341Hal : public RadioLibHal\n{\n  public:\n    // default constructor - initializes the base HAL and any needed private members\n    explicit Ch341Hal(uint8_t spiChannel, const std::string &serial = \"\", uint32_t vid = 0x1A86, uint32_t pid = 0x5512,\n                      uint32_t spiSpeed = 2000000, uint8_t spiDevice = 0, uint8_t gpioDevice = 0)\n        : RadioLibHal(PI_INPUT, PI_OUTPUT, PI_LOW, PI_HIGH, PI_RISING, PI_FALLING)\n    {\n        if (serial != \"\") {\n            strncpy(pinedio.serial_number, serial.c_str(), 8);\n            pinedio_set_option(&pinedio, PINEDIO_OPTION_SEARCH_SERIAL, 1);\n        }\n        // LOG_INFO(\"USB Serial: %s\", pinedio.serial_number);\n\n        // There is no vendor with 0x0 -> so check\n        if (vid != 0x0) {\n            pinedio_set_option(&pinedio, PINEDIO_OPTION_VID, vid);\n            pinedio_set_option(&pinedio, PINEDIO_OPTION_PID, pid);\n        }\n        int32_t ret = pinedio_init(&pinedio, NULL);\n        if (ret != 0) {\n            std::string s = \"Could not open SPI: \";\n            throw std::runtime_error(s + std::to_string(ret));\n        }\n\n        pinedio_set_option(&pinedio, PINEDIO_OPTION_AUTO_CS, 0);\n        pinedio_set_pin_mode(&pinedio, 3, true);\n        pinedio_set_pin_mode(&pinedio, 5, true);\n    }\n\n    ~Ch341Hal() { pinedio_deinit(&pinedio); }\n\n    void getSerialString(char *_serial, size_t len)\n    {\n        len = len > 8 ? 8 : len;\n        strncpy(_serial, pinedio.serial_number, len);\n    }\n\n    void getProductString(char *_product_string, size_t len)\n    {\n        len = len > 95 ? 95 : len;\n        memcpy(_product_string, pinedio.product_string, len);\n    }\n\n    void init() override {}\n    void term() override {}\n\n    // GPIO-related methods (pinMode, digitalWrite etc.) should check\n    // RADIOLIB_NC as an alias for non-connected pins\n    void pinMode(uint32_t pin, uint32_t mode) override\n    {\n        if (checkError()) {\n            return;\n        }\n        if (pin == RADIOLIB_NC) {\n            return;\n        }\n        auto res = pinedio_set_pin_mode(&pinedio, pin, mode);\n        if (res < 0 && rebootAtMsec == 0) {\n            LOG_ERROR(\"USBHal pinMode: Could not set pin %u mode to %u: %d\", pin, mode, res);\n        }\n    }\n\n    void digitalWrite(uint32_t pin, uint32_t value) override\n    {\n        if (checkError()) {\n            return;\n        }\n        if (pin == RADIOLIB_NC) {\n            return;\n        }\n        auto res = pinedio_digital_write(&pinedio, pin, value);\n        if (res < 0 && rebootAtMsec == 0) {\n            LOG_ERROR(\"USBHal digitalWrite: Could not write pin %u: %d\", pin, res);\n            portduino_status.LoRa_in_error = true;\n        }\n    }\n\n    uint32_t digitalRead(uint32_t pin) override\n    {\n        if (checkError()) {\n            return 0;\n        }\n        if (pin == RADIOLIB_NC) {\n            return 0;\n        }\n        auto res = pinedio_digital_read(&pinedio, pin);\n        if (res < 0 && rebootAtMsec == 0) {\n            LOG_ERROR(\"USBHal digitalRead: Could not read pin %u: %d\", pin, res);\n            portduino_status.LoRa_in_error = true;\n            return 0;\n        }\n        return res;\n    }\n\n    void attachInterrupt(uint32_t interruptNum, void (*interruptCb)(void), uint32_t mode) override\n    {\n        if (checkError()) {\n            return;\n        }\n        if (interruptNum == RADIOLIB_NC) {\n            return;\n        }\n        // LOG_DEBUG(\"Attach interrupt to pin %d\", interruptNum);\n        pinedio_attach_interrupt(&this->pinedio, (pinedio_int_pin)interruptNum, (pinedio_int_mode)mode, interruptCb);\n    }\n\n    void detachInterrupt(uint32_t interruptNum) override\n    {\n        if (checkError()) {\n            return;\n        }\n        if (interruptNum == RADIOLIB_NC) {\n            return;\n        }\n        // LOG_DEBUG(\"Detach interrupt from pin %d\", interruptNum);\n        pinedio_deattach_interrupt(&this->pinedio, (pinedio_int_pin)interruptNum);\n    }\n\n    void delay(unsigned long ms) override { delayMicroseconds(ms * 1000); }\n\n    void delayMicroseconds(unsigned long us) override\n    {\n        if (us == 0) {\n            sched_yield();\n            return;\n        }\n        usleep(us);\n    }\n\n    void yield() override { sched_yield(); }\n\n    unsigned long millis() override\n    {\n        struct timeval tv;\n        gettimeofday(&tv, NULL);\n        return (tv.tv_sec * 1000ULL) + (tv.tv_usec / 1000ULL);\n    }\n\n    unsigned long micros() override\n    {\n        struct timeval tv;\n        gettimeofday(&tv, NULL);\n        return (tv.tv_sec * 1000000ULL) + tv.tv_usec;\n    }\n\n    long pulseIn(uint32_t pin, uint32_t state, unsigned long timeout) override\n    {\n        std::cerr << \"pulseIn for pin \" << pin << \"is not supported!\" << std::endl;\n        return 0;\n    }\n\n    void spiBegin() {}\n    void spiBeginTransaction() {}\n\n    void spiTransfer(uint8_t *out, size_t len, uint8_t *in)\n    {\n        if (checkError()) {\n            return;\n        }\n        int32_t ret = pinedio_transceive(&this->pinedio, out, in, len);\n        if (ret < 0) {\n            std::cerr << \"Could not perform SPI transfer: \" << ret << std::endl;\n        }\n    }\n\n    void spiEndTransaction() {}\n    void spiEnd() {}\n    bool checkError()\n    {\n        if (pinedio.in_error) {\n            if (!has_warned)\n                LOG_ERROR(\"USBHal: libch341 in_error detected\");\n            portduino_status.LoRa_in_error = true;\n            has_warned = true;\n            return true;\n        }\n        has_warned = false;\n        return false;\n    }\n\n  private:\n    pinedio_inst pinedio = {0};\n    bool has_warned = false;\n};\n\n#endif\n"
  },
  {
    "path": "src/platform/portduino/architecture.h",
    "content": "#pragma once\n\n#define ARCH_PORTDUINO 1\n\n//\n// set HW_VENDOR\n//\n\n#define HW_VENDOR portduino_status.hardwareModel\n\n#ifndef HAS_BUTTON\n#define HAS_BUTTON 1\n#endif\n#ifndef HAS_WIFI\n#define HAS_WIFI 1\n#endif\n#ifndef HAS_RADIO\n#define HAS_RADIO 1\n#endif\n#ifndef HAS_TELEMETRY\n#define HAS_TELEMETRY 1\n#endif\n#ifndef HAS_SENSOR\n#define HAS_SENSOR 1\n#endif\n#ifndef HAS_TRACKBALL\n#define HAS_TRACKBALL 1\n#define TB_DOWN (uint8_t) portduino_config.tbDownPin.pin\n#define TB_UP (uint8_t) portduino_config.tbUpPin.pin\n#define TB_LEFT (uint8_t) portduino_config.tbLeftPin.pin\n#define TB_RIGHT (uint8_t) portduino_config.tbRightPin.pin\n#define TB_PRESS (uint8_t) portduino_config.tbPressPin.pin\n#endif"
  },
  {
    "path": "src/platform/rp2xx0/architecture.h",
    "content": "#pragma once\n\n#define ARCH_RP2040\n\n#ifndef HAS_BUTTON\n#define HAS_BUTTON 1\n#endif\n#ifndef HAS_TELEMETRY\n#define HAS_TELEMETRY 1\n#endif\n#ifndef HAS_SCREEN\n#define HAS_SCREEN 1\n#endif\n#ifndef HAS_WIRE\n#define HAS_WIRE 1\n#endif\n#ifndef HAS_SENSOR\n#define HAS_SENSOR 1\n#endif\n#ifndef HAS_RADIO\n#define HAS_RADIO 1\n#endif\n\n#if defined(RPI_PICO)\n#define HW_VENDOR meshtastic_HardwareModel_RPI_PICO\n#elif defined(RPI_PICO2)\n#define HW_VENDOR meshtastic_HardwareModel_RPI_PICO2\n#elif defined(RAK11310)\n#define HW_VENDOR meshtastic_HardwareModel_RAK11310\n#elif defined(SENSELORA_RP2040)\n#define HW_VENDOR meshtastic_HardwareModel_SENSELORA_RP2040\n#elif defined(RP2040_LORA)\n#define HW_VENDOR meshtastic_HardwareModel_RP2040_LORA\n#elif defined(RP2040_FEATHER_RFM95)\n#define HW_VENDOR meshtastic_HardwareModel_RP2040_FEATHER_RFM95\n#elif defined(PRIVATE_HW)\n#define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW\n#endif\n\n// Detect if running in ISR context (ARM Cortex-M33 / RISC-V)\n#define xPortInIsrContext() (__get_current_exception() == 0 ? pdFALSE : pdTRUE)\n"
  },
  {
    "path": "src/platform/rp2xx0/hardware_rosc/include/hardware/rosc.h",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#ifndef _HARDWARE_ROSC_H_\n#define _HARDWARE_ROSC_H_\n\n#include \"hardware/structs/rosc.h\"\n#include \"pico.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** \\file rosc.h\n *  \\defgroup hardware_rosc hardware_rosc\n *\n * Ring Oscillator (ROSC) API\n *\n * A Ring Oscillator is an on-chip oscillator that requires no external crystal. Instead, the output is generated from a series of\n * inverters that are chained together to create a feedback loop. RP2040 boots from the ring oscillator initially, meaning the\n * first stages of the bootrom, including booting from SPI flash, will be clocked by the ring oscillator. If your design has a\n * crystal oscillator, you’ll likely want to switch to this as your reference clock as soon as possible, because the frequency is\n * more accurate than the ring oscillator.\n */\n\n/*! \\brief  Set frequency of the Ring Oscillator\n *  \\ingroup hardware_rosc\n *\n * \\param code The drive strengths. See the RP2040 datasheet for information on this value.\n */\nvoid rosc_set_freq(uint32_t code);\n\n/*! \\brief  Set range of the Ring Oscillator\n *  \\ingroup hardware_rosc\n *\n * Frequency range. Frequencies will vary with Process, Voltage & Temperature (PVT).\n * Clock output will not glitch when changing the range up one step at a time.\n *\n * \\param range 0x01 Low, 0x02 Medium, 0x03 High, 0x04 Too High.\n */\nvoid rosc_set_range(uint range);\n\n/*! \\brief  Disable the Ring Oscillator\n *  \\ingroup hardware_rosc\n *\n */\nvoid rosc_disable(void);\n\n/*! \\brief  Put Ring Oscillator in to dormant mode.\n *  \\ingroup hardware_rosc\n *\n * The ROSC supports a dormant mode,which stops oscillation until woken up up by an asynchronous interrupt.\n * This can either come from the RTC, being clocked by an external clock, or a GPIO pin going high or low.\n * If no IRQ is configured before going into dormant mode the ROSC will never restart.\n *\n * PLLs should be stopped before selecting dormant mode.\n */\nvoid rosc_set_dormant(void);\n\n// FIXME: Add doxygen\n\nuint32_t next_rosc_code(uint32_t code);\n\nuint rosc_find_freq(uint32_t low_mhz, uint32_t high_mhz);\n\nvoid rosc_set_div(uint32_t div);\n\ninline static void rosc_clear_bad_write(void)\n{\n    hw_clear_bits(&rosc_hw->status, ROSC_STATUS_BADWRITE_BITS);\n}\n\ninline static bool rosc_write_okay(void)\n{\n    return !(rosc_hw->status & ROSC_STATUS_BADWRITE_BITS);\n}\n\ninline static void rosc_write(io_rw_32 *addr, uint32_t value)\n{\n    rosc_clear_bad_write();\n    assert(rosc_write_okay());\n    *addr = value;\n    assert(rosc_write_okay());\n};\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif"
  },
  {
    "path": "src/platform/rp2xx0/hardware_rosc/rosc.c",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#include \"pico.h\"\n\n// For MHZ definitions etc\n#include \"hardware/clocks.h\"\n#include \"hardware/rosc.h\"\n\n// Given a ROSC delay stage code, return the next-numerically-higher code.\n// Top result bit is set when called on maximum ROSC code.\nuint32_t next_rosc_code(uint32_t code)\n{\n    return ((code | 0x08888888u) + 1u) & 0xf7777777u;\n}\n\nuint rosc_find_freq(uint32_t low_mhz, uint32_t high_mhz)\n{\n    // TODO: This could be a lot better\n    rosc_set_div(1);\n    for (uint32_t code = 0; code <= 0x77777777u; code = next_rosc_code(code)) {\n        rosc_set_freq(code);\n        uint rosc_mhz = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC) / 1000;\n        if ((rosc_mhz >= low_mhz) && (rosc_mhz <= high_mhz)) {\n            return rosc_mhz;\n        }\n    }\n    return 0;\n}\n\nvoid rosc_set_div(uint32_t div)\n{\n    assert(div <= 31 && div >= 1);\n    rosc_write(&rosc_hw->div, ROSC_DIV_VALUE_PASS + div);\n}\n\nvoid rosc_set_freq(uint32_t code)\n{\n    rosc_write(&rosc_hw->freqa, (ROSC_FREQA_PASSWD_VALUE_PASS << ROSC_FREQA_PASSWD_LSB) | (code & 0xffffu));\n    rosc_write(&rosc_hw->freqb, (ROSC_FREQA_PASSWD_VALUE_PASS << ROSC_FREQA_PASSWD_LSB) | (code >> 16u));\n}\n\nvoid rosc_set_range(uint range)\n{\n    // Range should use enumvals from the headers and thus have the password correct\n    rosc_write(&rosc_hw->ctrl, (ROSC_CTRL_ENABLE_VALUE_ENABLE << ROSC_CTRL_ENABLE_LSB) | range);\n}\n\nvoid rosc_disable(void)\n{\n    uint32_t tmp = rosc_hw->ctrl;\n    tmp &= (~ROSC_CTRL_ENABLE_BITS);\n    tmp |= (ROSC_CTRL_ENABLE_VALUE_DISABLE << ROSC_CTRL_ENABLE_LSB);\n    rosc_write(&rosc_hw->ctrl, tmp);\n    // Wait for stable to go away\n    while (rosc_hw->status & ROSC_STATUS_STABLE_BITS)\n        ;\n}\n\nvoid rosc_set_dormant(void)\n{\n    // WARNING: This stops the rosc until woken up by an irq\n    rosc_write(&rosc_hw->dormant, ROSC_DORMANT_VALUE_DORMANT);\n    // Wait for it to become stable once woken up\n    while (!(rosc_hw->status & ROSC_STATUS_STABLE_BITS))\n        ;\n}"
  },
  {
    "path": "src/platform/rp2xx0/main-rp2xx0.cpp",
    "content": "#include \"configuration.h\"\n#include \"hardware/xosc.h\"\n#include <hardware/clocks.h>\n#include <hardware/pll.h>\n#include <pico/stdlib.h>\n#include <pico/unique_id.h>\n\n#ifdef __PLAT_RP2040__\n#include <pico/sleep.h>\n\nstatic bool awake;\n\nstatic void sleep_callback(void)\n{\n    awake = true;\n}\n\nvoid epoch_to_datetime(time_t epoch, datetime_t *dt)\n{\n    struct tm *tm_info;\n\n    tm_info = gmtime(&epoch);\n    dt->year = tm_info->tm_year;\n    dt->month = tm_info->tm_mon + 1;\n    dt->day = tm_info->tm_mday;\n    dt->dotw = tm_info->tm_wday;\n    dt->hour = tm_info->tm_hour;\n    dt->min = tm_info->tm_min;\n    dt->sec = tm_info->tm_sec;\n}\n\nvoid debug_date(datetime_t t)\n{\n    LOG_DEBUG(\"%d %d %d %d %d %d %d\", t.year, t.month, t.day, t.hour, t.min, t.sec, t.dotw);\n    uart_default_tx_wait_blocking();\n}\n\nvoid cpuDeepSleep(uint32_t msecs)\n{\n\n    time_t seconds = (time_t)(msecs / 1000);\n    datetime_t t_init, t_alarm;\n\n    awake = false;\n    // Start the RTC\n    rtc_init();\n    epoch_to_datetime(0, &t_init);\n    rtc_set_datetime(&t_init);\n    epoch_to_datetime(seconds, &t_alarm);\n    // debug_date(t_init);\n    // debug_date(t_alarm);\n    uart_default_tx_wait_blocking();\n    sleep_run_from_dormant_source(DORMANT_SOURCE_ROSC);\n    sleep_goto_sleep_until(&t_alarm, &sleep_callback);\n\n    // Make sure we don't wake\n    while (!awake) {\n        delay(1);\n    }\n\n    /* For now, I don't know how to revert this state\n        We just reboot in order to get back operational */\n    rp2040.reboot();\n\n    /* Set RP2040 in dormant mode. Will not wake up. */\n    // xosc_dormant();\n}\n\n#else\nvoid cpuDeepSleep(uint32_t msecs)\n{\n    /* Set RP2040 in dormant mode. Will not wake up. */\n    xosc_dormant();\n}\n#endif\n\nvoid setBluetoothEnable(bool enable)\n{\n    // not needed\n}\n\nvoid updateBatteryLevel(uint8_t level)\n{\n    // not needed\n}\n\nvoid getMacAddr(uint8_t *dmac)\n{\n    pico_unique_board_id_t src;\n    pico_get_unique_board_id(&src);\n    dmac[5] = src.id[7];\n    dmac[4] = src.id[6];\n    dmac[3] = src.id[5];\n    dmac[2] = src.id[4];\n    dmac[1] = src.id[3];\n    dmac[0] = src.id[2];\n}\n\nvoid rp2040Setup()\n{\n    /* Sets a random seed to make sure we get different random numbers on each boot.\n       Taken from CPU cycle counter and ROSC oscillator, so should be pretty random.\n    */\n    randomSeed(rp2040.hwrand32());\n\n#ifdef RP2040_SLOW_CLOCK\n    uint f_pll_sys = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_PLL_SYS_CLKSRC_PRIMARY);\n    uint f_pll_usb = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_PLL_USB_CLKSRC_PRIMARY);\n    uint f_rosc = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_ROSC_CLKSRC);\n    uint f_clk_sys = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_SYS);\n    uint f_clk_peri = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_PERI);\n    uint f_clk_usb = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_USB);\n    uint f_clk_adc = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_ADC);\n    uint f_clk_rtc = frequency_count_khz(CLOCKS_FC0_SRC_VALUE_CLK_RTC);\n\n    LOG_INFO(\"Clock speed:\");\n    LOG_INFO(\"pll_sys  = %dkHz\", f_pll_sys);\n    LOG_INFO(\"pll_usb  = %dkHz\", f_pll_usb);\n    LOG_INFO(\"rosc     = %dkHz\", f_rosc);\n    LOG_INFO(\"clk_sys  = %dkHz\", f_clk_sys);\n    LOG_INFO(\"clk_peri = %dkHz\", f_clk_peri);\n    LOG_INFO(\"clk_usb  = %dkHz\", f_clk_usb);\n    LOG_INFO(\"clk_adc  = %dkHz\", f_clk_adc);\n    LOG_INFO(\"clk_rtc  = %dkHz\", f_clk_rtc);\n#endif\n}\n\nvoid enterDfuMode()\n{\n    reset_usb_boot(0, 0);\n}\n\n/* Init in early boot state. */\n#ifdef RP2040_SLOW_CLOCK\nvoid initVariant()\n{\n    /* Set the system frequency to 18 MHz. */\n    set_sys_clock_khz(18 * KHZ, false);\n    /* The previous line automatically detached clk_peri from clk_sys, and\n       attached it to pll_usb. We need to attach clk_peri back to system PLL to keep SPI\n       working at this low speed.\n       For details see https://github.com/jgromes/RadioLib/discussions/938\n    */\n    clock_configure(clk_peri,\n                    0,                                                // No glitchless mux\n                    CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, // System PLL on AUX mux\n                    18 * MHZ,                                         // Input frequency\n                    18 * MHZ                                          // Output (must be same as no divider)\n    );\n    /* Run also ADC on lower clk_sys. */\n    clock_configure(clk_adc, 0, CLOCKS_CLK_ADC_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, 18 * MHZ, 18 * MHZ);\n    /* Run RTC from XOSC since USB clock is off */\n    clock_configure(clk_rtc, 0, CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC, 12 * MHZ, 47 * KHZ);\n    /* Turn off USB PLL */\n    pll_deinit(pll_usb);\n}\n#endif"
  },
  {
    "path": "src/platform/rp2xx0/pico_sleep/include/pico/sleep.h",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#ifndef _PICO_SLEEP_H_\n#define _PICO_SLEEP_H_\n\n#include \"hardware/rtc.h\"\n#include \"pico.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** \\file sleep.h\n *  \\defgroup hardware_sleep hardware_sleep\n *\n * Lower Power Sleep API\n *\n * The difference between sleep and dormant is that ALL clocks are stopped in dormant mode,\n * until the source (either xosc or rosc) is started again by an external event.\n * In sleep mode some clocks can be left running controlled by the SLEEP_EN registers in the clocks\n * block. For example you could keep clk_rtc running. Some destinations (proc0 and proc1 wakeup logic)\n * can't be stopped in sleep mode otherwise there wouldn't be enough logic to wake up again.\n *\n * \\subsection sleep_example Example\n * \\addtogroup hardware_sleep\n * \\include hello_sleep.c\n\n */\ntypedef enum { DORMANT_SOURCE_NONE, DORMANT_SOURCE_XOSC, DORMANT_SOURCE_ROSC } dormant_source_t;\n\n/*! \\brief Set all clock sources to the the dormant clock source to prepare for sleep.\n *  \\ingroup hardware_sleep\n *\n * \\param dormant_source The dormant clock source to use\n */\nvoid sleep_run_from_dormant_source(dormant_source_t dormant_source);\n\n/*! \\brief Set the dormant clock source to be the crystal oscillator\n *  \\ingroup hardware_sleep\n */\nstatic inline void sleep_run_from_xosc(void)\n{\n    sleep_run_from_dormant_source(DORMANT_SOURCE_XOSC);\n}\n\n/*! \\brief Set the dormant clock source to be the ring oscillator\n *  \\ingroup hardware_sleep\n */\nstatic inline void sleep_run_from_rosc(void)\n{\n    sleep_run_from_dormant_source(DORMANT_SOURCE_ROSC);\n}\n\n/*! \\brief Send system to sleep until the specified time\n *  \\ingroup hardware_sleep\n *\n * One of the sleep_run_* functions must be called prior to this call\n *\n * \\param t The time to wake up\n * \\param callback Function to call on wakeup.\n */\nvoid sleep_goto_sleep_until(datetime_t *t, rtc_callback_t callback);\n\n/*! \\brief Send system to sleep until the specified GPIO changes\n *  \\ingroup hardware_sleep\n *\n * One of the sleep_run_* functions must be called prior to this call\n *\n * \\param gpio_pin The pin to provide the wake up\n * \\param edge true for leading edge, false for trailing edge\n * \\param high true for active high, false for active low\n */\nvoid sleep_goto_dormant_until_pin(uint gpio_pin, bool edge, bool high);\n\n/*! \\brief Send system to sleep until a leading high edge is detected on GPIO\n *  \\ingroup hardware_sleep\n *\n * One of the sleep_run_* functions must be called prior to this call\n *\n * \\param gpio_pin The pin to provide the wake up\n */\nstatic inline void sleep_goto_dormant_until_edge_high(uint gpio_pin)\n{\n    sleep_goto_dormant_until_pin(gpio_pin, true, true);\n}\n\n/*! \\brief Send system to sleep until a high level is detected on GPIO\n *  \\ingroup hardware_sleep\n *\n * One of the sleep_run_* functions must be called prior to this call\n *\n * \\param gpio_pin The pin to provide the wake up\n */\nstatic inline void sleep_goto_dormant_until_level_high(uint gpio_pin)\n{\n    sleep_goto_dormant_until_pin(gpio_pin, false, true);\n}\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif"
  },
  {
    "path": "src/platform/rp2xx0/pico_sleep/sleep.c",
    "content": "/*\n * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.\n *\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n#include \"pico.h\"\n\n#include \"pico/sleep.h\"\n#include \"pico/stdlib.h\"\n\n#include \"hardware/clocks.h\"\n#include \"hardware/pll.h\"\n#include \"hardware/regs/io_bank0.h\"\n#include \"hardware/rosc.h\"\n#include \"hardware/rtc.h\"\n#include \"hardware/xosc.h\"\n// For __wfi\n#include \"hardware/sync.h\"\n// For scb_hw so we can enable deep sleep\n#include \"hardware/structs/scb.h\"\n// when using old SDK this macro is not defined\n#ifndef XOSC_HZ\n#define XOSC_HZ 12000000u\n#endif\n// The difference between sleep and dormant is that ALL clocks are stopped in dormant mode,\n// until the source (either xosc or rosc) is started again by an external event.\n// In sleep mode some clocks can be left running controlled by the SLEEP_EN registers in the clocks\n// block. For example you could keep clk_rtc running. Some destinations (proc0 and proc1 wakeup logic)\n// can't be stopped in sleep mode otherwise there wouldn't be enough logic to wake up again.\n\n// TODO: Optionally, memories can also be powered down.\n\nstatic dormant_source_t _dormant_source;\n\nbool dormant_source_valid(dormant_source_t dormant_source)\n{\n    return (dormant_source == DORMANT_SOURCE_XOSC) || (dormant_source == DORMANT_SOURCE_ROSC);\n}\n\n// In order to go into dormant mode we need to be running from a stoppable clock source:\n// either the xosc or rosc with no PLLs running. This means we disable the USB and ADC clocks\n// and all PLLs\nvoid sleep_run_from_dormant_source(dormant_source_t dormant_source)\n{\n    assert(dormant_source_valid(dormant_source));\n    _dormant_source = dormant_source;\n\n    // FIXME: Just defining average rosc freq here.\n    uint src_hz = (dormant_source == DORMANT_SOURCE_XOSC) ? XOSC_HZ : 6.5 * MHZ;\n    uint clk_ref_src = (dormant_source == DORMANT_SOURCE_XOSC) ? CLOCKS_CLK_REF_CTRL_SRC_VALUE_XOSC_CLKSRC\n                                                               : CLOCKS_CLK_REF_CTRL_SRC_VALUE_ROSC_CLKSRC_PH;\n\n    // CLK_REF = XOSC or ROSC\n    clock_configure(clk_ref, clk_ref_src,\n                    0, // No aux mux\n                    src_hz, src_hz);\n\n    // CLK SYS = CLK_REF\n    clock_configure(clk_sys, CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLK_REF,\n                    0, // Using glitchless mux\n                    src_hz, src_hz);\n\n    // CLK USB = 0MHz\n    clock_stop(clk_usb);\n\n    // CLK ADC = 0MHz\n    clock_stop(clk_adc);\n\n    // CLK RTC = ideally XOSC (12MHz) / 256 = 46875Hz but could be rosc\n    uint clk_rtc_src = (dormant_source == DORMANT_SOURCE_XOSC) ? CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_XOSC_CLKSRC\n                                                               : CLOCKS_CLK_RTC_CTRL_AUXSRC_VALUE_ROSC_CLKSRC_PH;\n\n    clock_configure(clk_rtc,\n                    0, // No GLMUX\n                    clk_rtc_src, src_hz, 46875);\n\n    // CLK PERI = clk_sys. Used as reference clock for Peripherals. No dividers so just select and enable\n    clock_configure(clk_peri, 0, CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLK_SYS, src_hz, src_hz);\n\n    pll_deinit(pll_sys);\n    pll_deinit(pll_usb);\n\n    // Assuming both xosc and rosc are running at the moment\n    if (dormant_source == DORMANT_SOURCE_XOSC) {\n        // Can disable rosc\n        rosc_disable();\n    } else {\n        // Can disable xosc\n        xosc_disable();\n    }\n\n    // Reconfigure uart with new clocks\n    /* This dones not work with our current core */\n    // setup_default_uart();\n}\n\n// Go to sleep until woken up by the RTC\nvoid sleep_goto_sleep_until(datetime_t *t, rtc_callback_t callback)\n{\n    // We should have already called the sleep_run_from_dormant_source function\n    assert(dormant_source_valid(_dormant_source));\n\n    // Turn off all clocks when in sleep mode except for RTC\n    clocks_hw->sleep_en0 = CLOCKS_SLEEP_EN0_CLK_RTC_RTC_BITS;\n    clocks_hw->sleep_en1 = 0x0;\n\n    rtc_set_alarm(t, callback);\n\n    uint save = scb_hw->scr;\n    // Enable deep sleep at the proc\n    scb_hw->scr = save | M0PLUS_SCR_SLEEPDEEP_BITS;\n\n    // Go to sleep\n    __wfi();\n}\n\nstatic void _go_dormant(void)\n{\n    assert(dormant_source_valid(_dormant_source));\n\n    if (_dormant_source == DORMANT_SOURCE_XOSC) {\n        xosc_dormant();\n    } else {\n        rosc_set_dormant();\n    }\n}\n\nvoid sleep_goto_dormant_until_pin(uint gpio_pin, bool edge, bool high)\n{\n    bool low = !high;\n    bool level = !edge;\n\n    // Configure the appropriate IRQ at IO bank 0\n    assert(gpio_pin < NUM_BANK0_GPIOS);\n\n    uint32_t event = 0;\n\n    if (level && low)\n        event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_LOW_BITS;\n    if (level && high)\n        event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_LEVEL_HIGH_BITS;\n    if (edge && high)\n        event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_HIGH_BITS;\n    if (edge && low)\n        event = IO_BANK0_DORMANT_WAKE_INTE0_GPIO0_EDGE_LOW_BITS;\n\n    gpio_set_dormant_irq_enabled(gpio_pin, event, true);\n\n    _go_dormant();\n    // Execution stops here until woken up\n\n    // Clear the irq so we can go back to dormant mode again if we want\n    gpio_acknowledge_irq(gpio_pin, event);\n}"
  },
  {
    "path": "src/platform/stm32wl/LittleFS.cpp",
    "content": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2019 hathach for Adafruit Industries\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#include \"LittleFS.h\"\n#include \"stm32wlxx_hal_flash.h\"\n\n/**********************************************************************************************************************\n * Macro definitions\n **********************************************************************************************************************/\n/** This macro is used to suppress compiler messages about a parameter not being used in a function. */\n#define LFS_UNUSED(p) (void)((p))\n\n#define STM32WL_PAGE_SIZE (FLASH_PAGE_SIZE)\n#define STM32WL_PAGE_COUNT (FLASH_PAGE_NB)\n#define STM32WL_FLASH_BASE (FLASH_BASE)\n\n/*\n * FLASH_SIZE from stm32wle5xx.h will read the actual FLASH size from the chip.\n * FLASH_END_ADDR is calculated from FLASH_SIZE.\n * Use the last 28 KiB of the FLASH\n */\n#define LFS_FLASH_TOTAL_SIZE (14 * 2048) /* needs to be a multiple of LFS_BLOCK_SIZE */\n#define LFS_BLOCK_SIZE (2048)\n#define LFS_FLASH_ADDR_END (FLASH_END_ADDR)\n#define LFS_FLASH_ADDR_BASE (LFS_FLASH_ADDR_END - LFS_FLASH_TOTAL_SIZE + 1)\n\n#if !CFG_DEBUG\n#define _LFS_DBG(fmt, ...)\n#else\n#define _LFS_DBG(fmt, ...) printf(\"%s:%d (%s): \" fmt \"\\n\", __FILE__, __LINE__, __func__, __VA_ARGS__)\n#endif\n\n//--------------------------------------------------------------------+\n// LFS Disk IO\n//--------------------------------------------------------------------+\n\nstatic int _internal_flash_read(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size)\n{\n    LFS_UNUSED(c);\n\n    if (!buffer || !size) {\n        _LFS_DBG(\"%s Invalid parameter!\\r\\n\", __func__);\n        return LFS_ERR_INVAL;\n    }\n\n    lfs_block_t address = LFS_FLASH_ADDR_BASE + (block * STM32WL_PAGE_SIZE + off);\n\n    memcpy(buffer, (void *)address, size);\n\n    return LFS_ERR_OK;\n}\n\n// Program a region in a block. The block must have previously\n// been erased. Negative error codes are propogated to the user.\n// May return LFS_ERR_CORRUPT if the block should be considered bad.\nstatic int _internal_flash_prog(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size)\n{\n    lfs_block_t address = LFS_FLASH_ADDR_BASE + (block * STM32WL_PAGE_SIZE + off);\n    HAL_StatusTypeDef hal_rc = HAL_OK;\n    uint32_t dw_count = size / 8;\n    uint64_t *bufp = (uint64_t *)buffer;\n\n    LFS_UNUSED(c);\n\n    _LFS_DBG(\"Programming %d bytes/%d doublewords at address 0x%08x/block %d, offset %d.\", size, dw_count, address, block, off);\n    if (HAL_FLASH_Unlock() != HAL_OK) {\n        return LFS_ERR_IO;\n    }\n    for (uint32_t i = 0; i < dw_count; i++) {\n        if ((address < LFS_FLASH_ADDR_BASE) || (address > LFS_FLASH_ADDR_END)) {\n            _LFS_DBG(\"Wanted to program out of bound of FLASH: 0x%08x.\\n\", address);\n            HAL_FLASH_Lock();\n            return LFS_ERR_INVAL;\n        }\n        hal_rc = HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, *bufp);\n        if (hal_rc != HAL_OK) {\n            /* Error occurred while writing data in Flash memory.\n             * User can add here some code to deal with this error.\n             */\n            _LFS_DBG(\"Program error at (0x%08x), 0x%X, error: 0x%08x\\n\", address, hal_rc, HAL_FLASH_GetError());\n        }\n        address += 8;\n        bufp += 1;\n    }\n    if (HAL_FLASH_Lock() != HAL_OK) {\n        return LFS_ERR_IO;\n    }\n\n    return hal_rc == HAL_OK ? LFS_ERR_OK : LFS_ERR_IO; // If HAL_OK, return LFS_ERR_OK, else return LFS_ERR_IO\n}\n\n// Erase a block. A block must be erased before being programmed.\n// The state of an erased block is undefined. Negative error codes\n// are propogated to the user.\n// May return LFS_ERR_CORRUPT if the block should be considered bad.\nstatic int _internal_flash_erase(const struct lfs_config *c, lfs_block_t block)\n{\n    lfs_block_t address = LFS_FLASH_ADDR_BASE + (block * STM32WL_PAGE_SIZE);\n    HAL_StatusTypeDef hal_rc;\n    FLASH_EraseInitTypeDef EraseInitStruct = {.TypeErase = FLASH_TYPEERASE_PAGES, .Page = 0, .NbPages = 1};\n    uint32_t PAGEError = 0;\n\n    LFS_UNUSED(c);\n\n    if ((address < LFS_FLASH_ADDR_BASE) || (address > LFS_FLASH_ADDR_END)) {\n        _LFS_DBG(\"Wanted to erase out of bound of FLASH: 0x%08x.\\n\", address);\n        return LFS_ERR_INVAL;\n    }\n    /* calculate the absolute page, i.e. what the ST wants */\n    EraseInitStruct.Page = (address - STM32WL_FLASH_BASE) / STM32WL_PAGE_SIZE;\n    _LFS_DBG(\"Erasing block %d at 0x%08x... \", block, address);\n    HAL_FLASH_Unlock();\n    hal_rc = HAL_FLASHEx_Erase(&EraseInitStruct, &PAGEError);\n    HAL_FLASH_Lock();\n\n    return hal_rc == HAL_OK ? LFS_ERR_OK : LFS_ERR_IO; // If HAL_OK, return LFS_ERR_OK, else return LFS_ERR_IO\n}\n\n// Sync the state of the underlying block device. Negative error codes\n// are propogated to the user.\nstatic int _internal_flash_sync(const struct lfs_config *c)\n{\n    LFS_UNUSED(c);\n    // write function performs no caching.  No need for sync.\n\n    return LFS_ERR_OK;\n}\n\nstatic struct lfs_config _InternalFSConfig = {.context = NULL,\n\n                                              .read = _internal_flash_read,\n                                              .prog = _internal_flash_prog,\n                                              .erase = _internal_flash_erase,\n                                              .sync = _internal_flash_sync,\n\n                                              .read_size = LFS_BLOCK_SIZE,\n                                              .prog_size = LFS_BLOCK_SIZE,\n                                              .block_size = LFS_BLOCK_SIZE,\n                                              .block_count = LFS_FLASH_TOTAL_SIZE / LFS_BLOCK_SIZE,\n                                              .lookahead = 128,\n\n                                              .read_buffer = NULL,\n                                              .prog_buffer = NULL,\n                                              .lookahead_buffer = NULL,\n                                              .file_buffer = NULL};\n\nLittleFS InternalFS;\n\n//--------------------------------------------------------------------+\n//\n//--------------------------------------------------------------------+\n\nLittleFS::LittleFS(void) : STM32_LittleFS(&_InternalFSConfig) {}\n\nbool LittleFS::begin(void)\n{\n    if (FLASH_BASE >= LFS_FLASH_ADDR_BASE) {\n        /* There is not enough space on this device for a filesystem. */\n        return false;\n    }\n    // failed to mount, erase all pages then format and mount again\n    if (!STM32_LittleFS::begin()) {\n        // Erase all pages of internal flash region for Filesystem.\n        for (uint32_t addr = LFS_FLASH_ADDR_BASE; addr < (LFS_FLASH_ADDR_END + 1); addr += STM32WL_PAGE_SIZE) {\n            _internal_flash_erase(&_InternalFSConfig, (addr - LFS_FLASH_ADDR_BASE) / STM32WL_PAGE_SIZE);\n        }\n\n        // lfs format\n        this->format();\n\n        // mount again if still failed, give up\n        if (!STM32_LittleFS::begin())\n            return false;\n    }\n\n    return true;\n}\n"
  },
  {
    "path": "src/platform/stm32wl/LittleFS.h",
    "content": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2019 hathach for Adafruit Industries\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#ifndef INTERNALFILESYSTEM_H_\n#define INTERNALFILESYSTEM_H_\n\n#include \"STM32_LittleFS.h\"\n\nclass LittleFS : public STM32_LittleFS\n{\n  public:\n    LittleFS(void);\n\n    // overwrite to also perform low level format (sector erase of whole flash region)\n    bool begin(void);\n};\n\nextern LittleFS InternalFS;\n\n#endif /* INTERNALFILESYSTEM_H_ */\n"
  },
  {
    "path": "src/platform/stm32wl/STM32_LittleFS.cpp",
    "content": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2019 Ha Thach for Adafruit Industries\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#include \"STM32_LittleFS.h\"\n#include <Arduino.h>\n#include <string.h>\n\n#define memclr(buffer, size) memset(buffer, 0, size)\n#define varclr(_var) memclr(_var, sizeof(*(_var)))\n\nusing namespace STM32_LittleFS_Namespace;\n\n//--------------------------------------------------------------------+\n// Implementation\n//--------------------------------------------------------------------+\n\nSTM32_LittleFS::STM32_LittleFS(void) : STM32_LittleFS(NULL) {}\n\nSTM32_LittleFS::STM32_LittleFS(struct lfs_config *cfg)\n{\n    varclr(&_lfs);\n    _lfs_cfg = cfg;\n    _mounted = false;\n}\n\nSTM32_LittleFS::~STM32_LittleFS() {}\n\n// Initialize and mount the file system\n// Return true if mounted successfully else probably corrupted.\n// User should format the disk and try again\nbool STM32_LittleFS::begin(struct lfs_config *cfg)\n{\n    _lockFS();\n\n    bool ret;\n    // not a loop, just an quick way to short-circuit on error\n    do {\n        if (_mounted) {\n            ret = true;\n            break;\n        }\n        if (cfg) {\n            _lfs_cfg = cfg;\n        }\n        if (nullptr == _lfs_cfg) {\n            ret = false;\n            break;\n        }\n        // actually attempt to mount, and log error if one occurs\n        int err = lfs_mount(&_lfs, _lfs_cfg);\n        PRINT_LFS_ERR(err);\n        _mounted = (err == LFS_ERR_OK);\n        ret = _mounted;\n    } while (0);\n\n    _unlockFS();\n    return ret;\n}\n\n// Tear down and unmount file system\nvoid STM32_LittleFS::end(void)\n{\n    _lockFS();\n\n    if (_mounted) {\n        _mounted = false;\n        int err = lfs_unmount(&_lfs);\n        PRINT_LFS_ERR(err);\n        (void)err;\n    }\n\n    _unlockFS();\n}\n\nbool STM32_LittleFS::format(void)\n{\n    _lockFS();\n\n    int err = LFS_ERR_OK;\n    bool attemptMount = _mounted;\n    // not a loop, just an quick way to short-circuit on error\n    do {\n        // if already mounted: umount first -> format -> remount\n        if (_mounted) {\n            _mounted = false;\n            err = lfs_unmount(&_lfs);\n            if (LFS_ERR_OK != err) {\n                PRINT_LFS_ERR(err);\n                break;\n            }\n        }\n        err = lfs_format(&_lfs, _lfs_cfg);\n        if (LFS_ERR_OK != err) {\n            PRINT_LFS_ERR(err);\n            break;\n        }\n\n        if (attemptMount) {\n            err = lfs_mount(&_lfs, _lfs_cfg);\n            if (LFS_ERR_OK != err) {\n                PRINT_LFS_ERR(err);\n                break;\n            }\n            _mounted = true;\n        }\n        // success!\n    } while (0);\n\n    _unlockFS();\n    return LFS_ERR_OK == err;\n}\n\n// Open a file or folder\nSTM32_LittleFS_Namespace::File STM32_LittleFS::open(char const *filepath, uint8_t mode)\n{\n    // No lock is required here ... the File() object will synchronize with the mutex provided\n    return STM32_LittleFS_Namespace::File(filepath, mode, *this);\n}\n\n// Check if file or folder exists\nbool STM32_LittleFS::exists(char const *filepath)\n{\n    struct lfs_info info;\n    _lockFS();\n\n    bool ret = (0 == lfs_stat(&_lfs, filepath, &info));\n\n    _unlockFS();\n    return ret;\n}\n\n// Create a directory, create intermediate parent if needed\nbool STM32_LittleFS::mkdir(char const *filepath)\n{\n    bool ret = true;\n    const char *slash = filepath;\n    if (slash[0] == '/')\n        slash++; // skip root '/'\n\n    _lockFS();\n\n    // make intermediate parent directory(ies)\n    while (NULL != (slash = strchr(slash, '/'))) {\n        char parent[slash - filepath + 1] = {0};\n        memcpy(parent, filepath, slash - filepath);\n\n        int rc = lfs_mkdir(&_lfs, parent);\n        if (rc != LFS_ERR_OK && rc != LFS_ERR_EXIST) {\n            PRINT_LFS_ERR(rc);\n            ret = false;\n            break;\n        }\n        slash++;\n    }\n    // make the final requested directory\n    if (ret) {\n        int rc = lfs_mkdir(&_lfs, filepath);\n        if (rc != LFS_ERR_OK && rc != LFS_ERR_EXIST) {\n            PRINT_LFS_ERR(rc);\n            ret = false;\n        }\n    }\n\n    _unlockFS();\n    return ret;\n}\n\n// Remove a file\nbool STM32_LittleFS::remove(char const *filepath)\n{\n    _lockFS();\n\n    int err = lfs_remove(&_lfs, filepath);\n    PRINT_LFS_ERR(err);\n\n    _unlockFS();\n    return LFS_ERR_OK == err;\n}\n\n// Rename a file\nbool STM32_LittleFS::rename(char const *oldfilepath, char const *newfilepath)\n{\n    _lockFS();\n\n    int err = lfs_rename(&_lfs, oldfilepath, newfilepath);\n    PRINT_LFS_ERR(err);\n\n    _unlockFS();\n    return LFS_ERR_OK == err;\n}\n\n// Remove a folder\nbool STM32_LittleFS::rmdir(char const *filepath)\n{\n    _lockFS();\n\n    int err = lfs_remove(&_lfs, filepath);\n    PRINT_LFS_ERR(err);\n\n    _unlockFS();\n    return LFS_ERR_OK == err;\n}\n\n// Remove a folder recursively\nbool STM32_LittleFS::rmdir_r(char const *filepath)\n{\n    /* lfs is modified to remove non-empty folder,\n     According to below issue, comment these 2 line won't corrupt filesystem\n     at least when using LFS v1.  If moving to LFS v2, see tracked issue\n     to see if issues (such as the orphans in threaded linked list) are resolved.\n     https://github.com/ARMmbed/littlefs/issues/43\n     */\n    _lockFS();\n\n    int err = lfs_remove(&_lfs, filepath);\n    PRINT_LFS_ERR(err);\n\n    _unlockFS();\n    return LFS_ERR_OK == err;\n}\n\n//------------- Debug -------------//\n#if CFG_DEBUG\n\nconst char *dbg_strerr_lfs(int32_t err)\n{\n    switch (err) {\n    case LFS_ERR_OK:\n        return \"LFS_ERR_OK\";\n    case LFS_ERR_IO:\n        return \"LFS_ERR_IO\";\n    case LFS_ERR_CORRUPT:\n        return \"LFS_ERR_CORRUPT\";\n    case LFS_ERR_NOENT:\n        return \"LFS_ERR_NOENT\";\n    case LFS_ERR_EXIST:\n        return \"LFS_ERR_EXIST\";\n    case LFS_ERR_NOTDIR:\n        return \"LFS_ERR_NOTDIR\";\n    case LFS_ERR_ISDIR:\n        return \"LFS_ERR_ISDIR\";\n    case LFS_ERR_NOTEMPTY:\n        return \"LFS_ERR_NOTEMPTY\";\n    case LFS_ERR_BADF:\n        return \"LFS_ERR_BADF\";\n    case LFS_ERR_INVAL:\n        return \"LFS_ERR_INVAL\";\n    case LFS_ERR_NOSPC:\n        return \"LFS_ERR_NOSPC\";\n    case LFS_ERR_NOMEM:\n        return \"LFS_ERR_NOMEM\";\n\n    default:\n        static char errcode[10];\n        sprintf(errcode, \"%ld\", err);\n        return errcode;\n    }\n\n    return NULL;\n}\n\n#endif\n"
  },
  {
    "path": "src/platform/stm32wl/STM32_LittleFS.h",
    "content": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2019 Ha Thach for Adafruit Industries\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#ifndef STM32_LITTLEFS_H_\n#define STM32_LITTLEFS_H_\n\n#include <Stream.h>\n\n// Internal Flash uses ARM Little FileSystem\n// https://github.com/ARMmbed/littlefs\n#include \"../../freertosinc.h\" // tied to FreeRTOS for serialization\n#include \"STM32_LittleFS_File.h\"\n#include \"littlefs/lfs.h\"\n\nclass STM32_LittleFS\n{\n  public:\n    STM32_LittleFS(void);\n    explicit STM32_LittleFS(struct lfs_config *cfg);\n    virtual ~STM32_LittleFS();\n\n    bool begin(struct lfs_config *cfg = NULL);\n    void end(void);\n\n    // Open the specified file/directory with the supplied mode (e.g. read or\n    // write, etc). Returns a File object for interacting with the file.\n    // Note that currently only one file can be open at a time.\n    STM32_LittleFS_Namespace::File open(char const *filename, uint8_t mode = STM32_LittleFS_Namespace::FILE_O_READ);\n\n    // Methods to determine if the requested file path exists.\n    bool exists(char const *filepath);\n\n    // Create the requested directory hierarchy--if intermediate directories\n    // do not exist they will be created.\n    bool mkdir(char const *filepath);\n\n    // Delete the file.\n    bool remove(char const *filepath);\n\n    // Rename the file.\n    bool rename(char const *oldfilepath, char const *newfilepath);\n\n    // Delete a folder (must be empty)\n    bool rmdir(char const *filepath);\n\n    // Delete a folder (recursively)\n    bool rmdir_r(char const *filepath);\n\n    // format file system\n    bool format(void);\n\n    /*------------------------------------------------------------------*/\n    /* INTERNAL USAGE ONLY\n     * Although declare as public, it is meant to be invoked by internal\n     * code. User should not call these directly\n     *------------------------------------------------------------------*/\n    lfs_t *_getFS(void) { return &_lfs; }\n    void _lockFS(void)\n    { /* no-op */\n    }\n    void _unlockFS(void)\n    { /* no-op */\n    }\n\n  protected:\n    bool _mounted;\n    struct lfs_config *_lfs_cfg;\n    lfs_t _lfs;\n};\n\n#if !CFG_DEBUG\n#define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, NULL)\n#define PRINT_LFS_ERR(_err)\n#else\n#define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, dbg_strerr_lfs)\n#define PRINT_LFS_ERR(_err)                                                                                                      \\\n    do {                                                                                                                         \\\n        if (_err) {                                                                                                              \\\n            printf(\"%s:%d, LFS error: %d\\n\", __FILE__, __LINE__, _err);                                                          \\\n        }                                                                                                                        \\\n    } while (0) // LFS_ERR are of type int, VERIFY_MESS expects long_int\n\nconst char *dbg_strerr_lfs(int32_t err);\n#endif\n\n#endif /* STM32_LITTLEFS_H_ */\n"
  },
  {
    "path": "src/platform/stm32wl/STM32_LittleFS_File.cpp",
    "content": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2019 Ha Thach for Adafruit Industries\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#include \"STM32_LittleFS.h\"\n#include <Arduino.h>\n\n#define rtos_malloc malloc\n#define rtos_free free\n\n//--------------------------------------------------------------------+\n// MACRO TYPEDEF CONSTANT ENUM DECLARATION\n//--------------------------------------------------------------------+\n\nusing namespace STM32_LittleFS_Namespace;\n\nFile::File(STM32_LittleFS &fs)\n{\n    _fs = &fs;\n    _is_dir = false;\n    _name[0] = 0;\n    _name[LFS_NAME_MAX] = 0;\n    _dir_path = NULL;\n\n    _dir = NULL;\n    _file = NULL;\n}\n\nFile::File(char const *filename, uint8_t mode, STM32_LittleFS &fs) : File(fs)\n{\n    // public constructor calls public API open(), which will obtain the mutex\n    this->open(filename, mode);\n}\n\nbool File::_open_file(char const *filepath, uint8_t mode)\n{\n    int flags = (mode == FILE_O_READ) ? LFS_O_RDONLY : (mode == FILE_O_WRITE) ? (LFS_O_RDWR | LFS_O_CREAT) : 0;\n\n    if (flags) {\n        _file = (lfs_file_t *)rtos_malloc(sizeof(lfs_file_t));\n        if (!_file)\n            return false;\n\n        int rc = lfs_file_open(_fs->_getFS(), _file, filepath, flags);\n\n        if (rc) {\n            // failed to open\n            PRINT_LFS_ERR(rc);\n            // free memory\n            rtos_free(_file);\n            _file = NULL;\n            return false;\n        }\n\n        // move to end of file\n        if (mode == FILE_O_WRITE)\n            lfs_file_seek(_fs->_getFS(), _file, 0, LFS_SEEK_END);\n\n        _is_dir = false;\n    }\n\n    return true;\n}\n\nbool File::_open_dir(char const *filepath)\n{\n    _dir = (lfs_dir_t *)rtos_malloc(sizeof(lfs_dir_t));\n    if (!_dir)\n        return false;\n\n    int rc = lfs_dir_open(_fs->_getFS(), _dir, filepath);\n\n    if (rc) {\n        // failed to open\n        PRINT_LFS_ERR(rc);\n        // free memory\n        rtos_free(_dir);\n        _dir = NULL;\n        return false;\n    }\n\n    _is_dir = true;\n\n    _dir_path = (char *)rtos_malloc(strlen(filepath) + 1);\n    strcpy(_dir_path, filepath);\n\n    return true;\n}\n\nbool File::open(char const *filepath, uint8_t mode)\n{\n    bool ret = false;\n    _fs->_lockFS();\n\n    ret = this->_open(filepath, mode);\n\n    _fs->_unlockFS();\n    return ret;\n}\n\nbool File::_open(char const *filepath, uint8_t mode)\n{\n    bool ret = false;\n\n    // close if currently opened\n    if (this->isOpen())\n        _close();\n\n    struct lfs_info info;\n    int rc = lfs_stat(_fs->_getFS(), filepath, &info);\n\n    if (LFS_ERR_OK == rc) {\n        // file existed, open file or directory accordingly\n        ret = (info.type == LFS_TYPE_REG) ? _open_file(filepath, mode) : _open_dir(filepath);\n    } else if (LFS_ERR_NOENT == rc) {\n        // file not existed, only proceed with FILE_O_WRITE mode\n        if (mode == FILE_O_WRITE)\n            ret = _open_file(filepath, mode);\n    } else {\n        PRINT_LFS_ERR(rc);\n    }\n\n    // save bare file name\n    if (ret) {\n        char const *splash = strrchr(filepath, '/');\n        strncpy(_name, splash ? (splash + 1) : filepath, LFS_NAME_MAX);\n    }\n    return ret;\n}\n\nsize_t File::write(uint8_t ch)\n{\n    return write(&ch, 1);\n}\n\nsize_t File::write(uint8_t const *buf, size_t size)\n{\n    lfs_ssize_t wrcount = 0;\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        wrcount = lfs_file_write(_fs->_getFS(), _file, buf, size);\n        if (wrcount < 0) {\n            wrcount = 0;\n        }\n    }\n\n    _fs->_unlockFS();\n    return wrcount;\n}\n\nint File::read(void)\n{\n    // this thin wrapper relies on called function to synchronize\n    int ret = -1;\n    uint8_t ch;\n    if (read(&ch, 1) > 0) {\n        ret = static_cast<int>(ch);\n    }\n    return ret;\n}\n\nint File::read(void *buf, uint16_t nbyte)\n{\n    int ret = 0;\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        ret = lfs_file_read(_fs->_getFS(), _file, buf, nbyte);\n    }\n\n    _fs->_unlockFS();\n    return ret;\n}\n\nint File::peek(void)\n{\n    int ret = -1;\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        uint32_t pos = lfs_file_tell(_fs->_getFS(), _file);\n        uint8_t ch = 0;\n        if (lfs_file_read(_fs->_getFS(), _file, &ch, 1) > 0) {\n            ret = static_cast<int>(ch);\n        }\n        (void)lfs_file_seek(_fs->_getFS(), _file, pos, LFS_SEEK_SET);\n    }\n\n    _fs->_unlockFS();\n    return ret;\n}\n\nint File::available(void)\n{\n    int ret = 0;\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        uint32_t file_size = lfs_file_size(_fs->_getFS(), _file);\n        uint32_t pos = lfs_file_tell(_fs->_getFS(), _file);\n        ret = file_size - pos;\n    }\n\n    _fs->_unlockFS();\n    return ret;\n}\n\nbool File::seek(uint32_t pos)\n{\n    bool ret = false;\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        ret = lfs_file_seek(_fs->_getFS(), _file, pos, LFS_SEEK_SET) >= 0;\n    }\n\n    _fs->_unlockFS();\n    return ret;\n}\n\nuint32_t File::position(void)\n{\n    uint32_t ret = 0;\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        ret = lfs_file_tell(_fs->_getFS(), _file);\n    }\n\n    _fs->_unlockFS();\n    return ret;\n}\n\nuint32_t File::size(void)\n{\n    uint32_t ret = 0;\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        ret = lfs_file_size(_fs->_getFS(), _file);\n    }\n\n    _fs->_unlockFS();\n    return ret;\n}\n\nbool File::truncate(uint32_t pos)\n{\n    int32_t ret = LFS_ERR_ISDIR;\n    _fs->_lockFS();\n    if (!this->_is_dir) {\n        ret = lfs_file_truncate(_fs->_getFS(), _file, pos);\n    }\n    _fs->_unlockFS();\n    return (ret == 0);\n}\n\nbool File::truncate(void)\n{\n    int32_t ret = LFS_ERR_ISDIR;\n    _fs->_lockFS();\n    if (!this->_is_dir) {\n        uint32_t pos = lfs_file_tell(_fs->_getFS(), _file);\n        ret = lfs_file_truncate(_fs->_getFS(), _file, pos);\n    }\n    _fs->_unlockFS();\n    return (ret == 0);\n}\n\nvoid File::flush(void)\n{\n    _fs->_lockFS();\n\n    if (!this->_is_dir) {\n        lfs_file_sync(_fs->_getFS(), _file);\n    }\n\n    _fs->_unlockFS();\n    return;\n}\n\nvoid File::close(void)\n{\n    _fs->_lockFS();\n    this->_close();\n    _fs->_unlockFS();\n}\n\nvoid File::_close(void)\n{\n    if (this->isOpen()) {\n        if (this->_is_dir) {\n            lfs_dir_close(_fs->_getFS(), _dir);\n            rtos_free(_dir);\n            _dir = NULL;\n\n            if (this->_dir_path)\n                rtos_free(_dir_path);\n            _dir_path = NULL;\n        } else {\n            lfs_file_close(this->_fs->_getFS(), _file);\n            rtos_free(_file);\n            _file = NULL;\n        }\n    }\n}\n\nFile::operator bool(void)\n{\n    return isOpen();\n}\n\nbool File::isOpen(void)\n{\n    return (_file != NULL) || (_dir != NULL);\n}\n\n// WARNING -- although marked as `const`, the values pointed\n//            to may change.  For example, if the same File\n//            object has `open()` called with a different\n//            file or directory name, this same pointer will\n//            suddenly (unexpectedly?) have different values.\nchar const *File::name(void)\n{\n    return this->_name;\n}\n\nbool File::isDirectory(void)\n{\n    return this->_is_dir;\n}\n\nFile File::openNextFile(uint8_t mode)\n{\n    _fs->_lockFS();\n\n    File ret(*_fs);\n    if (this->_is_dir) {\n        struct lfs_info info;\n        int rc;\n\n        // lfs_dir_read returns 0 when reaching end of directory, 1 if found an entry\n        // Skip the \".\" and \"..\" entries ...\n        do {\n            rc = lfs_dir_read(_fs->_getFS(), _dir, &info);\n        } while (rc == 1 && (!strcmp(\".\", info.name) || !strcmp(\"..\", info.name)));\n\n        if (rc == 1) {\n            // string cat name with current folder\n            char filepath[strlen(_dir_path) + 1 + strlen(info.name) + 1]; // potential for significant stack usage\n            strcpy(filepath, _dir_path);\n            if (!(_dir_path[0] == '/' && _dir_path[1] == 0))\n                strcat(filepath, \"/\"); // only add '/' if cwd is not root\n            strcat(filepath, info.name);\n\n            (void)ret._open(filepath, mode); // return value is ignored ... caller is expected to check isOpened()\n        } else if (rc < 0) {\n            PRINT_LFS_ERR(rc);\n        }\n    }\n    _fs->_unlockFS();\n    return ret;\n}\n\nvoid File::rewindDirectory(void)\n{\n    _fs->_lockFS();\n    if (this->_is_dir) {\n        lfs_dir_rewind(_fs->_getFS(), _dir);\n    }\n    _fs->_unlockFS();\n}\n"
  },
  {
    "path": "src/platform/stm32wl/STM32_LittleFS_File.h",
    "content": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2019 Ha Thach for Adafruit Industries\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#ifndef STM32_LITTLEFS_FILE_H_\n#define STM32_LITTLEFS_FILE_H_\n\n#include \"littlefs/lfs.h\"\n\n// Forward declaration\nclass STM32_LittleFS;\n\nnamespace STM32_LittleFS_Namespace\n{\n\n// avoid conflict with other FileSystem FILE_READ/FILE_WRITE\nenum {\n    FILE_O_READ = 0,\n    FILE_O_WRITE = 1,\n};\n\nclass File : public Stream\n{\n  public:\n    explicit File(STM32_LittleFS &fs);\n    File(char const *filename, uint8_t mode, STM32_LittleFS &fs);\n\n  public:\n    bool open(char const *filename, uint8_t mode);\n\n    //------------- Stream API -------------//\n    virtual size_t write(uint8_t ch);\n    virtual size_t write(uint8_t const *buf, size_t size);\n    size_t write(const char *str)\n    {\n        if (str == NULL)\n            return 0;\n        return write((const uint8_t *)str, strlen(str));\n    }\n    size_t write(const char *buffer, size_t size) { return write((const uint8_t *)buffer, size); }\n\n    virtual int read(void);\n    int read(void *buf, uint16_t nbyte);\n\n    virtual int peek(void);\n    virtual int available(void);\n    virtual void flush(void);\n\n    bool seek(uint32_t pos);\n    uint32_t position(void);\n    uint32_t size(void);\n\n    bool truncate(uint32_t pos);\n    bool truncate(void);\n\n    void close(void);\n\n    operator bool(void);\n\n    bool isOpen(void);\n    char const *name(void);\n\n    bool isDirectory(void);\n    File openNextFile(uint8_t mode = FILE_O_READ);\n    void rewindDirectory(void);\n\n  private:\n    STM32_LittleFS *_fs;\n\n    bool _is_dir;\n\n    union {\n        lfs_file_t *_file;\n        lfs_dir_t *_dir;\n    };\n\n    char *_dir_path;\n    char _name[LFS_NAME_MAX + 1];\n\n    bool _open(char const *filepath, uint8_t mode);\n    bool _open_file(char const *filepath, uint8_t mode);\n    bool _open_dir(char const *filepath);\n    void _close(void);\n};\n\n} // namespace STM32_LittleFS_Namespace\n\n#endif /* STM32_LITTLEFS_FILE_H_ */\n"
  },
  {
    "path": "src/platform/stm32wl/architecture.h",
    "content": "#pragma once\n\n#define ARCH_STM32WL\n\n//\n// defaults for STM32WL architecture\n//\n\n#ifndef HAS_RADIO\n#define HAS_RADIO 1\n#endif\n#ifndef HAS_TELEMETRY\n#define HAS_TELEMETRY 1\n#endif\n#ifndef HAS_WIRE\n#define HAS_WIRE 1\n#endif\n\n//\n// set HW_VENDOR\n//\n#ifdef _VARIANT_WIOE5_\n#define HW_VENDOR meshtastic_HardwareModel_WIO_E5\n#elif defined(_VARIANT_RAK3172_)\n#define HW_VENDOR meshtastic_HardwareModel_RAK3172\n#else\n#define HW_VENDOR meshtastic_HardwareModel_PRIVATE_HW\n#endif\n\n/* virtual pins */\n#define SX126X_CS 1000\n#define SX126X_DIO1 1001\n#define SX126X_RESET 1003\n#define SX126X_BUSY 1004\n\n#if !defined(DEBUG_MUTE) && !defined(PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF)\n#error                                                                                                                           \\\n    \"You MUST enable PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF if debug prints are enabled. printf will print uninitialized garbage instead of floats.\"\n#endif"
  },
  {
    "path": "src/platform/stm32wl/littlefs/lfs.c",
    "content": "/*\n * The little filesystem\n *\n * Copyright (c) 2017, Arm Limited. All rights reserved.\n * SPDX-License-Identifier: BSD-3-Clause\n */\n#include \"lfs.h\"\n#include \"lfs_util.h\"\n\n#include <inttypes.h>\n\n/// Caching block device operations ///\nstatic int lfs_cache_read(lfs_t *lfs, lfs_cache_t *rcache, const lfs_cache_t *pcache, lfs_block_t block, lfs_off_t off,\n                          void *buffer, lfs_size_t size)\n{\n    uint8_t *data = buffer;\n    LFS_ASSERT(block < lfs->cfg->block_count);\n\n    while (size > 0) {\n        if (pcache && block == pcache->block && off >= pcache->off && off < pcache->off + lfs->cfg->prog_size) {\n            // is already in pcache?\n            lfs_size_t diff = lfs_min(size, lfs->cfg->prog_size - (off - pcache->off));\n            memcpy(data, &pcache->buffer[off - pcache->off], diff);\n\n            data += diff;\n            off += diff;\n            size -= diff;\n            continue;\n        }\n\n        if (block == rcache->block && off >= rcache->off && off < rcache->off + lfs->cfg->read_size) {\n            // is already in rcache?\n            lfs_size_t diff = lfs_min(size, lfs->cfg->read_size - (off - rcache->off));\n            memcpy(data, &rcache->buffer[off - rcache->off], diff);\n\n            data += diff;\n            off += diff;\n            size -= diff;\n            continue;\n        }\n\n        if (off % lfs->cfg->read_size == 0 && size >= lfs->cfg->read_size) {\n            // bypass cache?\n            lfs_size_t diff = size - (size % lfs->cfg->read_size);\n            int err = lfs->cfg->read(lfs->cfg, block, off, data, diff);\n            if (err) {\n                return err;\n            }\n\n            data += diff;\n            off += diff;\n            size -= diff;\n            continue;\n        }\n\n        // load to cache, first condition can no longer fail\n        rcache->block = block;\n        rcache->off = off - (off % lfs->cfg->read_size);\n        int err = lfs->cfg->read(lfs->cfg, rcache->block, rcache->off, rcache->buffer, lfs->cfg->read_size);\n        if (err) {\n            return err;\n        }\n    }\n\n    return 0;\n}\n\nstatic int lfs_cache_cmp(lfs_t *lfs, lfs_cache_t *rcache, const lfs_cache_t *pcache, lfs_block_t block, lfs_off_t off,\n                         const void *buffer, lfs_size_t size)\n{\n    const uint8_t *data = buffer;\n\n    for (lfs_off_t i = 0; i < size; i++) {\n        uint8_t c;\n        int err = lfs_cache_read(lfs, rcache, pcache, block, off + i, &c, 1);\n        if (err) {\n            return err;\n        }\n\n        if (c != data[i]) {\n            return false;\n        }\n    }\n\n    return true;\n}\n\nstatic int lfs_cache_crc(lfs_t *lfs, lfs_cache_t *rcache, const lfs_cache_t *pcache, lfs_block_t block, lfs_off_t off,\n                         lfs_size_t size, uint32_t *crc)\n{\n    for (lfs_off_t i = 0; i < size; i++) {\n        uint8_t c;\n        int err = lfs_cache_read(lfs, rcache, pcache, block, off + i, &c, 1);\n        if (err) {\n            return err;\n        }\n\n        lfs_crc(crc, &c, 1);\n    }\n\n    return 0;\n}\n\nstatic inline void lfs_cache_drop(lfs_t *lfs, lfs_cache_t *rcache)\n{\n    // do not zero, cheaper if cache is readonly or only going to be\n    // written with identical data (during relocates)\n    (void)lfs;\n    rcache->block = 0xffffffff;\n}\n\nstatic inline void lfs_cache_zero(lfs_t *lfs, lfs_cache_t *pcache)\n{\n    // zero to avoid information leak\n    memset(pcache->buffer, 0xff, lfs->cfg->prog_size);\n    pcache->block = 0xffffffff;\n}\n\nstatic int lfs_cache_flush(lfs_t *lfs, lfs_cache_t *pcache, lfs_cache_t *rcache)\n{\n    if (pcache->block != 0xffffffff) {\n        int err = lfs->cfg->prog(lfs->cfg, pcache->block, pcache->off, pcache->buffer, lfs->cfg->prog_size);\n        if (err) {\n            return err;\n        }\n\n        if (rcache) {\n            int res = lfs_cache_cmp(lfs, rcache, NULL, pcache->block, pcache->off, pcache->buffer, lfs->cfg->prog_size);\n            if (res < 0) {\n                return res;\n            }\n\n            if (!res) {\n                return LFS_ERR_CORRUPT;\n            }\n        }\n\n        lfs_cache_zero(lfs, pcache);\n    }\n\n    return 0;\n}\n\nstatic int lfs_cache_prog(lfs_t *lfs, lfs_cache_t *pcache, lfs_cache_t *rcache, lfs_block_t block, lfs_off_t off,\n                          const void *buffer, lfs_size_t size)\n{\n    const uint8_t *data = buffer;\n    LFS_ASSERT(block < lfs->cfg->block_count);\n\n    while (size > 0) {\n        if (block == pcache->block && off >= pcache->off && off < pcache->off + lfs->cfg->prog_size) {\n            // is already in pcache?\n            lfs_size_t diff = lfs_min(size, lfs->cfg->prog_size - (off - pcache->off));\n            memcpy(&pcache->buffer[off - pcache->off], data, diff);\n\n            data += diff;\n            off += diff;\n            size -= diff;\n\n            if (off % lfs->cfg->prog_size == 0) {\n                // eagerly flush out pcache if we fill up\n                int err = lfs_cache_flush(lfs, pcache, rcache);\n                if (err) {\n                    return err;\n                }\n            }\n\n            continue;\n        }\n\n        // pcache must have been flushed, either by programming and\n        // entire block or manually flushing the pcache\n        LFS_ASSERT(pcache->block == 0xffffffff);\n\n        if (off % lfs->cfg->prog_size == 0 && size >= lfs->cfg->prog_size) {\n            // bypass pcache?\n            lfs_size_t diff = size - (size % lfs->cfg->prog_size);\n            int err = lfs->cfg->prog(lfs->cfg, block, off, data, diff);\n            if (err) {\n                return err;\n            }\n\n            if (rcache) {\n                int res = lfs_cache_cmp(lfs, rcache, NULL, block, off, data, diff);\n                if (res < 0) {\n                    return res;\n                }\n\n                if (!res) {\n                    return LFS_ERR_CORRUPT;\n                }\n            }\n\n            data += diff;\n            off += diff;\n            size -= diff;\n            continue;\n        }\n\n        // prepare pcache, first condition can no longer fail\n        pcache->block = block;\n        pcache->off = off - (off % lfs->cfg->prog_size);\n    }\n\n    return 0;\n}\n\n/// General lfs block device operations ///\nstatic int lfs_bd_read(lfs_t *lfs, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size)\n{\n    // if we ever do more than writes to alternating pairs,\n    // this may need to consider pcache\n    return lfs_cache_read(lfs, &lfs->rcache, NULL, block, off, buffer, size);\n}\n\nstatic int lfs_bd_prog(lfs_t *lfs, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size)\n{\n    return lfs_cache_prog(lfs, &lfs->pcache, NULL, block, off, buffer, size);\n}\n\nstatic int lfs_bd_cmp(lfs_t *lfs, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size)\n{\n    return lfs_cache_cmp(lfs, &lfs->rcache, NULL, block, off, buffer, size);\n}\n\nstatic int lfs_bd_crc(lfs_t *lfs, lfs_block_t block, lfs_off_t off, lfs_size_t size, uint32_t *crc)\n{\n    return lfs_cache_crc(lfs, &lfs->rcache, NULL, block, off, size, crc);\n}\n\nstatic int lfs_bd_erase(lfs_t *lfs, lfs_block_t block)\n{\n    return lfs->cfg->erase(lfs->cfg, block);\n}\n\nstatic int lfs_bd_sync(lfs_t *lfs)\n{\n    lfs_cache_drop(lfs, &lfs->rcache);\n\n    int err = lfs_cache_flush(lfs, &lfs->pcache, NULL);\n    if (err) {\n        return err;\n    }\n\n    return lfs->cfg->sync(lfs->cfg);\n}\n\n/// Internal operations predeclared here ///\nint lfs_traverse(lfs_t *lfs, int (*cb)(void *, lfs_block_t), void *data);\nstatic int lfs_pred(lfs_t *lfs, const lfs_block_t dir[2], lfs_dir_t *pdir);\nstatic int lfs_parent(lfs_t *lfs, const lfs_block_t dir[2], lfs_dir_t *parent, lfs_entry_t *entry);\nstatic int lfs_moved(lfs_t *lfs, const void *e);\nstatic int lfs_relocate(lfs_t *lfs, const lfs_block_t oldpair[2], const lfs_block_t newpair[2]);\nint lfs_deorphan(lfs_t *lfs);\n\n/// Block allocator ///\nstatic int lfs_alloc_lookahead(void *p, lfs_block_t block)\n{\n    lfs_t *lfs = p;\n\n    lfs_block_t off = ((block - lfs->free.off) + lfs->cfg->block_count) % lfs->cfg->block_count;\n\n    if (off < lfs->free.size) {\n        lfs->free.buffer[off / 32] |= 1U << (off % 32);\n    }\n\n    return 0;\n}\n\nstatic int lfs_alloc(lfs_t *lfs, lfs_block_t *block)\n{\n    while (true) {\n        while (lfs->free.i != lfs->free.size) {\n            lfs_block_t off = lfs->free.i;\n            lfs->free.i += 1;\n            lfs->free.ack -= 1;\n\n            if (!(lfs->free.buffer[off / 32] & (1U << (off % 32)))) {\n                // found a free block\n                *block = (lfs->free.off + off) % lfs->cfg->block_count;\n\n                // eagerly find next off so an alloc ack can\n                // discredit old lookahead blocks\n                while (lfs->free.i != lfs->free.size && (lfs->free.buffer[lfs->free.i / 32] & (1U << (lfs->free.i % 32)))) {\n                    lfs->free.i += 1;\n                    lfs->free.ack -= 1;\n                }\n\n                return 0;\n            }\n        }\n\n        // check if we have looked at all blocks since last ack\n        if (lfs->free.ack == 0) {\n            LFS_WARN(\"No more free space %\" PRIu32, lfs->free.i + lfs->free.off);\n            return LFS_ERR_NOSPC;\n        }\n\n        lfs->free.off = (lfs->free.off + lfs->free.size) % lfs->cfg->block_count;\n        lfs->free.size = lfs_min(lfs->cfg->lookahead, lfs->free.ack);\n        lfs->free.i = 0;\n\n        // find mask of free blocks from tree\n        memset(lfs->free.buffer, 0, lfs->cfg->lookahead / 8);\n        int err = lfs_traverse(lfs, lfs_alloc_lookahead, lfs);\n        if (err) {\n            return err;\n        }\n    }\n}\n\nstatic void lfs_alloc_ack(lfs_t *lfs)\n{\n    lfs->free.ack = lfs->cfg->block_count;\n}\n\n/// Endian swapping functions ///\nstatic void lfs_dir_fromle32(struct lfs_disk_dir *d)\n{\n    d->rev = lfs_fromle32(d->rev);\n    d->size = lfs_fromle32(d->size);\n    d->tail[0] = lfs_fromle32(d->tail[0]);\n    d->tail[1] = lfs_fromle32(d->tail[1]);\n}\n\nstatic void lfs_dir_tole32(struct lfs_disk_dir *d)\n{\n    d->rev = lfs_tole32(d->rev);\n    d->size = lfs_tole32(d->size);\n    d->tail[0] = lfs_tole32(d->tail[0]);\n    d->tail[1] = lfs_tole32(d->tail[1]);\n}\n\nstatic void lfs_entry_fromle32(struct lfs_disk_entry *d)\n{\n    d->u.dir[0] = lfs_fromle32(d->u.dir[0]);\n    d->u.dir[1] = lfs_fromle32(d->u.dir[1]);\n}\n\nstatic void lfs_entry_tole32(struct lfs_disk_entry *d)\n{\n    d->u.dir[0] = lfs_tole32(d->u.dir[0]);\n    d->u.dir[1] = lfs_tole32(d->u.dir[1]);\n}\n\nstatic void lfs_superblock_fromle32(struct lfs_disk_superblock *d)\n{\n    d->root[0] = lfs_fromle32(d->root[0]);\n    d->root[1] = lfs_fromle32(d->root[1]);\n    d->block_size = lfs_fromle32(d->block_size);\n    d->block_count = lfs_fromle32(d->block_count);\n    d->version = lfs_fromle32(d->version);\n}\n\nstatic void lfs_superblock_tole32(struct lfs_disk_superblock *d)\n{\n    d->root[0] = lfs_tole32(d->root[0]);\n    d->root[1] = lfs_tole32(d->root[1]);\n    d->block_size = lfs_tole32(d->block_size);\n    d->block_count = lfs_tole32(d->block_count);\n    d->version = lfs_tole32(d->version);\n}\n\n/// Metadata pair and directory operations ///\nstatic inline void lfs_pairswap(lfs_block_t pair[2])\n{\n    lfs_block_t t = pair[0];\n    pair[0] = pair[1];\n    pair[1] = t;\n}\n\nstatic inline bool lfs_pairisnull(const lfs_block_t pair[2])\n{\n    return pair[0] == 0xffffffff || pair[1] == 0xffffffff;\n}\n\nstatic inline int lfs_paircmp(const lfs_block_t paira[2], const lfs_block_t pairb[2])\n{\n    return !(paira[0] == pairb[0] || paira[1] == pairb[1] || paira[0] == pairb[1] || paira[1] == pairb[0]);\n}\n\nstatic inline bool lfs_pairsync(const lfs_block_t paira[2], const lfs_block_t pairb[2])\n{\n    return (paira[0] == pairb[0] && paira[1] == pairb[1]) || (paira[0] == pairb[1] && paira[1] == pairb[0]);\n}\n\nstatic inline lfs_size_t lfs_entry_size(const lfs_entry_t *entry)\n{\n    return 4 + entry->d.elen + entry->d.alen + entry->d.nlen;\n}\n\nstatic int lfs_dir_alloc(lfs_t *lfs, lfs_dir_t *dir)\n{\n    // allocate pair of dir blocks\n    for (int i = 0; i < 2; i++) {\n        int err = lfs_alloc(lfs, &dir->pair[i]);\n        if (err) {\n            return err;\n        }\n    }\n\n    // rather than clobbering one of the blocks we just pretend\n    // the revision may be valid\n    int err = lfs_bd_read(lfs, dir->pair[0], 0, &dir->d.rev, 4);\n    if (err && err != LFS_ERR_CORRUPT) {\n        return err;\n    }\n\n    if (err != LFS_ERR_CORRUPT) {\n        dir->d.rev = lfs_fromle32(dir->d.rev);\n    }\n\n    // set defaults\n    dir->d.rev += 1;\n    dir->d.size = sizeof(dir->d) + 4;\n    dir->d.tail[0] = 0xffffffff;\n    dir->d.tail[1] = 0xffffffff;\n    dir->off = sizeof(dir->d);\n\n    // don't write out yet, let caller take care of that\n    return 0;\n}\n\nstatic int lfs_dir_fetch(lfs_t *lfs, lfs_dir_t *dir, const lfs_block_t pair[2])\n{\n    // copy out pair, otherwise may be aliasing dir\n    const lfs_block_t tpair[2] = {pair[0], pair[1]};\n    bool valid = false;\n\n    // check both blocks for the most recent revision\n    for (int i = 0; i < 2; i++) {\n        struct lfs_disk_dir test;\n        int err = lfs_bd_read(lfs, tpair[i], 0, &test, sizeof(test));\n        lfs_dir_fromle32(&test);\n        if (err) {\n            if (err == LFS_ERR_CORRUPT) {\n                continue;\n            }\n            return err;\n        }\n\n        if (valid && lfs_scmp(test.rev, dir->d.rev) < 0) {\n            continue;\n        }\n\n        if ((0x7fffffff & test.size) < sizeof(test) + 4 || (0x7fffffff & test.size) > lfs->cfg->block_size) {\n            continue;\n        }\n\n        uint32_t crc = 0xffffffff;\n        lfs_dir_tole32(&test);\n        lfs_crc(&crc, &test, sizeof(test));\n        lfs_dir_fromle32(&test);\n        err = lfs_bd_crc(lfs, tpair[i], sizeof(test), (0x7fffffff & test.size) - sizeof(test), &crc);\n        if (err) {\n            if (err == LFS_ERR_CORRUPT) {\n                continue;\n            }\n            return err;\n        }\n\n        if (crc != 0) {\n            continue;\n        }\n\n        valid = true;\n\n        // setup dir in case it's valid\n        dir->pair[0] = tpair[(i + 0) % 2];\n        dir->pair[1] = tpair[(i + 1) % 2];\n        dir->off = sizeof(dir->d);\n        dir->d = test;\n    }\n\n    if (!valid) {\n        LFS_ERROR(\"Corrupted dir pair at %\" PRIu32 \" %\" PRIu32, tpair[0], tpair[1]);\n        return LFS_ERR_CORRUPT;\n    }\n\n    return 0;\n}\n\nstruct lfs_region {\n    lfs_off_t oldoff;\n    lfs_size_t oldlen;\n    const void *newdata;\n    lfs_size_t newlen;\n};\n\nstatic int lfs_dir_commit(lfs_t *lfs, lfs_dir_t *dir, const struct lfs_region *regions, int count)\n{\n    // increment revision count\n    dir->d.rev += 1;\n\n    // keep pairs in order such that pair[0] is most recent\n    lfs_pairswap(dir->pair);\n    for (int i = 0; i < count; i++) {\n        dir->d.size += regions[i].newlen - regions[i].oldlen;\n    }\n\n    const lfs_block_t oldpair[2] = {dir->pair[0], dir->pair[1]};\n    bool relocated = false;\n\n    while (true) {\n\n        int err = lfs_bd_erase(lfs, dir->pair[0]);\n        if (err) {\n            if (err == LFS_ERR_CORRUPT) {\n                goto relocate;\n            }\n            return err;\n        }\n\n        uint32_t crc = 0xffffffff;\n        lfs_dir_tole32(&dir->d);\n        lfs_crc(&crc, &dir->d, sizeof(dir->d));\n        err = lfs_bd_prog(lfs, dir->pair[0], 0, &dir->d, sizeof(dir->d));\n        lfs_dir_fromle32(&dir->d);\n        if (err) {\n            if (err == LFS_ERR_CORRUPT) {\n                goto relocate;\n            }\n            return err;\n        }\n\n        int i = 0;\n        lfs_off_t oldoff = sizeof(dir->d);\n        lfs_off_t newoff = sizeof(dir->d);\n        while (newoff < (0x7fffffff & dir->d.size) - 4) {\n            if (i < count && regions[i].oldoff == oldoff) {\n                lfs_crc(&crc, regions[i].newdata, regions[i].newlen);\n                err = lfs_bd_prog(lfs, dir->pair[0], newoff, regions[i].newdata, regions[i].newlen);\n                if (err) {\n                    if (err == LFS_ERR_CORRUPT) {\n                        goto relocate;\n                    }\n                    return err;\n                }\n\n                oldoff += regions[i].oldlen;\n                newoff += regions[i].newlen;\n                i += 1;\n            } else {\n                uint8_t data;\n                err = lfs_bd_read(lfs, oldpair[1], oldoff, &data, 1);\n                if (err) {\n                    return err;\n                }\n\n                lfs_crc(&crc, &data, 1);\n                err = lfs_bd_prog(lfs, dir->pair[0], newoff, &data, 1);\n                if (err) {\n                    if (err == LFS_ERR_CORRUPT) {\n                        goto relocate;\n                    }\n                    return err;\n                }\n\n                oldoff += 1;\n                newoff += 1;\n            }\n        }\n\n        crc = lfs_tole32(crc);\n        err = lfs_bd_prog(lfs, dir->pair[0], newoff, &crc, 4);\n        crc = lfs_fromle32(crc);\n        if (err) {\n            if (err == LFS_ERR_CORRUPT) {\n                goto relocate;\n            }\n            return err;\n        }\n\n        err = lfs_bd_sync(lfs);\n        if (err) {\n            if (err == LFS_ERR_CORRUPT) {\n                goto relocate;\n            }\n            return err;\n        }\n\n        // successful commit, check checksum to make sure\n        uint32_t ncrc = 0xffffffff;\n        err = lfs_bd_crc(lfs, dir->pair[0], 0, (0x7fffffff & dir->d.size) - 4, &ncrc);\n        if (err) {\n            return err;\n        }\n\n        if (ncrc != crc) {\n            goto relocate;\n        }\n\n        break;\n    relocate:\n        // commit was corrupted\n        LFS_DEBUG(\"Bad block at %\" PRIu32, dir->pair[0]);\n\n        // drop caches and prepare to relocate block\n        relocated = true;\n        lfs_cache_drop(lfs, &lfs->pcache);\n\n        // can't relocate superblock, filesystem is now frozen\n        if (lfs_paircmp(oldpair, (const lfs_block_t[2]){0, 1}) == 0) {\n            LFS_WARN(\"Superblock %\" PRIu32 \" has become unwritable\", oldpair[0]);\n            return LFS_ERR_CORRUPT;\n        }\n\n        // relocate half of pair\n        err = lfs_alloc(lfs, &dir->pair[0]);\n        if (err) {\n            return err;\n        }\n    }\n\n    if (relocated) {\n        // update references if we relocated\n        LFS_DEBUG(\"Relocating %\" PRIu32 \" %\" PRIu32 \" to %\" PRIu32 \" %\" PRIu32, oldpair[0], oldpair[1], dir->pair[0],\n                  dir->pair[1]);\n        int err = lfs_relocate(lfs, oldpair, dir->pair);\n        if (err) {\n            return err;\n        }\n    }\n\n    // shift over any directories that are affected\n    for (lfs_dir_t *d = lfs->dirs; d; d = d->next) {\n        if (lfs_paircmp(d->pair, dir->pair) == 0) {\n            d->pair[0] = dir->pair[0];\n            d->pair[1] = dir->pair[1];\n        }\n    }\n\n    return 0;\n}\n\nstatic int lfs_dir_update(lfs_t *lfs, lfs_dir_t *dir, lfs_entry_t *entry, const void *data)\n{\n    lfs_entry_tole32(&entry->d);\n    int err = lfs_dir_commit(lfs, dir,\n                             (struct lfs_region[]){{entry->off, sizeof(entry->d), &entry->d, sizeof(entry->d)},\n                                                   {entry->off + sizeof(entry->d), entry->d.nlen, data, entry->d.nlen}},\n                             data ? 2 : 1);\n    lfs_entry_fromle32(&entry->d);\n    return err;\n}\n\nstatic int lfs_dir_append(lfs_t *lfs, lfs_dir_t *dir, lfs_entry_t *entry, const void *data)\n{\n    // check if we fit, if top bit is set we do not and move on\n    while (true) {\n        if (dir->d.size + lfs_entry_size(entry) <= lfs->cfg->block_size) {\n            entry->off = dir->d.size - 4;\n\n            lfs_entry_tole32(&entry->d);\n            int err = lfs_dir_commit(\n                lfs, dir,\n                (struct lfs_region[]){{entry->off, 0, &entry->d, sizeof(entry->d)}, {entry->off, 0, data, entry->d.nlen}}, 2);\n            lfs_entry_fromle32(&entry->d);\n            return err;\n        }\n\n        // we need to allocate a new dir block\n        if (!(0x80000000 & dir->d.size)) {\n            lfs_dir_t olddir = *dir;\n            int err = lfs_dir_alloc(lfs, dir);\n            if (err) {\n                return err;\n            }\n\n            dir->d.tail[0] = olddir.d.tail[0];\n            dir->d.tail[1] = olddir.d.tail[1];\n            entry->off = dir->d.size - 4;\n            lfs_entry_tole32(&entry->d);\n            err = lfs_dir_commit(\n                lfs, dir,\n                (struct lfs_region[]){{entry->off, 0, &entry->d, sizeof(entry->d)}, {entry->off, 0, data, entry->d.nlen}}, 2);\n            lfs_entry_fromle32(&entry->d);\n            if (err) {\n                return err;\n            }\n\n            olddir.d.size |= 0x80000000;\n            olddir.d.tail[0] = dir->pair[0];\n            olddir.d.tail[1] = dir->pair[1];\n            return lfs_dir_commit(lfs, &olddir, NULL, 0);\n        }\n\n        int err = lfs_dir_fetch(lfs, dir, dir->d.tail);\n        if (err) {\n            return err;\n        }\n    }\n}\n\nstatic int lfs_dir_remove(lfs_t *lfs, lfs_dir_t *dir, lfs_entry_t *entry)\n{\n    // check if we should just drop the directory block\n    if ((dir->d.size & 0x7fffffff) == sizeof(dir->d) + 4 + lfs_entry_size(entry)) {\n        lfs_dir_t pdir;\n        int res = lfs_pred(lfs, dir->pair, &pdir);\n        if (res < 0) {\n            return res;\n        }\n\n        if (pdir.d.size & 0x80000000) {\n            pdir.d.size &= dir->d.size | 0x7fffffff;\n            pdir.d.tail[0] = dir->d.tail[0];\n            pdir.d.tail[1] = dir->d.tail[1];\n            return lfs_dir_commit(lfs, &pdir, NULL, 0);\n        }\n    }\n\n    // shift out the entry\n    int err = lfs_dir_commit(lfs, dir,\n                             (struct lfs_region[]){\n                                 {entry->off, lfs_entry_size(entry), NULL, 0},\n                             },\n                             1);\n    if (err) {\n        return err;\n    }\n\n    // shift over any files/directories that are affected\n    for (lfs_file_t *f = lfs->files; f; f = f->next) {\n        if (lfs_paircmp(f->pair, dir->pair) == 0) {\n            if (f->poff == entry->off) {\n                f->pair[0] = 0xffffffff;\n                f->pair[1] = 0xffffffff;\n            } else if (f->poff > entry->off) {\n                f->poff -= lfs_entry_size(entry);\n            }\n        }\n    }\n\n    for (lfs_dir_t *d = lfs->dirs; d; d = d->next) {\n        if (lfs_paircmp(d->pair, dir->pair) == 0) {\n            if (d->off > entry->off) {\n                d->off -= lfs_entry_size(entry);\n                d->pos -= lfs_entry_size(entry);\n            }\n        }\n    }\n\n    return 0;\n}\n\nstatic int lfs_dir_next(lfs_t *lfs, lfs_dir_t *dir, lfs_entry_t *entry)\n{\n    while (dir->off + sizeof(entry->d) > (0x7fffffff & dir->d.size) - 4) {\n        if (!(0x80000000 & dir->d.size)) {\n            entry->off = dir->off;\n            return LFS_ERR_NOENT;\n        }\n\n        int err = lfs_dir_fetch(lfs, dir, dir->d.tail);\n        if (err) {\n            return err;\n        }\n\n        dir->off = sizeof(dir->d);\n        dir->pos += sizeof(dir->d) + 4;\n    }\n\n    int err = lfs_bd_read(lfs, dir->pair[0], dir->off, &entry->d, sizeof(entry->d));\n    lfs_entry_fromle32(&entry->d);\n    if (err) {\n        return err;\n    }\n\n    entry->off = dir->off;\n    dir->off += lfs_entry_size(entry);\n    dir->pos += lfs_entry_size(entry);\n    return 0;\n}\n\nstatic int lfs_dir_find(lfs_t *lfs, lfs_dir_t *dir, lfs_entry_t *entry, const char **path)\n{\n    const char *pathname = *path;\n    size_t pathlen;\n    entry->d.type = LFS_TYPE_DIR;\n    entry->d.elen = sizeof(entry->d) - 4;\n    entry->d.alen = 0;\n    entry->d.nlen = 0;\n    entry->d.u.dir[0] = lfs->root[0];\n    entry->d.u.dir[1] = lfs->root[1];\n\n    while (true) {\n    nextname:\n        // skip slashes\n        pathname += strspn(pathname, \"/\");\n        pathlen = strcspn(pathname, \"/\");\n\n        // skip '.' and root '..'\n        if ((pathlen == 1 && memcmp(pathname, \".\", 1) == 0) || (pathlen == 2 && memcmp(pathname, \"..\", 2) == 0)) {\n            pathname += pathlen;\n            goto nextname;\n        }\n\n        // skip if matched by '..' in name\n        const char *suffix = pathname + pathlen;\n        size_t sufflen;\n        int depth = 1;\n        while (true) {\n            suffix += strspn(suffix, \"/\");\n            sufflen = strcspn(suffix, \"/\");\n            if (sufflen == 0) {\n                break;\n            }\n\n            if (sufflen == 2 && memcmp(suffix, \"..\", 2) == 0) {\n                depth -= 1;\n                if (depth == 0) {\n                    pathname = suffix + sufflen;\n                    goto nextname;\n                }\n            } else {\n                depth += 1;\n            }\n\n            suffix += sufflen;\n        }\n\n        // found path\n        if (pathname[0] == '\\0') {\n            return 0;\n        }\n\n        // update what we've found\n        *path = pathname;\n\n        // continue on if we hit a directory\n        if (entry->d.type != LFS_TYPE_DIR) {\n            return LFS_ERR_NOTDIR;\n        }\n\n        int err = lfs_dir_fetch(lfs, dir, entry->d.u.dir);\n        if (err) {\n            return err;\n        }\n\n        // find entry matching name\n        while (true) {\n            err = lfs_dir_next(lfs, dir, entry);\n            if (err) {\n                return err;\n            }\n\n            if (((0x7f & entry->d.type) != LFS_TYPE_REG && (0x7f & entry->d.type) != LFS_TYPE_DIR) || entry->d.nlen != pathlen) {\n                continue;\n            }\n\n            int res = lfs_bd_cmp(lfs, dir->pair[0], entry->off + 4 + entry->d.elen + entry->d.alen, pathname, pathlen);\n            if (res < 0) {\n                return res;\n            }\n\n            // found match\n            if (res) {\n                break;\n            }\n        }\n\n        // check that entry has not been moved\n        if (entry->d.type & 0x80) {\n            int moved = lfs_moved(lfs, &entry->d.u);\n            if (moved) {\n                return (moved < 0) ? moved : LFS_ERR_NOENT;\n            }\n\n            entry->d.type &= ~0x80;\n        }\n\n        // to next name\n        pathname += pathlen;\n    }\n}\n\n/// Top level directory operations ///\nint lfs_mkdir(lfs_t *lfs, const char *path)\n{\n    // deorphan if we haven't yet, needed at most once after poweron\n    if (!lfs->deorphaned) {\n        int err = lfs_deorphan(lfs);\n        if (err) {\n            return err;\n        }\n    }\n\n    // fetch parent directory\n    lfs_dir_t cwd;\n    lfs_entry_t entry;\n    int err = lfs_dir_find(lfs, &cwd, &entry, &path);\n    if (err != LFS_ERR_NOENT || strchr(path, '/') != NULL) {\n        return err ? err : LFS_ERR_EXIST;\n    }\n\n    // build up new directory\n    lfs_alloc_ack(lfs);\n\n    lfs_dir_t dir;\n    err = lfs_dir_alloc(lfs, &dir);\n    if (err) {\n        return err;\n    }\n    dir.d.tail[0] = cwd.d.tail[0];\n    dir.d.tail[1] = cwd.d.tail[1];\n\n    err = lfs_dir_commit(lfs, &dir, NULL, 0);\n    if (err) {\n        return err;\n    }\n\n    entry.d.type = LFS_TYPE_DIR;\n    entry.d.elen = sizeof(entry.d) - 4;\n    entry.d.alen = 0;\n    entry.d.nlen = strlen(path);\n    entry.d.u.dir[0] = dir.pair[0];\n    entry.d.u.dir[1] = dir.pair[1];\n\n    cwd.d.tail[0] = dir.pair[0];\n    cwd.d.tail[1] = dir.pair[1];\n\n    err = lfs_dir_append(lfs, &cwd, &entry, path);\n    if (err) {\n        return err;\n    }\n\n    lfs_alloc_ack(lfs);\n    return 0;\n}\n\nint lfs_dir_open(lfs_t *lfs, lfs_dir_t *dir, const char *path)\n{\n    dir->pair[0] = lfs->root[0];\n    dir->pair[1] = lfs->root[1];\n\n    lfs_entry_t entry;\n    int err = lfs_dir_find(lfs, dir, &entry, &path);\n    if (err) {\n        return err;\n    } else if (entry.d.type != LFS_TYPE_DIR) {\n        return LFS_ERR_NOTDIR;\n    }\n\n    err = lfs_dir_fetch(lfs, dir, entry.d.u.dir);\n    if (err) {\n        return err;\n    }\n\n    // setup head dir\n    // special offset for '.' and '..'\n    dir->head[0] = dir->pair[0];\n    dir->head[1] = dir->pair[1];\n    dir->pos = sizeof(dir->d) - 2;\n    dir->off = sizeof(dir->d);\n\n    // add to list of directories\n    dir->next = lfs->dirs;\n    lfs->dirs = dir;\n\n    return 0;\n}\n\nint lfs_dir_close(lfs_t *lfs, lfs_dir_t *dir)\n{\n    // remove from list of directories\n    for (lfs_dir_t **p = &lfs->dirs; *p; p = &(*p)->next) {\n        if (*p == dir) {\n            *p = dir->next;\n            break;\n        }\n    }\n\n    return 0;\n}\n\nint lfs_dir_read(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info)\n{\n    memset(info, 0, sizeof(*info));\n\n    // special offset for '.' and '..'\n    if (dir->pos == sizeof(dir->d) - 2) {\n        info->type = LFS_TYPE_DIR;\n        strcpy(info->name, \".\");\n        dir->pos += 1;\n        return 1;\n    } else if (dir->pos == sizeof(dir->d) - 1) {\n        info->type = LFS_TYPE_DIR;\n        strcpy(info->name, \"..\");\n        dir->pos += 1;\n        return 1;\n    }\n\n    lfs_entry_t entry;\n    while (true) {\n        int err = lfs_dir_next(lfs, dir, &entry);\n        if (err) {\n            return (err == LFS_ERR_NOENT) ? 0 : err;\n        }\n\n        if ((0x7f & entry.d.type) != LFS_TYPE_REG && (0x7f & entry.d.type) != LFS_TYPE_DIR) {\n            continue;\n        }\n\n        // check that entry has not been moved\n        if (entry.d.type & 0x80) {\n            int moved = lfs_moved(lfs, &entry.d.u);\n            if (moved < 0) {\n                return moved;\n            }\n\n            if (moved) {\n                continue;\n            }\n\n            entry.d.type &= ~0x80;\n        }\n\n        break;\n    }\n\n    info->type = entry.d.type;\n    if (info->type == LFS_TYPE_REG) {\n        info->size = entry.d.u.file.size;\n    }\n\n    int err = lfs_bd_read(lfs, dir->pair[0], entry.off + 4 + entry.d.elen + entry.d.alen, info->name, entry.d.nlen);\n    if (err) {\n        return err;\n    }\n\n    return 1;\n}\n\nint lfs_dir_seek(lfs_t *lfs, lfs_dir_t *dir, lfs_off_t off)\n{\n    // simply walk from head dir\n    int err = lfs_dir_rewind(lfs, dir);\n    if (err) {\n        return err;\n    }\n    dir->pos = off;\n\n    while (off > (0x7fffffff & dir->d.size)) {\n        off -= 0x7fffffff & dir->d.size;\n        if (!(0x80000000 & dir->d.size)) {\n            return LFS_ERR_INVAL;\n        }\n\n        err = lfs_dir_fetch(lfs, dir, dir->d.tail);\n        if (err) {\n            return err;\n        }\n    }\n\n    dir->off = off;\n    return 0;\n}\n\nint lfs_dir_rewind(lfs_t *lfs, lfs_dir_t *dir)\n{\n    // reload the head dir\n    int err = lfs_dir_fetch(lfs, dir, dir->head);\n    if (err) {\n        return err;\n    }\n\n    dir->pair[0] = dir->head[0];\n    dir->pair[1] = dir->head[1];\n    dir->pos = sizeof(dir->d) - 2;\n    dir->off = sizeof(dir->d);\n    return 0;\n}\n\n/// File index list operations ///\nstatic int lfs_ctz_index(lfs_t *lfs, lfs_off_t *off)\n{\n    lfs_off_t size = *off;\n    lfs_off_t b = lfs->cfg->block_size - 2 * 4;\n    lfs_off_t i = size / b;\n    if (i == 0) {\n        return 0;\n    }\n\n    i = (size - 4 * (lfs_popc(i - 1) + 2)) / b;\n    *off = size - b * i - 4 * lfs_popc(i);\n    return i;\n}\n\nstatic int lfs_ctz_find(lfs_t *lfs, lfs_cache_t *rcache, const lfs_cache_t *pcache, lfs_block_t head, lfs_size_t size,\n                        lfs_size_t pos, lfs_block_t *block, lfs_off_t *off)\n{\n    if (size == 0) {\n        *block = 0xffffffff;\n        *off = 0;\n        return 0;\n    }\n\n    lfs_off_t current = lfs_ctz_index(lfs, &(lfs_off_t){size - 1});\n    lfs_off_t target = lfs_ctz_index(lfs, &pos);\n\n    while (current > target) {\n        lfs_size_t skip = lfs_min(lfs_npw2(current - target + 1) - 1, lfs_ctz(current));\n\n        int err = lfs_cache_read(lfs, rcache, pcache, head, 4 * skip, &head, 4);\n        head = lfs_fromle32(head);\n        if (err) {\n            return err;\n        }\n\n        LFS_ASSERT(head >= 2 && head <= lfs->cfg->block_count);\n        current -= 1 << skip;\n    }\n\n    *block = head;\n    *off = pos;\n    return 0;\n}\n\nstatic int lfs_ctz_extend(lfs_t *lfs, lfs_cache_t *rcache, lfs_cache_t *pcache, lfs_block_t head, lfs_size_t size,\n                          lfs_block_t *block, lfs_off_t *off)\n{\n    while (true) {\n        // go ahead and grab a block\n        lfs_block_t nblock;\n        int err = lfs_alloc(lfs, &nblock);\n        if (err) {\n            return err;\n        }\n        LFS_ASSERT(nblock >= 2 && nblock <= lfs->cfg->block_count);\n\n        if (true) {\n            err = lfs_bd_erase(lfs, nblock);\n            if (err) {\n                if (err == LFS_ERR_CORRUPT) {\n                    goto relocate;\n                }\n                return err;\n            }\n\n            if (size == 0) {\n                *block = nblock;\n                *off = 0;\n                return 0;\n            }\n\n            size -= 1;\n            lfs_off_t index = lfs_ctz_index(lfs, &size);\n            size += 1;\n\n            // just copy out the last block if it is incomplete\n            if (size != lfs->cfg->block_size) {\n                for (lfs_off_t i = 0; i < size; i++) {\n                    uint8_t data;\n                    err = lfs_cache_read(lfs, rcache, NULL, head, i, &data, 1);\n                    if (err) {\n                        return err;\n                    }\n\n                    err = lfs_cache_prog(lfs, pcache, rcache, nblock, i, &data, 1);\n                    if (err) {\n                        if (err == LFS_ERR_CORRUPT) {\n                            goto relocate;\n                        }\n                        return err;\n                    }\n                }\n\n                *block = nblock;\n                *off = size;\n                return 0;\n            }\n\n            // append block\n            index += 1;\n            lfs_size_t skips = lfs_ctz(index) + 1;\n\n            for (lfs_off_t i = 0; i < skips; i++) {\n                head = lfs_tole32(head);\n                err = lfs_cache_prog(lfs, pcache, rcache, nblock, 4 * i, &head, 4);\n                head = lfs_fromle32(head);\n                if (err) {\n                    if (err == LFS_ERR_CORRUPT) {\n                        goto relocate;\n                    }\n                    return err;\n                }\n\n                if (i != skips - 1) {\n                    err = lfs_cache_read(lfs, rcache, NULL, head, 4 * i, &head, 4);\n                    head = lfs_fromle32(head);\n                    if (err) {\n                        return err;\n                    }\n                }\n\n                LFS_ASSERT(head >= 2 && head <= lfs->cfg->block_count);\n            }\n\n            *block = nblock;\n            *off = 4 * skips;\n            return 0;\n        }\n\n    relocate:\n        LFS_DEBUG(\"Bad block at %\" PRIu32, nblock);\n\n        // just clear cache and try a new block\n        lfs_cache_drop(lfs, &lfs->pcache);\n    }\n}\n\nstatic int lfs_ctz_traverse(lfs_t *lfs, lfs_cache_t *rcache, const lfs_cache_t *pcache, lfs_block_t head, lfs_size_t size,\n                            int (*cb)(void *, lfs_block_t), void *data)\n{\n    if (size == 0) {\n        return 0;\n    }\n\n    lfs_off_t index = lfs_ctz_index(lfs, &(lfs_off_t){size - 1});\n\n    while (true) {\n        int err = cb(data, head);\n        if (err) {\n            return err;\n        }\n\n        if (index == 0) {\n            return 0;\n        }\n\n        lfs_block_t heads[2];\n        int count = 2 - (index & 1);\n        err = lfs_cache_read(lfs, rcache, pcache, head, 0, &heads, count * 4);\n        heads[0] = lfs_fromle32(heads[0]);\n        heads[1] = lfs_fromle32(heads[1]);\n        if (err) {\n            return err;\n        }\n\n        for (int i = 0; i < count - 1; i++) {\n            err = cb(data, heads[i]);\n            if (err) {\n                return err;\n            }\n        }\n\n        head = heads[count - 1];\n        index -= count;\n    }\n}\n\n/// Top level file operations ///\nint lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file, const char *path, int flags, const struct lfs_file_config *cfg)\n{\n    // deorphan if we haven't yet, needed at most once after poweron\n    if ((flags & 3) != LFS_O_RDONLY && !lfs->deorphaned) {\n        int err = lfs_deorphan(lfs);\n        if (err) {\n            return err;\n        }\n    }\n\n    // allocate entry for file if it doesn't exist\n    lfs_dir_t cwd;\n    lfs_entry_t entry;\n    int err = lfs_dir_find(lfs, &cwd, &entry, &path);\n    if (err && (err != LFS_ERR_NOENT || strchr(path, '/') != NULL)) {\n        return err;\n    }\n\n    if (err == LFS_ERR_NOENT) {\n        if (!(flags & LFS_O_CREAT)) {\n            return LFS_ERR_NOENT;\n        }\n\n        // create entry to remember name\n        entry.d.type = LFS_TYPE_REG;\n        entry.d.elen = sizeof(entry.d) - 4;\n        entry.d.alen = 0;\n        entry.d.nlen = strlen(path);\n        entry.d.u.file.head = 0xffffffff;\n        entry.d.u.file.size = 0;\n        err = lfs_dir_append(lfs, &cwd, &entry, path);\n        if (err) {\n            return err;\n        }\n    } else if (entry.d.type == LFS_TYPE_DIR) {\n        return LFS_ERR_ISDIR;\n    } else if (flags & LFS_O_EXCL) {\n        return LFS_ERR_EXIST;\n    }\n\n    // setup file struct\n    file->cfg = cfg;\n    file->pair[0] = cwd.pair[0];\n    file->pair[1] = cwd.pair[1];\n    file->poff = entry.off;\n    file->head = entry.d.u.file.head;\n    file->size = entry.d.u.file.size;\n    file->flags = flags;\n    file->pos = 0;\n\n    if (flags & LFS_O_TRUNC) {\n        if (file->size != 0) {\n            file->flags |= LFS_F_DIRTY;\n        }\n        file->head = 0xffffffff;\n        file->size = 0;\n    }\n\n    // allocate buffer if needed\n    file->cache.block = 0xffffffff;\n    if (file->cfg && file->cfg->buffer) {\n        file->cache.buffer = file->cfg->buffer;\n    } else if (lfs->cfg->file_buffer) {\n        if (lfs->files) {\n            // already in use\n            return LFS_ERR_NOMEM;\n        }\n        file->cache.buffer = lfs->cfg->file_buffer;\n    } else if ((file->flags & 3) == LFS_O_RDONLY) {\n        file->cache.buffer = lfs_malloc(lfs->cfg->read_size);\n        if (!file->cache.buffer) {\n            return LFS_ERR_NOMEM;\n        }\n    } else {\n        file->cache.buffer = lfs_malloc(lfs->cfg->prog_size);\n        if (!file->cache.buffer) {\n            return LFS_ERR_NOMEM;\n        }\n    }\n\n    // zero to avoid information leak\n    lfs_cache_drop(lfs, &file->cache);\n    if ((file->flags & 3) != LFS_O_RDONLY) {\n        lfs_cache_zero(lfs, &file->cache);\n    }\n\n    // add to list of files\n    file->next = lfs->files;\n    lfs->files = file;\n\n    return 0;\n}\n\nint lfs_file_open(lfs_t *lfs, lfs_file_t *file, const char *path, int flags)\n{\n    return lfs_file_opencfg(lfs, file, path, flags, NULL);\n}\n\nint lfs_file_close(lfs_t *lfs, lfs_file_t *file)\n{\n    int err = lfs_file_sync(lfs, file);\n\n    // remove from list of files\n    for (lfs_file_t **p = &lfs->files; *p; p = &(*p)->next) {\n        if (*p == file) {\n            *p = file->next;\n            break;\n        }\n    }\n\n    // clean up memory\n    if (!(file->cfg && file->cfg->buffer) && !lfs->cfg->file_buffer) {\n        lfs_free(file->cache.buffer);\n    }\n\n    return err;\n}\n\nstatic int lfs_file_relocate(lfs_t *lfs, lfs_file_t *file)\n{\nrelocate:\n    LFS_DEBUG(\"Bad block at %\" PRIu32, file->block);\n\n    // just relocate what exists into new block\n    lfs_block_t nblock;\n    int err = lfs_alloc(lfs, &nblock);\n    if (err) {\n        return err;\n    }\n\n    err = lfs_bd_erase(lfs, nblock);\n    if (err) {\n        if (err == LFS_ERR_CORRUPT) {\n            goto relocate;\n        }\n        return err;\n    }\n\n    // either read from dirty cache or disk\n    for (lfs_off_t i = 0; i < file->off; i++) {\n        uint8_t data;\n        err = lfs_cache_read(lfs, &lfs->rcache, &file->cache, file->block, i, &data, 1);\n        if (err) {\n            return err;\n        }\n\n        err = lfs_cache_prog(lfs, &lfs->pcache, &lfs->rcache, nblock, i, &data, 1);\n        if (err) {\n            if (err == LFS_ERR_CORRUPT) {\n                goto relocate;\n            }\n            return err;\n        }\n    }\n\n    // copy over new state of file\n    memcpy(file->cache.buffer, lfs->pcache.buffer, lfs->cfg->prog_size);\n    file->cache.block = lfs->pcache.block;\n    file->cache.off = lfs->pcache.off;\n    lfs_cache_zero(lfs, &lfs->pcache);\n\n    file->block = nblock;\n    return 0;\n}\n\nstatic int lfs_file_flush(lfs_t *lfs, lfs_file_t *file)\n{\n    if (file->flags & LFS_F_READING) {\n        // just drop read cache\n        lfs_cache_drop(lfs, &file->cache);\n        file->flags &= ~LFS_F_READING;\n    }\n\n    if (file->flags & LFS_F_WRITING) {\n        lfs_off_t pos = file->pos;\n\n        // copy over anything after current branch\n        lfs_file_t orig = {\n            .head = file->head,\n            .size = file->size,\n            .flags = LFS_O_RDONLY,\n            .pos = file->pos,\n            .cache = lfs->rcache,\n        };\n        lfs_cache_drop(lfs, &lfs->rcache);\n\n        while (file->pos < file->size) {\n            // copy over a byte at a time, leave it up to caching\n            // to make this efficient\n            uint8_t data;\n            lfs_ssize_t res = lfs_file_read(lfs, &orig, &data, 1);\n            if (res < 0) {\n                return res;\n            }\n\n            res = lfs_file_write(lfs, file, &data, 1);\n            if (res < 0) {\n                return res;\n            }\n\n            // keep our reference to the rcache in sync\n            if (lfs->rcache.block != 0xffffffff) {\n                lfs_cache_drop(lfs, &orig.cache);\n                lfs_cache_drop(lfs, &lfs->rcache);\n            }\n        }\n\n        // write out what we have\n        while (true) {\n            int err = lfs_cache_flush(lfs, &file->cache, &lfs->rcache);\n            if (err) {\n                if (err == LFS_ERR_CORRUPT) {\n                    goto relocate;\n                }\n                return err;\n            }\n\n            break;\n        relocate:\n            err = lfs_file_relocate(lfs, file);\n            if (err) {\n                return err;\n            }\n        }\n\n        // actual file updates\n        file->head = file->block;\n        file->size = file->pos;\n        file->flags &= ~LFS_F_WRITING;\n        file->flags |= LFS_F_DIRTY;\n\n        file->pos = pos;\n    }\n\n    return 0;\n}\n\nint lfs_file_sync(lfs_t *lfs, lfs_file_t *file)\n{\n    int err = lfs_file_flush(lfs, file);\n    if (err) {\n        return err;\n    }\n\n    if ((file->flags & LFS_F_DIRTY) && !(file->flags & LFS_F_ERRED) && !lfs_pairisnull(file->pair)) {\n        // update dir entry\n        lfs_dir_t cwd;\n        err = lfs_dir_fetch(lfs, &cwd, file->pair);\n        if (err) {\n            return err;\n        }\n\n        lfs_entry_t entry = {.off = file->poff};\n        err = lfs_bd_read(lfs, cwd.pair[0], entry.off, &entry.d, sizeof(entry.d));\n        lfs_entry_fromle32(&entry.d);\n        if (err) {\n            return err;\n        }\n\n        LFS_ASSERT(entry.d.type == LFS_TYPE_REG);\n        entry.d.u.file.head = file->head;\n        entry.d.u.file.size = file->size;\n\n        err = lfs_dir_update(lfs, &cwd, &entry, NULL);\n        if (err) {\n            return err;\n        }\n\n        file->flags &= ~LFS_F_DIRTY;\n    }\n\n    return 0;\n}\n\nlfs_ssize_t lfs_file_read(lfs_t *lfs, lfs_file_t *file, void *buffer, lfs_size_t size)\n{\n    uint8_t *data = buffer;\n    lfs_size_t nsize = size;\n\n    if ((file->flags & 3) == LFS_O_WRONLY) {\n        return LFS_ERR_BADF;\n    }\n\n    if (file->flags & LFS_F_WRITING) {\n        // flush out any writes\n        int err = lfs_file_flush(lfs, file);\n        if (err) {\n            return err;\n        }\n    }\n\n    if (file->pos >= file->size) {\n        // eof if past end\n        return 0;\n    }\n\n    size = lfs_min(size, file->size - file->pos);\n    nsize = size;\n\n    while (nsize > 0) {\n        // check if we need a new block\n        if (!(file->flags & LFS_F_READING) || file->off == lfs->cfg->block_size) {\n            int err = lfs_ctz_find(lfs, &file->cache, NULL, file->head, file->size, file->pos, &file->block, &file->off);\n            if (err) {\n                return err;\n            }\n\n            file->flags |= LFS_F_READING;\n        }\n\n        // read as much as we can in current block\n        lfs_size_t diff = lfs_min(nsize, lfs->cfg->block_size - file->off);\n        int err = lfs_cache_read(lfs, &file->cache, NULL, file->block, file->off, data, diff);\n        if (err) {\n            return err;\n        }\n\n        file->pos += diff;\n        file->off += diff;\n        data += diff;\n        nsize -= diff;\n    }\n\n    return size;\n}\n\nlfs_ssize_t lfs_file_write(lfs_t *lfs, lfs_file_t *file, const void *buffer, lfs_size_t size)\n{\n    const uint8_t *data = buffer;\n    lfs_size_t nsize = size;\n\n    if ((file->flags & 3) == LFS_O_RDONLY) {\n        return LFS_ERR_BADF;\n    }\n\n    if (file->flags & LFS_F_READING) {\n        // drop any reads\n        int err = lfs_file_flush(lfs, file);\n        if (err) {\n            return err;\n        }\n    }\n\n    if ((file->flags & LFS_O_APPEND) && file->pos < file->size) {\n        file->pos = file->size;\n    }\n\n    if (!(file->flags & LFS_F_WRITING) && file->pos > file->size) {\n        // fill with zeros\n        lfs_off_t pos = file->pos;\n        file->pos = file->size;\n\n        while (file->pos < pos) {\n            lfs_ssize_t res = lfs_file_write(lfs, file, &(uint8_t){0}, 1);\n            if (res < 0) {\n                return res;\n            }\n        }\n    }\n\n    while (nsize > 0) {\n        // check if we need a new block\n        if (!(file->flags & LFS_F_WRITING) || file->off == lfs->cfg->block_size) {\n            if (!(file->flags & LFS_F_WRITING) && file->pos > 0) {\n                // find out which block we're extending from\n                int err = lfs_ctz_find(lfs, &file->cache, NULL, file->head, file->size, file->pos - 1, &file->block, &file->off);\n                if (err) {\n                    file->flags |= LFS_F_ERRED;\n                    return err;\n                }\n\n                // mark cache as dirty since we may have read data into it\n                lfs_cache_zero(lfs, &file->cache);\n            }\n\n            // extend file with new blocks\n            lfs_alloc_ack(lfs);\n            int err = lfs_ctz_extend(lfs, &lfs->rcache, &file->cache, file->block, file->pos, &file->block, &file->off);\n            if (err) {\n                file->flags |= LFS_F_ERRED;\n                return err;\n            }\n\n            file->flags |= LFS_F_WRITING;\n        }\n\n        // program as much as we can in current block\n        lfs_size_t diff = lfs_min(nsize, lfs->cfg->block_size - file->off);\n        while (true) {\n            int err = lfs_cache_prog(lfs, &file->cache, &lfs->rcache, file->block, file->off, data, diff);\n            if (err) {\n                if (err == LFS_ERR_CORRUPT) {\n                    goto relocate;\n                }\n                file->flags |= LFS_F_ERRED;\n                return err;\n            }\n\n            break;\n        relocate:\n            err = lfs_file_relocate(lfs, file);\n            if (err) {\n                file->flags |= LFS_F_ERRED;\n                return err;\n            }\n        }\n\n        file->pos += diff;\n        file->off += diff;\n        data += diff;\n        nsize -= diff;\n\n        lfs_alloc_ack(lfs);\n    }\n\n    file->flags &= ~LFS_F_ERRED;\n    return size;\n}\n\nlfs_soff_t lfs_file_seek(lfs_t *lfs, lfs_file_t *file, lfs_soff_t off, int whence)\n{\n    // write out everything beforehand, may be noop if rdonly\n    int err = lfs_file_flush(lfs, file);\n    if (err) {\n        return err;\n    }\n\n    // update pos\n    if (whence == LFS_SEEK_SET) {\n        file->pos = off;\n    } else if (whence == LFS_SEEK_CUR) {\n        if (off < 0 && (lfs_off_t)-off > file->pos) {\n            return LFS_ERR_INVAL;\n        }\n\n        file->pos = file->pos + off;\n    } else if (whence == LFS_SEEK_END) {\n        if (off < 0 && (lfs_off_t)-off > file->size) {\n            return LFS_ERR_INVAL;\n        }\n\n        file->pos = file->size + off;\n    }\n\n    return file->pos;\n}\n\nint lfs_file_truncate(lfs_t *lfs, lfs_file_t *file, lfs_off_t size)\n{\n    if ((file->flags & 3) == LFS_O_RDONLY) {\n        return LFS_ERR_BADF;\n    }\n\n    lfs_off_t oldsize = lfs_file_size(lfs, file);\n    if (size < oldsize) {\n        // need to flush since directly changing metadata\n        int err = lfs_file_flush(lfs, file);\n        if (err) {\n            return err;\n        }\n\n        // lookup new head in ctz skip list\n        err = lfs_ctz_find(lfs, &file->cache, NULL, file->head, file->size, size, &file->head, &(lfs_off_t){0});\n        if (err) {\n            return err;\n        }\n\n        file->size = size;\n        file->flags |= LFS_F_DIRTY;\n    } else if (size > oldsize) {\n        lfs_off_t pos = file->pos;\n\n        // flush+seek if not already at end\n        if (file->pos != oldsize) {\n            int err = lfs_file_seek(lfs, file, 0, LFS_SEEK_END);\n            if (err < 0) {\n                return err;\n            }\n        }\n\n        // fill with zeros\n        while (file->pos < size) {\n            lfs_ssize_t res = lfs_file_write(lfs, file, &(uint8_t){0}, 1);\n            if (res < 0) {\n                return res;\n            }\n        }\n\n        // restore pos\n        int err = lfs_file_seek(lfs, file, pos, LFS_SEEK_SET);\n        if (err < 0) {\n            return err;\n        }\n    }\n\n    return 0;\n}\n\nlfs_soff_t lfs_file_tell(lfs_t *lfs, lfs_file_t const *file)\n{\n    (void)lfs;\n    return file->pos;\n}\n\nint lfs_file_rewind(lfs_t *lfs, lfs_file_t *file)\n{\n    lfs_soff_t res = lfs_file_seek(lfs, file, 0, LFS_SEEK_SET);\n    if (res < 0) {\n        return res;\n    }\n\n    return 0;\n}\n\nlfs_soff_t lfs_file_size(lfs_t *lfs, lfs_file_t *file)\n{\n    (void)lfs;\n    if (file->flags & LFS_F_WRITING) {\n        return lfs_max(file->pos, file->size);\n    } else {\n        return file->size;\n    }\n}\n\n/// General fs operations ///\nint lfs_stat(lfs_t *lfs, const char *path, struct lfs_info *info)\n{\n    lfs_dir_t cwd;\n    lfs_entry_t entry;\n    int err = lfs_dir_find(lfs, &cwd, &entry, &path);\n    if (err) {\n        return err;\n    }\n\n    memset(info, 0, sizeof(*info));\n    info->type = entry.d.type;\n    if (info->type == LFS_TYPE_REG) {\n        info->size = entry.d.u.file.size;\n    }\n\n    if (lfs_paircmp(entry.d.u.dir, lfs->root) == 0) {\n        strcpy(info->name, \"/\");\n    } else {\n        err = lfs_bd_read(lfs, cwd.pair[0], entry.off + 4 + entry.d.elen + entry.d.alen, info->name, entry.d.nlen);\n        if (err) {\n            return err;\n        }\n    }\n\n    return 0;\n}\n\nint lfs_remove(lfs_t *lfs, const char *path)\n{\n    // deorphan if we haven't yet, needed at most once after poweron\n    if (!lfs->deorphaned) {\n        int err = lfs_deorphan(lfs);\n        if (err) {\n            return err;\n        }\n    }\n\n    lfs_dir_t cwd;\n    lfs_entry_t entry;\n    int err = lfs_dir_find(lfs, &cwd, &entry, &path);\n    if (err) {\n        return err;\n    }\n\n    lfs_dir_t dir;\n    if (entry.d.type == LFS_TYPE_DIR) {\n        // must be empty before removal, checking size\n        // without masking top bit checks for any case where\n        // dir is not empty\n        err = lfs_dir_fetch(lfs, &dir, entry.d.u.dir);\n        if (err) {\n            return err;\n        } /* else if (dir.d.size != sizeof(dir.d)+4) {\n            return LFS_ERR_NOTEMPTY;\n        }  allow to remove non-empty folder,\n           According to below issue, comment these 2 line won't corrupt filesystem\n           https://github.com/ARMmbed/littlefs/issues/43 */\n    }\n\n    // remove the entry\n    err = lfs_dir_remove(lfs, &cwd, &entry);\n    if (err) {\n        return err;\n    }\n\n    // if we were a directory, find pred, replace tail\n    if (entry.d.type == LFS_TYPE_DIR) {\n        int res = lfs_pred(lfs, dir.pair, &cwd);\n        if (res < 0) {\n            return res;\n        }\n\n        LFS_ASSERT(res); // must have pred\n        cwd.d.tail[0] = dir.d.tail[0];\n        cwd.d.tail[1] = dir.d.tail[1];\n\n        err = lfs_dir_commit(lfs, &cwd, NULL, 0);\n        if (err) {\n            return err;\n        }\n    }\n\n    return 0;\n}\n\nint lfs_rename(lfs_t *lfs, const char *oldpath, const char *newpath)\n{\n    // deorphan if we haven't yet, needed at most once after poweron\n    if (!lfs->deorphaned) {\n        int err = lfs_deorphan(lfs);\n        if (err) {\n            return err;\n        }\n    }\n\n    // find old entry\n    lfs_dir_t oldcwd;\n    lfs_entry_t oldentry;\n    int err = lfs_dir_find(lfs, &oldcwd, &oldentry, &oldpath);\n    if (err) {\n        return err;\n    }\n\n    // allocate new entry\n    lfs_dir_t newcwd;\n    lfs_entry_t preventry;\n    err = lfs_dir_find(lfs, &newcwd, &preventry, &newpath);\n    if (err && (err != LFS_ERR_NOENT || strchr(newpath, '/') != NULL)) {\n        return err;\n    }\n\n    bool prevexists = (err != LFS_ERR_NOENT);\n    bool samepair = (lfs_paircmp(oldcwd.pair, newcwd.pair) == 0);\n\n    // must have same type\n    if (prevexists && preventry.d.type != oldentry.d.type) {\n        return LFS_ERR_ISDIR;\n    }\n\n    lfs_dir_t dir;\n    if (prevexists && preventry.d.type == LFS_TYPE_DIR) {\n        // must be empty before removal, checking size\n        // without masking top bit checks for any case where\n        // dir is not empty\n        err = lfs_dir_fetch(lfs, &dir, preventry.d.u.dir);\n        if (err) {\n            return err;\n        } else if (dir.d.size != sizeof(dir.d) + 4) {\n            return LFS_ERR_NOTEMPTY;\n        }\n    }\n\n    // mark as moving\n    oldentry.d.type |= 0x80;\n    err = lfs_dir_update(lfs, &oldcwd, &oldentry, NULL);\n    if (err) {\n        return err;\n    }\n\n    // update pair if newcwd == oldcwd\n    if (samepair) {\n        newcwd = oldcwd;\n    }\n\n    // move to new location\n    lfs_entry_t newentry = preventry;\n    newentry.d = oldentry.d;\n    newentry.d.type &= ~0x80;\n    newentry.d.nlen = strlen(newpath);\n\n    if (prevexists) {\n        err = lfs_dir_update(lfs, &newcwd, &newentry, newpath);\n        if (err) {\n            return err;\n        }\n    } else {\n        err = lfs_dir_append(lfs, &newcwd, &newentry, newpath);\n        if (err) {\n            return err;\n        }\n    }\n\n    // update pair if newcwd == oldcwd\n    if (samepair) {\n        oldcwd = newcwd;\n    }\n\n    // remove old entry\n    err = lfs_dir_remove(lfs, &oldcwd, &oldentry);\n    if (err) {\n        return err;\n    }\n\n    // if we were a directory, find pred, replace tail\n    if (prevexists && preventry.d.type == LFS_TYPE_DIR) {\n        int res = lfs_pred(lfs, dir.pair, &newcwd);\n        if (res < 0) {\n            return res;\n        }\n\n        LFS_ASSERT(res); // must have pred\n        newcwd.d.tail[0] = dir.d.tail[0];\n        newcwd.d.tail[1] = dir.d.tail[1];\n\n        err = lfs_dir_commit(lfs, &newcwd, NULL, 0);\n        if (err) {\n            return err;\n        }\n    }\n\n    return 0;\n}\n\n/// Filesystem operations ///\nstatic void lfs_deinit(lfs_t *lfs)\n{\n    // free allocated memory\n    if (!lfs->cfg->read_buffer) {\n        lfs_free(lfs->rcache.buffer);\n    }\n\n    if (!lfs->cfg->prog_buffer) {\n        lfs_free(lfs->pcache.buffer);\n    }\n\n    if (!lfs->cfg->lookahead_buffer) {\n        lfs_free(lfs->free.buffer);\n    }\n}\n\nstatic int lfs_init(lfs_t *lfs, const struct lfs_config *cfg)\n{\n    lfs->cfg = cfg;\n\n    // setup read cache\n    if (lfs->cfg->read_buffer) {\n        lfs->rcache.buffer = lfs->cfg->read_buffer;\n    } else {\n        lfs->rcache.buffer = lfs_malloc(lfs->cfg->read_size);\n        if (!lfs->rcache.buffer) {\n            goto cleanup;\n        }\n    }\n\n    // setup program cache\n    if (lfs->cfg->prog_buffer) {\n        lfs->pcache.buffer = lfs->cfg->prog_buffer;\n    } else {\n        lfs->pcache.buffer = lfs_malloc(lfs->cfg->prog_size);\n        if (!lfs->pcache.buffer) {\n            goto cleanup;\n        }\n    }\n\n    // zero to avoid information leaks\n    lfs_cache_zero(lfs, &lfs->pcache);\n    lfs_cache_drop(lfs, &lfs->rcache);\n\n    // setup lookahead, round down to nearest 32-bits\n    LFS_ASSERT(lfs->cfg->lookahead % 32 == 0);\n    LFS_ASSERT(lfs->cfg->lookahead > 0);\n    if (lfs->cfg->lookahead_buffer) {\n        lfs->free.buffer = lfs->cfg->lookahead_buffer;\n    } else {\n        lfs->free.buffer = lfs_malloc(lfs->cfg->lookahead / 8);\n        if (!lfs->free.buffer) {\n            goto cleanup;\n        }\n    }\n\n    // check that program and read sizes are multiples of the block size\n    LFS_ASSERT(lfs->cfg->prog_size % lfs->cfg->read_size == 0);\n    LFS_ASSERT(lfs->cfg->block_size % lfs->cfg->prog_size == 0);\n\n    // check that the block size is large enough to fit ctz pointers\n    LFS_ASSERT(4 * lfs_npw2(0xffffffff / (lfs->cfg->block_size - 2 * 4)) <= lfs->cfg->block_size);\n\n    // setup default state\n    lfs->root[0] = 0xffffffff;\n    lfs->root[1] = 0xffffffff;\n    lfs->files = NULL;\n    lfs->dirs = NULL;\n    lfs->deorphaned = false;\n\n    return 0;\n\ncleanup:\n    lfs_deinit(lfs);\n    return LFS_ERR_NOMEM;\n}\n\nint lfs_format(lfs_t *lfs, const struct lfs_config *cfg)\n{\n    int err = 0;\n    if (true) {\n        err = lfs_init(lfs, cfg);\n        if (err) {\n            return err;\n        }\n\n        // create free lookahead\n        memset(lfs->free.buffer, 0, lfs->cfg->lookahead / 8);\n        lfs->free.off = 0;\n        lfs->free.size = lfs_min(lfs->cfg->lookahead, lfs->cfg->block_count);\n        lfs->free.i = 0;\n        lfs_alloc_ack(lfs);\n\n        // create superblock dir\n        lfs_dir_t superdir;\n        err = lfs_dir_alloc(lfs, &superdir);\n        if (err) {\n            goto cleanup;\n        }\n\n        // write root directory\n        lfs_dir_t root;\n        err = lfs_dir_alloc(lfs, &root);\n        if (err) {\n            goto cleanup;\n        }\n\n        err = lfs_dir_commit(lfs, &root, NULL, 0);\n        if (err) {\n            goto cleanup;\n        }\n\n        lfs->root[0] = root.pair[0];\n        lfs->root[1] = root.pair[1];\n\n        // write superblocks\n        lfs_superblock_t superblock = {\n            .off = sizeof(superdir.d),\n            .d.type = LFS_TYPE_SUPERBLOCK,\n            .d.elen = sizeof(superblock.d) - sizeof(superblock.d.magic) - 4,\n            .d.nlen = sizeof(superblock.d.magic),\n            .d.version = LFS_DISK_VERSION,\n            .d.magic = {\"littlefs\"},\n            .d.block_size = lfs->cfg->block_size,\n            .d.block_count = lfs->cfg->block_count,\n            .d.root = {lfs->root[0], lfs->root[1]},\n        };\n        superdir.d.tail[0] = root.pair[0];\n        superdir.d.tail[1] = root.pair[1];\n        superdir.d.size = sizeof(superdir.d) + sizeof(superblock.d) + 4;\n\n        // write both pairs to be safe\n        lfs_superblock_tole32(&superblock.d);\n        bool valid = false;\n        for (int i = 0; i < 2; i++) {\n            err = lfs_dir_commit(\n                lfs, &superdir,\n                (struct lfs_region[]){{sizeof(superdir.d), sizeof(superblock.d), &superblock.d, sizeof(superblock.d)}}, 1);\n            if (err && err != LFS_ERR_CORRUPT) {\n                goto cleanup;\n            }\n\n            valid = valid || !err;\n        }\n\n        if (!valid) {\n            err = LFS_ERR_CORRUPT;\n            goto cleanup;\n        }\n\n        // sanity check that fetch works\n        err = lfs_dir_fetch(lfs, &superdir, (const lfs_block_t[2]){0, 1});\n        if (err) {\n            goto cleanup;\n        }\n\n        lfs_alloc_ack(lfs);\n    }\n\ncleanup:\n    lfs_deinit(lfs);\n    return err;\n}\n\nint lfs_mount(lfs_t *lfs, const struct lfs_config *cfg)\n{\n    int err = 0;\n    if (true) {\n        err = lfs_init(lfs, cfg);\n        if (err) {\n            return err;\n        }\n\n        // setup free lookahead\n        lfs->free.off = 0;\n        lfs->free.size = 0;\n        lfs->free.i = 0;\n        lfs_alloc_ack(lfs);\n\n        // load superblock\n        lfs_dir_t dir;\n        lfs_superblock_t superblock;\n        err = lfs_dir_fetch(lfs, &dir, (const lfs_block_t[2]){0, 1});\n        if (err && err != LFS_ERR_CORRUPT) {\n            goto cleanup;\n        }\n\n        if (!err) {\n            err = lfs_bd_read(lfs, dir.pair[0], sizeof(dir.d), &superblock.d, sizeof(superblock.d));\n            lfs_superblock_fromle32(&superblock.d);\n            if (err) {\n                goto cleanup;\n            }\n\n            lfs->root[0] = superblock.d.root[0];\n            lfs->root[1] = superblock.d.root[1];\n        }\n\n        if (err || memcmp(superblock.d.magic, \"littlefs\", 8) != 0) {\n            LFS_ERROR(\"Invalid superblock at %d %d\", 0, 1);\n            err = LFS_ERR_CORRUPT;\n            goto cleanup;\n        }\n\n        uint16_t major_version = (0xffff & (superblock.d.version >> 16));\n        uint16_t minor_version = (0xffff & (superblock.d.version >> 0));\n        if ((major_version != LFS_DISK_VERSION_MAJOR || minor_version > LFS_DISK_VERSION_MINOR)) {\n            LFS_ERROR(\"Invalid version %d.%d\", major_version, minor_version);\n            err = LFS_ERR_INVAL;\n            goto cleanup;\n        }\n\n        return 0;\n    }\n\ncleanup:\n\n    lfs_deinit(lfs);\n    return err;\n}\n\nint lfs_unmount(lfs_t *lfs)\n{\n    lfs_deinit(lfs);\n    return 0;\n}\n\n/// Littlefs specific operations ///\nint lfs_traverse(lfs_t *lfs, int (*cb)(void *, lfs_block_t), void *data)\n{\n    if (lfs_pairisnull(lfs->root)) {\n        return 0;\n    }\n\n    // iterate over metadata pairs\n    lfs_dir_t dir;\n    lfs_entry_t entry;\n    lfs_block_t cwd[2] = {0, 1};\n\n    while (true) {\n        for (int i = 0; i < 2; i++) {\n            int err = cb(data, cwd[i]);\n            if (err) {\n                return err;\n            }\n        }\n\n        int err = lfs_dir_fetch(lfs, &dir, cwd);\n        if (err) {\n            return err;\n        }\n\n        // iterate over contents\n        while (dir.off + sizeof(entry.d) <= (0x7fffffff & dir.d.size) - 4) {\n            err = lfs_bd_read(lfs, dir.pair[0], dir.off, &entry.d, sizeof(entry.d));\n            lfs_entry_fromle32(&entry.d);\n            if (err) {\n                return err;\n            }\n\n            dir.off += lfs_entry_size(&entry);\n            if ((0x70 & entry.d.type) == (0x70 & LFS_TYPE_REG)) {\n                err = lfs_ctz_traverse(lfs, &lfs->rcache, NULL, entry.d.u.file.head, entry.d.u.file.size, cb, data);\n                if (err) {\n                    return err;\n                }\n            }\n        }\n\n        cwd[0] = dir.d.tail[0];\n        cwd[1] = dir.d.tail[1];\n\n        if (lfs_pairisnull(cwd)) {\n            break;\n        }\n    }\n\n    // iterate over any open files\n    for (lfs_file_t *f = lfs->files; f; f = f->next) {\n        if (f->flags & LFS_F_DIRTY) {\n            int err = lfs_ctz_traverse(lfs, &lfs->rcache, &f->cache, f->head, f->size, cb, data);\n            if (err) {\n                return err;\n            }\n        }\n\n        if (f->flags & LFS_F_WRITING) {\n            int err = lfs_ctz_traverse(lfs, &lfs->rcache, &f->cache, f->block, f->pos, cb, data);\n            if (err) {\n                return err;\n            }\n        }\n    }\n\n    return 0;\n}\n\nstatic int lfs_pred(lfs_t *lfs, const lfs_block_t dir[2], lfs_dir_t *pdir)\n{\n    if (lfs_pairisnull(lfs->root)) {\n        return 0;\n    }\n\n    // iterate over all directory directory entries\n    int err = lfs_dir_fetch(lfs, pdir, (const lfs_block_t[2]){0, 1});\n    if (err) {\n        return err;\n    }\n\n    while (!lfs_pairisnull(pdir->d.tail)) {\n        if (lfs_paircmp(pdir->d.tail, dir) == 0) {\n            return true;\n        }\n\n        err = lfs_dir_fetch(lfs, pdir, pdir->d.tail);\n        if (err) {\n            return err;\n        }\n    }\n\n    return false;\n}\n\nstatic int lfs_parent(lfs_t *lfs, const lfs_block_t dir[2], lfs_dir_t *parent, lfs_entry_t *entry)\n{\n    if (lfs_pairisnull(lfs->root)) {\n        return 0;\n    }\n\n    parent->d.tail[0] = 0;\n    parent->d.tail[1] = 1;\n\n    // iterate over all directory directory entries\n    while (!lfs_pairisnull(parent->d.tail)) {\n        int err = lfs_dir_fetch(lfs, parent, parent->d.tail);\n        if (err) {\n            return err;\n        }\n\n        while (true) {\n            err = lfs_dir_next(lfs, parent, entry);\n            if (err && err != LFS_ERR_NOENT) {\n                return err;\n            }\n\n            if (err == LFS_ERR_NOENT) {\n                break;\n            }\n\n            if (((0x70 & entry->d.type) == (0x70 & LFS_TYPE_DIR)) && lfs_paircmp(entry->d.u.dir, dir) == 0) {\n                return true;\n            }\n        }\n    }\n\n    return false;\n}\n\nstatic int lfs_moved(lfs_t *lfs, const void *e)\n{\n    if (lfs_pairisnull(lfs->root)) {\n        return 0;\n    }\n\n    // skip superblock\n    lfs_dir_t cwd;\n    int err = lfs_dir_fetch(lfs, &cwd, (const lfs_block_t[2]){0, 1});\n    if (err) {\n        return err;\n    }\n\n    // iterate over all directory directory entries\n    lfs_entry_t entry;\n    while (!lfs_pairisnull(cwd.d.tail)) {\n        err = lfs_dir_fetch(lfs, &cwd, cwd.d.tail);\n        if (err) {\n            return err;\n        }\n\n        while (true) {\n            err = lfs_dir_next(lfs, &cwd, &entry);\n            if (err && err != LFS_ERR_NOENT) {\n                return err;\n            }\n\n            if (err == LFS_ERR_NOENT) {\n                break;\n            }\n\n            if (!(0x80 & entry.d.type) && memcmp(&entry.d.u, e, sizeof(entry.d.u)) == 0) {\n                return true;\n            }\n        }\n    }\n\n    return false;\n}\n\nstatic int lfs_relocate(lfs_t *lfs, const lfs_block_t oldpair[2], const lfs_block_t newpair[2])\n{\n    // find parent\n    lfs_dir_t parent;\n    lfs_entry_t entry;\n    int res = lfs_parent(lfs, oldpair, &parent, &entry);\n    if (res < 0) {\n        return res;\n    }\n\n    if (res) {\n        // update disk, this creates a desync\n        entry.d.u.dir[0] = newpair[0];\n        entry.d.u.dir[1] = newpair[1];\n\n        int err = lfs_dir_update(lfs, &parent, &entry, NULL);\n        if (err) {\n            return err;\n        }\n\n        // update internal root\n        if (lfs_paircmp(oldpair, lfs->root) == 0) {\n            LFS_DEBUG(\"Relocating root %\" PRIu32 \" %\" PRIu32, newpair[0], newpair[1]);\n            lfs->root[0] = newpair[0];\n            lfs->root[1] = newpair[1];\n        }\n\n        // clean up bad block, which should now be a desync\n        return lfs_deorphan(lfs);\n    }\n\n    // find pred\n    res = lfs_pred(lfs, oldpair, &parent);\n    if (res < 0) {\n        return res;\n    }\n\n    if (res) {\n        // just replace bad pair, no desync can occur\n        parent.d.tail[0] = newpair[0];\n        parent.d.tail[1] = newpair[1];\n\n        return lfs_dir_commit(lfs, &parent, NULL, 0);\n    }\n\n    // couldn't find dir, must be new\n    return 0;\n}\n\nint lfs_deorphan(lfs_t *lfs)\n{\n    lfs->deorphaned = true;\n\n    if (lfs_pairisnull(lfs->root)) {\n        return 0;\n    }\n\n    lfs_dir_t pdir = {.d.size = 0x80000000};\n    lfs_dir_t cwd = {.d.tail[0] = 0, .d.tail[1] = 1};\n\n    // iterate over all directory directory entries\n    for (lfs_size_t i = 0; i < lfs->cfg->block_count; i++) {\n        if (lfs_pairisnull(cwd.d.tail)) {\n            return 0;\n        }\n\n        int err = lfs_dir_fetch(lfs, &cwd, cwd.d.tail);\n        if (err) {\n            return err;\n        }\n\n        // check head blocks for orphans\n        if (!(0x80000000 & pdir.d.size)) {\n            // check if we have a parent\n            lfs_dir_t parent;\n            lfs_entry_t entry;\n            int res = lfs_parent(lfs, pdir.d.tail, &parent, &entry);\n            if (res < 0) {\n                return res;\n            }\n\n            if (!res) {\n                // we are an orphan\n                LFS_DEBUG(\"Found orphan %\" PRIu32 \" %\" PRIu32, pdir.d.tail[0], pdir.d.tail[1]);\n\n                pdir.d.tail[0] = cwd.d.tail[0];\n                pdir.d.tail[1] = cwd.d.tail[1];\n\n                err = lfs_dir_commit(lfs, &pdir, NULL, 0);\n                if (err) {\n                    return err;\n                }\n\n                return 0;\n            }\n\n            if (!lfs_pairsync(entry.d.u.dir, pdir.d.tail)) {\n                // we have desynced\n                LFS_DEBUG(\"Found desync %\" PRIu32 \" %\" PRIu32, entry.d.u.dir[0], entry.d.u.dir[1]);\n\n                pdir.d.tail[0] = entry.d.u.dir[0];\n                pdir.d.tail[1] = entry.d.u.dir[1];\n\n                err = lfs_dir_commit(lfs, &pdir, NULL, 0);\n                if (err) {\n                    return err;\n                }\n\n                return 0;\n            }\n        }\n\n        // check entries for moves\n        lfs_entry_t entry;\n        while (true) {\n            err = lfs_dir_next(lfs, &cwd, &entry);\n            if (err && err != LFS_ERR_NOENT) {\n                return err;\n            }\n\n            if (err == LFS_ERR_NOENT) {\n                break;\n            }\n\n            // found moved entry\n            if (entry.d.type & 0x80) {\n                int moved = lfs_moved(lfs, &entry.d.u);\n                if (moved < 0) {\n                    return moved;\n                }\n\n                if (moved) {\n                    LFS_DEBUG(\"Found move %\" PRIu32 \" %\" PRIu32, entry.d.u.dir[0], entry.d.u.dir[1]);\n                    err = lfs_dir_remove(lfs, &cwd, &entry);\n                    if (err) {\n                        return err;\n                    }\n                } else {\n                    LFS_DEBUG(\"Found partial move %\" PRIu32 \" %\" PRIu32, entry.d.u.dir[0], entry.d.u.dir[1]);\n                    entry.d.type &= ~0x80;\n                    err = lfs_dir_update(lfs, &cwd, &entry, NULL);\n                    if (err) {\n                        return err;\n                    }\n                }\n            }\n        }\n\n        memcpy(&pdir, &cwd, sizeof(pdir));\n    }\n\n    // If we reached here, we have more directory pairs than blocks in the\n    // filesystem... So something must be horribly wrong\n    return LFS_ERR_CORRUPT;\n}\n"
  },
  {
    "path": "src/platform/stm32wl/littlefs/lfs.h",
    "content": "/*\n * The little filesystem\n *\n * Copyright (c) 2017, Arm Limited. All rights reserved.\n * SPDX-License-Identifier: BSD-3-Clause\n */\n#ifndef LFS_H\n#define LFS_H\n\n#include <stdbool.h>\n#include <stdint.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/// Version info ///\n\n// Software library version\n// Major (top-nibble), incremented on backwards incompatible changes\n// Minor (bottom-nibble), incremented on feature additions\n#define LFS_VERSION 0x00010006\n#define LFS_VERSION_MAJOR (0xffff & (LFS_VERSION >> 16))\n#define LFS_VERSION_MINOR (0xffff & (LFS_VERSION >> 0))\n\n// Version of On-disk data structures\n// Major (top-nibble), incremented on backwards incompatible changes\n// Minor (bottom-nibble), incremented on feature additions\n#define LFS_DISK_VERSION 0x00010001\n#define LFS_DISK_VERSION_MAJOR (0xffff & (LFS_DISK_VERSION >> 16))\n#define LFS_DISK_VERSION_MINOR (0xffff & (LFS_DISK_VERSION >> 0))\n\n/// Definitions ///\n\n// Type definitions\ntypedef uint32_t lfs_size_t;\ntypedef uint32_t lfs_off_t;\n\ntypedef int32_t lfs_ssize_t;\ntypedef int32_t lfs_soff_t;\n\ntypedef uint32_t lfs_block_t;\n\n// Max name size in bytes\n#ifndef LFS_NAME_MAX\n#define LFS_NAME_MAX 255\n#endif\n\n// Possible error codes, these are negative to allow\n// valid positive return values\nenum lfs_error {\n    LFS_ERR_OK = 0,         // No error\n    LFS_ERR_IO = -5,        // Error during device operation\n    LFS_ERR_CORRUPT = -52,  // Corrupted\n    LFS_ERR_NOENT = -2,     // No directory entry\n    LFS_ERR_EXIST = -17,    // Entry already exists\n    LFS_ERR_NOTDIR = -20,   // Entry is not a dir\n    LFS_ERR_ISDIR = -21,    // Entry is a dir\n    LFS_ERR_NOTEMPTY = -39, // Dir is not empty\n    LFS_ERR_BADF = -9,      // Bad file number\n    LFS_ERR_INVAL = -22,    // Invalid parameter\n    LFS_ERR_NOSPC = -28,    // No space left on device\n    LFS_ERR_NOMEM = -12,    // No more memory available\n};\n\n// File types\nenum lfs_type {\n    LFS_TYPE_REG = 0x11,\n    LFS_TYPE_DIR = 0x22,\n    LFS_TYPE_SUPERBLOCK = 0x2e,\n};\n\n// File open flags\nenum lfs_open_flags {\n    // open flags\n    LFS_O_RDONLY = 1,      // Open a file as read only\n    LFS_O_WRONLY = 2,      // Open a file as write only\n    LFS_O_RDWR = 3,        // Open a file as read and write\n    LFS_O_CREAT = 0x0100,  // Create a file if it does not exist\n    LFS_O_EXCL = 0x0200,   // Fail if a file already exists\n    LFS_O_TRUNC = 0x0400,  // Truncate the existing file to zero size\n    LFS_O_APPEND = 0x0800, // Move to end of file on every write\n\n    // internally used flags\n    LFS_F_DIRTY = 0x10000,   // File does not match storage\n    LFS_F_WRITING = 0x20000, // File has been written since last flush\n    LFS_F_READING = 0x40000, // File has been read since last flush\n    LFS_F_ERRED = 0x80000,   // An error occured during write\n};\n\n// File seek flags\nenum lfs_whence_flags {\n    LFS_SEEK_SET = 0, // Seek relative to an absolute position\n    LFS_SEEK_CUR = 1, // Seek relative to the current file position\n    LFS_SEEK_END = 2, // Seek relative to the end of the file\n};\n\n// Configuration provided during initialization of the littlefs\nstruct lfs_config {\n    // Opaque user provided context that can be used to pass\n    // information to the block device operations\n    void *context;\n\n    // Read a region in a block. Negative error codes are propogated\n    // to the user.\n    int (*read)(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size);\n\n    // Program a region in a block. The block must have previously\n    // been erased. Negative error codes are propogated to the user.\n    // May return LFS_ERR_CORRUPT if the block should be considered bad.\n    int (*prog)(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size);\n\n    // Erase a block. A block must be erased before being programmed.\n    // The state of an erased block is undefined. Negative error codes\n    // are propogated to the user.\n    // May return LFS_ERR_CORRUPT if the block should be considered bad.\n    int (*erase)(const struct lfs_config *c, lfs_block_t block);\n\n    // Sync the state of the underlying block device. Negative error codes\n    // are propogated to the user.\n    int (*sync)(const struct lfs_config *c);\n\n    // Minimum size of a block read. This determines the size of read buffers.\n    // This may be larger than the physical read size to improve performance\n    // by caching more of the block device.\n    lfs_size_t read_size;\n\n    // Minimum size of a block program. This determines the size of program\n    // buffers. This may be larger than the physical program size to improve\n    // performance by caching more of the block device.\n    // Must be a multiple of the read size.\n    lfs_size_t prog_size;\n\n    // Size of an erasable block. This does not impact ram consumption and\n    // may be larger than the physical erase size. However, this should be\n    // kept small as each file currently takes up an entire block.\n    // Must be a multiple of the program size.\n    lfs_size_t block_size;\n\n    // Number of erasable blocks on the device.\n    lfs_size_t block_count;\n\n    // Number of blocks to lookahead during block allocation. A larger\n    // lookahead reduces the number of passes required to allocate a block.\n    // The lookahead buffer requires only 1 bit per block so it can be quite\n    // large with little ram impact. Should be a multiple of 32.\n    lfs_size_t lookahead;\n\n    // Optional, statically allocated read buffer. Must be read sized.\n    void *read_buffer;\n\n    // Optional, statically allocated program buffer. Must be program sized.\n    void *prog_buffer;\n\n    // Optional, statically allocated lookahead buffer. Must be 1 bit per\n    // lookahead block.\n    void *lookahead_buffer;\n\n    // Optional, statically allocated buffer for files. Must be program sized.\n    // If enabled, only one file may be opened at a time.\n    void *file_buffer;\n};\n\n// Optional configuration provided during lfs_file_opencfg\nstruct lfs_file_config {\n    // Optional, statically allocated buffer for files. Must be program sized.\n    // If NULL, malloc will be used by default.\n    void *buffer;\n};\n\n// File info structure\nstruct lfs_info {\n    // Type of the file, either LFS_TYPE_REG or LFS_TYPE_DIR\n    uint8_t type;\n\n    // Size of the file, only valid for REG files\n    lfs_size_t size;\n\n    // Name of the file stored as a null-terminated string\n    char name[LFS_NAME_MAX + 1];\n};\n\n/// littlefs data structures ///\ntypedef struct lfs_entry {\n    lfs_off_t off;\n\n    struct lfs_disk_entry {\n        uint8_t type;\n        uint8_t elen;\n        uint8_t alen;\n        uint8_t nlen;\n        union {\n            struct {\n                lfs_block_t head;\n                lfs_size_t size;\n            } file;\n            lfs_block_t dir[2];\n        } u;\n    } d;\n} lfs_entry_t;\n\ntypedef struct lfs_cache {\n    lfs_block_t block;\n    lfs_off_t off;\n    uint8_t *buffer;\n} lfs_cache_t;\n\ntypedef struct lfs_file {\n    struct lfs_file *next;\n    lfs_block_t pair[2];\n    lfs_off_t poff;\n\n    lfs_block_t head;\n    lfs_size_t size;\n\n    const struct lfs_file_config *cfg;\n    uint32_t flags;\n    lfs_off_t pos;\n    lfs_block_t block;\n    lfs_off_t off;\n    lfs_cache_t cache;\n} lfs_file_t;\n\ntypedef struct lfs_dir {\n    struct lfs_dir *next;\n    lfs_block_t pair[2];\n    lfs_off_t off;\n\n    lfs_block_t head[2];\n    lfs_off_t pos;\n\n    struct lfs_disk_dir {\n        uint32_t rev;\n        lfs_size_t size;\n        lfs_block_t tail[2];\n    } d;\n} lfs_dir_t;\n\ntypedef struct lfs_superblock {\n    lfs_off_t off;\n\n    struct lfs_disk_superblock {\n        uint8_t type;\n        uint8_t elen;\n        uint8_t alen;\n        uint8_t nlen;\n        lfs_block_t root[2];\n        uint32_t block_size;\n        uint32_t block_count;\n        uint32_t version;\n        char magic[8];\n    } d;\n} lfs_superblock_t;\n\ntypedef struct lfs_free {\n    lfs_block_t off;\n    lfs_block_t size;\n    lfs_block_t i;\n    lfs_block_t ack;\n    uint32_t *buffer;\n} lfs_free_t;\n\n// The littlefs type\ntypedef struct lfs {\n    const struct lfs_config *cfg;\n\n    lfs_block_t root[2];\n    lfs_file_t *files;\n    lfs_dir_t *dirs;\n\n    lfs_cache_t rcache;\n    lfs_cache_t pcache;\n\n    lfs_free_t free;\n    bool deorphaned;\n} lfs_t;\n\n/// Filesystem functions ///\n\n// Format a block device with the littlefs\n//\n// Requires a littlefs object and config struct. This clobbers the littlefs\n// object, and does not leave the filesystem mounted. The config struct must\n// be zeroed for defaults and backwards compatibility.\n//\n// Returns a negative error code on failure.\nint lfs_format(lfs_t *lfs, const struct lfs_config *config);\n\n// Mounts a littlefs\n//\n// Requires a littlefs object and config struct. Multiple filesystems\n// may be mounted simultaneously with multiple littlefs objects. Both\n// lfs and config must be allocated while mounted. The config struct must\n// be zeroed for defaults and backwards compatibility.\n//\n// Returns a negative error code on failure.\nint lfs_mount(lfs_t *lfs, const struct lfs_config *config);\n\n// Unmounts a littlefs\n//\n// Does nothing besides releasing any allocated resources.\n// Returns a negative error code on failure.\nint lfs_unmount(lfs_t *lfs);\n\n/// General operations ///\n\n// Removes a file or directory\n//\n// If removing a directory, the directory must be empty.\n// Returns a negative error code on failure.\nint lfs_remove(lfs_t *lfs, const char *path);\n\n// Rename or move a file or directory\n//\n// If the destination exists, it must match the source in type.\n// If the destination is a directory, the directory must be empty.\n//\n// Returns a negative error code on failure.\nint lfs_rename(lfs_t *lfs, const char *oldpath, const char *newpath);\n\n// Find info about a file or directory\n//\n// Fills out the info structure, based on the specified file or directory.\n// Returns a negative error code on failure.\nint lfs_stat(lfs_t *lfs, const char *path, struct lfs_info *info);\n\n/// File operations ///\n\n// Open a file\n//\n// The mode that the file is opened in is determined by the flags, which\n// are values from the enum lfs_open_flags that are bitwise-ored together.\n//\n// Returns a negative error code on failure.\nint lfs_file_open(lfs_t *lfs, lfs_file_t *file, const char *path, int flags);\n\n// Open a file with extra configuration\n//\n// The mode that the file is opened in is determined by the flags, which\n// are values from the enum lfs_open_flags that are bitwise-ored together.\n//\n// The config struct provides additional config options per file as described\n// above. The config struct must be allocated while the file is open, and the\n// config struct must be zeroed for defaults and backwards compatibility.\n//\n// Returns a negative error code on failure.\nint lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file, const char *path, int flags, const struct lfs_file_config *config);\n\n// Close a file\n//\n// Any pending writes are written out to storage as though\n// sync had been called and releases any allocated resources.\n//\n// Returns a negative error code on failure.\nint lfs_file_close(lfs_t *lfs, lfs_file_t *file);\n\n// Synchronize a file on storage\n//\n// Any pending writes are written out to storage.\n// Returns a negative error code on failure.\nint lfs_file_sync(lfs_t *lfs, lfs_file_t *file);\n\n// Read data from file\n//\n// Takes a buffer and size indicating where to store the read data.\n// Returns the number of bytes read, or a negative error code on failure.\nlfs_ssize_t lfs_file_read(lfs_t *lfs, lfs_file_t *file, void *buffer, lfs_size_t size);\n\n// Write data to file\n//\n// Takes a buffer and size indicating the data to write. The file will not\n// actually be updated on the storage until either sync or close is called.\n//\n// Returns the number of bytes written, or a negative error code on failure.\nlfs_ssize_t lfs_file_write(lfs_t *lfs, lfs_file_t *file, const void *buffer, lfs_size_t size);\n\n// Change the position of the file\n//\n// The change in position is determined by the offset and whence flag.\n// Returns the old position of the file, or a negative error code on failure.\nlfs_soff_t lfs_file_seek(lfs_t *lfs, lfs_file_t *file, lfs_soff_t off, int whence);\n\n// Truncates the size of the file to the specified size\n//\n// Returns a negative error code on failure.\nint lfs_file_truncate(lfs_t *lfs, lfs_file_t *file, lfs_off_t size);\n\n// Return the position of the file\n//\n// Equivalent to lfs_file_seek(lfs, file, 0, LFS_SEEK_CUR)\n// Returns the position of the file, or a negative error code on failure.\nlfs_soff_t lfs_file_tell(lfs_t *lfs, const lfs_file_t *file);\n\n// Change the position of the file to the beginning of the file\n//\n// Equivalent to lfs_file_seek(lfs, file, 0, LFS_SEEK_CUR)\n// Returns a negative error code on failure.\nint lfs_file_rewind(lfs_t *lfs, lfs_file_t *file);\n\n// Return the size of the file\n//\n// Similar to lfs_file_seek(lfs, file, 0, LFS_SEEK_END)\n// Returns the size of the file, or a negative error code on failure.\nlfs_soff_t lfs_file_size(lfs_t *lfs, lfs_file_t *file);\n\n/// Directory operations ///\n\n// Create a directory\n//\n// Returns a negative error code on failure.\nint lfs_mkdir(lfs_t *lfs, const char *path);\n\n// Open a directory\n//\n// Once open a directory can be used with read to iterate over files.\n// Returns a negative error code on failure.\nint lfs_dir_open(lfs_t *lfs, lfs_dir_t *dir, const char *path);\n\n// Close a directory\n//\n// Releases any allocated resources.\n// Returns a negative error code on failure.\nint lfs_dir_close(lfs_t *lfs, lfs_dir_t *dir);\n\n// Read an entry in the directory\n//\n// Fills out the info structure, based on the specified file or directory.\n// Returns a negative error code on failure.\nint lfs_dir_read(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info);\n\n// Change the position of the directory\n//\n// The new off must be a value previous returned from tell and specifies\n// an absolute offset in the directory seek.\n//\n// Returns a negative error code on failure.\nint lfs_dir_seek(lfs_t *lfs, lfs_dir_t *dir, lfs_off_t off);\n\n// Change the position of the directory to the beginning of the directory\n//\n// Returns a negative error code on failure.\nint lfs_dir_rewind(lfs_t *lfs, lfs_dir_t *dir);\n\n/// Miscellaneous littlefs specific operations ///\n\n// Traverse through all blocks in use by the filesystem\n//\n// The provided callback will be called with each block address that is\n// currently in use by the filesystem. This can be used to determine which\n// blocks are in use or how much of the storage is available.\n//\n// Returns a negative error code on failure.\nint lfs_traverse(lfs_t *lfs, int (*cb)(void *, lfs_block_t), void *data);\n\n// Prunes any recoverable errors that may have occured in the filesystem\n//\n// Not needed to be called by user unless an operation is interrupted\n// but the filesystem is still mounted. This is already called on first\n// allocation.\n//\n// Returns a negative error code on failure.\nint lfs_deorphan(lfs_t *lfs);\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n"
  },
  {
    "path": "src/platform/stm32wl/littlefs/lfs_util.c",
    "content": "/*\n * lfs util functions\n *\n * Copyright (c) 2017, Arm Limited. All rights reserved.\n * SPDX-License-Identifier: BSD-3-Clause\n */\n#include \"lfs_util.h\"\n\n// Only compile if user does not provide custom config\n#ifndef LFS_CONFIG\n\n// Software CRC implementation with small lookup table\nvoid lfs_crc(uint32_t *restrict crc, const void *buffer, size_t size)\n{\n    static const uint32_t rtable[16] = {\n        0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c,\n        0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c,\n    };\n\n    const uint8_t *data = buffer;\n\n    for (size_t i = 0; i < size; i++) {\n        *crc = (*crc >> 4) ^ rtable[(*crc ^ (data[i] >> 0)) & 0xf];\n        *crc = (*crc >> 4) ^ rtable[(*crc ^ (data[i] >> 4)) & 0xf];\n    }\n}\n\n#endif\n"
  },
  {
    "path": "src/platform/stm32wl/littlefs/lfs_util.h",
    "content": "/*\n * lfs utility functions\n *\n * Copyright (c) 2017, Arm Limited. All rights reserved.\n * SPDX-License-Identifier: BSD-3-Clause\n */\n#ifndef LFS_UTIL_H\n#define LFS_UTIL_H\n\n// Users can override lfs_util.h with their own configuration by defining\n// LFS_CONFIG as a header file to include (-DLFS_CONFIG=lfs_config.h).\n//\n// If LFS_CONFIG is used, none of the default utils will be emitted and must be\n// provided by the config file. To start I would suggest copying lfs_util.h and\n// modifying as needed.\n#ifdef LFS_CONFIG\n#define LFS_STRINGIZE(x) LFS_STRINGIZE2(x)\n#define LFS_STRINGIZE2(x) #x\n#include LFS_STRINGIZE(LFS_CONFIG)\n#else\n\n// System includes\n#include <stdbool.h>\n#include <stdint.h>\n#include <string.h>\n\n#ifndef LFS_NO_MALLOC\n#include <stdlib.h>\n#endif\n#ifndef LFS_NO_ASSERT\n#include <assert.h>\n#endif\n\n#if !CFG_DEBUG\n#define LFS_NO_DEBUG\n#define LFS_NO_WARN\n#define LFS_NO_ERROR\n#endif\n\n#if !defined(LFS_NO_DEBUG) || !defined(LFS_NO_WARN) || !defined(LFS_NO_ERROR)\n#include <stdio.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// Macros, may be replaced by system specific wrappers. Arguments to these\n// macros must not have side-effects as the macros can be removed for a smaller\n// code footprint\n\n// Logging functions\n#ifndef LFS_NO_DEBUG\n#define LFS_DEBUG(fmt, ...) printf(\"lfs debug:%d: \" fmt \"\\n\", __LINE__, __VA_ARGS__)\n#else\n#define LFS_DEBUG(fmt, ...)\n#endif\n\n#ifndef LFS_NO_WARN\n#define LFS_WARN(fmt, ...) printf(\"lfs warn:%d: \" fmt \"\\n\", __LINE__, __VA_ARGS__)\n#else\n#define LFS_WARN(fmt, ...)\n#endif\n\n#ifndef LFS_NO_ERROR\n#define LFS_ERROR(fmt, ...) printf(\"lfs error:%d: \" fmt \"\\n\", __LINE__, __VA_ARGS__)\n#else\n#define LFS_ERROR(fmt, ...)\n#endif\n\n// Runtime assertions\n#ifndef LFS_NO_ASSERT\n#define LFS_ASSERT(test) assert(test)\n#else\n#define LFS_ASSERT(test)\n#endif\n\n// Builtin functions, these may be replaced by more efficient\n// toolchain-specific implementations. LFS_NO_INTRINSICS falls back to a more\n// expensive basic C implementation for debugging purposes\n\n// Min/max functions for unsigned 32-bit numbers\nstatic inline uint32_t lfs_max(uint32_t a, uint32_t b)\n{\n    return (a > b) ? a : b;\n}\n\nstatic inline uint32_t lfs_min(uint32_t a, uint32_t b)\n{\n    return (a < b) ? a : b;\n}\n\n// Find the next smallest power of 2 less than or equal to a\nstatic inline uint32_t lfs_npw2(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM))\n    return 32 - __builtin_clz(a - 1);\n#else\n    uint32_t r = 0;\n    uint32_t s;\n    a -= 1;\n    s = (a > 0xffff) << 4;\n    a >>= s;\n    r |= s;\n    s = (a > 0xff) << 3;\n    a >>= s;\n    r |= s;\n    s = (a > 0xf) << 2;\n    a >>= s;\n    r |= s;\n    s = (a > 0x3) << 1;\n    a >>= s;\n    r |= s;\n    return (r | (a >> 1)) + 1;\n#endif\n}\n\n// Count the number of trailing binary zeros in a\n// lfs_ctz(0) may be undefined\nstatic inline uint32_t lfs_ctz(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && defined(__GNUC__)\n    return __builtin_ctz(a);\n#else\n    return lfs_npw2((a & -a) + 1) - 1;\n#endif\n}\n\n// Count the number of binary ones in a\nstatic inline uint32_t lfs_popc(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM))\n    return __builtin_popcount(a);\n#else\n    a = a - ((a >> 1) & 0x55555555);\n    a = (a & 0x33333333) + ((a >> 2) & 0x33333333);\n    return (((a + (a >> 4)) & 0xf0f0f0f) * 0x1010101) >> 24;\n#endif\n}\n\n// Find the sequence comparison of a and b, this is the distance\n// between a and b ignoring overflow\nstatic inline int lfs_scmp(uint32_t a, uint32_t b)\n{\n    return (int)(unsigned)(a - b);\n}\n\n// Convert from 32-bit little-endian to native order\nstatic inline uint32_t lfs_fromle32(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && ((defined(BYTE_ORDER) && BYTE_ORDER == ORDER_LITTLE_ENDIAN) ||                                \\\n                                    (defined(__BYTE_ORDER) && __BYTE_ORDER == __ORDER_LITTLE_ENDIAN) ||                          \\\n                                    (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))\n    return a;\n#elif !defined(LFS_NO_INTRINSICS) &&                                                                                             \\\n    ((defined(BYTE_ORDER) && BYTE_ORDER == ORDER_BIG_ENDIAN) || (defined(__BYTE_ORDER) && __BYTE_ORDER == __ORDER_BIG_ENDIAN) || \\\n     (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))\n    return __builtin_bswap32(a);\n#else\n    return (((uint8_t *)&a)[0] << 0) | (((uint8_t *)&a)[1] << 8) | (((uint8_t *)&a)[2] << 16) | (((uint8_t *)&a)[3] << 24);\n#endif\n}\n\n// Convert to 32-bit little-endian from native order\nstatic inline uint32_t lfs_tole32(uint32_t a)\n{\n    return lfs_fromle32(a);\n}\n\n// Calculate CRC-32 with polynomial = 0x04c11db7\nvoid lfs_crc(uint32_t *crc, const void *buffer, size_t size);\n\n// Allocate memory, only used if buffers are not provided to littlefs\nstatic inline void *lfs_malloc(size_t size)\n{\n#ifndef LFS_NO_MALLOC\n    return malloc(size);\n#else\n    (void)size;\n    return NULL;\n#endif\n}\n\n// Deallocate memory, only used if buffers are not provided to littlefs\nstatic inline void lfs_free(void *p)\n{\n#ifndef LFS_NO_MALLOC\n    free(p);\n#else\n    (void)p;\n#endif\n}\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n#endif\n"
  },
  {
    "path": "src/platform/stm32wl/main-stm32wl.cpp",
    "content": "#include \"RTC.h\"\n#include \"configuration.h\"\n#include <stm32wle5xx.h>\n#include <stm32wlxx_hal.h>\n\nvoid setBluetoothEnable(bool enable) {}\n\nvoid playStartMelody() {}\n\nvoid updateBatteryLevel(uint8_t level) {}\n\nvoid getMacAddr(uint8_t *dmac)\n{\n    // https://flit.github.io/2020/06/06/mcu-unique-id-survey.html\n    const uint32_t uid0 = HAL_GetUIDw0(); // X/Y coordinate on wafer\n    const uint32_t uid1 = HAL_GetUIDw1(); // [31:8] Lot number (23:0), [7:0] Wafer number\n    const uint32_t uid2 = HAL_GetUIDw2(); // Lot number (55:24)\n\n    // Need to go from 96-bit to 48-bit unique ID\n    dmac[5] = (uint8_t)uid0;\n    dmac[4] = (uint8_t)(uid0 >> 16);\n    dmac[3] = (uint8_t)uid1;\n    dmac[2] = (uint8_t)(uid1 >> 8);\n    dmac[1] = (uint8_t)uid2;\n    dmac[0] = (uint8_t)(uid2 >> 8);\n}\n\nvoid cpuDeepSleep(uint32_t msecToWake) {}\n\n// Hacks to force more code and data out.\n\n// By default __assert_func uses fiprintf which pulls in stdio.\nextern \"C\" void __wrap___assert_func(const char *, int, const char *, const char *)\n{\n    while (true)\n        ;\n    return;\n}\n\n// By default strerror has a lot of strings we probably don't use. Make it return an empty string instead.\nchar empty = 0;\nextern \"C\" char *__wrap_strerror(int)\n{\n    return &empty;\n}\n\n#ifdef MESHTASTIC_EXCLUDE_TZ\nstruct _reent;\n\n// Even if you don't use timezones, mktime will try to set the timezone anyway with _tzset_unlocked(), which pulls in scanf and\n// friends. The timezone is initialized to UTC by default.\nextern \"C\" void __wrap__tzset_unlocked_r(struct _reent *reent_ptr)\n{\n    return;\n}\n#endif"
  },
  {
    "path": "src/power/PowerHAL.cpp",
    "content": "\n#include \"PowerHAL.h\"\n\nvoid powerHAL_init()\n{\n    return powerHAL_platformInit();\n}\n\n__attribute__((weak, noinline)) void powerHAL_platformInit() {}\n\n__attribute__((weak, noinline)) bool powerHAL_isPowerLevelSafe()\n{\n    return true;\n}\n\n__attribute__((weak, noinline)) bool powerHAL_isVBUSConnected()\n{\n    return false;\n}\n"
  },
  {
    "path": "src/power/PowerHAL.h",
    "content": "\n/*\n\nPower Hardware Abstraction Layer. Set of API calls to offload power management, measurements, reboots, etc\nto the platform and variant code to avoid #ifdef spaghetti hell and limitless device-based edge cases\nin the main firmware code\n\nFunctions declared here (with exception of powerHAL_init) should be defined in platform specific codebase.\nDefault function body does usually nothing.\n\n*/\n\n// Initialize HAL layer. Call it as early as possible during device boot\n// do not overwrite it as it's not declared with \"weak\" attribute.\nvoid powerHAL_init();\n\n// platform specific init code if needed to be run early on boot\nvoid powerHAL_platformInit();\n\n// Return true if current battery level is safe for device operation (for example flash writes).\n// This should be reported by power failure comparator (NRF52) or similar circuits on other platforms.\n// Do not use battery ADC as improper ADC configuration may prevent device from booting.\nbool powerHAL_isPowerLevelSafe();\n\n// return if USB voltage is connected\nbool powerHAL_isVBUSConnected();\n"
  },
  {
    "path": "src/power.h",
    "content": "#pragma once\n#include \"PowerStatus.h\"\n#include \"concurrency/OSThread.h\"\n#include \"configuration.h\"\n\n#ifdef ARCH_ESP32\n// \"legacy adc calibration driver is deprecated, please migrate to use esp_adc/adc_cali.h and esp_adc/adc_cali_scheme.h\n#include <esp_adc_cal.h>\n#include <soc/adc_channel.h>\n#endif\n\n#ifndef NUM_OCV_POINTS\n#define NUM_OCV_POINTS 11\n#endif\n\n// Device specific curves go in variant.h\n#ifndef OCV_ARRAY\n#define OCV_ARRAY 4190, 4050, 3990, 3890, 3800, 3720, 3630, 3530, 3420, 3300, 3100\n#endif\n\n/*Note: 12V lead acid is 6 cells, most board accept only 1 cell LiIon/LiPo*/\n#ifndef NUM_CELLS\n#define NUM_CELLS 1\n#endif\n\n#ifdef BAT_MEASURE_ADC_UNIT\nextern RTC_NOINIT_ATTR uint64_t RTC_reg_b;\n#include \"soc/sens_reg.h\" // needed for adc pin reset\n#endif\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n#include \"modules/Telemetry/Sensor/nullSensor.h\"\n#if __has_include(<Adafruit_INA219.h>)\n#include \"modules/Telemetry/Sensor/INA219Sensor.h\"\nextern INA219Sensor ina219Sensor;\n#else\nextern NullSensor ina219Sensor;\n#endif\n\n#if __has_include(<INA226.h>)\n#include \"modules/Telemetry/Sensor/INA226Sensor.h\"\nextern INA226Sensor ina226Sensor;\n#else\nextern NullSensor ina226Sensor;\n#endif\n\n#if __has_include(<Adafruit_INA260.h>)\n#include \"modules/Telemetry/Sensor/INA260Sensor.h\"\nextern INA260Sensor ina260Sensor;\n#else\nextern NullSensor ina260Sensor;\n#endif\n\n#if __has_include(<INA3221.h>)\n#include \"modules/Telemetry/Sensor/INA3221Sensor.h\"\nextern INA3221Sensor ina3221Sensor;\n#else\nextern NullSensor ina3221Sensor;\n#endif\n\n#endif\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR\n#if __has_include(<Adafruit_MAX1704X.h>)\n#include \"modules/Telemetry/Sensor/MAX17048Sensor.h\"\nextern MAX17048Sensor max17048Sensor;\n#else\nextern NullSensor max17048Sensor;\n#endif\n#endif\n\n#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && HAS_RAKPROT\n#include \"modules/Telemetry/Sensor/RAK9154Sensor.h\"\nextern RAK9154Sensor rak9154Sensor;\n#endif\n\n#ifdef HAS_PMU\n#include \"XPowersAXP192.tpp\"\n#include \"XPowersAXP2101.tpp\"\n#include \"XPowersLibInterface.hpp\"\nextern XPowersLibInterface *PMU;\n#endif\n\nclass Power : private concurrency::OSThread\n{\n\n  public:\n    Observable<const meshtastic::PowerStatus *> newStatus;\n\n    Power();\n\n    void powerCommandsCheck();\n    void readPowerStatus();\n    virtual bool setup();\n    virtual int32_t runOnce() override;\n    void setStatusHandler(meshtastic::PowerStatus *handler) { statusHandler = handler; }\n    const uint16_t OCV[11] = {OCV_ARRAY};\n\n  protected:\n    meshtastic::PowerStatus *statusHandler;\n\n    /// Setup a xpowers chip axp192/axp2101, return true if found\n    bool axpChipInit();\n    /// Setup a simple ADC input based battery sensor\n    bool analogInit();\n    /// Setup cw2015 battery level sensor\n    bool cw2015Init();\n    /// Setup a 17048 battery level sensor\n    bool max17048Init();\n    /// Setup a Lipo charger\n    bool lipoChargerInit();\n    /// Setup a meshSolar battery sensor\n    bool meshSolarInit();\n    /// Setup a serial battery sensor\n    bool serialBatteryInit();\n\n  private:\n    void shutdown();\n    void reboot();\n    // open circuit voltage lookup table\n    uint8_t low_voltage_counter;\n    uint32_t lastLogTime = 0;\n#ifdef DEBUG_HEAP\n    uint32_t lastheap;\n#endif\n};\n\nvoid battery_adcEnable();\n\nextern Power *power;\n"
  },
  {
    "path": "src/serialization/JSON.cpp",
    "content": "/*\n * File JSON.cpp part of the SimpleJSON Library - http://mjpa.in/json\n *\n * Copyright (C) 2010 Mike Anchor\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#include \"JSON.h\"\n\n/**\n * Blocks off the public constructor\n *\n * @access private\n *\n */\nJSON::JSON() {}\n\n/**\n * Parses a complete JSON encoded string\n *\n * @access public\n *\n * @param char* data The JSON text\n *\n * @return JSONValue* Returns a JSON Value representing the root, or NULL on error\n */\nJSONValue *JSON::Parse(const char *data)\n{\n    // Skip any preceding whitespace, end of data = no JSON = fail\n    if (!SkipWhitespace(&data))\n        return NULL;\n\n    // We need the start of a value here now...\n    JSONValue *value = JSONValue::Parse(&data);\n    if (value == NULL)\n        return NULL;\n\n    // Can be white space now and should be at the end of the string then...\n    if (SkipWhitespace(&data)) {\n        delete value;\n        return NULL;\n    }\n\n    // We're now at the end of the string\n    return value;\n}\n\n/**\n * Turns the passed in JSONValue into a JSON encode string\n *\n * @access public\n *\n * @param JSONValue* value The root value\n *\n * @return std::string Returns a JSON encoded string representation of the given value\n */\nstd::string JSON::Stringify(const JSONValue *value)\n{\n    if (value != NULL)\n        return value->Stringify();\n    else\n        return \"\";\n}\n\n/**\n * Skips over any whitespace characters (space, tab, \\r or \\n) defined by the JSON spec\n *\n * @access protected\n *\n * @param char** data Pointer to a char* that contains the JSON text\n *\n * @return bool Returns true if there is more data, or false if the end of the text was reached\n */\nbool JSON::SkipWhitespace(const char **data)\n{\n    while (**data != 0 && (**data == ' ' || **data == '\\t' || **data == '\\r' || **data == '\\n'))\n        (*data)++;\n\n    return **data != 0;\n}\n\n/**\n * Extracts a JSON String as defined by the spec - \"<some chars>\"\n * Any escaped characters are swapped out for their unescaped values\n *\n * @access protected\n *\n * @param char** data Pointer to a char* that contains the JSON text\n * @param std::string& str Reference to a std::string to receive the extracted string\n *\n * @return bool Returns true on success, false on failure\n */\nbool JSON::ExtractString(const char **data, std::string &str)\n{\n    str = \"\";\n\n    while (**data != 0) {\n        // Save the char so we can change it if need be\n        char next_char = **data;\n\n        // Escaping something?\n        if (next_char == '\\\\') {\n            // Move over the escape char\n            (*data)++;\n\n            // Deal with the escaped char\n            switch (**data) {\n            case '\"':\n                next_char = '\"';\n                break;\n            case '\\\\':\n                next_char = '\\\\';\n                break;\n            case '/':\n                next_char = '/';\n                break;\n            case 'b':\n                next_char = '\\b';\n                break;\n            case 'f':\n                next_char = '\\f';\n                break;\n            case 'n':\n                next_char = '\\n';\n                break;\n            case 'r':\n                next_char = '\\r';\n                break;\n            case 't':\n                next_char = '\\t';\n                break;\n            case 'u': {\n                // We need 5 chars (4 hex + the 'u') or its not valid\n                if (!simplejson_csnlen(*data, 5))\n                    return false;\n\n                // Deal with the chars\n                next_char = 0;\n                for (int i = 0; i < 4; i++) {\n                    // Do it first to move off the 'u' and leave us on the\n                    // final hex digit as we move on by one later on\n                    (*data)++;\n\n                    next_char <<= 4;\n\n                    // Parse the hex digit\n                    if (**data >= '0' && **data <= '9')\n                        next_char |= (**data - '0');\n                    else if (**data >= 'A' && **data <= 'F')\n                        next_char |= (10 + (**data - 'A'));\n                    else if (**data >= 'a' && **data <= 'f')\n                        next_char |= (10 + (**data - 'a'));\n                    else {\n                        // Invalid hex digit = invalid JSON\n                        return false;\n                    }\n                }\n                break;\n            }\n\n            // By the spec, only the above cases are allowed\n            default:\n                return false;\n            }\n        }\n\n        // End of the string?\n        else if (next_char == '\"') {\n            (*data)++;\n            str.shrink_to_fit(); // Remove unused capacity\n            return true;\n        }\n\n        // Disallowed char?\n        else if (next_char < ' ' && next_char != '\\t') {\n            // SPEC Violation: Allow tabs due to real world cases\n            return false;\n        }\n\n        // Add the next char\n        str += next_char;\n\n        // Move on\n        (*data)++;\n    }\n\n    // If we're here, the string ended incorrectly\n    return false;\n}\n\n/**\n * Parses some text as though it is an integer\n *\n * @access protected\n *\n * @param char** data Pointer to a char* that contains the JSON text\n *\n * @return double Returns the double value of the number found\n */\ndouble JSON::ParseInt(const char **data)\n{\n    double integer = 0;\n    while (**data != 0 && **data >= '0' && **data <= '9')\n        integer = integer * 10 + (*(*data)++ - '0');\n\n    return integer;\n}\n\n/**\n * Parses some text as though it is a decimal\n *\n * @access protected\n *\n * @param char** data Pointer to a char* that contains the JSON text\n *\n * @return double Returns the double value of the decimal found\n */\ndouble JSON::ParseDecimal(const char **data)\n{\n    double decimal = 0.0;\n    double factor = 0.1;\n    while (**data != 0 && **data >= '0' && **data <= '9') {\n        int digit = (*(*data)++ - '0');\n        decimal = decimal + digit * factor;\n        factor *= 0.1;\n    }\n    return decimal;\n}\n"
  },
  {
    "path": "src/serialization/JSON.h",
    "content": "/*\n * File JSON.h part of the SimpleJSON Library - http://mjpa.in/json\n *\n * Copyright (C) 2010 Mike Anchor\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#ifndef _JSON_H_\n#define _JSON_H_\n\n#include <cstring>\n#include <map>\n#include <string>\n#include <vector>\n\n// Simple function to check a string 's' has at least 'n' characters\nstatic inline bool simplejson_csnlen(const char *s, size_t n)\n{\n    if (s == 0)\n        return false;\n\n    const char *save = s;\n    while (n-- > 0) {\n        if (*(save++) == 0)\n            return false;\n    }\n\n    return true;\n}\n\n// Custom types\nclass JSONValue;\ntypedef std::vector<JSONValue *> JSONArray;\ntypedef std::map<std::string, JSONValue *> JSONObject;\n\n#include \"JSONValue.h\"\n\nclass JSON\n{\n    friend class JSONValue;\n\n  public:\n    static JSONValue *Parse(const char *data);\n    static std::string Stringify(const JSONValue *value);\n\n  protected:\n    static bool SkipWhitespace(const char **data);\n    static bool ExtractString(const char **data, std::string &str);\n    static double ParseInt(const char **data);\n    static double ParseDecimal(const char **data);\n\n  private:\n    JSON();\n};\n\n#endif\n"
  },
  {
    "path": "src/serialization/JSONValue.cpp",
    "content": "/*\n * File JSONValue.cpp part of the SimpleJSON Library - http://mjpa.in/json\n *\n * Copyright (C) 2010 Mike Anchor\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#include <math.h>\n#include <sstream>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <string>\n#include <vector>\n\n#include \"JSONValue.h\"\n\n// Macros to free an array/object\n#define FREE_ARRAY(x)                                                                                                            \\\n    {                                                                                                                            \\\n        JSONArray::iterator iter;                                                                                                \\\n        for (iter = x.begin(); iter != x.end(); ++iter) {                                                                        \\\n            delete *iter;                                                                                                        \\\n        }                                                                                                                        \\\n    }\n#define FREE_OBJECT(x)                                                                                                           \\\n    {                                                                                                                            \\\n        JSONObject::iterator iter;                                                                                               \\\n        for (iter = x.begin(); iter != x.end(); ++iter) {                                                                        \\\n            delete (*iter).second;                                                                                               \\\n        }                                                                                                                        \\\n    }\n\n/**\n * Parses a JSON encoded value to a JSONValue object\n *\n * @access protected\n *\n * @param char** data Pointer to a char* that contains the data\n *\n * @return JSONValue* Returns a pointer to a JSONValue object on success, NULL on error\n */\nJSONValue *JSONValue::Parse(const char **data)\n{\n    // Is it a string?\n    if (**data == '\"') {\n        std::string str;\n        if (!JSON::ExtractString(&(++(*data)), str))\n            return NULL;\n        else\n            return new JSONValue(str);\n    }\n\n    // Is it a boolean?\n    else if ((simplejson_csnlen(*data, 4) && strncasecmp(*data, \"true\", 4) == 0) ||\n             (simplejson_csnlen(*data, 5) && strncasecmp(*data, \"false\", 5) == 0)) {\n        bool value = strncasecmp(*data, \"true\", 4) == 0;\n        (*data) += value ? 4 : 5;\n        return new JSONValue(value);\n    }\n\n    // Is it a null?\n    else if (simplejson_csnlen(*data, 4) && strncasecmp(*data, \"null\", 4) == 0) {\n        (*data) += 4;\n        return new JSONValue();\n    }\n\n    // Is it a number?\n    else if (**data == '-' || (**data >= '0' && **data <= '9')) {\n        // Negative?\n        bool neg = **data == '-';\n        if (neg)\n            (*data)++;\n\n        double number = 0.0;\n\n        // Parse the whole part of the number - only if it wasn't 0\n        if (**data == '0')\n            (*data)++;\n        else if (**data >= '1' && **data <= '9')\n            number = JSON::ParseInt(data);\n        else\n            return NULL;\n\n        // Could be a decimal now...\n        if (**data == '.') {\n            (*data)++;\n\n            // Not get any digits?\n            if (!(**data >= '0' && **data <= '9'))\n                return NULL;\n\n            // Find the decimal and sort the decimal place out\n            // Use ParseDecimal as ParseInt won't work with decimals less than 0.1\n            // thanks to Javier Abadia for the report & fix\n            double decimal = JSON::ParseDecimal(data);\n\n            // Save the number\n            number += decimal;\n        }\n\n        // Could be an exponent now...\n        if (**data == 'E' || **data == 'e') {\n            (*data)++;\n\n            // Check signage of expo\n            bool neg_expo = false;\n            if (**data == '-' || **data == '+') {\n                neg_expo = **data == '-';\n                (*data)++;\n            }\n\n            // Not get any digits?\n            if (!(**data >= '0' && **data <= '9'))\n                return NULL;\n\n            // Sort the expo out\n            double expo = JSON::ParseInt(data);\n            for (double i = 0.0; i < expo; i++)\n                number = neg_expo ? (number / 10.0) : (number * 10.0);\n        }\n\n        // Was it neg?\n        if (neg)\n            number *= -1;\n\n        return new JSONValue(number);\n    }\n\n    // An object?\n    else if (**data == '{') {\n        JSONObject object;\n\n        (*data)++;\n\n        while (**data != 0) {\n            // Whitespace at the start?\n            if (!JSON::SkipWhitespace(data)) {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            // Special case - empty object\n            if (object.size() == 0 && **data == '}') {\n                (*data)++;\n                return new JSONValue(object);\n            }\n\n            // We want a string now...\n            std::string name;\n            if (!JSON::ExtractString(&(++(*data)), name)) {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            // More whitespace?\n            if (!JSON::SkipWhitespace(data)) {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            // Need a : now\n            if (*((*data)++) != ':') {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            // More whitespace?\n            if (!JSON::SkipWhitespace(data)) {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            // The value is here\n            JSONValue *value = Parse(data);\n            if (value == NULL) {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            // Add the name:value\n            if (object.find(name) != object.end())\n                delete object[name];\n            object[name] = value;\n\n            // More whitespace?\n            if (!JSON::SkipWhitespace(data)) {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            // End of object?\n            if (**data == '}') {\n                (*data)++;\n                return new JSONValue(object);\n            }\n\n            // Want a , now\n            if (**data != ',') {\n                FREE_OBJECT(object);\n                return NULL;\n            }\n\n            (*data)++;\n        }\n\n        // Only here if we ran out of data\n        FREE_OBJECT(object);\n        return NULL;\n    }\n\n    // An array?\n    else if (**data == '[') {\n        JSONArray array;\n\n        (*data)++;\n\n        while (**data != 0) {\n            // Whitespace at the start?\n            if (!JSON::SkipWhitespace(data)) {\n                FREE_ARRAY(array);\n                return NULL;\n            }\n\n            // Special case - empty array\n            if (array.size() == 0 && **data == ']') {\n                (*data)++;\n                return new JSONValue(array);\n            }\n\n            // Get the value\n            JSONValue *value = Parse(data);\n            if (value == NULL) {\n                FREE_ARRAY(array);\n                return NULL;\n            }\n\n            // Add the value\n            array.push_back(value);\n\n            // More whitespace?\n            if (!JSON::SkipWhitespace(data)) {\n                FREE_ARRAY(array);\n                return NULL;\n            }\n\n            // End of array?\n            if (**data == ']') {\n                (*data)++;\n                return new JSONValue(array);\n            }\n\n            // Want a , now\n            if (**data != ',') {\n                FREE_ARRAY(array);\n                return NULL;\n            }\n\n            (*data)++;\n        }\n\n        // Only here if we ran out of data\n        FREE_ARRAY(array);\n        return NULL;\n    }\n\n    // Ran out of possibilities, it's bad!\n    else {\n        return NULL;\n    }\n}\n\n/**\n * Basic constructor for creating a JSON Value of type NULL\n *\n * @access public\n */\nJSONValue::JSONValue(/*NULL*/)\n{\n    type = JSONType_Null;\n}\n\n/**\n * Basic constructor for creating a JSON Value of type String\n *\n * @access public\n *\n * @param char* m_char_value The string to use as the value\n */\nJSONValue::JSONValue(const char *m_char_value)\n{\n    type = JSONType_String;\n    string_value = new std::string(std::string(m_char_value));\n}\n\n/**\n * Basic constructor for creating a JSON Value of type String\n *\n * @access public\n *\n * @param std::string m_string_value The string to use as the value\n */\nJSONValue::JSONValue(const std::string &m_string_value)\n{\n    type = JSONType_String;\n    string_value = new std::string(m_string_value);\n}\n\n/**\n * Basic constructor for creating a JSON Value of type Bool\n *\n * @access public\n *\n * @param bool m_bool_value The bool to use as the value\n */\nJSONValue::JSONValue(bool m_bool_value)\n{\n    type = JSONType_Bool;\n    bool_value = m_bool_value;\n}\n\n/**\n * Basic constructor for creating a JSON Value of type Number\n *\n * @access public\n *\n * @param double m_number_value The number to use as the value\n */\nJSONValue::JSONValue(double m_number_value)\n{\n    type = JSONType_Number;\n    number_value = m_number_value;\n}\n\n/**\n * Basic constructor for creating a JSON Value of type Number\n *\n * @access public\n *\n * @param int m_integer_value The number to use as the value\n */\nJSONValue::JSONValue(int m_integer_value)\n{\n    type = JSONType_Number;\n    number_value = (double)m_integer_value;\n}\n\n/**\n * Basic constructor for creating a JSON Value of type Number\n *\n * @access public\n *\n * @param unsigned int m_integer_value The number to use as the value\n */\nJSONValue::JSONValue(unsigned int m_integer_value)\n{\n    type = JSONType_Number;\n    number_value = (double)m_integer_value;\n}\n\n/**\n * Basic constructor for creating a JSON Value of type Array\n *\n * @access public\n *\n * @param JSONArray m_array_value The JSONArray to use as the value\n */\nJSONValue::JSONValue(const JSONArray &m_array_value)\n{\n    type = JSONType_Array;\n    array_value = new JSONArray(m_array_value);\n}\n\n/**\n * Basic constructor for creating a JSON Value of type Object\n *\n * @access public\n *\n * @param JSONObject m_object_value The JSONObject to use as the value\n */\nJSONValue::JSONValue(const JSONObject &m_object_value)\n{\n    type = JSONType_Object;\n    object_value = new JSONObject(m_object_value);\n}\n\n/**\n * Copy constructor to perform a deep copy of array / object values\n *\n * @access public\n *\n * @param JSONValue m_source The source JSONValue that is being copied\n */\nJSONValue::JSONValue(const JSONValue &m_source)\n{\n    type = m_source.type;\n\n    switch (type) {\n    case JSONType_String:\n        string_value = new std::string(*m_source.string_value);\n        break;\n\n    case JSONType_Bool:\n        bool_value = m_source.bool_value;\n        break;\n\n    case JSONType_Number:\n        number_value = m_source.number_value;\n        break;\n\n    case JSONType_Array: {\n        JSONArray source_array = *m_source.array_value;\n        JSONArray::iterator iter;\n        array_value = new JSONArray();\n        for (iter = source_array.begin(); iter != source_array.end(); ++iter)\n            array_value->push_back(new JSONValue(**iter));\n        break;\n    }\n\n    case JSONType_Object: {\n        JSONObject source_object = *m_source.object_value;\n        object_value = new JSONObject();\n        JSONObject::iterator iter;\n        for (iter = source_object.begin(); iter != source_object.end(); ++iter) {\n            std::string name = (*iter).first;\n            (*object_value)[name] = new JSONValue(*((*iter).second));\n        }\n        break;\n    }\n\n    case JSONType_Null:\n        // Nothing to do.\n        break;\n    }\n}\n\n/**\n * The destructor for the JSON Value object\n * Handles deleting the objects in the array or the object value\n *\n * @access public\n */\nJSONValue::~JSONValue()\n{\n    if (type == JSONType_Array) {\n        JSONArray::iterator iter;\n        for (iter = array_value->begin(); iter != array_value->end(); ++iter)\n            delete *iter;\n        delete array_value;\n    } else if (type == JSONType_Object) {\n        JSONObject::iterator iter;\n        for (iter = object_value->begin(); iter != object_value->end(); ++iter) {\n            delete (*iter).second;\n        }\n        delete object_value;\n    } else if (type == JSONType_String) {\n        delete string_value;\n    }\n}\n\n/**\n * Checks if the value is a NULL\n *\n * @access public\n *\n * @return bool Returns true if it is a NULL value, false otherwise\n */\nbool JSONValue::IsNull() const\n{\n    return type == JSONType_Null;\n}\n\n/**\n * Checks if the value is a String\n *\n * @access public\n *\n * @return bool Returns true if it is a String value, false otherwise\n */\nbool JSONValue::IsString() const\n{\n    return type == JSONType_String;\n}\n\n/**\n * Checks if the value is a Bool\n *\n * @access public\n *\n * @return bool Returns true if it is a Bool value, false otherwise\n */\nbool JSONValue::IsBool() const\n{\n    return type == JSONType_Bool;\n}\n\n/**\n * Checks if the value is a Number\n *\n * @access public\n *\n * @return bool Returns true if it is a Number value, false otherwise\n */\nbool JSONValue::IsNumber() const\n{\n    return type == JSONType_Number;\n}\n\n/**\n * Checks if the value is an Array\n *\n * @access public\n *\n * @return bool Returns true if it is an Array value, false otherwise\n */\nbool JSONValue::IsArray() const\n{\n    return type == JSONType_Array;\n}\n\n/**\n * Checks if the value is an Object\n *\n * @access public\n *\n * @return bool Returns true if it is an Object value, false otherwise\n */\nbool JSONValue::IsObject() const\n{\n    return type == JSONType_Object;\n}\n\n/**\n * Retrieves the String value of this JSONValue\n * Use IsString() before using this method.\n *\n * @access public\n *\n * @return std::string Returns the string value\n */\nconst std::string &JSONValue::AsString() const\n{\n    return (*string_value);\n}\n\n/**\n * Retrieves the Bool value of this JSONValue\n * Use IsBool() before using this method.\n *\n * @access public\n *\n * @return bool Returns the bool value\n */\nbool JSONValue::AsBool() const\n{\n    return bool_value;\n}\n\n/**\n * Retrieves the Number value of this JSONValue\n * Use IsNumber() before using this method.\n *\n * @access public\n *\n * @return double Returns the number value\n */\ndouble JSONValue::AsNumber() const\n{\n    return number_value;\n}\n\n/**\n * Retrieves the Array value of this JSONValue\n * Use IsArray() before using this method.\n *\n * @access public\n *\n * @return JSONArray Returns the array value\n */\nconst JSONArray &JSONValue::AsArray() const\n{\n    return (*array_value);\n}\n\n/**\n * Retrieves the Object value of this JSONValue\n * Use IsObject() before using this method.\n *\n * @access public\n *\n * @return JSONObject Returns the object value\n */\nconst JSONObject &JSONValue::AsObject() const\n{\n    return (*object_value);\n}\n\n/**\n * Retrieves the number of children of this JSONValue.\n * This number will be 0 or the actual number of children\n * if IsArray() or IsObject().\n *\n * @access public\n *\n * @return The number of children.\n */\nstd::size_t JSONValue::CountChildren() const\n{\n    switch (type) {\n    case JSONType_Array:\n        return array_value->size();\n    case JSONType_Object:\n        return object_value->size();\n    default:\n        return 0;\n    }\n}\n\n/**\n * Checks if this JSONValue has a child at the given index.\n * Use IsArray() before using this method.\n *\n * @access public\n *\n * @return bool Returns true if the array has a value at the given index.\n */\nbool JSONValue::HasChild(std::size_t index) const\n{\n    if (type == JSONType_Array) {\n        return index < array_value->size();\n    } else {\n        return false;\n    }\n}\n\n/**\n * Retrieves the child of this JSONValue at the given index.\n * Use IsArray() before using this method.\n *\n * @access public\n *\n * @return JSONValue* Returns JSONValue at the given index or NULL\n *                    if it doesn't exist.\n */\nJSONValue *JSONValue::Child(std::size_t index)\n{\n    if (index < array_value->size()) {\n        return (*array_value)[index];\n    } else {\n        return NULL;\n    }\n}\n\n/**\n * Checks if this JSONValue has a child at the given key.\n * Use IsObject() before using this method.\n *\n * @access public\n *\n * @return bool Returns true if the object has a value at the given key.\n */\nbool JSONValue::HasChild(const char *name) const\n{\n    if (type == JSONType_Object) {\n        return object_value->find(name) != object_value->end();\n    } else {\n        return false;\n    }\n}\n\n/**\n * Retrieves the child of this JSONValue at the given key.\n * Use IsObject() before using this method.\n *\n * @access public\n *\n * @return JSONValue* Returns JSONValue for the given key in the object\n *                    or NULL if it doesn't exist.\n */\nJSONValue *JSONValue::Child(const char *name)\n{\n    JSONObject::const_iterator it = object_value->find(name);\n    if (it != object_value->end()) {\n        return it->second;\n    } else {\n        return NULL;\n    }\n}\n\n/**\n * Retrieves the keys of the JSON Object or an empty vector\n * if this value is not an object.\n *\n * @access public\n *\n * @return std::vector<std::string> A vector containing the keys.\n */\nstd::vector<std::string> JSONValue::ObjectKeys() const\n{\n    std::vector<std::string> keys;\n\n    if (type == JSONType_Object) {\n        JSONObject::const_iterator iter = object_value->begin();\n        while (iter != object_value->end()) {\n            keys.push_back(iter->first);\n\n            ++iter;\n        }\n    }\n\n    return keys;\n}\n\n/**\n * Creates a JSON encoded string for the value with all necessary characters escaped\n *\n * @access public\n *\n * @param bool prettyprint Enable prettyprint\n *\n * @return std::string Returns the JSON string\n */\nstd::string JSONValue::Stringify(bool const prettyprint) const\n{\n    size_t const indentDepth = prettyprint ? 1 : 0;\n    return StringifyImpl(indentDepth);\n}\n\n/**\n * Creates a JSON encoded string for the value with all necessary characters escaped\n *\n * @access private\n *\n * @param size_t indentDepth The prettyprint indentation depth (0 : no prettyprint)\n *\n * @return std::string Returns the JSON string\n */\nstd::string JSONValue::StringifyImpl(size_t const indentDepth) const\n{\n    std::string ret_string;\n    size_t const indentDepth1 = indentDepth ? indentDepth + 1 : 0;\n    std::string const indentStr = Indent(indentDepth);\n    std::string const indentStr1 = Indent(indentDepth1);\n\n    switch (type) {\n    case JSONType_Null:\n        ret_string = \"null\";\n        break;\n\n    case JSONType_String:\n        ret_string = StringifyString(*string_value);\n        break;\n\n    case JSONType_Bool:\n        ret_string = bool_value ? \"true\" : \"false\";\n        break;\n\n    case JSONType_Number: {\n        if (isinf(number_value) || isnan(number_value))\n            ret_string = \"null\";\n        else {\n            std::stringstream ss;\n            ss.precision(15);\n            ss << number_value;\n            ret_string = ss.str();\n        }\n        break;\n    }\n\n    case JSONType_Array: {\n        ret_string = indentDepth ? \"[\\n\" + indentStr1 : \"[\";\n        JSONArray::const_iterator iter = array_value->begin();\n        while (iter != array_value->end()) {\n            ret_string += (*iter)->StringifyImpl(indentDepth1);\n\n            // Not at the end - add a separator\n            if (++iter != array_value->end())\n                ret_string += \",\";\n        }\n        ret_string += indentDepth ? \"\\n\" + indentStr + \"]\" : \"]\";\n        break;\n    }\n\n    case JSONType_Object: {\n        ret_string = indentDepth ? \"{\\n\" + indentStr1 : \"{\";\n        JSONObject::const_iterator iter = object_value->begin();\n        while (iter != object_value->end()) {\n            ret_string += StringifyString((*iter).first);\n            ret_string += \":\";\n            ret_string += (*iter).second->StringifyImpl(indentDepth1);\n\n            // Not at the end - add a separator\n            if (++iter != object_value->end())\n                ret_string += \",\";\n        }\n        ret_string += indentDepth ? \"\\n\" + indentStr + \"}\" : \"}\";\n        break;\n    }\n    }\n\n    return ret_string;\n}\n\n/**\n * Creates a JSON encoded string with all required fields escaped\n * Works from http://www.ecma-internationl.org/publications/files/ECMA-ST/ECMA-262.pdf\n * Section 15.12.3.\n *\n * @access private\n *\n * @param std::string str The string that needs to have the characters escaped\n *\n * @return std::string Returns the JSON string\n */\nstd::string JSONValue::StringifyString(const std::string &str)\n{\n    std::string str_out = \"\\\"\";\n\n    std::string::const_iterator iter = str.begin();\n    while (iter != str.end()) {\n        char chr = *iter;\n\n        if (chr == '\"' || chr == '\\\\' || chr == '/') {\n            str_out += '\\\\';\n            str_out += chr;\n        } else if (chr == '\\b') {\n            str_out += \"\\\\b\";\n        } else if (chr == '\\f') {\n            str_out += \"\\\\f\";\n        } else if (chr == '\\n') {\n            str_out += \"\\\\n\";\n        } else if (chr == '\\r') {\n            str_out += \"\\\\r\";\n        } else if (chr == '\\t') {\n            str_out += \"\\\\t\";\n        } else if (chr < 0x20 || chr == 0x7F) {\n            char buf[7];\n            snprintf(buf, sizeof(buf), \"\\\\u%04x\", chr);\n            str_out += buf;\n        } else if (chr < 0x80) {\n            str_out += chr;\n        } else {\n            str_out += chr;\n            size_t remain = str.end() - iter - 1;\n            if ((chr & 0xE0) == 0xC0 && remain >= 1) {\n                ++iter;\n                str_out += *iter;\n            } else if ((chr & 0xF0) == 0xE0 && remain >= 2) {\n                str_out += *(++iter);\n                str_out += *(++iter);\n            } else if ((chr & 0xF8) == 0xF0 && remain >= 3) {\n                str_out += *(++iter);\n                str_out += *(++iter);\n                str_out += *(++iter);\n            }\n        }\n\n        ++iter;\n    }\n\n    str_out += \"\\\"\";\n    return str_out;\n}\n\n/**\n * Creates the indentation string for the depth given\n *\n * @access private\n *\n * @param size_t indent The prettyprint indentation depth (0 : no indentation)\n *\n * @return std::string Returns the string\n */\nstd::string JSONValue::Indent(size_t depth)\n{\n    const size_t indent_step = 2;\n    depth ? --depth : 0;\n    std::string indentStr(depth * indent_step, ' ');\n    return indentStr;\n}"
  },
  {
    "path": "src/serialization/JSONValue.h",
    "content": "/*\n * File JSONValue.h part of the SimpleJSON Library - http://mjpa.in/json\n *\n * Copyright (C) 2010 Mike Anchor\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n#ifndef _JSONVALUE_H_\n#define _JSONVALUE_H_\n\n#include <string>\n#include <vector>\n\n#include \"JSON.h\"\n\nclass JSON;\n\nenum JSONType { JSONType_Null, JSONType_String, JSONType_Bool, JSONType_Number, JSONType_Array, JSONType_Object };\n\nclass JSONValue\n{\n    friend class JSON;\n\n  public:\n    JSONValue(/*NULL*/);\n    explicit JSONValue(const char *m_char_value);\n    explicit JSONValue(const std::string &m_string_value);\n    explicit JSONValue(bool m_bool_value);\n    explicit JSONValue(double m_number_value);\n    explicit JSONValue(int m_integer_value);\n    explicit JSONValue(unsigned int m_integer_value);\n    explicit JSONValue(const JSONArray &m_array_value);\n    explicit JSONValue(const JSONObject &m_object_value);\n    explicit JSONValue(const JSONValue &m_source);\n    ~JSONValue();\n\n    bool IsNull() const;\n    bool IsString() const;\n    bool IsBool() const;\n    bool IsNumber() const;\n    bool IsArray() const;\n    bool IsObject() const;\n\n    const std::string &AsString() const;\n    bool AsBool() const;\n    double AsNumber() const;\n    const JSONArray &AsArray() const;\n    const JSONObject &AsObject() const;\n\n    std::size_t CountChildren() const;\n    bool HasChild(std::size_t index) const;\n    JSONValue *Child(std::size_t index);\n    bool HasChild(const char *name) const;\n    JSONValue *Child(const char *name);\n    std::vector<std::string> ObjectKeys() const;\n\n    std::string Stringify(bool const prettyprint = false) const;\n\n  protected:\n    static JSONValue *Parse(const char **data);\n\n  private:\n    static std::string StringifyString(const std::string &str);\n    std::string StringifyImpl(size_t const indentDepth) const;\n    static std::string Indent(size_t depth);\n\n    JSONType type;\n\n    union {\n        bool bool_value;\n        double number_value;\n        std::string *string_value;\n        JSONArray *array_value;\n        JSONObject *object_value;\n    };\n};\n\n#endif"
  },
  {
    "path": "src/serialization/MeshPacketSerializer.cpp",
    "content": "#ifndef NRF52_USE_JSON\n#include \"MeshPacketSerializer.h\"\n#include \"JSON.h\"\n#include \"NodeDB.h\"\n#include \"mesh/generated/meshtastic/mqtt.pb.h\"\n#include \"mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"modules/RoutingModule.h\"\n#include <DebugConfiguration.h>\n#include <mesh-pb-constants.h>\n#if defined(ARCH_ESP32)\n#include \"../mesh/generated/meshtastic/paxcount.pb.h\"\n#endif\n#include \"mesh/generated/meshtastic/remote_hardware.pb.h\"\n#include <sys/types.h>\n\nstatic const char *errStr = \"Error decoding proto for %s message!\";\n\nstd::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp, bool shouldLog)\n{\n    // the created jsonObj is immutable after creation, so\n    // we need to do the heavy lifting before assembling it.\n    std::string msgType;\n    JSONObject jsonObj;\n\n    if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        JSONObject msgPayload;\n        switch (mp->decoded.portnum) {\n        case meshtastic_PortNum_TEXT_MESSAGE_APP: {\n            msgType = \"text\";\n            // convert bytes to string\n            if (shouldLog)\n                LOG_DEBUG(\"got text message of size %u\", mp->decoded.payload.size);\n\n            char payloadStr[(mp->decoded.payload.size) + 1];\n            memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size);\n            payloadStr[mp->decoded.payload.size] = 0; // null terminated string\n            // check if this is a JSON payload\n            JSONValue *json_value = JSON::Parse(payloadStr);\n            if (json_value != NULL) {\n                if (shouldLog)\n                    LOG_INFO(\"text message payload is of type json\");\n\n                // if it is, then we can just use the json object\n                jsonObj[\"payload\"] = json_value;\n            } else {\n                // if it isn't, then we need to create a json object\n                // with the string as the value\n                if (shouldLog)\n                    LOG_INFO(\"text message payload is of type plaintext\");\n\n                msgPayload[\"text\"] = new JSONValue(payloadStr);\n                jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            }\n            break;\n        }\n        case meshtastic_PortNum_TELEMETRY_APP: {\n            msgType = \"telemetry\";\n            meshtastic_Telemetry scratch;\n            meshtastic_Telemetry *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Telemetry_msg, &scratch)) {\n                decoded = &scratch;\n                if (decoded->which_variant == meshtastic_Telemetry_device_metrics_tag) {\n                    // If battery is present, encode the battery level value\n                    // TODO - Add a condition to send a code for a non-present value\n                    if (decoded->variant.device_metrics.has_battery_level) {\n                        msgPayload[\"battery_level\"] = new JSONValue((int)decoded->variant.device_metrics.battery_level);\n                    }\n                    msgPayload[\"voltage\"] = new JSONValue(decoded->variant.device_metrics.voltage);\n                    msgPayload[\"channel_utilization\"] = new JSONValue(decoded->variant.device_metrics.channel_utilization);\n                    msgPayload[\"air_util_tx\"] = new JSONValue(decoded->variant.device_metrics.air_util_tx);\n                    msgPayload[\"uptime_seconds\"] = new JSONValue((unsigned int)decoded->variant.device_metrics.uptime_seconds);\n                } else if (decoded->which_variant == meshtastic_Telemetry_environment_metrics_tag) {\n                    // Avoid sending 0s for sensors that could be 0\n                    if (decoded->variant.environment_metrics.has_temperature) {\n                        msgPayload[\"temperature\"] = new JSONValue(decoded->variant.environment_metrics.temperature);\n                    }\n                    if (decoded->variant.environment_metrics.has_relative_humidity) {\n                        msgPayload[\"relative_humidity\"] = new JSONValue(decoded->variant.environment_metrics.relative_humidity);\n                    }\n                    if (decoded->variant.environment_metrics.has_barometric_pressure) {\n                        msgPayload[\"barometric_pressure\"] =\n                            new JSONValue(decoded->variant.environment_metrics.barometric_pressure);\n                    }\n                    if (decoded->variant.environment_metrics.has_gas_resistance) {\n                        msgPayload[\"gas_resistance\"] = new JSONValue(decoded->variant.environment_metrics.gas_resistance);\n                    }\n                    if (decoded->variant.environment_metrics.has_voltage) {\n                        msgPayload[\"voltage\"] = new JSONValue(decoded->variant.environment_metrics.voltage);\n                    }\n                    if (decoded->variant.environment_metrics.has_current) {\n                        msgPayload[\"current\"] = new JSONValue(decoded->variant.environment_metrics.current);\n                    }\n                    if (decoded->variant.environment_metrics.has_lux) {\n                        msgPayload[\"lux\"] = new JSONValue(decoded->variant.environment_metrics.lux);\n                    }\n                    if (decoded->variant.environment_metrics.has_white_lux) {\n                        msgPayload[\"white_lux\"] = new JSONValue(decoded->variant.environment_metrics.white_lux);\n                    }\n                    if (decoded->variant.environment_metrics.has_iaq) {\n                        msgPayload[\"iaq\"] = new JSONValue((uint)decoded->variant.environment_metrics.iaq);\n                    }\n                    if (decoded->variant.environment_metrics.has_distance) {\n                        msgPayload[\"distance\"] = new JSONValue(decoded->variant.environment_metrics.distance);\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_speed) {\n                        msgPayload[\"wind_speed\"] = new JSONValue(decoded->variant.environment_metrics.wind_speed);\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_direction) {\n                        msgPayload[\"wind_direction\"] = new JSONValue((uint)decoded->variant.environment_metrics.wind_direction);\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_gust) {\n                        msgPayload[\"wind_gust\"] = new JSONValue(decoded->variant.environment_metrics.wind_gust);\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_lull) {\n                        msgPayload[\"wind_lull\"] = new JSONValue(decoded->variant.environment_metrics.wind_lull);\n                    }\n                    if (decoded->variant.environment_metrics.has_radiation) {\n                        msgPayload[\"radiation\"] = new JSONValue(decoded->variant.environment_metrics.radiation);\n                    }\n                    if (decoded->variant.environment_metrics.has_ir_lux) {\n                        msgPayload[\"ir_lux\"] = new JSONValue(decoded->variant.environment_metrics.ir_lux);\n                    }\n                    if (decoded->variant.environment_metrics.has_uv_lux) {\n                        msgPayload[\"uv_lux\"] = new JSONValue(decoded->variant.environment_metrics.uv_lux);\n                    }\n                    if (decoded->variant.environment_metrics.has_weight) {\n                        msgPayload[\"weight\"] = new JSONValue(decoded->variant.environment_metrics.weight);\n                    }\n                    if (decoded->variant.environment_metrics.has_rainfall_1h) {\n                        msgPayload[\"rainfall_1h\"] = new JSONValue(decoded->variant.environment_metrics.rainfall_1h);\n                    }\n                    if (decoded->variant.environment_metrics.has_rainfall_24h) {\n                        msgPayload[\"rainfall_24h\"] = new JSONValue(decoded->variant.environment_metrics.rainfall_24h);\n                    }\n                    if (decoded->variant.environment_metrics.has_soil_moisture) {\n                        msgPayload[\"soil_moisture\"] = new JSONValue((uint)decoded->variant.environment_metrics.soil_moisture);\n                    }\n                    if (decoded->variant.environment_metrics.has_soil_temperature) {\n                        msgPayload[\"soil_temperature\"] = new JSONValue(decoded->variant.environment_metrics.soil_temperature);\n                    }\n                } else if (decoded->which_variant == meshtastic_Telemetry_air_quality_metrics_tag) {\n                    if (decoded->variant.air_quality_metrics.has_pm10_standard) {\n                        msgPayload[\"pm10\"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm10_standard);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_pm25_standard) {\n                        msgPayload[\"pm25\"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm25_standard);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_pm100_standard) {\n                        msgPayload[\"pm100\"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.pm100_standard);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_co2) {\n                        msgPayload[\"co2\"] = new JSONValue((unsigned int)decoded->variant.air_quality_metrics.co2);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_co2_temperature) {\n                        msgPayload[\"co2_temperature\"] = new JSONValue(decoded->variant.air_quality_metrics.co2_temperature);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_co2_humidity) {\n                        msgPayload[\"co2_humidity\"] = new JSONValue(decoded->variant.air_quality_metrics.co2_humidity);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_form_formaldehyde) {\n                        msgPayload[\"form_formaldehyde\"] = new JSONValue(decoded->variant.air_quality_metrics.form_formaldehyde);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_form_temperature) {\n                        msgPayload[\"form_temperature\"] = new JSONValue(decoded->variant.air_quality_metrics.form_temperature);\n                    }\n                    if (decoded->variant.air_quality_metrics.has_form_humidity) {\n                        msgPayload[\"form_humidity\"] = new JSONValue(decoded->variant.air_quality_metrics.form_humidity);\n                    }\n                } else if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) {\n                    if (decoded->variant.power_metrics.has_ch1_voltage) {\n                        msgPayload[\"voltage_ch1\"] = new JSONValue(decoded->variant.power_metrics.ch1_voltage);\n                    }\n                    if (decoded->variant.power_metrics.has_ch1_current) {\n                        msgPayload[\"current_ch1\"] = new JSONValue(decoded->variant.power_metrics.ch1_current);\n                    }\n                    if (decoded->variant.power_metrics.has_ch2_voltage) {\n                        msgPayload[\"voltage_ch2\"] = new JSONValue(decoded->variant.power_metrics.ch2_voltage);\n                    }\n                    if (decoded->variant.power_metrics.has_ch2_current) {\n                        msgPayload[\"current_ch2\"] = new JSONValue(decoded->variant.power_metrics.ch2_current);\n                    }\n                    if (decoded->variant.power_metrics.has_ch3_voltage) {\n                        msgPayload[\"voltage_ch3\"] = new JSONValue(decoded->variant.power_metrics.ch3_voltage);\n                    }\n                    if (decoded->variant.power_metrics.has_ch3_current) {\n                        msgPayload[\"current_ch3\"] = new JSONValue(decoded->variant.power_metrics.ch3_current);\n                    }\n                }\n                jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            } else if (shouldLog) {\n                LOG_ERROR(errStr, msgType.c_str());\n            }\n            break;\n        }\n        case meshtastic_PortNum_NODEINFO_APP: {\n            msgType = \"nodeinfo\";\n            meshtastic_User scratch;\n            meshtastic_User *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_User_msg, &scratch)) {\n                decoded = &scratch;\n                msgPayload[\"id\"] = new JSONValue(decoded->id);\n                msgPayload[\"longname\"] = new JSONValue(decoded->long_name);\n                msgPayload[\"shortname\"] = new JSONValue(decoded->short_name);\n                msgPayload[\"hardware\"] = new JSONValue(decoded->hw_model);\n                msgPayload[\"role\"] = new JSONValue((int)decoded->role);\n                jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            } else if (shouldLog) {\n                LOG_ERROR(errStr, msgType.c_str());\n            }\n            break;\n        }\n        case meshtastic_PortNum_POSITION_APP: {\n            msgType = \"position\";\n            meshtastic_Position scratch;\n            meshtastic_Position *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Position_msg, &scratch)) {\n                decoded = &scratch;\n                if ((int)decoded->time) {\n                    msgPayload[\"time\"] = new JSONValue((unsigned int)decoded->time);\n                }\n                if ((int)decoded->timestamp) {\n                    msgPayload[\"timestamp\"] = new JSONValue((unsigned int)decoded->timestamp);\n                }\n                msgPayload[\"latitude_i\"] = new JSONValue((int)decoded->latitude_i);\n                msgPayload[\"longitude_i\"] = new JSONValue((int)decoded->longitude_i);\n                if ((int)decoded->altitude) {\n                    msgPayload[\"altitude\"] = new JSONValue((int)decoded->altitude);\n                }\n                if ((int)decoded->ground_speed) {\n                    msgPayload[\"ground_speed\"] = new JSONValue((unsigned int)decoded->ground_speed);\n                }\n                if (int(decoded->ground_track)) {\n                    msgPayload[\"ground_track\"] = new JSONValue((unsigned int)decoded->ground_track);\n                }\n                if (int(decoded->sats_in_view)) {\n                    msgPayload[\"sats_in_view\"] = new JSONValue((unsigned int)decoded->sats_in_view);\n                }\n                if ((int)decoded->PDOP) {\n                    msgPayload[\"PDOP\"] = new JSONValue((int)decoded->PDOP);\n                }\n                if ((int)decoded->HDOP) {\n                    msgPayload[\"HDOP\"] = new JSONValue((int)decoded->HDOP);\n                }\n                if ((int)decoded->VDOP) {\n                    msgPayload[\"VDOP\"] = new JSONValue((int)decoded->VDOP);\n                }\n                if ((int)decoded->precision_bits) {\n                    msgPayload[\"precision_bits\"] = new JSONValue((int)decoded->precision_bits);\n                }\n                jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            } else if (shouldLog) {\n                LOG_ERROR(errStr, msgType.c_str());\n            }\n            break;\n        }\n        case meshtastic_PortNum_WAYPOINT_APP: {\n            msgType = \"waypoint\";\n            meshtastic_Waypoint scratch;\n            meshtastic_Waypoint *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Waypoint_msg, &scratch)) {\n                decoded = &scratch;\n                msgPayload[\"id\"] = new JSONValue((unsigned int)decoded->id);\n                msgPayload[\"name\"] = new JSONValue(decoded->name);\n                msgPayload[\"description\"] = new JSONValue(decoded->description);\n                msgPayload[\"expire\"] = new JSONValue((unsigned int)decoded->expire);\n                msgPayload[\"locked_to\"] = new JSONValue((unsigned int)decoded->locked_to);\n                msgPayload[\"latitude_i\"] = new JSONValue((int)decoded->latitude_i);\n                msgPayload[\"longitude_i\"] = new JSONValue((int)decoded->longitude_i);\n                jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            } else if (shouldLog) {\n                LOG_ERROR(errStr, msgType.c_str());\n            }\n            break;\n        }\n        case meshtastic_PortNum_NEIGHBORINFO_APP: {\n            msgType = \"neighborinfo\";\n            meshtastic_NeighborInfo scratch;\n            meshtastic_NeighborInfo *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_NeighborInfo_msg,\n                                     &scratch)) {\n                decoded = &scratch;\n                msgPayload[\"node_id\"] = new JSONValue((unsigned int)decoded->node_id);\n                msgPayload[\"node_broadcast_interval_secs\"] = new JSONValue((unsigned int)decoded->node_broadcast_interval_secs);\n                msgPayload[\"last_sent_by_id\"] = new JSONValue((unsigned int)decoded->last_sent_by_id);\n                msgPayload[\"neighbors_count\"] = new JSONValue(decoded->neighbors_count);\n                JSONArray neighbors;\n                for (uint8_t i = 0; i < decoded->neighbors_count; i++) {\n                    JSONObject neighborObj;\n                    neighborObj[\"node_id\"] = new JSONValue((unsigned int)decoded->neighbors[i].node_id);\n                    neighborObj[\"snr\"] = new JSONValue((int)decoded->neighbors[i].snr);\n                    neighbors.push_back(new JSONValue(neighborObj));\n                }\n                msgPayload[\"neighbors\"] = new JSONValue(neighbors);\n                jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            } else if (shouldLog) {\n                LOG_ERROR(errStr, msgType.c_str());\n            }\n            break;\n        }\n        case meshtastic_PortNum_TRACEROUTE_APP: {\n            if (mp->decoded.request_id) { // Only report the traceroute response\n                msgType = \"traceroute\";\n                meshtastic_RouteDiscovery scratch;\n                meshtastic_RouteDiscovery *decoded = NULL;\n                memset(&scratch, 0, sizeof(scratch));\n                if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_RouteDiscovery_msg,\n                                         &scratch)) {\n                    decoded = &scratch;\n                    JSONArray route;      // Route this message took\n                    JSONArray routeBack;  // Route this message took back\n                    JSONArray snrTowards; // Snr for forward route\n                    JSONArray snrBack;    // Snr for reverse route\n\n                    // Lambda function for adding a long name to the route\n                    auto addToRoute = [](JSONArray *route, NodeNum num) {\n                        char long_name[40] = \"Unknown\";\n                        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(num);\n                        bool name_known = node ? node->has_user : false;\n                        if (name_known)\n                            memcpy(long_name, node->user.long_name, sizeof(long_name));\n                        route->push_back(new JSONValue(long_name));\n                    };\n                    addToRoute(&route, mp->to); // Started at the original transmitter (destination of response)\n                    for (uint8_t i = 0; i < decoded->route_count; i++) {\n                        addToRoute(&route, decoded->route[i]);\n                    }\n                    addToRoute(&route, mp->from); // Ended at the original destination (source of response)\n\n                    addToRoute(&routeBack, mp->from); // Started at the original destination (source of response)\n                    for (uint8_t i = 0; i < decoded->route_back_count; i++) {\n                        addToRoute(&routeBack, decoded->route_back[i]);\n                    }\n                    addToRoute(&routeBack, mp->to); // Ended at the original transmitter (destination of response)\n\n                    for (uint8_t i = 0; i < decoded->snr_back_count; i++) {\n                        snrBack.push_back(new JSONValue((float)decoded->snr_back[i] / 4));\n                    }\n\n                    for (uint8_t i = 0; i < decoded->snr_towards_count; i++) {\n                        snrTowards.push_back(new JSONValue((float)decoded->snr_towards[i] / 4));\n                    }\n\n                    msgPayload[\"route\"] = new JSONValue(route);\n                    msgPayload[\"route_back\"] = new JSONValue(routeBack);\n                    msgPayload[\"snr_back\"] = new JSONValue(snrBack);\n                    msgPayload[\"snr_towards\"] = new JSONValue(snrTowards);\n                    jsonObj[\"payload\"] = new JSONValue(msgPayload);\n                } else if (shouldLog) {\n                    LOG_ERROR(errStr, msgType.c_str());\n                }\n            }\n            break;\n        }\n        case meshtastic_PortNum_DETECTION_SENSOR_APP: {\n            msgType = \"detection\";\n            char payloadStr[(mp->decoded.payload.size) + 1];\n            memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size);\n            payloadStr[mp->decoded.payload.size] = 0; // null terminated string\n            msgPayload[\"text\"] = new JSONValue(payloadStr);\n            jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            break;\n        }\n#ifdef ARCH_ESP32\n        case meshtastic_PortNum_PAXCOUNTER_APP: {\n            msgType = \"paxcounter\";\n            meshtastic_Paxcount scratch;\n            meshtastic_Paxcount *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Paxcount_msg, &scratch)) {\n                decoded = &scratch;\n                msgPayload[\"wifi_count\"] = new JSONValue((unsigned int)decoded->wifi);\n                msgPayload[\"ble_count\"] = new JSONValue((unsigned int)decoded->ble);\n                msgPayload[\"uptime\"] = new JSONValue((unsigned int)decoded->uptime);\n                jsonObj[\"payload\"] = new JSONValue(msgPayload);\n            } else if (shouldLog) {\n                LOG_ERROR(errStr, msgType.c_str());\n            }\n            break;\n        }\n#endif\n        case meshtastic_PortNum_REMOTE_HARDWARE_APP: {\n            meshtastic_HardwareMessage scratch;\n            meshtastic_HardwareMessage *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_HardwareMessage_msg,\n                                     &scratch)) {\n                decoded = &scratch;\n                if (decoded->type == meshtastic_HardwareMessage_Type_GPIOS_CHANGED) {\n                    msgType = \"gpios_changed\";\n                    msgPayload[\"gpio_value\"] = new JSONValue((unsigned int)decoded->gpio_value);\n                    jsonObj[\"payload\"] = new JSONValue(msgPayload);\n                } else if (decoded->type == meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY) {\n                    msgType = \"gpios_read_reply\";\n                    msgPayload[\"gpio_value\"] = new JSONValue((unsigned int)decoded->gpio_value);\n                    msgPayload[\"gpio_mask\"] = new JSONValue((unsigned int)decoded->gpio_mask);\n                    jsonObj[\"payload\"] = new JSONValue(msgPayload);\n                }\n            } else if (shouldLog) {\n                LOG_ERROR(errStr, \"RemoteHardware\");\n            }\n            break;\n        }\n        // add more packet types here if needed\n        default:\n            break;\n        }\n    } else if (shouldLog) {\n        LOG_WARN(\"Couldn't convert encrypted payload of MeshPacket to JSON\");\n    }\n\n    jsonObj[\"id\"] = new JSONValue((unsigned int)mp->id);\n    jsonObj[\"timestamp\"] = new JSONValue((unsigned int)mp->rx_time);\n    jsonObj[\"to\"] = new JSONValue((unsigned int)mp->to);\n    jsonObj[\"from\"] = new JSONValue((unsigned int)mp->from);\n    jsonObj[\"channel\"] = new JSONValue((unsigned int)mp->channel);\n    jsonObj[\"type\"] = new JSONValue(msgType.c_str());\n    jsonObj[\"sender\"] = new JSONValue(nodeDB->getNodeId().c_str());\n    if (mp->rx_rssi != 0)\n        jsonObj[\"rssi\"] = new JSONValue((int)mp->rx_rssi);\n    if (mp->rx_snr != 0)\n        jsonObj[\"snr\"] = new JSONValue((float)mp->rx_snr);\n    const int8_t hopsAway = getHopsAway(*mp);\n    if (hopsAway >= 0) {\n        jsonObj[\"hops_away\"] = new JSONValue((unsigned int)(hopsAway));\n        jsonObj[\"hop_start\"] = new JSONValue((unsigned int)(mp->hop_start));\n    }\n\n    // serialize and write it to the stream\n    JSONValue *value = new JSONValue(jsonObj);\n    std::string jsonStr = value->Stringify();\n\n    if (shouldLog)\n        LOG_INFO(\"serialized json message: %s\", jsonStr.c_str());\n\n    delete value;\n    return jsonStr;\n}\n\nstd::string MeshPacketSerializer::JsonSerializeEncrypted(const meshtastic_MeshPacket *mp)\n{\n    JSONObject jsonObj;\n\n    jsonObj[\"id\"] = new JSONValue((unsigned int)mp->id);\n    jsonObj[\"time_ms\"] = new JSONValue((double)millis());\n    jsonObj[\"timestamp\"] = new JSONValue((unsigned int)mp->rx_time);\n    jsonObj[\"to\"] = new JSONValue((unsigned int)mp->to);\n    jsonObj[\"from\"] = new JSONValue((unsigned int)mp->from);\n    jsonObj[\"channel\"] = new JSONValue((unsigned int)mp->channel);\n    jsonObj[\"want_ack\"] = new JSONValue(mp->want_ack);\n\n    if (mp->rx_rssi != 0)\n        jsonObj[\"rssi\"] = new JSONValue((int)mp->rx_rssi);\n    if (mp->rx_snr != 0)\n        jsonObj[\"snr\"] = new JSONValue((float)mp->rx_snr);\n    const int8_t hopsAway = getHopsAway(*mp);\n    if (hopsAway >= 0) {\n        jsonObj[\"hops_away\"] = new JSONValue((unsigned int)(hopsAway));\n        jsonObj[\"hop_start\"] = new JSONValue((unsigned int)(mp->hop_start));\n    }\n    jsonObj[\"size\"] = new JSONValue((unsigned int)mp->encrypted.size);\n    auto encryptedStr = bytesToHex(mp->encrypted.bytes, mp->encrypted.size);\n    jsonObj[\"bytes\"] = new JSONValue(encryptedStr.c_str());\n\n    // serialize and write it to the stream\n    JSONValue *value = new JSONValue(jsonObj);\n    std::string jsonStr = value->Stringify();\n\n    delete value;\n    return jsonStr;\n}\n#endif"
  },
  {
    "path": "src/serialization/MeshPacketSerializer.h",
    "content": "#include <meshtastic/mesh.pb.h>\n#include <string>\n\nstatic const char hexChars[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};\n\nclass MeshPacketSerializer\n{\n  public:\n    static std::string JsonSerialize(const meshtastic_MeshPacket *mp, bool shouldLog = true);\n    static std::string JsonSerializeEncrypted(const meshtastic_MeshPacket *mp);\n\n  private:\n    static std::string bytesToHex(const uint8_t *bytes, int len)\n    {\n        std::string result = \"\";\n        for (int i = 0; i < len; ++i) {\n            char const byte = bytes[i];\n            result += hexChars[(byte & 0xF0) >> 4];\n            result += hexChars[(byte & 0x0F) >> 0];\n        }\n        return result;\n    }\n};"
  },
  {
    "path": "src/serialization/MeshPacketSerializer_nRF52.cpp",
    "content": "#ifdef NRF52_USE_JSON\n#warning 'Using nRF52 Serializer'\n\n#include \"ArduinoJson.h\"\n#include \"MeshPacketSerializer.h\"\n#include \"NodeDB.h\"\n#include \"mesh/generated/meshtastic/mqtt.pb.h\"\n#include \"mesh/generated/meshtastic/remote_hardware.pb.h\"\n#include \"mesh/generated/meshtastic/telemetry.pb.h\"\n#include \"modules/RoutingModule.h\"\n#include <DebugConfiguration.h>\n#include <mesh-pb-constants.h>\n\nStaticJsonDocument<1024> jsonObj;\nStaticJsonDocument<1024> arrayObj;\n\nstd::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp, bool shouldLog)\n{\n    // the created jsonObj is immutable after creation, so\n    // we need to do the heavy lifting before assembling it.\n    std::string msgType;\n    jsonObj.clear();\n    arrayObj.clear();\n\n    if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag) {\n        switch (mp->decoded.portnum) {\n        case meshtastic_PortNum_TEXT_MESSAGE_APP: {\n            msgType = \"text\";\n            // convert bytes to string\n            if (shouldLog)\n                LOG_DEBUG(\"got text message of size %u\", mp->decoded.payload.size);\n\n            char payloadStr[(mp->decoded.payload.size) + 1];\n            memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size);\n            payloadStr[mp->decoded.payload.size] = 0; // null terminated string\n            // check if this is a JSON payload\n            StaticJsonDocument<512> text_doc;\n            DeserializationError error = deserializeJson(text_doc, payloadStr);\n            if (error) {\n                // if it isn't, then we need to create a json object\n                // with the string as the value\n                if (shouldLog)\n                    LOG_INFO(\"text message payload is of type plaintext\");\n                jsonObj[\"payload\"][\"text\"] = payloadStr;\n            } else {\n                // if it is, then we can just use the json object\n                if (shouldLog)\n                    LOG_INFO(\"text message payload is of type json\");\n                jsonObj[\"payload\"] = text_doc;\n            }\n            break;\n        }\n        case meshtastic_PortNum_TELEMETRY_APP: {\n            msgType = \"telemetry\";\n            meshtastic_Telemetry scratch;\n            meshtastic_Telemetry *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Telemetry_msg, &scratch)) {\n                decoded = &scratch;\n                if (decoded->which_variant == meshtastic_Telemetry_device_metrics_tag) {\n                    // If battery is present, encode the battery level value\n                    // TODO - Add a condition to send a code for a non-present value\n                    if (decoded->variant.device_metrics.has_battery_level) {\n                        jsonObj[\"payload\"][\"battery_level\"] = (int)decoded->variant.device_metrics.battery_level;\n                    }\n                    jsonObj[\"payload\"][\"voltage\"] = decoded->variant.device_metrics.voltage;\n                    jsonObj[\"payload\"][\"channel_utilization\"] = decoded->variant.device_metrics.channel_utilization;\n                    jsonObj[\"payload\"][\"air_util_tx\"] = decoded->variant.device_metrics.air_util_tx;\n                    jsonObj[\"payload\"][\"uptime_seconds\"] = (unsigned int)decoded->variant.device_metrics.uptime_seconds;\n                } else if (decoded->which_variant == meshtastic_Telemetry_environment_metrics_tag) {\n                    if (decoded->variant.environment_metrics.has_temperature) {\n                        jsonObj[\"payload\"][\"temperature\"] = decoded->variant.environment_metrics.temperature;\n                    }\n                    if (decoded->variant.environment_metrics.has_relative_humidity) {\n                        jsonObj[\"payload\"][\"relative_humidity\"] = decoded->variant.environment_metrics.relative_humidity;\n                    }\n                    if (decoded->variant.environment_metrics.has_barometric_pressure) {\n                        jsonObj[\"payload\"][\"barometric_pressure\"] = decoded->variant.environment_metrics.barometric_pressure;\n                    }\n                    if (decoded->variant.environment_metrics.has_gas_resistance) {\n                        jsonObj[\"payload\"][\"gas_resistance\"] = decoded->variant.environment_metrics.gas_resistance;\n                    }\n                    if (decoded->variant.environment_metrics.has_voltage) {\n                        jsonObj[\"payload\"][\"voltage\"] = decoded->variant.environment_metrics.voltage;\n                    }\n                    if (decoded->variant.environment_metrics.has_current) {\n                        jsonObj[\"payload\"][\"current\"] = decoded->variant.environment_metrics.current;\n                    }\n                    if (decoded->variant.environment_metrics.has_lux) {\n                        jsonObj[\"payload\"][\"lux\"] = decoded->variant.environment_metrics.lux;\n                    }\n                    if (decoded->variant.environment_metrics.has_white_lux) {\n                        jsonObj[\"payload\"][\"white_lux\"] = decoded->variant.environment_metrics.white_lux;\n                    }\n                    if (decoded->variant.environment_metrics.has_iaq) {\n                        jsonObj[\"payload\"][\"iaq\"] = (uint)decoded->variant.environment_metrics.iaq;\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_speed) {\n                        jsonObj[\"payload\"][\"wind_speed\"] = decoded->variant.environment_metrics.wind_speed;\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_direction) {\n                        jsonObj[\"payload\"][\"wind_direction\"] = (uint)decoded->variant.environment_metrics.wind_direction;\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_gust) {\n                        jsonObj[\"payload\"][\"wind_gust\"] = decoded->variant.environment_metrics.wind_gust;\n                    }\n                    if (decoded->variant.environment_metrics.has_wind_lull) {\n                        jsonObj[\"payload\"][\"wind_lull\"] = decoded->variant.environment_metrics.wind_lull;\n                    }\n                    if (decoded->variant.environment_metrics.has_radiation) {\n                        jsonObj[\"payload\"][\"radiation\"] = decoded->variant.environment_metrics.radiation;\n                    }\n                } else if (decoded->which_variant == meshtastic_Telemetry_air_quality_metrics_tag) {\n                    if (decoded->variant.air_quality_metrics.has_pm10_standard) {\n                        jsonObj[\"payload\"][\"pm10\"] = (unsigned int)decoded->variant.air_quality_metrics.pm10_standard;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_pm25_standard) {\n                        jsonObj[\"payload\"][\"pm25\"] = (unsigned int)decoded->variant.air_quality_metrics.pm25_standard;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_pm100_standard) {\n                        jsonObj[\"payload\"][\"pm100\"] = (unsigned int)decoded->variant.air_quality_metrics.pm100_standard;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_co2) {\n                        jsonObj[\"payload\"][\"co2\"] = (unsigned int)decoded->variant.air_quality_metrics.co2;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_co2_temperature) {\n                        jsonObj[\"payload\"][\"co2_temperature\"] = decoded->variant.air_quality_metrics.co2_temperature;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_co2_humidity) {\n                        jsonObj[\"payload\"][\"co2_humidity\"] = decoded->variant.air_quality_metrics.co2_humidity;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_form_formaldehyde) {\n                        jsonObj[\"payload\"][\"form_formaldehyde\"] = decoded->variant.air_quality_metrics.form_formaldehyde;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_form_temperature) {\n                        jsonObj[\"payload\"][\"form_temperature\"] = decoded->variant.air_quality_metrics.form_temperature;\n                    }\n                    if (decoded->variant.air_quality_metrics.has_form_humidity) {\n                        jsonObj[\"payload\"][\"form_humidity\"] = decoded->variant.air_quality_metrics.form_humidity;\n                    }\n                } else if (decoded->which_variant == meshtastic_Telemetry_power_metrics_tag) {\n                    if (decoded->variant.power_metrics.has_ch1_voltage) {\n                        jsonObj[\"payload\"][\"voltage_ch1\"] = decoded->variant.power_metrics.ch1_voltage;\n                    }\n                    if (decoded->variant.power_metrics.has_ch1_current) {\n                        jsonObj[\"payload\"][\"current_ch1\"] = decoded->variant.power_metrics.ch1_current;\n                    }\n                    if (decoded->variant.power_metrics.has_ch2_voltage) {\n                        jsonObj[\"payload\"][\"voltage_ch2\"] = decoded->variant.power_metrics.ch2_voltage;\n                    }\n                    if (decoded->variant.power_metrics.has_ch2_current) {\n                        jsonObj[\"payload\"][\"current_ch2\"] = decoded->variant.power_metrics.ch2_current;\n                    }\n                    if (decoded->variant.power_metrics.has_ch3_voltage) {\n                        jsonObj[\"payload\"][\"voltage_ch3\"] = decoded->variant.power_metrics.ch3_voltage;\n                    }\n                    if (decoded->variant.power_metrics.has_ch3_current) {\n                        jsonObj[\"payload\"][\"current_ch3\"] = decoded->variant.power_metrics.ch3_current;\n                    }\n                }\n            } else if (shouldLog) {\n                LOG_ERROR(\"Error decoding proto for telemetry message!\");\n                return \"\";\n            }\n            break;\n        }\n        case meshtastic_PortNum_NODEINFO_APP: {\n            msgType = \"nodeinfo\";\n            meshtastic_User scratch;\n            meshtastic_User *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_User_msg, &scratch)) {\n                decoded = &scratch;\n                jsonObj[\"payload\"][\"id\"] = decoded->id;\n                jsonObj[\"payload\"][\"longname\"] = decoded->long_name;\n                jsonObj[\"payload\"][\"shortname\"] = decoded->short_name;\n                jsonObj[\"payload\"][\"hardware\"] = decoded->hw_model;\n                jsonObj[\"payload\"][\"role\"] = (int)decoded->role;\n            } else if (shouldLog) {\n                LOG_ERROR(\"Error decoding proto for nodeinfo message!\");\n                return \"\";\n            }\n            break;\n        }\n        case meshtastic_PortNum_POSITION_APP: {\n            msgType = \"position\";\n            meshtastic_Position scratch;\n            meshtastic_Position *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Position_msg, &scratch)) {\n                decoded = &scratch;\n                if ((int)decoded->time) {\n                    jsonObj[\"payload\"][\"time\"] = (unsigned int)decoded->time;\n                }\n                if ((int)decoded->timestamp) {\n                    jsonObj[\"payload\"][\"timestamp\"] = (unsigned int)decoded->timestamp;\n                }\n                jsonObj[\"payload\"][\"latitude_i\"] = (int)decoded->latitude_i;\n                jsonObj[\"payload\"][\"longitude_i\"] = (int)decoded->longitude_i;\n                if ((int)decoded->altitude) {\n                    jsonObj[\"payload\"][\"altitude\"] = (int)decoded->altitude;\n                }\n                if ((int)decoded->ground_speed) {\n                    jsonObj[\"payload\"][\"ground_speed\"] = (unsigned int)decoded->ground_speed;\n                }\n                if (int(decoded->ground_track)) {\n                    jsonObj[\"payload\"][\"ground_track\"] = (unsigned int)decoded->ground_track;\n                }\n                if (int(decoded->sats_in_view)) {\n                    jsonObj[\"payload\"][\"sats_in_view\"] = (unsigned int)decoded->sats_in_view;\n                }\n                if ((int)decoded->PDOP) {\n                    jsonObj[\"payload\"][\"PDOP\"] = (int)decoded->PDOP;\n                }\n                if ((int)decoded->HDOP) {\n                    jsonObj[\"payload\"][\"HDOP\"] = (int)decoded->HDOP;\n                }\n                if ((int)decoded->VDOP) {\n                    jsonObj[\"payload\"][\"VDOP\"] = (int)decoded->VDOP;\n                }\n                if ((int)decoded->precision_bits) {\n                    jsonObj[\"payload\"][\"precision_bits\"] = (int)decoded->precision_bits;\n                }\n            } else if (shouldLog) {\n                LOG_ERROR(\"Error decoding proto for position message!\");\n                return \"\";\n            }\n            break;\n        }\n        case meshtastic_PortNum_WAYPOINT_APP: {\n            msgType = \"position\";\n            meshtastic_Waypoint scratch;\n            meshtastic_Waypoint *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_Waypoint_msg, &scratch)) {\n                decoded = &scratch;\n                jsonObj[\"payload\"][\"id\"] = (unsigned int)decoded->id;\n                jsonObj[\"payload\"][\"name\"] = decoded->name;\n                jsonObj[\"payload\"][\"description\"] = decoded->description;\n                jsonObj[\"payload\"][\"expire\"] = (unsigned int)decoded->expire;\n                jsonObj[\"payload\"][\"locked_to\"] = (unsigned int)decoded->locked_to;\n                jsonObj[\"payload\"][\"latitude_i\"] = (int)decoded->latitude_i;\n                jsonObj[\"payload\"][\"longitude_i\"] = (int)decoded->longitude_i;\n            } else if (shouldLog) {\n                LOG_ERROR(\"Error decoding proto for position message!\");\n                return \"\";\n            }\n            break;\n        }\n        case meshtastic_PortNum_NEIGHBORINFO_APP: {\n            msgType = \"neighborinfo\";\n            meshtastic_NeighborInfo scratch;\n            meshtastic_NeighborInfo *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_NeighborInfo_msg,\n                                     &scratch)) {\n                decoded = &scratch;\n                jsonObj[\"payload\"][\"node_id\"] = (unsigned int)decoded->node_id;\n                jsonObj[\"payload\"][\"node_broadcast_interval_secs\"] = (unsigned int)decoded->node_broadcast_interval_secs;\n                jsonObj[\"payload\"][\"last_sent_by_id\"] = (unsigned int)decoded->last_sent_by_id;\n                jsonObj[\"payload\"][\"neighbors_count\"] = decoded->neighbors_count;\n\n                JsonObject neighbors_obj = arrayObj.to<JsonObject>();\n                JsonArray neighbors = neighbors_obj.createNestedArray(\"neighbors\");\n                JsonObject neighbors_0 = neighbors.createNestedObject();\n\n                for (uint8_t i = 0; i < decoded->neighbors_count; i++) {\n                    neighbors_0[\"node_id\"] = (unsigned int)decoded->neighbors[i].node_id;\n                    neighbors_0[\"snr\"] = (int)decoded->neighbors[i].snr;\n                    neighbors[i + 1] = neighbors_0;\n                    neighbors_0.clear();\n                }\n                neighbors.remove(0);\n                jsonObj[\"payload\"][\"neighbors\"] = neighbors;\n            } else if (shouldLog) {\n                LOG_ERROR(\"Error decoding proto for neighborinfo message!\");\n                return \"\";\n            }\n            break;\n        }\n        case meshtastic_PortNum_TRACEROUTE_APP: {\n            if (mp->decoded.request_id) { // Only report the traceroute response\n                msgType = \"traceroute\";\n                meshtastic_RouteDiscovery scratch;\n                meshtastic_RouteDiscovery *decoded = NULL;\n                memset(&scratch, 0, sizeof(scratch));\n                if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_RouteDiscovery_msg,\n                                         &scratch)) {\n                    decoded = &scratch;\n                    JsonArray route = arrayObj.createNestedArray(\"route\");\n\n                    auto addToRoute = [](JsonArray *route, NodeNum num) {\n                        char long_name[40] = \"Unknown\";\n                        meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(num);\n                        bool name_known = node ? node->has_user : false;\n                        if (name_known)\n                            memcpy(long_name, node->user.long_name, sizeof(long_name));\n                        route->add(long_name);\n                    };\n\n                    addToRoute(&route, mp->to); // route.add(mp->to);\n                    for (uint8_t i = 0; i < decoded->route_count; i++) {\n                        addToRoute(&route, decoded->route[i]); // route.add(decoded->route[i]);\n                    }\n                    addToRoute(&route,\n                               mp->from); // route.add(mp->from); // Ended at the original destination (source of response)\n\n                    jsonObj[\"payload\"][\"route\"] = route;\n                } else if (shouldLog) {\n                    LOG_ERROR(\"Error decoding proto for traceroute message!\");\n                    return \"\";\n                }\n            } else {\n                LOG_WARN(\"Traceroute response not reported\");\n                return \"\";\n            }\n            break;\n        }\n        case meshtastic_PortNum_DETECTION_SENSOR_APP: {\n            msgType = \"detection\";\n            char payloadStr[(mp->decoded.payload.size) + 1];\n            memcpy(payloadStr, mp->decoded.payload.bytes, mp->decoded.payload.size);\n            payloadStr[mp->decoded.payload.size] = 0; // null terminated string\n            jsonObj[\"payload\"][\"text\"] = payloadStr;\n            break;\n        }\n        case meshtastic_PortNum_REMOTE_HARDWARE_APP: {\n            meshtastic_HardwareMessage scratch;\n            meshtastic_HardwareMessage *decoded = NULL;\n            memset(&scratch, 0, sizeof(scratch));\n            if (pb_decode_from_bytes(mp->decoded.payload.bytes, mp->decoded.payload.size, &meshtastic_HardwareMessage_msg,\n                                     &scratch)) {\n                decoded = &scratch;\n                if (decoded->type == meshtastic_HardwareMessage_Type_GPIOS_CHANGED) {\n                    msgType = \"gpios_changed\";\n                    jsonObj[\"payload\"][\"gpio_value\"] = (unsigned int)decoded->gpio_value;\n                } else if (decoded->type == meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY) {\n                    msgType = \"gpios_read_reply\";\n                    jsonObj[\"payload\"][\"gpio_value\"] = (unsigned int)decoded->gpio_value;\n                    jsonObj[\"payload\"][\"gpio_mask\"] = (unsigned int)decoded->gpio_mask;\n                }\n            } else if (shouldLog) {\n                LOG_ERROR(\"Error decoding proto for RemoteHardware message!\");\n                return \"\";\n            }\n            break;\n        }\n        // add more packet types here if needed\n        default:\n            LOG_WARN(\"Unsupported packet type %d\", mp->decoded.portnum);\n            return \"\";\n            break;\n        }\n    } else if (shouldLog) {\n        LOG_WARN(\"Couldn't convert encrypted payload of MeshPacket to JSON\");\n        return \"\";\n    }\n\n    jsonObj[\"id\"] = (unsigned int)mp->id;\n    jsonObj[\"timestamp\"] = (unsigned int)mp->rx_time;\n    jsonObj[\"to\"] = (unsigned int)mp->to;\n    jsonObj[\"from\"] = (unsigned int)mp->from;\n    jsonObj[\"channel\"] = (unsigned int)mp->channel;\n    jsonObj[\"type\"] = msgType.c_str();\n    jsonObj[\"sender\"] = nodeDB->getNodeId().c_str();\n    if (mp->rx_rssi != 0)\n        jsonObj[\"rssi\"] = (int)mp->rx_rssi;\n    if (mp->rx_snr != 0)\n        jsonObj[\"snr\"] = (float)mp->rx_snr;\n    const int8_t hopsAway = getHopsAway(*mp);\n    if (hopsAway >= 0) {\n        jsonObj[\"hops_away\"] = (unsigned int)(hopsAway);\n        jsonObj[\"hop_start\"] = (unsigned int)(mp->hop_start);\n    }\n\n    // serialize and write it to the stream\n\n    // Serial.printf(\"serialized json message: \\r\");\n    // serializeJson(jsonObj, Serial);\n    // Serial.println(\"\");\n\n    std::string jsonStr = \"\";\n    serializeJson(jsonObj, jsonStr);\n\n    if (shouldLog)\n        LOG_INFO(\"serialized json message: %s\", jsonStr.c_str());\n\n    return jsonStr;\n}\n\nstd::string MeshPacketSerializer::JsonSerializeEncrypted(const meshtastic_MeshPacket *mp)\n{\n    jsonObj.clear();\n    jsonObj[\"id\"] = (unsigned int)mp->id;\n    jsonObj[\"time_ms\"] = (double)millis();\n    jsonObj[\"timestamp\"] = (unsigned int)mp->rx_time;\n    jsonObj[\"to\"] = (unsigned int)mp->to;\n    jsonObj[\"from\"] = (unsigned int)mp->from;\n    jsonObj[\"channel\"] = (unsigned int)mp->channel;\n    jsonObj[\"want_ack\"] = mp->want_ack;\n\n    if (mp->rx_rssi != 0)\n        jsonObj[\"rssi\"] = (int)mp->rx_rssi;\n    if (mp->rx_snr != 0)\n        jsonObj[\"snr\"] = (float)mp->rx_snr;\n    const int8_t hopsAway = getHopsAway(*mp);\n    if (hopsAway >= 0) {\n        jsonObj[\"hops_away\"] = (unsigned int)(hopsAway);\n        jsonObj[\"hop_start\"] = (unsigned int)(mp->hop_start);\n    }\n    jsonObj[\"size\"] = (unsigned int)mp->encrypted.size;\n    auto encryptedStr = bytesToHex(mp->encrypted.bytes, mp->encrypted.size);\n    jsonObj[\"bytes\"] = encryptedStr.c_str();\n\n    // serialize and write it to the stream\n    std::string jsonStr = \"\";\n    serializeJson(jsonObj, jsonStr);\n\n    return jsonStr;\n}\n#endif"
  },
  {
    "path": "src/serialization/cobs.cpp",
    "content": "#include \"cobs.h\"\n#include <stdlib.h>\n\n#ifdef SENSECAP_INDICATOR\n\ncobs_encode_result cobs_encode(uint8_t *dst_buf_ptr, size_t dst_buf_len, const uint8_t *src_ptr, size_t src_len)\n{\n\n    cobs_encode_result result = {0, COBS_ENCODE_OK};\n\n    if (!dst_buf_ptr || !src_ptr) {\n        result.status = COBS_ENCODE_NULL_POINTER;\n        return result;\n    }\n\n    const uint8_t *src_read_ptr = src_ptr;\n    const uint8_t *src_end_ptr = src_read_ptr + src_len;\n    uint8_t *dst_buf_start_ptr = dst_buf_ptr;\n    uint8_t *dst_buf_end_ptr = dst_buf_start_ptr + dst_buf_len;\n    uint8_t *dst_code_write_ptr = dst_buf_ptr;\n    uint8_t *dst_write_ptr = dst_code_write_ptr + 1;\n    uint8_t search_len = 1;\n\n    if (src_len != 0) {\n        for (;;) {\n            if (dst_write_ptr >= dst_buf_end_ptr) {\n                result.status = (cobs_encode_status)(result.status | (cobs_encode_status)COBS_ENCODE_OUT_BUFFER_OVERFLOW);\n                break;\n            }\n\n            uint8_t src_byte = *src_read_ptr++;\n            if (src_byte == 0) {\n                *dst_code_write_ptr = search_len;\n                dst_code_write_ptr = dst_write_ptr++;\n                search_len = 1;\n                if (src_read_ptr >= src_end_ptr) {\n                    break;\n                }\n            } else {\n                *dst_write_ptr++ = src_byte;\n                search_len++;\n                if (src_read_ptr >= src_end_ptr) {\n                    break;\n                }\n                if (search_len == 0xFF) {\n                    *dst_code_write_ptr = search_len;\n                    dst_code_write_ptr = dst_write_ptr++;\n                    search_len = 1;\n                }\n            }\n        }\n    }\n\n    if (dst_code_write_ptr >= dst_buf_end_ptr) {\n        result.status = (cobs_encode_status)(result.status | (cobs_encode_status)COBS_ENCODE_OUT_BUFFER_OVERFLOW);\n        dst_write_ptr = dst_buf_end_ptr;\n    } else {\n        *dst_code_write_ptr = search_len;\n    }\n\n    result.out_len = dst_write_ptr - dst_buf_start_ptr;\n\n    return result;\n}\n\ncobs_decode_result cobs_decode(uint8_t *dst_buf_ptr, size_t dst_buf_len, const uint8_t *src_ptr, size_t src_len)\n{\n    cobs_decode_result result = {0, COBS_DECODE_OK};\n\n    if (!dst_buf_ptr || !src_ptr) {\n        result.status = COBS_DECODE_NULL_POINTER;\n        return result;\n    }\n\n    const uint8_t *src_read_ptr = src_ptr;\n    const uint8_t *src_end_ptr = src_read_ptr + src_len;\n    uint8_t *dst_buf_start_ptr = dst_buf_ptr;\n    const uint8_t *dst_buf_end_ptr = dst_buf_start_ptr + dst_buf_len;\n    uint8_t *dst_write_ptr = dst_buf_ptr;\n\n    if (src_len != 0) {\n        for (;;) {\n            uint8_t len_code = *src_read_ptr++;\n            if (len_code == 0) {\n                result.status = (cobs_decode_status)(result.status | (cobs_decode_status)COBS_DECODE_ZERO_BYTE_IN_INPUT);\n                break;\n            }\n            len_code--;\n\n            size_t remaining_bytes = src_end_ptr - src_read_ptr;\n            if (len_code > remaining_bytes) {\n                result.status = (cobs_decode_status)(result.status | (cobs_decode_status)COBS_DECODE_INPUT_TOO_SHORT);\n                len_code = remaining_bytes;\n            }\n\n            remaining_bytes = dst_buf_end_ptr - dst_write_ptr;\n            if (len_code > remaining_bytes) {\n                result.status = (cobs_decode_status)(result.status | (cobs_decode_status)COBS_DECODE_OUT_BUFFER_OVERFLOW);\n                len_code = remaining_bytes;\n            }\n\n            for (uint8_t i = len_code; i != 0; i--) {\n                uint8_t src_byte = *src_read_ptr++;\n                if (src_byte == 0) {\n                    result.status = (cobs_decode_status)(result.status | (cobs_decode_status)COBS_DECODE_ZERO_BYTE_IN_INPUT);\n                }\n                *dst_write_ptr++ = src_byte;\n            }\n\n            if (src_read_ptr >= src_end_ptr) {\n                break;\n            }\n\n            if (len_code != 0xFE) {\n                if (dst_write_ptr >= dst_buf_end_ptr) {\n                    result.status = (cobs_decode_status)(result.status | (cobs_decode_status)COBS_DECODE_OUT_BUFFER_OVERFLOW);\n                    break;\n                }\n                *dst_write_ptr++ = 0;\n            }\n        }\n    }\n\n    result.out_len = dst_write_ptr - dst_buf_start_ptr;\n\n    return result;\n}\n\n#endif"
  },
  {
    "path": "src/serialization/cobs.h",
    "content": "#ifndef COBS_H_\n#define COBS_H_\n\n#include \"configuration.h\"\n\n#ifdef SENSECAP_INDICATOR\n\n#include <stdint.h>\n#include <stdlib.h>\n\n#define COBS_ENCODE_DST_BUF_LEN_MAX(SRC_LEN) ((SRC_LEN) + (((SRC_LEN) + 253u) / 254u))\n#define COBS_DECODE_DST_BUF_LEN_MAX(SRC_LEN) (((SRC_LEN) == 0) ? 0u : ((SRC_LEN)-1u))\n#define COBS_ENCODE_SRC_OFFSET(SRC_LEN) (((SRC_LEN) + 253u) / 254u)\n\ntypedef enum {\n    COBS_ENCODE_OK = 0x00,\n    COBS_ENCODE_NULL_POINTER = 0x01,\n    COBS_ENCODE_OUT_BUFFER_OVERFLOW = 0x02\n} cobs_encode_status;\n\ntypedef struct {\n    size_t out_len;\n    cobs_encode_status status;\n} cobs_encode_result;\n\ntypedef enum {\n    COBS_DECODE_OK = 0x00,\n    COBS_DECODE_NULL_POINTER = 0x01,\n    COBS_DECODE_OUT_BUFFER_OVERFLOW = 0x02,\n    COBS_DECODE_ZERO_BYTE_IN_INPUT = 0x04,\n    COBS_DECODE_INPUT_TOO_SHORT = 0x08\n} cobs_decode_status;\n\ntypedef struct {\n    size_t out_len;\n    cobs_decode_status status;\n} cobs_decode_result;\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* COBS-encode a string of input bytes.\n *\n * dst_buf_ptr:    The buffer into which the result will be written\n * dst_buf_len:    Length of the buffer into which the result will be written\n * src_ptr:        The byte string to be encoded\n * src_len         Length of the byte string to be encoded\n *\n * returns:        A struct containing the success status of the encoding\n *                 operation and the length of the result (that was written to\n *                 dst_buf_ptr)\n */\ncobs_encode_result cobs_encode(uint8_t *dst_buf_ptr, size_t dst_buf_len, const uint8_t *src_ptr, size_t src_len);\n\n/* Decode a COBS byte string.\n *\n * dst_buf_ptr:    The buffer into which the result will be written\n * dst_buf_len:    Length of the buffer into which the result will be written\n * src_ptr:        The byte string to be decoded\n * src_len         Length of the byte string to be decoded\n *\n * returns:        A struct containing the success status of the decoding\n *                 operation and the length of the result (that was written to\n *                 dst_buf_ptr)\n */\ncobs_decode_result cobs_decode(uint8_t *dst_buf_ptr, size_t dst_buf_len, const uint8_t *src_ptr, size_t src_len);\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif /* SENSECAP_INDICATOR */\n\n#endif /* COBS_H_ */\n"
  },
  {
    "path": "src/sleep.cpp",
    "content": "#include \"configuration.h\"\n\n#if !MESHTASTIC_EXCLUDE_GPS\n#include \"GPS.h\"\n#endif\n\n#include \"Default.h\"\n#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"PowerMon.h\"\n#include \"TransmitHistory.h\"\n#include \"detect/LoRaRadioType.h\"\n#include \"error.h\"\n#include \"main.h\"\n#include \"modules/StatusLEDModule.h\"\n#include \"sleep.h\"\n#include \"target_specific.h\"\n\n#ifdef ARCH_ESP32\n// \"esp_pm_config_esp32_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead\"\n#include \"esp32/pm.h\"\n#include \"esp_pm.h\"\n#if HAS_WIFI\n#include \"mesh/wifi/WiFiAPClient.h\"\n#endif\n#include \"rom/rtc.h\"\n#include <RadioLib.h>\n#include <driver/rtc_io.h>\n#include <driver/uart.h>\n\nesp_sleep_source_t wakeCause; // the reason we booted this time\n#endif\n#include \"Throttle.h\"\n\n#ifdef USE_XL9555\n#include \"ExtensionIOXL9555.hpp\"\nextern ExtensionIOXL9555 io;\n#endif\n\n#ifdef HAS_PPM\n#include <XPowersLib.h>\nextern XPowersPPM *PPM;\n#endif\n\n#ifndef INCLUDE_vTaskSuspend\n#define INCLUDE_vTaskSuspend 0\n#endif\n\n/// Called to ask any observers if they want to veto sleep. Return 1 to veto or 0 to allow sleep to happen\nObservable<void *> preflightSleep;\n\n/// Called to tell observers we are now entering (deep) sleep and you should prepare.  Must return 0\nObservable<void *> notifyDeepSleep;\n\n/// Called to tell observers we are rebooting ASAP.  Must return 0\nObservable<void *> notifyReboot;\n\n#ifdef ARCH_ESP32\n/// Called to tell observers that light sleep is about to begin\nObservable<void *> notifyLightSleep;\n\n/// Called to tell observers that light sleep has just ended, and why it ended\nObservable<esp_sleep_wakeup_cause_t> notifyLightSleepEnd;\n#endif\n\n// deep sleep support\nRTC_DATA_ATTR int bootCount = 0;\n\n// -----------------------------------------------------------------------------\n// Application\n// -----------------------------------------------------------------------------\n\n/**\n * Control CPU core speed (80MHz vs 240MHz)\n *\n * We leave CPU at full speed during init, but once loop is called switch to low speed (for a 50% power savings)\n *\n */\nvoid setCPUFast(bool on)\n{\n#if defined(ARCH_ESP32) && HAS_WIFI && !HAS_TFT\n\n    if (isWifiAvailable()) {\n        /*\n         *\n         * There's a newly introduced bug in the espressif framework where WiFi is\n         *   unstable when the frequency is less than 240MHz.\n         *\n         *   This mostly impacts WiFi AP mode but we'll bump the frequency for\n         *     all WiFi use cases.\n         * (Added: Dec 23, 2021 by Jm Casler)\n         */\n#ifndef CONFIG_IDF_TARGET_ESP32C3\n        LOG_DEBUG(\"Set CPU to 240MHz because WiFi is in use\");\n        setCpuFrequencyMhz(240);\n#endif\n        return;\n    }\n\n// The Heltec LORA32 V1 runs at 26 MHz base frequency and doesn't react well to switching to 80 MHz...\n#if !defined(ARDUINO_HELTEC_WIFI_LORA_32) && !defined(CONFIG_IDF_TARGET_ESP32C3)\n    setCpuFrequencyMhz(on ? 240 : 80);\n#endif\n\n#endif\n}\n\n// Perform power on init that we do on each wake from deep sleep\nvoid initDeepSleep()\n{\n#ifdef ARCH_ESP32\n    bootCount++;\n    const char *reason;\n    wakeCause = esp_sleep_get_wakeup_cause();\n\n    switch (wakeCause) {\n    case ESP_SLEEP_WAKEUP_EXT0:\n        reason = \"ext0 RTC_IO\";\n        break;\n    case ESP_SLEEP_WAKEUP_EXT1:\n        reason = \"ext1 RTC_CNTL\";\n        break;\n    case ESP_SLEEP_WAKEUP_TIMER:\n        reason = \"timer\";\n        break;\n    case ESP_SLEEP_WAKEUP_TOUCHPAD:\n        reason = \"touchpad\";\n        break;\n    case ESP_SLEEP_WAKEUP_ULP:\n        reason = \"ULP program\";\n        break;\n    default:\n        reason = \"reset\";\n        break;\n    }\n    /*\n      Not using yet because we are using wake on all buttons being low\n\n      wakeButtons = esp_sleep_get_ext1_wakeup_status();       // If one of these buttons is set it was the reason we woke\n      if (wakeCause == ESP_SLEEP_WAKEUP_EXT1 && !wakeButtons) // we must have been using the 'all buttons rule for waking' to\n      support busted boards, assume button one was pressed wakeButtons = ((uint64_t)1) << buttons.gpios[0];\n      */\n\n#if defined(DEBUG_PORT) && !defined(DEBUG_MUTE)\n    // If we booted because our timer ran out or the user pressed reset, send those as fake events\n    RESET_REASON hwReason = rtc_get_reset_reason(0);\n\n    if (hwReason == RTCWDT_BROWN_OUT_RESET)\n        reason = \"brownout\";\n\n    if (hwReason == TG0WDT_SYS_RESET)\n        reason = \"taskWatchdog\";\n\n    if (hwReason == TG1WDT_SYS_RESET)\n        reason = \"intWatchdog\";\n\n    LOG_INFO(\"Booted, wake cause %d (boot count %d), reset_reason=%s\", wakeCause, bootCount, reason);\n#endif\n\n#if SOC_RTCIO_HOLD_SUPPORTED\n    // If waking from sleep, release any and all RTC GPIOs\n    if (wakeCause != ESP_SLEEP_WAKEUP_UNDEFINED) {\n        LOG_DEBUG(\"Disable any holds on RTC IO pads\");\n        for (uint8_t i = 0; i <= GPIO_NUM_MAX; i++) {\n            if (rtc_gpio_is_valid_gpio((gpio_num_t)i))\n                rtc_gpio_hold_dis((gpio_num_t)i);\n\n            // ESP32 (original)\n            else if (GPIO_IS_VALID_OUTPUT_GPIO((gpio_num_t)i))\n                gpio_hold_dis((gpio_num_t)i);\n        }\n    }\n#endif\n\n#endif\n}\n\nbool doPreflightSleep()\n{\n    if (preflightSleep.notifyObservers(NULL) != 0)\n        return false; // vetoed\n    else\n        return true;\n}\n\n/// Tell devices we are going to sleep and wait for them to handle things\nstatic void waitEnterSleep(bool skipPreflight = false)\n{\n    if (!skipPreflight) {\n        uint32_t now = millis();\n        while (!doPreflightSleep()) {\n            delay(100); // Kinda yucky - wait until radio says say we can shutdown (finished in process sends/receives)\n\n            if (!Throttle::isWithinTimespanMs(now,\n                                              THIRTY_SECONDS_MS)) { // If we wait too long just report an error and go to sleep\n                RECORD_CRITICALERROR(meshtastic_CriticalErrorCode_SLEEP_ENTER_WAIT);\n                assert(0); // FIXME - for now we just restart, need to fix bug #167\n                break;\n            }\n        }\n    }\n\n    // Code that still needs to be moved into notifyObservers\n    console->flush();          // send all our characters before we stop cpu clock\n    setBluetoothEnable(false); // has to be off before calling light sleep\n}\n\nvoid doDeepSleep(uint32_t msecToWake, bool skipPreflight = false, bool skipSaveNodeDb = false)\n{\n    if (INCLUDE_vTaskSuspend && (msecToWake == portMAX_DELAY)) {\n        LOG_INFO(\"Enter deep sleep forever\");\n    } else {\n        LOG_INFO(\"Enter deep sleep for %u seconds\", msecToWake / 1000);\n    }\n\n    // not using wifi yet, but once we are this is needed to shutoff the radio hw\n    // esp_wifi_stop();\n    waitEnterSleep(skipPreflight);\n\n#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_BLUETOOTH\n    // Full shutdown of bluetooth hardware\n    if (nimbleBluetooth)\n        nimbleBluetooth->deinit();\n#endif\n\n#ifdef ARCH_ESP32\n    if (!shouldLoraWake(msecToWake))\n        notifyDeepSleep.notifyObservers(NULL);\n#else\n    notifyDeepSleep.notifyObservers(NULL);\n#endif\n\n    powerMon->setState(meshtastic_PowerMon_State_CPU_DeepSleep);\n    if (screen)\n        screen->doDeepSleep(); // datasheet says this will draw only 10ua\n\n    if (!skipSaveNodeDb) {\n        nodeDB->saveToDisk();\n    }\n\n    // Persist broadcast transmit times so throttle survives reboot\n    if (transmitHistory)\n        transmitHistory->saveToDisk();\n\n#ifdef PIN_POWER_EN\n    digitalWrite(PIN_POWER_EN, LOW);\n    pinMode(PIN_POWER_EN, INPUT); // power off peripherals\n#endif\n\n#ifdef RAK_WISMESH_TAP_V2\n    digitalWrite(SDCARD_CS, LOW);\n#endif\n\n#ifdef TRACKER_T1000_E\n#ifdef GNSS_AIROHA\n    digitalWrite(GPS_VRTC_EN, LOW);\n    digitalWrite(PIN_GPS_RESET, LOW);\n    digitalWrite(GPS_SLEEP_INT, LOW);\n    digitalWrite(GPS_RTC_INT, LOW);\n    pinMode(GPS_RESETB_OUT, OUTPUT);\n    digitalWrite(GPS_RESETB_OUT, LOW);\n#endif\n\n#ifdef BUZZER_EN_PIN\n    digitalWrite(BUZZER_EN_PIN, LOW);\n#endif\n\n#ifdef PIN_3V3_EN\n    digitalWrite(PIN_3V3_EN, LOW);\n#endif\n#ifdef PIN_WD_EN\n    digitalWrite(PIN_WD_EN, LOW);\n#endif\n#endif\n    statusLEDModule->setPowerLED(false);\n#ifdef RESET_OLED\n    digitalWrite(RESET_OLED, 1); // put the display in reset before killing its power\n#endif\n\n#if defined(VEXT_ENABLE)\n    digitalWrite(VEXT_ENABLE, !VEXT_ON_VALUE); // turn on the display power\n#endif\n\n#ifdef ARCH_ESP32\n    if (shouldLoraWake(msecToWake)) {\n        enableLoraInterrupt();\n    }\n#ifdef BUTTON_PIN\n    // Avoid leakage through button pin\n    if (GPIO_IS_VALID_OUTPUT_GPIO(BUTTON_PIN)) {\n#ifdef BUTTON_NEED_PULLUP\n        pinMode(BUTTON_PIN, INPUT_PULLUP);\n#else\n        pinMode(BUTTON_PIN, INPUT);\n#endif\n        gpio_hold_en((gpio_num_t)BUTTON_PIN);\n    }\n#endif\n#ifdef SENSECAP_INDICATOR\n    // Portexpander definition does not pass GPIO_IS_VALID_OUTPUT_GPIO\n    pinMode(LORA_CS, OUTPUT);\n    digitalWrite(LORA_CS, HIGH);\n    gpio_hold_en((gpio_num_t)LORA_CS);\n#elif defined(ELECROW_PANEL)\n    // Elecrow panels do not use LORA_CS, do nothing\n#else\n    if (GPIO_IS_VALID_OUTPUT_GPIO(LORA_CS)) {\n        // LoRa CS (RADIO_NSS) needs to stay HIGH, even during deep sleep\n        pinMode(LORA_CS, OUTPUT);\n        digitalWrite(LORA_CS, HIGH);\n        gpio_hold_en((gpio_num_t)LORA_CS);\n    }\n#endif\n#endif\n\n#ifdef HAS_PPM\n    if (PPM) {\n        LOG_INFO(\"PMM shutdown\");\n        console->flush();\n        PPM->shutdown();\n    }\n#endif\n\n#ifdef HAS_PMU\n    if (pmu_found && PMU) {\n        // Obsolete comment: from back when we we used to receive lora packets while CPU was in deep sleep.\n        // We no longer do that, because our light-sleep current draws are low enough and it provides fast start/low cost\n        // wake.  We currently use deep sleep only for 'we want our device to actually be off - because our battery is\n        // critically low'.  So in deep sleep we DO shut down power to LORA (and when we boot later we completely reinit it)\n        //\n        // No need to turn this off if the power draw in sleep mode really is just 0.2uA and turning it off would\n        // leave floating input for the IRQ line\n        // If we want to leave the radio receiving in would be 11.5mA current draw, but most of the time it is just waiting\n        // in its sequencer (true?) so the average power draw should be much lower even if we were listening for packets\n        // all the time.\n        PMU->setChargingLedMode(XPOWERS_CHG_LED_OFF);\n\n        uint8_t model = PMU->getChipModel();\n        if (model == XPOWERS_AXP2101) {\n            if (HW_VENDOR == meshtastic_HardwareModel_TBEAM) {\n                // t-beam v1.2 radio power channel\n                PMU->disablePowerOutput(XPOWERS_ALDO2); // lora radio power channel\n            } else if (HW_VENDOR == meshtastic_HardwareModel_LILYGO_TBEAM_S3_CORE ||\n                       HW_VENDOR == meshtastic_HardwareModel_T_WATCH_S3) {\n                PMU->disablePowerOutput(XPOWERS_ALDO3); // lora radio power channel\n            }\n        } else if (model == XPOWERS_AXP192) {\n            // t-beam v1.1 radio power channel\n            PMU->disablePowerOutput(XPOWERS_LDO2); // lora radio power channel\n        }\n        if (msecToWake == portMAX_DELAY) {\n            LOG_INFO(\"PMU shutdown\");\n            console->flush();\n            PMU->shutdown();\n        }\n    }\n#endif\n\n#if !MESHTASTIC_EXCLUDE_I2C && defined(ARCH_ESP32) && defined(I2C_SDA)\n    // Added by https://github.com/meshtastic/firmware/pull/4418\n    // Possibly to support Heltec Capsule Sensor?\n    Wire.end();\n    pinMode(I2C_SDA, ANALOG);\n    pinMode(I2C_SCL, ANALOG);\n#endif\n\n    console->flush();\n    cpuDeepSleep(msecToWake);\n}\n\n#ifdef ARCH_ESP32\n/**\n * enter light sleep (preserves ram but stops everything about CPU).\n *\n * Returns (after restoring hw state) when the user presses a button or we get a LoRa interrupt\n */\nesp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more reasonable default\n{\n    // LOG_DEBUG(\"Enter light sleep\");\n\n    // LORA_DIO1 is an extended IO pin. Setting it as a wake-up pin will cause problems, such as the indicator device not entering\n    // LightSleep.\n#if defined(SENSECAP_INDICATOR)\n    return ESP_SLEEP_WAKEUP_TIMER;\n#endif\n\n    waitEnterSleep(false);\n    notifyLightSleep.notifyObservers(NULL); // Button interrupts are detached here\n\n    uint64_t sleepUsec = sleepMsec * 1000LL;\n\n    // NOTE! ESP docs say we must disable bluetooth and wifi before light sleep\n\n    // We want RTC peripherals to stay on\n    esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);\n\n#if defined(BUTTON_PIN) && defined(BUTTON_NEED_PULLUP)\n    gpio_pullup_en((gpio_num_t)BUTTON_PIN);\n#endif\n\n#ifdef SERIAL0_RX_GPIO\n    // We treat the serial port as a GPIO for a fast/low power way of waking, if we see a rising edge that means\n    // someone started to send something\n\n    // gpio 3 is RXD for serialport 0 on ESP32\n    // Send a few Z characters to wake the port\n\n    // this doesn't work on TBEAMs when the USB is depowered (causes bogus interrupts)\n    // So we disable this \"wake on serial\" feature - because now when a TBEAM (only) has power connected it\n    // never tries to go to sleep if the user is using the API\n    // gpio_wakeup_enable((gpio_num_t)SERIAL0_RX_GPIO, GPIO_INTR_LOW_LEVEL);\n\n    // doesn't help - I think the USB-UART chip losing power is pulling the signal low\n    // gpio_pullup_en((gpio_num_t)SERIAL0_RX_GPIO);\n\n    // alas - can only work if using the refclock, which is limited to about 9600 bps\n    // assert(uart_set_wakeup_threshold(UART_NUM_0, 3) == ESP_OK);\n    // assert(esp_sleep_enable_uart_wakeup(0) == ESP_OK);\n#endif\n#ifdef ROTARY_PRESS\n    // The enableLoraInterrupt() method is using ext0_wakeup, so we are forced to use GPIO wakeup\n    gpio_wakeup_enable((gpio_num_t)ROTARY_PRESS, GPIO_INTR_LOW_LEVEL);\n#endif\n#ifdef KB_INT\n    gpio_wakeup_enable((gpio_num_t)KB_INT, GPIO_INTR_LOW_LEVEL);\n#endif\n#ifdef BUTTON_PIN\n    gpio_num_t pin = (gpio_num_t)(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN);\n    gpio_wakeup_enable(pin, GPIO_INTR_LOW_LEVEL);\n#endif\n#if defined(INPUTDRIVER_TWO_WAY_ROCKER_BTN) || defined(INPUTDRIVER_ENCODER_BTN)\n#if defined(INPUTDRIVER_TWO_WAY_ROCKER_BTN)\n#define INPUTDRIVER_WAKE_BTN_PIN INPUTDRIVER_TWO_WAY_ROCKER_BTN\n#else\n#define INPUTDRIVER_WAKE_BTN_PIN INPUTDRIVER_ENCODER_BTN\n#endif\n    gpio_wakeup_enable((gpio_num_t)INPUTDRIVER_WAKE_BTN_PIN, GPIO_INTR_LOW_LEVEL);\n#endif\n#if defined(WAKE_ON_TOUCH)\n    gpio_wakeup_enable((gpio_num_t)SCREEN_TOUCH_INT, GPIO_INTR_LOW_LEVEL);\n#endif\n    enableLoraInterrupt();\n#ifdef PMU_IRQ\n    // wake due to PMU can happen repeatedly if there is no battery installed or the battery fills\n    if (pmu_found)\n        gpio_wakeup_enable((gpio_num_t)PMU_IRQ, GPIO_INTR_LOW_LEVEL); // pmu irq\n#endif\n\n    auto res = esp_sleep_enable_gpio_wakeup();\n    if (res != ESP_OK) {\n        LOG_ERROR(\"esp_sleep_enable_gpio_wakeup result %d\", res);\n    }\n    assert(res == ESP_OK);\n    res = esp_sleep_enable_timer_wakeup(sleepUsec);\n    if (res != ESP_OK) {\n        LOG_ERROR(\"esp_sleep_enable_timer_wakeup result %d\", res);\n    }\n    assert(res == ESP_OK);\n\n    console->flush();\n    res = esp_light_sleep_start();\n    if (res != ESP_OK) {\n        LOG_ERROR(\"esp_light_sleep_start result %d\", res);\n    }\n    // commented out because it's not that crucial;\n    // if it sporadically happens the node will go into light sleep during the next round\n    // assert(res == ESP_OK);\n#ifdef ROTARY_PRESS\n    gpio_wakeup_disable((gpio_num_t)ROTARY_PRESS);\n#endif\n#ifdef KB_INT\n    gpio_wakeup_disable((gpio_num_t)KB_INT);\n#endif\n#ifdef BUTTON_PIN\n    // Disable wake-on-button interrupt. Re-attach normal button-interrupts\n    gpio_wakeup_disable(pin);\n#endif\n#ifdef INPUTDRIVER_WAKE_BTN_PIN\n    gpio_wakeup_disable((gpio_num_t)INPUTDRIVER_WAKE_BTN_PIN);\n#undef INPUTDRIVER_WAKE_BTN_PIN\n#endif\n#if defined(WAKE_ON_TOUCH)\n    gpio_wakeup_disable((gpio_num_t)SCREEN_TOUCH_INT);\n#endif\n#if !defined(SOC_PM_SUPPORT_EXT_WAKEUP) && defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC)\n    if (radioType != RF95_RADIO) {\n        gpio_wakeup_disable((gpio_num_t)LORA_DIO1);\n    }\n#endif\n#if defined(RF95_IRQ) && (RF95_IRQ != RADIOLIB_NC)\n    if (radioType == RF95_RADIO) {\n        gpio_wakeup_disable((gpio_num_t)RF95_IRQ);\n    }\n#endif\n\n    esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause();\n    notifyLightSleepEnd.notifyObservers(cause); // Button interrupts are reattached here\n\n#ifdef BUTTON_PIN\n    if (cause == ESP_SLEEP_WAKEUP_GPIO) {\n        LOG_INFO(\"Exit light sleep gpio: btn=%d\",\n                 !digitalRead(config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN));\n    } else\n#endif\n    {\n        LOG_INFO(\"Exit light sleep cause: %d\", cause);\n    }\n\n    return cause;\n}\n\n// not legal on the stock android ESP build\n\n/**\n * enable modem sleep mode as needed and available.  Should lower our CPU current draw to an average of about 20mA.\n *\n * per https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/system/power_management.html\n *\n * supposedly according to https://github.com/espressif/arduino-esp32/issues/475 this is already done in arduino\n */\nvoid enableModemSleep()\n{\n#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)\n    static esp_pm_config_t esp32_config; // filled with zeros because bss\n#else\n    static esp_pm_config_esp32_t esp32_config; // filled with zeros because bss\n#endif\n#if CONFIG_IDF_TARGET_ESP32S3\n    esp32_config.max_freq_mhz = CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ;\n#elif CONFIG_IDF_TARGET_ESP32S2\n    esp32_config.max_freq_mhz = CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ;\n#elif CONFIG_IDF_TARGET_ESP32C6\n    esp32_config.max_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;\n#elif CONFIG_IDF_TARGET_ESP32C3\n    esp32_config.max_freq_mhz = CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ;\n#else\n    esp32_config.max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;\n#endif\n    esp32_config.min_freq_mhz = 20; // 10Mhz is minimum recommended\n    esp32_config.light_sleep_enable = false;\n    int rv = esp_pm_configure(&esp32_config);\n    LOG_DEBUG(\"Sleep request result %x\", rv);\n}\n\nbool shouldLoraWake(uint32_t msecToWake)\n{\n    return msecToWake < portMAX_DELAY && (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n                                          config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE);\n}\n\nvoid enableLoraInterrupt()\n{\n    esp_err_t res;\n#if SOC_PM_SUPPORT_EXT_WAKEUP && defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC)\n    res = gpio_pulldown_en((gpio_num_t)LORA_DIO1);\n    if (res != ESP_OK) {\n        LOG_ERROR(\"gpio_pulldown_en(LORA_DIO1) result %d\", res);\n    }\n#if defined(LORA_RESET) && (LORA_RESET != RADIOLIB_NC)\n    res = gpio_pullup_en((gpio_num_t)LORA_RESET);\n    if (res != ESP_OK) {\n        LOG_ERROR(\"gpio_pullup_en(LORA_RESET) result %d\", res);\n    }\n#endif\n#if defined(LORA_CS) && (LORA_CS != RADIOLIB_NC) && !defined(ELECROW_PANEL)\n    gpio_pullup_en((gpio_num_t)LORA_CS);\n#endif\n\n#if HAS_LORA_FEM\n    loraFEMInterface.setRxModeEnableWhenMCUSleep();\n#endif\n\n    LOG_INFO(\"setup LORA_DIO1 (GPIO%02d) with wakeup by gpio interrupt\", LORA_DIO1);\n    gpio_wakeup_enable((gpio_num_t)LORA_DIO1, GPIO_INTR_HIGH_LEVEL);\n\n#elif defined(LORA_DIO1) && (LORA_DIO1 != RADIOLIB_NC)\n    if (radioType != RF95_RADIO) {\n        LOG_INFO(\"setup LORA_DIO1 (GPIO%02d) with wakeup by gpio interrupt\", LORA_DIO1);\n        gpio_wakeup_enable((gpio_num_t)LORA_DIO1, GPIO_INTR_HIGH_LEVEL); // SX126x/SX128x interrupt, active high\n    }\n#endif\n#if defined(RF95_IRQ) && (RF95_IRQ != RADIOLIB_NC)\n    if (radioType == RF95_RADIO) {\n        LOG_INFO(\"setup RF95_IRQ (GPIO%02d) with wakeup by gpio interrupt\", RF95_IRQ);\n        gpio_wakeup_enable((gpio_num_t)RF95_IRQ, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high\n    }\n#endif\n}\n#endif\n"
  },
  {
    "path": "src/sleep.h",
    "content": "#pragma once\n\n#include \"Arduino.h\"\n#include \"Observer.h\"\n#include \"configuration.h\"\n\nvoid doDeepSleep(uint32_t msecToWake, bool skipPreflight, bool skipSaveNodeDb), cpuDeepSleep(uint32_t msecToWake);\n\n#ifdef ARCH_ESP32\n#include \"esp_sleep.h\"\nesp_sleep_wakeup_cause_t doLightSleep(uint64_t msecToWake);\n\nextern esp_sleep_source_t wakeCause;\n#endif\n\n#ifdef HAS_PMU\n#include \"XPowersLibInterface.hpp\"\nextern XPowersLibInterface *PMU;\n#endif\n\n// Perform power on init that we do on each wake from deep sleep\nvoid initDeepSleep();\n\nvoid setCPUFast(bool on);\n\n/** return true if sleep is allowed right now */\nbool doPreflightSleep();\n\nextern int bootCount;\n\n// is bluetooth sw currently running?\nextern bool bluetoothOn;\n\n/// Called to ask any observers if they want to veto sleep. Return 1 to veto or 0 to allow sleep to happen\nextern Observable<void *> preflightSleep;\n\n/// Called to tell observers we are now entering (deep) sleep and you should prepare.  Must return 0\nextern Observable<void *> notifyDeepSleep;\n\n/// Called to tell observers we are rebooting ASAP.  Must return 0\nextern Observable<void *> notifyReboot;\n\n#ifdef ARCH_ESP32\n/// Called to tell observers that light sleep is about to begin\nextern Observable<void *> notifyLightSleep;\n\n/// Called to tell observers that light sleep has just ended, and why it ended\nextern Observable<esp_sleep_wakeup_cause_t> notifyLightSleepEnd;\n#endif\n\nvoid enableModemSleep();\n#ifdef ARCH_ESP32\nvoid enableLoraInterrupt();\nbool shouldLoraWake(uint32_t msecToWake);\n#endif"
  },
  {
    "path": "src/target_specific.h",
    "content": "#pragma once\n\n#include <Arduino.h>\n\n// Functions that are unique to particular target types (esp32, bare, nrf52 etc...)\n\n// Enable/disable bluetooth.\nvoid setBluetoothEnable(bool enable);\n\nvoid getMacAddr(uint8_t *dmac);"
  },
  {
    "path": "src/watchdog/watchdogThread.cpp",
    "content": "#include \"watchdogThread.h\"\n#include \"configuration.h\"\n\n#ifdef HAS_HARDWARE_WATCHDOG\nWatchdogThread *watchdogThread;\n\nWatchdogThread::WatchdogThread() : OSThread(\"Watchdog\")\n{\n    setup();\n}\n\nvoid WatchdogThread::feedDog(void)\n{\n    digitalWrite(HARDWARE_WATCHDOG_DONE, HIGH);\n    delay(1);\n    digitalWrite(HARDWARE_WATCHDOG_DONE, LOW);\n}\n\nint32_t WatchdogThread::runOnce()\n{\n    LOG_DEBUG(\"Feeding hardware watchdog\");\n    feedDog();\n    return HARDWARE_WATCHDOG_TIMEOUT_MS;\n}\n\nbool WatchdogThread::setup()\n{\n    LOG_DEBUG(\"init hardware watchdog\");\n    pinMode(HARDWARE_WATCHDOG_WAKE, INPUT);\n    pinMode(HARDWARE_WATCHDOG_DONE, OUTPUT);\n    delay(1);\n    digitalWrite(HARDWARE_WATCHDOG_DONE, LOW);\n    delay(1);\n    feedDog();\n    return true;\n}\n#endif"
  },
  {
    "path": "src/watchdog/watchdogThread.h",
    "content": "#pragma once\n\n#include \"concurrency/OSThread.h\"\n#include <stdint.h>\n\n#ifdef HAS_HARDWARE_WATCHDOG\nclass WatchdogThread : private concurrency::OSThread\n{\n  public:\n    WatchdogThread();\n    void feedDog(void);\n    virtual bool setup();\n    virtual int32_t runOnce() override;\n};\n\nextern WatchdogThread *watchdogThread;\n#endif\n"
  },
  {
    "path": "src/xmodem.cpp",
    "content": "/**\n * @file xmodem.cpp\n * @brief Implementation of XMODEM protocol for Meshtastic devices.\n *\n * This file contains the implementation of the XMODEM protocol for Meshtastic devices. It is based on the XMODEM implementation\n * by Georges Menie (www.menie.org) and has been adapted for protobuf encapsulation.\n *\n * The XMODEM protocol is used for reliable transmission of binary data over a serial connection. This implementation supports\n * both sending and receiving of data.\n *\n * The XModemAdapter class provides the main functionality for the protocol, including CRC calculation, packet handling, and\n * control signal sending.\n *\n * @copyright Copyright (c) 2001-2019 Georges Menie\n * @author\n * @author\n * @date\n */\n/***********************************************************************************************************************\n * based on XMODEM implementation by Georges Menie (www.menie.org)\n ***********************************************************************************************************************\n * Copyright 2001-2019 Georges Menie (www.menie.org)\n * All rights reserved.\n *\n * Adapted for protobuf encapsulation. this is not really Xmodem any more.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n *     * Redistributions of source code must retain the above copyright\n *       notice, this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright\n *       notice, this list of conditions and the following disclaimer in the\n *       documentation and/or other materials provided with the distribution.\n *     * Neither the name of the University of California, Berkeley nor the\n *       names of its contributors may be used to endorse or promote products\n *       derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n **********************************************************************************************************************/\n\n#include \"xmodem.h\"\n#include \"SPILock.h\"\n\n#ifdef FSCom\n\nXModemAdapter xModem;\n\nXModemAdapter::XModemAdapter() {}\n\n/**\n * Calculates the CRC-16 CCITT checksum of the given buffer.\n *\n * @param buffer The buffer to calculate the checksum for.\n * @param length The length of the buffer.\n * @return The calculated checksum.\n */\nunsigned short XModemAdapter::crc16_ccitt(const pb_byte_t *buffer, int length)\n{\n    unsigned short crc16 = 0;\n    while (length != 0) {\n        crc16 = (unsigned char)(crc16 >> 8) | (crc16 << 8);\n        crc16 ^= *buffer;\n        crc16 ^= (unsigned char)(crc16 & 0xff) >> 4;\n        crc16 ^= (crc16 << 8) << 4;\n        crc16 ^= ((crc16 & 0xff) << 4) << 1;\n        buffer++;\n        length--;\n    }\n\n    return crc16;\n}\n\n/**\n * Calculates the checksum of the given buffer and compares it to the given\n * expected checksum. Returns 1 if the checksums match, 0 otherwise.\n *\n * @param buf The buffer to calculate the checksum of.\n * @param sz The size of the buffer.\n * @param tcrc The expected checksum.\n * @return 1 if the checksums match, 0 otherwise.\n */\nint XModemAdapter::check(const pb_byte_t *buf, int sz, unsigned short tcrc)\n{\n    return crc16_ccitt(buf, sz) == tcrc;\n}\n\nvoid XModemAdapter::sendControl(meshtastic_XModem_Control c)\n{\n    xmodemStore = meshtastic_XModem_init_zero;\n    xmodemStore.control = c;\n    LOG_DEBUG(\"XModem: Notify Send control %d\", c);\n    packetReady.notifyObservers(packetno);\n}\n\nmeshtastic_XModem XModemAdapter::getForPhone()\n{\n    return xmodemStore;\n}\n\nvoid XModemAdapter::resetForPhone()\n{\n    xmodemStore = meshtastic_XModem_init_zero;\n}\n\nvoid XModemAdapter::handlePacket(meshtastic_XModem xmodemPacket)\n{\n    switch (xmodemPacket.control) {\n    case meshtastic_XModem_Control_SOH:\n    case meshtastic_XModem_Control_STX:\n        if ((xmodemPacket.seq == 0) && !isReceiving && !isTransmitting) {\n            // NULL packet has the destination filename\n            memcpy(filename, &xmodemPacket.buffer.bytes, xmodemPacket.buffer.size);\n\n            if (xmodemPacket.control == meshtastic_XModem_Control_SOH) { // Receive this file and put to Flash\n                spiLock->lock();\n                file = FSCom.open(filename, FILE_O_WRITE);\n                spiLock->unlock();\n                if (file) {\n                    sendControl(meshtastic_XModem_Control_ACK);\n                    isReceiving = true;\n                    packetno = 1;\n                    break;\n                }\n                sendControl(meshtastic_XModem_Control_NAK);\n                isReceiving = false;\n                break;\n            } else { // Transmit this file from Flash\n                LOG_INFO(\"XModem: Transmit file %s\", filename);\n                spiLock->lock();\n                file = FSCom.open(filename, FILE_O_READ);\n                spiLock->unlock();\n                if (file) {\n                    packetno = 1;\n                    isTransmitting = true;\n                    xmodemStore = meshtastic_XModem_init_zero;\n                    xmodemStore.control = meshtastic_XModem_Control_SOH;\n                    xmodemStore.seq = packetno;\n                    spiLock->lock();\n                    xmodemStore.buffer.size = file.read(xmodemStore.buffer.bytes, sizeof(meshtastic_XModem_buffer_t::bytes));\n                    spiLock->unlock();\n                    xmodemStore.crc16 = crc16_ccitt(xmodemStore.buffer.bytes, xmodemStore.buffer.size);\n                    LOG_DEBUG(\"XModem: STX Notify Send packet %d, %d Bytes\", packetno, xmodemStore.buffer.size);\n                    if (xmodemStore.buffer.size < sizeof(meshtastic_XModem_buffer_t::bytes)) {\n                        isEOT = true;\n                        // send EOT on next Ack\n                    }\n                    packetReady.notifyObservers(packetno);\n                    break;\n                }\n                sendControl(meshtastic_XModem_Control_NAK);\n                isTransmitting = false;\n                break;\n            }\n        } else {\n            if (isReceiving) {\n                // normal file data packet\n                if ((xmodemPacket.seq == packetno) &&\n                    check(xmodemPacket.buffer.bytes, xmodemPacket.buffer.size, xmodemPacket.crc16)) {\n                    // valid packet\n                    spiLock->lock();\n                    file.write(xmodemPacket.buffer.bytes, xmodemPacket.buffer.size);\n                    spiLock->unlock();\n                    sendControl(meshtastic_XModem_Control_ACK);\n                    packetno++;\n                    break;\n                }\n                // invalid packet\n                sendControl(meshtastic_XModem_Control_NAK);\n                break;\n            } else if (isTransmitting) {\n                // just received something weird.\n                sendControl(meshtastic_XModem_Control_CAN);\n                isTransmitting = false;\n                break;\n            }\n        }\n        break;\n    case meshtastic_XModem_Control_EOT:\n        // End of transmission\n        sendControl(meshtastic_XModem_Control_ACK);\n        spiLock->lock();\n        file.flush();\n        file.close();\n        spiLock->unlock();\n        isReceiving = false;\n        break;\n    case meshtastic_XModem_Control_CAN:\n        // Cancel transmission and remove file\n        sendControl(meshtastic_XModem_Control_ACK);\n        spiLock->lock();\n        file.flush();\n        file.close();\n\n        FSCom.remove(filename);\n        spiLock->unlock();\n        isReceiving = false;\n        break;\n    case meshtastic_XModem_Control_ACK:\n        // Acknowledge Send the next packet\n        if (isTransmitting) {\n            if (isEOT) {\n                sendControl(meshtastic_XModem_Control_EOT);\n                spiLock->lock();\n                file.close();\n                spiLock->unlock();\n                LOG_INFO(\"XModem: Finished send file %s\", filename);\n                isTransmitting = false;\n                isEOT = false;\n                break;\n            }\n            retrans = MAXRETRANS; // reset retransmit counter\n            packetno++;\n            xmodemStore = meshtastic_XModem_init_zero;\n            xmodemStore.control = meshtastic_XModem_Control_SOH;\n            xmodemStore.seq = packetno;\n            spiLock->lock();\n            xmodemStore.buffer.size = file.read(xmodemStore.buffer.bytes, sizeof(meshtastic_XModem_buffer_t::bytes));\n            spiLock->unlock();\n            xmodemStore.crc16 = crc16_ccitt(xmodemStore.buffer.bytes, xmodemStore.buffer.size);\n            LOG_DEBUG(\"XModem: ACK Notify Send packet %d, %d Bytes\", packetno, xmodemStore.buffer.size);\n            if (xmodemStore.buffer.size < sizeof(meshtastic_XModem_buffer_t::bytes)) {\n                isEOT = true;\n                // send EOT on next Ack\n            }\n            packetReady.notifyObservers(packetno);\n        } else {\n            // just received something weird.\n            sendControl(meshtastic_XModem_Control_CAN);\n        }\n        break;\n    case meshtastic_XModem_Control_NAK:\n        // Negative acknowledge. Send the same buffer again\n        if (isTransmitting) {\n            if (--retrans <= 0) {\n                sendControl(meshtastic_XModem_Control_CAN);\n                spiLock->lock();\n                file.close();\n                spiLock->unlock();\n                LOG_INFO(\"XModem: Retransmit timeout, cancel file %s\", filename);\n                isTransmitting = false;\n                break;\n            }\n            xmodemStore = meshtastic_XModem_init_zero;\n            xmodemStore.control = meshtastic_XModem_Control_SOH;\n            xmodemStore.seq = packetno;\n            spiLock->lock();\n            file.seek((packetno - 1) * sizeof(meshtastic_XModem_buffer_t::bytes));\n\n            xmodemStore.buffer.size = file.read(xmodemStore.buffer.bytes, sizeof(meshtastic_XModem_buffer_t::bytes));\n            spiLock->unlock();\n            xmodemStore.crc16 = crc16_ccitt(xmodemStore.buffer.bytes, xmodemStore.buffer.size);\n            LOG_DEBUG(\"XModem: NAK Notify Send packet %d, %d Bytes\", packetno, xmodemStore.buffer.size);\n            if (xmodemStore.buffer.size < sizeof(meshtastic_XModem_buffer_t::bytes)) {\n                isEOT = true;\n                // send EOT on next Ack\n            }\n            packetReady.notifyObservers(packetno);\n        } else {\n            // just received something weird.\n            sendControl(meshtastic_XModem_Control_CAN);\n        }\n        break;\n    default:\n        // Unknown control character\n        break;\n    }\n}\n#endif\n"
  },
  {
    "path": "src/xmodem.h",
    "content": "/***********************************************************************************************************************\n * based on XMODEM implementation by Georges Menie (www.menie.org)\n ***********************************************************************************************************************\n * Copyright 2001-2019 Georges Menie (www.menie.org)\n * All rights reserved.\n *\n * Adapted for protobuf encapsulation. this is not really Xmodem any more.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n *     * Redistributions of source code must retain the above copyright\n *       notice, this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright\n *       notice, this list of conditions and the following disclaimer in the\n *       documentation and/or other materials provided with the distribution.\n *     * Neither the name of the University of California, Berkeley nor the\n *       names of its contributors may be used to endorse or promote products\n *       derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n **********************************************************************************************************************/\n\n#pragma once\n\n#include \"FSCommon.h\"\n#include \"configuration.h\"\n#include \"mesh/generated/meshtastic/xmodem.pb.h\"\n\n#define MAXRETRANS 25\n\n#ifdef FSCom\n\nclass XModemAdapter\n{\n  public:\n    // Called when we put a fragment in the outgoing memory\n    Observable<uint32_t> packetReady;\n\n    XModemAdapter();\n\n    void handlePacket(meshtastic_XModem xmodemPacket);\n    meshtastic_XModem getForPhone();\n    void resetForPhone();\n\n  private:\n    bool isReceiving = false;\n    bool isTransmitting = false;\n    bool isEOT = false;\n\n    int retrans = MAXRETRANS;\n\n    uint16_t packetno = 0;\n\n#if defined(ARCH_NRF52) || defined(ARCH_STM32WL)\n    File file = File(FSCom);\n#else\n    File file;\n#endif\n\n    char filename[sizeof(meshtastic_XModem_buffer_t::bytes)] = {0};\n\n  protected:\n    meshtastic_XModem xmodemStore = meshtastic_XModem_init_zero;\n    unsigned short crc16_ccitt(const pb_byte_t *buffer, int length);\n    int check(const pb_byte_t *buf, int sz, unsigned short tcrc);\n    void sendControl(meshtastic_XModem_Control c);\n};\n\nextern XModemAdapter xModem;\n#endif // FSCom"
  },
  {
    "path": "suppressions.txt",
    "content": "// cppcheck suppressions\nassertWithSideEffect\n\n// TODO: need to come back to these\nduplInheritedMember\n\n// TODO:\n// \"Using memset() on struct which contains a floating point number.\"\n// tried:\n//   if (std::is_floating_point<T>::value) {\n//     p = 0;\n// in src/mesh/MemoryPool.h\nmemsetClassFloat\n\nknownConditionTrueFalse\n\n// no real downside/harm in these\nunusedFunction\nunusedPrivateFunction\n\n// most likely due to a cppcheck configuration issue (like missing an include)\nsyntaxError\n\n// try to quiet a few\n//useInitializationList:src/main.cpp\nuseInitializationList\n\n//unreadVariable:src/graphics/Screen.cpp\nunreadVariable\n\n// I don't want to go back and cast function pointers just to appease a tools insatiable thirst for immutability\nconstParameterCallback\n\nredundantInitialization\n\n//cstyleCast:src/mesh/MemoryPool.h:71\ncstyleCast\n\n// ignore stuff that is not ours\n*:.pio/*\n*:*/libdeps/*\n*:*/generated/*\nnoExplicitConstructor:*/mqtt/*\npostfixOperator:*/mqtt/*\n\n// these two caused issues\nmissingOverride\nvirtualCallInConstructor\n\npassedByValue:*/RedirectablePrint.h\n\ninternalAstError:*/CrossPlatformCryptoEngine.cpp\nuninitMemberVar:*/AudioThread.h\n// False positive\nconstVariableReference:*/Channels.cpp\nconstParameterPointer:*/unishox2.c\n\nuseStlAlgorithm\n\nvariableScope"
  },
  {
    "path": "test/TestUtil.cpp",
    "content": "#include \"SerialConsole.h\"\n#include \"concurrency/OSThread.h\"\n#include \"gps/RTC.h\"\n\n#include \"TestUtil.h\"\n\n#if defined(ARDUINO)\n#include <Arduino.h>\n#else\n#include <chrono>\n#include <thread>\n#endif\n\nvoid initializeTestEnvironment()\n{\n    concurrency::hasBeenSetup = true;\n    consoleInit();\n#if ARCH_PORTDUINO\n    struct timeval tv;\n    tv.tv_sec = time(NULL);\n    tv.tv_usec = 0;\n    perhapsSetRTC(RTCQualityNTP, &tv);\n#endif\n    concurrency::OSThread::setup();\n}\n\nvoid testDelay(unsigned long ms)\n{\n#if defined(ARDUINO)\n    ::delay(ms);\n#else\n    std::this_thread::sleep_for(std::chrono::milliseconds(ms));\n#endif\n}"
  },
  {
    "path": "test/TestUtil.h",
    "content": "#pragma once\n\n// Initialize testing environment.\nvoid initializeTestEnvironment();\n\n// Portable delay for tests (Arduino or host).\nvoid testDelay(unsigned long ms);"
  },
  {
    "path": "test/test_admin_radio/test_main.cpp",
    "content": "/**\n * Tests for the radio configuration validation and clamping functions\n * introduced in the radio_interface_cherrypick branch.\n *\n * Targets:\n *  1. getRegion()\n *  2. RadioInterface::validateConfigRegion()\n *  3. RadioInterface::validateConfigLora()\n *  4. RadioInterface::clampConfigLora()\n *  5. RegionInfo preset lists (PRESETS_STD, PRESETS_EU_868, PRESETS_UNDEF)\n *  6. Channel spacing calculation (placeholder for future protobuf changes)\n */\n\n#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"NodeDB.h\"\n#include \"RadioInterface.h\"\n#include \"TestUtil.h\"\n#include \"modules/AdminModule.h\"\n#include <unity.h>\n\n#include \"meshtastic/config.pb.h\"\n\nclass MockMeshService : public MeshService\n{\n  public:\n    void sendClientNotification(meshtastic_ClientNotification *n) override { releaseClientNotificationToPool(n); }\n};\n\nstatic MockMeshService *mockMeshService;\n\n// -----------------------------------------------------------------------\n// getRegion() tests\n// -----------------------------------------------------------------------\nextern const RegionInfo *getRegion(meshtastic_Config_LoRaConfig_RegionCode code);\n\nstatic void test_getRegion_returnsCorrectRegion_US()\n{\n    const RegionInfo *r = getRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n    TEST_ASSERT_NOT_NULL(r);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_RegionCode_US, r->code);\n    TEST_ASSERT_EQUAL_STRING(\"US\", r->name);\n}\n\nstatic void test_getRegion_returnsCorrectRegion_EU868()\n{\n    const RegionInfo *r = getRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    TEST_ASSERT_NOT_NULL(r);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_RegionCode_EU_868, r->code);\n    TEST_ASSERT_EQUAL_STRING(\"EU_868\", r->name);\n}\n\nstatic void test_getRegion_returnsCorrectRegion_LORA24()\n{\n    const RegionInfo *r = getRegion(meshtastic_Config_LoRaConfig_RegionCode_LORA_24);\n    TEST_ASSERT_NOT_NULL(r);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_RegionCode_LORA_24, r->code);\n    TEST_ASSERT_TRUE(r->wideLora);\n}\n\nstatic void test_getRegion_unsetCodeReturnsUnsetEntry()\n{\n    const RegionInfo *r = getRegion(meshtastic_Config_LoRaConfig_RegionCode_UNSET);\n    TEST_ASSERT_NOT_NULL(r);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_RegionCode_UNSET, r->code);\n    TEST_ASSERT_EQUAL_STRING(\"UNSET\", r->name);\n}\n\nstatic void test_getRegion_unknownCodeFallsToUnset()\n{\n    // A code not in the table should iterate to the UNSET sentinel\n    const RegionInfo *r = getRegion((meshtastic_Config_LoRaConfig_RegionCode)255);\n    TEST_ASSERT_NOT_NULL(r);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_RegionCode_UNSET, r->code);\n}\n\n// -----------------------------------------------------------------------\n// validateConfigRegion() tests\n// -----------------------------------------------------------------------\n\nstatic void test_validateConfigRegion_validRegionReturnsTrue()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n\n    // Ensure owner is not licensed (should not matter for non-licensed-only regions)\n    devicestate.owner.is_licensed = false;\n\n    TEST_ASSERT_TRUE(RadioInterface::validateConfigRegion(cfg));\n}\n\nstatic void test_validateConfigRegion_unsetRegionReturnsTrue()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;\n\n    devicestate.owner.is_licensed = false;\n\n    // UNSET region has licensedOnly=false, so should pass\n    TEST_ASSERT_TRUE(RadioInterface::validateConfigRegion(cfg));\n}\n\n// -----------------------------------------------------------------------\n// Shadow tables for testing (preset lists → profiles → regions → lookup)\n// -----------------------------------------------------------------------\n\n// A minimal preset list with only one entry\nstatic const meshtastic_Config_LoRaConfig_ModemPreset TEST_PRESETS_SINGLE[] = {\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST,\n    MODEM_PRESET_END,\n};\n\n// A preset list that includes all turbo variants only\nstatic const meshtastic_Config_LoRaConfig_ModemPreset TEST_PRESETS_TURBO_ONLY[] = {\n    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO,\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO,\n    MODEM_PRESET_END,\n};\n\n// A restricted list simulating a hypothetical tight-regulation region\nstatic const meshtastic_Config_LoRaConfig_ModemPreset TEST_PRESETS_RESTRICTED[] = {\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW,\n    meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE,\n    MODEM_PRESET_END,\n};\n\n// Mirrors PROFILE_STD but with non-zero spacing/padding for testing\nstatic const RegionProfile TEST_PROFILE_SPACED = {\n    TEST_PRESETS_SINGLE,\n    /* spacing */ 0.025f,\n    /* padding */ 0.010f,\n    /* audioPermitted */ true,\n    /* licensedOnly */ false,\n    /* textThrottle */ 0,\n    /* positionThrottle */ 0,\n    /* telemetryThrottle */ 0,\n    /* overrideSlot */ 0,\n};\n\n// A licensed-only profile for testing access control\nstatic const RegionProfile TEST_PROFILE_LICENSED = {\n    TEST_PRESETS_RESTRICTED,\n    /* spacing */ 0.0f,\n    /* padding */ 0.0f,\n    /* audioPermitted */ false,\n    /* licensedOnly */ true,\n    /* textThrottle */ 5,\n    /* positionThrottle */ 10,\n    /* telemetryThrottle */ 10,\n    /* overrideSlot */ 3,\n};\n\n// Turbo-only profile\nstatic const RegionProfile TEST_PROFILE_TURBO = {\n    TEST_PRESETS_TURBO_ONLY,\n    /* spacing */ 0.0f,\n    /* padding */ 0.0f,\n    /* audioPermitted */ true,\n    /* licensedOnly */ false,\n    /* textThrottle */ 0,\n    /* positionThrottle */ 0,\n    /* telemetryThrottle */ 0,\n    /* overrideSlot */ 0,\n};\n\nstatic const RegionInfo testRegions[] = {\n    // A wide US-like region with spacing + padding\n    {meshtastic_Config_LoRaConfig_RegionCode_US, 902.0f, 928.0f, 100, 30, false, false, &TEST_PROFILE_SPACED, \"TEST_US_SPACED\"},\n\n    // A narrow band simulating tight EU regulation\n    {meshtastic_Config_LoRaConfig_RegionCode_EU_868, 869.4f, 869.65f, 10, 14, false, false, &TEST_PROFILE_LICENSED,\n     \"TEST_EU_LICENSED\"},\n\n    // A wide-LoRa region with turbo-only presets\n    {meshtastic_Config_LoRaConfig_RegionCode_LORA_24, 2400.0f, 2483.5f, 100, 10, false, true, &TEST_PROFILE_TURBO,\n     \"TEST_LORA24_TURBO\"},\n\n    // Sentinel — must be last\n    {meshtastic_Config_LoRaConfig_RegionCode_UNSET, 902.0f, 928.0f, 100, 30, false, false, &TEST_PROFILE_SPACED, \"TEST_UNSET\"},\n};\n\nstatic const RegionInfo *getTestRegion(meshtastic_Config_LoRaConfig_RegionCode code)\n{\n    const RegionInfo *r = testRegions;\n    while (r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET) {\n        if (r->code == code)\n            return r;\n        r++;\n    }\n    return r; // Returns the UNSET sentinel\n}\n\n// -----------------------------------------------------------------------\n// Shadow table tests\n// -----------------------------------------------------------------------\n\nstatic void test_shadowTable_spacedProfileHasNonZeroSpacing()\n{\n    const RegionInfo *r = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n    TEST_ASSERT_EQUAL_STRING(\"TEST_US_SPACED\", r->name);\n    TEST_ASSERT_FLOAT_WITHIN(0.001f, 0.025f, r->profile->spacing);\n    TEST_ASSERT_FLOAT_WITHIN(0.001f, 0.010f, r->profile->padding);\n}\n\nstatic void test_shadowTable_licensedProfileFlagsCorrect()\n{\n    const RegionInfo *r = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    TEST_ASSERT_TRUE(r->profile->licensedOnly);\n    TEST_ASSERT_FALSE(r->profile->audioPermitted);\n    TEST_ASSERT_EQUAL(3, r->profile->overrideSlot);\n}\n\nstatic void test_shadowTable_presetCountMatchesExpected()\n{\n    const RegionInfo *spaced = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n    TEST_ASSERT_EQUAL(1, spaced->getNumPresets());\n\n    const RegionInfo *licensed = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    TEST_ASSERT_EQUAL(2, licensed->getNumPresets());\n\n    const RegionInfo *turbo = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_LORA_24);\n    TEST_ASSERT_EQUAL(2, turbo->getNumPresets());\n}\n\nstatic void test_shadowTable_defaultPresetIsFirstInList()\n{\n    const RegionInfo *spaced = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST, spaced->getDefaultPreset());\n\n    const RegionInfo *licensed = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW, licensed->getDefaultPreset());\n\n    const RegionInfo *turbo = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_LORA_24);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO, turbo->getDefaultPreset());\n}\n\nstatic void test_shadowTable_channelSpacingWithPadding()\n{\n    // Verify channel count when spacing + padding are non-zero\n    const RegionInfo *r = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n    float bw = modemPresetToBwKHz(r->getDefaultPreset(), r->wideLora);\n    float channelSpacing = r->profile->spacing + (r->profile->padding * 2) + (bw / 1000.0f);\n\n    // spacing=0.025, padding=0.010*2=0.020, bw=250kHz=0.250\n    // channelSpacing = 0.025 + 0.020 + 0.250 = 0.295 MHz\n    TEST_ASSERT_FLOAT_WITHIN(0.001f, 0.295f, channelSpacing);\n\n    uint32_t numChannels = (uint32_t)(((r->freqEnd - r->freqStart + r->profile->spacing) / channelSpacing) + 0.5f);\n    // (928 - 902 + 0.025) / 0.295 = 88.2 → 88\n    TEST_ASSERT_EQUAL_UINT32(88, numChannels);\n}\n\nstatic void test_shadowTable_turboOnlyOnWideLora()\n{\n    const RegionInfo *r = getTestRegion(meshtastic_Config_LoRaConfig_RegionCode_LORA_24);\n    TEST_ASSERT_TRUE(r->wideLora);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO, r->getDefaultPreset());\n\n    // Verify wide-LoRa bandwidth for SHORT_TURBO\n    float bw = modemPresetToBwKHz(r->getDefaultPreset(), r->wideLora);\n    TEST_ASSERT_FLOAT_WITHIN(0.1f, 1625.0f, bw); // 1625 kHz in wide mode\n}\n\nstatic void test_shadowTable_unknownCodeFallsToSentinel()\n{\n    const RegionInfo *r = getTestRegion((meshtastic_Config_LoRaConfig_RegionCode)200);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_RegionCode_UNSET, r->code);\n    TEST_ASSERT_EQUAL_STRING(\"TEST_UNSET\", r->name);\n}\n\n// -----------------------------------------------------------------------\n// validateConfigLora() tests\n// -----------------------------------------------------------------------\n\nstatic void test_validateConfigLora_validPresetForUS()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.use_preset = true;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;\n\n    TEST_ASSERT_TRUE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_validateConfigLora_allStdPresetsValidForUS()\n{\n    meshtastic_Config_LoRaConfig_ModemPreset stdPresets[] = {\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST,     meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW,\n        meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW,   meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST,\n        meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW,    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST,\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE, meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO,\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO,\n    };\n\n    for (size_t i = 0; i < sizeof(stdPresets) / sizeof(stdPresets[0]); i++) {\n        meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n        cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n        cfg.use_preset = true;\n        cfg.modem_preset = stdPresets[i];\n        TEST_ASSERT_TRUE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"Expected valid preset for US\");\n    }\n}\n\nstatic void test_validateConfigLora_turboPresetsInvalidForEU868()\n{\n    // EU_868 has PRESETS_EU_868 which excludes SHORT_TURBO and LONG_TURBO\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    cfg.use_preset = true;\n\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO;\n    TEST_ASSERT_FALSE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"SHORT_TURBO should be invalid for EU_868\");\n\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO;\n    TEST_ASSERT_FALSE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"LONG_TURBO should be invalid for EU_868\");\n}\n\nstatic void test_validateConfigLora_validPresetsForEU868()\n{\n    meshtastic_Config_LoRaConfig_ModemPreset eu868Presets[] = {\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST,     meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW,\n        meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW,   meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST,\n        meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW,    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST,\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE,\n    };\n\n    for (size_t i = 0; i < sizeof(eu868Presets) / sizeof(eu868Presets[0]); i++) {\n        meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n        cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n        cfg.use_preset = true;\n        cfg.modem_preset = eu868Presets[i];\n        TEST_ASSERT_TRUE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"Expected valid preset for EU_868\");\n    }\n}\n\nstatic void test_validateConfigLora_customBandwidthTooWideForEU868()\n{\n    // EU_868 spans 869.4 - 869.65 = 0.25 MHz = 250 kHz\n    // A 500 kHz custom BW should be rejected\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    cfg.use_preset = false;\n    cfg.bandwidth = 500;\n    cfg.spread_factor = 11;\n    cfg.coding_rate = 5;\n\n    TEST_ASSERT_FALSE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_validateConfigLora_customBandwidthFitsUS()\n{\n    // US spans 902 - 928 = 26 MHz, so 250 kHz BW fits easily\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.use_preset = false;\n    cfg.bandwidth = 250;\n    cfg.spread_factor = 11;\n    cfg.coding_rate = 5;\n\n    TEST_ASSERT_TRUE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_validateConfigLora_customBandwidthFitsEU868()\n{\n    // EU_868 spans 250 kHz, 125 kHz BW should fit\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    cfg.use_preset = false;\n    cfg.bandwidth = 125;\n    cfg.spread_factor = 12;\n    cfg.coding_rate = 8;\n\n    TEST_ASSERT_TRUE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_validateConfigLora_bogusPresetRejected()\n{\n    // A fabricated preset value not in any list should be rejected\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.use_preset = true;\n    cfg.modem_preset = (meshtastic_Config_LoRaConfig_ModemPreset)99;\n\n    TEST_ASSERT_FALSE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_validateConfigLora_unsetRegionOnlyAcceptsLongFast()\n{\n    // UNSET uses PROFILE_UNDEF which has only LONG_FAST\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;\n    cfg.use_preset = true;\n\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;\n    TEST_ASSERT_TRUE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"LONG_FAST should be valid for UNSET\");\n\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;\n    TEST_ASSERT_FALSE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"MEDIUM_FAST should be invalid for UNSET\");\n\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO;\n    TEST_ASSERT_FALSE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"SHORT_TURBO should be invalid for UNSET\");\n}\n\nstatic void test_validateConfigLora_allPresetsValidForLORA24()\n{\n    // LORA_24 uses PROFILE_STD (9 presets) with wideLora=true\n    meshtastic_Config_LoRaConfig_ModemPreset stdPresets[] = {\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST,     meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW,\n        meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW,   meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST,\n        meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW,    meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST,\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE, meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO,\n        meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO,\n    };\n\n    for (size_t i = 0; i < sizeof(stdPresets) / sizeof(stdPresets[0]); i++) {\n        meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n        cfg.region = meshtastic_Config_LoRaConfig_RegionCode_LORA_24;\n        cfg.use_preset = true;\n        cfg.modem_preset = stdPresets[i];\n        TEST_ASSERT_TRUE_MESSAGE(RadioInterface::validateConfigLora(cfg), \"Expected valid preset for LORA_24\");\n    }\n}\n\n// -----------------------------------------------------------------------\n// clampConfigLora() tests\n// -----------------------------------------------------------------------\n\nstatic void test_clampConfigLora_invalidPresetClampedToDefault()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    cfg.use_preset = true;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO; // not in EU_868 preset list\n\n    RadioInterface::clampConfigLora(cfg);\n\n    const RegionInfo *eu868 = getRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    TEST_ASSERT_EQUAL(eu868->getDefaultPreset(), cfg.modem_preset);\n}\n\nstatic void test_clampConfigLora_validPresetUnchanged()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.use_preset = true;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;\n\n    RadioInterface::clampConfigLora(cfg);\n\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST, cfg.modem_preset);\n}\n\nstatic void test_clampConfigLora_customBwTooWideClampedToDefaultBw()\n{\n    // EU_868 span is 250kHz. A 500kHz custom BW should be clamped to default preset BW.\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    cfg.use_preset = false;\n    cfg.bandwidth = 500;\n    cfg.spread_factor = 11;\n    cfg.coding_rate = 5;\n\n    RadioInterface::clampConfigLora(cfg);\n\n    const RegionInfo *eu868 = getRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    float expectedBw = modemPresetToBwKHz(eu868->getDefaultPreset(), eu868->wideLora);\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, expectedBw, (float)cfg.bandwidth);\n}\n\nstatic void test_clampConfigLora_customBwValidLeftUnchanged()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.use_preset = false;\n    cfg.bandwidth = 125;\n    cfg.spread_factor = 12;\n    cfg.coding_rate = 8;\n\n    RadioInterface::clampConfigLora(cfg);\n\n    TEST_ASSERT_EQUAL_UINT16(125, cfg.bandwidth);\n}\n\nstatic void test_clampConfigLora_bogusPresetOnUnsetClampedToLongFast()\n{\n    // UNSET uses PROFILE_UNDEF with only LONG_FAST; any other preset should clamp to it\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_UNSET;\n    cfg.use_preset = true;\n    cfg.modem_preset = (meshtastic_Config_LoRaConfig_ModemPreset)99;\n\n    RadioInterface::clampConfigLora(cfg);\n\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST, cfg.modem_preset);\n}\n\nstatic void test_clampConfigLora_invalidPresetOnLORA24ClampedToDefault()\n{\n    // LORA_24 uses PROFILE_STD; a bogus preset should clamp to LONG_FAST (first in PRESETS_STD)\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_LORA_24;\n    cfg.use_preset = true;\n    cfg.modem_preset = (meshtastic_Config_LoRaConfig_ModemPreset)99;\n\n    RadioInterface::clampConfigLora(cfg);\n\n    const RegionInfo *lora24 = getRegion(meshtastic_Config_LoRaConfig_RegionCode_LORA_24);\n    TEST_ASSERT_EQUAL(lora24->getDefaultPreset(), cfg.modem_preset);\n}\n\n// -----------------------------------------------------------------------\n// RegionInfo preset list integrity tests\n// -----------------------------------------------------------------------\n\nstatic void test_presetsStd_hasNineEntries()\n{\n    // PROFILE_STD should have exactly 9 presets\n    const RegionInfo *us = getRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n    TEST_ASSERT_EQUAL(9, us->getNumPresets());\n    TEST_ASSERT_EQUAL_PTR(PROFILE_STD.presets, us->getAvailablePresets());\n}\n\nstatic void test_presetsEU868_hasSevenEntries()\n{\n    const RegionInfo *eu = getRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    TEST_ASSERT_EQUAL(7, eu->getNumPresets());\n    TEST_ASSERT_EQUAL_PTR(PROFILE_EU868.presets, eu->getAvailablePresets());\n}\n\nstatic void test_presetsUndef_hasOneEntry()\n{\n    const RegionInfo *unset = getRegion(meshtastic_Config_LoRaConfig_RegionCode_UNSET);\n    TEST_ASSERT_EQUAL(1, unset->getNumPresets());\n    TEST_ASSERT_EQUAL_PTR(PROFILE_UNDEF.presets, unset->getAvailablePresets());\n}\n\nstatic void test_defaultPresetIsInAvailablePresets()\n{\n    // For every region, the defaultPreset must appear in its own availablePresets list\n    const RegionInfo *r = regions;\n    while (true) {\n        bool found = false;\n        for (size_t i = 0; i < r->getNumPresets(); i++) {\n            if (r->getAvailablePresets()[i] == r->getDefaultPreset()) {\n                found = true;\n                break;\n            }\n        }\n        char msg[80];\n        snprintf(msg, sizeof(msg), \"Region %s defaultPreset not in availablePresets\", r->name);\n        TEST_ASSERT_TRUE_MESSAGE(found, msg);\n\n        if (r->code == meshtastic_Config_LoRaConfig_RegionCode_UNSET)\n            break; // UNSET is the sentinel, stop after it\n        r++;\n    }\n}\n\nstatic void test_regionFieldsAreSane()\n{\n    // Basic sanity check: all regions have freqEnd > freqStart and a non-null name\n    const RegionInfo *r = regions;\n    while (true) {\n        char msg[80];\n        snprintf(msg, sizeof(msg), \"Region %s: freqEnd must be > freqStart\", r->name);\n        TEST_ASSERT_TRUE_MESSAGE(r->freqEnd > r->freqStart, msg);\n        TEST_ASSERT_NOT_NULL(r->name);\n        TEST_ASSERT_TRUE_MESSAGE(r->getNumPresets() > 0, \"numPresets must be > 0\");\n        TEST_ASSERT_NOT_NULL(r->getAvailablePresets());\n\n        if (r->code == meshtastic_Config_LoRaConfig_RegionCode_UNSET)\n            break;\n        r++;\n    }\n}\n\nstatic void test_onlyLORA24HasWideLora()\n{\n    // Verify that LORA_24 is the only region with wideLora=true\n    const RegionInfo *r = regions;\n    while (true) {\n        char msg[80];\n        if (r->code == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) {\n            snprintf(msg, sizeof(msg), \"Region %s should have wideLora=true\", r->name);\n            TEST_ASSERT_TRUE_MESSAGE(r->wideLora, msg);\n        } else {\n            snprintf(msg, sizeof(msg), \"Region %s should have wideLora=false\", r->name);\n            TEST_ASSERT_FALSE_MESSAGE(r->wideLora, msg);\n        }\n\n        if (r->code == meshtastic_Config_LoRaConfig_RegionCode_UNSET)\n            break;\n        r++;\n    }\n}\n\n// -----------------------------------------------------------------------\n// Channel spacing calculation (placeholder for future protobuf updates)\n// -----------------------------------------------------------------------\n\nstatic void test_channelSpacingCalculation_US_LONG_FAST()\n{\n    // Current formula: channelSpacing = spacing + (padding * 2) + (bw / 1000)\n    // US: spacing=0, padding=0\n    // LONG_FAST on non-wide region: bw=250 kHz\n    // channelSpacing = 0 + 0 + 0.250 = 0.250 MHz\n    // numChannels = round((928 - 902 + 0) / 0.250) = round(104) = 104\n    const RegionInfo *us = getRegion(meshtastic_Config_LoRaConfig_RegionCode_US);\n    float bw = modemPresetToBwKHz(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST, us->wideLora);\n    float channelSpacing = us->profile->spacing + (us->profile->padding * 2) + (bw / 1000.0f);\n    uint32_t numChannels = (uint32_t)(((us->freqEnd - us->freqStart + us->profile->spacing) / channelSpacing) + 0.5f);\n\n    TEST_ASSERT_FLOAT_WITHIN(0.001f, 0.250f, channelSpacing);\n    TEST_ASSERT_EQUAL_UINT32(104, numChannels);\n}\n\nstatic void test_channelSpacingCalculation_EU868_LONG_FAST()\n{\n    // EU_868: freqStart=869.4, freqEnd=869.65, spacing=0, padding=0\n    // LONG_FAST: bw=250 kHz => channelSpacing = 0.250 MHz\n    // numChannels = round((0.25 + 0) / 0.250) = 1\n    const RegionInfo *eu = getRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    float bw = modemPresetToBwKHz(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST, eu->wideLora);\n    float channelSpacing = eu->profile->spacing + (eu->profile->padding * 2) + (bw / 1000.0f);\n    uint32_t numChannels = (uint32_t)(((eu->freqEnd - eu->freqStart + eu->profile->spacing) / channelSpacing) + 0.5f);\n\n    TEST_ASSERT_FLOAT_WITHIN(0.001f, 0.250f, channelSpacing);\n    TEST_ASSERT_EQUAL_UINT32(1, numChannels);\n}\n\n// Placeholder: when protobuf region definitions include non-zero padding/spacing,\n// add tests here to verify the channel count and frequency calculations.\nstatic void test_channelSpacingCalculation_placeholder()\n{\n    // TODO: Once protobuf RegionInfo entries have non-zero padding or spacing values,\n    // verify:\n    //  - Channel count matches expected value for each (region, preset) pair\n    //  - First channel frequency = freqStart + (bw/2000) + padding\n    //  - Nth channel frequency = first + (n * channelSpacing)\n    //  - overrideSlot, when non-zero, forces the channel_num\n    TEST_PASS_MESSAGE(\"Placeholder for future channel spacing tests with updated protobuf region fields\");\n}\n\n// -----------------------------------------------------------------------\n// handleSetConfig fromOthers dispatch tests\n// -----------------------------------------------------------------------\n\nclass AdminModuleTestShim : public AdminModule\n{\n  public:\n    using AdminModule::handleSetConfig;\n};\n\nstatic AdminModuleTestShim *testAdmin;\n\nstatic meshtastic_Config makeLoraSetConfig(meshtastic_Config_LoRaConfig_RegionCode region, bool usePreset,\n                                           meshtastic_Config_LoRaConfig_ModemPreset preset)\n{\n    meshtastic_Config c = meshtastic_Config_init_zero;\n    c.which_payload_variant = meshtastic_Config_lora_tag;\n    c.payload_variant.lora.region = region;\n    c.payload_variant.lora.use_preset = usePreset;\n    c.payload_variant.lora.modem_preset = preset;\n    return c;\n}\n\nstatic void test_handleSetConfig_fromOthers_invalidPresetRejected()\n{\n    // Set up a known-good baseline in the global config\n    config.lora = meshtastic_Config_LoRaConfig_init_zero;\n    config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    config.lora.use_preset = true;\n    config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;\n    initRegion();\n\n    // Build an admin set_config with an invalid preset for EU_868\n    meshtastic_Config c = makeLoraSetConfig(meshtastic_Config_LoRaConfig_RegionCode_EU_868, true,\n                                            meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO);\n\n    testAdmin->handleSetConfig(c, true); // fromOthers = true\n\n    // fromOthers=true: invalid preset should be rejected, old preset preserved\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST, config.lora.modem_preset);\n}\n\nstatic void test_handleSetConfig_fromLocal_invalidPresetClamped()\n{\n    // Set up a known-good baseline\n    config.lora = meshtastic_Config_LoRaConfig_init_zero;\n    config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    config.lora.use_preset = true;\n    config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;\n    initRegion();\n\n    // Build an admin set_config with an invalid preset for EU_868\n    meshtastic_Config c = makeLoraSetConfig(meshtastic_Config_LoRaConfig_RegionCode_EU_868, true,\n                                            meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO);\n\n    testAdmin->handleSetConfig(c, false); // fromOthers = false (local client)\n\n    // fromOthers=false: invalid preset should be clamped to the region's default\n    const RegionInfo *eu868 = getRegion(meshtastic_Config_LoRaConfig_RegionCode_EU_868);\n    TEST_ASSERT_EQUAL(eu868->getDefaultPreset(), config.lora.modem_preset);\n}\n\nstatic void test_handleSetConfig_fromOthers_validPresetAccepted()\n{\n    // Set up baseline\n    config.lora = meshtastic_Config_LoRaConfig_init_zero;\n    config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    config.lora.use_preset = true;\n    config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;\n    initRegion();\n\n    // Build an admin set_config with a valid preset for EU_868\n    meshtastic_Config c = makeLoraSetConfig(meshtastic_Config_LoRaConfig_RegionCode_EU_868, true,\n                                            meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST);\n\n    testAdmin->handleSetConfig(c, true); // fromOthers = true\n\n    // Valid preset should be accepted regardless of fromOthers\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST, config.lora.modem_preset);\n}\n\n// -----------------------------------------------------------------------\n// Test runner\n// -----------------------------------------------------------------------\n\nvoid setUp(void)\n{\n    mockMeshService = new MockMeshService();\n    service = mockMeshService;\n    testAdmin = new AdminModuleTestShim();\n}\nvoid tearDown(void)\n{\n    service = nullptr;\n    delete mockMeshService;\n    mockMeshService = nullptr;\n    delete testAdmin;\n    testAdmin = nullptr;\n}\n\nvoid setup()\n{\n    delay(10);\n    delay(2000);\n\n    initializeTestEnvironment();\n\n    UNITY_BEGIN();\n\n    // getRegion()\n    RUN_TEST(test_getRegion_returnsCorrectRegion_US);\n    RUN_TEST(test_getRegion_returnsCorrectRegion_EU868);\n    RUN_TEST(test_getRegion_returnsCorrectRegion_LORA24);\n    RUN_TEST(test_getRegion_unsetCodeReturnsUnsetEntry);\n    RUN_TEST(test_getRegion_unknownCodeFallsToUnset);\n\n    // validateConfigRegion()\n    RUN_TEST(test_validateConfigRegion_validRegionReturnsTrue);\n    RUN_TEST(test_validateConfigRegion_unsetRegionReturnsTrue);\n\n    // Shadow table tests\n    RUN_TEST(test_shadowTable_spacedProfileHasNonZeroSpacing);\n    RUN_TEST(test_shadowTable_licensedProfileFlagsCorrect);\n    RUN_TEST(test_shadowTable_presetCountMatchesExpected);\n    RUN_TEST(test_shadowTable_defaultPresetIsFirstInList);\n    RUN_TEST(test_shadowTable_channelSpacingWithPadding);\n    RUN_TEST(test_shadowTable_turboOnlyOnWideLora);\n    RUN_TEST(test_shadowTable_unknownCodeFallsToSentinel);\n\n    // validateConfigLora()\n    RUN_TEST(test_validateConfigLora_validPresetForUS);\n    RUN_TEST(test_validateConfigLora_allStdPresetsValidForUS);\n    RUN_TEST(test_validateConfigLora_turboPresetsInvalidForEU868);\n    RUN_TEST(test_validateConfigLora_validPresetsForEU868);\n    RUN_TEST(test_validateConfigLora_customBandwidthTooWideForEU868);\n    RUN_TEST(test_validateConfigLora_customBandwidthFitsUS);\n    RUN_TEST(test_validateConfigLora_customBandwidthFitsEU868);\n    RUN_TEST(test_validateConfigLora_bogusPresetRejected);\n    RUN_TEST(test_validateConfigLora_unsetRegionOnlyAcceptsLongFast);\n    RUN_TEST(test_validateConfigLora_allPresetsValidForLORA24);\n\n    // clampConfigLora()\n    RUN_TEST(test_clampConfigLora_invalidPresetClampedToDefault);\n    RUN_TEST(test_clampConfigLora_validPresetUnchanged);\n    RUN_TEST(test_clampConfigLora_customBwTooWideClampedToDefaultBw);\n    RUN_TEST(test_clampConfigLora_customBwValidLeftUnchanged);\n    RUN_TEST(test_clampConfigLora_bogusPresetOnUnsetClampedToLongFast);\n    RUN_TEST(test_clampConfigLora_invalidPresetOnLORA24ClampedToDefault);\n\n    // RegionInfo preset list integrity\n    RUN_TEST(test_presetsStd_hasNineEntries);\n    RUN_TEST(test_presetsEU868_hasSevenEntries);\n    RUN_TEST(test_presetsUndef_hasOneEntry);\n    RUN_TEST(test_defaultPresetIsInAvailablePresets);\n    RUN_TEST(test_regionFieldsAreSane);\n    RUN_TEST(test_onlyLORA24HasWideLora);\n\n    // Channel spacing (current + placeholder)\n    RUN_TEST(test_channelSpacingCalculation_US_LONG_FAST);\n    RUN_TEST(test_channelSpacingCalculation_EU868_LONG_FAST);\n    RUN_TEST(test_channelSpacingCalculation_placeholder);\n\n    // handleSetConfig fromOthers dispatch\n    RUN_TEST(test_handleSetConfig_fromOthers_invalidPresetRejected);\n    RUN_TEST(test_handleSetConfig_fromLocal_invalidPresetClamped);\n    RUN_TEST(test_handleSetConfig_fromOthers_validPresetAccepted);\n\n    exit(UNITY_END());\n}\n\nvoid loop() {}\n"
  },
  {
    "path": "test/test_atak/test_main.cpp",
    "content": "#include <string.h>\n#include <unity.h>\n\n#include \"TestUtil.h\"\n#include \"meshUtils.h\"\n\nvoid setUp(void)\n{\n    // set stuff up here\n}\n\nvoid tearDown(void)\n{\n    // clean stuff up here\n}\n\n/**\n * Test normal string without embedded nulls\n * Should behave the same as strlen() for regular strings\n */\nvoid test_normal_string(void)\n{\n    char test_str[32] = \"Hello World\";\n    size_t expected = 11; // strlen(\"Hello World\")\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(expected, result);\n}\n\n/**\n * Test empty string\n * Should return 0 for empty string\n */\nvoid test_empty_string(void)\n{\n    char test_str[32] = \"\";\n    size_t expected = 0;\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(expected, result);\n}\n\n/**\n * Test string with only trailing nulls\n * Common case - string followed by null padding\n */\nvoid test_trailing_nulls(void)\n{\n    char test_str[32] = {0};\n    strcpy(test_str, \"Test\");\n    // test_str is now: \"Test\\0\\0\\0\\0...\" (4 chars + 28 nulls)\n    size_t expected = 4;\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(expected, result);\n}\n\n/**\n * Test string with embedded null byte\n * This is the critical bug case - strlen() would truncate at first null\n */\nvoid test_embedded_null(void)\n{\n    char test_str[32] = {0};\n    // Create string \"ABC\\0XYZ\" (embedded null after C)\n    test_str[0] = 'A';\n    test_str[1] = 'B';\n    test_str[2] = 'C';\n    test_str[3] = '\\0'; // embedded null\n    test_str[4] = 'X';\n    test_str[5] = 'Y';\n    test_str[6] = 'Z';\n    // Rest is already null from initialization\n\n    // strlen would return 3, but pb_string_length should return 7\n    size_t strlen_result = strlen(test_str);\n    size_t pb_result = pb_string_length(test_str, sizeof(test_str));\n\n    TEST_ASSERT_EQUAL_size_t(3, strlen_result); // strlen stops at first null\n    TEST_ASSERT_EQUAL_size_t(7, pb_result);     // pb_string_length finds last non-null\n}\n\n/**\n * Test Android UID with embedded null bytes\n * Real-world case from bug report: ANDROID-e7e455b40002429d\n * The \"00\" in the UID represents 0x00 bytes that were truncating the string\n */\nvoid test_android_uid_pattern(void)\n{\n    char test_str[32] = {0};\n    // Simulate \"ANDROID-e7e455b4\" + 0x00 + 0x00 + \"2429d\"\n    const char part1[] = \"ANDROID-e7e455b4\";\n    strcpy(test_str, part1);\n    size_t pos = strlen(part1);\n    test_str[pos] = '\\0';     // embedded null\n    test_str[pos + 1] = '\\0'; // another embedded null\n    strcpy(test_str + pos + 2, \"2429d\");\n\n    // The full UID should be 24 characters\n    size_t strlen_result = strlen(test_str);\n    size_t pb_result = pb_string_length(test_str, sizeof(test_str));\n\n    TEST_ASSERT_EQUAL_size_t(16, strlen_result); // strlen truncates to \"ANDROID-e7e455b4\"\n    TEST_ASSERT_EQUAL_size_t(23, pb_result);     // pb_string_length gets full length\n}\n\n/**\n * Test string with multiple embedded nulls\n * Edge case with several null bytes scattered through the string\n */\nvoid test_multiple_embedded_nulls(void)\n{\n    char test_str[32] = {0};\n    // Create \"A\\0B\\0C\\0D\" (3 embedded nulls)\n    test_str[0] = 'A';\n    test_str[1] = '\\0';\n    test_str[2] = 'B';\n    test_str[3] = '\\0';\n    test_str[4] = 'C';\n    test_str[5] = '\\0';\n    test_str[6] = 'D';\n\n    size_t strlen_result = strlen(test_str);\n    size_t pb_result = pb_string_length(test_str, sizeof(test_str));\n\n    TEST_ASSERT_EQUAL_size_t(1, strlen_result); // strlen stops at first null\n    TEST_ASSERT_EQUAL_size_t(7, pb_result);     // pb_string_length finds all chars\n}\n\n/**\n * Test buffer completely filled with non-null characters\n * Edge case where string uses entire buffer\n */\nvoid test_full_buffer(void)\n{\n    char test_str[8];\n    // Fill entire buffer with 'X'\n    memset(test_str, 'X', sizeof(test_str));\n\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(8, result);\n}\n\n/**\n * Test buffer with all nulls\n * Should return 0\n */\nvoid test_all_nulls(void)\n{\n    char test_str[32] = {0};\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(0, result);\n}\n\n/**\n * Test single character followed by nulls\n * Minimal non-empty case\n */\nvoid test_single_char(void)\n{\n    char test_str[32] = {0};\n    test_str[0] = 'X';\n\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(1, result);\n}\n\n/**\n * Test callsign field typical size\n * Test with typical ATAK callsign field size (64 bytes)\n */\nvoid test_callsign_field_size(void)\n{\n    char test_str[64] = {0};\n    strcpy(test_str, \"CALLSIGN-123\");\n\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(12, result);\n}\n\n/**\n * Test with data at end of buffer\n * String with embedded null and data at very end\n */\nvoid test_data_at_buffer_end(void)\n{\n    char test_str[10] = {0};\n    test_str[0] = 'A';\n    test_str[1] = '\\0';\n    test_str[8] = 'Z'; // Data near end\n    test_str[9] = 'X'; // Data at end\n\n    size_t result = pb_string_length(test_str, sizeof(test_str));\n    TEST_ASSERT_EQUAL_size_t(10, result); // Should find the 'X' at position 9\n}\n\nvoid setup()\n{\n    // NOTE!!! Wait for >2 secs\n    // if board doesn't support software reset via Serial.DTR/RTS\n    testDelay(10);\n    testDelay(2000);\n\n    UNITY_BEGIN();\n    RUN_TEST(test_normal_string);\n    RUN_TEST(test_empty_string);\n    RUN_TEST(test_trailing_nulls);\n    RUN_TEST(test_embedded_null);\n    RUN_TEST(test_android_uid_pattern);\n    RUN_TEST(test_multiple_embedded_nulls);\n    RUN_TEST(test_full_buffer);\n    RUN_TEST(test_all_nulls);\n    RUN_TEST(test_single_char);\n    RUN_TEST(test_callsign_field_size);\n    RUN_TEST(test_data_at_buffer_end);\n    exit(UNITY_END());\n}\n\nvoid loop() {}\n"
  },
  {
    "path": "test/test_crypto/test_main.cpp",
    "content": "// trunk-ignore-all(gitleaks): These are dummy values. Not real secrets.\n#include \"CryptoEngine.h\"\n\n#include \"TestUtil.h\"\n#include <unity.h>\n\nvoid HexToBytes(uint8_t *result, const std::string hex, size_t len = 0)\n{\n    if (len) {\n        memset(result, 0, len);\n    }\n    for (unsigned int i = 0; i < hex.length(); i += 2) {\n        std::string byteString = hex.substr(i, 2);\n        result[i / 2] = (uint8_t)strtol(byteString.c_str(), NULL, 16);\n    }\n    return;\n}\n\nvoid setUp(void)\n{\n    // set stuff up here\n}\n\nvoid tearDown(void)\n{\n    // clean stuff up here\n}\n\nvoid test_SHA256(void)\n{\n    uint8_t expected[32];\n    uint8_t hash[32] = {0};\n\n    HexToBytes(expected, \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\");\n    crypto->hash(hash, 0);\n    TEST_ASSERT_EQUAL_MEMORY(hash, expected, 32);\n\n    HexToBytes(hash, \"d3\", 32);\n    HexToBytes(expected, \"28969cdfa74a12c82f3bad960b0b000aca2ac329deea5c2328ebc6f2ba9802c1\");\n    crypto->hash(hash, 1);\n    TEST_ASSERT_EQUAL_MEMORY(hash, expected, 32);\n\n    HexToBytes(hash, \"11af\", 32);\n    HexToBytes(expected, \"5ca7133fa735326081558ac312c620eeca9970d1e70a4b95533d956f072d1f98\");\n    crypto->hash(hash, 2);\n    TEST_ASSERT_EQUAL_MEMORY(hash, expected, 32);\n}\nvoid test_ECB_AES256(void)\n{\n    // https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/AES_ECB.pdf\n\n    uint8_t key[32] = {0};\n    uint8_t plain[16] = {0};\n    uint8_t result[16] = {0};\n    uint8_t expected[16] = {0};\n\n    HexToBytes(key, \"603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4\");\n\n    HexToBytes(plain, \"6BC1BEE22E409F96E93D7E117393172A\");\n    HexToBytes(expected, \"F3EED1BDB5D2A03C064B5A7E3DB181F8\");\n    crypto->aesSetKey(key, 32);\n    crypto->aesEncrypt(plain, result); // Does 16 bytes at a time\n    TEST_ASSERT_EQUAL_MEMORY(expected, result, 16);\n\n    HexToBytes(plain, \"AE2D8A571E03AC9C9EB76FAC45AF8E51\");\n    HexToBytes(expected, \"591CCB10D410ED26DC5BA74A31362870\");\n    crypto->aesSetKey(key, 32);\n    crypto->aesEncrypt(plain, result); // Does 16 bytes at a time\n    TEST_ASSERT_EQUAL_MEMORY(expected, result, 16);\n\n    HexToBytes(plain, \"30C81C46A35CE411E5FBC1191A0A52EF\");\n    HexToBytes(expected, \"B6ED21B99CA6F4F9F153E7B1BEAFED1D\");\n    crypto->aesSetKey(key, 32);\n    crypto->aesEncrypt(plain, result); // Does 16 bytes at a time\n    TEST_ASSERT_EQUAL_MEMORY(expected, result, 16);\n}\nvoid test_DH25519(void)\n{\n    // test vectors from wycheproof x25519\n    // https://github.com/C2SP/wycheproof/blob/master/testvectors/x25519_test.json\n    uint8_t private_key[32];\n    uint8_t public_key[32];\n    uint8_t expected_shared[32];\n\n    HexToBytes(public_key, \"504a36999f489cd2fdbc08baff3d88fa00569ba986cba22548ffde80f9806829\");\n    HexToBytes(private_key, \"c8a9d5a91091ad851c668b0736c1c9a02936c0d3ad62670858088047ba057475\");\n    HexToBytes(expected_shared, \"436a2c040cf45fea9b29a0cb81b1f41458f863d0d61b453d0a982720d6d61320\");\n    crypto->setDHPrivateKey(private_key);\n    TEST_ASSERT(crypto->setDHPublicKey(public_key));\n    TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 32);\n\n    HexToBytes(public_key, \"63aa40c6e38346c5caf23a6df0a5e6c80889a08647e551b3563449befcfc9733\");\n    HexToBytes(private_key, \"d85d8c061a50804ac488ad774ac716c3f5ba714b2712e048491379a500211958\");\n    HexToBytes(expected_shared, \"279df67a7c4611db4708a0e8282b195e5ac0ed6f4b2f292c6fbd0acac30d1332\");\n    crypto->setDHPrivateKey(private_key);\n    TEST_ASSERT(crypto->setDHPublicKey(public_key));\n    TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 32);\n\n    HexToBytes(public_key, \"ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f\");\n    HexToBytes(private_key, \"18630f93598637c35da623a74559cf944374a559114c7937811041fc8605564a\");\n    crypto->setDHPrivateKey(private_key);\n    TEST_ASSERT(!crypto->setDHPublicKey(public_key)); // Weak public key results in 0 shared key\n\n    HexToBytes(public_key, \"f7e13a1a067d2f4e1061bf9936fde5be6b0c2494a8f809cbac7f290ef719e91c\");\n    HexToBytes(private_key, \"10300724f3bea134eb1575245ef26ff9b8ccd59849cd98ce1a59002fe1d5986c\");\n    HexToBytes(expected_shared, \"24becd5dfed9e9289ba2e15b82b0d54f8e9aacb72f5e4248c58d8d74b451ce76\");\n    crypto->setDHPrivateKey(private_key);\n    TEST_ASSERT(crypto->setDHPublicKey(public_key));\n    crypto->hash(crypto->shared_key, 32);\n    TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 32);\n}\n\nvoid test_PKC(void)\n{\n    uint8_t private_key[32];\n    meshtastic_UserLite_public_key_t public_key;\n    uint8_t expected_shared[32];\n    uint8_t expected_decrypted[32];\n    uint8_t radioBytes[128] __attribute__((__aligned__));\n    uint8_t decrypted[128] __attribute__((__aligned__));\n    uint8_t expected_nonce[16];\n\n    uint32_t fromNode = 0x0929;\n    uint64_t packetNum = 0x13b2d662;\n    HexToBytes(public_key.bytes, \"db18fc50eea47f00251cb784819a3cf5fc361882597f589f0d7ff820e8064457\");\n    public_key.size = 32;\n    HexToBytes(private_key, \"a00330633e63522f8a4d81ec6d9d1e6617f6c8ffd3a4c698229537d44e522277\");\n    HexToBytes(expected_shared, \"777b1545c9d6f9a2\");\n    HexToBytes(expected_decrypted, \"08011204746573744800\");\n    HexToBytes(radioBytes, \"8c646d7a2909000062d6b2136b00000040df24abfcc30a17a3d9046726099e796a1c036a792b\");\n    HexToBytes(expected_nonce, \"62d6b213036a792b2909000000\");\n    crypto->setDHPrivateKey(private_key);\n\n    TEST_ASSERT(crypto->decryptCurve25519(fromNode, public_key, packetNum, 22, radioBytes + 16, decrypted));\n    TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 8);\n    TEST_ASSERT_EQUAL_MEMORY(expected_nonce, crypto->nonce, 13);\n    TEST_ASSERT_EQUAL_MEMORY(expected_decrypted, decrypted, 10);\n\n    uint32_t toNode = 0; // Only impacts logging\n    uint8_t encrypted[128] __attribute__((__aligned__));\n    TEST_ASSERT(crypto->encryptCurve25519(toNode, fromNode, public_key, packetNum, 10, decrypted, encrypted));\n    TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 8);\n    // The extraNonce is random, so skip checking the nonce and encrypted output here\n\n    // Copy the nonce to check it after encryption\n    memcpy(expected_nonce, crypto->nonce, 16);\n\n    // Decrypt the re-encrypted bytes and check they are the same as what we expect\n    TEST_ASSERT(crypto->decryptCurve25519(fromNode, public_key, packetNum, 22, encrypted, decrypted));\n    TEST_ASSERT_EQUAL_MEMORY(expected_shared, crypto->shared_key, 8);\n    TEST_ASSERT_EQUAL_MEMORY(expected_nonce, crypto->nonce, 13);\n    TEST_ASSERT_EQUAL_MEMORY(expected_decrypted, decrypted, 10);\n}\n\nvoid test_AES_CTR(void)\n{\n    uint8_t expected[32];\n    uint8_t plain[32];\n    uint8_t nonce[32];\n    CryptoKey k;\n\n    // vectors from https://www.rfc-editor.org/rfc/rfc3686#section-6\n    k.length = 32;\n    HexToBytes(k.bytes, \"776BEFF2851DB06F4C8A0542C8696F6C6A81AF1EEC96B4D37FC1D689E6C1C104\");\n    HexToBytes(nonce, \"00000060DB5672C97AA8F0B200000001\");\n    HexToBytes(expected, \"145AD01DBF824EC7560863DC71E3E0C0\");\n    memcpy(plain, \"Single block msg\", 16);\n\n    crypto->encryptAESCtr(k, nonce, 16, plain);\n    TEST_ASSERT_EQUAL_MEMORY(expected, plain, 16);\n\n    k.length = 16;\n    memcpy(plain, \"Single block msg\", 16);\n    HexToBytes(k.bytes, \"AE6852F8121067CC4BF7A5765577F39E\");\n    HexToBytes(nonce, \"00000030000000000000000000000001\");\n    HexToBytes(expected, \"E4095D4FB7A7B3792D6175A3261311B8\");\n    crypto->encryptAESCtr(k, nonce, 16, plain);\n    TEST_ASSERT_EQUAL_MEMORY(expected, plain, 16);\n}\n\nvoid setup()\n{\n    // NOTE!!! Wait for >2 secs\n    // if board doesn't support software reset via Serial.DTR/RTS\n    delay(10);\n    delay(2000);\n\n    initializeTestEnvironment();\n    UNITY_BEGIN(); // IMPORTANT LINE!\n    RUN_TEST(test_SHA256);\n    RUN_TEST(test_ECB_AES256);\n    RUN_TEST(test_DH25519);\n    RUN_TEST(test_AES_CTR);\n    RUN_TEST(test_PKC);\n    exit(UNITY_END()); // stop unit testing\n}\n\nvoid loop() {}"
  },
  {
    "path": "test/test_default/test_main.cpp",
    "content": "// Unit tests for Default::getConfiguredOrDefaultMsScaled\n#include \"Default.h\"\n#include \"MeshRadio.h\"\n#include \"TestUtil.h\"\n#include \"meshUtils.h\"\n#include <unity.h>\n\n// Helper to compute expected ms using same logic as Default::congestionScalingCoefficient\nstatic uint32_t computeExpectedMs(uint32_t defaultSeconds, uint32_t numOnlineNodes)\n{\n    uint32_t baseMs = Default::getConfiguredOrDefaultMs(0, defaultSeconds);\n\n    // Routers (including ROUTER_LATE) don't scale\n    if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||\n        config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE) {\n        return baseMs;\n    }\n\n    // Sensors and trackers don't scale\n    if ((config.device.role == meshtastic_Config_DeviceConfig_Role_SENSOR) ||\n        (config.device.role == meshtastic_Config_DeviceConfig_Role_TRACKER)) {\n        return baseMs;\n    }\n\n    if (numOnlineNodes <= 40) {\n        return baseMs;\n    }\n\n    float bwKHz =\n        config.lora.use_preset ? modemPresetToBwKHz(config.lora.modem_preset, false) : bwCodeToKHz(config.lora.bandwidth);\n\n    uint8_t sf = config.lora.spread_factor;\n    if (sf < 7)\n        sf = 7;\n    else if (sf > 12)\n        sf = 12;\n\n    float throttlingFactor = static_cast<float>(pow_of_2(sf)) / (bwKHz * 100.0f);\n#if USERPREFS_EVENT_MODE\n    throttlingFactor = static_cast<float>(pow_of_2(sf)) / (bwKHz * 25.0f);\n#endif\n\n    int nodesOverForty = (numOnlineNodes - 40);\n    float coeff = 1.0f + (nodesOverForty * throttlingFactor);\n    return static_cast<uint32_t>(baseMs * coeff + 0.5f);\n}\n\nvoid test_router_no_scaling()\n{\n    config.device.role = meshtastic_Config_DeviceConfig_Role_ROUTER;\n    // set some sane lora config so bootstrap paths are deterministic\n    config.lora.use_preset = false;\n    config.lora.spread_factor = 9;\n    config.lora.bandwidth = 250;\n\n    uint32_t res = Default::getConfiguredOrDefaultMsScaled(0, 60, 100);\n    uint32_t expected = computeExpectedMs(60, 100);\n    TEST_ASSERT_EQUAL_UINT32(expected, res);\n}\n\nvoid test_client_below_threshold()\n{\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    config.lora.use_preset = false;\n    config.lora.spread_factor = 9;\n    config.lora.bandwidth = 250;\n\n    uint32_t res = Default::getConfiguredOrDefaultMsScaled(0, 60, 40);\n    uint32_t expected = computeExpectedMs(60, 40);\n    TEST_ASSERT_EQUAL_UINT32(expected, res);\n}\n\nvoid test_client_default_preset_scaling()\n{\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    config.lora.use_preset = false;\n    config.lora.spread_factor = 9; // SF9\n    config.lora.bandwidth = 250;   // 250 kHz\n\n    uint32_t res = Default::getConfiguredOrDefaultMsScaled(0, 60, 50);\n    uint32_t expected = computeExpectedMs(60, 50); // nodesOverForty = 10\n    TEST_ASSERT_EQUAL_UINT32(expected, res);\n}\n\nvoid test_client_medium_fast_preset_scaling()\n{\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    config.lora.use_preset = true;\n    config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;\n    // nodesOverForty = 30 -> test with nodes=70\n    uint32_t res = Default::getConfiguredOrDefaultMsScaled(0, 60, 70);\n    uint32_t expected = computeExpectedMs(60, 70);\n    // Allow ±1 ms tolerance for floating-point rounding\n    TEST_ASSERT_INT_WITHIN(1, expected, res);\n}\n\nvoid test_router_uses_router_minimums()\n{\n    config.device.role = meshtastic_Config_DeviceConfig_Role_ROUTER;\n\n    uint32_t telemetry = Default::getConfiguredOrMinimumValue(60, min_default_telemetry_interval_secs);\n    uint32_t position = Default::getConfiguredOrMinimumValue(60, min_default_broadcast_interval_secs);\n\n    TEST_ASSERT_EQUAL_UINT32(ONE_DAY / 2, telemetry);\n    TEST_ASSERT_EQUAL_UINT32(ONE_DAY / 2, position);\n}\n\nvoid test_router_late_uses_router_minimums()\n{\n    config.device.role = meshtastic_Config_DeviceConfig_Role_ROUTER_LATE;\n\n    uint32_t telemetry = Default::getConfiguredOrMinimumValue(60, min_default_telemetry_interval_secs);\n    uint32_t position = Default::getConfiguredOrMinimumValue(60, min_default_broadcast_interval_secs);\n\n    TEST_ASSERT_EQUAL_UINT32(ONE_DAY / 2, telemetry);\n    TEST_ASSERT_EQUAL_UINT32(ONE_DAY / 2, position);\n}\n\nvoid test_client_uses_public_channel_minimums()\n{\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n\n    uint32_t telemetry = Default::getConfiguredOrMinimumValue(60, min_default_telemetry_interval_secs);\n    uint32_t position = Default::getConfiguredOrMinimumValue(60, min_default_broadcast_interval_secs);\n\n    TEST_ASSERT_EQUAL_UINT32(30 * 60, telemetry);\n    TEST_ASSERT_EQUAL_UINT32(60 * 60, position);\n}\n\nvoid setup()\n{\n    // Small delay to match other test mains\n    delay(10);\n    initializeTestEnvironment();\n    UNITY_BEGIN();\n    RUN_TEST(test_router_no_scaling);\n    RUN_TEST(test_client_below_threshold);\n    RUN_TEST(test_client_default_preset_scaling);\n    RUN_TEST(test_client_medium_fast_preset_scaling);\n    RUN_TEST(test_router_uses_router_minimums);\n    RUN_TEST(test_router_late_uses_router_minimums);\n    RUN_TEST(test_client_uses_public_channel_minimums);\n    exit(UNITY_END());\n}\n\nvoid loop() {}\n"
  },
  {
    "path": "test/test_http_content_handler/test_main.cpp",
    "content": "#include \"TestUtil.h\"\n#include <unity.h>\n\nstatic void test_placeholder()\n{\n    TEST_ASSERT_TRUE(true);\n}\n\nextern \"C\" {\nvoid setup()\n{\n    initializeTestEnvironment();\n    UNITY_BEGIN();\n    RUN_TEST(test_placeholder);\n    exit(UNITY_END());\n}\n\nvoid loop() {}\n}\n"
  },
  {
    "path": "test/test_mesh_module/test_main.cpp",
    "content": "#include \"MeshModule.h\"\n#include \"MeshTypes.h\"\n#include \"TestUtil.h\"\n#include <unity.h>\n\n// Minimal concrete subclass for testing the base class helper\nclass TestModule : public MeshModule\n{\n  public:\n    TestModule() : MeshModule(\"TestModule\") {}\n    virtual bool wantPacket(const meshtastic_MeshPacket *p) override { return true; }\n    using MeshModule::currentRequest;\n    using MeshModule::isMultiHopBroadcastRequest;\n};\n\nstatic TestModule *testModule;\nstatic meshtastic_MeshPacket testPacket;\n\nvoid setUp(void)\n{\n    testModule = new TestModule();\n    memset(&testPacket, 0, sizeof(testPacket));\n    TestModule::currentRequest = &testPacket;\n}\n\nvoid tearDown(void)\n{\n    TestModule::currentRequest = NULL;\n    delete testModule;\n}\n\n// Zero-hop broadcast (hop_limit == hop_start): should be allowed\nstatic void test_zeroHopBroadcast_isAllowed()\n{\n    testPacket.to = NODENUM_BROADCAST;\n    testPacket.hop_start = 3;\n    testPacket.hop_limit = 3; // Not yet relayed\n\n    TEST_ASSERT_FALSE(testModule->isMultiHopBroadcastRequest());\n}\n\n// Multi-hop broadcast (hop_limit < hop_start): should be blocked\nstatic void test_multiHopBroadcast_isBlocked()\n{\n    testPacket.to = NODENUM_BROADCAST;\n    testPacket.hop_start = 7;\n    testPacket.hop_limit = 4; // Already relayed 3 hops\n\n    TEST_ASSERT_TRUE(testModule->isMultiHopBroadcastRequest());\n}\n\n// Direct message (not broadcast): should always be allowed regardless of hops\nstatic void test_directMessage_isAllowed()\n{\n    testPacket.to = 0x12345678; // Specific node\n    testPacket.hop_start = 7;\n    testPacket.hop_limit = 4;\n\n    TEST_ASSERT_FALSE(testModule->isMultiHopBroadcastRequest());\n}\n\n// Broadcast with hop_limit == 0 (fully relayed): should be blocked\nstatic void test_fullyRelayedBroadcast_isBlocked()\n{\n    testPacket.to = NODENUM_BROADCAST;\n    testPacket.hop_start = 3;\n    testPacket.hop_limit = 0;\n\n    TEST_ASSERT_TRUE(testModule->isMultiHopBroadcastRequest());\n}\n\n// No current request: should not crash, should return false\nstatic void test_noCurrentRequest_isAllowed()\n{\n    TestModule::currentRequest = NULL;\n\n    TEST_ASSERT_FALSE(testModule->isMultiHopBroadcastRequest());\n}\n\n// Broadcast with hop_start == 0 (legacy or local): should be allowed\nstatic void test_legacyPacket_zeroHopStart_isAllowed()\n{\n    testPacket.to = NODENUM_BROADCAST;\n    testPacket.hop_start = 0;\n    testPacket.hop_limit = 0;\n\n    // hop_limit == hop_start, so not multi-hop\n    TEST_ASSERT_FALSE(testModule->isMultiHopBroadcastRequest());\n}\n\n// Single hop relayed broadcast (hop_limit = hop_start - 1): should be blocked\nstatic void test_singleHopRelayedBroadcast_isBlocked()\n{\n    testPacket.to = NODENUM_BROADCAST;\n    testPacket.hop_start = 3;\n    testPacket.hop_limit = 2;\n\n    TEST_ASSERT_TRUE(testModule->isMultiHopBroadcastRequest());\n}\n\nvoid setup()\n{\n    initializeTestEnvironment();\n\n    UNITY_BEGIN();\n    RUN_TEST(test_zeroHopBroadcast_isAllowed);\n    RUN_TEST(test_multiHopBroadcast_isBlocked);\n    RUN_TEST(test_directMessage_isAllowed);\n    RUN_TEST(test_fullyRelayedBroadcast_isBlocked);\n    RUN_TEST(test_noCurrentRequest_isAllowed);\n    RUN_TEST(test_legacyPacket_zeroHopStart_isAllowed);\n    RUN_TEST(test_singleHopRelayedBroadcast_isBlocked);\n    exit(UNITY_END());\n}\n\nvoid loop() {}\n"
  },
  {
    "path": "test/test_meshpacket_serializer/ports/test_encrypted.cpp",
    "content": "#include \"../test_helpers.h\"\n\n// Helper function for all encrypted packet assertions\nvoid assert_encrypted_packet(const std::string &json, meshtastic_MeshPacket packet)\n{\n    // Parse and validate JSON\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Assert basic packet fields\n    TEST_ASSERT_TRUE(jsonObj.find(\"from\") != jsonObj.end());\n    TEST_ASSERT_EQUAL(packet.from, (uint32_t)jsonObj.at(\"from\")->AsNumber());\n\n    TEST_ASSERT_TRUE(jsonObj.find(\"to\") != jsonObj.end());\n    TEST_ASSERT_EQUAL(packet.to, (uint32_t)jsonObj.at(\"to\")->AsNumber());\n\n    TEST_ASSERT_TRUE(jsonObj.find(\"id\") != jsonObj.end());\n    TEST_ASSERT_EQUAL(packet.id, (uint32_t)jsonObj.at(\"id\")->AsNumber());\n\n    // Assert encrypted data fields\n    TEST_ASSERT_TRUE(jsonObj.find(\"bytes\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj.at(\"bytes\")->IsString());\n\n    TEST_ASSERT_TRUE(jsonObj.find(\"size\") != jsonObj.end());\n    TEST_ASSERT_EQUAL(packet.encrypted.size, (int)jsonObj.at(\"size\")->AsNumber());\n\n    // Assert hex encoding\n    std::string encrypted_hex = jsonObj[\"bytes\"]->AsString();\n    TEST_ASSERT_EQUAL(packet.encrypted.size * 2, encrypted_hex.length());\n\n    delete root;\n}\n\n// Test encrypted packet serialization\nvoid test_encrypted_packet_serialization()\n{\n    const char *data = \"encrypted_payload_data\";\n    meshtastic_MeshPacket packet =\n        create_test_packet(meshtastic_PortNum_TEXT_MESSAGE_APP, reinterpret_cast<const uint8_t *>(data), strlen(data),\n                           meshtastic_MeshPacket_encrypted_tag);\n    std::string json = MeshPacketSerializer::JsonSerializeEncrypted(&packet);\n\n    assert_encrypted_packet(json, packet);\n}\n\n// Test empty encrypted packet\nvoid test_empty_encrypted_packet()\n{\n    meshtastic_MeshPacket packet =\n        create_test_packet(meshtastic_PortNum_TEXT_MESSAGE_APP, nullptr, 0, meshtastic_MeshPacket_encrypted_tag);\n    std::string json = MeshPacketSerializer::JsonSerializeEncrypted(&packet);\n\n    assert_encrypted_packet(json, packet);\n}\n"
  },
  {
    "path": "test/test_meshpacket_serializer/ports/test_nodeinfo.cpp",
    "content": "#include \"../test_helpers.h\"\n\nstatic size_t encode_user_info(uint8_t *buffer, size_t buffer_size)\n{\n    meshtastic_User user = meshtastic_User_init_zero;\n    strcpy(user.short_name, \"TEST\");\n    strcpy(user.long_name, \"Test User\");\n    strcpy(user.id, \"!12345678\");\n    user.hw_model = meshtastic_HardwareModel_HELTEC_V3;\n\n    pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size);\n    pb_encode(&stream, &meshtastic_User_msg, &user);\n    return stream.bytes_written;\n}\n\n// Test NODEINFO_APP port\nvoid test_nodeinfo_serialization()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_user_info(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_NODEINFO_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check message type\n    TEST_ASSERT_TRUE(jsonObj.find(\"type\") != jsonObj.end());\n    TEST_ASSERT_EQUAL_STRING(\"nodeinfo\", jsonObj[\"type\"]->AsString().c_str());\n\n    // Check payload\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // Verify user data\n    TEST_ASSERT_TRUE(payload.find(\"shortname\") != payload.end());\n    TEST_ASSERT_EQUAL_STRING(\"TEST\", payload[\"shortname\"]->AsString().c_str());\n\n    TEST_ASSERT_TRUE(payload.find(\"longname\") != payload.end());\n    TEST_ASSERT_EQUAL_STRING(\"Test User\", payload[\"longname\"]->AsString().c_str());\n\n    delete root;\n}\n"
  },
  {
    "path": "test/test_meshpacket_serializer/ports/test_position.cpp",
    "content": "#include \"../test_helpers.h\"\n\nstatic size_t encode_position(uint8_t *buffer, size_t buffer_size)\n{\n    meshtastic_Position position = meshtastic_Position_init_zero;\n    position.latitude_i = 374208000;    // 37.4208 degrees * 1e7\n    position.longitude_i = -1221981000; // -122.1981 degrees * 1e7\n    position.altitude = 123;\n    position.time = 1609459200;\n    position.has_altitude = true;\n    position.has_latitude_i = true;\n    position.has_longitude_i = true;\n\n    pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size);\n    pb_encode(&stream, &meshtastic_Position_msg, &position);\n    return stream.bytes_written;\n}\n\n// Test POSITION_APP port\nvoid test_position_serialization()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_position(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_POSITION_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check message type\n    TEST_ASSERT_TRUE(jsonObj.find(\"type\") != jsonObj.end());\n    TEST_ASSERT_EQUAL_STRING(\"position\", jsonObj[\"type\"]->AsString().c_str());\n\n    // Check payload\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // Verify position data\n    TEST_ASSERT_TRUE(payload.find(\"latitude_i\") != payload.end());\n    TEST_ASSERT_EQUAL(374208000, (int)payload[\"latitude_i\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"longitude_i\") != payload.end());\n    TEST_ASSERT_EQUAL(-1221981000, (int)payload[\"longitude_i\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"altitude\") != payload.end());\n    TEST_ASSERT_EQUAL(123, (int)payload[\"altitude\"]->AsNumber());\n\n    delete root;\n}\n"
  },
  {
    "path": "test/test_meshpacket_serializer/ports/test_telemetry.cpp",
    "content": "#include \"../test_helpers.h\"\n\n// Helper function to create and encode device metrics\nstatic size_t encode_telemetry_device_metrics(uint8_t *buffer, size_t buffer_size)\n{\n    meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero;\n    telemetry.time = 1609459200;\n    telemetry.which_variant = meshtastic_Telemetry_device_metrics_tag;\n    telemetry.variant.device_metrics.battery_level = 85;\n    telemetry.variant.device_metrics.has_battery_level = true;\n    telemetry.variant.device_metrics.voltage = 3.72f;\n    telemetry.variant.device_metrics.has_voltage = true;\n    telemetry.variant.device_metrics.channel_utilization = 15.56f;\n    telemetry.variant.device_metrics.has_channel_utilization = true;\n    telemetry.variant.device_metrics.air_util_tx = 8.23f;\n    telemetry.variant.device_metrics.has_air_util_tx = true;\n    telemetry.variant.device_metrics.uptime_seconds = 12345;\n    telemetry.variant.device_metrics.has_uptime_seconds = true;\n\n    pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size);\n    pb_encode(&stream, &meshtastic_Telemetry_msg, &telemetry);\n    return stream.bytes_written;\n}\n\n// Helper function to create and encode empty environment metrics (no fields set)\nstatic size_t encode_telemetry_environment_metrics_empty(uint8_t *buffer, size_t buffer_size)\n{\n    meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero;\n    telemetry.time = 1609459200;\n    telemetry.which_variant = meshtastic_Telemetry_environment_metrics_tag;\n\n    // NO fields are set - all has_* flags remain false\n    // This tests that empty environment metrics don't produce any JSON fields\n\n    pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size);\n    pb_encode(&stream, &meshtastic_Telemetry_msg, &telemetry);\n    return stream.bytes_written;\n}\n\n// Helper function to create environment metrics with ALL possible fields set\n// This function should be updated whenever new fields are added to the protobuf\nstatic size_t encode_telemetry_environment_metrics_all_fields(uint8_t *buffer, size_t buffer_size)\n{\n    meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero;\n    telemetry.time = 1609459200;\n    telemetry.which_variant = meshtastic_Telemetry_environment_metrics_tag;\n\n    // Basic environment metrics\n    telemetry.variant.environment_metrics.temperature = 23.56f;\n    telemetry.variant.environment_metrics.has_temperature = true;\n    telemetry.variant.environment_metrics.relative_humidity = 65.43f;\n    telemetry.variant.environment_metrics.has_relative_humidity = true;\n    telemetry.variant.environment_metrics.barometric_pressure = 1013.27f;\n    telemetry.variant.environment_metrics.has_barometric_pressure = true;\n\n    // Gas and air quality\n    telemetry.variant.environment_metrics.gas_resistance = 50.58f;\n    telemetry.variant.environment_metrics.has_gas_resistance = true;\n    telemetry.variant.environment_metrics.iaq = 120;\n    telemetry.variant.environment_metrics.has_iaq = true;\n\n    // Power measurements\n    telemetry.variant.environment_metrics.voltage = 3.34f;\n    telemetry.variant.environment_metrics.has_voltage = true;\n    telemetry.variant.environment_metrics.current = 0.53f;\n    telemetry.variant.environment_metrics.has_current = true;\n\n    // Light measurements (ALL 4 types)\n    telemetry.variant.environment_metrics.lux = 450.12f;\n    telemetry.variant.environment_metrics.has_lux = true;\n    telemetry.variant.environment_metrics.white_lux = 380.95f;\n    telemetry.variant.environment_metrics.has_white_lux = true;\n    telemetry.variant.environment_metrics.ir_lux = 25.37f;\n    telemetry.variant.environment_metrics.has_ir_lux = true;\n    telemetry.variant.environment_metrics.uv_lux = 15.68f;\n    telemetry.variant.environment_metrics.has_uv_lux = true;\n\n    // Distance measurement\n    telemetry.variant.environment_metrics.distance = 150.29f;\n    telemetry.variant.environment_metrics.has_distance = true;\n\n    // Wind measurements (ALL 4 types)\n    telemetry.variant.environment_metrics.wind_direction = 180;\n    telemetry.variant.environment_metrics.has_wind_direction = true;\n    telemetry.variant.environment_metrics.wind_speed = 5.52f;\n    telemetry.variant.environment_metrics.has_wind_speed = true;\n    telemetry.variant.environment_metrics.wind_gust = 8.24f;\n    telemetry.variant.environment_metrics.has_wind_gust = true;\n    telemetry.variant.environment_metrics.wind_lull = 2.13f;\n    telemetry.variant.environment_metrics.has_wind_lull = true;\n\n    // Weight measurement\n    telemetry.variant.environment_metrics.weight = 75.56f;\n    telemetry.variant.environment_metrics.has_weight = true;\n\n    // Radiation measurement\n    telemetry.variant.environment_metrics.radiation = 0.13f;\n    telemetry.variant.environment_metrics.has_radiation = true;\n\n    // Rainfall measurements (BOTH types)\n    telemetry.variant.environment_metrics.rainfall_1h = 2.57f;\n    telemetry.variant.environment_metrics.has_rainfall_1h = true;\n    telemetry.variant.environment_metrics.rainfall_24h = 15.89f;\n    telemetry.variant.environment_metrics.has_rainfall_24h = true;\n\n    // Soil measurements (BOTH types)\n    telemetry.variant.environment_metrics.soil_moisture = 85;\n    telemetry.variant.environment_metrics.has_soil_moisture = true;\n    telemetry.variant.environment_metrics.soil_temperature = 18.54f;\n    telemetry.variant.environment_metrics.has_soil_temperature = true;\n\n    // IMPORTANT: When new environment fields are added to the protobuf,\n    // they MUST be added here too, or the coverage test will fail!\n\n    pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size);\n    pb_encode(&stream, &meshtastic_Telemetry_msg, &telemetry);\n    return stream.bytes_written;\n}\n\n// Helper function to create and encode environment metrics with all current fields\nstatic size_t encode_telemetry_environment_metrics(uint8_t *buffer, size_t buffer_size)\n{\n    meshtastic_Telemetry telemetry = meshtastic_Telemetry_init_zero;\n    telemetry.time = 1609459200;\n    telemetry.which_variant = meshtastic_Telemetry_environment_metrics_tag;\n\n    // Basic environment metrics\n    telemetry.variant.environment_metrics.temperature = 23.56f;\n    telemetry.variant.environment_metrics.has_temperature = true;\n    telemetry.variant.environment_metrics.relative_humidity = 65.43f;\n    telemetry.variant.environment_metrics.has_relative_humidity = true;\n    telemetry.variant.environment_metrics.barometric_pressure = 1013.27f;\n    telemetry.variant.environment_metrics.has_barometric_pressure = true;\n\n    // Gas and air quality\n    telemetry.variant.environment_metrics.gas_resistance = 50.58f;\n    telemetry.variant.environment_metrics.has_gas_resistance = true;\n    telemetry.variant.environment_metrics.iaq = 120;\n    telemetry.variant.environment_metrics.has_iaq = true;\n\n    // Power measurements\n    telemetry.variant.environment_metrics.voltage = 3.34f;\n    telemetry.variant.environment_metrics.has_voltage = true;\n    telemetry.variant.environment_metrics.current = 0.53f;\n    telemetry.variant.environment_metrics.has_current = true;\n\n    // Light measurements\n    telemetry.variant.environment_metrics.lux = 450.12f;\n    telemetry.variant.environment_metrics.has_lux = true;\n    telemetry.variant.environment_metrics.white_lux = 380.95f;\n    telemetry.variant.environment_metrics.has_white_lux = true;\n    telemetry.variant.environment_metrics.ir_lux = 25.37f;\n    telemetry.variant.environment_metrics.has_ir_lux = true;\n    telemetry.variant.environment_metrics.uv_lux = 15.68f;\n    telemetry.variant.environment_metrics.has_uv_lux = true;\n\n    // Distance measurement\n    telemetry.variant.environment_metrics.distance = 150.29f;\n    telemetry.variant.environment_metrics.has_distance = true;\n\n    // Wind measurements\n    telemetry.variant.environment_metrics.wind_direction = 180;\n    telemetry.variant.environment_metrics.has_wind_direction = true;\n    telemetry.variant.environment_metrics.wind_speed = 5.52f;\n    telemetry.variant.environment_metrics.has_wind_speed = true;\n    telemetry.variant.environment_metrics.wind_gust = 8.24f;\n    telemetry.variant.environment_metrics.has_wind_gust = true;\n    telemetry.variant.environment_metrics.wind_lull = 2.13f;\n    telemetry.variant.environment_metrics.has_wind_lull = true;\n\n    // Weight measurement\n    telemetry.variant.environment_metrics.weight = 75.56f;\n    telemetry.variant.environment_metrics.has_weight = true;\n\n    // Radiation measurement\n    telemetry.variant.environment_metrics.radiation = 0.13f;\n    telemetry.variant.environment_metrics.has_radiation = true;\n\n    // Rainfall measurements\n    telemetry.variant.environment_metrics.rainfall_1h = 2.57f;\n    telemetry.variant.environment_metrics.has_rainfall_1h = true;\n    telemetry.variant.environment_metrics.rainfall_24h = 15.89f;\n    telemetry.variant.environment_metrics.has_rainfall_24h = true;\n\n    // Soil measurements\n    telemetry.variant.environment_metrics.soil_moisture = 85;\n    telemetry.variant.environment_metrics.has_soil_moisture = true;\n    telemetry.variant.environment_metrics.soil_temperature = 18.54f;\n    telemetry.variant.environment_metrics.has_soil_temperature = true;\n\n    pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size);\n    pb_encode(&stream, &meshtastic_Telemetry_msg, &telemetry);\n    return stream.bytes_written;\n}\n\n// Test TELEMETRY_APP port with device metrics\nvoid test_telemetry_device_metrics_serialization()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_telemetry_device_metrics(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TELEMETRY_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check message type\n    TEST_ASSERT_TRUE(jsonObj.find(\"type\") != jsonObj.end());\n    TEST_ASSERT_EQUAL_STRING(\"telemetry\", jsonObj[\"type\"]->AsString().c_str());\n\n    // Check payload\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // Verify telemetry data\n    TEST_ASSERT_TRUE(payload.find(\"battery_level\") != payload.end());\n    TEST_ASSERT_EQUAL(85, (int)payload[\"battery_level\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"voltage\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 3.72f, payload[\"voltage\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"channel_utilization\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 15.56f, payload[\"channel_utilization\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"uptime_seconds\") != payload.end());\n    TEST_ASSERT_EQUAL(12345, (int)payload[\"uptime_seconds\"]->AsNumber());\n\n    // Note: JSON serialization may not preserve exact 2-decimal formatting due to float precision\n    // We verify the numeric values are correct within tolerance\n\n    delete root;\n}\n\n// Test that telemetry environment metrics are properly serialized\nvoid test_telemetry_environment_metrics_serialization()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_telemetry_environment_metrics(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TELEMETRY_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check payload exists\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // Test key fields that should be present in the serializer\n    TEST_ASSERT_TRUE(payload.find(\"temperature\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 23.56f, payload[\"temperature\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"relative_humidity\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 65.43f, payload[\"relative_humidity\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"distance\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 150.29f, payload[\"distance\"]->AsNumber());\n\n    // Note: JSON serialization may have float precision limitations\n    // We focus on verifying numeric accuracy rather than exact string formatting\n\n    delete root;\n}\n\n// Test comprehensive environment metrics coverage\nvoid test_telemetry_environment_metrics_comprehensive()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_telemetry_environment_metrics(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TELEMETRY_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check payload exists\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // Check all 15 originally supported fields\n    TEST_ASSERT_TRUE(payload.find(\"temperature\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"relative_humidity\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"barometric_pressure\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"gas_resistance\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"voltage\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"current\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"iaq\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"distance\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"lux\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"white_lux\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_direction\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_speed\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_gust\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_lull\") != payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"radiation\") != payload.end());\n\n    delete root;\n}\n\n// Test for the 7 environment fields that were added to complete coverage\nvoid test_telemetry_environment_metrics_missing_fields()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_telemetry_environment_metrics(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TELEMETRY_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check payload exists\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // Check the 7 fields that were previously missing\n    TEST_ASSERT_TRUE(payload.find(\"ir_lux\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 25.37f, payload[\"ir_lux\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"uv_lux\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 15.68f, payload[\"uv_lux\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"weight\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 75.56f, payload[\"weight\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"rainfall_1h\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 2.57f, payload[\"rainfall_1h\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"rainfall_24h\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 15.89f, payload[\"rainfall_24h\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"soil_moisture\") != payload.end());\n    TEST_ASSERT_EQUAL(85, (int)payload[\"soil_moisture\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"soil_temperature\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 18.54f, payload[\"soil_temperature\"]->AsNumber());\n\n    // Note: JSON float serialization may not preserve exact decimal formatting\n    // We verify the values are numerically correct within tolerance\n\n    delete root;\n}\n\n// Test that ALL environment fields are serialized (canary test for forgotten fields)\n// This test will FAIL if a new environment field is added to the protobuf but not to the serializer\nvoid test_telemetry_environment_metrics_complete_coverage()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_telemetry_environment_metrics_all_fields(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TELEMETRY_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check payload exists\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // ✅ ALL 22 environment fields MUST be present and correct\n    // If this test fails, it means either:\n    // 1. A new field was added to the protobuf but not to the serializer\n    // 2. The encode_telemetry_environment_metrics_all_fields() function wasn't updated\n\n    // Basic environment (3 fields)\n    TEST_ASSERT_TRUE(payload.find(\"temperature\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 23.56f, payload[\"temperature\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"relative_humidity\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 65.43f, payload[\"relative_humidity\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"barometric_pressure\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 1013.27f, payload[\"barometric_pressure\"]->AsNumber());\n\n    // Gas and air quality (2 fields)\n    TEST_ASSERT_TRUE(payload.find(\"gas_resistance\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 50.58f, payload[\"gas_resistance\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"iaq\") != payload.end());\n    TEST_ASSERT_EQUAL(120, (int)payload[\"iaq\"]->AsNumber());\n\n    // Power measurements (2 fields)\n    TEST_ASSERT_TRUE(payload.find(\"voltage\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 3.34f, payload[\"voltage\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"current\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 0.53f, payload[\"current\"]->AsNumber());\n\n    // Light measurements (4 fields)\n    TEST_ASSERT_TRUE(payload.find(\"lux\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 450.12f, payload[\"lux\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"white_lux\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 380.95f, payload[\"white_lux\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"ir_lux\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 25.37f, payload[\"ir_lux\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"uv_lux\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 15.68f, payload[\"uv_lux\"]->AsNumber());\n\n    // Distance measurement (1 field)\n    TEST_ASSERT_TRUE(payload.find(\"distance\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 150.29f, payload[\"distance\"]->AsNumber());\n\n    // Wind measurements (4 fields)\n    TEST_ASSERT_TRUE(payload.find(\"wind_direction\") != payload.end());\n    TEST_ASSERT_EQUAL(180, (int)payload[\"wind_direction\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"wind_speed\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 5.52f, payload[\"wind_speed\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"wind_gust\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 8.24f, payload[\"wind_gust\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"wind_lull\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 2.13f, payload[\"wind_lull\"]->AsNumber());\n\n    // Weight measurement (1 field)\n    TEST_ASSERT_TRUE(payload.find(\"weight\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 75.56f, payload[\"weight\"]->AsNumber());\n\n    // Radiation measurement (1 field)\n    TEST_ASSERT_TRUE(payload.find(\"radiation\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 0.13f, payload[\"radiation\"]->AsNumber());\n\n    // Rainfall measurements (2 fields)\n    TEST_ASSERT_TRUE(payload.find(\"rainfall_1h\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 2.57f, payload[\"rainfall_1h\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"rainfall_24h\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 15.89f, payload[\"rainfall_24h\"]->AsNumber());\n\n    // Soil measurements (2 fields)\n    TEST_ASSERT_TRUE(payload.find(\"soil_moisture\") != payload.end());\n    TEST_ASSERT_EQUAL(85, (int)payload[\"soil_moisture\"]->AsNumber());\n    TEST_ASSERT_TRUE(payload.find(\"soil_temperature\") != payload.end());\n    TEST_ASSERT_FLOAT_WITHIN(0.01f, 18.54f, payload[\"soil_temperature\"]->AsNumber());\n\n    // Total: 22 environment fields\n    // This test ensures 100% coverage of environment metrics\n\n    // Note: JSON float serialization precision may vary due to the underlying library\n    // The important aspect is that all values are numerically accurate within tolerance\n\n    delete root;\n}\n\n// Test that unset environment fields are not present in JSON\nvoid test_telemetry_environment_metrics_unset_fields()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_telemetry_environment_metrics_empty(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TELEMETRY_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check payload exists\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // With completely empty environment metrics, NO fields should be present\n    // Only basic telemetry fields like \"time\" might be present\n\n    // All 22 environment fields should be absent (none were set)\n    TEST_ASSERT_TRUE(payload.find(\"temperature\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"relative_humidity\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"barometric_pressure\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"gas_resistance\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"iaq\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"voltage\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"current\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"lux\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"white_lux\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"ir_lux\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"uv_lux\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"distance\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_direction\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_speed\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_gust\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"wind_lull\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"weight\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"radiation\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"rainfall_1h\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"rainfall_24h\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"soil_moisture\") == payload.end());\n    TEST_ASSERT_TRUE(payload.find(\"soil_temperature\") == payload.end());\n\n    delete root;\n}\n"
  },
  {
    "path": "test/test_meshpacket_serializer/ports/test_text_message.cpp",
    "content": "#include \"../test_helpers.h\"\n#include <memory>\n\n// Helper function to test common packet fields and structure\nvoid verify_text_message_packet_structure(const std::string &json, const char *expected_text)\n{\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    // Use smart pointer for automatic memory management\n    std::unique_ptr<JSONValue> root(JSON::Parse(json.c_str()));\n    TEST_ASSERT_NOT_NULL(root.get());\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check basic packet fields - use helper function to reduce duplication\n    auto check_field = [&](const char *field, uint32_t expected_value) {\n        auto it = jsonObj.find(field);\n        TEST_ASSERT_TRUE(it != jsonObj.end());\n        TEST_ASSERT_EQUAL(expected_value, (uint32_t)it->second->AsNumber());\n    };\n\n    check_field(\"from\", 0x11223344);\n    check_field(\"to\", 0x55667788);\n    check_field(\"id\", 0x9999);\n\n    // Check message type\n    auto type_it = jsonObj.find(\"type\");\n    TEST_ASSERT_TRUE(type_it != jsonObj.end());\n    TEST_ASSERT_EQUAL_STRING(\"text\", type_it->second->AsString().c_str());\n\n    // Check payload\n    auto payload_it = jsonObj.find(\"payload\");\n    TEST_ASSERT_TRUE(payload_it != jsonObj.end());\n    TEST_ASSERT_TRUE(payload_it->second->IsObject());\n\n    JSONObject payload = payload_it->second->AsObject();\n    auto text_it = payload.find(\"text\");\n    TEST_ASSERT_TRUE(text_it != payload.end());\n    TEST_ASSERT_EQUAL_STRING(expected_text, text_it->second->AsString().c_str());\n\n    // No need for manual delete with smart pointer\n}\n\n// Test TEXT_MESSAGE_APP port\nvoid test_text_message_serialization()\n{\n    const char *test_text = \"Hello Meshtastic!\";\n    meshtastic_MeshPacket packet =\n        create_test_packet(meshtastic_PortNum_TEXT_MESSAGE_APP, reinterpret_cast<const uint8_t *>(test_text), strlen(test_text));\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    verify_text_message_packet_structure(json, test_text);\n}\n\n// Test with nullptr to check robustness\nvoid test_text_message_serialization_null()\n{\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TEXT_MESSAGE_APP, nullptr, 0);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    verify_text_message_packet_structure(json, \"\");\n}\n\n// Test TEXT_MESSAGE_APP port with very long message (boundary testing)\nvoid test_text_message_serialization_long_text()\n{\n    // Test with actual message size limits\n    constexpr size_t MAX_MESSAGE_SIZE = 200; // Typical LoRa payload limit\n    std::string long_text(MAX_MESSAGE_SIZE, 'A');\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_TEXT_MESSAGE_APP,\n                                                      reinterpret_cast<const uint8_t *>(long_text.c_str()), long_text.length());\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    verify_text_message_packet_structure(json, long_text.c_str());\n}\n\n// Test with message over size limit (should fail)\nvoid test_text_message_serialization_oversized()\n{\n    constexpr size_t OVERSIZED_MESSAGE = 250; // Over the limit\n    std::string oversized_text(OVERSIZED_MESSAGE, 'B');\n\n    meshtastic_MeshPacket packet = create_test_packet(\n        meshtastic_PortNum_TEXT_MESSAGE_APP, reinterpret_cast<const uint8_t *>(oversized_text.c_str()), oversized_text.length());\n\n    // Should fail or return empty/error\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    // Should only verify first 234 characters for oversized messages\n    std::string expected_text = oversized_text.substr(0, 234);\n    verify_text_message_packet_structure(json, expected_text.c_str());\n}\n\n// Add test for malformed UTF-8 sequences\nvoid test_text_message_serialization_invalid_utf8()\n{\n    const uint8_t invalid_utf8[] = {0xFF, 0xFE, 0xFD, 0x00}; // Invalid UTF-8\n    meshtastic_MeshPacket packet =\n        create_test_packet(meshtastic_PortNum_TEXT_MESSAGE_APP, invalid_utf8, sizeof(invalid_utf8) - 1);\n\n    // Should not crash, may produce replacement characters\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n}"
  },
  {
    "path": "test/test_meshpacket_serializer/ports/test_waypoint.cpp",
    "content": "#include \"../test_helpers.h\"\n\nstatic size_t encode_waypoint(uint8_t *buffer, size_t buffer_size)\n{\n    meshtastic_Waypoint waypoint = meshtastic_Waypoint_init_zero;\n    waypoint.id = 12345;\n    waypoint.latitude_i = 374208000;\n    waypoint.longitude_i = -1221981000;\n    waypoint.expire = 1609459200 + 3600; // 1 hour from now\n    strcpy(waypoint.name, \"Test Point\");\n    strcpy(waypoint.description, \"Test waypoint description\");\n\n    pb_ostream_t stream = pb_ostream_from_buffer(buffer, buffer_size);\n    pb_encode(&stream, &meshtastic_Waypoint_msg, &waypoint);\n    return stream.bytes_written;\n}\n\n// Test WAYPOINT_APP port\nvoid test_waypoint_serialization()\n{\n    uint8_t buffer[256];\n    size_t payload_size = encode_waypoint(buffer, sizeof(buffer));\n\n    meshtastic_MeshPacket packet = create_test_packet(meshtastic_PortNum_WAYPOINT_APP, buffer, payload_size);\n\n    std::string json = MeshPacketSerializer::JsonSerialize(&packet, false);\n    TEST_ASSERT_TRUE(json.length() > 0);\n\n    JSONValue *root = JSON::Parse(json.c_str());\n    TEST_ASSERT_NOT_NULL(root);\n    TEST_ASSERT_TRUE(root->IsObject());\n\n    JSONObject jsonObj = root->AsObject();\n\n    // Check message type\n    TEST_ASSERT_TRUE(jsonObj.find(\"type\") != jsonObj.end());\n    TEST_ASSERT_EQUAL_STRING(\"waypoint\", jsonObj[\"type\"]->AsString().c_str());\n\n    // Check payload\n    TEST_ASSERT_TRUE(jsonObj.find(\"payload\") != jsonObj.end());\n    TEST_ASSERT_TRUE(jsonObj[\"payload\"]->IsObject());\n\n    JSONObject payload = jsonObj[\"payload\"]->AsObject();\n\n    // Verify waypoint data\n    TEST_ASSERT_TRUE(payload.find(\"id\") != payload.end());\n    TEST_ASSERT_EQUAL(12345, (int)payload[\"id\"]->AsNumber());\n\n    TEST_ASSERT_TRUE(payload.find(\"name\") != payload.end());\n    TEST_ASSERT_EQUAL_STRING(\"Test Point\", payload[\"name\"]->AsString().c_str());\n\n    delete root;\n}\n"
  },
  {
    "path": "test/test_meshpacket_serializer/test_helpers.h",
    "content": "#pragma once\n\n#include \"serialization/JSON.h\"\n#include \"serialization/MeshPacketSerializer.h\"\n#include <Arduino.h>\n#include <meshtastic/mesh.pb.h>\n#include <meshtastic/mqtt.pb.h>\n#include <meshtastic/telemetry.pb.h>\n#include <pb_decode.h>\n#include <pb_encode.h>\n#include <unity.h>\n\n// Helper function to create a test packet with the given port and payload\nstatic meshtastic_MeshPacket create_test_packet(meshtastic_PortNum port, const uint8_t *payload, size_t payload_size,\n                                                int payload_variant = meshtastic_MeshPacket_decoded_tag)\n{\n    meshtastic_MeshPacket packet = meshtastic_MeshPacket_init_zero;\n\n    packet.id = 0x9999;\n    packet.from = 0x11223344;\n    packet.to = 0x55667788;\n    packet.channel = 0;\n    packet.hop_limit = 3;\n    packet.want_ack = false;\n    packet.priority = meshtastic_MeshPacket_Priority_UNSET;\n    packet.rx_time = 1609459200;\n    packet.rx_snr = 10.5f;\n    packet.hop_start = 3;\n    packet.rx_rssi = -85;\n    packet.delayed = meshtastic_MeshPacket_Delayed_NO_DELAY;\n\n    // Set decoded variant\n    packet.which_payload_variant = payload_variant;\n    packet.decoded.portnum = port;\n    if (payload_variant == meshtastic_MeshPacket_encrypted_tag && payload) {\n        packet.encrypted.size = payload_size;\n        memcpy(packet.encrypted.bytes, payload, packet.encrypted.size);\n    }\n    memcpy(packet.decoded.payload.bytes, payload, payload_size);\n    packet.decoded.payload.size = payload_size;\n    packet.decoded.want_response = false;\n    packet.decoded.dest = 0x55667788;\n    packet.decoded.source = 0x11223344;\n    packet.decoded.request_id = 0;\n    packet.decoded.reply_id = 0;\n    packet.decoded.emoji = 0;\n\n    return packet;\n}\n"
  },
  {
    "path": "test/test_meshpacket_serializer/test_serializer.cpp",
    "content": "#include \"test_helpers.h\"\n#include <Arduino.h>\n#include <unity.h>\n\n// Forward declarations for test functions\nvoid test_text_message_serialization();\nvoid test_text_message_serialization_null();\nvoid test_text_message_serialization_long_text();\nvoid test_text_message_serialization_oversized();\nvoid test_text_message_serialization_invalid_utf8();\nvoid test_position_serialization();\nvoid test_nodeinfo_serialization();\nvoid test_waypoint_serialization();\nvoid test_telemetry_device_metrics_serialization();\nvoid test_telemetry_environment_metrics_serialization();\nvoid test_telemetry_environment_metrics_comprehensive();\nvoid test_telemetry_environment_metrics_missing_fields();\nvoid test_telemetry_environment_metrics_complete_coverage();\nvoid test_telemetry_environment_metrics_unset_fields();\nvoid test_encrypted_packet_serialization();\nvoid test_empty_encrypted_packet();\n\nvoid setup()\n{\n    UNITY_BEGIN();\n\n    // Text message tests\n    RUN_TEST(test_text_message_serialization);\n    RUN_TEST(test_text_message_serialization_null);\n    RUN_TEST(test_text_message_serialization_long_text);\n    RUN_TEST(test_text_message_serialization_oversized);\n    RUN_TEST(test_text_message_serialization_invalid_utf8);\n\n    // Position tests\n    RUN_TEST(test_position_serialization);\n\n    // Nodeinfo tests\n    RUN_TEST(test_nodeinfo_serialization);\n\n    // Waypoint tests\n    RUN_TEST(test_waypoint_serialization);\n\n    // Telemetry tests\n    RUN_TEST(test_telemetry_device_metrics_serialization);\n    RUN_TEST(test_telemetry_environment_metrics_serialization);\n    RUN_TEST(test_telemetry_environment_metrics_comprehensive);\n    RUN_TEST(test_telemetry_environment_metrics_missing_fields);\n    RUN_TEST(test_telemetry_environment_metrics_complete_coverage);\n    RUN_TEST(test_telemetry_environment_metrics_unset_fields);\n\n    // Encrypted packet test\n    RUN_TEST(test_encrypted_packet_serialization);\n    RUN_TEST(test_empty_encrypted_packet);\n\n    UNITY_END();\n}\n\nvoid loop()\n{\n    delay(1000);\n}\n"
  },
  {
    "path": "test/test_mqtt/MQTT.cpp",
    "content": "#include \"DebugConfiguration.h\"\n#include \"TestUtil.h\"\n#include <unity.h>\n\n#ifdef ARCH_PORTDUINO\n#include \"mesh/CryptoEngine.h\"\n#include \"mesh/Default.h\"\n#include \"mesh/MeshService.h\"\n#include \"mesh/NodeDB.h\"\n#include \"mesh/Router.h\"\n#include \"modules/RoutingModule.h\"\n#include \"mqtt/MQTT.h\"\n#include \"mqtt/ServiceEnvelope.h\"\n\n#include <PubSubClient.h>\n#include <WiFiClient.h>\n\n#include <arpa/inet.h>\n\n#include <algorithm>\n#include <list>\n#include <optional>\n#include <set>\n#include <sstream>\n#include <string>\n#include <string_view>\n#include <utility>\n#include <variant>\n\n#if defined(UNIT_TEST)\n#define IS_RUNNING_TESTS 1\n#else\n#define IS_RUNNING_TESTS 0\n#endif\n\nnamespace\n{\n// Minimal router needed to receive messages from MQTT.\nclass MockRouter : public Router\n{\n  public:\n    ~MockRouter()\n    {\n        // cryptLock is created in the constructor for Router.\n        delete cryptLock;\n        cryptLock = NULL;\n    }\n    void enqueueReceivedMessage(meshtastic_MeshPacket *p) override\n    {\n        packets_.emplace_back(*p);\n        packetPool.release(p);\n    }\n    std::list<meshtastic_MeshPacket> packets_; // Packets received by the Router.\n};\n\n// Minimal MeshService needed to receive messages from MQTT for testing PKI channel.\nclass MockMeshService : public MeshService\n{\n  public:\n    void sendMqttMessageToClientProxy(meshtastic_MqttClientProxyMessage *m) override\n    {\n        messages_.emplace_back(*m);\n        releaseMqttClientProxyMessageToPool(m);\n    }\n    void sendClientNotification(meshtastic_ClientNotification *n) override\n    {\n        notifications_.emplace_back(*n);\n        releaseClientNotificationToPool(n);\n    }\n    std::list<meshtastic_MqttClientProxyMessage> messages_;  // Messages received from the MeshService.\n    std::list<meshtastic_ClientNotification> notifications_; // Notifications received from the MeshService.\n};\n\n// Minimal NodeDB needed to return values from getMeshNode.\nclass MockNodeDB : public NodeDB\n{\n  public:\n    meshtastic_NodeInfoLite *getMeshNode(NodeNum n) override { return &emptyNode; }\n    meshtastic_NodeInfoLite emptyNode = {};\n};\n\n// Minimal RoutingModule needed to return values from sendAckNak.\nclass MockRoutingModule : public RoutingModule\n{\n  public:\n    void sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketId idFrom, ChannelIndex chIndex, uint8_t hopLimit = 0,\n                    bool ackWantsAck = false) override\n    {\n        ackNacks_.emplace_back(err, to, idFrom, chIndex, hopLimit);\n    }\n    std::list<std::tuple<meshtastic_Routing_Error, NodeNum, PacketId, ChannelIndex, uint8_t>>\n        ackNacks_; // ackNacks received by the RoutingModule.\n};\n\n// A WiFi client used by the MQTT::PubSubClient. Implements a minimal pub/sub server.\n// There isn't an easy way to mock PubSubClient due to it not having virtual methods, so we mock using\n// the WiFiClinet that PubSubClient uses.\nclass MockPubSubServer : public WiFiClient\n{\n  public:\n    static constexpr char kTextTopic[] = \"TextTopic\";\n    uint8_t connected() override { return connected_; }\n    void flush() override {}\n    IPAddress remoteIP() const override { return IPAddress(htonl(ipAddress_)); }\n    void stop() override { connected_ = false; }\n\n    int connect(IPAddress ip, uint16_t port) override\n    {\n        port_ = port;\n        if (refuseConnection_)\n            return 0;\n        connected_ = true;\n        return 1;\n    }\n    int connect(const char *host, uint16_t port) override\n    {\n        host_ = host;\n        port_ = port;\n        if (refuseConnection_)\n            return 0;\n        connected_ = true;\n        return 1;\n    }\n\n    int available() override\n    {\n        if (buffer_.empty())\n            return 0;\n        return buffer_.front().size();\n    }\n\n    int read() override\n    {\n        assert(available());\n        std::string &front = buffer_.front();\n        char ch = front[0];\n        front = front.substr(1, front.size());\n        if (front.empty())\n            buffer_.pop_front();\n        return ch;\n    }\n\n    size_t write(uint8_t data) override { return write(&data, 1); }\n    size_t write(const uint8_t *buf, size_t size) override\n    {\n        command_ += std::string(reinterpret_cast<const char *>(buf), size);\n        if (command_.size() < 2)\n            return size;\n        const int len = (uint8_t)command_[1] + 2;\n        if (command_.size() < len)\n            return size;\n        handleCommand(command_[0], command_.substr(2, len));\n        command_ = command_.substr(len, command_.size());\n        return size;\n    }\n\n    // The pub/sub \"server\".\n    // https://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/MQTT_V3.1_Protocol_Specific.pdf\n    void handleCommand(uint8_t header, std::string_view message)\n    {\n        switch (header & 0xf0) {\n        case MQTTCONNECT:\n            LOG_DEBUG(\"MQTTCONNECT\");\n            buffer_.push_back(std::string(\"\\x20\\x02\\x00\\x00\", 4));\n            break;\n\n        case MQTTSUBSCRIBE: {\n            LOG_DEBUG(\"MQTTSUBSCRIBE\");\n            assert(message.size() >= 5);\n            message.remove_prefix(2); // skip messageId\n\n            while (message.size() >= 3) {\n                const uint16_t topicSize = ((uint8_t)message[0]) << 8 | (uint8_t)message[1];\n                message.remove_prefix(2);\n\n                assert(message.size() >= topicSize + 1);\n                std::string topic(message.data(), topicSize);\n                message.remove_prefix(topicSize + 1);\n\n                LOG_DEBUG(\"Subscribed to topic: %s\", topic.c_str());\n                subscriptions_.insert(std::move(topic));\n            }\n            break;\n        }\n\n        case MQTTPINGREQ:\n            LOG_DEBUG(\"MQTTPINGREQ\");\n            buffer_.push_back(std::string(\"\\xd0\\x00\", 2));\n            break;\n\n        case MQTTPUBLISH: {\n            LOG_DEBUG(\"MQTTPUBLISH\");\n            assert(message.size() >= 3);\n            const uint16_t topicSize = ((uint8_t)message[0]) << 8 | (uint8_t)message[1];\n            message.remove_prefix(2);\n\n            assert(message.size() >= topicSize);\n            std::string topic(message.data(), topicSize);\n            message.remove_prefix(topicSize);\n\n            if (topic == kTextTopic) {\n                published_.emplace_back(std::move(topic), std::string(message.data(), message.size()));\n            } else {\n                published_.emplace_back(\n                    std::move(topic), DecodedServiceEnvelope(reinterpret_cast<const uint8_t *>(message.data()), message.size()));\n            }\n            break;\n        }\n        }\n    }\n\n    bool connected_ = false;\n    bool refuseConnection_ = false;       // Simulate a failed connection.\n    uint32_t ipAddress_ = 0x01010101;     // IP address of the MQTT server.\n    std::string host_;                    // Requested host.\n    uint16_t port_;                       // Requested port.\n    std::list<std::string> buffer_;       // Buffer of messages for the pubSub client to receive.\n    std::string command_;                 // Current command received from the pubSub client.\n    std::set<std::string> subscriptions_; // Topics that the pubSub client has subscribed to.\n    std::list<std::pair<std::string, std::variant<std::string,\n                                                  DecodedServiceEnvelope>>>\n        published_; // Messages published from the pubSub client. Each list element is a pair containing the topic name and either\n                    // a text message (if from the kTextTopic topic) or a DecodedServiceEnvelope.\n};\n\n// Instances of our mocks.\nclass MQTTUnitTest;\nMQTTUnitTest *unitTest;\nMockPubSubServer *pubsub;\nMockRoutingModule *mockRoutingModule;\nMockMeshService *mockMeshService;\nMockRouter *mockRouter;\n\n// Keep running the loop until either conditionMet returns true or 4 seconds elapse.\n// Returns true if conditionMet returns true, returns false on timeout.\nbool loopUntil(std::function<bool()> conditionMet)\n{\n    long start = millis();\n    while (start + 4000 > millis()) {\n        long delayMsec = concurrency::mainController.runOrDelay();\n        if (conditionMet())\n            return true;\n        concurrency::mainDelay.delay(std::min(delayMsec, 5L));\n    }\n    return false;\n}\n\n// Used to access protected/private members of MQTT for unit testing.\nclass MQTTUnitTest : public MQTT\n{\n  public:\n    MQTTUnitTest() : MQTT(std::make_unique<MockPubSubServer>())\n    {\n        pubsub = reinterpret_cast<MockPubSubServer *>(mqttClient.get());\n    }\n    ~MQTTUnitTest()\n    {\n        // Needed because WiFiClient does not have a virtual destructor.\n        mqttClient.release();\n        delete pubsub;\n    }\n    using MQTT::isValidConfig;\n    using MQTT::reconnect;\n    int queueSize() { return mqttQueue.numUsed(); }\n    void reportToMap(std::optional<uint32_t> precision = std::nullopt)\n    {\n        if (precision.has_value())\n            map_position_precision = precision.value();\n        map_publish_interval_msecs = 0;\n        perhapsReportToMap();\n    }\n    void publish(const meshtastic_MeshPacket *p, std::string gateway = \"!87654321\", std::string channel = \"test\")\n    {\n        std::stringstream topic;\n        topic << \"msh/2/e/\" << channel << \"/!\" << gateway;\n        const meshtastic_ServiceEnvelope env = {.packet = const_cast<meshtastic_MeshPacket *>(p),\n                                                .channel_id = const_cast<char *>(channel.c_str()),\n                                                .gateway_id = const_cast<char *>(gateway.c_str())};\n        uint8_t bytes[256];\n        size_t numBytes = pb_encode_to_bytes(bytes, sizeof(bytes), &meshtastic_ServiceEnvelope_msg, &env);\n        mqttCallback(const_cast<char *>(topic.str().c_str()), bytes, numBytes);\n    }\n    static void restart()\n    {\n        if (mqtt != NULL) {\n            delete mqtt;\n            mqtt = unitTest = NULL;\n        }\n        mqtt = unitTest = new MQTTUnitTest();\n        mqtt->start();\n\n        auto clearStartupOutput = []() {\n            pubsub->published_.clear();\n            if (mockMeshService != nullptr) {\n                mockMeshService->messages_.clear();\n                mockMeshService->notifications_.clear();\n            }\n        };\n\n        if (!moduleConfig.mqtt.enabled || moduleConfig.mqtt.proxy_to_client_enabled || *moduleConfig.mqtt.root) {\n            loopUntil([] { return true; }); // Loop once\n            clearStartupOutput();\n            return;\n        }\n        // Wait for MQTT to subscribe to all topics.\n        TEST_ASSERT_TRUE(loopUntil(\n            [] { return pubsub->subscriptions_.count(\"msh/2/e/test/+\") && pubsub->subscriptions_.count(\"msh/2/e/PKI/+\"); }));\n        clearStartupOutput();\n    }\n    PubSubClient &getPubSub() { return pubSub; }\n};\n\n// Packets used in unit tests.\nconst meshtastic_MeshPacket decoded = {\n    .from = 1,\n    .to = 2,\n    .which_payload_variant = meshtastic_MeshPacket_decoded_tag,\n    .decoded = {.portnum = meshtastic_PortNum_TEXT_MESSAGE_APP, .has_bitfield = true, .bitfield = BITFIELD_OK_TO_MQTT_MASK},\n    .id = 4,\n};\nconst meshtastic_MeshPacket encrypted = {\n    .from = 1,\n    .to = 2,\n    .which_payload_variant = meshtastic_MeshPacket_encrypted_tag,\n    .encrypted = {.size = 0},\n    .id = 3,\n};\n} // namespace\n\n// Initialize mocks and configuration before running each test.\nvoid setUp(void)\n{\n    moduleConfig.mqtt =\n        meshtastic_ModuleConfig_MQTTConfig{.enabled = true, .map_reporting_enabled = true, .has_map_report_settings = true};\n    moduleConfig.mqtt.map_report_settings = meshtastic_ModuleConfig_MapReportSettings{\n        .publish_interval_secs = 0, .position_precision = 14, .should_report_location = true};\n    channelFile.channels[0] = meshtastic_Channel{\n        .index = 0,\n        .has_settings = true,\n        .settings = {.name = \"test\", .uplink_enabled = true, .downlink_enabled = true},\n        .role = meshtastic_Channel_Role_PRIMARY,\n    };\n    channelFile.channels_count = 1;\n    owner = meshtastic_User{.id = \"!12345678\"};\n    myNodeInfo = meshtastic_MyNodeInfo{.my_node_num = 0x12345678}; // Match the expected gateway ID in topic\n    localPosition =\n        meshtastic_Position{.has_latitude_i = true, .latitude_i = 700000000, .has_longitude_i = true, .longitude_i = 300000000};\n\n    router = mockRouter = new MockRouter();\n    service = mockMeshService = new MockMeshService();\n    routingModule = mockRoutingModule = new MockRoutingModule();\n    MQTTUnitTest::restart();\n}\n\n// Deinitialize all objects created in setUp.\nvoid tearDown(void)\n{\n    delete unitTest;\n    mqtt = unitTest = NULL;\n    delete mockRoutingModule;\n    routingModule = mockRoutingModule = NULL;\n    delete mockMeshService;\n    service = mockMeshService = NULL;\n    delete mockRouter;\n    router = mockRouter = NULL;\n}\n\n// Test that the decoded MeshPacket is published when encryption_enabled = false.\nvoid test_sendDirectlyConnectedDecoded(void)\n{\n    mqtt->onSend(encrypted, decoded, 0);\n\n    TEST_ASSERT_EQUAL(1, pubsub->published_.size());\n    const auto &[topic, payload] = pubsub->published_.front();\n    const DecodedServiceEnvelope &env = std::get<DecodedServiceEnvelope>(payload);\n    TEST_ASSERT_EQUAL_STRING(\"msh/2/e/test/!12345678\", topic.c_str());\n    TEST_ASSERT_TRUE(env.validDecode);\n    TEST_ASSERT_EQUAL(decoded.id, env.packet->id);\n}\n\n// Test that the encrypted MeshPacket is published when encryption_enabled = true.\nvoid test_sendDirectlyConnectedEncrypted(void)\n{\n    moduleConfig.mqtt.encryption_enabled = true;\n\n    mqtt->onSend(encrypted, decoded, 0);\n\n    TEST_ASSERT_EQUAL(1, pubsub->published_.size());\n    const auto &[topic, payload] = pubsub->published_.front();\n    const DecodedServiceEnvelope &env = std::get<DecodedServiceEnvelope>(payload);\n    TEST_ASSERT_EQUAL_STRING(\"msh/2/e/test/!12345678\", topic.c_str());\n    TEST_ASSERT_TRUE(env.validDecode);\n    TEST_ASSERT_EQUAL(encrypted.id, env.packet->id);\n}\n\n// Verify that the decoded MeshPacket is proxied through the MeshService when encryption_enabled = false.\nvoid test_proxyToMeshServiceDecoded(void)\n{\n    moduleConfig.mqtt.proxy_to_client_enabled = true;\n    MQTTUnitTest::restart();\n\n    mqtt->onSend(encrypted, decoded, 0);\n\n    TEST_ASSERT_EQUAL(1, mockMeshService->messages_.size());\n    const meshtastic_MqttClientProxyMessage &message = mockMeshService->messages_.front();\n    TEST_ASSERT_EQUAL_STRING(\"msh/2/e/test/!12345678\", message.topic);\n    TEST_ASSERT_EQUAL(meshtastic_MqttClientProxyMessage_data_tag, message.which_payload_variant);\n    const DecodedServiceEnvelope env(message.payload_variant.data.bytes, message.payload_variant.data.size);\n    TEST_ASSERT_TRUE(env.validDecode);\n    TEST_ASSERT_EQUAL(decoded.id, env.packet->id);\n}\n\n// Verify that the encrypted MeshPacket is proxied through the MeshService when encryption_enabled = true.\nvoid test_proxyToMeshServiceEncrypted(void)\n{\n    moduleConfig.mqtt.proxy_to_client_enabled = true;\n    moduleConfig.mqtt.encryption_enabled = true;\n    MQTTUnitTest::restart();\n\n    mqtt->onSend(encrypted, decoded, 0);\n\n    TEST_ASSERT_EQUAL(1, mockMeshService->messages_.size());\n    const meshtastic_MqttClientProxyMessage &message = mockMeshService->messages_.front();\n    TEST_ASSERT_EQUAL_STRING(\"msh/2/e/test/!12345678\", message.topic);\n    TEST_ASSERT_EQUAL(meshtastic_MqttClientProxyMessage_data_tag, message.which_payload_variant);\n    const DecodedServiceEnvelope env(message.payload_variant.data.bytes, message.payload_variant.data.size);\n    TEST_ASSERT_TRUE(env.validDecode);\n    TEST_ASSERT_EQUAL(encrypted.id, env.packet->id);\n}\n\n// A packet without the OK to MQTT bit set should not be published to a public server.\nvoid test_dontMqttMeOnPublicServer(void)\n{\n    meshtastic_MeshPacket p = decoded;\n    p.decoded.bitfield = 0;\n    p.decoded.has_bitfield = 0;\n\n    mqtt->onSend(encrypted, p, 0);\n\n    TEST_ASSERT_TRUE(pubsub->published_.empty());\n}\n\n// A packet without the OK to MQTT bit set should be published to a private server.\nvoid test_okToMqttOnPrivateServer(void)\n{\n    // Cause a disconnect.\n    pubsub->connected_ = false;\n    pubsub->refuseConnection_ = true;\n    TEST_ASSERT_TRUE(loopUntil([] { return !unitTest->getPubSub().connected(); }));\n\n    // Use 127.0.0.1 for the server's IP.\n    pubsub->ipAddress_ = 0x7f000001;\n\n    // Reconnect.\n    pubsub->refuseConnection_ = false;\n    TEST_ASSERT_TRUE(loopUntil([] { return unitTest->getPubSub().connected(); }));\n\n    // Send the same packet as test_dontMqttMeOnPublicServer.\n    meshtastic_MeshPacket p = decoded;\n    p.decoded.bitfield = 0;\n    p.decoded.has_bitfield = 0;\n\n    mqtt->onSend(encrypted, p, 0);\n\n    TEST_ASSERT_EQUAL(1, pubsub->published_.size());\n}\n\n// Range tests messages are not uplinked to the default server.\nvoid test_noRangeTestAppOnDefaultServer(void)\n{\n    meshtastic_MeshPacket p = decoded;\n    p.decoded.portnum = meshtastic_PortNum_RANGE_TEST_APP;\n\n    mqtt->onSend(encrypted, p, 0);\n\n    TEST_ASSERT_TRUE(pubsub->published_.empty());\n}\n\n// Detection sensor messages are not uplinked to the default server.\nvoid test_noDetectionSensorAppOnDefaultServer(void)\n{\n    meshtastic_MeshPacket p = decoded;\n    p.decoded.portnum = meshtastic_PortNum_DETECTION_SENSOR_APP;\n\n    mqtt->onSend(encrypted, p, 0);\n\n    TEST_ASSERT_TRUE(pubsub->published_.empty());\n}\n\n// Test that a MeshPacket is queued while the MQTT server is disconnected.\nvoid test_sendQueued(void)\n{\n    // Cause a disconnect.\n    pubsub->connected_ = false;\n    pubsub->refuseConnection_ = true;\n    TEST_ASSERT_TRUE(loopUntil([] { return !unitTest->getPubSub().connected(); }));\n\n    // Send while disconnected.\n    mqtt->onSend(encrypted, decoded, 0);\n    TEST_ASSERT_EQUAL(1, unitTest->queueSize());\n    TEST_ASSERT_TRUE(pubsub->published_.empty());\n    TEST_ASSERT_FALSE(unitTest->getPubSub().connected());\n\n    // Allow reconnect to happen. Expect to see the packet published now.\n    pubsub->refuseConnection_ = false;\n    TEST_ASSERT_TRUE(loopUntil([] { return !pubsub->published_.empty(); }));\n\n    TEST_ASSERT_EQUAL(0, unitTest->queueSize());\n    const auto &[topic, payload] = pubsub->published_.front();\n    const DecodedServiceEnvelope &env = std::get<DecodedServiceEnvelope>(payload);\n    TEST_ASSERT_EQUAL_STRING(\"msh/2/e/test/!12345678\", topic.c_str());\n    TEST_ASSERT_TRUE(env.validDecode);\n    TEST_ASSERT_EQUAL(decoded.id, env.packet->id);\n}\n\n// Verify reconnecting with the proxy enabled does not reconnect to a MQTT server.\nvoid test_reconnectProxyDoesNotReconnectMqtt(void)\n{\n    moduleConfig.mqtt.proxy_to_client_enabled = true;\n    MQTTUnitTest::restart();\n\n    unitTest->reconnect();\n\n    TEST_ASSERT_FALSE(pubsub->connected_);\n}\n\n// Test receiving an empty MeshPacket on a subscribed topic.\nvoid test_receiveEmptyMeshPacket(void)\n{\n    unitTest->publish(NULL);\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n    TEST_ASSERT_TRUE(mockRoutingModule->ackNacks_.empty());\n}\n\n// Test receiving a decoded MeshPacket on a subscribed topic.\nvoid test_receiveDecodedProto(void)\n{\n    unitTest->publish(&decoded);\n\n    TEST_ASSERT_EQUAL(1, mockRouter->packets_.size());\n    const meshtastic_MeshPacket &p = mockRouter->packets_.front();\n    TEST_ASSERT_EQUAL(decoded.id, p.id);\n    TEST_ASSERT_TRUE(p.via_mqtt);\n}\n\n// Test receiving a decoded MeshPacket from the phone proxy.\nvoid test_receiveDecodedProtoFromProxy(void)\n{\n    const meshtastic_ServiceEnvelope env = {\n        .packet = const_cast<meshtastic_MeshPacket *>(&decoded), .channel_id = \"test\", .gateway_id = \"!87654321\"};\n    meshtastic_MqttClientProxyMessage message = meshtastic_MqttClientProxyMessage_init_default;\n    strcat(message.topic, \"msh/2/e/test/!87654321\");\n    message.which_payload_variant = meshtastic_MqttClientProxyMessage_data_tag;\n    message.payload_variant.data.size = pb_encode_to_bytes(\n        message.payload_variant.data.bytes, sizeof(message.payload_variant.data.bytes), &meshtastic_ServiceEnvelope_msg, &env);\n\n    mqtt->onClientProxyReceive(message);\n\n    TEST_ASSERT_EQUAL(1, mockRouter->packets_.size());\n    const meshtastic_MeshPacket &p = mockRouter->packets_.front();\n    TEST_ASSERT_EQUAL(decoded.id, p.id);\n    TEST_ASSERT_TRUE(p.via_mqtt);\n}\n\n// Properly handles the case where the received message is empty.\nvoid test_receiveEmptyDataFromProxy(void)\n{\n    meshtastic_MqttClientProxyMessage message = meshtastic_MqttClientProxyMessage_init_default;\n    message.which_payload_variant = meshtastic_MqttClientProxyMessage_data_tag;\n\n    mqtt->onClientProxyReceive(message);\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n}\n\n// Packets should be ignored if downlink is not enabled.\nvoid test_receiveWithoutChannelDownlink(void)\n{\n    channelFile.channels[0].settings.downlink_enabled = false;\n\n    unitTest->publish(&decoded);\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n}\n\n// Test receiving an encrypted MeshPacket on the PKI topic.\nvoid test_receiveEncryptedPKITopicToUs(void)\n{\n    meshtastic_MeshPacket e = encrypted;\n    e.to = myNodeInfo.my_node_num;\n\n    unitTest->publish(&e, \"!87654321\", \"PKI\");\n\n    TEST_ASSERT_EQUAL(1, mockRouter->packets_.size());\n    const meshtastic_MeshPacket &p = mockRouter->packets_.front();\n    TEST_ASSERT_EQUAL(encrypted.id, p.id);\n    TEST_ASSERT_TRUE(p.via_mqtt);\n}\n\n// Should ignore messages published to MQTT by this gateway.\nvoid test_receiveIgnoresOwnPublishedMessages(void)\n{\n    unitTest->publish(&decoded, nodeDB->getNodeId().c_str());\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n    TEST_ASSERT_TRUE(mockRoutingModule->ackNacks_.empty());\n}\n\n// Considers receiving one of our packets an acknowledgement of it being sent.\nvoid test_receiveAcksOwnSentMessages(void)\n{\n    meshtastic_MeshPacket p = decoded;\n    p.from = myNodeInfo.my_node_num;\n\n    unitTest->publish(&p, nodeDB->getNodeId().c_str());\n\n    // FIXME: Better assertion for this test\n    // TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n    // TEST_ASSERT_EQUAL(1, mockRoutingModule->ackNacks_.size());\n    // const auto &[err, to, idFrom, chIndex, hopLimit] = mockRoutingModule->ackNacks_.front();\n    // TEST_ASSERT_EQUAL(meshtastic_Routing_Error_NONE, err);\n    // TEST_ASSERT_EQUAL(myNodeInfo.my_node_num, to);\n    // TEST_ASSERT_EQUAL(p.id, idFrom);\n}\n\n// Should ignore our own messages from MQTT that were heard by other nodes.\nvoid test_receiveIgnoresSentMessagesFromOthers(void)\n{\n    meshtastic_MeshPacket p = decoded;\n    p.from = myNodeInfo.my_node_num;\n\n    unitTest->publish(&p);\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n    TEST_ASSERT_TRUE(mockRoutingModule->ackNacks_.empty());\n}\n\n// Decoded MQTT messages should be ignored when encryption is enabled.\nvoid test_receiveIgnoresDecodedWhenEncryptionEnabled(void)\n{\n    moduleConfig.mqtt.encryption_enabled = true;\n\n    unitTest->publish(&decoded);\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n}\n\n// Non-encrypted messages for the Admin App should be ignored.\nvoid test_receiveIgnoresDecodedAdminApp(void)\n{\n    meshtastic_MeshPacket p = decoded;\n    p.decoded.portnum = meshtastic_PortNum_ADMIN_APP;\n\n    unitTest->publish(&p);\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n}\n\n// Only the same fields that are transmitted over LoRa should be set in MQTT messages.\nvoid test_receiveIgnoresUnexpectedFields(void)\n{\n    meshtastic_MeshPacket input = decoded;\n    input.rx_snr = 10;\n    input.rx_rssi = 20;\n\n    unitTest->publish(&input);\n\n    TEST_ASSERT_EQUAL(1, mockRouter->packets_.size());\n    const meshtastic_MeshPacket &p = mockRouter->packets_.front();\n    TEST_ASSERT_EQUAL(0, p.rx_snr);\n    TEST_ASSERT_EQUAL(0, p.rx_rssi);\n}\n\n// Messages with an invalid hop_limit are ignored.\nvoid test_receiveIgnoresInvalidHopLimit(void)\n{\n    meshtastic_MeshPacket p = decoded;\n    p.hop_limit = 10;\n\n    unitTest->publish(&p);\n\n    TEST_ASSERT_TRUE(mockRouter->packets_.empty());\n}\n\n// Publishing to a text channel.\nvoid test_publishTextMessageDirect(void)\n{\n    TEST_ASSERT_TRUE(mqtt->publish(MockPubSubServer::kTextTopic, \"payload\", 0));\n\n    TEST_ASSERT_EQUAL(1, pubsub->published_.size());\n    const auto &[topic, payload] = pubsub->published_.front();\n    TEST_ASSERT_EQUAL_STRING(\"payload\", std::get<std::string>(payload).c_str());\n}\n\n// Publishing to a text channel via the MQTT client proxy.\nvoid test_publishTextMessageWithProxy(void)\n{\n    moduleConfig.mqtt.proxy_to_client_enabled = true;\n\n    TEST_ASSERT_TRUE(mqtt->publish(MockPubSubServer::kTextTopic, \"payload\", 0));\n\n    TEST_ASSERT_EQUAL(1, mockMeshService->messages_.size());\n    const meshtastic_MqttClientProxyMessage &message = mockMeshService->messages_.front();\n    TEST_ASSERT_EQUAL_STRING(MockPubSubServer::kTextTopic, message.topic);\n    TEST_ASSERT_EQUAL(meshtastic_MqttClientProxyMessage_text_tag, message.which_payload_variant);\n    TEST_ASSERT_EQUAL_STRING(\"payload\", message.payload_variant.text);\n}\n\n// Helper method to verify the expected latitude/longitude was received.\nvoid verifyLatLong(const DecodedServiceEnvelope &env, uint32_t latitude, uint32_t longitude)\n{\n    TEST_ASSERT_TRUE(env.validDecode);\n    const meshtastic_MeshPacket &p = *env.packet;\n    TEST_ASSERT_EQUAL(NODENUM_BROADCAST, p.to);\n    TEST_ASSERT_EQUAL(meshtastic_MeshPacket_decoded_tag, p.which_payload_variant);\n    TEST_ASSERT_EQUAL(meshtastic_PortNum_MAP_REPORT_APP, p.decoded.portnum);\n\n    meshtastic_MapReport mapReport;\n    TEST_ASSERT_TRUE(\n        pb_decode_from_bytes(p.decoded.payload.bytes, p.decoded.payload.size, &meshtastic_MapReport_msg, &mapReport));\n    TEST_ASSERT_EQUAL(latitude, mapReport.latitude_i);\n    TEST_ASSERT_EQUAL(longitude, mapReport.longitude_i);\n}\n\n// Map reporting defaults to an imprecise location.\nvoid test_reportToMapDefaultImprecise(void)\n{\n    unitTest->reportToMap();\n\n    TEST_ASSERT_EQUAL(1, pubsub->published_.size());\n    const auto &[topic, payload] = pubsub->published_.front();\n    TEST_ASSERT_EQUAL_STRING(\"msh/2/map/\", topic.c_str());\n}\n\n// Location is sent over the phone proxy.\nvoid test_reportToMapImpreciseProxied(void)\n{\n    moduleConfig.mqtt.proxy_to_client_enabled = true;\n    MQTTUnitTest::restart();\n\n    unitTest->reportToMap(/*precision=*/14);\n\n    TEST_ASSERT_EQUAL(1, mockMeshService->messages_.size());\n    const meshtastic_MqttClientProxyMessage &message = mockMeshService->messages_.front();\n    TEST_ASSERT_EQUAL_STRING(\"msh/2/map/\", message.topic);\n    TEST_ASSERT_EQUAL(meshtastic_MqttClientProxyMessage_data_tag, message.which_payload_variant);\n    const DecodedServiceEnvelope env(message.payload_variant.data.bytes, message.payload_variant.data.size);\n}\n\n// isUsingDefaultServer returns true when using the default server.\nvoid test_usingDefaultServer(void)\n{\n    TEST_ASSERT_TRUE(mqtt->isUsingDefaultServer());\n}\n\n// isUsingDefaultServer returns true when using the default server and a port.\nvoid test_usingDefaultServerWithPort(void)\n{\n    std::string server = default_mqtt_address;\n    server += \":1883\";\n    strcpy(moduleConfig.mqtt.address, server.c_str());\n    MQTTUnitTest::restart();\n\n    TEST_ASSERT_TRUE(mqtt->isUsingDefaultServer());\n}\n\n// isUsingDefaultServer returns true when using the default server and invalid port.\nvoid test_usingDefaultServerWithInvalidPort(void)\n{\n    std::string server = default_mqtt_address;\n    server += \":invalid\";\n    strcpy(moduleConfig.mqtt.address, server.c_str());\n    MQTTUnitTest::restart();\n\n    TEST_ASSERT_TRUE(mqtt->isUsingDefaultServer());\n}\n\n// isUsingDefaultServer returns false when not using the default server.\nvoid test_usingCustomServer(void)\n{\n    strcpy(moduleConfig.mqtt.address, \"custom\");\n    MQTTUnitTest::restart();\n\n    TEST_ASSERT_FALSE(mqtt->isUsingDefaultServer());\n}\n\n// Test that isEnabled returns true the MQTT module is enabled.\nvoid test_enabled(void)\n{\n    TEST_ASSERT_TRUE(mqtt->isEnabled());\n}\n\n// Test that isEnabled returns false the MQTT module not enabled.\nvoid test_disabled(void)\n{\n    moduleConfig.mqtt.enabled = false;\n    MQTTUnitTest::restart();\n\n    TEST_ASSERT_FALSE(mqtt->isEnabled());\n}\n\n// Subscriptions contain the moduleConfig.mqtt.root prefix.\nvoid test_customMqttRoot(void)\n{\n    strcpy(moduleConfig.mqtt.root, \"custom\");\n    MQTTUnitTest::restart();\n\n    TEST_ASSERT_TRUE(loopUntil(\n        [] { return pubsub->subscriptions_.count(\"custom/2/e/test/+\") && pubsub->subscriptions_.count(\"custom/2/e/PKI/+\"); }));\n}\n\n// Empty configuration is valid.\nvoid test_configEmptyIsValid(void)\n{\n    meshtastic_ModuleConfig_MQTTConfig config = {};\n\n    TEST_ASSERT_TRUE(MQTT::isValidConfig(config));\n}\n\n// Empty 'enabled' configuration is valid. A lightweight TCP check may be performed\n// but does not affect the result.\nvoid test_configEnabledEmptyIsValid(void)\n{\n    meshtastic_ModuleConfig_MQTTConfig config = {.enabled = true};\n\n    TEST_ASSERT_TRUE(MQTT::isValidConfig(config));\n}\n\n// Configuration with the default server is valid.\nvoid test_configWithDefaultServer(void)\n{\n    meshtastic_ModuleConfig_MQTTConfig config = {.address = default_mqtt_address};\n\n    TEST_ASSERT_TRUE(MQTT::isValidConfig(config));\n}\n\n// Configuration with the default server and port 8888 is invalid.\nvoid test_configWithDefaultServerAndInvalidPort(void)\n{\n    meshtastic_ModuleConfig_MQTTConfig config = {.address = default_mqtt_address \":8888\"};\n\n    TEST_ASSERT_FALSE(MQTT::isValidConfig(config));\n}\n\n// Custom host and port is valid. TCP reachability is checked but does not block saving.\nvoid test_configCustomHostAndPort(void)\n{\n    meshtastic_ModuleConfig_MQTTConfig config = {.enabled = true, .address = \"server:1234\"};\n\n    TEST_ASSERT_TRUE(MQTT::isValidConfig(config));\n}\n\n// An unreachable server is still a valid config — settings always save.\n// A warning notification is sent in non-test builds, but isValidConfig returns true.\nvoid test_configWithUnreachableServerIsStillValid(void)\n{\n    meshtastic_ModuleConfig_MQTTConfig config = {.enabled = true, .address = \"server\"};\n\n    TEST_ASSERT_TRUE(MQTT::isValidConfig(config));\n}\n\n// isValidConfig returns true when tls_enabled is supported, or false otherwise.\nvoid test_configWithTLSEnabled(void)\n{\n    meshtastic_ModuleConfig_MQTTConfig config = {.enabled = true, .address = \"server\", .tls_enabled = true};\n\n#if MQTT_SUPPORTS_TLS\n    TEST_ASSERT_TRUE(MQTT::isValidConfig(config));\n#else\n    TEST_ASSERT_FALSE(MQTT::isValidConfig(config));\n#endif\n}\n\nvoid setup()\n{\n    initializeTestEnvironment();\n    const std::unique_ptr<MockNodeDB> mockNodeDB(new MockNodeDB());\n    nodeDB = mockNodeDB.get();\n\n    UNITY_BEGIN();\n    RUN_TEST(test_sendDirectlyConnectedDecoded);\n    RUN_TEST(test_sendDirectlyConnectedEncrypted);\n    RUN_TEST(test_proxyToMeshServiceDecoded);\n    RUN_TEST(test_proxyToMeshServiceEncrypted);\n    RUN_TEST(test_dontMqttMeOnPublicServer);\n    RUN_TEST(test_okToMqttOnPrivateServer);\n    RUN_TEST(test_noRangeTestAppOnDefaultServer);\n    RUN_TEST(test_noDetectionSensorAppOnDefaultServer);\n    RUN_TEST(test_sendQueued);\n    RUN_TEST(test_reconnectProxyDoesNotReconnectMqtt);\n    RUN_TEST(test_receiveEmptyMeshPacket);\n    RUN_TEST(test_receiveDecodedProto);\n    RUN_TEST(test_receiveDecodedProtoFromProxy);\n    RUN_TEST(test_receiveEmptyDataFromProxy);\n    RUN_TEST(test_receiveWithoutChannelDownlink);\n    RUN_TEST(test_receiveEncryptedPKITopicToUs);\n    RUN_TEST(test_receiveIgnoresOwnPublishedMessages);\n    RUN_TEST(test_receiveAcksOwnSentMessages);\n    RUN_TEST(test_receiveIgnoresSentMessagesFromOthers);\n    RUN_TEST(test_receiveIgnoresDecodedWhenEncryptionEnabled);\n    RUN_TEST(test_receiveIgnoresDecodedAdminApp);\n    RUN_TEST(test_receiveIgnoresUnexpectedFields);\n    RUN_TEST(test_receiveIgnoresInvalidHopLimit);\n    RUN_TEST(test_publishTextMessageDirect);\n    RUN_TEST(test_publishTextMessageWithProxy);\n    RUN_TEST(test_reportToMapDefaultImprecise);\n    RUN_TEST(test_reportToMapImpreciseProxied);\n    RUN_TEST(test_usingDefaultServer);\n    RUN_TEST(test_usingDefaultServerWithPort);\n    RUN_TEST(test_usingDefaultServerWithInvalidPort);\n    RUN_TEST(test_usingCustomServer);\n    RUN_TEST(test_enabled);\n    RUN_TEST(test_disabled);\n    RUN_TEST(test_customMqttRoot);\n    RUN_TEST(test_configEmptyIsValid);\n    RUN_TEST(test_configEnabledEmptyIsValid);\n    RUN_TEST(test_configWithDefaultServer);\n    RUN_TEST(test_configWithDefaultServerAndInvalidPort);\n    RUN_TEST(test_configCustomHostAndPort);\n    RUN_TEST(test_configWithUnreachableServerIsStillValid);\n    RUN_TEST(test_configWithTLSEnabled);\n    exit(UNITY_END());\n}\n#else\nvoid setup()\n{\n    initializeTestEnvironment();\n    LOG_WARN(\"This test requires the ARCH_PORTDUINO variant of WiFiClient\");\n    UNITY_BEGIN();\n    UNITY_END();\n}\n#endif\nvoid loop() {}\n"
  },
  {
    "path": "test/test_radio/test_main.cpp",
    "content": "#include \"MeshRadio.h\"\n#include \"MeshService.h\"\n#include \"RadioInterface.h\"\n#include \"TestUtil.h\"\n#include <unity.h>\n\n#include \"meshtastic/config.pb.h\"\n\nclass MockMeshService : public MeshService\n{\n  public:\n    void sendClientNotification(meshtastic_ClientNotification *n) override { releaseClientNotificationToPool(n); }\n};\n\nstatic MockMeshService *mockMeshService;\n\nstatic void test_bwCodeToKHz_specialMappings()\n{\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 31.25f, bwCodeToKHz(31));\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 62.5f, bwCodeToKHz(62));\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 203.125f, bwCodeToKHz(200));\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 406.25f, bwCodeToKHz(400));\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 812.5f, bwCodeToKHz(800));\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 1625.0f, bwCodeToKHz(1600));\n}\n\nstatic void test_bwCodeToKHz_passthrough()\n{\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 125.0f, bwCodeToKHz(125));\n    TEST_ASSERT_FLOAT_WITHIN(0.0001f, 250.0f, bwCodeToKHz(250));\n}\n\nstatic void test_validateConfigLora_noopWhenUsePresetFalse()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.use_preset = false;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;\n    cfg.bandwidth = 123;\n    cfg.spread_factor = 8;\n\n    RadioInterface::validateConfigLora(cfg);\n\n    TEST_ASSERT_EQUAL_UINT16(123, cfg.bandwidth);\n    TEST_ASSERT_EQUAL_UINT32(8, cfg.spread_factor);\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST, cfg.modem_preset);\n}\n\nstatic void test_validateConfigLora_validPreset_nonWideRegion()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.use_preset = true;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;\n\n    TEST_ASSERT_TRUE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_validateConfigLora_validPreset_wideRegion()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.use_preset = true;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_LORA_24;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;\n\n    TEST_ASSERT_TRUE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_validateConfigLora_rejectsInvalidPresetForRegion()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.use_preset = true;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO;\n\n    TEST_ASSERT_FALSE(RadioInterface::validateConfigLora(cfg));\n}\n\nstatic void test_clampConfigLora_invalidPresetClampedToDefault()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.use_preset = true;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO;\n\n    RadioInterface::clampConfigLora(cfg);\n\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST, cfg.modem_preset);\n}\n\nstatic void test_clampConfigLora_validPresetUnchanged()\n{\n    meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;\n    cfg.use_preset = true;\n    cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;\n    cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;\n\n    RadioInterface::clampConfigLora(cfg);\n\n    TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST, cfg.modem_preset);\n}\n\nvoid setUp(void)\n{\n    mockMeshService = new MockMeshService();\n    service = mockMeshService;\n}\nvoid tearDown(void)\n{\n    service = nullptr;\n    delete mockMeshService;\n    mockMeshService = nullptr;\n}\n\nvoid setup()\n{\n    delay(10);\n    delay(2000);\n\n    initializeTestEnvironment();\n\n    UNITY_BEGIN();\n    RUN_TEST(test_bwCodeToKHz_specialMappings);\n    RUN_TEST(test_bwCodeToKHz_passthrough);\n    RUN_TEST(test_validateConfigLora_noopWhenUsePresetFalse);\n    RUN_TEST(test_validateConfigLora_validPreset_nonWideRegion);\n    RUN_TEST(test_validateConfigLora_validPreset_wideRegion);\n    RUN_TEST(test_validateConfigLora_rejectsInvalidPresetForRegion);\n    RUN_TEST(test_clampConfigLora_invalidPresetClampedToDefault);\n    RUN_TEST(test_clampConfigLora_validPresetUnchanged);\n    exit(UNITY_END());\n}\n\nvoid loop() {}\n"
  },
  {
    "path": "test/test_serial/SerialModule.cpp",
    "content": "#include \"DebugConfiguration.h\"\n#include \"TestUtil.h\"\n#include <unity.h>\n\n#ifdef ARCH_PORTDUINO\n#include \"configuration.h\"\n\n#if defined(UNIT_TEST)\n#define IS_RUNNING_TESTS 1\n#else\n#define IS_RUNNING_TESTS 0\n#endif\n\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) &&               \\\n    !defined(CONFIG_IDF_TARGET_ESP32C3)\n#include \"modules/SerialModule.h\"\n#endif\n\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) &&               \\\n    !defined(CONFIG_IDF_TARGET_ESP32C3)\n\n// Test that empty configuration is valid.\nvoid test_serialConfigEmptyIsValid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {};\n\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n}\n\n// Test that basic enabled configuration is valid.\nvoid test_serialConfigEnabledIsValid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {.enabled = true};\n\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n}\n\n// Test that configuration with override_console_serial_port and NMEA mode is valid.\nvoid test_serialConfigWithOverrideConsoleNmeaModeIsValid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {\n        .enabled = true, .override_console_serial_port = true, .mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA};\n\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n}\n\n// Test that configuration with override_console_serial_port and CalTopo mode is valid.\nvoid test_serialConfigWithOverrideConsoleCalTopoModeIsValid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {\n        .enabled = true, .override_console_serial_port = true, .mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO};\n\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n}\n\n// Test that configuration with override_console_serial_port and DEFAULT mode is invalid.\nvoid test_serialConfigWithOverrideConsoleDefaultModeIsInvalid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {\n        .enabled = true, .override_console_serial_port = true, .mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT};\n\n    TEST_ASSERT_FALSE(SerialModule::isValidConfig(config));\n}\n\n// Test that configuration with override_console_serial_port and SIMPLE mode is invalid.\nvoid test_serialConfigWithOverrideConsoleSimpleModeIsInvalid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {\n        .enabled = true, .override_console_serial_port = true, .mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE};\n\n    TEST_ASSERT_FALSE(SerialModule::isValidConfig(config));\n}\n\n// Test that configuration with override_console_serial_port and TEXTMSG mode is invalid.\nvoid test_serialConfigWithOverrideConsoleTextMsgModeIsInvalid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {\n        .enabled = true, .override_console_serial_port = true, .mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG};\n\n    TEST_ASSERT_FALSE(SerialModule::isValidConfig(config));\n}\n\n// Test that configuration with override_console_serial_port and PROTO mode is invalid.\nvoid test_serialConfigWithOverrideConsoleProtoModeIsInvalid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {\n        .enabled = true, .override_console_serial_port = true, .mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO};\n\n    TEST_ASSERT_FALSE(SerialModule::isValidConfig(config));\n}\n\n// Test that various modes work without override_console_serial_port.\nvoid test_serialConfigVariousModesWithoutOverrideAreValid(void)\n{\n    meshtastic_ModuleConfig_SerialConfig config = {.enabled = true, .override_console_serial_port = false};\n\n    // Test DEFAULT mode\n    config.mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT;\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n\n    // Test SIMPLE mode\n    config.mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE;\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n\n    // Test TEXTMSG mode\n    config.mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG;\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n\n    // Test PROTO mode\n    config.mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO;\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n\n    // Test NMEA mode\n    config.mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA;\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n\n    // Test CALTOPO mode\n    config.mode = meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO;\n    TEST_ASSERT_TRUE(SerialModule::isValidConfig(config));\n}\n\n#endif // Architecture check\n\nvoid setup()\n{\n    initializeTestEnvironment();\n\n#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) &&               \\\n    !defined(CONFIG_IDF_TARGET_ESP32C3)\n    UNITY_BEGIN();\n    RUN_TEST(test_serialConfigEmptyIsValid);\n    RUN_TEST(test_serialConfigEnabledIsValid);\n    RUN_TEST(test_serialConfigWithOverrideConsoleNmeaModeIsValid);\n    RUN_TEST(test_serialConfigWithOverrideConsoleCalTopoModeIsValid);\n    RUN_TEST(test_serialConfigWithOverrideConsoleDefaultModeIsInvalid);\n    RUN_TEST(test_serialConfigWithOverrideConsoleSimpleModeIsInvalid);\n    RUN_TEST(test_serialConfigWithOverrideConsoleTextMsgModeIsInvalid);\n    RUN_TEST(test_serialConfigWithOverrideConsoleProtoModeIsInvalid);\n    RUN_TEST(test_serialConfigVariousModesWithoutOverrideAreValid);\n    exit(UNITY_END());\n#else\n    LOG_WARN(\"This test requires ESP32, NRF52, or RP2040 architecture\");\n    UNITY_BEGIN();\n    UNITY_END();\n#endif\n}\n#else\nvoid setup()\n{\n    initializeTestEnvironment();\n    LOG_WARN(\"This test requires the ARCH_PORTDUINO variant\");\n    UNITY_BEGIN();\n    UNITY_END();\n}\n#endif\nvoid loop() {}\n"
  },
  {
    "path": "test/test_traffic_management/test_main.cpp",
    "content": "#include \"TestUtil.h\"\n#include <unity.h>\n\n#if defined(ARCH_PORTDUINO)\n#define TM_TEST_ENTRY extern \"C\"\n#else\n#define TM_TEST_ENTRY\n#endif\n\n#if HAS_TRAFFIC_MANAGEMENT\n\n#include \"mesh/CryptoEngine.h\"\n#include \"mesh/MeshService.h\"\n#include \"mesh/NodeDB.h\"\n#include \"mesh/Router.h\"\n#include \"modules/TrafficManagementModule.h\"\n#include <climits>\n#include <cstring>\n#include <memory>\n#include <pb_encode.h>\n#include <vector>\n\nnamespace\n{\n\nconstexpr NodeNum kLocalNode = 0x11111111;\nconstexpr NodeNum kRemoteNode = 0x22222222;\nconstexpr NodeNum kTargetNode = 0x33333333;\n\nclass MockNodeDB : public NodeDB\n{\n  public:\n    meshtastic_NodeInfoLite *getMeshNode(NodeNum n) override\n    {\n        if (hasCachedNode && n == cachedNodeNum)\n            return &cachedNode;\n        return NodeDB::getMeshNode(n);\n    }\n\n    void clearCachedNode()\n    {\n        hasCachedNode = false;\n        cachedNodeNum = 0;\n        cachedNode = meshtastic_NodeInfoLite_init_zero;\n    }\n\n    void setCachedNode(NodeNum n)\n    {\n        clearCachedNode();\n        hasCachedNode = true;\n        cachedNodeNum = n;\n        cachedNode.num = n;\n        cachedNode.has_user = true;\n    }\n\n  private:\n    bool hasCachedNode = false;\n    NodeNum cachedNodeNum = 0;\n    meshtastic_NodeInfoLite cachedNode = meshtastic_NodeInfoLite_init_zero;\n};\n\nclass MockRadioInterface : public RadioInterface\n{\n  public:\n    ErrorCode send(meshtastic_MeshPacket *p) override\n    {\n        packetPool.release(p);\n        return ERRNO_OK;\n    }\n\n    uint32_t getPacketTime(uint32_t totalPacketLen, bool received = false) override\n    {\n        (void)totalPacketLen;\n        (void)received;\n        return 0;\n    }\n};\n\nclass MockRouter : public Router\n{\n  public:\n    ~MockRouter()\n    {\n        // Router allocates a global crypt lock in its constructor.\n        // Clean it up here so each test can build a fresh mock router.\n        delete cryptLock;\n        cryptLock = nullptr;\n    }\n\n    ErrorCode send(meshtastic_MeshPacket *p) override\n    {\n        sentPackets.push_back(*p);\n        packetPool.release(p);\n        return ERRNO_OK;\n    }\n\n    std::vector<meshtastic_MeshPacket> sentPackets;\n};\n\nclass TrafficManagementModuleTestShim : public TrafficManagementModule\n{\n  public:\n    using TrafficManagementModule::alterReceived;\n    using TrafficManagementModule::handleReceived;\n    using TrafficManagementModule::resetEpoch;\n    using TrafficManagementModule::runOnce;\n\n    bool ignoreRequestFlag() const { return ignoreRequest; }\n};\n\nMockNodeDB *mockNodeDB = nullptr;\n\nstatic void resetTrafficConfig()\n{\n    moduleConfig = meshtastic_LocalModuleConfig_init_zero;\n    moduleConfig.has_traffic_management = true;\n    moduleConfig.traffic_management = meshtastic_ModuleConfig_TrafficManagementConfig_init_zero;\n    moduleConfig.traffic_management.enabled = true;\n\n    config = meshtastic_LocalConfig_init_zero;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n\n    myNodeInfo.my_node_num = kLocalNode;\n\n    router = nullptr;\n    service = nullptr;\n\n    mockNodeDB->resetNodes();\n    mockNodeDB->clearCachedNode();\n    nodeDB = mockNodeDB;\n}\n\nstatic meshtastic_MeshPacket makeDecodedPacket(meshtastic_PortNum port, NodeNum from, NodeNum to = NODENUM_BROADCAST)\n{\n    meshtastic_MeshPacket packet = meshtastic_MeshPacket_init_zero;\n    packet.from = from;\n    packet.to = to;\n    packet.id = 0x1001;\n    packet.channel = 0;\n    packet.hop_start = 3;\n    packet.hop_limit = 3;\n    packet.which_payload_variant = meshtastic_MeshPacket_decoded_tag;\n    packet.decoded.portnum = port;\n    packet.decoded.has_bitfield = true;\n    packet.decoded.bitfield = 0;\n    return packet;\n}\n\nstatic meshtastic_MeshPacket makeUnknownPacket(NodeNum from, NodeNum to = NODENUM_BROADCAST)\n{\n    meshtastic_MeshPacket packet = meshtastic_MeshPacket_init_zero;\n    packet.from = from;\n    packet.to = to;\n    packet.id = 0x2001;\n    packet.channel = 0;\n    packet.hop_start = 3;\n    packet.hop_limit = 3;\n    packet.which_payload_variant = meshtastic_MeshPacket_encrypted_tag;\n    packet.encrypted.size = 0;\n    return packet;\n}\n\nstatic meshtastic_MeshPacket makePositionPacket(NodeNum from, int32_t lat, int32_t lon, NodeNum to = NODENUM_BROADCAST)\n{\n    meshtastic_MeshPacket packet = makeDecodedPacket(meshtastic_PortNum_POSITION_APP, from, to);\n    meshtastic_Position pos = meshtastic_Position_init_zero;\n    pos.has_latitude_i = true;\n    pos.has_longitude_i = true;\n    pos.latitude_i = lat;\n    pos.longitude_i = lon;\n\n    packet.decoded.payload.size =\n        pb_encode_to_bytes(packet.decoded.payload.bytes, sizeof(packet.decoded.payload.bytes), &meshtastic_Position_msg, &pos);\n    return packet;\n}\n\nstatic meshtastic_MeshPacket makeNodeInfoPacket(NodeNum from, const char *longName, const char *shortName)\n{\n    meshtastic_MeshPacket packet = makeDecodedPacket(meshtastic_PortNum_NODEINFO_APP, from, NODENUM_BROADCAST);\n\n    meshtastic_User user = meshtastic_User_init_zero;\n    snprintf(user.id, sizeof(user.id), \"!%08x\", from);\n    strncpy(user.long_name, longName, sizeof(user.long_name) - 1);\n    strncpy(user.short_name, shortName, sizeof(user.short_name) - 1);\n\n    packet.decoded.payload.size =\n        pb_encode_to_bytes(packet.decoded.payload.bytes, sizeof(packet.decoded.payload.bytes), &meshtastic_User_msg, &user);\n    return packet;\n}\n\n/**\n * Verify the module is a no-op when traffic management is disabled.\n * Important so config toggles cannot accidentally change routing behavior.\n */\nstatic void test_tm_moduleDisabled_doesNothing(void)\n{\n    moduleConfig.has_traffic_management = false;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode);\n\n    ProcessMessage result = module.handleReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.packets_inspected);\n    TEST_ASSERT_EQUAL_UINT32(0, stats.unknown_packet_drops);\n    TEST_ASSERT_FALSE(module.ignoreRequestFlag());\n}\n\n/**\n * Verify unknown-packet dropping uses N+1 threshold semantics.\n * Important to catch off-by-one regressions in drop decisions.\n */\nstatic void test_tm_unknownPackets_dropOnNPlusOne(void)\n{\n    moduleConfig.traffic_management.drop_unknown_enabled = true;\n    moduleConfig.traffic_management.unknown_packet_threshold = 2;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeUnknownPacket(kRemoteNode);\n\n    ProcessMessage r1 = module.handleReceived(packet);\n    ProcessMessage r2 = module.handleReceived(packet);\n    ProcessMessage r3 = module.handleReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r3));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.unknown_packet_drops);\n    TEST_ASSERT_EQUAL_UINT32(3, stats.packets_inspected);\n    TEST_ASSERT_TRUE(module.ignoreRequestFlag());\n}\n\n/**\n * Verify duplicate position broadcasts inside the dedup window are dropped.\n * Important because this is the primary airtime-saving behavior.\n */\nstatic void test_tm_positionDedup_dropsDuplicateWithinWindow(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket second = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(second);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_GREATER_THAN_UINT32(0, first.decoded.payload.size);\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.position_dedup_drops);\n    TEST_ASSERT_TRUE(module.ignoreRequestFlag());\n}\n\n/**\n * Verify changed coordinates are forwarded even with dedup enabled.\n * Important so real movement updates are never suppressed as duplicates.\n */\nstatic void test_tm_positionDedup_allowsMovedPosition(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket moved = makePositionPacket(kRemoteNode, 384221234, -1210845678);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(moved);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.position_dedup_drops);\n}\n\n/**\n * Verify rate limiting drops only after exceeding the configured threshold.\n * Important to protect threshold semantics from off-by-one regressions.\n */\nstatic void test_tm_rateLimit_dropsOnlyAfterThreshold(void)\n{\n    moduleConfig.traffic_management.rate_limit_enabled = true;\n    moduleConfig.traffic_management.rate_limit_window_secs = 60;\n    moduleConfig.traffic_management.rate_limit_max_packets = 3;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode);\n\n    ProcessMessage r1 = module.handleReceived(packet);\n    ProcessMessage r2 = module.handleReceived(packet);\n    ProcessMessage r3 = module.handleReceived(packet);\n    ProcessMessage r4 = module.handleReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r3));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r4));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.rate_limit_drops);\n    TEST_ASSERT_TRUE(module.ignoreRequestFlag());\n}\n\n/**\n * Verify routing/admin traffic is exempt from rate limiting.\n * Important because throttling control traffic can destabilize the mesh.\n */\nstatic void test_tm_rateLimit_skipsRoutingAndAdminPorts(void)\n{\n    moduleConfig.traffic_management.rate_limit_enabled = true;\n    moduleConfig.traffic_management.rate_limit_window_secs = 60;\n    moduleConfig.traffic_management.rate_limit_max_packets = 1;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket routingPacket = makeDecodedPacket(meshtastic_PortNum_ROUTING_APP, kRemoteNode);\n    meshtastic_MeshPacket adminPacket = makeDecodedPacket(meshtastic_PortNum_ADMIN_APP, kRemoteNode);\n\n    for (int i = 0; i < 4; i++) {\n        ProcessMessage rr = module.handleReceived(routingPacket);\n        ProcessMessage ar = module.handleReceived(adminPacket);\n        TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(rr));\n        TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(ar));\n    }\n\n    meshtastic_TrafficManagementStats stats = module.getStats();\n    TEST_ASSERT_EQUAL_UINT32(0, stats.rate_limit_drops);\n}\n\n/**\n * Verify packets sourced from this node bypass dedup and rate limiting.\n * Important so local transmissions are not accidentally self-throttled.\n */\nstatic void test_tm_fromUs_bypassesPositionAndRateFilters(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    moduleConfig.traffic_management.rate_limit_enabled = true;\n    moduleConfig.traffic_management.rate_limit_window_secs = 60;\n    moduleConfig.traffic_management.rate_limit_max_packets = 1;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket positionPacket = makePositionPacket(kLocalNode, 374221234, -1220845678);\n    meshtastic_MeshPacket textPacket = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kLocalNode);\n\n    ProcessMessage p1 = module.handleReceived(positionPacket);\n    ProcessMessage p2 = module.handleReceived(positionPacket);\n    ProcessMessage t1 = module.handleReceived(textPacket);\n    ProcessMessage t2 = module.handleReceived(textPacket);\n\n    meshtastic_TrafficManagementStats stats = module.getStats();\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(p1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(p2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(t1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(t2));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.position_dedup_drops);\n    TEST_ASSERT_EQUAL_UINT32(0, stats.rate_limit_drops);\n}\n\n/**\n * Verify locally addressed packets are never dropped by transit shaping.\n * Important so dedup/rate limiting do not suppress end-user delivery.\n */\nstatic void test_tm_localDestination_bypassesTransitFilters(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    moduleConfig.traffic_management.rate_limit_enabled = true;\n    moduleConfig.traffic_management.rate_limit_window_secs = 60;\n    moduleConfig.traffic_management.rate_limit_max_packets = 1;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket position1 = makePositionPacket(kRemoteNode, 374221234, -1220845678, kLocalNode);\n    meshtastic_MeshPacket position2 = makePositionPacket(kRemoteNode, 374221234, -1220845678, kLocalNode);\n    meshtastic_MeshPacket text1 = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode, kLocalNode);\n    meshtastic_MeshPacket text2 = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode, kLocalNode);\n\n    ProcessMessage p1 = module.handleReceived(position1);\n    ProcessMessage p2 = module.handleReceived(position2);\n    ProcessMessage t1 = module.handleReceived(text1);\n    ProcessMessage t2 = module.handleReceived(text2);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(p1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(p2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(t1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(t2));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.position_dedup_drops);\n    TEST_ASSERT_EQUAL_UINT32(0, stats.rate_limit_drops);\n}\n\n/**\n * Verify router role clamps NodeInfo response hops to router-safe maximum.\n * Important so large config values cannot widen response scope unexpectedly.\n */\nstatic void test_tm_nodeinfo_routerClamp_skipsWhenTooManyHops(void)\n{\n    moduleConfig.traffic_management.nodeinfo_direct_response = true;\n    moduleConfig.traffic_management.nodeinfo_direct_response_max_hops = 10;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_ROUTER;\n    mockNodeDB->setCachedNode(kTargetNode);\n\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket request = makeDecodedPacket(meshtastic_PortNum_NODEINFO_APP, kRemoteNode, kTargetNode);\n    request.decoded.want_response = true;\n    request.hop_start = 5;\n    request.hop_limit = 1; // 4 hops away; router clamp should cap max at 3\n\n    ProcessMessage result = module.handleReceived(request);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.nodeinfo_cache_hits);\n    TEST_ASSERT_FALSE(module.ignoreRequestFlag());\n}\n\n/**\n * Verify NodeInfo direct-response success path and reply packet fields.\n * Important because this path consumes the request and generates a spoofed cached reply.\n */\nstatic void test_tm_nodeinfo_directResponse_respondsFromCache(void)\n{\n    moduleConfig.traffic_management.nodeinfo_direct_response = true;\n    moduleConfig.traffic_management.nodeinfo_direct_response_max_hops = 10;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    config.lora.config_ok_to_mqtt = true;\n    mockNodeDB->setCachedNode(kTargetNode);\n\n    MockRouter mockRouter;\n    mockRouter.addInterface(std::unique_ptr<RadioInterface>(new MockRadioInterface()));\n    MeshService mockService;\n    router = &mockRouter;\n    service = &mockService;\n\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket request = makeDecodedPacket(meshtastic_PortNum_NODEINFO_APP, kRemoteNode, kTargetNode);\n    request.decoded.want_response = true;\n    request.id = 0x13572468;\n    request.hop_start = 3;\n    request.hop_limit = 3; // direct request (0 hops away)\n\n    ProcessMessage result = module.handleReceived(request);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(result));\n    TEST_ASSERT_TRUE(module.ignoreRequestFlag());\n    TEST_ASSERT_EQUAL_UINT32(1, stats.nodeinfo_cache_hits);\n    TEST_ASSERT_EQUAL_UINT32(1, static_cast<uint32_t>(mockRouter.sentPackets.size()));\n\n    const meshtastic_MeshPacket &reply = mockRouter.sentPackets.front();\n    TEST_ASSERT_EQUAL_INT(meshtastic_PortNum_NODEINFO_APP, reply.decoded.portnum);\n    TEST_ASSERT_EQUAL_UINT32(kTargetNode, reply.from);\n    TEST_ASSERT_EQUAL_UINT32(kRemoteNode, reply.to);\n    TEST_ASSERT_EQUAL_UINT32(request.id, reply.decoded.request_id);\n    TEST_ASSERT_FALSE(reply.decoded.want_response);\n    TEST_ASSERT_EQUAL_UINT8(0, reply.hop_limit);\n    TEST_ASSERT_EQUAL_UINT8(0, reply.hop_start);\n    TEST_ASSERT_EQUAL_UINT8(mockNodeDB->getLastByteOfNodeNum(kRemoteNode), reply.next_hop);\n    TEST_ASSERT_TRUE(reply.decoded.has_bitfield);\n    TEST_ASSERT_EQUAL_UINT8(BITFIELD_OK_TO_MQTT_MASK, reply.decoded.bitfield);\n}\n\n/**\n * Verify cached direct replies still preserve requester NodeInfo learning.\n * Important so consuming the request does not skip NodeDB refresh for observers.\n */\nstatic void test_tm_nodeinfo_directResponse_learnsRequestorNodeInfo(void)\n{\n    moduleConfig.traffic_management.nodeinfo_direct_response = true;\n    moduleConfig.traffic_management.nodeinfo_direct_response_max_hops = 10;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    mockNodeDB->setCachedNode(kTargetNode);\n\n    MockRouter mockRouter;\n    mockRouter.addInterface(std::unique_ptr<RadioInterface>(new MockRadioInterface()));\n    MeshService mockService;\n    router = &mockRouter;\n    service = &mockService;\n\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket request = makeNodeInfoPacket(kRemoteNode, \"requester-long\", \"rq\");\n    request.to = kTargetNode;\n    request.decoded.want_response = true;\n    request.id = 0x01020304;\n    request.hop_start = 3;\n    request.hop_limit = 3;\n\n    ProcessMessage result = module.handleReceived(request);\n    meshtastic_NodeInfoLite *requestor = mockNodeDB->getMeshNode(kRemoteNode);\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(result));\n    TEST_ASSERT_NOT_NULL(requestor);\n    TEST_ASSERT_TRUE(requestor->has_user);\n    TEST_ASSERT_EQUAL_STRING(\"requester-long\", requestor->user.long_name);\n    TEST_ASSERT_EQUAL_STRING(\"rq\", requestor->user.short_name);\n    TEST_ASSERT_EQUAL_UINT8(request.channel, requestor->channel);\n}\n\n/**\n * Verify client role only answers direct (0-hop) NodeInfo requests.\n * Important so clients do not answer relayed requests outside intended scope.\n */\nstatic void test_tm_nodeinfo_clientClamp_skipsWhenNotDirect(void)\n{\n    moduleConfig.traffic_management.nodeinfo_direct_response = true;\n    moduleConfig.traffic_management.nodeinfo_direct_response_max_hops = 10;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    mockNodeDB->setCachedNode(kTargetNode);\n\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket request = makeDecodedPacket(meshtastic_PortNum_NODEINFO_APP, kRemoteNode, kTargetNode);\n    request.decoded.want_response = true;\n    request.hop_start = 2;\n    request.hop_limit = 1; // 1 hop away; clients are clamped to max 0\n\n    ProcessMessage result = module.handleReceived(request);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.nodeinfo_cache_hits);\n    TEST_ASSERT_FALSE(module.ignoreRequestFlag());\n}\n\n#if !(defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM))\n/**\n * Verify non-PSRAM builds require NodeDB for direct NodeInfo responses.\n * Important because fallback should only happen through node-wide data when\n * the dedicated PSRAM cache does not exist.\n */\nstatic void test_tm_nodeinfo_directResponse_withoutNodeDbEntry_skips(void)\n{\n    moduleConfig.traffic_management.nodeinfo_direct_response = true;\n    moduleConfig.traffic_management.nodeinfo_direct_response_max_hops = 10;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    mockNodeDB->clearCachedNode();\n\n    MockRouter mockRouter;\n    mockRouter.addInterface(std::unique_ptr<RadioInterface>(new MockRadioInterface()));\n    MeshService mockService;\n    router = &mockRouter;\n    service = &mockService;\n\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket request = makeDecodedPacket(meshtastic_PortNum_NODEINFO_APP, kRemoteNode, kTargetNode);\n    request.decoded.want_response = true;\n    request.hop_start = 3;\n    request.hop_limit = 3;\n\n    ProcessMessage result = module.handleReceived(request);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    TEST_ASSERT_FALSE(module.ignoreRequestFlag());\n    TEST_ASSERT_EQUAL_UINT32(0, stats.nodeinfo_cache_hits);\n    TEST_ASSERT_EQUAL_UINT32(0, static_cast<uint32_t>(mockRouter.sentPackets.size()));\n}\n#endif\n\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n/**\n * Verify PSRAM NodeInfo cache can answer requests without NodeDB and that\n * shouldRespondToNodeInfo() uses cached bitfield metadata.\n */\nstatic void test_tm_nodeinfo_directResponse_psramCacheRespondsAndPreservesBitfield(void)\n{\n    moduleConfig.traffic_management.nodeinfo_direct_response = true;\n    moduleConfig.traffic_management.nodeinfo_direct_response_max_hops = 10;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    config.lora.config_ok_to_mqtt = true;\n    mockNodeDB->clearCachedNode();\n\n    MockRouter mockRouter;\n    mockRouter.addInterface(std::unique_ptr<RadioInterface>(new MockRadioInterface()));\n    MeshService mockService;\n    router = &mockRouter;\n    service = &mockService;\n\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket observed = makeNodeInfoPacket(kTargetNode, \"target-long\", \"tg\");\n    observed.decoded.has_bitfield = true;\n    observed.decoded.bitfield = BITFIELD_WANT_RESPONSE_MASK;\n    observed.channel = 2;\n    observed.rx_time = 123456;\n\n    ProcessMessage observedResult = module.handleReceived(observed);\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(observedResult));\n\n    meshtastic_MeshPacket request = makeDecodedPacket(meshtastic_PortNum_NODEINFO_APP, kRemoteNode, kTargetNode);\n    request.decoded.want_response = true;\n    request.id = 0x24681357;\n    request.channel = 1;\n    request.hop_start = 3;\n    request.hop_limit = 3;\n\n    ProcessMessage result = module.handleReceived(request);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(result));\n    TEST_ASSERT_TRUE(module.ignoreRequestFlag());\n    TEST_ASSERT_EQUAL_UINT32(1, stats.nodeinfo_cache_hits);\n    TEST_ASSERT_EQUAL_UINT32(1, static_cast<uint32_t>(mockRouter.sentPackets.size()));\n\n    const meshtastic_MeshPacket &reply = mockRouter.sentPackets.front();\n    TEST_ASSERT_TRUE(reply.decoded.has_bitfield);\n    TEST_ASSERT_EQUAL_UINT8(static_cast<uint8_t>(BITFIELD_WANT_RESPONSE_MASK | BITFIELD_OK_TO_MQTT_MASK), reply.decoded.bitfield);\n    TEST_ASSERT_EQUAL_UINT32(kTargetNode, reply.from);\n    TEST_ASSERT_EQUAL_UINT32(kRemoteNode, reply.to);\n    TEST_ASSERT_EQUAL_UINT8(request.channel, reply.channel);\n    TEST_ASSERT_EQUAL_UINT32(request.id, reply.decoded.request_id);\n}\n\n/**\n * Verify PSRAM cache misses do not fall back to NodeDB.\n * Important so the dedicated PSRAM index stays logically separate from\n * NodeInfoModule/NodeDB when PSRAM is available.\n */\nstatic void test_tm_nodeinfo_directResponse_psramMissDoesNotFallbackToNodeDb(void)\n{\n    moduleConfig.traffic_management.nodeinfo_direct_response = true;\n    moduleConfig.traffic_management.nodeinfo_direct_response_max_hops = 10;\n    config.device.role = meshtastic_Config_DeviceConfig_Role_CLIENT;\n    mockNodeDB->setCachedNode(kTargetNode);\n\n    MockRouter mockRouter;\n    mockRouter.addInterface(std::unique_ptr<RadioInterface>(new MockRadioInterface()));\n    MeshService mockService;\n    router = &mockRouter;\n    service = &mockService;\n\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket request = makeDecodedPacket(meshtastic_PortNum_NODEINFO_APP, kRemoteNode, kTargetNode);\n    request.decoded.want_response = true;\n    request.hop_start = 3;\n    request.hop_limit = 3;\n\n    ProcessMessage result = module.handleReceived(request);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    TEST_ASSERT_FALSE(module.ignoreRequestFlag());\n    TEST_ASSERT_EQUAL_UINT32(0, stats.nodeinfo_cache_hits);\n    TEST_ASSERT_EQUAL_UINT32(0, static_cast<uint32_t>(mockRouter.sentPackets.size()));\n}\n#endif\n\n/**\n * Verify relayed telemetry broadcasts are hop-exhausted when enabled.\n * Important to prevent further mesh propagation while still allowing one relay step.\n */\nstatic void test_tm_alterReceived_exhaustsRelayedTelemetryBroadcast(void)\n{\n    moduleConfig.traffic_management.exhaust_hop_telemetry = true;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeDecodedPacket(meshtastic_PortNum_TELEMETRY_APP, kRemoteNode, NODENUM_BROADCAST);\n    packet.hop_start = 5;\n    packet.hop_limit = 3;\n\n    module.alterReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_UINT8(0, packet.hop_limit);\n    TEST_ASSERT_EQUAL_UINT8(3, packet.hop_start);\n    TEST_ASSERT_TRUE(module.shouldExhaustHops(packet));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.hop_exhausted_packets);\n}\n\n/**\n * Verify hop exhaustion skips unicast and local-origin packets.\n * Important to avoid mutating traffic that should retain normal forwarding behavior.\n */\nstatic void test_tm_alterReceived_skipsLocalAndUnicast(void)\n{\n    moduleConfig.traffic_management.exhaust_hop_telemetry = true;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket unicast = makeDecodedPacket(meshtastic_PortNum_TELEMETRY_APP, kRemoteNode, kTargetNode);\n    unicast.hop_start = 5;\n    unicast.hop_limit = 3;\n    module.alterReceived(unicast);\n    TEST_ASSERT_EQUAL_UINT8(3, unicast.hop_limit);\n    TEST_ASSERT_FALSE(module.shouldExhaustHops(unicast));\n\n    meshtastic_MeshPacket fromUs = makeDecodedPacket(meshtastic_PortNum_TELEMETRY_APP, kLocalNode, NODENUM_BROADCAST);\n    fromUs.hop_start = 5;\n    fromUs.hop_limit = 3;\n    module.alterReceived(fromUs);\n    TEST_ASSERT_EQUAL_UINT8(3, fromUs.hop_limit);\n    TEST_ASSERT_FALSE(module.shouldExhaustHops(fromUs));\n\n    meshtastic_TrafficManagementStats stats = module.getStats();\n    TEST_ASSERT_EQUAL_UINT32(0, stats.hop_exhausted_packets);\n}\n\n/**\n * Verify position dedup window expires and later duplicates are allowed.\n * Important so periodic identical reports can resume after cooldown.\n */\nstatic void test_tm_positionDedup_allowsDuplicateAfterIntervalExpires(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 1;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket second = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket third = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(second);\n    testDelay(1200);\n    ProcessMessage r3 = module.handleReceived(third);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r3));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.position_dedup_drops);\n}\n\n/**\n * Verify interval=0 disables position deduplication.\n * Important because this is an explicit configuration escape hatch.\n */\nstatic void test_tm_positionDedup_intervalZero_neverDrops(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 0;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket second = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(second);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.position_dedup_drops);\n}\n\n/**\n * Verify precision values above 32 fall back to default precision.\n * Important so invalid config uses the documented default behavior.\n */\nstatic void test_tm_positionDedup_precisionAbove32_usesDefaultPrecision(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 99;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket second = makePositionPacket(kRemoteNode, 384221234, -1210845678);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(second);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.position_dedup_drops);\n}\n\n/**\n * Verify precision=32 does not collapse all positions to one fingerprint.\n * Important to prevent false duplicate drops at the full-precision boundary.\n */\nstatic void test_tm_positionDedup_precision32_allowsDistinctPositions(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 32;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket second = makePositionPacket(kRemoteNode, 374221235, -1220845677);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(second);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.position_dedup_drops);\n}\n\n/**\n * Verify invalid precision=0 is treated as full precision.\n * Important so invalid config does not collapse all positions into one fingerprint.\n */\nstatic void test_tm_positionDedup_precisionZero_allowsDistinctPositions(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 0;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket second = makePositionPacket(kRemoteNode, 374221235, -1220845677);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(second);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.position_dedup_drops);\n}\n\n/**\n * Verify epoch reset invalidates stale position identity for dedup.\n * Important so reset paths cannot leak prior packet identity into new windows.\n */\nstatic void test_tm_positionDedup_epochReset_doesNotDropFirstPacketAfterReset(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket afterReset = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n    meshtastic_MeshPacket duplicate = makePositionPacket(kRemoteNode, 374221234, -1220845678);\n\n    ProcessMessage r1 = module.handleReceived(first);\n    module.resetEpoch(millis());\n    ProcessMessage r2 = module.handleReceived(afterReset);\n    ProcessMessage r3 = module.handleReceived(duplicate);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r3));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.position_dedup_drops);\n}\n\n/**\n * Verify non-position cache state does not make the first fingerprint-0 position look duplicated.\n * Important so unified cache entries from other features cannot leak into dedup decisions.\n */\nstatic void test_tm_positionDedup_priorRateState_doesNotDropFirstFingerprintZero(void)\n{\n    moduleConfig.traffic_management.position_dedup_enabled = true;\n    moduleConfig.traffic_management.position_precision_bits = 16;\n    moduleConfig.traffic_management.position_min_interval_secs = 300;\n    moduleConfig.traffic_management.rate_limit_enabled = true;\n    moduleConfig.traffic_management.rate_limit_window_secs = 60;\n    moduleConfig.traffic_management.rate_limit_max_packets = 10;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket text = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode);\n    meshtastic_MeshPacket first = makePositionPacket(kRemoteNode, 0x12300000, 0x45600000);\n    meshtastic_MeshPacket duplicate = makePositionPacket(kRemoteNode, 0x12300000, 0x45600000);\n\n    ProcessMessage seeded = module.handleReceived(text);\n    ProcessMessage r1 = module.handleReceived(first);\n    ProcessMessage r2 = module.handleReceived(duplicate);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(seeded));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.position_dedup_drops);\n}\n\n/**\n * Verify rate-limit counters reset after the window expires.\n * Important so temporary bursts do not cause persistent throttling.\n */\nstatic void test_tm_rateLimit_resetsAfterWindowExpires(void)\n{\n    moduleConfig.traffic_management.rate_limit_enabled = true;\n    moduleConfig.traffic_management.rate_limit_window_secs = 1;\n    moduleConfig.traffic_management.rate_limit_max_packets = 1;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode);\n\n    ProcessMessage r1 = module.handleReceived(packet);\n    ProcessMessage r2 = module.handleReceived(packet);\n    testDelay(1200);\n    ProcessMessage r3 = module.handleReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r3));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.rate_limit_drops);\n}\n\n/**\n * Verify rate-limit thresholds above 255 effectively clamp to 255.\n * Important because counters are uint8_t and must not overflow behavior.\n */\nstatic void test_tm_rateLimit_thresholdAbove255_clamps(void)\n{\n    moduleConfig.traffic_management.rate_limit_enabled = true;\n    moduleConfig.traffic_management.rate_limit_window_secs = 60;\n    moduleConfig.traffic_management.rate_limit_max_packets = 300;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode);\n\n    for (int i = 0; i < 255; i++) {\n        ProcessMessage result = module.handleReceived(packet);\n        TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    }\n    ProcessMessage dropped = module.handleReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(dropped));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.rate_limit_drops);\n}\n\n/**\n * Verify unknown-packet tracking resets after its active window expires.\n * Important so old unknown traffic does not trigger delayed drops.\n */\nstatic void test_tm_unknownPackets_resetAfterWindowExpires(void)\n{\n    moduleConfig.traffic_management.drop_unknown_enabled = true;\n    moduleConfig.traffic_management.unknown_packet_threshold = 1;\n    moduleConfig.traffic_management.rate_limit_window_secs = 1;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeUnknownPacket(kRemoteNode);\n\n    ProcessMessage r1 = module.handleReceived(packet);\n    ProcessMessage r2 = module.handleReceived(packet);\n    testDelay(1200);\n    ProcessMessage r3 = module.handleReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r1));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(r2));\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(r3));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.unknown_packet_drops);\n}\n\n/**\n * Verify unknown threshold values above 255 clamp to the counter ceiling.\n * Important to align config semantics with saturating counter storage.\n */\nstatic void test_tm_unknownPackets_thresholdAbove255_clamps(void)\n{\n    moduleConfig.traffic_management.drop_unknown_enabled = true;\n    moduleConfig.traffic_management.unknown_packet_threshold = 300;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeUnknownPacket(kRemoteNode);\n\n    for (int i = 0; i < 255; i++) {\n        ProcessMessage result = module.handleReceived(packet);\n        TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    }\n    ProcessMessage dropped = module.handleReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::STOP), static_cast<int>(dropped));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.unknown_packet_drops);\n}\n\n/**\n * Verify relayed position broadcasts can also be hop-exhausted.\n * Important because telemetry and position use separate exhaust flags.\n */\nstatic void test_tm_alterReceived_exhaustsRelayedPositionBroadcast(void)\n{\n    moduleConfig.traffic_management.exhaust_hop_position = true;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makePositionPacket(kRemoteNode, 374221234, -1220845678, NODENUM_BROADCAST);\n    packet.hop_start = 5;\n    packet.hop_limit = 2;\n\n    module.alterReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_UINT8(0, packet.hop_limit);\n    TEST_ASSERT_EQUAL_UINT8(4, packet.hop_start);\n    TEST_ASSERT_TRUE(module.shouldExhaustHops(packet));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.hop_exhausted_packets);\n}\n\n/**\n * Verify hop exhaustion ignores undecoded/encrypted packets.\n * Important so we never mutate packets that were not decoded by this module.\n */\nstatic void test_tm_alterReceived_skipsUndecodedPackets(void)\n{\n    moduleConfig.traffic_management.exhaust_hop_telemetry = true;\n    TrafficManagementModuleTestShim module;\n    meshtastic_MeshPacket packet = makeUnknownPacket(kRemoteNode, NODENUM_BROADCAST);\n    packet.hop_start = 5;\n    packet.hop_limit = 3;\n\n    module.alterReceived(packet);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_UINT8(5, packet.hop_start);\n    TEST_ASSERT_EQUAL_UINT8(3, packet.hop_limit);\n    TEST_ASSERT_FALSE(module.shouldExhaustHops(packet));\n    TEST_ASSERT_EQUAL_UINT32(0, stats.hop_exhausted_packets);\n}\n\n/**\n * Verify exhaustRequested is per-packet and resets on next handleReceived().\n * Important so a prior packet cannot leak hop-exhaust state into later packets.\n */\nstatic void test_tm_alterReceived_resetExhaustFlagOnNextPacket(void)\n{\n    moduleConfig.traffic_management.exhaust_hop_telemetry = true;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket telemetry = makeDecodedPacket(meshtastic_PortNum_TELEMETRY_APP, kRemoteNode, NODENUM_BROADCAST);\n    telemetry.hop_start = 5;\n    telemetry.hop_limit = 3;\n    module.alterReceived(telemetry);\n    TEST_ASSERT_TRUE(module.shouldExhaustHops(telemetry));\n\n    meshtastic_MeshPacket text = makeDecodedPacket(meshtastic_PortNum_TEXT_MESSAGE_APP, kRemoteNode);\n    ProcessMessage result = module.handleReceived(text);\n    meshtastic_TrafficManagementStats stats = module.getStats();\n\n    TEST_ASSERT_EQUAL_INT(static_cast<int>(ProcessMessage::CONTINUE), static_cast<int>(result));\n    TEST_ASSERT_FALSE(module.shouldExhaustHops(telemetry));\n    TEST_ASSERT_EQUAL_UINT32(1, stats.hop_exhausted_packets);\n}\n\n/**\n * Verify exhaust requests are packet-scoped (from + id).\n * Important so stale state from one packet cannot influence unrelated packets\n * that pass through duplicate/rebroadcast paths before handleReceived().\n */\nstatic void test_tm_alterReceived_exhaustFlag_isPacketScoped(void)\n{\n    moduleConfig.traffic_management.exhaust_hop_telemetry = true;\n    TrafficManagementModuleTestShim module;\n\n    meshtastic_MeshPacket exhausted = makeDecodedPacket(meshtastic_PortNum_TELEMETRY_APP, kRemoteNode, NODENUM_BROADCAST);\n    exhausted.id = 0x1010;\n    exhausted.hop_start = 5;\n    exhausted.hop_limit = 3;\n    module.alterReceived(exhausted);\n\n    meshtastic_MeshPacket unrelated = makeDecodedPacket(meshtastic_PortNum_TELEMETRY_APP, kTargetNode, NODENUM_BROADCAST);\n    unrelated.id = 0x2020;\n    unrelated.hop_start = 4;\n    unrelated.hop_limit = 0;\n\n    TEST_ASSERT_TRUE(module.shouldExhaustHops(exhausted));\n    TEST_ASSERT_FALSE(module.shouldExhaustHops(unrelated));\n}\n\n/**\n * Verify runOnce() returns sleep-forever interval when module is disabled.\n * Important to ensure the maintenance thread is effectively inert when off.\n */\nstatic void test_tm_runOnce_disabledReturnsMaxInterval(void)\n{\n    moduleConfig.traffic_management.enabled = false;\n    TrafficManagementModuleTestShim module;\n\n    int32_t interval = module.runOnce();\n\n    TEST_ASSERT_EQUAL_INT32(INT32_MAX, interval);\n}\n\n/**\n * Verify runOnce() returns the maintenance cadence when enabled.\n * Important so periodic cache housekeeping continues at expected interval.\n */\nstatic void test_tm_runOnce_enabledReturnsMaintenanceInterval(void)\n{\n    TrafficManagementModuleTestShim module;\n\n    int32_t interval = module.runOnce();\n\n    TEST_ASSERT_EQUAL_INT32(60 * 1000, interval);\n}\n\n} // namespace\n\nvoid setUp(void)\n{\n    resetTrafficConfig();\n}\nvoid tearDown(void) {}\n\nTM_TEST_ENTRY void setup()\n{\n    delay(10);\n    delay(2000);\n\n    initializeTestEnvironment();\n    mockNodeDB = new MockNodeDB();\n    nodeDB = mockNodeDB;\n\n    UNITY_BEGIN();\n    RUN_TEST(test_tm_moduleDisabled_doesNothing);\n    RUN_TEST(test_tm_unknownPackets_dropOnNPlusOne);\n    RUN_TEST(test_tm_positionDedup_dropsDuplicateWithinWindow);\n    RUN_TEST(test_tm_positionDedup_allowsMovedPosition);\n    RUN_TEST(test_tm_rateLimit_dropsOnlyAfterThreshold);\n    RUN_TEST(test_tm_rateLimit_skipsRoutingAndAdminPorts);\n    RUN_TEST(test_tm_fromUs_bypassesPositionAndRateFilters);\n    RUN_TEST(test_tm_localDestination_bypassesTransitFilters);\n    RUN_TEST(test_tm_nodeinfo_routerClamp_skipsWhenTooManyHops);\n    RUN_TEST(test_tm_nodeinfo_directResponse_respondsFromCache);\n    RUN_TEST(test_tm_nodeinfo_directResponse_learnsRequestorNodeInfo);\n    RUN_TEST(test_tm_nodeinfo_clientClamp_skipsWhenNotDirect);\n#if !(defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM))\n    RUN_TEST(test_tm_nodeinfo_directResponse_withoutNodeDbEntry_skips);\n#endif\n#if defined(ARCH_ESP32) && defined(BOARD_HAS_PSRAM)\n    RUN_TEST(test_tm_nodeinfo_directResponse_psramCacheRespondsAndPreservesBitfield);\n    RUN_TEST(test_tm_nodeinfo_directResponse_psramMissDoesNotFallbackToNodeDb);\n#endif\n    RUN_TEST(test_tm_alterReceived_exhaustsRelayedTelemetryBroadcast);\n    RUN_TEST(test_tm_alterReceived_skipsLocalAndUnicast);\n    RUN_TEST(test_tm_positionDedup_allowsDuplicateAfterIntervalExpires);\n    RUN_TEST(test_tm_positionDedup_intervalZero_neverDrops);\n    RUN_TEST(test_tm_positionDedup_precisionAbove32_usesDefaultPrecision);\n    RUN_TEST(test_tm_positionDedup_precision32_allowsDistinctPositions);\n    RUN_TEST(test_tm_positionDedup_precisionZero_allowsDistinctPositions);\n    RUN_TEST(test_tm_positionDedup_epochReset_doesNotDropFirstPacketAfterReset);\n    RUN_TEST(test_tm_positionDedup_priorRateState_doesNotDropFirstFingerprintZero);\n    RUN_TEST(test_tm_rateLimit_resetsAfterWindowExpires);\n    RUN_TEST(test_tm_rateLimit_thresholdAbove255_clamps);\n    RUN_TEST(test_tm_unknownPackets_resetAfterWindowExpires);\n    RUN_TEST(test_tm_unknownPackets_thresholdAbove255_clamps);\n    RUN_TEST(test_tm_alterReceived_exhaustsRelayedPositionBroadcast);\n    RUN_TEST(test_tm_alterReceived_skipsUndecodedPackets);\n    RUN_TEST(test_tm_alterReceived_resetExhaustFlagOnNextPacket);\n    RUN_TEST(test_tm_alterReceived_exhaustFlag_isPacketScoped);\n    RUN_TEST(test_tm_runOnce_disabledReturnsMaxInterval);\n    RUN_TEST(test_tm_runOnce_enabledReturnsMaintenanceInterval);\n    exit(UNITY_END());\n}\n\nTM_TEST_ENTRY void loop() {}\n\n#else\n\nvoid setUp(void) {}\nvoid tearDown(void) {}\n\nTM_TEST_ENTRY void setup()\n{\n    initializeTestEnvironment();\n    UNITY_BEGIN();\n    exit(UNITY_END());\n}\n\nTM_TEST_ENTRY void loop() {}\n\n#endif\n"
  },
  {
    "path": "test/test_transmit_history/test_main.cpp",
    "content": "#include \"TestUtil.h\"\n#include \"TransmitHistory.h\"\n#include <Throttle.h>\n#include <unity.h>\n\n// Reset the singleton between tests\nstatic void resetTransmitHistory()\n{\n    if (transmitHistory) {\n        delete transmitHistory;\n        transmitHistory = nullptr;\n    }\n    transmitHistory = TransmitHistory::getInstance();\n}\n\nvoid setUp(void)\n{\n    resetTransmitHistory();\n}\n\nvoid tearDown(void) {}\n\nstatic void test_setLastSentToMesh_stores_millis()\n{\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_NODEINFO_APP);\n\n    uint32_t result = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP);\n    TEST_ASSERT_NOT_EQUAL(0, result);\n\n    // The stored millis value should be very close to current millis()\n    uint32_t diff = millis() - result;\n    TEST_ASSERT_LESS_OR_EQUAL(100, diff); // Within 100ms\n}\n\nstatic void test_set_overwrites_previous_value()\n{\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_TELEMETRY_APP);\n    uint32_t first = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_TELEMETRY_APP);\n\n    testDelay(50);\n\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_TELEMETRY_APP);\n    uint32_t second = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_TELEMETRY_APP);\n\n    // The second value should be newer (larger millis)\n    TEST_ASSERT_GREATER_THAN(first, second);\n}\n\n// --- Throttle integration ---\n\nstatic void test_throttle_blocks_within_interval()\n{\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_NODEINFO_APP);\n    uint32_t lastMs = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP);\n\n    // Should be within a 10-minute interval (just set it)\n    bool withinInterval = Throttle::isWithinTimespanMs(lastMs, 10 * 60 * 1000);\n    TEST_ASSERT_TRUE(withinInterval);\n}\n\nstatic void test_throttle_allows_after_interval()\n{\n    // Unknown key returns 0 — throttle should NOT block\n    uint32_t lastMs = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP);\n    TEST_ASSERT_EQUAL_UINT32(0, lastMs);\n\n    // When lastMs == 0, the module check `lastMs == 0 || !isWithinTimespan` allows sending\n    bool shouldSend = (lastMs == 0) || !Throttle::isWithinTimespanMs(lastMs, 10 * 60 * 1000);\n    TEST_ASSERT_TRUE(shouldSend);\n}\n\nstatic void test_throttle_blocks_after_set_then_zero_does_not()\n{\n    // Set it — now throttle should block\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_TELEMETRY_APP);\n    uint32_t lastMs = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_TELEMETRY_APP);\n    bool shouldSend = (lastMs == 0) || !Throttle::isWithinTimespanMs(lastMs, 60 * 60 * 1000);\n    TEST_ASSERT_FALSE(shouldSend); // Should be blocked (within 1hr interval)\n\n    // Different key — should allow\n    uint32_t otherMs = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_POSITION_APP);\n    bool otherShouldSend = (otherMs == 0) || !Throttle::isWithinTimespanMs(otherMs, 60 * 60 * 1000);\n    TEST_ASSERT_TRUE(otherShouldSend);\n}\n\n// --- Multiple keys ---\n\nstatic void test_multiple_keys_stored_independently()\n{\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_NODEINFO_APP);\n    uint32_t nodeInfoInitial = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP);\n    testDelay(20);\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_POSITION_APP);\n    uint32_t positionInitial = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_POSITION_APP);\n    testDelay(20);\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_TELEMETRY_APP);\n\n    uint32_t nodeInfo = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP);\n    uint32_t position = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_POSITION_APP);\n    uint32_t telemetry = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_TELEMETRY_APP);\n\n    // All should be non-zero\n    TEST_ASSERT_NOT_EQUAL(0, nodeInfo);\n    TEST_ASSERT_NOT_EQUAL(0, position);\n    TEST_ASSERT_NOT_EQUAL(0, telemetry);\n\n    // Updating other keys should not overwrite earlier key timestamps\n    TEST_ASSERT_EQUAL_UINT32(nodeInfoInitial, nodeInfo);\n    TEST_ASSERT_EQUAL_UINT32(positionInitial, position);\n}\n\n// --- Singleton ---\n\nstatic void test_getInstance_returns_same_instance()\n{\n    TransmitHistory *a = TransmitHistory::getInstance();\n    TransmitHistory *b = TransmitHistory::getInstance();\n    TEST_ASSERT_EQUAL_PTR(a, b);\n}\n\nstatic void test_getInstance_creates_global()\n{\n    if (transmitHistory) {\n        delete transmitHistory;\n        transmitHistory = nullptr;\n    }\n    TEST_ASSERT_NULL(transmitHistory);\n\n    TransmitHistory::getInstance();\n    TEST_ASSERT_NOT_NULL(transmitHistory);\n}\n\n// --- Persistence round-trip (loadFromDisk / saveToDisk) ---\n\nstatic void test_save_and_load_round_trip()\n{\n    // Set some values\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_NODEINFO_APP);\n    testDelay(10);\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_POSITION_APP);\n\n    uint32_t nodeInfoEpoch = transmitHistory->getLastSentToMeshEpoch(meshtastic_PortNum_NODEINFO_APP);\n    uint32_t positionEpoch = transmitHistory->getLastSentToMeshEpoch(meshtastic_PortNum_POSITION_APP);\n\n    // Force save\n    transmitHistory->saveToDisk();\n\n    // Reset and reload\n    delete transmitHistory;\n    transmitHistory = nullptr;\n    transmitHistory = TransmitHistory::getInstance();\n    transmitHistory->loadFromDisk();\n\n    // Epoch values should be restored (if RTC was available when set)\n    uint32_t restoredNodeInfo = transmitHistory->getLastSentToMeshEpoch(meshtastic_PortNum_NODEINFO_APP);\n    uint32_t restoredPosition = transmitHistory->getLastSentToMeshEpoch(meshtastic_PortNum_POSITION_APP);\n\n    TEST_ASSERT_EQUAL_UINT32(nodeInfoEpoch, restoredNodeInfo);\n    TEST_ASSERT_EQUAL_UINT32(positionEpoch, restoredPosition);\n\n    // After loadFromDisk, millis should be seeded (non-zero) for stored entries\n    uint32_t restoredMillis = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP);\n    if (restoredNodeInfo > 0) {\n        // If epoch was stored, millis should be seeded from load\n        TEST_ASSERT_NOT_EQUAL(0, restoredMillis);\n    }\n}\n\n// --- Boot without RTC scenario ---\n\nstatic void test_load_seeds_millis_even_without_rtc()\n{\n    // This tests the critical crash-reboot scenario:\n    // After loadFromDisk(), even if getTime() returns 0 (no RTC),\n    // lastMillis should be seeded so throttle blocks immediate re-broadcast.\n\n    transmitHistory->setLastSentToMesh(meshtastic_PortNum_NODEINFO_APP);\n    transmitHistory->saveToDisk();\n\n    // Simulate reboot: destroy and recreate\n    delete transmitHistory;\n    transmitHistory = nullptr;\n    transmitHistory = TransmitHistory::getInstance();\n    transmitHistory->loadFromDisk();\n\n    // The key insight: after load, getLastSentToMeshMillis should return non-zero\n    // because loadFromDisk seeds lastMillis[key] = millis() for every loaded entry.\n    // This ensures throttle works even without RTC.\n    uint32_t result = transmitHistory->getLastSentToMeshMillis(meshtastic_PortNum_NODEINFO_APP);\n\n    uint32_t epoch = transmitHistory->getLastSentToMeshEpoch(meshtastic_PortNum_NODEINFO_APP);\n    if (epoch > 0) {\n        // Data was persisted — millis must be seeded\n        TEST_ASSERT_NOT_EQUAL(0, result);\n\n        // And it should cause throttle to block (treating as \"just sent\")\n        bool withinInterval = Throttle::isWithinTimespanMs(result, 10 * 60 * 1000);\n        TEST_ASSERT_TRUE(withinInterval);\n    }\n    // If epoch == 0, RTC wasn't available — no data was saved, so nothing to restore.\n    // This is expected on platforms without RTC during the very first boot.\n}\n\nvoid setup()\n{\n    initializeTestEnvironment();\n\n    UNITY_BEGIN();\n\n    RUN_TEST(test_setLastSentToMesh_stores_millis);\n    RUN_TEST(test_set_overwrites_previous_value);\n\n    RUN_TEST(test_throttle_blocks_within_interval);\n    RUN_TEST(test_throttle_allows_after_interval);\n    RUN_TEST(test_throttle_blocks_after_set_then_zero_does_not);\n\n    RUN_TEST(test_multiple_keys_stored_independently);\n\n    // Singleton\n    RUN_TEST(test_getInstance_returns_same_instance);\n    RUN_TEST(test_getInstance_creates_global);\n\n    // Persistence\n    RUN_TEST(test_save_and_load_round_trip);\n    RUN_TEST(test_load_seeds_millis_even_without_rtc);\n\n    exit(UNITY_END());\n}\n\nvoid loop() {}\n"
  },
  {
    "path": "userPrefs.jsonc",
    "content": "{\n  // \"USERPREFS_BUTTON_PIN\": \"36\",\n  // \"USERPREFS_CHANNELS_TO_WRITE\": \"3\",\n  // \"USERPREFS_CHANNEL_0_DOWNLINK_ENABLED\": \"false\",\n  // \"USERPREFS_CHANNEL_0_NAME\": \"REPLACEME\",\n  // \"USERPREFS_CHANNEL_0_PRECISION\": \"14\",\n  // \"USERPREFS_CHANNEL_0_PSK\": \"{ 0x38, 0x4b, 0xbc, 0xc0, 0x1d, 0xc0, 0x22, 0xd1, 0x81, 0xbf, 0x36, 0xb8, 0x61, 0x21, 0xe1, 0xfb, 0x96, 0xb7, 0x2e, 0x55, 0xbf, 0x74, 0x22, 0x7e, 0x9d, 0x6a, 0xfb, 0x48, 0xd6, 0x4c, 0xb1, 0xa1 }\",\n  // \"USERPREFS_CHANNEL_0_UPLINK_ENABLED\": \"true\",\n  // \"USERPREFS_CHANNEL_1_DOWNLINK_ENABLED\": \"false\",\n  // \"USERPREFS_CHANNEL_1_NAME\": \"NodeChat\",\n  // \"USERPREFS_CHANNEL_1_PRECISION\": \"14\",\n  // \"USERPREFS_CHANNEL_1_PSK\": \"{ 0x4e, 0x22, 0x1d, 0x8b, 0xc3, 0x09, 0x1b, 0xe2, 0x11, 0x9c, 0x89, 0x12, 0xf2, 0x25, 0x19, 0x5d, 0x15, 0x3e, 0x30, 0x7b, 0x86, 0xb6, 0xec, 0xc4, 0x6a, 0xc3, 0x96, 0x5e, 0x9e, 0x10, 0x9d, 0xd5 }\",\n  // \"USERPREFS_CHANNEL_1_UPLINK_ENABLED\": \"false\",\n  // \"USERPREFS_CHANNEL_2_DOWNLINK_ENABLED\": \"false\",\n  // \"USERPREFS_CHANNEL_2_NAME\": \"YardSale\",\n  // \"USERPREFS_CHANNEL_2_PRECISION\": \"14\",\n  // \"USERPREFS_CHANNEL_2_PSK\": \"{ 0x15, 0x6f, 0xfe, 0x46, 0xd4, 0x56, 0x63, 0x8a, 0x54, 0x43, 0x13, 0xf2, 0xef, 0x6c, 0x63, 0x89, 0xf0, 0x06, 0x30, 0x52, 0xce, 0x36, 0x5e, 0xb1, 0xe8, 0xbb, 0x86, 0xe6, 0x26, 0x5b, 0x1d, 0x58 }\",\n  // \"USERPREFS_CHANNEL_2_UPLINK_ENABLED\": \"false\",\n  // \"USERPREFS_CONFIG_GPS_MODE\": \"meshtastic_Config_PositionConfig_GpsMode_ENABLED\",\n  // \"USERPREFS_CONFIG_LORA_IGNORE_MQTT\": \"true\",\n  // \"USERPREFS_LORA_TX_DISABLED\": \"1\", // If set, forces config.lora.tx_enabled=false during lora bootstrap\n  // \"USERPREFS_CONFIG_LORA_REGION\": \"meshtastic_Config_LoRaConfig_RegionCode_US\",\n  // \"USERPREFS_CONFIG_OWNER_LONG_NAME\": \"My Long Name\",\n  // \"USERPREFS_CONFIG_OWNER_SHORT_NAME\": \"MLN\",\n  // \"USERPREFS_CONFIG_DEVICE_ROLE\": \"meshtastic_Config_DeviceConfig_Role_CLIENT\", // Defaults to CLIENT. ROUTER*, and LOST AND FOUND roles are restricted.\n  // \"USERPREFS_EVENT_MODE\": \"1\",\n  // \"USERPREFS_FIRMWARE_EDITION\": \"meshtastic_FirmwareEdition_BURNING_MAN\",\n  // \"USERPREFS_FIXED_BLUETOOTH\": \"121212\",\n  // \"USERPREFS_FIXED_GPS\": \"\",\n  // \"USERPREFS_FIXED_GPS_ALT\": \"0\",\n  // \"USERPREFS_FIXED_GPS_LAT\": \"48.85873920\",\n  // \"USERPREFS_FIXED_GPS_LON\": \"2.294508368\",\n  // \"USERPREFS_CONFIG_SMART_POSITION_ENABLED\": \"false\",\n  // \"USERPREFS_CONFIG_GPS_UPDATE_INTERVAL\": \"600\",\n  // \"USERPREFS_CONFIG_POSITION_BROADCAST_INTERVAL\": \"1800\",\n  // \"USERPREFS_CONFIG_DEVICE_TELEM_UPDATE_INTERVAL\": \"900\", // Device telemetry update interval in seconds\n  // \"USERPREFS_LORACONFIG_CHANNEL_NUM\": \"31\",\n  // \"USERPREFS_LORACONFIG_MODEM_PRESET\": \"meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST\",\n  // \"USERPREFS_USE_ADMIN_KEY_0\": \"{ 0xcd, 0xc0, 0xb4, 0x3c, 0x53, 0x24, 0xdf, 0x13, 0xca, 0x5a, 0xa6, 0x0c, 0x0d, 0xec, 0x85, 0x5a, 0x4c, 0xf6, 0x1a, 0x96, 0x04, 0x1a, 0x3e, 0xfc, 0xbb, 0x8e, 0x33, 0x71, 0xe5, 0xfc, 0xff, 0x3c }\",\n  // \"USERPREFS_USE_ADMIN_KEY_1\": \"{}\",\n  // \"USERPREFS_USE_ADMIN_KEY_2\": \"{}\",\n  // \"USERPREFS_OEM_TEXT\": \"Caterham Car Club\",\n  // \"USERPREFS_OEM_FONT_SIZE\": \"0\",\n  // \"USERPREFS_OEM_IMAGE_WIDTH\": \"50\",\n  // \"USERPREFS_OEM_IMAGE_HEIGHT\": \"28\",\n  // \"USERPREFS_OEM_IMAGE_DATA\": \"{ 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xC0, 0x07, 0x80, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0x61, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x18, 0xFF, 0xFF, 0x67, 0x00, 0x00, 0x00, 0x18, 0x1F, 0xF0, 0x67, 0x00, 0x00, 0x00, 0x30, 0x1F, 0xF8, 0x33, 0x00, 0x00, 0x00, 0x30, 0x00, 0xFC, 0x31, 0x00, 0x00, 0x00, 0x60, 0x00, 0xFE, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x7E, 0x18, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x3F, 0x0C, 0x00, 0x00, 0x00, 0xC0, 0x80, 0x1F, 0x0C, 0x00, 0x00, 0x00, 0x80, 0x81, 0x1F, 0x06, 0x00, 0x00, 0x00, 0x80, 0xC1, 0x0F, 0x06, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xC3, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xE6, 0x8F, 0x01, 0x00, 0x00, 0x00, 0x00, 0xEE, 0xC7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00}\",\n  // \"USERPREFS_NETWORK_ENABLED_PROTOCOLS\": \"1\", // Enable UDP mesh\n  // \"USERPREFS_NETWORK_WIFI_ENABLED\": \"true\",\n  // \"USERPREFS_NETWORK_WIFI_SSID\": \"wifi_ssid\",\n  // \"USERPREFS_NETWORK_WIFI_PSK\": \"wifi_psk\",\n  // \"USERPREFS_MQTT_ENABLED\": \"1\",\n  // \"USERPREFS_MQTT_ADDRESS\": \"'mqtt.meshtastic.org'\",\n  // \"USERPREFS_MQTT_USERNAME\": \"meshdev\",\n  // \"USERPREFS_MQTT_PASSWORD\": \"large4cats\",\n  // \"USERPREFS_MQTT_ENCRYPTION_ENABLED\": \"true\",\n  // \"USERPREFS_MQTT_TLS_ENABLED\": \"false\",\n  // \"USERPREFS_MQTT_ROOT_TOPIC\": \"event/REPLACEME\",\n  // \"USERPREFS_RINGTONE_NAG_SECS\": \"60\",\n  // \"USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS\": \"43200\",\n  \"USERPREFS_RINGTONE_RTTTL\": \"24:d=32,o=5,b=565:f6,p,f6,4p,p,f6,p,f6,2p,p,b6,p,b6,p,b6,p,b6,p,b,p,b,p,b,p,b,p,b,p,b,p,b,p,b,1p.,2p.,p\",\n  // \"USERPREFS_NETWORK_IPV6_ENABLED\": \"1\",\n  \"USERPREFS_TZ_STRING\": \"tzplaceholder                                         \"\n}\n"
  },
  {
    "path": "variants/esp32/betafpv_2400_tx_micro/platformio.ini",
    "content": "[env:betafpv_2400_tx_micro]\nextends = esp32_base\nboard = esp32doit-devkit-v1\nboard_level = extra\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D BETAFPV_2400_TX\n  -D VTABLES_IN_FLASH=1\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -O2\n  -I variants/esp32/betafpv_2400_tx_micro\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\n;upload_port = /dev/ttyUSB0\nupload_speed = 460800\nlib_deps =\n  ${esp32_base.lib_deps}\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\n"
  },
  {
    "path": "variants/esp32/betafpv_2400_tx_micro/variant.h",
    "content": "// https://betafpv.com/products/elrs-micro-tx-module\n\n// 0.96\" OLED\n#define I2C_SDA 22\n#define I2C_SCL 32\n\n// NO GPS\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define LORA_SCK 18\n#define LORA_MISO 19\n#define LORA_MOSI 23\n#define LORA_CS 5\n#define RF95_FAN_EN 17\n\n// This is a LED_WS2812 not a standard LED\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n#define NEOPIXEL_DATA 16                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n#define BUTTON_PIN 25\n#define BUTTON_NEED_PULLUP\n\n#undef EXT_NOTIFY_OUT\n\n// SX128X 2.4 Ghz LoRa module\n#define USE_SX1280\n#define LORA_RESET 14\n#define SX128X_CS 5\n#define SX128X_DIO1 4\n#define SX128X_BUSY 21\n#define SX128X_TXEN 26\n#define SX128X_RXEN 27\n#define SX128X_RESET LORA_RESET\n#define SX128X_MAX_POWER 3\n"
  },
  {
    "path": "variants/esp32/betafpv_900_tx_nano/platformio.ini",
    "content": "[env:betafpv_900_tx_nano]\nextends = esp32_base\nboard = esp32doit-devkit-v1\nboard_level = extra\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D BETAFPV_900_TX_NANO\n  -D VTABLES_IN_FLASH=1\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -O2\n  -I variants/esp32/betafpv_900_tx_nano\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\n;upload_port = /dev/ttyUSB0\nupload_speed = 460800\n"
  },
  {
    "path": "variants/esp32/betafpv_900_tx_nano/variant.h",
    "content": "// https://betafpv.com/products/elrs-nano-tx-module\n\n// no screen\n#define HAS_SCREEN 0\n\n// NO GPS\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define USE_RF95\n\n#define LORA_SCK 18\n#define LORA_MISO 19\n#define LORA_MOSI 23\n#define LORA_CS 5\n\n#define LORA_DIO0 4\n#define LORA_RESET 14\n#define LORA_DIO1 2\n#define LORA_DIO2\n#define LORA_DIO3\n\n#define LED_POWER 16 // green - blue is at 17\n\n#define BUTTON_PIN 25\n#define BUTTON_NEED_PULLUP\n\n#undef EXT_NOTIFY_OUT\n"
  },
  {
    "path": "variants/esp32/chatter2/platformio.ini",
    "content": "; CircuitMess Chatter 2  based on ESP32-WROOM-32 (38 pins) devkit & DeeamLNK DL-LLCC68 or Heltec HT RA62 SX1262/SX1268 module\n[env:chatter2]\nextends = esp32_base\nboard = esp32doit-devkit-v1\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D CHATTER_2\n  -I variants/esp32/chatter2\n  -DMESHTASTIC_EXCLUDE_WEBSERVER=1\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1\n  -ULED_BUILTIN\n  \nlib_deps =\n  ${esp32_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n"
  },
  {
    "path": "variants/esp32/chatter2/variant.h",
    "content": "//////////////////////////////////////////////////////////////////////////////////\n//                                                                              //\n//   Have custom connections or functionality? Configure them in this section   //\n//                                                                              //\n//////////////////////////////////////////////////////////////////////////////////\n\n// Debugging\n// #define GPS_DEBUG\n\n// Lora\n#define USE_LLCC68 // Original Chatter2 with LLCC68 module\n#define USE_SX1262 // Added for when Lora module is swapped for HT-RA62\n\n#define SX126X_CS 14                 // module's NSS pin\n#define LORA_SCK 16                  // module's SCK pin\n#define LORA_MOSI 5                  // module's MOSI pin\n#define LORA_MISO 17                 // module's MISO pin\n#define SX126X_RESET RADIOLIB_NC     // module's NRST pin\n#define SX126X_BUSY 4                // module's BUSY pin works for both LLCC68 and RA-62 with cut & jumper\n#define SX126X_DIO1 18               // module's DIO1 pin\n#define SX126X_DIO2_AS_RF_SWITCH     // module's DIO2 pin\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // module's DIO pin\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_RXEN RADIOLIB_NC\n\n// External notification\n// FIXME: Check if EXT_NOTIFY_OUT actualy has any effect and removes the need for setting the external notication pin in the\n// app/preferences\n// #define EXT_NOTIFY_OUT 2 // The GPIO pin that acts as the external notification output (here we connect an LED to it)\n\n// Buzzer\n#define PIN_BUZZER 19\n// Buttons\n// #define BUTTON_PIN 36 // Use the WAKE button as the user button\n// I2C\n// #define I2C_SCL 27\n// #define I2C_SDA 26\n\n#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice\n\n// Display\n\n#define HAS_SCREEN 1 // Assume no screen present by default to prevent crash...\n\n// ST7735S TFT LCD\n#define ST7735S 1 // there are different (sub-)versions of ST7735\n#define ST7735_CS -1\n#define ST7735_RS 33  // DC\n#define ST7735_SDA 26 // MOSI\n#define ST7735_SCK 27\n#define ST7735_RESET 15\n#define ST7735_MISO -1\n#define ST7735_BUSY -1\n#define TFT_BL 32\n#define ST7735_SPI_HOST HSPI_HOST // SPI2_HOST for S3, auto may work too\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 160\n#define TFT_WIDTH 128\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_INVERT false\n#define FORCE_LOW_RES 1\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5 // fps\n#define DISPLAY_FORCE_SMALL_FONTS\n#define TFT_BACKLIGHT_ON LOW\n#define USE_TFTDISPLAY 1\n\n// Battery\n\n#define BATTERY_PIN 34 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO34_CHANNEL\n#define ADC_ATTENUATION                                                                                                          \\\n    ADC_ATTEN_DB_2_5       // 2_5-> 100mv-1250mv, 11-> 150mv-3100mv for ESP32\n                           // ESP32-S2/C3/S3 are different\n                           // lower dB for lower voltage rnage\n#define ADC_MULTIPLIER 5.0 // VBATT---10k--pin34---2.5K---GND\n// Chatter2 uses 3 AAA cells\n#define OCV_ARRAY 1580, 1400, 1350, 1300, 1280, 1250, 1230, 1190, 1150, 1100, 1000\n#define NUM_CELLS 3\n#undef EXT_PWR_DETECT\n\n// GPS\n// FIXME: unsure what to define HAS_GPS as if GPS isn't always present\n#define HAS_GPS 1 // Don't need to set this to 0 to prevent a crash as it doesn't crash if GPS not found, will probe by default\n// #define PIN_GPS_EN 15\n// #define GPS_EN_ACTIVE 1\n#undef GPS_TX_PIN\n#undef GPS_RX_PIN\n#define GPS_TX_PIN 13\n#define GPS_RX_PIN 2\n\n// keyboard\n#define INPUTBROKER_SERIAL_TYPE 1\n#define KB_LOAD 21 // load values from the switch and store in shift register\n#define KB_CLK 22  // clock pin for serial data out\n#define KB_DATA 23 // data pin\n\n/////////////////////////////////////////////////////////////////////////////////\n//                                                                             //\n//   You should have no need to modify the code below, nor in pins_arduino.h   //\n//                                                                             //\n/////////////////////////////////////////////////////////////////////////////////\n\n#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src\n\n// Many of the below values would only be used if USE_RF95 was defined, but it's not as we aren't actually using an RF95, just\n// that the 4 pins above are named like it If they aren't used they don't need to be defined and doing so cause confusion to those\n// adapting this file LORA_RESET value is never used in src (as we are not using RF95), so no need to define LORA_DIO0 is not used\n// in src (as we are not using RF95) as SX1262 does not have it per SX1262 datasheet, so no need to define\n// FIXME: confirm that the linked lines below are actually only called when using the SX126x or SX128x and no other modules\n// then use SX126X_DIO1 and SX128X_DIO1 respectively for that purpose, removing the need for RF95-style LORA_* definitions when\n// the RF95 isn't used\n#define LORA_DIO1                                                                                                                \\\n    SX126X_DIO1 // The old name is used in\n                // https://github.com/meshtastic/firmware/blob/7eff5e7bcb2084499b723c5e3846c15ee089e36d/src/sleep.cpp#L298, so\n                // must also define the old name\n// LORA_DIO2 value is never used in src (as we are not using RF95), so no need to define, and if DIO2_AS_RF_SWITCH is set then it\n// cannot serve any extra function even if requested to LORA_DIO3 value is never used in src (as we are not using RF95), so no\n// need to define, and DIO3_AS_TCXO_AT_1V8 is set so it cannot serve any extra function even if requested to (from 13.3.2.1\n// DioxMask in SX1262 datasheet: Note that if DIO2 or DIO3 are used to control the RF Switch or the TCXO, the IRQ will not be\n// generated even if it is mapped to the pins.)\n"
  },
  {
    "path": "variants/esp32/diy/9m2ibr_aprs_lora_tracker/platformio.ini",
    "content": "; 9M2IBR APRS LoRa Tracker: ESP32-WROOM-32 + EBYTE E22-400M30S\n; https://shopee.com.my/product/1095224/21692283917\n[env:9m2ibr_aprs_lora_tracker]\nextends = esp32_base\nboard = esp32doit-devkit-v1\nboard_level = extra\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D PRIVATE_HW\n  -D EBYTE_E22\n  -D EBYTE_E22_900M30S ; Assume Tx power curve is identical to 900M30S as there is no documentation\n  -I variants/esp32/diy/9m2ibr_aprs_lora_tracker\n  -ULED_BUILTIN\nbuild_src_filter =\n  ${esp32_base.build_src_filter}\n  +<../variants/esp32/diy/9m2ibr_aprs_lora_tracker>"
  },
  {
    "path": "variants/esp32/diy/9m2ibr_aprs_lora_tracker/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"Arduino.h\"\n\nvoid earlyInitVariant()\n{\n    pinMode(USER_LED, OUTPUT);\n    digitalWrite(USER_LED, HIGH ^ LED_STATE_ON);\n}"
  },
  {
    "path": "variants/esp32/diy/9m2ibr_aprs_lora_tracker/variant.h",
    "content": "/*\n\n  9M2IBR APRS LoRa Tracker: ESP32-WROOM-32 + EBYTE E22-400M30S\n  https://shopee.com.my/product/1095224/21692283917\n\n  Originally developed for LoRa_APRS_iGate and GPIO is similar to\n  https://github.com/richonguzman/LoRa_APRS_iGate/blob/main/variants/ESP32_DIY_1W_LoRa_Mesh_V1_2/board_pinout.h\n\n*/\n\n// OLED (may be different controllers depending on screen size)\n#define I2C_SDA 21\n#define I2C_SCL 22\n#define HAS_SCREEN 1 // Generates randomized BLE pin\n\n// GNSS: Ai-Thinker GP-02 BDS/GNSS module\n#define GPS_RX_PIN 16\n#define GPS_TX_PIN 17\n\n// Button\n#define BUTTON_PIN 15 // Right side button - if not available, set device.button_gpio to 0 from Meshtastic client\n\n// LEDs\n#define LED_POWER 13 // Tx LED\n#define USER_LED 2   // Rx LED\n\n// Buzzer\n#define PIN_BUZZER 33\n\n// Battery sense\n#define BATTERY_PIN 35\n#define ADC_MULTIPLIER 2.01 // 100k + 100k, and add 1% tolerance\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n\n// SPI\n#define LORA_SCK 18\n#define LORA_MISO 19\n#define LORA_MOSI 23\n\n// LoRa\n#define LORA_CS 5\n#define LORA_DIO0 26          // a No connect on the SX1262/SX1268 module\n#define LORA_RESET 27         // RST for SX1276, and for SX1262/SX1268\n#define LORA_DIO1 12          // IRQ for SX1262/SX1268\n#define LORA_DIO2 RADIOLIB_NC // BUSY for SX1262/SX1268\n#define LORA_DIO3             // NC, but used as TCXO supply by E22 module\n#define LORA_RXEN 32          // RF switch RX (and E22 LNA) control by ESP32 GPIO\n#define LORA_TXEN 25          // RF switch TX (and E22 PA) control by ESP32 GPIO\n\n// RX/TX for RFM95/SX127x\n#define RF95_RXEN LORA_RXEN\n#define RF95_TXEN LORA_TXEN\n// #define RF95_TCXO <GPIO#>\n\n// common pinouts for SX126X modules\n#define SX126X_CS 5\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN LORA_RXEN\n#define SX126X_TXEN LORA_TXEN\n\n// Support alternative modules if soldered in place of E22\n#define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n#define USE_SX1268\n#define USE_LLCC68\n\n// E22 TCXO support\n#ifdef EBYTE_E22\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL\n#endif\n"
  },
  {
    "path": "variants/esp32/diy/dr-dev/platformio.ini",
    "content": "; Port to Disaster Radio's ESP32-v3 Dev Board\n[env:meshtastic-dr-dev]\ncustom_meshtastic_hw_model = 41\ncustom_meshtastic_hw_model_slug = DR_DEV\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_display_name = DR-DEV\ncustom_meshtastic_tags = DIY\n\nextends = esp32_base\nboard = esp32doit-devkit-v1\nboard_level = extra\nboard_upload.maximum_size = 4194304\nboard_upload.maximum_ram_size = 532480\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D DR_DEV\n  -D EBYTE_E22\n  -I variants/esp32/diy/dr-dev\n"
  },
  {
    "path": "variants/esp32/diy/dr-dev/variant.h",
    "content": "// Initialize i2c bus on sd_dat and esp_led pins, respectively. We need a bus to not hang on boot\n#define HAS_SCREEN 0\n#define I2C_SDA 4\n#define I2C_SCL 5\n#define BATTERY_PIN 34\n#define ADC_CHANNEL ADC1_GPIO34_CHANNEL\n\n// GPS\n#undef GPS_RX_PIN\n#define GPS_RX_PIN NOT_A_PIN\n#define HAS_GPS 0\n\n#define BUTTON_PIN 13 // The middle button GPIO on the T-Beam\n#define BUTTON_NEED_PULLUP\n#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).\n\n#define LORA_DIO0 NOT_A_PIN  // a No connect on the SX1262/SX1268 module\n#define LORA_RESET NOT_A_PIN // RST for SX1276, and for SX1262/SX1268\n#define LORA_DIO3 NOT_A_PIN  // Not connected on PCB, but internally on the SX1262/SX1268, if DIO3 is high the TXCO is enabled\n\n// In transmitting, set TXEN as high communication level，RXEN pin is low level;\n// In receiving, set RXEN as high communication level, TXEN is lowlevel;\n// Before powering off, set TXEN、RXEN as low level.\n\n#undef LORA_SCK\n#define LORA_SCK 18\n#undef LORA_MISO\n#define LORA_MISO 19\n#undef LORA_MOSI\n#define LORA_MOSI 23\n\n// PINS FOR THE 900M22S\n\n#define LORA_DIO1 26 // IRQ for SX1262/SX1268\n#define LORA_DIO2 22 // BUSY for SX1262/SX1268\n// NOT_A_PIN is treated as RADIOLIB_NC due to how they are defined, best to use RADIOLIB_NC directly\n#define LORA_TXEN RADIOLIB_NC // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level\n// E22_TXEN_CONNECTED_TO_DIO2 wasn't defined, so RXEN wasn't controlled. Commented it out to maintain behavior, but shouldn't be.\n// Need to comment out defining SX126X_RXEN as LORA_RXEN too\n// #define LORA_RXEN 17 // Input - RF switch RX control, connecting external MCU IO, valid in high level\n#undef LORA_CS\n#define LORA_CS 16\n#define SX126X_BUSY 22\n#define SX126X_CS 16\n\n// PINS FOR THE 900M30S\n/*\n#define LORA_DIO1 27  // IRQ for SX1262/SX1268\n#define LORA_DIO2 35 // BUSY for SX1262/SX1268\n#define LORA_TXEN NOT_A_PIN // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level\n#define LORA_RXEN 21  // Input - RF switch RX control, connecting external MCU IO, valid in high level\n#undef LORA_CS\n#define LORA_CS 33\n#define SX126X_BUSY 35\n#define SX126X_CS 33\n*/\n\n// RX/TX for RFM95/SX127x\n// #define RF95_RXEN LORA_RXEN\n#define RF95_TXEN LORA_TXEN\n// #define RF95_TCXO <GPIO#>\n\n// common pinouts for SX126X modules\n\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_RESET LORA_RESET\n// #define SX126X_RXEN LORA_RXEN\n#define SX126X_TXEN LORA_TXEN\n\n// supported modules list\n// #define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n// #define USE_SX1268\n// #define USE_LLCC68\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n"
  },
  {
    "path": "variants/esp32/diy/hydra/platformio.ini",
    "content": "; Hydra - Meshtastic DIY v1 hardware with some specific changes\n[env:hydra]\ncustom_meshtastic_hw_model = 39\ncustom_meshtastic_hw_model_slug = HYDRA\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Hydra\ncustom_meshtastic_tags = DIY\n\nextends = esp32_base\nboard = esp32doit-devkit-v1\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D DIY_V1\n  -I variants/esp32/diy/hydra\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32/diy/hydra/variant.h",
    "content": "// For OLED LCD\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n// For GPS, 'undef's not needed\n#define GPS_TX_PIN 15\n#define GPS_RX_PIN 12\n#define PIN_GPS_EN 4\n\n#define BUTTON_PIN 39 // The middle button GPIO on the T-Beam\n// Note: On the ESP32 base version, gpio34-39 are input-only, and do not have internal pull-ups.\n// If 39 is not being used for a button, it is suggested to remove the #define.\n#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)\n#define EXT_PWR_DETECT 4    // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards\n#define EXT_NOTIFY_OUT 12   // Overridden default pin to use for Ext Notify Module (#975).\n#define LED_POWER 2         // add status LED (compatible with core-pcb and DIY targets)\n\n// Radio\n#define USE_SX1262 // E22-900M30S uses SX1262\n#define USE_SX1268 // E22-400M30S uses SX1268\n#define SX126X_MAX_POWER                                                                                                         \\\n    22 // Outputting 22dBm from SX1262 results in ~30dBm E22-900M30S output (module only uses last stage of the YP2233W PA)\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V\n\n#define SX126X_CS 18    // EBYTE module's NSS pin\n#define SX126X_SCK 5    // EBYTE module's SCK pin\n#define SX126X_MOSI 27  // EBYTE module's MOSI pin\n#define SX126X_MISO 19  // EBYTE module's MISO pin\n#define SX126X_RESET 23 // EBYTE module's NRST pin\n#define SX126X_BUSY 32  // EBYTE module's BUSY pin\n#define SX126X_DIO1 33  // EBYTE module's DIO1 pin\n\n#define SX126X_TXEN 13 // Schematic connects EBYTE module's TXEN pin to MCU\n#define SX126X_RXEN 14 // Schematic connects EBYTE module's RXEN pin to MCU\n\n#define LORA_CS SX126X_CS       // Compatibility with variant file configuration structure\n#define LORA_SCK SX126X_SCK     // Compatibility with variant file configuration structure\n#define LORA_MOSI SX126X_MOSI   // Compatibility with variant file configuration structure\n#define LORA_MISO SX126X_MISO   // Compatibility with variant file configuration structure\n#define LORA_DIO1 SX126X_DIO1   // Compatibility with variant file configuration structure\n#define LORA_TXEN SX126X_TXEN   // Compatibility with variant file configuration structure\n#define LORA_RXEN SX126X_RXEN   // Compatibility with variant file configuration structure\n#define LORA_RESET SX126X_RESET // Compatibility with variant file configuration structure\n#define LORA_DIO2 SX126X_BUSY   // Compatibility with variant file configuration structure"
  },
  {
    "path": "variants/esp32/diy/v1/platformio.ini",
    "content": "; Meshtastic DIY v1 by Nano VHF Schematic based on ESP32-WROOM-32 (38 pins) devkit & EBYTE E22 SX1262/SX1268 module\n[env:meshtastic-diy-v1]\ncustom_meshtastic_hw_model = 39\ncustom_meshtastic_hw_model_slug = DIY_V1\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = DIY V1\ncustom_meshtastic_images = diy.svg\ncustom_meshtastic_tags = DIY\n\nextends = esp32_base\nboard = esp32doit-devkit-v1\nboard_check = true\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D DIY_V1\n  -D EBYTE_E22\n  -I variants/esp32/diy/v1\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32/diy/v1/variant.h",
    "content": "// For OLED LCD\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n// GPS\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 12\n#define GPS_TX_PIN 15\n#define GPS_UBLOX\n\n#define BUTTON_PIN 39  // The middle button GPIO on the T-Beam\n#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)\n#define EXT_PWR_DETECT 4    // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards\n#define EXT_NOTIFY_OUT 12   // Overridden default pin to use for Ext Notify Module (#975).\n#define LED_POWER 2         // add status LED (compatible with core-pcb and DIY targets)\n\n#define LORA_DIO0 26  // a No connect on the SX1262/SX1268 module\n#define LORA_RESET 23 // RST for SX1276, and for SX1262/SX1268\n#define LORA_DIO1 33  // IRQ for SX1262/SX1268\n#define LORA_DIO2 32  // BUSY for SX1262/SX1268\n#define LORA_DIO3     // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 5\n#define LORA_MISO 19\n#define LORA_MOSI 27\n#define LORA_CS 18\n\n// supported modules list\n#define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n#define USE_SX1268\n#define USE_LLCC68\n\n// common pinouts for SX126X modules\n#define SX126X_CS 18 // NSS for SX126X\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN RADIOLIB_NC // Defining the RXEN ruins RFSwitching for the E22 900M30S in RadioLib\n#define SX126X_TXEN 13\n\n// RX/TX for RFM95/SX127x\n#define RF95_RXEN 14\n#define RF95_TXEN 13\n\n// Set lora.tx_power to 13 for Hydra or other E22 900M30S target due to PA\n#define SX126X_MAX_POWER 22\n\n#ifdef EBYTE_E22\n// Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch\n// (which is the default for the sx1262interface code)\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL\n#endif\n"
  },
  {
    "path": "variants/esp32/diy/v1_1/platformio.ini",
    "content": "; Meshtastic DIY v1.1 new schematic based on ESP32-WROOM-32 & SX1262/SX1268 modules\n[env:meshtastic-diy-v1_1]\nextends = esp32_base\nboard = esp32doit-devkit-v1\nboard_level = extra\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D DIY_V1\n  -D EBYTE_E22\n  -I variants/esp32/diy/v1_1\n"
  },
  {
    "path": "variants/esp32/diy/v1_1/variant.h",
    "content": "// For OLED LCD\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n// GPS\n#undef GPS_RX_PIN\n#define GPS_RX_PIN 15\n\n#define BUTTON_PIN 2 // The middle button GPIO on the T-Beam\n#define BUTTON_NEED_PULLUP\n#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).\n\n#define LORA_DIO0 26  // a No connect on the SX1262/SX1268 module\n#define LORA_RESET 27 // RST for SX1276, and for SX1262/SX1268\n#define LORA_DIO1 33  // IRQ for SX1262/SX1268\n#define LORA_DIO2 32  // BUSY for SX1262/SX1268\n#define LORA_DIO3     // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled\n\n// In transmitting, set TXEN as high communication level，RXEN pin is low level;\n// In receiving, set RXEN as high communication level, TXEN is lowlevel;\n// Before powering off, set TXEN、RXEN as low level.\n#define LORA_RXEN 14 // Input - RF switch RX control, connecting external MCU IO, valid in high level\n#define LORA_TXEN 13 // Input - RF switch TX control, connecting external MCU IO or DIO2, valid in high level\n\n#undef LORA_SCK\n#define LORA_SCK 18\n#undef LORA_MISO\n#define LORA_MISO 19\n#undef LORA_MOSI\n#define LORA_MOSI 23\n#undef LORA_CS\n#define LORA_CS 5\n\n// RX/TX for RFM95/SX127x\n#define RF95_RXEN LORA_RXEN\n#define RF95_TXEN LORA_TXEN\n// #define RF95_TCXO <GPIO#>\n\n// common pinouts for SX126X modules\n#define SX126X_CS 5\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN LORA_RXEN\n#define SX126X_TXEN LORA_TXEN\n\n// supported modules list\n#define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n#define USE_SX1268\n#define USE_LLCC68\n\n#ifdef EBYTE_E22\n// Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch\n// (which is the default for the sx1262interface code)\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL\n#endif\n"
  },
  {
    "path": "variants/esp32/esp32-common.ini",
    "content": "; Common settings for ESP targets, mixin with extends = esp32_common\n[esp32_common]\nextends = arduino_base\ncustom_esp32_kind =\ncustom_mtjson_part =\nplatform =\n  # renovate: datasource=custom.pio depName=platformio/espressif32 packageName=platformio/platform/espressif32\n  platformio/espressif32@6.13.0\nplatform_packages =\n  # renovate: datasource=custom.pio depName=platformio/tool-mklittlefs packageName=platformio/tool/tool-mklittlefs\n  platformio/tool-mklittlefs@^1.203.210628\n\nextra_scripts =\n  ${env.extra_scripts}\n  pre:extra_scripts/esp32_pre.py\n  extra_scripts/esp32_extra.py\n\nbuild_src_filter = \n  ${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>\n\nupload_speed = 921600\ndebug_init_break = tbreak setup\nmonitor_filters = esp32_exception_decoder\n\nboard_build.filesystem = littlefs\n\n# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.\n# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h\n# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h\nbuild_unflags =\n  -fno-lto\n  # Keep explicit std unflags on ESP32; base-level unflags are not sufficient\n  # to prevent framework-injected C++11 fallback on this platform.\n  -std=c++11\n  -std=gnu++11\nbuild_flags =\n  ${arduino_base.build_flags}\n  -flto\n  -Wall\n  -Wextra\n  -Isrc/platform/esp32\n  -include mbedtls/error.h\n  -std=gnu++17\n  -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG\n  -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG\n  -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL\n  -DAXP_DEBUG_PORT=Serial\n  -DCONFIG_BT_NIMBLE_ENABLED\n  -DCONFIG_BT_NIMBLE_MAX_BONDS=6 # default is 3\n  -DCONFIG_NIMBLE_CPP_LOG_LEVEL=2\n  -DCONFIG_BT_NIMBLE_MAX_CCCDS=20\n  -DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192\n  -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING\n  -DSERIAL_BUFFER_SIZE=4096\n  -DSERIAL_HAS_ON_RECEIVE\n  -DLIBPAX_ARDUINO\n  -DLIBPAX_WIFI\n  -DLIBPAX_BLE\n  -DHAS_UDP_MULTICAST=1\n  ;-DDEBUG_HEAP\n  -DCAN_RECLOCK_I2C\n\nlib_deps =\n  ${arduino_base.lib_deps}\n  ${networking_base.lib_deps}\n  ${networking_extra.lib_deps}\n  ${environmental_base.lib_deps}\n  ${environmental_extra.lib_deps}\n  ${radiolib_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master\n  https://github.com/meshtastic/esp32_https_server/archive/b78f12c86ea65c3ca08968840ff554ff7ed69b60.zip\n  # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino\n  h2zero/NimBLE-Arduino@^1.4.3\n  # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master\n  https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip\n  # renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib\n  https://github.com/lewisxhe/XPowersLib/archive/v0.3.3.zip\n  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto\n  rweather/Crypto@0.4.0\n\nlib_ignore = \n  segger_rtt\n  ESP32 BLE Arduino\n\n; leave this commented out to avoid breaking Windows\n;upload_port = /dev/ttyUSB0\n;monitor_port = /dev/ttyUSB0\n\n; Please don't delete these lines. JM uses them.\n;upload_port = /dev/cu.SLAB_USBtoUART\n;monitor_port = /dev/cu.SLAB_USBtoUART\n\n; customize the partition table\n; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables\nboard_build.partitions = partition-table.csv\n"
  },
  {
    "path": "variants/esp32/esp32.ini",
    "content": "; Common settings for ESP32 OG (without suffix)\n; See 'esp32_common' for common ESP32-family settings\n[esp32_base]\nextends = esp32_common\ncustom_esp32_kind = esp32\n\nbuild_flags =\n  ${esp32_common.build_flags}\n  -DMESHTASTIC_EXCLUDE_AUDIO=1\n; Override lib_deps to use environmental_extra_no_bsec instead of environmental_extra\n; BSEC library uses ~3.5KB DRAM which causes overflow on original ESP32 targets\nlib_deps =\n  ${arduino_base.lib_deps}\n  ${networking_base.lib_deps}\n  ${networking_extra.lib_deps}\n  ${environmental_base.lib_deps}\n  ${environmental_extra_no_bsec.lib_deps}\n  ${radiolib_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master\n  https://github.com/meshtastic/esp32_https_server/archive/b78f12c86ea65c3ca08968840ff554ff7ed69b60.zip\n  # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino\n  h2zero/NimBLE-Arduino@^1.4.3\n  # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master\n  https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip\n  # renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib\n  https://github.com/lewisxhe/XPowersLib/archive/v0.3.3.zip\n  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto\n  rweather/Crypto@0.4.0"
  },
  {
    "path": "variants/esp32/hackerboxes_esp32_io/platformio.ini",
    "content": "[env:hackerboxes-esp32-io]\nextends = esp32_base\nboard = esp32dev\nboard_level = extra\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32/hackerboxes_esp32_io\nmonitor_speed = 115200\nupload_protocol = esptool\n;upload_port = /dev/ttyUSB0\nupload_speed = 921600"
  },
  {
    "path": "variants/esp32/hackerboxes_esp32_io/variant.h",
    "content": "#define BUTTON_PIN 0\n\n// HACKBOX LoRa IO Kit\n// Uses a ESP-32-WROOM and a RA-01SH (SX1262) LoRa Board\n\n#define LED_POWER 2    // LED\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define HAS_SCREEN 0\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define USE_SX1262\n#define LORA_SCK 18\n#define LORA_MISO 19\n#define LORA_MOSI 23\n#define LORA_CS 5\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 27\n#define LORA_DIO1 33\n#define LORA_DIO2 RADIOLIB_NC\n#define LORA_BUSY 32\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_MAX_POWER 22 // Max power of the RA-01SH is 22db"
  },
  {
    "path": "variants/esp32/heltec_v1/platformio.ini",
    "content": "[env:heltec-v1]\ncustom_meshtastic_hw_model = 11\ncustom_meshtastic_hw_model_slug = HELTEC_V1\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_display_name = Heltec V1\ncustom_meshtastic_tags = Heltec\n\n;build_type = debug ; to make it possible to step through our jtag debugger \nextends = esp32_base\nboard_level = extra\nboard = heltec_wifi_lora_32\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D HELTEC_V1\n  -I variants/esp32/heltec_v1\n"
  },
  {
    "path": "variants/esp32/heltec_v1/variant.h",
    "content": "// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine.\n// Tested on Neo6m module.\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 36\n#define GPS_TX_PIN 33\n\n#ifndef USE_JTAG  // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag\n#define I2C_SDA 4 // I2C pins for this board\n#define I2C_SCL 15\n#endif\n\n#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller\n\n#define LED_POWER 25 // If defined we will blink this LED\n#define BUTTON_PIN 0 // If defined, this will be used for user button presses\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#ifndef USE_JTAG\n#define LORA_RESET 14\n#endif\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 32 // Not really used\n\n// ratio of voltage divider = 3.20 (R1=100k, R2=220k)\n#define ADC_MULTIPLIER 3.2\n\n#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC2_GPIO13_CHANNEL\n#define BAT_MEASURE_ADC_UNIT 2"
  },
  {
    "path": "variants/esp32/heltec_v2/platformio.ini",
    "content": "[env:heltec-v2_0]\ncustom_meshtastic_hw_model = 5\ncustom_meshtastic_hw_model_slug = HELTEC_V2_0\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_display_name = Heltec V2.0\ncustom_meshtastic_tags = Heltec\n\n;build_type = debug ; to make it possible to step through our jtag debugger\nboard_level = extra\nextends = esp32_base\nboard = heltec_wifi_lora_32_V2\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D HELTEC_V2_0\n  -I variants/esp32/heltec_v2\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32/heltec_v2/variant.h",
    "content": "// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine.\n// Tested on Neo6m module.\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 36\n#define GPS_TX_PIN 33\n\n#ifndef USE_JTAG  // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag\n#define I2C_SDA 4 // I2C pins for this board\n#define I2C_SCL 15\n#endif\n\n#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller\n\n#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost\n#define LED_POWER 25   // If defined we will blink this LED\n#define BUTTON_PIN 0   // If defined, this will be used for user button presses\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#ifndef USE_JTAG\n#define LORA_RESET 14\n#endif\n#define LORA_DIO1 35 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436\n#define LORA_DIO2 34 // Not really used\n\n// ratio of voltage divider = 3.20 (R12=100k, R10=220k)\n#define ADC_MULTIPLIER 3.2\n#define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC2_GPIO13_CHANNEL\n#define BAT_MEASURE_ADC_UNIT 2"
  },
  {
    "path": "variants/esp32/heltec_v2.1/platformio.ini",
    "content": "[env:heltec-v2_1]\ncustom_meshtastic_hw_model = 10\ncustom_meshtastic_hw_model_slug = HELTEC_V2_1\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_display_name = Heltec V2.1\ncustom_meshtastic_tags = Heltec\n\nboard_level = extra\n;build_type = debug ; to make it possible to step through our jtag debugger \nextends = esp32_base\nboard = heltec_wifi_lora_32_V2\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D HELTEC_V2_1\n  -I variants/esp32/heltec_v2.1\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32/heltec_v2.1/variant.h",
    "content": "// Pin planning should refer to this document\n// https://resource.heltec.cn/download/WiFi_LoRa_32/WIFI_LoRa_32_V2.pdf\n\n// the default ESP32 Pin of 15 is the Oled SCL, 37 is battery pin.\n// Tested on Neo6m module.\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 36\n#define GPS_TX_PIN 33\n\n#define PIN_GPS_EN 37 // GPS power enable pin\n\n#ifndef USE_JTAG  // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag\n#define I2C_SDA 4 // I2C pins for this board\n#define I2C_SCL 15\n#endif\n\n#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller\n\n#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost\n#define LED_POWER 25   // If defined we will blink this LED\n#define BUTTON_PIN 0   // If defined, this will be used for user button presses\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#ifndef USE_JTAG\n#define LORA_RESET 14\n#endif\n#define LORA_DIO1 35 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436\n#define LORA_DIO2 34 // Not really used\n\n#define ADC_MULTIPLIER 3.2 // 220k + 100k (320k/100k=3.2)\n// #define ADC_WIDTH ADC_WIDTH_BIT_10\n\n#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO37_CHANNEL\n#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module."
  },
  {
    "path": "variants/esp32/heltec_wireless_bridge/platformio.ini",
    "content": "[env:heltec-wireless-bridge]\n;build_type = debug ; to make it possible to step through our jtag debugger\nextends = esp32_base\nboard_level = extra\nboard = heltec_wifi_lora_32\nbuild_flags =\n  ${esp32_base.build_flags}\n  -I variants/esp32/heltec_wireless_bridge\n  -D HELTEC_WIRELESS_BRIDGE\n  -D BOARD_HAS_PSRAM\n  -D RADIOLIB_EXCLUDE_LR11X0=1\n  -D RADIOLIB_EXCLUDE_SX128X=1\n  -D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1\n  -D MESHTASTIC_EXCLUDE_DETECTIONSENSOR=1\n  -D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1\n  -D MESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR=1\n  -D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL=1\n  -D MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1\n  -D MESHTASTIC_EXCLUDE_GPS=1\n  -D MESHTASTIC_EXCLUDE_I2C=1\n  -D MESHTASTIC_EXCLUDE_INPUTBROKER=1\n  -D MESHTASTIC_EXCLUDE_POWER_FSM=1\n  -D MESHTASTIC_EXCLUDE_SERIAL=1\n  -D MESHTASTIC_EXCLUDE_SCREEN=1\n  -D MESHTASTIC_EXCLUDE_WAYPOINT=1\n"
  },
  {
    "path": "variants/esp32/heltec_wireless_bridge/variant.h",
    "content": "\n// updated variant 20250420 berlincount, tested with HTIT-TB\n//\n// connections in HTIT-WB\n// per https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf\n// md5: a0e6ae10ff76611aa61433366b2e4f5c  esp32_datasheet_en.pdf\n// per https://resource.heltec.cn/download/Wireless_Bridge/Schematic_Diagram_HTIT-WB_V0.2.pdf\n// md5: d5c1b0219ece347dd8cee866d7d3ab0a  Schematic_Diagram_HTIT-WB_V0.2.pdf\n\n#define NO_EXT_GPIO 1\n#define NO_GPS 1\n\n#define HAS_GPS 0 // GPS is not equipped\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n// Green / Lora = PIN 22 / GPIO2, Yellow / Wifi = PIN 23 / GPIO0, Blue / BLE = PIN 25 / GPIO16\n#define LED_POWER 22\n#define WIFI_LED 23\n#define BLE_LED 25\n\n// ESP32-D0WDQ6 direct pins SX1276\n#define USE_RF95\n#define LORA_DIO0 26\n#define LORA_DIO1 35\n#define LORA_DIO2 34\n#define LORA_SCK 05\n#define LORA_MISO 19\n#define LORA_MOSI 27\n#define LORA_CS 18\n\n// several things are not possible with JTAG enabled\n#ifndef USE_JTAG\n#define LORA_RESET 14 // LoRa Reset shares a pin with MTMS\n#define I2C_SDA 4     // SD_DATA1 going to W25Q64, but\n#define I2C_SCL 15    // SD_CMD shared a pin with MTD0\n#endif\n\n// user button is present on device, but currently untested & unconfigured - couldn't figure out how it's connected\n\n// battery support is present within device, but currently untested & unconfigured - couldn't find reliable information yet\n"
  },
  {
    "path": "variants/esp32/heltec_wsl_v2.1/platformio.ini",
    "content": "[env:heltec-wsl-v2_1]\nextends = esp32_base\nboard = heltec_wireless_stick_lite\nboard_level = extra\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32/heltec_wsl_v2.1\n"
  },
  {
    "path": "variants/esp32/heltec_wsl_v2.1/variant.h",
    "content": "#define I2C_SCL SCL\n#define I2C_SDA SDA\n\n#define LED_POWER LED\n\n// active low, powers the Battery reader, but no lora antenna boost (?)\n// #define VEXT_ENABLE Vext\n// #define VEXT_ON_VALUE LOW\n\n#define BUTTON_PIN 0\n\n#define ADC_CTRL 21\n#define ADC_CTRL_ENABLED LOW\n#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_CHANNEL_1\n// ratio of voltage divider = 3.20 (R1=100k, R2=220k)\n#define ADC_MULTIPLIER 3.2\n\n#define USE_RF95 // RFM95/SX127x\n\n#define LORA_DIO0 26\n#define LORA_RESET 14\n#define LORA_DIO1 35\n#define LORA_DIO2 34\n\n#define LORA_SCK 5\n#define LORA_MISO 19\n#define LORA_MOSI 27\n#define LORA_CS 18\n"
  },
  {
    "path": "variants/esp32/m5stack_core/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 1;\nstatic const uint8_t RX = 3;\n\nstatic const uint8_t TXD2 = 17;\nstatic const uint8_t RXD2 = 16;\n\nstatic const uint8_t SDA = 21;\nstatic const uint8_t SCL = 22;\n\nstatic const uint8_t SS = 5;\nstatic const uint8_t MOSI = 23;\nstatic const uint8_t MISO = 19;\nstatic const uint8_t SCK = 18;\n\nstatic const uint8_t G23 = 23;\nstatic const uint8_t G19 = 19;\nstatic const uint8_t G18 = 18;\nstatic const uint8_t G3 = 3;\nstatic const uint8_t G16 = 16;\nstatic const uint8_t G21 = 21;\nstatic const uint8_t G2 = 2;\nstatic const uint8_t G12 = 12;\nstatic const uint8_t G15 = 15;\nstatic const uint8_t G35 = 35;\nstatic const uint8_t G36 = 36;\nstatic const uint8_t G25 = 25;\nstatic const uint8_t G26 = 26;\nstatic const uint8_t G1 = 1;\nstatic const uint8_t G17 = 17;\nstatic const uint8_t G22 = 22;\nstatic const uint8_t G5 = 5;\nstatic const uint8_t G13 = 13;\nstatic const uint8_t G0 = 0;\nstatic const uint8_t G34 = 34;\n\nstatic const uint8_t DAC1 = 25;\nstatic const uint8_t DAC2 = 26;\n\nstatic const uint8_t ADC1 = 35;\nstatic const uint8_t ADC2 = 36;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32/m5stack_core/platformio.ini",
    "content": "[env:m5stack-core]\ncustom_meshtastic_hw_model = 42\ncustom_meshtastic_hw_model_slug = M5STACK\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = M5 Stack\ncustom_meshtastic_tags = M5Stack\n\nextends = esp32_base\nboard = m5stack-core-esp32\nmonitor_filters = esp32_exception_decoder\nbuild_src_filter = \n  ${esp32_base.build_src_filter}\nbuild_flags = \n  ${esp32_base.build_flags}\n  -I variants/esp32/m5stack_core\n  -DM5STACK\n  -DMESHTASTIC_EXCLUDE_WEBSERVER=1\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1\n  -DUSER_SETUP_LOADED\n  -DTFT_SDA_READ\n  -DTFT_DRIVER=0x9341\n  -DTFT_MISO=19\n  -DTFT_MOSI=23\n  -DTFT_SCLK=18\n  -DTFT_CS=14\n  -DTFT_DC=27\n  -DTFT_RST=33\n  -DTFT_BL=32\n  -DSPI_FREQUENCY=40000000\n  -DSPI_READ_FREQUENCY=16000000\nlib_ignore =\n  m5stack-core\nlib_deps = \n  ${esp32_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n"
  },
  {
    "path": "variants/esp32/m5stack_core/variant.h",
    "content": "// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep\n\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n// #define BUTTON_PIN 39 // 38, 37\n// #define BUTTON_PIN 0\n#define BUTTON_NEED_PULLUP\n// #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.\n\n#define BUTTON_PIN 38\n\n#define PIN_BUZZER 25\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 18\n#define LORA_MISO 19\n#define LORA_MOSI 23\n#define LORA_CS 5\n\n#define USE_RF95\n#define LORA_DIO0 36 // a No connect on the SX1262 module\n#define LORA_RESET 26\n#define LORA_DIO1 RADIOLIB_NC // Not really used\n#define LORA_DIO2 RADIOLIB_NC // Not really used\n\n// This board has different GPS pins than all other boards\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 16\n#define GPS_TX_PIN 17\n\n#define ILI9341_DRIVER\n#define TFT_HEIGHT 240\n#define TFT_WIDTH 320\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_BUSY -1\n#define USE_TFTDISPLAY 1\n\n// LCD screens are slow, so slowdown the wipe so it looks better\n#define SCREEN_TRANSITION_FRAMERATE 1 // fps\n\n#define ILI9341_SPI_HOST VSPI_HOST // VSPI_HOST or HSPI_HOST\n"
  },
  {
    "path": "variants/esp32/m5stack_coreink/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define TX2 -1\n#define RX2 -1\n\nstatic const uint8_t TX = 1;\nstatic const uint8_t RX = 3;\n\nstatic const uint8_t SDA = 32;\nstatic const uint8_t SCL = 33;\n\nstatic const uint8_t SS = 9;\nstatic const uint8_t MOSI = 23;\nstatic const uint8_t MISO = 34;\nstatic const uint8_t SCK = 18;\n\nstatic const uint8_t G26 = 26;\nstatic const uint8_t G36 = 36;\nstatic const uint8_t G25 = 25;\n\nstatic const uint8_t G32 = 32;\nstatic const uint8_t G33 = 33;\n\nstatic const uint8_t G21 = 21;\nstatic const uint8_t G22 = 22;\n\nstatic const uint8_t G13 = 13;\nstatic const uint8_t G14 = 14;\n\nstatic const uint8_t G12 = 12;\nstatic const uint8_t G19 = 19;\n\nstatic const uint8_t G5 = 5;\nstatic const uint8_t G10 = 10;\nstatic const uint8_t G2 = 2;\nstatic const uint8_t G37 = 37;\nstatic const uint8_t G38 = 38;\nstatic const uint8_t G39 = 39;\n\nstatic const uint8_t DAC1 = 25;\nstatic const uint8_t DAC2 = 26;\n\nstatic const uint8_t ADC1 = 35;\nstatic const uint8_t ADC2 = 36;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32/m5stack_coreink/platformio.ini",
    "content": "[env:m5stack-coreink]\nextends = esp32_base\nboard = m5stack-coreink\nboard_check = true\nbuild_src_filter = \n  ${esp32_base.build_src_filter}\nbuild_flags = \n  ${esp32_base.build_flags}\n  -I variants/esp32/m5stack_coreink\n  ;-D RADIOLIB_VERBOSE\n  -Ofast\n  -D__MCUXPRESSO\n  -DEINK_DISPLAY_MODEL=GxEPD2_154_M09\n  -DEINK_WIDTH=200\n  -DEINK_HEIGHT=200\n  -DUSER_SETUP_LOADED\n  -DM5_COREINK \n  -DM5STACK\nlib_deps = \n  ${esp32_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\nlib_ignore =\n  m5stack-coreink\nmonitor_filters = esp32_exception_decoder\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\nupload_port = /dev/ttyACM0\n"
  },
  {
    "path": "variants/esp32/m5stack_coreink/variant.h",
    "content": "// Primary I2C Bus includes PCF8563 RTC Module\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n#define HAS_GPS 1\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n// Use Secondary I2C Bus as GPS Serial\n#define GPS_RX_PIN 33\n// #define GPS_TX_PIN 32 (now used by SX1262 BUSY as GPS works with just RX)\n\n// Green LED\n#define LED_STATE_ON 1 // State when LED is lit\n#define LED_POWER 10\n\n// PCF8563 RTC Module\n#define PCF8563_RTC 0x51\n\n// Wheel\n//  Down 37\n//  Push 38\n//  Up 39\n//  Top Physical Button 5\n\n#define BUTTON_NEED_PULLUP\n#define BUTTON_PIN 5\n\n// BUZZER\n#define PIN_BUZZER 2\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define USE_RF95\n// #define USE_SX1262\n// #define USE_SX1280\n\n#ifdef USE_RF95\n#define LORA_SCK 18\n#define LORA_MISO 34\n#define LORA_MOSI 23\n#define LORA_CS 14\n#define LORA_DIO0 25\n#define LORA_RESET 26\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC\n#endif\n\n// https://www.waveshare.com/core1262-868m.htm\n#ifdef USE_SX1262\n#define LORA_SCK 18\n#define LORA_MISO 34\n#define LORA_MOSI 23\n#define LORA_CS 14\n#define LORA_RESET 26\n#define LORA_DIO1 25\n#define LORA_DIO2 32 // 33 // (13 not working)  //BUSY pin on SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n#ifdef USE_SX1280\n#define LORA_SCK 18\n#define LORA_MISO 34\n#define LORA_MOSI 23\n#define LORA_CS 14\n#define LORA_RESET 26\n#define LORA_DIO1 25\n#define LORA_DIO2 13\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 LORA_DIO1\n#define SX128X_BUSY LORA_DIO2\n#define SX128X_RESET LORA_RESET\n#define SX128X_MAX_POWER 13 // 10\n#endif\n\n#define USE_EINK\n// https://docs.m5stack.com/en/core/coreink\n// https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/coreink/coreink_sch.pdf\n#define PIN_EINK_EN -1   // N/C\n#define PIN_EINK_CS 9    // EPD_CS\n#define PIN_EINK_BUSY 4  // EPD_BUSY\n#define PIN_EINK_DC 15   // EPD_D/C\n#define PIN_EINK_RES -1  // Connected but not needed\n#define PIN_EINK_SCLK 18 // EPD_SCLK\n#define PIN_EINK_MOSI 23 // EPD_MOSI\n\n#define BATTERY_PIN 35\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n// https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/m5paper/M5_PAPER_SCH.pdf\n// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58\n//  VBAT\n//   |\n//  R83 (3K)\n//   +\n//  R86 (11K)\n//   |\n//  GND\n// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58\n#define ADC_MULTIPLIER 5\n// https://embeddedexplorer.com/esp32-adc-esp-idf-tutorial/"
  },
  {
    "path": "variants/esp32/nano-g1/platformio.ini",
    "content": "; The 1.0 release of the nano-g1 board \n[env:nano-g1]\ncustom_meshtastic_hw_model = 14\ncustom_meshtastic_hw_model_slug = NANO_G1\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Nano G1\ncustom_meshtastic_tags = B&Q\n\nextends = esp32_base\nboard = ttgo-t-beam\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D NANO_G1\n  -I variants/esp32/nano-g1\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32/nano-g1/variant.h",
    "content": "// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep\n\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n#define BUTTON_PIN 36     // The middle button GPIO on the Nano G1\n#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.\n\n// common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if\n// not found then probe for SX1262\n#define USE_RF95\n#define USE_SX1262\n\n#define GPS_RX_PIN 34\n#define GPS_TX_PIN 12\n\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 23\n#define LORA_DIO1 33 // SX1262 IRQ\n#define LORA_DIO2 32 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n// Not really an E22\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n// Internally the module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface\n// code)\n#endif\n\n// different screen\n#define USE_SH1106"
  },
  {
    "path": "variants/esp32/nano-g1-explorer/platformio.ini",
    "content": "; The 1.0 release of the nano-g1-explorer board \n[env:nano-g1-explorer]\ncustom_meshtastic_hw_model = 17\ncustom_meshtastic_hw_model_slug = NANO_G1_EXPLORER\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Nano G1 Explorer\ncustom_meshtastic_tags = B&Q\n\nextends = esp32_base\nboard = ttgo-t-beam\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D NANO_G1_EXPLORER\n  -I variants/esp32/nano-g1-explorer\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32/nano-g1-explorer/variant.h",
    "content": "// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep\n\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n#define BUTTON_PIN 36     // The user button (information button) GPIO on the Nano G1 explorer\n#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.\n\n// common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if\n// not found then probe for SX1262\n#define USE_RF95\n#define USE_SX1262\n\n#define GPS_RX_PIN 34\n#define GPS_TX_PIN 12\n\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 23\n#define LORA_DIO1 33 // SX1262 IRQ\n#define LORA_DIO2 32 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n// Not really an E22\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n// Internally the module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface\n// code)\n#endif\n\n#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.\n#define ADC_MULTIPLIER 2\n\n#define USE_SH1107_128_64\n"
  },
  {
    "path": "variants/esp32/radiomaster_900_bandit/platformio.ini",
    "content": "[env:radiomaster_900_bandit]\nextends = esp32_base\nboard = esp32doit-devkit-v1\nbuild_flags =\n  ${esp32_base.build_flags}\n  -DRADIOMASTER_900_BANDIT\n  -DVTABLES_IN_FLASH=1\n  -DCONFIG_DISABLE_HAL_LOCKS=1\n  -DHAS_STK8XXX=1\n  -O2\n  -I variants/esp32/radiomaster_900_bandit\n  -ULED_BUILTIN\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\nlib_deps =\n  ${esp32_base.lib_deps}\n  # renovate: datasource=github-tags depName=STK8xxx-Accelerometer packageName=gjelsoe/STK8xxx-Accelerometer\n  https://github.com/gjelsoe/STK8xxx-Accelerometer/archive/v0.1.1.zip\n"
  },
  {
    "path": "variants/esp32/radiomaster_900_bandit/variant.h",
    "content": "/*\n Initial settings and work by https://github.com/gjelsoe\n Unit provided by Radio Master RC\n https://radiomasterrc.com/products/bandit-expresslrs-rf-module with 1.29\" OLED display CH1115 driver\n*/\n\n/*\n  On this model then screen is NOT upside down, don't flip it for the user.\n*/\n#undef DISPLAY_FLIP_SCREEN\n\n/*\n  I2C SDA and SCL.\n  0x18 - STK8XXX Accelerometer\n  0x3C - SH1115 Display Driver\n*/\n#define I2C_SDA 14\n#define I2C_SCL 12\n\n/*\n  I2C STK8XXX Accelerometer Interrupt PIN to ESP32 Pin 6 - SENSOR_CAPP (GPIO37)\n*/\n#define STK8XXX_INT 37\n\n/*\n  No GPS - but free pins are available.\n*/\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n/*\n  Pin connections from ESP32-D0WDQ6 to SX1276.\n*/\n#define LORA_DIO0 22\n#define LORA_DIO1 21\n#define LORA_SCK 18\n#define LORA_MISO 19\n#define LORA_MOSI 23\n#define LORA_CS 4\n#define LORA_RESET 5\n#define LORA_TXEN 33\n\n/*\n  This unit has a FAN built-in.\n  FAN is active at 250mW on it's ExpressLRS Firmware.\n  This FAN has TACHO signal on Pin 27 for use with PWM.\n*/\n#define RF95_FAN_EN 2\n\n/*\n  LED PIN setup and it has a NeoPixel LED.\n  It's possible to setup colors for Button 1 and 2,\n  look at BUTTON1_COLOR, BUTTON1_COLOR_INDEX, BUTTON2_COLOR and BUTTON2_COLOR_INDEX\n  this is done here for now.\n*/\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 6                     // How many neopixels are connected\n#define NEOPIXEL_DATA 15                     // GPIO pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // Type of neopixels in use\n#define ENABLE_AMBIENTLIGHTING               // Turn on Ambient Lighting\n// #define BUTTON1_COLOR 0xFF0000               // Background light for Button 1 in HEX RGB Color (RadioMaster Bandit only).\n// #define BUTTON1_COLOR_INDEX 0                // NeoPixel Index ID for Button 1\n// #define BUTTON2_COLOR 0x0000FF               // Background light for Button 2 in HEX RGB Color (RadioMaster Bandit only).\n// #define BUTTON2_COLOR_INDEX 1                // NeoPixel Index ID for Button 2\n\n/*\n  It has 1 x five-way and 2 x normal buttons.\n\n  Button    GPIO    RGB Index\n  ---------------------------\n  Five-way  39      -\n  Button 1  34      0\n  Button 2  35      1\n\n  Five way button when using ADC.\n  2.632V, 2.177V, 1.598V, 1.055V, 0V\n\n  ADC Values:\n  { UP, DOWN, LEFT, RIGHT, ENTER, IDLE }\n  3227, 0 ,1961, 2668, 1290, 4095\n\n  Five way button when using ADC.\n  https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41\n\n*/\n#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE\n#define PIN_JOYSTICK 39\n#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095\n\n/*\n Normal Button Pin setup.\n*/\n#define BUTTON_PIN 34\n#define BUTTON_NEED_PULLUP\n\n/*\n  No External notification.\n*/\n#undef EXT_NOTIFY_OUT\n\n/*\n  Remapping PIN Names.\n  Note, that this unit uses RFO\n*/\n#define USE_RF95\n#define USE_RF95_RFO\n#define RF95_CS LORA_CS\n#define RF95_DIO1 LORA_DIO1\n#define RF95_TXEN LORA_TXEN\n#define RF95_RESET LORA_RESET\n#define RF95_MAX_POWER 10\n\n/*\n  This module has Skyworks SKY66122 controlled by dacWrite\n  power ranging from 100mW to 1000mW.\n\n  Mapping of PA_LEVEL to Power output: GPIO26/dacWrite\n  168 -> 100mW\n  155 -> 250mW\n  142 -> 500mW\n  110 -> 1000mW\n*/\n#define RF95_PA_EN 26\n#define RF95_PA_DAC_EN\n#define RF95_PA_LEVEL 110"
  },
  {
    "path": "variants/esp32/radiomaster_900_bandit_micro/platformio.ini",
    "content": ";\n; This uses the same code and settings as the Radio Master Bandit Nano (https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module)\n;\n; Link to the unit : https://www.radiomasterrc.com/products/bandit-micro-expresslrs-rf-module\n;\n[env:radiomaster_900_bandit_micro]\nextends = esp32_base\nboard = esp32doit-devkit-v1\nbuild_flags =\n  ${esp32_base.build_flags}\n  -DRADIOMASTER_900_BANDIT_NANO\n  -DVTABLES_IN_FLASH=1\n  -DCONFIG_DISABLE_HAL_LOCKS=1\n  -O2\n  -I variants/esp32/radiomaster_900_bandit_nano\n  -ULED_BUILTIN\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\n"
  },
  {
    "path": "variants/esp32/radiomaster_900_bandit_nano/platformio.ini",
    "content": "[env:radiomaster_900_bandit_nano]\ncustom_meshtastic_hw_model = 64\ncustom_meshtastic_hw_model_slug = RADIOMASTER_900_BANDIT_NANO\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 2\ncustom_meshtastic_display_name = RadioMaster 900 Bandit Nano\ncustom_meshtastic_tags = RadioMaster\n\nextends = esp32_base\nboard = esp32doit-devkit-v1\nbuild_flags =\n  ${esp32_base.build_flags}\n  -DRADIOMASTER_900_BANDIT_NANO\n  -DVTABLES_IN_FLASH=1\n  -DCONFIG_DISABLE_HAL_LOCKS=1\n  -O2\n  -I variants/esp32/radiomaster_900_bandit_nano\n  -ULED_BUILTIN\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\n"
  },
  {
    "path": "variants/esp32/radiomaster_900_bandit_nano/variant.h",
    "content": "/*\n Initial settings and work by https://github.com/uberhalit and re-work by https://github.com/gjelsoe\n Unit provided by Radio Master RC\n https://radiomasterrc.com/products/bandit-nano-expresslrs-rf-module with 0.96\" OLED display\n*/\n\n/*\n  I2C SDA and SCL.\n*/\n#define I2C_SDA 14\n#define I2C_SCL 12\n\n/*\n  No GPS - but free solder pads are available inside the case.\n*/\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n/*\n  Pin connections from ESP32-D0WDQ6 to SX1276.\n*/\n#define LORA_DIO0 22\n#define LORA_DIO1 21\n#define LORA_SCK 18\n#define LORA_MISO 19\n#define LORA_MOSI 23\n#define LORA_CS 4\n#define LORA_RESET 5\n#define LORA_TXEN 33\n\n/*\n  This unit has a FAN built-in.\n  FAN is active at 250mW on it's ExpressLRS Firmware.\n*/\n#define RF95_FAN_EN 2\n\n/*\n  LED PIN setup.\n*/\n#define LED_POWER 15\n\n/*\n  Five way button when using ADC.\n  https://github.com/ExpressLRS/targets/blob/f3215b5ec891108db1a13523e4163950cfcadaac/TX/Radiomaster%20Bandit.json#L41\n*/\n#define INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE\n#define PIN_JOYSTICK 39\n#define JOYSTICK_ADC_VALS /*UP*/ 3227, /*DOWN*/ 0, /*LEFT*/ 1961, /*RIGHT*/ 2668, /*OK*/ 1290, /*IDLE*/ 4095\n\n#define DISPLAY_FLIP_SCREEN\n\n/*\n  No External notification.\n*/\n#undef EXT_NOTIFY_OUT\n\n/*\n  Remapping PIN Names.\n  Note, that this unit uses RFO\n*/\n#define USE_RF95\n#define USE_RF95_RFO\n#define RF95_CS LORA_CS\n#define RF95_DIO1 LORA_DIO1\n#define RF95_TXEN LORA_TXEN\n#define RF95_RESET LORA_RESET\n#define RF95_MAX_POWER 12\n\n/*\n  This module has Skyworks SKY66122 controlled by dacWrite\n  power rangeing from 100mW to 1000mW.\n\n  Mapping of PA_LEVEL to Power output: GPIO26/dacWrite\n  168 -> 100mW  -> 2.11v\n  148 -> 250mW  -> 1.87v\n  128 -> 500mW  -> 1.63v\n  90  -> 1000mW -> 1.16v\n*/\n#define RF95_PA_EN 26\n#define RF95_PA_DAC_EN\n#define RF95_PA_LEVEL 90\n"
  },
  {
    "path": "variants/esp32/rak11200/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define LED_GREEN 12\n#define LED_BLUE 2\n\nstatic const uint8_t TX = 1;\nstatic const uint8_t RX = 3;\n\n#define TX1 21\n#define RX1 19\n\n#define WB_IO1 14\n#define WB_IO2 27\n#define WB_IO3 26\n#define WB_IO4 23\n#define WB_IO5 13\n#define WB_IO6 22\n#define WB_SW1 34\n#define WB_A0 36\n#define WB_A1 39\n#define WB_CS 32\n#define WB_LED1 12\n#define WB_LED2 2\n\nstatic const uint8_t SDA = 4;\nstatic const uint8_t SCL = 5;\n\nstatic const uint8_t SS = 32;\nstatic const uint8_t MOSI = 25;\nstatic const uint8_t MISO = 35;\nstatic const uint8_t SCK = 33;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32/rak11200/platformio.ini",
    "content": "[env:rak11200]\ncustom_meshtastic_hw_model = 13\ncustom_meshtastic_hw_model_slug = RAK11200\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = RAK WisBlock 11200\ncustom_meshtastic_images = rak11200.svg\ncustom_meshtastic_tags = RAK\n\nextends = esp32_base\nboard = wiscore_rak11200\nboard_level = pr\nboard_check = true\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D RAK_11200\n  -I variants/esp32/rak11200\n  -DMESHTASTIC_EXCLUDE_WEBSERVER=1\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1\n  -DMESHTASTIC_EXCLUDE_RANGETEST=1\n  -DMESHTASTIC_EXCLUDE_MQTT=1\nupload_speed = 115200\n"
  },
  {
    "path": "variants/esp32/rak11200/variant.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define LED_GREEN 12\n#define LED_BLUE 2\n\nstatic const uint8_t TX = 1;\nstatic const uint8_t RX = 3;\n\n#define TX1 21\n#define RX1 19\n\n#define WB_IO1 14\n#define WB_IO2 27\n#define WB_IO3 26\n#define WB_IO4 23\n#define WB_IO5 13\n#define WB_IO6 22\n#define WB_SW1 34\n#define WB_A0 36\n#define WB_A1 39\n#define WB_CS 32\n#define WB_LED1 12\n#define WB_LED2 2\n\nstatic const uint8_t SDA = 4;\nstatic const uint8_t SCL = 5;\n\nstatic const uint8_t SS = 32;\nstatic const uint8_t MOSI = 25;\nstatic const uint8_t MISO = 35;\nstatic const uint8_t SCK = 33;\n#endif /* Pins_Arduino_h */\n\n/* -------- Meshtastic pins -------- */\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n#undef GPS_RX_PIN\n#define GPS_RX_PIN (RX1)\n#undef GPS_TX_PIN\n#define GPS_TX_PIN (TX1)\n\n#define LED_POWER LED_BLUE\n\n#define PIN_VBAT WB_A0\n#define BATTERY_PIN PIN_VBAT\n#define ADC_CHANNEL ADC1_GPIO36_CHANNEL\n\n// https://docs.rakwireless.com/Product-Categories/WisBlock/RAK13300/\n\n#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262/SX1268 module\n#define LORA_RESET WB_IO4     // RST for SX1276, and for SX1262/SX1268\n#define LORA_DIO1 WB_IO6      // IRQ for SX1262/SX1268\n#define LORA_DIO2 WB_IO5      // BUSY for SX1262/SX1268\n#define LORA_DIO3                                                                                                                \\\n    RADIOLIB_NC // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled\n\n#undef LORA_SCK\n#define LORA_SCK SCK\n#undef LORA_MISO\n#define LORA_MISO MISO\n#undef LORA_MOSI\n#define LORA_MOSI MOSI\n#undef LORA_CS\n#define LORA_CS SS\n\n#define USE_SX1262\n#define SX126X_ANT_SW WB_IO3\n#define SX126X_CS SS // NSS for SX126X\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_POWER_EN WB_IO2\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n"
  },
  {
    "path": "variants/esp32/station-g1/platformio.ini",
    "content": "; The 1.0 release of the nano-g1 board \n[env:station-g1]\ncustom_meshtastic_hw_model = 25\ncustom_meshtastic_hw_model_slug = STATION_G1\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Station G1\ncustom_meshtastic_tags = B&Q\n\nextends = esp32_base\nboard = ttgo-t-beam\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D STATION_G1\n  -I variants/esp32/station-g1\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32/station-g1/variant.h",
    "content": "// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep\n\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n#define I2C_SDA1 14 // Second i2c channel on external IO connector\n#define I2C_SCL1 15 // Second i2c channel on external IO connector\n\n#define BUTTON_PIN 36     // The middle button GPIO on the Nano G1\n#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.\n\n// common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if\n// not found then probe for SX1262\n#define USE_RF95\n#define USE_SX1262\n\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 23\n#define LORA_DIO1 33 // SX1262 IRQ\n#define LORA_DIO2 32 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH // Internally the module hooks the SX1262-DIO2 in to control the TX/RX switch\n#define SX126X_MAX_POWER                                                                                                         \\\n    16 // Ensure the PA does not exceed the saturation output power. More\n       // Info:https://uniteng.com/wiki/doku.php?id=meshtastic:station#rf_design_-_lora_station_edition_g1\n#endif\n\n#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n#define BATTERY_SENSE_SAMPLES 30 // Set the number of samples, It has an effect of increasing sensitivity.\n#define ADC_MULTIPLIER 6.45\n#define CELL_TYPE_LION // same curve for liion/lipo\n#define NUM_CELLS 3\n\n// different screen\n#define USE_SH1106\n\n// Station may not have GPS installed, but it has a labeled GPS pinout\n#define GPS_RX_PIN 34\n#define GPS_TX_PIN 12\n"
  },
  {
    "path": "variants/esp32/tbeam/platformio.ini",
    "content": "; The 1.0 release of the TBEAM board \n[env:tbeam]\ncustom_meshtastic_hw_model = 4\ncustom_meshtastic_hw_model_slug = TBEAM\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = LILYGO T-Beam\ncustom_meshtastic_images = tbeam.svg\ncustom_meshtastic_tags = LilyGo\n\nextends = esp32_base\nboard = ttgo-t-beam\n\nboard_check = true\nbuild_flags = ${esp32_base.build_flags}\n  -D TBEAM_V10\n  -I variants/esp32/tbeam\n  -DBOARD_HAS_PSRAM\n  -mfix-esp32-psram-cache-issue\n  -ULED_BUILTIN\nupload_speed = 921600\n\n[env:tbeam-displayshield]\nextends = env:tbeam\nboard_level = extra\nbuild_flags =\n  ${env:tbeam.build_flags}\n  -D USE_ST7796\n\nlib_deps =\n  ${env:tbeam.lib_deps}\n  # renovate: datasource=github-tags depName=meshtastic-st7796 packageName=meshtastic/st7796\n  https://github.com/meshtastic/st7796/archive/1.0.5.zip\n  # renovate: datasource=custom.pio depName=lewisxhe-SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n"
  },
  {
    "path": "variants/esp32/tbeam/variant.h",
    "content": "// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep\n\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam\n#define BUTTON_ACTIVE_LOW true\n#define BUTTON_ACTIVE_PULLUP true\n#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.\n\n#define LED_STATE_ON 0 // State when LED is lit\n#define LED_POWER 4    // Newer tbeams (1.1) have an extra led on GPIO4\n\n// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if\n// not found then probe for SX1262\n#define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n#define USE_SX1268\n\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 23\n#define LORA_DIO1 33 // SX1262 IRQ\n#define LORA_DIO2 32 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface\n// code)\n#endif\n\n// Leave undefined to disable our PMU IRQ handler.  DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts\n// and waking from light sleep\n// #define PMU_IRQ 35\n#define HAS_AXP192\n#define GPS_UBLOX\n#define GPS_RX_PIN 34\n#define GPS_TX_PIN 12\n// #define GPS_DEBUG\n\n// Used when the display shield is chosen\n#ifdef USE_ST7796\n\n#undef EXT_NOTIFY_OUT\n#undef LED_STATE_ON\n#undef LED_POWER\n\n#define HAS_CST226SE 1\n#define HAS_TOUCHSCREEN 1\n// #define TOUCH_IRQ 35 // broken in this version of the lib 0.3.1\n#ifndef TOUCH_IRQ\n#define TOUCH_IRQ -1\n#endif\n#define USE_VIRTUAL_KEYBOARD 1\n\n#define ST7796_NSS 25\n#define ST7796_RS 13  // DC\n#define ST7796_SDA 14 // MOSI\n#define ST7796_SCK 15\n#define ST7796_RESET 2\n#define ST7796_MISO -1\n#define ST7796_BUSY -1\n#define VTFT_LEDA 4\n#define TFT_SPI_FREQUENCY 60000000\n#define TFT_HEIGHT 222\n#define TFT_WIDTH 480\n#define BRIGHTNESS_DEFAULT 100        // Medium Low Brightness\n#define SCREEN_TRANSITION_FRAMERATE 5 // fps\n#endif"
  },
  {
    "path": "variants/esp32/tbeam_v07/platformio.ini",
    "content": "; The original TBEAM board without the AXP power chip and a few other changes\n[env:tbeam0_7]\ncustom_meshtastic_hw_model = 6\ncustom_meshtastic_hw_model_slug = TBEAM_V0P7\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_display_name = LILYGO T-Beam V0.7\ncustom_meshtastic_tags = LilyGo\n\nboard_level = extra\nextends = esp32_base\nboard = ttgo-t-beam\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D TBEAM_V07\n  -I variants/esp32/tbeam_v07\n"
  },
  {
    "path": "variants/esp32/tbeam_v07/variant.h",
    "content": "// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep\n\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n#define BUTTON_PIN 39\n#define BATTERY_PIN 35    // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 23\n#define LORA_DIO1 33\n#define LORA_DIO2 32 // Not really used\n\n// This board has different GPS pins than all other boards\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 12\n#define GPS_TX_PIN 15\n#define GPS_UBLOX"
  },
  {
    "path": "variants/esp32/tlora_v1/platformio.ini",
    "content": "[env:tlora-v1]\ncustom_meshtastic_hw_model = 2\ncustom_meshtastic_hw_model_slug = TLORA_V1\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_display_name = LILYGO T-LoRa V1\ncustom_meshtastic_tags = LilyGo\n\nboard_level = extra\nextends = esp32_base\nboard = ttgo-lora32-v1\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D TLORA_V1\n  -I variants/esp32/tlora_v1\nupload_speed = 115200\n"
  },
  {
    "path": "variants/esp32/tlora_v1/variant.h",
    "content": "#define I2C_SDA 4 // I2C pins for this board\n#define I2C_SCL 15\n\n#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller\n\n#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost\n#define VEXT_ON_VALUE LOW\n#define LED_POWER 2  // If defined we will blink this LED\n#define BUTTON_PIN 0 // If defined, this will be used for user button presses\n#define BUTTON_NEED_PULLUP\n#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 14\n#define LORA_DIO1 33 // Must be manually wired: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436\n#define LORA_DIO2 32 // Not really used"
  },
  {
    "path": "variants/esp32/tlora_v1_3/platformio.ini",
    "content": "[env:tlora_v1_3]\nboard_level = extra\nextends = esp32_base\nboard = ttgo-lora32-v1\nbuild_flags = \n  ${esp32_base.build_flags} -D TLORA_V1_3 -I variants/esp32/tlora_v1_3\nupload_speed = 115200\n"
  },
  {
    "path": "variants/esp32/tlora_v1_3/variant.h",
    "content": "#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n\n#define I2C_SDA 21 // I2C pins for this board\n#define I2C_SCL 22\n\n#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller\n\n#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost\n#define LED_POWER 25   // If defined we will blink this LED\n#define BUTTON_PIN 36\n#define BUTTON_NEED_PULLUP\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 14\n#define LORA_DIO1 33 // Prob. must be manually wired: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436\n#define LORA_DIO2 32 // Not really used"
  },
  {
    "path": "variants/esp32/tlora_v2/platformio.ini",
    "content": "[env:tlora-v2]\ncustom_meshtastic_hw_model = 1\ncustom_meshtastic_hw_model_slug = TLORA_V2\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_display_name = LILYGO T-LoRa V2\ncustom_meshtastic_tags = LilyGo\n\nboard_level = extra\nextends = esp32_base\nboard = ttgo-lora32-v1\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D TLORA_V2\n  -I variants/esp32/tlora_v2\n"
  },
  {
    "path": "variants/esp32/tlora_v2/variant.h",
    "content": "#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n\n#define I2C_SDA 21 // I2C pins for this board\n#define I2C_SCL 22\n\n#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost\n#define LED_POWER 25   // If defined we will blink this LED\n#define BUTTON_PIN                                                                                                               \\\n    0 // If defined, this will be used for user button presses, if your board doesn't have a physical switch, you can wire one\n      // between this pin and ground\n#define BUTTON_NEED_PULLUP\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 14\n#define LORA_DIO1 33 // Must be manually wired: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436\n#define LORA_DIO2 32 // Not really used"
  },
  {
    "path": "variants/esp32/tlora_v2_1_16/platformio.ini",
    "content": "[env:tlora-v2-1-1_6]\ncustom_meshtastic_hw_model = 3\ncustom_meshtastic_hw_model_slug = TLORA_V2_1_1P6\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = LILYGO T-LoRa V2.1-1.6\ncustom_meshtastic_images = tlora-v2-1-1_6.svg\ncustom_meshtastic_tags = LilyGo\n\nextends = esp32_base\nboard = ttgo-lora32-v21\nboard_check = true\nbuild_flags = \n  ${esp32_base.build_flags} -D TLORA_V2_1_16 -I variants/esp32/tlora_v2_1_16 -ULED_BUILTIN\nupload_speed = 115200\n\n[env:sugarcube]\nextends = env:tlora-v2-1-1_6\nboard_level = extra\nbuild_flags =\n  ${env:tlora-v2-1-1_6.build_flags}\n  -DBUTTON_PIN=0\n  -DPIN_BUZZER=25\n  -DLED_POWER=-1"
  },
  {
    "path": "variants/esp32/tlora_v2_1_16/variant.h",
    "content": "#define BATTERY_PIN 35\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n#define BATTERY_SENSE_SAMPLES 30\n\n// ratio of voltage divider = 2.0 (R42=100k, R43=100k)\n#define ADC_MULTIPLIER 2\n\n#define I2C_SDA 21 // I2C pins for this board\n#define I2C_SCL 22\n\n#if defined(LED_POWER) && LED_POWER == -1\n#undef LED_POWER\n#else\n#define LED_POWER 25 // If defined we will blink this LED\n#endif\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 23\n\n// In the T3 V1.6.1 TXCO version, GPIO 33 is connected to Radio’s\n// internal temperature-compensated crystal oscillator enable\n#ifdef LORA_TCXO_GPIO\n#define LORA_DIO1 RADIOLIB_NC // no-connect on sx127x module\n#else\n#define LORA_DIO1 33 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436\n#endif\n\n#define LORA_DIO2 32 // Not really used"
  },
  {
    "path": "variants/esp32/tlora_v2_1_16_tcxo/platformio.ini",
    "content": "[env:tlora-v2-1-1_6-tcxo]\nextends = esp32_base\nboard_level = extra\nboard = ttgo-lora32-v21\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D TLORA_V2_1_16\n  -I variants/esp32/tlora_v2_1_16\n  -D LORA_TCXO_GPIO=33\n  -ULED_BUILTIN\nupload_speed = 115200\n"
  },
  {
    "path": "variants/esp32/tlora_v2_1_18/platformio.ini",
    "content": "[env:tlora-v2-1-1_8]\ncustom_meshtastic_hw_model = 15\ncustom_meshtastic_hw_model_slug = TLORA_V2_1_1P8\ncustom_meshtastic_architecture = esp32\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = LILYGO T-LoRa V2.1-1.8\ncustom_meshtastic_images = tlora-v2-1-1_8.svg\ncustom_meshtastic_tags = LilyGo, 2.4GHz\n\nextends = esp32_base\nboard_level = extra\nboard = ttgo-lora32-v21\n\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D TLORA_V2_1_18\n  -I variants/esp32/tlora_v2_1_18\n"
  },
  {
    "path": "variants/esp32/tlora_v2_1_18/variant.h",
    "content": "#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n// ratio of voltage divider = 2.0 (R42=100k, R43=100k)\n#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n\n#define I2C_SDA 21 // I2C pins for this board\n#define I2C_SCL 22\n\n#define LED_POWER 25  // If defined we will blink this LED\n#define BUTTON_PIN 12 // If defined, this will be used for user button presses,\n\n#define BUTTON_NEED_PULLUP\n\n#define USE_SX1280\n#define LORA_RESET 23\n\n#define SX128X_CS 18\n#define SX128X_DIO1 26\n#define SX128X_BUSY 32\n#define SX128X_RESET LORA_RESET"
  },
  {
    "path": "variants/esp32/tlora_v3_3_0_tcxo/platformio.ini",
    "content": "[env:tlora-v3-3-0-tcxo]\nextends = esp32_base\nboard = ttgo-lora32-v21\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D TLORA_V2_1_16\n  -I variants/esp32/tlora_v2_1_16\n  -D LORA_TCXO_GPIO=12\n  -D BUTTON_PIN=0\n  -ULED_BUILTIN"
  },
  {
    "path": "variants/esp32/trackerd/platformio.ini",
    "content": "[env:trackerd]\nextends = esp32_base\nboard_level = extra\nboard = pico32\nboard_build.f_flash = 80000000L\n\nbuild_flags = \n  ${esp32_base.build_flags} -D PRIVATE_HW -I variants/esp32/trackerd -D BSFILE=\\\"boards/dragino_lbt2.h\\\"\n;board_build.partitions = no_ota.csv"
  },
  {
    "path": "variants/esp32/trackerd/variant.h",
    "content": "// Initialize i2c bus on sd_dat and esp_led pins, respectively. We need a bus to not hang on boot\n#define HAS_SCREEN 0\n#define I2C_SDA 21\n#define I2C_SCL 22\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 9\n#define GPS_TX_PIN 10\n\n#define LED_POWER 13 // 13 red, 2 blue, 15 red\n\n#define BUTTON_PIN 0\n#define BUTTON_NEED_PULLUP\n\n#define USE_RF95\n#define LORA_DIO0 26 // a No connect on the SX1262 module\n#define LORA_RESET 23\n#define LORA_DIO1 33\n#define LORA_DIO2 32 // Not really used\n\n#undef BAT_MEASURE_ADC_UNIT\n#define BATTERY_PIN 35      // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_MULTIPLIER 1.34 //  tracked resistance divider is 100k+470k, so it can not fillfull well on esp32 adc\n#define ADC_CHANNEL ADC1_GPIO35_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_12 // lower dB for high resistance voltage divider\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#undef PIN_GPS_PPS\n\n#define PIN_GPS_EN 12\n#define GPS_EN_ACTIVE 1\n\n#define GPS_TX_PIN 10\n#define GPS_RX_PIN 9\n\n#define PIN_GPS_RESET 25\n// #define PIN_GPS_REINIT 25\n#define GPS_RESET_MODE 1\n\n#define GPS_L76K\n\n#undef PIN_LED1\n#undef PIN_LED2\n#undef PIN_LED3\n\n#define PIN_LED1 13\n#define PIN_LED2 15\n#define PIN_LED3 2\n\n#define ledOff(pin) pinMode(pin, INPUT)"
  },
  {
    "path": "variants/esp32/wiphone/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 1;\nstatic const uint8_t RX = 3;\n\nstatic const uint8_t SDA = 21;\nstatic const uint8_t SCL = 22;\n\nstatic const uint8_t SS = 5;\nstatic const uint8_t MOSI = 23;\nstatic const uint8_t MISO = 19;\nstatic const uint8_t SCK = 18;\n\nstatic const uint8_t G23 = 23;\nstatic const uint8_t G19 = 19;\nstatic const uint8_t G18 = 18;\nstatic const uint8_t G3 = 3;\nstatic const uint8_t G16 = 16;\nstatic const uint8_t G21 = 21;\nstatic const uint8_t G2 = 2;\nstatic const uint8_t G12 = 12;\nstatic const uint8_t G15 = 15;\nstatic const uint8_t G35 = 35;\nstatic const uint8_t G36 = 36;\nstatic const uint8_t G25 = 25;\nstatic const uint8_t G26 = 26;\nstatic const uint8_t G1 = 1;\nstatic const uint8_t G17 = 17;\nstatic const uint8_t G22 = 22;\nstatic const uint8_t G5 = 5;\nstatic const uint8_t G13 = 13;\nstatic const uint8_t G0 = 0;\nstatic const uint8_t G34 = 34;\n\nstatic const uint8_t DAC1 = 25;\nstatic const uint8_t DAC2 = 26;\n\nstatic const uint8_t ADC1 = 35;\nstatic const uint8_t ADC2 = 36;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32/wiphone/platformio.ini",
    "content": "[env:wiphone]\nextends = esp32_base\nboard = wiphone\nboard_level = extra\nmonitor_filters = esp32_exception_decoder\nboard_build.partitions = default_16MB.csv\nbuild_flags = \n  ${esp32_base.build_flags}\n  -D WIPHONE\n  -I variants/esp32/wiphone\nlib_deps = \n  ${esp32_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n  # renovate: datasource=custom.pio depName=SX1509 IO Expander packageName=sparkfun/library/SX1509 IO Expander\n  sparkfun/SX1509 IO Expander@3.0.6\n  # renovate: datasource=custom.pio depName=APA102 packageName=pololu/library/APA102\n  pololu/APA102@3.0.0\n"
  },
  {
    "path": "variants/esp32/wiphone/variant.h",
    "content": "#define I2C_SDA 15\n#define I2C_SCL 25\n\n#define GPIO_EXTENDER 1509\n#define EXTENDER_FLAG 0x40\n#define EXTENDER_PIN(x) (x + EXTENDER_FLAG)\n\n#undef RF95_SCK\n#undef RF95_MISO\n#undef RF95_MOSI\n#undef RF95_NSS\n\n#define RF95_SCK 14\n#define RF95_MISO 12\n#define RF95_MOSI 13\n#define RF95_NSS 27\n\n#define USE_RF95\n#define LORA_DIO0 38\n#define LORA_RESET RADIOLIB_NC\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC\n\n// This board has no GPS or Screen for now\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define NO_GPS 1\n#define HAS_GPS 0\n#define HAS_SCREEN 0\n\n// Default SPI1 will be mapped to the display\n#define ST7789_SDA 23\n#define ST7789_SCK 18\n#define ST7789_CS 5\n#define ST7789_RS 26\n#define USE_TFTDISPLAY 1\n// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control\n// it)\n// #define ST7789_BL -1 // EXTENDER_PIN(9)\n\n#define ST7789_RESET -1\n#define ST7789_MISO 19\n#define ST7789_BUSY -1\n#define ST7789_SPI_HOST SPI3_HOST\n// I don't have a 'wiphone' but this I think should not be defined this way (don't set TFT_BL if we don't have a hw way to control\n// it)\n// #define TFT_BL -1 // EXTENDER_PIN(9)\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 240\n#define TFT_WIDTH 320\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 0\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5\n\n#define I2S_MCLK_GPIO0\n#define I2S_BCK_PIN 4 // rev1.3 - 4 (wp05)\n#define I2S_WS_PIN 33\n#define I2S_MOSI_PIN 21\n#define I2S_MISO_PIN 34"
  },
  {
    "path": "variants/esp32c3/ai-c3/platformio.ini",
    "content": "[env:ai-c3]\nextends = esp32c3_base\nboard = esp32-c3-devkitm-1\nboard_level = extra\nbuild_flags = \n  ${esp32c3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32c3/ai-c3\n"
  },
  {
    "path": "variants/esp32c3/ai-c3/variant.h",
    "content": "#define SDA 0\n#define SCL 1\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n#define BUTTON_PIN 9 // BOOT button\n#define LED_POWER 30 // RGB LED\n\n#define USE_RF95\n#define LORA_SCK 4\n#define LORA_MISO 5\n#define LORA_MOSI 6\n#define LORA_CS 7\n\n#define LORA_DIO0 10\n#define LORA_DIO1 3\n#define LORA_RESET 2\n\n// WaveShare Core1262-868M\n// https://www.waveshare.com/wiki/Core1262-868M\n#define USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY 10\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH // use DIO2 as RF switch\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n"
  },
  {
    "path": "variants/esp32c3/diy/esp32c3_super_mini/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 21;\nstatic const uint8_t RX = 20;\n\nstatic const uint8_t SDA = 1;\nstatic const uint8_t SCL = 0;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 7;\nstatic const uint8_t MISO = 6;\nstatic const uint8_t SCK = 10;\n\nstatic const uint8_t A0 = 0;\nstatic const uint8_t A1 = 1;\nstatic const uint8_t A2 = 2;\nstatic const uint8_t A3 = 3;\nstatic const uint8_t A4 = 4;\nstatic const uint8_t A5 = 5;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32c3/diy/esp32c3_super_mini/platformio.ini",
    "content": "; ESP32 C3 Super Mini Development Board\n; https://www.espboards.dev/esp32/esp32-c3-super-mini/\n[env:esp32c3_super_mini]\nextends = esp32c3_base\nboard = esp32-c3-devkitm-1\nbuild_flags =\n  ${esp32c3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32c3/diy/esp32c3_super_mini\n  -D ARDUINO_USB_MODE=1\n  -D ARDUINO_USB_CDC_ON_BOOT=1\nboard_level = extra\n"
  },
  {
    "path": "variants/esp32c3/diy/esp32c3_super_mini/variant.h",
    "content": "#ifndef _VARIANT_ESP32C3_SUPER_MINI_\n#define _VARIANT_ESP32C3_SUPER_MINI_\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// I2C (Wire) & OLED\n#define WIRE_INTERFACES_COUNT (1)\n#define I2C_SDA (1)\n#define I2C_SCL (0)\n\n#define USE_SSD1306\n\n// GPS\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN (20)\n#define GPS_TX_PIN (21)\n\n// Button\n#define BUTTON_PIN (9) // BOOT button\n\n// LoRa\n#define USE_LLCC68\n#define USE_SX1262\n// #define USE_RF95\n#define USE_SX1268\n\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET (5)\n#define LORA_DIO1 (3)\n#define LORA_RXEN (2)\n#define LORA_BUSY (4)\n#define LORA_SCK (10)\n#define LORA_MISO (6)\n#define LORA_MOSI (7)\n#define LORA_CS (8)\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN LORA_RXEN\n\n#define SX126X_DIO3_TCXO_VOLTAGE (1.8)\n#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/esp32c3/esp32c3.ini",
    "content": "[esp32c3_base]\nextends = esp32_common\ncustom_esp32_kind = esp32c3\n\nmonitor_speed = 115200\nmonitor_filters = esp32_c3_exception_decoder\n\nlib_deps =\n  ${esp32_common.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master\n  https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip\n"
  },
  {
    "path": "variants/esp32c3/hackerboxes_esp32c3_oled/platformio.ini",
    "content": "[env:hackerboxes-esp32c3-oled]\nextends = esp32c3_base\nboard = esp32-c3-devkitm-1\nboard_level = extra\nbuild_flags = \n  ${esp32c3_base.build_flags}\n  -D PRIVATE_HW\n  -D ARDUINO_USB_MODE=1\n  -D ARDUINO_USB_CDC_ON_BOOT=1\n  -I variants/esp32c3/hackerboxes_esp32c3_oled\nmonitor_speed = 115200\nupload_protocol = esptool\n;upload_port = /dev/ttyUSB0\nupload_speed = 921600\n"
  },
  {
    "path": "variants/esp32c3/hackerboxes_esp32c3_oled/variant.h",
    "content": "#define BUTTON_PIN 9\n\n// Hackerboxes LoRa ESP32-C3 OLED Kit\n// Uses a ESP32-C3 OLED Board and a RA-01SH (SX1262) LoRa Board\n\n#define LED_POWER 8    // LED\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define HAS_SCREEN 0\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n// #define USE_SSD1306_72_40\n// #define I2C_SDA 5 // I2C pins for this board\n// #define I2C_SCL 6 //\n// #define TFT_WIDTH 72\n// #define TFT_HEIGHT 40\n\n#define USE_SX1262\n#define LORA_SCK 4\n#define LORA_MISO 7\n#define LORA_MOSI 3\n#define LORA_CS 1\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 0\n#define LORA_DIO1 20\n#define LORA_DIO2 RADIOLIB_NC\n#define LORA_BUSY 10\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_MAX_POWER 22 // Max power of the RA-01SH is 22db"
  },
  {
    "path": "variants/esp32c3/heltec_esp32c3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 21;\nstatic const uint8_t RX = 20;\n\nstatic const uint8_t SDA = 1;\nstatic const uint8_t SCL = 0;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 7;\nstatic const uint8_t MISO = 6;\nstatic const uint8_t SCK = 10;\n\nstatic const uint8_t A0 = 0;\nstatic const uint8_t A1 = 1;\nstatic const uint8_t A2 = 2;\nstatic const uint8_t A3 = 3;\nstatic const uint8_t A4 = 4;\nstatic const uint8_t A5 = 5;\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32c3/heltec_esp32c3/platformio.ini",
    "content": "[env:heltec-ht62-esp32c3-sx1262]\ncustom_meshtastic_hw_model = 53\ncustom_meshtastic_hw_model_slug = HELTEC_HT62\ncustom_meshtastic_architecture = esp32-c3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec HT62\ncustom_meshtastic_images = heltec-ht62-esp32c3-sx1262.svg\ncustom_meshtastic_tags = Heltec\n\nextends = esp32c3_base\nboard = esp32-c3-devkitm-1\nboard_level = pr\nbuild_flags = \n  ${esp32c3_base.build_flags}\n  -D HELTEC_HT62\n  -I variants/esp32c3/heltec_esp32c3\nmonitor_speed = 115200\nupload_protocol = esptool\n;upload_port = /dev/ttyUSB0\nupload_speed = 921600\n"
  },
  {
    "path": "variants/esp32c3/heltec_esp32c3/variant.h",
    "content": "#define BUTTON_PIN 9\n\n// LED pin on HT-DEV-ESP_V2 and HT-DEV-ESP_V3\n// https://resource.heltec.cn/download/HT-CT62/HT-CT62_Reference_Design.pdf\n// https://resource.heltec.cn/download/HT-DEV-ESP/HT-DEV-ESP_V3_Sch.pdf\n#define LED_POWER 2    // LED\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define HAS_SCREEN 0\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define USE_SX1262\n#define LORA_SCK 10\n#define LORA_MISO 6\n#define LORA_MOSI 7\n#define LORA_CS 8\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 5\n#define LORA_DIO1 3\n#define LORA_DIO2 RADIOLIB_NC\n#define LORA_BUSY 4\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32c3/heltec_hru_3601/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n#include <variant.h>\n\nstatic const uint8_t TX = UART_TX;\nstatic const uint8_t RX = UART_RX;\n\nstatic const uint8_t SDA = I2C_SDA;\nstatic const uint8_t SCL = I2C_SCL;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 7;\nstatic const uint8_t MISO = 6;\nstatic const uint8_t SCK = 10;\n\nstatic const uint8_t A0 = 0;\nstatic const uint8_t A1 = 1;\nstatic const uint8_t A2 = 2;\nstatic const uint8_t A3 = 3;\nstatic const uint8_t A4 = 4;\nstatic const uint8_t A5 = 5;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32c3/heltec_hru_3601/platformio.ini",
    "content": "[env:heltec-hru-3601]\nextends = esp32c3_base\nboard = adafruit_qtpy_esp32c3\nbuild_flags =\n  ${esp32c3_base.build_flags}\n  -D HELTEC_HRU_3601\n  -I variants/esp32c3/heltec_hru_3601\nlib_deps = ${esp32c3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\n"
  },
  {
    "path": "variants/esp32c3/heltec_hru_3601/variant.h",
    "content": "#define BUTTON_PIN 9\n\n#define HAS_SCREEN 0\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define USE_SX1262\n#define LORA_SCK 10\n#define LORA_MISO 6\n#define LORA_MOSI 7\n#define LORA_CS 8\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 5\n#define LORA_DIO1 3\n#define LORA_DIO2 RADIOLIB_NC\n#define LORA_BUSY 4\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Vext_Ctrl pin controls 3.3V LDO (U2) which provides power to I2C peripheral\n#define PIN_POWER_EN 1\n\n// Board has I2C connected to UART0 pins, and no other hardware serial port\n#define UART_TX -1\n#define UART_RX -1\n\n// Board has I2C connected to U0RXD and U0TXD\n#define I2C_SDA 21\n#define I2C_SCL 20\n\n// Board has RGB LED on GPIO2\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n#define NEOPIXEL_DATA 2                      // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n"
  },
  {
    "path": "variants/esp32c3/m5stack-stamp-c3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = -1; // 21;\nstatic const uint8_t RX = -1; // 20;\n\nstatic const uint8_t SDA = 1;\nstatic const uint8_t SCL = 0;\n\nstatic const uint8_t SS = 7;\nstatic const uint8_t MOSI = 6;\nstatic const uint8_t MISO = 5;\nstatic const uint8_t SCK = 4;\n\nstatic const uint8_t A0 = 0;\nstatic const uint8_t A1 = 1;\nstatic const uint8_t A2 = 2;\nstatic const uint8_t A3 = 3;\nstatic const uint8_t A4 = 4;\nstatic const uint8_t A5 = 5;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32c3/m5stack-stamp-c3/platformio.ini",
    "content": "[env:m5stack-stamp-c3]\nextends = esp32c3_base\nboard = esp32-c3-devkitm-1\nboard_level = extra\nbuild_flags = \n  ${esp32c3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32c3/m5stack-stamp-c3\nmonitor_speed = 115200\nupload_protocol = esptool\n;upload_port = /dev/ttyACM2\nupload_speed = 921600\n"
  },
  {
    "path": "variants/esp32c3/m5stack-stamp-c3/variant.h",
    "content": "#define I2C_SDA 1\n#define I2C_SCL 0\n\n#define BUTTON_PIN 3 // M5Stack STAMP C3 built in button\n#define BUTTON_NEED_PULLUP\n\n// #define HAS_SCREEN 0\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n// Adafruit RFM95W OK\n// https://www.adafruit.com/product/3072\n#define USE_RF95\n#define LORA_SCK 4\n#define LORA_MISO 5\n#define LORA_MOSI 6\n#define LORA_CS 7\n#define LORA_DIO0 10\n#define LORA_RESET 8\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC\n\n// WaveShare Core1262-868M OK\n// https://www.waveshare.com/wiki/Core1262-868M\n// #define USE_SX1262\n// #define LORA_SCK 4\n// #define LORA_MISO 5\n// #define LORA_MOSI 6\n// #define LORA_CS 7\n// #define LORA_DIO0 RADIOLIB_NC\n// #define LORA_RESET 8\n// #define LORA_DIO1 10\n// #define LORA_DIO2 RADIOLIB_NC\n// #define LORA_BUSY 18\n// #define SX126X_CS LORA_CS\n// #define SX126X_DIO1 LORA_DIO1\n// #define SX126X_BUSY LORA_BUSY\n// #define SX126X_RESET LORA_RESET\n// #define SX126X_DIO2_AS_RF_SWITCH\n// #define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// SX128X 2.4 Ghz LoRa module Not OK - RadioLib issue ? still to confirm\n// #define USE_SX1280\n// #define LORA_SCK 4\n// #define LORA_MISO 5\n// #define LORA_MOSI 6\n// #define LORA_CS 7\n// #define LORA_DIO0 -1\n// #define LORA_DIO1 10\n// #define LORA_DIO2 21\n// #define LORA_RESET 8\n// #define LORA_BUSY 1\n// #define SX128X_CS LORA_CS\n// #define SX128X_DIO1 LORA_DIO1\n// #define SX128X_BUSY LORA_BUSY\n// #define SX128X_RESET LORA_RESET\n// #define SX128X_MAX_POWER 10\n\n// Not yet tested\n// #define USE_EINK\n// #define PIN_EINK_EN   -1  // N/C\n// #define PIN_EINK_CS   9   // EPD_CS\n// #define PIN_EINK_BUSY 18  // EPD_BUSY\n// #define PIN_EINK_DC   19  // EPD_D/C\n// #define PIN_EINK_RES  -1  // Connected but not needed\n// #define PIN_EINK_SCLK 4   // EPD_SCLK\n// #define PIN_EINK_MOSI 6   // EPD_MOSI\n"
  },
  {
    "path": "variants/esp32c6/esp32c6.ini",
    "content": "[esp32c6_base]\nextends = esp32_common\nplatform =\n  # Do not renovate until we have switched to pioarduino tagged builds\n  https://github.com/Jason2866/platform-espressif32/archive/22faa566df8c789000f8136cd8d0aca49617af55.zip\nbuild_flags =\n  ${arduino_base.build_flags}\n  -Wall\n  -Wextra\n  -Isrc/platform/esp32\n  -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING\n  -DSERIAL_BUFFER_SIZE=4096\n  -DLIBPAX_ARDUINO\n  -DLIBPAX_WIFI\n  -DLIBPAX_BLE\n  -DMESHTASTIC_EXCLUDE_WEBSERVER\n  ;-DDEBUG_HEAP\n  ; TEMP\n  -DHAS_BLUETOOTH=0\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER\n  -DMESHTASTIC_EXCLUDE_BLUETOOTH\n\nlib_deps =\n  ${arduino_base.lib_deps}\n  ${networking_base.lib_deps}\n  ${environmental_base.lib_deps}\n  ${environmental_extra.lib_deps}\n  ${radiolib_base.lib_deps}\n  # renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib\n  lewisxhe/XPowersLib@0.3.3\n  # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master\n  https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip\n  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto\n  rweather/Crypto@0.4.0\n\nbuild_src_filter = \n  ${esp32_common.build_src_filter} -<mesh/http>\n\nmonitor_speed = 460800\nmonitor_filters = esp32_c3_exception_decoder\n\nlib_ignore =\n  ${esp32_common.lib_ignore}\n  NonBlockingRTTTL\n  NimBLE-Arduino\n  libpax\n  \n"
  },
  {
    "path": "variants/esp32c6/m5stack_unitc6l/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x2886\n#define USB_PID 0x0048\n\nstatic const uint8_t TX = 16;\nstatic const uint8_t RX = 17;\n\nstatic const uint8_t SDA = 10;\nstatic const uint8_t SCL = 8;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 22;\nstatic const uint8_t SCK = 20;\nstatic const uint8_t MOSI = 21;\nstatic const uint8_t SS = 6;\n\n// #define SPI_MOSI (11)\n// #define SPI_SCK (14)\n// #define SPI_MISO (2)\n// #define SPI_CS (13)\n\n// #define SDCARD_CS SPI_CS\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32c6/m5stack_unitc6l/platformio.ini",
    "content": "[env:m5stack-unitc6l]\ncustom_meshtastic_hw_model = 111\ncustom_meshtastic_hw_model_slug = M5STACK_C6L\ncustom_meshtastic_architecture = esp32-c6\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = M5Stack Unit C6L\ncustom_meshtastic_images = m5_c6l.svg\ncustom_meshtastic_tags = M5Stack\n\nextends = esp32c6_base\nboard = esp32-c6-devkitc-1\nboard_upload.flash_size = 16MB\nboard_build.partitions = default_16MB.csv\n;OpenOCD flash method\n;upload_protocol = esp-builtin\n;Normal method\nupload_protocol = esptool\n;upload_port = /dev/ttyACM2\nbuild_unflags =\n  -D HAS_BLUETOOTH\n  -D MESHTASTIC_EXCLUDE_BLUETOOTH\n  -D HAS_WIFI\nlib_deps =\n  ${esp32c6_base.lib_deps}\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\n  # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino\n  h2zero/NimBLE-Arduino@2.3.7\nbuild_flags = \n  ${esp32c6_base.build_flags}\n  -D M5STACK_UNITC6L\n  -I variants/esp32c6/m5stack_unitc6l\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1\n  -DARDUINO_USB_CDC_ON_BOOT=1\n  -DARDUINO_USB_MODE=1\n  -D HAS_BLUETOOTH=1\n\t-DCONFIG_BT_NIMBLE_EXT_ADV=1\n\t-DCONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=2\n  -D NIMBLE_TWO\nmonitor_speed=115200\nlib_ignore =\n  NonBlockingRTTTL\n  libpax\nbuild_src_filter = \n ${esp32c6_base.build_src_filter} +<../variants/esp32c6/m5stack_unitc6l>\n"
  },
  {
    "path": "variants/esp32c6/m5stack_unitc6l/variant.cpp",
    "content": "#include \"driver/gpio.h\"\n#include <Arduino.h>\n#include <Wire.h>\n// I2C device addr\n#define PI4IO_M_ADDR 0x43\n\n// PI4IO registers\n#define PI4IO_REG_CHIP_RESET 0x01\n#define PI4IO_REG_IO_DIR 0x03\n#define PI4IO_REG_OUT_SET 0x05\n#define PI4IO_REG_OUT_H_IM 0x07\n#define PI4IO_REG_IN_DEF_STA 0x09\n#define PI4IO_REG_PULL_EN 0x0B\n#define PI4IO_REG_PULL_SEL 0x0D\n#define PI4IO_REG_IN_STA 0x0F\n#define PI4IO_REG_INT_MASK 0x11\n#define PI4IO_REG_IRQ_STA 0x13\n// PI4IO\n\n#define setbit(x, y) x |= (0x01 << y)\n#define clrbit(x, y) x &= ~(0x01 << y)\n#define reversebit(x, y) x ^= (0x01 << y)\n#define getbit(x, y) ((x) >> (y)&0x01)\n\nvoid i2c_read_byte(uint8_t addr, uint8_t reg, uint8_t *value)\n{\n    Wire.beginTransmission(addr);\n    Wire.write(reg);\n    Wire.endTransmission();\n    Wire.requestFrom(addr, 1);\n    *value = Wire.read();\n}\n\n/*******************************************************************/\nvoid i2c_write_byte(uint8_t addr, uint8_t reg, uint8_t value)\n{\n    Wire.beginTransmission(addr);\n    Wire.write(reg);\n    Wire.write(value);\n    Wire.endTransmission();\n}\n/*******************************************************************/\nvoid c6l_init()\n{\n    // P7 LoRa Reset\n    // P6 RF Switch\n    // P5 LNA Enable\n\n    printf(\"pi4io_init\\n\");\n    uint8_t in_data;\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_CHIP_RESET, 0xFF);\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_read_byte(PI4IO_M_ADDR, PI4IO_REG_CHIP_RESET, &in_data);\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_IO_DIR, 0b11000000); // 0: input 1: output\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_OUT_H_IM, 0b00111100); // 使用到的引脚关闭High-Impedance\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_PULL_SEL, 0b11000011); // pull up/down select, 0 down, 1 up\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_PULL_EN, 0b11000011); // pull up/down enable, 0 disable, 1 enable\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_IN_DEF_STA, 0b00000011); // P0 P1 默认高电平, 按键按下触发中断\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_INT_MASK, 0b11111100); // P0 P1 中断使能 0 enable, 1 disable\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_OUT_SET, 0b10000000); // 默认输出为0\n    vTaskDelay(10 / portTICK_PERIOD_MS);\n    i2c_read_byte(PI4IO_M_ADDR, PI4IO_REG_IRQ_STA, &in_data); // 读取IRQ_STA清除标志\n\n    i2c_read_byte(PI4IO_M_ADDR, PI4IO_REG_OUT_SET, &in_data);\n    setbit(in_data, 6); // HIGH\n    i2c_write_byte(PI4IO_M_ADDR, PI4IO_REG_OUT_SET, in_data);\n}\n"
  },
  {
    "path": "variants/esp32c6/m5stack_unitc6l/variant.h",
    "content": "void c6l_init();\n\n#define HAS_GPS 1\n#define GPS_RX_PIN 4\n#define GPS_TX_PIN 5\n\n#define I2C_SDA 10\n#define I2C_SCL 8\n\n#define PIN_BUZZER 11\n\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n#define NEOPIXEL_DATA 2                      // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n#define ENABLE_AMBIENTLIGHTING               // Turn on Ambient Lighting\n\n// #define BUTTON_PIN 9\n#define BUTTON_EXTENDER\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n// WaveShare Core1262-868M OK\n// https://www.waveshare.com/wiki/Core1262-868M\n#define USE_SX1262\n\n#define LORA_MISO 22\n#define LORA_SCK 20\n#define LORA_MOSI 21\n#define LORA_CS 23\n#define LORA_RESET RADIOLIB_NC\n#define LORA_DIO1 7\n#define LORA_BUSY 19\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 3.0\n\n#define USE_SPISSD1306\n#ifdef USE_SPISSD1306\n#define SSD1306_NSS 6 // CS\n#define SSD1306_RS 18 // DC\n#define SSD1306_RESET 15\n// #define OLED_DG 1\n#endif\n#define SCREEN_TRANSITION_FRAMERATE 10\n#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness\n\n#define SERIAL_PRINT_PORT 1\n"
  },
  {
    "path": "variants/esp32c6/tlora_c6/platformio.ini",
    "content": "[env:tlora-c6]\nextends = esp32c6_base\nboard = esp32-c6-devkitm-1\nboard_level = pr\nbuild_flags = \n  ${esp32c6_base.build_flags}\n  -D TLORA_C6\n  -I variants/esp32c6/tlora_c6\n  -DARDUINO_USB_CDC_ON_BOOT=1\n  -DARDUINO_USB_MODE=1\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32c6/tlora_c6/variant.h",
    "content": "#define I2C_SDA 8 // I2C pins for this board\n#define I2C_SCL 9\n\n#define LED_POWER 7    // If defined we will blink this LED\n#define LED_STATE_ON 0 // State when LED is lit\n\n#define USE_SX1262\n#define LORA_SCK 6\n#define LORA_MISO 1\n#define LORA_MOSI 0\n#define LORA_CS 18\n#define LORA_RESET 21\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 23\n#define SX126X_DIO2 20\n#define SX126X_BUSY 22\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN 15\n#define SX126X_TXEN 14\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define SERIAL_PRINT_PORT 1\n"
  },
  {
    "path": "variants/esp32s2/esp32s2.ini",
    "content": "[esp32s2_base]\nextends = esp32_common\ncustom_esp32_kind = esp32s2\n\nbuild_src_filter = \n ${esp32_common.build_src_filter} - <libpax/> -<nimble/> -<mesh/raspihttp>\n\nmonitor_speed = 115200\n\nbuild_flags =\n  ${esp32_common.build_flags}\n  -DHAS_BLUETOOTH=0\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER\n  -DMESHTASTIC_EXCLUDE_BLUETOOTH\n\nlib_deps =\n  ${esp32_common.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master\n  https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip\n\nlib_ignore = \n  ${esp32_common.lib_ignore}\n  NimBLE-Arduino\n  libpax\n"
  },
  {
    "path": "variants/esp32s2/nugget_s2_lora/platformio.ini",
    "content": "[env:nugget-s2-lora]\nextends = esp32s2_base\nboard = lolin_s2_mini\nboard_level = extra\nbuild_flags = \n  ${esp32s2_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32s2/nugget_s2_lora\n"
  },
  {
    "path": "variants/esp32s2/nugget_s2_lora/variant.h",
    "content": "#define I2C_SDA 34 // I2C pins for this board\n#define I2C_SCL 36\n\n#define LED_POWER 15 // If defined we will blink this LED\n\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 3                     // How many neopixels are connected\n#define NEOPIXEL_DATA 12                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n#define BUTTON_PIN 0 // If defined, this will be used for user button presses\n#define BUTTON_NEED_PULLUP\n\n#define USE_RF95\n#define LORA_SCK 6\n#define LORA_MISO 8\n#define LORA_MOSI 10\n#define LORA_CS 13\n#define LORA_DIO0 16\n#define LORA_RESET 5\n\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC"
  },
  {
    "path": "variants/esp32s3/CDEBYTE_EoRa-Hub/pins_arduino.h",
    "content": "// Need this file for ESP32-S3\n// No need to modify this file, changes to pins imported from variant.h\n// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h\n\n#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n#include <variant.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// Serial\nstatic const uint8_t TX = UART_TX;\nstatic const uint8_t RX = UART_RX;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = LORA_CS;\nstatic const uint8_t SCK = LORA_SCK;\nstatic const uint8_t MOSI = LORA_MOSI;\nstatic const uint8_t MISO = LORA_MISO;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SCL = I2C_SCL;\nstatic const uint8_t SDA = I2C_SDA;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/CDEBYTE_EoRa-Hub/platformio.ini",
    "content": "[env:CDEBYTE_EoRa-Hub]\nextends = esp32s3_base\nboard = CDEBYTE_EoRa-Hub\nboard_level = extra\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32s3/CDEBYTE_EoRa-Hub\n"
  },
  {
    "path": "variants/esp32s3/CDEBYTE_EoRa-Hub/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\n// This is rewritten to match the requirements of the E80-900M2213S\n// The E80 does not conform to the reference Semtech switches(!) and therefore needs a custom matrix.\n// See footnote #3 in \"https://www.cdebyte.com/products/E80-900M2213S/2#Pin\"\n// RF Switch Matrix SubG RFO_HP_LF / RFO_LP_LF / RFI_[NP]_LF0\n// DIO5 -> RFSW0_V1\n// DIO6 -> RFSW1_V2\n// DIO7 -> not connected on E80 module - note that GNSS and Wifi scanning are not possible.\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC,\n                                             RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode             DIO5  DIO6  DIO7\n    {LR11x0::MODE_STBY, {LOW, LOW, LOW}},  {LR11x0::MODE_RX, {LOW, HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH, LOW}},  {LR11x0::MODE_TX_HP, {HIGH, LOW, LOW}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH}},\n    {LR11x0::MODE_WIFI, {LOW, LOW, LOW}},  END_OF_MODE_TABLE,\n};"
  },
  {
    "path": "variants/esp32s3/CDEBYTE_EoRa-Hub/variant.h",
    "content": "// EByte EoRA-Hub\n// Uses E80 (LR1121) LoRa module\n\n#define LED_POWER 35\n\n// Button - user interface\n#define BUTTON_PIN 0 // BOOT button\n\n#define BATTERY_PIN 1\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_MULTIPLIER 103.0 // Calibrated value\n#define ADC_ATTENUATION ADC_ATTEN_DB_0\n#define ADC_CTRL 37\n#define ADC_CTRL_ENABLED LOW\n\n// Display - OLED connected via I2C by the default hardware configuration\n#define HAS_SCREEN 1\n#define USE_SSD1306\n#define I2C_SCL 17\n#define I2C_SDA 18\n\n// UART - The 1mm JST SH connector closest to the USB-C port\n#define UART_TX 43\n#define UART_RX 44\n\n// Peripheral I2C - The 1mm JST SH connector furthest from the USB-C port which follows Adafruit connection standard. There are no\n// pull-up resistors on these lines, the downstream device needs to include them. TODO: test, currently untested\n#define I2C_SCL1 21\n#define I2C_SDA1 10\n\n// Radio\n#define USE_LR1121\n\n#define LORA_SCK 9\n#define LORA_MOSI 10\n#define LORA_MISO 11\n#define LORA_RESET 12\n#define LORA_CS 8\n#define LORA_DIO9 13\n\n// LR1121\n#define LR1121_IRQ_PIN 14\n#define LR1121_NRESET_PIN LORA_RESET\n#define LR1121_BUSY_PIN LORA_DIO9\n#define LR1121_SPI_NSS_PIN LORA_CS\n#define LR1121_SPI_SCK_PIN LORA_SCK\n#define LR1121_SPI_MOSI_PIN LORA_MOSI\n#define LR1121_SPI_MISO_PIN LORA_MISO\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.8\n#define LR11X0_DIO_AS_RF_SWITCH\n"
  },
  {
    "path": "variants/esp32s3/CDEBYTE_EoRa-S3/pins_arduino.h",
    "content": "// Need this file for ESP32-S3\n// No need to modify this file, changes to pins imported from variant.h\n// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h\n\n#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n#include <variant.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// Serial\nstatic const uint8_t TX = UART_TX;\nstatic const uint8_t RX = UART_RX;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = LORA_CS;\nstatic const uint8_t SCK = LORA_SCK;\nstatic const uint8_t MOSI = LORA_MOSI;\nstatic const uint8_t MISO = LORA_MISO;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SCL = I2C_SCL;\nstatic const uint8_t SDA = I2C_SDA;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/CDEBYTE_EoRa-S3/platformio.ini",
    "content": "[env:CDEBYTE_EoRa-S3]\ncustom_meshtastic_hw_model = 61\ncustom_meshtastic_hw_model_slug = CDEBYTE_EORA_S3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = EBYTE EoRa-S3\ncustom_meshtastic_tags = EByte\ncustom_meshtastic_requires_dfu = true\n\nextends = esp32s3_base\nboard = CDEBYTE_EoRa-S3\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  -D CDEBYTE_EORA_S3\n  -I variants/esp32s3/CDEBYTE_EoRa-S3\n"
  },
  {
    "path": "variants/esp32s3/CDEBYTE_EoRa-S3/variant.h",
    "content": "// LED - status indication\n#define LED_POWER 37\n\n// Button - user interface\n#define BUTTON_PIN 0 // This is the BOOT button, and it has its own pull-up resistor\n\n// SD card - TODO: test, currently untested, copied from T3S3 variant\n#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n// TODO: rename this to make this SD-card specific\n#define SPI_CS 13\n#define SPI_SCK 14\n#define SPI_MOSI 11\n#define SPI_MISO 2\n// FIXME: there are two other SPI pins that are not defined here\n// Compatibility\n#define SDCARD_CS SPI_CS\n\n// Battery voltage monitoring - TODO: test, currently untested, copied from T3S3 variant\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_MULTIPLIER                                                                                                           \\\n    2.11 // ratio of voltage divider = 2.0 (R10=1M, R13=1M), plus some undervoltage correction - TODO: this was carried over from\n         // the T3S3, test to see if the undervoltage correction is needed.\n\n// Display - OLED connected via I2C by the default hardware configuration\n#define HAS_SCREEN 1\n#define USE_SSD1306\n#define I2C_SCL 17\n#define I2C_SDA 18\n\n// UART - The 1mm JST SH connector closest to the USB-C port\n#define UART_TX 43\n#define UART_RX 44\n\n// Peripheral I2C - The 1mm JST SH connector furthest from the USB-C port which follows Adafruit connection standard. There are no\n// pull-up resistors on these lines, the downstream device needs to include them. TODO: test, currently untested\n#define I2C_SCL1 21\n#define I2C_SDA1 10\n\n// Radio\n#define USE_SX1262 // CDEBYTE EoRa-S3-900TB <- CDEBYTE E22-900MM22S <- Semtech SX1262\n#define USE_SX1268 // CDEBYTE EoRa-S3-400TB <- CDEBYTE E22-400MM22S <- Semtech SX1268\n\n#define SX126X_CS 7\n#define LORA_SCK 5\n#define LORA_MOSI 6\n#define LORA_MISO 3\n#define SX126X_RESET 8\n#define SX126X_BUSY 34\n#define SX126X_DIO1 33\n\n#define SX126X_DIO2_AS_RF_SWITCH // All switching is performed with DIO2, it is automatically inverted using circuitry.\n// CDEBYTE EoRa-S3 uses an XTAL, thus we do not need DIO3 as TCXO voltage reference. Don't define SX126X_DIO3_TCXO_VOLTAGE for\n// simplicity rather than defining it as 0.\n#define SX126X_MAX_POWER                                                                                                         \\\n    22 // E22-900MM22S and E22-400MM22S have a raw SX1262 or SX1268 respsectively, they are rated to output up and including 22\n       // dBm out of their SX126x IC.\n\n// Compatibility with old variant.h file structure - FIXME: this should be done in the respective radio interface modules to clean\n// up all variants.\n#define LORA_CS SX126X_CS\n#define LORA_DIO1 SX126X_DIO1"
  },
  {
    "path": "variants/esp32s3/EBYTE_ESP32-S3/pins_arduino.h",
    "content": "// Need this file for ESP32-S3\n// No need to modify this file, changes to pins imported from variant.h\n// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h\n\n#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n#include <variant.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// Serial\nstatic const uint8_t TX = UART_TX;\nstatic const uint8_t RX = UART_RX;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = LORA_CS;\nstatic const uint8_t SCK = LORA_SCK;\nstatic const uint8_t MOSI = LORA_MOSI;\nstatic const uint8_t MISO = LORA_MISO;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SCL = I2C_SCL;\nstatic const uint8_t SDA = I2C_SDA;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/EBYTE_ESP32-S3/platformio.ini",
    "content": "[env:EBYTE_ESP32-S3]\nextends = esp32s3_base\n; board assumes the lowest spec WROOM module: 4 MB (Quad SPI) Flash, No PSRAM\nboard = ESP32-S3-WROOM-1-N4\nboard_level = extra\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  -D EBYTE_ESP32_S3\n  -I variants/esp32s3/EBYTE_ESP32-S3\n"
  },
  {
    "path": "variants/esp32s3/EBYTE_ESP32-S3/variant.h",
    "content": "// Supporting information: https://github.com/S5NC/EBYTE_ESP32-S3/\n\n// Originally developed for E22-900M30S with ESP32-S3-WROOM-1-N4\n// NOTE: Uses ESP32-S3-WROOM-1-N4.json in boards folder (via platformio.ini board field), assumes 4 MB (quad SPI) flash, no PSRAM\n\n// FIXME: implement SX12 module type autodetection and have setup for each case (add E32 support)\n// E32 has same pinout except having extra pins. I assume that the GND on it is connected internally to other GNDs so it is not a\n// problem to NC the extra GND pins.\n\n// For each EBYTE module pin in this section, provide the pin number of the ESP32-S3 you connected it to\n// The ESP32-S3 is great because YOU CAN USE PRACTICALLY ANY PINS for the connections, but avoid some pins (such as on the WROOM\n// modules the following): strapping pins (except 0 as a user button input as it already has a pulldown resistor in typical\n// application schematic) (0, 3, 45, 46), USB-reserved (19, 20), and pins which aren't present on the WROOM-2 module for\n// compatiblity as it uses octal SPI, or are likely connected internally in either WROOM version (26-37), and avoid pins whose\n// voltages are set by the SPI voltage (47, 48), and pins that don't exist (22-25) You can ALSO set the SPI pins (SX126X_CS,\n// SX126X_SCK, SX126X_MISO, SX126X_MOSI) to any pin with the ESP32-S3 due to \\ GPIO Matrix / IO MUX / RTC IO MUX \\, and also the\n// serial pins, but this isn't recommended for Serial0 as the WROOM modules have a 499 Ohm resistor on U0TXD (to reduce harmonics\n// but also acting as a sort of protection)\n\n// We have many free pins on the ESP32-S3-WROOM-X-Y module, perhaps it is best to use one of its pins to control TXEN, and use\n// DIO2 as an extra interrupt, but right now Meshtastic does not benefit from having another interrupt pin available.\n\n// Adding two 0-ohm links on your PCB design so that you can choose between the two modes for controlling the E22's TXEN would\n// enable future software to make the most of an extra available interrupt pin\n\n// Possible improvement: can add extremely low resistance MOSFET to physically toggle power to E22 module when in full sleep (not\n// waiting for interrupt)?\n\n// PA stands for Power Amplifier, used when transmitting to increase output power\n// LNA stands for Low Noise Amplifier, used when \\ listening for / receiving \\ data to increase sensitivity\n\n//////////////////////////////////////////////////////////////////////////////////\n//                                                                              //\n//   Have custom connections or functionality? Configure them in this section   //\n//                                                                              //\n//////////////////////////////////////////////////////////////////////////////////\n\n#define SX126X_CS 14    // EBYTE module's NSS pin // FIXME: rename to SX126X_SS\n#define LORA_SCK 21     // EBYTE module's SCK pin\n#define LORA_MOSI 38    // EBYTE module's MOSI pin\n#define LORA_MISO 39    // EBYTE module's MISO pin\n#define SX126X_RESET 40 // EBYTE module's NRST pin\n#define SX126X_BUSY 41  // EBYTE module's BUSY pin\n#define SX126X_DIO1 42  // EBYTE module's DIO1 pin\n// We don't define a pin for SX126X_DIO2 as Meshtastic doesn't use it as an interrupt output, so it is never connected to an MCU\n// pin! Also E22 module datasheets say not to connect it to an MCU pin.\n// We don't define a pin for SX126X_DIO3 as Meshtastic doesn't use it as an interrupt output, so it is never connected to an MCU\n// pin! Also E22 module datasheets say to use it as the TCXO's reference voltage.\n// E32 module (which uses SX1276) may not have ability to set TCXO voltage using a DIO pin.\n\n// The radio module needs to be told whether to enable RX mode or TX mode. Each radio module takes different actions based on\n// these values, but generally the path from the antenna to SX1262 is changed from signal output to signal input. Also, if there\n// are LNAs (Low-Noise Amplifiers) or PAs (Power Amplifiers) in the output or input paths, their power is also controlled by\n// these pins. You should never have both TXEN and RXEN set high, this can cause problems for some radio modules, and is\n// commonly referred to as 'undefined behaviour' in datasheets. For the SX1262, you shouldn't connect DIO2 to the MCU. DIO2 is\n// an output only, and can be controlled via SPI instructions, the use for this is to save an MCU pin by using the DIO2 pin to\n// control the RF switching mode.\n\n// Choose ONLY ONE option from below, comment in/out the '/*'s and '*/'s\n// SX126X_TXEN is the E22's [SX1262's] TXEN pin, SX126X_RXEN is the E22's [SX1262's] RXEN pin\n\n// Option 1: E22's TXEN pin connected to E22's DIO2 pin, E22's RXEN pin connected to NEGATED output of E22's DIO2 pin (more\n// expensive option hardware-wise, is the 'most proper' way, removes need for routing one/two traces from MCU to RF switching\n// pins), however you can't have E22 in low-power 'sleep' mode (TXEN and RXEN both low cannot be achieved this this option).\n/*\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_RXEN RADIOLIB_NC\n*/\n\n// Option 2: E22's TXEN pin connected to E22's DIO2 pin, E22's RXEN pin connected to MCU pin (cheaper option hardware-wise,\n// removes need for routing another trace from MCU to an RF switching pin).\n// /*\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_RXEN 10\n// */\n\n// Option 3: E22's TXEN pin connected to MCU pin, E22's RXEN pin connected to MCU pin (cheaper option hardware-wise, allows for\n// ramping up PA before transmission (add/expand on feature yourself in RadioLib) if PA takes a while to stabilise)\n// Don't define DIO2_AS_RF_SWITCH because we only use DIO2 or an MCU pin mutually exclusively to connect to E22's TXEN (to prevent\n// a short if they are both connected at the same time (suboptimal PCB design) and there's a slight non-neglibible delay and/or\n// voltage difference between DIO2 and TXEN). Can use DIO2 as an IRQ (but not in Meshtastic at the moment).\n/*\n#define SX126X_TXEN 9\n#define SX126X_RXEN 10\n*/\n\n// (NOT RECOMMENDED, if need to ramp up PA before transmission, better to use option 3)\n// Option 4: E22's TXEN pin connected to MCU pin, E22's RXEN pin connected to NEGATED output of E22's DIO2 pin (more expensive\n// option hardware-wise, allows for ramping up PA before transmission (add/expand on feature yourself in RadioLib) if PA takes\n// a while to stabilise, removes need for routing another trace from MCU to an RF switching pin, however may mean if in\n// RadioLib you don't tell DIO2 to go high to indicate transmission (so the negated output goes to RXEN to turn the LNA off)\n// then you may end up enabling E22's TXEN and RXEN pins at the same time whilst you ramp up the PA which is not ideal,\n// changing DIO2's switching advance in RadioLib may not even be possible, may be baked into the SX126x).\n/*\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_TXEN 9\n#define SX126X_RXEN RADIOLIB_NC\n*/\n\n// Status\n#define LED_POWER 1\n#define LED_STATE_ON 1 // State when LED is lit\n// External notification\n// FIXME: Check if EXT_NOTIFY_OUT actualy has any effect and removes the need for setting the external notication pin in the\n// app/preferences\n#define EXT_NOTIFY_OUT 2 // The GPIO pin that acts as the external notification output (here we connect an LED to it)\n// Buzzer\n#define PIN_BUZZER 11\n// Buttons\n#define BUTTON_PIN 0 // Use the BOOT button as the user button\n// I2C\n#define I2C_SCL 18\n#define I2C_SDA 8\n// UART\n#define UART_TX 43\n#define UART_RX 44\n\n// Power\n// Outputting 22dBm from SX1262 results in ~30dBm E22-900M30S output (module only uses last stage of the YP2233W PA)\n// Respect local regulations! If your E22-900M30S outputs the advertised 30 dBm and you use a 6 dBi antenna, you are at the\n// equivalent of 36 EIRP (Effective Isotropic Radiated Power), which in this case is the limit for non-HAM users in the US (4W\n// EIRP, at SPECIFIC frequencies).\n// In the EU (and UK), as of now, you are allowed 27 dBm ERP which is 29.15 EIRP.\n// https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32022D0180\n// https://www.legislation.gov.uk/uksi/1999/930/schedule/6/made\n// To respect the 29.15 dBm EIRP (at SPECIFIC frequencies, others are lower) EU limit with a 2.5 dBi gain antenna, consulting\n// https://github.com/S5NC/EBYTE_ESP32-S3/blob/main/power%20testing.txt, assuming 0.1 dBm insertion loss, output 20 dBm from the\n// E22-900M30S's SX1262. It is worth noting that if you are in this situation and don't have a HAM license, you may be better off\n// with a lower gain antenna, and output the difference as a higher total power input into the antenna, as your EIRP would be the\n// same, but you would get a wider angle of coverage. Also take insertion loss and possibly VSWR into account\n// (https://www.everythingrf.com/tech-resources/vswr). Please check regulations yourself and check airtime, usage (for example\n// whether you are airborne), frequency, and power laws.\n#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice\n\n// Display\n// FIXME: change behavior in src to default to not having screen if is undefined\n// FIXME: remove 0/1 option for HAS_SCREEN in src, change to being defined or not\n// FIXME: check if it actually causes a crash when not specifiying that a display isn't present\n#define HAS_SCREEN 0 // Assume no screen present by default to prevent crash...\n\n// GPS\n// FIXME: unsure what to define HAS_GPS as if GPS isn't always present\n#define HAS_GPS 1 // Don't need to set this to 0 to prevent a crash as it doesn't crash if GPS not found, will probe by default\n#define PIN_GPS_EN 15\n#define GPS_EN_ACTIVE 1\n#define GPS_TX_PIN 16\n#define GPS_RX_PIN 17\n\n/////////////////////////////////////////////////////////////////////////////////\n//                                                                             //\n//   You should have no need to modify the code below, nor in pins_arduino.h   //\n//                                                                             //\n/////////////////////////////////////////////////////////////////////////////////\n\n#define USE_SX1262 // E22-900M30S, E22-900M22S, and E22-900MM22S (not E220!) use SX1262\n#define USE_SX1268 // E22-400M30S, E22-400M33S, E22-400M22S, and E22-400MM22S use SX1268\n\n// The below isn't needed as we directly define SX126X_TXEN and SX126X_RXEN instead of using proxies E22_TXEN and E22_RXEN\n/*\n// FALLBACK: If somehow E22_TXEN isn't defined or clearly isn't a valid pin number, set it to RADIOLIB_NC to avoid SX126X_TXEN\nbeing defined but having no value #if (!defined(E22_TXEN) || !(0 <= E22_TXEN && E22_TXEN <= 48)) #define E22_TXEN RADIOLIB_NC\n#endif\n// FALLBACK: If somehow E22_RXEN isn't defined or clearly isn't a valid pin number, set it to RADIOLIB_NC to avoid SX126X_RXEN\nbeing defined but having no value #if (!defined(E22_RXEN) || !(0 <= E22_RXEN && E22_RXEN <= 48)) #define E22_RXEN RADIOLIB_NC\n#endif\n#define SX126X_TXEN E22_TXEN\n#define SX126X_RXEN E22_RXEN\n*/\n\n// E22 series TCXO voltage is 1.8V per https://www.ebyte.com/en/pdf-down.aspx?id=781 (source\n// https://github.com/jgromes/RadioLib/issues/12#issuecomment-520695575), so set it as such\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src\n\n// Many of the below values would only be used if USE_RF95 was defined, but it's not as we aren't actually using an RF95, just\n// that the 4 pins above are named like it If they aren't used they don't need to be defined and doing so cause confusion to those\n// adapting this file LORA_RESET value is never used in src (as we are not using RF95), so no need to define LORA_DIO0 is not used\n// in src (as we are not using RF95) as SX1262 does not have it per SX1262 datasheet, so no need to define\n// FIXME: confirm that the linked lines below are actually only called when using the SX126x or SX128x and no other modules\n// then use SX126X_DIO1 and SX128X_DIO1 respectively for that purpose, removing the need for RF95-style LORA_* definitions when\n// the RF95 isn't used\n#define LORA_DIO1                                                                                                                \\\n    SX126X_DIO1 // The old name is used in\n                // https://github.com/meshtastic/firmware/blob/7eff5e7bcb2084499b723c5e3846c15ee089e36d/src/sleep.cpp#L298, so\n                // must also define the old name\n// LORA_DIO2 value is never used in src (as we are not using RF95), so no need to define, and if DIO2_AS_RF_SWITCH is set then it\n// cannot serve any extra function even if requested to LORA_DIO3 value is never used in src (as we are not using RF95), so no\n// need to define, and DIO3_AS_TCXO_AT_1V8 is set so it cannot serve any extra function even if requested to (from 13.3.2.1\n// DioxMask in SX1262 datasheet: Note that if DIO2 or DIO3 are used to control the RF Switch or the TCXO, the IRQ will not be\n// generated even if it is mapped to the pins.)"
  },
  {
    "path": "variants/esp32s3/ELECROW-ThinkNode-M2/pins_arduino.h",
    "content": "// Need this file for ESP32-S3\n// No need to modify this file, changes to pins imported from variant.h\n// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h\n\n#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n#include <variant.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// Serial\nstatic const uint8_t TX = UART_TX;\nstatic const uint8_t RX = UART_RX;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = LORA_CS;\nstatic const uint8_t SCK = LORA_SCK;\nstatic const uint8_t MOSI = LORA_MOSI;\nstatic const uint8_t MISO = LORA_MISO;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SCL = I2C_SCL;\nstatic const uint8_t SDA = I2C_SDA;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/ELECROW-ThinkNode-M2/platformio.ini",
    "content": "[env:thinknode_m2]\ncustom_meshtastic_hw_model = 90\ncustom_meshtastic_hw_model_slug = THINKNODE_M2\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = ThinkNode M2\ncustom_meshtastic_images = thinknode_m2.svg\ncustom_meshtastic_tags = Elecrow\ncustom_meshtastic_requires_dfu = false\n\nextends = esp32s3_base\nboard = ESP32-S3-WROOM-1-N4\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  -D ELECROW_ThinkNode_M2\n  -I variants/esp32s3/ELECROW-ThinkNode-M2\n"
  },
  {
    "path": "variants/esp32s3/ELECROW-ThinkNode-M2/variant.h",
    "content": "#define PIN_BUTTON1 47 // 功能键\n#define PIN_BUTTON2 4  // 电源键\n#define ALT_BUTTON_PIN PIN_BUTTON2\n#define ALT_BUTTON_ACTIVE_LOW false\n#define ALT_BUTTON_ACTIVE_PULLUP false\n\n#define LED_POWER 6\n#define ADC_V 42\n// USB_CHECK\n#define EXT_PWR_DETECT 7\n\n#define PIN_BUZZER 5\n\n#define I2C_SCL 15\n#define I2C_SDA 16\n\n#define UART_TX 43\n#define UART_RX 44\n\n#define VEXT_ENABLE 46 // for OLED\n#define VEXT_ON_VALUE HIGH\n\n#define SX126X_CS 10\n#define LORA_SCK 12\n#define LORA_MOSI 11\n#define LORA_MISO 13\n#define SX126X_RESET 21\n#define SX126X_BUSY 14\n#define SX126X_DIO1 3\n#define SX126X_DIO2_AS_RF_SWITCH\n// #define SX126X_DIO3 9\n#define SX126X_DIO3_TCXO_VOLTAGE 3.3\n\n#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice\n#define USE_SX1262\n#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src\n#define LORA_DIO1 SX126X_DIO1\n#define SX126X_POWER_EN 48\n\n// Battery\n// #define BATTERY_PIN 2\n#define BATTERY_PIN 17\n// #define ADC_CHANNEL ADC1_GPIO2_CHANNEL\n#define ADC_CHANNEL ADC2_GPIO17_CHANNEL\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (1.548F)\n#define BAT_MEASURE_ADC_UNIT 2\n\n#define HAS_SCREEN 1\n#define USE_SH1106 1\n\n#define HAS_GPS 0\n\n#define BUTTON_PIN PIN_BUTTON1\n"
  },
  {
    "path": "variants/esp32s3/ELECROW-ThinkNode-M5/pins_arduino.h",
    "content": "// Need this file for ESP32-S3\n// No need to modify this file, changes to pins imported from variant.h\n// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h\n\n#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n#include <variant.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// Serial\nstatic const uint8_t TX = UART_TX;\nstatic const uint8_t RX = UART_RX;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = LORA_CS;\nstatic const uint8_t SCK = LORA_SCK;\nstatic const uint8_t MOSI = LORA_MOSI;\nstatic const uint8_t MISO = LORA_MISO;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SCL = I2C_SCL;\nstatic const uint8_t SDA = I2C_SDA;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini",
    "content": "[env:thinknode_m5]\ncustom_meshtastic_hw_model = 107\ncustom_meshtastic_hw_model_slug = THINKNODE_M5\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = ThinkNode M5\ncustom_meshtastic_images = thinknode_m1.svg\ncustom_meshtastic_tags = Elecrow\ncustom_meshtastic_requires_dfu = false\n\nextends = esp32s3_base\nboard = ESP32-S3-WROOM-1-N4\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  +<../variants/esp32s3/ELECROW-ThinkNode-M5>\n\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  -D ELECROW_ThinkNode_M5\n  -I variants/esp32s3/ELECROW-ThinkNode-M5\n  -DEINK_DISPLAY_MODEL=GxEPD2_154_D67\n  -DEINK_WIDTH=200\n  -DEINK_HEIGHT=200\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted    //20\n  -DEINK_LIMIT_RATE_BACKGROUND_SEC=10  ; Minimum interval between BACKGROUND updates          //30\n  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n;   -DEINK_LIMIT_GHOSTING_PX=2000        ; (Optional) How much image ghosting is tolerated\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n  # renovate: datasource=custom.pio depName=PCA9557-arduino packageName=maxpromer/library/PCA9557-arduino\n  maxpromer/PCA9557-arduino@1.0.0\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4"
  },
  {
    "path": "variants/esp32s3/ELECROW-ThinkNode-M5/variant.cpp",
    "content": "#include \"variant.h\"\n#include <PCA9557.h>\n\nPCA9557 io(0x18, &Wire1);\n\nvoid earlyInitVariant()\n{\n    Wire1.begin(48, 47);\n    io.pinMode(PCA_PIN_EINK_EN, OUTPUT);\n    io.pinMode(PCA_PIN_POWER_EN, OUTPUT);\n    io.pinMode(PCA_LED_POWER, OUTPUT);\n    io.pinMode(PCA_LED_USER, OUTPUT);\n    io.pinMode(PCA_LED_ENABLE, OUTPUT);\n\n    io.digitalWrite(PCA_PIN_POWER_EN, HIGH);\n    io.digitalWrite(PCA_LED_USER, LOW);\n    io.digitalWrite(PCA_LED_ENABLE, LOW);\n}\n\nvoid variant_shutdown()\n{\n    io.digitalWrite(PCA_PIN_POWER_EN, LOW);\n}\n"
  },
  {
    "path": "variants/esp32s3/ELECROW-ThinkNode-M5/variant.h",
    "content": "#ifndef ELECROW_ThinkNode_M5_VAR\n#define ELECROW_ThinkNode_M5_VAR\n\n#define UART_TX 43\n#define UART_RX 44\n\n#define HAS_PCA9557\n\n// LED\n// Both of these are on the GPIO expander\n#define PCA_LED_USER 1   // the Blue LED\n#define PCA_LED_ENABLE 2 // the power supply to the LEDs, in an OR arrangement with VBUS power\n#define PCA_LED_POWER 3  // the Red LED? Seems to have hardware logic to blink when USB is plugged in.\n#define POWER_LED_HARDWARE_BLINKS_WHILE_CHARGING\n\n// USB_CHECK\n#define EXT_PWR_DETECT 12\n#define BATTERY_PIN 8\n#define ADC_CHANNEL ADC1_GPIO8_CHANNEL\n\n#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.\n\n#define PIN_BUZZER 9\n\n// Buttons\n\n#define PIN_BUTTON2 14\n#define PIN_BUTTON1 21\n\n// Wire Interfaces\n\n#define I2C_SCL 1\n#define I2C_SDA 2\n\n// PCF8563 RTC Module\n#define PCF8563_RTC 0x51\n\n// GPS pins\n#define GPS_SWITH 10\n#define HAS_GPS 1\n#define GPS_L76K\n#define PIN_GPS_REINIT 13 // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n\n#define PIN_GPS_STANDBY 11 // An output to wake GPS, low means allow sleep, high means force wake\n\n#define GPS_TX_PIN 20 // This is for bits going TOWARDS the CPU\n#define GPS_RX_PIN 19 // This is for bits going TOWARDS the GPS\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_TX_PIN\n#define PIN_SERIAL1_TX GPS_RX_PIN\n\n#define SX126X_CS 17\n#define LORA_SCK 16\n#define LORA_MOSI 15\n#define LORA_MISO 7\n#define SX126X_RESET 6\n#define SX126X_BUSY 5\n#define SX126X_DIO1 4\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 3.3\n#define SX126X_POWER_EN 46\n#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice\n#define USE_SX1262\n#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src\n#define LORA_DIO1 SX126X_DIO1\n\n#define USE_EINK\n// Note: this is really just backlight power\n#define PCA_PIN_EINK_EN 5 // This is the pin number on the GPIO expander\n#define PIN_EINK_CS 39\n#define PIN_EINK_BUSY 42\n#define PIN_EINK_DC 40\n#define PIN_EINK_RES 41\n#define PIN_EINK_SCLK 38\n#define PIN_EINK_MOSI 45 // also called SDI\n\n// Controls power for all peripherals (eink + GPS + LoRa + Sensor)\n#define PIN_POWER_EN -1\n#define PCA_PIN_POWER_EN 4 // This is the pin number on the GPIO expander\n\n#define PIN_SPI_MISO 7\n#define PIN_SPI_MOSI 15\n#define PIN_SPI_SCK 16\n\n#define BUTTON_PIN PIN_BUTTON1\n#define BUTTON_PIN_ALT PIN_BUTTON2\n\n#define SERIAL_PRINT_PORT 0\n#endif\n"
  },
  {
    "path": "variants/esp32s3/bpi_picow_esp32_s3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 12;\nstatic const uint8_t SCL = 14;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 39;\nstatic const uint8_t SCK = 21;\nstatic const uint8_t MOSI = 38;\nstatic const uint8_t SS = 17;\n\n// #define SPI_MOSI                    (11)\n// #define SPI_SCK                     (14)\n// #define SPI_MISO                    (2)\n// #define SPI_CS                      (13)\n\n// #define SDCARD_CS                   SPI_CS\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/bpi_picow_esp32_s3/platformio.ini",
    "content": "[env:bpi_picow_esp32_s3]\nextends = esp32s3_base\nboard = bpi_picow_esp32_s3\nboard_level = extra\n;OpenOCD flash method\n;upload_protocol = esp-builtin\n;Normal method\nupload_protocol = esptool\n;upload_port = /dev/ttyACM2\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=caveman99-ESP32_Codec2 packageName=caveman99/library/ESP32 Codec2\n  caveman99/ESP32 Codec2@1.0.1\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32s3/bpi_picow_esp32_s3\n"
  },
  {
    "path": "variants/esp32s3/bpi_picow_esp32_s3/variant.h",
    "content": "#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n// #define HAS_SCREEN 0\n\n// #define HAS_SDCARD\n// #define SDCARD_USE_SPI1\n\n#define USE_SSD1306\n#define I2C_SDA 12\n#define I2C_SCL 14\n\n#define LED_POWER 46\n#define LED_STATE_ON 0 // State when LED is litted\n\n// #define BUTTON_PIN 15 // Pico OLED 1.3 User key 0 - removed User key 1 (17)\n\n#define BUTTON_PIN 40\n// #define BUTTON_PIN 0 // This is the BOOT button pad at the moment\n// #define BUTTON_NEED_PULLUP\n\n// #define USE_RF95   // RFM95/SX127x\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n// WaveShare Core1262-868M OK\n// https://www.waveshare.com/wiki/Core1262-868M\n#define USE_SX1262\n\n#ifdef USE_SX1262\n#define LORA_MISO 39\n#define LORA_SCK 21\n#define LORA_MOSI 38\n#define LORA_CS 17\n#define LORA_RESET 42\n#define LORA_DIO1 5\n#define LORA_BUSY 47\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n// #define USE_SX1280\n#ifdef USE_SX1280\n#define LORA_MISO 1\n#define LORA_SCK 3\n#define LORA_MOSI 4\n#define LORA_CS 2\n#define LORA_RESET 17\n#define LORA_DIO1 12\n#define LORA_BUSY 47\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 LORA_DIO1\n#define SX128X_BUSY LORA_BUSY\n#define SX128X_RESET LORA_RESET\n#endif\n\n// #define USE_EINK\n/*\n * eink display pins\n */\n// #define PIN_EINK_CS\n// #define PIN_EINK_BUSY\n// #define PIN_EINK_DC\n// #define PIN_EINK_RES    (-1)\n// #define PIN_EINK_SCLK   3\n// #define PIN_EINK_MOSI   4\n"
  },
  {
    "path": "variants/esp32s3/crowpanel-esp32s3-5-epaper/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 21;\nstatic const uint8_t SCL = 15;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 14;\nstatic const uint8_t MOSI = 8;\nstatic const uint8_t MISO = 9;\nstatic const uint8_t SCK = 3;\n\n#define SPI_MOSI (40)\n#define SPI_SCK (39)\n#define SPI_MISO (13)\n#define SPI_CS (10)\n// IO42 TF_3V3_CTL\n#define SDCARD_CS SPI_CS\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/crowpanel-esp32s3-5-epaper/platformio.ini",
    "content": "[env:crowpanel-esp32s3-5-epaper]\nextends = esp32s3_base\nboard_build.arduino.memory_type = qio_opi\nboard_build.flash_mode = qio\nboard_build.psram_type = opi\nboard_upload.flash_size = 8MB\nboard_upload.maximum_size = 8388608\nboard_build.partitions = default_8MB.csv\nboard = esp32-s3-devkitc-1\n;upload_port = /dev/ttyUSB0\nboard_level = extra\nupload_protocol = esptool\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D CROWPANEL_ESP32S3_5_EPAPER\n  -I variants/esp32s3/crowpanel-esp32s3-5-epaper\n  -D PRIVATE_HW\n  -DBOARD_HAS_PSRAM\n  -DEINK_DISPLAY_MODEL=GxEPD2_579_GDEY0579T93 ;https://www.good-display.com/product/439.html\n  -DEINK_WIDTH=792\n  -DEINK_HEIGHT=272\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=100          ; How many consecutive fast-refreshes are permitted\n  ;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  ;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 \nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n\n[env:crowpanel-esp32s3-4-epaper]\nextends = esp32s3_base\nboard_build.arduino.memory_type = qio_opi\nboard_build.flash_mode = qio\nboard_build.psram_type = opi\nboard_upload.flash_size = 8MB\nboard_upload.maximum_size = 8388608\nboard_build.partitions = default_8MB.csv\nboard = esp32-s3-devkitc-1\n;upload_port = /dev/ttyUSB0\nboard_level = extra\nupload_protocol = esptool\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D CROWPANEL_ESP32S3_4_EPAPER\n  -I variants/esp32s3/crowpanel-esp32s3-5-epaper\n  -D PRIVATE_HW\n  -DBOARD_HAS_PSRAM\n  -DEINK_DISPLAY_MODEL=GxEPD2_420_GYE042A87   ; similar Panel: GDEY042T81 : https://www.good-display.com/product/386.html\n  -DEINK_WIDTH=400\n  -DEINK_HEIGHT=300\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=100          ; How many consecutive fast-refreshes are permitted\n  ;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  ;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 \nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n\n[env:crowpanel-esp32s3-2-epaper]\nextends = esp32s3_base\nboard_build.arduino.memory_type = qio_opi\nboard_build.flash_mode = qio\nboard_build.psram_type = opi\nboard_upload.flash_size = 8MB\nboard_upload.maximum_size = 8388608\nboard_build.partitions = default_8MB.csv\nboard = esp32-s3-devkitc-1\n;upload_port = /dev/ttyUSB0\nboard_level = extra\nupload_protocol = esptool\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D CROWPANEL_ESP32S3_2_EPAPER\n  -I variants/esp32s3/crowpanel-esp32s3-5-epaper\n  -D PRIVATE_HW\n  -DBOARD_HAS_PSRAM\n  -DEINK_DISPLAY_MODEL=GxEPD2_290_GDEY029T94 ;https://www.good-display.com/product/389.html\n  -DEINK_WIDTH=296\n  -DEINK_HEIGHT=128\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=100          ; How many consecutive fast-refreshes are permitted\n  ;-DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  ;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 \nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n"
  },
  {
    "path": "variants/esp32s3/crowpanel-esp32s3-5-epaper/variant.h",
    "content": "#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n\n// Display (E-Ink)\n#define USE_EINK\n#define PIN_EINK_CS 45\n#define PIN_EINK_BUSY 48\n#define PIN_EINK_DC 46\n#define PIN_EINK_RES 47\n#define PIN_EINK_SCLK 12\n#define PIN_EINK_MOSI 11\n#define VEXT_ENABLE 7 // e-ink power enable pin\n#define VEXT_ON_VALUE HIGH\n\n#define PIN_POWER_EN 42 // TF/SD Card Power Enable Pin\n\n// #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to\n//  measure battery voltage ratio of voltage divider = 2.0 (assumption)\n// #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.\n// #define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n\n#define I2C_SDA SDA // 21\n#define I2C_SCL SCL // 15\n\n#define GPS_DEFAULT_NOT_PRESENT 1\n// #define GPS_RX_PIN 44\n// #define GPS_TX_PIN 43\n\n#define LED_POWER 41\n#define BUTTON_PIN 2\n#define BUTTON_NEED_PULLUP\n\n// Buzzer - noisy ?\n#define PIN_BUZZER (0 + 18)\n\n// Wheel\n//  Up         6\n//  Push       5\n//  Down       4\n// MENU Top    2\n// EXIT Bottom 1\n\n// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and\n// we will probe at runtime for RF95 and if not found then probe for SX1262\n// #define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n// #define USE_SX1280\n\n#define LORA_SCK 3\n#define LORA_MISO 9\n#define LORA_MOSI 8\n#define LORA_CS 14\n#define LORA_RESET 38\n\n#define LORA_DIO1 16\n#define LORA_DIO2 17\n\n// per SX1262_Receive_Interrupt/utilities.h\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n// per SX128x_Receive_Interrupt/utilities.h\n#ifdef USE_SX1280\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 LORA_DIO1\n#define SX128X_BUSY LORA_DIO2\n#define SX128X_RESET LORA_RESET\n#define SX128X_RXEN 21\n#define SX128X_TXEN 15\n#define SX128X_MAX_POWER 3\n#endif\n"
  },
  {
    "path": "variants/esp32s3/diy/my_esp32s3_diy_eink/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 18;\nstatic const uint8_t SCL = 17;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 3;\nstatic const uint8_t SCK = 5;\nstatic const uint8_t MOSI = 6;\nstatic const uint8_t SS = 7;\n\n// #define SPI_MOSI                    (11)\n// #define SPI_SCK                     (14)\n// #define SPI_MISO                    (2)\n// #define SPI_CS                      (13)\n\n// #define SDCARD_CS                   SPI_CS\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/diy/my_esp32s3_diy_eink/platformio.ini",
    "content": "[env:my-esp32s3-diy-eink]\nboard_level = extra\nextends = esp32s3_base\nboard = my_esp32s3_diy_eink\nboard_build.arduino.memory_type = dio_opi\nboard_build.mcu = esp32s3\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\n;upload_port = /dev/ttyACM1\nupload_speed = 921600\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\nbuild_unflags =\n  ${esp32s3_base.build_unflags}\n  -DARDUINO_USB_MODE=1\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32s3/diy/my_esp32s3_diy_eink\n  -Dmy\n  -DEINK_DISPLAY_MODEL=GxEPD2_290_T5D\n  -DEINK_WIDTH=296\n  -DEINK_HEIGHT=128\n  -DBOARD_HAS_PSRAM\n  -mfix-esp32-psram-cache-issue\n  -DARDUINO_USB_MODE=0\n"
  },
  {
    "path": "variants/esp32s3/diy/my_esp32s3_diy_eink/variant.h",
    "content": "#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n// #define HAS_SCREEN 0\n// #define HAS_SDCARD\n// #define SDCARD_USE_SPI1\n\n// #define USE_SSD1306\n\n#define I2C_SDA 18 // 1 // I2C pins for this board\n#define I2C_SCL 17 // 2\n\n// #define LED_POWER 38     // This is a RGB LED not a standard LED\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n#define NEOPIXEL_DATA 38                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n#define BUTTON_PIN 0 // This is the BOOT button\n#define BUTTON_NEED_PULLUP\n\n// #define USE_RF95 // RFM95/SX127x\n// #define USE_SX1262\n#define USE_SX1280\n\n#define LORA_MISO 3\n#define LORA_SCK 5\n#define LORA_MOSI 6\n#define LORA_CS 7\n\n#define LORA_RESET 8\n#define LORA_DIO1 16\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY 15\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN 4\n#define SX126X_TXEN 9\n#endif\n\n#ifdef USE_SX1280\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 LORA_DIO1\n#define SX128X_BUSY 15\n#define SX128X_RESET LORA_RESET\n#endif\n\n#define USE_EINK\n/*\n * eink display pins\n */\n#define PIN_EINK_CS 13\n#define PIN_EINK_BUSY 2\n#define PIN_EINK_DC 1\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK 5\n#define PIN_EINK_MOSI 6"
  },
  {
    "path": "variants/esp32s3/diy/my_esp32s3_diy_oled/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 18;\nstatic const uint8_t SCL = 17;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 3;\nstatic const uint8_t SCK = 5;\nstatic const uint8_t MOSI = 6;\nstatic const uint8_t SS = 7;\n\n// #define SPI_MOSI                    (11)\n// #define SPI_SCK                     (14)\n// #define SPI_MISO                    (2)\n// #define SPI_CS                      (13)\n\n// #define SDCARD_CS                   SPI_CS\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/diy/my_esp32s3_diy_oled/platformio.ini",
    "content": "[env:my-esp32s3-diy-oled]\nboard_level = extra\nextends = esp32s3_base\nboard = my-esp32s3-diy-oled\nboard_build.arduino.memory_type = dio_opi\nboard_build.mcu = esp32s3\nboard_build.f_cpu = 240000000L\nupload_protocol = esptool\n;upload_port = /dev/ttyACM0\nupload_speed = 921600\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\nbuild_unflags =\n  ${esp32s3_base.build_unflags}\n  -DARDUINO_USB_MODE=1\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32s3/diy/my_esp32s3_diy_oled\n  -DBOARD_HAS_PSRAM\n  -mfix-esp32-psram-cache-issue\n  -DARDUINO_USB_MODE=0\n"
  },
  {
    "path": "variants/esp32s3/diy/my_esp32s3_diy_oled/variant.h",
    "content": "#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n// #define HAS_SCREEN 0\n// #define HAS_SDCARD\n// #define SDCARD_USE_SPI1\n\n#define USE_SSD1306\n\n#define I2C_SDA 18 // 1 // I2C pins for this board\n#define I2C_SCL 17 // 2\n\n// #define LED_POWER 38     // This is a RGB LED not a standard LED\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n#define NEOPIXEL_DATA 38                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n#define BUTTON_PIN 0 // This is the BOOT button\n#define BUTTON_NEED_PULLUP\n\n// #define USE_RF95 // RFM95/SX127x\n// #define USE_SX1262\n#define USE_SX1280\n\n#define LORA_MISO 3\n#define LORA_SCK 5\n#define LORA_MOSI 6\n#define LORA_CS 7\n\n#define LORA_RESET 8\n#define LORA_DIO1 16\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY 15\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN 4\n#define SX126X_TXEN 9\n#endif\n\n#ifdef USE_SX1280\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 LORA_DIO1\n#define SX128X_BUSY 15\n#define SX128X_RESET LORA_RESET\n#endif\n\n// #define USE_EINK\n/*\n * eink display pins\n */\n// #define PIN_EINK_CS     13\n// #define PIN_EINK_BUSY   2\n// #define PIN_EINK_DC     1\n// #define PIN_EINK_RES    (-1)\n// #define PIN_EINK_SCLK   5\n// #define PIN_EINK_MOSI   6"
  },
  {
    "path": "variants/esp32s3/diy/t-energy-s3_e22/platformio.ini",
    "content": "; NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY\n[env:t-energy-s3_e22]\nextends = esp32s3_base\nboard = esp32-s3-devkitc-1\nboard_build.partitions = default_16MB.csv\nboard_level = extra\nboard_upload.flash_size = 16MB ;Specify the FLASH capacity as 16MB\nboard_build.arduino.memory_type = qio_opi ;Enable internal PSRAM\nbuild_unflags =\n  ${esp32s3_base.build_unflags}\n  -D ARDUINO_USB_MODE=1\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  -D EBYTE_ESP32_S3\n  -D BOARD_HAS_PSRAM\n  -D ARDUINO_USB_MODE=0\n  -D ARDUINO_USB_CDC_ON_BOOT=1\n  -I variants/esp32s3/diy/t-energy-s3_e22\n"
  },
  {
    "path": "variants/esp32s3/diy/t-energy-s3_e22/variant.h",
    "content": "// NanoVHF T-Energy-S3 + E22(0)-xxxM - DIY\n// https://github.com/NanoVHF/Meshtastic-DIY/tree/main/PCB/ESP-32-devkit_EBYTE-E22/Mesh-v1.06-TTGO-T18\n\n// Battery\n#define BATTERY_PIN 3\n#define ADC_MULTIPLIER 2.0\n#define ADC_CHANNEL ADC1_GPIO3_CHANNEL\n\n// Button on NanoVHF PCB\n#define BUTTON_PIN 39\n\n// I2C via connectors on NanoVHF PCB\n#define I2C_SCL 2\n#define I2C_SDA 42\n\n// Screen (disabled)\n#define HAS_SCREEN 0 // Assume no screen present by default to prevent crash...\n\n// GPS via T-Energy-S3 onboard connector\n#define HAS_GPS 1\n#define GPS_TX_PIN 43\n#define GPS_RX_PIN 44\n\n// LoRa\n#define USE_SX1262 // E22-900M30S, E22-900M22S, and E22-900MM22S (not E220!) use SX1262\n#define USE_SX1268 // E22-400M30S, E22-400M33S, E22-400M22S, and E22-400MM22S use SX1268\n\n#define SX126X_MAX_POWER 22          // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V\n\n#define SX126X_CS 5    // EBYTE module's NSS pin // FIXME: rename to SX126X_SS\n#define SX126X_SCK 6   // EBYTE module's SCK pin\n#define SX126X_MOSI 13 // EBYTE module's MOSI pin\n#define SX126X_MISO 4  // EBYTE module's MISO pin\n#define SX126X_RESET 1 // EBYTE module's NRST pin\n#define SX126X_BUSY 48 // EBYTE module's BUSY pin\n#define SX126X_DIO1 47 // EBYTE module's DIO1 pin\n\n#define SX126X_TXEN 10 // Schematic connects EBYTE module's TXEN pin to MCU\n#define SX126X_RXEN 12 // Schematic connects EBYTE module's RXEN pin to MCU\n\n#define LORA_CS SX126X_CS     // Compatibility with variant file configuration structure\n#define LORA_SCK SX126X_SCK   // Compatibility with variant file configuration structure\n#define LORA_MOSI SX126X_MOSI // Compatibility with variant file configuration structure\n#define LORA_MISO SX126X_MISO // Compatibility with variant file configuration structure\n#define LORA_DIO1 SX126X_DIO1 // Compatibility with variant file configuration structure\n"
  },
  {
    "path": "variants/esp32s3/dreamcatcher/platformio.ini",
    "content": "[env:dreamcatcher] ; 2301, latest revision\nextends = esp32s3_base\nboard = esp32s3box\nboard_build.partitions = default_16MB.csv\nboard_level = extra\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -D OTHERNET_DC_REV=2301\n  -I variants/esp32s3/dreamcatcher\n  -D ARDUINO_USB_CDC_ON_BOOT=1\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=ESP8266Audio packageName=https://github.com/meshtastic/ESP8266Audio gitBranch=meshtastic-2.0.0-dacfix\n  https://github.com/meshtastic/ESP8266Audio/archive/343024632ee78d6216907b2353fc943a62422d80.zip\n  # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM\n  earlephilhower/ESP8266SAM@1.1.0\n\n[env:dreamcatcher-2206] \nextends = esp32s3_base\nboard = esp32s3box\nboard_build.partitions = default_16MB.csv\nboard_level = extra\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -D OTHERNET_DC_REV=2206\n  -I variants/esp32s3/dreamcatcher\n  -D ARDUINO_USB_CDC_ON_BOOT=1\n"
  },
  {
    "path": "variants/esp32s3/dreamcatcher/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\n// RF Switch Matrix SubG RFO_HP_LF / RFO_LP_LF / RFI_[NP]_LF0\n// DIO5 -> RFSW0_V1\n// DIO6 -> RFSW1_V2\n// DIO7 -> ANT_CTRL_ON + ESP_IO9/LR_GPS_ANT_DC_EN -> RFI_GPS (Bias-T GPS)\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC,\n                                             RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6  DIO7\n    {LR11x0::MODE_STBY, {LOW, LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW, LOW}},\n    {LR11x0::MODE_TX, {LOW, HIGH, LOW}},   {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH}},\n    {LR11x0::MODE_WIFI, {LOW, LOW, LOW}},  END_OF_MODE_TABLE,\n};"
  },
  {
    "path": "variants/esp32s3/dreamcatcher/variant.h",
    "content": "#undef I2C_SDA\n#undef I2C_SCL\n#define I2C_SDA 16 // I2C pins for this board\n#define I2C_SCL 17\n\n#define I2C_SDA1 45\n#define I2C_SCL1 46\n\n#define LED_POWER 6\n#define LED_STATE_ON 1\n#define BUTTON_PIN 0\n\n#define HAS_TPS65233\n\n// V1 of SubG Switch SMA 0 or F Selector 1\n// #define RF_SW_SUBG1 8\n// V2 of SubG Switch SMA 1 or F Selector 0\n// #define RF_SW_SUBG2 5\n\n#define RESET_OLED 8 // Emulate RF_SW_SUBG1, Use F Connector\n#define VTFT_CTRL 5  // Emulate RF_SW_SUBG2, for SMA swap the pin values\n\n#if OTHERNET_DC_REV == 2206\n#define USE_LR1120\n\n#define SPI_MISO 37\n#define SPI_MOSI 39\n#define SPI_SCK 38\n#define SDCARD_CS 40\n\n#define PIN_BUZZER 48\n\n// These can either be used for GPS or a serial link. Define through Protobufs\n// #define GPS_RX_PIN 10\n// #define GPS_TX_PIN 21\n\n#define PIN_POWER_EN 7            // RF section power supply enable\n#define PERIPHERAL_WARMUP_MS 1000 // wait for TPS chip to initialize\n#define TPS_EXTM 45               // connected, but not used\n#define BIAS_T_ENABLE 9           // needs to be low\n#define BIAS_T_VALUE 0\n#else // 2301\n#define USE_LR1121\n#define SPI_MISO 10\n#define SPI_MOSI 39\n#define SPI_SCK 38\n\n#define SDCARD_CS 40\n\n// This is only informational, we always use SD cards in 1 bit mode\n#define SPI_DATA1 15\n#define SPI_DATA2 18\n\n// These can either be used for GPS or a serial link. Define through Protobufs\n// #define GPS_RX_PIN 36\n// #define GPS_TX_PIN 37\n\n// dac / amp instead of buzzer\n#define HAS_I2S\n#define DAC_I2S_BCK 21\n#define DAC_I2S_WS 9\n#define DAC_I2S_DOUT 48\n#define DAC_I2S_MCLK 44\n\n#define BIAS_T_ENABLE 7 // needs to be low\n#define BIAS_T_VALUE 0\n#define BIAS_T_SUBGHZ 2 // also needs to be low, we hijack SENSOR_POWER_CTRL_PIN to emulate this\n#define SENSOR_POWER_CTRL_PIN BIAS_T_SUBGHZ\n#define SENSOR_POWER_ON 0\n#endif\n\n#define HAS_SDCARD // Have SPI interface SD card slot\n#define SDCARD_USE_SPI1\n\n#define LORA_RESET 3\n#define LORA_SCK 12\n#define LORA_MISO 13\n#define LORA_MOSI 11\n#define LORA_CS 14\n#define LORA_DIO9 4\n#define LORA_DIO2 47\n\n#define LR1120_IRQ_PIN LORA_DIO9\n#define LR1120_NRESET_PIN LORA_RESET\n#define LR1120_BUSY_PIN LORA_DIO2\n#define LR1120_SPI_NSS_PIN LORA_CS\n#define LR1120_SPI_SCK_PIN LORA_SCK\n#define LR1120_SPI_MOSI_PIN LORA_MOSI\n#define LR1120_SPI_MISO_PIN LORA_MISO\n\n#define LR1121_IRQ_PIN LORA_DIO9\n#define LR1121_NRESET_PIN LORA_RESET\n#define LR1121_BUSY_PIN LORA_DIO2\n#define LR1121_SPI_NSS_PIN LORA_CS\n#define LR1121_SPI_SCK_PIN LORA_SCK\n#define LR1121_SPI_MOSI_PIN LORA_MOSI\n#define LR1121_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.8\n#define LR11X0_DIO_AS_RF_SWITCH\n\n// This board needs external switching between sub-GHz and 2.4G circuits\n\n// V1 of RF1 selector SubG 1 or 2.4GHz 0\n// #define RF_SW_SMA1 42\n// V2 of RF1 Selector SubG 0 or 2.4GHz 1\n// #define RF_SW_SMA2 41\n\n#define LR11X0_RF_SWITCH_SUBGHZ 42\n#define LR11X0_RF_SWITCH_2_4GHZ 41\n"
  },
  {
    "path": "variants/esp32s3/elecrow_panel/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 15;\nstatic const uint8_t SCL = 16;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = -1;\nstatic const uint8_t MOSI = 48;\nstatic const uint8_t MISO = 47;\nstatic const uint8_t SCK = 41;\n\nstatic const uint8_t SPI_MOSI = 6;\nstatic const uint8_t SPI_SCK = 5;\nstatic const uint8_t SPI_MISO = 4;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/elecrow_panel/platformio.ini",
    "content": "[crowpanel_base]\nextends = esp32s3_base\nboard = crowpanel\nboard_check = true\nupload_protocol = esptool\nboard_build.partitions = default_16MB.csv ; must be here for some reason, board.json is not enough !?\nbuild_flags = ${esp32s3_base.build_flags} -Os\n  -I variants/esp32s3/elecrow_panel\n  -D ELECROW_PANEL\n  -D CONFIG_ARDUHAL_LOG_COLORS\n  -D RADIOLIB_DEBUG_SPI=0\n  -D RADIOLIB_DEBUG_PROTOCOL=0\n  -D RADIOLIB_DEBUG_BASIC=0\n  -D RADIOLIB_VERBOSE_ASSERT=0\n  -D RADIOLIB_SPI_PARANOID=0\n  -D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1\n  -D MESHTASTIC_EXCLUDE_INPUTBROKER=1\n  -D MESHTASTIC_EXCLUDE_WEBSERVER=1\n  -D MESHTASTIC_EXCLUDE_SERIAL=1\n  -D MESHTASTIC_EXCLUDE_SOCKETAPI=1\n  -D MESHTASTIC_EXCLUDE_SCREEN=1\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -D USE_PIN_BUZZER\n  -D HAS_SCREEN=0\n  -D HAS_TFT=1\n  -D RAM_SIZE=6144\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D LV_BUILD_TEST=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D USE_PACKET_API\n  -D HAS_SDCARD\n  -D SD_SPI_FREQUENCY=75000000\n\nlib_deps = ${esp32s3_base.lib_deps}\n  ${device-ui_base.lib_deps}\n  # renovate: datasource=git-refs depName=ESP8266Audio packageName=https://github.com/meshtastic/ESP8266Audio gitBranch=meshtastic-2.0.0-dacfix\n  https://github.com/meshtastic/ESP8266Audio/archive/343024632ee78d6216907b2353fc943a62422d80.zip\n  # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM\n  earlephilhower/ESP8266SAM@1.1.0\n  # renovate: datasource=custom.pio depName=TCA9534 packageName=hideakitai/library/TCA9534\n  hideakitai/TCA9534@0.1.1\n  lovyan03/LovyanGFX@1.2.0 ; note: v1.2.7 breaks the elecrow 7\" display functionality\n\n[crowpanel_small_esp32s3_base] ; 2.4, 2.8, 3.5 inch\nextends = crowpanel_base\nbuild_flags =\n  ${crowpanel_base.build_flags}\n  -D CROW_SELECT=1\n  -D SDCARD_USE_SOFT_SPI\n  -D SDCARD_CS=7\n  -D SPI_DRIVER_SELECT=2\n  -D LGFX_DRIVER_TEMPLATE\n  -D LGFX_DRIVER=LGFX_GENERIC\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_GENERIC.h\\\"\n  -D VIEW_320x240\n  -D MAP_FULL_REDRAW\n\n[crowpanel_large_esp32s3_base] ; 4.3, 5.0, 7.0 inch\nextends = crowpanel_base\nbuild_flags =\n  ${crowpanel_base.build_flags}\n  -D CROW_SELECT=2\n  -D SDCARD_CS=7\n  -D LGFX_DRIVER=LGFX_ELECROW70\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_ELECROW70.h\\\"\n  -D DISPLAY_SET_RESOLUTION\n\n[env:elecrow-adv-24-28-tft]\ncustom_meshtastic_hw_model = 97\ncustom_meshtastic_hw_model_slug = CROWPANEL\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Crowpanel Adv 2.4/2.8 TFT\ncustom_meshtastic_images = crowpanel_2_4.svg, crowpanel_2_8.svg\ncustom_meshtastic_tags = Elecrow\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = crowpanel_small_esp32s3_base\nbuild_flags =\n  ${crowpanel_small_esp32s3_base.build_flags}\n  -D SPI_FREQUENCY=80000000\n  -D LGFX_SCREEN_WIDTH=240\n  -D LGFX_SCREEN_HEIGHT=320\n  -D DISPLAY_SIZE=320x240 ; landscape mode\n  -D LGFX_PANEL=ST7789\n  -D LGFX_ROTATION=1\n  -D LGFX_CFG_HOST=SPI2_HOST\n  -D LGFX_PIN_SCK=42\n  -D LGFX_PIN_MOSI=39\n  -D LGFX_PIN_DC=41\n  -D LGFX_PIN_CS=40\n  -D LGFX_PIN_BL=38\n  -D LGFX_TOUCH=FT5x06\n  -D LGFX_TOUCH_I2C_ADDR=0x38\n  -D LGFX_TOUCH_I2C_SDA=15\n  -D LGFX_TOUCH_I2C_SCL=16\n  -D LGFX_TOUCH_INT=47\n  -D LGFX_TOUCH_RST=48\n  -D LGFX_TOUCH_ROTATION=0\n\n[env:elecrow-adv-35-tft]\ncustom_meshtastic_hw_model = 97\ncustom_meshtastic_hw_model_slug = CROWPANEL\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Crowpanel Adv 3.5 TFT\ncustom_meshtastic_images = crowpanel_3_5.svg\ncustom_meshtastic_tags = Elecrow\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = crowpanel_small_esp32s3_base\nboard_level = pr\nbuild_flags =\n  ${crowpanel_small_esp32s3_base.build_flags}\n  -D LV_CACHE_DEF_SIZE=2097152\n  -D SPI_FREQUENCY=60000000\n  -D LGFX_SCREEN_WIDTH=320\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=320x480 ; portrait mode\n  -D LGFX_PANEL=ILI9488\n  -D LGFX_ROTATION=0\n  -D LGFX_CFG_HOST=SPI2_HOST\n  -D LGFX_PIN_SCK=42\n  -D LGFX_PIN_MOSI=39\n  -D LGFX_PIN_DC=41\n  -D LGFX_PIN_CS=40\n  -D LGFX_PIN_BL=38\n  -D LGFX_TOUCH=GT911\n  -D LGFX_TOUCH_I2C_ADDR=0x5D\n  -D LGFX_TOUCH_I2C_SDA=15\n  -D LGFX_TOUCH_I2C_SCL=16\n  -D LGFX_TOUCH_INT=47\n  -D LGFX_TOUCH_RST=48\n  -D LGFX_TOUCH_ROTATION=0\n  -D DISPLAY_SET_RESOLUTION\n\n; 4.3, 5.0, 7.0 inch 800x480 IPS (V1)\n[env:elecrow-adv1-43-50-70-tft]\ncustom_meshtastic_hw_model = 97\ncustom_meshtastic_hw_model_slug = CROWPANEL\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Crowpanel Adv 4.3/5.0/7.0 TFT\ncustom_meshtastic_images = crowpanel_5_0.svg, crowpanel_7_0.svg\ncustom_meshtastic_tags = Elecrow\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = crowpanel_large_esp32s3_base\nbuild_flags =\n  ${crowpanel_large_esp32s3_base.build_flags}\n  -D VIEW_320x240\n  -D DISPLAY_SIZE=800x480 ; landscape mode\n"
  },
  {
    "path": "variants/esp32s3/elecrow_panel/variant.h",
    "content": "#define I2C_SDA 15\n#define I2C_SCL 16\n\n#if CROW_SELECT == 1\n#define WAKE_ON_TOUCH\n#define SCREEN_TOUCH_INT 47\n#define USE_POWERSAVE\n#define SLEEP_TIME 180\n#endif\n\n#if CROW_SELECT == 1\n// dac / amp\n// #define HAS_I2S // didn't get I2S sound working\n#define PIN_BUZZER 8 // using pwm buzzer instead (nobody will notice, lol)\n#define DAC_I2S_BCK 13\n#define DAC_I2S_WS 11\n#define DAC_I2S_DOUT 12\n#define DAC_I2S_MCLK 8 // don't use GPIO0 because it's assigned to LoRa or button\n#else\n#define PIN_BUZZER 8\n#endif\n\n// GPS via UART1 connector\n#define GPS_DEFAULT_NOT_PRESENT 1\n#define HAS_GPS 1\n#if CROW_SELECT == 1\n#define GPS_RX_PIN 18\n#define GPS_TX_PIN 17\n#else\n// GPIOs shared with LoRa or MIC module\n#define GPS_RX_PIN 19\n#define GPS_TX_PIN 20\n#endif\n\n// Extension Slot Layout, viewed from above (2.4-3.5)\n// DIO1/IO1 o   o IO2/NRESET\n// SCK/IO10 o   o IO16/NC\n// MISO/IO9 o   o IO15/NC\n// MOSI/IO3 o   o NC/DIO2\n//      3V3 o   o IO46/BUSY\n//      GND o   o IO0/NSS\n//    5V/NC o   o NC/DIO3\n//         J9   J8\n\n// Extension Slot Layout, viewed from above (4.3-7.0)\n// !! DIO1/IO20 o   o IO19/NRESET !!\n// !!   SCK/IO5 o   o IO16/NC\n// !!  MISO/IO4 o   o IO15/NC\n// !!  MOSI/IO6 o   o NC/DIO2\n//          3V3 o   o IO2/BUSY !!\n//          GND o   o IO0/NSS\n//        5V/NC o   o NC/DIO3\n//             J9   J8\n\n// LoRa\n#define USE_SX1262\n\n#if CROW_SELECT == 1\n// 2.4\", 2.8, 3.5\"\"\"\n#define HW_SPI1_DEVICE\n#define LORA_CS 0\n#define LORA_SCK 10\n#define LORA_MISO 9\n#define LORA_MOSI 3\n\n#define LORA_RESET 2\n#define LORA_DIO1 1  // SX1262 IRQ\n#define LORA_DIO2 46 // SX1262 BUSY\n\n// need to pull IO45 low to enable LORA and disable Microphone on 24 28 35\n#define SENSOR_POWER_CTRL_PIN 45\n#define SENSOR_POWER_ON LOW\n#else\n// 4.3\", 5.0\", 7.0\"\n#define LORA_CS 0\n#define LORA_SCK 5\n#define LORA_MISO 4\n#define LORA_MOSI 6\n\n#define LORA_RESET 19\n#define LORA_DIO1 20 // SX1262 IRQ\n#define LORA_DIO2 2  // SX1262 BUSY\n#endif\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 3.3\n"
  },
  {
    "path": "variants/esp32s3/esp32-s3-pico/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 15;\nstatic const uint8_t SCL = 16;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 37;\nstatic const uint8_t SCK = 35;\nstatic const uint8_t MOSI = 36;\nstatic const uint8_t SS = 14;\n\nstatic const uint8_t BAT_ADC_PIN = 26;\n\n// #define SPI_MOSI                    (11)\n// #define SPI_SCK                     (14)\n// #define SPI_MISO                    (2)\n// #define SPI_CS                      (13)\n\n// #define SDCARD_CS                   SPI_CS\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/esp32-s3-pico/platformio.ini",
    "content": "[env:ESP32-S3-Pico]\n\nboard_level = extra\nextends = esp32s3_base\nupload_protocol = esptool\nboard = esp32-s3-pico\nboard_build.partitions = default_16MB.csv\n\nboard_upload.use_1200bps_touch = yes\nboard_upload.wait_for_upload_port = yes\nboard_upload.require_upload_port = yes\n\n;upload_port = /dev/ttyACM0\n\nbuild_flags = ${esp32s3_base.build_flags}\n  -DESP32_S3_PICO\n  ;-DPRIVATE_HW\n  -Ivariants/esp32s3/esp32-s3-pico\n  -DBOARD_HAS_PSRAM\n  -DEINK_DISPLAY_MODEL=GxEPD2_290_T94_V2\n  -DEINK_WIDTH=296\n  -DEINK_HEIGHT=128\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\n"
  },
  {
    "path": "variants/esp32s3/esp32-s3-pico/variant.h",
    "content": "/*\n\n*/\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define EXT_NOTIFY_OUT 22\n#define BUTTON_PIN 0 // 17\n\n// Board has RGB LED 21\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n#define NEOPIXEL_DATA 21                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n// The usbPower state is revered ?\n// DEBUG | ??:??:?? 365 [Power] Battery: usbPower=0, isCharging=0, batMv=4116, batPct=90\n// DEBUG | ??:??:?? 385 [Power] Battery: usbPower=1, isCharging=1, batMv=4243, batPct=0\n\n// https://www.waveshare.com/img/devkit/ESP32-S3-Pico/ESP32-S3-Pico-details-inter-1.jpg\n// digram is incorrect labeled as battery pin is getting readings on GPIO7_CH1?\n#define BATTERY_PIN 7\n#define ADC_CHANNEL ADC1_GPIO7_CHANNEL\n// #define ADC_CHANNEL ADC1_GPIO6_CHANNEL\n//   ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n\n#define I2C_SDA 15\n#define I2C_SCL 16\n\n// Enable secondary bus for external periherals\n// https://www.waveshare.com/wiki/Pico-OLED-1.3\n// #define USE_SH1107_128_64\n// Not working\n#define I2C_SDA1 17\n#define I2C_SCL1 18\n\n#define BUTTON_PIN 0 // This is the BOOT button\n#define BUTTON_NEED_PULLUP\n\n// #define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n// #define USE_SX1280\n\n#define LORA_MISO 37\n#define LORA_SCK 35\n#define LORA_MOSI 36\n#define LORA_CS 14\n\n#define LORA_RESET 40\n#define LORA_DIO1 4\n#define LORA_DIO2 13\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n#ifdef USE_SX1280\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 LORA_DIO1\n#define SX128X_BUSY 9\n#define SX128X_RESET LORA_RESET\n#endif\n\n#define USE_EINK\n/*\n * eink display pins\n */\n#define PIN_EINK_CS 34\n#define PIN_EINK_BUSY 38\n#define PIN_EINK_DC 33\n#define PIN_EINK_RES 42 // 37 //(-1) // cant be MISO Waveshare ??)\n#define PIN_EINK_SCLK 35\n#define PIN_EINK_MOSI 36"
  },
  {
    "path": "variants/esp32s3/esp32s3.ini",
    "content": "[esp32s3_base]\nextends = esp32_common\ncustom_esp32_kind = esp32s3\n\nmonitor_speed = 115200\n\nlib_deps =\n  ${esp32_common.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master\n  https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip\n"
  },
  {
    "path": "variants/esp32s3/hackaday-communicator/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// static const uint8_t TX = 43;\n// static const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 47;\nstatic const uint8_t SCL = 14;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 17;\nstatic const uint8_t MOSI = 3;\nstatic const uint8_t MISO = 9;\nstatic const uint8_t SCK = 8;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\n// static const uint8_t BAT_ADC_PIN = 4;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/hackaday-communicator/platformio.ini",
    "content": "; Hackaday Communicator\n[env:hackaday-communicator]\nextends = esp32s3_base\nboard = hackaday-communicator\nboard_check = true\nboard_build.partitions = default_16MB.csv\nupload_protocol = esptool\n\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  +<../variants/esp32s3/hackaday-communicator>\n\nbuild_flags = ${esp32s3_base.build_flags} \n  -D HACKADAY_COMMUNICATOR\n  -D BOARD_HAS_PSRAM\n  -I variants/esp32s3/hackaday-communicator\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-Arduino_GFX packageName=https://github.com/meshtastic/Arduino_GFX gitBranch=master\n  https://github.com/meshtastic/Arduino_GFX/archive/054e81ffaf23784830a734e3c184346789349406.zip"
  },
  {
    "path": "variants/esp32s3/hackaday-communicator/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"Arduino.h\"\nvoid earlyInitVariant()\n{\n    pinMode(KB_INT, INPUT);\n}"
  },
  {
    "path": "variants/esp32s3/hackaday-communicator/variant.h",
    "content": "#define TFT_BL 2\n#define SPI_FREQUENCY 2000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 142\n#define TFT_WIDTH 428\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 0\n#define SCREEN_TRANSITION_FRAMERATE 5\n#define HAS_SCREEN 1\n#define TFT_BLACK 0\n#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness\n#define USE_TFTDISPLAY 1\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 120\n\n#define GPS_DEFAULT_NOT_PRESENT 1\n\n// keyboard\n#define I2C_SDA 47 // I2C pins for this board\n#define I2C_SCL 14\n// #define KB_BL_PIN 46                   // not used for now\n#define KB_INT 13\n\n#define TFT_DC 39\n#define TFT_CS 41\n\n// LoRa\n#define USE_SX1262\n\n#define LORA_SCK 8\n#define LORA_MISO 9\n#define LORA_MOSI 3\n#define LORA_CS 17\n\n#define LORA_RESET 18\n#define LORA_DIO1 16 // SX1262 IRQ\n#define LORA_DIO2 15 // SX1262 BUSY\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define LED_NOTIFICATION 1\n#define LED_STATE_ON 0\n"
  },
  {
    "path": "variants/esp32s3/heltec_capsule_sensor_v3/platformio.ini",
    "content": "[env:heltec_capsule_sensor_v3]\nextends = esp32s3_base\nboard = heltec_wifi_lora_32_V3\nboard_check = true\nboard_build.partitions = default_8MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags} -I variants/esp32s3/heltec_capsule_sensor_v3\n  -D HELTEC_CAPSULE_SENSOR_V3\n  -ULED_BUILTIN\n  ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output\n"
  },
  {
    "path": "variants/esp32s3/heltec_capsule_sensor_v3/variant.h",
    "content": "#define LED_POWER 33\n#define LED_POWER2 34\n#define EXT_PWR_DETECT 35\n\n#define BUTTON_PIN 18\n#define BUTTON_ACTIVE_LOW false\n#define BUTTON_ACTIVE_PULLUP false\n\n#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO7_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER (4.9 * 1.045)\n#define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1\n#define ADC_CTRL_ENABLED HIGH\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 5\n#define GPS_TX_PIN 4\n#define PIN_GPS_RESET 3\n#define GPS_RESET_MODE LOW\n#define PIN_GPS_PPS 1\n#define PIN_GPS_EN 21\n#define GPS_EN_ACTIVE HIGH\n\n#define USE_SX1262\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define I2C_SDA 1\n#define I2C_SCL 2\n#define HAS_SCREEN 0\n#define SENSOR_POWER_CTRL_PIN 21\n#define SENSOR_POWER_ON 1\n\n#define PERIPHERAL_WARMUP_MS 100\n#define SENSOR_GPS_CONFLICT\n\n#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH"
  },
  {
    "path": "variants/esp32s3/heltec_sensor_hub/platformio.ini",
    "content": "[env:heltec_sensor_hub]\nextends = esp32s3_base\nboard = heltec_wifi_lora_32_V3\nboard_check = true\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/heltec_sensor_hub\n  -D HELTEC_SENSOR_HUB\n  -ULED_BUILTIN\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\n"
  },
  {
    "path": "variants/esp32s3/heltec_sensor_hub/variant.h",
    "content": "#define EXT_PWR_DETECT 20\n\n#define BUTTON_PIN 17\n#define BUTTON_ACTIVE_LOW false\n#define BUTTON_ACTIVE_PULLUP false\n\n#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO7_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER (4.9 * 1.045)\n#define ADC_CTRL 34 // active HIGH, powers the voltage divider. Only on 1.1\n#define ADC_CTRL_ENABLED HIGH\n\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n#define NEOPIXEL_DATA 18                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n#define USE_SX1262\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define I2C_SDA 1\n#define I2C_SCL 2\n#define HAS_SCREEN 0\n#define SENSOR_POWER_CTRL_PIN 33\n#define SENSOR_POWER_ON 1\n\n#define PERIPHERAL_WARMUP_MS 100\n\n#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH\n\n#define ENVIRONMENTAL_TELEMETRY_MODULE_ENABLE 1"
  },
  {
    "path": "variants/esp32s3/heltec_v3/platformio.ini",
    "content": "[env:heltec-v3]\ncustom_meshtastic_hw_model = 43\ncustom_meshtastic_hw_model_slug = HELTEC_V3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec V3\ncustom_meshtastic_images = heltec-v3.svg, heltec-v3-case.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_partition_scheme = 8MB\n \nextends = esp32s3_base\nboard = heltec_wifi_lora_32_V3\nboard_level = pr\nboard_check = true\nboard_build.partitions = default_8MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D HELTEC_V3\n  -I variants/esp32s3/heltec_v3\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32s3/heltec_v3/variant.h",
    "content": "#define LED_POWER LED\n\n#define USE_SSD1306 // Heltec_v3 has a SSD1306 display\n\n#define RESET_OLED RST_OLED\n#define I2C_SDA SDA_OLED // I2C pins for this board\n#define I2C_SCL SCL_OLED\n\n// Enable secondary bus for external periherals\n#define I2C_SDA1 SDA\n#define I2C_SCL1 SCL\n\n#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost\n#define BUTTON_PIN 0\n\n#define ADC_CTRL 37\n#define ADC_CTRL_ENABLED LOW\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9 * 1.045\n\n#define USE_SX1262\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define HAS_32768HZ 1"
  },
  {
    "path": "variants/esp32s3/heltec_v4/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 4;\nstatic const uint8_t SCL = 3;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 36;\nstatic const uint8_t LED = 35;\nstatic const uint8_t RST_OLED = 21;\nstatic const uint8_t SCL_OLED = 18;\nstatic const uint8_t SDA_OLED = 17;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/heltec_v4/platformio.ini",
    "content": "[heltec_v4_base] \nextends = esp32s3_base\nboard = heltec_v4\nboard_check = true\nboard_build.partitions = default_16MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D HELTEC_V4\n  -D HAS_LORA_FEM=1\n  -I variants/esp32s3/heltec_v4\n  -ULED_BUILTIN\n\n\n[env:heltec-v4]\ncustom_meshtastic_hw_model = 110\ncustom_meshtastic_hw_model_slug = HELTEC_V4\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec V4\ncustom_meshtastic_images = heltec_v4.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = heltec_v4_base\nbuild_flags = \n  ${heltec_v4_base.build_flags}\n  -D HELTEC_V4_OLED\n  -D USE_SSD1306 ; Heltec_v4 has an SSD1315 display (compatible with SSD1306 driver)\n  -D LED_POWER=35\n  -D RESET_OLED=21\n  -D I2C_SDA=17\n  -D I2C_SCL=18\n  -D I2C_SDA1=4\n  -D I2C_SCL1=3\n\n[env:heltec-v4-tft]\ncustom_meshtastic_hw_model = 110\ncustom_meshtastic_hw_model_slug = HELTEC_V4\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec V4 TFT\ncustom_meshtastic_images = heltec_v4.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = heltec_v4_base\nbuild_flags = \n  ${heltec_v4_base.build_flags} ;-Os\n  -D HELTEC_V4_TFT\n  -D I2C_SDA=4\n  -D I2C_SCL=3\n  -D I2C_SDA1=47\n  -D I2C_SCL1=48\n  -D PIN_BUTTON2=35\n  -D PIN_BUZZER=6\n  -D USE_PIN_BUZZER=PIN_BUZZER\n  -D CONFIG_ARDUHAL_LOG_COLORS\n  -D RADIOLIB_DEBUG_SPI=0\n  -D RADIOLIB_DEBUG_PROTOCOL=0\n  -D RADIOLIB_DEBUG_BASIC=0\n  -D RADIOLIB_VERBOSE_ASSERT=0\n  -D RADIOLIB_SPI_PARANOID=0\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -D INPUTDRIVER_BUTTON_TYPE=0\n  -D HAS_SCREEN=1\n  -D HAS_TFT=1\n  -D RAM_SIZE=1860\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D LV_BUILD_TEST=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D USE_PACKET_API\n  -D LGFX_DRIVER=LGFX_HELTEC_V4_TFT\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_HELTEC_V4_TFT.h\\\"\n  -D VIEW_240x320\n  -D DISPLAY_SET_RESOLUTION\n  -D DISPLAY_SIZE=240x320 ; portrait mode\n  -D LGFX_PIN_SCK=17\n  -D LGFX_PIN_MOSI=33\n  -D LGFX_PIN_DC=16\n  -D LGFX_PIN_CS=15\n  -D LGFX_PIN_BL=21\n  -D LGFX_PIN_RST=18\n  -D CUSTOM_TOUCH_DRIVER\n  -D TOUCH_SDA_PIN=I2C_SDA1\n  -D TOUCH_SCL_PIN=I2C_SCL1\n  -D TOUCH_INT_PIN=-1  ;45\n  -D TOUCH_RST_PIN=44\n;base UI\n  -D TFT_CS=LGFX_PIN_CS\n  -D ST7789_CS=TFT_CS\n  -D ST7789_RS=LGFX_PIN_DC\n  -D ST7789_SDA=LGFX_PIN_MOSI \n  -D ST7789_SCK=LGFX_PIN_SCK\n  -D ST7789_RESET=LGFX_PIN_RST\n  -D ST7789_MISO=-1\n  -D ST7789_BUSY=-1\n  -D ST7789_BL=LGFX_PIN_BL\n  -D ST7789_SPI_HOST=SPI3_HOST\n  -D TFT_BL=ST7789_BL\n  -D SPI_FREQUENCY=40000000\n  -D SPI_READ_FREQUENCY=4000000\n  -D TFT_HEIGHT=320\n  -D TFT_WIDTH=240\n  -D TFT_OFFSET_X=0\n  -D TFT_OFFSET_Y=0\n  -D TFT_OFFSET_ROTATION=0\n  -D SCREEN_ROTATE\n  -D SCREEN_TRANSITION_FRAMERATE=5\n  -D BRIGHTNESS_DEFAULT=130 ; Medium Low Brightness\n  -D HAS_TOUCHSCREEN=1\n  -D TOUCH_I2C_PORT=0\n  -D TOUCH_SLAVE_ADDRESS=0x2E\n  -D SCREEN_TOUCH_INT=TOUCH_INT_PIN\n  -D SCREEN_TOUCH_RST=TOUCH_RST_PIN\n\nlib_deps = ${heltec_v4_base.lib_deps}\n  ${device-ui_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n  # renovate: datasource=git-refs depName=Quency-D_chsc6x packageName=https://github.com/Quency-D/chsc6x gitBranch=master\n  https://github.com/Quency-D/chsc6x/archive/5cbead829d6b432a8d621ed1aafd4eb474fd4f27.zip"
  },
  {
    "path": "variants/esp32s3/heltec_v4/variant.h",
    "content": "#define VEXT_ENABLE 36 // active low, powers the oled display and the lora antenna boost\n#define BUTTON_PIN 0\n\n#define ADC_CTRL 37\n#define ADC_CTRL_ENABLED HIGH\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9 * 1.045\n\n#define USE_SX1262\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TCXO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Enable Traffic Management Module for Heltec V4\n#ifndef HAS_TRAFFIC_MANAGEMENT\n#define HAS_TRAFFIC_MANAGEMENT 1\n#endif\n#ifndef TRAFFIC_MANAGEMENT_CACHE_SIZE\n#define TRAFFIC_MANAGEMENT_CACHE_SIZE 2048\n#endif\n\n// ---- GC1109 RF FRONT END CONFIGURATION ----\n// The Heltec V4.2 uses a GC1109 FEM chip with integrated PA and LNA\n// RF path: SX1262 -> Pi attenuator -> GC1109 PA -> Antenna\n// Measured net TX gain (non-linear due to PA compression):\n//   +11dB at 0-15dBm input  (e.g., 10dBm in -> 21dBm out)\n//   +10dB at 16-17dBm input\n//   +9dB  at 18-19dBm input\n//   +7dB  at 21dBm input    (e.g., 21dBm in -> 28dBm out max)\n// Control logic (from GC1109 datasheet):\n//   Shutdown:        CSD=0, CTX=X, CPS=X\n//   Receive LNA:     CSD=1, CTX=0, CPS=X  (17dB gain, 2dB NF)\n//   Transmit bypass: CSD=1, CTX=1, CPS=0  (~1dB loss, no PA)\n//   Transmit PA:     CSD=1, CTX=1, CPS=1  (full PA enabled)\n// Pin mapping:\n//   CTX (pin 6)  -> SX1262 DIO2: TX/RX path select (automatic via SX126X_DIO2_AS_RF_SWITCH)\n//   CSD (pin 4)  -> GPIO2: Chip enable (HIGH=on, LOW=shutdown)\n//   CPS (pin 5)  -> GPIO46: PA mode select (HIGH=full PA, LOW=bypass)\n//   VCC0/VCC1    -> Vfem via U3 LDO, controlled by GPIO7\n// GC1109 FEM: TX/RX path switching is handled by DIO2 -> CTX pin (via SX126X_DIO2_AS_RF_SWITCH)\n// Do NOT use SX126X_TXEN/RXEN as that would cause double-control of GPIO46\n\n#define LORA_PA_POWER 7         // VFEM_Ctrl - GC1109 and KCT8103L LDO power enable\n#define LORA_GC1109_PA_EN 2     // CSD - GC1109 chip enable (HIGH=on)\n#define LORA_GC1109_PA_TX_EN 46 // CPS - GC1109 PA mode (HIGH=full PA, LOW=bypass)\n\n// ---- KCT8103L RF FRONT END CONFIGURATION ----\n// The Heltec V4.3 uses a KCT8103L FEM chip with integrated PA and LNA\n// RF path: SX1262 -> Pi attenuator -> KCT8103L PA -> Antenna\n// Control logic (from KCT8103L datasheet):\n//   Transmit PA:     CSD=1, CTX=1, CPS=1\n//   Receive LNA:     CSD=1, CTX=0, CPS=X  (21dB gain, 1.9dB NF)\n//   Receive bypass:  CSD=1, CTX=1, CPS=0\n//   Shutdown:        CSD=0, CTX=X, CPS=X\n// Pin mapping:\n//   CPS (pin 5)  -> SX1262 DIO2: TX/RX path select (automatic via SX126X_DIO2_AS_RF_SWITCH)\n//   CSD (pin 4)  -> GPIO2: Chip enable (HIGH=on, LOW=shutdown)\n//   CTX (pin 6)  -> GPIO5: Switch between Receive LNA Mode and Receive Bypass Mode. (HIGH=RX bypass, LOW=RX LNA)\n//   VCC0/VCC1    -> Vfem via U3 LDO, controlled by GPIO7\n// KCT8103L FEM: TX/RX path switching is handled by DIO2 -> CPS pin (via SX126X_DIO2_AS_RF_SWITCH)\n\n#define LORA_KCT8103L_PA_CSD 2 // CSD - KCT8103L chip enable (HIGH=on)\n#define LORA_KCT8103L_PA_CTX 5 // CTX - Switch between Receive LNA Mode and Receive Bypass Mode. (HIGH=RX bypass, LOW=RX LNA)\n\n#if HAS_TFT\n#define USE_TFTDISPLAY 1\n#endif\n/*\n * GPS pins\n */\n#define GPS_L76K\n#define PIN_GPS_RESET (42) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n#define GPS_RESET_MODE LOW\n#define PIN_GPS_EN (34)\n#define GPS_EN_ACTIVE LOW\n#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing\n#define PIN_GPS_STANDBY (40)      // An output to wake GPS, low means allow sleep, high means force wake\n#define PIN_GPS_PPS (41)\n// Seems to be missing on this new board\n#define GPS_TX_PIN (38) // This is for bits going TOWARDS the CPU\n#define GPS_RX_PIN (39) // This is for bits going TOWARDS the GPS\n#define GPS_THREAD_INTERVAL 50\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e213/einkDetect.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\nenum class EInkDetectionResult : uint8_t {\n    LCMEN213EFC1 = 0, // Initial version\n    E0213A367 = 1,    // E213 PCB marked V1.1 (Mid 2025)\n};\n\nEInkDetectionResult detectEInk()\n{\n    // Test 1: Logic of BUSY pin\n\n    // Determines controller IC manufacturer\n    // Fitipower: busy when LOW\n    // Solomon Systech: busy when HIGH\n\n    // Force display BUSY by holding reset pin active\n    pinMode(PIN_EINK_RES, OUTPUT);\n    digitalWrite(PIN_EINK_RES, LOW);\n\n    delay(10);\n\n    // Read whether pin is HIGH or LOW while busy\n    pinMode(PIN_EINK_BUSY, INPUT);\n    bool busyLogic = digitalRead(PIN_EINK_BUSY);\n\n    // Test complete. Release pin\n    pinMode(PIN_EINK_RES, INPUT);\n\n    if (busyLogic == LOW)\n        return EInkDetectionResult::LCMEN213EFC1;\n    else // busy HIGH\n        return EInkDetectionResult::E0213A367;\n}"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e213/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/E0213A367.h\"\n#include \"graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\n#include \"buzz.h\"       // Button feedback\n#include \"einkDetect.h\" // Detect display model at runtime\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // Detect E-Ink Model\n    // -------------------\n\n    EInkDetectionResult displayModel = detectEInk();\n\n    // SPI\n    // -----------------------------\n\n    // Display is connected to HSPI\n    SPIClass *hspi = new SPIClass(HSPI);\n    hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver;\n\n    if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1 (unmarked)\n        driver = new Drivers::LCMEN213EFC1;\n    else if (displayModel == EInkDetectionResult::E0213A367) // V1.1\n        driver = new Drivers::E0213A367;\n\n    driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n\n    if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1 (unmarked)\n        inkhud->setDisplayResilience(10, 1.5);\n    else if (displayModel == EInkDetectionResult::E0213A367) // V1.1\n        inkhud->setDisplayResilience(15, 3);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?\n    inkhud->persistence->settings.rotation = 3;           // 270 degrees clockwise\n    inkhud->persistence->settings.userTiles.count = 1;    // One tile only by default, keep things simple for new users\n    inkhud->persistence->settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);          // -\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, not autoshown, default on tile 0\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // #0: Main User Button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // #1: Aux Button\n    buttons->setWiring(1, PIN_BUTTON2);\n    buttons->setHandlerShortPress(1, [inkhud]() {\n        inkhud->nextTile();\n        playChirp();\n    });\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e213/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 39;\nstatic const uint8_t SCL = 38;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO1 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e213/platformio.ini",
    "content": "[env:heltec-vision-master-e213]\ncustom_meshtastic_hw_model = 67\ncustom_meshtastic_hw_model_slug = HELTEC_VISION_MASTER_E213\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec Vision Master E213\ncustom_meshtastic_images = heltec-vision-master-e213.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_vision_master_e213\nboard_build.partitions = default_8MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -Ivariants/esp32s3/heltec_vision_master_e213 \n  -DHELTEC_VISION_MASTER_E213\n  -DUSE_EINK\n  -DGXEPD2_DRIVER_0=GxEPD2_213_FC1\n  -DGXEPD2_DRIVER_1=GxEPD2_213_E0213A367\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -DEINK_HASQUIRK_GHOSTING             ; Display model is identified as \"prone to ghosting\"\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\nupload_speed = 115200\n\n[env:heltec-vision-master-e213-inkhud]\nextends = esp32s3_base, inkhud\nboard = heltec_vision_master_e213\nboard_level = pr\nboard_build.partitions = default_8MB.csv\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  ${inkhud.build_src_filter}\nbuild_flags =  \n  ${esp32s3_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/esp32s3/heltec_vision_master_e213\n  -D HELTEC_VISION_MASTER_E213\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${esp32s3_base.lib_deps}\nupload_speed = 921600\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e213/variant.h",
    "content": "#define LED_POWER 45 // LED is not populated on earliest board variant\n#define BUTTON_PIN 0\n#define PIN_BUTTON2 21             // Second built-in button\n#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// Display (E-Ink)\n#define PIN_EINK_CS 5\n#define PIN_EINK_BUSY 1\n#define PIN_EINK_DC 2\n#define PIN_EINK_RES 3\n#define PIN_EINK_SCLK 4\n#define PIN_EINK_MOSI 6\n\n// SPI\n#define SPI_INTERFACES_COUNT 2\n#define PIN_SPI_MISO 11\n#define PIN_SPI_MOSI 10\n#define PIN_SPI_SCK 9\n\n// Power\n#define VEXT_ENABLE 18            // Powers the E-Ink display, and the 3.3V supply to the I2C QuickLink connector\n#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing\n#define VEXT_ON_VALUE HIGH\n#define ADC_CTRL 46\n#define ADC_CTRL_ENABLED HIGH\n#define BATTERY_PIN 7\n#define ADC_CHANNEL ADC1_GPIO7_CHANNEL\n#define ADC_MULTIPLIER 4.9 * 1.03\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5\n\n// LoRa\n#define USE_SX1262\n\n#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e290/nicheGraphics.h",
    "content": "/*\n\nMost of the Meshtastic firmware uses preprocessor macros throughout the code to support different hardware variants.\nNicheGraphics attempts a different approach:\n\nPer-device config takes place in this setupNicheGraphics() method\n(And a small amount in platformio.ini)\n\nThis file sets up InkHUD for Heltec VM-E290.\nDifferent NicheGraphics UIs and different hardware variants will each have their own setup procedure.\n\n*/\n\n#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/DEPG0290BNS800.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\n// Button feedback\n#include \"buzz.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n\n    // Display is connected to HSPI\n    SPIClass *hspi = new SPIClass(HSPI);\n    hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver = new Drivers::DEPG0290BNS800;\n    driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n    inkhud->setDisplayResilience(7, 1.5);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?\n    inkhud->persistence->settings.rotation = 1;           // 90 degrees clockwise\n    inkhud->persistence->settings.userTiles.count = 1;    // One tile only by default, keep things simple for new users\n    inkhud->persistence->settings.optionalMenuItems.nextTile = false; // Behavior handled by aux button instead\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);          // -\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, not autoshown, default on tile 0\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // A shared NicheGraphics component\n\n    // #0: Main User Button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // #1: Aux Button\n    buttons->setWiring(1, PIN_BUTTON2);\n    buttons->setHandlerShortPress(1, [inkhud]() {\n        inkhud->nextTile();\n        playChirp();\n    });\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e290/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 39;\nstatic const uint8_t SCL = 38;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO1 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e290/platformio.ini",
    "content": "; Using the original screen class\n[env:heltec-vision-master-e290]\ncustom_meshtastic_hw_model = 68\ncustom_meshtastic_hw_model_slug = HELTEC_VISION_MASTER_E290\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec Vision Master E290\ncustom_meshtastic_images = heltec-vision-master-e290.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_vision_master_e290\nboard_build.partitions = default_8MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags} \n  -I variants/esp32s3/heltec_vision_master_e290\n  -D DISPLAY_FLIP_SCREEN ; Orient so the LoRa antenna faces up\n  -D HELTEC_VISION_MASTER_E290\n  -D BUTTON_CLICK_MS=200\n  -D EINK_DISPLAY_MODEL=GxEPD2_290_BN8\n  -D EINK_WIDTH=296\n  -D EINK_HEIGHT=128\n  -D USE_EINK\n  -D USE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -D EINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted\n  -D EINK_HASQUIRK_GHOSTING             ; Display model is identified as \"prone to ghosting\"\n\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\nupload_speed = 115200\n\n[env:heltec-vision-master-e290-inkhud]\nextends = esp32s3_base, inkhud\nboard = heltec_vision_master_e290\nboard_build.partitions = default_8MB.csv\nbuild_src_filter = \n  ${esp32s3_base.build_src_filter}\n  ${inkhud.build_src_filter}\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/esp32s3/heltec_vision_master_e290\n  -D HELTEC_VISION_MASTER_E290\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${esp32s3_base.lib_deps}\nupload_speed = 921600\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_e290/variant.h",
    "content": "#define LED_POWER 45 // LED is not populated on earliest board variant\n#define BUTTON_PIN 0\n#define PIN_BUTTON2 21             // Second built-in button\n#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// Display (E-Ink)\n#define PIN_EINK_CS 3\n#define PIN_EINK_BUSY 6\n#define PIN_EINK_DC 4\n#define PIN_EINK_RES 5\n#define PIN_EINK_SCLK 2\n#define PIN_EINK_MOSI 1\n\n// SPI\n#define SPI_INTERFACES_COUNT 2\n#define PIN_SPI_MISO 11\n#define PIN_SPI_MOSI 10\n#define PIN_SPI_SCK 9\n\n// Power\n#define VEXT_ENABLE 18 // Powers the E-Ink display only\n#define VEXT_ON_VALUE HIGH\n#define ADC_CTRL 46\n#define ADC_CTRL_ENABLED HIGH\n#define BATTERY_PIN 7\n#define ADC_CHANNEL ADC1_GPIO7_CHANNEL\n#define ADC_MULTIPLIER 4.9 * 1.03\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5\n\n// LoRa\n#define USE_SX1262\n\n#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_t190/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 2;\nstatic const uint8_t SCL = 1;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_t190/platformio.ini",
    "content": "[env:heltec-vision-master-t190]\ncustom_meshtastic_hw_model = 66\ncustom_meshtastic_hw_model_slug = HELTEC_VISION_MASTER_T190\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec Vision Master T190\ncustom_meshtastic_images = heltec-vision-master-t190.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_vision_master_t190\nboard_build.partitions = default_8MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags} \n  -I variants/esp32s3/heltec_vision_master_t190\n  -D HELTEC_VISION_MASTER_T190\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main\n  https://github.com/meshtastic/st7789/archive/9ee76d6b18b9a8f45a2c5cae06b1134a587691eb.zip\nupload_speed = 921600\n"
  },
  {
    "path": "variants/esp32s3/heltec_vision_master_t190/variant.h",
    "content": "#ifndef HAS_TFT\n#define BUTTON_PIN 0\n#define PIN_BUTTON2 21             // Second built-in button\n#define ALT_BUTTON_PIN PIN_BUTTON2 // Send the up event\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// Display (TFT)\n#define USE_ST7789\n#define ST7789_NSS 39\n#define ST7789_RS 47  // DC\n#define ST7789_SDA 48 // MOSI\n#define ST7789_SCK 38\n#define ST7789_RESET 40\n#define ST7789_MISO 4\n#define ST7789_BUSY -1\n#define VTFT_CTRL 7\n#define VTFT_LEDA 17\n#define TFT_BACKLIGHT_ON HIGH\n#define ST7789_SPI_HOST SPI2_HOST\n#define SPI_FREQUENCY 10000000\n#define SPI_READ_FREQUENCY 10000000\n#define TFT_HEIGHT 170\n#define TFT_WIDTH 320\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n// #define TFT_OFFSET_ROTATION 0\n// #define SCREEN_ROTATE\n// #define SCREEN_TRANSITION_FRAMERATE 5\n#define BRIGHTNESS_DEFAULT 100 // Medium Low Brightnes\n\n// #define SLEEP_TIME 120\n\n// SPI\n#define SPI_INTERFACES_COUNT 2\n#define PIN_SPI_MISO 11\n#define PIN_SPI_MOSI 10\n#define PIN_SPI_SCK 9\n\n// Power\n#define VEXT_ENABLE 5\n#define VEXT_ON_VALUE HIGH\n#define ADC_CTRL 46\n#define ADC_CTRL_ENABLED HIGH\n#define BATTERY_PIN 6\n#define ADC_CHANNEL ADC1_GPIO6_CHANNEL\n#define ADC_MULTIPLIER 4.9 * 1.03        // Voltage divider is roughly 1:1\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // Voltage divider output is quite high\n\n// LoRa\n#define USE_SX1262\n\n#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif // HAS_TFT"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper/einkDetect.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\nenum class EInkDetectionResult : uint8_t {\n    LCMEN213EFC1 = 0, // V1.1\n    E0213A367 = 1,    // V1.1.1, V1.2\n};\n\nEInkDetectionResult detectEInk()\n{\n    // Test 1: Logic of BUSY pin\n\n    // Determines controller IC manufacturer\n    // Fitipower: busy when LOW\n    // Solomon Systech: busy when HIGH\n\n    // Force display BUSY by holding reset pin active\n    pinMode(PIN_EINK_RES, OUTPUT);\n    digitalWrite(PIN_EINK_RES, LOW);\n\n    delay(10);\n\n    // Read whether pin is HIGH or LOW while busy\n    pinMode(PIN_EINK_BUSY, INPUT);\n    bool busyLogic = digitalRead(PIN_EINK_BUSY);\n\n    // Test complete. Release pin\n    pinMode(PIN_EINK_RES, INPUT);\n\n    if (busyLogic == LOW)\n        return EInkDetectionResult::LCMEN213EFC1;\n    else // busy HIGH\n        return EInkDetectionResult::E0213A367;\n}"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/E0213A367.h\"\n#include \"graphics/niche/Drivers/EInk/LCMEN2R13EFC1.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\n#include \"einkDetect.h\" // Detect display model at runtime\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // Detect E-Ink Model\n    // -------------------\n\n    EInkDetectionResult displayModel = detectEInk();\n\n    // SPI\n    // -----------------------------\n\n    // Display is connected to HSPI\n    SPIClass *hspi = new SPIClass(HSPI);\n    hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver;\n\n    if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1.1\n        driver = new Drivers::LCMEN213EFC1;\n    else if (displayModel == EInkDetectionResult::E0213A367) // V1.1.1, V1.2\n        driver = new Drivers::E0213A367;\n\n    driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n\n    if (displayModel == EInkDetectionResult::LCMEN213EFC1) // V1.1 (unmarked)\n        inkhud->setDisplayResilience(10, 1.5);\n    else if (displayModel == EInkDetectionResult::E0213A367) // V1.1.1, V1.2\n        inkhud->setDisplayResilience(15, 3);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?\n    inkhud->persistence->settings.rotation = 3;           // 270 degrees clockwise\n    inkhud->persistence->settings.userTiles.count = 1;    // One tile only by default, keep things simple for new users\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, not autoshown, default on tile 0\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet, false, false); // -\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // #0: Main User Button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // No aux button on this board\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 41;\nstatic const uint8_t SCL = 42;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO1 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper/platformio.ini",
    "content": "; Using the original screen class\n[env:heltec-wireless-paper]\ncustom_meshtastic_hw_model = 49\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_PAPER\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec Wireless Paper\ncustom_meshtastic_images = heltec-wireless-paper.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_wifi_lora_32_V3\nboard_build.partitions = default_8MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags} \n  -I variants/esp32s3/heltec_wireless_paper\n  -D HELTEC_WIRELESS_PAPER \n  -D GXEPD2_DRIVER_0=GxEPD2_213_FC1\n  -D GXEPD2_DRIVER_1=GxEPD2_213_E0213A367\n  -D EINK_WIDTH=250\n  -D EINK_HEIGHT=122\n  -D USE_EINK\n  -D USE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -D EINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted\n  -D EINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -D EINK_HASQUIRK_GHOSTING             ; Display model is identified as \"prone to ghosting\"\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\nupload_speed = 115200\n\n[env:heltec-wireless-paper-inkhud]\nextends = esp32s3_base, inkhud\nboard = heltec_wifi_lora_32_V3\nboard_build.partitions = default_8MB.csv\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  ${inkhud.build_src_filter}\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/esp32s3/heltec_wireless_paper\n  -D HELTEC_WIRELESS_PAPER\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${esp32s3_base.lib_deps}\nupload_speed = 921600\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper/variant.h",
    "content": "#define LED_POWER 18\n#define BUTTON_PIN 0\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// Display (E-Ink)\n#define PIN_EINK_CS 4\n#define PIN_EINK_BUSY 7\n#define PIN_EINK_DC 5\n#define PIN_EINK_RES 6\n#define PIN_EINK_SCLK 3\n#define PIN_EINK_MOSI 2\n\n// SPI\n#define SPI_INTERFACES_COUNT 2\n#define PIN_SPI_MISO 11\n#define PIN_SPI_MOSI 10\n#define PIN_SPI_SCK 9\n\n// Power\n#define VEXT_ENABLE 45 // Active low, powers the E-Ink display\n#define VEXT_ON_VALUE LOW\n#define ADC_CTRL 19\n#define BATTERY_PIN 20\n#define ADC_CHANNEL ADC2_GPIO20_CHANNEL\n#define ADC_MULTIPLIER 2                // Voltage divider is roughly 1:1\n#define BAT_MEASURE_ADC_UNIT 2          // Use ADC2\n#define ADC_ATTENUATION ADC_ATTEN_DB_12 // Voltage divider output is quite high\n#define ADC_CTRL_ENABLED LOW\n\n#define NO_EXT_GPIO 1\n#define NO_GPS 1\n\n// LoRa\n#define USE_SX1262\n\n#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper_v1/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\nstatic const uint8_t KEY_BUILTIN = 0;\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 41;\nstatic const uint8_t SCL = 42;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 45;\nstatic const uint8_t LED = 18;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO1 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper_v1/platformio.ini",
    "content": "[env:heltec-wireless-paper-v1_0]\ncustom_meshtastic_hw_model = 57\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_PAPER_V1_0\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Heltec Wireless Paper V1.0\ncustom_meshtastic_images = heltec-wireless-paper-v1_0.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard_level = extra\nboard = heltec_wifi_lora_32_V3\nboard_build.partitions = default_8MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags} \n  -I variants/esp32s3/heltec_wireless_paper_v1 \n  -D HELTEC_WIRELESS_PAPER_V1_0\n  -D EINK_DISPLAY_MODEL=GxEPD2_213_BN\n  -D EINK_WIDTH=250\n  -D EINK_HEIGHT=122\n  -D USE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -D EINK_LIMIT_FASTREFRESH=5           ; How many consecutive fast-refreshes are permitted\n  -D EINK_LIMIT_GHOSTING_PX=2000        ; (Optional) How much image ghosting is tolerated\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\nupload_speed = 115200\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_paper_v1/variant.h",
    "content": "#define LED_POWER 18\n#define BUTTON_PIN 0\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// Display (E-Ink)\n#define USE_EINK\n#define PIN_EINK_CS 4\n#define PIN_EINK_BUSY 7\n#define PIN_EINK_DC 5\n#define PIN_EINK_RES 6\n#define PIN_EINK_SCLK 3\n#define PIN_EINK_MOSI 2\n\n// SPI\n#define SPI_INTERFACES_COUNT 2\n#define PIN_SPI_MISO 11\n#define PIN_SPI_MOSI 10\n#define PIN_SPI_SCK 9\n\n// Power\n#define VEXT_ENABLE 45 // Active low, powers the E-Ink display\n#define VEXT_ON_VALUE LOW\n#define ADC_CTRL 19\n#define BATTERY_PIN 20\n#define ADC_CHANNEL ADC2_GPIO20_CHANNEL\n#define ADC_MULTIPLIER 2                // Voltage divider is roughly 1:1\n#define BAT_MEASURE_ADC_UNIT 2          // Use ADC2\n#define ADC_ATTENUATION ADC_ATTEN_DB_12 // Voltage divider output is quite high\n#define ADC_CTRL_ENABLED LOW\n\n#define NO_EXT_GPIO 1\n#define NO_GPS 1\n\n// LoRa\n#define USE_SX1262\n\n#define LORA_DIO0 RADIOLIB_NC // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define WIFI_LoRa_32_V3 true\n#define DISPLAY_HEIGHT 80\n#define DISPLAY_WIDTH 160\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 45;\nstatic const uint8_t SCL = 46;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 36;\nstatic const uint8_t LED = 18;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker/platformio.ini",
    "content": "[env:heltec-wireless-tracker]\ncustom_meshtastic_hw_model = 48\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_TRACKER\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec Wireless Tracker V1.1\ncustom_meshtastic_images = heltec-wireless-tracker.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_wireless_tracker\nboard_build.partitions = default_8MB.csv\nupload_protocol = esptool\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/heltec_wireless_tracker\n  -D HELTEC_TRACKER_V1_1\n  ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker/variant.h",
    "content": "#define LED_POWER 18\n\n#define _VARIANT_HELTEC_WIRELESS_TRACKER\n#define HELTEC_TRACKER_V1_X\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// ST7735S TFT LCD\n#define ST7735S 1 // there are different (sub-)versions of ST7735\n#define ST7735_CS 38\n#define ST7735_RS 40  // DC\n#define ST7735_SDA 42 // MOSI\n#define ST7735_SCK 41\n#define ST7735_RESET 39\n#define ST7735_MISO -1\n#define ST7735_BUSY -1\n#define TFT_BL 21 /* V1.1 PCB marking */\n#define ST7735_SPI_HOST SPI3_HOST\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define SCREEN_ROTATE\n#define TFT_HEIGHT DISPLAY_WIDTH\n#define TFT_WIDTH DISPLAY_HEIGHT\n#define TFT_OFFSET_X 26\n#define TFT_OFFSET_Y -1\n#define SCREEN_TRANSITION_FRAMERATE 3 // fps\n#define DISPLAY_FORCE_SMALL_FONTS\n#define USE_TFTDISPLAY 1\n\n// pin 3 is Vext on v1.1 - HIGH enables LDO for Vext rail which goes to:\n// GPS UC6580:          GPS V_DET(8), VDD_IO(7), DCDC_IN(21), pulls up RESETN(17), D_SEL(33) and BOOT_MODE(34) through 10kR\n// GPS LNA SW7125DE:    VCC(4), pulls up SHDN(5) through 10kR\n// LED:                 VDD, LEDA (through diode)\n\n#define VEXT_ENABLE 3 // active HIGH - powers the GPS, GPS LNA and OLED\n#define VEXT_ON_VALUE HIGH\n#define BUTTON_PIN 0\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9 * 1.045\n#define ADC_CTRL 2     // active HIGH, powers the voltage divider. Only on 1.1\n#define ADC_USE_PULLUP // Use internal pullup/pulldown instead of actively driving the output\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 33\n#define GPS_TX_PIN 34\n#define PIN_GPS_RESET 35\n#define PIN_GPS_PPS 36\n// #define PIN_GPS_EN 3    // Uncomment to power off the GPS with triple-click on Tracker v1.1, though we'll also lose the\n// display.\n\n#define GPS_RESET_MODE LOW\n#define GPS_UC6580\n#define GPS_BAUDRATE 115200\n\n#define USE_SX1262\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker_V1_0/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define WIFI_LoRa_32_V3 true\n#define DISPLAY_HEIGHT 80\n#define DISPLAY_WIDTH 160\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 5;\nstatic const uint8_t SCL = 6;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 36;\nstatic const uint8_t LED = 18;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker_V1_0/platformio.ini",
    "content": "[env:heltec-wireless-tracker-V1-0]\ncustom_meshtastic_hw_model = 58\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_TRACKER_V1_0\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Heltec Wireless Tracker V1.0\ncustom_meshtastic_images = heltec-wireless-tracker.svg\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard_level = extra\nboard = heltec_wireless_tracker\nboard_build.partitions = default_8MB.csv\nupload_protocol = esptool\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/heltec_wireless_tracker_V1_0\n  -D HELTEC_TRACKER_V1_0\n  ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker_V1_0/variant.h",
    "content": "#define LED_POWER 18\n\n#define HELTEC_TRACKER_V1_X\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// ST7735S TFT LCD\n#define ST7735S 1 // there are different (sub-)versions of ST7735\n#define ST7735_CS 38\n#define ST7735_RS 40  // DC\n#define ST7735_SDA 42 // MOSI\n#define ST7735_SCK 41\n#define ST7735_RESET 39\n#define ST7735_MISO -1\n#define ST7735_BUSY -1\n#define TFT_BL 45\n#define ST7735_SPI_HOST SPI3_HOST\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define SCREEN_ROTATE\n#define TFT_HEIGHT DISPLAY_WIDTH\n#define TFT_WIDTH DISPLAY_HEIGHT\n#define TFT_OFFSET_X 26\n#define TFT_OFFSET_Y -1\n#define VTFT_CTRL 46                  // Heltec Tracker needs this pulled low for TFT\n#define SCREEN_TRANSITION_FRAMERATE 3 // fps\n#define DISPLAY_FORCE_SMALL_FONTS\n#define FORCE_LOW_RES 1\n#define USE_TFTDISPLAY 1\n\n#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost\n#define VEXT_ON_VALUE LOW\n#define BUTTON_PIN 0\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9 * 1.045\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 33\n#define GPS_TX_PIN 34\n#define PIN_GPS_RESET 35\n#define PIN_GPS_PPS 36\n\n#define PIN_GPS_EN 37 // Heltec Tracker needs this pulled low for GPS\n#define GPS_EN_ACTIVE LOW\n\n#define GPS_RESET_MODE LOW\n#define GPS_UC6580\n#define GPS_BAUDRATE 115200\n\n#define USE_SX1262\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker_v2/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define DISPLAY_HEIGHT 80\n#define DISPLAY_WIDTH 160\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 6;\nstatic const uint8_t SCL = 17;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 3;\nstatic const uint8_t LED = 18;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker_v2/platformio.ini",
    "content": "[env:heltec-wireless-tracker-v2]\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_images = heltec_wireless_tracker_v2.svg\ncustom_meshtastic_tags = Heltec\n\nextends = esp32s3_base\nboard = heltec_wireless_tracker_v2\nboard_build.partitions = default_8MB.csv\nupload_protocol = esptool\ncustom_meshtastic_hw_model = 113\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_TRACKER_V2\ncustom_meshtastic_architecture = esp32s3\ncustom_meshtastic_display_name = Heltec Wireless Tracker V2\ncustom_meshtastic_actively_supported = true\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/heltec_wireless_tracker_v2\n  -D HELTEC_WIRELESS_TRACKER_V2\n  -D HAS_LORA_FEM=1\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n"
  },
  {
    "path": "variants/esp32s3/heltec_wireless_tracker_v2/variant.h",
    "content": "#define LED_POWER 18\n\n#define _VARIANT_HELTEC_WIRELESS_TRACKER\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// ST7735S TFT LCD\n#define ST7735S 1 // there are different (sub-)versions of ST7735\n#define ST7735_CS 38\n#define ST7735_RS 40  // DC\n#define ST7735_SDA 42 // MOSI\n#define ST7735_SCK 41\n#define ST7735_RESET 39\n#define ST7735_MISO -1\n#define ST7735_BUSY -1\n#define TFT_BL 21\n#define ST7735_SPI_HOST SPI3_HOST\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define SCREEN_ROTATE\n#define TFT_HEIGHT DISPLAY_WIDTH\n#define TFT_WIDTH DISPLAY_HEIGHT\n#define TFT_OFFSET_X 24\n#define TFT_OFFSET_Y 0\n#define TFT_INVERT false\n#define SCREEN_TRANSITION_FRAMERATE 3 // fps\n#define DISPLAY_FORCE_SMALL_FONTS\n#define USE_TFTDISPLAY 1\n\n#define VEXT_ENABLE 3 // active HIGH - powers the GPS, GPS LNA and OLED\n#define VEXT_ON_VALUE HIGH\n#define BUTTON_PIN 0\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9 * 1.045\n#define ADC_CTRL 2     // active HIGH, powers the voltage divider.\n#define ADC_USE_PULLUP // Use internal pullup/pulldown instead of actively driving the output\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 33\n#define GPS_TX_PIN 34\n#define PIN_GPS_RESET 35\n#define PIN_GPS_PPS 36\n// #define PIN_GPS_EN 3    // Uncomment to power off the GPS with triple-click on Tracker v2, though we'll also lose the\n// display.\n\n#define GPS_RESET_MODE LOW\n#define GPS_UC6580\n#define GPS_BAUDRATE 115200\n\n#define USE_SX1262\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TCXO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// ---- KCT8103L RF FRONT END CONFIGURATION ----\n// The heltec_wireless_tracker_v2 uses a KCT8103L FEM chip with integrated PA and LNA\n// RF path: SX1262 -> Pi attenuator -> KCT8103L PA -> Antenna\n// Control logic (from KCT8103L datasheet):\n//   Transmit PA:     CSD=1, CTX=1, CPS=1\n//   Receive LNA:     CSD=1, CTX=0, CPS=X  (21dB gain, 1.9dB NF)\n//   Receive bypass:  CSD=1, CTX=1, CPS=0\n//   Shutdown:        CSD=0, CTX=X, CPS=X\n// Pin mapping:\n//   CPS (pin  5)  -> SX1262 DIO2: TX/RX path select (automatic via SX126X_DIO2_AS_RF_SWITCH)\n//   CSD (pin 4)  -> GPIO4: Chip enable (HIGH=on, LOW=shutdown)\n//   CTX (pin 6)  -> GPIO5: Switch between Receive LNA Mode and Receive Bypass Mode. (HIGH=RX bypass, LOW=RX LNA)\n//   VCC0/VCC1    -> Vfem via U3 LDO, controlled by GPIO7\n// KCT8103L FEM: TX/RX path switching is handled by DIO2 -> CPS pin (via SX126X_DIO2_AS_RF_SWITCH)\n\n#define USE_KCT8103L_PA\n#define LORA_PA_POWER 7        // VFEM_Ctrl - KCT8103L LDO power enable\n#define LORA_KCT8103L_PA_CSD 4 // CSD - KCT8103L chip enable (HIGH=on)\n#define LORA_KCT8103L_PA_CTX 5 // CTX - Switch between Receive LNA Mode and Receive Bypass Mode. (HIGH=RX bypass, LOW=RX LNA)"
  },
  {
    "path": "variants/esp32s3/heltec_wsl_v3/platformio.ini",
    "content": "[env:heltec-wsl-v3]\ncustom_meshtastic_hw_model = 44\ncustom_meshtastic_hw_model_slug = HELTEC_WSL_V3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec Wireless Stick Lite V3\ncustom_meshtastic_images = heltec-wsl-v3.svg\ncustom_meshtastic_tags = Heltec\ncustom_meshtastic_partition_scheme = 8MB\n \nextends = esp32s3_base\nboard = heltec_wifi_lora_32_V3\nboard_build.partitions = default_8MB.csv\n# Temporary until espressif creates a release with this new target\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D HELTEC_WSL_V3\n  -I variants/esp32s3/heltec_wsl_v3\n  -ULED_BUILTIN\n"
  },
  {
    "path": "variants/esp32s3/heltec_wsl_v3/variant.h",
    "content": "#define I2C_SCL SCL\n#define I2C_SDA SDA\n\n#define LED_POWER LED\n\n#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost\n#define VEXT_ON_VALUE LOW\n#define BUTTON_PIN 0\n\n#define ADC_CTRL 37\n#define ADC_CTRL_ENABLED LOW\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9 * 1.045\n\n#define USE_SX1262\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8"
  },
  {
    "path": "variants/esp32s3/icarus/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x2886\n#define USB_PID 0x0059\n\n// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600\n\n// The default Wire will be mapped to Screen and Sensors\nstatic const uint8_t SDA = 8;\nstatic const uint8_t SCL = 9;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 39;\nstatic const uint8_t SCK = 21;\nstatic const uint8_t MOSI = 38;\nstatic const uint8_t SS = 17;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/icarus/platformio.ini",
    "content": "[env:icarus]\nextends = esp32s3_base\nboard = icarus\nboard_level = extra\nboard_check = true\nboard_build.mcu = esp32s3\nboard_build.partitions = default_8MB.csv\nupload_protocol = esptool\nupload_speed = 921600\nbuild_unflags =\n  ${esp32s3_base.build_unflags}\n  -DARDUINO_USB_MODE=1\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32s3/icarus\n  -DBOARD_HAS_PSRAM\n  -DARDUINO_USB_MODE=0\n"
  },
  {
    "path": "variants/esp32s3/icarus/variant.h",
    "content": "// Icarus has a 1.3 inch OLED Screen\n#define SCREEN_SSD106\n\n#define I2C_SDA 8\n#define I2C_SCL 9\n\n#define I2C_SDA1 18\n#define I2C_SCL1 6\n\n#define BUTTON_PIN 7 // Selection button\n\n// RA-01SH/HT-RA62 LORA module\n#define USE_SX1262\n\n#define LORA_MISO 39\n#define LORA_SCK 21\n#define LORA_MOSI 38\n#define LORA_CS 17\n\n#define LORA_RESET 42\n#define LORA_DIO1 5\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY 47\n#define SX126X_RESET LORA_RESET\n\n//  DIO2 controlls an antenna switch\n#define SX126X_DIO2_AS_RF_SWITCH\n#endif\n"
  },
  {
    "path": "variants/esp32s3/link32_s3_v1/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 47;\nstatic const uint8_t SCL = 48;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 21;\nstatic const uint8_t MOSI = 34;\nstatic const uint8_t MISO = 33;\nstatic const uint8_t SCK = 16;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/link32_s3_v1/platformio.ini",
    "content": "[env:link32-s3-v1]\nextends = esp32s3_base\nboard = esp32-s3-devkitc-1\nboard_level = extra\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D LINK_32\n  -I variants/esp32s3/link32_s3_v1\n  -DARDUINO_USB_CDC_ON_BOOT\n  -DARDUINO_USB_MODE=1\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\n"
  },
  {
    "path": "variants/esp32s3/link32_s3_v1/variant.h",
    "content": "#define BATTERY_PIN 15\n#define ADC_CHANNEL ADC2_GPIO15_CHANNEL // ADC channel for battery voltage measurement\n#define BATTERY_SENSE_SAMPLES 30\n#define BAT_MEASURE_ADC_UNIT 2 // Use ADC2 for battery measurement\n\n#define USE_SSD1306\n\n#define BUTTON_PIN 0 // Button pin for this board\n#define CANCEL_BUTTON_PIN 36\n#define CANCEL_BUTTON_ACTIVE_LOW true\n#define CANCEL_BUTTON_ACTIVE_PULLUP true\n\n#define HAS_NEOPIXEL                         // If defined, we will use the neopixel library\n#define NEOPIXEL_DATA 35                     // Neopixel pin for this board\n#define NEOPIXEL_COUNT 1                     // Number of neopixels on this board\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n#define ADC_MULTIPLIER 2\n\n#define I2C_SDA 47 // I2C pins for this board\n#define I2C_SCL 48\n\n#define USE_SX1262\n\n#define LORA_SCK 16\n#define LORA_MISO 33\n#define LORA_MOSI 34\n#define LORA_CS 21\n#define LORA_RESET 18\n\n#define LORA_DIO0 12 // a No connect on the SX1262 module\n#define LORA_DIO1 13\n#define LORA_DIO2 14 // Not really used\n\n#define LORA_TCXO_GPIO 17\n\n#define TCXO_OPTIONAL\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n"
  },
  {
    "path": "variants/esp32s3/m5stack_cardputer_adv/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define USB_VID 0x303a // USB JTAG/serial debug unit ID\n#define USB_PID 0x1001 // USB JTAG/serial debug unit ID\n\nstatic const uint8_t SS = 5;\nstatic const uint8_t SDA = 8;\nstatic const uint8_t SCL = 9;\nstatic const uint8_t ADC = 10;\nstatic const uint8_t TXD2 = 13;\nstatic const uint8_t MOSI = 14;\nstatic const uint8_t RXD2 = 15;\nstatic const uint8_t MISO = 39;\nstatic const uint8_t SCK = 40;\n\n#endif\n"
  },
  {
    "path": "variants/esp32s3/m5stack_cardputer_adv/platformio.ini",
    "content": "; M5stack Cardputer Advanced\n[env:m5stack-cardputer-adv]\nextends = esp32s3_base\nboard = m5stack-stamps3\nboard_check = true\nboard_build.partitions = default_8MB.csv\nupload_protocol = esptool\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D M5STACK_CARDPUTER_ADV\n  -D BOARD_HAS_PSRAM\n  -D ARDUINO_USB_CDC_ON_BOOT=1\n  -I variants/esp32s3/m5stack_cardputer_adv\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main\n  https://github.com/meshtastic/st7789/archive/9ee76d6b18b9a8f45a2c5cae06b1134a587691eb.zip\n#  # renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver\n#  https://github.com/pschatzmann/arduino-audio-driver/archive/v0.2.1.zip\n  # renovate: datasource=git-refs depName=ESP8266Audio packageName=https://github.com/meshtastic/ESP8266Audio gitBranch=meshtastic-2.0.0-dacfix\n  https://github.com/meshtastic/ESP8266Audio/archive/343024632ee78d6216907b2353fc943a62422d80.zip\n  # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM\n  earlephilhower/ESP8266SAM@1.1.0\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\n"
  },
  {
    "path": "variants/esp32s3/m5stack_cardputer_adv/variant.h",
    "content": "#define USE_ST7789\n\n#define ST7789_NSS 37\n#define ST7789_RS 34  // DC\n#define ST7789_SDA 35 // MOSI\n#define ST7789_SCK 36\n#define ST7789_RESET 33\n#define ST7789_MISO -1\n#define ST7789_BUSY -1\n// #define VTFT_CTRL 38\n#define VTFT_LEDA 38\n// #define ST7789_BL (32+6)\n#define ST7789_SPI_HOST SPI2_HOST\n// #define TFT_BL (32+6)\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 135\n#define TFT_WIDTH 240\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define HAS_PHYSICAL_KEYBOARD 1\n\n// Backlight is controlled to power rail on this board, this also powers the neopixel\n// #define PIN_POWER_EN 38\n\n#define BUTTON_PIN 0\n\n#define I2C_SDA 8\n#define I2C_SCL 9\n\n#define I2C_SDA1 2\n#define I2C_SCL1 1\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 40\n#define LORA_MISO 39\n#define LORA_MOSI 14\n#define LORA_CS 5 // NSS\n\n#define USE_SX1262\n#define LORA_DIO0 -1\n#define LORA_RESET 3\n#define LORA_RST 3\n#define LORA_DIO1 4\n#define LORA_DIO2 6\n#define LORA_DIO3 RADIOLIB_NC\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 15\n#define GPS_TX_PIN 13\n#define HAS_GPS 1\n#define GPS_BAUDRATE 115200\n\n// audio codec ES8311\n#define HAS_I2S\n#define DAC_I2S_BCK 41\n#define DAC_I2S_WS 43\n#define DAC_I2S_DOUT 42\n#define DAC_I2S_DIN 46\n#define DAC_I2S_MCLK 45 // dummy\n\n// TCA8418 keyboard\n#define I2C_NO_RESCAN\n#define KB_INT 11\n\n#define HAS_NEOPIXEL\n#define NEOPIXEL_COUNT 1\n#define NEOPIXEL_DATA 21\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800)\n\n#define BATTERY_PIN 10 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO10_CHANNEL\n#define ADC_MULTIPLIER 2 * 1.02 // 100k + 100k, and add 2% to kick the voltage over the max voltage to show charging.\n\n// BMI270 6-axis IMU on internal I2C bus\n#define HAS_BMI270\n"
  },
  {
    "path": "variants/esp32s3/m5stack_cores3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// Some boards have too low voltage on this pin (board design bug)\n// Use different pin with 3V and connect with 48\n// and change this setup for the chosen pin (for example 38)\n#define RGB_BUILTIN SOC_GPIO_PIN_COUNT + 48\n#define RGB_BRIGHTNESS 64\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t TXD2 = 17;\nstatic const uint8_t RXD2 = 18;\n\nstatic const uint8_t SDA = 12;\nstatic const uint8_t SCL = 11;\n\nstatic const uint8_t SS = 15;\nstatic const uint8_t MOSI = 37;\nstatic const uint8_t MISO = 35;\nstatic const uint8_t SCK = 36;\n\nstatic const uint8_t G0 = 0;\nstatic const uint8_t G1 = 1;\nstatic const uint8_t G2 = 2;\nstatic const uint8_t G3 = 3;\nstatic const uint8_t G4 = 4;\nstatic const uint8_t G5 = 5;\nstatic const uint8_t G6 = 6;\nstatic const uint8_t G7 = 7;\nstatic const uint8_t G8 = 8;\nstatic const uint8_t G9 = 9;\nstatic const uint8_t G11 = 11;\nstatic const uint8_t G12 = 12;\nstatic const uint8_t G13 = 13;\nstatic const uint8_t G14 = 14;\nstatic const uint8_t G17 = 17;\nstatic const uint8_t G18 = 18;\nstatic const uint8_t G19 = 19;\nstatic const uint8_t G20 = 20;\nstatic const uint8_t G21 = 21;\nstatic const uint8_t G33 = 33;\nstatic const uint8_t G34 = 34;\nstatic const uint8_t G35 = 35;\nstatic const uint8_t G36 = 36;\nstatic const uint8_t G37 = 37;\nstatic const uint8_t G38 = 38;\nstatic const uint8_t G45 = 45;\nstatic const uint8_t G46 = 46;\n\nstatic const uint8_t ADC = 10;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/m5stack_cores3/platformio.ini",
    "content": "; M5stack CoreS3\n[env:m5stack-cores3]\nextends = esp32s3_base\nboard = m5stack-cores3\nboard_check = true\nboard_build.partitions = default_16MB.csv\nupload_protocol = esptool\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -D M5STACK_CORES3\n  -I variants/esp32s3/m5stack_cores3\n"
  },
  {
    "path": "variants/esp32s3/m5stack_cores3/variant.h",
    "content": "#define I2C_SDA 12\n#define I2C_SCL 11\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 36\n#define LORA_MISO 35\n#define LORA_MOSI 37\n#define LORA_CS 6 // NSS\n\n#define USE_RF95\n#define LORA_DIO0 14          // IRQ\n#define LORA_RESET 5          // RESET\n#define LORA_RST 5            // RESET\n#define LORA_IRQ 14           // DIO0\n#define LORA_DIO1 RADIOLIB_NC // Not really used\n#define LORA_DIO2 RADIOLIB_NC // Not really used\n\n#define HAS_AXP2101\n"
  },
  {
    "path": "variants/esp32s3/mesh-tab/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define USB_VID 0x303A\n#define USB_PID 0x80D6\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 8;\nstatic const uint8_t SCL = 9;\n\nstatic const uint8_t SS = 5;\nstatic const uint8_t MOSI = 35;\nstatic const uint8_t MISO = 37;\nstatic const uint8_t SDO = 35;\nstatic const uint8_t SDI = 37;\nstatic const uint8_t SCK = 36;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t VBAT_SENSE = 2;\nstatic const uint8_t VBUS_SENSE = 34;\n\nstatic const uint8_t RGB_DATA = 40;\n// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()\n#define RGB_BUILTIN (RGB_DATA + SOC_GPIO_PIN_COUNT)\n#define RGB_BRIGHTNESS 64\n\nstatic const uint8_t RGB_PWR = 39;\nstatic const uint8_t LDO2 = 39;\nstatic const uint8_t LED = 13;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/mesh-tab/platformio.ini",
    "content": "; Base for Mesh-Tab device (esp32-s3 N16R2 + ra-sh01 lora)\n; https://github.com/valzzu/Mesh-Tab\n[mesh_tab_base]\nextends = esp32s3_base\nboard = mesh-tab\nboard_level = extra\nboard_upload.flash_size = 16MB\nboard_build.partitions = default_16MB.csv\nupload_protocol = esptool\nbuild_flags = ${esp32s3_base.build_flags}\n  -D MESH_TAB\n  -D CONFIG_ARDUHAL_ESP_LOG\n  -D CONFIG_ARDUHAL_LOG_COLORS=1\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1\n  -D MESHTASTIC_EXCLUDE_INPUTBROKER=1\n  -D MESHTASTIC_EXCLUDE_BLUETOOTH=1\n  -D MESHTASTIC_EXCLUDE_WEBSERVER=1\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D LV_BUILD_TEST=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D RADIOLIB_SPI_PARANOID=0\n  -D HAS_SCREEN=0\n  -D HAS_TFT=1\n  -D USE_PIN_BUZZER\n  -D RAM_SIZE=1024\n  -D LGFX_DRIVER_TEMPLATE\n  -D LGFX_DRIVER=LGFX_GENERIC\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_GENERIC.h\\\"\n  -D LGFX_PIN_SCK=12\n  -D LGFX_PIN_MOSI=13\n  -D LGFX_PIN_MISO=11\n  -D LGFX_PIN_DC=16\n  -D LGFX_PIN_CS=10\n  -D LGFX_PIN_RST=-1\n  -D LGFX_PIN_BL=42\n  -D LGFX_TOUCH_INT=41\n  -D VIEW_320x240\n  -D USE_PACKET_API\n  -I variants/esp32s3/mesh-tab\nbuild_src_filter = ${esp32s3_base.build_src_filter}\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  ${device-ui_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n\n[mesh_tab_xpt2046]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_base.build_flags}\n  -D LGFX_TOUCH=XPT2046\n  -D LGFX_TOUCH_SPI_FREQ=2500000\n  -D LGFX_TOUCH_SPI_HOST=2\n  -D LGFX_TOUCH_CS=7\n  -D LGFX_TOUCH_CLK=12\n  -D LGFX_TOUCH_DO=11\n  -D LGFX_TOUCH_DIN=13\n  -D LGFX_TOUCH_X_MIN=300\n  -D LGFX_TOUCH_X_MAX=3900\n  -D LGFX_TOUCH_Y_MIN=400\n  -D LGFX_TOUCH_Y_MAX=3900\n\n[mesh_tab_ft5x06]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_base.build_flags}\n  -D LGFX_TOUCH=FT5x06\n  -D LGFX_TOUCH_I2C_FREQ=400000\n  -D LGFX_TOUCH_I2C_PORT=0\n  -D LGFX_TOUCH_I2C_ADDR=0x38\n  -D LGFX_TOUCH_I2C_SDA=8\n  -D LGFX_TOUCH_I2C_SCL=9\n  -D LGFX_TOUCH_RST=7\n\n; 3.2\" TN TFT ST7789 / XPT2046: https://vi.aliexpress.com/item/1005005933490544.html\n[env:mesh-tab-3-2-TN-resistive]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_xpt2046.build_flags}\n  -D SPI_FREQUENCY=60000000\n  -D LGFX_SCREEN_WIDTH=240\n  -D LGFX_SCREEN_HEIGHT=320\n  -D DISPLAY_SIZE=320x240 ; landscape mode\n  -D LGFX_PANEL=ST7789\n  -D LGFX_INVERT_COLOR=false\n  -D LGFX_ROTATION=3\n  -D LGFX_TOUCH_ROTATION=4\n\n; 3.2\" IPS TFT ILI9341 / XPT2046: https://www.aliexpress.com/item/1005006258575617.html\n[env:mesh-tab-3-2-IPS-resistive]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_xpt2046.build_flags}\n  -D SPI_FREQUENCY=60000000 ; if image is distorted then lower to 40 MHz\n  -D LGFX_SCREEN_WIDTH=240\n  -D LGFX_SCREEN_HEIGHT=320\n  -D DISPLAY_SIZE=320x240 ; landscape mode\n  -D LGFX_PANEL=ILI9341\n  -D LGFX_ROTATION=1\n  -D LGFX_TOUCH_ROTATION=4\n\n; 3.5\" IPS TFT ILI9488 / XPT2046: https://vi.aliexpress.com/item/1005006333922639.html\n[env:mesh-tab-3-5-IPS-resistive]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_xpt2046.build_flags}\n  -D SPI_FREQUENCY=60000000 ; may go higher upto 40/60/80 MHz\n  -D DISPLAY_SET_RESOLUTION\n  -D LGFX_SCREEN_WIDTH=320\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=320x480 ; portrait mode\n  -D LGFX_PANEL=ILI9488\n  -D LGFX_ROTATION=0\n  -D LGFX_TOUCH_ROTATION=0\n\n; 3.5\" TN TFT ILI9488 / XPT2046: https://vi.aliexpress.com/item/32985467436.html\n[env:mesh-tab-3-5-TN-resistive]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_xpt2046.build_flags}\n  -D SPI_FREQUENCY=60000000\n  -D DISPLAY_SET_RESOLUTION\n  -D LGFX_SCREEN_WIDTH=320\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=320x480 ; portrait mode\n  -D LGFX_PANEL=HX8357B\n  -D LGFX_INVERT_COLOR=false\n  -D LGFX_ROTATION=4\n  -D LGFX_TOUCH_ROTATION=2\n\n; 3.2\" IPS TFT ILI9341 / FT6236: https://vi.aliexpress.com/item/1005006624072350.html\n[env:mesh-tab-3-2-IPS-capacitive]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_ft5x06.build_flags}\n  -D SPI_FREQUENCY=75000000 ; may go higher upto 60/80 MHz\n  -D LGFX_SCREEN_WIDTH=240\n  -D LGFX_SCREEN_HEIGHT=320\n  -D DISPLAY_SIZE=320x240 ; landscape mode\n  -D LGFX_PANEL=ILI9341\n  -D LGFX_ROTATION=1\n  -D LGFX_TOUCH_X_MIN=0\n  -D LGFX_TOUCH_X_MAX=239\n  -D LGFX_TOUCH_Y_MIN=0\n  -D LGFX_TOUCH_Y_MAX=319\n  -D LGFX_TOUCH_ROTATION=2\n\n; 3.5\" IPS TFT ILI9488 / FT6236: https://vi.aliexpress.com/item/1005006893699919.html\n[env:mesh-tab-3-5-IPS-capacitive]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_ft5x06.build_flags}\n  -D SPI_FREQUENCY=75000000 ; may go higher upto 40/60/80 MHz\n  -D DISPLAY_SET_RESOLUTION\n  -D LGFX_SCREEN_WIDTH=320\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=320x480 ; portrait mode\n  -D LGFX_PANEL=ILI9488\n  -D LGFX_ROTATION=2\n  -D LGFX_TOUCH_X_MIN=0\n  -D LGFX_TOUCH_X_MAX=319\n  -D LGFX_TOUCH_Y_MIN=0\n  -D LGFX_TOUCH_Y_MAX=479\n  -D LGFX_TOUCH_ROTATION=0\n\n; 4.0\" IPS TFT ILI9488 / FT6236: https://vi.aliexpress.com/item/1005007082906950.html\n[env:mesh-tab-4-0-IPS-capacitive]\nextends = mesh_tab_base\nbuild_flags = ${mesh_tab_ft5x06.build_flags}\n  -D SPI_FREQUENCY=75000000\n  -D DISPLAY_SET_RESOLUTION\n  -D LGFX_SCREEN_WIDTH=320\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=320x480 ; portrait mode\n  -D LGFX_PANEL=HX8357B\n  -D LGFX_ROTATION=4\n  -D LGFX_TOUCH_X_MIN=0\n  -D LGFX_TOUCH_X_MAX=319\n  -D LGFX_TOUCH_Y_MIN=0\n  -D LGFX_TOUCH_Y_MAX=479\n  -D LGFX_TOUCH_ROTATION=6\n"
  },
  {
    "path": "variants/esp32s3/mesh-tab/variant.h",
    "content": "#ifndef _VARIANT_MESHTAB_DIY_\n#define _VARIANT_MESHTAB_DIY_\n\n#define HAS_TOUCHSCREEN 1\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 180\n\n// Analog pins\n#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n// ratio of voltage divider (100k, 220k)\n#define ADC_MULTIPLIER 1.6 // 1.45 + 10% for correction of display undervoltage.\n#define ADC_CHANNEL ADC1_GPIO4_CHANNEL\n\n// LED\n#define LED_POWER 21\n\n// Button\n#define BUTTON_PIN 0\n\n// Button\n#define PIN_BUZZER 5\n\n// GPS\n#define GPS_RX_PIN 18\n#define GPS_TX_PIN 17\n\n// #define HAS_SDCARD 1\n#define SPI_MOSI 13\n#define SPI_SCK 12\n#define SPI_MISO 11\n#define SPI_CS 10\n#define SDCARD_CS 6\n\n// LORA MODULES\n#define USE_SX1262\n\n// LORA SPI\n#define LORA_SCK 36\n#define LORA_MISO 37\n#define LORA_MOSI 35\n#define LORA_CS 39\n\n// LORA CONFIG\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 14\n#define LORA_DIO1 15 // SX1262 IRQ\n#define LORA_DIO2 40 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET 14\n#define SX126X_RXEN 47\n#define SX126X_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#endif\n"
  },
  {
    "path": "variants/esp32s3/mini-epaper-s3/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n#include \"graphics/niche/InkHUD/SystemApplet.h\"\n\n// Shared NicheGraphics components\n#include \"graphics/niche/Drivers/EInk/GDEW0102T4.h\"\n#include \"graphics/niche/Inputs/TwoButtonExtended.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // Power-enable the E-Ink panel on this board before any SPI traffic.\n    pinMode(PIN_EINK_EN, OUTPUT);\n    digitalWrite(PIN_EINK_EN, HIGH);\n    delay(10);\n\n    // Display uses HSPI on this board\n    SPIClass *hspi = new SPIClass(HSPI);\n    hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);\n\n    Drivers::GDEW0102T4 *displayDriver = new Drivers::GDEW0102T4;\n    displayDriver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n    // Tuned fast-refresh values reg30 reg50 reg82 lutW2 lutB2 = 11 F2 04 11 0D\n    displayDriver->setFastConfig({0x11, 0xF2, 0x04, 0x11, 0x0D});\n    Drivers::EInk *driver = displayDriver;\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n    inkhud->setDriver(driver);\n    // Slightly stricter FAST/FULL\n    inkhud->setDisplayResilience(5, 1.5);\n    inkhud->twoWayRocker = true;\n\n    // Fonts\n    InkHUD::Applet::fontLarge = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_6PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Small display defaults\n    inkhud->persistence->settings.rotation = 0;\n    inkhud->persistence->settings.userTiles.maxCount = 1;\n    inkhud->persistence->settings.userTiles.count = 1;\n    inkhud->persistence->settings.joystick.enabled = true;\n    inkhud->persistence->settings.joystick.aligned = true;\n    inkhud->persistence->settings.optionalMenuItems.nextTile = false;\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, false, false);      // -\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet, true, false);                        // Activated, not autoshown\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0), true, true);   // Activated, Autoshown\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1), false, false); // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);                  // Activated\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet, false, false);   // -\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet, false, false);     // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0); // Activated, not autoshown, default on tile 0\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Enforce two-way rocker behavior regardless of persisted settings.\n    inkhud->persistence->settings.joystick.enabled = true;\n    inkhud->persistence->settings.joystick.aligned = true;\n    inkhud->persistence->settings.optionalMenuItems.nextTile = false;\n\n    // Inputs\n    Inputs::TwoButtonExtended *buttons = Inputs::TwoButtonExtended::getInstance();\n\n    // Center press (boot button)\n    buttons->setWiring(0, INPUTDRIVER_TWO_WAY_ROCKER_BTN, true);\n    // Match baseUI encoder long-press feel.\n    buttons->setTiming(0, 75, 300);\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // LEFT rocker pin is IO4; RIGHT rocker pin is IO3.\n    buttons->setTwoWayRockerWiring(INPUTDRIVER_TWO_WAY_ROCKER_LEFT, INPUTDRIVER_TWO_WAY_ROCKER_RIGHT, true);\n    buttons->setJoystickDebounce(50);\n\n    // Two-way rocker behavior:\n    // - when a system applet is handling input (menu, tips, etc): LEFT=up, RIGHT=down\n    // - otherwise: LEFT=previous applet, RIGHT=next applet\n    buttons->setTwoWayRockerPressHandlers(\n        [inkhud]() {\n            bool systemHandlingInput = false;\n            for (InkHUD::SystemApplet *sa : inkhud->systemApplets) {\n                if (sa->handleInput) {\n                    systemHandlingInput = true;\n                    break;\n                }\n            }\n\n            if (systemHandlingInput)\n                inkhud->navUp();\n            else\n                inkhud->prevApplet();\n        },\n        [inkhud]() {\n            bool systemHandlingInput = false;\n            for (InkHUD::SystemApplet *sa : inkhud->systemApplets) {\n                if (sa->handleInput) {\n                    systemHandlingInput = true;\n                    break;\n                }\n            }\n\n            if (systemHandlingInput)\n                inkhud->navDown();\n            else\n                inkhud->nextApplet();\n        });\n\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/esp32s3/mini-epaper-s3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303A\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 18;\nstatic const uint8_t SCL = 9;\n\n// Default SPI (LoRa bus)\nstatic const uint8_t SS = -1;\nstatic const uint8_t MOSI = 17;\nstatic const uint8_t MISO = 6;\nstatic const uint8_t SCK = 8;\n\n// SD card SPI bus\n#define SPI_MOSI (39)\n#define SPI_SCK (41)\n#define SPI_MISO (38)\n#define SPI_CS (40)\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/mini-epaper-s3/platformio.ini",
    "content": "[env:mini-epaper-s3]\n;custom_meshtastic_hw_model =\ncustom_meshtastic_hw_model_slug = MINI_EPAPER_S3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO Mini ePaper S3 E-Ink\ncustom_meshtastic_images = mini-epaper-s3.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_requires_dfu = no\n\nextends = esp32s3_base\nboard = mini-epaper-s3\nboard_check = true\nupload_protocol = esptool\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/mini-epaper-s3\n  -D MINI_EPAPER_S3\n  -D USE_EINK\n  -D EINK_DISPLAY_MODEL=GxEPD2_102\n  -D EINK_WIDTH=128\n  -D EINK_HEIGHT=80\n  -D USE_EINK_DYNAMICDISPLAY\n  -D EINK_LIMIT_FASTREFRESH=3\n  -D EINK_BACKGROUND_USES_FAST\n  -D EINK_HASQUIRK_GHOSTING\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n\n[env:mini-epaper-s3-inkhud]\nextends = esp32s3_base, inkhud\nboard = mini-epaper-s3\nboard_check = true\nupload_protocol = esptool\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  ${inkhud.build_src_filter}\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/esp32s3/mini-epaper-s3\n  -D MINI_EPAPER_S3\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n"
  },
  {
    "path": "variants/esp32s3/mini-epaper-s3/variant.h",
    "content": "#pragma once\n\n#define GPS_DEFAULT_NOT_PRESENT 1\n\n// SD card (TF)\n#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n#define SDCARD_CS 40\n#define SD_SPI_FREQUENCY 25000000U\n\n// Built-in RTC (I2C)\n#define PCF8563_RTC 0x51\n#define HAS_RTC 1\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// Battery voltage monitoring\n#define BATTERY_PIN 2 // A battery voltage measurement pin, voltage divider connected here to\n// measure battery voltage ratio of voltage divider = 2.0 (assumption)\n#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.\n#define ADC_CHANNEL ADC1_GPIO2_CHANNEL\n\n// Display (E-Ink)\n#define PIN_EINK_EN 42\n#define PIN_EINK_CS 13\n#define PIN_EINK_BUSY 10\n#define PIN_EINK_DC 12\n#define PIN_EINK_RES 11\n#define PIN_EINK_SCLK 14\n#define PIN_EINK_MOSI 15\n#define DISPLAY_FORCE_SMALL_FONTS\n\n// Two-Way Rocker input (left/right + boot as press)\n#define INPUTDRIVER_TWO_WAY_ROCKER\n#define INPUTDRIVER_ENCODER_TYPE 2\n#define INPUTDRIVER_TWO_WAY_ROCKER_RIGHT 3\n#define INPUTDRIVER_TWO_WAY_ROCKER_LEFT 4\n#define INPUTDRIVER_TWO_WAY_ROCKER_BTN 0\n#define UPDOWN_LONG_PRESS_REPEAT_INTERVAL 150\n\n// LoRa (SX1262)\n#define USE_SX1262\n\n#define LORA_DIO1 5\n#define LORA_SCK 8\n#define LORA_MISO 6\n#define LORA_MOSI 17\n#define LORA_CS 7 // CS not connected; IO7 is free\n#define LORA_RESET 21\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY 16\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n"
  },
  {
    "path": "variants/esp32s3/nibble_esp32/platformio.ini",
    "content": "[env:nibble-esp32]\nextends = esp32s3_base\nboard = esp32-s3-zero\nboard_level = extra\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/esp32s3/nibble_esp32\n"
  },
  {
    "path": "variants/esp32s3/nibble_esp32/variant.h",
    "content": "#define I2C_SDA 11 // I2C pins for this board\n#define I2C_SCL 10\n\n#define LED_POWER 1 // If defined we will blink this LED\n\n#define BUTTON_PIN 0 // If defined, this will be used for user button presses\n#define BUTTON_NEED_PULLUP\n\n#define USE_RF95\n#define LORA_SCK 6\n#define LORA_MISO 7\n#define LORA_MOSI 8\n#define LORA_CS 9\n#define LORA_DIO0 5 // a No connect on the SX1262 module\n#define LORA_RESET 4\n\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC"
  },
  {
    "path": "variants/esp32s3/nugget_s3_lora/platformio.ini",
    "content": "[env:nugget-s3-lora]\nextends = esp32s3_base\nboard = lolin_s3_mini\nboard_level = extra\nbuild_flags =\n  ${esp32s3_base.build_flags} -D ARDUINO_USB_CDC_ON_BOOT=1 -D PRIVATE_HW -I variants/esp32s3/nugget_s3_lora\n"
  },
  {
    "path": "variants/esp32s3/nugget_s3_lora/variant.h",
    "content": "#define I2C_SDA 35 // I2C pins for this board\n#define I2C_SCL 36\n\n#define USE_SSD1306\n#define DISPLAY_FLIP_SCREEN\n\n#define LED_POWER 15 // If defined we will blink this LED\n\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 3                     // How many neopixels are connected\n#define NEOPIXEL_DATA 10                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n// Button A (44), B (43), R (12), U (13), L (11), D (18)\n#define BUTTON_PIN 43 // If defined, this will be used for user button presses\n#define BUTTON_NEED_PULLUP\n\n#define USE_RF95\n#define LORA_SCK 6\n#define LORA_MISO 7\n#define LORA_MOSI 8\n#define LORA_CS 9\n#define LORA_DIO0 16\n#define LORA_RESET 4\n\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC\n\n// jk, its not really a trackball but we're gonna pretend!\n#define HAS_TRACKBALL 1\n#define TB_UP 13\n#define TB_DOWN 18\n#define TB_LEFT 11\n#define TB_RIGHT 12\n#define TB_PRESS 44 // BUTTON_PIN\n#define TB_DIRECTION FALLING\n\n#define ENABLE_AMBIENTLIGHTING\n"
  },
  {
    "path": "variants/esp32s3/picomputer-s3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 8;\nstatic const uint8_t SCL = 9;\n\n// Default SPI\nstatic const uint8_t MISO = 39;\nstatic const uint8_t SCK = 21;\nstatic const uint8_t MOSI = 38;\nstatic const uint8_t SS = 40;\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/picomputer-s3/platformio.ini",
    "content": "[env:picomputer-s3]\ncustom_meshtastic_hw_model = 52\ncustom_meshtastic_hw_model_slug = PICOMPUTER_S3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Pi Computer S3\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = bpi_picow_esp32_s3\nboard_check = true\nboard_build.partitions = partition-table-8MB.csv\n;OpenOCD flash method\n;upload_protocol = esp-builtin\n;Normal method\nupload_protocol = esptool\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -DPICOMPUTER_S3\n  -I variants/esp32s3/picomputer-s3\n\nlib_deps = \n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n\n\n[env:picomputer-s3-tft]\nextends = env:picomputer-s3\n\nbuild_flags =\n  ${env:picomputer-s3.build_flags}\n  -D MESHTASTIC_EXCLUDE_WEBSERVER=1\n  -D INPUTDRIVER_MATRIX_TYPE=1\n  -D USE_PIN_BUZZER=PIN_BUZZER\n  -D USE_SX127x\n  -D HAS_SCREEN=1\n  -D HAS_TFT=1\n  -D RAM_SIZE=1560\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D LGFX_SCREEN_WIDTH=240\n  -D LGFX_SCREEN_HEIGHT=320\n  -D DISPLAY_SIZE=320x240 ; landscape mode\n  -D LGFX_DRIVER=LGFX_PICOMPUTER_S3\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_PICOMPUTER_S3.h\\\"\n  -D VIEW_320x240\n;  -D USE_DOUBLE_BUFFER\n  -D USE_PACKET_API\n\nlib_deps =\n  ${env:picomputer-s3.lib_deps}\n  ${device-ui_base.lib_deps}\n"
  },
  {
    "path": "variants/esp32s3/picomputer-s3/variant.h",
    "content": "#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define BUTTON_PIN 0\n\n#define PIN_BUZZER 43\n\n#define HAS_WIRE 0\n\n#define BATTERY_PIN ADC1_CHANNEL_1_GPIO_NUM // 2\n// A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n// ratio of voltage divider = 3.0 (R11=200k, R7=100k)\n#define ADC_MULTIPLIER 3.1 // 3.0 with correction of display undervoltage.\n#define ADC_CHANNEL ADC1_GPIO2_CHANNEL\n\n#define USE_RF95 // RFM95/SX127x\n\n#define LORA_SCK SCK   // 21\n#define LORA_MISO MISO // 39\n#define LORA_MOSI MOSI // 38\n#define LORA_CS SS     // 40\n#define LORA_RESET RADIOLIB_NC\n\n// per SX1276_Receive_Interrupt/utilities.h\n#define LORA_DIO0 10\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC\n\n// Default SPI1 will be mapped to the display\n#define ST7789_SDA 4\n#define ST7789_SCK 3\n#define ST7789_CS 6\n#define ST7789_RS 1\n#define ST7789_BL 5\n#define USE_TFTDISPLAY 1\n\n#define ST7789_RESET -1\n#define ST7789_MISO -1\n#define ST7789_BUSY -1\n#define ST7789_SPI_HOST SPI3_HOST\n#define TFT_BL 5\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 320\n#define TFT_WIDTH 240\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 0\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5\n\n// Picomputer gets a white on black display\n#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)\n\n#define INPUTBROKER_MATRIX_TYPE 1\n\n#define KEYS_COLS                                                                                                                \\\n    {                                                                                                                            \\\n        44, 47, 17, 15, 13, 41                                                                                                   \\\n    }\n#define KEYS_ROWS                                                                                                                \\\n    {                                                                                                                            \\\n        12, 16, 42, 18, 14, 7                                                                                                    \\\n    }\n"
  },
  {
    "path": "variants/esp32s3/rak3312/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"variant.h\"\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 9;\nstatic const uint8_t SCL = 40;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 12;\nstatic const uint8_t MOSI = 11;\nstatic const uint8_t MISO = 10;\nstatic const uint8_t SCK = 13;\n\n#define SPI_INTERFACES_COUNT 1\n\n#define SPI_MOSI (11)\n#define SPI_SCK (13)\n#define SPI_MISO (10)\n#define SPI_CS (12)\n\n#ifdef _VARIANT_RAK3112_\n/*\n * Serial interfaces\n */\n// TXD1 RXD1 on Base Board\n#define PIN_SERIAL1_RX (44)\n#define PIN_SERIAL1_TX (43)\n\n/*\n * Internal SPI to LoRa transceiver\n */\n#define LORA_SX126X_SCK 5\n#define LORA_SX126X_MISO 3\n#define LORA_SX126X_MOSI 6\n\n/*\n * Analog pins\n */\n#define PIN_A0 (21)\n#define PIN_A1 (14)\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 2\n\n#define PIN_WIRE1_SDA (17)\n#define PIN_WIRE1_SCL (18)\n\n/*\n * GPIO's\n */\n#define WB_IO1 21\n#define WB_IO2 2\n// #define WB_IO2 14\n#define WB_IO3 41\n#define WB_IO4 42\n#define WB_IO5 38\n#define WB_IO6 39\n// #define WB_SW1 35 NC\n#define WB_A0 1\n#define WB_A1 2\n#define WB_CS 12\n#define WB_LED1 46\n#define WB_LED2 45\n#endif\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/rak3312/platformio.ini",
    "content": "[env:rak3312]\ncustom_meshtastic_hw_model = 106\ncustom_meshtastic_hw_model_slug = RAK3312\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = RAK3312\ncustom_meshtastic_images = rak_3312.svg\ncustom_meshtastic_tags = RAK\ncustom_meshtastic_requires_dfu = false\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = esp32s3_base\nboard = wiscore_rak3312\nboard_level = pr\nboard_check = true\nupload_protocol = esptool\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D RAK3312\n  -I variants/esp32s3/rak3312\n\n[env:rak3112]\nextends = esp32s3_base\nboard = wiscore_rak3312\nboard_level = extra\nupload_protocol = esptool\n\nbuild_flags =\n  ${esp32_base.build_flags}\n  -D RAK3312 \n  -D _VARIANT_RAK3112_\n  -I variants/esp32s3/rak3312\n"
  },
  {
    "path": "variants/esp32s3/rak3312/variant.h",
    "content": "#define I2C_SDA 9\n#define I2C_SCL 40\n\n#define USE_SX1262\n\n#define LORA_SCK 5\n#define LORA_MISO 3\n#define LORA_MOSI 6\n#define LORA_CS 7\n#define LORA_RESET 8\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 47\n#define SX126X_BUSY 48\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n#define LED_GREEN 46\n#define LED_BLUE 45\n\n#define PIN_LED1 LED_GREEN\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_POWER LED_GREEN\n#define ledOff(pin) pinMode(pin, INPUT)\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n#define BATTERY_PIN 1\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n\n#ifdef _VARIANT_RAK3112_ //  Modular variant (stamp)\n#define ADC_MULTIPLIER 2.11\n\n#define BUTTON_NEED_PULLUP\n\n#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n#define SDCARD_CS SPI_CS\n\n#define I2C_SDA1 PIN_WIRE1_SDA\n#define I2C_SCL1 PIN_WIRE1_SCL\n#else // Generic 3312 variant (40-pin standard connector)\n#define ADC_MULTIPLIER 1.667\n\n#define SX126X_POWER_EN (4)\n\n#define PIN_POWER_EN PIN_3V3_EN\n#define PIN_3V3_EN (14)\n\n#define HAS_GPS 1\n#define GPS_TX_PIN 43\n#define GPS_RX_PIN 44\n\n#endif"
  },
  {
    "path": "variants/esp32s3/rak_wismesh_tap_v2/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"variant.h\"\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 9;\nstatic const uint8_t SCL = 40;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 12;\nstatic const uint8_t MOSI = 11;\nstatic const uint8_t MISO = 10;\nstatic const uint8_t SCK = 13;\n\n#define SPI_MOSI (11)\n#define SPI_SCK (13)\n#define SPI_MISO (10)\n#define SPI_CS (12)\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/rak_wismesh_tap_v2/platformio.ini",
    "content": "; rak_wismeshtap2 rak3112\n[ft5x06]\nbuild_flags =\n  -D LGFX_TOUCH=FT5x06\n  -D LGFX_TOUCH_I2C_FREQ=100000\n  -D LGFX_TOUCH_I2C_PORT=0\n  -D LGFX_TOUCH_I2C_ADDR=0x38\n  -D LGFX_TOUCH_I2C_SDA=9\n  -D LGFX_TOUCH_I2C_SCL=40\n  -D LGFX_TOUCH_RST=-1\n  -D LGFX_TOUCH_INT=39\n\n[env:rak_wismesh_tap_v2]\ncustom_meshtastic_hw_model = 116\ncustom_meshtastic_hw_model_slug = WISMESH_TAP_V2\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = RAK WisMesh Tap V2\ncustom_meshtastic_images = rak-wismesh-tap-v2.svg\ncustom_meshtastic_tags = RAK\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = wiscore_rak3312\nboard_check = true\nupload_protocol = esptool\nboard_build.partitions = default_8MB.csv\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D RAK3312\n  -D RAK_WISMESH_TAP_V2 \n  -I variants/esp32s3/rak_wismesh_tap_v2\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n\n[env:rak_wismesh_tap_v2-tft]\nextends = env:rak_wismesh_tap_v2\n\nbuild_flags =\n  ${env:rak_wismesh_tap_v2.build_flags}\n  -D CONFIG_ARDUHAL_ESP_LOG\n  -D CONFIG_ARDUHAL_LOG_COLORS=1\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D LV_BUILD_TEST=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D RADIOLIB_SPI_PARANOID=0\n  -D INPUTDRIVER_BUTTON_TYPE=0\n  -D HAS_SDCARD\n  -D HAS_SCREEN=0\n  -D HAS_TFT=1\n  -D USE_PIN_BUZZER=PIN_BUZZER\n  -D RAM_SIZE=5120\n  -D LGFX_DRIVER_TEMPLATE\n  -D LGFX_DRIVER=LGFX_GENERIC\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_GENERIC.h\\\"\n  -D LGFX_PIN_SCK=13\n  -D LGFX_PIN_MOSI=11\n  -D LGFX_PIN_MISO=10\n  -D LGFX_PIN_DC=42\n  -D LGFX_PIN_CS=12\n  -D LGFX_PIN_RST=-1\n  -D LGFX_PIN_BL=41\n  -D VIEW_320x240\n  -D USE_PACKET_API\n  ${ft5x06.build_flags}\n  -D LGFX_SCREEN_WIDTH=240 ; native panel width (portrait)\n  -D LGFX_SCREEN_HEIGHT=320 ; native panel height (portrait)\n  -D DISPLAY_SIZE=320x240 ; UI runs in landscape mode\n  -D LGFX_PANEL=ST7789\n  -D LGFX_ROTATION=1\n  -D LGFX_TOUCH_X_MIN=0\n  -D LGFX_TOUCH_X_MAX=239\n  -D LGFX_TOUCH_Y_MIN=0\n  -D LGFX_TOUCH_Y_MAX=319\n  -D LGFX_TOUCH_ROTATION=2\n  -D LGFX_CFG_HOST=SPI3_HOST\n  -D MAP_FULL_REDRAW=1\n\nlib_deps =\n  ${env:rak_wismesh_tap_v2.lib_deps}\n  ${device-ui_base.lib_deps}\n\n\n"
  },
  {
    "path": "variants/esp32s3/rak_wismesh_tap_v2/variant.h",
    "content": "#ifndef _VARIANT_RAK_WISMESHTAP_V2_H\n#define _VARIANT_RAK_WISMESHTAP_V2_H\n\n#define I2C_SDA 9\n#define I2C_SCL 40\n\n#define USE_SX1262\n\n#define LORA_SCK 5\n#define LORA_MISO 3\n#define LORA_MOSI 6\n#define LORA_CS 7\n#define LORA_RESET 8\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 47\n#define SX126X_BUSY 48\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n#define SX126X_POWER_EN (4)\n\n#define PIN_POWER_EN PIN_3V3_EN\n#define PIN_3V3_EN (14)\n\n#define LED_GREEN 46\n#define LED_BLUE 45\n\n#define PIN_LED1 LED_GREEN\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_POWER LED_GREEN\n#define ledOff(pin) pinMode(pin, INPUT)\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n#define HAS_GPS 1\n#define GPS_TX_PIN 43\n#define GPS_RX_PIN 44\n\n#define SPI_MOSI (11)\n#define SPI_SCK (13)\n#define SPI_MISO (10)\n#define SPI_CS (12)\n\n#define BUTTON_PIN 0\n\n#define USE_VIRTUAL_KEYBOARD 1\n\n#define BATTERY_PIN 1\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_MULTIPLIER 1.667\n\n#define PIN_BUZZER 38\n\n#define HAS_SDCARD 1\n#define SDCARD_USE_SPI1 1\n#define SDCARD_CS 2\n\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n\n#define SD_SPI_FREQUENCY 50000000\n\n#endif"
  },
  {
    "path": "variants/esp32s3/seeed-sensecap-indicator/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n// static const uint8_t TX = 43;\n// static const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 39;\nstatic const uint8_t SCL = 40;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = -1;\nstatic const uint8_t MOSI = 48;\nstatic const uint8_t MISO = 47;\nstatic const uint8_t SCK = 41;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/seeed-sensecap-indicator/platformio.ini",
    "content": "; Seeed Studio SenseCAP Indicator\n[env:seeed-sensecap-indicator]\ncustom_meshtastic_hw_model = 70\ncustom_meshtastic_hw_model_slug = SENSECAP_INDICATOR\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Seeed SenseCAP Indicator\ncustom_meshtastic_images = seeed-sensecap-indicator.svg\ncustom_meshtastic_tags = Seeed\ncustom_meshtastic_partition_scheme = 8MB\n = true\n\nextends = esp32s3_base\nplatform_packages =\n    platformio/framework-arduinoespressif32 @ https://github.com/mverch67/arduino-esp32/archive/aef7fef6de3329ed6f75512d46d63bba12b09bb5.zip ; add_tca9535 (based on 2.0.16)\n\nboard = seeed-sensecap-indicator\nboard_check = true\nboard_build.partitions = partition-table-8MB.csv\nupload_protocol = esptool\n\nbuild_flags = ${esp32s3_base.build_flags}\n  -Ivariants/esp32s3/seeed-sensecap-indicator\n  -DSENSECAP_INDICATOR\n  -DCONFIG_ARDUHAL_LOG_COLORS\n  -DRADIOLIB_DEBUG_SPI=0\n  -DRADIOLIB_DEBUG_PROTOCOL=0\n  -DRADIOLIB_DEBUG_BASIC=0\n  -DRADIOLIB_VERBOSE_ASSERT=0\n  -DRADIOLIB_SPI_PARANOID=0\n  -DIO_EXPANDER=0x40\n  -DIO_EXPANDER_IRQ=42\n  ;-DIO_EXPANDER_DEBUG\n  -DUSE_ARDUINO_HAL_GPIO\n\nlib_deps = ${esp32s3_base.lib_deps}\n  ; TODO switch back to official LovyanGFX\n  https://github.com/mverch67/LovyanGFX/archive/4c76238c1344162a234ae917b27651af146d6fb2.zip\n  # renovate: datasource=git-refs depName=ESP8266Audio packageName=https://github.com/meshtastic/ESP8266Audio gitBranch=meshtastic-2.0.0-dacfix\n  https://github.com/meshtastic/ESP8266Audio/archive/343024632ee78d6216907b2353fc943a62422d80.zip\n  # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM\n  earlephilhower/ESP8266SAM@1.1.0\n\n[env:seeed-sensecap-indicator-tft]\nextends = env:seeed-sensecap-indicator\nboard_level = pr\nupload_speed = 460800\n\nbuild_flags =\n  ${env:seeed-sensecap-indicator.build_flags}\n  -D INPUTDRIVER_BUTTON_TYPE=38\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -D HAS_SCREEN=1\n  -D HAS_TFT=1\n  -D DISPLAY_SET_RESOLUTION\n  -D RAM_SIZE=4096\n\t-D LV_LVGL_H_INCLUDE_SIMPLE\n\t-D LV_CONF_INCLUDE_SIMPLE\n\t-D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D CUSTOM_TOUCH_DRIVER\n  -D LGFX_SCREEN_WIDTH=480\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=480x480\n  -D LGFX_DRIVER=LGFX_INDICATOR\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_INDICATOR.h\\\"\n  -D VIEW_320x240\n  -D USE_PACKET_API\n\nlib_deps =\n  ${env:seeed-sensecap-indicator.lib_deps}\n  ${device-ui_base.lib_deps}\n  ; TODO switch back to official bb_captouch\n  https://github.com/mverch67/bb_captouch/archive/8626412fe650d808a267791c0eae6e5860c85a5d.zip ; alternative touch library supporting FT6x36\n"
  },
  {
    "path": "variants/esp32s3/seeed-sensecap-indicator/variant.h",
    "content": "#define I2C_SDA 39\n#define I2C_SCL 40\n\n// This board has a serial coprocessor for sensor readings\n#define SENSOR_RP2040_TXD 19\n#define SENSOR_RP2040_RXD 20\n#define SENSOR_PORT_NUM 2\n#define SENSOR_BAUD_RATE 115200\n\n#define BUTTON_PIN 38\n#define BUTTON_ACTIVE_LOW true\n#define BUTTON_ACTIVE_PULLUP true\n\n// #define BUTTON_NEED_PULLUP\n\n// #define BATTERY_PIN 27 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n// #define ADC_CHANNEL ADC1_GPIO27_CHANNEL\n// #define ADC_MULTIPLIER 2\n\n// ST7701 TFT LCD\n#define ST7701_CS (4 | IO_EXPANDER)\n#define ST7701_RS -1  // DC\n#define ST7701_SDA 48 // MOSI\n#define ST7701_SCK 41\n#define ST7701_RESET (5 | IO_EXPANDER)\n#define ST7701_MISO 47\n#define ST7701_BUSY -1\n#define ST7701_BL 45\n#define ST7701_SPI_HOST SPI2_HOST\n#define ST7701_BACKLIGHT_EN 45\n#define SPI_FREQUENCY 12000000\n#define TFT_HEIGHT 480\n#define TFT_WIDTH 480\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 0\n#define TFT_BL 45\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5 // fps\n#define USE_TFTDISPLAY 1\n\n#define HAS_TOUCHSCREEN 1\n#define SCREEN_TOUCH_INT (6 | IO_EXPANDER)\n#define SCREEN_TOUCH_RST (7 | IO_EXPANDER)\n#define TOUCH_I2C_PORT 0\n#define TOUCH_SLAVE_ADDRESS 0x48\n\n// in future, we may want to add a buzzer and add all sensors to the indicator via a data protocol for now only GPS is supported\n// // Buzzer\n// #define PIN_BUZZER 19\n\n#define GPS_DEFAULT_NOT_PRESENT 1\n#define GPS_RX_PIN 20\n#define GPS_TX_PIN 19\n#define HAS_GPS 1\n\n#define USE_SX1262\n#define USE_SX1268\n\n#define LORA_SCK 41\n#define LORA_MISO 47\n#define LORA_MOSI 48\n#define LORA_CS (0 | IO_EXPANDER)\n\n#define LORA_DIO0 -1 // a no connect on the SX1262 module\n#define LORA_RESET (1 | IO_EXPANDER)\n#define LORA_DIO1 (3 | IO_EXPANDER) // SX1262 IRQ\n#define LORA_DIO2 (2 | IO_EXPANDER) // SX1262 BUSY\n#define LORA_DIO3\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n\n#define TCXO_OPTIONAL // handle Indicator V1 and V2\n#define SX126X_DIO3_TCXO_VOLTAGE 2.4\n\n#define USE_VIRTUAL_KEYBOARD 1\n#define DISPLAY_CLOCK_FRAME 1\n"
  },
  {
    "path": "variants/esp32s3/seeed_xiao_s3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x2886\n#define USB_PID 0x0059\n\n// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600\n\n// The default Wire will be mapped to Screen and Sensors\nstatic const uint8_t SDA = 47;\nstatic const uint8_t SCL = 48;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 8;\nstatic const uint8_t SCK = 7;\nstatic const uint8_t MOSI = 9;\nstatic const uint8_t SS = 41;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/seeed_xiao_s3/platformio.ini",
    "content": "[env:seeed-xiao-s3]\ncustom_meshtastic_hw_model = 81\ncustom_meshtastic_hw_model_slug = SEEED_XIAO_S3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Seeed Xiao ESP32-S3\ncustom_meshtastic_images = seeed-xiao-s3.svg\ncustom_meshtastic_tags = Seeed\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = seeed-xiao-s3\nboard_level = pr\nboard_check = true\nboard_build.partitions = default_8MB.csv\nupload_protocol = esptool\nupload_speed = 921600\nbuild_unflags =\n  ${esp32s3_base.build_unflags}\n  -DARDUINO_USB_MODE=1\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D SEEED_XIAO_S3\n  -I variants/esp32s3/seeed_xiao_s3\n  -DBOARD_HAS_PSRAM \n  -DARDUINO_USB_MODE=0\n"
  },
  {
    "path": "variants/esp32s3/seeed_xiao_s3/variant.h",
    "content": "/*\n ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄\n▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌\n▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌\n▐░▌          ▐░▌          ▐░▌          ▐░▌          ▐░▌       ▐░▌\n▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌       ▐░▌\n▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌\n ▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌       ▐░▌\n          ▐░▌▐░▌          ▐░▌          ▐░▌          ▐░▌       ▐░▌\n ▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌\n▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌\n ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀\n\n  ▄       ▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄       ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄\n ▐░▌     ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌     ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌\n  ▐░▌   ▐░▌  ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌     ▐░█▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀█░▌\n   ▐░▌ ▐░▌       ▐░▌     ▐░▌       ▐░▌▐░▌       ▐░▌     ▐░▌                    ▐░▌\n    ▐░▐░▌        ▐░▌     ▐░█▄▄▄▄▄▄▄█░▌▐░▌       ▐░▌     ▐░█▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄█░▌\n     ▐░▌         ▐░▌     ▐░░░░░░░░░░░▌▐░▌       ▐░▌     ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌\n    ▐░▌░▌        ▐░▌     ▐░█▀▀▀▀▀▀▀█░▌▐░▌       ▐░▌      ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌\n   ▐░▌ ▐░▌       ▐░▌     ▐░▌       ▐░▌▐░▌       ▐░▌               ▐░▌          ▐░▌\n  ▐░▌   ▐░▌  ▄▄▄▄█░█▄▄▄▄ ▐░▌       ▐░▌▐░█▄▄▄▄▄▄▄█░▌      ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌\n ▐░▌     ▐░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░░░░░░░░░░░▌     ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌\n  ▀       ▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀         ▀  ▀▀▀▀▀▀▀▀▀▀▀       ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀\n*/\n\n/*\nBoard Information: https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html\nExpansion Board Infomation : https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-board-p-4746.html\nL76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html\n*/\n\n#define LED_POWER 48\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN 21 // This is the Program Button\n#define BUTTON_NEED_PULLUP\n\n#define BATTERY_PIN -1\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n\n/*Warning:\n    https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html\n    L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it,\n    otherwise it will conflict with the SPI pins\n*/\n#define GPS_L76K\n#ifdef GPS_L76K\n#define GPS_RX_PIN 44\n#define GPS_TX_PIN 43\n#define HAS_GPS 1\n#define GPS_THREAD_INTERVAL 50\n#define PIN_SERIAL1_RX PIN_GPS_TX\n#define PIN_SERIAL1_TX PIN_GPS_RX\n#define PIN_GPS_STANDBY 1\n#endif\n\n// XIAO S3 Expansion board  has 1.3 inch OLED Screen\n#define USCREEN_SSD1306\n\n#define I2C_SDA 5\n#define I2C_SCL 6\n\n// XIAO S3 LORA module\n#define USE_SX1262\n\n#define LORA_MISO 8\n#define LORA_SCK 7\n#define LORA_MOSI 9\n#define LORA_CS 41\n\n#define LORA_RESET 42\n#define LORA_DIO1 39\n\n#define LORA_DIO2 38\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY 40\n#define SX126X_RESET LORA_RESET\n\n//  DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_RXEN 38\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n"
  },
  {
    "path": "variants/esp32s3/station-g2/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600\n\n// The default Wire will be mapped to Screen and Sensors\nstatic const uint8_t SDA = 5;\nstatic const uint8_t SCL = 6;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t MISO = 14;\nstatic const uint8_t SCK = 12;\nstatic const uint8_t MOSI = 13;\nstatic const uint8_t SS = 11;\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/station-g2/platformio.ini",
    "content": "[env:station-g2]\ncustom_meshtastic_hw_model = 31\ncustom_meshtastic_hw_model_slug = STATION_G2\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 2\ncustom_meshtastic_display_name = Station G2\ncustom_meshtastic_images = station-g2.svg\ncustom_meshtastic_tags = B&Q\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = esp32s3_base\nboard = station-g2\nboard_level = pr\nboard_check = true\nboard_build.partitions = default_16MB.csv\nboard_build.mcu = esp32s3\nupload_protocol = esptool\n;upload_port = /dev/ttyACM0\nupload_speed = 921600\nbuild_unflags =\n  ${esp32s3_base.build_unflags}\n  -DARDUINO_USB_MODE=0\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D STATION_G2\n  -I variants/esp32s3/station-g2\n  -DBOARD_HAS_PSRAM\n  -DSTATION_G2\n  -DARDUINO_USB_MODE=1\n"
  },
  {
    "path": "variants/esp32s3/station-g2/variant.h",
    "content": "/*\nBoard Information: https://wiki.uniteng.com/en/meshtastic/station-g2\n*/\n\n// Station G2 may not have GPS installed, but it has a GROVE GPS Socket for Optional GPS Module\n#define GPS_RX_PIN 7\n#define GPS_TX_PIN 15\n\n// Station G2 has 1.3 inch OLED Screen\n#define USE_SH1107_128_64\n\n#define I2C_SDA 5 // I2C pins for this board\n#define I2C_SCL 6\n\n#define BUTTON_PIN 38 // This is the Program Button\n#define BUTTON_NEED_PULLUP\n\n#define USE_SX1262\n\n#define LORA_MISO 14\n#define LORA_SCK 12\n#define LORA_MOSI 13\n#define LORA_CS 11\n\n#define LORA_RESET 21\n#define LORA_DIO1 48\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY 47\n#define SX126X_RESET LORA_RESET\n\n//  DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Ensure the PA does not exceed the saturation output power. More\n// Info:https://wiki.uniteng.com/en/meshtastic/station-g2#summary-for-lora-power-amplifier-conduction-test\n#define SX126X_MAX_POWER 19\n#endif\n\n// Enable Traffic Management Module for Station G2\n#ifndef HAS_TRAFFIC_MANAGEMENT\n#define HAS_TRAFFIC_MANAGEMENT 1\n#endif\n#ifndef TRAFFIC_MANAGEMENT_CACHE_SIZE\n#define TRAFFIC_MANAGEMENT_CACHE_SIZE 2048\n#endif\n\n/*\n#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO4_CHANNEL\n#define ADC_MULTIPLIER 4\n#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.\n#define BAT_FULLVOLT 8400\n#define BAT_EMPTYVOLT 5000\n#define BAT_CHARGINGVOLT 8400\n#define BAT_NOBATVOLT 4460\n#define CELL_TYPE_LION // same curve for liion/lipo\n#define NUM_CELLS 2\n*/\n"
  },
  {
    "path": "variants/esp32s3/t-beam-1w/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\n// I2C for OLED and sensors\nstatic const uint8_t SDA = 8;\nstatic const uint8_t SCL = 9;\n\n// Default SPI mapped to Radio/SD\nstatic const uint8_t SS = 15; // LoRa CS\nstatic const uint8_t MOSI = 11;\nstatic const uint8_t MISO = 12;\nstatic const uint8_t SCK = 13;\n\n// SD Card CS\n#define SDCARD_CS 10\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/t-beam-1w/platformio.ini",
    "content": "; LilyGo T-Beam-1W (1 Watt LoRa with external PA)\n[env:t-beam-1w]\ncustom_meshtastic_hw_model = 122\ncustom_meshtastic_hw_model_slug = TBEAM_1_WATT\ncustom_meshtastic_architecture = esp32s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-Beam 1W\ncustom_meshtastic_images = tbeam-1w.svg\ncustom_meshtastic_tags = LilyGo\n\nextends = esp32s3_base\nboard = t-beam-1w\nboard_build.partitions = default_8MB.csv\nboard_check = true\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n\nbuild_flags = \n  ${esp32s3_base.build_flags} \n  -I variants/esp32s3/t-beam-1w\n  -D T_BEAM_1W\n"
  },
  {
    "path": "variants/esp32s3/t-beam-1w/variant.h",
    "content": "// LilyGo T-Beam-1W variant.h\n// Configuration based on LilyGO utilities.h and RF documentation\n\n// I2C for OLED display (SH1106 at 0x3C)\n#define I2C_SDA 8\n#define I2C_SCL 9\n\n// GPS - Quectel L76K\n#define GPS_RX_PIN 5\n#define GPS_TX_PIN 6\n#define GPS_1PPS_PIN 7\n#define GPS_WAKEUP_PIN 16 // GPS_EN_PIN in LilyGO code\n#define HAS_GPS 1\n#define GPS_BAUDRATE 9600\n\n// Buttons\n#define BUTTON_PIN 0      // BUTTON 1\n#define ALT_BUTTON_PIN 17 // BUTTON 2\n\n// SPI (shared by LoRa and SD)\n#define SPI_MOSI 11\n#define SPI_SCK 13\n#define SPI_MISO 12\n#define SPI_CS 10\n\n// SD Card\n#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n#define SDCARD_CS SPI_CS\n\n// LoRa Radio - SX1262 with 1W PA\n#define USE_SX1262\n\n#define LORA_SCK SPI_SCK\n#define LORA_MISO SPI_MISO\n#define LORA_MOSI SPI_MOSI\n#define LORA_CS 15\n#define LORA_RESET 3\n#define LORA_DIO1 1\n#define LORA_BUSY 38\n\n// CRITICAL: Radio power enable - MUST be HIGH before lora.begin()!\n// GPIO 40 powers the SX1262 + PA module via LDO\n#define SX126X_POWER_EN 40\n\n// TX power offset for external PA (0 = no offset, full SX1262 power)\n#define TX_GAIN_LORA 10\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n\n// RF switching configuration for 1W PA module\n// DIO2 controls PA (via SX126X_DIO2_AS_RF_SWITCH)\n// CTRL PIN (GPIO 21) controls LNA - must be HIGH during RX\n// Truth table: DIO2=1,CTRL=0 → TX (PA on, LNA off)\n//              DIO2=0,CTRL=1 → RX (PA off, LNA on)\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_RXEN 21 // LNA enable - HIGH during RX\n\n// TCXO voltage - required for radio init\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define SX126X_MAX_POWER 22\n#endif\n\n// LED\n#define LED_POWER 18\n#define LED_STATE_ON 1 // HIGH = ON\n\n// Battery ADC\n#define BATTERY_PIN 4\n#define ADC_CHANNEL ADC1_GPIO4_CHANNEL\n#define BATTERY_SENSE_SAMPLES 30\n#define ADC_MULTIPLIER 2.9333\n\n#define OCV_ARRAY 7950, 7850, 7750, 7580, 7440, 7310, 7150, 7005, 6860, 6685, 6000\n\n// NTC temperature sensor\n#define NTC_PIN 14\n\n// Fan control\n#define FAN_CTRL_PIN 41\n// Meshtastic standard fan control pin macro\n#define RF95_FAN_EN FAN_CTRL_PIN\n\n// PA Ramp Time - T-Beam 1W requires >800us stabilization (default is 200us)\n// Value 0x05 = RADIOLIB_SX126X_PA_RAMP_800U\n#define SX126X_PA_RAMP_US 0x05\n\n// Display - SH1106 OLED (128x64)\n#define USE_SH1106\n#define OLED_WIDTH 128\n#define OLED_HEIGHT 64\n\n// 32768 Hz crystal present\n#define HAS_32768HZ 1\n"
  },
  {
    "path": "variants/esp32s3/t-deck/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 18;\nstatic const uint8_t SCL = 8;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 9;\nstatic const uint8_t MOSI = 41;\nstatic const uint8_t MISO = 38;\nstatic const uint8_t SCK = 40;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t BAT_ADC_PIN = 4;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/t-deck/platformio.ini",
    "content": "; LilyGo T-Deck\n[env:t-deck]\ncustom_meshtastic_hw_model = 50\ncustom_meshtastic_hw_model_slug = T_DECK\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-Deck\ncustom_meshtastic_images = t-deck.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = esp32s3_base\nboard = t-deck\nboard_check = true\nboard_build.partitions = default_16MB.csv\nupload_protocol = esptool\n\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  +<../variants/esp32s3/t-deck>\n\nbuild_flags = ${esp32s3_base.build_flags} \n  -D T_DECK \n  -D BOARD_HAS_PSRAM\n  -I variants/esp32s3/t-deck\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n  # renovate: datasource=git-refs depName=ESP8266Audio packageName=https://github.com/meshtastic/ESP8266Audio gitBranch=meshtastic-2.0.0-dacfix\n  https://github.com/meshtastic/ESP8266Audio/archive/343024632ee78d6216907b2353fc943a62422d80.zip\n  # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM\n  earlephilhower/ESP8266SAM@1.1.0\n\n[env:t-deck-tft]\nextends = env:t-deck\nboard_level = pr\n\nbuild_flags =\n  ${env:t-deck.build_flags}\n  -D CONFIG_DISABLE_HAL_LOCKS=1 ; \"feels\" to be a bit more stable without locks\n  -D INPUTDRIVER_I2C_KBD_TYPE=0x55\n  -D INPUTDRIVER_ENCODER_TYPE=3\n  -D INPUTDRIVER_ENCODER_LEFT=1\n  -D INPUTDRIVER_ENCODER_RIGHT=2\n  -D INPUTDRIVER_ENCODER_UP=3\n  -D INPUTDRIVER_ENCODER_DOWN=15\n  -D INPUTDRIVER_ENCODER_BTN=0\n  -D INPUTDRIVER_BUTTON_TYPE=0\n  -D HAS_SDCARD\n  -D HAS_SCREEN=1\n  -D HAS_TFT=1\n  -D USE_I2S_BUZZER\n  -D RAM_SIZE=5120\n\t-D LV_LVGL_H_INCLUDE_SIMPLE\n\t-D LV_CONF_INCLUDE_SIMPLE\n\t-D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D RADIOLIB_DEBUG_BASIC=0\n  -D RADIOLIB_DEBUG_SPI=0\n  -D RADIOLIB_DEBUG_PROTOCOL=0\n  -D RADIOLIB_SPI_PARANOID=0\n;  -D CALIBRATE_TOUCH=0\n  -D LGFX_SCREEN_WIDTH=240\n  -D LGFX_SCREEN_HEIGHT=320\n  -D DISPLAY_SIZE=320x240 ; landscape mode\n  -D LGFX_DRIVER=LGFX_TDECK\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_T_DECK.h\\\"\n;  -D LVGL_DRIVER=LVGL_TDECK\n;  -D GFX_DRIVER_INC=\\\"graphics/LVGL/LVGL_T_DECK.h\\\"\n;  -D LV_USE_ST7789=1\n  -D VIEW_320x240\n;\t-D USE_DOUBLE_BUFFER\n  -D USE_PACKET_API\n  -D MAP_FULL_REDRAW\n  -D CUSTOM_TOUCH_DRIVER\n\nlib_deps =\n  ${env:t-deck.lib_deps}\n  ${device-ui_base.lib_deps}\n  # renovate: datasource=github-tags depName=bb_captouch packageName=bitbank2/bb_captouch\n  https://github.com/bitbank2/bb_captouch/archive/refs/tags/1.3.1.zip\n"
  },
  {
    "path": "variants/esp32s3/t-deck/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"Arduino.h\"\n\nvoid earlyInitVariant()\n{\n    // GPIO10 manages all peripheral power supplies\n    // Turn on peripheral power immediately after MUC starts.\n    // If some boards are turned on late, ESP32 will reset due to low voltage.\n    // ESP32-C3(Keyboard) , MAX98357A(Audio Power Amplifier) ,\n    // TF Card , Display backlight(AW9364DNR) , AN48841B(Trackball) , ES7210(Decoder)\n    pinMode(KB_POWERON, OUTPUT);\n    digitalWrite(KB_POWERON, HIGH);\n    // T-Deck has all three SPI peripherals (TFT, SD, LoRa) attached to the same SPI bus\n    // We need to initialize all CS pins in advance otherwise there will be SPI communication issues\n    // e.g. when detecting the SD card\n    pinMode(LORA_CS, OUTPUT);\n    digitalWrite(LORA_CS, HIGH);\n    pinMode(SDCARD_CS, OUTPUT);\n    digitalWrite(SDCARD_CS, HIGH);\n    pinMode(TFT_CS, OUTPUT);\n    digitalWrite(TFT_CS, HIGH);\n    delay(100);\n}"
  },
  {
    "path": "variants/esp32s3/t-deck/variant.h",
    "content": "\n#define TFT_CS 12\n\n// ST7789 TFT LCD\n#define ST7789_CS TFT_CS\n#define ST7789_RS 11  // DC\n#define ST7789_SDA 41 // MOSI\n#define ST7789_SCK 40\n#define ST7789_RESET -1\n#define ST7789_MISO 38\n#define ST7789_BUSY -1\n#define ST7789_BL 42\n#define ST7789_SPI_HOST SPI2_HOST\n#define TFT_BL 42\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 320\n#define TFT_WIDTH 240\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 0\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5\n#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness\n#define USE_TFTDISPLAY 1\n#define HAS_PHYSICAL_KEYBOARD 1\n\n#define HAS_TOUCHSCREEN 1\n#define SCREEN_TOUCH_INT 16\n#define TOUCH_I2C_PORT 0\n#define TOUCH_SLAVE_ADDRESS 0x5D // GT911\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 120\n\n#define TB_PRESS 0\n#define BUTTON_ACTIVE_LOW true\n#define BUTTON_ACTIVE_PULLUP true\n\n#define GPS_DEFAULT_NOT_PRESENT 1\n#define GPS_RX_PIN 44\n#define GPS_TX_PIN 43\n\n// Have SPI interface SD card slot\n// #define HAS_SDCARD // --> needs to be in platform.ini for device-ui\n#define SPI_MOSI (41)\n#define SPI_SCK (40)\n#define SPI_MISO (38)\n#define SPI_CS (39)\n#define SDCARD_CS SPI_CS\n#define SD_SPI_FREQUENCY 75000000U\n\n#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n// ratio of voltage divider = 2.0 (RD2=100k, RD3=100k)\n#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.\n#define ADC_CHANNEL ADC1_GPIO4_CHANNEL\n\n// keyboard\n#define I2C_SDA 18 // I2C pins for this board\n#define I2C_SCL 8\n#define KB_POWERON 10                  // must be set to HIGH\n#define KB_SLAVE_ADDRESS TDECK_KB_ADDR // 0x55\n#define KB_BL_PIN 46                   // not used for now\n\n// trackball\n#define HAS_TRACKBALL 1\n#define TB_UP 3\n#define TB_DOWN 15\n#define TB_LEFT 1\n#define TB_RIGHT 2\n#define TB_PRESS 0 // BUTTON_PIN\n#define TB_DIRECTION FALLING\n#define TB_THRESHOLD 3\n\n// microphone\n#define ES7210_SCK 47\n#define ES7210_DIN 14\n#define ES7210_LRCK 21\n#define ES7210_MCLK 48\n\n// dac / amp\n#define HAS_I2S\n#define DAC_I2S_BCK 7\n#define DAC_I2S_WS 5\n#define DAC_I2S_DOUT 6\n#define DAC_I2S_MCLK 21 // GPIO lrck mic\n\n// LoRa\n#define USE_SX1262\n#define USE_SX1268\n\n#define LORA_SCK 40\n#define LORA_MISO 38\n#define LORA_MOSI 41\n#define LORA_CS 9\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 17\n#define LORA_DIO1 45 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface\n// code)\n"
  },
  {
    "path": "variants/esp32s3/t-deck-pro/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// used for keyboard, touch controller, beam sensor, and gyroscope\nstatic const uint8_t SDA = 13;\nstatic const uint8_t SCL = 14;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 3;\nstatic const uint8_t MOSI = 33;\nstatic const uint8_t MISO = 47;\nstatic const uint8_t SCK = 36;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/t-deck-pro/platformio.ini",
    "content": "[env:t-deck-pro]\ncustom_meshtastic_hw_model = 102\ncustom_meshtastic_hw_model_slug = T_DECK_PRO\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-Deck Pro\ncustom_meshtastic_images = tdeck_pro.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = esp32s3_base\nboard = t-deck-pro\nboard_check = true\nupload_protocol = esptool\n\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  +<../variants/esp32s3/t-deck-pro>\n\nbuild_flags = \n  ${esp32s3_base.build_flags} -I variants/esp32s3/t-deck-pro\n  -D T_DECK_PRO\n  -D USE_EINK\n  -D EINK_DISPLAY_MODEL=GxEPD2_310_GDEQ031T10\n  -D EINK_WIDTH=240\n  -D EINK_HEIGHT=320\n  ;-D USE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -D EINK_LIMIT_FASTREFRESH=10           ; How many consecutive fast-refreshes are permitted\n  -D EINK_LIMIT_GHOSTING_PX=2000        ; (Optional) How much image ghosting is tolerated\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\n  # renovate: datasource=git-refs depName=CSE_Touch packageName=https://github.com/CIRCUITSTATE/CSE_Touch gitBranch=main\n  https://github.com/CIRCUITSTATE/CSE_Touch/archive/b44f23b6f870b848f1fbe453c190879bc6cfaafa.zip\n  # renovate: datasource=github-tags depName=CSE_CST328 packageName=CIRCUITSTATE/CSE_CST328\n  https://github.com/CIRCUITSTATE/CSE_CST328/archive/refs/tags/v0.0.4.zip\n  # renovate: datasource=git-refs depName=BQ27220 packageName=https://github.com/mverch67/BQ27220 gitBranch=main\n  https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip\n"
  },
  {
    "path": "variants/esp32s3/t-deck-pro/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"Arduino.h\"\n\nvoid earlyInitVariant()\n{\n    pinMode(LORA_EN, OUTPUT);\n    digitalWrite(LORA_EN, HIGH);\n    pinMode(LORA_CS, OUTPUT);\n    digitalWrite(LORA_CS, HIGH);\n    pinMode(SDCARD_CS, OUTPUT);\n    digitalWrite(SDCARD_CS, HIGH);\n    pinMode(PIN_EINK_CS, OUTPUT);\n    digitalWrite(PIN_EINK_CS, HIGH);\n}"
  },
  {
    "path": "variants/esp32s3/t-deck-pro/variant.h",
    "content": "// Display (E-Ink)\n#define PIN_EINK_CS 34\n#define PIN_EINK_BUSY 37\n#define PIN_EINK_DC 35\n#define PIN_EINK_RES -1\n#define PIN_EINK_SCLK 36\n#define PIN_EINK_MOSI 47\n\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// CST328 touch screen (implementation in src/platform/extra_variants/t_deck_pro/variant.cpp)\n#define HAS_TOUCHSCREEN 1\n#define CST328_PIN_INT 12\n#define CST328_PIN_RST 45\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 120\n\n// GNNS\n#define HAS_GPS 1\n#define GPS_BAUDRATE 38400\n#define PIN_GPS_EN 15\n#define GPS_EN_ACTIVE 1\n#define GPS_RX_PIN 44\n#define GPS_TX_PIN 43\n#define PIN_GPS_PPS 1\n\n#define BUTTON_PIN 0\n\n// vibration motor\n#define PIN_VIBRATION 2\n\n// Have SPI interface SD card slot\n#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n#define SPI_MOSI (33)\n#define SPI_SCK (36)\n#define SPI_MISO (47)\n#define SPI_CS (48)\n#define SDCARD_CS SPI_CS\n#define SD_SPI_FREQUENCY 75000000U\n\n// TCA8418 keyboard\n#define KB_BL_PIN 42\n\n// microphone PCM5102A\n#define PCM5102A_SCK 47\n#define PCM5102A_DIN 17\n#define PCM5102A_LRCK 18\n\n// LTR_553ALS light sensor\n#define HAS_LTR553ALS\n\n// gyroscope BHI260AP\n#define BOARD_1V8_EN 38\n#define HAS_BHI260AP\n\n// battery charger BQ25896\n#define HAS_PPM 1\n#define XPOWERS_CHIP_BQ25896\n\n// battery quality management BQ27220\n#define HAS_BQ27220 1\n#define BQ27220_I2C_SDA SDA\n#define BQ27220_I2C_SCL SCL\n#define BQ27220_DESIGN_CAPACITY 1400\n\n// LoRa\n#define USE_SX1262\n#define USE_SX1268\n\n#define LORA_EN 46 // LoRa enable pin\n#define LORA_SCK 36\n#define LORA_MISO 47\n#define LORA_MOSI 33\n#define LORA_CS 3\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 4\n#define LORA_DIO1 5 // SX1262 IRQ\n#define LORA_DIO2 6 // SX1262 BUSY\n#define LORA_DIO3   // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 2.4\n// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface\n// code)\n\n#define MODEM_POWER_EN 41\n#define MODEM_PWRKEY 40\n#define MODEM_RST 9\n#define MODEM_RI 7\n#define MODEM_DTR 8\n#define MODEM_RX 10\n#define MODEM_TX 11\n\n#define HAS_PHYSICAL_KEYBOARD 1"
  },
  {
    "path": "variants/esp32s3/t-eth-elite/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 17;\nstatic const uint8_t SCL = 18;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 40;\nstatic const uint8_t MOSI = 11;\nstatic const uint8_t MISO = 9;\nstatic const uint8_t SCK = 10;\n\n#define SPI_MOSI (11)\n#define SPI_SCK (10)\n#define SPI_MISO (9)\n#define SPI_CS (12)\n\n#define SDCARD_CS SPI_CS\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/t-eth-elite/platformio.ini",
    "content": "[env:t-eth-elite]\nextends = esp32s3_base\nboard = esp32s3box\nboard_level = pr\nboard_check = true\nboard_build.partitions = default_16MB.csv\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D T_ETH_ELITE\n  -D HAS_UDP_MULTICAST=1\n  -I variants/esp32s3/t-eth-elite\n\nlib_ignore = \n    Ethernet\n\nlib_deps = \n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=github-tags depName=ETHClass2 packageName=meshtastic/ETHClass2\n  https://github.com/meshtastic/ETHClass2/archive/v1.0.0.zip\n"
  },
  {
    "path": "variants/esp32s3/t-eth-elite/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {LOW, HIGH}},   {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/esp32s3/t-eth-elite/variant.h",
    "content": "#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n\n#define HAS_GPS 1\n#define GPS_RX_PIN 39\n#define GPS_TX_PIN 42\n#define GPS_BAUDRATE_FIXED 1\n#define GPS_BAUDRATE 9600\n\n#define I2C_SDA 17 // I2C pins for this board\n#define I2C_SCL 18\n\n#define HAS_SCREEN 1 // Allow for OLED Screens on I2C Header of shield\n\n#define LED_POWER 38 // If defined we will blink this LED\n#define BUTTON_PIN 0 // If defined, this will be used for user button presses,\n\n#define BUTTON_NEED_PULLUP\n\n// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if\n// not found then probe for SX1262\n#define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n#define USE_SX1280\n#define USE_LR1121\n\n#define LORA_SCK 10\n#define LORA_MISO 9\n#define LORA_MOSI 11\n#define LORA_CS 40\n#define LORA_RESET 46\n\n// per SX1276_Receive_Interrupt/utilities.h\n#define LORA_DIO0 8\n#define LORA_DIO1 16\n#define LORA_DIO2 RADIOLIB_NC\n\n// per SX1262_Receive_Interrupt/utilities.h\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 8\n#define SX126X_BUSY 16\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n// per SX128x_Receive_Interrupt/utilities.h\n#ifdef USE_SX1280\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 8\n#define SX128X_DIO2 33\n#define SX128X_DIO3 34\n#define SX128X_BUSY 16\n#define SX128X_RESET LORA_RESET\n#define SX128X_RXEN 13\n#define SX128X_TXEN 38\n#define SX128X_MAX_POWER 3\n#endif\n\n// LR1121\n#ifdef USE_LR1121\n#define LR1121_IRQ_PIN 8\n#define LR1121_NRESET_PIN LORA_RESET\n#define LR1121_BUSY_PIN 16\n#define LR1121_SPI_NSS_PIN LORA_CS\n#define LR1121_SPI_SCK_PIN LORA_SCK\n#define LR1121_SPI_MOSI_PIN LORA_MOSI\n#define LR1121_SPI_MISO_PIN LORA_MISO\n#define LR11X0_DIO3_TCXO_VOLTAGE 3.0\n#define LR11X0_DIO_AS_RF_SWITCH\n#endif\n\n#define HAS_ETHERNET 1\n#define USE_WS5500 1 // this driver uses the same stack as the ESP32 Wifi driver\n\n#define ETH_MISO_PIN 47\n#define ETH_MOSI_PIN 21\n#define ETH_SCLK_PIN 48\n#define ETH_CS_PIN 45\n#define ETH_INT_PIN 14\n#define ETH_RST_PIN -1\n#define ETH_ADDR 1"
  },
  {
    "path": "variants/esp32s3/t-watch-s3/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n// static const uint8_t TX = 43;\n// static const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 10;\nstatic const uint8_t SCL = 11;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 5;\nstatic const uint8_t MOSI = 1;\nstatic const uint8_t MISO = 4;\nstatic const uint8_t SCK = 3;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/t-watch-s3/platformio.ini",
    "content": "; LilyGo T-Watch S3\n[env:t-watch-s3]\ncustom_meshtastic_hw_model = 51\ncustom_meshtastic_hw_model_slug = T_WATCH_S3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = LILYGO T-Watch S3\ncustom_meshtastic_images = t-watch-s3.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = t-watch-s3\nboard_check = true\nboard_build.partitions = default_16MB.csv\nupload_protocol = esptool\n\nbuild_flags = ${esp32s3_base.build_flags}\n  -DT_WATCH_S3\n  -Ivariants/esp32s3/t-watch-s3\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n  # renovate: datasource=custom.pio depName=Adafruit DRV2605 packageName=adafruit/library/Adafruit DRV2605 Library\n  adafruit/Adafruit DRV2605 Library@1.2.4\n  # renovate: datasource=git-refs depName=ESP8266Audio packageName=https://github.com/meshtastic/ESP8266Audio gitBranch=meshtastic-2.0.0-dacfix\n  https://github.com/meshtastic/ESP8266Audio/archive/343024632ee78d6216907b2353fc943a62422d80.zip\n  # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM\n  earlephilhower/ESP8266SAM@1.1.0\n"
  },
  {
    "path": "variants/esp32s3/t-watch-s3/variant.h",
    "content": "// ST7789 TFT LCD\n#define ST7789_CS 12\n#define ST7789_RS 38  // DC\n#define ST7789_SDA 13 // MOSI\n#define ST7789_SCK 18\n#define ST7789_RESET -1\n#define ST7789_MISO -1\n#define ST7789_BUSY -1\n#define ST7789_BL 45\n#define ST7789_SPI_HOST SPI3_HOST\n#define TFT_BL 45\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 240\n#define TFT_WIDTH 240\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 2\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5 // fps\n#define USE_TFTDISPLAY 1\n\n#define HAS_DRV2605 1\n\n#define HAS_TOUCHSCREEN 1\n#define SCREEN_TOUCH_INT 16\n#define SCREEN_TOUCH_USE_I2C1\n#define TOUCH_I2C_PORT 1\n#define TOUCH_SLAVE_ADDRESS 0x38\n#define WAKE_ON_TOUCH\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 180\n\n#define I2C_SDA1 39 // Used for capacitive touch\n#define I2C_SCL1 40 // Used for capacitive touch\n\n#define HAS_I2S\n#define DAC_I2S_BCK 48\n#define DAC_I2S_WS 15\n#define DAC_I2S_DOUT 46\n#define DAC_I2S_MCLK 0\n\n#define HAS_AXP2101\n\n// PCF8563 RTC Module\n#define PCF8563_RTC 0x51\n\n#define I2C_SDA 10 // For QMC6310 sensors and screens\n#define I2C_SCL 11 // For QMC6310 sensors and screens\n\n#define HAS_BMA423 1\n#define BMA4XX_INT 14 // Interrupt for BMA_423 axis sensor\n\n#define HAS_GPS 1\n#define GPS_DEFAULT_NOT_PRESENT 1\n#define GPS_BAUDRATE 38400\n#define GPS_RX_PIN 41\n#define GPS_TX_PIN 42\n\n#define BUTTON_PIN 0 // only for Plus version\n\n#define USE_SX1262\n#define USE_SX1268\n\n#define LORA_SCK 3\n#define LORA_MISO 4\n#define LORA_MOSI 1\n#define LORA_CS 5\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 8\n#define LORA_DIO1 9 // SX1262 IRQ\n#define LORA_DIO2 7 // SX1262 BUSY\n#define LORA_DIO3   // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define SX126X_CS LORA_CS // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for\n// the sx1262interface code)\n\n#define USE_VIRTUAL_KEYBOARD 1\n#define DISPLAY_CLOCK_FRAME 1\n"
  },
  {
    "path": "variants/esp32s3/tbeam-s3-core/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// Now declared in .platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h\n// #define NUM_ANALOG_INPUTS 20\n// #define EXTERNAL_NUM_INTERRUPTS 46\n// #define NUM_DIGITAL_PINS 48\n// #define analogInputToDigitalPin(p) (((p) < 20) ? (analogChannelToDigitalPin(p)) : -1)\n// #define digitalPinToInterrupt(p) (((p) < 48) ? (p) : -1)\n// #define digitalPinHasPWM(p) (p < 46)\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 42;\nstatic const uint8_t SCL = 41;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 10;\nstatic const uint8_t MOSI = 11;\nstatic const uint8_t MISO = 13;\nstatic const uint8_t SCK = 12;\n\n// Another SPI bus shares SD card and QMI8653 inertial measurement sensor\n#define SPI_MOSI (35)\n#define SPI_SCK (36)\n#define SPI_MISO (37)\n#define SPI_CS (47)\n#define IMU_CS (34)\n\n#define SDCARD_CS SPI_CS\n#define IMU_INT (33)\n// #define PMU_IRQ                  (40)\n#define RTC_INT (14)\n\n#endif /* Pins_Arduino_h */"
  },
  {
    "path": "variants/esp32s3/tbeam-s3-core/platformio.ini",
    "content": "; The 1.0 release of the LilyGo TBEAM-S3-Core board \n[env:tbeam-s3-core]\ncustom_meshtastic_hw_model = 12\ncustom_meshtastic_hw_model_slug = LILYGO_TBEAM_S3_CORE\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-Beam Supreme\ncustom_meshtastic_images = tbeam-s3-core.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = tbeam-s3-core\nboard_build.partitions = default_8MB.csv\nboard_check = true\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n\nbuild_flags = \n  ${esp32s3_base.build_flags} \n  -I variants/esp32s3/tbeam-s3-core\n"
  },
  {
    "path": "variants/esp32s3/tbeam-s3-core/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {LOW, HIGH}},   {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};"
  },
  {
    "path": "variants/esp32s3/tbeam-s3-core/variant.h",
    "content": "// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep\n\n#define I2C_SDA1 42 // Used for PMU management and PCF8563\n#define I2C_SCL1 41 // Used for PMU management and PCF8563\n\n#define I2C_SDA 17 // For QMC6310 sensors and screens\n#define I2C_SCL 18 // For QMC6310 sensors and screens\n\n#define BUTTON_PIN 0 // The middle button GPIO on the T-Beam S3\n//  #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.\n\n#define LED_STATE_ON 0 // State when LED is lit\n\n// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if\n// not found then probe for SX1262\n#define USE_SX1262\n#define USE_SX1268\n#define USE_LR1121\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 5\n#define LORA_DIO1 1 // SX1262 IRQ\n#define LORA_DIO2 4 // SX1262 BUSY\n#define LORA_DIO3   // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#ifdef USE_SX1262\n#define SX126X_CS 10 // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface\n// code)\n#endif\n\n// LR1121\n#ifdef USE_LR1121\n#define LR1121_IRQ_PIN 1\n#define LR1121_NRESET_PIN LORA_RESET\n#define LR1121_BUSY_PIN 4\n#define LR1121_SPI_NSS_PIN 10\n#define LR1121_SPI_SCK_PIN 12\n#define LR1121_SPI_MOSI_PIN 11\n#define LR1121_SPI_MISO_PIN 13\n#define LR11X0_DIO3_TCXO_VOLTAGE 3.0\n#define LR11X0_DIO_AS_RF_SWITCH\n#endif\n\n// Leave undefined to disable our PMU IRQ handler.  DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts\n// and waking from light sleep\n// #define PMU_IRQ 40\n#define HAS_AXP2101\n\n// PCF8563 RTC Module\n#define PCF8563_RTC 0x51\n\n// Specify the PMU as Wire1. In the t-beam-s3 core, PCF8563 and PMU share the bus\n#define PMU_USE_WIRE1\n#define RTC_USE_WIRE1\n\n#define LORA_SCK 12\n#define LORA_MISO 13\n#define LORA_MOSI 11\n#define LORA_CS 10\n\n#define GPS_RX_PIN 9\n#define GPS_TX_PIN 8\n#define GPS_WAKEUP_PIN 7\n#define GPS_1PPS_PIN 6\n\n#define HAS_SDCARD // Have SPI interface SD card slot\n#define SDCARD_USE_SPI1\n\n// has 32768 Hz crystal\n#define HAS_32768HZ 1\n\n#define USE_SH1106"
  },
  {
    "path": "variants/esp32s3/tlora-pager/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// used for keyboard, battery gauge, charger and haptic driver\nstatic const uint8_t SDA = 3;\nstatic const uint8_t SCL = 2;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 36;\nstatic const uint8_t MOSI = 34;\nstatic const uint8_t MISO = 33;\nstatic const uint8_t SCK = 35;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/tlora-pager/platformio.ini",
    "content": "; LilyGo T-Lora-Pager\n[env:tlora-pager]\ncustom_meshtastic_hw_model = 103\ncustom_meshtastic_hw_model_slug = T_LORA_PAGER\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-LoRa Pager\ncustom_meshtastic_images = lilygo-tlora-pager.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 16MB\n\nextends = esp32s3_base\nboard = t-deck-pro ; same as T-Deck Pro\nboard_check = true\nboard_build.partitions = default_16MB.csv\nupload_protocol = esptool\n\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  +<../variants/esp32s3/tlora-pager>\n\nbuild_flags = ${esp32s3_base.build_flags} \n  -I variants/esp32s3/tlora-pager\n  -D T_LORA_PAGER \n  -D BOARD_HAS_PSRAM\n  -D HAS_SDCARD\n  -D ENABLE_ROTARY_PULLUP\n  -D ENABLE_BUTTON_PULLUP\n  -D ROTARY_BUXTRONICS\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n  # renovate: datasource=git-refs depName=ESP8266Audio packageName=https://github.com/meshtastic/ESP8266Audio gitBranch=meshtastic-2.0.0-dacfix\n  https://github.com/meshtastic/ESP8266Audio/archive/343024632ee78d6216907b2353fc943a62422d80.zip\n  # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM\n  earlephilhower/ESP8266SAM@1.1.0\n  # renovate: datasource=custom.pio depName=Adafruit DRV2605 packageName=adafruit/library/Adafruit DRV2605 Library\n  adafruit/Adafruit DRV2605 Library@1.2.4\n  # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library\n  lewisxhe/PCF8563_Library@1.0.1\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n  # renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver\n  https://github.com/pschatzmann/arduino-audio-driver/archive/v0.2.1.zip\n  # TODO renovate\n  https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip\n  # TODO renovate\n  https://github.com/mverch67/RotaryEncoder/archive/da958a21389cbcd485989705df602a33e092dd88.zip\n\n[env:tlora-pager-tft]\nboard_level = extra\nextends = env:tlora-pager\nbuild_flags =\n  ${env:tlora-pager.build_flags}\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -D INPUTDRIVER_ROTARY_TYPE=1\n  -D INPUTDRIVER_ROTARY_UP=40\n  -D INPUTDRIVER_ROTARY_DOWN=41\n  -D INPUTDRIVER_ROTARY_BTN=7\n  -D INPUTDRIVER_BUTTON_TYPE=0\n  -D HAS_SCREEN=1\n  -D HAS_TFT=1\n  -D USE_I2S_BUZZER\n  -D RAM_SIZE=5120\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D RADIOLIB_SPI_PARANOID=0\n  -D LGFX_SCREEN_WIDTH=222\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=480x222 ; landscape mode\n  -D DISPLAY_SET_RESOLUTION\n  -D LGFX_DRIVER=LGFX_TLORA_PAGER\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_T_LORA_PAGER.h\\\"\n;  -D LVGL_DRIVER=LVGL_T_LORA_PAGER\n;  -D LV_USE_ST7796=1\n  -D VIEW_480x222\n  -D USE_PACKET_API\n  -D MAP_FULL_REDRAW\n\nlib_deps =\n  ${env:tlora-pager.lib_deps}\n  ${device-ui_base.lib_deps}\n"
  },
  {
    "path": "variants/esp32s3/tlora-pager/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {LOW, HIGH}},\n    {LR11x0::MODE_TX, {HIGH, LOW}},   {LR11x0::MODE_TX_HP, {HIGH, LOW}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};"
  },
  {
    "path": "variants/esp32s3/tlora-pager/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"ExtensionIOXL9555.hpp\"\nextern ExtensionIOXL9555 io;\n\nvoid earlyInitVariant()\n{\n    pinMode(LORA_CS, OUTPUT);\n    digitalWrite(LORA_CS, HIGH);\n    pinMode(SDCARD_CS, OUTPUT);\n    digitalWrite(SDCARD_CS, HIGH);\n    pinMode(TFT_CS, OUTPUT);\n    digitalWrite(TFT_CS, HIGH);\n    pinMode(KB_INT, INPUT_PULLUP);\n    // io expander\n    io.begin(Wire, XL9555_SLAVE_ADDRESS0, SDA, SCL);\n    io.pinMode(EXPANDS_DRV_EN, OUTPUT);\n    io.digitalWrite(EXPANDS_DRV_EN, HIGH);\n    io.pinMode(EXPANDS_AMP_EN, OUTPUT);\n    io.digitalWrite(EXPANDS_AMP_EN, LOW);\n    io.pinMode(EXPANDS_LORA_EN, OUTPUT);\n    io.digitalWrite(EXPANDS_LORA_EN, HIGH);\n    io.pinMode(EXPANDS_GPS_EN, OUTPUT);\n    io.digitalWrite(EXPANDS_GPS_EN, HIGH);\n    io.pinMode(EXPANDS_KB_EN, OUTPUT);\n    io.digitalWrite(EXPANDS_KB_EN, HIGH);\n    io.pinMode(EXPANDS_SD_EN, OUTPUT);\n    io.digitalWrite(EXPANDS_SD_EN, HIGH);\n    io.pinMode(EXPANDS_GPIO_EN, OUTPUT);\n    io.digitalWrite(EXPANDS_GPIO_EN, HIGH);\n    io.pinMode(EXPANDS_SD_PULLEN, INPUT);\n}"
  },
  {
    "path": "variants/esp32s3/tlora-pager/variant.h",
    "content": "// ST7796 TFT LCD\n#define TFT_CS 38\n#define ST7796_CS TFT_CS\n#define ST7796_RS 37    // DC\n#define ST7796_SDA MOSI // MOSI\n#define ST7796_SCK SCK\n#define ST7796_RESET -1\n#define ST7796_MISO MISO\n#define ST7796_BUSY -1\n#define ST7796_BL 42\n#define ST7796_SPI_HOST SPI2_HOST\n#define TFT_BL 42\n#define SPI_FREQUENCY 75000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 480\n#define TFT_WIDTH 222\n#define TFT_OFFSET_X 49\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 3\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5\n#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness\n#define USE_TFTDISPLAY 1\n#define HAS_PHYSICAL_KEYBOARD 1\n\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n#define HAS_DRV2605 1\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 120\n\n// GNNS\n#define HAS_GPS 1\n#define GPS_BAUDRATE 38400\n#define GPS_RX_PIN 4\n#define GPS_TX_PIN 12\n#define PIN_GPS_PPS 13\n\n// PCF85063 RTC Module\n#define PCF85063_RTC 0x51\n\n// Rotary\n#define ROTARY_A (40)\n#define ROTARY_B (41)\n#define ROTARY_PRESS (7)\n\n#define BUTTON_PIN 0\n\n// SPI interface SD card slot\n#define SPI_MOSI MOSI\n#define SPI_SCK SCK\n#define SPI_MISO MISO\n#define SPI_CS 21\n#define SDCARD_CS SPI_CS\n#define SD_SPI_FREQUENCY 75000000U\n\n// TCA8418 keyboard\n#define I2C_NO_RESCAN\n#define KB_BL_PIN 46\n#define KB_INT 6\n\n// audio codec ES8311\n#define HAS_I2S\n#define DAC_I2S_BCK 11\n#define DAC_I2S_WS 18\n#define DAC_I2S_DOUT 45\n#define DAC_I2S_DIN 17\n#define DAC_I2S_MCLK 10\n\n// gyroscope BHI260AP\n#define HAS_BHI260AP\n\n// battery charger BQ25896\n#define HAS_PPM 1\n#define XPOWERS_CHIP_BQ25896\n\n// battery quality management BQ27220\n#define HAS_BQ27220 1\n#define BQ27220_I2C_SDA SDA\n#define BQ27220_I2C_SCL SCL\n#define BQ27220_DESIGN_CAPACITY 1500\n\n// NFC ST25R3916\n#define NFC_INT 5\n#define NFC_CS 39\n\n// External expansion chip XL9555\n#define USE_XL9555\n#define EXPANDS_DRV_EN (0)\n#define EXPANDS_AMP_EN (1)\n#define EXPANDS_KB_RST (2)\n#define EXPANDS_LORA_EN (3)\n#define EXPANDS_GPS_EN (4)\n#define EXPANDS_NFC_EN (5)\n#define EXPANDS_GPS_RST (7)\n#define EXPANDS_KB_EN (8)\n#define EXPANDS_GPIO_EN (9)\n#define EXPANDS_SD_DET (10)\n#define EXPANDS_SD_PULLEN (11)\n#define EXPANDS_SD_EN (12)\n\n// LoRa\n#define USE_SX1262\n#define USE_SX1268\n#define USE_SX1280\n#define USE_LR1121\n\n#define LORA_SCK 35\n#define LORA_MISO 33\n#define LORA_MOSI 34\n#define LORA_CS 36\n#define LORA_RESET 47\n\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 48 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 3.0\n\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 LORA_DIO1\n#define SX128X_BUSY LORA_DIO2\n#define SX128X_RESET LORA_RESET\n\n#define LR1121_IRQ_PIN LORA_DIO1\n#define LR1121_NRESET_PIN LORA_RESET\n#define LR1121_BUSY_PIN LORA_DIO2\n#define LR1121_SPI_NSS_PIN LORA_CS\n#define LR1121_SPI_SCK_PIN LORA_SCK\n#define LR1121_SPI_MOSI_PIN LORA_MOSI\n#define LR1121_SPI_MISO_PIN LORA_MISO\n#define LR11X0_DIO3_TCXO_VOLTAGE 3.0\n#define LR11X0_DIO_AS_RF_SWITCH\n"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_epaper/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/DEPG0213BNS800.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n\n    // Display is connected to HSPI\n    SPIClass *hspi = new SPIClass(HSPI);\n    hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS);\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver = new Drivers::DEPG0213BNS800;\n    driver->begin(hspi, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n    inkhud->setDisplayResilience(15, 1.5);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?\n    inkhud->persistence->settings.rotation = 3;           // 270 degrees clockwise\n    inkhud->persistence->settings.userTiles.count = 1;    // One tile only by default, keep things simple for new users\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);          // -\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, not autoshown, default on tile 0\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // Setup the main user button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin(), true);\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_epaper/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 18;\nstatic const uint8_t SCL = 12; // t3s3 e-Paper has no pin 17 as t3s3 v1, so use another free pin next to it\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 7;\nstatic const uint8_t MOSI = 6;\nstatic const uint8_t MISO = 3;\nstatic const uint8_t SCK = 5;\n\n#define SPI_MOSI (11)\n#define SPI_SCK (14)\n#define SPI_MISO (2)\n#define SPI_CS (13)\n\n#define SDCARD_CS SPI_CS\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_epaper/platformio.ini",
    "content": "[env:tlora-t3s3-epaper]\ncustom_meshtastic_hw_model = 16\ncustom_meshtastic_hw_model_slug = TLORA_T3_S3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-LoRa T3-S3 E-Ink\ncustom_meshtastic_images = tlora-t3s3-epaper.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_requires_dfu = true\n\nextends = esp32s3_base\nboard = tlora-t3s3-v1\nboard_check = true\nupload_protocol = esptool\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D TLORA_T3S3_EPAPER\n  -I variants/esp32s3/tlora_t3s3_epaper\n  -DUSE_EINK\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_BN\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=20          ; How many consecutive fast-refreshes are permitted    //20\n  -DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates          //30\n  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n\n[env:tlora-t3s3-epaper-inkhud]\nextends = esp32s3_base, inkhud\nboard = tlora-t3s3-v1\nboard_check = true\nupload_protocol = esptool\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  ${inkhud.build_src_filter}\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/esp32s3/tlora_t3s3_epaper\n  -D TLORA_T3S3_EPAPER\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${esp32s3_base.lib_deps}\n"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_epaper/variant.h",
    "content": "#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n\n// Display (E-Ink)\n#define PIN_EINK_CS 15\n#define PIN_EINK_BUSY 48\n#define PIN_EINK_DC 16\n#define PIN_EINK_RES 47\n#define PIN_EINK_SCLK 14\n#define PIN_EINK_MOSI 11\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to\n// measure battery voltage ratio of voltage divider = 2.0 (assumption)\n#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// external qwiic connector\n#define GPS_DEFAULT_NOT_PRESENT 1\n#define GPS_RX_PIN 44\n#define GPS_TX_PIN 43\n\n#define LED_POWER 37\n#define BUTTON_PIN 0\n#define BUTTON_NEED_PULLUP\n\n// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and\n// we will probe at runtime for RF95 and if not found then probe for SX1262\n#define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n#define USE_SX1280\n\n#define LORA_SCK 5\n#define LORA_MISO 3\n#define LORA_MOSI 6\n#define LORA_CS 7\n#define LORA_RESET 8\n\n// per SX1276_Receive_Interrupt/utilities.h\n#define LORA_DIO0 9\n#define LORA_DIO1 33 // TCXO_EN ?\n#define LORA_DIO2 34\n#define LORA_RXEN 21\n#define LORA_TXEN 10\n\n// per SX1262_Receive_Interrupt/utilities.h\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 33\n#define SX126X_BUSY 34\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n// per SX128x_Receive_Interrupt/utilities.h\n#ifdef USE_SX1280\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 9\n#define SX128X_DIO2 33\n#define SX128X_DIO3 34\n#define SX128X_BUSY 36\n#define SX128X_RESET LORA_RESET\n#define SX128X_RXEN 21\n#define SX128X_TXEN 10\n#define SX128X_MAX_POWER 3\n#endif\n"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_v1/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\n// The default Wire will be mapped to PMU and RTC\nstatic const uint8_t SDA = 18;\nstatic const uint8_t SCL = 17;\n\n// Default SPI will be mapped to Radio\nstatic const uint8_t SS = 7;\nstatic const uint8_t MOSI = 6;\nstatic const uint8_t MISO = 3;\nstatic const uint8_t SCK = 5;\n\n#define SPI_MOSI (11)\n#define SPI_SCK (14)\n#define SPI_MISO (2)\n#define SPI_CS (13)\n\n#define SDCARD_CS SPI_CS\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_v1/platformio.ini",
    "content": "[env:tlora-t3s3-v1]\ncustom_meshtastic_hw_model = 16\ncustom_meshtastic_hw_model_slug = TLORA_T3_S3\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-LoRa T3-S3\ncustom_meshtastic_images = tlora-t3s3-v1.svg\ncustom_meshtastic_tags = LilyGo\ncustom_meshtastic_requires_dfu = true\n\nextends = esp32s3_base\nboard = tlora-t3s3-v1\nboard_check = true\nupload_protocol = esptool\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -D TLORA_T3S3_V1\n  -I variants/esp32s3/tlora_t3s3_v1\n"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_v1/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {LOW, HIGH}},   {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};"
  },
  {
    "path": "variants/esp32s3/tlora_t3s3_v1/variant.h",
    "content": "#define HAS_SDCARD\n#define SDCARD_USE_SPI1\n\n#define USE_SSD1306\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n// ratio of voltage divider = 2.0 (R42=100k, R43=100k)\n#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n\n#define I2C_SDA 18 // I2C pins for this board\n#define I2C_SCL 17\n\n#define I2C_SDA1 43\n#define I2C_SCL1 44\n\n#define LED_POWER 37 // If defined we will blink this LED\n#define BUTTON_PIN 0 // If defined, this will be used for user button presses,\n\n#define BUTTON_NEED_PULLUP\n\n// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if\n// not found then probe for SX1262\n#define USE_RF95 // RFM95/SX127x\n#define USE_SX1262\n#define USE_SX1280\n#define USE_LR1121\n\n#define LORA_SCK 5\n#define LORA_MISO 3\n#define LORA_MOSI 6\n#define LORA_CS 7\n#define LORA_RESET 8\n\n// per SX1276_Receive_Interrupt/utilities.h\n#define LORA_DIO0 9\n#define LORA_DIO1 33 // TCXO_EN ?\n#define LORA_DIO2 34\n#define LORA_RXEN 21\n#define LORA_TXEN 10\n\n// per SX1262_Receive_Interrupt/utilities.h\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 33\n#define SX126X_BUSY 34\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n// per SX128x_Receive_Interrupt/utilities.h\n#ifdef USE_SX1280\n#define SX128X_CS LORA_CS\n#define SX128X_DIO1 9\n#define SX128X_DIO2 33\n#define SX128X_DIO3 34\n#define SX128X_BUSY 36\n#define SX128X_RESET LORA_RESET\n#define SX128X_RXEN 21\n#define SX128X_TXEN 10\n#define SX128X_MAX_POWER 3\n#endif\n\n// LR1121\n#ifdef USE_LR1121\n#define LR1121_IRQ_PIN 36\n#define LR1121_NRESET_PIN LORA_RESET\n#define LR1121_BUSY_PIN LORA_DIO2\n#define LR1121_SPI_NSS_PIN LORA_CS\n#define LR1121_SPI_SCK_PIN LORA_SCK\n#define LR1121_SPI_MOSI_PIN LORA_MOSI\n#define LR1121_SPI_MISO_PIN LORA_MISO\n#define LR11X0_DIO3_TCXO_VOLTAGE 3.0\n#define LR11X0_DIO_AS_RF_SWITCH\n#endif\n\n#define HAS_SDCARD // Have SPI interface SD card slot\n#define SDCARD_USE_SPI1"
  },
  {
    "path": "variants/esp32s3/tracksenger/internal/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define WIFI_LoRa_32_V3 true\n#define DISPLAY_HEIGHT 80\n#define DISPLAY_WIDTH 160\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 45;\nstatic const uint8_t SCL = 46;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 36;\nstatic const uint8_t LED = 18;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/tracksenger/internal/variant.h",
    "content": "#define LED_POWER 18\n\n#define HELTEC_TRACKER_V1_X\n\n// TRACKSENGER builtin LCD\n\n// I2C\n#define I2C_SDA SDA\n#define I2C_SCL SCL\n\n// ST7735S TFT LCD\n#define ST7735S 1 // there are different (sub-)versions of ST7735\n#define ST7735_CS 38\n#define ST7735_RS 40  // DC\n#define ST7735_SDA 42 // MOSI\n#define ST7735_SCK 41\n#define ST7735_RESET 39\n#define ST7735_MISO -1\n#define ST7735_BUSY -1\n#define TFT_BL 21 /* V1.1 PCB marking */\n#define ST7735_SPI_HOST SPI3_HOST\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define SCREEN_ROTATE\n#define TFT_HEIGHT DISPLAY_WIDTH\n#define TFT_WIDTH DISPLAY_HEIGHT\n#define TFT_OFFSET_X 26\n#define TFT_OFFSET_Y -1\n#define SCREEN_TRANSITION_FRAMERATE 3 // fps\n#define DISPLAY_FORCE_SMALL_FONTS\n#define USE_TFTDISPLAY 1\n\n#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost\n#define VEXT_ON_VALUE HIGH\n#define BUTTON_PIN 0\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9\n#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1\n#define ADC_CTRL_ENABLED HIGH\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 33\n#define GPS_TX_PIN 34\n#define PIN_GPS_RESET 35\n#define PIN_GPS_PPS 36\n\n#define GPS_RESET_MODE LOW\n#define GPS_UC6580\n#define GPS_BAUDRATE 115200\n\n#define USE_SX1262\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Picomputer gets a white on black display\n#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)\n\n// keyboard changes\n\n#define PIN_BUZZER 43\n\n#define INPUTBROKER_MATRIX_TYPE 1\n\n#define KEYS_COLS                                                                                                                \\\n    {                                                                                                                            \\\n        44, 45, 46, 4, 5, 6                                                                                                      \\\n    }\n#define KEYS_ROWS                                                                                                                \\\n    {                                                                                                                            \\\n        26, 37, 17, 16, 15, 7                                                                                                    \\\n    }\n// #end keyboard"
  },
  {
    "path": "variants/esp32s3/tracksenger/lcd/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define WIFI_LoRa_32_V3 true\n#define DISPLAY_HEIGHT 80\n#define DISPLAY_WIDTH 160\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 45;\nstatic const uint8_t SCL = 46;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 36;\nstatic const uint8_t LED = 18;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/tracksenger/lcd/variant.h",
    "content": "#define LED_POWER 18\n\n#define HELTEC_TRACKER_V1_X\n\n// TRACKSENGER 2.8\" IPS 320x240\n\n// I2C\n// #define I2C_SDA 42\n// #define I2C_SCL 41\n// #define HAS_SCREEN 1\n// #define USE_SSD1306\n\n// Default SPI1 will be mapped to the display\n#define ST7789_SDA 42\n#define ST7789_SCK 41\n#define ST7789_CS 38\n#define ST7789_RS 40\n#define ST7789_BL 21\n#define USE_TFTDISPLAY 1\n// P#define TFT_BL 21 /* V1.1 PCB marking */\n\n#define ST7789_RESET -1\n#define ST7789_MISO -1\n#define ST7789_BUSY -1\n#define ST7789_SPI_HOST SPI3_HOST\n#define TFT_BL 21\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 320\n#define TFT_WIDTH 240\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 0\n#define SCREEN_ROTATE\n\n// ST7735S TFT LCD\n// #define ST7735S 1 // there are different (sub-)versions of ST7735\n// #define ST7735_CS 38\n// #define ST7735_RS 40  // DC\n// #define ST7735_SDA 42 // MOSI\n// #define ST7735_SCK 41\n// #define ST7735_RESET 39\n// #define ST7735_MISO -1\n// #define ST7735_BUSY -1\n#define TFT_BL 21 /* V1.1 PCB marking */\n// #define ST7735_SPI_HOST SPI3_HOST\n// #define SPI_FREQUENCY 40000000\n// #define SPI_READ_FREQUENCY 16000000\n// #define SCREEN_ROTATE\n// #define TFT_HEIGHT DISPLAY_WIDTH\n// #define TFT_WIDTH DISPLAY_HEIGHT\n// #define TFT_OFFSET_X 26\n// #define TFT_OFFSET_Y -1\n#define SCREEN_TRANSITION_FRAMERATE 3 // fps\n// #define DISPLAY_FORCE_SMALL_FONTS\n\n#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost\n#define VEXT_ON_VALUE HIGH\n#define BUTTON_PIN 0\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9\n#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1\n#define ADC_CTRL_ENABLED HIGH\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 33\n#define GPS_TX_PIN 34\n#define PIN_GPS_RESET 35\n#define PIN_GPS_PPS 36\n\n#define GPS_RESET_MODE LOW\n#define GPS_UC6580\n#define GPS_BAUDRATE 115200\n\n#define USE_SX1262\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Picomputer gets a white on black display\n#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)\n\n// keyboard changes\n\n#define PIN_BUZZER 43\n\n#define INPUTBROKER_MATRIX_TYPE 1\n\n#define KEYS_COLS                                                                                                                \\\n    {                                                                                                                            \\\n        44, 45, 46, 4, 5, 6                                                                                                      \\\n    }\n#define KEYS_ROWS                                                                                                                \\\n    {                                                                                                                            \\\n        26, 37, 17, 16, 15, 7                                                                                                    \\\n    }\n// #end keyboard"
  },
  {
    "path": "variants/esp32s3/tracksenger/oled/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include \"soc/soc_caps.h\"\n#include <stdint.h>\n\n#define WIFI_LoRa_32_V3 true\n#define DISPLAY_HEIGHT 80\n#define DISPLAY_WIDTH 160\n\n#define USB_VID 0x303a\n#define USB_PID 0x1001\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 45;\nstatic const uint8_t SCL = 46;\n\nstatic const uint8_t SS = 8;\nstatic const uint8_t MOSI = 10;\nstatic const uint8_t MISO = 11;\nstatic const uint8_t SCK = 9;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 3;\nstatic const uint8_t A3 = 4;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 7;\nstatic const uint8_t A7 = 8;\nstatic const uint8_t A8 = 9;\nstatic const uint8_t A9 = 10;\nstatic const uint8_t A10 = 11;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 1;\nstatic const uint8_t T2 = 2;\nstatic const uint8_t T3 = 3;\nstatic const uint8_t T4 = 4;\nstatic const uint8_t T5 = 5;\nstatic const uint8_t T6 = 6;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 8;\nstatic const uint8_t T9 = 9;\nstatic const uint8_t T10 = 10;\nstatic const uint8_t T11 = 11;\nstatic const uint8_t T12 = 12;\nstatic const uint8_t T13 = 13;\nstatic const uint8_t T14 = 14;\n\nstatic const uint8_t Vext = 36;\nstatic const uint8_t LED = 18;\n\nstatic const uint8_t RST_LoRa = 12;\nstatic const uint8_t BUSY_LoRa = 13;\nstatic const uint8_t DIO0 = 14;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/tracksenger/oled/variant.h",
    "content": "#define LED_POWER 18\n\n#define HELTEC_TRACKER_V1_X\n\n// TRACKSENGER 2.42\" I2C OLED\n\n// I2C\n#define I2C_SDA 42\n#define I2C_SCL 41\n#define HAS_SCREEN 1\n#define USE_SSD1306\n\n// ST7735S TFT LCD\n// #define ST7735S 1 // there are different (sub-)versions of ST7735\n// #define ST7735_CS 38\n// #define ST7735_RS 40  // DC\n// #define ST7735_SDA 42 // MOSI\n// #define ST7735_SCK 41\n// #define ST7735_RESET 39\n// #define ST7735_MISO -1\n// #define ST7735_BUSY -1\n#define TFT_BL 21 /* V1.1 PCB marking */\n// #define ST7735_SPI_HOST SPI3_HOST\n// #define SPI_FREQUENCY 40000000\n// #define SPI_READ_FREQUENCY 16000000\n// #define SCREEN_ROTATE\n// #define TFT_HEIGHT DISPLAY_WIDTH\n// #define TFT_WIDTH DISPLAY_HEIGHT\n// #define TFT_OFFSET_X 26\n// #define TFT_OFFSET_Y -1\n#define SCREEN_TRANSITION_FRAMERATE 3 // fps\n// #define DISPLAY_FORCE_SMALL_FONTS\n\n#define VEXT_ENABLE 3 // active HIGH, powers the lora antenna boost\n#define VEXT_ON_VALUE HIGH\n#define BUTTON_PIN 0\n\n#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage\n#define ADC_CHANNEL ADC1_GPIO1_CHANNEL\n#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider\n#define ADC_MULTIPLIER 4.9\n#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1\n#define ADC_CTRL_ENABLED HIGH\n\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n#define GPS_RX_PIN 33\n#define GPS_TX_PIN 34\n#define PIN_GPS_RESET 35\n#define PIN_GPS_PPS 36\n\n#define GPS_RESET_MODE LOW\n#define GPS_UC6580\n#define GPS_BAUDRATE 115200\n\n#define USE_SX1262\n#define LORA_DIO0 -1 // a No connect on the SX1262 module\n#define LORA_RESET 12\n#define LORA_DIO1 14 // SX1262 IRQ\n#define LORA_DIO2 13 // SX1262 BUSY\n#define LORA_DIO3    // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK 9\n#define LORA_MISO 11\n#define LORA_MOSI 10\n#define LORA_CS 8\n\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Picomputer gets a white on black display\n#define TFT_MESH_OVERRIDE COLOR565(255, 255, 255)\n\n// keyboard changes\n\n#define PIN_BUZZER 43\n\n#define INPUTBROKER_MATRIX_TYPE 1\n\n#define KEYS_COLS                                                                                                                \\\n    {                                                                                                                            \\\n        44, 45, 46, 4, 5, 6                                                                                                      \\\n    }\n#define KEYS_ROWS                                                                                                                \\\n    {                                                                                                                            \\\n        26, 37, 17, 16, 15, 7                                                                                                    \\\n    }\n// #end keyboard"
  },
  {
    "path": "variants/esp32s3/tracksenger/platformio.ini",
    "content": "[env:tracksenger]\ncustom_meshtastic_hw_model = 48\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_TRACKER\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = TrackSenger (small TFT)\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_wireless_tracker\nboard_build.partitions = default_8MB.csv\nupload_protocol = esp-builtin\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/tracksenger/internal\n  -D HELTEC_TRACKER_V1_1\n  ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n\n[env:tracksenger-lcd]\ncustom_meshtastic_hw_model = 48\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_TRACKER\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = TrackSenger (big TFT)\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_wireless_tracker\nboard_build.partitions = default_8MB.csv\nupload_protocol = esp-builtin\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/tracksenger/lcd\n  -D HELTEC_TRACKER_V1_1\n  ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output\n\nlib_deps =\n  ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n\n[env:tracksenger-oled]\ncustom_meshtastic_hw_model = 48\ncustom_meshtastic_hw_model_slug = HELTEC_WIRELESS_TRACKER\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = TrackSenger (big OLED)\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = heltec_wireless_tracker\nboard_build.partitions = default_8MB.csv\nupload_protocol = esp-builtin\n\nbuild_flags = \n  ${esp32s3_base.build_flags}\n  -I variants/esp32s3/tracksenger/oled\n  -D HELTEC_TRACKER_V1_1\n  ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output\n"
  },
  {
    "path": "variants/esp32s3/unphone/pins_arduino.h",
    "content": "#ifndef Pins_Arduino_h\n#define Pins_Arduino_h\n\n#include <stdint.h>\n\n#define USB_VID 0x16D0\n#define USB_PID 0x1178\n\nstatic const uint8_t TX = 43;\nstatic const uint8_t RX = 44;\n\nstatic const uint8_t SDA = 3;\nstatic const uint8_t SCL = 4;\n\nstatic const uint8_t SS = 13;\nstatic const uint8_t MOSI = 40;\nstatic const uint8_t MISO = 41;\nstatic const uint8_t SCK = 39;\n\nstatic const uint8_t A0 = 1;\nstatic const uint8_t A1 = 2;\nstatic const uint8_t A2 = 8;\nstatic const uint8_t A3 = 9;\nstatic const uint8_t A4 = 5;\nstatic const uint8_t A5 = 6;\nstatic const uint8_t A6 = 14;\nstatic const uint8_t A7 = 7;\nstatic const uint8_t A8 = 15;\nstatic const uint8_t A9 = 33;\nstatic const uint8_t A10 = 27;\nstatic const uint8_t A11 = 12;\nstatic const uint8_t A12 = 13;\nstatic const uint8_t A13 = 14;\nstatic const uint8_t A14 = 15;\nstatic const uint8_t A15 = 16;\nstatic const uint8_t A16 = 17;\nstatic const uint8_t A17 = 18;\nstatic const uint8_t A18 = 19;\nstatic const uint8_t A19 = 20;\n\nstatic const uint8_t T1 = 2;\nstatic const uint8_t T2 = 8;\nstatic const uint8_t T3 = 9;\nstatic const uint8_t T4 = 5;\nstatic const uint8_t T5 = 6;\nstatic const uint8_t T6 = 14;\nstatic const uint8_t T7 = 7;\nstatic const uint8_t T8 = 15;\nstatic const uint8_t T9 = 33;\nstatic const uint8_t T10 = 27;\nstatic const uint8_t T11 = 12;\nstatic const uint8_t T12 = 13;\nstatic const uint8_t T13 = 14;\nstatic const uint8_t T14 = 15;\n\n#endif /* Pins_Arduino_h */\n"
  },
  {
    "path": "variants/esp32s3/unphone/platformio.ini",
    "content": "; platformio.ini for unphone meshtastic\n\n[env:unphone]\ncustom_meshtastic_hw_model = 59\ncustom_meshtastic_hw_model_slug = UNPHONE\ncustom_meshtastic_architecture = esp32-s3\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = unPhone\ncustom_meshtastic_requires_dfu = true\ncustom_meshtastic_partition_scheme = 8MB\n\nextends = esp32s3_base\nboard = unphone\nboard_build.partitions = partition-table-8MB.csv\nupload_speed = 921600\nmonitor_speed = 115200\nmonitor_filters = esp32_exception_decoder\n\nbuild_flags =\n  ${esp32s3_base.build_flags}\n  -D UNPHONE\n  -I variants/esp32s3/unphone\n  -D ARDUINO_USB_MODE=0\n  -D UNPHONE_ACCEL=0\n  -D UNPHONE_TOUCHS=0\n  -D UNPHONE_SDCARD=0\n  -D UNPHONE_UI0=0\n  -D UNPHONE_LORA=0\n  -D UNPHONE_FACTORY_MODE=0\n  -D USE_SX127x\n  -D SDCARD_CS=43\n\nbuild_src_filter =\n  ${esp32s3_base.build_src_filter}\n  +<../variants/esp32s3/unphone>\n\nlib_deps = ${esp32s3_base.lib_deps}\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n  # TODO renovate https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic@9.0.0\n  https://gitlab.com/hamishcunningham/unphonelibrary/-/archive/meshtastic/unphonelibrary-meshtastic.zip\n  # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel\n  adafruit/Adafruit NeoPixel@1.15.4\n\n[env:unphone-tft]\nboard_level = extra\nextends = env:unphone\nbuild_flags =\n  ${env:unphone.build_flags}\n  -D CONFIG_DISABLE_HAL_LOCKS=1\n  -D INPUTDRIVER_BUTTON_TYPE=21\n  -D HAS_SCREEN=1\n  -D HAS_TFT=1\n  -D HAS_SDCARD\n  -D SDCARD_CS=43\n  -D DISPLAY_SET_RESOLUTION\n  -D RAM_SIZE=6144\n  -D LV_CACHE_DEF_SIZE=2097152\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D LV_BUILD_TEST=0\n  -D LV_USE_SYSMON=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_PERF_MONITOR=0\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_LOG=0\n  -D LGFX_SCREEN_WIDTH=320\n  -D LGFX_SCREEN_HEIGHT=480\n  -D DISPLAY_SIZE=320x480 ; portrait mode\n  -D LGFX_DRIVER=LGFX_UNPHONE_V9\n  -D GFX_DRIVER_INC=\\\"graphics/LGFX/LGFX_UNPHONE.h\\\"\n  -D VIEW_320x240\n  -D USE_PACKET_API\n  -D MAP_FULL_REDRAW\n\nlib_deps =\n  ${env:unphone.lib_deps}\n  ${device-ui_base.lib_deps}\n"
  },
  {
    "path": "variants/esp32s3/unphone/variant.cpp",
    "content": "// meshtastic/firmware/variants/unphone/variant.cpp\n\n#include \"unPhone.h\"\nunPhone unphone = unPhone(\"meshtastic_unphone\");\n\nvoid initVariant()\n{\n    unphone.begin(); // initialise hardware etc.\n    unphone.store(unphone.buildTime);\n    unphone.printWakeupReason(); // what woke us up? (stored, not printed :|)\n    unphone.checkPowerSwitch();  // if power switch is off, shutdown\n    unphone.backlight(false);    // setup backlight and make sure its off\n    unphone.expanderPower(true); // enable power to expander / hat / sheild\n\n    for (int i = 0; i < 3; i++) { // buzz a bit\n        unphone.vibe(true);\n        delay(150);\n        unphone.vibe(false);\n        delay(150);\n    }\n}"
  },
  {
    "path": "variants/esp32s3/unphone/variant.h",
    "content": "// meshtastic/firmware/variants/unphone/variant.h\n\n#pragma once\n\n#define SPI_SCK 39\n#define SPI_MOSI 40\n#define SPI_MISO 41\n\n// We use the RFM95W LoRa module\n#define USE_RF95\n#define LORA_SCK SPI_SCK\n#define LORA_MOSI SPI_MOSI\n#define LORA_MISO SPI_MISO\n#define LORA_CS 44\n#define LORA_DIO0 10 // AKA LORA_IRQ\n#define LORA_RESET 42\n#define LORA_DIO1 11\n#define LORA_DIO2 RADIOLIB_NC // Not really used\n\n// HX8357 TFT LCD\n#define HX8357_CS 48\n#define HX8357_RS 47 // AKA DC\n#define HX8357_RESET 46\n#define HX8357_SCK SPI_SCK\n#define HX8357_MOSI SPI_MOSI\n#define HX8357_MISO SPI_MISO\n#define HX8357_BUSY -1\n#define HX8357_SPI_HOST SPI2_HOST\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 480\n#define TFT_WIDTH 320\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n#define TFT_OFFSET_ROTATION 6 // unPhone's screen wired unusually, 0 typical\n#define TFT_INVERT false\n#define SCREEN_ROTATE true\n#define SCREEN_TRANSITION_FRAMERATE 5\n#define USE_TFTDISPLAY 1\n\n#define HAS_TOUCHSCREEN 1\n#define USE_XPT2046 1\n#define TOUCH_CS 38\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 180\n\n#define HAS_GPS                                                                                                                  \\\n    0 // the unphone doesn't have a gps module by default (though\n      // GPS featherwing -- https://www.adafruit.com/product/3133\n      // -- can be added)\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define SD_SPI_FREQUENCY 25000000\n\n#define LED_POWER 13   // the red part of the RGB LED\n#define LED_STATE_ON 0 // State when LED is lit\n\n#define ALT_BUTTON_PIN 21    // Button 3 - square - top button in landscape mode\n#define BUTTON_PIN 0         // Circle button\n#define BUTTON_NEED_PULLUP   // we do need a helping hand up\n#define CANCEL_BUTTON_PIN 45 // Button 1 - triangle - bottom button in landscape mode\n#define CANCEL_BUTTON_ACTIVE_LOW true\n#define CANCEL_BUTTON_ACTIVE_PULLUP true\n\n#define I2C_SDA 3 // I2C pins for this board\n#define I2C_SCL 4\n\n#define LSM6DS3_WAKE_THRESH 5 // higher values reduce the sensitivity of the wake threshold\n\n// ratio of voltage divider = 3.20 (R1=100k, R2=220k)\n// #define ADC_MULTIPLIER 3.2\n\n// #define BATTERY_PIN 13 // battery V measurement pin; vbat divider is here\n// #define ADC_CHANNEL ADC2_GPIO13_CHANNEL\n// #define BAT_MEASURE_ADC_UNIT 2"
  },
  {
    "path": "variants/native/portduino/platformio.ini",
    "content": "[native_base]\nextends = portduino_base\nbuild_flags = ${portduino_base.build_flags} -I variants/native/portduino\n  -I /usr/include\nboard = cross_platform\nboard_level = extra\nlib_deps = \n  ${portduino_base.lib_deps}\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n\nbuild_src_filter = ${portduino_base.build_src_filter}\n\n[env:native]\nextends = native_base\n; The pkg-config commands below optionally add link flags.\n; the || : is just a \"or run the null command\" to avoid returning an error code\nbuild_flags = ${native_base.build_flags}\n  !pkg-config --libs libulfius --silence-errors || :\n  !pkg-config --libs openssl --silence-errors || :\n  !pkg-config --cflags --libs sdl2 --silence-errors || :\n  !pkg-config --cflags --libs libbsd-overlay --silence-errors || :\n\n[env:native-tft]\nextends = native_base\nbuild_type = release\nlib_deps =\n  ${native_base.lib_deps}\n  ${device-ui_base.lib_deps}\nbuild_flags = ${native_base.build_flags} -Os -lX11 -linput -lxkbcommon -ffunction-sections -fdata-sections -Wl,--gc-sections\n  -D RAM_SIZE=16384\n  -D USE_X11=1\n  -D HAS_TFT=1\n  -D HAS_SCREEN=1\n  -D LV_CACHE_DEF_SIZE=6291456\n  -D LV_BUILD_TEST=0\n  -D LV_USE_LIBINPUT=1\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D USE_PACKET_API\n  -D VIEW_320x240\n  !pkg-config --libs libulfius --silence-errors || :\n  !pkg-config --libs openssl --silence-errors || :\n  !pkg-config --cflags --libs sdl2 --silence-errors || :\n  !pkg-config --cflags --libs libbsd-overlay --silence-errors || :\nbuild_src_filter =\n  ${native_base.build_src_filter}\n\n[env:native-fb]\nextends = native_base\nbuild_type = release\nlib_deps =\n  ${native_base.lib_deps}\n  ${device-ui_base.lib_deps}\nbuild_flags = ${native_base.build_flags} -Os -ffunction-sections -fdata-sections -Wl,--gc-sections\n  -D RAM_SIZE=8192\n  -D USE_FRAMEBUFFER=1\n  -D LV_COLOR_DEPTH=32\n  -D HAS_TFT=1\n  -D HAS_SCREEN=1\n  -D LV_BUILD_TEST=0\n  -D LV_USE_LOG=0\n  -D LV_USE_EVDEV=1\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D USE_PACKET_API\n  -D VIEW_320x240\n  -D MAP_FULL_REDRAW\n  !pkg-config --libs libulfius --silence-errors || :\n  !pkg-config --libs openssl --silence-errors || :\n  !pkg-config --cflags --libs libbsd-overlay --silence-errors || :\nbuild_src_filter =\n  ${native_base.build_src_filter}\n\n[env:native-tft-debug]\nextends = native_base\nbuild_type = debug\nlib_deps =\n  ${native_base.lib_deps}\n  ${device-ui_base.lib_deps}\nbuild_flags = ${native_base.build_flags} -O0 -fsanitize=address -lX11 -linput -lxkbcommon\n  -D DEBUG_HEAP\n  -D RAM_SIZE=16384\n  -D USE_X11=1\n  -D HAS_TFT=1\n  -D HAS_SCREEN=0\n  -D LV_CACHE_DEF_SIZE=6291456\n  -D LV_BUILD_TEST=0\n  -D LV_USE_LOG=1\n  -D LV_USE_SYSMON=1\n  -D LV_USE_PERF_MONITOR=1\n  -D LV_USE_MEM_MONITOR=0\n  -D LV_USE_PROFILER=0\n  -D LV_USE_LIBINPUT=1\n  -D LV_LVGL_H_INCLUDE_SIMPLE\n  -D LV_CONF_INCLUDE_SIMPLE\n  -D LV_COMP_CONF_INCLUDE_SIMPLE\n  -D USE_LOG_DEBUG\n  -D LOG_DEBUG_INC=\\\"DebugConfiguration.h\\\"\n  -D USE_PACKET_API\n  -D VIEW_320x240\n  !pkg-config --libs libulfius --silence-errors || :\n  !pkg-config --libs openssl --silence-errors || :\n  !pkg-config --cflags --libs libbsd-overlay --silence-errors || :\nbuild_src_filter = ${env:native-tft.build_src_filter}\n\n[env:coverage]\nextends = env:native\nbuild_flags = -lgcov --coverage -fprofile-abs-path -fsanitize=address ${env:native.build_flags}\n; https://docs.platformio.org/en/latest/projectconf/sections/env/options/test/test_testing_command.html\ntest_testing_command =\n  ${platformio.build_dir}/${this.__env__}/meshtasticd\n  -s\n"
  },
  {
    "path": "variants/native/portduino/variant.h",
    "content": "#ifndef HAS_SCREEN\n#define HAS_SCREEN 1\n#endif\n#define USE_TFTDISPLAY 1\n#define HAS_GPS 1\n#define MAX_RX_TOPHONE portduino_config.maxtophone\n#define MAX_NUM_NODES portduino_config.MaxNodes\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// Enable Traffic Management Module for native/portduino\n#ifndef HAS_TRAFFIC_MANAGEMENT\n#define HAS_TRAFFIC_MANAGEMENT 1\n#endif\n#ifndef TRAFFIC_MANAGEMENT_CACHE_SIZE\n#define TRAFFIC_MANAGEMENT_CACHE_SIZE 2048\n#endif\n"
  },
  {
    "path": "variants/native/portduino-buildroot/platformio.ini",
    "content": "[env:buildroot]\nextends = portduino_base\n; Optional libraries should be appended to `PLATFORMIO_BUILD_FLAGS`\n; environment variable in the buildroot environment.\nbuild_flags = ${portduino_base.build_flags} -O0 -I variants/native/portduino-buildroot\nboard = buildroot\nboard_level = extra\nbuild_src_filter = ${portduino_base.build_src_filter}"
  },
  {
    "path": "variants/native/portduino-buildroot/variant.h",
    "content": "#define HAS_SCREEN 1\n#define USE_TFTDISPLAY 1\n#define HAS_GPS 1\n#define MAX_RX_TOPHONE portduino_config.maxtophone\n#define MAX_NUM_NODES portduino_config.MaxNodes\n"
  },
  {
    "path": "variants/native/portduino.ini",
    "content": "; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated).\n[portduino_base]\nplatform =\n  # renovate: datasource=git-refs depName=platform-native packageName=https://github.com/meshtastic/platform-native gitBranch=develop\n  https://github.com/meshtastic/platform-native/archive/f566d364204416cdbf298e349213f7d551f793d9.zip\nframework = arduino\n\nbuild_src_filter = \n  ${env.build_src_filter} \n  -<platform/esp32/> \n  -<nimble/> \n  -<platform/nrf52/> \n  -<platform/stm32wl/> \n  -<platform/rp2xx0>\n  -<mesh/wifi/>\n  -<mesh/http/>\n  +<mesh/raspihttp/>\n  -<mesh/eth/>\n  -<modules/esp32>\n\nlib_deps =\n  ${env.lib_deps}\n  ${networking_base.lib_deps}\n  ${networking_extra.lib_deps}\n  ${radiolib_base.lib_deps}\n  ${environmental_base.lib_deps}\n  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto\n  rweather/Crypto@0.4.0\n  # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX\n  lovyan03/LovyanGFX@1.2.19\n  ; # renovate: datasource=git-refs depName=libch341-spi-userspace packageName=https://github.com/pine64/libch341-spi-userspace gitBranch=main\n  https://github.com/pine64/libch341-spi-userspace/archive/23c42319a69cffcb65868e3c72e6bed83974a393.zip\n  # renovate: datasource=custom.pio depName=adafruit/Adafruit seesaw Library packageName=adafruit/library/Adafruit seesaw Library\n\tadafruit/Adafruit seesaw Library@1.7.9\n  # renovate: datasource=git-refs depName=RAK12034-BMX160 packageName=https://github.com/RAKWireless/RAK12034-BMX160 gitBranch=main\n  https://github.com/RAKWireless/RAK12034-BMX160/archive/dcead07ffa267d3c906e9ca4a1330ab989e957e2.zip\n  # renovate: datasource=custom.pio depName=adafruit/Adafruit BME680 Library packageName=adafruit/library/Adafruit BME680\n  adafruit/Adafruit BME680 Library@^2.0.5\n\nbuild_flags =\n  ${arduino_base.build_flags}\n  -D ARCH_PORTDUINO\n  -fPIC\n  -D_FORTIFY_SOURCE=2\n  -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4\n  -Isrc/platform/portduino\n  -DRADIOLIB_EEPROM_UNSUPPORTED\n  -DPORTDUINO_LINUX_HARDWARE\n  -DHAS_UDP_MULTICAST=1\n  -lpthread\n  -lstdc++fs\n  -lbluetooth\n  -lgpiod\n  -lyaml-cpp\n  -li2c\n  -luv\n  -std=gnu17\n  -std=gnu++17\nlib_ignore =\n  Adafruit NeoPixel\n  Adafruit ST7735 and ST7789 Library\n  SD\n"
  },
  {
    "path": "variants/nrf52840/Dongle_nRF52840-pca10059-v1/platformio.ini",
    "content": "[env:pca10059_diy_eink]\nboard_level = extra\nextends = nrf52840_base\nboard = nordic_pca10059\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/Dongle_nRF52840-pca10059-v1\n  -D NORDIC_PCA10059\n  -DEINK_DISPLAY_MODEL=GxEPD2_420_M01\n  -DEINK_WIDTH=300\n  -DEINK_HEIGHT=400\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/Dongle_nRF52840-pca10059-v1>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/Dongle_nRF52840-pca10059-v1/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n}"
  },
  {
    "path": "variants/nrf52840/Dongle_nRF52840-pca10059-v1/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_NORDIC_PCA10059_\n#define _VARIANT_NORDIC_PCA10059_\n\n#define PCA10059\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (0 + 6)      // Built in Green   P0.06\n#define PIN_LED2 (0 + 6)      // Just here for completeness\n#define RGBLED_RED (0 + 8)    // Red of RGB     P0.08\n#define RGBLED_GREEN (32 + 9) // Green of RGB  P1.09\n#define RGBLED_BLUE (0 + 12)  // Blue of RGB   P0.12\n#define RGBLED_CA             // comment out this line if you have a common cathode type, as defined use common anode logic\n\n#define LED_GREEN PIN_LED1\n#define LED_BLUE PIN_LED2\n\n#define LED_STATE_ON 0 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 (32 + 6) // BTN_DN           P1.06 Built in button\n\n/*\n * Analog pins\n */\n#define PIN_A0 (-1)\n\nstatic const uint8_t A0 = PIN_A0;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (-1) // AREF            Not yet used\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (-1)\n#define PIN_SERIAL1_TX (-1)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (0 + 17) // MISO      P0.17\n#define PIN_SPI_MOSI (0 + 15) // MOSI      P0.15\n#define PIN_SPI_SCK (0 + 13)  // SCK       P0.13\n\n#define PIN_SPI1_MISO (-1) //\n#define PIN_SPI1_MOSI (10) // EPD_MOSI  P0.10\n#define PIN_SPI1_SCK (9)   // EPD_SCLK  P0.09\n\nstatic const uint8_t SS = (0 + 31); // LORA_CS   P0.31\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n// #define PIN_EINK_EN  (-1)\n#define PIN_EINK_EN (0 + 6) // Turn on the Green built in LED\n#define PIN_EINK_CS (32)    // EPD_CS\n#define PIN_EINK_BUSY (20)  // EPD_BUSY\n#define PIN_EINK_DC (24)    // EPD_D/C\n#define PIN_EINK_RES (-1)   // Not Connected P0.22 available\n#define PIN_EINK_SCLK (9)   // EPD_SCLK\n#define PIN_EINK_MOSI (10)  // EPD_MOSI\n\n#define USE_EINK\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (32 + 4) // SDA\n#define PIN_WIRE_SCL (32 + 7) // SCL\n\n// NiceRF 868 LoRa module\n#define USE_SX1262\n#define SX126X_CS (0 + 31)     // LORA_CS     P0.31\n#define SX126X_DIO1 (0 + 29)   // DIO1        P0.29\n#define SX126X_BUSY (0 + 2)    // LORA_BUSY   P0.02\n#define SX126X_RESET (32 + 15) // LORA_RESET  P1.15\n#define SX126X_TXEN (32 + 13)  // TXEN        P1.13 NiceRF 868 dont use\n#define SX126X_RXEN (32 + 10)  // RXEN        P1.10 NiceRF 868 dont use\n\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define PIN_GPS_EN (-1)\n#define PIN_GPS_PPS (-1) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (1.73F)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M1/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/Backlight/LatchingBacklight.h\"\n#include \"graphics/niche/Drivers/EInk/GDEY0154D67.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\n// Button feedback\n#include \"buzz.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n\n    // For NRF52 platforms, SPI pins are defined in variant.h\n    SPI1.begin();\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver = new Drivers::GDEY0154D67;\n    driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n    // Todo: observe the display's performance in-person and adjust accordingly.\n    // Currently set to the values given by Elecrow for EInkDynamicDisplay.\n    inkhud->setDisplayResilience(10, 1.5);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2;              // Two applets side-by-side\n    inkhud->persistence->settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery\n\n    // Setup backlight controller\n    // Note: button is attached further down\n    Drivers::LatchingBacklight *backlight = Drivers::LatchingBacklight::getInstance();\n    backlight->setPin(PIN_EINK_EN);\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true);      // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                                   // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));             // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));             // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);                // Activated\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);                 // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);              // Activated, no autoshow, default on tile 0\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet, false, false); // -\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // Elecrow diagram: https://www.elecrow.com/download/product/CIL12901M/ThinkNode-M1_User_Manual.pdf\n\n    // #0: Main User Button\n    // Labeled \"Page Turn Button\" by manual\n    buttons->setWiring(0, PIN_BUTTON2);\n    buttons->setTiming(0, 50, 500); // Todo: confirm 50ms is adequate debounce\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // #1: Aux Button\n    // Labeled \"Function Button\" by manual\n    // Todo: additional features\n    buttons->setWiring(1, PIN_BUTTON1);\n    buttons->setTiming(1, 50, 500); // 500ms before latch\n    buttons->setHandlerDown(1, [backlight]() { backlight->peek(); });\n    buttons->setHandlerLongPress(1, [backlight]() {\n        backlight->latch();\n        playBoop();\n    });\n    buttons->setHandlerShortPress(1, [backlight]() {\n        backlight->off();\n        playChirp();\n    });\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M1/platformio.ini",
    "content": "; First prototype eink/nrf52840/sx1262 device\n[env:thinknode_m1]\ncustom_meshtastic_hw_model = 89\ncustom_meshtastic_hw_model_slug = THINKNODE_M1\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = ThinkNode M1\ncustom_meshtastic_images = thinknode_m1.svg\ncustom_meshtastic_tags = Elecrow\n\nextends = nrf52840_base\nboard = ThinkNode-M1\nboard_check = true\ndebug_tool = jlink\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/ELECROW-ThinkNode-M1\n  -DELECROW_ThinkNode_M1\n  -DUSE_EINK\n  -DEINK_DISPLAY_MODEL=GxEPD2_154_D67\n  -DEINK_WIDTH=200\n  -DEINK_HEIGHT=200\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted    //20\n  -DEINK_LIMIT_RATE_BACKGROUND_SEC=10  ; Minimum interval between BACKGROUND updates          //30\n  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n;   -DEINK_LIMIT_GHOSTING_PX=2000        ; (Optional) How much image ghosting is tolerated\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ELECROW-ThinkNode-M1>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n  # renovate: datasource=custom.pio depName=nRF52_PWM packageName=khoih-prog/library/nRF52_PWM\n  khoih-prog/nRF52_PWM@1.0.1\n;upload_protocol = fs\n\n[env:thinknode_m1-inkhud]\nextends = nrf52840_base, inkhud\nboard = ThinkNode-M1\nboard_check = true\ndebug_tool = jlink\nbuild_flags = \n  ${nrf52840_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/nrf52840/ELECROW-ThinkNode-M1\n  -D ELECROW_ThinkNode_M1\nbuild_src_filter = \n  ${nrf52_base.build_src_filter} \n  ${inkhud.build_src_filter}\n  +<../variants/nrf52840/ELECROW-ThinkNode-M1>\nlib_deps = \n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${nrf52840_base.lib_deps}\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M1/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // pinMode(PIN_LED1, OUTPUT);\n    // ledOff(PIN_LED1);\n}\n\nvoid variant_shutdown()\n{\n    for (int pin = 0; pin < 48; pin++) {\n        if (pin == SX126X_BUSY || pin == PIN_SPI_SCK || pin == SX126X_DIO1 || pin == PIN_SPI_MOSI || pin == PIN_SPI_MISO ||\n            pin == SX126X_CS || pin == SX126X_RESET || pin == PIN_NFC1 || pin == PIN_NFC2 || pin == PIN_BUTTON1 ||\n            pin == PIN_BUTTON2) {\n            continue;\n        }\n        pinMode(pin, OUTPUT);\n        digitalWrite(pin, LOW);\n        if (pin >= 32) {\n            NRF_P1->DIRCLR = (1 << (pin - 32));\n        } else {\n            NRF_GPIO->DIRCLR = (1 << pin);\n        }\n    }\n    nrf_gpio_cfg_input(PIN_BUTTON1, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input\n    nrf_gpio_pin_sense_t sense = NRF_GPIO_PIN_SENSE_LOW;\n    nrf_gpio_cfg_sense_set(PIN_BUTTON1, sense);\n\n    nrf_gpio_cfg_input(PIN_BUTTON2, NRF_GPIO_PIN_PULLUP);\n    nrf_gpio_pin_sense_t sense1 = NRF_GPIO_PIN_SENSE_LOW;\n    nrf_gpio_cfg_sense_set(PIN_BUTTON2, sense1);\n}"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M1/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_ELECROW_EINK_V1_0_\n#define _VARIANT_ELECROW_EINK_V1_0_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n// 在PinDescription数组中定义的引脚数\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LED\n// #define PIN_LED1 (32 + 6)\n#define LED_POWER (32 + 4)        // red\n#define LED_NOTIFICATION (0 + 13) // green\n#define POWER_LED_HARDWARE_BLINKS_WHILE_CHARGING\n\n// USB_CHECK\n#define EXT_PWR_DETECT (32 + 3)\n#define ADC_V (0 + 8)\n\n// #define LED_BLUE PIN_LED1\n#define LED_STATE_ON 1 // State when LED is lit  // LED灯亮时的状态\n#define PIN_BUZZER (0 + 6)\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 10)\n#define PIN_BUTTON2 (32 + 7)\n#define ALT_BUTTON_PIN PIN_BUTTON2\n#define ALT_BUTTON_ACTIVE_LOW true\n#define ALT_BUTTON_ACTIVE_PULLUP true\n\n/*\n * Analog pins\n */\n#define PIN_A0 (4) // Battery ADC\n\n#define BATTERY_PIN PIN_A0\n\nstatic const uint8_t A0 = PIN_A0;\n\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_SAMPLES 30\n\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\n/*Wire Interfaces*/\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (26)\n#define PIN_WIRE_SCL (27)\n\n/* touch sensor, active high */\n\n#define TP_SER_IO (0 + 11)\n\n/*\nExternal serial flash WP25R1635FZUIL0\n*/\n\n// QSPI Pins\n#define PIN_QSPI_SCK (32 + 14)\n#define PIN_QSPI_CS (32 + 15)\n#define PIN_QSPI_IO0 (32 + 12) // MOSI if using two bit interface\n#define PIN_QSPI_IO1 (32 + 13) // MISO if using two bit interface\n#define PIN_QSPI_IO2 (0 + 7)   // WP if using two bit interface (i.e. not used)\n#define PIN_QSPI_IO3 (0 + 5)   // HOLD if using two bit interface (i.e. not used)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES MX25R1635F\n#define EXTERNAL_FLASH_USE_QSPI\n\n/*\n * Lora radio\n */\n#define SX126X_POWER_EN (0 + 21)\n#define USE_SX1262\n#define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 (0 + 20)\n// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching\n// #define SX1262_DIO3 (0 + 21) // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not\n// drive from the main\n#define SX126X_BUSY (0 + 17)\n#define SX126X_RESET (0 + 25)\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 3.3\n\n#define PIN_EINK_EN (32 + 11) // Note: this is really just backlight power\n#define PIN_EINK_CS (0 + 30)\n#define PIN_EINK_BUSY (0 + 3)\n#define PIN_EINK_DC (0 + 28)\n#define PIN_EINK_RES (0 + 2)\n#define PIN_EINK_SCLK (0 + 31)\n#define PIN_EINK_MOSI (0 + 29) // also called SDI\n\n// Controls power for all peripherals (eink + GPS + LoRa + Sensor)\n#define PIN_POWER_EN (0 + 12)\n\n#define PIN_SPI1_MISO (32 + 7)\n#define PIN_SPI1_MOSI PIN_EINK_MOSI\n#define PIN_SPI1_SCK PIN_EINK_SCLK\n\n/*\n * GPS pins\n */\n// #define HAS_GPS 1\n#define GPS_L76K\n#define GPS_BAUDRATE 9600\n#define PIN_GPS_REINIT (32 + 5)  // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake\n// Seems to be missing on this new board\n// #define PIN_GPS_PPS (32 + 4)  // Pulse per second input from the GPS\n#define GPS_TX_PIN (32 + 8) // This is for bits going TOWARDS the GPS\n#define GPS_RX_PIN (32 + 9) // This is for bits going TOWARDS the CPU\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_GPS_SWITCH (32 + 1) // GPS开关判断\n\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n\n#define SERIAL_PRINT_PORT 0\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (0 + 23)\n#define PIN_SPI_MOSI (0 + 22)\n#define PIN_SPI_SCK (0 + 19)\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n// Battery\n// The battery sense is hooked to pin A0 (4)\n// it is defined in the anlaolgue pin section of this file\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (2.02F)\n\n// #define HAS_SCREEN 0\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M3/platformio.ini",
    "content": "[env:thinknode_m3]\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_images = thinknode_m3.svg\ncustom_meshtastic_tags = Elecrow\n\nextends = nrf52840_base\nboard = ThinkNode-M3\nboard_check = true\ndebug_tool = jlink\ncustom_meshtastic_hw_model = 115\ncustom_meshtastic_hw_model_slug = THINKNODE_M3\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_display_name = Elecrow ThinkNode M3\ncustom_meshtastic_actively_supported = true\nbuild_flags = \n  ${nrf52840_base.build_flags} \n  -Ivariants/nrf52840/ELECROW-ThinkNode-M3\n  -DELECROW_ThinkNode_M3\n  -DGPS_POWER_TOGGLE\n  -D CONFIG_NFCT_PINS_AS_GPIOS=1\n  -L \"${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard\"\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ELECROW-ThinkNode-M3>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=nRF52_PWM packageName=khoih-prog/library/nRF52_PWM\n  khoih-prog/nRF52_PWM@1.0.1\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M3/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n#include \"nrf.h\"\n\n// set RF switch configuration for ELECROW ThinkNode M3\n// ELECROW ThinkNode M3 uses DIO5 and DIO6 for RF switching\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH}},  {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M3/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"meshUtils.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(KEY_POWER, OUTPUT);\n    digitalWrite(KEY_POWER, HIGH);\n    pinMode(RGB_POWER, OUTPUT);\n    digitalWrite(RGB_POWER, HIGH);\n    pinMode(LED_GREEN, OUTPUT);\n    digitalWrite(LED_GREEN, LED_STATE_OFF);\n    pinMode(LED_BLUE, OUTPUT);\n    pinMode(PIN_POWER_USB, INPUT);\n    pinMode(PIN_POWER_DONE, INPUT);\n    pinMode(PIN_POWER_CHRG, INPUT);\n    pinMode(BUTTON_PIN, INPUT_PULLUP);\n    pinMode(EEPROM_POWER, OUTPUT);\n    digitalWrite(EEPROM_POWER, HIGH);\n    pinMode(PIN_EN1, OUTPUT);\n    digitalWrite(PIN_EN1, HIGH);\n    pinMode(PIN_EN2, OUTPUT);\n    digitalWrite(PIN_EN2, HIGH);\n    pinMode(ACC_POWER, OUTPUT);\n    digitalWrite(ACC_POWER, LOW);\n    pinMode(DHT_POWER, OUTPUT);\n    digitalWrite(DHT_POWER, HIGH);\n    pinMode(Battery_POWER, OUTPUT);\n    digitalWrite(Battery_POWER, HIGH);\n    pinMode(GPS_POWER, OUTPUT);\n    digitalWrite(GPS_POWER, HIGH);\n}\n\n// called from main-nrf52.cpp during the cpuDeepSleep() function\nvoid variant_shutdown()\n{\n    digitalWrite(LED_RED, HIGH);\n    digitalWrite(LED_GREEN, HIGH);\n    digitalWrite(LED_BLUE, HIGH);\n\n    digitalWrite(PIN_EN1, LOW);\n    digitalWrite(PIN_EN2, LOW);\n    digitalWrite(EEPROM_POWER, LOW);\n    digitalWrite(KEY_POWER, LOW);\n    digitalWrite(DHT_POWER, LOW);\n    digitalWrite(ACC_POWER, LOW);\n    digitalWrite(Battery_POWER, LOW);\n    digitalWrite(GPS_POWER, LOW);\n\n    // This sets the pin to OUTPUT and LOW for the pins *not* in the if block.\n    for (int pin = 0; pin < 48; pin++) {\n        if (pin == PIN_POWER_USB || pin == BUTTON_PIN || pin == PIN_EN1 || pin == PIN_EN2 || pin == DHT_POWER ||\n            pin == ACC_POWER || pin == Battery_POWER || pin == GPS_POWER || pin == LR1110_SPI_MISO_PIN ||\n            pin == LR1110_SPI_MOSI_PIN || pin == LR1110_SPI_SCK_PIN || pin == LR1110_SPI_NSS_PIN || pin == LR1110_BUSY_PIN ||\n            pin == LR1110_NRESET_PIN || pin == LR1110_IRQ_PIN || pin == GPS_TX_PIN || pin == GPS_RX_PIN || pin == LED_GREEN ||\n            pin == LED_RED || pin == LED_BLUE) {\n            continue;\n        }\n        pinMode(pin, OUTPUT);\n        digitalWrite(pin, LOW);\n        if (pin >= 32) {\n            NRF_P1->DIRCLR = (1 << (pin - 32));\n        } else {\n            NRF_GPIO->DIRCLR = (1 << pin);\n        }\n    }\n\n    nrf_gpio_cfg_input(BUTTON_PIN, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input\n    nrf_gpio_pin_sense_t sense1 = NRF_GPIO_PIN_SENSE_LOW;\n    nrf_gpio_cfg_sense_set(BUTTON_PIN, sense1);\n\n    nrf_gpio_cfg_input(PIN_POWER_USB, NRF_GPIO_PIN_PULLDOWN); // Configure the pin to be woken up as an input\n    nrf_gpio_pin_sense_t sense2 = NRF_GPIO_PIN_SENSE_HIGH;\n    nrf_gpio_cfg_sense_set(PIN_POWER_USB, sense2);\n}"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M3/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_ELECROW_EINK_V1_0_\n#define _VARIANT_ELECROW_EINK_V1_0_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n#include \"WVariant.h\"\n\n#define VARIANT_MCK (64000000ul)\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n#define ELECROW_ThinkNode_M3 1\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// Power Pin\n#define NRF_APM\n#define GPS_POWER 14\n#define PIN_POWER_USB 31\n#define EXT_PWR_DETECT PIN_POWER_USB\n#define PIN_POWER_DONE 24\n#define PIN_POWER_CHRG 32\n#define KEY_POWER 16\n#define ACC_POWER 2\n#define DHT_POWER 3\n#define Battery_POWER 17\n#define RGB_POWER 29\n#define EEPROM_POWER 7\n\n// LED\n#define LED_RED 33\n#define LED_POWER LED_RED\n#define LED_GREEN 35\n#define LED_NOTIFICATION LED_GREEN\n#define LED_BLUE 37\n#define LED_PAIRING LED_BLUE // Signals the Status LED Module to handle this LED\n\n#define LED_STATE_ON LOW\n#define LED_STATE_OFF HIGH\n\n// BUZZER\n#define PIN_BUZZER 23\n#define PIN_EN1 36\n#define PIN_EN2 34\n/*Wire Interfaces*/\n#define WIRE_INTERFACES_COUNT 1\n#define PIN_WIRE_SDA 26\n#define PIN_WIRE_SCL 27\n\n// Temperature correction for sensor\n#define AHT10_TEMP_OFFSET -5.0\n\n/*GPS pins*/\n#define HAS_GPS 1\n#define GPS_BAUDRATE 9600\n#define PIN_GPS_RESET 25\n#define PIN_GPS_STANDBY 21\n#define GPS_TX_PIN 22\n#define GPS_RX_PIN 20\n#define GPS_THREAD_INTERVAL 50\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n// Button\n#define BUTTON_PIN 12\n#define BUTTON_PIN_ALT (0 + 12)\n// Battery\n#define BATTERY_PIN 5\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 2.4\n#define VBAT_AR_INTERNAL AR_INTERNAL_2_4\n#define ADC_MULTIPLIER (1.75)\n/*SPI Interfaces*/\n#define SPI_INTERFACES_COUNT 1\n#define PIN_SPI_MISO (32 + 15) // P1.15 47\n#define PIN_SPI_MOSI (32 + 14) // P1.14 46\n#define PIN_SPI_SCK (32 + 13)  // P1.13 45\n#define PIN_SPI_NSS (32 + 12)  // P1.12 44\n/*LORA Interfaces*/\n#define USE_LR1110\n#define LR1110_IRQ_PIN 40\n#define LR1110_NRESET_PIN 42\n#define LR1110_BUSY_PIN 43\n#define LR1110_SPI_NSS_PIN 44\n#define LR1110_SPI_SCK_PIN 45\n#define LR1110_SPI_MOSI_PIN 46\n#define LR1110_SPI_MISO_PIN 47\n#define LR11X0_DIO3_TCXO_VOLTAGE 3.3\n#define LR11X0_DIO_AS_RF_SWITCH\n\n#define SERIAL_PRINT_PORT 0\n\n// PCF8563 RTC Module\n#define PCF8563_RTC 0x51\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M4/platformio.ini",
    "content": "; ThinkNode M4 - Powerbank nrf52840/LR1110 by Elecrow\n[env:thinknode_m4]\nextends = nrf52840_base\nboard = ThinkNode-M4\nboard_check = true\ndebug_tool = jlink\n\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/ELECROW-ThinkNode-M4\n  -DELECROW_ThinkNode_M4\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ELECROW-ThinkNode-M4>\nlib_deps =\n  ${nrf52840_base.lib_deps}\n  lewisxhe/PCF8563_Library@^1.0.1\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M4/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH}},  {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M4/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(LED_PAIRING, OUTPUT);\n    ledOff(LED_PAIRING);\n\n    pinMode(Battery_LED_1, OUTPUT);\n    ledOff(Battery_LED_1);\n    pinMode(Battery_LED_2, OUTPUT);\n    ledOff(Battery_LED_2);\n\n    pinMode(Battery_LED_3, OUTPUT);\n    ledOff(Battery_LED_3);\n\n    pinMode(Battery_LED_4, OUTPUT);\n    ledOff(Battery_LED_4);\n}\n\n/// called from main-nrf52.cpp during the cpuDeepSleep() function\nvoid variant_shutdown()\n{\n    for (int pin = 0; pin < 48; pin++) {\n        if (pin == PIN_GPS_EN || pin == PIN_BUTTON1) {\n            continue;\n        }\n        pinMode(pin, OUTPUT);\n        digitalWrite(pin, LOW);\n        if (pin >= 32) {\n            NRF_P1->DIRCLR = (1 << (pin - 32));\n        } else {\n            NRF_GPIO->DIRCLR = (1 << pin);\n        }\n    }\n    digitalWrite(PIN_GPS_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M4/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_ELECROW_THINKNODE_M4_\n#define _VARIANT_ELECROW_THINKNODE_M4_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define LED_BLUE -1\n#define LED_NOTIFICATION (32 + 9)\n#define LED_PAIRING (13)\n\n#define Battery_LED_1 (15)\n#define Battery_LED_2 (17)\n#define Battery_LED_3 (32 + 2)\n#define Battery_LED_4 (32 + 4)\n\n#define LED_STATE_ON 1\n\n// Button\n#define PIN_BUTTON1 (4)\n\n// Battery ADC\n#define PIN_A0 (2)\n#define BATTERY_PIN PIN_A0\n#define BATTERY_SENSE_SAMPLES 30\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#define ADC_MULTIPLIER (2.00F)\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n\n#define HAS_SERIAL_BATTERY_LEVEL 1\n#define SERIAL_BATTERY_RX 30\n#define SERIAL_BATTERY_TX 5\n\nstatic const uint8_t A0 = PIN_A0;\n\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\n// I2C\n#define WIRE_INTERFACES_COUNT 1\n#define PIN_WIRE_SDA (23)\n#define PIN_WIRE_SCL (25)\n\n// actually the LORA Radio\n#define PIN_POWER_EN (11)\n\n// charger status\n#define EXT_CHRG_DETECT (32 + 6)\n#define EXT_CHRG_DETECT_VALUE HIGH\n\n// SPI\n#define SPI_INTERFACES_COUNT 1\n#define PIN_SPI_MISO (8)\n#define PIN_SPI_MOSI (7)\n#define PIN_SPI_SCK (6)\n\n#define LORA_RESET (32 + 8)\n#define LORA_DIO1 (12)\n#define LORA_DIO2 (26)\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS (27)\n\n#define USE_LR1110\n#define LR1110_IRQ_PIN LORA_DIO1\n#define LR1110_NRESET_PIN LORA_RESET\n#define LR1110_BUSY_PIN LORA_DIO2\n#define LR1110_SPI_NSS_PIN LORA_CS\n#define LR1110_SPI_SCK_PIN LORA_SCK\n#define LR1110_SPI_MOSI_PIN LORA_MOSI\n#define LR1110_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.6\n#define LR11X0_DIO_AS_RF_SWITCH\n\n// Peripherals on I2C bus. Active Low\n#define VEXT_ENABLE (32)\n#define VEXT_ON_VALUE LOW\n\n// GPS L76K\n#define HAS_GPS 1\n#define GPS_L76K\n#define GPS_BAUDRATE 9600\n#define PIN_GPS_EN (32 + 11)\n#define GPS_EN_ACTIVE LOW\n#define PIN_GPS_RESET (3)\n#define GPS_RESET_MODE HIGH\n#define PIN_GPS_STANDBY (28)\n#define GPS_STANDBY_ACTIVE HIGH\n#define GPS_TX_PIN (32 + 12)\n#define GPS_RX_PIN (32 + 14)\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n#define SERIAL_PRINT_PORT 0\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M6/platformio.ini",
    "content": "; ThinkNode M6 - Outdoor Solar Power nrf52840/sx1262 device\n[env:thinknode_m6]\ncustom_meshtastic_hw_model = 120\ncustom_meshtastic_hw_model_slug = THINKNODE_M6\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = ThinkNode M6\ncustom_meshtastic_images = thinknode_m6.svg\ncustom_meshtastic_tags = Elecrow\n\nextends = nrf52840_base\nboard = ThinkNode-M6\nboard_check = true\ndebug_tool = jlink\n\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/ELECROW-ThinkNode-M6\n  -DELECROW_ThinkNode_M6\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ELECROW-ThinkNode-M6>\nlib_deps =\n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M6/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(LED_PAIRING, OUTPUT);\n    ledOff(LED_PAIRING);\n\n    pinMode(VDD_FLASH_EN, OUTPUT);\n    digitalWrite(VDD_FLASH_EN, HIGH);\n}\n\n// called from main-nrf52.cpp during the cpuDeepSleep() function\nvoid variant_shutdown()\n{\n    // This sets the pin to OUTPUT and LOW for the pins *not* in the if block.\n    for (int pin = 0; pin < 48; pin++) {\n        if (pin == PIN_GPS_EN || pin == ADC_CTRL || pin == PIN_BUTTON1 || pin == PIN_SPI_MISO || pin == PIN_SPI_MOSI ||\n            pin == PIN_SPI_SCK || pin == SX126X_CS || pin == SX126X_RESET || pin == SX126X_BUSY || pin == SX126X_DIO1) {\n            continue;\n        }\n        pinMode(pin, OUTPUT);\n        digitalWrite(pin, LOW);\n        if (pin >= 32) {\n            NRF_P1->DIRCLR = (1 << (pin - 32));\n        } else {\n            NRF_GPIO->DIRCLR = (1 << pin);\n        }\n    }\n\n    digitalWrite(PIN_GPS_EN, LOW);\n    digitalWrite(ADC_CTRL, LOW);\n    // digitalWrite(RTC_POWER, LOW);\n\n    nrf_gpio_cfg_input(PIN_BUTTON1, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input\n    nrf_gpio_pin_sense_t sense1 = NRF_GPIO_PIN_SENSE_LOW;\n    nrf_gpio_cfg_sense_set(PIN_BUTTON1, sense1);\n\n    nrf_gpio_cfg_input(EXT_CHRG_DETECT, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input\n    nrf_gpio_pin_sense_t sense2 = NRF_GPIO_PIN_SENSE_LOW;\n    nrf_gpio_cfg_sense_set(EXT_CHRG_DETECT, sense2);\n}\n"
  },
  {
    "path": "variants/nrf52840/ELECROW-ThinkNode-M6/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_ELECROW_THINKNODE_M6_\n#define _VARIANT_ELECROW_THINKNODE_M6_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define LED_BLUE -1\n#define LED_POWER (12)\n#define LED_PAIRING (7)\n#define LED_NOTIFICATION LED_PAIRING\n\n#define LED_STATE_ON HIGH\n#define LED_STATE_OFF LOW\n\n// USB power detection\n#define EXT_PWR_DETECT (13)\n\n// Button\n#define PIN_BUTTON1 (17)\n\n// Battery ADC\n#define PIN_A0 (28)\n#define BATTERY_PIN PIN_A0\n#define ADC_CTRL (11)\n#define ADC_CTRL_ENABLED 1\n\nstatic const uint8_t A0 = PIN_A0;\n\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_SAMPLES 30\n\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\n// I2C\n#define WIRE_INTERFACES_COUNT 1\n#define PIN_WIRE_SDA (32 + 9)\n#define PIN_WIRE_SCL (8)\n\n// Peripheral power enable\n#define PIN_POWER_EN (27)\n\n// Solar charger status\n#define EXT_CHRG_DETECT (15)\n#define EXT_CHRG_DETECT_VALUE LOW\n\n// QSPI Flash\n#define PIN_QSPI_SCK (32 + 3)\n#define PIN_QSPI_CS (23)\n#define PIN_QSPI_IO0 (32 + 1)\n#define PIN_QSPI_IO1 (32 + 2)\n#define PIN_QSPI_IO2 (32 + 4)\n#define PIN_QSPI_IO3 (32 + 5)\n\n#define EXTERNAL_FLASH_DEVICES MX25R1635F\n#define EXTERNAL_FLASH_USE_QSPI\n#define VDD_FLASH_EN (21)\n\n// LoRa SX1262\n#define USE_SX1262\n#define SX126X_CS (32 + 12)\n#define SX126X_DIO1 (32 + 6)\n#define SX126X_BUSY (32 + 11)\n#define SX126X_RESET (32 + 10)\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 3.3\n\n// GPS L76K\n#define GPS_L76K\n#define GPS_BAUDRATE 9600\n#define PIN_GPS_EN (6)\n#define PIN_GPS_REINIT (29)\n#define PIN_GPS_STANDBY (30)\n#define PIN_GPS_PPS (31)\n#define GPS_TX_PIN (2)\n#define GPS_RX_PIN (3)\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n\n// Secondary UART\n#define PIN_SERIAL2_RX (22)\n#define PIN_SERIAL2_TX (24)\n\n// PCF8563 RTC Module\n#define PCF8563_RTC 0x51\n\n// SPI\n#define SPI_INTERFACES_COUNT 1\n#define PIN_SPI_MISO (32 + 15)\n#define PIN_SPI_MOSI (32 + 14)\n#define PIN_SPI_SCK (32 + 13)\n\n// Battery\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 2.4\n#define VBAT_AR_INTERNAL AR_INTERNAL_2_4\n#define ADC_MULTIPLIER (1.75F)\n\n#define HAS_SOLAR\n\n#define OCV_ARRAY 4080, 3990, 3935, 3880, 3825, 3770, 3715, 3660, 3605, 3550, 3450\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD/platformio.ini",
    "content": "[env:ME25LS01-4Y10TD]\nextends = nrf52840_base\nboard = me25ls01-4y10td\nboard_level = extra\n; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/ME25LS01-4Y10TD\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DME25LS01_4Y10TD\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ME25LS01-4Y10TD>\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\nupload_protocol = nrfutil\n;upload_port = /dev/ttyACM1\n"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n#include \"nrf.h\"\n\n// set RF switch configuration for Wio WM1110\n// Wio WM1110 uses DIO5 and DIO6 for RF switching\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH}},  {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_ME25LS01_4Y10TD_\n#define _VARIANT_ME25LS01_4Y10TD_\n\n#define ME25LS01\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// Use the native nrf52 usb power detection\n#define NRF_APM\n\n#define PIN_3V3_EN (32 + 5) //-1\n#define PIN_3V3_ACC_EN -1\n\n#define PIN_LED1 (32 + 7) // P1.07 Blue D2\n\n#define LED_POWER PIN_LED1\n\n#define LED_BLUE -1\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN (0 + 27) // P0.27 K3\n#define BUTTON_NEED_PULLUP\n\n#define HAS_WIRE 1\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 15) // P0.15\n#define PIN_WIRE_SCL (0 + 17) // P0.17\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 14) // P0.14\n#define PIN_SERIAL1_TX (0 + 13) // P0.13\n\n#define PIN_SERIAL2_RX (0 + 17) // P0.17\n#define PIN_SERIAL2_TX (0 + 16) // P0.16\n\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (0 + 29) // P0.20 // MISO\n#define PIN_SPI_MOSI (0 + 2)  // P0.02 // MOSI\n#define PIN_SPI_SCK (32 + 15) // P1.15 // SCK\n#define PIN_SPI_NSS (32 + 13) // P1.13 // NSS\n\n#define LORA_RESET (32 + 11) // P1.11 // RST\n#define LORA_DIO1 (32 + 12)  // P1.12 // IRQ\n#define LORA_DIO2 (32 + 10)  // P1.10 // BUSY\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS PIN_SPI_NSS\n\n// supported modules list\n#define USE_LR1110\n\n#define LR1110_IRQ_PIN LORA_DIO1\n#define LR1110_NRESET_PIN LORA_RESET\n#define LR1110_BUSY_PIN LORA_DIO2\n#define LR1110_SPI_NSS_PIN LORA_CS\n#define LR1110_SPI_SCK_PIN LORA_SCK\n#define LR1110_SPI_MOSI_PIN LORA_MOSI\n#define LR1110_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.6\n#define LR11X0_DIO_AS_RF_SWITCH\n\n#define HAS_GPS 0\n\n#define PIN_GPS_EN -1\n#define GPS_EN_ACTIVE HIGH\n#define PIN_GPS_RESET -1\n#define GPS_VRTC_EN -1\n#define GPS_SLEEP_INT -1\n#define GPS_RTC_INT -1\n#define GPS_RESETB_OUT -1\n\n#define BATTERY_PIN -1\n#define ADC_MULTIPLIER (2.0F)\n\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n\n// Buzzer\n#define PIN_BUZZER (0 + 25)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif // _VARIANT_ME25LS01_4Y10TD_\n"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD_e-ink/platformio.ini",
    "content": "[env:ME25LS01-4Y10TD_e-ink]\nextends = nrf52840_base\nboard = me25ls01-4y10td\nboard_level = extra\n; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/ME25LS01-4Y10TD_e-ink\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DME25LS01_4Y10TD\n  -DEINK_DISPLAY_MODEL=GxEPD2_420_GDEY042T81\n  -DEINK_WIDTH=400\n  -DEINK_HEIGHT=300\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ME25LS01-4Y10TD_e-ink>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\nupload_protocol = nrfutil\n;upload_port = /dev/ttyACM1\n"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD_e-ink/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n#include \"nrf.h\"\n\n// set RF switch configuration for Wio WM1110\n// Wio WM1110 uses DIO5 and DIO6 for RF switching\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH}},  {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD_e-ink/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}"
  },
  {
    "path": "variants/nrf52840/ME25LS01-4Y10TD_e-ink/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_ME25LS01_4Y10TD_\n#define _VARIANT_ME25LS01_4Y10TD_\n\n#define ME25LS01\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// Use the native nrf52 usb power detection\n#define NRF_APM\n\n#define PIN_3V3_EN (32 + 5) //-1\n#define PIN_3V3_ACC_EN -1\n\n#define PIN_LED1 (32 + 7) // P1.07 Blue D2\n\n#define LED_POWER PIN_LED1\n\n#define LED_BLUE -1\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN (0 + 27) // P0.27 K3\n#define BUTTON_NEED_PULLUP\n\n#define HAS_WIRE 1\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 15) // P0.15\n#define PIN_WIRE_SCL (0 + 17) // P0.17\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 14) // P0.14\n#define PIN_SERIAL1_TX (0 + 13) // P0.13\n\n#define PIN_SERIAL2_RX (0 + 17) // P0.17\n#define PIN_SERIAL2_TX (0 + 16) // P0.16\n\n#define SPI_INTERFACES_COUNT 2\n\n// LoRa SPI\n#define PIN_SPI_MISO (0 + 29) // P0.20 // MISO\n#define PIN_SPI_MOSI (0 + 2)  // P0.02 // MOSI\n#define PIN_SPI_SCK (32 + 15) // P1.15 // SCK\n#define PIN_SPI_NSS (32 + 13) // P1.13 // NSS\n\n#define LORA_RESET (32 + 11) // P1.11 // RST\n#define LORA_DIO1 (32 + 12)  // P1.12 // IRQ\n#define LORA_DIO2 (32 + 10)  // P1.10 // BUSY\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS PIN_SPI_NSS\n\nstatic const uint8_t SS = (32 + 13); // P1.13 // NSS\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n// EPD SPI\n#define PIN_SPI1_MISO (32 + 2) // Not Used for EPD but needs to be defined\n#define PIN_SPI1_MOSI (0 + 10) // EPD_MOSI  P0.10\n#define PIN_SPI1_SCK (0 + 9)   // EPD_SCLK  P0.09\n\n/*\n * eink display pins\n */\n\n#define USE_EINK\n#define PIN_EINK_CS (32 + 0)   // EPD_CS\n#define PIN_EINK_BUSY (0 + 19) // EPD_BUSY\n#define PIN_EINK_DC (0 + 24)   // EPD_D/C\n#define PIN_EINK_RES (0 + 23)  // EPD_RESET\n#define PIN_EINK_SCLK PIN_SPI1_SCK\n#define PIN_EINK_MOSI PIN_SPI1_MOSI\n\n// supported modules list\n#define USE_LR1110\n\n#define LR1110_IRQ_PIN LORA_DIO1\n#define LR1110_NRESET_PIN LORA_RESET\n#define LR1110_BUSY_PIN LORA_DIO2\n#define LR1110_SPI_NSS_PIN LORA_CS\n#define LR1110_SPI_SCK_PIN LORA_SCK\n#define LR1110_SPI_MOSI_PIN LORA_MOSI\n#define LR1110_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.6\n#define LR11X0_DIO_AS_RF_SWITCH\n\n#define HAS_GPS 0\n\n#define PIN_GPS_EN -1\n#define GPS_EN_ACTIVE HIGH\n#define PIN_GPS_RESET -1\n#define GPS_VRTC_EN -1\n#define GPS_SLEEP_INT -1\n#define GPS_RTC_INT -1\n#define GPS_RESETB_OUT -1\n\n#define BATTERY_PIN -1\n#define ADC_MULTIPLIER (2.0F)\n\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n\n// Buzzer\n#define PIN_BUZZER (0 + 25)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif // _VARIANT_ME25LS01_4Y10TD__"
  },
  {
    "path": "variants/nrf52840/MS24SF1/platformio.ini",
    "content": "[env:ms24sf1]\nextends = nrf52840_base\nboard = ms24sf1\nboard_level = extra\n; platform = https://github.com/maxgerhardt/platform-nordicnrf52#cac6fcf943a41accd2aeb4f3659ae297a73f422e\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/MS24SF1\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/MS24SF1>\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\nupload_protocol = nrfutil\n;upload_port = /dev/ttyACM1\n"
  },
  {
    "path": "variants/nrf52840/MS24SF1/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant() {}\n"
  },
  {
    "path": "variants/nrf52840/MS24SF1/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_MINEWSEMI_MS24SF1_\n#define _VARIANT_MINEWSEMI_MS24SF1_\n\n#define ME25LS01\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// Use the native nrf52 usb power detection\n#define NRF_APM\n\n#define PIN_3V3_EN (32 + 5) //-1\n#define PIN_3V3_ACC_EN -1\n\n#define PIN_LED1 (-1)\n\n#define LED_POWER PIN_LED1\n\n#define LED_BLUE -1\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN (-1)\n#define BUTTON_NEED_PULLUP\n\n#define HAS_WIRE 1\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 29) // P0.15\n#define PIN_WIRE_SCL (0 + 30) // P0.17\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (-1) // P0.14\n#define PIN_SERIAL1_TX (-1) // P0.13\n\n#define PIN_SERIAL2_RX (-1) // P0.17\n#define PIN_SERIAL2_TX (-1) // P0.16\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 1 // 2\n\n#define PIN_SPI_MISO (0 + 17) // MISO      P0.17\n#define PIN_SPI_MOSI (0 + 20) // MOSI      P0.20\n#define PIN_SPI_SCK (0 + 21)  // SCK       P0.21\n\n// #define PIN_SPI1_MISO (-1) //\n// #define PIN_SPI1_MOSI (10) // EPD_MOSI  P0.10\n// #define PIN_SPI1_SCK (9)   // EPD_SCLK  P0.09\n\nstatic const uint8_t SS = (0 + 22); // LORA_CS   P0.22\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n// MINEWSEMI nRF52840+SX1262 MS24SF1 (NRF82540 with integrated SX1262)\n#define USE_SX1262\n#define SX126X_CS (0 + 22)    // LORA_CS     P0.22\n#define SX126X_DIO1 (0 + 16)  // DIO1        P0.16\n#define SX126X_BUSY (0 + 19)  // LORA_BUSY   P0.19\n#define SX126X_RESET (0 + 12) // LORA_RESET  P0.12\n#define SX126X_TXEN (32 + 4)  // TXEN        P1.04\n#define SX126X_RXEN (32 + 2)  // RXEN        P1.02\n\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n\n#define HAS_GPS 0\n\n#define PIN_GPS_EN -1\n#define GPS_EN_ACTIVE HIGH\n#define PIN_GPS_RESET -1\n#define GPS_VRTC_EN -1\n#define GPS_SLEEP_INT -1\n#define GPS_RTC_INT -1\n#define GPS_RESETB_OUT -1\n\n#define BATTERY_PIN -1\n#define ADC_MULTIPLIER (2.0F)\n\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n\n// Buzzer\n// #define PIN_BUZZER (0 + 25)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif // _VARIANT_MINEWSEMI_MS24SF1_\n"
  },
  {
    "path": "variants/nrf52840/MakePython_nRF52840_eink/platformio.ini",
    "content": "[env:makerpython_nrf52840_sx1280_eink]\nboard_level = extra\nextends = nrf52840_base\nboard = nordic_pca10059\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/MakePython_nRF52840_eink\n  -D PRIVATE_HW\n  -D PIN_EINK_EN\n  -DEINK_DISPLAY_MODEL=GxEPD2_290_T5D\n  -DEINK_WIDTH=296\n  -DEINK_HEIGHT=128\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/MakePython_nRF52840_eink>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master\n  https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\ndebug_tool = jlink\n;upload_port = /dev/ttyACM4"
  },
  {
    "path": "variants/nrf52840/MakePython_nRF52840_eink/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n}\n"
  },
  {
    "path": "variants/nrf52840/MakePython_nRF52840_eink/variant.h",
    "content": "#ifndef _VARIANT_MAKERPYTHON_NRF82540_EINK_\n#define _VARIANT_MAKERPYTHON_NRF82540_EINK_\n\n#define MAKERPYTHON\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (32 + 10) // LED        P1.15\n\n#define LED_GREEN PIN_LED1\n\n#define LED_STATE_ON 0 // State when LED is lit\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 (32 + 15) // P1.15 Built in button\n\n/*\n * Analog pins\n */\n#define PIN_A0 (-1)\n\nstatic const uint8_t A0 = PIN_A0;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (-1) // AREF            Not yet used\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (-1)\n#define PIN_SERIAL1_TX (-1)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n// here\n// #define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (0 + 31) // MISO      P0.31\n#define PIN_SPI_MOSI (0 + 30) // MOSI      P0.30\n#define PIN_SPI_SCK (0 + 29)  // SCK       P0.29\n\n// here\n#define PIN_SPI1_MISO (-1)     //\n#define PIN_SPI1_MOSI (0 + 28) // EPD_MOSI  P0.10\n#define PIN_SPI1_SCK (0 + 2)   // EPD_SCLK  P0.09\n\nstatic const uint8_t SS = (32 + 15); // LORA_CS   P1.15\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n// here\n/*\n * eink display pins\n */\n\n// #define PIN_EINK_EN    (-1)\n#define PIN_EINK_CS (0 + 3)     // EPD_CS\n#define PIN_EINK_BUSY (32 + 11) // EPD_BUSY\n#define PIN_EINK_DC (32 + 13)   // EPD_D/C\n#define PIN_EINK_RES (-1)       // Not used\n#define PIN_EINK_SCLK (0 + 2)   // EPD_SCLK\n#define PIN_EINK_MOSI (0 + 28)  // EPD_MOSI\n\n#define USE_EINK\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 21) // SDA\n#define PIN_WIRE_SCL (0 + 22) // SCL\n\n// E-Byte E28 2.4 Ghz LoRa module\n#define USE_SX1280\n#define LORA_RESET (0 + 5)\n#define SX128X_CS (0 + 23)\n#define SX128X_DIO1 (0 + 4)\n#define SX128X_BUSY (0 + 7)\n// #define SX128X_TXEN  (32 + 9)\n// #define SX128X_RXEN  (0 + 12)\n#define SX128X_RESET LORA_RESET\n\n#define PIN_GPS_EN (-1)\n#define PIN_GPS_PPS (-1) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (1.73F)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/MakePython_nRF52840_oled/platformio.ini",
    "content": "[env:makerpython_nrf52840_sx1280_oled]\nboard_level = extra\nextends = nrf52840_base\nboard = nordic_pca10059\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/MakePython_nRF52840_oled\n  -D PRIVATE_HW\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/MakePython_nRF52840_oled>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master\n  https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/MakePython_nRF52840_oled/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n}\n"
  },
  {
    "path": "variants/nrf52840/MakePython_nRF52840_oled/variant.h",
    "content": "#ifndef _VARIANT_MAKERPYTHON_NRF82540_OLED_\n#define _VARIANT_MAKERPYTHON_NRF82540_OLED_\n\n#define MAKERPYTHON\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (32 + 10) // LED        P1.15\n\n#define LED_GREEN PIN_LED1\n\n#define LED_STATE_ON 0 // State when LED is lit\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 (32 + 15) // P1.15 Built in button\n\n/*\n * Analog pins\n */\n#define PIN_A0 (-1)\n\nstatic const uint8_t A0 = PIN_A0;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (-1) // AREF            Not yet used\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (-1)\n#define PIN_SERIAL1_TX (-1)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (0 + 31) // MISO      P0.31\n#define PIN_SPI_MOSI (0 + 30) // MOSI      P0.30\n#define PIN_SPI_SCK (0 + 29)  // SCK       P0.29\n\nstatic const uint8_t SS = (32 + 15); // LORA_CS   P1.15\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 26) // SDA\n#define PIN_WIRE_SCL (0 + 27) // SCL\n\n// E-Byte E28 2.4 Ghz LoRa module\n#define USE_SX1280\n#define LORA_RESET (0 + 5)\n#define SX128X_CS (0 + 23)\n#define SX128X_DIO1 (0 + 4)\n#define SX128X_BUSY (0 + 7)\n// #define SX128X_TXEN  (32 + 9)\n// #define SX128X_RXEN  (0 + 12)\n#define SX128X_RESET LORA_RESET\n\n#define PIN_GPS_EN (-1)\n#define PIN_GPS_PPS (-1) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (1.73F)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/TWC_mesh_v4/platformio.ini",
    "content": "[env:TWC_mesh_v4]\nextends = nrf52840_base\nboard = nordic_pca10059\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/TWC_mesh_v4\n  -D TWC_mesh_v4\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/TWC_mesh_v4>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/TWC_mesh_v4/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(PIN_LED2, OUTPUT);\n    ledOff(PIN_LED2);\n}"
  },
  {
    "path": "variants/nrf52840/TWC_mesh_v4/variant.h",
    "content": "#ifndef _VARIANT_TWC_MESH_V4_\n#define _VARIANT_TWC_MESH_V4_\n\n#define PCA10059\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (32 + 10) // Blue LED        P1.10\n#define PIN_LED2 (32 + 15) // Built in Green  P1.15\n\n// RGB NeoPixel LED2\n// #define PIN_LED1 (0 + 8) Red\n// #define PIN_LED1 (32 + 9) Green\n// #define PIN_LED1 (0 + 12) Blue\n\n#define LED_GREEN PIN_LED1\n#define LED_BLUE PIN_LED2\n\n#define LED_STATE_ON 0 // State when LED is litted\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 2) // BTN_DN           P1.02 Built in button\n\n/*\n * Analog pins\n */\n#define PIN_A0 (0 + 29) // using VDIV (A6 / P0.29)\n\nstatic const uint8_t A0 = PIN_A0;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (-1) // AREF            Not yet used\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 24)\n#define PIN_SERIAL1_TX (0 + 25)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (0 + 15) // MISO      P0.15\n#define PIN_SPI_MOSI (0 + 13) // MOSI      P0.13\n#define PIN_SPI_SCK (0 + 14)  // SCK       P0.14\n\nstatic const uint8_t SS = (0 + 6); // LORA_CS   P0.6\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n////#define USE_EINK\n#define USE_SSD1306\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 12) // SDA     P0.12\n#define PIN_WIRE_SCL (0 + 11) // SCL     P0.11\n\n// NiceRF 868 LoRa module\n#define USE_SX1262\n#define USE_LLCC68\n\n#define SX126X_CS (0 + 6)     // LORA_CS     P0.06\n#define SX126X_DIO1 (0 + 7)   // DIO1        P0.07\n#define SX126X_BUSY (0 + 26)  // LORA_BUSY\t  P0.26\n#define SX126X_RESET (0 + 27) // LORA_RESET  P0.27\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define PIN_GPS_EN (-1)\n#define PIN_GPS_PPS (-1) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Battery\n// The battery sense is hooked to pin A6 (0.29)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (2.0F)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/canaryone/platformio.ini",
    "content": "; Public Beta oled/nrf52840/sx1262 device\n[env:canaryone]\ncustom_meshtastic_hw_model = 29\ncustom_meshtastic_hw_model_slug = CANARYONE\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Canary One\ncustom_meshtastic_tags = Canary\n\nextends = nrf52840_base\nboard = canaryone\ndebug_tool = jlink\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags =\n  ${nrf52840_base.build_flags}\n  -I variants/nrf52840/canaryone\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/canaryone>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n;upload_protocol = fs\n"
  },
  {
    "path": "variants/nrf52840/canaryone/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LEDs\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(PIN_LED2, OUTPUT);\n    ledOff(PIN_LED2);\n\n    pinMode(PIN_LED3, OUTPUT);\n    ledOff(PIN_LED3);\n\n    // Turn on power to the GPS and LoRa\n    pinMode(PIN_PWR_EN, OUTPUT);\n    digitalWrite(PIN_PWR_EN, HIGH);\n\n    // Pull the GPS out of reset\n    pinMode(GPS_RESET_PIN, OUTPUT);\n    digitalWrite(GPS_RESET_PIN, HIGH);\n\n    // Pull the LoRa out of reset\n    pinMode(LORA_RF_PWR, OUTPUT);\n    digitalWrite(LORA_RF_PWR, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/canaryone/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_CANARYONE\n#define _VARIANT_CANARYONE\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n#define CANARYONE\n\n#define GPIO_PORT0 0\n#define GPIO_PORT1 32\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (GPIO_PORT1 + 1)  // blue P1.01\n#define PIN_LED2 (GPIO_PORT0 + 14) // yellow P0.14\n#define PIN_LED3 (GPIO_PORT1 + 3)  // green P1.03\n\n#define LED_BLUE PIN_LED1\n\n#define LED_STATE_ON 0 // State when LED is lit\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (GPIO_PORT0 + 15) // BTN0 on schematic\n#define PIN_BUTTON2 (GPIO_PORT0 + 16) // BTN1 on schematic\n\n/*\n * Analog pins\n */\n#define PIN_A0 (4) // Battery ADC P0.04\n\n#define BATTERY_PIN PIN_A0\n\nstatic const uint8_t A0 = PIN_A0;\n\n#define ADC_RESOLUTION 14\n\n/**\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (GPIO_PORT0 + 26)\n// #define I2C_SDA  (GPIO_PORT0 + 26)\n#define PIN_WIRE_SCL (GPIO_PORT0 + 27)\n// #define I2C_SCL (GPIO_PORT0 + 27)\n\n#define PIN_LCD_RESET (GPIO_PORT0 + 2)\n\n/*\n * External serial flash WP25R1635FZUIL0\n */\n\n// QSPI Pins\n#define PIN_QSPI_SCK (GPIO_PORT1 + 14)\n#define PIN_QSPI_CS (GPIO_PORT1 + 15)\n#define PIN_QSPI_IO0 (GPIO_PORT1 + 12) // MOSI if using two bit interface\n#define PIN_QSPI_IO1 (GPIO_PORT1 + 13) // MISO if using two bit interface\n#define PIN_QSPI_IO2 (GPIO_PORT0 + 7)  // WP if using two bit interface (i.e. not used)\n#define PIN_QSPI_IO3 (GPIO_PORT0 + 5)  // HOLD if using two bit interface (i.e. not used)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES MX25R1635F\n#define EXTERNAL_FLASH_USE_QSPI\n\n// Add a delay on startup to allow LoRa and GPS to power up\n#define PERIPHERAL_WARMUP_MS 100\n\n/*\n * Lora radio\n */\n#define RADIOLIB_DEBUG 1\n#define USE_SX1262\n#define SX126X_CS (GPIO_PORT0 + 24)\n#define SX126X_DIO1 (GPIO_PORT1 + 11)\n// #define SX126X_DIO3 (GPIO_PORT0 + 21)\n// #define SX126X_DIO2 () // LORA_BUSY // LoRa RX/TX\n#define SX126X_BUSY (GPIO_PORT0 + 17)\n#define SX126X_RESET (GPIO_PORT0 + 25)\n#define LORA_RF_PWR (GPIO_PORT0 + 28) // LORA_RF_SWITCH\n\n/*\n * GPS pins\n */\n#define HAS_GPS 1\n#define GPS_UBLOX\n#define GPS_BAUDRATE 9600\n\n// #define PIN_GPS_WAKE (GPIO_PORT1 + 2) // An output to wake GPS, low means allow sleep, high means force wake\n// Seems to be missing on this new board\n#define PIN_GPS_PPS (GPIO_PORT1 + 4) // Pulse per second input from the GPS\n#define GPS_TX_PIN (GPIO_PORT1 + 8)  // This is for bits going TOWARDS the GPS\n#define GPS_RX_PIN (GPIO_PORT1 + 9)  // This is for bits going TOWARDS the CPU\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n#define GPS_RESET_PIN (GPIO_PORT1 + 5) // GPS reset pin\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 1\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (GPIO_PORT0 + 23)\n#define PIN_SPI_MOSI (GPIO_PORT0 + 22)\n#define PIN_SPI_SCK (GPIO_PORT0 + 19)\n\n// #define PIN_SPI1_MISO (GPIO_PORT1 + 6) // FIXME not really needed, but for now the SPI code requires something to be defined,\n//  pick an used GPIO #define PIN_SPI1_MOSI (GPIO_PORT1 + 8) #define PIN_SPI1_SCK (GPIO_PORT1 + 9)\n\n#define PIN_PWR_EN (GPIO_PORT0 + 12)\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n#define USE_SEGGER 1\n\n// #define LORA_DISABLE_SENDING 1\n#define SX126X_DIO2_AS_RF_SWITCH 1\n\n// Battery\n// The battery sense is hooked to pin A0 (4)\n// it is defined in the anlaolgue pin section of this file\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (2.0F)\n\n#define SERIAL_PRINT_PORT 0\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/cpp_overrides/lfs_util.h",
    "content": "/*\n * lfs utility functions\n *\n * Copyright (c) 2017, Arm Limited. All rights reserved.\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n// MESHTASTIC/@geeksville note: This file is copied from the Adafruit nrf52 arduino lib.  And we use a special -include in\n// nrf52.ini to load it before EVERY file we do this hack because the default definitions for LFS_ASSERT are quite poor and we\n// don't want to fork the adafruit lib (again) and send in a PR that they probably won't merge anyways. This file might break if\n// they ever update lfs.util on their side, in which case we'll need to update this file to match their new version. The version\n// this is a copy from is almost exactly\n// https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/c25d93268a3b9c23e9a1ccfcaf9b208beca624ca/libraries/Adafruit_LittleFS/src/littlefs/lfs_util.h\n\n#ifndef LFS_UTIL_H\n#define LFS_UTIL_H\n\n// Users can override lfs_util.h with their own configuration by defining\n// LFS_CONFIG as a header file to include (-DLFS_CONFIG=lfs_config.h).\n//\n// If LFS_CONFIG is used, none of the default utils will be emitted and must be\n// provided by the config file. To start I would suggest copying lfs_util.h and\n// modifying as needed.\n#ifdef LFS_CONFIG\n#define LFS_STRINGIZE(x) LFS_STRINGIZE2(x)\n#define LFS_STRINGIZE2(x) #x\n#include LFS_STRINGIZE(LFS_CONFIG)\n#else\n\n// System includes\n#include <stdbool.h>\n#include <stdint.h>\n#include <string.h>\n\n#ifndef LFS_NO_MALLOC\n#include <stdlib.h>\n#endif\n#ifndef LFS_NO_ASSERT\n#include <assert.h>\n#endif\n\n#if !defined(LFS_NO_DEBUG) || !defined(LFS_NO_WARN) || !defined(LFS_NO_ERROR)\n#include <stdio.h>\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// Macros, may be replaced by system specific wrappers. Arguments to these\n// macros must not have side-effects as the macros can be removed for a smaller\n// code footprint\n\n// Logging functions\n#ifndef LFS_NO_DEBUG\n\nvoid logLegacy(const char *level, const char *fmt, ...);\n#define LFS_DEBUG(fmt, ...) logLegacy(\"DEBUG\", \"lfs debug:%d: \" fmt \"\\n\", __LINE__, __VA_ARGS__)\n#else\n#define LFS_DEBUG(fmt, ...)\n#endif\n\n#ifndef LFS_NO_WARN\n#define LFS_WARN(fmt, ...) logLegacy(\"WARN\", \"lfs warn:%d: \" fmt \"\\n\", __LINE__, __VA_ARGS__)\n#else\n#define LFS_WARN(fmt, ...)\n#endif\n\n#ifndef LFS_NO_ERROR\n#define LFS_ERROR(fmt, ...) logLegacy(\"ERROR\", \"lfs error:%d: \" fmt \"\\n\", __LINE__, __VA_ARGS__)\n#else\n#define LFS_ERROR(fmt, ...)\n#endif\n\n// Runtime assertions\n#ifndef LFS_NO_ASSERT\n#define LFS_ASSERT(test) assert(test)\n#else\nextern void lfs_assert(const char *reason);\n#define LFS_ASSERT(test)                                                                                                         \\\n    if (!(test))                                                                                                                 \\\n    lfs_assert(#test)\n#endif\n\n// Builtin functions, these may be replaced by more efficient\n// toolchain-specific implementations. LFS_NO_INTRINSICS falls back to a more\n// expensive basic C implementation for debugging purposes\n\n// Min/max functions for unsigned 32-bit numbers\nstatic inline uint32_t lfs_max(uint32_t a, uint32_t b)\n{\n    return (a > b) ? a : b;\n}\n\nstatic inline uint32_t lfs_min(uint32_t a, uint32_t b)\n{\n    return (a < b) ? a : b;\n}\n\n// Find the next smallest power of 2 less than or equal to a\nstatic inline uint32_t lfs_npw2(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM))\n    return 32 - __builtin_clz(a - 1);\n#else\n    uint32_t r = 0;\n    uint32_t s;\n    a -= 1;\n    s = (a > 0xffff) << 4;\n    a >>= s;\n    r |= s;\n    s = (a > 0xff) << 3;\n    a >>= s;\n    r |= s;\n    s = (a > 0xf) << 2;\n    a >>= s;\n    r |= s;\n    s = (a > 0x3) << 1;\n    a >>= s;\n    r |= s;\n    return (r | (a >> 1)) + 1;\n#endif\n}\n\n// Count the number of trailing binary zeros in a\n// lfs_ctz(0) may be undefined\nstatic inline uint32_t lfs_ctz(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && defined(__GNUC__)\n    return __builtin_ctz(a);\n#else\n    return lfs_npw2((a & -a) + 1) - 1;\n#endif\n}\n\n// Count the number of binary ones in a\nstatic inline uint32_t lfs_popc(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && (defined(__GNUC__) || defined(__CC_ARM))\n    return __builtin_popcount(a);\n#else\n    a = a - ((a >> 1) & 0x55555555);\n    a = (a & 0x33333333) + ((a >> 2) & 0x33333333);\n    return (((a + (a >> 4)) & 0xf0f0f0f) * 0x1010101) >> 24;\n#endif\n}\n\n// Find the sequence comparison of a and b, this is the distance\n// between a and b ignoring overflow\nstatic inline int lfs_scmp(uint32_t a, uint32_t b)\n{\n    return (int)(unsigned)(a - b);\n}\n\n// Convert from 32-bit little-endian to native order\nstatic inline uint32_t lfs_fromle32(uint32_t a)\n{\n#if !defined(LFS_NO_INTRINSICS) && ((defined(BYTE_ORDER) && BYTE_ORDER == ORDER_LITTLE_ENDIAN) ||                                \\\n                                    (defined(__BYTE_ORDER) && __BYTE_ORDER == __ORDER_LITTLE_ENDIAN) ||                          \\\n                                    (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))\n    return a;\n#elif !defined(LFS_NO_INTRINSICS) &&                                                                                             \\\n    ((defined(BYTE_ORDER) && BYTE_ORDER == ORDER_BIG_ENDIAN) || (defined(__BYTE_ORDER) && __BYTE_ORDER == __ORDER_BIG_ENDIAN) || \\\n     (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))\n    return __builtin_bswap32(a);\n#else\n    return (((uint8_t *)&a)[0] << 0) | (((uint8_t *)&a)[1] << 8) | (((uint8_t *)&a)[2] << 16) | (((uint8_t *)&a)[3] << 24);\n#endif\n}\n\n// Convert to 32-bit little-endian from native order\nstatic inline uint32_t lfs_tole32(uint32_t a)\n{\n    return lfs_fromle32(a);\n}\n\n// Calculate CRC-32 with polynomial = 0x04c11db7\nvoid lfs_crc(uint32_t *crc, const void *buffer, size_t size);\n\n// Allocate memory, only used if buffers are not provided to littlefs\nstatic inline void *lfs_malloc(size_t size)\n{\n#ifndef LFS_NO_MALLOC\n    extern void *pvPortMalloc(size_t xWantedSize);\n    return pvPortMalloc(size);\n#else\n    (void)size;\n    return NULL;\n#endif\n}\n\n// Deallocate memory, only used if buffers are not provided to littlefs\nstatic inline void lfs_free(void *p)\n{\n#ifndef LFS_NO_MALLOC\n    extern void vPortFree(void *pv);\n    vPortFree(p);\n#else\n    (void)p;\n#endif\n}\n\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif\n\n#endif\n#endif"
  },
  {
    "path": "variants/nrf52840/diy/WashTastic/platformio.ini",
    "content": "; Promicro + E22900M30S\n[env:WashTastic]\nextends = nrf52840_base\nboard = promicro-nrf52840\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/diy/nrf52_promicro_diy_tcxo\n  -D PRIVATE_HW\n  -D EBYTE_E22_900M30S\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/diy/nrf52_promicro_diy_tcxo>\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/diy/nrf52_promicro_diy_tcxo/custom_build_tasks.py",
    "content": "# Simplifies DIY InkHUD builds, with presets for several common E-Ink displays\n# - build using custom task in Platformio's \"Project Tasks\" panel\n# - build with `pio run -e <variant> -t build_weact_154` (or similar)\n\n# Silence trunk's objections to the import statements\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821)\n\nfrom SCons.Script import COMMAND_LINE_TARGETS\n\nImport(\"env\")\nImport(\"projenv\")\n\n# Custom targets\n# These wrappers just run the normal build task under a different target name\n# We intercept the build later on, based on the target name\nenv.AddTarget(\n    name=\"build_weact_154\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 1.54\")',\n)\nenv.AddTarget(\n    name=\"build_weact_213\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 2.13\")',\n)\nenv.AddTarget(\n    name=\"build_weact_290\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 2.9\")',\n)\nenv.AddTarget(\n    name=\"build_weact_420\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 4.2\")',\n)\n\n# Check whether a build was started via one of our custom targets above\n\nif \"build_weact_154\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 1.54\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"ZJY200200_0154DAAMFGN\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"15\"))\n\nelif \"build_weact_213\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 2.13\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"HINK_E0213A289\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"10\"))\n\nelif \"build_weact_290\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 2.9\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"ZJY128296_029EAAMFGN\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"15\"))\n\nelif \"build_weact_420\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 4.2\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"HINK_E042A87\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"15\"))\n"
  },
  {
    "path": "variants/nrf52840/diy/nrf52_promicro_diy_tcxo/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/HINK_E0213A289.h\"        // WeAct 2.13\"\n#include \"graphics/niche/Drivers/EInk/HINK_E042A87.h\"          // WeAct 4.2\"\n#include \"graphics/niche/Drivers/EInk/ZJY128296_029EAAMFGN.h\"  // WeAct 2.9\"\n#include \"graphics/niche/Drivers/EInk/ZJY200200_0154DAAMFGN.h\" // WeACt 1.54\"\n\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\n#if !defined(INKHUD_BUILDCONF_DRIVER) || !defined(INKHUD_BUILDCONF_DISPLAYRESILIENCE)\n#error If not using a DIY preset, display model and resilience must be set manually\n#endif\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n    SPI.begin();\n\n    // Driver\n    // -----------------------------\n\n    // Use E-Ink driver\n    Drivers::EInk *driver = new Drivers::INKHUD_BUILDCONF_DRIVER;\n    driver->begin(&SPI, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update.\n    inkhud->setDisplayResilience(INKHUD_BUILDCONF_DISPLAYRESILIENCE); // Suggest roughly ten\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Init settings, and customize defaults\n    // Values ignored individually if found saved to flash\n    inkhud->persistence->settings.rotation = (driver->height > driver->width ? 1 : 0); // Rotate 90deg to landscape, if needed\n    inkhud->persistence->settings.userTiles.maxCount = 4;\n    inkhud->persistence->settings.optionalFeatures.batteryIcon = true;\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet);\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet, true, false, 3);                       // Default on tile 3\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0), true, false, 2); // Default on tile 2\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true, false, 1); // Default on tile 1\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet, true, false, 0); // Default on tile 0\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true);                        // Background\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // Setup the main user button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin(), true); // Internal pull up\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/diy/nrf52_promicro_diy_tcxo/platformio.ini",
    "content": "; Promicro + E22(0)-xxxM / HT-RA62 modules board variant - DIY - with TCXO\n[env:nrf52_promicro_diy_tcxo]\ncustom_meshtastic_hw_model = 63\ncustom_meshtastic_hw_model_slug = NRF52_PROMICRO_DIY\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = NRF52 Pro-micro DIY\ncustom_meshtastic_images = promicro.svg\ncustom_meshtastic_tags = DIY\ncustom_meshtastic_requires_dfu = true\n\nextends = nrf52840_base\nboard = promicro-nrf52840\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/diy/nrf52_promicro_diy_tcxo\n  -D NRF52_PROMICRO_DIY\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/diy/nrf52_promicro_diy_tcxo>\ndebug_tool = jlink\n\n; NRF52 ProMicro w/ E-Ink display\n[env:nrf52_promicro_diy-inkhud]\nboard_level = extra\nextends = nrf52840_base, inkhud\nboard = promicro-nrf52840\nbuild_flags =\n  ${nrf52840_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/nrf52840/diy/nrf52_promicro_diy_tcxo\n  -D NRF52_PROMICRO_DIY\nbuild_src_filter =\n  ${nrf52_base.build_src_filter}\n  ${inkhud.build_src_filter}\n  +<../variants/nrf52840/diy/nrf52_promicro_diy_tcxo>\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${nrf52840_base.lib_deps}\nextra_scripts =\n  ${nrf52840_base.extra_scripts}\n  variants/nrf52840/diy/nrf52_promicro_diy_tcxo/custom_build_tasks.py ; Add to PIO's Project Tasks pane: preset builds for common displays\n"
  },
  {
    "path": "variants/nrf52840/diy/nrf52_promicro_diy_tcxo/readme.md",
    "content": "<!-- trunk-ignore-all(markdownlint/MD059) -->\n\n# Notes\n\nNews 2025-12-04 - The GPS pin definitions have been changed!!! This has no material effect on current builds, but future builders may wish to review how they are using the wires.\n\n## General\n\nThe pinout is contained in the variant.h file, and a [generic schematic](./Schematic_Pro-Micro_Pinouts_2025-12-04.pdf) is located in this directory.\n\nThis variant is suitable for both TCXO and XTAL types of modules. The old XTAL variant has been removed to reduce confusion.\n\n### Note on DIO2, RXEN, TXEN, and RF switching\n\nSeveral modules require external switching between transmit (Tx) and receive (Rx). This can be achieved using several methods:\n\n1. Link the TXEN pin on the radio module to DIO2 on the same module, and then connect RXEN on the radio module to pin 0.17 on the Pro-Micro.\n2. Use DIO2 to drive a logic inverter, so that when DIO2 is `high`, RXEN is `low`, and vice versa.\n3. Use DIO2 to drive a pair of MOSFETs or transistors to supply the same function.\n\nRXEN is not required to be connected if the selected module already has internal RF switching, or if external RF switching logic is already applied.\nAlso worth noting that the Seeed WIO SX1262 in particular only has RXEN exposed (marked RF_SW) and has the DIO2-TXEN link internally.\n\n## Making a node based on this variant\n\nMaking your own node based on this design is straightforward. There are various open source and free to use PCB design files available, or you can solder wires directly from a module to the pro-micro.\n\n<details>\n\n<summary> < Click to expand > The table of known modules is at the bottom of the variant.h, and reproduced here for convenience. </summary>\n\n| Mfr          | Module           | TCXO | RF Switch | Notes                                 |\n| ------------ | ---------------- | ---- | --------- | ------------------------------------- |\n| Ebyte        | E22-900M22S      | Yes  | Ext       |                                       |\n| Ebyte        | E22-900MM22S     | No   | Ext       |                                       |\n| Ebyte        | E22-900M30S      | Yes  | Ext       |                                       |\n| Ebyte        | E22-900M33S      | Yes  | Ext       | MAX_POWER must be set to 8 for this   |\n| Ebyte        | E220-900M22S     | No   | Ext       | LLCC68, looks like DIO3 not connected |\n| AI-Thinker   | RA-01SH          | No   | Int       | SX1262                                |\n| Heltec       | HT-RA62          | Yes  | Int       |                                       |\n| NiceRF       | Lora1262         | yes  | Int       |                                       |\n| Waveshare    | Core1262-HF      | yes  | Ext       |                                       |\n| Waveshare    | LoRa Node Module | yes  | Int       |                                       |\n| Seeed        | Wio-SX1262       | yes  | Ext       | Cute! DIO2/TXEN are not exposed       |\n| Seeed        | Wio-LR1121       | yes  | Int       | LR1121, needs alternate rfswitch.h    |\n| AI-Thinker   | RA-02            | No   | Int       | SX1278 **433mhz band only**           |\n| RF Solutions | RFM95            | No   | Int       | Untested                              |\n| Ebyte        | E80-900M2213S    | Yes  | Int       | LR1121 radio                          |\n\n</details>\n\n## LR1121 modules - E80 is the default\n\nThe E80 from CDEbyte is the most obtainable module at present, and has been selected as the default option.\n\nNaturally, CDEbyte have chosen to ignore the generic Semtech implementation of the RF switching logic and have supplied confusing and contradictory documentation, which is explained below.\n\ntl;dr: The E80 is chosen as the default. **If you wish to use another module, the table in `rfswitch.h` must be adjusted accordingly.**\n\n### E80 switching - the saga\n\nThe CDEbyte implementation of the LR1121 is contained in their E80 module. As stated above, CDEbyte have chosen to ignore the generic Semtech implementation of the RF switching logic and have their own table, which is located at the bottom of the page [here](https://www.cdebyte.com/products/E80-900M2213S/2#Pin), and reflected on page 6 of their user manual, and reproduced below:\n\n| DIO5/RFSW0 | DIO6/RFSW1 | RF status                     |\n| ---------- | ---------- | ----------------------------- |\n| 0          | 0          | RX                            |\n| 0          | 1          | TX (Sub-1GHz low power mode)  |\n| 1          | 0          | TX (Sub-1GHz high power mode) |\n| 1          | 1          | TX（2.4GHz）                  |\n\nHowever, looking at the sample code they provide on page 9, the values would be:\n\n| DIO5/RFSW0 | DIO6/RFSW1 | RF status                     |\n| ---------- | ---------- | ----------------------------- |\n| 0          | 1          | RX                            |\n| 1          | 1          | TX (Sub-1GHz low power mode)  |\n| 1          | 0          | TX (Sub-1GHz high power mode) |\n| 0          | 0          | TX（2.4GHz）                  |\n\nThe Semtech default, the values are (taken from [here](https://github.com/Lora-net/SWSD006/blob/v2.6.1/lib/app_subGHz_config_lr11xx.c#L145-L154)):\n\n<details>\n\n<summary> < Click to expand >\n\t\n</summary>\n\n```cpp\n\t.rfswitch = {\n\t\t.enable = LR11XX_SYSTEM_RFSW0_HIGH | LR11XX_SYSTEM_RFSW1_HIGH | LR11XX_SYSTEM_RFSW2_HIGH,\n\t\t.standby = 0,\n\t\t.rx = LR11XX_SYSTEM_RFSW0_HIGH,\n\t\t.tx = LR11XX_SYSTEM_RFSW0_HIGH | LR11XX_SYSTEM_RFSW1_HIGH,\n\t\t.tx_hp = LR11XX_SYSTEM_RFSW1_HIGH,\n\t\t.tx_hf = 0,\n\t\t.gnss = LR11XX_SYSTEM_RFSW2_HIGH,\n\t\t.wifi = 0,\n\t},\n```\n\n</details>\n\n| DIO5/RFSW0 | DIO6/RFSW1 | RF status                     |\n| ---------- | ---------- | ----------------------------- |\n| 1          | 0          | RX                            |\n| 1          | 1          | TX (Sub-1GHz low power mode)  |\n| 0          | 1          | TX (Sub-1GHz high power mode) |\n| 0          | 0          | TX（2.4GHz）                  |\n\nIt is evident from the tables above that there is no real consistency to those provided by Ebyte.\n\n#### An experiment\n\nTests were conducted in each of the three configurations between a known-good SX1262 and an E80, passing packets in both directions and recording the reported RSSI. The E80 was set at 22db and 14db to activate the high and low power settings respectively. The results are shown in the chart below.\n\n![Chart showing RSSI readings in each configuration and setting](./E80_RSSI_per_case.webp)\n\n## Conclusion\n\nThe RF switching is based on the code example given. Logically, this shows the DIO5 and DIO6 are swapped compared to the reference design.\n\nIf future DIYers wish to use an alternative module, the table in `rfswitch.h` must be adjusted accordingly.\n"
  },
  {
    "path": "variants/nrf52840/diy/nrf52_promicro_diy_tcxo/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\n// This is rewritten to match the requirements of the E80-900M2213S\n// The E80 does not conform to the reference Semtech switches(!) and therefore needs a custom matrix.\n// See footnote #3 in \"https://www.cdebyte.com/products/E80-900M2213S/2#Pin\"\n// RF Switch Matrix SubG RFO_HP_LF / RFO_LP_LF / RFI_[NP]_LF0\n// DIO5 -> RFSW0_V1\n// DIO6 -> RFSW1_V2\n// DIO7 -> not connected on E80 module - note that GNSS and Wifi scanning are not possible.\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC,\n                                             RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6  DIO7\n    {LR11x0::MODE_STBY, {LOW, LOW, LOW}},  {LR11x0::MODE_RX, {LOW, HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH, LOW}},  {LR11x0::MODE_TX_HP, {HIGH, LOW, LOW}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH}},\n    {LR11x0::MODE_WIFI, {LOW, LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n\nvoid variant_shutdown()\n{\n    nrf_gpio_cfg_input(BUTTON_PIN, NRF_GPIO_PIN_PULLUP); // Enable internal pull-up on the button pin\n    nrf_gpio_pin_sense_t sense = NRF_GPIO_PIN_SENSE_LOW; // Configure SENSE signal on low edge\n    nrf_gpio_cfg_sense_set(BUTTON_PIN, sense);           // Apply SENSE to wake up the device from the deep sleep\n}\n"
  },
  {
    "path": "variants/nrf52840/diy/nrf52_promicro_diy_tcxo/variant.h",
    "content": "#ifndef _VARIANT_PROMICRO_DIY_\n#define _VARIANT_PROMICRO_DIY_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n// #define USE_LFXO // Board uses 32khz crystal for LF\n#define USE_LFRC // Board uses RC for LF\n\n#define PROMICRO_DIY_TCXO\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n/*\nNRF52 PRO MICRO PIN ASSIGNMENT\n\n| Pin   | Function    |     | Pin      | Function     | RF95  |\n| ----- | ----------- | --- | -------- | ------------ | ----- |\n| Gnd   |             |     | vbat     |              |       |\n| P0.06 | Serial2 RX  |     | vbat     |              |       |\n| P0.08 | Serial2 TX  |     | Gnd      |              |       |\n| Gnd   |             |     | reset    |              |       |\n| Gnd   |             |     | ext_vcc  | *see 0.13    |       |\n| P0.17 | RXEN        |     | P0.31    | BATTERY_PIN  |       |\n| P0.20 | GPS_TX      |     | P0.29    | BUSY         | DIO0  |\n| P0.22 | GPS_RX      |     | P0.02    | MISO         | MISO  |\n| P0.24 | GPS_EN      |     | P1.15    | MOSI         | MOSI  |\n| P1.00 | BUTTON_PIN  |     | P1.13    | CS           | CS    |\n| P0.11 | SCL         |     | P1.11    | SCK          | SCK   |\n| P1.04 | SDA         |     | P0.10    | DIO1/IRQ     | DIO1  |\n| P1.06 | Free pin    |     | P0.09    | RESET        | RST   |\n|       |             |     |          |              |       |\n|       | Mid board   |     |          | Internal     |       |\n| P1.01 | Free pin    |     | 0.15     | LED          |       |\n| P1.02 | Free pin    |     | 0.13     | 3V3_EN       |       |\n| P1.07 | Free pin    |     |          |              |       |\n*/\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// Pin 13 enables 3.3V periphery. If the Lora module is on this pin, then it should stay enabled at all times.\n#define PIN_3V3_EN (0 + 13) // P0.13\n\n// Analog pins\n#define BATTERY_PIN (0 + 31) // P0.31 Battery ADC\n#define ADC_CHANNEL ADC1_GPIO4_CHANNEL\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096\n#define VBAT_MV_PER_LSB (0.73242188F)\n// Voltage divider value => 1.5M + 1M voltage divider on VBAT = (1.5M / (1M + 1.5M))\n#define VBAT_DIVIDER (0.6F)\n// Compensation factor for the VBAT divider\n#define VBAT_DIVIDER_COMP (1.73)\n// Fixed calculation of milliVolt from compensation value\n#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB)\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER VBAT_DIVIDER_COMP // REAL_VBAT_MV_PER_LSB\n#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x)\n\n// WIRE IC AND IIC PINS\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (32 + 4) // P1.04\n#define PIN_WIRE_SCL (0 + 11) // P0.11\n\n// LED\n#define PIN_LED1 (0 + 15) // P0.15\n// Actually red\n#define LED_BLUE PIN_LED1\n#define LED_STATE_ON 1 // State when LED is lit\n\n// Button\n#define BUTTON_PIN (32 + 0) // P1.00\n\n// GPS\n#define GPS_TX_PIN (0 + 20) // P0.20 - This is data from the MCU\n#define GPS_RX_PIN (0 + 22) // P0.22 - This is data from the GNSS\n\n#define PIN_GPS_EN (0 + 24) // P0.24\n#define GPS_UBLOX\n// define GPS_DEBUG\n\n// UART interfaces\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n\n#define PIN_SERIAL2_RX (0 + 6) // P0.06\n#define PIN_SERIAL2_TX (0 + 8) // P0.08\n\n// Serial interfaces\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (0 + 2)   // P0.02\n#define PIN_SPI_MOSI (32 + 15) // P1.15\n#define PIN_SPI_SCK (32 + 11)  // P1.11\n\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_CS (32 + 13) // P1.13\n\n// LORA MODULES\n#define USE_LLCC68\n#define USE_SX1262\n#define USE_RF95\n#define USE_SX1268\n#define USE_LR1121\n\n// RF95 CONFIG\n\n#define LORA_DIO0 (0 + 29) // P0.29 BUSY\n#define LORA_DIO1 (0 + 10) // P0.10 IRQ\n#define LORA_RESET (0 + 9) // P0.09 NRST\n\n// RX/TX for RFM95/SX127x\n#define RF95_RXEN (0 + 17)    // P0.17\n#define RF95_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin. If not, TXEN must be connected.\n\n// SX126X CONFIG\n#define SX126X_CS (32 + 13)      // P1.13 FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 (0 + 10)     // P0.10 IRQ\n#define SX126X_DIO2_AS_RF_SWITCH // Note for E22 modules: DIO2 is not attached internally to TXEN for automatic TX/RX switching,\n                                 // so it needs connecting externally if it is used in this way\n#define SX126X_BUSY (0 + 29)     // P0.29\n#define SX126X_RESET (0 + 9)     // P0.09\n#define SX126X_RXEN (0 + 17)     // P0.17\n#define SX126X_TXEN RADIOLIB_NC  // Assuming that DIO2 is connected to TXEN pin. If not, TXEN must be connected.\n\n// LR1121\n#ifdef USE_LR1121\n#define LR1121_IRQ_PIN (0 + 10)      // P0.10 IRQ\n#define LR1121_NRESET_PIN LORA_RESET // P0.09 NRST\n#define LR1121_BUSY_PIN (0 + 29)     // P0.29 BUSY\n#define LR1121_SPI_NSS_PIN LORA_CS   // P1.13\n#define LR1121_SPI_SCK_PIN LORA_SCK\n#define LR1121_SPI_MOSI_PIN LORA_MOSI\n#define LR1121_SPI_MISO_PIN LORA_MISO\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.8\n#define LR11X0_DIO_AS_RF_SWITCH\n#endif\n\n// #define SX126X_MAX_POWER 8 set this if using a high-power board!\n\n/*\nOn the SX1262, DIO3 sets the voltage for an external TCXO, if one is present. If one is not present, use TCXO_OPTIONAL to try both\nsettings.\n\n| Mfr          | Module           | TCXO | RF Switch | Notes                                 |\n| ------------ | ---------------- | ---- | --------- | ------------------------------------- |\n| Ebyte        | E22-900M22S      | Yes  | Ext       |                                       |\n| Ebyte        | E22-900MM22S     | No   | Ext       |                                       |\n| Ebyte        | E22-900M30S      | Yes  | Ext       |                                       |\n| Ebyte        | E22-900M33S      | Yes  | Ext       | MAX_POWER must be set to 8 for this   |\n| Ebyte        | E220-900M22S     | No   | Ext       | LLCC68, looks like DIO3 not connected |\n| AI-Thinker   | RA-01SH          | No   | Int       | SX1262                                |\n| Heltec       | HT-RA62          | Yes  | Int       |                                       |\n| NiceRF       | Lora1262         | yes  | Int       |                                       |\n| Waveshare    | Core1262-HF      | yes  | Ext       |                                       |\n| Waveshare    | LoRa Node Module | yes  | Int       |                                       |\n| Seeed        | Wio-SX1262       | yes  | Ext       | Cute! DIO2/TXEN are not exposed       |\n| Seeed        | Wio-LR1121       | yes  | Int       | LR1121, needs alternate rfswitch.h    |\n| AI-Thinker   | RA-02            | No   | Int       | SX1278 **433mhz band only**           |\n| RF Solutions | RFM95            | No   | Int       | Untested                              |\n| Ebyte        | E80-900M2213S    | Yes  | Int       | LR1121 radio                          |\n\n*/\n\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL\n\n// E-Ink DIY\n#define PIN_EINK_CS (32 + 7)\n#define PIN_EINK_DC (32 + 2)\n#define PIN_EINK_RES (32 + 1)\n#define PIN_EINK_BUSY (32 + 6)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/diy/seeed-xiao-nrf52840-wio-sx1262/README.md",
    "content": "# XIAO nRF52840 + XIAO Wio SX1262\n\nFor a mere doubling in price you too can swap out the XIAO ESP32S3 for a XIAO nRF52840, stack the Wio SX1262 radio board either above or underneath the nRF52840, solder the pins, and achieve a massive improvement in battery life!\n\nI'm not really sure why else you would want to as the ESP32S3 is perfectly cromulent, easily connects to the Wio SX1262 via the B2B connector and has an onboard IPEX connector for the included Bluetooth antenna. So you'll also lose BT range, but you will also have working ADC for the battery in Meshtastic and also have an ESP32S3 to use for something else!\n\nIf you're still reading you are clearly gonna do it anyway, so...mount the Wio SX1262 either on top or underneath depending on your preference. The `variant.h` will work with either configuration though it does map the Wio SX1262's button to nRF52840 Pin `D5` as it can still be used as a user button and it's nice to be able to gracefully shutdown a node by holding it down for 5 seconds.\n\nIf you do decide to wire up the button, orient it so looking straight-down at the Wio SX1262 the radio chip is at the bottom, button in the middle and the hole is at the top - the **left** side of the button should be soldered to `GND` (e.g. the 2nd pin down the top on the **right** row of pins) and the **right** side of the button should be soldered to `D5` (e.g. the 2nd pin up from the button on the **left** row of pins.). This mirrors the original wiring and wiring it in reverse could end up connecting GND to voltage and that's no beuno.\n\nSerial Pins remain available on `D6` (TX) and `D7` (RX) should you want to use them, and I2C has been mapped to NFC1 (SDA, D30) and NFC2 (SCL, D31)\n\nThe same pins could be reordered if you would like to have a different arrangement, in `variant.h` you would just need to change the relevant lines:\n\n```cpp\n#define GPS_TX_PIN D6 // This is data from the MCU\n#define GPS_RX_PIN D7 // This is data from the GNSS module\n\n#define PIN_WIRE_SDA D6\n#define PIN_WIRE_SCL D7\n```\n"
  },
  {
    "path": "variants/nrf52840/diy/seeed-xiao-nrf52840-wio-sx1262/platformio.ini",
    "content": "; Seeed Xiao BLE but using the B2B from ESP32S3 variant\n[env:seeed_xiao_nrf52840_btb]\nextends = env:seeed_xiao_nrf52840_kit\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/seeed_xiao_nrf52840_kit\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DPRIVATE_HW                 ; Define private hardware\n  -DSEEED_XIAO_NRF_WIO_BTB     ; Define Seeed XIAO nRF Wio B2B\n  -USEEED_XIAO_NRF52840_KIT    ; Remove default HWID\n  -USEEED_XIAO_NRF_KIT_DEFAULT ; Remove default define\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_xiao_nrf52840_kit>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink"
  },
  {
    "path": "variants/nrf52840/diy/seeed_xiao_nrf52840_e22/platformio.ini",
    "content": "; Seeed XIAO nRF52840 + EBYTE E22-900M30S - Pinout matching Wio-SX1262 (SKU 113010003)\n[env:seeed_xiao_nrf52840_e22_900m30s]\nextends = env:seeed_xiao_nrf52840_kit\nboard_level = extra\nbuild_flags = ${env:seeed_xiao_nrf52840_kit.build_flags}\n  -D PRIVATE_HW\n  -DEBYTE_E22\n  -DEBYTE_E22_900M30S\n  -USEEED_XIAO_NRF52840_KIT    ; remove default HWID\n  -USEEED_XIAO_NRF_KIT_DEFAULT ; remove default define\n\n; Seeed XIAO nRF52840 + EBYTE E22-900M33S - Pinout matching Wio-SX1262 (SKU 113010003)\n[env:seeed_xiao_nrf52840_e22_900m33s]\nextends = env:seeed_xiao_nrf52840_kit\nboard_level = extra\nbuild_flags = ${env:seeed_xiao_nrf52840_kit.build_flags}\n  -D PRIVATE_HW\n  -DEBYTE_E22\n  -DEBYTE_E22_900M33S\n  -USEEED_XIAO_NRF52840_KIT    ; remove default HWID\n  -USEEED_XIAO_NRF_KIT_DEFAULT ; remove default define"
  },
  {
    "path": "variants/nrf52840/diy/xiao_ble/README.md",
    "content": "# XIAO nrf52840/nrf52840 Sense + Ebyte E22-900M30S\n\n_A step-by-step guide for macOS and Linux._\n\n## Introduction\n\nThis guide will walk you through everything needed to get the XIAO nrf52840 (or XIAO nrf52840 Sense) running Meshtastic using an Ebyte E22-900M30S LoRa module. The combination of the E22 with an nRF52840 MCU is desirable because it allows for both very low idle (Rx) power draw _and_ high transmit power.\n\nThe XIAO nrf52840 is a small but surprisingly well-appointed nRF52840 board, with enough GPIO for most Meshtastic applications and a built-in LiPo charger.\n\nThe E22, on the other hand, is a famously inscrutable and mysterious beast. It is one of the more readily available LoRa modules capable of transmitting at 30 dBm, and includes an LNA to boost its Rx sensitivity a few dB beyond that of the SX1262.\n\nHowever, its documentation is relatively sparse overall, and seems to merely hint at (or completely omit) several key details regarding its functionality. Thus, much of what follows is a synthesis of my observations and inferences over the course of many hours of trial and error.\n\n### Acknowledgement and Friendly Disclaimer\n\nHuge thanks to those in the community who have forged the way with the E22, without whose hard work none of this would have been possible! (thebentern, riddick, rainer_vie, beegee-tokyo, geeksville, caveman99, Der_Bear, PlumRugOfDoom, BigCorvus, and many others.)\n\nPlease take the conclusions here as a tentative work in progress, representing my current (and fairly limited) understanding of the E22 when paired with this particular MCU. It is my hope that this guide will be helpful to others who are interested in trying a DIY Meshtastic build, and also be subject to revision by folks with more experience and better test equipment.\n\n### Obligatory Liability Disclaimer\n\nThis guide and all associated content is for informational purposes only. The information presented is intended for consumption only by persons having appropriate technical skill and judgement, to be used entirely at their own discretion and risk. The authors of this guide in no way provide any warranty, express or implied, toward the content herein, nor its correctness, safety, or suitability to any particular purpose. By following the instructions in this guide in part or in full, you assume all responsibility for all potential risks, including but not limited to fire, property damage, bodily injury, and death.\n\n## 1. Wire the board\n\nConnecting the E22 to the XIAO nrf52840 is straightforward, but there are a few gotchas to be mindful of.\n\n### On the XIAO nrf52840\n\n- Pins D4 and D5 are currently mapped to `PIN_WIRE_SDA` and `PIN_WIRE_SCL`, respectively. If you are not using I²C and would like to free up pins D4 and D5 for use as GPIO, `PIN_WIRE_SDA` and `PIN_WIRE_SCL` can be reassigned to any two other unused pin numbers.\n- Pins D6 and D7 were originally mapped to the TX and RX pins for serial interface 1 (`PIN_SERIAL1_RX` and `PIN_SERIAL1_TX`) but are currently set to -1 in `variant.h`. If you need to expose a serial interface, you can restore these pins and move e.g. `SX126X_RXEN` to pin 4 or 5 (the opposite should work too).\n\n### On the E22\n\n- There are two options for the E22's `TXEN` pin:\n  1. It can be connected to the MCU on the pin defined as `SX126X_TXEN` in `variant.h`. In this configuration, the MCU will control Tx/Rx switching \"manually\". As long as `SX126X_TXEN` and `SX126X_RXEN` are both defined in `variant.h` (and neither is set to `RADIOLIB_NC`), `SX126xInterface.cpp` will initialize the E22 correctly for this mode.\n  2. Alternately, it can be connected to the E22's `DIO2` pin only, with neither `TXEN` nor `DIO2` being connected to the MCU. In this configuration, the E22 will control Tx/Rx switching automatically. In `variant.h`, as long as `SX126X_TXEN` is defined as `RADIOLIB_NC`, and `SX126X_RXEN` is defined and connected to the E22's `RXEN` pin, and `E22_TXEN_CONNECTED_TO_DIO2` is defined, `SX126xInterface.cpp` will initialize the E22 correctly for this mode. This configuration frees up a GPIO, and presents no drawbacks that I have found.\n- Note that any combination other than the two described above will likely result in unexpected behavior. In my testing, some of these other configurations appeared to \"work\" at first glance, but every one I tried had at least one of the following flaws: weak Tx power, extremely poor Rx sensitivity, or the E22 overheating because TXEN was never pulled low, causing its PA to stay on indefinitely.\n- Along the same lines, it is a good idea to check the E22's temperature frequently by lightly touching the shield. If you feel the shield getting hot (i.e. approaching uncomfortable to touch) near pins 1, 2, and 3, something is probably misconfigured; disconnect both the XIAO nrf52840 and E22 from power and double check wiring and pin mapping.\n- Whether you opt to let the E22 control Rx and Tx or handle this manually, **the E22's `RXEN` pin must always be connected to the MCU** on the pin defined as `SX126X_RXEN` in `variant.h`.\n\n#### Note\n\nThe default pin mapping in `variant.h` uses \"Automatic Tx/Rx switching\" mode.\n\nIf you wire your board for Manual Tx/Rx Switching Mode, `SX126X_TXEN` must be defined (`#define #define SX126X_TXEN D6`) in `variants/seeed_xiao_nrf52840_kit/variant.h` in the code block following:\n\n```c\n#ifdef XIAO_BLE_LEGACY_PINOUT\n// Legacy xiao_ble variant pinout for third-party SX126x modules e.g. EBYTE E22\n```\n\n### Example Wiring for Automatic Tx/Rx Switching Mode\n\n#### MCU -> E22 Connections\n\n| XIAO nrf52840 pin | variant.h definition | E22 pin   | Notes                                                                                                                |\n| :---------------- | :------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------- |\n| D0                | SX126X_CS            | 19 (NSS)  |                                                                                                                      |\n| D1                | SX126X_DIO1          | 13 (DIO1) |                                                                                                                      |\n| D2                | SX126X_BUSY          | 14 (BUSY) |                                                                                                                      |\n| D3                | SX126X_RESET         | 15 (NRST) |                                                                                                                      |\n| D7                | SX126X_RXEN          | 6 (RXEN)  | These pins must still be connected, and `SX126X_RXEN` defined in `variant.h`, otherwise Rx sensitivity will be poor. |\n| D8                | PIN_SPI_SCK          | 18 (SCK)  |                                                                                                                      |\n| D9                | PIN_SPI_MISO         | 16 (MISO) |                                                                                                                      |\n| D10               | PIN_SPI_MOSI         | 17 (MOSI) |                                                                                                                      |\n\n#### E22 -> E22 Connections\n\n| E22 pin | E22 pin | Notes                                                                     |\n| :------ | :------ | :------------------------------------------------------------------------ |\n| TXEN    | DIO2    | These must be physically connected for automatic Tx/Rx switching to work. |\n\n#### Note\n\nThe schematic (`xiao-ble-e22-schematic.png`) in the `eagle-project` directory uses this wiring.\n\n### Example Wiring for Manual Tx/Rx Switching Mode\n\n#### MCU -> E22 Connections\n\n| XIAO nrf52840 pin | variant.h definition | E22 pin   | Notes |\n| :---------------- | :------------------- | :-------- | :---- |\n| D0                | SX126X_CS            | 19 (NSS)  |       |\n| D1                | SX126X_DIO1          | 13 (DIO1) |       |\n| D2                | SX126X_BUSY          | 14 (BUSY) |       |\n| D3                | SX126X_RESET         | 15 (NRST) |       |\n| D6                | SX126X_TXEN          | 7 (TXEN)  |       |\n| D7                | SX126X_RXEN          | 6 (RXEN)  |       |\n| D8                | PIN_SPI_SCK          | 18 (SCK)  |       |\n| D9                | PIN_SPI_MISO         | 16 (MISO) |       |\n| D10               | PIN_SPI_MOSI         | 17 (MOSI) |       |\n\n#### E22 -> E22 connections\n\n_(none)_\n\n## 2. Build Meshtastic\n\n1. Follow the [Building Meshtastic Firmware](https://meshtastic.org/docs/development/firmware/build/) documentation, stop after **Build** → **Step 2**\n2. For **Build** → **Step 3**, select `xiao_ble` as your target\n3. Adjust source code if you:\n   - Wired your board for Manual Tx/Rx Switching Mode: see [Wire the Board](#1-wire-the-board)\n   - Used an E22-900M33S module  \n     (this step is important to avoid **damaging the power amplifier** in the M33S module and **transmitting power above legal limits**!):\n     1. Open `variants/diy/platformio.ini`\n     2. Search for `[env:xiao_ble]`\n     3. In the line starting with `build_flags` within this section, change `-DEBYTE_E22_900M30S` to `-DEBYTE_E22_900M33S`\n4. Follow **Build** → **Step 4** to build the firmware\n5. Stop here, because the **PlatformIO: Upload** step does not work for factory-fresh XIAO nrf52840 (the automatic reset to bootloader only works if Meshtastic firmware is already running)\n6. The built `firmware.uf2` binary can be found in the folder `.pio/build/xiao_ble/firmware.uf2` (relative to where you cloned the Git repository to), we will need it for [flashing the firmware](#3-flash-the-firmware-to-the-xiao-nrf52840) (manually)\n\n## 3. Flash the Firmware to the XIAO nrf52840\n\n1. Double press the XIAO nrf52840's `reset` button to put it in bootloader mode, and a USB volume named `XIAO SENSE` will appear\n2. Copy the `firmware.uf2` file to the `XIAO SENSE` volume (refer to the last step of [Build Meshtastic](#2-build-meshtastic))\n3. The XIAO nrf52840's red LED will flash for several seconds as the firmware is copied\n4. Once Meshtastic firmware successfully boots, the:\n   1. Green LED will turn on\n   2. Red LED will flash several times to indicate flash memory writes during initial settings file creation\n   3. Green LED will blink every second once the firmware is running normally\n5. If you do not see the above LED patters, proceed to [Troubleshooting](#4-troubleshooting)\n\n## 4. Troubleshooting\n\n- If after flashing Meshtastic, the XIAO is bootlooped, look at the serial output (you can see this by running `meshtastic --noproto` with the device connected to your computer via USB).\n  - If you see that the SX1262 init result was -2, this likely indicates a wiring problem; double check your wiring and pin mapping in `variant.h`.\n  - If you see an error mentioning tinyFS, this may mean you need to reformat the XIAO's storage:\n    1. Open the [Meshtastic web flasher](https://flasher.meshtastic.org/)\n    2. Select the **_Seeed XIAO NRF52840 Kit_**\n    3. Click the **_trash can icon_** to the right of **_Flash_**\n    4. Follow the instructions on the screen\n       **Do not flash the Seeed XIAO NRF52840 Kit firmware** if you have wired the LoRa module according to this variant, as the Seeed XIAO NRF52840 Kit uses different wiring for the SX1262 LoRa chip\n  - If you don't see any specific error message, but the boot process is stuck or not proceeding as expected, this might also mean there is a conflict in `variant.h`. If you have made any changes to the pin mapping, ensure they do not result in a conflict. If all else fails, try reverting your changes and using the known-good configuration included here.\n  - The above might also mean something is wired incorrectly. Try reverting to one of the known-good example wirings in section 4.\n- If the E22 gets hot to the touch:\n  - The power amplifier is likely running continually. Disconnect it and the XIAO from power immediately, and double check wiring and pin mapping. In my experimentation this occurred in cases where TXEN was inadvertently high (usually due to a pin mapping conflict).\n\n## 5. Notes\n\n- **Transmit Power**\n  - There is a power amplifier after the SX1262's Tx, so the actual Tx power is just over 7 dB greater than the SX1262's set Tx power (the E22-900M30S actually tops out just over 29dB at 5V according to the datasheet)\n  - Meshtastic firmware is aware of the gain of the E22-900M30S module, so the Meshtastic clients' Tx power setting reflects the actual output power, i.e. setting 30 dBm in the Meshtastic app programs the E22 module to correctly output 30 dBm, setting 24 dBm will output 24 dBm, etc.\n- **Adequate 5V Power Supply to the E22 Module**\n  - Have a bypass capacitor from its 5V supply to ground; 100 µF works well\n  - Voltage must be between 5V–5.5V, lower supply voltage results in less output power; for example, with a fully charged LiPo at 4.2V, Tx power appears to max out around 26-27 dBm\n\n### Additional Reading\n\n- [S5NC/CDEBYTE_Modules](https://github.com/S5NC/CDEBYTE_Modules) has additional information about EBYTE E22 modules' internal workings, including photographs\n- [RadioLib High power Radio Modules Guide](https://github.com/jgromes/RadioLib/wiki/High-power-Radio-Modules-Guide)\n\n## 6. Testing Methodology\n\nDuring what became a fairly long trial-and-error process, I did a lot of careful testing of Tx power and Rx sensitivity. My methodology in these tests was as follows:\n\n- All tests were conducted between two nodes:\n  1. The XIAO nrf52840 + E22 coupled with an [Abracon ARRKP4065-S915A](https://www.digikey.com/en/products/detail/abracon-llc/ARRKP4065-S915A/8593263\") ceramic patch antenna\n  2. A RAK 5005/4631 coupled with a [Laird MA9-5N](https://www.streakwave.com/laird-technologies-ma9-5n-55dbi-900mhz-mobile-omni-select-mount) antenna via a 4\" U.FL to Type N pigtail.\n  - No other nodes were powered up onsite or nearby.\n- Each node and its antenna was kept in exactly the same position and orientation throughout testing.\n- Other environmental factors (e.g. the location and resting position of my body in the room while testing) were controlled as carefully as possible.\n- Each test comprised at least five (and often ten) runs, after which the results were averaged.\n- All testing was done by sending single-character messages between nodes and observing the received RSSI reported in the message acknowledgement. Messages were sent one by one, waiting for each to be acknowledged or time out before sending the next.\n- The E22's Tx power was observed by sending messages from the RAK to the XIAO nrf52840 + E22 and recording the received RSSI.\n- The opposite was done to observe the E22's Rx sensitivity: messages were sent from the XIAO nrf52840 + E22 to the RAK, and the received RSSI was recorded.\n  While this cannot match the level of accuracy achievable with actual test equipment in a lab setting, it was nonetheless sufficient to demonstrate the (sometimes very large) differences in Tx power and Rx sensitivity between various configurations.\n"
  },
  {
    "path": "variants/nrf52840/diy/xiao_ble/platformio.ini",
    "content": "; Seeed Xiao BLE: https://www.digikey.com/en/products/detail/seeed-technology-co-ltd/102010448/16652893\n[env:xiao_ble]\nextends = env:seeed_xiao_nrf52840_kit\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/seeed_xiao_nrf52840_kit\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -D PRIVATE_HW\n  -DXIAO_BLE_LEGACY_PINOUT\n  -DEBYTE_E22\n  -USEEED_XIAO_NRF52840_KIT ; remove default HWID\n  -USEEED_XIAO_NRF_KIT_DEFAULT ; remove default define\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_xiao_nrf52840_kit>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n\n; Seeed Xiao BLE: https://www.digikey.com/en/products/detail/seeed-technology-co-ltd/102010448/16652893\n[env:xiao_ble_30db]\nextends = env:seeed_xiao_nrf52840_kit\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/seeed_xiao_nrf52840_kit\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DPRIVATE_HW                 ; Define private hardware\n  -DXIAO_BLE_LEGACY_PINOUT     ; Set legacy pinout\n  -DEBYTE_E22_900M30S          ; Set 30db module\n  -USEEED_XIAO_NRF52840_KIT    ; Remove default HWID\n  -USEEED_XIAO_NRF_KIT_DEFAULT ; Remove default define\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_xiao_nrf52840_kit>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n\n; Seeed Xiao BLE: https://www.digikey.com/en/products/detail/seeed-technology-co-ltd/102010448/16652893\n[env:xiao_ble_33db]\nextends = env:seeed_xiao_nrf52840_kit\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/seeed_xiao_nrf52840_kit\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DPRIVATE_HW                 ; Define private hardware\n  -DXIAO_BLE_LEGACY_PINOUT     ; Set legacy pinout\n  -DEBYTE_E22_900M33S          ; Set 33db module\n  -USEEED_XIAO_NRF52840_KIT    ; Remove default HWID\n  -USEEED_XIAO_NRF_KIT_DEFAULT ; Remove default define\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_xiao_nrf52840_kit>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink"
  },
  {
    "path": "variants/nrf52840/dls_Minimesh_Lite/platformio.ini",
    "content": "[env:minimesh_lite]\nextends = nrf52840_base\nboard = minimesh_lite\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/dls_Minimesh_Lite\n  -DPRIVATE_HW\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/dls_Minimesh_Lite>\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/dls_Minimesh_Lite/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/dls_Minimesh_Lite/variant.h",
    "content": "#ifndef _VARIANT_MINIMESH_LITE_\n#define _VARIANT_MINIMESH_LITE_\n\n#define VARIANT_MCK (64000000ul)\n#define USE_LFRC\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#define MINIMESH_LITE\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define PIN_3V3_EN (0 + 13) // P0.13\n\n// Analog pins\n#define BATTERY_PIN (0 + 31) // P0.31 Battery ADC\n#define ADC_CHANNEL ADC1_GPIO4_CHANNEL\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#define VBAT_MV_PER_LSB (0.73242188F)\n#define VBAT_DIVIDER (0.6F)\n#define VBAT_DIVIDER_COMP (1.73)\n#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB)\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER VBAT_DIVIDER_COMP\n#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x)\n\n// WIRE IC AND IIC PINS\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (32 + 4)\n#define PIN_WIRE_SCL (0 + 11)\n\n// LED\n#define PIN_LED1 (0 + 15)\n// Actually red\n#define LED_BLUE PIN_LED1\n#define LED_STATE_ON 1\n\n// Button\n#define BUTTON_PIN (32 + 0)\n\n// GPS\n#define GPS_TX_PIN (0 + 20)\n#define GPS_RX_PIN (0 + 22)\n\n#define PIN_GPS_EN (0 + 24)\n#define GPS_UBLOX\n// define GPS_DEBUG\n\n// UART interfaces\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n\n#define PIN_SERIAL2_RX (0 + 6)\n#define PIN_SERIAL2_TX (0 + 8)\n\n// Serial interfaces\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (0 + 2)\n#define PIN_SPI_MOSI (32 + 15)\n#define PIN_SPI_SCK (32 + 11)\n\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_CS (32 + 13)\n\n// LORA MODULES\n#define USE_LLCC68\n#define USE_SX1262\n#define USE_SX1268\n\n// SX126X CONFIG\n#define SX126X_CS (32 + 13)\n#define SX126X_DIO1 (0 + 10)\n#define SX126X_DIO2_AS_RF_SWITCH\n\n#define SX126X_BUSY (0 + 29)\n#define SX126X_RESET (0 + 9)\n#define SX126X_RXEN (0 + 17)\n#define SX126X_TXEN RADIOLIB_NC\n\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // _VARIANT_MINIMESH_LITE_\n"
  },
  {
    "path": "variants/nrf52840/feather_diy/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921\n[env:feather_diy]\nextends = nrf52840_base\nboard = adafruit_feather_nrf52840\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/feather_diy\n  -Dfeather_diy\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/feather_diy>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink"
  },
  {
    "path": "variants/nrf52840/feather_diy/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n"
  },
  {
    "path": "variants/nrf52840/feather_diy/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_FEATHER_DIY_\n#define _VARIANT_FEATHER_DIY_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 12) // P0.12 22\n#define PIN_WIRE_SCL (0 + 11) // P0.12 23\n\n#define PIN_LED1 (32 + 15) // P1.15 3\n#define PIN_LED2 (32 + 10) // P1.10 4\n\n#define LED_GREEN PIN_LED2 // Actually red\n#define LED_BLUE PIN_LED1\n\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN (32 + 2) // P1.02 7\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 24) // P0.24 1\n#define PIN_SERIAL1_TX (0 + 25) // P0.25 0\n\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (0 + 15) // P0.15 24\n#define PIN_SPI_MOSI (0 + 13) // P0.13 25\n#define PIN_SPI_SCK (0 + 14)  // P0.14 26\n\n#define SS 2\n\n#define LORA_DIO0 -1        // a No connect on the SX1262/SX1268 module\n#define LORA_RESET (32 + 9) // P1.09 13 // RST for SX1276, and for SX1262/SX1268\n#define LORA_DIO1 (0 + 6)   // P0.06 11  // IRQ for SX1262/SX1268\n#define LORA_DIO2 (0 + 8)   // P0.08 12  // BUSY for SX1262/SX1268\n#define LORA_DIO3           // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled\n\n#define LORA_SCK SCK\n#define LORA_MISO MI\n#define LORA_MOSI MO\n#define LORA_CS SS\n\n// enables 3.3V periphery like GPS or IO Module\n#define PIN_3V3_EN (-1)\n\n#undef USE_EINK\n\n// supported modules list\n#define USE_SX1262\n\n// common pinouts for SX126X modules\n#define SX126X_CS LORA_CS // NSS for SX126X\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_RXEN (0 + 27) // P0.27 10\n#define SX126X_TXEN (0 + 26) // P0.26 9\n\n#ifdef EBYTE_E22\n// Internally the TTGO module hooks the SX126x-DIO2 in to control the TX/RX switch\n// (which is the default for the sx1262interface code)\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/gat562_mesh_trial_tracker/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921\n[env:gat562_mesh_trial_tracker]\nextends = nrf52840_base\nboard_level = extra\nboard = gat562_mesh_trial_tracker\nboard_check = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/gat562_mesh_trial_tracker\n  ;-D GAT562_MESH_TRIAL_TRACKER\n  -D PRIVATE_HW\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/gat562_mesh_trial_tracker>\n"
  },
  {
    "path": "variants/nrf52840/gat562_mesh_trial_tracker/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/gat562_mesh_trial_tracker/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_GAT562_MESH_TRIAL_TRACKER_\n#define _VARIANT_GAT562_MESH_TRIAL_TRACKER_\n\n// led pin 2 (blue), see https://github.com/meshtastic/firmware/blob/master/src/mesh/NodeDB.cpp#L723\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n// #define PIN_EINK_CS (0 + 26)\n// #define PIN_EINK_BUSY (0 + 4)\n// #define PIN_EINK_DC (0 + 17)\n// #define PIN_EINK_RES (-1)\n// #define PIN_EINK_SCLK (0 + 3)\n// #define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n// #define USE_EINK\n\n// Display - OLED connected via I2C\n#define HAS_SCREEN 1\n#define USE_SSD1306\n\n// RAKRGB\n// #define HAS_NCP5623\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10   NSS     SPI NSS (Arduino GPIO number 42)\nP1.11   SCK     SPI CLK (Arduino GPIO number 43)\nP1.12   MOSI    SPI MOSI (Arduino GPIO number 44)\nP1.13   MISO    SPI MISO (Arduino GPIO number 45)\nP1.14   BUSY    BUSY signal (Arduino GPIO number 46)\nP1.15   DIO1    DIO1 event interrupt (Arduino GPIO number 47)\nP1.06   NRESET  NRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n// configure the SET pin on the RAK12039 sensor board to disable the sensor while not reading\n// air quality telemetry.  PIN_NFC2 doesn't seem to be used anywhere else in the codebase, but if\n// you're having problems with your node behaving weirdly when a RAK12039 board isn't connected,\n// try disabling this.\n// #define PMSA003I_ENABLE_PIN PIN_NFC2\n\n// #define DETECTION_SENSOR_EN 4\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n// enables 3.3V periphery like GPS or IO Module\n// Do not toggle this for GPS power savings\n#define PIN_3V3_EN (34)\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_BAUDRATE 9600\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n\n// RAK12002 RTC Module\n// #define RV3028_RTC (uint8_t)0b1010010\n\n// RAK18001 Buzzer in Slot C\n// #define PIN_BUZZER 21 // IO3 is PWM2\n// NEW: set this via protobuf instead!\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n// #define HAS_ETHERNET 1\n\n// #define RAK_4631 1\n\n// #define PIN_ETHERNET_RESET 21\n// #define PIN_ETHERNET_SS PIN_EINK_CS\n// #define ETH_SPI_PORT SPI1\n// #define AQ_SET_PIN 10\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114/platformio.ini",
    "content": "; First prototype nrf52840/sx1262 device\n[env:heltec-mesh-node-t114]\ncustom_meshtastic_hw_model = 69\ncustom_meshtastic_hw_model_slug = HELTEC_MESH_NODE_T114\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec Mesh Node T114\ncustom_meshtastic_images = heltec-mesh-node-t114.svg, heltec-mesh-node-t114-case.svg\ncustom_meshtastic_tags = Heltec\n\nextends = nrf52840_base\nboard = heltec_mesh_node_t114\nboard_level = pr\ndebug_tool = jlink\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/heltec_mesh_node_t114\n  -DHELTEC_T114\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_node_t114>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main\n  https://github.com/meshtastic/st7789/archive/9ee76d6b18b9a8f45a2c5cae06b1134a587691eb.zip\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"Arduino.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n}\n\nvoid variant_shutdown()\n{\n    nrf_gpio_cfg_default(PIN_GPS_PPS);\n    detachInterrupt(PIN_GPS_PPS);\n    detachInterrupt(PIN_BUTTON1);\n}"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_HELTEC_NRF_\n#define _VARIANT_HELTEC_NRF_\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n#define HELTEC_MESH_NODE_T114\n\n#define USE_ST7789\n\n#define ST7789_NSS 11\n#define ST7789_RS 12  // DC\n#define ST7789_SDA 41 // MOSI\n#define ST7789_SCK 40\n#define ST7789_RESET 2\n#define ST7789_MISO -1\n#define ST7789_BUSY -1\n#define VTFT_CTRL 3\n#define VTFT_LEDA 15\n// #define ST7789_BL (32+6)\n#define TFT_BACKLIGHT_ON LOW\n#define ST7789_SPI_HOST SPI1_HOST\n// #define TFT_BL (32+6)\n#define SPI_FREQUENCY 40000000\n#define SPI_READ_FREQUENCY 16000000\n#define TFT_HEIGHT 135\n#define TFT_WIDTH 240\n#define TFT_OFFSET_X 0\n#define TFT_OFFSET_Y 0\n\n// T114 gets a muted yellow on black display\n#define TFT_MESH_OVERRIDE COLOR565(255, 255, 128)\n\n// #define TFT_OFFSET_ROTATION 0\n// #define SCREEN_ROTATE\n// #define SCREEN_TRANSITION_FRAMERATE 5\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (32 + 3) // green (confirmed on 1.0 board)\n#define LED_BLUE PIN_LED1 // fake for bluefruit library\n#define LED_GREEN PIN_LED1\n#define LED_STATE_ON 0 // State when LED is lit\n\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 2                     // How many neopixels are connected\n#define NEOPIXEL_DATA 14                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 10)\n// #define PIN_BUTTON2 (0 + 18)      // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular\n// GPIO\n\n/*\nNo longer populated on PCB\n*/\n#define PIN_SERIAL2_RX (0 + 9)\n#define PIN_SERIAL2_TX (0 + 10)\n//  #define PIN_SERIAL2_EN (0 + 17)\n\n/*\n * I2C\n */\n\n#define WIRE_INTERFACES_COUNT 2\n\n// I2C bus 0\n// Routed to footprint for PCF8563TS RTC\n// Not populated on T114 V1, maybe in future?\n#define PIN_WIRE_SDA (0 + 26) // P0.26\n#define PIN_WIRE_SCL (0 + 27) // P0.27\n\n// I2C bus 1\n// Available on header pins, for general use\n#define PIN_WIRE1_SDA (0 + 16) // P0.16\n#define PIN_WIRE1_SCL (0 + 13) // P0.13\n\n// QSPI Pins\n#define PIN_QSPI_SCK (32 + 14)\n#define PIN_QSPI_CS (32 + 15)\n#define PIN_QSPI_IO0 (32 + 12) // MOSI if using two bit interface\n#define PIN_QSPI_IO1 (32 + 13) // MISO if using two bit interface\n#define PIN_QSPI_IO2 (0 + 7)   // WP if using two bit interface (i.e. not used)\n#define PIN_QSPI_IO3 (0 + 5)   // HOLD if using two bit interface (i.e. not used)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES MX25R1635F\n#define EXTERNAL_FLASH_USE_QSPI\n\n/*\n * Lora radio\n */\n\n#define USE_SX1262\n// #define USE_SX1268\n#define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead\n#define LORA_CS (0 + 24)\n#define SX126X_DIO1 (0 + 20)\n// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching\n// #define SX1262_DIO3 (0 + 21)\n// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the\n//    main\n// CPU?\n#define SX126X_BUSY (0 + 17)\n#define SX126X_RESET (0 + 25)\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define PIN_SPI1_MISO                                                                                                            \\\n    ST7789_MISO // FIXME not really needed, but for now the SPI code requires something to be defined, pick an used GPIO\n#define PIN_SPI1_MOSI ST7789_SDA\n#define PIN_SPI1_SCK ST7789_SCK\n\n/*\n * Bluetooth\n */\n\n// The bluetooth transmit power on the nRF52840 is adjustable from -20dB to +8dB in steps of 4dB\n// so NRF52_BLE_TX_POWER can be set to -20, -16, -12, -8, -4, 0 (default), 4, and 8.\n// #define NRF52_BLE_TX_POWER 8\n\n/*\n * GPS pins\n */\n\n#define GPS_L76K\n\n// #define PIN_GPS_RESET (32 + 6) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n#define GPS_RESET_MODE LOW\n// #define PIN_GPS_EN (21)\n#define VEXT_ENABLE (0 + 21)\n#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing\n#define VEXT_ON_VALUE HIGH\n// #define GPS_EN_ACTIVE HIGH\n#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake\n#define PIN_GPS_PPS (32 + 4)\n// Seems to be missing on this new board\n// #define PIN_GPS_PPS (32 + 4)  // Pulse per second input from the GPS\n#define GPS_TX_PIN (32 + 7) // This is for bits going TOWARDS the CPU\n#define GPS_RX_PIN (32 + 5) // This is for bits going TOWARDS the GPS\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (0 + 23)\n#define PIN_SPI_MOSI (0 + 22)\n#define PIN_SPI_SCK (0 + 19)\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n// Battery\n// The battery sense is hooked to pin A0 (4)\n// it is defined in the anlaolgue pin section of this file\n// and has 12 bit resolution\n\n#define ADC_CTRL 6\n#define ADC_CTRL_ENABLED HIGH\n#define BATTERY_PIN 4\n#define ADC_RESOLUTION 14\n\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (4.916F)\n\n// rf52840 AIN2 = Pin 4\n// commented out due to power leakage of 2.9mA in shutdown state see reported issue #8801\n// #define BATTERY_LPCOMP_INPUT NRF_LPCOMP_INPUT_2 //UNSAFE\n\n// We have AIN2 with a VBAT divider so AIN2 = VBAT * (100/490)\n// We have the device going deep sleep under 3.1V, which is AIN2 = 0.63V\n// So we can wake up when VBAT>=VDD is restored to 3.3V, where AIN2 = 0.67V\n// Ratio 0.67/3.3 = 0.20, so we can pick a bit higher, 2/8 VDD, which means\n// VBAT=4.04V\n#define BATTERY_LPCOMP_THRESHOLD NRF_LPCOMP_REF_SUPPLY_2_8\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114-inkhud/custom_build_tasks.py",
    "content": "# Simplifies DIY InkHUD builds, with presets for several common E-Ink displays\n# - build using custom task in Platformio's \"Project Tasks\" panel\n# - build with `pio run -e <variant> -t build_weact_154` (or similar)\n\n# Silence trunk's objections to the import statements\n# trunk-ignore-all(ruff/F821)\n# trunk-ignore-all(flake8/F821)\n\nfrom SCons.Script import COMMAND_LINE_TARGETS\n\nImport(\"env\")\nImport(\"projenv\")\n\n# Custom targets\n# These wrappers just run the normal build task under a different target name\n# We intercept the build later on, based on the target name\nenv.AddTarget(\n    name=\"build_weact_154\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 1.54\")',\n)\nenv.AddTarget(\n    name=\"build_weact_213\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 2.13\")',\n)\nenv.AddTarget(\n    name=\"build_weact_290\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 2.9\")',\n)\nenv.AddTarget(\n    name=\"build_weact_420\",\n    dependencies=[\"buildprog\"],\n    actions=None,\n    title='Build (WeAct 4.2\")',\n)\n\n# Check whether a build was started via one of our custom targets above\n\nif \"build_weact_154\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 1.54\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"ZJY200200_0154DAAMFGN\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"15\"))\n\nelif \"build_weact_213\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 2.13\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"HINK_E0213A289\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"10\"))\n\nelif \"build_weact_290\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 2.9\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"ZJY128296_029EAAMFGN\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"15\"))\n\nelif \"build_weact_420\" in COMMAND_LINE_TARGETS:\n    print('Building for WeAct 4.2\" Display')\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DRIVER\", \"HINK_E042A87\"))\n    projenv[\"CPPDEFINES\"].append((\"INKHUD_BUILDCONF_DISPLAYRESILIENCE\", \"15\"))\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114-inkhud/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/HINK_E0213A289.h\"        // WeAct 2.13\"\n#include \"graphics/niche/Drivers/EInk/HINK_E042A87.h\"          // WeAct 4.2\"\n#include \"graphics/niche/Drivers/EInk/ZJY128296_029EAAMFGN.h\"  // WeAct 2.9\"\n#include \"graphics/niche/Drivers/EInk/ZJY200200_0154DAAMFGN.h\" // WeACt 1.54\"\n\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\n#if !defined(INKHUD_BUILDCONF_DRIVER) || !defined(INKHUD_BUILDCONF_DISPLAYRESILIENCE)\n// cppcheck-suppress preprocessorErrorDirective\n#error If not using a DIY preset, display model and resilience must be set manually\n#endif\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n    SPI1.begin();\n\n    // Driver\n    // -----------------------------\n\n    // Use E-Ink driver\n    Drivers::EInk *driver = new Drivers::INKHUD_BUILDCONF_DRIVER;\n    driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update.\n    inkhud->setDisplayResilience(INKHUD_BUILDCONF_DISPLAYRESILIENCE); // Suggest roughly ten\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Init settings, and customize defaults\n    // Values ignored individually if found saved to flash\n    inkhud->persistence->settings.rotation = (driver->height > driver->width ? 1 : 0); // Rotate 90deg to landscape, if needed\n    inkhud->persistence->settings.userTiles.maxCount = 4;\n    inkhud->persistence->settings.optionalFeatures.batteryIcon = true;\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet);\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet, true, false, 3);                       // Default on tile 3\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0), true, false, 2); // Default on tile 2\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true, false, 1); // Default on tile 1\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet, true, false, 0); // Default on tile 0\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true);                        // Background\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // #0: Main User Button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114-inkhud/platformio.ini",
    "content": "[env:heltec-mesh-node-t114-inkhud]\nboard_level = extra\nextends = nrf52840_base, inkhud\nboard = heltec_mesh_node_t114\nboard_check = true\nbuild_flags = \n  ${nrf52840_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/nrf52840/heltec_mesh_node_t114-inkhud\nbuild_src_filter = \n  ${nrf52_base.build_src_filter} \n  ${inkhud.build_src_filter}\n  +<../variants/nrf52840/heltec_mesh_node_t114-inkhud>\nlib_deps = \n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${nrf52840_base.lib_deps}\nextra_scripts =\n  ${env.extra_scripts}\n  variants/nrf52840/diy/nrf52_promicro_diy_tcxo/custom_build_tasks.py ; Add to PIO's Project Tasks pane: preset builds for common displays\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114-inkhud/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"Arduino.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n}\n\nvoid variant_shutdown()\n{\n    nrf_gpio_cfg_default(PIN_GPS_PPS);\n    detachInterrupt(PIN_GPS_PPS);\n    detachInterrupt(PIN_BUTTON1);\n}"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_node_t114-inkhud/variant.h",
    "content": "// Unlike many other InkHUD variants, this environment does require its own variant.h file\n// This is because the default T114 variant maps SPI1 pins to the optional TFT display, and those pins are not broken out\n\n#ifndef _VARIANT_HELTEC_NRF_\n#define _VARIANT_HELTEC_NRF_\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n#define HELTEC_MESH_NODE_T114\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (32 + 3) // green (confirmed on 1.0 board)\n#define LED_BLUE PIN_LED1 // fake for bluefruit library\n#define LED_GREEN PIN_LED1\n#define LED_STATE_ON 0 // State when LED is lit\n\n#define HAS_NEOPIXEL                         // Enable the use of neopixels\n#define NEOPIXEL_COUNT 2                     // How many neopixels are connected\n#define NEOPIXEL_DATA 14                     // gpio pin used to send data to the neopixels\n#define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 10)\n// #define PIN_BUTTON2 (0 + 18)      // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular\n// GPIO\n\n/*\nNo longer populated on PCB\n*/\n#define PIN_SERIAL2_RX (0 + 9)\n#define PIN_SERIAL2_TX (0 + 10)\n//  #define PIN_SERIAL2_EN (0 + 17)\n\n/*\n * I2C\n */\n\n#define WIRE_INTERFACES_COUNT 2\n\n// I2C bus 0\n// Routed to footprint for PCF8563TS RTC\n// Not populated on T114 V1, maybe in future?\n#define PIN_WIRE_SDA (0 + 26) // P0.26\n#define PIN_WIRE_SCL (0 + 27) // P0.27\n\n// I2C bus 1\n// Available on header pins, for general use\n#define PIN_WIRE1_SDA (0 + 16) // P0.16\n#define PIN_WIRE1_SCL (0 + 13) // P0.13\n\n/*\n * Lora radio\n */\n\n#define USE_SX1262\n// #define USE_SX1268\n#define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead\n#define LORA_CS (0 + 24)\n#define SX126X_DIO1 (0 + 20)\n// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching\n// #define SX1262_DIO3 (0 + 21)\n// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the\n//    main\n// CPU?\n#define SX126X_BUSY (0 + 17)\n#define SX126X_RESET (0 + 25)\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n/*\n * E-Ink DIY\n */\n#define PIN_EINK_MOSI (0 + 8) // also called SDA\n#define PIN_EINK_SCLK (0 + 7)\n#define PIN_EINK_CS (32 + 12)\n#define PIN_EINK_DC (32 + 14)\n#define PIN_EINK_RES (0 + 5)\n#define PIN_EINK_BUSY (32 + 15)\n\n/*\n * GPS pins\n */\n\n#define GPS_L76K\n\n// #define PIN_GPS_RESET (32 + 6) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n#define GPS_RESET_MODE LOW\n// #define PIN_GPS_EN (21)\n#define VEXT_ENABLE (0 + 21)\n#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing\n#define VEXT_ON_VALUE HIGH\n// #define GPS_EN_ACTIVE HIGH\n#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake\n#define PIN_GPS_PPS (32 + 4)\n// Seems to be missing on this new board\n// #define PIN_GPS_PPS (32 + 4)  // Pulse per second input from the GPS\n#define GPS_TX_PIN (32 + 7) // This is for bits going TOWARDS the CPU\n#define GPS_RX_PIN (32 + 5) // This is for bits going TOWARDS the GPS\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (0 + 23)\n#define PIN_SPI_MOSI (0 + 22)\n#define PIN_SPI_SCK (0 + 19)\n\n#define PIN_SPI1_MISO -1\n#define PIN_SPI1_MOSI PIN_EINK_MOSI\n#define PIN_SPI1_SCK PIN_EINK_SCLK\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n// Battery\n// The battery sense is hooked to pin A0 (4)\n// it is defined in the anlaolgue pin section of this file\n// and has 12 bit resolution\n\n#define ADC_CTRL 6\n#define ADC_CTRL_ENABLED HIGH\n#define BATTERY_PIN 4\n#define ADC_RESOLUTION 14\n\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (4.90F)\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_pocket/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/LCMEN2R13ECC1.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n\n    // For NRF52 platforms, SPI pins are defined in variant.h\n    SPI1.begin();\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver = new Drivers::LCMEN2R13ECC1;\n    driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n    inkhud->setDisplayResilience(10, 1.5);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1253;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1253;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1253;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?\n    inkhud->persistence->settings.rotation = 3;           // 270 degrees clockwise\n    inkhud->persistence->settings.userTiles.count = 1;    // One tile only by default, keep things simple for new users\n    inkhud->persistence->settings.optionalMenuItems.nextTile = true;\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);          // -\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, no autoshow, default on tile 0\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // #0: Main User Button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_pocket/platformio.ini",
    "content": "; First prototype nrf52840/sx1262 device\n[env:heltec-mesh-pocket-5000]\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_images = heltec_mesh_pocket.svg\ncustom_meshtastic_tags = Heltec\n\nextends = nrf52840_base\nboard = heltec_mesh_pocket\ndebug_tool = jlink\ncustom_device_hw_model = 94\ncustom_meshtastic_hw_model = 94\ncustom_meshtastic_hw_model_slug = HELTEC_MESH_POCKET\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_display_name = Heltec Mesh Pocket\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_variant = 5000mAh\ncustom_meshtastic_key = heltec_mesh_pocket\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/heltec_mesh_pocket\n  -DHELTEC_MESH_POCKET\n  -DHELTEC_MESH_POCKET_BATTERY_5000\n  -DUSE_EINK\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_B74\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted\n  -DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n;   -D EINK_LIMIT_GHOSTING_PX=2000      ; (Optional) How much image ghosting is tolerated\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -DEINK_HASQUIRK_GHOSTING             ; Display model is identified as \"prone to ghosting\"\n  -DEINK_HASQUIRK_WEAKFASTREFRESH      ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket> \nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n\n[env:heltec-mesh-pocket-5000-inkhud]\nextends = nrf52840_base, inkhud\nboard = heltec_mesh_pocket\ncustom_meshtastic_hw_model = 94\ncustom_meshtastic_hw_model_slug = HELTEC_MESH_POCKET\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_display_name = Heltec Mesh Pocket\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_variant = 5000mAh InkHUD\ncustom_meshtastic_key = heltec_mesh_pocket\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket> ${inkhud.build_src_filter}\nbuild_flags = \n  ${inkhud.build_flags}\n  ${nrf52840_base.build_flags} \n  -I variants/nrf52840/heltec_mesh_pocket\n  -D HELTEC_MESH_POCKET\n  -D HELTEC_MESH_POCKET_BATTERY_5000\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${nrf52840_base.lib_deps}\n\n\n; First prototype nrf52840/sx1262 device\n[env:heltec-mesh-pocket-10000]\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_images = heltec_mesh_pocket.svg\ncustom_meshtastic_tags = Heltec\n\nextends = nrf52840_base\nboard = heltec_mesh_pocket\ndebug_tool = jlink\ncustom_meshtastic_hw_model = 94\ncustom_meshtastic_hw_model_slug = HELTEC_MESH_POCKET\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_display_name = Heltec Mesh Pocket\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_variant = 10000mAh\ncustom_meshtastic_key = heltec_mesh_pocket\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/heltec_mesh_pocket\n  -DHELTEC_MESH_POCKET\n  -DHELTEC_MESH_POCKET_BATTERY_10000\n  -DUSE_EINK\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_B74\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted\n  -DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n;   -D EINK_LIMIT_GHOSTING_PX=2000      ; (Optional) How much image ghosting is tolerated\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -DEINK_HASQUIRK_GHOSTING             ; Display model is identified as \"prone to ghosting\"\n  -DEINK_HASQUIRK_WEAKFASTREFRESH      ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket> \nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n\n[env:heltec-mesh-pocket-10000-inkhud]\nextends = nrf52840_base, inkhud\nboard = heltec_mesh_pocket\ncustom_meshtastic_hw_model = 94\ncustom_meshtastic_hw_model_slug = HELTEC_MESH_POCKET\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_display_name = Heltec Mesh Pocket\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_variant = 10000mAh InkHUD\ncustom_meshtastic_key = heltec_mesh_pocket\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_pocket> ${inkhud.build_src_filter}\nbuild_flags = \n  ${inkhud.build_flags}\n  ${nrf52840_base.build_flags} \n  -I variants/nrf52840/heltec_mesh_pocket\n  -D HELTEC_MESH_POCKET\n  -D HELTEC_MESH_POCKET_BATTERY_10000\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${nrf52840_base.lib_deps}\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_pocket/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_pocket/variant.h",
    "content": "#ifndef _VARIANT_HELTEC_NRF_\n#define _VARIANT_HELTEC_NRF_\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (13) // 13 red (confirmed on 1.0 board)\n#define LED_RED PIN_LED1\n#define LED_BLUE PIN_LED1\n#define LED_GREEN PIN_LED1\n#define LED_STATE_ON 0 // State when LED is lit\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 10)\n// #define PIN_BUTTON2 (0 + 18)      // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular\n// GPIO\n\n/*\nNo longer populated on PCB\n*/\n#define PIN_SERIAL2_RX (0 + 7)\n#define PIN_SERIAL2_TX (0 + 8)\n//  #define PIN_SERIAL2_EN (0 + 17)\n\n/**\n    Wire Interfaces\n    */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (32 + 15)\n#define PIN_WIRE_SCL (32 + 13)\n\n/*\n * Lora radio\n */\n\n#define USE_SX1262\n#define SX126X_CS (0 + 26) // FIXME - we really should define LORA_CS instead\n#define LORA_CS (0 + 26)\n#define SX126X_DIO1 (0 + 16)\n// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching\n// #define SX1262_DIO3 (0 + 21)\n// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the\n//    main\n// CPU?\n#define SX126X_BUSY (0 + 15)\n#define SX126X_RESET (0 + 12)\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Display (E-Ink)\n#define PIN_EINK_CS 24\n#define PIN_EINK_BUSY 32 + 6\n#define PIN_EINK_DC 31\n#define PIN_EINK_RES 32 + 4\n#define PIN_EINK_SCLK 22\n#define PIN_EINK_MOSI 20\n\n#define PIN_SPI1_MISO -1\n#define PIN_SPI1_MOSI PIN_EINK_MOSI\n#define PIN_SPI1_SCK PIN_EINK_SCLK\n\n/*\n * GPS pins\n */\n\n#define PIN_SERIAL1_RX 32 + 5\n#define PIN_SERIAL1_TX 32 + 7\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (32 + 9)\n#define PIN_SPI_MOSI (0 + 5)\n#define PIN_SPI_SCK (0 + 4)\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n// Battery\n// The battery sense is hooked to pin A0 (4)\n// it is defined in the anlaolgue pin section of this file\n// and has 12 bit resolution\n\n#define ADC_CTRL 32 + 2\n#define ADC_CTRL_ENABLED HIGH\n#define BATTERY_PIN 29\n#define ADC_RESOLUTION 14\n\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (4.6425F)\n\n#if defined(HELTEC_MESH_POCKET_BATTERY_5000)\n#define OCV_ARRAY 4300, 4240, 4120, 4000, 3888, 3800, 3740, 3698, 3655, 3580, 3400\n#elif defined(HELTEC_MESH_POCKET_BATTERY_10000)\n#define OCV_ARRAY 4100, 4060, 3960, 3840, 3729, 3625, 3550, 3500, 3420, 3345, 3100\n#endif\n\n#undef HAS_GPS\n#define HAS_GPS 0\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_solar/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/E0213A367.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n\n    // For NRF52 platforms, SPI pins are defined in variant.h\n    SPI1.begin();\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver = new Drivers::E0213A367;\n    driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n    inkhud->setDisplayResilience(10, 1.5);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2; // How many tiles can the display handle?\n    inkhud->persistence->settings.rotation = 3;           // 270 degrees clockwise\n    inkhud->persistence->settings.userTiles.count = 1;    // One tile only by default, keep things simple for new users\n    inkhud->persistence->settings.optionalMenuItems.nextTile = true;\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);          // -\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, no autoshow, default on tile 0\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // #0: Main User Button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_solar/platformio.ini",
    "content": "; First prototype nrf52840/sx1262 device\n[heltec_mesh_solar_base]\nextends = nrf52840_base\nboard = heltec_mesh_solar\nboard_level = pr\ndebug_tool = jlink\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/heltec_mesh_solar\n  -DHELTEC_MESH_SOLAR\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/heltec_mesh_solar>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=NMIoT-meshsolar packageName=https://github.com/NMIoT/meshsolar gitBranch=main\n  https://github.com/NMIoT/meshsolar/archive/dfc5330dad443982e6cdd37a61d33fc7252f468b.zip\n  # renovate: datasource=custom.pio depName=ArduinoJson packageName=bblanchon/library/ArduinoJson\n  bblanchon/ArduinoJson@6.21.6\n\n[env:heltec-mesh-solar]\ncustom_meshtastic_hw_model = 108\ncustom_meshtastic_hw_model_slug = HELTEC_MESH_SOLAR\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Heltec MeshSolar\ncustom_meshtastic_images = heltec-mesh-solar.svg\ncustom_meshtastic_tags = Heltec\n\nextends = heltec_mesh_solar_base\nbuild_flags = ${heltec_mesh_solar_base.build_flags}\n    -DSPI_INTERFACES_COUNT=1\n\n[env:heltec-mesh-solar-eink]\nextends = heltec_mesh_solar_base\nbuild_flags = ${heltec_mesh_solar_base.build_flags}\n  -DHELTEC_MESH_SOLAR_EINK\n  -DSPI_INTERFACES_COUNT=2\n  -DUSE_EINK\n  -DPIN_SCREEN_VDD_CTL=3\n  -DPIN_EINK_CS=41\n  -DPIN_EINK_BUSY=11\n  -DPIN_EINK_DC=13\n  -DPIN_EINK_RES=40\n  -DPIN_EINK_SCLK=12\n  -DPIN_EINK_MOSI=2\n  -DPIN_SPI1_MISO=-1\n  -DPIN_SPI1_MOSI=PIN_EINK_MOSI\n  -DPIN_SPI1_SCK=PIN_EINK_SCLK\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_E0213A367\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted\n  -DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -DEINK_HASQUIRK_GHOSTING             ; Display model is identified as \"prone to ghosting\"\n  -DENABLE_MESSAGE_PERSISTENCE=0       ; Disable flash persistence for space-limited build\n  -DMESHTASTIC_EXCLUDE_WIFI=1\n  -DMESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1\n  -DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1\n  -DMESHTASTIC_EXCLUDE_STOREFORWARD=1\n  -DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1\n  -DMESHTASTIC_EXCLUDE_WAYPOINT=1\nlib_deps =\n  ${heltec_mesh_solar_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n\n[env:heltec-mesh-solar-inkhud]\nextends = heltec_mesh_solar_base, inkhud\nbuild_src_filter = ${heltec_mesh_solar_base.build_src_filter} ${inkhud.build_src_filter}\nbuild_flags = ${heltec_mesh_solar_base.build_flags}\n  ${inkhud.build_flags}\n  -DHELTEC_MESH_SOLAR_INKHUD\n  -DSPI_INTERFACES_COUNT=2\n  -DPIN_SCREEN_VDD_CTL=3\n  -DPIN_EINK_CS=41\n  -DPIN_EINK_BUSY=11\n  -DPIN_EINK_DC=13\n  -DPIN_EINK_RES=40\n  -DPIN_EINK_SCLK=12\n  -DPIN_EINK_MOSI=2\n  -DPIN_SPI1_MISO=-1\n  -DPIN_SPI1_MOSI=PIN_EINK_MOSI\n  -DPIN_SPI1_SCK=PIN_EINK_SCLK\nlib_deps =\n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${heltec_mesh_solar_base.lib_deps}\n\n[env:heltec-mesh-solar-oled]\nextends = heltec_mesh_solar_base\nbuild_flags = ${heltec_mesh_solar_base.build_flags}\n  -DHELTEC_MESH_SOLAR_OLED\n  -DSPI_INTERFACES_COUNT=1\n  -DPIN_SCREEN_VDD_CTL=3\n  -DHAS_SCREEN=1\n  -DRESET_OLED=40\n  -DPIN_WIRE_SDA=2\n  -DPIN_WIRE_SCL=12\n\n[env:heltec-mesh-solar-tft]\nextends = heltec_mesh_solar_base\nbuild_flags = ${heltec_mesh_solar_base.build_flags}\n  -DHELTEC_MESH_SOLAR_TFT\n  -DSPI_INTERFACES_COUNT=2\n  -DUSE_ST7789\n  -DST7789_NSS=41\n  -DST7789_RS=13\n  -DST7789_SDA=2\n  -DST7789_SCK=12\n  -DST7789_RESET=40\n  -DST7789_MISO=-1\n  -DST7789_BUSY=-1\n  -DVTFT_CTRL=3\n  -DVTFT_LEDA=11\n  -DTFT_BACKLIGHT_ON=HIGH\n  -DST7789_SPI_HOST=SPI2_HOST\n  -DSPI_FREQUENCY=10000000\n  -DSPI_READ_FREQUENCY=10000000\n  -DTFT_HEIGHT=170\n  -DTFT_WIDTH=320\n  -DTFT_OFFSET_X=0\n  -DTFT_OFFSET_Y=0\n  -DBRIGHTNESS_DEFAULT=100\n  -DPIN_SPI1_MISO=ST7789_MISO\n  -DPIN_SPI1_MOSI=ST7789_SDA\n  -DPIN_SPI1_SCK=ST7789_SCK\nlib_deps =\n  ${heltec_mesh_solar_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main\n  https://github.com/meshtastic/st7789/archive/9ee76d6b18b9a8f45a2c5cae06b1134a587691eb.zip\n"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_solar/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"Arduino.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(BQ4050_EMERGENCY_SHUTDOWN_PIN, INPUT);\n#if defined(PIN_SCREEN_VDD_CTL)\n    pinMode(PIN_SCREEN_VDD_CTL, OUTPUT);\n    digitalWrite(PIN_SCREEN_VDD_CTL, LOW); // Start with power on\n#endif\n}\n\nvoid variant_shutdown()\n{\n    nrf_gpio_cfg_default(PIN_GPS_PPS);\n    detachInterrupt(PIN_GPS_PPS);\n    detachInterrupt(PIN_BUTTON1);\n}"
  },
  {
    "path": "variants/nrf52840/heltec_mesh_solar/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_HELTEC_NRF_\n#define _VARIANT_HELTEC_NRF_\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define PIN_LED1 (32 + 15) // green (confirmed on 1.0 board)\n#define LED_BLUE PIN_LED1  // fake for bluefruit library\n#define LED_GREEN PIN_LED1\n#define LED_STATE_ON 0 // State when LED is lit\n\n// #define HAS_NEOPIXEL                         // Enable the use of neopixels\n// #define NEOPIXEL_COUNT 1                     // How many neopixels are connected\n// #define NEOPIXEL_DATA (32 + 15)              // gpio pin used to send data to the neopixels\n// #define NEOPIXEL_TYPE (NEO_GRB + NEO_KHZ800) // type of neopixels in use\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 10)\n// #define PIN_BUTTON2 (0 + 18)      // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular\n// GPIO\n\n/*\nNo longer populated on PCB\n*/\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n/*\n * I2C\n */\n\n#define WIRE_INTERFACES_COUNT 2\n\n#ifndef HELTEC_MESH_SOLAR_OLED\n// I2C bus 0\n#define PIN_WIRE_SDA (0 + 6)\n#define PIN_WIRE_SCL (0 + 26)\n#endif\n\n// I2C bus 1\n// Available on header pins, for general use\n#define PIN_WIRE1_SDA (0 + 30)\n#define PIN_WIRE1_SCL (0 + 5)\n\n/*\n * Lora radio\n */\n\n#define USE_SX1262\n// #define USE_SX1268\n#define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead\n#define LORA_CS (0 + 24)\n#define SX126X_DIO1 (0 + 20)\n// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching\n// #define SX1262_DIO3 (0 + 21)\n// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the\n//    main\n// CPU?\n#define SX126X_BUSY (0 + 17)\n#define SX126X_RESET (0 + 25)\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n/*\n * GPS pins\n */\n\n#define GPS_L76K\n\n// #define PIN_GPS_RESET (32 + 6) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n// #define GPS_RESET_MODE LOW\n// #define PIN_GPS_EN (21)\n#define PERIPHERAL_WARMUP_MS 1000 // Make sure I2C QuickLink has stable power before continuing\n#define VEXT_ON_VALUE HIGH\n// #define GPS_EN_ACTIVE HIGH\n#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake\n#define PIN_GPS_PPS (32 + 4)\n// Seems to be missing on this new board\n// #define PIN_GPS_PPS (32 + 4)  // Pulse per second input from the GPS\n#define GPS_TX_PIN (32 + 7) // This is for bits going TOWARDS the CPU\n#define GPS_RX_PIN (32 + 5) // This is for bits going TOWARDS the GPS\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n/*\n * SPI Interfaces\n */\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (0 + 23)\n#define PIN_SPI_MOSI (0 + 22)\n#define PIN_SPI_SCK (0 + 19)\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n// Hardware watchdog\n#define HAS_HARDWARE_WATCHDOG\n#define HARDWARE_WATCHDOG_DONE (0 + 9)\n#define HARDWARE_WATCHDOG_WAKE (0 + 10)\n#define HARDWARE_WATCHDOG_TIMEOUT_MS (6 * 60 * 1000) // 6 minute watchdog\n\n#define BQ4050_SDA_PIN (32 + 1)                // I2C data line pin\n#define BQ4050_SCL_PIN (32 + 0)                // I2C clock line pin\n#define BQ4050_EMERGENCY_SHUTDOWN_PIN (32 + 3) // Emergency shutdown pin\n\n#define SERIAL_PRINT_PORT 0\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/meshlink/platformio.ini",
    "content": "; MeshLink board developed by LoraItalia. NRF52840, eByte E22900M22S (Will also come with other frequencies), 25w MPPT solar charger (5v,12v,18v selectable), support for gps, buzzer, oled or e-ink display, 10 gpios, hardware watchdog\n; https://www.loraitalia.it\n; firmware for boards with or without oled display\n[env:meshlink]\nextends = nrf52840_base\nboard = meshlink\nboard_level = extra\n;board_check = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/meshlink\n  -D MESHLINK\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\n  \nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/meshlink>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds\n;upload_protocol = jlink\n\n[env:meshlink_eink]\nextends = nrf52840_base\nboard = meshlink\nboard_level = extra\n;board_check = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/meshlink\n  -D MESHLINK\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\n  -D USE_EINK\n  -D EINK_DISPLAY_MODEL=GxEPD2_213_B74\n  -D EINK_WIDTH=250\n  -D EINK_HEIGHT=122\n  -D USE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -D EINK_LIMIT_FASTREFRESH=5           ; How many consecutive fast-refreshes are permitted\n  -D EINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  -D EINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n  -D EINK_LIMIT_GHOSTING_PX=2000        ; (Optional) How much image ghosting is tolerated\n  -D EINK_BACKGROUND_USES_FAST         ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -D EINK_HASQUIRK_VICIOUSFASTREFRESH   ; Identify that pixels drawn by fast-refresh are harder to clear\n\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/meshlink>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds\n;upload_protocol = jlink"
  },
  {
    "path": "variants/nrf52840/meshlink/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(PIN_LED1, OUTPUT);\n    digitalWrite(PIN_LED1, HIGH); // turn off the white led while booting\n                                  // otherwise it will stay lit for several seconds (could be annoying)\n\n#ifdef PIN_WD_EN\n    pinMode(PIN_WD_EN, OUTPUT);\n    digitalWrite(PIN_WD_EN, HIGH); // Enable the Watchdog at boot\n#endif\n}\n\nvoid variant_shutdown()\n{\n#ifdef PIN_WD_EN\n    digitalWrite(PIN_WD_EN, LOW);\n#endif\n}"
  },
  {
    "path": "variants/nrf52840/meshlink/variant.h",
    "content": "#ifndef _VARIANT_MESHLINK_\n#define _VARIANT_MESHLINK_\n#ifndef MESHLINK\n#define MESHLINK\n#endif\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n// #define USE_LFXO // Board uses 32khz crystal for LF\n#define USE_LFRC // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (2)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define BUTTON_PIN (-1) // If defined, this will be used for user button presses,\n#define BUTTON_NEED_PULLUP\n\n// LEDs\n#define PIN_LED1 (24) // Built in white led for status\n#define LED_BLUE PIN_LED1\n\n#define LED_STATE_ON 0 // State when LED is lit\n\n// Testing USB detection\n// #define NRF_APM\n\n/*\n * Analog pins\n */\n#define PIN_A1 (3) // P0.03/AIN1\n#define ADC_RESOLUTION 14\n\n// Other pins\n// #define PIN_AREF (2)\n// static const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (32 + 8)\n#define PIN_SERIAL1_TX (7)\n#define SERIAL_PRINT_PORT 0\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (8)\n#define PIN_SPI_MOSI (32 + 9)\n#define PIN_SPI_SCK (11)\n\n#define PIN_SPI1_MISO (23)\n#define PIN_SPI1_MOSI (21)\n#define PIN_SPI1_SCK (19)\n\nstatic const uint8_t SS = 12;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n// #define USE_EINK\n\n#define PIN_EINK_CS (15)\n#define PIN_EINK_BUSY (16)\n#define PIN_EINK_DC (14)\n#define PIN_EINK_RES (17)\n#define PIN_EINK_SCLK (19)\n#define PIN_EINK_MOSI (21) // also called SDI\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (1)\n#define PIN_WIRE_SCL (27)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 19\n#define PIN_QSPI_CS 22\n#define PIN_QSPI_IO0 21\n#define PIN_QSPI_IO1 23\n#define PIN_QSPI_IO2 32\n#define PIN_QSPI_IO3 20\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES W25Q16JVUXIQ\n#define EXTERNAL_FLASH_USE_QSPI\n\n#define USE_SX1262\n#define SX126X_CS (12)\n#define SX126X_DIO1 (32 + 1)\n#define SX126X_BUSY (32 + 3)\n#define SX126X_RESET (6)\n// #define SX126X_RXEN (13)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// pin 25 is used to enable or disable the watchdog. This pin has to be disabled when cpu is put to sleep\n// otherwise the timer will expire and wd will reboot the cpu\n#define PIN_WD_EN (25)\n\n#define PIN_GPS_PPS (26) // Pulse per second input from the GPS\n\n#define GPS_TX_PIN PIN_SERIAL1_TX // This is for bits going TOWARDS the CPU\n#define GPS_RX_PIN PIN_SERIAL1_RX // This is for bits going TOWARDS the GPS\n\n// #define GPS_THREAD_INTERVAL 50\n\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n#define PIN_GPS_EN (0)\n#define GPS_EN_ACTIVE LOW\n\n#define PIN_BUZZER (31) // P0.31/AIN7\n\n// Battery\n// The battery sense is hooked to pin A0 (2)\n#define BATTERY_PIN (2)\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.42 // fine tuning of voltage\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n#endif\n"
  },
  {
    "path": "variants/nrf52840/meshtiny/platformio.ini",
    "content": "; MeshTiny - Custom device based on GAT562 with encoder and buzzer support\n[env:meshtiny]\nextends = nrf52840_base\nboard = meshtiny\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags} -Ivariants/nrf52840/meshtiny -D MESHTINY\n  -D USE_PIN_BUZZER\n  -D MESHTASTIC_EXCLUDE_GPS=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/meshtiny>\n"
  },
  {
    "path": "variants/nrf52840/meshtiny/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED_BLUE\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(LED_BLUE, OUTPUT);\n    ledOff(LED_BLUE);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n\n    // Initialize Encoder pins\n    pinMode(INPUTDRIVER_ENCODER_UP, INPUT_PULLUP);\n    pinMode(INPUTDRIVER_ENCODER_DOWN, INPUT_PULLUP);\n    pinMode(INPUTDRIVER_ENCODER_BTN, INPUT_PULLUP);\n\n    // Initialize Buzzer pin\n    pinMode(PIN_BUZZER, OUTPUT);\n    digitalWrite(PIN_BUZZER, LOW);\n}\n"
  },
  {
    "path": "variants/nrf52840/meshtiny/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_MESHTINY_\n#define _VARIANT_MESHTINY_\n\n#ifndef MESHTINY\n#define MESHTINY\n#endif\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Encoder\n */\n#define INPUTDRIVER_ENCODER_TYPE 2\n#define INPUTDRIVER_ENCODER_UP 26\n#define INPUTDRIVER_ENCODER_DOWN 4\n#define INPUTDRIVER_ENCODER_BTN 28\n#define UPDOWN_LONG_PRESS_REPEAT_INTERVAL 150\n\n/*\n * Buzzer - PWM\n */\n#define PIN_BUZZER 30\n\n/*\n * Buttons\n */\n\n#define CANCEL_BUTTON_PIN 9\n#define BUTTON_NEED_PULLUP\n#define CANCEL_BUTTON_ACTIVE_LOW true\n#define CANCEL_BUTTON_ACTIVE_PULLUP false\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n#define HAS_SCREEN 1\n#define USE_SSD1306\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 22  // Changed from 26 to avoid conflict with encoder\n#define PIN_QSPI_IO0 27 // Changed from 30 to avoid conflict with buzzer\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 21 // Changed from 28 to avoid conflict with encoder button\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n#define PIN_3V3_EN (34)\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/monteops_hw1/platformio.ini",
    "content": "; MonteOps M.Node/M.Backbone/M.Eagle hardware based on hardware variant #1 (RAK4630 based)\n[env:monteops_hw1]\nboard_level = extra\nextends = nrf52840_base\nboard = wiscore_rak4631\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/monteops_hw1\n  -D MONTEOPS_HW1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/monteops_hw1> +<mesh/eth/> +<mesh/api/> +<mqtt/>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  ${networking_base.lib_deps}\n  # renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S\n  https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n"
  },
  {
    "path": "variants/nrf52840/monteops_hw1/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n}\n"
  },
  {
    "path": "variants/nrf52840/monteops_hw1/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_MOPS_HW1_\n#define _VARIANT_MOPS_HW1_\n\n#define RAK4630\n\n// MonteOps hardware design variant\n#ifndef MONTEOPS_HW1\n#define MONTEOPS_HW1\n#endif\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36) // Connected to WWAN host LED (if present)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n// #define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2)\n   A1        <->  P0.31/AIN7 (Arduino Analog A7)\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10 \tNSS \tSPI NSS (Arduino GPIO number 42)\nP1.11 \tSCK \tSPI CLK (Arduino GPIO number 43)\nP1.12 \tMOSI \tSPI MOSI (Arduino GPIO number 44)\nP1.13 \tMISO \tSPI MISO (Arduino GPIO number 45)\nP1.14 \tBUSY \tBUSY signal (Arduino GPIO number 46)\nP1.15 \tDIO1 \tDIO1 event interrupt (Arduino GPIO number 47)\nP1.06 \tNRESET \tNRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n\n#define SX126X_DIO2_AS_RF_SWITCH // DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n#define PIN_GPS_RESET (34) // Must be P1.02\n// #define PIN_GPS_EN\n// #define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (1.73F)\n\n#define HAS_ETHERNET 1\n\n#define PIN_ETHERNET_RESET 21\n#define PIN_ETHERNET_SS 26 // P0.26 QSPI_CS\n#define ETH_SPI_PORT SPI1\n#define AQ_SET_PIN 10\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/muzi_base/platformio.ini",
    "content": "[env:muzi-base]\ncustom_meshtastic_hw_model = 93\ncustom_meshtastic_hw_model_slug = MUZI_BASE\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = muzi BASE\ncustom_meshtastic_images = muzi_base.svg\ncustom_meshtastic_tags = muzi\n\nextends = nrf52840_base\nboard = muzi-base\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/muzi_base\n  -D MUZI_BASE\n  -D CONFIG_NFCT_PINS_AS_GPIOS=1\n  -L \"${platformio.libdeps_dir}/${this.__env__}/bsec2/src/cortex-m4/fpv4-sp-d16-hard\"\n\nbuild_src_filter = ${nrf52840_base.build_src_filter} +<../variants/nrf52840/muzi_base>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=ArtronShop_RX8130CE packageName=artronshop/library/ArtronShop_RX8130CE\n  artronshop/ArtronShop_RX8130CE@1.0.0\n"
  },
  {
    "path": "variants/nrf52840/muzi_base/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {LOW, HIGH}},   {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/muzi_base/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0,\n    1,\n    2,\n    3,\n    4,\n    5,\n    6,\n    7,\n    8,\n    9,\n    10,\n    11,\n    12,\n    13,\n    14,\n    15,\n    16,\n    17,\n    18,\n    19,\n    20,\n    21,\n    22,\n    23,\n    24,\n    25,\n    26,\n    27,\n    28,\n    29,\n    30,\n    31,\n\n    // P1\n    32,\n    33,\n    34,\n    35,\n    36,\n    37,\n    38,\n    39,\n    40,\n    41,\n    42,\n    43,\n    44,\n    45,\n    46,\n    47,\n};\n\nvoid initVariant()\n{\n    // Initialize the digital pins as inputs or outputs\n    pinMode(PIN_LED1, OUTPUT);\n    digitalWrite(PIN_LED1, HIGH);\n\n    pinMode(LED_BLUE, OUTPUT);\n    digitalWrite(LED_BLUE, HIGH);\n\n    // Initialize LoRa pins\n    pinMode(SX126X_RESET, OUTPUT);\n    digitalWrite(SX126X_RESET, HIGH);\n\n    pinMode(SX126X_CS, OUTPUT);\n    digitalWrite(SX126X_CS, HIGH);\n\n    pinMode(GPS_EN_GPIO, OUTPUT);\n    digitalWrite(GPS_EN_GPIO, HIGH); // GPS on initially\n\n    pinMode(SCREEN_12V_ENABLE, OUTPUT);\n    digitalWrite(SCREEN_12V_ENABLE, LOW); //\n\n    pinMode(BATTERY_CHARGING_INV, INPUT);\n}\n"
  },
  {
    "path": "variants/nrf52840/muzi_base/variant.h",
    "content": "#pragma once\n\n#ifndef _VARIANT_MUZI_BASE_\n#define _VARIANT_MUZI_BASE_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// Define I2C Peripherals\n#define WIRE_INTERFACES_COUNT 2\n\n// this is the OLED bus\n#define PIN_WIRE_SDA (0 + 24) // P0.24\n#define PIN_WIRE_SCL (0 + 25) // P0.25\n\n// IMU bus\n#define PIN_WIRE1_SDA (0 + 04) // P0.04\n#define PIN_WIRE1_SCL (0 + 06) // P0.06\n\n#define COMPASS_ORIENTATION meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270\n#define HAS_ICM20948 // forces the i2c address to be seen as this sensor\n\n#define RX8130CE_RTC 0x32\n\n// LEDs\n#define PIN_LED1 (32 + 3) // P1.03, Green\n#define LED_BLUE (32 + 4) // P1.04, Blue\n\n#define LED_NOTIFICATION LED_BLUE\n#define LED_STATE_ON 0 // State when LED is lit\n\n// Buttons\n#define HAS_TRACKBALL 1\n#define TB_UP (0 + 21)\n#define TB_DOWN (0 + 17)\n#define TB_LEFT (32 + 05)\n#define TB_RIGHT (0 + 16)\n#define TB_PRESS (0 + 10)\n#define TB_DIRECTION FALLING\n\n#define CANCEL_BUTTON_PIN (0 + 15) // P0.15\n#define CANCEL_BUTTON_ACTIVE_LOW true\n#define CANCEL_BUTTON_ACTIVE_PULLUP false\n\n// Switch\n#define SWITCH_MODE1 (32 + 9) // P1.09, Top Position\n#define SWITCH_MODE2 (0 + 12) // P0.12, Middle Position\n#define PIN_GPS_SWITCH SWITCH_MODE2\n\n/*\n * SPI Interfaces\n */\n\n#define SPI_INTERFACES_COUNT 1\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (32 + 15) // P1.15\n#define PIN_SPI_MOSI (32 + 14) // P1.14\n#define PIN_SPI_SCK (32 + 13)  // P1.13\n\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS (32 + 12) // P1.12\n\n#define USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 (32 + 6)   // P1.06\n#define SX126X_BUSY (32 + 11)  // P1.11\n#define SX126X_RESET (32 + 10) // P1.10\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 3.3\n\n#define USE_LR1121\n#define LR1121_IRQ_PIN (32 + 8)     // P1.08\n#define LR1121_NRESET_PIN (32 + 10) // P1.10\n#define LR1121_BUSY_PIN (32 + 11)   // P1.11\n#define LR1121_SPI_NSS_PIN LORA_CS\n#define LR1121_SPI_SCK_PIN LORA_SCK\n#define LR1121_SPI_MOSI_PIN LORA_MOSI\n#define LR1121_SPI_MISO_PIN LORA_MISO\n#define LR11X0_DIO3_TCXO_VOLTAGE 3.0\n#define LR11X0_DIO_AS_RF_SWITCH\n\n// GPS\n#define GPS_RX_PIN (0 + 20)  // P0.20\n#define GPS_TX_PIN (0 + 19)  // P0.19\n#define GPS_EN_GPIO (32 + 1) // P1.01\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n#define PIN_BUZZER (0 + 22) // P0.22\n\n// Battery monitoring\n#define BATTERY_PIN (0 + 31) // P0.31\n\n// #define CHARGER_FAULT (0 + 27) // P0.27\n#define BATTERY_CHARGING_INV (32 + 02) // P1.02\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#define ADC_MULTIPLIER 1.537\n\n#define OCV_ARRAY 4050, 4010, 3990, 3930, 3870, 3820, 3740, 3630, 3550, 3450, 3100\n\n// Display - I2C display\n#define HAS_SCREEN 1\n#define SCREEN_12V_ENABLE (0 + 23) // P0.23\n#define USE_SH1107\n\n#define USERPREFS_OEM_TEXT \"muzi_works_logo\"\n#define USERPREFS_OEM_FONT_SIZE 0\n#define USERPREFS_OEM_IMAGE_WIDTH 88  // 11 bytes wide\n#define USERPREFS_OEM_IMAGE_HEIGHT 47 // 517 bytes total\n#define USERPREFS_OEM_IMAGE_DATA                                                                                                 \\\n    {                                                                                                                            \\\n        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF,  \\\n            0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    \\\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    \\\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x03, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    \\\n            0xF7, 0x0F, 0xFF, 0x00, 0xF0, 0xFF, 0x0F, 0xC0, 0xFF, 0x07, 0x78, 0xFF, 0x9F, 0xFF, 0x01, 0xF0, 0xFF, 0x0F, 0xC0,    \\\n            0xFF, 0x03, 0x78, 0x3F, 0xFE, 0xF3, 0x01, 0xF0, 0xFF, 0x0F, 0x00, 0xE0, 0x03, 0x78, 0x1F, 0xFC, 0xC0, 0x03, 0xF0,    \\\n            0xFF, 0x0F, 0x00, 0xE0, 0x01, 0x78, 0x0F, 0xF8, 0x80, 0x03, 0xF0, 0xFF, 0x0F, 0x00, 0xF0, 0x00, 0x78, 0x0F, 0x78,    \\\n            0x80, 0x03, 0xF0, 0xFF, 0x0F, 0x00, 0x70, 0x00, 0x78, 0x07, 0x70, 0x80, 0x03, 0xF0, 0xFF, 0x0F, 0x00, 0x78, 0x00,    \\\n            0x78, 0x07, 0x70, 0x80, 0x03, 0xF0, 0xFF, 0x0F, 0x00, 0x3C, 0x00, 0x78, 0x07, 0x70, 0x80, 0x03, 0xF0, 0xFF, 0x0F,    \\\n            0x00, 0x1C, 0x00, 0x78, 0x07, 0x70, 0x80, 0x03, 0xF0, 0xFF, 0x0F, 0x00, 0x1E, 0x00, 0x78, 0x07, 0x70, 0x80, 0x03,    \\\n            0xE0, 0xFF, 0x0F, 0x00, 0x0F, 0x00, 0x78, 0x07, 0x70, 0x80, 0x03, 0xE0, 0xFF, 0x07, 0x80, 0x07, 0x00, 0x78, 0x07,    \\\n            0x70, 0x80, 0x03, 0xC0, 0xFF, 0x07, 0x80, 0x07, 0x00, 0x78, 0x07, 0x70, 0x80, 0x03, 0xC0, 0xFF, 0x03, 0xC0, 0xFF,    \\\n            0x07, 0x78, 0x07, 0x70, 0x80, 0x03, 0x00, 0xFF, 0x01, 0xE0, 0xFF, 0x07, 0x78, 0x07, 0x70, 0x80, 0x03, 0x00, 0x7C,    \\\n            0x00, 0xF0, 0xFF, 0x07, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    \\\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    \\\n            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,    \\\n            0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,    \\\n            0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xE3, 0xE7, 0xC7, 0x1F, 0xF8, 0x0F, 0xF0, 0xE7, 0xE3, 0x07, 0x7C, 0xC7, 0xE7,    \\\n            0xC3, 0x0F, 0xE0, 0x07, 0xE0, 0xC7, 0xE1, 0x03, 0x70, 0xC7, 0xC3, 0xE3, 0x87, 0xC1, 0x07, 0xC0, 0xC7, 0xF8, 0xE3,    \\\n            0x71, 0xC7, 0xC3, 0xE3, 0xE3, 0xC7, 0xC7, 0xC7, 0x47, 0xF8, 0xF3, 0x7F, 0x8F, 0xC3, 0xF1, 0xE3, 0x8F, 0xC7, 0x8F,    \\\n            0x27, 0xFC, 0xE3, 0x7F, 0x8F, 0x81, 0xF1, 0xF1, 0x8F, 0xC7, 0xCF, 0x07, 0xFE, 0x03, 0x7E, 0x8F, 0x99, 0xF1, 0xF1,    \\\n            0x8F, 0x07, 0xC0, 0x07, 0xFF, 0x07, 0x78, 0x9F, 0x99, 0xF9, 0xF1, 0x8F, 0x07, 0xE0, 0x07, 0xFE, 0x3F, 0x70, 0x1F,    \\\n            0x18, 0xF8, 0xF3, 0x8F, 0x07, 0xF0, 0x27, 0xFC, 0xFF, 0x71, 0x3F, 0x18, 0xF8, 0xE3, 0xC7, 0xC7, 0xF1, 0x47, 0xF8,    \\\n            0xF3, 0x63, 0x3F, 0x3C, 0xFC, 0xC3, 0xC3, 0xC7, 0xE3, 0xC7, 0xF0, 0xE1, 0x71, 0x3F, 0x3C, 0xFC, 0x07, 0xE0, 0xC7,    \\\n            0xC7, 0xC7, 0xE1, 0x03, 0x70, 0x7F, 0x7E, 0xFE, 0x0F, 0xF0, 0xC7, 0x87, 0xC7, 0xC3, 0x07, 0x78, 0xFF, 0xFF, 0xFF,    \\\n            0x7F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F,    \\\n            0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,    \\\n            0xFF, 0xFF, 0x7F                                                                                                     \\\n    }\n\n// QSPI Pins\n#define PIN_QSPI_SCK (0 + 3)\n#define PIN_QSPI_CS (0 + 26)\n#define PIN_QSPI_IO0 (0 + 30)\n#define PIN_QSPI_IO1 (0 + 29)\n#define PIN_QSPI_IO2 (0 + 28)\n#define PIN_QSPI_IO3 (0 + 2)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES W25Q32JVSS\n#define EXTERNAL_FLASH_USE_QSPI\n\n#define SERIAL_PRINT_PORT 0\n\n// NFC is disabled via CONFIG_NFCT_PINS_AS_GPIOS=1 build flag\n// This configures P0.09 and P0.10 as regular GPIO pins instead of NFC pins\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n#ifdef __cplusplus\n#endif\n\n#endif // _VARIANT_MUZI_BASE_"
  },
  {
    "path": "variants/nrf52840/nano-g2-ultra/platformio.ini",
    "content": "; First prototype eink/nrf52840/sx1262 device\n[env:nano-g2-ultra]\ncustom_meshtastic_hw_model = 18\ncustom_meshtastic_hw_model_slug = NANO_G2_ULTRA\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 2\ncustom_meshtastic_display_name = Nano G2 Ultra\ncustom_meshtastic_images = nano-g2-ultra.svg\ncustom_meshtastic_tags = B&Q\n\nextends = nrf52840_base\nboard = nano-g2-ultra\ndebug_tool = jlink\n\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/nano-g2-ultra\n  -D NANO_G2_ULTRA\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/nano-g2-ultra>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n;upload_protocol = fs\n"
  },
  {
    "path": "variants/nrf52840/nano-g2-ultra/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // Nothing need to be inited for now\n}"
  },
  {
    "path": "variants/nrf52840/nano-g2-ultra/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_Nano_G2_\n#define _VARIANT_Nano_G2_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// #define USE_LFRC  // Board uses 32khz RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define LED_STATE_ON 0 // State when LED is lit\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 6)\n\n#define EXT_NOTIFY_OUT (0 + 4) // Default pin to use for Ext Notify Module.\n\n/*\n * Analog pins\n */\n#define PIN_A4 (0 + 2) // Battery ADC\n\n#define BATTERY_PIN PIN_A4\n\nstatic const uint8_t A4 = PIN_A4;\n\n#define ADC_RESOLUTION 14\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL2_RX (0 + 22)\n#define PIN_SERIAL2_TX (0 + 20)\n\n/**\n    Wire Interfaces\n    */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 17)\n#define PIN_WIRE_SCL (0 + 15)\n\n/*\nExternal serial flash W25Q16JV_IQ\n*/\n\n// QSPI Pins\n#define PIN_QSPI_SCK (0 + 8)\n#define PIN_QSPI_CS (32 + 7)\n#define PIN_QSPI_IO0 (0 + 6)  // MOSI if using two bit interface\n#define PIN_QSPI_IO1 (0 + 26) // MISO if using two bit interface\n#define PIN_QSPI_IO2 (32 + 4) // WP if using two bit interface (i.e. not used)\n#define PIN_QSPI_IO3 (32 + 2) // HOLD if using two bit interface (i.e. not used)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES W25Q16JV_IQ\n#define EXTERNAL_FLASH_USE_QSPI\n\n/*\n * Lora radio\n */\n\n#define USE_SX1262\n#define SX126X_CS (32 + 13) // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 (32 + 10)\n// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching\n// #define SX1262_DIO3 (0 + 21)\n// This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the main CPU?\n#define SX126X_BUSY (32 + 11)\n#define SX126X_RESET (32 + 15)\n//  DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// #define LORA_DISABLE_SENDING // Define this to disable transmission for testing (power testing etc...)\n\n// #undef SX126X_CS\n\n/*\n * GPS pins\n */\n\n#define GPS_L76K\n\n#define PIN_GPS_STANDBY (0 + 13) // An output to wake GPS, low means allow sleep, high means force wake STANDBY\n#define GPS_TX_PIN (0 + 10)      // This is for bits going FROM the CPU\n#define GPS_RX_PIN (0 + 9)       // This is for bits going FROM the GPS\n\n// #define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n\n// PCF8563 RTC Module\n#define PIN_RTC_INT (0 + 14) // Interrupt from the PCF8563 RTC\n#define PCF8563_RTC 0x51\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 1\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (32 + 9)\n#define PIN_SPI_MOSI (0 + 11)\n#define PIN_SPI_SCK (0 + 12)\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n// Battery\n// The battery sense is hooked to pin A0 (2)\n// it is defined in the anlaolgue pin section of this file\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (2.0F)\n\n/**\n    OLED Screen Model\n    */\n#define ARDUINO_ARCH_AVR\n#define USE_SH1107_128_64\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/nrf52.ini",
    "content": "[nrf52_base]\n; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files\nplatform =\n  # renovate: datasource=custom.pio depName=platformio/nordicnrf52 packageName=platformio/platform/nordicnrf52\n  platformio/nordicnrf52@10.11.0\nextends = arduino_base\nplatform_packages =\n  ; our custom Git version with C++17 support in platform.txt\n  # TODO renovate\n  platformio/framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino#cpp17-platform\n  ; Don't renovate toolchain-gccarmnoneeabi\n  platformio/toolchain-gccarmnoneeabi@~1.90301.0\n\nextra_scripts =\n  ${env.extra_scripts}\n  extra_scripts/nrf52_extra.py\n\nbuild_type = release\nbuild_flags =\n  -include variants/nrf52840/cpp_overrides/lfs_util.h\n  ${arduino_base.build_flags}\n  -Wno-unused-variable\n  -Isrc/platform/nrf52\n  -DLFS_NO_ASSERT                      ; Disable LFS assertions , see https://github.com/meshtastic/firmware/pull/3818\n  -DMESHTASTIC_EXCLUDE_AUDIO=1\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1\n  -Os\nbuild_unflags =\n  -Ofast\n  -Og\n  -ggdb3\n  -ggdb2\n  -g3\n  -g2\n  -g\n  -g1\n  -g0\n  -std=c++11\n  -std=gnu++11\n\nbuild_src_filter = \n  ${arduino_base.build_src_filter} -<platform/esp32/> -<platform/stm32wl> -<nimble/> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<modules/esp32> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp> -<serialization/>\n\nlib_deps=\n  ${arduino_base.lib_deps}\n  ${radiolib_base.lib_deps}\n  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto\n  rweather/Crypto@0.4.0\n\nlib_ignore =\n  BluetoothOTA\n  lvgl\n"
  },
  {
    "path": "variants/nrf52840/nrf52832.ini",
    "content": "[nrf52832_base]\nextends = nrf52_base\n\nbuild_flags =\n  ${nrf52_base.build_flags}\n  -DSERIAL_BUFFER_SIZE=1024\n"
  },
  {
    "path": "variants/nrf52840/nrf52840.ini",
    "content": "[nrf52840_base]\nextends = nrf52_base\n\nbuild_flags =\n   ${nrf52_base.build_flags}\n  -DSERIAL_BUFFER_SIZE=4096\n\nlib_deps =\n  ${nrf52_base.lib_deps}\n  ${environmental_base.lib_deps}\n  ${environmental_extra.lib_deps}\n  # renovate: datasource=git-refs depName=Kongduino-Adafruit_nRFCrypto packageName=https://github.com/Kongduino/Adafruit_nRFCrypto gitBranch=master\n  https://github.com/Kongduino/Adafruit_nRFCrypto/archive/8cde7189b5ead9dcd49f72601b43b969c0bbc06e.zip\n\n; Common NRF52 debugging settings follow.  See the Meshtastic developer docs for how to connect SWD debugging probes to your board.\n\n; We want the initial breakpoint at setup() instead of main().  Also we want to enable semihosting at that point so instead of\ndebug_init_break = tbreak setup\n; we just turn off the platformio tbreak and do it in .gdbinit (where we have more flexibility for scripting)\n; also we use a permanent breakpoint so it gets reused each time we restart the debugging session?\n; debug_init_break = tbreak main\n\n; Note: add \"monitor arm semihosting_redirect tcp 4444 all\" if you want the stdout from the device to go to that port number instead\n; (for use by meshtastic command line)\n;  monitor arm semihosting disable\n;  monitor debug_level 3\n;\n; IMPORTANT: fileio must be disabled before using port 5555 - openocd ver 0.12 has a bug where if enabled it never properly parses the special :tt name\n; for stdio access.\n;   monitor arm semihosting_redirect tcp 5555 stdio\n\n; Also note: it is _impossible_ to do non blocking reads on the semihost console port (an oversight when ARM specified the semihost API).\n; So we'll neve be able to general purpose bi-directional communication with the device over semihosting.\ndebug_extra_cmds =\n  echo Running .gdbinit script\n  ;monitor arm semihosting enable\n  ;monitor arm semihosting_fileio enable\n  ;monitor arm semihosting_redirect disable\n  commands 1\n  ; echo Breakpoint at setup() has semihosting console, connect to it with \"telnet localhost 5555\"\n  ; set wantSemihost = 1\n  set useSoftDevice = 0\n  end\n\n  ; Only reprogram the board if the code has changed\ndebug_load_mode = modified\n;debug_load_mode = manual\n; We default to the stlink adapter because it is very cheap and works well, though others (such as jlink) are also supported.\n;debug_tool = jlink\ndebug_tool = stlink\ndebug_speed = 4000\n;debug_tool = custom\n; debug_server =\n;  openocd\n;  -f\n;  /usr/local/share/openocd/scripts/interface/stlink.cfg\n;  -f\n;  /usr/local/share/openocd/scripts/target/nrf52.cfg\n; $PLATFORMIO_CORE_DIR/packages/tool-openocd/openocd/scripts/interface/cmsis-dap.cfg\n\n; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)\n; programming time is about the same as the bootloader version.\n; For information on this see the meshtastic developers documentation for \"Development on the NRF52\"\n; We manually pass in the elf file so that pyocd can reverse engineer FreeRTOS data (running threads, etc...)\n;debug_server =\n;  pyocd\n;  gdbserver\n;  -j\n;  ${platformio.workspace_dir}/..\n;  -t\n;  nrf52840\n;  --semihosting\n;  --elf\n;  ${platformio.build_dir}/${this.__env__}/firmware.elf\n\n; If you want to debug the semihosting support you can turn on extra logging in pyocd with\n;   -L\n;   pyocd.debug.semihost.trace=debug\n\n; The following is not needed because it automatically tries do this\n;debug_server_ready_pattern = -.*GDB server started on port \\d+.*\n;debug_port = localhost:3333"
  },
  {
    "path": "variants/nrf52840/r1-neo/platformio.ini",
    "content": "; The R1 Neo board\n[env:r1-neo]\ncustom_meshtastic_hw_model = 101\ncustom_meshtastic_hw_model_slug = MUZI_R1_NEO\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = muzi R1 Neo\ncustom_meshtastic_images = muzi_r1_neo.svg\ncustom_meshtastic_tags = muzi\n\nextends = nrf52840_base\nboard = r1-neo\nboard_check = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/r1-neo\n  -D R1_NEO\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/r1-neo> +<mesh/api/> +<mqtt/>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  ${networking_base.lib_deps}\n  # renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S\n  https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip\n  # renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library\n  rakwireless/RAKwireless NCP5623 RGB LED library@1.0.3\n  # renovate: datasource=custom.pio depName=ArtronShop_RX8130CE packageName=artronshop/library/ArtronShop_RX8130CE\n  artronshop/ArtronShop_RX8130CE@1.0.0\n"
  },
  {
    "path": "variants/nrf52840/r1-neo/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    // pinMode(PIN_3V3_EN, OUTPUT);\n    // digitalWrite(PIN_3V3_EN, HIGH);\n}\n\nvoid earlyInitVariant()\n{\n    pinMode(DCDC_EN_HOLD, OUTPUT);\n    digitalWrite(DCDC_EN_HOLD, HIGH);\n    pinMode(NRF_ON, OUTPUT);\n    digitalWrite(NRF_ON, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/r1-neo/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_R1NEO_\n#define _VARIANT_R1NEO_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (32 + 4) // P1.04 Controls Green LED\n#define LED_BLUE (28)     // P0.28 Controls Blue LED\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n// Button\n#define PIN_BUTTON1 (26)\n#define BUTTON_ACTIVE_LOW 0\n#define BUTTON_ACTIVE_PULLUP 0\n#define BUTTON_SENSE_TYPE INPUT_SENSE_HIGH\n\n#define ADC_RESOLUTION 14\n\n// Serial for GPS\n#define PIN_SERIAL1_RX (25)\n#define PIN_SERIAL1_TX (24)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n// R1 Neo Extras\n#define DCDC_EN_HOLD (13) // P0.13 Keeps DCDC alive after user button  is pressed\n#define NRF_ON (29)       // P0.29 Tells IO controller device is on\n\n// RAKRGB\n#define HAS_NCP5623\n\n#define HAS_SCREEN 0\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (19) // P0.19 RTC_SDA\n#define PIN_WIRE_SCL (20) // P0.20 RTC_SCL\n\n#define PIN_BUZZER (0 + 3) // P0.03\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n#define SX126X_POWER_EN (37)\n\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n#define PIN_GPS_EN (32 + 1) // P1.01\n#define PIN_GPS_PPS (2)     // P0.02 Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Battery\n#define BATTERY_PIN (0 + 31) // P0.31 ADC_VBAT\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.667\n#define OCV_ARRAY 4120, 4020, 4000, 3940, 3870, 3820, 3750, 3630, 3550, 3450, 3100\n\n#define RX8130CE_RTC 0x32\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/rak2560/platformio.ini",
    "content": "; Firmware for the WisMesh HUB RAK2560, including a onewire module to talk to the RAK 9154 solar battery.\n[env:rak2560]\ncustom_meshtastic_hw_model = 22\ncustom_meshtastic_hw_model_slug = WISMESH_HUB\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = RAK WisMesh Repeater\ncustom_meshtastic_images = rak2560.svg\ncustom_meshtastic_tags = RAK\n\nextends = nrf52840_base\nboard = wiscore_rak4631\nboard_check = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/rak2560\n  -D RAK_4631\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\n  -DHAS_RAKPROT=1 ; Define if RAk OneWireSerial is used (disables GPS)\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak2560> +<mesh/api/> +<mqtt/> +<serialization/>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  ${networking_base.lib_deps}\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=github-tags depName=RAK-OneWireSerial packageName=beegee-tokyo/RAK-OneWireSerial\n  https://github.com/beegee-tokyo/RAK-OneWireSerial/archive/0.0.2.zip\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n"
  },
  {
    "path": "variants/nrf52840/rak2560/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak2560/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK2560_\n#define _VARIANT_RAK2560_\n\n#define RAK4630\n#define RAK2560\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Serial 2\n#define PIN_SERIAL2_RX (19)\n#define PIN_SERIAL2_TX (20)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n// #define USE_EINK\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10   NSS     SPI NSS (Arduino GPIO number 42)\nP1.11   SCK     SPI CLK (Arduino GPIO number 43)\nP1.12   MOSI    SPI MOSI (Arduino GPIO number 44)\nP1.13   MISO    SPI MISO (Arduino GPIO number 45)\nP1.14   BUSY    BUSY signal (Arduino GPIO number 46)\nP1.15   DIO1    DIO1 event interrupt (Arduino GPIO number 47)\nP1.06   NRESET  NRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n#define DETECTION_SENSOR_EN 4\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n// enables 3.3V periphery like GPS or IO Module\n// Do not toggle this for GPS power savings\n#define PIN_3V3_EN (34)\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_SERIAL_PORT Serial2\n// On RAK2560 the GPS is be on a different UART\n// #define GPS_RX_PIN PIN_SERIAL2_RX\n// #define GPS_TX_PIN PIN_SERIAL2_TX\n// #define PIN_GPS_EN PIN_3V3_EN\n// Disable GPS\n// #define MESHTASTIC_EXCLUDE_GPS 1\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// RAK18001 Buzzer in Slot C\n// #define PIN_BUZZER 21 // IO3 is PWM2\n// NEW: set this via protobuf instead!\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n#define RAK_4631 1\n\n#define HALF_UART_PIN PIN_SERIAL1_RX\n\n#if defined(GPS_RX_PIN) && (GPS_RX_PIN == HALF_UART_PIN)\n#error pin 15 collision\n\n#endif\n\n#if defined(GPS_TX_PIN) && (GPS_RX_PIN == HALF_UART_PIN)\n#error pin 15 collision\n#endif\n\n#define AQ_SET_PIN 10\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/rak3401_1watt/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921\n[env:rak3401-1watt]\ncustom_meshtastic_hw_model = 117\ncustom_meshtastic_hw_model_slug = RAK3401\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = RAK3401 1W\ncustom_meshtastic_images = rak3401.svg\ncustom_meshtastic_tags = RAK\ncustom_meshtastic_requires_dfu = true\n\nextends = nrf52840_base\nboard = wiscore_rak4631\nboard_check = true\nbuild_flags = ${nrf52840_base.build_flags} \n  -Ivariants/nrf52840/rak3401_1watt\n  -D RAK_4631\n;   -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely.\n  -D RAK3401\n  -D RAK13302 ; RAK 1Watt Power Amplifier\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak3401_1watt> +<mesh/api/>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  ${networking_base.lib_deps}\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library\n  rakwireless/RAKwireless NCP5623 RGB LED library@1.0.3\n  # renovate: datasource=custom.pio depName=RAK12035_SoilMoisture packageName=beegee-tokyo/library/RAK12035_SoilMoisture\n  beegee-tokyo/RAK12035_SoilMoisture@1.0.4\n  # renovate: datasource=git-refs depName=RAK12034-BMX160 packageName=https://github.com/RAKWireless/RAK12034-BMX160 gitBranch=main\n  https://github.com/RAKWireless/RAK12034-BMX160/archive/dcead07ffa267d3c906e9ca4a1330ab989e957e2.zip\n\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds\n;upload_protocol = jlink\n\n; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)\n; programming time is about the same as the bootloader version.\n; For information on this see the meshtastic developers documentation for \"Development on the NRF52\"\n\n"
  },
  {
    "path": "variants/nrf52840/rak3401_1watt/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak3401_1watt/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK3401_\n#define _VARIANT_RAK3401_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT\n#define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT\n\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define WB_IO5 PIN_NFC1\n#define WB_IO4 (4)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (WB_I2C1_SDA)\n#define PIN_WIRE_SCL (WB_I2C1_SCL)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n// 1watt sx1262 RAK13302\n#define HW_SPI1_DEVICE 1\n\n#define LORA_SCK PIN_SPI1_SCK\n#define LORA_MISO PIN_SPI1_MISO\n#define LORA_MOSI PIN_SPI1_MOSI\n#define LORA_CS 26\n\n#define USE_SX1262\n#define SX126X_CS (26)\n#define SX126X_DIO1 (10)\n#define SX126X_BUSY (9)\n#define SX126X_RESET (4)\n\n#define SX126X_POWER_EN (21)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n// If using a power chip like the INA3221 you can override the default battery voltage channel below\n// and comment out NRF_APM to use the INA3221 instead of the USB detection for charging\n// #define INA3221_BAT_CH INA3221_CH2\n// #define INA3221_ENV_CH INA3221_CH1\n\n// enables 3.3V periphery like GPS or IO Module\n// Do not toggle this for GPS power savings\n#define PIN_3V3_EN (34)\n#define WB_IO2 PIN_3V3_EN\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// RAK18001 Buzzer in Slot C\n// #define PIN_BUZZER 21 // IO3 is PWM2\n// NEW: set this via protobuf instead!\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n#define RAK_4631 1\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/rak4631/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921\n[env:rak4631]\ncustom_meshtastic_hw_model = 9\ncustom_meshtastic_hw_model_slug = RAK4631\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = RAK WisBlock 4631\ncustom_meshtastic_images = rak4631.svg, rak4631_case.svg\ncustom_meshtastic_tags = RAK\n\nextends = nrf52840_base\nboard = wiscore_rak4631\nboard_level = pr\nboard_check = true\nbuild_type = release\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/rak4631\n  -D RAK_4631\n  -DMESHTASTIC_USE_EINK_UI=0\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\nbuild_src_filter = ${nrf52_base.build_src_filter} \\\n  +<../variants/nrf52840/rak4631> \\\n  +<mesh/eth/> \\\n  +<mesh/api/> \\\n  +<mqtt/> \\\n  -<graphics/EInkDisplay2.cpp> \\\n  -<graphics/EInkDynamicDisplay.cpp> \\\n  -<graphics/fonts/EinkDisplayFonts.cpp>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  ${networking_base.lib_deps}\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S\n  https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip\n  # renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library\n  rakwireless/RAKwireless NCP5623 RGB LED library@1.0.3\n  # renovate: datasource=custom.pio depName=RAK12035_SoilMoisture packageName=beegee-tokyo/library/RAK12035_SoilMoisture\n  beegee-tokyo/RAK12035_SoilMoisture@1.0.4\n  # renovate: datasource=git-refs depName=RAK12034-BMX160 packageName=https://github.com/RAKWireless/RAK12034-BMX160 gitBranch=main\n  https://github.com/RAKWireless/RAK12034-BMX160/archive/dcead07ffa267d3c906e9ca4a1330ab989e957e2.zip\n\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds\n;upload_protocol = jlink\n\n; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)\n; programming time is about the same as the bootloader version.\n; For information on this see the meshtastic developers documentation for \"Development on the NRF52\"\n[env:rak4631_dbg]\nextends = env:rak4631\nboard_level = extra\n\n; if the builtin version of openocd has a buggy version of semihosting, so use the external version\n; platform_packages = platformio/tool-openocd@3.1200.0\n\nbuild_flags =\n  ${env:rak4631.build_flags}\n  -D USE_SEMIHOSTING\n\nlib_deps =\n  ${env:rak4631.lib_deps}\n  # TODO renovate\n  https://github.com/geeksville/Armduino-Semihosting/archive/35b538fdf208c3530c1434cd099a08e486672ee4.zip\n\n; NOTE: the pyocd support for semihosting is buggy.  So I switched to using the builtin platformio support for the stlink adapter which worked much better.\n; However the built in openocd version in platformio has buggy support for TCP to semihosting. \n;\n; So I'm now trying the external openocd - but the openocd scripts for nrf52.cfg assume you are using a DAP adapter not an STLINK adapter.\n; In theory I could change those scripts.  But for now I'm trying going back to a DAP adapter but with the external openocd.\n\nupload_protocol = stlink\n; eventually use platformio/tool-pyocd@2.3600.0 instad\n;upload_protocol = custom\n;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE\n"
  },
  {
    "path": "variants/nrf52840/rak4631/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak4631/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK4630_\n#define _VARIANT_RAK4630_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT\n#define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT\n\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define WB_IO5 PIN_NFC1\n#define WB_IO4 (4)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n// #define USE_EINK\n\n// RAKRGB\n#define HAS_NCP5623\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (WB_I2C1_SDA)\n#define PIN_WIRE_SCL (WB_I2C1_SCL)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10   NSS     SPI NSS (Arduino GPIO number 42)\nP1.11   SCK     SPI CLK (Arduino GPIO number 43)\nP1.12   MOSI    SPI MOSI (Arduino GPIO number 44)\nP1.13   MISO    SPI MISO (Arduino GPIO number 45)\nP1.14   BUSY    BUSY signal (Arduino GPIO number 46)\nP1.15   DIO1    DIO1 event interrupt (Arduino GPIO number 47)\nP1.06   NRESET  NRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n// configure the SET pin on the RAK12039 sensor board to disable the sensor while not reading\n// air quality telemetry.  PIN_NFC2 doesn't seem to be used anywhere else in the codebase, but if\n// you're having problems with your node behaving weirdly when a RAK12039 board isn't connected,\n// try disabling this.\n#define PMSA003I_ENABLE_PIN PIN_NFC2\n\n#define DETECTION_SENSOR_EN 4\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n// If using a power chip like the INA3221 you can override the default battery voltage channel below\n// and comment out NRF_APM to use the INA3221 instead of the USB detection for charging\n// #define INA3221_BAT_CH INA3221_CH2\n// #define INA3221_ENV_CH INA3221_CH1\n\n// enables 3.3V periphery like GPS or IO Module\n// Do not toggle this for GPS power savings\n#define PIN_3V3_EN (34)\n#define WB_IO2 PIN_3V3_EN\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// RAK18001 Buzzer in Slot C\n#define PIN_BUZZER 21 // IO3 is PWM2\n// NEW: set this via protobuf instead!\n\n// RAK4631 custom ringtone\n#undef USERPREFS_RINGTONE_RTTTL\n#define USERPREFS_RINGTONE_RTTTL \"Rak:d=32,o=5,b=200:b7,p,b7,4p,p\"\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n// RAK4630 AIN0 = nrf52840 AIN3 = Pin 5\n#define BATTERY_LPCOMP_INPUT NRF_LPCOMP_INPUT_3\n\n// We have AIN3 with a VBAT divider so AIN3 = VBAT * (1.5/2.5)\n// We have the device going deep sleep under 3.1V, which is AIN3 = 1.86V\n// So we can wake up when VBAT>=VDD is restored to 3.3V, where AIN3 = 1.98V\n// 1.98/3.3 = 6/10, but that's close to the VBAT divider, so we\n// pick 6/8VDD, which means VBAT=4.1V.\n// Reference:\n// VDD=3.3V AIN3=5/8*VDD=2.06V VBAT=1.66*AIN3=3.41V\n// VDD=3.3V AIN3=11/16*VDD=2.26V VBAT=1.66*AIN3=3.76V\n// VDD=3.3V AIN3=6/8*VDD=2.47V VBAT=1.66*AIN3=4.1V\n#define BATTERY_LPCOMP_THRESHOLD NRF_LPCOMP_REF_SUPPLY_11_16\n\n#define HAS_ETHERNET 1\n\n#define RAK_4631 1\n\n#define PIN_ETHERNET_RESET 21\n#define PIN_ETHERNET_SS PIN_EINK_CS\n#define ETH_SPI_PORT SPI1\n#define AQ_SET_PIN 10\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/rak4631_epaper/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Firmware for 5005 with the RAK 14000 ePaper\n[env:rak4631_eink]\nextends = nrf52840_base\nboard = wiscore_rak4631\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/rak4631_epaper\n  -D RAK_4631\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_BN\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631_epaper>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library\n  rakwireless/RAKwireless NCP5623 RGB LED library@1.0.3\n  # renovate: datasource=custom.pio depName=RAK12034 packageName=beegee-tokyo/library/RAKwireless RAK12034\n  beegee-tokyo/RAKwireless RAK12034@1.0.0\n  # renovate: datasource=custom.pio depName=RAK12035_SoilMoisture packageName=beegee-tokyo/library/RAK12035_SoilMoisture\n  beegee-tokyo/RAK12035_SoilMoisture@1.0.4\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n"
  },
  {
    "path": "variants/nrf52840/rak4631_epaper/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak4631_epaper/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK4630_\n#define _VARIANT_RAK4630_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define WB_IO5 PIN_NFC1\n#define WB_IO4 (4)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n#define USE_EINK\n\n// RAKRGB\n#define HAS_NCP5623\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// enables 3.3V periphery like GPS or IO Module\n#define PIN_3V3_EN (34)\n#define WB_IO2 PIN_3V3_EN\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n#define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// Testing USB detection\n#define NRF_APM\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n#define RAK_4631 1\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/rak4631_epaper_onrxtx/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Firmware for 5005 with the RAK 14000 ePaper\n[env:rak4631_eink_onrxtx]\nboard_level = extra\nextends = nrf52840_base\nboard = wiscore_rak4631\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/rak4631_epaper\n  -D RAK_4631\n  -D PIN_EINK_EN=34\n  -D EINK_DISPLAY_MODEL=GxEPD2_213_BN\n  -D EINK_WIDTH=250\n  -D EINK_HEIGHT=122\n  -D RADIOLIB_EXCLUDE_SX128X=1\n  -D RADIOLIB_EXCLUDE_SX127X=1\n  -D RADIOLIB_EXCLUDE_LR11X0=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631_epaper_onrxtx>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2\n  zinggjm/GxEPD2@1.6.8\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library\n  rakwireless/RAKwireless NCP5623 RGB LED library@1.0.3\n  # renovate: datasource=custom.pio depName=RAK12034 packageName=beegee-tokyo/library/RAKwireless RAK12034\n  beegee-tokyo/RAKwireless RAK12034@1.0.0\n  # renovate: datasource=custom.pio depName=RAK12035_SoilMoisture packageName=beegee-tokyo/library/RAK12035_SoilMoisture\n  beegee-tokyo/RAK12035_SoilMoisture@1.0.4\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n;upload_port = /dev/ttyACM3\n"
  },
  {
    "path": "variants/nrf52840/rak4631_epaper_onrxtx/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak4631_epaper_onrxtx/variant.h",
    "content": "#ifndef _VARIANT_RAK4630_\n#define _VARIANT_RAK4630_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n// #define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (-1) //(5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define WB_IO5 PIN_NFC1\n#define WB_IO4 (4)\n// #define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (-1)\n#define PIN_SERIAL1_TX (-1)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n// Testing USB detection\n#define NRF_APM\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (-1)\n#define PIN_SPI1_MOSI (0 + 13)\n#define PIN_SPI1_SCK (0 + 14)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define USE_EINK\n\n#define PIN_EINK_CS (0 + 16)   // TX1\n#define PIN_EINK_BUSY (0 + 15) // RX1\n#define PIN_EINK_DC (0 + 17)   // IO1\n// #define PIN_EINK_RES  (-1)     //first try without RESET then connect it to AIN (AIN0 5 )\n#define PIN_EINK_RES (0 + 5)   // 2.13 BN Display needs RESET\n#define PIN_EINK_SCLK (0 + 14) // SCL\n#define PIN_EINK_MOSI (0 + 13) // SDA\n\n// RAKRGB\n#define HAS_NCP5623\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// enables 3.3V periphery like GPS or IO Module\n#define PIN_3V3_EN (34)\n#define WB_IO2 PIN_3V3_EN\n\n// NO GPS\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n// #define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n// #define GPS_RX_PIN PIN_SERIAL1_RX\n// #define GPS_TX_PIN PIN_SERIAL1_TX\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n// #define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n// #define BATTERY_SENSE_RESOLUTION_BITS 12\n// #define BATTERY_SENSE_RESOLUTION 4096.0\n// #undef AREF_VOLTAGE\n// #define AREF_VOLTAGE 3.0\n// #define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n// #define ADC_MULTIPLIER 1.73\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/rak4631_eth_gw/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921\n[env:rak4631_eth_gw]\nextends = nrf52840_base\nboard = wiscore_rak4631\nboard_check = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/rak4631_eth_gw\n  -D RAK_4631\n  -DHAS_UDP_MULTICAST=1\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_BN\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DNRF52_USE_JSON=1\n  -DMESHTASTIC_EXCLUDE_WIFI=1\n  -DMESHTASTIC_EXCLUDE_SCREEN=1\n;   -DMESHTASTIC_EXCLUDE_PKI=1\n  -DMESHTASTIC_EXCLUDE_POWERMON=1\n;   -DMESHTASTIC_EXCLUDE_TZ=1\n  -DMESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1\n  -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1\n  -DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1\n  -DMESHTASTIC_EXCLUDE_STOREFORWARD=1\n  -DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1\n  -DMESHTASTIC_EXCLUDE_WAYPOINT=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631_eth_gw> +<mesh/eth/> +<mesh/api/> +<mqtt/> +<serialization/>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  ${networking_base.lib_deps}\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S\n  https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip\n  # renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library\n  rakwireless/RAKwireless NCP5623 RGB LED library@1.0.3\n  # renovate: datasource=git-refs depName=RAK12034-BMX160 packageName=https://github.com/RAKWireless/RAK12034-BMX160 gitBranch=main\n  https://github.com/RAKWireless/RAK12034-BMX160/archive/dcead07ffa267d3c906e9ca4a1330ab989e957e2.zip\n  # renovate: datasource=custom.pio depName=ArduinoJson packageName=bblanchon/library/ArduinoJson\n  bblanchon/ArduinoJson@6.21.6\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds\n;upload_protocol = jlink\n\n; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)\n; programming time is about the same as the bootloader version.\n; For information on this see the meshtastic developers documentation for \"Development on the NRF52\"\n[env:rak4631_eth_gw_dbg]\nextends = env:rak4631\nboard_level = extra\n\n; if the builtin version of openocd has a buggy version of semihosting, so use the external version\n; platform_packages = platformio/tool-openocd@3.1200.0\n\nbuild_flags =\n  ${env:rak4631_eth_gw.build_flags}\n  -D USE_SEMIHOSTING\n\nlib_deps =\n  ${env:rak4631_eth_gw.lib_deps}\n  # TODO renovate\n  https://github.com/geeksville/Armduino-Semihosting/archive/35b538fdf208c3530c1434cd099a08e486672ee4.zip\n\n; NOTE: the pyocd support for semihosting is buggy.  So I switched to using the builtin platformio support for the stlink adapter which worked much better.\n; However the built in openocd version in platformio has buggy support for TCP to semihosting. \n;\n; So I'm now trying the external openocd - but the openocd scripts for nrf52.cfg assume you are using a DAP adapter not an STLINK adapter.\n; In theory I could change those scripts.  But for now I'm trying going back to a DAP adapter but with the external openocd.\n\nupload_protocol = stlink\n; eventually use platformio/tool-pyocd@2.3600.0 instad\n;upload_protocol = custom\n;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE\n"
  },
  {
    "path": "variants/nrf52840/rak4631_eth_gw/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak4631_eth_gw/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK4630_\n#define _VARIANT_RAK4630_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define WB_IO5 PIN_NFC1\n#define WB_IO4 (4)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n// #define USE_EINK\n\n// RAKRGB\n#define HAS_NCP5623\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10   NSS     SPI NSS (Arduino GPIO number 42)\nP1.11   SCK     SPI CLK (Arduino GPIO number 43)\nP1.12   MOSI    SPI MOSI (Arduino GPIO number 44)\nP1.13   MISO    SPI MISO (Arduino GPIO number 45)\nP1.14   BUSY    BUSY signal (Arduino GPIO number 46)\nP1.15   DIO1    DIO1 event interrupt (Arduino GPIO number 47)\nP1.06   NRESET  NRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n#define DETECTION_SENSOR_EN 4\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n// enables 3.3V periphery like GPS or IO Module\n// Do not toggle this for GPS power savings\n#define PIN_3V3_EN (34)\n#define WB_IO2 PIN_3V3_EN\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// RAK18001 Buzzer in Slot C\n// #define PIN_BUZZER 21 // IO3 is PWM2\n// NEW: set this via protobuf instead!\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n#define HAS_ETHERNET 1\n\n#define RAK_4631 1\n\n#define PIN_ETHERNET_RESET 21\n#define PIN_ETHERNET_SS PIN_EINK_CS\n#define ETH_SPI_PORT SPI1\n#define AQ_SET_PIN 10\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/rak4631_nomadstar_meteor_pro/platformio.ini",
    "content": "; NomadStar Meteor Pro based on RAK4631 with RGBW LED LP5562 support\n[env:rak4631_nomadstar_meteor_pro]\ncustom_meshtastic_hw_model = 96\ncustom_meshtastic_hw_model_slug = NOMADSTAR_METEOR_PRO\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = NomadStar Meteor Pro\ncustom_meshtastic_images = meteor_pro.svg\ncustom_meshtastic_tags = NomadStar\n\nextends = nrf52840_base\nboard = wiscore_rak4631\nboard_check = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/rak4631_nomadstar_meteor_pro\n  -D NOMADSTAR_METEOR_PRO\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_BN\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631_nomadstar_meteor_pro> +<mesh/api/> +<mqtt/>\nlib_deps =\n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=IOBoard-RGB-LP5562-Library packageName=NomadStar-outdoor/IOBoard-RGB-LP5562-Library gitBranch=master\n  https://github.com/NomadStar-outdoor/IOBoard-RGB-LP5562-Library/archive/9c366c875e1e8103ed97b5d4c09f3878345da80a.zip\n\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds\n;upload_protocol = jlink\n\n; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)\n; programming time is about the same as the bootloader version.\n; For information on this see the meshtastic developers documentation for \"Development on the NRF52\"\n[env:rak4631_nomadstar_meteor_pro_dbg]\nextends = env:rak4631_nomadstar_meteor_pro\nboard_level = extra\n\n; if the builtin version of openocd has a buggy version of semihosting, so use the external version\n; platform_packages = platformio/tool-openocd@3.1200.0\n\nbuild_flags =\n  ${env:rak4631.build_flags}\n  -D USE_SEMIHOSTING\n\nlib_deps =\n  ${env:rak4631.lib_deps}\n  # TODO renovate\n  https://github.com/geeksville/Armduino-Semihosting/archive/35b538fdf208c3530c1434cd099a08e486672ee4.zip\n\n; NOTE: the pyocd support for semihosting is buggy.  So I switched to using the builtin platformio support for the stlink adapter which worked much better.\n; However the built in openocd version in platformio has buggy support for TCP to semihosting. \n;\n; So I'm now trying the external openocd - but the openocd scripts for nrf52.cfg assume you are using a DAP adapter not an STLINK adapter.\n; In theory I could change those scripts.  But for now I'm trying going back to a DAP adapter but with the external openocd.\n\nupload_protocol = stlink\n; eventually use platformio/tool-pyocd@2.3600.0 instad\n;upload_protocol = custom\n;upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE\n"
  },
  {
    "path": "variants/nrf52840/rak4631_nomadstar_meteor_pro/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak4631_nomadstar_meteor_pro/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK4630_\n#define _VARIANT_RAK4630_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n// #define USE_EINK\n\n// Texas Instrument LP5562\n#define HAS_LP5562\n#define ENABLE_AMBIENTLIGHTING\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10   NSS     SPI NSS (Arduino GPIO number 42)\nP1.11   SCK     SPI CLK (Arduino GPIO number 43)\nP1.12   MOSI    SPI MOSI (Arduino GPIO number 44)\nP1.13   MISO    SPI MISO (Arduino GPIO number 45)\nP1.14   BUSY    BUSY signal (Arduino GPIO number 46)\nP1.15   DIO1    DIO1 event interrupt (Arduino GPIO number 47)\nP1.06   NRESET  NRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n#define DETECTION_SENSOR_EN 4\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n// enables 3.3V periphery like GPS or IO Module\n// Do not toggle this for GPS power savings\n#define PIN_3V3_EN (34)\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n\n// RAK18001 Buzzer in Slot C\n// #define PIN_BUZZER 21 // IO3 is PWM2\n// NEW: set this via protobuf instead!\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n\n#define HAS_ETHERNET 0\n\n#define RAK_4631 1\n\n#define PIN_ETHERNET_RESET 21\n#define PIN_ETHERNET_SS PIN_EINK_CS\n#define ETH_SPI_PORT SPI1\n#define AQ_SET_PIN 10\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/rak_wismeshtag/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921\n[env:rak_wismeshtag]\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_images = rak_wismesh_tag.svg\ncustom_meshtastic_tags = RAK\n\nextends = nrf52840_base\nboard = wiscore_rak4631\nboard_check = true\ncustom_meshtastic_hw_model = 105\ncustom_meshtastic_hw_model_slug = WISMESH_TAG\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_display_name = RAK WisMesh Tag\ncustom_meshtastic_actively_supported = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/rak_wismeshtag\n  -D WISMESH_TAG\n  -D RAK_4631\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\n  -DMESHTASTIC_EXCLUDE_WIFI=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak_wismeshtag>\n"
  },
  {
    "path": "variants/nrf52840/rak_wismeshtag/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n"
  },
  {
    "path": "variants/nrf52840/rak_wismeshtag/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK4630_\n#define _VARIANT_RAK4630_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n// RAK WISMESHTAG\n#define PIN_WIRE_SDA (25)\n#define PIN_WIRE_SCL (24)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10   NSS     SPI NSS (Arduino GPIO number 42)\nP1.11   SCK     SPI CLK (Arduino GPIO number 43)\nP1.12   MOSI    SPI MOSI (Arduino GPIO number 44)\nP1.13   MISO    SPI MISO (Arduino GPIO number 45)\nP1.14   BUSY    BUSY signal (Arduino GPIO number 46)\nP1.15   DIO1    DIO1 event interrupt (Arduino GPIO number 47)\nP1.06   NRESET  NRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n#define DETECTION_SENSOR_EN 4\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n// enables 3.3V periphery like GPS or IO Module\n// Do not toggle this for GPS power savings\n#define PIN_3V3_EN (34)\n\n// RAK WISMESHTAG\n#define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// RAK WISMESHTAG\n#define PIN_BUZZER 21\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER 1.73\n#define OCV_ARRAY 4240, 4112, 4029, 3970, 3906, 3846, 3824, 3802, 3776, 3650, 3072\n\n#define RAK_4631 1\n\n#define HAS_SCREEN 0\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/rak_wismeshtap/platformio.ini",
    "content": "; The very slick RAK wireless RAK10701 Field Tester device.  Note you will have to flash to Arduino bootloader to use this firmware.  Be aware touch is not currently working.\n[env:rak_wismeshtap]\ncustom_meshtastic_hw_model = 84\ncustom_meshtastic_hw_model_slug = WISMESH_TAP\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = RAK WisMesh Tap\ncustom_meshtastic_images = rak-wismeshtap.svg\ncustom_meshtastic_tags = RAK\n\nextends = nrf52840_base\nboard = wiscore_rak4631\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/rak_wismeshtap\n  -DWISMESH_TAP\n  -DRAK_4631\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_BN\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DMESHTASTIC_EXCLUDE_WIFI=1\n  -DMESHTASTIC_EXCLUDE_DETECTIONSENSOR=1\n  -DMESHTASTIC_EXCLUDE_STOREFORWARD=1\n  -DMESHTASTIC_EXCLUDE_POWER_TELEMETRY=1\n  -DMESHTASTIC_EXCLUDE_ATAK=1\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak_wismeshtap> +<mesh/eth/> +<mesh/api/> +<mqtt/>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  ${networking_base.lib_deps}\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S\n  https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip\n  # renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library\n  rakwireless/RAKwireless NCP5623 RGB LED library@1.0.3\n  # renovate: datasource=custom.pio depName=TFT_eSPI packageName=bodmer/library/TFT_eSPI\n  bodmer/TFT_eSPI@2.5.43\n  # renovate: datasource=custom.pio depName=RAK12034 packageName=beegee-tokyo/library/RAKwireless RAK12034\n  beegee-tokyo/RAKwireless RAK12034@1.0.0\n  # renovate: datasource=custom.pio depName=RAK14014-FT6336U packageName=beegee-tokyo/library/RAK14014-FT6336U\n  beegee-tokyo/RAK14014-FT6336U@1.0.1\n  # renovate: datasource=custom.pio depName=RAK12035_SoilMoisture packageName=beegee-tokyo/library/RAK12035_SoilMoisture\n  beegee-tokyo/RAK12035_SoilMoisture@1.0.4\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n"
  },
  {
    "path": "variants/nrf52840/rak_wismeshtap/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}\n\nvoid variant_shutdown()\n{\n    // GPIO restores input status, otherwise there will be leakage current\n    nrf_gpio_cfg_default(TFT_BL);\n    nrf_gpio_cfg_default(TFT_DC);\n    nrf_gpio_cfg_default(TFT_CS);\n    nrf_gpio_cfg_default(TFT_SCLK);\n    nrf_gpio_cfg_default(TFT_MOSI);\n    nrf_gpio_cfg_default(TFT_MISO);\n    nrf_gpio_cfg_default(SCREEN_TOUCH_INT);\n    nrf_gpio_cfg_default(WB_I2C1_SCL);\n    nrf_gpio_cfg_default(WB_I2C1_SDA);\n\n    // nrf_gpio_cfg_default(WB_I2C2_SCL);\n    // nrf_gpio_cfg_default(WB_I2C2_SDA);\n}"
  },
  {
    "path": "variants/nrf52840/rak_wismeshtap/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_RAK4630_\n#define _VARIANT_RAK4630_\n\n#define RAK4630\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (35)\n#define LED_BLUE (36)\n\n#define LED_GREEN PIN_LED1\n#define LED_NOTIFICATION LED_BLUE\n\n#define LED_STATE_ON 1 // State when LED is litted\n\n/*\n * Buttons\n */\n\n#define PIN_BUTTON1 9 // Pin for button on E-ink button module or IO expansion such as the RAK14014 or RAK14015 TFT modules\n#define BUTTON_NEED_PULLUP\n#define PIN_BUTTON2 12\n\n/*\n * Analog pins\n */\n#define PIN_A0 (5)\n#define PIN_A1 (31)\n#define PIN_A2 (28)\n#define PIN_A3 (29)\n#define PIN_A4 (30)\n#define PIN_A5 (31)\n#define PIN_A6 (0xff)\n#define PIN_A7 (0xff)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\nstatic const uint8_t A6 = PIN_A6;\nstatic const uint8_t A7 = PIN_A7;\n#define ADC_RESOLUTION 14\n\n// Other pins\n#define PIN_AREF (2)\n#define PIN_NFC1 (9)\n#define WB_IO5 PIN_NFC1\n#define WB_IO4 (4)\n#define PIN_NFC2 (10)\n\nstatic const uint8_t AREF = PIN_AREF;\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (15)\n#define PIN_SERIAL1_TX (16)\n\n// Connected to Jlink CDC\n#define PIN_SERIAL2_RX (8)\n#define PIN_SERIAL2_TX (6)\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (45)\n#define PIN_SPI_MOSI (44)\n#define PIN_SPI_SCK (43)\n\n#define PIN_SPI1_MISO (29) // (0 + 29)\n#define PIN_SPI1_MOSI (30) // (0 + 30)\n#define PIN_SPI1_SCK (3)   // (0 + 3)\n\nstatic const uint8_t SS = 42;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_CS (0 + 26)\n#define PIN_EINK_BUSY (0 + 4)\n#define PIN_EINK_DC (0 + 17)\n#define PIN_EINK_RES (-1)\n#define PIN_EINK_SCLK (0 + 3)\n#define PIN_EINK_MOSI (0 + 30) // also called SDI\n\n// #define USE_EINK\n\n// RAKRGB\n#define HAS_NCP5623\n\n/*\n * Wire Interfaces\n */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (13)\n#define PIN_WIRE_SCL (14)\n\n// QSPI Pins\n#define PIN_QSPI_SCK 3\n#define PIN_QSPI_CS 26\n#define PIN_QSPI_IO0 30\n#define PIN_QSPI_IO1 29\n#define PIN_QSPI_IO2 28\n#define PIN_QSPI_IO3 2\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES IS25LP080D\n#define EXTERNAL_FLASH_USE_QSPI\n\n/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports\n   RAK5005-O <->  nRF52840\n   IO1       <->  P0.17 (Arduino GPIO number 17)\n   IO2       <->  P1.02 (Arduino GPIO number 34)\n   IO3       <->  P0.21 (Arduino GPIO number 21)\n   IO4       <->  P0.04 (Arduino GPIO number 4)\n   IO5       <->  P0.09 (Arduino GPIO number 9)\n   IO6       <->  P0.10 (Arduino GPIO number 10)\n   IO7       <->  P0.28 (Arduino GPIO number 28)\n   SW1       <->  P0.01 (Arduino GPIO number 1)\n   A0        <->  P0.04/AIN2 (Arduino Analog A2\n   A1        <->  P0.31/AIN7 (Arduino Analog A7\n   SPI_CS    <->  P0.26 (Arduino GPIO number 26)\n */\n\n// No reason not to have the RAK Wireless pin defs here too.  This allows code from example RAK sketches to run without\n// modification.\n\nstatic const uint8_t WB_IO1 = 17; // SLOT_A SLOT_B\nstatic const uint8_t WB_IO2 = 34; // SLOT_A SLOT_B\nstatic const uint8_t WB_IO3 = 21; // SLOT_C\n// static const uint8_t WB_IO4 = 4;       // SLOT_C <- already defined above (ln. 94)\n// static const uint8_t WB_IO5 = 9;       // SLOT_D <- already defined above (ln. 93)\nstatic const uint8_t WB_IO6 = 10;      // SLOT_D\nstatic const uint8_t WB_SW1 = 33;      // IO_SLOT\nstatic const uint8_t WB_A0 = 5;        // IO_SLOT\nstatic const uint8_t WB_A1 = 31;       // IO_SLOT\nstatic const uint8_t WB_I2C1_SDA = 13; // SENSOR_SLOT IO_SLOT\nstatic const uint8_t WB_I2C1_SCL = 14; // SENSOR_SLOT IO_SLOT\nstatic const uint8_t WB_I2C2_SDA = 24; // IO_SLOT\nstatic const uint8_t WB_I2C2_SCL = 25; // IO_SLOT\nstatic const uint8_t WB_SPI_CS = 26;   // IO_SLOT\nstatic const uint8_t WB_SPI_CLK = 3;   // IO_SLOT\nstatic const uint8_t WB_SPI_MISO = 29; // IO_SLOT\nstatic const uint8_t WB_SPI_MOSI = 30; // IO_SLOT\n\n// RAK4630 LoRa module\n\n/* Setup of the SX1262 LoRa module ( https://docs.rakwireless.com/Product-Categories/WisBlock/RAK4631/Datasheet/ )\n\nP1.10   NSS     SPI NSS (Arduino GPIO number 42)\nP1.11   SCK     SPI CLK (Arduino GPIO number 43)\nP1.12   MOSI    SPI MOSI (Arduino GPIO number 44)\nP1.13   MISO    SPI MISO (Arduino GPIO number 45)\nP1.14   BUSY    BUSY signal (Arduino GPIO number 46)\nP1.15   DIO1    DIO1 event interrupt (Arduino GPIO number 47)\nP1.06   NRESET  NRESET manual reset of the SX1262 (Arduino GPIO number 38)\n\nImportant for successful SX1262 initialization:\n\n* Setup DIO2 to control the antenna switch\n* Setup DIO3 to control the TCXO power supply\n* Setup the SX1262 to use it's DCDC regulator and not the LDO\n* RAK4630 schematics show GPIO P1.07 connected to the antenna switch, but it should not be initialized, as DIO2 will do the\ncontrol of the antenna switch\n\nSO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG\n\n*/\n\n#define USE_SX1262\n#define SX126X_CS (42)\n#define SX126X_DIO1 (47)\n#define SX126X_BUSY (46)\n#define SX126X_RESET (38)\n// #define SX126X_TXEN (39)\n// #define SX126X_RXEN (37)\n#define SX126X_POWER_EN (37)\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// Testing USB detection\n#define NRF_APM\n\n// enables 3.3V periphery like GPS or IO Module\n#define PIN_3V3_EN (34)\n\n// RAK1910 GPS module\n// If using the wisblock GPS module and pluged into Port A on WisBlock base\n// IO1 is hooked to PPS (pin 12 on header) = gpio 17\n// IO2 is hooked to GPS RESET = gpio 34, but it can not be used to this because IO2 is ALSO used to control 3V3_S power (1 is on).\n// Therefore must be 1 to keep peripherals powered\n// Power is on the controllable 3V3_S rail\n// #define PIN_GPS_RESET (34)\n// #define PIN_GPS_EN PIN_3V3_EN\n#define PIN_GPS_PPS (17) // Pulse per second input from the GPS\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n// Define pin to enable GPS toggle (set GPIO to LOW) via user button triple press\n\n// RAK12002 RTC Module\n#define RV3028_RTC (uint8_t)0b1010010\n\n// RAK18001 Buzzer in Slot C\n// #define PIN_BUZZER 21 // IO3 is PWM2\n// NEW: set this via protobuf instead!\n\n// Battery\n// The battery sense is hooked to pin A0 (5)\n#define BATTERY_PIN PIN_A0\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (1.73F)\n\n#define RAK_4631 1\n\n#define AQ_SET_PIN 10\n\n#ifdef __cplusplus\n}\n#endif\n\n#define RAK14014 // Tell it we have a RAK14014\n#define USER_SETUP_LOADED 1\n#define ST7789_DRIVER 1\n#define TFT_WIDTH 240\n#define TFT_HEIGHT 320\n#define TFT_MISO WB_SPI_MISO\n#define TFT_MOSI WB_SPI_MOSI\n#define TFT_SCLK WB_SPI_CLK\n#define TFT_CS WB_SPI_CS\n#define TFT_DC WB_IO4\n#define TFT_RST -1\n#define TFT_BL WB_IO3\n#define LOAD_GLCD 1\n#define LOAD_GFXFF 1\n#define TFT_RGB_ORDER 0\n#define SPI_FREQUENCY 50000000\n#define TFT_SPI_PORT SPI1\n#define ST7789_CS WB_SPI_CS // Adds compatibility with the rest of the checking for a ST7789 TFT.\n#define USE_TFTDISPLAY 1\n\n#define SCREEN_ROTATE\n#define SCREEN_TRANSITION_FRAMERATE 5\n\n#define HAS_TOUCHSCREEN 1\n#define SCREEN_TOUCH_INT WB_IO6\n\n#define USE_POWERSAVE\n#define SLEEP_TIME 120\n\n#define USE_VIRTUAL_KEYBOARD 1\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/seeed_solar_node/platformio.ini",
    "content": "[env:seeed_solar_node]\ncustom_meshtastic_hw_model = 95\ncustom_meshtastic_hw_model_slug = SEEED_SOLAR_NODE\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Seeed SenseCAP Solar Node\ncustom_meshtastic_images = seeed_solar.svg\ncustom_meshtastic_tags = Seeed\n\nboard = seeed_solar_node\nextends = nrf52840_base\n;board_level = extra\nbuild_flags = ${nrf52840_base.build_flags} \n  -I variants/nrf52840/seeed_solar_node \n  -D SEEED_SOLAR_NODE \n  -I src/platform/nrf52/softdevice\n  -I src/platform/nrf52/softdevice/nrf52\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_solar_node>\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/seeed_solar_node/variant.cpp",
    "content": "/*\n * variant.cpp - Digital pin mapping for nRF52-based development board\n *\n * This file defines the pin mapping array that maps logical digital pins (D0-D17)\n * to physical GPIO ports/pins on the Nordic nRF52 series microcontroller.\n *\n * Board: [Seeed Studio XIAO nRF52840 Sense (Seeed Solar Node)]\n * Hardware Features:\n *  - LoRa module (CS/SCK/MISO/MOSI control pins)\n *  - GNSS module (TX/RX/Reset/Wakeup)\n *  - User LEDs (D11-D12)\n *  - User button (D13)\n *  - Grove/NFC interface (D14-D15)\n *  - Battery voltage monitoring (D16)\n *\n * Created [20250225]\n * By [Dylan]\n * Version 1.0\n * License: [MIT]\n */\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\n/**\n * @brief Digital pin to GPIO port/pin mapping table\n *\n * Format: Logical Pin (Dx) -> nRF Port.Pin (Px.xx)\n *\n * Pin Groupings:\n * [D0-D10]  - Peripheral control (LoRa, GNSS)\n * [D11-D12] - LED outputs\n * [D13]     - User button\n * [D14-D15] - Grove/NFC interface\n * [D16]     - Battery voltage ADC input\n * [D17]     - GNSS module reset\n */\n\nextern \"C\" {\nconst uint32_t g_ADigitalPinMap[] = {\n    // D0 .. D10 - Peripheral control pins\n    2,  // D0  P0.02 (A0)    GNSS_WAKEUP\n    3,  // D1  P0.03 (A1)    LORA_DIO1\n    28, // D2  P0.28 (A2)    LORA_RESET\n    29, // D3  P0.29 (A3)    LORA_BUSY\n    4,  // D4  P0.04 (A4/SDA) LORA_CS\n    5,  // D5  P0.05 (A5/SCL) LORA_SW\n    43, // D6  P1.11 (UART_TX) GNSS_TX\n    44, // D7  P1.12 (UART_RX) GNSS_RX\n    45, // D8  P1.13 (SPI_SCK) LORA_SCK\n    46, // D9  P1.14 (SPI_MISO) LORA_MISO\n    47, // D10 P1.15 (SPI_MOSI) LORA_MOSI\n\n    // D11-D12 - LED outputs\n    15, // D11 P0.15 User LED\n    19, // D12 P0.19 Breathing LED\n\n    // D13 - User input\n    33, // D13 P1.01 User Button\n\n    // D14-D15 - Grove/NFC interface\n    9,  // D14 P0.09 NFC1/GROVE_D1\n    10, // D15 P0.10 NFC2/GROVE_D0\n\n    // D16 - Power management\n    // 31, // D16 P0.31 VBAT_ADC (Battery voltage)\n    31, // D16 P0.31 VBAT_ADC (Battery voltage)\n    // D17 - GNSS control\n    35, // D17 P1.03 GNSS_RESET\n\n    37, // D18 P1.05 GNSS_ENABLE\n    14, // D19 P0.14 BAT_READ\n    39, // D20 P1.07 USER_BUTTON\n\n    //\n    21, // D21 P0.21 (QSPI_SCK)\n    25, // D22 P0.25 (QSPI_CSN)\n    20, // D23 P0.20 (QSPI_SIO_0 DI)\n    24, // D24 P0.24 (QSPI_SIO_1 DO)\n    22, // D25 P0.22 (QSPI_SIO_2 WP)\n    23, // D26 P0.23 (QSPI_SIO_3 HOLD)\n};\n}\n\nvoid initVariant()\n{\n    pinMode(PIN_QSPI_CS, OUTPUT);\n    digitalWrite(PIN_QSPI_CS, HIGH);\n    // This setup is crucial for ensuring low power consumption and proper initialization of the hardware components.\n    pinMode(GPS_EN, OUTPUT);\n    digitalWrite(GPS_EN, LOW);\n\n    // VBAT_ENABLE\n    pinMode(BAT_READ, OUTPUT);\n    digitalWrite(BAT_READ, LOW);\n\n    pinMode(PIN_LED1, OUTPUT);\n    digitalWrite(PIN_LED1, LOW);\n    pinMode(PIN_LED2, OUTPUT);\n    digitalWrite(PIN_LED2, LOW);\n    pinMode(PIN_LED2, OUTPUT);\n\n    pinMode(GPS_EN, OUTPUT);\n    digitalWrite(GPS_EN, HIGH);\n}"
  },
  {
    "path": "variants/nrf52840/seeed_solar_node/variant.h",
    "content": "#ifndef _SEEED_SOLAR_NODE_H_\n#define _SEEED_SOLAR_NODE_H_\n#include \"WVariant.h\"\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Clock Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define VARIANT_MCK (64000000ul) // Master clock frequency\n#define USE_LFXO                 // 32.768kHz crystal for LFCLK\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Pin Capacity Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define PINS_COUNT (33u)       // Total GPIO pins\n#define NUM_DIGITAL_PINS (33u) // Digital I/O pins\n#define NUM_ANALOG_INPUTS (8u) // Analog inputs (A0-A5 + VBAT + AREF)\n#define NUM_ANALOG_OUTPUTS (0u)\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  LED Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  LEDs\n//  LEDs\n#define PIN_LED1 (12) // LED        P1.15\n#define PIN_LED2 (11) //\n\n#define LED_GREEN PIN_LED1\n#define LED_BLUE PIN_LED2\n#define LED_STATE_ON 1 // State when LED is litted\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Button Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define BUTTON_PIN D13 // This is the Program Button\n// #define BUTTON_NEED_PULLUP   1\n#define BUTTON_ACTIVE_LOW true\n#define BUTTON_ACTIVE_PULLUP false\n\n#define BUTTON_PIN_TOUCH 20 // Touch button\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Digital Pin Mapping (D0-D10)\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define D0 0   // P0.02 GNSS_WAKEUP/IO0\n#define D1 1   // P0.03 LORA_DIO1\n#define D2 2   // P0.28 LORA_RESET\n#define D3 3   // P0.29 LORA_BUSY\n#define D4 4   // P0.04 LORA_CS/I2C_SDA\n#define D5 5   // P0.05 LORA_SW/I2C_SCL\n#define D6 6   // P1.11 GNSS_TX\n#define D7 7   // P1.12 GNSS_RX\n#define D8 8   // P1.13 SPI_SCK\n#define D9 9   // P1.14 SPI_MISO\n#define D10 10 // P1.15 SPI_MOSI\n#define D13 13 // P1.01 User Button\n#define D14 14 // P0.09 NFC1/GROVE_D1\n#define D15 15 // P0.10 NFC2/GROVE_D0\n#define D16 16 // P0.31 VBAT_ADC (Battery voltage)\n#define D17 17 // P1.03 GNSS_RESET\n#define D18 18 // P1.05 GNSS_ENABLE\n#define D19 19 // P0.14 BAT_READ\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Analog Pin Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define PIN_A0 0     // P0.02 Analog Input 0\n#define PIN_A1 1     // P0.03 Analog Input 1\n#define PIN_A2 2     // P0.28 Analog Input 2\n#define PIN_A3 3     // P0.29 Analog Input 3\n#define PIN_A4 4     // P0.04 Analog Input 4\n#define PIN_A5 5     // P0.05 Analog Input 5\n#define PIN_VBAT D16 // P0.31 Battery voltage sense\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Communication Interfaces\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  I2C Configuration\n#define HAS_WIRE 1\n#define PIN_WIRE_SDA D14 // P0.09\n#define PIN_WIRE_SCL D15 // P0.10\n#define WIRE_INTERFACES_COUNT 1\n#define I2C_NO_RESCAN\n\nstatic const uint8_t SDA = PIN_WIRE_SDA;\nstatic const uint8_t SCL = PIN_WIRE_SCL;\n// SPI Configuration (SX1262)\n\n#define SPI_INTERFACES_COUNT 1\n#define PIN_SPI_MISO 9  // P1.14 (D9)\n#define PIN_SPI_MOSI 10 // P1.15 (D10)\n#define PIN_SPI_SCK 8   // P1.13 (D8)\n\n// SX1262 LoRa Module Pins\n#define USE_SX1262\n#define SX126X_CS D4                 // Chip select\n#define SX126X_DIO1 D1               // Digital IO 1 (Interrupt)\n#define SX126X_BUSY D3               // Busy status\n#define SX126X_RESET D2              // Reset control\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // TCXO supply voltage\n#define SX126X_RXEN D5               // RX enable control\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_DIO2_AS_RF_SWITCH // This Line is really necessary for SX1262  to work with RF switch or will loss TX power\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Power Management\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n#define BAT_READ                                                                                                                 \\\n    D19 // P0_14 = 14  Reads battery voltage from divider on signal board. (PIN_VBAT is reading voltage divider on XIAO and is\n        // program pin 32 / or P0.31)\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define ADC_MULTIPLIER 3.3\n#define BATTERY_PIN PIN_VBAT // PIN_A7\n#define AREF_VOLTAGE 3.3\n#define OCV_ARRAY 4200, 3986, 3922, 3812, 3734, 3645, 3527, 3420, 3281, 3087, 2786\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  GPS L76KB\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define GPS_L76K\n#ifdef GPS_L76K\n#define GPS_TX_PIN D6 // 44\n#define GPS_RX_PIN D7 // 43\n#define HAS_GPS 1\n#define GPS_BAUDRATE 9600\n#define GPS_THREAD_INTERVAL 50\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_GPS_STANDBY D0\n#define GPS_EN D18 // P1.05\n#endif\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  On-board QSPI Flash\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n// On-board QSPI Flash\n#define PIN_QSPI_SCK (21)\n#define PIN_QSPI_CS (22)\n#define PIN_QSPI_IO0 (23)\n#define PIN_QSPI_IO1 (24)\n#define PIN_QSPI_IO2 (25)\n#define PIN_QSPI_IO3 (26)\n\n#define EXTERNAL_FLASH_DEVICES P25Q16H\n#define EXTERNAL_FLASH_USE_QSPI\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Compatibility Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n// Serial port placeholders\n\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n#ifdef __cplusplus\n}\n#endif\n\n#endif //  _SEEED_SOLAR_NODE_H_\n"
  },
  {
    "path": "variants/nrf52840/seeed_wio_tracker_L1/platformio.ini",
    "content": "[env:seeed_wio_tracker_L1]\ncustom_meshtastic_hw_model = 99\ncustom_meshtastic_hw_model_slug = SEEED_WIO_TRACKER_L1\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Seeed Wio Tracker L1\ncustom_meshtastic_images = wio_tracker_l1_case.svg\ncustom_meshtastic_tags = Seeed\ncustom_meshtastic_requires_dfu = true\n\nboard = seeed_wio_tracker_L1\nextends = nrf52840_base\nbuild_flags = ${nrf52840_base.build_flags} \n  -I variants/nrf52840/seeed_wio_tracker_L1\n  -D SEEED_WIO_TRACKER_L1\n  -I src/platform/nrf52/softdevice\n  -I src/platform/nrf52/softdevice/nrf52\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_wio_tracker_L1>\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/seeed_wio_tracker_L1/variant.cpp",
    "content": "/*\n * variant.cpp - Digital pin mapping for TRACKER L1\n *\n * This file defines the pin mapping array that maps logical digital pins (D0-D17)\n * to physical GPIO ports/pins on the Nordic nRF52 series microcontroller.\n *\n * Board: [Seeed Studio WIO TRACKER L1]\n * Hardware Features:\n *  - LoRa module (CS/SCK/MISO/MOSI control pins)\n *  - GNSS module (TX/RX/Reset/Wakeup)\n *  - User LEDs (D11-D12)\n *  - User button (D13)\n *  - Grove/NFC interface (D14-D15)\n *  - Battery voltage monitoring (D16)\n *\n * Created [20250521]\n * By [Dylan]\n */\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\n/**\n * @brief Digital pin to GPIO port/pin mapping table\n *\n * Format: Logical Pin (Dx) -> nRF Port.Pin (Px.xx)\n *\n */\n\nextern \"C\" {\nconst uint32_t g_ADigitalPinMap[] = {\n    // D0 .. D10 - Peripheral control pins\n    41, // D0  P1.09    GNSS_WAKEUP\n    7,  // D1  P0.07     LORA_DIO1\n    39, // D2  P1,07     LORA_RESET\n    42, // D3  P1.10     LORA_BUSY\n    46, // D4  P1.14 (A4/SDA) LORA_CS\n    40, // D5  P1.08 (A5/SCL) LORA_SW\n    27, // D6  P0.27 (UART_TX) GNSS_TX\n    26, // D7  P0.26 (UART_RX) GNSS_RX\n    30, // D8  P0.30 (SPI_SCK) LORA_SCK\n    3,  // D9  P0.3 (SPI_MISO) LORA_MISO\n    28, // D10 P0.28 (SPI_MOSI) LORA_MOSI\n\n    // D11-D12 - LED outputs\n    33, // D11 P1.1 User LED\n    // Buzzzer\n    32, // D12 P1.0 Buzzer\n\n    // D13 - User input\n    8, // D13 P0.08 User Button\n\n    // D14-D15 - Grove interface\n    6, // D14 P0.06 OLED SDA\n    5, // D15 P0.05 OLED SCL\n\n    // D16 - Battery voltage ADC input\n    31, // D16 P0.31 VBAT_ADC\n    // GROVE\n    43, // D17 P0.00 GROVESDA\n    44, // D18 P0.01 GROVESCL\n\n    // FLASH\n    21, // D19 P0.21 (QSPI_SCK)\n    25, // D20 P0.25 (QSPI_CSN)\n    20, // D21 P0.20 (QSPI_SIO_0 DI)\n    24, // D22 P0.24 (QSPI_SIO_1 DO)\n    22, // D23 P0.22 (QSPI_SIO_2 WP)\n    23, // D24 P0.23 (QSPI_SIO_3 HOLD)\n\n    36, // D25 TB_UP\n    12, // D26 TB_DOWN\n    11, // D27 TB_LEFT\n    35, // D28 TB_RIGHT\n    37, // D29 TB_PRESS\n    4,  // D30 BAT_CTL\n};\n}\n\nvoid initVariant()\n{\n    pinMode(PIN_QSPI_CS, OUTPUT);\n    digitalWrite(PIN_QSPI_CS, HIGH);\n    // This setup is crucial for ensuring low power consumption and proper initialization of the hardware components.\n    // VBAT_ENABLE\n    pinMode(BAT_READ, OUTPUT);\n    digitalWrite(BAT_READ, HIGH);\n\n    pinMode(PIN_LED1, OUTPUT);\n    digitalWrite(PIN_LED1, LOW);\n    pinMode(PIN_LED2, OUTPUT);\n    digitalWrite(PIN_LED2, LOW);\n    pinMode(PIN_LED2, OUTPUT);\n}"
  },
  {
    "path": "variants/nrf52840/seeed_wio_tracker_L1/variant.h",
    "content": "#ifndef _SEEED_TRACKER_L1_H_\n#define _SEEED_TRACKER_L1_H_\n#include \"WVariant.h\"\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Clock Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define VARIANT_MCK (64000000ul) // Master clock frequency\n#define USE_LFXO                 // 32.768kHz crystal for LFCLK\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Pin Capacity Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define PINS_COUNT (33u)       // Total GPIO pins\n#define NUM_DIGITAL_PINS (33u) // Digital I/O pins\n#define NUM_ANALOG_INPUTS (8u) // Analog inputs (A0-A5 + VBAT + AREF)\n#define NUM_ANALOG_OUTPUTS (0u)\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  LED Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  LEDs\n//  LEDs\n#define PIN_LED1 (11) // LED        P1.15\n#define PIN_LED2 (12) //\n\n#define LED_GREEN PIN_LED1\n#define LED_BLUE PIN_LED2\n#define LED_STATE_ON 1 // State when LED is lit\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Button Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define CANCEL_BUTTON_PIN D13 // This is the Program Button\n// #define BUTTON_NEED_PULLUP   1\n#define CANCEL_BUTTON_ACTIVE_LOW true\n#define CANCEL_BUTTON_ACTIVE_PULLUP false\n\n// #define BUTTON_PIN_TOUCH 13 // Touch button\n//  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//   Digital Pin Mapping (D0-D10)\n//  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define D0 0   // P1.06 GNSS_WAKEUP/IO0\n#define D1 1   // P0.07 LORA_DIO1\n#define D2 2   // P1.07 LORA_RESET\n#define D3 3   // P1.10 LORA_BUSY\n#define D4 4   // P1.14 LORA_CS\n#define D5 5   // P1.08 LORA_SW\n#define D6 6   // P0.27 GNSS_TX\n#define D7 7   // P0.26 GNSS_RX\n#define D8 8   // P0.30 SPI_SCK\n#define D9 9   // P0.03 SPI_MISO\n#define D10 10 // P0.28 SPI_MOSI\n#define D12 12 // P1.00 Buzzer\n#define D13 13 // P0.08 User Button\n#define D14 14 // P0.05 OLED SCL\n#define D15 15 // P0.06 OLED SDA\n#define D16 16 // P0.31 VBAT_ADC\n#define D17 17 // P0.00 GROVE SDA\n#define D18 18 // P0.01 GROVE_SCL\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Analog Pin Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define PIN_A0 0     // P0.02 Analog Input 0\n#define PIN_A1 1     // P0.03 Analog Input 1\n#define PIN_A2 2     // P0.28 Analog Input 2\n#define PIN_A3 3     // P0.29 Analog Input 3\n#define PIN_A4 4     // P0.04 Analog Input 4\n#define PIN_A5 5     // P0.05 Analog Input 5\n#define PIN_VBAT D16 // P0.31 Battery voltage sense\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Communication Interfaces\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  I2C Configuration\n// #define HAS_WIRE 1\n#define PIN_WIRE_SDA D14 // P0.09\n#define PIN_WIRE_SCL D15 // P0.10\n#define WIRE_INTERFACES_COUNT 2\n#define PIN_WIRE1_SDA D18\n#define PIN_WIRE1_SCL D17\n#define I2C_NO_RESCAN\n\nstatic const uint8_t SDA = PIN_WIRE_SDA;\nstatic const uint8_t SCL = PIN_WIRE_SCL;\n\n#define HAS_SCREEN 1\n#define USE_SSD1306 1\n\n// SPI Configuration (SX1262)\n\n#define SPI_INTERFACES_COUNT 1\n#define PIN_SPI_MISO 9  // P0.03 (D9)\n#define PIN_SPI_MOSI 10 // P0.28 (D10)\n#define PIN_SPI_SCK 8   // P0.30 (D8)\n\n// SX1262 LoRa Module Pins\n#define USE_SX1262\n#define SX126X_CS D4                 // Chip select\n#define SX126X_DIO1 D1               // Digital IO 1 (Interrupt)\n#define SX126X_BUSY D3               // Busy status\n#define SX126X_RESET D2              // Reset control\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // TCXO supply voltage\n#define SX126X_RXEN D5               // RX enable control\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_DIO2_AS_RF_SWITCH // This Line is really necessary for SX1262  to work with RF switch or will loss TX power\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Power Management\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n#define BAT_READ 30 // D30 = P0.04  Reads battery voltage from divider on signal board.\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define ADC_MULTIPLIER 2.0\n#define BATTERY_PIN PIN_VBAT // PIN_A7\n#define AREF_VOLTAGE 3.6\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  GPS L76KB\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define GPS_L76K\n#ifdef GPS_L76K\n#define GPS_TX_PIN D6 // P0.26 - This is data from the MCU\n#define GPS_RX_PIN D7 // P0.27 - This is data from the GNSS\n#define HAS_GPS 1\n#define GPS_BAUDRATE 9600\n#define GPS_THREAD_INTERVAL 50\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n#define PIN_GPS_STANDBY D0\n\n// #define GPS_DEBUG\n//  #define GPS_EN D18 // P1.05\n#endif\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  On-board QSPI Flash\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n// On-board QSPI Flash\n#define PIN_QSPI_SCK (21)\n#define PIN_QSPI_CS (22)\n#define PIN_QSPI_IO0 (23)\n#define PIN_QSPI_IO1 (24)\n#define PIN_QSPI_IO2 (25)\n#define PIN_QSPI_IO3 (26)\n\n#define EXTERNAL_FLASH_DEVICES P25Q16H\n#define EXTERNAL_FLASH_USE_QSPI\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Buzzer\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n// Buzzer\n\n#define PIN_BUZZER D12 // P1.00, pwm output\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  joystick\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n#define CANNED_MESSAGE_ADD_CONFIRMATION 1\n\n// trackball\n#define HAS_TRACKBALL 1\n#define TB_UP 25\n#define TB_DOWN 26\n#define TB_LEFT 27\n#define TB_RIGHT 28\n#define TB_PRESS 29\n#define TB_DIRECTION FALLING\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Compatibility Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n// Serial port placeholders\n\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n#ifdef __cplusplus\n}\n#endif\n\n#endif //  _SEEED_SOLAR_NODE_H_"
  },
  {
    "path": "variants/nrf52840/seeed_wio_tracker_L1_eink/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/Examples/UserAppletInputExample/UserAppletInputExample.h\"\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/EInk/ZJY122250_0213BAAMFGN.h\"\n#include \"graphics/niche/Inputs/TwoButtonExtended.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n\n    // For NRF52 platforms, SPI pins are defined in variant.h\n    SPI1.begin();\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver = new Drivers::ZJY122250_0213BAAMFGN;\n    driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    inkhud->setDisplayResilience(15);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.rotation = 1; // 90 degrees clockwise\n#if HAS_TRACKBALL\n    inkhud->persistence->settings.joystick.enabled = true;            // Device uses a joystick\n    inkhud->persistence->settings.joystick.alignment = 3;             // 270 degrees\n    inkhud->persistence->settings.optionalMenuItems.nextTile = false; // Use joystick instead\n#endif\n    inkhud->persistence->settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery\n    inkhud->persistence->settings.userTiles.count = 1;    // One tile only by default, keep things simple for new users\n    inkhud->persistence->settings.userTiles.maxCount = 2; // Two applets side-by-side\n    inkhud->persistence->settings.optionalFeatures.batteryIcon = true;\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, no autoshow, default on tile 0\n\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet, false, false); // -\n    //  Start running InkHUD\n    inkhud->begin();\n\n    //  Buttons\n    //  --------------------------\n\n    Inputs::TwoButtonExtended *buttons = Inputs::TwoButtonExtended::getInstance(); // Shared NicheGraphics component\n\n#if HAS_TRACKBALL\n    // #0: Exit Button\n    buttons->setWiring(0, Inputs::TwoButtonExtended::getUserButtonPin());\n    buttons->setTiming(0, 75, 500);\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->exitShort(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->exitLong(); });\n\n    // #1: Joystick Center\n    buttons->setWiring(1, TB_PRESS);\n    buttons->setTiming(1, 75, 500);\n    buttons->setHandlerShortPress(1, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(1, [inkhud]() { inkhud->longpress(); });\n\n    // Joystick Directions\n    buttons->setJoystickWiring(TB_UP, TB_DOWN, TB_LEFT, TB_RIGHT);\n    buttons->setJoystickDebounce(50);\n    buttons->setJoystickPressHandlers([inkhud]() { inkhud->navUp(); }, [inkhud]() { inkhud->navDown(); },\n                                      [inkhud]() { inkhud->navLeft(); }, [inkhud]() { inkhud->navRight(); });\n#else\n    // #0: User Button\n    buttons->setWiring(0, Inputs::TwoButtonExtended::getUserButtonPin());\n    buttons->setTiming(0, 75, 500);\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n#endif\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/seeed_wio_tracker_L1_eink/platformio.ini",
    "content": "[env:seeed_wio_tracker_L1_eink]\ncustom_meshtastic_hw_model = 100\ncustom_meshtastic_hw_model_slug = SEEED_WIO_TRACKER_L1_EINK\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Seeed Wio Tracker L1 E-Ink\ncustom_meshtastic_images = wio_tracker_l1_eink.svg\ncustom_meshtastic_tags = Seeed\n\nboard = seeed_wio_tracker_L1\nextends = nrf52840_base\n;board_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/seeed_wio_tracker_L1_eink\n  -D SEEED_WIO_TRACKER_L1_EINK\n  -D SEEED_WIO_TRACKER_L1\n  -I src/platform/nrf52/softdevice\n  -I src/platform/nrf52/softdevice/nrf52\n  -DUSE_EINK\n  -DEINK_DISPLAY_MODEL=GxEPD2_213_B74\n  -DEINK_WIDTH=250\n  -DEINK_HEIGHT=122\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted\n  -DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates\n  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates\n;   -D EINK_LIMIT_GHOSTING_PX=2000      ; (Optional) How much image ghosting is tolerated\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -DEINK_HASQUIRK_GHOSTING             ; Display model is identified as \"prone to ghosting\"\n  -DEINK_HASQUIRK_WEAKFASTREFRESH      ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_wio_tracker_L1_eink>\nlib_deps =\n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\ndebug_tool = jlink\n\n[env:seeed_wio_tracker_L1_eink-inkhud]\nboard = seeed_wio_tracker_L1\nextends = nrf52840_base, inkhud\nbuild_flags = \n  ${nrf52840_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/nrf52840/seeed_wio_tracker_L1_eink\n  -D SEEED_WIO_TRACKER_L1\n  -D BUTTON_PIN=D13\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = \n  ${nrf52_base.build_src_filter}\n  ${inkhud.build_src_filter}\n  +<../variants/nrf52840/seeed_wio_tracker_L1_eink>\nlib_deps =\n  ${inkhud.lib_deps} ; Before base libs_deps, so we use ZinggJM/GFXRoot instead of AdafruitGFX (saves space)\n  ${nrf52840_base.lib_deps}\ndebug_tool = jlink\n"
  },
  {
    "path": "variants/nrf52840/seeed_wio_tracker_L1_eink/variant.cpp",
    "content": "/*\n * variant.cpp - Digital pin mapping for TRACKER L1\n *\n * This file defines the pin mapping array that maps logical digital pins (D0-D17)\n * to physical GPIO ports/pins on the Nordic nRF52 series microcontroller.\n *\n * Board: [Seeed Studio WIO TRACKER L1]\n * Hardware Features:\n *  - LoRa module (CS/SCK/MISO/MOSI control pins)\n *  - GNSS module (TX/RX/Reset/Wakeup)\n *  - User LEDs (D11-D12)\n *  - User button (D13)\n *  - Grove/NFC interface (D14-D15)\n *  - Battery voltage monitoring (D16)\n *\n * Created [20250521]\n * By [Dylan]\n */\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\n/**\n * @brief Digital pin to GPIO port/pin mapping table\n *\n * Format: Logical Pin (Dx) -> nRF Port.Pin (Px.xx)\n *\n */\n\nextern \"C\" {\nconst uint32_t g_ADigitalPinMap[] = {\n    // D0 .. D10 - Peripheral control pins\n    41, // D0  P1.09    GNSS_WAKEUP\n    7,  // D1  P0.07     LORA_DIO1\n    39, // D2  P1.07     LORA_RESET\n    42, // D3  P1.10     LORA_BUSY\n    46, // D4  P1.14 (A4/SDA) LORA_CS\n    40, // D5  P1.08 (A5/SCL) LORA_SW\n    27, // D6  P0.27 (UART_TX) GNSS_TX\n    26, // D7  P0.26 (UART_RX) GNSS_RX\n    30, // D8  P0.30 (SPI_SCK) LORA_SCK\n    3,  // D9  P0.3 (SPI_MISO) LORA_MISO\n    28, // D10 P0.28 (SPI_MOSI) LORA_MOSI\n\n    // D11-D12 - LED outputs\n    33, // D11 P1.1 User LED\n    // Buzzer\n    32, // D12 P1.0 Buzzer\n\n    // D13 - User input\n    8, // D13 P0.08 User Button\n\n    // D14-D15 - Grove interface\n    6, // D14 P0.06 OLED SDA\n    5, // D15 P0.05 OLED SCL\n\n    // D16 - Battery voltage ADC input\n    31, // D16 P0.31 VBAT_ADC\n    // GROVE\n    43, // D17 P0.00 GROVESDA\n    44, // D18 P0.01 GROVESCL\n\n    // FLASH\n    21, // D19 P0.21 (QSPI_SCK)\n    25, // D20 P0.25 (QSPI_CSN)\n    20, // D21 P0.20 (QSPI_SIO_0 DI)\n    24, // D22 P0.24 (QSPI_SIO_1 DO)\n    22, // D23 P0.22 (QSPI_SIO_2 WP)\n    23, // D24 P0.23 (QSPI_SIO_3 HOLD)\n\n    36, // D25 TB_UP\n    12, // D26 TB_DOWN\n    11, // D27 TB_LEFT\n    35, // D28 TB_RIGHT\n    37, // D29 TB_PRESS\n    4,  // D30 BAT_CTL\n\n    13, // D31 EINK_SCK\n    14, // D32 EINK_RST\n    15, // D33 EINK_MOSI\n    16, // D34 EINK_DC\n    17, // D35 EINK_BUSY\n    19, // D36 EINK_CS\n\n};\n}\n\nvoid initVariant()\n{\n    pinMode(PIN_QSPI_CS, OUTPUT);\n    digitalWrite(PIN_QSPI_CS, HIGH);\n    // This setup is crucial for ensuring low power consumption and proper initialization of the hardware components.\n    // VBAT_ENABLE\n    pinMode(BAT_READ, OUTPUT);\n    digitalWrite(BAT_READ, HIGH);\n\n    pinMode(PIN_LED1, OUTPUT);\n    digitalWrite(PIN_LED1, LOW);\n    pinMode(PIN_LED2, OUTPUT);\n    digitalWrite(PIN_LED2, LOW);\n}"
  },
  {
    "path": "variants/nrf52840/seeed_wio_tracker_L1_eink/variant.h",
    "content": "#ifndef _SEEED_TRACKER_L1_H_\n#define _SEEED_TRACKER_L1_H_\n#include \"WVariant.h\"\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Clock Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define VARIANT_MCK (64000000ul) // Master clock frequency\n#define USE_LFXO                 // 32.768kHz crystal for LFCLK\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Pin Capacity Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define PINS_COUNT (38u)       // Total GPIO pins\n#define NUM_DIGITAL_PINS (38u) // Digital I/O pins\n#define NUM_ANALOG_INPUTS (8u) // Analog inputs (A0-A5 + VBAT + AREF)\n#define NUM_ANALOG_OUTPUTS (0u)\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  LED Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  LEDs\n//  LEDs\n#define PIN_LED1 (11) // LED        P1.15\n#define PIN_LED2 (12) //\n\n#define LED_GREEN PIN_LED1\n#define LED_BLUE PIN_LED2\n#define LED_STATE_ON 1 // State when LED is lit\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Button Configuration\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define CANCEL_BUTTON_PIN D13 // This is the Program Button\n// #define BUTTON_NEED_PULLUP   1\n#define CANCEL_BUTTON_ACTIVE_LOW true\n#define CANCEL_BUTTON_ACTIVE_PULLUP false\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Digital Pin Mapping (D0-D10)\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define D0 0   // P1.06 GNSS_WAKEUP/IO0\n#define D1 1   // P0.07 LORA_DIO1\n#define D2 2   // P1.07 LORA_RESET\n#define D3 3   // P1.10 LORA_BUSY\n#define D4 4   // P1.14 LORA_CS\n#define D5 5   // P1.08 LORA_SW\n#define D6 6   // P0.27 GNSS_TX\n#define D7 7   // P0.26 GNSS_RX\n#define D8 8   // P0.30 SPI_SCK\n#define D9 9   // P0.03 SPI_MISO\n#define D10 10 // P0.28 SPI_MOSI\n#define D12 12 // P1.00 Buzzer\n#define D13 13 // P0.08 User Button\n#define D14 14 // P0.05 OLED SCL\n#define D15 15 // P0.06 OLED SDA\n#define D16 16 // P0.31 VBAT_ADC\n#define D17 17 // P0.00 GROVE SDA\n#define D18 18 // P0.01 GROVE_SCL\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Analog Pin Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define PIN_A0 0     // P0.02 Analog Input 0\n#define PIN_A1 1     // P0.03 Analog Input 1\n#define PIN_A2 2     // P0.28 Analog Input 2\n#define PIN_A3 3     // P0.29 Analog Input 3\n#define PIN_A4 4     // P0.04 Analog Input 4\n#define PIN_A5 5     // P0.05 Analog Input 5\n#define PIN_VBAT D16 // P0.31 Battery voltage sense\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Communication Interfaces\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  I2C Configuration\n#define HAS_WIRE 1\n#define PIN_WIRE_SDA D18 // P0.09\n#define PIN_WIRE_SCL D17 // P0.10\n#define WIRE_INTERFACES_COUNT 1\n\nstatic const uint8_t SDA = PIN_WIRE_SDA;\nstatic const uint8_t SCL = PIN_WIRE_SCL;\n\n// SPI Configuration (SX1262)\n\n// #define SPI_INTERFACES_COUNT 1\n#define PIN_SPI_MISO 9  // P0.03 (D9)\n#define PIN_SPI_MOSI 10 // P0.28 (D10)\n#define PIN_SPI_SCK 8   // P0.30 (D8)\n\n// SX1262 LoRa Module Pins\n#define USE_SX1262\n#define SX126X_CS D4                 // Chip select\n#define SX126X_DIO1 D1               // Digital IO 1 (Interrupt)\n#define SX126X_BUSY D3               // Busy status\n#define SX126X_RESET D2              // Reset control\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // TCXO supply voltage\n#define SX126X_RXEN D5               // RX enable control\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_DIO2_AS_RF_SWITCH // This Line is really necessary for SX1262  to work with RF switch or will loss TX power\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  EINK\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define SPI_INTERFACES_COUNT 2\n#define PIN_EINK_CS 36\n#define PIN_EINK_BUSY 35\n#define PIN_EINK_DC 34\n#define PIN_EINK_RES 32\n#define PIN_EINK_SCLK 31\n#define PIN_EINK_MOSI 33\n#define PIN_EINK_EN 14   // unused\n#define PIN_SPI1_MISO -1 // 15 unused\n#define PIN_SPI1_MOSI PIN_EINK_MOSI\n#define PIN_SPI1_SCK PIN_EINK_SCLK\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Power Management\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n#define BAT_READ 30 // D30 = P0.04  Reads battery voltage from divider on signal board.\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define ADC_MULTIPLIER 2.0\n#define BATTERY_PIN PIN_VBAT // PIN_A7\n#define AREF_VOLTAGE 3.6\n#define OCV_ARRAY 4200, 3876, 3826, 3763, 3713, 3660, 3573, 3485, 3422, 3359, 3300\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  GPS L76KB\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#define GPS_L76K\n#ifdef GPS_L76K\n#define GPS_TX_PIN D6 // P0.26 - This is data from the MCU\n#define GPS_RX_PIN D7 // P0.27 - This is data from the GNSS\n#define HAS_GPS 1\n#define GPS_BAUDRATE 9600\n#define GPS_THREAD_INTERVAL 50\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n#define PIN_GPS_STANDBY D0\n\n// #define GPS_DEBUG\n//  #define GPS_EN D18 // P1.05\n#endif\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  On-board QSPI Flash\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n// On-board QSPI Flash\n#define PIN_QSPI_SCK (21)\n#define PIN_QSPI_CS (22)\n#define PIN_QSPI_IO0 (23)\n#define PIN_QSPI_IO1 (24)\n#define PIN_QSPI_IO2 (25)\n#define PIN_QSPI_IO3 (26)\n\n#define EXTERNAL_FLASH_DEVICES P25Q16H\n#define EXTERNAL_FLASH_USE_QSPI\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Buzzer\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n// Buzzer\n\n#define PIN_BUZZER D12 // P1.00, pwm output\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  joystick\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n// trackball\n#define HAS_TRACKBALL 1\n#define TB_UP 25\n#define TB_DOWN 26\n#define TB_LEFT 27\n#define TB_RIGHT 28\n#define TB_PRESS 29\n#define TB_DIRECTION FALLING\n\n#define CANNED_MESSAGE_ADD_CONFIRMATION 1\n\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n//  Compatibility Definitions\n// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n// Serial port placeholders\n\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n#ifdef __cplusplus\n}\n#endif\n\n#endif //  _SEEED_TRACKER_L1_H_"
  },
  {
    "path": "variants/nrf52840/seeed_xiao_nrf52840_kit/platformio.ini",
    "content": "; Seeed Xiao BLE: https://wiki.seeedstudio.com/XIAO_BLE/\n[env:seeed_xiao_nrf52840_kit]\ncustom_meshtastic_hw_model = 88\ncustom_meshtastic_hw_model_slug = XIAO_NRF52_KIT\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = Seeed Xiao NRF52840 Kit\ncustom_meshtastic_images = seeed_xiao_nrf52_kit.svg\ncustom_meshtastic_tags = Seeed\n\nextends = nrf52840_base\nboard = xiao_ble_sense\nboard_level = pr\nbuild_flags = ${nrf52840_base.build_flags}\n  -I variants/nrf52840/seeed_xiao_nrf52840_kit\n  -I src/platform/nrf52/softdevice\n  -I src/platform/nrf52/softdevice/nrf52\n  -DSEEED_XIAO_NRF52840_KIT\n  -DSEEED_XIAO_NRF_KIT_DEFAULT\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_xiao_nrf52840_kit>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n\n; Seeed Xiao BLE but with GPS moved to NFC pins, and therefore i2c active\n[env:seeed_xiao_nrf52840_kit_i2c]\nextends = env:seeed_xiao_nrf52840_kit\nboard_level = extra\nbuild_flags = ${env:seeed_xiao_nrf52840_kit.build_flags}\n  -DSEEED_XIAO_NRF52840_KIT\n  -DSEEED_XIAO_NRF_KIT_I2C     ; Define I2C variant\n  -USEEED_XIAO_NRF_KIT_DEFAULT ; Remove default define"
  },
  {
    "path": "variants/nrf52840/seeed_xiao_nrf52840_kit/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"configuration.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n#include <map>\n#include <memory>\n#include <stddef.h>\n#include <stdint.h>\nconst uint32_t g_ADigitalPinMap[] = {\n    // D0 .. D13\n    2,  // D0  is P0.02 (A0)\n    3,  // D1  is P0.03 (A1)\n    28, // D2  is P0.28 (A2)\n    29, // D3  is P0.29 (A3)\n    4,  // D4  is P0.04 (A4,SDA)\n    5,  // D5  is P0.05 (A5,SCL)\n    43, // D6  is P1.11 (TX)\n    44, // D7  is P1.12 (RX)\n    45, // D8  is P1.13 (SCK)\n    46, // D9  is P1.14 (MISO)\n    47, // D10 is P1.15 (MOSI)\n\n    // LEDs\n    26, // D11 is P0.26 (LED RED)\n    6,  // D12 is P0.06 (LED BLUE)\n    30, // D13 is P0.30 (LED GREEN)\n    14, // D14 is P0.14 (READ_BAT)\n\n    // LSM6DS3TR\n    40, // D15 is P1.08 (6D_PWR)\n    27, // D16 is P0.27 (6D_I2C_SCL)\n    7,  // D17 is P0.07 (6D_I2C_SDA)\n    11, // D18 is P0.11 (6D_INT1)\n\n    // MIC\n    42, // D19 is P1.10 (MIC_PWR)\n    32, // D20 is P1.00 (PDM_CLK)\n    16, // D21 is P0.16 (PDM_DATA)\n\n    // BQ25100\n    13, // D22 is P0.13 (HICHG)\n    17, // D23 is P0.17 (~CHG)\n\n    //\n    21, // D24 is P0.21 (QSPI_SCK)\n    25, // D25 is P0.25 (QSPI_CSN)\n    20, // D26 is P0.20 (QSPI_SIO_0 DI)\n    24, // D27 is P0.24 (QSPI_SIO_1 DO)\n    22, // D28 is P0.22 (QSPI_SIO_2 WP)\n    23, // D29 is P0.23 (QSPI_SIO_3 HOLD)\n\n    // NFC\n    9,  // D30 is P0.09 (NFC1)\n    10, // D31 is P0.10 (NFC2)\n\n    // VBAT\n    31, // D32 is P0.10 (VBAT)\n};\n\n/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\nvoid initVariant()\n{\n    // Set BQ25101 ISET to 100mA instead of 50mA\n    pinMode(HICHG, OUTPUT);\n    digitalWrite(HICHG, LOW);\n\n    // LEDs\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(PIN_LED2, OUTPUT);\n    ledOff(PIN_LED2);\n\n    pinMode(PIN_LED3, OUTPUT);\n    ledOff(PIN_LED3);\n}\n"
  },
  {
    "path": "variants/nrf52840/seeed_xiao_nrf52840_kit/variant.h",
    "content": "#ifndef _SEEED_XIAO_NRF52840_KIT_H_\n#define _SEEED_XIAO_NRF52840_KIT_H_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// #define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n/*\nXiao pin assignments\n\n| Pin   | Default  | I2C  | BTB  | BLE-L |     | Pin   | Default | I2C  | BTB  | BLE-L |\n| ----- | -------- | ---- | ---- | ----- | --- | ----- | ------- | ---- | ---- | ----- |\n|       |          |      |      |       |     |       |         |      |      |       |\n| D0    | G_STBY   | UBTN | DIO1 | CS    |     | 5v    |         |      |      |       |\n| D1    | DIO1     | DIO1 | Busy | DIO1  |     | GND   |         |      |      |       |\n| D2    | NRST     | NRST | NRST | Busy  |     | 3v3   |         |      |      |       |\n| D3    | Busy     | Busy | CS   | NRST  |     | D10   | MOSI    | MOSI | MOSI | MOSI  |\n| D4    | CS       | CS   | RXEN | SDA   |     | D9    | MISO    | MISO | MISO | MISO  |\n| D5    | RXEN     | RXEN |      | SCL   |     | D8    | SCK     | SCK  | SCK  | SCK   |\n| D6    | G_TX     | SDA  | G_TX |       |     | D7    | G_RX    | SCL  | G_RX | RXEN  |\n|       |          |      |      |       |     |       |         |      |      |       |\n|       | End      |      |      |       |     |       |         |      |      |       |\n| NFC1/ | SDA      | G_TX | SDA  | G_TX  |     | NFC2/ | SCL     | G_RX | SCL  | G_RX  |\n| D30   |          |      |      |       |     | D31   |         |      |      |       |\n|       |          |      |      |       |     |       |         |      |      |       |\n|       | Internal |      |      |       |     |       |         |      |      |       |\n| D16   | SCL1     | SCL1 | SCL1 | SCL1  |     |       |         |      |      |       |\n| D17   | SDA1     | SDA1 | SDA1 | SDA1  |     |       |         |      |      |       |\n\nThe default column shows the pin assignments for the Wio-SX1262 for XIAO\n(standalone SKU 113010003 or nRF52840 kit SKU 102010710).\nThe I2C column shows an alternative pin assignment using I2C on D6/D7 in place of the GNSS.\nThe BTB column shows the pin assignment for the Wio-SX1262 -30-pin board-to-board connector version from the ESP32S3 kit.\nThe BLE-L column shows the pin assignment for the original DIY xiao_ble, and which is retained for legacy users.\nNote that the in addition to the difference between the default and the I2C pinouts in placing the pins on NFC or\nD6/D7, the user button is activated on D0. The button conflicts with the official GNSS module, so caution is advised.\n*/\n\n#define PINS_COUNT (33)\n#define NUM_DIGITAL_PINS (33)\n#define NUM_ANALOG_INPUTS (8)\n#define NUM_ANALOG_OUTPUTS (0)\n\n/*\n * Digital Pins\n */\n#define D0 (0ul)\n#define D1 (1ul)\n#define D2 (2ul)\n#define D3 (3ul)\n#define D4 (4ul)\n#define D5 (5ul)\n#define D6 (6ul)\n#define D7 (7ul)\n#define D8 (8ul)\n#define D9 (9ul)\n#define D10 (10ul)\n\n/*\n * Analog pins\n */\n#define PIN_A0 (0)\n#define PIN_A1 (1)\n#define PIN_A2 (32)\n#define PIN_A3 (3)\n#define PIN_A4 (4)\n#define PIN_A5 (5)\n#define PIN_VBAT (32)\n#define VBAT_ENABLE (14)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\nstatic const uint8_t A4 = PIN_A4;\nstatic const uint8_t A5 = PIN_A5;\n#define ADC_RESOLUTION 12\n\n/*\n * LEDs\n */\n#define LED_STATE_ON (0) // RGB LED is common anode\n#define LED_RED (11)\n#define LED_GREEN (13)\n#define LED_BLUE (12)\n\n#define PIN_LED1 LED_GREEN // PIN_LED1 is used in src/platform/nrf52/architecture.h to define LED_POWER\n#define PIN_LED2 LED_BLUE\n#define PIN_LED3 LED_RED\n\n/*\n * Buttons\n */\n\n/*\n * D0 is shared with PIN_GPS_STANDBY on the L76K GNSS Module, so refer to\n * GPS_L76K definition preventing this conflict\n */\n\n// #define BUTTON_PIN D0\n\n/*\n * Serial Interfaces\n */\n#define PIN_SERIAL2_RX (-1)\n#define PIN_SERIAL2_TX (-1)\n\n/*\n * Pinout for SX126x\n */\n#define USE_SX1262\n\n#if defined(XIAO_BLE_LEGACY_PINOUT)\n// Legacy xiao_ble variant pinout for third-party SX126x modules e.g. EBYTE E22\n#define SX126X_CS D0\n#define SX126X_DIO1 D1\n#define SX126X_BUSY D2\n#define SX126X_RESET D3\n#define SX126X_RXEN D7\n#else\n#if defined(SEEED_XIAO_NRF_WIO_BTB)\n// Wio-SX1262 for XIAO with 30-pin board-to-board connector\n// https://files.seeedstudio.com/products/SenseCAP/Wio_SX1262/Schematic_Diagram_Wio-SX1262_for_XIAO.pdf\n#define SX126X_CS D3\n#define SX126X_DIO1 D0\n#define SX126X_BUSY D1\n#define SX126X_RESET D2\n#define SX126X_RXEN D4\n#else\n// Wio-SX1262 for XIAO (standalone SKU 113010003 or nRF52840 kit SKU 102010710)\n// Same for both default and I2C pinouts\n// https://files.seeedstudio.com/products/SenseCAP/Wio_SX1262/Wio-SX1262%20for%20XIAO%20V1.0_SCH.pdf\n#define SX126X_CS D4\n#define SX126X_DIO1 D1\n#define SX126X_BUSY D3\n#define SX126X_RESET D2\n#define SX126X_RXEN D5\n#endif // defined(SEEED_XIAO_NRF_WIO_BTB)\n#endif // defined(XIAO_BLE_LEGACY_PINOUT)\n\n// Common pinouts for all SX126x pinouts above\n#define SX126X_TXEN RADIOLIB_NC\n#define SX126X_DIO2_AS_RF_SWITCH // DIO2 is used to control the TX side of the RF switch\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n/*\n * SPI Interfaces\n * Defined after pinout for SX1262x to factor in CS pinout variations\n */\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO D9\n#define PIN_SPI_MOSI D10\n#define PIN_SPI_SCK D8\n\nstatic const uint8_t SS = SX126X_CS;\nstatic const uint8_t MOSI = PIN_SPI_MOSI;\nstatic const uint8_t MISO = PIN_SPI_MISO;\nstatic const uint8_t SCK = PIN_SPI_SCK;\n\n/*\n * GPS\n */\n// GPS L76K\n\n// Default GPS L76K\n#if defined(SEEED_XIAO_NRF_KIT_DEFAULT) || defined(SEEED_XIAO_NRF_WIO_BTB)\n#define GPS_L76K\n#define GPS_TX_PIN D6 // This is data from the MCU\n#define GPS_RX_PIN D7 // This is data from the GNSS module\n#if defined(SEEED_XIAO_NRF_KIT_DEFAULT)\n#define PIN_GPS_STANDBY D0 // this is where the conflicting pinouts come from\n#endif\n// I2C and BLE-Legacy put them on the NFC pins\n#else\n#define GPS_TX_PIN (30)\n#define GPS_RX_PIN (31)\n#endif\n\n#define HAS_GPS 1\n#define GPS_BAUDRATE 9600\n#define GPS_THREAD_INTERVAL 50\n#define PIN_SERIAL1_TX GPS_TX_PIN\n#define PIN_SERIAL1_RX GPS_RX_PIN\n\n/*\n * Battery\n */\n#define BATTERY_PIN PIN_VBAT      // P0.31: VBAT voltage divider\n#define ADC_MULTIPLIER (3)        // ... R17=1M, R18=510k\n#define ADC_CTRL VBAT_ENABLE      // P0.14: VBAT voltage divider\n#define ADC_CTRL_ENABLED LOW      // ... sink\n#define EXT_CHRG_DETECT (23)      // P0.17: Charge LED\n#define EXT_CHRG_DETECT_VALUE LOW // ... BQ25101 ~CHG indicates charging\n#define HICHG (22)                // P0.13: BQ25101 ISET 100mA instead of 50mA\n\n#define BATTERY_SENSE_RESOLUTION_BITS (10)\n\n/*\n * Wire Interfaces\n * Keep this section after potentially conflicting pin definitions\n */\n#define I2C_NO_RESCAN           // I2C is a bit finicky, don't scan too much\n#define WIRE_INTERFACES_COUNT 1 // changed to 1 for now, as LSM6DS3TR has issues.\n\n#if defined(XIAO_BLE_LEGACY_PINOUT)\n// Used for I2C by DIY xiao_ble variant\n#define PIN_WIRE_SDA D4\n#define PIN_WIRE_SCL D5\n#else\n// Put the I2C pins on the NFC pins by default\n#if defined(SEEED_XIAO_NRF_KIT_DEFAULT) || defined(SEEED_XIAO_NRF_WIO_BTB)\n#define PIN_WIRE_SDA 30\n#define PIN_WIRE_SCL 31\n#else\n// If not on legacy or defauly, we're wanting I2C on the back pins\n#define PIN_WIRE_SDA D6\n#define PIN_WIRE_SCL D7\n#endif // defined(SEEED_XIAO_NRF_KIT_DEFAULT) || defined(SEEED_XIAO_NRF_WIO_BTB)\n#endif // defined(XIAO_BLE_LEGACY_PINOUT)\n\n// // Internal LSM6DS3TR on XIAO nRF52840 Series - put it on wire1\n// // Note: disabled for now, as there are some issues with the LSM.\n// #define PIN_WIRE1_SDA (17)\n// #define PIN_WIRE1_SCL (16)\n\nstatic const uint8_t SDA = PIN_WIRE_SDA; // Not sure if this is needed\nstatic const uint8_t SCL = PIN_WIRE_SCL; // Not sure if this is needed\n\n// // QSPI Pins\n// // ---------\n// #define PIN_QSPI_SCK (24)\n// #define PIN_QSPI_CS (25)\n// #define PIN_QSPI_IO0 (26)\n// #define PIN_QSPI_IO1 (27)\n// #define PIN_QSPI_IO2 (28)\n// #define PIN_QSPI_IO3 (29)\n\n// // On-board QSPI Flash\n// // -------------------\n// #define EXTERNAL_FLASH_DEVICES P25Q16H\n// #define EXTERNAL_FLASH_USE_QSPI\n\n/*\n * Buttons\n * Keep this section after potentially conflicting pin definitions\n * because D0 has multiple possible conflicts with various XIAO modules:\n */\n#if defined(SEEED_XIAO_NRF_KIT_I2C)\n#define BUTTON_PIN D0\n#endif\n\n#if defined(SEEED_XIAO_NRF_WIO_BTB)\n#define BUTTON_PIN D5\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/t-echo/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n// InkHUD-specific components\n// ---------------------------\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n\n// Applets\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n\n// Shared NicheGraphics components\n// --------------------------------\n#include \"graphics/niche/Drivers/Backlight/LatchingBacklight.h\"\n#include \"graphics/niche/Drivers/EInk/GDEY0154D67.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\n// Special case - fix T-Echo's touch button\n// ----------------------------------------\n// On a handful of T-Echos, LoRa TX triggers the capacitive touch\n// To avoid this, we lockout the button during TX\n#include \"mesh/RadioLibInterface.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    // SPI\n    // -----------------------------\n\n    // For NRF52 platforms, SPI pins are defined in variant.h\n    SPI1.begin();\n\n    // E-Ink Driver\n    // -----------------------------\n\n    Drivers::EInk *driver = new Drivers::GDEY0154D67;\n    driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    // InkHUD\n    // ----------------------------\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n\n    // Set the E-Ink driver\n    inkhud->setDriver(driver);\n\n    // Set how many FAST updates per FULL update\n    // Set how unhealthy additional FAST updates beyond this number are\n    inkhud->setDisplayResilience(20, 1.5);\n\n    // Select fonts\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n\n    // Customize default settings\n    inkhud->persistence->settings.userTiles.maxCount = 2;              // Two applets side-by-side\n    inkhud->persistence->settings.rotation = 3;                        // 270 degrees clockwise\n    inkhud->persistence->settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery\n    inkhud->persistence->settings.optionalMenuItems.backlight = true;  // Until proves capacitive button works by touching it\n\n    // Setup backlight controller\n    // Note: AUX button attached further down\n    Drivers::LatchingBacklight *backlight = Drivers::LatchingBacklight::getInstance();\n    backlight->setPin(PIN_EINK_EN);\n\n    // Pick applets\n    // Note: order of applets determines priority of \"auto-show\" feature\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);                              // -\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));        // -\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));        // -\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);           // Activated\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);          // -\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);            // -\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);         // Activated, no autoshow, default on tile 0\n\n    // Start running InkHUD\n    inkhud->begin();\n\n    // Buttons\n    // --------------------------\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance(); // Shared NicheGraphics component\n\n    // #0: Main User Button\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setTiming(0, 75, 500);\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    // #1: Aux Button (Capacitive Touch Button)\n    // - short: momentary backlight\n    // - long: latch backlight on\n    buttons->setWiring(1, PIN_BUTTON_TOUCH);\n    buttons->setTiming(1, 50, 5000); // 5 seconds before latch - limited by T-Echo's capacitive touch IC\n\n    buttons->setHandlerDown(1, [inkhud, backlight]() {\n        // Discard the button press if radio is active\n        // Rare hardware fault: LoRa activity triggers touch button\n        if (!RadioLibInterface::instance || RadioLibInterface::instance->isSending())\n            return;\n\n        // Backlight on (while held)\n        backlight->peek();\n\n        // Handler has run, which confirms touch button wasn't removed as part of DIY build.\n        // No longer need the fallback backlight toggle in menu.\n        inkhud->persistence->settings.optionalMenuItems.backlight = false;\n    });\n\n    buttons->setHandlerLongPress(1, [backlight]() { backlight->latch(); });\n    buttons->setHandlerShortPress(1, [backlight]() { backlight->off(); });\n\n    // Begin handling button events\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/t-echo/platformio.ini",
    "content": "; Using original screen class\n[env:t-echo]\ncustom_meshtastic_hw_model = 7\ncustom_meshtastic_hw_model_slug = T_ECHO\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-Echo\ncustom_meshtastic_images = t-echo.svg\ncustom_meshtastic_tags = LilyGo\n\nextends = nrf52840_base\nboard = t-echo\nboard_level = pr\nboard_check = true\ndebug_tool = jlink\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/t-echo\n  -DEINK_DISPLAY_MODEL=GxEPD2_154_D67\n  -DEINK_WIDTH=200\n  -DEINK_HEIGHT=200\n  -DUSE_EINK\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=20          ; How many consecutive fast-refreshes are permitted\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/t-echo>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n;upload_protocol = fs\n\n[env:t-echo-inkhud]\nextends = nrf52840_base, inkhud\nboard = t-echo\nboard_level = pr\nboard_check = true\ndebug_tool = jlink\nbuild_flags = \n  ${nrf52840_base.build_flags}\n  ${inkhud.build_flags}\n  -I variants/nrf52840/t-echo\nbuild_src_filter = \n  ${nrf52_base.build_src_filter} \n  ${inkhud.build_src_filter}\n  +<../variants/nrf52840/t-echo>\nlib_deps = \n  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX\n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib\n  lewisxhe/SensorLib@0.3.4\n"
  },
  {
    "path": "variants/nrf52840/t-echo/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(PIN_LED2, OUTPUT);\n    ledOff(PIN_LED2);\n\n    pinMode(PIN_LED3, OUTPUT);\n    ledOff(PIN_LED3);\n}\n\nvoid variant_shutdown()\n{\n    // To power off the T-Echo, the display must be set\n    // as an input pin; otherwise, there will be leakage current.\n    pinMode(PIN_EINK_CS, INPUT);\n    pinMode(PIN_EINK_DC, INPUT);\n    pinMode(PIN_EINK_RES, INPUT);\n    pinMode(PIN_EINK_BUSY, INPUT);\n}"
  },
  {
    "path": "variants/nrf52840/t-echo/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_TTGO_EINK_V1_0_\n#define _VARIANT_TTGO_EINK_V1_0_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n#define TTGO_T_ECHO\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (0 + 14) // 13 red (confirmed on 1.0 board)\n// Unused(by firmware) LEDs:\n#define PIN_LED2 (0 + 15) // 14 blue\n#define PIN_LED3 (0 + 13) // 15 green\n\n#define LED_RED PIN_LED3\n#define LED_BLUE PIN_LED1\n#define LED_GREEN PIN_LED2\n\n#define LED_STATE_ON 0 // State when LED is lit\n\n/*\n * Buttons\n */\n#define PIN_BUTTON1 (32 + 10)\n#define BUTTON_ACTIVE_LOW true\n#define BUTTON_ACTIVE_PULLUP true\n#define PIN_BUTTON2 (0 + 18)      // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular GPIO\n#define PIN_BUTTON_TOUCH (0 + 11) // 0.11 is the soft touch button on T-Echo\n#define BUTTON_TOUCH_ACTIVE_LOW true\n#define BUTTON_TOUCH_ACTIVE_PULLUP true\n\n#define BUTTON_CLICK_MS 400\n#define BUTTON_TOUCH_MS 200\n\n/*\n * Analog pins\n */\n#define PIN_A0 (4) // Battery ADC\n\n#define BATTERY_PIN PIN_A0\n\nstatic const uint8_t A0 = PIN_A0;\n\n#define ADC_RESOLUTION 14\n\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\n/*\n * Serial interfaces\n */\n#define SERIAL_PRINT_PORT 0\n\n/*\nNo longer populated on PCB\n*/\n// #define PIN_SERIAL2_RX (0 + 6)\n// #define PIN_SERIAL2_TX (0 + 8)\n//  #define PIN_SERIAL2_EN (0 + 17)\n\n/**\n    Wire Interfaces\n    */\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (26)\n#define PIN_WIRE_SCL (27)\n\n/* touch sensor, active high */\n\n#define TP_SER_IO (0 + 11)\n\n/*\nExternal serial flash WP25R1635FZUIL0\n*/\n\n// QSPI Pins\n#define PIN_QSPI_SCK (32 + 14)\n#define PIN_QSPI_CS (32 + 15)\n#define PIN_QSPI_IO0 (32 + 12) // MOSI if using two bit interface\n#define PIN_QSPI_IO1 (32 + 13) // MISO if using two bit interface\n#define PIN_QSPI_IO2 (0 + 7)   // WP if using two bit interface (i.e. not used)\n#define PIN_QSPI_IO3 (0 + 5)   // HOLD if using two bit interface (i.e. not used)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES MX25R1635F\n#define EXTERNAL_FLASH_USE_QSPI\n\n/*\n * Lora radio\n */\n\n#define USE_SX1262\n#define USE_SX1268\n#define SX126X_CS (0 + 24) // FIXME - we really should define LORA_CS instead\n#define SX126X_DIO1 (0 + 20)\n// Note DIO2 is attached internally to the module to an analog switch for TX/RX switching\n#define SX1262_DIO3                                                                                                              \\\n    (0 + 21) // This is used as an *output* from the sx1262 and connected internally to power the tcxo, do not drive from the main\n// CPU?\n#define SX126X_BUSY (0 + 17)\n#define SX126X_RESET (0 + 25)\n// Not really an E22 but TTGO seems to be trying to clone that\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL\n// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface\n// code)\n\n// #define LORA_DISABLE_SENDING // Define this to disable transmission for testing (power testing etc...)\n\n// #undef SX126X_CS\n\n/*\n * eink display pins\n */\n\n#define PIN_EINK_EN (32 + 11) // Note: this is really just backlight power\n#define PIN_EINK_CS (0 + 30)\n#define PIN_EINK_BUSY (0 + 3)\n#define PIN_EINK_DC (0 + 28)\n#define PIN_EINK_RES (0 + 2)\n#define PIN_EINK_SCLK (0 + 31)\n#define PIN_EINK_MOSI (0 + 29) // also called SDI\n\n// Controls power for all peripherals (eink + GPS + LoRa + Sensor)\n#define PIN_POWER_EN (0 + 12)\n\n#define PIN_SPI1_MISO                                                                                                            \\\n    (32 + 7) // FIXME not really needed, but for now the SPI code requires something to be defined, pick an used GPIO\n#define PIN_SPI1_MOSI PIN_EINK_MOSI\n#define PIN_SPI1_SCK PIN_EINK_SCLK\n\n/*\n * GPS pins\n */\n\n#define GPS_L76K\n#define PIN_GPS_REINIT (32 + 5) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n\n#define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake\n// Seems to be missing on this new board\n#define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS\n#define GPS_TX_PIN (32 + 8)  // This is for bits going TOWARDS the CPU\n#define GPS_RX_PIN (32 + 9)  // This is for bits going TOWARDS the GPS\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n// PCF8563 RTC Module\n#define PIN_RTC_INT (0 + 16) // Interrupt from the PCF8563 RTC\n#define PCF8563_RTC 0x51\n\n/*\n * SPI Interfaces\n */\n#define SPI_INTERFACES_COUNT 2\n\n// For LORA, spi 0\n#define PIN_SPI_MISO (0 + 23)\n#define PIN_SPI_MOSI (0 + 22)\n#define PIN_SPI_SCK (0 + 19)\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n// Battery\n// The battery sense is hooked to pin A0 (4)\n// it is defined in the anlaolgue pin section of this file\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (2.0F)\n\n// #define NO_EXT_GPIO 1\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif"
  },
  {
    "path": "variants/nrf52840/t-echo-lite/platformio.ini",
    "content": "; Using original screen class\n[env:t-echo-lite]\ncustom_meshtastic_hw_model = 109\ncustom_meshtastic_hw_model_slug = T_ECHO_LITE\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = false\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_display_name = LILYGO T-Echo Lite\ncustom_meshtastic_images = techo_lite.svg\ncustom_meshtastic_tags = LilyGo\n\nextends = nrf52840_base\nboard = t-echo\nboard_check = true\ndebug_tool = jlink\n\n# add -DCFG_SYSVIEW if you want to use the Segger systemview tool for OS profiling.\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/t-echo-lite\n  -D T_ECHO_LITE\n  -D EINK_DISPLAY_MODEL=GxEPD2_122_T61\n  -D EINK_WIDTH=192\n  -D EINK_HEIGHT=176\n  -D USE_EINK\n  -D USE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -D EINK_LIMIT_FASTREFRESH=20          ; How many consecutive fast-refreshes are permitted\n  -D EINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/t-echo-lite>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master\n  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip\n;upload_protocol = fs\n"
  },
  {
    "path": "variants/nrf52840/t-echo-lite/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(PIN_LED2, OUTPUT);\n    ledOff(PIN_LED2);\n\n    pinMode(PIN_LED3, OUTPUT);\n    ledOff(PIN_LED3);\n}\n"
  },
  {
    "path": "variants/nrf52840/t-echo-lite/variant.h",
    "content": "/*\n Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n Copyright (c) 2016 Sandeep Mistry All right reserved.\n Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n See the GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_TTGO_EINK_V1_0_\n#define _VARIANT_TTGO_EINK_V1_0_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs\n#define PIN_LED1 (32 + 7) // Green LED\n#define PIN_LED2 (32 + 5) // Blue LED\n// Unused(by firmware) LEDs:\n#define PIN_LED3 (32 + 14) // Red LED inside, under the display.\n\n#define LED_RED PIN_LED3\n#define LED_BLUE PIN_LED2\n#define LED_GREEN PIN_LED1\n\n#define BLE_LED LED_BLUE\n#define LED_STATE_ON 0 // State when LED is lit\n\n// Buttons\n#define PIN_BUTTON1 (0 + 24)\n#define PIN_BUTTON2 (0 + 18) // 0.18 is labeled on the board as RESET but we configure it in the bootloader as a regular GPIO\n\n#define BUTTON_CLICK_MS 400\n\n// Analog pins\n#define PIN_A0 (0 + 2) // Battery ADC\n\n#define BATTERY_PIN PIN_A0\n\nstatic const uint8_t A0 = PIN_A0;\n\n#define ADC_RESOLUTION 14\n\n#define ADC_CTRL (0 + 31)\n#define ADC_CTRL_ENABLED HIGH\n\n// NFC\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\n// Wire Interfaces\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (32 + 4)\n#define PIN_WIRE_SCL (32 + 2)\n\n/*\n Internal, PCB PAD interrupt PIN. Currently not used. (Not built in my device)\n*/\n// #define PIN_IMU_INT (0 + 16) // Interrupt from the IMU, macro name correct?!\n\n// External serial flash ZD25WQ32CEIGR\n// QSPI Pins\n#define PIN_QSPI_SCK (0 + 4)\n#define PIN_QSPI_CS (0 + 12)\n#define PIN_QSPI_IO0 (0 + 6)  // MOSI if using two bit interface\n#define PIN_QSPI_IO1 (0 + 8)  // MISO if using two bit interface\n#define PIN_QSPI_IO2 (32 + 9) // WP if using two bit interface (i.e. not used)\n#define PIN_QSPI_IO3 (0 + 26) // HOLD if using two bit interface (i.e. not used)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES ZD25WQ32CEIGR\n#define EXTERNAL_FLASH_USE_QSPI\n\n// Lora radio\n\n#define USE_SX1262\n// #define USE_SX1268 // currently only available with XS1262.\n#define SX126X_CS (0 + 11)\n#define SX126X_DIO1 (32 + 8)\n#define SX126X_DIO2 (0 + 5)\n#define SX126X_BUSY (0 + 14)\n#define SX126X_RESET (0 + 7)\n#define SX126X_RXEN (32 + 1)\n#define SX126X_TXEN (0 + 27)\n// #define TCXO_OPTIONAL\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n\n// eink display pins\n#define VEXT_ENABLE (32 + 12)\n#define VEXT_ON_VALUE LOW\n#define PIN_EINK_CS (0 + 22)\n#define PIN_EINK_BUSY (0 + 3)\n#define PIN_EINK_DC (0 + 21)\n#define PIN_EINK_RES (0 + 28)\n#define PIN_EINK_SCLK (0 + 19)\n#define PIN_EINK_MOSI (0 + 20)\n\n// Controls power 3V3 for all peripherals (eink + GPS + LoRa + Sensor)\n#define PIN_POWER_EN (0 + 30) // 3V3 POWER Enable\n\n#define PIN_SPI1_MISO (-1) // The display does not use MISO.\n#define PIN_SPI1_MOSI PIN_EINK_MOSI\n#define PIN_SPI1_SCK PIN_EINK_SCLK\n\n// GPS pins\n// #define GPS_DEBUG\n#define GPS_L76K\n#define GPS_BAUDRATE 9600\n#define HAS_GPS 1\n// #define PIN_GPS_REINIT (32 + 5) // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K\n\n#define PIN_GPS_EN (32 + 11) // GPS power\n#define GPS_EN_ACTIVE 1\n#define PIN_GPS_STANDBY (32 + 13) // wakeup pin\n#define PIN_GPS_PPS (32 + 15)\n#define GPS_TX_PIN (32 + 10) // L76K module RX PIN\n#define GPS_RX_PIN (0 + 29)  // L76K module TX PIN\n\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_TX_PIN\n#define PIN_SERIAL1_TX GPS_RX_PIN\n\n// SPI Interfaces\n#define SPI_INTERFACES_COUNT 2\n\n// For LORA, SPI 0\n#define PIN_SPI_MISO (0 + 17)\n#define PIN_SPI_MOSI (0 + 15)\n#define PIN_SPI_SCK (0 + 13)\n\n// Battery\n// The battery sense is hooked to pin A0 (2)\n// it is defined in the analogue pin section of this file\n// and has 12 bit resolution\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (2.0F)\n\n#define SERIAL_PRINT_PORT 0\n\n// #define NO_EXT_GPIO 1\n// PINs back side\n// Batt & solar connector left up corner\n/*\n-------------------------------\n| VDDH, VBAT, 0.23, SCL , 1.06 |\n| GND , SDA , 0.09, 0.10, 0.25 |\n-------------------------------\n                        --------\n                        | VDDH |\n                        | GND  |\n                        | 1.13 | - Wake Up/standby\n                        | 1.15 | - PPS\n                        | 0.29 | - TX\n                        | 1.10 | - RX\n                        | 1.11 | - EN\n                        --------\n-------------------------------\n| 3V3 , GND , 0.16, 1.03, G_WU |  0.16 internal solder pad interrupt PIN,\n| G_EN, G_RX, G_TX, GND , PPS  |\n-------------------------------\n*/\n\n// To debug via the segger JLINK console rather than the CDC-ACM serial device\n// #define USE_SEGGER\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/t-echo-plus/nicheGraphics.h",
    "content": "#pragma once\n\n#include \"configuration.h\"\n\n#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS\n\n#include \"graphics/niche/Drivers/Backlight/LatchingBacklight.h\"\n#include \"graphics/niche/Drivers/EInk/GDEY0154D67.h\"\n#include \"graphics/niche/InkHUD/Applets/User/AllMessage/AllMessageApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/DM/DMApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Heard/HeardApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/RecentsList/RecentsListApplet.h\"\n#include \"graphics/niche/InkHUD/Applets/User/ThreadedMessage/ThreadedMessageApplet.h\"\n#include \"graphics/niche/InkHUD/InkHUD.h\"\n#include \"graphics/niche/Inputs/TwoButton.h\"\n\nvoid setupNicheGraphics()\n{\n    using namespace NicheGraphics;\n\n    SPI1.begin();\n\n    Drivers::EInk *driver = new Drivers::GDEY0154D67;\n    driver->begin(&SPI1, PIN_EINK_DC, PIN_EINK_CS, PIN_EINK_BUSY, PIN_EINK_RES);\n\n    InkHUD::InkHUD *inkhud = InkHUD::InkHUD::getInstance();\n    inkhud->setDriver(driver);\n    inkhud->setDisplayResilience(20, 1.5);\n    InkHUD::Applet::fontLarge = FREESANS_12PT_WIN1252;\n    InkHUD::Applet::fontMedium = FREESANS_9PT_WIN1252;\n    InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;\n    inkhud->persistence->settings.userTiles.maxCount = 2;\n    inkhud->persistence->settings.rotation = 3;\n    inkhud->persistence->settings.optionalFeatures.batteryIcon = true;\n    inkhud->persistence->settings.optionalMenuItems.backlight = true;\n\n    Drivers::LatchingBacklight *backlight = Drivers::LatchingBacklight::getInstance();\n    backlight->setPin(PIN_EINK_BL);\n\n    inkhud->addApplet(\"All Messages\", new InkHUD::AllMessageApplet, true, true);\n    inkhud->addApplet(\"DMs\", new InkHUD::DMApplet);\n    inkhud->addApplet(\"Channel 0\", new InkHUD::ThreadedMessageApplet(0));\n    inkhud->addApplet(\"Channel 1\", new InkHUD::ThreadedMessageApplet(1));\n    inkhud->addApplet(\"Positions\", new InkHUD::PositionsApplet, true);\n    inkhud->addApplet(\"Favorites Map\", new InkHUD::FavoritesMapApplet);\n    inkhud->addApplet(\"Recents List\", new InkHUD::RecentsListApplet);\n    inkhud->addApplet(\"Heard\", new InkHUD::HeardApplet, true, false, 0);\n\n    inkhud->begin();\n\n    Inputs::TwoButton *buttons = Inputs::TwoButton::getInstance();\n\n    buttons->setWiring(0, Inputs::TwoButton::getUserButtonPin());\n    buttons->setTiming(0, 75, 500);\n    buttons->setHandlerShortPress(0, [inkhud]() { inkhud->shortpress(); });\n    buttons->setHandlerLongPress(0, [inkhud]() { inkhud->longpress(); });\n\n    buttons->setWiring(1, PIN_BUTTON_TOUCH);\n    buttons->setTiming(1, 50, 5000);\n    buttons->setHandlerDown(1, [inkhud, backlight]() {\n        backlight->peek();\n        inkhud->persistence->settings.optionalMenuItems.backlight = false;\n    });\n    buttons->setHandlerLongPress(1, [backlight]() { backlight->latch(); });\n    buttons->setHandlerShortPress(1, [backlight]() { backlight->off(); });\n\n    buttons->start();\n}\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/t-echo-plus/platformio.ini",
    "content": "[env:t-echo-plus]\nextends = nrf52840_base\nboard = t-echo\nboard_level = pr\nboard_check = true\ndebug_tool = jlink\n\nbuild_flags = ${nrf52840_base.build_flags}\n  -DTTGO_T_ECHO_PLUS\n  -Ivariants/nrf52840/t-echo-plus\n  -DEINK_DISPLAY_MODEL=GxEPD2_154_D67\n  -DEINK_WIDTH=200\n  -DEINK_HEIGHT=200\n  -DUSE_EINK\n  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk\n  -DEINK_LIMIT_FASTREFRESH=20          ; How many consecutive fast-refreshes are permitted\n  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.\n  -DI2C_NO_RESCAN\n\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/t-echo-plus>\n\nlib_deps =\n  ${nrf52840_base.lib_deps}\n  https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip\n  lewisxhe/PCF8563_Library@^1.0.1\n  adafruit/Adafruit DRV2605 Library@1.2.4\n"
  },
  {
    "path": "variants/nrf52840/t-echo-plus/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0 - pins 0 and 1 are hardwired for xtal and should never be enabled\n    0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LEDs (if populated)\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(PIN_LED2, OUTPUT);\n    ledOff(PIN_LED2);\n\n    pinMode(PIN_LED3, OUTPUT);\n    ledOff(PIN_LED3);\n}\n"
  },
  {
    "path": "variants/nrf52840/t-echo-plus/variant.h",
    "content": "#ifndef _VARIANT_T_ECHO_PLUS_\n#define _VARIANT_T_ECHO_PLUS_\n\n#define VARIANT_MCK (64000000ul)\n#define USE_LFXO\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// Pin counts\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (1)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// LEDs (not documented on pinmap; keep defaults for compatibility)\n#define PIN_LED1 (0 + 14)\n#define PIN_LED2 (0 + 15)\n#define PIN_LED3 (0 + 13)\n\n#define LED_RED PIN_LED3\n#define LED_BLUE PIN_LED1\n#define LED_GREEN PIN_LED2\n\n#define LED_STATE_ON 0\n\n// Buttons / touch\n#define PIN_BUTTON1 (32 + 10)\n#define BUTTON_ACTIVE_LOW true\n#define BUTTON_ACTIVE_PULLUP true\n#define PIN_BUTTON2 (0 + 18)      // reset-labelled but usable as GPIO\n#define PIN_BUTTON_TOUCH (0 + 11) // capacitive touch\n#define BUTTON_TOUCH_ACTIVE_LOW true\n#define BUTTON_TOUCH_ACTIVE_PULLUP true\n\n#define BUTTON_CLICK_MS 400\n#define BUTTON_TOUCH_MS 200\n\n// Analog\n#define PIN_A0 (4)\n#define BATTERY_PIN PIN_A0\nstatic const uint8_t A0 = PIN_A0;\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n#define BATTERY_SENSE_RESOLUTION 4096.0\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n#define ADC_MULTIPLIER (2.0F)\n\n// NFC\n#define PIN_NFC1 (9)\n#define PIN_NFC2 (10)\n\n// I2C (IMU BHI260AP, RTC, etc.)\n#define WIRE_INTERFACES_COUNT 1\n#define PIN_WIRE_SDA (0 + 26)\n#define PIN_WIRE_SCL (0 + 27)\n#define HAS_BHI260AP\n\n#define TP_SER_IO (0 + 11)\n\n// RTC interrupt\n#define PIN_RTC_INT (0 + 16)\n\n// QSPI flash\n#define PIN_QSPI_SCK (32 + 14)\n#define PIN_QSPI_CS (32 + 15)\n#define PIN_QSPI_IO0 (32 + 12)\n#define PIN_QSPI_IO1 (32 + 13)\n#define PIN_QSPI_IO2 (0 + 7)\n#define PIN_QSPI_IO3 (0 + 5)\n\n// On-board QSPI Flash\n#define EXTERNAL_FLASH_DEVICES MX25R1635F\n#define EXTERNAL_FLASH_USE_QSPI\n\n// LoRa SX1262\n#define USE_SX1262\n#define USE_SX1268\n#define SX126X_CS (0 + 24)\n#define SX126X_DIO1 (0 + 20)\n#define SX1262_DIO3 (0 + 21)\n#define SX126X_BUSY (0 + 17)\n#define SX126X_RESET (0 + 25)\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#define TCXO_OPTIONAL\n\n#define SPI_INTERFACES_COUNT 2\n\n#define PIN_SPI_MISO (0 + 23)\n#define PIN_SPI_MOSI (0 + 22)\n#define PIN_SPI_SCK (0 + 19)\n\n// E-paper (1.54\" per pinmap)\n// Alias PIN_EINK_EN to keep common eink power control code working\n#define PIN_EINK_BL (32 + 11) // backlight / panel power switch\n#define PIN_EINK_EN PIN_EINK_BL\n#define PIN_EINK_CS (0 + 30)\n#define PIN_EINK_BUSY (0 + 3)\n#define PIN_EINK_DC (0 + 28)\n#define PIN_EINK_RES (0 + 2)\n#define PIN_EINK_SCLK (0 + 31)\n#define PIN_EINK_MOSI (0 + 29) // also called SDI\n\n// Power control\n#define PIN_POWER_EN (0 + 12)\n\n#define PIN_SPI1_MISO (32 + 7) // Placeholder MISO; keep off QSPI pins to avoid contention\n#define PIN_SPI1_MOSI PIN_EINK_MOSI\n#define PIN_SPI1_SCK PIN_EINK_SCLK\n\n// GPS (TX/RX/Wake/Reset/PPS per pinmap)\n#define GPS_L76K\n#define PIN_GPS_REINIT (32 + 5)  // Reset\n#define PIN_GPS_STANDBY (32 + 2) // Wake\n#define PIN_GPS_PPS (32 + 4)\n#define GPS_TX_PIN (32 + 8)\n#define GPS_RX_PIN (32 + 9)\n#define GPS_THREAD_INTERVAL 50\n\n#define PIN_SERIAL1_RX GPS_RX_PIN\n#define PIN_SERIAL1_TX GPS_TX_PIN\n\n// Sensors / accessories\n#define PIN_BUZZER (0 + 6)\n#define PIN_DRV_EN (0 + 8)\n\n#define HAS_DRV2605 1\n\n#define SERIAL_PRINT_PORT 0\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "variants/nrf52840/tracker-t1000-e/platformio.ini",
    "content": "[env:tracker-t1000-e]\ncustom_meshtastic_support_level = 1\ncustom_meshtastic_images = tracker-t1000-e.svg\ncustom_meshtastic_tags = Seeed\n\nextends = nrf52840_base\nboard = tracker-t1000-e\nboard_level = pr\ncustom_meshtastic_hw_model = 71\ncustom_meshtastic_hw_model_slug = TRACKER_T1000_E\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_display_name = Seeed SenseCAP T1000-E\ncustom_meshtastic_actively_supported = true\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/tracker-t1000-e\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DTRACKER_T1000_E\n  -DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR_EXTERNAL=1\n  -DMESHTASTIC_EXCLUDE_CANNEDMESSAGES=1\n  -DMESHTASTIC_EXCLUDE_SCREEN=1\n  -DMESHTASTIC_EXCLUDE_DETECTIONSENSOR=1\n  -DMESHTASTIC_EXCLUDE_WIFI=1\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/tracker-t1000-e>\nlib_deps = \n  ${nrf52840_base.lib_deps}\n  # TODO renovate\n  https://github.com/meshtastic/QMA6100P_Arduino_Library/archive/14c900b8b2e4feaac5007a7e41e0c1b7f0841136.zip\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\nupload_protocol = nrfutil\n"
  },
  {
    "path": "variants/nrf52840/tracker-t1000-e/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n#include \"nrf.h\"\n\nstatic const uint32_t rfswitch_dio_pins[Module::RFSWITCH_MAX_PINS] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6,\n                                                                      RADIOLIB_LR11X0_DIO7, RADIOLIB_LR11X0_DIO8, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode             DIO5  DIO6  DIO7  DIO8\n    {LR11x0::MODE_STBY, {LOW, LOW, LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW, LOW, HIGH}},\n    {LR11x0::MODE_TX, {HIGH, HIGH, LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW, LOW, LOW}},  END_OF_MODE_TABLE,\n};"
  },
  {
    "path": "variants/nrf52840/tracker-t1000-e/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n\n    pinMode(PIN_3V3_ACC_EN, OUTPUT);\n    digitalWrite(PIN_3V3_ACC_EN, HIGH);\n\n    pinMode(T1000X_SENSOR_EN_PIN, OUTPUT);\n    digitalWrite(T1000X_SENSOR_EN_PIN, HIGH);\n\n    pinMode(BUZZER_EN_PIN, OUTPUT);\n    digitalWrite(BUZZER_EN_PIN, HIGH);\n\n    pinMode(PIN_GPS_EN, OUTPUT);\n    digitalWrite(PIN_GPS_EN, LOW);\n\n    pinMode(GPS_VRTC_EN, OUTPUT);\n    digitalWrite(GPS_VRTC_EN, HIGH);\n\n    pinMode(PIN_GPS_RESET, OUTPUT);\n    digitalWrite(PIN_GPS_RESET, LOW);\n\n    pinMode(GPS_SLEEP_INT, OUTPUT);\n    digitalWrite(GPS_SLEEP_INT, HIGH);\n\n    pinMode(GPS_RTC_INT, OUTPUT);\n    digitalWrite(GPS_RTC_INT, LOW);\n\n    pinMode(GPS_RESETB_OUT, INPUT);\n}"
  },
  {
    "path": "variants/nrf52840/tracker-t1000-e/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_TRACKER_T1000_E_\n#define _VARIANT_TRACKER_T1000_E_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n// Use the native nrf52 usb power detection\n#define NRF_APM\n\n#define PIN_3V3_EN (32 + 6)     // P1.6, Power to Sensors\n#define PIN_3V3_ACC_EN (32 + 7) // P1.7, Power to Acc\n\n#define PIN_LED1 (0 + 24) // P0.24\n#define LED_POWER PIN_LED1\n#define LED_BLUE -1    // Actually green\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN (0 + 6) // P0.06\n#define BUTTON_ACTIVE_LOW false\n#define BUTTON_ACTIVE_PULLUP false\n#define BUTTON_SENSE_TYPE 0x5 // enable input pull-down\n\n#define HAS_WIRE 1\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 26)      // P0.26\n#define PIN_WIRE_SCL (0 + 27)      // P0.27\n#define I2C_NO_RESCAN              // I2C is a bit finicky, don't scan too much\n#define HAS_QMA6100P               // very rare beast, only on this board.\n#define QMA_6100P_INT_PIN (32 + 2) // P1.02\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 14) // P0.14\n#define PIN_SERIAL1_TX (0 + 13) // P0.13\n\n#define PIN_SERIAL2_RX (0 + 17) // P0.17\n#define PIN_SERIAL2_TX (0 + 16) // P0.16\n\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (32 + 8) // P1.08\n#define PIN_SPI_MOSI (32 + 9) // P1.09\n#define PIN_SPI_SCK (0 + 11)  // P0.11\n#define PIN_SPI_NSS (0 + 12)  // P0.12\n\n#define LORA_RESET (32 + 10) // P1.10 // RST\n#define LORA_DIO1 (32 + 1)   // P1.01 // IRQ\n#define LORA_DIO2 (0 + 7)    // P0.07 // BUSY\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS PIN_SPI_NSS\n\n// supported modules list\n#define USE_LR1110\n\n#define LR1110_IRQ_PIN LORA_DIO1\n#define LR1110_NRESET_PIN LORA_RESET\n#define LR1110_BUSY_PIN LORA_DIO2\n#define LR1110_SPI_NSS_PIN LORA_CS\n#define LR1110_SPI_SCK_PIN LORA_SCK\n#define LR1110_SPI_MOSI_PIN LORA_MOSI\n#define LR1110_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.6\n#define LR11X0_DIO_AS_RF_SWITCH\n\n#define HAS_GPS 1\n#define GNSS_AIROHA\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n#define GPS_BAUDRATE 115200\n#define GPS_PROBETRIES 5\n\n#define PIN_GPS_EN (32 + 11) // P1.11\n#define GPS_EN_ACTIVE HIGH\n\n#define PIN_GPS_RESET (32 + 15) // P1.15\n#define GPS_RESET_MODE HIGH\n\n#define GPS_VRTC_EN (0 + 8)      // P0.8, always high\n#define GPS_SLEEP_INT (32 + 12)  // P1.12, always high\n#define GPS_RTC_INT (0 + 15)     // P0.15, normal is LOW, wake by HIGH\n#define GPS_RESETB_OUT (32 + 14) // P1.14, always input pull_up\n\n#define BATTERY_PIN 2 // P0.02/AIN0, BAT_ADC\n#define BATTERY_IMMUTABLE\n#define ADC_MULTIPLIER (2.0F)\n// P0.04 is sensor power enable, P0.05/AIN3 is CHARGER_DET, P1.03 is CHARGE_STA, P1.04 is CHARGE_DONE\n\n#define EXT_CHRG_DETECT (32 + 3) // P1.03\n#define EXT_CHRG_DETECT_VALUE LOW\n// #define EXT_IS_CHRGD (32 + 4)  // P1.04\n// #define EXT_IS_CHRGD_VALUE LOW\n#define EXT_PWR_DETECT (0 + 5) // P0.05\n\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n\n#define OCV_ARRAY 4190, 4042, 3957, 3885, 3820, 3776, 3746, 3725, 3696, 3644, 3100\n\n// Buzzer\n#define BUZZER_EN_PIN (32 + 5) // P1.05, always high\n#define PIN_BUZZER (0 + 25)    // P0.25, pwm output\n\n#define T1000X_SENSOR_EN\n#define T1000X_SENSOR_EN_PIN (0 + 4) // P0.4, Power to Sensor (GPIO, not ADC)\n#define T1000X_NTC_PIN (0 + 31)      // P0.31/AIN7\n#define T1000X_LUX_PIN (0 + 29)      // P0.29/AIN5\n\n#define HAS_SCREEN 0\n\n// Enable Traffic Management Module for testing on T1000-E\n// NRF52840 has 256KB RAM - 1024 entries uses ~10KB\n#ifndef HAS_TRAFFIC_MANAGEMENT\n#define HAS_TRAFFIC_MANAGEMENT 1\n#endif\n#ifndef TRAFFIC_MANAGEMENT_CACHE_SIZE\n#define TRAFFIC_MANAGEMENT_CACHE_SIZE 1024\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif // _VARIANT_TRACKER_T1000_E_\n"
  },
  {
    "path": "variants/nrf52840/wio-sdk-wm1110/platformio.ini",
    "content": "; The black Wio-WM1110 Dev Kit with sensors and the WM1110 module\n[env:wio-sdk-wm1110]\nextends = nrf52840_base\nboard = wio-sdk-wm1110\n\nextra_scripts =\n  ${nrf52840_base.extra_scripts}\n  extra_scripts/disable_adafruit_usb.py\n\n# Remove adafruit USB serial from the build (it is incompatible with using the ch340 serial chip on this board)\nbuild_unflags =\n  -Ofast\n  -Og\n  -ggdb3\n  -ggdb2\n  -g3\n  -g2\n  -g\n  -g1\n  -g0\n  -DUSBCON\n  -DUSE_TINYUSB\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/wio-sdk-wm1110\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DWIO_WM1110\n  -DCFG_TUD_CDC=0\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/wio-sdk-wm1110>\n\n;debug_tool = jlink\ndebug_tool = stlink\n; No need to reflash if the binary hasn't changed\n\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = nrfutil\n;upload_protocol = stlink"
  },
  {
    "path": "variants/nrf52840/wio-sdk-wm1110/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n#include \"nrf.h\"\n\n// set RF switch configuration for Wio WM1110\n// Wio WM1110 uses DIO5 and DIO6 for RF switching\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH}},  {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/wio-sdk-wm1110/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    pinMode(PIN_LED2, OUTPUT);\n    ledOff(PIN_LED2);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}"
  },
  {
    "path": "variants/nrf52840/wio-sdk-wm1110/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_WIO_SDK_WM1110_\n#define _VARIANT_WIO_SDK_WM1110_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef USE_TINYUSB\n#error TinyUSB must be disabled by platformio before using this variant\n#endif\n\n// We use the hardware serial port for the serial console\n#define Serial Serial1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_3V3_EN (0 + 7) // P0.7, Power to Sensors\n\n#define PIN_WIRE_SDA (0 + 27) // P0.27\n#define PIN_WIRE_SCL (0 + 26) // P0.26\n\n#define PIN_LED1 (0 + 13) // P0.13\n#define PIN_LED2 (0 + 14) // P0.14\n\n#define LED_GREEN PIN_LED1\n#define LED_BLUE PIN_LED2 // Actually red\n\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN (0 + 23) // P0.23\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 22) // P0.22\n#define PIN_SERIAL1_TX (0 + 24) // P0.24\n\n#define PIN_SERIAL2_RX (0 + 6) // P0.06\n#define PIN_SERIAL2_TX (0 + 8) // P0.08\n\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (32 + 15) // P1.15 47\n#define PIN_SPI_MOSI (32 + 14) // P1.14 46\n#define PIN_SPI_SCK (32 + 13)  // P1.13 45\n#define PIN_SPI_NSS (32 + 12)  // P1.12 44\n\n#define LORA_RESET (32 + 10) // P1.10 42 // RST\n#define LORA_DIO1 (32 + 8)   // P1.08 40 // IRQ\n#define LORA_DIO2 (32 + 11)  // P1.11 43 // BUSY\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS PIN_SPI_NSS\n\n// supported modules list\n#define USE_LR1110\n\n#define LR1110_IRQ_PIN LORA_DIO1\n#define LR1110_NRESET_PIN LORA_RESET\n#define LR1110_BUSY_PIN LORA_DIO2\n#define LR1110_SPI_NSS_PIN LORA_CS\n#define LR1110_SPI_SCK_PIN LORA_SCK\n#define LR1110_SPI_MOSI_PIN LORA_MOSI\n#define LR1110_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.6\n#define LR11X0_DIO_AS_RF_SWITCH\n\n#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37\n\n#define NRF_USE_SERIAL_DFU\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif // _VARIANT_WIO_SDK_WM1110_\n"
  },
  {
    "path": "variants/nrf52840/wio-t1000-s/platformio.ini",
    "content": "; The very slick RAK wireless RAK 4631 / 4630 board - Unified firmware for 5005/19003, with or without OLED RAK 1921\n[env:wio-t1000-s]\nextends = nrf52840_base\nboard = wio-t1000-s\nboard_level = extra\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/wio-t1000-s\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DWIO_WM1110\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/wio-t1000-s>\ndebug_tool = jlink\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\nupload_protocol = jlink"
  },
  {
    "path": "variants/nrf52840/wio-t1000-s/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n#include \"nrf.h\"\n\nstatic const uint32_t rfswitch_dio_pins[Module::RFSWITCH_MAX_PINS] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6,\n                                                                      RADIOLIB_LR11X0_DIO7, RADIOLIB_LR11X0_DIO8, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode             DIO5  DIO6  DIO7  DIO8\n    {LR11x0::MODE_STBY, {LOW, LOW, LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW, LOW, HIGH}},\n    {LR11x0::MODE_TX, {HIGH, HIGH, LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH, LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW, LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW, HIGH, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW, LOW, LOW}},  END_OF_MODE_TABLE,\n};"
  },
  {
    "path": "variants/nrf52840/wio-t1000-s/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n\n    pinMode(PIN_3V3_ACC_EN, OUTPUT);\n    digitalWrite(PIN_3V3_ACC_EN, LOW);\n\n    pinMode(T1000X_SENSOR_EN_PIN, OUTPUT);\n    digitalWrite(T1000X_SENSOR_EN_PIN, HIGH);\n\n    pinMode(BUZZER_EN_PIN, OUTPUT);\n    digitalWrite(BUZZER_EN_PIN, HIGH);\n\n    pinMode(PIN_GPS_EN, OUTPUT);\n    digitalWrite(PIN_GPS_EN, LOW);\n\n    pinMode(GPS_VRTC_EN, OUTPUT);\n    digitalWrite(GPS_VRTC_EN, HIGH);\n\n    pinMode(PIN_GPS_RESET, OUTPUT);\n    digitalWrite(PIN_GPS_RESET, LOW);\n\n    pinMode(GPS_SLEEP_INT, OUTPUT);\n    digitalWrite(GPS_SLEEP_INT, HIGH);\n\n    pinMode(GPS_RTC_INT, OUTPUT);\n    digitalWrite(GPS_RTC_INT, LOW);\n\n    pinMode(GPS_RESETB_OUT, INPUT);\n}"
  },
  {
    "path": "variants/nrf52840/wio-t1000-s/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_WIO_SDK_WM1110_\n#define _VARIANT_WIO_SDK_WM1110_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n#define BLE_DFU_SECURE // we use the 7.x softdevice signing keys\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define PIN_3V3_EN (32 + 6)     // P1.6, Power to Sensors\n#define PIN_3V3_ACC_EN (32 + 7) // P1.7, Power to Acc\n\n#define PIN_LED1 (0 + 24) // P0.24\n#define LED_POWER PIN_LED1\n#define LED_BLUE -1    // Actually green\n#define LED_STATE_ON 1 // State when LED is lit\n\n#define BUTTON_PIN (0 + 6) // P0.6\n#define BUTTON_ACTIVE_LOW false\n#define BUTTON_ACTIVE_PULLUP false\n#define BUTTON_SENSE_TYPE INPUT_SENSE_HIGH\n\n#define HAS_WIRE 0\n\n#define WIRE_INTERFACES_COUNT 1\n\n#define PIN_WIRE_SDA (0 + 26) // P0.26\n#define PIN_WIRE_SCL (0 + 27) // P0.27\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 14) // P0.14\n#define PIN_SERIAL1_TX (0 + 13) // P0.13\n\n#define PIN_SERIAL2_RX (0 + 17) // P0.17\n#define PIN_SERIAL2_TX (0 + 16) // P0.16\n\n#define USER_DEBUG_PORT Serial2\n\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (32 + 8) // P1.08\n#define PIN_SPI_MOSI (32 + 9) // P1.09\n#define PIN_SPI_SCK (0 + 11)  // P0.11\n#define PIN_SPI_NSS (0 + 12)  // P0.12\n\n#define LORA_RESET (32 + 10) // P1.10 // RST\n#define LORA_DIO1 (32 + 1)   // P1.01 // IRQ\n#define LORA_DIO2 (0 + 7)    // P0.07 // BUSY\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS PIN_SPI_NSS\n\n// supported modules list\n#define USE_LR1110\n\n#define LR1110_IRQ_PIN LORA_DIO1\n#define LR1110_NRESET_PIN LORA_RESET\n#define LR1110_BUSY_PIN LORA_DIO2\n#define LR1110_SPI_NSS_PIN LORA_CS\n#define LR1110_SPI_SCK_PIN LORA_SCK\n#define LR1110_SPI_MOSI_PIN LORA_MOSI\n#define LR1110_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.6\n#define LR11X0_DIO_AS_RF_SWITCH\n\n#define HAS_GPS 1\n#define GNSS_AIROHA\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n#define GPS_BAUDRATE 115200\n\n#define PIN_GPS_EN (32 + 11) // P1.11\n#define GPS_EN_ACTIVE HIGH\n\n#define PIN_GPS_RESET (32 + 15) // P1.15\n#define GPS_RESET_MODE HIGH\n\n#define GPS_VRTC_EN (0 + 8)      // P0.8, awlays high\n#define GPS_SLEEP_INT (32 + 12)  // P1.12, awlays high\n#define GPS_RTC_INT (0 + 15)     // P0.15, normal is LOW, wake by HIGH\n#define GPS_RESETB_OUT (32 + 14) // P1.14, awlays input pull_up\n\n// #define GPS_THREAD_INTERVAL 50\n\n#define BATTERY_PIN 2\n// #define ADC_CHANNEL ADC1_GPIO2_CHANNEL\n#define ADC_MULTIPLIER (2.0F)\n\n#define ADC_RESOLUTION 14\n#define BATTERY_SENSE_RESOLUTION_BITS 12\n// #define BATTERY_SENSE_RESOLUTION 4096.0\n\n#undef AREF_VOLTAGE\n#define AREF_VOLTAGE 3.0\n#define VBAT_AR_INTERNAL AR_INTERNAL_3_0\n\n// #define ADC_CTRL (32 + 6)\n// #define ADC_CTRL_ENABLED HIGH\n\n// Buzzer\n#define BUZZER_EN_PIN (32 + 5) // P1.05, awlays high\n#define PIN_BUZZER (0 + 25)    // P0.25, pwm output\n\n#define T1000X_SENSOR_EN\n#define T1000X_SENSOR_EN_PIN (0 + 4) // P0.4, Power to Sensor (GPIO, not ADC)\n#define T1000X_NTC_PIN (0 + 31)      // P0.31\n#define T1000X_LUX_PIN (0 + 29)      // P0.29\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif // _VARIANT_WIO_SDK_WM1110_\n"
  },
  {
    "path": "variants/nrf52840/wio-tracker-wm1110/platformio.ini",
    "content": "; The red tracker Dev Board with the WM1110 module\n[env:wio-tracker-wm1110]\ncustom_meshtastic_hw_model = 21\ncustom_meshtastic_hw_model_slug = WIO_WM1110\ncustom_meshtastic_architecture = nrf52840\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Seeed Wio WM1110 Tracker\ncustom_meshtastic_images = wio-tracker-wm1110.svg\ncustom_meshtastic_tags = Seeed\ncustom_meshtastic_requires_dfu = true\n\nextends = nrf52840_base\nboard = wio-tracker-wm1110\nbuild_flags = ${nrf52840_base.build_flags}\n  -Ivariants/nrf52840/wio-tracker-wm1110\n  -Isrc/platform/nrf52/softdevice\n  -Isrc/platform/nrf52/softdevice/nrf52\n  -DWIO_WM1110\nboard_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld\nbuild_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/wio-tracker-wm1110>\n; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)\n;upload_protocol = jlink\n"
  },
  {
    "path": "variants/nrf52840/wio-tracker-wm1110/rfswitch.h",
    "content": "#include \"RadioLib.h\"\n#include \"nrf.h\"\n\n// set RF switch configuration for Wio WM1110\n// Wio WM1110 uses DIO5 and DIO6 for RF switching\n\nstatic const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[] = {\n    // mode                  DIO5  DIO6\n    {LR11x0::MODE_STBY, {LOW, LOW}},  {LR11x0::MODE_RX, {HIGH, LOW}},\n    {LR11x0::MODE_TX, {HIGH, HIGH}},  {LR11x0::MODE_TX_HP, {LOW, HIGH}},\n    {LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},\n    {LR11x0::MODE_WIFI, {LOW, LOW}},  END_OF_MODE_TABLE,\n};\n"
  },
  {
    "path": "variants/nrf52840/wio-tracker-wm1110/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"nrf.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\nconst uint32_t g_ADigitalPinMap[] = {\n    // P0\n    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n\n    // P1\n    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};\n\nvoid initVariant()\n{\n    // LED1 & LED2\n    pinMode(PIN_LED1, OUTPUT);\n    ledOff(PIN_LED1);\n\n    // 3V3 Power Rail\n    pinMode(PIN_3V3_EN, OUTPUT);\n    digitalWrite(PIN_3V3_EN, HIGH);\n}"
  },
  {
    "path": "variants/nrf52840/wio-tracker-wm1110/variant.h",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#ifndef _VARIANT_WIO_TRACKER_WM1110_\n#define _VARIANT_WIO_TRACKER_WM1110_\n\n/** Master clock frequency */\n#define VARIANT_MCK (64000000ul)\n\n#define USE_LFXO // Board uses 32khz crystal for LF\n// define USE_LFRC    // Board uses RC for LF\n\n/*----------------------------------------------------------------------------\n *        Headers\n *----------------------------------------------------------------------------*/\n\n#include \"WVariant.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n\n// Number of pins defined in PinDescription array\n#define PINS_COUNT (48)\n#define NUM_DIGITAL_PINS (48)\n#define NUM_ANALOG_INPUTS (6)\n#define NUM_ANALOG_OUTPUTS (0)\n\n#define WIRE_INTERFACES_COUNT 1\n\n// We rely on the nrf52840 USB controller to tell us if we are hooked to a power supply\n#define NRF_APM\n\n#define PIN_3V3_EN (32 + 1) // P1.01, Power to Sensors\n\n#define PIN_WIRE_SDA (0 + 5) // P0.05\n#define PIN_WIRE_SCL (0 + 4) // P0.04\n\n#define PIN_LED1 (0 + 6) // P0.06\n#define LED_GREEN PIN_LED1\n\n#define LED_STATE_ON 0\n\n#define BUTTON_PIN (32 + 2) // P1.02\n\n/*\n * Serial interfaces\n */\n#define PIN_SERIAL1_RX (0 + 24) // P0.24\n#define PIN_SERIAL1_TX (0 + 25) // P0.25\n\n#define PIN_SERIAL2_RX (0 + 6) // P0.06\n#define PIN_SERIAL2_TX (0 + 8) // P0.08\n\n#define SPI_INTERFACES_COUNT 1\n\n#define PIN_SPI_MISO (32 + 15) // P1.15 47\n#define PIN_SPI_MOSI (32 + 14) // P1.14 46\n#define PIN_SPI_SCK (32 + 13)  // P1.13 45\n#define PIN_SPI_NSS (32 + 12)  // P1.12 44\n\n#define LORA_RESET (32 + 10) // P1.10 10 // RST\n#define LORA_DIO1 (0 + 2)    // P0.02 2 // IRQ\n#define LORA_DIO2 (32 + 11)  // P1.11 43 // BUSY\n#define LORA_SCK PIN_SPI_SCK\n#define LORA_MISO PIN_SPI_MISO\n#define LORA_MOSI PIN_SPI_MOSI\n#define LORA_CS PIN_SPI_NSS\n\n// supported modules list\n#define USE_LR1110\n\n#define LR1110_IRQ_PIN LORA_DIO1\n#define LR1110_NRESET_PIN LORA_RESET\n#define LR1110_BUSY_PIN LORA_DIO2\n#define LR1110_SPI_NSS_PIN LORA_CS\n#define LR1110_SPI_SCK_PIN LORA_SCK\n#define LR1110_SPI_MOSI_PIN LORA_MOSI\n#define LR1110_SPI_MISO_PIN LORA_MISO\n\n#define LR11X0_DIO3_TCXO_VOLTAGE 1.6\n#define LR11X0_DIO_AS_RF_SWITCH\n\n#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37\n\n#define GPS_RX_PIN PIN_SERIAL1_RX\n#define GPS_TX_PIN PIN_SERIAL1_TX\n\n#define HAS_GPS 1\n\n#ifdef __cplusplus\n}\n#endif\n\n/*----------------------------------------------------------------------------\n *        Arduino objects - C++ only\n *----------------------------------------------------------------------------*/\n\n#endif // _VARIANT_WIO_TRACKER_WM1110_"
  },
  {
    "path": "variants/rp2040/challenger_2040_lora/pins_arduino.h",
    "content": "#pragma once\n\n#define PINS_COUNT (25u)\n#define NUM_DIGITAL_PINS (25u)\n#define NUM_ANALOG_INPUTS (4u)\n#define NUM_ANALOG_OUTPUTS (0u)\n#define ADC_RESOLUTION (12u)\n\n// LEDs\n#define LED_POWER (24u)\n\n// Serial\n#define PIN_SERIAL1_TX (16u)\n#define PIN_SERIAL1_RX (17u)\n\n// SPI\n#define PIN_SPI0_MISO (20u)\n#define PIN_SPI0_MOSI (23u)\n#define PIN_SPI0_SCK (22u)\n#define PIN_SPI0_SS (21u)\n\n// Connected to LoRa module\n#define PIN_SPI1_MISO (12u)\n#define PIN_SPI1_MOSI (11u)\n#define PIN_SPI1_SCK (10u)\n#define PIN_SPI1_SS (9u)\n#define RFM95W_SS (9u)\n#define RFM95W_DIO0 (14u)\n#define RFM95W_DIO1 (15u)\n#define RFM95W_DIO2 (18u)\n#define RFM95W_RST (13u)\n#define RFM95W_SPI SPI1\n\n// Wire\n#define PIN_WIRE0_SDA (0u)\n#define PIN_WIRE0_SCL (1u)\n\n// Not pinned out\n#define PIN_WIRE1_SDA (31u)\n#define PIN_WIRE1_SCL (31u)\n#define PIN_SERIAL2_RX (31u)\n#define PIN_SERIAL2_TX (31u)\n\n#define SERIAL_HOWMANY (1u)\n#define SPI_HOWMANY (2u)\n#define WIRE_HOWMANY (1u)\n\nstatic const uint8_t D0 = (16u);\nstatic const uint8_t D1 = (17u);\nstatic const uint8_t D2 = (20u);\nstatic const uint8_t D3 = (23u);\nstatic const uint8_t D4 = (22u);\nstatic const uint8_t D5 = (2u);\nstatic const uint8_t D6 = (3u);\nstatic const uint8_t D7 = (0u);\nstatic const uint8_t D8 = (1u);\nstatic const uint8_t D9 = (4u);\nstatic const uint8_t D10 = (5u);\nstatic const uint8_t D11 = (6u);\nstatic const uint8_t D12 = (7u);\nstatic const uint8_t D13 = (8u);\nstatic const uint8_t D14 = (13u);\nstatic const uint8_t D15 = (14u);\nstatic const uint8_t D16 = (15u);\nstatic const uint8_t D17 = (18u);\nstatic const uint8_t D18 = (24u);\n\nstatic const uint8_t A0 = (26u);\nstatic const uint8_t A1 = (27u);\nstatic const uint8_t A2 = (28u);\nstatic const uint8_t A3 = (29u);\nstatic const uint8_t A4 = (19u);\nstatic const uint8_t A5 = (21u);\n\n#ifndef SS\n#define SS PIN_SPI1_SS\n#endif"
  },
  {
    "path": "variants/rp2040/challenger_2040_lora/platformio.ini",
    "content": "[env:challenger_2040_lora]\nextends = rp2040_base\nboard = challenger_2040_lora\nboard_level = extra\nupload_protocol = picotool\n# add our variants files to the include and src paths\nbuild_flags = \n  ${rp2040_base.build_flags} \n  -D PRIVATE_HW\n  -I variants/rp2040/challenger_2040_lora\n  -D DEBUG_RP2040_PORT=Serial\n  -D HW_SPI1_DEVICE\ndebug_build_flags = ${rp2040_base.build_flags}\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2040/challenger_2040_lora/variant.h",
    "content": "// Define SS for compatibility with libraries expecting a default SPI chip select pin\n\n#define ARDUINO_ARCH_AVR\n\n#define EXT_NOTIFY_OUT 0xFFFFFFFF\n#define BUTTON_PIN 0xFFFFFFFF\n\n#define USE_RF95 // RFM95/SX127x\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n// https://gitlab.com/invectorlabs/hw/challenger_rp2040_lora\n#define LORA_SCK 10  // Clock\n#define LORA_CS 9    // Chip Select\n#define LORA_MOSI 11 // Serial Data Out\n#define LORA_MISO 12 // Serial Data In\n\n#define LORA_RESET 13 // Reset\n\n#define LORA_DIO0 14         // DIO0\n#define LORA_DIO1 15         // DIO1\n#define LORA_DIO2 18         // DIO2\n#define LORA_DIO3 0xFFFFFFFF // Not connected\n#define LORA_DIO4 0xFFFFFFFF // Not connected\n#define LORA_DIO5 0xFFFFFFFF // Not connected\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n// #define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif"
  },
  {
    "path": "variants/rp2040/ec_catsniffer/platformio.ini",
    "content": "[env:catsniffer]\nextends = rp2040_base\nboard = rpipico\nboard_level = extra\nupload_protocol = picotool\nbuild_flags = \n  ${rp2040_base.build_flags}\n  -D RPI_PICO\n  -I variants/rp2040/ec_catsniffer\n  -D DEBUG_RP2040_PORT=Serial\n  ; -D HW_SPI1_DEVICE\ndebug_build_flags = ${rp2040_base.build_flags}, -g\ndebug_tool = cmsis-dap\n"
  },
  {
    "path": "variants/rp2040/ec_catsniffer/variant.cpp",
    "content": "/*\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\n  Copyright (c) 2018, Adafruit Industries (adafruit.com)\n\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation; either\n  version 2.1 of the License, or (at your option) any later version.\n\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n  See the GNU Lesser General Public License for more details.\n\n  You should have received a copy of the GNU Lesser General Public\n  License along with this library; if not, write to the Free Software\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n*/\n\n#include \"variant.h\"\n#include \"wiring_constants.h\"\n#include \"wiring_digital.h\"\n\n#define CTF1 8\n#define CTF2 9\n#define CTF3 10\n\nvoid initVariant()\n{\n    // Config the LoRa Switch\n    pinMode(CTF1, OUTPUT);\n    pinMode(CTF2, OUTPUT);\n    pinMode(CTF3, OUTPUT);\n\n    digitalWrite(CTF1, HIGH);\n    digitalWrite(CTF2, LOW);\n    digitalWrite(CTF3, LOW);\n}"
  },
  {
    "path": "variants/rp2040/ec_catsniffer/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n#define HAS_SCREEN 0\n#define HAS_GPS 0\n#undef GPS_RX_PIN\n#undef GPS_TX_PIN\n\n#define LED_POWER 27\n\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 18\n#define LORA_MISO 16\n#define LORA_MOSI 19\n#define LORA_CS 17 // NSS\n\n#define LORA_DIO0 5\n#define LORA_RESET 24\n#define LORA_DIO1 4\n#define LORA_DIO2 23\n#define LORA_DIO3 25\n#define SX126X_RXEN 21\n#define SX126X_TXEN 20\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO0\n#define SX126X_BUSY LORA_DIO1\n#define SX126X_RESET LORA_RESET\n// #define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 0\n#endif\n"
  },
  {
    "path": "variants/rp2040/feather_rp2040_rfm95/platformio.ini",
    "content": "[env:feather_rp2040_rfm95]\nextends = rp2040_base\nboard = adafruit_feather\nboard_level = extra\nupload_protocol = picotool\n# add our variants files to the include and src paths\nbuild_flags = \n  ${rp2040_base.build_flags} \n  -D RP2040_FEATHER_RFM95\n  -I variants/rp2040/feather_rp2040_rfm95\n  -D DEBUG_RP2040_PORT=Serial\n  -D HW_SPI1_DEVICE\ndebug_build_flags = ${rp2040_base.build_flags}\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2040/feather_rp2040_rfm95/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n// #define USE_SSD1306\n\n// #define USE_SH1106 1\n\n// default I2C pins:\n// SDA = 4\n// SCL = 5\n\n// Recommended pins for SerialModule:\n// txd = 8\n// rxd = 9\n\n#define EXT_NOTIFY_OUT 22\n#define BUTTON_PIN 7\n// #define BUTTON_NEED_PULLUP\n\n#define LED_POWER PIN_LED\n\n// #define BATTERY_PIN 26\n//  ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n// #define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n\n#define USE_RF95 // RFM95/SX127x\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n// https://www.adafruit.com/product/5714\n// https://learn.adafruit.com/feather-rp2040-rfm95\n// https://learn.adafruit.com/assets/120283\n// https://learn.adafruit.com/assets/120813\n#define LORA_SCK 14  // 10 12P\n#define LORA_MISO 8  // 12 10P\n#define LORA_MOSI 15 // 11 11P\n#define LORA_CS 16   // 3 13P\n\n#define LORA_RESET 17 // 15 14P\n\n#define LORA_DIO0 21 // ?? 6P\n#define LORA_DIO1 22 // 20 7P\n#define LORA_DIO2 23 // 2 8P\n#define LORA_DIO3 19 // ?? 3P\n#define LORA_DIO4 20 // ?? 4P\n#define LORA_DIO5 18 // ?? 15P\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n// #define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif"
  },
  {
    "path": "variants/rp2040/nibble_rp2040/platformio.ini",
    "content": "[env:nibble-rp2040]\nextends = rp2040_base\nboard = rpipico\nboard_level = extra\nupload_protocol = picotool\n# add our variants files to the include and src paths\nbuild_flags =\n  ${rp2040_base.build_flags}\n  -D PRIVATE_HW\n  -I variants/rp2040/nibble_rp2040\n  -D DEBUG_RP2040_PORT=Serial\n  -D HW_SPI1_DEVICE\ndebug_build_flags = ${rp2040_base.build_flags}, -g\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2040/nibble_rp2040/variant.h",
    "content": "#define ARDUINO_ARCH_AVR\n\n#define BUTTON_PIN -1 // Pin 17 used for antenna switching via DIO4\n\n#define LED_POWER 1\n\n#define HAS_CPU_SHUTDOWN 1\n\n#define USE_RF95\n#define LORA_SCK 10\n#define LORA_MISO 12\n#define LORA_MOSI 11\n#define LORA_CS 13\n\n#define LORA_DIO0 14\n#define LORA_RESET 15\n#define LORA_DIO1 RADIOLIB_NC\n#define LORA_DIO2 RADIOLIB_NC\n"
  },
  {
    "path": "variants/rp2040/rak11310/pins_arduino.h",
    "content": "#pragma once\n\n// Pin definitions taken from:\n//    https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf\n\nstatic const uint8_t WB_IO1 = 6;  // SLOT_A SLOT_B\nstatic const uint8_t WB_IO2 = 22; // SLOT_A SLOT_B\nstatic const uint8_t WB_IO3 = 7;  // SLOT_C\nstatic const uint8_t WB_IO4 = 28; // SLOT_C\nstatic const uint8_t WB_IO5 = 9;  // SLOT_D\nstatic const uint8_t WB_IO6 = 8;  // SLOT_D\nstatic const uint8_t WB_A0 = 26;  // IO_SLOT\nstatic const uint8_t WB_A1 = 27;  // IO_SLOT\n\n#define PIN_A0 (26u)\n#define PIN_A1 (27u)\n#define PIN_A2 (28u)\n#define PIN_A3 (29u)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\n\n// LEDs\n#define PIN_LED1 (23u)\n#define LED_NOTIFICATION (24u)\n\n#define ADC_RESOLUTION 12\n\n// Serial\n#define PIN_SERIAL1_TX (0ul)\n#define PIN_SERIAL1_RX (1ul)\n\n#define PIN_SERIAL2_TX (4ul)\n#define PIN_SERIAL2_RX (5ul)\n\n// SPI\n#define PIN_SPI1_MISO (12u)\n#define PIN_SPI1_MOSI (11u)\n#define PIN_SPI1_SCK (10u)\n#define PIN_SPI1_SS (13u)\n\n#define PIN_SPI0_MISO (16u)\n#define PIN_SPI0_MOSI (19u)\n#define PIN_SPI0_SCK (18u)\n#define PIN_SPI0_SS (17u)\n\n// Wire\n#define PIN_WIRE0_SDA (2u)\n#define PIN_WIRE0_SCL (3u)\n\n#define PIN_WIRE1_SDA (20u)\n#define PIN_WIRE1_SCL (21u)\n\n#define SERIAL_HOWMANY (3u)\n#define SPI_HOWMANY (2u)\n#define WIRE_HOWMANY (2u)\n\nstatic const uint8_t SS = PIN_SPI0_SS;\nstatic const uint8_t MOSI = PIN_SPI0_MOSI;\nstatic const uint8_t MISO = PIN_SPI0_MISO;\nstatic const uint8_t SCK = PIN_SPI0_SCK;\n\nstatic const uint8_t SDA = PIN_WIRE0_SDA;\nstatic const uint8_t SCL = PIN_WIRE0_SCL;\n"
  },
  {
    "path": "variants/rp2040/rak11310/platformio.ini",
    "content": "[env:rak11310]\ncustom_meshtastic_hw_model = 26\ncustom_meshtastic_hw_model_slug = RAK11310\ncustom_meshtastic_architecture = rp2040\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 2\ncustom_meshtastic_display_name = RAK WisBlock 11310\ncustom_meshtastic_images = rak11310.svg\ncustom_meshtastic_tags = RAK\ncustom_meshtastic_requires_dfu = true\n\nextends = rp2040_base\nboard = rakwireless_rak11300\nboard_level = pr\nupload_protocol = picotool\n# add our variants files to the include and src paths\nbuild_flags = \n  ${rp2040_base.build_flags} \n  -D RAK11310\n  -I variants/rp2040/rak11310\n  -D DEBUG_RP2040_PORT=Serial\n  -D RV3028_RTC=0x52\nbuild_src_filter = ${rp2040_base.build_src_filter} +<../variants/rp2040/rak11310> +<mesh/eth/> +<mesh/api/> +<mqtt/>\nlib_deps =\n  ${rp2040_base.lib_deps}\n  ${networking_base.lib_deps}\n  ${networking_extra.lib_deps}\n  # renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028\n  melopero/Melopero RV3028@1.2.0\n  # renovate: datasource=github-tags depName=RAK13800-W5100S packageName=RAKWireless/RAK13800-W5100S\n  https://github.com/RAKWireless/RAK13800-W5100S/archive/1.0.2.zip\ndebug_build_flags = ${rp2040_base.build_flags}, -g\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2040/rak11310/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n// Define I2C pins to ensure correct usage of both ports\n#define I2C_SDA 20\n#define I2C_SCL 21\n#define I2C_SDA1 2\n#define I2C_SCL1 3\n\n#define LED_POWER PIN_LED1\n#define ledOff(pin) pinMode(pin, INPUT)\n\n#define BUTTON_PIN 9\n#define BUTTON_NEED_PULLUP\n// #define EXT_NOTIFY_OUT 4\n\n#define BATTERY_PIN 26\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n// ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n#define ADC_MULTIPLIER 1.84\n\n#define DETECTION_SENSOR_EN 28\n\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n// RAK BSP somehow uses SPI1 instead of SPI0\n#define HW_SPI1_DEVICE\n#define LORA_SCK (10u)\n#define LORA_MOSI (11u)\n#define LORA_MISO (12u)\n#define LORA_CS (13u)\n\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 14\n#define LORA_DIO1 29\n#define LORA_DIO2 15\n#define LORA_DIO3 RADIOLIB_NC\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_POWER_EN 25\n// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n\n#define HAS_ETHERNET 1\n#define PIN_ETHERNET_RESET 7 // IO3\n#define PIN_ETHERNET_SS 17\n#define ETH_SPI_PORT SPI\n\n#define PIN_ETH_POWER_EN 22\n"
  },
  {
    "path": "variants/rp2040/rp2040-lora/platformio.ini",
    "content": "[env:rp2040-lora]\ncustom_meshtastic_hw_model = 30\ncustom_meshtastic_hw_model_slug = RP2040_LORA\ncustom_meshtastic_architecture = rp2040\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 2\ncustom_meshtastic_display_name = RP2040 LoRa\ncustom_meshtastic_tags = Waveshare\ncustom_meshtastic_requires_dfu = true\n\nextends = rp2040_base\nboard = rpipico\nupload_protocol = picotool\n# add our variants files to the include and src paths\nbuild_flags =\n  ${rp2040_base.build_flags}\n  -D RP2040_LORA\n  -I variants/rp2040/rp2040-lora\n  -D DEBUG_RP2040_PORT=Serial\n  -D HW_SPI1_DEVICE\ndebug_build_flags = ${rp2040_base.build_flags}, -g\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2040/rp2040-lora/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n// #define USE_SH1106 1\n\n// default I2C pins:\n// SDA = 4\n// SCL = 5\n\n// Recommended pins for SerialModule:\n// txd = 8\n// rxd = 9\n\n#define EXT_NOTIFY_OUT 22\n#define BUTTON_PIN -1 // Pin 17 used for antenna switching via DIO4\n\n#define LED_POWER PIN_LED\n\n// #define BATTERY_PIN 26\n//  ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n// #define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n\n#define HAS_CPU_SHUTDOWN 1\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n// https://www.waveshare.com/rp2040-lora.htm\n// https://www.waveshare.com/img/devkit/RP2040-LoRa-HF/RP2040-LoRa-HF-details-11.jpg\n#define LORA_SCK 14  // GPIO14\n#define LORA_MISO 24 // GPIO24\n#define LORA_MOSI 15 // GPIO15\n#define LORA_CS 13   // GPIO13\n\n#define LORA_DIO0 RADIOLIB_NC // No GPIO connection\n#define LORA_RESET 23         // GPIO23\n#define LORA_BUSY 18          // GPIO18\n#define LORA_DIO1 16          // GPIO16\n#define LORA_DIO2 RADIOLIB_NC // Antenna switching, no GPIO connection\n#define LORA_DIO3 RADIOLIB_NC // No GPIO connection\n#define LORA_DIO4 17          // GPIO17\n\n// On rp2040-lora board the antenna switch is wired and works with complementary-pin control logic.\n// See PE4259 datasheet page 4\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_BUSY\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH // Antenna switch CTRL\n#define SX126X_RXEN LORA_DIO4    // Antenna switch !CTRL via GPIO17\n// #define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n"
  },
  {
    "path": "variants/rp2040/rp2040.ini",
    "content": "; Common settings for rp2040 Processor based targets\n[rp2040_base]\nplatform =\n  # TODO renovate\n  https://github.com/maxgerhardt/platform-raspberrypi#cc24cfef37ed22ca9f2a6aead28c2deb76c39f24\n  ; For arduino-pico >= 5.4.4\nextends = arduino_base\nplatform_packages =\n  # TODO renovate\n  arduino-pico@https://github.com/earlephilhower/arduino-pico/releases/download/5.4.4/rp2040-5.4.4.zip\n\nboard_build.core = earlephilhower\nboard_build.filesystem_size = 0.5m\nbuild_flags = \n  ${arduino_base.build_flags} -Wno-unused-variable -Wcast-align\n  -Isrc/platform/rp2xx0\n  -Isrc/platform/rp2xx0/hardware_rosc/include\n  -Isrc/platform/rp2xx0/pico_sleep/include\n  -D__PLAT_RP2040__\n  -D__FREERTOS=1\n#  -D _POSIX_THREADS\nbuild_src_filter = \n  ${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<modules/esp32> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> -<mesh/wifi/> -<mesh/http/> -<mesh/raspihttp>\n\nlib_ignore =\n  BluetoothOTA\n  lvgl\n\nlib_deps =\n  ${arduino_base.lib_deps}\n  ${environmental_base.lib_deps}\n  ${environmental_extra.lib_deps}\n  ${radiolib_base.lib_deps}\n  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto\n  rweather/Crypto@0.4.0\n"
  },
  {
    "path": "variants/rp2040/rpipico/platformio.ini",
    "content": "[env:pico]\ncustom_meshtastic_hw_model = 47\ncustom_meshtastic_hw_model_slug = RPI_PICO\ncustom_meshtastic_architecture = rp2040\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Raspberry Pi Pico\ncustom_meshtastic_images = pico.svg\ncustom_meshtastic_tags = RPi, DIY\ncustom_meshtastic_requires_dfu = true\n\nextends = rp2040_base\nboard = rpipico\nboard_level = pr\nupload_protocol = picotool\n# add our variants files to the include and src paths\nbuild_flags =\n  ${rp2040_base.build_flags}\n  -D RPI_PICO\n  -I variants/rp2040/rpipico\n  -D DEBUG_RP2040_PORT=Serial\n  -D HW_SPI1_DEVICE\ndebug_build_flags = ${rp2040_base.build_flags}, -g\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2040/rpipico/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n// default I2C pins:\n// SDA = 4\n// SCL = 5\n\n// Recommended pins for SerialModule:\n// txd = 8\n// rxd = 9\n\n#define EXT_NOTIFY_OUT 22\n#define BUTTON_PIN 17\n\n#define LED_POWER PIN_LED\n\n#define BATTERY_PIN 26\n// ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 10\n#define LORA_MISO 12\n#define LORA_MOSI 11\n#define LORA_CS 3\n\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 15\n#define LORA_DIO1 20\n#define LORA_DIO2 2\n#define LORA_DIO3 RADIOLIB_NC\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n"
  },
  {
    "path": "variants/rp2040/rpipico-slowclock/platformio.ini",
    "content": "[env:pico_slowclock]\nextends = rp2040_base\nboard = rpipico\nboard_level = extra\nupload_protocol = jlink\n# debug settings for external openocd with RP2040 support (custom build)\ndebug_tool = custom\ndebug_init_cmds =\n  target extended-remote localhost:3333\n  $INIT_BREAK\n  monitor reset halt\n  $LOAD_CMDS\n  monitor init\n  monitor reset halt\n# add our variants files to the include and src paths\nbuild_flags = \n  ${rp2040_base.build_flags} \n  -DRPI_PICO\n  -Ivariants/rp2040/rpipico-slowclock\n  -DDEBUG_RP2040_PORT=Serial2\n  -DHW_SPI1_DEVICE\n  -g\n  -DNO_USB\ndebug_build_flags = ${rp2040_base.build_flags}\n  -g\n  -DNO_USB\n"
  },
  {
    "path": "variants/rp2040/rpipico-slowclock/variant.h",
    "content": "#define ARDUINO_ARCH_AVR\n\n// Build with slow system clock enabled to reduce power consumption.\n#define RP2040_SLOW_CLOCK\n\n#ifdef RP2040_SLOW_CLOCK\n// Redefine UART1 serial log output to avoid collision with UART0 for GPS.\n#define SERIAL2_TX 4\n#define SERIAL2_RX 5\n// Reroute log output in SensorLib when USB is not available\n#define log_e(...) Serial2.printf(__VA_ARGS__)\n#define log_i(...) Serial2.printf(__VA_ARGS__)\n#define log_d(...) Serial2.printf(__VA_ARGS__)\n#endif\n\n// Expecting the Waveshare Pico GPS hat\n#define HAS_GPS 1\n\n// Enable OLED Screen\n#define HAS_SCREEN 1\n#define USE_SH1106 1\n#define RESET_OLED 13\n\n// Redefine I2C0 pins to avoid collision with UART1/Serial2.\n#define I2C_SDA 8\n#define I2C_SCL 9\n\n// Redefine Waveshare UPS-A/B I2C_1 pins:\n#define I2C_SDA1 6\n#define I2C_SCL1 7\n// Waveshare UPS-A/B uses a 0.01 Ohm shunt for the INA219 sensor\n#define INA219_MULTIPLIER 10.0f\n\n// Waveshare Pico GPS L76B pins:\n#define GPS_RX_PIN 1\n#define GPS_TX_PIN 0\n\n// Wakeup from backup mode\n// #define PIN_GPS_FORCE_ON 14\n// No GPS reset available\n#undef PIN_GPS_RESET\n/*\n * For PPS output the resistor R20 needs to be populated with 0 Ohm\n * on the Waveshare Pico GPS board.\n */\n#define PIN_GPS_PPS 16\n/*\n * For standby mode switching the resistor R18 needs to be populated\n * with 0 Ohm on the Waveshare Pico GPS board.\n */\n#define PIN_GPS_STANDBY 17\n\n#define BUTTON_PIN 18\n#define EXT_NOTIFY_OUT 22\n#define LED_POWER PIN_LED\n\n#define BATTERY_PIN 26\n// ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 10\n#define LORA_MISO 12\n#define LORA_MOSI 11\n#define LORA_CS 3\n\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 15\n#define LORA_DIO1 20\n#define LORA_DIO2 2\n#define LORA_DIO3 RADIOLIB_NC\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif"
  },
  {
    "path": "variants/rp2040/rpipicow/platformio.ini",
    "content": "[env:picow]\ncustom_meshtastic_hw_model = 47\ncustom_meshtastic_hw_model_slug = RPI_PICO\ncustom_meshtastic_architecture = rp2040\ncustom_meshtastic_actively_supported = true\ncustom_meshtastic_support_level = 3\ncustom_meshtastic_display_name = Raspberry Pi Pico W\ncustom_meshtastic_images = rpipicow.svg\ncustom_meshtastic_tags = RPi, DIY\ncustom_meshtastic_requires_dfu = true\n\nextends = rp2040_base\nboard = rpipicow\nboard_level = pr\nboard_check = true\nupload_protocol = picotool\n# add our variants files to the include and src paths\nbuild_flags = \n  ${rp2040_base.build_flags}\n  -D RPI_PICO\n  -I variants/rp2040/rpipicow\n  -D HW_SPI1_DEVICE\n  -D HAS_UDP_MULTICAST=1\n  -fexceptions  # for exception handling in MQTT\n  -ULED_BUILTIN\nbuild_src_filter = ${rp2040_base.build_src_filter} +<mesh/wifi/>\nlib_deps =\n  ${rp2040_base.lib_deps}\n  ${networking_base.lib_deps}\n  ${networking_extra.lib_deps}\ndebug_build_flags = ${rp2040_base.build_flags}, -g\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2040/rpipicow/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n#ifndef HAS_WIFI\n#define HAS_WIFI 1\n#endif\n\n// default I2C pins:\n// SDA = 4\n// SCL = 5\n\n// Recommended pins for SerialModule:\n// txd = 8\n// rxd = 9\n\n#define EXT_NOTIFY_OUT 22\n#define BUTTON_PIN 17\n\n#define LED_POWER PIN_LED\n\n#define BATTERY_PIN 26\n// ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 10\n#define LORA_MISO 12\n#define LORA_MOSI 11\n#define LORA_CS 3\n\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 15\n#define LORA_DIO1 20\n#define LORA_DIO2 2\n#define LORA_DIO3 RADIOLIB_NC\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n"
  },
  {
    "path": "variants/rp2040/senselora_rp2040/pins_arduino.h",
    "content": "#pragma once\n\n#define PIN_A0 (26u)\n#define PIN_A1 (27u)\n#define PIN_A2 (28u)\n#define PIN_A3 (29u)\n\nstatic const uint8_t A0 = PIN_A0;\nstatic const uint8_t A1 = PIN_A1;\nstatic const uint8_t A2 = PIN_A2;\nstatic const uint8_t A3 = PIN_A3;\n\n// LEDs\n#define PIN_LED1 (23u)\n\n#define ADC_RESOLUTION 12\n\n// Serial\n#define PIN_SERIAL1_TX (0ul)\n#define PIN_SERIAL1_RX (1ul)\n\n#define PIN_SERIAL2_TX (4ul)\n#define PIN_SERIAL2_RX (5ul)\n\n// SPI\n#define PIN_SPI0_MISO (16u)\n#define PIN_SPI0_MOSI (19u)\n#define PIN_SPI0_SCK (18u)\n#define PIN_SPI0_SS (17u)\n\n// Wire\n#define PIN_WIRE0_SDA (6u)\n#define PIN_WIRE0_SCL (7u)\n\n#define PIN_WIRE1_SDA (-1)\n#define PIN_WIRE1_SCL (-1)\n\n#define SERIAL_HOWMANY (3u)\n#define SPI_HOWMANY (2u)\n#define WIRE_HOWMANY (1u)\n\nstatic const uint8_t SS = PIN_SPI0_SS;\nstatic const uint8_t MOSI = PIN_SPI0_MOSI;\nstatic const uint8_t MISO = PIN_SPI0_MISO;\nstatic const uint8_t SCK = PIN_SPI0_SCK;\n\nstatic const uint8_t SDA = PIN_WIRE0_SDA;\nstatic const uint8_t SCL = PIN_WIRE0_SCL;"
  },
  {
    "path": "variants/rp2040/senselora_rp2040/platformio.ini",
    "content": "[env:senselora_rp2040]\nboard_level = extra\nextends = rp2040_base\nboard = rpipico\nupload_protocol = picotool\n\n# add our variants files to the include and src paths\nbuild_flags = ${rp2040_base.build_flags}\n  -D SENSELORA_RP2040\n  -I variants/rp2040/senselora_rp2040\n  -D DEBUG_RP2040_PORT=Serial\n"
  },
  {
    "path": "variants/rp2040/senselora_rp2040/variant.h",
    "content": "#define ARDUINO_ARCH_AVR\n\n#define USE_SSD1306\n\n#define BUTTON_PIN 2\n#define BUTTON_NEED_PULLUP\n\n#define LED_POWER PIN_LED1\n#define ledOff(pin) pinMode(pin, INPUT)\n\n#undef BATTERY_PIN\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define USE_RF95\n#define LORA_SCK PIN_SPI0_SCK\n#define LORA_MISO PIN_SPI0_MISO\n#define LORA_MOSI PIN_SPI0_MOSI\n#define LORA_CS PIN_SPI0_SS\n\n#define LORA_DIO0 21\n#define LORA_DIO1 22\n#define LORA_DIO2 RADIOLIB_NC\n#define LORA_RESET 20"
  },
  {
    "path": "variants/rp2350/rp2350.ini",
    "content": "; Common settings for rp2350 Processor based targets\n[rp2350_base]\nplatform =\n  # TODO renovate\n  https://github.com/maxgerhardt/platform-raspberrypi#cc24cfef37ed22ca9f2a6aead28c2deb76c39f24\n  ; For arduino-pico >= 5.4.4\nextends = arduino_base\nplatform_packages =\n  # TODO renovate\n  arduino-pico@https://github.com/earlephilhower/arduino-pico/releases/download/5.4.4/rp2040-5.4.4.zip\n\nboard_build.core = earlephilhower\nboard_build.filesystem_size = 0.5m\nbuild_flags = \n  ${arduino_base.build_flags} -Wno-unused-variable -Wcast-align\n  -Isrc/platform/rp2xx0\n  -D__PLAT_RP2350__\n  -D__FREERTOS=1\nbuild_src_filter = \n  ${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<modules/esp32> -<platform/nrf52/> -<platform/stm32wl> -<mesh/eth/> -<mesh/wifi/> -<mesh/http/> -<mesh/raspihttp> -<platform/rp2xx0/pico_sleep> -<platform/rp2xx0/hardware_rosc>\n\nlib_ignore =\n  BluetoothOTA\n  lvgl\n\nlib_deps =\n  ${arduino_base.lib_deps}\n  ${environmental_base.lib_deps}\n  ${environmental_extra.lib_deps}\n  ${radiolib_base.lib_deps}\n  # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto\n  rweather/Crypto@0.4.0\n"
  },
  {
    "path": "variants/rp2350/rpipico2/platformio.ini",
    "content": "[env:pico2]\nextends = rp2350_base\nboard = rpipico2\nboard_level = pr\nupload_protocol = picotool\n\n# add our variants files to the include and src paths\nbuild_flags =\n  ${rp2350_base.build_flags}\n  -D RPI_PICO2\n  -I variants/rp2350/rpipico2\n  -D DEBUG_RP2040_PORT=Serial\n  -D HW_SPI1_DEVICE\ndebug_build_flags = ${rp2350_base.build_flags}, -g\ndebug_tool = cmsis-dap ; for e.g. Picotool\n"
  },
  {
    "path": "variants/rp2350/rpipico2/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n// default I2C pins:\n// SDA = 4\n// SCL = 5\n\n// Recommended pins for SerialModule:\n// txd = 8\n// rxd = 9\n\n#define EXT_NOTIFY_OUT 22\n#define BUTTON_PIN 17\n\n#define LED_POWER PIN_LED\n\n#define BATTERY_PIN 26\n// ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 10\n#define LORA_MISO 12\n#define LORA_MOSI 11\n#define LORA_CS 3\n\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 15\n#define LORA_DIO1 20\n#define LORA_DIO2 2\n#define LORA_DIO3 RADIOLIB_NC\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif\n"
  },
  {
    "path": "variants/rp2350/rpipico2w/platformio.ini",
    "content": "[env:pico2w]\nextends = rp2350_base\nboard = rpipico2w\nboard_level = pr\nboard_check = true\nupload_protocol = jlink\n# debug settings for external openocd with RP2040 support (custom build)\ndebug_tool = custom\ndebug_init_cmds =\n  target extended-remote localhost:3333\n  $INIT_BREAK\n  monitor reset halt\n  $LOAD_CMDS\n  monitor init\n  monitor reset halt\n\n# add our variants files to the include and src paths\nbuild_flags =\n  ${rp2350_base.build_flags}\n  -DRPI_PICO2\n  -Ivariants/rp2350/rpipico2w\n#  -DDEBUG_RP2040_PORT=Serial\n  -DHW_SPI1_DEVICE\n  -DARDUINO_RASPBERRY_PI_PICO_2W\n  -DARDUINO_ARCH_RP2040\n  -DHAS_WIFI=1\n  -fexceptions  # for exception handling in MQTT\n  -DHAS_UDP_MULTICAST=1\nbuild_src_filter = ${rp2350_base.build_src_filter} +<mesh/wifi/>\nlib_deps =\n  ${rp2350_base.lib_deps}\n  ${networking_base.lib_deps}\n  ${networking_extra.lib_deps}\ndebug_build_flags = ${rp2350_base.build_flags}, -g\n"
  },
  {
    "path": "variants/rp2350/rpipico2w/variant.h",
    "content": "// #define RADIOLIB_CUSTOM_ARDUINO 1\n// #define RADIOLIB_TONE_UNSUPPORTED 1\n// #define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED 1\n\n#define ARDUINO_ARCH_AVR\n\n#ifndef HAS_WIFI\n#define HAS_WIFI 1\n#endif\n\n// default I2C pins:\n// SDA = 4\n// SCL = 5\n\n// Recommended pins for SerialModule:\n// txd = 8\n// rxd = 9\n\n#define EXT_NOTIFY_OUT 22\n#define BUTTON_PIN 17\n\n#define BATTERY_PIN 26\n// ratio of voltage divider = 3.0 (R17=200k, R18=100k)\n#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic\n#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION\n\n#define USE_SX1262\n\n#undef LORA_SCK\n#undef LORA_MISO\n#undef LORA_MOSI\n#undef LORA_CS\n\n#define LORA_SCK 10\n#define LORA_MISO 12\n#define LORA_MOSI 11\n#define LORA_CS 3\n\n#define LORA_DIO0 RADIOLIB_NC\n#define LORA_RESET 15\n#define LORA_DIO1 20\n#define LORA_DIO2 2\n#define LORA_DIO3 RADIOLIB_NC\n\n#ifdef USE_SX1262\n#define SX126X_CS LORA_CS\n#define SX126X_DIO1 LORA_DIO1\n#define SX126X_BUSY LORA_DIO2\n#define SX126X_RESET LORA_RESET\n#define SX126X_DIO2_AS_RF_SWITCH\n#define SX126X_DIO3_TCXO_VOLTAGE 1.8\n#endif"
  },
  {
    "path": "variants/stm32/CDEBYTE_E77-MBL/platformio.ini",
    "content": "[env:CDEBYTE_E77-MBL]\nextends = stm32_base\nboard = ebyte_e77_dev\nboard_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem\nboard_level = extra\nbuild_flags =\n  ${stm32_base.build_flags}\n  -Ivariants/stm32/CDEBYTE_E77-MBL\n  -DSERIAL_UART_INSTANCE=2\n  -DPIN_SERIAL_RX=PA3\n  -DPIN_SERIAL_TX=PA2\n  -DENABLE_HWSERIAL1\n  -DPIN_SERIAL1_RX=PB7\n  -DPIN_SERIAL1_TX=PB6\n  -DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1\n  -DMESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR=1\n  -DMESHTASTIC_EXCLUDE_I2C=1\n  -DMESHTASTIC_EXCLUDE_GPS=1\n\nupload_port = stlink"
  },
  {
    "path": "variants/stm32/CDEBYTE_E77-MBL/rfswitch.h",
    "content": "// From E77-900M22S Product Specification\n// https://www.cdebyte.com/pdf-down.aspx?id=2963\n// Note 1: PA6 and PA7 pins are used as internal control RF switches of the module, PA6 = RF_TXEN, PA7 = RF_RXEN, RF_TXEN=1\n// RF_RXEN=0 is the transmit channel, and RF_TXEN=0 RF_RXEN=1 is the receiving channel\n\nstatic const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PA7, PA6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[4] = {\n    {STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};"
  },
  {
    "path": "variants/stm32/CDEBYTE_E77-MBL/variant.h",
    "content": "/*\nEByte E77-MBL series\nhttps://www.cdebyte.com/products/E77-900MBL-01\nhttps://www.cdebyte.com/products/E77-400MBL-01\nhttps://github.com/olliw42/mLRS-docu/blob/master/docs/EBYTE_E77_MBL.md\n*/\n\n/*\nThis variant is a work in progress.\nDo not expect a working Meshtastic device with this target.\n*/\n\n#ifndef _VARIANT_EBYTE_E77_\n#define _VARIANT_EBYTE_E77_\n\n#define USE_STM32WLx\n\n#define LED_POWER PB4 // LED1\n// #define LED_POWER PB3 // LED2\n#define LED_STATE_ON 1\n\n#define SERIAL_PRINT_PORT 1\n\n#define EBYTE_E77_MBL\n#endif\n"
  },
  {
    "path": "variants/stm32/milesight_gs301/platformio.ini",
    "content": "; Milesight GS301 Bathroom Odor Detector\n; https://www.milesight.com/iot/product/lorawan-sensor/gs301\n[env:milesight_gs301]\nextends = stm32_base\nboard = wiscore_rak3172 ; Convenient choice as the same USART is used for programming/debug\nboard_level = extra\nboard_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem\nbuild_flags =\n  ${stm32_base.build_flags}\n  -Ivariants/stm32/milesight_gs301\n  -DPRIVATE_HW\n  -DMESHTASTIC_EXCLUDE_GPS=1\n  -DMESHTASTIC_EXCLUDE_I2C=1 # Analog ADuCM355 (unsupported) so no point building support for I2C in\n  -DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1\n  -DMESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR=1\nbuild_unflags =\n  -DDEBUG_MUTE # We have space for debug output until sensor support is added\nbuild_src_filter =\n  ${stm32_base.build_src_filter}\n  +<../variants/stm32/milesight_gs301>\nlib_deps =\n  ${stm32_base.lib_deps}\n\nupload_port = stlink\n"
  },
  {
    "path": "variants/stm32/milesight_gs301/rfswitch.h",
    "content": "// Seems to use the same RF switch pins as RAK3172… getting Tx/Rx SNR +11dB with a nearby node\n// PB8, PC13\n\nstatic const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PB8, PC13, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[4] = {\n    {STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};\n"
  },
  {
    "path": "variants/stm32/milesight_gs301/variant.cpp",
    "content": "#include \"variant.h\"\n#include \"Arduino.h\"\n\nvoid earlyInitVariant()\n{\n    pinMode(USER_LED, OUTPUT);\n    digitalWrite(USER_LED, HIGH ^ LED_STATE_ON);\n}"
  },
  {
    "path": "variants/stm32/milesight_gs301/variant.h",
    "content": "#ifndef _VARIANT_MILESIGHT_GS301_\n#define _VARIANT_MILESIGHT_GS301_\n\n#define USE_STM32WLx\n\n// I/O\n#define LED_STATE_ON 1\n#define PIN_LED1 PA0 // Green LED\n#define LED_POWER PIN_LED1\n#define PIN_LED2 PA0 // Red LED\n#define USER_LED PIN_LED2\n#define BUTTON_PIN PC13\n#define BUTTON_ACTIVE_LOW true\n#define BUTTON_ACTIVE_PULLUP false\n#define PIN_BUZZER PA6\n\n// EC Sense DGM10 Double Gas Module\n// Analog ADuCM355 (unsupported); SHTC3 is connected to ADuCM355 and not directly accessible\n#define PIN_WIRE_SDA PB7\n#define PIN_WIRE_SCL PB8\n// Commented out to keep sensor powered down due to lack of support\n/*\n#define VEXT_ENABLE PB12 // TI TPS61291DRV VSEL - set LOW before ENable for Vout = 3.3V\n#define VEXT_ON_VALUE LOW\n#define SENSOR_POWER_CTRL_PIN PB2 // TI TPS61291DRV EN pin\n#define SENSOR_POWER_ON HIGH\n#define HAS_SENSOR 1\n*/\n\n#define ENABLE_HWSERIAL1\n#define PIN_SERIAL1_RX NC\n#define PIN_SERIAL1_TX PB6\n\n// LoRa\n#define SX126X_DIO3_TCXO_VOLTAGE 3.0\n\n// Required to avoid Serial1 conflicts due to board definition here:\n// https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_RAK3172_MODULE.h\n#define RAK3172\n\n#endif\n"
  },
  {
    "path": "variants/stm32/rak3172/platformio.ini",
    "content": "[env:rak3172]\nextends = stm32_base\nboard = wiscore_rak3172\nboard_level = pr\nboard_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem\nbuild_flags =\n  ${stm32_base.build_flags}\n  -Ivariants/stm32/rak3172\n  -DENABLE_HWSERIAL1\n  -DPIN_SERIAL1_RX=PB7\n  -DPIN_SERIAL1_TX=PB6\n  -DPIN_WIRE_SDA=PA11\n  -DPIN_WIRE_SCL=PA12\n  -DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1\n  -DMESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR=1\n  -DMESHTASTIC_EXCLUDE_I2C=1\n  -DMESHTASTIC_EXCLUDE_GPS=1\n\nupload_port = stlink\n"
  },
  {
    "path": "variants/stm32/rak3172/rfswitch.h",
    "content": "// Pins from https://forum.rakwireless.com/t/rak3172-internal-schematic/4557/2\n// PB8, PC13\n\nstatic const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PB8, PC13, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[4] = {\n    {STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};"
  },
  {
    "path": "variants/stm32/rak3172/variant.h",
    "content": "/*\nSTM32WLE5 Core Module for LoRaWAN® RAK3372\nhttps://store.rakwireless.com/products/wisblock-core-module-rak3372\n*/\n\n/*\nThis variant is a work in progress.\nDo not expect a working Meshtastic device with this target.\n*/\n\n#ifndef _VARIANT_RAK3172_\n#define _VARIANT_RAK3172_\n\n#define USE_STM32WLx\n\n#define LED_POWER PA0 // Green LED\n#define LED_STATE_ON 1\n\n#define RAK3172\n#define SERIAL_PRINT_PORT 1\n\n#endif\n"
  },
  {
    "path": "variants/stm32/russell/platformio.ini",
    "content": "; Russell is a board designed to mount on an ER34615/IFR32700 cell and go Up! on a balloon\n; Hardware repository: https://github.com/Meshtastic-Malaysia/russell\n; - RAK3172 STM32WLE5CCU6 MCU + integrated SX1262 LoRa\n; - CDtop CD-PA1010D GPS\n; - Bosch Sensortec BME280 sensor\n; - Consonance CN3158 LiFePO4 solar charger\n[env:russell]\nextends = stm32_base\nboard = wiscore_rak3172\nboard_level = extra\nboard_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem\nbuild_flags =\n  ${stm32_base.build_flags}\n  -Ivariants/stm32/russell\n  -DPRIVATE_HW\nlib_deps =\n  ${stm32_base.lib_deps}\n\t# renovate: datasource=custom.pio depName=Adafruit BME280 packageName=adafruit/library/Adafruit BME280 Library\n\tadafruit/Adafruit BME280 Library@2.3.0\n\nupload_port = stlink\n"
  },
  {
    "path": "variants/stm32/russell/rfswitch.h",
    "content": "// Pins from https://forum.rakwireless.com/t/rak3172-internal-schematic/4557/2\n// PB8, PC13\n\nstatic const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PB8, PC13, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[4] = {\n    {STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};\n"
  },
  {
    "path": "variants/stm32/russell/variant.h",
    "content": "#ifndef _VARIANT_RUSSELL_\n#define _VARIANT_RUSSELL_\n\n#define USE_STM32WLx\n\n// I/O\n#define LED_POWER PA0 // Red LED\n#define LED_STATE_ON 1\n#define BUTTON_PIN PH3 // Shared with BOOT0\n#define BUTTON_NEED_PULLUP\n// Charger IC charge/standby pins are open-drain with no hardware pull-up:\n// Internal pull-up is needed on STM32 (TODO)\n// #define EXT_CHRG_DETECT PA5\n// #define EXT_PWR_DETECT PA4\n\n// Bosch Sensortec BME280\n#define HAS_SENSOR 1\n\n// CDtop CD-PA1010D\n#define ENABLE_HWSERIAL1\n#define PIN_SERIAL1_RX PB7\n#define PIN_SERIAL1_TX PB6\n#define HAS_GPS 1\n#define PIN_GPS_STANDBY PA15\n#define GPS_RX_PIN PB7\n#define GPS_TX_PIN PB6\n\n// LoRa\n/*\n * RAK3172   (-20–85°C) -> No TCXO\n * RAK3172-T (-40–85°C) -> 3.0V TCXO\n * https://github.com/RAKWireless/RAK-STM32-RUI/blob/e5a28be8fab1a492bd9223dd425ca33a8a297d90/variants/WisDuo_RAK3172-T_Board/radio_conf.h#L91\n */\n#define TCXO_OPTIONAL\n#define SX126X_DIO3_TCXO_VOLTAGE 3.0\n\n// Required to avoid Serial1 conflicts due to board definition here:\n// https://github.com/stm32duino/Arduino_Core_STM32/blob/main/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_RAK3172_MODULE.h\n#define RAK3172\n\n#endif\n"
  },
  {
    "path": "variants/stm32/stm32.ini",
    "content": "[stm32_base]\nextends = arduino_base\nplatform =\n  # renovate: datasource=custom.pio depName=platformio/ststm32 packageName=platformio/platform/ststm32\n  platformio/ststm32@19.5.0\nplatform_packages =\n  # renovate: datasource=github-tags depName=Arduino_Core_STM32 packageName=stm32duino/Arduino_Core_STM32\n  platformio/framework-arduinoststm32@https://github.com/stm32duino/Arduino_Core_STM32/archive/2.10.1.zip\nextra_scripts =\n  ${env.extra_scripts}\n  extra_scripts/stm32_extra.py\n\nbuild_type = release\n\nbuild_flags =\n  ${arduino_base.build_flags}\n  -flto\n  -Isrc/platform/stm32wl -g\n  -DMESHTASTIC_EXCLUDE_AUDIO=1\n  -DMESHTASTIC_EXCLUDE_ATAK=1 ; ATAK is quite big, disable it for big flash savings.\n  -DMESHTASTIC_EXCLUDE_INPUTBROKER=1\n  -DMESHTASTIC_EXCLUDE_POWERMON=1\n  -DMESHTASTIC_EXCLUDE_SCREEN=1\n  -DMESHTASTIC_EXCLUDE_MQTT=1\n  -DMESHTASTIC_EXCLUDE_BLUETOOTH=1\n  -DMESHTASTIC_EXCLUDE_WIFI=1\n  -DMESHTASTIC_EXCLUDE_TZ=1 ; Exclude TZ to save some flash space.\n  -DSERIAL_RX_BUFFER_SIZE=256 ; For GPS - the default of 64 is too small.\n  -DHAS_SCREEN=0 ; Always disable screen for STM32, it is not supported.\n  -DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF ; This is REQUIRED for at least traceroute debug prints - without it the length ends up uninitialized.\n  -DDEBUG_MUTE ; You can #undef DEBUG_MUTE in certain source files if you need the logs.\n  -fmerge-all-constants\n  -ffunction-sections\n  -fdata-sections\n  -DRADIOLIB_EXCLUDE_SX128X=1\n  -DRADIOLIB_EXCLUDE_SX127X=1\n  -DRADIOLIB_EXCLUDE_LR11X0=1\n  -DHAL_DAC_MODULE_ONLY\n  -DHAL_RNG_MODULE_ENABLED\n  -Wl,--wrap=__assert_func\n  -Wl,--wrap=strerror\n  -Wl,--wrap=_tzset_unlocked_r\n\nbuild_src_filter =\n  ${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/wifi/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<input> -<buzz> -<modules/RemoteHardwareModule.cpp> -<platform/nrf52> -<platform/portduino> -<platform/rp2xx0> -<mesh/raspihttp>\n\nboard_upload.offset_address = 0x08000000\nupload_protocol = stlink\ndebug_tool = stlink\n\nlib_deps =\n  ${env.lib_deps}\n  ${radiolib_base.lib_deps}\n  # renovate: datasource=git-refs depName=caveman99-stm32-Crypto packageName=https://github.com/caveman99/Crypto gitBranch=main\n  https://github.com/caveman99/Crypto/archive/1aa30eb536bd52a576fde6dfa393bf7349cf102d.zip\n\nlib_ignore =\n  OneButton\n"
  },
  {
    "path": "variants/stm32/wio-e5/platformio.ini",
    "content": "[env:wio-e5]\nextends = stm32_base\nboard = lora_e5_dev_board\nboard_level = pr\nboard_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem\nbuild_flags =\n  ${stm32_base.build_flags}\n  -Ivariants/stm32/wio-e5\n  -DSERIAL_UART_INSTANCE=1\n  -DPIN_SERIAL_RX=PB7\n  -DPIN_SERIAL_TX=PB6\n  -DPIN_WIRE_SDA=PA15\n  -DPIN_WIRE_SCL=PB15\n  -DHAS_SENSOR=1\n  -DENABLE_HWSERIAL2\n  -DPIN_SERIAL2_TX=PA2\n  -DPIN_SERIAL2_RX=PA3\n  -DHAS_GPS=1\n  -DGPS_SERIAL_PORT=Serial2\n  -DMESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR=1\n\nupload_port = stlink\n"
  },
  {
    "path": "variants/stm32/wio-e5/rfswitch.h",
    "content": "/* https://wiki.seeedstudio.com/LoRa-E5_STM32WLE5JC_Module/\n * Wio-E5 module ONLY transmits through RFO_HP\n * Receive: PA4=1, PA5=0\n * Transmit(high output power, SMPS mode): PA4=0, PA5=1 */\nstatic const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PA4, PA5, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};\n\nstatic const Module::RfSwitchMode_t rfswitch_table[4] = {\n    {STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};\n"
  },
  {
    "path": "variants/stm32/wio-e5/variant.h",
    "content": "/*\nWio-E5 mini (formerly LoRa-E5 mini)\nhttps://www.seeedstudio.com/LoRa-E5-mini-STM32WLE5JC-p-4869.html\nhttps://www.seeedstudio.com/LoRa-E5-Wireless-Module-p-4745.html\n*/\n\n/*\nThis variant is a work in progress.\nDo not expect a working Meshtastic device with this target.\n*/\n\n#ifndef _VARIANT_WIOE5_\n#define _VARIANT_WIOE5_\n\n#define USE_STM32WLx\n\n#define LED_POWER PB5\n#define LED_STATE_ON 0\n\n#define WIO_E5\n\n#endif\n"
  },
  {
    "path": "version.properties",
    "content": "[VERSION]  \nmajor = 2\nminor = 7\nbuild = 21\n"
  }
]